YesNoOk
avatar

RemapPal (SCTRLs) 1.0 +1.1b (Read 2407 times)

Started by Ricepigeon, September 15, 2015, 10:17:34 pm
Share this topic:
RemapPal (SCTRLs) 1.0 +1.1b
#1  September 15, 2015, 10:17:34 pm
  • *****
  • Gaps? Where we're going, we don't need gaps...
    • USA
    • ricepigeon.neocities.org
Changes one of the player's palettes to another.

Required parameters:

    source = src_pal_grp, src_pal_item
        See below.
    dest = dst_pal_grp, dst_pal_item
        All of the player sprites that use the source palette will be drawn using the dest palette instead. The source and dest palettes must exist within the player's sprites, and both must be of the same color depth. Note that the dest palette number refers to an unmapped palette; e.g. if you map (1,1) -> (1,6), and then you map (2,2) -> (1,1), the result is that (2,2) will be mapped to palette (1,1) from the original sprite file, not (1,6).

Optional parameters:
    none

Examples:
Code:
; All sprites using palette (1,1) will be drawn using palette (1,3)
; instead.
type = RemapPal
source = 1,1
dest = 1,3



1.1b Version

Changes one of the player's palettes to another.

Required parameters:
none

Optional parameters:
source = src_pal_grp, src_pal_item
See below.

dest = dst_pal_grp, dst_pal_item
All of the player sprites that use the source palette will be drawn using the dest palette instead. The source and dest palettes must exist within the player's sprites, and both must be of the same color depth.

If src_pal_grp is -1, all indexed-color sprites will be remapped to the dest palette. This only affects sprites of the same color depth as the dest palette. All other existing mappings will be removed.

If dst_pal_grp is -1, the mapping for the source is removed. Setting the dest pair to the same values as the source pair has the same effect.

The default value for source is -1,0. The default value for dest is -1,0.

Notes:
Palette mappings are not transitive; i.e. mapping 1,0 to 2,0 and 2,0 to 3,0 will not map 1,0 to 3,0.

In 1.1 and newer, each player is allowed up to 8 different palette mappings at the same time. Subsequent calls of RemapPal will fail if the source pair is not already being mapped. Unused mappings can be removed by setting dst_pal_grp to -1 for a given source pair.

Example:

Code:
; All sprites using palette (1,1) will be drawn using palette (1,3)
; instead.
type = RemapPal
source = 1,1
dest = 1,3
RemoveExplod

Additional Notes:
This SCTRL is automatically included in State 5900 in common1.cns for all versions of MUGEN starting with version 1.0 and above and is responsible for applying palettes in those versions. Most mugen authors who are just starting with MUGEN 1.0 and are converting their older WinMUGEN creations over to the new engine will often find that their palettes are not working due to their State 5900 missing the proper RemapPal SCTRL.

It should also be worth noting that applying a RemapPal SCTRL will cancel the effects of any PalFX SCTRLs currently being applied to the character. To get an idea of what I'm talking about, here we have the same attack which puts p2 into a custom state that applies a PalFX controller to simulate being frozen. One is the default Kung Fu Man, while the other is a character that continuously applies a ReMapPal every tick;



Please see this thread for more information regarding this.
Last Edit: October 23, 2015, 06:40:47 pm by Just No Point
Re: RemapPal (SCTRLs) 1.0 +1.1b
#2  October 23, 2015, 06:41:20 pm
  • ******
    • www.justnopoint.com/
Added 1.1b documentation