mirror of
https://github.com/GearsProgress/Poke_Transporter_GB.git
synced 2026-10-24 00:13:40 -05:00
Formatting (again)
This commit is contained in:
@@ -19,8 +19,8 @@ void background_frame(int global_frame_count)
|
||||
}
|
||||
}
|
||||
|
||||
// This could honestly be an object... might want to do that in the future,
|
||||
// depending on how complex using this gets
|
||||
// This could honestly be an object... might want to do that in the future, depending on how complex
|
||||
// using this gets
|
||||
void create_textbox(int text_section, int text_key, bool eraseMainBox)
|
||||
{
|
||||
const u8 box_type = text_box_type_tables[text_section][text_key];
|
||||
@@ -29,32 +29,25 @@ void create_textbox(int text_section, int text_key, bool eraseMainBox)
|
||||
|
||||
void create_textbox(u8 textbox_type, bool eraseMainBox)
|
||||
{
|
||||
const int startTileX =
|
||||
box_type_info[textbox_type][BOX_TYPE_VAL_START_TILE_X];
|
||||
const int startTileY =
|
||||
box_type_info[textbox_type][BOX_TYPE_VAL_START_TILE_Y];
|
||||
const int text_space_width =
|
||||
box_type_info[textbox_type][BOX_TYPE_VAL_PIXELS_PER_LINE];
|
||||
const int text_space_height =
|
||||
box_type_info[textbox_type][BOX_TYPE_VAL_NUM_OF_LINES] * 16;
|
||||
const int startTileX = box_type_info[textbox_type][BOX_TYPE_VAL_START_TILE_X];
|
||||
const int startTileY = box_type_info[textbox_type][BOX_TYPE_VAL_START_TILE_Y];
|
||||
const int text_space_width = box_type_info[textbox_type][BOX_TYPE_VAL_PIXELS_PER_LINE];
|
||||
const int text_space_height = box_type_info[textbox_type][BOX_TYPE_VAL_NUM_OF_LINES] * 16;
|
||||
|
||||
create_textbox(startTileX, startTileY, text_space_width, text_space_height,
|
||||
eraseMainBox);
|
||||
create_textbox(startTileX, startTileY, text_space_width, text_space_height, eraseMainBox);
|
||||
}
|
||||
|
||||
void create_textbox(int startTileX, int startTileY, int text_space_width,
|
||||
int text_space_height, bool eraseMainBox)
|
||||
void create_textbox(
|
||||
int startTileX, int startTileY, int text_space_width, int text_space_height, bool eraseMainBox)
|
||||
{
|
||||
if (eraseMainBox)
|
||||
{
|
||||
erase_textbox_tiles();
|
||||
}
|
||||
add_menu_box(
|
||||
startTileX, startTileY, text_space_width + 16, text_space_height + 16);
|
||||
add_menu_box(startTileX, startTileY, text_space_width + 16, text_space_height + 16);
|
||||
tte_set_pos((startTileX + 1) * 8, (startTileY + 1) * 8);
|
||||
tte_set_margins((startTileX + 1) * 8, (startTileY + 1) * 8,
|
||||
((startTileX + 1) * 8) + text_space_width,
|
||||
((startTileY + 1) * 8) + text_space_height);
|
||||
((startTileX + 1) * 8) + text_space_width, ((startTileY + 1) * 8) + text_space_height);
|
||||
tte_erase_rect(0, 0, H_MAX, V_MAX);
|
||||
show_textbox();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user