[Refactor] Moved reset_top_left_panel_bottom_row() to common_ui.c/.h (#581)
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
#include "game/round_end.h"
|
||||
#include "game/run_setup.h"
|
||||
#include "game/shop.h"
|
||||
#include "layout.h"
|
||||
|
||||
typedef void (*BackgroundRenderCallback)(void);
|
||||
|
||||
@@ -43,3 +44,11 @@ void change_background(enum BackgroundId id, bool force_redraw)
|
||||
}
|
||||
background = id;
|
||||
}
|
||||
|
||||
void reset_top_left_panel_bottom_row(void)
|
||||
{
|
||||
BG_POINT top_left_panel_bottom_row_pos = TOP_LEFT_PANEL_POINT;
|
||||
// Use the source rect height to offset to the bottom row point
|
||||
top_left_panel_bottom_row_pos.y += rect_height(&TOP_LEFT_ITEM_SRC_RECT) - 1;
|
||||
main_bg_se_copy_rect(TOP_LEFT_PANEL_BOTTOM_ROW_RESET_RECT, top_left_panel_bottom_row_pos);
|
||||
}
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
#include <tonc_tte.h>
|
||||
|
||||
static const Rect FULL_SCREENBLOCK_RECT = {0, 0, SE_ROW_LEN - 1, SE_COL_LEN - 1};
|
||||
static const Rect TOP_LEFT_PANEL_BOTTOM_ROW_RESET_RECT = {0, 28, 8, 28};
|
||||
|
||||
static void clip_se_rect_to_screenblock(Rect* rect);
|
||||
static void bg_se_copy_or_move_rect_1_tile_vert(
|
||||
@@ -501,14 +500,6 @@ void main_bg_se_clear_rect(Rect se_rect)
|
||||
}
|
||||
}
|
||||
|
||||
void reset_top_left_panel_bottom_row(void)
|
||||
{
|
||||
BG_POINT top_left_panel_bottom_row_pos = TOP_LEFT_PANEL_POINT;
|
||||
// Use the source rect height to offset to the bottom row point
|
||||
top_left_panel_bottom_row_pos.y += rect_height(&TOP_LEFT_ITEM_SRC_RECT) - 1;
|
||||
main_bg_se_copy_rect(TOP_LEFT_PANEL_BOTTOM_ROW_RESET_RECT, top_left_panel_bottom_row_pos);
|
||||
}
|
||||
|
||||
// Width of the screen, in nb of tiles
|
||||
#define MAX_LINE_TEXT_LENGTH 30
|
||||
|
||||
|
||||
Reference in New Issue
Block a user