Extracted pop menu animation to a rect copying function for shop
This commit is contained in:
+19
-6
@@ -4,6 +4,11 @@
|
||||
/* This file contains general utils and wrappers that relate to
|
||||
* graphics/video/vram and generally displaying things on the screen.
|
||||
* Mostly wrappers and defines for using tonc.
|
||||
*
|
||||
* Note: the code here assumes we're working with a single screenblock
|
||||
* which should be true for this entire game since a screenblock
|
||||
* is enough to contain a full screen (and more)
|
||||
* and there isn't any scrolling etc.
|
||||
*/
|
||||
|
||||
/* Reminder:
|
||||
@@ -17,13 +22,14 @@
|
||||
#define AFFINE_BG_SBB 2
|
||||
#define AFFINE_BG_CBB 2
|
||||
|
||||
/* A 1024 size screenblock is arranged in a grid of 32x32 block entries
|
||||
/* Dimensions for a screenblock.
|
||||
* A 1024 size screenblock is arranged in a grid of 32x32 screen entries
|
||||
* Interestingly since each block is 8x8 pixels, the 240x160 GBA screen
|
||||
* is smaller than the screenblock, only the top left part of the screenblock
|
||||
* is displayed on the screen.
|
||||
*/
|
||||
#define SCREENBLOCK_ROW_LEN 32
|
||||
|
||||
#define SE_ROW_LEN 32
|
||||
#define SE_COL_LEN 32
|
||||
|
||||
typedef struct
|
||||
{
|
||||
@@ -35,10 +41,17 @@ typedef struct
|
||||
|
||||
#define UNDEFINED -1
|
||||
|
||||
/* Clears a rect in the main background screenblock.
|
||||
* The rect needs to be in screenblocks
|
||||
/* Clears a rect in the main background.
|
||||
* The se_rect dimensions need to be in number of tiles.
|
||||
*/
|
||||
void main_bg_se_clear_rect(Rect rect);
|
||||
void main_bg_se_clear_rect(Rect se_rect);
|
||||
|
||||
/* Copies a rect in the main background a single tile up.
|
||||
* The se_rect dimensions need to be in number of tiles.
|
||||
* This is for the pop menu animation, can later be generalized to more tiles
|
||||
* or other directions
|
||||
*/
|
||||
void main_bg_se_copy_rect_1_tile_up(Rect se_rect);
|
||||
|
||||
// A wrapper for tte_erase_rect that would use the rect struct
|
||||
void tte_erase_rect_wrapper(Rect rect);
|
||||
|
||||
Reference in New Issue
Block a user