temporary overwrite of previous merge. I've been working on this for 10 hours today and really do not have the patience to resolve the conflicts right now. I'll do it later 😭
This commit is contained in:
@@ -36,6 +36,9 @@
|
||||
#define SE_UP -1
|
||||
#define SE_DOWN 1
|
||||
|
||||
// Tile size in pixels, both height and width as tiles are square
|
||||
#define TILE_SIZE 8
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int left;
|
||||
@@ -52,6 +55,19 @@ typedef struct
|
||||
*/
|
||||
u16 main_bg_se_get_tile(int x, int y);
|
||||
|
||||
INLINE int rect_width(const Rect* rect)
|
||||
{
|
||||
/* Extra parens to avoid issues in case compiler turns INLINE into macro
|
||||
* Not sure if necessary, could be just paranoia
|
||||
*/
|
||||
return (((rect)->right) - ((rect)->left) + 1);
|
||||
}
|
||||
|
||||
INLINE int rect_height(const Rect* rect)
|
||||
{
|
||||
return (((rect)->bottom) - ((rect)->top) + 1);
|
||||
}
|
||||
|
||||
/* Clears a rect in the main background.
|
||||
* The se_rect dimensions need to be in number of tiles.
|
||||
*/
|
||||
@@ -74,6 +90,13 @@ void main_bg_se_copy_rect(Rect se_rect, int x, int y);
|
||||
* The tile is copied to the top left corner of the rect.
|
||||
*/
|
||||
void main_bg_se_copy_tile_to_rect(u16 tile, Rect se_rect);
|
||||
/* Moves a rect in the main background vertically in direction by a single tile.
|
||||
* Note that tiles in the previous location will be transparent (0x000)
|
||||
* so maybe copy would be a better choice if you don't want to delete things
|
||||
* direction must be either SE_UP or SE_DOWN.
|
||||
* se_rect dimensions are in number of tiles.
|
||||
*/
|
||||
void main_bg_se_move_rect_1_tile_vert(Rect se_rect, int direction);
|
||||
|
||||
// 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