mirror of
https://github.com/GearsProgress/Poke_Transporter_GB.git
synced 2026-03-21 17:34:42 -05:00
Fixing cable printout
This commit is contained in:
parent
e10d4cc044
commit
e9784c88ed
|
|
@ -13,7 +13,8 @@
|
||||||
#define BG_TEXT REG_BG3CNT
|
#define BG_TEXT REG_BG3CNT
|
||||||
|
|
||||||
void background_frame(int global_frame_count);
|
void background_frame(int global_frame_count);
|
||||||
void create_textbox_new(int text_section, int text_key, bool eraseMainBox);
|
void create_textbox(int text_section, int text_key, bool eraseMainBox);
|
||||||
|
void create_textbox(int startTileX, int startTileY, int text_space_width, int text_space_height, bool eraseMainBox);
|
||||||
void show_textbox();
|
void show_textbox();
|
||||||
void hide_textbox();
|
void hide_textbox();
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -20,13 +20,19 @@ 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_new(int text_section, int text_key, bool eraseMainBox)
|
void create_textbox(int text_section, int text_key, bool eraseMainBox)
|
||||||
{
|
{
|
||||||
int box_type = text_box_type_tables[text_section][text_key];
|
int box_type = text_box_type_tables[text_section][text_key];
|
||||||
int startTileX = box_type_info[box_type][BOX_TYPE_VAL_START_TILE_X];
|
int startTileX = box_type_info[box_type][BOX_TYPE_VAL_START_TILE_X];
|
||||||
int startTileY = box_type_info[box_type][BOX_TYPE_VAL_START_TILE_Y];
|
int startTileY = box_type_info[box_type][BOX_TYPE_VAL_START_TILE_Y];
|
||||||
int text_space_width = box_type_info[box_type][BOX_TYPE_VAL_PIXELS_PER_LINE];
|
int text_space_width = box_type_info[box_type][BOX_TYPE_VAL_PIXELS_PER_LINE];
|
||||||
int text_space_height = box_type_info[box_type][BOX_TYPE_VAL_NUM_OF_LINES] * 16;
|
int text_space_height = box_type_info[box_type][BOX_TYPE_VAL_NUM_OF_LINES] * 16;
|
||||||
|
|
||||||
|
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)
|
||||||
|
{
|
||||||
if (eraseMainBox)
|
if (eraseMainBox)
|
||||||
{
|
{
|
||||||
erase_textbox_tiles();
|
erase_textbox_tiles();
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ debug_options g_debug_options =
|
||||||
.ignore_game_pak_sprites = (false && DEBUG_MODE),
|
.ignore_game_pak_sprites = (false && DEBUG_MODE),
|
||||||
.ignore_link_cable = (false && DEBUG_MODE),
|
.ignore_link_cable = (false && DEBUG_MODE),
|
||||||
.ignore_mg_e4_flags = (true && DEBUG_MODE),
|
.ignore_mg_e4_flags = (true && DEBUG_MODE),
|
||||||
.ignore_unreceived_pkmn = (false && DEBUG_MODE),
|
.ignore_unreceived_pkmn = (true && DEBUG_MODE),
|
||||||
.force_tutorial = (false && DEBUG_MODE),
|
.force_tutorial = (false && DEBUG_MODE),
|
||||||
.dont_hide_invalid_pkmn = (false && DEBUG_MODE),
|
.dont_hide_invalid_pkmn = (false && DEBUG_MODE),
|
||||||
.ignore_dex_completion = (false && DEBUG_MODE),
|
.ignore_dex_completion = (false && DEBUG_MODE),
|
||||||
|
|
|
||||||
|
|
@ -98,6 +98,7 @@ int link_cable_memory_section_index = 0;
|
||||||
|
|
||||||
void print(const char *format, ...)
|
void print(const char *format, ...)
|
||||||
{
|
{
|
||||||
|
// I don't think this function is called anymore...
|
||||||
va_list args;
|
va_list args;
|
||||||
va_start(args, format);
|
va_start(args, format);
|
||||||
|
|
||||||
|
|
@ -123,10 +124,13 @@ void print(const char *format, ...)
|
||||||
va_end(args);
|
va_end(args);
|
||||||
|
|
||||||
tte_erase_rect(0, 0, H_MAX, V_MAX);
|
tte_erase_rect(0, 0, H_MAX, V_MAX);
|
||||||
|
|
||||||
for (int j = 0; j < 10; j++)
|
for (int j = 0; j < 10; j++)
|
||||||
{
|
{
|
||||||
|
tte_erase_rect(0, 0, H_MAX, V_MAX);
|
||||||
|
tte_set_pos(0, 0);
|
||||||
ptgb_write_simple(reinterpret_cast<const byte *>("#{cx:0xE000}"), true);
|
ptgb_write_simple(reinterpret_cast<const byte *>("#{cx:0xE000}"), true);
|
||||||
ptgb_write_simple(reinterpret_cast<const byte *>(spi_text_out_array[j]), true);
|
ptgb_write_simple((byte*)(spi_text_out_array[j]), true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -362,7 +366,6 @@ int loop(byte *box_data_storage, byte *curr_payload, GB_ROM *curr_gb_rom, PokeBo
|
||||||
#define NUM_LINES 8
|
#define NUM_LINES 8
|
||||||
int counter = 0;
|
int counter = 0;
|
||||||
char stuff[NUM_LINES][LINE_WIDTH];
|
char stuff[NUM_LINES][LINE_WIDTH];
|
||||||
|
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
if (g_debug_options.print_link_data && key_held(KEY_L))
|
if (g_debug_options.print_link_data && key_held(KEY_L))
|
||||||
|
|
@ -397,7 +400,7 @@ int loop(byte *box_data_storage, byte *curr_payload, GB_ROM *curr_gb_rom, PokeBo
|
||||||
n2hexstr(&stuff[NUM_LINES - 1][18], out_data & 0xFF, 2);
|
n2hexstr(&stuff[NUM_LINES - 1][18], out_data & 0xFF, 2);
|
||||||
stuff[NUM_LINES - 1][20] = '\0';
|
stuff[NUM_LINES - 1][20] = '\0';
|
||||||
|
|
||||||
// create_textbox(0, 0, 125, 80, false);
|
create_textbox(0, 0, 125, 128, false);
|
||||||
ptgb_write_debug(debug_charset, *stuff, true);
|
ptgb_write_debug(debug_charset, *stuff, true);
|
||||||
}
|
}
|
||||||
else if (g_debug_options.write_cable_data_to_save)
|
else if (g_debug_options.write_cable_data_to_save)
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@
|
||||||
#include "string.h"
|
#include "string.h"
|
||||||
#include "text_data_table.h"
|
#include "text_data_table.h"
|
||||||
#include "translated_text.h"
|
#include "translated_text.h"
|
||||||
|
#include "dbg/debug_mode.h"
|
||||||
|
|
||||||
int global_frame_count = 0;
|
int global_frame_count = 0;
|
||||||
bool rand_enabled = true;
|
bool rand_enabled = true;
|
||||||
|
|
@ -208,6 +209,12 @@ void link_animation_state(int state)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
curr_link_animation_state = state;
|
curr_link_animation_state = state;
|
||||||
|
|
||||||
|
if (g_debug_options.print_link_data)
|
||||||
|
{
|
||||||
|
obj_hide(cart_shell);
|
||||||
|
obj_hide(cart_label);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void determine_fennel_blink()
|
void determine_fennel_blink()
|
||||||
|
|
|
||||||
|
|
@ -270,8 +270,9 @@ void set_text_exit()
|
||||||
int ptgb_write_textbox(const byte *text, bool instant, bool waitForUser,
|
int ptgb_write_textbox(const byte *text, bool instant, bool waitForUser,
|
||||||
int text_section, int text_key, bool eraseMainBox)
|
int text_section, int text_key, bool eraseMainBox)
|
||||||
{
|
{
|
||||||
|
tte_erase_rect(0, 0, H_MAX, V_MAX);
|
||||||
erase_textbox_tiles();
|
erase_textbox_tiles();
|
||||||
create_textbox_new(text_section, text_key, eraseMainBox);
|
create_textbox(text_section, text_key, eraseMainBox);
|
||||||
int out = ptgb_write(text, instant, 9999, text_box_type_tables[text_section][text_key]); // This is kinda silly but it'll work.
|
int out = ptgb_write(text, instant, 9999, text_box_type_tables[text_section][text_key]); // This is kinda silly but it'll work.
|
||||||
if (waitForUser)
|
if (waitForUser)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user