Fix issues with tenda village naming screen
This commit is contained in:
parent
dcf97b1557
commit
468ba9afed
|
@ -22,4 +22,5 @@ int __attribute__((naked)) customcodes_parse_generic(int code, char* parserAddre
|
|||
void __attribute__((naked)) m2_printstr(WINDOW* window, byte* str, unsigned short x, unsigned short y, bool highlight) {}
|
||||
void __attribute__((naked)) m2_setupbattlename(short value) {}
|
||||
void __attribute__((naked)) store_pixels_overworld() {}
|
||||
void __attribute__((naked)) m12_dim_palette(short* palette, int total, int dimmingFactor) {}
|
||||
void __attribute__((naked)) m12_dim_palette(short* palette, int total, int dimmingFactor) {}
|
||||
int __attribute__((naked)) m2_jump_to_offset(byte* character) {}
|
29
src/c/vwf.c
29
src/c/vwf.c
|
@ -1276,33 +1276,6 @@ void setStuffWindow_Graphics()
|
|||
(*(address + 2)) = 0;
|
||||
}
|
||||
|
||||
int jumpToOffset(byte* character)
|
||||
{
|
||||
int returnOffset = 0;
|
||||
int baseOffset = 0;
|
||||
if((*(character + 1)) != 0xFF)
|
||||
return 0;
|
||||
int code = 0xFFFF009F + ((*character) | 0xFF00);
|
||||
|
||||
switch(code)
|
||||
{
|
||||
case 0x25:
|
||||
returnOffset += 2;
|
||||
baseOffset = returnOffset;
|
||||
for(int i = 0; i < 4; i++)
|
||||
returnOffset = returnOffset + ((*(character + baseOffset + i)) << (8 * i));
|
||||
byte* totalJumps = (byte*)0x3005078;
|
||||
byte** oldOffsets = (byte**)0x3005080;
|
||||
oldOffsets[*totalJumps] = character + 6;
|
||||
(*totalJumps)++;
|
||||
break;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
|
||||
return returnOffset;
|
||||
}
|
||||
|
||||
byte print_character_with_codes(WINDOW* window, byte* dest)
|
||||
{
|
||||
int delay = window->delay--;
|
||||
|
@ -1422,7 +1395,7 @@ byte print_character_with_codes(WINDOW* window, byte* dest)
|
|||
break;
|
||||
default:
|
||||
if(code >= 0x60)
|
||||
window->text_offset += jumpToOffset(character);
|
||||
window->text_offset += m2_jump_to_offset(character);
|
||||
else
|
||||
{
|
||||
returnedLength = customcodes_parse_generic(code, character, window, dest);
|
||||
|
|
|
@ -102,7 +102,6 @@ void clear_tile_buffer(int x, int y, byte* dest);
|
|||
int buffer_drawwindow(WINDOW* window, byte* dest);
|
||||
void scrolltext_buffer(WINDOW* window, byte* dest);
|
||||
void properScroll(WINDOW* window, byte* dest);
|
||||
int jumpToOffset(byte* character);
|
||||
void copy_tile_buffer(int xSource, int ySource, int xDest, int yDest, byte *dest);
|
||||
void copy_tile_up_buffer(int x, int y, byte *dest);
|
||||
void setStuffWindow_Graphics();
|
||||
|
@ -166,6 +165,7 @@ extern int m2_remainder(int dividend, int divisor);
|
|||
extern void m2_soundeffect(int index);
|
||||
extern void m2_printstr(WINDOW* window, byte* str, unsigned short x, unsigned short y, bool highlight);
|
||||
extern int customcodes_parse_generic(int code, char* parserAddress, WINDOW* window, byte* dest);
|
||||
extern int m2_jump_to_offset(byte* character);
|
||||
extern void m2_sub_d3c50();
|
||||
extern void m2_sub_d6844();
|
||||
extern int m2_setupwindow(WINDOW* window, short window_x, short window_y, short window_width, short window_height);
|
||||
|
|
|
@ -1844,6 +1844,7 @@ m12_cartridge_palettes_dimmed:
|
|||
.definelabel m2_enable_script ,0x80A1F6C
|
||||
.definelabel m2_sub_a334c ,0x80A334C
|
||||
.definelabel m2_sub_a3384 ,0x80A3384
|
||||
.definelabel m2_jump_to_offset ,0x80A6C24
|
||||
.definelabel m2_get_selected_item ,0x80A469C
|
||||
.definelabel m2_psitargetwindow ,0x80B8AE0
|
||||
.definelabel m2_isequipped ,0x80BC670
|
||||
|
|
Loading…
Reference in New Issue