RGBGrafx>Variables |
The variable RGBG_tileset is referened by several tileset related functions. RGBG_tileset should contain the high byte of the adress for the tileset you are currenly modifying. Therefore, the contents of this variable should always be either $88 or $80. It is possible to use another value in order to cause a function such as RGBG_LoadTiles affect an area of memory other than VRAM, but I'm not sure why you'd want to do that.
The variable RGBG_tilemap is referened by several tilemap related functions. RGBG_tilemap should contain the high byte of the adress for the tilemap you are currenly modifying. Therefore, the contents of this variable should always be either $98 or $9C. It is possible to use another value in order to cause a function such as RGBG_SetTileMap affect an area of memory other than VRAM, but I'm not sure why you'd want to do that.
This variables is only used in the function RGBG_SetTileMap. The value of RGBG_map_offset is added to each byte before it is added to VRAM while running this function. If you wish a tilemap to be unchanged as it is copied into VRAM, set RGBG_map_offset to 0.
Example | |
If the value of RGBG_map_offset is 25 when RGBG_SetTileMap is called: |
|
The tilemap in memory: 1,2,3, 4,5,6, 7,8,9 |
Will be copied into VRAM as: 26,27,28, 29,30,31, 32,33,34 |
The value of this variable will be set to true (a non-zero number) ever time you call a functions that modifies RGBG's echo OAM. RGBG_update_sprites is zeroed every time you call RGBG_DoDMA. In essence, this variables is a flag to let you know if the real OAM needs updating, or whether it is current. It is suggested that you set this variable to a non-zero number if you modify the echo OAM by means other than an RGBG function call.
Example Code |
SECTION "VBL_INT", HOME[$0040] vbl_int:: push AF ;update our sprites if need be ld A,[RGBG_update_sprites] and A jp z, .bail call RGBG_DoDMA .bail pop AF reti |
The value of RGBG_fade_to_color is used be RGBG_SimpleFadeOut to determine which color *white or black) to fade to. The acceptable values are RGBG_WHITE (1) or RGBG_BLACK (0).
This variable reports how many steps still must be run before a currently running complex bacgkround palette fade is completed. If to fade is in progess, RGBG_fade_steps_left_bkg will be zero. If this number is zero, calling RGBG_RunComplexFadeStepBkg will have no effect.
RGBG_pals_to_fade_bkg is used as input for every complex background palette fade. It should contain the number of palettes that are to be faded during the currently running complex background palette fade.
RGBG_first_pal_to_fade_bkg is used as input for every complex background palette fade. It should contain the number of the first palette that is to be faded during the currently running complex background palette fade.
Each complex fade variable with the obj suffix is functionally eqivalent to it's bkg-suffixed counterpart, except that is works with the complex object palette fade functions, instead of with the complex background palette fade functions.
See: RGBG_fade_steps_left_bkg, RGBG_pals_to_fade_bkg, RGBG_first_pal_to_fade_bkg
Copyright 2000 Aaron St.John