diff --git a/src/c/battle.c b/src/c/battle.c index cb52650..7ebc742 100644 --- a/src/c/battle.c +++ b/src/c/battle.c @@ -9,10 +9,10 @@ void printTargetOfAttack(short a, short target) WINDOW *window = getWindow(3); m2_setupwindow(window, 0x9, 0x3, 0x14, 0x2); initWindow_buffer(window, NULL, 0); - printstr_buffer(window, &m12_battle_commands_str11, 0, 0, false); //To + printstr_buffer(window, m12_battle_commands_str11, 0, 0, false); //To if(target != -1) { - printstr_hlight_buffer(window, &m12_battle_commands_str14, 8, 0, false);// " " + printstr_hlight_buffer(window, m12_battle_commands_str14, 8, 0, false);// " " short *pointer = (short*)(0x20248E0 + 0x83E); byte *pointer2 = (byte*)(pointer); short value = *pointer; @@ -39,9 +39,9 @@ void printTargetOfAttack(short a, short target) else { if(a == 0) //a is the row here - printstr_buffer(window, &m12_battle_commands_str12, 2, 0, false); //the Front Row + printstr_buffer(window, m12_battle_commands_str12, 2, 0, false); //the Front Row else - printstr_buffer(window, &m12_battle_commands_str13, 2, 0, false); //the Back Row + printstr_buffer(window, m12_battle_commands_str13, 2, 0, false); //the Back Row } } @@ -59,12 +59,12 @@ void printBattleMenu(byte validXs, byte validYs, byte highlighted) if((*drawValue) == 2) { print_blankstr_buffer(7,1,5,(int*)(OVERWORLD_BUFFER - 0x2000)); - str = &m12_battle_commands_str10; //Do Nothing + str = m12_battle_commands_str10; //Do Nothing } else if((*drawValue) == 1) - str = &m12_battle_commands_str6; //Shoot + str = m12_battle_commands_str6; //Shoot else - str = &m12_battle_commands_str0; //Bash + str = m12_battle_commands_str0; //Bash printstr_hlight_buffer(window, str, 1, 0, highlighted & 1); } @@ -72,9 +72,9 @@ void printBattleMenu(byte validXs, byte validYs, byte highlighted) { print_blankstr_buffer(2,3,5,(int*)(OVERWORLD_BUFFER - 0x2000)); if((*active_window_party_member) != 2) - printstr_hlight_buffer(window, &m12_battle_commands_str3, 1, 1, highlighted & 2); //PSI + printstr_hlight_buffer(window, m12_battle_commands_str3, 1, 1, highlighted & 2); //PSI else - printstr_hlight_buffer(window, &m12_battle_commands_str7, 1, 1, highlighted & 2); //Spy + printstr_hlight_buffer(window, m12_battle_commands_str7, 1, 1, highlighted & 2); //Spy } } @@ -85,7 +85,7 @@ void printBattleMenu(byte validXs, byte validYs, byte highlighted) if((*drawValue) != 2) { print_blankstr_buffer(7,1,5,(int*)(OVERWORLD_BUFFER - 0x2000)); - printstr_hlight_buffer(window, &m12_battle_commands_str1, 6, 0, highlighted & 4); //Goods + printstr_hlight_buffer(window, m12_battle_commands_str1, 6, 0, highlighted & 4); //Goods } } @@ -94,7 +94,7 @@ void printBattleMenu(byte validXs, byte validYs, byte highlighted) print_blankstr_buffer(7,3,5,(int*)(OVERWORLD_BUFFER - 0x2000)); if((*drawValue) != 2) { - printstr_hlight_buffer(window, &m12_battle_commands_str4, 6, 1, highlighted & 8); //Defend + printstr_hlight_buffer(window, m12_battle_commands_str4, 6, 1, highlighted & 8); //Defend } } } diff --git a/src/c/battle.h b/src/c/battle.h index d488701..813d7be 100644 --- a/src/c/battle.h +++ b/src/c/battle.h @@ -6,16 +6,16 @@ void printTargetOfAttack(short a, short target); void printBattleMenu(byte validXs, byte validYs, byte highlighted); -extern byte m12_battle_commands_str0; -extern byte m12_battle_commands_str1; -extern byte m12_battle_commands_str3; -extern byte m12_battle_commands_str4; -extern byte m12_battle_commands_str6; -extern byte m12_battle_commands_str7; -extern byte m12_battle_commands_str10; -extern byte m12_battle_commands_str11; -extern byte m12_battle_commands_str12; -extern byte m12_battle_commands_str13; -extern byte m12_battle_commands_str14; +extern byte m12_battle_commands_str0[]; +extern byte m12_battle_commands_str1[]; +extern byte m12_battle_commands_str3[]; +extern byte m12_battle_commands_str4[]; +extern byte m12_battle_commands_str6[]; +extern byte m12_battle_commands_str7[]; +extern byte m12_battle_commands_str10[]; +extern byte m12_battle_commands_str11[]; +extern byte m12_battle_commands_str12[]; +extern byte m12_battle_commands_str13[]; +extern byte m12_battle_commands_str14[]; #endif \ No newline at end of file diff --git a/src/c/equip.c b/src/c/equip.c index 3af49f2..8bb155a 100644 --- a/src/c/equip.c +++ b/src/c/equip.c @@ -4,7 +4,7 @@ #include "locs.h" -int equipReadInput(WINDOW* window) //Returns the character whose window we're going in, ACTION_NONE if nothing happens or ACTION_STEPOUT if going out og this window +int equipReadInput(WINDOW* window) //Returns the character whose window we're going in, ACTION_NONE if nothing happens or ACTION_STEPOUT if going out of this window { unsigned short previousCharacter = *active_window_party_member; int currentCharacter = previousCharacter; @@ -177,16 +177,16 @@ void equippablePrint(WINDOW* window) //Prints equippable items (The innermost eq switch(val) { case 3: - str = &m12_other_str9; //->Weapons + str = m12_other_str9; //->Weapons break; case 4: - str = &m12_other_str10; //->Body + str = m12_other_str10; //->Body break; case 5: - str = &m12_other_str11; //->Arms + str = m12_other_str11; //->Arms break; case 6: - str = &m12_other_str12; //->Other + str = m12_other_str12; //->Other break; default: break; @@ -325,9 +325,9 @@ int equippableReadInput(WINDOW* window) //Manages input in equipment-choice inne if((state.a || state.l) && !printed) //Avoid sound issues when going into the window { window->counter = 0xFFFF; - m2_soundeffect(0x12D); if(freeSpace[window->cursor_y] == 0xFE) { + m2_soundeffect(0x12D); //Do the sound only if we're changing the page. Otherwise the original code will do the appropriate sound window->counter = 0; window->cursor_x_base++; if(m2_div(window->cursor_x, 5) < window->cursor_x_base) @@ -359,6 +359,100 @@ int equippableReadInput(WINDOW* window) //Manages input in equipment-choice inne } +//Simplified inner equip routine (The original routine had a pointer to a table of valid cursor positions as a parameter) +int innerEquipInput(WINDOW* window) +{ + bool printing = !window->vwf_skip; + window->vwf_skip = true; + + PAD_STATE state = *pad_state; + PAD_STATE state_shadow = *pad_state_shadow; + + short previousY = window->cursor_y; + short currentY = window->cursor_y; + + // Clear cursor tiles + map_tile(0x1FF, window->window_x, window->window_y + window->cursor_y * 2); + map_tile(0x1FF, window->window_x, window->window_y + window->cursor_y * 2 + 1); + + if(state.up) //This has been simplified + { + currentY--; + if(currentY < 0) + { + if(window->hold) + currentY = 0; + else + currentY = 3; + } + } + + if(state.down) //This has been simplified + { + currentY++; + if(currentY >= 4) + { + if(window->hold) + currentY = 3; + else + currentY = 0; + } + } + + //The game does stuff when pressing left or right, however for the equipment window this is not needed + if(state.right) //This routine in particular did both the main overworld window and the inner equip window + { + } + + + if(state.left) + { + } + + if(state_shadow.up || state_shadow.down) + { + window->counter = 0; + if(previousY != currentY) + m2_soundeffect(0x12F); + window->hold = true; + window->cursor_y = currentY; + } + else + window->hold = false; + + if((state.b || state.select) && (!printing)) + { + window->counter = 0; + m2_soundeffect(0x12E); + window->vwf_skip = false; + return ACTION_STEPOUT; + } + + + if((state.a || state.l) && (!printing)) + { + window->counter = 0xFFFF; + m2_soundeffect(0x12D); + window->vwf_skip = false; + return (window->cursor_y << 1) + ACTION_STEPIN; + } + + if (window->counter != 0xFFFF) + { + window->counter++; + + // Draw cursor + map_special_character((window->counter <= 7) ? 0x99 : 0x9A, + window->window_x, + window->window_y + window->cursor_y * 2); + + if (window->counter > 0x10) + window->counter = 0; + } + + return ACTION_NONE; +} + void equipPrint(WINDOW* window) //Prints equipment { m2_hpwindow_up(*active_window_party_member); @@ -425,4 +519,29 @@ void equipPrint(WINDOW* window) //Prints equipment map_special_character(0x1DE,(window->window_x + 7), 0x7); //Print the E printstr_buffer(window, item, 8, 3, false); } -} \ No newline at end of file +} + +//Prints the numbers in the window in a formatted way +void printNumberEquip(WINDOW* window, byte* str, unsigned short x, unsigned short y, bool highlight) +{ + while((*str) == 0x50) + { + x += 6; + str++; + } + printstr_hlight_pixels_buffer(window, str, x, y, highlight); +} + +//Prints Offense: and Defense: +void printEquipWindowNumberText(WINDOW* window) +{ + handle_first_window_buffer(window, (int*)(OVERWORLD_BUFFER - ((*tile_offset) * 32))); + printstr_hlight_pixels_buffer(window, window->text_start, 0, 3, false); +} + +//Prints the arrow for the numbers in the Offense/Defense menu +void printEquipNumbersArrow(WINDOW* window) +{ + printTinyArrow((window->window_x + 9) << 3, (window->window_y + 0) << 3); + printTinyArrow((window->window_x + 9) << 3, (window->window_y + 2) << 3); +} diff --git a/src/c/equip.h b/src/c/equip.h index 30e860e..bc5449b 100644 --- a/src/c/equip.h +++ b/src/c/equip.h @@ -7,11 +7,14 @@ void equipPrint(WINDOW* window); int equipReadInput(WINDOW* window); void equippablePrint(WINDOW* window); int equippableReadInput(WINDOW* window); +int innerEquipInput(WINDOW* window); +void printEquipWindowNumberText(WINDOW* window); +void printEquipNumbersArrow(WINDOW* window); -extern byte m12_other_str9; -extern byte m12_other_str10; -extern byte m12_other_str11; -extern byte m12_other_str12; +extern byte m12_other_str9[]; +extern byte m12_other_str10[]; +extern byte m12_other_str11[]; +extern byte m12_other_str12[]; #endif \ No newline at end of file diff --git a/src/c/vwf.c b/src/c/vwf.c index 863de54..a2acedb 100644 --- a/src/c/vwf.c +++ b/src/c/vwf.c @@ -181,21 +181,18 @@ void print_special_character(int tile, int x, int y) cpufastset(&vram[(sourceTileIndex + 32) * 8], &vram[(destTileIndex + 32) * 8], 8); } -// Prints a special tile. Pixels are copied to the VWF buffer. Prints in the buffer +// Prints a special tile. Pixels are not copied. // x, y in pixels -void print_special_character_buffer(int tile, int x, int y, int *dest) +void print_special_character_buffer(int tile, int x, int y) { // Special graphics must be tile-aligned x >>= 3; y >>= 3; unsigned short sourceTileIndex = tile + *tile_offset; - unsigned short destTileIndex = get_tile_number(x, y) + *tile_offset; - (*tilemap_pointer)[x + (y * 32)] = destTileIndex | *palette_mask; - (*tilemap_pointer)[x + ((y + 1) * 32)] = (destTileIndex + 32) | *palette_mask; + (*tilemap_pointer)[x + (y * 32)] = sourceTileIndex | *palette_mask; + (*tilemap_pointer)[x + ((y + 1) * 32)] = (sourceTileIndex + 32) | *palette_mask; - cpufastset(&dest[sourceTileIndex * 8], &dest[destTileIndex * 8], 8); - cpufastset(&dest[(sourceTileIndex + 32) * 8], &dest[(destTileIndex + 32) * 8], 8); } // Maps a special character to the given tile coordinates. Only the tilemap is changed. @@ -1189,15 +1186,15 @@ byte print_character_formatted_buffer(byte chr, int x, int y, int font, int fore // 0x64 to 0x6C (inclusive) is YOU WON if ((chr >= YOUWON_START) && (chr <= YOUWON_END)) { - print_special_character_buffer(chr + 0xF0, x, y, dest); + print_special_character_buffer(chr + 0xF0, x, y); return 8; } // 0x6D is an arrow -> if (chr == ARROW) { - print_special_character_buffer(ARROW + 0x30, x, y, dest); - return 8; + print_special_character_buffer(ARROW + 0x30, x, y); + return 9; } return print_character_with_callback(chr, x, y, font, foreground, dest, &get_tile_number_with_offset, *tilemap_pointer, 32, 0xC); @@ -1258,10 +1255,21 @@ int print_string_in_buffer(byte *str, int x, int y, int *dest) int initial_x = x; int charCount = 0; - while (str[1] != 0xFF) + while (str[1] != 0xFF || str[0] != 0) { - x += print_character_formatted_buffer(decode_character(*str++), x, y, 0, 0xF, dest); - charCount++; + if(str[1] == 0xFF && str[0] == 1) + { + x = initial_x; + str += 2; + y+= 0x10; + } + else if(str[1] != 0xFF) + { + x += print_character_formatted_buffer(decode_character(*str++), x, y, 0, 0xF, dest); + charCount++; + } + else + break; } int totalWidth = x - initial_x; @@ -1545,6 +1553,11 @@ unsigned short ailmentTileSetup(byte *ailmentBase, unsigned short defaultVal) return (*(returnValues + (value * 7) + flagValue - 1)); } +void printTinyArrow(int x, int y) +{ + print_special_character_buffer(0x9F, x, y); +} + void printCashWindow() { (*window_flags) |= 2; diff --git a/src/c/vwf.h b/src/c/vwf.h index 3012434..ceef68c 100644 --- a/src/c/vwf.h +++ b/src/c/vwf.h @@ -103,6 +103,7 @@ int setNumber_getLength(int value, byte *str, int maxLength); int print_string_in_buffer(byte *str, int x, int y, int *dest); void printCashWindow(); WINDOW* getWindow(int index); +void printTinyArrow(int x, int y); int printstr_buffer(WINDOW* window, byte* str, unsigned short x, unsigned short y, bool highlight); unsigned short printstr_hlight_buffer(WINDOW* window, byte* str, unsigned short x, unsigned short y, bool highlight); unsigned short printstr_hlight_pixels_buffer(WINDOW* window, byte* str, unsigned short x, unsigned short y, bool highlight); @@ -123,6 +124,7 @@ extern byte m2_cstm_last_printed[]; extern byte *m2_script_readability; extern int overworld_buffer; extern PC m2_ness_data[]; +extern int m2_arrow_tile[]; extern bool m2_isequipped(int item_index); extern void cpufastset(void *source, void *dest, int mode); diff --git a/src/m2-hack.asm b/src/m2-hack.asm index b75531c..279bcd7 100644 --- a/src/m2-hack.asm +++ b/src/m2-hack.asm @@ -167,15 +167,16 @@ mov r3,6 // Equip window generic hacks //--------------------------------------------------------- +.org 0x80BB02C :: bl innerEquipInput .org 0x80B8066 :: bl printstr_hlight_buffer .org 0x80B8074 :: mov r3,#0x12 .org 0x80B80A6 :: mov r3,#0x0D .org 0x80B8092 :: bl initWindow_buffer //Initialize equipment window .org 0x80B8098 :: bl print_window_with_buffer .org 0x80B80BE :: bl initWindow_buffer -.org 0x80B80C4 :: bl print_window_with_buffer -.org 0x80B80EA :: mov r2,#6 :: mov r3,#0 :: bl printstr_buffer //Offense Number -.org 0x80B8112 :: mov r2,#6 :: mov r3,#1 :: bl printstr_buffer //Defense Number +.org 0x80B80C4 :: bl printEquipWindowNumberText +.org 0x80B80EA :: mov r2,#0x37 :: mov r3,#3 :: bl printNumberEquip //Offense Number +.org 0x80B8112 :: mov r2,#0x37 :: mov r3,#0x13 :: bl printNumberEquip //Defense Number .org 0x80B8138 :: bl initWindow_buffer .org 0x80B813E :: bl print_window_with_buffer .org 0x80B814A :: bl equipPrint @@ -185,14 +186,14 @@ mov r3,6 .org 0x80B81CC :: bl store_pixels_overworld .org 0x80BAF96 :: bl initWindow_buffer //Go to inner window from outer window .org 0x80BAF9C :: bl baf9c_print_window_store_buffer -.org 0x80BAFE6 :: mov r2,#6 :: mov r3,#0 :: bl printstr_buffer //Offense Number -.org 0x80BB00C :: mov r2,#6 +.org 0x80BAFE6 :: mov r2,#0x37 :: mov r3,#3 :: bl printNumberEquip //Offense Number +.org 0x80BB00C :: mov r2,#0x37 .org 0x80BB17C :: bl equippableReadInput -.org 0x80BB198 :: mov r2,#9 :: mov r3,#0 :: bl printstr_buffer //Offense Number -.org 0x80BB1A6 :: mov r2,#9 :: mov r3,#1 :: bl bb1aa_printstr_store //Defense Number +.org 0x80BB198 :: bl printEquipNumbersArrow :: bl store_pixels_overworld :: b 0x80BB1AE //Offense Number +.org 0x80BB1A6 :: mov r2,#0x4C :: mov r3,#0x13 :: bl bb1aa_printnumberequip_store //Defense Number .org 0x80BB05E :: bl initWindow_buffer .org 0x80BB066 :: bl print_window_with_buffer -.org 0x80BB08A :: bl printstr_buffer +.org 0x80BB08A :: nop :: nop //Remove highlighting .org 0x80BB0A8 :: bl initWindow_buffer .org 0x80BB24C :: bl initWindow_buffer //Go back to outer window - Also does going back to inner (not innermost) window from weapons - not touched equipment .org 0x80BB254 :: bl print_window_with_buffer @@ -201,65 +202,59 @@ mov r3,6 .org 0x80BB2E0 :: bl initWindow_buffer .org 0x80BB2E8 :: bl print_window_with_buffer .org 0x80BB2F6 :: bl equipPrint -.org 0x80BB33C :: mov r2,#6 -.org 0x80BB340 :: bl printstr_buffer -.org 0x80BB36C :: mov r2,#6 -.org 0x80BB370 :: bl printstr_buffer +.org 0x80BB300 :: bl innerEquipInput +.org 0x80BB33C :: mov r2,#0x37 :: mov r3,#3 :: bl printNumberEquip +.org 0x80BB36C :: mov r2,#0x37 :: mov r3,#0x13 :: bl printNumberEquip .org 0x80BB3FC :: bl initWindow_buffer //Go back to inner (not innermost) window from weapons - removed equipment .org 0x80BB404 :: bl print_window_with_buffer .org 0x80BB41A :: bl initWindow_buffer .org 0x80BB422 :: bl print_window_with_buffer .org 0x80BB430 :: bl equipPrint -.org 0x80BB476 :: mov r2,#6 -.org 0x80BB47A :: bl printstr_buffer -.org 0x80BB4A6 :: mov r2,#6 -.org 0x80BB4AA :: bl printstr_buffer +.org 0x80BB43A :: bl innerEquipInput +.org 0x80BB476 :: mov r2,#0x37 :: mov r3,#3 :: bl printNumberEquip +.org 0x80BB4A6 :: mov r2,#0x37 :: mov r3,#0x13 :: bl printNumberEquip .org 0x80BB532 :: bl initWindow_buffer //Go back to inner (not innermost) window from weapons - equipped a weapon .org 0x80BB53A :: bl print_window_with_buffer .org 0x80BB550 :: bl initWindow_buffer .org 0x80BB558 :: bl print_window_with_buffer .org 0x80BB566 :: bl equipPrint -.org 0x80BB5AC :: mov r2,#6 -.org 0x80BB5B0 :: bl printstr_buffer -.org 0x80BB5DC :: mov r2,#6 -.org 0x80BB5E0 :: bl printstr_buffer +.org 0x80BB570 :: bl innerEquipInput +.org 0x80BB5AC :: mov r2,#0x37 :: mov r3,#3 :: bl printNumberEquip +.org 0x80BB5DC :: mov r2,#0x37 :: mov r3,#0x13 :: bl printNumberEquip .org 0x80BB9E4 :: bl initWindow_buffer //Go back to inner (not innermost) window from defensive equipment - not touched equipment .org 0x80BB9EC :: bl print_window_with_buffer .org 0x80BBA02 :: bl initWindow_buffer .org 0x80BBA0A :: bl print_window_with_buffer .org 0x80BBA18 :: bl equipPrint -.org 0x80BBA5E :: mov r2,#6 -.org 0x80BBA62 :: bl printstr_buffer -.org 0x80BBA8E :: mov r2,#6 -.org 0x80BBA92 :: bl printstr_buffer +.org 0x80BBA22 :: bl innerEquipInput +.org 0x80BBA5E :: mov r2,#0x37 :: mov r3,#3 :: bl printNumberEquip +.org 0x80BBA8E :: mov r2,#0x37 :: mov r3,#0x13 :: bl printNumberEquip .org 0x80BBB2C :: bl initWindow_buffer //Go back to inner (not innermost) window from defensive equipment - removed equipment .org 0x80BBB34 :: bl print_window_with_buffer .org 0x80BBB4A :: bl initWindow_buffer .org 0x80BBB52 :: bl print_window_with_buffer .org 0x80BBB60 :: bl equipPrint -.org 0x80BBBA6 :: mov r2,#6 -.org 0x80BBBAA :: bl printstr_buffer -.org 0x80BBBD6 :: mov r2,#6 -.org 0x80BBBDA :: bl printstr_buffer +.org 0x80BBB6A :: bl innerEquipInput +.org 0x80BBBA6 :: mov r2,#0x37 :: mov r3,#3 :: bl printNumberEquip +.org 0x80BBBD6 :: mov r2,#0x37 :: mov r3,#0x13 :: bl printNumberEquip .org 0x80BBC8A :: bl initWindow_buffer //Go back to inner (not innermost) window from defensive equipment - equipped something .org 0x80BBC92 :: bl print_window_with_buffer .org 0x80BBCA8 :: bl initWindow_buffer .org 0x80BBCB0 :: bl print_window_with_buffer .org 0x80BBCBE :: bl equipPrint -.org 0x80BBD04 :: mov r2,#6 -.org 0x80BBD08 :: bl printstr_buffer -.org 0x80BBD34 :: mov r2,#6 -.org 0x80BBD38 :: bl printstr_buffer +.org 0x80BBCC8 :: bl innerEquipInput +.org 0x80BBD04 :: mov r2,#0x37 :: mov r3,#3 :: bl printNumberEquip +.org 0x80BBD34 :: mov r2,#0x37 :: mov r3,#0x13 :: bl printNumberEquip //When first entering the innermost menu -.org 0x80BB6E0 :: mov r2,#0xA :: mov r3,#0 :: bl printstr_buffer //Change second offense number's position - Weapon -.org 0x80BB710 :: mov r2,#0xA :: mov r3,#1 :: bl bb1aa_printstr_store //Change second defense number's position - Weapon -.org 0x80BB820 :: mov r2,#0xA :: mov r3,#1 :: bl printstr_buffer //Change second defense number's position - Body -.org 0x80BB950 :: mov r2,#0xA :: mov r3,#1 :: bl printstr_buffer //Change second defense number's position - Arms -.org 0x80BBE8E :: mov r2,#0xA :: mov r3,#1 :: bl printstr_buffer //Change second defense number's position - Other -.org 0x80BBEBE :: mov r2,#0xA :: mov r3,#0 :: bl bb1aa_printstr_store //Change second offense number's position - Other +.org 0x80BB6E0 :: mov r2,#0x54 :: mov r3,#3 :: bl printNumberEquip //Change second offense number's position - Weapon +.org 0x80BB710 :: mov r2,#0x54 :: mov r3,#0x13 :: bl bb1aa_printnumberequip_store //Change second defense number's position - Weapon +.org 0x80BB820 :: mov r2,#0x54 :: mov r3,#0x13 :: bl printNumberEquip //Change second defense number's position - Body +.org 0x80BB950 :: mov r2,#0x54 :: mov r3,#0x13 :: bl printNumberEquip //Change second defense number's position - Arms +.org 0x80BBE8E :: mov r2,#0x54 :: mov r3,#0x13 :: bl printNumberEquip //Change second defense number's position - Other +.org 0x80BBEBE :: mov r2,#0x54 :: mov r3,#3 :: bl bb1aa_printnumberequip_store //Change second offense number's position - Other //When changing selection in the innermost menu -.org 0x80BBDF0 :: mov r2,#0xA :: mov r3,#1 :: bl printstr_buffer //Change second defense number's position - Defensive Equipment -.org 0x80BBE20 :: mov r2,#0xA :: mov r3,#0 :: bl bb1aa_printstr_store //Change second offense number's position - Defensive Equipment +.org 0x80BBDF0 :: mov r2,#0x54 :: mov r3,#0x13 :: bl printNumberEquip //Change second defense number's position - Defensive Equipment +.org 0x80BBE20 :: mov r2,#0x54 :: mov r3,#3 :: bl bb1aa_printnumberequip_store //Change second offense number's position - Defensive Equipment //--------------------------------------------------------- diff --git a/src/m2-vwf-entries.asm b/src/m2-vwf-entries.asm index af13b62..056fbf7 100644 --- a/src/m2-vwf-entries.asm +++ b/src/m2-vwf-entries.asm @@ -2538,13 +2538,13 @@ bx r0 //============================================================================== //Prints defense number and then sotres the buffer -bb1aa_printstr_store: +bb1aa_printnumberequip_store: push {r4,lr} mov r4,r3 mov r3,#0 push {r3} mov r3,r4 -bl printstr_buffer +bl printNumberEquip bl store_pixels_overworld pop {r3} pop {r4,pc}