From 15212c4f8d80b4e15b20d0594d890fe1e803bc0e Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Thu, 21 Sep 2017 23:43:13 -0400 Subject: [PATCH 01/42] Font6Func --- asm/unk_text_util_2.s | 523 ------------------------------------------ include/text.h | 52 +++-- ld_script.txt | 1 + src/text.c | 12 +- src/unk_text_util_2.c | 200 ++++++++++++++++ 5 files changed, 241 insertions(+), 547 deletions(-) create mode 100644 src/unk_text_util_2.c diff --git a/asm/unk_text_util_2.s b/asm/unk_text_util_2.s index 7f1a5ef70..c1ab25594 100755 --- a/asm/unk_text_util_2.s +++ b/asm/unk_text_util_2.s @@ -5,529 +5,6 @@ .text - thumb_func_start Font6Func -@ int Font6Func(struct TextPrinter *x) -Font6Func: @ 81BA250 - push {r4-r6,lr} - adds r6, r0, 0 - adds r4, r6, 0 - adds r4, 0x14 - ldrb r0, [r6, 0x1C] - cmp r0, 0x6 - bls _081BA260 - b _081BA660 -_081BA260: - lsls r0, 2 - ldr r1, =_081BA270 - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .pool - .align 2, 0 -_081BA270: - .4byte _081BA28C - .4byte _081BA554 - .4byte _081BA566 - .4byte _081BA590 - .4byte _081BA5C8 - .4byte _081BA63C - .4byte _081BA64E -_081BA28C: - ldr r2, =gMain - ldrh r1, [r2, 0x2C] - movs r0, 0x3 - ands r0, r1 - cmp r0, 0 - beq _081BA2A6 - ldrb r1, [r4] - movs r0, 0x10 - ands r0, r1 - cmp r0, 0 - beq _081BA2A6 - movs r0, 0 - strb r0, [r6, 0x1E] -_081BA2A6: - ldrb r1, [r6, 0x1E] - cmp r1, 0 - beq _081BA2E8 - ldrb r0, [r6, 0x1D] - cmp r0, 0 - beq _081BA2E8 - subs r0, r1, 0x1 - strb r0, [r6, 0x1E] - ldr r0, =gTextFlags - ldrb r1, [r0] - movs r0, 0x1 - ands r0, r1 - cmp r0, 0 - bne _081BA2C4 - b _081BA50E -_081BA2C4: - ldrh r1, [r2, 0x2E] - movs r0, 0x3 - ands r0, r1 - cmp r0, 0 - bne _081BA2D0 - b _081BA50E -_081BA2D0: - ldrb r0, [r4] - movs r1, 0x10 - orrs r0, r1 - strb r0, [r4] - movs r0, 0 - strb r0, [r6, 0x1E] - b _081BA50E - .pool -_081BA2E8: - ldr r2, =gTextFlags - ldrb r1, [r2] - movs r0, 0x4 - ands r0, r1 - cmp r0, 0 - beq _081BA2FC - movs r0, 0x3 - b _081BA2FE - .pool -_081BA2FC: - ldrb r0, [r6, 0x1D] -_081BA2FE: - strb r0, [r6, 0x1E] - ldr r0, [r6] - ldrb r3, [r0] - adds r0, 0x1 - str r0, [r6] - adds r0, r3, 0 - subs r0, 0xF8 - cmp r0, 0x7 - bls _081BA312 - b _081BA52E -_081BA312: - lsls r0, 2 - ldr r1, =_081BA320 - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .pool - .align 2, 0 -_081BA320: - .4byte _081BA524 - .4byte _081BA512 - .4byte _081BA504 - .4byte _081BA500 - .4byte _081BA36E - .4byte _081BA368 - .4byte _081BA340 - .4byte _081BA660 -_081BA340: - ldrb r0, [r6, 0x6] - strb r0, [r6, 0x8] - ldrb r1, [r6, 0x5] - ldr r0, =gFonts - ldr r2, [r0] - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 2 - adds r0, r2 - ldrb r1, [r6, 0xB] - ldrb r0, [r0, 0x5] - adds r1, r0 - ldrb r0, [r6, 0x9] - adds r0, r1 - strb r0, [r6, 0x9] -_081BA35E: - movs r0, 0x2 - b _081BA662 - .pool -_081BA368: - ldr r0, [r6] - adds r0, 0x1 - b _081BA4C4 -_081BA36E: - ldr r0, [r6] - ldrb r3, [r0] - adds r0, 0x1 - str r0, [r6] - subs r0, r3, 0x1 - cmp r0, 0xF - bls _081BA37E - b _081BA52E -_081BA37E: - lsls r0, 2 - ldr r1, =_081BA38C - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .pool - .align 2, 0 -_081BA38C: - .4byte _081BA3CC - .4byte _081BA3EE - .4byte _081BA412 - .4byte _081BA42C - .4byte _081BA478 - .4byte _081BA47E - .4byte _081BA35E - .4byte _081BA498 - .4byte _081BA4A8 - .4byte _081BA4BC - .4byte _081BA4C0 - .4byte _081BA4C8 - .4byte _081BA4D2 - .4byte _081BA4DE - .4byte _081BA4EE - .4byte _081BA4C0 -_081BA3CC: - ldr r2, [r6] - ldrb r1, [r2] - lsls r1, 4 - ldrb r3, [r6, 0xC] - movs r0, 0xF - ands r0, r3 - orrs r0, r1 - strb r0, [r6, 0xC] - adds r2, 0x1 - str r2, [r6] - lsls r0, 24 - lsrs r0, 28 - ldrb r2, [r6, 0xD] - lsls r1, r2, 28 - lsrs r1, 28 - lsrs r2, 4 - b _081BA472 -_081BA3EE: - ldr r1, [r6] - ldrb r2, [r1] - movs r0, 0xF - ands r0, r2 - ldrb r3, [r6, 0xD] - movs r2, 0x10 - negs r2, r2 - ands r2, r3 - orrs r2, r0 - strb r2, [r6, 0xD] - adds r1, 0x1 - str r1, [r6] - ldrb r0, [r6, 0xC] - lsrs r0, 4 - lsls r1, r2, 28 - lsrs r1, 28 - lsrs r2, 4 - b _081BA472 -_081BA412: - ldr r1, [r6] - ldrb r0, [r1] - lsls r0, 4 - ldrb r3, [r6, 0xD] - movs r2, 0xF - ands r2, r3 - orrs r2, r0 - strb r2, [r6, 0xD] - adds r1, 0x1 - str r1, [r6] - ldrb r0, [r6, 0xC] - lsrs r0, 4 - b _081BA46A -_081BA42C: - ldr r3, [r6] - ldrb r1, [r3] - lsls r1, 4 - ldrb r4, [r6, 0xC] - movs r2, 0xF - adds r0, r2, 0 - ands r0, r4 - orrs r0, r1 - strb r0, [r6, 0xC] - adds r5, r3, 0x1 - str r5, [r6] - ldrb r3, [r3, 0x1] - adds r1, r2, 0 - ands r1, r3 - ldrb r4, [r6, 0xD] - movs r3, 0x10 - negs r3, r3 - ands r3, r4 - orrs r3, r1 - strb r3, [r6, 0xD] - adds r4, r5, 0x1 - str r4, [r6] - ldrb r1, [r5, 0x1] - lsls r1, 4 - ands r2, r3 - orrs r2, r1 - strb r2, [r6, 0xD] - adds r4, 0x1 - str r4, [r6] - lsls r0, 24 - lsrs r0, 28 -_081BA46A: - lsls r1, r2, 28 - lsrs r1, 28 - lsls r2, 24 - lsrs r2, 28 -_081BA472: - bl GenerateFontHalfRowLookupTable - b _081BA35E -_081BA478: - ldr r0, [r6] - adds r0, 0x1 - b _081BA4C4 -_081BA47E: - ldr r0, [r6] - ldrb r0, [r0] - movs r1, 0xF - ands r1, r0 - ldrb r2, [r4] - movs r0, 0x10 - negs r0, r0 - ands r0, r2 - orrs r0, r1 - strb r0, [r4] - ldr r0, [r6] - adds r0, 0x1 - b _081BA4C4 -_081BA498: - ldr r0, [r6] - ldrb r1, [r0] - strb r1, [r6, 0x1E] - adds r0, 0x1 - str r0, [r6] - movs r0, 0x6 - strb r0, [r6, 0x1C] - b _081BA35E -_081BA4A8: - movs r0, 0x1 - strb r0, [r6, 0x1C] - ldrb r1, [r2] - movs r0, 0x4 - ands r0, r1 - cmp r0, 0 - beq _081BA50E - movs r0, 0 - strb r0, [r4, 0x2] - b _081BA50E -_081BA4BC: - movs r0, 0x5 - b _081BA64A -_081BA4C0: - ldr r0, [r6] - adds r0, 0x2 -_081BA4C4: - str r0, [r6] - b _081BA35E -_081BA4C8: - ldr r1, [r6] - adds r0, r1, 0x1 - str r0, [r6] - ldrb r3, [r1, 0x1] - b _081BA52E -_081BA4D2: - ldr r1, [r6] - ldrb r0, [r1] - ldrb r2, [r6, 0x6] - adds r0, r2 - strb r0, [r6, 0x8] - b _081BA4E8 -_081BA4DE: - ldr r1, [r6] - ldrb r0, [r1] - ldrb r2, [r6, 0x7] - adds r0, r2 - strb r0, [r6, 0x9] -_081BA4E8: - adds r1, 0x1 - str r1, [r6] - b _081BA35E -_081BA4EE: - ldrb r0, [r6, 0x4] - ldrb r2, [r6, 0xD] - lsls r2, 28 - lsrs r1, r2, 4 - orrs r1, r2 - lsrs r1, 24 - bl FillWindowPixelBuffer - b _081BA35E -_081BA500: - movs r0, 0x2 - b _081BA506 -_081BA504: - movs r0, 0x3 -_081BA506: - strb r0, [r6, 0x1C] - adds r0, r6, 0 - bl TextPrinterInitDownArrowCounters -_081BA50E: - movs r0, 0x3 - b _081BA662 -_081BA512: - ldr r0, [r6] - ldrb r3, [r0] - movs r2, 0x80 - lsls r2, 1 - adds r1, r2, 0 - orrs r3, r1 - adds r0, 0x1 - str r0, [r6] - b _081BA52E -_081BA524: - ldr r0, [r6] - adds r0, 0x1 - str r0, [r6] - movs r0, 0 - b _081BA662 -_081BA52E: - adds r0, r3, 0 - bl DecompressGlyphFont6 - adds r0, r6, 0 - bl CopyGlyphToWindow - ldr r0, =gUnknown_03002F90 - adds r0, 0x80 - ldrb r1, [r6, 0xA] - ldrb r0, [r0] - adds r1, r0 - ldrb r0, [r6, 0x8] - adds r0, r1 - strb r0, [r6, 0x8] - movs r0, 0 - b _081BA662 - .pool -_081BA554: - adds r0, r6, 0 - bl TextPrinterWait - lsls r0, 16 - cmp r0, 0 - beq _081BA50E - movs r0, 0 - strb r0, [r6, 0x1C] - b _081BA50E -_081BA566: - adds r0, r6, 0 - bl TextPrinterWaitWithDownArrow - lsls r0, 16 - cmp r0, 0 - beq _081BA50E - ldrb r0, [r6, 0x4] - ldrb r2, [r6, 0xD] - lsls r2, 28 - lsrs r1, r2, 4 - orrs r1, r2 - lsrs r1, 24 - bl FillWindowPixelBuffer - ldrb r0, [r6, 0x6] - movs r1, 0 - strb r0, [r6, 0x8] - ldrb r0, [r6, 0x7] - strb r0, [r6, 0x9] - strb r1, [r6, 0x1C] - b _081BA50E -_081BA590: - adds r0, r6, 0 - bl TextPrinterWaitWithDownArrow - lsls r0, 16 - cmp r0, 0 - beq _081BA50E - adds r0, r6, 0 - bl TextPrinterClearDownArrow - ldrb r1, [r6, 0x5] - ldr r0, =gFonts - ldr r2, [r0] - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 2 - adds r0, r2 - ldrb r1, [r6, 0xB] - ldrb r0, [r0, 0x5] - adds r1, r0 - strb r1, [r6, 0x1F] - ldrb r0, [r6, 0x6] - strb r0, [r6, 0x8] - movs r0, 0x4 - strb r0, [r6, 0x1C] - b _081BA50E - .pool -_081BA5C8: - ldrb r2, [r6, 0x1F] - cmp r2, 0 - beq _081BA638 - ldr r4, =gUnknown_08616124 - ldr r5, =gSaveBlock2Ptr - ldr r0, [r5] - ldrb r0, [r0, 0x14] - lsls r1, r0, 29 - lsrs r0, r1, 29 - adds r0, r4 - ldrb r0, [r0] - cmp r2, r0 - bcs _081BA604 - ldrb r0, [r6, 0x4] - ldrb r1, [r6, 0xD] - lsls r1, 28 - lsrs r3, r1, 4 - orrs r3, r1 - lsrs r3, 24 - movs r1, 0 - bl ScrollWindow - movs r0, 0 - strb r0, [r6, 0x1F] - b _081BA62E - .pool -_081BA604: - ldrb r0, [r6, 0x4] - lsrs r1, 29 - adds r1, r4 - ldrb r2, [r1] - ldrb r1, [r6, 0xD] - lsls r1, 28 - lsrs r3, r1, 4 - orrs r3, r1 - lsrs r3, 24 - movs r1, 0 - bl ScrollWindow - ldr r0, [r5] - ldrb r0, [r0, 0x14] - lsls r0, 29 - lsrs r0, 29 - adds r0, r4 - ldrb r1, [r6, 0x1F] - ldrb r0, [r0] - subs r1, r0 - strb r1, [r6, 0x1F] -_081BA62E: - ldrb r0, [r6, 0x4] - movs r1, 0x2 - bl CopyWindowToVram - b _081BA50E -_081BA638: - strb r2, [r6, 0x1C] - b _081BA50E -_081BA63C: - bl IsSEPlaying - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0 - beq _081BA64A - b _081BA50E -_081BA64A: - strb r0, [r6, 0x1C] - b _081BA50E -_081BA64E: - ldrb r0, [r6, 0x1E] - adds r1, r0, 0 - cmp r1, 0 - beq _081BA65C - subs r0, 0x1 - strb r0, [r6, 0x1E] - b _081BA50E -_081BA65C: - strb r1, [r6, 0x1C] - b _081BA50E -_081BA660: - movs r0, 0x1 -_081BA662: - pop {r4-r6} - pop {r1} - bx r1 - thumb_func_end Font6Func - thumb_func_start DecompressGlyphFont6 DecompressGlyphFont6: @ 81BA668 push {r4,r5,lr} diff --git a/include/text.h b/include/text.h index c61f6cc98..a7a79da7a 100644 --- a/include/text.h +++ b/include/text.h @@ -78,6 +78,22 @@ #define NUM_TEXT_PRINTERS 32 +struct TextPrinterSubStruct +{ + u8 font_type:4; // 0x14 + u8 font_type_upper:1; + u8 font_type_5:3; + u8 field_1:5; + u8 field_1_upmid:2; + u8 field_1_top:1; + u8 frames_visible_counter; + u8 field_3; + u8 field_4; // 0x18 + u8 field_5; + u8 field_6; + u8 active; +}; + struct TextPrinter { struct TextSubPrinter { // TODO: Better name @@ -99,20 +115,7 @@ struct TextPrinter void (*callback)(struct TextSubPrinter *, u16); // 0x10 union { - struct TextPrinterSubStruct - { - u8 font_type:4; // 0x14 - u8 font_type_upper:4; - u8 field_1:5; - u8 field_1_upmid:2; - u8 field_1_top:1; - u8 frames_visible_counter; - u8 field_3; - u8 field_4; // 0x18 - u8 field_5; - u8 field_6; - u8 active; - } sub; + struct TextPrinterSubStruct sub; u8 sub_fields[8]; } sub_union; @@ -138,6 +141,8 @@ struct FontInfo u8 shadowColor:4; }; +extern const struct FontInfo *gFonts; + struct GlyphWidthFunc{ u32 font_id; u32 (*func)(u16 glyphId, bool32 isJapanese); @@ -149,11 +154,26 @@ struct KeypadIcon { u8 height; }; +typedef struct { + u8 flag_0:1; + u8 flag_1:1; + u8 flag_2:1; +} TextFlags; + +extern TextFlags gTextFlags; + extern u8 gStringVar1[]; extern u8 gStringVar2[]; extern u8 gStringVar3[]; extern u8 gStringVar4[]; +u8 gUnknown_03002F84; +u8 gUnknown_03002F90[0x20]; +u8 gUnknown_03002FB0[0x20]; +u8 gUnknown_03002FD0[0x20]; +u8 gUnknown_03002FF0[0x20]; +u8 gGlyphDimensions[0x2]; + void SetFontsPointer(const struct FontInfo *fonts); void DeactivateAllTextPrinters (void); u16 PrintTextOnWindow(u8 windowId, u8 fontId, u8 *str, u8 x, u8 y, u8 speed, void (*callback)(struct TextSubPrinter *, u16)); @@ -182,8 +202,8 @@ void TextPrinterInitDownArrowCounters(struct TextPrinter *textPrinter); void TextPrinterDrawDownArrow(struct TextPrinter *textPrinter); void TextPrinterClearDownArrow(struct TextPrinter *textPrinter); bool8 TextPrinterWaitAutoMode(struct TextPrinter *textPrinter); -bool8 TextPrinterWaitWithDownArrow(struct TextPrinter *textPrinter); -bool8 TextPrinterWait(struct TextPrinter *textPrinter); +bool16 TextPrinterWaitWithDownArrow(struct TextPrinter *textPrinter); +bool16 TextPrinterWait(struct TextPrinter *textPrinter); void DrawDownArrow(u8 windowId, u16 x, u16 y, u8 bgColor, bool8 drawArrow, u8 *counter, u8 *yCoordIndex); u16 RenderText(struct TextPrinter *textPrinter); u32 GetStringWidthFixedWidthFont(const u8 *str, u8 fontId, u8 letterSpacing); diff --git a/ld_script.txt b/ld_script.txt index 177f36888..bafc67285 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -253,6 +253,7 @@ SECTIONS { asm/item_icon.o(.text); asm/party_menu.o(.text); asm/battle_tent.o(.text); + src/unk_text_util_2.o(.text); asm/unk_text_util_2.o(.text); src/multiboot.o(.text); asm/unk_81BAD84.o(.text); diff --git a/src/text.c b/src/text.c index aa4e201c0..fe1c5df24 100644 --- a/src/text.c +++ b/src/text.c @@ -32,11 +32,7 @@ u8 gUnknown_03002FB0[0x20]; u8 gUnknown_03002FD0[0x20]; u8 gUnknown_03002FF0[0x20]; u8 gGlyphDimensions[0x2]; -struct { - u8 flag_0:1; - u8 flag_1:1; - u8 flag_2:1; -} gTextFlags; +TextFlags gTextFlags; const u8 gFontHalfRowOffsets[] = { 0x00, 0x01, 0x02, 0x00, 0x03, 0x04, 0x05, 0x03, 0x06, 0x07, 0x08, 0x06, 0x00, 0x01, 0x02, 0x00, @@ -1973,7 +1969,7 @@ bool8 TextPrinterWaitAutoMode(struct TextPrinter *textPrinter) } } -bool8 TextPrinterWaitWithDownArrow(struct TextPrinter *textPrinter) +bool16 TextPrinterWaitWithDownArrow(struct TextPrinter *textPrinter) { bool8 result = FALSE; if (gTextFlags.flag_2 != 0) @@ -1992,9 +1988,9 @@ bool8 TextPrinterWaitWithDownArrow(struct TextPrinter *textPrinter) return result; } -bool8 TextPrinterWait(struct TextPrinter *textPrinter) +bool16 TextPrinterWait(struct TextPrinter *textPrinter) { - bool8 result = FALSE; + bool16 result = FALSE; if (gTextFlags.flag_2 != 0) { result = TextPrinterWaitAutoMode(textPrinter); diff --git a/src/unk_text_util_2.c b/src/unk_text_util_2.c new file mode 100644 index 000000000..23f3ca1b6 --- /dev/null +++ b/src/unk_text_util_2.c @@ -0,0 +1,200 @@ +#include "global.h" +#include "main.h" +#include "window.h" +#include "text.h" +#include "sound.h" + +extern const u8 gUnknown_08616124[]; + +void DecompressGlyphFont6(u16); + +u16 Font6Func(struct TextPrinter *textPrinter) +{ + u16 char_; + struct TextPrinterSubStruct *sub; + + sub = &textPrinter->sub_union.sub; + switch (textPrinter->state) + { + case 0: + if (gMain.heldKeys & (A_BUTTON | B_BUTTON) && sub->font_type_upper) + { + textPrinter->delayCounter = 0; + } + if (textPrinter->delayCounter && textPrinter->text_speed) + { + textPrinter->delayCounter --; + if (gTextFlags.flag_0 && gMain.newKeys & (A_BUTTON | B_BUTTON)) + { + sub->font_type_upper = TRUE; + textPrinter->delayCounter = 0; + } + return 3; + } + if (gTextFlags.flag_2) + { + textPrinter->delayCounter = 3; + } + else + { + textPrinter->delayCounter = textPrinter->text_speed; + } + char_ = *textPrinter->subPrinter.current_text_offset ++; + switch (char_) + { + case EOS: + return 1; + case CHAR_NEWLINE: + textPrinter->subPrinter.currentX = textPrinter->subPrinter.x; + textPrinter->subPrinter.currentY += gFonts[textPrinter->subPrinter.fontId].maxLetterHeight + textPrinter->subPrinter.lineSpacing; + return 2; + case PLACEHOLDER_BEGIN: + textPrinter->subPrinter.current_text_offset ++; + return 2; + case EXT_CTRL_CODE_BEGIN: + char_ = *textPrinter->subPrinter.current_text_offset ++; + switch (char_) + { + case 1: + textPrinter->subPrinter.fontColor_h = *textPrinter->subPrinter.current_text_offset ++; + GenerateFontHalfRowLookupTable(textPrinter->subPrinter.fontColor_h, textPrinter->subPrinter.bgColor, textPrinter->subPrinter.shadowColor); + return 2; + case 2: + textPrinter->subPrinter.bgColor = *textPrinter->subPrinter.current_text_offset ++; + GenerateFontHalfRowLookupTable(textPrinter->subPrinter.fontColor_h, textPrinter->subPrinter.bgColor, textPrinter->subPrinter.shadowColor); + return 2; + case 3: + textPrinter->subPrinter.shadowColor = *textPrinter->subPrinter.current_text_offset ++; + GenerateFontHalfRowLookupTable(textPrinter->subPrinter.fontColor_h, textPrinter->subPrinter.bgColor, textPrinter->subPrinter.shadowColor); + return 2; + case 4: + textPrinter->subPrinter.fontColor_h = *textPrinter->subPrinter.current_text_offset; + textPrinter->subPrinter.bgColor = *++ textPrinter->subPrinter.current_text_offset; + textPrinter->subPrinter.shadowColor = *++ textPrinter->subPrinter.current_text_offset; + textPrinter->subPrinter.current_text_offset ++; + + GenerateFontHalfRowLookupTable(textPrinter->subPrinter.fontColor_h, textPrinter->subPrinter.bgColor, textPrinter->subPrinter.shadowColor); + return 2; + case 5: + textPrinter->subPrinter.current_text_offset ++; + return 2; + case 6: + sub->font_type = *textPrinter->subPrinter.current_text_offset; + textPrinter->subPrinter.current_text_offset ++; + return 2; + case 7: + return 2; + case 8: + textPrinter->delayCounter = *textPrinter->subPrinter.current_text_offset ++; + textPrinter->state = 6; + return 2; + case 9: + textPrinter->state = 1; + if (gTextFlags.flag_2) + { + sub->frames_visible_counter = 0; + } + return 3; + case 10: + textPrinter->state = 5; + return 3; + case 11: + case 16: + textPrinter->subPrinter.current_text_offset += 2; + return 2; + case 12: + char_ = *++textPrinter->subPrinter.current_text_offset; + break; + case 13: + textPrinter->subPrinter.currentX = textPrinter->subPrinter.x + *textPrinter->subPrinter.current_text_offset ++; + return 2; + case 14: + textPrinter->subPrinter.currentY = textPrinter->subPrinter.y + *textPrinter->subPrinter.current_text_offset ++; + return 2; + case 15: + FillWindowPixelBuffer(textPrinter->subPrinter.windowId, textPrinter->subPrinter.bgColor | (textPrinter->subPrinter.bgColor << 4)); + return 2; + } + break; + case CHAR_PROMPT_CLEAR: + textPrinter->state = 2; + TextPrinterInitDownArrowCounters(textPrinter); + return 3; + case CHAR_PROMPT_SCROLL: + textPrinter->state = 3; + TextPrinterInitDownArrowCounters(textPrinter); + return 3; + case 0xF9: + char_ = *textPrinter->subPrinter.current_text_offset ++ | 0x100; + break; + case 0xF8: + textPrinter->subPrinter.current_text_offset ++; + return 0; + } + DecompressGlyphFont6(char_); + CopyGlyphToWindow(textPrinter); + textPrinter->subPrinter.currentX += gUnknown_03002F90[0x80] + textPrinter->subPrinter.letterSpacing; + return 0; + case 1: + if (TextPrinterWait(textPrinter)) + { + textPrinter->state = 0; + } + return 3; + case 2: + if (TextPrinterWaitWithDownArrow(textPrinter)) + { + FillWindowPixelBuffer(textPrinter->subPrinter.windowId, textPrinter->subPrinter.bgColor | (textPrinter->subPrinter.bgColor << 4)); + textPrinter->subPrinter.currentX = textPrinter->subPrinter.x; + textPrinter->subPrinter.currentY = textPrinter->subPrinter.y; + textPrinter->state = 0; + } + return 3; + case 3: + if (TextPrinterWaitWithDownArrow(textPrinter)) + { + TextPrinterClearDownArrow(textPrinter); + textPrinter->scrollDistance = gFonts[textPrinter->subPrinter.fontId].maxLetterHeight + textPrinter->subPrinter.lineSpacing; + textPrinter->subPrinter.currentX = textPrinter->subPrinter.x; + textPrinter->state = 4; + } + return 3; + case 4: + if (textPrinter->scrollDistance) + { + if (textPrinter->scrollDistance < gUnknown_08616124[gSaveBlock2Ptr->optionsTextSpeed]) + { + ScrollWindow(textPrinter->subPrinter.windowId, 0, textPrinter->scrollDistance, textPrinter->subPrinter.bgColor | (textPrinter->subPrinter.bgColor << 4)); + textPrinter->scrollDistance = 0; + } + else + { + ScrollWindow(textPrinter->subPrinter.windowId, 0, gUnknown_08616124[gSaveBlock2Ptr->optionsTextSpeed], textPrinter->subPrinter.bgColor | (textPrinter->subPrinter.bgColor << 4)); + textPrinter->scrollDistance -= gUnknown_08616124[gSaveBlock2Ptr->optionsTextSpeed]; + } + CopyWindowToVram(textPrinter->subPrinter.windowId, 2); + } + else + { + textPrinter->state = 0; + } + return 3; + case 5: + if (!IsSEPlaying()) + { + textPrinter->state = 0; + } + return 3; + case 6: + if (textPrinter->delayCounter) + { + textPrinter->delayCounter --; + } + else + { + textPrinter->state = 0; + } + return 3; + } + return 1; +} From aa64f61b84d6b52f4073cf9acef1a927cd9010e6 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Fri, 22 Sep 2017 00:01:07 -0400 Subject: [PATCH 02/42] Finish decomp of unk_text_util_2 --- asm/unk_text_util_2.s | 60 ------------------------------------------- ld_script.txt | 1 - src/unk_text_util_2.c | 21 ++++++++++++++- 3 files changed, 20 insertions(+), 62 deletions(-) delete mode 100755 asm/unk_text_util_2.s diff --git a/asm/unk_text_util_2.s b/asm/unk_text_util_2.s deleted file mode 100755 index c1ab25594..000000000 --- a/asm/unk_text_util_2.s +++ /dev/null @@ -1,60 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .syntax unified - - .text - - thumb_func_start DecompressGlyphFont6 -DecompressGlyphFont6: @ 81BA668 - push {r4,r5,lr} - lsls r0, 16 - lsrs r2, r0, 19 - lsls r2, 9 - movs r1, 0xE0 - lsls r1, 11 - ands r1, r0 - lsrs r1, 11 - ldr r0, =gFont6BrailleGlyphs - adds r1, r0 - adds r5, r2, r1 - ldr r4, =gUnknown_03002F90 - adds r0, r5, 0 - adds r1, r4, 0 - bl DecompressGlyphTile - adds r0, r5, 0 - adds r0, 0x10 - adds r1, r4, 0 - adds r1, 0x20 - bl DecompressGlyphTile - movs r1, 0x80 - lsls r1, 1 - adds r0, r5, r1 - adds r1, r4, 0 - adds r1, 0x40 - bl DecompressGlyphTile - movs r1, 0x88 - lsls r1, 1 - adds r0, r5, r1 - adds r1, r4, 0 - adds r1, 0x60 - bl DecompressGlyphTile - adds r0, r4, 0 - adds r0, 0x80 - movs r1, 0x10 - strb r1, [r0] - adds r0, 0x1 - strb r1, [r0] - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end DecompressGlyphFont6 - - thumb_func_start GetGlyphWidthFont6 -GetGlyphWidthFont6: @ 81BA6CC - movs r0, 0x10 - bx lr - thumb_func_end GetGlyphWidthFont6 - - .align 2, 0 @ Don't pad with nop. diff --git a/ld_script.txt b/ld_script.txt index bafc67285..aee6ae59a 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -254,7 +254,6 @@ SECTIONS { asm/party_menu.o(.text); asm/battle_tent.o(.text); src/unk_text_util_2.o(.text); - asm/unk_text_util_2.o(.text); src/multiboot.o(.text); asm/unk_81BAD84.o(.text); asm/battle_controller_player_partner.o(.text); diff --git a/src/unk_text_util_2.c b/src/unk_text_util_2.c index 23f3ca1b6..d9bd9d98d 100644 --- a/src/unk_text_util_2.c +++ b/src/unk_text_util_2.c @@ -5,8 +5,9 @@ #include "sound.h" extern const u8 gUnknown_08616124[]; +extern const u16 gFont6BrailleGlyphs[]; -void DecompressGlyphFont6(u16); +static void DecompressGlyphFont6(u16); u16 Font6Func(struct TextPrinter *textPrinter) { @@ -198,3 +199,21 @@ u16 Font6Func(struct TextPrinter *textPrinter) } return 1; } + +static void DecompressGlyphFont6(u16 glyph) +{ + const u16 *glyphs; + + glyphs = gFont6BrailleGlyphs + 0x100 * (glyph / 8) + 0x10 * (glyph % 8); + DecompressGlyphTile(glyphs, (u16 *)gUnknown_03002F90); + DecompressGlyphTile(glyphs + 0x8, (u16 *)(gUnknown_03002F90 + 0x20)); + DecompressGlyphTile(glyphs + 0x80, (u16 *)(gUnknown_03002F90 + 0x40)); + DecompressGlyphTile(glyphs + 0x88, (u16 *)(gUnknown_03002F90 + 0x60)); + gUnknown_03002F90[0x80] = 0x10; + gUnknown_03002F90[0x81] = 0x10; +} + +u8 GetGlyphWidthFont6(void) +{ + return 0x10; +} From 561d60342f7ec39f03671ce37ab4f0ab8d0244c6 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Fri, 22 Sep 2017 21:18:53 -0400 Subject: [PATCH 03/42] Decompile data --- data/unk_text_util_2.s | 11 ----------- ld_script.txt | 2 +- src/unk_text_util_2.c | 4 ++-- 3 files changed, 3 insertions(+), 14 deletions(-) delete mode 100644 data/unk_text_util_2.s diff --git a/data/unk_text_util_2.s b/data/unk_text_util_2.s deleted file mode 100644 index 69f227ea2..000000000 --- a/data/unk_text_util_2.s +++ /dev/null @@ -1,11 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .section .rodata - -gUnknown_08616124:: @ 8616124 - .incbin "baserom.gba", 0x616124, 0x4 - - .align 2 -gFont6BrailleGlyphs:: @ 8616128 - .incbin "data/graphics/fonts/font6.fwjpnfont" diff --git a/ld_script.txt b/ld_script.txt index 136c198dc..1ad681e36 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -389,7 +389,7 @@ SECTIONS { data/item_icon.o(.rodata); data/party_menu.o(.rodata); data/battle_tent.o(.rodata); - data/unk_text_util_2.o(.rodata); + src/unk_text_util_2.o(.rodata); data/unk_81BAD84.o(.rodata); data/battle_controller_player_partner.o(.rodata); data/fossil_special_fldeff_groundshake.o(.rodata); diff --git a/src/unk_text_util_2.c b/src/unk_text_util_2.c index d9bd9d98d..d88af611f 100644 --- a/src/unk_text_util_2.c +++ b/src/unk_text_util_2.c @@ -4,8 +4,8 @@ #include "text.h" #include "sound.h" -extern const u8 gUnknown_08616124[]; -extern const u16 gFont6BrailleGlyphs[]; +static const u8 gUnknown_08616124[] = {1, 2, 4}; +static const u16 gFont6BrailleGlyphs[] = INCBIN_U16("data/graphics/fonts/font6.fwjpnfont"); static void DecompressGlyphFont6(u16); From 4cf115000289d10de3408e752b37128446dd261c Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Fri, 22 Sep 2017 21:26:37 -0400 Subject: [PATCH 04/42] clion pls --- include/text.h | 32 +++++++++++++++++--------------- src/text.c | 2 +- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/include/text.h b/include/text.h index a7a79da7a..fc8ffa82f 100644 --- a/include/text.h +++ b/include/text.h @@ -94,23 +94,25 @@ struct TextPrinterSubStruct u8 active; }; +struct TextSubPrinter { // TODO: Better name + u8* current_text_offset; + u8 windowId; + u8 fontId; + u8 x; + u8 y; + u8 currentX; // 0x8 + u8 currentY; + u8 letterSpacing; + u8 lineSpacing; + u8 fontColor_l:4; // 0xC + u8 fontColor_h:4; + u8 bgColor:4; + u8 shadowColor:4; +}; + struct TextPrinter { - struct TextSubPrinter { // TODO: Better name - u8* current_text_offset; - u8 windowId; - u8 fontId; - u8 x; - u8 y; - u8 currentX; // 0x8 - u8 currentY; - u8 letterSpacing; - u8 lineSpacing; - u8 fontColor_l:4; // 0xC - u8 fontColor_h:4; - u8 bgColor:4; - u8 shadowColor:4; - } subPrinter; + struct TextSubPrinter subPrinter; void (*callback)(struct TextSubPrinter *, u16); // 0x10 diff --git a/src/text.c b/src/text.c index fe1c5df24..90c069293 100644 --- a/src/text.c +++ b/src/text.c @@ -1,9 +1,9 @@ #include "global.h" -#include "text.h" #include "main.h" #include "palette.h" #include "string_util.h" #include "window.h" +#include "text.h" extern void FillBitmapRect4Bit(struct Bitmap *surface, u16 x, u16 y, u16 width, u16 height, u8 fillValue); extern void FillWindowPixelRect(u8 windowId, u8 fillValue, u16 x, u16 y, u16 width, u16 height); From ef0b022707bd6e4167f43fa0c9396dc507ef9042 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 30 Sep 2017 09:32:46 -0400 Subject: [PATCH 05/42] BSS: src/main.o, src/dma3_manager.o --- asm/librfu.s | 4 ++-- include/dma3.h | 14 -------------- src/dma3_manager.c | 18 ++++++++++++++---- src/main.c | 2 +- src/malloc.c | 1 + sym_bss.txt | 24 ++---------------------- 6 files changed, 20 insertions(+), 43 deletions(-) diff --git a/asm/librfu.s b/asm/librfu.s index d8ca7538c..129e0f34a 100644 --- a/asm/librfu.s +++ b/asm/librfu.s @@ -2762,7 +2762,7 @@ sub_82E424C: @ 82E424C b _082E4266 .align 2, 0 _082E4254: .4byte gUnknown_089A324C -_082E4258: .4byte gUnknown_030000F0 +_082E4258: .4byte gDma3Requests + 0xE0 thumb_func_end sub_82E424C thumb_func_start sub_82E425C @@ -2810,7 +2810,7 @@ _082E4274: movs r0, 0 b _082E42BE .align 2, 0 -_082E42B0: .4byte gUnknown_030000FA +_082E42B0: .4byte gDma3Requests + 0xEA _082E42B4: .4byte gUnknown_03007890 _082E42B8: .4byte gUnknown_03007894 _082E42BC: diff --git a/include/dma3.h b/include/dma3.h index db75ea9e3..265b47824 100644 --- a/include/dma3.h +++ b/include/dma3.h @@ -1,20 +1,6 @@ #ifndef GUARD_DMA3_H #define GUARD_DMA3_H -extern u8 gDma3ManagerLocked; -extern u8 gDma3RequestCursor; - -struct DmaRequestsStruct -{ - /* 0x00 */ const u8 *src; - /* 0x04 */ u8 *dest; - /* 0x08 */ u16 size; - /* 0x0A */ u16 mode; - /* 0x0C */ u32 value; -}; - -extern struct DmaRequestsStruct gDma3Requests[128]; - void ClearDma3Requests(void); void ProcessDma3Requests(void); int RequestDma3Copy(const void *src, void *dest, u16 size, u8 mode); diff --git a/src/dma3_manager.c b/src/dma3_manager.c index 7cce06c15..bb015c5cf 100644 --- a/src/dma3_manager.c +++ b/src/dma3_manager.c @@ -1,12 +1,23 @@ #include "global.h" #include "dma3.h" +IWRAM_DATA struct { + /* 0x00 */ const u8 *src; + /* 0x04 */ u8 *dest; + /* 0x08 */ u16 size; + /* 0x0A */ u16 mode; + /* 0x0C */ u32 value; +} gDma3Requests[128]; + +static bool8 gDma3ManagerLocked; +static u8 gDma3RequestCursor; + void ClearDma3Requests(void) { int i; gDma3ManagerLocked = TRUE; - gDma3RequestCursor = FALSE; + gDma3RequestCursor = 0; for(i = 0; i < (u8)ARRAY_COUNT(gDma3Requests); i++) { @@ -22,7 +33,6 @@ void ClearDma3Requests(void) void ProcessDma3Requests(void) { // NOTE: the fillerA member of the DMA struct is actually u32 value; - // NOTE: gUnknown_0300001C is just a pointer inside the gDma3Requests structure, not a true symbol; feel free to remove u16 total_size; if (gDma3ManagerLocked) @@ -331,7 +341,7 @@ _08000DB2:\n\ mov r5, r12\n\ ldrb r0, [r5]\n\ lsls r0, 4\n\ - ldr r3, =gUnknown_0300001C\n\ + ldr r3, =gDma3Requests + 0x0C\n\ adds r0, r3\n\ ldr r0, [r0]\n\ strh r0, [r1]\n\ @@ -347,7 +357,7 @@ _08000DB2:\n\ bhi _08000DB2\n\ ldrb r0, [r5]\n\ lsls r0, 4\n\ - ldr r5, =gUnknown_0300001C\n\ + ldr r5, =gDma3Requests + 0x0C\n\ adds r0, r5\n\ ldr r0, [r0]\n\ strh r0, [r1]\n\ diff --git a/src/main.c b/src/main.c index 5707e18af..665a4dd84 100644 --- a/src/main.c +++ b/src/main.c @@ -77,7 +77,7 @@ const IntrFunc gIntrTableTemplate[] = #define INTR_COUNT ((int)(sizeof(gIntrTableTemplate)/sizeof(IntrFunc))) -extern u16 gUnknown_03000000; +static u16 gUnknown_03000000; extern u16 gKeyRepeatStartDelay; extern u8 gUnknown_030022B4; diff --git a/src/malloc.c b/src/malloc.c index ccb2f7d20..1d64351c3 100644 --- a/src/malloc.c +++ b/src/malloc.c @@ -2,6 +2,7 @@ static void *sHeapStart; static u32 sHeapSize; +static u32 malloc_c_unused_0300000c; // needed to align dma3_manager.o(.bss) #define MALLOC_SYSTEM_ID 0xA3A3 diff --git a/sym_bss.txt b/sym_bss.txt index aacfa59a0..2cc5279f3 100644 --- a/sym_bss.txt +++ b/sym_bss.txt @@ -1,27 +1,7 @@ gUnknown_03000000: @ 3000000 - .space 0x4 - + .include "src/main.o" .include "src/malloc.o" - - .align 4 -gDma3Requests: @ 3000010 - .space 0xC - -gUnknown_0300001C: @ 300001C - .space 0xD4 - -gUnknown_030000F0: @ 30000F0 - .space 0xA - -gUnknown_030000FA: @ 30000FA - .space 0x716 - -gDma3ManagerLocked: @ 3000810 - .space 0x1 - -gDma3RequestCursor: @ 3000811 - .space 0x7 - + .include "src/dma3_manager.o" .include "src/gpu_regs.o" .include "src/bg.o" .include "src/text.o" From f4827632f2c2e78cdc798176f61e7ff26539a957 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 30 Sep 2017 09:56:08 -0400 Subject: [PATCH 06/42] BSS: link.o --- src/link.c | 56 ++++++++++++++++++++++++++++++++++++++++ sym_bss.txt | 74 +---------------------------------------------------- 2 files changed, 57 insertions(+), 73 deletions(-) create mode 100644 src/link.c diff --git a/src/link.c b/src/link.c new file mode 100644 index 000000000..ae2cd1992 --- /dev/null +++ b/src/link.c @@ -0,0 +1,56 @@ + +// Includes +#include "global.h" + +// Static type declarations + +struct BlockTransfer +{ + u16 pos; + u16 size; + void *src; + bool8 active; + u8 multiplayerId; +}; + +struct LinkTestBGInfo +{ + u32 screenBaseBlock; + u32 paletteNum; + u32 dummy_8; + u32 dummy_C; +}; + +// Static RAM declarations + +IWRAM_DATA struct BlockTransfer gUnknown_03000D10; +IWRAM_DATA u32 link_c_unused_03000d1c; +IWRAM_DATA struct BlockTransfer gUnknown_03000D20[4]; +IWRAM_DATA u32 gUnknown_03000D50; +IWRAM_DATA u32 gUnknown_03000D54; +IWRAM_DATA u8 gUnknown_03000D58; +IWRAM_DATA u32 gUnknown_03000D5C; +IWRAM_DATA u32 gUnknown_03000D60; +IWRAM_DATA u8 gUnknown_03000D64[4]; // not really, but won't match otherwise +IWRAM_DATA u8 gUnknown_03000D68[4]; +IWRAM_DATA u8 gUnknown_03000D6C; +IWRAM_DATA bool8 gUnknown_03000D6D; +IWRAM_DATA u16 gUnknown_03000D6E; +IWRAM_DATA u16 gUnknown_03000D70; +IWRAM_DATA u8 gUnknown_03000D72; +IWRAM_DATA u8 gUnknown_03000D73; +IWRAM_DATA u8 gUnknown_03000D74[4]; // not really, but won't match otherwise +IWRAM_DATA u8 gUnknown_03000D78[8]; // not really, but won't match otherwise +IWRAM_DATA u8 gUnknown_03000D80[16]; +IWRAM_DATA u16 gUnknown_03000D90[8]; +IWRAM_DATA u32 gUnknown_03000DA0; +IWRAM_DATA u32 gUnknown_03000DA4; +IWRAM_DATA void *gUnknown_03000DA8; +IWRAM_DATA void *gUnknown_03000DAC; +IWRAM_DATA bool32 gUnknown_03000DB0; + +// Static ROM declarations + +// .rodata + +// .text diff --git a/sym_bss.txt b/sym_bss.txt index 2cc5279f3..efd129fd7 100644 --- a/sym_bss.txt +++ b/sym_bss.txt @@ -6,79 +6,7 @@ gUnknown_03000000: @ 3000000 .include "src/bg.o" .include "src/text.o" .include "src/sprite.o" - -gUnknown_03000D10: @ 3000D10 - .space 0x10 - -gUnknown_03000D20: @ 3000D20 - .space 0x30 - -gUnknown_03000D50: @ 3000D50 - .space 0x4 - -gUnknown_03000D54: @ 3000D54 - .space 0x4 - -gUnknown_03000D58: @ 3000D58 - .space 0x4 - -gUnknown_03000D5C: @ 3000D5C - .space 0x4 - -gUnknown_03000D60: @ 3000D60 - .space 0x4 - -gUnknown_03000D64: @ 3000D64 - .space 0x4 - -gUnknown_03000D68: @ 3000D68 - .space 0x4 - -gUnknown_03000D6C: @ 3000D6C - .space 0x1 - -gUnknown_03000D6D: @ 3000D6D - .space 0x1 - -gUnknown_03000D6E: @ 3000D6E - .space 0x2 - -gUnknown_03000D70: @ 3000D70 - .space 0x2 - -gUnknown_03000D72: @ 3000D72 - .space 0x1 - -gUnknown_03000D73: @ 3000D73 - .space 0x1 - -gUnknown_03000D74: @ 3000D74 - .space 0x4 - -gUnknown_03000D78: @ 3000D78 - .space 0x8 - -gUnknown_03000D80: @ 3000D80 - .space 0x10 - -gUnknown_03000D90: @ 3000D90 - .space 0x10 - -gUnknown_03000DA0: @ 3000DA0 - .space 0x4 - -gUnknown_03000DA4: @ 3000DA4 - .space 0x4 - -gUnknown_03000DA8: @ 3000DA8 - .space 0x4 - -gUnknown_03000DAC: @ 3000DAC - .space 0x4 - -gUnknown_03000DB0: @ 3000DB0 - .space 0x8 - + .include "src/link.o" .include "src/rtc.o" gUnknown_03000DD0: @ 3000DD0 From 24da6e48ffe63916d1ffeb8fec720c63fdfac172 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 30 Sep 2017 10:01:52 -0400 Subject: [PATCH 07/42] BSS: main_menu.o, battle_1.o --- src/battle_1.c | 17 +++++++++++++++++ src/main_menu.c | 15 +++++++++++++++ sym_bss.txt | 15 ++------------- 3 files changed, 34 insertions(+), 13 deletions(-) create mode 100644 src/battle_1.c create mode 100644 src/main_menu.c diff --git a/src/battle_1.c b/src/battle_1.c new file mode 100644 index 000000000..5e4ef5583 --- /dev/null +++ b/src/battle_1.c @@ -0,0 +1,17 @@ + +// Includes +#include "global.h" + +// Static type declarations + +// Static RAM declarations + +IWRAM_DATA u32 gUnknown_03000DD4; +IWRAM_DATA u32 gUnknown_03000DD8; +IWRAM_DATA u32 gUnknown_03000DDC; + +// Static ROM declarations + +// .rodata + +// .text diff --git a/src/main_menu.c b/src/main_menu.c new file mode 100644 index 000000000..8608159c2 --- /dev/null +++ b/src/main_menu.c @@ -0,0 +1,15 @@ + +// Includes +#include "global.h" + +// Static type declarations + +// Static RAM declarations + +IWRAM_DATA u8 gUnknown_03000DD0; + +// Static ROM declarations + +// .rodata + +// .text diff --git a/sym_bss.txt b/sym_bss.txt index efd129fd7..f9ce07a4b 100644 --- a/sym_bss.txt +++ b/sym_bss.txt @@ -8,19 +8,8 @@ gUnknown_03000000: @ 3000000 .include "src/sprite.o" .include "src/link.o" .include "src/rtc.o" - -gUnknown_03000DD0: @ 3000DD0 - .space 0x4 - -gUnknown_03000DD4: @ 3000DD4 - .space 0x4 - -gUnknown_03000DD8: @ 3000DD8 - .space 0x4 - -gUnknown_03000DDC: @ 3000DDC - .space 0x4 - + .include "src/main_menu.o" + .include "src/battle_1.o" .include "src/egg_hatch.o" .space 0x4 @ why the gap? From 8620b9203d876764404622d2d6d8711812928979 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 30 Sep 2017 10:12:35 -0400 Subject: [PATCH 08/42] BSS: berry_blender.o --- src/berry_blender.c | 18 ++++++++++++++++++ sym_bss.txt | 16 +--------------- 2 files changed, 19 insertions(+), 15 deletions(-) create mode 100644 src/berry_blender.c diff --git a/src/berry_blender.c b/src/berry_blender.c new file mode 100644 index 000000000..d9cc86f7f --- /dev/null +++ b/src/berry_blender.c @@ -0,0 +1,18 @@ + +// Includes +#include "global.h" + +// Static type declarations + +// Static RAM declarations +IWRAM_DATA u32 berry_blender_c_unused_03000de4; +IWRAM_DATA s16 gUnknown_03000DE8[8]; +IWRAM_DATA s16 gUnknown_03000DF8[6]; +IWRAM_DATA s16 gUnknown_03000E04; +IWRAM_DATA s16 gUnknown_03000E06; + +// Static ROM declarations + +// .rodata + +// .text diff --git a/sym_bss.txt b/sym_bss.txt index f9ce07a4b..b05a40e98 100644 --- a/sym_bss.txt +++ b/sym_bss.txt @@ -11,21 +11,7 @@ gUnknown_03000000: @ 3000000 .include "src/main_menu.o" .include "src/battle_1.o" .include "src/egg_hatch.o" - -.space 0x4 @ why the gap? - -gUnknown_03000DE8: @ 3000DE8 - .space 0x10 - -gUnknown_03000DF8: @ 3000DF8 - .space 0xC - -gUnknown_03000E04: @ 3000E04 - .space 0x2 - -gUnknown_03000E06: @ 3000E06 - .space 0x2 - + .include "src/berry_blender.o" .include "src/play_time.o" .align 2 From 64631bac9365cf8df3798d9d3be8746d4d641685 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 30 Sep 2017 13:08:28 -0400 Subject: [PATCH 09/42] BSS: rom4.o, field_camera.o --- src/berry_blender.c | 2 +- src/field_camera.c | 28 ++++++++++++++++++++++++++++ src/rom4.c | 19 +++++++++++++++++++ sym_bss.txt | 37 +++---------------------------------- 4 files changed, 51 insertions(+), 35 deletions(-) create mode 100644 src/field_camera.c create mode 100644 src/rom4.c diff --git a/src/berry_blender.c b/src/berry_blender.c index d9cc86f7f..db50fe4c4 100644 --- a/src/berry_blender.c +++ b/src/berry_blender.c @@ -5,7 +5,7 @@ // Static type declarations // Static RAM declarations -IWRAM_DATA u32 berry_blender_c_unused_03000de4; +IWRAM_DATA void *berry_blender_c_unused_03000de4; IWRAM_DATA s16 gUnknown_03000DE8[8]; IWRAM_DATA s16 gUnknown_03000DF8[6]; IWRAM_DATA s16 gUnknown_03000E04; diff --git a/src/field_camera.c b/src/field_camera.c new file mode 100644 index 000000000..17ced6aa5 --- /dev/null +++ b/src/field_camera.c @@ -0,0 +1,28 @@ + +// Includes +#include "global.h" + +// Static type declarations + +struct FieldCameraUnknownStruct +{ + u8 unk0; + u8 unk1; + u8 unk2; + u8 unk3; + bool8 unk4; +}; + +// Static RAM declarations + +IWRAM_DATA struct FieldCameraUnknownStruct gUnknown_03000E20; +IWRAM_DATA s16 gUnknown_03000E28; +IWRAM_DATA s16 gUnknown_03000E2A; +IWRAM_DATA u8 gUnknown_03000E2C; +IWRAM_DATA void (*gUnknown_03000E30)(void); + +// Static ROM declarations + +// .rodata + +// .text diff --git a/src/rom4.c b/src/rom4.c new file mode 100644 index 000000000..c538595f2 --- /dev/null +++ b/src/rom4.c @@ -0,0 +1,19 @@ + +// Includes +#include "global.h" + +// Static type declarations + +// Static RAM declarations +IWRAM_DATA void *gUnknown_03000E0C; +IWRAM_DATA u8 gUnknown_03000E10[4]; +IWRAM_DATA u8 (*gUnknown_03000E14)(u32); +IWRAM_DATA u8 gUnknown_03000E18; +IWRAM_DATA u8 gUnknown_03000E19; +IWRAM_DATA void *rom4_c_unused_03000e1c; + +// Static ROM declarations + +// .rodata + +// .text diff --git a/sym_bss.txt b/sym_bss.txt index b05a40e98..c81ce12be 100644 --- a/sym_bss.txt +++ b/sym_bss.txt @@ -13,40 +13,9 @@ gUnknown_03000000: @ 3000000 .include "src/egg_hatch.o" .include "src/berry_blender.o" .include "src/play_time.o" - -.align 2 - -gUnknown_03000E0C: @ 3000E0C - .space 0x4 - -gUnknown_03000E10: @ 3000E10 - .space 0x4 - -gUnknown_03000E14: @ 3000E14 - .space 0x4 - -gUnknown_03000E18: @ 3000E18 - .space 0x1 - -gUnknown_03000E19: @ 3000E19 - .space 0x7 - -gUnknown_03000E20: @ 3000E20 - .space 0x8 - -gUnknown_03000E28: @ 3000E28 - .space 0x2 - -gUnknown_03000E2A: @ 3000E2A - .space 0x2 - -gUnknown_03000E2C: @ 3000E2C - .space 0x4 - -gUnknown_03000E30: @ 3000E30 - .space 0x8 - -.include "src/script.o" + .include "src/rom4.o" + .include "src/field_camera.o" + .include "src/script.o" .align 2 gUnknown_03000F30: @ 3000F30 From 729f4e10ed8a53155d992b8904926a10181acafa Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Sun, 1 Oct 2017 01:12:42 +0200 Subject: [PATCH 10/42] start decompiling battle2 --- asm/battle_1.s | 12 +- asm/battle_2.s | 3235 +-------------------- asm/battle_5.s | 6 +- asm/battle_7.s | 56 +- asm/battle_anim.s | 8 +- asm/battle_anim_80FE840.s | 152 +- asm/battle_anim_815A0D4.s | 26 +- asm/battle_anim_8170478.s | 8 +- asm/battle_controller_linkopponent.s | 4 +- asm/battle_controller_linkpartner.s | 4 +- asm/battle_controller_opponent.s | 6 +- asm/battle_controller_player.s | 28 +- asm/battle_controller_player_partner.s | 4 +- asm/battle_controller_recorded_opponent.s | 4 +- asm/battle_controller_recorded_player.s | 4 +- asm/battle_controller_safari.s | 10 +- asm/battle_controller_wally.s | 12 +- asm/battle_frontier_1.s | 74 +- asm/battle_frontier_2.s | 4 +- asm/battle_interface.s | 16 +- asm/battle_setup.s | 10 +- asm/battle_tower.s | 22 +- asm/battle_transition.s | 12 +- asm/berry_blender.s | 48 +- asm/cable_club.s | 34 +- asm/contest.s | 48 +- asm/contest_link_80F57C4.s | 60 +- asm/contest_link_80FC4F4.s | 40 +- asm/contest_link_81D9DE4.s | 10 +- asm/contest_painting.s | 6 +- asm/evolution_scene.s | 54 +- asm/field_screen.s | 2 +- asm/link.s | 298 +- asm/menu_helpers.s | 2 +- asm/mystery_event_menu.s | 8 +- asm/pokeblock_feed.s | 4 +- asm/pokemon_summary_screen.s | 10 +- asm/pokenav.s | 10 +- asm/record_mixing.s | 8 +- asm/recorded_battle.s | 10 +- asm/reshow_battle_screen.s | 10 +- asm/rom3.s | 26 +- asm/rom6.s | 14 +- asm/rom_80A5C6C.s | 12 +- asm/script_pokemon_util_80F87D8.s | 10 +- asm/trade.s | 66 +- asm/trainer_card.s | 20 +- asm/unknown_task.s | 6 +- include/battle.h | 51 +- include/battle_setup.h | 6 + include/flags.h | 2 + include/global.berry.h | 13 +- include/global.h | 9 +- include/link.h | 18 +- include/load_save.h | 1 + include/pokemon.h | 1 + include/recorded_battle.h | 5 + include/unknown_task.h | 12 +- ld_script.txt | 1 + src/battle_2.c | 1343 +++++++++ src/battle_script_commands.c | 3 +- src/egg_hatch.c | 6 +- src/pokemon_2.c | 12 +- src/pokemon_3.c | 4 +- sym_common.txt | 4 +- sym_ewram.txt | 25 +- 66 files changed, 2143 insertions(+), 3906 deletions(-) create mode 100644 include/battle_setup.h create mode 100644 src/battle_2.c diff --git a/asm/battle_1.s b/asm/battle_1.s index 636bafbea..168f16cca 100644 --- a/asm/battle_1.s +++ b/asm/battle_1.s @@ -1667,8 +1667,8 @@ _08035A8A: .pool thumb_func_end load_battle_oval_graphics - thumb_func_start sub_8035AA4 -sub_8035AA4: @ 8035AA4 + thumb_func_start LoadBattleTextboxAndBackground +LoadBattleTextboxAndBackground: @ 8035AA4 push {lr} ldr r0, =gUnknown_08C00000 movs r1, 0xC0 @@ -1690,7 +1690,7 @@ sub_8035AA4: @ 8035AA4 pop {r0} bx r0 .pool - thumb_func_end sub_8035AA4 + thumb_func_end LoadBattleTextboxAndBackground thumb_func_start sub_8035AE4 sub_8035AE4: @ 8035AE4 @@ -2457,8 +2457,8 @@ _08036138: .pool thumb_func_end task00_0800F6FC - thumb_func_start sub_8036154 -sub_8036154: @ 8036154 + thumb_func_start LoadBattleEntryBackground +LoadBattleEntryBackground: @ 8036154 push {r4,r5,lr} ldr r0, =gBattleTypeFlags ldr r1, [r0] @@ -2668,7 +2668,7 @@ _080363AC: pop {r0} bx r0 .pool - thumb_func_end sub_8036154 + thumb_func_end LoadBattleEntryBackground thumb_func_start sub_80363C4 sub_80363C4: @ 80363C4 diff --git a/asm/battle_2.s b/asm/battle_2.s index 996579313..0f4ec2bea 100644 --- a/asm/battle_2.s +++ b/asm/battle_2.s @@ -4,3157 +4,6 @@ .syntax unified .text - - - thumb_func_start sub_8036760 -sub_8036760: @ 8036760 - push {lr} - bl MoveSaveBlocks_ResetHeap - bl sub_8056F28 - bl dp11_init - bl init_uns_table_pokemon_copy - bl sub_8185F84 - ldr r0, =gBattleTypeFlags - ldr r1, [r0] - movs r0, 0x40 - ands r0, r1 - cmp r0, 0 - beq _080367CC - movs r0, 0x80 - lsls r0, 17 - ands r0, r1 - cmp r0, 0 - beq _08036798 - bl InitBattle - b _080367BA - .pool -_08036798: - movs r0, 0x80 - lsls r0, 15 - ands r1, r0 - cmp r1, 0 - bne _080367B4 - bl battle_wireless_setup_if_required_maybe - ldr r0, =sub_8037ADC - bl SetMainCallback2 - b _080367BA - .pool -_080367B4: - ldr r0, =intro_end - bl SetMainCallback2 -_080367BA: - ldr r1, =gBattleCommunication - movs r0, 0 - strb r0, [r1] - b _080367D0 - .pool -_080367CC: - bl InitBattle -_080367D0: - pop {r0} - bx r0 - thumb_func_end sub_8036760 - - thumb_func_start InitBattle -InitBattle: @ 80367D4 - push {r4,r5,lr} - sub sp, 0x4 - movs r0, 0 - bl SetHBlankCallback - movs r0, 0 - bl SetVBlankCallback - movs r0, 0 - str r0, [sp] - movs r1, 0xC0 - lsls r1, 19 - ldr r2, =0x05006000 - mov r0, sp - bl CpuSet - movs r0, 0x4C - movs r1, 0 - bl SetGpuReg - movs r0, 0x40 - movs r1, 0xF0 - bl SetGpuReg - ldr r1, =0x00005051 - movs r0, 0x44 - bl SetGpuReg - movs r0, 0x48 - movs r1, 0 - bl SetGpuReg - movs r0, 0x4A - movs r1, 0 - bl SetGpuReg - ldr r0, =gUnknown_02022E24 - movs r2, 0xF0 - strh r2, [r0] - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - movs r1, 0x80 - lsls r1, 15 - ands r0, r1 - cmp r0, 0 - beq _08036870 - ldr r0, =gPartnerTrainerId - ldrh r1, [r0] - ldr r0, =0x00000c03 - cmp r1, r0 - beq _08036870 - ldr r1, =gUnknown_02022E26 - movs r0, 0x9F - strh r0, [r1] - ldr r0, =gUnknown_02022E28 - strh r2, [r0] - ldr r1, =gUnknown_02022E2A - movs r0, 0x20 - strh r0, [r1] - b _080368BE - .pool -_08036870: - ldr r0, =gUnknown_02022E26 - ldr r2, =0x00005051 - adds r1, r2, 0 - strh r1, [r0] - bl dp12_8087EA4 - ldr r0, =gUnknown_02038C28 - movs r3, 0xF0 - movs r5, 0xF0 - lsls r5, 3 - adds r2, r0, r5 - movs r1, 0x4F -_08036888: - strh r3, [r0] - strh r3, [r2] - adds r2, 0x2 - adds r0, 0x2 - subs r1, 0x1 - cmp r1, 0 - bge _08036888 - movs r1, 0x50 - ldr r4, =gUnknown_0831AC70 - ldr r0, =gUnknown_02038C28 - ldr r3, =0x0000ff10 - movs r5, 0x82 - lsls r5, 4 - adds r2, r0, r5 - adds r0, 0xA0 -_080368A6: - strh r3, [r0] - strh r3, [r2] - adds r2, 0x2 - adds r0, 0x2 - adds r1, 0x1 - cmp r1, 0x9F - ble _080368A6 - ldr r0, [r4] - ldr r1, [r4, 0x4] - ldr r2, [r4, 0x8] - bl sub_80BA038 -_080368BE: - bl ResetPaletteFade - ldr r0, =gUnknown_02022E14 - movs r1, 0 - strh r1, [r0] - ldr r0, =gUnknown_02022E16 - strh r1, [r0] - ldr r0, =gBattle_BG1_X - strh r1, [r0] - ldr r0, =gBattle_BG1_Y - strh r1, [r0] - ldr r0, =gBattle_BG2_X - strh r1, [r0] - ldr r0, =gBattle_BG2_Y - strh r1, [r0] - ldr r0, =gBattle_BG3_X - strh r1, [r0] - ldr r0, =gUnknown_02022E22 - strh r1, [r0] - bl sub_80B0BD0 - ldr r2, =gBattleTerrain - strb r0, [r2] - ldr r4, =gBattleTypeFlags - ldr r0, [r4] - movs r1, 0x80 - lsls r1, 17 - ands r0, r1 - cmp r0, 0 - beq _080368FE - movs r0, 0x8 - strb r0, [r2] -_080368FE: - bl c2_berry_program_update_menu - bl sub_8035AA4 - bl ResetSpriteData - bl ResetTasks - bl sub_8036154 - bl FreeAllSpritePalettes - ldr r1, =gReservedSpritePaletteCount - movs r0, 0x4 - strb r0, [r1] - ldr r0, =VBlankCB_Battle - bl SetVBlankCallback - bl sub_803269C - ldr r2, [r4] - movs r1, 0xA0 - lsls r1, 1 - adds r0, r2, 0 - ands r0, r1 - cmp r0, r1 - beq _0803693E - ldr r1, =0x00400040 - adds r0, r2, 0 - ands r0, r1 - cmp r0, r1 - bne _08036994 -_0803693E: - ldr r0, =sub_8037458 - bl SetMainCallback2 - b _080369AE - .pool -_08036994: - movs r0, 0x40 - ands r2, r0 - cmp r2, 0 - beq _080369A8 - ldr r0, =sub_8037DF4 - bl SetMainCallback2 - b _080369AE - .pool -_080369A8: - ldr r0, =sub_8036FAC - bl SetMainCallback2 -_080369AE: - ldr r5, =gBattleTypeFlags - ldr r0, [r5] - ldr r1, =0x01000002 - ands r0, r1 - cmp r0, 0 - bne _080369E8 - ldr r4, =gEnemyParty - ldr r0, =gTrainerBattleOpponent_A - ldrh r1, [r0] - adds r0, r4, 0 - movs r2, 0x1 - bl CreateNPCTrainerParty - ldr r0, [r5] - movs r1, 0x80 - lsls r1, 8 - ands r0, r1 - cmp r0, 0 - beq _080369E4 - movs r1, 0x96 - lsls r1, 1 - adds r0, r4, r1 - ldr r1, =gTrainerBattleOpponent_B - ldrh r1, [r1] - movs r2, 0 - bl CreateNPCTrainerParty -_080369E4: - bl SetWildMonHeldItem -_080369E8: - ldr r1, =gMain - ldr r2, =0x00000439 - adds r1, r2 - ldrb r0, [r1] - movs r2, 0x2 - orrs r0, r2 - strb r0, [r1] - ldr r0, =gSaveBlock2Ptr - ldr r1, [r0] - ldr r5, =0x00000ca9 - adds r1, r5 - ldrb r2, [r1] - movs r0, 0x9 - negs r0, r0 - ands r0, r2 - strb r0, [r1] - ldr r4, =gPlayerParty - movs r0, 0xFA - lsls r0, 1 - adds r5, r4, r0 -_08036A10: - adds r0, r4, 0 - movs r1, 0x3 - bl AdjustFriendship - adds r4, 0x64 - cmp r4, r5 - ble _08036A10 - movs r1, 0 - ldr r0, =gBattleCommunication - strb r1, [r0] - add sp, 0x4 - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end InitBattle - - thumb_func_start sub_8036A5C -sub_8036A5C: @ 8036A5C - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - movs r6, 0 - mov r9, r6 - movs r0, 0xCE - lsls r0, 1 - mov r10, r0 - mov r8, r6 -_08036A72: - movs r0, 0x64 - mov r4, r9 - muls r4, r0 - ldr r0, =gPlayerParty - adds r4, r0 - adds r0, r4, 0 - movs r1, 0x41 - bl GetMonData - lsls r0, 16 - lsrs r5, r0, 16 - adds r0, r4, 0 - movs r1, 0x39 - bl GetMonData - lsls r0, 16 - lsrs r7, r0, 16 - adds r0, r4, 0 - movs r1, 0x37 - bl GetMonData - adds r1, r0, 0 - cmp r5, 0 - beq _08036AEE - cmp r5, r10 - beq _08036ABA - cmp r7, 0 - beq _08036ABA - cmp r1, 0 - bne _08036ABA - movs r0, 0x1 - mov r2, r8 - lsls r0, r2 - orrs r6, r0 - lsls r0, r6, 16 - lsrs r6, r0, 16 -_08036ABA: - cmp r5, 0 - beq _08036AEE - cmp r7, 0 - beq _08036AD6 - cmp r5, r10 - beq _08036ACA - cmp r1, 0 - beq _08036AD6 -_08036ACA: - movs r0, 0x2 - mov r1, r8 - lsls r0, r1 - orrs r6, r0 - lsls r0, r6, 16 - lsrs r6, r0, 16 -_08036AD6: - cmp r5, 0 - beq _08036AEE - cmp r5, r10 - beq _08036AEE - cmp r7, 0 - bne _08036AEE - movs r0, 0x3 - mov r2, r8 - lsls r0, r2 - orrs r6, r0 - lsls r0, r6, 16 - lsrs r6, r0, 16 -_08036AEE: - movs r0, 0x2 - add r8, r0 - movs r1, 0x1 - add r9, r1 - mov r2, r9 - cmp r2, 0x5 - ble _08036A72 - ldr r4, =gBattleStruct - ldr r0, [r4] - movs r1, 0xC1 - lsls r1, 1 - adds r0, r1 - strb r6, [r0] - ldr r0, [r4] - ldr r5, =0x00000183 - adds r0, r5 - lsrs r1, r6, 8 - strb r1, [r0] - ldr r0, =0x000008d2 - bl FlagGet - ldr r1, [r4] - adds r1, r5 - lsls r0, 7 - ldrb r2, [r1] - orrs r0, r2 - strb r0, [r1] - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8036A5C - - thumb_func_start sub_8036B44 -sub_8036B44: @ 8036B44 - push {r4-r7,lr} - ldr r0, =gBattleStruct - ldr r5, [r0] - movs r0, 0xC2 - lsls r0, 1 - adds r4, r5, r0 - bl IsEnigmaBerryValid - cmp r0, 0x1 - bne _08036BC0 - movs r2, 0 - ldr r7, =gSaveBlock1Ptr - movs r1, 0xC6 - lsls r1, 1 - adds r5, r1 - adds r6, r7, 0 - ldr r3, =0x000031f8 -_08036B66: - adds r0, r4, r2 - ldr r1, [r6] - adds r1, r3 - adds r1, r2 - ldrb r1, [r1] - strb r1, [r0] - adds r2, 0x1 - cmp r2, 0x5 - ble _08036B66 - adds r1, r4, r2 - movs r0, 0xFF - strb r0, [r1] - movs r2, 0 - adds r3, r5, 0 - ldr r6, =gSaveBlock1Ptr - ldr r5, =0x00003214 -_08036B86: - adds r0, r3, r2 - ldr r1, [r6] - adds r1, r5 - adds r1, r2 - ldrb r1, [r1] - strb r1, [r0] - adds r2, 0x1 - cmp r2, 0x11 - ble _08036B86 - ldr r0, [r7] - ldr r1, =0x00003226 - adds r0, r1 - ldrb r0, [r0] - strb r0, [r4, 0x7] - ldr r0, [r7] - adds r1, 0x1 - adds r0, r1 - ldrb r0, [r0] - b _08036C00 - .pool -_08036BC0: - movs r0, 0xAF - bl ItemIdToBerryType - lsls r0, 24 - lsrs r0, 24 - bl GetBerryInfo - adds r3, r0, 0 - movs r2, 0 - movs r0, 0xC6 - lsls r0, 1 - adds r5, r0 -_08036BD8: - adds r0, r4, r2 - adds r1, r3, r2 - ldrb r1, [r1] - strb r1, [r0] - adds r2, 0x1 - cmp r2, 0x5 - ble _08036BD8 - adds r1, r4, r2 - movs r0, 0xFF - strb r0, [r1] - adds r0, r5, 0 - movs r2, 0 - adds r1, r0, 0 - adds r1, 0x11 -_08036BF4: - strb r2, [r1] - subs r1, 0x1 - cmp r1, r0 - bge _08036BF4 - movs r0, 0 - strb r0, [r4, 0x7] -_08036C00: - strb r0, [r4, 0x1A] - pop {r4-r7} - pop {r0} - bx r0 - thumb_func_end sub_8036B44 - - thumb_func_start berry_801017C -berry_801017C: @ 8036C08 - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - ldr r0, =gBattleTypeFlags - ldr r1, [r0] - movs r0, 0x2 - ands r0, r1 - cmp r0, 0 - beq _08036C20 - b _08036D4C -_08036C20: - bl IsEnigmaBerryValid - cmp r0, 0x1 - bne _08036CDC - movs r5, 0 - ldr r3, =gEnigmaBerries - ldr r0, =gSaveBlock1Ptr - mov r8, r0 - adds r6, r3, 0 - mov r4, r8 - ldr r2, =0x000031f8 - adds r7, r3, 0 - adds r7, 0x38 -_08036C3A: - adds r1, r5, r6 - ldr r0, [r4] - adds r0, r2 - adds r0, r5 - ldrb r0, [r0] - strb r0, [r1] - adds r1, r5, r7 - ldr r0, [r4] - adds r0, r2 - adds r0, r5 - ldrb r0, [r0] - strb r0, [r1] - adds r5, 0x1 - cmp r5, 0x5 - ble _08036C3A - adds r1, r5, r3 - movs r0, 0xFF - strb r0, [r1] - adds r0, r3, 0 - adds r0, 0x38 - adds r0, r5, r0 - movs r1, 0x1 - negs r1, r1 - strb r1, [r0] - movs r5, 0 - adds r7, r3, 0 - adds r7, 0x8 - ldr r4, =gSaveBlock1Ptr - ldr r2, =0x00003214 - adds r6, r3, 0 - adds r6, 0x40 -_08036C78: - adds r1, r5, r7 - ldr r0, [r4] - adds r0, r2 - adds r0, r5 - ldrb r0, [r0] - strb r0, [r1] - adds r1, r5, r6 - ldr r0, [r4] - adds r0, r2 - adds r0, r5 - ldrb r0, [r0] - strb r0, [r1] - adds r5, 0x1 - cmp r5, 0x11 - ble _08036C78 - mov r1, r8 - ldr r0, [r1] - ldr r2, =0x00003226 - adds r0, r2 - ldrb r1, [r0] - strb r1, [r3, 0x7] - ldrb r0, [r0] - adds r1, r3, 0 - adds r1, 0x3F - strb r0, [r1] - mov r4, r8 - ldr r0, [r4] - ldr r1, =0x00003227 - adds r0, r1 - ldrb r1, [r0] - strb r1, [r3, 0x1A] - ldrb r1, [r0] - adds r0, r3, 0 - adds r0, 0x52 - strb r1, [r0] - b _08036EA0 - .pool -_08036CDC: - movs r0, 0xAF - bl ItemIdToBerryType - lsls r0, 24 - lsrs r0, 24 - bl GetBerryInfo - adds r6, r0, 0 - movs r5, 0 - ldr r4, =gEnigmaBerries - adds r7, r4, 0 - adds r7, 0x38 - adds r3, r4, 0 -_08036CF6: - adds r1, r5, r4 - adds r2, r6, r5 - ldrb r0, [r2] - strb r0, [r1] - adds r1, r5, r7 - ldrb r0, [r2] - strb r0, [r1] - adds r5, 0x1 - cmp r5, 0x5 - ble _08036CF6 - adds r1, r5, r3 - movs r0, 0xFF - strb r0, [r1] - adds r0, r3, 0 - adds r0, 0x38 - adds r0, r5, r0 - movs r1, 0x1 - negs r1, r1 - strb r1, [r0] - movs r5, 0 - adds r4, r3, 0 - adds r4, 0x8 - movs r1, 0 - adds r2, r3, 0 - adds r2, 0x40 -_08036D28: - adds r0, r5, r4 - strb r1, [r0] - adds r0, r5, r2 - strb r1, [r0] - adds r5, 0x1 - cmp r5, 0x11 - ble _08036D28 - movs r1, 0 - strb r1, [r3, 0x7] - adds r0, r3, 0 - adds r0, 0x3F - strb r1, [r0] - strb r1, [r3, 0x1A] - adds r0, 0x13 - strb r1, [r0] - b _08036EA0 - .pool -_08036D4C: - movs r0, 0x40 - ands r0, r1 - cmp r0, 0 - beq _08036DF0 - movs r0, 0x80 - lsls r0, 1 - ands r1, r0 - movs r2, 0x4 - mov r8, r2 - cmp r1, 0 - beq _08036D66 - movs r4, 0x2 - mov r8, r4 -_08036D66: - movs r5, 0 - cmp r5, r8 - blt _08036D6E - b _08036EA0 -_08036D6E: - ldr r0, =gLinkPlayers - mov r12, r0 - ldr r3, =gEnigmaBerries - adds r6, r3, 0 - movs r1, 0x8 - adds r1, r6 - mov r9, r1 -_08036D7C: - lsls r1, r5, 8 - ldr r0, =gUnknown_020223C8 - adds r7, r1, r0 - lsls r0, r5, 3 - subs r0, r5 - lsls r0, 2 - add r0, r12 - ldrb r3, [r0, 0x18] - movs r4, 0 - adds r5, 0x1 - mov r10, r5 - lsls r1, r3, 3 - subs r0, r1, r3 - adds r5, r1, 0 - lsls r0, 2 - adds r1, r0, r6 -_08036D9C: - adds r0, r7, r4 - ldrb r0, [r0] - strb r0, [r1] - adds r1, 0x1 - adds r4, 0x1 - cmp r4, 0x5 - ble _08036D9C - subs r0, r5, r3 - lsls r0, 2 - adds r1, r4, r0 - adds r1, r6 - movs r2, 0xFF - strb r2, [r1] - movs r4, 0 - mov r2, r9 - adds r1, r0, r2 - adds r2, r7, 0 - adds r2, 0x8 -_08036DC0: - adds r0, r2, r4 - ldrb r0, [r0] - strb r0, [r1] - adds r1, 0x1 - adds r4, 0x1 - cmp r4, 0x11 - ble _08036DC0 - subs r0, r5, r3 - lsls r0, 2 - adds r0, r6 - ldrb r1, [r7, 0x7] - strb r1, [r0, 0x7] - ldrb r1, [r7, 0x1A] - strb r1, [r0, 0x1A] - mov r5, r10 - cmp r5, r8 - blt _08036D7C - b _08036EA0 - .pool -_08036DF0: - movs r5, 0 - ldr r4, =gEnigmaBerries - mov r9, r4 -_08036DF6: - lsls r0, r5, 8 - ldr r1, =gUnknown_020223C8 - adds r7, r0, r1 - movs r4, 0 - adds r2, r5, 0x1 - mov r10, r2 - lsls r0, r5, 3 - mov r8, r0 - adds r1, r5, 0x2 - mov r12, r1 - subs r1, r0, r5 - mov r2, r12 - lsls r0, r2, 3 - subs r0, r2 - lsls r0, 2 - mov r2, r9 - adds r3, r0, r2 - lsls r1, 2 - adds r2, r1, r2 -_08036E1C: - adds r0, r7, r4 - ldrb r1, [r0] - strb r1, [r2] - ldrb r0, [r0] - strb r0, [r3] - adds r3, 0x1 - adds r2, 0x1 - adds r4, 0x1 - cmp r4, 0x5 - ble _08036E1C - mov r0, r8 - subs r3, r0, r5 - lsls r3, 2 - adds r1, r4, r3 - add r1, r9 - ldrb r0, [r1] - movs r2, 0xFF - orrs r0, r2 - strb r0, [r1] - mov r0, r12 - lsls r2, r0, 3 - subs r2, r0 - lsls r2, 2 - adds r1, r4, r2 - add r1, r9 - ldrb r0, [r1] - movs r4, 0xFF - orrs r0, r4 - strb r0, [r1] - movs r4, 0 - ldr r0, =gEnigmaBerries - adds r0, 0x8 - adds r2, r0 - adds r3, r0 - adds r6, r7, 0 - adds r6, 0x8 -_08036E64: - adds r0, r6, r4 - ldrb r1, [r0] - strb r1, [r3] - ldrb r0, [r0] - strb r0, [r2] - adds r2, 0x1 - adds r3, 0x1 - adds r4, 0x1 - cmp r4, 0x11 - ble _08036E64 - mov r0, r8 - subs r2, r0, r5 - lsls r2, 2 - add r2, r9 - ldrb r0, [r7, 0x7] - strb r0, [r2, 0x7] - mov r1, r12 - lsls r0, r1, 3 - subs r0, r1 - lsls r0, 2 - add r0, r9 - ldrb r1, [r7, 0x7] - strb r1, [r0, 0x7] - ldrb r1, [r7, 0x1A] - strb r1, [r2, 0x1A] - ldrb r1, [r7, 0x1A] - strb r1, [r0, 0x1A] - mov r5, r10 - cmp r5, 0x1 - ble _08036DF6 -_08036EA0: - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end berry_801017C - - thumb_func_start sub_8036EB8 -sub_8036EB8: @ 8036EB8 - push {r4-r7,lr} - mov r7, r8 - push {r7} - lsls r0, 24 - lsrs r4, r0, 24 - lsls r1, 24 - lsrs r3, r1, 24 - movs r6, 0 - ldr r0, =gUnknown_020223C4 - ldrh r2, [r0] - movs r1, 0x80 - lsls r1, 1 - mov r12, r0 - cmp r2, r1 - bne _08036EFC - cmp r3, 0 - bne _08036EEC - ldr r0, =gBattleTypeFlags - ldr r1, [r0] - movs r2, 0xC - b _08036EF2 - .pool -_08036EEC: - ldr r0, =gBattleTypeFlags - ldr r1, [r0] - movs r2, 0x8 -_08036EF2: - orrs r1, r2 - str r1, [r0] - adds r0, r6, 0x1 - lsls r0, 24 - lsrs r6, r0, 24 -_08036EFC: - cmp r6, 0 - bne _08036FA0 - movs r2, 0 - cmp r2, r4 - bge _08036F20 - ldr r1, =gUnknown_020223C4 - mov r8, r1 - movs r5, 0x80 - lsls r5, 1 -_08036F0E: - adds r1, r5 - adds r2, 0x1 - cmp r2, r4 - bge _08036F20 - mov r7, r8 - ldrh r0, [r7] - ldrh r7, [r1] - cmp r0, r7 - beq _08036F0E -_08036F20: - cmp r2, r4 - bne _08036F48 - cmp r3, 0 - bne _08036F38 - ldr r0, =gBattleTypeFlags - ldr r1, [r0] - movs r2, 0xC - b _08036F3E - .pool -_08036F38: - ldr r0, =gBattleTypeFlags - ldr r1, [r0] - movs r2, 0x8 -_08036F3E: - orrs r1, r2 - str r1, [r0] - adds r0, r6, 0x1 - lsls r0, 24 - lsrs r6, r0, 24 -_08036F48: - cmp r6, 0 - bne _08036FA0 - movs r2, 0 - ldr r5, =gBattleTypeFlags - cmp r2, r4 - bge _08036F8A - mov r0, r12 - ldrh r1, [r0] - movs r0, 0xC0 - lsls r0, 2 - cmp r1, r0 - beq _08036F82 -_08036F60: - lsls r0, r2, 8 - add r0, r12 - ldrh r0, [r0] - movs r1, 0xC0 - lsls r1, 2 - cmp r0, r1 - bls _08036F72 - cmp r2, r3 - bne _08036F8A -_08036F72: - adds r2, 0x1 - cmp r2, r4 - bge _08036F8A - lsls r0, r2, 8 - add r0, r12 - ldrh r0, [r0] - cmp r0, r1 - bne _08036F60 -_08036F82: - cmp r2, r3 - beq _08036F60 - cmp r2, r3 - bge _08036F60 -_08036F8A: - cmp r2, r4 - bne _08036F98 - ldr r0, [r5] - movs r1, 0xC - b _08036F9C - .pool -_08036F98: - ldr r0, [r5] - movs r1, 0x8 -_08036F9C: - orrs r0, r1 - str r0, [r5] -_08036FA0: - pop {r3} - mov r8, r3 - pop {r4-r7} - pop {r0} - bx r0 - thumb_func_end sub_8036EB8 - - thumb_func_start sub_8036FAC -sub_8036FAC: @ 8036FAC - push {r4-r6,lr} - bl RunTasks - bl AnimateSprites - bl BuildOamBuffer - bl GetMultiplayerId - lsls r0, 24 - lsrs r6, r0, 24 - ldr r0, =gBattleScripting - adds r0, 0x25 - strb r6, [r0] - movs r0, 0x1 - adds r5, r6, 0 - eors r5, r0 - ldr r0, =gBattleCommunication - ldrb r0, [r0] - cmp r0, 0x12 - bls _08036FD8 - b _0803744C -_08036FD8: - lsls r0, 2 - ldr r1, =_08036FF0 - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .pool - .align 2, 0 -_08036FF0: - .4byte _0803703C - .4byte _08037080 - .4byte _08037144 - .4byte _080371D8 - .4byte _08037200 - .4byte _0803742C - .4byte _08037438 - .4byte _08037230 - .4byte _08037258 - .4byte _0803742C - .4byte _08037438 - .4byte _08037288 - .4byte _080372B0 - .4byte _0803742C - .4byte _08037438 - .4byte _08037318 - .4byte _08037378 - .4byte _080373A0 - .4byte _080373E0 -_0803703C: - bl IsDma3ManagerBusyWithBgCopy - lsls r0, 24 - cmp r0, 0 - bne _08037068 - movs r0, 0 - bl ShowBg - movs r0, 0x1 - bl ShowBg - movs r0, 0x2 - bl ShowBg - movs r0, 0x3 - bl ShowBg - bl sub_805EF14 - ldr r1, =gBattleCommunication - movs r0, 0x1 - strb r0, [r1] -_08037068: - ldr r0, =gLinkVSyncDisabled - ldrb r0, [r0] - cmp r0, 0 - bne _08037072 - b _0803744C -_08037072: - bl sub_800E0E8 - b _0803744C - .pool -_08037080: - ldr r2, =gBattleTypeFlags - ldr r1, [r2] - movs r6, 0x2 - adds r0, r1, 0 - ands r0, r6 - cmp r0, 0 - beq _08037124 - ldr r0, =gUnknown_03003124 - ldrb r0, [r0] - cmp r0, 0 - bne _08037098 - b _0803744C -_08037098: - bl sub_800A520 - lsls r0, 24 - cmp r0, 0 - beq _080370EE - ldr r4, =gBattleStruct - ldr r0, [r4] - movs r5, 0xC0 - lsls r5, 1 - adds r0, r5 - movs r1, 0 - strb r1, [r0] - ldr r0, [r4] - ldr r2, =0x00000181 - adds r1, r0, r2 - movs r0, 0x3 - strb r0, [r1] - bl sub_8036A5C - bl sub_8036B44 - ldr r0, =gTrainerBattleOpponent_A - ldrh r1, [r0] - movs r0, 0xC0 - lsls r0, 4 - cmp r1, r0 - bne _080370D8 - ldr r0, =gLinkPlayers - movs r1, 0 - strh r1, [r0, 0x18] - movs r1, 0x1 - strh r1, [r0, 0x34] -_080370D8: - bl bitmask_all_link_players_but_self - lsls r0, 24 - lsrs r0, 24 - ldr r1, [r4] - adds r1, r5 - movs r2, 0x20 - bl link_0800A448 - ldr r0, =gBattleCommunication - strb r6, [r0] -_080370EE: - ldr r0, =gLinkVSyncDisabled - ldrb r0, [r0] - cmp r0, 0 - bne _080370F8 - b _0803744C -_080370F8: - movs r0, 0 - movs r1, 0 - bl sub_800DFB4 - b _0803744C - .pool -_08037124: - movs r0, 0x80 - lsls r0, 17 - ands r0, r1 - cmp r0, 0 - bne _08037134 - movs r0, 0x4 - orrs r1, r0 - str r1, [r2] -_08037134: - ldr r1, =gBattleCommunication - movs r0, 0xF - strb r0, [r1] - bl berry_801017C - b _0803744C - .pool -_08037144: - bl sub_800A550 - movs r1, 0x3 - ands r1, r0 - cmp r1, 0x3 - beq _08037152 - b _0803744C -_08037152: - bl sub_800A5B4 - movs r0, 0x2 - adds r1, r6, 0 - bl sub_8036EB8 - bl berry_801017C - ldr r0, =task00_0800F6FC - movs r1, 0 - bl CreateTask - lsls r0, 24 - lsrs r0, 24 - ldr r1, =gTasks - lsls r2, r0, 2 - adds r2, r0 - lsls r2, 3 - adds r2, r1 - movs r1, 0 - movs r0, 0x87 - lsls r0, 1 - strh r0, [r2, 0xA] - movs r0, 0x5A - strh r0, [r2, 0xC] - strh r1, [r2, 0x12] - ldr r0, =gBattleStruct - ldr r3, [r0] - movs r4, 0xC1 - lsls r4, 1 - adds r0, r3, r4 - ldrb r1, [r0] - adds r4, 0x1 - adds r0, r3, r4 - ldrb r0, [r0] - lsls r0, 8 - orrs r1, r0 - strh r1, [r2, 0xE] - ldr r1, =gUnknown_020223C4 - lsls r4, r5, 8 - adds r1, 0x2 - adds r4, r1 - ldrh r0, [r4] - strh r0, [r2, 0x10] - lsls r0, r6, 8 - adds r0, r1 - ldrh r0, [r0] - bl sub_8185F90 - ldrh r0, [r4] - bl sub_8185F90 - bl sub_8068AA4 - ldr r1, =gBattleCommunication - b _08037446 - .pool -_080371D8: - bl sub_800A520 - lsls r0, 24 - cmp r0, 0 - bne _080371E4 - b _0803744C -_080371E4: - bl bitmask_all_link_players_but_self - lsls r0, 24 - lsrs r0, 24 - ldr r1, =gPlayerParty - movs r2, 0xC8 - bl link_0800A448 - ldr r1, =gBattleCommunication - b _08037446 - .pool -_08037200: - bl sub_800A550 - movs r1, 0x3 - ands r1, r0 - cmp r1, 0x3 - beq _0803720E - b _0803744C -_0803720E: - bl sub_800A5B4 - ldr r0, =gEnemyParty - lsls r1, r5, 8 - ldr r2, =gUnknown_020223C4 - adds r1, r2 - movs r2, 0xC8 - bl memcpy - ldr r1, =gBattleCommunication - b _08037446 - .pool -_08037230: - bl sub_800A520 - lsls r0, 24 - cmp r0, 0 - bne _0803723C - b _0803744C -_0803723C: - bl bitmask_all_link_players_but_self - lsls r0, 24 - lsrs r0, 24 - ldr r1, =gPlayerParty + 200 - movs r2, 0xC8 - bl link_0800A448 - ldr r1, =gBattleCommunication - b _08037446 - .pool -_08037258: - bl sub_800A550 - movs r1, 0x3 - ands r1, r0 - cmp r1, 0x3 - beq _08037266 - b _0803744C -_08037266: - bl sub_800A5B4 - ldr r0, =gEnemyParty + 200 - lsls r1, r5, 8 - ldr r2, =gUnknown_020223C4 - adds r1, r2 - movs r2, 0xC8 - bl memcpy - ldr r1, =gBattleCommunication - b _08037446 - .pool -_08037288: - bl sub_800A520 - lsls r0, 24 - cmp r0, 0 - bne _08037294 - b _0803744C -_08037294: - bl bitmask_all_link_players_but_self - lsls r0, 24 - lsrs r0, 24 - ldr r1, =gPlayerParty + 400 - movs r2, 0xC8 - bl link_0800A448 - ldr r1, =gBattleCommunication - b _08037446 - .pool -_080372B0: - bl sub_800A550 - movs r1, 0x3 - ands r1, r0 - cmp r1, 0x3 - beq _080372BE - b _0803744C -_080372BE: - bl sub_800A5B4 - ldr r4, =gEnemyParty + 400 - lsls r1, r5, 8 - ldr r0, =gUnknown_020223C4 - adds r1, r0 - adds r0, r4, 0 - movs r2, 0xC8 - bl memcpy - ldr r1, =0xfffffe70 - adds r0, r4, r1 - bl shedinja_something - ldr r2, =0xfffffed4 - adds r0, r4, r2 - bl shedinja_something - adds r0, r4, 0 - subs r0, 0xC8 - bl shedinja_something - adds r0, r4, 0 - subs r0, 0x64 - bl shedinja_something - adds r0, r4, 0 - bl shedinja_something - adds r0, r4, 0 - adds r0, 0x64 - bl shedinja_something - ldr r1, =gBattleCommunication - b _08037446 - .pool -_08037318: - bl sub_8032768 - bl sub_8184E58 - ldr r2, =gBattleCommunication - movs r0, 0 - strb r0, [r2, 0x1] - strb r0, [r2, 0x2] - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - movs r1, 0x2 - ands r0, r1 - cmp r0, 0 - beq _08037372 - movs r3, 0 - ldr r1, =gLinkPlayers - ldrb r0, [r1] - adds r5, r2, 0 - cmp r0, 0x3 - bne _08037356 - movs r4, 0xFF - adds r2, r1, 0 -_08037344: - adds r2, 0x1C - adds r3, 0x1 - cmp r3, 0x1 - bgt _08037356 - ldrh r1, [r2] - adds r0, r4, 0 - ands r0, r1 - cmp r0, 0x3 - beq _08037344 -_08037356: - cmp r3, 0x2 - bne _0803736C - movs r0, 0x10 - strb r0, [r5] - b _0803744C - .pool -_0803736C: - movs r0, 0x12 - strb r0, [r5] - b _0803744C -_08037372: - movs r0, 0x12 - strb r0, [r2] - b _0803744C -_08037378: - bl sub_800A520 - lsls r0, 24 - cmp r0, 0 - beq _0803744C - bl bitmask_all_link_players_but_self - lsls r0, 24 - lsrs r0, 24 - ldr r1, =gUnknown_0203BD2C - movs r2, 0x4 - bl link_0800A448 - ldr r1, =gBattleCommunication - b _08037446 - .pool -_080373A0: - bl sub_800A550 - movs r1, 0x3 - ands r1, r0 - cmp r1, 0x3 - bne _0803744C - bl sub_800A5B4 - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - movs r1, 0x4 - ands r0, r1 - cmp r0, 0 - bne _080373CA - ldr r0, =gUnknown_0203BD2C - lsls r1, r5, 8 - ldr r2, =gUnknown_020223C4 - adds r1, r2 - movs r2, 0x4 - bl memcpy -_080373CA: - ldr r1, =gBattleCommunication - b _08037446 - .pool -_080373E0: - ldr r0, =gUnknown_02024333 - adds r1, r0, 0x1 - bl battle_load_something - lsls r0, 24 - cmp r0, 0 - beq _0803744C - ldr r2, =gUnknown_03005D00 - ldr r1, =gMain - ldr r0, [r1] - str r0, [r2] - ldr r0, =sub_8039EF0 - str r0, [r1] - ldr r0, =BattleMainCB2 - bl SetMainCallback2 - ldr r2, =gBattleTypeFlags - ldr r1, [r2] - movs r0, 0x2 - ands r0, r1 - cmp r0, 0 - beq _0803744C - movs r0, 0x20 - orrs r1, r0 - str r1, [r2] - b _0803744C - .pool -_0803742C: - ldr r0, =gBattleCommunication - ldrb r1, [r0] - adds r1, 0x1 - strb r1, [r0] - movs r1, 0x1 - strb r1, [r0, 0x1] -_08037438: - ldr r1, =gBattleCommunication - ldrb r0, [r1, 0x1] - subs r0, 0x1 - strb r0, [r1, 0x1] - lsls r0, 24 - cmp r0, 0 - bne _0803744C -_08037446: - ldrb r0, [r1] - adds r0, 0x1 - strb r0, [r1] -_0803744C: - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8036FAC - - thumb_func_start sub_8037458 -sub_8037458: @ 8037458 - push {r4-r7,lr} - sub sp, 0x4 - bl RunTasks - bl AnimateSprites - bl BuildOamBuffer - bl GetMultiplayerId - lsls r0, 24 - lsrs r6, r0, 24 - ldr r0, =gBattleScripting - adds r0, 0x25 - strb r6, [r0] - movs r0, 0x1 - adds r7, r6, 0 - eors r7, r0 - ldr r0, =gBattleCommunication - ldrb r0, [r0] - cmp r0, 0x10 - bls _08037486 - b _080379D6 -_08037486: - lsls r0, 2 - ldr r1, =_0803749C - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .pool - .align 2, 0 -_0803749C: - .4byte _080374E0 - .4byte _08037518 - .4byte _0803761C - .4byte _08037670 - .4byte _08037694 - .4byte _08037710 - .4byte _08037734 - .4byte _080377B0 - .4byte _080377CC - .4byte _080377FC - .4byte _08037818 - .4byte _08037848 - .4byte _08037864 - .4byte _08037908 - .4byte _0803793A - .4byte _0803795C - .4byte _080379A0 -_080374E0: - bl IsDma3ManagerBusyWithBgCopy - lsls r0, 24 - cmp r0, 0 - bne _0803750C - movs r0, 0 - bl ShowBg - movs r0, 0x1 - bl ShowBg - movs r0, 0x2 - bl ShowBg - movs r0, 0x3 - bl ShowBg - bl sub_805EF14 - ldr r1, =gBattleCommunication - movs r0, 0x1 - strb r0, [r1] -_0803750C: - ldr r0, =gLinkVSyncDisabled - ldrb r0, [r0] - cmp r0, 0 - beq _08037518 - bl sub_800E0E8 -_08037518: - ldr r2, =gBattleTypeFlags - ldr r1, [r2] - movs r3, 0x2 - adds r0, r1, 0 - ands r0, r3 - cmp r0, 0 - beq _080375FC - ldr r0, =gUnknown_03003124 - ldrb r0, [r0] - cmp r0, 0 - bne _08037530 - b _080379D6 -_08037530: - ldr r6, =gLinkPlayers - movs r0, 0 - strh r0, [r6, 0x18] - strh r3, [r6, 0x34] - adds r1, r6, 0 - adds r1, 0x50 - movs r0, 0x1 - strh r0, [r1] - adds r1, 0x1C - movs r0, 0x3 - strh r0, [r1] - adds r0, r6, 0 - adds r0, 0x40 - ldr r4, =gTrainerBattleOpponent_A - ldrh r1, [r4] - bl GetFrontierTrainerName - adds r0, r6, 0 - adds r0, 0x5C - ldr r5, =gTrainerBattleOpponent_B - ldrh r1, [r5] - bl GetFrontierTrainerName - ldrh r1, [r4] - mov r0, sp - bl sub_8165B88 - mov r0, sp - ldrb r0, [r0] - adds r1, r6, 0 - adds r1, 0x52 - strh r0, [r1] - ldrh r1, [r5] - mov r0, sp - bl sub_8165B88 - mov r0, sp - ldrb r1, [r0] - adds r0, r6, 0 - adds r0, 0x6E - strh r1, [r0] - bl sub_800A520 - lsls r0, 24 - cmp r0, 0 - beq _080375C4 - ldr r4, =gBattleStruct - ldr r0, [r4] - movs r5, 0xC0 - lsls r5, 1 - adds r0, r5 - movs r1, 0 - strb r1, [r0] - ldr r0, [r4] - ldr r2, =0x00000181 - adds r1, r0, r2 - movs r0, 0x3 - strb r0, [r1] - bl sub_8036A5C - bl sub_8036B44 - bl bitmask_all_link_players_but_self - lsls r0, 24 - lsrs r0, 24 - ldr r1, [r4] - adds r1, r5 - movs r2, 0x20 - bl link_0800A448 - ldr r1, =gBattleCommunication - movs r0, 0x2 - strb r0, [r1] -_080375C4: - ldr r0, =gLinkVSyncDisabled - ldrb r0, [r0] - cmp r0, 0 - bne _080375CE - b _080379D6 -_080375CE: - movs r0, 0 - movs r1, 0 - bl sub_800DFB4 - b _080379D6 - .pool -_080375FC: - movs r0, 0x80 - lsls r0, 17 - ands r0, r1 - cmp r0, 0 - bne _0803760C - movs r0, 0x4 - orrs r1, r0 - str r1, [r2] -_0803760C: - ldr r1, =gBattleCommunication - movs r0, 0xD - strb r0, [r1] - bl berry_801017C - b _080379D6 - .pool -_0803761C: - bl sub_800A550 - movs r1, 0x3 - ands r1, r0 - cmp r1, 0x3 - beq _0803762A - b _080379D6 -_0803762A: - bl sub_800A5B4 - movs r0, 0x2 - adds r1, r6, 0 - bl sub_8036EB8 - bl berry_801017C - ldr r0, =task00_0800F6FC - movs r1, 0 - bl CreateTask - lsls r0, 24 - lsrs r0, 24 - ldr r2, =gTasks - lsls r1, r0, 2 - adds r1, r0 - lsls r1, 3 - adds r1, r2 - movs r2, 0 - movs r0, 0x87 - lsls r0, 1 - strh r0, [r1, 0xA] - movs r0, 0x5A - strh r0, [r1, 0xC] - strh r2, [r1, 0x12] - adds r0, 0xEB - strh r0, [r1, 0xE] - strh r0, [r1, 0x10] - b _08037986 - .pool -_08037670: - bl sub_800A520 - lsls r0, 24 - cmp r0, 0 - bne _0803767C - b _080379D6 -_0803767C: - bl bitmask_all_link_players_but_self - lsls r0, 24 - lsrs r0, 24 - ldr r1, =gPlayerParty -_08037686: - movs r2, 0xC8 - bl link_0800A448 - b _08037986 - .pool -_08037694: - bl sub_800A550 - movs r1, 0x3 - ands r1, r0 - cmp r1, 0x3 - beq _080376A2 - b _080379D6 -_080376A2: - bl sub_800A5B4 - ldr r0, =gLinkPlayers - lsls r1, r6, 3 - subs r1, r6 - lsls r1, 2 - adds r1, r0 - ldrh r0, [r1, 0x18] - cmp r0, 0 - beq _080376E8 - ldr r4, =gPlayerParty - lsls r1, r7, 8 - ldr r5, =gUnknown_020223C4 - adds r1, r5 - adds r0, r4, 0 - movs r2, 0xC8 - bl memcpy - movs r0, 0x96 - lsls r0, 1 - adds r4, r0 - lsls r1, r6, 8 - adds r1, r5 - adds r0, r4, 0 - movs r2, 0xC8 - bl memcpy - b _08037986 - .pool -_080376E8: - ldr r4, =gPlayerParty - lsls r1, r6, 8 - ldr r5, =gUnknown_020223C4 - adds r1, r5 - adds r0, r4, 0 - movs r2, 0xC8 - bl memcpy - movs r1, 0x96 - lsls r1, 1 - adds r4, r1 - lsls r1, r7, 8 - adds r1, r5 - adds r0, r4, 0 - movs r2, 0xC8 - b _08037982 - .pool -_08037710: - bl sub_800A520 - lsls r0, 24 - cmp r0, 0 - bne _0803771C - b _080379D6 -_0803771C: - bl bitmask_all_link_players_but_self - lsls r0, 24 - lsrs r0, 24 - ldr r1, =gPlayerParty + 200 - movs r2, 0x64 - bl link_0800A448 - b _08037986 - .pool -_08037734: - bl sub_800A550 - movs r1, 0x3 - ands r1, r0 - cmp r1, 0x3 - beq _08037742 - b _080379D6 -_08037742: - bl sub_800A5B4 - ldr r0, =gLinkPlayers - lsls r1, r6, 3 - subs r1, r6 - lsls r1, 2 - adds r1, r0 - ldrh r0, [r1, 0x18] - cmp r0, 0 - beq _08037788 - ldr r4, =gPlayerParty + 200 - lsls r1, r7, 8 - ldr r5, =gUnknown_020223C4 - adds r1, r5 - adds r0, r4, 0 - movs r2, 0x64 - bl memcpy - movs r2, 0x96 - lsls r2, 1 - adds r4, r2 - lsls r1, r6, 8 - adds r1, r5 - adds r0, r4, 0 - movs r2, 0x64 - bl memcpy - b _08037986 - .pool -_08037788: - ldr r4, =gPlayerParty + 200 - lsls r1, r6, 8 - ldr r5, =gUnknown_020223C4 - adds r1, r5 - adds r0, r4, 0 - movs r2, 0x64 - bl memcpy - movs r0, 0x96 - lsls r0, 1 - adds r4, r0 - lsls r1, r7, 8 - adds r1, r5 - adds r0, r4, 0 - movs r2, 0x64 - b _08037982 - .pool -_080377B0: - bl sub_800A520 - lsls r0, 24 - cmp r0, 0 - bne _080377BC - b _080379D6 -_080377BC: - bl bitmask_all_link_players_but_self - lsls r0, 24 - lsrs r0, 24 - ldr r1, =gEnemyParty - b _08037686 - .pool -_080377CC: - bl sub_800A550 - movs r1, 0x3 - ands r1, r0 - cmp r1, 0x3 - beq _080377DA - b _080379D6 -_080377DA: - bl sub_800A5B4 - bl GetMultiplayerId - lsls r0, 24 - cmp r0, 0 - bne _080377EA - b _08037986 -_080377EA: - ldr r0, =gEnemyParty - ldr r1, =gUnknown_020223C4 - movs r2, 0xC8 - b _08037982 - .pool -_080377FC: - bl sub_800A520 - lsls r0, 24 - cmp r0, 0 - bne _08037808 - b _080379D6 -_08037808: - bl bitmask_all_link_players_but_self - lsls r0, 24 - lsrs r0, 24 - ldr r1, =gEnemyParty + 200 - b _08037686 - .pool -_08037818: - bl sub_800A550 - movs r1, 0x3 - ands r1, r0 - cmp r1, 0x3 - beq _08037826 - b _080379D6 -_08037826: - bl sub_800A5B4 - bl GetMultiplayerId - lsls r0, 24 - cmp r0, 0 - bne _08037836 - b _08037986 -_08037836: - ldr r0, =gEnemyParty + 200 - ldr r1, =gUnknown_020223C4 - movs r2, 0xC8 - b _08037982 - .pool -_08037848: - bl sub_800A520 - lsls r0, 24 - cmp r0, 0 - bne _08037854 - b _080379D6 -_08037854: - bl bitmask_all_link_players_but_self - lsls r0, 24 - lsrs r0, 24 - ldr r1, =gEnemyParty + 400 - b _08037686 - .pool -_08037864: - bl sub_800A550 - movs r1, 0x3 - ands r1, r0 - cmp r1, 0x3 - beq _08037872 - b _080379D6 -_08037872: - bl sub_800A5B4 - bl GetMultiplayerId - lsls r0, 24 - cmp r0, 0 - beq _0803788A - ldr r0, =gEnemyParty + 400 - ldr r1, =gUnknown_020223C4 - movs r2, 0xC8 - bl memcpy -_0803788A: - ldr r4, =gPlayerParty - adds r0, r4, 0 - bl shedinja_something - adds r0, r4, 0 - adds r0, 0x64 - bl shedinja_something - adds r0, r4, 0 - adds r0, 0xC8 - bl shedinja_something - movs r1, 0x96 - lsls r1, 1 - adds r0, r4, r1 - bl shedinja_something - movs r2, 0xC8 - lsls r2, 1 - adds r0, r4, r2 - bl shedinja_something - movs r1, 0xFA - lsls r1, 1 - adds r0, r4, r1 - bl shedinja_something - ldr r4, =gEnemyParty - adds r0, r4, 0 - bl shedinja_something - adds r0, r4, 0 - adds r0, 0x64 - bl shedinja_something - adds r0, r4, 0 - adds r0, 0xC8 - bl shedinja_something - movs r2, 0x96 - lsls r2, 1 - adds r0, r4, r2 - bl shedinja_something - movs r1, 0xC8 - lsls r1, 1 - adds r0, r4, r1 - bl shedinja_something - movs r2, 0xFA - lsls r2, 1 - adds r0, r4, r2 - bl shedinja_something - b _08037986 - .pool -_08037908: - bl sub_8032768 - bl sub_8184E58 - ldr r2, =gBattleCommunication - movs r0, 0 - strb r0, [r2, 0x1] - strb r0, [r2, 0x2] - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - movs r1, 0x2 - ands r0, r1 - cmp r0, 0 - beq _08037934 - movs r0, 0xE - strb r0, [r2] - b _080379D6 - .pool -_08037934: - movs r0, 0x10 - strb r0, [r2] - b _080379D6 -_0803793A: - bl sub_800A520 - lsls r0, 24 - cmp r0, 0 - beq _080379D6 - bl bitmask_all_link_players_but_self - lsls r0, 24 - lsrs r0, 24 - ldr r1, =gUnknown_0203BD2C - movs r2, 0x4 - bl link_0800A448 - b _08037986 - .pool -_0803795C: - bl sub_800A550 - movs r1, 0x3 - ands r1, r0 - cmp r1, 0x3 - bne _080379D6 - bl sub_800A5B4 - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - movs r1, 0x4 - ands r0, r1 - cmp r0, 0 - bne _08037986 - ldr r0, =gUnknown_0203BD2C - lsls r1, r7, 8 - ldr r2, =gUnknown_020223C4 - adds r1, r2 - movs r2, 0x4 -_08037982: - bl memcpy -_08037986: - ldr r1, =gBattleCommunication - ldrb r0, [r1] - adds r0, 0x1 - strb r0, [r1] - b _080379D6 - .pool -_080379A0: - ldr r0, =gUnknown_02024333 - adds r1, r0, 0x1 - bl battle_load_something - lsls r0, 24 - cmp r0, 0 - beq _080379D6 - bl sub_8166188 - ldr r2, =gUnknown_03005D00 - ldr r1, =gMain - ldr r0, [r1] - str r0, [r2] - ldr r0, =sub_8039EF0 - str r0, [r1] - ldr r0, =BattleMainCB2 - bl SetMainCallback2 - ldr r2, =gBattleTypeFlags - ldr r1, [r2] - movs r0, 0x2 - ands r0, r1 - cmp r0, 0 - beq _080379D6 - movs r0, 0x20 - orrs r1, r0 - str r1, [r2] -_080379D6: - add sp, 0x4 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8037458 - - thumb_func_start sub_80379F8 -sub_80379F8: @ 80379F8 - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - sub sp, 0x4 - lsls r0, 24 - lsrs r0, 24 - str r0, [sp] - movs r0, 0 - mov r8, r0 - ldr r6, =gUnknown_02022FF8 - mov r10, r6 -_08037A12: - ldr r1, [sp] - add r1, r8 - movs r0, 0x64 - adds r4, r1, 0 - muls r4, r0 - ldr r0, =gPlayerParty - adds r4, r0 - adds r0, r4, 0 - movs r1, 0xB - bl GetMonData - mov r1, r8 - lsls r5, r1, 5 - strh r0, [r6] - adds r0, r4, 0 - movs r1, 0xC - bl GetMonData - strh r0, [r6, 0x2] - movs r0, 0x4 - add r0, r10 - mov r9, r0 - adds r7, r5, r0 - adds r0, r4, 0 - movs r1, 0x2 - adds r2, r7, 0 - bl GetMonData - adds r0, r4, 0 - movs r1, 0x38 - bl GetMonData - strb r0, [r6, 0xF] - adds r0, r4, 0 - movs r1, 0x39 - bl GetMonData - strh r0, [r6, 0x10] - adds r0, r4, 0 - movs r1, 0x3A - bl GetMonData - strh r0, [r6, 0x12] - adds r0, r4, 0 - movs r1, 0x37 - bl GetMonData - mov r1, r10 - adds r1, 0x14 - adds r5, r1 - str r0, [r5] - adds r0, r4, 0 - movs r1, 0 - bl GetMonData - str r0, [r6, 0x18] - adds r0, r4, 0 - bl GetMonGender - strb r0, [r6, 0x1C] - adds r0, r7, 0 - bl StripExtCtrlCodes - adds r0, r4, 0 - movs r1, 0x3 - bl GetMonData - cmp r0, 0x1 - beq _08037AA4 - adds r0, r7, 0 - movs r1, 0 - bl sub_81DB4DC -_08037AA4: - adds r6, 0x20 - movs r1, 0x1 - add r8, r1 - mov r0, r8 - cmp r0, 0x2 - ble _08037A12 - ldr r0, =gUnknown_02023058 - ldr r0, [r0] - mov r1, r9 - subs r1, 0x4 - movs r2, 0x60 - bl memcpy - add sp, 0x4 - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end sub_80379F8 - - thumb_func_start sub_8037ADC -sub_8037ADC: @ 8037ADC - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - sub sp, 0x4 - movs r0, 0x4 - mov r9, r0 - movs r4, 0xF - ldr r6, =gBattleTypeFlags - ldr r0, [r6] - movs r1, 0x80 - lsls r1, 1 - ands r0, r1 - cmp r0, 0 - beq _08037B02 - movs r1, 0x2 - mov r9, r1 - movs r4, 0x3 -_08037B02: - bl GetMultiplayerId - lsls r0, 24 - lsrs r7, r0, 24 - ldr r0, =gBattleScripting - adds r0, 0x25 - movs r2, 0 - mov r8, r2 - strb r7, [r0] - ldr r0, =gBattleStruct - ldr r0, [r0] - adds r1, r0, 0 - adds r1, 0xB4 - str r1, [sp] - adds r0, 0xAC - mov r10, r0 - bl RunTasks - bl AnimateSprites - bl BuildOamBuffer - ldr r5, =gBattleCommunication - ldrb r0, [r5] - cmp r0, 0x1 - beq _08037BA4 - cmp r0, 0x1 - bgt _08037B50 - cmp r0, 0 - beq _08037B5E - b _08037D0A - .pool -_08037B50: - cmp r0, 0x2 - bne _08037B56 - b _08037C64 -_08037B56: - cmp r0, 0x3 - bne _08037B5C - b _08037C9E -_08037B5C: - b _08037D0A -_08037B5E: - ldr r0, =gUnknown_03003124 - ldrb r0, [r0] - cmp r0, 0 - bne _08037B68 - b _08037D0A -_08037B68: - bl sub_800A520 - lsls r0, 24 - cmp r0, 0 - bne _08037B74 - b _08037D0A -_08037B74: - ldr r4, =gUnknown_02023058 - movs r0, 0x60 - bl Alloc - str r0, [r4] - movs r0, 0 - bl sub_80379F8 - bl bitmask_all_link_players_but_self - lsls r0, 24 - lsrs r0, 24 - ldr r1, [r4] - movs r2, 0x60 - bl link_0800A448 - ldrb r0, [r5] - adds r0, 0x1 - strb r0, [r5] - b _08037D0A - .pool -_08037BA4: - bl sub_800A550 - adds r1, r4, 0 - ands r1, r0 - cmp r1, r4 - beq _08037BB2 - b _08037D0A -_08037BB2: - bl sub_800A5B4 - movs r5, 0 - cmp r8, r9 - bge _08037C2E - lsls r0, r7, 3 - subs r0, r7 - lsls r6, r0, 2 - mov r8, r5 - ldr r4, =gUnknown_020223C4 -_08037BC6: - cmp r5, r7 - beq _08037C1E - mov r2, r9 - cmp r2, 0x4 - bne _08037C14 - ldr r2, =gLinkPlayers - mov r1, r8 - adds r0, r1, r2 - ldrh r1, [r0, 0x18] - movs r3, 0x1 - adds r0, r3, 0 - ands r0, r1 - cmp r0, 0 - bne _08037BF8 - adds r0, r6, r2 - ldrh r1, [r0, 0x18] - adds r0, r3, 0 - ands r0, r1 - cmp r0, 0 - beq _08037C04 - b _08037C1E - .pool -_08037BF8: - adds r0, r6, r2 - ldrh r1, [r0, 0x18] - adds r0, r3, 0 - ands r0, r1 - cmp r0, 0 - beq _08037C1E -_08037C04: - ldr r0, =gUnknown_02022FF8 - adds r1, r4, 0 - movs r2, 0x60 - bl memcpy - b _08037C1E - .pool -_08037C14: - ldr r0, =gUnknown_02022FF8 - adds r1, r4, 0 - movs r2, 0x60 - bl memcpy -_08037C1E: - movs r2, 0x80 - lsls r2, 1 - adds r4, r2 - movs r0, 0x1C - add r8, r0 - adds r5, 0x1 - cmp r5, r9 - blt _08037BC6 -_08037C2E: - ldr r1, =gBattleCommunication - ldrb r0, [r1] - adds r0, 0x1 - strb r0, [r1] - ldr r1, =gMain - ldr r0, [r1, 0x8] - ldr r2, [sp] - str r0, [r2] - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - mov r2, r10 - str r0, [r2] - ldr r0, =sub_8037ADC - str r0, [r1, 0x8] - bl sub_81B9150 - b _08037D0A - .pool -_08037C64: - bl sub_800A520 - lsls r0, 24 - cmp r0, 0 - beq _08037D0A - ldr r0, =gPaletteFade - ldrb r1, [r0, 0x7] - movs r0, 0x80 - ands r0, r1 - cmp r0, 0 - bne _08037D0A - ldrb r0, [r5] - adds r0, 0x1 - strb r0, [r5] - ldr r0, =gLinkVSyncDisabled - ldrb r0, [r0] - cmp r0, 0 - beq _08037C98 - bl sub_800ADF8 - b _08037D0A - .pool -_08037C98: - bl sub_800AC34 - b _08037D0A -_08037C9E: - ldr r0, =gLinkVSyncDisabled - ldrb r0, [r0] - cmp r0, 0 - beq _08037CE4 - bl sub_8010500 - lsls r0, 24 - cmp r0, 0 - beq _08037D0A - mov r1, r10 - ldr r0, [r1] - str r0, [r6] - ldr r1, =gMain - ldr r2, [sp] - ldr r0, [r2] - str r0, [r1, 0x8] - ldr r0, =InitBattle - bl SetMainCallback2 - ldr r4, =gUnknown_02023058 - ldr r0, [r4] - bl Free - mov r0, r8 - str r0, [r4] - b _08037D0A - .pool -_08037CE4: - ldr r0, =gUnknown_03003124 - ldrb r5, [r0] - cmp r5, 0 - bne _08037D0A - mov r1, r10 - ldr r0, [r1] - str r0, [r6] - ldr r1, =gMain - ldr r2, [sp] - ldr r0, [r2] - str r0, [r1, 0x8] - ldr r0, =InitBattle - bl SetMainCallback2 - ldr r4, =gUnknown_02023058 - ldr r0, [r4] - bl Free - str r5, [r4] -_08037D0A: - add sp, 0x4 - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8037ADC - - thumb_func_start intro_end -intro_end: @ 8037D2C - push {r4-r7,lr} - mov r7, r8 - push {r7} - ldr r0, =gBattleStruct - ldr r0, [r0] - movs r1, 0xB4 - adds r1, r0 - mov r8, r1 - adds r7, r0, 0 - adds r7, 0xAC - bl RunTasks - bl AnimateSprites - bl BuildOamBuffer - ldr r5, =gBattleCommunication - ldrb r0, [r5] - cmp r0, 0 - beq _08037D64 - cmp r0, 0x1 - beq _08037DA4 - b _08037DD6 - .pool -_08037D64: - ldr r4, =gUnknown_02023058 - movs r0, 0x60 - bl Alloc - str r0, [r4] - movs r0, 0x3 - bl sub_80379F8 - ldrb r0, [r5] - adds r0, 0x1 - strb r0, [r5] - ldr r1, =gMain - ldr r0, [r1, 0x8] - mov r2, r8 - str r0, [r2] - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - str r0, [r7] - ldr r0, =intro_end - str r0, [r1, 0x8] - bl sub_81B9150 - b _08037DD6 - .pool -_08037DA4: - ldr r0, =gPaletteFade - ldrb r1, [r0, 0x7] - movs r0, 0x80 - ands r0, r1 - lsls r0, 24 - lsrs r6, r0, 24 - cmp r6, 0 - bne _08037DD6 - movs r0, 0x2 - strb r0, [r5] - ldr r1, =gBattleTypeFlags - ldr r0, [r7] - str r0, [r1] - ldr r1, =gMain - mov r2, r8 - ldr r0, [r2] - str r0, [r1, 0x8] - ldr r0, =InitBattle - bl SetMainCallback2 - ldr r4, =gUnknown_02023058 - ldr r0, [r4] - bl Free - str r6, [r4] -_08037DD6: - pop {r3} - mov r8, r3 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end intro_end - - thumb_func_start sub_8037DF4 -sub_8037DF4: @ 8037DF4 - push {r4-r7,lr} - mov r7, r8 - push {r7} - sub sp, 0x4 - bl GetMultiplayerId - lsls r0, 24 - lsrs r7, r0, 24 - ldr r0, =gBattleScripting - adds r0, 0x25 - strb r7, [r0] - bl RunTasks - bl AnimateSprites - bl BuildOamBuffer - ldr r0, =gBattleCommunication - ldrb r0, [r0] - cmp r0, 0xA - bls _08037E20 - b _080383F8 -_08037E20: - lsls r0, 2 - ldr r1, =_08037E38 - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .pool - .align 2, 0 -_08037E38: - .4byte _08037E64 - .4byte _08037EA8 - .4byte _08037F50 - .4byte _08038026 - .4byte _0803804C - .4byte _08038140 - .4byte _08038164 - .4byte _080382CC - .4byte _0803832C - .4byte _0803836C - .4byte _080383BC -_08037E64: - bl IsDma3ManagerBusyWithBgCopy - lsls r0, 24 - cmp r0, 0 - bne _08037E90 - movs r0, 0 - bl ShowBg - movs r0, 0x1 - bl ShowBg - movs r0, 0x2 - bl ShowBg - movs r0, 0x3 - bl ShowBg - bl sub_805EF14 - ldr r1, =gBattleCommunication - movs r0, 0x1 - strb r0, [r1] -_08037E90: - ldr r0, =gLinkVSyncDisabled - ldrb r0, [r0] - cmp r0, 0 - bne _08037E9A - b _080383F8 -_08037E9A: - bl sub_800E0E8 - b _080383F8 - .pool -_08037EA8: - ldr r2, =gBattleTypeFlags - ldr r1, [r2] - movs r0, 0x2 - ands r0, r1 - cmp r0, 0 - beq _08037F30 - ldr r0, =gUnknown_03003124 - ldrb r0, [r0] - cmp r0, 0 - bne _08037EBE - b _080383F8 -_08037EBE: - bl sub_800A520 - lsls r0, 24 - cmp r0, 0 - beq _08037F02 - ldr r4, =gBattleStruct - ldr r0, [r4] - movs r5, 0xC0 - lsls r5, 1 - adds r0, r5 - movs r1, 0 - strb r1, [r0] - ldr r0, [r4] - ldr r2, =0x00000181 - adds r1, r0, r2 - movs r0, 0x3 - strb r0, [r1] - bl sub_8036A5C - bl sub_8036B44 - bl bitmask_all_link_players_but_self - lsls r0, 24 - lsrs r0, 24 - ldr r1, [r4] - adds r1, r5 - movs r2, 0x20 - bl link_0800A448 - ldr r1, =gBattleCommunication - ldrb r0, [r1] - adds r0, 0x1 - strb r0, [r1] -_08037F02: - ldr r0, =gLinkVSyncDisabled - ldrb r0, [r0] - cmp r0, 0 - bne _08037F0C - b _080383F8 -_08037F0C: - movs r0, 0 - movs r1, 0 - bl sub_800DFB4 - b _080383F8 - .pool -_08037F30: - movs r0, 0x80 - lsls r0, 17 - ands r0, r1 - cmp r0, 0 - bne _08037F40 - movs r0, 0x4 - orrs r1, r0 - str r1, [r2] -_08037F40: - ldr r1, =gBattleCommunication - movs r0, 0x7 - strb r0, [r1] - bl berry_801017C - b _080383F8 - .pool -_08037F50: - bl sub_800A550 - movs r1, 0xF - ands r1, r0 - cmp r1, 0xF - beq _08037F5E - b _080383F8 -_08037F5E: - bl sub_800A5B4 - movs r0, 0x4 - adds r1, r7, 0 - bl sub_8036EB8 - bl berry_801017C - bl sub_8068AA4 - ldr r0, =task00_0800F6FC - movs r1, 0 - bl CreateTask - lsls r0, 24 - lsrs r2, r0, 24 - ldr r1, =gTasks - lsls r0, r2, 2 - adds r0, r2 - lsls r0, 3 - adds r0, r1 - movs r2, 0 - movs r1, 0x87 - lsls r1, 1 - strh r1, [r0, 0xA] - movs r1, 0x5A - strh r1, [r0, 0xC] - strh r2, [r0, 0x12] - strh r2, [r0, 0xE] - strh r2, [r0, 0x10] - ldr r1, =gUnknown_020223C4 - adds r4, r0, 0 - adds r5, r1, 0x2 - movs r7, 0x3F - movs r6, 0x3 -_08037FA4: - ldrh r0, [r5] - str r2, [sp] - bl sub_8185F90 - ldr r0, =gLinkPlayers - ldr r2, [sp] - adds r0, r2, r0 - ldrh r0, [r0, 0x18] - cmp r0, 0x1 - beq _08037FE6 - cmp r0, 0x1 - bgt _08037FD4 - cmp r0, 0 - beq _08037FDE - b _0803800C - .pool -_08037FD4: - cmp r0, 0x2 - beq _08037FEE - cmp r0, 0x3 - beq _08037FFE - b _0803800C -_08037FDE: - ldrh r0, [r5] - adds r1, r7, 0 - ands r1, r0 - b _08037FF6 -_08037FE6: - ldrh r0, [r5] - adds r1, r7, 0 - ands r1, r0 - b _08038006 -_08037FEE: - ldrh r0, [r5] - adds r1, r7, 0 - ands r1, r0 - lsls r1, 6 -_08037FF6: - ldrh r0, [r4, 0xE] - orrs r1, r0 - strh r1, [r4, 0xE] - b _0803800C -_08037FFE: - ldrh r0, [r5] - adds r1, r7, 0 - ands r1, r0 - lsls r1, 6 -_08038006: - ldrh r0, [r4, 0x10] - orrs r1, r0 - strh r1, [r4, 0x10] -_0803800C: - movs r0, 0x80 - lsls r0, 1 - adds r5, r0 - adds r2, 0x1C - subs r6, 0x1 - cmp r6, 0 - bge _08037FA4 - bl ZeroEnemyPartyMons - ldr r1, =gBattleCommunication - ldrb r0, [r1] - adds r0, 0x1 - strb r0, [r1] -_08038026: - bl sub_800A520 - lsls r0, 24 - cmp r0, 0 - bne _08038032 - b _080383F8 -_08038032: - bl bitmask_all_link_players_but_self - lsls r0, 24 - lsrs r0, 24 - ldr r1, =gPlayerParty - movs r2, 0xC8 - bl link_0800A448 - b _080383A6 - .pool -_0803804C: - bl sub_800A550 - movs r1, 0xF - ands r1, r0 - cmp r1, 0xF - beq _0803805A - b _080383F8 -_0803805A: - bl sub_800A5B4 - movs r6, 0 - lsls r0, r7, 3 - subs r0, r7 - lsls r0, 2 - mov r8, r0 - ldr r4, =gUnknown_020223C4 - movs r5, 0 -_0803806C: - cmp r6, r7 - bne _080380A0 - ldr r0, =gLinkPlayers - adds r0, r5, r0 - ldrh r0, [r0, 0x18] - cmp r0, 0x2 - bgt _0803808C - cmp r0, 0x1 - bge _08038098 - cmp r0, 0 - beq _08038090 - b _0803812A - .pool -_0803808C: - cmp r0, 0x3 - bne _0803812A -_08038090: - ldr r0, =gPlayerParty - b _08038110 - .pool -_08038098: - ldr r0, =gPlayerParty + 300 - b _08038110 - .pool -_080380A0: - ldr r2, =gLinkPlayers - adds r0, r5, r2 - ldrh r1, [r0, 0x18] - movs r3, 0x1 - adds r0, r3, 0 - ands r0, r1 - cmp r0, 0 - bne _080380C4 - mov r1, r8 - adds r0, r1, r2 - ldrh r1, [r0, 0x18] - adds r0, r3, 0 - ands r0, r1 - cmp r0, 0 - beq _080380D2 - b _080380F8 - .pool -_080380C4: - mov r1, r8 - adds r0, r1, r2 - ldrh r1, [r0, 0x18] - adds r0, r3, 0 - ands r0, r1 - cmp r0, 0 - beq _080380F8 -_080380D2: - adds r0, r5, r2 - ldrh r0, [r0, 0x18] - cmp r0, 0x2 - bgt _080380E4 - cmp r0, 0x1 - bge _080380F0 - cmp r0, 0 - beq _080380E8 - b _0803812A -_080380E4: - cmp r0, 0x3 - bne _0803812A -_080380E8: - ldr r0, =gPlayerParty - b _08038110 - .pool -_080380F0: - ldr r0, =gPlayerParty + 300 - b _08038110 - .pool -_080380F8: - adds r0, r5, r2 - ldrh r0, [r0, 0x18] - cmp r0, 0x2 - bgt _0803810A - cmp r0, 0x1 - bge _08038120 - cmp r0, 0 - beq _0803810E - b _0803812A -_0803810A: - cmp r0, 0x3 - bne _0803812A -_0803810E: - ldr r0, =gEnemyParty -_08038110: - adds r1, r4, 0 - movs r2, 0xC8 - bl memcpy - b _0803812A - .pool -_08038120: - ldr r0, =gEnemyParty + 300 - adds r1, r4, 0 - movs r2, 0xC8 - bl memcpy -_0803812A: - movs r2, 0x80 - lsls r2, 1 - adds r4, r2 - adds r5, 0x1C - adds r6, 0x1 - cmp r6, 0x3 - ble _0803806C - b _080383A6 - .pool -_08038140: - bl sub_800A520 - lsls r0, 24 - cmp r0, 0 - bne _0803814C - b _080383F8 -_0803814C: - bl bitmask_all_link_players_but_self - lsls r0, 24 - lsrs r0, 24 - ldr r1, =gPlayerParty + 200 - movs r2, 0x64 - bl link_0800A448 - b _080383A6 - .pool -_08038164: - bl sub_800A550 - movs r1, 0xF - ands r1, r0 - cmp r1, 0xF - beq _08038172 - b _080383F8 -_08038172: - bl sub_800A5B4 - movs r6, 0 - lsls r0, r7, 3 - subs r0, r7 - lsls r0, 2 - mov r8, r0 - ldr r4, =gUnknown_020223C4 - movs r5, 0 -_08038184: - cmp r6, r7 - bne _080381B8 - ldr r0, =gLinkPlayers - adds r0, r5, r0 - ldrh r0, [r0, 0x18] - cmp r0, 0x2 - bgt _080381A4 - cmp r0, 0x1 - bge _080381B0 - cmp r0, 0 - beq _080381A8 - b _08038242 - .pool -_080381A4: - cmp r0, 0x3 - bne _08038242 -_080381A8: - ldr r0, =gPlayerParty + 200 - b _08038228 - .pool -_080381B0: - ldr r0, =gPlayerParty + 500 - b _08038228 - .pool -_080381B8: - ldr r2, =gLinkPlayers - adds r0, r5, r2 - ldrh r1, [r0, 0x18] - movs r3, 0x1 - adds r0, r3, 0 - ands r0, r1 - cmp r0, 0 - bne _080381DC - mov r1, r8 - adds r0, r1, r2 - ldrh r1, [r0, 0x18] - adds r0, r3, 0 - ands r0, r1 - cmp r0, 0 - beq _080381EA - b _08038210 - .pool -_080381DC: - mov r1, r8 - adds r0, r1, r2 - ldrh r1, [r0, 0x18] - adds r0, r3, 0 - ands r0, r1 - cmp r0, 0 - beq _08038210 -_080381EA: - adds r0, r5, r2 - ldrh r0, [r0, 0x18] - cmp r0, 0x2 - bgt _080381FC - cmp r0, 0x1 - bge _08038208 - cmp r0, 0 - beq _08038200 - b _08038242 -_080381FC: - cmp r0, 0x3 - bne _08038242 -_08038200: - ldr r0, =gPlayerParty + 200 - b _08038228 - .pool -_08038208: - ldr r0, =gPlayerParty + 500 - b _08038228 - .pool -_08038210: - adds r0, r5, r2 - ldrh r0, [r0, 0x18] - cmp r0, 0x2 - bgt _08038222 - cmp r0, 0x1 - bge _08038238 - cmp r0, 0 - beq _08038226 - b _08038242 -_08038222: - cmp r0, 0x3 - bne _08038242 -_08038226: - ldr r0, =gEnemyParty + 200 -_08038228: - adds r1, r4, 0 - movs r2, 0x64 - bl memcpy - b _08038242 - .pool -_08038238: - ldr r0, =gEnemyParty + 500 - adds r1, r4, 0 - movs r2, 0x64 - bl memcpy -_08038242: - movs r2, 0x80 - lsls r2, 1 - adds r4, r2 - adds r5, 0x1C - adds r6, 0x1 - cmp r6, 0x3 - ble _08038184 - ldr r4, =gPlayerParty - adds r0, r4, 0 - bl shedinja_something - adds r0, r4, 0 - adds r0, 0x64 - bl shedinja_something - adds r0, r4, 0 - adds r0, 0xC8 - bl shedinja_something - movs r1, 0x96 - lsls r1, 1 - adds r0, r4, r1 - bl shedinja_something - movs r2, 0xC8 - lsls r2, 1 - adds r0, r4, r2 - bl shedinja_something - movs r1, 0xFA - lsls r1, 1 - adds r0, r4, r1 - bl shedinja_something - ldr r4, =gEnemyParty - adds r0, r4, 0 - bl shedinja_something - adds r0, r4, 0 - adds r0, 0x64 - bl shedinja_something - adds r0, r4, 0 - adds r0, 0xC8 - bl shedinja_something - movs r2, 0x96 - lsls r2, 1 - adds r0, r4, r2 - bl shedinja_something - movs r1, 0xC8 - lsls r1, 1 - adds r0, r4, r1 - bl shedinja_something - movs r2, 0xFA - lsls r2, 1 - adds r0, r4, r2 - bl shedinja_something - b _080383A6 - .pool -_080382CC: - bl sub_8032768 - bl sub_8184E58 - ldr r3, =gBattleCommunication - movs r0, 0 - strb r0, [r3, 0x1] - strb r0, [r3, 0x2] - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - movs r1, 0x2 - ands r0, r1 - cmp r0, 0 - beq _08038326 - movs r6, 0 - ldr r0, =gLinkPlayers - ldrb r1, [r0] - adds r4, r3, 0 - adds r2, r0, 0 - cmp r1, 0x3 - bne _0803830A - movs r3, 0xFF -_080382F8: - adds r2, 0x1C - adds r6, 0x1 - cmp r6, 0x3 - bgt _0803830A - ldrh r1, [r2] - adds r0, r3, 0 - ands r0, r1 - cmp r0, 0x3 - beq _080382F8 -_0803830A: - cmp r6, 0x4 - bne _08038320 - movs r0, 0x8 - strb r0, [r4] - b _080383F8 - .pool -_08038320: - movs r0, 0xA - strb r0, [r4] - b _080383F8 -_08038326: - movs r0, 0xA - strb r0, [r3] - b _080383F8 -_0803832C: - bl sub_800A520 - lsls r0, 24 - cmp r0, 0 - beq _080383F8 - ldr r0, =gBattleStruct - ldr r4, [r0] - movs r0, 0xC0 - lsls r0, 1 - adds r4, r0 - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - str r0, [r4] - ldr r0, =gUnknown_0203BD2C - ldr r0, [r0] - str r0, [r4, 0x4] - bl bitmask_all_link_players_but_self - lsls r0, 24 - lsrs r0, 24 - adds r1, r4, 0 - movs r2, 0x8 - bl link_0800A448 - b _080383A6 - .pool -_0803836C: - bl sub_800A550 - movs r1, 0xF - ands r1, r0 - cmp r1, 0xF - bne _080383F8 - bl sub_800A5B4 - movs r2, 0 - b _08038386 -_08038380: - adds r0, r2, 0x1 - lsls r0, 24 - lsrs r2, r0, 24 -_08038386: - cmp r2, 0x3 - bhi _080383A6 - ldr r4, =gUnknown_020223C4 - lsls r3, r2, 8 - adds r0, r3, r4 - ldrh r0, [r0] - movs r1, 0x4 - ands r0, r1 - cmp r0, 0 - beq _08038380 - adds r1, r4, 0x4 - adds r1, r3, r1 - ldr r0, =gUnknown_0203BD2C - movs r2, 0x4 - bl memcpy -_080383A6: - ldr r1, =gBattleCommunication - ldrb r0, [r1] - adds r0, 0x1 - strb r0, [r1] - b _080383F8 - .pool -_080383BC: - ldr r0, =gUnknown_02024333 - adds r1, r0, 0x1 - bl battle_load_something - lsls r0, 24 - cmp r0, 0 - beq _080383F8 - ldr r2, =gUnknown_03005D00 - ldr r1, =gMain - ldr r0, [r1] - str r0, [r2] - ldr r0, =sub_8039EF0 - str r0, [r1] - ldr r0, =BattleMainCB2 - bl SetMainCallback2 - ldr r3, =gBattleTypeFlags - ldr r2, [r3] - movs r0, 0x2 - ands r0, r2 - cmp r0, 0 - beq _080383F8 - ldr r0, =gTrainerBattleOpponent_A - movs r4, 0x80 - lsls r4, 4 - adds r1, r4, 0 - strh r1, [r0] - movs r0, 0x20 - orrs r2, r0 - str r2, [r3] -_080383F8: - add sp, 0x4 - pop {r3} - mov r8, r3 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8037DF4 thumb_func_start BattleMainCB2 BattleMainCB2: @ 8038420 @@ -3209,7 +58,7 @@ _08038482: sub_803849C: @ 803849C push {lr} ldr r1, =gMain - ldr r0, =gUnknown_03005D00 + ldr r0, =gPreBattleCallback1 ldr r0, [r0] str r0, [r1] ldr r2, =gUnknown_02039B28 @@ -3351,7 +200,7 @@ _080385C8: asrs r0, 16 cmp r0, 0x14 bne _080385DC - ldr r0, =sub_8036760 + ldr r0, =CB2_InitBattle bl SetMainCallback2 _080385DC: pop {r4,r5} @@ -3917,11 +766,11 @@ VBlankCB_Battle: @ 8038A28 bne _08038A3A bl Random _08038A3A: - ldr r0, =gUnknown_02022E14 + ldr r0, =gBattle_BG0_X ldrh r1, [r0] movs r0, 0x10 bl SetGpuReg - ldr r0, =gUnknown_02022E16 + ldr r0, =gBattle_BG0_Y ldrh r1, [r0] movs r0, 0x12 bl SetGpuReg @@ -3945,23 +794,23 @@ _08038A3A: ldrh r1, [r0] movs r0, 0x1C bl SetGpuReg - ldr r0, =gUnknown_02022E22 + ldr r0, =gBattle_BG3_Y ldrh r1, [r0] movs r0, 0x1E bl SetGpuReg - ldr r0, =gUnknown_02022E24 + ldr r0, =gBattle_WIN0H ldrh r1, [r0] movs r0, 0x40 bl SetGpuReg - ldr r0, =gUnknown_02022E26 + ldr r0, =gBattle_WIN0V ldrh r1, [r0] movs r0, 0x44 bl SetGpuReg - ldr r0, =gUnknown_02022E28 + ldr r0, =gBattle_WIN1H ldrh r1, [r0] movs r0, 0x42 bl SetGpuReg - ldr r0, =gUnknown_02022E2A + ldr r0, =gBattle_WIN1V ldrh r1, [r0] movs r0, 0x46 bl SetGpuReg @@ -4330,10 +1179,10 @@ _08038DAC: movs r0, 0x4A movs r1, 0 bl SetGpuReg - ldr r1, =gUnknown_02022E24 + ldr r1, =gBattle_WIN0H movs r0, 0xF0 strh r0, [r1] - ldr r0, =gUnknown_02022E26 + ldr r0, =gBattle_WIN0V strh r4, [r0] bl dp12_8087EA4 ldr r0, =gUnknown_02038C28 @@ -4366,10 +1215,10 @@ _08038E1A: cmp r1, 0x9F ble _08038E1A bl ResetPaletteFade - ldr r0, =gUnknown_02022E14 + ldr r0, =gBattle_BG0_X movs r4, 0 strh r4, [r0] - ldr r0, =gUnknown_02022E16 + ldr r0, =gBattle_BG0_Y strh r4, [r0] ldr r0, =gBattle_BG1_X strh r4, [r0] @@ -4381,7 +1230,7 @@ _08038E1A: strh r4, [r0] ldr r0, =gBattle_BG3_X strh r4, [r0] - ldr r0, =gUnknown_02022E22 + ldr r0, =gBattle_BG3_Y strh r4, [r0] bl c2_berry_program_update_menu ldr r0, =gUnknown_08C004E0 @@ -4391,7 +1240,7 @@ _08038E1A: bl sub_803570C bl ResetSpriteData bl ResetTasks - bl sub_8036154 + bl LoadBattleEntryBackground movs r0, 0x4A movs r1, 0x37 bl SetGpuReg @@ -4588,7 +1437,7 @@ _08039074: b _080390B0 .pool _08039090: - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0 bne _08039172 @@ -4705,7 +1554,7 @@ _08039184: ldrb r0, [r0] cmp r0, 0 bne _080391A6 - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0x1 beq _080391C6 @@ -4838,9 +1687,9 @@ sub_80392A8: @ 80392A8 add r0, sp, 0x4 bl CpuSet bl ResetPaletteFade - ldr r0, =gUnknown_02022E14 + ldr r0, =gBattle_BG0_X strh r4, [r0] - ldr r0, =gUnknown_02022E16 + ldr r0, =gBattle_BG0_Y strh r4, [r0] ldr r0, =gBattle_BG1_X strh r4, [r0] @@ -4852,7 +1701,7 @@ sub_80392A8: @ 80392A8 strh r4, [r0] ldr r0, =gBattle_BG3_X strh r4, [r0] - ldr r0, =gUnknown_02022E22 + ldr r0, =gBattle_BG3_Y strh r4, [r0] bl c2_berry_program_update_menu movs r1, 0x82 @@ -4960,7 +1809,7 @@ _08039414: ands r0, r1 cmp r0, 0 beq _08039434 - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0 bne _08039434 @@ -5179,7 +2028,7 @@ _08039610: ldrb r0, [r0] cmp r0, 0 bne _08039634 - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0x1 bne _08039634 @@ -5708,7 +2557,7 @@ _08039A7C: lsls r0, 24 lsrs r0, 24 bl GetBankIdentity - ldr r1, =gBattleSpritesGfx + ldr r1, =gMonSpritesGfxPtr ldr r1, [r1] lsls r0, 24 lsrs r0, 22 @@ -6298,8 +3147,8 @@ sub_8039ECC: @ 8039ECC .pool thumb_func_end sub_8039ECC - thumb_func_start sub_8039EF0 -sub_8039EF0: @ 8039EF0 + thumb_func_start BattleMainCB1 +BattleMainCB1: @ 8039EF0 push {r4,r5,lr} ldr r0, =gBattleMainFunc ldr r0, [r0] @@ -6333,7 +3182,7 @@ _08039F2A: pop {r0} bx r0 .pool - thumb_func_end sub_8039EF0 + thumb_func_end BattleMainCB1 thumb_func_start sub_8039F40 sub_8039F40: @ 8039F40 @@ -13508,7 +10357,7 @@ _0803DF8C: ands r0, r5 cmp r0, 0 beq _0803DF9E - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0 bne _0803DFEC @@ -13525,7 +10374,7 @@ _0803DF9E: negs r0, r0 ands r0, r1 strb r0, [r2] - ldr r0, =gUnknown_03005D00 + ldr r0, =gPreBattleCallback1 ldr r0, [r0] str r0, [r3] movs r0, 0x80 @@ -14455,10 +11304,10 @@ bs2_8016374: @ 803E868 adds r0, r1 ldrb r0, [r0] strb r0, [r3] - ldr r0, =gUnknown_02022E14 + ldr r0, =gBattle_BG0_X movs r2, 0 strh r2, [r0] - ldr r0, =gUnknown_02022E16 + ldr r0, =gBattle_BG0_Y strh r2, [r0] ldr r1, =gUnknown_020244AC ldrb r0, [r3] @@ -14521,10 +11370,10 @@ sub_803E90C: @ 803E90C ldrb r0, [r0] strb r0, [r2] strb r0, [r4] - ldr r0, =gUnknown_02022E14 + ldr r0, =gBattle_BG0_X movs r1, 0 strh r1, [r0] - ldr r0, =gUnknown_02022E16 + ldr r0, =gBattle_BG0_Y strh r1, [r0] ldrb r0, [r4] bl sub_8045868 @@ -15219,10 +12068,10 @@ sub_803EFA8: @ 803EFA8 adds r0, r1 ldrb r0, [r0] strb r0, [r2] - ldr r0, =gUnknown_02022E14 + ldr r0, =gBattle_BG0_X movs r1, 0 strh r1, [r0] - ldr r0, =gUnknown_02022E16 + ldr r0, =gBattle_BG0_Y strh r1, [r0] ldr r1, =gBattlescriptCurrInstr ldr r0, =gUnknown_082DBD58 @@ -15244,10 +12093,10 @@ bs5_8016AC0: @ 803EFF0 adds r0, r1 ldrb r0, [r0] strb r0, [r2] - ldr r0, =gUnknown_02022E14 + ldr r0, =gBattle_BG0_X movs r1, 0 strh r1, [r0] - ldr r0, =gUnknown_02022E16 + ldr r0, =gBattle_BG0_Y strh r1, [r0] ldr r1, =gNumSafariBalls ldrb r0, [r1] @@ -15277,10 +12126,10 @@ sub_803F050: @ 803F050 adds r0, r1 ldrb r0, [r0] strb r0, [r3] - ldr r0, =gUnknown_02022E14 + ldr r0, =gBattle_BG0_X movs r1, 0 strh r1, [r0] - ldr r0, =gUnknown_02022E16 + ldr r0, =gBattle_BG0_Y strh r1, [r0] ldr r6, =gBattleCommunication ldr r2, =gBattleBufferB @@ -15364,10 +12213,10 @@ sub_803F120: @ 803F120 adds r0, r1 ldrb r0, [r0] strb r0, [r2] - ldr r0, =gUnknown_02022E14 + ldr r0, =gBattle_BG0_X movs r4, 0 strh r4, [r0] - ldr r0, =gUnknown_02022E16 + ldr r0, =gBattle_BG0_Y strh r4, [r0] ldr r3, =gBattleStruct ldr r0, [r3] @@ -15473,10 +12322,10 @@ bs9_8016C9C: @ 803F22C adds r0, r1 ldrb r2, [r0] strb r2, [r3] - ldr r0, =gUnknown_02022E14 + ldr r0, =gBattle_BG0_X movs r1, 0 strh r1, [r0] - ldr r0, =gUnknown_02022E16 + ldr r0, =gBattle_BG0_Y strh r1, [r0] ldr r1, =gBattleTextBuff1 movs r0, 0xFD diff --git a/asm/battle_5.s b/asm/battle_5.s index bb5b406e5..3163631a9 100644 --- a/asm/battle_5.s +++ b/asm/battle_5.s @@ -6,8 +6,8 @@ .text - thumb_func_start sub_8056F28 -sub_8056F28: @ 8056F28 + thumb_func_start AllocateBattleResrouces +AllocateBattleResrouces: @ 8056F28 push {r4-r6,lr} ldr r5, =gBattleResources ldr r6, =gBattleTypeFlags @@ -102,7 +102,7 @@ _08056FFA: pop {r0} bx r0 .pool - thumb_func_end sub_8056F28 + thumb_func_end AllocateBattleResrouces thumb_func_start sub_8057028 sub_8057028: @ 8057028 diff --git a/asm/battle_7.s b/asm/battle_7.s index 011559819..82298fbf4 100644 --- a/asm/battle_7.s +++ b/asm/battle_7.s @@ -5,8 +5,8 @@ .text - thumb_func_start dp11_init -dp11_init: @ 805D118 + thumb_func_start AllocateBattleSpritesData +AllocateBattleSpritesData: @ 805D118 push {r4,lr} ldr r4, =gUnknown_020244D0 movs r0, 0x10 @@ -32,7 +32,7 @@ dp11_init: @ 805D118 pop {r0} bx r0 .pool - thumb_func_end dp11_init + thumb_func_end AllocateBattleSpritesData thumb_func_start dp11_free dp11_free: @ 805D158 @@ -1371,7 +1371,7 @@ _0805DC58: lsls r2, r5, 3 ldr r1, =gMonFrontPicTable adds r2, r1 - ldr r1, =gBattleSpritesGfx + ldr r1, =gMonSpritesGfxPtr ldr r1, [r1] lsrs r0, 22 adds r1, 0x4 @@ -1543,7 +1543,7 @@ _0805DE00: lsls r0, r5, 3 ldr r1, =gMonBackPicTable adds r0, r1 - ldr r1, =gBattleSpritesGfx + ldr r1, =gMonSpritesGfxPtr ldr r1, [r1] lsls r2, r7, 2 adds r1, 0x4 @@ -1558,7 +1558,7 @@ _0805DE2C: lsls r0, r5, 3 ldr r1, =gMonBackPicTable adds r0, r1 - ldr r1, =gBattleSpritesGfx + ldr r1, =gMonSpritesGfxPtr ldr r1, [r1] lsls r2, r7, 2 adds r1, 0x4 @@ -1684,7 +1684,7 @@ sub_805DF38: @ 805DF38 lsls r4, 3 ldr r2, =gTrainerFrontPicTable adds r2, r4, r2 - ldr r1, =gBattleSpritesGfx + ldr r1, =gMonSpritesGfxPtr ldr r1, [r1] lsrs r0, 22 adds r1, 0x4 @@ -1718,7 +1718,7 @@ sub_805DF84: @ 805DF84 lsls r5, 3 ldr r2, =gTrainerBackPicTable adds r2, r5, r2 - ldr r1, =gBattleSpritesGfx + ldr r1, =gMonSpritesGfxPtr ldr r1, [r1] lsrs r0, 22 adds r1, 0x4 @@ -1959,7 +1959,7 @@ _0805E1AE: load_gfxc_health_bar: @ 805E1B8 push {lr} ldr r0, =gUnknown_08C093F0 - ldr r1, =gBattleSpritesGfx + ldr r1, =gMonSpritesGfxPtr ldr r1, [r1] movs r2, 0xBA lsls r2, 1 @@ -1971,8 +1971,8 @@ load_gfxc_health_bar: @ 805E1B8 .pool thumb_func_end load_gfxc_health_bar - thumb_func_start battle_load_something -battle_load_something: @ 805E1D8 + thumb_func_start BattleInitAllSprites +BattleInitAllSprites: @ 805E1D8 push {r4-r6,lr} adds r5, r0, 0 adds r4, r1, 0 @@ -2136,7 +2136,7 @@ _0805E346: pop {r4-r6} pop {r1} bx r1 - thumb_func_end battle_load_something + thumb_func_end BattleInitAllSprites thumb_func_start sub_805E350 sub_805E350: @ 805E350 @@ -2364,7 +2364,7 @@ _0805E51C: lsls r0, r1, 3 ldr r1, =gMonBackPicTable adds r0, r1 - ldr r1, =gBattleSpritesGfx + ldr r1, =gMonSpritesGfxPtr ldr r1, [r1] ldr r1, [r1, 0x4] ldr r3, [r2, 0x10] @@ -2434,7 +2434,7 @@ _0805E59C: lsls r0, r1, 3 ldr r1, =gMonBackPicTable adds r0, r1 - ldr r1, =gBattleSpritesGfx + ldr r1, =gMonSpritesGfxPtr ldr r1, [r1] mov r3, r10 lsls r2, r3, 2 @@ -2472,7 +2472,7 @@ _0805E618: lsls r0, r1, 3 ldr r1, =gMonFrontPicTable adds r0, r1 - ldr r1, =gBattleSpritesGfx + ldr r1, =gMonSpritesGfxPtr ldr r1, [r1] mov r3, r10 lsls r2, r3, 2 @@ -2486,7 +2486,7 @@ _0805E618: mov r2, r8 bl HandleLoadSpecialPokePic_DontHandleDeoxys _0805E662: - ldr r0, =gBattleSpritesGfx + ldr r0, =gMonSpritesGfxPtr ldr r0, [r0] mov r2, r10 lsls r1, r2, 2 @@ -2666,7 +2666,7 @@ _0805E814: beq _0805E83C ldr r0, =gUnknown_08C2CEE0 _0805E822: - ldr r1, =gBattleSpritesGfx + ldr r1, =gMonSpritesGfxPtr ldr r1, [r1] lsls r4, 2 adds r1, 0x4 @@ -2677,7 +2677,7 @@ _0805E822: .pool _0805E83C: ldr r0, =gUnknown_08C2D120 - ldr r1, =gBattleSpritesGfx + ldr r1, =gMonSpritesGfxPtr ldr r1, [r1] lsls r4, 2 adds r1, 0x4 @@ -2688,7 +2688,7 @@ _0805E84E: movs r3, 0x1 lsls r6, r5, 4 ldr r7, =gUnknown_08C2CEBC - ldr r0, =gBattleSpritesGfx + ldr r0, =gMonSpritesGfxPtr ldr r0, [r0] adds r0, 0x4 adds r4, r0, r4 @@ -3600,15 +3600,15 @@ _0805EFAC: .pool thumb_func_end sub_805EF84 - thumb_func_start init_uns_table_pokemon_copy -init_uns_table_pokemon_copy: @ 805EFBC + thumb_func_start AllocateMonSpritesGfx +AllocateMonSpritesGfx: @ 805EFBC push {r4-r7,lr} mov r7, r10 mov r6, r9 mov r5, r8 push {r5-r7} movs r6, 0 - ldr r4, =gBattleSpritesGfx + ldr r4, =gMonSpritesGfxPtr str r6, [r4] movs r0, 0xC0 lsls r0, 1 @@ -3620,7 +3620,7 @@ init_uns_table_pokemon_copy: @ 805EFBC ldr r1, [r4] str r0, [r1] _0805EFE2: - ldr r0, =gBattleSpritesGfx + ldr r0, =gMonSpritesGfxPtr ldr r1, [r0] lsls r4, r6, 2 adds r2, r1, 0x4 @@ -3649,7 +3649,7 @@ _0805EFE2: mov r12, r8 adds r7, r4, 0 _0805F01A: - ldr r2, =gBattleSpritesGfx + ldr r2, =gMonSpritesGfxPtr ldr r1, [r2] lsls r4, r5, 3 add r4, r12 @@ -3672,7 +3672,7 @@ _0805F01A: lsrs r5, r0, 24 cmp r5, 0x3 bls _0805F01A - ldr r1, =gBattleSpritesGfx + ldr r1, =gMonSpritesGfxPtr ldr r2, [r1] mov r5, r9 adds r0, r5, r6 @@ -3692,7 +3692,7 @@ _0805F01A: movs r0, 0x80 lsls r0, 5 bl AllocZeroed - ldr r1, =gBattleSpritesGfx + ldr r1, =gMonSpritesGfxPtr ldr r1, [r1] movs r2, 0xBA lsls r2, 1 @@ -3706,12 +3706,12 @@ _0805F01A: pop {r0} bx r0 .pool - thumb_func_end init_uns_table_pokemon_copy + thumb_func_end AllocateMonSpritesGfx thumb_func_start sub_805F094 sub_805F094: @ 805F094 push {r4-r6,lr} - ldr r6, =gBattleSpritesGfx + ldr r6, =gMonSpritesGfxPtr ldr r0, [r6] cmp r0, 0 beq _0805F106 diff --git a/asm/battle_anim.s b/asm/battle_anim.s index 9c0190214..b9ab95165 100644 --- a/asm/battle_anim.s +++ b/asm/battle_anim.s @@ -264,14 +264,14 @@ _080A3BAA: movs r2, 0x80 bl m4aMPlayVolumeControl _080A3BC2: - ldr r0, =gUnknown_02022E24 + ldr r0, =gBattle_WIN0H movs r1, 0 strh r1, [r0] - ldr r0, =gUnknown_02022E26 + ldr r0, =gBattle_WIN0V strh r1, [r0] - ldr r0, =gUnknown_02022E28 + ldr r0, =gBattle_WIN1H strh r1, [r0] - ldr r0, =gUnknown_02022E2A + ldr r0, =gBattle_WIN1V strh r1, [r0] add sp, 0x4 pop {r3-r5} diff --git a/asm/battle_anim_80FE840.s b/asm/battle_anim_80FE840.s index 860f1a6cb..5cec1cbc5 100644 --- a/asm/battle_anim_80FE840.s +++ b/asm/battle_anim_80FE840.s @@ -14561,7 +14561,7 @@ _08105CCC: lsls r0, 6 bl AllocZeroed adds r1, r0, 0 - ldr r0, =gBattleSpritesGfx + ldr r0, =gMonSpritesGfxPtr ldr r0, [r0] movs r2, 0xBE lsls r2, 1 @@ -14571,7 +14571,7 @@ _08105CCC: bl LZDecompressWram movs r4, 0 _08105D00: - ldr r5, =gBattleSpritesGfx + ldr r5, =gMonSpritesGfxPtr ldr r0, [r5] movs r1, 0xBE lsls r1, 1 @@ -14785,9 +14785,9 @@ sub_8105EB0: @ 8105EB0 movs r6, 0x98 _08105EC4: movs r5, 0 - ldr r1, =gUnknown_02022E24 + ldr r1, =gBattle_WIN0H strh r6, [r1] - ldr r4, =gUnknown_02022E26 + ldr r4, =gBattle_WIN0V movs r0, 0xA0 strh r0, [r4] ldrh r1, [r1] @@ -14845,7 +14845,7 @@ sub_8105F30: @ 8105F30 lsls r0, r2, 16 cmp r1, r0 blt _08105F70 - ldr r0, =gUnknown_02022E24 + ldr r0, =gBattle_WIN0H movs r1, 0 strh r1, [r0] ldr r0, =sub_8105F84 @@ -14853,7 +14853,7 @@ sub_8105F30: @ 8105F30 b _08105F78 .pool _08105F70: - ldr r1, =gUnknown_02022E24 + ldr r1, =gBattle_WIN0H lsls r0, r4, 8 orrs r2, r0 strh r2, [r1] @@ -14905,9 +14905,9 @@ sub_8105F84: @ 8105F84 _08105FD8: cmp r0, 0x4 ble _0810600C - ldr r0, =gUnknown_02022E24 + ldr r0, =gBattle_WIN0H strh r4, [r0] - ldr r0, =gUnknown_02022E26 + ldr r0, =gBattle_WIN0V strh r4, [r0] ldr r4, =0x00003f3f movs r0, 0x48 @@ -30154,7 +30154,7 @@ _0810DB50: strh r0, [r2] adds r7, r2, 0 _0810DB60: - ldr r3, =gUnknown_02022E22 + ldr r3, =gBattle_BG3_Y ldrh r2, [r4, 0x1C] lsls r0, r2, 16 asrs r0, 24 @@ -37347,7 +37347,7 @@ sub_811152C: @ 811152C movs r0, 0xC8 strh r0, [r5, 0xA] _0811154E: - ldr r4, =gUnknown_02022E22 + ldr r4, =gBattle_BG3_Y movs r1, 0xA ldrsh r0, [r5, r1] movs r1, 0xA @@ -37396,7 +37396,7 @@ sub_8111590: @ 8111590 ldrh r0, [r4, 0x8] adds r0, 0x1 strh r0, [r4, 0x8] - ldr r0, =gUnknown_02022E22 + ldr r0, =gBattle_BG3_Y ldrh r0, [r0] strh r0, [r4, 0xC] _081115BC: @@ -37405,7 +37405,7 @@ _081115BC: movs r1, 0xFF ands r0, r1 strh r0, [r4, 0xA] - ldr r6, =gUnknown_02022E22 + ldr r6, =gBattle_BG3_Y movs r2, 0xA ldrsh r1, [r4, r2] movs r0, 0x4 @@ -39577,10 +39577,10 @@ sub_8112758: @ 8112758 push {r4-r7,lr} lsls r0, 24 lsrs r7, r0, 24 - ldr r0, =gUnknown_02022E24 + ldr r0, =gBattle_WIN0H movs r1, 0 strh r1, [r0] - ldr r0, =gUnknown_02022E26 + ldr r0, =gBattle_WIN0V strh r1, [r0] ldr r1, =0x00003f3f movs r0, 0x48 @@ -39611,13 +39611,13 @@ _081127A0: _081127B8: movs r6, 0xC8 _081127BA: - ldr r1, =gUnknown_02022E24 + ldr r1, =gBattle_WIN0H lsls r3, r6, 16 asrs r2, r3, 16 lsls r0, r2, 8 orrs r0, r2 strh r0, [r1] - ldr r1, =gUnknown_02022E26 + ldr r1, =gBattle_WIN0V movs r5, 0x28 ldr r0, =0x00002828 strh r0, [r1] @@ -39798,12 +39798,12 @@ _08112938: ldr r0, _08112988 @=sub_8112994 str r0, [r4] _08112966: - ldr r1, _0811298C @=gUnknown_02022E24 + ldr r1, _0811298C @=gBattle_WIN0H mov r2, r9 lsls r0, r2, 8 orrs r7, r0 strh r7, [r1] - ldr r1, _08112990 @=gUnknown_02022E26 + ldr r1, _08112990 @=gBattle_WIN0V lsls r0, r6, 8 orrs r5, r0 strh r5, [r1] @@ -39819,9 +39819,9 @@ _08112966: _08112988: .4byte sub_8112994 _0811298C: - .4byte gUnknown_02022E24 + .4byte gBattle_WIN0H _08112990: - .4byte gUnknown_02022E26 + .4byte gBattle_WIN0V thumb_func_end sub_811280C thumb_func_start sub_8112994 @@ -39837,9 +39837,9 @@ sub_8112994: @ 8112994 lsrs r1, r0, 24 cmp r1, 0 bne _081129DA - ldr r0, =gUnknown_02022E24 + ldr r0, =gBattle_WIN0H strh r1, [r0] - ldr r0, =gUnknown_02022E26 + ldr r0, =gBattle_WIN0V strh r1, [r0] ldr r4, =0x00003f3f movs r0, 0x48 @@ -40042,10 +40042,10 @@ sub_8112B44: @ 8112B44 movs r0, 0x52 movs r1, 0 bl SetGpuReg - ldr r0, =gUnknown_02022E24 + ldr r0, =gBattle_WIN0H movs r1, 0 strh r1, [r0] - ldr r0, =gUnknown_02022E26 + ldr r0, =gBattle_WIN0V strh r1, [r0] adds r0, r4, 0 bl move_anim_8072740 @@ -42202,13 +42202,13 @@ _08113CDC: ldr r1, =0x00003f3f movs r0, 0x48 bl SetGpuReg - ldr r2, =gUnknown_02022E24 + ldr r2, =gBattle_WIN0H ldrh r0, [r5, 0x24] lsls r0, 8 ldrh r1, [r5, 0x26] orrs r0, r1 strh r0, [r2] - ldr r1, =gUnknown_02022E26 + ldr r1, =gBattle_WIN0V movs r0, 0xA0 strh r0, [r1] ldr r0, =sub_8113D60 @@ -42331,7 +42331,7 @@ _08113E1C: blt _08113E3E strh r2, [r4, 0x24] _08113E3E: - ldr r3, =gUnknown_02022E24 + ldr r3, =gBattle_WIN0H ldrh r2, [r4, 0x24] lsls r0, r2, 8 ldrh r1, [r4, 0x26] @@ -42398,10 +42398,10 @@ _08113EBC: lsrs r0, 24 cmp r0, 0x1 bne _08113EF8 - ldr r0, =gUnknown_02022E24 + ldr r0, =gBattle_WIN0H movs r1, 0 strh r1, [r0] - ldr r0, =gUnknown_02022E26 + ldr r0, =gBattle_WIN0V strh r1, [r0] ldr r4, =0x00003f3f movs r0, 0x48 @@ -42588,13 +42588,13 @@ _08114078: ldr r1, =0x00003f3f movs r0, 0x48 bl SetGpuReg - ldr r2, =gUnknown_02022E24 + ldr r2, =gBattle_WIN0H ldrh r0, [r5, 0x24] lsls r0, 8 ldrh r1, [r5, 0x26] orrs r0, r1 strh r0, [r2] - ldr r1, =gUnknown_02022E26 + ldr r1, =gBattle_WIN0V movs r0, 0xA0 strh r0, [r1] movs r0, 0 @@ -42686,7 +42686,7 @@ _08114150: movs r0, 0x1 strh r0, [r4, 0xA] _08114154: - ldr r2, =gUnknown_02022E24 + ldr r2, =gBattle_WIN0H ldrh r0, [r4, 0x24] lsls r0, 8 ldrh r1, [r4, 0x26] @@ -42782,10 +42782,10 @@ _08114204: b _08114232 .pool _08114210: - ldr r0, =gUnknown_02022E24 + ldr r0, =gBattle_WIN0H movs r1, 0 strh r1, [r0] - ldr r0, =gUnknown_02022E26 + ldr r0, =gBattle_WIN0V strh r1, [r0] ldr r4, =0x00003f3f movs r0, 0x48 @@ -43157,9 +43157,9 @@ sub_81144F8: @ 81144F8 lsls r0, 24 lsrs r7, r0, 24 movs r6, 0 - ldr r0, =gUnknown_02022E24 + ldr r0, =gBattle_WIN0H strh r6, [r0] - ldr r0, =gUnknown_02022E26 + ldr r0, =gBattle_WIN0V strh r6, [r0] ldr r1, =0x00003f3f movs r0, 0x48 @@ -43485,9 +43485,9 @@ _081147B8: _08114824: cmp r0, 0x3 bne _08114886 - ldr r0, =gUnknown_02022E24 + ldr r0, =gBattle_WIN0H strh r5, [r0] - ldr r0, =gUnknown_02022E26 + ldr r0, =gBattle_WIN0V strh r5, [r0] ldr r4, =0x00003f3f movs r0, 0x48 @@ -45266,7 +45266,7 @@ _0811565A: ldr r2, =gBattle_BG3_X ldrh r0, [r4, 0xA] strh r0, [r2] - ldr r0, =gUnknown_02022E22 + ldr r0, =gBattle_BG3_Y strh r1, [r0] ldrh r0, [r6, 0x4] strh r0, [r4, 0xE] @@ -45298,7 +45298,7 @@ sub_81156D0: @ 81156D0 ldr r0, =gBattle_BG3_X movs r1, 0 strh r1, [r0] - ldr r0, =gUnknown_02022E22 + ldr r0, =gBattle_BG3_Y strh r1, [r0] adds r0, r3, 0 bl DestroyTask @@ -45308,7 +45308,7 @@ _08115710: ldr r1, =gBattle_BG3_X ldrh r0, [r2, 0xA] strh r0, [r1] - ldr r1, =gUnknown_02022E22 + ldr r1, =gBattle_BG3_Y ldrh r0, [r2, 0xC] strh r0, [r1] _0811571C: @@ -46557,7 +46557,7 @@ _081160E2: b _081160F6 .pool _081160EC: - ldr r1, =gUnknown_02022E22 + ldr r1, =gBattle_BG3_Y b _081160F6 .pool _081160F4: @@ -46796,7 +46796,7 @@ sub_81162A4: @ 81162A4 ldr r4, =gBattle_BG3_X ldrh r1, [r3] strh r1, [r4] - ldr r4, =gUnknown_02022E22 + ldr r4, =gBattle_BG3_Y ldrh r1, [r3, 0x2] strh r1, [r4] ldr r1, =sub_81162F8 @@ -46839,7 +46839,7 @@ _08116330: ldrh r0, [r3, 0x8] _08116332: strh r0, [r6] - ldr r2, =gUnknown_02022E22 + ldr r2, =gBattle_BG3_Y ldrh r3, [r2] lsls r1, r5, 2 adds r0, r1, r5 @@ -47805,9 +47805,9 @@ sub_8116B14: @ 8116B14 lsrs r0, 24 mov r9, r0 movs r7, 0 - ldr r0, =gUnknown_02022E24 + ldr r0, =gBattle_WIN0H strh r7, [r0] - ldr r0, =gUnknown_02022E26 + ldr r0, =gBattle_WIN0V strh r7, [r0] ldr r1, =0x00003f3f movs r0, 0x48 @@ -48072,10 +48072,10 @@ sub_8116D64: @ 8116D64 bne _08116E86 movs r0, 0 bl sub_80A477C - ldr r0, =gUnknown_02022E24 + ldr r0, =gBattle_WIN0H mov r1, r8 strh r1, [r0] - ldr r0, =gUnknown_02022E26 + ldr r0, =gBattle_WIN0V strh r1, [r0] ldr r4, =0x00003f3f movs r0, 0x48 @@ -48256,10 +48256,10 @@ _08116F56: movs r0, 0 strh r0, [r1, 0xA] _08116F5C: - ldr r0, =gUnknown_02022E24 + ldr r0, =gBattle_WIN0H movs r1, 0 strh r1, [r0] - ldr r0, =gUnknown_02022E26 + ldr r0, =gBattle_WIN0V strh r1, [r0] ldr r1, =0x00003f3f movs r0, 0x48 @@ -48746,10 +48746,10 @@ _081173AE: strh r0, [r5, 0x26] b _08117478 _081173B6: - ldr r0, =gUnknown_02022E24 + ldr r0, =gBattle_WIN0H movs r1, 0 strh r1, [r0] - ldr r0, =gUnknown_02022E26 + ldr r0, =gBattle_WIN0V strh r1, [r0] ldr r4, =0x00003f3f movs r0, 0x48 @@ -49158,7 +49158,7 @@ sub_81176D8: @ 81176D8 ldrh r4, [r6] adds r0, r4 strh r0, [r6] - ldr r4, =gUnknown_02022E22 + ldr r4, =gBattle_BG3_Y lsls r0, r2, 16 asrs r0, 24 ldrh r7, [r4] @@ -49363,10 +49363,10 @@ _081178B6: movs r2, 0 mov r8, r2 _081178BA: - ldr r0, =gUnknown_02022E24 + ldr r0, =gBattle_WIN0H movs r1, 0 strh r1, [r0] - ldr r0, =gUnknown_02022E26 + ldr r0, =gBattle_WIN0V strh r1, [r0] ldr r1, =0x00003f3f movs r0, 0x48 @@ -49676,9 +49676,9 @@ _08117B34: bne _08117C0C movs r0, 0 bl sub_80A477C - ldr r0, =gUnknown_02022E24 + ldr r0, =gBattle_WIN0H strh r4, [r0] - ldr r0, =gUnknown_02022E26 + ldr r0, =gBattle_WIN0V strh r4, [r0] ldr r4, =0x00003f3f movs r0, 0x48 @@ -49777,7 +49777,7 @@ sub_8117C44: @ 8117C44 movs r0, 0x80 lsls r0, 6 bl AllocZeroed - ldr r1, =gBattleSpritesGfx + ldr r1, =gMonSpritesGfxPtr ldr r1, [r1] movs r2, 0xBE lsls r2, 1 @@ -49797,7 +49797,7 @@ sub_8117C70: @ 8117C70 adds r4, r0, 0 lsls r4, 24 lsrs r4, 24 - ldr r6, =gBattleSpritesGfx + ldr r6, =gMonSpritesGfxPtr ldr r0, [r6] movs r5, 0xBE lsls r5, 1 @@ -49866,7 +49866,7 @@ _08117CF6: adds r4, r0, 0 adds r4, 0x10 _08117CFC: - ldr r0, =gBattleSpritesGfx + ldr r0, =gMonSpritesGfxPtr ldr r1, [r0] ldr r0, =gBattleAnimArgs movs r2, 0x2 @@ -49944,7 +49944,7 @@ _08117D98: lsls r0, r4, 5 ldr r1, =gPlttBufferUnfaded adds r0, r1 - ldr r1, =gBattleSpritesGfx + ldr r1, =gMonSpritesGfxPtr ldr r2, [r1] ldr r1, =gBattleAnimArgs movs r3, 0x2 @@ -50646,7 +50646,7 @@ _0811838C: bl SetGpuReg b _0811852A _0811839C: - ldr r1, =gUnknown_02022E26 + ldr r1, =gBattle_WIN0V ldrh r0, [r1] subs r0, 0xFF strh r0, [r1] @@ -50715,7 +50715,7 @@ _08118420: _0811842C: strh r0, [r2] _0811842E: - ldr r2, =gUnknown_02022E26 + ldr r2, =gBattle_WIN0V ldrh r1, [r2] movs r0, 0xFF lsls r0, 8 @@ -50988,7 +50988,7 @@ _08118662: b _0811881A .pool _08118678: - ldr r1, =gUnknown_02022E26 + ldr r1, =gBattle_WIN0V ldrh r0, [r1] subs r0, 0xFF strh r0, [r1] @@ -51065,7 +51065,7 @@ _08118708: movs r0, 0x4 strh r0, [r1, 0x12] _08118728: - ldr r2, =gUnknown_02022E26 + ldr r2, =gBattle_WIN0V ldrh r1, [r2] movs r0, 0xFF lsls r0, 8 @@ -51288,7 +51288,7 @@ _08118908: b _08118A96 .pool _0811891C: - ldr r1, =gUnknown_02022E26 + ldr r1, =gBattle_WIN0V ldrh r0, [r1] subs r0, 0xFF strh r0, [r1] @@ -51354,7 +51354,7 @@ _08118986: movs r0, 0x6 strh r0, [r2, 0x12] _081189A6: - ldr r2, =gUnknown_02022E26 + ldr r2, =gBattle_WIN0V ldrh r1, [r2] movs r0, 0xFF lsls r0, 8 @@ -51652,7 +51652,7 @@ _08118BA8: b _08118D5A .pool _08118C38: - ldr r1, =gUnknown_02022E26 + ldr r1, =gBattle_WIN0V ldrh r0, [r1] subs r0, 0xFF strh r0, [r1] @@ -51683,7 +51683,7 @@ _08118C50: b _08118D5A .pool _08118C7C: - ldr r2, =gUnknown_02022E26 + ldr r2, =gBattle_WIN0V ldrh r1, [r2] movs r0, 0xFF lsls r0, 8 @@ -51874,7 +51874,7 @@ _08118DD4: ldr r1, =0x00003f3f movs r0, 0x4A bl SetGpuReg - ldr r1, =gUnknown_02022E16 + ldr r1, =gBattle_BG0_Y ldr r2, =0x0000ffd0 adds r0, r2, 0 strh r0, [r1] @@ -51888,7 +51888,7 @@ _08118DD4: b _08118FB2 .pool _08118E4C: - ldr r2, =gUnknown_02022E26 + ldr r2, =gBattle_WIN0V ldrh r3, [r2] movs r1, 0x80 lsls r1, 1 @@ -51932,7 +51932,7 @@ _08118E7E: b _08118FB2 .pool _08118EA8: - ldr r3, =gUnknown_02022E26 + ldr r3, =gBattle_WIN0V ldrh r2, [r3] movs r0, 0xFF lsls r0, 8 @@ -51973,7 +51973,7 @@ _08118ED8: b _08118FB2 .pool _08118F00: - ldr r1, =gUnknown_02022E16 + ldr r1, =gBattle_BG0_Y ldrh r0, [r1] adds r3, r0, 0x2 strh r3, [r1] @@ -51981,7 +51981,7 @@ _08118F00: ldrh r0, [r1] adds r0, 0x2 strh r0, [r1] - ldr r5, =gUnknown_02022E26 + ldr r5, =gBattle_WIN0V ldrh r2, [r5] movs r0, 0xFF lsls r0, 8 @@ -52081,7 +52081,7 @@ sub_8118FBC: @ 8118FBC bl GetBankByIdentity lsls r0, 24 lsrs r0, 24 - ldr r1, =gBattleSpritesGfx + ldr r1, =gMonSpritesGfxPtr ldr r2, [r1] lsls r4, 2 adds r2, 0x4 @@ -52189,7 +52189,7 @@ sub_8119094: @ 8119094 lsls r0, 24 mov r9, r0 ldr r4, =0x040000d4 - ldr r0, =gBattleSpritesGfx + ldr r0, =gMonSpritesGfxPtr ldr r0, [r0] lsrs r2, 22 adds r0, 0x4 diff --git a/asm/battle_anim_815A0D4.s b/asm/battle_anim_815A0D4.s index f219c6988..849655fe5 100755 --- a/asm/battle_anim_815A0D4.s +++ b/asm/battle_anim_815A0D4.s @@ -1077,10 +1077,10 @@ sub_815A934: @ 815A934 lsls r1, 8 movs r0, 0 bl SetGpuRegBits - ldr r0, =gUnknown_02022E24 + ldr r0, =gBattle_WIN0H movs r1, 0 strh r1, [r0] - ldr r4, =gUnknown_02022E26 + ldr r4, =gBattle_WIN0V strh r1, [r4] movs r0, 0x40 movs r1, 0 @@ -1416,18 +1416,18 @@ sub_815ABEC: @ 815ABEC ldr r1, =0x00001f3f movs r0, 0x48 bl SetGpuReg - ldr r1, =gUnknown_02022E28 + ldr r1, =gBattle_WIN1H ldr r2, =0x000098f0 adds r0, r2, 0 strh r0, [r1] - ldr r1, =gUnknown_02022E2A + ldr r1, =gBattle_WIN1V movs r0, 0xA0 strh r0, [r1] - ldr r0, =gUnknown_02022E24 + ldr r0, =gBattle_WIN0H ldrh r1, [r0] movs r0, 0x42 bl SetGpuReg - ldr r0, =gUnknown_02022E26 + ldr r0, =gBattle_WIN0V ldrh r1, [r0] movs r0, 0x46 bl SetGpuReg @@ -1437,10 +1437,10 @@ _0815AC40: ldr r1, =0x00001f3f movs r0, 0x48 bl SetGpuReg - ldr r1, =gUnknown_02022E28 + ldr r1, =gBattle_WIN1H movs r0, 0xF0 strh r0, [r1] - ldr r4, =gUnknown_02022E2A + ldr r4, =gBattle_WIN1V ldr r1, =0x000078a0 adds r0, r1, 0 strh r0, [r4] @@ -1471,10 +1471,10 @@ sub_815AC8C: @ 815AC8C ldr r1, =0x00003f3f movs r0, 0x48 bl SetGpuReg - ldr r0, =gUnknown_02022E28 + ldr r0, =gBattle_WIN1H movs r1, 0 strh r1, [r0] - ldr r0, =gUnknown_02022E2A + ldr r0, =gBattle_WIN1V strh r1, [r0] bl IsContest lsls r0, 24 @@ -3024,7 +3024,7 @@ _0815B8E0: lsls r0, 24 lsrs r1, r0, 24 _0815B8EA: - ldr r0, =gBattleSpritesGfx + ldr r0, =gMonSpritesGfxPtr ldr r2, [r0] lsls r0, r1, 2 adds r2, 0x4 @@ -5397,10 +5397,10 @@ sub_815CC94: @ 815CC94 lsls r1, 8 movs r0, 0 bl SetGpuRegBits - ldr r0, =gUnknown_02022E24 + ldr r0, =gBattle_WIN0H movs r1, 0 strh r1, [r0] - ldr r4, =gUnknown_02022E26 + ldr r4, =gBattle_WIN0V strh r1, [r4] movs r0, 0x40 movs r1, 0 diff --git a/asm/battle_anim_8170478.s b/asm/battle_anim_8170478.s index 85f94c20e..cb6391cee 100644 --- a/asm/battle_anim_8170478.s +++ b/asm/battle_anim_8170478.s @@ -18,10 +18,10 @@ sub_8170478: @ 8170478 str r0, [sp, 0x10] ldr r0, =gAnimationBankAttacker ldrb r4, [r0] - ldr r0, =gUnknown_02022E24 + ldr r0, =gBattle_WIN0H movs r1, 0 strh r1, [r0] - ldr r0, =gUnknown_02022E26 + ldr r0, =gBattle_WIN0V strh r1, [r0] ldr r1, =0x00003f3f movs r0, 0x48 @@ -317,9 +317,9 @@ _08170708: bne _08170814 movs r0, 0 bl sub_80A477C - ldr r0, =gUnknown_02022E24 + ldr r0, =gBattle_WIN0H strh r4, [r0] - ldr r0, =gUnknown_02022E26 + ldr r0, =gBattle_WIN0V strh r4, [r0] ldr r4, =0x00003f3f movs r0, 0x48 diff --git a/asm/battle_controller_linkopponent.s b/asm/battle_controller_linkopponent.s index 5a762a174..a7168623c 100644 --- a/asm/battle_controller_linkopponent.s +++ b/asm/battle_controller_linkopponent.s @@ -5031,10 +5031,10 @@ _08066FE4: thumb_func_start sub_8066FF4 sub_8066FF4: @ 8066FF4 push {r4,r5,lr} - ldr r0, =gUnknown_02022E14 + ldr r0, =gBattle_BG0_X movs r1, 0 strh r1, [r0] - ldr r0, =gUnknown_02022E16 + ldr r0, =gBattle_BG0_Y strh r1, [r0] ldr r5, =gActiveBank ldrb r4, [r5] diff --git a/asm/battle_controller_linkpartner.s b/asm/battle_controller_linkpartner.s index 3a1b21ed7..5b0ac0491 100644 --- a/asm/battle_controller_linkpartner.s +++ b/asm/battle_controller_linkpartner.s @@ -4340,10 +4340,10 @@ _0814D580: thumb_func_start sub_814D590 sub_814D590: @ 814D590 push {r4,r5,lr} - ldr r0, =gUnknown_02022E14 + ldr r0, =gBattle_BG0_X movs r1, 0 strh r1, [r0] - ldr r0, =gUnknown_02022E16 + ldr r0, =gBattle_BG0_Y strh r1, [r0] ldr r5, =gActiveBank ldrb r4, [r5] diff --git a/asm/battle_controller_opponent.s b/asm/battle_controller_opponent.s index 69d4776d4..f54896ca7 100644 --- a/asm/battle_controller_opponent.s +++ b/asm/battle_controller_opponent.s @@ -5171,10 +5171,10 @@ _08061F24: thumb_func_start sub_8061F34 sub_8061F34: @ 8061F34 push {r4,r5,lr} - ldr r0, =gUnknown_02022E14 + ldr r0, =gBattle_BG0_X movs r1, 0 strh r1, [r0] - ldr r0, =gUnknown_02022E16 + ldr r0, =gBattle_BG0_Y strh r1, [r0] ldr r5, =gActiveBank ldrb r4, [r5] @@ -6655,7 +6655,7 @@ sub_8062BB0: @ 8062BB0 negs r0, r0 ands r0, r1 strb r0, [r3] - ldr r0, =gUnknown_03005D00 + ldr r0, =gPreBattleCallback1 ldr r0, [r0] str r0, [r2] ldr r0, [r2, 0x8] diff --git a/asm/battle_controller_player.s b/asm/battle_controller_player.s index 5f7e1b954..b829296d8 100644 --- a/asm/battle_controller_player.s +++ b/asm/battle_controller_player.s @@ -1287,10 +1287,10 @@ _08057FD6: beq _08057FF8 movs r0, 0x5 bl PlaySE - ldr r1, =gUnknown_02022E14 + ldr r1, =gBattle_BG0_X movs r0, 0 strh r0, [r1] - ldr r1, =gUnknown_02022E16 + ldr r1, =gBattle_BG0_Y movs r2, 0xA0 lsls r2, 1 adds r0, r2, 0 @@ -2123,7 +2123,7 @@ sub_80586F8: @ 80586F8 ldrb r0, [r0] cmp r0, 0 bne _0805875C - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0 bne _08058798 @@ -2137,7 +2137,7 @@ sub_80586F8: @ 80586F8 negs r0, r0 ands r0, r1 strb r0, [r2] - ldr r0, =gUnknown_03005D00 + ldr r0, =gPreBattleCallback1 ldr r0, [r0] str r0, [r3] ldr r0, =sub_8038D64 @@ -2166,7 +2166,7 @@ _0805875C: negs r0, r0 ands r0, r1 strb r0, [r2] - ldr r0, =gUnknown_03005D00 + ldr r0, =gPreBattleCallback1 ldr r0, [r0] str r0, [r3] ldr r0, =sub_8038D64 @@ -2233,7 +2233,7 @@ _08058810: negs r0, r0 ands r0, r1 strb r0, [r3] - ldr r0, =gUnknown_03005D00 + ldr r0, =gPreBattleCallback1 ldr r0, [r0] str r0, [r2] ldr r0, [r2, 0x8] @@ -4711,10 +4711,10 @@ b_link_standby_message: @ 8059DC0 ands r0, r1 cmp r0, 0 beq _08059DE0 - ldr r0, =gUnknown_02022E14 + ldr r0, =gBattle_BG0_X movs r1, 0 strh r1, [r0] - ldr r0, =gUnknown_02022E16 + ldr r0, =gBattle_BG0_Y strh r1, [r0] ldr r0, =gText_LinkStandby movs r1, 0 @@ -8444,10 +8444,10 @@ _0805BF70: thumb_func_start sub_805BF80 sub_805BF80: @ 805BF80 push {r4,r5,lr} - ldr r0, =gUnknown_02022E14 + ldr r0, =gBattle_BG0_X movs r1, 0 strh r1, [r0] - ldr r0, =gUnknown_02022E16 + ldr r0, =gBattle_BG0_Y strh r1, [r0] ldr r5, =gActiveBank ldrb r4, [r5] @@ -8503,9 +8503,9 @@ sub_805C004: @ 805C004 lsrs r1, r0, 24 cmp r1, 0 bne _0805C02A - ldr r0, =gUnknown_02022E14 + ldr r0, =gBattle_BG0_X strh r1, [r0] - ldr r1, =gUnknown_02022E16 + ldr r1, =gBattle_BG0_Y movs r0, 0xA0 strh r0, [r1] ldr r1, =gBattleBankFunc @@ -8611,9 +8611,9 @@ sub_805C114: @ 805C114 lsrs r1, r0, 24 cmp r1, 0 bne _0805C13E - ldr r0, =gUnknown_02022E14 + ldr r0, =gBattle_BG0_X strh r1, [r0] - ldr r1, =gUnknown_02022E16 + ldr r1, =gBattle_BG0_Y movs r2, 0xA0 lsls r2, 1 adds r0, r2, 0 diff --git a/asm/battle_controller_player_partner.s b/asm/battle_controller_player_partner.s index 784eacab1..185b8d5ca 100644 --- a/asm/battle_controller_player_partner.s +++ b/asm/battle_controller_player_partner.s @@ -4952,10 +4952,10 @@ _081BDA3C: thumb_func_start sub_81BDA4C sub_81BDA4C: @ 81BDA4C push {r4,lr} - ldr r0, =gUnknown_02022E14 + ldr r0, =gBattle_BG0_X movs r1, 0 strh r1, [r0] - ldr r0, =gUnknown_02022E16 + ldr r0, =gBattle_BG0_Y strh r1, [r0] ldr r4, =gActiveBank ldrb r0, [r4] diff --git a/asm/battle_controller_recorded_opponent.s b/asm/battle_controller_recorded_opponent.s index 90928e7d4..5c420158a 100644 --- a/asm/battle_controller_recorded_opponent.s +++ b/asm/battle_controller_recorded_opponent.s @@ -4708,10 +4708,10 @@ _08188E80: thumb_func_start sub_8188E90 sub_8188E90: @ 8188E90 push {r4,lr} - ldr r0, =gUnknown_02022E14 + ldr r0, =gBattle_BG0_X movs r1, 0 strh r1, [r0] - ldr r0, =gUnknown_02022E16 + ldr r0, =gBattle_BG0_Y strh r1, [r0] ldr r4, =gActiveBank ldrb r0, [r4] diff --git a/asm/battle_controller_recorded_player.s b/asm/battle_controller_recorded_player.s index 534f34068..6ab274da2 100644 --- a/asm/battle_controller_recorded_player.s +++ b/asm/battle_controller_recorded_player.s @@ -4808,10 +4808,10 @@ _0818C42C: thumb_func_start sub_818C43C sub_818C43C: @ 818C43C push {r4,lr} - ldr r0, =gUnknown_02022E14 + ldr r0, =gBattle_BG0_X movs r1, 0 strh r1, [r0] - ldr r0, =gUnknown_02022E16 + ldr r0, =gBattle_BG0_Y strh r1, [r0] ldr r4, =gActiveBank ldrb r0, [r4] diff --git a/asm/battle_controller_safari.s b/asm/battle_controller_safari.s index cc149ea4f..dac3034a9 100644 --- a/asm/battle_controller_safari.s +++ b/asm/battle_controller_safari.s @@ -318,7 +318,7 @@ sub_81595E4: @ 81595E4 negs r0, r0 ands r0, r1 strb r0, [r3] - ldr r0, =gUnknown_03005D00 + ldr r0, =gPreBattleCallback1 ldr r0, [r0] str r0, [r2] ldr r0, [r2, 0x8] @@ -778,10 +778,10 @@ sub_81599D0: @ 81599D0 thumb_func_start dp01t_10_6_message dp01t_10_6_message: @ 81599DC push {r4,lr} - ldr r0, =gUnknown_02022E14 + ldr r0, =gBattle_BG0_X movs r1, 0 strh r1, [r0] - ldr r0, =gUnknown_02022E16 + ldr r0, =gBattle_BG0_Y strh r1, [r0] ldr r4, =gActiveBank ldrb r0, [r4] @@ -832,9 +832,9 @@ sub_8159A54: @ 8159A54 lsrs r1, r0, 24 cmp r1, 0 bne _08159A7A - ldr r0, =gUnknown_02022E14 + ldr r0, =gBattle_BG0_X strh r1, [r0] - ldr r1, =gUnknown_02022E16 + ldr r1, =gBattle_BG0_Y movs r0, 0xA0 strh r0, [r1] ldr r1, =gBattleBankFunc diff --git a/asm/battle_controller_wally.s b/asm/battle_controller_wally.s index eab717466..51193024f 100644 --- a/asm/battle_controller_wally.s +++ b/asm/battle_controller_wally.s @@ -3592,10 +3592,10 @@ _0816A3AC: thumb_func_start sub_816A3B8 sub_816A3B8: @ 816A3B8 push {r4,lr} - ldr r0, =gUnknown_02022E14 + ldr r0, =gBattle_BG0_X movs r1, 0 strh r1, [r0] - ldr r0, =gUnknown_02022E16 + ldr r0, =gBattle_BG0_Y strh r1, [r0] ldr r4, =gActiveBank ldrb r0, [r4] @@ -3646,9 +3646,9 @@ sub_816A430: @ 816A430 lsrs r1, r0, 24 cmp r1, 0 bne _0816A456 - ldr r0, =gUnknown_02022E14 + ldr r0, =gBattle_BG0_X strh r1, [r0] - ldr r1, =gUnknown_02022E16 + ldr r1, =gBattle_BG0_Y movs r0, 0xA0 strh r0, [r1] ldr r1, =gBattleBankFunc @@ -3749,9 +3749,9 @@ _0816A522: lsrs r1, r0, 24 cmp r1, 0 bne _0816A574 - ldr r0, =gUnknown_02022E14 + ldr r0, =gBattle_BG0_X strh r1, [r0] - ldr r1, =gUnknown_02022E16 + ldr r1, =gBattle_BG0_Y movs r2, 0xA0 lsls r2, 1 adds r0, r2, 0 diff --git a/asm/battle_frontier_1.s b/asm/battle_frontier_1.s index e870c8798..4c44855f9 100755 --- a/asm/battle_frontier_1.s +++ b/asm/battle_frontier_1.s @@ -3161,9 +3161,9 @@ _0819044E: ldr r0, =gUnknown_0860CEB4 bl InitWindows bl DeactivateAllTextPrinters - ldr r0, =gUnknown_02022E14 + ldr r0, =gBattle_BG0_X strh r4, [r0] - ldr r0, =gUnknown_02022E16 + ldr r0, =gBattle_BG0_Y strh r4, [r0] ldr r0, =gBattle_BG1_X strh r4, [r0] @@ -3171,7 +3171,7 @@ _0819044E: strh r4, [r0] ldr r0, =gBattle_BG3_X strh r4, [r0] - ldr r0, =gUnknown_02022E22 + ldr r0, =gBattle_BG3_Y strh r4, [r0] mov r2, r9 cmp r2, 0x2 @@ -4366,10 +4366,10 @@ _08190E98: ldrsh r2, [r0, r5] cmp r2, 0 beq _08190ED4 - ldr r0, =gUnknown_02022E14 + ldr r0, =gBattle_BG0_X movs r1, 0 strh r1, [r0] - ldr r0, =gUnknown_02022E16 + ldr r0, =gBattle_BG0_Y strh r1, [r0] ldr r0, =gBattle_BG1_X strh r1, [r0] @@ -4379,9 +4379,9 @@ _08190E98: b _08190EE6 .pool _08190ED4: - ldr r0, =gUnknown_02022E14 + ldr r0, =gBattle_BG0_X strh r2, [r0] - ldr r1, =gUnknown_02022E16 + ldr r1, =gBattle_BG0_Y movs r0, 0xA0 strh r0, [r1] ldr r0, =gBattle_BG1_X @@ -4765,10 +4765,10 @@ _08191234: ldrsh r2, [r0, r5] cmp r2, 0 beq _08191278 - ldr r0, =gUnknown_02022E14 + ldr r0, =gBattle_BG0_X movs r1, 0 strh r1, [r0] - ldr r0, =gUnknown_02022E16 + ldr r0, =gBattle_BG0_Y strh r1, [r0] ldr r0, =gBattle_BG1_X strh r1, [r0] @@ -4779,9 +4779,9 @@ _08191234: b _0819128C .pool _08191278: - ldr r0, =gUnknown_02022E14 + ldr r0, =gBattle_BG0_X strh r2, [r0] - ldr r1, =gUnknown_02022E16 + ldr r1, =gBattle_BG0_Y ldr r3, =0x0000ff60 adds r0, r3, 0 strh r0, [r1] @@ -5157,10 +5157,10 @@ _081915CC: ldrsh r2, [r0, r5] cmp r2, 0 beq _0819160C - ldr r0, =gUnknown_02022E14 + ldr r0, =gBattle_BG0_X movs r1, 0 strh r1, [r0] - ldr r0, =gUnknown_02022E16 + ldr r0, =gBattle_BG0_Y strh r1, [r0] ldr r2, =gBattle_BG1_X movs r6, 0x80 @@ -5172,12 +5172,12 @@ _081915CC: b _08191622 .pool _0819160C: - ldr r1, =gUnknown_02022E14 + ldr r1, =gBattle_BG0_X movs r3, 0x80 lsls r3, 1 adds r0, r3, 0 strh r0, [r1] - ldr r0, =gUnknown_02022E16 + ldr r0, =gBattle_BG0_Y strh r2, [r0] ldr r0, =gBattle_BG1_X strh r2, [r0] @@ -5457,10 +5457,10 @@ _0819187C: ldrsh r2, [r0, r5] cmp r2, 0 beq _081918BC - ldr r0, =gUnknown_02022E14 + ldr r0, =gBattle_BG0_X movs r1, 0 strh r1, [r0] - ldr r0, =gUnknown_02022E16 + ldr r0, =gBattle_BG0_Y strh r1, [r0] ldr r2, =gBattle_BG1_X movs r6, 0x80 @@ -5472,12 +5472,12 @@ _0819187C: b _081918D2 .pool _081918BC: - ldr r1, =gUnknown_02022E14 + ldr r1, =gBattle_BG0_X movs r3, 0x80 lsls r3, 1 adds r0, r3, 0 strh r0, [r1] - ldr r0, =gUnknown_02022E16 + ldr r0, =gBattle_BG0_Y strh r2, [r0] ldr r0, =gBattle_BG1_X strh r2, [r0] @@ -5744,10 +5744,10 @@ _08191B08: ldrsh r2, [r0, r5] cmp r2, 0 beq _08191B48 - ldr r0, =gUnknown_02022E14 + ldr r0, =gBattle_BG0_X movs r1, 0 strh r1, [r0] - ldr r0, =gUnknown_02022E16 + ldr r0, =gBattle_BG0_Y strh r1, [r0] ldr r2, =gBattle_BG1_X movs r6, 0xFF @@ -5759,12 +5759,12 @@ _08191B08: b _08191B5E .pool _08191B48: - ldr r1, =gUnknown_02022E14 + ldr r1, =gBattle_BG0_X movs r3, 0xFF lsls r3, 8 adds r0, r3, 0 strh r0, [r1] - ldr r0, =gUnknown_02022E16 + ldr r0, =gBattle_BG0_Y strh r2, [r0] ldr r0, =gBattle_BG1_X strh r2, [r0] @@ -6011,10 +6011,10 @@ _08191D68: ldrsh r2, [r0, r5] cmp r2, 0 beq _08191DA8 - ldr r0, =gUnknown_02022E14 + ldr r0, =gBattle_BG0_X movs r1, 0 strh r1, [r0] - ldr r0, =gUnknown_02022E16 + ldr r0, =gBattle_BG0_Y strh r1, [r0] ldr r2, =gBattle_BG1_X movs r6, 0xFF @@ -6026,12 +6026,12 @@ _08191D68: b _08191DBE .pool _08191DA8: - ldr r1, =gUnknown_02022E14 + ldr r1, =gBattle_BG0_X movs r3, 0xFF lsls r3, 8 adds r0, r3, 0 strh r0, [r1] - ldr r0, =gUnknown_02022E16 + ldr r0, =gBattle_BG0_Y strh r2, [r0] ldr r0, =gBattle_BG1_X strh r2, [r0] @@ -6306,7 +6306,7 @@ _08191FF8: asrs r0, 16 cmp r0, 0x29 beq _08192100 - ldr r1, =gUnknown_02022E16 + ldr r1, =gBattle_BG0_Y ldrh r0, [r1] subs r0, 0x4 strh r0, [r1] @@ -6331,7 +6331,7 @@ _08192038: asrs r0, 16 cmp r0, 0x29 beq _08192100 - ldr r1, =gUnknown_02022E16 + ldr r1, =gBattle_BG0_Y ldrh r0, [r1] adds r0, 0x4 strh r0, [r1] @@ -6356,7 +6356,7 @@ _08192078: asrs r0, 16 cmp r0, 0x41 beq _08192100 - ldr r1, =gUnknown_02022E14 + ldr r1, =gBattle_BG0_X ldrh r0, [r1] subs r0, 0x4 strh r0, [r1] @@ -6385,7 +6385,7 @@ _081920BC: asrs r0, 16 cmp r0, 0x41 beq _08192100 - ldr r1, =gUnknown_02022E14 + ldr r1, =gBattle_BG0_X ldrh r0, [r1] adds r0, 0x4 strh r0, [r1] @@ -10400,9 +10400,9 @@ _0819427C: ldr r0, =gUnknown_0860CE94 bl InitWindows bl DeactivateAllTextPrinters - ldr r0, =gUnknown_02022E14 + ldr r0, =gBattle_BG0_X strh r4, [r0] - ldr r0, =gUnknown_02022E16 + ldr r0, =gBattle_BG0_Y strh r4, [r0] ldr r0, =gBattle_BG1_X strh r4, [r0] @@ -11358,11 +11358,11 @@ sub_8194B70: @ 8194B70 movs r1, 0x80 movs r2, 0x2 bl ChangeBgY - ldr r0, =gUnknown_02022E14 + ldr r0, =gBattle_BG0_X ldrh r1, [r0] movs r0, 0x10 bl SetGpuReg - ldr r0, =gUnknown_02022E16 + ldr r0, =gBattle_BG0_Y ldrh r1, [r0] movs r0, 0x12 bl SetGpuReg @@ -11486,11 +11486,11 @@ _08194CD4: thumb_func_start sub_8194CE4 sub_8194CE4: @ 8194CE4 push {lr} - ldr r0, =gUnknown_02022E14 + ldr r0, =gBattle_BG0_X ldrh r1, [r0] movs r0, 0x10 bl SetGpuReg - ldr r0, =gUnknown_02022E16 + ldr r0, =gBattle_BG0_Y ldrh r1, [r0] movs r0, 0x12 bl SetGpuReg diff --git a/asm/battle_frontier_2.s b/asm/battle_frontier_2.s index 36898e456..3d3fba02b 100755 --- a/asm/battle_frontier_2.s +++ b/asm/battle_frontier_2.s @@ -20533,10 +20533,10 @@ _081A52A4: lsls r1, 1 movs r2, 0x20 bl LoadCompressedPalette - ldr r1, =gUnknown_02022E24 + ldr r1, =gBattle_WIN0H movs r0, 0xFF strh r0, [r1] - ldr r1, =gUnknown_02022E26 + ldr r1, =gBattle_WIN0V movs r0, 0x70 strh r0, [r1] b _081A553E diff --git a/asm/battle_interface.s b/asm/battle_interface.s index 31ad9a330..8bc9553f7 100755 --- a/asm/battle_interface.s +++ b/asm/battle_interface.s @@ -1317,7 +1317,7 @@ _08072D86: movs r2, 0x1 movs r3, 0x3 bl ConvertIntToDecimalStringN - ldr r0, =gBattleSpritesGfx + ldr r0, =gMonSpritesGfxPtr ldr r0, [r0] movs r1, 0xBA lsls r1, 1 @@ -1333,7 +1333,7 @@ _08072D86: lsls r0, 2 adds r5, r0, r1 _08072DB8: - ldr r0, =gBattleSpritesGfx + ldr r0, =gMonSpritesGfxPtr ldr r0, [r0] movs r1, 0xBA lsls r1, 1 @@ -1536,7 +1536,7 @@ _08072F52: ldr r1, =gText_Slash bl StringCopy _08072F82: - ldr r0, =gBattleSpritesGfx + ldr r0, =gMonSpritesGfxPtr ldr r0, [r0] movs r1, 0xBA lsls r1, 1 @@ -1556,7 +1556,7 @@ _08072F82: _08072FA6: cmp r4, 0x2 bhi _08072FF0 - ldr r0, =gBattleSpritesGfx + ldr r0, =gMonSpritesGfxPtr ldr r0, [r0] movs r2, 0xBA lsls r2, 1 @@ -1579,7 +1579,7 @@ _08072FA6: b _0807301A .pool _08072FF0: - ldr r0, =gBattleSpritesGfx + ldr r0, =gMonSpritesGfxPtr ldr r0, [r0] movs r1, 0xBA lsls r1, 1 @@ -1609,7 +1609,7 @@ _08073024: mov r3, r8 cmp r3, 0 bne _08073084 - ldr r0, =gBattleSpritesGfx + ldr r0, =gMonSpritesGfxPtr ldr r0, [r0] movs r1, 0xBA lsls r1, 1 @@ -1702,7 +1702,7 @@ sub_80730D4: @ 80730D4 lsls r0, 24 lsrs r0, 24 bl GetBankIdentity - ldr r1, =gBattleSpritesGfx + ldr r1, =gMonSpritesGfxPtr ldr r2, [r1] movs r3, 0xBA lsls r3, 1 @@ -1877,7 +1877,7 @@ _08073236: strb r0, [r1, 0x5] movs r0, 0xBA strb r0, [r1, 0x8] - ldr r5, =gBattleSpritesGfx + ldr r5, =gMonSpritesGfxPtr ldr r0, [r5] movs r2, 0xBA lsls r2, 1 diff --git a/asm/battle_setup.s b/asm/battle_setup.s index c2c762e96..fcc0de95b 100644 --- a/asm/battle_setup.s +++ b/asm/battle_setup.s @@ -41,7 +41,7 @@ _080B062E: cmp r0, 0x1 bne _080B0652 bl overworld_free_bg_tilemaps - ldr r0, =sub_8036760 + ldr r0, =CB2_InitBattle bl SetMainCallback2 bl prev_quest_postbuffer_cursor_backup_reset bl overworld_poison_timer_set @@ -638,8 +638,8 @@ _080B0BC6: .pool thumb_func_end sub_80B0B6C - thumb_func_start sub_80B0BD0 -sub_80B0BD0: @ 80B0BD0 + thumb_func_start BattleSetup_GetTerrainId +BattleSetup_GetTerrainId: @ 80B0BD0 push {r4,r5,lr} sub sp, 0x4 mov r4, sp @@ -798,7 +798,7 @@ _080B0D1A: pop {r4,r5} pop {r1} bx r1 - thumb_func_end sub_80B0BD0 + thumb_func_end BattleSetup_GetTerrainId thumb_func_start sub_80B0D24 sub_80B0D24: @ 80B0D24 @@ -1387,7 +1387,7 @@ sub_80B11A8: @ 80B11A8 ldr r0, =sub_80B1204 str r0, [r1, 0x8] bl FreeAllWindowBuffers - ldr r0, =sub_8036760 + ldr r0, =CB2_InitBattle bl SetMainCallback2 bl prev_quest_postbuffer_cursor_backup_reset bl overworld_poison_timer_set diff --git a/asm/battle_tower.s b/asm/battle_tower.s index 0782b8609..eb91121ae 100755 --- a/asm/battle_tower.s +++ b/asm/battle_tower.s @@ -3194,7 +3194,7 @@ sub_8163A8C: @ 8163A8C ldr r0, =gMain ldr r1, =sub_81639AC str r1, [r0, 0x8] - ldr r0, =sub_8036760 + ldr r0, =CB2_InitBattle bl SetMainCallback2 adds r0, r4, 0 bl DestroyTask @@ -5125,21 +5125,21 @@ _08164C18: lsrs r0, 24 mov r1, sp movs r2, 0x4 - bl link_0800A448 + bl SendBlock ldr r1, =gScriptResult movs r0, 0x1 b _08164DB4 .pool _08164C3C: - bl sub_800A550 + bl GetBlockReceivedStatus movs r1, 0x3 ands r1, r0 cmp r1, 0x3 beq _08164C4A b _08164DB6 _08164C4A: - bl sub_800A5B4 - ldr r1, =gUnknown_020223C4 + bl ResetBlockReceivedFlags + ldr r1, =gBlockRecvBuffer movs r0, 0x80 lsls r0, 1 adds r2, r1, r0 @@ -5221,23 +5221,23 @@ _08164CE0: ldr r3, =0x00000cb4 adds r1, r3 movs r2, 0x28 - bl link_0800A448 + bl SendBlock ldr r1, =gScriptResult movs r0, 0x3 b _08164DB4 .pool _08164D14: - bl sub_800A550 + bl GetBlockReceivedStatus movs r1, 0x3 ands r1, r0 cmp r1, 0x3 bne _08164DB6 - bl sub_800A5B4 + bl ResetBlockReceivedFlags ldr r4, =gSaveBlock2Ptr ldr r0, [r4] ldr r5, =0x00000cb4 adds r0, r5 - ldr r1, =gUnknown_020223C4 + ldr r1, =gBlockRecvBuffer movs r2, 0x28 bl memcpy ldr r2, =gTrainerBattleOpponent_A @@ -5260,7 +5260,7 @@ _08164D14: ldrh r0, [r4] movs r1, 0x1 bl sub_8162614 - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0 beq _08164DB0 @@ -5279,7 +5279,7 @@ _08164D98: b _08164DB4 .pool _08164DA8: - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0 bne _08164DB6 diff --git a/asm/battle_transition.s b/asm/battle_transition.s index 6406a3f24..a6e44f087 100644 --- a/asm/battle_transition.s +++ b/asm/battle_transition.s @@ -9513,11 +9513,11 @@ sub_814ABE4: @ 814ABE4 strh r0, [r6, 0xC] cmp r0, 0 bne _0814AC24 - ldr r5, =gUnknown_02022E14 + ldr r5, =gBattle_BG0_X ldrh r1, [r5] movs r0, 0x12 bl SetGpuReg - ldr r4, =gUnknown_02022E16 + ldr r4, =gBattle_BG0_Y ldrh r1, [r4] movs r0, 0x10 bl SetGpuReg @@ -9562,9 +9562,9 @@ sub_814AC38: @ 814AC38 movs r1, 0xF0 movs r2, 0x20 bl LoadPalette - ldr r0, =gUnknown_02022E14 + ldr r0, =gBattle_BG0_X strh r5, [r0] - ldr r4, =gUnknown_02022E16 + ldr r4, =gBattle_BG0_Y strh r5, [r4] movs r0, 0x12 movs r1, 0 @@ -9781,10 +9781,10 @@ sub_814AE40: @ 814AE40 push {r4,r5,lr} sub sp, 0x8 adds r5, r0, 0 - ldr r0, =gUnknown_02022E14 + ldr r0, =gBattle_BG0_X movs r1, 0 strh r1, [r0] - ldr r4, =gUnknown_02022E16 + ldr r4, =gBattle_BG0_Y strh r1, [r4] movs r0, 0x12 movs r1, 0 diff --git a/asm/berry_blender.s b/asm/berry_blender.s index 0599fa153..277a49d2f 100644 --- a/asm/berry_blender.s +++ b/asm/berry_blender.s @@ -512,7 +512,7 @@ _0807FBBE: adds r4, 0x1 cmp r4, 0x3 ble _0807FBBE - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0 beq _0807FC14 @@ -1116,7 +1116,7 @@ _08080126: adds r5, 0x1 cmp r5, 0x3 ble _08080126 - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0 bne _0808016A @@ -1213,7 +1213,7 @@ _08080248: bne _08080254 b _08080546 _08080254: - bl sub_800A5B4 + bl ResetBlockReceivedFlags bl GetMultiplayerId lsls r0, 24 cmp r0, 0 @@ -1239,7 +1239,7 @@ _08080282: movs r0, 0x4 movs r1, 0x1 bl sub_8197DF8 - bl sub_800A550 + bl GetBlockReceivedStatus adds r4, r0, 0 bl sub_800A9D8 lsls r4, 24 @@ -1260,7 +1260,7 @@ _080802AC: adds r0, r4, r0 adds r0, r6 lsls r1, r5, 8 - ldr r2, =gUnknown_020223C4 + ldr r2, =gBlockRecvBuffer adds r1, r2 movs r2, 0x10 bl memcpy @@ -1280,7 +1280,7 @@ _080802D4: lsrs r0, 24 cmp r5, r0 blt _080802AC - bl sub_800A5B4 + bl ResetBlockReceivedFlags b _080804F8 .pool _080802EC: @@ -1876,7 +1876,7 @@ sub_80807BC: @ 80807BC sub sp, 0x1C movs r0, 0 mov r10, r0 - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0 beq _080807DE @@ -3330,7 +3330,7 @@ sub_80814B0: @ 80814B0 lsrs r1, 16 lsls r2, 16 lsrs r2, 16 - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0 beq _080814E4 @@ -3633,7 +3633,7 @@ sub_8081744: @ 8081744 push {r4-r6,lr} movs r4, 0 movs r6, 0 - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0 beq _0808175A @@ -4702,7 +4702,7 @@ _08081F7C: sub_8081F94: @ 8081F94 push {lr} adds r1, r0, 0 - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0 beq _08081FB8 @@ -4810,7 +4810,7 @@ _08082078: adds r1, 0x4C movs r0, 0 strh r0, [r1] - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0 beq _080820B0 @@ -4848,7 +4848,7 @@ _080820E0: bne _080820EC b _0808249E _080820EC: - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0 beq _0808218C @@ -4911,7 +4911,7 @@ _08082132: adds r1, r4 movs r0, 0 movs r2, 0x20 - bl link_0800A448 + bl SendBlock lsls r0, 24 cmp r0, 0 bne _08082172 @@ -4941,7 +4941,7 @@ _0808218C: strh r2, [r0] movs r0, 0 movs r2, 0x28 - bl link_0800A448 + bl SendBlock lsls r0, 24 cmp r0, 0 bne _080821BE @@ -4951,20 +4951,20 @@ _080821BE: b _0808245C .pool _080821C8: - bl sub_800A550 + bl GetBlockReceivedStatus lsls r0, 24 cmp r0, 0 bne _080821D4 b _0808249E _080821D4: - bl sub_800A5B4 + bl ResetBlockReceivedFlags ldr r5, =gUnknown_020322A4 ldr r1, [r5] adds r1, 0x63 ldrb r0, [r1] adds r0, 0x1 strb r0, [r1] - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0 beq _08082254 @@ -4972,7 +4972,7 @@ _080821D4: ldrb r0, [r0] cmp r0, 0 beq _08082254 - ldr r2, =gUnknown_020223C4 + ldr r2, =gBlockRecvBuffer ldr r3, [r5] ldrh r0, [r2, 0x4] adds r1, r3, 0 @@ -5016,7 +5016,7 @@ _08082220: b _0808249E .pool _08082254: - ldr r2, =gUnknown_020223C4 + ldr r2, =gBlockRecvBuffer ldr r0, =gUnknown_020322A4 ldr r3, [r0] ldrh r0, [r2, 0x4] @@ -5748,7 +5748,7 @@ _080828BC: strb r0, [r1] b _080828DC _080828C6: - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r4, [r0] cmp r4, 0 bne _080828DC @@ -5966,7 +5966,7 @@ _08082A92: thumb_func_start sub_8082AD4 sub_8082AD4: @ 8082AD4 push {r4-r7,lr} - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0 bne _08082AE0 @@ -6242,7 +6242,7 @@ sub_8082D18: @ 8082D18 sub_8082D28: @ 8082D28 push {r4,lr} movs r1, 0 - ldr r4, =gUnknown_03003124 + ldr r4, =gReceivedRemoteLinkPlayers ldrb r0, [r4] cmp r0, 0 beq _08082D3C @@ -7909,7 +7909,7 @@ _08083A80: cmp r5, r0 bcc _08083A80 _08083A9E: - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0 bne _08083AB4 @@ -8514,7 +8514,7 @@ sub_8083F94: @ 8083F94 strb r0, [r7, 0xC] movs r0, 0xFF strb r0, [r7] - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0 beq _080840C4 diff --git a/asm/cable_club.s b/asm/cable_club.s index 80d9a0916..d5d3af151 100644 --- a/asm/cable_club.s +++ b/asm/cable_club.s @@ -1030,7 +1030,7 @@ sub_80B2C30: @ 80B2C30 bl sub_80B24F8 cmp r0, 0x1 beq _080B2C9C - bl sub_800A550 + bl GetBlockReceivedStatus adds r4, r0, 0 bl sub_800A9A8 lsls r4, 24 @@ -1047,7 +1047,7 @@ _080B2C5C: ldr r1, =gUnknown_02039B58 adds r0, r1 lsls r1, r4, 8 - ldr r2, =gUnknown_020223C4 + ldr r2, =gBlockRecvBuffer adds r1, r2 lsls r2, r4, 3 subs r2, r4 @@ -1066,7 +1066,7 @@ _080B2C7E: bcc _080B2C5C movs r0, 0 bl sub_800B330 - bl sub_800A5B4 + bl ResetBlockReceivedFlags ldr r0, =gScriptResult adds r1, r5, 0 bl task_map_chg_seq_0807EC34 @@ -1082,7 +1082,7 @@ sub_80B2CB0: @ 80B2CB0 push {r4,r5,lr} lsls r0, 24 lsrs r5, r0, 24 - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0 bne _080B2CDE @@ -1434,7 +1434,7 @@ _080B2FA8: bl DestroyTask b _080B2FC6 _080B2FB4: - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0 bne _080B2FC6 @@ -1706,7 +1706,7 @@ sub_80B3220: @ 80B3220 push {r4,lr} lsls r0, 24 lsrs r4, r0, 24 - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0x1 bne _080B3248 @@ -1836,7 +1836,7 @@ _080B3338: bl sub_800AC34 b _080B3346 _080B333E: - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] _080B3342: cmp r0, 0 @@ -1872,7 +1872,7 @@ _080B3378: lsls r2, 4 adds r0, r2, 0 strh r0, [r1] - ldr r0, =sub_8036760 + ldr r0, =CB2_InitBattle bl SetMainCallback2 ldr r1, =gMain ldr r0, =sub_80B360C @@ -1948,13 +1948,13 @@ _080B3444: ldr r1, =gUnknown_020229CC movs r0, 0 movs r2, 0x1C - bl link_0800A448 + bl SendBlock movs r0, 0x3 strh r0, [r6] b _080B3532 .pool _080B3458: - bl sub_800A550 + bl GetBlockReceivedStatus adds r4, r0, 0 bl sub_800A9D8 lsls r4, 24 @@ -1967,7 +1967,7 @@ _080B3458: .pool _080B3474: lsls r1, r4, 8 - ldr r2, =gUnknown_020223C4 + ldr r2, =gBlockRecvBuffer adds r0, r5, 0 adds r1, r2 ldm r1!, {r2,r3,r7} @@ -2045,7 +2045,7 @@ _080B3504: lsls r3, 4 adds r0, r3, 0 strh r0, [r1] - ldr r0, =sub_8036760 + ldr r0, =CB2_InitBattle bl SetMainCallback2 ldr r1, =gMain ldr r0, =sub_80B360C @@ -2128,7 +2128,7 @@ _080B35C8: b _080B35FE .pool _080B35E0: - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0 bne _080B35FE @@ -2425,7 +2425,7 @@ _080B3864: b _080B3884 .pool _080B3870: - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0 bne _080B3884 @@ -2657,7 +2657,7 @@ task00_08081A90: @ 80B3A30 adds r0, r4, 0 bl DestroyTask _080B3A62: - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0 beq _080B3AA6 @@ -2691,7 +2691,7 @@ sub_80B3AAC: @ 80B3AAC push {r4,lr} lsls r0, 24 lsrs r4, r0, 24 - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0 bne _080B3AC4 @@ -2804,7 +2804,7 @@ _080B3B96: strh r0, [r5] b _080B3BB8 _080B3B9E: - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0x1 bne _080B3BB8 diff --git a/asm/contest.s b/asm/contest.s index 023c6ebef..b469dd8eb 100644 --- a/asm/contest.s +++ b/asm/contest.s @@ -45,10 +45,10 @@ sub_80D7678: @ 80D7678 lsls r1, 7 movs r0, 0 bl SetGpuRegBits - ldr r0, =gUnknown_02022E14 + ldr r0, =gBattle_BG0_X movs r1, 0 strh r1, [r0] - ldr r0, =gUnknown_02022E16 + ldr r0, =gBattle_BG0_Y strh r1, [r0] ldr r0, =gBattle_BG1_X strh r1, [r0] @@ -60,15 +60,15 @@ sub_80D7678: @ 80D7678 strh r1, [r0] ldr r0, =gBattle_BG3_X strh r1, [r0] - ldr r0, =gUnknown_02022E22 + ldr r0, =gBattle_BG3_Y strh r1, [r0] - ldr r0, =gUnknown_02022E24 + ldr r0, =gBattle_WIN0H strh r1, [r0] - ldr r0, =gUnknown_02022E26 + ldr r0, =gBattle_WIN0V strh r1, [r0] - ldr r0, =gUnknown_02022E28 + ldr r0, =gBattle_WIN1H strh r1, [r0] - ldr r0, =gUnknown_02022E2A + ldr r0, =gBattle_WIN1V strh r1, [r0] pop {r4} pop {r0} @@ -546,8 +546,8 @@ _080D7B4E: ldr r0, =gUnknown_02039F38 strb r5, [r0] bl sub_80D7988 - bl init_uns_table_pokemon_copy - ldr r4, =gBattleSpritesGfx + bl AllocateMonSpritesGfx + ldr r4, =gMonSpritesGfxPtr ldr r0, [r4] ldr r0, [r0] bl Free @@ -1316,11 +1316,11 @@ _080D8266: thumb_func_start vblank_cb_battle vblank_cb_battle: @ 80D827C push {lr} - ldr r0, =gUnknown_02022E14 + ldr r0, =gBattle_BG0_X ldrh r1, [r0] movs r0, 0x10 bl SetGpuReg - ldr r0, =gUnknown_02022E16 + ldr r0, =gBattle_BG0_Y ldrh r1, [r0] movs r0, 0x12 bl SetGpuReg @@ -1344,23 +1344,23 @@ vblank_cb_battle: @ 80D827C ldrh r1, [r0] movs r0, 0x1C bl SetGpuReg - ldr r0, =gUnknown_02022E22 + ldr r0, =gBattle_BG3_Y ldrh r1, [r0] movs r0, 0x1E bl SetGpuReg - ldr r0, =gUnknown_02022E24 + ldr r0, =gBattle_WIN0H ldrh r1, [r0] movs r0, 0x40 bl SetGpuReg - ldr r0, =gUnknown_02022E26 + ldr r0, =gBattle_WIN0V ldrh r1, [r0] movs r0, 0x44 bl SetGpuReg - ldr r0, =gUnknown_02022E28 + ldr r0, =gBattle_WIN1H ldrh r1, [r0] movs r0, 0x42 bl SetGpuReg - ldr r0, =gUnknown_02022E2A + ldr r0, =gBattle_WIN1V ldrh r1, [r0] movs r0, 0x46 bl SetGpuReg @@ -1387,7 +1387,7 @@ sub_80D833C: @ 80D833C ldrsh r1, [r4, r0] cmp r1, 0 bne _080D840C - ldr r0, =gUnknown_02022E16 + ldr r0, =gBattle_BG0_Y strh r1, [r0] ldr r0, =gBattle_BG2_Y strh r1, [r0] @@ -1517,7 +1517,7 @@ sub_80D8490: @ 80D8490 lsls r0, 24 lsrs r0, 24 mov r9, r0 - ldr r0, =gUnknown_02022E16 + ldr r0, =gBattle_BG0_Y movs r1, 0xA0 strh r1, [r0] ldr r0, =gBattle_BG2_Y @@ -1770,7 +1770,7 @@ _080D86E4: adds r0, r4, 0 movs r1, 0 bl sub_80DEC30 - ldr r0, =gUnknown_02022E16 + ldr r0, =gBattle_BG0_Y movs r1, 0 strh r1, [r0] ldr r0, =gBattle_BG2_Y @@ -2041,7 +2041,7 @@ sub_80D895C: @ 80D895C lsls r0, 24 lsrs r7, r0, 24 bl sub_80DB89C - ldr r0, =gUnknown_02022E16 + ldr r0, =gBattle_BG0_Y movs r1, 0 strh r1, [r0] ldr r0, =gBattle_BG2_Y @@ -5322,7 +5322,7 @@ sub_80DA5E8: @ 80DA5E8 push {r4,r5,lr} lsls r0, 24 lsrs r5, r0, 24 - ldr r0, =gUnknown_02022E16 + ldr r0, =gBattle_BG0_Y movs r1, 0 strh r1, [r0] ldr r0, =gBattle_BG2_Y @@ -6741,7 +6741,7 @@ sub_80DB174: @ 80DB174 lsls r0, r5, 3 ldr r1, =gMonBackPicTable adds r0, r1 - ldr r1, =gBattleSpritesGfx + ldr r1, =gMonSpritesGfxPtr ldr r1, [r1] ldr r1, [r1, 0x4] adds r2, r5, 0 @@ -6753,7 +6753,7 @@ _080DB1B8: lsls r0, r5, 3 ldr r1, =gMonBackPicTable adds r0, r1 - ldr r1, =gBattleSpritesGfx + ldr r1, =gMonSpritesGfxPtr ldr r1, [r1] ldr r1, [r1, 0x4] adds r2, r5, 0 @@ -8516,7 +8516,7 @@ _080DBF62: thumb_func_start sub_80DBF68 sub_80DBF68: @ 80DBF68 push {lr} - ldr r0, =gUnknown_02022E16 + ldr r0, =gBattle_BG0_Y movs r1, 0 strh r1, [r0] ldr r0, =gBattle_BG2_Y diff --git a/asm/contest_link_80F57C4.s b/asm/contest_link_80F57C4.s index 8e2e2c61c..8a1bf00f1 100644 --- a/asm/contest_link_80F57C4.s +++ b/asm/contest_link_80F57C4.s @@ -92,10 +92,10 @@ _080F57E0: lsls r1, 8 movs r0, 0 bl SetGpuRegBits - ldr r0, =gUnknown_02022E14 + ldr r0, =gBattle_BG0_X movs r1, 0 strh r1, [r0] - ldr r0, =gUnknown_02022E16 + ldr r0, =gBattle_BG0_Y strh r1, [r0] ldr r0, =gBattle_BG1_X strh r1, [r0] @@ -107,15 +107,15 @@ _080F57E0: strh r1, [r0] ldr r0, =gBattle_BG3_X strh r1, [r0] - ldr r0, =gUnknown_02022E22 + ldr r0, =gBattle_BG3_Y strh r1, [r0] - ldr r0, =gUnknown_02022E24 + ldr r0, =gBattle_WIN0H strh r1, [r0] - ldr r0, =gUnknown_02022E26 + ldr r0, =gBattle_WIN0V strh r1, [r0] - ldr r0, =gUnknown_02022E28 + ldr r0, =gBattle_WIN1H strh r1, [r0] - ldr r0, =gUnknown_02022E2A + ldr r0, =gBattle_WIN1V strh r1, [r0] pop {r4} pop {r0} @@ -387,10 +387,10 @@ sub_80F5B00: @ 80F5B00 strb r0, [r1, 0x2] ldr r0, =sub_80F5C00 bl SetMainCallback2 - ldr r1, =gUnknown_02022E28 + ldr r1, =gBattle_WIN1H movs r0, 0xF0 strh r0, [r1] - ldr r1, =gUnknown_02022E2A + ldr r1, =gBattle_WIN1V ldr r2, =0x000080a0 adds r0, r2, 0 strh r0, [r1] @@ -441,11 +441,11 @@ sub_80F5C00: @ 80F5C00 thumb_func_start sub_80F5C24 sub_80F5C24: @ 80F5C24 push {lr} - ldr r0, =gUnknown_02022E14 + ldr r0, =gBattle_BG0_X ldrh r1, [r0] movs r0, 0x10 bl SetGpuReg - ldr r0, =gUnknown_02022E16 + ldr r0, =gBattle_BG0_Y ldrh r1, [r0] movs r0, 0x12 bl SetGpuReg @@ -469,23 +469,23 @@ sub_80F5C24: @ 80F5C24 ldrh r1, [r0] movs r0, 0x1C bl SetGpuReg - ldr r0, =gUnknown_02022E22 + ldr r0, =gBattle_BG3_Y ldrh r1, [r0] movs r0, 0x1E bl SetGpuReg - ldr r0, =gUnknown_02022E24 + ldr r0, =gBattle_WIN0H ldrh r1, [r0] movs r0, 0x40 bl SetGpuReg - ldr r0, =gUnknown_02022E26 + ldr r0, =gBattle_WIN0V ldrh r1, [r0] movs r0, 0x44 bl SetGpuReg - ldr r0, =gUnknown_02022E28 + ldr r0, =gBattle_WIN1H ldrh r1, [r0] movs r0, 0x42 bl SetGpuReg - ldr r0, =gUnknown_02022E2A + ldr r0, =gBattle_WIN1V ldrh r1, [r0] movs r0, 0x46 bl SetGpuReg @@ -702,7 +702,7 @@ sub_80F5ED8: @ 80F5ED8 push {r4,lr} lsls r0, 24 lsrs r4, r0, 24 - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0 beq _080F5EFC @@ -1347,10 +1347,10 @@ _080F643C: .4byte _080F6638 .4byte _080F667C _080F6454: - ldr r1, =gUnknown_02022E24 + ldr r1, =gBattle_WIN0H movs r0, 0xF0 strh r0, [r1] - ldr r1, =gUnknown_02022E26 + ldr r1, =gBattle_WIN0V ldr r3, =0x00005050 adds r0, r3, 0 strh r0, [r1] @@ -1364,7 +1364,7 @@ _080F6454: mov r9, r4 ldr r4, =gMonFrontPicTable mov r12, r4 - ldr r4, =gBattleSpritesGfx + ldr r4, =gMonSpritesGfxPtr mov r8, r4 cmp r0, 0 beq _080F648C @@ -1494,7 +1494,7 @@ _080F65A4: strh r0, [r4, 0xC] _080F65BA: ldrb r2, [r4, 0xC] - ldr r3, =gUnknown_02022E26 + ldr r3, =gBattle_WIN0V movs r0, 0x50 subs r0, r2 lsls r0, 8 @@ -1556,7 +1556,7 @@ _080F6638: ldrb r0, [r0, 0x6] cmp r0, 0x2 bne _080F669C - ldr r3, =gUnknown_02022E26 + ldr r3, =gBattle_WIN0V ldrh r0, [r3] lsrs r2, r0, 8 adds r0, r2, 0x2 @@ -1706,7 +1706,7 @@ sub_80F677C: @ 80F677C push {r4,lr} lsls r0, 24 lsrs r4, r0, 24 - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0 bne _080F67AC @@ -1842,7 +1842,7 @@ sub_80F68B4: @ 80F68B4 ldrh r3, [r2] adds r0, r3, 0x2 strh r0, [r2] - ldr r4, =gUnknown_02022E22 + ldr r4, =gBattle_BG3_Y ldrh r5, [r4] adds r1, r5, 0x1 strh r1, [r4] @@ -2870,10 +2870,10 @@ _080F70BE: adds r5, 0x1 cmp r5, 0x2 ble _080F70BE - ldr r1, =gUnknown_02022E24 + ldr r1, =gBattle_WIN0H movs r0, 0xF0 strh r0, [r1] - ldr r2, =gUnknown_02022E26 + ldr r2, =gBattle_WIN0V ldrh r1, [r4, 0x22] adds r0, r1, 0 subs r0, 0x10 @@ -2910,8 +2910,8 @@ sub_80F7144: @ 80F7144 orrs r0, r1 mov r1, r12 strb r0, [r1] - ldr r7, =gUnknown_02022E24 - ldr r6, =gUnknown_02022E26 + ldr r7, =gBattle_WIN0H + ldr r6, =gBattle_WIN0V adds r5, r3, 0 movs r4, 0x4 adds r2, 0x2E @@ -4522,7 +4522,7 @@ sub_80F7DF4: @ 80F7DF4 bl AllocZeroed ldr r1, [r4] str r0, [r1, 0x1C] - bl init_uns_table_pokemon_copy + bl AllocateMonSpritesGfx pop {r4,r5} pop {r0} bx r0 @@ -5633,7 +5633,7 @@ sub_80F87B4: @ 80F87B4 push {lr} lsls r0, 24 lsrs r1, r0, 24 - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0 bne _080F87D0 diff --git a/asm/contest_link_80FC4F4.s b/asm/contest_link_80FC4F4.s index 0d6116766..ad22946c5 100644 --- a/asm/contest_link_80FC4F4.s +++ b/asm/contest_link_80FC4F4.s @@ -21,7 +21,7 @@ sub_80FC4F4: @ 80FC4F4 lsrs r0, 24 adds r1, r5, 0 adds r2, r4, 0 - bl link_0800A448 + bl SendBlock lsls r0, 24 cmp r0, 0 bne _080FC528 @@ -45,7 +45,7 @@ sub_80FC530: @ 80FC530 lsls r4, 17 lsls r4, r5 lsrs r4, 24 - bl sub_800A550 + bl GetBlockReceivedStatus ands r4, r0 cmp r4, 0 beq _080FC552 @@ -64,7 +64,7 @@ _080FC554: thumb_func_start sub_80FC55C sub_80FC55C: @ 80FC55C push {r4,lr} - bl sub_800A550 + bl GetBlockReceivedStatus adds r4, r0, 0 bl sub_800A9D8 lsls r4, 24 @@ -74,7 +74,7 @@ sub_80FC55C: @ 80FC55C movs r0, 0 b _080FC57A _080FC574: - bl sub_800A5B4 + bl ResetBlockReceivedFlags movs r0, 0x1 _080FC57A: pop {r4} @@ -90,7 +90,7 @@ sub_80FC580: @ 80FC580 movs r1, 0 ldr r5, =gTasks ldr r6, =sub_80FC5C0 - ldr r4, =gUnknown_020223C4 + ldr r4, =gBlockRecvBuffer movs r3, 0xFF _080FC590: lsls r0, r1, 8 @@ -134,7 +134,7 @@ sub_80FC5DC: @ 80FC5DC push {r4-r7,lr} lsls r0, 24 lsrs r7, r0, 24 - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0 beq _080FC650 @@ -324,7 +324,7 @@ _080FC770: ldr r0, =gUnknown_02039E00 adds r4, r0 lsls r1, r5, 8 - ldr r0, =gUnknown_020223C4 + ldr r0, =gBlockRecvBuffer adds r1, r0 adds r0, r4, 0 movs r2, 0x40 @@ -430,7 +430,7 @@ _080FC858: cmp r0, 0 beq _080FC880 ldr r0, =gRngValue - ldr r4, =gUnknown_020223C4 + ldr r4, =gBlockRecvBuffer adds r1, r4, 0 movs r2, 0x4 bl memcpy @@ -517,7 +517,7 @@ _080FC90C: ldrb r0, [r1] cmp r3, r0 bge _080FC93A - ldr r4, =gUnknown_020223C4 + ldr r4, =gBlockRecvBuffer adds r0, r7, 0x2 adds r2, r5, r0 movs r5, 0x80 @@ -690,7 +690,7 @@ _080FCA68: bge _080FCAA4 ldr r1, =gUnknown_02039F34 mov r8, r1 - ldr r4, =gUnknown_020223C4 + ldr r4, =gBlockRecvBuffer movs r3, 0 movs r7, 0x80 lsls r7, 1 @@ -784,7 +784,7 @@ _080FCB50: ldr r1, =gUnknown_02039F2B ldrb r1, [r1] lsls r1, 8 - ldr r2, =gUnknown_020223C4 + ldr r2, =gBlockRecvBuffer adds r1, r2 movs r2, 0x8 b _080FCC50 @@ -827,7 +827,7 @@ _080FCBA4: ldr r1, =gUnknown_02039F2B ldrb r1, [r1] lsls r1, 8 - ldr r2, =gUnknown_020223C4 + ldr r2, =gBlockRecvBuffer adds r1, r2 movs r2, 0x8 b _080FCC50 @@ -850,7 +850,7 @@ _080FCBE0: ldr r1, =gUnknown_02039F2B ldrb r1, [r1] lsls r1, 8 - ldr r2, =gUnknown_020223C4 + ldr r2, =gBlockRecvBuffer adds r1, r2 movs r2, 0x8 b _080FCC50 @@ -885,7 +885,7 @@ _080FCC38: ldr r1, =gUnknown_02039F2B ldrb r1, [r1] lsls r1, 8 - ldr r2, =gUnknown_020223C4 + ldr r2, =gBlockRecvBuffer adds r1, r2 movs r2, 0x4 _080FCC50: @@ -974,7 +974,7 @@ _080FCD10: ldr r1, =gUnknown_02039F2B ldrb r1, [r1] lsls r1, 8 - ldr r2, =gUnknown_020223C4 + ldr r2, =gBlockRecvBuffer adds r1, r2 movs r2, 0x70 b _080FCE10 @@ -1021,7 +1021,7 @@ _080FCD6C: ldr r1, =gUnknown_02039F2B ldrb r1, [r1] lsls r1, 8 - ldr r2, =gUnknown_020223C4 + ldr r2, =gBlockRecvBuffer adds r1, r2 movs r2, 0x14 b _080FCE10 @@ -1078,7 +1078,7 @@ _080FCE04: ldr r1, =gUnknown_02039F2B ldrb r1, [r1] lsls r1, 8 - ldr r2, =gUnknown_020223C4 + ldr r2, =gBlockRecvBuffer adds r1, r2 movs r2, 0x4 _080FCE10: @@ -1169,7 +1169,7 @@ _080FCEC0: beq _080FCF2E mov r1, r8 mov r8, r9 - ldr r4, =gUnknown_020223C4 + ldr r4, =gBlockRecvBuffer adds r0, r7, 0 adds r0, 0xA adds r2, r5, r0 @@ -1278,7 +1278,7 @@ _080FCF9C: ldr r1, =gUnknown_02039F2B ldrb r1, [r1] lsls r1, 8 - ldr r2, =gUnknown_020223C4 + ldr r2, =gBlockRecvBuffer adds r1, r2 movs r2, 0x8 bl memcpy @@ -1344,7 +1344,7 @@ _080FD02C: ldr r1, =gUnknown_02039F2B ldrb r1, [r1] lsls r1, 8 - ldr r2, =gUnknown_020223C4 + ldr r2, =gBlockRecvBuffer adds r1, r2 movs r2, 0x4 bl memcpy diff --git a/asm/contest_link_81D9DE4.s b/asm/contest_link_81D9DE4.s index cec1c6e5d..3fd8f56f1 100755 --- a/asm/contest_link_81D9DE4.s +++ b/asm/contest_link_81D9DE4.s @@ -469,7 +469,7 @@ _081DA1EC: ldr r0, =gUnknown_02039E00 adds r4, r0 lsls r1, r5, 8 - ldr r0, =gUnknown_020223C4 + ldr r0, =gBlockRecvBuffer adds r1, r0 adds r0, r4, 0 movs r2, 0x40 @@ -554,7 +554,7 @@ _081DA2AC: cmp r0, 0 beq _081DA2D4 ldr r0, =gRngValue - ldr r4, =gUnknown_020223C4 + ldr r4, =gBlockRecvBuffer adds r1, r4, 0 movs r2, 0x4 bl memcpy @@ -641,7 +641,7 @@ _081DA35A: mov r0, r8 adds r0, 0xA adds r3, r5, r0 - ldr r4, =gUnknown_020223C4 + ldr r4, =gBlockRecvBuffer mov r2, sp movs r5, 0x80 lsls r5, 1 @@ -744,7 +744,7 @@ _081DA42A: mov r0, r8 adds r0, 0x2 adds r3, r5, r0 - ldr r4, =gUnknown_020223C4 + ldr r4, =gBlockRecvBuffer mov r2, sp movs r5, 0x80 lsls r5, 1 @@ -849,7 +849,7 @@ _081DA50C: lsls r0, r3, 6 ldr r5, =gUnknown_02039E00 adds r0, r5 - ldr r1, =gUnknown_020223C4 + ldr r1, =gBlockRecvBuffer movs r2, 0x4 subs r2, r3 lsls r2, 6 diff --git a/asm/contest_painting.s b/asm/contest_painting.s index 62359497c..03fa9b05a 100644 --- a/asm/contest_painting.s +++ b/asm/contest_painting.s @@ -110,7 +110,7 @@ _0812FE94: bl remove_some_task movs r0, 0 bl SetVBlankCallback - bl init_uns_table_pokemon_copy + bl AllocateMonSpritesGfx ldr r1, =gUnknown_030061C0 ldr r0, =gUnknown_02039F3C str r0, [r1] @@ -581,7 +581,7 @@ sub_81302E8: @ 81302E8 lsls r0, r5, 3 ldr r1, =gMonFrontPicTable adds r0, r1 - ldr r4, =gBattleSpritesGfx + ldr r4, =gMonSpritesGfxPtr ldr r1, [r4] ldr r1, [r1, 0x8] ldr r2, [r6] @@ -600,7 +600,7 @@ _08130348: lsls r0, r5, 3 ldr r1, =gMonBackPicTable adds r0, r1 - ldr r4, =gBattleSpritesGfx + ldr r4, =gMonSpritesGfxPtr ldr r1, [r4] ldr r1, [r1, 0x4] ldr r2, [r6] diff --git a/asm/evolution_scene.s b/asm/evolution_scene.s index 5d0268173..0fa0c5eb3 100644 --- a/asm/evolution_scene.s +++ b/asm/evolution_scene.s @@ -165,10 +165,10 @@ evolution_cutscene: @ 813DA8C movs r1, 0 bl SetGpuReg bl ResetPaletteFade - ldr r0, =gUnknown_02022E14 + ldr r0, =gBattle_BG0_X movs r2, 0 strh r2, [r0] - ldr r0, =gUnknown_02022E16 + ldr r0, =gBattle_BG0_Y strh r2, [r0] ldr r0, =gBattle_BG1_X strh r2, [r0] @@ -183,14 +183,14 @@ evolution_cutscene: @ 813DA8C lsls r2, 1 adds r0, r2, 0 strh r0, [r1] - ldr r0, =gUnknown_02022E22 + ldr r0, =gBattle_BG3_Y movs r1, 0 strh r1, [r0] ldr r1, =gBattleTerrain movs r0, 0x9 strb r0, [r1] bl c2_berry_program_update_menu - bl sub_8035AA4 + bl LoadBattleTextboxAndBackground bl ResetSpriteData bl remove_some_task bl ResetTasks @@ -202,7 +202,7 @@ evolution_cutscene: @ 813DA8C bl AllocZeroed ldr r1, =gUnknown_0203AB80 str r0, [r1] - bl init_uns_table_pokemon_copy + bl AllocateMonSpritesGfx adds r0, r4, 0 movs r1, 0x2 mov r2, sp @@ -235,7 +235,7 @@ evolution_cutscene: @ 813DA8C lsls r0, r5, 3 ldr r1, =gMonFrontPicTable adds r0, r1 - ldr r2, =gBattleSpritesGfx + ldr r2, =gMonSpritesGfxPtr ldr r1, [r2] ldr r1, [r1, 0x8] adds r2, r5, 0 @@ -291,7 +291,7 @@ evolution_cutscene: @ 813DA8C lsls r0, r1, 3 ldr r2, =gMonFrontPicTable adds r0, r2 - ldr r2, =gBattleSpritesGfx + ldr r2, =gMonSpritesGfxPtr ldr r1, [r2] ldr r1, [r1, 0x10] mov r2, r10 @@ -460,9 +460,9 @@ sub_813DD7C: @ 813DD7C movs r1, 0 bl SetGpuReg bl ResetPaletteFade - ldr r0, =gUnknown_02022E14 + ldr r0, =gBattle_BG0_X strh r4, [r0] - ldr r0, =gUnknown_02022E16 + ldr r0, =gBattle_BG0_Y strh r4, [r0] ldr r0, =gBattle_BG1_X strh r4, [r0] @@ -477,13 +477,13 @@ sub_813DD7C: @ 813DD7C lsls r2, 1 adds r0, r2, 0 strh r0, [r1] - ldr r0, =gUnknown_02022E22 + ldr r0, =gBattle_BG3_Y strh r4, [r0] ldr r1, =gBattleTerrain movs r0, 0x9 strb r0, [r1] bl c2_berry_program_update_menu - bl sub_8035AA4 + bl LoadBattleTextboxAndBackground bl ResetSpriteData bl FreeAllSpritePalettes ldr r1, =gReservedSpritePaletteCount @@ -492,7 +492,7 @@ sub_813DD7C: @ 813DD7C lsls r0, r5, 3 ldr r1, =gMonFrontPicTable adds r0, r1 - ldr r1, =gBattleSpritesGfx + ldr r1, =gMonSpritesGfxPtr ldr r1, [r1] ldr r1, [r1, 0x10] adds r2, r5, 0 @@ -629,10 +629,10 @@ _0813DFE0: ldr r1, =gReservedSpritePaletteCount movs r0, 0x4 strb r0, [r1] - ldr r0, =gUnknown_02022E14 + ldr r0, =gBattle_BG0_X movs r1, 0 strh r1, [r0] - ldr r0, =gUnknown_02022E16 + ldr r0, =gBattle_BG0_Y strh r1, [r0] ldr r0, =gBattle_BG1_X strh r1, [r0] @@ -647,7 +647,7 @@ _0813DFE0: lsls r3, 1 adds r0, r3, 0 strh r0, [r2] - ldr r0, =gUnknown_02022E22 + ldr r0, =gBattle_BG3_Y strh r1, [r0] b _0813E180 .pool @@ -697,7 +697,7 @@ _0813E0A8: lsls r0, r6, 3 ldr r1, =gMonFrontPicTable adds r0, r1 - ldr r1, =gBattleSpritesGfx + ldr r1, =gMonSpritesGfxPtr ldr r1, [r1] ldr r1, [r1, 0x10] adds r2, r6, 0 @@ -867,7 +867,7 @@ sub_813E1D4: @ 813E1D4 lsls r0, r5, 3 ldr r1, =gMonFrontPicTable adds r0, r1 - ldr r1, =gBattleSpritesGfx + ldr r1, =gMonSpritesGfxPtr ldr r1, [r1] ldr r1, [r1, 0x8] adds r2, r5, 0 @@ -941,9 +941,9 @@ sub_813E1D4: @ 813E1D4 mov r1, sp ldrh r1, [r1, 0x14] strh r1, [r0, 0x1C] - ldr r0, =gUnknown_02022E14 + ldr r0, =gBattle_BG0_X strh r4, [r0] - ldr r0, =gUnknown_02022E16 + ldr r0, =gBattle_BG0_Y strh r4, [r0] ldr r0, =gBattle_BG1_X strh r4, [r0] @@ -958,7 +958,7 @@ sub_813E1D4: @ 813E1D4 lsls r2, 1 adds r0, r2, 0 strh r0, [r1] - ldr r0, =gUnknown_02022E22 + ldr r0, =gBattle_BG3_Y strh r4, [r0] ldr r2, =gTextFlags ldrb r0, [r2] @@ -3630,11 +3630,11 @@ nullsub_83: @ 813FCD8 thumb_func_start sub_813FCDC sub_813FCDC: @ 813FCDC push {lr} - ldr r0, =gUnknown_02022E14 + ldr r0, =gBattle_BG0_X ldrh r1, [r0] movs r0, 0x10 bl SetGpuReg - ldr r0, =gUnknown_02022E16 + ldr r0, =gBattle_BG0_Y ldrh r1, [r0] movs r0, 0x12 bl SetGpuReg @@ -3658,7 +3658,7 @@ sub_813FCDC: @ 813FCDC ldrh r1, [r0] movs r0, 0x1C bl SetGpuReg - ldr r0, =gUnknown_02022E22 + ldr r0, =gBattle_BG3_Y ldrh r1, [r0] movs r0, 0x1E bl SetGpuReg @@ -3674,11 +3674,11 @@ sub_813FCDC: @ 813FCDC thumb_func_start sub_813FD64 sub_813FD64: @ 813FD64 push {lr} - ldr r0, =gUnknown_02022E14 + ldr r0, =gBattle_BG0_X ldrh r1, [r0] movs r0, 0x10 bl SetGpuReg - ldr r0, =gUnknown_02022E16 + ldr r0, =gBattle_BG0_Y ldrh r1, [r0] movs r0, 0x12 bl SetGpuReg @@ -3702,7 +3702,7 @@ sub_813FD64: @ 813FD64 ldrh r1, [r0] movs r0, 0x1C bl SetGpuReg - ldr r0, =gUnknown_02022E22 + ldr r0, =gBattle_BG3_Y ldrh r1, [r0] movs r0, 0x1E bl SetGpuReg @@ -3871,7 +3871,7 @@ sub_813FEE8: @ 813FEE8 .pool _0813FF28: ldr r7, =gBattle_BG3_X - ldr r6, =gUnknown_02022E22 + ldr r6, =gBattle_BG3_Y _0813FF2C: lsls r4, r5, 2 adds r4, r5 diff --git a/asm/field_screen.s b/asm/field_screen.s index 0de68b86b..83fea2f44 100644 --- a/asm/field_screen.s +++ b/asm/field_screen.s @@ -9010,7 +9010,7 @@ _080AF9C8: strh r0, [r4] b _080AF9E8 _080AF9D0: - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0 bne _080AF9E8 diff --git a/asm/link.s b/asm/link.s index d1c8d0542..038633758 100644 --- a/asm/link.s +++ b/asm/link.s @@ -402,7 +402,7 @@ sub_8009734: @ 8009734 strb r4, [r0] ldr r0, =gUnknown_030030F8 strb r4, [r0] - bl sub_800A5B4 + bl ResetBlockReceivedFlags bl sub_800A2E0 ldr r0, =gUnknown_03000D54 str r4, [r0] @@ -420,7 +420,7 @@ sub_8009734: @ 8009734 _080097A8: bl sub_800E700 _080097AC: - ldr r1, =gUnknown_03003124 + ldr r1, =gReceivedRemoteLinkPlayers movs r0, 0 strb r0, [r1] movs r1, 0 @@ -448,7 +448,7 @@ _080097BE: thumb_func_start sub_80097E8 sub_80097E8: @ 80097E8 push {r4,lr} - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers movs r4, 0 strb r4, [r0] ldr r0, =gLinkVSyncDisabled @@ -514,7 +514,7 @@ _08009868: lsrs r5, r0, 24 cmp r5, 0x3 bls _08009840 - bl sub_800A550 + bl GetBlockReceivedStatus lsls r0, 24 lsrs r7, r0, 24 cmp r7, 0xF @@ -532,7 +532,7 @@ _08009888: cmp r0, 0 beq _080098C4 lsls r0, r5, 8 - ldr r1, =gUnknown_020223C4 + ldr r1, =gBlockRecvBuffer adds r0, r1 lsls r4, r5, 1 adds r1, r4, r5 @@ -752,7 +752,7 @@ _08009A78: blt _08009A70 cmp r5, 0 bne _08009A94 - ldr r1, =gUnknown_03003124 + ldr r1, =gReceivedRemoteLinkPlayers ldrb r0, [r1] cmp r0, 0 bne _08009A94 @@ -952,7 +952,7 @@ _08009C14: .pool _08009C40: movs r2, 0 - ldr r1, =gUnknown_020223C4 + ldr r1, =gBlockRecvBuffer mov r9, r1 adds r7, r3, 0 ldr r3, =gUnknown_03003090 @@ -996,7 +996,7 @@ _08009C70: cmp r0, 0x1 bne _08009D16 lsls r1, r6, 8 - ldr r0, =gUnknown_020223C4 + ldr r0, =gBlockRecvBuffer adds r1, r0 mov r8, r1 lsls r0, r6, 3 @@ -1080,7 +1080,7 @@ _08009D3E: adds r2, r3 ldrh r2, [r2] movs r0, 0 - bl link_0800A448 + bl SendBlock b _08009D6E .pool _08009D64: @@ -1321,7 +1321,7 @@ _08009F6A: thumb_func_start sub_8009F70 sub_8009F70: @ 8009F70 push {lr} - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0x1 bne _08009F80 @@ -1526,7 +1526,7 @@ sub_800A0C8: @ 800A0C8 adds r5, r0, 0 adds r6, r1, 0 movs r7, 0 - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r4, [r0] cmp r4, 0x1 beq _0800A0DA @@ -2008,8 +2008,8 @@ bitmask_all_link_players_but_self: @ 800A490 bx r1 thumb_func_end bitmask_all_link_players_but_self - thumb_func_start link_0800A448 -link_0800A448: @ 800A4AC + thumb_func_start SendBlock +SendBlock: @ 800A4AC push {lr} adds r3, r1, 0 lsls r2, 16 @@ -2030,7 +2030,7 @@ _0800A4CE: lsrs r0, 24 pop {r1} bx r1 - thumb_func_end link_0800A448 + thumb_func_end SendBlock thumb_func_start sub_800A4D8 sub_800A4D8: @ 800A4D8 @@ -2095,8 +2095,8 @@ _0800A546: .pool thumb_func_end sub_800A520 - thumb_func_start sub_800A550 -sub_800A550: @ 800A550 + thumb_func_start GetBlockReceivedStatus +GetBlockReceivedStatus: @ 800A550 push {lr} ldr r0, =gLinkVSyncDisabled ldrb r0, [r0] @@ -2122,7 +2122,7 @@ _0800A580: lsrs r0, 24 pop {r1} bx r1 - thumb_func_end sub_800A550 + thumb_func_end GetBlockReceivedStatus thumb_func_start sub_800A588 sub_800A588: @ 800A588 @@ -2148,8 +2148,8 @@ _0800A5AC: .pool thumb_func_end sub_800A588 - thumb_func_start sub_800A5B4 -sub_800A5B4: @ 800A5B4 + thumb_func_start ResetBlockReceivedFlags +ResetBlockReceivedFlags: @ 800A5B4 push {r4,lr} ldr r0, =gLinkVSyncDisabled ldrb r0, [r0] @@ -2179,7 +2179,7 @@ _0800A5E2: pop {r0} bx r0 .pool - thumb_func_end sub_800A5B4 + thumb_func_end ResetBlockReceivedFlags thumb_func_start sub_800A5EC sub_800A5EC: @ 800A5EC @@ -2573,7 +2573,7 @@ task00_link_test: @ 800A850 movs r2, 0x2 movs r3, 0x2 bl sub_800A6E8 - bl sub_800A550 + bl GetBlockReceivedStatus lsls r0, 24 lsrs r0, 24 movs r1, 0xF @@ -3813,7 +3813,7 @@ sub_800B3A4: @ 800B3A4 lsls r0, 24 lsrs r0, 24 lsls r2, r0, 8 - ldr r1, =gUnknown_020223C4 + ldr r1, =gBlockRecvBuffer adds r4, r2, r1 lsls r2, r0, 3 subs r2, r0 @@ -3907,7 +3907,7 @@ _0800B482: thumb_func_start sub_800B488 sub_800B488: @ 800B488 push {lr} - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0 bne _0800B498 @@ -3923,7 +3923,7 @@ _0800B498: thumb_func_start sub_800B4A4 sub_800B4A4: @ 800B4A4 push {lr} - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r1, [r0] cmp r1, 0 bne _0800B4B2 @@ -3938,7 +3938,7 @@ _0800B4B2: thumb_func_start sub_800B4C0 sub_800B4C0: @ 800B4C0 push {lr} - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r1, [r0] cmp r1, 0 bne _0800B4CE @@ -11500,7 +11500,7 @@ _0800F18C: cmp r4, 0 bne _0800F1A8 bl sub_800EDD4 - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers strb r4, [r0] b _0800F1D2 .pool @@ -11976,7 +11976,7 @@ _0800F514: bl sub_8011A64 _0800F58C: bl rfu_clearAllSlot - ldr r1, =gUnknown_03003124 + ldr r1, =gReceivedRemoteLinkPlayers movs r0, 0 strb r0, [r1] ldr r0, =gUnknown_03005000 @@ -12224,7 +12224,7 @@ _0800F786: thumb_func_start rfu_func_080F97B8 rfu_func_080F97B8: @ 800F794 push {lr} - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0 beq _0800F7C6 @@ -12430,7 +12430,7 @@ _0800F90E: ldrb r0, [r4, 0xC] cmp r0, 0 bne _0800F920 - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0 beq _0800F920 @@ -12536,7 +12536,7 @@ _0800F9EA: orrs r0, r3 str r0, [r1] movs r4, 0 - ldr r0, =gUnknown_020223C4 + ldr r0, =gBlockRecvBuffer mov r9, r0 mov r12, r2 mov r1, r8 @@ -12599,7 +12599,7 @@ _0800FA5C: beq _0800FA7E b _0800FC08 _0800FA7E: - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0 bne _0800FA88 @@ -12610,7 +12610,7 @@ _0800FA88: beq _0800FA90 b _0800FC08 _0800FA90: - ldr r0, =gUnknown_020223C4 + ldr r0, =gBlockRecvBuffer bl sub_8010A70 b _0800FC08 .pool @@ -12662,7 +12662,7 @@ _0800FB10: ldrb r2, [r7, 0xC] cmp r2, 0 bne _0800FB78 - ldr r3, =gUnknown_03003124 + ldr r3, =gReceivedRemoteLinkPlayers ldrb r0, [r3] mov r6, r8 adds r6, 0x1 @@ -13410,7 +13410,7 @@ sub_801011C: @ 801011C push {lr} bl rfu_clearAllSlot bl sub_800C048 - ldr r1, =gUnknown_03003124 + ldr r1, =gReceivedRemoteLinkPlayers movs r0, 0 strb r0, [r1] ldr r2, =gUnknown_03005000 @@ -14374,14 +14374,14 @@ _080108B6: bne _080108C2 b _080109D2 _080108C2: - bl sub_800A5B4 + bl ResetBlockReceivedFlags bl sub_800B348 b _08010948 _080108CC: ldrb r0, [r5, 0xC] cmp r0, 0x1 bne _0801090C - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0 beq _080108E8 @@ -14471,7 +14471,7 @@ _0801096E: _08010984: adds r0, r6, 0 bl DestroyTask - ldr r1, =gUnknown_03003124 + ldr r1, =gReceivedRemoteLinkPlayers movs r0, 0x1 strb r0, [r1] ldr r0, =0x00000ce8 @@ -14702,7 +14702,7 @@ _08010B6A: b _08010C52 .pool _08010B78: - bl sub_800A550 + bl GetBlockReceivedStatus lsls r0, 24 lsrs r0, 24 asrs r0, r4 @@ -14715,7 +14715,7 @@ _08010B8C: adds r0, r4, 0 bl sub_800A5EC lsls r2, r4, 8 - ldr r0, =gUnknown_020223C4 + ldr r0, =gBlockRecvBuffer adds r2, r0 ldr r1, =gLinkPlayers lsls r0, r4, 3 @@ -14799,7 +14799,7 @@ _08010C20: ldr r1, =gUnknown_020228C4 movs r0, 0 movs r2, 0xA0 - bl link_0800A448 + bl SendBlock lsls r0, 24 cmp r0, 0 beq _08010CF0 @@ -14833,7 +14833,7 @@ _08010C94: lsls r0, 24 cmp r0, 0 beq _08010CF0 - bl sub_800A550 + bl GetBlockReceivedStatus movs r1, 0x1 ands r1, r0 cmp r1, 0 @@ -14841,7 +14841,7 @@ _08010C94: mov r0, sp movs r4, 0 strh r4, [r0] - ldr r1, =gUnknown_020223C4 + ldr r1, =gBlockRecvBuffer ldr r2, =0x0100007e bl CpuSet movs r0, 0 @@ -14924,7 +14924,7 @@ _08010D56: ldr r1, =gUnknown_020228C4 movs r0, 0 movs r2, 0x3C - bl link_0800A448 + bl SendBlock b _08010D7A .pool _08010D70: @@ -14938,17 +14938,17 @@ _08010D7A: strh r0, [r4, 0x8] b _08010DA6 _08010D82: - bl sub_800A550 + bl GetBlockReceivedStatus movs r4, 0x1 adds r1, r4, 0 ands r1, r0 cmp r1, 0 beq _08010DA6 - ldr r0, =gUnknown_020223C4 + ldr r0, =gBlockRecvBuffer bl sub_8010A14 movs r0, 0 bl sub_800A5EC - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers strb r4, [r0] adds r0, r5, 0 bl DestroyTask @@ -15701,7 +15701,7 @@ _0801136C: bics r3, r2 adds r2, r3, 0 strb r2, [r1] - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0x1 bne _080113B0 @@ -15912,7 +15912,7 @@ _08011544: movs r1, 0x5 movs r2, 0x5 bl nullsub_5 - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0x1 bne _080115DE @@ -16397,7 +16397,7 @@ _08011958: ldrb r0, [r2, 0xC] cmp r0, 0x1 bne _08011996 - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0x1 bne _080119B4 @@ -16423,7 +16423,7 @@ _08011996: ldrb r0, [r0] cmp r0, 0x2 beq _080119B4 - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0x1 bne _080119B4 @@ -17502,7 +17502,7 @@ sub_801229C: @ 801229C push {r4-r7,lr} mov r7, r8 push {r7} - bl sub_800A550 + bl GetBlockReceivedStatus lsls r0, 24 lsrs r0, 24 movs r1, 0x1C @@ -18913,7 +18913,7 @@ _08012F14: strb r0, [r6, 0xC] b _08012F50 _08012F22: - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0 beq _08012F50 @@ -19861,7 +19861,7 @@ _080137A6: b _08013A86 .pool _080137C4: - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0 beq _0801387A @@ -20806,11 +20806,11 @@ _08013FDE: adds r1, r0 movs r0, 0 movs r2, 0x64 - bl link_0800A448 + bl SendBlock b _080140BC .pool _08013FFC: - bl sub_800A550 + bl GetBlockReceivedStatus lsls r0, 24 lsrs r0, 24 cmp r0, 0x3 @@ -20822,13 +20822,13 @@ _08013FFC: eors r1, r2 lsls r1, 24 lsrs r1, 16 - ldr r2, =gUnknown_020223C4 + ldr r2, =gBlockRecvBuffer adds r1, r2 movs r2, 0x64 bl memcpy movs r0, 0x32 bl IncrementGameStat - bl sub_800A5B4 + bl ResetBlockReceivedFlags b _0801405A .pool _08014038: @@ -20843,7 +20843,7 @@ _08014038: movs r0, 0 adds r1, r4, 0 movs r2, 0xDC - bl link_0800A448 + bl SendBlock lsls r0, 24 cmp r0, 0 beq _080140BC @@ -20854,7 +20854,7 @@ _0801405A: b _080140BC .pool _08014070: - bl sub_800A550 + bl GetBlockReceivedStatus lsls r0, 24 lsrs r0, 24 cmp r0, 0x3 @@ -20866,12 +20866,12 @@ _08014070: eors r1, r0 lsls r1, 24 lsrs r1, 16 - ldr r0, =gUnknown_020223C4 + ldr r0, =gBlockRecvBuffer adds r1, r0 adds r0, r4, 0 movs r2, 0xD8 bl memcpy - bl sub_800A5B4 + bl ResetBlockReceivedFlags ldr r1, =gUnknown_02032298 strb r7, [r1] movs r0, 0x6 @@ -20925,7 +20925,7 @@ _08014114: strh r0, [r4, 0x8] b _0801419E _0801411C: - bl sub_800A550 + bl GetBlockReceivedStatus adds r4, r0, 0 bl sub_800A9D8 lsls r4, 24 @@ -20938,7 +20938,7 @@ _0801411C: .pool _08014138: lsls r1, r4, 8 - ldr r0, =gUnknown_020223C4 + ldr r0, =gBlockRecvBuffer adds r3, r1, r0 movs r0, 0x64 muls r0, r4 @@ -20965,7 +20965,7 @@ _08014152: eors r0, r1 lsls r0, 24 lsrs r0, 16 - ldr r1, =gUnknown_020223C4 + ldr r1, =gBlockRecvBuffer adds r3, r0, r1 adds r0, r3, 0 adds r0, 0x60 @@ -20976,7 +20976,7 @@ _08014152: _08014190: bl sub_801B940 _08014194: - bl sub_800A5B4 + bl ResetBlockReceivedFlags adds r0, r6, 0 bl DestroyTask _0801419E: @@ -21665,7 +21665,7 @@ _08014854: movs r0, 0x4 strh r0, [r7] bl sub_800E3A8 - bl sub_800A5B4 + bl ResetBlockReceivedFlags b _080149B2 .pool _080148B8: @@ -21723,7 +21723,7 @@ _08014934: movs r0, 0 adds r1, r2, 0 movs r2, 0xE - bl link_0800A448 + bl SendBlock lsls r0, 24 cmp r0, 0 beq _080149B2 @@ -21731,13 +21731,13 @@ _08014934: strh r0, [r7] b _080149B2 _0801494A: - bl sub_800A550 + bl GetBlockReceivedStatus lsls r0, 24 lsrs r0, 24 cmp r0, 0x3 bne _080149B2 - bl sub_800A5B4 - ldr r0, =gUnknown_020223C4 + bl ResetBlockReceivedFlags + ldr r0, =gBlockRecvBuffer movs r2, 0x80 lsls r2, 1 adds r1, r0, r2 @@ -21766,7 +21766,7 @@ _08014992: strh r0, [r7] b _080149B2 _0801499C: - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0 bne _080149B2 @@ -22316,7 +22316,7 @@ _08014E8C: strb r0, [r5, 0xC] b _08014EF2 _08014E92: - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0 beq _08014EF2 @@ -22636,7 +22636,7 @@ _08015180: b _080152A0 .pool _080151A4: - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0 beq _080151C2 @@ -23002,7 +23002,7 @@ _080154E0: b _08015604 .pool _08015504: - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0 beq _08015522 @@ -23714,7 +23714,7 @@ _08015BB8: movs r0, 0x40 strb r0, [r1] _08015BBE: - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0 bne _08015BCA @@ -23750,7 +23750,7 @@ _08015C24: movs r0, 0x5 bl _08016876 _08015C2A: - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0 beq _08015C36 @@ -23785,7 +23785,7 @@ _08015C54: bne _08015C78 bl _08016878 _08015C78: - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0 bne _08015C94 @@ -23918,7 +23918,7 @@ _08015DA6: bl _08016876 .pool _08015DD0: - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0 bne _08015DF4 @@ -24212,7 +24212,7 @@ _08016084: movs r0, 0x1E bl sub_8015664 _08016092: - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0 bne _0801609E @@ -24241,7 +24241,7 @@ _080160C6: movs r0, 0x2 bl _08016876 _080160DA: - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0 bne _080160E4 @@ -24452,7 +24452,7 @@ _080162D4: movs r0, 0x24 b _08016876 _080162DC: - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r4, [r0] cmp r4, 0 beq _080162E6 @@ -30478,7 +30478,7 @@ _08019406: strb r0, [r5, 0x8] b _08019922 _0801940C: - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0 beq _0801942C @@ -30646,7 +30646,7 @@ _0801956A: strb r0, [r5, 0x8] b _08019922 _08019574: - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0 beq _0801957E @@ -30981,7 +30981,7 @@ _080197EE: strb r0, [r5, 0x8] b _08019922 _080197F8: - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0 beq _08019810 @@ -31050,7 +31050,7 @@ _08019884: b _08019922 .pool _080198A0: - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0 bne _08019922 @@ -33417,7 +33417,7 @@ _0801AB1E: lsls r2, 4 adds r1, r2, 0 strh r1, [r0] - ldr r0, =sub_8036760 + ldr r0, =CB2_InitBattle bl SetMainCallback2 pop {r4-r7} pop {r0} @@ -33741,7 +33741,7 @@ _0801AE7A: ldr r1, =gUnknown_020228C4 movs r0, 0 movs r2, 0x20 - bl link_0800A448 + bl SendBlock ldr r1, =gMain movs r2, 0x87 lsls r2, 3 @@ -33749,14 +33749,14 @@ _0801AE7A: b _0801AF8A .pool _0801AE98: - bl sub_800A550 + bl GetBlockReceivedStatus lsls r0, 24 lsrs r0, 24 cmp r0, 0x3 beq _0801AEA6 b _0801AFAE _0801AEA6: - ldr r1, =gUnknown_020223C4 + ldr r1, =gBlockRecvBuffer ldrh r0, [r1] cmp r0, 0x51 bne _0801AEE0 @@ -33782,7 +33782,7 @@ _0801AEA6: .pool _0801AEE0: bl sub_800AC34 - ldr r4, =gUnknown_020223C4 + ldr r4, =gBlockRecvBuffer bl GetMultiplayerId lsls r0, 24 lsrs r0, 16 @@ -33805,7 +33805,7 @@ _0801AF0C: movs r1, 0x8 _0801AF16: strb r1, [r0] - bl sub_800A5B4 + bl ResetBlockReceivedFlags b _0801AFAE .pool _0801AF24: @@ -33842,7 +33842,7 @@ _0801AF58: b _0801AFAE .pool _0801AF7C: - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0 bne _0801AFAE @@ -39072,7 +39072,7 @@ sub_801D938: @ 801D938 adds r3, r0, 0 adds r0, r1, 0 lsls r3, 8 - ldr r1, =gUnknown_020223C4 + ldr r1, =gBlockRecvBuffer adds r3, r1 adds r1, r3, 0 bl memcpy @@ -39085,7 +39085,7 @@ sub_801D938: @ 801D938 sub_801D954: @ 801D954 push {r4,lr} adds r4, r0, 0 - bl sub_800A550 + bl GetBlockReceivedStatus lsls r0, 24 lsrs r0, 24 asrs r0, r4 @@ -39273,7 +39273,7 @@ _0801DA7C: movs r0, 0 mov r1, sp movs r2, 0x8 - bl link_0800A448 + bl SendBlock b _0801DB3E .pool _0801DAC8: @@ -39300,7 +39300,7 @@ _0801DAC8: lsls r2, r0, 16 lsrs r2, 16 movs r0, 0 - bl link_0800A448 + bl SendBlock ldrh r0, [r4, 0x10] adds r0, 0x1 strh r0, [r4, 0x10] @@ -39310,7 +39310,7 @@ _0801DB08: adds r1, r3 movs r0, 0 movs r2, 0xFC - bl link_0800A448 + bl SendBlock ldrh r0, [r4, 0x10] adds r0, 0x1 strh r0, [r4, 0x10] @@ -39942,7 +39942,7 @@ _0801DFE0: adds r1, r0 movs r0, 0 movs r2, 0x28 - bl link_0800A448 + bl SendBlock lsls r0, 24 cmp r0, 0 beq _0801E028 @@ -40416,7 +40416,7 @@ _0801E3D4: adds r1, r0 movs r0, 0 movs r2, 0x28 - bl link_0800A448 + bl SendBlock lsls r0, 24 cmp r0, 0 beq _0801E414 @@ -40432,14 +40432,14 @@ _0801E410: _0801E412: strh r0, [r1, 0x6] _0801E414: - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0 bne _0801E458 b _0801E42C .pool _0801E424: - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0 bne _0801E438 @@ -40556,7 +40556,7 @@ _0801E50C: adds r1, r0 movs r0, 0 movs r2, 0x28 - bl link_0800A448 + bl SendBlock lsls r0, 24 cmp r0, 0 beq _0801E5BC @@ -40564,7 +40564,7 @@ _0801E50C: b _0801E59A .pool _0801E540: - bl sub_800A550 + bl GetBlockReceivedStatus movs r1, 0x1 ands r1, r0 cmp r1, 0 @@ -40599,7 +40599,7 @@ _0801E584: adds r0, 0x1 strh r0, [r1, 0xA] _0801E590: - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0 bne _0801E5BC @@ -40683,7 +40683,7 @@ _0801E62E: adds r0, 0x1 strh r0, [r1, 0xA] _0801E638: - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0 bne _0801E662 @@ -40798,7 +40798,7 @@ _0801E724: adds r0, 0x1 strh r0, [r1, 0xA] _0801E730: - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0 bne _0801E75C @@ -40849,7 +40849,7 @@ _0801E784: .4byte _0801E802 .4byte _0801E820 _0801E798: - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0 bne _0801E7AC @@ -40883,7 +40883,7 @@ _0801E7C0: adds r1, r0 movs r0, 0 movs r2, 0x28 - bl link_0800A448 + bl SendBlock lsls r0, 24 cmp r0, 0 beq _0801E830 @@ -42276,7 +42276,7 @@ _0801F2E0: .4byte _0801F494 .4byte _0801F438 _0801F300: - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0 bne _0801F30A @@ -42304,7 +42304,7 @@ _0801F30E: b _0801F4C4 .pool _0801F33C: - bl sub_800A550 + bl GetBlockReceivedStatus lsls r0, 24 lsrs r0, 24 strh r0, [r4, 0x6] @@ -42365,7 +42365,7 @@ _0801F3A2: movs r1, 0x2 ldrsh r0, [r4, r1] lsls r0, 8 - ldr r1, =gUnknown_020223C4 + ldr r1, =gBlockRecvBuffer adds r0, r1 ldrb r0, [r0] subs r0, 0x1 @@ -42406,7 +42406,7 @@ _0801F3F6: movs r2, 0x2 ldrsh r1, [r4, r2] lsls r1, 8 - ldr r2, =gUnknown_020223C4 + ldr r2, =gBlockRecvBuffer adds r1, r2 bl sub_801EFF8 cmp r0, 0 @@ -45486,7 +45486,7 @@ sub_8020C70: @ 8020C70 adds r4, r0, 0 movs r0, 0 mov r8, r0 - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0 beq _08020C8E @@ -49731,7 +49731,7 @@ _08022F7A: movs r0, 0 adds r1, r4, 0 movs r2, 0x2 - bl link_0800A448 + bl SendBlock b _08023060 _08022FAA: bl sub_800A520 @@ -49742,7 +49742,7 @@ _08022FAA: strh r0, [r5, 0x10] b _08023060 _08022FBA: - bl sub_800A550 + bl GetBlockReceivedStatus ldr r2, =gUnknown_082F4448 ldrb r4, [r5, 0x9] subs r1, r4, 0x2 @@ -49755,7 +49755,7 @@ _08022FBA: movs r3, 0 cmp r3, r4 bcs _0802301E - ldr r7, =gUnknown_020223C4 + ldr r7, =gBlockRecvBuffer movs r6, 0 ldr r4, =gUnknown_0858AB24 _08022FDC: @@ -49796,7 +49796,7 @@ _08022FF6: _0802301E: movs r0, 0 strh r0, [r5, 0x10] - bl sub_800A5B4 + bl ResetBlockReceivedFlags movs r1, 0x18 ldrsh r0, [r5, r1] lsls r0, 8 @@ -51445,7 +51445,7 @@ _08023D12: movs r0, 0 adds r1, r4, 0 movs r2, 0x2 - bl link_0800A448 + bl SendBlock b _0802402E _08023D2A: bl sub_800A520 @@ -51456,7 +51456,7 @@ _08023D2A: _08023D36: b _08024004 _08023D38: - bl sub_800A550 + bl GetBlockReceivedStatus ldr r2, =gUnknown_082F4448 ldrb r3, [r7, 0x9] subs r1, r3, 0x2 @@ -51474,7 +51474,7 @@ _08023D50: adds r4, 0x42 cmp r8, r3 bcs _08023D7E - ldr r2, =gUnknown_020223C4 + ldr r2, =gBlockRecvBuffer _08023D5E: mov r3, r8 lsls r1, r3, 5 @@ -51496,7 +51496,7 @@ _08023D7E: movs r0, 0 strh r0, [r7, 0x10] strh r0, [r4] - bl sub_800A5B4 + bl ResetBlockReceivedFlags ldrb r0, [r7, 0x8] cmp r0, 0 bne _08023D9C @@ -51788,7 +51788,7 @@ _08023FC4: movs r0, 0 ldr r1, [sp, 0xC] movs r2, 0x30 - bl link_0800A448 + bl SendBlock b _0802402E _08023FD0: bl sub_800A520 @@ -51797,7 +51797,7 @@ _08023FD0: beq _08024034 b _08024004 _08023FDC: - bl sub_800A550 + bl GetBlockReceivedStatus lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -51808,11 +51808,11 @@ _08023FDC: movs r1, 0 movs r2, 0x30 bl memset - ldr r1, =gUnknown_020223C4 + ldr r1, =gBlockRecvBuffer adds r0, r4, 0 movs r2, 0x30 bl memcpy - bl sub_800A5B4 + bl ResetBlockReceivedFlags _08024004: movs r0, 0 strh r0, [r7, 0x10] @@ -52207,7 +52207,7 @@ _08024306: strh r5, [r0] movs r0, 0 movs r2, 0x2 - bl link_0800A448 + bl SendBlock b _080243AC _08024328: bl sub_800A520 @@ -52217,7 +52217,7 @@ _08024328: strh r5, [r4, 0x10] b _080243AC _08024336: - bl sub_800A550 + bl GetBlockReceivedStatus ldr r2, =gUnknown_082F4448 ldrb r3, [r4, 0x9] subs r1, r3, 0x2 @@ -52234,7 +52234,7 @@ _08024336: cmp r5, r3 bcs _08024374 adds r1, r6, 0 - ldr r2, =gUnknown_020223C4 + ldr r2, =gBlockRecvBuffer _0802435C: lsls r0, r5, 8 adds r0, r2 @@ -52264,7 +52264,7 @@ _08024390: movs r2, 0 bl sub_8022BEC _0802439A: - bl sub_800A5B4 + bl ResetBlockReceivedFlags movs r1, 0 movs r0, 0 strh r0, [r7] @@ -52485,7 +52485,7 @@ _08024528: bl sub_800AC34 b _08024558 _08024538: - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0 bne _0802455E @@ -53023,7 +53023,7 @@ sub_802493C: @ 802493C ldr r1, =gUnknown_03000DB0 movs r0, 0 str r0, [r1] - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0 beq _08024A10 @@ -53382,7 +53382,7 @@ _08024C5A: lsls r0, 24 cmp r0, 0 beq _08024D40 - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0 beq _08024D20 @@ -53989,7 +53989,7 @@ _0802516C: thumb_func_start sub_8025170 sub_8025170: @ 8025170 push {r4,lr} - bl sub_800A550 + bl GetBlockReceivedStatus adds r4, r0, 0 lsls r4, 24 lsrs r4, 24 @@ -54001,7 +54001,7 @@ sub_8025170: @ 8025170 movs r0, 0 b _08025192 _0802518C: - bl sub_800A5B4 + bl ResetBlockReceivedFlags movs r0, 0x1 _08025192: pop {r4} @@ -54031,7 +54031,7 @@ _080251BA: adds r1, 0x4A movs r0, 0 movs r2, 0x3C - bl link_0800A448 + bl SendBlock lsls r0, 24 cmp r0, 0 beq _08025226 @@ -54115,7 +54115,7 @@ _08025252: adds r1, r2, r1 movs r0, 0 movs r2, 0x3C - bl link_0800A448 + bl SendBlock lsls r0, 24 cmp r0, 0 beq _08025316 @@ -54139,7 +54139,7 @@ _08025282: _0802528E: ldr r0, [r5] adds r0, 0x4A - ldr r1, =gUnknown_020223C4 + ldr r1, =gBlockRecvBuffer movs r2, 0x3C bl memcpy ldr r1, [r5] @@ -54265,7 +54265,7 @@ _0802539C: strb r0, [r1] movs r0, 0 movs r2, 0x1 - bl link_0800A448 + bl SendBlock lsls r0, 24 cmp r0, 0 beq _08025466 @@ -54302,7 +54302,7 @@ _080253DC: adds r3, r1, 0 movs r5, 0x86 lsls r5, 1 - ldr r4, =gUnknown_020223C4 + ldr r4, =gBlockRecvBuffer _080253FA: ldr r1, [r3] adds r1, r2, r1 @@ -54452,7 +54452,7 @@ _0802553C: strb r0, [r1] movs r0, 0 movs r2, 0x1 - bl link_0800A448 + bl SendBlock lsls r0, 24 cmp r0, 0 beq _0802563C @@ -54486,7 +54486,7 @@ _08025578: adds r3, r1, 0 movs r5, 0x86 lsls r5, 1 - ldr r4, =gUnknown_020223C4 + ldr r4, =gBlockRecvBuffer _08025596: ldr r1, [r3] adds r1, r2, r1 @@ -54617,7 +54617,7 @@ _08025688: strb r0, [r1, 0x10] b _080256A0 _08025692: - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0 bne _080256A0 @@ -54829,7 +54829,7 @@ _0802585C: bl sub_802903C ldr r0, [r4] bl sub_8024A30 - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0 bne _08025882 @@ -54946,7 +54946,7 @@ _0802593E: adds r1, r0 movs r0, 0 movs r2, 0x1 - bl link_0800A448 + bl SendBlock lsls r0, 24 cmp r0, 0 beq _080259E8 @@ -54976,7 +54976,7 @@ _0802597E: cmp r2, r0 bcs _080259C4 adds r3, r1, 0 - ldr r5, =gUnknown_020223C4 + ldr r5, =gBlockRecvBuffer ldr r4, =0x0000318c _0802599A: ldr r0, [r3] @@ -58643,7 +58643,7 @@ sub_8027660: @ 8027660 push {lr} lsls r0, 24 lsrs r2, r0, 24 - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0 bne _0802768C @@ -64818,7 +64818,7 @@ sub_802A9A8: @ 802A9A8 adds r6, r1, 0 lsls r0, 16 lsrs r7, r0, 16 - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0 beq _0802AA3C @@ -67232,7 +67232,7 @@ _0802BD02: b _0802BD24 .pool _0802BD14: - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0 bne _0802BD24 @@ -73081,7 +73081,7 @@ sub_802EAB0: @ 802EAB0 lsls r1, 3 ldr r0, =gTasks + 0x8 adds r4, r1, r0 - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0 beq _0802EB14 diff --git a/asm/menu_helpers.s b/asm/menu_helpers.s index acc3065ea..423f653d9 100644 --- a/asm/menu_helpers.s +++ b/asm/menu_helpers.s @@ -533,7 +533,7 @@ sub_81221AC: @ 81221AC bl is_c1_link_related_active cmp r0, 0x1 beq _081221BE - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0x1 bne _081221C8 diff --git a/asm/mystery_event_menu.s b/asm/mystery_event_menu.s index 49de57848..df8e443a1 100644 --- a/asm/mystery_event_menu.s +++ b/asm/mystery_event_menu.s @@ -337,7 +337,7 @@ _08178C54: lsls r0, 24 cmp r0, 0 beq _08178D00 - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0 bne _08178C68 @@ -435,13 +435,13 @@ _08178D28: _08178D36: b _08178E34 _08178D38: - bl sub_800A550 + bl GetBlockReceivedStatus lsls r0, 24 cmp r0, 0 bne _08178D44 b _08178E58 _08178D44: - bl sub_800A5B4 + bl ResetBlockReceivedFlags ldr r1, =gMain movs r2, 0x87 lsls r2, 3 @@ -462,7 +462,7 @@ _08178D60: b _08178E3C .pool _08178D74: - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r6, [r0] cmp r6, 0 bne _08178E58 diff --git a/asm/pokeblock_feed.s b/asm/pokeblock_feed.s index d82c5df07..bc402d91c 100644 --- a/asm/pokeblock_feed.s +++ b/asm/pokeblock_feed.s @@ -95,7 +95,7 @@ _08179C48: bl FreeAllSpritePalettes b _08179D32 _08179C4E: - bl init_uns_table_pokemon_copy + bl AllocateMonSpritesGfx ldr r1, =gMain movs r2, 0x87 lsls r2, 3 @@ -322,7 +322,7 @@ _08179E48: lsls r0, r5, 3 ldr r1, =gMonFrontPicTable adds r0, r1 - ldr r1, =gBattleSpritesGfx + ldr r1, =gMonSpritesGfxPtr ldr r1, [r1] ldr r1, [r1, 0x8] adds r2, r5, 0 diff --git a/asm/pokemon_summary_screen.s b/asm/pokemon_summary_screen.s index 2ad67ba5a..bcc52c172 100755 --- a/asm/pokemon_summary_screen.s +++ b/asm/pokemon_summary_screen.s @@ -127,7 +127,7 @@ _081BF9EE: strb r1, [r0] movs r0, 0xFF bl sub_81C488C - ldr r0, =gBattleSpritesGfx + ldr r0, =gMonSpritesGfxPtr ldr r0, [r0] cmp r0, 0 bne _081BFA12 @@ -1284,7 +1284,7 @@ sub_81C0484: @ 81C0484 movs r2, 0x80 lsls r2, 1 bl m4aMPlayVolumeControl - ldr r0, =gBattleSpritesGfx + ldr r0, =gMonSpritesGfxPtr ldr r0, [r0] cmp r0, 0 bne _081C04E2 @@ -8807,7 +8807,7 @@ _081C4620: lsls r0, r2, 3 ldr r1, =gMonFrontPicTable adds r0, r1 - ldr r1, =gBattleSpritesGfx + ldr r1, =gMonSpritesGfxPtr ldr r1, [r1] ldr r1, [r1, 0x8] b _081C46D6 @@ -8817,12 +8817,12 @@ _081C4668: lsls r0, r2, 3 ldr r1, =gMonFrontPicTable adds r0, r1 - ldr r1, =gBattleSpritesGfx + ldr r1, =gMonSpritesGfxPtr ldr r1, [r1] b _081C46B0 .pool _081C4680: - ldr r0, =gBattleSpritesGfx + ldr r0, =gMonSpritesGfxPtr ldr r3, [r0] adds r4, r0, 0 cmp r3, 0 diff --git a/asm/pokenav.s b/asm/pokenav.s index fa0aaa9d0..0c7a80742 100755 --- a/asm/pokenav.s +++ b/asm/pokenav.s @@ -28252,7 +28252,7 @@ _081D4FB6: lsls r0, 24 cmp r0, 0 beq _081D500C - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0 beq _081D4FE6 @@ -28280,7 +28280,7 @@ _081D4FEC: strb r0, [r4] b _081D500C _081D4FF8: - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0 bne _081D500C @@ -28673,13 +28673,13 @@ _081D5374: bl sub_80097E8 b _081D53C0 _081D537A: - bl sub_800A550 + bl GetBlockReceivedStatus lsls r0, 24 cmp r0, 0 bne _081D5386 b _081D548A _081D5386: - bl sub_800A5B4 + bl ResetBlockReceivedFlags movs r0, 0xF strb r0, [r4, 0x8] b _081D548A @@ -28694,7 +28694,7 @@ _081D5390: b _081D548A .pool _081D53A8: - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0 bne _081D548A diff --git a/asm/record_mixing.s b/asm/record_mixing.s index a62022cc7..aacc5baa0 100644 --- a/asm/record_mixing.s +++ b/asm/record_mixing.s @@ -849,7 +849,7 @@ _080E745A: strh r0, [r5, 0x20] b _080E7566 _080E7464: - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0 bne _080E746E @@ -1066,7 +1066,7 @@ sub_80E7630: @ 80E7630 ldr r1, =gTasks adds r0, r1 mov r10, r0 - bl sub_800A550 + bl GetBlockReceivedStatus lsls r0, 24 lsrs r0, 24 str r0, [sp, 0x4] @@ -1302,7 +1302,7 @@ sub_80E7810: @ 80E7810 sub_80E7820: @ 80E7820 lsls r0, 24 lsrs r0, 16 - ldr r1, =gUnknown_020223C4 + ldr r1, =gBlockRecvBuffer adds r0, r1 bx lr .pool @@ -2368,7 +2368,7 @@ _080E807C: bl sub_800AC34 b _080E80F2 _080E8090: - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0 bne _080E810A diff --git a/asm/recorded_battle.s b/asm/recorded_battle.s index c84b518c3..48325cfed 100644 --- a/asm/recorded_battle.s +++ b/asm/recorded_battle.s @@ -95,7 +95,7 @@ sub_8184E58: @ 8184E58 ldrb r0, [r0] cmp r0, 0x1 bne _08184EA0 - ldr r1, =gUnknown_0203BD2C + ldr r1, =gRecordedBattleRngSeed ldr r0, =gRngValue ldr r0, [r0] str r0, [r1] @@ -112,7 +112,7 @@ _08184EA0: cmp r0, 0x2 bne _08184EAC ldr r0, =gRngValue - ldr r1, =gUnknown_0203BD2C + ldr r1, =gRecordedBattleRngSeed ldr r1, [r1] str r1, [r0] _08184EAC: @@ -779,7 +779,7 @@ _081853BA: movs r4, 0x9D lsls r4, 3 adds r1, r7, r4 - ldr r5, =gUnknown_0203BD2C + ldr r5, =gRecordedBattleRngSeed ldr r0, [r5] str r0, [r1] ldr r0, =gUnknown_0203C7B8 @@ -1576,7 +1576,7 @@ sub_8185B1C: @ 8185B1C ldr r0, =gMain ldr r1, =sub_8185AB0 str r1, [r0, 0x8] - ldr r0, =sub_8036760 + ldr r0, =CB2_InitBattle bl SetMainCallback2 adds r0, r4, 0 bl DestroyTask @@ -1701,7 +1701,7 @@ _08185C2A: adds r6, 0x1 cmp r6, 0x3 ble _08185BBE - ldr r1, =gUnknown_0203BD2C + ldr r1, =gRecordedBattleRngSeed movs r3, 0x9D lsls r3, 3 adds r0, r7, r3 diff --git a/asm/reshow_battle_screen.s b/asm/reshow_battle_screen.s index 42ba43ec0..8bc97b45a 100644 --- a/asm/reshow_battle_screen.s +++ b/asm/reshow_battle_screen.s @@ -98,10 +98,10 @@ _080A93B0: movs r0, 0x3 bl ShowBg bl ResetPaletteFade - ldr r0, =gUnknown_02022E14 + ldr r0, =gBattle_BG0_X movs r1, 0 strh r1, [r0] - ldr r0, =gUnknown_02022E16 + ldr r0, =gBattle_BG0_Y strh r1, [r0] ldr r0, =gBattle_BG1_X strh r1, [r0] @@ -113,7 +113,7 @@ _080A93B0: strh r1, [r0] ldr r0, =gBattle_BG3_X strh r1, [r0] - ldr r0, =gUnknown_02022E22 + ldr r0, =gBattle_BG3_Y strh r1, [r0] b _080A95D2 .pool @@ -128,7 +128,7 @@ _080A942C: b _080A95D2 .pool _080A9444: - bl sub_8035AA4 + bl LoadBattleTextboxAndBackground b _080A95D2 _080A944A: bl ResetSpriteData @@ -275,7 +275,7 @@ _080A955C: ldrb r0, [r0] cmp r0, 0 beq _080A95D2 - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0 beq _080A95D2 diff --git a/asm/rom3.s b/asm/rom3.s index 9bd95c252..23d320474 100644 --- a/asm/rom3.s +++ b/asm/rom3.s @@ -5,8 +5,8 @@ .text - thumb_func_start battle_wireless_setup_if_required_maybe -battle_wireless_setup_if_required_maybe: @ 8032654 + thumb_func_start HandleLinkBattleSetup +HandleLinkBattleSetup: @ 8032654 push {lr} ldr r0, =gBattleTypeFlags ldr r0, [r0] @@ -20,7 +20,7 @@ battle_wireless_setup_if_required_maybe: @ 8032654 beq _0803266E bl sub_800B488 _0803266E: - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0 bne _0803267A @@ -34,10 +34,10 @@ _08032686: pop {r0} bx r0 .pool - thumb_func_end battle_wireless_setup_if_required_maybe + thumb_func_end HandleLinkBattleSetup - thumb_func_start sub_803269C -sub_803269C: @ 803269C + thumb_func_start SetUpBattleVarsAndBirchZigzagoon +SetUpBattleVarsAndBirchZigzagoon: @ 803269C push {r4-r7,lr} sub sp, 0x14 ldr r0, =gBattleMainFunc @@ -71,7 +71,7 @@ _080326B8: adds r1, r0, 0 cmp r1, 0x3 ble _080326B8 - bl battle_wireless_setup_if_required_maybe + bl HandleLinkBattleSetup ldr r0, =gBattleExecBuffer movs r5, 0 str r5, [r0] @@ -112,7 +112,7 @@ _08032728: pop {r0} bx r0 .pool - thumb_func_end sub_803269C + thumb_func_end SetUpBattleVarsAndBirchZigzagoon thumb_func_start sub_8032768 sub_8032768: @ 8032768 @@ -1790,7 +1790,7 @@ _080335A0: ldr r1, [r5] adds r1, r2 adds r2, r6, 0 - bl link_0800A448 + bl SendBlock ldrh r0, [r4, 0x1E] adds r0, 0x1 strh r0, [r4, 0x1E] @@ -1857,7 +1857,7 @@ sub_8033648: @ 8033648 mov r6, r9 mov r5, r8 push {r5-r7} - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0 beq _08033738 @@ -1869,12 +1869,12 @@ sub_8033648: @ 8033648 beq _08033738 bl sub_8011BD0 movs r4, 0 - ldr r0, =gUnknown_020223C4 + ldr r0, =gBlockRecvBuffer mov r10, r0 b _0803372C .pool _08033680: - bl sub_800A550 + bl GetBlockReceivedStatus lsls r0, 24 lsrs r0, 24 ldr r2, =gBitTable @@ -1891,7 +1891,7 @@ _08033680: lsls r0, r4, 8 mov r4, r10 adds r3, r0, r4 - ldr r1, =gUnknown_020223C8 + ldr r1, =gBlockRecvBuffer + 4 adds r0, r1 ldrh r6, [r0] ldr r7, =gTasks diff --git a/asm/rom6.s b/asm/rom6.s index cd1421b4f..44cdaea65 100644 --- a/asm/rom6.s +++ b/asm/rom6.s @@ -11564,7 +11564,7 @@ sub_813B534: @ 813B534 str r0, [r2] movs r0, 0 str r0, [r1] - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0 bne _0813B552 @@ -11651,11 +11651,11 @@ _0813B5FE: lsrs r0, 24 ldr r1, =gSpecialVar_0x8004 movs r2, 0x2 - bl link_0800A448 + bl SendBlock b _0813B708 .pool _0813B614: - bl sub_800A550 + bl GetBlockReceivedStatus movs r1, 0x2 ands r1, r0 cmp r1, 0 @@ -11669,7 +11669,7 @@ _0813B622: b _0813B790 _0813B62E: ldr r5, =gSpecialVar_0x8005 - ldr r0, =gUnknown_020223C4 + ldr r0, =gBlockRecvBuffer movs r1, 0x80 lsls r1, 1 adds r0, r1 @@ -11738,11 +11738,11 @@ _0813B6C2: lsrs r0, 24 ldr r1, =gScriptResult movs r2, 0x2 - bl link_0800A448 + bl SendBlock b _0813B708 .pool _0813B6E4: - bl sub_800A550 + bl GetBlockReceivedStatus movs r1, 0x1 ands r1, r0 cmp r1, 0 @@ -11752,7 +11752,7 @@ _0813B6E4: cmp r0, 0 beq _0813B790 ldr r1, =gScriptResult - ldr r0, =gUnknown_020223C4 + ldr r0, =gBlockRecvBuffer ldrh r0, [r0] strh r0, [r1] movs r0, 0 diff --git a/asm/rom_80A5C6C.s b/asm/rom_80A5C6C.s index 267045179..6135f81e0 100644 --- a/asm/rom_80A5C6C.s +++ b/asm/rom_80A5C6C.s @@ -5155,7 +5155,7 @@ sub_80A8394: @ 80A8394 bl AllocSpritePalette lsls r0, 24 lsrs r5, r0, 24 - ldr r4, =gBattleSpritesGfx + ldr r4, =gMonSpritesGfxPtr ldr r0, [r4] cmp r0, 0 beq _080A8412 @@ -5213,7 +5213,7 @@ _080A845E: lsls r0, r6, 3 ldr r1, =gMonFrontPicTable adds r0, r1 - ldr r1, =gBattleSpritesGfx + ldr r1, =gMonSpritesGfxPtr ldr r1, [r1] movs r3, 0xBE lsls r3, 1 @@ -5226,7 +5226,7 @@ _080A8488: lsls r0, r6, 3 ldr r1, =gMonFrontPicTable adds r0, r1 - ldr r1, =gBattleSpritesGfx + ldr r1, =gMonSpritesGfxPtr ldr r1, [r1] movs r2, 0xBE lsls r2, 1 @@ -5276,7 +5276,7 @@ _080A84F6: lsls r0, r6, 3 ldr r1, =gMonBackPicTable adds r0, r1 - ldr r1, =gBattleSpritesGfx + ldr r1, =gMonSpritesGfxPtr ldr r1, [r1] movs r2, 0xBE lsls r2, 1 @@ -5294,7 +5294,7 @@ _080A8524: lsls r0, r6, 3 ldr r1, =gMonBackPicTable adds r0, r1 - ldr r1, =gBattleSpritesGfx + ldr r1, =gMonSpritesGfxPtr ldr r1, [r1] movs r3, 0xBE lsls r3, 1 @@ -5305,7 +5305,7 @@ _080A8524: mov r3, r8 bl LoadSpecialPokePic_2 _080A8540: - ldr r5, =gBattleSpritesGfx + ldr r5, =gMonSpritesGfxPtr ldr r0, [r5] movs r4, 0xBE lsls r4, 1 diff --git a/asm/script_pokemon_util_80F87D8.s b/asm/script_pokemon_util_80F87D8.s index e26194298..e5f69eeac 100644 --- a/asm/script_pokemon_util_80F87D8.s +++ b/asm/script_pokemon_util_80F87D8.s @@ -670,7 +670,7 @@ sub_80F8D28: @ 80F8D28 beq _080F8D44 b _080F8E9C _080F8D44: - bl init_uns_table_pokemon_copy + bl AllocateMonSpritesGfx movs r0, 0xA mov r9, r0 movs r1, 0x3 @@ -710,7 +710,7 @@ _080F8D44: lsls r0, r6, 3 ldr r1, =gMonFrontPicTable adds r0, r1 - ldr r1, =gBattleSpritesGfx + ldr r1, =gMonSpritesGfxPtr ldr r1, [r1] ldr r1, [r1, 0x8] adds r2, r6, 0 @@ -722,7 +722,7 @@ _080F8DC4: lsls r0, r6, 3 ldr r1, =gMonFrontPicTable adds r0, r1 - ldr r1, =gBattleSpritesGfx + ldr r1, =gMonSpritesGfxPtr ldr r1, [r1] ldr r1, [r1, 0x8] adds r2, r6, 0 @@ -1093,7 +1093,7 @@ sub_80F90DC: @ 80F90DC ands r0, r1 cmp r0, 0 beq _080F90FE - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0 beq _080F90FE @@ -1116,7 +1116,7 @@ sub_80F910C: @ 80F910C ands r0, r1 cmp r0, 0 beq _080F9126 - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0 beq _080F9126 diff --git a/asm/trade.s b/asm/trade.s index 8712567c7..42ed85948 100644 --- a/asm/trade.s +++ b/asm/trade.s @@ -18,7 +18,7 @@ sub_8077170: @ 8077170 lsrs r2, 16 movs r0, 0 adds r1, r4, 0 - bl link_0800A448 + bl SendBlock lsls r0, 24 lsrs r0, 24 b _080771A2 @@ -83,7 +83,7 @@ _080771F8: thumb_func_start sub_8077200 sub_8077200: @ 8077200 push {lr} - bl sub_800A550 + bl GetBlockReceivedStatus lsls r0, 24 lsrs r0, 24 pop {r1} @@ -103,7 +103,7 @@ sub_8077210: @ 8077210 b _08077230 .pool _0807722C: - bl sub_800A5B4 + bl ResetBlockReceivedFlags _08077230: pop {r0} bx r0 @@ -397,7 +397,7 @@ _080774B2: bl sub_807A19C movs r0, 0 bl ShowBg - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r2, [r0] cmp r2, 0 bne _0807754C @@ -504,7 +504,7 @@ _080775D8: b _08077B22 .pool _080775E8: - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0x1 beq _080775F2 @@ -1832,7 +1832,7 @@ sub_80781C8: @ 80781C8 b _08078244 .pool _08078220: - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r4, [r0] cmp r4, 0 bne _08078244 @@ -2198,7 +2198,7 @@ _08078552: adds r1, r5, 0 eors r1, r2 lsls r1, 8 - ldr r2, =gUnknown_020223C4 + ldr r2, =gBlockRecvBuffer adds r1, r2 movs r2, 0xC8 bl sub_8078438 @@ -2237,7 +2237,7 @@ _080785B6: adds r1, r5, 0 eors r1, r2 lsls r1, 8 - ldr r2, =gUnknown_020223C4 + ldr r2, =gBlockRecvBuffer adds r1, r2 movs r2, 0xC8 bl sub_8078438 @@ -2276,7 +2276,7 @@ _0807861A: adds r1, r5, 0 eors r1, r2 lsls r1, 8 - ldr r2, =gUnknown_020223C4 + ldr r2, =gBlockRecvBuffer adds r1, r2 movs r2, 0xC8 bl sub_8078438 @@ -2318,7 +2318,7 @@ _0807868A: adds r1, r5, 0 eors r1, r2 lsls r1, 8 - ldr r2, =gUnknown_020223C4 + ldr r2, =gBlockRecvBuffer adds r1, r2 movs r2, 0xD8 bl sub_8078438 @@ -2360,7 +2360,7 @@ _080786F0: adds r1, r5, 0 eors r1, r2 lsls r1, 8 - ldr r2, =gUnknown_020223C4 + ldr r2, =gBlockRecvBuffer adds r1, r2 movs r2, 0xB bl sub_8078438 @@ -2467,7 +2467,7 @@ sub_80787E0: @ 80787E0 ands r0, r2 cmp r0, 0 beq _08078864 - ldr r0, =gUnknown_020223C4 + ldr r0, =gBlockRecvBuffer ldrh r1, [r0] ldr r0, =0x0000bbbb cmp r1, r0 @@ -2521,7 +2521,7 @@ _08078864: ands r0, r2 cmp r0, 0 beq _080788F6 - ldr r3, =gUnknown_020223C4 + ldr r3, =gBlockRecvBuffer movs r1, 0x80 lsls r1, 1 adds r0, r3, r1 @@ -2597,7 +2597,7 @@ sub_8078900: @ 8078900 ands r0, r5 cmp r0, 0 beq _080789E2 - ldr r2, =gUnknown_020223C4 + ldr r2, =gBlockRecvBuffer ldrh r1, [r2] ldr r0, =0x0000ddee cmp r1, r0 @@ -4052,7 +4052,7 @@ sub_80794CC: @ 80794CC b _0807953A .pool _08079518: - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0 bne _0807953A @@ -6279,7 +6279,7 @@ _0807A718: thumb_func_start sub_807A728 sub_807A728: @ 807A728 push {r4-r7,lr} - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0 beq _0807A7B4 @@ -7054,7 +7054,7 @@ _0807ACC4: thumb_func_start sub_807ACDC sub_807ACDC: @ 807ACDC push {lr} - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0 bne _0807ACF0 @@ -7128,7 +7128,7 @@ _0807AD58: lsls r0, r5, 3 ldr r1, =gMonFrontPicTable adds r0, r1 - ldr r1, =gBattleSpritesGfx + ldr r1, =gMonSpritesGfxPtr ldr r1, [r1] ldr r1, [r1, 0x8] adds r2, r5, 0 @@ -7141,7 +7141,7 @@ _0807AD94: lsls r0, r5, 3 ldr r1, =gMonFrontPicTable adds r0, r1 - ldr r1, =gBattleSpritesGfx + ldr r1, =gMonSpritesGfxPtr ldr r2, [r1] lsls r4, r6, 1 adds r1, r4, 0x1 @@ -7254,7 +7254,7 @@ _0807AE78: .4byte _0807B0D4 .4byte _0807B0F0 _0807AEAC: - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0 bne _0807AEC0 @@ -7270,7 +7270,7 @@ _0807AEC0: adds r0, r5, 0 bl AllocZeroed str r0, [r4] - bl init_uns_table_pokemon_copy + bl AllocateMonSpritesGfx bl ResetTasks bl ResetSpriteData bl FreeAllSpritePalettes @@ -7321,7 +7321,7 @@ _0807AEC0: b _0807B116 .pool _0807AF58: - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r5, [r0] cmp r5, 0 bne _0807AF90 @@ -7401,7 +7401,7 @@ _0807B000: b _0807B116 _0807B006: bl sub_807AC64 - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0x1 beq _0807B014 @@ -7729,7 +7729,7 @@ _0807B2D0: adds r0, r5, 0 bl AllocZeroed str r0, [r4] - bl init_uns_table_pokemon_copy + bl AllocateMonSpritesGfx bl ResetTasks bl ResetSpriteData bl FreeAllSpritePalettes @@ -7989,7 +7989,7 @@ _0807B566: _0807B57C: mov r0, r9 bl sub_807B464 - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0 beq _0807B58E @@ -8029,7 +8029,7 @@ _0807B5D0: ldr r1, [r4] adds r1, 0x74 movs r2, 0x14 - bl link_0800A448 + bl SendBlock ldr r1, [r4] adds r1, 0x93 ldrb r0, [r1] @@ -10369,7 +10369,7 @@ _0807CCEE: lsls r0, r2, 3 ldr r1, =gMonFrontPicTable adds r0, r1 - ldr r1, =gBattleSpritesGfx + ldr r1, =gMonSpritesGfxPtr ldr r1, [r1] ldr r1, [r1, 0x10] ldr r3, [r3, 0x6C] @@ -12474,7 +12474,7 @@ _0807E13A: lsls r0, r2, 3 ldr r1, =gMonFrontPicTable adds r0, r1 - ldr r1, =gBattleSpritesGfx + ldr r1, =gMonSpritesGfxPtr ldr r1, [r1] ldr r1, [r1, 0x10] ldr r3, [r3, 0x6C] @@ -12877,7 +12877,7 @@ _0807E4C2: sub_807E4DC: @ 807E4DC push {r4-r6,lr} bl sub_807ACDC - bl sub_800A550 + bl GetBlockReceivedStatus lsls r0, 24 lsrs r5, r0, 24 movs r6, 0x1 @@ -12885,7 +12885,7 @@ sub_807E4DC: @ 807E4DC ands r0, r6 cmp r0, 0 beq _0807E51A - ldr r4, =gUnknown_020223C4 + ldr r4, =gBlockRecvBuffer ldrh r1, [r4] ldr r0, =0x0000dcba cmp r1, r0 @@ -12909,7 +12909,7 @@ _0807E51A: ands r0, r5 cmp r0, 0 beq _0807E542 - ldr r0, =gUnknown_020223C4 + ldr r0, =gBlockRecvBuffer movs r1, 0x80 lsls r1, 1 adds r0, r1 @@ -13600,7 +13600,7 @@ _0807EAEC: ldr r1, [r4] adds r1, 0x74 movs r2, 0x14 - bl link_0800A448 + bl SendBlock ldr r0, [r4] adds r0, 0x72 movs r1, 0x2 @@ -14090,7 +14090,7 @@ _0807EFF0: b _0807F03A .pool _0807F028: - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r1, [r0] cmp r1, 0 bne _0807F03A diff --git a/asm/trainer_card.s b/asm/trainer_card.s index 7552d7ace..bee1f4f7f 100644 --- a/asm/trainer_card.s +++ b/asm/trainer_card.s @@ -191,7 +191,7 @@ _080C2836: ldrb r0, [r0] cmp r0, 0x1 bne _080C2852 - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0x1 bne _080C2852 @@ -261,7 +261,7 @@ _080C28D8: b _080C2ACA .pool _080C28E4: - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r5, [r0] cmp r5, 0 bne _080C290A @@ -301,7 +301,7 @@ _080C293C: bne _080C2946 b _080C2ACA _080C2946: - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0 beq _080C2960 @@ -346,7 +346,7 @@ _080C299C: ands r0, r1 cmp r0, 0 beq _080C29F4 - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0 beq _080C29DC @@ -358,7 +358,7 @@ _080C299C: cmp r0, 0x1 beq _080C2A14 _080C29C0: - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0 beq _080C29DC @@ -382,7 +382,7 @@ _080C29F4: ands r0, r1 cmp r0, 0 beq _080C2ACA - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0 beq _080C2A20 @@ -430,7 +430,7 @@ _080C2A2C: b _080C2ACA .pool _080C2A68: - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0 bne _080C2ACA @@ -1403,7 +1403,7 @@ sub_80C3278: @ 80C3278 movs r0, 0x40 movs r1, 0xF0 bl SetGpuReg - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0 beq _080C32E0 @@ -4267,7 +4267,7 @@ _080C4BF6: ldrb r0, [r1, 0x4] adds r0, 0x1 strb r0, [r1, 0x4] - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0 beq _080C4B20 @@ -4745,7 +4745,7 @@ sub_80C4FF0: @ 80C4FF0 bl InUnionRoom cmp r0, 0x1 bne _080C5060 - ldr r0, =gUnknown_03003124 + ldr r0, =gReceivedRemoteLinkPlayers ldrb r0, [r0] cmp r0, 0x1 bne _080C5060 diff --git a/asm/unknown_task.s b/asm/unknown_task.s index 99a614e37..f6b96287e 100644 --- a/asm/unknown_task.s +++ b/asm/unknown_task.s @@ -267,11 +267,11 @@ _080BA1D8: .4byte _080BA250 .4byte _080BA24C _080BA214: - ldr r0, =gUnknown_02022E14 + ldr r0, =gBattle_BG0_X b _080BA24E .pool _080BA21C: - ldr r0, =gUnknown_02022E16 + ldr r0, =gBattle_BG0_Y b _080BA24E .pool _080BA224: @@ -295,7 +295,7 @@ _080BA244: b _080BA24E .pool _080BA24C: - ldr r0, =gUnknown_02022E22 + ldr r0, =gBattle_BG3_Y _080BA24E: ldrh r6, [r0] _080BA250: diff --git a/include/battle.h b/include/battle.h index 67d3d873d..72168aa60 100644 --- a/include/battle.h +++ b/include/battle.h @@ -55,6 +55,8 @@ #define BATTLE_TYPE_KYORGE 0x20000000 #define BATTLE_TYPE_RAYQUAZA 0x40000000 +#define TRAINER_OPPONENT_C00 0xC00 +#define TRAINER_OPPONENT_800 0x800 #define STEVEN_PARTNER_ID 0xC03 #define SECRET_BASE_OPPONENT 0x400 @@ -215,14 +217,17 @@ #define BATTLE_TERRAIN_POND 5 #define BATTLE_TERRAIN_ROCK 6 #define BATTLE_TERRAIN_CAVE 7 +#define BATTLE_TERRAIN_INSIDE 8 // array entries for battle communication -#define MULTIUSE_STATE 0x0 -#define CURSOR_POSITION 0x1 -#define TASK_ID 0x1 // task Id and cursor position share the same field -#define MOVE_EFFECT_BYTE 0x3 -#define MULTISTRING_CHOOSER 0x5 -#define MSG_DISPLAY 0x7 +#define MULTIUSE_STATE 0x0 +#define CURSOR_POSITION 0x1 +#define TASK_ID 0x1 // task Id and cursor position share the same field +#define SPRITES_INIT_STATE1 0x1 // shares the Id as well +#define SPRITES_INIT_STATE2 0x2 +#define MOVE_EFFECT_BYTE 0x3 +#define MULTISTRING_CHOOSER 0x5 +#define MSG_DISPLAY 0x7 #define MOVE_TARGET_SELECTED 0x0 #define MOVE_TARGET_DEPENDS 0x1 @@ -633,15 +638,13 @@ struct BattleStruct u8 field_A5; u8 field_A6; u8 field_A7; - u16 hpOnSwitchout[4]; + u16 hpOnSwitchout[2]; + u32 savedBattleTypeFlags; u8 field_B0; u8 hpScale; u8 synchronizeMoveEffect; u8 field_B3; - u8 field_B4; - u8 field_B5; - u8 field_B6; - u8 field_B7; + void (*savedCallback)(void); u16 usedHeldItems[BATTLE_BANKS_COUNT]; u8 field_C0[8]; u16 choicedMove[BATTLE_BANKS_COUNT]; @@ -654,7 +657,11 @@ struct BattleStruct u8 field_DF; u8 mirrorMoveArrays[32]; u16 castformPalette[4][16]; - u8 field_180[32]; + u8 field_180; + u8 field_181; + u8 field_182; + u8 field_183; + struct BattleEnigmaBerry battleEnigmaBerry; u8 field_1A0; u8 field_1A1; u8 filler1A2; @@ -842,13 +849,24 @@ struct BattleScripting u8 atk6C_state; u8 learnMoveState; u8 field_20; + u8 field_21; + u8 field_22; + u8 field_23; + u8 field_24; + u8 multiplayerId; }; extern struct BattleScripting gBattleScripting; // functions +// battle_1 +void LoadBattleTextboxAndBackground(void); +void LoadBattleEntryBackground(void); +void task00_0800F6FC(u8 taskId); + // battle_2 +void CB2_InitBattle(void); void CancelMultiTurnMoves(u8 bank); void PressurePPLose(u8 bankAtk, u8 bankDef, u16 move); void PrepareStringBattle(u16 stringId, u8 bank); @@ -914,13 +932,18 @@ extern void (* const gBattleScriptingCommandsTable[])(void); extern const u8 gUnknown_0831C494[]; // battle_5 +void AllocateBattleResrouces(void); void AdjustFriendshipOnBattleFaint(u8 bank); void sub_80571DC(u8 bank, u8 arg1); u32 sub_805725C(u8 bank); // battle 7 +void AllocateBattleSpritesData(void); void BattleMusicStop(void); void sub_805E990(struct Pokemon* mon, u8 bank); +void AllocateMonSpritesGfx(void); +void sub_805EF14(void); +bool8 BattleInitAllSprites(u8 *state1, u8 *state2); // rom_80A5C6C u8 GetBankSide(u8 bank); @@ -931,13 +954,13 @@ u8 GetBankByIdentity(u8 bank); #include "sprite.h" -struct BattleSpritesGfx +struct MonSpritesGfx { void* firstDecompressed; // ptr to the decompressed sprite of the first pokemon void* sprites[4]; struct SpriteTemplate templates[4]; }; -extern struct BattleSpritesGfx* gBattleSpritesGfx; +extern struct MonSpritesGfx* gMonSpritesGfxPtr; #endif // GUARD_BATTLE_H diff --git a/include/battle_setup.h b/include/battle_setup.h new file mode 100644 index 000000000..80fb55da2 --- /dev/null +++ b/include/battle_setup.h @@ -0,0 +1,6 @@ +#ifndef GUARD_BATTLE_SETUP_H +#define GUARD_BATTLE_SETUP_H + +u8 BattleSetup_GetTerrainId(void); + +#endif // GUARD_BATTLE_SETUP_H diff --git a/include/flags.h b/include/flags.h index 19ec01b56..020fc59cb 100644 --- a/include/flags.h +++ b/include/flags.h @@ -84,6 +84,8 @@ #define SYS_CTRL_OBJ_DELETE CODE_FLAGS + 0x61 #define SYS_RESET_RTC_ENABLE CODE_FLAGS + 0x62 +#define SYS_FRONTIER_PASS CODE_FLAGS + 0x72 + #define SYS_STORAGE_UNKNOWN_FLAG CODE_FLAGS + 0x77 #define SYS_MYSTERY_GIFT_ENABLE CODE_FLAGS + 0x7B diff --git a/include/global.berry.h b/include/global.berry.h index a77da20ba..5c8a43a02 100644 --- a/include/global.berry.h +++ b/include/global.berry.h @@ -1,9 +1,12 @@ #ifndef GUARD_GLOBAL_BERRY_H #define GUARD_GLOBAL_BERRY_H +#define BERRY_NAME_COUNT 7 +#define BERRY_ITEM_EFFECT_COUNT 18 + struct Berry { - const u8 name[7]; + const u8 name[BERRY_NAME_COUNT]; u8 firmness; u16 size; u8 maxYield; @@ -23,7 +26,7 @@ struct Berry struct Berry2 { - u8 name[7]; + u8 name[BERRY_NAME_COUNT]; u8 firmness; u16 size; u8 maxYield; @@ -42,7 +45,7 @@ struct Berry2 struct EnigmaBerry { struct Berry2 berry; - u8 itemEffect[18]; + u8 itemEffect[BERRY_ITEM_EFFECT_COUNT]; u8 holdEffect; u8 holdEffectParam; u32 checksum; @@ -50,9 +53,9 @@ struct EnigmaBerry struct BattleEnigmaBerry { - /*0x00*/ u8 name[7]; + /*0x00*/ u8 name[BERRY_NAME_COUNT]; /*0x07*/ u8 holdEffect; - /*0x08*/ u8 itemEffect[18]; + /*0x08*/ u8 itemEffect[BERRY_ITEM_EFFECT_COUNT]; /*0x1A*/ u8 holdEffectParam; }; diff --git a/include/global.h b/include/global.h index 4014c6dde..e0c09d29a 100644 --- a/include/global.h +++ b/include/global.h @@ -198,8 +198,13 @@ struct SaveBlock2 // All below could be a one giant struct /*0x64C*/ u8 field_64C[1629]; - /*0xCA9*/ u8 frontierChosenLvl : 2; - /*0xCA9*/ u8 field_CA9_a : 6; + /*0xCA9*/ u8 frontierChosenLvl : 2; // 0x1, 0x2 -> 0x3 + /*0xCA9*/ u8 field_CA9_a : 1; // 0x4 + /*0xCA9*/ u8 field_CA9_b : 1; // 0x8 + /*0xCA9*/ u8 field_CA9_c : 1; // 0x10 + /*0xCA9*/ u8 field_CA9_d : 1; // 0x20 + /*0xCA9*/ u8 field_CA9_e : 1; // 0x40 + /*0xCA9*/ u8 field_CA9_f : 1; // 0x80 /*0xCAA*/ u8 field_CAA[368]; /*0xE1A*/ u16 battlePyramidFloor; // possibly? /*0xE1C*/ u8 field_E1C[16]; diff --git a/include/link.h b/include/link.h index 5db3ff3d2..b719371da 100644 --- a/include/link.h +++ b/include/link.h @@ -143,7 +143,6 @@ extern u16 word_3002910[]; extern bool8 gReceivedRemoteLinkPlayers; void Task_DestroySelf(u8); -void sub_8007270(u8); void OpenLink(void); void CloseLink(void); u16 LinkMain2(u16 *); @@ -162,24 +161,12 @@ void sub_8007E4C(void); u8 GetMultiplayerId(void); u8 bitmask_all_link_players_but_self(void); bool8 SendBlock(u8, void *, u16); -bool8 sub_8007E9C(u8); -bool8 sub_8007ECC(void); u8 GetBlockReceivedStatus(void); void ResetBlockReceivedFlags(void); void ResetBlockReceivedFlag(u8); -void sub_8007F4C(void); void SetLinkDebugValues(u32, u32); -u8 sub_8008198(void); -void sub_80081C8(u8); -u8 sub_800820C(void); -u8 sub_8008218(void); -void sub_800826C(void); -void sub_80082EC(void); u8 GetLinkPlayerCount_2(void); bool8 IsLinkMaster(void); -void sub_800832C(void); -void sub_8008480(void); -void sub_80084A4(void); void CB2_LinkError(void); u8 GetSioMultiSI(void); bool8 IsLinkConnectionEstablished(void); @@ -191,4 +178,9 @@ void LinkVSync(void); void Timer3Intr(void); void SerialCB(void); +void sub_800E0E8(void); +bool8 sub_800A520(void); +bool8 sub_8010500(void); +void sub_800DFB4(u8, u8); + #endif // GUARD_LINK_H diff --git a/include/load_save.h b/include/load_save.h index 20848e1a7..1f406bbad 100644 --- a/include/load_save.h +++ b/include/load_save.h @@ -19,5 +19,6 @@ void LoadSerializedGame(void); void LoadPlayerBag(void); void SavePlayerBag(void); void SetSaveBlocksPointers(u16); +void MoveSaveBlocks_ResetHeap(void); #endif // GUARD_LOAD_SAVE_H diff --git a/include/pokemon.h b/include/pokemon.h index 20e904f39..5ebb9afb1 100644 --- a/include/pokemon.h +++ b/include/pokemon.h @@ -632,6 +632,7 @@ void HandleSetPokedexFlag(u16 nationalNum, u8 caseId, u32 personality); s32 sub_806D864(u16 a1); bool16 sub_806D82C(u8 id); u16 MonTryLearningNewMove(struct Pokemon* mon, bool8); +void sub_8068AA4(void); // sets stats for deoxys #include "sprite.h" diff --git a/include/recorded_battle.h b/include/recorded_battle.h index d19a2b713..407d0caf7 100644 --- a/include/recorded_battle.h +++ b/include/recorded_battle.h @@ -1,6 +1,11 @@ #ifndef GUARD_RECORDED_BATTLE_H #define GUARD_RECORDED_BATTLE_H +extern u32 gRecordedBattleRngSeed; + +void sub_8185F84(void); +void sub_8184E58(void); void RecordedBattle_SetBankAction(u8 bank, u8 action); +void sub_8185F90(u16 arg0); #endif // GUARD_RECORDED_BATTLE_H diff --git a/include/unknown_task.h b/include/unknown_task.h index f59ca9ac3..7457451a8 100644 --- a/include/unknown_task.h +++ b/include/unknown_task.h @@ -2,10 +2,20 @@ #define GUARD_unknown_task_H // Exported type declarations +struct UnknownTaskStruct +{ + volatile void *dest; + u32 control; + u8 unk8; + u8 unk9; +}; + +extern struct UnknownTaskStruct gUnknown_0831AC70; // Exported RAM declarations // Exported ROM declarations void remove_some_task(void); +void sub_80BA038(struct UnknownTaskStruct arg0); -#endif //GUARD_unknown_task_H +#endif // GUARD_unknown_task_H diff --git a/ld_script.txt b/ld_script.txt index c2f8af595..ac335b17c 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -57,6 +57,7 @@ SECTIONS { asm/rom3.o(.text); src/decompress.o(.text); asm/battle_1.o(.text); + src/battle_2.o(.text); asm/battle_2.o(.text); src/battle_3.o(.text); src/battle_script_commands.o(.text); diff --git a/src/battle_2.c b/src/battle_2.c new file mode 100644 index 000000000..844827326 --- /dev/null +++ b/src/battle_2.c @@ -0,0 +1,1343 @@ +#include "global.h" +#include "battle.h" +#include "recorded_battle.h" +#include "main.h" +#include "load_save.h" +#include "gpu_regs.h" +#include "unknown_task.h" +#include "battle_setup.h" +#include "pokemon.h" +#include "palette.h" +#include "task.h" +#include "event_data.h" +#include "species.h" +#include "berry.h" +#include "text.h" +#include "items.h" +#include "hold_effects.h" +#include "link.h" +#include "bg.h" +#include "dma3.h" +#include "string_util.h" +#include "malloc.h" + +struct UnknownStruct6 +{ + u16 unk0[0xA0]; + u8 fillerA0[0x640]; + u16 unk780[0xA0]; +}; + +struct UnknownPokemonStruct2 +{ + /*0x00*/ u16 species; + /*0x02*/ u16 heldItem; + /*0x04*/ u8 nickname[POKEMON_NAME_LENGTH + 1]; + /*0x0F*/ u8 level; + /*0x10*/ u16 hp; + /*0x12*/ u16 maxhp; + /*0x14*/ u32 status; + /*0x18*/ u32 personality; + /*0x1C*/ u8 gender; + /*0x1D*/ u8 language; +}; + +extern u32 gBattleTypeFlags; +extern u8 gBattleCommunication[]; +extern u8 gBattleTerrain; +extern u16 gBattle_BG0_X; +extern u16 gBattle_BG0_Y; +extern u16 gBattle_BG1_X; +extern u16 gBattle_BG1_Y; +extern u16 gBattle_BG2_X; +extern u16 gBattle_BG2_Y; +extern u16 gBattle_BG3_X; +extern u16 gBattle_BG3_Y; +extern u16 gPartnerTrainerId; +extern u16 gBattle_WIN0H; +extern u16 gBattle_WIN0V; +extern u16 gBattle_WIN1H; +extern u16 gBattle_WIN1V; +extern u16 gTrainerBattleOpponent_A; +extern u16 gTrainerBattleOpponent_B; +extern struct BattleEnigmaBerry gEnigmaBerries[BATTLE_BANKS_COUNT]; +extern void (*gPreBattleCallback1)(void); +extern struct UnknownPokemonStruct2 gUnknown_02022FF8[3]; // what is it used for? +extern struct UnknownPokemonStruct2* gUnknown_02023058; // what is it used for? + +extern struct UnknownStruct6 gUnknown_02038C28; // todo: identify & document + +extern void HandleLinkBattleSetup(void); // rom_3 +extern void SetUpBattleVarsAndBirchZigzagoon(void); // rom_3 +extern void sub_8032768(void); // rom_3 +extern void dp12_8087EA4(void); +extern void c2_berry_program_update_menu(void); +extern void GetFrontierTrainerName(u8* dst, u16 trainerId); // battle tower +extern void sub_8166188(void); // battle tower, sets link battle mons level but why? +extern void sub_8165B88(u8* dst, u16 trainerId); // battle tower, gets language +extern void sub_81DB4DC(u8* dst, u8 arg2); // +extern void sub_81B9150(void); +extern void sub_800ADF8(void); +extern void sub_800AC34(void); + +// this file's functions +static void CB2_InitBattleInternal(void); +static void CB2_PreInitMultiBattle(void); +static void CB2_PreInitIngamePlayerPartnerBattle(void); +static void CB2_HandleStartMultiPartnerBattle(void); +static void CB2_HandleStartMultiBattle(void); +static void CB2_HandleStartBattle(void); +void shedinja_something(struct Pokemon *mon); +void CreateNPCTrainerParty(struct Pokemon *party, u16 trainerNum, bool8 firstTrainer); +void BattleMainCB1(void); + +void CB2_InitBattle(void) +{ + MoveSaveBlocks_ResetHeap(); + AllocateBattleResrouces(); + AllocateBattleSpritesData(); + AllocateMonSpritesGfx(); + sub_8185F84(); + + if (gBattleTypeFlags & BATTLE_TYPE_MULTI) + { + if (gBattleTypeFlags & BATTLE_TYPE_RECORDED) + { + CB2_InitBattleInternal(); + } + else if (!(gBattleTypeFlags & BATTLE_TYPE_INGAME_PARTNER)) + { + HandleLinkBattleSetup(); + SetMainCallback2(CB2_PreInitMultiBattle); + } + else + { + SetMainCallback2(CB2_PreInitIngamePlayerPartnerBattle); + } + gBattleCommunication[MULTIUSE_STATE] = 0; + } + else + { + CB2_InitBattleInternal(); + } +} + +static void CB2_InitBattleInternal(void) +{ + s32 i; + + SetHBlankCallback(NULL); + SetVBlankCallback(NULL); + + CpuFill32(0, (void *)VRAM, VRAM_SIZE); + + SetGpuReg(REG_OFFSET_MOSAIC, 0); + SetGpuReg(REG_OFFSET_WIN0H, 240); + SetGpuReg(REG_OFFSET_WIN0V, 0x5051); + SetGpuReg(REG_OFFSET_WININ, 0); + SetGpuReg(REG_OFFSET_WINOUT, 0); + + gBattle_WIN0H = 240; + + if (gBattleTypeFlags & BATTLE_TYPE_INGAME_PARTNER && gPartnerTrainerId != STEVEN_PARTNER_ID) + { + gBattle_WIN0V = 159; + gBattle_WIN1H = 240; + gBattle_WIN1V = 32; + } + else + { + gBattle_WIN0V = 0x5051; + dp12_8087EA4(); + + for (i = 0; i < 80; i++) + { + gUnknown_02038C28.unk0[i] = 0xF0; + gUnknown_02038C28.unk780[i] = 0xF0; + } + for (i = 80; i < 160; i++) + { + #ifndef NONMATCHING + asm(""::"r"(i)); // needed to match + #endif // NONMATCHING + + gUnknown_02038C28.unk0[i] = 0xFF10; + gUnknown_02038C28.unk780[i] = 0xFF10; + } + + sub_80BA038(gUnknown_0831AC70); + } + + ResetPaletteFade(); + gBattle_BG0_X = 0; + gBattle_BG0_Y = 0; + gBattle_BG1_X = 0; + gBattle_BG1_Y = 0; + gBattle_BG2_X = 0; + gBattle_BG2_Y = 0; + gBattle_BG3_X = 0; + gBattle_BG3_Y = 0; + + gBattleTerrain = BattleSetup_GetTerrainId(); + if (gBattleTypeFlags & BATTLE_TYPE_RECORDED) + gBattleTerrain = BATTLE_TERRAIN_INSIDE; + + c2_berry_program_update_menu(); + LoadBattleTextboxAndBackground(); + ResetSpriteData(); + ResetTasks(); + LoadBattleEntryBackground(); + FreeAllSpritePalettes(); + gReservedSpritePaletteCount = 4; + SetVBlankCallback(VBlankCB_Battle); + SetUpBattleVarsAndBirchZigzagoon(); + + if (gBattleTypeFlags & BATTLE_TYPE_MULTI && gBattleTypeFlags & BATTLE_TYPE_BATTLE_TOWER) + SetMainCallback2(CB2_HandleStartMultiPartnerBattle); + else if (gBattleTypeFlags & BATTLE_TYPE_MULTI && gBattleTypeFlags & BATTLE_TYPE_INGAME_PARTNER) + SetMainCallback2(CB2_HandleStartMultiPartnerBattle); + else if (gBattleTypeFlags & BATTLE_TYPE_MULTI) + SetMainCallback2(CB2_HandleStartMultiBattle); + else + SetMainCallback2(CB2_HandleStartBattle); + + if (!(gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_RECORDED))) + { + CreateNPCTrainerParty(&gEnemyParty[0], gTrainerBattleOpponent_A, TRUE); + if (gBattleTypeFlags & BATTLE_TYPE_TWO_OPPONENTS) + CreateNPCTrainerParty(&gEnemyParty[3], gTrainerBattleOpponent_B, FALSE); + SetWildMonHeldItem(); + } + + gMain.inBattle = TRUE; + gSaveBlock2Ptr->field_CA9_b = 0; + + for (i = 0; i < 6; i++) + AdjustFriendship(&gPlayerParty[i], 3); + + gBattleCommunication[MULTIUSE_STATE] = 0; +} + +static void sub_8036A5C(void) +{ + u16 r6 = 0; + u16 species = 0; + u16 hp = 0; + u32 status = 0; + s32 i; + + for (i = 0; i < 6; i++) + { + species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2); + hp = GetMonData(&gPlayerParty[i], MON_DATA_HP); + status = GetMonData(&gPlayerParty[i], MON_DATA_STATUS); + + if (species == SPECIES_NONE) + continue; + if (species != SPECIES_EGG && hp != 0 && status == 0) + r6 |= 1 << i * 2; + + if (species == SPECIES_NONE) + continue; + if (hp != 0 && (species == SPECIES_EGG || status != 0)) + r6 |= 2 << i * 2; + + if (species == SPECIES_NONE) + continue; + if (species != SPECIES_EGG && hp == 0) + r6 |= 3 << i * 2; + } + + gBattleStruct->field_182 = r6; + *(&gBattleStruct->field_183) = r6 >> 8; + gBattleStruct->field_183 |= FlagGet(SYS_FRONTIER_PASS) << 7; +} + +static void SetPlayerBerryDataInBattleStruct(void) +{ + s32 i; + struct BattleStruct *battleStruct = gBattleStruct; + struct BattleEnigmaBerry *battleBerry = &battleStruct->battleEnigmaBerry; + + if (IsEnigmaBerryValid() == TRUE) + { + for (i = 0; i < BERRY_NAME_COUNT - 1; i++) + battleBerry->name[i] = gSaveBlock1Ptr->enigmaBerry.berry.name[i]; + battleBerry->name[i] = EOS; + + for (i = 0; i < BERRY_ITEM_EFFECT_COUNT; i++) + battleBerry->itemEffect[i] = gSaveBlock1Ptr->enigmaBerry.itemEffect[i]; + + battleBerry->holdEffect = gSaveBlock1Ptr->enigmaBerry.holdEffect; + battleBerry->holdEffectParam = gSaveBlock1Ptr->enigmaBerry.holdEffectParam; + } + else + { + const struct Berry* berryData = GetBerryInfo(ItemIdToBerryType(ITEM_ENIGMA_BERRY)); + + for (i = 0; i < BERRY_NAME_COUNT - 1; i++) + battleBerry->name[i] = berryData->name[i]; + battleBerry->name[i] = EOS; + + for (i = 0; i < BERRY_ITEM_EFFECT_COUNT; i++) + battleBerry->itemEffect[i] = 0; + + battleBerry->holdEffect = HOLD_EFFECT_NONE; + battleBerry->holdEffectParam = 0; + } +} + +static void SetAllPlayersBerryData(void) +{ + s32 i; + s32 j; + + if (!(gBattleTypeFlags & BATTLE_TYPE_LINK)) + { + if (IsEnigmaBerryValid() == TRUE) + { + for (i = 0; i < BERRY_NAME_COUNT - 1; i++) + { + gEnigmaBerries[0].name[i] = gSaveBlock1Ptr->enigmaBerry.berry.name[i]; + gEnigmaBerries[2].name[i] = gSaveBlock1Ptr->enigmaBerry.berry.name[i]; + } + gEnigmaBerries[0].name[i] = EOS; + gEnigmaBerries[2].name[i] = EOS; + + for (i = 0; i < BERRY_ITEM_EFFECT_COUNT; i++) + { + gEnigmaBerries[0].itemEffect[i] = gSaveBlock1Ptr->enigmaBerry.itemEffect[i]; + gEnigmaBerries[2].itemEffect[i] = gSaveBlock1Ptr->enigmaBerry.itemEffect[i]; + } + + gEnigmaBerries[0].holdEffect = gSaveBlock1Ptr->enigmaBerry.holdEffect; + gEnigmaBerries[2].holdEffect = gSaveBlock1Ptr->enigmaBerry.holdEffect; + gEnigmaBerries[0].holdEffectParam = gSaveBlock1Ptr->enigmaBerry.holdEffectParam; + gEnigmaBerries[2].holdEffectParam = gSaveBlock1Ptr->enigmaBerry.holdEffectParam; + } + else + { + const struct Berry* berryData = GetBerryInfo(ItemIdToBerryType(ITEM_ENIGMA_BERRY)); + + for (i = 0; i < BERRY_NAME_COUNT - 1; i++) + { + gEnigmaBerries[0].name[i] = berryData->name[i]; + gEnigmaBerries[2].name[i] = berryData->name[i]; + } + gEnigmaBerries[0].name[i] = EOS; + gEnigmaBerries[2].name[i] = EOS; + + for (i = 0; i < BERRY_ITEM_EFFECT_COUNT; i++) + { + gEnigmaBerries[0].itemEffect[i] = 0; + gEnigmaBerries[2].itemEffect[i] = 0; + } + + gEnigmaBerries[0].holdEffect = 0; + gEnigmaBerries[2].holdEffect = 0; + gEnigmaBerries[0].holdEffectParam = 0; + gEnigmaBerries[2].holdEffectParam = 0; + } + } + else + { + s32 numPlayers; + struct BattleEnigmaBerry *src; + u8 r4; + + if (gBattleTypeFlags & BATTLE_TYPE_MULTI) + { + if (gBattleTypeFlags & BATTLE_TYPE_BATTLE_TOWER) + numPlayers = 2; + else + numPlayers = 4; + + for (i = 0; i < numPlayers; i++) + { + src = (struct BattleEnigmaBerry *)(gBlockRecvBuffer[i] + 2); + r4 = gLinkPlayers[i].lp_field_18; + + for (j = 0; j < BERRY_NAME_COUNT - 1; j++) + gEnigmaBerries[r4].name[j] = src->name[j]; + gEnigmaBerries[r4].name[j] = EOS; + + for (j = 0; j < BERRY_ITEM_EFFECT_COUNT; j++) + gEnigmaBerries[r4].itemEffect[j] = src->itemEffect[j]; + + gEnigmaBerries[r4].holdEffect = src->holdEffect; + gEnigmaBerries[r4].holdEffectParam = src->holdEffectParam; + } + } + else + { + for (i = 0; i < 2; i++) + { + src = (struct BattleEnigmaBerry *)(gBlockRecvBuffer[i] + 2); + + for (j = 0; j < BERRY_NAME_COUNT - 1; j++) + { + gEnigmaBerries[i].name[j] = src->name[j]; + gEnigmaBerries[i + 2].name[j] = src->name[j]; + } + gEnigmaBerries[i].name[j] = EOS; + gEnigmaBerries[i + 2].name[j] = EOS; + + for (j = 0; j < BERRY_ITEM_EFFECT_COUNT; j++) + { + gEnigmaBerries[i].itemEffect[j] = src->itemEffect[j]; + gEnigmaBerries[i + 2].itemEffect[j] = src->itemEffect[j]; + } + + gEnigmaBerries[i].holdEffect = src->holdEffect; + gEnigmaBerries[i + 2].holdEffect = src->holdEffect; + gEnigmaBerries[i].holdEffectParam = src->holdEffectParam; + gEnigmaBerries[i + 2].holdEffectParam = src->holdEffectParam; + } + } + } +} + +static void sub_8036EB8(u8 arg0, u8 arg1) +{ + u8 var = 0; + + if (gBlockRecvBuffer[0][0] == 256) + { + if (arg1 == 0) + gBattleTypeFlags |= BATTLE_TYPE_WILD | BATTLE_TYPE_TRAINER; + else + gBattleTypeFlags |= BATTLE_TYPE_TRAINER; + var++; + } + + if (var == 0) + { + s32 i; + + for (i = 0; i < arg0; i++) + { + if (gBlockRecvBuffer[0][0] != gBlockRecvBuffer[i][0]) + break; + } + + if (i == arg0) + { + if (arg1 == 0) + gBattleTypeFlags |= BATTLE_TYPE_WILD | BATTLE_TYPE_TRAINER; + else + gBattleTypeFlags |= BATTLE_TYPE_TRAINER; + var++; + } + + if (var == 0) + { + for (i = 0; i < arg0; i++) + { + if (gBlockRecvBuffer[i][0] == 0x300) + { + if (i != arg1 && i < arg1) + break; + } + if (gBlockRecvBuffer[i][0] > 0x300 && i != arg1) + break; + } + + if (i == arg0) + gBattleTypeFlags |= BATTLE_TYPE_WILD | BATTLE_TYPE_TRAINER; + else + gBattleTypeFlags |= BATTLE_TYPE_TRAINER; + } + } +} + +static void CB2_HandleStartBattle(void) +{ + u8 playerMultiplayerId; + u8 enemyMultiplayerId; + + RunTasks(); + AnimateSprites(); + BuildOamBuffer(); + + playerMultiplayerId = GetMultiplayerId(); + gBattleScripting.multiplayerId = playerMultiplayerId; + enemyMultiplayerId = playerMultiplayerId ^ BIT_SIDE; + + switch (gBattleCommunication[MULTIUSE_STATE]) + { + case 0: + if (!IsDma3ManagerBusyWithBgCopy()) + { + ShowBg(0); + ShowBg(1); + ShowBg(2); + ShowBg(3); + sub_805EF14(); + gBattleCommunication[MULTIUSE_STATE] = 1; + } + if (gLinkVSyncDisabled) + sub_800E0E8(); + break; + case 1: + if (gBattleTypeFlags & BATTLE_TYPE_LINK) + { + if (gReceivedRemoteLinkPlayers != 0) + { + if (sub_800A520()) + { + *(&gBattleStruct->field_180) = 0; + *(&gBattleStruct->field_181) = 3; + sub_8036A5C(); + SetPlayerBerryDataInBattleStruct(); + + if (gTrainerBattleOpponent_A == TRAINER_OPPONENT_C00) + { + gLinkPlayers[0].lp_field_18 = 0; + gLinkPlayers[1].lp_field_18 = 1; + } + + SendBlock(bitmask_all_link_players_but_self(), &gBattleStruct->field_180, 32); + gBattleCommunication[MULTIUSE_STATE] = 2; + } + if (gLinkVSyncDisabled) + sub_800DFB4(0, 0); + } + } + else + { + if (!(gBattleTypeFlags & BATTLE_TYPE_RECORDED)) + gBattleTypeFlags |= BATTLE_TYPE_WILD; + gBattleCommunication[MULTIUSE_STATE] = 15; + SetAllPlayersBerryData(); + } + break; + case 2: + if ((GetBlockReceivedStatus() & 3) == 3) + { + u8 taskId; + + ResetBlockReceivedFlags(); + sub_8036EB8(2, playerMultiplayerId); + SetAllPlayersBerryData(); + taskId = CreateTask(task00_0800F6FC, 0); + gTasks[taskId].data[1] = 0x10E; + gTasks[taskId].data[2] = 0x5A; + gTasks[taskId].data[5] = 0; + gTasks[taskId].data[3] = gBattleStruct->field_182 | (gBattleStruct->field_183 << 8); + gTasks[taskId].data[4] = gBlockRecvBuffer[enemyMultiplayerId][1]; + sub_8185F90(gBlockRecvBuffer[playerMultiplayerId][1]); + sub_8185F90(gBlockRecvBuffer[enemyMultiplayerId][1]); + sub_8068AA4(); + gBattleCommunication[MULTIUSE_STATE]++; + } + break; + case 3: + if (sub_800A520()) + { + SendBlock(bitmask_all_link_players_but_self(), gPlayerParty, sizeof(struct Pokemon) * 2); + gBattleCommunication[MULTIUSE_STATE]++; + } + break; + case 4: + if ((GetBlockReceivedStatus() & 3) == 3) + { + ResetBlockReceivedFlags(); + memcpy(gEnemyParty, gBlockRecvBuffer[enemyMultiplayerId], sizeof(struct Pokemon) * 2); + gBattleCommunication[MULTIUSE_STATE]++; + } + break; + case 7: + if (sub_800A520()) + { + SendBlock(bitmask_all_link_players_but_self(), gPlayerParty + 2, sizeof(struct Pokemon) * 2); + gBattleCommunication[MULTIUSE_STATE]++; + } + break; + case 8: + if ((GetBlockReceivedStatus() & 3) == 3) + { + ResetBlockReceivedFlags(); + memcpy(gEnemyParty + 2, gBlockRecvBuffer[enemyMultiplayerId], sizeof(struct Pokemon) * 2); + gBattleCommunication[MULTIUSE_STATE]++; + } + break; + case 11: + if (sub_800A520()) + { + SendBlock(bitmask_all_link_players_but_self(), gPlayerParty + 4, sizeof(struct Pokemon) * 2); + gBattleCommunication[MULTIUSE_STATE]++; + } + break; + case 12: + if ((GetBlockReceivedStatus() & 3) == 3) + { + ResetBlockReceivedFlags(); + memcpy(gEnemyParty + 4, gBlockRecvBuffer[enemyMultiplayerId], sizeof(struct Pokemon) * 2); + shedinja_something(&gEnemyParty[0]); + shedinja_something(&gEnemyParty[1]); + shedinja_something(&gEnemyParty[2]); + shedinja_something(&gEnemyParty[3]); + shedinja_something(&gEnemyParty[4]); + shedinja_something(&gEnemyParty[5]); + gBattleCommunication[MULTIUSE_STATE]++; + } + break; + case 15: + sub_8032768(); + sub_8184E58(); + gBattleCommunication[SPRITES_INIT_STATE1] = 0; + gBattleCommunication[SPRITES_INIT_STATE2] = 0; + if (gBattleTypeFlags & BATTLE_TYPE_LINK) + { + s32 i; + + for (i = 0; i < 2 && (gLinkPlayers[i].version & 0xFF) == 3; i++); + + if (i == 2) + gBattleCommunication[MULTIUSE_STATE] = 16; + else + gBattleCommunication[MULTIUSE_STATE] = 18; + } + else + { + gBattleCommunication[MULTIUSE_STATE] = 18; + } + break; + case 16: + if (sub_800A520()) + { + SendBlock(bitmask_all_link_players_but_self(), &gRecordedBattleRngSeed, sizeof(gRecordedBattleRngSeed)); + gBattleCommunication[MULTIUSE_STATE]++; + } + break; + case 17: + if ((GetBlockReceivedStatus() & 3) == 3) + { + ResetBlockReceivedFlags(); + if (!(gBattleTypeFlags & BATTLE_TYPE_WILD)) + memcpy(&gRecordedBattleRngSeed, gBlockRecvBuffer[enemyMultiplayerId], sizeof(gRecordedBattleRngSeed)); + gBattleCommunication[MULTIUSE_STATE]++; + } + break; + case 18: + if (BattleInitAllSprites(&gBattleCommunication[SPRITES_INIT_STATE1], &gBattleCommunication[SPRITES_INIT_STATE2])) + { + gPreBattleCallback1 = gMain.callback1; + gMain.callback1 = BattleMainCB1; + SetMainCallback2(BattleMainCB2); + if (gBattleTypeFlags & BATTLE_TYPE_LINK) + { + gBattleTypeFlags |= BATTLE_TYPE_20; + } + } + break; + case 5: + case 9: + case 13: + gBattleCommunication[MULTIUSE_STATE]++; + gBattleCommunication[1] = 1; + case 6: + case 10: + case 14: + if (--gBattleCommunication[1] == 0) + gBattleCommunication[MULTIUSE_STATE]++; + break; + } +} + +static void CB2_HandleStartMultiPartnerBattle(void) +{ + u8 playerMultiplayerId; + u8 enemyMultiplayerId; + + RunTasks(); + AnimateSprites(); + BuildOamBuffer(); + + playerMultiplayerId = GetMultiplayerId(); + gBattleScripting.multiplayerId = playerMultiplayerId; + enemyMultiplayerId = playerMultiplayerId ^ BIT_SIDE; + + switch (gBattleCommunication[MULTIUSE_STATE]) + { + case 0: + if (!IsDma3ManagerBusyWithBgCopy()) + { + ShowBg(0); + ShowBg(1); + ShowBg(2); + ShowBg(3); + sub_805EF14(); + gBattleCommunication[MULTIUSE_STATE] = 1; + } + if (gLinkVSyncDisabled) + sub_800E0E8(); + // fall through + case 1: + if (gBattleTypeFlags & BATTLE_TYPE_LINK) + { + if (gReceivedRemoteLinkPlayers != 0) + { + u8 language; + + gLinkPlayers[0].lp_field_18 = 0; + gLinkPlayers[1].lp_field_18 = 2; + gLinkPlayers[2].lp_field_18 = 1; + gLinkPlayers[3].lp_field_18 = 3; + GetFrontierTrainerName(gLinkPlayers[2].name, gTrainerBattleOpponent_A); + GetFrontierTrainerName(gLinkPlayers[3].name, gTrainerBattleOpponent_B); + sub_8165B88(&language, gTrainerBattleOpponent_A); + gLinkPlayers[2].language = language; + sub_8165B88(&language, gTrainerBattleOpponent_B); + gLinkPlayers[3].language = language; + + if (sub_800A520()) + { + *(&gBattleStruct->field_180) = 0; + *(&gBattleStruct->field_181) = 3; + sub_8036A5C(); + SetPlayerBerryDataInBattleStruct(); + SendBlock(bitmask_all_link_players_but_self(), &gBattleStruct->field_180, 32); + gBattleCommunication[MULTIUSE_STATE] = 2; + } + + if (gLinkVSyncDisabled) + sub_800DFB4(0, 0); + } + } + else + { + if (!(gBattleTypeFlags & BATTLE_TYPE_RECORDED)) + gBattleTypeFlags |= BATTLE_TYPE_WILD; + gBattleCommunication[MULTIUSE_STATE] = 13; + SetAllPlayersBerryData(); + } + break; + case 2: + if ((GetBlockReceivedStatus() & 3) == 3) + { + u8 taskId; + + ResetBlockReceivedFlags(); + sub_8036EB8(2, playerMultiplayerId); + SetAllPlayersBerryData(); + taskId = CreateTask(task00_0800F6FC, 0); + gTasks[taskId].data[1] = 0x10E; + gTasks[taskId].data[2] = 0x5A; + gTasks[taskId].data[5] = 0; + gTasks[taskId].data[3] = 0x145; + gTasks[taskId].data[4] = 0x145; + gBattleCommunication[MULTIUSE_STATE]++; + } + break; + case 3: + if (sub_800A520()) + { + SendBlock(bitmask_all_link_players_but_self(), gPlayerParty, sizeof(struct Pokemon) * 2); + gBattleCommunication[MULTIUSE_STATE]++; + } + break; + case 4: + if ((GetBlockReceivedStatus() & 3) == 3) + { + ResetBlockReceivedFlags(); + if (gLinkPlayers[playerMultiplayerId].lp_field_18 != 0) + { + memcpy(gPlayerParty, gBlockRecvBuffer[enemyMultiplayerId], sizeof(struct Pokemon) * 2); + memcpy(gPlayerParty + 3, gBlockRecvBuffer[playerMultiplayerId], sizeof(struct Pokemon) * 2); + } + else + { + memcpy(gPlayerParty, gBlockRecvBuffer[playerMultiplayerId], sizeof(struct Pokemon) * 2); + memcpy(gPlayerParty + 3, gBlockRecvBuffer[enemyMultiplayerId], sizeof(struct Pokemon) * 2); + } + gBattleCommunication[MULTIUSE_STATE]++; + } + break; + case 5: + if (sub_800A520()) + { + SendBlock(bitmask_all_link_players_but_self(), gPlayerParty + 2, sizeof(struct Pokemon)); + gBattleCommunication[MULTIUSE_STATE]++; + } + break; + case 6: + if ((GetBlockReceivedStatus() & 3) == 3) + { + ResetBlockReceivedFlags(); + if (gLinkPlayers[playerMultiplayerId].lp_field_18 != 0) + { + memcpy(gPlayerParty + 2, gBlockRecvBuffer[enemyMultiplayerId], sizeof(struct Pokemon)); + memcpy(gPlayerParty + 5, gBlockRecvBuffer[playerMultiplayerId], sizeof(struct Pokemon)); + } + else + { + memcpy(gPlayerParty + 2, gBlockRecvBuffer[playerMultiplayerId], sizeof(struct Pokemon)); + memcpy(gPlayerParty + 5, gBlockRecvBuffer[enemyMultiplayerId], sizeof(struct Pokemon)); + } + gBattleCommunication[MULTIUSE_STATE]++; + } + break; + case 7: + if (sub_800A520()) + { + SendBlock(bitmask_all_link_players_but_self(), gEnemyParty, sizeof(struct Pokemon) * 2); + gBattleCommunication[MULTIUSE_STATE]++; + } + break; + case 8: + if ((GetBlockReceivedStatus() & 3) == 3) + { + ResetBlockReceivedFlags(); + if (GetMultiplayerId() != 0) + { + memcpy(gEnemyParty, gBlockRecvBuffer[0], sizeof(struct Pokemon) * 2); + } + gBattleCommunication[MULTIUSE_STATE]++; + } + break; + case 9: + if (sub_800A520()) + { + SendBlock(bitmask_all_link_players_but_self(), gEnemyParty + 2, sizeof(struct Pokemon) * 2); + gBattleCommunication[MULTIUSE_STATE]++; + } + break; + case 10: + if ((GetBlockReceivedStatus() & 3) == 3) + { + ResetBlockReceivedFlags(); + if (GetMultiplayerId() != 0) + { + memcpy(gEnemyParty + 2, gBlockRecvBuffer[0], sizeof(struct Pokemon) * 2); + } + gBattleCommunication[MULTIUSE_STATE]++; + } + break; + case 11: + if (sub_800A520()) + { + SendBlock(bitmask_all_link_players_but_self(), gEnemyParty + 4, sizeof(struct Pokemon) * 2); + gBattleCommunication[MULTIUSE_STATE]++; + } + break; + case 12: + if ((GetBlockReceivedStatus() & 3) == 3) + { + ResetBlockReceivedFlags(); + if (GetMultiplayerId() != 0) + memcpy(gEnemyParty + 4, gBlockRecvBuffer[0], sizeof(struct Pokemon) * 2); + shedinja_something(&gPlayerParty[0]); + shedinja_something(&gPlayerParty[1]); + shedinja_something(&gPlayerParty[2]); + shedinja_something(&gPlayerParty[3]); + shedinja_something(&gPlayerParty[4]); + shedinja_something(&gPlayerParty[5]); + shedinja_something(&gEnemyParty[0]); + shedinja_something(&gEnemyParty[1]); + shedinja_something(&gEnemyParty[2]); + shedinja_something(&gEnemyParty[3]); + shedinja_something(&gEnemyParty[4]); + shedinja_something(&gEnemyParty[5]); + gBattleCommunication[MULTIUSE_STATE]++; + } + break; + case 13: + sub_8032768(); + sub_8184E58(); + gBattleCommunication[SPRITES_INIT_STATE1] = 0; + gBattleCommunication[SPRITES_INIT_STATE2] = 0; + if (gBattleTypeFlags & BATTLE_TYPE_LINK) + { + gBattleCommunication[MULTIUSE_STATE] = 14; + } + else + { + gBattleCommunication[MULTIUSE_STATE] = 16; + } + break; + case 14: + if (sub_800A520()) + { + SendBlock(bitmask_all_link_players_but_self(), &gRecordedBattleRngSeed, sizeof(gRecordedBattleRngSeed)); + gBattleCommunication[MULTIUSE_STATE]++; + } + break; + case 15: + if ((GetBlockReceivedStatus() & 3) == 3) + { + ResetBlockReceivedFlags(); + if (!(gBattleTypeFlags & BATTLE_TYPE_WILD)) + memcpy(&gRecordedBattleRngSeed, gBlockRecvBuffer[enemyMultiplayerId], sizeof(gRecordedBattleRngSeed)); + gBattleCommunication[MULTIUSE_STATE]++; + } + break; + case 16: + if (BattleInitAllSprites(&gBattleCommunication[SPRITES_INIT_STATE1], &gBattleCommunication[SPRITES_INIT_STATE2])) + { + sub_8166188(); + gPreBattleCallback1 = gMain.callback1; + gMain.callback1 = BattleMainCB1; + SetMainCallback2(BattleMainCB2); + if (gBattleTypeFlags & BATTLE_TYPE_LINK) + { + gBattleTypeFlags |= BATTLE_TYPE_20; + } + } + break; + } +} + +static void sub_80379F8(u8 arrayIdPlus) +{ + s32 i; + + for (i = 0; i < 3; i++) + { + gUnknown_02022FF8[i].species = GetMonData(&gPlayerParty[arrayIdPlus + i], MON_DATA_SPECIES); + gUnknown_02022FF8[i].heldItem = GetMonData(&gPlayerParty[arrayIdPlus + i], MON_DATA_HELD_ITEM); + GetMonData(&gPlayerParty[arrayIdPlus + i], MON_DATA_NICKNAME, gUnknown_02022FF8[i].nickname); + gUnknown_02022FF8[i].level = GetMonData(&gPlayerParty[arrayIdPlus + i], MON_DATA_LEVEL); + gUnknown_02022FF8[i].hp = GetMonData(&gPlayerParty[arrayIdPlus + i], MON_DATA_HP); + gUnknown_02022FF8[i].maxhp = GetMonData(&gPlayerParty[arrayIdPlus + i], MON_DATA_MAX_HP); + gUnknown_02022FF8[i].status = GetMonData(&gPlayerParty[arrayIdPlus + i], MON_DATA_STATUS); + gUnknown_02022FF8[i].personality = GetMonData(&gPlayerParty[arrayIdPlus + i], MON_DATA_PERSONALITY); + gUnknown_02022FF8[i].gender = GetMonGender(&gPlayerParty[arrayIdPlus + i]); + StripExtCtrlCodes(gUnknown_02022FF8[i].nickname); + if (GetMonData(&gPlayerParty[arrayIdPlus + i], MON_DATA_LANGUAGE) != LANGUAGE_JAPANESE) + sub_81DB4DC(gUnknown_02022FF8[i].nickname, 0); + } + memcpy(gUnknown_02023058, gUnknown_02022FF8, sizeof(gUnknown_02022FF8)); +} + +static void CB2_PreInitMultiBattle(void) +{ + s32 i; + u8 playerMultiplierId; + s32 numPlayers = 4; + u8 r4 = 0xF; + u32* savedBattleTypeFlags; + void (**savedCallback)(void); + + if (gBattleTypeFlags & BATTLE_TYPE_BATTLE_TOWER) + { + numPlayers = 2; + r4 = 3; + } + + playerMultiplierId = GetMultiplayerId(); + gBattleScripting.multiplayerId = playerMultiplierId; + savedCallback = &gBattleStruct->savedCallback; + savedBattleTypeFlags = &gBattleStruct->savedBattleTypeFlags; + + RunTasks(); + AnimateSprites(); + BuildOamBuffer(); + + switch (gBattleCommunication[MULTIUSE_STATE]) + { + case 0: + if (gReceivedRemoteLinkPlayers != 0 && sub_800A520()) + { + gUnknown_02023058 = Alloc(sizeof(struct UnknownPokemonStruct2) * 3); + sub_80379F8(0); + SendBlock(bitmask_all_link_players_but_self(), gUnknown_02023058, sizeof(struct UnknownPokemonStruct2) * 3); + gBattleCommunication[MULTIUSE_STATE]++; + } + break; + case 1: + if ((GetBlockReceivedStatus() & r4) == r4) + { + ResetBlockReceivedFlags(); + for (i = 0; i < numPlayers; i++) + { + if (i == playerMultiplierId) + continue; + + if (numPlayers == 4) + { + if ((!(gLinkPlayers[i].lp_field_18 & 1) && !(gLinkPlayers[playerMultiplierId].lp_field_18 & 1)) + || (gLinkPlayers[i].lp_field_18 & 1 && gLinkPlayers[playerMultiplierId].lp_field_18 & 1)) + { + memcpy(gUnknown_02022FF8, gBlockRecvBuffer[i], sizeof(struct UnknownPokemonStruct2) * 3); + } + } + else + { + memcpy(gUnknown_02022FF8, gBlockRecvBuffer[i], sizeof(struct UnknownPokemonStruct2) * 3); + } + } + gBattleCommunication[MULTIUSE_STATE]++; + *savedCallback = gMain.savedCallback; + *savedBattleTypeFlags = gBattleTypeFlags; + gMain.savedCallback = CB2_PreInitMultiBattle; + sub_81B9150(); + } + break; + case 2: + if (sub_800A520() && !gPaletteFade.active) + { + gBattleCommunication[MULTIUSE_STATE]++; + if (gLinkVSyncDisabled) + sub_800ADF8(); + else + sub_800AC34(); + } + break; + case 3: + if (gLinkVSyncDisabled) + { + if (sub_8010500()) + { + gBattleTypeFlags = *savedBattleTypeFlags; + gMain.savedCallback = *savedCallback; + SetMainCallback2(CB2_InitBattleInternal); + Free(gUnknown_02023058); + gUnknown_02023058 = NULL; + } + } + else if (gReceivedRemoteLinkPlayers == 0) + { + gBattleTypeFlags = *savedBattleTypeFlags; + gMain.savedCallback = *savedCallback; + SetMainCallback2(CB2_InitBattleInternal); + Free(gUnknown_02023058); + gUnknown_02023058 = NULL; + } + break; + } +} + +static void CB2_PreInitIngamePlayerPartnerBattle(void) +{ + u32* savedBattleTypeFlags; + void (**savedCallback)(void); + + savedCallback = &gBattleStruct->savedCallback; + savedBattleTypeFlags = &gBattleStruct->savedBattleTypeFlags; + + RunTasks(); + AnimateSprites(); + BuildOamBuffer(); + + switch (gBattleCommunication[MULTIUSE_STATE]) + { + case 0: + gUnknown_02023058 = Alloc(sizeof(struct UnknownPokemonStruct2) * 3); + sub_80379F8(3); + gBattleCommunication[MULTIUSE_STATE]++; + *savedCallback = gMain.savedCallback; + *savedBattleTypeFlags = gBattleTypeFlags; + gMain.savedCallback = CB2_PreInitIngamePlayerPartnerBattle; + sub_81B9150(); + break; + case 1: + if (!gPaletteFade.active) + { + gBattleCommunication[MULTIUSE_STATE] = 2; + gBattleTypeFlags = *savedBattleTypeFlags; + gMain.savedCallback = *savedCallback; + SetMainCallback2(CB2_InitBattleInternal); + Free(gUnknown_02023058); + gUnknown_02023058 = NULL; + } + break; + } +} + +static void CB2_HandleStartMultiBattle(void) +{ + u8 playerMultiplayerId; + s32 id; + u8 var; + + playerMultiplayerId = GetMultiplayerId(); + gBattleScripting.multiplayerId = playerMultiplayerId; + + RunTasks(); + AnimateSprites(); + BuildOamBuffer(); + + switch (gBattleCommunication[MULTIUSE_STATE]) + { + case 0: + if (!IsDma3ManagerBusyWithBgCopy()) + { + ShowBg(0); + ShowBg(1); + ShowBg(2); + ShowBg(3); + sub_805EF14(); + gBattleCommunication[MULTIUSE_STATE] = 1; + } + if (gLinkVSyncDisabled) + sub_800E0E8(); + break; + case 1: + if (gBattleTypeFlags & BATTLE_TYPE_LINK) + { + if (gReceivedRemoteLinkPlayers != 0) + { + if (sub_800A520()) + { + *(&gBattleStruct->field_180) = 0; + *(&gBattleStruct->field_181) = 3; + sub_8036A5C(); + SetPlayerBerryDataInBattleStruct(); + + SendBlock(bitmask_all_link_players_but_self(), &gBattleStruct->field_180, 32); + gBattleCommunication[MULTIUSE_STATE]++; + } + if (gLinkVSyncDisabled) + sub_800DFB4(0, 0); + } + } + else + { + if (!(gBattleTypeFlags & BATTLE_TYPE_RECORDED)) + gBattleTypeFlags |= BATTLE_TYPE_WILD; + gBattleCommunication[MULTIUSE_STATE] = 7; + SetAllPlayersBerryData(); + } + break; + case 2: + if ((GetBlockReceivedStatus() & 0xF) == 0xF) + { + ResetBlockReceivedFlags(); + sub_8036EB8(4, playerMultiplayerId); + SetAllPlayersBerryData(); + sub_8068AA4(); + var = CreateTask(task00_0800F6FC, 0); + gTasks[var].data[1] = 0x10E; + gTasks[var].data[2] = 0x5A; + gTasks[var].data[5] = 0; + gTasks[var].data[3] = 0; + gTasks[var].data[4] = 0; + + for (id = 0; id < MAX_LINK_PLAYERS; id++) + { + sub_8185F90(gBlockRecvBuffer[id][1]); + switch (gLinkPlayers[id].lp_field_18) + { + case 0: + gTasks[var].data[3] |= gBlockRecvBuffer[id][1] & 0x3F; + break; + case 1: + gTasks[var].data[4] |= gBlockRecvBuffer[id][1] & 0x3F; + break; + case 2: + gTasks[var].data[3] |= (gBlockRecvBuffer[id][1] & 0x3F) << 6; + break; + case 3: + gTasks[var].data[4] |= (gBlockRecvBuffer[id][1] & 0x3F) << 6; + break; + } + } + ZeroEnemyPartyMons(); + gBattleCommunication[MULTIUSE_STATE]++; + } + else + break; + // fall through + case 3: + if (sub_800A520()) + { + SendBlock(bitmask_all_link_players_but_self(), gPlayerParty, sizeof(struct Pokemon) * 2); + gBattleCommunication[MULTIUSE_STATE]++; + } + break; + case 4: + if ((GetBlockReceivedStatus() & 0xF) == 0xF) + { + ResetBlockReceivedFlags(); + for (id = 0; id < MAX_LINK_PLAYERS; id++) + { + if (id == playerMultiplayerId) + { + switch (gLinkPlayers[id].lp_field_18) + { + case 0: + case 3: + memcpy(gPlayerParty, gBlockRecvBuffer[id], sizeof(struct Pokemon) * 2); + break; + case 1: + case 2: + memcpy(gPlayerParty + 3, gBlockRecvBuffer[id], sizeof(struct Pokemon) * 2); + break; + } + } + else + { + if ((!(gLinkPlayers[id].lp_field_18 & 1) && !(gLinkPlayers[playerMultiplayerId].lp_field_18 & 1)) + || ((gLinkPlayers[id].lp_field_18 & 1) && (gLinkPlayers[playerMultiplayerId].lp_field_18 & 1))) + { + switch (gLinkPlayers[id].lp_field_18) + { + case 0: + case 3: + memcpy(gPlayerParty, gBlockRecvBuffer[id], sizeof(struct Pokemon) * 2); + break; + case 1: + case 2: + memcpy(gPlayerParty + 3, gBlockRecvBuffer[id], sizeof(struct Pokemon) * 2); + break; + } + } + else + { + switch (gLinkPlayers[id].lp_field_18) + { + case 0: + case 3: + memcpy(gEnemyParty, gBlockRecvBuffer[id], sizeof(struct Pokemon) * 2); + break; + case 1: + case 2: + memcpy(gEnemyParty + 3, gBlockRecvBuffer[id], sizeof(struct Pokemon) * 2); + break; + } + } + } + } + gBattleCommunication[MULTIUSE_STATE]++; + } + break; + case 5: + if (sub_800A520()) + { + SendBlock(bitmask_all_link_players_but_self(), gPlayerParty + 2, sizeof(struct Pokemon)); + gBattleCommunication[MULTIUSE_STATE]++; + } + break; + case 6: + if ((GetBlockReceivedStatus() & 0xF) == 0xF) + { + ResetBlockReceivedFlags(); + for (id = 0; id < MAX_LINK_PLAYERS; id++) + { + if (id == playerMultiplayerId) + { + switch (gLinkPlayers[id].lp_field_18) + { + case 0: + case 3: + memcpy(gPlayerParty + 2, gBlockRecvBuffer[id], sizeof(struct Pokemon)); + break; + case 1: + case 2: + memcpy(gPlayerParty + 5, gBlockRecvBuffer[id], sizeof(struct Pokemon)); + break; + } + } + else + { + if ((!(gLinkPlayers[id].lp_field_18 & 1) && !(gLinkPlayers[playerMultiplayerId].lp_field_18 & 1)) + || ((gLinkPlayers[id].lp_field_18 & 1) && (gLinkPlayers[playerMultiplayerId].lp_field_18 & 1))) + { + switch (gLinkPlayers[id].lp_field_18) + { + case 0: + case 3: + memcpy(gPlayerParty + 2, gBlockRecvBuffer[id], sizeof(struct Pokemon)); + break; + case 1: + case 2: + memcpy(gPlayerParty + 5, gBlockRecvBuffer[id], sizeof(struct Pokemon)); + break; + } + } + else + { + switch (gLinkPlayers[id].lp_field_18) + { + case 0: + case 3: + memcpy(gEnemyParty + 2, gBlockRecvBuffer[id], sizeof(struct Pokemon)); + break; + case 1: + case 2: + memcpy(gEnemyParty + 5, gBlockRecvBuffer[id], sizeof(struct Pokemon)); + break; + } + } + } + } + shedinja_something(&gPlayerParty[0]); + shedinja_something(&gPlayerParty[1]); + shedinja_something(&gPlayerParty[2]); + shedinja_something(&gPlayerParty[3]); + shedinja_something(&gPlayerParty[4]); + shedinja_something(&gPlayerParty[5]); + + shedinja_something(&gEnemyParty[0]); + shedinja_something(&gEnemyParty[1]); + shedinja_something(&gEnemyParty[2]); + shedinja_something(&gEnemyParty[3]); + shedinja_something(&gEnemyParty[4]); + shedinja_something(&gEnemyParty[5]); + + gBattleCommunication[MULTIUSE_STATE]++; + } + break; + case 7: + sub_8032768(); + sub_8184E58(); + gBattleCommunication[SPRITES_INIT_STATE1] = 0; + gBattleCommunication[SPRITES_INIT_STATE2] = 0; + if (gBattleTypeFlags & BATTLE_TYPE_LINK) + { + for (id = 0; id < 4 && (gLinkPlayers[id].version & 0xFF) == 3; id++); + + if (id == 4) + gBattleCommunication[MULTIUSE_STATE] = 8; + else + gBattleCommunication[MULTIUSE_STATE] = 10; + } + else + { + gBattleCommunication[MULTIUSE_STATE] = 10; + } + break; + case 8: + if (sub_800A520()) + { + u32* ptr = (u32*)(&gBattleStruct->field_180); + ptr[0] = gBattleTypeFlags; + ptr[1] = gRecordedBattleRngSeed; // UB: overwrites berry data + SendBlock(bitmask_all_link_players_but_self(), ptr, 8); + gBattleCommunication[MULTIUSE_STATE]++; + } + break; + case 9: + if ((GetBlockReceivedStatus() & 0xF) == 0xF) + { + ResetBlockReceivedFlags(); + for (var = 0; var < 4; var++) + { + u32 blockValue = gBlockRecvBuffer[var][0]; + if (blockValue & 4) + { + memcpy(&gRecordedBattleRngSeed, &gBlockRecvBuffer[var][2], sizeof(gRecordedBattleRngSeed)); + break; + } + } + + gBattleCommunication[MULTIUSE_STATE]++; + } + break; + case 10: + if (BattleInitAllSprites(&gBattleCommunication[SPRITES_INIT_STATE1], &gBattleCommunication[SPRITES_INIT_STATE2])) + { + gPreBattleCallback1 = gMain.callback1; + gMain.callback1 = BattleMainCB1; + SetMainCallback2(BattleMainCB2); + if (gBattleTypeFlags & BATTLE_TYPE_LINK) + { + gTrainerBattleOpponent_A = TRAINER_OPPONENT_800; + gBattleTypeFlags |= BATTLE_TYPE_20; + } + } + break; + } +} + diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index e0cb3e941..3b719b8ed 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -146,7 +146,6 @@ extern u8 sav1_map_get_light_level(void); extern u8 sub_813B21C(void); extern u16 get_unknown_box_id(void); extern void c2_berry_program_update_menu(void); -extern void sub_8035AA4(void); // BattleScripts extern const u8 BattleScript_MoveEnd[]; @@ -11218,7 +11217,7 @@ static void atkF2_display_dex_info(void) break; case 3: c2_berry_program_update_menu(); - sub_8035AA4(); + LoadBattleTextboxAndBackground(); gBattle_BG3_X = 0x100; gBattleCommunication[0]++; break; diff --git a/src/egg_hatch.c b/src/egg_hatch.c index 6d14e92f0..c5cee6357 100644 --- a/src/egg_hatch.c +++ b/src/egg_hatch.c @@ -64,7 +64,7 @@ extern void sub_806A068(u16, u8); extern void fade_screen(u8, u8); extern void overworld_free_bg_tilemaps(void); extern void sub_80AF168(void); -extern void init_uns_table_pokemon_copy(void); +extern void AllocateMonSpritesGfx(void); extern void sub_805F094(void); extern void remove_some_task(void); extern void reset_temp_tile_data_buffers(void); @@ -439,7 +439,7 @@ static u8 EggHatchCreateMonSprite(u8 a0, u8 switchID, u8 pokeID, u16* speciesLoc u16 species = GetMonData(mon, MON_DATA_SPECIES); u32 pid = GetMonData(mon, MON_DATA_PERSONALITY); HandleLoadSpecialPokePic_DontHandleDeoxys(&gMonFrontPicTable[species], - gBattleSpritesGfx->sprites[(a0 * 2) + 1], + gMonSpritesGfxPtr->sprites[(a0 * 2) + 1], species, pid); LoadCompressedObjectPalette(sub_806E794(mon)); *speciesLoc = species; @@ -488,7 +488,7 @@ static void CB2_EggHatch_0(void) SetGpuReg(REG_OFFSET_DISPCNT, 0); sEggHatchData = Alloc(sizeof(struct EggHatchData)); - init_uns_table_pokemon_copy(); + AllocateMonSpritesGfx(); sEggHatchData->eggPartyID = gSpecialVar_0x8004; sEggHatchData->eggShardVelocityID = 0; diff --git a/src/pokemon_2.c b/src/pokemon_2.c index c5c36c793..8a16954a7 100644 --- a/src/pokemon_2.c +++ b/src/pokemon_2.c @@ -152,8 +152,8 @@ u8 GetGenderFromSpeciesAndPersonality(u16 species, u32 personality) void sub_806A068(u16 species, u8 bankIdentity) { - if (gBattleSpritesGfx != NULL) - gUnknown_0202499C = gBattleSpritesGfx->templates[bankIdentity]; + if (gMonSpritesGfxPtr != NULL) + gUnknown_0202499C = gMonSpritesGfxPtr->templates[bankIdentity]; else if (gUnknown_020249B4[0]) gUnknown_0202499C = gUnknown_020249B4[0]->templates[bankIdentity]; else if (gUnknown_020249B4[1]) @@ -180,8 +180,8 @@ void sub_806A12C(u16 trainerSpriteId, u8 bankIdentity) } else { - if (gBattleSpritesGfx != NULL) - gUnknown_0202499C = gBattleSpritesGfx->templates[bankIdentity]; + if (gMonSpritesGfxPtr != NULL) + gUnknown_0202499C = gMonSpritesGfxPtr->templates[bankIdentity]; else gUnknown_0202499C = gUnknown_08329D98[bankIdentity]; gUnknown_0202499C.anims = gUnknown_0830536C[trainerSpriteId]; @@ -190,8 +190,8 @@ void sub_806A12C(u16 trainerSpriteId, u8 bankIdentity) void sub_806A1C0(u16 arg0, u8 bankIdentity) { - if (gBattleSpritesGfx != NULL) - gUnknown_0202499C = gBattleSpritesGfx->templates[bankIdentity]; + if (gMonSpritesGfxPtr != NULL) + gUnknown_0202499C = gMonSpritesGfxPtr->templates[bankIdentity]; else gUnknown_0202499C = gUnknown_08329D98[bankIdentity]; gUnknown_0202499C.paletteTag = arg0; diff --git a/src/pokemon_3.c b/src/pokemon_3.c index d44c0cb2f..e4934306c 100644 --- a/src/pokemon_3.c +++ b/src/pokemon_3.c @@ -486,8 +486,8 @@ u16 SpeciesToCryId(u16 species) void sub_806D544(u16 species, u32 personality, u8 *dest) { if (species == SPECIES_SPINDA - && dest != gBattleSpritesGfx->sprites[0] - && dest != gBattleSpritesGfx->sprites[2]) + && dest != gMonSpritesGfxPtr->sprites[0] + && dest != gMonSpritesGfxPtr->sprites[2]) { int i; for (i = 0; i < 4; i++) diff --git a/sym_common.txt b/sym_common.txt index 834f23918..7ba414cab 100644 --- a/sym_common.txt +++ b/sym_common.txt @@ -117,7 +117,7 @@ gUnknown_03003110: @ 3003110 gUnknown_03003120: @ 3003120 .space 0x4 -gUnknown_03003124: @ 3003124 +gReceivedRemoteLinkPlayers: @ 3003124 .space 0xC gUnknown_03003130: @ 3003130 @@ -203,7 +203,7 @@ gUnknown_03005CDE: @ 3005CDE .include "rtc.o" -gUnknown_03005D00: @ 3005D00 +gPreBattleCallback1: @ 3005D00 .space 0x4 gBattleMainFunc: @ 3005D04 diff --git a/sym_ewram.txt b/sym_ewram.txt index e49b94160..ce3b4f250 100644 --- a/sym_ewram.txt +++ b/sym_ewram.txt @@ -31,11 +31,8 @@ gUnknown_020223BD: @ 20223BD gUnknown_020223C0: @ 20223C0 .space 0x4 -gUnknown_020223C4: @ 20223C4 - .space 0x4 - -gUnknown_020223C8: @ 20223C8 - .space 0x4FC +gBlockRecvBuffer: @ 20223C4 + .space 0x500 gUnknown_020228C4: @ 20228C4 gBlockSendBuffer .space 0x100 @@ -205,10 +202,10 @@ gUnknown_02022D10: @ 2022D10 gUnknown_02022E10: @ 2022E10 .space 0x4 -gUnknown_02022E14: @ 2022E14 +gBattle_BG0_X: @ 2022E14 .space 0x2 -gUnknown_02022E16: @ 2022E16 +gBattle_BG0_Y: @ 2022E16 .space 0x2 gBattle_BG1_X: @ 2022E18 @@ -226,19 +223,19 @@ gBattle_BG2_Y: @ 2022E1E gBattle_BG3_X: @ 2022E20 .space 0x2 -gUnknown_02022E22: @ 2022E22 +gBattle_BG3_Y: @ 2022E22 .space 0x2 -gUnknown_02022E24: @ 2022E24 +gBattle_WIN0H: @ 2022E24 .space 0x2 -gUnknown_02022E26: @ 2022E26 +gBattle_WIN0V: @ 2022E26 .space 0x2 -gUnknown_02022E28: @ 2022E28 +gBattle_WIN1H: @ 2022E28 .space 0x2 -gUnknown_02022E2A: @ 2022E2A +gBattle_WIN1V: @ 2022E2A .space 0x2 gDisplayedStringBattle: @ 2022E2C @@ -526,7 +523,7 @@ gUnknown_020244CC: @ 20244CC gUnknown_020244D0: @ 20244D0 .space 0x4 -gBattleSpritesGfx: @ 20244D4 +gMonSpritesGfxPtr: @ 20244D4 .space 0x4 gUnknown_020244D8: @ 20244D8 @@ -1671,7 +1668,7 @@ gUnknown_0203BD26: @ 203BD26 gUnknown_0203BD28: @ 203BD28 .space 0x4 -gUnknown_0203BD2C: @ 203BD2C +gRecordedBattleRngSeed: @ 203BD2C .space 0x4 gUnknown_0203BD30: @ 203BD30 From 20ed9ad0ac92cddcbfe66ccc9c2ae3cb1000ed71 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 30 Sep 2017 21:19:29 -0400 Subject: [PATCH 11/42] Decompile asm/tileset.s into src/palette.c --- asm/tileset.s | 1785 --------------------------------------------- data/graphics.s | 14 +- data/palette.s | 18 - data/start_menu.s | 2 +- data/tileset.s | 3 + ld_script.txt | 3 +- src/palette.c | 880 +++++++++++++++++++++- src/scrcmd.c | 15 + sym_bss.txt | 28 +- sym_ewram.txt | 3 - 10 files changed, 891 insertions(+), 1860 deletions(-) delete mode 100644 data/palette.s create mode 100644 src/scrcmd.c diff --git a/asm/tileset.s b/asm/tileset.s index 0605c7621..2428f2984 100644 --- a/asm/tileset.s +++ b/asm/tileset.s @@ -5,1789 +5,4 @@ .text - thumb_func_start sub_80A0954 -@ void sub_80A0954() -sub_80A0954: @ 80A0954 - push {lr} - sub sp, 0x4 - ldr r1, =gUnknown_03000F34 - movs r0, 0 - strb r0, [r1] - movs r0, 0 - str r0, [sp] - ldr r1, =gUnknown_02037624 - ldr r2, =0x0500003c - mov r0, sp - bl CpuSet - add sp, 0x4 - pop {r0} - bx r0 - .pool - thumb_func_end sub_80A0954 - - thumb_func_start sub_80A0980 -sub_80A0980: @ 80A0980 - push {r4-r6,lr} - adds r4, r0, 0 - adds r5, r1, 0 - lsls r2, 16 - lsrs r6, r2, 16 - ldr r3, =gUnknown_03000F34 - ldrb r0, [r3] - cmp r0, 0x13 - bhi _080A09C0 - ldr r2, =gUnknown_02037624 - adds r1, r0, 0 - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 2 - adds r0, r2 - str r4, [r0] - ldrb r1, [r3] - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 2 - adds r1, r2, 0x4 - adds r0, r1 - str r5, [r0] - ldrb r1, [r3] - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 2 - adds r0, r2 - strh r6, [r0, 0x8] - ldrb r0, [r3] - adds r0, 0x1 - strb r0, [r3] -_080A09C0: - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end sub_80A0980 - - thumb_func_start sub_80A09D0 -sub_80A09D0: @ 80A09D0 - push {r4-r6,lr} - movs r3, 0 - ldr r4, =gUnknown_03000F34 - adds r6, r4, 0 - ldrb r0, [r4] - cmp r3, r0 - bge _080A0A02 - ldr r2, =0x040000d4 - ldr r1, =gUnknown_02037624 - movs r5, 0x80 - lsls r5, 24 -_080A09E6: - ldr r0, [r1] - str r0, [r2] - ldr r0, [r1, 0x4] - str r0, [r2, 0x4] - ldrh r0, [r1, 0x8] - lsrs r0, 1 - orrs r0, r5 - str r0, [r2, 0x8] - ldr r0, [r2, 0x8] - adds r1, 0xC - adds r3, 0x1 - ldrb r0, [r4] - cmp r3, r0 - blt _080A09E6 -_080A0A02: - movs r0, 0 - strb r0, [r6] - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end sub_80A09D0 - - thumb_func_start cur_mapheader_run_tileset_funcs_after_some_cpuset -cur_mapheader_run_tileset_funcs_after_some_cpuset: @ 80A0A18 - push {lr} - bl sub_80A0954 - bl cur_mapheader_run_tileset1_func - bl cur_mapheader_run_tileset2_func - pop {r0} - bx r0 - thumb_func_end cur_mapheader_run_tileset_funcs_after_some_cpuset - - thumb_func_start sub_80A0A2C -sub_80A0A2C: @ 80A0A2C - push {lr} - bl cur_mapheader_run_tileset2_func - pop {r0} - bx r0 - thumb_func_end sub_80A0A2C - - thumb_func_start sub_80A0A38 -sub_80A0A38: @ 80A0A38 - push {r4,lr} - bl sub_80A0954 - ldr r2, =gUnknown_03000F36 - ldrh r0, [r2] - adds r0, 0x1 - strh r0, [r2] - ldr r1, =gUnknown_03000F38 - lsls r0, 16 - lsrs r0, 16 - ldrh r1, [r1] - cmp r0, r1 - bcc _080A0A56 - movs r0, 0 - strh r0, [r2] -_080A0A56: - ldr r4, =gUnknown_03000F3A - ldrh r0, [r4] - adds r0, 0x1 - strh r0, [r4] - ldr r1, =gUnknown_03000F3C - lsls r0, 16 - lsrs r0, 16 - ldrh r1, [r1] - cmp r0, r1 - bcc _080A0A6E - movs r0, 0 - strh r0, [r4] -_080A0A6E: - ldr r0, =gUnknown_03000F40 - ldr r1, [r0] - cmp r1, 0 - beq _080A0A7C - ldrh r0, [r2] - bl _call_via_r1 -_080A0A7C: - ldr r0, =gUnknown_03000F44 - ldr r1, [r0] - cmp r1, 0 - beq _080A0A8A - ldrh r0, [r4] - bl _call_via_r1 -_080A0A8A: - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end sub_80A0A38 - - thumb_func_start cur_mapheader_run_tileset1_func -cur_mapheader_run_tileset1_func: @ 80A0AA8 - push {lr} - ldr r0, =gUnknown_03000F36 - movs r1, 0 - strh r1, [r0] - ldr r0, =gUnknown_03000F38 - strh r1, [r0] - ldr r1, =gUnknown_03000F40 - movs r0, 0 - str r0, [r1] - ldr r0, =gMapHeader - ldr r0, [r0] - ldr r0, [r0, 0x10] - cmp r0, 0 - beq _080A0ACE - ldr r0, [r0, 0x14] - cmp r0, 0 - beq _080A0ACE - bl _call_via_r0 -_080A0ACE: - pop {r0} - bx r0 - .pool - thumb_func_end cur_mapheader_run_tileset1_func - - thumb_func_start cur_mapheader_run_tileset2_func -cur_mapheader_run_tileset2_func: @ 80A0AE4 - push {lr} - ldr r0, =gUnknown_03000F3A - movs r1, 0 - strh r1, [r0] - ldr r0, =gUnknown_03000F3C - strh r1, [r0] - ldr r1, =gUnknown_03000F44 - movs r0, 0 - str r0, [r1] - ldr r0, =gMapHeader - ldr r0, [r0] - ldr r0, [r0, 0x14] - cmp r0, 0 - beq _080A0B0A - ldr r0, [r0, 0x14] - cmp r0, 0 - beq _080A0B0A - bl _call_via_r0 -_080A0B0A: - pop {r0} - bx r0 - .pool - thumb_func_end cur_mapheader_run_tileset2_func - - thumb_func_start TilesetCb_General -TilesetCb_General: @ 80A0B20 - ldr r1, =gUnknown_03000F36 - movs r0, 0 - strh r0, [r1] - ldr r1, =gUnknown_03000F38 - movs r2, 0x80 - lsls r2, 1 - adds r0, r2, 0 - strh r0, [r1] - ldr r1, =gUnknown_03000F40 - ldr r0, =sub_80A0B70 - str r0, [r1] - bx lr - .pool - thumb_func_end TilesetCb_General - - thumb_func_start TilesetCb_InsideBuilding -TilesetCb_InsideBuilding: @ 80A0B48 - ldr r1, =gUnknown_03000F36 - movs r0, 0 - strh r0, [r1] - ldr r1, =gUnknown_03000F38 - movs r2, 0x80 - lsls r2, 1 - adds r0, r2, 0 - strh r0, [r1] - ldr r1, =gUnknown_03000F40 - ldr r0, =sub_80A0BB4 - str r0, [r1] - bx lr - .pool - thumb_func_end TilesetCb_InsideBuilding - - thumb_func_start sub_80A0B70 -sub_80A0B70: @ 80A0B70 - push {r4,r5,lr} - lsls r5, r0, 16 - movs r0, 0xF0 - lsls r0, 12 - ands r0, r5 - lsrs r4, r0, 16 - cmp r4, 0 - bne _080A0B86 - lsrs r0, r5, 20 - bl sub_80A0BCC -_080A0B86: - cmp r4, 0x1 - bne _080A0B90 - lsrs r0, r5, 20 - bl sub_80A0BF4 -_080A0B90: - cmp r4, 0x2 - bne _080A0B9A - lsrs r0, r5, 20 - bl sub_80A0C1C -_080A0B9A: - cmp r4, 0x3 - bne _080A0BA4 - lsrs r0, r5, 20 - bl sub_80A0C44 -_080A0BA4: - cmp r4, 0x4 - bne _080A0BAE - lsrs r0, r5, 20 - bl sub_80A12AC -_080A0BAE: - pop {r4,r5} - pop {r0} - bx r0 - thumb_func_end sub_80A0B70 - - thumb_func_start sub_80A0BB4 -sub_80A0BB4: @ 80A0BB4 - push {lr} - lsls r1, r0, 16 - movs r0, 0xE0 - lsls r0, 11 - ands r0, r1 - cmp r0, 0 - bne _080A0BC8 - lsrs r0, r1, 19 - bl sub_80A1688 -_080A0BC8: - pop {r0} - bx r0 - thumb_func_end sub_80A0BB4 - - thumb_func_start sub_80A0BCC -sub_80A0BCC: @ 80A0BCC - push {lr} - lsls r0, 16 - movs r1, 0xC0 - lsls r1, 10 - ands r1, r0 - ldr r0, =gUnknown_08510764 - lsrs r1, 14 - adds r1, r0 - ldr r0, [r1] - ldr r1, =0x06003f80 - movs r2, 0x80 - bl sub_80A0980 - pop {r0} - bx r0 - .pool - thumb_func_end sub_80A0BCC - - thumb_func_start sub_80A0BF4 -sub_80A0BF4: @ 80A0BF4 - push {lr} - lsls r0, 16 - lsrs r0, 16 - movs r1, 0x7 - ands r0, r1 - ldr r1, =gUnknown_08512574 - lsls r0, 2 - adds r0, r1 - ldr r0, [r0] - ldr r1, =0x06003600 - movs r2, 0xF0 - lsls r2, 2 - bl sub_80A0980 - pop {r0} - bx r0 - .pool - thumb_func_end sub_80A0BF4 - - thumb_func_start sub_80A0C1C -sub_80A0C1C: @ 80A0C1C - push {lr} - lsls r0, 16 - movs r1, 0xE0 - lsls r1, 11 - ands r1, r0 - ldr r0, =gUnknown_08512E54 - lsrs r1, 14 - adds r1, r0 - ldr r0, [r1] - ldr r1, =0x06003a00 - movs r2, 0xA0 - lsls r2, 1 - bl sub_80A0980 - pop {r0} - bx r0 - .pool - thumb_func_end sub_80A0C1C - - thumb_func_start sub_80A0C44 -sub_80A0C44: @ 80A0C44 - push {lr} - lsls r0, 16 - movs r1, 0xC0 - lsls r1, 10 - ands r1, r0 - ldr r0, =gUnknown_08513174 - lsrs r1, 14 - adds r1, r0 - ldr r0, [r1] - ldr r1, =0x06003e00 - movs r2, 0xC0 - bl sub_80A0980 - pop {r0} - bx r0 - .pool - thumb_func_end sub_80A0C44 - - thumb_func_start TilesetCb_Petalburg -TilesetCb_Petalburg: @ 80A0C6C - ldr r1, =gUnknown_03000F3A - movs r0, 0 - strh r0, [r1] - ldr r1, =gUnknown_03000F3C - ldr r0, =gUnknown_03000F38 - ldrh r0, [r0] - strh r0, [r1] - ldr r1, =gUnknown_03000F44 - movs r0, 0 - str r0, [r1] - bx lr - .pool - thumb_func_end TilesetCb_Petalburg - - thumb_func_start TilesetCb_Rustboro -TilesetCb_Rustboro: @ 80A0C94 - ldr r1, =gUnknown_03000F3A - movs r0, 0 - strh r0, [r1] - ldr r1, =gUnknown_03000F3C - ldr r0, =gUnknown_03000F38 - ldrh r0, [r0] - strh r0, [r1] - ldr r1, =gUnknown_03000F44 - ldr r0, =sub_80A103C - str r0, [r1] - bx lr - .pool - thumb_func_end TilesetCb_Rustboro - - thumb_func_start TilesetCb_Dewford -TilesetCb_Dewford: @ 80A0CC0 - ldr r1, =gUnknown_03000F3A - movs r0, 0 - strh r0, [r1] - ldr r1, =gUnknown_03000F3C - ldr r0, =gUnknown_03000F38 - ldrh r0, [r0] - strh r0, [r1] - ldr r1, =gUnknown_03000F44 - ldr r0, =sub_80A10B8 - str r0, [r1] - bx lr - .pool - thumb_func_end TilesetCb_Dewford - - thumb_func_start TilesetCb_Slateport -TilesetCb_Slateport: @ 80A0CEC - ldr r1, =gUnknown_03000F3A - movs r0, 0 - strh r0, [r1] - ldr r1, =gUnknown_03000F3C - ldr r0, =gUnknown_03000F38 - ldrh r0, [r0] - strh r0, [r1] - ldr r1, =gUnknown_03000F44 - ldr r0, =sub_80A10D0 - str r0, [r1] - bx lr - .pool - thumb_func_end TilesetCb_Slateport - - thumb_func_start TilesetCb_Mauville -TilesetCb_Mauville: @ 80A0D18 - ldr r1, =gUnknown_03000F3A - ldr r0, =gUnknown_03000F36 - ldrh r0, [r0] - strh r0, [r1] - ldr r1, =gUnknown_03000F3C - ldr r0, =gUnknown_03000F38 - ldrh r0, [r0] - strh r0, [r1] - ldr r1, =gUnknown_03000F44 - ldr r0, =sub_80A10E8 - str r0, [r1] - bx lr - .pool - thumb_func_end TilesetCb_Mauville - - thumb_func_start TilesetCb_Lavaridge -TilesetCb_Lavaridge: @ 80A0D48 - ldr r1, =gUnknown_03000F3A - movs r0, 0 - strh r0, [r1] - ldr r1, =gUnknown_03000F3C - ldr r0, =gUnknown_03000F38 - ldrh r0, [r0] - strh r0, [r1] - ldr r1, =gUnknown_03000F44 - ldr r0, =sub_80A115C - str r0, [r1] - bx lr - .pool - thumb_func_end TilesetCb_Lavaridge - - thumb_func_start TilesetCb_Fallarbor -TilesetCb_Fallarbor: @ 80A0D74 - ldr r1, =gUnknown_03000F3A - movs r0, 0 - strh r0, [r1] - ldr r1, =gUnknown_03000F3C - ldr r0, =gUnknown_03000F38 - ldrh r0, [r0] - strh r0, [r1] - ldr r1, =gUnknown_03000F44 - movs r0, 0 - str r0, [r1] - bx lr - .pool - thumb_func_end TilesetCb_Fallarbor - - thumb_func_start TilesetCb_Fortree -TilesetCb_Fortree: @ 80A0D9C - ldr r1, =gUnknown_03000F3A - movs r0, 0 - strh r0, [r1] - ldr r1, =gUnknown_03000F3C - ldr r0, =gUnknown_03000F38 - ldrh r0, [r0] - strh r0, [r1] - ldr r1, =gUnknown_03000F44 - movs r0, 0 - str r0, [r1] - bx lr - .pool - thumb_func_end TilesetCb_Fortree - - thumb_func_start TilesetCb_Lilycove -TilesetCb_Lilycove: @ 80A0DC4 - ldr r1, =gUnknown_03000F3A - movs r0, 0 - strh r0, [r1] - ldr r1, =gUnknown_03000F3C - ldr r0, =gUnknown_03000F38 - ldrh r0, [r0] - strh r0, [r1] - ldr r1, =gUnknown_03000F44 - movs r0, 0 - str r0, [r1] - bx lr - .pool - thumb_func_end TilesetCb_Lilycove - - thumb_func_start TilesetCb_Mossdeep -TilesetCb_Mossdeep: @ 80A0DEC - ldr r1, =gUnknown_03000F3A - movs r0, 0 - strh r0, [r1] - ldr r1, =gUnknown_03000F3C - ldr r0, =gUnknown_03000F38 - ldrh r0, [r0] - strh r0, [r1] - ldr r1, =gUnknown_03000F44 - movs r0, 0 - str r0, [r1] - bx lr - .pool - thumb_func_end TilesetCb_Mossdeep - - thumb_func_start TilesetCb_EverGrande -TilesetCb_EverGrande: @ 80A0E14 - ldr r1, =gUnknown_03000F3A - movs r0, 0 - strh r0, [r1] - ldr r1, =gUnknown_03000F3C - ldr r0, =gUnknown_03000F38 - ldrh r0, [r0] - strh r0, [r1] - ldr r1, =gUnknown_03000F44 - ldr r0, =sub_80A1188 - str r0, [r1] - bx lr - .pool - thumb_func_end TilesetCb_EverGrande - - thumb_func_start TilesetCb_Pacifidlog -TilesetCb_Pacifidlog: @ 80A0E40 - ldr r1, =gUnknown_03000F3A - ldr r0, =gUnknown_03000F36 - ldrh r0, [r0] - strh r0, [r1] - ldr r1, =gUnknown_03000F3C - ldr r0, =gUnknown_03000F38 - ldrh r0, [r0] - strh r0, [r1] - ldr r1, =gUnknown_03000F44 - ldr r0, =sub_80A11FC - str r0, [r1] - bx lr - .pool - thumb_func_end TilesetCb_Pacifidlog - - thumb_func_start TilesetCb_Sootopolis -TilesetCb_Sootopolis: @ 80A0E70 - ldr r1, =gUnknown_03000F3A - movs r0, 0 - strh r0, [r1] - ldr r1, =gUnknown_03000F3C - ldr r0, =gUnknown_03000F38 - ldrh r0, [r0] - strh r0, [r1] - ldr r1, =gUnknown_03000F44 - ldr r0, =sub_80A122C - str r0, [r1] - bx lr - .pool - thumb_func_end TilesetCb_Sootopolis - - thumb_func_start TilesetCb_BattleFrontierOutsideWest -TilesetCb_BattleFrontierOutsideWest: @ 80A0E9C - ldr r1, =gUnknown_03000F3A - movs r0, 0 - strh r0, [r1] - ldr r1, =gUnknown_03000F3C - ldr r0, =gUnknown_03000F38 - ldrh r0, [r0] - strh r0, [r1] - ldr r1, =gUnknown_03000F44 - ldr r0, =sub_80A127C - str r0, [r1] - bx lr - .pool - thumb_func_end TilesetCb_BattleFrontierOutsideWest - - thumb_func_start TilesetCb_BattleFrontierOutsideEast -TilesetCb_BattleFrontierOutsideEast: @ 80A0EC8 - ldr r1, =gUnknown_03000F3A - movs r0, 0 - strh r0, [r1] - ldr r1, =gUnknown_03000F3C - ldr r0, =gUnknown_03000F38 - ldrh r0, [r0] - strh r0, [r1] - ldr r1, =gUnknown_03000F44 - ldr r0, =sub_80A1294 - str r0, [r1] - bx lr - .pool - thumb_func_end TilesetCb_BattleFrontierOutsideEast - - thumb_func_start TilesetCb_Underwater -TilesetCb_Underwater: @ 80A0EF4 - ldr r1, =gUnknown_03000F3A - movs r0, 0 - strh r0, [r1] - ldr r1, =gUnknown_03000F3C - movs r0, 0x80 - strh r0, [r1] - ldr r1, =gUnknown_03000F44 - ldr r0, =sub_80A1244 - str r0, [r1] - bx lr - .pool - thumb_func_end TilesetCb_Underwater - - thumb_func_start TilesetCb_SootopolisGym -TilesetCb_SootopolisGym: @ 80A0F18 - ldr r1, =gUnknown_03000F3A - movs r0, 0 - strh r0, [r1] - ldr r1, =gUnknown_03000F3C - movs r0, 0xF0 - strh r0, [r1] - ldr r1, =gUnknown_03000F44 - ldr r0, =sub_80A15D8 - str r0, [r1] - bx lr - .pool - thumb_func_end TilesetCb_SootopolisGym - - thumb_func_start TilesetCb_Cave -TilesetCb_Cave: @ 80A0F3C - ldr r1, =gUnknown_03000F3A - movs r0, 0 - strh r0, [r1] - ldr r1, =gUnknown_03000F3C - ldr r0, =gUnknown_03000F38 - ldrh r0, [r0] - strh r0, [r1] - ldr r1, =gUnknown_03000F44 - ldr r0, =sub_80A1260 - str r0, [r1] - bx lr - .pool - thumb_func_end TilesetCb_Cave - - thumb_func_start TilesetCb_EliteFour -TilesetCb_EliteFour: @ 80A0F68 - ldr r1, =gUnknown_03000F3A - movs r0, 0 - strh r0, [r1] - ldr r1, =gUnknown_03000F3C - movs r0, 0x80 - strh r0, [r1] - ldr r1, =gUnknown_03000F44 - ldr r0, =sub_80A15F0 - str r0, [r1] - bx lr - .pool - thumb_func_end TilesetCb_EliteFour - - thumb_func_start TilesetCb_MauvilleGym -TilesetCb_MauvilleGym: @ 80A0F8C - ldr r1, =gUnknown_03000F3A - movs r0, 0 - strh r0, [r1] - ldr r1, =gUnknown_03000F3C - ldr r0, =gUnknown_03000F38 - ldrh r0, [r0] - strh r0, [r1] - ldr r1, =gUnknown_03000F44 - ldr r0, =sub_80A15C0 - str r0, [r1] - bx lr - .pool - thumb_func_end TilesetCb_MauvilleGym - - thumb_func_start TilesetCb_BikeShop -TilesetCb_BikeShop: @ 80A0FB8 - ldr r1, =gUnknown_03000F3A - movs r0, 0 - strh r0, [r1] - ldr r1, =gUnknown_03000F3C - ldr r0, =gUnknown_03000F38 - ldrh r0, [r0] - strh r0, [r1] - ldr r1, =gUnknown_03000F44 - ldr r0, =sub_80A161C - str r0, [r1] - bx lr - .pool - thumb_func_end TilesetCb_BikeShop - - thumb_func_start TilesetCb_BattlePyramid -TilesetCb_BattlePyramid: @ 80A0FE4 - ldr r1, =gUnknown_03000F3A - movs r0, 0 - strh r0, [r1] - ldr r1, =gUnknown_03000F3C - ldr r0, =gUnknown_03000F38 - ldrh r0, [r0] - strh r0, [r1] - ldr r1, =gUnknown_03000F44 - ldr r0, =sub_80A1634 - str r0, [r1] - bx lr - .pool - thumb_func_end TilesetCb_BattlePyramid - - thumb_func_start TilesetCb_BattleDome -TilesetCb_BattleDome: @ 80A1010 - ldr r1, =gUnknown_03000F3A - movs r0, 0 - strh r0, [r1] - ldr r1, =gUnknown_03000F3C - ldr r0, =gUnknown_03000F38 - ldrh r0, [r0] - strh r0, [r1] - ldr r1, =gUnknown_03000F44 - ldr r0, =sub_80A1658 - str r0, [r1] - bx lr - .pool - thumb_func_end TilesetCb_BattleDome - - thumb_func_start sub_80A103C -sub_80A103C: @ 80A103C - push {r4-r6,lr} - lsls r5, r0, 16 - movs r0, 0xE0 - lsls r0, 11 - ands r0, r5 - lsrs r6, r0, 16 - cmp r6, 0 - bne _080A105C - lsrs r4, r5, 19 - adds r0, r4, 0 - movs r1, 0 - bl sub_80A1434 - adds r0, r4, 0 - bl sub_80A1470 -_080A105C: - cmp r6, 0x1 - bne _080A1068 - lsrs r0, r5, 19 - movs r1, 0x1 - bl sub_80A1434 -_080A1068: - cmp r6, 0x2 - bne _080A1074 - lsrs r0, r5, 19 - movs r1, 0x2 - bl sub_80A1434 -_080A1074: - cmp r6, 0x3 - bne _080A1080 - lsrs r0, r5, 19 - movs r1, 0x3 - bl sub_80A1434 -_080A1080: - cmp r6, 0x4 - bne _080A108C - lsrs r0, r5, 19 - movs r1, 0x4 - bl sub_80A1434 -_080A108C: - cmp r6, 0x5 - bne _080A1098 - lsrs r0, r5, 19 - movs r1, 0x5 - bl sub_80A1434 -_080A1098: - cmp r6, 0x6 - bne _080A10A4 - lsrs r0, r5, 19 - movs r1, 0x6 - bl sub_80A1434 -_080A10A4: - cmp r6, 0x7 - bne _080A10B0 - lsrs r0, r5, 19 - movs r1, 0x7 - bl sub_80A1434 -_080A10B0: - pop {r4-r6} - pop {r0} - bx r0 - thumb_func_end sub_80A103C - - thumb_func_start sub_80A10B8 -sub_80A10B8: @ 80A10B8 - push {lr} - lsls r1, r0, 16 - movs r0, 0xE0 - lsls r0, 11 - ands r0, r1 - cmp r0, 0 - bne _080A10CC - lsrs r0, r1, 19 - bl sub_80A1520 -_080A10CC: - pop {r0} - bx r0 - thumb_func_end sub_80A10B8 - - thumb_func_start sub_80A10D0 -sub_80A10D0: @ 80A10D0 - push {lr} - lsls r1, r0, 16 - movs r0, 0xF0 - lsls r0, 12 - ands r0, r1 - cmp r0, 0 - bne _080A10E4 - lsrs r0, r1, 20 - bl sub_80A1598 -_080A10E4: - pop {r0} - bx r0 - thumb_func_end sub_80A10D0 - - thumb_func_start sub_80A10E8 -sub_80A10E8: @ 80A10E8 - push {r4,r5,lr} - lsls r4, r0, 16 - movs r0, 0xE0 - lsls r0, 11 - ands r0, r4 - lsrs r5, r0, 16 - cmp r5, 0 - bne _080A1100 - lsrs r0, r4, 19 - movs r1, 0 - bl sub_80A1394 -_080A1100: - cmp r5, 0x1 - bne _080A110C - lsrs r0, r4, 19 - movs r1, 0x1 - bl sub_80A1394 -_080A110C: - cmp r5, 0x2 - bne _080A1118 - lsrs r0, r4, 19 - movs r1, 0x2 - bl sub_80A1394 -_080A1118: - cmp r5, 0x3 - bne _080A1124 - lsrs r0, r4, 19 - movs r1, 0x3 - bl sub_80A1394 -_080A1124: - cmp r5, 0x4 - bne _080A1130 - lsrs r0, r4, 19 - movs r1, 0x4 - bl sub_80A1394 -_080A1130: - cmp r5, 0x5 - bne _080A113C - lsrs r0, r4, 19 - movs r1, 0x5 - bl sub_80A1394 -_080A113C: - cmp r5, 0x6 - bne _080A1148 - lsrs r0, r4, 19 - movs r1, 0x6 - bl sub_80A1394 -_080A1148: - cmp r5, 0x7 - bne _080A1154 - lsrs r0, r4, 19 - movs r1, 0x7 - bl sub_80A1394 -_080A1154: - pop {r4,r5} - pop {r0} - bx r0 - thumb_func_end sub_80A10E8 - - thumb_func_start sub_80A115C -sub_80A115C: @ 80A115C - push {r4,r5,lr} - lsls r4, r0, 16 - movs r0, 0xF0 - lsls r0, 12 - ands r0, r4 - lsrs r5, r0, 16 - cmp r5, 0 - bne _080A1176 - lsrs r0, r4, 20 - lsls r0, 24 - lsrs r0, 24 - bl sub_80A12D4 -_080A1176: - cmp r5, 0x1 - bne _080A1180 - lsrs r0, r4, 20 - bl sub_80A1498 -_080A1180: - pop {r4,r5} - pop {r0} - bx r0 - thumb_func_end sub_80A115C - - thumb_func_start sub_80A1188 -sub_80A1188: @ 80A1188 - push {r4,r5,lr} - lsls r4, r0, 16 - movs r0, 0xE0 - lsls r0, 11 - ands r0, r4 - lsrs r5, r0, 16 - cmp r5, 0 - bne _080A11A0 - lsrs r0, r4, 19 - movs r1, 0 - bl sub_80A14C0 -_080A11A0: - cmp r5, 0x1 - bne _080A11AC - lsrs r0, r4, 19 - movs r1, 0x1 - bl sub_80A14C0 -_080A11AC: - cmp r5, 0x2 - bne _080A11B8 - lsrs r0, r4, 19 - movs r1, 0x2 - bl sub_80A14C0 -_080A11B8: - cmp r5, 0x3 - bne _080A11C4 - lsrs r0, r4, 19 - movs r1, 0x3 - bl sub_80A14C0 -_080A11C4: - cmp r5, 0x4 - bne _080A11D0 - lsrs r0, r4, 19 - movs r1, 0x4 - bl sub_80A14C0 -_080A11D0: - cmp r5, 0x5 - bne _080A11DC - lsrs r0, r4, 19 - movs r1, 0x5 - bl sub_80A14C0 -_080A11DC: - cmp r5, 0x6 - bne _080A11E8 - lsrs r0, r4, 19 - movs r1, 0x6 - bl sub_80A14C0 -_080A11E8: - cmp r5, 0x7 - bne _080A11F4 - lsrs r0, r4, 19 - movs r1, 0x7 - bl sub_80A14C0 -_080A11F4: - pop {r4,r5} - pop {r0} - bx r0 - thumb_func_end sub_80A1188 - - thumb_func_start sub_80A11FC -sub_80A11FC: @ 80A11FC - push {r4,r5,lr} - lsls r4, r0, 16 - movs r0, 0xF0 - lsls r0, 12 - ands r0, r4 - lsrs r5, r0, 16 - cmp r5, 0 - bne _080A1216 - lsrs r0, r4, 20 - lsls r0, 24 - lsrs r0, 24 - bl sub_80A131C -_080A1216: - cmp r5, 0x1 - bne _080A1224 - lsrs r0, r4, 20 - lsls r0, 24 - lsrs r0, 24 - bl sub_80A136C -_080A1224: - pop {r4,r5} - pop {r0} - bx r0 - thumb_func_end sub_80A11FC - - thumb_func_start sub_80A122C -sub_80A122C: @ 80A122C - push {lr} - lsls r1, r0, 16 - movs r0, 0xF0 - lsls r0, 12 - ands r0, r1 - cmp r0, 0 - bne _080A1240 - lsrs r0, r1, 20 - bl sub_80A1798 -_080A1240: - pop {r0} - bx r0 - thumb_func_end sub_80A122C - - thumb_func_start sub_80A1244 -sub_80A1244: @ 80A1244 - push {lr} - lsls r1, r0, 16 - movs r0, 0xF0 - lsls r0, 12 - ands r0, r1 - cmp r0, 0 - bne _080A125C - lsrs r0, r1, 20 - lsls r0, 24 - lsrs r0, 24 - bl sub_80A1344 -_080A125C: - pop {r0} - bx r0 - thumb_func_end sub_80A1244 - - thumb_func_start sub_80A1260 -sub_80A1260: @ 80A1260 - push {lr} - lsls r1, r0, 16 - movs r0, 0xF0 - lsls r0, 12 - ands r0, r1 - lsrs r0, 16 - cmp r0, 0x1 - bne _080A1276 - lsrs r0, r1, 20 - bl sub_80A14F8 -_080A1276: - pop {r0} - bx r0 - thumb_func_end sub_80A1260 - - thumb_func_start sub_80A127C -sub_80A127C: @ 80A127C - push {lr} - lsls r1, r0, 16 - movs r0, 0xE0 - lsls r0, 11 - ands r0, r1 - cmp r0, 0 - bne _080A1290 - lsrs r0, r1, 19 - bl sub_80A1548 -_080A1290: - pop {r0} - bx r0 - thumb_func_end sub_80A127C - - thumb_func_start sub_80A1294 -sub_80A1294: @ 80A1294 - push {lr} - lsls r1, r0, 16 - movs r0, 0xE0 - lsls r0, 11 - ands r0, r1 - cmp r0, 0 - bne _080A12A8 - lsrs r0, r1, 19 - bl sub_80A1570 -_080A12A8: - pop {r0} - bx r0 - thumb_func_end sub_80A1294 - - thumb_func_start sub_80A12AC -sub_80A12AC: @ 80A12AC - push {lr} - lsls r0, 16 - movs r1, 0xC0 - lsls r1, 10 - ands r1, r0 - ldr r0, =gUnknown_08513684 - lsrs r1, 14 - adds r1, r0 - ldr r0, [r1] - ldr r1, =0x06003c00 - movs r2, 0xA0 - lsls r2, 1 - bl sub_80A0980 - pop {r0} - bx r0 - .pool - thumb_func_end sub_80A12AC - - thumb_func_start sub_80A12D4 -sub_80A12D4: @ 80A12D4 - push {r4,r5,lr} - lsls r0, 24 - lsrs r4, r0, 24 - movs r0, 0x3 - ands r0, r4 - ldr r5, =gUnknown_08513894 - lsls r0, 2 - adds r0, r5 - ldr r0, [r0] - ldr r1, =0x06006400 - movs r2, 0x80 - bl sub_80A0980 - adds r1, r4, 0x2 - adds r0, r1, 0 - asrs r0, 2 - lsls r0, 2 - subs r0, r1, r0 - lsls r0, 24 - lsrs r0, 22 - adds r0, r5 - ldr r0, [r0] - ldr r1, =0x06006480 - movs r2, 0x80 - bl sub_80A0980 - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end sub_80A12D4 - - thumb_func_start sub_80A131C -sub_80A131C: @ 80A131C - push {lr} - lsls r0, 24 - movs r1, 0xC0 - lsls r1, 18 - ands r1, r0 - ldr r0, =gUnknown_085143E4 - lsrs r1, 22 - adds r1, r0 - ldr r0, [r1] - ldr r1, =0x06007a00 - movs r2, 0xF0 - lsls r2, 2 - bl sub_80A0980 - pop {r0} - bx r0 - .pool - thumb_func_end sub_80A131C - - thumb_func_start sub_80A1344 -sub_80A1344: @ 80A1344 - push {lr} - lsls r0, 24 - movs r1, 0xC0 - lsls r1, 18 - ands r1, r0 - ldr r0, =gUnknown_085145F4 - lsrs r1, 22 - adds r1, r0 - ldr r0, [r1] - ldr r1, =0x06007e00 - movs r2, 0x80 - bl sub_80A0980 - pop {r0} - bx r0 - .pool - thumb_func_end sub_80A1344 - - thumb_func_start sub_80A136C -sub_80A136C: @ 80A136C - push {lr} - lsls r0, 24 - movs r1, 0xE0 - lsls r1, 19 - ands r1, r0 - ldr r0, =gUnknown_08514E04 - lsrs r1, 22 - adds r1, r0 - ldr r0, [r1] - ldr r1, =0x06007e00 - movs r2, 0x80 - lsls r2, 1 - bl sub_80A0980 - pop {r0} - bx r0 - .pool - thumb_func_end sub_80A136C - - thumb_func_start sub_80A1394 -sub_80A1394: @ 80A1394 - push {r4-r6,lr} - lsls r0, 16 - lsrs r5, r0, 16 - lsls r1, 24 - lsrs r6, r1, 24 - subs r0, r5, r6 - lsls r0, 16 - lsrs r5, r0, 16 - cmp r5, 0xB - bhi _080A13F0 - adds r0, r5, 0 - movs r1, 0xC - bl __umodsi3 - adds r4, r0, 0 - lsls r4, 16 - ldr r0, =gUnknown_08515384 - lsrs r4, 14 - adds r0, r4, r0 - ldr r0, [r0] - ldr r1, =gUnknown_08515344 - lsls r5, r6, 2 - adds r1, r5, r1 - ldr r1, [r1] - movs r2, 0x80 - bl sub_80A0980 - ldr r0, =gUnknown_085153B4 - adds r4, r0 - ldr r0, [r4] - ldr r1, =gUnknown_08515364 - adds r5, r1 - ldr r1, [r5] - movs r2, 0x80 - bl sub_80A0980 - b _080A141C - .pool -_080A13F0: - movs r0, 0x3 - ands r5, r0 - ldr r0, =gUnknown_085153E4 - lsls r5, 2 - adds r0, r5, r0 - ldr r0, [r0] - ldr r1, =gUnknown_08515344 - lsls r4, r6, 2 - adds r1, r4, r1 - ldr r1, [r1] - movs r2, 0x80 - bl sub_80A0980 - ldr r0, =gUnknown_085153F4 - adds r5, r0 - ldr r0, [r5] - ldr r1, =gUnknown_08515364 - adds r4, r1 - ldr r1, [r4] - movs r2, 0x80 - bl sub_80A0980 -_080A141C: - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end sub_80A1394 - - thumb_func_start sub_80A1434 -sub_80A1434: @ 80A1434 - push {lr} - lsls r0, 16 - lsrs r0, 16 - lsls r1, 24 - lsrs r3, r1, 24 - subs r0, r3 - lsls r0, 16 - movs r1, 0xE0 - lsls r1, 11 - ands r1, r0 - ldr r0, =gUnknown_08515824 - lsrs r1, 14 - adds r1, r0 - ldr r2, [r1] - cmp r2, 0 - beq _080A1464 - ldr r0, =gUnknown_08515804 - lsls r1, r3, 2 - adds r1, r0 - ldr r1, [r1] - adds r0, r2, 0 - movs r2, 0x80 - bl sub_80A0980 -_080A1464: - pop {r0} - bx r0 - .pool - thumb_func_end sub_80A1434 - - thumb_func_start sub_80A1470 -sub_80A1470: @ 80A1470 - push {lr} - lsls r0, 16 - lsrs r0, 16 - movs r1, 0x1 - ands r0, r1 - ldr r1, =gUnknown_08515964 - lsls r0, 2 - adds r0, r1 - ldr r0, [r0] - ldr r1, =0x06007800 - movs r2, 0x80 - bl sub_80A0980 - pop {r0} - bx r0 - .pool - thumb_func_end sub_80A1470 - - thumb_func_start sub_80A1498 -sub_80A1498: @ 80A1498 - push {lr} - lsls r0, 16 - movs r1, 0xC0 - lsls r1, 10 - ands r1, r0 - ldr r0, =gUnknown_08515D8C - lsrs r1, 14 - adds r1, r0 - ldr r0, [r1] - ldr r1, =0x06005400 - movs r2, 0x80 - bl sub_80A0980 - pop {r0} - bx r0 - .pool - thumb_func_end sub_80A1498 - - thumb_func_start sub_80A14C0 -sub_80A14C0: @ 80A14C0 - push {lr} - lsls r0, 16 - lsrs r0, 16 - lsls r1, 24 - lsrs r1, 24 - subs r0, r1 - lsls r0, 16 - movs r2, 0xE0 - lsls r2, 11 - ands r2, r0 - ldr r0, =gUnknown_085161DC - lsrs r2, 14 - adds r2, r0 - ldr r0, [r2] - ldr r2, =gUnknown_085161BC - lsls r1, 2 - adds r1, r2 - ldr r1, [r1] - movs r2, 0x80 - bl sub_80A0980 - pop {r0} - bx r0 - .pool - thumb_func_end sub_80A14C0 - - thumb_func_start sub_80A14F8 -sub_80A14F8: @ 80A14F8 - push {lr} - lsls r0, 16 - movs r1, 0xC0 - lsls r1, 10 - ands r1, r0 - ldr r0, =gUnknown_08515D8C - lsrs r1, 14 - adds r1, r0 - ldr r0, [r1] - ldr r1, =0x06007400 - movs r2, 0x80 - bl sub_80A0980 - pop {r0} - bx r0 - .pool - thumb_func_end sub_80A14F8 - - thumb_func_start sub_80A1520 -sub_80A1520: @ 80A1520 - push {lr} - lsls r0, 16 - movs r1, 0xC0 - lsls r1, 10 - ands r1, r0 - ldr r0, =gUnknown_085164FC - lsrs r1, 14 - adds r1, r0 - ldr r0, [r1] - ldr r1, =0x06005540 - movs r2, 0xC0 - bl sub_80A0980 - pop {r0} - bx r0 - .pool - thumb_func_end sub_80A1520 - - thumb_func_start sub_80A1548 -sub_80A1548: @ 80A1548 - push {lr} - lsls r0, 16 - movs r1, 0xC0 - lsls r1, 10 - ands r1, r0 - ldr r0, =gUnknown_0851680C - lsrs r1, 14 - adds r1, r0 - ldr r0, [r1] - ldr r1, =0x06005b40 - movs r2, 0xC0 - bl sub_80A0980 - pop {r0} - bx r0 - .pool - thumb_func_end sub_80A1548 - - thumb_func_start sub_80A1570 -sub_80A1570: @ 80A1570 - push {lr} - lsls r0, 16 - movs r1, 0xC0 - lsls r1, 10 - ands r1, r0 - ldr r0, =gUnknown_08516B1C - lsrs r1, 14 - adds r1, r0 - ldr r0, [r1] - ldr r1, =0x06005b40 - movs r2, 0xC0 - bl sub_80A0980 - pop {r0} - bx r0 - .pool - thumb_func_end sub_80A1570 - - thumb_func_start sub_80A1598 -sub_80A1598: @ 80A1598 - push {lr} - lsls r0, 16 - movs r1, 0xC0 - lsls r1, 10 - ands r1, r0 - ldr r0, =gUnknown_08516D2C - lsrs r1, 14 - adds r1, r0 - ldr r0, [r1] - ldr r1, =0x06005c00 - movs r2, 0x80 - bl sub_80A0980 - pop {r0} - bx r0 - .pool - thumb_func_end sub_80A1598 - - thumb_func_start sub_80A15C0 -sub_80A15C0: @ 80A15C0 - push {lr} - lsls r2, r0, 16 - lsrs r0, r2, 16 - movs r1, 0x1 - ands r0, r1 - cmp r0, 0 - bne _080A15D4 - lsrs r0, r2, 17 - bl sub_80A1748 -_080A15D4: - pop {r0} - bx r0 - thumb_func_end sub_80A15C0 - - thumb_func_start sub_80A15D8 -sub_80A15D8: @ 80A15D8 - push {lr} - lsls r1, r0, 16 - movs r0, 0xE0 - lsls r0, 11 - ands r0, r1 - cmp r0, 0 - bne _080A15EC - lsrs r0, r1, 19 - bl sub_80A16B0 -_080A15EC: - pop {r0} - bx r0 - thumb_func_end sub_80A15D8 - - thumb_func_start sub_80A15F0 -sub_80A15F0: @ 80A15F0 - push {r4,r5,lr} - lsls r4, r0, 16 - lsrs r0, r4, 16 - adds r5, r0, 0 - movs r0, 0x3F - ands r0, r5 - cmp r0, 0x1 - bne _080A1606 - lsrs r0, r4, 22 - bl sub_80A1720 -_080A1606: - movs r0, 0x7 - ands r0, r5 - cmp r0, 0x1 - bne _080A1614 - lsrs r0, r4, 19 - bl sub_80A16F8 -_080A1614: - pop {r4,r5} - pop {r0} - bx r0 - thumb_func_end sub_80A15F0 - - thumb_func_start sub_80A161C -sub_80A161C: @ 80A161C - push {lr} - lsls r1, r0, 16 - movs r0, 0xC0 - lsls r0, 10 - ands r0, r1 - cmp r0, 0 - bne _080A1630 - lsrs r0, r1, 18 - bl sub_80A1770 -_080A1630: - pop {r0} - bx r0 - thumb_func_end sub_80A161C - - thumb_func_start sub_80A1634 -sub_80A1634: @ 80A1634 - push {r4,lr} - lsls r4, r0, 16 - movs r0, 0xE0 - lsls r0, 11 - ands r0, r4 - cmp r0, 0 - bne _080A1650 - lsrs r4, 19 - adds r0, r4, 0 - bl sub_80A17C0 - adds r0, r4, 0 - bl sub_80A17EC -_080A1650: - pop {r4} - pop {r0} - bx r0 - thumb_func_end sub_80A1634 - - thumb_func_start sub_80A1658 -sub_80A1658: @ 80A1658 - push {lr} - lsls r1, r0, 16 - movs r0, 0xC0 - lsls r0, 10 - ands r0, r1 - cmp r0, 0 - bne _080A166C - lsrs r0, r1, 18 - bl sub_80A1818 -_080A166C: - pop {r0} - bx r0 - thumb_func_end sub_80A1658 - - thumb_func_start sub_80A1670 -sub_80A1670: @ 80A1670 - push {lr} - lsls r1, r0, 16 - movs r0, 0xC0 - lsls r0, 10 - ands r0, r1 - cmp r0, 0 - bne _080A1684 - lsrs r0, r1, 18 - bl sub_80A1884 -_080A1684: - pop {r0} - bx r0 - thumb_func_end sub_80A1670 - - thumb_func_start sub_80A1688 -sub_80A1688: @ 80A1688 - push {lr} - lsls r0, 16 - lsrs r0, 16 - movs r1, 0x1 - ands r0, r1 - ldr r1, =gUnknown_08516E3C - lsls r0, 2 - adds r0, r1 - ldr r0, [r0] - ldr r1, =0x06003e00 - movs r2, 0x80 - bl sub_80A0980 - pop {r0} - bx r0 - .pool - thumb_func_end sub_80A1688 - - thumb_func_start sub_80A16B0 -sub_80A16B0: @ 80A16B0 - push {r4,lr} - lsls r0, 16 - lsrs r0, 16 - movs r1, 0x3 - bl __umodsi3 - adds r4, r0, 0 - lsls r4, 16 - ldr r0, =gUnknown_08517A44 - lsrs r4, 14 - adds r0, r4, r0 - ldr r0, [r0] - ldr r1, =0x06007e00 - movs r2, 0xC0 - lsls r2, 1 - bl sub_80A0980 - ldr r0, =gUnknown_08517A50 - adds r4, r0 - ldr r0, [r4] - ldr r1, =0x06007a00 - movs r2, 0xA0 - lsls r2, 2 - bl sub_80A0980 - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end sub_80A16B0 - - thumb_func_start sub_80A16F8 -sub_80A16F8: @ 80A16F8 - push {lr} - lsls r0, 16 - movs r1, 0xC0 - lsls r1, 10 - ands r1, r0 - ldr r0, =gUnknown_08517BFC - lsrs r1, 14 - adds r1, r0 - ldr r0, [r1] - ldr r1, =0x06007f00 - movs r2, 0x20 - bl sub_80A0980 - pop {r0} - bx r0 - .pool - thumb_func_end sub_80A16F8 - - thumb_func_start sub_80A1720 -sub_80A1720: @ 80A1720 - push {lr} - lsls r0, 16 - lsrs r0, 16 - movs r1, 0x1 - ands r0, r1 - ldr r1, =gUnknown_08517C0C - lsls r0, 2 - adds r0, r1 - ldr r0, [r0] - ldr r1, =0x06007c00 - movs r2, 0x80 - bl sub_80A0980 - pop {r0} - bx r0 - .pool - thumb_func_end sub_80A1720 - - thumb_func_start sub_80A1748 -sub_80A1748: @ 80A1748 - push {lr} - lsls r0, 16 - lsrs r0, 16 - movs r1, 0x1 - ands r0, r1 - ldr r1, =gUnknown_08518034 - lsls r0, 2 - adds r0, r1 - ldr r0, [r0] - ldr r1, =0x06005200 - movs r2, 0x80 - lsls r2, 2 - bl sub_80A0980 - pop {r0} - bx r0 - .pool - thumb_func_end sub_80A1748 - - thumb_func_start sub_80A1770 -sub_80A1770: @ 80A1770 - push {lr} - lsls r0, 16 - lsrs r0, 16 - movs r1, 0x1 - ands r0, r1 - ldr r1, =gUnknown_0851829C - lsls r0, 2 - adds r0, r1 - ldr r0, [r0] - ldr r1, =0x06007e00 - movs r2, 0x90 - lsls r2, 1 - bl sub_80A0980 - pop {r0} - bx r0 - .pool - thumb_func_end sub_80A1770 - - thumb_func_start sub_80A1798 -sub_80A1798: @ 80A1798 - push {lr} - lsls r0, 16 - movs r1, 0xE0 - lsls r1, 11 - ands r1, r0 - ldr r0, =gUnknown_085202C4 - lsrs r1, 14 - adds r1, r0 - ldr r0, [r1] - ldr r1, =0x06005e00 - movs r2, 0xC0 - lsls r2, 4 - bl sub_80A0980 - pop {r0} - bx r0 - .pool - thumb_func_end sub_80A1798 - - thumb_func_start sub_80A17C0 -sub_80A17C0: @ 80A17C0 - push {lr} - lsls r0, 16 - lsrs r0, 16 - movs r1, 0x3 - bl __umodsi3 - lsls r0, 16 - ldr r1, =gUnknown_08524864 - lsrs r0, 14 - adds r0, r1 - ldr r0, [r0] - ldr r1, =0x060052e0 - movs r2, 0x80 - lsls r2, 1 - bl sub_80A0980 - pop {r0} - bx r0 - .pool - thumb_func_end sub_80A17C0 - - thumb_func_start sub_80A17EC -sub_80A17EC: @ 80A17EC - push {lr} - lsls r0, 16 - lsrs r0, 16 - movs r1, 0x3 - bl __umodsi3 - lsls r0, 16 - ldr r1, =gUnknown_08524870 - lsrs r0, 14 - adds r0, r1 - ldr r0, [r0] - ldr r1, =0x060050e0 - movs r2, 0x80 - lsls r2, 1 - bl sub_80A0980 - pop {r0} - bx r0 - .pool - thumb_func_end sub_80A17EC - .align 2, 0 @ Don't pad with nop. diff --git a/data/graphics.s b/data/graphics.s index 0fa256449..a64dc1332 100644 --- a/data/graphics.s +++ b/data/graphics.s @@ -354,7 +354,19 @@ gUnknown_08D85600:: @ 8D85600 .incbin "baserom.gba", 0xd85600, 0x20 gUnknown_08D85620:: @ 8D85620 - .incbin "baserom.gba", 0xd85620, 0xa8 + .incbin "baserom.gba", 0xd85620, 0x20 + +gUnknown_08D85640:: @ 8D85640 + .incbin "baserom.gba", 0xd85640, 0x20 + +gUnknown_08D85660:: @ 8D85660 + .incbin "baserom.gba", 0xd85660, 0x20 + +gUnknown_08D85680:: @ 8D85680 + .incbin "baserom.gba", 0xd85680, 0x20 + +gUnknown_08D856A0:: @ 8D856A0 + .incbin "baserom.gba", 0xd856a0, 0x28 gUnknown_08D856C8:: @ 8D856C8 .incbin "baserom.gba", 0xd856c8, 0xe0 diff --git a/data/palette.s b/data/palette.s deleted file mode 100644 index 2dbfed8d2..000000000 --- a/data/palette.s +++ /dev/null @@ -1,18 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .section .rodata - .align 2, 0 - -gUnknown_0852487C:: @ 852487C - .incbin "baserom.gba", 0x52487c, 0x10 - -gDummyPaletteStructTemplate:: @ 852488C - .2byte 0xFFFF - .space 9 - .byte 0x20 - .space 4 - - .align 2 -gUnknown_0852489C:: @ 852489C - .incbin "baserom.gba", 0x52489c, 0x20 diff --git a/data/start_menu.s b/data/start_menu.s index eaba0b8e1..07e428d0d 100644 --- a/data/start_menu.s +++ b/data/start_menu.s @@ -26,4 +26,4 @@ gUnknown_085105AC:: @ 85105AC .incbin "baserom.gba", 0x5105ac, 0x10 gUnknown_085105BC:: @ 85105BC - .incbin "baserom.gba", 0x5105bc, 0x1a8 + .incbin "baserom.gba", 0x5105bc, 0x8 diff --git a/data/tileset.s b/data/tileset.s index 1221d8967..a69e53acf 100644 --- a/data/tileset.s +++ b/data/tileset.s @@ -4,6 +4,9 @@ .section .rodata .align 2, 0 +Unknown_085105C4:: + .incbin "baserom.gba", 0x5105C4, 0x1A0 + gUnknown_08510764:: @ 8510764 .incbin "baserom.gba", 0x510764, 0xb60 diff --git a/ld_script.txt b/ld_script.txt index c2f8af595..78d27eb7f 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -110,7 +110,6 @@ SECTIONS { asm/reset_rtc_screen.o(.text); src/start_menu.o(.text); asm/start_menu.o(.text); - asm/tileset.o(.text); src/palette.o(.text); src/sound.o(.text); asm/battle_anim.o(.text); @@ -357,7 +356,7 @@ SECTIONS { data/reset_rtc_screen.o(.rodata); data/start_menu.o(.rodata); data/tileset.o(.rodata); - data/palette.o(.rodata); + src/palette.o(.rodata); data/fanfares.o(.rodata); data/battle_anims.o(.rodata); data/title_screen.o(.rodata); diff --git a/src/palette.c b/src/palette.c index aa9a84e4c..4c09206ba 100644 --- a/src/palette.c +++ b/src/palette.c @@ -28,7 +28,7 @@ struct PaletteStructTemplate struct PaletteStruct { - struct PaletteStructTemplate *base; + const struct PaletteStructTemplate *base; u32 ps_field_4_0:1; u16 ps_field_4_1:1; u32 baseDestOffset:9; @@ -48,6 +48,11 @@ extern void _call_via_r1(u32 a1, void *a2); extern void BlendPalette(u16, u16, u8, u16); +static EWRAM_DATA struct { + const u16 *src; + u16 *dest; + u16 size; +} sTilesetDMA3TransferBuffer[20] = {0}; EWRAM_DATA u16 gPlttBufferUnfaded[0x200] = {0}; EWRAM_DATA u16 gPlttBufferFaded[0x200] = {0}; EWRAM_DATA struct PaletteStruct sPaletteStructs[0x10] = {0}; @@ -56,13 +61,72 @@ EWRAM_DATA u32 gFiller_2037FE0 = 0; EWRAM_DATA u32 sPlttBufferTransferPending = 0; EWRAM_DATA u8 gPaletteDecompressionBuffer[0x400] = {0}; -extern struct PaletteStructTemplate gDummyPaletteStructTemplate; -extern void *gUnknown_0852487C; -extern u8 gUnknown_0852489C[]; +extern const u16 *const gUnknown_08510764[]; +extern const u16 *const gUnknown_085112C4[]; +extern const u16 *const gUnknown_08511BCC[]; +extern const u16 *const gUnknown_08512574[]; +extern const u16 *const gUnknown_08512E54[]; +extern const u16 *const gUnknown_08513174[]; +extern const u16 *const gUnknown_08513684[]; +extern const u16 *const gUnknown_08513894[]; +extern const u16 *const gUnknown_085143E4[]; +extern const u16 *const gUnknown_085145F4[]; +extern const u16 *const gUnknown_08514E04[]; +extern u16 *const gUnknown_08515344[]; +extern u16 *const gUnknown_08515364[]; +extern const u16 *const gUnknown_08515384[]; +extern const u16 *const gUnknown_085153B4[]; +extern const u16 *const gUnknown_085153E4[]; +extern const u16 *const gUnknown_085153F4[]; +extern u16 *const gUnknown_08515804[]; +extern const u16 *const gUnknown_08515824[]; +extern const u16 *const gUnknown_08515964[]; +extern const u16 *const gUnknown_08515D8C[]; +extern u16 *const gUnknown_085161BC[]; +extern const u16 *const gUnknown_085161DC[]; +extern const u16 *const gUnknown_085164FC[]; +extern const u16 *const gUnknown_0851680C[]; +extern const u16 *const gUnknown_08516B1C[]; +extern const u16 *const gUnknown_08516D2C[]; +extern const u16 *const gUnknown_08516E3C[]; +extern const u16 *const gUnknown_08517A44[]; +extern const u16 *const gUnknown_08517A50[]; +extern const u16 *const gUnknown_08517BFC[]; +extern const u16 *const gUnknown_08517C0C[]; +extern const u16 *const gUnknown_08518034[]; +extern const u16 *const gUnknown_0851829C[]; +extern const u16 *const gUnknown_085202C4[]; +extern const u16 *const gUnknown_08524864[]; +extern const u16 *const gUnknown_08524870[]; -extern u16 gUnknown_03000F3C; -extern void *gUnknown_03000F44; +extern const u16 gUnknown_08D85640[]; +extern const u16 gUnknown_08D85660[]; +extern const u16 gUnknown_08D85680[]; +extern const u16 gUnknown_08D856A0[]; +static const u16 *const gUnknown_0852487C[] = { + gUnknown_08D85640, + gUnknown_08D85660, + gUnknown_08D85680, + gUnknown_08D856A0, +}; + +static const struct PaletteStructTemplate gDummyPaletteStructTemplate = { + .uid = 0xFFFF, + .pst_field_B_5 = 1 +}; +static const u8 gUnknown_0852489C[] = { + 0, 0, 0, 0, 0, + 5, 5, 5, 5, 5, + 11, 11, 11, 11, 11, + 16, 16, 16, 16, 16, + 21, 21, 21, 21, 21, + 27, 27, 27, 27, 27, + 31, 31 +}; + +void cur_mapheader_run_tileset1_func(void); +void cur_mapheader_run_tileset2_func(void); static void unused_sub_80A1CDC(struct PaletteStruct *, u32 *); static void unused_sub_80A1E40(struct PaletteStruct *, u32 *); static void unused_sub_80A1F00(struct PaletteStruct *); @@ -74,30 +138,798 @@ static u8 UpdateHardwarePaletteFade(void); static void UpdateBlendRegisters(void); static bool8 IsSoftwarePaletteFadeFinishing(void); +// tileset + +IWRAM_DATA u8 sTilesetDMA3TransferBufferSize; +IWRAM_DATA u16 sPrimaryTilesetCBCounter; +IWRAM_DATA u16 sPrimaryTilesetCBBufferSize; +IWRAM_DATA u16 sSecondaryTilesetCBCounter; +IWRAM_DATA u16 sSecondaryTilesetCBBufferSize; +IWRAM_DATA void (*sPrimaryTilesetCB)(u16); +IWRAM_DATA void (*sSecondaryTilesetCB)(u16); + +void sub_80A0954(void) +{ + sTilesetDMA3TransferBufferSize = 0; + CpuFill32(0, sTilesetDMA3TransferBuffer, sizeof sTilesetDMA3TransferBuffer); +} + +void sub_80A0980(const u16 *a0, u16 *a1, u16 a2) +{ + if (sTilesetDMA3TransferBufferSize < 20) + { + sTilesetDMA3TransferBuffer[sTilesetDMA3TransferBufferSize].src = a0; + sTilesetDMA3TransferBuffer[sTilesetDMA3TransferBufferSize].dest = a1; + sTilesetDMA3TransferBuffer[sTilesetDMA3TransferBufferSize].size = a2; + sTilesetDMA3TransferBufferSize ++; + } +} + +void sub_80A09D0(void) +{ + int i; + + for (i = 0; i < sTilesetDMA3TransferBufferSize; i ++) + { + DmaCopy16(3, sTilesetDMA3TransferBuffer[i].src, sTilesetDMA3TransferBuffer[i].dest, sTilesetDMA3TransferBuffer[i].size); + } + sTilesetDMA3TransferBufferSize = 0; +} + +void cur_mapheader_run_tileset_funcs_after_some_cpuset(void) +{ + sub_80A0954(); + cur_mapheader_run_tileset1_func(); + cur_mapheader_run_tileset2_func(); +} + +void sub_80A0A2C(void) +{ + cur_mapheader_run_tileset2_func(); +} + +void sub_80A0A38(void) +{ + sub_80A0954(); + if (++sPrimaryTilesetCBCounter >= sPrimaryTilesetCBBufferSize) + sPrimaryTilesetCBCounter = 0; + if (++sSecondaryTilesetCBCounter >= sSecondaryTilesetCBBufferSize) + sSecondaryTilesetCBCounter = 0; + if (sPrimaryTilesetCB) + sPrimaryTilesetCB(sPrimaryTilesetCBCounter); + if (sSecondaryTilesetCB) + sSecondaryTilesetCB(sSecondaryTilesetCBCounter); +} + +void cur_mapheader_run_tileset1_func(void) +{ + sPrimaryTilesetCBCounter = 0; + sPrimaryTilesetCBBufferSize = 0; + sPrimaryTilesetCB = NULL; + if (gMapHeader.mapData->primaryTileset && gMapHeader.mapData->primaryTileset->callback) + gMapHeader.mapData->primaryTileset->callback(); +} + +void cur_mapheader_run_tileset2_func(void) +{ + sSecondaryTilesetCBCounter = 0; + sSecondaryTilesetCBBufferSize = 0; + sSecondaryTilesetCB = NULL; + if (gMapHeader.mapData->secondaryTileset && gMapHeader.mapData->secondaryTileset->callback) + gMapHeader.mapData->secondaryTileset->callback(); +} + +void TilesetCb_General(void) +{ + void sub_80A0B70(u16); + + sPrimaryTilesetCBCounter = 0; + sPrimaryTilesetCBBufferSize = 0x100; + sPrimaryTilesetCB = sub_80A0B70; +} + +void TilesetCb_InsideBuilding(void) +{ + void sub_80A0BB4(u16); + + sPrimaryTilesetCBCounter = 0; + sPrimaryTilesetCBBufferSize = 0x100; + sPrimaryTilesetCB = sub_80A0BB4; +} + +void sub_80A0B70(u16 timer) +{ + void sub_80A0BCC(u16); + void sub_80A0BF4(u16); + void sub_80A0C1C(u16); + void sub_80A0C44(u16); + void sub_80A12AC(u16); + + if ((timer & 0x0F) == 0) + sub_80A0BCC(timer >> 4); + if ((timer & 0x0F) == 1) + sub_80A0BF4(timer >> 4); + if ((timer & 0x0F) == 2) + sub_80A0C1C(timer >> 4); + if ((timer & 0x0F) == 3) + sub_80A0C44(timer >> 4); + if ((timer & 0x0F) == 4) + sub_80A12AC(timer >> 4); +} + +void sub_80A0BB4(u16 timer) +{ + void sub_80A1688(u16); + if ((timer & 0x7) == 0) + sub_80A1688(timer >> 3); +} + +void sub_80A0BCC(u16 timer) +{ + u16 idx; + + idx = timer % 4; + sub_80A0980(gUnknown_08510764[idx], (u16 *)(VRAM + 0x3F80), 0x80); +} + +void sub_80A0BF4(u16 timer) +{ + u8 idx; + + idx = timer % 8; + sub_80A0980(gUnknown_08512574[idx], (u16 *)(VRAM + 0x3600), 0x3C0); +} + +void sub_80A0C1C(u16 timer) +{ + u16 idx; + + idx = timer % 8; + sub_80A0980(gUnknown_08512E54[idx], (u16 *)(VRAM + 0x3a00), 0x140); +} + +void sub_80A0C44(u16 timer) +{ + u16 idx; + + idx = timer % 4; + sub_80A0980(gUnknown_08513174[idx], (u16 *)(VRAM + 0x3e00), 0xc0); +} + +void TilesetCb_Petalburg(void) +{ + sSecondaryTilesetCBCounter = 0; + sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; + sSecondaryTilesetCB = NULL; +} + +void TilesetCb_Rustboro(void) +{ + void sub_80A103C(u16); + + sSecondaryTilesetCBCounter = 0; + sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; + sSecondaryTilesetCB = sub_80A103C; +} + +void TilesetCb_Dewford(void) +{ + void sub_80A10B8(u16); + + sSecondaryTilesetCBCounter = 0; + sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; + sSecondaryTilesetCB = sub_80A10B8; +} + +void TilesetCb_Slateport(void) +{ + void sub_80A10D0(u16); + + sSecondaryTilesetCBCounter = 0; + sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; + sSecondaryTilesetCB = sub_80A10D0; +} + +void TilesetCb_Mauville(void) +{ + void sub_80A10E8(u16); + + sSecondaryTilesetCBCounter = sPrimaryTilesetCBCounter; + sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; + sSecondaryTilesetCB = sub_80A10E8; +} + +void TilesetCb_Lavaridge(void) +{ + void sub_80A115C(u16); + + sSecondaryTilesetCBCounter = 0; + sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; + sSecondaryTilesetCB = sub_80A115C; +} + +void TilesetCb_Fallarbor(void) +{ + sSecondaryTilesetCBCounter = 0; + sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; + sSecondaryTilesetCB = NULL; +} + +void TilesetCb_Fortree(void) +{ + sSecondaryTilesetCBCounter = 0; + sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; + sSecondaryTilesetCB = NULL; +} + +void TilesetCb_Lilycove(void) +{ + sSecondaryTilesetCBCounter = 0; + sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; + sSecondaryTilesetCB = NULL; +} + +void TilesetCb_Mossdeep(void) +{ + sSecondaryTilesetCBCounter = 0; + sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; + sSecondaryTilesetCB = NULL; +} + +void TilesetCb_EverGrande(void) +{ + void sub_80A1188(u16); + + sSecondaryTilesetCBCounter = 0; + sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; + sSecondaryTilesetCB = sub_80A1188; +} + +void TilesetCb_Pacifidlog(void) +{ + void sub_80A11FC(u16); + + sSecondaryTilesetCBCounter = sPrimaryTilesetCBCounter; + sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; + sSecondaryTilesetCB = sub_80A11FC; +} + +void TilesetCb_Sootopolis(void) +{ + void sub_80A122C(u16); + + sSecondaryTilesetCBCounter = 0; + sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; + sSecondaryTilesetCB = sub_80A122C; +} + +void TilesetCb_BattleFrontierOutsideWest(void) +{ + void sub_80A127C(u16); + + sSecondaryTilesetCBCounter = 0; + sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; + sSecondaryTilesetCB = sub_80A127C; +} + +void TilesetCb_BattleFrontierOutsideEast(void) +{ + void sub_80A1294(u16); + + sSecondaryTilesetCBCounter = 0; + sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; + sSecondaryTilesetCB = sub_80A1294; +} + +void TilesetCb_Underwater(void) +{ + void sub_80A1244(u16); + + sSecondaryTilesetCBCounter = 0; + sSecondaryTilesetCBBufferSize = 128; + sSecondaryTilesetCB = sub_80A1244; +} + +void TilesetCb_SootopolisGym(void) +{ + void sub_80A15D8(u16); + + sSecondaryTilesetCBCounter = 0; + sSecondaryTilesetCBBufferSize = 240; + sSecondaryTilesetCB = sub_80A15D8; +} + +void TilesetCb_Cave(void) +{ + void sub_80A1260(u16); + + sSecondaryTilesetCBCounter = 0; + sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; + sSecondaryTilesetCB = sub_80A1260; +} + +void TilesetCb_EliteFour(void) +{ + void sub_80A15F0(u16); + + sSecondaryTilesetCBCounter = 0; + sSecondaryTilesetCBBufferSize = 128; + sSecondaryTilesetCB = sub_80A15F0; +} + +void TilesetCb_MauvilleGym(void) +{ + void sub_80A15C0(u16); + + sSecondaryTilesetCBCounter = 0; + sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; + sSecondaryTilesetCB = sub_80A15C0; +} + +void TilesetCb_BikeShop(void) +{ + void sub_80A161C(u16); + + sSecondaryTilesetCBCounter = 0; + sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; + sSecondaryTilesetCB = sub_80A161C; +} + +void TilesetCb_BattlePyramid(void) +{ + void sub_80A1634(u16); + + sSecondaryTilesetCBCounter = 0; + sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; + sSecondaryTilesetCB = sub_80A1634; +} + +void TilesetCb_BattleDome(void) +{ + void sub_80A1658(u16); + + sSecondaryTilesetCBCounter = 0; + sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; + sSecondaryTilesetCB = sub_80A1658; +} + +void sub_80A103C(u16 timer) +{ + void sub_80A1434(u16, u8); + void sub_80A1470(u16); + + if ((timer & 0x07) == 0) + { + sub_80A1434(timer >> 3, 0); + sub_80A1470(timer >> 3); + } + if ((timer & 0x07) == 1) + sub_80A1434(timer >> 3, 1); + if ((timer & 0x07) == 2) + sub_80A1434(timer >> 3, 2); + if ((timer & 0x07) == 3) + sub_80A1434(timer >> 3, 3); + if ((timer & 0x07) == 4) + sub_80A1434(timer >> 3, 4); + if ((timer & 0x07) == 5) + sub_80A1434(timer >> 3, 5); + if ((timer & 0x07) == 6) + sub_80A1434(timer >> 3, 6); + if ((timer & 0x07) == 7) + sub_80A1434(timer >> 3, 7); +} + +void sub_80A10B8(u16 timer) +{ + void sub_80A1520(u16); + + if ((timer & 7) == 0) + sub_80A1520(timer >> 3); +} + +void sub_80A10D0(u16 timer) +{ + void sub_80A1598(u16); + + if ((timer & 15) == 0) + sub_80A1598(timer >> 4); +} + +void sub_80A10E8(u16 timer) +{ + void sub_80A1394(u16, u8); + + if ((timer & 0x07) == 0) + sub_80A1394(timer >> 3, 0); + if ((timer & 0x07) == 1) + sub_80A1394(timer >> 3, 1); + if ((timer & 0x07) == 2) + sub_80A1394(timer >> 3, 2); + if ((timer & 0x07) == 3) + sub_80A1394(timer >> 3, 3); + if ((timer & 0x07) == 4) + sub_80A1394(timer >> 3, 4); + if ((timer & 0x07) == 5) + sub_80A1394(timer >> 3, 5); + if ((timer & 0x07) == 6) + sub_80A1394(timer >> 3, 6); + if ((timer & 0x07) == 7) + sub_80A1394(timer >> 3, 7); +} + +void sub_80A115C(u16 timer) +{ + void sub_80A12D4(u8); + void sub_80A1498(u16); + + if ((timer & 0x0F) == 0) + sub_80A12D4(timer >> 4); + if ((timer & 0x0F) == 1) + sub_80A1498(timer >> 4); +} + +void sub_80A1188(u16 timer) +{ + void sub_80A14C0(u16, u8); + + if ((timer & 0x07) == 0) + sub_80A14C0(timer >> 3, 0); + if ((timer & 0x07) == 1) + sub_80A14C0(timer >> 3, 1); + if ((timer & 0x07) == 2) + sub_80A14C0(timer >> 3, 2); + if ((timer & 0x07) == 3) + sub_80A14C0(timer >> 3, 3); + if ((timer & 0x07) == 4) + sub_80A14C0(timer >> 3, 4); + if ((timer & 0x07) == 5) + sub_80A14C0(timer >> 3, 5); + if ((timer & 0x07) == 6) + sub_80A14C0(timer >> 3, 6); + if ((timer & 0x07) == 7) + sub_80A14C0(timer >> 3, 7); +} + +void sub_80A11FC(u16 timer) +{ + void sub_80A131C(u8); + void sub_80A136C(u8); + + if ((timer & 0x0F) == 0) + sub_80A131C(timer >> 4); + if ((timer & 0x0F) == 1) + sub_80A136C(timer >> 4); +} + +void sub_80A122C(u16 timer) +{ + void sub_80A1798(u16); + + if ((timer & 0x0F) == 0) + sub_80A1798(timer >> 4); +} + +void sub_80A1244(u16 timer) +{ + void sub_80A1344(u8); + + if ((timer & 0x0F) == 0) + sub_80A1344(timer >> 4); +} + +void sub_80A1260(u16 timer) +{ + void sub_80A14F8(u16); + + if ((timer & 0x0F) == 1) + sub_80A14F8(timer >> 4); +} + +void sub_80A127C(u16 timer) +{ + void sub_80A1548(u16); + + if ((timer & 0x07) == 0) + sub_80A1548(timer >> 3); +} + +void sub_80A1294(u16 timer) +{ + void sub_80A1570(u16); + + if ((timer & 0x07) == 0) + sub_80A1570(timer >> 3); +} + +void sub_80A12AC(u16 timer) +{ + u16 idx; + + idx = timer % 4; + sub_80A0980(gUnknown_08513684[idx], (u16 *)(VRAM + 0x3c00), 0x140); +} + +void sub_80A12D4(u8 timer) +{ + u8 idx; + + idx = timer % 4; + sub_80A0980(gUnknown_08513894[idx], (u16 *)(VRAM + 0x6400), 0x80); + + idx = (timer + 2) % 4; + sub_80A0980(gUnknown_08513894[idx], (u16 *)(VRAM + 0x6480), 0x80); +} + +void sub_80A131C(u8 timer) +{ + u8 idx; + + idx = timer % 4; + sub_80A0980(gUnknown_085143E4[idx], (u16 *)(VRAM + 0x7a00), 0x3C0); +} + +void sub_80A1344(u8 timer) +{ + u8 idx; + + idx = timer % 4; + sub_80A0980(gUnknown_085145F4[idx], (u16 *)(VRAM + 0x7e00), 0x80); +} + +void sub_80A136C(u8 timer) +{ + u8 idx; + + idx = timer % 8; + sub_80A0980(gUnknown_08514E04[idx], (u16 *)(VRAM + 0x7e00), 0x100); +} + +void sub_80A1394(u16 timer_div, u8 timer_mod) +{ + timer_div -= timer_mod; + if (timer_div < 12) // almost certainly a typo + { + timer_div %= 12; + sub_80A0980(gUnknown_08515384[timer_div], gUnknown_08515344[timer_mod], 0x80); + sub_80A0980(gUnknown_085153B4[timer_div], gUnknown_08515364[timer_mod], 0x80); + } + else + { + timer_div &= 3; + sub_80A0980(gUnknown_085153E4[timer_div], gUnknown_08515344[timer_mod], 0x80); + sub_80A0980(gUnknown_085153F4[timer_div], gUnknown_08515364[timer_mod], 0x80); + } +} + +void sub_80A1434(u16 timer_div, u8 timer_mod) +{ + timer_div -= timer_mod; + timer_div &= 0x7; + if (gUnknown_08515824[timer_div]) + sub_80A0980(gUnknown_08515824[timer_div], gUnknown_08515804[timer_mod], 0x80); +} + +void sub_80A1470(u16 timer) +{ + u16 idx; + + idx = timer % 2; + sub_80A0980(gUnknown_08515964[idx], (u16 *)(VRAM + 0x7800), 0x80); +} + +void sub_80A1498(u16 timer) +{ + u16 idx; + + idx = timer % 4; + sub_80A0980(gUnknown_08515D8C[idx], (u16 *)(VRAM + 0x5400), 0x80); +} + +void sub_80A14C0(u16 timer_div, u8 timer_mod) +{ + timer_div -= timer_mod; + timer_div &= 7; + + sub_80A0980(gUnknown_085161DC[timer_div], gUnknown_085161BC[timer_mod], 0x80); +} + +void sub_80A14F8(u16 timer) +{ + u16 idx; + + idx = timer % 4; + sub_80A0980(gUnknown_08515D8C[idx], (u16 *)(VRAM + 0x7400), 0x80); +} + +void sub_80A1520(u16 timer) +{ + u16 idx; + + idx = timer % 4; + sub_80A0980(gUnknown_085164FC[idx], (u16 *)(VRAM + 0x5540), 0xC0); +} + +void sub_80A1548(u16 timer) +{ + u16 idx; + + idx = timer % 4; + sub_80A0980(gUnknown_0851680C[idx], (u16 *)(VRAM + 0x5b40), 0xC0); +} + +void sub_80A1570(u16 timer) +{ + u16 idx; + + idx = timer % 4; + sub_80A0980(gUnknown_08516B1C[idx], (u16 *)(VRAM + 0x5b40), 0xC0); +} + +void sub_80A1598(u16 timer) +{ + u16 idx; + + idx = timer % 4; + sub_80A0980(gUnknown_08516D2C[idx], (u16 *)(VRAM + 0x5c00), 0x80); +} + +void sub_80A15C0(u16 timer) +{ + void sub_80A1748(u16); + + if ((timer & 1) == 0) + sub_80A1748(timer >> 1); +} + +void sub_80A15D8(u16 timer) +{ + void sub_80A16B0(u16); + + if ((timer & 7) == 0) + sub_80A16B0(timer >> 3); +} + +void sub_80A15F0(u16 timer) +{ + void sub_80A1720(u16); + void sub_80A16F8(u16); + + if ((timer & 0x3f) == 1) + sub_80A1720(timer >> 6); + if ((timer & 0x07) == 1) + sub_80A16F8(timer >> 3); +} +void sub_80A161C(u16 timer) +{ + void sub_80A1770(u16); + + if ((timer & 3) == 0) + sub_80A1770(timer >> 2); +} + +void sub_80A1634(u16 timer) +{ + void sub_80A17C0(u16); + void sub_80A17EC(u16); + + if ((timer & 7) == 0) + { + sub_80A17C0(timer >> 3); + sub_80A17EC(timer >> 3); + } +} + +void sub_80A1658(u16 timer) +{ + void sub_80A1818(u16); + + if ((timer & 3) == 0) + sub_80A1818(timer >> 2); +} + +void sub_80A1670(u16 timer) +{ + void sub_80A1884(u16); + + if ((timer & 3) == 0) + sub_80A1884(timer >> 2); +} + +void sub_80A1688(u16 timer) +{ + u16 idx; + + idx = timer % 2; + sub_80A0980(gUnknown_08516E3C[idx], (u16 *)(VRAM + 0x3e00), 0x80); +} + +void sub_80A16B0(u16 timer) +{ + u16 idx; + + idx = timer % 3; + sub_80A0980(gUnknown_08517A44[idx], (u16 *)(VRAM + 0x7e00), 0x180); + sub_80A0980(gUnknown_08517A50[idx], (u16 *)(VRAM + 0x7a00), 0x280); +} + +void sub_80A16F8(u16 timer) +{ + u16 idx; + + idx = timer % 4; + sub_80A0980(gUnknown_08517BFC[idx], (u16 *)(VRAM + 0x7f00), 0x20); +} + +void sub_80A1720(u16 timer) +{ + u16 idx; + + idx = timer % 2; + sub_80A0980(gUnknown_08517C0C[idx], (u16 *)(VRAM + 0x7c00), 0x80); +} + +void sub_80A1748(u16 timer) +{ + u16 idx; + + idx = timer % 2; + sub_80A0980(gUnknown_08518034[idx], (u16 *)(VRAM + 0x5200), 0x200); +} + +void sub_80A1770(u16 timer) +{ + u16 idx; + + idx = timer % 2; + sub_80A0980(gUnknown_0851829C[idx], (u16 *)(VRAM + 0x7e00), 0x120); +} + +void sub_80A1798(u16 timer) +{ + u16 idx; + + idx = timer % 8; + sub_80A0980(gUnknown_085202C4[idx], (u16 *)(VRAM + 0x5e00), 0xc00); +} + +void sub_80A17C0(u16 timer) +{ + u16 idx; + + idx = timer % 3; + sub_80A0980(gUnknown_08524864[idx], (u16 *)(VRAM + 0x52e0), 0x100); +} + +void sub_80A17EC(u16 timer) +{ + u16 idx; + + idx = timer % 3; + sub_80A0980(gUnknown_08524870[idx], (u16 *)(VRAM + 0x50e0), 0x100); +} + +// palette + void sub_80A1818(u16 a1) { - void **v1 = &gUnknown_0852487C; - CpuSet(v1[a1 & 0x3], gPlttBufferUnfaded + 0x80, 0x10); - BlendPalette(0x80, 0x10, gPaletteFade.y, gPaletteFade.blendColor & 0x7FFF); - if ((u8)FindTaskIdByFunc(sub_8149DFC) != 0xFF ) - { - gUnknown_03000F44 = sub_80A1670; - gUnknown_03000F3C = 0x20; - } - return; + CpuCopy16(gUnknown_0852487C[a1 & 0x3], gPlttBufferUnfaded + 0x80, 32); + BlendPalette(0x80, 0x10, gPaletteFade.y, gPaletteFade.blendColor & 0x7FFF); + if ((u8)FindTaskIdByFunc(sub_8149DFC) != 0xFF ) + { + sSecondaryTilesetCB = sub_80A1670; + sSecondaryTilesetCBBufferSize = 0x20; + } } void sub_80A1884(u16 a1) { - void **v1 = &gUnknown_0852487C; - CpuSet(v1[a1 & 0x3], gPlttBufferUnfaded + 0x80, 0x10); - if ((u8)FindTaskIdByFunc(sub_8149DFC) == 0xFF ) - { - BlendPalette(0x80, 0x10, gPaletteFade.y, gPaletteFade.blendColor & 0x7FFF); - if (!--gUnknown_03000F3C) - gUnknown_03000F44 = 0; - } - return; + CpuCopy16(gUnknown_0852487C[a1 & 0x3], gPlttBufferUnfaded + 0x80, 32); + if ((u8)FindTaskIdByFunc(sub_8149DFC) == 0xFF ) + { + BlendPalette(0x80, 0x10, gPaletteFade.y, gPaletteFade.blendColor & 0x7FFF); + if (!--sSecondaryTilesetCBBufferSize) + sSecondaryTilesetCB = NULL; + } } void LoadCompressedPalette(const void *src, u16 offset, u16 size) diff --git a/src/scrcmd.c b/src/scrcmd.c new file mode 100644 index 000000000..b56a53caf --- /dev/null +++ b/src/scrcmd.c @@ -0,0 +1,15 @@ + +// Includes +#include "global.h" + +// Static type declarations + +// Static RAM declarations + +IWRAM_DATA u8 gUnknown_03000F30; + +// Static ROM declarations + +// .rodata + +// .text diff --git a/sym_bss.txt b/sym_bss.txt index c81ce12be..16f14da51 100644 --- a/sym_bss.txt +++ b/sym_bss.txt @@ -16,32 +16,8 @@ gUnknown_03000000: @ 3000000 .include "src/rom4.o" .include "src/field_camera.o" .include "src/script.o" - -.align 2 -gUnknown_03000F30: @ 3000F30 - .space 0x4 - -gUnknown_03000F34: @ 3000F34 - .space 0x2 - -gUnknown_03000F36: @ 3000F36 - .space 0x2 - -gUnknown_03000F38: @ 3000F38 - .space 0x2 - -gUnknown_03000F3A: @ 3000F3A - .space 0x2 - -gUnknown_03000F3C: @ 3000F3C - .space 0x4 - -gUnknown_03000F40: @ 3000F40 - .space 0x4 - -gUnknown_03000F44: @ 3000F44 - .space 0x4 - + .include "src/scrcmd.o" + .include "src/palette.o" .include "src/sound.o" gUnknown_03000F50: @ 3000F50 diff --git a/sym_ewram.txt b/sym_ewram.txt index e49b94160..8549f1679 100644 --- a/sym_ewram.txt +++ b/sym_ewram.txt @@ -747,9 +747,6 @@ gUnknown_02037621: @ 2037621 gUnknown_02037622: @ 2037622 .space 0x2 -gUnknown_02037624: @ 2037624 - .space 0xF0 - .include "src/palette.o" .include "src/sound.o" From a1ccd78218cf920bbf62278d02f143b903f1314e Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 30 Sep 2017 22:16:51 -0400 Subject: [PATCH 12/42] Disassemble pointer tables in data/tileset.s --- asm/tileset.s | 8 - data/tileset.s | 651 ++++++++++++++++++++++++++++++++++++++++++++++--- src/palette.c | 8 +- 3 files changed, 616 insertions(+), 51 deletions(-) delete mode 100644 asm/tileset.s diff --git a/asm/tileset.s b/asm/tileset.s deleted file mode 100644 index 2428f2984..000000000 --- a/asm/tileset.s +++ /dev/null @@ -1,8 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .syntax unified - - .text - - .align 2, 0 @ Don't pad with nop. diff --git a/data/tileset.s b/data/tileset.s index a69e53acf..3a1efb5fc 100644 --- a/data/tileset.s +++ b/data/tileset.s @@ -4,116 +4,691 @@ .section .rodata .align 2, 0 -Unknown_085105C4:: - .incbin "baserom.gba", 0x5105C4, 0x1A0 +gUnknown_085105C4:: + .incbin "baserom.gba", 0x5105c4, 0x80 + +gUnknown_08510644:: + .incbin "baserom.gba", 0x510644, 0x80 + +gUnknown_085106C4:: + .incbin "baserom.gba", 0x5106c4, 0xa0 + gUnknown_08510764:: @ 8510764 - .incbin "baserom.gba", 0x510764, 0xb60 +@ replacing .incbin "baserom.gba", 0x00510764, 0x10 + .4byte gUnknown_08510644 + .4byte gUnknown_085105C4 + .4byte gUnknown_08510644 + .4byte gUnknown_085106C4 + +gUnknown_08510774:: + .incbin "baserom.gba", 0x510774, 0x3c0 + +gUnknown_08510B34:: + .incbin "baserom.gba", 0x510b34, 0x3c0 + +gUnknown_08510EF4:: + .incbin "baserom.gba", 0x510ef4, 0x3c0 + +gUnknown_085112B4:: + .incbin "baserom.gba", 0x5112b4, 0x10 + gUnknown_085112C4:: @ 85112C4 - .incbin "baserom.gba", 0x5112c4, 0x908 + .incbin "baserom.gba", 0x5112c4, 0x3b0 + +gUnknown_08511674:: + .incbin "baserom.gba", 0x511674, 0x3c0 + +gUnknown_08511A34:: + .incbin "baserom.gba", 0x511a34, 0x198 + gUnknown_08511BCC:: @ 8511BCC - .incbin "baserom.gba", 0x511bcc, 0x9a8 + .incbin "baserom.gba", 0x511bcc, 0x228 + +gUnknown_08511DF4:: + .incbin "baserom.gba", 0x511df4, 0x3c0 + +gUnknown_085121B4:: + .incbin "baserom.gba", 0x5121b4, 0x3c0 + gUnknown_08512574:: @ 8512574 - .incbin "baserom.gba", 0x512574, 0x8e0 +@ replacing .incbin "baserom.gba", 0x00512574, 0x20 + .4byte gUnknown_08510774 + .4byte gUnknown_08510B34 + .4byte gUnknown_08510EF4 + .4byte gUnknown_085112B4 + .4byte gUnknown_08511674 + .4byte gUnknown_08511A34 + .4byte gUnknown_08511DF4 + .4byte gUnknown_085121B4 + +gUnknown_08512594:: + .incbin "baserom.gba", 0x512594, 0x140 + +gUnknown_085126D4:: + .incbin "baserom.gba", 0x5126d4, 0x140 + +gUnknown_08512814:: + .incbin "baserom.gba", 0x512814, 0x140 + +gUnknown_08512954:: + .incbin "baserom.gba", 0x512954, 0x140 + +gUnknown_08512A94:: + .incbin "baserom.gba", 0x512a94, 0x140 + +gUnknown_08512BD4:: + .incbin "baserom.gba", 0x512bd4, 0x140 + +gUnknown_08512D14:: + .incbin "baserom.gba", 0x512d14, 0x140 + gUnknown_08512E54:: @ 8512E54 - .incbin "baserom.gba", 0x512e54, 0x320 +@ replacing .incbin "baserom.gba", 0x00512e54, 0x20 + .4byte gUnknown_08512594 + .4byte gUnknown_085126D4 + .4byte gUnknown_08512814 + .4byte gUnknown_08512954 + .4byte gUnknown_08512A94 + .4byte gUnknown_08512BD4 + .4byte gUnknown_08512D14 + .4byte gUnknown_08512594 + +gUnknown_08512E74:: + .incbin "baserom.gba", 0x512e74, 0xc0 + +gUnknown_08512F34:: + .incbin "baserom.gba", 0x512f34, 0xc0 + +gUnknown_08512FF4:: + .incbin "baserom.gba", 0x512ff4, 0xc0 + +gUnknown_085130B4:: + .incbin "baserom.gba", 0x5130b4, 0xc0 + gUnknown_08513174:: @ 8513174 - .incbin "baserom.gba", 0x513174, 0x510 +@ replacing .incbin "baserom.gba", 0x00513174, 0x10 + .4byte gUnknown_08512E74 + .4byte gUnknown_08512F34 + .4byte gUnknown_08512FF4 + .4byte gUnknown_085130B4 + +gUnknown_08513184:: + .incbin "baserom.gba", 0x513184, 0x140 + +gUnknown_085132C4:: + .incbin "baserom.gba", 0x5132c4, 0x140 + +gUnknown_08513404:: + .incbin "baserom.gba", 0x513404, 0x140 + +gUnknown_08513544:: + .incbin "baserom.gba", 0x513544, 0x140 + gUnknown_08513684:: @ 8513684 - .incbin "baserom.gba", 0x513684, 0x210 +@ replacing .incbin "baserom.gba", 0x00513684, 0x10 + .4byte gUnknown_08513184 + .4byte gUnknown_085132C4 + .4byte gUnknown_08513404 + .4byte gUnknown_08513544 + +gUnknown_08513694:: + .incbin "baserom.gba", 0x513694, 0x80 + +gUnknown_08513714:: + .incbin "baserom.gba", 0x513714, 0x80 + +gUnknown_08513794:: + .incbin "baserom.gba", 0x513794, 0x80 + +gUnknown_08513814:: + .incbin "baserom.gba", 0x513814, 0x80 + gUnknown_08513894:: @ 8513894 - .incbin "baserom.gba", 0x513894, 0xb50 +@ replacing .incbin "baserom.gba", 0x00513894, 0x10 + .4byte gUnknown_08513694 + .4byte gUnknown_08513714 + .4byte gUnknown_08513794 + .4byte gUnknown_08513814 + +gUnknown_085138A4:: + .incbin "baserom.gba", 0x5138a4, 0x3c0 + +gUnknown_08513C64:: + .incbin "baserom.gba", 0x513c64, 0x3c0 + +gUnknown_08514024:: + .incbin "baserom.gba", 0x514024, 0x3c0 + gUnknown_085143E4:: @ 85143E4 - .incbin "baserom.gba", 0x5143e4, 0x210 +@ replacing .incbin "baserom.gba", 0x005143e4, 0x10 + .4byte gUnknown_085138A4 + .4byte gUnknown_08513C64 + .4byte gUnknown_08514024 + .4byte gUnknown_08513C64 + +gUnknown_085143F4:: + .incbin "baserom.gba", 0x5143f4, 0x80 + +gUnknown_08514474:: + .incbin "baserom.gba", 0x514474, 0x80 + +gUnknown_085144F4:: + .incbin "baserom.gba", 0x5144f4, 0x80 + +gUnknown_08514574:: + .incbin "baserom.gba", 0x514574, 0x80 + gUnknown_085145F4:: @ 85145F4 - .incbin "baserom.gba", 0x5145f4, 0x810 +@ replacing .incbin "baserom.gba", 0x005145f4, 0x10 + .4byte gUnknown_085143F4 + .4byte gUnknown_08514474 + .4byte gUnknown_085144F4 + .4byte gUnknown_08514574 + +gUnknown_08514604:: + .incbin "baserom.gba", 0x514604, 0x100 + +gUnknown_08514704:: + .incbin "baserom.gba", 0x514704, 0x100 + +gUnknown_08514804:: + .incbin "baserom.gba", 0x514804, 0x100 + +gUnknown_08514904:: + .incbin "baserom.gba", 0x514904, 0x100 + +gUnknown_08514A04:: + .incbin "baserom.gba", 0x514a04, 0x100 + +gUnknown_08514B04:: + .incbin "baserom.gba", 0x514b04, 0x100 + +gUnknown_08514C04:: + .incbin "baserom.gba", 0x514c04, 0x100 + +gUnknown_08514D04:: + .incbin "baserom.gba", 0x514d04, 0x100 + gUnknown_08514E04:: @ 8514E04 - .incbin "baserom.gba", 0x514e04, 0x540 +@ replacing .incbin "baserom.gba", 0x00514e04, 0x20 + .4byte gUnknown_08514604 + .4byte gUnknown_08514704 + .4byte gUnknown_08514804 + .4byte gUnknown_08514904 + .4byte gUnknown_08514A04 + .4byte gUnknown_08514B04 + .4byte gUnknown_08514C04 + .4byte gUnknown_08514D04 + +gUnknown_08514E24:: + .incbin "baserom.gba", 0x514e24, 0x80 + +gUnknown_08514EA4:: + .incbin "baserom.gba", 0x514ea4, 0x80 + +gUnknown_08514F24:: + .incbin "baserom.gba", 0x514f24, 0x80 + +gUnknown_08514FA4:: + .incbin "baserom.gba", 0x514fa4, 0x80 + +gUnknown_08515024:: + .incbin "baserom.gba", 0x515024, 0x80 + +gUnknown_085150A4:: + .incbin "baserom.gba", 0x5150a4, 0x80 + +gUnknown_08515124:: + .incbin "baserom.gba", 0x515124, 0x80 + +gUnknown_085151A4:: + .incbin "baserom.gba", 0x5151a4, 0x80 + +gUnknown_08515224:: + .incbin "baserom.gba", 0x515224, 0x80 + +gUnknown_085152A4:: + .incbin "baserom.gba", 0x5152a4, 0xa0 + gUnknown_08515344:: @ 8515344 - .incbin "baserom.gba", 0x515344, 0x20 +@ replacing .incbin "baserom.gba", 0x00515344, 0x20 + .4byte VRAM + 0x4c00 + .4byte VRAM + 0x4c80 + .4byte VRAM + 0x4d00 + .4byte VRAM + 0x4d80 + .4byte VRAM + 0x4e00 + .4byte VRAM + 0x4e80 + .4byte VRAM + 0x4f00 + .4byte VRAM + 0x4f80 gUnknown_08515364:: @ 8515364 - .incbin "baserom.gba", 0x515364, 0x20 +@ replacing .incbin "baserom.gba", 0x00515364, 0x20 + .4byte VRAM + 0x5000 + .4byte VRAM + 0x5080 + .4byte VRAM + 0x5100 + .4byte VRAM + 0x5180 + .4byte VRAM + 0x5200 + .4byte VRAM + 0x5280 + .4byte VRAM + 0x5300 + .4byte VRAM + 0x5380 gUnknown_08515384:: @ 8515384 - .incbin "baserom.gba", 0x515384, 0x30 +@ replacing .incbin "baserom.gba", 0x00515384, 0x30 + .4byte gUnknown_08514E24 + .4byte gUnknown_08514E24 + .4byte gUnknown_08514EA4 + .4byte gUnknown_08514F24 + .4byte gUnknown_08514FA4 + .4byte gUnknown_08514FA4 + .4byte gUnknown_08514FA4 + .4byte gUnknown_08514FA4 + .4byte gUnknown_08514FA4 + .4byte gUnknown_08514FA4 + .4byte gUnknown_08514F24 + .4byte gUnknown_08514EA4 gUnknown_085153B4:: @ 85153B4 - .incbin "baserom.gba", 0x5153b4, 0x30 +@ replacing .incbin "baserom.gba", 0x005153b4, 0x30 + .4byte gUnknown_085150A4 + .4byte gUnknown_085150A4 + .4byte gUnknown_08515124 + .4byte gUnknown_085151A4 + .4byte gUnknown_08515224 + .4byte gUnknown_08515224 + .4byte gUnknown_08515224 + .4byte gUnknown_08515224 + .4byte gUnknown_08515224 + .4byte gUnknown_08515224 + .4byte gUnknown_085151A4 + .4byte gUnknown_08515124 gUnknown_085153E4:: @ 85153E4 - .incbin "baserom.gba", 0x5153e4, 0x10 +@ replacing .incbin "baserom.gba", 0x005153e4, 0x10 + .4byte gUnknown_08514E24 + .4byte gUnknown_08514E24 + .4byte gUnknown_08515024 + .4byte gUnknown_08515024 gUnknown_085153F4:: @ 85153F4 - .incbin "baserom.gba", 0x5153f4, 0x410 +@ replacing .incbin "baserom.gba", 0x005153f4, 0x10 + .4byte gUnknown_085150A4 + .4byte gUnknown_085150A4 + .4byte gUnknown_085152A4 + .4byte gUnknown_085152A4 + +gUnknown_08515404:: + .incbin "baserom.gba", 0x515404, 0x80 + +gUnknown_08515484:: + .incbin "baserom.gba", 0x515484, 0x80 + +gUnknown_08515504:: + .incbin "baserom.gba", 0x515504, 0x80 + +gUnknown_08515584:: + .incbin "baserom.gba", 0x515584, 0x80 + +gUnknown_08515604:: + .incbin "baserom.gba", 0x515604, 0x80 + +gUnknown_08515684:: + .incbin "baserom.gba", 0x515684, 0x80 + +gUnknown_08515704:: + .incbin "baserom.gba", 0x515704, 0x80 + +gUnknown_08515784:: + .incbin "baserom.gba", 0x515784, 0x80 + gUnknown_08515804:: @ 8515804 .incbin "baserom.gba", 0x515804, 0x20 + gUnknown_08515824:: @ 8515824 - .incbin "baserom.gba", 0x515824, 0x140 +@ replacing .incbin "baserom.gba", 0x00515824, 0x20 + .4byte gUnknown_08515404 + .4byte gUnknown_08515484 + .4byte gUnknown_08515504 + .4byte gUnknown_08515584 + .4byte gUnknown_08515604 + .4byte gUnknown_08515684 + .4byte gUnknown_08515704 + .4byte gUnknown_08515784 + +gUnknown_08515844:: + .incbin "baserom.gba", 0x515844, 0x80 + +gUnknown_085158C4:: + .incbin "baserom.gba", 0x5158c4, 0xa0 + gUnknown_08515964:: @ 8515964 - .incbin "baserom.gba", 0x515964, 0x428 +@ replacing .incbin "baserom.gba", 0x00515964, 0x8 + .4byte gUnknown_08515844 + .4byte gUnknown_085158C4 + +gUnknown_0851596C:: + .incbin "baserom.gba", 0x51596c, 0x80 + +gUnknown_085159EC:: + .incbin "baserom.gba", 0x5159ec, 0x80 + +gUnknown_08515A6C:: + .incbin "baserom.gba", 0x515a6c, 0x80 + +gUnknown_08515AEC:: + .incbin "baserom.gba", 0x515aec, 0x2a0 + gUnknown_08515D8C:: @ 8515D8C - .incbin "baserom.gba", 0x515d8c, 0x430 +@ replacing .incbin "baserom.gba", 0x00515d8c, 0x10 + .4byte gUnknown_0851596C + .4byte gUnknown_085159EC + .4byte gUnknown_08515A6C + .4byte gUnknown_08515AEC + +gUnknown_08515D9C:: + .incbin "baserom.gba", 0x515d9c, 0x80 + +gUnknown_08515E1C:: + .incbin "baserom.gba", 0x515e1c, 0x80 + +gUnknown_08515E9C:: + .incbin "baserom.gba", 0x515e9c, 0x80 + +gUnknown_08515F1C:: + .incbin "baserom.gba", 0x515f1c, 0x80 + +gUnknown_08515F9C:: + .incbin "baserom.gba", 0x515f9c, 0x80 + +gUnknown_0851601C:: + .incbin "baserom.gba", 0x51601c, 0x80 + +gUnknown_0851609C:: + .incbin "baserom.gba", 0x51609c, 0x80 + +gUnknown_0851611C:: + .incbin "baserom.gba", 0x51611c, 0xa0 + gUnknown_085161BC:: @ 85161BC - .incbin "baserom.gba", 0x5161bc, 0x20 +@ replacing .incbin "baserom.gba", 0x005161bc, 0x20 + .4byte VRAM + 0x5c00 + .4byte VRAM + 0x5c80 + .4byte VRAM + 0x5d00 + .4byte VRAM + 0x5d80 + .4byte VRAM + 0x5e00 + .4byte VRAM + 0x5e80 + .4byte VRAM + 0x5f00 + .4byte VRAM + 0x5f80 gUnknown_085161DC:: @ 85161DC - .incbin "baserom.gba", 0x5161dc, 0x320 +@ replacing .incbin "baserom.gba", 0x005161dc, 0x20 + .4byte gUnknown_08515D9C + .4byte gUnknown_08515E1C + .4byte gUnknown_08515E9C + .4byte gUnknown_08515F1C + .4byte gUnknown_08515F9C + .4byte gUnknown_0851601C + .4byte gUnknown_0851609C + .4byte gUnknown_0851611C + +gUnknown_085161FC:: + .incbin "baserom.gba", 0x5161fc, 0xc0 + +gUnknown_085162BC:: + .incbin "baserom.gba", 0x5162bc, 0xc0 + +gUnknown_0851637C:: + .incbin "baserom.gba", 0x51637c, 0xc0 + +gUnknown_0851643C:: + .incbin "baserom.gba", 0x51643c, 0xc0 + gUnknown_085164FC:: @ 85164FC - .incbin "baserom.gba", 0x5164fc, 0x310 +@ replacing .incbin "baserom.gba", 0x005164fc, 0x10 + .4byte gUnknown_085161FC + .4byte gUnknown_085162BC + .4byte gUnknown_0851637C + .4byte gUnknown_0851643C + +gUnknown_0851650C:: + .incbin "baserom.gba", 0x51650c, 0xc0 + +gUnknown_085165CC:: + .incbin "baserom.gba", 0x5165cc, 0xc0 + +gUnknown_0851668C:: + .incbin "baserom.gba", 0x51668c, 0xc0 + +gUnknown_0851674C:: + .incbin "baserom.gba", 0x51674c, 0xc0 + gUnknown_0851680C:: @ 851680C - .incbin "baserom.gba", 0x51680c, 0x310 +@ replacing .incbin "baserom.gba", 0x0051680c, 0x10 + .4byte gUnknown_0851650C + .4byte gUnknown_085165CC + .4byte gUnknown_0851668C + .4byte gUnknown_0851674C + +gUnknown_0851681C:: @ 851680C + .incbin "baserom.gba", 0x51681c, 0xc0 + +gUnknown_085168DC:: + .incbin "baserom.gba", 0x5168dc, 0xc0 + +gUnknown_0851699C:: + .incbin "baserom.gba", 0x51699c, 0xc0 + +gUnknown_08516A5C:: + .incbin "baserom.gba", 0x516a5c, 0xc0 + gUnknown_08516B1C:: @ 8516B1C - .incbin "baserom.gba", 0x516b1c, 0x210 +@ replacing .incbin "baserom.gba", 0x00516b1c, 0x10 + .4byte gUnknown_0851681C + .4byte gUnknown_085168DC + .4byte gUnknown_0851699C + .4byte gUnknown_08516A5C + +gUnknown_08516B2C:: + .incbin "baserom.gba", 0x516b2c, 0x80 + +gUnknown_08516BAC:: + .incbin "baserom.gba", 0x516bac, 0x80 + +gUnknown_08516C2C:: + .incbin "baserom.gba", 0x516c2c, 0x80 + +gUnknown_08516CAC:: + .incbin "baserom.gba", 0x516cac, 0x80 + gUnknown_08516D2C:: @ 8516D2C - .incbin "baserom.gba", 0x516d2c, 0x110 +@ replacing .incbin "baserom.gba", 0x00516d2c, 0x10 + .4byte gUnknown_08516B2C + .4byte gUnknown_08516BAC + .4byte gUnknown_08516C2C + .4byte gUnknown_08516CAC + +gUnknown_08516D3C:: + .incbin "baserom.gba", 0x516d3c, 0x80 + +gUnknown_08516DBC:: + .incbin "baserom.gba", 0x516dbc, 0x80 + gUnknown_08516E3C:: @ 8516E3C - .incbin "baserom.gba", 0x516e3c, 0xc08 +@ replacing .incbin "baserom.gba", 0x00516e3c, 0x8 + .4byte gUnknown_08516D3C + .4byte gUnknown_08516DBC + +gUnknown_08516E44:: + .incbin "baserom.gba", 0x516e44, 0x180 + +gUnknown_08516FC4:: + .incbin "baserom.gba", 0x516fc4, 0x180 + +gUnknown_08517144:: + .incbin "baserom.gba", 0x517144, 0x180 + +gUnknown_085172C4:: + .incbin "baserom.gba", 0x5172c4, 0x280 + +gUnknown_08517544:: + .incbin "baserom.gba", 0x517544, 0x280 + +gUnknown_085177C4:: + .incbin "baserom.gba", 0x5177c4, 0x280 + gUnknown_08517A44:: @ 8517A44 - .incbin "baserom.gba", 0x517a44, 0xc +@ replacing .incbin "baserom.gba", 0x00517a44, 0xc + .4byte gUnknown_08516E44 + .4byte gUnknown_08516FC4 + .4byte gUnknown_08517144 gUnknown_08517A50:: @ 8517A50 - .incbin "baserom.gba", 0x517a50, 0x1ac +@ replacing .incbin "baserom.gba", 0x00517a50, 0xc + .4byte gUnknown_085172C4 + .4byte gUnknown_08517544 + .4byte gUnknown_085177C4 + +gUnknown_08517A5C:: + .incbin "baserom.gba", 0x517a5c, 0x80 + +gUnknown_08517ADC:: + .incbin "baserom.gba", 0x517adc, 0x80 + +gUnknown_08517B5C:: + .incbin "baserom.gba", 0x517b5c, 0x20 + +gUnknown_08517B7C:: + .incbin "baserom.gba", 0x517b7c, 0x20 + +gUnknown_08517B9C:: + .incbin "baserom.gba", 0x517b9c, 0x20 + +gUnknown_08517BBC:: + .incbin "baserom.gba", 0x517bbc, 0x40 + gUnknown_08517BFC:: @ 8517BFC - .incbin "baserom.gba", 0x517bfc, 0x10 +@ replacing .incbin "baserom.gba", 0x00517bfc, 0x10 + .4byte gUnknown_08517B5C + .4byte gUnknown_08517B7C + .4byte gUnknown_08517B9C + .4byte gUnknown_08517BBC gUnknown_08517C0C:: @ 8517C0C - .incbin "baserom.gba", 0x517c0c, 0x428 +@ replacing .incbin "baserom.gba", 0x00517c0c, 0x8 + .4byte gUnknown_08517A5C + .4byte gUnknown_08517ADC + +gUnknown_08517C14:: + .incbin "baserom.gba", 0x517c14, 0x200 + +gUnknown_08517E14:: + .incbin "baserom.gba", 0x517e14, 0x220 + gUnknown_08518034:: @ 8518034 - .incbin "baserom.gba", 0x518034, 0x268 +@ replacing .incbin "baserom.gba", 0x00518034, 0x8 + .4byte gUnknown_08517C14 + .4byte gUnknown_08517E14 + +gUnknown_0851803C:: + .incbin "baserom.gba", 0x51803c, 0x120 + +gUnknown_0851815C:: + .incbin "baserom.gba", 0x51815c, 0x140 + gUnknown_0851829C:: @ 851829C - .incbin "baserom.gba", 0x51829c, 0x8028 +@ replacing .incbin "baserom.gba", 0x0051829c, 0x8 + .4byte gUnknown_0851803C + .4byte gUnknown_0851815C + +gUnknown_085182A4:: + .incbin "baserom.gba", 0x5182a4, 0xc00 + +gUnknown_08518EA4:: + .incbin "baserom.gba", 0x518ea4, 0xc00 + +gUnknown_08519AA4:: + .incbin "baserom.gba", 0x519aa4, 0xc00 + +gUnknown_0851A6A4:: + .incbin "baserom.gba", 0x51a6a4, 0xc00 + +gUnknown_0851B2A4:: + .incbin "baserom.gba", 0x51b2a4, 0xc00 + +gUnknown_0851BEA4:: + .incbin "baserom.gba", 0x51bea4, 0xc00 + +gUnknown_0851CAA4:: + .incbin "baserom.gba", 0x51caa4, 0xc00 + +gUnknown_0851D6A4:: + .incbin "baserom.gba", 0x51d6a4, 0x2c20 + gUnknown_085202C4:: @ 85202C4 - .incbin "baserom.gba", 0x5202c4, 0x45a0 +@ replacing .incbin "baserom.gba", 0x005202c4, 0x20 + .4byte gUnknown_085182A4 + .4byte gUnknown_08518EA4 + .4byte gUnknown_08519AA4 + .4byte gUnknown_0851A6A4 + .4byte gUnknown_0851B2A4 + .4byte gUnknown_0851BEA4 + .4byte gUnknown_0851CAA4 + .4byte gUnknown_0851D6A4 + +gUnknown_085202E4:: + .incbin "baserom.gba", 0x5202e4, 0x100 + +gUnknown_085203E4:: + .incbin "baserom.gba", 0x5203e4, 0x100 + +gUnknown_085204E4:: + .incbin "baserom.gba", 0x5204e4, 0x120 + +gUnknown_08520604:: + .incbin "baserom.gba", 0x520604, 0x100 + +gUnknown_08520704:: + .incbin "baserom.gba", 0x520704, 0x100 + +gUnknown_08520804:: + .incbin "baserom.gba", 0x520804, 0x4060 + gUnknown_08524864:: @ 8524864 - .incbin "baserom.gba", 0x524864, 0xc +@ replacing .incbin "baserom.gba", 0x00524864, 0xc + .4byte gUnknown_085202E4 + .4byte gUnknown_085203E4 + .4byte gUnknown_085204E4 gUnknown_08524870:: @ 8524870 - .incbin "baserom.gba", 0x524870, 0xc +@ replacing .incbin "baserom.gba", 0x00524870, 0xc + .4byte gUnknown_08520604 + .4byte gUnknown_08520704 + .4byte gUnknown_08520804 + diff --git a/src/palette.c b/src/palette.c index 4c09206ba..da03516d0 100644 --- a/src/palette.c +++ b/src/palette.c @@ -62,8 +62,6 @@ EWRAM_DATA u32 sPlttBufferTransferPending = 0; EWRAM_DATA u8 gPaletteDecompressionBuffer[0x400] = {0}; extern const u16 *const gUnknown_08510764[]; -extern const u16 *const gUnknown_085112C4[]; -extern const u16 *const gUnknown_08511BCC[]; extern const u16 *const gUnknown_08512574[]; extern const u16 *const gUnknown_08512E54[]; extern const u16 *const gUnknown_08513174[]; @@ -695,7 +693,7 @@ void sub_80A1394(u16 timer_div, u8 timer_mod) } else { - timer_div &= 3; + timer_div %= 4; sub_80A0980(gUnknown_085153E4[timer_div], gUnknown_08515344[timer_mod], 0x80); sub_80A0980(gUnknown_085153F4[timer_div], gUnknown_08515364[timer_mod], 0x80); } @@ -704,7 +702,7 @@ void sub_80A1394(u16 timer_div, u8 timer_mod) void sub_80A1434(u16 timer_div, u8 timer_mod) { timer_div -= timer_mod; - timer_div &= 0x7; + timer_div %= 8; if (gUnknown_08515824[timer_div]) sub_80A0980(gUnknown_08515824[timer_div], gUnknown_08515804[timer_mod], 0x80); } @@ -728,7 +726,7 @@ void sub_80A1498(u16 timer) void sub_80A14C0(u16 timer_div, u8 timer_mod) { timer_div -= timer_mod; - timer_div &= 7; + timer_div %= 8; sub_80A0980(gUnknown_085161DC[timer_div], gUnknown_085161BC[timer_mod], 0x80); } From 4d78e62fd90531a1469b7a1a3e279a5a734f62b2 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 30 Sep 2017 22:23:00 -0400 Subject: [PATCH 13/42] Sanitize data/tilesets.s --- asm/battle_anim.s | 4 ++-- data/tileset.s | 26 ++++++++++++-------------- 2 files changed, 14 insertions(+), 16 deletions(-) diff --git a/asm/battle_anim.s b/asm/battle_anim.s index 9c0190214..ee85f5565 100644 --- a/asm/battle_anim.s +++ b/asm/battle_anim.s @@ -449,10 +449,10 @@ ma00_load_graphics: @ 80A3D24 lsls r0, 8 orrs r4, r0 lsls r5, r4, 3 - ldr r0, =gUnknown_085112C4 + ldr r0, =gUnknown_085112B4 + 0x10 adds r0, r5, r0 bl LoadCompressedObjectPicUsingHeap - ldr r0, =gUnknown_08511BCC + ldr r0, =gUnknown_08511A34 + 0x198 adds r5, r0 adds r0, r5, 0 bl LoadCompressedObjectPaletteUsingHeap diff --git a/data/tileset.s b/data/tileset.s index 3a1efb5fc..c60d83d61 100644 --- a/data/tileset.s +++ b/data/tileset.s @@ -11,8 +11,9 @@ gUnknown_08510644:: .incbin "baserom.gba", 0x510644, 0x80 gUnknown_085106C4:: - .incbin "baserom.gba", 0x5106c4, 0xa0 + .incbin "baserom.gba", 0x5106c4, 0x80 + .space 0x20 gUnknown_08510764:: @ 8510764 @ replacing .incbin "baserom.gba", 0x00510764, 0x10 @@ -31,21 +32,13 @@ gUnknown_08510EF4:: .incbin "baserom.gba", 0x510ef4, 0x3c0 gUnknown_085112B4:: - .incbin "baserom.gba", 0x5112b4, 0x10 - - -gUnknown_085112C4:: @ 85112C4 - .incbin "baserom.gba", 0x5112c4, 0x3b0 + .incbin "baserom.gba", 0x5112b4, 0x3c0 gUnknown_08511674:: .incbin "baserom.gba", 0x511674, 0x3c0 gUnknown_08511A34:: - .incbin "baserom.gba", 0x511a34, 0x198 - - -gUnknown_08511BCC:: @ 8511BCC - .incbin "baserom.gba", 0x511bcc, 0x228 + .incbin "baserom.gba", 0x511a34, 0x3c0 gUnknown_08511DF4:: .incbin "baserom.gba", 0x511df4, 0x3c0 @@ -259,8 +252,9 @@ gUnknown_08515224:: .incbin "baserom.gba", 0x515224, 0x80 gUnknown_085152A4:: - .incbin "baserom.gba", 0x5152a4, 0xa0 + .incbin "baserom.gba", 0x5152a4, 0x80 + .space 0x20 gUnknown_08515344:: @ 8515344 @ replacing .incbin "baserom.gba", 0x00515344, 0x20 @@ -372,7 +366,9 @@ gUnknown_08515844:: .incbin "baserom.gba", 0x515844, 0x80 gUnknown_085158C4:: - .incbin "baserom.gba", 0x5158c4, 0xa0 + .incbin "baserom.gba", 0x5158c4, 0x80 + + .space 0x20 gUnknown_08515964:: @ 8515964 @@ -422,7 +418,9 @@ gUnknown_0851609C:: .incbin "baserom.gba", 0x51609c, 0x80 gUnknown_0851611C:: - .incbin "baserom.gba", 0x51611c, 0xa0 + .incbin "baserom.gba", 0x51611c, 0x80 + + .space 0x20 gUnknown_085161BC:: @ 85161BC From 1fcafaf35aaf92251e7802e1e3ea36e8d5a6067b Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Sun, 1 Oct 2017 18:54:01 +0200 Subject: [PATCH 14/42] more of battle2 done --- asm/battle_1.s | 22 +- asm/battle_2.s | 2681 +-------------------- asm/battle_5.s | 6 +- asm/battle_7.s | 84 +- asm/battle_anim.s | 6 +- asm/battle_anim_80A9C70.s | 4 +- asm/battle_anim_80FE840.s | 6 +- asm/battle_anim_815A0D4.s | 16 +- asm/battle_anim_8170478.s | 38 +- asm/battle_controller_linkopponent.s | 60 +- asm/battle_controller_linkpartner.s | 44 +- asm/battle_controller_opponent.s | 58 +- asm/battle_controller_player.s | 56 +- asm/battle_controller_player_partner.s | 46 +- asm/battle_controller_recorded_opponent.s | 56 +- asm/battle_controller_recorded_player.s | 52 +- asm/battle_controller_safari.s | 10 +- asm/battle_controller_wally.s | 26 +- asm/battle_frontier_2.s | 2 +- asm/battle_interface.s | 38 +- asm/contest.s | 2 +- asm/contest_link_80F57C4.s | 2 +- asm/contest_painting.s | 2 +- asm/evolution_scene.s | 6 +- asm/link.s | 2 +- asm/pokeball.s | 20 +- asm/pokeblock_feed.s | 2 +- asm/recorded_battle.s | 14 +- asm/reshow_battle_screen.s | 12 +- asm/rom_80A5C6C.s | 46 +- asm/script_pokemon_util_80F87D8.s | 2 +- asm/trade.s | 14 +- data/battle_anims.s | 2 +- data/data2b.s | 11 +- data/event_scripts.s | 6 +- include/battle.h | 48 +- include/link.h | 1 + include/main.h | 1 + include/pokemon.h | 1 + include/recorded_battle.h | 3 + include/unknown_task.h | 1 + src/battle_2.c | 1105 ++++++++- src/battle_script_commands.c | 4 +- src/egg_hatch.c | 6 +- sym_ewram.txt | 2 +- 45 files changed, 1518 insertions(+), 3108 deletions(-) diff --git a/asm/battle_1.s b/asm/battle_1.s index 168f16cca..849736cb4 100644 --- a/asm/battle_1.s +++ b/asm/battle_1.s @@ -1358,8 +1358,8 @@ _080356AA: .pool thumb_func_end trs_config - thumb_func_start c2_berry_program_update_menu -c2_berry_program_update_menu: @ 80356D0 + thumb_func_start sub_80356D0 +sub_80356D0: @ 80356D0 push {lr} movs r0, 0x2 bl DisableInterrupts @@ -1381,10 +1381,10 @@ c2_berry_program_update_menu: @ 80356D0 pop {r0} bx r0 .pool - thumb_func_end c2_berry_program_update_menu + thumb_func_end sub_80356D0 - thumb_func_start sub_803570C -sub_803570C: @ 803570C + thumb_func_start ApplyPlayerChosenFrameToBattleMenu +ApplyPlayerChosenFrameToBattleMenu: @ 803570C push {lr} movs r0, 0x2 movs r1, 0x12 @@ -1422,7 +1422,7 @@ _0803575A: pop {r0} bx r0 .pool - thumb_func_end sub_803570C + thumb_func_end ApplyPlayerChosenFrameToBattleMenu thumb_func_start load_battle_oval_graphics load_battle_oval_graphics: @ 8035770 @@ -1685,7 +1685,7 @@ LoadBattleTextboxAndBackground: @ 8035AA4 movs r1, 0 movs r2, 0x40 bl LoadCompressedPalette - bl sub_803570C + bl ApplyPlayerChosenFrameToBattleMenu bl load_battle_oval_graphics pop {r0} bx r0 @@ -2670,8 +2670,8 @@ _080363AC: .pool thumb_func_end LoadBattleEntryBackground - thumb_func_start sub_80363C4 -sub_80363C4: @ 80363C4 + thumb_func_start LoadChosenBattleElement +LoadChosenBattleElement: @ 80363C4 push {r4,lr} lsls r0, 24 lsrs r0, 24 @@ -3051,7 +3051,7 @@ _08036742: b _08036758 .pool _08036750: - bl sub_803570C + bl ApplyPlayerChosenFrameToBattleMenu b _08036758 _08036756: movs r4, 0x1 @@ -3060,6 +3060,6 @@ _08036758: pop {r4} pop {r1} bx r1 - thumb_func_end sub_80363C4 + thumb_func_end LoadChosenBattleElement .align 2, 0 @ Don't pad with nop. diff --git a/asm/battle_2.s b/asm/battle_2.s index 0f4ec2bea..a4fa43fa2 100644 --- a/asm/battle_2.s +++ b/asm/battle_2.s @@ -5,2670 +5,7 @@ .text - thumb_func_start BattleMainCB2 -BattleMainCB2: @ 8038420 - push {lr} - sub sp, 0x4 - bl AnimateSprites - bl BuildOamBuffer - bl RunTextPrinters - bl UpdatePaletteFade - bl RunTasks - ldr r0, =gMain - ldrh r1, [r0, 0x2C] - movs r0, 0x2 - ands r0, r1 - cmp r0, 0 - beq _08038482 - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - movs r1, 0x80 - lsls r1, 17 - ands r0, r1 - cmp r0, 0 - beq _08038482 - bl rfu_lacks_rfufunc - lsls r0, 24 - cmp r0, 0 - beq _08038482 - ldr r2, =gScriptResult - ldr r1, =gBattleOutcome - movs r0, 0x5 - strb r0, [r1] - movs r0, 0x5 - strh r0, [r2] - bl ResetPaletteFadeControl - movs r0, 0x1 - negs r0, r0 - movs r1, 0 - str r1, [sp] - movs r2, 0 - movs r3, 0x10 - bl BeginNormalPaletteFade - ldr r0, =sub_80384E4 - bl SetMainCallback2 -_08038482: - add sp, 0x4 - pop {r0} - bx r0 - .pool - thumb_func_end BattleMainCB2 - thumb_func_start sub_803849C -sub_803849C: @ 803849C - push {lr} - ldr r1, =gMain - ldr r0, =gPreBattleCallback1 - ldr r0, [r0] - str r0, [r1] - ldr r2, =gUnknown_02039B28 - movs r0, 0x3 - strb r0, [r2, 0x15] - ldr r0, =0x00000439 - adds r1, r0 - ldrb r2, [r1] - movs r0, 0x3 - negs r0, r0 - ands r0, r2 - strb r0, [r1] - bl ZeroEnemyPartyMons - movs r0, 0x5A - bl m4aSongNumStop - bl sub_805F094 - bl dp11_free - bl sub_8057028 - pop {r0} - bx r0 - .pool - thumb_func_end sub_803849C - - thumb_func_start sub_80384E4 -sub_80384E4: @ 80384E4 - push {lr} - bl UpdatePaletteFade - ldr r0, =gPaletteFade - ldrb r1, [r0, 0x7] - movs r0, 0x80 - ands r0, r1 - cmp r0, 0 - bne _08038512 - ldr r0, =gMPlay_SE1 - bl m4aMPlayStop - ldr r0, =gMPlay_SE2 - bl m4aMPlayStop - bl sub_803849C - bl FreeAllWindowBuffers - ldr r0, =gMain - ldr r0, [r0, 0x8] - bl SetMainCallback2 -_08038512: - pop {r0} - bx r0 - .pool - thumb_func_end sub_80384E4 - - thumb_func_start sub_8038528 -sub_8038528: @ 8038528 - movs r1, 0 - strh r1, [r0, 0x2E] - ldr r1, =sub_8038538 - str r1, [r0, 0x1C] - bx lr - .pool - thumb_func_end sub_8038528 - - thumb_func_start sub_8038538 -sub_8038538: @ 8038538 - push {r4,r5,lr} - adds r3, r0, 0 - ldr r5, =0x0201c000 - movs r0, 0x2E - ldrsh r1, [r3, r0] - cmp r1, 0x1 - beq _0803856C - cmp r1, 0x1 - bgt _08038554 - cmp r1, 0 - beq _0803855A - b _080385DC - .pool -_08038554: - cmp r1, 0x2 - beq _080385C8 - b _080385DC -_0803855A: - ldrh r0, [r3, 0x2E] - adds r0, 0x1 - strh r0, [r3, 0x2E] - strh r1, [r3, 0x30] - ldr r0, =0x00000281 - strh r0, [r3, 0x32] - strh r1, [r3, 0x34] - movs r0, 0x1 - strh r0, [r3, 0x36] -_0803856C: - ldrh r0, [r3, 0x36] - subs r0, 0x1 - strh r0, [r3, 0x36] - lsls r0, 16 - cmp r0, 0 - bne _080385DC - movs r0, 0x2 - strh r0, [r3, 0x36] - movs r4, 0x30 - ldrsh r2, [r3, r4] - movs r0, 0x34 - ldrsh r1, [r3, r0] - lsls r1, 5 - adds r2, r1 - movs r4, 0x32 - ldrsh r0, [r3, r4] - subs r0, r1 - movs r4, 0x3D - lsls r0, 1 - adds r0, r5 - lsls r2, 1 - adds r2, r5 - movs r1, 0x1C -_0803859A: - strh r4, [r2] - strh r4, [r0] - adds r0, 0x4 - adds r2, 0x4 - subs r1, 0x2 - cmp r1, 0 - bge _0803859A - ldrh r0, [r3, 0x34] - adds r0, 0x1 - strh r0, [r3, 0x34] - lsls r0, 16 - asrs r0, 16 - cmp r0, 0x15 - bne _080385DC - ldrh r0, [r3, 0x2E] - adds r0, 0x1 - strh r0, [r3, 0x2E] - movs r0, 0x20 - strh r0, [r3, 0x30] - b _080385DC - .pool -_080385C8: - ldrh r0, [r3, 0x30] - subs r0, 0x1 - strh r0, [r3, 0x30] - lsls r0, 16 - asrs r0, 16 - cmp r0, 0x14 - bne _080385DC - ldr r0, =CB2_InitBattle - bl SetMainCallback2 -_080385DC: - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8038538 - - thumb_func_start CreateNPCTrainerParty -CreateNPCTrainerParty: @ 80385E8 - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - sub sp, 0x28 - str r0, [sp, 0x10] - lsls r1, 16 - lsrs r1, 16 - str r1, [sp, 0x14] - lsls r2, 24 - lsrs r2, 24 - movs r0, 0 - mov r9, r0 - movs r0, 0x80 - lsls r0, 3 - cmp r1, r0 - bne _08038610 - movs r0, 0 - b _080389E2 -_08038610: - ldr r4, =gBattleTypeFlags - ldr r0, [r4] - ldr r1, =0x043f0908 - ands r0, r1 - ldr r1, [sp, 0x14] - lsls r1, 2 - str r1, [sp, 0x20] - cmp r0, 0x8 - beq _08038624 - b _080389D2 -_08038624: - cmp r2, 0x1 - bne _0803862C - bl ZeroEnemyPartyMons -_0803862C: - ldr r0, [r4] - movs r1, 0x80 - lsls r1, 8 - ands r0, r1 - cmp r0, 0 - beq _08038668 - ldr r0, =gTrainers - ldr r2, [sp, 0x20] - ldr r3, [sp, 0x14] - adds r1, r2, r3 - lsls r1, 3 - adds r1, r0 - adds r2, r1, 0 - adds r2, 0x20 - ldrb r1, [r2] - movs r4, 0x3 - str r4, [sp, 0x1C] - adds r4, r0, 0 - cmp r1, 0x3 - bhi _0803867C - adds r2, r1, 0 - str r2, [sp, 0x1C] - b _0803867C - .pool -_08038668: - ldr r1, =gTrainers - ldr r2, [sp, 0x20] - ldr r3, [sp, 0x14] - adds r0, r2, r3 - lsls r0, 3 - adds r0, r1 - adds r0, 0x20 - ldrb r0, [r0] - str r0, [sp, 0x1C] - adds r4, r1, 0 -_0803867C: - movs r0, 0 - str r0, [sp, 0x18] - b _080389B4 - .pool -_08038688: - ldr r2, [sp, 0x20] - ldr r3, [sp, 0x14] - adds r0, r2, r3 - lsls r0, 3 - adds r1, r0, r4 - ldrb r0, [r1, 0x18] - cmp r0, 0x1 - bne _0803869E - movs r0, 0x80 - mov r10, r0 - b _080386B0 -_0803869E: - ldrb r1, [r1, 0x2] - movs r0, 0x80 - ands r0, r1 - movs r1, 0x88 - mov r10, r1 - cmp r0, 0 - beq _080386B0 - movs r2, 0x78 - mov r10, r2 -_080386B0: - movs r6, 0 - ldr r2, [sp, 0x20] - ldr r3, [sp, 0x14] - adds r0, r2, r3 - lsls r0, 3 - adds r1, r4, 0x4 - adds r0, r1 - ldrb r0, [r0] - ldr r3, [sp, 0x18] - adds r3, 0x1 - str r3, [sp, 0x24] - cmp r0, 0xFF - beq _080386E6 - adds r3, r1, 0 -_080386CC: - ldr r0, [sp, 0x14] - adds r1, r2, r0 - lsls r1, 3 - adds r0, r6, r1 - adds r0, r3 - ldrb r0, [r0] - add r9, r0 - adds r6, 0x1 - adds r1, r6, r1 - adds r1, r3 - ldrb r0, [r1] - cmp r0, 0xFF - bne _080386CC -_080386E6: - ldr r1, [sp, 0x20] - ldr r2, [sp, 0x14] - adds r0, r1, r2 - lsls r1, r0, 3 - adds r0, r1, r4 - ldrb r0, [r0] - cmp r0, 0x1 - beq _08038794 - cmp r0, 0x1 - bgt _08038700 - cmp r0, 0 - beq _0803870E - b _080389AC -_08038700: - cmp r0, 0x2 - bne _08038706 - b _08038854 -_08038706: - cmp r0, 0x3 - bne _0803870C - b _080388E8 -_0803870C: - b _080389AC -_0803870E: - adds r0, r4, 0 - adds r0, 0x24 - adds r0, r1, r0 - ldr r4, [r0] - movs r6, 0 - ldr r3, [sp, 0x18] - lsls r2, r3, 3 - adds r0, r2, r4 - ldrh r1, [r0, 0x4] - movs r0, 0xB - muls r0, r1 - ldr r1, =gSpeciesNames - adds r0, r1 - ldrb r0, [r0] - adds r5, r2, 0 - cmp r0, 0xFF - beq _08038750 - adds r3, r1, 0 - movs r7, 0xB -_08038734: - adds r0, r2, r4 - ldrh r0, [r0, 0x4] - adds r1, r0, 0 - muls r1, r7 - adds r0, r6, r1 - adds r0, r3 - ldrb r0, [r0] - add r9, r0 - adds r6, 0x1 - adds r1, r6, r1 - adds r1, r3 - ldrb r0, [r1] - cmp r0, 0xFF - bne _08038734 -_08038750: - mov r2, r9 - lsls r0, r2, 8 - add r10, r0 - adds r4, r5, r4 - ldrh r1, [r4] - lsls r0, r1, 5 - subs r0, r1 - movs r1, 0xFF - bl __divsi3 - lsls r0, 24 - lsrs r6, r0, 24 - ldr r3, [sp, 0x18] - movs r1, 0x64 - adds r0, r3, 0 - muls r0, r1 - ldr r2, [sp, 0x10] - adds r0, r2, r0 - ldrh r1, [r4, 0x4] - ldrb r2, [r4, 0x2] - movs r3, 0x1 - str r3, [sp] - mov r3, r10 - str r3, [sp, 0x4] - movs r3, 0x2 - str r3, [sp, 0x8] - movs r3, 0 - str r3, [sp, 0xC] - adds r3, r6, 0 - bl CreateMon - b _080389AC - .pool -_08038794: - adds r0, r4, 0 - adds r0, 0x24 - adds r0, r1, r0 - ldr r7, [r0] - movs r6, 0 - ldr r4, [sp, 0x18] - lsls r2, r4, 4 - adds r0, r2, r7 - ldrh r1, [r0, 0x4] - movs r0, 0xB - muls r0, r1 - ldr r1, =gSpeciesNames - adds r0, r1 - ldrb r0, [r0] - mov r8, r2 - cmp r0, 0xFF - beq _080387D6 - adds r3, r1, 0 - movs r4, 0xB -_080387BA: - adds r0, r2, r7 - ldrh r0, [r0, 0x4] - adds r1, r0, 0 - muls r1, r4 - adds r0, r6, r1 - adds r0, r3 - ldrb r0, [r0] - add r9, r0 - adds r6, 0x1 - adds r1, r6, r1 - adds r1, r3 - ldrb r0, [r1] - cmp r0, 0xFF - bne _080387BA -_080387D6: - mov r2, r9 - lsls r0, r2, 8 - add r10, r0 - mov r3, r8 - adds r4, r3, r7 - ldrh r1, [r4] - lsls r0, r1, 5 - subs r0, r1 - movs r1, 0xFF - bl __divsi3 - lsls r0, 24 - lsrs r6, r0, 24 - ldr r0, [sp, 0x18] - movs r1, 0x64 - adds r5, r0, 0 - muls r5, r1 - ldr r2, [sp, 0x10] - adds r5, r2, r5 - ldrh r1, [r4, 0x4] - ldrb r2, [r4, 0x2] - movs r0, 0x1 - str r0, [sp] - mov r3, r10 - str r3, [sp, 0x4] - movs r0, 0x2 - str r0, [sp, 0x8] - movs r0, 0 - str r0, [sp, 0xC] - adds r0, r5, 0 - adds r3, r6, 0 - bl CreateMon - movs r6, 0 - mov r0, r8 - adds r0, 0x6 - adds r4, r7, r0 -_08038820: - adds r1, r6, 0 - adds r1, 0xD - adds r0, r5, 0 - adds r2, r4, 0 - bl SetMonData - adds r1, r6, 0 - adds r1, 0x11 - ldrh r0, [r4] - lsls r2, r0, 1 - adds r2, r0 - lsls r2, 2 - ldr r0, =gBattleMoves + 0x4 @ PP offset - adds r2, r0 - adds r0, r5, 0 - bl SetMonData - adds r4, 0x2 - adds r6, 0x1 - cmp r6, 0x3 - ble _08038820 - b _080389AC - .pool -_08038854: - adds r0, r4, 0 - adds r0, 0x24 - adds r0, r1, r0 - ldr r4, [r0] - movs r6, 0 - ldr r0, [sp, 0x18] - lsls r2, r0, 3 - adds r0, r2, r4 - ldrh r1, [r0, 0x4] - movs r0, 0xB - muls r0, r1 - ldr r1, =gSpeciesNames - adds r0, r1 - ldrb r0, [r0] - adds r5, r2, 0 - cmp r0, 0xFF - beq _08038896 - adds r3, r1, 0 - movs r7, 0xB -_0803887A: - adds r0, r2, r4 - ldrh r0, [r0, 0x4] - adds r1, r0, 0 - muls r1, r7 - adds r0, r6, r1 - adds r0, r3 - ldrb r0, [r0] - add r9, r0 - adds r6, 0x1 - adds r1, r6, r1 - adds r1, r3 - ldrb r0, [r1] - cmp r0, 0xFF - bne _0803887A -_08038896: - mov r2, r9 - lsls r0, r2, 8 - add r10, r0 - adds r5, r4 - ldrh r1, [r5] - lsls r0, r1, 5 - subs r0, r1 - movs r1, 0xFF - bl __divsi3 - lsls r0, 24 - lsrs r6, r0, 24 - ldr r3, [sp, 0x18] - movs r0, 0x64 - adds r4, r3, 0 - muls r4, r0 - ldr r1, [sp, 0x10] - adds r4, r1, r4 - ldrh r1, [r5, 0x4] - ldrb r2, [r5, 0x2] - movs r0, 0x1 - str r0, [sp] - mov r3, r10 - str r3, [sp, 0x4] - movs r0, 0x2 - str r0, [sp, 0x8] - movs r0, 0 - str r0, [sp, 0xC] - adds r0, r4, 0 - adds r3, r6, 0 - bl CreateMon - adds r5, 0x6 - adds r0, r4, 0 - movs r1, 0xC - adds r2, r5, 0 - bl SetMonData - b _080389AC - .pool -_080388E8: - adds r0, r4, 0 - adds r0, 0x24 - adds r0, r1, r0 - ldr r7, [r0] - movs r6, 0 - ldr r4, [sp, 0x18] - lsls r2, r4, 4 - adds r0, r2, r7 - ldrh r1, [r0, 0x4] - movs r0, 0xB - muls r0, r1 - ldr r1, =gSpeciesNames - adds r0, r1 - ldrb r0, [r0] - mov r8, r2 - cmp r0, 0xFF - beq _0803892A - adds r3, r1, 0 - movs r4, 0xB -_0803890E: - adds r0, r2, r7 - ldrh r0, [r0, 0x4] - adds r1, r0, 0 - muls r1, r4 - adds r0, r6, r1 - adds r0, r3 - ldrb r0, [r0] - add r9, r0 - adds r6, 0x1 - adds r1, r6, r1 - adds r1, r3 - ldrb r0, [r1] - cmp r0, 0xFF - bne _0803890E -_0803892A: - mov r2, r9 - lsls r0, r2, 8 - add r10, r0 - mov r3, r8 - adds r5, r3, r7 - ldrh r1, [r5] - lsls r0, r1, 5 - subs r0, r1 - movs r1, 0xFF - bl __divsi3 - lsls r0, 24 - lsrs r6, r0, 24 - ldr r0, [sp, 0x18] - movs r1, 0x64 - adds r4, r0, 0 - muls r4, r1 - ldr r2, [sp, 0x10] - adds r4, r2, r4 - ldrh r1, [r5, 0x4] - ldrb r2, [r5, 0x2] - movs r0, 0x1 - str r0, [sp] - mov r3, r10 - str r3, [sp, 0x4] - movs r0, 0x2 - str r0, [sp, 0x8] - movs r0, 0 - str r0, [sp, 0xC] - adds r0, r4, 0 - adds r3, r6, 0 - bl CreateMon - adds r5, 0x6 - adds r0, r4, 0 - movs r1, 0xC - adds r2, r5, 0 - bl SetMonData - movs r6, 0 - adds r5, r4, 0 - mov r0, r8 - adds r0, 0x8 - adds r4, r7, r0 -_08038982: - adds r1, r6, 0 - adds r1, 0xD - adds r0, r5, 0 - adds r2, r4, 0 - bl SetMonData - adds r1, r6, 0 - adds r1, 0x11 - ldrh r0, [r4] - lsls r2, r0, 1 - adds r2, r0 - lsls r2, 2 - ldr r0, =gBattleMoves + 0x4 @ PP offset - adds r2, r0 - adds r0, r5, 0 - bl SetMonData - adds r4, 0x2 - adds r6, 0x1 - cmp r6, 0x3 - ble _08038982 -_080389AC: - ldr r4, [sp, 0x24] - str r4, [sp, 0x18] - ldr r4, =gTrainers - ldr r0, [sp, 0x18] -_080389B4: - ldr r1, [sp, 0x1C] - cmp r0, r1 - bge _080389BC - b _08038688 -_080389BC: - ldr r2, =gBattleTypeFlags - ldr r1, =gTrainers - ldr r3, [sp, 0x20] - ldr r4, [sp, 0x14] - adds r0, r3, r4 - lsls r0, 3 - adds r0, r1 - ldrb r1, [r0, 0x18] - ldr r0, [r2] - orrs r0, r1 - str r0, [r2] -_080389D2: - ldr r0, =gTrainers - ldr r2, [sp, 0x20] - ldr r3, [sp, 0x14] - adds r1, r2, r3 - lsls r1, 3 - adds r1, r0 - adds r1, 0x20 - ldrb r0, [r1] -_080389E2: - add sp, 0x28 - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r1} - bx r1 - .pool - thumb_func_end CreateNPCTrainerParty - - thumb_func_start sub_8038A04 -sub_8038A04: @ 8038A04 - push {lr} - ldr r0, =0x04000006 - ldrh r0, [r0] - subs r0, 0x6F - lsls r0, 16 - lsrs r0, 16 - cmp r0, 0x30 - bhi _08038A1E - movs r1, 0x98 - lsls r1, 8 - movs r0, 0x8 - bl SetGpuReg -_08038A1E: - pop {r0} - bx r0 - .pool - thumb_func_end sub_8038A04 - - thumb_func_start VBlankCB_Battle -VBlankCB_Battle: @ 8038A28 - push {lr} - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - ldr r1, =0x013f0102 - ands r0, r1 - cmp r0, 0 - bne _08038A3A - bl Random -_08038A3A: - ldr r0, =gBattle_BG0_X - ldrh r1, [r0] - movs r0, 0x10 - bl SetGpuReg - ldr r0, =gBattle_BG0_Y - ldrh r1, [r0] - movs r0, 0x12 - bl SetGpuReg - ldr r0, =gBattle_BG1_X - ldrh r1, [r0] - movs r0, 0x14 - bl SetGpuReg - ldr r0, =gBattle_BG1_Y - ldrh r1, [r0] - movs r0, 0x16 - bl SetGpuReg - ldr r0, =gBattle_BG2_X - ldrh r1, [r0] - movs r0, 0x18 - bl SetGpuReg - ldr r0, =gBattle_BG2_Y - ldrh r1, [r0] - movs r0, 0x1A - bl SetGpuReg - ldr r0, =gBattle_BG3_X - ldrh r1, [r0] - movs r0, 0x1C - bl SetGpuReg - ldr r0, =gBattle_BG3_Y - ldrh r1, [r0] - movs r0, 0x1E - bl SetGpuReg - ldr r0, =gBattle_WIN0H - ldrh r1, [r0] - movs r0, 0x40 - bl SetGpuReg - ldr r0, =gBattle_WIN0V - ldrh r1, [r0] - movs r0, 0x44 - bl SetGpuReg - ldr r0, =gBattle_WIN1H - ldrh r1, [r0] - movs r0, 0x42 - bl SetGpuReg - ldr r0, =gBattle_WIN1V - ldrh r1, [r0] - movs r0, 0x46 - bl SetGpuReg - bl LoadOam - bl ProcessSpriteCopyRequests - bl TransferPlttBuffer - bl sub_80BA0A8 - pop {r0} - bx r0 - .pool - thumb_func_end VBlankCB_Battle - - thumb_func_start nullsub_17 -nullsub_17: @ 8038B00 - bx lr - thumb_func_end nullsub_17 - - thumb_func_start sub_8038B04 -sub_8038B04: @ 8038B04 - push {r4,r5,lr} - adds r5, r0, 0 - movs r1, 0x2E - ldrsh r0, [r5, r1] - cmp r0, 0 - beq _08038B24 - movs r1, 0x32 - ldrsh r0, [r5, r1] - movs r1, 0xFF - lsls r1, 8 - ands r0, r1 - lsrs r0, 8 - ldrh r1, [r5, 0x30] - adds r0, r1 - strh r0, [r5, 0x20] - b _08038B36 -_08038B24: - movs r1, 0x32 - ldrsh r0, [r5, r1] - movs r1, 0xFF - lsls r1, 8 - ands r0, r1 - asrs r0, 8 - ldrh r1, [r5, 0x30] - subs r1, r0 - strh r1, [r5, 0x20] -_08038B36: - movs r1, 0xC0 - lsls r1, 1 - adds r0, r1, 0 - ldrh r1, [r5, 0x32] - adds r0, r1 - strh r0, [r5, 0x32] - adds r0, r5, 0 - adds r0, 0x3F - ldrb r1, [r0] - movs r0, 0x20 - ands r0, r1 - cmp r0, 0 - beq _08038B6A - ldr r4, =0x00002710 - adds r0, r4, 0 - bl FreeSpriteTilesByTag - adds r0, r4, 0 - bl FreeSpritePaletteByTag - adds r0, r5, 0 - bl FreeSpriteOamMatrix - adds r0, r5, 0 - bl DestroySprite -_08038B6A: - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8038B04 - - thumb_func_start sub_8038B74 -sub_8038B74: @ 8038B74 - push {r4,lr} - adds r4, r0, 0 - movs r1, 0x1 - bl StartSpriteAffineAnim - ldr r0, =sub_8038B04 - str r0, [r4, 0x1C] - movs r0, 0x68 - bl PlaySE - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8038B74 - - thumb_func_start sub_8038B94 -sub_8038B94: @ 8038B94 - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - sub sp, 0x10 - lsls r0, 24 - lsrs r0, 24 - str r0, [sp] - movs r0, 0 - str r0, [sp, 0x4] - movs r1, 0 - str r1, [sp, 0x8] - ldr r0, =gBattleScripting - adds r0, 0x25 - ldrb r2, [r0] - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - movs r1, 0x40 - ands r0, r1 - cmp r0, 0 - beq _08038C04 - ldr r1, =gLinkPlayers - lsls r0, r2, 3 - subs r0, r2 - lsls r0, 2 - adds r0, r1 - ldrh r0, [r0, 0x18] - cmp r0, 0x1 - beq _08038BF0 - cmp r0, 0x1 - bgt _08038BE8 - cmp r0, 0 - beq _08038C04 - b _08038C0C - .pool -_08038BE8: - cmp r0, 0x2 - beq _08038C04 - cmp r0, 0x3 - bne _08038C0C -_08038BF0: - ldr r0, =gEnemyParty - str r0, [sp, 0x4] - ldr r1, =gPlayerParty - str r1, [sp, 0x8] - b _08038C0C - .pool -_08038C04: - ldr r2, =gPlayerParty - str r2, [sp, 0x4] - ldr r3, =gEnemyParty - str r3, [sp, 0x8] -_08038C0C: - movs r7, 0 - movs r0, 0 - mov r8, r0 - ldr r1, [sp] - lsls r1, 2 - str r1, [sp, 0xC] - movs r2, 0xCE - lsls r2, 1 - mov r10, r2 - mov r9, r0 -_08038C20: - movs r0, 0x64 - mov r4, r8 - muls r4, r0 - ldr r3, [sp, 0x4] - adds r4, r3, r4 - adds r0, r4, 0 - movs r1, 0x41 - bl GetMonData - lsls r0, 16 - lsrs r5, r0, 16 - adds r0, r4, 0 - movs r1, 0x39 - bl GetMonData - lsls r0, 16 - lsrs r6, r0, 16 - adds r0, r4, 0 - movs r1, 0x37 - bl GetMonData - adds r1, r0, 0 - cmp r5, 0 - beq _08038C90 - cmp r5, r10 - beq _08038C64 - cmp r6, 0 - beq _08038C64 - cmp r1, 0 - bne _08038C64 - movs r0, 0x1 - mov r2, r9 - lsls r0, r2 - orrs r7, r0 -_08038C64: - cmp r5, 0 - beq _08038C90 - cmp r6, 0 - beq _08038C7C - cmp r5, r10 - beq _08038C74 - cmp r1, 0 - beq _08038C7C -_08038C74: - movs r0, 0x2 - mov r3, r9 - lsls r0, r3 - orrs r7, r0 -_08038C7C: - cmp r5, 0 - beq _08038C90 - cmp r5, r10 - beq _08038C90 - cmp r6, 0 - bne _08038C90 - movs r0, 0x3 - mov r1, r9 - lsls r0, r1 - orrs r7, r0 -_08038C90: - movs r2, 0x2 - add r9, r2 - movs r3, 0x1 - add r8, r3 - mov r0, r8 - cmp r0, 0x5 - ble _08038C20 - ldr r1, =gTasks - ldr r2, [sp, 0xC] - ldr r3, [sp] - adds r0, r2, r3 - lsls r0, 3 - adds r0, r1 - strh r7, [r0, 0xE] - movs r7, 0 - movs r0, 0 - mov r8, r0 - movs r1, 0xCE - lsls r1, 1 - mov r10, r1 - mov r9, r0 -_08038CBA: - movs r0, 0x64 - mov r4, r8 - muls r4, r0 - ldr r2, [sp, 0x8] - adds r4, r2, r4 - adds r0, r4, 0 - movs r1, 0x41 - bl GetMonData - lsls r0, 16 - lsrs r5, r0, 16 - adds r0, r4, 0 - movs r1, 0x39 - bl GetMonData - lsls r0, 16 - lsrs r6, r0, 16 - adds r0, r4, 0 - movs r1, 0x37 - bl GetMonData - adds r1, r0, 0 - cmp r5, 0 - beq _08038D2A - cmp r5, r10 - beq _08038CFE - cmp r6, 0 - beq _08038CFE - cmp r1, 0 - bne _08038CFE - movs r0, 0x1 - mov r3, r9 - lsls r0, r3 - orrs r7, r0 -_08038CFE: - cmp r5, 0 - beq _08038D2A - cmp r6, 0 - beq _08038D16 - cmp r5, r10 - beq _08038D0E - cmp r1, 0 - beq _08038D16 -_08038D0E: - movs r0, 0x2 - mov r1, r9 - lsls r0, r1 - orrs r7, r0 -_08038D16: - cmp r5, 0 - beq _08038D2A - cmp r5, r10 - beq _08038D2A - cmp r6, 0 - bne _08038D2A - movs r0, 0x3 - mov r2, r9 - lsls r0, r2 - orrs r7, r0 -_08038D2A: - movs r3, 0x2 - add r9, r3 - movs r0, 0x1 - add r8, r0 - mov r1, r8 - cmp r1, 0x5 - ble _08038CBA - ldr r1, =gTasks - ldr r2, [sp, 0xC] - ldr r3, [sp] - adds r0, r2, r3 - lsls r0, 3 - adds r0, r1 - strh r7, [r0, 0x10] - add sp, 0x10 - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8038B94 - - thumb_func_start sub_8038D64 -sub_8038D64: @ 8038D64 - push {r4,lr} - sub sp, 0x4 - movs r0, 0 - bl SetHBlankCallback - movs r0, 0 - bl SetVBlankCallback - ldr r0, =gBattleTypeFlags - ldr r1, [r0] - movs r2, 0x21 - negs r2, r2 - ands r1, r2 - str r1, [r0] - ldr r0, =0x003f0100 - ands r0, r1 - cmp r0, 0 - beq _08038DAC - ldr r0, =gMain - ldr r0, [r0, 0x8] - bl SetMainCallback2 - bl sub_8057028 - bl dp11_free - bl sub_805F094 - b _08038EB6 - .pool -_08038DAC: - str r0, [sp] - movs r1, 0xC0 - lsls r1, 19 - ldr r2, =0x05006000 - mov r0, sp - bl CpuSet - movs r0, 0x4C - movs r1, 0 - bl SetGpuReg - movs r0, 0x40 - movs r1, 0xF0 - bl SetGpuReg - ldr r4, =0x00005051 - movs r0, 0x44 - adds r1, r4, 0 - bl SetGpuReg - movs r0, 0x48 - movs r1, 0 - bl SetGpuReg - movs r0, 0x4A - movs r1, 0 - bl SetGpuReg - ldr r1, =gBattle_WIN0H - movs r0, 0xF0 - strh r0, [r1] - ldr r0, =gBattle_WIN0V - strh r4, [r0] - bl dp12_8087EA4 - ldr r0, =gUnknown_02038C28 - movs r3, 0xF0 - movs r1, 0xF0 - lsls r1, 3 - adds r2, r0, r1 - movs r1, 0x4F -_08038DFE: - strh r3, [r0] - strh r3, [r2] - adds r2, 0x2 - adds r0, 0x2 - subs r1, 0x1 - cmp r1, 0 - bge _08038DFE - movs r1, 0x50 - ldr r0, =gUnknown_02038C28 - ldr r3, =0x0000ff10 - movs r4, 0x82 - lsls r4, 4 - adds r2, r0, r4 - adds r0, 0xA0 -_08038E1A: - strh r3, [r0] - strh r3, [r2] - adds r2, 0x2 - adds r0, 0x2 - adds r1, 0x1 - cmp r1, 0x9F - ble _08038E1A - bl ResetPaletteFade - ldr r0, =gBattle_BG0_X - movs r4, 0 - strh r4, [r0] - ldr r0, =gBattle_BG0_Y - strh r4, [r0] - ldr r0, =gBattle_BG1_X - strh r4, [r0] - ldr r0, =gBattle_BG1_Y - strh r4, [r0] - ldr r0, =gBattle_BG2_X - strh r4, [r0] - ldr r0, =gBattle_BG2_Y - strh r4, [r0] - ldr r0, =gBattle_BG3_X - strh r4, [r0] - ldr r0, =gBattle_BG3_Y - strh r4, [r0] - bl c2_berry_program_update_menu - ldr r0, =gUnknown_08C004E0 - movs r1, 0 - movs r2, 0x40 - bl LoadCompressedPalette - bl sub_803570C - bl ResetSpriteData - bl ResetTasks - bl LoadBattleEntryBackground - movs r0, 0x4A - movs r1, 0x37 - bl SetGpuReg - bl FreeAllSpritePalettes - ldr r1, =gReservedSpritePaletteCount - movs r0, 0x4 - strb r0, [r1] - ldr r0, =VBlankCB_Battle - bl SetVBlankCallback - ldr r0, =task00_0800F6FC - movs r1, 0 - bl CreateTask - lsls r0, 24 - lsrs r0, 24 - ldr r2, =gTasks - lsls r1, r0, 2 - adds r1, r0 - lsls r1, 3 - adds r1, r2 - movs r2, 0x87 - lsls r2, 1 - strh r2, [r1, 0xA] - movs r2, 0x5A - strh r2, [r1, 0xC] - movs r2, 0x1 - strh r2, [r1, 0x12] - bl sub_8038B94 - ldr r0, =sub_8038F14 - bl SetMainCallback2 - ldr r0, =gBattleCommunication - strb r4, [r0] -_08038EB6: - add sp, 0x4 - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8038D64 - - thumb_func_start sub_8038F14 -sub_8038F14: @ 8038F14 - push {lr} - bl sub_8038F34 - bl AnimateSprites - bl BuildOamBuffer - bl RunTextPrinters - bl UpdatePaletteFade - bl RunTasks - pop {r0} - bx r0 - thumb_func_end sub_8038F14 - - thumb_func_start sub_8038F34 -sub_8038F34: @ 8038F34 - push {r4-r6,lr} - sub sp, 0x8 - ldr r0, =gBattleCommunication - ldrb r1, [r0] - adds r4, r0, 0 - cmp r1, 0x9 - bls _08038F44 - b _080391C6 -_08038F44: - lsls r0, r1, 2 - ldr r1, =_08038F58 - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .pool - .align 2, 0 -_08038F58: - .4byte _08038F80 - .4byte _08038FA0 - .4byte _08038FC2 - .4byte _080390C8 - .4byte _08039100 - .4byte _08039118 - .4byte _0803912C - .4byte _0803914C - .4byte _08039166 - .4byte _08039184 -_08038F80: - movs r0, 0 - bl ShowBg - movs r0, 0x1 - bl ShowBg - movs r0, 0x2 - bl ShowBg - ldr r1, =gBattleCommunication - movs r0, 0xFF - strb r0, [r1, 0x1] - b _08039174 - .pool -_08038FA0: - ldrb r0, [r4, 0x1] - subs r0, 0x1 - strb r0, [r4, 0x1] - lsls r0, 24 - lsrs r1, r0, 24 - cmp r1, 0 - beq _08038FB0 - b _080391C6 -_08038FB0: - movs r0, 0x1 - negs r0, r0 - str r1, [sp] - movs r1, 0 - movs r2, 0 - movs r3, 0x10 - bl BeginNormalPaletteFade - b _0803910C -_08038FC2: - ldr r0, =gPaletteFade - ldrb r1, [r0, 0x7] - movs r0, 0x80 - ands r0, r1 - cmp r0, 0 - beq _08038FD0 - b _080391C6 -_08038FD0: - bl sub_8185FAC - ldr r2, =gMain - ldr r1, =0x00000439 - adds r2, r1 - movs r1, 0x1 - ands r1, r0 - lsls r1, 2 - ldrb r3, [r2] - movs r0, 0x5 - negs r0, r0 - ands r0, r3 - orrs r0, r1 - strb r0, [r2] - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - movs r1, 0x40 - ands r0, r1 - movs r3, 0x2 - cmp r0, 0 - beq _08038FFC - movs r3, 0x4 -_08038FFC: - movs r4, 0 - ldr r6, =gSaveBlock2Ptr - cmp r4, r3 - bge _08039022 - ldr r1, =gLinkPlayers - ldrb r0, [r1] - cmp r0, 0x3 - bne _08039022 - movs r5, 0xFF - adds r2, r1, 0 -_08039010: - adds r2, 0x1C - adds r4, 0x1 - cmp r4, r3 - bge _08039022 - ldrh r1, [r2] - adds r0, r5, 0 - ands r0, r1 - cmp r0, 0x3 - beq _08039010 -_08039022: - ldr r0, [r6] - ldr r1, =0x00000ca9 - adds r0, r1 - ldrb r1, [r0] - movs r0, 0x8 - ands r0, r1 - cmp r0, 0 - bne _080390AC - cmp r4, r3 - bne _080390AC - ldr r0, =0x000008d2 - bl FlagGet - lsls r0, 24 - cmp r0, 0 - beq _08039074 - bl FreeAllWindowBuffers - ldr r0, =sub_80392A8 - bl SetMainCallback2 - b _080391C6 - .pool -_08039074: - ldr r2, =gMain - ldr r1, =0x00000439 - adds r0, r2, r1 - ldrb r1, [r0] - movs r0, 0x4 - ands r0, r1 - cmp r0, 0 - bne _08039090 - ldr r0, [r2, 0x8] - b _080390B0 - .pool -_08039090: - ldr r0, =gReceivedRemoteLinkPlayers - ldrb r0, [r0] - cmp r0, 0 - bne _08039172 - ldr r0, =sub_80B3AF8 - movs r1, 0x5 - bl CreateTask - b _08039172 - .pool -_080390AC: - ldr r0, =gMain - ldr r0, [r0, 0x8] -_080390B0: - bl SetMainCallback2 - bl sub_8057028 - bl dp11_free - bl sub_805F094 - b _080391C6 - .pool -_080390C8: - movs r0, 0 - str r0, [sp, 0x4] - movs r1, 0xC0 - lsls r1, 19 - ldr r2, =0x05006000 - add r0, sp, 0x4 - bl CpuSet - movs r4, 0 -_080390DA: - lsls r0, r4, 24 - lsrs r0, 24 - bl sub_80363C4 - adds r4, 0x1 - cmp r4, 0x1 - ble _080390DA - movs r0, 0x1 - negs r0, r0 - movs r1, 0 - str r1, [sp] - movs r2, 0x10 - movs r3, 0 - bl BeginNormalPaletteFade - b _08039172 - .pool -_08039100: - ldr r0, =gPaletteFade - ldrb r1, [r0, 0x7] - movs r0, 0x80 - ands r0, r1 - cmp r0, 0 - bne _080391C6 -_0803910C: - ldrb r0, [r4] - adds r0, 0x1 - strb r0, [r4] - b _080391C6 - .pool -_08039118: - ldr r0, =sub_80B3AF8 - bl FuncIsActiveTask - lsls r0, 24 - cmp r0, 0 - bne _080391C6 - b _08039172 - .pool -_0803912C: - bl sub_800A520 - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x1 - bne _080391C6 - bl sub_800ADF8 - ldr r0, =gUnknown_0824978D - movs r1, 0 - bl sub_814F9EC - b _08039172 - .pool -_0803914C: - movs r0, 0 - bl IsTextPrinterActive - lsls r0, 16 - cmp r0, 0 - bne _080391C6 - bl sub_800A520 - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x1 - bne _080391C6 - b _08039172 -_08039166: - ldr r0, =gLinkVSyncDisabled - ldrb r0, [r0] - cmp r0, 0 - bne _08039172 - bl sub_800AC34 -_08039172: - ldr r1, =gBattleCommunication -_08039174: - ldrb r0, [r1] - adds r0, 0x1 - strb r0, [r1] - b _080391C6 - .pool -_08039184: - ldr r2, =gMain - ldr r1, =0x00000439 - adds r0, r2, r1 - ldrb r1, [r0] - movs r0, 0x4 - ands r0, r1 - adds r3, r2, 0 - cmp r0, 0 - beq _080391A6 - ldr r0, =gLinkVSyncDisabled - ldrb r0, [r0] - cmp r0, 0 - bne _080391A6 - ldr r0, =gReceivedRemoteLinkPlayers - ldrb r0, [r0] - cmp r0, 0x1 - beq _080391C6 -_080391A6: - ldr r0, =0x00000439 - adds r2, r3, r0 - ldrb r1, [r2] - movs r0, 0x5 - negs r0, r0 - ands r0, r1 - strb r0, [r2] - ldr r0, [r3, 0x8] - bl SetMainCallback2 - bl sub_8057028 - bl dp11_free - bl sub_805F094 -_080391C6: - add sp, 0x8 - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8038F34 - - thumb_func_start sub_80391E0 -sub_80391E0: @ 80391E0 - push {lr} - lsls r0, 24 - lsrs r2, r0, 24 - lsls r1, 24 - lsrs r1, 24 - movs r0, 0 - cmp r1, 0x6 - bhi _080392A0 - lsls r0, r1, 2 - ldr r1, =_08039200 - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .pool - .align 2, 0 -_08039200: - .4byte _0803921C - .4byte _08039230 - .4byte _08039244 - .4byte _08039258 - .4byte _0803926C - .4byte _08039280 - .4byte _08039294 -_0803921C: - ldr r0, =gUnknown_0831AA08 - lsls r1, r2, 2 - adds r1, r0 - ldrb r0, [r1] - lsls r0, 30 - lsrs r0, 30 - b _080392A0 - .pool -_08039230: - ldr r0, =gUnknown_0831AA08 - lsls r1, r2, 2 - adds r1, r0 - ldrb r0, [r1] - lsls r0, 28 - lsrs r0, 30 - b _080392A0 - .pool -_08039244: - ldr r0, =gUnknown_0831AA08 - lsls r1, r2, 2 - adds r1, r0 - ldrh r0, [r1] - lsls r0, 23 - lsrs r0, 27 - b _080392A0 - .pool -_08039258: - ldr r0, =gUnknown_0831AA08 - lsls r1, r2, 2 - adds r1, r0 - ldrb r0, [r1, 0x1] - lsls r0, 29 - lsrs r0, 30 - b _080392A0 - .pool -_0803926C: - ldr r0, =gUnknown_0831AA08 - lsls r1, r2, 2 - adds r1, r0 - ldrb r0, [r1, 0x1] - lsls r0, 28 - lsrs r0, 31 - b _080392A0 - .pool -_08039280: - ldr r0, =gUnknown_0831AA08 - lsls r1, r2, 2 - adds r1, r0 - ldrb r0, [r1, 0x1] - lsls r0, 26 - lsrs r0, 30 - b _080392A0 - .pool -_08039294: - ldr r0, =gUnknown_0831AA08 - lsls r1, r2, 2 - adds r1, r0 - ldr r0, [r1] - lsls r0, 8 - lsrs r0, 22 -_080392A0: - pop {r1} - bx r1 - .pool - thumb_func_end sub_80391E0 - - thumb_func_start sub_80392A8 -sub_80392A8: @ 80392A8 - push {r4,lr} - sub sp, 0x8 - movs r0, 0 - bl SetHBlankCallback - movs r0, 0 - bl SetVBlankCallback - movs r4, 0 - str r4, [sp, 0x4] - movs r1, 0xC0 - lsls r1, 19 - ldr r2, =0x05006000 - add r0, sp, 0x4 - bl CpuSet - bl ResetPaletteFade - ldr r0, =gBattle_BG0_X - strh r4, [r0] - ldr r0, =gBattle_BG0_Y - strh r4, [r0] - ldr r0, =gBattle_BG1_X - strh r4, [r0] - ldr r0, =gBattle_BG1_Y - strh r4, [r0] - ldr r0, =gBattle_BG2_X - strh r4, [r0] - ldr r0, =gBattle_BG2_Y - strh r4, [r0] - ldr r0, =gBattle_BG3_X - strh r4, [r0] - ldr r0, =gBattle_BG3_Y - strh r4, [r0] - bl c2_berry_program_update_menu - movs r1, 0x82 - lsls r1, 5 - movs r0, 0 - bl SetGpuReg - bl sub_803570C -_080392FE: - lsls r0, r4, 24 - lsrs r0, 24 - bl sub_80363C4 - adds r4, 0x1 - cmp r4, 0x1 - ble _080392FE - bl ResetSpriteData - bl ResetTasks - bl FreeAllSpritePalettes - ldr r1, =gReservedSpritePaletteCount - movs r0, 0x4 - strb r0, [r1] - ldr r0, =VBlankCB_Battle - bl SetVBlankCallback - ldr r0, =sub_803937C - bl SetMainCallback2 - movs r0, 0x1 - negs r0, r0 - movs r4, 0 - str r4, [sp] - movs r1, 0 - movs r2, 0x10 - movs r3, 0 - bl BeginNormalPaletteFade - ldr r0, =gBattleCommunication - strb r4, [r0] - add sp, 0x8 - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end sub_80392A8 - - thumb_func_start sub_803937C -sub_803937C: @ 803937C - push {lr} - bl sub_803939C - bl AnimateSprites - bl BuildOamBuffer - bl RunTextPrinters - bl UpdatePaletteFade - bl RunTasks - pop {r0} - bx r0 - thumb_func_end sub_803937C - - thumb_func_start sub_803939C -sub_803939C: @ 803939C - push {r4,r5,lr} - sub sp, 0x4 - ldr r0, =gBattleCommunication - ldrb r1, [r0] - adds r4, r0, 0 - cmp r1, 0xC - bls _080393AC - b _0803975E -_080393AC: - lsls r0, r1, 2 - ldr r1, =_080393C0 - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .pool - .align 2, 0 -_080393C0: - .4byte _080393F4 - .4byte _08039414 - .4byte _08039450 - .4byte _08039470 - .4byte _0803949C - .4byte _080394D8 - .4byte _0803957C - .4byte _08039704 - .4byte _080395CC - .4byte _08039610 - .4byte _08039678 - .4byte _080396A8 - .4byte _08039704 -_080393F4: - movs r0, 0 - bl ShowBg - movs r0, 0x1 - bl ShowBg - movs r0, 0x2 - bl ShowBg - ldr r1, =gBattleCommunication - ldrb r0, [r1] - adds r0, 0x1 - b _0803975C - .pool -_08039414: - ldr r0, =gMain - ldr r1, =0x00000439 - adds r0, r1 - ldrb r1, [r0] - movs r0, 0x4 - ands r0, r1 - cmp r0, 0 - beq _08039434 - ldr r0, =gReceivedRemoteLinkPlayers - ldrb r0, [r0] - cmp r0, 0 - bne _08039434 - ldr r0, =sub_80B3AF8 - movs r1, 0x5 - bl CreateTask -_08039434: - ldr r1, =gBattleCommunication - ldrb r0, [r1] - adds r0, 0x1 - b _0803975C - .pool -_08039450: - ldr r0, =sub_80B3AF8 - bl FuncIsActiveTask - lsls r0, 24 - cmp r0, 0 - beq _0803945E - b _0803975E -_0803945E: - ldr r1, =gBattleCommunication - ldrb r0, [r1] - adds r0, 0x1 - b _0803975C - .pool -_08039470: - ldr r0, =gPaletteFade - ldrb r1, [r0, 0x7] - movs r0, 0x80 - ands r0, r1 - cmp r0, 0 - beq _0803947E - b _0803975E -_0803947E: - ldr r0, =gText_RecordBattleToPass - movs r1, 0 - bl sub_814F9EC - ldr r1, =gBattleCommunication - ldrb r0, [r1] - adds r0, 0x1 - b _0803975C - .pool -_0803949C: - movs r0, 0 - bl IsTextPrinterActive - lsls r0, 16 - lsrs r0, 16 - cmp r0, 0 - beq _080394AC - b _0803975E -_080394AC: - str r0, [sp] - movs r0, 0x18 - movs r1, 0x8 - movs r2, 0x1D - movs r3, 0xD - bl sub_8056A3C - ldr r0, =gText_BattleYesNoChoice - movs r1, 0xC - bl sub_814F9EC - ldr r4, =gBattleCommunication - movs r0, 0x1 - strb r0, [r4, 0x1] - bl BattleCreateCursorAt - b _080396EA - .pool -_080394D8: - ldr r0, =gMain - ldrh r1, [r0, 0x2E] - movs r0, 0x40 - ands r0, r1 - cmp r0, 0 - beq _08039500 - ldrb r0, [r4, 0x1] - cmp r0, 0 - bne _080394EC - b _0803975E -_080394EC: - movs r0, 0x5 - bl PlaySE - ldrb r0, [r4, 0x1] - bl BattleDestroyCursorAt - movs r0, 0 - b _0803951E - .pool -_08039500: - movs r0, 0x80 - ands r0, r1 - cmp r0, 0 - beq _08039526 - ldrb r0, [r4, 0x1] - cmp r0, 0 - beq _08039510 - b _0803975E -_08039510: - movs r0, 0x5 - bl PlaySE - ldrb r0, [r4, 0x1] - bl BattleDestroyCursorAt - movs r0, 0x1 -_0803951E: - strb r0, [r4, 0x1] - bl BattleCreateCursorAt - b _0803975E -_08039526: - movs r5, 0x1 - adds r0, r5, 0 - ands r0, r1 - cmp r0, 0 - beq _08039560 - movs r0, 0x5 - bl PlaySE - ldr r4, =gBattleCommunication - ldrb r0, [r4, 0x1] - cmp r0, 0 - beq _08039540 - b _080396EA -_08039540: - str r5, [sp] - movs r0, 0x18 - movs r1, 0x8 - movs r2, 0x1D - movs r3, 0xD - bl sub_8056A3C - bl sub_8185338 - strb r0, [r4, 0x1] - movs r0, 0xA - strb r0, [r4] - b _0803975E - .pool -_08039560: - movs r0, 0x2 - ands r0, r1 - cmp r0, 0 - bne _0803956A - b _0803975E -_0803956A: - movs r0, 0x5 - bl PlaySE - ldr r1, =gBattleCommunication - ldrb r0, [r1] - adds r0, 0x1 - b _0803975C - .pool -_0803957C: - bl sub_800A520 - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x1 - beq _0803958A - b _0803975E -_0803958A: - str r0, [sp] - movs r0, 0x18 - movs r1, 0x8 - movs r2, 0x1D - movs r3, 0xD - bl sub_8056A3C - ldr r0, =gMain - ldr r1, =0x00000439 - adds r0, r1 - ldrb r1, [r0] - movs r0, 0x4 - ands r0, r1 - cmp r0, 0 - beq _080395B4 - bl sub_800ADF8 - ldr r0, =gUnknown_0824978D - movs r1, 0 - bl sub_814F9EC -_080395B4: - ldr r1, =gBattleCommunication - ldrb r0, [r1] - adds r0, 0x1 - b _0803975C - .pool -_080395CC: - ldrb r0, [r4, 0x1] - subs r0, 0x1 - strb r0, [r4, 0x1] - lsls r0, 24 - cmp r0, 0 - beq _080395DA - b _0803975E -_080395DA: - ldr r0, =gMain - ldr r1, =0x00000439 - adds r0, r1 - ldrb r1, [r0] - movs r0, 0x4 - ands r0, r1 - cmp r0, 0 - beq _080395F6 - ldr r0, =gLinkVSyncDisabled - ldrb r0, [r0] - cmp r0, 0 - bne _080395F6 - bl sub_800AC34 -_080395F6: - ldr r1, =gBattleCommunication - ldrb r0, [r1] - adds r0, 0x1 - b _0803975C - .pool -_08039610: - ldr r2, =gMain - ldr r1, =0x00000439 - adds r0, r2, r1 - ldrb r1, [r0] - movs r0, 0x4 - ands r0, r1 - adds r3, r2, 0 - cmp r0, 0 - beq _08039634 - ldr r0, =gLinkVSyncDisabled - ldrb r0, [r0] - cmp r0, 0 - bne _08039634 - ldr r0, =gReceivedRemoteLinkPlayers - ldrb r0, [r0] - cmp r0, 0x1 - bne _08039634 - b _0803975E -_08039634: - ldr r0, =0x00000439 - adds r2, r3, r0 - ldrb r1, [r2] - movs r0, 0x5 - negs r0, r0 - ands r0, r1 - strb r0, [r2] - ldr r0, =gPaletteFade - ldrb r1, [r0, 0x7] - movs r0, 0x80 - ands r0, r1 - cmp r0, 0 - beq _08039650 - b _0803975E -_08039650: - ldr r0, [r3, 0x8] - bl SetMainCallback2 - bl sub_8057028 - bl dp11_free - bl sub_805F094 - b _0803975E - .pool -_08039678: - ldrb r0, [r4, 0x1] - cmp r0, 0x1 - bne _080396A0 - movs r0, 0x37 - bl PlaySE - ldr r0, =gText_BattleRecordedOnPass -_08039686: - bl BattleStringExpandPlaceholdersToDisplayedString - ldr r0, =gDisplayedStringBattle - movs r1, 0 - bl sub_814F9EC - movs r0, 0x80 - strb r0, [r4, 0x1] - b _080396EA - .pool -_080396A0: - ldr r0, =gUnknown_08242481 - b _08039686 - .pool -_080396A8: - bl sub_800A520 - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x1 - bne _0803975E - movs r0, 0 - bl IsTextPrinterActive - lsls r0, 16 - cmp r0, 0 - bne _0803975E - ldr r4, =gBattleCommunication - ldrb r0, [r4, 0x1] - subs r0, 0x1 - strb r0, [r4, 0x1] - lsls r0, 24 - cmp r0, 0 - bne _0803975E - ldr r0, =gMain - ldr r1, =0x00000439 - adds r0, r1 - ldrb r1, [r0] - movs r0, 0x4 - ands r0, r1 - cmp r0, 0 - beq _080396EA - bl sub_800ADF8 - ldr r0, =gUnknown_0824978D - movs r1, 0 - bl sub_814F9EC -_080396EA: - ldrb r0, [r4] - adds r0, 0x1 - strb r0, [r4] - b _0803975E - .pool -_08039704: - movs r0, 0 - bl IsTextPrinterActive - lsls r0, 16 - lsrs r4, r0, 16 - cmp r4, 0 - bne _0803975E - ldr r0, =gMain - ldr r1, =0x00000439 - adds r0, r1 - ldrb r1, [r0] - movs r0, 0x4 - ands r0, r1 - lsls r0, 24 - lsrs r1, r0, 24 - cmp r1, 0 - beq _08039744 - bl sub_800A520 - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x1 - bne _0803975E - movs r0, 0x1 - negs r0, r0 - str r4, [sp] - b _0803974A - .pool -_08039744: - movs r0, 0x1 - negs r0, r0 - str r1, [sp] -_0803974A: - movs r1, 0 - movs r2, 0 - movs r3, 0x10 - bl BeginNormalPaletteFade - ldr r1, =gBattleCommunication - movs r0, 0x20 - strb r0, [r1, 0x1] - movs r0, 0x8 -_0803975C: - strb r0, [r1] -_0803975E: - add sp, 0x4 - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end sub_803939C - - thumb_func_start shedinja_something -shedinja_something: @ 803976C - push {r4,r5,lr} - sub sp, 0x10 - adds r4, r0, 0 - add r5, sp, 0xC - movs r0, 0x1 - strb r0, [r5] - adds r0, r4, 0 - movs r1, 0xB - bl GetMonData - ldr r1, =0x0000012f - cmp r0, r1 - bne _080397B4 - adds r0, r4, 0 - movs r1, 0x3 - bl GetMonData - ldrb r1, [r5] - cmp r0, r1 - beq _080397B4 - adds r0, r4, 0 - movs r1, 0x2 - mov r2, sp - bl GetMonData - ldr r1, =gUnknown_0831ACA0 - mov r0, sp - bl StringCompareWithoutExtCtrlCodes - cmp r0, 0 - bne _080397B4 - adds r0, r4, 0 - movs r1, 0x3 - adds r2, r5, 0 - bl SetMonData -_080397B4: - add sp, 0x10 - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end shedinja_something - - thumb_func_start sub_80397C4 -sub_80397C4: @ 80397C4 - ldr r2, =gUnknown_0831ABA0 - lsls r0, 2 - adds r0, r2 - ldr r0, [r0] - lsls r1, 3 - adds r1, r0 - ldrb r0, [r1, 0x3] - lsls r0, 3 - bx lr - .pool - thumb_func_end sub_80397C4 - - thumb_func_start oac_poke_opponent -oac_poke_opponent: @ 80397DC - push {lr} - sub sp, 0x4 - ldr r1, =sub_803980C - str r1, [r0, 0x1C] - movs r1, 0 - bl StartSpriteAnimIfDifferent - movs r0, 0x80 - lsls r0, 10 - ldr r1, =0x00002108 - str r1, [sp] - movs r1, 0 - movs r2, 0xA - movs r3, 0xA - bl BeginNormalPaletteFade - add sp, 0x4 - pop {r0} - bx r0 - .pool - thumb_func_end oac_poke_opponent - - thumb_func_start sub_803980C -sub_803980C: @ 803980C - push {lr} - adds r2, r0, 0 - ldr r0, =gUnknown_020243FC - ldrh r1, [r0] - movs r0, 0x1 - ands r0, r1 - cmp r0, 0 - bne _0803982C - ldrh r0, [r2, 0x24] - adds r0, 0x2 - strh r0, [r2, 0x24] - lsls r0, 16 - cmp r0, 0 - bne _0803982C - ldr r0, =sub_8039838 - str r0, [r2, 0x1C] -_0803982C: - pop {r0} - bx r0 - .pool - thumb_func_end sub_803980C - - thumb_func_start sub_8039838 -sub_8039838: @ 8039838 - push {r4,lr} - sub sp, 0x4 - adds r4, r0, 0 - adds r0, 0x3F - ldrb r1, [r0] - movs r0, 0x10 - ands r0, r1 - cmp r0, 0 - beq _08039880 - ldrh r0, [r4, 0x2E] - lsls r0, 24 - lsrs r0, 24 - bl sub_8076918 - ldr r1, =gHealthBoxesIds - movs r2, 0x2E - ldrsh r0, [r4, r2] - adds r0, r1 - ldrb r0, [r0] - bl sub_80729D0 - ldr r0, =sub_8039894 - str r0, [r4, 0x1C] - adds r0, r4, 0 - movs r1, 0 - bl StartSpriteAnimIfDifferent - movs r0, 0x80 - lsls r0, 10 - ldr r1, =0x00002108 - str r1, [sp] - movs r1, 0 - movs r2, 0xA - movs r3, 0 - bl BeginNormalPaletteFade -_08039880: - add sp, 0x4 - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8039838 - - thumb_func_start sub_8039894 -sub_8039894: @ 8039894 - push {lr} - adds r2, r0, 0 - ldr r0, =gPaletteFade - ldrb r1, [r0, 0x7] - movs r0, 0x80 - ands r0, r1 - cmp r0, 0 - bne _080398B0 - ldrh r1, [r2, 0x32] - adds r0, r2, 0 - movs r2, 0 - movs r3, 0x1 - bl BattleAnimateFrontSprite -_080398B0: - pop {r0} - bx r0 - .pool - thumb_func_end sub_8039894 - - thumb_func_start SpriteCallbackDummy_2 -SpriteCallbackDummy_2: @ 80398B8 - bx lr - thumb_func_end SpriteCallbackDummy_2 - - thumb_func_start sub_80398BC -sub_80398BC: @ 80398BC - movs r1, 0x6 - strh r1, [r0, 0x34] - movs r1, 0x1 - strh r1, [r0, 0x36] - ldr r1, =sub_80398D0 - str r1, [r0, 0x1C] - bx lr - .pool - thumb_func_end sub_80398BC - - thumb_func_start sub_80398D0 -sub_80398D0: @ 80398D0 - push {r4,lr} - adds r3, r0, 0 - ldrh r0, [r3, 0x36] - subs r0, 0x1 - strh r0, [r3, 0x36] - lsls r0, 16 - cmp r0, 0 - bne _08039924 - movs r0, 0x8 - strh r0, [r3, 0x36] - movs r0, 0x3E - adds r0, r3 - mov r12, r0 - ldrb r2, [r0] - lsls r0, r2, 29 - lsrs r0, 31 - movs r1, 0x1 - eors r1, r0 - lsls r1, 2 - movs r4, 0x5 - negs r4, r4 - adds r0, r4, 0 - ands r0, r2 - orrs r0, r1 - mov r1, r12 - strb r0, [r1] - ldrh r0, [r3, 0x34] - subs r0, 0x1 - strh r0, [r3, 0x34] - lsls r0, 16 - asrs r2, r0, 16 - cmp r2, 0 - bne _08039924 - ldrb r1, [r1] - adds r0, r4, 0 - ands r0, r1 - mov r1, r12 - strb r0, [r1] - ldr r0, =SpriteCallbackDummy_2 - str r0, [r3, 0x1C] - ldr r0, =gUnknown_02022F88 - str r2, [r0] -_08039924: - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end sub_80398D0 - - thumb_func_start sub_8039934 -sub_8039934: @ 8039934 - push {r4-r7,lr} - mov r7, r9 - mov r6, r8 - push {r6,r7} - mov r9, r0 - ldrh r0, [r0, 0x2E] - lsls r0, 24 - lsrs r6, r0, 24 - ldr r0, =gUnknown_020244D0 - ldr r0, [r0] - ldr r1, [r0] - lsls r0, r6, 2 - adds r1, r0, r1 - ldrh r0, [r1, 0x2] - cmp r0, 0 - beq _0803995C - adds r4, r0, 0 - b _08039960 - .pool -_0803995C: - mov r0, r9 - ldrh r4, [r0, 0x32] -_08039960: - ldr r1, =gBattlePartyID - lsls r0, r6, 1 - adds r5, r0, r1 - ldrh r0, [r5] - movs r1, 0x64 - mov r8, r1 - mov r1, r8 - muls r1, r0 - adds r0, r1, 0 - ldr r7, =gEnemyParty - adds r0, r7 - movs r1, 0 - bl GetMonData - cmp r4, 0xC9 - bne _080399E4 - ldrh r0, [r5] - mov r1, r8 - muls r1, r0 - adds r0, r1, 0 - adds r0, r7 - movs r1, 0 - bl GetMonData - adds r2, r0, 0 - movs r0, 0xC0 - lsls r0, 18 - ands r0, r2 - lsrs r0, 18 - movs r1, 0xC0 - lsls r1, 10 - ands r1, r2 - lsrs r1, 12 - orrs r0, r1 - movs r1, 0xC0 - lsls r1, 2 - ands r1, r2 - lsrs r1, 6 - orrs r0, r1 - movs r1, 0x3 - ands r1, r2 - orrs r0, r1 - movs r1, 0x1C - bl __umodsi3 - lsls r0, 16 - lsrs r0, 16 - cmp r0, 0 - bne _080399D0 - movs r0, 0xC9 - b _080399DA - .pool -_080399D0: - movs r1, 0xCE - lsls r1, 1 - adds r0, r1 - lsls r0, 16 - lsrs r0, 16 -_080399DA: - ldr r1, =gUnknown_08300D38 - lsls r0, 2 - b _08039A1C - .pool -_080399E4: - ldr r0, =0x00000181 - cmp r4, r0 - bne _08039A08 - ldr r0, =gUnknown_08525F78 - ldr r1, =gBattleMonForms - adds r1, r6, r1 - ldrb r1, [r1] - lsls r1, 2 - adds r1, r0 - ldrb r0, [r1, 0x1] - b _08039A20 - .pool -_08039A08: - movs r0, 0xCE - lsls r0, 1 - cmp r4, r0 - bls _08039A18 - ldr r0, =gUnknown_08300D38 - b _08039A1E - .pool -_08039A18: - ldr r1, =gUnknown_08300D38 - lsls r0, r4, 2 -_08039A1C: - adds r0, r1 -_08039A1E: - ldrb r0, [r0, 0x1] -_08039A20: - lsrs r1, r0, 3 - movs r0, 0x8 - subs r0, r1 - mov r1, r9 - strh r0, [r1, 0x34] - movs r0, 0x1 - strh r0, [r1, 0x36] - ldr r0, =sub_8039A48 - str r0, [r1, 0x1C] - pop {r3,r4} - mov r8, r3 - mov r9, r4 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8039934 - - thumb_func_start sub_8039A48 -sub_8039A48: @ 8039A48 - push {r4,lr} - adds r4, r0, 0 - ldrh r0, [r4, 0x36] - subs r0, 0x1 - strh r0, [r4, 0x36] - lsls r0, 16 - cmp r0, 0 - bne _08039AC8 - movs r0, 0x2 - strh r0, [r4, 0x36] - ldrh r0, [r4, 0x26] - adds r0, 0x8 - strh r0, [r4, 0x26] - ldrh r0, [r4, 0x34] - subs r0, 0x1 - strh r0, [r4, 0x34] - lsls r0, 16 - cmp r0, 0 - bge _08039A7C - adds r0, r4, 0 - bl FreeSpriteOamMatrix - adds r0, r4, 0 - bl DestroySprite - b _08039AC8 -_08039A7C: - ldrh r0, [r4, 0x2E] - lsls r0, 24 - lsrs r0, 24 - bl GetBankIdentity - ldr r1, =gMonSpritesGfxPtr - ldr r1, [r1] - lsls r0, 24 - lsrs r0, 22 - adds r1, 0x4 - adds r1, r0 - ldr r2, =gBattleMonForms - movs r3, 0x2E - ldrsh r0, [r4, r3] - adds r0, r2 - ldrb r0, [r0] - lsls r0, 11 - ldr r1, [r1] - adds r1, r0 - movs r2, 0x34 - ldrsh r0, [r4, r2] - lsls r0, 8 - adds r1, r0 - movs r2, 0 - movs r0, 0xFF -_08039AAE: - strb r2, [r1] - adds r1, 0x1 - subs r0, 0x1 - cmp r0, 0 - bge _08039AAE - ldr r0, =gBattleMonForms - movs r3, 0x2E - ldrsh r1, [r4, r3] - adds r1, r0 - ldrb r1, [r1] - adds r0, r4, 0 - bl StartSpriteAnim -_08039AC8: - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8039A48 - - thumb_func_start sub_8039AD8 -sub_8039AD8: @ 8039AD8 - movs r1, 0x8 - strh r1, [r0, 0x34] - adds r1, r0, 0 - adds r1, 0x3E - ldrb r1, [r1] - lsls r1, 29 - lsrs r1, 31 - strh r1, [r0, 0x36] - ldr r1, =sub_8039AF4 - str r1, [r0, 0x1C] - bx lr - .pool - thumb_func_end sub_8039AD8 - - thumb_func_start sub_8039AF4 -sub_8039AF4: @ 8039AF4 - push {lr} - adds r3, r0, 0 - ldrh r0, [r3, 0x34] - subs r0, 0x1 - strh r0, [r3, 0x34] - lsls r0, 16 - cmp r0, 0 - bne _08039B26 - movs r0, 0x3E - adds r0, r3 - mov r12, r0 - ldrb r2, [r0] - lsls r0, r2, 29 - lsrs r0, 31 - movs r1, 0x1 - eors r1, r0 - lsls r1, 2 - movs r0, 0x5 - negs r0, r0 - ands r0, r2 - orrs r0, r1 - mov r1, r12 - strb r0, [r1] - movs r0, 0x8 - strh r0, [r3, 0x34] -_08039B26: - pop {r0} - bx r0 - thumb_func_end sub_8039AF4 - - thumb_func_start sub_8039B2C -sub_8039B2C: @ 8039B2C - movs r1, 0x3E - adds r1, r0 - mov r12, r1 - movs r1, 0x1 - ldrh r2, [r0, 0x36] - ands r2, r1 - lsls r2, 2 - mov r1, r12 - ldrb r3, [r1] - movs r1, 0x5 - negs r1, r1 - ands r1, r3 - orrs r1, r2 - mov r2, r12 - strb r1, [r2] - movs r1, 0 - strh r1, [r0, 0x36] - ldr r1, =SpriteCallbackDummy_2 - str r1, [r0, 0x1C] - bx lr - .pool - thumb_func_end sub_8039B2C thumb_func_start sub_8039B58 sub_8039B58: @ 8039B58 @@ -2805,7 +142,7 @@ dp11b_obj_instanciate: @ 8039C28 mov r10, r3 cmp r1, 0 beq _08039C64 - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r1, [r0, 0x4] lsls r2, r4, 1 @@ -2817,7 +154,7 @@ dp11b_obj_instanciate: @ 8039C28 b _08039C76 .pool _08039C64: - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r1, [r0, 0x4] lsls r2, r4, 1 @@ -2841,7 +178,7 @@ _08039C76: ldr r0, =gHealthBoxesIds adds r0, r4, r0 ldrb r7, [r0] - ldr r2, =gUnknown_020244D0 + ldr r2, =gBattleSpritesDataPtr ldr r0, [r2] ldr r0, [r0, 0x4] adds r1, r6, r4 @@ -2867,7 +204,7 @@ _08039CD0: ldr r0, =gBankSpriteIds adds r0, r4, r0 ldrb r7, [r0] - ldr r2, =gUnknown_020244D0 + ldr r2, =gBattleSpritesDataPtr ldr r0, [r2] ldr r0, [r0, 0x4] adds r1, r6, r4 @@ -2931,7 +268,7 @@ dp11b_obj_free: @ 8039D48 lsrs r1, 24 cmp r1, 0x1 bne _08039D9C - ldr r6, =gUnknown_020244D0 + ldr r6, =gBattleSpritesDataPtr ldr r0, [r6] ldr r1, [r0, 0x4] lsls r0, r2, 1 @@ -2962,7 +299,7 @@ dp11b_obj_free: @ 8039D48 b _08039DD6 .pool _08039D9C: - ldr r6, =gUnknown_020244D0 + ldr r6, =gBattleSpritesDataPtr ldr r0, [r6] ldr r1, [r0, 0x4] lsls r0, r2, 1 @@ -10246,9 +7583,9 @@ _0803DE86: ands r0, r1 cmp r0, 0 bne _0803DEA2 - bl sub_805F094 - bl sub_8057028 - bl dp11_free + bl FreeMonSpritesGfx + bl FreeBattleResources + bl FreeBattleSpritesData _0803DEA2: pop {r0} bx r0 diff --git a/asm/battle_5.s b/asm/battle_5.s index 3163631a9..4d02a5942 100644 --- a/asm/battle_5.s +++ b/asm/battle_5.s @@ -104,8 +104,8 @@ _08056FFA: .pool thumb_func_end AllocateBattleResrouces - thumb_func_start sub_8057028 -sub_8057028: @ 8057028 + thumb_func_start FreeBattleResources +FreeBattleResources: @ 8057028 push {r4-r6,lr} ldr r0, =gBattleTypeFlags ldr r0, [r0] @@ -181,7 +181,7 @@ _080570D0: pop {r0} bx r0 .pool - thumb_func_end sub_8057028 + thumb_func_end FreeBattleResources thumb_func_start AdjustFriendshipOnBattleFaint AdjustFriendshipOnBattleFaint: @ 80570F4 diff --git a/asm/battle_7.s b/asm/battle_7.s index 82298fbf4..7f82e790a 100644 --- a/asm/battle_7.s +++ b/asm/battle_7.s @@ -8,7 +8,7 @@ thumb_func_start AllocateBattleSpritesData AllocateBattleSpritesData: @ 805D118 push {r4,lr} - ldr r4, =gUnknown_020244D0 + ldr r4, =gBattleSpritesDataPtr movs r0, 0x10 bl AllocZeroed str r0, [r4] @@ -34,10 +34,10 @@ AllocateBattleSpritesData: @ 805D118 .pool thumb_func_end AllocateBattleSpritesData - thumb_func_start dp11_free -dp11_free: @ 805D158 + thumb_func_start FreeBattleSpritesData +FreeBattleSpritesData: @ 805D158 push {r4,r5,lr} - ldr r5, =gUnknown_020244D0 + ldr r5, =gBattleSpritesDataPtr ldr r0, [r5] cmp r0, 0 beq _0805D192 @@ -65,7 +65,7 @@ _0805D192: pop {r0} bx r0 .pool - thumb_func_end dp11_free + thumb_func_end FreeBattleSpritesData thumb_func_start sub_805D19C sub_805D19C: @ 805D19C @@ -839,7 +839,7 @@ move_anim_start_t2_for_situation: @ 805D808 push {r4-r6,lr} adds r4, r1, 0 lsls r0, 24 - ldr r6, =gUnknown_020244D0 + ldr r6, =gBattleSpritesDataPtr ldr r1, [r6] ldr r5, =gActiveBank ldrb r2, [r5] @@ -1001,7 +1001,7 @@ move_anim_start_t3: @ 805D908 b _0805DA1E .pool _0805D950: - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr mov r9, r0 ldr r0, [r0] ldr r0, [r0] @@ -1063,7 +1063,7 @@ _0805D9CC: mov r1, sp ldrb r1, [r1] strb r1, [r0] - ldr r4, =gUnknown_020244D0 + ldr r4, =gBattleSpritesDataPtr ldr r0, [r4] ldr r0, [r0, 0x8] strh r7, [r0] @@ -1119,7 +1119,7 @@ task0A_0803415C: @ 805DA48 ldrb r0, [r0] cmp r0, 0 bne _0805DA8A - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r2, [r0] ldr r1, =gTasks lsls r0, r4, 2 @@ -1199,7 +1199,7 @@ move_anim_start_t4: @ 805DAC4 lsls r1, 3 adds r1, r2 strh r4, [r1, 0x8] - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] movs r2, 0x8 ldrsh r1, [r1, r2] @@ -1230,7 +1230,7 @@ task0A_08034248: @ 805DB34 ldrb r0, [r0] cmp r0, 0 bne _0805DB76 - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r2, [r0] ldr r1, =gTasks lsls r0, r4, 2 @@ -1274,7 +1274,7 @@ mplay_80342A4: @ 805DB90 lsls r0, 24 cmp r0, 0 beq _0805DBD8 - ldr r2, =gUnknown_020244D0 + ldr r2, =gBattleSpritesDataPtr ldr r0, [r2] ldr r1, [r0, 0x4] lsls r0, r4, 1 @@ -1307,7 +1307,7 @@ _0805DBDC: b _0805DC02 .pool _0805DBF0: - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r1, [r0, 0x4] lsls r0, r4, 1 @@ -1338,7 +1338,7 @@ sub_805DC0C: @ 805DC0C movs r1, 0 bl GetMonData str r0, [sp] - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r0, [r0] mov r2, r8 @@ -1386,7 +1386,7 @@ _0805DC58: movs r0, 0x80 lsls r0, 1 adds r7, r2, r0 - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r0, [r0] lsls r1, r3, 2 @@ -1444,7 +1444,7 @@ _0805DCC6: movs r2, 0x20 bl LoadPalette _0805DD1A: - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r0, [r0] ldr r1, [sp, 0x4] @@ -1491,7 +1491,7 @@ sub_805DD7C: @ 805DD7C movs r1, 0 bl GetMonData str r0, [sp] - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r0, [r0] mov r2, r8 @@ -1532,7 +1532,7 @@ _0805DDC8: mov r10, r1 cmp r0, 0x1 beq _0805DE00 - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r0, [r0] add r0, r10 @@ -1573,7 +1573,7 @@ _0805DE46: movs r0, 0x80 lsls r0, 1 adds r7, r1, r0 - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r0, [r0] add r0, r10 @@ -1629,7 +1629,7 @@ _0805DE7E: movs r2, 0x20 bl LoadPalette _0805DED2: - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r0, [r0] add r0, r10 @@ -2141,7 +2141,7 @@ _0805E346: thumb_func_start sub_805E350 sub_805E350: @ 805E350 push {r4,lr} - ldr r4, =gUnknown_020244D0 + ldr r4, =gBattleSpritesDataPtr ldr r0, [r4] ldr r0, [r0, 0x4] movs r1, 0 @@ -2162,7 +2162,7 @@ sub_805E350: @ 805E350 sub_805E378: @ 805E378 push {lr} bl sub_805E350 - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r0, [r0] movs r1, 0 @@ -2191,7 +2191,7 @@ sub_805E394: @ 805E394 movs r0, 0x2 negs r0, r0 mov r8, r0 - ldr r7, =gUnknown_020244D0 + ldr r7, =gBattleSpritesDataPtr ldr r6, =gBankSpriteIds _0805E3B8: ldr r0, [r7] @@ -2233,7 +2233,7 @@ _0805E3EA: sub_805E408: @ 805E408 lsls r0, 24 lsrs r0, 24 - ldr r1, =gUnknown_020244D0 + ldr r1, =gBattleSpritesDataPtr ldr r1, [r1] ldr r1, [r1] lsls r3, r0, 2 @@ -2285,7 +2285,7 @@ sub_805E448: @ 805E448 ldr r1, =gSprites mov r8, r1 add r0, r8 - ldr r4, =gUnknown_020244D0 + ldr r4, =gBattleSpritesDataPtr ldr r1, [r4] ldr r1, [r1, 0x8] ldrb r1, [r1] @@ -2582,7 +2582,7 @@ _0805E70A: lsls r0, 24 cmp r0, 0 bne _0805E74A - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r1, [r0] lsls r0, r7, 2 @@ -2804,7 +2804,7 @@ sub_805E94C: @ 805E94C lsrs r1, 16 cmp r1, 0xA4 bne _0805E96C - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r0, [r0] lsls r1, r2, 2 @@ -2822,7 +2822,7 @@ _0805E96C: thumb_func_start sub_805E974 sub_805E974: @ 805E974 lsls r0, 24 - ldr r1, =gUnknown_020244D0 + ldr r1, =gBattleSpritesDataPtr ldr r1, [r1] ldr r1, [r1] lsrs r0, 22 @@ -2862,7 +2862,7 @@ sub_805E990: @ 805E990 lsrs r0, 24 cmp r0, 0x1 bne _0805EA08 - ldr r7, =gUnknown_020244D0 + ldr r7, =gBattleSpritesDataPtr ldr r0, [r7] ldr r2, [r0] lsls r4, r6, 2 @@ -2895,7 +2895,7 @@ _0805E9F6: b _0805EA5A .pool _0805EA08: - ldr r4, =gUnknown_020244D0 + ldr r4, =gBattleSpritesDataPtr ldr r0, [r4] ldr r0, [r0] lsls r1, r6, 2 @@ -2944,7 +2944,7 @@ BattleMusicStop: @ 805EA60 bl GetBankByIdentity lsls r0, 24 lsrs r4, r0, 24 - ldr r5, =gUnknown_020244D0 + ldr r5, =gBattleSpritesDataPtr ldr r0, [r5] ldr r0, [r0] lsls r1, r4, 2 @@ -3134,7 +3134,7 @@ _0805EBC8: mov r7, r8 cmp r7, 0 bne _0805EC3C - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r2, [r0, 0x4] adds r2, r6, r2 @@ -3164,7 +3164,7 @@ _0805EC3C: adds r2, r0 lsls r2, 2 adds r2, r4 - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r0, [r0, 0x4] adds r0, r6, r0 @@ -3229,7 +3229,7 @@ sub_805EC84: @ 805EC84 adds r1, r4, 0 movs r3, 0xC8 bl CreateSprite - ldr r6, =gUnknown_020244D0 + ldr r6, =gBattleSpritesDataPtr ldr r1, [r6] ldr r2, [r1, 0x4] lsls r1, r5, 1 @@ -3351,12 +3351,12 @@ _0805EDC0: _0805EDD2: movs r0, 0x1 mov r8, r0 - ldr r2, =gUnknown_020244D0 + ldr r2, =gBattleSpritesDataPtr lsls r4, 2 b _0805EE06 .pool _0805EDE4: - ldr r2, =gUnknown_020244D0 + ldr r2, =gBattleSpritesDataPtr ldr r0, [r2] ldr r0, [r0] lsls r1, r4, 2 @@ -3431,7 +3431,7 @@ sub_805EE54: @ 805EE54 lsls r0, 24 cmp r0, 0 beq _0805EED0 - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r3, [r0] ldr r1, [r3] lsls r0, r4, 2 @@ -3489,7 +3489,7 @@ sub_805EEE0: @ 805EEE0 lsls r0, 24 lsrs r0, 24 ldr r2, =gSprites - ldr r1, =gUnknown_020244D0 + ldr r1, =gBattleSpritesDataPtr ldr r1, [r1] ldr r3, [r1, 0x4] lsls r1, r0, 1 @@ -3578,7 +3578,7 @@ sub_805EF84: @ 805EF84 lsls r0, 24 lsrs r4, r0, 24 lsls r1, 24 - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r2, [r0] lsls r0, r4, 2 @@ -3708,8 +3708,8 @@ _0805F01A: .pool thumb_func_end AllocateMonSpritesGfx - thumb_func_start sub_805F094 -sub_805F094: @ 805F094 + thumb_func_start FreeMonSpritesGfx +FreeMonSpritesGfx: @ 805F094 push {r4-r6,lr} ldr r6, =gMonSpritesGfxPtr ldr r0, [r6] @@ -3769,7 +3769,7 @@ _0805F106: pop {r0} bx r0 .pool - thumb_func_end sub_805F094 + thumb_func_end FreeMonSpritesGfx thumb_func_start sub_805F110 sub_805F110: @ 805F110 diff --git a/asm/battle_anim.s b/asm/battle_anim.s index b9ab95165..975a7a401 100644 --- a/asm/battle_anim.s +++ b/asm/battle_anim.s @@ -1150,7 +1150,7 @@ _080A4330: lsls r0, 24 cmp r0, 0 bne _080A4374 - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r1, [r0] lsls r0, r5, 2 @@ -2864,7 +2864,7 @@ BattleAnimGetPanControl: @ 80A5178 lsls r0, 24 cmp r0, 0 bne _080A51C0 - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r1, [r0] ldr r0, =gAnimationBankAttacker ldrb r2, [r0] @@ -2986,7 +2986,7 @@ sub_80A5278: @ 80A5278 lsls r0, 24 cmp r0, 0 bne _080A52C0 - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r1, [r0] ldr r0, =gAnimationBankAttacker ldrb r2, [r0] diff --git a/asm/battle_anim_80A9C70.s b/asm/battle_anim_80A9C70.s index 16366988e..ca6572e1a 100644 --- a/asm/battle_anim_80A9C70.s +++ b/asm/battle_anim_80A9C70.s @@ -629,7 +629,7 @@ sub_80AA18C: @ 80AA18C lsls r0, 24 lsrs r4, r0, 24 movs r3, 0 - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r0, [r0, 0x8] ldrh r0, [r0] @@ -899,7 +899,7 @@ task0A_80788BC: @ 80AA3B4 ldrb r0, [r0] cmp r0, 0 bne _080AA3F6 - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r2, [r0] ldr r1, =gTasks lsls r0, r4, 2 diff --git a/asm/battle_anim_80FE840.s b/asm/battle_anim_80FE840.s index 5cec1cbc5..58eb2ebf0 100644 --- a/asm/battle_anim_80FE840.s +++ b/asm/battle_anim_80FE840.s @@ -38602,7 +38602,7 @@ _08111F0C: adds r2, r0 lsls r2, 2 adds r2, r4 - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r1, [r0] ldr r0, =gAnimationBankTarget ldrb r0, [r0] @@ -50163,7 +50163,7 @@ _08117F78: adds r3, r4 lsls r3, 3 adds r3, r0 - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r4, [r0] ldr r2, =gAnimationBankAttacker ldrb r0, [r2] @@ -50207,7 +50207,7 @@ sub_8117FD0: @ 8117FD0 lsls r0, 5 cmp r1, r0 bne _08118014 - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r1, [r0] ldr r0, =gAnimationBankAttacker ldrb r3, [r0] diff --git a/asm/battle_anim_815A0D4.s b/asm/battle_anim_815A0D4.s index 849655fe5..81e4f9163 100755 --- a/asm/battle_anim_815A0D4.s +++ b/asm/battle_anim_815A0D4.s @@ -3250,7 +3250,7 @@ _0815BAB6: cmp r0, 0 bne _0815BAF6 ldrb r0, [r4] - ldr r1, =gUnknown_020244D0 + ldr r1, =gBattleSpritesDataPtr ldr r1, [r1] ldr r2, [r1] lsls r1, r0, 2 @@ -5723,7 +5723,7 @@ _0815CF18: movs r1, 0x1 bl GetMonData mov r8, r0 - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldrb r2, [r4] ldr r1, [r0] @@ -5791,7 +5791,7 @@ _0815CFC4: movs r1, 0x1 bl GetMonData mov r8, r0 - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldrb r2, [r4] ldr r1, [r0] @@ -10637,7 +10637,7 @@ _0815F67C: adds r0, r2 movs r1, 0x2 strh r1, [r0, 0x8] - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r1, [r0] ldr r0, =gAnimationBankTarget ldrb r0, [r0] @@ -10762,7 +10762,7 @@ sub_815F7C4: @ 815F7C4 ble _0815F80E movs r0, 0 strh r0, [r4, 0x30] - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r1, [r0] ldr r0, =gAnimationBankTarget ldrb r0, [r0] @@ -11072,7 +11072,7 @@ _0815FA28: movs r1, 0x1 bl GetMonData mov r9, r0 - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldrb r2, [r4] ldr r1, [r0] @@ -11136,7 +11136,7 @@ _0815FAC8: movs r1, 0x1 bl GetMonData mov r9, r0 - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldrb r2, [r4] ldr r1, [r0] @@ -11202,7 +11202,7 @@ _0815FB50: bl sub_80A8394 lsls r0, 24 lsrs r5, r0, 24 - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r1, [r0] ldrb r0, [r4] ldr r1, [r1] diff --git a/asm/battle_anim_8170478.s b/asm/battle_anim_8170478.s index cb6391cee..dd992a8cd 100644 --- a/asm/battle_anim_8170478.s +++ b/asm/battle_anim_8170478.s @@ -1035,7 +1035,7 @@ sub_8170D4C: @ 8170D4C push {lr} lsls r0, 24 lsrs r2, r0, 24 - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r0, [r0, 0x8] ldrb r0, [r0, 0x8] @@ -1183,7 +1183,7 @@ sub_8170E04: @ 8170E04 adds r4, r0 ldr r0, =sub_8171104 str r0, [r4] - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r3, [r0, 0x8] ldr r1, =gBankSpriteIds @@ -1491,7 +1491,7 @@ sub_8171134: @ 8171134 lsls r0, 24 cmp r0, 0 beq _081711D2 - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r0, [r0, 0x8] ldrb r0, [r0, 0x8] @@ -1894,7 +1894,7 @@ _08171486: adds r0, r1 strh r0, [r4, 0x22] strh r5, [r4, 0x26] - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r0, [r0, 0x8] ldrb r0, [r0, 0x8] @@ -1940,7 +1940,7 @@ sub_81714D4: @ 81714D4 adds r0, r4, 0 movs r1, 0x1 bl StartSpriteAffineAnim - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r0, [r0, 0x8] strh r5, [r0, 0xC] @@ -1982,7 +1982,7 @@ _08171540: .4byte _08171708 .4byte _08171768 _0817155C: - ldr r1, =gUnknown_020244D0 + ldr r1, =gBattleSpritesDataPtr ldr r5, [r1] ldr r2, [r5, 0x8] ldrh r3, [r2, 0xC] @@ -2060,7 +2060,7 @@ _081715EA: bl ChangeSpriteAffineAnim b _081717AE _081715F4: - ldr r1, =gUnknown_020244D0 + ldr r1, =gBattleSpritesDataPtr ldr r5, [r1] ldr r2, [r5, 0x8] ldrh r3, [r2, 0xC] @@ -2152,7 +2152,7 @@ _0817169C: movs r1, 0x1 bl ChangeSpriteAffineAnim _081716A4: - ldr r1, =gUnknown_020244D0 + ldr r1, =gBattleSpritesDataPtr ldr r5, [r1] ldr r2, [r5, 0x8] ldrh r3, [r2, 0xC] @@ -2211,7 +2211,7 @@ _08171708: strh r0, [r4, 0x34] lsls r0, 16 asrs r1, r0, 24 - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r0, [r0, 0x8] ldrb r0, [r0, 0x8] @@ -2859,7 +2859,7 @@ _08171C24: adds r2, r0 lsls r2, 2 adds r2, r4 - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r0, [r0, 0x8] ldrb r1, [r0, 0x9] @@ -3083,7 +3083,7 @@ sub_8171E20: @ 8171E20 ands r0, r1 cmp r0, 0 beq _08171E3E - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r1, [r0, 0x8] ldrb r0, [r1, 0xA] @@ -4419,7 +4419,7 @@ sub_8172944: @ 8172944 b _081729E2 .pool _08172970: - ldr r2, =gUnknown_020244D0 + ldr r2, =gBattleSpritesDataPtr ldr r0, [r2] ldr r1, [r0, 0x8] ldrb r0, [r1, 0xA] @@ -5046,7 +5046,7 @@ sub_8172E9C: @ 8172E9C lsls r0, 24 lsrs r0, 24 ldr r3, =gBattleAnimArgs - ldr r1, =gUnknown_020244D0 + ldr r1, =gBattleSpritesDataPtr ldr r2, [r1] ldr r1, =gAnimationBankAttacker ldrb r1, [r1] @@ -5088,7 +5088,7 @@ sub_8172EF0: @ 8172EF0 lsrs r6, r0, 24 movs r0, 0 mov r8, r0 - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r1, [r0, 0x4] lsls r0, r6, 1 @@ -5169,7 +5169,7 @@ _08172F6E: b _08172FDE .pool _08172FC8: - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r1, [r0, 0x4] lsls r0, r6, 1 @@ -5212,7 +5212,7 @@ sub_8172FEC: @ 8172FEC b _08173190 .pool _08173018: - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r0, [r0, 0x8] ldrb r0, [r0, 0xA] @@ -5414,7 +5414,7 @@ sub_81731B0: @ 81731B0 cmp r0, 0x1 bne _081731EA ldrb r1, [r1, 0x8] - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r2, [r0, 0x4] lsls r0, r1, 1 @@ -5762,7 +5762,7 @@ sub_81734B4: @ 81734B4 push {lr} lsls r0, 24 lsrs r2, r0, 24 - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r0, [r0, 0x8] ldrh r1, [r0] @@ -5813,7 +5813,7 @@ sub_817351C: @ 817351C lsls r0, 24 lsrs r0, 24 ldr r3, =gAnimationBankAttacker - ldr r1, =gUnknown_020244D0 + ldr r1, =gBattleSpritesDataPtr ldr r2, [r1] ldr r1, [r2, 0x8] ldrh r1, [r1] diff --git a/asm/battle_controller_linkopponent.s b/asm/battle_controller_linkopponent.s index a7168623c..58f3b95b7 100644 --- a/asm/battle_controller_linkopponent.s +++ b/asm/battle_controller_linkopponent.s @@ -158,7 +158,7 @@ _080644C2: thumb_func_start sub_80644D8 sub_80644D8: @ 80644D8 push {r4,lr} - ldr r4, =gUnknown_020244D0 + ldr r4, =gBattleSpritesDataPtr ldr r1, [r4] ldr r3, =gActiveBank ldrb r0, [r3] @@ -281,7 +281,7 @@ _080645CA: cmp r0, 0 bne _0806469C _080645DE: - ldr r1, =gUnknown_020244D0 + ldr r1, =gBattleSpritesDataPtr mov r12, r1 ldr r0, [r1] ldr r7, =gActiveBank @@ -364,7 +364,7 @@ _08064600: b _080646F2 .pool _0806469C: - ldr r3, =gUnknown_020244D0 + ldr r3, =gBattleSpritesDataPtr ldr r0, [r3] ldrb r1, [r7] ldr r2, [r0, 0x4] @@ -405,7 +405,7 @@ _0806469C: adds r0, r4, 0 bl FreeSpritePaletteByTag _080646F2: - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r3, =gActiveBank ldrb r1, [r3] @@ -440,7 +440,7 @@ sub_8064734: @ 8064734 push {r5-r7} movs r0, 0 mov r10, r0 - ldr r5, =gUnknown_020244D0 + ldr r5, =gBattleSpritesDataPtr ldr r0, [r5] ldr r4, =gActiveBank ldrb r2, [r4] @@ -497,7 +497,7 @@ _08064776: adds r0, r3, 0 bl sub_8172EF0 _080647B4: - ldr r3, =gUnknown_020244D0 + ldr r3, =gBattleSpritesDataPtr ldr r0, [r3] ldr r2, =gActiveBank ldrb r5, [r2] @@ -591,7 +591,7 @@ _0806484A: ldrb r0, [r0] bl sub_80729D0 _0806487A: - ldr r4, =gUnknown_020244D0 + ldr r4, =gBattleSpritesDataPtr ldr r0, [r4] ldr r3, =gActiveBank ldrb r1, [r3] @@ -673,7 +673,7 @@ _08064930: lsls r2, 1 bl m4aMPlayVolumeControl _0806493C: - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r2, [r0] ldr r0, =gActiveBank ldrb r1, [r0] @@ -735,7 +735,7 @@ _08064998: lsrs r0, 24 cmp r0, 0x3 bne _080649E2 - ldr r3, =gUnknown_020244D0 + ldr r3, =gBattleSpritesDataPtr ldr r0, [r3] ldrb r2, [r5] ldr r0, [r0, 0x4] @@ -828,7 +828,7 @@ _08064A3A: lsrs r1, 16 adds r0, r5, 0 bl sub_805EE54 - ldr r3, =gUnknown_020244D0 + ldr r3, =gBattleSpritesDataPtr ldr r0, [r3] ldr r2, [r0, 0x8] ldrb r1, [r2, 0x9] @@ -900,7 +900,7 @@ sub_8064B04: @ 8064B04 ldrsh r0, [r0, r1] cmp r0, 0 bne _08064BB6 - ldr r6, =gUnknown_020244D0 + ldr r6, =gBattleSpritesDataPtr ldr r0, [r6] ldr r1, [r0, 0x4] lsls r4, r3, 1 @@ -1028,7 +1028,7 @@ _08064C42: thumb_func_start sub_8064C58 sub_8064C58: @ 8064C58 push {r4-r6,lr} - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r6, =gActiveBank ldrb r2, [r6] @@ -1166,7 +1166,7 @@ sub_8064D60: @ 8064D60 ldr r0, =SpriteCallbackDummy cmp r1, r0 bne _08064DAC - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r1, [r0] lsls r0, r3, 2 @@ -1198,7 +1198,7 @@ _08064DAC: thumb_func_start sub_8064DD0 sub_8064DD0: @ 8064DD0 push {r4,lr} - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r4, =gActiveBank ldrb r1, [r4] @@ -1250,7 +1250,7 @@ _08064E2A: thumb_func_start sub_8064E50 sub_8064E50: @ 8064E50 push {r4-r7,lr} - ldr r4, =gUnknown_020244D0 + ldr r4, =gBattleSpritesDataPtr ldr r0, [r4] ldr r5, =gActiveBank ldrb r2, [r5] @@ -1346,7 +1346,7 @@ _08064F0C: thumb_func_start sub_8064F40 sub_8064F40: @ 8064F40 push {r4-r6,lr} - ldr r6, =gUnknown_020244D0 + ldr r6, =gBattleSpritesDataPtr ldr r0, [r6] ldr r5, =gActiveBank ldrb r2, [r5] @@ -1430,7 +1430,7 @@ _08064FDC: thumb_func_start sub_8065008 sub_8065008: @ 8065008 push {lr} - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r2, [r0] ldr r0, =gActiveBank ldrb r1, [r0] @@ -1454,7 +1454,7 @@ _0806502A: thumb_func_start sub_8065038 sub_8065038: @ 8065038 push {lr} - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r2, [r0] ldr r0, =gActiveBank ldrb r1, [r0] @@ -3907,7 +3907,7 @@ sub_8066624: @ 8066624 ldrb r3, [r0] cmp r3, 0 bne _0806666C - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r1, [r0, 0x4] lsls r0, r2, 1 @@ -3959,7 +3959,7 @@ _080666A8: thumb_func_start sub_80666BC sub_80666BC: @ 80666BC push {r4-r6,lr} - ldr r6, =gUnknown_020244D0 + ldr r6, =gBattleSpritesDataPtr ldr r4, [r6] ldr r5, =gActiveBank ldrb r2, [r5] @@ -4589,7 +4589,7 @@ sub_8066B94: @ 8066B94 thumb_func_start sub_8066C40 sub_8066C40: @ 8066C40 push {r4-r6,lr} - ldr r6, =gUnknown_020244D0 + ldr r6, =gBattleSpritesDataPtr ldr r4, [r6] ldr r5, =gActiveBank ldrb r2, [r5] @@ -4816,7 +4816,7 @@ _08066D32: b _08066E58 .pool _08066E30: - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldrb r1, [r5] ldr r2, [r0, 0x4] @@ -4869,7 +4869,7 @@ sub_8066E70: @ 8066E70 adds r1, r2 ldrb r1, [r1] mov r8, r1 - ldr r7, =gUnknown_020244D0 + ldr r7, =gBattleSpritesDataPtr ldr r5, [r7] ldr r1, [r5, 0x4] lsls r0, r3, 1 @@ -4977,7 +4977,7 @@ _08066F32: ands r0, r2 strb r0, [r1] _08066F80: - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r2, [r0] ldr r0, =gActiveBank ldrb r1, [r0] @@ -5244,7 +5244,7 @@ sub_806719C: @ 806719C movs r2, 0x9 bl healthbar_draw_field_maybe ldrb r2, [r4] - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r0, [r0, 0x4] lsls r1, r2, 1 @@ -5718,7 +5718,7 @@ sub_8067508: @ 8067508 adds r1, r4 ldrb r0, [r6] strh r0, [r1, 0x8] - ldr r3, =gUnknown_020244D0 + ldr r3, =gBattleSpritesDataPtr ldr r0, [r3] ldrb r2, [r6] ldr r1, [r0, 0x4] @@ -5893,7 +5893,7 @@ sub_8067718: @ 8067718 b _08067812 .pool _08067748: - ldr r4, =gUnknown_020244D0 + ldr r4, =gBattleSpritesDataPtr ldr r0, [r4] ldr r3, =gActiveBank ldrb r1, [r3] @@ -5960,7 +5960,7 @@ _080677B4: adds r1, r2 movs r3, 0 strb r0, [r1] - ldr r6, =gUnknown_020244D0 + ldr r6, =gBattleSpritesDataPtr ldr r0, [r6] ldrb r1, [r5] ldr r2, [r0, 0x4] @@ -6000,7 +6000,7 @@ _08067812: thumb_func_start sub_806782C sub_806782C: @ 806782C push {r4,lr} - ldr r4, =gUnknown_020244D0 + ldr r4, =gBattleSpritesDataPtr ldr r0, [r4] ldr r3, =gActiveBank ldrb r1, [r3] @@ -6036,7 +6036,7 @@ _08067864: thumb_func_start sub_8067874 sub_8067874: @ 8067874 push {lr} - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r1, [r0] ldr r0, =gActiveBank ldrb r3, [r0] diff --git a/asm/battle_controller_linkpartner.s b/asm/battle_controller_linkpartner.s index 5b0ac0491..562b236d0 100644 --- a/asm/battle_controller_linkpartner.s +++ b/asm/battle_controller_linkpartner.s @@ -131,7 +131,7 @@ _0814AFA4: thumb_func_start sub_814AFBC sub_814AFBC: @ 814AFBC push {r4,lr} - ldr r4, =gUnknown_020244D0 + ldr r4, =gBattleSpritesDataPtr ldr r1, [r4] ldr r3, =gActiveBank ldrb r0, [r3] @@ -239,7 +239,7 @@ _0814B094: _0814B0A0: cmp r6, 0 beq _0814B0C6 - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r3, =gActiveBank ldrb r1, [r3] @@ -270,7 +270,7 @@ sub_814B0E8: @ 814B0E8 mov r6, r9 mov r5, r8 push {r5-r7} - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr mov r12, r0 ldr r0, [r0] ldr r7, =gActiveBank @@ -426,7 +426,7 @@ _0814B1F0: adds r0, r5 ldrb r0, [r0] bl sub_80729D0 - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r2, [r0, 0x8] ldrb r1, [r2, 0x9] @@ -599,7 +599,7 @@ _0814B3BC: thumb_func_start sub_814B3DC sub_814B3DC: @ 814B3DC push {r4-r6,lr} - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r6, =gActiveBank ldrb r2, [r6] @@ -737,7 +737,7 @@ sub_814B4E0: @ 814B4E0 bne _0814B532 adds r0, r3, 0 bl sub_805E408 - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldrb r2, [r4] ldr r1, [r0] @@ -769,7 +769,7 @@ _0814B532: thumb_func_start sub_814B554 sub_814B554: @ 814B554 push {lr} - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r1, [r0] ldr r0, =gActiveBank ldrb r3, [r0] @@ -808,7 +808,7 @@ sub_814B5A8: @ 814B5A8 push {r4-r7,lr} mov r7, r8 push {r7} - ldr r3, =gUnknown_020244D0 + ldr r3, =gBattleSpritesDataPtr ldr r0, [r3] ldr r7, =gActiveBank ldrb r1, [r7] @@ -903,7 +903,7 @@ _0814B664: thumb_func_start sub_814B69C sub_814B69C: @ 814B69C push {r4-r6,lr} - ldr r6, =gUnknown_020244D0 + ldr r6, =gBattleSpritesDataPtr ldr r0, [r6] ldr r4, =gActiveBank ldrb r2, [r4] @@ -1021,7 +1021,7 @@ _0814B7A6: thumb_func_start sub_814B7B8 sub_814B7B8: @ 814B7B8 push {lr} - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r2, [r0] ldr r0, =gActiveBank ldrb r1, [r0] @@ -1045,7 +1045,7 @@ _0814B7DA: thumb_func_start sub_814B7E8 sub_814B7E8: @ 814B7E8 push {lr} - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r2, [r0] ldr r0, =gActiveBank ldrb r1, [r0] @@ -3476,7 +3476,7 @@ sub_814CE14: @ 814CE14 ldrb r3, [r0] cmp r3, 0 bne _0814CE5C - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r1, [r0, 0x4] lsls r0, r2, 1 @@ -3526,7 +3526,7 @@ _0814CE92: thumb_func_start sub_814CEA4 sub_814CEA4: @ 814CEA4 push {r4-r6,lr} - ldr r6, =gUnknown_020244D0 + ldr r6, =gBattleSpritesDataPtr ldr r4, [r6] ldr r5, =gActiveBank ldrb r2, [r5] @@ -3870,7 +3870,7 @@ sub_814D0F0: @ 814D0F0 thumb_func_start sub_814D19C sub_814D19C: @ 814D19C push {r4-r6,lr} - ldr r6, =gUnknown_020244D0 + ldr r6, =gBattleSpritesDataPtr ldr r4, [r6] ldr r5, =gActiveBank ldrb r2, [r5] @@ -4125,7 +4125,7 @@ _0814D2CE: b _0814D3F4 .pool _0814D3CC: - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldrb r1, [r5] ldr r2, [r0, 0x4] @@ -4178,7 +4178,7 @@ bx_move_anim_4: @ 814D40C adds r1, r2 ldrb r1, [r1] mov r8, r1 - ldr r7, =gUnknown_020244D0 + ldr r7, =gBattleSpritesDataPtr ldr r5, [r7] ldr r1, [r5, 0x4] lsls r0, r3, 1 @@ -4286,7 +4286,7 @@ _0814D4CE: ands r0, r2 strb r0, [r1] _0814D51C: - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r2, [r0] ldr r0, =gActiveBank ldrb r1, [r0] @@ -4553,7 +4553,7 @@ sub_814D738: @ 814D738 movs r2, 0x9 bl healthbar_draw_field_maybe ldrb r2, [r4] - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r0, [r0, 0x4] lsls r1, r2, 1 @@ -5147,7 +5147,7 @@ _0814DC06: adds r1, r4 ldrb r0, [r5] strh r0, [r1, 0x8] - ldr r3, =gUnknown_020244D0 + ldr r3, =gBattleSpritesDataPtr ldr r0, [r3] ldrb r2, [r5] ldr r1, [r0, 0x4] @@ -5326,7 +5326,7 @@ sub_814DDD8: @ 814DDD8 b _0814DE7C .pool _0814DE08: - ldr r6, =gUnknown_020244D0 + ldr r6, =gBattleSpritesDataPtr ldr r0, [r6] ldr r5, =gActiveBank ldrb r1, [r5] @@ -5394,7 +5394,7 @@ _0814DE7C: thumb_func_start sub_814DE9C sub_814DE9C: @ 814DE9C push {r4,lr} - ldr r4, =gUnknown_020244D0 + ldr r4, =gBattleSpritesDataPtr ldr r0, [r4] ldr r3, =gActiveBank ldrb r1, [r3] @@ -5430,7 +5430,7 @@ _0814DED4: thumb_func_start sub_814DEE4 sub_814DEE4: @ 814DEE4 push {lr} - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r1, [r0] ldr r0, =gActiveBank ldrb r3, [r0] diff --git a/asm/battle_controller_opponent.s b/asm/battle_controller_opponent.s index f54896ca7..066a0ceab 100644 --- a/asm/battle_controller_opponent.s +++ b/asm/battle_controller_opponent.s @@ -158,7 +158,7 @@ _0805F292: thumb_func_start sub_805F2A8 sub_805F2A8: @ 805F2A8 push {r4,lr} - ldr r4, =gUnknown_020244D0 + ldr r4, =gBattleSpritesDataPtr ldr r1, [r4] ldr r3, =gActiveBank ldrb r0, [r3] @@ -277,7 +277,7 @@ _0805F3A0: movs r6, 0x1 _0805F3A2: ldr r3, =gUnknown_020244D8 - ldr r1, =gUnknown_020244D0 + ldr r1, =gBattleSpritesDataPtr mov r8, r1 ldr r2, [r1] ldr r7, =gActiveBank @@ -449,7 +449,7 @@ _0805F4E4: ands r0, r2 strb r0, [r1, 0x1] _0805F51A: - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r3, =gActiveBank ldrb r1, [r3] @@ -488,7 +488,7 @@ sub_805F560: @ 805F560 movs r0, 0 str r0, [sp] mov r10, r0 - ldr r5, =gUnknown_020244D0 + ldr r5, =gBattleSpritesDataPtr ldr r0, [r5] ldr r4, =gActiveBank ldrb r2, [r4] @@ -549,7 +549,7 @@ _0805F5A6: adds r0, r3, 0 bl sub_8172EF0 _0805F5EE: - ldr r2, =gUnknown_020244D0 + ldr r2, =gBattleSpritesDataPtr ldr r0, [r2] ldr r1, =gActiveBank mov r8, r1 @@ -643,7 +643,7 @@ _0805F684: ldrb r0, [r0] bl sub_80729D0 _0805F6B4: - ldr r3, =gUnknown_020244D0 + ldr r3, =gBattleSpritesDataPtr ldr r2, [r3] ldr r0, =gActiveBank ldrb r1, [r0] @@ -723,7 +723,7 @@ _0805F768: lsls r2, 1 bl m4aMPlayVolumeControl _0805F774: - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r2, [r0] ldr r0, =gActiveBank ldrb r1, [r0] @@ -906,7 +906,7 @@ _0805F8D2: lsrs r1, 16 adds r0, r5, 0 bl sub_805EE54 - ldr r3, =gUnknown_020244D0 + ldr r3, =gBattleSpritesDataPtr ldr r0, [r3] ldr r2, [r0, 0x8] ldrb r1, [r2, 0x9] @@ -972,7 +972,7 @@ sub_805F994: @ 805F994 ldrsh r0, [r0, r1] cmp r0, 0 bne _0805F9E0 - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r1, [r0, 0x4] lsls r2, r3, 1 @@ -1010,7 +1010,7 @@ _0805F9E0: ldr r0, =SpriteCallbackDummy cmp r1, r0 bne _0805FA48 - ldr r4, =gUnknown_020244D0 + ldr r4, =gBattleSpritesDataPtr ldr r0, [r4] ldr r1, [r0, 0x4] lsls r0, r3, 1 @@ -1122,7 +1122,7 @@ _0805FAF2: thumb_func_start sub_805FB08 sub_805FB08: @ 805FB08 push {r4-r6,lr} - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r6, =gActiveBank ldrb r2, [r6] @@ -1260,7 +1260,7 @@ sub_805FC10: @ 805FC10 ldr r0, =SpriteCallbackDummy cmp r1, r0 bne _0805FC5C - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r1, [r0] lsls r0, r3, 2 @@ -1292,7 +1292,7 @@ _0805FC5C: thumb_func_start bx_803AEDC bx_803AEDC: @ 805FC80 push {r4,lr} - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r4, =gActiveBank ldrb r1, [r4] @@ -1344,7 +1344,7 @@ _0805FCDA: thumb_func_start sub_805FD00 sub_805FD00: @ 805FD00 push {r4-r7,lr} - ldr r4, =gUnknown_020244D0 + ldr r4, =gBattleSpritesDataPtr ldr r0, [r4] ldr r5, =gActiveBank ldrb r2, [r5] @@ -1440,7 +1440,7 @@ _0805FDBC: thumb_func_start sub_805FDF0 sub_805FDF0: @ 805FDF0 push {r4-r6,lr} - ldr r6, =gUnknown_020244D0 + ldr r6, =gBattleSpritesDataPtr ldr r0, [r6] ldr r5, =gActiveBank ldrb r2, [r5] @@ -1524,7 +1524,7 @@ _0805FE8C: thumb_func_start sub_805FEB8 sub_805FEB8: @ 805FEB8 push {lr} - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r2, [r0] ldr r0, =gActiveBank ldrb r1, [r0] @@ -1548,7 +1548,7 @@ _0805FEDA: thumb_func_start bx_803B0F4 bx_803B0F4: @ 805FEE8 push {lr} - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r2, [r0] ldr r0, =gActiveBank ldrb r1, [r0] @@ -4069,7 +4069,7 @@ sub_806156C: @ 806156C ldrb r3, [r0] cmp r3, 0 bne _080615B4 - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r1, [r0, 0x4] lsls r0, r2, 1 @@ -4121,7 +4121,7 @@ _080615F0: thumb_func_start sub_8061604 sub_8061604: @ 8061604 push {r4-r6,lr} - ldr r6, =gUnknown_020244D0 + ldr r6, =gBattleSpritesDataPtr ldr r4, [r6] ldr r5, =gActiveBank ldrb r2, [r5] @@ -4741,7 +4741,7 @@ sub_8061AF0: @ 8061AF0 thumb_func_start sub_8061B9C sub_8061B9C: @ 8061B9C push {r4-r6,lr} - ldr r6, =gUnknown_020244D0 + ldr r6, =gBattleSpritesDataPtr ldr r4, [r6] ldr r5, =gActiveBank ldrb r2, [r5] @@ -4962,7 +4962,7 @@ _08061C8A: b _08061D9E .pool _08061D80: - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldrb r1, [r6] ldr r2, [r0, 0x4] @@ -5009,7 +5009,7 @@ bx_move_anim_7: @ 8061DB0 adds r1, r2 ldrb r1, [r1] mov r8, r1 - ldr r7, =gUnknown_020244D0 + ldr r7, =gBattleSpritesDataPtr ldr r5, [r7] ldr r1, [r5, 0x4] lsls r0, r3, 1 @@ -5117,7 +5117,7 @@ _08061E72: ands r0, r2 strb r0, [r1] _08061EC0: - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r2, [r0] ldr r0, =gActiveBank ldrb r1, [r0] @@ -5694,7 +5694,7 @@ sub_8062390: @ 8062390 movs r2, 0x9 bl healthbar_draw_field_maybe ldrb r2, [r4] - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r0, [r0, 0x4] lsls r1, r2, 1 @@ -6168,7 +6168,7 @@ sub_80626FC: @ 80626FC adds r1, r4 ldrb r0, [r6] strh r0, [r1, 0x8] - ldr r3, =gUnknown_020244D0 + ldr r3, =gBattleSpritesDataPtr ldr r0, [r3] ldrb r2, [r6] ldr r1, [r0, 0x4] @@ -6348,7 +6348,7 @@ dp01t_30_7_0803D67C: @ 8062918 b _08062A12 .pool _08062948: - ldr r4, =gUnknown_020244D0 + ldr r4, =gBattleSpritesDataPtr ldr r0, [r4] ldr r3, =gActiveBank ldrb r1, [r3] @@ -6415,7 +6415,7 @@ _080629B4: adds r1, r2 movs r3, 0 strb r0, [r1] - ldr r6, =gUnknown_020244D0 + ldr r6, =gBattleSpritesDataPtr ldr r0, [r6] ldrb r1, [r5] ldr r2, [r0, 0x4] @@ -6455,7 +6455,7 @@ _08062A12: thumb_func_start bx_0803D790_t7 bx_0803D790_t7: @ 8062A2C push {r4,lr} - ldr r4, =gUnknown_020244D0 + ldr r4, =gBattleSpritesDataPtr ldr r0, [r4] ldr r3, =gActiveBank ldrb r1, [r3] @@ -6491,7 +6491,7 @@ _08062A64: thumb_func_start sub_8062A74 sub_8062A74: @ 8062A74 push {lr} - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r1, [r0] ldr r0, =gActiveBank ldrb r3, [r0] diff --git a/asm/battle_controller_player.s b/asm/battle_controller_player.s index b829296d8..b47a8ecdf 100644 --- a/asm/battle_controller_player.s +++ b/asm/battle_controller_player.s @@ -2344,7 +2344,7 @@ _08058908: thumb_func_start sub_8058924 sub_8058924: @ 8058924 push {r4,lr} - ldr r4, =gUnknown_020244D0 + ldr r4, =gBattleSpritesDataPtr ldr r1, [r4] ldr r3, =gActiveBank ldrb r0, [r3] @@ -2452,7 +2452,7 @@ _08058A0A: cmp r7, 0 beq _08058B08 _08058A0E: - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr mov r9, r0 ldr r0, [r0] mov r6, r10 @@ -2593,7 +2593,7 @@ sub_8058B40: @ 8058B40 movs r0, 0 mov r9, r0 mov r8, r0 - ldr r4, =gUnknown_020244D0 + ldr r4, =gBattleSpritesDataPtr ldr r0, [r4] ldr r7, =gActiveBank ldrb r2, [r7] @@ -2729,7 +2729,7 @@ _08058C38: ldrb r0, [r0] bl sub_80729D0 _08058C68: - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r2, [r0] ldr r0, =gActiveBank ldrb r1, [r0] @@ -2743,7 +2743,7 @@ _08058C68: orrs r1, r2 strb r1, [r0, 0x1] _08058C82: - ldr r5, =gUnknown_020244D0 + ldr r5, =gBattleSpritesDataPtr ldr r0, [r5] ldr r4, =gActiveBank ldrb r2, [r4] @@ -2801,7 +2801,7 @@ _08058D08: lsls r2, 1 bl m4aMPlayVolumeControl _08058D14: - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r2, [r0] ldr r0, =gActiveBank ldrb r1, [r0] @@ -2950,7 +2950,7 @@ _08058E48: ldr r1, =gSprites adds r0, r1 bl DestroySprite - ldr r3, =gUnknown_020244D0 + ldr r3, =gBattleSpritesDataPtr ldr r0, [r3] ldr r2, [r0, 0x8] ldrb r1, [r2, 0x9] @@ -3015,7 +3015,7 @@ sub_8058EDC: @ 8058EDC ldr r0, =SpriteCallbackDummy cmp r4, r0 bne _08058F94 - ldr r5, =gUnknown_020244D0 + ldr r5, =gBattleSpritesDataPtr ldr r0, [r5] ldr r1, [r0, 0x4] lsls r0, r3, 1 @@ -3098,7 +3098,7 @@ _08058F94: thumb_func_start sub_8058FC0 sub_8058FC0: @ 8058FC0 push {r4,lr} - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r4, =gActiveBank ldrb r1, [r4] @@ -3142,7 +3142,7 @@ _0805900E: thumb_func_start sub_805902C sub_805902C: @ 805902C push {r4-r6,lr} - ldr r6, =gUnknown_020244D0 + ldr r6, =gBattleSpritesDataPtr ldr r0, [r6] ldr r5, =gActiveBank ldrb r2, [r5] @@ -3774,7 +3774,7 @@ sub_80595A4: @ 80595A4 lsls r0, 3 adds r2, r0, r1 ldrb r5, [r2, 0xC] - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r1, [r0, 0x4] lsls r0, r5, 1 @@ -3942,7 +3942,7 @@ _08059724: thumb_func_start sub_8059744 sub_8059744: @ 8059744 push {r4-r6,lr} - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r6, =gActiveBank ldrb r2, [r6] @@ -4145,7 +4145,7 @@ bx_wait_t1: @ 805991C ldrb r0, [r0] cmp r0, 0 beq _08059942 - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r2, [r0] ldr r0, =gActiveBank ldrb r1, [r0] @@ -4657,7 +4657,7 @@ sub_8059D50: @ 8059D50 thumb_func_start sub_8059D60 sub_8059D60: @ 8059D60 push {lr} - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r2, [r0] ldr r0, =gActiveBank ldrb r1, [r0] @@ -4681,7 +4681,7 @@ _08059D82: thumb_func_start bx_8030B2C bx_8030B2C: @ 8059D90 push {lr} - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r2, [r0] ldr r0, =gActiveBank ldrb r1, [r0] @@ -7124,7 +7124,7 @@ sub_805B3D4: @ 805B3D4 ldrb r3, [r0] cmp r3, 0 bne _0805B41C - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r1, [r0, 0x4] lsls r0, r2, 1 @@ -7174,7 +7174,7 @@ _0805B452: thumb_func_start sub_805B464 sub_805B464: @ 805B464 push {r4-r6,lr} - ldr r6, =gUnknown_020244D0 + ldr r6, =gBattleSpritesDataPtr ldr r4, [r6] ldr r5, =gActiveBank ldrb r2, [r5] @@ -7890,7 +7890,7 @@ sub_805B9F8: @ 805B9F8 thumb_func_start sub_805BAB8 sub_805BAB8: @ 805BAB8 push {r4-r6,lr} - ldr r6, =gUnknown_020244D0 + ldr r6, =gBattleSpritesDataPtr ldr r4, [r6] ldr r5, =gActiveBank ldrb r2, [r5] @@ -8013,7 +8013,7 @@ sub_805BBA4: @ 805BBA4 thumb_func_start sub_805BBC4 sub_805BBC4: @ 805BBC4 push {r4,r5,lr} - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r1, [r0, 0x8] movs r0, 0x4 @@ -8054,7 +8054,7 @@ sub_805BC18: @ 805BC18 adds r1, 0x1 adds r0, r1 ldrb r1, [r0] - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r0, [r0, 0x8] strb r1, [r0, 0x8] @@ -8229,7 +8229,7 @@ _0805BCBE: b _0805BDE4 .pool _0805BDBC: - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldrb r1, [r5] ldr r2, [r0, 0x4] @@ -8282,7 +8282,7 @@ bx_move_anim_1: @ 805BDFC adds r1, r2 ldrb r1, [r1] mov r8, r1 - ldr r7, =gUnknown_020244D0 + ldr r7, =gBattleSpritesDataPtr ldr r5, [r7] ldr r1, [r5, 0x4] lsls r0, r3, 1 @@ -8390,7 +8390,7 @@ _0805BEBE: ands r0, r2 strb r0, [r1] _0805BF0C: - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r2, [r0] ldr r0, =gActiveBank ldrb r1, [r0] @@ -9132,7 +9132,7 @@ sub_805C5C4: @ 805C5C4 movs r2, 0x9 bl healthbar_draw_field_maybe ldrb r2, [r4] - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r0, [r0, 0x4] lsls r1, r2, 1 @@ -9794,7 +9794,7 @@ dp01t_2F_1_pokemon_enter: @ 805CA80 adds r1, r4 ldrb r0, [r7] strh r0, [r1, 0x8] - ldr r3, =gUnknown_020244D0 + ldr r3, =gBattleSpritesDataPtr ldr r0, [r3] ldrb r2, [r7] ldr r1, [r0, 0x4] @@ -10015,7 +10015,7 @@ sub_805CD74: @ 805CD74 b _0805CE18 .pool _0805CDA4: - ldr r6, =gUnknown_020244D0 + ldr r6, =gBattleSpritesDataPtr ldr r0, [r6] ldr r5, =gActiveBank ldrb r1, [r5] @@ -10083,7 +10083,7 @@ _0805CE18: thumb_func_start sub_805CE38 sub_805CE38: @ 805CE38 push {r4,lr} - ldr r4, =gUnknown_020244D0 + ldr r4, =gBattleSpritesDataPtr ldr r0, [r4] ldr r3, =gActiveBank ldrb r1, [r3] @@ -10119,7 +10119,7 @@ _0805CE70: thumb_func_start sub_805CE80 sub_805CE80: @ 805CE80 push {lr} - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r1, [r0] ldr r0, =gActiveBank ldrb r3, [r0] diff --git a/asm/battle_controller_player_partner.s b/asm/battle_controller_player_partner.s index 185b8d5ca..c0ea9b87f 100644 --- a/asm/battle_controller_player_partner.s +++ b/asm/battle_controller_player_partner.s @@ -132,7 +132,7 @@ _081BAEE8: thumb_func_start sub_81BAF00 sub_81BAF00: @ 81BAF00 push {r4,lr} - ldr r4, =gUnknown_020244D0 + ldr r4, =gBattleSpritesDataPtr ldr r1, [r4] ldr r3, =gActiveBank ldrb r0, [r3] @@ -240,7 +240,7 @@ _081BAFD8: _081BAFE4: cmp r6, 0 beq _081BB00A - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r3, =gActiveBank ldrb r1, [r3] @@ -271,7 +271,7 @@ sub_81BB02C: @ 81BB02C mov r6, r9 mov r5, r8 push {r5-r7} - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr mov r12, r0 ldr r0, [r0] ldr r7, =gActiveBank @@ -427,7 +427,7 @@ _081BB134: adds r0, r5 ldrb r0, [r0] bl sub_80729D0 - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r2, [r0, 0x8] ldrb r1, [r2, 0x9] @@ -1006,7 +1006,7 @@ sub_81BB688: @ 81BB688 lsls r0, 3 adds r2, r0, r1 ldrb r5, [r2, 0xC] - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r1, [r0, 0x4] lsls r0, r5, 1 @@ -1174,7 +1174,7 @@ _081BB808: thumb_func_start sub_81BB828 sub_81BB828: @ 81BB828 push {r4-r6,lr} - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r6, =gActiveBank ldrb r2, [r6] @@ -1312,7 +1312,7 @@ sub_81BB92C: @ 81BB92C bne _081BB97E adds r0, r3, 0 bl sub_805E408 - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldrb r2, [r4] ldr r1, [r0] @@ -1344,7 +1344,7 @@ _081BB97E: thumb_func_start dp01t_35_3_free_vram dp01t_35_3_free_vram: @ 81BB9A0 push {lr} - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r1, [r0] ldr r0, =gActiveBank ldrb r3, [r0] @@ -1383,7 +1383,7 @@ sub_81BB9F4: @ 81BB9F4 push {r4-r7,lr} mov r7, r8 push {r7} - ldr r3, =gUnknown_020244D0 + ldr r3, =gBattleSpritesDataPtr ldr r0, [r3] ldr r7, =gActiveBank ldrb r1, [r7] @@ -1478,7 +1478,7 @@ _081BBAB0: thumb_func_start sub_81BBAE8 sub_81BBAE8: @ 81BBAE8 push {r4-r6,lr} - ldr r6, =gUnknown_020244D0 + ldr r6, =gBattleSpritesDataPtr ldr r0, [r6] ldr r4, =gActiveBank ldrb r2, [r4] @@ -1596,7 +1596,7 @@ _081BBBF2: thumb_func_start sub_81BBC04 sub_81BBC04: @ 81BBC04 push {lr} - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r2, [r0] ldr r0, =gActiveBank ldrb r1, [r0] @@ -1620,7 +1620,7 @@ _081BBC26: thumb_func_start bx_80E8A6C bx_80E8A6C: @ 81BBC34 push {lr} - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r2, [r0] ldr r0, =gActiveBank ldrb r1, [r0] @@ -4051,7 +4051,7 @@ sub_81BD260: @ 81BD260 ldrb r3, [r0] cmp r3, 0 bne _081BD2A8 - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r1, [r0, 0x4] lsls r0, r2, 1 @@ -4101,7 +4101,7 @@ _081BD2DE: thumb_func_start sub_81BD2F0 sub_81BD2F0: @ 81BD2F0 push {r4-r6,lr} - ldr r6, =gUnknown_020244D0 + ldr r6, =gBattleSpritesDataPtr ldr r4, [r6] ldr r5, =gActiveBank ldrb r2, [r5] @@ -4494,7 +4494,7 @@ sub_81BD5C8: @ 81BD5C8 thumb_func_start sub_81BD674 sub_81BD674: @ 81BD674 push {r4-r6,lr} - ldr r6, =gUnknown_020244D0 + ldr r6, =gBattleSpritesDataPtr ldr r4, [r6] ldr r5, =gActiveBank ldrb r2, [r5] @@ -4743,7 +4743,7 @@ _081BD7A2: b _081BD8B6 .pool _081BD898: - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldrb r1, [r6] ldr r2, [r0, 0x4] @@ -4790,7 +4790,7 @@ bx_move_anim_3: @ 81BD8C8 adds r1, r2 ldrb r1, [r1] mov r8, r1 - ldr r7, =gUnknown_020244D0 + ldr r7, =gBattleSpritesDataPtr ldr r5, [r7] ldr r1, [r5, 0x4] lsls r0, r3, 1 @@ -4898,7 +4898,7 @@ _081BD98A: ands r0, r2 strb r0, [r1] _081BD9D8: - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r2, [r0] ldr r0, =gActiveBank ldrb r1, [r0] @@ -5340,7 +5340,7 @@ sub_81BDD9C: @ 81BDD9C movs r2, 0x9 bl healthbar_draw_field_maybe ldrb r2, [r4] - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r0, [r0, 0x4] lsls r1, r2, 1 @@ -5880,7 +5880,7 @@ _081BE21A: adds r1, r4 ldrb r0, [r5] strh r0, [r1, 0x8] - ldr r3, =gUnknown_020244D0 + ldr r3, =gBattleSpritesDataPtr ldr r0, [r3] ldrb r2, [r5] ldr r1, [r0, 0x4] @@ -6059,7 +6059,7 @@ dp01t_30_3_80EB11C: @ 81BE3D4 b _081BE478 .pool _081BE404: - ldr r6, =gUnknown_020244D0 + ldr r6, =gBattleSpritesDataPtr ldr r0, [r6] ldr r5, =gActiveBank ldrb r1, [r5] @@ -6127,7 +6127,7 @@ _081BE478: thumb_func_start sub_81BE498 sub_81BE498: @ 81BE498 push {r4,lr} - ldr r4, =gUnknown_020244D0 + ldr r4, =gBattleSpritesDataPtr ldr r0, [r4] ldr r3, =gActiveBank ldrb r1, [r3] @@ -6163,7 +6163,7 @@ _081BE4D0: thumb_func_start sub_81BE4E0 sub_81BE4E0: @ 81BE4E0 push {lr} - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r1, [r0] ldr r0, =gActiveBank ldrb r3, [r0] diff --git a/asm/battle_controller_recorded_opponent.s b/asm/battle_controller_recorded_opponent.s index 5c420158a..0d9bb2331 100644 --- a/asm/battle_controller_recorded_opponent.s +++ b/asm/battle_controller_recorded_opponent.s @@ -157,7 +157,7 @@ _0818661A: thumb_func_start sub_8186630 sub_8186630: @ 8186630 push {r4,lr} - ldr r4, =gUnknown_020244D0 + ldr r4, =gBattleSpritesDataPtr ldr r1, [r4] ldr r3, =gActiveBank ldrb r0, [r3] @@ -311,7 +311,7 @@ _0818676A: lsrs r3, r0, 24 cmp r3, 0x1 bne _08186816 - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr mov r12, r0 ldr r0, [r0] ldrb r2, [r6] @@ -388,7 +388,7 @@ _0818676A: adds r0, r4, 0 bl FreeSpritePaletteByTag _08186816: - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] mov r2, r8 ldrb r1, [r2] @@ -425,7 +425,7 @@ sub_818686C: @ 818686C movs r0, 0 mov r9, r0 mov r8, r0 - ldr r4, =gUnknown_020244D0 + ldr r4, =gBattleSpritesDataPtr ldr r0, [r4] ldr r7, =gActiveBank ldrb r2, [r7] @@ -561,7 +561,7 @@ _08186964: ldrb r0, [r0] bl sub_80729D0 _08186994: - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r2, [r0] ldr r0, =gActiveBank ldrb r1, [r0] @@ -575,7 +575,7 @@ _08186994: orrs r1, r2 strb r1, [r0, 0x1] _081869AE: - ldr r5, =gUnknown_020244D0 + ldr r5, =gBattleSpritesDataPtr ldr r0, [r5] ldr r4, =gActiveBank ldrb r2, [r4] @@ -639,7 +639,7 @@ _08186A40: lsls r2, 1 bl m4aMPlayVolumeControl _08186A4C: - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r2, [r0] ldr r0, =gActiveBank ldrb r1, [r0] @@ -810,7 +810,7 @@ _08186B8A: lsrs r1, 16 adds r0, r5, 0 bl sub_805EE54 - ldr r3, =gUnknown_020244D0 + ldr r3, =gBattleSpritesDataPtr ldr r0, [r3] ldr r2, [r0, 0x8] ldrb r1, [r2, 0x9] @@ -881,7 +881,7 @@ sub_8186C48: @ 8186C48 ldrsh r0, [r0, r1] cmp r0, 0 bne _08186CFA - ldr r6, =gUnknown_020244D0 + ldr r6, =gBattleSpritesDataPtr ldr r0, [r6] ldr r1, [r0, 0x4] lsls r4, r3, 1 @@ -1009,7 +1009,7 @@ _08186D86: thumb_func_start sub_8186D9C sub_8186D9C: @ 8186D9C push {r4-r6,lr} - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r6, =gActiveBank ldrb r2, [r6] @@ -1147,7 +1147,7 @@ sub_8186EA4: @ 8186EA4 ldr r0, =SpriteCallbackDummy cmp r1, r0 bne _08186EF0 - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r1, [r0] lsls r0, r3, 2 @@ -1179,7 +1179,7 @@ _08186EF0: thumb_func_start sub_8186F14 sub_8186F14: @ 8186F14 push {r4,lr} - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r4, =gActiveBank ldrb r1, [r4] @@ -1231,7 +1231,7 @@ _08186F6E: thumb_func_start sub_8186F94 sub_8186F94: @ 8186F94 push {r4-r7,lr} - ldr r4, =gUnknown_020244D0 + ldr r4, =gBattleSpritesDataPtr ldr r0, [r4] ldr r5, =gActiveBank ldrb r2, [r5] @@ -1327,7 +1327,7 @@ _08187050: thumb_func_start sub_8187084 sub_8187084: @ 8187084 push {r4-r6,lr} - ldr r6, =gUnknown_020244D0 + ldr r6, =gBattleSpritesDataPtr ldr r0, [r6] ldr r5, =gActiveBank ldrb r2, [r5] @@ -1411,7 +1411,7 @@ _08187120: thumb_func_start sub_818714C sub_818714C: @ 818714C push {lr} - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r2, [r0] ldr r0, =gActiveBank ldrb r1, [r0] @@ -1435,7 +1435,7 @@ _0818716E: thumb_func_start sub_818717C sub_818717C: @ 818717C push {lr} - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r2, [r0] ldr r0, =gActiveBank ldrb r1, [r0] @@ -3888,7 +3888,7 @@ sub_8188768: @ 8188768 ldrb r3, [r0] cmp r3, 0 bne _081887B0 - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r1, [r0, 0x4] lsls r0, r2, 1 @@ -3940,7 +3940,7 @@ _081887EC: thumb_func_start sub_8188800 sub_8188800: @ 8188800 push {r4-r6,lr} - ldr r6, =gUnknown_020244D0 + ldr r6, =gBattleSpritesDataPtr ldr r4, [r6] ldr r5, =gActiveBank ldrb r2, [r5] @@ -4278,7 +4278,7 @@ sub_8188A4C: @ 8188A4C thumb_func_start sub_8188AF8 sub_8188AF8: @ 8188AF8 push {r4-r6,lr} - ldr r6, =gUnknown_020244D0 + ldr r6, =gBattleSpritesDataPtr ldr r4, [r6] ldr r5, =gActiveBank ldrb r2, [r5] @@ -4499,7 +4499,7 @@ _08188BE6: b _08188CFA .pool _08188CDC: - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldrb r1, [r6] ldr r2, [r0, 0x4] @@ -4546,7 +4546,7 @@ sub_8188D0C: @ 8188D0C adds r1, r2 ldrb r1, [r1] mov r8, r1 - ldr r7, =gUnknown_020244D0 + ldr r7, =gBattleSpritesDataPtr ldr r5, [r7] ldr r1, [r5, 0x4] lsls r0, r3, 1 @@ -4654,7 +4654,7 @@ _08188DCE: ands r0, r2 strb r0, [r1] _08188E1C: - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r2, [r0] ldr r0, =gActiveBank ldrb r1, [r0] @@ -4983,7 +4983,7 @@ sub_81890CC: @ 81890CC movs r2, 0x9 bl healthbar_draw_field_maybe ldrb r2, [r4] - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r0, [r0, 0x4] lsls r1, r2, 1 @@ -5457,7 +5457,7 @@ sub_8189438: @ 8189438 adds r1, r4 ldrb r0, [r6] strh r0, [r1, 0x8] - ldr r3, =gUnknown_020244D0 + ldr r3, =gBattleSpritesDataPtr ldr r0, [r3] ldrb r2, [r6] ldr r1, [r0, 0x4] @@ -5632,7 +5632,7 @@ sub_8189648: @ 8189648 b _08189742 .pool _08189678: - ldr r4, =gUnknown_020244D0 + ldr r4, =gBattleSpritesDataPtr ldr r0, [r4] ldr r3, =gActiveBank ldrb r1, [r3] @@ -5699,7 +5699,7 @@ _081896E4: adds r1, r2 movs r3, 0 strb r0, [r1] - ldr r6, =gUnknown_020244D0 + ldr r6, =gBattleSpritesDataPtr ldr r0, [r6] ldrb r1, [r5] ldr r2, [r0, 0x4] @@ -5739,7 +5739,7 @@ _08189742: thumb_func_start sub_818975C sub_818975C: @ 818975C push {r4,lr} - ldr r4, =gUnknown_020244D0 + ldr r4, =gBattleSpritesDataPtr ldr r0, [r4] ldr r3, =gActiveBank ldrb r1, [r3] @@ -5775,7 +5775,7 @@ _08189794: thumb_func_start sub_81897A4 sub_81897A4: @ 81897A4 push {lr} - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r1, [r0] ldr r0, =gActiveBank ldrb r3, [r0] diff --git a/asm/battle_controller_recorded_player.s b/asm/battle_controller_recorded_player.s index 6ab274da2..1b0cd52e3 100644 --- a/asm/battle_controller_recorded_player.s +++ b/asm/battle_controller_recorded_player.s @@ -132,7 +132,7 @@ _08189A40: thumb_func_start sub_8189A58 sub_8189A58: @ 8189A58 push {r4,lr} - ldr r4, =gUnknown_020244D0 + ldr r4, =gBattleSpritesDataPtr ldr r1, [r4] ldr r3, =gActiveBank ldrb r0, [r3] @@ -244,7 +244,7 @@ _08189B42: bne _08189B48 b _08189D18 _08189B48: - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr mov r9, r0 ldr r0, [r0] ldr r5, =gActiveBank @@ -435,7 +435,7 @@ _08189CE6: _08189CF2: cmp r6, 0 beq _08189D18 - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r3, =gActiveBank ldrb r1, [r3] @@ -478,7 +478,7 @@ sub_8189D40: @ 8189D40 lsls r0, 24 cmp r0, 0 bne _08189DBE - ldr r5, =gUnknown_020244D0 + ldr r5, =gBattleSpritesDataPtr ldr r0, [r5] ldrb r2, [r4] ldr r1, [r0, 0x4] @@ -527,7 +527,7 @@ _08189D8C: adds r0, r3, 0 bl sub_8172EF0 _08189DBE: - ldr r3, =gUnknown_020244D0 + ldr r3, =gBattleSpritesDataPtr ldr r0, [r3] ldr r2, =gActiveBank ldrb r5, [r2] @@ -621,7 +621,7 @@ _08189E54: ldrb r0, [r0] bl sub_80729D0 _08189E84: - ldr r4, =gUnknown_020244D0 + ldr r4, =gBattleSpritesDataPtr ldr r0, [r4] ldr r3, =gActiveBank ldrb r1, [r3] @@ -702,7 +702,7 @@ _08189F38: lsls r2, 1 bl m4aMPlayVolumeControl _08189F44: - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r2, [r0] ldr r0, =gActiveBank ldrb r1, [r0] @@ -779,7 +779,7 @@ _08189FC8: ldr r1, =gSprites adds r0, r1 bl DestroySprite - ldr r3, =gUnknown_020244D0 + ldr r3, =gBattleSpritesDataPtr ldr r0, [r3] ldr r2, [r0, 0x8] ldrb r1, [r2, 0x9] @@ -975,7 +975,7 @@ _0818A190: thumb_func_start sub_818A1B0 sub_818A1B0: @ 818A1B0 push {r4-r6,lr} - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r6, =gActiveBank ldrb r2, [r6] @@ -1113,7 +1113,7 @@ sub_818A2B4: @ 818A2B4 bne _0818A306 adds r0, r3, 0 bl sub_805E408 - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldrb r2, [r4] ldr r1, [r0] @@ -1145,7 +1145,7 @@ _0818A306: thumb_func_start sub_818A328 sub_818A328: @ 818A328 push {lr} - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r1, [r0] ldr r0, =gActiveBank ldrb r3, [r0] @@ -1184,7 +1184,7 @@ sub_818A37C: @ 818A37C push {r4-r7,lr} mov r7, r8 push {r7} - ldr r3, =gUnknown_020244D0 + ldr r3, =gBattleSpritesDataPtr ldr r0, [r3] ldr r7, =gActiveBank ldrb r1, [r7] @@ -1279,7 +1279,7 @@ _0818A438: thumb_func_start sub_818A470 sub_818A470: @ 818A470 push {r4-r6,lr} - ldr r6, =gUnknown_020244D0 + ldr r6, =gBattleSpritesDataPtr ldr r0, [r6] ldr r4, =gActiveBank ldrb r2, [r4] @@ -1397,7 +1397,7 @@ _0818A57A: thumb_func_start sub_818A58C sub_818A58C: @ 818A58C push {lr} - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r2, [r0] ldr r0, =gActiveBank ldrb r1, [r0] @@ -1421,7 +1421,7 @@ _0818A5AE: thumb_func_start sub_818A5BC sub_818A5BC: @ 818A5BC push {lr} - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r2, [r0] ldr r0, =gActiveBank ldrb r1, [r0] @@ -3852,7 +3852,7 @@ sub_818BBE8: @ 818BBE8 ldrb r3, [r0] cmp r3, 0 bne _0818BC30 - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r1, [r0, 0x4] lsls r0, r2, 1 @@ -3902,7 +3902,7 @@ _0818BC66: thumb_func_start sub_818BC78 sub_818BC78: @ 818BC78 push {r4-r6,lr} - ldr r6, =gUnknown_020244D0 + ldr r6, =gBattleSpritesDataPtr ldr r4, [r6] ldr r5, =gActiveBank ldrb r2, [r5] @@ -4350,7 +4350,7 @@ sub_818BFB8: @ 818BFB8 thumb_func_start sub_818C064 sub_818C064: @ 818C064 push {r4-r6,lr} - ldr r6, =gUnknown_020244D0 + ldr r6, =gBattleSpritesDataPtr ldr r4, [r6] ldr r5, =gActiveBank ldrb r2, [r5] @@ -4599,7 +4599,7 @@ _0818C192: b _0818C2A6 .pool _0818C288: - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldrb r1, [r6] ldr r2, [r0, 0x4] @@ -4646,7 +4646,7 @@ bx_move_anim_2: @ 818C2B8 adds r1, r2 ldrb r1, [r1] mov r8, r1 - ldr r7, =gUnknown_020244D0 + ldr r7, =gBattleSpritesDataPtr ldr r5, [r7] ldr r1, [r5, 0x4] lsls r0, r3, 1 @@ -4754,7 +4754,7 @@ _0818C37A: ands r0, r2 strb r0, [r1] _0818C3C8: - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r2, [r0] ldr r0, =gActiveBank ldrb r1, [r0] @@ -5134,7 +5134,7 @@ sub_818C6F4: @ 818C6F4 movs r2, 0x9 bl healthbar_draw_field_maybe ldrb r2, [r4] - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r0, [r0, 0x4] lsls r1, r2, 1 @@ -5676,7 +5676,7 @@ _0818CB5A: adds r1, r4 ldrb r0, [r5] strh r0, [r1, 0x8] - ldr r3, =gUnknown_020244D0 + ldr r3, =gBattleSpritesDataPtr ldr r0, [r3] ldrb r2, [r5] ldr r1, [r0, 0x4] @@ -5855,7 +5855,7 @@ sub_818CD30: @ 818CD30 b _0818CDD4 .pool _0818CD60: - ldr r6, =gUnknown_020244D0 + ldr r6, =gBattleSpritesDataPtr ldr r0, [r6] ldr r5, =gActiveBank ldrb r1, [r5] @@ -5923,7 +5923,7 @@ _0818CDD4: thumb_func_start bx_increment_dp11b_field_5_till_x60_then_resume bx_increment_dp11b_field_5_till_x60_then_resume: @ 818CDF4 push {r4,lr} - ldr r4, =gUnknown_020244D0 + ldr r4, =gBattleSpritesDataPtr ldr r0, [r4] ldr r3, =gActiveBank ldrb r1, [r3] @@ -5959,7 +5959,7 @@ _0818CE2C: thumb_func_start sub_818CE3C sub_818CE3C: @ 818CE3C push {lr} - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r1, [r0] ldr r0, =gActiveBank ldrb r3, [r0] diff --git a/asm/battle_controller_safari.s b/asm/battle_controller_safari.s index dac3034a9..acd716776 100644 --- a/asm/battle_controller_safari.s +++ b/asm/battle_controller_safari.s @@ -336,7 +336,7 @@ bx_wait_t6: @ 8159624 ldrb r0, [r0] cmp r0, 0 beq _0815964A - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r2, [r0] ldr r0, =gActiveBank ldrb r1, [r0] @@ -410,7 +410,7 @@ _081596BE: thumb_func_start sub_81596D4 sub_81596D4: @ 81596D4 push {lr} - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r2, [r0] ldr r0, =gActiveBank ldrb r1, [r0] @@ -484,7 +484,7 @@ _0815976A: thumb_func_start bx_80364D0 bx_80364D0: @ 815977C push {lr} - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r2, [r0] ldr r0, =gActiveBank ldrb r1, [r0] @@ -689,7 +689,7 @@ sub_8159904: @ 8159904 thumb_func_start sub_8159910 sub_8159910: @ 8159910 push {r4,r5,lr} - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r1, [r0, 0x8] movs r0, 0x4 @@ -730,7 +730,7 @@ sub_8159964: @ 8159964 adds r1, 0x1 adds r0, r1 ldrb r1, [r0] - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r0, [r0, 0x8] strb r1, [r0, 0x8] diff --git a/asm/battle_controller_wally.s b/asm/battle_controller_wally.s index 51193024f..8291b05fa 100644 --- a/asm/battle_controller_wally.s +++ b/asm/battle_controller_wally.s @@ -324,7 +324,7 @@ sub_816864C: @ 816864C push {r4-r7,lr} mov r7, r8 push {r7} - ldr r4, =gUnknown_020244D0 + ldr r4, =gBattleSpritesDataPtr ldr r0, [r4] ldr r5, =gActiveBank ldrb r2, [r5] @@ -500,7 +500,7 @@ _0816877A: adds r0, r5 ldrb r0, [r0] bl sub_80729D0 - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r2, [r0, 0x8] ldrb r1, [r2, 0x9] @@ -549,7 +549,7 @@ sub_8168818: @ 8168818 _08168842: cmp r4, 0 beq _08168904 - ldr r7, =gUnknown_020244D0 + ldr r7, =gBattleSpritesDataPtr ldr r0, [r7] ldr r4, [r0, 0x4] lsls r0, r3, 1 @@ -761,7 +761,7 @@ _08168A1A: thumb_func_start sub_8168A20 sub_8168A20: @ 8168A20 push {r4-r6,lr} - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r6, =gActiveBank ldrb r2, [r6] @@ -833,7 +833,7 @@ _08168AB4: thumb_func_start sub_8168AC8 sub_8168AC8: @ 8168AC8 push {lr} - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r2, [r0] ldr r0, =gActiveBank ldrb r1, [r0] @@ -907,7 +907,7 @@ _08168B5E: thumb_func_start sub_8168B70 sub_8168B70: @ 8168B70 push {lr} - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r2, [r0] ldr r0, =gActiveBank ldrb r1, [r0] @@ -3221,7 +3221,7 @@ sub_816A078: @ 816A078 thumb_func_start sub_816A084 sub_816A084: @ 816A084 push {r4,r5,lr} - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r1, [r0, 0x8] movs r0, 0x4 @@ -3262,7 +3262,7 @@ sub_816A0D8: @ 816A0D8 adds r1, 0x1 adds r0, r1 ldrb r1, [r0] - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r0, [r0, 0x8] strb r1, [r0, 0x8] @@ -3407,7 +3407,7 @@ sub_816A144: @ 816A144 b _0816A25A .pool _0816A23C: - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldrb r1, [r6] ldr r2, [r0, 0x4] @@ -3449,7 +3449,7 @@ bx_move_anim_5: @ 816A26C ldrb r0, [r1] lsls r0, 8 orrs r4, r0 - ldr r7, =gUnknown_020244D0 + ldr r7, =gBattleSpritesDataPtr ldr r5, [r7] ldr r1, [r5, 0x4] lsls r0, r3, 1 @@ -4342,7 +4342,7 @@ sub_816A90C: @ 816A90C adds r1, r4 ldrb r0, [r7] strh r0, [r1, 0x8] - ldr r3, =gUnknown_020244D0 + ldr r3, =gBattleSpritesDataPtr ldr r0, [r3] ldrb r2, [r7] ldr r1, [r0, 0x4] @@ -4393,7 +4393,7 @@ sub_816AA80: @ 816AA80 adds r6, r0, 0 lsls r6, 24 lsrs r6, 24 - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r1, [r0] lsls r0, r6, 2 @@ -4622,7 +4622,7 @@ sub_816AC78: @ 816AC78 b _0816ACE6 .pool _0816ACA8: - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r5, =gActiveBank ldrb r1, [r5] diff --git a/asm/battle_frontier_2.s b/asm/battle_frontier_2.s index 3d3fba02b..de5617167 100755 --- a/asm/battle_frontier_2.s +++ b/asm/battle_frontier_2.s @@ -18768,7 +18768,7 @@ _081A43EE: sub_81A4410: @ 81A4410 push {r4,lr} ldr r4, =gScriptResult - bl sub_8185338 + bl MoveRecordedBattleToSaveData strh r0, [r4] ldr r0, =gSaveBlock2Ptr ldr r1, [r0] diff --git a/asm/battle_interface.s b/asm/battle_interface.s index 8bc9553f7..d9bb3d8cc 100755 --- a/asm/battle_interface.s +++ b/asm/battle_interface.s @@ -780,7 +780,7 @@ sub_807294C: @ 807294C ldr r7, [sp, 0x14] lsls r0, 24 lsrs r0, 24 - ldr r6, =gUnknown_020244D0 + ldr r6, =gBattleSpritesDataPtr ldr r4, [r6] ldr r5, [r4, 0xC] lsls r4, r0, 2 @@ -1398,7 +1398,7 @@ sub_8072E0C: @ 8072E0C lsls r0, 24 cmp r0, 0 bne _08072F28 - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r1, [r0] movs r2, 0x3A ldrsh r0, [r7, r2] @@ -1500,7 +1500,7 @@ _08072F28: lsls r0, 24 lsrs r0, 24 str r0, [sp, 0x2C] - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r1, [r0] ldr r2, [sp, 0x2C] @@ -2004,7 +2004,7 @@ _0807336A: bne _08073382 b _080735A8 _08073382: - ldr r5, =gUnknown_020244D0 + ldr r5, =gBattleSpritesDataPtr ldr r0, [r5] ldr r3, [r0] mov r0, r9 @@ -2988,7 +2988,7 @@ _08073BC6: ldr r2, [sp, 0x10] cmp r2, 0 beq _08073C0A - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r3, [r0, 0x8] ldrb r2, [r3, 0x9] @@ -3311,7 +3311,7 @@ sub_8073E64: @ 8073E64 bne _08073F54 ldrb r5, [r4, 0xA] movs r4, 0 - ldr r6, =gUnknown_020244D0 + ldr r6, =gBattleSpritesDataPtr adds r0, r7, 0 adds r0, 0xE adds r2, r3, r0 @@ -3406,7 +3406,7 @@ _08073F54: negs r0, r0 cmp r1, r0 bne _08073F8A - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r0, [r0, 0x4] lsls r1, r2, 1 @@ -3516,7 +3516,7 @@ _08074034: negs r0, r0 cmp r2, r0 bne _0807406A - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r0, [r0, 0x4] lsls r1, r5, 1 @@ -4140,7 +4140,7 @@ _08074542: adds r4, 0x1 cmp r4, 0x2 ble _08074542 - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r0, [r0] adds r0, r7, r0 @@ -4222,7 +4222,7 @@ _080745B8: cmp r0, 0x1 bne _08074672 _08074626: - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r1, [r0] lsls r0, r7, 2 @@ -4760,7 +4760,7 @@ sub_8074AA0: @ 8074AA0 mov r9, r2 cmp r2, 0 bne _08074AEC - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r0, [r0, 0xC] mov r1, r8 @@ -4782,7 +4782,7 @@ sub_8074AA0: @ 8074AA0 b _08074B48 .pool _08074AEC: - ldr r2, =gUnknown_020244D0 + ldr r2, =gBattleSpritesDataPtr mov r10, r2 ldr r0, [r2] ldr r2, [r0, 0xC] @@ -4833,7 +4833,7 @@ _08074B48: beq _08074B64 cmp r2, 0 bne _08074B6C - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r0, [r0] adds r0, r7, r0 @@ -4851,7 +4851,7 @@ _08074B6C: negs r0, r0 cmp r4, r0 bne _08074B86 - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r1, [r0, 0xC] mov r2, r8 @@ -4890,7 +4890,7 @@ sub_8074B9C: @ 8074B9C beq _08074CA0 b _08074D9E _08074BB8: - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r0, [r0, 0xC] lsls r5, r6, 2 @@ -4924,7 +4924,7 @@ _08074BF4: ldr r0, =gSprites mov r8, r0 _08074BFA: - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r1, [r0, 0xC] adds r0, r7, r6 @@ -4995,7 +4995,7 @@ _08074C8A: b _08074D9E .pool _08074CA0: - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r0, [r0, 0xC] lsls r5, r6, 2 @@ -5055,7 +5055,7 @@ _08074D02: ldrb r1, [r1] lsls r1, 5 adds r0, r1 - ldr r1, =gUnknown_020244D0 + ldr r1, =gBattleSpritesDataPtr ldr r1, [r1] ldr r1, [r1, 0xC] adds r1, r4, r1 @@ -5086,7 +5086,7 @@ _08074D5C: ldrb r1, [r1] lsls r1, 5 adds r0, r1 - ldr r1, =gUnknown_020244D0 + ldr r1, =gBattleSpritesDataPtr ldr r1, [r1] ldr r1, [r1, 0xC] adds r1, r4, r1 diff --git a/asm/contest.s b/asm/contest.s index b469dd8eb..561c79857 100644 --- a/asm/contest.s +++ b/asm/contest.s @@ -5587,7 +5587,7 @@ sub_80DA830: @ 80DA830 str r1, [r0] bl FreeAllWindowBuffers bl sub_80D7A5C - bl sub_805F094 + bl FreeMonSpritesGfx ldr r0, =c2_exit_to_overworld_2_switch bl SetMainCallback2 _080DA860: diff --git a/asm/contest_link_80F57C4.s b/asm/contest_link_80F57C4.s index 8a1bf00f1..03e1aaf2b 100644 --- a/asm/contest_link_80F57C4.s +++ b/asm/contest_link_80F57C4.s @@ -4569,7 +4569,7 @@ sub_80F7E64: @ 80F7E64 str r4, [r0, 0x1C] bl Free str r4, [r5] - bl sub_805F094 + bl FreeMonSpritesGfx pop {r4,r5} pop {r0} bx r0 diff --git a/asm/contest_painting.s b/asm/contest_painting.s index 03fa9b05a..2caf15194 100644 --- a/asm/contest_painting.s +++ b/asm/contest_painting.s @@ -72,7 +72,7 @@ sub_812FE0C: @ 812FE0C movs r0, 0x1 bl GetBgTilemapBuffer bl Free - bl sub_805F094 + bl FreeMonSpritesGfx pop {r4,r5} pop {r0} bx r0 diff --git a/asm/evolution_scene.s b/asm/evolution_scene.s index 0fa0c5eb3..889403787 100644 --- a/asm/evolution_scene.s +++ b/asm/evolution_scene.s @@ -189,7 +189,7 @@ evolution_cutscene: @ 813DA8C ldr r1, =gBattleTerrain movs r0, 0x9 strb r0, [r1] - bl c2_berry_program_update_menu + bl sub_80356D0 bl LoadBattleTextboxAndBackground bl ResetSpriteData bl remove_some_task @@ -482,7 +482,7 @@ sub_813DD7C: @ 813DD7C ldr r1, =gBattleTerrain movs r0, 0x9 strb r0, [r1] - bl c2_berry_program_update_menu + bl sub_80356D0 bl LoadBattleTextboxAndBackground bl ResetSpriteData bl FreeAllSpritePalettes @@ -1775,7 +1775,7 @@ _0813EAF6: _0813EB06: adds r0, r7, 0 bl DestroyTask - bl sub_805F094 + bl FreeMonSpritesGfx ldr r4, =gUnknown_0203AB80 ldr r0, [r4] bl Free diff --git a/asm/link.s b/asm/link.s index 038633758..fb20b1fb2 100644 --- a/asm/link.s +++ b/asm/link.s @@ -71211,7 +71211,7 @@ sub_802DBF8: @ 802DBF8 movs r6, 0 cmp r6, r10 bge _0802DC62 - ldr r0, =gUnknown_08300D38 + ldr r0, =gMonFrontPicCoords mov r9, r0 ldr r1, =gUnknown_02022D00 mov r8, r1 diff --git a/asm/pokeball.s b/asm/pokeball.s index 557813c19..4e637fb9d 100755 --- a/asm/pokeball.s +++ b/asm/pokeball.s @@ -17,7 +17,7 @@ sub_80753E8: @ 80753E8 ldr r1, =gDoingBattleAnim movs r0, 0x1 strb r0, [r1] - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r6, =gActiveBank ldrb r1, [r6] @@ -992,7 +992,7 @@ _08075C22: movs r2, 0xC bl PlayCry4 _08075C2E: - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r0, [r0, 0x4] mov r2, r8 @@ -1082,7 +1082,7 @@ _08075CD8: movs r2, 0xB bl PlayCry4 _08075CE4: - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r0, [r0, 0x4] mov r2, r8 @@ -1215,7 +1215,7 @@ _08075E00: lsls r0, 24 cmp r0, 0 beq _08075E56 - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r0, [r0, 0x8] ldrb r1, [r0, 0x9] @@ -1247,7 +1247,7 @@ _08075E56: lsls r0, 24 cmp r0, 0 beq _08075E70 - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r0, [r0, 0x8] ldrb r1, [r0, 0x9] @@ -1278,7 +1278,7 @@ _08075E9C: _08075EA0: movs r4, 0x2 _08075EA2: - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r0, [r0, 0x4] mov r2, r8 @@ -1508,7 +1508,7 @@ _0807605C: strh r1, [r0, 0x26] ldr r0, =gDoingBattleAnim strb r2, [r0] - ldr r4, =gUnknown_020244D0 + ldr r4, =gBattleSpritesDataPtr ldr r0, [r4] ldr r0, [r0, 0x4] lsls r1, r6, 1 @@ -1619,7 +1619,7 @@ _08076130: ands r0, r1 cmp r0, 0 beq _08076196 - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r0, [r0, 0x4] lsls r1, r7, 1 @@ -1819,7 +1819,7 @@ _080762F8: lsls r0, 24 cmp r0, 0 beq _08076358 - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r0, [r0, 0x8] ldrb r1, [r0, 0x9] @@ -1892,7 +1892,7 @@ sub_8076398: @ 8076398 lsls r0, 24 cmp r0, 0 beq _080763E8 - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r0, [r0, 0x8] ldrb r1, [r0, 0x9] diff --git a/asm/pokeblock_feed.s b/asm/pokeblock_feed.s index bc402d91c..1f8e45f0a 100644 --- a/asm/pokeblock_feed.s +++ b/asm/pokeblock_feed.s @@ -797,7 +797,7 @@ sub_817A2C0: @ 817A2C0 ldr r0, =gUnknown_0203BD18 ldr r0, [r0] bl Free - bl sub_805F094 + bl FreeMonSpritesGfx _0817A304: pop {r4} pop {r0} diff --git a/asm/recorded_battle.s b/asm/recorded_battle.s index 48325cfed..f733033ff 100644 --- a/asm/recorded_battle.s +++ b/asm/recorded_battle.s @@ -348,7 +348,7 @@ _0818507A: movs r2, 0 movs r3, 0x10 bl BeginNormalPaletteFade - ldr r0, =sub_80384E4 + ldr r0, =CB2_QuitRecordedBattle bl SetMainCallback2 movs r0, 0xFF b _081850C6 @@ -681,8 +681,8 @@ _08185332: bx r1 thumb_func_end sub_81852F0 - thumb_func_start sub_8185338 -sub_8185338: @ 8185338 + thumb_func_start MoveRecordedBattleToSaveData +MoveRecordedBattleToSaveData: @ 8185338 push {r4-r7,lr} mov r7, r10 mov r6, r9 @@ -1469,7 +1469,7 @@ _08185A14: pop {r1} bx r1 .pool - thumb_func_end sub_8185338 + thumb_func_end MoveRecordedBattleToSaveData thumb_func_start sub_8185A54 sub_8185A54: @ 8185A54 @@ -2655,8 +2655,8 @@ sub_8186444: @ 8186444 .pool thumb_func_end sub_8186444 - thumb_func_start rfu_lacks_rfufunc -rfu_lacks_rfufunc: @ 8186450 + thumb_func_start sub_8186450 +sub_8186450: @ 8186450 push {lr} movs r1, 0 ldr r0, =gUnknown_0203CCD0 @@ -2669,7 +2669,7 @@ _0818645E: pop {r1} bx r1 .pool - thumb_func_end rfu_lacks_rfufunc + thumb_func_end sub_8186450 thumb_func_start sub_8186468 sub_8186468: @ 8186468 diff --git a/asm/reshow_battle_screen.s b/asm/reshow_battle_screen.s index 8bc97b45a..c7e384a10 100644 --- a/asm/reshow_battle_screen.s +++ b/asm/reshow_battle_screen.s @@ -348,7 +348,7 @@ sub_80A9614: @ 80A9614 lsls r0, 24 cmp r0, 0 beq _080A9676 - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r1, [r0] lsls r0, r4, 2 @@ -404,7 +404,7 @@ _080A96AA: bl sub_805DF84 b _080A96F4 _080A96B2: - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r1, [r0] lsls r0, r4, 2 @@ -459,7 +459,7 @@ sub_80A9708: @ 80A9708 bcc _080A9722 b _080A9AA0 _080A9722: - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r0, [r0] lsls r2, r7, 2 @@ -591,7 +591,7 @@ _080A9786: adds r1, r7, r1 ldrb r1, [r1] bl StartSpriteAnim - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r0, [r0] ldr r2, [sp] @@ -808,7 +808,7 @@ _080A998C: adds r1, r7, r1 ldrb r1, [r1] bl StartSpriteAnim - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r0, [r0] ldr r1, [sp] @@ -839,7 +839,7 @@ _080A9A70: adds r2, r0 lsls r2, 2 adds r2, r1 - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r0, [r0] ldr r1, [sp] diff --git a/asm/rom_80A5C6C.s b/asm/rom_80A5C6C.s index 6135f81e0..bb74b3713 100644 --- a/asm/rom_80A5C6C.s +++ b/asm/rom_80A5C6C.s @@ -94,7 +94,7 @@ _080A5D28: lsls r0, 24 cmp r0, 0 beq _080A5D60 - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r1, [r0] lsls r0, r5, 2 @@ -112,7 +112,7 @@ _080A5D28: b _080A5D7E .pool _080A5D60: - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r1, [r0] lsls r0, r5, 2 @@ -195,7 +195,7 @@ _080A5E00: ldr r2, [r2, 0x8] b _080A5E42 _080A5E04: - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r0, [r0] lsls r1, r4, 2 @@ -285,7 +285,7 @@ _080A5EC0: _080A5EC8: cmp r5, 0xC9 bne _080A5F58 - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r0, [r0] lsls r1, r4, 2 @@ -344,7 +344,7 @@ _080A5F44: lsls r0, 16 lsrs r0, 16 _080A5F4E: - ldr r1, =gUnknown_08300D38 + ldr r1, =gMonFrontPicCoords lsls r0, 2 b _080A5F90 .pool @@ -352,7 +352,7 @@ _080A5F58: ldr r0, =0x00000181 cmp r5, r0 bne _080A5F7C - ldr r0, =gUnknown_08525F78 + ldr r0, =gCastformFrontSpriteCoords ldr r1, =gBattleMonForms adds r1, r4, r1 ldrb r1, [r1] @@ -366,11 +366,11 @@ _080A5F7C: lsls r0, 1 cmp r5, r0 bls _080A5F8C - ldr r0, =gUnknown_08300D38 + ldr r0, =gMonFrontPicCoords b _080A5F92 .pool _080A5F8C: - ldr r1, =gUnknown_08300D38 + ldr r1, =gMonFrontPicCoords _080A5F8E: lsls r0, r5, 2 _080A5F90: @@ -546,7 +546,7 @@ _080A60E4: ldrh r1, [r2] b _080A610E _080A60E8: - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r1, [r0] lsls r0, r4, 2 @@ -654,7 +654,7 @@ sub_80A6190: @ 80A6190 lsls r0, 24 cmp r0, 0 beq _080A61E4 - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r1, [r0] lsls r0, r5, 2 @@ -672,7 +672,7 @@ sub_80A6190: @ 80A6190 b _080A6202 .pool _080A61E4: - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r1, [r0] lsls r0, r5, 2 @@ -2976,7 +2976,7 @@ _080A72B4: lsls r0, 30 cmp r0, 0 bne _080A7312 - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r1, [r0, 0x4] lsls r0, r7, 1 @@ -4571,7 +4571,7 @@ _080A7F78: lsls r0, 24 cmp r0, 0 bne _080A7FD8 - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r1, [r0] lsls r0, r5, 2 @@ -4606,7 +4606,7 @@ _080A7FD0: b _080A8026 .pool _080A7FD8: - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r1, [r0] lsls r0, r5, 2 @@ -4641,7 +4641,7 @@ _080A8018: b _080A8042 .pool _080A8024: - ldr r0, =gUnknown_08300D38 + ldr r0, =gMonFrontPicCoords _080A8026: lsls r1, r2, 2 adds r1, r0 @@ -5200,7 +5200,7 @@ _080A8412: lsrs r0, 24 cmp r0, 0x1 beq _080A845E - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r1, [r0] ldr r2, [sp, 0x40] @@ -5263,7 +5263,7 @@ _080A84B0: lsrs r0, 24 cmp r0, 0x1 beq _080A84F6 - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r1, [r0] ldr r3, [sp, 0x40] @@ -5338,7 +5338,7 @@ _080A8540: mov r2, r10 lsls r1, r2, 16 asrs r1, 16 - ldr r3, =gUnknown_08300D38 + ldr r3, =gMonFrontPicCoords b _080A85B2 .pool _080A85A0: @@ -5490,7 +5490,7 @@ _080A86C4: lsls r0, 24 cmp r0, 0 bne _080A8790 - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r0, [r0] mov r1, r8 @@ -5580,7 +5580,7 @@ _080A8784: b _080A8864 .pool _080A8790: - ldr r0, =gUnknown_020244D0 + ldr r0, =gBattleSpritesDataPtr ldr r0, [r0] ldr r0, [r0] mov r1, r8 @@ -5662,7 +5662,7 @@ _080A8834: add r0, r8 ldrb r0, [r0] lsls r0, 2 - ldr r1, =gUnknown_08525F78 + ldr r1, =gCastformFrontSpriteCoords adds r4, r0, r1 b _080A8866 .pool @@ -5671,13 +5671,13 @@ _080A8850: lsls r0, 1 cmp r7, r0 bls _080A8860 - ldr r4, =gUnknown_08300D38 + ldr r4, =gMonFrontPicCoords b _080A8866 .pool _080A8860: lsls r1, r7, 2 _080A8862: - ldr r0, =gUnknown_08300D38 + ldr r0, =gMonFrontPicCoords _080A8864: adds r4, r1, r0 _080A8866: diff --git a/asm/script_pokemon_util_80F87D8.s b/asm/script_pokemon_util_80F87D8.s index e5f69eeac..231879f02 100644 --- a/asm/script_pokemon_util_80F87D8.s +++ b/asm/script_pokemon_util_80F87D8.s @@ -842,7 +842,7 @@ sub_80F8EB8: @ 80F8EB8 ldrh r0, [r1, 0x8] adds r0, 0x1 strh r0, [r1, 0x8] - bl sub_805F094 + bl FreeMonSpritesGfx _080F8EDC: pop {r0} bx r0 diff --git a/asm/trade.s b/asm/trade.s index 42ed85948..d4c54cef6 100644 --- a/asm/trade.s +++ b/asm/trade.s @@ -8939,7 +8939,7 @@ _0807C04C: adds r1, r0 lsls r1, 2 adds r1, r3 - ldr r2, =gUnknown_08300D38 + ldr r2, =gMonFrontPicCoords adds r0, r4, 0 adds r0, 0xF0 ldrh r0, [r0] @@ -10395,7 +10395,7 @@ _0807CD1C: adds r1, r0 lsls r1, 2 adds r1, r4 - ldr r3, =gUnknown_08300D38 + ldr r3, =gMonFrontPicCoords adds r2, 0xF2 ldrh r0, [r2] lsls r0, 2 @@ -10663,7 +10663,7 @@ _0807CF5C: movs r0, 0 bl GetBgTilemapBuffer bl Free - bl sub_805F094 + bl FreeMonSpritesGfx ldr r0, [r7] bl Free str r4, [r7] @@ -11001,7 +11001,7 @@ _0807D428: adds r1, r0 lsls r1, 2 adds r1, r3 - ldr r2, =gUnknown_08300D38 + ldr r2, =gMonFrontPicCoords adds r0, r4, 0 adds r0, 0xF0 ldrh r0, [r0] @@ -12500,7 +12500,7 @@ _0807E168: adds r1, r0 lsls r1, 2 adds r1, r4 - ldr r3, =gUnknown_08300D38 + ldr r3, =gMonFrontPicCoords adds r2, 0xF2 ldrh r0, [r2] lsls r0, 2 @@ -12768,7 +12768,7 @@ _0807E3A8: movs r0, 0 bl GetBgTilemapBuffer bl Free - bl sub_805F094 + bl FreeMonSpritesGfx ldr r0, [r7] bl Free str r4, [r7] @@ -14136,7 +14136,7 @@ c2_080543C4: @ 807F068 movs r0, 0 bl GetBgTilemapBuffer bl Free - bl sub_805F094 + bl FreeMonSpritesGfx ldr r4, =gUnknown_020322A0 ldr r0, [r4] bl Free diff --git a/data/battle_anims.s b/data/battle_anims.s index 6b48bcd2a..8b285f7be 100644 --- a/data/battle_anims.s +++ b/data/battle_anims.s @@ -327,7 +327,7 @@ gUnknown_08525E98:: @ 8525E98 gUnknown_08525F58:: @ 8525F58 .incbin "baserom.gba", 0x525f58, 0x20 -gUnknown_08525F78:: @ 8525F78 +gCastformFrontSpriteCoords:: @ 8525F78 .incbin "baserom.gba", 0x525f78, 0x10 gUnknown_08525F88:: @ 8525F88 diff --git a/data/data2b.s b/data/data2b.s index fd72e835e..96d56c820 100644 --- a/data/data2b.s +++ b/data/data2b.s @@ -95,7 +95,7 @@ gUnknown_082FF6C0:: @ 82FF6C0 gUnknown_082FF70C:: @ 82FF70C .incbin "baserom.gba", 0x2ff70c, 0x162c -gUnknown_08300D38:: @ 8300D38 +gMonFrontPicCoords:: @ 8300D38 .incbin "baserom.gba", 0x300d38, 0x6e0 @ 8301418 @@ -196,8 +196,13 @@ gUnknown_0831AC70:: @ 831AC70 gUnknown_0831AC88:: @ 831AC88 .incbin "baserom.gba", 0x31ac88, 0x18 -gUnknown_0831ACA0:: @ 831ACA0 - .incbin "baserom.gba", 0x31aca0, 0x40 +gText_ShedinjaJapaneseName:: @ 831ACA0 + .string "ヌケニン$" @Nukenin + +.align 2 + +gUnknown_0831ACA8:: @ 831ACA8 + .incbin "baserom.gba", 0x31aca8, 0x38 gUnknown_0831ACE0:: @ 831ACE0 .incbin "baserom.gba", 0x31ace0, 0x8 diff --git a/data/event_scripts.s b/data/event_scripts.s index e4293570d..4dd5761e5 100644 --- a/data/event_scripts.s +++ b/data/event_scripts.s @@ -84,14 +84,14 @@ gUnknown_0823B68C:: @ 823B68C gUnknown_0823C050:: @ 823C050 .incbin "baserom.gba", 0x23c050, 0x6431 -gUnknown_08242481:: @ 8242481 +gText_BattleRecordCouldntBeSaved:: @ 8242481 .incbin "baserom.gba", 0x242481, 0x87b gUnknown_08242CFC:: @ 8242CFC .incbin "baserom.gba", 0x242cfc, 0x6a91 -gUnknown_0824978D:: @ 824978D - .incbin "baserom.gba", 0x24978d, 0xe +gText_LinkStandby3:: @ 824978D + .string "Link standby…$" gUnknown_0824979B:: @ 824979B .incbin "baserom.gba", 0x24979b, 0x944d diff --git a/include/battle.h b/include/battle.h index 72168aa60..afb3c8d6e 100644 --- a/include/battle.h +++ b/include/battle.h @@ -264,32 +264,32 @@ struct TrainerMonNoItemDefaultMoves { - u16 species; + u16 iv; u8 lvl; - u16 evsValue; + u16 species; }; struct TrainerMonItemDefaultMoves { - u16 species; + u16 iv; u8 lvl; - u16 evsValue; + u16 species; u16 heldItem; }; struct TrainerMonNoItemCustomMoves { - u16 species; + u16 iv; u8 lvl; - u16 evsValue; + u16 species; u16 moves[4]; }; struct TrainerMonItemCustomMoves { - u16 species; + u16 iv; u8 lvl; - u16 evsValue; + u16 species; u16 heldItem; u16 moves[4]; }; @@ -863,10 +863,13 @@ extern struct BattleScripting gBattleScripting; // battle_1 void LoadBattleTextboxAndBackground(void); void LoadBattleEntryBackground(void); +void ApplyPlayerChosenFrameToBattleMenu(void); +bool8 LoadChosenBattleElement(u8 caseId); void task00_0800F6FC(u8 taskId); // battle_2 void CB2_InitBattle(void); +void CB2_QuitRecordedBattle(void); void CancelMultiTurnMoves(u8 bank); void PressurePPLose(u8 bankAtk, u8 bankDef, u16 move); void PrepareStringBattle(u16 stringId, u8 bank); @@ -933,15 +936,18 @@ extern const u8 gUnknown_0831C494[]; // battle_5 void AllocateBattleResrouces(void); +void FreeBattleResources(void); void AdjustFriendshipOnBattleFaint(u8 bank); void sub_80571DC(u8 bank, u8 arg1); u32 sub_805725C(u8 bank); // battle 7 void AllocateBattleSpritesData(void); +void FreeBattleSpritesData(void); +void AllocateMonSpritesGfx(void); +void FreeMonSpritesGfx(void); void BattleMusicStop(void); void sub_805E990(struct Pokemon* mon, u8 bank); -void AllocateMonSpritesGfx(void); void sub_805EF14(void); bool8 BattleInitAllSprites(u8 *state1, u8 *state2); @@ -950,6 +956,30 @@ u8 GetBankSide(u8 bank); u8 GetBankIdentity(u8 bank); u8 GetBankByIdentity(u8 bank); +struct BattleSpriteInfo +{ + u16 invisible : 1; // 0x1 + u16 flag_x2 : 1; // 0x2 + u16 behindSubstitute : 1; // 0x4 + u16 flag_x8 : 1; // 0x8 + u16 hpNumbersNoBars : 1; // 0x10 + u16 transformSpecies; +}; + +struct BattleAnimationInfo +{ + u16 field; // to fill up later +}; + +struct BattleSpriteData +{ + struct BattleSpriteInfo *bankData; + void* field_4; + struct BattleAnimationInfo *animationData; +}; + +extern struct BattleSpriteData *gBattleSpritesDataPtr; + // Move this somewhere else #include "sprite.h" diff --git a/include/link.h b/include/link.h index b719371da..9d581a6c1 100644 --- a/include/link.h +++ b/include/link.h @@ -182,5 +182,6 @@ void sub_800E0E8(void); bool8 sub_800A520(void); bool8 sub_8010500(void); void sub_800DFB4(u8, u8); +void sub_800ADF8(void); #endif // GUARD_LINK_H diff --git a/include/main.h b/include/main.h index e5460b3bf..e283d1754 100644 --- a/include/main.h +++ b/include/main.h @@ -39,6 +39,7 @@ struct Main /*0x439*/ u8 oamLoadDisabled:1; /*0x439*/ u8 inBattle:1; + /*0x439*/ u8 field_439_x4:1; }; extern u8 gUnknown_3001764; diff --git a/include/pokemon.h b/include/pokemon.h index 5ebb9afb1..4b678d679 100644 --- a/include/pokemon.h +++ b/include/pokemon.h @@ -637,5 +637,6 @@ void sub_8068AA4(void); // sets stats for deoxys #include "sprite.h" void DoMonFrontSpriteAnimation(struct Sprite* sprite, u16 species, bool8 noCry, u8 arg3); +void BattleAnimateFrontSprite(struct Sprite* sprite, u16 species, bool8 noCry, u8 arg3); #endif // GUARD_POKEMON_H diff --git a/include/recorded_battle.h b/include/recorded_battle.h index 407d0caf7..5f3099d83 100644 --- a/include/recorded_battle.h +++ b/include/recorded_battle.h @@ -7,5 +7,8 @@ void sub_8185F84(void); void sub_8184E58(void); void RecordedBattle_SetBankAction(u8 bank, u8 action); void sub_8185F90(u16 arg0); +bool8 sub_8186450(void); +u8 sub_8185FAC(void); +u8 MoveRecordedBattleToSaveData(void); #endif // GUARD_RECORDED_BATTLE_H diff --git a/include/unknown_task.h b/include/unknown_task.h index 7457451a8..9c6968c30 100644 --- a/include/unknown_task.h +++ b/include/unknown_task.h @@ -17,5 +17,6 @@ extern struct UnknownTaskStruct gUnknown_0831AC70; // Exported ROM declarations void remove_some_task(void); void sub_80BA038(struct UnknownTaskStruct arg0); +void sub_80BA0A8(void); #endif // GUARD_unknown_task_H diff --git a/src/battle_2.c b/src/battle_2.c index 844827326..8d1f6a7a1 100644 --- a/src/battle_2.c +++ b/src/battle_2.c @@ -20,6 +20,14 @@ #include "dma3.h" #include "string_util.h" #include "malloc.h" +#include "event_data.h" +#include "m4a.h" +#include "window.h" +#include "rng.h" +#include "songs.h" +#include "sound.h" +#include "battle_message.h" +#include "sprite.h" struct UnknownStruct6 { @@ -64,21 +72,43 @@ extern struct BattleEnigmaBerry gEnigmaBerries[BATTLE_BANKS_COUNT]; extern void (*gPreBattleCallback1)(void); extern struct UnknownPokemonStruct2 gUnknown_02022FF8[3]; // what is it used for? extern struct UnknownPokemonStruct2* gUnknown_02023058; // what is it used for? - +extern u8 gBattleOutcome; +extern u8 gUnknown_02039B28[]; // possibly a struct? extern struct UnknownStruct6 gUnknown_02038C28; // todo: identify & document +extern struct MusicPlayerInfo gMPlay_SE1; +extern struct MusicPlayerInfo gMPlay_SE2; +extern u8 gDecompressionBuffer[]; +extern u16 gUnknown_020243FC; +extern u8 gHealthBoxesIds[BATTLE_BANKS_COUNT]; + +extern const u8 gSpeciesNames[][POKEMON_NAME_LENGTH + 1]; +extern const struct BattleMove gBattleMoves[]; +extern const u16 gUnknown_08C004E0[]; // battle textbox palette +extern const struct BgTemplate gUnknown_0831AA08[]; +extern const struct WindowTemplate * const gUnknown_0831ABA0[]; + +// strings +extern const u8 gText_LinkStandby3[]; +extern const u8 gText_RecordBattleToPass[]; +extern const u8 gText_BattleYesNoChoice[]; +extern const u8 gText_BattleRecordCouldntBeSaved[]; +extern const u8 gText_BattleRecordedOnPass[]; +extern const u8 gText_ShedinjaJapaneseName[]; extern void HandleLinkBattleSetup(void); // rom_3 extern void SetUpBattleVarsAndBirchZigzagoon(void); // rom_3 extern void sub_8032768(void); // rom_3 extern void dp12_8087EA4(void); -extern void c2_berry_program_update_menu(void); +extern void sub_80356D0(void); extern void GetFrontierTrainerName(u8* dst, u16 trainerId); // battle tower extern void sub_8166188(void); // battle tower, sets link battle mons level but why? extern void sub_8165B88(u8* dst, u16 trainerId); // battle tower, gets language extern void sub_81DB4DC(u8* dst, u8 arg2); // extern void sub_81B9150(void); -extern void sub_800ADF8(void); extern void sub_800AC34(void); +extern void sub_80B3AF8(u8 taskId); // cable club +extern void sub_8076918(u8 bank); +extern void sub_80729D0(u8 healthoxSpriteId); // this file's functions static void CB2_InitBattleInternal(void); @@ -87,9 +117,22 @@ static void CB2_PreInitIngamePlayerPartnerBattle(void); static void CB2_HandleStartMultiPartnerBattle(void); static void CB2_HandleStartMultiBattle(void); static void CB2_HandleStartBattle(void); -void shedinja_something(struct Pokemon *mon); -void CreateNPCTrainerParty(struct Pokemon *party, u16 trainerNum, bool8 firstTrainer); +static void TryCorrectShedinjaLanguage(struct Pokemon *mon); +static u8 CreateNPCTrainerParty(struct Pokemon *party, u16 trainerNum, bool8 firstTrainer); void BattleMainCB1(void); +static void sub_8038538(struct Sprite *sprite); +static void sub_8038F14(void); +static void sub_8038F34(void); +static void sub_80392A8(void); +static void sub_803937C(void); +static void sub_803939C(void); +static void oac_poke_opponent(struct Sprite *sprite); +static void sub_803980C(struct Sprite *sprite); +static void sub_8039838(struct Sprite *sprite); +static void sub_8039894(struct Sprite *sprite); +static void sub_80398D0(struct Sprite *sprite); +static void sub_8039A48(struct Sprite *sprite); +void sub_8039AF4(struct Sprite *sprite); void CB2_InitBattle(void) { @@ -129,7 +172,7 @@ static void CB2_InitBattleInternal(void) SetHBlankCallback(NULL); SetVBlankCallback(NULL); - CpuFill32(0, (void *)VRAM, VRAM_SIZE); + CpuFill32(0, (void*)(VRAM), VRAM_SIZE); SetGpuReg(REG_OFFSET_MOSAIC, 0); SetGpuReg(REG_OFFSET_WIN0H, 240); @@ -182,7 +225,7 @@ static void CB2_InitBattleInternal(void) if (gBattleTypeFlags & BATTLE_TYPE_RECORDED) gBattleTerrain = BATTLE_TERRAIN_INSIDE; - c2_berry_program_update_menu(); + sub_80356D0(); LoadBattleTextboxAndBackground(); ResetSpriteData(); ResetTasks(); @@ -573,12 +616,12 @@ static void CB2_HandleStartBattle(void) { ResetBlockReceivedFlags(); memcpy(gEnemyParty + 4, gBlockRecvBuffer[enemyMultiplayerId], sizeof(struct Pokemon) * 2); - shedinja_something(&gEnemyParty[0]); - shedinja_something(&gEnemyParty[1]); - shedinja_something(&gEnemyParty[2]); - shedinja_something(&gEnemyParty[3]); - shedinja_something(&gEnemyParty[4]); - shedinja_something(&gEnemyParty[5]); + TryCorrectShedinjaLanguage(&gEnemyParty[0]); + TryCorrectShedinjaLanguage(&gEnemyParty[1]); + TryCorrectShedinjaLanguage(&gEnemyParty[2]); + TryCorrectShedinjaLanguage(&gEnemyParty[3]); + TryCorrectShedinjaLanguage(&gEnemyParty[4]); + TryCorrectShedinjaLanguage(&gEnemyParty[5]); gBattleCommunication[MULTIUSE_STATE]++; } break; @@ -827,18 +870,18 @@ static void CB2_HandleStartMultiPartnerBattle(void) ResetBlockReceivedFlags(); if (GetMultiplayerId() != 0) memcpy(gEnemyParty + 4, gBlockRecvBuffer[0], sizeof(struct Pokemon) * 2); - shedinja_something(&gPlayerParty[0]); - shedinja_something(&gPlayerParty[1]); - shedinja_something(&gPlayerParty[2]); - shedinja_something(&gPlayerParty[3]); - shedinja_something(&gPlayerParty[4]); - shedinja_something(&gPlayerParty[5]); - shedinja_something(&gEnemyParty[0]); - shedinja_something(&gEnemyParty[1]); - shedinja_something(&gEnemyParty[2]); - shedinja_something(&gEnemyParty[3]); - shedinja_something(&gEnemyParty[4]); - shedinja_something(&gEnemyParty[5]); + TryCorrectShedinjaLanguage(&gPlayerParty[0]); + TryCorrectShedinjaLanguage(&gPlayerParty[1]); + TryCorrectShedinjaLanguage(&gPlayerParty[2]); + TryCorrectShedinjaLanguage(&gPlayerParty[3]); + TryCorrectShedinjaLanguage(&gPlayerParty[4]); + TryCorrectShedinjaLanguage(&gPlayerParty[5]); + TryCorrectShedinjaLanguage(&gEnemyParty[0]); + TryCorrectShedinjaLanguage(&gEnemyParty[1]); + TryCorrectShedinjaLanguage(&gEnemyParty[2]); + TryCorrectShedinjaLanguage(&gEnemyParty[3]); + TryCorrectShedinjaLanguage(&gEnemyParty[4]); + TryCorrectShedinjaLanguage(&gEnemyParty[5]); gBattleCommunication[MULTIUSE_STATE]++; } break; @@ -1262,19 +1305,19 @@ static void CB2_HandleStartMultiBattle(void) } } } - shedinja_something(&gPlayerParty[0]); - shedinja_something(&gPlayerParty[1]); - shedinja_something(&gPlayerParty[2]); - shedinja_something(&gPlayerParty[3]); - shedinja_something(&gPlayerParty[4]); - shedinja_something(&gPlayerParty[5]); + TryCorrectShedinjaLanguage(&gPlayerParty[0]); + TryCorrectShedinjaLanguage(&gPlayerParty[1]); + TryCorrectShedinjaLanguage(&gPlayerParty[2]); + TryCorrectShedinjaLanguage(&gPlayerParty[3]); + TryCorrectShedinjaLanguage(&gPlayerParty[4]); + TryCorrectShedinjaLanguage(&gPlayerParty[5]); - shedinja_something(&gEnemyParty[0]); - shedinja_something(&gEnemyParty[1]); - shedinja_something(&gEnemyParty[2]); - shedinja_something(&gEnemyParty[3]); - shedinja_something(&gEnemyParty[4]); - shedinja_something(&gEnemyParty[5]); + TryCorrectShedinjaLanguage(&gEnemyParty[0]); + TryCorrectShedinjaLanguage(&gEnemyParty[1]); + TryCorrectShedinjaLanguage(&gEnemyParty[2]); + TryCorrectShedinjaLanguage(&gEnemyParty[3]); + TryCorrectShedinjaLanguage(&gEnemyParty[4]); + TryCorrectShedinjaLanguage(&gEnemyParty[5]); gBattleCommunication[MULTIUSE_STATE]++; } @@ -1341,3 +1384,991 @@ static void CB2_HandleStartMultiBattle(void) } } +void BattleMainCB2(void) +{ + AnimateSprites(); + BuildOamBuffer(); + RunTextPrinters(); + UpdatePaletteFade(); + RunTasks(); + + if (gMain.heldKeys & B_BUTTON && gBattleTypeFlags & BATTLE_TYPE_RECORDED && sub_8186450()) + { + gScriptResult = gBattleOutcome = BATTLE_PLAYER_TELEPORTED; + ResetPaletteFadeControl(); + BeginNormalPaletteFade(-1, 0, 0, 0x10, 0); + SetMainCallback2(CB2_QuitRecordedBattle); + } +} + +static void FreeRestoreBattleData(void) +{ + gMain.callback1 = gPreBattleCallback1; + gUnknown_02039B28[0x15] = 3; + gMain.inBattle = 0; + ZeroEnemyPartyMons(); + m4aSongNumStop(0x5A); + FreeMonSpritesGfx(); + FreeBattleSpritesData(); + FreeBattleResources(); +} + +void CB2_QuitRecordedBattle(void) +{ + UpdatePaletteFade(); + if (!gPaletteFade.active) + { + m4aMPlayStop(&gMPlay_SE1); + m4aMPlayStop(&gMPlay_SE2); + FreeRestoreBattleData(); + FreeAllWindowBuffers(); + SetMainCallback2(gMain.savedCallback); + } +} + +static void sub_8038528(struct Sprite* sprite) +{ + sprite->data0 = 0; + sprite->callback = sub_8038538; +} + +static void sub_8038538(struct Sprite *sprite) +{ + u16 *arr = (u16*)(gDecompressionBuffer); + + switch (sprite->data0) + { + case 0: + sprite->data0++; + sprite->data1 = 0; + sprite->data2 = 0x281; + sprite->data3 = 0; + sprite->data4 = 1; + // fall through + case 1: + sprite->data4--; + if (sprite->data4 == 0) + { + s32 i; + s32 r2; + s32 r0; + + sprite->data4 = 2; + r2 = sprite->data1 + sprite->data3 * 32; + r0 = sprite->data2 - sprite->data3 * 32; + for (i = 0; i < 29; i += 2) + { + arr[r2 + i] = 0x3D; + arr[r0 + i] = 0x3D; + } + sprite->data3++; + if (sprite->data3 == 21) + { + sprite->data0++; + sprite->data1 = 32; + } + } + break; + case 2: + sprite->data1--; + if (sprite->data1 == 20) + SetMainCallback2(CB2_InitBattle); + break; + } +} + +static u8 CreateNPCTrainerParty(struct Pokemon *party, u16 trainerNum, bool8 firstTrainer) +{ + u32 nameHash = 0; + u32 personalityValue; + u8 fixedIV; + s32 i, j; + u8 monsCount; + + if (trainerNum == SECRET_BASE_OPPONENT) + return 0; + + if (gBattleTypeFlags & BATTLE_TYPE_TRAINER && !(gBattleTypeFlags & (BATTLE_TYPE_FRONTIER + | BATTLE_TYPE_EREADER_TRAINER + | BATTLE_TYPE_x4000000))) + { + if (firstTrainer == TRUE) + ZeroEnemyPartyMons(); + + if (gBattleTypeFlags & BATTLE_TYPE_TWO_OPPONENTS) + { + if (gTrainers[trainerNum].partySize > 3) + monsCount = 3; + else + monsCount = gTrainers[trainerNum].partySize; + } + else + { + monsCount = gTrainers[trainerNum].partySize; + } + + for (i = 0; i < monsCount; i++) + { + + if (gTrainers[trainerNum].doubleBattle == TRUE) + personalityValue = 0x80; + else if (gTrainers[trainerNum].encounterMusic_gender & 0x80) + personalityValue = 0x78; + else + personalityValue = 0x88; + + for (j = 0; gTrainers[trainerNum].trainerName[j] != 0xFF; j++) + nameHash += gTrainers[trainerNum].trainerName[j]; + + switch (gTrainers[trainerNum].partyFlags) + { + case 0: + { + const struct TrainerMonNoItemDefaultMoves *partyData = gTrainers[trainerNum].party.NoItemDefaultMoves; + + for (j = 0; gSpeciesNames[partyData[i].species][j] != 0xFF; j++) + nameHash += gSpeciesNames[partyData[i].species][j]; + + personalityValue += nameHash << 8; + fixedIV = partyData[i].iv * 31 / 255; + CreateMon(&party[i], partyData[i].species, partyData[i].lvl, fixedIV, TRUE, personalityValue, OT_ID_RANDOM_NO_SHINY, 0); + break; + } + case PARTY_FLAG_CUSTOM_MOVES: + { + const struct TrainerMonNoItemCustomMoves *partyData = gTrainers[trainerNum].party.NoItemCustomMoves; + + for (j = 0; gSpeciesNames[partyData[i].species][j] != 0xFF; j++) + nameHash += gSpeciesNames[partyData[i].species][j]; + + personalityValue += nameHash << 8; + fixedIV = partyData[i].iv * 31 / 255; + CreateMon(&party[i], partyData[i].species, partyData[i].lvl, fixedIV, TRUE, personalityValue, 2, 0); + + for (j = 0; j < 4; j++) + { + SetMonData(&party[i], MON_DATA_MOVE1 + j, &partyData[i].moves[j]); + SetMonData(&party[i], MON_DATA_PP1 + j, &gBattleMoves[partyData[i].moves[j]].pp); + } + break; + } + case PARTY_FLAG_HAS_ITEM: + { + const struct TrainerMonItemDefaultMoves *partyData = gTrainers[trainerNum].party.ItemDefaultMoves; + + for (j = 0; gSpeciesNames[partyData[i].species][j] != 0xFF; j++) + nameHash += gSpeciesNames[partyData[i].species][j]; + + personalityValue += nameHash << 8; + fixedIV = partyData[i].iv * 31 / 255; + CreateMon(&party[i], partyData[i].species, partyData[i].lvl, fixedIV, TRUE, personalityValue, 2, 0); + + SetMonData(&party[i], MON_DATA_HELD_ITEM, &partyData[i].heldItem); + break; + } + case PARTY_FLAG_CUSTOM_MOVES | PARTY_FLAG_HAS_ITEM: + { + const struct TrainerMonItemCustomMoves *partyData = gTrainers[trainerNum].party.ItemCustomMoves; + + for (j = 0; gSpeciesNames[partyData[i].species][j] != 0xFF; j++) + nameHash += gSpeciesNames[partyData[i].species][j]; + + personalityValue += nameHash << 8; + fixedIV = partyData[i].iv * 31 / 255; + CreateMon(&party[i], partyData[i].species, partyData[i].lvl, fixedIV, TRUE, personalityValue, 2, 0); + + SetMonData(&party[i], MON_DATA_HELD_ITEM, &partyData[i].heldItem); + + for (j = 0; j < 4; j++) + { + SetMonData(&party[i], MON_DATA_MOVE1 + j, &partyData[i].moves[j]); + SetMonData(&party[i], MON_DATA_PP1 + j, &gBattleMoves[partyData[i].moves[j]].pp); + } + break; + } + } + } + + gBattleTypeFlags |= gTrainers[trainerNum].doubleBattle; + } + + return gTrainers[trainerNum].partySize; +} + +void sub_8038A04(void) // unused +{ + if (REG_VCOUNT < 0xA0 && REG_VCOUNT >= 0x6F) + SetGpuReg(REG_OFFSET_BG0CNT, 0x9800); +} + +void VBlankCB_Battle(void) +{ + // change gRngSeed every vblank unless the battle could be recorded + if (!(gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_FRONTIER | BATTLE_TYPE_RECORDED))) + Random(); + + SetGpuReg(REG_OFFSET_BG0HOFS, gBattle_BG0_X); + SetGpuReg(REG_OFFSET_BG0VOFS, gBattle_BG0_Y); + SetGpuReg(REG_OFFSET_BG1HOFS, gBattle_BG1_X); + SetGpuReg(REG_OFFSET_BG1VOFS, gBattle_BG1_Y); + SetGpuReg(REG_OFFSET_BG2HOFS, gBattle_BG2_X); + SetGpuReg(REG_OFFSET_BG2VOFS, gBattle_BG2_Y); + SetGpuReg(REG_OFFSET_BG3HOFS, gBattle_BG3_X); + SetGpuReg(REG_OFFSET_BG3VOFS, gBattle_BG3_Y); + SetGpuReg(REG_OFFSET_WIN0H, gBattle_WIN0H); + SetGpuReg(REG_OFFSET_WIN0V, gBattle_WIN0V); + SetGpuReg(REG_OFFSET_WIN1H, gBattle_WIN1H); + SetGpuReg(REG_OFFSET_WIN1V, gBattle_WIN1V); + LoadOam(); + ProcessSpriteCopyRequests(); + TransferPlttBuffer(); + sub_80BA0A8(); +} + +void nullsub_17(void) +{ + +} + +static void sub_8038B04(struct Sprite *sprite) +{ + if (sprite->data0 != 0) + sprite->pos1.x = sprite->data1 + ((sprite->data2 & 0xFF00) >> 8); + else + sprite->pos1.x = sprite->data1 - ((sprite->data2 & 0xFF00) >> 8); + + sprite->data2 += 0x180; + + if (sprite->affineAnimEnded) + { + FreeSpriteTilesByTag(0x2710); + FreeSpritePaletteByTag(0x2710); + FreeSpriteOamMatrix(sprite); + DestroySprite(sprite); + } +} + +void sub_8038B74(struct Sprite *sprite) +{ + StartSpriteAffineAnim(sprite, 1); + sprite->callback = sub_8038B04; + PlaySE(SE_BT_START); +} + +static void sub_8038B94(u8 taskId) +{ + struct Pokemon *sp4 = NULL; + struct Pokemon *sp8 = NULL; + u8 r2 = gBattleScripting.multiplayerId; + u32 r7; + s32 i; + + if (gBattleTypeFlags & BATTLE_TYPE_MULTI) + { + switch (gLinkPlayers[r2].lp_field_18) + { + case 0: + case 2: + sp4 = gPlayerParty; + sp8 = gEnemyParty; + break; + case 1: + case 3: + sp4 = gEnemyParty; + sp8 = gPlayerParty; + break; + } + } + else + { + sp4 = gPlayerParty; + sp8 = gEnemyParty; + } + + r7 = 0; + for (i = 0; i < 6; i++) + { + u16 species = GetMonData(&sp4[i], MON_DATA_SPECIES2); + u16 hp = GetMonData(&sp4[i], MON_DATA_HP); + u32 status = GetMonData(&sp4[i], MON_DATA_STATUS); + + if (species == SPECIES_NONE) + continue; + if (species != SPECIES_EGG && hp != 0 && status == 0) + r7 |= 1 << i * 2; + + if (species == 0) + continue; + if (hp != 0 && (species == SPECIES_EGG || status != 0)) + r7 |= 2 << i * 2; + + if (species == 0) + continue; + if (species != SPECIES_EGG && hp == 0) + r7 |= 3 << i * 2; + } + gTasks[taskId].data[3] = r7; + + r7 = 0; + for (i = 0; i < 6; i++) + { + u16 species = GetMonData(&sp8[i], MON_DATA_SPECIES2); + u16 hp = GetMonData(&sp8[i], MON_DATA_HP); + u32 status = GetMonData(&sp8[i], MON_DATA_STATUS); + + if (species == SPECIES_NONE) + continue; + if (species != SPECIES_EGG && hp != 0 && status == 0) + r7 |= 1 << i * 2; + + if (species == SPECIES_NONE) + continue; + if (hp != 0 && (species == SPECIES_EGG || status != 0)) + r7 |= 2 << i * 2; + + if (species == SPECIES_NONE) + continue; + if (species != SPECIES_EGG && hp == 0) + r7 |= 3 << i * 2; + } + gTasks[taskId].data[4] = r7; +} + +void sub_8038D64(void) +{ + s32 i; + u8 taskId; + + SetHBlankCallback(NULL); + SetVBlankCallback(NULL); + gBattleTypeFlags &= ~(BATTLE_TYPE_20); + + if (gBattleTypeFlags & BATTLE_TYPE_FRONTIER) + { + SetMainCallback2(gMain.savedCallback); + FreeBattleResources(); + FreeBattleSpritesData(); + FreeMonSpritesGfx(); + } + else + { + CpuFill32(0, (void*)(VRAM), VRAM_SIZE); + SetGpuReg(REG_OFFSET_MOSAIC, 0); + SetGpuReg(REG_OFFSET_WIN0H, 0xF0); + SetGpuReg(REG_OFFSET_WIN0V, 0x5051); + SetGpuReg(REG_OFFSET_WININ, 0); + SetGpuReg(REG_OFFSET_WINOUT, 0); + gBattle_WIN0H = 0xF0; + gBattle_WIN0V = 0x5051; + dp12_8087EA4(); + + for (i = 0; i < 80; i++) + { + gUnknown_02038C28.unk0[i] = 0xF0; + gUnknown_02038C28.unk780[i] = 0xF0; + } + for (i = 80; i < 160; i++) + { + asm(""::"r"(i)); // Needed to stop the compiler from optimizing out the loop counter + gUnknown_02038C28.unk0[i] = 0xFF10; + gUnknown_02038C28.unk780[i] = 0xFF10; + } + + ResetPaletteFade(); + + gBattle_BG0_X = 0; + gBattle_BG0_Y = 0; + gBattle_BG1_X = 0; + gBattle_BG1_Y = 0; + gBattle_BG2_X = 0; + gBattle_BG2_Y = 0; + gBattle_BG3_X = 0; + gBattle_BG3_Y = 0; + + sub_80356D0(); + LoadCompressedPalette(gUnknown_08C004E0, 0, 64); + ApplyPlayerChosenFrameToBattleMenu(); + ResetSpriteData(); + ResetTasks(); + LoadBattleEntryBackground(); + SetGpuReg(REG_OFFSET_WINOUT, 0x37); + FreeAllSpritePalettes(); + gReservedSpritePaletteCount = 4; + SetVBlankCallback(VBlankCB_Battle); + + taskId = CreateTask(task00_0800F6FC, 0); + gTasks[taskId].data[1] = 0x10E; + gTasks[taskId].data[2] = 0x5A; + gTasks[taskId].data[5] = 1; + sub_8038B94(taskId); + SetMainCallback2(sub_8038F14); + gBattleCommunication[MULTIUSE_STATE] = 0; + } +} + +static void sub_8038F14(void) +{ + sub_8038F34(); + AnimateSprites(); + BuildOamBuffer(); + RunTextPrinters(); + UpdatePaletteFade(); + RunTasks(); +} + +static void sub_8038F34(void) +{ + s32 i; + + switch (gBattleCommunication[MULTIUSE_STATE]) + { + case 0: + ShowBg(0); + ShowBg(1); + ShowBg(2); + gBattleCommunication[1] = 0xFF; + gBattleCommunication[MULTIUSE_STATE]++; + break; + case 1: + if (--gBattleCommunication[1] == 0) + { + BeginNormalPaletteFade(-1, 0, 0, 0x10, 0); + gBattleCommunication[MULTIUSE_STATE]++; + } + break; + case 2: + if (!gPaletteFade.active) + { + u8 monsCount; + + gMain.field_439_x4 = sub_8185FAC(); + + if (gBattleTypeFlags & BATTLE_TYPE_MULTI) + monsCount = 4; + else + monsCount = 2; + + for (i = 0; i < monsCount && (gLinkPlayers[i].version & 0xFF) == 3; i++); + + if (!gSaveBlock2Ptr->field_CA9_b && i == monsCount) + { + if (FlagGet(SYS_FRONTIER_PASS)) + { + FreeAllWindowBuffers(); + SetMainCallback2(sub_80392A8); + } + else if (!gMain.field_439_x4) + { + SetMainCallback2(gMain.savedCallback); + FreeBattleResources(); + FreeBattleSpritesData(); + FreeMonSpritesGfx(); + } + else if (gReceivedRemoteLinkPlayers == 0) + { + CreateTask(sub_80B3AF8, 5); + gBattleCommunication[MULTIUSE_STATE]++; + } + else + { + gBattleCommunication[MULTIUSE_STATE]++; + } + } + else + { + SetMainCallback2(gMain.savedCallback); + FreeBattleResources(); + FreeBattleSpritesData(); + FreeMonSpritesGfx(); + } + } + break; + case 3: + CpuFill32(0, (void*)(VRAM), VRAM_SIZE); + + for (i = 0; i < 2; i++) + LoadChosenBattleElement(i); + + BeginNormalPaletteFade(-1, 0, 0x10, 0, 0); + gBattleCommunication[MULTIUSE_STATE]++; + break; + case 4: + if (!gPaletteFade.active) + gBattleCommunication[MULTIUSE_STATE]++; + break; + case 5: + if (!FuncIsActiveTask(sub_80B3AF8)) + gBattleCommunication[MULTIUSE_STATE]++; + break; + case 6: + if (sub_800A520() == TRUE) + { + sub_800ADF8(); + sub_814F9EC(gText_LinkStandby3, 0); + gBattleCommunication[MULTIUSE_STATE]++; + } + break; + case 7: + if (!IsTextPrinterActive(0)) + { + if (sub_800A520() == TRUE) + gBattleCommunication[MULTIUSE_STATE]++; + } + break; + case 8: + if (!gLinkVSyncDisabled) + sub_800AC34(); + gBattleCommunication[MULTIUSE_STATE]++; + break; + case 9: + if (!gMain.field_439_x4 || gLinkVSyncDisabled || gReceivedRemoteLinkPlayers != 1) + { + gMain.field_439_x4 = 0; + SetMainCallback2(gMain.savedCallback); + FreeBattleResources(); + FreeBattleSpritesData(); + FreeMonSpritesGfx(); + } + break; + } +} + +u32 sub_80391E0(u8 arrayId, u8 caseId) +{ + u32 ret = 0; + + switch (caseId) + { + case 0: + ret = gUnknown_0831AA08[arrayId].bg; + break; + case 1: + ret = gUnknown_0831AA08[arrayId].charBaseIndex; + break; + case 2: + ret = gUnknown_0831AA08[arrayId].mapBaseIndex; + break; + case 3: + ret = gUnknown_0831AA08[arrayId].screenSize; + break; + case 4: + ret = gUnknown_0831AA08[arrayId].paletteMode; + break; + case 5: + ret = gUnknown_0831AA08[arrayId].priority; + break; + case 6: + ret = gUnknown_0831AA08[arrayId].baseTile; + break; + } + + return ret; +} + +static void sub_80392A8(void) +{ + s32 i; + + SetHBlankCallback(NULL); + SetVBlankCallback(NULL); + CpuFill32(0, (void*)(VRAM), VRAM_SIZE); + ResetPaletteFade(); + gBattle_BG0_X = 0; + gBattle_BG0_Y = 0; + gBattle_BG1_X = 0; + gBattle_BG1_Y = 0; + gBattle_BG2_X = 0; + gBattle_BG2_Y = 0; + gBattle_BG3_X = 0; + gBattle_BG3_Y = 0; + sub_80356D0(); + SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_OBJ_ON | DISPCNT_OBJ_1D_MAP); + ApplyPlayerChosenFrameToBattleMenu(); + + for (i = 0; i < 2; i++) + LoadChosenBattleElement(i); + + ResetSpriteData(); + ResetTasks(); + FreeAllSpritePalettes(); + gReservedSpritePaletteCount = 4; + SetVBlankCallback(VBlankCB_Battle); + SetMainCallback2(sub_803937C); + BeginNormalPaletteFade(-1, 0, 0x10, 0, 0); + gBattleCommunication[MULTIUSE_STATE] = 0; +} + +static void sub_803937C(void) +{ + sub_803939C(); + AnimateSprites(); + BuildOamBuffer(); + RunTextPrinters(); + UpdatePaletteFade(); + RunTasks(); +} + +static void sub_803939C(void) +{ + switch (gBattleCommunication[MULTIUSE_STATE]) + { + case 0: + ShowBg(0); + ShowBg(1); + ShowBg(2); + gBattleCommunication[MULTIUSE_STATE]++; + break; + case 1: + if (gMain.field_439_x4 && gReceivedRemoteLinkPlayers == 0) + CreateTask(sub_80B3AF8, 5); + gBattleCommunication[MULTIUSE_STATE]++; + break; + case 2: + if (!FuncIsActiveTask(sub_80B3AF8)) + gBattleCommunication[MULTIUSE_STATE]++; + break; + case 3: + if (!gPaletteFade.active) + { + sub_814F9EC(gText_RecordBattleToPass, 0); + gBattleCommunication[MULTIUSE_STATE]++; + } + break; + case 4: + if (!IsTextPrinterActive(0)) + { + sub_8056A3C(0x18, 8, 0x1D, 0xD, 0); + sub_814F9EC(gText_BattleYesNoChoice, 0xC); + gBattleCommunication[CURSOR_POSITION] = 1; + BattleCreateCursorAt(1); + gBattleCommunication[MULTIUSE_STATE]++; + } + break; + case 5: + if (gMain.newKeys & DPAD_UP) + { + if (gBattleCommunication[CURSOR_POSITION] != 0) + { + PlaySE(SE_SELECT); + BattleDestroyCursorAt(gBattleCommunication[CURSOR_POSITION]); + gBattleCommunication[CURSOR_POSITION] = 0; + BattleCreateCursorAt(0); + } + } + else if (gMain.newKeys & DPAD_DOWN) + { + if (gBattleCommunication[CURSOR_POSITION] == 0) + { + PlaySE(SE_SELECT); + BattleDestroyCursorAt(gBattleCommunication[CURSOR_POSITION]); + gBattleCommunication[CURSOR_POSITION] = 1; + BattleCreateCursorAt(1); + } + } + else if (gMain.newKeys & A_BUTTON) + { + PlaySE(SE_SELECT); + if (gBattleCommunication[CURSOR_POSITION] == 0) + { + sub_8056A3C(0x18, 8, 0x1D, 0xD, 1); + gBattleCommunication[1] = MoveRecordedBattleToSaveData(); + gBattleCommunication[MULTIUSE_STATE] = 10; + } + else + { + gBattleCommunication[MULTIUSE_STATE]++; + } + } + else if (gMain.newKeys & B_BUTTON) + { + PlaySE(SE_SELECT); + gBattleCommunication[MULTIUSE_STATE]++; + } + break; + case 6: + if (sub_800A520() == TRUE) + { + sub_8056A3C(0x18, 8, 0x1D, 0xD, 1); + if (gMain.field_439_x4) + { + sub_800ADF8(); + sub_814F9EC(gText_LinkStandby3, 0); + } + gBattleCommunication[MULTIUSE_STATE]++; + } + break; + case 8: + if (--gBattleCommunication[1] == 0) + { + if (gMain.field_439_x4 && !gLinkVSyncDisabled) + sub_800AC34(); + gBattleCommunication[MULTIUSE_STATE]++; + } + break; + case 9: + if (!gMain.field_439_x4 || gLinkVSyncDisabled || gReceivedRemoteLinkPlayers != 1) + { + gMain.field_439_x4 = 0; + if (!gPaletteFade.active) + { + SetMainCallback2(gMain.savedCallback); + FreeBattleResources(); + FreeBattleSpritesData(); + FreeMonSpritesGfx(); + } + } + break; + case 10: + if (gBattleCommunication[1] == 1) + { + PlaySE(SE_SAVE); + BattleStringExpandPlaceholdersToDisplayedString(gText_BattleRecordedOnPass); + sub_814F9EC(gDisplayedStringBattle, 0); + gBattleCommunication[1] = 0x80; + gBattleCommunication[MULTIUSE_STATE]++; + } + else + { + BattleStringExpandPlaceholdersToDisplayedString(gText_BattleRecordCouldntBeSaved); + sub_814F9EC(gDisplayedStringBattle, 0); + gBattleCommunication[1] = 0x80; + gBattleCommunication[MULTIUSE_STATE]++; + } + break; + case 11: + if (sub_800A520() == TRUE && !IsTextPrinterActive(0) && --gBattleCommunication[1] == 0) + { + if (gMain.field_439_x4) + { + sub_800ADF8(); + sub_814F9EC(gText_LinkStandby3, 0); + } + gBattleCommunication[MULTIUSE_STATE]++; + } + break; + case 12: + case 7: + if (!IsTextPrinterActive(0)) + { + if (gMain.field_439_x4) + { + if (sub_800A520() == TRUE) + { + BeginNormalPaletteFade(-1, 0, 0, 0x10, 0); + gBattleCommunication[1] = 0x20; + gBattleCommunication[MULTIUSE_STATE] = 8; + } + + } + else + { + BeginNormalPaletteFade(-1, 0, 0, 0x10, 0); + gBattleCommunication[1] = 0x20; + gBattleCommunication[MULTIUSE_STATE] = 8; + } + } + break; + } +} + +static void TryCorrectShedinjaLanguage(struct Pokemon *mon) +{ + u8 nickname[POKEMON_NAME_LENGTH + 1]; + u8 language = LANGUAGE_JAPANESE; + + if (GetMonData(mon, MON_DATA_SPECIES) == SPECIES_SHEDINJA + && GetMonData(mon, MON_DATA_LANGUAGE) != language) + { + GetMonData(mon, MON_DATA_NICKNAME, nickname); + if (StringCompareWithoutExtCtrlCodes(nickname, gText_ShedinjaJapaneseName) == 0) + SetMonData(mon, MON_DATA_LANGUAGE, &language); + } +} + +u32 sub_80397C4(u32 setId, u32 tableId) +{ + return gUnknown_0831ABA0[setId][tableId].width * 8; +} + +#define tBank data0 +#define tSpeciesId data2 + +static void oac_poke_opponent(struct Sprite *sprite) +{ + sprite->callback = sub_803980C; + StartSpriteAnimIfDifferent(sprite, 0); + BeginNormalPaletteFade(0x20000, 0, 10, 10, 0x2108); +} + +static void sub_803980C(struct Sprite *sprite) +{ + if ((gUnknown_020243FC & 1) == 0) + { + sprite->pos2.x += 2; + if (sprite->pos2.x == 0) + { + sprite->callback = sub_8039838; + } + } +} + +static void sub_8039838(struct Sprite *sprite) +{ + if (sprite->animEnded) + { + sub_8076918(sprite->tBank); + sub_80729D0(gHealthBoxesIds[sprite->tBank]); + sprite->callback = sub_8039894; + StartSpriteAnimIfDifferent(sprite, 0); + BeginNormalPaletteFade(0x20000, 0, 10, 0, 0x2108); + } +} + +static void sub_8039894(struct Sprite *sprite) +{ + if (!gPaletteFade.active) + { + BattleAnimateFrontSprite(sprite, sprite->tSpeciesId, FALSE, 1); + } +} + +void SpriteCallbackDummy_2(struct Sprite *sprite) +{ + +} + +static void sub_80398BC(struct Sprite *sprite) // unused? +{ + sprite->data3 = 6; + sprite->data4 = 1; + sprite->callback = sub_80398D0; +} + +extern u32 gUnknown_02022F88; +extern u16 gBattlePartyID[BATTLE_BANKS_COUNT]; +extern u8 gBattleMonForms[BATTLE_BANKS_COUNT]; + +static void sub_80398D0(struct Sprite *sprite) +{ + sprite->data4--; + if (sprite->data4 == 0) + { + sprite->data4 = 8; + sprite->invisible ^= 1; + sprite->data3--; + if (sprite->data3 == 0) + { + sprite->invisible = FALSE; + sprite->callback = SpriteCallbackDummy_2; + gUnknown_02022F88 = 0; + } + } +} + +// to get rid of once the struct is declared in a header +struct MonCoords +{ + // This would use a bitfield, but sub_8079F44 + // uses it as a u8 and casting won't match. + u8 coords; // u8 x:4, y:4; + u8 y_offset; +}; + +extern const struct MonCoords gMonFrontPicCoords[]; +extern const struct MonCoords gCastformFrontSpriteCoords[]; + +void sub_8039934(struct Sprite *sprite) +{ + u8 bank = sprite->tBank; + u16 species; + u8 yOffset; + + if (gBattleSpritesDataPtr->bankData[bank].transformSpecies != 0) + species = gBattleSpritesDataPtr->bankData[bank].transformSpecies; + else + species = sprite->tSpeciesId; + + GetMonData(&gEnemyParty[gBattlePartyID[bank]], MON_DATA_PERSONALITY); // Unused return value + + if (species == SPECIES_UNOWN) + { + u32 personalityValue = GetMonData(&gEnemyParty[gBattlePartyID[bank]], MON_DATA_PERSONALITY); + u16 unownForm = ((((personalityValue & 0x3000000) >> 18) | ((personalityValue & 0x30000) >> 12) | ((personalityValue & 0x300) >> 6) | (personalityValue & 3)) % 0x1C); + u16 unownSpecies; + + if (unownForm == 0) + unownSpecies = SPECIES_UNOWN; // Use the A Unown form + else + unownSpecies = NUM_SPECIES + unownForm; // Use one of the other Unown letters + + yOffset = gMonFrontPicCoords[unownSpecies].y_offset; + } + else if (species == SPECIES_CASTFORM) + { + yOffset = gCastformFrontSpriteCoords[gBattleMonForms[bank]].y_offset; + } + else if (species > NUM_SPECIES) + { + yOffset = gMonFrontPicCoords[SPECIES_NONE].y_offset; + } + else + { + yOffset = gMonFrontPicCoords[species].y_offset; + } + + sprite->data3 = 8 - yOffset / 8; + sprite->data4 = 1; + sprite->callback = sub_8039A48; +} + +static void sub_8039A48(struct Sprite *sprite) +{ + s32 i; + + sprite->data4--; + if (sprite->data4 == 0) + { + sprite->data4 = 2; + sprite->pos2.y += 8; + sprite->data3--; + if (sprite->data3 < 0) + { + FreeSpriteOamMatrix(sprite); + DestroySprite(sprite); + } + else + { + u8 *dst = (u8 *)gMonSpritesGfxPtr->sprites[GetBankIdentity(sprite->tBank)] + (gBattleMonForms[sprite->tBank] << 11) + (sprite->data3 << 8); + + for (i = 0; i < 0x100; i++) + *(dst++) = 0; + + StartSpriteAnim(sprite, gBattleMonForms[sprite->tBank]); + } + } +} + +void sub_8039AD8(struct Sprite *sprite) +{ + sprite->data3 = 8; + sprite->data4 = sprite->invisible; + sprite->callback = sub_8039AF4; +} + +void sub_8039AF4(struct Sprite *sprite) +{ + sprite->data3--; + if (sprite->data3 == 0) + { + sprite->invisible ^= 1; + sprite->data3 = 8; + } +} + +void sub_8039B2C(struct Sprite *sprite) +{ + sprite->invisible = sprite->data4; + sprite->data4 = FALSE; + sprite->callback = SpriteCallbackDummy_2; +} + diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 3b719b8ed..03e1b6a4a 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -145,7 +145,7 @@ extern u16 GetBattlePyramidPickupItemId(void); extern u8 sav1_map_get_light_level(void); extern u8 sub_813B21C(void); extern u16 get_unknown_box_id(void); -extern void c2_berry_program_update_menu(void); +extern void sub_80356D0(void); // BattleScripts extern const u8 BattleScript_MoveEnd[]; @@ -11216,7 +11216,7 @@ static void atkF2_display_dex_info(void) } break; case 3: - c2_berry_program_update_menu(); + sub_80356D0(); LoadBattleTextboxAndBackground(); gBattle_BG3_X = 0x100; gBattleCommunication[0]++; diff --git a/src/egg_hatch.c b/src/egg_hatch.c index c5cee6357..4e4c10090 100644 --- a/src/egg_hatch.c +++ b/src/egg_hatch.c @@ -65,7 +65,7 @@ extern void fade_screen(u8, u8); extern void overworld_free_bg_tilemaps(void); extern void sub_80AF168(void); extern void AllocateMonSpritesGfx(void); -extern void sub_805F094(void); +extern void FreeMonSpritesGfx(void); extern void remove_some_task(void); extern void reset_temp_tile_data_buffers(void); extern void c2_exit_to_overworld_2_switch(void); @@ -570,7 +570,7 @@ static void CB2_EggHatch_0(void) static void EggHatchSetMonNickname(void) { SetMonData(&gPlayerParty[gSpecialVar_0x8004], MON_DATA_NICKNAME, gStringVar3); - sub_805F094(); + FreeMonSpritesGfx(); Free(sEggHatchData); SetMainCallback2(c2_exit_to_overworld_2_switch); } @@ -691,7 +691,7 @@ static void CB2_EggHatch_1(void) case 12: if (!gPaletteFade.active) { - sub_805F094(); + FreeMonSpritesGfx(); RemoveWindow(sEggHatchData->windowId); UnsetBgTilemapBuffer(0); UnsetBgTilemapBuffer(1); diff --git a/sym_ewram.txt b/sym_ewram.txt index ce3b4f250..aecb28dac 100644 --- a/sym_ewram.txt +++ b/sym_ewram.txt @@ -520,7 +520,7 @@ gUnknown_020244BC: @ 20244BC gUnknown_020244CC: @ 20244CC .space 0x4 -gUnknown_020244D0: @ 20244D0 +gBattleSpritesDataPtr: @ 20244D0 .space 0x4 gMonSpritesGfxPtr: @ 20244D4 From 0fe97e838eab14723a4a38a773e2bc4d1494241e Mon Sep 17 00:00:00 2001 From: camthesaxman Date: Sun, 1 Oct 2017 15:05:00 -0500 Subject: [PATCH 15/42] add asmdiff.sh comparison script --- asmdiff.sh | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 asmdiff.sh diff --git a/asmdiff.sh b/asmdiff.sh new file mode 100644 index 000000000..1d2141c32 --- /dev/null +++ b/asmdiff.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +OBJDUMP="$DEVKITARM/bin/arm-none-eabi-objdump -D -bbinary -marmv4t -Mforce-thumb" +OPTIONS="--start-address=$(($1)) --stop-address=$(($1 + $2))" +$OBJDUMP $OPTIONS baserom.gba > baserom.dump +$OBJDUMP $OPTIONS pokeemerald.gba > pokeemerald.dump +diff baserom.dump pokeemerald.dump From 84e5819ca3944df99a1817ad8ab828993035f18b Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sun, 1 Oct 2017 19:01:37 -0400 Subject: [PATCH 16/42] Sanitize data/tilesets.s, 2 --- data/tileset.s | 56 ++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 43 insertions(+), 13 deletions(-) diff --git a/data/tileset.s b/data/tileset.s index c60d83d61..6a49cbd08 100644 --- a/data/tileset.s +++ b/data/tileset.s @@ -1,8 +1,8 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" + .include "asm/macros.inc" + .include "constants/constants.inc" - .section .rodata - .align 2, 0 + .section .rodata + .align 2, 0 gUnknown_085105C4:: .incbin "baserom.gba", 0x5105c4, 0x80 @@ -13,7 +13,7 @@ gUnknown_08510644:: gUnknown_085106C4:: .incbin "baserom.gba", 0x5106c4, 0x80 - .space 0x20 + .space 0x20 gUnknown_08510764:: @ 8510764 @ replacing .incbin "baserom.gba", 0x00510764, 0x10 @@ -254,7 +254,7 @@ gUnknown_08515224:: gUnknown_085152A4:: .incbin "baserom.gba", 0x5152a4, 0x80 - .space 0x20 + .space 0x20 gUnknown_08515344:: @ 8515344 @ replacing .incbin "baserom.gba", 0x00515344, 0x20 @@ -386,7 +386,13 @@ gUnknown_08515A6C:: .incbin "baserom.gba", 0x515a6c, 0x80 gUnknown_08515AEC:: - .incbin "baserom.gba", 0x515aec, 0x2a0 + .incbin "baserom.gba", 0x515aec, 0x80 + +gUnknown_08515B6C:: + .incbin "baserom.gba", 0x515b6c, 0x20 + +gUnknown_08515B8C:: + .incbin "baserom.gba", 0x515b8c, 0x200 gUnknown_08515D8C:: @ 8515D8C @@ -584,7 +590,9 @@ gUnknown_08517B9C:: .incbin "baserom.gba", 0x517b9c, 0x20 gUnknown_08517BBC:: - .incbin "baserom.gba", 0x517bbc, 0x40 + .incbin "baserom.gba", 0x517bbc, 0x20 + + .space 0x20 gUnknown_08517BFC:: @ 8517BFC @@ -603,7 +611,9 @@ gUnknown_08517C14:: .incbin "baserom.gba", 0x517c14, 0x200 gUnknown_08517E14:: - .incbin "baserom.gba", 0x517e14, 0x220 + .incbin "baserom.gba", 0x517e14, 0x200 + + .space 0x20 gUnknown_08518034:: @ 8518034 @@ -615,8 +625,9 @@ gUnknown_0851803C:: .incbin "baserom.gba", 0x51803c, 0x120 gUnknown_0851815C:: - .incbin "baserom.gba", 0x51815c, 0x140 + .incbin "baserom.gba", 0x51815c, 0x120 + .space 0x20 gUnknown_0851829C:: @ 851829C @ replacing .incbin "baserom.gba", 0x0051829c, 0x8 @@ -645,8 +656,21 @@ gUnknown_0851CAA4:: .incbin "baserom.gba", 0x51caa4, 0xc00 gUnknown_0851D6A4:: - .incbin "baserom.gba", 0x51d6a4, 0x2c20 + .incbin "baserom.gba", 0x51d6a4, 0xc00 + .space 0x20 + +gUnknown_0851E2C4:: + .incbin "baserom.gba", 0x51e2c4, 0x800 + +gUnknown_0851EAC4:: + .incbin "baserom.gba", 0x51eac4, 0x800 + +gUnknown_0851F2C4:: + .incbin "baserom.gba", 0x51f2c4, 0x800 + +gUnknown_0851FAC4:: + .incbin "baserom.gba", 0x51fac4, 0x800 gUnknown_085202C4:: @ 85202C4 @ replacing .incbin "baserom.gba", 0x005202c4, 0x20 @@ -666,7 +690,10 @@ gUnknown_085203E4:: .incbin "baserom.gba", 0x5203e4, 0x100 gUnknown_085204E4:: - .incbin "baserom.gba", 0x5204e4, 0x120 + .incbin "baserom.gba", 0x5204e4, 0x100 + +gUnknown_085205E4:: + .incbin "baserom.gba", 0x5205e4, 0x20 gUnknown_08520604:: .incbin "baserom.gba", 0x520604, 0x100 @@ -675,7 +702,10 @@ gUnknown_08520704:: .incbin "baserom.gba", 0x520704, 0x100 gUnknown_08520804:: - .incbin "baserom.gba", 0x520804, 0x4060 + .incbin "baserom.gba", 0x520804, 0x100 + +gUnknown_08520904:: + .incbin "baserom.gba", 0x520904, 0x3F60 gUnknown_08524864:: @ 8524864 From 5a51a49642e81575ebe41a00ec69a3abb489376b Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sun, 1 Oct 2017 19:39:55 -0400 Subject: [PATCH 17/42] Sanitize data/tilesets.s, 3 --- data/tileset.s | 86 +++++++++++++++++++++++++++++++------------------- 1 file changed, 53 insertions(+), 33 deletions(-) diff --git a/data/tileset.s b/data/tileset.s index 6a49cbd08..0acb50e91 100644 --- a/data/tileset.s +++ b/data/tileset.s @@ -258,25 +258,25 @@ gUnknown_085152A4:: gUnknown_08515344:: @ 8515344 @ replacing .incbin "baserom.gba", 0x00515344, 0x20 - .4byte VRAM + 0x4c00 - .4byte VRAM + 0x4c80 - .4byte VRAM + 0x4d00 - .4byte VRAM + 0x4d80 - .4byte VRAM + 0x4e00 - .4byte VRAM + 0x4e80 - .4byte VRAM + 0x4f00 - .4byte VRAM + 0x4f80 + .4byte BG_VRAM + 0x4c00 + .4byte BG_VRAM + 0x4c80 + .4byte BG_VRAM + 0x4d00 + .4byte BG_VRAM + 0x4d80 + .4byte BG_VRAM + 0x4e00 + .4byte BG_VRAM + 0x4e80 + .4byte BG_VRAM + 0x4f00 + .4byte BG_VRAM + 0x4f80 gUnknown_08515364:: @ 8515364 @ replacing .incbin "baserom.gba", 0x00515364, 0x20 - .4byte VRAM + 0x5000 - .4byte VRAM + 0x5080 - .4byte VRAM + 0x5100 - .4byte VRAM + 0x5180 - .4byte VRAM + 0x5200 - .4byte VRAM + 0x5280 - .4byte VRAM + 0x5300 - .4byte VRAM + 0x5380 + .4byte BG_VRAM + 0x5000 + .4byte BG_VRAM + 0x5080 + .4byte BG_VRAM + 0x5100 + .4byte BG_VRAM + 0x5180 + .4byte BG_VRAM + 0x5200 + .4byte BG_VRAM + 0x5280 + .4byte BG_VRAM + 0x5300 + .4byte BG_VRAM + 0x5380 gUnknown_08515384:: @ 8515384 @ replacing .incbin "baserom.gba", 0x00515384, 0x30 @@ -348,8 +348,14 @@ gUnknown_08515784:: gUnknown_08515804:: @ 8515804 - .incbin "baserom.gba", 0x515804, 0x20 - + .4byte BG_VRAM + 0x5000 + .4byte BG_VRAM + 0x5080 + .4byte BG_VRAM + 0x5100 + .4byte BG_VRAM + 0x5180 + .4byte BG_VRAM + 0x5200 + .4byte BG_VRAM + 0x5280 + .4byte BG_VRAM + 0x5300 + .4byte BG_VRAM + 0x5380 gUnknown_08515824:: @ 8515824 @ replacing .incbin "baserom.gba", 0x00515824, 0x20 @@ -389,10 +395,18 @@ gUnknown_08515AEC:: .incbin "baserom.gba", 0x515aec, 0x80 gUnknown_08515B6C:: - .incbin "baserom.gba", 0x515b6c, 0x20 + .incbin "baserom.gba", 0x515b6c, 0x80 -gUnknown_08515B8C:: - .incbin "baserom.gba", 0x515b8c, 0x200 +gUnknown_08515BEC:: + .incbin "baserom.gba", 0x515bec, 0x80 + +gUnknown_08515C6C:: + .incbin "baserom.gba", 0x515c6c, 0x80 + +gUnknown_08515CEC:: + .incbin "baserom.gba", 0x515cec, 0x80 + + .space 0x20 gUnknown_08515D8C:: @ 8515D8C @@ -431,14 +445,14 @@ gUnknown_0851611C:: gUnknown_085161BC:: @ 85161BC @ replacing .incbin "baserom.gba", 0x005161bc, 0x20 - .4byte VRAM + 0x5c00 - .4byte VRAM + 0x5c80 - .4byte VRAM + 0x5d00 - .4byte VRAM + 0x5d80 - .4byte VRAM + 0x5e00 - .4byte VRAM + 0x5e80 - .4byte VRAM + 0x5f00 - .4byte VRAM + 0x5f80 + .4byte BG_VRAM + 0x5c00 + .4byte BG_VRAM + 0x5c80 + .4byte BG_VRAM + 0x5d00 + .4byte BG_VRAM + 0x5d80 + .4byte BG_VRAM + 0x5e00 + .4byte BG_VRAM + 0x5e80 + .4byte BG_VRAM + 0x5f00 + .4byte BG_VRAM + 0x5f80 gUnknown_085161DC:: @ 85161DC @ replacing .incbin "baserom.gba", 0x005161dc, 0x20 @@ -692,8 +706,7 @@ gUnknown_085203E4:: gUnknown_085204E4:: .incbin "baserom.gba", 0x5204e4, 0x100 -gUnknown_085205E4:: - .incbin "baserom.gba", 0x5205e4, 0x20 + .space 0x20 gUnknown_08520604:: .incbin "baserom.gba", 0x520604, 0x100 @@ -704,8 +717,15 @@ gUnknown_08520704:: gUnknown_08520804:: .incbin "baserom.gba", 0x520804, 0x100 -gUnknown_08520904:: - .incbin "baserom.gba", 0x520904, 0x3F60 + .space 0x3d00 + +gUnknown_08524604:: + .incbin "baserom.gba", 0x524604, 0x40 + + .space 0x1c0 + +gUnknown_08524804:: + .incbin "baserom.gba", 0x524804, 0x60 gUnknown_08524864:: @ 8524864 From 993d5e2a6afb8f765ddd98ac32f01253a1476696 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sun, 1 Oct 2017 21:50:58 -0400 Subject: [PATCH 18/42] clean up declarations in src/palette.c --- include/battle.h | 3 + include/blend_palette.h | 12 ++ src/palette.c | 308 ++++++++++++++++++++-------------------- 3 files changed, 167 insertions(+), 156 deletions(-) create mode 100644 include/blend_palette.h diff --git a/include/battle.h b/include/battle.h index 67d3d873d..bc70b86ea 100644 --- a/include/battle.h +++ b/include/battle.h @@ -927,6 +927,9 @@ u8 GetBankSide(u8 bank); u8 GetBankIdentity(u8 bank); u8 GetBankByIdentity(u8 bank); +// battle_transition +void sub_8149DFC(u8 a1); + // Move this somewhere else #include "sprite.h" diff --git a/include/blend_palette.h b/include/blend_palette.h new file mode 100644 index 000000000..1db3f4eb0 --- /dev/null +++ b/include/blend_palette.h @@ -0,0 +1,12 @@ +#ifndef GUARD_BLEND_PALETTE_H +#define GUARD_BLEND_PALETTE_H + +// Exported type declarations + +// Exported RAM declarations + +// Exported ROM declarations + +void BlendPalette(u16, u16, u8, u16); + +#endif //GUARD_BLEND_PALETTE_H diff --git a/src/palette.c b/src/palette.c index da03516d0..ed7eb99b3 100644 --- a/src/palette.c +++ b/src/palette.c @@ -1,5 +1,9 @@ #include "global.h" +#include "blend_palette.h" #include "palette.h" +#include "decompress.h" +#include "gpu_regs.h" +#include "battle.h" #include "task.h" enum @@ -38,15 +42,19 @@ struct PaletteStruct u8 ps_field_9; }; -extern void LZDecompressWram(const void *src, void *dest); -extern void SetGpuReg(u8 regOffset, u16 value); -extern void sub_8149DFC(u8 a1); -extern void sub_80A1670(u16 a1); -extern void sub_80A2D54(u8 a1); -extern void SetWordTaskArg(u8 taskId, u8 dataElem, u32 value); -extern void _call_via_r1(u32 a1, void *a2); - -extern void BlendPalette(u16, u16, u8, u16); +static void cur_mapheader_run_tileset1_func(void); +static void cur_mapheader_run_tileset2_func(void); +static void unused_sub_80A1CDC(struct PaletteStruct *, u32 *); +static void unused_sub_80A1E40(struct PaletteStruct *, u32 *); +static void unused_sub_80A1F00(struct PaletteStruct *); +static u8 GetPaletteNumByUid(u16); +static u8 UpdateNormalPaletteFade(void); +static void BeginFastPaletteFadeInternal(u8); +static u8 UpdateFastPaletteFade(void); +static u8 UpdateHardwarePaletteFade(void); +static void UpdateBlendRegisters(void); +static bool8 IsSoftwarePaletteFadeFinishing(void); +static void sub_80A2D54(u8 taskId); static EWRAM_DATA struct { const u16 *src; @@ -57,8 +65,8 @@ EWRAM_DATA u16 gPlttBufferUnfaded[0x200] = {0}; EWRAM_DATA u16 gPlttBufferFaded[0x200] = {0}; EWRAM_DATA struct PaletteStruct sPaletteStructs[0x10] = {0}; EWRAM_DATA struct PaletteFadeControl gPaletteFade = {0}; -EWRAM_DATA u32 gFiller_2037FE0 = 0; -EWRAM_DATA u32 sPlttBufferTransferPending = 0; +static EWRAM_DATA u32 gFiller_2037FE0 = 0; +static EWRAM_DATA u32 sPlttBufferTransferPending = 0; EWRAM_DATA u8 gPaletteDecompressionBuffer[0x400] = {0}; extern const u16 *const gUnknown_08510764[]; @@ -123,19 +131,6 @@ static const u8 gUnknown_0852489C[] = { 31, 31 }; -void cur_mapheader_run_tileset1_func(void); -void cur_mapheader_run_tileset2_func(void); -static void unused_sub_80A1CDC(struct PaletteStruct *, u32 *); -static void unused_sub_80A1E40(struct PaletteStruct *, u32 *); -static void unused_sub_80A1F00(struct PaletteStruct *); -static u8 GetPaletteNumByUid(u16); -static u8 UpdateNormalPaletteFade(void); -static void BeginFastPaletteFadeInternal(u8); -static u8 UpdateFastPaletteFade(void); -static u8 UpdateHardwarePaletteFade(void); -static void UpdateBlendRegisters(void); -static bool8 IsSoftwarePaletteFadeFinishing(void); - // tileset IWRAM_DATA u8 sTilesetDMA3TransferBufferSize; @@ -146,13 +141,13 @@ IWRAM_DATA u16 sSecondaryTilesetCBBufferSize; IWRAM_DATA void (*sPrimaryTilesetCB)(u16); IWRAM_DATA void (*sSecondaryTilesetCB)(u16); -void sub_80A0954(void) +static void sub_80A0954(void) { sTilesetDMA3TransferBufferSize = 0; CpuFill32(0, sTilesetDMA3TransferBuffer, sizeof sTilesetDMA3TransferBuffer); } -void sub_80A0980(const u16 *a0, u16 *a1, u16 a2) +static void sub_80A0980(const u16 *a0, u16 *a1, u16 a2) { if (sTilesetDMA3TransferBufferSize < 20) { @@ -199,7 +194,7 @@ void sub_80A0A38(void) sSecondaryTilesetCB(sSecondaryTilesetCBCounter); } -void cur_mapheader_run_tileset1_func(void) +static void cur_mapheader_run_tileset1_func(void) { sPrimaryTilesetCBCounter = 0; sPrimaryTilesetCBBufferSize = 0; @@ -208,7 +203,7 @@ void cur_mapheader_run_tileset1_func(void) gMapHeader.mapData->primaryTileset->callback(); } -void cur_mapheader_run_tileset2_func(void) +static void cur_mapheader_run_tileset2_func(void) { sSecondaryTilesetCBCounter = 0; sSecondaryTilesetCBBufferSize = 0; @@ -219,7 +214,7 @@ void cur_mapheader_run_tileset2_func(void) void TilesetCb_General(void) { - void sub_80A0B70(u16); + static void sub_80A0B70(u16); sPrimaryTilesetCBCounter = 0; sPrimaryTilesetCBBufferSize = 0x100; @@ -228,20 +223,20 @@ void TilesetCb_General(void) void TilesetCb_InsideBuilding(void) { - void sub_80A0BB4(u16); + static void sub_80A0BB4(u16); sPrimaryTilesetCBCounter = 0; sPrimaryTilesetCBBufferSize = 0x100; sPrimaryTilesetCB = sub_80A0BB4; } -void sub_80A0B70(u16 timer) +static void sub_80A0B70(u16 timer) { - void sub_80A0BCC(u16); - void sub_80A0BF4(u16); - void sub_80A0C1C(u16); - void sub_80A0C44(u16); - void sub_80A12AC(u16); + static void sub_80A0BCC(u16); + static void sub_80A0BF4(u16); + static void sub_80A0C1C(u16); + static void sub_80A0C44(u16); + static void sub_80A12AC(u16); if ((timer & 0x0F) == 0) sub_80A0BCC(timer >> 4); @@ -255,43 +250,44 @@ void sub_80A0B70(u16 timer) sub_80A12AC(timer >> 4); } -void sub_80A0BB4(u16 timer) +static void sub_80A0BB4(u16 timer) { - void sub_80A1688(u16); + static void sub_80A1688(u16); + if ((timer & 0x7) == 0) sub_80A1688(timer >> 3); } -void sub_80A0BCC(u16 timer) +static void sub_80A0BCC(u16 timer) { u16 idx; idx = timer % 4; - sub_80A0980(gUnknown_08510764[idx], (u16 *)(VRAM + 0x3F80), 0x80); + sub_80A0980(gUnknown_08510764[idx], (u16 *)(BG_VRAM + 0x3F80), 0x80); } -void sub_80A0BF4(u16 timer) +static void sub_80A0BF4(u16 timer) { u8 idx; idx = timer % 8; - sub_80A0980(gUnknown_08512574[idx], (u16 *)(VRAM + 0x3600), 0x3C0); + sub_80A0980(gUnknown_08512574[idx], (u16 *)(BG_VRAM + 0x3600), 0x3C0); } -void sub_80A0C1C(u16 timer) +static void sub_80A0C1C(u16 timer) { u16 idx; idx = timer % 8; - sub_80A0980(gUnknown_08512E54[idx], (u16 *)(VRAM + 0x3a00), 0x140); + sub_80A0980(gUnknown_08512E54[idx], (u16 *)(BG_VRAM + 0x3a00), 0x140); } -void sub_80A0C44(u16 timer) +static void sub_80A0C44(u16 timer) { u16 idx; idx = timer % 4; - sub_80A0980(gUnknown_08513174[idx], (u16 *)(VRAM + 0x3e00), 0xc0); + sub_80A0980(gUnknown_08513174[idx], (u16 *)(BG_VRAM + 0x3e00), 0xc0); } void TilesetCb_Petalburg(void) @@ -303,7 +299,7 @@ void TilesetCb_Petalburg(void) void TilesetCb_Rustboro(void) { - void sub_80A103C(u16); + static void sub_80A103C(u16); sSecondaryTilesetCBCounter = 0; sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; @@ -312,7 +308,7 @@ void TilesetCb_Rustboro(void) void TilesetCb_Dewford(void) { - void sub_80A10B8(u16); + static void sub_80A10B8(u16); sSecondaryTilesetCBCounter = 0; sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; @@ -321,7 +317,7 @@ void TilesetCb_Dewford(void) void TilesetCb_Slateport(void) { - void sub_80A10D0(u16); + static void sub_80A10D0(u16); sSecondaryTilesetCBCounter = 0; sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; @@ -330,7 +326,7 @@ void TilesetCb_Slateport(void) void TilesetCb_Mauville(void) { - void sub_80A10E8(u16); + static void sub_80A10E8(u16); sSecondaryTilesetCBCounter = sPrimaryTilesetCBCounter; sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; @@ -339,7 +335,7 @@ void TilesetCb_Mauville(void) void TilesetCb_Lavaridge(void) { - void sub_80A115C(u16); + static void sub_80A115C(u16); sSecondaryTilesetCBCounter = 0; sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; @@ -376,7 +372,7 @@ void TilesetCb_Mossdeep(void) void TilesetCb_EverGrande(void) { - void sub_80A1188(u16); + static void sub_80A1188(u16); sSecondaryTilesetCBCounter = 0; sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; @@ -385,7 +381,7 @@ void TilesetCb_EverGrande(void) void TilesetCb_Pacifidlog(void) { - void sub_80A11FC(u16); + static void sub_80A11FC(u16); sSecondaryTilesetCBCounter = sPrimaryTilesetCBCounter; sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; @@ -394,7 +390,7 @@ void TilesetCb_Pacifidlog(void) void TilesetCb_Sootopolis(void) { - void sub_80A122C(u16); + static void sub_80A122C(u16); sSecondaryTilesetCBCounter = 0; sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; @@ -403,7 +399,7 @@ void TilesetCb_Sootopolis(void) void TilesetCb_BattleFrontierOutsideWest(void) { - void sub_80A127C(u16); + static void sub_80A127C(u16); sSecondaryTilesetCBCounter = 0; sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; @@ -412,7 +408,7 @@ void TilesetCb_BattleFrontierOutsideWest(void) void TilesetCb_BattleFrontierOutsideEast(void) { - void sub_80A1294(u16); + static void sub_80A1294(u16); sSecondaryTilesetCBCounter = 0; sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; @@ -421,7 +417,7 @@ void TilesetCb_BattleFrontierOutsideEast(void) void TilesetCb_Underwater(void) { - void sub_80A1244(u16); + static void sub_80A1244(u16); sSecondaryTilesetCBCounter = 0; sSecondaryTilesetCBBufferSize = 128; @@ -430,7 +426,7 @@ void TilesetCb_Underwater(void) void TilesetCb_SootopolisGym(void) { - void sub_80A15D8(u16); + static void sub_80A15D8(u16); sSecondaryTilesetCBCounter = 0; sSecondaryTilesetCBBufferSize = 240; @@ -439,7 +435,7 @@ void TilesetCb_SootopolisGym(void) void TilesetCb_Cave(void) { - void sub_80A1260(u16); + static void sub_80A1260(u16); sSecondaryTilesetCBCounter = 0; sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; @@ -448,7 +444,7 @@ void TilesetCb_Cave(void) void TilesetCb_EliteFour(void) { - void sub_80A15F0(u16); + static void sub_80A15F0(u16); sSecondaryTilesetCBCounter = 0; sSecondaryTilesetCBBufferSize = 128; @@ -457,7 +453,7 @@ void TilesetCb_EliteFour(void) void TilesetCb_MauvilleGym(void) { - void sub_80A15C0(u16); + static void sub_80A15C0(u16); sSecondaryTilesetCBCounter = 0; sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; @@ -466,7 +462,7 @@ void TilesetCb_MauvilleGym(void) void TilesetCb_BikeShop(void) { - void sub_80A161C(u16); + static void sub_80A161C(u16); sSecondaryTilesetCBCounter = 0; sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; @@ -475,7 +471,7 @@ void TilesetCb_BikeShop(void) void TilesetCb_BattlePyramid(void) { - void sub_80A1634(u16); + static void sub_80A1634(u16); sSecondaryTilesetCBCounter = 0; sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; @@ -484,17 +480,17 @@ void TilesetCb_BattlePyramid(void) void TilesetCb_BattleDome(void) { - void sub_80A1658(u16); + static void sub_80A1658(u16); sSecondaryTilesetCBCounter = 0; sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; sSecondaryTilesetCB = sub_80A1658; } -void sub_80A103C(u16 timer) +static void sub_80A103C(u16 timer) { - void sub_80A1434(u16, u8); - void sub_80A1470(u16); + static void sub_80A1434(u16, u8); + static void sub_80A1470(u16); if ((timer & 0x07) == 0) { @@ -517,25 +513,25 @@ void sub_80A103C(u16 timer) sub_80A1434(timer >> 3, 7); } -void sub_80A10B8(u16 timer) +static void sub_80A10B8(u16 timer) { - void sub_80A1520(u16); + static void sub_80A1520(u16); if ((timer & 7) == 0) sub_80A1520(timer >> 3); } -void sub_80A10D0(u16 timer) +static void sub_80A10D0(u16 timer) { - void sub_80A1598(u16); + static void sub_80A1598(u16); if ((timer & 15) == 0) sub_80A1598(timer >> 4); } -void sub_80A10E8(u16 timer) +static void sub_80A10E8(u16 timer) { - void sub_80A1394(u16, u8); + static void sub_80A1394(u16, u8); if ((timer & 0x07) == 0) sub_80A1394(timer >> 3, 0); @@ -555,10 +551,10 @@ void sub_80A10E8(u16 timer) sub_80A1394(timer >> 3, 7); } -void sub_80A115C(u16 timer) +static void sub_80A115C(u16 timer) { - void sub_80A12D4(u8); - void sub_80A1498(u16); + static void sub_80A12D4(u8); + static void sub_80A1498(u16); if ((timer & 0x0F) == 0) sub_80A12D4(timer >> 4); @@ -566,9 +562,9 @@ void sub_80A115C(u16 timer) sub_80A1498(timer >> 4); } -void sub_80A1188(u16 timer) +static void sub_80A1188(u16 timer) { - void sub_80A14C0(u16, u8); + static void sub_80A14C0(u16, u8); if ((timer & 0x07) == 0) sub_80A14C0(timer >> 3, 0); @@ -588,10 +584,10 @@ void sub_80A1188(u16 timer) sub_80A14C0(timer >> 3, 7); } -void sub_80A11FC(u16 timer) +static void sub_80A11FC(u16 timer) { - void sub_80A131C(u8); - void sub_80A136C(u8); + static void sub_80A131C(u8); + static void sub_80A136C(u8); if ((timer & 0x0F) == 0) sub_80A131C(timer >> 4); @@ -599,90 +595,90 @@ void sub_80A11FC(u16 timer) sub_80A136C(timer >> 4); } -void sub_80A122C(u16 timer) +static void sub_80A122C(u16 timer) { - void sub_80A1798(u16); + static void sub_80A1798(u16); if ((timer & 0x0F) == 0) sub_80A1798(timer >> 4); } -void sub_80A1244(u16 timer) +static void sub_80A1244(u16 timer) { - void sub_80A1344(u8); + static void sub_80A1344(u8); if ((timer & 0x0F) == 0) sub_80A1344(timer >> 4); } -void sub_80A1260(u16 timer) +static void sub_80A1260(u16 timer) { - void sub_80A14F8(u16); + static void sub_80A14F8(u16); if ((timer & 0x0F) == 1) sub_80A14F8(timer >> 4); } -void sub_80A127C(u16 timer) +static void sub_80A127C(u16 timer) { - void sub_80A1548(u16); + static void sub_80A1548(u16); if ((timer & 0x07) == 0) sub_80A1548(timer >> 3); } -void sub_80A1294(u16 timer) +static void sub_80A1294(u16 timer) { - void sub_80A1570(u16); + static void sub_80A1570(u16); if ((timer & 0x07) == 0) sub_80A1570(timer >> 3); } -void sub_80A12AC(u16 timer) +static void sub_80A12AC(u16 timer) { u16 idx; idx = timer % 4; - sub_80A0980(gUnknown_08513684[idx], (u16 *)(VRAM + 0x3c00), 0x140); + sub_80A0980(gUnknown_08513684[idx], (u16 *)(BG_VRAM + 0x3c00), 0x140); } -void sub_80A12D4(u8 timer) +static void sub_80A12D4(u8 timer) { u8 idx; idx = timer % 4; - sub_80A0980(gUnknown_08513894[idx], (u16 *)(VRAM + 0x6400), 0x80); + sub_80A0980(gUnknown_08513894[idx], (u16 *)(BG_VRAM + 0x6400), 0x80); idx = (timer + 2) % 4; - sub_80A0980(gUnknown_08513894[idx], (u16 *)(VRAM + 0x6480), 0x80); + sub_80A0980(gUnknown_08513894[idx], (u16 *)(BG_VRAM + 0x6480), 0x80); } -void sub_80A131C(u8 timer) +static void sub_80A131C(u8 timer) { u8 idx; idx = timer % 4; - sub_80A0980(gUnknown_085143E4[idx], (u16 *)(VRAM + 0x7a00), 0x3C0); + sub_80A0980(gUnknown_085143E4[idx], (u16 *)(BG_VRAM + 0x7a00), 0x3C0); } -void sub_80A1344(u8 timer) +static void sub_80A1344(u8 timer) { u8 idx; idx = timer % 4; - sub_80A0980(gUnknown_085145F4[idx], (u16 *)(VRAM + 0x7e00), 0x80); + sub_80A0980(gUnknown_085145F4[idx], (u16 *)(BG_VRAM + 0x7e00), 0x80); } -void sub_80A136C(u8 timer) +static void sub_80A136C(u8 timer) { u8 idx; idx = timer % 8; - sub_80A0980(gUnknown_08514E04[idx], (u16 *)(VRAM + 0x7e00), 0x100); + sub_80A0980(gUnknown_08514E04[idx], (u16 *)(BG_VRAM + 0x7e00), 0x100); } -void sub_80A1394(u16 timer_div, u8 timer_mod) +static void sub_80A1394(u16 timer_div, u8 timer_mod) { timer_div -= timer_mod; if (timer_div < 12) // almost certainly a typo @@ -699,7 +695,7 @@ void sub_80A1394(u16 timer_div, u8 timer_mod) } } -void sub_80A1434(u16 timer_div, u8 timer_mod) +static void sub_80A1434(u16 timer_div, u8 timer_mod) { timer_div -= timer_mod; timer_div %= 8; @@ -707,23 +703,23 @@ void sub_80A1434(u16 timer_div, u8 timer_mod) sub_80A0980(gUnknown_08515824[timer_div], gUnknown_08515804[timer_mod], 0x80); } -void sub_80A1470(u16 timer) +static void sub_80A1470(u16 timer) { u16 idx; idx = timer % 2; - sub_80A0980(gUnknown_08515964[idx], (u16 *)(VRAM + 0x7800), 0x80); + sub_80A0980(gUnknown_08515964[idx], (u16 *)(BG_VRAM + 0x7800), 0x80); } -void sub_80A1498(u16 timer) +static void sub_80A1498(u16 timer) { u16 idx; idx = timer % 4; - sub_80A0980(gUnknown_08515D8C[idx], (u16 *)(VRAM + 0x5400), 0x80); + sub_80A0980(gUnknown_08515D8C[idx], (u16 *)(BG_VRAM + 0x5400), 0x80); } -void sub_80A14C0(u16 timer_div, u8 timer_mod) +static void sub_80A14C0(u16 timer_div, u8 timer_mod) { timer_div -= timer_mod; timer_div %= 8; @@ -731,84 +727,84 @@ void sub_80A14C0(u16 timer_div, u8 timer_mod) sub_80A0980(gUnknown_085161DC[timer_div], gUnknown_085161BC[timer_mod], 0x80); } -void sub_80A14F8(u16 timer) +static void sub_80A14F8(u16 timer) { u16 idx; idx = timer % 4; - sub_80A0980(gUnknown_08515D8C[idx], (u16 *)(VRAM + 0x7400), 0x80); + sub_80A0980(gUnknown_08515D8C[idx], (u16 *)(BG_VRAM + 0x7400), 0x80); } -void sub_80A1520(u16 timer) +static void sub_80A1520(u16 timer) { u16 idx; idx = timer % 4; - sub_80A0980(gUnknown_085164FC[idx], (u16 *)(VRAM + 0x5540), 0xC0); + sub_80A0980(gUnknown_085164FC[idx], (u16 *)(BG_VRAM + 0x5540), 0xC0); } -void sub_80A1548(u16 timer) +static void sub_80A1548(u16 timer) { u16 idx; idx = timer % 4; - sub_80A0980(gUnknown_0851680C[idx], (u16 *)(VRAM + 0x5b40), 0xC0); + sub_80A0980(gUnknown_0851680C[idx], (u16 *)(BG_VRAM + 0x5b40), 0xC0); } -void sub_80A1570(u16 timer) +static void sub_80A1570(u16 timer) { u16 idx; idx = timer % 4; - sub_80A0980(gUnknown_08516B1C[idx], (u16 *)(VRAM + 0x5b40), 0xC0); + sub_80A0980(gUnknown_08516B1C[idx], (u16 *)(BG_VRAM + 0x5b40), 0xC0); } -void sub_80A1598(u16 timer) +static void sub_80A1598(u16 timer) { u16 idx; idx = timer % 4; - sub_80A0980(gUnknown_08516D2C[idx], (u16 *)(VRAM + 0x5c00), 0x80); + sub_80A0980(gUnknown_08516D2C[idx], (u16 *)(BG_VRAM + 0x5c00), 0x80); } -void sub_80A15C0(u16 timer) +static void sub_80A15C0(u16 timer) { - void sub_80A1748(u16); + static void sub_80A1748(u16); if ((timer & 1) == 0) sub_80A1748(timer >> 1); } -void sub_80A15D8(u16 timer) +static void sub_80A15D8(u16 timer) { - void sub_80A16B0(u16); + static void sub_80A16B0(u16); if ((timer & 7) == 0) sub_80A16B0(timer >> 3); } -void sub_80A15F0(u16 timer) +static void sub_80A15F0(u16 timer) { - void sub_80A1720(u16); - void sub_80A16F8(u16); + static void sub_80A1720(u16); + static void sub_80A16F8(u16); if ((timer & 0x3f) == 1) sub_80A1720(timer >> 6); if ((timer & 0x07) == 1) sub_80A16F8(timer >> 3); } -void sub_80A161C(u16 timer) +static void sub_80A161C(u16 timer) { - void sub_80A1770(u16); + static void sub_80A1770(u16); if ((timer & 3) == 0) sub_80A1770(timer >> 2); } -void sub_80A1634(u16 timer) +static void sub_80A1634(u16 timer) { - void sub_80A17C0(u16); - void sub_80A17EC(u16); + static void sub_80A17C0(u16); + static void sub_80A17EC(u16); if ((timer & 7) == 0) { @@ -817,98 +813,98 @@ void sub_80A1634(u16 timer) } } -void sub_80A1658(u16 timer) +static void sub_80A1658(u16 timer) { - void sub_80A1818(u16); + static void sub_80A1818(u16); if ((timer & 3) == 0) sub_80A1818(timer >> 2); } -void sub_80A1670(u16 timer) +static void sub_80A1670(u16 timer) { - void sub_80A1884(u16); + static void sub_80A1884(u16); if ((timer & 3) == 0) sub_80A1884(timer >> 2); } -void sub_80A1688(u16 timer) +static void sub_80A1688(u16 timer) { u16 idx; idx = timer % 2; - sub_80A0980(gUnknown_08516E3C[idx], (u16 *)(VRAM + 0x3e00), 0x80); + sub_80A0980(gUnknown_08516E3C[idx], (u16 *)(BG_VRAM + 0x3e00), 0x80); } -void sub_80A16B0(u16 timer) +static void sub_80A16B0(u16 timer) { u16 idx; idx = timer % 3; - sub_80A0980(gUnknown_08517A44[idx], (u16 *)(VRAM + 0x7e00), 0x180); - sub_80A0980(gUnknown_08517A50[idx], (u16 *)(VRAM + 0x7a00), 0x280); + sub_80A0980(gUnknown_08517A44[idx], (u16 *)(BG_VRAM + 0x7e00), 0x180); + sub_80A0980(gUnknown_08517A50[idx], (u16 *)(BG_VRAM + 0x7a00), 0x280); } -void sub_80A16F8(u16 timer) +static void sub_80A16F8(u16 timer) { u16 idx; idx = timer % 4; - sub_80A0980(gUnknown_08517BFC[idx], (u16 *)(VRAM + 0x7f00), 0x20); + sub_80A0980(gUnknown_08517BFC[idx], (u16 *)(BG_VRAM + 0x7f00), 0x20); } -void sub_80A1720(u16 timer) +static void sub_80A1720(u16 timer) { u16 idx; idx = timer % 2; - sub_80A0980(gUnknown_08517C0C[idx], (u16 *)(VRAM + 0x7c00), 0x80); + sub_80A0980(gUnknown_08517C0C[idx], (u16 *)(BG_VRAM + 0x7c00), 0x80); } -void sub_80A1748(u16 timer) +static void sub_80A1748(u16 timer) { u16 idx; idx = timer % 2; - sub_80A0980(gUnknown_08518034[idx], (u16 *)(VRAM + 0x5200), 0x200); + sub_80A0980(gUnknown_08518034[idx], (u16 *)(BG_VRAM + 0x5200), 0x200); } -void sub_80A1770(u16 timer) +static void sub_80A1770(u16 timer) { u16 idx; idx = timer % 2; - sub_80A0980(gUnknown_0851829C[idx], (u16 *)(VRAM + 0x7e00), 0x120); + sub_80A0980(gUnknown_0851829C[idx], (u16 *)(BG_VRAM + 0x7e00), 0x120); } -void sub_80A1798(u16 timer) +static void sub_80A1798(u16 timer) { u16 idx; idx = timer % 8; - sub_80A0980(gUnknown_085202C4[idx], (u16 *)(VRAM + 0x5e00), 0xc00); + sub_80A0980(gUnknown_085202C4[idx], (u16 *)(BG_VRAM + 0x5e00), 0xc00); } -void sub_80A17C0(u16 timer) +static void sub_80A17C0(u16 timer) { u16 idx; idx = timer % 3; - sub_80A0980(gUnknown_08524864[idx], (u16 *)(VRAM + 0x52e0), 0x100); + sub_80A0980(gUnknown_08524864[idx], (u16 *)(BG_VRAM + 0x52e0), 0x100); } -void sub_80A17EC(u16 timer) +static void sub_80A17EC(u16 timer) { u16 idx; idx = timer % 3; - sub_80A0980(gUnknown_08524870[idx], (u16 *)(VRAM + 0x50e0), 0x100); + sub_80A0980(gUnknown_08524870[idx], (u16 *)(BG_VRAM + 0x50e0), 0x100); } // palette -void sub_80A1818(u16 a1) +static void sub_80A1818(u16 a1) { CpuCopy16(gUnknown_0852487C[a1 & 0x3], gPlttBufferUnfaded + 0x80, 32); BlendPalette(0x80, 0x10, gPaletteFade.y, gPaletteFade.blendColor & 0x7FFF); @@ -919,7 +915,7 @@ void sub_80A1818(u16 a1) } } -void sub_80A1884(u16 a1) +static void sub_80A1884(u16 a1) { CpuCopy16(gUnknown_0852487C[a1 & 0x3], gPlttBufferUnfaded + 0x80, 32); if ((u8)FindTaskIdByFunc(sub_8149DFC) == 0xFF ) From 3ec4d98de95a2aeb12f3c738b3496d0b3a830793 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sun, 1 Oct 2017 21:58:47 -0400 Subject: [PATCH 19/42] Split palette and tileset_anims --- ld_script.txt | 2 + src/palette.c | 851 ------------------------------------------- src/tileset_anims.c | 865 ++++++++++++++++++++++++++++++++++++++++++++ sym_bss.txt | 1 + sym_ewram.txt | 1 + 5 files changed, 869 insertions(+), 851 deletions(-) create mode 100644 src/tileset_anims.c diff --git a/ld_script.txt b/ld_script.txt index 78d27eb7f..2ab0f780b 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -110,6 +110,7 @@ SECTIONS { asm/reset_rtc_screen.o(.text); src/start_menu.o(.text); asm/start_menu.o(.text); + src/tileset_anims.o(.text); src/palette.o(.text); src/sound.o(.text); asm/battle_anim.o(.text); @@ -356,6 +357,7 @@ SECTIONS { data/reset_rtc_screen.o(.rodata); data/start_menu.o(.rodata); data/tileset.o(.rodata); + src/tileset_anims.o(.rodata); src/palette.o(.rodata); data/fanfares.o(.rodata); data/battle_anims.o(.rodata); diff --git a/src/palette.c b/src/palette.c index ed7eb99b3..d60efdbc5 100644 --- a/src/palette.c +++ b/src/palette.c @@ -3,7 +3,6 @@ #include "palette.h" #include "decompress.h" #include "gpu_regs.h" -#include "battle.h" #include "task.h" enum @@ -42,8 +41,6 @@ struct PaletteStruct u8 ps_field_9; }; -static void cur_mapheader_run_tileset1_func(void); -static void cur_mapheader_run_tileset2_func(void); static void unused_sub_80A1CDC(struct PaletteStruct *, u32 *); static void unused_sub_80A1E40(struct PaletteStruct *, u32 *); static void unused_sub_80A1F00(struct PaletteStruct *); @@ -56,11 +53,6 @@ static void UpdateBlendRegisters(void); static bool8 IsSoftwarePaletteFadeFinishing(void); static void sub_80A2D54(u8 taskId); -static EWRAM_DATA struct { - const u16 *src; - u16 *dest; - u16 size; -} sTilesetDMA3TransferBuffer[20] = {0}; EWRAM_DATA u16 gPlttBufferUnfaded[0x200] = {0}; EWRAM_DATA u16 gPlttBufferFaded[0x200] = {0}; EWRAM_DATA struct PaletteStruct sPaletteStructs[0x10] = {0}; @@ -69,54 +61,6 @@ static EWRAM_DATA u32 gFiller_2037FE0 = 0; static EWRAM_DATA u32 sPlttBufferTransferPending = 0; EWRAM_DATA u8 gPaletteDecompressionBuffer[0x400] = {0}; -extern const u16 *const gUnknown_08510764[]; -extern const u16 *const gUnknown_08512574[]; -extern const u16 *const gUnknown_08512E54[]; -extern const u16 *const gUnknown_08513174[]; -extern const u16 *const gUnknown_08513684[]; -extern const u16 *const gUnknown_08513894[]; -extern const u16 *const gUnknown_085143E4[]; -extern const u16 *const gUnknown_085145F4[]; -extern const u16 *const gUnknown_08514E04[]; -extern u16 *const gUnknown_08515344[]; -extern u16 *const gUnknown_08515364[]; -extern const u16 *const gUnknown_08515384[]; -extern const u16 *const gUnknown_085153B4[]; -extern const u16 *const gUnknown_085153E4[]; -extern const u16 *const gUnknown_085153F4[]; -extern u16 *const gUnknown_08515804[]; -extern const u16 *const gUnknown_08515824[]; -extern const u16 *const gUnknown_08515964[]; -extern const u16 *const gUnknown_08515D8C[]; -extern u16 *const gUnknown_085161BC[]; -extern const u16 *const gUnknown_085161DC[]; -extern const u16 *const gUnknown_085164FC[]; -extern const u16 *const gUnknown_0851680C[]; -extern const u16 *const gUnknown_08516B1C[]; -extern const u16 *const gUnknown_08516D2C[]; -extern const u16 *const gUnknown_08516E3C[]; -extern const u16 *const gUnknown_08517A44[]; -extern const u16 *const gUnknown_08517A50[]; -extern const u16 *const gUnknown_08517BFC[]; -extern const u16 *const gUnknown_08517C0C[]; -extern const u16 *const gUnknown_08518034[]; -extern const u16 *const gUnknown_0851829C[]; -extern const u16 *const gUnknown_085202C4[]; -extern const u16 *const gUnknown_08524864[]; -extern const u16 *const gUnknown_08524870[]; - -extern const u16 gUnknown_08D85640[]; -extern const u16 gUnknown_08D85660[]; -extern const u16 gUnknown_08D85680[]; -extern const u16 gUnknown_08D856A0[]; - -static const u16 *const gUnknown_0852487C[] = { - gUnknown_08D85640, - gUnknown_08D85660, - gUnknown_08D85680, - gUnknown_08D856A0, -}; - static const struct PaletteStructTemplate gDummyPaletteStructTemplate = { .uid = 0xFFFF, .pst_field_B_5 = 1 @@ -131,801 +75,6 @@ static const u8 gUnknown_0852489C[] = { 31, 31 }; -// tileset - -IWRAM_DATA u8 sTilesetDMA3TransferBufferSize; -IWRAM_DATA u16 sPrimaryTilesetCBCounter; -IWRAM_DATA u16 sPrimaryTilesetCBBufferSize; -IWRAM_DATA u16 sSecondaryTilesetCBCounter; -IWRAM_DATA u16 sSecondaryTilesetCBBufferSize; -IWRAM_DATA void (*sPrimaryTilesetCB)(u16); -IWRAM_DATA void (*sSecondaryTilesetCB)(u16); - -static void sub_80A0954(void) -{ - sTilesetDMA3TransferBufferSize = 0; - CpuFill32(0, sTilesetDMA3TransferBuffer, sizeof sTilesetDMA3TransferBuffer); -} - -static void sub_80A0980(const u16 *a0, u16 *a1, u16 a2) -{ - if (sTilesetDMA3TransferBufferSize < 20) - { - sTilesetDMA3TransferBuffer[sTilesetDMA3TransferBufferSize].src = a0; - sTilesetDMA3TransferBuffer[sTilesetDMA3TransferBufferSize].dest = a1; - sTilesetDMA3TransferBuffer[sTilesetDMA3TransferBufferSize].size = a2; - sTilesetDMA3TransferBufferSize ++; - } -} - -void sub_80A09D0(void) -{ - int i; - - for (i = 0; i < sTilesetDMA3TransferBufferSize; i ++) - { - DmaCopy16(3, sTilesetDMA3TransferBuffer[i].src, sTilesetDMA3TransferBuffer[i].dest, sTilesetDMA3TransferBuffer[i].size); - } - sTilesetDMA3TransferBufferSize = 0; -} - -void cur_mapheader_run_tileset_funcs_after_some_cpuset(void) -{ - sub_80A0954(); - cur_mapheader_run_tileset1_func(); - cur_mapheader_run_tileset2_func(); -} - -void sub_80A0A2C(void) -{ - cur_mapheader_run_tileset2_func(); -} - -void sub_80A0A38(void) -{ - sub_80A0954(); - if (++sPrimaryTilesetCBCounter >= sPrimaryTilesetCBBufferSize) - sPrimaryTilesetCBCounter = 0; - if (++sSecondaryTilesetCBCounter >= sSecondaryTilesetCBBufferSize) - sSecondaryTilesetCBCounter = 0; - if (sPrimaryTilesetCB) - sPrimaryTilesetCB(sPrimaryTilesetCBCounter); - if (sSecondaryTilesetCB) - sSecondaryTilesetCB(sSecondaryTilesetCBCounter); -} - -static void cur_mapheader_run_tileset1_func(void) -{ - sPrimaryTilesetCBCounter = 0; - sPrimaryTilesetCBBufferSize = 0; - sPrimaryTilesetCB = NULL; - if (gMapHeader.mapData->primaryTileset && gMapHeader.mapData->primaryTileset->callback) - gMapHeader.mapData->primaryTileset->callback(); -} - -static void cur_mapheader_run_tileset2_func(void) -{ - sSecondaryTilesetCBCounter = 0; - sSecondaryTilesetCBBufferSize = 0; - sSecondaryTilesetCB = NULL; - if (gMapHeader.mapData->secondaryTileset && gMapHeader.mapData->secondaryTileset->callback) - gMapHeader.mapData->secondaryTileset->callback(); -} - -void TilesetCb_General(void) -{ - static void sub_80A0B70(u16); - - sPrimaryTilesetCBCounter = 0; - sPrimaryTilesetCBBufferSize = 0x100; - sPrimaryTilesetCB = sub_80A0B70; -} - -void TilesetCb_InsideBuilding(void) -{ - static void sub_80A0BB4(u16); - - sPrimaryTilesetCBCounter = 0; - sPrimaryTilesetCBBufferSize = 0x100; - sPrimaryTilesetCB = sub_80A0BB4; -} - -static void sub_80A0B70(u16 timer) -{ - static void sub_80A0BCC(u16); - static void sub_80A0BF4(u16); - static void sub_80A0C1C(u16); - static void sub_80A0C44(u16); - static void sub_80A12AC(u16); - - if ((timer & 0x0F) == 0) - sub_80A0BCC(timer >> 4); - if ((timer & 0x0F) == 1) - sub_80A0BF4(timer >> 4); - if ((timer & 0x0F) == 2) - sub_80A0C1C(timer >> 4); - if ((timer & 0x0F) == 3) - sub_80A0C44(timer >> 4); - if ((timer & 0x0F) == 4) - sub_80A12AC(timer >> 4); -} - -static void sub_80A0BB4(u16 timer) -{ - static void sub_80A1688(u16); - - if ((timer & 0x7) == 0) - sub_80A1688(timer >> 3); -} - -static void sub_80A0BCC(u16 timer) -{ - u16 idx; - - idx = timer % 4; - sub_80A0980(gUnknown_08510764[idx], (u16 *)(BG_VRAM + 0x3F80), 0x80); -} - -static void sub_80A0BF4(u16 timer) -{ - u8 idx; - - idx = timer % 8; - sub_80A0980(gUnknown_08512574[idx], (u16 *)(BG_VRAM + 0x3600), 0x3C0); -} - -static void sub_80A0C1C(u16 timer) -{ - u16 idx; - - idx = timer % 8; - sub_80A0980(gUnknown_08512E54[idx], (u16 *)(BG_VRAM + 0x3a00), 0x140); -} - -static void sub_80A0C44(u16 timer) -{ - u16 idx; - - idx = timer % 4; - sub_80A0980(gUnknown_08513174[idx], (u16 *)(BG_VRAM + 0x3e00), 0xc0); -} - -void TilesetCb_Petalburg(void) -{ - sSecondaryTilesetCBCounter = 0; - sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; - sSecondaryTilesetCB = NULL; -} - -void TilesetCb_Rustboro(void) -{ - static void sub_80A103C(u16); - - sSecondaryTilesetCBCounter = 0; - sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; - sSecondaryTilesetCB = sub_80A103C; -} - -void TilesetCb_Dewford(void) -{ - static void sub_80A10B8(u16); - - sSecondaryTilesetCBCounter = 0; - sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; - sSecondaryTilesetCB = sub_80A10B8; -} - -void TilesetCb_Slateport(void) -{ - static void sub_80A10D0(u16); - - sSecondaryTilesetCBCounter = 0; - sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; - sSecondaryTilesetCB = sub_80A10D0; -} - -void TilesetCb_Mauville(void) -{ - static void sub_80A10E8(u16); - - sSecondaryTilesetCBCounter = sPrimaryTilesetCBCounter; - sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; - sSecondaryTilesetCB = sub_80A10E8; -} - -void TilesetCb_Lavaridge(void) -{ - static void sub_80A115C(u16); - - sSecondaryTilesetCBCounter = 0; - sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; - sSecondaryTilesetCB = sub_80A115C; -} - -void TilesetCb_Fallarbor(void) -{ - sSecondaryTilesetCBCounter = 0; - sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; - sSecondaryTilesetCB = NULL; -} - -void TilesetCb_Fortree(void) -{ - sSecondaryTilesetCBCounter = 0; - sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; - sSecondaryTilesetCB = NULL; -} - -void TilesetCb_Lilycove(void) -{ - sSecondaryTilesetCBCounter = 0; - sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; - sSecondaryTilesetCB = NULL; -} - -void TilesetCb_Mossdeep(void) -{ - sSecondaryTilesetCBCounter = 0; - sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; - sSecondaryTilesetCB = NULL; -} - -void TilesetCb_EverGrande(void) -{ - static void sub_80A1188(u16); - - sSecondaryTilesetCBCounter = 0; - sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; - sSecondaryTilesetCB = sub_80A1188; -} - -void TilesetCb_Pacifidlog(void) -{ - static void sub_80A11FC(u16); - - sSecondaryTilesetCBCounter = sPrimaryTilesetCBCounter; - sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; - sSecondaryTilesetCB = sub_80A11FC; -} - -void TilesetCb_Sootopolis(void) -{ - static void sub_80A122C(u16); - - sSecondaryTilesetCBCounter = 0; - sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; - sSecondaryTilesetCB = sub_80A122C; -} - -void TilesetCb_BattleFrontierOutsideWest(void) -{ - static void sub_80A127C(u16); - - sSecondaryTilesetCBCounter = 0; - sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; - sSecondaryTilesetCB = sub_80A127C; -} - -void TilesetCb_BattleFrontierOutsideEast(void) -{ - static void sub_80A1294(u16); - - sSecondaryTilesetCBCounter = 0; - sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; - sSecondaryTilesetCB = sub_80A1294; -} - -void TilesetCb_Underwater(void) -{ - static void sub_80A1244(u16); - - sSecondaryTilesetCBCounter = 0; - sSecondaryTilesetCBBufferSize = 128; - sSecondaryTilesetCB = sub_80A1244; -} - -void TilesetCb_SootopolisGym(void) -{ - static void sub_80A15D8(u16); - - sSecondaryTilesetCBCounter = 0; - sSecondaryTilesetCBBufferSize = 240; - sSecondaryTilesetCB = sub_80A15D8; -} - -void TilesetCb_Cave(void) -{ - static void sub_80A1260(u16); - - sSecondaryTilesetCBCounter = 0; - sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; - sSecondaryTilesetCB = sub_80A1260; -} - -void TilesetCb_EliteFour(void) -{ - static void sub_80A15F0(u16); - - sSecondaryTilesetCBCounter = 0; - sSecondaryTilesetCBBufferSize = 128; - sSecondaryTilesetCB = sub_80A15F0; -} - -void TilesetCb_MauvilleGym(void) -{ - static void sub_80A15C0(u16); - - sSecondaryTilesetCBCounter = 0; - sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; - sSecondaryTilesetCB = sub_80A15C0; -} - -void TilesetCb_BikeShop(void) -{ - static void sub_80A161C(u16); - - sSecondaryTilesetCBCounter = 0; - sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; - sSecondaryTilesetCB = sub_80A161C; -} - -void TilesetCb_BattlePyramid(void) -{ - static void sub_80A1634(u16); - - sSecondaryTilesetCBCounter = 0; - sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; - sSecondaryTilesetCB = sub_80A1634; -} - -void TilesetCb_BattleDome(void) -{ - static void sub_80A1658(u16); - - sSecondaryTilesetCBCounter = 0; - sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; - sSecondaryTilesetCB = sub_80A1658; -} - -static void sub_80A103C(u16 timer) -{ - static void sub_80A1434(u16, u8); - static void sub_80A1470(u16); - - if ((timer & 0x07) == 0) - { - sub_80A1434(timer >> 3, 0); - sub_80A1470(timer >> 3); - } - if ((timer & 0x07) == 1) - sub_80A1434(timer >> 3, 1); - if ((timer & 0x07) == 2) - sub_80A1434(timer >> 3, 2); - if ((timer & 0x07) == 3) - sub_80A1434(timer >> 3, 3); - if ((timer & 0x07) == 4) - sub_80A1434(timer >> 3, 4); - if ((timer & 0x07) == 5) - sub_80A1434(timer >> 3, 5); - if ((timer & 0x07) == 6) - sub_80A1434(timer >> 3, 6); - if ((timer & 0x07) == 7) - sub_80A1434(timer >> 3, 7); -} - -static void sub_80A10B8(u16 timer) -{ - static void sub_80A1520(u16); - - if ((timer & 7) == 0) - sub_80A1520(timer >> 3); -} - -static void sub_80A10D0(u16 timer) -{ - static void sub_80A1598(u16); - - if ((timer & 15) == 0) - sub_80A1598(timer >> 4); -} - -static void sub_80A10E8(u16 timer) -{ - static void sub_80A1394(u16, u8); - - if ((timer & 0x07) == 0) - sub_80A1394(timer >> 3, 0); - if ((timer & 0x07) == 1) - sub_80A1394(timer >> 3, 1); - if ((timer & 0x07) == 2) - sub_80A1394(timer >> 3, 2); - if ((timer & 0x07) == 3) - sub_80A1394(timer >> 3, 3); - if ((timer & 0x07) == 4) - sub_80A1394(timer >> 3, 4); - if ((timer & 0x07) == 5) - sub_80A1394(timer >> 3, 5); - if ((timer & 0x07) == 6) - sub_80A1394(timer >> 3, 6); - if ((timer & 0x07) == 7) - sub_80A1394(timer >> 3, 7); -} - -static void sub_80A115C(u16 timer) -{ - static void sub_80A12D4(u8); - static void sub_80A1498(u16); - - if ((timer & 0x0F) == 0) - sub_80A12D4(timer >> 4); - if ((timer & 0x0F) == 1) - sub_80A1498(timer >> 4); -} - -static void sub_80A1188(u16 timer) -{ - static void sub_80A14C0(u16, u8); - - if ((timer & 0x07) == 0) - sub_80A14C0(timer >> 3, 0); - if ((timer & 0x07) == 1) - sub_80A14C0(timer >> 3, 1); - if ((timer & 0x07) == 2) - sub_80A14C0(timer >> 3, 2); - if ((timer & 0x07) == 3) - sub_80A14C0(timer >> 3, 3); - if ((timer & 0x07) == 4) - sub_80A14C0(timer >> 3, 4); - if ((timer & 0x07) == 5) - sub_80A14C0(timer >> 3, 5); - if ((timer & 0x07) == 6) - sub_80A14C0(timer >> 3, 6); - if ((timer & 0x07) == 7) - sub_80A14C0(timer >> 3, 7); -} - -static void sub_80A11FC(u16 timer) -{ - static void sub_80A131C(u8); - static void sub_80A136C(u8); - - if ((timer & 0x0F) == 0) - sub_80A131C(timer >> 4); - if ((timer & 0x0F) == 1) - sub_80A136C(timer >> 4); -} - -static void sub_80A122C(u16 timer) -{ - static void sub_80A1798(u16); - - if ((timer & 0x0F) == 0) - sub_80A1798(timer >> 4); -} - -static void sub_80A1244(u16 timer) -{ - static void sub_80A1344(u8); - - if ((timer & 0x0F) == 0) - sub_80A1344(timer >> 4); -} - -static void sub_80A1260(u16 timer) -{ - static void sub_80A14F8(u16); - - if ((timer & 0x0F) == 1) - sub_80A14F8(timer >> 4); -} - -static void sub_80A127C(u16 timer) -{ - static void sub_80A1548(u16); - - if ((timer & 0x07) == 0) - sub_80A1548(timer >> 3); -} - -static void sub_80A1294(u16 timer) -{ - static void sub_80A1570(u16); - - if ((timer & 0x07) == 0) - sub_80A1570(timer >> 3); -} - -static void sub_80A12AC(u16 timer) -{ - u16 idx; - - idx = timer % 4; - sub_80A0980(gUnknown_08513684[idx], (u16 *)(BG_VRAM + 0x3c00), 0x140); -} - -static void sub_80A12D4(u8 timer) -{ - u8 idx; - - idx = timer % 4; - sub_80A0980(gUnknown_08513894[idx], (u16 *)(BG_VRAM + 0x6400), 0x80); - - idx = (timer + 2) % 4; - sub_80A0980(gUnknown_08513894[idx], (u16 *)(BG_VRAM + 0x6480), 0x80); -} - -static void sub_80A131C(u8 timer) -{ - u8 idx; - - idx = timer % 4; - sub_80A0980(gUnknown_085143E4[idx], (u16 *)(BG_VRAM + 0x7a00), 0x3C0); -} - -static void sub_80A1344(u8 timer) -{ - u8 idx; - - idx = timer % 4; - sub_80A0980(gUnknown_085145F4[idx], (u16 *)(BG_VRAM + 0x7e00), 0x80); -} - -static void sub_80A136C(u8 timer) -{ - u8 idx; - - idx = timer % 8; - sub_80A0980(gUnknown_08514E04[idx], (u16 *)(BG_VRAM + 0x7e00), 0x100); -} - -static void sub_80A1394(u16 timer_div, u8 timer_mod) -{ - timer_div -= timer_mod; - if (timer_div < 12) // almost certainly a typo - { - timer_div %= 12; - sub_80A0980(gUnknown_08515384[timer_div], gUnknown_08515344[timer_mod], 0x80); - sub_80A0980(gUnknown_085153B4[timer_div], gUnknown_08515364[timer_mod], 0x80); - } - else - { - timer_div %= 4; - sub_80A0980(gUnknown_085153E4[timer_div], gUnknown_08515344[timer_mod], 0x80); - sub_80A0980(gUnknown_085153F4[timer_div], gUnknown_08515364[timer_mod], 0x80); - } -} - -static void sub_80A1434(u16 timer_div, u8 timer_mod) -{ - timer_div -= timer_mod; - timer_div %= 8; - if (gUnknown_08515824[timer_div]) - sub_80A0980(gUnknown_08515824[timer_div], gUnknown_08515804[timer_mod], 0x80); -} - -static void sub_80A1470(u16 timer) -{ - u16 idx; - - idx = timer % 2; - sub_80A0980(gUnknown_08515964[idx], (u16 *)(BG_VRAM + 0x7800), 0x80); -} - -static void sub_80A1498(u16 timer) -{ - u16 idx; - - idx = timer % 4; - sub_80A0980(gUnknown_08515D8C[idx], (u16 *)(BG_VRAM + 0x5400), 0x80); -} - -static void sub_80A14C0(u16 timer_div, u8 timer_mod) -{ - timer_div -= timer_mod; - timer_div %= 8; - - sub_80A0980(gUnknown_085161DC[timer_div], gUnknown_085161BC[timer_mod], 0x80); -} - -static void sub_80A14F8(u16 timer) -{ - u16 idx; - - idx = timer % 4; - sub_80A0980(gUnknown_08515D8C[idx], (u16 *)(BG_VRAM + 0x7400), 0x80); -} - -static void sub_80A1520(u16 timer) -{ - u16 idx; - - idx = timer % 4; - sub_80A0980(gUnknown_085164FC[idx], (u16 *)(BG_VRAM + 0x5540), 0xC0); -} - -static void sub_80A1548(u16 timer) -{ - u16 idx; - - idx = timer % 4; - sub_80A0980(gUnknown_0851680C[idx], (u16 *)(BG_VRAM + 0x5b40), 0xC0); -} - -static void sub_80A1570(u16 timer) -{ - u16 idx; - - idx = timer % 4; - sub_80A0980(gUnknown_08516B1C[idx], (u16 *)(BG_VRAM + 0x5b40), 0xC0); -} - -static void sub_80A1598(u16 timer) -{ - u16 idx; - - idx = timer % 4; - sub_80A0980(gUnknown_08516D2C[idx], (u16 *)(BG_VRAM + 0x5c00), 0x80); -} - -static void sub_80A15C0(u16 timer) -{ - static void sub_80A1748(u16); - - if ((timer & 1) == 0) - sub_80A1748(timer >> 1); -} - -static void sub_80A15D8(u16 timer) -{ - static void sub_80A16B0(u16); - - if ((timer & 7) == 0) - sub_80A16B0(timer >> 3); -} - -static void sub_80A15F0(u16 timer) -{ - static void sub_80A1720(u16); - static void sub_80A16F8(u16); - - if ((timer & 0x3f) == 1) - sub_80A1720(timer >> 6); - if ((timer & 0x07) == 1) - sub_80A16F8(timer >> 3); -} -static void sub_80A161C(u16 timer) -{ - static void sub_80A1770(u16); - - if ((timer & 3) == 0) - sub_80A1770(timer >> 2); -} - -static void sub_80A1634(u16 timer) -{ - static void sub_80A17C0(u16); - static void sub_80A17EC(u16); - - if ((timer & 7) == 0) - { - sub_80A17C0(timer >> 3); - sub_80A17EC(timer >> 3); - } -} - -static void sub_80A1658(u16 timer) -{ - static void sub_80A1818(u16); - - if ((timer & 3) == 0) - sub_80A1818(timer >> 2); -} - -static void sub_80A1670(u16 timer) -{ - static void sub_80A1884(u16); - - if ((timer & 3) == 0) - sub_80A1884(timer >> 2); -} - -static void sub_80A1688(u16 timer) -{ - u16 idx; - - idx = timer % 2; - sub_80A0980(gUnknown_08516E3C[idx], (u16 *)(BG_VRAM + 0x3e00), 0x80); -} - -static void sub_80A16B0(u16 timer) -{ - u16 idx; - - idx = timer % 3; - sub_80A0980(gUnknown_08517A44[idx], (u16 *)(BG_VRAM + 0x7e00), 0x180); - sub_80A0980(gUnknown_08517A50[idx], (u16 *)(BG_VRAM + 0x7a00), 0x280); -} - -static void sub_80A16F8(u16 timer) -{ - u16 idx; - - idx = timer % 4; - sub_80A0980(gUnknown_08517BFC[idx], (u16 *)(BG_VRAM + 0x7f00), 0x20); -} - -static void sub_80A1720(u16 timer) -{ - u16 idx; - - idx = timer % 2; - sub_80A0980(gUnknown_08517C0C[idx], (u16 *)(BG_VRAM + 0x7c00), 0x80); -} - -static void sub_80A1748(u16 timer) -{ - u16 idx; - - idx = timer % 2; - sub_80A0980(gUnknown_08518034[idx], (u16 *)(BG_VRAM + 0x5200), 0x200); -} - -static void sub_80A1770(u16 timer) -{ - u16 idx; - - idx = timer % 2; - sub_80A0980(gUnknown_0851829C[idx], (u16 *)(BG_VRAM + 0x7e00), 0x120); -} - -static void sub_80A1798(u16 timer) -{ - u16 idx; - - idx = timer % 8; - sub_80A0980(gUnknown_085202C4[idx], (u16 *)(BG_VRAM + 0x5e00), 0xc00); -} - -static void sub_80A17C0(u16 timer) -{ - u16 idx; - - idx = timer % 3; - sub_80A0980(gUnknown_08524864[idx], (u16 *)(BG_VRAM + 0x52e0), 0x100); -} - -static void sub_80A17EC(u16 timer) -{ - u16 idx; - - idx = timer % 3; - sub_80A0980(gUnknown_08524870[idx], (u16 *)(BG_VRAM + 0x50e0), 0x100); -} - -// palette - -static void sub_80A1818(u16 a1) -{ - CpuCopy16(gUnknown_0852487C[a1 & 0x3], gPlttBufferUnfaded + 0x80, 32); - BlendPalette(0x80, 0x10, gPaletteFade.y, gPaletteFade.blendColor & 0x7FFF); - if ((u8)FindTaskIdByFunc(sub_8149DFC) != 0xFF ) - { - sSecondaryTilesetCB = sub_80A1670; - sSecondaryTilesetCBBufferSize = 0x20; - } -} - -static void sub_80A1884(u16 a1) -{ - CpuCopy16(gUnknown_0852487C[a1 & 0x3], gPlttBufferUnfaded + 0x80, 32); - if ((u8)FindTaskIdByFunc(sub_8149DFC) == 0xFF ) - { - BlendPalette(0x80, 0x10, gPaletteFade.y, gPaletteFade.blendColor & 0x7FFF); - if (!--sSecondaryTilesetCBBufferSize) - sSecondaryTilesetCB = NULL; - } -} - void LoadCompressedPalette(const void *src, u16 offset, u16 size) { LZDecompressWram(src, gPaletteDecompressionBuffer); diff --git a/src/tileset_anims.c b/src/tileset_anims.c new file mode 100644 index 000000000..5eb470a07 --- /dev/null +++ b/src/tileset_anims.c @@ -0,0 +1,865 @@ + +// Includes +#include "global.h" +#include "palette.h" +#include "blend_palette.h" +#include "battle.h" +#include "task.h" + +// Static type declarations + +// Static RAM declarations + +static EWRAM_DATA struct { + const u16 *src; + u16 *dest; + u16 size; +} sTilesetDMA3TransferBuffer[20] = {0}; + +static u8 sTilesetDMA3TransferBufferSize; +static u16 sPrimaryTilesetCBCounter; +static u16 sPrimaryTilesetCBBufferSize; +static u16 sSecondaryTilesetCBCounter; +static u16 sSecondaryTilesetCBBufferSize; +static void (*sPrimaryTilesetCB)(u16); +static void (*sSecondaryTilesetCB)(u16); + +// Static ROM declarations + +static void cur_mapheader_run_tileset1_func(void); +static void cur_mapheader_run_tileset2_func(void); + +// .rodata + +extern const u16 *const gUnknown_08510764[]; +extern const u16 *const gUnknown_08512574[]; +extern const u16 *const gUnknown_08512E54[]; +extern const u16 *const gUnknown_08513174[]; +extern const u16 *const gUnknown_08513684[]; +extern const u16 *const gUnknown_08513894[]; +extern const u16 *const gUnknown_085143E4[]; +extern const u16 *const gUnknown_085145F4[]; +extern const u16 *const gUnknown_08514E04[]; +extern u16 *const gUnknown_08515344[]; +extern u16 *const gUnknown_08515364[]; +extern const u16 *const gUnknown_08515384[]; +extern const u16 *const gUnknown_085153B4[]; +extern const u16 *const gUnknown_085153E4[]; +extern const u16 *const gUnknown_085153F4[]; +extern u16 *const gUnknown_08515804[]; +extern const u16 *const gUnknown_08515824[]; +extern const u16 *const gUnknown_08515964[]; +extern const u16 *const gUnknown_08515D8C[]; +extern u16 *const gUnknown_085161BC[]; +extern const u16 *const gUnknown_085161DC[]; +extern const u16 *const gUnknown_085164FC[]; +extern const u16 *const gUnknown_0851680C[]; +extern const u16 *const gUnknown_08516B1C[]; +extern const u16 *const gUnknown_08516D2C[]; +extern const u16 *const gUnknown_08516E3C[]; +extern const u16 *const gUnknown_08517A44[]; +extern const u16 *const gUnknown_08517A50[]; +extern const u16 *const gUnknown_08517BFC[]; +extern const u16 *const gUnknown_08517C0C[]; +extern const u16 *const gUnknown_08518034[]; +extern const u16 *const gUnknown_0851829C[]; +extern const u16 *const gUnknown_085202C4[]; +extern const u16 *const gUnknown_08524864[]; +extern const u16 *const gUnknown_08524870[]; + +extern const u16 gUnknown_08D85640[]; +extern const u16 gUnknown_08D85660[]; +extern const u16 gUnknown_08D85680[]; +extern const u16 gUnknown_08D856A0[]; + +static const u16 *const gUnknown_0852487C[] = { + gUnknown_08D85640, + gUnknown_08D85660, + gUnknown_08D85680, + gUnknown_08D856A0, +}; + +// .text + +static void sub_80A0954(void) +{ + sTilesetDMA3TransferBufferSize = 0; + CpuFill32(0, sTilesetDMA3TransferBuffer, sizeof sTilesetDMA3TransferBuffer); +} + +static void sub_80A0980(const u16 *a0, u16 *a1, u16 a2) +{ + if (sTilesetDMA3TransferBufferSize < 20) + { + sTilesetDMA3TransferBuffer[sTilesetDMA3TransferBufferSize].src = a0; + sTilesetDMA3TransferBuffer[sTilesetDMA3TransferBufferSize].dest = a1; + sTilesetDMA3TransferBuffer[sTilesetDMA3TransferBufferSize].size = a2; + sTilesetDMA3TransferBufferSize ++; + } +} + +void sub_80A09D0(void) +{ + int i; + + for (i = 0; i < sTilesetDMA3TransferBufferSize; i ++) + { + DmaCopy16(3, sTilesetDMA3TransferBuffer[i].src, sTilesetDMA3TransferBuffer[i].dest, sTilesetDMA3TransferBuffer[i].size); + } + sTilesetDMA3TransferBufferSize = 0; +} + +void cur_mapheader_run_tileset_funcs_after_some_cpuset(void) +{ + sub_80A0954(); + cur_mapheader_run_tileset1_func(); + cur_mapheader_run_tileset2_func(); +} + +void sub_80A0A2C(void) +{ + cur_mapheader_run_tileset2_func(); +} + +void sub_80A0A38(void) +{ + sub_80A0954(); + if (++sPrimaryTilesetCBCounter >= sPrimaryTilesetCBBufferSize) + sPrimaryTilesetCBCounter = 0; + if (++sSecondaryTilesetCBCounter >= sSecondaryTilesetCBBufferSize) + sSecondaryTilesetCBCounter = 0; + if (sPrimaryTilesetCB) + sPrimaryTilesetCB(sPrimaryTilesetCBCounter); + if (sSecondaryTilesetCB) + sSecondaryTilesetCB(sSecondaryTilesetCBCounter); +} + +static void cur_mapheader_run_tileset1_func(void) +{ + sPrimaryTilesetCBCounter = 0; + sPrimaryTilesetCBBufferSize = 0; + sPrimaryTilesetCB = NULL; + if (gMapHeader.mapData->primaryTileset && gMapHeader.mapData->primaryTileset->callback) + gMapHeader.mapData->primaryTileset->callback(); +} + +static void cur_mapheader_run_tileset2_func(void) +{ + sSecondaryTilesetCBCounter = 0; + sSecondaryTilesetCBBufferSize = 0; + sSecondaryTilesetCB = NULL; + if (gMapHeader.mapData->secondaryTileset && gMapHeader.mapData->secondaryTileset->callback) + gMapHeader.mapData->secondaryTileset->callback(); +} + +void TilesetCb_General(void) +{ + static void sub_80A0B70(u16); + + sPrimaryTilesetCBCounter = 0; + sPrimaryTilesetCBBufferSize = 0x100; + sPrimaryTilesetCB = sub_80A0B70; +} + +void TilesetCb_InsideBuilding(void) +{ + static void sub_80A0BB4(u16); + + sPrimaryTilesetCBCounter = 0; + sPrimaryTilesetCBBufferSize = 0x100; + sPrimaryTilesetCB = sub_80A0BB4; +} + +static void sub_80A0B70(u16 timer) +{ + static void sub_80A0BCC(u16); + static void sub_80A0BF4(u16); + static void sub_80A0C1C(u16); + static void sub_80A0C44(u16); + static void sub_80A12AC(u16); + + if ((timer & 0x0F) == 0) + sub_80A0BCC(timer >> 4); + if ((timer & 0x0F) == 1) + sub_80A0BF4(timer >> 4); + if ((timer & 0x0F) == 2) + sub_80A0C1C(timer >> 4); + if ((timer & 0x0F) == 3) + sub_80A0C44(timer >> 4); + if ((timer & 0x0F) == 4) + sub_80A12AC(timer >> 4); +} + +static void sub_80A0BB4(u16 timer) +{ + static void sub_80A1688(u16); + + if ((timer & 0x7) == 0) + sub_80A1688(timer >> 3); +} + +static void sub_80A0BCC(u16 timer) +{ + u16 idx; + + idx = timer % 4; + sub_80A0980(gUnknown_08510764[idx], (u16 *)(BG_VRAM + 0x3F80), 0x80); +} + +static void sub_80A0BF4(u16 timer) +{ + u8 idx; + + idx = timer % 8; + sub_80A0980(gUnknown_08512574[idx], (u16 *)(BG_VRAM + 0x3600), 0x3C0); +} + +static void sub_80A0C1C(u16 timer) +{ + u16 idx; + + idx = timer % 8; + sub_80A0980(gUnknown_08512E54[idx], (u16 *)(BG_VRAM + 0x3a00), 0x140); +} + +static void sub_80A0C44(u16 timer) +{ + u16 idx; + + idx = timer % 4; + sub_80A0980(gUnknown_08513174[idx], (u16 *)(BG_VRAM + 0x3e00), 0xc0); +} + +void TilesetCb_Petalburg(void) +{ + sSecondaryTilesetCBCounter = 0; + sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; + sSecondaryTilesetCB = NULL; +} + +void TilesetCb_Rustboro(void) +{ + static void sub_80A103C(u16); + + sSecondaryTilesetCBCounter = 0; + sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; + sSecondaryTilesetCB = sub_80A103C; +} + +void TilesetCb_Dewford(void) +{ + static void sub_80A10B8(u16); + + sSecondaryTilesetCBCounter = 0; + sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; + sSecondaryTilesetCB = sub_80A10B8; +} + +void TilesetCb_Slateport(void) +{ + static void sub_80A10D0(u16); + + sSecondaryTilesetCBCounter = 0; + sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; + sSecondaryTilesetCB = sub_80A10D0; +} + +void TilesetCb_Mauville(void) +{ + static void sub_80A10E8(u16); + + sSecondaryTilesetCBCounter = sPrimaryTilesetCBCounter; + sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; + sSecondaryTilesetCB = sub_80A10E8; +} + +void TilesetCb_Lavaridge(void) +{ + static void sub_80A115C(u16); + + sSecondaryTilesetCBCounter = 0; + sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; + sSecondaryTilesetCB = sub_80A115C; +} + +void TilesetCb_Fallarbor(void) +{ + sSecondaryTilesetCBCounter = 0; + sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; + sSecondaryTilesetCB = NULL; +} + +void TilesetCb_Fortree(void) +{ + sSecondaryTilesetCBCounter = 0; + sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; + sSecondaryTilesetCB = NULL; +} + +void TilesetCb_Lilycove(void) +{ + sSecondaryTilesetCBCounter = 0; + sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; + sSecondaryTilesetCB = NULL; +} + +void TilesetCb_Mossdeep(void) +{ + sSecondaryTilesetCBCounter = 0; + sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; + sSecondaryTilesetCB = NULL; +} + +void TilesetCb_EverGrande(void) +{ + static void sub_80A1188(u16); + + sSecondaryTilesetCBCounter = 0; + sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; + sSecondaryTilesetCB = sub_80A1188; +} + +void TilesetCb_Pacifidlog(void) +{ + static void sub_80A11FC(u16); + + sSecondaryTilesetCBCounter = sPrimaryTilesetCBCounter; + sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; + sSecondaryTilesetCB = sub_80A11FC; +} + +void TilesetCb_Sootopolis(void) +{ + static void sub_80A122C(u16); + + sSecondaryTilesetCBCounter = 0; + sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; + sSecondaryTilesetCB = sub_80A122C; +} + +void TilesetCb_BattleFrontierOutsideWest(void) +{ + static void sub_80A127C(u16); + + sSecondaryTilesetCBCounter = 0; + sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; + sSecondaryTilesetCB = sub_80A127C; +} + +void TilesetCb_BattleFrontierOutsideEast(void) +{ + static void sub_80A1294(u16); + + sSecondaryTilesetCBCounter = 0; + sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; + sSecondaryTilesetCB = sub_80A1294; +} + +void TilesetCb_Underwater(void) +{ + static void sub_80A1244(u16); + + sSecondaryTilesetCBCounter = 0; + sSecondaryTilesetCBBufferSize = 128; + sSecondaryTilesetCB = sub_80A1244; +} + +void TilesetCb_SootopolisGym(void) +{ + static void sub_80A15D8(u16); + + sSecondaryTilesetCBCounter = 0; + sSecondaryTilesetCBBufferSize = 240; + sSecondaryTilesetCB = sub_80A15D8; +} + +void TilesetCb_Cave(void) +{ + static void sub_80A1260(u16); + + sSecondaryTilesetCBCounter = 0; + sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; + sSecondaryTilesetCB = sub_80A1260; +} + +void TilesetCb_EliteFour(void) +{ + static void sub_80A15F0(u16); + + sSecondaryTilesetCBCounter = 0; + sSecondaryTilesetCBBufferSize = 128; + sSecondaryTilesetCB = sub_80A15F0; +} + +void TilesetCb_MauvilleGym(void) +{ + static void sub_80A15C0(u16); + + sSecondaryTilesetCBCounter = 0; + sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; + sSecondaryTilesetCB = sub_80A15C0; +} + +void TilesetCb_BikeShop(void) +{ + static void sub_80A161C(u16); + + sSecondaryTilesetCBCounter = 0; + sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; + sSecondaryTilesetCB = sub_80A161C; +} + +void TilesetCb_BattlePyramid(void) +{ + static void sub_80A1634(u16); + + sSecondaryTilesetCBCounter = 0; + sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; + sSecondaryTilesetCB = sub_80A1634; +} + +void TilesetCb_BattleDome(void) +{ + static void sub_80A1658(u16); + + sSecondaryTilesetCBCounter = 0; + sSecondaryTilesetCBBufferSize = sPrimaryTilesetCBBufferSize; + sSecondaryTilesetCB = sub_80A1658; +} + +static void sub_80A103C(u16 timer) +{ + static void sub_80A1434(u16, u8); + static void sub_80A1470(u16); + + if ((timer & 0x07) == 0) + { + sub_80A1434(timer >> 3, 0); + sub_80A1470(timer >> 3); + } + if ((timer & 0x07) == 1) + sub_80A1434(timer >> 3, 1); + if ((timer & 0x07) == 2) + sub_80A1434(timer >> 3, 2); + if ((timer & 0x07) == 3) + sub_80A1434(timer >> 3, 3); + if ((timer & 0x07) == 4) + sub_80A1434(timer >> 3, 4); + if ((timer & 0x07) == 5) + sub_80A1434(timer >> 3, 5); + if ((timer & 0x07) == 6) + sub_80A1434(timer >> 3, 6); + if ((timer & 0x07) == 7) + sub_80A1434(timer >> 3, 7); +} + +static void sub_80A10B8(u16 timer) +{ + static void sub_80A1520(u16); + + if ((timer & 7) == 0) + sub_80A1520(timer >> 3); +} + +static void sub_80A10D0(u16 timer) +{ + static void sub_80A1598(u16); + + if ((timer & 15) == 0) + sub_80A1598(timer >> 4); +} + +static void sub_80A10E8(u16 timer) +{ + static void sub_80A1394(u16, u8); + + if ((timer & 0x07) == 0) + sub_80A1394(timer >> 3, 0); + if ((timer & 0x07) == 1) + sub_80A1394(timer >> 3, 1); + if ((timer & 0x07) == 2) + sub_80A1394(timer >> 3, 2); + if ((timer & 0x07) == 3) + sub_80A1394(timer >> 3, 3); + if ((timer & 0x07) == 4) + sub_80A1394(timer >> 3, 4); + if ((timer & 0x07) == 5) + sub_80A1394(timer >> 3, 5); + if ((timer & 0x07) == 6) + sub_80A1394(timer >> 3, 6); + if ((timer & 0x07) == 7) + sub_80A1394(timer >> 3, 7); +} + +static void sub_80A115C(u16 timer) +{ + static void sub_80A12D4(u8); + static void sub_80A1498(u16); + + if ((timer & 0x0F) == 0) + sub_80A12D4(timer >> 4); + if ((timer & 0x0F) == 1) + sub_80A1498(timer >> 4); +} + +static void sub_80A1188(u16 timer) +{ + static void sub_80A14C0(u16, u8); + + if ((timer & 0x07) == 0) + sub_80A14C0(timer >> 3, 0); + if ((timer & 0x07) == 1) + sub_80A14C0(timer >> 3, 1); + if ((timer & 0x07) == 2) + sub_80A14C0(timer >> 3, 2); + if ((timer & 0x07) == 3) + sub_80A14C0(timer >> 3, 3); + if ((timer & 0x07) == 4) + sub_80A14C0(timer >> 3, 4); + if ((timer & 0x07) == 5) + sub_80A14C0(timer >> 3, 5); + if ((timer & 0x07) == 6) + sub_80A14C0(timer >> 3, 6); + if ((timer & 0x07) == 7) + sub_80A14C0(timer >> 3, 7); +} + +static void sub_80A11FC(u16 timer) +{ + static void sub_80A131C(u8); + static void sub_80A136C(u8); + + if ((timer & 0x0F) == 0) + sub_80A131C(timer >> 4); + if ((timer & 0x0F) == 1) + sub_80A136C(timer >> 4); +} + +static void sub_80A122C(u16 timer) +{ + static void sub_80A1798(u16); + + if ((timer & 0x0F) == 0) + sub_80A1798(timer >> 4); +} + +static void sub_80A1244(u16 timer) +{ + static void sub_80A1344(u8); + + if ((timer & 0x0F) == 0) + sub_80A1344(timer >> 4); +} + +static void sub_80A1260(u16 timer) +{ + static void sub_80A14F8(u16); + + if ((timer & 0x0F) == 1) + sub_80A14F8(timer >> 4); +} + +static void sub_80A127C(u16 timer) +{ + static void sub_80A1548(u16); + + if ((timer & 0x07) == 0) + sub_80A1548(timer >> 3); +} + +static void sub_80A1294(u16 timer) +{ + static void sub_80A1570(u16); + + if ((timer & 0x07) == 0) + sub_80A1570(timer >> 3); +} + +static void sub_80A12AC(u16 timer) +{ + u16 idx; + + idx = timer % 4; + sub_80A0980(gUnknown_08513684[idx], (u16 *)(BG_VRAM + 0x3c00), 0x140); +} + +static void sub_80A12D4(u8 timer) +{ + u8 idx; + + idx = timer % 4; + sub_80A0980(gUnknown_08513894[idx], (u16 *)(BG_VRAM + 0x6400), 0x80); + + idx = (timer + 2) % 4; + sub_80A0980(gUnknown_08513894[idx], (u16 *)(BG_VRAM + 0x6480), 0x80); +} + +static void sub_80A131C(u8 timer) +{ + u8 idx; + + idx = timer % 4; + sub_80A0980(gUnknown_085143E4[idx], (u16 *)(BG_VRAM + 0x7a00), 0x3C0); +} + +static void sub_80A1344(u8 timer) +{ + u8 idx; + + idx = timer % 4; + sub_80A0980(gUnknown_085145F4[idx], (u16 *)(BG_VRAM + 0x7e00), 0x80); +} + +static void sub_80A136C(u8 timer) +{ + u8 idx; + + idx = timer % 8; + sub_80A0980(gUnknown_08514E04[idx], (u16 *)(BG_VRAM + 0x7e00), 0x100); +} + +static void sub_80A1394(u16 timer_div, u8 timer_mod) +{ + timer_div -= timer_mod; + if (timer_div < 12) // almost certainly a typo + { + timer_div %= 12; + sub_80A0980(gUnknown_08515384[timer_div], gUnknown_08515344[timer_mod], 0x80); + sub_80A0980(gUnknown_085153B4[timer_div], gUnknown_08515364[timer_mod], 0x80); + } + else + { + timer_div %= 4; + sub_80A0980(gUnknown_085153E4[timer_div], gUnknown_08515344[timer_mod], 0x80); + sub_80A0980(gUnknown_085153F4[timer_div], gUnknown_08515364[timer_mod], 0x80); + } +} + +static void sub_80A1434(u16 timer_div, u8 timer_mod) +{ + timer_div -= timer_mod; + timer_div %= 8; + if (gUnknown_08515824[timer_div]) + sub_80A0980(gUnknown_08515824[timer_div], gUnknown_08515804[timer_mod], 0x80); +} + +static void sub_80A1470(u16 timer) +{ + u16 idx; + + idx = timer % 2; + sub_80A0980(gUnknown_08515964[idx], (u16 *)(BG_VRAM + 0x7800), 0x80); +} + +static void sub_80A1498(u16 timer) +{ + u16 idx; + + idx = timer % 4; + sub_80A0980(gUnknown_08515D8C[idx], (u16 *)(BG_VRAM + 0x5400), 0x80); +} + +static void sub_80A14C0(u16 timer_div, u8 timer_mod) +{ + timer_div -= timer_mod; + timer_div %= 8; + + sub_80A0980(gUnknown_085161DC[timer_div], gUnknown_085161BC[timer_mod], 0x80); +} + +static void sub_80A14F8(u16 timer) +{ + u16 idx; + + idx = timer % 4; + sub_80A0980(gUnknown_08515D8C[idx], (u16 *)(BG_VRAM + 0x7400), 0x80); +} + +static void sub_80A1520(u16 timer) +{ + u16 idx; + + idx = timer % 4; + sub_80A0980(gUnknown_085164FC[idx], (u16 *)(BG_VRAM + 0x5540), 0xC0); +} + +static void sub_80A1548(u16 timer) +{ + u16 idx; + + idx = timer % 4; + sub_80A0980(gUnknown_0851680C[idx], (u16 *)(BG_VRAM + 0x5b40), 0xC0); +} + +static void sub_80A1570(u16 timer) +{ + u16 idx; + + idx = timer % 4; + sub_80A0980(gUnknown_08516B1C[idx], (u16 *)(BG_VRAM + 0x5b40), 0xC0); +} + +static void sub_80A1598(u16 timer) +{ + u16 idx; + + idx = timer % 4; + sub_80A0980(gUnknown_08516D2C[idx], (u16 *)(BG_VRAM + 0x5c00), 0x80); +} + +static void sub_80A15C0(u16 timer) +{ + static void sub_80A1748(u16); + + if ((timer & 1) == 0) + sub_80A1748(timer >> 1); +} + +static void sub_80A15D8(u16 timer) +{ + static void sub_80A16B0(u16); + + if ((timer & 7) == 0) + sub_80A16B0(timer >> 3); +} + +static void sub_80A15F0(u16 timer) +{ + static void sub_80A1720(u16); + static void sub_80A16F8(u16); + + if ((timer & 0x3f) == 1) + sub_80A1720(timer >> 6); + if ((timer & 0x07) == 1) + sub_80A16F8(timer >> 3); +} +static void sub_80A161C(u16 timer) +{ + static void sub_80A1770(u16); + + if ((timer & 3) == 0) + sub_80A1770(timer >> 2); +} + +static void sub_80A1634(u16 timer) +{ + static void sub_80A17C0(u16); + static void sub_80A17EC(u16); + + if ((timer & 7) == 0) + { + sub_80A17C0(timer >> 3); + sub_80A17EC(timer >> 3); + } +} + +static void sub_80A1658(u16 timer) +{ + static void sub_80A1818(u16); + + if ((timer & 3) == 0) + sub_80A1818(timer >> 2); +} + +static void sub_80A1670(u16 timer) +{ + static void sub_80A1884(u16); + + if ((timer & 3) == 0) + sub_80A1884(timer >> 2); +} + +static void sub_80A1688(u16 timer) +{ + u16 idx; + + idx = timer % 2; + sub_80A0980(gUnknown_08516E3C[idx], (u16 *)(BG_VRAM + 0x3e00), 0x80); +} + +static void sub_80A16B0(u16 timer) +{ + u16 idx; + + idx = timer % 3; + sub_80A0980(gUnknown_08517A44[idx], (u16 *)(BG_VRAM + 0x7e00), 0x180); + sub_80A0980(gUnknown_08517A50[idx], (u16 *)(BG_VRAM + 0x7a00), 0x280); +} + +static void sub_80A16F8(u16 timer) +{ + u16 idx; + + idx = timer % 4; + sub_80A0980(gUnknown_08517BFC[idx], (u16 *)(BG_VRAM + 0x7f00), 0x20); +} + +static void sub_80A1720(u16 timer) +{ + u16 idx; + + idx = timer % 2; + sub_80A0980(gUnknown_08517C0C[idx], (u16 *)(BG_VRAM + 0x7c00), 0x80); +} + +static void sub_80A1748(u16 timer) +{ + u16 idx; + + idx = timer % 2; + sub_80A0980(gUnknown_08518034[idx], (u16 *)(BG_VRAM + 0x5200), 0x200); +} + +static void sub_80A1770(u16 timer) +{ + u16 idx; + + idx = timer % 2; + sub_80A0980(gUnknown_0851829C[idx], (u16 *)(BG_VRAM + 0x7e00), 0x120); +} + +static void sub_80A1798(u16 timer) +{ + u16 idx; + + idx = timer % 8; + sub_80A0980(gUnknown_085202C4[idx], (u16 *)(BG_VRAM + 0x5e00), 0xc00); +} + +static void sub_80A17C0(u16 timer) +{ + u16 idx; + + idx = timer % 3; + sub_80A0980(gUnknown_08524864[idx], (u16 *)(BG_VRAM + 0x52e0), 0x100); +} + +static void sub_80A17EC(u16 timer) +{ + u16 idx; + + idx = timer % 3; + sub_80A0980(gUnknown_08524870[idx], (u16 *)(BG_VRAM + 0x50e0), 0x100); +} + +static void sub_80A1818(u16 a1) +{ + CpuCopy16(gUnknown_0852487C[a1 & 0x3], gPlttBufferUnfaded + 0x80, 32); + BlendPalette(0x80, 0x10, gPaletteFade.y, gPaletteFade.blendColor & 0x7FFF); + if ((u8)FindTaskIdByFunc(sub_8149DFC) != 0xFF ) + { + sSecondaryTilesetCB = sub_80A1670; + sSecondaryTilesetCBBufferSize = 0x20; + } +} + +static void sub_80A1884(u16 a1) +{ + CpuCopy16(gUnknown_0852487C[a1 & 0x3], gPlttBufferUnfaded + 0x80, 32); + if ((u8)FindTaskIdByFunc(sub_8149DFC) == 0xFF ) + { + BlendPalette(0x80, 0x10, gPaletteFade.y, gPaletteFade.blendColor & 0x7FFF); + if (!--sSecondaryTilesetCBBufferSize) + sSecondaryTilesetCB = NULL; + } +} diff --git a/sym_bss.txt b/sym_bss.txt index 16f14da51..3416b67df 100644 --- a/sym_bss.txt +++ b/sym_bss.txt @@ -17,6 +17,7 @@ gUnknown_03000000: @ 3000000 .include "src/field_camera.o" .include "src/script.o" .include "src/scrcmd.o" + .include "src/tileset_anims.o" .include "src/palette.o" .include "src/sound.o" diff --git a/sym_ewram.txt b/sym_ewram.txt index 8549f1679..7848dcc7c 100644 --- a/sym_ewram.txt +++ b/sym_ewram.txt @@ -747,6 +747,7 @@ gUnknown_02037621: @ 2037621 gUnknown_02037622: @ 2037622 .space 0x2 + .include "src/tileset_anims.o" .include "src/palette.o" .include "src/sound.o" From 74951e4312b782b81324999a580bdf25fe4d31ce Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Mon, 2 Oct 2017 08:43:52 -0400 Subject: [PATCH 20/42] Name pointer tables --- asm/rom4.s | 2 +- data/tileset.s | 71 ++++++++++---------- src/tileset_anims.c | 160 ++++++++++++++++++++++---------------------- 3 files changed, 116 insertions(+), 117 deletions(-) diff --git a/asm/rom4.s b/asm/rom4.s index 5250659e7..8423d0d9a 100644 --- a/asm/rom4.s +++ b/asm/rom4.s @@ -3640,7 +3640,7 @@ VBlankCB_Field: @ 8086390 bl sub_80BA0A8 bl FieldUpdateBgTilemapScroll bl TransferPlttBuffer - bl sub_80A09D0 + bl TransferTilesetAnimsBuffer pop {r0} bx r0 thumb_func_end VBlankCB_Field diff --git a/data/tileset.s b/data/tileset.s index 0acb50e91..b8a0ca77f 100644 --- a/data/tileset.s +++ b/data/tileset.s @@ -15,7 +15,7 @@ gUnknown_085106C4:: .space 0x20 -gUnknown_08510764:: @ 8510764 +gTilesetAnims_General0:: @ 8510764 @ replacing .incbin "baserom.gba", 0x00510764, 0x10 .4byte gUnknown_08510644 .4byte gUnknown_085105C4 @@ -47,7 +47,7 @@ gUnknown_085121B4:: .incbin "baserom.gba", 0x5121b4, 0x3c0 -gUnknown_08512574:: @ 8512574 +gTilesetAnims_General1:: @ 8512574 @ replacing .incbin "baserom.gba", 0x00512574, 0x20 .4byte gUnknown_08510774 .4byte gUnknown_08510B34 @@ -80,7 +80,7 @@ gUnknown_08512D14:: .incbin "baserom.gba", 0x512d14, 0x140 -gUnknown_08512E54:: @ 8512E54 +gTilesetAnims_General2:: @ 8512E54 @ replacing .incbin "baserom.gba", 0x00512e54, 0x20 .4byte gUnknown_08512594 .4byte gUnknown_085126D4 @@ -104,7 +104,7 @@ gUnknown_085130B4:: .incbin "baserom.gba", 0x5130b4, 0xc0 -gUnknown_08513174:: @ 8513174 +gTilesetAnims_General3:: @ 8513174 @ replacing .incbin "baserom.gba", 0x00513174, 0x10 .4byte gUnknown_08512E74 .4byte gUnknown_08512F34 @@ -124,7 +124,7 @@ gUnknown_08513544:: .incbin "baserom.gba", 0x513544, 0x140 -gUnknown_08513684:: @ 8513684 +gTilesetAnims_General4:: @ 8513684 @ replacing .incbin "baserom.gba", 0x00513684, 0x10 .4byte gUnknown_08513184 .4byte gUnknown_085132C4 @@ -144,7 +144,7 @@ gUnknown_08513814:: .incbin "baserom.gba", 0x513814, 0x80 -gUnknown_08513894:: @ 8513894 +gTilesetAnims_Lavaridge0:: @ 8513894 @ replacing .incbin "baserom.gba", 0x00513894, 0x10 .4byte gUnknown_08513694 .4byte gUnknown_08513714 @@ -161,7 +161,7 @@ gUnknown_08514024:: .incbin "baserom.gba", 0x514024, 0x3c0 -gUnknown_085143E4:: @ 85143E4 +gTilesetAnims_Pacifidlog0:: @ 85143E4 @ replacing .incbin "baserom.gba", 0x005143e4, 0x10 .4byte gUnknown_085138A4 .4byte gUnknown_08513C64 @@ -181,7 +181,7 @@ gUnknown_08514574:: .incbin "baserom.gba", 0x514574, 0x80 -gUnknown_085145F4:: @ 85145F4 +gTilesetAnims_Underwater0:: @ 85145F4 @ replacing .incbin "baserom.gba", 0x005145f4, 0x10 .4byte gUnknown_085143F4 .4byte gUnknown_08514474 @@ -213,7 +213,7 @@ gUnknown_08514D04:: .incbin "baserom.gba", 0x514d04, 0x100 -gUnknown_08514E04:: @ 8514E04 +gTilesetAnims_Pacifidlog1:: @ 8514E04 @ replacing .incbin "baserom.gba", 0x00514e04, 0x20 .4byte gUnknown_08514604 .4byte gUnknown_08514704 @@ -256,7 +256,7 @@ gUnknown_085152A4:: .space 0x20 -gUnknown_08515344:: @ 8515344 +gTilesetAnims_MauvilleVDests0:: @ 8515344 @ replacing .incbin "baserom.gba", 0x00515344, 0x20 .4byte BG_VRAM + 0x4c00 .4byte BG_VRAM + 0x4c80 @@ -267,7 +267,7 @@ gUnknown_08515344:: @ 8515344 .4byte BG_VRAM + 0x4f00 .4byte BG_VRAM + 0x4f80 -gUnknown_08515364:: @ 8515364 +gTilesetAnims_MauvilleVDests1:: @ 8515364 @ replacing .incbin "baserom.gba", 0x00515364, 0x20 .4byte BG_VRAM + 0x5000 .4byte BG_VRAM + 0x5080 @@ -278,7 +278,7 @@ gUnknown_08515364:: @ 8515364 .4byte BG_VRAM + 0x5300 .4byte BG_VRAM + 0x5380 -gUnknown_08515384:: @ 8515384 +gTilesetAnims_Mauville0a:: @ 8515384 @ replacing .incbin "baserom.gba", 0x00515384, 0x30 .4byte gUnknown_08514E24 .4byte gUnknown_08514E24 @@ -293,7 +293,7 @@ gUnknown_08515384:: @ 8515384 .4byte gUnknown_08514F24 .4byte gUnknown_08514EA4 -gUnknown_085153B4:: @ 85153B4 +gTilesetAnims_Mauville0b:: @ 85153B4 @ replacing .incbin "baserom.gba", 0x005153b4, 0x30 .4byte gUnknown_085150A4 .4byte gUnknown_085150A4 @@ -308,14 +308,14 @@ gUnknown_085153B4:: @ 85153B4 .4byte gUnknown_085151A4 .4byte gUnknown_08515124 -gUnknown_085153E4:: @ 85153E4 +gTilesetAnims_Mauville1a:: @ 85153E4 @ replacing .incbin "baserom.gba", 0x005153e4, 0x10 .4byte gUnknown_08514E24 .4byte gUnknown_08514E24 .4byte gUnknown_08515024 .4byte gUnknown_08515024 -gUnknown_085153F4:: @ 85153F4 +gTilesetAnims_Mauville1b:: @ 85153F4 @ replacing .incbin "baserom.gba", 0x005153f4, 0x10 .4byte gUnknown_085150A4 .4byte gUnknown_085150A4 @@ -347,7 +347,7 @@ gUnknown_08515784:: .incbin "baserom.gba", 0x515784, 0x80 -gUnknown_08515804:: @ 8515804 +gTilesetAnims_RustboroVDests0:: @ 8515804 .4byte BG_VRAM + 0x5000 .4byte BG_VRAM + 0x5080 .4byte BG_VRAM + 0x5100 @@ -357,7 +357,7 @@ gUnknown_08515804:: @ 8515804 .4byte BG_VRAM + 0x5300 .4byte BG_VRAM + 0x5380 -gUnknown_08515824:: @ 8515824 +gTilesetAnims_Rustboro0:: @ 8515824 @ replacing .incbin "baserom.gba", 0x00515824, 0x20 .4byte gUnknown_08515404 .4byte gUnknown_08515484 @@ -377,7 +377,7 @@ gUnknown_085158C4:: .space 0x20 -gUnknown_08515964:: @ 8515964 +gTilesetAnims_Rustboro1:: @ 8515964 @ replacing .incbin "baserom.gba", 0x00515964, 0x8 .4byte gUnknown_08515844 .4byte gUnknown_085158C4 @@ -409,7 +409,7 @@ gUnknown_08515CEC:: .space 0x20 -gUnknown_08515D8C:: @ 8515D8C +gTilesetAnims_Lavaridge1_Cave0:: @ 8515D8C @ replacing .incbin "baserom.gba", 0x00515d8c, 0x10 .4byte gUnknown_0851596C .4byte gUnknown_085159EC @@ -443,7 +443,7 @@ gUnknown_0851611C:: .space 0x20 -gUnknown_085161BC:: @ 85161BC +gTilesetAnims_EverGrandeVDests0:: @ 85161BC @ replacing .incbin "baserom.gba", 0x005161bc, 0x20 .4byte BG_VRAM + 0x5c00 .4byte BG_VRAM + 0x5c80 @@ -454,7 +454,7 @@ gUnknown_085161BC:: @ 85161BC .4byte BG_VRAM + 0x5f00 .4byte BG_VRAM + 0x5f80 -gUnknown_085161DC:: @ 85161DC +gTilesetAnims_EverGrande0:: @ 85161DC @ replacing .incbin "baserom.gba", 0x005161dc, 0x20 .4byte gUnknown_08515D9C .4byte gUnknown_08515E1C @@ -478,7 +478,7 @@ gUnknown_0851643C:: .incbin "baserom.gba", 0x51643c, 0xc0 -gUnknown_085164FC:: @ 85164FC +gTilesetAnims_Dewford0:: @ 85164FC @ replacing .incbin "baserom.gba", 0x005164fc, 0x10 .4byte gUnknown_085161FC .4byte gUnknown_085162BC @@ -498,7 +498,7 @@ gUnknown_0851674C:: .incbin "baserom.gba", 0x51674c, 0xc0 -gUnknown_0851680C:: @ 851680C +gTilesetAnims_BattleFrontierOutsideWest0:: @ 851680C @ replacing .incbin "baserom.gba", 0x0051680c, 0x10 .4byte gUnknown_0851650C .4byte gUnknown_085165CC @@ -518,7 +518,7 @@ gUnknown_08516A5C:: .incbin "baserom.gba", 0x516a5c, 0xc0 -gUnknown_08516B1C:: @ 8516B1C +gTilesetAnims_BattleFrontierOutsideEast0:: @ 8516B1C @ replacing .incbin "baserom.gba", 0x00516b1c, 0x10 .4byte gUnknown_0851681C .4byte gUnknown_085168DC @@ -538,7 +538,7 @@ gUnknown_08516CAC:: .incbin "baserom.gba", 0x516cac, 0x80 -gUnknown_08516D2C:: @ 8516D2C +gTilesetAnims_Slateport0:: @ 8516D2C @ replacing .incbin "baserom.gba", 0x00516d2c, 0x10 .4byte gUnknown_08516B2C .4byte gUnknown_08516BAC @@ -552,7 +552,7 @@ gUnknown_08516DBC:: .incbin "baserom.gba", 0x516dbc, 0x80 -gUnknown_08516E3C:: @ 8516E3C +gTilesetAnims_InsideBuilding0:: @ 8516E3C @ replacing .incbin "baserom.gba", 0x00516e3c, 0x8 .4byte gUnknown_08516D3C .4byte gUnknown_08516DBC @@ -576,13 +576,13 @@ gUnknown_085177C4:: .incbin "baserom.gba", 0x5177c4, 0x280 -gUnknown_08517A44:: @ 8517A44 +gTilesetAnims_SootopolisGym0:: @ 8517A44 @ replacing .incbin "baserom.gba", 0x00517a44, 0xc .4byte gUnknown_08516E44 .4byte gUnknown_08516FC4 .4byte gUnknown_08517144 -gUnknown_08517A50:: @ 8517A50 +gTilesetAnims_SootopolisGym1:: @ 8517A50 @ replacing .incbin "baserom.gba", 0x00517a50, 0xc .4byte gUnknown_085172C4 .4byte gUnknown_08517544 @@ -609,14 +609,14 @@ gUnknown_08517BBC:: .space 0x20 -gUnknown_08517BFC:: @ 8517BFC +gTilesetAnims_EliteFour1:: @ 8517BFC @ replacing .incbin "baserom.gba", 0x00517bfc, 0x10 .4byte gUnknown_08517B5C .4byte gUnknown_08517B7C .4byte gUnknown_08517B9C .4byte gUnknown_08517BBC -gUnknown_08517C0C:: @ 8517C0C +gTilesetAnims_EliteFour0:: @ 8517C0C @ replacing .incbin "baserom.gba", 0x00517c0c, 0x8 .4byte gUnknown_08517A5C .4byte gUnknown_08517ADC @@ -630,7 +630,7 @@ gUnknown_08517E14:: .space 0x20 -gUnknown_08518034:: @ 8518034 +gTilesetAnims_MauvilleGym0:: @ 8518034 @ replacing .incbin "baserom.gba", 0x00518034, 0x8 .4byte gUnknown_08517C14 .4byte gUnknown_08517E14 @@ -643,7 +643,7 @@ gUnknown_0851815C:: .space 0x20 -gUnknown_0851829C:: @ 851829C +gTilesetAnims_BikeShop0:: @ 851829C @ replacing .incbin "baserom.gba", 0x0051829c, 0x8 .4byte gUnknown_0851803C .4byte gUnknown_0851815C @@ -686,7 +686,7 @@ gUnknown_0851F2C4:: gUnknown_0851FAC4:: .incbin "baserom.gba", 0x51fac4, 0x800 -gUnknown_085202C4:: @ 85202C4 +gTilesetAnims_Sootopolis0:: @ 85202C4 @ replacing .incbin "baserom.gba", 0x005202c4, 0x20 .4byte gUnknown_085182A4 .4byte gUnknown_08518EA4 @@ -727,14 +727,13 @@ gUnknown_08524604:: gUnknown_08524804:: .incbin "baserom.gba", 0x524804, 0x60 - -gUnknown_08524864:: @ 8524864 +gTilesetAnims_BattlePyramid0:: @ 8524864 @ replacing .incbin "baserom.gba", 0x00524864, 0xc .4byte gUnknown_085202E4 .4byte gUnknown_085203E4 .4byte gUnknown_085204E4 -gUnknown_08524870:: @ 8524870 +gTilesetAnims_BattlePyramid1:: @ 8524870 @ replacing .incbin "baserom.gba", 0x00524870, 0xc .4byte gUnknown_08520604 .4byte gUnknown_08520704 diff --git a/src/tileset_anims.c b/src/tileset_anims.c index 5eb470a07..b7f18d869 100644 --- a/src/tileset_anims.c +++ b/src/tileset_anims.c @@ -31,48 +31,48 @@ static void cur_mapheader_run_tileset2_func(void); // .rodata -extern const u16 *const gUnknown_08510764[]; -extern const u16 *const gUnknown_08512574[]; -extern const u16 *const gUnknown_08512E54[]; -extern const u16 *const gUnknown_08513174[]; -extern const u16 *const gUnknown_08513684[]; -extern const u16 *const gUnknown_08513894[]; -extern const u16 *const gUnknown_085143E4[]; -extern const u16 *const gUnknown_085145F4[]; -extern const u16 *const gUnknown_08514E04[]; -extern u16 *const gUnknown_08515344[]; -extern u16 *const gUnknown_08515364[]; -extern const u16 *const gUnknown_08515384[]; -extern const u16 *const gUnknown_085153B4[]; -extern const u16 *const gUnknown_085153E4[]; -extern const u16 *const gUnknown_085153F4[]; -extern u16 *const gUnknown_08515804[]; -extern const u16 *const gUnknown_08515824[]; -extern const u16 *const gUnknown_08515964[]; -extern const u16 *const gUnknown_08515D8C[]; -extern u16 *const gUnknown_085161BC[]; -extern const u16 *const gUnknown_085161DC[]; -extern const u16 *const gUnknown_085164FC[]; -extern const u16 *const gUnknown_0851680C[]; -extern const u16 *const gUnknown_08516B1C[]; -extern const u16 *const gUnknown_08516D2C[]; -extern const u16 *const gUnknown_08516E3C[]; -extern const u16 *const gUnknown_08517A44[]; -extern const u16 *const gUnknown_08517A50[]; -extern const u16 *const gUnknown_08517BFC[]; -extern const u16 *const gUnknown_08517C0C[]; -extern const u16 *const gUnknown_08518034[]; -extern const u16 *const gUnknown_0851829C[]; -extern const u16 *const gUnknown_085202C4[]; -extern const u16 *const gUnknown_08524864[]; -extern const u16 *const gUnknown_08524870[]; +extern const u16 *const gTilesetAnims_General0[]; +extern const u16 *const gTilesetAnims_General1[]; +extern const u16 *const gTilesetAnims_General2[]; +extern const u16 *const gTilesetAnims_General3[]; +extern const u16 *const gTilesetAnims_General4[]; +extern const u16 *const gTilesetAnims_Lavaridge0[]; +extern const u16 *const gTilesetAnims_Pacifidlog0[]; +extern const u16 *const gTilesetAnims_Underwater0[]; +extern const u16 *const gTilesetAnims_Pacifidlog1[]; +extern u16 *const gTilesetAnims_MauvilleVDests0[]; +extern u16 *const gTilesetAnims_MauvilleVDests1[]; +extern const u16 *const gTilesetAnims_Mauville0a[]; +extern const u16 *const gTilesetAnims_Mauville0b[]; +extern const u16 *const gTilesetAnims_Mauville1a[]; +extern const u16 *const gTilesetAnims_Mauville1b[]; +extern u16 *const gTilesetAnims_RustboroVDests0[]; +extern const u16 *const gTilesetAnims_Rustboro0[]; +extern const u16 *const gTilesetAnims_Rustboro1[]; +extern const u16 *const gTilesetAnims_Lavaridge1_Cave0[]; +extern u16 *const gTilesetAnims_EverGrandeVDests0[]; +extern const u16 *const gTilesetAnims_EverGrande0[]; +extern const u16 *const gTilesetAnims_Dewford0[]; +extern const u16 *const gTilesetAnims_BattleFrontierOutsideWest0[]; +extern const u16 *const gTilesetAnims_BattleFrontierOutsideEast0[]; +extern const u16 *const gTilesetAnims_Slateport0[]; +extern const u16 *const gTilesetAnims_InsideBuilding0[]; +extern const u16 *const gTilesetAnims_SootopolisGym0[]; +extern const u16 *const gTilesetAnims_SootopolisGym1[]; +extern const u16 *const gTilesetAnims_EliteFour1[]; +extern const u16 *const gTilesetAnims_EliteFour0[]; +extern const u16 *const gTilesetAnims_MauvilleGym0[]; +extern const u16 *const gTilesetAnims_BikeShop0[]; +extern const u16 *const gTilesetAnims_Sootopolis0[]; +extern const u16 *const gTilesetAnims_BattlePyramid0[]; +extern const u16 *const gTilesetAnims_BattlePyramid1[]; extern const u16 gUnknown_08D85640[]; extern const u16 gUnknown_08D85660[]; extern const u16 gUnknown_08D85680[]; extern const u16 gUnknown_08D856A0[]; -static const u16 *const gUnknown_0852487C[] = { +static const u16 *const gTilesetAnims_BattleDomePals0[] = { gUnknown_08D85640, gUnknown_08D85660, gUnknown_08D85680, @@ -81,24 +81,24 @@ static const u16 *const gUnknown_0852487C[] = { // .text -static void sub_80A0954(void) +static void ResetTilesetAnimBuffer(void) { sTilesetDMA3TransferBufferSize = 0; CpuFill32(0, sTilesetDMA3TransferBuffer, sizeof sTilesetDMA3TransferBuffer); } -static void sub_80A0980(const u16 *a0, u16 *a1, u16 a2) +static void AppendTilesetAnimToBuffer(const u16 *src, u16 *dest, u16 size) { if (sTilesetDMA3TransferBufferSize < 20) { - sTilesetDMA3TransferBuffer[sTilesetDMA3TransferBufferSize].src = a0; - sTilesetDMA3TransferBuffer[sTilesetDMA3TransferBufferSize].dest = a1; - sTilesetDMA3TransferBuffer[sTilesetDMA3TransferBufferSize].size = a2; + sTilesetDMA3TransferBuffer[sTilesetDMA3TransferBufferSize].src = src; + sTilesetDMA3TransferBuffer[sTilesetDMA3TransferBufferSize].dest = dest; + sTilesetDMA3TransferBuffer[sTilesetDMA3TransferBufferSize].size = size; sTilesetDMA3TransferBufferSize ++; } } -void sub_80A09D0(void) +void TransferTilesetAnimsBuffer(void) { int i; @@ -111,7 +111,7 @@ void sub_80A09D0(void) void cur_mapheader_run_tileset_funcs_after_some_cpuset(void) { - sub_80A0954(); + ResetTilesetAnimBuffer(); cur_mapheader_run_tileset1_func(); cur_mapheader_run_tileset2_func(); } @@ -123,7 +123,7 @@ void sub_80A0A2C(void) void sub_80A0A38(void) { - sub_80A0954(); + ResetTilesetAnimBuffer(); if (++sPrimaryTilesetCBCounter >= sPrimaryTilesetCBBufferSize) sPrimaryTilesetCBCounter = 0; if (++sSecondaryTilesetCBCounter >= sSecondaryTilesetCBBufferSize) @@ -203,7 +203,7 @@ static void sub_80A0BCC(u16 timer) u16 idx; idx = timer % 4; - sub_80A0980(gUnknown_08510764[idx], (u16 *)(BG_VRAM + 0x3F80), 0x80); + AppendTilesetAnimToBuffer(gTilesetAnims_General0[idx], (u16 *)(BG_VRAM + 0x3F80), 0x80); } static void sub_80A0BF4(u16 timer) @@ -211,7 +211,7 @@ static void sub_80A0BF4(u16 timer) u8 idx; idx = timer % 8; - sub_80A0980(gUnknown_08512574[idx], (u16 *)(BG_VRAM + 0x3600), 0x3C0); + AppendTilesetAnimToBuffer(gTilesetAnims_General1[idx], (u16 *)(BG_VRAM + 0x3600), 0x3C0); } static void sub_80A0C1C(u16 timer) @@ -219,7 +219,7 @@ static void sub_80A0C1C(u16 timer) u16 idx; idx = timer % 8; - sub_80A0980(gUnknown_08512E54[idx], (u16 *)(BG_VRAM + 0x3a00), 0x140); + AppendTilesetAnimToBuffer(gTilesetAnims_General2[idx], (u16 *)(BG_VRAM + 0x3a00), 0x140); } static void sub_80A0C44(u16 timer) @@ -227,7 +227,7 @@ static void sub_80A0C44(u16 timer) u16 idx; idx = timer % 4; - sub_80A0980(gUnknown_08513174[idx], (u16 *)(BG_VRAM + 0x3e00), 0xc0); + AppendTilesetAnimToBuffer(gTilesetAnims_General3[idx], (u16 *)(BG_VRAM + 0x3e00), 0xc0); } void TilesetCb_Petalburg(void) @@ -580,7 +580,7 @@ static void sub_80A12AC(u16 timer) u16 idx; idx = timer % 4; - sub_80A0980(gUnknown_08513684[idx], (u16 *)(BG_VRAM + 0x3c00), 0x140); + AppendTilesetAnimToBuffer(gTilesetAnims_General4[idx], (u16 *)(BG_VRAM + 0x3c00), 0x140); } static void sub_80A12D4(u8 timer) @@ -588,10 +588,10 @@ static void sub_80A12D4(u8 timer) u8 idx; idx = timer % 4; - sub_80A0980(gUnknown_08513894[idx], (u16 *)(BG_VRAM + 0x6400), 0x80); + AppendTilesetAnimToBuffer(gTilesetAnims_Lavaridge0[idx], (u16 *)(BG_VRAM + 0x6400), 0x80); idx = (timer + 2) % 4; - sub_80A0980(gUnknown_08513894[idx], (u16 *)(BG_VRAM + 0x6480), 0x80); + AppendTilesetAnimToBuffer(gTilesetAnims_Lavaridge0[idx], (u16 *)(BG_VRAM + 0x6480), 0x80); } static void sub_80A131C(u8 timer) @@ -599,7 +599,7 @@ static void sub_80A131C(u8 timer) u8 idx; idx = timer % 4; - sub_80A0980(gUnknown_085143E4[idx], (u16 *)(BG_VRAM + 0x7a00), 0x3C0); + AppendTilesetAnimToBuffer(gTilesetAnims_Pacifidlog0[idx], (u16 *)(BG_VRAM + 0x7a00), 0x3C0); } static void sub_80A1344(u8 timer) @@ -607,7 +607,7 @@ static void sub_80A1344(u8 timer) u8 idx; idx = timer % 4; - sub_80A0980(gUnknown_085145F4[idx], (u16 *)(BG_VRAM + 0x7e00), 0x80); + AppendTilesetAnimToBuffer(gTilesetAnims_Underwater0[idx], (u16 *)(BG_VRAM + 0x7e00), 0x80); } static void sub_80A136C(u8 timer) @@ -615,7 +615,7 @@ static void sub_80A136C(u8 timer) u8 idx; idx = timer % 8; - sub_80A0980(gUnknown_08514E04[idx], (u16 *)(BG_VRAM + 0x7e00), 0x100); + AppendTilesetAnimToBuffer(gTilesetAnims_Pacifidlog1[idx], (u16 *)(BG_VRAM + 0x7e00), 0x100); } static void sub_80A1394(u16 timer_div, u8 timer_mod) @@ -624,14 +624,14 @@ static void sub_80A1394(u16 timer_div, u8 timer_mod) if (timer_div < 12) // almost certainly a typo { timer_div %= 12; - sub_80A0980(gUnknown_08515384[timer_div], gUnknown_08515344[timer_mod], 0x80); - sub_80A0980(gUnknown_085153B4[timer_div], gUnknown_08515364[timer_mod], 0x80); + AppendTilesetAnimToBuffer(gTilesetAnims_Mauville0a[timer_div], gTilesetAnims_MauvilleVDests0[timer_mod], 0x80); + AppendTilesetAnimToBuffer(gTilesetAnims_Mauville0b[timer_div], gTilesetAnims_MauvilleVDests1[timer_mod], 0x80); } else { timer_div %= 4; - sub_80A0980(gUnknown_085153E4[timer_div], gUnknown_08515344[timer_mod], 0x80); - sub_80A0980(gUnknown_085153F4[timer_div], gUnknown_08515364[timer_mod], 0x80); + AppendTilesetAnimToBuffer(gTilesetAnims_Mauville1a[timer_div], gTilesetAnims_MauvilleVDests0[timer_mod], 0x80); + AppendTilesetAnimToBuffer(gTilesetAnims_Mauville1b[timer_div], gTilesetAnims_MauvilleVDests1[timer_mod], 0x80); } } @@ -639,8 +639,8 @@ static void sub_80A1434(u16 timer_div, u8 timer_mod) { timer_div -= timer_mod; timer_div %= 8; - if (gUnknown_08515824[timer_div]) - sub_80A0980(gUnknown_08515824[timer_div], gUnknown_08515804[timer_mod], 0x80); + if (gTilesetAnims_Rustboro0[timer_div]) + AppendTilesetAnimToBuffer(gTilesetAnims_Rustboro0[timer_div], gTilesetAnims_RustboroVDests0[timer_mod], 0x80); } static void sub_80A1470(u16 timer) @@ -648,7 +648,7 @@ static void sub_80A1470(u16 timer) u16 idx; idx = timer % 2; - sub_80A0980(gUnknown_08515964[idx], (u16 *)(BG_VRAM + 0x7800), 0x80); + AppendTilesetAnimToBuffer(gTilesetAnims_Rustboro1[idx], (u16 *)(BG_VRAM + 0x7800), 0x80); } static void sub_80A1498(u16 timer) @@ -656,7 +656,7 @@ static void sub_80A1498(u16 timer) u16 idx; idx = timer % 4; - sub_80A0980(gUnknown_08515D8C[idx], (u16 *)(BG_VRAM + 0x5400), 0x80); + AppendTilesetAnimToBuffer(gTilesetAnims_Lavaridge1_Cave0[idx], (u16 *)(BG_VRAM + 0x5400), 0x80); } static void sub_80A14C0(u16 timer_div, u8 timer_mod) @@ -664,7 +664,7 @@ static void sub_80A14C0(u16 timer_div, u8 timer_mod) timer_div -= timer_mod; timer_div %= 8; - sub_80A0980(gUnknown_085161DC[timer_div], gUnknown_085161BC[timer_mod], 0x80); + AppendTilesetAnimToBuffer(gTilesetAnims_EverGrande0[timer_div], gTilesetAnims_EverGrandeVDests0[timer_mod], 0x80); } static void sub_80A14F8(u16 timer) @@ -672,7 +672,7 @@ static void sub_80A14F8(u16 timer) u16 idx; idx = timer % 4; - sub_80A0980(gUnknown_08515D8C[idx], (u16 *)(BG_VRAM + 0x7400), 0x80); + AppendTilesetAnimToBuffer(gTilesetAnims_Lavaridge1_Cave0[idx], (u16 *)(BG_VRAM + 0x7400), 0x80); } static void sub_80A1520(u16 timer) @@ -680,7 +680,7 @@ static void sub_80A1520(u16 timer) u16 idx; idx = timer % 4; - sub_80A0980(gUnknown_085164FC[idx], (u16 *)(BG_VRAM + 0x5540), 0xC0); + AppendTilesetAnimToBuffer(gTilesetAnims_Dewford0[idx], (u16 *)(BG_VRAM + 0x5540), 0xC0); } static void sub_80A1548(u16 timer) @@ -688,7 +688,7 @@ static void sub_80A1548(u16 timer) u16 idx; idx = timer % 4; - sub_80A0980(gUnknown_0851680C[idx], (u16 *)(BG_VRAM + 0x5b40), 0xC0); + AppendTilesetAnimToBuffer(gTilesetAnims_BattleFrontierOutsideWest0[idx], (u16 *)(BG_VRAM + 0x5b40), 0xC0); } static void sub_80A1570(u16 timer) @@ -696,7 +696,7 @@ static void sub_80A1570(u16 timer) u16 idx; idx = timer % 4; - sub_80A0980(gUnknown_08516B1C[idx], (u16 *)(BG_VRAM + 0x5b40), 0xC0); + AppendTilesetAnimToBuffer(gTilesetAnims_BattleFrontierOutsideEast0[idx], (u16 *)(BG_VRAM + 0x5b40), 0xC0); } static void sub_80A1598(u16 timer) @@ -704,7 +704,7 @@ static void sub_80A1598(u16 timer) u16 idx; idx = timer % 4; - sub_80A0980(gUnknown_08516D2C[idx], (u16 *)(BG_VRAM + 0x5c00), 0x80); + AppendTilesetAnimToBuffer(gTilesetAnims_Slateport0[idx], (u16 *)(BG_VRAM + 0x5c00), 0x80); } static void sub_80A15C0(u16 timer) @@ -774,7 +774,7 @@ static void sub_80A1688(u16 timer) u16 idx; idx = timer % 2; - sub_80A0980(gUnknown_08516E3C[idx], (u16 *)(BG_VRAM + 0x3e00), 0x80); + AppendTilesetAnimToBuffer(gTilesetAnims_InsideBuilding0[idx], (u16 *)(BG_VRAM + 0x3e00), 0x80); } static void sub_80A16B0(u16 timer) @@ -782,8 +782,8 @@ static void sub_80A16B0(u16 timer) u16 idx; idx = timer % 3; - sub_80A0980(gUnknown_08517A44[idx], (u16 *)(BG_VRAM + 0x7e00), 0x180); - sub_80A0980(gUnknown_08517A50[idx], (u16 *)(BG_VRAM + 0x7a00), 0x280); + AppendTilesetAnimToBuffer(gTilesetAnims_SootopolisGym0[idx], (u16 *)(BG_VRAM + 0x7e00), 0x180); + AppendTilesetAnimToBuffer(gTilesetAnims_SootopolisGym1[idx], (u16 *)(BG_VRAM + 0x7a00), 0x280); } static void sub_80A16F8(u16 timer) @@ -791,7 +791,7 @@ static void sub_80A16F8(u16 timer) u16 idx; idx = timer % 4; - sub_80A0980(gUnknown_08517BFC[idx], (u16 *)(BG_VRAM + 0x7f00), 0x20); + AppendTilesetAnimToBuffer(gTilesetAnims_EliteFour1[idx], (u16 *)(BG_VRAM + 0x7f00), 0x20); } static void sub_80A1720(u16 timer) @@ -799,7 +799,7 @@ static void sub_80A1720(u16 timer) u16 idx; idx = timer % 2; - sub_80A0980(gUnknown_08517C0C[idx], (u16 *)(BG_VRAM + 0x7c00), 0x80); + AppendTilesetAnimToBuffer(gTilesetAnims_EliteFour0[idx], (u16 *)(BG_VRAM + 0x7c00), 0x80); } static void sub_80A1748(u16 timer) @@ -807,7 +807,7 @@ static void sub_80A1748(u16 timer) u16 idx; idx = timer % 2; - sub_80A0980(gUnknown_08518034[idx], (u16 *)(BG_VRAM + 0x5200), 0x200); + AppendTilesetAnimToBuffer(gTilesetAnims_MauvilleGym0[idx], (u16 *)(BG_VRAM + 0x5200), 0x200); } static void sub_80A1770(u16 timer) @@ -815,7 +815,7 @@ static void sub_80A1770(u16 timer) u16 idx; idx = timer % 2; - sub_80A0980(gUnknown_0851829C[idx], (u16 *)(BG_VRAM + 0x7e00), 0x120); + AppendTilesetAnimToBuffer(gTilesetAnims_BikeShop0[idx], (u16 *)(BG_VRAM + 0x7e00), 0x120); } static void sub_80A1798(u16 timer) @@ -823,7 +823,7 @@ static void sub_80A1798(u16 timer) u16 idx; idx = timer % 8; - sub_80A0980(gUnknown_085202C4[idx], (u16 *)(BG_VRAM + 0x5e00), 0xc00); + AppendTilesetAnimToBuffer(gTilesetAnims_Sootopolis0[idx], (u16 *)(BG_VRAM + 0x5e00), 0xc00); } static void sub_80A17C0(u16 timer) @@ -831,7 +831,7 @@ static void sub_80A17C0(u16 timer) u16 idx; idx = timer % 3; - sub_80A0980(gUnknown_08524864[idx], (u16 *)(BG_VRAM + 0x52e0), 0x100); + AppendTilesetAnimToBuffer(gTilesetAnims_BattlePyramid0[idx], (u16 *)(BG_VRAM + 0x52e0), 0x100); } static void sub_80A17EC(u16 timer) @@ -839,12 +839,12 @@ static void sub_80A17EC(u16 timer) u16 idx; idx = timer % 3; - sub_80A0980(gUnknown_08524870[idx], (u16 *)(BG_VRAM + 0x50e0), 0x100); + AppendTilesetAnimToBuffer(gTilesetAnims_BattlePyramid1[idx], (u16 *)(BG_VRAM + 0x50e0), 0x100); } static void sub_80A1818(u16 a1) { - CpuCopy16(gUnknown_0852487C[a1 & 0x3], gPlttBufferUnfaded + 0x80, 32); + CpuCopy16(gTilesetAnims_BattleDomePals0[a1 & 0x3], gPlttBufferUnfaded + 0x80, 32); BlendPalette(0x80, 0x10, gPaletteFade.y, gPaletteFade.blendColor & 0x7FFF); if ((u8)FindTaskIdByFunc(sub_8149DFC) != 0xFF ) { @@ -855,7 +855,7 @@ static void sub_80A1818(u16 a1) static void sub_80A1884(u16 a1) { - CpuCopy16(gUnknown_0852487C[a1 & 0x3], gPlttBufferUnfaded + 0x80, 32); + CpuCopy16(gTilesetAnims_BattleDomePals0[a1 & 0x3], gPlttBufferUnfaded + 0x80, 32); if ((u8)FindTaskIdByFunc(sub_8149DFC) == 0xFF ) { BlendPalette(0x80, 0x10, gPaletteFade.y, gPaletteFade.blendColor & 0x7FFF); From db58d5e24a89d9c411231a74ce01daed7a303d67 Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Mon, 2 Oct 2017 23:32:39 +0200 Subject: [PATCH 21/42] battle2 3500 C lines --- asm/battle_2.s | 4082 +------------------------------ asm/battle_controller_player.s | 82 +- asm/battle_controller_safari.s | 12 +- asm/battle_controller_wally.s | 2 +- asm/battle_link_817C95C.s | 6 +- asm/battle_message.s | 2 +- asm/reshow_battle_screen.s | 2 +- asm/rom3.s | 50 +- include/battle.h | 42 +- include/battle_controllers.h | 6 +- include/pokemon.h | 2 + include/recorded_battle.h | 1 + include/sprite.h | 16 +- src/battle_2.c | 1372 ++++++++++- src/battle_3.c | 7 +- src/battle_ai_script_commands.c | 6 +- src/battle_script_commands.c | 12 +- src/pokemon_3.c | 2 - sym_ewram.txt | 6 +- 19 files changed, 1545 insertions(+), 4165 deletions(-) diff --git a/asm/battle_2.s b/asm/battle_2.s index a4fa43fa2..2ff446dd0 100644 --- a/asm/battle_2.s +++ b/asm/battle_2.s @@ -4,4019 +4,7 @@ .syntax unified .text - - - - thumb_func_start sub_8039B58 -sub_8039B58: @ 8039B58 - push {r4,lr} - adds r4, r0, 0 - adds r0, 0x3F - ldrb r1, [r0] - movs r0, 0x20 - ands r0, r1 - cmp r0, 0 - beq _08039BA0 - ldr r0, =gHitMarker - ldr r0, [r0] - movs r1, 0x80 - ands r0, r1 - cmp r0, 0 - beq _08039B80 - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - ldr r1, =0x02000002 - ands r0, r1 - cmp r0, 0 - beq _08039B94 -_08039B80: - ldrh r0, [r4, 0x32] - bl HasTwoFramesAnimation - lsls r0, 24 - cmp r0, 0 - beq _08039B94 - adds r0, r4, 0 - movs r1, 0x1 - bl StartSpriteAnim -_08039B94: - ldrh r1, [r4, 0x32] - adds r0, r4, 0 - movs r2, 0x1 - movs r3, 0x1 - bl BattleAnimateFrontSprite -_08039BA0: - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8039B58 - - thumb_func_start sub_8039BB4 -sub_8039BB4: @ 8039BB4 - ldr r1, =oac_poke_ally_ - str r1, [r0, 0x1C] - bx lr - .pool - thumb_func_end sub_8039BB4 - - thumb_func_start oac_poke_ally_ -oac_poke_ally_: @ 8039BC0 - push {lr} - adds r2, r0, 0 - ldr r0, =gUnknown_020243FC - ldrh r1, [r0] - movs r0, 0x1 - ands r0, r1 - cmp r0, 0 - bne _08039BE4 - ldrh r0, [r2, 0x24] - subs r0, 0x2 - strh r0, [r2, 0x24] - lsls r0, 16 - asrs r1, r0, 16 - cmp r1, 0 - bne _08039BE4 - ldr r0, =nullsub_19 - str r0, [r2, 0x1C] - strh r1, [r2, 0x30] -_08039BE4: - pop {r0} - bx r0 - .pool - thumb_func_end oac_poke_ally_ - - thumb_func_start sub_8039BF0 -sub_8039BF0: @ 8039BF0 - ldr r1, =nullsub_19 - str r1, [r0, 0x1C] - bx lr - .pool - thumb_func_end sub_8039BF0 - - thumb_func_start nullsub_19 -nullsub_19: @ 8039BFC - bx lr - thumb_func_end nullsub_19 - - thumb_func_start sub_8039C00 -sub_8039C00: @ 8039C00 - push {lr} - adds r2, r0, 0 - ldr r0, =gUnknown_020243FC - ldrh r1, [r0] - movs r0, 0x1 - ands r0, r1 - cmp r0, 0 - bne _08039C20 - ldrh r0, [r2, 0x30] - ldrh r1, [r2, 0x24] - adds r0, r1 - strh r0, [r2, 0x24] - ldrh r0, [r2, 0x32] - ldrh r1, [r2, 0x26] - adds r0, r1 - strh r0, [r2, 0x26] -_08039C20: - pop {r0} - bx r0 - .pool - thumb_func_end sub_8039C00 - - thumb_func_start dp11b_obj_instanciate -dp11b_obj_instanciate: @ 8039C28 - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - lsls r0, 24 - lsrs r4, r0, 24 - lsls r1, 24 - lsrs r1, 24 - mov r8, r1 - lsls r2, 24 - lsrs r2, 24 - mov r9, r2 - lsls r3, 24 - lsrs r3, 24 - mov r10, r3 - cmp r1, 0 - beq _08039C64 - ldr r0, =gBattleSpritesDataPtr - ldr r0, [r0] - ldr r1, [r0, 0x4] - lsls r2, r4, 1 - adds r0, r2, r4 - lsls r0, 2 - adds r0, r1 - ldrb r1, [r0] - movs r0, 0x2 - b _08039C76 - .pool -_08039C64: - ldr r0, =gBattleSpritesDataPtr - ldr r0, [r0] - ldr r1, [r0, 0x4] - lsls r2, r4, 1 - adds r0, r2, r4 - lsls r0, 2 - adds r0, r1 - ldrb r1, [r0] - movs r0, 0x4 -_08039C76: - ands r0, r1 - adds r6, r2, 0 - cmp r0, 0 - bne _08039D2C - ldr r0, =objc_dp11b_pingpong - bl CreateInvisibleSpriteWithCallback - lsls r0, 24 - lsrs r5, r0, 24 - mov r0, r8 - cmp r0, 0x1 - bne _08039CD0 - ldr r0, =gHealthBoxesIds - adds r0, r4, r0 - ldrb r7, [r0] - ldr r2, =gBattleSpritesDataPtr - ldr r0, [r2] - ldr r0, [r0, 0x4] - adds r1, r6, r4 - lsls r1, 2 - adds r0, r1, r0 - strb r5, [r0, 0x2] - ldr r0, [r2] - ldr r0, [r0, 0x4] - adds r1, r0 - ldrb r0, [r1] - movs r2, 0x2 - orrs r0, r2 - strb r0, [r1] - ldr r2, =gSprites - lsls r3, r5, 4 - adds r0, r3, r5 - lsls r0, 2 - adds r0, r2 - movs r1, 0x80 - b _08039CFE - .pool -_08039CD0: - ldr r0, =gBankSpriteIds - adds r0, r4, r0 - ldrb r7, [r0] - ldr r2, =gBattleSpritesDataPtr - ldr r0, [r2] - ldr r0, [r0, 0x4] - adds r1, r6, r4 - lsls r1, 2 - adds r0, r1, r0 - strb r5, [r0, 0x3] - ldr r0, [r2] - ldr r0, [r0, 0x4] - adds r1, r0 - ldrb r0, [r1] - movs r2, 0x4 - orrs r0, r2 - strb r0, [r1] - ldr r2, =gSprites - lsls r3, r5, 4 - adds r0, r3, r5 - lsls r0, 2 - adds r0, r2 - movs r1, 0xC0 -_08039CFE: - strh r1, [r0, 0x2E] - adds r4, r2, 0 - adds r1, r3, r5 - lsls r1, 2 - adds r1, r4 - mov r2, r9 - lsls r0, r2, 24 - asrs r0, 24 - movs r2, 0 - strh r0, [r1, 0x30] - mov r3, r10 - lsls r0, r3, 24 - asrs r0, 24 - strh r0, [r1, 0x32] - strh r7, [r1, 0x34] - mov r0, r8 - strh r0, [r1, 0x36] - lsls r0, r7, 4 - adds r0, r7 - lsls r0, 2 - adds r0, r4 - strh r2, [r0, 0x24] - strh r2, [r0, 0x26] -_08039D2C: - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end dp11b_obj_instanciate - - thumb_func_start dp11b_obj_free -dp11b_obj_free: @ 8039D48 - push {r4-r6,lr} - lsls r0, 24 - lsrs r2, r0, 24 - lsls r1, 24 - lsrs r1, 24 - cmp r1, 0x1 - bne _08039D9C - ldr r6, =gBattleSpritesDataPtr - ldr r0, [r6] - ldr r1, [r0, 0x4] - lsls r0, r2, 1 - adds r0, r2 - lsls r5, r0, 2 - adds r3, r5, r1 - ldrb r1, [r3] - movs r0, 0x2 - ands r0, r1 - cmp r0, 0 - beq _08039DEA - ldr r2, =gSprites - ldrb r1, [r3, 0x2] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r2 - ldrh r1, [r0, 0x34] - lsls r1, 24 - lsrs r4, r1, 24 - bl DestroySprite - ldr r0, [r6] - ldr r1, [r0, 0x4] - adds r1, r5, r1 - ldrb r2, [r1] - movs r0, 0x3 - negs r0, r0 - b _08039DD6 - .pool -_08039D9C: - ldr r6, =gBattleSpritesDataPtr - ldr r0, [r6] - ldr r1, [r0, 0x4] - lsls r0, r2, 1 - adds r0, r2 - lsls r5, r0, 2 - adds r3, r5, r1 - ldrb r1, [r3] - movs r0, 0x4 - ands r0, r1 - cmp r0, 0 - beq _08039DEA - ldr r2, =gSprites - ldrb r1, [r3, 0x3] - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r0, r2 - ldrh r1, [r0, 0x34] - lsls r1, 24 - lsrs r4, r1, 24 - bl DestroySprite - ldr r0, [r6] - ldr r1, [r0, 0x4] - adds r1, r5, r1 - ldrb r2, [r1] - movs r0, 0x5 - negs r0, r0 -_08039DD6: - ands r0, r2 - strb r0, [r1] - ldr r0, =gSprites - lsls r1, r4, 4 - adds r1, r4 - lsls r1, 2 - adds r1, r0 - movs r0, 0 - strh r0, [r1, 0x24] - strh r0, [r1, 0x26] -_08039DEA: - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end dp11b_obj_free - - thumb_func_start objc_dp11b_pingpong -objc_dp11b_pingpong: @ 8039DF8 - push {r4,r5,lr} - adds r4, r0, 0 - ldrh r0, [r4, 0x34] - lsls r0, 24 - lsrs r5, r0, 24 - movs r1, 0x36 - ldrsh r0, [r4, r1] - cmp r0, 0x1 - bne _08039E10 - movs r2, 0x2E - ldrsh r0, [r4, r2] - b _08039E14 -_08039E10: - movs r1, 0x2E - ldrsh r0, [r4, r1] -_08039E14: - movs r2, 0x32 - ldrsh r1, [r4, r2] - bl Sin - ldr r2, =gSprites - lsls r1, r5, 4 - adds r1, r5 - lsls r1, 2 - adds r1, r2 - ldrh r2, [r4, 0x32] - adds r0, r2 - strh r0, [r1, 0x26] - ldrh r0, [r4, 0x30] - ldrh r1, [r4, 0x2E] - adds r0, r1 - movs r1, 0xFF - ands r0, r1 - strh r0, [r4, 0x2E] - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end objc_dp11b_pingpong - - thumb_func_start sub_8039E44 -sub_8039E44: @ 8039E44 - push {lr} - adds r2, r0, 0 - adds r0, 0x3F - ldrb r1, [r0] - movs r0, 0x20 - ands r0, r1 - cmp r0, 0 - beq _08039E5C - ldrh r1, [r2, 0x32] - adds r0, r2, 0 - bl BattleAnimateBackSprite -_08039E5C: - pop {r0} - bx r0 - thumb_func_end sub_8039E44 - - thumb_func_start sub_8039E60 -sub_8039E60: @ 8039E60 - push {r4,lr} - adds r4, r0, 0 - bl sub_8039E9C - adds r0, r4, 0 - adds r0, 0x3F - ldrb r1, [r0] - movs r0, 0x10 - ands r0, r1 - cmp r0, 0 - beq _08039E7A - ldr r0, =nullsub_19 - str r0, [r4, 0x1C] -_08039E7A: - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8039E60 - - thumb_func_start sub_8039E84 -sub_8039E84: @ 8039E84 - push {r4,lr} - adds r4, r0, 0 - movs r1, 0x1 - bl StartSpriteAnim - ldr r0, =sub_8039E60 - str r0, [r4, 0x1C] - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8039E84 - - thumb_func_start sub_8039E9C -sub_8039E9C: @ 8039E9C - push {lr} - adds r2, r0, 0 - adds r0, 0x2C - ldrb r1, [r0] - movs r0, 0x3F - ands r0, r1 - cmp r0, 0 - bne _08039EBE - ldr r1, =gUnknown_0831ACE0 - adds r0, r2, 0 - adds r0, 0x2B - ldrb r0, [r0] - adds r0, r1 - ldrb r1, [r0] - adds r0, r2, 0 - adds r0, 0x28 - strb r1, [r0] -_08039EBE: - pop {r0} - bx r0 - .pool - thumb_func_end sub_8039E9C - - thumb_func_start nullsub_20 -nullsub_20: @ 8039EC8 - bx lr - thumb_func_end nullsub_20 - - thumb_func_start sub_8039ECC -sub_8039ECC: @ 8039ECC - push {lr} - bl sub_8039F40 - ldr r1, =gBattleCommunication - movs r0, 0 - strb r0, [r1, 0x1] - ldr r1, =gBattleMainFunc - ldr r0, =bc_8012FAC - str r0, [r1] - pop {r0} - bx r0 - .pool - thumb_func_end sub_8039ECC - - thumb_func_start BattleMainCB1 -BattleMainCB1: @ 8039EF0 - push {r4,r5,lr} - ldr r0, =gBattleMainFunc - ldr r0, [r0] - bl _call_via_r0 - ldr r1, =gActiveBank - movs r0, 0 - strb r0, [r1] - ldr r0, =gNoOfAllBanks - ldrb r0, [r0] - cmp r0, 0 - beq _08039F2A - ldr r5, =gBattleBankFunc - adds r4, r1, 0 -_08039F0C: - ldrb r0, [r4] - lsls r0, 2 - adds r0, r5 - ldr r0, [r0] - bl _call_via_r0 - ldrb r0, [r4] - adds r0, 0x1 - strb r0, [r4] - ldr r1, =gNoOfAllBanks - lsls r0, 24 - lsrs r0, 24 - ldrb r1, [r1] - cmp r0, r1 - bcc _08039F0C -_08039F2A: - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end BattleMainCB1 - - thumb_func_start sub_8039F40 -sub_8039F40: @ 8039F40 - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - movs r0, 0 - bl sub_803D580 - bl sub_803D6A0 - movs r2, 0 - movs r3, 0 - ldr r0, =gUnknown_02024260 - mov r10, r0 - ldr r1, =gUnknown_02024258 - mov r9, r1 - ldr r0, =gUnknown_02024250 - mov r8, r0 - ldr r1, =gLastUsedMovesByBanks - mov r12, r1 - ldr r5, =gDisableStructs - movs r4, 0 - ldr r7, =gUnknownMovesUsedByBanks - ldr r6, =gLockedMoves -_08039F70: - ldr r0, =gStatuses3 - adds r0, r4, r0 - str r3, [r0] - movs r1, 0 -_08039F78: - adds r0, r5, r1 - strb r3, [r0] - adds r1, 0x1 - cmp r1, 0x1B - bls _08039F78 - movs r0, 0x2 - strb r0, [r5, 0x16] - ldr r1, =gUnknown_02024284 - adds r0, r2, r1 - strb r3, [r0] - mov r0, r12 - strh r3, [r0] - mov r1, r8 - strh r3, [r1] - mov r0, r9 - strh r3, [r0] - mov r1, r10 - strh r3, [r1] - ldr r0, =gUnknown_02024270 - adds r1, r2, r0 - movs r0, 0xFF - strb r0, [r1] - strh r3, [r6] - strh r3, [r7] - ldr r1, =gBattleResources - ldr r0, [r1] - ldr r0, [r0, 0x4] - adds r0, r4 - str r3, [r0] - ldr r1, =gUnknown_02024230 - adds r0, r4, r1 - str r3, [r0] - movs r0, 0x2 - add r10, r0 - add r9, r0 - add r8, r0 - add r12, r0 - adds r5, 0x1C - adds r4, 0x4 - adds r7, 0x2 - adds r6, 0x2 - adds r2, 0x1 - cmp r2, 0x3 - ble _08039F70 - movs r5, 0 - ldr r3, =gSideTimers - ldr r4, =gSideAffecting - movs r2, 0x1 -_08039FD8: - strh r5, [r4] - movs r1, 0 -_08039FDC: - adds r0, r3, r1 - strb r5, [r0] - adds r1, 0x1 - cmp r1, 0xB - bls _08039FDC - adds r3, 0xC - adds r4, 0x2 - subs r2, 0x1 - cmp r2, 0 - bge _08039FD8 - movs r1, 0 - ldr r2, =gBankAttacker - strb r1, [r2] - ldr r0, =gBankTarget - strb r1, [r0] - ldr r2, =gBattleWeather - strh r1, [r2] - ldr r1, =gWishFutureKnock - movs r2, 0 - movs r3, 0 -_0803A004: - adds r0, r1, r2 - strb r3, [r0] - adds r2, 0x1 - cmp r2, 0x2B - bls _0803A004 - ldr r2, =gHitMarker - movs r0, 0 - str r0, [r2] - ldr r0, =gBattleTypeFlags - ldr r1, [r0] - movs r0, 0x80 - lsls r0, 17 - ands r0, r1 - cmp r0, 0 - bne _0803A090 - movs r0, 0x2 - ands r1, r0 - cmp r1, 0 - bne _0803A0AE - ldr r0, =gSaveBlock2Ptr - ldr r0, [r0] - ldrb r1, [r0, 0x15] - movs r0, 0x4 - ands r0, r1 - cmp r0, 0 - beq _0803A0AE - movs r0, 0x80 - b _0803A0AC - .pool -_0803A090: - ldr r0, =0x02000002 - ands r1, r0 - cmp r1, 0 - bne _0803A0AE - bl sub_8185FB8 - lsls r0, 24 - cmp r0, 0 - beq _0803A0AE - ldr r1, =gHitMarker - ldr r0, [r1] - movs r1, 0x80 - orrs r0, r1 - ldr r2, =gHitMarker -_0803A0AC: - str r0, [r2] -_0803A0AE: - ldr r3, =gBattleScripting - ldr r0, =gSaveBlock2Ptr - ldr r0, [r0] - ldrb r0, [r0, 0x15] - lsls r0, 30 - lsrs r0, 31 - movs r1, 0 - strb r0, [r3, 0x1D] - ldr r0, =gMultiHitCounter - strb r1, [r0] - ldr r0, =gBattleOutcome - strb r1, [r0] - ldr r0, =gBattleExecBuffer - str r1, [r0] - ldr r0, =gPaydayMoney - movs r2, 0 - strh r1, [r0] - ldr r1, =gBattleResources - ldr r0, [r1] - ldr r0, [r0, 0x8] - adds r0, 0x20 - strb r2, [r0] - ldr r0, [r1] - ldr r0, [r0, 0xC] - adds r0, 0x20 - strb r2, [r0] - ldr r5, =gPauseCounterBattle - ldr r6, =gBattleMoveDamage - ldr r7, =gUnknown_020243FC - ldr r0, =gLeveledUpInBattle - mov r8, r0 - ldr r1, =gAbsentBankFlags - mov r9, r1 - ldr r2, =gEnemyParty - mov r10, r2 - ldr r1, =gBattleCommunication - movs r2, 0 - adds r0, r1, 0x7 -_0803A0FA: - strb r2, [r0] - subs r0, 0x1 - cmp r0, r1 - bge _0803A0FA - movs r4, 0 - strh r4, [r5] - movs r0, 0 - str r0, [r6] - strh r0, [r7] - strb r4, [r3, 0x18] - strb r4, [r3, 0x19] - mov r0, r8 - strb r4, [r0] - mov r1, r9 - strb r4, [r1] - ldr r5, =gBattleStruct - ldr r0, [r5] - adds r0, 0x6C - strb r4, [r0] - ldr r0, [r5] - adds r0, 0x79 - strb r4, [r0] - ldr r0, [r5] - adds r0, 0x7A - strb r4, [r0] - mov r0, r10 - movs r1, 0xB - bl GetMonData - ldr r6, [r5] - adds r6, 0x7C - ldr r2, =gBaseStats - lsls r1, r0, 3 - subs r1, r0 - lsls r1, 2 - adds r1, r2 - ldrb r1, [r1, 0x8] - movs r0, 0x64 - muls r0, r1 - ldr r1, =0x000004fb - bl __divsi3 - strb r0, [r6] - ldr r0, [r5] - adds r0, 0x7B - movs r1, 0x3 - strb r1, [r0] - ldr r0, [r5] - strb r4, [r0, 0x12] - ldr r0, [r5] - adds r0, 0x4A - movs r1, 0x1 - strb r1, [r0] - movs r2, 0 - movs r1, 0 - adds r6, r5, 0 -_0803A16A: - ldr r0, [r5] - adds r0, r2, r0 - adds r0, 0x98 - strb r1, [r0] - ldr r0, [r5] - adds r0, r2, r0 - adds r0, 0xB8 - strb r1, [r0] - ldr r0, [r5] - adds r0, r2, r0 - adds r0, 0xC8 - strb r1, [r0] - ldr r0, [r5] - adds r0, r2, r0 - adds r0, 0xD0 - strb r1, [r0] - ldr r0, [r5] - adds r0, r2, r0 - adds r0, 0xE0 - strb r1, [r0] - ldr r0, [r5] - adds r0, r2, r0 - adds r0, 0xE8 - strb r1, [r0] - ldr r0, [r5] - adds r0, r2, r0 - adds r0, 0xF0 - strb r1, [r0] - ldr r0, [r5] - adds r0, r2, r0 - adds r0, 0xF8 - strb r1, [r0] - adds r2, 0x1 - cmp r2, 0x7 - ble _0803A16A - movs r2, 0 - ldr r4, =gBattleStruct - movs r3, 0xA5 - lsls r3, 2 - movs r1, 0x6 -_0803A1BA: - ldr r0, [r4] - adds r0, r2, r0 - adds r0, r3 - strb r1, [r0] - adds r2, 0x1 - cmp r2, 0x3 - ble _0803A1BA - ldr r0, [r6] - adds r0, 0xDF - movs r1, 0 - strb r1, [r0] - ldr r0, [r6] - adds r0, 0x92 - strb r1, [r0] - bl Random - ldr r1, =gUnknown_02024330 - strh r0, [r1] - ldr r1, =gBattleResults - movs r2, 0 - movs r3, 0 -_0803A1E4: - adds r0, r1, r2 - strb r3, [r0] - adds r2, 0x1 - cmp r2, 0x43 - bls _0803A1E4 - ldr r0, =gEnemyParty - bl IsMonShiny - ldr r3, =gBattleResults - movs r1, 0x1 - ands r1, r0 - lsls r1, 6 - ldrb r2, [r3, 0x5] - movs r0, 0x41 - negs r0, r0 - ands r0, r2 - orrs r0, r1 - strb r0, [r3, 0x5] - ldr r2, =gBattleStruct - ldr r0, [r2] - movs r1, 0xA8 - lsls r1, 2 - adds r0, r1 - movs r1, 0 - strb r1, [r0] - ldr r0, [r2] - ldr r2, =0x000002a1 - adds r0, r2 - strb r1, [r0] - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8039F40 - - thumb_func_start SwitchInClearStructs -SwitchInClearStructs: @ 803A284 - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - sub sp, 0x20 - ldr r4, =gDisableStructs - ldr r5, =gActiveBank - ldrb r1, [r5] - lsls r0, r1, 3 - subs r0, r1 - lsls r0, 2 - mov r1, sp - adds r0, r4 - ldm r0!, {r2,r3,r6} - stm r1!, {r2,r3,r6} - ldm r0!, {r2,r3,r7} - stm r1!, {r2,r3,r7} - ldr r0, [r0] - str r0, [r1] - ldr r2, =gBattleMoves - ldr r3, =gCurrentMove - ldrh r1, [r3] - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 2 - adds r0, r2 - ldrb r0, [r0] - mov r12, r4 - mov r9, r5 - ldr r6, =gStatuses3 - mov r10, r6 - cmp r0, 0x7F - beq _0803A35C - movs r5, 0 - mov r6, r9 - movs r4, 0x58 - ldr r2, =gBattleMons - adds r2, 0x18 - movs r1, 0x6 -_0803A2D4: - ldrb r0, [r6] - muls r0, r4 - adds r0, r5, r0 - adds r0, r2 - strb r1, [r0] - adds r5, 0x1 - cmp r5, 0x7 - ble _0803A2D4 - movs r5, 0 - ldr r7, =gNoOfAllBanks - ldrb r7, [r7] - cmp r5, r7 - bge _0803A348 - ldr r0, =gBattleMons + 0x50 - mov r8, r0 - ldr r4, =gDisableStructs - ldr r3, =gStatuses3 -_0803A2F6: - movs r0, 0x58 - muls r0, r5 - mov r1, r8 - adds r2, r0, r1 - ldr r1, [r2] - movs r0, 0x80 - lsls r0, 19 - ands r0, r1 - cmp r0, 0 - beq _0803A31A - ldrb r0, [r4, 0x14] - ldr r6, =gActiveBank - ldrb r6, [r6] - cmp r0, r6 - bne _0803A31A - ldr r0, =0xfbffffff - ands r1, r0 - str r1, [r2] -_0803A31A: - ldr r1, [r3] - movs r0, 0x18 - ands r0, r1 - cmp r0, 0 - beq _0803A33A - ldrb r0, [r4, 0x15] - ldr r7, =gActiveBank - ldrb r7, [r7] - cmp r0, r7 - bne _0803A33A - movs r0, 0x19 - negs r0, r0 - ands r1, r0 - str r1, [r3] - movs r0, 0 - strb r0, [r4, 0x15] -_0803A33A: - adds r4, 0x1C - adds r3, 0x4 - adds r5, 0x1 - ldr r0, =gNoOfAllBanks - ldrb r0, [r0] - cmp r5, r0 - blt _0803A2F6 -_0803A348: - ldr r1, =gCurrentMove - ldrh r0, [r1] - lsls r1, r0, 1 - adds r1, r0 - lsls r1, 2 - ldr r2, =gBattleMoves - adds r1, r2 - ldrb r0, [r1] - cmp r0, 0x7F - bne _0803A414 -_0803A35C: - mov r3, r9 - ldrb r1, [r3] - movs r0, 0x58 - adds r2, r1, 0 - muls r2, r0 - ldr r0, =gBattleMons - adds r0, 0x50 - adds r2, r0 - ldr r0, [r2] - ldr r1, =0x15100007 - ands r0, r1 - str r0, [r2] - ldrb r1, [r3] - lsls r1, 2 - add r1, r10 - ldr r0, [r1] - ldr r2, =0x0003043f - ands r0, r2 - str r0, [r1] - movs r5, 0 - ldr r6, =gNoOfAllBanks - ldrb r6, [r6] - cmp r5, r6 - bge _0803A430 - mov r7, r9 - movs r6, 0 -_0803A390: - ldrb r0, [r7] - bl GetBankSide - adds r4, r0, 0 - lsls r0, r5, 24 - lsrs r0, 24 - bl GetBankSide - lsls r4, 24 - lsls r0, 24 - cmp r4, r0 - beq _0803A3D0 - ldr r1, =gStatuses3 - lsls r0, r5, 2 - adds r2, r0, r1 - ldr r1, [r2] - movs r0, 0x18 - ands r0, r1 - cmp r0, 0 - beq _0803A3D0 - ldr r0, =gDisableStructs - adds r0, r6, r0 - ldrb r0, [r0, 0x15] - ldrb r3, [r7] - cmp r0, r3 - bne _0803A3D0 - movs r0, 0x19 - negs r0, r0 - ands r1, r0 - movs r0, 0x10 - orrs r1, r0 - str r1, [r2] -_0803A3D0: - adds r6, 0x1C - adds r5, 0x1 - ldr r0, =gNoOfAllBanks - ldrb r0, [r0] - cmp r5, r0 - blt _0803A390 - ldr r6, =gDisableStructs - mov r12, r6 - ldr r7, =gActiveBank - mov r9, r7 - b _0803A430 - .pool -_0803A414: - mov r0, r9 - ldrb r1, [r0] - movs r0, 0x58 - muls r0, r1 - ldr r1, =gBattleMons - adds r1, 0x50 - adds r0, r1 - movs r1, 0 - str r1, [r0] - mov r2, r9 - ldrb r0, [r2] - lsls r0, 2 - add r0, r10 - str r1, [r0] -_0803A430: - movs r5, 0 - ldr r3, =gBattleStruct - mov r8, r3 - ldr r6, =gUnknown_020244AC - mov r10, r6 - ldr r7, =gNoOfAllBanks - ldrb r7, [r7] - cmp r5, r7 - bge _0803A490 - ldr r3, =gBattleMons + 0x50 - ldr r7, =gBitTable - ldr r6, =gActiveBank -_0803A448: - movs r0, 0x58 - muls r0, r5 - adds r4, r0, r3 - ldrb r0, [r6] - lsls r0, 2 - adds r0, r7 - ldr r0, [r0] - lsls r2, r0, 16 - ldr r1, [r4] - adds r0, r1, 0 - ands r0, r2 - cmp r0, 0 - beq _0803A466 - bics r1, r2 - str r1, [r4] -_0803A466: - ldr r1, [r4] - movs r0, 0xE0 - lsls r0, 8 - ands r0, r1 - cmp r0, 0 - beq _0803A486 - mov r2, r8 - ldr r0, [r2] - adds r0, r5, r0 - ldrb r0, [r0, 0x14] - ldrb r2, [r6] - cmp r0, r2 - bne _0803A486 - ldr r0, =0xffff1fff - ands r1, r0 - str r1, [r4] -_0803A486: - adds r5, 0x1 - ldr r0, =gNoOfAllBanks - ldrb r0, [r0] - cmp r5, r0 - blt _0803A448 -_0803A490: - mov r1, r9 - ldrb r0, [r1] - add r0, r10 - movs r1, 0 - strb r1, [r0] - mov r2, r9 - ldrb r0, [r2] - ldr r3, =gUnknown_020244B0 - adds r0, r3 - strb r1, [r0] - ldrb r1, [r2] - lsls r0, r1, 3 - subs r0, r1 - lsls r0, 2 - mov r6, r12 - adds r1, r0, r6 - movs r5, 0 - movs r2, 0 -_0803A4B4: - adds r0, r1, r5 - strb r2, [r0] - adds r5, 0x1 - cmp r5, 0x1B - bls _0803A4B4 - ldr r7, =gCurrentMove - ldrh r0, [r7] - lsls r1, r0, 1 - adds r1, r0 - lsls r1, 2 - ldr r0, =gBattleMoves - adds r1, r0 - ldrb r0, [r1] - cmp r0, 0x7F - bne _0803A540 - mov r2, r9 - ldrb r1, [r2] - lsls r0, r1, 3 - subs r0, r1 - lsls r0, 2 - add r0, r12 - mov r1, sp - ldrb r1, [r1, 0xA] - strb r1, [r0, 0xA] - ldrb r1, [r2] - lsls r0, r1, 3 - subs r0, r1 - lsls r0, 2 - add r0, r12 - mov r1, sp - ldrb r1, [r1, 0x15] - strb r1, [r0, 0x15] - ldrb r0, [r2] - lsls r1, r0, 3 - subs r1, r0 - lsls r1, 2 - add r1, r12 - mov r0, sp - ldrb r2, [r0, 0xF] - lsls r2, 28 - movs r4, 0xF - lsrs r2, 28 - ldrb r3, [r1, 0xF] - movs r0, 0x10 - negs r0, r0 - ands r0, r3 - orrs r0, r2 - strb r0, [r1, 0xF] - mov r3, r9 - ldrb r1, [r3] - lsls r0, r1, 3 - subs r0, r1 - lsls r0, 2 - add r0, r12 - mov r1, sp - ldrb r1, [r1, 0xF] - lsrs r1, 4 - lsls r1, 4 - ldrb r2, [r0, 0xF] - ands r4, r2 - orrs r4, r1 - strb r4, [r0, 0xF] - ldrb r1, [r3] - lsls r0, r1, 3 - subs r0, r1 - lsls r0, 2 - add r0, r12 - mov r1, sp - ldrb r1, [r1, 0x14] - strb r1, [r0, 0x14] -_0803A540: - movs r0, 0 - ldr r6, =gBattleMoveFlags - strb r0, [r6] - mov r7, r9 - ldrb r1, [r7] - lsls r0, r1, 3 - subs r0, r1 - lsls r0, 2 - add r0, r12 - movs r4, 0 - movs r1, 0x2 - strb r1, [r0, 0x16] - ldrb r0, [r7] - lsls r1, r0, 3 - subs r1, r0 - lsls r1, 2 - add r1, r12 - mov r0, sp - ldrb r0, [r0, 0x18] - movs r2, 0x2 - ands r2, r0 - ldrb r3, [r1, 0x18] - movs r0, 0x3 - negs r0, r0 - ands r0, r3 - orrs r0, r2 - strb r0, [r1, 0x18] - ldrb r0, [r7] - lsls r0, 1 - ldr r1, =gLastUsedMovesByBanks - adds r0, r1 - movs r2, 0 - strh r4, [r0] - ldrb r0, [r7] - lsls r0, 1 - ldr r3, =gUnknown_02024250 - adds r0, r3 - strh r4, [r0] - ldrb r0, [r7] - lsls r0, 1 - ldr r6, =gUnknown_02024258 - adds r0, r6 - strh r4, [r0] - ldrb r0, [r7] - lsls r0, 1 - ldr r7, =gUnknown_02024260 - adds r0, r7 - strh r4, [r0] - mov r1, r9 - ldrb r0, [r1] - lsls r0, 1 - ldr r3, =gUnknownMovesUsedByBanks - adds r0, r3 - strh r4, [r0] - ldrb r0, [r1] - ldr r6, =gUnknown_02024270 - adds r0, r6 - movs r1, 0xFF - strb r1, [r0] - mov r7, r9 - ldrb r0, [r7] - mov r3, r8 - ldr r1, [r3] - lsls r0, 1 - adds r0, r1 - adds r0, 0x98 - strb r2, [r0] - ldrb r0, [r7] - ldr r1, [r3] - lsls r0, 1 - adds r0, r1 - adds r0, 0x99 - strb r2, [r0] - ldrb r0, [r7] - ldr r1, [r3] - lsls r0, 3 - adds r0, r1 - adds r0, 0xE0 - strb r2, [r0] - ldrb r0, [r7] - ldr r1, [r3] - lsls r0, 3 - adds r0, r1 - adds r0, 0xE1 - strb r2, [r0] - ldrb r0, [r7] - ldr r1, [r3] - lsls r0, 3 - adds r0, r1 - adds r0, 0xE2 - strb r2, [r0] - ldrb r0, [r7] - ldr r1, [r3] - lsls r0, 3 - adds r0, r1 - adds r0, 0xE3 - strb r2, [r0] - ldrb r0, [r7] - ldr r1, [r3] - lsls r0, 3 - adds r0, r1 - adds r0, 0xE4 - strb r2, [r0] - ldrb r0, [r7] - ldr r1, [r3] - lsls r0, 3 - adds r0, r1 - adds r0, 0xE5 - strb r2, [r0] - ldrb r0, [r7] - ldr r1, [r3] - lsls r0, 3 - adds r0, r1 - adds r0, 0xE6 - strb r2, [r0] - ldrb r0, [r7] - ldr r1, [r3] - lsls r0, 3 - adds r0, r1 - adds r0, 0xE7 - strb r2, [r0] - ldr r1, [r3] - adds r1, 0x92 - ldrb r0, [r7] - lsls r0, 2 - ldr r6, =gBitTable - adds r0, r6 - ldr r2, [r0] - ldrb r0, [r1] - bics r0, r2 - strb r0, [r1] - movs r5, 0 - ldr r7, =gNoOfAllBanks - ldrb r7, [r7] - cmp r5, r7 - bge _0803A6B4 - mov r3, r9 - mov r7, r8 - movs r6, 0 -_0803A656: - ldrb r0, [r3] - cmp r5, r0 - beq _0803A68C - lsls r0, r5, 24 - lsrs r0, 24 - str r3, [sp, 0x1C] - bl GetBankSide - adds r4, r0, 0 - ldr r3, [sp, 0x1C] - ldrb r0, [r3] - bl GetBankSide - lsls r4, 24 - lsls r0, 24 - ldr r3, [sp, 0x1C] - cmp r4, r0 - beq _0803A68C - ldr r0, [r7] - lsls r1, r5, 1 - adds r0, r1, r0 - adds r0, 0x98 - strb r6, [r0] - ldr r0, [r7] - adds r1, r0 - adds r1, 0x99 - strb r6, [r1] -_0803A68C: - ldrb r0, [r3] - ldr r1, [r7] - lsls r0, 1 - lsls r2, r5, 3 - adds r0, r2 - adds r0, r1 - adds r0, 0xE0 - strb r6, [r0] - ldrb r0, [r3] - ldr r1, [r7] - lsls r0, 1 - adds r0, r2 - adds r0, r1 - adds r0, 0xE1 - strb r6, [r0] - adds r5, 0x1 - ldr r0, =gNoOfAllBanks - ldrb r0, [r0] - cmp r5, r0 - blt _0803A656 -_0803A6B4: - mov r1, r9 - ldrb r0, [r1] - mov r2, r8 - ldr r1, [r2] - lsls r0, 1 - adds r0, r1 - adds r0, 0xC8 - movs r2, 0 - strb r2, [r0] - mov r3, r9 - ldrb r0, [r3] - mov r6, r8 - ldr r1, [r6] - lsls r0, 1 - adds r0, r1 - adds r0, 0xC9 - strb r2, [r0] - ldr r0, =gBattleResources - ldr r0, [r0] - ldr r1, [r0, 0x4] - ldrb r0, [r3] - lsls r0, 2 - adds r1, r0 - movs r2, 0 - str r2, [r1] - ldr r0, =gCurrentMove - strh r2, [r0] - ldr r0, [r6] - adds r0, 0xDA - movs r1, 0xFF - strb r1, [r0] - ldrb r0, [r3] - bl ClearBankMoveHistory - mov r7, r9 - ldrb r0, [r7] - bl ClearBankAbilityHistory - add sp, 0x20 - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end SwitchInClearStructs - - thumb_func_start UndoEffectsAfterFainting -UndoEffectsAfterFainting: @ 803A75C - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - sub sp, 0x4 - movs r5, 0 - ldr r6, =gBattleMons - ldr r0, =gStatuses3 - mov r8, r0 - ldr r1, =gBattleStruct - mov r12, r1 - ldr r2, =gUnknown_020244AC - mov r9, r2 - ldr r3, =gUnknown_020244B0 - mov r10, r3 - ldr r7, =gProtectStructs - ldr r4, =gActiveBank - movs r3, 0x58 - adds r2, r6, 0 - adds r2, 0x18 - movs r1, 0x6 -_0803A788: - ldrb r0, [r4] - muls r0, r3 - adds r0, r5, r0 - adds r0, r2 - strb r1, [r0] - adds r5, 0x1 - cmp r5, 0x7 - ble _0803A788 - ldr r0, =gActiveBank - ldrb r1, [r0] - movs r0, 0x58 - muls r0, r1 - adds r2, r6, 0 - adds r2, 0x50 - adds r0, r2 - movs r1, 0 - str r1, [r0] - ldr r3, =gActiveBank - ldrb r0, [r3] - lsls r0, 2 - add r0, r8 - str r1, [r0] - movs r5, 0 - ldr r6, =gNoOfAllBanks - ldrb r6, [r6] - cmp r5, r6 - bge _0803A830 - adds r3, r2, 0 - movs r4, 0 - ldr r0, =gBitTable - mov r8, r0 -_0803A7C6: - ldr r1, [r3] - movs r0, 0x80 - lsls r0, 19 - ands r0, r1 - cmp r0, 0 - beq _0803A7E6 - ldr r2, =gDisableStructs - adds r0, r4, r2 - ldrb r0, [r0, 0x14] - ldr r6, =gActiveBank - ldrb r6, [r6] - cmp r0, r6 - bne _0803A7E6 - ldr r0, =0xfbffffff - ands r1, r0 - str r1, [r3] -_0803A7E6: - ldr r1, =gActiveBank - ldrb r0, [r1] - lsls r0, 2 - add r0, r8 - ldr r0, [r0] - lsls r2, r0, 16 - ldr r1, [r3] - adds r0, r1, 0 - ands r0, r2 - cmp r0, 0 - beq _0803A800 - bics r1, r2 - str r1, [r3] -_0803A800: - ldr r1, [r3] - movs r0, 0xE0 - lsls r0, 8 - ands r0, r1 - cmp r0, 0 - beq _0803A822 - mov r2, r12 - ldr r0, [r2] - adds r0, r5, r0 - ldrb r0, [r0, 0x14] - ldr r6, =gActiveBank - ldrb r6, [r6] - cmp r0, r6 - bne _0803A822 - ldr r0, =0xffff1fff - ands r1, r0 - str r1, [r3] -_0803A822: - adds r3, 0x58 - adds r4, 0x1C - adds r5, 0x1 - ldr r0, =gNoOfAllBanks - ldrb r0, [r0] - cmp r5, r0 - blt _0803A7C6 -_0803A830: - ldr r1, =gActiveBank - ldrb r0, [r1] - add r0, r9 - movs r1, 0 - strb r1, [r0] - ldr r2, =gActiveBank - ldrb r0, [r2] - add r0, r10 - strb r1, [r0] - ldrb r1, [r2] - lsls r0, r1, 3 - subs r0, r1 - lsls r0, 2 - ldr r3, =gDisableStructs - adds r1, r0, r3 - movs r5, 0 - movs r2, 0 -_0803A852: - adds r0, r1, r5 - strb r2, [r0] - adds r5, 0x1 - cmp r5, 0x1B - bls _0803A852 - ldr r6, =gActiveBank - ldrb r1, [r6] - lsls r1, 4 - adds r1, r7 - ldrb r2, [r1] - movs r0, 0x2 - negs r0, r0 - mov r9, r0 - ands r0, r2 - strb r0, [r1] - ldrb r1, [r6] - lsls r1, 4 - adds r1, r7 - ldrb r2, [r1] - movs r3, 0x3 - negs r3, r3 - mov r8, r3 - mov r0, r8 - ands r0, r2 - strb r0, [r1] - ldrb r1, [r6] - lsls r1, 4 - adds r1, r7 - ldrb r2, [r1] - movs r6, 0x5 - negs r6, r6 - adds r0, r6, 0 - ands r0, r2 - strb r0, [r1] - ldr r0, =gActiveBank - ldrb r1, [r0] - lsls r1, 4 - adds r1, r7 - ldrb r2, [r1] - subs r3, 0x6 - mov r10, r3 - mov r0, r10 - ands r0, r2 - strb r0, [r1] - ldr r0, =gActiveBank - ldrb r1, [r0] - lsls r1, 4 - adds r1, r7 - ldrb r2, [r1] - movs r0, 0x11 - negs r0, r0 - ands r0, r2 - strb r0, [r1] - ldr r2, =gActiveBank - ldrb r1, [r2] - lsls r1, 4 - adds r1, r7 - ldrb r2, [r1] - movs r5, 0x21 - negs r5, r5 - adds r0, r5, 0 - ands r0, r2 - strb r0, [r1] - ldr r3, =gActiveBank - ldrb r1, [r3] - lsls r1, 4 - adds r1, r7 - ldrb r2, [r1] - movs r4, 0x41 - negs r4, r4 - adds r0, r4, 0 - ands r0, r2 - strb r0, [r1] - ldrb r1, [r3] - lsls r1, 4 - adds r1, r7 - ldrb r2, [r1] - movs r3, 0x7F - adds r0, r3, 0 - ands r0, r2 - strb r0, [r1] - ldr r0, =gActiveBank - ldrb r1, [r0] - lsls r1, 4 - adds r1, r7 - ldrb r2, [r1, 0x1] - mov r0, r9 - ands r0, r2 - strb r0, [r1, 0x1] - ldr r2, =gActiveBank - ldrb r1, [r2] - lsls r1, 4 - adds r1, r7 - ldrb r2, [r1, 0x1] - mov r0, r8 - ands r0, r2 - strb r0, [r1, 0x1] - ldr r0, =gActiveBank - ldrb r1, [r0] - lsls r1, 4 - adds r1, r7 - ldrb r2, [r1, 0x1] - adds r0, r6, 0 - ands r0, r2 - strb r0, [r1, 0x1] - ldr r2, =gActiveBank - ldrb r1, [r2] - lsls r1, 4 - adds r1, r7 - ldrb r2, [r1, 0x1] - movs r0, 0x19 - negs r0, r0 - ands r0, r2 - strb r0, [r1, 0x1] - ldr r1, =gActiveBank - ldrb r0, [r1] - lsls r0, 4 - adds r0, r7 - ldrb r1, [r0, 0x1] - ands r5, r1 - strb r5, [r0, 0x1] - ldr r2, =gActiveBank - ldrb r0, [r2] - lsls r0, 4 - adds r0, r7 - ldrb r1, [r0, 0x1] - ands r4, r1 - strb r4, [r0, 0x1] - ldrb r0, [r2] - lsls r0, 4 - adds r0, r7 - ldrb r1, [r0, 0x1] - ands r3, r1 - strb r3, [r0, 0x1] - ldrb r0, [r2] - lsls r0, 4 - adds r0, r7 - ldrb r1, [r0, 0x2] - mov r3, r9 - ands r3, r1 - strb r3, [r0, 0x2] - ldrb r0, [r2] - lsls r0, 4 - adds r0, r7 - ldrb r1, [r0, 0x2] - mov r2, r8 - ands r2, r1 - strb r2, [r0, 0x2] - ldr r3, =gActiveBank - ldrb r0, [r3] - lsls r0, 4 - adds r0, r7 - ldrb r1, [r0, 0x2] - ands r6, r1 - strb r6, [r0, 0x2] - ldrb r0, [r3] - lsls r0, 4 - adds r0, r7 - ldrb r1, [r0, 0x2] - mov r6, r10 - ands r6, r1 - strb r6, [r0, 0x2] - ldrb r1, [r3] - lsls r0, r1, 3 - subs r0, r1 - lsls r0, 2 - ldr r1, =gDisableStructs - adds r0, r1 - movs r2, 0 - movs r1, 0x2 - strb r1, [r0, 0x16] - ldrb r0, [r3] - lsls r0, 1 - ldr r3, =gLastUsedMovesByBanks - adds r0, r3 - movs r3, 0 - strh r2, [r0] - ldr r6, =gActiveBank - ldrb r0, [r6] - lsls r0, 1 - ldr r1, =gUnknown_02024250 - adds r0, r1 - strh r2, [r0] - ldrb r0, [r6] - lsls r0, 1 - ldr r6, =gUnknown_02024258 - adds r0, r6 - strh r2, [r0] - ldr r1, =gActiveBank - ldrb r0, [r1] - lsls r0, 1 - ldr r6, =gUnknown_02024260 - adds r0, r6 - strh r2, [r0] - ldrb r0, [r1] - lsls r0, 1 - ldr r1, =gUnknownMovesUsedByBanks - adds r0, r1 - strh r2, [r0] - ldr r2, =gActiveBank - ldrb r0, [r2] - ldr r6, =gUnknown_02024270 - adds r0, r6 - movs r1, 0xFF - strb r1, [r0] - ldrb r0, [r2] - mov r2, r12 - ldr r1, [r2] - lsls r0, 1 - adds r0, r1 - adds r0, 0xC8 - strb r3, [r0] - ldr r6, =gActiveBank - ldrb r0, [r6] - ldr r1, [r2] - lsls r0, 1 - adds r0, r1 - adds r0, 0xC9 - strb r3, [r0] - ldrb r0, [r6] - ldr r1, [r2] - lsls r0, 1 - adds r0, r1 - adds r0, 0x98 - strb r3, [r0] - ldrb r0, [r6] - ldr r1, [r2] - lsls r0, 1 - adds r0, r1 - adds r0, 0x99 - strb r3, [r0] - ldrb r0, [r6] - ldr r1, [r2] - lsls r0, 3 - adds r0, r1 - adds r0, 0xE0 - strb r3, [r0] - ldrb r0, [r6] - ldr r1, [r2] - lsls r0, 3 - adds r0, r1 - adds r0, 0xE1 - strb r3, [r0] - ldrb r0, [r6] - ldr r1, [r2] - lsls r0, 3 - adds r0, r1 - adds r0, 0xE2 - strb r3, [r0] - ldrb r0, [r6] - ldr r1, [r2] - lsls r0, 3 - adds r0, r1 - adds r0, 0xE3 - strb r3, [r0] - ldrb r0, [r6] - ldr r1, [r2] - lsls r0, 3 - adds r0, r1 - adds r0, 0xE4 - strb r3, [r0] - ldrb r0, [r6] - ldr r1, [r2] - lsls r0, 3 - adds r0, r1 - adds r0, 0xE5 - strb r3, [r0] - ldrb r0, [r6] - ldr r1, [r2] - lsls r0, 3 - adds r0, r1 - adds r0, 0xE6 - strb r3, [r0] - ldrb r0, [r6] - ldr r1, [r2] - lsls r0, 3 - adds r0, r1 - adds r0, 0xE7 - strb r3, [r0] - ldr r1, [r2] - adds r1, 0x92 - ldrb r0, [r6] - lsls r0, 2 - ldr r2, =gBitTable - adds r0, r2 - ldr r2, [r0] - ldrb r0, [r1] - bics r0, r2 - strb r0, [r1] - movs r5, 0 - ldr r3, =gNoOfAllBanks - ldrb r3, [r3] - cmp r5, r3 - bge _0803AB02 - adds r3, r6, 0 - mov r7, r12 - movs r6, 0 -_0803AAA4: - ldrb r0, [r3] - cmp r5, r0 - beq _0803AADA - lsls r0, r5, 24 - lsrs r0, 24 - str r3, [sp] - bl GetBankSide - adds r4, r0, 0 - ldr r3, [sp] - ldrb r0, [r3] - bl GetBankSide - lsls r4, 24 - lsls r0, 24 - ldr r3, [sp] - cmp r4, r0 - beq _0803AADA - ldr r0, [r7] - lsls r1, r5, 1 - adds r0, r1, r0 - adds r0, 0x98 - strb r6, [r0] - ldr r0, [r7] - adds r1, r0 - adds r1, 0x99 - strb r6, [r1] -_0803AADA: - ldrb r0, [r3] - ldr r1, [r7] - lsls r0, 1 - lsls r2, r5, 3 - adds r0, r2 - adds r0, r1 - adds r0, 0xE0 - strb r6, [r0] - ldrb r0, [r3] - ldr r1, [r7] - lsls r0, 1 - adds r0, r2 - adds r0, r1 - adds r0, 0xE1 - strb r6, [r0] - adds r5, 0x1 - ldr r0, =gNoOfAllBanks - ldrb r0, [r0] - cmp r5, r0 - blt _0803AAA4 -_0803AB02: - ldr r0, =gBattleResources - ldr r0, [r0] - ldr r1, [r0, 0x4] - ldr r2, =gActiveBank - ldrb r0, [r2] - lsls r0, 2 - adds r1, r0 - movs r0, 0 - str r0, [r1] - ldr r4, =gBattleMons - ldrb r0, [r2] - movs r3, 0x58 - adds r2, r0, 0 - muls r2, r3 - b _0803AB6C - .pool -_0803AB6C: - adds r2, r4 - ldr r5, =gBaseStats - ldrh r1, [r2] - lsls r0, r1, 3 - subs r0, r1 - lsls r0, 2 - adds r0, r5 - ldrb r0, [r0, 0x6] - adds r2, 0x21 - strb r0, [r2] - ldr r6, =gActiveBank - ldrb r0, [r6] - adds r1, r0, 0 - muls r1, r3 - adds r1, r4 - ldrh r2, [r1] - lsls r0, r2, 3 - subs r0, r2 - lsls r0, 2 - adds r0, r5 - ldrb r0, [r0, 0x7] - adds r1, 0x22 - strb r0, [r1] - ldrb r0, [r6] - bl ClearBankMoveHistory - ldrb r0, [r6] - bl ClearBankAbilityHistory - add sp, 0x4 - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end UndoEffectsAfterFainting - - thumb_func_start bc_8012FAC -bc_8012FAC: @ 803ABC0 - push {r4,r5,lr} - ldr r5, =gBattleCommunication - ldrb r0, [r5] - cmp r0, 0 - beq _0803ABD4 - cmp r0, 0x1 - beq _0803ABF8 - b _0803AC2E - .pool -_0803ABD4: - ldr r4, =gActiveBank - ldrb r0, [r5, 0x1] - strb r0, [r4] - movs r0, 0 - movs r1, 0 - movs r2, 0 - bl EmitGetMonData - ldrb r0, [r4] - bl MarkBufferBankForExecution - ldrb r0, [r5] - adds r0, 0x1 - strb r0, [r5] - b _0803AC2E - .pool -_0803ABF8: - ldr r0, =gBattleExecBuffer - ldr r2, [r0] - cmp r2, 0 - bne _0803AC2E - ldrb r0, [r5, 0x1] - adds r0, 0x1 - strb r0, [r5, 0x1] - ldr r1, =gNoOfAllBanks - lsls r0, 24 - lsrs r0, 24 - ldrb r1, [r1] - cmp r0, r1 - bne _0803AC2C - ldr r1, =gBattleMainFunc - ldr r0, =bc_load_battlefield - str r0, [r1] - b _0803AC2E - .pool -_0803AC2C: - strb r2, [r5] -_0803AC2E: - pop {r4,r5} - pop {r0} - bx r0 - thumb_func_end bc_8012FAC - - thumb_func_start bc_load_battlefield -bc_load_battlefield: @ 803AC34 - push {r4,r5,lr} - ldr r0, =gBattleExecBuffer - ldr r5, [r0] - cmp r5, 0 - bne _0803AC64 - movs r0, 0 - bl GetBankByIdentity - ldr r4, =gActiveBank - strb r0, [r4] - ldr r0, =gBattleTerrain - ldrb r1, [r0] - movs r0, 0 - bl dp01_build_cmdbuf_x2E_a - ldrb r0, [r4] - bl MarkBufferBankForExecution - ldr r1, =gBattleMainFunc - ldr r0, =sub_803AC84 - str r0, [r1] - ldr r0, =gBattleCommunication - strb r5, [r0] - strb r5, [r0, 0x1] -_0803AC64: - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end bc_load_battlefield - - thumb_func_start sub_803AC84 -sub_803AC84: @ 803AC84 - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - ldr r0, =gBattleExecBuffer - ldr r1, [r0] - cmp r1, 0 - beq _0803AC98 - b _0803AF4E -_0803AC98: - ldr r2, =gActiveBank - strb r1, [r2] - ldr r0, =gNoOfAllBanks - ldrb r0, [r0] - cmp r1, r0 - bcc _0803ACA6 - b _0803AF48 -_0803ACA6: - movs r7, 0x58 - ldr r0, =gBattleMons - mov r8, r0 - mov r9, r2 - movs r1, 0x48 - add r1, r8 - mov r10, r1 -_0803ACB4: - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - movs r1, 0x80 - ands r0, r1 - cmp r0, 0 - beq _0803ACFC - ldr r4, =gActiveBank - ldrb r0, [r4] - bl GetBankSide - lsls r0, 24 - cmp r0, 0 - bne _0803ACFC - ldrb r0, [r4] - muls r0, r7 - mov r2, r8 - adds r3, r0, r2 - movs r2, 0 - movs r1, 0 -_0803ACDA: - adds r0, r3, r2 - strb r1, [r0] - adds r2, 0x1 - cmp r2, 0x57 - bls _0803ACDA - b _0803ADCA - .pool -_0803ACFC: - mov r1, r9 - ldrb r0, [r1] - muls r0, r7 - mov r2, r8 - adds r3, r0, r2 - movs r2, 0 - ldr r6, =gBaseStats - ldr r5, =gBattleBufferB - ldr r4, =gActiveBank -_0803AD0E: - adds r0, r3, r2 - ldrb r1, [r4] - lsls r1, 9 - adds r1, 0x4 - adds r1, r2, r1 - adds r1, r5 - ldrb r1, [r1] - strb r1, [r0] - adds r2, 0x1 - cmp r2, 0x57 - bls _0803AD0E - mov r1, r9 - ldrb r0, [r1] - adds r2, r0, 0 - muls r2, r7 - add r2, r8 - ldrh r1, [r2] - lsls r0, r1, 3 - subs r0, r1 - lsls r0, 2 - adds r0, r6 - ldrb r0, [r0, 0x6] - adds r2, 0x21 - strb r0, [r2] - mov r2, r9 - ldrb r0, [r2] - adds r2, r0, 0 - muls r2, r7 - add r2, r8 - ldrh r1, [r2] - lsls r0, r1, 3 - subs r0, r1 - lsls r0, 2 - adds r0, r6 - ldrb r0, [r0, 0x7] - adds r2, 0x22 - strb r0, [r2] - mov r1, r9 - ldrb r0, [r1] - adds r1, r0, 0 - muls r1, r7 - add r1, r8 - ldrh r0, [r1] - ldrb r1, [r1, 0x17] - lsrs r1, 7 - bl GetAbilityBySpecies - mov r2, r9 - ldrb r1, [r2] - muls r1, r7 - add r1, r8 - adds r1, 0x20 - strb r0, [r1] - ldrb r0, [r2] - bl GetBankSide - ldr r1, =gBattleStruct - lsls r0, 24 - lsrs r0, 23 - adds r0, 0xA8 - ldr r1, [r1] - adds r1, r0 - mov r2, r9 - ldrb r0, [r2] - muls r0, r7 - add r0, r8 - ldrh r0, [r0, 0x28] - strh r0, [r1] - movs r2, 0 - ldr r4, =gActiveBank - movs r5, 0x58 - ldr r1, =gBattleMons + 0x18 - adds r6, r4, 0 - movs r0, 0x18 - negs r0, r0 - adds r0, r1 - mov r12, r0 - movs r3, 0x6 -_0803ADAA: - ldrb r0, [r4] - muls r0, r5 - adds r0, r2, r0 - adds r0, r1 - strb r3, [r0] - adds r2, 0x1 - cmp r2, 0x7 - ble _0803ADAA - ldrb r0, [r6] - adds r1, r0, 0 - muls r1, r7 - mov r0, r12 - adds r0, 0x50 - adds r1, r0 - movs r0, 0 - str r0, [r1] -_0803ADCA: - ldr r4, =gActiveBank - ldrb r0, [r4] - bl GetBankIdentity - lsls r0, 24 - cmp r0, 0 - bne _0803ADE4 - movs r0, 0 - bl dp01_build_cmdbuf_x07_7_7_7 - ldrb r0, [r4] - bl MarkBufferBankForExecution -_0803ADE4: - ldr r5, =gBattleTypeFlags - ldr r0, [r5] - movs r1, 0x8 - ands r0, r1 - cmp r0, 0 - beq _0803AE60 - ldrb r0, [r4] - bl GetBankIdentity - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x1 - bne _0803AE0A - movs r0, 0 - bl dp01_build_cmdbuf_x07_7_7_7 - ldrb r0, [r4] - bl MarkBufferBankForExecution -_0803AE0A: - ldrb r0, [r4] - bl GetBankSide - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x1 - bne _0803AEC0 - ldr r0, [r5] - ldr r1, =0x063f0902 - ands r0, r1 - cmp r0, 0 - bne _0803AEC0 - ldrb r0, [r4] - muls r0, r7 - add r0, r8 - ldrh r0, [r0] - bl SpeciesToNationalPokedexNum - lsls r0, 16 - lsrs r0, 16 - ldrb r1, [r4] - muls r1, r7 - add r1, r10 - ldr r2, [r1] - movs r1, 0x2 - bl HandleSetPokedexFlag - b _0803AEC0 - .pool -_0803AE60: - ldrb r0, [r4] - bl GetBankSide - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x1 - bne _0803AEC0 - ldr r0, [r5] - ldr r1, =0x063f0902 - ands r0, r1 - cmp r0, 0 - bne _0803AE96 - ldrb r0, [r4] - muls r0, r7 - add r0, r8 - ldrh r0, [r0] - bl SpeciesToNationalPokedexNum - lsls r0, 16 - lsrs r0, 16 - ldrb r1, [r4] - muls r1, r7 - add r1, r10 - ldr r2, [r1] - movs r1, 0x2 - bl HandleSetPokedexFlag -_0803AE96: - movs r0, 0 - bl dp01_build_cmdbuf_x04_4_4_4 - ldrb r0, [r4] - bl MarkBufferBankForExecution - ldr r1, =gBattlePartyID - ldrb r0, [r4] - lsls r0, 1 - adds r0, r1 - ldrh r1, [r0] - movs r0, 0x64 - muls r0, r1 - ldr r1, =gEnemyParty - adds r0, r1 - movs r1, 0xB - movs r2, 0 - bl GetMonData - ldr r1, =gBattleResults - strh r0, [r1, 0x20] -_0803AEC0: - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - movs r1, 0x40 - ands r0, r1 - cmp r0, 0 - beq _0803AEF6 - ldr r4, =gActiveBank - ldrb r0, [r4] - bl GetBankIdentity - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x2 - beq _0803AEEA - ldrb r0, [r4] - bl GetBankIdentity - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x3 - bne _0803AEF6 -_0803AEEA: - movs r0, 0 - bl dp01_build_cmdbuf_x07_7_7_7 - ldrb r0, [r4] - bl MarkBufferBankForExecution -_0803AEF6: - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - movs r1, 0x80 - lsls r1, 8 - ands r0, r1 - cmp r0, 0 - beq _0803AF20 - ldr r4, =gActiveBank - ldrb r0, [r4] - bl GetBankIdentity - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x3 - bne _0803AF20 - movs r0, 0 - bl dp01_build_cmdbuf_x07_7_7_7 - ldrb r0, [r4] - bl MarkBufferBankForExecution -_0803AF20: - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - movs r1, 0x80 - lsls r1, 11 - ands r0, r1 - cmp r0, 0 - beq _0803AF32 - bl sub_81A56B4 -_0803AF32: - mov r1, r9 - ldrb r0, [r1] - adds r0, 0x1 - strb r0, [r1] - ldr r1, =gNoOfAllBanks - lsls r0, 24 - lsrs r0, 24 - ldrb r1, [r1] - cmp r0, r1 - bcs _0803AF48 - b _0803ACB4 -_0803AF48: - ldr r1, =gBattleMainFunc - ldr r0, =bc_801333C - str r0, [r1] -_0803AF4E: - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end sub_803AC84 - - thumb_func_start bc_801333C -bc_801333C: @ 803AF80 - push {r4-r7,lr} - mov r7, r8 - push {r7} - sub sp, 0x30 - ldr r0, =gBattleExecBuffer - ldr r0, [r0] - cmp r0, 0 - beq _0803AF92 - b _0803B10C -_0803AF92: - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - movs r1, 0x8 - ands r0, r1 - cmp r0, 0 - bne _0803AFA0 - b _0803B0AC -_0803AFA0: - movs r7, 0 - add r0, sp, 0x4 - mov r8, r0 - mov r6, r8 - mov r5, sp -_0803AFAA: - movs r0, 0x64 - adds r1, r7, 0 - muls r1, r0 - ldr r0, =gEnemyParty - adds r4, r1, r0 - adds r0, r4, 0 - movs r1, 0x41 - bl GetMonData - cmp r0, 0 - beq _0803AFD0 - adds r0, r4, 0 - movs r1, 0x41 - bl GetMonData - movs r1, 0xCE - lsls r1, 1 - cmp r0, r1 - bne _0803AFE8 -_0803AFD0: - ldr r0, =0x0000ffff - strh r0, [r5] - movs r0, 0 - b _0803AFFA - .pool -_0803AFE8: - adds r0, r4, 0 - movs r1, 0x39 - bl GetMonData - strh r0, [r5] - adds r0, r4, 0 - movs r1, 0x37 - bl GetMonData -_0803AFFA: - str r0, [r6] - adds r6, 0x8 - adds r5, 0x8 - adds r7, 0x1 - cmp r7, 0x5 - ble _0803AFAA - movs r0, 0x1 - bl GetBankByIdentity - ldr r4, =gActiveBank - strb r0, [r4] - movs r0, 0 - mov r1, sp - movs r2, 0x80 - bl EmitCmd48 - ldrb r0, [r4] - bl MarkBufferBankForExecution - movs r7, 0 - mov r6, r8 - mov r5, sp -_0803B026: - movs r0, 0x64 - adds r1, r7, 0 - muls r1, r0 - ldr r0, =gPlayerParty - adds r4, r1, r0 - adds r0, r4, 0 - movs r1, 0x41 - bl GetMonData - cmp r0, 0 - beq _0803B04C - adds r0, r4, 0 - movs r1, 0x41 - bl GetMonData - movs r1, 0xCE - lsls r1, 1 - cmp r0, r1 - bne _0803B060 -_0803B04C: - ldr r0, =0x0000ffff - strh r0, [r5] - movs r0, 0 - b _0803B072 - .pool -_0803B060: - adds r0, r4, 0 - movs r1, 0x39 - bl GetMonData - strh r0, [r5] - adds r0, r4, 0 - movs r1, 0x37 - bl GetMonData -_0803B072: - str r0, [r6] - adds r6, 0x8 - adds r5, 0x8 - adds r7, 0x1 - cmp r7, 0x5 - ble _0803B026 - movs r0, 0 - bl GetBankByIdentity - ldr r4, =gActiveBank - strb r0, [r4] - movs r0, 0 - mov r1, sp - movs r2, 0x80 - bl EmitCmd48 - ldrb r0, [r4] - bl MarkBufferBankForExecution - ldr r1, =gBattleMainFunc - ldr r0, =bc_battle_begin_message - b _0803B10A - .pool -_0803B0AC: - movs r7, 0 - add r6, sp, 0x4 - mov r5, sp -_0803B0B2: - movs r0, 0x64 - adds r1, r7, 0 - muls r1, r0 - ldr r0, =gPlayerParty - adds r4, r1, r0 - adds r0, r4, 0 - movs r1, 0x41 - bl GetMonData - cmp r0, 0 - beq _0803B0D8 - adds r0, r4, 0 - movs r1, 0x41 - bl GetMonData - movs r1, 0xCE - lsls r1, 1 - cmp r0, r1 - bne _0803B0E8 -_0803B0D8: - ldr r0, =0x0000ffff - strh r0, [r5] - movs r0, 0 - b _0803B0FA - .pool -_0803B0E8: - adds r0, r4, 0 - movs r1, 0x39 - bl GetMonData - strh r0, [r5] - adds r0, r4, 0 - movs r1, 0x37 - bl GetMonData -_0803B0FA: - str r0, [r6] - adds r6, 0x8 - adds r5, 0x8 - adds r7, 0x1 - cmp r7, 0x5 - ble _0803B0B2 - ldr r1, =gBattleMainFunc - ldr r0, =bc_8013568 -_0803B10A: - str r0, [r1] -_0803B10C: - add sp, 0x30 - pop {r3} - mov r8, r3 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end bc_801333C - - thumb_func_start bc_battle_begin_message -bc_battle_begin_message: @ 803B120 - push {lr} - ldr r0, =gBattleExecBuffer - ldr r0, [r0] - cmp r0, 0 - bne _0803B142 - movs r0, 0x1 - bl GetBankByIdentity - ldr r1, =gActiveBank - strb r0, [r1] - ldrb r1, [r1] - movs r0, 0 - bl PrepareStringBattle - ldr r1, =gBattleMainFunc - ldr r0, =sub_803B180 - str r0, [r1] -_0803B142: - pop {r0} - bx r0 - .pool - thumb_func_end bc_battle_begin_message - - thumb_func_start bc_8013568 -bc_8013568: @ 803B158 - push {lr} - ldr r0, =gBattleExecBuffer - ldr r0, [r0] - cmp r0, 0 - bne _0803B170 - ldr r1, =gBattleMainFunc - ldr r0, =sub_803B3CC - str r0, [r1] - movs r0, 0 - movs r1, 0 - bl PrepareStringBattle -_0803B170: - pop {r0} - bx r0 - .pool - thumb_func_end bc_8013568 - - thumb_func_start sub_803B180 -sub_803B180: @ 803B180 - push {lr} - ldr r0, =gBattleExecBuffer - ldr r0, [r0] - cmp r0, 0 - bne _0803B1D0 - ldr r0, =gBattleTypeFlags - ldr r2, [r0] - movs r0, 0x80 - lsls r0, 17 - ands r0, r2 - cmp r0, 0 - beq _0803B1B8 - movs r0, 0x80 - lsls r0, 18 - ands r0, r2 - cmp r0, 0 - beq _0803B1B8 - movs r1, 0x80 - lsls r1, 24 - ands r1, r2 - negs r0, r1 - orrs r0, r1 - lsrs r0, 31 - b _0803B1BA - .pool -_0803B1B8: - movs r0, 0x1 -_0803B1BA: - bl GetBankByIdentity - adds r1, r0, 0 - lsls r1, 24 - lsrs r1, 24 - movs r0, 0x1 - bl PrepareStringBattle - ldr r1, =gBattleMainFunc - ldr r0, =sub_803B25C - str r0, [r1] -_0803B1D0: - pop {r0} - bx r0 - .pool - thumb_func_end sub_803B180 - - thumb_func_start sub_803B1DC -sub_803B1DC: @ 803B1DC - push {r4,r5,lr} - ldr r0, =gBattleTypeFlags - ldr r1, [r0] - movs r0, 0x80 - lsls r0, 17 - ands r0, r1 - cmp r0, 0 - beq _0803B1FC - movs r0, 0x80 - lsls r0, 18 - ands r0, r1 - cmp r0, 0 - beq _0803B1FC - movs r5, 0x2 - cmp r1, 0 - bge _0803B1FE -_0803B1FC: - movs r5, 0x3 -_0803B1FE: - ldr r1, =gActiveBank - movs r0, 0 - strb r0, [r1] - ldr r0, =gNoOfAllBanks - ldrb r0, [r0] - cmp r0, 0 - beq _0803B23A - adds r4, r1, 0 -_0803B20E: - ldrb r0, [r4] - bl GetBankIdentity - lsls r0, 24 - lsrs r0, 24 - cmp r0, r5 - bne _0803B228 - movs r0, 0 - bl dp01_build_cmdbuf_x2F_2F_2F_2F - ldrb r0, [r4] - bl MarkBufferBankForExecution -_0803B228: - ldrb r0, [r4] - adds r0, 0x1 - strb r0, [r4] - ldr r1, =gNoOfAllBanks - lsls r0, 24 - lsrs r0, 24 - ldrb r1, [r1] - cmp r0, r1 - bcc _0803B20E -_0803B23A: - ldr r1, =gBattleMainFunc - ldr r0, =bc_801362C - str r0, [r1] - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end sub_803B1DC - - thumb_func_start sub_803B25C -sub_803B25C: @ 803B25C - push {r4-r6,lr} - ldr r0, =gBattleTypeFlags - ldr r2, [r0] - movs r0, 0x80 - lsls r0, 17 - ands r0, r2 - cmp r0, 0 - beq _0803B298 - movs r0, 0x80 - lsls r0, 18 - ands r0, r2 - cmp r0, 0 - beq _0803B298 - movs r1, 0x80 - lsls r1, 24 - ands r1, r2 - negs r0, r1 - orrs r0, r1 - lsrs r5, r0, 31 - b _0803B29A - .pool -_0803B288: - ldr r1, =gBattleMainFunc - ldr r0, =sub_803B1DC - b _0803B2F0 - .pool -_0803B298: - movs r5, 0x1 -_0803B29A: - ldr r0, =gBattleExecBuffer - ldr r2, [r0] - cmp r2, 0 - bne _0803B2F2 - ldr r0, =gActiveBank - strb r2, [r0] - ldr r1, =gNoOfAllBanks - adds r4, r0, 0 - ldrb r1, [r1] - cmp r2, r1 - bcs _0803B2EC - adds r6, r4, 0 -_0803B2B2: - ldrb r0, [r4] - bl GetBankIdentity - lsls r0, 24 - lsrs r0, 24 - cmp r0, r5 - bne _0803B2D8 - movs r0, 0 - bl dp01_build_cmdbuf_x2F_2F_2F_2F - ldrb r0, [r4] - bl MarkBufferBankForExecution - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - ldr r1, =0x00008040 - ands r0, r1 - cmp r0, 0 - bne _0803B288 -_0803B2D8: - ldrb r0, [r6] - adds r0, 0x1 - strb r0, [r6] - ldr r1, =gNoOfAllBanks - lsls r0, 24 - lsrs r0, 24 - ldr r4, =gActiveBank - ldrb r1, [r1] - cmp r0, r1 - bcc _0803B2B2 -_0803B2EC: - ldr r1, =gBattleMainFunc - ldr r0, =bc_801362C -_0803B2F0: - str r0, [r1] -_0803B2F2: - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end sub_803B25C - - thumb_func_start bc_801362C -bc_801362C: @ 803B314 - push {r4-r7,lr} - ldr r0, =gBattleExecBuffer - ldr r1, [r0] - cmp r1, 0 - bne _0803B384 - ldr r2, =gActiveBank - strb r1, [r2] - ldr r0, =gNoOfAllBanks - ldrb r0, [r0] - cmp r1, r0 - bcs _0803B37E - adds r4, r2, 0 - ldr r6, =gBattleMons - movs r5, 0x58 - adds r7, r6, 0 - adds r7, 0x48 -_0803B334: - ldrb r0, [r4] - bl GetBankSide - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x1 - bne _0803B36C - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - ldr r1, =0x063f0902 - ands r0, r1 - cmp r0, 0 - bne _0803B36C - ldrb r0, [r4] - muls r0, r5 - adds r0, r6 - ldrh r0, [r0] - bl SpeciesToNationalPokedexNum - lsls r0, 16 - lsrs r0, 16 - ldrb r1, [r4] - muls r1, r5 - adds r1, r7 - ldr r2, [r1] - movs r1, 0x2 - bl HandleSetPokedexFlag -_0803B36C: - ldrb r0, [r4] - adds r0, 0x1 - strb r0, [r4] - ldr r1, =gNoOfAllBanks - lsls r0, 24 - lsrs r0, 24 - ldrb r1, [r1] - cmp r0, r1 - bcc _0803B334 -_0803B37E: - ldr r1, =gBattleMainFunc - ldr r0, =sub_803B3CC - str r0, [r1] -_0803B384: - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end bc_801362C - - thumb_func_start sub_803B3AC -sub_803B3AC: @ 803B3AC - push {lr} - ldr r0, =gBattleExecBuffer - ldr r0, [r0] - cmp r0, 0 - bne _0803B3BC - ldr r1, =gBattleMainFunc - ldr r0, =sub_803B3CC - str r0, [r1] -_0803B3BC: - pop {r0} - bx r0 - .pool - thumb_func_end sub_803B3AC - - thumb_func_start sub_803B3CC -sub_803B3CC: @ 803B3CC - push {lr} - ldr r0, =gBattleExecBuffer - ldr r0, [r0] - cmp r0, 0 - bne _0803B418 - ldr r1, =gBattleTypeFlags - ldr r2, [r1] - movs r0, 0x80 - lsls r0, 17 - ands r0, r2 - cmp r0, 0 - beq _0803B3F4 - movs r0, 0x80 - lsls r0, 18 - ands r0, r2 - cmp r0, 0 - beq _0803B3F4 - movs r3, 0x1 - cmp r2, 0 - bge _0803B3F6 -_0803B3F4: - movs r3, 0 -_0803B3F6: - ldr r0, [r1] - movs r1, 0x80 - ands r0, r1 - cmp r0, 0 - bne _0803B412 - adds r0, r3, 0 - bl GetBankByIdentity - adds r1, r0, 0 - lsls r1, 24 - lsrs r1, 24 - movs r0, 0x1 - bl PrepareStringBattle -_0803B412: - ldr r1, =gBattleMainFunc - ldr r0, =sub_803B4C8 - str r0, [r1] -_0803B418: - pop {r0} - bx r0 - .pool - thumb_func_end sub_803B3CC - - thumb_func_start sub_803B42C -sub_803B42C: @ 803B42C - push {r4,r5,lr} - ldr r0, =gBattleTypeFlags - ldr r1, [r0] - movs r0, 0x80 - lsls r0, 17 - ands r0, r1 - cmp r0, 0 - beq _0803B44C - movs r0, 0x80 - lsls r0, 18 - ands r0, r1 - cmp r0, 0 - beq _0803B44C - movs r5, 0x3 - cmp r1, 0 - bge _0803B44E -_0803B44C: - movs r5, 0x2 -_0803B44E: - ldr r1, =gActiveBank - movs r0, 0 - strb r0, [r1] - ldr r0, =gNoOfAllBanks - ldrb r0, [r0] - cmp r0, 0 - beq _0803B48A - adds r4, r1, 0 -_0803B45E: - ldrb r0, [r4] - bl GetBankIdentity - lsls r0, 24 - lsrs r0, 24 - cmp r0, r5 - bne _0803B478 - movs r0, 0 - bl dp01_build_cmdbuf_x2F_2F_2F_2F - ldrb r0, [r4] - bl MarkBufferBankForExecution -_0803B478: - ldrb r0, [r4] - adds r0, 0x1 - strb r0, [r4] - ldr r1, =gNoOfAllBanks - lsls r0, 24 - lsrs r0, 24 - ldrb r1, [r1] - cmp r0, r1 - bcc _0803B45E -_0803B48A: - ldr r2, =gBattleStruct - ldr r0, [r2] - adds r0, 0x4C - movs r1, 0 - strb r1, [r0] - ldr r0, [r2] - adds r0, 0xD9 - strb r1, [r0] - ldr r0, [r2] - movs r2, 0xD1 - lsls r2, 1 - adds r0, r2 - strb r1, [r0] - ldr r1, =gBattleMainFunc - ldr r0, =sub_803B628 - str r0, [r1] - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end sub_803B42C - - thumb_func_start sub_803B4C8 -sub_803B4C8: @ 803B4C8 - push {r4-r6,lr} - ldr r0, =gBattleTypeFlags - ldr r1, [r0] - movs r0, 0x80 - lsls r0, 17 - ands r0, r1 - cmp r0, 0 - beq _0803B500 - movs r0, 0x80 - lsls r0, 18 - ands r0, r1 - cmp r0, 0 - beq _0803B500 - movs r6, 0x1 - cmp r1, 0 - bge _0803B502 - b _0803B500 - .pool -_0803B4F0: - ldr r1, =gBattleMainFunc - ldr r0, =sub_803B42C - b _0803B572 - .pool -_0803B500: - movs r6, 0 -_0803B502: - ldr r0, =gBattleExecBuffer - ldr r2, [r0] - cmp r2, 0 - bne _0803B574 - ldr r0, =gActiveBank - strb r2, [r0] - ldr r1, =gNoOfAllBanks - adds r4, r0, 0 - ldrb r1, [r1] - cmp r2, r1 - bcs _0803B554 - adds r5, r4, 0 -_0803B51A: - ldrb r0, [r4] - bl GetBankIdentity - lsls r0, 24 - lsrs r0, 24 - cmp r0, r6 - bne _0803B540 - movs r0, 0 - bl dp01_build_cmdbuf_x2F_2F_2F_2F - ldrb r0, [r4] - bl MarkBufferBankForExecution - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - movs r1, 0x40 - ands r0, r1 - cmp r0, 0 - bne _0803B4F0 -_0803B540: - ldrb r0, [r5] - adds r0, 0x1 - strb r0, [r5] - ldr r1, =gNoOfAllBanks - lsls r0, 24 - lsrs r0, 24 - ldr r4, =gActiveBank - ldrb r1, [r1] - cmp r0, r1 - bcc _0803B51A -_0803B554: - ldr r2, =gBattleStruct - ldr r0, [r2] - adds r0, 0x4C - movs r1, 0 - strb r1, [r0] - ldr r0, [r2] - adds r0, 0xD9 - strb r1, [r0] - ldr r0, [r2] - movs r2, 0xD1 - lsls r2, 1 - adds r0, r2 - strb r1, [r0] - ldr r1, =gBattleMainFunc - ldr r0, =sub_803B628 -_0803B572: - str r0, [r1] -_0803B574: - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end sub_803B4C8 - - thumb_func_start sub_803B598 -sub_803B598: @ 803B598 - push {r4,r5,lr} - ldr r0, =gBattleExecBuffer - ldr r1, [r0] - cmp r1, 0 - bne _0803B606 - ldr r2, =gActiveBank - strb r1, [r2] - ldr r0, =gNoOfAllBanks - ldrb r0, [r0] - cmp r1, r0 - bcs _0803B5E6 - adds r4, r2, 0 - ldr r5, =gBattlePartyID -_0803B5B2: - ldrb r0, [r4] - bl GetBankSide - lsls r0, 24 - cmp r0, 0 - bne _0803B5D4 - ldrb r0, [r4] - lsls r0, 1 - adds r0, r5 - ldrb r1, [r0] - movs r0, 0 - movs r2, 0 - bl EmitSwitchInAnim - ldrb r0, [r4] - bl MarkBufferBankForExecution -_0803B5D4: - ldrb r0, [r4] - adds r0, 0x1 - strb r0, [r4] - ldr r1, =gNoOfAllBanks - lsls r0, 24 - lsrs r0, 24 - ldrb r1, [r1] - cmp r0, r1 - bcc _0803B5B2 -_0803B5E6: - ldr r2, =gBattleStruct - ldr r0, [r2] - adds r0, 0x4C - movs r1, 0 - strb r1, [r0] - ldr r0, [r2] - adds r0, 0xD9 - strb r1, [r0] - ldr r0, [r2] - movs r2, 0xD1 - lsls r2, 1 - adds r0, r2 - strb r1, [r0] - ldr r1, =gBattleMainFunc - ldr r0, =sub_803B628 - str r0, [r1] -_0803B606: - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end sub_803B598 - - thumb_func_start sub_803B628 -sub_803B628: @ 803B628 - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - sub sp, 0x4 - movs r0, 0 - mov r9, r0 - ldr r0, =gBattleExecBuffer - ldr r0, [r0] - cmp r0, 0 - beq _0803B642 - b _0803B8B2 -_0803B642: - ldr r0, =gBattleStruct - ldr r0, [r0] - adds r0, 0x4C - ldrb r0, [r0] - cmp r0, 0 - bne _0803B6C2 - movs r5, 0 - ldr r1, =gNoOfAllBanks - mov r10, r1 - ldrb r3, [r1] - cmp r5, r3 - bge _0803B668 - ldr r2, =gTurnOrder -_0803B65C: - adds r0, r5, r2 - strb r5, [r0] - adds r5, 0x1 - ldrb r0, [r1] - cmp r5, r0 - blt _0803B65C -_0803B668: - movs r5, 0 - b _0803B6B8 - .pool -_0803B67C: - adds r4, r5, 0x1 - mov r8, r4 - ldrb r1, [r1] - cmp r8, r1 - bge _0803B6B6 - ldr r6, =gTurnOrder - ldr r1, =gNoOfAllBanks - mov r10, r1 - lsls r7, r5, 24 -_0803B68E: - adds r0, r5, r6 - ldrb r0, [r0] - adds r1, r4, r6 - ldrb r1, [r1] - movs r2, 0x1 - bl b_first_side - lsls r0, 24 - cmp r0, 0 - beq _0803B6AC - lsls r1, r4, 24 - lsrs r1, 24 - lsrs r0, r7, 24 - bl sub_803CEDC -_0803B6AC: - adds r4, 0x1 - ldr r0, =gNoOfAllBanks - ldrb r0, [r0] - cmp r4, r0 - blt _0803B68E -_0803B6B6: - mov r5, r8 -_0803B6B8: - mov r1, r10 - ldrb r0, [r1] - subs r0, 0x1 - cmp r5, r0 - blt _0803B67C -_0803B6C2: - ldr r5, =gBattleStruct - ldr r0, [r5] - movs r4, 0xD1 - lsls r4, 1 - adds r0, r4 - ldrb r0, [r0] - cmp r0, 0 - bne _0803B6FC - str r0, [sp] - movs r0, 0 - movs r1, 0 - movs r2, 0 - movs r3, 0xFF - bl AbilityBattleEffects - lsls r0, 24 - cmp r0, 0 - beq _0803B6FC - ldr r0, [r5] - adds r0, r4 - movs r1, 0x1 - strb r1, [r0] - b _0803B8B2 - .pool -_0803B6FC: - ldr r2, =gBattleStruct - ldr r0, [r2] - adds r0, 0x4C - ldr r1, =gNoOfAllBanks - ldrb r0, [r0] - ldrb r1, [r1] - cmp r0, r1 - bcs _0803B756 - ldr r5, =gTurnOrder - adds r4, r2, 0 -_0803B710: - ldr r0, [r4] - adds r0, 0x4C - ldrb r0, [r0] - adds r0, r5 - ldrb r1, [r0] - movs r0, 0 - str r0, [sp] - movs r2, 0 - movs r3, 0 - bl AbilityBattleEffects - lsls r0, 24 - cmp r0, 0 - beq _0803B736 - mov r0, r9 - adds r0, 0x1 - lsls r0, 24 - lsrs r0, 24 - mov r9, r0 -_0803B736: - ldr r1, [r4] - adds r1, 0x4C - ldrb r0, [r1] - adds r0, 0x1 - strb r0, [r1] - mov r3, r9 - cmp r3, 0 - beq _0803B748 - b _0803B8B2 -_0803B748: - ldr r0, [r4] - adds r0, 0x4C - ldr r1, =gNoOfAllBanks - ldrb r0, [r0] - ldrb r1, [r1] - cmp r0, r1 - bcc _0803B710 -_0803B756: - movs r0, 0 - str r0, [sp] - movs r0, 0x9 - movs r1, 0 - movs r2, 0 - movs r3, 0 - bl AbilityBattleEffects - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0 - beq _0803B770 - b _0803B8B2 -_0803B770: - str r0, [sp] - movs r0, 0xB - movs r1, 0 - movs r2, 0 - movs r3, 0 - bl AbilityBattleEffects - lsls r0, 24 - cmp r0, 0 - beq _0803B786 - b _0803B8B2 -_0803B786: - ldr r2, =gBattleStruct - ldr r0, [r2] - adds r0, 0xD9 - ldr r1, =gNoOfAllBanks - ldrb r0, [r0] - ldrb r1, [r1] - cmp r0, r1 - bcs _0803B7DA - ldr r5, =gTurnOrder - adds r4, r2, 0 -_0803B79A: - ldr r0, [r4] - adds r0, 0xD9 - ldrb r0, [r0] - adds r0, r5 - ldrb r1, [r0] - movs r0, 0 - movs r2, 0 - bl ItemBattleEffects - lsls r0, 24 - cmp r0, 0 - beq _0803B7BC - mov r0, r9 - adds r0, 0x1 - lsls r0, 24 - lsrs r0, 24 - mov r9, r0 -_0803B7BC: - ldr r1, [r4] - adds r1, 0xD9 - ldrb r0, [r1] - adds r0, 0x1 - strb r0, [r1] - mov r0, r9 - cmp r0, 0 - bne _0803B8B2 - ldr r0, [r4] - adds r0, 0xD9 - ldr r1, =gNoOfAllBanks - ldrb r0, [r0] - ldrb r1, [r1] - cmp r0, r1 - bcc _0803B79A -_0803B7DA: - movs r5, 0 - ldr r1, =gBattleStruct - mov r8, r1 - movs r7, 0x6 - ldr r6, =gActionForBanks - ldr r2, =gChosenMovesByBanks - movs r4, 0xFF - movs r3, 0 -_0803B7EA: - mov r1, r8 - ldr r0, [r1] - adds r0, r5, r0 - adds r0, 0x5C - strb r7, [r0] - adds r1, r5, r6 - ldrb r0, [r1] - orrs r0, r4 - strb r0, [r1] - strh r3, [r2] - adds r2, 0x2 - adds r5, 0x1 - cmp r5, 0x3 - ble _0803B7EA - movs r0, 0 - bl sub_803D580 - bl sub_803D6A0 - ldr r0, =gBattleStruct - ldr r0, [r0] - adds r0, 0x91 - ldr r1, =gAbsentBankFlags - ldrb r1, [r1] - strb r1, [r0] - ldr r0, =gText_EmptyString3 - movs r1, 0 - bl sub_814F9EC - ldr r1, =gBattleMainFunc - ldr r0, =sub_803BE74 - str r0, [r1] - bl ResetSentPokesToOpponentValue - ldr r1, =gBattleCommunication - movs r2, 0 - adds r0, r1, 0x7 -_0803B834: - strb r2, [r0] - subs r0, 0x1 - cmp r0, r1 - bge _0803B834 - movs r5, 0 - ldr r3, =gNoOfAllBanks - ldr r2, =gBattleStruct - ldr r6, =gBattleScripting - ldr r7, =gBattleMoveFlags - ldrb r0, [r3] - cmp r5, r0 - bge _0803B866 - ldr r0, =gBattleMons - movs r4, 0x9 - negs r4, r4 - adds r1, r0, 0 - adds r1, 0x50 -_0803B856: - ldr r0, [r1] - ands r0, r4 - str r0, [r1] - adds r1, 0x58 - adds r5, 0x1 - ldrb r0, [r3] - cmp r5, r0 - blt _0803B856 -_0803B866: - ldr r0, [r2] - movs r1, 0 - strb r1, [r0] - ldr r0, [r2] - strb r1, [r0, 0x1] - ldr r0, [r2] - movs r3, 0xD0 - lsls r3, 1 - adds r0, r3 - strb r1, [r0] - ldr r0, [r2] - adds r3, 0x1 - adds r0, r3 - strb r1, [r0] - movs r1, 0 - strb r1, [r6, 0x14] - ldr r0, [r2] - adds r0, 0x4D - strb r1, [r0] - ldr r0, [r2] - strb r1, [r0, 0x3] - strb r1, [r7] - bl Random - ldr r1, =gUnknown_02024330 - strh r0, [r1] - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - movs r1, 0x80 - lsls r1, 11 - ands r0, r1 - cmp r0, 0 - beq _0803B8B2 - bl StopCryAndClearCrySongs - ldr r0, =gUnknown_082DB8BE - bl BattleScriptExecute -_0803B8B2: - add sp, 0x4 - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end sub_803B628 - - thumb_func_start bc_8013B1C -bc_8013B1C: @ 803B904 - push {r4-r6,lr} - ldr r0, =gBattleExecBuffer - ldr r0, [r0] - cmp r0, 0 - bne _0803B994 - ldr r1, =gBattleMainFunc - ldr r0, =BattleTurnPassed - str r0, [r1] - ldr r3, =gNoOfAllBanks - ldr r1, =gBattleCommunication - movs r2, 0 - adds r0, r1, 0x7 -_0803B91C: - strb r2, [r0] - subs r0, 0x1 - cmp r0, r1 - bge _0803B91C - movs r4, 0 - ldrb r3, [r3] - cmp r4, r3 - bge _0803B96E - ldr r5, =gBattleMons - adds r6, r5, 0 - adds r6, 0x4C -_0803B932: - movs r0, 0x58 - adds r2, r4, 0 - muls r2, r0 - adds r1, r5, 0 - adds r1, 0x50 - adds r1, r2, r1 - ldr r3, [r1] - subs r0, 0x61 - ands r3, r0 - str r3, [r1] - adds r2, r6 - ldr r0, [r2] - movs r1, 0x7 - ands r0, r1 - cmp r0, 0 - beq _0803B964 - movs r0, 0x80 - lsls r0, 5 - ands r3, r0 - cmp r3, 0 - beq _0803B964 - lsls r0, r4, 24 - lsrs r0, 24 - bl CancelMultiTurnMoves -_0803B964: - adds r4, 0x1 - ldr r0, =gNoOfAllBanks - ldrb r0, [r0] - cmp r4, r0 - blt _0803B932 -_0803B96E: - ldr r2, =gBattleStruct - ldr r0, [r2] - movs r1, 0 - strb r1, [r0] - ldr r0, [r2] - strb r1, [r0, 0x1] - ldr r0, [r2] - movs r3, 0xD0 - lsls r3, 1 - adds r0, r3 - strb r1, [r0] - ldr r0, [r2] - adds r3, 0x1 - adds r0, r3 - strb r1, [r0] - ldr r0, [r2] - strb r1, [r0, 0x3] - ldr r0, =gBattleMoveFlags - strb r1, [r0] -_0803B994: - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end bc_8013B1C - - thumb_func_start BattleTurnPassed -BattleTurnPassed: @ 803B9BC - push {r4-r7,lr} - mov r7, r9 - mov r6, r8 - push {r6,r7} - movs r0, 0x1 - bl sub_803D580 - ldr r0, =gBattleOutcome - ldrb r0, [r0] - cmp r0, 0 - bne _0803B9EA - bl UpdateTurnCounters - lsls r0, 24 - cmp r0, 0 - beq _0803B9DE - b _0803BB78 -_0803B9DE: - bl TurnBasedEffects - lsls r0, 24 - cmp r0, 0 - beq _0803B9EA - b _0803BB78 -_0803B9EA: - bl sub_8041728 - lsls r0, 24 - lsrs r1, r0, 24 - cmp r1, 0 - beq _0803B9F8 - b _0803BB78 -_0803B9F8: - ldr r0, =gBattleStruct - ldr r0, [r0] - adds r0, 0x4D - strb r1, [r0] - bl sub_8041364 - lsls r0, 24 - lsrs r4, r0, 24 - cmp r4, 0 - beq _0803BA0E - b _0803BB78 -_0803BA0E: - movs r0, 0 - bl sub_803D580 - ldr r2, =gHitMarker - ldr r0, [r2] - ldr r1, =0xfffffdff - ands r0, r1 - ldr r1, =0xfff7ffff - ands r0, r1 - ldr r1, =0xffbfffff - ands r0, r1 - ldr r1, =0xffefffff - ands r0, r1 - str r0, [r2] - ldr r0, =gBattleScripting - strb r4, [r0, 0x18] - strb r4, [r0, 0x19] - strb r4, [r0, 0x14] - ldr r0, =gBattleMoveDamage - str r4, [r0] - ldr r0, =gBattleMoveFlags - strb r4, [r0] - ldr r1, =gBattleCommunication - movs r2, 0 - adds r0, r1, 0x4 -_0803BA40: - strb r2, [r0] - subs r0, 0x1 - cmp r0, r1 - bge _0803BA40 - ldr r0, =gBattleOutcome - ldrb r0, [r0] - cmp r0, 0 - beq _0803BA98 - ldr r1, =gFightStateTracker - movs r0, 0xC - strb r0, [r1] - ldr r1, =gBattleMainFunc - ldr r0, =bc_bs_exec - str r0, [r1] - b _0803BB78 - .pool -_0803BA98: - ldr r1, =gBattleResults - ldrb r0, [r1, 0x13] - ldr r2, =gBattleStruct - mov r8, r2 - cmp r0, 0xFE - bhi _0803BAB2 - adds r0, 0x1 - strb r0, [r1, 0x13] - ldr r1, [r2] - adds r1, 0xDA - ldrb r0, [r1] - adds r0, 0x1 - strb r0, [r1] -_0803BAB2: - movs r2, 0 - ldr r4, =gNoOfAllBanks - ldr r0, =gAbsentBankFlags - mov r12, r0 - ldr r1, =gText_EmptyString3 - mov r9, r1 - ldrb r0, [r4] - cmp r2, r0 - bge _0803BAE0 - ldr r7, =gActionForBanks - movs r6, 0xFF - movs r5, 0 - ldr r3, =gChosenMovesByBanks -_0803BACC: - adds r1, r2, r7 - ldrb r0, [r1] - orrs r0, r6 - strb r0, [r1] - strh r5, [r3] - adds r3, 0x2 - adds r2, 0x1 - ldrb r1, [r4] - cmp r2, r1 - blt _0803BACC -_0803BAE0: - movs r2, 0 - ldr r3, =gBattleStruct - movs r1, 0x6 -_0803BAE6: - ldr r0, [r3] - adds r0, r2, r0 - adds r0, 0x5C - strb r1, [r0] - adds r2, 0x1 - cmp r2, 0x3 - ble _0803BAE6 - mov r2, r8 - ldr r0, [r2] - adds r0, 0x91 - mov r2, r12 - ldrb r1, [r2] - strb r1, [r0] - mov r0, r9 - movs r1, 0 - bl sub_814F9EC - ldr r1, =gBattleMainFunc - ldr r0, =sub_803BE74 - str r0, [r1] - bl Random - ldr r1, =gUnknown_02024330 - strh r0, [r1] - ldr r0, =gBattleTypeFlags - ldr r1, [r0] - movs r0, 0x80 - lsls r0, 10 - ands r0, r1 - cmp r0, 0 - beq _0803BB5C - ldr r0, =gUnknown_082DB881 - bl BattleScriptExecute - b _0803BB78 - .pool -_0803BB5C: - movs r0, 0x80 - lsls r0, 11 - ands r1, r0 - cmp r1, 0 - beq _0803BB78 - mov r1, r8 - ldr r0, [r1] - adds r0, 0xDA - ldrb r0, [r0] - cmp r0, 0 - bne _0803BB78 - ldr r0, =gUnknown_082DB8BE - bl BattleScriptExecute -_0803BB78: - pop {r3,r4} - mov r8, r3 - mov r9, r4 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end BattleTurnPassed - - thumb_func_start IsRunningFromBattleImpossible -IsRunningFromBattleImpossible: @ 803BB88 - push {r4-r7,lr} - sub sp, 0x4 - ldr r1, =gBattleMons - ldr r0, =gActiveBank - ldrb r2, [r0] - movs r0, 0x58 - muls r0, r2 - adds r1, r0, r1 - ldrh r0, [r1, 0x2E] - cmp r0, 0xAF - bne _0803BBB8 - ldr r1, =gEnigmaBerries - lsls r0, r2, 3 - subs r0, r2 - lsls r0, 2 - adds r0, r1 - ldrb r2, [r0, 0x7] - b _0803BBC2 - .pool -_0803BBB8: - ldrh r0, [r1, 0x2E] - bl ItemId_GetHoldEffect - lsls r0, 24 - lsrs r2, r0, 24 -_0803BBC2: - ldr r1, =gStringBank - ldr r3, =gActiveBank - ldrb r0, [r3] - strb r0, [r1] - cmp r2, 0x25 - bne _0803BBD0 - b _0803BD4C -_0803BBD0: - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - movs r1, 0x2 - ands r0, r1 - cmp r0, 0 - beq _0803BBDE - b _0803BD4C -_0803BBDE: - ldr r1, =gBattleMons - ldrb r2, [r3] - movs r0, 0x58 - muls r0, r2 - adds r0, r1 - adds r0, 0x20 - ldrb r0, [r0] - cmp r0, 0x32 - bne _0803BBF2 - b _0803BD4C -_0803BBF2: - adds r0, r2, 0 - bl GetBankSide - lsls r0, 24 - lsrs r6, r0, 24 - movs r5, 0 - ldr r0, =gNoOfAllBanks - ldrb r0, [r0] - cmp r5, r0 - bge _0803BC86 - movs r7, 0 -_0803BC08: - lsrs r4, r7, 24 - adds r0, r4, 0 - bl GetBankSide - lsls r0, 24 - lsrs r0, 24 - cmp r6, r0 - beq _0803BC2C - ldr r1, =gBattleMons - movs r0, 0x58 - muls r0, r5 - adds r0, r1 - adds r2, r0, 0 - adds r2, 0x20 - ldrb r0, [r2] - cmp r0, 0x17 - bne _0803BC2C - b _0803BD54 -_0803BC2C: - adds r0, r4, 0 - bl GetBankSide - lsls r0, 24 - lsrs r0, 24 - cmp r6, r0 - beq _0803BC76 - ldr r3, =gBattleMons - ldr r0, =gActiveBank - ldrb r0, [r0] - movs r2, 0x58 - muls r0, r2 - adds r1, r0, r3 - adds r0, r1, 0 - adds r0, 0x20 - ldrb r0, [r0] - cmp r0, 0x1A - beq _0803BC76 - adds r0, r1, 0 - adds r0, 0x21 - ldrb r0, [r0] - cmp r0, 0x2 - beq _0803BC76 - adds r0, r1, 0 - adds r0, 0x22 - ldrb r0, [r0] - cmp r0, 0x2 - beq _0803BC76 - adds r0, r5, 0 - muls r0, r2 - adds r0, r3 - adds r2, r0, 0 - adds r2, 0x20 - ldrb r0, [r2] - cmp r0, 0x47 - bne _0803BC76 - b _0803BD70 -_0803BC76: - movs r0, 0x80 - lsls r0, 17 - adds r7, r0 - adds r5, 0x1 - ldr r0, =gNoOfAllBanks - ldrb r0, [r0] - cmp r5, r0 - blt _0803BC08 -_0803BC86: - ldr r4, =gActiveBank - ldrb r1, [r4] - movs r0, 0 - str r0, [sp] - movs r0, 0xF - movs r2, 0x2A - movs r3, 0 - bl AbilityBattleEffects - lsls r0, 24 - lsrs r5, r0, 24 - cmp r5, 0 - beq _0803BCF8 - ldr r6, =gBattleMons - ldrb r0, [r4] - movs r3, 0x58 - muls r0, r3 - adds r1, r0, r6 - adds r0, r1, 0 - adds r0, 0x21 - ldrb r0, [r0] - cmp r0, 0x8 - beq _0803BCBE - adds r0, r1, 0 - adds r0, 0x22 - ldrb r0, [r0] - cmp r0, 0x8 - bne _0803BCF8 -_0803BCBE: - ldr r0, =gBattleScripting - subs r1, r5, 0x1 - strb r1, [r0, 0x17] - ldr r2, =gLastUsedAbility - adds r0, r1, 0 - muls r0, r3 - adds r0, r6 - adds r0, 0x20 - ldrb r0, [r0] - strb r0, [r2] - ldr r1, =gBattleCommunication - movs r0, 0x2 - b _0803BD90 - .pool -_0803BCF8: - ldr r1, =gBattleMons - ldr r0, =gActiveBank - ldrb r2, [r0] - movs r0, 0x58 - muls r0, r2 - adds r1, 0x50 - adds r0, r1 - ldr r0, [r0] - ldr r1, =0x0400e000 - ands r0, r1 - cmp r0, 0 - bne _0803BD22 - ldr r1, =gStatuses3 - lsls r0, r2, 2 - adds r0, r1 - ldr r0, [r0] - movs r1, 0x80 - lsls r1, 3 - ands r0, r1 - cmp r0, 0 - beq _0803BD40 -_0803BD22: - ldr r1, =gBattleCommunication - movs r0, 0 - strb r0, [r1, 0x5] - movs r0, 0x1 - b _0803BD92 - .pool -_0803BD40: - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - movs r1, 0x10 - ands r0, r1 - cmp r0, 0 - bne _0803BD8C -_0803BD4C: - movs r0, 0 - b _0803BD92 - .pool -_0803BD54: - ldr r0, =gBattleScripting - strb r5, [r0, 0x17] - ldr r1, =gLastUsedAbility - ldrb r0, [r2] - strb r0, [r1] - ldr r1, =gBattleCommunication - movs r0, 0x2 - b _0803BD90 - .pool -_0803BD70: - ldr r0, =gBattleScripting - strb r5, [r0, 0x17] - ldr r1, =gLastUsedAbility - ldrb r0, [r2] - strb r0, [r1] - ldr r1, =gBattleCommunication - movs r0, 0x2 - b _0803BD90 - .pool -_0803BD8C: - ldr r1, =gBattleCommunication - movs r0, 0x1 -_0803BD90: - strb r0, [r1, 0x5] -_0803BD92: - add sp, 0x4 - pop {r4-r7} - pop {r1} - bx r1 - .pool - thumb_func_end IsRunningFromBattleImpossible + thumb_func_start sub_803BDA0 sub_803BDA0: @ 803BDA0 @@ -5907,8 +1895,8 @@ sub_803CEDC: @ 803CEDC .pool thumb_func_end sub_803CEDC - thumb_func_start b_first_side -b_first_side: @ 803CF10 + thumb_func_start GetWhoStrikesFirst +GetWhoStrikesFirst: @ 803CF10 push {r4-r7,lr} mov r7, r10 mov r6, r9 @@ -6102,7 +2090,7 @@ _0803D07E: _0803D09C: cmp r6, 0x1A bne _0803D0B8 - ldr r0, =gUnknown_02024330 + ldr r0, =gRandomTurnNumber ldrh r4, [r0] lsls r0, r5, 16 subs r0, r5 @@ -6201,7 +2189,7 @@ _0803D162: _0803D17E: cmp r6, 0x1A bne _0803D198 - ldr r0, =gUnknown_02024330 + ldr r0, =gRandomTurnNumber ldrh r4, [r0] lsls r0, r5, 16 subs r0, r5 @@ -6369,7 +2357,7 @@ _0803D2D6: pop {r4-r7} pop {r1} bx r1 - thumb_func_end b_first_side + thumb_func_end GetWhoStrikesFirst thumb_func_start sub_803D2E8 sub_803D2E8: @ 803D2E8 @@ -6635,7 +2623,7 @@ _0803D4F8: beq _0803D534 adds r0, r3, 0 movs r2, 0 - bl b_first_side + bl GetWhoStrikesFirst lsls r0, 24 cmp r0, 0 beq _0803D534 @@ -6678,8 +2666,8 @@ _0803D554: .pool thumb_func_end sub_803D2E8 - thumb_func_start sub_803D580 -sub_803D580: @ 803D580 + thumb_func_start TurnValuesCleanUp +TurnValuesCleanUp: @ 803D580 push {r4-r7,lr} mov r7, r10 mov r6, r9 @@ -6813,10 +2801,10 @@ _0803D678: pop {r0} bx r0 .pool - thumb_func_end sub_803D580 + thumb_func_end TurnValuesCleanUp - thumb_func_start sub_803D6A0 -sub_803D6A0: @ 803D6A0 + thumb_func_start SpecialStatusesClear +SpecialStatusesClear: @ 803D6A0 push {r4-r6,lr} ldr r2, =gActiveBank movs r0, 0 @@ -6855,7 +2843,7 @@ _0803D6DE: pop {r0} bx r0 .pool - thumb_func_end sub_803D6A0 + thumb_func_end SpecialStatusesClear thumb_func_start bc_80154A0 bc_80154A0: @ 803D6F0 @@ -7036,8 +3024,8 @@ _0803D8AC: .pool thumb_func_end bc_bs_exec - thumb_func_start sub_803D8C0 -sub_803D8C0: @ 803D8C0 + thumb_func_start HandleEndTurn_BattleWon +HandleEndTurn_BattleWon: @ 803D8C0 push {r4,lr} ldr r1, =gFightStateTracker movs r0, 0 @@ -7200,16 +3188,16 @@ _0803DA9E: str r0, [r1] _0803DAA4: ldr r1, =gBattleMainFunc - ldr r0, =sub_803DCD8 + ldr r0, =HandleEndTurn_FinishBattle str r0, [r1] pop {r4} pop {r0} bx r0 .pool - thumb_func_end sub_803D8C0 + thumb_func_end HandleEndTurn_BattleWon - thumb_func_start sub_803DAC0 -sub_803DAC0: @ 803DAC0 + thumb_func_start HandleEndTurn_BattleLost +HandleEndTurn_BattleLost: @ 803DAC0 push {r4,lr} ldr r1, =gFightStateTracker movs r0, 0 @@ -7279,16 +3267,16 @@ _0803DB7C: str r0, [r1] _0803DB82: ldr r1, =gBattleMainFunc - ldr r0, =sub_803DCD8 + ldr r0, =HandleEndTurn_FinishBattle str r0, [r1] pop {r4} pop {r0} bx r0 .pool - thumb_func_end sub_803DAC0 + thumb_func_end HandleEndTurn_BattleLost - thumb_func_start sub_803DBA0 -sub_803DBA0: @ 803DBA0 + thumb_func_start HandleEndTurn_RanFromBattle +HandleEndTurn_RanFromBattle: @ 803DBA0 push {lr} ldr r1, =gFightStateTracker movs r0, 0 @@ -7363,15 +3351,15 @@ _0803DC68: str r0, [r1] _0803DC6A: ldr r1, =gBattleMainFunc - ldr r0, =sub_803DCD8 + ldr r0, =HandleEndTurn_FinishBattle str r0, [r1] pop {r0} bx r0 .pool - thumb_func_end sub_803DBA0 + thumb_func_end HandleEndTurn_RanFromBattle - thumb_func_start bc_80158BC -bc_80158BC: @ 803DC84 + thumb_func_start HandleEndTurn_MonFled +HandleEndTurn_MonFled: @ 803DC84 ldr r1, =gFightStateTracker movs r0, 0 strb r0, [r1] @@ -7395,14 +3383,14 @@ bc_80158BC: @ 803DC84 ldr r0, =gUnknown_082DAAF7 str r0, [r1] ldr r1, =gBattleMainFunc - ldr r0, =sub_803DCD8 + ldr r0, =HandleEndTurn_FinishBattle str r0, [r1] bx lr .pool - thumb_func_end bc_80158BC + thumb_func_end HandleEndTurn_MonFled - thumb_func_start sub_803DCD8 -sub_803DCD8: @ 803DCD8 + thumb_func_start HandleEndTurn_FinishBattle +HandleEndTurn_FinishBattle: @ 803DCD8 push {r4-r7,lr} mov r7, r8 push {r7} @@ -7545,7 +3533,7 @@ _0803DE2A: pop {r0} bx r0 .pool - thumb_func_end sub_803DCD8 + thumb_func_end HandleEndTurn_FinishBattle thumb_func_start sub_803DE40 sub_803DE40: @ 803DE40 @@ -8646,11 +4634,11 @@ bs2_8016374: @ 803E868 strh r2, [r0] ldr r0, =gBattle_BG0_Y strh r2, [r0] - ldr r1, =gUnknown_020244AC + ldr r1, =gActionSelectionCursor ldrb r0, [r3] adds r0, r1 strb r2, [r0] - ldr r1, =gUnknown_020244B0 + ldr r1, =gMoveSelectionCursor ldrb r0, [r3] adds r0, r1 strb r2, [r0] @@ -9757,7 +5745,7 @@ bsC_8016D70: @ 803F300 adds r0, r1 ldrb r0, [r0] strb r0, [r3] - bl sub_803D6A0 + bl SpecialStatusesClear ldr r2, =gHitMarker ldr r0, [r2] ldr r1, =0xf1e892af diff --git a/asm/battle_controller_player.s b/asm/battle_controller_player.s index b47a8ecdf..78236f1d7 100644 --- a/asm/battle_controller_player.s +++ b/asm/battle_controller_player.s @@ -191,7 +191,7 @@ _080575F0: beq _08057658 movs r0, 0x5 bl PlaySE - ldr r1, =gUnknown_020244AC + ldr r1, =gActionSelectionCursor ldr r0, =gActiveBank ldrb r0, [r0] adds r0, r1 @@ -233,7 +233,7 @@ _08057658: ands r0, r2 cmp r0, 0 beq _08057698 - ldr r5, =gUnknown_020244AC + ldr r5, =gActionSelectionCursor ldr r4, =gActiveBank ldrb r0, [r4] adds r0, r5 @@ -261,7 +261,7 @@ _08057698: ands r0, r2 cmp r0, 0 beq _080576D8 - ldr r5, =gUnknown_020244AC + ldr r5, =gActionSelectionCursor ldr r4, =gActiveBank ldrb r0, [r4] adds r0, r5 @@ -290,7 +290,7 @@ _080576D8: ands r0, r2 cmp r0, 0 beq _08057700 - ldr r5, =gUnknown_020244AC + ldr r5, =gActionSelectionCursor ldr r4, =gActiveBank ldrb r0, [r4] adds r0, r5 @@ -306,7 +306,7 @@ _08057700: ands r0, r2 cmp r0, 0 beq _0805774C - ldr r5, =gUnknown_020244AC + ldr r5, =gActionSelectionCursor ldr r4, =gActiveBank ldrb r0, [r4] adds r0, r5 @@ -508,7 +508,7 @@ _080578A0: adds r0, r2 ldr r1, =sub_8039B2C str r1, [r0] - ldr r1, =gUnknown_020244B0 + ldr r1, =gMoveSelectionCursor ldr r0, =gActiveBank ldrb r0, [r0] adds r0, r1 @@ -664,7 +664,7 @@ _08057A32: muls r0, r1 ldr r1, =gPlayerParty adds r0, r1 - ldr r1, =gUnknown_020244B0 + ldr r1, =gMoveSelectionCursor adds r2, r1 ldrb r1, [r2] adds r1, 0xD @@ -792,7 +792,7 @@ _08057B56: muls r0, r1 ldr r1, =gPlayerParty adds r0, r1 - ldr r1, =gUnknown_020244B0 + ldr r1, =gMoveSelectionCursor adds r2, r1 ldrb r1, [r2] adds r1, 0xD @@ -890,7 +890,7 @@ _08057C48: _08057C58: movs r0, 0x5 bl PlaySE - ldr r1, =gUnknown_020244B0 + ldr r1, =gMoveSelectionCursor ldr r0, =gActiveBank ldrb r0, [r0] adds r0, r1 @@ -977,7 +977,7 @@ _08057D18: movs r0, 0x1 add r8, r0 _08057D24: - ldr r0, =gUnknown_020244B0 + ldr r0, =gMoveSelectionCursor adds r0, r3, r0 adds r1, r6, 0 adds r1, 0x8 @@ -1008,7 +1008,7 @@ _08057D5A: cmp r0, 0 bne _08057D80 _08057D62: - ldr r1, =gUnknown_020244B0 + ldr r1, =gMoveSelectionCursor ldrb r0, [r7] adds r0, r1 ldrb r2, [r0] @@ -1095,7 +1095,7 @@ _08057E30: ands r0, r2 cmp r0, 0 beq _08057E60 - ldr r4, =gUnknown_020244B0 + ldr r4, =gMoveSelectionCursor ldrb r0, [r7] adds r2, r0, r4 ldrb r1, [r2] @@ -1119,7 +1119,7 @@ _08057E60: ands r0, r2 cmp r0, 0 beq _08057EA4 - ldr r4, =gUnknown_020244B0 + ldr r4, =gMoveSelectionCursor ldrb r0, [r7] adds r3, r0, r4 ldrb r2, [r3] @@ -1151,7 +1151,7 @@ _08057EA4: ands r0, r2 cmp r0, 0 beq _08057ED4 - ldr r4, =gUnknown_020244B0 + ldr r4, =gMoveSelectionCursor ldrb r0, [r7] adds r2, r0, r4 ldrb r1, [r2] @@ -1173,7 +1173,7 @@ _08057ED4: ands r0, r2 cmp r0, 0 beq _08057F30 - ldr r4, =gUnknown_020244B0 + ldr r4, =gMoveSelectionCursor ldrb r0, [r7] adds r3, r0, r4 ldrb r2, [r3] @@ -1221,7 +1221,7 @@ _08057F30: ands r5, r6 cmp r5, 0 bne _08057F9E - ldr r4, =gUnknown_020244B0 + ldr r4, =gMoveSelectionCursor ldrb r0, [r7] adds r0, r4 ldrb r0, [r0] @@ -1302,7 +1302,7 @@ _08057FF8: ands r0, r1 cmp r0, 0 beq _08058038 - ldr r5, =gUnknown_020244B0 + ldr r5, =gMoveSelectionCursor ldr r4, =gActiveBank ldrb r0, [r4] adds r2, r0, r5 @@ -1333,7 +1333,7 @@ _08058038: ands r0, r1 cmp r0, 0 beq _08058086 - ldr r5, =gUnknown_020244B0 + ldr r5, =gMoveSelectionCursor ldr r4, =gActiveBank ldrb r0, [r4] adds r3, r0, r5 @@ -1370,7 +1370,7 @@ _08058086: ands r0, r1 cmp r0, 0 beq _080580C8 - ldr r5, =gUnknown_020244B0 + ldr r5, =gMoveSelectionCursor ldr r4, =gActiveBank ldrb r0, [r4] adds r2, r0, r5 @@ -1401,7 +1401,7 @@ _080580C8: ands r0, r1 cmp r0, 0 beq _08058116 - ldr r5, =gUnknown_020244B0 + ldr r5, =gMoveSelectionCursor ldr r4, =gActiveBank ldrb r0, [r4] adds r3, r0, r5 @@ -1457,7 +1457,7 @@ sub_8058138: @ 8058138 _08058152: movs r0, 0x5 bl PlaySE - ldr r0, =gUnknown_020244B0 + ldr r0, =gMoveSelectionCursor mov r10, r0 ldr r1, =gActiveBank mov r8, r1 @@ -1594,7 +1594,7 @@ _0805824E: adds r6, 0x1 cmp r6, 0x3 ble _0805824E - ldr r1, =gUnknown_020244B0 + ldr r1, =gMoveSelectionCursor ldrb r0, [r7] adds r0, r1 ldrb r0, [r0] @@ -1758,7 +1758,7 @@ _08058392: adds r6, 0x1 cmp r6, 0x3 ble _08058392 - ldr r4, =gUnknown_020244B0 + ldr r4, =gMoveSelectionCursor ldr r3, =gActiveBank ldrb r0, [r3] adds r0, r4 @@ -1892,7 +1892,7 @@ _080584A8: adds r0, r1 ldr r1, =sub_8057BFC str r1, [r0] - ldr r3, =gUnknown_020244B0 + ldr r3, =gMoveSelectionCursor ldrb r0, [r2] adds r0, r3 ldr r1, =gUnknown_03005D74 @@ -1915,7 +1915,7 @@ _08058500: ldr r0, =gUnknown_03005D74 ldrb r0, [r0] bl battle_menu_cursor_related - ldr r1, =gUnknown_020244B0 + ldr r1, =gMoveSelectionCursor ldr r4, =gActiveBank ldrb r0, [r4] adds r0, r1 @@ -1947,7 +1947,7 @@ _08058554: bne _0805856A b _080586E8 _0805856A: - ldr r0, =gUnknown_020244B0 + ldr r0, =gMoveSelectionCursor ldr r1, =gActiveBank ldrb r1, [r1] adds r1, r0 @@ -1990,7 +1990,7 @@ _080585BA: bcc _080585C8 b _080586E8 _080585C8: - ldr r0, =gUnknown_020244B0 + ldr r0, =gMoveSelectionCursor ldr r1, =gActiveBank ldrb r1, [r1] adds r1, r0 @@ -2010,7 +2010,7 @@ _080585E8: ands r0, r2 cmp r0, 0 beq _080586E8 - ldr r0, =gUnknown_020244B0 + ldr r0, =gMoveSelectionCursor ldr r1, =gActiveBank ldrb r1, [r1] adds r1, r0 @@ -2034,7 +2034,7 @@ _0805862C: strb r0, [r4] movs r0, 0x5 bl PlaySE - ldr r1, =gUnknown_020244B0 + ldr r1, =gMoveSelectionCursor ldr r0, =gActiveBank ldrb r0, [r0] adds r0, r1 @@ -2064,7 +2064,7 @@ _0805865C: ldrb r1, [r1] cmp r0, r1 bcs _080586E8 - ldr r0, =gUnknown_020244B0 + ldr r0, =gMoveSelectionCursor ldr r1, =gActiveBank ldrb r1, [r1] adds r1, r0 @@ -2087,7 +2087,7 @@ _080586AA: strb r0, [r4] movs r0, 0x5 bl PlaySE - ldr r1, =gUnknown_020244B0 + ldr r1, =gMoveSelectionCursor ldr r0, =gActiveBank ldrb r0, [r0] adds r0, r1 @@ -4407,7 +4407,7 @@ sub_8059B3C: @ 8059B3C adds r0, r5, 0x4 adds r4, r0 ldr r6, =gDisplayedStringBattle - ldr r5, =gUnknown_020244B0 + ldr r5, =gMoveSelectionCursor adds r1, r5 adds r0, r4, 0 adds r0, 0x8 @@ -4462,7 +4462,7 @@ sub_8059BB0: @ 8059BB0 strb r1, [r0] adds r0, 0x1 ldr r3, =gBattleMoves - ldr r2, =gUnknown_020244B0 + ldr r2, =gMoveSelectionCursor ldrb r1, [r5] adds r1, r2 ldrb r1, [r1] @@ -6924,11 +6924,11 @@ sub_805B1CC: @ 805B1CC ldr r2, =gPlayerParty adds r0, r2 bl sub_805DD7C - ldr r1, =gUnknown_020244AC + ldr r1, =gActionSelectionCursor ldrb r0, [r5] adds r0, r1 strb r4, [r0] - ldr r1, =gUnknown_020244B0 + ldr r1, =gMoveSelectionCursor ldrb r0, [r5] adds r0, r1 strb r4, [r0] @@ -8543,7 +8543,7 @@ _0805C062: adds r4, 0x1 cmp r4, 0x3 ble _0805C062 - ldr r1, =gUnknown_020244AC + ldr r1, =gActionSelectionCursor ldr r0, =gActiveBank ldrb r0, [r0] adds r0, r1 @@ -8715,7 +8715,7 @@ sub_805C210: @ 805C210 ldr r1, =gUnknown_03005D74 movs r0, 0xFF strb r0, [r1] - ldr r1, =gUnknown_020244B0 + ldr r1, =gMoveSelectionCursor ldr r0, =gActiveBank ldrb r0, [r0] adds r0, r1 @@ -10333,21 +10333,21 @@ _0805D054: beq _0805D07C b _0805D084 _0805D05A: - ldr r0, =gUnknown_020244AC + ldr r0, =gActionSelectionCursor adds r0, r3, r0 strb r2, [r0] - ldr r1, =gUnknown_020244B0 + ldr r1, =gMoveSelectionCursor ldrb r0, [r4] adds r0, r1 strb r2, [r0] b _0805D084 .pool _0805D074: - ldr r0, =gUnknown_020244AC + ldr r0, =gActionSelectionCursor b _0805D07E .pool _0805D07C: - ldr r0, =gUnknown_020244B0 + ldr r0, =gMoveSelectionCursor _0805D07E: adds r0, r3, r0 movs r1, 0 diff --git a/asm/battle_controller_safari.s b/asm/battle_controller_safari.s index acd716776..26f7ad8f7 100644 --- a/asm/battle_controller_safari.s +++ b/asm/battle_controller_safari.s @@ -71,7 +71,7 @@ bx_battle_menu_t6_2: @ 81593D8 beq _08159446 movs r0, 0x5 bl PlaySE - ldr r1, =gUnknown_020244AC + ldr r1, =gActionSelectionCursor ldr r0, =gActiveBank ldrb r0, [r0] adds r0, r1 @@ -118,7 +118,7 @@ _08159446: ands r0, r1 cmp r0, 0 beq _08159484 - ldr r5, =gUnknown_020244AC + ldr r5, =gActionSelectionCursor ldr r4, =gActiveBank ldrb r0, [r4] adds r0, r5 @@ -144,7 +144,7 @@ _08159484: ands r0, r1 cmp r0, 0 beq _081594C0 - ldr r5, =gUnknown_020244AC + ldr r5, =gActionSelectionCursor ldr r4, =gActiveBank ldrb r0, [r4] adds r0, r5 @@ -170,7 +170,7 @@ _081594C0: ands r0, r1 cmp r0, 0 beq _0815950C - ldr r5, =gUnknown_020244AC + ldr r5, =gActionSelectionCursor ldr r4, =gActiveBank ldrb r0, [r4] adds r0, r5 @@ -204,7 +204,7 @@ _0815950C: ands r0, r1 cmp r0, 0 beq _0815954E - ldr r5, =gUnknown_020244AC + ldr r5, =gActionSelectionCursor ldr r4, =gActiveBank ldrb r0, [r4] adds r0, r5 @@ -871,7 +871,7 @@ _08159AAE: adds r4, 0x1 cmp r4, 0x3 ble _08159AAE - ldr r1, =gUnknown_020244AC + ldr r1, =gActionSelectionCursor ldr r0, =gActiveBank ldrb r0, [r0] adds r0, r1 diff --git a/asm/battle_controller_wally.s b/asm/battle_controller_wally.s index 8291b05fa..629fa308d 100644 --- a/asm/battle_controller_wally.s +++ b/asm/battle_controller_wally.s @@ -3685,7 +3685,7 @@ _0816A48A: adds r4, 0x1 cmp r4, 0x3 ble _0816A48A - ldr r1, =gUnknown_020244AC + ldr r1, =gActionSelectionCursor ldr r0, =gActiveBank ldrb r0, [r0] adds r0, r1 diff --git a/asm/battle_link_817C95C.s b/asm/battle_link_817C95C.s index 94ae7ad7f..39ae59d8b 100644 --- a/asm/battle_link_817C95C.s +++ b/asm/battle_link_817C95C.s @@ -4322,7 +4322,7 @@ _0817EF36: b _0817F1FA _0817EF44: ldr r3, =gBattleMoves - ldr r2, =gUnknown_020244B0 + ldr r2, =gMoveSelectionCursor adds r0, r4, r2 ldrb r0, [r0] lsls r0, 1 @@ -4514,7 +4514,7 @@ _0817F0B4: ble _0817EFC2 movs r5, 0 ldr r3, =gBankAttacker - ldr r6, =gUnknown_020244B0 + ldr r6, =gMoveSelectionCursor ldr r4, =gBattlePartyID mov r8, r4 movs r7, 0x64 @@ -4624,7 +4624,7 @@ _0817F1D4: b _0817F0CC _0817F1DC: ldr r2, =gBattleMoveDamage - ldr r1, =gUnknown_020244B0 + ldr r1, =gMoveSelectionCursor ldr r0, =gBankAttacker ldrb r0, [r0] adds r0, r1 diff --git a/asm/battle_message.s b/asm/battle_message.s index 96869a350..c39903dcc 100644 --- a/asm/battle_message.s +++ b/asm/battle_message.s @@ -2998,7 +2998,7 @@ sub_814FBAC: @ 814FBAC ldr r0, =gBattleBufferA + 4 adds r1, r0 ldr r4, =gUnknown_08D85620 - ldr r0, =gUnknown_020244B0 + ldr r0, =gMoveSelectionCursor adds r2, r0 ldrb r2, [r2] adds r0, r1, 0 diff --git a/asm/reshow_battle_screen.s b/asm/reshow_battle_screen.s index c7e384a10..d9b679750 100644 --- a/asm/reshow_battle_screen.s +++ b/asm/reshow_battle_screen.s @@ -264,7 +264,7 @@ _080A94F8: adds r0, r4, 0 bl sub_805EE54 _080A955C: - ldr r1, =gUnknown_020244AC + ldr r1, =gActionSelectionCursor ldr r0, =gBankInMenu ldrb r0, [r0] adds r0, r1 diff --git a/asm/rom3.s b/asm/rom3.s index 23d320474..2e040ff0f 100644 --- a/asm/rom3.s +++ b/asm/rom3.s @@ -47,9 +47,9 @@ SetUpBattleVarsAndBirchZigzagoon: @ 803269C str r0, [sp, 0x10] movs r1, 0 ldr r7, =gBattleBankFunc - ldr r6, =gUnknown_020244AC + ldr r6, =gActionSelectionCursor movs r2, 0 - ldr r5, =gUnknown_020244B0 + ldr r5, =gMoveSelectionCursor ldr r4, =nullsub_21 ldr r3, =gBanksBySide _080326B8: @@ -222,7 +222,7 @@ b_setup_bx: @ 8032824 cmp r5, 0 beq _080328E4 ldr r1, =gBattleMainFunc - ldr r0, =sub_8039ECC + ldr r0, =BeginBattleIntro str r0, [r1] movs r4, 0x80 lsls r4, 17 @@ -286,7 +286,7 @@ _080328E4: b _080329E0 _080328F0: ldr r0, =gBattleMainFunc - ldr r2, =sub_8039ECC + ldr r2, =BeginBattleIntro str r2, [r0] movs r1, 0x80 ands r1, r3 @@ -380,7 +380,7 @@ _080329CC: b _08032CB2 .pool _080329E0: - ldr r1, =sub_8039ECC + ldr r1, =BeginBattleIntro ldr r2, =gBattleMainFunc str r1, [r2] ldr r2, =gBattleBankFunc @@ -419,7 +419,7 @@ _08032A20: ands r0, r1 cmp r0, r1 bne _08032AA0 - ldr r0, =sub_8039ECC + ldr r0, =BeginBattleIntro ldr r1, =gBattleMainFunc str r0, [r1] ldr r0, =SetBankFuncToRecordedPlayerBufferRunCommand @@ -751,7 +751,7 @@ b_setup_bx_link: @ 8032CC0 cmp r4, 0 beq _08032D1C ldr r1, =gBattleMainFunc - ldr r0, =sub_8039ECC + ldr r0, =BeginBattleIntro str r0, [r1] ldr r2, =gBattleBankFunc ldr r0, =SetBankFuncToPlayerBufferRunCommand @@ -789,7 +789,7 @@ _08032D48: cmp r3, 0 beq _08032D98 ldr r1, =gBattleMainFunc - ldr r0, =sub_8039ECC + ldr r0, =BeginBattleIntro str r0, [r1] ldr r2, =gBattleBankFunc ldr r4, =SetBankFuncToPlayerBufferRunCommand @@ -840,7 +840,7 @@ _08032DD0: cmp r3, 0 beq _08032E1C ldr r1, =gBattleMainFunc - ldr r0, =sub_8039ECC + ldr r0, =BeginBattleIntro str r0, [r1] ldr r2, =gBattleBankFunc ldr r0, =SetBankFuncToPlayerBufferRunCommand @@ -904,7 +904,7 @@ _08032E8C: cmp r0, 0 beq _08032EA4 ldr r1, =gBattleMainFunc - ldr r0, =sub_8039ECC + ldr r0, =BeginBattleIntro str r0, [r1] _08032EA4: movs r0, 0 @@ -2247,8 +2247,8 @@ _0803396C: .pool thumb_func_end sub_8033940 - thumb_func_start dp01_build_cmdbuf_x04_4_4_4 -dp01_build_cmdbuf_x04_4_4_4: @ 8033980 + thumb_func_start EmitLoadMonSprite +EmitLoadMonSprite: @ 8033980 push {lr} lsls r0, 24 lsrs r0, 24 @@ -2262,7 +2262,7 @@ dp01_build_cmdbuf_x04_4_4_4: @ 8033980 pop {r0} bx r0 .pool - thumb_func_end dp01_build_cmdbuf_x04_4_4_4 + thumb_func_end EmitLoadMonSprite thumb_func_start EmitSwitchInAnim EmitSwitchInAnim: @ 80339A0 @@ -2301,8 +2301,8 @@ EmitReturnPokeToBall: @ 80339C4 .pool thumb_func_end EmitReturnPokeToBall - thumb_func_start dp01_build_cmdbuf_x07_7_7_7 -dp01_build_cmdbuf_x07_7_7_7: @ 80339E4 + thumb_func_start EmitDrawTrainerPic +EmitDrawTrainerPic: @ 80339E4 push {lr} lsls r0, 24 lsrs r0, 24 @@ -2317,7 +2317,7 @@ dp01_build_cmdbuf_x07_7_7_7: @ 80339E4 pop {r0} bx r0 .pool - thumb_func_end dp01_build_cmdbuf_x07_7_7_7 + thumb_func_end EmitDrawTrainerPic thumb_func_start EmitTrainerSlide EmitTrainerSlide: @ 8033A04 @@ -3532,8 +3532,8 @@ EmitFaintingCry: @ 803432C .pool thumb_func_end EmitFaintingCry - thumb_func_start dp01_build_cmdbuf_x2E_a -dp01_build_cmdbuf_x2E_a: @ 803434C + thumb_func_start EmitIntroSlide +EmitIntroSlide: @ 803434C push {lr} adds r3, r1, 0 lsls r0, 24 @@ -3547,10 +3547,10 @@ dp01_build_cmdbuf_x2E_a: @ 803434C pop {r0} bx r0 .pool - thumb_func_end dp01_build_cmdbuf_x2E_a + thumb_func_end EmitIntroSlide - thumb_func_start dp01_build_cmdbuf_x2F_2F_2F_2F -dp01_build_cmdbuf_x2F_2F_2F_2F: @ 803436C + thumb_func_start EmitIntroTrainerBallThrow +EmitIntroTrainerBallThrow: @ 803436C push {lr} lsls r0, 24 lsrs r0, 24 @@ -3565,10 +3565,10 @@ dp01_build_cmdbuf_x2F_2F_2F_2F: @ 803436C pop {r0} bx r0 .pool - thumb_func_end dp01_build_cmdbuf_x2F_2F_2F_2F + thumb_func_end EmitIntroTrainerBallThrow - thumb_func_start EmitCmd48 -EmitCmd48: @ 803438C + thumb_func_start EmitDrawPartyStatusSummary +EmitDrawPartyStatusSummary: @ 803438C push {r4,r5,lr} adds r4, r1, 0 lsls r0, 24 @@ -3604,7 +3604,7 @@ _080343B4: pop {r0} bx r0 .pool - thumb_func_end EmitCmd48 + thumb_func_end EmitDrawPartyStatusSummary thumb_func_start EmitCmd49 EmitCmd49: @ 80343D4 diff --git a/include/battle.h b/include/battle.h index afb3c8d6e..e5e5a94d1 100644 --- a/include/battle.h +++ b/include/battle.h @@ -54,6 +54,7 @@ #define BATTLE_TYPE_GROUDON 0x10000000 #define BATTLE_TYPE_KYORGE 0x20000000 #define BATTLE_TYPE_RAYQUAZA 0x40000000 +#define BATTLE_TYPE_x80000000 0x80000000 #define TRAINER_OPPONENT_C00 0xC00 #define TRAINER_OPPONENT_800 0x800 @@ -178,6 +179,9 @@ #define ABILITYEFFECT_COUNT_BANK_SIDE 0x11 #define ABILITYEFFECT_COUNT_ON_FIELD 0x12 #define ABILITYEFFECT_CHECK_ON_FIELD 0x13 +#define ABILITYEFFECT_SWITCH_IN_WEATHER 0xFF + +#define ITEMEFFECT_ON_SWITCH_IN 0x0 #define WEATHER_HAS_EFFECT ((!AbilityBattleEffects(ABILITYEFFECT_CHECK_ON_FIELD, 0, ABILITY_CLOUD_NINE, 0, 0) && !AbilityBattleEffects(ABILITYEFFECT_CHECK_ON_FIELD, 0, ABILITY_AIR_LOCK, 0, 0))) @@ -228,6 +232,7 @@ #define MOVE_EFFECT_BYTE 0x3 #define MULTISTRING_CHOOSER 0x5 #define MSG_DISPLAY 0x7 +#define BATTLE_COMMUNICATION_ENTRIES_COUNT 0x8 #define MOVE_TARGET_SELECTED 0x0 #define MOVE_TARGET_DEPENDS 0x1 @@ -556,7 +561,7 @@ struct BattleResults u16 caughtMonSpecies; // 0x28 u8 caughtMonNick[10]; // 0x2A u8 filler34[2]; - u8 catchAttempts[10]; // 0x36 + u8 catchAttempts[12]; // 0x36 }; extern struct BattleResults gBattleResults; @@ -587,7 +592,7 @@ struct BattleStruct u8 field_49; u8 moneyMultiplier; u8 field_4B; - u8 field_4C; + u8 switchInAbilitiesCounter; u8 field_4D; u8 field_4E; u8 field_4F; @@ -650,7 +655,7 @@ struct BattleStruct u16 choicedMove[BATTLE_BANKS_COUNT]; u16 changedItems[BATTLE_BANKS_COUNT]; u8 intimidateBank; - u8 fillerD9[0xDA-0xD9]; + u8 switchInItemsCounter; u8 field_DA; u8 turnSideTracker; u8 fillerDC[0xDF-0xDC]; @@ -664,7 +669,7 @@ struct BattleStruct struct BattleEnigmaBerry battleEnigmaBerry; u8 field_1A0; u8 field_1A1; - u8 filler1A2; + bool8 overworldWeatherDone; u8 atkCancellerTracker; u8 field_1A4[240]; u8 field_294[4]; @@ -845,7 +850,7 @@ struct BattleScripting u8 statChanger; u8 field_1B; u8 atk23_state; - u8 field_1D; + u8 battleStyle; u8 atk6C_state; u8 learnMoveState; u8 field_20; @@ -874,9 +879,9 @@ void CancelMultiTurnMoves(u8 bank); void PressurePPLose(u8 bankAtk, u8 bankDef, u16 move); void PrepareStringBattle(u16 stringId, u8 bank); u8 GetBattleBank(u8 caseId); -void UndoEffectsAfterFainting(void); +void FaintClearSetData(void); bool8 HasMoveFailed(u8 bank); -void SwitchInClearStructs(void); +void SwitchInClearSetData(void); void sub_803BDA0(u8 bank); void sub_803FA70(u8 bank); void BattleMainCB2(void); @@ -886,6 +891,9 @@ bool8 CanRunFromBattle(u8 bank); bool8 IsRunningFromBattleImpossible(void); void PressurePPLoseOnUsingPerishSong(u8 bankAtk); void PressurePPLoseOnUsingImprision(u8 bankAtk); +u8 GetWhoStrikesFirst(u8 bankAtk, u8 bankDef, bool8 ignoreChosenMoves); +void sub_803CEDC(u8, u8); +void BattleTurnPassed(void); // battle_3 #define MOVE_LIMITATION_ZEROMOVE (1 << 0) @@ -971,10 +979,28 @@ struct BattleAnimationInfo u16 field; // to fill up later }; +struct BattleHealthboxInfo +{ + u8 flag_x1 : 1; + u8 flag_x2 : 1; + u8 flag_x4 : 1; + u8 field_1; + u8 field_2; + u8 field_3; + u8 field_4; + u8 field_5; + u8 field_6; + u8 field_7; + u8 field_8; + u8 field_9; + u8 field_A; + u8 field_B; +}; + struct BattleSpriteData { struct BattleSpriteInfo *bankData; - void* field_4; + struct BattleHealthboxInfo *healthBoxesData; struct BattleAnimationInfo *animationData; }; diff --git a/include/battle_controllers.h b/include/battle_controllers.h index b2846d7cf..61e8bec29 100644 --- a/include/battle_controllers.h +++ b/include/battle_controllers.h @@ -47,11 +47,15 @@ void EmitTrainerSlideBack(u8 bufferId); void EmitFaintingCry(u8 bufferId); void Emit_x37(u8 bufferId, u8 arg1); void EmitHitAnimation(u8 bufferId); -void EmitCmd48(u8 bufferId, struct HpAndStatus* hpAndStatus, u8 arg2); +void EmitDrawPartyStatusSummary(u8 bufferId, struct HpAndStatus* hpAndStatus, u8 arg2); void EmitCmd49(u8 bufferId); void EmitStatusAnimation(u8 bufferId, bool8 status2, u32 status); void EmitCmd13(u8 bufferId); void EmitStatusIconUpdate(u8 bufferId, u32 status1, u32 status2); +void EmitIntroSlide(u8 bufferId, u8 terrainId); +void EmitDrawTrainerPic(u8 bufferId); +void EmitLoadMonSprite(u8 bufferId); +void EmitIntroTrainerBallThrow(u8 bufferId); #define RESET_ACTION_MOVE_SELECTION 0 #define RESET_ACTION_SELECTION 1 diff --git a/include/pokemon.h b/include/pokemon.h index 4b678d679..b3155881e 100644 --- a/include/pokemon.h +++ b/include/pokemon.h @@ -633,10 +633,12 @@ s32 sub_806D864(u16 a1); bool16 sub_806D82C(u8 id); u16 MonTryLearningNewMove(struct Pokemon* mon, bool8); void sub_8068AA4(void); // sets stats for deoxys +bool8 HasTwoFramesAnimation(u16 species); #include "sprite.h" void DoMonFrontSpriteAnimation(struct Sprite* sprite, u16 species, bool8 noCry, u8 arg3); void BattleAnimateFrontSprite(struct Sprite* sprite, u16 species, bool8 noCry, u8 arg3); +void BattleAnimateBackSprite(struct Sprite* sprite, u16 species); #endif // GUARD_POKEMON_H diff --git a/include/recorded_battle.h b/include/recorded_battle.h index 5f3099d83..2040f2b8a 100644 --- a/include/recorded_battle.h +++ b/include/recorded_battle.h @@ -9,6 +9,7 @@ void RecordedBattle_SetBankAction(u8 bank, u8 action); void sub_8185F90(u16 arg0); bool8 sub_8186450(void); u8 sub_8185FAC(void); +u8 sub_8185FB8(void); u8 MoveRecordedBattleToSaveData(void); #endif // GUARD_RECORDED_BATTLE_H diff --git a/include/sprite.h b/include/sprite.h index 838b0d7c0..a9377165e 100644 --- a/include/sprite.h +++ b/include/sprite.h @@ -212,14 +212,14 @@ struct Sprite u16 flags_5:1; //0x20 u16 flags_6:1; //0x40 u16 flags_7:1; //0x80 - /*0x3F*/ u16 hFlip:1; - u16 vFlip:1; - u16 animBeginning:1; - u16 affineAnimBeginning:1; - u16 animEnded:1; - u16 affineAnimEnded:1; - u16 usingSheet:1; - u16 flags_f:1; + /*0x3F*/ u16 hFlip:1; //1 + u16 vFlip:1; //2 + u16 animBeginning:1; //4 + u16 affineAnimBeginning:1; //8 + u16 animEnded:1; //0x10 + u16 affineAnimEnded:1; //0x20 + u16 usingSheet:1; //0x40 + u16 flags_f:1; //0x80 /*0x40*/ u16 sheetTileStart; diff --git a/src/battle_2.c b/src/battle_2.c index 8d1f6a7a1..769723c24 100644 --- a/src/battle_2.c +++ b/src/battle_2.c @@ -13,6 +13,7 @@ #include "species.h" #include "berry.h" #include "text.h" +#include "item.h" #include "items.h" #include "hold_effects.h" #include "link.h" @@ -28,6 +29,13 @@ #include "sound.h" #include "battle_message.h" #include "sprite.h" +#include "util.h" +#include "trig.h" +#include "battle_ai_script_commands.h" +#include "battle_move_effects.h" +#include "battle_controllers.h" +#include "pokedex.h" +#include "abilities.h" struct UnknownStruct6 { @@ -70,6 +78,7 @@ extern u16 gTrainerBattleOpponent_A; extern u16 gTrainerBattleOpponent_B; extern struct BattleEnigmaBerry gEnigmaBerries[BATTLE_BANKS_COUNT]; extern void (*gPreBattleCallback1)(void); +extern void (*gBattleMainFunc)(void); extern struct UnknownPokemonStruct2 gUnknown_02022FF8[3]; // what is it used for? extern struct UnknownPokemonStruct2* gUnknown_02023058; // what is it used for? extern u8 gBattleOutcome; @@ -80,12 +89,56 @@ extern struct MusicPlayerInfo gMPlay_SE2; extern u8 gDecompressionBuffer[]; extern u16 gUnknown_020243FC; extern u8 gHealthBoxesIds[BATTLE_BANKS_COUNT]; +extern void (*gBattleBankFunc[BATTLE_BANKS_COUNT])(void); +extern u8 gBattleBufferA[BATTLE_BANKS_COUNT][0x200]; +extern u8 gBattleBufferB[BATTLE_BANKS_COUNT][0x200]; +extern u8 gStringBank; +extern u32 gUnknown_02022F88; +extern u32 gHitMarker; +extern u16 gBattlePartyID[BATTLE_BANKS_COUNT]; +extern u8 gBattleMonForms[BATTLE_BANKS_COUNT]; +extern u8 gBankSpriteIds[BATTLE_BANKS_COUNT]; +extern u16 gPaydayMoney; +extern u16 gBattleWeather; +extern u16 gPauseCounterBattle; +extern u16 gRandomTurnNumber; +extern u8 gActiveBank; +extern u8 gNoOfAllBanks; +extern u8 gBankAttacker; +extern u8 gBankTarget; +extern u8 gLeveledUpInBattle; +extern u8 gAbsentBankFlags; +extern u32 gBattleExecBuffer; +extern u8 gMultiHitCounter; +extern u8 gBattleMoveFlags; +extern s32 gBattleMoveDamage; +extern const u8* gUnknown_02024230[BATTLE_BANKS_COUNT]; +extern u16 gUnknownMovesUsedByBanks[BATTLE_BANKS_COUNT]; +extern u16 gLastUsedMovesByBanks[BATTLE_BANKS_COUNT]; +extern u16 gUnknown_02024250[BATTLE_BANKS_COUNT]; +extern u16 gUnknown_02024258[BATTLE_BANKS_COUNT]; +extern u16 gUnknown_02024260[BATTLE_BANKS_COUNT]; +extern u16 gLockedMoves[BATTLE_BANKS_COUNT]; +extern u8 gUnknown_02024270[BATTLE_BANKS_COUNT]; +extern u8 gUnknown_02024284[BATTLE_BANKS_COUNT]; +extern u32 gStatuses3[BATTLE_BANKS_COUNT]; +extern u16 gSideAffecting[2]; +extern u16 gCurrentMove; +extern u8 gActionSelectionCursor[BATTLE_BANKS_COUNT]; +extern u8 gMoveSelectionCursor[BATTLE_BANKS_COUNT]; +extern struct BattlePokemon gBattleMons[BATTLE_BANKS_COUNT]; +extern u8 gTurnOrder[BATTLE_BANKS_COUNT]; +extern u8 gActionForBanks[BATTLE_BANKS_COUNT]; +extern u16 gChosenMovesByBanks[BATTLE_BANKS_COUNT]; +extern u8 gFightStateTracker; +extern u8 gLastUsedAbility; extern const u8 gSpeciesNames[][POKEMON_NAME_LENGTH + 1]; extern const struct BattleMove gBattleMoves[]; extern const u16 gUnknown_08C004E0[]; // battle textbox palette extern const struct BgTemplate gUnknown_0831AA08[]; extern const struct WindowTemplate * const gUnknown_0831ABA0[]; +extern const u8 gUnknown_0831ACE0[]; // strings extern const u8 gText_LinkStandby3[]; @@ -94,6 +147,11 @@ extern const u8 gText_BattleYesNoChoice[]; extern const u8 gText_BattleRecordCouldntBeSaved[]; extern const u8 gText_BattleRecordedOnPass[]; extern const u8 gText_ShedinjaJapaneseName[]; +extern const u8 gText_EmptyString3[]; + +// battlescripts +extern const u8 gUnknown_082DB8BE[]; +extern const u8 gUnknown_082DB881[]; extern void HandleLinkBattleSetup(void); // rom_3 extern void SetUpBattleVarsAndBirchZigzagoon(void); // rom_3 @@ -109,6 +167,7 @@ extern void sub_800AC34(void); extern void sub_80B3AF8(u8 taskId); // cable club extern void sub_8076918(u8 bank); extern void sub_80729D0(u8 healthoxSpriteId); +extern void sub_81A56B4(void); // battle frontier 2 // this file's functions static void CB2_InitBattleInternal(void); @@ -133,6 +192,28 @@ static void sub_8039894(struct Sprite *sprite); static void sub_80398D0(struct Sprite *sprite); static void sub_8039A48(struct Sprite *sprite); void sub_8039AF4(struct Sprite *sprite); +void sub_8039E9C(struct Sprite *sprite); +void SpriteCallbackDummy_3(struct Sprite *sprite); +void oac_poke_ally_(struct Sprite *sprite); +void SpecialStatusesClear(void); +void TurnValuesCleanUp(u8); +static void SpriteCB_HealthBoxBounce(struct Sprite *sprite); +static void BattleStartClearSetData(void); +static void BattleIntroGetMonsData(void); +static void BattleIntroPrepareBackgroundSlide(void); +static void BattleIntroDrawTrainersOrMonsSprites(void); +static void BattleIntroDrawPartySummaryScreens(void); +static void BattleIntroPrintTrainerWantsToBattle(void); +static void BattleIntroPrintWildMonAttacked(void); +static void BattleIntroPrintOpponentSendsOut(void); +static void BattleIntroPrintPlayerSendsOut(void); +static void BattleIntroOpponent1SendsOutMonAnimation(void); +static void BattleIntroOpponent2SendsOutMonAnimation(void); +static void BattleIntroRecordMonsToDex(void); +static void BattleIntroPlayer1SendsOutMonAnimation(void); +static void TryDoEventsBeforeFirstTurn(void); +void sub_803BE74(void); +void bc_bs_exec(void); void CB2_InitBattle(void) { @@ -2244,10 +2325,6 @@ static void sub_80398BC(struct Sprite *sprite) // unused? sprite->callback = sub_80398D0; } -extern u32 gUnknown_02022F88; -extern u16 gBattlePartyID[BATTLE_BANKS_COUNT]; -extern u8 gBattleMonForms[BATTLE_BANKS_COUNT]; - static void sub_80398D0(struct Sprite *sprite) { sprite->data4--; @@ -2372,3 +2449,1290 @@ void sub_8039B2C(struct Sprite *sprite) sprite->callback = SpriteCallbackDummy_2; } +void sub_8039B58(struct Sprite *sprite) +{ + if (sprite->affineAnimEnded) + { + if (!(gHitMarker & HITMARKER_NO_ANIMATIONS) || gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_x2000000)) + { + if (HasTwoFramesAnimation(sprite->tSpeciesId)) + StartSpriteAnim(sprite, 1); + } + BattleAnimateFrontSprite(sprite, sprite->tSpeciesId, TRUE, 1); + } +} + +void sub_8039BB4(struct Sprite *sprite) +{ + sprite->callback = oac_poke_ally_; +} + +void oac_poke_ally_(struct Sprite *sprite) +{ + if ((gUnknown_020243FC & 1) == 0) + { + sprite->pos2.x -= 2; + if (sprite->pos2.x == 0) + { + sprite->callback = SpriteCallbackDummy_3; + sprite->data1 = 0; + } + } +} + +void sub_80105DC(struct Sprite *sprite) +{ + sprite->callback = SpriteCallbackDummy_3; +} + +void SpriteCallbackDummy_3(struct Sprite *sprite) +{ +} + +void sub_8039C00(struct Sprite *sprite) +{ + if (!(gUnknown_020243FC & 1)) + { + sprite->pos2.x += sprite->data1; + sprite->pos2.y += sprite->data2; + } +} + +void dp11b_obj_instanciate(u8 bank, u8 b, s8 c, s8 d) +{ + u8 bounceHealthBoxSpriteId; + u8 spriteId2; + + if (b) + { + if (gBattleSpritesDataPtr->healthBoxesData[bank].flag_x2) + return; + } + else + { + if (gBattleSpritesDataPtr->healthBoxesData[bank].flag_x4) + return; + } + + bounceHealthBoxSpriteId = CreateInvisibleSpriteWithCallback(SpriteCB_HealthBoxBounce); + if (b == TRUE) + { + spriteId2 = gHealthBoxesIds[bank]; + gBattleSpritesDataPtr->healthBoxesData[bank].field_2 = bounceHealthBoxSpriteId; + gBattleSpritesDataPtr->healthBoxesData[bank].flag_x2 = 1; + gSprites[bounceHealthBoxSpriteId].data0 = 0x80; + } + else + { + spriteId2 = gBankSpriteIds[bank]; + gBattleSpritesDataPtr->healthBoxesData[bank].field_3 = bounceHealthBoxSpriteId; + gBattleSpritesDataPtr->healthBoxesData[bank].flag_x4 = 1; + gSprites[bounceHealthBoxSpriteId].data0 = 0xC0; + } + gSprites[bounceHealthBoxSpriteId].data1 = c; + gSprites[bounceHealthBoxSpriteId].data2 = d; + gSprites[bounceHealthBoxSpriteId].data3 = spriteId2; + gSprites[bounceHealthBoxSpriteId].data4 = b; + gSprites[spriteId2].pos2.x = 0; + gSprites[spriteId2].pos2.y = 0; +} + +void dp11b_obj_free(u8 bank, bool8 b) +{ + u8 r4; + + if (b == TRUE) + { + if (!gBattleSpritesDataPtr->healthBoxesData[bank].flag_x2) + return; + + r4 = gSprites[gBattleSpritesDataPtr->healthBoxesData[bank].field_2].data3; + DestroySprite(&gSprites[gBattleSpritesDataPtr->healthBoxesData[bank].field_2]); + gBattleSpritesDataPtr->healthBoxesData[bank].flag_x2 = 0; + } + else + { + if (!gBattleSpritesDataPtr->healthBoxesData[bank].flag_x4) + return; + + r4 = gSprites[gBattleSpritesDataPtr->healthBoxesData[bank].field_3].data3; + DestroySprite(&gSprites[gBattleSpritesDataPtr->healthBoxesData[bank].field_3]); + gBattleSpritesDataPtr->healthBoxesData[bank].flag_x4 = 0; + } + gSprites[r4].pos2.x = 0; + gSprites[r4].pos2.y = 0; +} + +static void SpriteCB_HealthBoxBounce(struct Sprite *sprite) +{ + u8 spriteId = sprite->data3; + s32 var; + + if (sprite->data4 == 1) + var = sprite->data0; + else + var = sprite->data0; + + gSprites[spriteId].pos2.y = Sin(var, sprite->data2) + sprite->data2; + sprite->data0 = (sprite->data0 + sprite->data1) & 0xFF; +} + +void sub_8039E44(struct Sprite *sprite) +{ + if (sprite->affineAnimEnded) + BattleAnimateBackSprite(sprite, sprite->tSpeciesId); +} + +void sub_8039E60(struct Sprite *sprite) +{ + sub_8039E9C(sprite); + if (sprite->animEnded) + sprite->callback = SpriteCallbackDummy_3; +} + +void sub_8039E84(struct Sprite *sprite) +{ + StartSpriteAnim(sprite, 1); + sprite->callback = sub_8039E60; +} + +void sub_8039E9C(struct Sprite *sprite) +{ + if (sprite->animDelayCounter == 0) + sprite->centerToCornerVecX = gUnknown_0831ACE0[sprite->animCmdIndex]; +} + +void nullsub_20(void) +{ + +} + +void BeginBattleIntro(void) +{ + BattleStartClearSetData(); + gBattleCommunication[1] = 0; + gBattleMainFunc = BattleIntroGetMonsData; +} + +void BattleMainCB1(void) +{ + gBattleMainFunc(); + + for (gActiveBank = 0; gActiveBank < gNoOfAllBanks; gActiveBank++) + gBattleBankFunc[gActiveBank](); +} + +static void BattleStartClearSetData(void) +{ + s32 i; + u32 j; + u8 *dataPtr; + + TurnValuesCleanUp(0); + SpecialStatusesClear(); + + for (i = 0; i < BATTLE_BANKS_COUNT; i++) + { + gStatuses3[i] = 0; + + dataPtr = (u8 *)&gDisableStructs[i]; + for (j = 0; j < sizeof(struct DisableStruct); j++) + dataPtr[j] = 0; + + gDisableStructs[i].isFirstTurn= 2; + gUnknown_02024284[i] = 0; + gLastUsedMovesByBanks[i] = 0; + gUnknown_02024250[i] = 0; + gUnknown_02024258[i] = 0; + gUnknown_02024260[i] = 0; + gUnknown_02024270[i] = 0xFF; + gLockedMoves[i] = 0; + gUnknownMovesUsedByBanks[i] = 0; + gBattleResources->flags->flags[i] = 0; + gUnknown_02024230[i] = 0; + } + + for (i = 0; i < 2; i++) + { + gSideAffecting[i] = 0; + + dataPtr = (u8 *)&gSideTimers[i]; + for (j = 0; j < sizeof(struct SideTimer); j++) + dataPtr[j] = 0; + } + + gBankAttacker = 0; + gBankTarget = 0; + gBattleWeather = 0; + + dataPtr = (u8 *)&gWishFutureKnock; + for (i = 0; i < sizeof(struct WishFutureKnock); i++) + dataPtr[i] = 0; + + gHitMarker = 0; + + if (!(gBattleTypeFlags & BATTLE_TYPE_RECORDED)) + { + if (!(gBattleTypeFlags & BATTLE_TYPE_LINK) && gSaveBlock2Ptr->optionsBattleSceneOff == TRUE) + gHitMarker |= HITMARKER_NO_ANIMATIONS; + } + else if (!(gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_x2000000)) && sub_8185FB8()) + gHitMarker |= HITMARKER_NO_ANIMATIONS; + + gBattleScripting.battleStyle = gSaveBlock2Ptr->optionsBattleStyle; + + gMultiHitCounter = 0; + gBattleOutcome = 0; + gBattleExecBuffer = 0; + gPaydayMoney = 0; + gBattleResources->battleScriptsStack->size = 0; + gBattleResources->battleCallbackStack->size = 0; + + for (i = 0; i < BATTLE_COMMUNICATION_ENTRIES_COUNT; i++) + gBattleCommunication[i] = 0; + + gPauseCounterBattle = 0; + gBattleMoveDamage = 0; + gUnknown_020243FC = 0; + gBattleScripting.animTurn = 0; + gBattleScripting.animTargetsHit = 0; + gLeveledUpInBattle = 0; + gAbsentBankFlags = 0; + gBattleStruct->field_6C = 0; + gBattleStruct->field_79 = 0; + gBattleStruct->field_7A = 0; + *(&gBattleStruct->field_7C) = gBaseStats[GetMonData(&gEnemyParty[0], MON_DATA_SPECIES)].catchRate * 100 / 1275; + gBattleStruct->field_7B = 3; + gBattleStruct->wildVictorySong = 0; + gBattleStruct->moneyMultiplier = 1; + + for (i = 0; i < 8; i++) + { + *((u8 *)gBattleStruct->mirrorMoves + i) = 0; + *((u8 *)gBattleStruct->usedHeldItems + i) = 0; + *((u8 *)gBattleStruct->choicedMove + i) = 0; + *((u8 *)gBattleStruct->changedItems + i) = 0; + *(i + 0 * 8 + (u8*)(gBattleStruct->mirrorMoveArrays) + 0) = 0; + *(i + 1 * 8 + (u8*)(gBattleStruct->mirrorMoveArrays) + 0) = 0; + *(i + 2 * 8 + (u8*)(gBattleStruct->mirrorMoveArrays) + 0) = 0; + *(i + 3 * 8 + (u8*)(gBattleStruct->mirrorMoveArrays) + 0) = 0; + } + + for (i = 0; i < 4; i++) + { + *(gBattleStruct->field_294 + i) = 6; + } + + gBattleStruct->field_DF = 0; + gBattleStruct->field_92 = 0; + + gRandomTurnNumber = Random(); + + dataPtr = (u8 *)(&gBattleResults); + for (i = 0; i < sizeof(struct BattleResults); i++) + dataPtr[i] = 0; + + gBattleResults.unk5_6 = IsMonShiny(&gEnemyParty[0]); + + gBattleStruct->field_2A0 = 0; + gBattleStruct->field_2A1 = 0; +} + +void SwitchInClearSetData(void) +{ + struct DisableStruct disableStructCopy = gDisableStructs[gActiveBank]; + s32 i; + u8 *ptr; + + if (gBattleMoves[gCurrentMove].effect != EFFECT_BATON_PASS) + { + for (i = 0; i < BATTLE_STATS_NO; i++) + gBattleMons[gActiveBank].statStages[i] = 6; + for (i = 0; i < gNoOfAllBanks; i++) + { + if ((gBattleMons[i].status2 & STATUS2_ESCAPE_PREVENTION) && gDisableStructs[i].bankPreventingEscape == gActiveBank) + gBattleMons[i].status2 &= ~STATUS2_ESCAPE_PREVENTION; + if ((gStatuses3[i] & STATUS3_ALWAYS_HITS) && gDisableStructs[i].bankWithSureHit == gActiveBank) + { + gStatuses3[i] &= ~STATUS3_ALWAYS_HITS; + gDisableStructs[i].bankWithSureHit = 0; + } + } + } + if (gBattleMoves[gCurrentMove].effect == EFFECT_BATON_PASS) + { + gBattleMons[gActiveBank].status2 &= (STATUS2_CONFUSION | STATUS2_FOCUS_ENERGY | STATUS2_SUBSTITUTE | STATUS2_ESCAPE_PREVENTION | STATUS2_CURSED); + gStatuses3[gActiveBank] &= (STATUS3_LEECHSEED_BANK | STATUS3_LEECHSEED | STATUS3_ALWAYS_HITS | STATUS3_PERISH_SONG | STATUS3_ROOTED | STATUS3_MUDSPORT | STATUS3_WATERSPORT); + + for (i = 0; i < gNoOfAllBanks; i++) + { + if (GetBankSide(gActiveBank) != GetBankSide(i) + && (gStatuses3[i] & STATUS3_ALWAYS_HITS) != 0 + && (gDisableStructs[i].bankWithSureHit == gActiveBank)) + { + gStatuses3[i] &= ~STATUS3_ALWAYS_HITS; + gStatuses3[i] |= 0x10; + } + } + } + else + { + gBattleMons[gActiveBank].status2 = 0; + gStatuses3[gActiveBank] = 0; + } + + for (i = 0; i < gNoOfAllBanks; i++) + { + if (gBattleMons[i].status2 & STATUS2_INFATUATED_WITH(gActiveBank)) + gBattleMons[i].status2 &= ~(STATUS2_INFATUATED_WITH(gActiveBank)); + if ((gBattleMons[i].status2 & STATUS2_WRAPPED) && *(gBattleStruct->wrappedBy + i) == gActiveBank) + gBattleMons[i].status2 &= ~(STATUS2_WRAPPED); + } + + gActionSelectionCursor[gActiveBank] = 0; + gMoveSelectionCursor[gActiveBank] = 0; + + ptr = (u8 *)&gDisableStructs[gActiveBank]; + for (i = 0; i < sizeof(struct DisableStruct); i++) + ptr[i] = 0; + + if (gBattleMoves[gCurrentMove].effect == EFFECT_BATON_PASS) + { + gDisableStructs[gActiveBank].substituteHP = disableStructCopy.substituteHP; + gDisableStructs[gActiveBank].bankWithSureHit = disableStructCopy.bankWithSureHit; + gDisableStructs[gActiveBank].perishSong1 = disableStructCopy.perishSong1; + gDisableStructs[gActiveBank].perishSong2 = disableStructCopy.perishSong2; + gDisableStructs[gActiveBank].bankPreventingEscape = disableStructCopy.bankPreventingEscape; + } + + gBattleMoveFlags = 0; + gDisableStructs[gActiveBank].isFirstTurn= 2; + gDisableStructs[gActiveBank].truantUnknownBit = disableStructCopy.truantUnknownBit; + gLastUsedMovesByBanks[gActiveBank] = 0; + gUnknown_02024250[gActiveBank] = 0; + gUnknown_02024258[gActiveBank] = 0; + gUnknown_02024260[gActiveBank] = 0; + gUnknownMovesUsedByBanks[gActiveBank] = 0; + gUnknown_02024270[gActiveBank] = 0xFF; + + *(gBattleStruct->mirrorMoves + gActiveBank * 2 + 0) = 0; + *(gBattleStruct->mirrorMoves + gActiveBank * 2 + 1) = 0; + *(0 * 2 + gActiveBank * 8 + (u8*)(gBattleStruct->mirrorMoveArrays) + 0) = 0; + *(0 * 2 + gActiveBank * 8 + (u8*)(gBattleStruct->mirrorMoveArrays) + 1) = 0; + *(1 * 2 + gActiveBank * 8 + (u8*)(gBattleStruct->mirrorMoveArrays) + 0) = 0; + *(1 * 2 + gActiveBank * 8 + (u8*)(gBattleStruct->mirrorMoveArrays) + 1) = 0; + *(2 * 2 + gActiveBank * 8 + (u8*)(gBattleStruct->mirrorMoveArrays) + 0) = 0; + *(2 * 2 + gActiveBank * 8 + (u8*)(gBattleStruct->mirrorMoveArrays) + 1) = 0; + *(3 * 2 + gActiveBank * 8 + (u8*)(gBattleStruct->mirrorMoveArrays) + 0) = 0; + *(3 * 2 + gActiveBank * 8 + (u8*)(gBattleStruct->mirrorMoveArrays) + 1) = 0; + + gBattleStruct->field_92 &= ~(gBitTable[gActiveBank]); + + for (i = 0; i < gNoOfAllBanks; i++) + { + if (i != gActiveBank && GetBankSide(i) != GetBankSide(gActiveBank)) + { + *(gBattleStruct->mirrorMoves + i * 2 + 0) = 0; + *(gBattleStruct->mirrorMoves + i * 2 + 1) = 0; + } + *(i * 8 + gActiveBank * 2 + (u8*)(gBattleStruct->mirrorMoveArrays) + 0) = 0; + *(i * 8 + gActiveBank * 2 + (u8*)(gBattleStruct->mirrorMoveArrays) + 1) = 0; + } + + *(u8*)((u8*)(&gBattleStruct->choicedMove[gActiveBank]) + 0) = 0; + *(u8*)((u8*)(&gBattleStruct->choicedMove[gActiveBank]) + 1) = 0; + + gBattleResources->flags->flags[gActiveBank] = 0; + gCurrentMove = 0; + gBattleStruct->field_DA = 0xFF; + + ClearBankMoveHistory(gActiveBank); + ClearBankAbilityHistory(gActiveBank); +} + +void FaintClearSetData(void) +{ + s32 i; + u8 *ptr; + + for (i = 0; i < BATTLE_STATS_NO; i++) + gBattleMons[gActiveBank].statStages[i] = 6; + + gBattleMons[gActiveBank].status2 = 0; + gStatuses3[gActiveBank] = 0; + + for (i = 0; i < gNoOfAllBanks; i++) + { + if ((gBattleMons[i].status2 & STATUS2_ESCAPE_PREVENTION) && gDisableStructs[i].bankPreventingEscape == gActiveBank) + gBattleMons[i].status2 &= ~STATUS2_ESCAPE_PREVENTION; + if (gBattleMons[i].status2 & STATUS2_INFATUATED_WITH(gActiveBank)) + gBattleMons[i].status2 &= ~(STATUS2_INFATUATED_WITH(gActiveBank)); + if ((gBattleMons[i].status2 & STATUS2_WRAPPED) && *(gBattleStruct->wrappedBy + i) == gActiveBank) + gBattleMons[i].status2 &= ~(STATUS2_WRAPPED); + } + + gActionSelectionCursor[gActiveBank] = 0; + gMoveSelectionCursor[gActiveBank] = 0; + + ptr = (u8 *)&gDisableStructs[gActiveBank]; + for (i = 0; i < sizeof(struct DisableStruct); i++) + ptr[i] = 0; + + gProtectStructs[gActiveBank].protected = 0; + gProtectStructs[gActiveBank].endured = 0; + gProtectStructs[gActiveBank].onlyStruggle = 0; + gProtectStructs[gActiveBank].helpingHand = 0; + gProtectStructs[gActiveBank].bounceMove = 0; + gProtectStructs[gActiveBank].stealMove = 0; + gProtectStructs[gActiveBank].flag0Unknown = 0; + gProtectStructs[gActiveBank].prlzImmobility = 0; + gProtectStructs[gActiveBank].confusionSelfDmg = 0; + gProtectStructs[gActiveBank].notEffective = 0; + gProtectStructs[gActiveBank].chargingTurn = 0; + gProtectStructs[gActiveBank].fleeFlag = 0; + gProtectStructs[gActiveBank].usedImprisionedMove = 0; + gProtectStructs[gActiveBank].loveImmobility = 0; + gProtectStructs[gActiveBank].usedDisabledMove = 0; + gProtectStructs[gActiveBank].usedTauntedMove = 0; + gProtectStructs[gActiveBank].flag2Unknown = 0; + gProtectStructs[gActiveBank].flinchImmobility = 0; + gProtectStructs[gActiveBank].notFirstStrike = 0; + + gDisableStructs[gActiveBank].isFirstTurn = 2; + + gLastUsedMovesByBanks[gActiveBank] = 0; + gUnknown_02024250[gActiveBank] = 0; + gUnknown_02024258[gActiveBank] = 0; + gUnknown_02024260[gActiveBank] = 0; + gUnknownMovesUsedByBanks[gActiveBank] = 0; + gUnknown_02024270[gActiveBank] = 0xFF; + + *(u8*)((u8*)(&gBattleStruct->choicedMove[gActiveBank]) + 0) = 0; + *(u8*)((u8*)(&gBattleStruct->choicedMove[gActiveBank]) + 1) = 0; + + *(gBattleStruct->mirrorMoves + gActiveBank * 2 + 0) = 0; + *(gBattleStruct->mirrorMoves + gActiveBank * 2 + 1) = 0; + *(0 * 2 + gActiveBank * 8 + (u8*)(gBattleStruct->mirrorMoveArrays) + 0) = 0; + *(0 * 2 + gActiveBank * 8 + (u8*)(gBattleStruct->mirrorMoveArrays) + 1) = 0; + *(1 * 2 + gActiveBank * 8 + (u8*)(gBattleStruct->mirrorMoveArrays) + 0) = 0; + *(1 * 2 + gActiveBank * 8 + (u8*)(gBattleStruct->mirrorMoveArrays) + 1) = 0; + *(2 * 2 + gActiveBank * 8 + (u8*)(gBattleStruct->mirrorMoveArrays) + 0) = 0; + *(2 * 2 + gActiveBank * 8 + (u8*)(gBattleStruct->mirrorMoveArrays) + 1) = 0; + *(3 * 2 + gActiveBank * 8 + (u8*)(gBattleStruct->mirrorMoveArrays) + 0) = 0; + *(3 * 2 + gActiveBank * 8 + (u8*)(gBattleStruct->mirrorMoveArrays) + 1) = 0; + + gBattleStruct->field_92 &= ~(gBitTable[gActiveBank]); + + for (i = 0; i < gNoOfAllBanks; i++) + { + if (i != gActiveBank && GetBankSide(i) != GetBankSide(gActiveBank)) + { + *(gBattleStruct->mirrorMoves + i * 2 + 0) = 0; + *(gBattleStruct->mirrorMoves + i * 2 + 1) = 0; + } + *(i * 8 + gActiveBank * 2 + (u8*)(gBattleStruct->mirrorMoveArrays) + 0) = 0; + *(i * 8 + gActiveBank * 2 + (u8*)(gBattleStruct->mirrorMoveArrays) + 1) = 0; + } + + gBattleResources->flags->flags[gActiveBank] = 0; + + gBattleMons[gActiveBank].type1 = gBaseStats[gBattleMons[gActiveBank].species].type1; + gBattleMons[gActiveBank].type2 = gBaseStats[gBattleMons[gActiveBank].species].type2; + + ClearBankMoveHistory(gActiveBank); + ClearBankAbilityHistory(gActiveBank); +} + +static void BattleIntroGetMonsData(void) +{ + switch (gBattleCommunication[MULTIUSE_STATE]) + { + case 0: + gActiveBank = gBattleCommunication[1]; + EmitGetMonData(0, 0, 0); + MarkBufferBankForExecution(gActiveBank); + gBattleCommunication[MULTIUSE_STATE]++; + break; + case 1: + if (gBattleExecBuffer == 0) + { + gBattleCommunication[1]++; + if (gBattleCommunication[1] == gNoOfAllBanks) + gBattleMainFunc = BattleIntroPrepareBackgroundSlide; + else + gBattleCommunication[MULTIUSE_STATE] = 0; + } + break; + } +} + +static void BattleIntroPrepareBackgroundSlide(void) +{ + if (gBattleExecBuffer == 0) + { + gActiveBank = GetBankByIdentity(0); + EmitIntroSlide(0, gBattleTerrain); + MarkBufferBankForExecution(gActiveBank); + gBattleMainFunc = BattleIntroDrawTrainersOrMonsSprites; + gBattleCommunication[0] = 0; + gBattleCommunication[1] = 0; + } +} + +static void BattleIntroDrawTrainersOrMonsSprites(void) +{ + u8 *ptr; + s32 i; + + if (gBattleExecBuffer) + return; + + for (gActiveBank = 0; gActiveBank < gNoOfAllBanks; gActiveBank++) + { + if ((gBattleTypeFlags & BATTLE_TYPE_SAFARI) + && GetBankSide(gActiveBank) == SIDE_PLAYER) + { + ptr = (u8 *)&gBattleMons[gActiveBank]; + for (i = 0; i < sizeof(struct BattlePokemon); i++) + ptr[i] = 0; + } + else + { + u16* hpOnSwitchout; + + ptr = (u8 *)&gBattleMons[gActiveBank]; + for (i = 0; i < sizeof(struct BattlePokemon); i++) + ptr[i] = gBattleBufferB[gActiveBank][4 + i]; + + gBattleMons[gActiveBank].type1 = gBaseStats[gBattleMons[gActiveBank].species].type1; + gBattleMons[gActiveBank].type2 = gBaseStats[gBattleMons[gActiveBank].species].type2; + gBattleMons[gActiveBank].ability = GetAbilityBySpecies(gBattleMons[gActiveBank].species, gBattleMons[gActiveBank].altAbility); + hpOnSwitchout = &gBattleStruct->hpOnSwitchout[GetBankSide(gActiveBank)]; + *hpOnSwitchout = gBattleMons[gActiveBank].hp; + for (i = 0; i < BATTLE_STATS_NO; i++) + gBattleMons[gActiveBank].statStages[i] = 6; + gBattleMons[gActiveBank].status2 = 0; + } + + if (GetBankIdentity(gActiveBank) == IDENTITY_PLAYER_MON1) + { + EmitDrawTrainerPic(0); + MarkBufferBankForExecution(gActiveBank); + } + + if (gBattleTypeFlags & BATTLE_TYPE_TRAINER) + { + if (GetBankIdentity(gActiveBank) == IDENTITY_OPPONENT_MON1) + { + EmitDrawTrainerPic(0); + MarkBufferBankForExecution(gActiveBank); + } + if (GetBankSide(gActiveBank) == SIDE_OPPONENT + && !(gBattleTypeFlags & (BATTLE_TYPE_EREADER_TRAINER + | BATTLE_TYPE_FRONTIER + | BATTLE_TYPE_LINK + | BATTLE_TYPE_x2000000 + | BATTLE_TYPE_x4000000))) + { + HandleSetPokedexFlag(SpeciesToNationalPokedexNum(gBattleMons[gActiveBank].species), FLAG_SET_SEEN, gBattleMons[gActiveBank].personality); + } + } + else + { + if (GetBankSide(gActiveBank) == SIDE_OPPONENT) + { + if (!(gBattleTypeFlags & (BATTLE_TYPE_EREADER_TRAINER + | BATTLE_TYPE_FRONTIER + | BATTLE_TYPE_LINK + | BATTLE_TYPE_x2000000 + | BATTLE_TYPE_x4000000))) + { + HandleSetPokedexFlag(SpeciesToNationalPokedexNum(gBattleMons[gActiveBank].species), FLAG_SET_SEEN, gBattleMons[gActiveBank].personality); + } + EmitLoadMonSprite(0); + MarkBufferBankForExecution(gActiveBank); + gBattleResults.lastOpponentSpecies = GetMonData(&gEnemyParty[gBattlePartyID[gActiveBank]], MON_DATA_SPECIES, NULL); + } + } + + if (gBattleTypeFlags & BATTLE_TYPE_MULTI) + { + if (GetBankIdentity(gActiveBank) == IDENTITY_PLAYER_MON2 + || GetBankIdentity(gActiveBank) == IDENTITY_OPPONENT_MON2) + { + EmitDrawTrainerPic(0); + MarkBufferBankForExecution(gActiveBank); + } + } + + if (gBattleTypeFlags & BATTLE_TYPE_TWO_OPPONENTS && GetBankIdentity(gActiveBank) == IDENTITY_OPPONENT_MON2) + { + EmitDrawTrainerPic(0); + MarkBufferBankForExecution(gActiveBank); + } + + if (gBattleTypeFlags & BATTLE_TYPE_ARENA) + sub_81A56B4(); + } + gBattleMainFunc = BattleIntroDrawPartySummaryScreens; +} + +static void BattleIntroDrawPartySummaryScreens(void) +{ + s32 i; + struct HpAndStatus hpStatus[6]; + + if (gBattleExecBuffer) + return; + + if (gBattleTypeFlags & BATTLE_TYPE_TRAINER) + { + for (i = 0; i < 6; i++) + { + if (GetMonData(&gEnemyParty[i], MON_DATA_SPECIES2) == SPECIES_NONE + || GetMonData(&gEnemyParty[i], MON_DATA_SPECIES2) == SPECIES_EGG) + { + hpStatus[i].hp = 0xFFFF; + hpStatus[i].status = 0; + } + else + { + hpStatus[i].hp = GetMonData(&gEnemyParty[i], MON_DATA_HP); + hpStatus[i].status = GetMonData(&gEnemyParty[i], MON_DATA_STATUS); + } + } + gActiveBank = GetBankByIdentity(IDENTITY_OPPONENT_MON1); + EmitDrawPartyStatusSummary(0, hpStatus, 0x80); + MarkBufferBankForExecution(gActiveBank); + + for (i = 0; i < 6; i++) + { + if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2) == SPECIES_NONE + || GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2) == SPECIES_EGG) + { + hpStatus[i].hp = 0xFFFF; + hpStatus[i].status = 0; + } + else + { + hpStatus[i].hp = GetMonData(&gPlayerParty[i], MON_DATA_HP); + hpStatus[i].status = GetMonData(&gPlayerParty[i], MON_DATA_STATUS); + } + } + gActiveBank = GetBankByIdentity(IDENTITY_PLAYER_MON1); + EmitDrawPartyStatusSummary(0, hpStatus, 0x80); + MarkBufferBankForExecution(gActiveBank); + + gBattleMainFunc = BattleIntroPrintTrainerWantsToBattle; + } + else + { + // The struct gets set here, but nothing is ever done with it since + // wild battles don't show the party summary. + // Still, there's no point in having dead code. + + for (i = 0; i < 6; i++) + { + if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2) == SPECIES_NONE + || GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2) == SPECIES_EGG) + { + hpStatus[i].hp = 0xFFFF; + hpStatus[i].status = 0; + } + else + { + hpStatus[i].hp = GetMonData(&gPlayerParty[i], MON_DATA_HP); + hpStatus[i].status = GetMonData(&gPlayerParty[i], MON_DATA_STATUS); + } + } + + gBattleMainFunc = BattleIntroPrintWildMonAttacked; + } + +} + +static void BattleIntroPrintTrainerWantsToBattle(void) +{ + if (gBattleExecBuffer == 0) + { + gActiveBank = GetBankByIdentity(IDENTITY_OPPONENT_MON1); + PrepareStringBattle(0, gActiveBank); + gBattleMainFunc = BattleIntroPrintOpponentSendsOut; + } +} + +static void BattleIntroPrintWildMonAttacked(void) +{ + if (gBattleExecBuffer == 0) + { + gBattleMainFunc = BattleIntroPrintPlayerSendsOut; + PrepareStringBattle(0, 0); + } +} + +static void BattleIntroPrintOpponentSendsOut(void) +{ + u32 identity; + + if (gBattleExecBuffer) + return; + + if (!(gBattleTypeFlags & BATTLE_TYPE_RECORDED)) + identity = IDENTITY_OPPONENT_MON1; + else if (gBattleTypeFlags & BATTLE_TYPE_x2000000) + { + if (gBattleTypeFlags & BATTLE_TYPE_x80000000) + identity = IDENTITY_OPPONENT_MON1; + else + identity = IDENTITY_PLAYER_MON1; + } + else + identity = IDENTITY_OPPONENT_MON1; + + PrepareStringBattle(1, GetBankByIdentity(identity)); + gBattleMainFunc = BattleIntroOpponent1SendsOutMonAnimation; +} + +static void BattleIntroOpponent2SendsOutMonAnimation(void) +{ + u32 identity; + + if (!(gBattleTypeFlags & BATTLE_TYPE_RECORDED)) + identity = IDENTITY_OPPONENT_MON2; + else if (gBattleTypeFlags & BATTLE_TYPE_x2000000) + { + if (gBattleTypeFlags & BATTLE_TYPE_x80000000) + identity = IDENTITY_OPPONENT_MON2; + else + identity = IDENTITY_PLAYER_MON2; + } + else + identity = IDENTITY_OPPONENT_MON2; + + for (gActiveBank = 0; gActiveBank < gNoOfAllBanks; gActiveBank++) + { + if (GetBankIdentity(gActiveBank) == identity) + { + EmitIntroTrainerBallThrow(0); + MarkBufferBankForExecution(gActiveBank); + } + } + + gBattleMainFunc = BattleIntroRecordMonsToDex; +} + +#ifdef NONMATCHING +static void BattleIntroOpponent1SendsOutMonAnimation(void) +{ + u32 identity; + + if (!(gBattleTypeFlags & BATTLE_TYPE_RECORDED)) + identity = IDENTITY_OPPONENT_MON1; + else if (gBattleTypeFlags & BATTLE_TYPE_x2000000) + { + if (gBattleTypeFlags & BATTLE_TYPE_x80000000) + identity = IDENTITY_OPPONENT_MON1; + else + identity = IDENTITY_PLAYER_MON1; + } + else + identity = IDENTITY_OPPONENT_MON1; + + if (gBattleExecBuffer) + return; + + for (gActiveBank = 0; gActiveBank < gNoOfAllBanks; gActiveBank++) + { + if (GetBankIdentity(gActiveBank) == identity) + { + EmitIntroTrainerBallThrow(0); + MarkBufferBankForExecution(gActiveBank); + if (gBattleTypeFlags & (BATTLE_TYPE_MULTI | BATTLE_TYPE_TWO_OPPONENTS)) + { + gBattleMainFunc = BattleIntroOpponent2SendsOutMonAnimation; + return; + } + } + } + + gBattleMainFunc = BattleIntroRecordMonsToDex; +} + +#else +__attribute__((naked)) +static void BattleIntroOpponent1SendsOutMonAnimation(void) +{ + asm(".syntax unified\n\ + push {r4-r6,lr}\n\ + ldr r0, =gBattleTypeFlags\n\ + ldr r2, [r0]\n\ + movs r0, 0x80\n\ + lsls r0, 17\n\ + ands r0, r2\n\ + cmp r0, 0\n\ + beq _0803B298\n\ + movs r0, 0x80\n\ + lsls r0, 18\n\ + ands r0, r2\n\ + cmp r0, 0\n\ + beq _0803B298\n\ + movs r1, 0x80\n\ + lsls r1, 24\n\ + ands r1, r2\n\ + negs r0, r1\n\ + orrs r0, r1\n\ + lsrs r5, r0, 31\n\ + b _0803B29A\n\ + .pool\n\ +_0803B288:\n\ + ldr r1, =gBattleMainFunc\n\ + ldr r0, =BattleIntroOpponent2SendsOutMonAnimation\n\ + b _0803B2F0\n\ + .pool\n\ +_0803B298:\n\ + movs r5, 0x1\n\ +_0803B29A:\n\ + ldr r0, =gBattleExecBuffer\n\ + ldr r2, [r0]\n\ + cmp r2, 0\n\ + bne _0803B2F2\n\ + ldr r0, =gActiveBank\n\ + strb r2, [r0]\n\ + ldr r1, =gNoOfAllBanks\n\ + adds r4, r0, 0\n\ + ldrb r1, [r1]\n\ + cmp r2, r1\n\ + bcs _0803B2EC\n\ + adds r6, r4, 0\n\ +_0803B2B2:\n\ + ldrb r0, [r4]\n\ + bl GetBankIdentity\n\ + lsls r0, 24\n\ + lsrs r0, 24\n\ + cmp r0, r5\n\ + bne _0803B2D8\n\ + movs r0, 0\n\ + bl EmitIntroTrainerBallThrow\n\ + ldrb r0, [r4]\n\ + bl MarkBufferBankForExecution\n\ + ldr r0, =gBattleTypeFlags\n\ + ldr r0, [r0]\n\ + ldr r1, =0x00008040\n\ + ands r0, r1\n\ + cmp r0, 0\n\ + bne _0803B288\n\ +_0803B2D8:\n\ + ldrb r0, [r6]\n\ + adds r0, 0x1\n\ + strb r0, [r6]\n\ + ldr r1, =gNoOfAllBanks\n\ + lsls r0, 24\n\ + lsrs r0, 24\n\ + ldr r4, =gActiveBank\n\ + ldrb r1, [r1]\n\ + cmp r0, r1\n\ + bcc _0803B2B2\n\ +_0803B2EC:\n\ + ldr r1, =gBattleMainFunc\n\ + ldr r0, =BattleIntroRecordMonsToDex\n\ +_0803B2F0:\n\ + str r0, [r1]\n\ +_0803B2F2:\n\ + pop {r4-r6}\n\ + pop {r0}\n\ + bx r0\n\ + .pool\n\ + .syntax divided"); +} + +#endif // NONMATCHING + +static void BattleIntroRecordMonsToDex(void) +{ + if (gBattleExecBuffer == 0) + { + for (gActiveBank = 0; gActiveBank < gNoOfAllBanks; gActiveBank++) + { + if (GetBankSide(gActiveBank) == SIDE_OPPONENT + && !(gBattleTypeFlags & (BATTLE_TYPE_EREADER_TRAINER + | BATTLE_TYPE_FRONTIER + | BATTLE_TYPE_LINK + | BATTLE_TYPE_x2000000 + | BATTLE_TYPE_x4000000))) + { + HandleSetPokedexFlag(SpeciesToNationalPokedexNum(gBattleMons[gActiveBank].species), FLAG_SET_SEEN, gBattleMons[gActiveBank].personality); + } + } + gBattleMainFunc = BattleIntroPrintPlayerSendsOut; + } +} + +void sub_803B3AC(void) // unused +{ + if (gBattleExecBuffer == 0) + gBattleMainFunc = BattleIntroPrintPlayerSendsOut; +} + +static void BattleIntroPrintPlayerSendsOut(void) +{ + if (gBattleExecBuffer == 0) + { + u8 identity; + + if (!(gBattleTypeFlags & BATTLE_TYPE_RECORDED)) + identity = IDENTITY_PLAYER_MON1; + else if (gBattleTypeFlags & BATTLE_TYPE_x2000000) + { + if (gBattleTypeFlags & BATTLE_TYPE_x80000000) + identity = IDENTITY_PLAYER_MON1; + else + identity = IDENTITY_OPPONENT_MON1; + } + else + identity = IDENTITY_PLAYER_MON1; + + if (!(gBattleTypeFlags & BATTLE_TYPE_SAFARI)) + PrepareStringBattle(1, GetBankByIdentity(identity)); + + gBattleMainFunc = BattleIntroPlayer1SendsOutMonAnimation; + } +} + +static void BattleIntroPlayer2SendsOutMonAnimation(void) +{ + u32 identity; + + if (!(gBattleTypeFlags & BATTLE_TYPE_RECORDED)) + identity = IDENTITY_PLAYER_MON2; + else if (gBattleTypeFlags & BATTLE_TYPE_x2000000) + { + if (gBattleTypeFlags & BATTLE_TYPE_x80000000) + identity = IDENTITY_PLAYER_MON2; + else + identity = IDENTITY_OPPONENT_MON2; + } + else + identity = IDENTITY_PLAYER_MON2; + + for (gActiveBank = 0; gActiveBank < gNoOfAllBanks; gActiveBank++) + { + if (GetBankIdentity(gActiveBank) == identity) + { + EmitIntroTrainerBallThrow(0); + MarkBufferBankForExecution(gActiveBank); + } + } + + gBattleStruct->switchInAbilitiesCounter = 0; + gBattleStruct->switchInItemsCounter = 0; + gBattleStruct->overworldWeatherDone = FALSE; + + gBattleMainFunc = TryDoEventsBeforeFirstTurn; +} + +static void BattleIntroPlayer1SendsOutMonAnimation(void) +{ + u32 identity; + + if (!(gBattleTypeFlags & BATTLE_TYPE_RECORDED)) + identity = IDENTITY_PLAYER_MON1; + else if (gBattleTypeFlags & BATTLE_TYPE_x2000000) + { + if (gBattleTypeFlags & BATTLE_TYPE_x80000000) + identity = IDENTITY_PLAYER_MON1; + else + identity = IDENTITY_OPPONENT_MON1; + } + else + identity = IDENTITY_PLAYER_MON1; + + if (gBattleExecBuffer) + return; + + for (gActiveBank = 0; gActiveBank < gNoOfAllBanks; gActiveBank++) + { + if (GetBankIdentity(gActiveBank) == identity) + { + EmitIntroTrainerBallThrow(0); + MarkBufferBankForExecution(gActiveBank); + if (gBattleTypeFlags & (BATTLE_TYPE_MULTI)) + { + gBattleMainFunc = BattleIntroPlayer2SendsOutMonAnimation; + return; + } + } + } + + gBattleStruct->switchInAbilitiesCounter = 0; + gBattleStruct->switchInItemsCounter = 0; + gBattleStruct->overworldWeatherDone = FALSE; + + gBattleMainFunc = TryDoEventsBeforeFirstTurn; +} + +void sub_803B598(void) // unused +{ + if (gBattleExecBuffer == 0) + { + for (gActiveBank = 0; gActiveBank < gNoOfAllBanks; gActiveBank++) + { + if (GetBankSide(gActiveBank) == SIDE_PLAYER) + { + EmitSwitchInAnim(0, gBattlePartyID[gActiveBank], FALSE); + MarkBufferBankForExecution(gActiveBank); + } + } + + gBattleStruct->switchInAbilitiesCounter = 0; + gBattleStruct->switchInItemsCounter = 0; + gBattleStruct->overworldWeatherDone = FALSE; + + gBattleMainFunc = TryDoEventsBeforeFirstTurn; + } +} + +static void TryDoEventsBeforeFirstTurn(void) +{ + s32 i; + s32 j; + u8 effect = 0; + + if (gBattleExecBuffer) + return; + + if (gBattleStruct->switchInAbilitiesCounter == 0) + { + for (i = 0; i < gNoOfAllBanks; i++) + gTurnOrder[i] = i; + for (i = 0; i < gNoOfAllBanks - 1; i++) + { + for (j = i + 1; j < gNoOfAllBanks; j++) + { + if (GetWhoStrikesFirst(gTurnOrder[i], gTurnOrder[j], TRUE) != 0) + sub_803CEDC(i, j); + } + } + } + if (!gBattleStruct->overworldWeatherDone + && AbilityBattleEffects(0, 0, 0, ABILITYEFFECT_SWITCH_IN_WEATHER, 0) != 0) + { + gBattleStruct->overworldWeatherDone = TRUE; + return; + } + // check all switch in abilities happening from the fastest mon to slowest + while (gBattleStruct->switchInAbilitiesCounter < gNoOfAllBanks) + { + if (AbilityBattleEffects(ABILITYEFFECT_ON_SWITCHIN, gTurnOrder[gBattleStruct->switchInAbilitiesCounter], 0, 0, 0) != 0) + effect++; + + gBattleStruct->switchInAbilitiesCounter++; + + if (effect) + return; + } + if (AbilityBattleEffects(ABILITYEFFECT_INTIMIDATE1, 0, 0, 0, 0) != 0) + return; + if (AbilityBattleEffects(ABILITYEFFECT_TRACE, 0, 0, 0, 0) != 0) + return; + // check all switch in items having effect from the fastest mon to slowest + while (gBattleStruct->switchInItemsCounter < gNoOfAllBanks) + { + if (ItemBattleEffects(ITEMEFFECT_ON_SWITCH_IN, gTurnOrder[gBattleStruct->switchInItemsCounter], 0) != 0) + effect++; + + gBattleStruct->switchInItemsCounter++; + + if (effect) + return; + } + for (i = 0; i < BATTLE_BANKS_COUNT; i++) + { + *(gBattleStruct->field_5C + i) = 6; + gActionForBanks[i] = 0xFF; + gChosenMovesByBanks[i] = 0; + } + TurnValuesCleanUp(0); + SpecialStatusesClear(); + *(&gBattleStruct->field_91) = gAbsentBankFlags; + sub_814F9EC(gText_EmptyString3, 0); + gBattleMainFunc = sub_803BE74; + ResetSentPokesToOpponentValue(); + + for (i = 0; i < BATTLE_COMMUNICATION_ENTRIES_COUNT; i++) + gBattleCommunication[i] = 0; + + for (i = 0; i < gNoOfAllBanks; i++) + gBattleMons[i].status2 &= ~(STATUS2_FLINCHED); + + *(&gBattleStruct->turnEffectsTracker) = 0; + *(&gBattleStruct->turnEffectsBank) = 0; + *(&gBattleStruct->field_1A0) = 0; + *(&gBattleStruct->field_1A1) = 0; + gBattleScripting.atk49_state = 0; + gBattleStruct->field_4D = 0; + gBattleStruct->turncountersTracker = 0; + gBattleMoveFlags = 0; + + gRandomTurnNumber = Random(); + + if (gBattleTypeFlags & BATTLE_TYPE_ARENA) + { + StopCryAndClearCrySongs(); + BattleScriptExecute(gUnknown_082DB8BE); + } +} + +void HandleEndTurn_ContinueBattle(void) +{ + s32 i; + + if (gBattleExecBuffer == 0) + { + gBattleMainFunc = BattleTurnPassed; + for (i = 0; i < BATTLE_COMMUNICATION_ENTRIES_COUNT; i++) + gBattleCommunication[i] = 0; + for (i = 0; i < gNoOfAllBanks; i++) + { + gBattleMons[i].status2 &= ~(STATUS2_FLINCHED); + if ((gBattleMons[i].status1 & STATUS_SLEEP) && (gBattleMons[i].status2 & STATUS2_MULTIPLETURNS)) + CancelMultiTurnMoves(i); + } + gBattleStruct->turnEffectsTracker = 0; + gBattleStruct->turnEffectsBank = 0; + gBattleStruct->field_1A0 = 0; + gBattleStruct->field_1A1 = 0; + gBattleStruct->turncountersTracker = 0; + gBattleMoveFlags = 0; + } +} + +void BattleTurnPassed(void) +{ + s32 i; + + TurnValuesCleanUp(1); + if (gBattleOutcome == 0) + { + if (UpdateTurnCounters() != 0) + return; + if (TurnBasedEffects() != 0) + return; + } + if (sub_8041728() != 0) + return; + gBattleStruct->field_4D = 0; + if (sub_8041364() != 0) + return; + + TurnValuesCleanUp(0); + gHitMarker &= ~(HITMARKER_NO_ATTACKSTRING); + gHitMarker &= ~(HITMARKER_UNABLE_TO_USE_MOVE); + gHitMarker &= ~(HITMARKER_x400000); + gHitMarker &= ~(HITMARKER_x100000); + gBattleScripting.animTurn = 0; + gBattleScripting.animTargetsHit = 0; + gBattleScripting.atk49_state = 0; + gBattleMoveDamage = 0; + gBattleMoveFlags = 0; + + for (i = 0; i < 5; i++) + gBattleCommunication[i] = 0; + + if (gBattleOutcome != 0) + { + gFightStateTracker = 12; + gBattleMainFunc = bc_bs_exec; + return; + } + + if (gBattleResults.battleTurnCounter < 0xFF) + { + gBattleResults.battleTurnCounter++; + gBattleStruct->field_DA++; + } + + for (i = 0; i < gNoOfAllBanks; i++) + { + gActionForBanks[i] = 0xFF; + gChosenMovesByBanks[i] = 0; + } + + for (i = 0; i < 4; i++) + *(gBattleStruct->field_5C + i) = 6; + + *(&gBattleStruct->field_91) = gAbsentBankFlags; + sub_814F9EC(gText_EmptyString3, 0); + gBattleMainFunc = sub_803BE74; + gRandomTurnNumber = Random(); + + if (gBattleTypeFlags & BATTLE_TYPE_PALACE) + BattleScriptExecute(gUnknown_082DB881); + else if (gBattleTypeFlags & BATTLE_TYPE_ARENA && gBattleStruct->field_DA == 0) + BattleScriptExecute(gUnknown_082DB8BE); +} + +u8 IsRunningFromBattleImpossible(void) +{ + u8 holdEffect; + u8 side; + s32 i; + + if (gBattleMons[gActiveBank].item == ITEM_ENIGMA_BERRY) + holdEffect = gEnigmaBerries[gActiveBank].holdEffect; + else + holdEffect = ItemId_GetHoldEffect(gBattleMons[gActiveBank].item); + + gStringBank = gActiveBank; + + if (holdEffect == HOLD_EFFECT_CAN_ALWAYS_RUN) + return 0; + if (gBattleTypeFlags & BATTLE_TYPE_LINK) + return 0; + if (gBattleMons[gActiveBank].ability == ABILITY_RUN_AWAY) + return 0; + + side = GetBankSide(gActiveBank); + + for (i = 0; i < gNoOfAllBanks; i++) + { + if (side != GetBankSide(i) + && gBattleMons[i].ability == ABILITY_SHADOW_TAG) + { + gBattleScripting.bank = i; + gLastUsedAbility = gBattleMons[i].ability; + gBattleCommunication[MULTISTRING_CHOOSER] = 2; + return 2; + } + if (side != GetBankSide(i) + && gBattleMons[gActiveBank].ability != ABILITY_LEVITATE + && gBattleMons[gActiveBank].type1 != TYPE_FLYING + && gBattleMons[gActiveBank].type2 != TYPE_FLYING + && gBattleMons[i].ability == ABILITY_ARENA_TRAP) + { + gBattleScripting.bank = i; + gLastUsedAbility = gBattleMons[i].ability; + gBattleCommunication[MULTISTRING_CHOOSER] = 2; + return 2; + } + } + i = AbilityBattleEffects(ABILITYEFFECT_CHECK_FIELD_EXCEPT_BANK, gActiveBank, ABILITY_MAGNET_PULL, 0, 0); + if (i != 0 && (gBattleMons[gActiveBank].type1 == TYPE_STEEL || gBattleMons[gActiveBank].type2 == TYPE_STEEL)) + { + gBattleScripting.bank = i - 1; + gLastUsedAbility = gBattleMons[i - 1].ability; + gBattleCommunication[MULTISTRING_CHOOSER] = 2; + return 2; + } + if ((gBattleMons[gActiveBank].status2 & (STATUS2_ESCAPE_PREVENTION | STATUS2_WRAPPED)) + || (gStatuses3[gActiveBank] & STATUS3_ROOTED)) + { + gBattleCommunication[MULTISTRING_CHOOSER] = 0; + return 1; + } + if (gBattleTypeFlags & BATTLE_TYPE_FIRST_BATTLE) + { + gBattleCommunication[MULTISTRING_CHOOSER] = 1; + return 1; + } + return 0; +} diff --git a/src/battle_3.c b/src/battle_3.c index e42d9317d..071e4d59d 100644 --- a/src/battle_3.c +++ b/src/battle_3.c @@ -178,9 +178,6 @@ extern const u8 gStatusConditionString_ConfusionJpn[]; extern const u8 gStatusConditionString_LoveJpn[]; extern const u16 gSoundMovesTable[]; -extern u8 b_first_side(u8, u8, u8); -extern void sub_803CEDC(u8, u8); -extern void BattleTurnPassed(void); extern void sub_803F9EC(); extern bool8 sub_80423F4(u8 bank, u8, u8); extern u8 weather_get_current(void); @@ -414,7 +411,7 @@ u8 UpdateTurnCounters(void) s32 j; for (j = i + 1; j < gNoOfAllBanks; j++) { - if (b_first_side(gTurnOrder[i], gTurnOrder[j], 0)) + if (GetWhoStrikesFirst(gTurnOrder[i], gTurnOrder[j], 0)) sub_803CEDC(i, j); } } @@ -1667,7 +1664,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 bank, u8 ability, u8 special, u16 moveArg) gBankAttacker = bank; switch (gLastUsedAbility) { - case 0xFF: //weather from overworld + case ABILITYEFFECT_SWITCH_IN_WEATHER: //_08042A86 switch (weather_get_current()) { diff --git a/src/battle_ai_script_commands.c b/src/battle_ai_script_commands.c index dae43f13c..92126e40c 100644 --- a/src/battle_ai_script_commands.c +++ b/src/battle_ai_script_commands.c @@ -73,7 +73,7 @@ extern const struct BaseStats gBaseStats[]; extern const u32 gBitTable[]; extern u8 * const gBattleAI_ScriptsTable[]; -extern u8 b_first_side(u8, u8, u8); +extern u8 GetWhoStrikesFirst(u8, u8, u8); extern void AI_CalcDmg(u8, u8); extern u8 CheckMoveLimitations(); @@ -1756,7 +1756,7 @@ static void BattleAICmd_if_arg_not_equal(void) static void BattleAICmd_if_would_go_first(void) { - if (b_first_side(sBank_AI, gBankTarget, 1) == gAIScriptPtr[1]) + if (GetWhoStrikesFirst(sBank_AI, gBankTarget, 1) == gAIScriptPtr[1]) gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 2); else gAIScriptPtr += 6; @@ -1764,7 +1764,7 @@ static void BattleAICmd_if_would_go_first(void) static void BattleAICmd_if_would_not_go_first(void) { - if (b_first_side(sBank_AI, gBankTarget, 1) != gAIScriptPtr[1]) + if (GetWhoStrikesFirst(sBank_AI, gBankTarget, 1) != gAIScriptPtr[1]) gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 2); else gAIScriptPtr += 6; diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 03e1b6a4a..88c62841d 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -360,7 +360,7 @@ static void atk5D_getmoneyreward(void); static void atk5E_8025A70(void); static void atk5F_8025B24(void); static void atk60_increment_gamestat(void); -static void atk61_8025BA4(void); +static void atk61_draw_party_status_summary(void); static void atk62_08025C6C(void); static void atk63_jumptorandomattack(void); static void atk64_statusanimation(void); @@ -612,7 +612,7 @@ void (* const gBattleScriptingCommandsTable[])(void) = atk5E_8025A70, atk5F_8025B24, atk60_increment_gamestat, - atk61_8025BA4, + atk61_draw_party_status_summary, atk62_08025C6C, atk63_jumptorandomattack, atk64_statusanimation, @@ -3251,7 +3251,7 @@ static void atk1B_faint_effects_clear(void) MarkBufferBankForExecution(gActiveBank); } - UndoEffectsAfterFainting(); // Effects like attractions, trapping, etc. + FaintClearSetData(); // Effects like attractions, trapping, etc. gBattlescriptCurrInstr += 2; } } @@ -5366,7 +5366,7 @@ static void atk4D_switch_data_update(void) gBattleMons[gActiveBank].status2 = oldData.status2; } - SwitchInClearStructs(); + SwitchInClearSetData(); if (gBattleTypeFlags & BATTLE_TYPE_PALACE && gBattleMons[gActiveBank].maxHP / 2 >= gBattleMons[gActiveBank].hp && gBattleMons[gActiveBank].hp != 0 && !(gBattleMons[gActiveBank].status1 & STATUS_SLEEP)) @@ -6411,7 +6411,7 @@ static void atk60_increment_gamestat(void) gBattlescriptCurrInstr += 2; } -static void atk61_8025BA4(void) +static void atk61_draw_party_status_summary(void) { s32 i; struct Pokemon* party; @@ -6442,7 +6442,7 @@ static void atk61_8025BA4(void) } } - EmitCmd48(0, hpStatuses, 1); + EmitDrawPartyStatusSummary(0, hpStatuses, 1); MarkBufferBankForExecution(gActiveBank); gBattlescriptCurrInstr += 2; diff --git a/src/pokemon_3.c b/src/pokemon_3.c index e4934306c..5ff99aee2 100644 --- a/src/pokemon_3.c +++ b/src/pokemon_3.c @@ -1519,8 +1519,6 @@ void BattleAnimateFrontSprite(struct Sprite* sprite, u16 species, bool8 noCry, u DoMonFrontSpriteAnimation(sprite, species, noCry, arg3); } -bool8 HasTwoFramesAnimation(u16 species); - extern void SpriteCallbackDummy_2(struct Sprite*); extern void sub_817F60C(struct Sprite*); diff --git a/sym_ewram.txt b/sym_ewram.txt index aecb28dac..287bc4a5d 100644 --- a/sym_ewram.txt +++ b/sym_ewram.txt @@ -445,7 +445,7 @@ gPauseCounterBattle: @ 202432C gPaydayMoney: @ 202432E .space 0x2 -gUnknown_02024330: @ 2024330 +gRandomTurnNumber: @ 2024330 .space 0x2 gBattleCommunication: @ 2024332 @@ -499,10 +499,10 @@ gUnknown_020244A4: @ 20244A4 gBattleResources: @ 20244A8 .space 0x4 -gUnknown_020244AC: @ 20244AC +gActionSelectionCursor: @ 20244AC .space 0x4 -gUnknown_020244B0: @ 20244B0 +gMoveSelectionCursor: @ 20244B0 .space 0x4 gUnknown_020244B4: @ 20244B4 From d43b6227bb5a81a4479ad0ecc33d661910c85d74 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Mon, 2 Oct 2017 20:53:58 -0400 Subject: [PATCH 22/42] Rip tileset anims --- data/tileset.s | 304 ++++++++---------- data/tilesets/primary/building/anim/0.png | Bin 0 -> 141 bytes data/tilesets/primary/building/anim/1.png | Bin 0 -> 144 bytes data/tilesets/primary/general/anim/0/0.png | Bin 0 -> 183 bytes data/tilesets/primary/general/anim/0/1.png | Bin 0 -> 182 bytes data/tilesets/primary/general/anim/0/2.png | Bin 0 -> 183 bytes data/tilesets/primary/general/anim/1/0.png | Bin 0 -> 518 bytes data/tilesets/primary/general/anim/1/1.png | Bin 0 -> 581 bytes data/tilesets/primary/general/anim/1/2.png | Bin 0 -> 534 bytes data/tilesets/primary/general/anim/1/3.png | Bin 0 -> 527 bytes data/tilesets/primary/general/anim/1/4.png | Bin 0 -> 461 bytes data/tilesets/primary/general/anim/1/5.png | Bin 0 -> 460 bytes data/tilesets/primary/general/anim/1/6.png | Bin 0 -> 480 bytes data/tilesets/primary/general/anim/1/7.png | Bin 0 -> 521 bytes data/tilesets/primary/general/anim/2/0.png | Bin 0 -> 194 bytes data/tilesets/primary/general/anim/2/1.png | Bin 0 -> 243 bytes data/tilesets/primary/general/anim/2/2.png | Bin 0 -> 262 bytes data/tilesets/primary/general/anim/2/3.png | Bin 0 -> 280 bytes data/tilesets/primary/general/anim/2/4.png | Bin 0 -> 232 bytes data/tilesets/primary/general/anim/2/5.png | Bin 0 -> 220 bytes data/tilesets/primary/general/anim/2/6.png | Bin 0 -> 203 bytes data/tilesets/primary/general/anim/3/0.png | Bin 0 -> 136 bytes data/tilesets/primary/general/anim/3/1.png | Bin 0 -> 154 bytes data/tilesets/primary/general/anim/3/2.png | Bin 0 -> 133 bytes data/tilesets/primary/general/anim/3/3.png | Bin 0 -> 130 bytes data/tilesets/primary/general/anim/4/0.png | Bin 0 -> 304 bytes data/tilesets/primary/general/anim/4/1.png | Bin 0 -> 311 bytes data/tilesets/primary/general/anim/4/2.png | Bin 0 -> 314 bytes data/tilesets/primary/general/anim/4/3.png | Bin 0 -> 328 bytes data/tilesets/primary/general/tiles.png | Bin 7587 -> 7786 bytes .../primary/inside_building/tiles.png | Bin 1556 -> 1813 bytes data/tilesets/primary/secret_base/tiles.png | Bin 7136 -> 7869 bytes .../primary/secret_base/unknown_tiles.png | Bin 1212 -> 1316 bytes .../tilesets/secondary/battle_arena/tiles.png | Bin 2067 -> 2340 bytes data/tilesets/secondary/battle_dome/tiles.png | Bin 3193 -> 3626 bytes .../secondary/battle_factory/tiles.png | Bin 3313 -> 3694 bytes .../secondary/battle_frontier/tiles.png | Bin 2368 -> 2647 bytes .../battle_frontier_outside_east/anim/0.png | Bin 0 -> 191 bytes .../battle_frontier_outside_east/anim/1.png | Bin 0 -> 188 bytes .../battle_frontier_outside_east/anim/2.png | Bin 0 -> 185 bytes .../battle_frontier_outside_east/anim/3.png | Bin 0 -> 183 bytes .../battle_frontier_outside_east/tiles.png | Bin 3750 -> 3834 bytes .../battle_frontier_outside_west/anim/0.png | Bin 0 -> 191 bytes .../battle_frontier_outside_west/anim/1.png | Bin 0 -> 188 bytes .../battle_frontier_outside_west/anim/2.png | Bin 0 -> 185 bytes .../battle_frontier_outside_west/anim/3.png | Bin 0 -> 183 bytes .../battle_frontier_outside_west/tiles.png | Bin 5505 -> 5892 bytes .../battle_frontier_ranking_hall/tiles.png | Bin 1451 -> 1700 bytes .../secondary/battle_palace/tiles.png | Bin 1513 -> 1633 bytes data/tilesets/secondary/battle_pike/tiles.png | Bin 3922 -> 4013 bytes .../secondary/battle_pyramid/anim/0/0.png | Bin 0 -> 228 bytes .../secondary/battle_pyramid/anim/0/1.png | Bin 0 -> 220 bytes .../secondary/battle_pyramid/anim/0/2.png | Bin 0 -> 219 bytes .../secondary/battle_pyramid/anim/1/0.png | Bin 0 -> 261 bytes .../secondary/battle_pyramid/anim/1/1.png | Bin 0 -> 267 bytes .../secondary/battle_pyramid/anim/1/2.png | Bin 0 -> 261 bytes .../secondary/battle_pyramid/anim/1/3.png | Bin 0 -> 105 bytes .../secondary/battle_pyramid/anim/1/4.png | Bin 0 -> 86 bytes .../secondary/battle_pyramid/anim/1/5.png | Bin 0 -> 86 bytes .../secondary/battle_pyramid/anim/1/6.png | Bin 0 -> 106 bytes .../secondary/battle_pyramid/anim/1/7.png | Bin 0 -> 393 bytes .../secondary/battle_pyramid/anim/1/8.png | Bin 0 -> 105 bytes .../secondary/battle_pyramid/anim/1/9.png | Bin 0 -> 111 bytes .../secondary/battle_pyramid/tiles.png | Bin 3208 -> 3504 bytes data/tilesets/secondary/battle_tent/tiles.png | Bin 1696 -> 2084 bytes data/tilesets/secondary/bike_shop/anim/0.png | Bin 0 -> 250 bytes data/tilesets/secondary/bike_shop/anim/1.png | Bin 0 -> 249 bytes data/tilesets/secondary/bike_shop/anim/2.png | Bin 0 -> 219 bytes data/tilesets/secondary/bike_shop/tiles.png | Bin 3270 -> 3505 bytes .../secondary/brendans_mays_house/tiles.png | Bin 2616 -> 3074 bytes data/tilesets/secondary/cable_club/tiles.png | Bin 2445 -> 2590 bytes .../secondary/cable_club/unknown_tiles.png | Bin 287 -> 311 bytes data/tilesets/secondary/cave/anim/0.png | Bin 0 -> 100 bytes data/tilesets/secondary/cave/anim/1.png | Bin 0 -> 126 bytes data/tilesets/secondary/cave/anim/2.png | Bin 0 -> 108 bytes data/tilesets/secondary/cave/anim/3.png | Bin 0 -> 109 bytes .../tilesets/secondary/cave/anim/unused/0.png | Bin 0 -> 100 bytes .../tilesets/secondary/cave/anim/unused/1.png | Bin 0 -> 121 bytes .../tilesets/secondary/cave/anim/unused/2.png | Bin 0 -> 108 bytes .../tilesets/secondary/cave/anim/unused/3.png | Bin 0 -> 105 bytes data/tilesets/secondary/cave/tiles.png | Bin 5767 -> 5884 bytes data/tilesets/secondary/contest/tiles.png | Bin 1638 -> 1650 bytes data/tilesets/secondary/dewford/anim/0.png | Bin 0 -> 185 bytes data/tilesets/secondary/dewford/anim/1.png | Bin 0 -> 185 bytes data/tilesets/secondary/dewford/anim/2.png | Bin 0 -> 185 bytes data/tilesets/secondary/dewford/anim/3.png | Bin 0 -> 192 bytes data/tilesets/secondary/dewford/tiles.png | Bin 3756 -> 3985 bytes data/tilesets/secondary/dewford_gym/tiles.png | Bin 598 -> 640 bytes .../secondary/elite_four/anim/0/0.png | Bin 0 -> 91 bytes .../secondary/elite_four/anim/0/1.png | Bin 0 -> 91 bytes .../secondary/elite_four/anim/0/2.png | Bin 0 -> 91 bytes .../secondary/elite_four/anim/0/3.png | Bin 0 -> 91 bytes .../secondary/elite_four/anim/1/0.png | Bin 0 -> 135 bytes .../secondary/elite_four/anim/1/1.png | Bin 0 -> 72 bytes .../secondary/elite_four/anim/1/2.png | Bin 0 -> 1260 bytes .../secondary/elite_four/anim/1/3.png | Bin 0 -> 1184 bytes .../secondary/elite_four/anim/1/4.png | Bin 0 -> 1190 bytes .../secondary/elite_four/anim/1/5.png | Bin 0 -> 1248 bytes .../secondary/elite_four/anim/1/6.png | Bin 0 -> 1161 bytes .../secondary/elite_four/anim/1/7.png | Bin 0 -> 1153 bytes data/tilesets/secondary/elite_four/tiles.png | Bin 2826 -> 2876 bytes .../tilesets/secondary/ever_grande/anim/0.png | Bin 0 -> 204 bytes .../tilesets/secondary/ever_grande/anim/1.png | Bin 0 -> 204 bytes .../tilesets/secondary/ever_grande/anim/2.png | Bin 0 -> 197 bytes .../tilesets/secondary/ever_grande/anim/3.png | Bin 0 -> 200 bytes .../tilesets/secondary/ever_grande/anim/4.png | Bin 0 -> 204 bytes .../tilesets/secondary/ever_grande/anim/5.png | Bin 0 -> 204 bytes .../tilesets/secondary/ever_grande/anim/6.png | Bin 0 -> 201 bytes .../tilesets/secondary/ever_grande/anim/7.png | Bin 0 -> 201 bytes data/tilesets/secondary/ever_grande/tiles.png | Bin 2088 -> 2208 bytes data/tilesets/secondary/facility/tiles.png | Bin 5753 -> 6352 bytes data/tilesets/secondary/fallarbor/tiles.png | Bin 4602 -> 4781 bytes data/tilesets/secondary/fortree/tiles.png | Bin 4364 -> 4342 bytes data/tilesets/secondary/fortree_gym/tiles.png | Bin 771 -> 770 bytes .../secondary/generic_building/tiles.png | Bin 4949 -> 5607 bytes .../secondary/inside_of_truck/tiles.png | Bin 514 -> 545 bytes data/tilesets/secondary/inside_ship/tiles.png | Bin 2016 -> 2149 bytes .../secondary/island_harbor/tiles.png | Bin 5093 -> 5639 bytes data/tilesets/secondary/lab/tiles.png | Bin 2592 -> 2844 bytes data/tilesets/secondary/lavaridge/anim/0.png | Bin 0 -> 83 bytes data/tilesets/secondary/lavaridge/anim/1.png | Bin 0 -> 92 bytes data/tilesets/secondary/lavaridge/anim/2.png | Bin 0 -> 88 bytes data/tilesets/secondary/lavaridge/anim/3.png | Bin 0 -> 100 bytes data/tilesets/secondary/lavaridge/tiles.png | Bin 4087 -> 4215 bytes .../secondary/lavaridge_gym/tiles.png | Bin 631 -> 713 bytes data/tilesets/secondary/lilycove/tiles.png | Bin 3597 -> 3912 bytes .../secondary/lilycove_museum/tiles.png | Bin 3345 -> 3938 bytes .../secondary/mauville/anim/0/a/0.png | Bin 0 -> 177 bytes .../secondary/mauville/anim/0/a/1.png | Bin 0 -> 175 bytes .../secondary/mauville/anim/0/a/2.png | Bin 0 -> 171 bytes .../secondary/mauville/anim/0/a/3.png | Bin 0 -> 160 bytes .../secondary/mauville/anim/0/a/4.png | Bin 0 -> 178 bytes .../secondary/mauville/anim/0/a/5.png | Bin 0 -> 177 bytes .../secondary/mauville/anim/0/a/6.png | Bin 0 -> 175 bytes .../secondary/mauville/anim/0/a/7.png | Bin 0 -> 171 bytes .../secondary/mauville/anim/0/a/8.png | Bin 0 -> 160 bytes .../secondary/mauville/anim/0/a/9.png | Bin 0 -> 178 bytes .../secondary/mauville/anim/0/b/0.png | Bin 0 -> 177 bytes .../secondary/mauville/anim/0/b/1.png | Bin 0 -> 175 bytes .../secondary/mauville/anim/0/b/2.png | Bin 0 -> 171 bytes .../secondary/mauville/anim/0/b/3.png | Bin 0 -> 160 bytes .../secondary/mauville/anim/0/b/4.png | Bin 0 -> 72 bytes .../secondary/mauville/anim/0/b/5.png | Bin 0 -> 72 bytes .../secondary/mauville/anim/0/b/6.png | Bin 0 -> 72 bytes .../secondary/mauville/anim/0/b/7.png | Bin 0 -> 72 bytes .../secondary/mauville/anim/1/a/0.png | Bin 0 -> 177 bytes .../secondary/mauville/anim/1/a/1.png | Bin 0 -> 178 bytes .../secondary/mauville/anim/1/a/2.png | Bin 0 -> 171 bytes .../secondary/mauville/anim/1/a/3.png | Bin 0 -> 160 bytes .../secondary/mauville/anim/1/b/0.png | Bin 0 -> 177 bytes .../secondary/mauville/anim/1/b/1.png | Bin 0 -> 178 bytes .../secondary/mauville/anim/1/b/2.png | Bin 0 -> 171 bytes .../secondary/mauville/anim/1/b/3.png | Bin 0 -> 160 bytes .../secondary/mauville/anim/1/b/4.png | Bin 0 -> 100 bytes .../secondary/mauville/anim/1/b/5.png | Bin 0 -> 121 bytes .../secondary/mauville/anim/1/b/6.png | Bin 0 -> 108 bytes .../secondary/mauville/anim/1/b/7.png | Bin 0 -> 105 bytes data/tilesets/secondary/mauville/tiles.png | Bin 6019 -> 6372 bytes .../secondary/mauville_game_corner/tiles.png | Bin 1567 -> 1788 bytes .../secondary/mauville_gym/anim/0.png | Bin 0 -> 215 bytes .../secondary/mauville_gym/anim/1.png | Bin 0 -> 218 bytes .../secondary/mauville_gym/anim/2.png | Bin 0 -> 106 bytes .../secondary/mauville_gym/anim/3.png | Bin 0 -> 393 bytes .../tilesets/secondary/mauville_gym/tiles.png | Bin 1454 -> 1534 bytes .../tilesets/secondary/meteor_falls/tiles.png | Bin 5968 -> 6078 bytes .../tilesets/secondary/mirage_tower/tiles.png | Bin 5561 -> 5645 bytes data/tilesets/secondary/mossdeep/tiles.png | Bin 4060 -> 4269 bytes .../secondary/mossdeep_game_corner/tiles.png | Bin 838 -> 893 bytes .../tilesets/secondary/mossdeep_gym/tiles.png | Bin 927 -> 969 bytes .../secondary/mystery_events_house/tiles.png | Bin 4799 -> 5383 bytes data/tilesets/secondary/navel_rock/tiles.png | Bin 5966 -> 6073 bytes .../secondary/oceanic_museum/tiles.png | Bin 2662 -> 3219 bytes .../secondary/pacifidlog/anim/0/0.png | Bin 0 -> 596 bytes .../secondary/pacifidlog/anim/0/1.png | Bin 0 -> 603 bytes .../secondary/pacifidlog/anim/0/2.png | Bin 0 -> 625 bytes .../secondary/pacifidlog/anim/1/0.png | Bin 0 -> 198 bytes .../secondary/pacifidlog/anim/1/1.png | Bin 0 -> 219 bytes .../secondary/pacifidlog/anim/1/2.png | Bin 0 -> 241 bytes .../secondary/pacifidlog/anim/1/3.png | Bin 0 -> 213 bytes .../secondary/pacifidlog/anim/1/4.png | Bin 0 -> 138 bytes .../secondary/pacifidlog/anim/1/5.png | Bin 0 -> 140 bytes .../secondary/pacifidlog/anim/1/6.png | Bin 0 -> 138 bytes .../secondary/pacifidlog/anim/1/7.png | Bin 0 -> 200 bytes data/tilesets/secondary/pacifidlog/tiles.png | Bin 4688 -> 4812 bytes data/tilesets/secondary/petalburg/tiles.png | Bin 1689 -> 1910 bytes .../secondary/petalburg_gym/tiles.png | Bin 1222 -> 1429 bytes .../secondary/pokemon_center/tiles.png | Bin 3461 -> 3645 bytes .../secondary/pokemon_day_care/tiles.png | Bin 1451 -> 1528 bytes .../secondary/pokemon_fan_club/tiles.png | Bin 1242 -> 1373 bytes .../secondary/pokemon_school/tiles.png | Bin 980 -> 1027 bytes .../pretty_petal_flower_shop/tiles.png | Bin 1839 -> 1951 bytes data/tilesets/secondary/rustboro/anim/0/0.png | Bin 0 -> 119 bytes data/tilesets/secondary/rustboro/anim/0/1.png | Bin 0 -> 113 bytes data/tilesets/secondary/rustboro/anim/0/2.png | Bin 0 -> 72 bytes data/tilesets/secondary/rustboro/anim/0/3.png | Bin 0 -> 72 bytes data/tilesets/secondary/rustboro/anim/0/4.png | Bin 0 -> 72 bytes data/tilesets/secondary/rustboro/anim/0/5.png | Bin 0 -> 72 bytes data/tilesets/secondary/rustboro/anim/0/6.png | Bin 0 -> 72 bytes data/tilesets/secondary/rustboro/anim/0/7.png | Bin 0 -> 72 bytes data/tilesets/secondary/rustboro/anim/1/0.png | Bin 0 -> 201 bytes data/tilesets/secondary/rustboro/anim/1/1.png | Bin 0 -> 198 bytes data/tilesets/secondary/rustboro/anim/1/2.png | Bin 0 -> 185 bytes data/tilesets/secondary/rustboro/anim/1/3.png | Bin 0 -> 192 bytes data/tilesets/secondary/rustboro/tiles.png | Bin 3903 -> 4108 bytes .../tilesets/secondary/rustboro_gym/tiles.png | Bin 759 -> 768 bytes .../secondary/rusturf_tunnel/tiles.png | Bin 2127 -> 2228 bytes .../secondary/seashore_house/tiles.png | Bin 1105 -> 1280 bytes .../secondary/secret_base/blue_cave/tiles.png | Bin 904 -> 905 bytes .../secret_base/blue_cave/unused_tiles.png | Bin 0 -> 903 bytes .../secret_base/brown_cave/tiles.png | Bin 1070 -> 1166 bytes .../secret_base/brown_cave/unused_tiles.png | Bin 0 -> 1163 bytes .../secondary/secret_base/red_cave/tiles.png | Bin 941 -> 941 bytes .../secret_base/red_cave/unused_tiles.png | Bin 0 -> 938 bytes .../secondary/secret_base/shrub/tiles.png | Bin 1090 -> 1177 bytes .../secret_base/shrub/unused_tiles.png | Bin 0 -> 1173 bytes .../secondary/secret_base/tree/tiles.png | Bin 1056 -> 1098 bytes .../secret_base/tree/unused_tiles.png | Bin 0 -> 1095 bytes .../secret_base/yellow_cave/tiles.png | Bin 1127 -> 1127 bytes .../secret_base/yellow_cave/unused_tiles.png | Bin 0 -> 1125 bytes data/tilesets/secondary/shop/tiles.png | Bin 3872 -> 4416 bytes data/tilesets/secondary/slateport/anim/0.png | Bin 0 -> 179 bytes data/tilesets/secondary/slateport/anim/1.png | Bin 0 -> 181 bytes data/tilesets/secondary/slateport/anim/2.png | Bin 0 -> 179 bytes data/tilesets/secondary/slateport/anim/3.png | Bin 0 -> 181 bytes data/tilesets/secondary/slateport/tiles.png | Bin 6528 -> 6985 bytes data/tilesets/secondary/sootopolis/anim/0.png | Bin 0 -> 1201 bytes data/tilesets/secondary/sootopolis/anim/1.png | Bin 0 -> 1262 bytes data/tilesets/secondary/sootopolis/anim/2.png | Bin 0 -> 1260 bytes data/tilesets/secondary/sootopolis/anim/3.png | Bin 0 -> 1184 bytes data/tilesets/secondary/sootopolis/anim/4.png | Bin 0 -> 1190 bytes data/tilesets/secondary/sootopolis/anim/5.png | Bin 0 -> 1248 bytes data/tilesets/secondary/sootopolis/anim/6.png | Bin 0 -> 1161 bytes data/tilesets/secondary/sootopolis/anim/7.png | Bin 0 -> 1153 bytes data/tilesets/secondary/sootopolis/tiles.png | Bin 2674 -> 2950 bytes .../secondary/sootopolis_gym/anim/0/0.png | Bin 0 -> 286 bytes .../secondary/sootopolis_gym/anim/0/1.png | Bin 0 -> 283 bytes .../secondary/sootopolis_gym/anim/0/2.png | Bin 0 -> 294 bytes .../secondary/sootopolis_gym/anim/0/3.png | Bin 0 -> 91 bytes .../secondary/sootopolis_gym/anim/1/0.png | Bin 0 -> 389 bytes .../secondary/sootopolis_gym/anim/1/1.png | Bin 0 -> 408 bytes .../secondary/sootopolis_gym/anim/1/2.png | Bin 0 -> 399 bytes .../secondary/sootopolis_gym/tiles.png | Bin 2780 -> 2954 bytes .../tilesets/secondary/trainer_hill/tiles.png | Bin 3311 -> 3594 bytes .../secondary/trick_house_puzzle/tiles.png | Bin 2567 -> 2797 bytes data/tilesets/secondary/underwater/anim/0.png | Bin 0 -> 180 bytes data/tilesets/secondary/underwater/anim/1.png | Bin 0 -> 183 bytes data/tilesets/secondary/underwater/anim/2.png | Bin 0 -> 185 bytes data/tilesets/secondary/underwater/anim/3.png | Bin 0 -> 184 bytes data/tilesets/secondary/underwater/tiles.png | Bin 2988 -> 2846 bytes data/tilesets/secondary/union_room/tiles.png | Bin 1710 -> 1817 bytes data/tilesets/secondary/unused_1/0.png | Bin 0 -> 86 bytes data/tilesets/secondary/unused_1/1.png | Bin 0 -> 86 bytes data/tilesets/secondary/unused_1/2.png | Bin 0 -> 106 bytes data/tilesets/secondary/unused_1/3.png | Bin 0 -> 393 bytes data/tilesets/secondary/unused_1/tiles.png | Bin 80 -> 77 bytes data/tilesets/secondary/unused_2/0.png | Bin 0 -> 105 bytes data/tilesets/secondary/unused_2/1.png | Bin 0 -> 111 bytes data/tilesets/secondary/unused_2/2.png | Bin 0 -> 108 bytes data/tilesets/secondary/unused_2/3.png | Bin 0 -> 105 bytes data/tilesets/secondary/unused_2/tiles.png | Bin 864 -> 979 bytes 260 files changed, 135 insertions(+), 169 deletions(-) create mode 100644 data/tilesets/primary/building/anim/0.png create mode 100644 data/tilesets/primary/building/anim/1.png create mode 100644 data/tilesets/primary/general/anim/0/0.png create mode 100644 data/tilesets/primary/general/anim/0/1.png create mode 100644 data/tilesets/primary/general/anim/0/2.png create mode 100644 data/tilesets/primary/general/anim/1/0.png create mode 100644 data/tilesets/primary/general/anim/1/1.png create mode 100644 data/tilesets/primary/general/anim/1/2.png create mode 100644 data/tilesets/primary/general/anim/1/3.png create mode 100644 data/tilesets/primary/general/anim/1/4.png create mode 100644 data/tilesets/primary/general/anim/1/5.png create mode 100644 data/tilesets/primary/general/anim/1/6.png create mode 100644 data/tilesets/primary/general/anim/1/7.png create mode 100644 data/tilesets/primary/general/anim/2/0.png create mode 100644 data/tilesets/primary/general/anim/2/1.png create mode 100644 data/tilesets/primary/general/anim/2/2.png create mode 100644 data/tilesets/primary/general/anim/2/3.png create mode 100644 data/tilesets/primary/general/anim/2/4.png create mode 100644 data/tilesets/primary/general/anim/2/5.png create mode 100644 data/tilesets/primary/general/anim/2/6.png create mode 100644 data/tilesets/primary/general/anim/3/0.png create mode 100644 data/tilesets/primary/general/anim/3/1.png create mode 100644 data/tilesets/primary/general/anim/3/2.png create mode 100644 data/tilesets/primary/general/anim/3/3.png create mode 100644 data/tilesets/primary/general/anim/4/0.png create mode 100644 data/tilesets/primary/general/anim/4/1.png create mode 100644 data/tilesets/primary/general/anim/4/2.png create mode 100644 data/tilesets/primary/general/anim/4/3.png create mode 100644 data/tilesets/secondary/battle_frontier_outside_east/anim/0.png create mode 100644 data/tilesets/secondary/battle_frontier_outside_east/anim/1.png create mode 100644 data/tilesets/secondary/battle_frontier_outside_east/anim/2.png create mode 100644 data/tilesets/secondary/battle_frontier_outside_east/anim/3.png create mode 100644 data/tilesets/secondary/battle_frontier_outside_west/anim/0.png create mode 100644 data/tilesets/secondary/battle_frontier_outside_west/anim/1.png create mode 100644 data/tilesets/secondary/battle_frontier_outside_west/anim/2.png create mode 100644 data/tilesets/secondary/battle_frontier_outside_west/anim/3.png create mode 100644 data/tilesets/secondary/battle_pyramid/anim/0/0.png create mode 100644 data/tilesets/secondary/battle_pyramid/anim/0/1.png create mode 100644 data/tilesets/secondary/battle_pyramid/anim/0/2.png create mode 100644 data/tilesets/secondary/battle_pyramid/anim/1/0.png create mode 100644 data/tilesets/secondary/battle_pyramid/anim/1/1.png create mode 100644 data/tilesets/secondary/battle_pyramid/anim/1/2.png create mode 100644 data/tilesets/secondary/battle_pyramid/anim/1/3.png create mode 100644 data/tilesets/secondary/battle_pyramid/anim/1/4.png create mode 100644 data/tilesets/secondary/battle_pyramid/anim/1/5.png create mode 100644 data/tilesets/secondary/battle_pyramid/anim/1/6.png create mode 100644 data/tilesets/secondary/battle_pyramid/anim/1/7.png create mode 100644 data/tilesets/secondary/battle_pyramid/anim/1/8.png create mode 100644 data/tilesets/secondary/battle_pyramid/anim/1/9.png create mode 100644 data/tilesets/secondary/bike_shop/anim/0.png create mode 100644 data/tilesets/secondary/bike_shop/anim/1.png create mode 100644 data/tilesets/secondary/bike_shop/anim/2.png create mode 100644 data/tilesets/secondary/cave/anim/0.png create mode 100644 data/tilesets/secondary/cave/anim/1.png create mode 100644 data/tilesets/secondary/cave/anim/2.png create mode 100644 data/tilesets/secondary/cave/anim/3.png create mode 100644 data/tilesets/secondary/cave/anim/unused/0.png create mode 100644 data/tilesets/secondary/cave/anim/unused/1.png create mode 100644 data/tilesets/secondary/cave/anim/unused/2.png create mode 100644 data/tilesets/secondary/cave/anim/unused/3.png create mode 100644 data/tilesets/secondary/dewford/anim/0.png create mode 100644 data/tilesets/secondary/dewford/anim/1.png create mode 100644 data/tilesets/secondary/dewford/anim/2.png create mode 100644 data/tilesets/secondary/dewford/anim/3.png create mode 100644 data/tilesets/secondary/elite_four/anim/0/0.png create mode 100644 data/tilesets/secondary/elite_four/anim/0/1.png create mode 100644 data/tilesets/secondary/elite_four/anim/0/2.png create mode 100644 data/tilesets/secondary/elite_four/anim/0/3.png create mode 100644 data/tilesets/secondary/elite_four/anim/1/0.png create mode 100644 data/tilesets/secondary/elite_four/anim/1/1.png create mode 100644 data/tilesets/secondary/elite_four/anim/1/2.png create mode 100644 data/tilesets/secondary/elite_four/anim/1/3.png create mode 100644 data/tilesets/secondary/elite_four/anim/1/4.png create mode 100644 data/tilesets/secondary/elite_four/anim/1/5.png create mode 100644 data/tilesets/secondary/elite_four/anim/1/6.png create mode 100644 data/tilesets/secondary/elite_four/anim/1/7.png create mode 100644 data/tilesets/secondary/ever_grande/anim/0.png create mode 100644 data/tilesets/secondary/ever_grande/anim/1.png create mode 100644 data/tilesets/secondary/ever_grande/anim/2.png create mode 100644 data/tilesets/secondary/ever_grande/anim/3.png create mode 100644 data/tilesets/secondary/ever_grande/anim/4.png create mode 100644 data/tilesets/secondary/ever_grande/anim/5.png create mode 100644 data/tilesets/secondary/ever_grande/anim/6.png create mode 100644 data/tilesets/secondary/ever_grande/anim/7.png create mode 100644 data/tilesets/secondary/lavaridge/anim/0.png create mode 100644 data/tilesets/secondary/lavaridge/anim/1.png create mode 100644 data/tilesets/secondary/lavaridge/anim/2.png create mode 100644 data/tilesets/secondary/lavaridge/anim/3.png create mode 100644 data/tilesets/secondary/mauville/anim/0/a/0.png create mode 100644 data/tilesets/secondary/mauville/anim/0/a/1.png create mode 100644 data/tilesets/secondary/mauville/anim/0/a/2.png create mode 100644 data/tilesets/secondary/mauville/anim/0/a/3.png create mode 100644 data/tilesets/secondary/mauville/anim/0/a/4.png create mode 100644 data/tilesets/secondary/mauville/anim/0/a/5.png create mode 100644 data/tilesets/secondary/mauville/anim/0/a/6.png create mode 100644 data/tilesets/secondary/mauville/anim/0/a/7.png create mode 100644 data/tilesets/secondary/mauville/anim/0/a/8.png create mode 100644 data/tilesets/secondary/mauville/anim/0/a/9.png create mode 100644 data/tilesets/secondary/mauville/anim/0/b/0.png create mode 100644 data/tilesets/secondary/mauville/anim/0/b/1.png create mode 100644 data/tilesets/secondary/mauville/anim/0/b/2.png create mode 100644 data/tilesets/secondary/mauville/anim/0/b/3.png create mode 100644 data/tilesets/secondary/mauville/anim/0/b/4.png create mode 100644 data/tilesets/secondary/mauville/anim/0/b/5.png create mode 100644 data/tilesets/secondary/mauville/anim/0/b/6.png create mode 100644 data/tilesets/secondary/mauville/anim/0/b/7.png create mode 100644 data/tilesets/secondary/mauville/anim/1/a/0.png create mode 100644 data/tilesets/secondary/mauville/anim/1/a/1.png create mode 100644 data/tilesets/secondary/mauville/anim/1/a/2.png create mode 100644 data/tilesets/secondary/mauville/anim/1/a/3.png create mode 100644 data/tilesets/secondary/mauville/anim/1/b/0.png create mode 100644 data/tilesets/secondary/mauville/anim/1/b/1.png create mode 100644 data/tilesets/secondary/mauville/anim/1/b/2.png create mode 100644 data/tilesets/secondary/mauville/anim/1/b/3.png create mode 100644 data/tilesets/secondary/mauville/anim/1/b/4.png create mode 100644 data/tilesets/secondary/mauville/anim/1/b/5.png create mode 100644 data/tilesets/secondary/mauville/anim/1/b/6.png create mode 100644 data/tilesets/secondary/mauville/anim/1/b/7.png create mode 100644 data/tilesets/secondary/mauville_gym/anim/0.png create mode 100644 data/tilesets/secondary/mauville_gym/anim/1.png create mode 100644 data/tilesets/secondary/mauville_gym/anim/2.png create mode 100644 data/tilesets/secondary/mauville_gym/anim/3.png create mode 100644 data/tilesets/secondary/pacifidlog/anim/0/0.png create mode 100644 data/tilesets/secondary/pacifidlog/anim/0/1.png create mode 100644 data/tilesets/secondary/pacifidlog/anim/0/2.png create mode 100644 data/tilesets/secondary/pacifidlog/anim/1/0.png create mode 100644 data/tilesets/secondary/pacifidlog/anim/1/1.png create mode 100644 data/tilesets/secondary/pacifidlog/anim/1/2.png create mode 100644 data/tilesets/secondary/pacifidlog/anim/1/3.png create mode 100644 data/tilesets/secondary/pacifidlog/anim/1/4.png create mode 100644 data/tilesets/secondary/pacifidlog/anim/1/5.png create mode 100644 data/tilesets/secondary/pacifidlog/anim/1/6.png create mode 100644 data/tilesets/secondary/pacifidlog/anim/1/7.png create mode 100644 data/tilesets/secondary/rustboro/anim/0/0.png create mode 100644 data/tilesets/secondary/rustboro/anim/0/1.png create mode 100644 data/tilesets/secondary/rustboro/anim/0/2.png create mode 100644 data/tilesets/secondary/rustboro/anim/0/3.png create mode 100644 data/tilesets/secondary/rustboro/anim/0/4.png create mode 100644 data/tilesets/secondary/rustboro/anim/0/5.png create mode 100644 data/tilesets/secondary/rustboro/anim/0/6.png create mode 100644 data/tilesets/secondary/rustboro/anim/0/7.png create mode 100644 data/tilesets/secondary/rustboro/anim/1/0.png create mode 100644 data/tilesets/secondary/rustboro/anim/1/1.png create mode 100644 data/tilesets/secondary/rustboro/anim/1/2.png create mode 100644 data/tilesets/secondary/rustboro/anim/1/3.png create mode 100644 data/tilesets/secondary/secret_base/blue_cave/unused_tiles.png create mode 100644 data/tilesets/secondary/secret_base/brown_cave/unused_tiles.png create mode 100644 data/tilesets/secondary/secret_base/red_cave/unused_tiles.png create mode 100644 data/tilesets/secondary/secret_base/shrub/unused_tiles.png create mode 100644 data/tilesets/secondary/secret_base/tree/unused_tiles.png create mode 100644 data/tilesets/secondary/secret_base/yellow_cave/unused_tiles.png create mode 100644 data/tilesets/secondary/slateport/anim/0.png create mode 100644 data/tilesets/secondary/slateport/anim/1.png create mode 100644 data/tilesets/secondary/slateport/anim/2.png create mode 100644 data/tilesets/secondary/slateport/anim/3.png create mode 100644 data/tilesets/secondary/sootopolis/anim/0.png create mode 100644 data/tilesets/secondary/sootopolis/anim/1.png create mode 100644 data/tilesets/secondary/sootopolis/anim/2.png create mode 100644 data/tilesets/secondary/sootopolis/anim/3.png create mode 100644 data/tilesets/secondary/sootopolis/anim/4.png create mode 100644 data/tilesets/secondary/sootopolis/anim/5.png create mode 100644 data/tilesets/secondary/sootopolis/anim/6.png create mode 100644 data/tilesets/secondary/sootopolis/anim/7.png create mode 100644 data/tilesets/secondary/sootopolis_gym/anim/0/0.png create mode 100644 data/tilesets/secondary/sootopolis_gym/anim/0/1.png create mode 100644 data/tilesets/secondary/sootopolis_gym/anim/0/2.png create mode 100644 data/tilesets/secondary/sootopolis_gym/anim/0/3.png create mode 100644 data/tilesets/secondary/sootopolis_gym/anim/1/0.png create mode 100644 data/tilesets/secondary/sootopolis_gym/anim/1/1.png create mode 100644 data/tilesets/secondary/sootopolis_gym/anim/1/2.png create mode 100644 data/tilesets/secondary/underwater/anim/0.png create mode 100644 data/tilesets/secondary/underwater/anim/1.png create mode 100644 data/tilesets/secondary/underwater/anim/2.png create mode 100644 data/tilesets/secondary/underwater/anim/3.png create mode 100644 data/tilesets/secondary/unused_1/0.png create mode 100644 data/tilesets/secondary/unused_1/1.png create mode 100644 data/tilesets/secondary/unused_1/2.png create mode 100644 data/tilesets/secondary/unused_1/3.png create mode 100644 data/tilesets/secondary/unused_2/0.png create mode 100644 data/tilesets/secondary/unused_2/1.png create mode 100644 data/tilesets/secondary/unused_2/2.png create mode 100644 data/tilesets/secondary/unused_2/3.png diff --git a/data/tileset.s b/data/tileset.s index b8a0ca77f..0ca02d41c 100644 --- a/data/tileset.s +++ b/data/tileset.s @@ -5,50 +5,48 @@ .align 2, 0 gUnknown_085105C4:: - .incbin "baserom.gba", 0x5105c4, 0x80 + .incbin "data/tilesets/primary/general/anim/0/1.4bpp" gUnknown_08510644:: - .incbin "baserom.gba", 0x510644, 0x80 + .incbin "data/tilesets/primary/general/anim/0/0.4bpp" gUnknown_085106C4:: - .incbin "baserom.gba", 0x5106c4, 0x80 + .incbin "data/tilesets/primary/general/anim/0/2.4bpp" .space 0x20 gTilesetAnims_General0:: @ 8510764 -@ replacing .incbin "baserom.gba", 0x00510764, 0x10 .4byte gUnknown_08510644 .4byte gUnknown_085105C4 .4byte gUnknown_08510644 .4byte gUnknown_085106C4 gUnknown_08510774:: - .incbin "baserom.gba", 0x510774, 0x3c0 + .incbin "data/tilesets/primary/general/anim/1/0.4bpp" gUnknown_08510B34:: - .incbin "baserom.gba", 0x510b34, 0x3c0 + .incbin "data/tilesets/primary/general/anim/1/1.4bpp" gUnknown_08510EF4:: - .incbin "baserom.gba", 0x510ef4, 0x3c0 + .incbin "data/tilesets/primary/general/anim/1/2.4bpp" gUnknown_085112B4:: - .incbin "baserom.gba", 0x5112b4, 0x3c0 + .incbin "data/tilesets/primary/general/anim/1/3.4bpp" gUnknown_08511674:: - .incbin "baserom.gba", 0x511674, 0x3c0 + .incbin "data/tilesets/primary/general/anim/1/4.4bpp" gUnknown_08511A34:: - .incbin "baserom.gba", 0x511a34, 0x3c0 + .incbin "data/tilesets/primary/general/anim/1/5.4bpp" gUnknown_08511DF4:: - .incbin "baserom.gba", 0x511df4, 0x3c0 + .incbin "data/tilesets/primary/general/anim/1/6.4bpp" gUnknown_085121B4:: - .incbin "baserom.gba", 0x5121b4, 0x3c0 + .incbin "data/tilesets/primary/general/anim/1/7.4bpp" gTilesetAnims_General1:: @ 8512574 -@ replacing .incbin "baserom.gba", 0x00512574, 0x20 .4byte gUnknown_08510774 .4byte gUnknown_08510B34 .4byte gUnknown_08510EF4 @@ -59,29 +57,28 @@ gTilesetAnims_General1:: @ 8512574 .4byte gUnknown_085121B4 gUnknown_08512594:: - .incbin "baserom.gba", 0x512594, 0x140 + .incbin "data/tilesets/primary/general/anim/2/0.4bpp" gUnknown_085126D4:: - .incbin "baserom.gba", 0x5126d4, 0x140 + .incbin "data/tilesets/primary/general/anim/2/1.4bpp" gUnknown_08512814:: - .incbin "baserom.gba", 0x512814, 0x140 + .incbin "data/tilesets/primary/general/anim/2/2.4bpp" gUnknown_08512954:: - .incbin "baserom.gba", 0x512954, 0x140 + .incbin "data/tilesets/primary/general/anim/2/3.4bpp" gUnknown_08512A94:: - .incbin "baserom.gba", 0x512a94, 0x140 + .incbin "data/tilesets/primary/general/anim/2/4.4bpp" gUnknown_08512BD4:: - .incbin "baserom.gba", 0x512bd4, 0x140 + .incbin "data/tilesets/primary/general/anim/2/5.4bpp" gUnknown_08512D14:: - .incbin "baserom.gba", 0x512d14, 0x140 + .incbin "data/tilesets/primary/general/anim/2/6.4bpp" gTilesetAnims_General2:: @ 8512E54 -@ replacing .incbin "baserom.gba", 0x00512e54, 0x20 .4byte gUnknown_08512594 .4byte gUnknown_085126D4 .4byte gUnknown_08512814 @@ -92,129 +89,123 @@ gTilesetAnims_General2:: @ 8512E54 .4byte gUnknown_08512594 gUnknown_08512E74:: - .incbin "baserom.gba", 0x512e74, 0xc0 + .incbin "data/tilesets/primary/general/anim/3/0.4bpp" gUnknown_08512F34:: - .incbin "baserom.gba", 0x512f34, 0xc0 + .incbin "data/tilesets/primary/general/anim/3/1.4bpp" gUnknown_08512FF4:: - .incbin "baserom.gba", 0x512ff4, 0xc0 + .incbin "data/tilesets/primary/general/anim/3/2.4bpp" gUnknown_085130B4:: - .incbin "baserom.gba", 0x5130b4, 0xc0 + .incbin "data/tilesets/primary/general/anim/3/3.4bpp" gTilesetAnims_General3:: @ 8513174 -@ replacing .incbin "baserom.gba", 0x00513174, 0x10 .4byte gUnknown_08512E74 .4byte gUnknown_08512F34 .4byte gUnknown_08512FF4 .4byte gUnknown_085130B4 gUnknown_08513184:: - .incbin "baserom.gba", 0x513184, 0x140 + .incbin "data/tilesets/primary/general/anim/4/0.4bpp" gUnknown_085132C4:: - .incbin "baserom.gba", 0x5132c4, 0x140 + .incbin "data/tilesets/primary/general/anim/4/1.4bpp" gUnknown_08513404:: - .incbin "baserom.gba", 0x513404, 0x140 + .incbin "data/tilesets/primary/general/anim/4/2.4bpp" gUnknown_08513544:: - .incbin "baserom.gba", 0x513544, 0x140 + .incbin "data/tilesets/primary/general/anim/4/3.4bpp" gTilesetAnims_General4:: @ 8513684 -@ replacing .incbin "baserom.gba", 0x00513684, 0x10 .4byte gUnknown_08513184 .4byte gUnknown_085132C4 .4byte gUnknown_08513404 .4byte gUnknown_08513544 gUnknown_08513694:: - .incbin "baserom.gba", 0x513694, 0x80 + .incbin "data/tilesets/secondary/lavaridge/anim/0.4bpp" gUnknown_08513714:: - .incbin "baserom.gba", 0x513714, 0x80 + .incbin "data/tilesets/secondary/lavaridge/anim/1.4bpp" gUnknown_08513794:: - .incbin "baserom.gba", 0x513794, 0x80 + .incbin "data/tilesets/secondary/lavaridge/anim/2.4bpp" gUnknown_08513814:: - .incbin "baserom.gba", 0x513814, 0x80 + .incbin "data/tilesets/secondary/lavaridge/anim/3.4bpp" gTilesetAnims_Lavaridge0:: @ 8513894 -@ replacing .incbin "baserom.gba", 0x00513894, 0x10 .4byte gUnknown_08513694 .4byte gUnknown_08513714 .4byte gUnknown_08513794 .4byte gUnknown_08513814 gUnknown_085138A4:: - .incbin "baserom.gba", 0x5138a4, 0x3c0 + .incbin "data/tilesets/secondary/pacifidlog/anim/0/0.4bpp" gUnknown_08513C64:: - .incbin "baserom.gba", 0x513c64, 0x3c0 + .incbin "data/tilesets/secondary/pacifidlog/anim/0/1.4bpp" gUnknown_08514024:: - .incbin "baserom.gba", 0x514024, 0x3c0 + .incbin "data/tilesets/secondary/pacifidlog/anim/0/2.4bpp" gTilesetAnims_Pacifidlog0:: @ 85143E4 -@ replacing .incbin "baserom.gba", 0x005143e4, 0x10 .4byte gUnknown_085138A4 .4byte gUnknown_08513C64 .4byte gUnknown_08514024 .4byte gUnknown_08513C64 gUnknown_085143F4:: - .incbin "baserom.gba", 0x5143f4, 0x80 + .incbin "data/tilesets/secondary/underwater/anim/0.4bpp" gUnknown_08514474:: - .incbin "baserom.gba", 0x514474, 0x80 + .incbin "data/tilesets/secondary/underwater/anim/1.4bpp" gUnknown_085144F4:: - .incbin "baserom.gba", 0x5144f4, 0x80 + .incbin "data/tilesets/secondary/underwater/anim/2.4bpp" gUnknown_08514574:: - .incbin "baserom.gba", 0x514574, 0x80 + .incbin "data/tilesets/secondary/underwater/anim/3.4bpp" gTilesetAnims_Underwater0:: @ 85145F4 -@ replacing .incbin "baserom.gba", 0x005145f4, 0x10 .4byte gUnknown_085143F4 .4byte gUnknown_08514474 .4byte gUnknown_085144F4 .4byte gUnknown_08514574 gUnknown_08514604:: - .incbin "baserom.gba", 0x514604, 0x100 + .incbin "data/tilesets/secondary/pacifidlog/anim/1/0.4bpp" gUnknown_08514704:: - .incbin "baserom.gba", 0x514704, 0x100 + .incbin "data/tilesets/secondary/pacifidlog/anim/1/1.4bpp" gUnknown_08514804:: - .incbin "baserom.gba", 0x514804, 0x100 + .incbin "data/tilesets/secondary/pacifidlog/anim/1/2.4bpp" gUnknown_08514904:: - .incbin "baserom.gba", 0x514904, 0x100 + .incbin "data/tilesets/secondary/pacifidlog/anim/1/3.4bpp" gUnknown_08514A04:: - .incbin "baserom.gba", 0x514a04, 0x100 + .incbin "data/tilesets/secondary/pacifidlog/anim/1/4.4bpp" gUnknown_08514B04:: - .incbin "baserom.gba", 0x514b04, 0x100 + .incbin "data/tilesets/secondary/pacifidlog/anim/1/5.4bpp" gUnknown_08514C04:: - .incbin "baserom.gba", 0x514c04, 0x100 + .incbin "data/tilesets/secondary/pacifidlog/anim/1/6.4bpp" gUnknown_08514D04:: - .incbin "baserom.gba", 0x514d04, 0x100 + .incbin "data/tilesets/secondary/pacifidlog/anim/1/7.4bpp" gTilesetAnims_Pacifidlog1:: @ 8514E04 -@ replacing .incbin "baserom.gba", 0x00514e04, 0x20 .4byte gUnknown_08514604 .4byte gUnknown_08514704 .4byte gUnknown_08514804 @@ -225,39 +216,38 @@ gTilesetAnims_Pacifidlog1:: @ 8514E04 .4byte gUnknown_08514D04 gUnknown_08514E24:: - .incbin "baserom.gba", 0x514e24, 0x80 + .incbin "data/tilesets/secondary/mauville/anim/0/a/0.4bpp" gUnknown_08514EA4:: - .incbin "baserom.gba", 0x514ea4, 0x80 + .incbin "data/tilesets/secondary/mauville/anim/0/a/1.4bpp" gUnknown_08514F24:: - .incbin "baserom.gba", 0x514f24, 0x80 + .incbin "data/tilesets/secondary/mauville/anim/0/a/2.4bpp" gUnknown_08514FA4:: - .incbin "baserom.gba", 0x514fa4, 0x80 + .incbin "data/tilesets/secondary/mauville/anim/0/a/3.4bpp" gUnknown_08515024:: - .incbin "baserom.gba", 0x515024, 0x80 + .incbin "data/tilesets/secondary/mauville/anim/1/a/1.4bpp" gUnknown_085150A4:: - .incbin "baserom.gba", 0x5150a4, 0x80 + .incbin "data/tilesets/secondary/mauville/anim/0/b/0.4bpp" gUnknown_08515124:: - .incbin "baserom.gba", 0x515124, 0x80 + .incbin "data/tilesets/secondary/mauville/anim/0/b/1.4bpp" gUnknown_085151A4:: - .incbin "baserom.gba", 0x5151a4, 0x80 + .incbin "data/tilesets/secondary/mauville/anim/0/b/2.4bpp" gUnknown_08515224:: - .incbin "baserom.gba", 0x515224, 0x80 + .incbin "data/tilesets/secondary/mauville/anim/0/b/3.4bpp" gUnknown_085152A4:: - .incbin "baserom.gba", 0x5152a4, 0x80 + .incbin "data/tilesets/secondary/mauville/anim/1/b/1.4bpp" .space 0x20 gTilesetAnims_MauvilleVDests0:: @ 8515344 -@ replacing .incbin "baserom.gba", 0x00515344, 0x20 .4byte BG_VRAM + 0x4c00 .4byte BG_VRAM + 0x4c80 .4byte BG_VRAM + 0x4d00 @@ -268,7 +258,6 @@ gTilesetAnims_MauvilleVDests0:: @ 8515344 .4byte BG_VRAM + 0x4f80 gTilesetAnims_MauvilleVDests1:: @ 8515364 -@ replacing .incbin "baserom.gba", 0x00515364, 0x20 .4byte BG_VRAM + 0x5000 .4byte BG_VRAM + 0x5080 .4byte BG_VRAM + 0x5100 @@ -279,7 +268,6 @@ gTilesetAnims_MauvilleVDests1:: @ 8515364 .4byte BG_VRAM + 0x5380 gTilesetAnims_Mauville0a:: @ 8515384 -@ replacing .incbin "baserom.gba", 0x00515384, 0x30 .4byte gUnknown_08514E24 .4byte gUnknown_08514E24 .4byte gUnknown_08514EA4 @@ -294,7 +282,6 @@ gTilesetAnims_Mauville0a:: @ 8515384 .4byte gUnknown_08514EA4 gTilesetAnims_Mauville0b:: @ 85153B4 -@ replacing .incbin "baserom.gba", 0x005153b4, 0x30 .4byte gUnknown_085150A4 .4byte gUnknown_085150A4 .4byte gUnknown_08515124 @@ -309,42 +296,40 @@ gTilesetAnims_Mauville0b:: @ 85153B4 .4byte gUnknown_08515124 gTilesetAnims_Mauville1a:: @ 85153E4 -@ replacing .incbin "baserom.gba", 0x005153e4, 0x10 .4byte gUnknown_08514E24 .4byte gUnknown_08514E24 .4byte gUnknown_08515024 .4byte gUnknown_08515024 gTilesetAnims_Mauville1b:: @ 85153F4 -@ replacing .incbin "baserom.gba", 0x005153f4, 0x10 .4byte gUnknown_085150A4 .4byte gUnknown_085150A4 .4byte gUnknown_085152A4 .4byte gUnknown_085152A4 gUnknown_08515404:: - .incbin "baserom.gba", 0x515404, 0x80 + .incbin "data/tilesets/secondary/rustboro/anim/0/0.4bpp" gUnknown_08515484:: - .incbin "baserom.gba", 0x515484, 0x80 + .incbin "data/tilesets/secondary/rustboro/anim/0/1.4bpp" gUnknown_08515504:: - .incbin "baserom.gba", 0x515504, 0x80 + .incbin "data/tilesets/secondary/rustboro/anim/0/2.4bpp" gUnknown_08515584:: - .incbin "baserom.gba", 0x515584, 0x80 + .incbin "data/tilesets/secondary/rustboro/anim/0/3.4bpp" gUnknown_08515604:: - .incbin "baserom.gba", 0x515604, 0x80 + .incbin "data/tilesets/secondary/rustboro/anim/0/4.4bpp" gUnknown_08515684:: - .incbin "baserom.gba", 0x515684, 0x80 + .incbin "data/tilesets/secondary/rustboro/anim/0/5.4bpp" gUnknown_08515704:: - .incbin "baserom.gba", 0x515704, 0x80 + .incbin "data/tilesets/secondary/rustboro/anim/0/6.4bpp" gUnknown_08515784:: - .incbin "baserom.gba", 0x515784, 0x80 + .incbin "data/tilesets/secondary/rustboro/anim/0/7.4bpp" gTilesetAnims_RustboroVDests0:: @ 8515804 @@ -358,7 +343,6 @@ gTilesetAnims_RustboroVDests0:: @ 8515804 .4byte BG_VRAM + 0x5380 gTilesetAnims_Rustboro0:: @ 8515824 -@ replacing .incbin "baserom.gba", 0x00515824, 0x20 .4byte gUnknown_08515404 .4byte gUnknown_08515484 .4byte gUnknown_08515504 @@ -369,82 +353,79 @@ gTilesetAnims_Rustboro0:: @ 8515824 .4byte gUnknown_08515784 gUnknown_08515844:: - .incbin "baserom.gba", 0x515844, 0x80 + .incbin "data/tilesets/secondary/rustboro/anim/1/0.4bpp" gUnknown_085158C4:: - .incbin "baserom.gba", 0x5158c4, 0x80 + .incbin "data/tilesets/secondary/rustboro/anim/1/1.4bpp" .space 0x20 gTilesetAnims_Rustboro1:: @ 8515964 -@ replacing .incbin "baserom.gba", 0x00515964, 0x8 .4byte gUnknown_08515844 .4byte gUnknown_085158C4 gUnknown_0851596C:: - .incbin "baserom.gba", 0x51596c, 0x80 + .incbin "data/tilesets/secondary/cave/anim/0.4bpp" gUnknown_085159EC:: - .incbin "baserom.gba", 0x5159ec, 0x80 + .incbin "data/tilesets/secondary/cave/anim/1.4bpp" gUnknown_08515A6C:: - .incbin "baserom.gba", 0x515a6c, 0x80 + .incbin "data/tilesets/secondary/cave/anim/2.4bpp" gUnknown_08515AEC:: - .incbin "baserom.gba", 0x515aec, 0x80 + .incbin "data/tilesets/secondary/cave/anim/3.4bpp" gUnknown_08515B6C:: - .incbin "baserom.gba", 0x515b6c, 0x80 + .incbin "data/tilesets/secondary/cave/anim/unused/0.4bpp" gUnknown_08515BEC:: - .incbin "baserom.gba", 0x515bec, 0x80 + .incbin "data/tilesets/secondary/cave/anim/unused/1.4bpp" gUnknown_08515C6C:: - .incbin "baserom.gba", 0x515c6c, 0x80 + .incbin "data/tilesets/secondary/cave/anim/unused/2.4bpp" gUnknown_08515CEC:: - .incbin "baserom.gba", 0x515cec, 0x80 + .incbin "data/tilesets/secondary/cave/anim/unused/3.4bpp" .space 0x20 gTilesetAnims_Lavaridge1_Cave0:: @ 8515D8C -@ replacing .incbin "baserom.gba", 0x00515d8c, 0x10 .4byte gUnknown_0851596C .4byte gUnknown_085159EC .4byte gUnknown_08515A6C .4byte gUnknown_08515AEC gUnknown_08515D9C:: - .incbin "baserom.gba", 0x515d9c, 0x80 + .incbin "data/tilesets/secondary/ever_grande/anim/0.4bpp" gUnknown_08515E1C:: - .incbin "baserom.gba", 0x515e1c, 0x80 + .incbin "data/tilesets/secondary/ever_grande/anim/1.4bpp" gUnknown_08515E9C:: - .incbin "baserom.gba", 0x515e9c, 0x80 + .incbin "data/tilesets/secondary/ever_grande/anim/2.4bpp" gUnknown_08515F1C:: - .incbin "baserom.gba", 0x515f1c, 0x80 + .incbin "data/tilesets/secondary/ever_grande/anim/3.4bpp" gUnknown_08515F9C:: - .incbin "baserom.gba", 0x515f9c, 0x80 + .incbin "data/tilesets/secondary/ever_grande/anim/4.4bpp" gUnknown_0851601C:: - .incbin "baserom.gba", 0x51601c, 0x80 + .incbin "data/tilesets/secondary/ever_grande/anim/5.4bpp" gUnknown_0851609C:: - .incbin "baserom.gba", 0x51609c, 0x80 + .incbin "data/tilesets/secondary/ever_grande/anim/6.4bpp" gUnknown_0851611C:: - .incbin "baserom.gba", 0x51611c, 0x80 + .incbin "data/tilesets/secondary/ever_grande/anim/7.4bpp" .space 0x20 gTilesetAnims_EverGrandeVDests0:: @ 85161BC -@ replacing .incbin "baserom.gba", 0x005161bc, 0x20 .4byte BG_VRAM + 0x5c00 .4byte BG_VRAM + 0x5c80 .4byte BG_VRAM + 0x5d00 @@ -455,7 +436,6 @@ gTilesetAnims_EverGrandeVDests0:: @ 85161BC .4byte BG_VRAM + 0x5f80 gTilesetAnims_EverGrande0:: @ 85161DC -@ replacing .incbin "baserom.gba", 0x005161dc, 0x20 .4byte gUnknown_08515D9C .4byte gUnknown_08515E1C .4byte gUnknown_08515E9C @@ -466,228 +446,216 @@ gTilesetAnims_EverGrande0:: @ 85161DC .4byte gUnknown_0851611C gUnknown_085161FC:: - .incbin "baserom.gba", 0x5161fc, 0xc0 + .incbin "data/tilesets/secondary/dewford/anim/0.4bpp" gUnknown_085162BC:: - .incbin "baserom.gba", 0x5162bc, 0xc0 + .incbin "data/tilesets/secondary/dewford/anim/1.4bpp" gUnknown_0851637C:: - .incbin "baserom.gba", 0x51637c, 0xc0 + .incbin "data/tilesets/secondary/dewford/anim/2.4bpp" gUnknown_0851643C:: - .incbin "baserom.gba", 0x51643c, 0xc0 + .incbin "data/tilesets/secondary/dewford/anim/3.4bpp" gTilesetAnims_Dewford0:: @ 85164FC -@ replacing .incbin "baserom.gba", 0x005164fc, 0x10 .4byte gUnknown_085161FC .4byte gUnknown_085162BC .4byte gUnknown_0851637C .4byte gUnknown_0851643C gUnknown_0851650C:: - .incbin "baserom.gba", 0x51650c, 0xc0 + .incbin "data/tilesets/secondary/battle_frontier_outside_west/anim/0.4bpp" gUnknown_085165CC:: - .incbin "baserom.gba", 0x5165cc, 0xc0 + .incbin "data/tilesets/secondary/battle_frontier_outside_west/anim/1.4bpp" gUnknown_0851668C:: - .incbin "baserom.gba", 0x51668c, 0xc0 + .incbin "data/tilesets/secondary/battle_frontier_outside_west/anim/2.4bpp" gUnknown_0851674C:: - .incbin "baserom.gba", 0x51674c, 0xc0 + .incbin "data/tilesets/secondary/battle_frontier_outside_west/anim/3.4bpp" gTilesetAnims_BattleFrontierOutsideWest0:: @ 851680C -@ replacing .incbin "baserom.gba", 0x0051680c, 0x10 .4byte gUnknown_0851650C .4byte gUnknown_085165CC .4byte gUnknown_0851668C .4byte gUnknown_0851674C gUnknown_0851681C:: @ 851680C - .incbin "baserom.gba", 0x51681c, 0xc0 + .incbin "data/tilesets/secondary/battle_frontier_outside_east/anim/0.4bpp" gUnknown_085168DC:: - .incbin "baserom.gba", 0x5168dc, 0xc0 + .incbin "data/tilesets/secondary/battle_frontier_outside_east/anim/1.4bpp" gUnknown_0851699C:: - .incbin "baserom.gba", 0x51699c, 0xc0 + .incbin "data/tilesets/secondary/battle_frontier_outside_east/anim/2.4bpp" gUnknown_08516A5C:: - .incbin "baserom.gba", 0x516a5c, 0xc0 + .incbin "data/tilesets/secondary/battle_frontier_outside_east/anim/3.4bpp" gTilesetAnims_BattleFrontierOutsideEast0:: @ 8516B1C -@ replacing .incbin "baserom.gba", 0x00516b1c, 0x10 .4byte gUnknown_0851681C .4byte gUnknown_085168DC .4byte gUnknown_0851699C .4byte gUnknown_08516A5C gUnknown_08516B2C:: - .incbin "baserom.gba", 0x516b2c, 0x80 + .incbin "data/tilesets/secondary/slateport/anim/0.4bpp" gUnknown_08516BAC:: - .incbin "baserom.gba", 0x516bac, 0x80 + .incbin "data/tilesets/secondary/slateport/anim/1.4bpp" gUnknown_08516C2C:: - .incbin "baserom.gba", 0x516c2c, 0x80 + .incbin "data/tilesets/secondary/slateport/anim/2.4bpp" gUnknown_08516CAC:: - .incbin "baserom.gba", 0x516cac, 0x80 + .incbin "data/tilesets/secondary/slateport/anim/3.4bpp" gTilesetAnims_Slateport0:: @ 8516D2C -@ replacing .incbin "baserom.gba", 0x00516d2c, 0x10 .4byte gUnknown_08516B2C .4byte gUnknown_08516BAC .4byte gUnknown_08516C2C .4byte gUnknown_08516CAC gUnknown_08516D3C:: - .incbin "baserom.gba", 0x516d3c, 0x80 + .incbin "data/tilesets/primary/building/anim/0.4bpp" gUnknown_08516DBC:: - .incbin "baserom.gba", 0x516dbc, 0x80 + .incbin "data/tilesets/primary/building/anim/1.4bpp" gTilesetAnims_InsideBuilding0:: @ 8516E3C -@ replacing .incbin "baserom.gba", 0x00516e3c, 0x8 .4byte gUnknown_08516D3C .4byte gUnknown_08516DBC gUnknown_08516E44:: - .incbin "baserom.gba", 0x516e44, 0x180 + .incbin "data/tilesets/secondary/sootopolis_gym/anim/0/0.4bpp" gUnknown_08516FC4:: - .incbin "baserom.gba", 0x516fc4, 0x180 + .incbin "data/tilesets/secondary/sootopolis_gym/anim/0/1.4bpp" gUnknown_08517144:: - .incbin "baserom.gba", 0x517144, 0x180 + .incbin "data/tilesets/secondary/sootopolis_gym/anim/0/2.4bpp" gUnknown_085172C4:: - .incbin "baserom.gba", 0x5172c4, 0x280 + .incbin "data/tilesets/secondary/sootopolis_gym/anim/1/0.4bpp" gUnknown_08517544:: - .incbin "baserom.gba", 0x517544, 0x280 + .incbin "data/tilesets/secondary/sootopolis_gym/anim/1/1.4bpp" gUnknown_085177C4:: - .incbin "baserom.gba", 0x5177c4, 0x280 + .incbin "data/tilesets/secondary/sootopolis_gym/anim/1/2.4bpp" gTilesetAnims_SootopolisGym0:: @ 8517A44 -@ replacing .incbin "baserom.gba", 0x00517a44, 0xc .4byte gUnknown_08516E44 .4byte gUnknown_08516FC4 .4byte gUnknown_08517144 gTilesetAnims_SootopolisGym1:: @ 8517A50 -@ replacing .incbin "baserom.gba", 0x00517a50, 0xc .4byte gUnknown_085172C4 .4byte gUnknown_08517544 .4byte gUnknown_085177C4 gUnknown_08517A5C:: - .incbin "baserom.gba", 0x517a5c, 0x80 + .incbin "data/tilesets/secondary/elite_four/anim/1/0.4bpp" gUnknown_08517ADC:: - .incbin "baserom.gba", 0x517adc, 0x80 + .incbin "data/tilesets/secondary/elite_four/anim/1/1.4bpp" gUnknown_08517B5C:: - .incbin "baserom.gba", 0x517b5c, 0x20 + .incbin "data/tilesets/secondary/elite_four/anim/0/0.4bpp" gUnknown_08517B7C:: - .incbin "baserom.gba", 0x517b7c, 0x20 + .incbin "data/tilesets/secondary/elite_four/anim/0/1.4bpp" gUnknown_08517B9C:: - .incbin "baserom.gba", 0x517b9c, 0x20 + .incbin "data/tilesets/secondary/elite_four/anim/0/2.4bpp" gUnknown_08517BBC:: - .incbin "baserom.gba", 0x517bbc, 0x20 + .incbin "data/tilesets/secondary/elite_four/anim/0/3.4bpp" .space 0x20 gTilesetAnims_EliteFour1:: @ 8517BFC -@ replacing .incbin "baserom.gba", 0x00517bfc, 0x10 .4byte gUnknown_08517B5C .4byte gUnknown_08517B7C .4byte gUnknown_08517B9C .4byte gUnknown_08517BBC gTilesetAnims_EliteFour0:: @ 8517C0C -@ replacing .incbin "baserom.gba", 0x00517c0c, 0x8 .4byte gUnknown_08517A5C .4byte gUnknown_08517ADC gUnknown_08517C14:: - .incbin "baserom.gba", 0x517c14, 0x200 + .incbin "data/tilesets/secondary/mauville_gym/anim/0.4bpp" gUnknown_08517E14:: - .incbin "baserom.gba", 0x517e14, 0x200 + .incbin "data/tilesets/secondary/mauville_gym/anim/1.4bpp" .space 0x20 gTilesetAnims_MauvilleGym0:: @ 8518034 -@ replacing .incbin "baserom.gba", 0x00518034, 0x8 .4byte gUnknown_08517C14 .4byte gUnknown_08517E14 gUnknown_0851803C:: - .incbin "baserom.gba", 0x51803c, 0x120 + .incbin "data/tilesets/secondary/bike_shop/anim/0.4bpp" gUnknown_0851815C:: - .incbin "baserom.gba", 0x51815c, 0x120 + .incbin "data/tilesets/secondary/bike_shop/anim/1.4bpp" .space 0x20 gTilesetAnims_BikeShop0:: @ 851829C -@ replacing .incbin "baserom.gba", 0x0051829c, 0x8 .4byte gUnknown_0851803C .4byte gUnknown_0851815C gUnknown_085182A4:: - .incbin "baserom.gba", 0x5182a4, 0xc00 + .incbin "data/tilesets/secondary/sootopolis/anim/0.4bpp" gUnknown_08518EA4:: - .incbin "baserom.gba", 0x518ea4, 0xc00 + .incbin "data/tilesets/secondary/sootopolis/anim/1.4bpp" gUnknown_08519AA4:: - .incbin "baserom.gba", 0x519aa4, 0xc00 + .incbin "data/tilesets/secondary/sootopolis/anim/2.4bpp" gUnknown_0851A6A4:: - .incbin "baserom.gba", 0x51a6a4, 0xc00 + .incbin "data/tilesets/secondary/sootopolis/anim/3.4bpp" gUnknown_0851B2A4:: - .incbin "baserom.gba", 0x51b2a4, 0xc00 + .incbin "data/tilesets/secondary/sootopolis/anim/4.4bpp" gUnknown_0851BEA4:: - .incbin "baserom.gba", 0x51bea4, 0xc00 + .incbin "data/tilesets/secondary/sootopolis/anim/5.4bpp" gUnknown_0851CAA4:: - .incbin "baserom.gba", 0x51caa4, 0xc00 + .incbin "data/tilesets/secondary/sootopolis/anim/6.4bpp" gUnknown_0851D6A4:: - .incbin "baserom.gba", 0x51d6a4, 0xc00 + .incbin "data/tilesets/secondary/sootopolis/anim/7.4bpp" .space 0x20 gUnknown_0851E2C4:: - .incbin "baserom.gba", 0x51e2c4, 0x800 + .incbin "data/tilesets/secondary/unused_1/0.4bpp" gUnknown_0851EAC4:: - .incbin "baserom.gba", 0x51eac4, 0x800 + .incbin "data/tilesets/secondary/unused_1/1.4bpp" gUnknown_0851F2C4:: - .incbin "baserom.gba", 0x51f2c4, 0x800 + .incbin "data/tilesets/secondary/unused_1/2.4bpp" gUnknown_0851FAC4:: - .incbin "baserom.gba", 0x51fac4, 0x800 + .incbin "data/tilesets/secondary/unused_1/3.4bpp" gTilesetAnims_Sootopolis0:: @ 85202C4 -@ replacing .incbin "baserom.gba", 0x005202c4, 0x20 .4byte gUnknown_085182A4 .4byte gUnknown_08518EA4 .4byte gUnknown_08519AA4 @@ -698,43 +666,41 @@ gTilesetAnims_Sootopolis0:: @ 85202C4 .4byte gUnknown_0851D6A4 gUnknown_085202E4:: - .incbin "baserom.gba", 0x5202e4, 0x100 + .incbin "data/tilesets/secondary/battle_pyramid/anim/0/0.4bpp" gUnknown_085203E4:: - .incbin "baserom.gba", 0x5203e4, 0x100 + .incbin "data/tilesets/secondary/battle_pyramid/anim/0/1.4bpp" gUnknown_085204E4:: - .incbin "baserom.gba", 0x5204e4, 0x100 + .incbin "data/tilesets/secondary/battle_pyramid/anim/0/2.4bpp" .space 0x20 gUnknown_08520604:: - .incbin "baserom.gba", 0x520604, 0x100 + .incbin "data/tilesets/secondary/battle_pyramid/anim/1/0.4bpp" gUnknown_08520704:: - .incbin "baserom.gba", 0x520704, 0x100 + .incbin "data/tilesets/secondary/battle_pyramid/anim/1/1.4bpp" gUnknown_08520804:: - .incbin "baserom.gba", 0x520804, 0x100 + .incbin "data/tilesets/secondary/battle_pyramid/anim/1/2.4bpp" .space 0x3d00 gUnknown_08524604:: - .incbin "baserom.gba", 0x524604, 0x40 + .incbin "data/tilesets/secondary/unused_2/0.4bpp" .space 0x1c0 gUnknown_08524804:: - .incbin "baserom.gba", 0x524804, 0x60 + .incbin "data/tilesets/secondary/unused_2/1.4bpp" gTilesetAnims_BattlePyramid0:: @ 8524864 -@ replacing .incbin "baserom.gba", 0x00524864, 0xc .4byte gUnknown_085202E4 .4byte gUnknown_085203E4 .4byte gUnknown_085204E4 gTilesetAnims_BattlePyramid1:: @ 8524870 -@ replacing .incbin "baserom.gba", 0x00524870, 0xc .4byte gUnknown_08520604 .4byte gUnknown_08520704 .4byte gUnknown_08520804 diff --git a/data/tilesets/primary/building/anim/0.png b/data/tilesets/primary/building/anim/0.png new file mode 100644 index 0000000000000000000000000000000000000000..004eccc67d6a563c9fa50b1bc53a6c046479c9b6 GIT binary patch literal 141 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gsSr;W#}JO0p=USpHW=`*9GGtw zdZa?Ku`S%Jz)S0gZ()mSd5MjagXV8^-u8?!EQT oR#t}GQmCIKHFMom?Z*8Vm|ri>ImdKI;Vst08QI4m;e9( literal 0 HcmV?d00001 diff --git a/data/tilesets/primary/building/anim/1.png b/data/tilesets/primary/building/anim/1.png new file mode 100644 index 0000000000000000000000000000000000000000..e28281dea9caf084d219b71fad644e7ffc177bdb GIT binary patch literal 144 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gsc=sh#}JO0p=S^BHW=_QJNS23 zC>(Q`Ho=N7IHmPl=Z^=H9#JYza^E+}&gqu4dl#ksggsVei~K>K8Ij%s zy=`A9bgfeNb<1tOX@yRQE(+QyK6)pqXi7 zrnEb7@9$J8YK+R?aQ@PUz46A2{JMT~a%N4qD-@pPkiprJb8hnfoZE8*R`FW=iJnjt g?^x){VjZsboFyt=akR{0N&w5WdHyG literal 0 HcmV?d00001 diff --git a/data/tilesets/primary/general/anim/0/2.png b/data/tilesets/primary/general/anim/0/2.png new file mode 100644 index 0000000000000000000000000000000000000000..fb0bfe89f681b6f4641c7dd0b98e8c03ca5d4877 GIT binary patch literal 183 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gsX9*=#}JO0rl&UYHX8`IJyee> zpUGgU8ZwhHbgwY`sl`~lh5~RZaQ(#aLx?Frz?C+t?w)~klMFD|KqARtNAQWGpGMl jGr8u#&8%$p<<&=KhsCDLOBO!N2D!-7)z4*}Q$iB}pD0UK literal 0 HcmV?d00001 diff --git a/data/tilesets/primary/general/anim/1/0.png b/data/tilesets/primary/general/anim/1/0.png new file mode 100644 index 0000000000000000000000000000000000000000..a7bb2e631d50dce2e68bd1beaa17a202ee544ba8 GIT binary patch literal 518 zcmV+h0{Q)kP)HwHB~v=~g$+|x zEg5wHtC~-TzALO)pR=RV!Iu`T4;iDhSfZ|gd7?`74KnJ7B_LKOhul5Xa@({6dbydJ zPj^0@*@{Q_2It7uK)T-h7Jaaa`G7-iZFRLQ`(Ux$wD>KTPv!pY9I0&JlM+5aXK87^ z@`n$*-}O%{SA^Uw1dd_7CW%W>Hf(q6OxAo(7%t+g||(V)@R+2 z5|3dO>|HqrAJWPDdF&9cy{8zPZ@hZ)F?xER1NZaT&^`XizXS2ZR=jy2etJU1XJ=u~ zfd*ff4Scz&@>9M$92!1nz8CXt&9^=FAvgANbIZ-&8tAPqvAQ;Lc#gY0UJa2cZWA8N z$I-lf_vO@lIGc~7dsD5XgQ(qy6n&`R;-4#ERY^fB{F6QdQrn7B?cRbCDne($(1i}c z_7`k^58x26zcDZx2YY`3#S0b4pxg5;L7X!}>)kQ3degFUf07*qo IM6N<$g6a_QH~;_u literal 0 HcmV?d00001 diff --git a/data/tilesets/primary/general/anim/1/1.png b/data/tilesets/primary/general/anim/1/1.png new file mode 100644 index 0000000000000000000000000000000000000000..c215f16836328257a36728dc0ad6b5ffb46250d4 GIT binary patch literal 581 zcmV-L0=oT)P)-cZAPxy@ZNqhL3?wu@~( z@MkzfK9Z;_m%y@$uq;JlR>38Lvq!kkRwF%i8H|I3BT}wN%GqJGaYPu3fMT!$yD%8; z`Hce+0{w^@MHp`VQs?lKeLS&=yt5QLu7iyo;d>$vgAj1+h};)~a?O;h*=#!~cfg=r z?q_?Gt4$jFutF;eT7`iqg3b~C`}Gt39wzy9uYTX&`LQn4DYsg43rx}-JHb=;$xG+E zo7`c|wKe>ze&Ma(OYUv`*17~QKhOOY{)v9VkUz;!^;=6PjMC-QQS5oYM~~E%C&J3R z_3M<&r4R5rhu1mE`}OnG(KPqDVEK!mSN*nY{gPL|ulO<3Z+3cDF3Irc5*IZ43sLV| zEKPGkT!i>2u+_$8kA{OpB))US(#D9`2+J;_U78jbN$P5|z~q-T^vmS8dG8ljzcV+< z^(Mcw{Lb<_U;ACc2c6ov0AToZdICBneaio8I^YA9SJSZwNGL{0GSeT2B)p;5t0WoYv*IR}XCS#Jt^ zqT(CP?A1BHAh?(5m&`!0ATctOTrz^LHLdm zeG`3C+c!}!EuohZ^iqOetAtY>NCA3r1HEBMy^?w*^~Tg2pY&W@yz>1)--^DMbNF7} zy~X#vbC$ya#dahhiPRk#$6@ z7qFBJ{fq41g8dtx?*a5w)&tiU>-j#e0Q5r6SwbK_&9eN)R(1y<-`>n5@52${jC=ql z`vZ1)ParNg`R@*J7ZZSb*VMbE-gTGW&N=Ei>iy!`9nrM)PL@x;6Z%g0;UnXeJEi5T zI%W;)Xz2TymN05y`H%Oed~bcew{u^*-p6rJEhKgvn+a literal 0 HcmV?d00001 diff --git a/data/tilesets/primary/general/anim/1/3.png b/data/tilesets/primary/general/anim/1/3.png new file mode 100644 index 0000000000000000000000000000000000000000..6c6ce36112378d99917b0093ab596a7e88e424c8 GIT binary patch literal 527 zcmV+q0`UEbP)1@fW|rxpg0!k%C~3Bd+7Y9=?DB4!cvIgB=$fJ?17kpHj2YiS^`B_~g< z>7MtytGcC7Rk47@$O2QDn@wbBW}@@*2T-W!0<-$WZ~KKw(>%?^-8Y1H==(B#4OH-z zvZ2rK`G)ZA6uw$@D9w7O;>}iNG%sBq7Upu`y2A?V4hicH3AupF7oudi1uRAuDEqli zpVQ~``364s+jErI0ydriOEp!2sLS-XZ}MHrv_??+%uN=!=0^P<{wepb&oSB2SKs>5 ziui{5VfRtL5p)0aO-ER#n)iTaLhs}zo@3J8gB5f0ynO4QBQZCzA1NUhNRr(%>c`S0 z7SU>@3aG81uaJFruZn>z+qRV|@EoHmu#`*nbt&hns-(Rv--#B$Z2QV@=L^ujUVzgX zz`ucFFl)s)8q+tXZ+y@9f%^xa()U8&3wEYPsx9`G1>ppl~kH5;0a&6-G(GG^13-|7sc z?U603yS@dcIcL0D!eV5B>%HH1_h9-)WXTK6X6`TZUgeDa;nzKpJN)N&`3vx`8C4us R%5wk!002ovPDHLkV1o4j1+oAD literal 0 HcmV?d00001 diff --git a/data/tilesets/primary/general/anim/1/4.png b/data/tilesets/primary/general/anim/1/4.png new file mode 100644 index 0000000000000000000000000000000000000000..cc1f9576c72f3accaa5b94237538e5f26e7d7721 GIT binary patch literal 461 zcmV;;0W$uHP)7!W421Ox%GNPN9m9K`z|oSi1!(UE%+3xF=s5~x(cAV;sekIYfR_(Jj=mEq%8B>h ziDZa(M=wXBB!vHoJ4j;yN-|JEK*tXwr09xku%>cjt z%a7r}T}}kl`zN6p$So9p9mBITDvW8T3Cr9WMn9uq8+~**0_t?&w=G@D36r0GIMIfY zV{V~{9I>3=-dxGp(}(8swXiDMS3l+aQ1UxJHH^5>=bSy~?0tq8+%#@sHNOI`Y@t~6 zaTAN{K9qv;K2$T1TN>;7e7c`nEeDJ2&IaSq8{Q@D<}1PCFx2h|zr zd<7_^2f;d+1bhKi4i&(kZ^u9HZG0N5_pxH?a91?g!e zF-9CCLn3dhoG|SH)EN*72=PY5jEFtRR=f9k*ZcSZj28dEICzZm00000NkvXXu0mjf Dtz_2$ literal 0 HcmV?d00001 diff --git a/data/tilesets/primary/general/anim/1/5.png b/data/tilesets/primary/general/anim/1/5.png new file mode 100644 index 0000000000000000000000000000000000000000..3c0c57a86bd76987481efe65890d92d5d9bef2b8 GIT binary patch literal 460 zcmV;-0WV+45C!15f-TXi%UJmlN9Y#3$u^S1-jdxlkxEv0>4|{^{o*wmk`gqwR6PKAEgfNh&p$`f2#vm7aHaj^5U?y z%Ei3D)EB$TY`Vw3ndg1~dXCBs+*&u|P2xTeQ@qa4aevNX&ZyHYQ3*}pN?#|gGYb{_ zHjneeAv=H+m*Ddl=lNlDwZjlGx%?hrRmsNyMvc*>`AxW_CH9@zc9Q90$v*vRagVgq zCG!qYL9CU@?k(#8#EG_(6wE7`S2AzAmbWW3^EC6$%p-R9n0M`)_gAuS$-Zx_Q>;_E zv@7R0GllFw`Kv%nocGE1wvgwt_I<29H-}3C!NdU+ypjunk2Y|%zX6K`PtYZL!dH33 zB@HnRfiezep~>$-GY&UkahSi$F)vO?;OC&~#c#`u;}(eqgt&Z4z0;Yjy^c7i zD$cph0xeK?D^8mkXh%RJ*3_}u5GtAy&<16plNTZq-~CdeUkIpn@q`t>g2olUhJFoo z4SzyxV+X{SiZ<5ViMTG|Py?tIXaTsA8(HnDq@arzeZ)Y&U=#f82|7aU8P)a-eUux6 zZsuFfU+>4+|sX! zXh02EsoKa`b+nZVeKQ=@;H#5wJnT-o#LFBn% zcu$DNQ#Dot5i0@_V~~+B0{2>hG%e5q5J%RZvCKhYwXdIofKB3| zKaP;(GSJ|Fos+HKjm;>#ve217{0wxtKnM7{K_NN$?*a+`l{+W|BoSGWE0Wy9Z@+v$ zDBzbLWYY(nju$^(ktv|o=_+mC)Fq<#3kcIv3_% z@dUsA2uWcqO%B*OV`#4HND-u1Mj!%>qHbPhRO3vqb&Pbbn@A6e=51ckP;;K4i|;^P zzbhgpUPdzN_f7rEctPq{;pxH8sMSwJrG8cFm*kdjv7z$3m_p}N=QMKLN2PsKn){-; zmR>dTU-xEFz0BpS_tD{H5`!2quNW0Fa)&DLLzt<@H$5rFQ@3EGvB$#{4x&2`3dUxz zyZ}|A`5WF+RUOhs2&ftgh1Y*5%IL&g#}54hj4|ENlyp_~n$BA6y)Eu+V|w z@M|{Z2@#LnL|!KfsIPId37wwlU;U@!&7%0It>1O)1Jcj17H?K5K6uC9eraBS`Qykx sY1x1N#ju1Ig{~F3$rb+TyutOqe&_Co{5!&NO#$RMPgg&ebxsLQ0M~p?e*gdg literal 0 HcmV?d00001 diff --git a/data/tilesets/primary/general/anim/2/1.png b/data/tilesets/primary/general/anim/2/1.png new file mode 100644 index 0000000000000000000000000000000000000000..bef1f3023c9d9b6a48a309ae02a182243313995a GIT binary patch literal 243 zcmVTT8S0t;F)&l0k}Xwu5DB%Ds{+{qkP*xA0kqqXN1&=AuUJL zMym}xRg5%4=OjZ}NiL8f_@{t?fk=Id)Nkk6)LIkLPf^E(n)pn0 z$}`o|$|PxaB%T%L)=2bFjEYo3q(dw#S!0--o*fc3JS9|Qpj?=0Tpd-vDVEJ@`^|k+ z{6|eFOK30wU8vxV`}>WBUlptv28$cRYUsEA*Y1(2598-o(=oFSo$eSvJ{N(Nd}v@m zUCEEG0SYwK+tC8QF@O0v_!;;W9+2anvzoiP2WxbmPG7-P8UO$Q M07*qoM6N<$fN#EKTP zAq??9&{z#EtEXkVdja#xr5@n?;fTe%vHzYKi(}i?5iN_qZ8Mss)>A?x=C&^4m3dfA z8J&6B=kG;~l}t1CYA?8`Rfws&^HjW>q;nBOzLK9wtvbZ^04)}fKWzusF|O9%^I2V| eZuzTwpSmwm!_VX|uNmF|0000P)0Y_L4`9j zUZkfwnoD($Qeup>IB$z+%77gOrJ%YQ6-rG+n*YFhVJO;Jbe7TuY?EqP{jC=P*!PVp z1f1wAE|$<*Y&&T71a1<4hE@du;9QiO=nx U($(wXeHr9zPgg&ebxsLQ04%*)L;wH) literal 0 HcmV?d00001 diff --git a/data/tilesets/primary/general/anim/2/6.png b/data/tilesets/primary/general/anim/2/6.png new file mode 100644 index 0000000000000000000000000000000000000000..784a543b4eaf8f0c9ba1fdf61399fe7fa2d668bb GIT binary patch literal 203 zcmeAS@N?(olHy`uVBq!ia0vp^96%hv0wfrYc($DZQjaY)u{<5H z%-GJcZ;!4k-!@js4STaSS1bJFJXw=Ap`+lTvR``(bCH~ZldsIS51j((9C4g&H>?w{ z37c&wW#A0$dsQrV(XFif&+)9=8{bDr$a;ObXY@EuYxSDC+n1ILUsf%dA@}XIK;Jvv9Tobutac* zD>Mj{H!?UW91(aW!rD6FEVHm%!sNhS_H6CK!ooBS^FqCJ4R$6D#ke?)6ABzG0!}Ac hj(Qn!stOA*vM^jN3aGl2D*pgvg{P~Z%Q~loCIIFCAxZ!M literal 0 HcmV?d00001 diff --git a/data/tilesets/primary/general/anim/3/1.png b/data/tilesets/primary/general/anim/3/1.png new file mode 100644 index 0000000000000000000000000000000000000000..5a2744a665d931bdf17bcd8e2ec1fc5cb8128e30 GIT binary patch literal 154 zcmeAS@N?(olHy`uVBq!ia0vp^96)Tq0wfsD?CqQeq!K+{978x}EMn3p|e|C>8RUVN26|sC#;;GPJ5bdk<01(p=-B>eeqk? zrRpgTe~DWM4f Dzau%{ literal 0 HcmV?d00001 diff --git a/data/tilesets/primary/general/anim/3/2.png b/data/tilesets/primary/general/anim/3/2.png new file mode 100644 index 0000000000000000000000000000000000000000..0ddf1cda70a7b04241702d3a45c81dd3a638bbd9 GIT binary patch literal 133 zcmeAS@N?(olHy`uVBq!ia0vp^96)Tq0wfsD?CqQeqJvv9Tobuz0j^ z3kW#>i2Jy=`-pB~VPTqvd7)mq20IgnVqBcY2?Y)o0jIzKj+=1?i7aJ|tBf1eG!5^t eGI4RHcgQj<+3F`9zE1l!$b3&%KbLh*2~7azMj`nC literal 0 HcmV?d00001 diff --git a/data/tilesets/primary/general/anim/3/3.png b/data/tilesets/primary/general/anim/3/3.png new file mode 100644 index 0000000000000000000000000000000000000000..f3fee847008a2125cdcafe2bb25349c59453a353 GIT binary patch literal 130 zcmeAS@N?(olHy`uVBq!ia0vp^96)Tq0wfsD?CqQeq&z)c978x}CI>Jvv9Tobu)JvD z7BINO%EZB~&KSmH$a+;{Lr!ORx3Tli&SFbvO92OtkDr_z*&G!b1iG4>PUJBPbDY*x bb9lzcpeP%lGIO(sB*<`2S3j3^P6^xj=$*fmOKZZ&Ad-qAzxwpW-P7dl(Pu>338o9)HdYHbZbu zusG*gx*z*%m{b$879xotX7)*9pGXk2c3l|bZiuQoQ5<9~3nVVq;sU%-ukl0cV_f0000e`WvqHC zjw||f6;o&M&MCF7R$S}%sS$~kBmR<;0^qb$RCL2A=%c5EED(W z(cIpcf{;E3;8hZBuhLOteyKyPL_+{_fJ=^m^uWa{{JuwI(U5?v`3)od%xV!iqiqWY z^bTUSXo0b&WPwt|8zw!l(}sZ|Mun~!A(t~LZrE5CzbG1&}-Bf`L?43cy_|U{ghDA~>m)YP4_%oK!2PiBd(JfP(zNj+>`lG4po@ z^j+Mbk0i!hv=`J-qDYNmugYuS$;h26QMtB6DCH44#}}x6&4hIu>$)g1=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z^m(?4J8U-27>Z-^b4Kk`8pP^GCY}LXn slAc&c#@A&ofCOnrJ9nU9>KpPC%51ZqdUdOr|2y|yTm9T`xiR?v0WwvuE&u=k diff --git a/data/tilesets/primary/secret_base/tiles.png b/data/tilesets/primary/secret_base/tiles.png index 9adc0e13f50a201c01e127b88079828ac6bda39c..9dee014ea4e6fc3e93c00e0080ac40b61957759d 100644 GIT binary patch literal 7869 zcmV;u9zx-XP)TvqhInR0D_xvew@kiExlBQ`=68v!jfq*#Q&Fa7+ zF2B38o7hQMf^04_wYm}rY;q->1vU_cd>v}a%VaV>E|1h9lgiYTm&si8ae1U3?_8`a z@9x=@ICknTVB6x{>8N0jT~prK)E!suo&{{1*ja&or>?wYGF!o40zXcov%GXic8WZL|M>r%_@6wovkYFU2P%syuZ!=oE168zLf=Ka1&pLpUOx3F zd0bBdxR*@6xL)*KsS!E73vHU(^%Nxy{ zhU!v4idelo+otO7ru@`u<(;M0QiMu9q`Xgl1%=(B)+oZ&%KH^d`7sqH9S<$iKsF5A0hAK;`h08E->&58)3WPDw9DvAr*$+Z8e4DjGH)fH zep)_BzVWoAE+NZ1nal4q&G*I|$rt5~r;{(EKQ5&(_A{58<{KG-)>3ERIxhOirHja% zx!5$HH!joZwBI=P?I>VCW*;Abg}XEMkK#P?k5Nz0Y38$;Pv4{Pu`ar8=z@eUI}M;A zpF%$o{8;Z7-Oz&))xCTJ(k3#%ED^Dbg^1kI0b5^+$j5tt=uU}<%ktbOP@cPccD5dK z;*Pu{NVQ+6`Q2Ik@i4dkl~=s6+Lme++9p;dmZj6yY}~) zU%JTh(^|A~7|8!Zs{H~|Zi)3P*{Gjmp;pfSA!Zd~#Ls|KY-Rn7r+}XsV*bpCNh}^W zC2knTihMu+5i=*A!P7)S3}c@UG@mPJ8<@2sz+VxwW&DUpq#|{8{NUz;;(QCH%K6sI z=;_0Dg7`CD{;tNZZDzhCP2|fq@Vh^Ul}{+}vN7L_w3DjLCa?2*K&dr}tS=v6!zx)DRc)1#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OoXiNuDIMESxlgoOLJBPrmA?W_ps%~yah27t<29}?LTzbul26I!pbhF z4~u}OO}cm4KZh2+eVl)Wf)PZBuha#z0%Vb`ku^ct5w+D2&FZC)&Cdm{ceCJJ#ZeGR zK|wOSGZ}DyguVAl4R~y3^!s9Cm<9O!4$mNRv|oh!guwPz=Mx39KKDeNu|eft3$+|J z6+hefDKAaU1rXIvdRo^qr@i(f_Mm+r4Am}t>m-Q&+ZH8Qj8$qq_lIA-Iui0K_P)kb ze6)*XR?lPCpm6(Bco{y@PIpI%gVoJ3ie?kK?CY=_A(p{D?e;u=)dA_SNlm)ZN(nR= zdZo(I5Q+=svpRLSixu3J)%;lg-5PQgC+VQs?dO)aPU&2-OQH)|zcLk+06^zoXiDJy zRSM6Ogur?TD5Xl!I@HJyCj!j3v*2?+v~Z-3x11qYB1k7#Vq%D-)Gw}40je?=;pn~T zuO=YL`mWV*_pxXC8N2xpIPmK0zAs>^4Iv2ghzLD?SohcLZ?}-N?GJt{+cADANPex@ ze}$1$KF962%E}E5CK^8T0fS7b3Q7)5W*=g>dy8T_|CJ17Sn(FYSEuEsl@@WoJ>4Eb-^0U5&ZrM=FaM)m{s#!s$fbuS S-Jt&e>rPWuPo-7~8~r~(;O+hZ diff --git a/data/tilesets/primary/secret_base/unknown_tiles.png b/data/tilesets/primary/secret_base/unknown_tiles.png index dd5c4e16a160f19936f19eac208086949e6cbaf3..3ca4d9e87975b45c0a3670b30d9ed6c0d08151e2 100644 GIT binary patch literal 1316 zcmV+<1>5?GP)H!iXgz#@Bt}4J(73dyHRBEp-If) zL(L>fN^Y-1#Zk%Ry1A5W8qR?@Cff|dYh79(K5AJClU+-R0kOY3`IckyGj6Y|h~BgA zzrnAc5`9H!x7(%k8J|8g<|5r+f8t@X^b3(gD06W7r9&osJI1`NF5Gyd6hnlm;7Kvf zTjryh6oBbC|8B^*WOD-ozX0Evh_8B8oo8|C@{yYx5a@_J2E{1JqZ@8%qD{(!J)&G6 z{*Ke3JFyP^Eltg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Mr`_rtsh`F!UC;N=`arJ~lmHwXBSazQ) zQTBA0JJaTKP2-7eX0hejm;Gl8JviSVRn=sxaqB?!&IxCP%UE{_F1noa@R_zOZ<_ka zWw~!S6ek~H_}TIOOG|B2f5$-?gZu_Qrpk@`ZM?VrZjI#7P*nI*dL_7)g)iJkYQfCs zw?vnuDqKeTL{;Wy*R$C)?l zQ(vv@mfE{DUi|Wc)5<9vJ-+5K#uGXPB7AQ5r%JD1D|x|WeYxv|d1@ykJg%28pZ~z; zP}$;JvwL~U1T(+m^Nu7v%Upd=>dq{uo5%Q@+FoO6IFjr}ll``g!<;)f)RC3YRnSiUjj5zFySofm78 zb64(Ci@tcZjQHy*Pz_oO8sBK^y5AD38fVs_z5LiJt-g`UYq%mFuA*&2*K8}!aJ z&*5h7*_Hce>&+*(^&}LG-6sefH#~M(<;aYg*=**1i_cZ0-#D)OcHL}QcJ5dQh1+r4 zSN12?wIn^>VcNSRxMEv}Uis~Poj=ZtZG2{DW#AAava!c{h5(0U_Ybps+l&wY6ihSv z!0^6f-+8N}b1h18mMP6RCfnhx`cy~n4CA>qy!&hq@fe7Q8FrezOVBM;YQMb0qE2JO+w6;GjQG1N?*GR~)dvq2a2fnO`-lHN zfAxF*o=N%tz54FUUvU34+dgE!6R(<+*2UGAj+rX*t={tSoL%zo@7g7a-DP{X5HPJ@c-c2Kjv>N WZ(jQ-)z=9smONekT-G@yGywpw;VJq6 diff --git a/data/tilesets/secondary/battle_arena/tiles.png b/data/tilesets/secondary/battle_arena/tiles.png index 43297aa7bae64f487185711814eeee3581b42a61..7414666df9d98fe97653ad91593933a04039b725 100644 GIT binary patch literal 2340 zcmV+<3ETFGP)b7$1<|3SJ$#Rv0lR~`r-VA?=qN$BGxgP}l#pC1Sn-S;3H#0QjaIg{_ zQBmO#LLq76)>XB@3aYv;MahC}7uT7xUCc5?$z~Z>vYdT`!QZT|t_J1d!-r8HC0#|! zmxmY^@j=+{(FzKL&Goi@`W0T_^4elf6Y z{2g4}M*O7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9@{lKIJ6OVAuP;&A8Is2j#|jIrepW1V+P3~uSEbb~pyhkVt zCUavO2k}E1Vr*N8QfD-DBB&c&Axz7a`4uT}u(QQ3&gk0g(uk&!qqNUPpg6RZbV9YJ zGg=$lvZYlJ%&N&zT#SP7K`Y}`h8|P<_hm>_I;7i^7yhg~Q(^o%P=fnMR~?chHP%PC zJ8bq1?se1vCRNesnh|*Ah_G;NbL|GV_INcembgfMC)NJZD2Iz4rVvSkqkzfA|IyuS zG_#1@k|-MI%!R*&hGK~=uQPwSmA`%*q9vyJbT3?<0Lz?}lrQUIeilUS^}y+`L~#C7 zi<1Vozk;(@8?S%y1C-2C5@Mdp<0KQ>v-k1Gx1JvNNMK|K=Uvg`Uh2VNw6DdQz^XZt z!F@`l8m~C+r5W$s7y`-Y`5@!_WxD9xWw%VlY|05OM|bRu8Cl$m6E*3wB#ZLN++H?}F>z$1)`?Xe;L4`0fnY+X zKpiQG&qpriezgqA#`QPvwQ|gIb&hV1$;9UfK2biKkz}R+IzEQ1!aKevs5+R$#a`2< zHsL~+<2G-E-OcA$uo1PNN-9Nt+@D&IJBi_6(ACvZ9PC0iil8&J-s3*tH`c#_kV5<; zvh;m?;R=I$!I5#$=R4Zecoa6YYfMZ1rm7<18bU|S(6d*QvQr%%*Qs)Gn=Io(u(eJ_ zihj|BSoOM-jPrH-7~8cp!+wZfus~JsW4ue-XcMKW_pqBUt@C-y9!}k)f@xT>p%FiG zIY`r=Gy)kKsj7YrQ}D&VA$!seEo-2h&EG}d4+lRK5l^N16#34)%y>k*AP-+ nt|i}led`_mWX8lfYw|kPabR(9qGH7Uzb|89YRxP$VMYBPzmLz9 diff --git a/data/tilesets/secondary/battle_frontier/tiles.png b/data/tilesets/secondary/battle_frontier/tiles.png index 70ec420e9d72078ecbc86d00be58d8eebdde8738..1b14ce5552d60b4d8ee8f755a735689e1e8699d1 100644 GIT binary patch literal 2647 zcmV-d3aIsoP)a; zcc38%fZUleByN+iEGu~}aT~+3Ca>AljhCr_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yhdGoe99TH6D0EFQ8E_sxJiax{s3rp7aQx3nr>a5S_rJBs2It02HhH}|0Vr4|JjPmHVxWb22D-k&9t>bA0H*R1 z0ICmGOlm3ING*jM@qREN382>ea{~&@*=cp+P*qj4Q%E9!?=f}ZZ8@)&rHdH==+hK{92YTMk^;5W z<#Pd6tNB_Afa=7|Ca4h?bup`XGX+3x2z%5pE?3V1pbji#2f#Byaci|o`!45e7Hz0y z0938jnq^f{{aQY6;Z;5Z0LKnW=W?|QHWc!C{6QN>Gy?z>x16ezca{tE!z$pArUv9` z1Yj6Z4QlMlsip?pa;D0IL_kiFldP2Q{l(0%<25vf(%&tiuV5fKhguP#{u)$|D@?{rUt0# zJaAj&pC3N{XlB5+=hpWsm7UZ8HJu;2f2lumocCu3*!IVd%H{L`wH^TA4_kjM-=A57 zPwn4Uwv82zGXrkf_ZFPTA38GwmYfHs;W)<30Ml5&9hEsVK%Aro md>kLeA7%!q3jsk&+yB2P7crEeKF09?0000+C- diff --git a/data/tilesets/secondary/battle_frontier_outside_east/anim/0.png b/data/tilesets/secondary/battle_frontier_outside_east/anim/0.png new file mode 100644 index 0000000000000000000000000000000000000000..8a9905198e98746671448b35fbd58bbcbea470d0 GIT binary patch literal 191 zcmeAS@N?(olHy`uVBq!ia0vp^96)Tq0wfsD?CqQeq}n`P978x}ruG?fF*|a&{#U)L zmt$Hs>9WdOITstZWs)|>%rbkw>SN=dvu5SV_ndrgWSizwd=fLUA8CTqIks) z)hi0GxC~{l-#g;@{lKxUcOG@eJwEcQMtf;UljeE}_df?>Wz*~yq)K1)OlK5)?kW&# pwto3y^)1^Qmg>2#eU!%-wbJgEcArL^S%@#lWuC5nF6*2UngA)vN`(Lb literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/battle_frontier_outside_east/anim/1.png b/data/tilesets/secondary/battle_frontier_outside_east/anim/1.png new file mode 100644 index 0000000000000000000000000000000000000000..836986b1281bfb14ce636f381db107667b99cbed GIT binary patch literal 188 zcmeAS@N?(olHy`uVBq!ia0vp^96)Tq0wfsD?CqQeq?$cl978x}rk*q8Vo~H_y-xO{|M_=sK4_O-)+e-~c&YuL2WmztX-uC5 z+}U<)W0QMjp8M<1?0^GPc;=pVvd}O4lxl#%WTNu5IF5i zshH@yH9p0e#vDn!<{gH2Vw?|%yH9-dsFSId$L`|6_3CWus=5`reesW2H#3~O)u6?n zktMXj;rWbR8}3!lxFGn{?O%K1GP|d{EUW91@9K8mpRuvg<4I(w<57tmk!C-;g=<3M jgzxm|>uUDzowSG1bLONSR~CGE4RVvGtDnm{r-UW|9*{sK)CYS@>YXj;HBM>@{!x>`&f3dHVth7Pa(($$Vzl zU08f$uAN@sp77Y`*<`8sU;Wj8?&+PAbib3K#aC{)B5mRfX`gE5(sd^^Q$v4gZ|w9b h`Sxv=@rszk>hd~!C%J$AzvC##MV_vHF6*2UngEnuN3Q?? literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/battle_frontier_outside_east/tiles.png b/data/tilesets/secondary/battle_frontier_outside_east/tiles.png index 20cb7d67e88159ee9587b0225edc237b998adf42..da34656d18d2f6abfb8aa874e845c43f2a15452c 100644 GIT binary patch literal 3834 zcmVQ8dRx+a}Y=g)1)}+Dm4{ta-h;M!KNM{?M1>0 zzT;4o1lE{>P?K%knLyrVF+rUQC`}z+OeKOOj#iDJK*8^-g}m{e=jS`yaqPn>q3No# zbRXG2KmPsw`uY9yfq@4UQA80%6j4MGMHErQj}%*ESq3>0i9l~b$Yd9xv%*;Z5*6|P zgtI))!)cD=pwkZ$9>9|wN0+`}c7G*11{QM%$yV}+l!-M)U@ zRV|s~3IHh}Z2irOV*6t1o@uR(&}t#L{=BsDEZ{A;8Y*Z5d`AohLm!*QbfwKwfZ3^rI8^C~Vo21i0vXrGKH5D5+NCxfA3RIacDh2f79l0?8CrYnj$ zM}S-fzab61K^n@EhVX}=1~4qx zVX_ko^k*wb6f;mtbzcFSxJ?!28D@Sfoo%7J>r8QNBUDNfYOQORH#m>Z zfz^wvi_Y0??u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p;`cSzf&79tsYn$V6ou{jp)oF5DvIP5ik4rCUV94 z$~13`Kj5z`9Eb#5Cz89B__Zeeb1o2=={WEx3c&Gzv$1x;vPP^NAxZ(A&ddR)4}pNw zxdQ^;c13{$r+fgM^E&NEF9rjOlOp%7M{?KPHkhYCS_C?#`-6dLW%lAZAfOs~m^k3CEh`cMwYU|M;Ez=a1R1Te5qwd!Tu|bap&y1c2UF5rMnP%q#)y2Lyojyq15O z0^qa&%qX48qc{SxALvv%XD<-I&bUC{JKP*~T5&oVAl?_Ejks&Jcbov2zCnRxCL`P! zxvT7QW;zF&O8| zIR}C>9PbMR9OubQXU`4GxZ(ooQ@sd`xkFhx=Qx?T9u6J{(8Qg|8!(iw+-LU@)2Bud z$hknA{EOXiIK*!(U9_w(`PmQ0xiZ^}L-{_Ot4Ap?mdW%M0A4~LvJAYy3;?5AuVrNl zfR#>L0RUeQ5a7pn$A&R73z5C#H43D0nMsug@GYc|JFyKgv^VDhy;#w)VnA#IKKGwM z7kBnxKBEM{Z#ho&lCSfM0e-(w%mC-f?0Irwl0pDpt`5*NXEsT%Y(_bd8pS+&iUEGh zQv~wQH0`_(VEmBRmzkpBkTwL|irb-n9Y{l^dxQO+L0L`el3Z(%c zdTInvs13+JtqyQ|p-_5i1)lOhXlAKytPt>TEP()DcX4p}w|x9=g?u65FF_gfuu)hQ zaAC1PuWgfWFfN$p-xmk4uRsvsWB-2(XqKgMK9WdOITstZWs)|>%rbkw>SN=dvu5SV_ndrgWSizwd=fLUA8CTqIks) z)hi0GxC~{l-#g;@{lKxUcOG@eJwEcQMtf;UljeE}_df?>Wz*~yq)K1)OlK5)?kW&# pwto3y^)1^Qmg>2#eU!%-wbJgEcArL^S%@#lWuC5nF6*2UngA)vN`(Lb literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/battle_frontier_outside_west/anim/1.png b/data/tilesets/secondary/battle_frontier_outside_west/anim/1.png new file mode 100644 index 0000000000000000000000000000000000000000..836986b1281bfb14ce636f381db107667b99cbed GIT binary patch literal 188 zcmeAS@N?(olHy`uVBq!ia0vp^96)Tq0wfsD?CqQeq?$cl978x}rk*q8Vo~H_y-xO{|M_=sK4_O-)+e-~c&YuL2WmztX-uC5 z+}U<)W0QMjp8M<1?0^GPc;=pVvd}O4lxl#%WTNu5IF5i zshH@yH9p0e#vDn!<{gH2Vw?|%yH9-dsFSId$L`|6_3CWus=5`reesW2H#3~O)u6?n zktMXj;rWbR8}3!lxFGn{?O%K1GP|d{EUW91@9K8mpRuvg<4I(w<57tmk!C-;g=<3M jgzxm|>uUDzowSG1bLONSR~CGE4RVvGtDnm{r-UW|9*{sK)CYS@>YXj;HBM>@{!x>`&f3dHVth7Pa(($$Vzl zU08f$uAN@sp77Y`*<`8sU;Wj8?&+PAbib3K#aC{)B5mRfX`gE5(sd^^Q$v4gZ|w9b h`Sxv=@rszk>hd~!C%J$AzvC##MV_vHF6*2UngEnuN3Q?? literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/battle_frontier_outside_west/tiles.png b/data/tilesets/secondary/battle_frontier_outside_west/tiles.png index 3d5ea94f93e6d5598bb9c485b3b975768171a59f..03704bfd0f49d17c19946ce58759ddae1a803bd2 100644 GIT binary patch literal 5892 zcmV+f7yIamP)?ewA8YyBs6tnb05UY~N5gJ&sK4R@l5v<5QO#kQ3 z=MHC<Y-`c5Eaa7l?=l) z`3{q8Z2-5~wN)`o1lP`#~@Xi)d;_CQZ=I+-CpVrHBi+!mD6m_JjCc@ z1>Y6Z@+YE&_nGPmd>#)VJ=3u0&)%Zv`rEO#(u48TW7(gh^R zM3PVlm-3OErhcNRnh=e^fRAOr&H+}9(SX+&(JaHwS2G~40Yq0@?wp?XsY-T}v7r z*!6QQRI(7|L=TbfOvXp7Facj{;W6?CDo~g+ zGD*Xe${yeqw+9NYI%{kqg=`0W7`_oqsJP)N5yEs(f>j1I)*7ph^%w5@oFmb?7d8U6 z&-QYRS+6BPV{thcq?^wUnpC}w`c+v-w;khFG929x#lM8KcrV*i+ow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wI diff --git a/data/tilesets/secondary/battle_frontier_ranking_hall/tiles.png b/data/tilesets/secondary/battle_frontier_ranking_hall/tiles.png index cf54e1d77defdf41786e7137e63321d4d733920e..1c1f700c09e77e702b13b90f2888404310265ccf 100644 GIT binary patch literal 1700 zcmV;V23z@wP)l*u5QgtRk;;&v9Y|%!D$##Hme-C3k|Hx~8x0ZBBKV4CIRaH%0#=3l7Ws=PmP^b&ZE~^w)miu8k0ti@b}jjycRVrhJgq5FVEfW9_Ad2%#h?zu96hb0Nf*=w_ zeNrMs5|-dzpp@Vo_l7)}UJ@k`FbZ@8n`Y+_ZaRzc1R;758sUt8IL#seN&;mH(C5o2 z3n5nl!_*ws<#g?0Q~-4?N-qu}W}%uWheT3jnUXQ}sfZj&Sb}?jk!07nH|N2{Au$3n zMwzc*)BGC3UCg!AV~C#RMmXaiPHP1~Nnlg~^!ZTL@UQFHfJ5{;fMpSVv4)mSIE{Z+ z*LKCWJFfJ)JxjcfYm3*jI?}Z}ed&3<|4KI1S<2y7h8!rN zB)JNuOcLZuM6(PzmD0a?F~*o1bM%?{cU^Jx&6z_~(@Dr7wJwlTdMxuw7ozEl$~o7R zRx}4+O+j0KF&fEXu_)v^ACF{|*FH{bh=x&wZ?3Rj^Ag6-#c_ z%@+_@L$j&?d-Ra+mG!`3~WWJw(o?e>VNIhg}a|(V_KobLn4~ z{<-w8Pyf0+-Kg8=l6>;|2kvqqYPPi6xl52k#+2Br@Aaudi$e7@%m?(MgM zRX_a|Jhbk!@3#Sa=utR_z`k6nhka>uG-6tNxAw2IxqllSTj98W9q!)__pi+dYB^T_ zvpNcA+dJ$BcpZZNH99t8?pfdR_vEAE4dr^%zYpfLc_p2vK=(f26lG7F2{(JYzc0!0 zWC9%3tEm34iU3o$zyBhY$>gAvnwYHdS_4NlaIbJ1K7U!HY-6~6Q{8sqHr@{(A35MZ z=D9tSBp;u zX6wdhH;B%bbw;i`IOA{aOm0vJFk;=w2^0wQ)s>uRMD2i@W~+I%RORwgu4>I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 zdDRnWD*4yd)wdq)ya!xgWAQc{%*7Tqcv8aGyl?qq8;<~iyt%p2GDyG&sO24{pJ%ft z0Inq}kQ)G~uTp;fm9a0giynaQ72shee$?_Fp!)!-EY|?41mHC;dI9LCyF2)?EWhp{ zU{(eD@jwZ_K=-*q`w!RG^^v&QoSlj`AZQNN;K_h% z`KNmym-6WfmhAKFKHjm_{{g5!3(o>H$NG~2?XiAp|9?VYu5ID6Lw^7O002ovPDHLk FV1h^MeKi08 diff --git a/data/tilesets/secondary/battle_palace/tiles.png b/data/tilesets/secondary/battle_palace/tiles.png index a848a9eefcdfbbea8c38bcee95f029d415a8f7f2..4e11e3596c2abc3d645324003a7a1eafa6c01f5f 100644 GIT binary patch literal 1633 zcmV-n2A=teP)&Q<3U4&K!_;f+i(F$3wY2FQP88H#|R=u zuZVGyB=kB>Q#wn=BYHg=jp>YUb(Ewd`h7B)P{MiX2pyyGD5W$_fbn>Ywq%3|Z4=JB zPD+*WmB19(HeF}f_HrmdP07ACozgC@Wl%sfrro_brYWv<@O8~J*FouH^2pMyVE*Fu zL)#_Cbz`c>eIlo6@NJvO-is;803{#j!jcYMFu>OLEB0lK_miP=N37t zxq!HTi+gV^8oNbX+uMM>HG}!tmhPD6HCV33_I86B4SR+!&4%vSSE@z(coEt$;Mz`A zEnp)CxVLbb_*xk-KnAOpwH4D$4coNfIOmzBowdD{XCbdaV|^!oSS0)&4CJ&fyM++Z^3-o^S>WXK;s+ckHl#J8Sqix6Za1HNe8e z>j+Bd-l8P}JA-K#l(J?~je*Zv{A!RX)2x;caKZ7GgT2};T2}-nc~hpkasmJL7_0W* zB3A9cMXc+~`^MV-zfyvTYbhGEfT$ePF# zWtlu%=+&;hYrL!6adq})R3US-f=_UaAbX)oj-rXH0T+K}xqh9a0z5aq1*+J=QcM?( zpJPLl{jJyQVuM5_LOsuy;uwWUha;aWiVo@xy$|}lk#sP7m@ z@4$45m38_C{{*MJAag*@Igl0jt&7`akIdmZR3*FKZeh0Sj$R^Xs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ot|O}GQF;6$>I zDq)d7G;T=&eUKNiz}k5d__te;lQwHJ!!EliL?P` z4)AEjb-j^$F`Z6j^i~0^6u`D^7&dL1OlkVMiCO>x8mPb-X@Eop7g|9ofHuAiV5)V1 zwe&Tu$>yc;Z5Q_pk5s&rQ8blO0c z!-=hTszpG$7%o$=d(!0B19U#_|*v-w$X)m6v+>kk){XHOsnCeLtuHuG9C#`HB&~`B;kg;o5-L zd(^Lcj`N(ZulL|tx+1L%;IB>`=LP3a9A~`6_h6XrRI38s^H(qE!~|%lCtLgtT=8eM zd2n0&5x)9for>|}v#szxTs8k*b*u)M_i$)KA0nQc_uR$d!WolNTjs?+&DLeb|&0v(g| P00000NkvXXu0mjf3CX9^ diff --git a/data/tilesets/secondary/battle_pike/tiles.png b/data/tilesets/secondary/battle_pike/tiles.png index cba2f5794c3b16c52fd35101900894009fe84448..fc11f1d1aad5ea141001e340bd7ff2fd5ff79a2f 100644 GIT binary patch literal 4013 zcmV;e4^r@nP)S43lR1bfJHy-{y%J;25 zok6=fn#`5PpwF&UG5~y?drf0b%^AjP`oX{qCbK}C2$*-$?R5HPFdN+jyUg2FozB6o zetOWs8@Z4XC&aG9ygWpy$$9hJ=F~PXfY@#0qf5@y?p_Y^w40A+K4frEEytyEFj@!X zyT|tJv3>h&U$-+b&VqOyjh2@uyvaF&(jpre&H`8vmG&&uO(Dt_AJiBa; z8u;`fTOV1KEqwYrC?$_YYA5xM#Ra9L=!N#X5QuFf<=NDl12_#8{JbG>R210nDf?Z& zr+#ju=eC2C=Xj4)!y_8+y2>N|$#$u=FNwW2z*X_IgF1fS1$qY@m*00{U-A$|wKoAh zrhr0(5)!o+V+(7=uo(*7DG5-QED2!0jfq zcKbtqZEeIU$>UR0Sywkq^QYq>CX?!=Pk;Ns&Zh(ic4rlnr@;x$dsiG;Hq$ck+gzMu zv6G5$dwYN9JnY0G#I8m+@|^+Kg0orgyE&sDM}~<__%)ozxvLp(03`!mFc#nFhiP0w z>aU|-pVPNBD+-f36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CPhyZ#{|aNDrc+t{?LP=Hx_b<*d$s4xhb zC?%p}c5D|^@y{q}q$RF9_ve>yNHKNnda|Sao0ldk~CvG(Gb2JIk+Sq7Voq_=)a$3a}z7$QX^W_e*h2c%ZLB~ diff --git a/data/tilesets/secondary/battle_pyramid/anim/0/0.png b/data/tilesets/secondary/battle_pyramid/anim/0/0.png new file mode 100644 index 0000000000000000000000000000000000000000..c0fb59c0e021d2e655840d435dd119e414d741a4 GIT binary patch literal 228 zcmVcM=2c5=0lxO1pja<h(=y0rRB7o z7D~nry0A$BXB7`&rpqbjzOk|qnOlkCd eVmi=AD0~3+z;#HmFuY;_0000A0wfrY&u<9_Qj0xZ9780gww~F@b;v-Z_2FkO z@ump*C66RJ_-YyA7nnMSwU?D{lHENsr&Y*f-X-DPT(NfV8c+9^-~TRgtnf}_K68bS z^_yjJGxpg3=a=ae@tJwP`@e!&m|4&a(N}Ifi>66mTBDP-R&I{Vn^y^Zty-)Sd$+wX zc^(_yxMJIbh`{hLv7;G!7v}_8Z&tFBwyeGNqD8be$<;{Pve-;*+k@H6_J{iQd2-4; TUu{-+339fltDnm{r-UW|w$)V3 literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/battle_pyramid/anim/0/2.png b/data/tilesets/secondary/battle_pyramid/anim/0/2.png new file mode 100644 index 0000000000000000000000000000000000000000..7c463d9c3b0e572d421cf5488377285c277e4f76 GIT binary patch literal 219 zcmV<103`p3P)jaPU(w+i$j+m`NQ{ur}rM? zJkLAuYy=<64*%QfhbEK4viir)FUP_utS_WiS#r?Gp|Yr3U6SOW&dhjc#sO;B98^VY zlLOiMg2PQQJHxyhW)88;L~|yQDT3PB4ap6Ox#lky!&xJo8R1NX+1k{DXAZmwAKnv$ VdF6~(0mT3S002ovPDHLkV1l|=U2OmW literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/battle_pyramid/anim/1/0.png b/data/tilesets/secondary/battle_pyramid/anim/1/0.png new file mode 100644 index 0000000000000000000000000000000000000000..2a0921dea85aa33119550b0bf11f8f72807f145e GIT binary patch literal 261 zcmV+g0s8)lP)(@)g2UZdp*Ui!(8akOlw?E*?s&@D(2eCMTXOyih#Y~4 zy}=;&ilkCN-V+=v%$;$1p_VK<*)!f7<4ps(f|{5>Ee9ovuJ81`;~Nw9RT-0(bI?lU zD?x%nKf028@Ucm8&gJ!v$s`c~FOncwZF)v&U6)}ujCYMh~*;|}@U zwg3Ef4RZhXg)EC+xh${_W5GO33$EK~dUD!M5{{ok!f=p;!&1^8Jpgy~X>hlz00000 LNkvXXu0mjf(cE<` literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/battle_pyramid/anim/1/1.png b/data/tilesets/secondary/battle_pyramid/anim/1/1.png new file mode 100644 index 0000000000000000000000000000000000000000..3474d081f891088b8ff0d8d1f91ec8a8796a2c20 GIT binary patch literal 267 zcmV+m0rdWfP)YGnB) z#4r((!*6z!nk(BEqk6g=JbATjblz|DR;}^0_oT+|;{A#v*QS&2E(u!V7J7~cRqVn>F^7#{a!#*zg0II#u#8FY`HEamT(fRg>AtM6=50k?0 l>DRtW$ShHxq~iJO5<~p4A6c#%^TI(IJYD@<);T3K0RRNb7Iy#u literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/battle_pyramid/anim/1/5.png b/data/tilesets/secondary/battle_pyramid/anim/1/5.png new file mode 100644 index 0000000000000000000000000000000000000000..bea921d90e42ea862d1fed110fd4913482f3d34a GIT binary patch literal 86 zcmeAS@N?(olHy`uVBq!ia0vp^91ILh3@ktfLwv-1As{8|>EamT(fRg>AtM6=50k?0 l>DRtW$ShHxq~iJO5<~p4A6c#%^TI(IJYD@<);T3K0RRNb7Iy#u literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/battle_pyramid/anim/1/6.png b/data/tilesets/secondary/battle_pyramid/anim/1/6.png new file mode 100644 index 0000000000000000000000000000000000000000..16652df19896a91d715ed5047610e1350fa210b1 GIT binary patch literal 106 zcmeAS@N?(olHy`uVBq!ia0vp^91ILh3@ktfLwv-1As}Vw>EamT(fRg>BQJx30L#YB z8!UEAY^cw7IKdcV0}gaKh%Xnmb}_7&7rF#-*j8*I$;UjmbyK49cxh}iLm(O5V8P?bY3zgD>T8e44-c+xf#7`NJ6b!*Awq zoKn}Wy4(C+TkO{`n6KAU_~%YI`Q@U9$e%|3n8N#8y}?f2Ufmzh-%j42=I@w)$NW3y n-!cFG!TkH+l6Nk7<9Z37meuh-l$2BE00000NkvXXu0mjfNMW|J literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/battle_pyramid/anim/1/8.png b/data/tilesets/secondary/battle_pyramid/anim/1/8.png new file mode 100644 index 0000000000000000000000000000000000000000..2895d3319a5c35f73a524731a21caa8f30647a0b GIT binary patch literal 105 zcmeAS@N?(olHy`uVBq!ia0vp^96&6<0wfqt3-&AkQU;zbjv*W~Q;#?bGAMAk9-RN} zBEvDZ8xB6NA567fb3mY_Trp?bZZDP-yCUr6?^^w2NRXB}w|H{pe~=lTu6{1-oD!M< Dhh!kZ literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/battle_pyramid/anim/1/9.png b/data/tilesets/secondary/battle_pyramid/anim/1/9.png new file mode 100644 index 0000000000000000000000000000000000000000..63c22acf2b98595cf3a22b7d9dfdf18fc3847c02 GIT binary patch literal 111 zcmeAS@N?(olHy`uVBq!ia0vp^96&6=0wfsJo%qfIDKk$O#}JO0y+<|*GAM8`AMlYj zQ;@FM(V(ukI_UO~qs=BwQ^J|v>Q4`tv<)TiyD za!)gIVocLClo9ekT00MySQWTdGnq_)M+jNqk*q9ZJH9fMWn>@C2$9V`jIylwmdIu@ z4~r(*tev8M>51dTCD&={lA zP9wWfG8xS#AY_-#Y5=mMBNC%xRMSReMb8X&XMxaSP+66xMc|$D-4wbivE;hKqw!mpl4>r+!gX6q zG=6RB`MgvFYeQi<5I;`^BhF3%BZ)^gVWJc}7`&{!UX8~=Jy&U0EsaJ4Bebx<7-XmB z$ifwZS|93>F0OC~x#dIzcKqB#Y|u)8&P{U?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les.png b/data/tilesets/secondary/battle_tent/tiles.png index 919e3878f879545efd434c988f3e05726cf84895..35e5c4b6545c856665e575db886451fe4d56b1a1 100644 GIT binary patch literal 2084 zcmV+<2;29GP)72u?eSg0v=}ETaIKyoNn;;*4Pw%Uze_#FHA4jxr zbUH$#(<#Nxb`E8_o9%W6?RF_{baE)swazasWw5kVii@or%5)c7tqfYNQk-APp+py9 zE5uMrDWu~#B6ui7xlWSKAsug%bRp>^M8{p)H%t)#!-pc0fxszoy121P?fpyG*a{KR zeGK`2>Aa;n$RfIrkW_B@i(g*JVSQ^$vC*;wfJv_@8b}Dc2#$bl8XoNl%b2E>gkR<(i5)4 zVSUddqodfBi2CHKuEZ^bbRRGnY!*@!CHvmQ{T6v`+qS(?6nV|F?X6KH{^Qhltq^OC z53ea-sS#eQb%F3%1{msHqVd|LjP4rsrr+oB0|tA9CFMU(eHTjcZDT=L)ShV~seWUk zH(i@2G{?c`H7NO_B!P2Ppw|N=M~k9)4n?h#bXa{4sMRP!S?t!hxX0~T&{Zlpw(wv@2713TrQR^H!Y-Jr-U8M+R z@o1Hc>)aj>@~OR>U(=xcM{0Qtv;ICdsgq;ym74S<>(t%V(>|H|JexXK2JeHcLfvOo zLF?FD40!Eo2H1BsQwxV(CWl={1MdN~-dBW6s@Q5JwRg#3cgbOQzrY3kQR`Xa2Lc!G zF2RIc%jROdPhQI)tzZ;+jZMgQWMi^Lo4c|n&eduXr~`Fb$36@fn&)Iw8IIp-O)fTt z?Dh79tO8Y8MPy-LQ|@JTMP7?d2s^Sd*`h^WV-vC+*_dq6_9JH<&RKPU6=20#!9H^0 zs?*N&8mrEgws6+rMCUqi9fT9HukEa7bwyr_O$a-(G1;QC?muP??XVKG#f{EQTP3$5 zaQ@?j$NefNw<2)<)4B_Jn~k7NuyJDXk{t1pzO7w+VWP)h*>0mD`WRn|zVCb#J>OSOdRB1JXm7Ae0Bx?<@2 zfam=rzM}@#&H(%KK!i|4`}0+_vUUd8pQrZL(11EGvP!jTia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z5euHYEDvH1Fd@%A9gi}YHWLKVdYJhm3Ec7=!{ec&wj~?>?0000$GKWn!xM=@NB|S=hUBxVlrW(XHYH2qrFqol=m<@RUS}{f$W^VuMhT z^hKayWA26*T3$P7br_)34v|VwjTChUq4pST{d0C0oKsx`j?ycy1c!o=3=T0iF=4DH zfuu-SvTP*ZSv2uzh2YTh@wCTUK92@twjW;V_qebeSqQl0o_OST#$#!L=R)Jo-e_zh zPh}m0_3$Y##+29euam)C?T458K5ndgHWIEi68Aa;+}B~jW2JFpG=fd! zsjOqN9zNyK2vujyFYM0wR^DQG%f{U3{8-5+$HQXVW-XBh00000NkvXXu0mjf{>Nzn literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/bike_shop/anim/2.png b/data/tilesets/secondary/bike_shop/anim/2.png new file mode 100644 index 0000000000000000000000000000000000000000..7c463d9c3b0e572d421cf5488377285c277e4f76 GIT binary patch literal 219 zcmV<103`p3P)jaPU(w+i$j+m`NQ{ur}rM? zJkLAuYy=<64*%QfhbEK4viir)FUP_utS_WiS#r?Gp|Yr3U6SOW&dhjc#sO;B98^VY zlLOiMg2PQQJHxyhW)88;L~|yQDT3PB4ap6Ox#lky!&xJo8R1NX+1k{DXAZmwAKnv$ VdF6~(0mT3S002ovPDHLkV1l|=U2OmW literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/bike_shop/tiles.png b/data/tilesets/secondary/bike_shop/tiles.png index ec109c3be0ee04ad6b9b6b5a13405a06d92fc084..e068538f570eb58e37ca64999687ea87dcb410bb 100644 GIT binary patch literal 3505 zcmV;i4NmfjP)7&-6~~|9TWuItbI2tSTH3j!fRTFTi(=?tuW}Gj9byv&TtlZ+RszI_9z@9p9qqLO z=vZ-8R4GI|wpKD7)HRZ7Wv4&@A1I1IQ6oqsE&ZWSQsN59Eego(|GiyumlP>ch!Q&i z7tjxHb{}VEXZ}0;hMW;OIH(SE%yMuSFr6(S~tyy zF0zKP4I6Pq0b0}&+5y|94bEl5o|qu}kJ$t%Y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KNA+5J!oOwo!SlFcJ{qI4sJZxiLY08ZIF9Q3)V*mgE diff --git a/data/tilesets/secondary/brendans_mays_house/tiles.png b/data/tilesets/secondary/brendans_mays_house/tiles.png index 10163e9f1cfb4dd7e406129255d1621501f44091..6d6a5f04776151a993d17d39c1e8d3a045731abc 100644 GIT binary patch literal 3074 zcmV+d4E^(oP)lK5lxFEF?7`(}T0ms&XrVidc8KA7Eo znw@>~-8XNRv%;cHBtV@uADXnOQjxY8lq5k`2*<~Seif)WaO@;)qC%T6Xj8i$Uc#`UgN4$AWemZK6P1xHMt+n~L~Vp7EYR z__a>Q7IpIde=Hvcap=J%2|#}(^wzE@mS$%NyFJ3pEm7Rfo%ObFP%5UM%c5MB-{T zr$Nf&s*tXbWFLZCgWz!NFsQIt!G%uP3fpeR&jBCv?8e$V-3KgD#se1XWcyTqXmgtAUMutZU7qN2B0x+02<>)SZ2Om$gJy1G$b=mdMrm@0`w8Y zrBtV+XT$iEcJ=qOw*EYYO~?O>{*vBD7d~aMJ8#9MunTh#+``-dc7qdB-I)CJrN$Y~ z!}gJV%@X#Jhs{zRwvQC-zyarB1MT!(D zQlv{W#`wW9w5-B|XGdlxeh=M@#7}=8rvq+!j0I*PgzWg&+^B8R&cxyK zVZ^s!+>yc>ISXxK?Wkg|-g?(y(s;xov|ENu@CUg`9R|3_NGMS7R za!_KfQYYMBSK`XRF0^2Sue(+`ekgSPsIJ6CW-~aO^MTBA;@_2OPOR!HIl5_br-u<1 zt*GT)Bb2^d0-m+u#EuVS)=_p;0NOS@AH;?XFK)11Xa#Wyr?uk{GzCfZrxf;V+g`pG zB|S%fw!+vhR)4(`owWgHm$r&FmVz30m)7yxLEl0QcclrR7!*qlLT^JfioJ%oRcsXr zOHypO|3Q}>ij5wLt5G6s0L38$w^eK@=`mVE>d8kVmJY7wmpHE>oMRjCm!tNCMgY;ro#X8QJBDlap zP1F7lEUy`3;aCVf+*$5_)K(ecZ{qS()0iAGn`?3)=vz{73yRtS8;?Ll5ANP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zz97JRNFVMQ@Fsr7_D2FnNEa3Rk?($<1>SI-C~RZ_ z87gpD0zrcTmt1G_^TI40DS+hVnJ@_HYC=CcE^65dw8HHE7aU+0E&xbf;K=|xN(Bhm zE}M@0;;t57BI0u_#2IW#AT%E)D%jn06Z2V2i0PjSc`3RUh)&RhO3X+#%j*FM}@s%TX zL9ve)bT=;#0HSL30o_vJ+jcXx`rD7M{5-QEXwiq-gXmA?F@W&#mCMr(zSt>V9b8y= z|G)5ocYFZzwQ1+2uCD>G_M%d`3&33oh>NGZBQk&w`2b+@%RlRDnEYZ<1$^piLbhfWIMt_X;2jumcX*EwLLz_yBzQjsU6; z7_jjEAfP7zm`QDoM-PBYrRm|rr~tkI@clqLIB?ympZpann9@rASU@iUQ2h8q0H&wE z0-#uY_glR9S17#wpP88?z%Op5Du6{WHFbc%H=6G}FPCotaO>I3%ryY6C4kn@3N+2{ zwR^>q?O^ir8|7P={Om0R_*$T0V_(<=DsY8|@ATY~Z(HA%Z$;5_1g=HVGX&JBs{mda zu-ie;ZUBJKB7pa4K$*+lE(63Lsj-So4iw*IK;iA76$BUUrGi~PW)EWnJ+b+*{fkQz;W=;12{>*h8?Wey9fYVnLBP1s1E?3 zJ}5yS0KiUT#{xncM%M}1Fv2Lz_QS(-0IxalngK@u9EG?U_uMgorv$WLKS7`bz}2IO z&CGG~Kc;8_4z zlLEL0SnZ&Xw~2sBBL{LI2XY_>av%qCAO~_F2XY_>av%qO@WB57%yfh*I#pHe00000 LNkvXXu0mjfl~Pgi diff --git a/data/tilesets/secondary/cable_club/unknown_tiles.png b/data/tilesets/secondary/cable_club/unknown_tiles.png index da68cdff2cf7a26f4e7f0534d0b59237dfdf7779..84e79f7201055ac6ab4a8057891d66e452741c55 100644 GIT binary patch literal 311 zcmV-70m%M|P)H)-#Iz-X2(82h2!bF8!t*pAe*@uXX=2>(-2hUL$e$(P20Z`(002ov JPDHLkV1f^0i)a7< literal 287 zcmV+)0pR|LP)dtNvEX;+eA2k#0#Jvz(}dZYP2+=aKsJnqQ%bUYeOr!_421 zP)A*@A}DM6B5{JlCW38Hu)Z>!!-DFl7_u@b*r|j;UBZItgkj7HMhvV#5=eqpFymG^ z4GD-eHCh+1tG$iJ3mT&xd4UM_`MdXKi3mu$^B{v>fgbKWP&Z6q_rQ(|6XbRe?7|pC z(BwXWfu_(;08OEvAo}^wkLVJBQ*d2KF@ZkKI~HIU{3?T8@MQwK@ME1pL?8kYh(H8` l5#0YF;C?(~eEZ xdBmg=)8I0zTiQoSSGSeXQ&#U#?*^esoD3!whI6uXu5SQo_jL7hS?83{1OOZS80!E4 literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/cave/anim/1.png b/data/tilesets/secondary/cave/anim/1.png new file mode 100644 index 0000000000000000000000000000000000000000..9c92be8079c0150fb23dbc44adfcb71e0258d328 GIT binary patch literal 126 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gDOXPy#}JO0$sXQ*-pL+*-kv}f z>!u(l=LQ#!2_D6T%tD!&nhJ+lT^e@iWg3WaJ!DggS#U>$M^(?FL}ABCHHFiLR~Z?? Wj11kXtQf;V279{txvXuK=QiDrIl$MW@iAfKmr>vgR)D1$DI2q!Tw6@%kaL@;7_jL7hS?83{1OO1j7$5)u literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/cave/anim/unused/1.png b/data/tilesets/secondary/cave/anim/unused/1.png new file mode 100644 index 0000000000000000000000000000000000000000..47e7e17ee95fdaf34d342d8970c538f9829e4750 GIT binary patch literal 121 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gDF;s%#}JO0$sD|#yr~?VyxgfA ztW0eN0@^w}M|{0myIUJOOgeNX2y!Ja6j-UC#CwYOaKNNCXZ9xPM{Jv9f@K-%B(?dz SoYr3tGSk!5&t;ucLK6VDI~^YY literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/cave/anim/unused/2.png b/data/tilesets/secondary/cave/anim/unused/2.png new file mode 100644 index 0000000000000000000000000000000000000000..d1447cde23dccd65bcdaf90921fe1212241d5db6 GIT binary patch literal 108 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gDPvC;#}JO0$sDXqY)vi_6FitV z9l8{>P)Fxg(8ia(%t8*a0b*vkih2%*SeG2(b!l0+f|;SVN85&t)#oF~7*AI}mvv4F FO#lvr8~XqN literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/cave/anim/unused/3.png b/data/tilesets/secondary/cave/anim/unused/3.png new file mode 100644 index 0000000000000000000000000000000000000000..8ad81b1e1e9daf31260a661bd436367997d4f31c GIT binary patch literal 105 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gDFaUz#}JO0$sDXqY$}IzMLm`* zUDTl{n7Kp6p+#G-)5OQ{dcX|Xl?q{5S`#=9hp;nbt=1OT^vItMGQ-o=&t;ucLK6Uu C+!_4< literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/cave/tiles.png b/data/tilesets/secondary/cave/tiles.png index f905c6b21a2eea0257ab6ac7d833c128d69ebffd..e8c98dd71fed4b99cb85594fc7cac435646039ab 100644 GIT binary patch literal 5884 zcmVWqh1&PN$jqv0cQD*R!P!={5lQv<33 z;0vWWv^_$jSu%jaVvsg~ZUN$s)Z$SyMSmqE*V;hJU9E;qF;v6a#%fTQsGS`2%Gw2L z_eQE|oL0?V25?p@X9*@dRFj<>x7Ab)l}c57TPZdCRPCtYvn=6{&*CC>O6e%U*NrjY zS$tKW{+If*`pYxw(`Wy@p`N`1SX~*sd@=ue9lpTm=grq=TG}}PbMFZnFdYL1jq=k9 zFaS(Frf%$grtH{T)$CeSG!6cvz!ELQbSgvl-pRsk^Z7Auq45!VQdck>QcVRyvZ5o-ZhTQ#>`6A`)u#V}mw zAVLYq9e7nz1n{wA9prF$h-av6lEf(s+JS!w+L3={8D`A~ay`lc^BmJO9}AQOo#DNe zCLMQ4u2Bb(R%Qjj5)%P*gn1ccI#Q3!UaICp!bAX+TEu9wn0Im{8N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~ zzQqFy0Qhyv^v{7GZ!mB=H2nCtfccp)w|UM4J#h}W&2uK&_Awx9r{KD9mb6{*lDGLW zUU;S`3(s^nAx*^{q(3c13(qy}gXichVH&35431NaFur&Ho?2D)BEbDB1Mn>-0W7NO zC<6GF03fZBF`y!(rUP|zEx97m+mBTB{YNMR@Y8T*0hnSH0j5a+cQzHKpsJe2r4R#7 z2S)^$o`?Y*k6HRS2C!4{!W3LIC(W`0$z@ zjV!?SMgR<>ZqA%W-4p}xI|5*5cKirRa5QspF+>0x*x2D;v#qd_51<{%L#O!wqfWcB z7$El($-pU8p%1uo6FnhZ%bLMLccP=X2&f8yUT^=R*P{R%>l{Gt0|fv?3|Pm_I1ivh zaS2{-ZZ=^c=Zqi^s5&V0D9sB zv?sp8{Yrhv0IGPhZ}`f6hv;tbrW<(sve$y^YP?7Q3RgVx_ASer;03WjY*dbR_=~&X z!W|ZOg+($ROm4;z@G*0>!ruP#7g7G$y+aPBiKj*sW%(jaQq;&!LEa5i~!dWo|S2|n#~PZ*mZDFFkf(TQ|}c- k_Y)kD9!+L2Wl_5SKNfR#FdT;Lj{pDw07*qoM6N<$f`upK-2eap diff --git a/data/tilesets/secondary/dewford/anim/0.png b/data/tilesets/secondary/dewford/anim/0.png new file mode 100644 index 0000000000000000000000000000000000000000..adf42975fa65c184e93702c4e1cbe83c549257cf GIT binary patch literal 185 zcmeAS@N?(olHy`uVBq!ia0vp^96)Tq0wfsD?CqQeq#8V3978x}hMu$KYc}9veNe8R zzt??J+NyRPTc4|5C5aABOr6YuoyjRLlitjl|KQ>5oc-*Yo(lWJ4Jww~c1l}$u(9t= zkS&m#+Lw32rR9$4lj{1e_nyA>0kvf|ce1twO?>{5GtSPqB5I$M$iFtpAIuaCP1a+9a4pUXO@geCwWeMSrb literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/dewford/anim/1.png b/data/tilesets/secondary/dewford/anim/1.png new file mode 100644 index 0000000000000000000000000000000000000000..6e7c23a18caae63f0652d852a2c53885fa3234dc GIT binary patch literal 185 zcmeAS@N?(olHy`uVBq!ia0vp^96)Tq0wfsD?CqQeq#8V3978x}=AJX;I+Vb}`k;Jy z&OPPW|0m7=bhm4YmK17mh}i^i+q%idBz@W*;(hjmU7>%L{UN9`^S*`!cyO zInghS#m~1CIfw~9`KIKp=fN1Nd#LUAv{-k|{8L%>Pxh@o`0-Zr`N9vUj#uh!58tqD j>f$Gvs=7azzn!gRP*iR4yR9v53UZUDtDnm{r-UW|1ItIe literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/dewford/anim/2.png b/data/tilesets/secondary/dewford/anim/2.png new file mode 100644 index 0000000000000000000000000000000000000000..86075ffb0b7955064e20f4ad12b7b449678e4981 GIT binary patch literal 185 zcmeAS@N?(olHy`uVBq!ia0vp^96)Tq0wfsD?CqQeq#8V3978x}rk>l#)odWr`tY+K zYnsk@I9u;I{}PwRoMe+pj!z}^UIcfw zPjUF+&{V8u_1q}#+}0WS&eeBZo8zX>T%z=EhsnOX!Fwc{o_@@`P(O|H?yfZ7dt1G` kZ|||M3)NL$`D4C>b@%$tr06`&43L{VUHx3vIVCg!0Q}xcXaE2J literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/dewford/anim/3.png b/data/tilesets/secondary/dewford/anim/3.png new file mode 100644 index 0000000000000000000000000000000000000000..6e3c576214a9cb83b23595a3a12a392e79349546 GIT binary patch literal 192 zcmeAS@N?(olHy`uVBq!ia0vp^96)Tq0wfsD?CqQeq}n}Q978x}rk*q8I&8qhdZAw3 z_p9xjtCRmHXxRFAD#lu|FquAakS*fTj}5U@%T;8u72v3K%no@`-O+nx!AB1EHCBPE z-9I%Z=p9qxi*%W=Jn)y-*D{k2ixj@jw|pyOwCzr!bhfkg(~{DNcmD04vv(@4f6X&( qV%fYc3h%2`E{h+Vn-cN*{cnDwrWX56UysfQInC46&t;ucLK6UJW=Q}5 literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/dewford/tiles.png b/data/tilesets/secondary/dewford/tiles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TlP98WQ~&h5dmnwF&{AB7JxZH#se7mJ7fr8M=W><6H>6nC1sYKSfKp> zfZ6{IFl*CVmjHbE!v3$v3BW|0-RA2W(73P`VAcz8p$mXWfC*~> zNP#t96F^~o00`4-0cKkOP460zC$h1~0Pa}ekQ<183*@^2%sRleJpUD{3xGHP|GgtR zPzwNnST7L$J`y{K3KGb44^Z~>Rwggs|GojU41gT!T>#VrIMbSk0bmNc1=z*4OW-8L zeo{_3n~e}1$jne$npp>+!PgrnX$@=OYQ;4G5Q0&fA>9KI0?g0})}TuuGXrDN5tf2x zBSZ(_>~j)t64bf|j3OI5MgsWISMF%A$@m0&^pD-$V5cNqAb|jGA@;-9bAdpYKopZLz_mz#A;$X?bCdYGgzsfJFzKYA9e_Q43<#)(4fA*gEKMLVm-FQ? z9QcUdGENbaa{zuR%*h%=03ZqoK>~Ibi)Kdx)VDcs>ed7U*nH&3I26s!iyE{A%*$_c zfZk#N>@sOD!T!aZof+}uFc?U^bXfqjnRnFhKacg^U!~j!Nx^af z0MWkg^6`mxZkXmY5OXeIPSZw$0MGe{mw#K<4Lo$FCrHTwir59S63Dp#-oBm)tj3!r z7v`D~;1^A`01!@&IW^V diff --git a/data/tilesets/secondary/dewford_gym/tiles.png b/data/tilesets/secondary/dewford_gym/tiles.png index 1dad6f205487b07654f468a7c128417f79f5403d..7d923b505c596b99dd239a53d2ddaae7ae151784 100644 GIT binary patch literal 640 zcmV-`0)PF9P)c#H5Jl$%Miwp%1g_-XfX&ouvTjniGT|FAsnoJ#lZJ4SJ}lfCS_C|Y3&J;8$%qq6 z5TNA=Lgvqq5^aK%SqMm`c=%clmz>e(ER_fv0EeJBj#CQ5FrqBW9x7#iK$$xzbqu8t z=KhY!X3WcaSat5Z}w|;mZyD3>=T3PE!>d2oKZLj1QTF_ z4iyvMry{!2FX4bzCw&BIL>s+%pNui2xdc(Yd4{h_siI2faw?yL9C^<<@&J9YcnwY& z=!1Qu%P;B+Tmm;`>=IG;oqkcDx2`+dDCve&-lZCB*3u63?KR9kQ5MUX%H<8z5LiSZw`|my8UcF@$`hxpcgZKB+~dZ7?1mb zv~_*z1`|s~7-fu>a$JI~Dzb>`(`~8d>Mw4X;5XY*(6!dGt>3pMr>^DmH(P{Ij7B+8 aXx(2)6!Q3v?xS1)0000&8RhJH(YV-}%OkTNZ=|W`a?hILr3Wc7d1K~H25;SdW z7%=k$m2yYk=?^Ja`VE3DlOI0v$n&g*7>K}}$#g@hDU~sGFUCA|zs~TXl*(5^tXAiG z8vv4ZAMluj04Ze((}nmvV6Zk`9z%fEdYcH5Btr)4m6rhk8c3JWApI2g@_rWrvY&dZ zT|xr_e8^me0pBMW(ECAvfVC@^yaiOYUX}3;yfSkAd5>vaR#$sBe z-T?O3S#~=C!1WId_J{-BF#y-!H>j@hc^C(XD=Ed7(4e}>&0!MYTx-!9d}{!iNz5d` z85lqne89iME=fCk(4K?P;Mb4=0A!jMcT)`P`spB9&<{LFrI7~5mi}Gv&jA>yHrpE{ zAfPDCv8cxZa0YA`upx!IE()AK3V<_U(*Q`J88K>b~2n=`=>9Uzq2F)Iv0{q9ozUL*F5x{{B kO85N;W$o_)l(;+p8FQNQ`1|fr6#xJL07*qoM6N<$f{sKCxc~qF diff --git a/data/tilesets/secondary/elite_four/anim/0/0.png b/data/tilesets/secondary/elite_four/anim/0/0.png new file mode 100644 index 0000000000000000000000000000000000000000..806d26e570e348ec3620c361106211e3c4e24254 GIT binary patch literal 91 zcmeAS@N?(olHy`uVBq!ia0vp^93adBBp6ht@Pq*=B~KT}5RRG270(|%I&|Urqwg$E nHf4ooi4|Nz)l83^IMan03?K2Qrfu(10_pN}^>bP0l+XkKy!IHw literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/elite_four/anim/0/1.png b/data/tilesets/secondary/elite_four/anim/0/1.png new file mode 100644 index 0000000000000000000000000000000000000000..2a8e6a31c92bdc7b8b674b1697a7499be500d051 GIT binary patch literal 91 zcmeAS@N?(olHy`uVBq!ia0vp^93adBBp6ht@Pq*=B~KT}5RRG270(|%I%IJE=zGqV oiZ_pP4t)?&`NndjRp^`=gXtyy*8Pm%j)8P}y85}Sb4q9e02d=1X8-^I literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/elite_four/anim/0/2.png b/data/tilesets/secondary/elite_four/anim/0/2.png new file mode 100644 index 0000000000000000000000000000000000000000..c4e6161a6460547b89689c41e39ea885e5ccd309 GIT binary patch literal 91 zcmeAS@N?(olHy`uVBq!ia0vp^93adBBp6ht@Pq*=B~KT}5RRG270(|%I<(>3(f6D! o6>lEp9Qq)l@{Q$4tI#<$2FpYIOI0sUIuFw2>FVdQ&MBb@04m2E)c^nh literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/elite_four/anim/0/3.png b/data/tilesets/secondary/elite_four/anim/0/3.png new file mode 100644 index 0000000000000000000000000000000000000000..2a8e6a31c92bdc7b8b674b1697a7499be500d051 GIT binary patch literal 91 zcmeAS@N?(olHy`uVBq!ia0vp^93adBBp6ht@Pq*=B~KT}5RRG270(|%I%IJE=zGqV oiZ_pP4t)?&`NndjRp^`=gXtyy*8Pm%j)8P}y85}Sb4q9e02d=1X8-^I literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/elite_four/anim/1/0.png b/data/tilesets/secondary/elite_four/anim/1/0.png new file mode 100644 index 0000000000000000000000000000000000000000..7822d18961b5f398c42697c1279043b8da3ba999 GIT binary patch literal 135 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gDL+pa#}JO0$v^m6cr;uzCUCF{ z#Xmgqe~Ss5N$J7_B@v$^&YfFKHt0lrWM@mdKI;Vst0PrpmVE_OC literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/elite_four/anim/1/2.png b/data/tilesets/secondary/elite_four/anim/1/2.png new file mode 100644 index 0000000000000000000000000000000000000000..09fb59fbf70ad81c170971b11f6bb97d1cfefb76 GIT binary patch literal 1260 zcmVQGM5QXas@|<8aIf3mP*jLcb$$46UW-odcT3ZgFz1gBy0tATcY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l&qN)=;!4Ft|37bs>;p zn;8$dc+rwQ!*}e{*eO~&gR;V@e8u2ZW&P30p0UdU8}9QyavVIlVaP7U zp89~>G7)b#reM*v?PnB&LE8gcndc<#O=rF07%Zse`2tf1TrIh($07*qoM6N<$ Ef?!!oZU6uP literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/elite_four/anim/1/5.png b/data/tilesets/secondary/elite_four/anim/1/5.png new file mode 100644 index 0000000000000000000000000000000000000000..d0cbfeb57cff3c941397618c313b781c0c15b3f2 GIT binary patch literal 1248 zcmV<61Rwi}P)^F#!7uaB*p!G5BbIE{nH+|9BLI9t4X)_lej5VcR16bs_fJELU6j1+P za-29#+M*~H4bU7uSmEd&&Obv+KHrSSGP%A1Cf8Roo=k3JG$uxqABoR$H5y;b1pfp^ z0G?%hH5$oiLg1%djVD*~!w_;2H|gWXz}1LxBgRc86FKGm)aMZR06sh3i3O}(|W6m6Ney_~;}{pcFx z?b;79FaNq;O1+eN>G_=Z^GD$9!%`k>y4JNsw>n>ae>nSZ^|xVvyOut8T{Fb}jsCu? z_iA3gr{2S0N&2E*g4bMjzWUzzR=kIXzNj9H%hl6@QYsO(NUS7t>t$|(JBKt}?L!ul z+*vEdQELerD77|2+*62>#FbWTj9PqwkZOC-qV-n4j>{kCR*XAD(KS@e0nky0Q(XEK zoFp?P)+LFAVsFI-r^R_}@~yAI^Bc7Vj&47D-xu{FQUCpb2QX;*JELc0&#QC z+MIajD+yDt<<{0w3T>=Zw4{e7BFooxrNsmUN0&Rvt+P_+aLAN^4gt^`z7YUlR^ol> zB@cBWxpxIBcSoW^h;f7RD;S3yM}xgo$SL0J3M|w=akVD+xH$sV<-2Z=?V2FILh|5` zS~j)_Vs>y>*HdJ}PZW*AnGlcgN$MF;CV<=HVB5!8DnIW5wYUpFUJ6XZfk>?3qnBoZ z%A3XfWFj_&>+1(z*-lC1ZZ#Uh=5kxRrjX525RbrERClThu=i3sKxVx2L zrw0lI*-fW~OfCLr^=60FxRGN(x6n4shU@1lcuZZ5iLEfKh1nvw3b%u?+rc3N`D4K8 zHX5E*mB+y0YN>dH;3h5h5e+TT(7Y_9a;x#2AU0000< KMNUMnLSTY5*JyPB literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/elite_four/anim/1/6.png b/data/tilesets/secondary/elite_four/anim/1/6.png new file mode 100644 index 0000000000000000000000000000000000000000..4b35ededdb4fc28243cd2354e553dbc952523d08 GIT binary patch literal 1161 zcmV;41a|w0P)f6z2ubc?0_qa<8CH$@8p$buY#SwzjTNFG_SJU;&Yv)__RX0k~wpz5vQM zTzPFNc22nBa5%)p4=Zyxe?AU}bU7N0=n|x>%MT;E#wY!B1&n^V{6M3NE8yp=OW+!~ z`1OiLqmS3X#YX_!PI0E)xpBYu{Py^J10CZYcw#K)!@?8oJ1wabx0(e0PLb{Ab9^o5 z_ktuo>5nBKKF#k*+%AE;XMf^$yTms56W`R|g0Y-0_Ux~E-`@$U93!J*2wwPG!uT`d z?m6zB#j$j2}psbNyB9uVR1IasTn4 zcmVDm_+saw(B;V>hSB%0yZ=_)?nUBZ+ZlDd>+j9c_ig;4n?5ZL6Yk(|7<0qud*`iq z4_VV3SImxA4+}`8ATcX66{Yr6>gZlQK+lQKsJPLZnw^vsC19mgha`vE3THLxlqC5E zCSkpmB;{J3+L^~vlXBZcvV|A51!R)(U{^gG7sXVNc11z4sWrLiBsq^H-+T>*9jyj- zuAaWH%jx^kK?4X>KBF+`tBe_U*sOtF>A5yX-uXar>?KWfo2ZdWQ(#FlBqMS8vJH|{ zgmH4lkN zQ8tVOtr}cERubSxq?aytVu^!-rat1dOu}8z4n2g9a!_rITsD&}=?RX}=i_E|aRp(F zqeh?hSy?10Hpr;$}iokGJd~(q=qvXsq!+Ems??rWNfXP7B9|-f+3EqDR-Y z=-7Z}ZPXgZAx?T>*S$gt?spNlTS;gdf=9z)v;@9FP?IJ02?uI%pvE?2`F=$0kso)W z(dI95k7%=un8B@AGYam+smMTgb|T+jM*k3qmzU)Awb#ZO%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g%BbarBJglSr9YC!M6^!xjFC+-Fv zLHw!=%0+}vw6u)?OUveHN>FZLCCjBjV{*pWCpRyiK2 zJS}B~YB@jN$pc%z5R<}A&ByCHJq{~t|E@Za5l7{3*l%3$O3|k9ZFKNrg2Cr+hvS0M zP{`jvVb7lmFk|d{qDF-OYYD!n2WK13Ic(=XWETUTuKv$W)62^FP=><5<-DBFitGDp zGA!e6Oz;w(ZSmR-kpbt&yPCrEc}y<0iJf)t{PN90GxW8a{rxwRt1AxHN;u6>NS4n{ z{EWTXa)ZU)@K#!AS(W@V3UCrgt^PJl?k^eqF9D zOU15Y*u8aY-BxW_Tb*}LhXSBglGmjD6%B&B>tpi`PsHJV2N$jxsoAG>Zp%6by(+&d YKWTYKwVw4c=HHTg=)hr{Qfnmke|y5|;Q#;t diff --git a/data/tilesets/secondary/ever_grande/anim/0.png b/data/tilesets/secondary/ever_grande/anim/0.png new file mode 100644 index 0000000000000000000000000000000000000000..7536d08ad1a80452afd07dbccaa324892b81f8d7 GIT binary patch literal 204 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gsmY!$jv*W~MbB;IJ!Bxla$$C( z*eY+8t|g~9PAptl8kW#t(#LY;BwL56k_uP7x!~N`ORhIt-)ql%XCBX<r2Yc~zZ<)+3nvyZKQZp@ zIC)plTt49UlKH~?FGBA`2=qsad#LH1nl*8c*Xeis9?d2%%_R@M1Ub{w)z4*}Q$iB} D2AfXN literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/ever_grande/anim/1.png b/data/tilesets/secondary/ever_grande/anim/1.png new file mode 100644 index 0000000000000000000000000000000000000000..7536d08ad1a80452afd07dbccaa324892b81f8d7 GIT binary patch literal 204 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gsmY!$jv*W~MbB;IJ!Bxla$$C( z*eY+8t|g~9PAptl8kW#t(#LY;BwL56k_uP7x!~N`ORhIt-)ql%XCBX<r2Yc~zZ<)+3nvyZKQZp@ zIC)plTt49UlKH~?FGBA`2=qsad#LH1nl*8c*Xeis9?d2%%_R@M1Ub{w)z4*}Q$iB} D2AfXN literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/ever_grande/anim/2.png b/data/tilesets/secondary/ever_grande/anim/2.png new file mode 100644 index 0000000000000000000000000000000000000000..f0835aa3b83e07cbfab26d3eb1be60282fcf4100 GIT binary patch literal 197 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gsUA-k#}JO0qUSd99&+GeycIT4rP26_k{`Y(TI@&4h3h|ixtbN)n zrYz@graFBxg{f+Hj<004pEq}T9fSX4hGesxUFm0*X}_4JodZu%)tiKSR$wlVm)B=! zZ(r7}daqw~9jczQS3TzV%I5udt$qJCoHyYUc+Z-B%P7s0`-KoQpG=&FjO0&grBw!t y^Hv^Ey?ENm-6mwi-`ag!8KpljTI04YOscFtQo)FeSD9lU$cdh=elF{r5}E*x$VdAC literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/ever_grande/anim/4.png b/data/tilesets/secondary/ever_grande/anim/4.png new file mode 100644 index 0000000000000000000000000000000000000000..7536d08ad1a80452afd07dbccaa324892b81f8d7 GIT binary patch literal 204 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gsmY!$jv*W~MbB;IJ!Bxla$$C( z*eY+8t|g~9PAptl8kW#t(#LY;BwL56k_uP7x!~N`ORhIt-)ql%XCBX<r2Yc~zZ<)+3nvyZKQZp@ zIC)plTt49UlKH~?FGBA`2=qsad#LH1nl*8c*Xeis9?d2%%_R@M1Ub{w)z4*}Q$iB} D2AfXN literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/ever_grande/anim/5.png b/data/tilesets/secondary/ever_grande/anim/5.png new file mode 100644 index 0000000000000000000000000000000000000000..7536d08ad1a80452afd07dbccaa324892b81f8d7 GIT binary patch literal 204 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gsmY!$jv*W~MbB;IJ!Bxla$$C( z*eY+8t|g~9PAptl8kW#t(#LY;BwL56k_uP7x!~N`ORhIt-)ql%XCBX<r2Yc~zZ<)+3nvyZKQZp@ zIC)plTt49UlKH~?FGBA`2=qsad#LH1nl*8c*Xeis9?d2%%_R@M1Ub{w)z4*}Q$iB} D2AfXN literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/ever_grande/anim/6.png b/data/tilesets/secondary/ever_grande/anim/6.png new file mode 100644 index 0000000000000000000000000000000000000000..9b5030306330e8e9c2cce6fa7ff0c50eb91da06d GIT binary patch literal 201 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gsR^Dgjv*W~Mb8=XH8}{dUZ`i2 zmR{Y@$r=)K@M4$Hx(A|S&DV;UZP|H`>YP26_nl4p-J=V8{&?2av8kL_=w9t;xJp_o zY}%|>>FIl$*2yS3EqbkgWbb6jOWtnxGh4QJPAvWW!ISw^X2s(lKdf}*y-yqTcAT>n zG>;9;?n-#XdGN@Iri!!M-jpX9eCpetzUI(j`KngqfQuKq)j@9bboFyt=akR{0INz* A00000 literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/ever_grande/anim/7.png b/data/tilesets/secondary/ever_grande/anim/7.png new file mode 100644 index 0000000000000000000000000000000000000000..9b5030306330e8e9c2cce6fa7ff0c50eb91da06d GIT binary patch literal 201 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gsR^Dgjv*W~Mb8=XH8}{dUZ`i2 zmR{Y@$r=)K@M4$Hx(A|S&DV;UZP|H`>YP26_nl4p-J=V8{&?2av8kL_=w9t;xJp_o zY}%|>>FIl$*2yS3EqbkgWbb6jOWtnxGh4QJPAvWW!ISw^X2s(lKdf}*y-yqTcAT>n zG>;9;?n-#XdGN@Iri!!M-jpX9eCpetzUI(j`KngqfQuKq)j@9bboFyt=akR{0INz* A00000 literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/ever_grande/tiles.png b/data/tilesets/secondary/ever_grande/tiles.png index 0f3689c243ae13a7a05cc1b049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A8M8eR?u3KJaL~UU$rW+PVdh>M{e^UMqQ&c%hd3b(S2CqIjF&uP-zJI( zWg0=$TX$rx`pA}1$QCD%BDBUu7WV>?r@8NzUZIMgRrLQ#d-EXUwdl~xNi6eNItWSc zZ}&KG2i(7&w{T~0)s_227#+XA@i6qF(qD$+)!deirs-IGJ;;L`WaYiYYUwz@e)=e} z^Nsh<6t+Z^qf~N==^K43sQ-CZS+NcydsvbQp*Ux9kCfqJ9-ieDTs&7q;;S^nQ|=`U zWg@1w6KA`l-*7&Gy{+(#p}3^p^{~KL*U%ZCPgT1eibZh2_1100FE6)Vshl9c;oil? z?RXWrEUo!3l+?(-W~^oIJ{^aOcr|)|svihs5Zb+dzvJt!EeIAlv}3u|(o8qx8>#UL znBLf+H%g|oEHX9x<+#b36B8qT?z$or&X4b9lVUHmY!31$vioV$Kd^Grf<3*T=bYV& zK`vf|!gUPbi90B=CrJcQo_Bw7EKh6!eFsoX*3<2E?aba^hgjD0R_cP~L8Yz713|9D zHXc;l4d!jadfVx)1^q2iRu6BL?eDt;D#v)#se2X0qtk4Y`&kw3pHu3c-O&OA`#TI> zoqUDzSSNo&@O*skeh!TyF&wg0B?wd1##3|4V4bP49S#_d(q_jvWR4}WDEcz#OTC@( z4ChEUn%IVRp<>Cw7tZJB=_0XFmNTFrrr|lfo zMgd)RKT1wlJ}*q)xUt3N+sD=EdodA&G+;%^%XZw{`IjFYDF%7!zud0WU5BTNp zfYCQj2|6gW&(%j&wJ|*&h6+OUi diff --git a/data/tilesets/secondary/inside_of_truck/tiles.png b/data/tilesets/secondary/inside_of_truck/tiles.png index 44f923a5a2d0b3e7785b4f4d0412ec167df3ad8a..65a82e88834c8cc249b3b42c6f0951c9cfe38174 100644 GIT binary patch literal 545 zcmV++0^a?JP)00000dm@~c0005#Nkl>*r-X#-VgdlVg!bGFz(9fH0 z6{L(J1;`iCd%TWVz7GPH_n__jyVZ*A@dfl&5NS{@2!b01!7YQ-ixFv1uBk6gL4u5e z;0n>B%= zs{2+6Y~9FtKI=x7W=p(m!8upa6Gk+(^r7uJE|gJQp}sD}C@l6fHG{=D)}0-qi^EhJ z5;~{aHPYuLIc literal 514 zcmV+d0{#7oP)X045b>IzvQ3F;kaUpm(|3 zz}@BJ&zhUL3BTKK+2p)~kS8>@^kE76`96|*IB0nQOy9PK68}VHSra`ur*J4BdQXCMH*0#G>XhX|7z zp%Tz90X#&Q?`ADt$sPbC`9CMEzQjNJ?h0Ji{KJE+%ZiqOu5(llKW4tQVzg2V(gE&|X< z6L1`X1mK4V5vvW*-y9D4NE)>kTtyY-2~)c{ntd{SSY*8_BM$|--;^=%I?0aY3N1CnTHDlAcIbpQYW07*qoM6N<$ Ef>1Zrvj6}9 diff --git a/data/tilesets/secondary/inside_ship/tiles.png b/data/tilesets/secondary/inside_ship/tiles.png index d4b0471b200e1115a5899d96b81a36fb57be0f99..77142a7553ef7cc3ca7cc07c8d85e35cf59b395b 100644 GIT binary patch literal 2149 zcmV-r2%7haP)^qz`x(wGy9GlXL!}gjb?|YA=_(!C~y=ZSYfLQ!6Lw@9toR4pY zj}$%@Q37Qb78_W^2upwl7SX|yz?pO#giQ^_m^~tVjdo|ct_N@k!5&H};Xx?WqttFO zSf@ybT5Ew(7MatC_E^$o@QCnrBXxd^fs_+5kx~XpK#tee`fr_^N+5Uw=48Bx$ zQ-i|I!4;Ga8UZBm_$8r|&|!hNad3sISA-;7KLRQQIP3;F?ADsn+5NW`y)s~PvCZ0K zxWIa3pHBNRnYA58Og2|wGui9}){{rTQ4?q`+ATI5d-4PU*>2(1-KS2@13Q}oH{W7@ zetBKt9ue|8l=~cqI}DCjXgK!d$)eqTDaT?gW z@X*bmvq(3i_(!@KbQbAmq$}IMY%aE$bp*qm*l^f94Qyxx=3<+%;TlEQ^mCNwwK&iw zV%U<``oS~EfXoSWn?67LtKlp#+?3J9SurevT%4aiRC>ZbnE@ldj?(dEI2$Hh7hh_0 zz2Wg@I@*n0ml<`>-tMLm#kxii`hxIA)%esHNt+?`g+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ri&2VgUyr3%P_1_EHU-lY!iTw%7m^{<1l~(15wE((RZzuu4Iow!nFhDqnI9A;DGZ&QY zI#Hpjc2!b20RUtN!qk(T%`pIPEZ^o*MQOoi9LfXKC`G|}fW2fqAi78Bf&{mZgMg@l zf){-k5N$Y@B}K8ez!ah>O7~tw0d>>pu1ec)@$XPU&r!Nc_W%t5C8ZZpK;103i)sik z=#~_V->hj$w>0n-;7g`OHkG3QKFj$FdeG99ZkOD}e?csP0DSWVcV+NdRmH#{sZ{FzD~Z zRUjr(e+SlJECnKseRfwGO95ZbeemG;c@hAPr{EipJ9U2t20Wnv0000kZOZbU>;-UHx3vIVCg!0LG^j{Qv*} literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/lavaridge/anim/1.png b/data/tilesets/secondary/lavaridge/anim/1.png new file mode 100644 index 0000000000000000000000000000000000000000..7cdee79e24685e0915a7b2fce39f8f02a6f5c66c GIT binary patch literal 92 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gDP>O=#}JO0$v^m6c$gjj?5+N9 pfB0^B`G4a()!)TVF?BCo#multua5i5Nw0X2HcwYSmvv4FO#laP8(RPX literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/lavaridge/anim/2.png b/data/tilesets/secondary/lavaridge/anim/2.png new file mode 100644 index 0000000000000000000000000000000000000000..b5810b80631a560dbcdd31d4f7b8161665292b61 GIT binary patch literal 88 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gDS1y9#}JO0$v^m6c%BHo|F<{& l$M<)4tvMK<39X*)k;~AlROdZgwzCtY#naW#Wt~$(69Anz8DIba literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/lavaridge/anim/3.png b/data/tilesets/secondary/lavaridge/anim/3.png new file mode 100644 index 0000000000000000000000000000000000000000..caf7b569835b7e3edd654797f57b762a68dee3c2 GIT binary patch literal 100 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gDQ!;|#}JO0$v^m6c$NtN|M&m* y`44g&4r}Ta3#Xb6Mw<&;$VRMjj6U literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/lavaridge/tiles.png b/data/tilesets/secondary/lavaridge/tiles.png index 4886aa28e3736581ac3319ede0f666d73a455bd8..896c43194b1349e149d234b25a6df5fabb801378 100644 GIT binary patch literal 4215 zcmV--5Qy)IP)kR0=5(=;FH=~^Iy`PTx%MJOgt)f7!=T?qk-80hFUz&nT-xbX2DpoqI0`a zvIlsU7xPHTR$|v6kFg^}3Sjc@e*ijFDDqZ^bfE##^@gaj4?)kKTX1X#J9Ru@J;8w zhueR7Uw1dXtm`K5VmBH3{%$^c$n}GpL)q-F2dTUJ(0(#?eLr=dXS}Q%r1Q~gPpNyF zbn4pol9vMC*teJT4!w)InznV4|4@fQ&jwm$@^tO$qP_b90ou0B(?(sMeIAm#^(Jc7 zJN%^h8{0_n>{6&s@$aQfdMZV;)ILqKPkHuGrb(`$f3ImLddgE%LnJq7WXq(XQ{XjC z>R0F|>Yt5Mhq60O?KSORA!=8>R3oc3a3nin*h%}iXyA?+<{*R%|@D6`h&CTeJ} z*-f&h+0=A(Pm1=W?o5-+%8}xhMe=!FcOePutSpoKV@-3#C16=rl5|~vu?(^-|1oKr z_7|>8h0Nv|w}E*BxDCu35ju0*uqqXncEe!_IFaR|q@0upZX(R3L~sKVMrw*Iqklbh zRV_?b*eM>Srw*+Q-GsBbpJlcxsy(lUPU4PAldetKq^Io^9klIRbilT=G-YEGm}8d! zrFGp;b}G<@eQBNk*S2p^*0!&?e)9}f^{RwFg*p`#ma2A=+R2s&aZTZ)UhIS-{2Jj8 zan}nCK_CIr0&I0^e)95BKX$TwCL8Woia1PEGscHF_S{0h!&1>3?u$tFAt{P3&6df z^Vx0zw}4wfI*pU3uJd4u9%sOU;n4BQ>sunT6(P%K)oS4Ui&_;_wL17%e=6%wg^7I@ z!7V*!v)2zBQ$3MFm|6rx3 zQ~2pvgwr!OC~ZS^X;z(GjDI%cQU5NhtFADwTZ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;*6mK%sbhp(vp!+gB5c pg`L{20g5b%R41|j2mB8L{uA$_ih`xSH{}2T002ovPDHLkV1jc0cqIS; diff --git a/data/tilesets/secondary/lavaridge_gym/tiles.png b/data/tilesets/secondary/lavaridge_gym/tiles.png index 0865ea20766790f98204fe33b9c3802f9a4e38d6..8734cc3bf2d63cde6c5ba99eff17225e8ff99492 100644 GIT binary patch literal 713 zcmV;)0yh1LP)mf3c12v!V4eWc(j-ce!d+Cja4UwAhD%<+$Q5`dU|+!-$u5W~n6dN( z$oc=hk*zTj@l4nme{;uqhPh#;J?SaTn;{l}|LiQcZB#s@d#eC)p^BK-} z#rc|2ARgnridNfN%=dZB`No{@kb;Iod71JQcn)NlhrlzChrpEBSjhlUiF(~>$Cs~! zj%szfx@(kl84x@Yql`G30j-6@wm$f19CuFpTO!;>7a}Sb)*{^K_qQM4sq6Exy9vl1 z-3Yp_+;W>0LlIa{JWrxq;_}XuI38MOQN*5uCo-Yx0oWUew?7_;RoBs?2NWqrobQTC zb3o9E&XW`)b{#NZo2o-#ckG;~o>X^ER}On0wT9com%?FduT|wXY*vf4!`{bRZ{+xn zQsAkRNq!QXOTPL(kk90)^Cy#&;4G7~pgWU!uz;z%Gr-Tb_n+FLg{X&qU~#NR2E=Pr z>1-HUxevphbE4{WD|5ZuTGN zpMLBYM9hVVF3bd5tGJkO-}HR>Dc8EmggZ+NcHfw5!rX8XA!ecKO!WN%xK}yySJi*s v)8+dT{o!qs5?oHZU)`6QL*wHTTn^R0WKWdkkc1lV00000NkvXXu0mjfhW%RO literal 631 zcmV--0*L*IP)M4LST z$b-z;NXIL=Hh|ksUZfzpUVaF8M7b`SIyN$_0pANiD}4{>l)F#`B)ICJ0=Vhi_F-V7 z{)0|Dztr)p0DSux&^ILtcLFL7GLda+0aJuL51~b*V>{VVgO|>~dcY9!Aagd-@oI;I z>}zmW4w>GaII%DeDu7FdC`fr4qiH&Rgl&fk+CV~aFFa- zsH*|^?-~Oo;O~!LKVgK`<6P$;Q*&RpG*Z6duZ&~NVRS8EWh^DQmp6!=V+B|RLIeiT z0x8H7#yuF}d%#m(96N`VrQ0OLsaU!I(}^K7TALS1ua^VtoVTHfvEXSeU4T)a5bdD= zXagl6ic-0aMJ(R{l&k{_D3JWE0H{Fj;cx&^fcuH>p9~lPfSwLe2T@f4a!;(mg#KpmO*ra(b>5HNh5sWel;wa( R2de-8002ovPDHLkV1oCw7EAyD diff --git a/data/tilesets/secondary/lilycove/tiles.png b/data/tilesets/secondary/lilycove/tiles.png index 88c5c7a28b4a1411ab6e855b6ac0db34eaa9e1e3..b77f3d37925546942fddb5138e917338b3e9bc19 100644 GIT binary patch literal 3912 zcmV-O54Z4%P)^683u#is+(NQ|{Hh04ABGuNb&GP8kVl+}?9 z>(GT!Dk&2bt@rl@HQ)EuVi<-g%m+cB=KrHq0wzi(>r)qUYl46qO8BV*6Qu(tySomu ziN4O`);lSnd=0uU0S5rdK5|`GEp<8_wZvU5h0GdU@`3Mb;H{Q&sq0WDRZ3PM2c(+~ zt-@AYHe8`@gSs_jWB5LxH-V7oI*y|jxxWRiHLwvV6t$HTtObOly1`nTWsa#=Qx_~i zr>P6(shfvR&l_Exx;xZuKnH04H<%9`=mP43x|+dHy~bU=#>-?t-D~HkUrJ%W{32($ z$!oe%?v%Hoq)P^(gY25>lsgMq=#q{g*Dr8jhQPsTX{T~J7oro>Oix2ssZ{6`#M;Pr~5a{-6lG!Bcrmdf5t`L7*@E#t6OyVXu*B_(AhdpCAii>V|l zsa8KL=1PHJ5J$VhaI#Jl)!HHc$k81C#p ziMB~B-qC--I#Xecto7WLfN)ih=h3Uxe1nYjf+}=w6}rs%W~>)f(dxPcWH*%Wc@ZT3 zW!jGf$xd(Gy46xgkG5LsRtp#>TEx+Dmfd3N=+SZNZmE_&dK6okYPB@Mltvl1V&l=h z#XlVY&7jdF0%ifUF$T>bXhf}n)|P5$%ToG%!UB-cz`@&;M6HIUu>+JhfrH3W0`Woh z07BKF#Ayq#`v^OfUDx`9BEXS4s@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IKL8$k%0o${e)I&v7(}S0p!6x~yRekz)8q3B(&r zsgxhVlf(0g<>+AG?p{>yA_5bKgYI03h?p4+`0N{bS!y=~R{ig&kXTAh2zKc6T_uWTiT2MfW{ zAyL%qB~uV1Ok6D|;;=~7PAF2|ar*K#$7A&G*8hU)p^5qK1>lE1k3nRyVG0a>T89fY zK2q#R3R-D487o>SgPDIlA1$T5_bdc~X`#VS zF&W~+iB@Dp=Yvv2+!-;qF0`s%HTvVcU}e5Oj==M(&ekWky(V1c)Hr5IY}3U-0gDr| zt>Qi-yAt?|VhVEyRMjScJVzS{`TuR-??=DkC&Mm14_d~TM-5@l&A$jJ7y|9)T>aRC zW@ka~Yy*sOh93y!GmzZ_b6~jf zzQX(~5tNb^@e5VLLdZy>w<=;R^loReanu|NeZoJMJ}e^5IaciEAv5d7bV>Qfo~Qte zdoo^e%R=5&g002XeU&>PH5gXuylK#CP7gT;pMPA&S;AU4wX-3E_zKR|}8|B_3Qp()%U& ze7317hZN~YP}?m#A%VAGx{jg{|Ekzfr+bbf_vUdMexws?!sU^7kdPCL_*xnw{rxTA zictDv{1E7-MdFu5pMn|b8R^XKZf)>&W83_zl9wBF@?YCKz$|$@U-?cZG2oB8tsWHH z6Q|u{!XxF!O;)#_?WXh9k{?Y!WCv;4~2Q@hC+pCvBA)E}0 z@~`5}e^rZ^gT{y@`FN^juG}OUw-;n0k_WdPn|nY9y$lx&S^Xw4X1h9(AK;8HR4!Fj z#%Io_*e~~u-Pja|snQ<>Nu&rh*kPr3G8C|RS(3ttYYuQcJ4&wFGwjQ2vg(gRp)Juk zBz`s@d8r}^ehJ@$FPKPktQd?>U`G{z$nm^>l_PiO|G)`>P9K)FXp;Z`^Xypc9ra9Z G%KrdQ4IB*s diff --git a/data/tilesets/secondary/lilycove_museum/tiles.png b/data/tilesets/secondary/lilycove_museum/tiles.png index 4951873010ff10bb85bea3e91df0abf763f7f4cb..5bcc0ecfeb7396d3622435c781c53192f7866605 100644 GIT binary patch literal 3938 zc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7vWzhz}|R&XmLOjU1$S<02D!@ z093Gcz~OPV01~1Aa2eVFBQ&ov31I62Km^bZuN%NlO^YL80DI}*vy}b?6M6rNvI{gZAd1x( z4sg;C0lWpcF`$Bl15|ZzFrQU}0DjB@9RA_Gt|I&+et@$9iK*&Qa+IhfEQrrD0Lc~@ zfOY^pH<(uk^BiD*D~2s590>=EP!1@D1K{+kE#Ygt&ACAo0T_pNz~D%B$d+)M69Zd` z2*4a}0~{qUWl_Sq0T2PSLA+)-jnUOPZ#K^V;Ajr8>aU>QKbklYgu@GV{zzj6UDu}mC!4g{n-0J45S z;9Ef)z-mG52?2<;5DHKURwGg6o~>;zh}9SlV3nY%VXGkK0Y2w6RTq#I%n)p|w^x5# z+Vy1c2vMRKTlF2fC93 zUUS9|0HDhQu;f`YAnB#VIsxA2{r~#_xT*vIF#d`aK;i@dFkTY?_J@iefaA3Q*mczh zVB@b85Iu;#{@?@f>#+ym<1m1~KQMsxiS-YAf2iDTZMPV}9)|*a<;-383E3i0lc6wfanqfIPZh+=-~io z92Ib%bFBjfX#_}a3?cw}e1O~61CV!Y-Qfhyals!%$pc8C0K0OT;bVyIIcNN!a6cgw z&|0J20^9=J0{piCy1po2vwOQ=4}S4IGT;wRSD&h}ZnRc_|2nZgfUn8^zXJT%iS+?| bhV%ae;8k*hm?-k~00000NkvXXu0mjfP9@Ip diff --git a/data/tilesets/secondary/mauville/anim/0/a/0.png b/data/tilesets/secondary/mauville/anim/0/a/0.png new file mode 100644 index 0000000000000000000000000000000000000000..88b028b5210358b4a3d4920ef092c67818b6941b GIT binary patch literal 177 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gsR~aQ#}JO0x~DesG8qcETwIyD zr29=roLK{t2Iom3QGrSG^f$UR>{-XKP5hV<-@HAG`Cm28w%m65u-MHvJp0x(-DJHi zyn6N?Z{@t}m&BId`5(Qi$xf@t;)-*xkL zcJ1HM;dFNL1V69YYO1*lHo7$C#7+32e^Xeq!0=Na+o8jpvOK@4_;}58R#|u5V;0KW zQNmkode9`yI`H-5_bNqhCre}`^IJYI{_U{iqWnFfvb&!|f6O|j(qnjcQc0@nl5By= Y@(NN8T(WO{W`kVf>FVdQ&MBb@02Avz+5i9m literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/mauville/anim/0/a/2.png b/data/tilesets/secondary/mauville/anim/0/a/2.png new file mode 100644 index 0000000000000000000000000000000000000000..5ea20f6dbd281511a1d59fb92e5880a22d29915e GIT binary patch literal 171 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gsUlAo#}JO0vE3Va4+ZeJv^5;h)h6n5#`pT5BXb~^>0a)NZoGty;^_LJAcVye$Uym zCqMTI*&QxU={U~#uy0q&KFi&87M`5RkB-gQu3F)(J@J*Bk6wI%dHHk;u0J5FJzf1= J);T3K0RV|*JEZ^s literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/mauville/anim/0/a/4.png b/data/tilesets/secondary/mauville/anim/0/a/4.png new file mode 100644 index 0000000000000000000000000000000000000000..c8097808c7a2e419c3b8aa4f9f4da594953d845c GIT binary patch literal 178 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gsY*{5#}JO0x?LN2nG6M3womhY z+Yu+DVCS|-#e4oFfl2%9Ejt;0#xTa{uQ?iTa7&tZ1@q}7jsD+8g~wJ;>59?Izp%U6 z$N$gn&RtyBZ&xh{vyRD%`f_oCvX$Epw)atAel+|ll&V#Gwe6$oFS%t$d^g5$@7%-f cBW&`I;ZL}I0Ph~JFCfQwy85}Sb4q9e0OwXh!T{-XKP5hV<-@HAG`Cm28w%m65u-MHvJp0x(-DJHi zyn6N?Z{@t}m&BId`5(Qi$xf@t;)-*xkL zcJ1HM;dFNL1V69YYO1*lHo7$C#7+32e^Xeq!0=Na+o8jpvOK@4_;}58R#|u5V;0KW zQNmkode9`yI`H-5_bNqhCre}`^IJYI{_U{iqWnFfvb&!|f6O|j(qnjcQc0@nl5By= Y@(NN8T(WO{W`kVf>FVdQ&MBb@02Avz+5i9m literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/mauville/anim/0/a/7.png b/data/tilesets/secondary/mauville/anim/0/a/7.png new file mode 100644 index 0000000000000000000000000000000000000000..5ea20f6dbd281511a1d59fb92e5880a22d29915e GIT binary patch literal 171 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gsUlAo#}JO0vE3Va4+ZeJv^5;h)h6n5#`pT5BXb~^>0a)NZoGty;^_LJAcVye$Uym zCqMTI*&QxU={U~#uy0q&KFi&87M`5RkB-gQu3F)(J@J*Bk6wI%dHHk;u0J5FJzf1= J);T3K0RV|*JEZ^s literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/mauville/anim/0/a/9.png b/data/tilesets/secondary/mauville/anim/0/a/9.png new file mode 100644 index 0000000000000000000000000000000000000000..c8097808c7a2e419c3b8aa4f9f4da594953d845c GIT binary patch literal 178 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gsY*{5#}JO0x?LN2nG6M3womhY z+Yu+DVCS|-#e4oFfl2%9Ejt;0#xTa{uQ?iTa7&tZ1@q}7jsD+8g~wJ;>59?Izp%U6 z$N$gn&RtyBZ&xh{vyRD%`f_oCvX$Epw)atAel+|ll&V#Gwe6$oFS%t$d^g5$@7%-f cBW&`I;ZL}I0Ph~JFCfQwy85}Sb4q9e0OwXh!T{-XKP5hV<-@HAG`Cm28w%m65u-MHvJp0x(-DJHi zyn6N?Z{@t}m&BId`5(Qi$xf@t;)-*xkL zcJ1HM;dFNL1V69YYO1*lHo7$C#7+32e^Xeq!0=Na+o8jpvOK@4_;}58R#|u5V;0KW zQNmkode9`yI`H-5_bNqhCre}`^IJYI{_U{iqWnFfvb&!|f6O|j(qnjcQc0@nl5By= Y@(NN8T(WO{W`kVf>FVdQ&MBb@02Avz+5i9m literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/mauville/anim/0/b/2.png b/data/tilesets/secondary/mauville/anim/0/b/2.png new file mode 100644 index 0000000000000000000000000000000000000000..5ea20f6dbd281511a1d59fb92e5880a22d29915e GIT binary patch literal 171 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gsUlAo#}JO0vE3Va4+ZeJv^5;h)h6n5#`pT5BXb~^>0a)NZoGty;^_LJAcVye$Uym zCqMTI*&QxU={U~#uy0q&KFi&87M`5RkB-gQu3F)(J@J*Bk6wI%dHHk;u0J5FJzf1= J);T3K0RV|*JEZ^s literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/mauville/anim/0/b/4.png b/data/tilesets/secondary/mauville/anim/0/b/4.png new file mode 100644 index 0000000000000000000000000000000000000000..91f368cf84b162d4ea6f5705545fa13e2c22acc9 GIT binary patch literal 72 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gDSl5E#}JO0$sWv1Z3n#>7(O-{ UGfM4`s|P9ZboFyt=akR{0Lf_&J^%m! literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/mauville/anim/0/b/5.png b/data/tilesets/secondary/mauville/anim/0/b/5.png new file mode 100644 index 0000000000000000000000000000000000000000..91f368cf84b162d4ea6f5705545fa13e2c22acc9 GIT binary patch literal 72 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gDSl5E#}JO0$sWv1Z3n#>7(O-{ UGfM4`s|P9ZboFyt=akR{0Lf_&J^%m! literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/mauville/anim/0/b/6.png b/data/tilesets/secondary/mauville/anim/0/b/6.png new file mode 100644 index 0000000000000000000000000000000000000000..91f368cf84b162d4ea6f5705545fa13e2c22acc9 GIT binary patch literal 72 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gDSl5E#}JO0$sWv1Z3n#>7(O-{ UGfM4`s|P9ZboFyt=akR{0Lf_&J^%m! literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/mauville/anim/0/b/7.png b/data/tilesets/secondary/mauville/anim/0/b/7.png new file mode 100644 index 0000000000000000000000000000000000000000..91f368cf84b162d4ea6f5705545fa13e2c22acc9 GIT binary patch literal 72 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gDSl5E#}JO0$sWv1Z3n#>7(O-{ UGfM4`s|P9ZboFyt=akR{0Lf_&J^%m! literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/mauville/anim/1/a/0.png b/data/tilesets/secondary/mauville/anim/1/a/0.png new file mode 100644 index 0000000000000000000000000000000000000000..88b028b5210358b4a3d4920ef092c67818b6941b GIT binary patch literal 177 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gsR~aQ#}JO0x~DesG8qcETwIyD zr29=roLK{t2Iom3QGrSG^f$UR>{-XKP5hV<-@HAG`Cm28w%m65u-MHvJp0x(-DJHi zyn6N?Z{@t}m&BId`5(Qi$xf@t59?Izp%U6 z$N$gn&RtyBZ&xh{vyRD%`f_oCvX$Epw)atAel+|ll&V#Gwe6$oFS%t$d^g5$@7%-f cBW&`I;ZL}I0Ph~JFCfQwy85}Sb4q9e0OwXh!Tv^5;h)h6n5#`pT5BXb~^>0a)NZoGty;^_LJAcVye$Uym zCqMTI*&QxU={U~#uy0q&KFi&87M`5RkB-gQu3F)(J@J*Bk6wI%dHHk;u0J5FJzf1= J);T3K0RV|*JEZ^s literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/mauville/anim/1/b/0.png b/data/tilesets/secondary/mauville/anim/1/b/0.png new file mode 100644 index 0000000000000000000000000000000000000000..88b028b5210358b4a3d4920ef092c67818b6941b GIT binary patch literal 177 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gsR~aQ#}JO0x~DesG8qcETwIyD zr29=roLK{t2Iom3QGrSG^f$UR>{-XKP5hV<-@HAG`Cm28w%m65u-MHvJp0x(-DJHi zyn6N?Z{@t}m&BId`5(Qi$xf@t59?Izp%U6 z$N$gn&RtyBZ&xh{vyRD%`f_oCvX$Epw)atAel+|ll&V#Gwe6$oFS%t$d^g5$@7%-f cBW&`I;ZL}I0Ph~JFCfQwy85}Sb4q9e0OwXh!Tv^5;h)h6n5#`pT5BXb~^>0a)NZoGty;^_LJAcVye$Uym zCqMTI*&QxU={U~#uy0q&KFi&87M`5RkB-gQu3F)(J@J*Bk6wI%dHHk;u0J5FJzf1= J);T3K0RV|*JEZ^s literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/mauville/anim/1/b/4.png b/data/tilesets/secondary/mauville/anim/1/b/4.png new file mode 100644 index 0000000000000000000000000000000000000000..44564e67a599b80664b2480d99c8c5a00c33d328 GIT binary patch literal 100 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gDQ!;|#}JO0$sDXqY#a|CNu3gS xG>uK=QiDrIl$MW@iAfKmr>vgR)D1$DI2q!Tw6@%kaL@;7_jL7hS?83{1OO1j7$5)u literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/mauville/anim/1/b/5.png b/data/tilesets/secondary/mauville/anim/1/b/5.png new file mode 100644 index 0000000000000000000000000000000000000000..47e7e17ee95fdaf34d342d8970c538f9829e4750 GIT binary patch literal 121 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gDF;s%#}JO0$sD|#yr~?VyxgfA ztW0eN0@^w}M|{0myIUJOOgeNX2y!Ja6j-UC#CwYOaKNNCXZ9xPM{Jv9f@K-%B(?dz SoYr3tGSk!5&t;ucLK6VDI~^YY literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/mauville/anim/1/b/6.png b/data/tilesets/secondary/mauville/anim/1/b/6.png new file mode 100644 index 0000000000000000000000000000000000000000..d1447cde23dccd65bcdaf90921fe1212241d5db6 GIT binary patch literal 108 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gDPvC;#}JO0$sDXqY)vi_6FitV z9l8{>P)Fxg(8ia(%t8*a0b*vkih2%*SeG2(b!l0+f|;SVN85&t)#oF~7*AI}mvv4F FO#lvr8~XqN literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/mauville/anim/1/b/7.png b/data/tilesets/secondary/mauville/anim/1/b/7.png new file mode 100644 index 0000000000000000000000000000000000000000..8ad81b1e1e9daf31260a661bd436367997d4f31c GIT binary patch literal 105 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gDFaUz#}JO0$sDXqY$}IzMLm`* zUDTl{n7Kp6p+#G-)5OQ{dcX|Xl?q{5S`#=9hp;nbt=1OT^vItMGQ-o=&t;ucLK6Uu C+!_4< literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/mauville/tiles.png b/data/tilesets/secondary/mauville/tiles.png index a015fe5b4f7f987c5cd1592b3e20c7cbf9bb4fbf..e4ce0d4f85e3532d1a9ea37b02ba4a7ae50b2554 100644 GIT binary patch literal 6372 zcmVx@iEJ09O?V?DWCV-O+YpJ##VsI2IK#Jr= zHu4ZGCC5WbwjwH4G?Z+Gq^yvmB!UeDkTuJP$OtNRhkg(sv@W>E;Sc}F88j3I5 z@4NGNS4(n}=1~OphdVQ8@7%fb-E+_Vvy=w@q!Y}zo;1$7Mh;*TB)mVW_9o1vcL74JP;PJHmTD<^JTyCElD z`YJFuG$$|L{Ca?M|9m5~`?mGoKDlY{{!jU>_2qrCwezr+g^{N%YebsWqyT!O5wmo!4ENf2|uM#H`X!w&7 z{=~#zh!JK`=7mGNaOhFgcso0oo#cgXUiboD)Y&h{p@EVqhl<4kIYbksp+o%cNoKlu z$s3i$dH=AK%u-QI8k>oox`!(Lvyh`$9RF7Uz| zfMr2k3ieQ2JOWI8f#PyPg@tgO!^vUxf>XtzQdkJusZ`4ahvK@J!f~Qh%LOH_4v_B< z8JYS14E;x{x6jyVOh3Et(_BV+=J^oK_|!*`UN)v?I5mku?edgxR}M^H? zlIlzq)*`qWDiLmD33ewv`nue5=w>q*kwxA&&vWhI=x|@I<3#m`a~s>DOdy0f%KJ7} zmEPkHE60l!R{s$2yf{_+@92<~eUslPwxintYV!&@-8nU-D(FX!O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Tt7@*dKSxK&<8sL!2_;h!zkzi~)l-hj>r(mh%ut?nx-|7Kee^cp z=0h${zZOvia5~5{yHH4P;|~GHif04v6`#c5JDHTm^8WwAzZuAaFm>kxCA;$3zkS$# z@KfRC{g&2iV;fqM&Wxf%nDubUqKgH%O7`CY(m_owfk_XTxtp_99-|8URlrL!J wLEVhNFqNL%sf~?fj$L4TzwNk`jM^c|W`*DV5Oj|7|KD{pW2?gzMzo~=0f}9I2><{9 diff --git a/data/tilesets/secondary/mauville_game_corner/tiles.png b/data/tilesets/secondary/mauville_game_corner/tiles.png index c8f0dd1eee95cc66c7cbdb49c1b95bb43532c228..3f7f565c9c6a6fc6b8d4bf6d879964987d69619a 100644 GIT binary patch literal 1788 zcmVn+GFi~-x)hjQ>SW6*c3FDcr+7#nbrQcg_=1Tm|mRrNOuq`hmG#okc8X>#y`d zB0>j07C`{G)niE5RLqqe25c|pBX)zo`C0?W*C*zSlJe*A`Hqt#?GR=0uamSzEL9np zEf*TmB^DCr7cr}3SGa9p)Yc6yRpDtxZ8;;N)}1>jt*!y{&x~B!HH3vc{ZP1aAr#Nt zS}11Z%TUO9R3RPQIHY=!k5aTw|JK)2Bx>F0gD|SMfkE*@ShoZ0>~u4z%+64$1`aZ4 zhy%3^ghW8>Y(FOcAk?5{TEbk%9GylWGssLhqn?&f>xi+GGFVDM&9rb@JuM-0T*jC$ zZwl{E8m6&HaIN1mvDsUBYfwGuS`oBd2HG`k9oI@~F_S}dQxcFzRmV)#Ra@(E6 zJ9q`OXI;8B1I$R#s!EL+p;~TPxRVQssJdv`ok3}KX0|KjEFmXrVwU*bt*MdwXM{8A zg;BOj>TMwQp9CqQpcxq9w0dEbl@Jz+X7HBK)hA)vGJ7a#)rc8IZ1$rqHwO;`iGgdU z7f#?{XX`s4RKPzWOCNv$)j(Z?nBkt-bxi(KXUTsZll5>~9SB2I3gHEtB@wt4>I2}t zB~fv2O#&4qDyCWyqH-NWd%cpORHADv{dy&<);^xYzfq5G(sJ7vj}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P5~?mYSG;Y#Xkhm>t6@hW$j-V2B1u!Ah4SxP!OO3Yp)5sgqhF+ zg8HT*@YXQ|yle_uK?VAFJ zM#l#sKZ~M9NhfZ|QQrJ9k`@s8rT|I73?L~O0ymihO-+El!k7+S;KpPc{{tXiC9!lz RA#DHv002ovPDHLkV1nKOs$>8F diff --git a/data/tilesets/secondary/mauville_gym/anim/0.png b/data/tilesets/secondary/mauville_gym/anim/0.png new file mode 100644 index 0000000000000000000000000000000000000000..090fe6a1a814dc6488c72a954de5e33d1a26d7f6 GIT binary patch literal 215 zcmeAS@N?(olHy`uVBq!ia0vp^96;Q_0wfr&mCt$%q~>|LIEH9U><#o5JEFkzX-iIV z^|qNcK3i_hG?$JGR$}4{eQI!_P2!;fTS29TBjdMu5ih@@Za`-(@T*@vJAOGzvG_9R=Y(!DEn}w+p2f#)|;mv=67@5{c5D| zvWGcu(W6Bo_no5`e`S(?yvSnq_QI`cv5M#1%&suc_#>(o;wAUIdP4`lUG~=CWJTeP PAQyYO`njxgN@xNA5QJ7Q literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/mauville_gym/anim/1.png b/data/tilesets/secondary/mauville_gym/anim/1.png new file mode 100644 index 0000000000000000000000000000000000000000..48f325890e0ce2c83252bb5d82375ed61b971664 GIT binary patch literal 218 zcmeAS@N?(olHy`uVBq!ia0vp^96;Q_0wfr&mCt$%q!xO*IEH9UEDbs+c-Vj=*>msB zdWOBR2il~jKU>(XDF?ir9k;tL&yvJ?nMlJ5&1EFE3RWZGV09;u9U|B7qvV z+GC>H5egwj?{~gdt8}RpW?$r-J-OSODN8@HCuWi5>_d0{AKYB6EamT(fRg>BQJx30L#YB z8!UEAY^cw7IKdcV0}gaKh%Xnmb}_7&7rF#-*j8*I$;UjmbyK49cxh}iLm(O5V8P?bY3zgD>T8e44-c+xf#7`NJ6b!*Awq zoKn}Wy4(C+TkO{`n6KAU_~%YI`Q@U9$e%|3n8N#8y}?f2Ufmzh-%j42=I@w)$NW3y n-!cFG!TkH+l6Nk7<9Z37meuh-l$2BE00000NkvXXu0mjfNMW|J literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/mauville_gym/tiles.png b/data/tilesets/secondary/mauville_gym/tiles.png index d710d2e4014675de83c1d02588bacd7600afa9d9..5606bb101b487ccf9dc87fa1e0e1fd3155fedbb4 100644 GIT binary patch literal 1534 zcmVc6^G#;IS-L0M84?5clI4qpmUTnmDfGh~tzA*9Dw;T16>4 z3rbv9DS-iN3UTuV#1#rtM4?Q}O?*Ypsxp9QsRHkcz><>q9j=7|Jhh3OuOh*8 z2MMYjDNX~*zY|Nb*okF9-HJu2;z*f}h?a!`8k-0X4_oiAZUmf!z+v^AkSLZYDjkV> zS;JP;y7Zm!vb{efK6$t$@g8vUa1;@SY+-x=Y22?0g-~CGp{VcytWaf<#wo^yA>-^7 zXAz+i@+bnfV9M5h)FHaS{uz9DX%@qJIS);Y4D7X5dKRe<#yZhW09T747FnNFnAMt9 z9rU*_P$D&H)k$3yi@*XTMp?M5L77(H=N1QX@o{wl`}X@3Fkg`PuL3YnJjI)mz!<{> zw}=iB+~~-Z(j6&${~dOJ8Ir2rL19e?2!4XNf-pSdRuCIR1HLtsy}6E%W*t_1Qi5Ji zYF)w%tk>|ptW^b*ksL=|BheCq+phuhdSFF0-m(isW^ms;t>xjO`#U7FJ|6UyXf>It zE)S^^lcYm3I}cXRc36SfR+ZPo5O&0y^<2CdzvEb2oRHB>jS)`Jd2-MP?r=AwYO9uW$7WB|M~$1kz)<2J0= zU{~W~Sf>9nsl*!kX?NdRe{!QNy8PKa&zCAT&6nph6qmXIm^NYfQ?)tU?clzsi(yIZ z{<_>>hx_Ze*k8xN{+1o=FS?KB_w9z1*=aoX9IuS-<9YZFLI*|aKv4(ZCOXK|T8i{} z5z#oSwGpZH{16nOw zEpx>0w6Wjm4*Tg{_S1+Bh1lq_pQ2!E$k$vqgMRwYN%>MS+Fxq44zcHV4#i*G*%xo8 zRe%zqzjF2*R-ttW-{PUT6FUdu?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I&Y`^qgamqAeEZI1AUM{MTGw8Enb1u5|qJuOW*Fk1%@>v#m zgOFXKe7+0K-+vvwyxGe06f?kb$Et33B5ofe*iQekZm@okR`PEkkV|b-Wi;&wEgU~N z!g>!-$zopxHbH5gYzb?LXKmpFFmNit>W0ScEfC9xtEx-%SMG-MBZ9{<{U-isY0yh( zMs~SF$jvA1OumR^v|+MZ{^m-ncp}yb{u!$dg2Iol%?4(udQ$d}%iaEirl95vNc*|v zX@E@boaznqFvX^l0X!-N(%uMK@VTw_%5|Jp7PR_bfh@2-sjKb|NNF6J|IhryOEXzu z)R0{Em}A=@vHw!-g(9dH)4= z*MA}kA_32Lwr&1Ek&wq{f1&~TC-&di7k^{he&uu{)P5BT82nQwxbdH9z+JQRtfhxp TUQb{DYn5x=)l;iRqF($T9d!cI diff --git a/data/tilesets/secondary/mirage_tower/tiles.png b/data/tilesets/secondary/mirage_tower/tiles.png index 8eab57f93e1786e283ff95b6d1edef51d40c3617..fd2904ca1c2e059dbe41875d8af997e31a7cef13 100644 GIT binary patch literal 5645 zcmV+o7V_zdP)wMzz9Ut(qFJUw0+Iwu-AdQ<{z45KxW@*^posDzgA<1oT3A@8^JfUiq2# z>UMQI$Ja7fGk!&_Un$`)UzP|tAV(=*KErDpKr>MI!ypHB2T45xR0Y5nN^@x2gj%y? z0ENXMZ2;W@#2u=|emzBhB_!9{K*}wx26Zt|gPDz0QkbZn9Q4ZC1!}j4s;-?@^>zku zRx4)-Cfie!{>?jTss>7pReVP&HTXpJ)!=EC@W*Fy5j&-Hl;Ue|1b7->)hGY0{-XZ+ zl=|f9zx348n}F4o!OIuTSBK#3XlM%9#c2+K2vt& zt*W;yD(V{lQF>XyTvaGyJx2IibgQKaTM3&OfrOyZ&gulyZnQe@C-&P`?N1|%Ro#p* z*@eL>01|JpGMOE6jj(vPHn|F0L)H#i3&7f{#&%6a=)fTnIv2^SS%7j$sg_)oe7&tI z@DbqeDLkUksHkqER0;n`uKgU))C4qQ;pBZCZ9>1}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(}TKGRXu@{Q3HAg4w0eIAME;irIhTP94&RQ!6BSURAytn73zg7 zGtnQ!vM=~Hd@w&$!})yB2*3zhR0Rg+4|4!yh80Jt7Xm$t=?~mWd5~v|^QLwJVC23| z6&RQwa1~g^@9TvK>EqrXoOWLTD0_gwz+qVxmS=6b3H3r~WzqYC9-wN(E7nN>pd$$k z)I2}qv4;)y!i+~Gy+2stKo05DWWXW{r&I<8WVenOiuLtEW`DguSOXaD5r9_=rh$Qb zJeP}{KNs_D!~X9=ZAUc+ax8~F{~8#W)2{jeL-qBc9+Zf0Dr@(e_)v1LU*ZlwL zJvRW)d*hVF2i`4&ieMF4EO~wazK~VHK5WC9C@WddKLwq`UBh#70uDCntX9u20#xe?aC36-v@BrA|cwwtZcm@!M`t$Px7?V(YA%__Ax4fis zHh;hyQXW9=r%aF}#b@ycnOyRe2-{z9LB4Vpf6(&M66@wmfY@%hHTz6}PA+9-9zd#g zQu#XrK-bAVbkD*65rBdW>(2^20nVU_Y}f~+;OYNt&mhA^JyFs{4$EKd^9N~Nbp2F| z&f0!G!1mw&I)Hz8ZRb}4?EFfA>pO4!e+%*Y^=ohZ3V{Cs%bXx8ZyZME00000NkvXX Hu0mjf49Z}e diff --git a/data/tilesets/secondary/mossdeep/tiles.png b/data/tilesets/secondary/mossdeep/tiles.png index 1933b89838bc7a141d1b55e4a733ca979ed666a8..818406b232532bddfaa3cfd1bd79271d9c045d31 100644 GIT binary patch literal 4269 zcmV;e5K`}nP)sFkK&MB)nLjhf&Sj*z0fGx1F#PAVlfuy$Ae23&<+A_fXecufK zh@xaU>x4ES!ua^j%x~Td-+bTi_j_-iNDcnbQ^Z5Zap;%B!^8B;a5&tAWiirDvt%`h z%|0SFdyUw_hh;IGg=VRt@s#f`8K~Qo97xSj(g>Yr3@`#lh>;k;QG?M)kbOQ8qSVY_ zi0W)e^+A{zyl*hTFmRO3LVTzEjU<04$e*3D#qMRs%hwp!Y7~6A=1}lj*&!}Co?Y3= zE6OYBPz}xLc*x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B{(qxU8>&KLr}Nh3VL%^>A()rcpFBTCp1HSmxXL}$+iPp2IlDYOgLtg>sbV)zw!oLmlUZ=__h-vC sarH4P#BCG5digrG(QWqphd($$HnK4$r$4I6`tPG$O<7y1Qo%ane{0wz5&!@I diff --git a/data/tilesets/secondary/oceanic_museum/tiles.png b/data/tilesets/secondary/oceanic_museum/tiles.png index 25a20d586268dc2e1990a56b0dbd572fb0594820..a074d4a053d80297213ccb4a160e7c8307c5f11c 100644 GIT binary patch literal 3219 zcmV;E3~cj>P)iMC908OHyBLLuo6u*KN5kx(w~fIx_~EX0E$IMx)jM6fwXKpJ-9`GDX` z%LfE$%-FmXEFw9{N`e}z@hV{D;;0o^B#HrA3-&2^-+Qy%r6^L|IKKD-cntmgcK2~+ zcIMl8Z+45hu|FhmDukg9}4jIP$M|^YyH;v(8Jw_ zB@e+l+{-VF7V#gotJ~Z3%X4FsTF(s^xL^aZ7*P~A-Du#B+=lCtWdXK*;R3m?Shh_u z6g@a`Mg#v*!}UG_zb5-Vb>UaHP7Ehw8~@R_t{bOsOP_n_xO6&+f7EiQ2E>{;K;x|g z2DfIojW!*)%{YU|ahw=qo3@;~OHFIr?c1&cl6w^A+G>KhHySOBLEGT!-44bBd;##i z;{N2b4F-DOL7{`^g)ov5ETic86%<)RMQ*Lwbn3v?78Q>ir`Hdq#62kCerqdKuLENB z)mm^)gvnCrr=j3n=_UM5YArY?!W6&O^M6{axL7Ez@1(2>;PAx`J?oi9?9{bhf+-{tX94k(>Xcc{~au4Fig(>1%`@*H@_*#jg z^XGuuGk6Yfn|a1fAd^9TKjZoOd6}SyLY0;aqgA4@*(%*MfsBu^`m3_Is?9CSv$*3j zracgGZCN$3Eb;2=caEn*aF!J-qj4scO8HR0Rn;YBQMP;1QP+!5~oN>Ea!2N$KaO__j8z z#d&S@^9#{#^!CjK#v#M)0{JjT0h7gL`ZBxO4eDT~5n6v~6#Ce8f25C{qaU>;=X!@d zo&GabK6Xz+F8F?DQj0d7xyn#LL@ho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Idn9T#wf zsf7b?@r$=_&jsKQ4vhGxCvcaC0{D2q-30hYUSb+!}#|~ydaKiAM zqfj6)sj?k)U>D|}=A7Wfq>TY8U3JgQNWfz20>2O;fUgE3{AYD+1~G4XK)W2^b>V*n z_`48x75oQ>0q=`nfnP2Vwvm_$@UIWQ0#gDG1GGy6;t}-n01rMBABFwyzXM!)B)S=} zjmCe_h5u7P35lryvNZ91^OnNK!R3J@>%w$HIRISdUibw7WWzqk_U+RFtJz$BEtg&P z|2a%VIvso`zo)=*Hn*0~WmiLi4-H>@ke1(5APdcb$c6&yhVDk8l$PH!AitW;F0X|G z9~!zZj1T1Z6v#0k=KtIN5t3{+jeEndfTy(GVjmm zp8a&q1u~gM4_NcGynb7LPl2`1vdgR4PxIuNV;s2cHBbo;-3x^MwN?gIIf-c-Qk zB3=XtUPkg~p6O~J4Wvr|Aw&5J{d-ep(QR;*{2`hGSvLd_yqV}2ovw&sxARyAFmP9* zGFVDyuHVe07sz9n!W+sN#PWJHu#nE&yq-xf`GFX_U&c}n?Lr!w1CgeH6d}NP2I=cd z>GZ-)3e2z@eMQP3mZN`1jsP+Y$V6ulyJL93co#BD3+eRI0tH0%c_zF8DdB`7UjG=H zr$4$G4ZNoYH$P42i9_?+omuj!8o}9twdgSUMbya`x$ZgyZwHkV;e{Wop#SnV;uz{}C8d__` zqA`eWHRAY++~A5`bc-M$AvdEn5^@Qg&D#xtHpst9IO1;zFO# z@M$gTmxz6m$Q_sP`>KRH{#c^FBN;y}G?Xeyc!YKidT1}*LBQe$bR{l57_qEJqY*Nt zCfu-#T2$Lm@1aiYzLRgOELV`QF(nw5mg@iv7lOzqJ z6w)vj%q5s}A+wzfmF48vHF>r($I>GA#8TPLjFALe+bOWMoIe~t!!KT&aY|x2DN>sX zl949wne*~4PjHktm literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/pacifidlog/anim/0/1.png b/data/tilesets/secondary/pacifidlog/anim/0/1.png new file mode 100644 index 0000000000000000000000000000000000000000..dde024f6ee9c1f875aceb5689025cac8e97dabbc GIT binary patch literal 603 zcmV-h0;K(kP)HB@>9Jx8ED*%En;Kx68oYpv*2SZnN~u)O#+ zOzp6pv0J5W($)j|`L*-S%)ai4!;brL_S5BEZN}W)-?E*1Ph1o*N0P?xmPi7U z*y}G5T(vE{zHD*T_P^qyE)8_i8Wh?XD0&EWp=~4-2wA+4R^m~B6%rJh;uns-kggVb zNAAE<6h}_glGj9?|1G+f>J;v`xe3n=ySc}~&}~tk$Y~Tx;gq@O3g@SAe~4|rwc%dh z`f$W;0QqI0v9IOkC1=|RgTRO9`vKN7;&xL1kJD4;3cY*5y&*2Rbg$uGIs&U=AR%?V zfKlojq-{T-az%y8CTXI$#>%oXOdXM7Fq~uU2+jRwUB3s+ z4ozL5j!4CD#WNbd!E?WXBR(-VJ@y+pRI%pTNs`ceEvw?%!`TA+xu%uu>8TYzA>+AO pk_?gYHl$0hRD8d^Ui0b}<~tO&1~ITZqtXBX002ovPDHLkV1l64CqV!J literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/pacifidlog/anim/0/2.png b/data/tilesets/secondary/pacifidlog/anim/0/2.png new file mode 100644 index 0000000000000000000000000000000000000000..1a4cea24d830d5e4bb129e8ca5747afb074a6c8a GIT binary patch literal 625 zcmV-%0*?KOP)$U%}@X=qy5v^dY+GI0@ZK_0ld&qR^$Nm%PF( zL)vireMy>WJAV=G;rM;$JKymNy$E9HZ&5@L$5;f!7J={M1G7A!TC-!nYWK|US(m@B zy-YN(W=Z$g?)`3dt;=0vKhG)E?A(n|O`QO;zI3s|)WPabUPAY(g;oy|`tbqKS}Mfh zg+>&eYQ*s=v+x4GA12Has%==hV_$b{#JbU2-H6#}H<51Gi{GES+u9fM3p~~l#Np8# zk#|%gbjB6D2(R^p4qmv=a>IzEr1*$@JbVKC)Z;)M4?W23MH{!kiZm&aoDWAG4)!w>NslD={ zoM9i`J21`9ChU_l7nV5lP=6oRSk?Xfcb#d%_dFMl>w1_?hYF9C>i?rt`Zq%%sV6yc~Fl4_Uwz%cS9FnbSi$bA0wfrY&u<9_QoWuojv*3LW6v7$9Z}$M35-`< zvVd>mi-SSm>|7SPYwq}$R(I*mE{T)ZHs}7;Q;y2Jc`0^VtL}}W=|=_IYoE<2>k@c7 zVRe!Axx&2QzJy-pIgd1+SC(k#?Gz1vvg%G>@f`ad+jXP-PuDbmD=%AN%b7M+z_PIK xb9!#eom{<_ytnp8238B6>57>eUD#KAZJ&^{A0wfrY&u<9_Qj0uY9780g#`ZaKwHWZY7PpEl z%=Uh{Pspm8m0xMnUWF&WCd=PFQ}Xe_^8Na%lJ1LxraKj{>YTANcwdpa@okS#R*RPz zFMfW!Cu8gO-syZm;4MZ;KHK(RM|1nNmi)_Uc380Le76IKljx-j#}|oeFHK)+R4Y@X zEn6(d&-MGiOj8BZiW}V>^_xWltFo4q>n}00TxSv|k>8*Ywm@;3xL|$y?&JDbq#Q#2 S==i<>x!Tj!&t;ucLK6T%j#JYB literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/pacifidlog/anim/1/2.png b/data/tilesets/secondary/pacifidlog/anim/1/2.png new file mode 100644 index 0000000000000000000000000000000000000000..747306d5cc598f70a9d260e255d5e417ab563c64 GIT binary patch literal 241 zcmV>9$LnbBbnF(FUo< z8N`22FYc3&+pj3L-$~{ix2Q5lsi7i=`OC7I2Z=HZpmqRn_Go~L8=wif&!y9Vo9 rF%lm13s2$>|Mlz_6#sqiE}{JaL6SgBbZiH700000NkvXXu0mjfeym}d literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/pacifidlog/anim/1/3.png b/data/tilesets/secondary/pacifidlog/anim/1/3.png new file mode 100644 index 0000000000000000000000000000000000000000..20e0a7cdd532da7f539a317a410249eb51f9f8dd GIT binary patch literal 213 zcmeAS@N?(olHy`uVBq!ia0vp^96;>A0wfrY&u<9_Qgb|A9780g`t}*}u_*E|e`YP? z&T?4vT&eKCqR`*2ruX?dUAsl5<@nC=sClG(+kM&jiGl7@{m(_7nySaC%hJg^r^&cr z*@HFR$*w|{^Od(qvaU(WY}b)V67`9gJOH#SGEKa%nMcIF|6?o;mFGfGn? ztbM>UQ_~_lV)y^D^;Ul?=Kbc-U3&1|87m`?fCARYz=C_vvtMuj%@oJ&u;-l7e}9mB NJzf1=);T3K0RYq=R3!ia literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/pacifidlog/anim/1/4.png b/data/tilesets/secondary/pacifidlog/anim/1/4.png new file mode 100644 index 0000000000000000000000000000000000000000..7b74ee349a6ab1b50e849cf4632767187bb3c111 GIT binary patch literal 138 zcmeAS@N?(olHy`uVBq!ia0vp^96;>A0wfrY&u<9_Qh}Z>jv*3Lm-ZTRIT&&{7qiCB zDSdHJ=FZ%zzxoS5Tz9%J;L+11<#2K;x8Z@SqDBX9NmU=n?RPrOsI61{c7M_B)g{iY mZA0wfrY&u<9_Qo)`sjv*3Lm-ZU+9WdZv{>vIM z9-Dj?B5>ryRtL?;g7r345#ItJ|2_pUjeel)78&qol`;+0P}VA0wfrY&u<9_Qh}Z>jv*3Lm-Z_1IT&&{SF@&F z@OhKKVbk@xKIq7H?{6-XoisP3a$j-?7QU)5OVGYeY#e>4AKb*GR0hhEo$Eb(;pb6Mw<&;$S(iZG!7 literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/pacifidlog/anim/1/7.png b/data/tilesets/secondary/pacifidlog/anim/1/7.png new file mode 100644 index 0000000000000000000000000000000000000000..f1863fdd56cfa672bfee892261d5f00f563b8b49 GIT binary patch literal 200 zcmeAS@N?(olHy`uVBq!ia0vp^96;>A0wfrY&u<9_QvIGTjv*3LW6v3Ku`2SgT!>MO ziddcSpLfUi!h>zopr03>NvN&o-= literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/pacifidlog/tiles.png b/data/tilesets/secondary/pacifidlog/tiles.png index 496232735b038ecffb16ca07858c601cea479dae..94fe6d96b0786fa5ac932e717a827cd855d23370 100644 GIT binary patch literal 4812 zcmV;-5;N_IP)2TKLEx@DU52ZwuRX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ondary/petalburg_gym/tiles.png b/data/tilesets/secondary/petalburg_gym/tiles.png index 8c996f701c6678c7880540d5aabd51a02f71394a..cb7c40e5ace444f17d59e73adbd07b65e70d0c88 100644 GIT binary patch literal 1429 zcmV;G1#0?`4D(Hu=p1%26e((E! zvIKUKMs9KUjqE63zhHtv{)>{Cxm=oku1fSZ#>1T zCBm(-fKFIqw_H*#RGLN;Dn`>#D!I}IjWuaZr4qghja8HiZI$c{W#)=skWh`ugmLg0 zYMNeCz^HB+P^)fjfJsG7vT*p3;@G4=s|^eTRxHaR^kBv2uy^s)w#9`nqA=K&WrNk* zbzpaU*9P0}p|W~7Mm`xDi+sDb<-oS(ya31Uy}&W0?Yg8^LNl5 z!=&YwVDjAW!ldnX;c(b-;jmA=-EsO9LMIl-anxB$KVxS-C~0Fj@P}gzj!`->Na{>>ZJ$MH9uid`}^+vq`1|A||=sQc6_XN;qlkaQt{Ybut!j~UC9$Vqd zjh^ozoI%4-W=)RCVCJVzs{GU?R8Hz*`NQv@hUOvuDABsn6!X<;&;=FvlxUHUugoc0 zBOnC@0w4--iWCHkH;`o1RCv$|KH)#|G2i7rL+=iR}2-kr>P zO_S!&#ClIntcSRW2k7N;8FbnUI_(9O;=VHZ^7j$ibn@vmrqh^O@wT~651Vzas(6#@ z-{DOLz_4=2A7ir7@-HLz5l85wmj+GYJeACCqJwYPcOLkHug;*GiZ$ghgmaikS(xB4O=TsJ6EQ<>7=$V8XCo8^Kk( z6)MKeID&*>y+C0-q4@K%8bTzj{WQp0yA>+5#gU&nss2G9&q!o7mo#-wQ<4E~Vtm{c% zPU^z$Sf1(q<846oT=4t&eB&4`hEP5~9`9&r9P^QH*k3SZmBukX;|KZ)G56n0$vgau zkO_-}eiSY4vlxPeVNYy64quy9|NS(bG9E6DDuKqP6M_$amOpm{c(@FMcEHy6h}#U` zsBTyAjp_~IHM@lP_R{}ghTh@r<}VR5{B_7g2z@_HqVJEKbj(t3`SQIM!$mPGbL6!3 j{_8R(tc)lVvV4C7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^S_!M0}@i0u4}4}SD7SZhU2U-YV%0E!tB!J z)Jc$=tBNa_9cnPigrCgS!}DJ@RU-p-?r|y|PBQXGGvcnkt44mv8{^Y+ zO5Rn*TGML>u;`ecl}F$1_S)a-IIml8rf@EQD=mDdxSD=KU1|#wr&OW5ZWyY8Gc3WV z&^nbyBHD~T$3;t-(G{j>b1gV_w3H>J<>WdojHLH6hWZ8OGB}wJ~@MM7MgUwW4%EY#S%4a|5 z$`yAd2NK*0+1Z~XQ8_QH>simcJ!^@7P3&S>khkb_r4dXG*U#N$SWZ~$o_Jp*LR|XZ zJV2v|;jtYc;Q;}j)8gyN@Ihst9m&LFB$6BpXAD5FCR&+jG5jyVOZpdpja z=viUjF{(N*(npmY!>R$}cy?$+HPU#9=yRO`Rh)%B>}h~s=@U=N>4P`=Izy{w;+Qw- i4e;UKok+vOjSZkd%AMT)gn#k>`^w7P&g`x!gY`d!BKr{l diff --git a/data/tilesets/secondary/pokemon_day_care/tiles.png b/data/tilesets/secondary/pokemon_day_care/tiles.png index eab49af325a1ff196f6c434e05bb28319bcc60bb..76cd9ab96ecbcf6b2919358c21c3301fd95326bb 100644 GIT binary patch literal 1528 zcmVE%P8R8Byq)b`5WNUzUF*28L({?Wl zqvpWKhD}0RTH!~rU;QO|{oxpY+n|6uzX`ASN0s+h2j=YfN2C(GuLKFhzxd!0< zz<4#4XdV3d*f#scnH18=f^?AfR2 zar^W^2k1N?`-;7(as`4GZR&ggK6Iq_(WWC9wM*?1wcFAIlDu)qyb>(&GI7)60Uf>J z#=K%QX98_IpB^_MX6g?=s4`5(8p9ZR5@l9rnW``{VF~1rrAb+k2IIIg=k&llD~yTDy{hd$>gQ`4W4yO7`bRj8#fB zNgarb2w1uYt&!cd=@EOYtG^)0kebZfFYR{wkPZ(Ij~FMw5#t0nVw?bfu>OvZk2{3a zF=MuekQ3^3Iw!2y!)y<6$6T%~vOO$(%9B--KWnvG@3K9_wa1zj1wc>*JP+`#F%075 z@T78-$rRV0Q9%e)1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ygb3)Io3{i&45)`16%TqY z0UAUIA8LS;9)Umr@vUi__6gJgIy(@r_H4W|VFn!VM{t$uGBN%VfEt{_PY8hL zWdTT+04xduI0P`43xLyhy92=8((@+QDKHvyKz2c1g`yQ;)@?)BRvb?lTgI6hK;a~S zMf61!0H+-S?tK3`3pn{MtOD`_md(ubUrZ~xVB+!r0&#yjM{IkL7XSbN07*qoM6N<$ Eg58A?_5c6? diff --git a/data/tilesets/secondary/pokemon_school/tiles.png b/data/tilesets/secondary/pokemon_school/tiles.png index 3c8c4dffe6f69f1033da8ace9c9eaa4940235a22..20e3f32c8c3373b94e9828637ce50e761953f45c 100644 GIT binary patch literal 1027 zcmV+e1pNDnP)BjE6vrP;iH3qhrw)Y-`2+!X?$XOt2!S>oOFGns5KKB9g`!!7;5F9b(StCdOBXw2 zY=RKkI~ZbYM>aU;d;+`gJ=vD5$cfULCc_>0$2;qP@BX@z?gkx^uk_rymD7MZC2TFm3B@uGpJVW#?Q0gpM!bp1`JimD< zCFB+Mo9}F8X8{P24Rn%pigekfY&HTe**6$1dYtp^xS<=?SQ0aoWR0tf_IFHPyw>^} z$kw`mJVCZzE5ua;q-r!kT_L#hwI^$9Af5^lfJd@{C4xo!bFhq2uh%Ew>I_onOK2O( zJnb!QzB)Av;CbEzT%AGcd~TmTtM`#KAh7bR5-Z zdkZnql`-lTQP(R%)t$g`CQ(u!QIHKXl+;HEw!vM-E*#N+N1k^MM?!4E34wK?4QCqF zb_o=*U8Tq$En302P~_7}6N@+>FK#?8!E#7fV^R28vCgB3FVcUpKEjAw@czc)$Q(^| z);wM4g(F@k3v{8djfM(a@)QbE8c^7$>NkqWDeF*nNydFJP7T}$42(`C?huBYR9PGW zWzJ0#gfI+)n$dPbK$#y5NleEklfZWrPH1d9nX6m$dX*NjW%CyNwkBxAP>NvgM(WM3 z8#SkjuK}Y*s56co(((IIyWjfq*m1`?RCPIW=j&Y89b;y_nv-vD*G;3V{6gd^yASvL zY5X7HY*(WXh*x#TNZ5}&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1zrxxre0e~$wJu$ZfutR|F+Yta2prFMC z2mz*#5J1i+M+ac10FYp3f@0);F8*|_@Ga_V0X%q`w8nIRZWkadBXM>S5bX%6F4fCw19FfjKq(gi+=hPW==E}$jT`#R zje&B-WMixQ79*|&FqIWRxNK~~^jXzy0jzGDoVa$tOJ#NC`xfBjtfJq1D1hfe%-A(* z=QK?)OzJSIC$*bHhRK~`03tXFp$Ts_;sC%uZn^TOsRLj%IV>2u8#n-PHt{3?)|w39 zpnh(gD)#y}9cu#|0NB#?#pT7aYnT9V4Rtke_=X7paIVvAF#sK&X#qS%Uv1U_pxsH1 zXhwM{aQKF1B{Cm*o1;ANPQ6(&SfgR?MYi7g=*A|0KIACHf zaF}#hv8+whpI+dsC&Ill<0wc5+j>I)wwQBqhP}EbaNscMu*m?pI{+is*yzozm>G|D z&;*{f-^>|w0o9w>x;s553~_8J^L&s^)*7I|SUZ0G&|}!6?*M#vVCKU)252;+GB!JU z;0#?4B!r_!525QW1DG?@12=BC5r8F+0a)@PKx6H=vQj>Di~;Tr=(FmFb1eXkodH<# zA^>(DyI$5-OrPH1&T9J1?l^ER{Q!WnrE1Hn&tk8gb3}3K2Vo6r{nz7#LJIM3 z91sGDec5NRySgJuQ)LsQ!?>^S!Q5EySns|7&nB_sCX2mxt|Cc|AB1&i*+RiH@A3Ec zSKyj;rL@$F9o`EV!+T&Io#r0Qc@@ue_nYsdAa>k}on0URfBSZL(|*<#`y~>4JD|R$ z9}I|Mf2}fktMOHb0@q)JGwI#^6-2Qs^@?hAC}=d5<@?fm`TZ5p*jX=h0APt`k7OR% zUjdDs^#TKM=(OdTTk6H}iw7tmv0wR0V7g)3(&?5vh4V4#L=3FSOU#)9UJd dsZrT){=XO*^eoT%ZA1V7002ovPDHLkV1oPFNPYkS diff --git a/data/tilesets/secondary/rustboro/anim/0/0.png b/data/tilesets/secondary/rustboro/anim/0/0.png new file mode 100644 index 0000000000000000000000000000000000000000..358745e4b2bcd731f9377bd807afe6e56cd25363 GIT binary patch literal 119 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gDLYRW#}JO0$tV20y^}3?m5R18 zcE%`7R(yNzWiC%sJgGDDbFNP02MWe6!sH}|+}$RLzp<(SrR QcLK;nPgg&ebxsLQ0Msxcp8x;= literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/rustboro/anim/0/1.png b/data/tilesets/secondary/rustboro/anim/0/1.png new file mode 100644 index 0000000000000000000000000000000000000000..f5a095b158f4e21ce69952950e416ed01481c4d7 GIT binary patch literal 113 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gDGN^*#}JO0y{8O?7z|ik0+(Mc zu=B0z^*%X$<`t3rX{uH3OhPhS9M-1XVr9?y`G@1g{AXzoHmg;b@OGLlRGVa~0y4|f L)z4*}Q$iB}O^PAg literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/rustboro/anim/0/2.png b/data/tilesets/secondary/rustboro/anim/0/2.png new file mode 100644 index 0000000000000000000000000000000000000000..91f368cf84b162d4ea6f5705545fa13e2c22acc9 GIT binary patch literal 72 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gDSl5E#}JO0$sWv1Z3n#>7(O-{ UGfM4`s|P9ZboFyt=akR{0Lf_&J^%m! literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/rustboro/anim/0/3.png b/data/tilesets/secondary/rustboro/anim/0/3.png new file mode 100644 index 0000000000000000000000000000000000000000..91f368cf84b162d4ea6f5705545fa13e2c22acc9 GIT binary patch literal 72 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gDSl5E#}JO0$sWv1Z3n#>7(O-{ UGfM4`s|P9ZboFyt=akR{0Lf_&J^%m! literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/rustboro/anim/0/4.png b/data/tilesets/secondary/rustboro/anim/0/4.png new file mode 100644 index 0000000000000000000000000000000000000000..91f368cf84b162d4ea6f5705545fa13e2c22acc9 GIT binary patch literal 72 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gDSl5E#}JO0$sWv1Z3n#>7(O-{ UGfM4`s|P9ZboFyt=akR{0Lf_&J^%m! literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/rustboro/anim/0/5.png b/data/tilesets/secondary/rustboro/anim/0/5.png new file mode 100644 index 0000000000000000000000000000000000000000..91f368cf84b162d4ea6f5705545fa13e2c22acc9 GIT binary patch literal 72 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gDSl5E#}JO0$sWv1Z3n#>7(O-{ UGfM4`s|P9ZboFyt=akR{0Lf_&J^%m! literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/rustboro/anim/0/6.png b/data/tilesets/secondary/rustboro/anim/0/6.png new file mode 100644 index 0000000000000000000000000000000000000000..91f368cf84b162d4ea6f5705545fa13e2c22acc9 GIT binary patch literal 72 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gDSl5E#}JO0$sWv1Z3n#>7(O-{ UGfM4`s|P9ZboFyt=akR{0Lf_&J^%m! literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/rustboro/anim/0/7.png b/data/tilesets/secondary/rustboro/anim/0/7.png new file mode 100644 index 0000000000000000000000000000000000000000..91f368cf84b162d4ea6f5705545fa13e2c22acc9 GIT binary patch literal 72 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gDSl5E#}JO0$sWv1Z3n#>7(O-{ UGfM4`s|P9ZboFyt=akR{0Lf_&J^%m! literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/rustboro/anim/1/0.png b/data/tilesets/secondary/rustboro/anim/1/0.png new file mode 100644 index 0000000000000000000000000000000000000000..75bd2f8a458401dee20016931d523f53682b58c8 GIT binary patch literal 201 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gsR^Dgjv*W~Mf(i7m<&Z+o(F6T z`A79YMZkYJ(lbKFV6PTi+d_^ALK?)S3j3^P6@BMO^4R|AizMd@^sbbi`(@3{tGzx!$NX*?c-T&Ry^F);t%vcCo63A`-wJ!* y9X}GTbz{}%96^hee{L5OTrECwrBBpj|I2W?-81mP=1*%u4)k>Ob6Mw<&;$T+pHR~P literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/rustboro/anim/1/2.png b/data/tilesets/secondary/rustboro/anim/1/2.png new file mode 100644 index 0000000000000000000000000000000000000000..86075ffb0b7955064e20f4ad12b7b449678e4981 GIT binary patch literal 185 zcmeAS@N?(olHy`uVBq!ia0vp^96)Tq0wfsD?CqQeq#8V3978x}rk>l#)odWr`tY+K zYnsk@I9u;I{}PwRoMe+pj!z}^UIcfw zPjUF+&{V8u_1q}#+}0WS&eeBZo8zX>T%z=EhsnOX!Fwc{o_@@`P(O|H?yfZ7dt1G` kZ|||M3)NL$`D4C>b@%$tr06`&43L{VUHx3vIVCg!0Q}xcXaE2J literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/rustboro/anim/1/3.png b/data/tilesets/secondary/rustboro/anim/1/3.png new file mode 100644 index 0000000000000000000000000000000000000000..6e3c576214a9cb83b23595a3a12a392e79349546 GIT binary patch literal 192 zcmeAS@N?(olHy`uVBq!ia0vp^96)Tq0wfsD?CqQeq}n}Q978x}rk*q8I&8qhdZAw3 z_p9xjtCRmHXxRFAD#lu|FquAakS*fTj}5U@%T;8u72v3K%no@`-O+nx!AB1EHCBPE z-9I%Z=p9qxi*%W=Jn)y-*D{k2ixj@jw|pyOwCzr!bhfkg(~{DNcmD04vv(@4f6X&( qV%fYc3h%2`E{h+Vn-cN*{cnDwrWX56UysfQInC46&t;ucLK6UJW=Q}5 literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/rustboro/tiles.png b/data/tilesets/secondary/rustboro/tiles.png index 8cea2a4d9aa815e1f541f283879140ffaad19f11..fbfc72d466555a3b5ed8d52d06942a86648cebb5 100644 GIT binary patch literal 4108 zcmV+n5cBVeP)cdQT+$pCMmBInX#`2C@7=z4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56abdc1f1a5d98f00d588ac3ba0d4 100644 GIT binary patch literal 768 zcmV+b1ONPqP)>&I>DrzNoyI*&F~*Zn z{q9V0rs(04;*lbmDMrB1&DJT!x+wHFTL0suN`z);-{5M0yFrOS5(JV(V4bUFnS93m zHD0ao;2u`XrOsSz&{hy^wIM+u^0@r{aB!C_E$tT>W-zv?GV(Of$akFG@VVKif_u$;{GJ|joB*KbxjuG;5$Q69n zRHhJMJb@MlbK||ARD@YXMU*k+lLOrDAx=Wb^>uPk68mUIkq?2Z-ITn^Qaae>@{VC` zn8w7D$FsID@wxp&mcHGEniQXhAwW<{fg7Svn$8**-($=H^r8i<4KP-q(`gU{Z&#r6 zZjRcps_SVEu8aw35{6L?2}2=Kvs<|eH7?SS=r*o80qgm9NpVjd>fu4}cn2`Xk~QX( z;^Q3vO#%s1EaHwf0V2c^A>?TDUfkpU4b{KgW2Yrw!MeQCk$Gv|Buil(Kd%h`0XUn3 zyRg=h!-)Xki&aDs@I?=C4VyU30m17Qu(pHI2D7#_?Q30yFmj6d_iaeV9ya~ys#0An z^Y^^^xT^mx9+;Kw&=2_+tm6TSoLLlks_=>$AVgwRf>>j{V1;X$uT~WO>W2l!^YdzMAPv;H^HzM(EJq{Idg&)Xie2$IB=Np0c ygFySi2KI+;;VSeM7H8j`d=9m4q;-2$)$K2bp2_^nFt6zV0000Z#=Ghw4n!f?u|MY;(8p#LY)rkr(4^-)cJhkoV1i%Ie;Q`N_3xOaX zgq-V;FOKt51cCy}~5h{y-MfcqLS z90tMgOS3}#(mK)f=G_J0b_DO^1ZCJdJZ%fWHqsaYa0k?# zl*#p1(E-5e12A%=zhnQ$LXWRM1Q-OUZOvzT0~nV8*8t>rK4wyeiQ$(3weMO0EC2wl pQ3a*e13)lY^@R+-45)T@{y!Fe$^02by7B-3002ovPDHLkV1f$@RILC2 diff --git a/data/tilesets/secondary/rusturf_tunnel/tiles.png b/data/tilesets/secondary/rusturf_tunnel/tiles.png index dc947bcc58c7c5dc7ac3ef1d10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6ML_hzP6zEQ}jXcyCifMTq$$h@7Xy@T?k)zX$@qH!|3C;8Ko^(De}F##FqbBG eF+eVIDZp>n351c-$jplX0000B;w!32` zm{kxh3QtstnH@PC>f;fNG7^gp4LQhKK#A6@!5^E$A5d!K) ztTl|5+9c7(Epnia}xDn)sz2kjwHYmPeAK%F}3RH;+dBjLoN z~S4G$0Ue1Cs0f85>O$+z3vTd8kuZq9ha(3?Cz550i)AYgnFaDNfd z4%}9Oxw%PtY0bA{zRni?jU$rrJ|89IoW%Le%ro+JJ}&uc{wMyjscm#2$dh94*CQ;l z&oF5l6ZCRy&-IdeiYshySP^I6C0AUsJmtS?;p`l_RF;iZzenicVe4 zL(|p6hdznL9u8rlT=m^I`U{uz*KW`EXX|gXUW&Q(MSpf#f5o(pBsYYb&f15_ap`}l zDdW-;%VE7-IwqJe1j_W`)K-s^KU))R_D(^X~Ys?{@!uD7N0SI`

D>kG_3LhR{=bK<_s;*}zYW*-M{#8WZd&;R dUfDh5{Q!NkWU<@~n-u^6002ovPDHLkV1gdRw<-Vt literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/secret_base/brown_cave/tiles.png b/data/tilesets/secondary/secret_base/brown_cave/tiles.png index 7888f8cc2852ecadf1877f76fedc2150e56bfe42..a1c8bfe72cedc05d8809660e05d398ae7df03d47 100644 GIT binary patch literal 1166 zcmV;91abR`P)g9D%;RgISfs700*p#y+6u8{l>${IQ4(Wp{crJ^dm zqC^nrZv6hB{E3g;fLlMWrYcE+aDo$jBVdUzQD>h2Wn2X(E^3pUe3KLa>rg~O#00jKks$#HWKFwGoC&Od78=T=r#k1Z6mE-b=s|;e&dBhV_0fq^P zm;j52cMOuzzr)K&%p;PSvM!jwM{zlg2;2$~XGvx|v2tv(ovRniSS=Y~JLECj9$7L1 zdtKDn$if;4&a44H#$1nG;N9#*M;clt6siY-Ftp z)@ZX};&uVUpOQM%BR4}KvLTOUdq9cbGE1C#oeL0&C4aKN`mt7@!Jk1fpnl)t`?o*p zxD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IFsnuc1%0dsXIEX*sPfRpA&QM; z0N*wU&>4y$Q`N+}6#(bZy~lbb)>vJGsm3Tne0q9%d3i}%p|Ey?Ln*3?AcD2V6|E4_ z7IdsP%|BwLH84WBhL=BVJW=Ycpx!W_N@dvO7B@AQJS5_M9eW%s-4(M8e?LAxK0G}9 zPO+OHx(m9wsYwwZAi)W5D&)pCGBkuSaBR5;;LlzDKf|07h|1uGF~zUW(^vEukj<$^Dm2x5_B z%9d;u|AgZ>J19mHlEP$w1kFdbq-p`55CQ}mlL_8zoK0=p zQdWB$Z|}m<*KFO47em;J5rAONlRzCXm!t&|7kxP20a^#L4;71VpBMx0PJJ5C_VE+& oBLHmjneh|wBLLXik@>TL?}HZWu1gYMe*gdg07*qoM6N<$f{IV?H2?qr diff --git a/data/tilesets/secondary/secret_base/brown_cave/unused_tiles.png b/data/tilesets/secondary/secret_base/brown_cave/unused_tiles.png new file mode 100644 index 0000000000000000000000000000000000000000..dfd187d51a78804eeabeaf5a6c036bc29919483b GIT binary patch literal 1163 zcmV;61a$j}P)g9D%;RgISfs700*p#y+6u8{l>N*X!k(YR7srJ^dm zqC^nrZv6hB{E3fz0-yc7nyMrP!U<0BjesS>M4fs5mvI%GxTsBX@=a0ztV03Srjj{d z%)nw-bK>fbO_iumH zaUp6*Lv7-in}d=hRISJycXz1WTE7$ePZR>*x&meKyjoUqov=Q^8_L1dDUq!ip5PE| z%o0mh=G(Y#tG>@{SeM#0Dz+nVNWBbE#OKvJM2fr4AW`%U5P${01Qu|j*J=VenG1NYG*VT0VQgj@Duv`9iM-K&1SRWw+lAJ06`NT z&~^g1XQ0qiSoOyWEp|pb5NWL%@OFjI>guyPMXPPux&?lav&5&TCwYE+e3Y*b4-fLk z{r$bX{B(DR{(wDXx(|jWd47IQf?-dB5x)q={wjBOKYzLEtrbjAX>J-(2ptmO619Oy zp&=ybA+xG}IqQY8pkMW?)d~n0%|UECCqWe5;TZU~;AclJQVs}m&ImH{iGHIPoMBG* zuVl`$z!TGg>37uuP?A)GAurr0Gl!mmrdXV~nzZ+BFSW)!1Tr~kaYne)5h9%6e|rYG zXU_l*8pmV1<`87%YBdBj3HOMe?GYAi6HCHk;mS1W<{TCe5Xj1M#}*bW)g>%WJdeTRy2U_#p=rC*1N~mk10|c7S4_ zxDK3wNUK)t$Le*Bsh*%GEGPIDSIn$)ruY-j1%rshxQ&H9Gbfx2g&QzmpMxBCFr0%J zhrPSjDKe_8ixZe$2aK_!RqQ!Dh=6D&l*HnTa;J&dF^V|{6AWFQfbCGQa>Rztdu(V- zY&xSScBEZJ!|vL;=lvkiEBF&Uji<*q2P%i!-Qzt)cDg{+ijo{XPjL!8C%%`cFOu?Z z#@6m>3h3WBVjS9@TiYh_3r+P@Y=61BM%nYU&t~uZ?~VR9)BpM*jQX_&p>-HiM+A=N zex3yH2rujV!T4SW5YxE6=gc>KGSl_!gV6qlKJIMDH^yx)&VL)9eee7q|83k>QwQ4l dM?+39`wOaR%g$>wtQr6S002ovPDHLkV1knyB1HfI literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/secret_base/red_cave/tiles.png b/data/tilesets/secondary/secret_base/red_cave/tiles.png index 5c21865e2ef239a5b70a7861a57600fedb8613df..2652f6bbfa0f4ed34669f48de37c6606cf013855 100644 GIT binary patch literal 941 zcmV;e15*5nP)1jS5XXl%An7TRKGi(}Jj;;+UCAK|N;pyQ8i&TGEraCorleSVBa!y@D2cRp@+-i9 zydU|x4GT(zaPgPdJ8OGpejYFVM57ThwlNy%)MN(>e+)=R9h#@0-ZFo~>*ePAk?1DUe2 zja%5olKA7Y4aqXarL`;X+3_vAmF^|1uoqKcFYH#LsX%6&F`5qq%)(ol&@?6SGIs3sD$uiYpX2r4ES~2WU(QX}JQEd9Vg~1I6J26#E*p zoarCc)HeOWz{#+pyzsjSL&|`9e;HVXR<7A$;Rl&WKlhj@YiJ0`OEQ7 z>dUCH+E_~$jI*EDD3Mh}kq)&3FI#_;7gs4E(|g|WqZj4fX8wAP`*Nud>P|A}t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ondary/secret_base/red_cave/unused_tiles.png b/data/tilesets/secondary/secret_base/red_cave/unused_tiles.png new file mode 100644 index 0000000000000000000000000000000000000000..5cfebd309c902ba89e8dc986d8d504c1a8ae4aea GIT binary patch literal 938 zcmV;b16BNqP)1jS5XXl%An7TRKGi(}Jj;;+UCAK|N;pyQ8i&TGEraCorleSVBa!y@D2cRp@+-i9 zydU|x4GT(zaPgPdJ8OGpejYFVM57ThwlNy%)MN(>e+)=R9h#@0-ZFo~>*ePAk?1DUe2 zja%5olKA7Y4aqXarL`;X+3_vAmF^|1uoqKcFYH#LsX%6&F`5qq%)(ol&@?6SGIs3sD$uiYpX2r4ES~2WU(QX}JQEd9Vg~1I6J26#E*p zoarCc)HeOWz{#+pyzsjSL&|`9e;HVXR<7A$;Rl&WKlhj@YiJ0`OEQ7 z>dUCH+E_~$jI*EDD3Mh}kq)&3FI#_;7gs4E(|g|WqZj4fX8wAP`*Nud>P|A}t}Cs*^4{VpH4I#6xj zI^SPeW`F%lSB&m2U2*gQf?tVHNX@3Y<-AAPkdEM0K@O8c*|6@L< z^XbbueV<;vq>E|1qKjFaQXbOgW?Opm9>;k;gG^%#G}~4( z3>@EHx4V0^)@90-vYR1(yhB_vjo(h=R|dTt@}MQMyoTl;2M7@2x9=0LyN?-BN z(MXa?AM+~w#%|JA{)c7kf9HSsw`I5>tKf_P(eoG|q)rbGOk&*1FS>bKZrj26G5`Po M07*qoM6N<$g183AlK=n! literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/secret_base/shrub/tiles.png b/data/tilesets/secondary/secret_base/shrub/tiles.png index 2e0a6d028c0554213b145973469639ecc0a0f948..692141b046c614ed2328202e0c7088ff8a331a94 100644 GIT binary patch literal 1177 zcmV;K1ZMk*P)*8D za&FyJ6LG$&PzboszE#Og_IqdCSomUW-d3Ppe*_pD`_LQ z8k&=Nbt+H4;{E+}D)-Y5ALR4p<)!?2ad9D^&(F`r|8REpmECmuP|2rH(+7dsM}fsp z0^5&rcJ?D=r1R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ondary/secret_base/shrub/unused_tiles.png new file mode 100644 index 0000000000000000000000000000000000000000..461d620ae6b2bde40a91e55fcafb0590780fe52d GIT binary patch literal 1173 zcmV;G1Zw+*8D za&FyJ6LG$&PzboszE#Og_IqdCSomUW-d3Ppe*_pD`_LQ z8k&=Nbt+H4;{E+}D)-Y5ALR4p<)!?2ad9D^&(F`r|8REpmECmuP|2rH(+7dsM}fsp z0^5&rcJ?D=r1Rk4TFEtZ)yTR;(L!TLM>M4)36U?74vBy)%?z->Grv&qZ!sE4ejHsL zRAqwIJyw%G3~V3vV>*y4b1PKx4zY1546MY8;GbJCIO!PG&Q#?q<&& z#ErG0as~3Q+W=M_7?zoW`DIC_@b8KI3*aC9W!u0roPvKDTTDgIKNr^WgxQcMjV;EH z(`cxWOXyJ>83yI>b-rMBt&XI|84hpMK7@bft4!4^6fTi8fow|2HL^^oDJHU&*ispC z#+?FEf)N4KGsI_Gfgbt!d%Svsf5&-x zHwH^|jNI;?!%}|VfjMIhNybBTe+QY8TZbOuO6HAC{ljf78$!l4DNw!+wP1+}<*MxU zuU6i=T2?iWyhRw0Ttso*e;Pn?q0eXyq#0ADK0qK@Vx@CVEzV6jmQ{oLIevMNYmP&#dLw!ZBK4mnykgWTr;NA8hy$_R;oRAd zLEhkYHtos&{WNY3Iy2MA|$fP}-+9o;2`{s8-$l#A5`7T^VJ@+`>*O3!(5 zBt1>?s!Vo97-5O^w{OP_d#UDnd2qN}k-QIE)s9G4*&>;fE(ga;BVk<*i$QJEGBxdLqNYJw zkBlfszivl;Cz(3Nvs^!n0xfi+(*F}h0uE5Z(jF# zhy6+3wV2~A?W-{Sa)BROfjK^z2RCg)wryI<+%zaLKVIzbr|Vwp_oc^vM8zjdPGb&A zG#L%?6Wzy8@PoN*WHV+Om}%AkM8K6YnZdvXFl5vv^IRc4wwombE{vmD!EAnRwv;4Q zxZq!vh{r4>fBJ30w9P6o+XJ&GiNIt5-V9n{Qh|vzSQKEQR%6{8O`d|?sOd|2jh_<@ zR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e literal 1127 zcmV-t1ep7YP)ddGjC>9eS=jnCmMoxo z_9jg6CfS*m--nR=VMI=dgf`LMpXcO{^%Wqv;OpS2W$ElB7dpe3)AvVGF<4fz`_nv| zzpY;YeCV73bZqC*zn>_~fqutXt4WLz53itez-<0RB5J0PuldGcG!~B(W2OjVeSl z(~h@9a6Jwk2@*X?d(39QQHxvP# z-c$81J)ghed&mGCv)?>VjKPBX4_a@v-bs1RNKfc=V*unFRh!)3pRK-V`et7GeQ-)v z|3P#w+dY-%&aX9Dy|(%?Nn?)I?}OT8<1l0bQl4|BuqpGQ`t$z&{_gJXwbfUIjtkRyG6JYSLg5~| z!1IH?13;H3Y|4D77;ghZt-hep6o4U(R>y;vc28RX9NK;lfNi3%S?7WL@(T8AZS}Q* zvH+aO2w)Bj#9OKN0BHN(Z%*uX=J#0UL#4HilP;JJ6!R+Q>U>^xFj$K!O^49;DrZuo z&>T@h%zmOu1qfXok`A04Gr%cMsSG{G0Yvs9&_#IeAs{$$Xd+pMz$$DdX?|uMXkieG z4&s1P9W2STiR!TXjTXVl`cd*67;%aD zN`qiH;8ny6r#P-UD18lZ=aGrP^8tkqJknBoKZL1EJEs9MCiUdc9 zz_gGEKnJ)?n_IN~6#94!z_J(q5AbgQmfbkr t++sf;pls*=VSw_3;%0#IgW^_ze*ls8MC)X@VC(<@002ovPDHLkV1lS449x%l diff --git a/data/tilesets/secondary/secret_base/yellow_cave/unused_tiles.png b/data/tilesets/secondary/secret_base/yellow_cave/unused_tiles.png new file mode 100644 index 0000000000000000000000000000000000000000..f825201ccacde428abdad0080b80533bffe1f1cb GIT binary patch literal 1125 zcmV-r1e*JaP)THS(YZJ8IK0czHPA!;>?B!G0MNkSpm$;A_%Hs*6_<{v1{H*)N{lv9zQ1)5-*(nz(GMAgbcG$xxr?QMof zrCjX|ui(i3-sr+^w;cq(wd{tzm+kr>m_3&Mu_&Z7h$iVfiYAlJ<_cNe!h+-y?g{U( zGTBm|#7}LdSciaRHJIyZG_u^UoBlT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g>+z~G5Z+9k{I@iW(^4Dup#u9%5*9_4S&tndfcw%lEaB2%mmKZc%%mO&i+|54zGUP)~menwH67vj9^a0IK$ zB!$Lp>itK|sfgX!Uqv`vzyNW!_L3QFP7ZLL#)u1iSZ^$Gv>!1HHA-g?AfjLUJmFf#<(#k z`PPX$ZbNSjh{BQELIzAR>IDu+m|GU0+|2XZb Iv0^6u4{PJXIsgCw diff --git a/data/tilesets/secondary/slateport/anim/0.png b/data/tilesets/secondary/slateport/anim/0.png new file mode 100644 index 0000000000000000000000000000000000000000..ef62c41431483083afeb712f971a5e1b94705f51 GIT binary patch literal 179 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gsVYww#}JO0u4gxL9ySnRxe$FY z_f!dIg^YRIo8*{f!4nTLnc8!_e{_yXcYF4`b`Hn3hwkP3MDLvd$@?2>?)cMri;5 literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/slateport/anim/1.png b/data/tilesets/secondary/slateport/anim/1.png new file mode 100644 index 0000000000000000000000000000000000000000..9b926bdfc1f0b0450638aa5faa4575fd8cee9a65 GIT binary patch literal 181 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gsTxlg#}JO0re_uTm<&Z&F6=zy zHKBCEo5E`*5AC)-2vfMh^4arcY=Oy7@tk+Ixk}<;f3mZE%uy3g;rz=F-^^XGbjhlN?idzebbwJL|tcd?&kzL+-=BI}cQ2KYVxH zsQYN5!`%Z~+TY9sr(N!uq<+vw`3~2#q)=vk(?9N#Uy2Vn{(0;Y@x85Jmcd1zSSi`S d`2zM$kGNS@#&+Gfbo&U%HJ+}1F6*2UngGyTMrHs2 literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/slateport/anim/3.png b/data/tilesets/secondary/slateport/anim/3.png new file mode 100644 index 0000000000000000000000000000000000000000..9b926bdfc1f0b0450638aa5faa4575fd8cee9a65 GIT binary patch literal 181 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`g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z+*8&2g{@qo)$+XK6T8%M225E}ZI=$CE^I-}FKrtzS>e zsVvJVlW^Tw&aqcXfR86b$%8e2Q=*R{%o{rK&Qe^VyR}fFbEFyJDle&tZTDPWtj8*J> zD?Bg=!eA=F01d?n96w>wEKYJgMb<=7MCX(iYe7@vMx~c_U|HCIDOhm19ctKWKiu06 z1|3GxP~gRa!!V)j01xE8ARZ1fUBy6o+TrWulQ;m`nuXu*=hYkGY&(i3PJNYz1N8H9 u)}J#4LxL@=q*H(E-rtU|0tH(xdxukY#ba8e8;k#ctr+N@*QwN^MEnmQIe@+Z diff --git a/data/tilesets/secondary/sootopolis/anim/0.png b/data/tilesets/secondary/sootopolis/anim/0.png new file mode 100644 index 0000000000000000000000000000000000000000..63f97ad47716c3c28ee8dc79b2eff50da218dba5 GIT binary patch literal 1201 zcmV;i1Wx;jP)OSFbbeyh+?*cJMvtG`6IqS_>?{`+o>4Eb;aNf!Uc z^`80VN9u8h^6g;U>M>@#V>kMad@GJ2^;9HG4_CJfLWqpSG}Dw#w5N#{4qg*HTiDfR$2pagQN_GG{gE7$x}$M9%t?+nv`2bk~LJ+3XoBTZCw5s zoMmG{+GQDqa;eD$C&~GNfAwqdw4>I*+AYV&`y%!db>EK+Z*@9(L}oDh5~i9_B5vZj zHb*!>MT3!-bgt`2rBs?KZb^b*Em&(PS`-*u8Ogd3$gs_f z2V6X8$(rFS_GzpX&D|Nw3cKC;R)P1by&PWZ5rwL@ zWUF}vEGjB1rBIeiaiK%W&56rQkYWUe?J(ZLaY!R3B_pC&C7vI563}pB*Sh4y2`&mf z^#QkKBHn^_@Q|?sNA6~Xvz%V6=;ortt)}bd?&1j|7*`FScBi_-A>}PaG@s<%`DZxs z^n$|8=oh*>Jr8s`8VzZrZ_i1~`7KuCoYn!ig=>R1T=G@$a9s_@R`rmEYJuP?oOg{~ zbRANVUkAKyCDGHW@-Q4mOT|wJ-Q*Vghzqs2P-9E7{62#AmZC-pMw>s#-NR-HA%U&8 zWMu5bu}FYB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u6?X@=KG;Ahav|L*xWl&qN)=;!4Ft|37bs>;p zn;8$dc+rwQ!*}e{*eO~&gR;V@e8u2ZW&P30p0UdU8}9QyavVIlVaP7U zp89~>G7)b#reM*v?PnB&LE8gcndc<#O=rF07%Zse`2tf1TrIh($07*qoM6N<$ Ef?!!oZU6uP literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/sootopolis/anim/5.png b/data/tilesets/secondary/sootopolis/anim/5.png new file mode 100644 index 0000000000000000000000000000000000000000..d0cbfeb57cff3c941397618c313b781c0c15b3f2 GIT binary patch literal 1248 zcmV<61Rwi}P)^F#!7uaB*p!G5BbIE{nH+|9BLI9t4X)_lej5VcR16bs_fJELU6j1+P za-29#+M*~H4bU7uSmEd&&Obv+KHrSSGP%A1Cf8Roo=k3JG$uxqABoR$H5y;b1pfp^ z0G?%hH5$oiLg1%djVD*~!w_;2H|gWXz}1LxBgRc86FKGm)aMZR06sh3i3O}(|W6m6Ney_~;}{pcFx z?b;79FaNq;O1+eN>G_=Z^GD$9!%`k>y4JNsw>n>ae>nSZ^|xVvyOut8T{Fb}jsCu? z_iA3gr{2S0N&2E*g4bMjzWUzzR=kIXzNj9H%hl6@QYsO(NUS7t>t$|(JBKt}?L!ul z+*vEdQELerD77|2+*62>#FbWTj9PqwkZOC-qV-n4j>{kCR*XAD(KS@e0nky0Q(XEK zoFp?P)+LFAVsFI-r^R_}@~yAI^Bc7Vj&47D-xu{FQUCpb2QX;*JELc0&#QC z+MIajD+yDt<<{0w3T>=Zw4{e7BFooxrNsmUN0&Rvt+P_+aLAN^4gt^`z7YUlR^ol> zB@cBWxpxIBcSoW^h;f7RD;S3yM}xgo$SL0J3M|w=akVD+xH$sV<-2Z=?V2FILh|5` zS~j)_Vs>y>*HdJ}PZW*AnGlcgN$MF;CV<=HVB5!8DnIW5wYUpFUJ6XZfk>?3qnBoZ z%A3XfWFj_&>+1(z*-lC1ZZ#Uh=5kxRrjX525RbrERClThu=i3sKxVx2L zrw0lI*-fW~OfCLr^=60FxRGN(x6n4shU@1lcuZZ5iLEfKh1nvw3b%u?+rc3N`D4K8 zHX5E*mB+y0YN>dH;3h5h5e+TT(7Y_9a;x#2AU0000< KMNUMnLSTY5*JyPB literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/sootopolis/anim/6.png b/data/tilesets/secondary/sootopolis/anim/6.png new file mode 100644 index 0000000000000000000000000000000000000000..4b35ededdb4fc28243cd2354e553dbc952523d08 GIT binary patch literal 1161 zcmV;41a|w0P)f6z2ubc?0_qa<8CH$@8p$buY#SwzjTNFG_SJU;&Yv)__RX0k~wpz5vQM zTzPFNc22nBa5%)p4=Zyxe?AU}bU7N0=n|x>%MT;E#wY!B1&n^V{6M3NE8yp=OW+!~ z`1OiLqmS3X#YX_!PI0E)xpBYu{Py^J10CZYcw#K)!@?8oJ1wabx0(e0PLb{Ab9^o5 z_ktuo>5nBKKF#k*+%AE;XMf^$yTms56W`R|g0Y-0_Ux~E-`@$U93!J*2wwPG!uT`d z?m6zB#j$j2}psbNyB9uVR1IasTn4 zcmVDm_+saw(B;V>hSB%0yZ=_)?nUBZ+ZlDd>+j9c_ig;4n?5ZL6Yk(|7<0qud*`iq z4_VV3SImxA4+}`8ATcX66{Yr6>gZlQK+lQKsJPLZnw^vsC19mgha`vE3THLxlqC5E zCSkpmB;{J3+L^~vlXBZcvV|A51!R)(U{^gG7sXVNc11z4sWrLiBsq^H-+T>*9jyj- zuAaWH%jx^kK?4X>KBF+`tBe_U*sOtF>A5yX-uXar>?KWfo2ZdWQ(#FlBqMS8vJH|{ zgmH4lkN zQ8tVOtr}cERubSxq?aytVu^!-rat1dOu}8z4n2g9a!_rITsD&}=?RX}=i_E|aRp(F zqeh?hSy?10Hpr;$}iokGJd~(q=qvXsq!+Ems??rWNfXP7B9|-f+3EqDR-Y z=-7Z}ZPXgZAx?T>*S$gt?spNlTS;gdf=9z)v;@9FP?IJ02?uI%pvE?2`F=$0kso)W z(dI95k7%=un8B@AGYam+smMTgb|T+jM*k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_gym/anim/0/1.png b/data/tilesets/secondary/sootopolis_gym/anim/0/1.png new file mode 100644 index 0000000000000000000000000000000000000000..4fefe45989b4c9176eb9654c866ac22143c18a05 GIT binary patch literal 283 zcmV+$0p$LPP)iWU}5@iEN4`Iwal zN-Wwd(53nzCe=r|G&+`ZqcftBPwp3v#Gc6Rx|2552@%t$B_rTVzI-+u67_rr^xaa5 z^`eq+R{;@GuByL%pN+aa0S9zNw4v(6hn(2_;Y(h=gWaW%W{bkmVlWF6b~|(`j5|?E zWrR;ChaoW-I@}P>UuW3UYIpAYtG)&GgNPg3AP{dHmExhKN68H3U}wI;eL;`EnHE0J hn^er%$kYL`(GvxfCXv<{oy7nE002ovPDHLkV1lW2cp(4) literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/sootopolis_gym/anim/0/2.png b/data/tilesets/secondary/sootopolis_gym/anim/0/2.png new file mode 100644 index 0000000000000000000000000000000000000000..f603b3046ce797d9f621bcfe57cf6b31b7eeb91e GIT binary patch literal 294 zcmV+>0oneEP)7xV6ov0gGIU^sN(_u->|-D!F(Vwu570=>ShY^fh=P)=mI&|$C_TsYhox2T@aft* z_tTL9BN63}a0O8IfX@pe=QEd|+^;C2#hq~BUcQ0bvZBR1qW|u+_w9%(LvRlIhH}GR4RRBMIh) s_!rOCEmY0+G2m|=n2V9c4Tw!X0KF+AZq}065O4rgx|K>``wH~ih(t;|MD_4wCqLK$ z#KI6uk|bi;c@J?GkrI>wV?^wd(0Rr>i%5o03}MVax`pm5%r>M1rN9_ic1;7et_jO4;=VU`9h>_=YdK`oEWa=&+`1+HnYo0vf;R`{ynV4Thl{$B zuBzxNOUG(nce`+NSF*XQpo&;1=j~J%(ns!inw{Ctg-8#rhLeM0hQ3&z%xho@xSURF zI&JBSiB8q3UORQ}?Amp7AKHn$4_#mPBu}GIIZOrE)AK0w@C`lWfk8of7(O`_&m-MG zcsNS9hb+rP8s4Eh25*V3g>6}CZwqk@Z&Q4wve5ZUH`I=Y=PjR2n(p{_H&{0B>UYl9 ja5VW6kU%zuZj9Xz(zV;LZMe8~00000NkvXXu0mjfR+Fzb literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/sootopolis_gym/anim/1/1.png b/data/tilesets/secondary/sootopolis_gym/anim/1/1.png new file mode 100644 index 0000000000000000000000000000000000000000..08413b63c2a7d011e907886e7a2a2659752ea785 GIT binary patch literal 408 zcmV;J0cZY+P)ToQ5Ju;cY_qJC4a-oeQnx)qg{X1>i+G=yvQLD4fE2nbm5l8xxZjv2s6U%_7Egob zVSm_AL{ZGLjN&Q;Aax1V9uNXhijtSH7f^GTP$_rCf^kq#1ox|l%@dsFkQ#B#0O&sQ zAaXuFx|lv@LC^3F=WBsyPTEZKq6;SVqR2P!+7@2x;5E~qyi0zIXNIi-FKtayYWb^ox_Uuc2~V>3Fk-skaimkd z9pSx?6n20d%!mZ|OY%+VfHimPlJdKCg}6n5Xqeuhs0)6e;7lNStSyygd1RDSuotdg z=%vRaZgp#eofWu0y!y;BI*t(#tt=T&0JM?4F?k;p`Px zzZ549B@CsaC@5VpgS^Tp1-e>pSjt@?9b*owjKWZ-wI;Un|GR|lT~^;H1-crr1?i#> zz&UJENGF6H*jefWI)^!B5TZk8?Y}xa+__94q%Q^`_P|>CbZHYoJAG-D`bdO8N#+k4Pb0l3Y)vfzvQfG*cb_7=+|1>N^$Gw0002ovPDHLkV1fjwuw?)M literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/sootopolis_gym/tiles.png b/data/tilesets/secondary/sootopolis_gym/tiles.png index b2533b24309c2f8041fbfa136f141079b98760a6..4f6b257695dd1fa85cd4c851468d5c1e7459d258 100644 GIT binary patch literal 2954 zcmV;53w88~P)&qPs&2bZEo|0Ss(dVYEzyOQ>kyDGEpw+(Lm-^v2ip%Vh4Wog4 z@REG=yuZHh^FCBWN*8~U01p1-YBOqn4;E+Mok@b5zTW`?7w7rMOe(UV?;ZSymPl}t|&O>L==?ea0s0-@c0mKUHxRGF}B3X!{j?B4kL*`h~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ljO0$lGTAcuCLT#Npn-94xvaeTY)Mu+$pTV4vR_yCnV&(iG@J>={S{ z-&1bI+DPIP{Nu!`o!o&%$+3|T&R!Uda01bhb9)3NP-`RQG>=D#VUGNN|Y(V!8dj~8b(y9TAez>Bm!YS2CsZi@&l72JPT5T>X46A z@QGoC@^*$8J}jOOH29QOdv_ef_g6i!IkvnGxQm-60`r!)NeAqYXd_=Av}baGXWs2l zR?*C<j|mDggcE9Kh7!}Lop(J}T8;u2c3e|P zt^%#%dqxnIz{jpb>n&(TWJFMq>WD6dyyHOwzXEf~|163&Eslh=dDN4kl%I{04RUDr z=KA;zJ-~O71DvfxrT7yeZjW%nk+U3aNsdZr%zmbr?buXp#~RbX^^ z_XkNDEEY$R6C%ZNq2K#?3lUs1#ySgM2(#SGmH@o%qpuJaRYTo*ya~6gM?V<&@c+K8 NL~}c{22*n4e*kF21ONa4 diff --git a/data/tilesets/secondary/trainer_hill/tiles.png b/data/tilesets/secondary/trainer_hill/tiles.png index f5330af84a26dde0cf4ff675f6f588caef4943c5..78d292513fd24cce0e55d3fcf528e1c6646f3229 100644 GIT binary patch literal 3594 zcmV+l4)yVgP)Orkm3$V`j*Pva~wpY_|Y5YLBwHh!q^nmp(s=942b-^RfvC?z3ny1bU4SB&cLU;}^ zU`LmCn0nGw$alKz&?6^ksa#6R#3#7XUEhxZ-B7f6!+joa|J%k2J8S6YwC-M zrl;ChP(c=^09CcktF~(G0NqVXH4Q@Sg3aABd{}L|g&RJpg|HX#}~9^F&+);CG3J(z}DVA$eYWLv)phD(ccybSLJY4w4A_h!m~Y2Y*b|jRXGaZHS`>=%2|u*Yx}>kReNr;0 z-Y;EO?;i!sqw0FjD%8Hxi{4f3#%>HRf^kwU*;v!RR0AMyRm0G%$5()Ds!Q9|=$jH9OyLs%qxBZY@&VDN z-8q_sfJG19B0SfnavIahYg+GOO$LHgc=;K;JmE&3bvnkZCT?o3udhR4Lx%#HHMa}{ zDPuak6l_jZ)YkNLsIaZAI2Gp!HY*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)J{&Dtm`^@T)o5g zSjbK>n@R*S*NVf3YcYsZ`=MRHvq*I%NTPfy(`F!(P$ZI?htw?k376TW`+c=Pq`Ib7jXBs0JLDx(4P3h zC8Q8Nd}QGWmS+oCKQjk!RmM1iPppUYijc4TyNM!64y3;<61x2)CX4o`Y8CR9%ML@i z-79PVS_CAe_~trR5b(vtq@w$4p1)%ykBn^=TGaz>)+~Yv#oeRrO%dvsp z5)Dvu&Jx#UN%a{&w5DW($-&IB7Htjg60#GHD10`pXvd z+c3^!P%+A~*NxXBdIftUI$2RM2KeXCti|`m6j8#$Lc-Ckhl)Fbm9v5mNPWKk#?5{H z@(hKZOdBO}@hNO;XwoOM*feDs!!OvD1%aoVz~pvb%J=3^>1fPL)$ht!zD_MN>Ffw9 z@)ws2uPmH_COR7NuyAB<$$NpFv&0lv^11vR)JDgcq$zD;*s04Ng0Wz|LWR0*=aUMx k3bB&uGcwLaHb-NT@WQ7fp>xd8^}kQXZG(r?Z7x6g|BT3|wEzGB diff --git a/data/tilesets/secondary/trick_house_puzzle/tiles.png b/data/tilesets/secondary/trick_house_puzzle/tiles.png index eb81554cc019c9298136bca56517d7da96b2e64a..5ef1bf9ca5741ced07c87f57e4146ab79e6c01b7 100644 GIT binary patch literal 2797 zcmVNh{jkmx+%t2#re)a>%k;pW>2&z3E912;M`Hz|g~{ff^qIUguDJ z%nDL`tQOZ8+}rNLVhLaLWQuG#INFf~c4_QnM=I^r+Wx-3H~)5ab~JKSd}v*dwYml%Io4*%I6amnD7A%y&-NY&y2()xspaSwd|?-3XX zFdl&@zxe+1k+lD$jlI2&qTaYNX|Jjlu~3p=&UH(|= z!3XOM1#3aDuGXmotE1Rb%6kC#3X8X*v=)T~T8o47(AE$M?;ZT!#6nM4lGa%(0)iV+ zER~US5RJ)0(PNW^WSUx1S`j0v%~D~Nm}+I3hr*m>4Y7PobF!x;HNFO!L2&W$v|De^cj1+TU+NHfC>cWa`>uN3Nqv>i>vgKs8BsFh40%;sb-2_$zoV|-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Vkjm z0P)1s)UvJsF$HoO;{Y*;0YC*v8UR0v;0hN57!91pMjo0|$o^9RE;KZ)@hGnbacICi z5E_q)RW*%CKy(n(0Ti;MXa<3lMS;pK8OqReGYsW^0Q`r5NS2mWGVvr*z8?Tz@x(_` z&x-+)IiCcmuSZcpES>wApV5eluB6Wn5M7)|`s{$$um4)dhA&_K$wvSD`ET^00pCf$ zq6B<8ETAp{wgl)y1HO}hMG5$HSU_C@Yzfe_15PvdaRo5xs+;75W##h+WDHwHK|E%Nq1=AedG*!X>1@OULcvY|GUf6c-84O$m(08Fo z+J^%e02lz+sR6G5@B#qO^k^Im0bl@N0ARX5QmgrAEDQJC!vJ1Ec>(2FG?cRg`XtjZ djKEF<_!-FcACM3<8!rF=002ovPDHLkV1kc?j_CjZ diff --git a/data/tilesets/secondary/underwater/anim/0.png b/data/tilesets/secondary/underwater/anim/0.png new file mode 100644 index 0000000000000000000000000000000000000000..7609cc82a2b5c979f6ab161ed683fc7dfe0cf104 GIT binary patch literal 180 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gscKIb#}JO0vb`I5nGJcEcTVO> zVPup$!4|P+>DGNezT{1c@~sNp?>xnXy=jWa3NzQ`8WM{S&g8XiT44B4kg;fP>&g#D zJO6#;T(|awx^&L< e!oBz!J6?z%)v&i*w{S~4$T^;_elF{r5}E+i;Y5}I literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/underwater/anim/1.png b/data/tilesets/secondary/underwater/anim/1.png new file mode 100644 index 0000000000000000000000000000000000000000..64cddd371ad5e1c3f144f282b22abd6036fd9195 GIT binary patch literal 183 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gsX9*=#}JO0qP>P(hYbW+zWb{e z$n$+s5Rdj)p1-oAaP=XTwX-IKP5nQ?xA5>GzUl&RzUS{w9OSJueI)3Za;~xFc+jfY zE^CVyJC1ujFciAw$ZWqnQQNDvX?vu~d49 literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/underwater/anim/2.png b/data/tilesets/secondary/underwater/anim/2.png new file mode 100644 index 0000000000000000000000000000000000000000..ff6ff843784390b5219a4aab5c1cefe04694f9ad GIT binary patch literal 185 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gsRmCM#}JO0yk`vg4jb?=JN)xx z{KLR~qJC9lvu^Ea=gsLFm#%tWxaxe-KIAl`3Ww9{WfzjVPDKVZb6=giB6XhR`j*;+ z`W1_UMPBDh|9QYBr`YjZM1;>Vd&-_)TU$CWO`Z|(sp**Qg6jV%*E^q^A7Ag7v_pTw j literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/underwater/anim/3.png b/data/tilesets/secondary/underwater/anim/3.png new file mode 100644 index 0000000000000000000000000000000000000000..2863c2261fafa876a2cc28ea98abdb59a690f5aa GIT binary patch literal 184 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gsd`Tr#}JO0qP^OD%!UHawaYuF za7UbKWa9a>^IFq7FXly$CTv@xkn#RPWRj$feX|&cmhehVrMGeiueB^Oov?1(-m8ZN zg`||$ZDcO#Yp6T5;QM8P?(Ita-$G@kIoz*|`7CAC5 jEp<0^(@*Fe==sBZBEWXz`OHPKASZdc`njxgN@xNA3js(w literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/underwater/tiles.png b/data/tilesets/secondary/underwater/tiles.png index e0569d970d2c9b1239d0501e1c5c8bfe8b79e3bf..5af21f35392d59b3d4c8046756f016966eb593ac 100644 GIT binary patch literal 2846 zcmV+(3*q#MP)WskK*BK8C~1unfC5UoU(ya9P^tK?T{{b>Q6GBR4<@ZRZ_3tP@=D9&*You&!5W=KfHJ$|H4OJzIydaUJ>^QlVUWU zWmzWAY4_qq-wu^83p@P#x9BVBUD4lu3*+zg75U+tEBEF3Kki$3c_o;Xjk}YRa`*Rh zvFN$alea(-zby)dQCAUl6;M|pb!8y21Nu7(A*B}tCfKF0!!T6hVH*0CxN{T+BD~|j z1tb1$<9HqH$F6+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Sa{|vDUw@0P5pTHE}p!WY~j^2T^2dfUykJ1s9jG27CF&{U|2@K9v(G z1egp6xCZx92EdIM4oCpHFc=G%45$lmc7xLo0@2idGr$H3WK;tSXwJYIg{;dV9)Zs_ zATWdBnC1YGfGpz7*9H&`fHRSnDFK*?0H`AB|CFo!W})BP63DvOmgQ8Q$s-!ZKjnT< z2hc+QV>oPMdszce1gIpgg@`7S{J0j-sq03oU}V!Z07*qoM6N<$ EfEamT(fRg>AtM6=50k?0 l>DRtW$ShHxq~iJO5<~p4A6c#%^TI(IJYD@<);T3K0RRNb7Iy#u literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/unused_1/1.png b/data/tilesets/secondary/unused_1/1.png new file mode 100644 index 0000000000000000000000000000000000000000..bea921d90e42ea862d1fed110fd4913482f3d34a GIT binary patch literal 86 zcmeAS@N?(olHy`uVBq!ia0vp^91ILh3@ktfLwv-1As{8|>EamT(fRg>AtM6=50k?0 l>DRtW$ShHxq~iJO5<~p4A6c#%^TI(IJYD@<);T3K0RRNb7Iy#u literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/unused_1/2.png b/data/tilesets/secondary/unused_1/2.png new file mode 100644 index 0000000000000000000000000000000000000000..16652df19896a91d715ed5047610e1350fa210b1 GIT binary patch literal 106 zcmeAS@N?(olHy`uVBq!ia0vp^91ILh3@ktfLwv-1As}Vw>EamT(fRg>BQJx30L#YB z8!UEAY^cw7IKdcV0}gaKh%Xnmb}_7&7rF#-*j8*I$;UjmbyK49cxh}iLm(O5V8P?bY3zgD>T8e44-c+xf#7`NJ6b!*Awq zoKn}Wy4(C+TkO{`n6KAU_~%YI`Q@U9$e%|3n8N#8y}?f2Ufmzh-%j42=I@w)$NW3y n-!cFG!TkH+l6Nk7<9Z37meuh-l$2BE00000NkvXXu0mjfNMW|J literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/unused_1/tiles.png b/data/tilesets/secondary/unused_1/tiles.png index 0a35187c84f385747b4fb6ec1abfcaf48f7b92e4..3ae8bce428c75a3cdbffacdbabd4dfb686fff395 100644 GIT binary patch literal 77 zcmeAS@N?(olHy`uVBq!ia0vp^96;Q`0wfr$R3!R_ ZWMGI{{ZHWgBApo^b)K$%F6*2UngA<}5!e6# literal 80 zcmeAS@N?(olHy`uVBq!ia0vp^4L~fw0wfsh4j&B#QsSO2jv*Gk$v^xR6C_L%A|wpB c+!zHI7~JLl3AE~-WCbbpboFyt=akR{0B0EyNdN!< diff --git a/data/tilesets/secondary/unused_2/0.png b/data/tilesets/secondary/unused_2/0.png new file mode 100644 index 0000000000000000000000000000000000000000..2895d3319a5c35f73a524731a21caa8f30647a0b GIT binary patch literal 105 zcmeAS@N?(olHy`uVBq!ia0vp^96&6<0wfqt3-&AkQU;zbjv*W~Q;#?bGAMAk9-RN} zBEvDZ8xB6NA567fb3mY_Trp?bZZDP-yCUr6?^^w2NRXB}w|H{pe~=lTu6{1-oD!M< Dhh!kZ literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/unused_2/1.png b/data/tilesets/secondary/unused_2/1.png new file mode 100644 index 0000000000000000000000000000000000000000..63c22acf2b98595cf3a22b7d9dfdf18fc3847c02 GIT binary patch literal 111 zcmeAS@N?(olHy`uVBq!ia0vp^96&6=0wfsJo%qfIDKk$O#}JO0y+<|*GAM8`AMlYj zQ;@FM(V(ukI_UO~qs=BwQ^J|v>QP)Fxg(8ia(%t8*a0b*vkih2%*SeG2(b!l0+f|;SVN85&t)#oF~7*AI}mvv4F FO#lvr8~XqN literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/unused_2/3.png b/data/tilesets/secondary/unused_2/3.png new file mode 100644 index 0000000000000000000000000000000000000000..8ad81b1e1e9daf31260a661bd436367997d4f31c GIT binary patch literal 105 zcmeAS@N?(olHy`uVBq!ia0vp^96+qV0wfsDXLs`gDFaUz#}JO0$sDXqY$}IzMLm`* zUDTl{n7Kp6p+#G-)5OQ{dcX|Xl?q{5S`#=9hp;nbt=1OT^vItMGQ-o=&t;ucLK6Uu C+!_4< literal 0 HcmV?d00001 diff --git a/data/tilesets/secondary/unused_2/tiles.png b/data/tilesets/secondary/unused_2/tiles.png index b9c594303003c71800bd7a8b4768812e6ef80832..2ab3b63d6b5e07e348c729d633361b9024575f14 100644 GIT binary patch literal 979 zcmV;^11$WBP)NToT%#MO;XiCH^PjI&OQvO?_@+VX#D;5$CCEIgZpp5}#3! z21&SdCUt`(j!8sKShE4X{qwkF!n8q)xF9a`=P~;${bxdRg&fewa6#^43PU{i5QYiN zd%2I9_b_=k1@oTG@1;a*nP93PCf8CJ`^8>@+-4eH02c$5C>u~L6R7NF8j{5_@srb_ z^+`$S;YVNS`U77;jPdOQP^YTD0ZNA`_Lq-hO=hoJDO;6-in&?kW;NC#h9u%~7d8D< znWh?Wvj-Iry?!79!uZAPtg%rsRcusD6&n>NT{)l%paLoY0*VNT+20X=FC3zWRddQ8 z>ZCPwwi~1^b+#L>Ep;|OTk33n$V`v83R2KlOcPy{u^Kxgja8E@-pZ0VuAxU=psaQmJIcjn4N!ehr1+6;t5qx5#GX0Ayy<1#K2P0L2v- z%znlHvdE7Yz;5(_Y*hpUXg-neklL|002ovPDHLkV1k-B B&G7&L literal 864 zcmV-m1E2hfP)5(qmRY zQfvqGmek2T#)7`%z&H*DmuhUlxdFhI4_mS;^o1c!e*g~!$T1J2nZYnq5InJDqTq~98{xBf4&^w?89Opyp zrgq5rhTj?jHkpi>Z7ySVG_VL@o%5CYZ)@QE2LW#z=ZEz5M#CCtst)Q+1=OwAp!w|{ z*d<`?5%_{lp`+}`n6Lbi(FwyYV^zYtoFktc&@L3}Cwd2_Ky&Af<17^F&F?vZvmI6} zvO?o*mv&*Tkpg}RI?8j?XmNVJ(gxA43ix-i{rK-&e>$03ABbzlJKQ;4Y04I|ltn**rQ6uJN;ln037&?SH#X*qxh zEuaAx03Z`U+XVoTtANNg0<>K~Z5Oksb`e#C^%MYvu>!(44?qh@3kg7od;lJkF#&Wr z8vy!4HB^N$H9#$70>iI25#nl&yXtcufTjRIH8dW;mkh@!;7QKxKrc$xVq9S+ki6=i z0bp)6fJiMILA(cd9?%O zj>;7RvWg|}_5PQr4wzg-6M?N_vG@uY0^_#Pco*mwngrAZRPLx;F)4lpULc@dNK>Zq qf&ifkMUt%n{cZgJfaJc<3;Y9-xn7ZJ)LXp(0000 Date: Mon, 2 Oct 2017 21:08:54 -0400 Subject: [PATCH 23/42] Decompile data/tileset.s --- data/tileset.s | 707 -------------------------------------------- ld_script.txt | 1 - src/tileset_anims.c | 616 +++++++++++++++++++++++++++++++++++--- 3 files changed, 581 insertions(+), 743 deletions(-) delete mode 100644 data/tileset.s diff --git a/data/tileset.s b/data/tileset.s deleted file mode 100644 index 0ca02d41c..000000000 --- a/data/tileset.s +++ /dev/null @@ -1,707 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .section .rodata - .align 2, 0 - -gUnknown_085105C4:: - .incbin "data/tilesets/primary/general/anim/0/1.4bpp" - -gUnknown_08510644:: - .incbin "data/tilesets/primary/general/anim/0/0.4bpp" - -gUnknown_085106C4:: - .incbin "data/tilesets/primary/general/anim/0/2.4bpp" - - .space 0x20 - -gTilesetAnims_General0:: @ 8510764 - .4byte gUnknown_08510644 - .4byte gUnknown_085105C4 - .4byte gUnknown_08510644 - .4byte gUnknown_085106C4 - -gUnknown_08510774:: - .incbin "data/tilesets/primary/general/anim/1/0.4bpp" - -gUnknown_08510B34:: - .incbin "data/tilesets/primary/general/anim/1/1.4bpp" - -gUnknown_08510EF4:: - .incbin "data/tilesets/primary/general/anim/1/2.4bpp" - -gUnknown_085112B4:: - .incbin "data/tilesets/primary/general/anim/1/3.4bpp" - -gUnknown_08511674:: - .incbin "data/tilesets/primary/general/anim/1/4.4bpp" - -gUnknown_08511A34:: - .incbin "data/tilesets/primary/general/anim/1/5.4bpp" - -gUnknown_08511DF4:: - .incbin "data/tilesets/primary/general/anim/1/6.4bpp" - -gUnknown_085121B4:: - .incbin "data/tilesets/primary/general/anim/1/7.4bpp" - - -gTilesetAnims_General1:: @ 8512574 - .4byte gUnknown_08510774 - .4byte gUnknown_08510B34 - .4byte gUnknown_08510EF4 - .4byte gUnknown_085112B4 - .4byte gUnknown_08511674 - .4byte gUnknown_08511A34 - .4byte gUnknown_08511DF4 - .4byte gUnknown_085121B4 - -gUnknown_08512594:: - .incbin "data/tilesets/primary/general/anim/2/0.4bpp" - -gUnknown_085126D4:: - .incbin "data/tilesets/primary/general/anim/2/1.4bpp" - -gUnknown_08512814:: - .incbin "data/tilesets/primary/general/anim/2/2.4bpp" - -gUnknown_08512954:: - .incbin "data/tilesets/primary/general/anim/2/3.4bpp" - -gUnknown_08512A94:: - .incbin "data/tilesets/primary/general/anim/2/4.4bpp" - -gUnknown_08512BD4:: - .incbin "data/tilesets/primary/general/anim/2/5.4bpp" - -gUnknown_08512D14:: - .incbin "data/tilesets/primary/general/anim/2/6.4bpp" - - -gTilesetAnims_General2:: @ 8512E54 - .4byte gUnknown_08512594 - .4byte gUnknown_085126D4 - .4byte gUnknown_08512814 - .4byte gUnknown_08512954 - .4byte gUnknown_08512A94 - .4byte gUnknown_08512BD4 - .4byte gUnknown_08512D14 - .4byte gUnknown_08512594 - -gUnknown_08512E74:: - .incbin "data/tilesets/primary/general/anim/3/0.4bpp" - -gUnknown_08512F34:: - .incbin "data/tilesets/primary/general/anim/3/1.4bpp" - -gUnknown_08512FF4:: - .incbin "data/tilesets/primary/general/anim/3/2.4bpp" - -gUnknown_085130B4:: - .incbin "data/tilesets/primary/general/anim/3/3.4bpp" - - -gTilesetAnims_General3:: @ 8513174 - .4byte gUnknown_08512E74 - .4byte gUnknown_08512F34 - .4byte gUnknown_08512FF4 - .4byte gUnknown_085130B4 - -gUnknown_08513184:: - .incbin "data/tilesets/primary/general/anim/4/0.4bpp" - -gUnknown_085132C4:: - .incbin "data/tilesets/primary/general/anim/4/1.4bpp" - -gUnknown_08513404:: - .incbin "data/tilesets/primary/general/anim/4/2.4bpp" - -gUnknown_08513544:: - .incbin "data/tilesets/primary/general/anim/4/3.4bpp" - - -gTilesetAnims_General4:: @ 8513684 - .4byte gUnknown_08513184 - .4byte gUnknown_085132C4 - .4byte gUnknown_08513404 - .4byte gUnknown_08513544 - -gUnknown_08513694:: - .incbin "data/tilesets/secondary/lavaridge/anim/0.4bpp" - -gUnknown_08513714:: - .incbin "data/tilesets/secondary/lavaridge/anim/1.4bpp" - -gUnknown_08513794:: - .incbin "data/tilesets/secondary/lavaridge/anim/2.4bpp" - -gUnknown_08513814:: - .incbin "data/tilesets/secondary/lavaridge/anim/3.4bpp" - - -gTilesetAnims_Lavaridge0:: @ 8513894 - .4byte gUnknown_08513694 - .4byte gUnknown_08513714 - .4byte gUnknown_08513794 - .4byte gUnknown_08513814 - -gUnknown_085138A4:: - .incbin "data/tilesets/secondary/pacifidlog/anim/0/0.4bpp" - -gUnknown_08513C64:: - .incbin "data/tilesets/secondary/pacifidlog/anim/0/1.4bpp" - -gUnknown_08514024:: - .incbin "data/tilesets/secondary/pacifidlog/anim/0/2.4bpp" - - -gTilesetAnims_Pacifidlog0:: @ 85143E4 - .4byte gUnknown_085138A4 - .4byte gUnknown_08513C64 - .4byte gUnknown_08514024 - .4byte gUnknown_08513C64 - -gUnknown_085143F4:: - .incbin "data/tilesets/secondary/underwater/anim/0.4bpp" - -gUnknown_08514474:: - .incbin "data/tilesets/secondary/underwater/anim/1.4bpp" - -gUnknown_085144F4:: - .incbin "data/tilesets/secondary/underwater/anim/2.4bpp" - -gUnknown_08514574:: - .incbin "data/tilesets/secondary/underwater/anim/3.4bpp" - - -gTilesetAnims_Underwater0:: @ 85145F4 - .4byte gUnknown_085143F4 - .4byte gUnknown_08514474 - .4byte gUnknown_085144F4 - .4byte gUnknown_08514574 - -gUnknown_08514604:: - .incbin "data/tilesets/secondary/pacifidlog/anim/1/0.4bpp" - -gUnknown_08514704:: - .incbin "data/tilesets/secondary/pacifidlog/anim/1/1.4bpp" - -gUnknown_08514804:: - .incbin "data/tilesets/secondary/pacifidlog/anim/1/2.4bpp" - -gUnknown_08514904:: - .incbin "data/tilesets/secondary/pacifidlog/anim/1/3.4bpp" - -gUnknown_08514A04:: - .incbin "data/tilesets/secondary/pacifidlog/anim/1/4.4bpp" - -gUnknown_08514B04:: - .incbin "data/tilesets/secondary/pacifidlog/anim/1/5.4bpp" - -gUnknown_08514C04:: - .incbin "data/tilesets/secondary/pacifidlog/anim/1/6.4bpp" - -gUnknown_08514D04:: - .incbin "data/tilesets/secondary/pacifidlog/anim/1/7.4bpp" - - -gTilesetAnims_Pacifidlog1:: @ 8514E04 - .4byte gUnknown_08514604 - .4byte gUnknown_08514704 - .4byte gUnknown_08514804 - .4byte gUnknown_08514904 - .4byte gUnknown_08514A04 - .4byte gUnknown_08514B04 - .4byte gUnknown_08514C04 - .4byte gUnknown_08514D04 - -gUnknown_08514E24:: - .incbin "data/tilesets/secondary/mauville/anim/0/a/0.4bpp" - -gUnknown_08514EA4:: - .incbin "data/tilesets/secondary/mauville/anim/0/a/1.4bpp" - -gUnknown_08514F24:: - .incbin "data/tilesets/secondary/mauville/anim/0/a/2.4bpp" - -gUnknown_08514FA4:: - .incbin "data/tilesets/secondary/mauville/anim/0/a/3.4bpp" - -gUnknown_08515024:: - .incbin "data/tilesets/secondary/mauville/anim/1/a/1.4bpp" - -gUnknown_085150A4:: - .incbin "data/tilesets/secondary/mauville/anim/0/b/0.4bpp" - -gUnknown_08515124:: - .incbin "data/tilesets/secondary/mauville/anim/0/b/1.4bpp" - -gUnknown_085151A4:: - .incbin "data/tilesets/secondary/mauville/anim/0/b/2.4bpp" - -gUnknown_08515224:: - .incbin "data/tilesets/secondary/mauville/anim/0/b/3.4bpp" - -gUnknown_085152A4:: - .incbin "data/tilesets/secondary/mauville/anim/1/b/1.4bpp" - - .space 0x20 - -gTilesetAnims_MauvilleVDests0:: @ 8515344 - .4byte BG_VRAM + 0x4c00 - .4byte BG_VRAM + 0x4c80 - .4byte BG_VRAM + 0x4d00 - .4byte BG_VRAM + 0x4d80 - .4byte BG_VRAM + 0x4e00 - .4byte BG_VRAM + 0x4e80 - .4byte BG_VRAM + 0x4f00 - .4byte BG_VRAM + 0x4f80 - -gTilesetAnims_MauvilleVDests1:: @ 8515364 - .4byte BG_VRAM + 0x5000 - .4byte BG_VRAM + 0x5080 - .4byte BG_VRAM + 0x5100 - .4byte BG_VRAM + 0x5180 - .4byte BG_VRAM + 0x5200 - .4byte BG_VRAM + 0x5280 - .4byte BG_VRAM + 0x5300 - .4byte BG_VRAM + 0x5380 - -gTilesetAnims_Mauville0a:: @ 8515384 - .4byte gUnknown_08514E24 - .4byte gUnknown_08514E24 - .4byte gUnknown_08514EA4 - .4byte gUnknown_08514F24 - .4byte gUnknown_08514FA4 - .4byte gUnknown_08514FA4 - .4byte gUnknown_08514FA4 - .4byte gUnknown_08514FA4 - .4byte gUnknown_08514FA4 - .4byte gUnknown_08514FA4 - .4byte gUnknown_08514F24 - .4byte gUnknown_08514EA4 - -gTilesetAnims_Mauville0b:: @ 85153B4 - .4byte gUnknown_085150A4 - .4byte gUnknown_085150A4 - .4byte gUnknown_08515124 - .4byte gUnknown_085151A4 - .4byte gUnknown_08515224 - .4byte gUnknown_08515224 - .4byte gUnknown_08515224 - .4byte gUnknown_08515224 - .4byte gUnknown_08515224 - .4byte gUnknown_08515224 - .4byte gUnknown_085151A4 - .4byte gUnknown_08515124 - -gTilesetAnims_Mauville1a:: @ 85153E4 - .4byte gUnknown_08514E24 - .4byte gUnknown_08514E24 - .4byte gUnknown_08515024 - .4byte gUnknown_08515024 - -gTilesetAnims_Mauville1b:: @ 85153F4 - .4byte gUnknown_085150A4 - .4byte gUnknown_085150A4 - .4byte gUnknown_085152A4 - .4byte gUnknown_085152A4 - -gUnknown_08515404:: - .incbin "data/tilesets/secondary/rustboro/anim/0/0.4bpp" - -gUnknown_08515484:: - .incbin "data/tilesets/secondary/rustboro/anim/0/1.4bpp" - -gUnknown_08515504:: - .incbin "data/tilesets/secondary/rustboro/anim/0/2.4bpp" - -gUnknown_08515584:: - .incbin "data/tilesets/secondary/rustboro/anim/0/3.4bpp" - -gUnknown_08515604:: - .incbin "data/tilesets/secondary/rustboro/anim/0/4.4bpp" - -gUnknown_08515684:: - .incbin "data/tilesets/secondary/rustboro/anim/0/5.4bpp" - -gUnknown_08515704:: - .incbin "data/tilesets/secondary/rustboro/anim/0/6.4bpp" - -gUnknown_08515784:: - .incbin "data/tilesets/secondary/rustboro/anim/0/7.4bpp" - - -gTilesetAnims_RustboroVDests0:: @ 8515804 - .4byte BG_VRAM + 0x5000 - .4byte BG_VRAM + 0x5080 - .4byte BG_VRAM + 0x5100 - .4byte BG_VRAM + 0x5180 - .4byte BG_VRAM + 0x5200 - .4byte BG_VRAM + 0x5280 - .4byte BG_VRAM + 0x5300 - .4byte BG_VRAM + 0x5380 - -gTilesetAnims_Rustboro0:: @ 8515824 - .4byte gUnknown_08515404 - .4byte gUnknown_08515484 - .4byte gUnknown_08515504 - .4byte gUnknown_08515584 - .4byte gUnknown_08515604 - .4byte gUnknown_08515684 - .4byte gUnknown_08515704 - .4byte gUnknown_08515784 - -gUnknown_08515844:: - .incbin "data/tilesets/secondary/rustboro/anim/1/0.4bpp" - -gUnknown_085158C4:: - .incbin "data/tilesets/secondary/rustboro/anim/1/1.4bpp" - - .space 0x20 - - -gTilesetAnims_Rustboro1:: @ 8515964 - .4byte gUnknown_08515844 - .4byte gUnknown_085158C4 - -gUnknown_0851596C:: - .incbin "data/tilesets/secondary/cave/anim/0.4bpp" - -gUnknown_085159EC:: - .incbin "data/tilesets/secondary/cave/anim/1.4bpp" - -gUnknown_08515A6C:: - .incbin "data/tilesets/secondary/cave/anim/2.4bpp" - -gUnknown_08515AEC:: - .incbin "data/tilesets/secondary/cave/anim/3.4bpp" - -gUnknown_08515B6C:: - .incbin "data/tilesets/secondary/cave/anim/unused/0.4bpp" - -gUnknown_08515BEC:: - .incbin "data/tilesets/secondary/cave/anim/unused/1.4bpp" - -gUnknown_08515C6C:: - .incbin "data/tilesets/secondary/cave/anim/unused/2.4bpp" - -gUnknown_08515CEC:: - .incbin "data/tilesets/secondary/cave/anim/unused/3.4bpp" - - .space 0x20 - - -gTilesetAnims_Lavaridge1_Cave0:: @ 8515D8C - .4byte gUnknown_0851596C - .4byte gUnknown_085159EC - .4byte gUnknown_08515A6C - .4byte gUnknown_08515AEC - -gUnknown_08515D9C:: - .incbin "data/tilesets/secondary/ever_grande/anim/0.4bpp" - -gUnknown_08515E1C:: - .incbin "data/tilesets/secondary/ever_grande/anim/1.4bpp" - -gUnknown_08515E9C:: - .incbin "data/tilesets/secondary/ever_grande/anim/2.4bpp" - -gUnknown_08515F1C:: - .incbin "data/tilesets/secondary/ever_grande/anim/3.4bpp" - -gUnknown_08515F9C:: - .incbin "data/tilesets/secondary/ever_grande/anim/4.4bpp" - -gUnknown_0851601C:: - .incbin "data/tilesets/secondary/ever_grande/anim/5.4bpp" - -gUnknown_0851609C:: - .incbin "data/tilesets/secondary/ever_grande/anim/6.4bpp" - -gUnknown_0851611C:: - .incbin "data/tilesets/secondary/ever_grande/anim/7.4bpp" - - .space 0x20 - - -gTilesetAnims_EverGrandeVDests0:: @ 85161BC - .4byte BG_VRAM + 0x5c00 - .4byte BG_VRAM + 0x5c80 - .4byte BG_VRAM + 0x5d00 - .4byte BG_VRAM + 0x5d80 - .4byte BG_VRAM + 0x5e00 - .4byte BG_VRAM + 0x5e80 - .4byte BG_VRAM + 0x5f00 - .4byte BG_VRAM + 0x5f80 - -gTilesetAnims_EverGrande0:: @ 85161DC - .4byte gUnknown_08515D9C - .4byte gUnknown_08515E1C - .4byte gUnknown_08515E9C - .4byte gUnknown_08515F1C - .4byte gUnknown_08515F9C - .4byte gUnknown_0851601C - .4byte gUnknown_0851609C - .4byte gUnknown_0851611C - -gUnknown_085161FC:: - .incbin "data/tilesets/secondary/dewford/anim/0.4bpp" - -gUnknown_085162BC:: - .incbin "data/tilesets/secondary/dewford/anim/1.4bpp" - -gUnknown_0851637C:: - .incbin "data/tilesets/secondary/dewford/anim/2.4bpp" - -gUnknown_0851643C:: - .incbin "data/tilesets/secondary/dewford/anim/3.4bpp" - - -gTilesetAnims_Dewford0:: @ 85164FC - .4byte gUnknown_085161FC - .4byte gUnknown_085162BC - .4byte gUnknown_0851637C - .4byte gUnknown_0851643C - -gUnknown_0851650C:: - .incbin "data/tilesets/secondary/battle_frontier_outside_west/anim/0.4bpp" - -gUnknown_085165CC:: - .incbin "data/tilesets/secondary/battle_frontier_outside_west/anim/1.4bpp" - -gUnknown_0851668C:: - .incbin "data/tilesets/secondary/battle_frontier_outside_west/anim/2.4bpp" - -gUnknown_0851674C:: - .incbin "data/tilesets/secondary/battle_frontier_outside_west/anim/3.4bpp" - - -gTilesetAnims_BattleFrontierOutsideWest0:: @ 851680C - .4byte gUnknown_0851650C - .4byte gUnknown_085165CC - .4byte gUnknown_0851668C - .4byte gUnknown_0851674C - -gUnknown_0851681C:: @ 851680C - .incbin "data/tilesets/secondary/battle_frontier_outside_east/anim/0.4bpp" - -gUnknown_085168DC:: - .incbin "data/tilesets/secondary/battle_frontier_outside_east/anim/1.4bpp" - -gUnknown_0851699C:: - .incbin "data/tilesets/secondary/battle_frontier_outside_east/anim/2.4bpp" - -gUnknown_08516A5C:: - .incbin "data/tilesets/secondary/battle_frontier_outside_east/anim/3.4bpp" - - -gTilesetAnims_BattleFrontierOutsideEast0:: @ 8516B1C - .4byte gUnknown_0851681C - .4byte gUnknown_085168DC - .4byte gUnknown_0851699C - .4byte gUnknown_08516A5C - -gUnknown_08516B2C:: - .incbin "data/tilesets/secondary/slateport/anim/0.4bpp" - -gUnknown_08516BAC:: - .incbin "data/tilesets/secondary/slateport/anim/1.4bpp" - -gUnknown_08516C2C:: - .incbin "data/tilesets/secondary/slateport/anim/2.4bpp" - -gUnknown_08516CAC:: - .incbin "data/tilesets/secondary/slateport/anim/3.4bpp" - - -gTilesetAnims_Slateport0:: @ 8516D2C - .4byte gUnknown_08516B2C - .4byte gUnknown_08516BAC - .4byte gUnknown_08516C2C - .4byte gUnknown_08516CAC - -gUnknown_08516D3C:: - .incbin "data/tilesets/primary/building/anim/0.4bpp" - -gUnknown_08516DBC:: - .incbin "data/tilesets/primary/building/anim/1.4bpp" - - -gTilesetAnims_InsideBuilding0:: @ 8516E3C - .4byte gUnknown_08516D3C - .4byte gUnknown_08516DBC - -gUnknown_08516E44:: - .incbin "data/tilesets/secondary/sootopolis_gym/anim/0/0.4bpp" - -gUnknown_08516FC4:: - .incbin "data/tilesets/secondary/sootopolis_gym/anim/0/1.4bpp" - -gUnknown_08517144:: - .incbin "data/tilesets/secondary/sootopolis_gym/anim/0/2.4bpp" - -gUnknown_085172C4:: - .incbin "data/tilesets/secondary/sootopolis_gym/anim/1/0.4bpp" - -gUnknown_08517544:: - .incbin "data/tilesets/secondary/sootopolis_gym/anim/1/1.4bpp" - -gUnknown_085177C4:: - .incbin "data/tilesets/secondary/sootopolis_gym/anim/1/2.4bpp" - - -gTilesetAnims_SootopolisGym0:: @ 8517A44 - .4byte gUnknown_08516E44 - .4byte gUnknown_08516FC4 - .4byte gUnknown_08517144 - -gTilesetAnims_SootopolisGym1:: @ 8517A50 - .4byte gUnknown_085172C4 - .4byte gUnknown_08517544 - .4byte gUnknown_085177C4 - -gUnknown_08517A5C:: - .incbin "data/tilesets/secondary/elite_four/anim/1/0.4bpp" - -gUnknown_08517ADC:: - .incbin "data/tilesets/secondary/elite_four/anim/1/1.4bpp" - -gUnknown_08517B5C:: - .incbin "data/tilesets/secondary/elite_four/anim/0/0.4bpp" - -gUnknown_08517B7C:: - .incbin "data/tilesets/secondary/elite_four/anim/0/1.4bpp" - -gUnknown_08517B9C:: - .incbin "data/tilesets/secondary/elite_four/anim/0/2.4bpp" - -gUnknown_08517BBC:: - .incbin "data/tilesets/secondary/elite_four/anim/0/3.4bpp" - - .space 0x20 - - -gTilesetAnims_EliteFour1:: @ 8517BFC - .4byte gUnknown_08517B5C - .4byte gUnknown_08517B7C - .4byte gUnknown_08517B9C - .4byte gUnknown_08517BBC - -gTilesetAnims_EliteFour0:: @ 8517C0C - .4byte gUnknown_08517A5C - .4byte gUnknown_08517ADC - -gUnknown_08517C14:: - .incbin "data/tilesets/secondary/mauville_gym/anim/0.4bpp" - -gUnknown_08517E14:: - .incbin "data/tilesets/secondary/mauville_gym/anim/1.4bpp" - - .space 0x20 - - -gTilesetAnims_MauvilleGym0:: @ 8518034 - .4byte gUnknown_08517C14 - .4byte gUnknown_08517E14 - -gUnknown_0851803C:: - .incbin "data/tilesets/secondary/bike_shop/anim/0.4bpp" - -gUnknown_0851815C:: - .incbin "data/tilesets/secondary/bike_shop/anim/1.4bpp" - - .space 0x20 - -gTilesetAnims_BikeShop0:: @ 851829C - .4byte gUnknown_0851803C - .4byte gUnknown_0851815C - -gUnknown_085182A4:: - .incbin "data/tilesets/secondary/sootopolis/anim/0.4bpp" - -gUnknown_08518EA4:: - .incbin "data/tilesets/secondary/sootopolis/anim/1.4bpp" - -gUnknown_08519AA4:: - .incbin "data/tilesets/secondary/sootopolis/anim/2.4bpp" - -gUnknown_0851A6A4:: - .incbin "data/tilesets/secondary/sootopolis/anim/3.4bpp" - -gUnknown_0851B2A4:: - .incbin "data/tilesets/secondary/sootopolis/anim/4.4bpp" - -gUnknown_0851BEA4:: - .incbin "data/tilesets/secondary/sootopolis/anim/5.4bpp" - -gUnknown_0851CAA4:: - .incbin "data/tilesets/secondary/sootopolis/anim/6.4bpp" - -gUnknown_0851D6A4:: - .incbin "data/tilesets/secondary/sootopolis/anim/7.4bpp" - - .space 0x20 - -gUnknown_0851E2C4:: - .incbin "data/tilesets/secondary/unused_1/0.4bpp" - -gUnknown_0851EAC4:: - .incbin "data/tilesets/secondary/unused_1/1.4bpp" - -gUnknown_0851F2C4:: - .incbin "data/tilesets/secondary/unused_1/2.4bpp" - -gUnknown_0851FAC4:: - .incbin "data/tilesets/secondary/unused_1/3.4bpp" - -gTilesetAnims_Sootopolis0:: @ 85202C4 - .4byte gUnknown_085182A4 - .4byte gUnknown_08518EA4 - .4byte gUnknown_08519AA4 - .4byte gUnknown_0851A6A4 - .4byte gUnknown_0851B2A4 - .4byte gUnknown_0851BEA4 - .4byte gUnknown_0851CAA4 - .4byte gUnknown_0851D6A4 - -gUnknown_085202E4:: - .incbin "data/tilesets/secondary/battle_pyramid/anim/0/0.4bpp" - -gUnknown_085203E4:: - .incbin "data/tilesets/secondary/battle_pyramid/anim/0/1.4bpp" - -gUnknown_085204E4:: - .incbin "data/tilesets/secondary/battle_pyramid/anim/0/2.4bpp" - - .space 0x20 - -gUnknown_08520604:: - .incbin "data/tilesets/secondary/battle_pyramid/anim/1/0.4bpp" - -gUnknown_08520704:: - .incbin "data/tilesets/secondary/battle_pyramid/anim/1/1.4bpp" - -gUnknown_08520804:: - .incbin "data/tilesets/secondary/battle_pyramid/anim/1/2.4bpp" - - .space 0x3d00 - -gUnknown_08524604:: - .incbin "data/tilesets/secondary/unused_2/0.4bpp" - - .space 0x1c0 - -gUnknown_08524804:: - .incbin "data/tilesets/secondary/unused_2/1.4bpp" - -gTilesetAnims_BattlePyramid0:: @ 8524864 - .4byte gUnknown_085202E4 - .4byte gUnknown_085203E4 - .4byte gUnknown_085204E4 - -gTilesetAnims_BattlePyramid1:: @ 8524870 - .4byte gUnknown_08520604 - .4byte gUnknown_08520704 - .4byte gUnknown_08520804 - diff --git a/ld_script.txt b/ld_script.txt index 2ab0f780b..fcd3af3d4 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -356,7 +356,6 @@ SECTIONS { data/field_tasks.o(.rodata); data/reset_rtc_screen.o(.rodata); data/start_menu.o(.rodata); - data/tileset.o(.rodata); src/tileset_anims.o(.rodata); src/palette.o(.rodata); data/fanfares.o(.rodata); diff --git a/src/tileset_anims.c b/src/tileset_anims.c index b7f18d869..e53461e02 100644 --- a/src/tileset_anims.c +++ b/src/tileset_anims.c @@ -31,41 +31,587 @@ static void cur_mapheader_run_tileset2_func(void); // .rodata -extern const u16 *const gTilesetAnims_General0[]; -extern const u16 *const gTilesetAnims_General1[]; -extern const u16 *const gTilesetAnims_General2[]; -extern const u16 *const gTilesetAnims_General3[]; -extern const u16 *const gTilesetAnims_General4[]; -extern const u16 *const gTilesetAnims_Lavaridge0[]; -extern const u16 *const gTilesetAnims_Pacifidlog0[]; -extern const u16 *const gTilesetAnims_Underwater0[]; -extern const u16 *const gTilesetAnims_Pacifidlog1[]; -extern u16 *const gTilesetAnims_MauvilleVDests0[]; -extern u16 *const gTilesetAnims_MauvilleVDests1[]; -extern const u16 *const gTilesetAnims_Mauville0a[]; -extern const u16 *const gTilesetAnims_Mauville0b[]; -extern const u16 *const gTilesetAnims_Mauville1a[]; -extern const u16 *const gTilesetAnims_Mauville1b[]; -extern u16 *const gTilesetAnims_RustboroVDests0[]; -extern const u16 *const gTilesetAnims_Rustboro0[]; -extern const u16 *const gTilesetAnims_Rustboro1[]; -extern const u16 *const gTilesetAnims_Lavaridge1_Cave0[]; -extern u16 *const gTilesetAnims_EverGrandeVDests0[]; -extern const u16 *const gTilesetAnims_EverGrande0[]; -extern const u16 *const gTilesetAnims_Dewford0[]; -extern const u16 *const gTilesetAnims_BattleFrontierOutsideWest0[]; -extern const u16 *const gTilesetAnims_BattleFrontierOutsideEast0[]; -extern const u16 *const gTilesetAnims_Slateport0[]; -extern const u16 *const gTilesetAnims_InsideBuilding0[]; -extern const u16 *const gTilesetAnims_SootopolisGym0[]; -extern const u16 *const gTilesetAnims_SootopolisGym1[]; -extern const u16 *const gTilesetAnims_EliteFour1[]; -extern const u16 *const gTilesetAnims_EliteFour0[]; -extern const u16 *const gTilesetAnims_MauvilleGym0[]; -extern const u16 *const gTilesetAnims_BikeShop0[]; -extern const u16 *const gTilesetAnims_Sootopolis0[]; -extern const u16 *const gTilesetAnims_BattlePyramid0[]; -extern const u16 *const gTilesetAnims_BattlePyramid1[]; + +const u16 gUnknown_085105C4[] = INCBIN_U16("data/tilesets/primary/general/anim/0/1.4bpp"); + +const u16 gUnknown_08510644[] = INCBIN_U16("data/tilesets/primary/general/anim/0/0.4bpp"); + +const u16 gUnknown_085106C4[] = INCBIN_U16("data/tilesets/primary/general/anim/0/2.4bpp"); + +const u16 tileset_anims_space_0[16] = {}; + +const u16 *const gTilesetAnims_General0[] = { + gUnknown_08510644, + gUnknown_085105C4, + gUnknown_08510644, + gUnknown_085106C4 +}; + +const u16 gUnknown_08510774[] = INCBIN_U16("data/tilesets/primary/general/anim/1/0.4bpp"); + +const u16 gUnknown_08510B34[] = INCBIN_U16("data/tilesets/primary/general/anim/1/1.4bpp"); + +const u16 gUnknown_08510EF4[] = INCBIN_U16("data/tilesets/primary/general/anim/1/2.4bpp"); + +const u16 gUnknown_085112B4[] = INCBIN_U16("data/tilesets/primary/general/anim/1/3.4bpp"); + +const u16 gUnknown_08511674[] = INCBIN_U16("data/tilesets/primary/general/anim/1/4.4bpp"); + +const u16 gUnknown_08511A34[] = INCBIN_U16("data/tilesets/primary/general/anim/1/5.4bpp"); + +const u16 gUnknown_08511DF4[] = INCBIN_U16("data/tilesets/primary/general/anim/1/6.4bpp"); + +const u16 gUnknown_085121B4[] = INCBIN_U16("data/tilesets/primary/general/anim/1/7.4bpp"); + +const u16 *const gTilesetAnims_General1[] = { + gUnknown_08510774, + gUnknown_08510B34, + gUnknown_08510EF4, + gUnknown_085112B4, + gUnknown_08511674, + gUnknown_08511A34, + gUnknown_08511DF4, + gUnknown_085121B4 +}; + +const u16 gUnknown_08512594[] = INCBIN_U16("data/tilesets/primary/general/anim/2/0.4bpp"); + +const u16 gUnknown_085126D4[] = INCBIN_U16("data/tilesets/primary/general/anim/2/1.4bpp"); + +const u16 gUnknown_08512814[] = INCBIN_U16("data/tilesets/primary/general/anim/2/2.4bpp"); + +const u16 gUnknown_08512954[] = INCBIN_U16("data/tilesets/primary/general/anim/2/3.4bpp"); + +const u16 gUnknown_08512A94[] = INCBIN_U16("data/tilesets/primary/general/anim/2/4.4bpp"); + +const u16 gUnknown_08512BD4[] = INCBIN_U16("data/tilesets/primary/general/anim/2/5.4bpp"); + +const u16 gUnknown_08512D14[] = INCBIN_U16("data/tilesets/primary/general/anim/2/6.4bpp"); + +const u16 *const gTilesetAnims_General2[] = { + gUnknown_08512594, + gUnknown_085126D4, + gUnknown_08512814, + gUnknown_08512954, + gUnknown_08512A94, + gUnknown_08512BD4, + gUnknown_08512D14, + gUnknown_08512594 +}; + +const u16 gUnknown_08512E74[] = INCBIN_U16("data/tilesets/primary/general/anim/3/0.4bpp"); + +const u16 gUnknown_08512F34[] = INCBIN_U16("data/tilesets/primary/general/anim/3/1.4bpp"); + +const u16 gUnknown_08512FF4[] = INCBIN_U16("data/tilesets/primary/general/anim/3/2.4bpp"); + +const u16 gUnknown_085130B4[] = INCBIN_U16("data/tilesets/primary/general/anim/3/3.4bpp"); + +const u16 *const gTilesetAnims_General3[] = { + gUnknown_08512E74, + gUnknown_08512F34, + gUnknown_08512FF4, + gUnknown_085130B4 +}; + +const u16 gUnknown_08513184[] = INCBIN_U16("data/tilesets/primary/general/anim/4/0.4bpp"); + +const u16 gUnknown_085132C4[] = INCBIN_U16("data/tilesets/primary/general/anim/4/1.4bpp"); + +const u16 gUnknown_08513404[] = INCBIN_U16("data/tilesets/primary/general/anim/4/2.4bpp"); + +const u16 gUnknown_08513544[] = INCBIN_U16("data/tilesets/primary/general/anim/4/3.4bpp"); + +const u16 *const gTilesetAnims_General4[] = { + gUnknown_08513184, + gUnknown_085132C4, + gUnknown_08513404, + gUnknown_08513544 +}; + +const u16 gUnknown_08513694[] = INCBIN_U16("data/tilesets/secondary/lavaridge/anim/0.4bpp"); + +const u16 gUnknown_08513714[] = INCBIN_U16("data/tilesets/secondary/lavaridge/anim/1.4bpp"); + +const u16 gUnknown_08513794[] = INCBIN_U16("data/tilesets/secondary/lavaridge/anim/2.4bpp"); + +const u16 gUnknown_08513814[] = INCBIN_U16("data/tilesets/secondary/lavaridge/anim/3.4bpp"); + +const u16 *const gTilesetAnims_Lavaridge0[] = { + gUnknown_08513694, + gUnknown_08513714, + gUnknown_08513794, + gUnknown_08513814 +}; + +const u16 gUnknown_085138A4[] = INCBIN_U16("data/tilesets/secondary/pacifidlog/anim/0/0.4bpp"); + +const u16 gUnknown_08513C64[] = INCBIN_U16("data/tilesets/secondary/pacifidlog/anim/0/1.4bpp"); + +const u16 gUnknown_08514024[] = INCBIN_U16("data/tilesets/secondary/pacifidlog/anim/0/2.4bpp"); + +const u16 *const gTilesetAnims_Pacifidlog0[] = { + gUnknown_085138A4, + gUnknown_08513C64, + gUnknown_08514024, + gUnknown_08513C64 +}; + +const u16 gUnknown_085143F4[] = INCBIN_U16("data/tilesets/secondary/underwater/anim/0.4bpp"); + +const u16 gUnknown_08514474[] = INCBIN_U16("data/tilesets/secondary/underwater/anim/1.4bpp"); + +const u16 gUnknown_085144F4[] = INCBIN_U16("data/tilesets/secondary/underwater/anim/2.4bpp"); + +const u16 gUnknown_08514574[] = INCBIN_U16("data/tilesets/secondary/underwater/anim/3.4bpp"); + +const u16 *const gTilesetAnims_Underwater0[] = { + gUnknown_085143F4, + gUnknown_08514474, + gUnknown_085144F4, + gUnknown_08514574 +}; + +const u16 gUnknown_08514604[] = INCBIN_U16("data/tilesets/secondary/pacifidlog/anim/1/0.4bpp"); + +const u16 gUnknown_08514704[] = INCBIN_U16("data/tilesets/secondary/pacifidlog/anim/1/1.4bpp"); + +const u16 gUnknown_08514804[] = INCBIN_U16("data/tilesets/secondary/pacifidlog/anim/1/2.4bpp"); + +const u16 gUnknown_08514904[] = INCBIN_U16("data/tilesets/secondary/pacifidlog/anim/1/3.4bpp"); + +const u16 gUnknown_08514A04[] = INCBIN_U16("data/tilesets/secondary/pacifidlog/anim/1/4.4bpp"); + +const u16 gUnknown_08514B04[] = INCBIN_U16("data/tilesets/secondary/pacifidlog/anim/1/5.4bpp"); + +const u16 gUnknown_08514C04[] = INCBIN_U16("data/tilesets/secondary/pacifidlog/anim/1/6.4bpp"); + +const u16 gUnknown_08514D04[] = INCBIN_U16("data/tilesets/secondary/pacifidlog/anim/1/7.4bpp"); + +const u16 *const gTilesetAnims_Pacifidlog1[] = { + gUnknown_08514604, + gUnknown_08514704, + gUnknown_08514804, + gUnknown_08514904, + gUnknown_08514A04, + gUnknown_08514B04, + gUnknown_08514C04, + gUnknown_08514D04 +}; + +const u16 gUnknown_08514E24[] = INCBIN_U16("data/tilesets/secondary/mauville/anim/0/a/0.4bpp"); + +const u16 gUnknown_08514EA4[] = INCBIN_U16("data/tilesets/secondary/mauville/anim/0/a/1.4bpp"); + +const u16 gUnknown_08514F24[] = INCBIN_U16("data/tilesets/secondary/mauville/anim/0/a/2.4bpp"); + +const u16 gUnknown_08514FA4[] = INCBIN_U16("data/tilesets/secondary/mauville/anim/0/a/3.4bpp"); + +const u16 gUnknown_08515024[] = INCBIN_U16("data/tilesets/secondary/mauville/anim/1/a/1.4bpp"); + +const u16 gUnknown_085150A4[] = INCBIN_U16("data/tilesets/secondary/mauville/anim/0/b/0.4bpp"); + +const u16 gUnknown_08515124[] = INCBIN_U16("data/tilesets/secondary/mauville/anim/0/b/1.4bpp"); + +const u16 gUnknown_085151A4[] = INCBIN_U16("data/tilesets/secondary/mauville/anim/0/b/2.4bpp"); + +const u16 gUnknown_08515224[] = INCBIN_U16("data/tilesets/secondary/mauville/anim/0/b/3.4bpp"); + +const u16 gUnknown_085152A4[] = INCBIN_U16("data/tilesets/secondary/mauville/anim/1/b/1.4bpp"); + +const u16 tileset_anims_space_1[16] = {}; + +u16 *const gTilesetAnims_MauvilleVDests0[] = { + (u16 *)(BG_VRAM + 0x4c00), + (u16 *)(BG_VRAM + 0x4c80), + (u16 *)(BG_VRAM + 0x4d00), + (u16 *)(BG_VRAM + 0x4d80), + (u16 *)(BG_VRAM + 0x4e00), + (u16 *)(BG_VRAM + 0x4e80), + (u16 *)(BG_VRAM + 0x4f00), + (u16 *)(BG_VRAM + 0x4f80) +}; + +u16 *const gTilesetAnims_MauvilleVDests1[] = { + (u16 *)(BG_VRAM + 0x5000), + (u16 *)(BG_VRAM + 0x5080), + (u16 *)(BG_VRAM + 0x5100), + (u16 *)(BG_VRAM + 0x5180), + (u16 *)(BG_VRAM + 0x5200), + (u16 *)(BG_VRAM + 0x5280), + (u16 *)(BG_VRAM + 0x5300), + (u16 *)(BG_VRAM + 0x5380) +}; + +const u16 *const gTilesetAnims_Mauville0a[] = { + gUnknown_08514E24, + gUnknown_08514E24, + gUnknown_08514EA4, + gUnknown_08514F24, + gUnknown_08514FA4, + gUnknown_08514FA4, + gUnknown_08514FA4, + gUnknown_08514FA4, + gUnknown_08514FA4, + gUnknown_08514FA4, + gUnknown_08514F24, + gUnknown_08514EA4 +}; + +const u16 *const gTilesetAnims_Mauville0b[] = { + gUnknown_085150A4, + gUnknown_085150A4, + gUnknown_08515124, + gUnknown_085151A4, + gUnknown_08515224, + gUnknown_08515224, + gUnknown_08515224, + gUnknown_08515224, + gUnknown_08515224, + gUnknown_08515224, + gUnknown_085151A4, + gUnknown_08515124 +}; + +const u16 *const gTilesetAnims_Mauville1a[] = { + gUnknown_08514E24, + gUnknown_08514E24, + gUnknown_08515024, + gUnknown_08515024 +}; + +const u16 *const gTilesetAnims_Mauville1b[] = { + gUnknown_085150A4, + gUnknown_085150A4, + gUnknown_085152A4, + gUnknown_085152A4 +}; + +const u16 gUnknown_08515404[] = INCBIN_U16("data/tilesets/secondary/rustboro/anim/0/0.4bpp"); + +const u16 gUnknown_08515484[] = INCBIN_U16("data/tilesets/secondary/rustboro/anim/0/1.4bpp"); + +const u16 gUnknown_08515504[] = INCBIN_U16("data/tilesets/secondary/rustboro/anim/0/2.4bpp"); + +const u16 gUnknown_08515584[] = INCBIN_U16("data/tilesets/secondary/rustboro/anim/0/3.4bpp"); + +const u16 gUnknown_08515604[] = INCBIN_U16("data/tilesets/secondary/rustboro/anim/0/4.4bpp"); + +const u16 gUnknown_08515684[] = INCBIN_U16("data/tilesets/secondary/rustboro/anim/0/5.4bpp"); + +const u16 gUnknown_08515704[] = INCBIN_U16("data/tilesets/secondary/rustboro/anim/0/6.4bpp"); + +const u16 gUnknown_08515784[] = INCBIN_U16("data/tilesets/secondary/rustboro/anim/0/7.4bpp"); + +u16 *const gTilesetAnims_RustboroVDests0[] = { + (u16 *)(BG_VRAM + 0x5000), + (u16 *)(BG_VRAM + 0x5080), + (u16 *)(BG_VRAM + 0x5100), + (u16 *)(BG_VRAM + 0x5180), + (u16 *)(BG_VRAM + 0x5200), + (u16 *)(BG_VRAM + 0x5280), + (u16 *)(BG_VRAM + 0x5300), + (u16 *)(BG_VRAM + 0x5380) +}; + +const u16 *const gTilesetAnims_Rustboro0[] = { + gUnknown_08515404, + gUnknown_08515484, + gUnknown_08515504, + gUnknown_08515584, + gUnknown_08515604, + gUnknown_08515684, + gUnknown_08515704, + gUnknown_08515784 +}; + +const u16 gUnknown_08515844[] = INCBIN_U16("data/tilesets/secondary/rustboro/anim/1/0.4bpp"); + +const u16 gUnknown_085158C4[] = INCBIN_U16("data/tilesets/secondary/rustboro/anim/1/1.4bpp"); + +const u16 tileset_anims_space_2[16] = {}; + +const u16 *const gTilesetAnims_Rustboro1[] = { + gUnknown_08515844, + gUnknown_085158C4 +}; + +const u16 gUnknown_0851596C[] = INCBIN_U16("data/tilesets/secondary/cave/anim/0.4bpp"); + +const u16 gUnknown_085159EC[] = INCBIN_U16("data/tilesets/secondary/cave/anim/1.4bpp"); + +const u16 gUnknown_08515A6C[] = INCBIN_U16("data/tilesets/secondary/cave/anim/2.4bpp"); + +const u16 gUnknown_08515AEC[] = INCBIN_U16("data/tilesets/secondary/cave/anim/3.4bpp"); + +const u16 gUnknown_08515B6C[] = INCBIN_U16("data/tilesets/secondary/cave/anim/unused/0.4bpp"); + +const u16 gUnknown_08515BEC[] = INCBIN_U16("data/tilesets/secondary/cave/anim/unused/1.4bpp"); + +const u16 gUnknown_08515C6C[] = INCBIN_U16("data/tilesets/secondary/cave/anim/unused/2.4bpp"); + +const u16 gUnknown_08515CEC[] = INCBIN_U16("data/tilesets/secondary/cave/anim/unused/3.4bpp"); + +const u16 tileset_anims_space_3[16] = {}; + +const u16 *const gTilesetAnims_Lavaridge1_Cave0[] = { + gUnknown_0851596C, + gUnknown_085159EC, + gUnknown_08515A6C, + gUnknown_08515AEC +}; + +const u16 gUnknown_08515D9C[] = INCBIN_U16("data/tilesets/secondary/ever_grande/anim/0.4bpp"); + +const u16 gUnknown_08515E1C[] = INCBIN_U16("data/tilesets/secondary/ever_grande/anim/1.4bpp"); + +const u16 gUnknown_08515E9C[] = INCBIN_U16("data/tilesets/secondary/ever_grande/anim/2.4bpp"); + +const u16 gUnknown_08515F1C[] = INCBIN_U16("data/tilesets/secondary/ever_grande/anim/3.4bpp"); + +const u16 gUnknown_08515F9C[] = INCBIN_U16("data/tilesets/secondary/ever_grande/anim/4.4bpp"); + +const u16 gUnknown_0851601C[] = INCBIN_U16("data/tilesets/secondary/ever_grande/anim/5.4bpp"); + +const u16 gUnknown_0851609C[] = INCBIN_U16("data/tilesets/secondary/ever_grande/anim/6.4bpp"); + +const u16 gUnknown_0851611C[] = INCBIN_U16("data/tilesets/secondary/ever_grande/anim/7.4bpp"); + +const u16 tileset_anims_space_4[16] = {}; + +u16 *const gTilesetAnims_EverGrandeVDests0[] = { + (u16 *)(BG_VRAM + 0x5c00), + (u16 *)(BG_VRAM + 0x5c80), + (u16 *)(BG_VRAM + 0x5d00), + (u16 *)(BG_VRAM + 0x5d80), + (u16 *)(BG_VRAM + 0x5e00), + (u16 *)(BG_VRAM + 0x5e80), + (u16 *)(BG_VRAM + 0x5f00), + (u16 *)(BG_VRAM + 0x5f80) +}; + +const u16 *const gTilesetAnims_EverGrande0[] = { + gUnknown_08515D9C, + gUnknown_08515E1C, + gUnknown_08515E9C, + gUnknown_08515F1C, + gUnknown_08515F9C, + gUnknown_0851601C, + gUnknown_0851609C, + gUnknown_0851611C +}; + +const u16 gUnknown_085161FC[] = INCBIN_U16("data/tilesets/secondary/dewford/anim/0.4bpp"); + +const u16 gUnknown_085162BC[] = INCBIN_U16("data/tilesets/secondary/dewford/anim/1.4bpp"); + +const u16 gUnknown_0851637C[] = INCBIN_U16("data/tilesets/secondary/dewford/anim/2.4bpp"); + +const u16 gUnknown_0851643C[] = INCBIN_U16("data/tilesets/secondary/dewford/anim/3.4bpp"); + +const u16 *const gTilesetAnims_Dewford0[] = { + gUnknown_085161FC, + gUnknown_085162BC, + gUnknown_0851637C, + gUnknown_0851643C +}; + +const u16 gUnknown_0851650C[] = INCBIN_U16("data/tilesets/secondary/battle_frontier_outside_west/anim/0.4bpp"); + +const u16 gUnknown_085165CC[] = INCBIN_U16("data/tilesets/secondary/battle_frontier_outside_west/anim/1.4bpp"); + +const u16 gUnknown_0851668C[] = INCBIN_U16("data/tilesets/secondary/battle_frontier_outside_west/anim/2.4bpp"); + +const u16 gUnknown_0851674C[] = INCBIN_U16("data/tilesets/secondary/battle_frontier_outside_west/anim/3.4bpp"); + +const u16 *const gTilesetAnims_BattleFrontierOutsideWest0[] = { + gUnknown_0851650C, + gUnknown_085165CC, + gUnknown_0851668C, + gUnknown_0851674C +}; + +const u16 gUnknown_0851681C[] = INCBIN_U16("data/tilesets/secondary/battle_frontier_outside_east/anim/0.4bpp"); + +const u16 gUnknown_085168DC[] = INCBIN_U16("data/tilesets/secondary/battle_frontier_outside_east/anim/1.4bpp"); + +const u16 gUnknown_0851699C[] = INCBIN_U16("data/tilesets/secondary/battle_frontier_outside_east/anim/2.4bpp"); + +const u16 gUnknown_08516A5C[] = INCBIN_U16("data/tilesets/secondary/battle_frontier_outside_east/anim/3.4bpp"); + +const u16 *const gTilesetAnims_BattleFrontierOutsideEast0[] = { + gUnknown_0851681C, + gUnknown_085168DC, + gUnknown_0851699C, + gUnknown_08516A5C +}; + +const u16 gUnknown_08516B2C[] = INCBIN_U16("data/tilesets/secondary/slateport/anim/0.4bpp"); + +const u16 gUnknown_08516BAC[] = INCBIN_U16("data/tilesets/secondary/slateport/anim/1.4bpp"); + +const u16 gUnknown_08516C2C[] = INCBIN_U16("data/tilesets/secondary/slateport/anim/2.4bpp"); + +const u16 gUnknown_08516CAC[] = INCBIN_U16("data/tilesets/secondary/slateport/anim/3.4bpp"); + +const u16 *const gTilesetAnims_Slateport0[] = { + gUnknown_08516B2C, + gUnknown_08516BAC, + gUnknown_08516C2C, + gUnknown_08516CAC +}; + +const u16 gUnknown_08516D3C[] = INCBIN_U16("data/tilesets/primary/building/anim/0.4bpp"); + +const u16 gUnknown_08516DBC[] = INCBIN_U16("data/tilesets/primary/building/anim/1.4bpp"); + +const u16 *const gTilesetAnims_InsideBuilding0[] = { + gUnknown_08516D3C, + gUnknown_08516DBC +}; + +const u16 gUnknown_08516E44[] = INCBIN_U16("data/tilesets/secondary/sootopolis_gym/anim/0/0.4bpp"); + +const u16 gUnknown_08516FC4[] = INCBIN_U16("data/tilesets/secondary/sootopolis_gym/anim/0/1.4bpp"); + +const u16 gUnknown_08517144[] = INCBIN_U16("data/tilesets/secondary/sootopolis_gym/anim/0/2.4bpp"); + +const u16 gUnknown_085172C4[] = INCBIN_U16("data/tilesets/secondary/sootopolis_gym/anim/1/0.4bpp"); + +const u16 gUnknown_08517544[] = INCBIN_U16("data/tilesets/secondary/sootopolis_gym/anim/1/1.4bpp"); + +const u16 gUnknown_085177C4[] = INCBIN_U16("data/tilesets/secondary/sootopolis_gym/anim/1/2.4bpp"); + +const u16 *const gTilesetAnims_SootopolisGym0[] = { + gUnknown_08516E44, + gUnknown_08516FC4, + gUnknown_08517144 +}; + +const u16 *const gTilesetAnims_SootopolisGym1[] = { + gUnknown_085172C4, + gUnknown_08517544, + gUnknown_085177C4 +}; + +const u16 gUnknown_08517A5C[] = INCBIN_U16("data/tilesets/secondary/elite_four/anim/1/0.4bpp"); + +const u16 gUnknown_08517ADC[] = INCBIN_U16("data/tilesets/secondary/elite_four/anim/1/1.4bpp"); + +const u16 gUnknown_08517B5C[] = INCBIN_U16("data/tilesets/secondary/elite_four/anim/0/0.4bpp"); + +const u16 gUnknown_08517B7C[] = INCBIN_U16("data/tilesets/secondary/elite_four/anim/0/1.4bpp"); + +const u16 gUnknown_08517B9C[] = INCBIN_U16("data/tilesets/secondary/elite_four/anim/0/2.4bpp"); + +const u16 gUnknown_08517BBC[] = INCBIN_U16("data/tilesets/secondary/elite_four/anim/0/3.4bpp"); + +const u16 tileset_anims_space_5[16] = {}; + +const u16 *const gTilesetAnims_EliteFour1[] = { + gUnknown_08517B5C, + gUnknown_08517B7C, + gUnknown_08517B9C, + gUnknown_08517BBC +}; + +const u16 *const gTilesetAnims_EliteFour0[] = { + gUnknown_08517A5C, + gUnknown_08517ADC +}; + +const u16 gUnknown_08517C14[] = INCBIN_U16("data/tilesets/secondary/mauville_gym/anim/0.4bpp"); + +const u16 gUnknown_08517E14[] = INCBIN_U16("data/tilesets/secondary/mauville_gym/anim/1.4bpp"); + +const u16 tileset_anims_space_6[16] = {}; + +const u16 *const gTilesetAnims_MauvilleGym0[] = { + gUnknown_08517C14, + gUnknown_08517E14 +}; + +const u16 gUnknown_0851803C[] = INCBIN_U16("data/tilesets/secondary/bike_shop/anim/0.4bpp"); + +const u16 gUnknown_0851815C[] = INCBIN_U16("data/tilesets/secondary/bike_shop/anim/1.4bpp"); + +const u16 tileset_anims_space_7[16] = {}; + +const u16 *const gTilesetAnims_BikeShop0[] = { + gUnknown_0851803C, + gUnknown_0851815C +}; + +const u16 gUnknown_085182A4[] = INCBIN_U16("data/tilesets/secondary/sootopolis/anim/0.4bpp"); + +const u16 gUnknown_08518EA4[] = INCBIN_U16("data/tilesets/secondary/sootopolis/anim/1.4bpp"); + +const u16 gUnknown_08519AA4[] = INCBIN_U16("data/tilesets/secondary/sootopolis/anim/2.4bpp"); + +const u16 gUnknown_0851A6A4[] = INCBIN_U16("data/tilesets/secondary/sootopolis/anim/3.4bpp"); + +const u16 gUnknown_0851B2A4[] = INCBIN_U16("data/tilesets/secondary/sootopolis/anim/4.4bpp"); + +const u16 gUnknown_0851BEA4[] = INCBIN_U16("data/tilesets/secondary/sootopolis/anim/5.4bpp"); + +const u16 gUnknown_0851CAA4[] = INCBIN_U16("data/tilesets/secondary/sootopolis/anim/6.4bpp"); + +const u16 gUnknown_0851D6A4[] = INCBIN_U16("data/tilesets/secondary/sootopolis/anim/7.4bpp"); + +const u16 tileset_anims_space_8[16] = {}; + +const u16 gUnknown_0851E2C4[] = INCBIN_U16("data/tilesets/secondary/unused_1/0.4bpp"); + +const u16 gUnknown_0851EAC4[] = INCBIN_U16("data/tilesets/secondary/unused_1/1.4bpp"); + +const u16 gUnknown_0851F2C4[] = INCBIN_U16("data/tilesets/secondary/unused_1/2.4bpp"); + +const u16 gUnknown_0851FAC4[] = INCBIN_U16("data/tilesets/secondary/unused_1/3.4bpp"); + +const u16 *const gTilesetAnims_Sootopolis0[] = { + gUnknown_085182A4, + gUnknown_08518EA4, + gUnknown_08519AA4, + gUnknown_0851A6A4, + gUnknown_0851B2A4, + gUnknown_0851BEA4, + gUnknown_0851CAA4, + gUnknown_0851D6A4 +}; + +const u16 gUnknown_085202E4[] = INCBIN_U16("data/tilesets/secondary/battle_pyramid/anim/0/0.4bpp"); + +const u16 gUnknown_085203E4[] = INCBIN_U16("data/tilesets/secondary/battle_pyramid/anim/0/1.4bpp"); + +const u16 gUnknown_085204E4[] = INCBIN_U16("data/tilesets/secondary/battle_pyramid/anim/0/2.4bpp"); + +const u16 tileset_anims_space_9[16] = {}; + +const u16 gUnknown_08520604[] = INCBIN_U16("data/tilesets/secondary/battle_pyramid/anim/1/0.4bpp"); + +const u16 gUnknown_08520704[] = INCBIN_U16("data/tilesets/secondary/battle_pyramid/anim/1/1.4bpp"); + +const u16 gUnknown_08520804[] = INCBIN_U16("data/tilesets/secondary/battle_pyramid/anim/1/2.4bpp"); + +const u16 tileset_anims_space_10[7808] = {}; + +const u16 gUnknown_08524604[] = INCBIN_U16("data/tilesets/secondary/unused_2/0.4bpp"); + +const u16 tileset_anims_space_11[224] = {}; + +const u16 gUnknown_08524804[] = INCBIN_U16("data/tilesets/secondary/unused_2/1.4bpp"); + +const u16 *const gTilesetAnims_BattlePyramid0[] = { + gUnknown_085202E4, + gUnknown_085203E4, + gUnknown_085204E4 +}; + +const u16 *const gTilesetAnims_BattlePyramid1[] = { + gUnknown_08520604, + gUnknown_08520704, + gUnknown_08520804 +}; extern const u16 gUnknown_08D85640[]; extern const u16 gUnknown_08D85660[]; From 572648ba2d82dbdc8a05ba3d38908e1a1c326e0e Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Mon, 2 Oct 2017 21:51:22 -0400 Subject: [PATCH 24/42] BSS: field_screen, field_effect, pokemon_storage_system, fldeff_cut, script_menu --- src/field_effect.c | 15 +++++++++++++++ src/field_screen.c | 15 +++++++++++++++ src/fldeff_cut.c | 19 +++++++++++++++++++ src/pokemon_storage_system.c | 15 +++++++++++++++ src/script_menu.c | 16 ++++++++++++++++ sym_bss.txt | 30 +++++------------------------- 6 files changed, 85 insertions(+), 25 deletions(-) create mode 100644 src/field_effect.c create mode 100644 src/field_screen.c create mode 100644 src/fldeff_cut.c create mode 100644 src/pokemon_storage_system.c create mode 100644 src/script_menu.c diff --git a/src/field_effect.c b/src/field_effect.c new file mode 100644 index 000000000..628dc776a --- /dev/null +++ b/src/field_effect.c @@ -0,0 +1,15 @@ + +// Includes +#include "global.h" + +// Static type declarations + +// Static RAM declarations + +IWRAM_DATA u8 gUnknown_03000F58[32]; + +// Static ROM declarations + +// .rodata + +// .text diff --git a/src/field_screen.c b/src/field_screen.c new file mode 100644 index 000000000..2d33d237f --- /dev/null +++ b/src/field_screen.c @@ -0,0 +1,15 @@ + +// Includes +#include "global.h" + +// Static type declarations + +// Static RAM declarations +IWRAM_DATA u8 *gUnknown_03000F50; +IWRAM_DATA u32 filler_03000f54; + +// Static ROM declarations + +// .rodata + +// .text diff --git a/src/fldeff_cut.c b/src/fldeff_cut.c new file mode 100644 index 000000000..9929dd6f9 --- /dev/null +++ b/src/fldeff_cut.c @@ -0,0 +1,19 @@ + +// Includes +#include "global.h" + +// Static type declarations + +// Static RAM declarations + +IWRAM_DATA u8 gUnknown_03001100; +IWRAM_DATA u8 gUnknown_03001101; +IWRAM_DATA u8 gUnknown_03001102; +IWRAM_DATA u32 fldeff_cut_unused_03001104; +IWRAM_DATA u8 gUnknown_03001108[25]; + +// Static ROM declarations + +// .rodata + +// .text diff --git a/src/pokemon_storage_system.c b/src/pokemon_storage_system.c new file mode 100644 index 000000000..3e409244c --- /dev/null +++ b/src/pokemon_storage_system.c @@ -0,0 +1,15 @@ + +// Includes +#include "global.h" + +// Static type declarations + +// Static RAM declarations + +IWRAM_DATA u8 gUnknown_03000F78[0x188]; + +// Static ROM declarations + +// .rodata + +// .text diff --git a/src/script_menu.c b/src/script_menu.c new file mode 100644 index 000000000..04f1e82b7 --- /dev/null +++ b/src/script_menu.c @@ -0,0 +1,16 @@ + +// Includes +#include "global.h" + +// Static type declarations + +// Static RAM declarations + +IWRAM_DATA u8 gUnknown_03001124[6]; +IWRAM_DATA u32 filler_0300112c; + +// Static ROM declarations + +// .rodata + +// .text diff --git a/sym_bss.txt b/sym_bss.txt index 3416b67df..a90378a4f 100644 --- a/sym_bss.txt +++ b/sym_bss.txt @@ -1,4 +1,3 @@ -gUnknown_03000000: @ 3000000 .include "src/main.o" .include "src/malloc.o" .include "src/dma3_manager.o" @@ -20,30 +19,11 @@ gUnknown_03000000: @ 3000000 .include "src/tileset_anims.o" .include "src/palette.o" .include "src/sound.o" - -gUnknown_03000F50: @ 3000F50 - .space 0x8 - -gUnknown_03000F58: @ 3000F58 - .space 0x20 - -gUnknown_03000F78: @ 3000F78 - .space 0x188 - -gUnknown_03001100: @ 3001100 - .space 0x1 - -gUnknown_03001101: @ 3001101 - .space 0x1 - -gUnknown_03001102: @ 3001102 - .space 0x6 - -gUnknown_03001108: @ 3001108 - .space 0x1C - -gUnknown_03001124: @ 3001124 - .space 0xC + .include "src/field_screen.o" + .include "src/field_effect.o" + .include "src/pokemon_storage_system.o" + .include "src/fldeff_cut.o" + .include "src/script_menu.o" gUnknown_03001130: @ 3001130 .space 0x4 From ce5ac9d782c100a5e9ed58ed7ba611565d7d7a50 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Mon, 2 Oct 2017 22:02:22 -0400 Subject: [PATCH 25/42] BSS: record_mixing --- src/record_mixing.c | 28 ++++++++++++++++++++++++++++ sym_bss.txt | 43 +------------------------------------------ 2 files changed, 29 insertions(+), 42 deletions(-) create mode 100644 src/record_mixing.c diff --git a/src/record_mixing.c b/src/record_mixing.c new file mode 100644 index 000000000..151835e5e --- /dev/null +++ b/src/record_mixing.c @@ -0,0 +1,28 @@ + +// Includes +#include "global.h" + +// Static type declarations + +// Static RAM declarations + +IWRAM_DATA bool8 gUnknown_03001130; +IWRAM_DATA struct SecretBaseRecord *gUnknown_03001134; +IWRAM_DATA TVShow *gUnknown_03001138; +IWRAM_DATA struct UnknownSaveStruct2ABC *gUnknown_0300113C; +IWRAM_DATA OldMan *gUnknown_03001140; +IWRAM_DATA struct EasyChatPair *gUnknown_03001144; +IWRAM_DATA struct DaycareData *gUnknown_03001148; +IWRAM_DATA void *gUnknown_0300114C; // gSaveBlock2Ptr->field_64C +IWRAM_DATA LilycoveLady *gUnknown_03001150; +IWRAM_DATA void *gUnknown_03001154; // gSaveBlock2Ptr->field_0DC; +IWRAM_DATA void *gUnknown_03001158; // gSaveBlock2Ptr->field_64C +IWRAM_DATA u32 gUnknown_0300115C; +IWRAM_DATA u8 gUnknown_03001160[8]; +IWRAM_DATA u32 gUnknown_03001168[3]; + +// Static ROM declarations + +// .rodata + +// .text diff --git a/sym_bss.txt b/sym_bss.txt index a90378a4f..f32300b15 100644 --- a/sym_bss.txt +++ b/sym_bss.txt @@ -24,48 +24,7 @@ .include "src/pokemon_storage_system.o" .include "src/fldeff_cut.o" .include "src/script_menu.o" - -gUnknown_03001130: @ 3001130 - .space 0x4 - -gUnknown_03001134: @ 3001134 - .space 0x4 - -gUnknown_03001138: @ 3001138 - .space 0x4 - -gUnknown_0300113C: @ 300113C - .space 0x4 - -gUnknown_03001140: @ 3001140 - .space 0x4 - -gUnknown_03001144: @ 3001144 - .space 0x4 - -gUnknown_03001148: @ 3001148 - .space 0x4 - -gUnknown_0300114C: @ 300114C - .space 0x4 - -gUnknown_03001150: @ 3001150 - .space 0x4 - -gUnknown_03001154: @ 3001154 - .space 0x4 - -gUnknown_03001158: @ 3001158 - .space 0x4 - -gUnknown_0300115C: @ 300115C - .space 0x4 - -gUnknown_03001160: @ 3001160 - .space 0x8 - -gUnknown_03001168: @ 3001168 - .space 0xC + .include "src/record_mixing.o" gUnknown_03001174: @ 3001174 .space 0x1 From c8114eb3a5c9ca2b63fbed90e0e6715b4957b2b7 Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Tue, 3 Oct 2017 12:11:13 +0200 Subject: [PATCH 26/42] create battle_transition.h --- include/battle.h | 3 --- include/battle_transition.h | 6 ++++++ src/tileset_anims.c | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) create mode 100644 include/battle_transition.h diff --git a/include/battle.h b/include/battle.h index bc70b86ea..67d3d873d 100644 --- a/include/battle.h +++ b/include/battle.h @@ -927,9 +927,6 @@ u8 GetBankSide(u8 bank); u8 GetBankIdentity(u8 bank); u8 GetBankByIdentity(u8 bank); -// battle_transition -void sub_8149DFC(u8 a1); - // Move this somewhere else #include "sprite.h" diff --git a/include/battle_transition.h b/include/battle_transition.h new file mode 100644 index 000000000..1603f5c93 --- /dev/null +++ b/include/battle_transition.h @@ -0,0 +1,6 @@ +#ifndef GUARD_BATTLE_TRANSITION_H +#define GUARD_BATTLE_TRANSITION_H + +void sub_8149DFC(u8 a1); + +#endif // GUARD_BATTLE_TRANSITION_H diff --git a/src/tileset_anims.c b/src/tileset_anims.c index e53461e02..4ad787e1c 100644 --- a/src/tileset_anims.c +++ b/src/tileset_anims.c @@ -3,7 +3,7 @@ #include "global.h" #include "palette.h" #include "blend_palette.h" -#include "battle.h" +#include "battle_transition.h" #include "task.h" // Static type declarations From 46fe1f441f1f40633b538c9db7d24aa4439629cf Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Tue, 3 Oct 2017 21:35:27 +0200 Subject: [PATCH 27/42] giant battle handler is done wohohohhohoho --- asm/battle_2.s | 1715 -------------------------------- asm/battle_controller_player.s | 2 +- asm/recorded_battle.s | 6 +- asm/rom3.s | 24 +- data/battle_scripts_1.s | 2 +- include/battle.h | 11 +- include/battle_controllers.h | 18 +- include/recorded_battle.h | 3 + src/battle_2.c | 478 +++++++++ src/battle_3.c | 18 +- sym_ewram.txt | 4 +- 11 files changed, 530 insertions(+), 1751 deletions(-) diff --git a/asm/battle_2.s b/asm/battle_2.s index 2ff446dd0..5f970d766 100644 --- a/asm/battle_2.s +++ b/asm/battle_2.s @@ -4,1721 +4,6 @@ .syntax unified .text - - - thumb_func_start sub_803BDA0 -sub_803BDA0: @ 803BDA0 - push {r4-r7,lr} - mov r7, r8 - push {r7} - lsls r0, 24 - lsrs r5, r0, 24 - movs r3, 0 - ldr r0, =gBattlePartyID - mov r8, r0 - ldr r1, =gUnknown_0203CF00 - mov r12, r1 - ldr r7, =gBattleStruct - lsls r0, r5, 1 - adds r4, r0, r5 - adds r6, r0, 0 -_0803BDBC: - mov r0, r12 - adds r2, r3, r0 - ldr r1, [r7] - adds r0, r4, r3 - adds r0, r1 - adds r0, 0x60 - ldrb r0, [r0] - strb r0, [r2] - adds r3, 0x1 - cmp r3, 0x2 - ble _0803BDBC - mov r1, r8 - adds r0, r6, r1 - ldrb r0, [r0] - bl pokemon_order_func - adds r4, r0, 0 - lsls r4, 24 - lsrs r4, 24 - ldr r7, =gBattleStruct - ldr r0, [r7] - adds r0, r5, r0 - adds r0, 0x5C - ldrb r0, [r0] - bl pokemon_order_func - adds r1, r0, 0 - lsls r1, 24 - lsrs r1, 24 - adds r0, r4, 0 - bl sub_81B8FB0 - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - movs r1, 0x1 - ands r0, r1 - cmp r0, 0 - beq _0803BE4C - movs r3, 0 - adds r4, r7, 0 - adds r6, r5 - movs r0, 0x2 - adds r1, r5, 0 - eors r1, r0 - ldr r7, =gUnknown_0203CF00 - lsls r0, r1, 1 - adds r5, r0, r1 -_0803BE1A: - ldr r0, [r4] - adds r1, r6, r3 - adds r1, r0 - adds r1, 0x60 - adds r2, r3, r7 - ldrb r0, [r2] - strb r0, [r1] - ldr r1, [r4] - adds r0, r5, r3 - adds r0, r1 - adds r0, 0x60 - ldrb r1, [r2] - strb r1, [r0] - adds r3, 0x1 - cmp r3, 0x2 - ble _0803BE1A - b _0803BE66 - .pool -_0803BE4C: - movs r3, 0 - adds r2, r6, r5 - ldr r4, =gUnknown_0203CF00 -_0803BE52: - ldr r0, [r7] - adds r1, r2, r3 - adds r1, r0 - adds r1, 0x60 - adds r0, r3, r4 - ldrb r0, [r0] - strb r0, [r1] - adds r3, 0x1 - cmp r3, 0x2 - ble _0803BE52 -_0803BE66: - pop {r3} - mov r8, r3 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end sub_803BDA0 - - thumb_func_start sub_803BE74 -sub_803BE74: @ 803BE74 - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - sub sp, 0x1C - ldr r0, =gBattleCommunication - movs r1, 0 - strb r1, [r0, 0x4] - ldr r0, =gActiveBank - strb r1, [r0] - ldr r0, =gNoOfAllBanks - bl _0803CD12 - .pool -_0803BE9C: - ldr r4, =gActiveBank - ldrb r0, [r4] - bl GetBankIdentity - lsls r0, 24 - lsrs r5, r0, 24 - ldr r1, =gBattleCommunication - ldrb r0, [r4] - adds r0, r1 - ldrb r0, [r0] - cmp r0, 0x8 - bls _0803BEB8 - bl _0803CD04 -_0803BEB8: - lsls r0, 2 - ldr r1, =_0803BED0 - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .pool - .align 2, 0 -_0803BED0: - .4byte _0803BEF4 - .4byte _0803BF0C - .4byte _0803C02C - .4byte _0803C7D8 - .4byte _0803CAD0 - .4byte _0803CB84 - .4byte _0803CBC8 - .4byte _0803CBF4 - .4byte _0803CC38 -_0803BEF4: - bl sub_8185FD0 - ldr r1, =gBattleCommunication - ldr r0, =gActiveBank - ldrb r0, [r0] - adds r0, r1 - bl _0803CC20 - .pool -_0803BF0C: - ldr r0, =gActiveBank - ldrb r1, [r0] - ldr r4, =gBattleStruct - ldr r0, [r4] - adds r1, r0 - adds r1, 0x5C - movs r0, 0x6 - strb r0, [r1] - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - movs r1, 0x40 - ands r0, r1 - cmp r0, 0 - bne _0803BF68 - movs r1, 0x2 - movs r0, 0x2 - ands r0, r5 - cmp r0, 0 - beq _0803BF68 - eors r5, r1 - adds r0, r5, 0 - bl GetBankByIdentity - ldr r1, [r4] - adds r1, 0x91 - ldrb r1, [r1] - ldr r2, =gBitTable - lsls r0, 24 - lsrs r0, 22 - adds r0, r2 - ldr r0, [r0] - ands r1, r0 - cmp r1, 0 - bne _0803BF68 - ldr r4, =gBattleCommunication - adds r0, r5, 0 - bl GetBankByIdentity - lsls r0, 24 - lsrs r0, 24 - adds r0, r4 - ldrb r0, [r0] - cmp r0, 0x5 - beq _0803BF68 - bl _0803CD04 -_0803BF68: - ldr r0, =gBattleStruct - ldr r0, [r0] - adds r0, 0x91 - ldrb r3, [r0] - ldr r1, =gBitTable - ldr r4, =gActiveBank - ldrb r2, [r4] - lsls r0, r2, 2 - adds r0, r1 - ldr r0, [r0] - ands r3, r0 - cmp r3, 0 - beq _0803BFD0 - ldr r0, =gActionForBanks - adds r0, r2, r0 - movs r1, 0xD - strb r1, [r0] - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - movs r1, 0x40 - ands r0, r1 - cmp r0, 0 - bne _0803BFBC - ldr r0, =gBattleCommunication - ldrb r1, [r4] - adds r1, r0 - movs r0, 0x5 - strb r0, [r1] - bl _0803CD04 - .pool -_0803BFBC: - ldr r0, =gBattleCommunication - ldrb r1, [r4] - adds r1, r0 - movs r0, 0x4 - strb r0, [r1] - bl _0803CD04 - .pool -_0803BFD0: - ldr r1, =gBattleMons - movs r0, 0x58 - muls r0, r2 - adds r1, 0x50 - adds r0, r1 - ldr r1, [r0] - movs r0, 0x80 - lsls r0, 5 - ands r0, r1 - cmp r0, 0 - bne _0803BFF0 - movs r0, 0x80 - lsls r0, 15 - ands r1, r0 - cmp r1, 0 - beq _0803C00C -_0803BFF0: - ldr r0, =gActionForBanks - adds r0, r2, r0 - strb r3, [r0] - ldr r1, =gBattleCommunication - ldrb r0, [r4] - bl _0803CC72 - .pool -_0803C00C: - ldr r0, =gActionForBanks - ldrb r1, [r0] - ldr r0, =gBattleBufferB - ldrb r2, [r0, 0x1] - ldrb r0, [r0, 0x2] - lsls r0, 8 - orrs r2, r0 - movs r0, 0 - bl dp01_build_cmdbuf_x12_a_bb - bl _0803CB68 - .pool -_0803C02C: - ldr r3, =gBattleExecBuffer - ldr r1, =gBitTable - ldr r6, =gActiveBank - ldrb r5, [r6] - lsls r0, r5, 2 - adds r0, r1 - ldr r2, [r0] - lsls r1, r2, 4 - movs r0, 0xF0 - lsls r0, 24 - orrs r1, r0 - orrs r1, r2 - lsls r0, r2, 8 - orrs r1, r0 - lsls r2, 12 - orrs r1, r2 - ldr r0, [r3] - ands r0, r1 - cmp r0, 0 - beq _0803C058 - bl _0803CD04 -_0803C058: - ldr r4, =gBattleBufferB - lsls r0, r5, 9 - adds r4, 0x1 - adds r0, r4 - ldrb r1, [r0] - adds r0, r5, 0 - bl RecordedBattle_SetBankAction - ldr r1, =gActionForBanks - ldrb r0, [r6] - adds r1, r0, r1 - lsls r0, 9 - adds r0, r4 - ldrb r0, [r0] - strb r0, [r1] - ldrb r0, [r6] - lsls r0, 9 - adds r0, r4 - ldrb r0, [r0] - cmp r0, 0xC - bls _0803C084 - b _0803C6C4 -_0803C084: - lsls r0, 2 - ldr r1, =_0803C0A8 - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .pool - .align 2, 0 -_0803C0A8: - .4byte _0803C0DC - .4byte _0803C230 - .4byte _0803C268 - .4byte _0803C6C4 - .4byte _0803C6C4 - .4byte _0803C440 - .4byte _0803C48C - .4byte _0803C6C4 - .4byte _0803C6C4 - .4byte _0803C6C4 - .4byte _0803C6C4 - .4byte _0803C6C4 - .4byte _0803C4B4 -_0803C0DC: - bl AreAllMovesUnusable - lsls r0, 24 - cmp r0, 0 - beq _0803C134 - ldr r0, =gBattleCommunication - ldr r3, =gActiveBank - ldrb r1, [r3] - adds r1, r0 - movs r4, 0 - movs r0, 0x6 - strb r0, [r1] - ldrb r1, [r3] - ldr r2, =gBattleStruct - ldr r0, [r2] - adds r1, r0 - adds r1, 0x54 - strb r4, [r1] - ldrb r1, [r3] - ldr r0, [r2] - adds r1, r0 - adds r1, 0x84 - movs r0, 0x4 - strb r0, [r1] - ldrb r1, [r3] - ldr r2, [r2] - adds r2, r1, r2 - ldr r0, =gBattleBufferB - lsls r1, 9 - adds r0, 0x3 - adds r1, r0 - ldrb r0, [r1] - strb r0, [r2, 0xC] - bl _0803CD70 - .pool -_0803C134: - ldr r3, =gDisableStructs - ldr r5, =gActiveBank - ldrb r4, [r5] - lsls r0, r4, 3 - subs r0, r4 - lsls r0, 2 - adds r0, r3 - ldrh r2, [r0, 0x6] - cmp r2, 0 - beq _0803C188 - ldr r1, =gChosenMovesByBanks - lsls r0, r4, 1 - adds r0, r1 - strh r2, [r0] - ldrb r2, [r5] - ldr r0, =gBattleStruct - ldr r1, [r0] - adds r1, r2, r1 - adds r1, 0x80 - lsls r0, r2, 3 - subs r0, r2 - lsls r0, 2 - adds r0, r3 - ldrb r0, [r0, 0xC] - strb r0, [r1] - ldr r1, =gBattleCommunication - ldrb r0, [r5] - adds r0, r1 - movs r1, 0x4 - strb r1, [r0] - bl _0803CD70 - .pool -_0803C188: - add r2, sp, 0x4 - ldr r3, =gBattleMons - movs r1, 0x58 - adds r0, r4, 0 - muls r0, r1 - adds r0, r3 - ldrh r0, [r0] - strh r0, [r2, 0x10] - ldrb r0, [r5] - muls r0, r1 - adds r0, r3 - adds r0, 0x21 - ldrb r0, [r0] - strb r0, [r2, 0x12] - ldrb r0, [r5] - muls r0, r1 - adds r0, r3 - adds r0, 0x22 - ldrb r0, [r0] - strb r0, [r2, 0x13] - movs r4, 0 - mov r1, sp - adds r1, 0xC - str r1, [sp, 0x18] - add r2, sp, 0x10 - mov r10, r2 - mov r8, r3 - adds r7, r5, 0 - movs r6, 0x58 - movs r0, 0xC - add r0, r8 - mov r9, r0 - add r5, sp, 0x4 -_0803C1CA: - lsls r2, r4, 1 - ldrb r0, [r7] - muls r0, r6 - adds r0, r2, r0 - add r0, r9 - ldrh r0, [r0] - strh r0, [r5] - ldr r1, [sp, 0x18] - adds r3, r1, r4 - ldrb r0, [r7] - muls r0, r6 - adds r0, r4, r0 - mov r1, r8 - adds r1, 0x24 - adds r0, r1 - ldrb r0, [r0] - strb r0, [r3] - ldrb r0, [r7] - adds r1, r0, 0 - muls r1, r6 - adds r2, r1 - add r2, r9 - ldrh r0, [r2] - add r1, r8 - adds r1, 0x3B - ldrb r1, [r1] - lsls r2, r4, 24 - lsrs r2, 24 - bl CalculatePPWithBonus - mov r2, r10 - adds r1, r2, r4 - strb r0, [r1] - adds r5, 0x2 - adds r4, 0x1 - cmp r4, 0x3 - ble _0803C1CA - ldr r0, =gBattleTypeFlags - ldr r1, [r0] - movs r0, 0x1 - ands r1, r0 - movs r0, 0 - movs r2, 0 - add r3, sp, 0x4 - bl sub_8033E30 - b _0803C42E - .pool -_0803C230: - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - ldr r1, =0x021f0902 - ands r0, r1 - cmp r0, 0 - bne _0803C23E - b _0803C48C -_0803C23E: - ldr r4, =gActiveBank - ldrb r0, [r4] - movs r1, 0x1 - bl sub_8185008 - ldr r1, =gUnknown_02024220 - ldrb r0, [r4] - lsls r0, 2 - adds r0, r1 - ldr r1, =gUnknown_082DB879 - b _0803C784 - .pool -_0803C268: - ldr r5, =gActiveBank - ldrb r0, [r5] - ldr r3, =gBattleStruct - ldr r1, [r3] - adds r1, r0, r1 - adds r1, 0x58 - ldr r2, =gBattlePartyID - lsls r0, 1 - adds r0, r2 - ldrh r0, [r0] - strb r0, [r1] - ldr r7, =gBattleMons - ldrb r2, [r5] - movs r6, 0x58 - adds r0, r2, 0 - muls r0, r6 - adds r1, r7, 0 - adds r1, 0x50 - adds r0, r1 - ldr r1, [r0] - ldr r0, =0x0400e000 - ands r1, r0 - cmp r1, 0 - bne _0803C2B8 - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - movs r1, 0x80 - lsls r1, 11 - ands r0, r1 - cmp r0, 0 - bne _0803C2B8 - ldr r0, =gStatuses3 - lsls r1, r2, 2 - adds r1, r0 - ldr r1, [r1] - movs r0, 0x80 - lsls r0, 3 - ands r1, r0 - cmp r1, 0 - beq _0803C2EC -_0803C2B8: - ldr r0, =gActiveBank - ldrb r0, [r0] - lsls r1, r0, 1 - adds r1, r0 - adds r1, 0x60 - ldr r0, [r3] - adds r0, r1 - str r0, [sp] - movs r0, 0 - movs r1, 0x2 - movs r2, 0x6 - b _0803C400 - .pool -_0803C2EC: - str r1, [sp] - movs r0, 0xC - adds r1, r2, 0 - movs r2, 0x17 - movs r3, 0 - bl AbilityBattleEffects - lsls r0, 24 - lsrs r4, r0, 24 - cmp r4, 0 - bne _0803C374 - ldrb r1, [r5] - str r4, [sp] - movs r0, 0xC - movs r2, 0x47 - movs r3, 0 - bl AbilityBattleEffects - lsls r0, 24 - lsrs r4, r0, 24 - cmp r4, 0 - beq _0803C33C - ldrb r0, [r5] - muls r0, r6 - adds r1, r0, r7 - adds r0, r1, 0 - adds r0, 0x21 - ldrb r0, [r0] - cmp r0, 0x2 - beq _0803C33C - adds r0, r1, 0 - adds r0, 0x22 - ldrb r0, [r0] - cmp r0, 0x2 - beq _0803C33C - adds r0, r1, 0 - adds r0, 0x20 - ldrb r0, [r0] - cmp r0, 0x1A - bne _0803C374 -_0803C33C: - ldr r5, =gActiveBank - ldrb r1, [r5] - movs r0, 0 - str r0, [sp] - movs r0, 0xF - movs r2, 0x2A - movs r3, 0 - bl AbilityBattleEffects - lsls r0, 24 - lsrs r4, r0, 24 - cmp r4, 0 - beq _0803C3B0 - ldr r2, =gBattleMons - ldrb r1, [r5] - movs r0, 0x58 - muls r0, r1 - adds r1, r0, r2 - adds r0, r1, 0 - adds r0, 0x21 - ldrb r0, [r0] - cmp r0, 0x8 - beq _0803C374 - adds r0, r1, 0 - adds r0, 0x22 - ldrb r0, [r0] - cmp r0, 0x8 - bne _0803C3B0 -_0803C374: - subs r1, r4, 0x1 - lsls r1, 4 - movs r0, 0x4 - orrs r1, r0 - lsls r1, 24 - lsrs r1, 24 - ldr r0, =gLastUsedAbility - ldrb r3, [r0] - ldr r4, =gBattleStruct - ldr r0, =gActiveBank - ldrb r0, [r0] - lsls r2, r0, 1 - adds r2, r0 - adds r2, 0x60 - ldr r0, [r4] - adds r0, r2 - str r0, [sp] - movs r0, 0 - movs r2, 0x6 - bl EmitChoosePokemon - b _0803C42E - .pool -_0803C3B0: - ldr r0, =gActiveBank - ldrb r1, [r0] - adds r4, r0, 0 - cmp r1, 0x2 - bne _0803C3D8 - ldr r0, =gActionForBanks - ldrb r0, [r0] - cmp r0, 0x2 - bne _0803C3D8 - ldr r0, =gBattleStruct - ldr r3, [r0] - adds r0, r3, 0 - adds r0, 0x5C - b _0803C3EE - .pool -_0803C3D8: - ldrb r0, [r4] - cmp r0, 0x3 - bne _0803C410 - ldr r0, =gActionForBanks - ldrb r0, [r0, 0x1] - cmp r0, 0x2 - bne _0803C410 - ldr r0, =gBattleStruct - ldr r3, [r0] - adds r0, r3, 0 - adds r0, 0x5D -_0803C3EE: - ldrb r2, [r0] - ldrb r1, [r4] - lsls r0, r1, 1 - adds r0, r1 - adds r0, 0x60 - adds r3, r0 - str r3, [sp] - movs r0, 0 - movs r1, 0 -_0803C400: - movs r3, 0 - bl EmitChoosePokemon - b _0803C42E - .pool -_0803C410: - ldr r2, =gBattleStruct - ldr r0, =gActiveBank - ldrb r0, [r0] - lsls r1, r0, 1 - adds r1, r0 - adds r1, 0x60 - ldr r0, [r2] - adds r0, r1 - str r0, [sp] - movs r0, 0 - movs r1, 0 - movs r2, 0x6 - movs r3, 0 - bl EmitChoosePokemon -_0803C42E: - ldr r0, =gActiveBank - ldrb r0, [r0] - bl MarkBufferBankForExecution - b _0803C6C4 - .pool -_0803C440: - bl IsPlayerPartyAndPokemonStorageFull - lsls r0, 24 - cmp r0, 0 - bne _0803C44C - b _0803C6C4 -_0803C44C: - ldr r1, =gUnknown_02024220 - ldr r3, =gActiveBank - ldrb r0, [r3] - lsls r0, 2 - adds r0, r1 - ldr r1, =gUnknown_082DAB11 - str r1, [r0] - ldr r0, =gBattleCommunication - ldrb r1, [r3] - adds r1, r0 - movs r4, 0 - movs r0, 0x6 - strb r0, [r1] - ldrb r1, [r3] - ldr r2, =gBattleStruct - ldr r0, [r2] - adds r1, r0 - adds r1, 0x54 - strb r4, [r1] - ldrb r1, [r3] - b _0803C7A0 - .pool -_0803C48C: - ldr r2, =gBattleStruct - ldr r4, =gActiveBank - ldrb r1, [r4] - lsls r0, r1, 1 - adds r0, r1 - adds r0, 0x60 - ldr r1, [r2] - adds r1, r0 - movs r0, 0 - bl sub_8033E6C - ldrb r0, [r4] - bl MarkBufferBankForExecution - b _0803C6C4 - .pool -_0803C4B4: - ldr r4, =gBattleCommunication - ldr r5, =gActiveBank - ldrb r0, [r5] - adds r0, r4 - movs r1, 0x7 - strb r1, [r0] - ldrb r0, [r5] - bl GetBankIdentity - movs r6, 0x2 - eors r0, r6 - lsls r0, 24 - lsrs r0, 24 - bl GetBankByIdentity - lsls r0, 24 - lsrs r0, 24 - adds r0, r4 - movs r1, 0x1 - strb r1, [r0] - ldrb r0, [r5] - bl sub_8185008 - ldrb r0, [r5] - bl GetBankIdentity - eors r0, r6 - lsls r0, 24 - lsrs r0, 24 - bl GetBankByIdentity - ldr r1, =gBattleMons - lsls r0, 24 - lsrs r0, 24 - movs r7, 0x58 - muls r0, r7 - adds r4, r1, 0 - adds r4, 0x50 - adds r0, r4 - ldr r0, [r0] - movs r1, 0x80 - lsls r1, 5 - ands r0, r1 - cmp r0, 0 - bne _0803C532 - ldrb r0, [r5] - bl GetBankIdentity - eors r0, r6 - lsls r0, 24 - lsrs r0, 24 - bl GetBankByIdentity - lsls r0, 24 - lsrs r0, 24 - muls r0, r7 - adds r0, r4 - ldr r0, [r0] - movs r1, 0x80 - lsls r1, 15 - ands r0, r1 - cmp r0, 0 - beq _0803C550 -_0803C532: - movs r0, 0 - bl dp01_build_cmdbuf_x32_32_32_32 - ldrb r0, [r5] - bl MarkBufferBankForExecution - bl _0803CD70 - .pool -_0803C550: - ldr r4, =gActionForBanks - ldrb r0, [r5] - bl GetBankIdentity - eors r0, r6 - lsls r0, 24 - lsrs r0, 24 - bl GetBankByIdentity - lsls r0, 24 - lsrs r0, 24 - adds r0, r4 - ldrb r0, [r0] - cmp r0, 0x2 - bne _0803C590 - ldrb r0, [r5] - bl GetBankIdentity - eors r0, r6 - lsls r0, 24 - lsrs r0, 24 - bl GetBankByIdentity - lsls r0, 24 - lsrs r0, 24 - movs r1, 0x2 - bl sub_8185008 - b _0803C6AE - .pool -_0803C590: - ldrb r0, [r5] - bl GetBankIdentity - eors r0, r6 - lsls r0, 24 - lsrs r0, 24 - bl GetBankByIdentity - lsls r0, 24 - lsrs r0, 24 - adds r0, r4 - ldrb r0, [r0] - cmp r0, 0x3 - bne _0803C5B6 - ldrb r0, [r5] - bl GetBankIdentity - eors r0, r6 - b _0803C668 -_0803C5B6: - ldrb r0, [r5] - bl GetBankIdentity - eors r0, r6 - lsls r0, 24 - lsrs r0, 24 - bl GetBankByIdentity - lsls r0, 24 - lsrs r0, 24 - adds r0, r4 - ldrb r0, [r0] - cmp r0, 0 - bne _0803C628 - ldr r4, =gProtectStructs - ldrb r0, [r5] - bl GetBankIdentity - eors r0, r6 - lsls r0, 24 - lsrs r0, 24 - bl GetBankByIdentity - lsls r0, 24 - lsrs r0, 20 - adds r0, r4 - ldrb r0, [r0] - lsls r0, 29 - cmp r0, 0 - blt _0803C616 - ldr r4, =gDisableStructs - ldrb r0, [r5] - bl GetBankIdentity - eors r0, r6 - lsls r0, 24 - lsrs r0, 24 - bl GetBankByIdentity - lsls r0, 24 - lsrs r0, 24 - lsls r1, r0, 3 - subs r1, r0 - lsls r1, 2 - adds r1, r4 - ldrh r0, [r1, 0x6] - cmp r0, 0 - beq _0803C628 -_0803C616: - ldrb r0, [r5] - bl GetBankIdentity - eors r0, r6 - b _0803C668 - .pool -_0803C628: - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - movs r1, 0x80 - lsls r1, 10 - ands r0, r1 - cmp r0, 0 - beq _0803C690 - ldr r4, =gActionForBanks - ldr r6, =gActiveBank - ldrb r0, [r6] - bl GetBankIdentity - movs r5, 0x2 - eors r0, r5 - lsls r0, 24 - lsrs r0, 24 - bl GetBankByIdentity - lsls r0, 24 - lsrs r0, 24 - adds r0, r4 - ldrb r0, [r0] - cmp r0, 0 - bne _0803C690 - ldr r1, =gRngValue - ldr r0, =gUnknown_0203BD30 - ldr r0, [r0] - str r0, [r1] - ldrb r0, [r6] - bl GetBankIdentity - eors r0, r5 -_0803C668: - lsls r0, 24 - lsrs r0, 24 - bl GetBankByIdentity - lsls r0, 24 - lsrs r0, 24 - movs r1, 0x1 - bl sub_8185008 - b _0803C6AE - .pool -_0803C690: - ldr r0, =gActiveBank - ldrb r0, [r0] - bl GetBankIdentity - movs r1, 0x2 - eors r0, r1 - lsls r0, 24 - lsrs r0, 24 - bl GetBankByIdentity - lsls r0, 24 - lsrs r0, 24 - movs r1, 0x3 - bl sub_8185008 -_0803C6AE: - movs r0, 0 - bl dp01_build_cmdbuf_x32_32_32_32 - ldr r0, =gActiveBank - ldrb r0, [r0] - bl MarkBufferBankForExecution - b _0803CD70 - .pool -_0803C6C4: - ldr r1, =gBattleTypeFlags - ldr r2, [r1] - movs r5, 0x8 - adds r0, r2, 0 - ands r0, r5 - adds r3, r1, 0 - cmp r0, 0 - beq _0803C720 - ldr r0, =0x043f0100 - ands r2, r0 - cmp r2, 0 - beq _0803C720 - ldr r0, =gBattleBufferB - ldr r4, =gActiveBank - ldrb r2, [r4] - lsls r1, r2, 9 - adds r0, 0x1 - adds r1, r0 - ldrb r0, [r1] - cmp r0, 0x3 - bne _0803C720 - ldr r1, =gUnknown_02024220 - lsls r0, r2, 2 - adds r0, r1 - ldr r1, =gUnknown_082DB9BA - str r1, [r0] - ldr r1, =gBattleCommunication - ldrb r0, [r4] - adds r0, r1 - movs r3, 0 - strb r5, [r0] - b _0803C792 - .pool -_0803C720: - ldr r0, [r3] - ldr r1, =0x0200000a - ands r0, r1 - cmp r0, 0x8 - bne _0803C760 - ldr r0, =gBattleBufferB - ldr r4, =gActiveBank - ldrb r1, [r4] - lsls r1, 9 - adds r0, 0x1 - adds r1, r0 - ldrb r0, [r1] - cmp r0, 0x3 - bne _0803C760 - ldr r0, =gUnknown_082DAAFE - bl BattleScriptExecute - ldr r1, =gBattleCommunication - ldrb r0, [r4] - adds r0, r1 - b _0803CC20 - .pool -_0803C760: - bl IsRunningFromBattleImpossible - lsls r0, 24 - cmp r0, 0 - beq _0803C7C4 - ldr r0, =gBattleBufferB - ldr r4, =gActiveBank - ldrb r2, [r4] - lsls r1, r2, 9 - adds r0, 0x1 - adds r1, r0 - ldrb r0, [r1] - cmp r0, 0x3 - bne _0803C7C4 - ldr r1, =gUnknown_02024220 - lsls r0, r2, 2 - adds r0, r1 - ldr r1, =gUnknown_082DAB0B -_0803C784: - str r1, [r0] - ldr r0, =gBattleCommunication - ldrb r1, [r4] - adds r1, r0 - movs r3, 0 - movs r0, 0x6 - strb r0, [r1] -_0803C792: - ldrb r1, [r4] - ldr r2, =gBattleStruct - ldr r0, [r2] - adds r1, r0 - adds r1, 0x54 - strb r3, [r1] - ldrb r1, [r4] -_0803C7A0: - ldr r0, [r2] - adds r1, r0 - adds r1, 0x84 - movs r0, 0x1 - strb r0, [r1] - b _0803CD70 - .pool -_0803C7C4: - ldr r2, =gBattleCommunication - ldr r0, =gActiveBank - ldrb r1, [r0] - adds r1, r2 - b _0803CB74 - .pool -_0803C7D8: - ldr r4, =gBattleExecBuffer - ldr r1, =gBitTable - ldr r3, =gActiveBank - ldrb r5, [r3] - lsls r0, r5, 2 - adds r0, r1 - ldr r2, [r0] - lsls r0, r2, 4 - movs r1, 0xF0 - lsls r1, 24 - orrs r0, r1 - orrs r0, r2 - lsls r1, r2, 8 - orrs r0, r1 - lsls r2, 12 - orrs r0, r2 - ldr r1, [r4] - ands r1, r0 - adds r4, r3, 0 - cmp r1, 0 - beq _0803C804 - b _0803CD04 -_0803C804: - ldr r1, =gActionForBanks - adds r0, r5, r1 - ldrb r0, [r0] - adds r2, r1, 0 - cmp r0, 0x9 - bls _0803C812 - b _0803CD04 -_0803C812: - lsls r0, 2 - ldr r1, =_0803C830 - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .pool - .align 2, 0 -_0803C830: - .4byte _0803C858 - .4byte _0803C99C - .4byte _0803C9D4 - .4byte _0803CA0A - .4byte _0803CA2C - .4byte _0803CA40 - .4byte _0803CA54 - .4byte _0803CA84 - .4byte _0803CA98 - .4byte _0803CABC -_0803C858: - ldr r1, =gBattleBufferB - ldrb r3, [r4] - lsls r0, r3, 9 - adds r1, 0x1 - adds r0, r1 - ldrb r1, [r0] - cmp r1, 0x3 - blt _0803C88A - cmp r1, 0x9 - ble _0803C878 - cmp r1, 0xF - beq _0803C87E - b _0803C88A - .pool -_0803C878: - adds r0, r3, r2 - strb r1, [r0] - b _0803CD70 -_0803C87E: - adds r1, r3, r2 - movs r0, 0x2 - strb r0, [r1] - bl sub_803CDF8 - b _0803CD70 -_0803C88A: - movs r0, 0x2 - bl sub_818603C - ldr r4, =gBattleBufferB - ldr r6, =gActiveBank - ldrb r3, [r6] - lsls r1, r3, 9 - adds r5, r4, 0x2 - adds r0, r1, r5 - ldrb r2, [r0] - adds r7, r4, 0x3 - adds r1, r7 - ldrb r0, [r1] - lsls r0, 8 - orrs r2, r0 - ldr r0, =0x0000ffff - cmp r2, r0 - bne _0803C8D0 - ldr r0, =gBattleCommunication - adds r0, r3, r0 - movs r1, 0x1 - strb r1, [r0] - ldrb r0, [r6] - bl sub_8185008 - b _0803CD04 - .pool -_0803C8D0: - bl sub_803FB4C - lsls r0, 24 - cmp r0, 0 - beq _0803C91C - ldrb r0, [r6] - movs r1, 0x1 - bl sub_8185008 - ldr r0, =gBattleCommunication - ldrb r1, [r6] - adds r1, r0 - movs r3, 0 - movs r0, 0x6 - strb r0, [r1] - ldrb r1, [r6] - ldr r2, =gBattleStruct - ldr r0, [r2] - adds r1, r0 - adds r1, 0x54 - strb r3, [r1] - ldrb r0, [r6] - lsls r0, 9 - adds r1, r4, 0x1 - adds r0, r1 - strb r3, [r0] - ldrb r1, [r6] - ldr r0, [r2] - adds r1, r0 - adds r1, 0x84 - movs r0, 0x2 - strb r0, [r1] - b _0803CD70 - .pool -_0803C91C: - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - movs r1, 0x80 - lsls r1, 10 - ands r0, r1 - cmp r0, 0 - bne _0803C942 - ldrb r0, [r6] - lsls r1, r0, 9 - adds r1, r5 - ldrb r1, [r1] - bl RecordedBattle_SetBankAction - ldrb r0, [r6] - lsls r1, r0, 9 - adds r1, r7 - ldrb r1, [r1] - bl RecordedBattle_SetBankAction -_0803C942: - ldrb r0, [r6] - ldr r4, =gBattleStruct - ldr r1, [r4] - adds r1, r0, r1 - adds r1, 0x80 - lsls r0, 9 - adds r0, r5 - ldrb r0, [r0] - strb r0, [r1] - ldr r0, =gChosenMovesByBanks - ldrb r2, [r6] - lsls r5, r2, 1 - adds r5, r0 - ldr r3, =gBattleMons - ldr r4, [r4] - adds r0, r2, r4 - adds r0, 0x80 - ldrb r0, [r0] - lsls r0, 1 - movs r1, 0x58 - muls r1, r2 - adds r0, r1 - adds r3, 0xC - adds r0, r3 - ldrh r0, [r0] - strh r0, [r5] - ldrb r0, [r6] - adds r4, r0, r4 - lsls r0, 9 - adds r0, r7 - ldrb r0, [r0] - strb r0, [r4, 0xC] - ldr r0, =gBattleCommunication - ldrb r1, [r6] - b _0803CB72 - .pool -_0803C99C: - ldr r2, =gBattleBufferB - ldr r5, =gActiveBank - ldrb r4, [r5] - lsls r1, r4, 9 - adds r0, r2, 0x1 - adds r0, r1, r0 - ldrb r3, [r0] - adds r2, 0x2 - adds r1, r2 - ldrb r0, [r1] - lsls r0, 8 - orrs r3, r0 - cmp r3, 0 - bne _0803C9BA - b _0803CC1C -_0803C9BA: - ldr r0, =gLastUsedItem - strh r3, [r0] - ldr r0, =gBattleCommunication - ldrb r1, [r5] - b _0803CB72 - .pool -_0803C9D4: - ldr r0, =gBattleBufferB - ldr r4, =gActiveBank - ldrb r2, [r4] - lsls r1, r2, 9 - adds r0, 0x1 - adds r1, r0 - ldrb r0, [r1] - cmp r0, 0x6 - bne _0803CA04 - ldr r0, =gBattleCommunication - adds r0, r2, r0 - movs r1, 0x1 - strb r1, [r0] - ldrb r0, [r4] - bl sub_8185008 - b _0803CD04 - .pool -_0803CA04: - bl sub_803CDF8 - b _0803CB6E -_0803CA0A: - ldr r2, =gHitMarker - ldr r0, [r2] - movs r1, 0x80 - lsls r1, 8 - orrs r0, r1 - str r0, [r2] - ldr r2, =gBattleCommunication - ldr r0, =gActiveBank - ldrb r1, [r0] - adds r1, r2 - b _0803CB74 - .pool -_0803CA2C: - ldr r2, =gBattleCommunication - ldr r0, =gActiveBank - ldrb r1, [r0] - adds r1, r2 - b _0803CB74 - .pool -_0803CA40: - ldr r2, =gBattleCommunication - ldr r0, =gActiveBank - ldrb r1, [r0] - adds r1, r2 - b _0803CB74 - .pool -_0803CA54: - ldr r3, =gBattleBufferB - ldr r0, =gActiveBank - ldrb r4, [r0] - lsls r1, r4, 9 - adds r0, r3, 0x1 - adds r0, r1, r0 - ldrb r2, [r0] - adds r3, 0x2 - adds r1, r3 - ldrb r0, [r1] - lsls r0, 8 - orrs r2, r0 - cmp r2, 0 - bne _0803CA72 - b _0803CC1C -_0803CA72: - ldr r1, =gBattleCommunication - adds r1, r4, r1 - b _0803CB74 - .pool -_0803CA84: - ldr r2, =gBattleCommunication - ldr r0, =gActiveBank - ldrb r1, [r0] - adds r1, r2 - b _0803CB74 - .pool -_0803CA98: - ldr r2, =gHitMarker - ldr r0, [r2] - movs r1, 0x80 - lsls r1, 8 - orrs r0, r1 - str r0, [r2] - ldr r2, =gBattleCommunication - ldr r0, =gActiveBank - ldrb r1, [r0] - adds r1, r2 - b _0803CB74 - .pool -_0803CABC: - ldr r2, =gBattleCommunication - ldr r0, =gActiveBank - ldrb r1, [r0] - adds r1, r2 - b _0803CB74 - .pool -_0803CAD0: - ldr r3, =gBattleExecBuffer - ldr r6, =gBitTable - ldr r0, =gActiveBank - ldrb r0, [r0] - lsls r0, 2 - adds r0, r6 - ldr r2, [r0] - lsls r1, r2, 4 - movs r0, 0xF0 - lsls r0, 24 - orrs r1, r0 - orrs r1, r2 - lsls r0, r2, 8 - orrs r1, r0 - lsls r2, 12 - orrs r1, r2 - ldr r0, [r3] - ands r0, r1 - cmp r0, 0 - beq _0803CAFA - b _0803CD04 -_0803CAFA: - bl sub_803CDB8 - lsls r0, 24 - lsrs r0, 24 - negs r1, r0 - orrs r1, r0 - lsrs r4, r1, 31 - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - movs r1, 0x41 - ands r0, r1 - cmp r0, 0x1 - bne _0803CB3C - movs r1, 0x2 - movs r0, 0x2 - ands r0, r5 - cmp r0, 0 - bne _0803CB3C - adds r0, r5, 0 - eors r0, r1 - bl GetBankByIdentity - ldr r1, =gBattleStruct - ldr r1, [r1] - adds r1, 0x91 - ldrb r1, [r1] - lsls r0, 24 - lsrs r0, 22 - adds r0, r6 - ldr r0, [r0] - ands r1, r0 - cmp r1, 0 - beq _0803CB5C -_0803CB3C: - movs r0, 0 - movs r1, 0 - adds r2, r4, 0 - bl EmitLinkStandbyMsg - b _0803CB66 - .pool -_0803CB5C: - movs r0, 0 - movs r1, 0x1 - adds r2, r4, 0 - bl EmitLinkStandbyMsg -_0803CB66: - ldr r4, =gActiveBank -_0803CB68: - ldrb r0, [r4] - bl MarkBufferBankForExecution -_0803CB6E: - ldr r0, =gBattleCommunication - ldrb r1, [r4] -_0803CB72: - adds r1, r0 -_0803CB74: - ldrb r0, [r1] - adds r0, 0x1 - strb r0, [r1] - b _0803CD04 - .pool -_0803CB84: - ldr r3, =gBattleExecBuffer - ldr r1, =gBitTable - ldr r0, =gActiveBank - ldrb r0, [r0] - lsls r0, 2 - adds r0, r1 - ldr r2, [r0] - lsls r1, r2, 4 - movs r0, 0xF0 - lsls r0, 24 - orrs r1, r0 - orrs r1, r2 - lsls r0, r2, 8 - orrs r1, r0 - lsls r2, 12 - orrs r1, r2 - ldr r0, [r3] - ands r0, r1 - cmp r0, 0 - beq _0803CBAE - b _0803CD04 -_0803CBAE: - ldr r1, =gBattleCommunication - ldrb r0, [r1, 0x4] - adds r0, 0x1 - strb r0, [r1, 0x4] - b _0803CD04 - .pool -_0803CBC8: - ldr r5, =gActiveBank - ldrb r2, [r5] - ldr r0, =gBattleStruct - ldr r0, [r0] - adds r1, r2, r0 - adds r0, r1, 0 - adds r0, 0x54 - ldrb r0, [r0] - cmp r0, 0 - beq _0803CCB4 - ldr r0, =gBattleCommunication - adds r0, r2, r0 - adds r1, 0x84 - ldrb r1, [r1] - strb r1, [r0] - b _0803CD04 - .pool -_0803CBF4: - ldr r3, =gBattleExecBuffer - ldr r1, =gBitTable - ldr r0, =gActiveBank - ldrb r4, [r0] - lsls r0, r4, 2 - adds r0, r1 - ldr r2, [r0] - lsls r1, r2, 4 - movs r0, 0xF0 - lsls r0, 24 - orrs r1, r0 - orrs r1, r2 - lsls r0, r2, 8 - orrs r1, r0 - lsls r2, 12 - orrs r1, r2 - ldr r0, [r3] - ands r0, r1 - cmp r0, 0 - bne _0803CD04 -_0803CC1C: - ldr r0, =gBattleCommunication - adds r0, r4, r0 -_0803CC20: - movs r1, 0x1 - strb r1, [r0] - b _0803CD04 - .pool -_0803CC38: - ldr r5, =gActiveBank - ldrb r2, [r5] - ldr r4, =gBattleStruct - ldr r0, [r4] - adds r0, r2, r0 - adds r0, 0x54 - ldrb r0, [r0] - cmp r0, 0 - beq _0803CCB4 - ldr r0, =gBattleBufferB - lsls r1, r2, 9 - adds r0, 0x1 - adds r1, r0 - ldrb r0, [r1] - cmp r0, 0xD - bne _0803CC94 - ldr r2, =gHitMarker - ldr r0, [r2] - movs r1, 0x80 - lsls r1, 8 - orrs r0, r1 - str r0, [r2] - ldr r1, =gActionForBanks - ldrb r0, [r5] - adds r0, r1 - movs r1, 0x3 - strb r1, [r0] - ldr r1, =gBattleCommunication - ldrb r0, [r5] -_0803CC72: - adds r0, r1 - movs r1, 0x4 - strb r1, [r0] - b _0803CD04 - .pool -_0803CC94: - adds r0, r2, 0 - movs r1, 0x1 - bl sub_8185008 - ldr r2, =gBattleCommunication - ldrb r0, [r5] - adds r2, r0, r2 - ldr r1, [r4] - adds r0, r1 - adds r0, 0x84 - ldrb r0, [r0] - strb r0, [r2] - b _0803CD04 - .pool -_0803CCB4: - ldr r0, =gBankAttacker - strb r2, [r0] - ldr r7, =gBattlescriptCurrInstr - ldr r6, =gUnknown_02024220 - ldrb r0, [r5] - lsls r0, 2 - adds r0, r6 - ldr r4, [r0] - str r4, [r7] - ldr r3, =gBattleExecBuffer - ldr r1, =gBitTable - ldrb r0, [r5] - lsls r0, 2 - adds r0, r1 - ldr r2, [r0] - lsls r1, r2, 4 - movs r0, 0xF0 - lsls r0, 24 - orrs r1, r0 - orrs r1, r2 - lsls r0, r2, 8 - orrs r1, r0 - lsls r2, 12 - orrs r1, r2 - ldr r0, [r3] - ands r0, r1 - cmp r0, 0 - bne _0803CCFA - ldr r0, =gBattleScriptingCommandsTable - ldrb r1, [r4] - lsls r1, 2 - adds r1, r0 - ldr r0, [r1] - bl _call_via_r0 -_0803CCFA: - ldrb r0, [r5] - lsls r0, 2 - adds r0, r6 - ldr r1, [r7] - str r1, [r0] -_0803CD04: - ldr r0, =gActiveBank - ldrb r1, [r0] - adds r1, 0x1 - strb r1, [r0] - ldr r0, =gNoOfAllBanks - lsls r1, 24 - lsrs r1, 24 -_0803CD12: - adds r5, r0, 0 - ldrb r0, [r5] - cmp r1, r0 - bcs _0803CD1E - bl _0803BE9C -_0803CD1E: - ldr r0, =gBattleCommunication - ldrb r0, [r0, 0x4] - ldrb r1, [r5] - cmp r0, r1 - bne _0803CD70 - movs r0, 0x1 - bl sub_818603C - ldr r1, =gBattleMainFunc - ldr r0, =sub_803D2E8 - str r0, [r1] - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - movs r1, 0x80 - lsls r1, 15 - ands r0, r1 - cmp r0, 0 - beq _0803CD70 - movs r4, 0 - ldrb r5, [r5] - cmp r4, r5 - bge _0803CD70 -_0803CD4A: - ldr r0, =gActionForBanks - adds r0, r4, r0 - ldrb r0, [r0] - cmp r0, 0x2 - bne _0803CD66 - lsls r0, r4, 24 - lsrs r0, 24 - ldr r1, =gBattleStruct - ldr r1, [r1] - adds r1, r4, r1 - adds r1, 0x5C - ldrb r1, [r1] - bl sub_80571DC -_0803CD66: - adds r4, 0x1 - ldr r0, =gNoOfAllBanks - ldrb r0, [r0] - cmp r4, r0 - blt _0803CD4A -_0803CD70: - add sp, 0x1C - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end sub_803BE74 thumb_func_start sub_803CDB8 sub_803CDB8: @ 803CDB8 diff --git a/asm/battle_controller_player.s b/asm/battle_controller_player.s index 78236f1d7..1ea1bb5f2 100644 --- a/asm/battle_controller_player.s +++ b/asm/battle_controller_player.s @@ -8648,7 +8648,7 @@ sub_805C158: @ 805C158 lsls r0, 24 cmp r0, 0 bne _0805C194 - ldr r1, =gUnknown_0203BD30 + ldr r1, =gBattlePalaceMoveSelectionRngValue ldr r0, =gRngValue ldr r0, [r0] str r0, [r1] diff --git a/asm/recorded_battle.s b/asm/recorded_battle.s index f733033ff..e742cbe7d 100644 --- a/asm/recorded_battle.s +++ b/asm/recorded_battle.s @@ -271,8 +271,8 @@ _08184FF0: .pool thumb_func_end RecordedBattle_SetBankAction - thumb_func_start sub_8185008 -sub_8185008: @ 8185008 + thumb_func_start RecordedBattle_ClearBankAction +RecordedBattle_ClearBankAction: @ 8185008 push {r4-r7,lr} lsls r0, 24 lsrs r5, r0, 24 @@ -310,7 +310,7 @@ _08185046: pop {r0} bx r0 .pool - thumb_func_end sub_8185008 + thumb_func_end RecordedBattle_ClearBankAction thumb_func_start sub_8185054 sub_8185054: @ 8185054 diff --git a/asm/rom3.s b/asm/rom3.s index 2e040ff0f..6a3e7e299 100644 --- a/asm/rom3.s +++ b/asm/rom3.s @@ -2786,8 +2786,8 @@ _08033D7C: .pool thumb_func_end EmitPrintStringPlayerOnly - thumb_func_start dp01_build_cmdbuf_x12_a_bb -dp01_build_cmdbuf_x12_a_bb: @ 8033DE4 + thumb_func_start EmitChooseAction +EmitChooseAction: @ 8033DE4 push {r4,lr} adds r4, r1, 0 lsls r0, 24 @@ -2807,7 +2807,7 @@ dp01_build_cmdbuf_x12_a_bb: @ 8033DE4 pop {r0} bx r0 .pool - thumb_func_end dp01_build_cmdbuf_x12_a_bb + thumb_func_end EmitChooseAction thumb_func_start EmitCmd13 EmitCmd13: @ 8033E10 @@ -2827,8 +2827,8 @@ EmitCmd13: @ 8033E10 .pool thumb_func_end EmitCmd13 - thumb_func_start sub_8033E30 -sub_8033E30: @ 8033E30 + thumb_func_start EmitChooseMove +EmitChooseMove: @ 8033E30 push {r4-r6,lr} adds r5, r3, 0 lsls r0, 24 @@ -2858,10 +2858,10 @@ _08033E4C: pop {r0} bx r0 .pool - thumb_func_end sub_8033E30 + thumb_func_end EmitChooseMove - thumb_func_start sub_8033E6C -sub_8033E6C: @ 8033E6C + thumb_func_start EmitOpenBag +EmitOpenBag: @ 8033E6C push {r4,r5,lr} adds r4, r1, 0 lsls r0, 24 @@ -2886,7 +2886,7 @@ _08033E7E: pop {r0} bx r0 .pool - thumb_func_end sub_8033E6C + thumb_func_end EmitOpenBag thumb_func_start EmitChoosePokemon EmitChoosePokemon: @ 8033EA0 @@ -3624,8 +3624,8 @@ EmitCmd49: @ 80343D4 .pool thumb_func_end EmitCmd49 - thumb_func_start dp01_build_cmdbuf_x32_32_32_32 -dp01_build_cmdbuf_x32_32_32_32: @ 80343F4 + thumb_func_start Emit_x32 +Emit_x32: @ 80343F4 push {lr} lsls r0, 24 lsrs r0, 24 @@ -3640,7 +3640,7 @@ dp01_build_cmdbuf_x32_32_32_32: @ 80343F4 pop {r0} bx r0 .pool - thumb_func_end dp01_build_cmdbuf_x32_32_32_32 + thumb_func_end Emit_x32 thumb_func_start EmitSpriteInvisibility EmitSpriteInvisibility: @ 8034414 diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 206519f40..0b797feef 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -561,7 +561,7 @@ BattleScript_BerryStatRaiseEnd2:: @ 82DB84E BattleScript_BerryFocusEnergyEnd2:: @ 82DB869 .incbin "baserom.gba", 0x2db869, 0x10 -gUnknown_082DB879:: @ 82DB879 +BattleScript_ActionSelectionItemsCantBeUsed:: @ 82DB879 .incbin "baserom.gba", 0x2db879, 0x4 gUnknown_082DB87D:: @ 82DB87D diff --git a/include/battle.h b/include/battle.h index e5e5a94d1..50d2389ac 100644 --- a/include/battle.h +++ b/include/battle.h @@ -61,7 +61,8 @@ #define STEVEN_PARTNER_ID 0xC03 #define SECRET_BASE_OPPONENT 0x400 -#define BATTLE_TYPE_FRONTIER (BATTLE_TYPE_BATTLE_TOWER | BATTLE_TYPE_DOME | BATTLE_TYPE_PALACE | BATTLE_TYPE_ARENA | BATTLE_TYPE_FACTORY | BATTLE_TYPE_x100000 | BATTLE_TYPE_PYRAMID) +#define BATTLE_TYPE_FRONTIER (BATTLE_TYPE_BATTLE_TOWER | BATTLE_TYPE_DOME | BATTLE_TYPE_PALACE | BATTLE_TYPE_ARENA | BATTLE_TYPE_FACTORY | BATTLE_TYPE_x100000 | BATTLE_TYPE_PYRAMID) +#define BATTLE_TYPE_FRONTIER_NO_PYRAMID (BATTLE_TYPE_BATTLE_TOWER | BATTLE_TYPE_DOME | BATTLE_TYPE_PALACE | BATTLE_TYPE_ARENA | BATTLE_TYPE_FACTORY | BATTLE_TYPE_x100000) #define BATTLE_WON 0x1 #define BATTLE_LOST 0x2 @@ -136,6 +137,7 @@ #define HITMARKER_PURSUIT_TRAP 0x00001000 #define HITMARKER_IGNORE_SAFEGUARD 0x00002000 #define HITMARKER_SYNCHRONISE_EFFECT 0x00004000 +#define HITMARKER_x8000 0x00008000 #define HITMARKER_IGNORE_ON_AIR 0x00010000 #define HITMARKER_IGNORE_UNDERGROUND 0x00020000 #define HITMARKER_IGNORE_UNDERWATER 0x00040000 @@ -614,10 +616,7 @@ struct BattleStruct u8 field_7E; u8 formToChangeInto; u8 chosenMovesIds[4]; - u8 field_84; - u8 field_85; - u8 field_86; - u8 field_87; + u8 field_84[4]; u8 field_88; u8 field_89; u8 field_8A; @@ -906,7 +905,7 @@ void BattleTurnPassed(void); void BattleScriptPush(const u8* bsPtr); void BattleScriptPushCursor(void); void BattleScriptPop(void); -u8 sub_803FB4C(void); // msg, can't select a move +u8 TrySetCantSelectMoveBattleScript(void); u8 CheckMoveLimitations(u8 bank, u8 unusableMoves, u8 check); bool8 AreAllMovesUnusable(void); u8 GetImprisonedMovesCount(u8 bank, u16 move); diff --git a/include/battle_controllers.h b/include/battle_controllers.h index 61e8bec29..9a7f947fa 100644 --- a/include/battle_controllers.h +++ b/include/battle_controllers.h @@ -14,6 +14,16 @@ struct MovePpInfo u8 ppBonuses; }; +struct ChooseMoveStruct +{ + u16 moves[4]; + u8 ppNumbers[4]; + u8 ppWithBonusNumbers[4]; + u16 species; + u8 monType1; + u8 monType2; +}; + #define REQUEST_ALL_BATTLE 0x0 #define REQUEST_SPECIES_BATTLE 0x1 #define REQUEST_HELDITEM_BATTLE 0x2 @@ -40,8 +50,8 @@ void EmitSpriteInvisibility(u8 bufferId, bool8 isInvisible); void EmitReturnPokeToBall(u8 bufferId, u8 arg1); void EmitGetMonData(u8 bufferId, u8 arg1, u8 arg2); void EmitSwitchInAnim(u8 bufferId, u8 partyId, bool8 dontClearSubstituteBit); -void EmitChoosePokemon(u8 bufferId, u8 caseId, u8 arg2, u8 abilityId, const u8* arg4); -void EmitLinkStandbyMsg(u8 bufferId, u8 arg1, u8 arg2); +void EmitChoosePokemon(u8 bufferId, u8 caseId, u8 arg2, u8 abilityId, u8* arg4); +void EmitLinkStandbyMsg(u8 bufferId, u8 arg1, bool32 arg2); void EmitTrainerSlide(u8 bufferId); void EmitTrainerSlideBack(u8 bufferId); void EmitFaintingCry(u8 bufferId); @@ -56,6 +66,10 @@ void EmitIntroSlide(u8 bufferId, u8 terrainId); void EmitDrawTrainerPic(u8 bufferId); void EmitLoadMonSprite(u8 bufferId); void EmitIntroTrainerBallThrow(u8 bufferId); +void EmitChooseAction(u8 bufferId, u8 arg1, u16 arg2); +void EmitChooseMove(u8 bufferId, bool8 isDoubleBattle, bool8 NoPpNumber, struct ChooseMoveStruct* movePpData); +void EmitOpenBag(u8 bufferId, u8* arg1); +void Emit_x32(u8 bufferId); #define RESET_ACTION_MOVE_SELECTION 0 #define RESET_ACTION_SELECTION 1 diff --git a/include/recorded_battle.h b/include/recorded_battle.h index 2040f2b8a..2df1620e4 100644 --- a/include/recorded_battle.h +++ b/include/recorded_battle.h @@ -6,10 +6,13 @@ extern u32 gRecordedBattleRngSeed; void sub_8185F84(void); void sub_8184E58(void); void RecordedBattle_SetBankAction(u8 bank, u8 action); +void RecordedBattle_ClearBankAction(u8 bank, u8 bytesToClear); void sub_8185F90(u16 arg0); bool8 sub_8186450(void); u8 sub_8185FAC(void); u8 sub_8185FB8(void); u8 MoveRecordedBattleToSaveData(void); +void sub_818603C(u8); +void sub_8185FD0(void); #endif // GUARD_RECORDED_BATTLE_H diff --git a/src/battle_2.c b/src/battle_2.c index 769723c24..a18e1c698 100644 --- a/src/battle_2.c +++ b/src/battle_2.c @@ -132,6 +132,7 @@ extern u8 gActionForBanks[BATTLE_BANKS_COUNT]; extern u16 gChosenMovesByBanks[BATTLE_BANKS_COUNT]; extern u8 gFightStateTracker; extern u8 gLastUsedAbility; +extern u16 gLastUsedItem; extern const u8 gSpeciesNames[][POKEMON_NAME_LENGTH + 1]; extern const struct BattleMove gBattleMoves[]; @@ -168,6 +169,8 @@ extern void sub_80B3AF8(u8 taskId); // cable club extern void sub_8076918(u8 bank); extern void sub_80729D0(u8 healthoxSpriteId); extern void sub_81A56B4(void); // battle frontier 2 +extern void sub_81B8FB0(u8, u8); // party menu +extern u8 pokemon_order_func(u8); // party menu // this file's functions static void CB2_InitBattleInternal(void); @@ -214,6 +217,9 @@ static void BattleIntroPlayer1SendsOutMonAnimation(void); static void TryDoEventsBeforeFirstTurn(void); void sub_803BE74(void); void bc_bs_exec(void); +void sub_803D2E8(void); +void sub_803CDF8(void); +bool8 sub_803CDB8(void); void CB2_InitBattle(void) { @@ -3736,3 +3742,475 @@ u8 IsRunningFromBattleImpossible(void) } return 0; } + +extern u8 gUnknown_0203CF00[]; + +void sub_803BDA0(u8 bank) +{ + s32 i; + u8 r4; + u8 r1; + + // gBattleStruct->field_60[bank][i] + + for (i = 0; i < 3; i++) + gUnknown_0203CF00[i] = *(bank * 3 + i + (u8*)(gBattleStruct->field_60)); + + r4 = pokemon_order_func(gBattlePartyID[bank]); + r1 = pokemon_order_func(*(gBattleStruct->field_5C + bank)); + sub_81B8FB0(r4, r1); + + if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE) + { + for (i = 0; i < 3; i++) + { + *(bank * 3 + i + (u8*)(gBattleStruct->field_60)) = gUnknown_0203CF00[i]; + *((bank ^ BIT_MON) * 3 + i + (u8*)(gBattleStruct->field_60)) = gUnknown_0203CF00[i]; + } + } + else + { + for (i = 0; i < 3; i++) + { + *(bank * 3 + i + (u8*)(gBattleStruct->field_60)) = gUnknown_0203CF00[i]; + } + } +} + +extern const u8* gBattlescriptPtrsForSelection[BATTLE_BANKS_COUNT]; +extern const u8* gBattlescriptCurrInstr; + +extern const u8 BattleScript_ActionSelectionItemsCantBeUsed[]; +extern const u8 gUnknown_082DAB11[]; +extern const u8 gUnknown_082DB9BA[]; +extern const u8 gUnknown_082DAAFE[]; +extern const u8 gUnknown_082DAB0B[]; + +extern u32 gBattlePalaceMoveSelectionRngValue; + +void sub_803BE74(void) +{ + s32 i; + + gBattleCommunication[4] = 0; + for (gActiveBank = 0; gActiveBank < gNoOfAllBanks; gActiveBank++) + { + u8 identity = GetBankIdentity(gActiveBank); + switch (gBattleCommunication[gActiveBank]) + { + case 0: + sub_8185FD0(); + gBattleCommunication[gActiveBank] = 1; + break; + case 1: + *(gBattleStruct->field_5C + gActiveBank) = 6; + if (gBattleTypeFlags & BATTLE_TYPE_MULTI + || !(identity & BIT_MON) + || gBattleStruct->field_91 & gBitTable[GetBankByIdentity(identity ^ BIT_MON)] + || gBattleCommunication[GetBankByIdentity(identity ^ BIT_MON)] == 5) + { + if (gBattleStruct->field_91 & gBitTable[gActiveBank]) + { + gActionForBanks[gActiveBank] = 13; + if (!(gBattleTypeFlags & BATTLE_TYPE_MULTI)) + gBattleCommunication[gActiveBank] = 5; + else + gBattleCommunication[gActiveBank] = 4; + } + else + { + if (gBattleMons[gActiveBank].status2 & STATUS2_MULTIPLETURNS + || gBattleMons[gActiveBank].status2 & STATUS2_RECHARGE) + { + gActionForBanks[gActiveBank] = 0; + gBattleCommunication[gActiveBank] = 4; + } + else + { + EmitChooseAction(0, gActionForBanks[0], gBattleBufferB[0][1] | (gBattleBufferB[0][2] << 8)); + MarkBufferBankForExecution(gActiveBank); + gBattleCommunication[gActiveBank]++; + } + } + } + break; + case 2: + if (!(gBattleExecBuffer & ((gBitTable[gActiveBank]) | (0xF0000000) | (gBitTable[gActiveBank] << 4) | (gBitTable[gActiveBank] << 8) | (gBitTable[gActiveBank] << 0xC)))) + { + RecordedBattle_SetBankAction(gActiveBank, gBattleBufferB[gActiveBank][1]); + gActionForBanks[gActiveBank] = gBattleBufferB[gActiveBank][1]; + + switch (gBattleBufferB[gActiveBank][1]) + { + case 0: + if (AreAllMovesUnusable()) + { + gBattleCommunication[gActiveBank] = 6; + *(gBattleStruct->field_54 + gActiveBank) = 0; + *(gBattleStruct->field_84 + gActiveBank) = 4; + *(gBattleStruct->moveTarget + gActiveBank) = gBattleBufferB[gActiveBank][3]; + return; + } + else if (gDisableStructs[gActiveBank].encoredMove != 0) + { + gChosenMovesByBanks[gActiveBank] = gDisableStructs[gActiveBank].encoredMove; + *(gBattleStruct->chosenMovesIds + gActiveBank) = gDisableStructs[gActiveBank].encoredMovePos; + gBattleCommunication[gActiveBank] = 4; + return; + } + else + { + struct ChooseMoveStruct moveInfo; + + moveInfo.species = gBattleMons[gActiveBank].species; + moveInfo.monType1 = gBattleMons[gActiveBank].type1; + moveInfo.monType2 = gBattleMons[gActiveBank].type2; + + for (i = 0; i < 4; i++) + { + moveInfo.moves[i] = gBattleMons[gActiveBank].moves[i]; + moveInfo.ppNumbers[i] = gBattleMons[gActiveBank].pp[i]; + moveInfo.ppWithBonusNumbers[i] = CalculatePPWithBonus( + gBattleMons[gActiveBank].moves[i], + gBattleMons[gActiveBank].ppBonuses, + i); + } + + EmitChooseMove(0, (gBattleTypeFlags & BATTLE_TYPE_DOUBLE) != 0, FALSE, &moveInfo); + MarkBufferBankForExecution(gActiveBank); + } + break; + case 1: + if (gBattleTypeFlags & (BATTLE_TYPE_LINK + | BATTLE_TYPE_FRONTIER_NO_PYRAMID + | BATTLE_TYPE_EREADER_TRAINER + | BATTLE_TYPE_x2000000)) + { + RecordedBattle_ClearBankAction(gActiveBank, 1); + gBattlescriptPtrsForSelection[gActiveBank] = BattleScript_ActionSelectionItemsCantBeUsed; + gBattleCommunication[gActiveBank] = 6; + *(gBattleStruct->field_54 + gActiveBank) = 0; + *(gBattleStruct->field_84 + gActiveBank) = 1; + return; + } + else + { + EmitOpenBag(0, gBattleStruct->field_60[gActiveBank]); + MarkBufferBankForExecution(gActiveBank); + } + break; + case 2: + *(gBattleStruct->field_58 + gActiveBank) = gBattlePartyID[gActiveBank]; + if (gBattleMons[gActiveBank].status2 & (STATUS2_WRAPPED | STATUS2_ESCAPE_PREVENTION) + || gBattleTypeFlags & BATTLE_TYPE_ARENA + || gStatuses3[gActiveBank] & STATUS3_ROOTED) + { + EmitChoosePokemon(0, 2, 6, ABILITY_NONE, gBattleStruct->field_60[gActiveBank]); + } + else if ((i = AbilityBattleEffects(ABILITYEFFECT_CHECK_OTHER_SIDE, gActiveBank, ABILITY_SHADOW_TAG, 0, 0)) + || ((i = AbilityBattleEffects(ABILITYEFFECT_CHECK_OTHER_SIDE, gActiveBank, ABILITY_ARENA_TRAP, 0, 0)) + && gBattleMons[gActiveBank].type1 != TYPE_FLYING + && gBattleMons[gActiveBank].type2 != TYPE_FLYING + && gBattleMons[gActiveBank].ability != ABILITY_LEVITATE) + || ((i = AbilityBattleEffects(ABILITYEFFECT_CHECK_FIELD_EXCEPT_BANK, gActiveBank, ABILITY_MAGNET_PULL, 0, 0)) + && (gBattleMons[gActiveBank].type1 == TYPE_STEEL + || gBattleMons[gActiveBank].type2 == TYPE_STEEL))) + { + EmitChoosePokemon(0, ((i - 1) << 4) | 4, 6, gLastUsedAbility, gBattleStruct->field_60[gActiveBank]); + } + else + { + if (gActiveBank == 2 && gActionForBanks[0] == 2) + EmitChoosePokemon(0, 0, *(gBattleStruct->field_5C + 0), ABILITY_NONE, gBattleStruct->field_60[gActiveBank]); + else if (gActiveBank == 3 && gActionForBanks[1] == 2) + EmitChoosePokemon(0, 0, *(gBattleStruct->field_5C + 1), ABILITY_NONE, gBattleStruct->field_60[gActiveBank]); + else + EmitChoosePokemon(0, 0, 6, ABILITY_NONE, gBattleStruct->field_60[gActiveBank]); + } + MarkBufferBankForExecution(gActiveBank); + break; + case 5: + if (IsPlayerPartyAndPokemonStorageFull()) + { + gBattlescriptPtrsForSelection[gActiveBank] = gUnknown_082DAB11; + gBattleCommunication[gActiveBank] = 6; + *(gBattleStruct->field_54 + gActiveBank) = 0; + *(gBattleStruct->field_84 + gActiveBank) = 1; + return; + } + break; + case 6: + EmitOpenBag(0, gBattleStruct->field_60[gActiveBank]); + MarkBufferBankForExecution(gActiveBank); + break; + case 12: + gBattleCommunication[gActiveBank] = 7; + gBattleCommunication[GetBankByIdentity(GetBankIdentity(gActiveBank) ^ BIT_MON)] = 1; + RecordedBattle_ClearBankAction(gActiveBank, 1); + if (gBattleMons[GetBankByIdentity(GetBankIdentity(gActiveBank) ^ BIT_MON)].status2 & STATUS2_MULTIPLETURNS + || gBattleMons[GetBankByIdentity(GetBankIdentity(gActiveBank) ^ BIT_MON)].status2 & STATUS2_RECHARGE) + { + Emit_x32(0); + MarkBufferBankForExecution(gActiveBank); + return; + } + else if (gActionForBanks[GetBankByIdentity(GetBankIdentity(gActiveBank) ^ BIT_MON)] == 2) + { + RecordedBattle_ClearBankAction(GetBankByIdentity(GetBankIdentity(gActiveBank) ^ BIT_MON), 2); + } + else if (gActionForBanks[GetBankByIdentity(GetBankIdentity(gActiveBank) ^ BIT_MON)] == 3) + { + RecordedBattle_ClearBankAction(GetBankByIdentity(GetBankIdentity(gActiveBank) ^ BIT_MON), 1); + } + else if (gActionForBanks[GetBankByIdentity(GetBankIdentity(gActiveBank) ^ BIT_MON)] == 0 + && (gProtectStructs[GetBankByIdentity(GetBankIdentity(gActiveBank) ^ BIT_MON)].onlyStruggle + || gDisableStructs[GetBankByIdentity(GetBankIdentity(gActiveBank) ^ BIT_MON)].encoredMove)) + { + RecordedBattle_ClearBankAction(GetBankByIdentity(GetBankIdentity(gActiveBank) ^ BIT_MON), 1); + } + else if (gBattleTypeFlags & BATTLE_TYPE_PALACE + && gActionForBanks[GetBankByIdentity(GetBankIdentity(gActiveBank) ^ BIT_MON)] == 0) + { + gRngValue = gBattlePalaceMoveSelectionRngValue; + RecordedBattle_ClearBankAction(GetBankByIdentity(GetBankIdentity(gActiveBank) ^ BIT_MON), 1); + } + else + { + RecordedBattle_ClearBankAction(GetBankByIdentity(GetBankIdentity(gActiveBank) ^ BIT_MON), 3); + } + Emit_x32(0); + MarkBufferBankForExecution(gActiveBank); + return; + } + + if (gBattleTypeFlags & BATTLE_TYPE_TRAINER + && gBattleTypeFlags & (BATTLE_TYPE_FRONTIER | BATTLE_TYPE_x4000000) + && gBattleBufferB[gActiveBank][1] == 3) + { + gBattlescriptPtrsForSelection[gActiveBank] = gUnknown_082DB9BA; + gBattleCommunication[gActiveBank] = 8; + *(gBattleStruct->field_54 + gActiveBank) = 0; + *(gBattleStruct->field_84 + gActiveBank) = 1; + return; + } + else if (gBattleTypeFlags & BATTLE_TYPE_TRAINER + && !(gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_x2000000)) + && gBattleBufferB[gActiveBank][1] == 3) + { + BattleScriptExecute(gUnknown_082DAAFE); + gBattleCommunication[gActiveBank] = 1; + } + else if (IsRunningFromBattleImpossible() != 0 + && gBattleBufferB[gActiveBank][1] == 3) + { + gBattlescriptPtrsForSelection[gActiveBank] = gUnknown_082DAB0B; + gBattleCommunication[gActiveBank] = 6; + *(gBattleStruct->field_54 + gActiveBank) = 0; + *(gBattleStruct->field_84 + gActiveBank) = 1; + return; + } + else + { + gBattleCommunication[gActiveBank]++; + } + } + break; + case 3: + if (!(gBattleExecBuffer & ((gBitTable[gActiveBank]) | (0xF0000000) | (gBitTable[gActiveBank] << 4) | (gBitTable[gActiveBank] << 8) | (gBitTable[gActiveBank] << 0xC)))) + { + switch (gActionForBanks[gActiveBank]) + { + case 0: + switch (gBattleBufferB[gActiveBank][1]) + { + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + gActionForBanks[gActiveBank] = gBattleBufferB[gActiveBank][1]; + return; + case 15: + gActionForBanks[gActiveBank] = 2; + sub_803CDF8(); + return; + default: + sub_818603C(2); + if ((gBattleBufferB[gActiveBank][2] | (gBattleBufferB[gActiveBank][3] << 8)) == 0xFFFF) + { + gBattleCommunication[gActiveBank] = 1; + RecordedBattle_ClearBankAction(gActiveBank, 1); + } + else if (TrySetCantSelectMoveBattleScript()) + { + RecordedBattle_ClearBankAction(gActiveBank, 1); + gBattleCommunication[gActiveBank] = 6; + *(gBattleStruct->field_54 + gActiveBank) = 0; + gBattleBufferB[gActiveBank][1] = 0; + *(gBattleStruct->field_84 + gActiveBank) = 2; + return; + } + else + { + if (!(gBattleTypeFlags & BATTLE_TYPE_PALACE)) + { + RecordedBattle_SetBankAction(gActiveBank, gBattleBufferB[gActiveBank][2]); + RecordedBattle_SetBankAction(gActiveBank, gBattleBufferB[gActiveBank][3]); + } + *(gBattleStruct->chosenMovesIds + gActiveBank) = gBattleBufferB[gActiveBank][2]; + gChosenMovesByBanks[gActiveBank] = gBattleMons[gActiveBank].moves[*(gBattleStruct->chosenMovesIds + gActiveBank)]; + *(gBattleStruct->moveTarget + gActiveBank) = gBattleBufferB[gActiveBank][3]; + gBattleCommunication[gActiveBank]++; + } + break; + } + break; + case 1: + if ((gBattleBufferB[gActiveBank][1] | (gBattleBufferB[gActiveBank][2] << 8)) == 0) + { + gBattleCommunication[gActiveBank] = 1; + } + else + { + gLastUsedItem = (gBattleBufferB[gActiveBank][1] | (gBattleBufferB[gActiveBank][2] << 8)); + gBattleCommunication[gActiveBank]++; + } + break; + case 2: + if (gBattleBufferB[gActiveBank][1] == 6) + { + gBattleCommunication[gActiveBank] = 1; + RecordedBattle_ClearBankAction(gActiveBank, 1); + } + else + { + sub_803CDF8(); + gBattleCommunication[gActiveBank]++; + } + break; + case 3: + gHitMarker |= HITMARKER_x8000; + gBattleCommunication[gActiveBank]++; + break; + case 4: + gBattleCommunication[gActiveBank]++; + break; + case 5: + gBattleCommunication[gActiveBank]++; + break; + case 6: + if ((gBattleBufferB[gActiveBank][1] | (gBattleBufferB[gActiveBank][2] << 8)) != 0) + { + gBattleCommunication[gActiveBank]++; + } + else + { + gBattleCommunication[gActiveBank] = 1; + } + break; + case 7: + gBattleCommunication[gActiveBank]++; + break; + case 8: + gHitMarker |= HITMARKER_x8000; + gBattleCommunication[gActiveBank]++; + break; + case 9: + gBattleCommunication[gActiveBank]++; + break; + } + } + break; + case 4: + if (!(gBattleExecBuffer & ((gBitTable[gActiveBank]) | (0xF0000000) | (gBitTable[gActiveBank] << 4) | (gBitTable[gActiveBank] << 8) | (gBitTable[gActiveBank] << 0xC)))) + { + i = (sub_803CDB8() != 0); + + if (((gBattleTypeFlags & (BATTLE_TYPE_MULTI | BATTLE_TYPE_DOUBLE)) != BATTLE_TYPE_DOUBLE) + || (identity & BIT_MON) + || (*(&gBattleStruct->field_91) & gBitTable[GetBankByIdentity(identity ^ BIT_MON)])) + { + EmitLinkStandbyMsg(0, 0, i); + } + else + { + EmitLinkStandbyMsg(0, 1, i); + } + MarkBufferBankForExecution(gActiveBank); + gBattleCommunication[gActiveBank]++; + } + break; + case 5: + if (!(gBattleExecBuffer & ((gBitTable[gActiveBank]) | (0xF0000000) | (gBitTable[gActiveBank] << 4) | (gBitTable[gActiveBank] << 8) | (gBitTable[gActiveBank] << 0xC)))) + { + gBattleCommunication[4]++; + } + break; + case 6: + if (*(gBattleStruct->field_54 + gActiveBank) != 0) + { + gBattleCommunication[gActiveBank] = *(gBattleStruct->field_84 + gActiveBank); + } + else + { + gBankAttacker = gActiveBank; + gBattlescriptCurrInstr = gBattlescriptPtrsForSelection[gActiveBank]; + if (!(gBattleExecBuffer & ((gBitTable[gActiveBank]) | (0xF0000000) | (gBitTable[gActiveBank] << 4) | (gBitTable[gActiveBank] << 8) | (gBitTable[gActiveBank] << 0xC)))) + { + gBattleScriptingCommandsTable[gBattlescriptCurrInstr[0]](); + } + gBattlescriptPtrsForSelection[gActiveBank] = gBattlescriptCurrInstr; + } + break; + case 7: + if (!(gBattleExecBuffer & ((gBitTable[gActiveBank]) | (0xF0000000) | (gBitTable[gActiveBank] << 4) | (gBitTable[gActiveBank] << 8) | (gBitTable[gActiveBank] << 0xC)))) + { + gBattleCommunication[gActiveBank] = 1; + } + break; + case 8: + if (*(gBattleStruct->field_54 + gActiveBank) != 0) + { + if (gBattleBufferB[gActiveBank][1] == 13) + { + gHitMarker |= HITMARKER_x8000; + gActionForBanks[gActiveBank] = 3; + gBattleCommunication[gActiveBank] = 4; + } + else + { + RecordedBattle_ClearBankAction(gActiveBank, 1); + gBattleCommunication[gActiveBank] = *(gBattleStruct->field_84 + gActiveBank); + } + } + else + { + gBankAttacker = gActiveBank; + gBattlescriptCurrInstr = gBattlescriptPtrsForSelection[gActiveBank]; + if (!(gBattleExecBuffer & ((gBitTable[gActiveBank]) | (0xF0000000) | (gBitTable[gActiveBank] << 4) | (gBitTable[gActiveBank] << 8) | (gBitTable[gActiveBank] << 0xC)))) + { + gBattleScriptingCommandsTable[gBattlescriptCurrInstr[0]](); + } + gBattlescriptPtrsForSelection[gActiveBank] = gBattlescriptCurrInstr; + } + break; + } + } + + if (gBattleCommunication[4] == gNoOfAllBanks) + { + sub_818603C(1); + gBattleMainFunc = sub_803D2E8; + + if (gBattleTypeFlags & BATTLE_TYPE_INGAME_PARTNER) + { + for (i = 0; i < gNoOfAllBanks; i++) + { + if (gActionForBanks[i] == 2) + sub_80571DC(i, *(gBattleStruct->field_5C + i)); + } + } + } +} diff --git a/src/battle_3.c b/src/battle_3.c index 071e4d59d..59028410d 100644 --- a/src/battle_3.c +++ b/src/battle_3.c @@ -19,7 +19,7 @@ #include "calculate_base_damage.h" extern const u8* gBattlescriptCurrInstr; -extern const u8* gUnknown_02024220[BATTLE_BANKS_COUNT]; +extern const u8* gBattlescriptPtrsForSelection[BATTLE_BANKS_COUNT]; extern const u8* gUnknown_02024230[BATTLE_BANKS_COUNT]; extern struct BattlePokemon gBattleMons[BATTLE_BANKS_COUNT]; extern u8 gActiveBank; @@ -200,7 +200,7 @@ void BattleScriptPop(void) gBattlescriptCurrInstr = BATTLESCRIPTS_STACK->ptr[--BATTLESCRIPTS_STACK->size]; } -u8 sub_803FB4C(void) // msg, can't select a move +u8 TrySetCantSelectMoveBattleScript(void) { u8 limitations = 0; u16 move = gBattleMons[gActiveBank].moves[gBattleBufferB[gActiveBank][2]]; @@ -218,7 +218,7 @@ u8 sub_803FB4C(void) // msg, can't select a move } else { - gUnknown_02024220[gActiveBank] = gUnknown_082DAE1F; + gBattlescriptPtrsForSelection[gActiveBank] = gUnknown_082DAE1F; limitations = 1; } } @@ -233,7 +233,7 @@ u8 sub_803FB4C(void) // msg, can't select a move } else { - gUnknown_02024220[gActiveBank] = gUnknown_082DB089; + gBattlescriptPtrsForSelection[gActiveBank] = gUnknown_082DB089; limitations++; } } @@ -248,7 +248,7 @@ u8 sub_803FB4C(void) // msg, can't select a move } else { - gUnknown_02024220[gActiveBank] = gUnknown_082DB0A0; + gBattlescriptPtrsForSelection[gActiveBank] = gUnknown_082DB0A0; limitations++; } } @@ -263,7 +263,7 @@ u8 sub_803FB4C(void) // msg, can't select a move } else { - gUnknown_02024220[gActiveBank] = gUnknown_082DB181; + gBattlescriptPtrsForSelection[gActiveBank] = gUnknown_082DB181; limitations++; } } @@ -285,7 +285,7 @@ u8 sub_803FB4C(void) // msg, can't select a move } else { - gUnknown_02024220[gActiveBank] = gUnknown_082DB812; + gBattlescriptPtrsForSelection[gActiveBank] = gUnknown_082DB812; limitations++; } } @@ -298,7 +298,7 @@ u8 sub_803FB4C(void) // msg, can't select a move } else { - gUnknown_02024220[gActiveBank] = gUnknown_082DB076; + gBattlescriptPtrsForSelection[gActiveBank] = gUnknown_082DB076; limitations++; } } @@ -349,7 +349,7 @@ bool8 AreAllMovesUnusable(void) if (unusable == 0xF) // all moves are unusable { gProtectStructs[gActiveBank].onlyStruggle = 1; - gUnknown_02024220[gActiveBank] = BattleScript_NoMovesLeft; + gBattlescriptPtrsForSelection[gActiveBank] = BattleScript_NoMovesLeft; } else { diff --git a/sym_ewram.txt b/sym_ewram.txt index 287bc4a5d..aa069b325 100644 --- a/sym_ewram.txt +++ b/sym_ewram.txt @@ -382,7 +382,7 @@ gBattlescriptCurrInstr: @ 2024214 gActionForBanks: @ 202421C .space 0x4 -gUnknown_02024220: @ 2024220 +gBattlescriptPtrsForSelection: @ 2024220 .space 0x10 gUnknown_02024230: @ 2024230 @@ -1671,7 +1671,7 @@ gUnknown_0203BD28: @ 203BD28 gRecordedBattleRngSeed: @ 203BD2C .space 0x4 -gUnknown_0203BD30: @ 203BD30 +gBattlePalaceMoveSelectionRngValue: @ 203BD30 .space 0x4 gUnknown_0203BD34: @ 203BD34 From d87d19cfe5903f5fabb0de37d2c46ef84a83c168 Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Wed, 4 Oct 2017 19:25:14 +0200 Subject: [PATCH 28/42] more battle2 done --- asm/battle_2.s | 977 +---------------------------------- include/battle.h | 25 +- include/pokemon.h | 2 +- src/battle_2.c | 509 ++++++++++++++---- src/battle_3.c | 14 +- src/battle_script_commands.c | 42 +- sym_ewram.txt | 4 +- 7 files changed, 478 insertions(+), 1095 deletions(-) diff --git a/asm/battle_2.s b/asm/battle_2.s index 5f970d766..673a0a833 100644 --- a/asm/battle_2.s +++ b/asm/battle_2.s @@ -5,951 +5,6 @@ .text - thumb_func_start sub_803CDB8 -sub_803CDB8: @ 803CDB8 - push {r4,r5,lr} - movs r3, 0 - movs r1, 0 - ldr r0, =gNoOfAllBanks - ldrb r2, [r0] - adds r5, r0, 0 - cmp r3, r2 - bge _0803CDDA - ldr r4, =gBattleCommunication -_0803CDCA: - adds r0, r1, r4 - ldrb r0, [r0] - cmp r0, 0x5 - bne _0803CDD4 - adds r3, 0x1 -_0803CDD4: - adds r1, 0x1 - cmp r1, r2 - blt _0803CDCA -_0803CDDA: - adds r0, r3, 0x1 - ldrb r5, [r5] - cmp r0, r5 - beq _0803CDF0 - movs r0, 0 - b _0803CDF2 - .pool -_0803CDF0: - movs r0, 0x1 -_0803CDF2: - pop {r4,r5} - pop {r1} - bx r1 - thumb_func_end sub_803CDB8 - - thumb_func_start sub_803CDF8 -sub_803CDF8: @ 803CDF8 - push {r4-r7,lr} - ldr r7, =gActiveBank - ldrb r0, [r7] - ldr r6, =gBattleStruct - ldr r1, [r6] - adds r1, r0, r1 - adds r1, 0x5C - ldr r4, =gBattleBufferB - lsls r0, 9 - adds r2, r4, 0x1 - adds r0, r2 - ldrb r0, [r0] - strb r0, [r1] - ldrb r0, [r7] - lsls r1, r0, 9 - adds r1, r2 - ldrb r1, [r1] - bl RecordedBattle_SetBankAction - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - movs r1, 0x42 - ands r0, r1 - cmp r0, 0x42 - bne _0803CEC6 - ldrb r0, [r7] - ldr r2, [r6] - lsls r1, r0, 1 - adds r1, r0 - adds r1, r2 - adds r1, 0x60 - ldrb r2, [r1] - movs r0, 0xF - ands r0, r2 - strb r0, [r1] - ldrb r0, [r7] - ldr r2, [r6] - lsls r1, r0, 1 - adds r1, r0 - adds r1, r2 - adds r1, 0x60 - lsls r0, 9 - adds r5, r4, 0x2 - adds r0, r5 - ldrb r2, [r0] - movs r3, 0xF0 - adds r0, r3, 0 - ands r0, r2 - ldrb r2, [r1] - orrs r0, r2 - strb r0, [r1] - ldrb r1, [r7] - ldr r2, [r6] - lsls r0, r1, 1 - adds r0, r1 - adds r0, r2 - adds r0, 0x61 - lsls r1, 9 - adds r4, 0x3 - mov r12, r4 - add r1, r12 - ldrb r1, [r1] - strb r1, [r0] - ldrb r0, [r7] - movs r4, 0x2 - eors r0, r4 - ldr r2, [r6] - lsls r1, r0, 1 - adds r1, r0 - adds r1, r2 - adds r1, 0x60 - ldrb r2, [r1] - adds r0, r3, 0 - ands r0, r2 - strb r0, [r1] - ldrb r0, [r7] - eors r0, r4 - ldr r2, [r6] - lsls r1, r0, 1 - adds r1, r0 - adds r1, r2 - adds r1, 0x60 - ldrb r0, [r7] - lsls r0, 9 - adds r0, r5 - ldrb r0, [r0] - ands r3, r0 - lsrs r3, 4 - ldrb r0, [r1] - orrs r3, r0 - strb r3, [r1] - ldrb r0, [r7] - eors r4, r0 - ldr r0, [r6] - lsls r1, r4, 1 - adds r1, r4 - adds r1, r0 - adds r1, 0x62 - ldrb r0, [r7] - lsls r0, 9 - add r0, r12 - ldrb r0, [r0] - strb r0, [r1] -_0803CEC6: - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end sub_803CDF8 - - thumb_func_start sub_803CEDC -sub_803CEDC: @ 803CEDC - push {r4,r5,lr} - lsls r0, 24 - lsrs r0, 24 - lsls r1, 24 - lsrs r1, 24 - ldr r2, =gUnknown_0202407A - adds r4, r0, r2 - ldrb r5, [r4] - adds r2, r1, r2 - ldrb r3, [r2] - strb r3, [r4] - strb r5, [r2] - ldr r2, =gTurnOrder - adds r0, r2 - ldrb r5, [r0] - adds r1, r2 - ldrb r2, [r1] - strb r2, [r0] - strb r5, [r1] - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end sub_803CEDC - - thumb_func_start GetWhoStrikesFirst -GetWhoStrikesFirst: @ 803CF10 - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - sub sp, 0xC - lsls r0, 24 - lsrs r0, 24 - mov r9, r0 - lsls r1, 24 - lsrs r1, 24 - mov r10, r1 - lsls r2, 24 - lsrs r2, 24 - str r2, [sp, 0x4] - movs r0, 0 - str r0, [sp, 0x8] - str r0, [sp] - movs r0, 0x13 - movs r1, 0 - movs r2, 0xD - movs r3, 0 - bl AbilityBattleEffects - lsls r0, 24 - cmp r0, 0 - bne _0803CFD8 - ldr r1, [sp, 0x8] - str r1, [sp] - movs r0, 0x13 - movs r1, 0 - movs r2, 0x4D - movs r3, 0 - bl AbilityBattleEffects - lsls r0, 24 - cmp r0, 0 - bne _0803CFD8 - ldr r1, =gBattleMons - movs r0, 0x58 - mov r2, r9 - muls r2, r0 - adds r0, r2, 0 - adds r0, r1 - adds r0, 0x20 - ldrb r3, [r0] - cmp r3, 0x21 - bne _0803CF7C - ldr r0, =gBattleWeather - ldrh r1, [r0] - movs r0, 0x7 - ands r0, r1 - cmp r0, 0 - bne _0803CF8C -_0803CF7C: - cmp r3, 0x22 - bne _0803CF98 - ldr r0, =gBattleWeather - ldrh r1, [r0] - movs r0, 0x60 - ands r0, r1 - cmp r0, 0 - beq _0803CF98 -_0803CF8C: - movs r3, 0x2 - b _0803CF9A - .pool -_0803CF98: - movs r3, 0x1 -_0803CF9A: - movs r0, 0x58 - mov r1, r10 - muls r1, r0 - adds r0, r1, 0 - ldr r2, =gBattleMons - adds r0, r2 - adds r0, 0x20 - ldrb r2, [r0] - cmp r2, 0x21 - bne _0803CFBA - ldr r0, =gBattleWeather - ldrh r1, [r0] - movs r0, 0x7 - ands r0, r1 - cmp r0, 0 - bne _0803CFCA -_0803CFBA: - cmp r2, 0x22 - bne _0803CFDA - ldr r0, =gBattleWeather - ldrh r1, [r0] - movs r0, 0x60 - ands r0, r1 - cmp r0, 0 - beq _0803CFDA -_0803CFCA: - movs r7, 0x2 - b _0803CFDC - .pool -_0803CFD8: - movs r3, 0x1 -_0803CFDA: - movs r7, 0x1 -_0803CFDC: - ldr r1, =gBattleMons - movs r0, 0x58 - mov r2, r9 - muls r2, r0 - adds r0, r2, 0 - adds r4, r0, r1 - ldrh r0, [r4, 0x6] - muls r3, r0 - ldr r2, =gStatStageRatios - movs r1, 0x1B - ldrsb r1, [r4, r1] - lsls r1, 1 - adds r0, r1, r2 - ldrb r0, [r0] - muls r0, r3 - adds r2, 0x1 - adds r1, r2 - ldrb r1, [r1] - bl __divsi3 - mov r8, r0 - ldrh r0, [r4, 0x2E] - cmp r0, 0xAF - bne _0803D02C - ldr r1, =gEnigmaBerries - mov r3, r9 - lsls r0, r3, 3 - subs r0, r3 - lsls r0, 2 - adds r0, r1 - ldrb r6, [r0, 0x7] - ldrb r5, [r0, 0x1A] - b _0803D040 - .pool -_0803D02C: - ldrh r0, [r4, 0x2E] - bl ItemId_GetHoldEffect - lsls r0, 24 - lsrs r6, r0, 24 - ldrh r0, [r4, 0x2E] - bl ItemId_GetHoldEffectParam - lsls r0, 24 - lsrs r5, r0, 24 -_0803D040: - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - ldr r1, =0x023f0102 - ands r0, r1 - cmp r0, 0 - bne _0803D074 - ldr r0, =0x00000869 - bl FlagGet - lsls r0, 24 - cmp r0, 0 - beq _0803D074 - mov r0, r9 - bl GetBankSide - lsls r0, 24 - cmp r0, 0 - bne _0803D074 - movs r0, 0x6E - mov r1, r8 - muls r1, r0 - adds r0, r1, 0 - movs r1, 0x64 - bl __udivsi3 - mov r8, r0 -_0803D074: - cmp r6, 0x18 - bne _0803D07E - mov r2, r8 - lsrs r2, 1 - mov r8, r2 -_0803D07E: - ldr r1, =gBattleMons - movs r0, 0x58 - mov r3, r9 - muls r3, r0 - adds r0, r3, 0 - adds r1, 0x4C - adds r0, r1 - ldr r0, [r0] - movs r1, 0x40 - ands r0, r1 - cmp r0, 0 - beq _0803D09C - mov r0, r8 - lsrs r0, 2 - mov r8, r0 -_0803D09C: - cmp r6, 0x1A - bne _0803D0B8 - ldr r0, =gRandomTurnNumber - ldrh r4, [r0] - lsls r0, r5, 16 - subs r0, r5 - movs r1, 0x64 - bl __divsi3 - cmp r4, r0 - bge _0803D0B8 - movs r1, 0x1 - negs r1, r1 - mov r8, r1 -_0803D0B8: - ldr r1, =gBattleMons - movs r0, 0x58 - mov r2, r10 - muls r2, r0 - adds r0, r2, 0 - adds r4, r0, r1 - ldrh r0, [r4, 0x6] - adds r3, r0, 0 - muls r3, r7 - ldr r2, =gStatStageRatios - movs r1, 0x1B - ldrsb r1, [r4, r1] - lsls r1, 1 - adds r0, r1, r2 - ldrb r0, [r0] - muls r0, r3 - adds r2, 0x1 - adds r1, r2 - ldrb r1, [r1] - bl __divsi3 - adds r7, r0, 0 - ldrh r0, [r4, 0x2E] - cmp r0, 0xAF - bne _0803D118 - ldr r1, =gEnigmaBerries - mov r3, r10 - lsls r0, r3, 3 - subs r0, r3 - lsls r0, 2 - adds r0, r1 - ldrb r6, [r0, 0x7] - ldrb r5, [r0, 0x1A] - b _0803D12C - .pool -_0803D118: - ldrh r0, [r4, 0x2E] - bl ItemId_GetHoldEffect - lsls r0, 24 - lsrs r6, r0, 24 - ldrh r0, [r4, 0x2E] - bl ItemId_GetHoldEffectParam - lsls r0, 24 - lsrs r5, r0, 24 -_0803D12C: - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - ldr r1, =0x023f0102 - ands r0, r1 - cmp r0, 0 - bne _0803D15C - ldr r0, =0x00000869 - bl FlagGet - lsls r0, 24 - cmp r0, 0 - beq _0803D15C - mov r0, r10 - bl GetBankSide - lsls r0, 24 - cmp r0, 0 - bne _0803D15C - movs r0, 0x6E - muls r0, r7 - movs r1, 0x64 - bl __udivsi3 - adds r7, r0, 0 -_0803D15C: - cmp r6, 0x18 - bne _0803D162 - lsrs r7, 1 -_0803D162: - ldr r2, =gBattleMons - movs r0, 0x58 - mov r1, r10 - muls r1, r0 - adds r0, r1, 0 - adds r1, r2, 0 - adds r1, 0x4C - adds r0, r1 - ldr r0, [r0] - movs r1, 0x40 - ands r0, r1 - cmp r0, 0 - beq _0803D17E - lsrs r7, 2 -_0803D17E: - cmp r6, 0x1A - bne _0803D198 - ldr r0, =gRandomTurnNumber - ldrh r4, [r0] - lsls r0, r5, 16 - subs r0, r5 - movs r1, 0x64 - bl __divsi3 - cmp r4, r0 - bge _0803D198 - movs r7, 0x1 - negs r7, r7 -_0803D198: - ldr r2, [sp, 0x4] - cmp r2, 0 - beq _0803D1B8 - movs r3, 0 - b _0803D254 - .pool -_0803D1B8: - ldr r0, =gActionForBanks - mov r3, r9 - adds r1, r3, r0 - ldrb r1, [r1] - adds r2, r0, 0 - cmp r1, 0 - bne _0803D208 - ldr r0, =gProtectStructs - lsls r1, r3, 4 - adds r1, r0 - ldrb r0, [r1] - lsls r0, 29 - cmp r0, 0 - bge _0803D1E0 - movs r3, 0xA5 - b _0803D20A - .pool -_0803D1E0: - ldr r0, =gBattleStruct - ldr r0, [r0] - add r0, r9 - adds r0, 0x80 - ldrb r0, [r0] - lsls r0, 1 - movs r1, 0x58 - mov r3, r9 - muls r3, r1 - adds r1, r3, 0 - adds r0, r1 - ldr r1, =gBattleMons - adds r1, 0xC - adds r0, r1 - ldrh r3, [r0] - b _0803D20A - .pool -_0803D208: - movs r3, 0 -_0803D20A: - mov r1, r10 - adds r0, r1, r2 - ldrb r0, [r0] - cmp r0, 0 - bne _0803D254 - ldr r0, =gProtectStructs - lsls r1, 4 - adds r1, r0 - ldrb r0, [r1] - lsls r0, 29 - cmp r0, 0 - bge _0803D22C - movs r2, 0xA5 - b _0803D256 - .pool -_0803D22C: - ldr r0, =gBattleStruct - ldr r0, [r0] - add r0, r10 - adds r0, 0x80 - ldrb r0, [r0] - lsls r0, 1 - movs r1, 0x58 - mov r2, r10 - muls r2, r1 - adds r1, r2, 0 - adds r0, r1 - ldr r1, =gBattleMons - adds r1, 0xC - adds r0, r1 - ldrh r2, [r0] - b _0803D256 - .pool -_0803D254: - movs r2, 0 -_0803D256: - ldr r4, =gBattleMoves - lsls r0, r3, 1 - adds r0, r3 - lsls r0, 2 - adds r0, r4 - movs r1, 0x7 - ldrsb r1, [r0, r1] - lsls r3, r2, 1 - cmp r1, 0 - bne _0803D27A - adds r0, r3, r2 - lsls r0, 2 - adds r0, r4 - ldrb r0, [r0, 0x7] - lsls r0, 24 - asrs r0, 24 - cmp r0, 0 - beq _0803D2B8 -_0803D27A: - adds r0, r3, r2 - lsls r0, 2 - adds r0, r4 - ldrb r0, [r0, 0x7] - lsls r0, 24 - asrs r0, 24 - cmp r1, r0 - bne _0803D2AE - cmp r8, r7 - bne _0803D2A4 - bl Random - movs r1, 0x1 - ands r1, r0 - cmp r1, 0 - beq _0803D2A4 - movs r3, 0x2 - b _0803D2D4 - .pool -_0803D2A4: - cmp r8, r7 - bcs _0803D2D6 - movs r0, 0x1 - str r0, [sp, 0x8] - b _0803D2D6 -_0803D2AE: - cmp r1, r0 - bge _0803D2D6 - movs r1, 0x1 - str r1, [sp, 0x8] - b _0803D2D6 -_0803D2B8: - cmp r8, r7 - bne _0803D2CE - bl Random - movs r1, 0x1 - ands r1, r0 - cmp r1, 0 - beq _0803D2CE - movs r2, 0x2 - str r2, [sp, 0x8] - b _0803D2D6 -_0803D2CE: - cmp r8, r7 - bcs _0803D2D6 - movs r3, 0x1 -_0803D2D4: - str r3, [sp, 0x8] -_0803D2D6: - ldr r0, [sp, 0x8] - add sp, 0xC - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r1} - bx r1 - thumb_func_end GetWhoStrikesFirst - - thumb_func_start sub_803D2E8 -sub_803D2E8: @ 803D2E8 - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - movs r3, 0 - ldr r0, =gBattleTypeFlags - ldr r1, [r0] - movs r0, 0x80 - ands r0, r1 - cmp r0, 0 - beq _0803D354 - ldr r0, =gActiveBank - strb r3, [r0] - ldr r4, =gNoOfAllBanks - mov r8, r0 - ldrb r0, [r4] - cmp r3, r0 - bcc _0803D310 - b _0803D54A -_0803D310: - ldr r7, =gUnknown_0202407A - ldr r6, =gActionForBanks - mov r2, r8 - ldr r5, =gTurnOrder -_0803D318: - adds r1, r3, r7 - ldrb r0, [r2] - adds r0, r6 - ldrb r0, [r0] - strb r0, [r1] - adds r1, r3, r5 - ldrb r0, [r2] - strb r0, [r1] - adds r3, 0x1 - ldrb r0, [r2] - adds r0, 0x1 - strb r0, [r2] - lsls r0, 24 - lsrs r0, 24 - ldrb r1, [r4] - cmp r0, r1 - bcc _0803D318 - b _0803D54A - .pool -_0803D354: - movs r2, 0x2 - ands r1, r2 - cmp r1, 0 - beq _0803D3A4 - ldr r0, =gActiveBank - strb r3, [r0] - ldr r1, =gNoOfAllBanks - mov r8, r0 - adds r2, r1, 0 - ldrb r2, [r2] - cmp r3, r2 - bcs _0803D3C0 - ldr r0, =gActionForBanks - ldrb r1, [r0] - adds r4, r0, 0 - cmp r1, 0x3 - beq _0803D3BE -_0803D376: - mov r7, r8 - ldrb r0, [r7] - adds r0, 0x1 - strb r0, [r7] - lsls r0, 24 - lsrs r0, 24 - ldr r1, =gNoOfAllBanks - ldrb r1, [r1] - cmp r0, r1 - bcs _0803D3C0 - ldrb r0, [r7] - adds r0, r4 - ldrb r0, [r0] - cmp r0, 0x3 - bne _0803D376 - b _0803D3BE - .pool -_0803D3A4: - ldr r1, =gActionForBanks - ldrb r0, [r1] - ldr r4, =gActiveBank - mov r8, r4 - cmp r0, 0x3 - bne _0803D3B4 - strb r3, [r4] - movs r3, 0x5 -_0803D3B4: - ldrb r0, [r1, 0x2] - cmp r0, 0x3 - bne _0803D3C0 - mov r7, r8 - strb r2, [r7] -_0803D3BE: - movs r3, 0x5 -_0803D3C0: - cmp r3, 0x5 - bne _0803D448 - ldr r6, =gUnknown_0202407A - ldr r1, =gActionForBanks - mov r2, r8 - ldrb r0, [r2] - adds r0, r1 - ldrb r0, [r0] - strb r0, [r6] - ldr r2, =gTurnOrder - mov r3, r8 - ldrb r0, [r3] - strb r0, [r2] - movs r3, 0x1 - movs r5, 0 - adds r4, r1, 0 - ldr r7, =gBattleMainFunc - mov r10, r7 - ldr r0, =bc_80154A0 - mov r12, r0 - ldr r1, =gBattleStruct - mov r9, r1 - ldr r7, =gNoOfAllBanks - ldrb r7, [r7] - cmp r5, r7 - bge _0803D41A - adds r7, r6, 0 - adds r6, r4, 0 - adds r4, r2, 0 - ldr r2, =gNoOfAllBanks -_0803D3FC: - mov r0, r8 - ldrb r0, [r0] - cmp r5, r0 - beq _0803D412 - adds r1, r3, r7 - adds r0, r5, r6 - ldrb r0, [r0] - strb r0, [r1] - adds r0, r3, r4 - strb r5, [r0] - adds r3, 0x1 -_0803D412: - adds r5, 0x1 - ldrb r1, [r2] - cmp r5, r1 - blt _0803D3FC -_0803D41A: - mov r2, r12 - mov r3, r10 - str r2, [r3] - mov r4, r9 - ldr r0, [r4] - b _0803D554 - .pool -_0803D448: - movs r0, 0 - mov r7, r8 - strb r0, [r7] - ldr r1, =gNoOfAllBanks - ldrb r0, [r1] - cmp r0, 0 - beq _0803D48E - ldr r6, =gActionForBanks - mov r2, r8 - ldr r5, =gUnknown_0202407A - ldr r4, =gTurnOrder -_0803D45E: - ldrb r0, [r2] - adds r0, r6 - ldrb r1, [r0] - subs r0, r1, 0x1 - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x1 - bhi _0803D47C - adds r0, r3, r5 - strb r1, [r0] - adds r1, r3, r4 - mov r7, r8 - ldrb r0, [r7] - strb r0, [r1] - adds r3, 0x1 -_0803D47C: - ldrb r0, [r2] - adds r0, 0x1 - strb r0, [r2] - lsls r0, 24 - lsrs r0, 24 - ldr r1, =gNoOfAllBanks - ldrb r1, [r1] - cmp r0, r1 - bcc _0803D45E -_0803D48E: - movs r0, 0 - mov r2, r8 - strb r0, [r2] - ldr r4, =gNoOfAllBanks - ldrb r0, [r4] - cmp r0, 0 - beq _0803D4D2 - ldr r6, =gActionForBanks - ldr r5, =gUnknown_0202407A - ldr r4, =gTurnOrder -_0803D4A2: - ldrb r0, [r2] - adds r0, r6 - ldrb r1, [r0] - subs r0, r1, 0x1 - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x1 - bls _0803D4C0 - adds r0, r3, r5 - strb r1, [r0] - adds r1, r3, r4 - mov r7, r8 - ldrb r0, [r7] - strb r0, [r1] - adds r3, 0x1 -_0803D4C0: - ldrb r0, [r2] - adds r0, 0x1 - strb r0, [r2] - lsls r0, 24 - lsrs r0, 24 - ldr r1, =gNoOfAllBanks - ldrb r1, [r1] - cmp r0, r1 - bcc _0803D4A2 -_0803D4D2: - movs r5, 0 - b _0803D540 - .pool -_0803D4E8: - adds r4, r5, 0x1 - adds r7, r4, 0 - ldrb r1, [r1] - cmp r7, r1 - bge _0803D53E - ldr r6, =gUnknown_0202407A - lsls r2, r5, 24 - mov r8, r2 -_0803D4F8: - ldr r0, =gTurnOrder - adds r1, r5, r0 - ldrb r3, [r1] - adds r0, r4, r0 - ldrb r1, [r0] - adds r0, r5, r6 - ldrb r2, [r0] - cmp r2, 0x1 - beq _0803D534 - adds r0, r4, r6 - ldrb r0, [r0] - cmp r0, 0x1 - beq _0803D534 - cmp r2, 0x2 - beq _0803D534 - cmp r0, 0x2 - beq _0803D534 - adds r0, r3, 0 - movs r2, 0 - bl GetWhoStrikesFirst - lsls r0, 24 - cmp r0, 0 - beq _0803D534 - lsls r1, r4, 24 - lsrs r1, 24 - mov r3, r8 - lsrs r0, r3, 24 - bl sub_803CEDC -_0803D534: - adds r4, 0x1 - ldr r0, =gNoOfAllBanks - ldrb r0, [r0] - cmp r4, r0 - blt _0803D4F8 -_0803D53E: - adds r5, r7, 0 -_0803D540: - ldr r1, =gNoOfAllBanks - ldrb r0, [r1] - subs r0, 0x1 - cmp r5, r0 - blt _0803D4E8 -_0803D54A: - ldr r1, =gBattleMainFunc - ldr r0, =bc_80154A0 - str r0, [r1] - ldr r0, =gBattleStruct - ldr r0, [r0] -_0803D554: - adds r0, 0x48 - movs r1, 0 - strb r1, [r0] - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end sub_803D2E8 thumb_func_start TurnValuesCleanUp TurnValuesCleanUp: @ 803D580 @@ -1215,7 +270,7 @@ _0803D7AE: movs r0, 0 strb r0, [r1] ldr r1, =gFightStateTracker - ldr r0, =gUnknown_0202407A + ldr r0, =gActionsByTurnOrder movs r3, 0 ldrb r0, [r0] strb r0, [r1] @@ -2100,7 +1155,7 @@ sub_803E0B8: @ 803E0B8 movs r0, 0x4 str r0, [sp] ldr r6, =gBankAttacker - ldr r1, =gTurnOrder + ldr r1, =gBanksByTurnOrder ldr r0, =gCurrentMoveTurn ldrb r0, [r0] adds r0, r1 @@ -2641,7 +1696,7 @@ _0803E5C4: b _0803E74E _0803E5E2: ldr r4, =gActiveBank - ldr r0, =gTurnOrder + ldr r0, =gBanksByTurnOrder ldr r3, [sp] adds r0, r3, r0 ldrb r0, [r0] @@ -2908,7 +1963,7 @@ _0803E83C: bs2_8016374: @ 803E868 push {r4,lr} ldr r3, =gBankAttacker - ldr r1, =gTurnOrder + ldr r1, =gBanksByTurnOrder ldr r0, =gCurrentMoveTurn ldrb r0, [r0] adds r0, r1 @@ -2973,7 +2028,7 @@ sub_803E90C: @ 803E90C push {r5-r7} ldr r4, =gBankAttacker ldr r2, =gBankTarget - ldr r1, =gTurnOrder + ldr r1, =gBanksByTurnOrder ldr r0, =gCurrentMoveTurn ldrb r0, [r0] adds r0, r1 @@ -3534,7 +2589,7 @@ _0803EE24: sub_803EE48: @ 803EE48 push {r4-r6,lr} ldr r4, =gBankAttacker - ldr r1, =gTurnOrder + ldr r1, =gBanksByTurnOrder ldr r5, =gCurrentMoveTurn ldrb r0, [r5] adds r0, r1 @@ -3672,7 +2727,7 @@ _0803EF98: thumb_func_start sub_803EFA8 sub_803EFA8: @ 803EFA8 ldr r2, =gBankAttacker - ldr r1, =gTurnOrder + ldr r1, =gBanksByTurnOrder ldr r0, =gCurrentMoveTurn ldrb r0, [r0] adds r0, r1 @@ -3697,7 +2752,7 @@ sub_803EFA8: @ 803EFA8 thumb_func_start bs5_8016AC0 bs5_8016AC0: @ 803EFF0 ldr r2, =gBankAttacker - ldr r1, =gTurnOrder + ldr r1, =gBanksByTurnOrder ldr r0, =gCurrentMoveTurn ldrb r0, [r0] adds r0, r1 @@ -3730,7 +2785,7 @@ bs5_8016AC0: @ 803EFF0 sub_803F050: @ 803F050 push {r4-r6,lr} ldr r3, =gBankAttacker - ldr r1, =gTurnOrder + ldr r1, =gBanksByTurnOrder ldr r0, =gCurrentMoveTurn ldrb r0, [r0] adds r0, r1 @@ -3817,7 +2872,7 @@ _0803F100: sub_803F120: @ 803F120 push {r4,lr} ldr r2, =gBankAttacker - ldr r1, =gTurnOrder + ldr r1, =gBanksByTurnOrder ldr r0, =gCurrentMoveTurn ldrb r0, [r0] adds r0, r1 @@ -3903,7 +2958,7 @@ _0803F1CA: bs8_exit_by_flight: @ 803F1F0 push {r4,lr} ldr r2, =gBankAttacker - ldr r1, =gTurnOrder + ldr r1, =gBanksByTurnOrder ldr r4, =gCurrentMoveTurn ldrb r0, [r4] adds r0, r1 @@ -3926,7 +2981,7 @@ bs8_exit_by_flight: @ 803F1F0 thumb_func_start bs9_8016C9C bs9_8016C9C: @ 803F22C ldr r3, =gBankAttacker - ldr r1, =gTurnOrder + ldr r1, =gBanksByTurnOrder ldr r0, =gCurrentMoveTurn ldrb r0, [r0] adds r0, r1 @@ -3958,7 +3013,7 @@ bs9_8016C9C: @ 803F22C ldr r1, =gFightStateTracker movs r0, 0xA strb r0, [r1] - ldr r1, =gUnknown_0202407A + ldr r1, =gActionsByTurnOrder movs r0, 0xC strb r0, [r1, 0x1] bx lr @@ -3993,7 +3048,7 @@ bsD_proceed: @ 803F2CC adds r0, 0x1 strb r0, [r1] ldr r3, =gFightStateTracker - ldr r2, =gUnknown_0202407A + ldr r2, =gActionsByTurnOrder ldrb r0, [r1] adds r0, r2 ldrb r0, [r0] @@ -4010,7 +3065,7 @@ bsD_proceed: @ 803F2CC thumb_func_start bsC_8016D70 bsC_8016D70: @ 803F300 push {r4-r6,lr} - ldr r1, =gTurnOrder + ldr r1, =gBanksByTurnOrder ldr r2, =gCurrentMoveTurn ldrb r0, [r2] adds r0, r1 @@ -4025,7 +3080,7 @@ bsC_8016D70: @ 803F300 adds r0, 0x1 strb r0, [r2] ldr r3, =gFightStateTracker - ldr r1, =gUnknown_0202407A + ldr r1, =gActionsByTurnOrder ldrb r0, [r2] adds r0, r1 ldrb r0, [r0] diff --git a/include/battle.h b/include/battle.h index 50d2389ac..7c8d89e57 100644 --- a/include/battle.h +++ b/include/battle.h @@ -161,6 +161,20 @@ #define SIDE_STATUS_MIST (1 << 8) #define SIDE_STATUS_SPIKES_DAMAGED (1 << 9) +#define ACTION_USE_MOVE 0 +#define ACTION_USE_ITEM 1 +#define ACTION_SWITCH 2 +#define ACTION_RUN 3 +#define ACTION_WATCHES_CAREFULLY 4 +#define ACTION_SAFARI_ZONE_BALL 5 +#define ACTION_POKEBLOCK_CASE 6 +#define ACTION_GO_NEAR 7 +#define ACTION_SAFARI_ZONE_RUN 8 +#define ACTION_9 9 +#define ACTION_CANCEL_PARTNER 12 +#define ACTION_NOTHING_FAINTED 13 +#define ACTION_INIT_VALUE 0xFF + #define ABILITYEFFECT_ON_SWITCHIN 0x0 #define ABILITYEFFECT_ENDTURN 0x1 #define ABILITYEFFECT_MOVES_BLOCK 0x2 @@ -232,6 +246,7 @@ #define SPRITES_INIT_STATE1 0x1 // shares the Id as well #define SPRITES_INIT_STATE2 0x2 #define MOVE_EFFECT_BYTE 0x3 +#define ACTIONS_CONFIRMED_COUNT 0x4 #define MULTISTRING_CHOOSER 0x5 #define MSG_DISPLAY 0x7 #define BATTLE_COMMUNICATION_ENTRIES_COUNT 0x8 @@ -601,7 +616,7 @@ struct BattleStruct u16 expValue; u8 field_52; u8 sentInPokes; - u8 field_54[4]; + bool8 selectionScriptFinished[BATTLE_BANKS_COUNT]; u8 field_58[4]; u8 field_5C[4]; u8 field_60[4][3]; @@ -615,8 +630,8 @@ struct BattleStruct u8 field_7D; u8 field_7E; u8 formToChangeInto; - u8 chosenMovesIds[4]; - u8 field_84[4]; + u8 chosenMovesIds[BATTLE_BANKS_COUNT]; + u8 stateIdAfterSelScript[BATTLE_BANKS_COUNT]; u8 field_88; u8 field_89; u8 field_8A; @@ -890,8 +905,8 @@ bool8 CanRunFromBattle(u8 bank); bool8 IsRunningFromBattleImpossible(void); void PressurePPLoseOnUsingPerishSong(u8 bankAtk); void PressurePPLoseOnUsingImprision(u8 bankAtk); -u8 GetWhoStrikesFirst(u8 bankAtk, u8 bankDef, bool8 ignoreChosenMoves); -void sub_803CEDC(u8, u8); +u8 GetWhoStrikesFirst(u8 bank1, u8 bank2, bool8 ignoreChosenMoves); +void SwapTurnOrder(u8, u8); void BattleTurnPassed(void); // battle_3 diff --git a/include/pokemon.h b/include/pokemon.h index b3155881e..5d97c1666 100644 --- a/include/pokemon.h +++ b/include/pokemon.h @@ -439,7 +439,7 @@ struct BattleMove u8 pp; u8 secondaryEffectChance; u8 target; - u8 priority; + s8 priority; u8 flags; }; diff --git a/src/battle_2.c b/src/battle_2.c index a18e1c698..04907d0c0 100644 --- a/src/battle_2.c +++ b/src/battle_2.c @@ -36,6 +36,7 @@ #include "battle_controllers.h" #include "pokedex.h" #include "abilities.h" +#include "moves.h" struct UnknownStruct6 { @@ -127,12 +128,16 @@ extern u16 gCurrentMove; extern u8 gActionSelectionCursor[BATTLE_BANKS_COUNT]; extern u8 gMoveSelectionCursor[BATTLE_BANKS_COUNT]; extern struct BattlePokemon gBattleMons[BATTLE_BANKS_COUNT]; -extern u8 gTurnOrder[BATTLE_BANKS_COUNT]; +extern u8 gBanksByTurnOrder[BATTLE_BANKS_COUNT]; extern u8 gActionForBanks[BATTLE_BANKS_COUNT]; extern u16 gChosenMovesByBanks[BATTLE_BANKS_COUNT]; extern u8 gFightStateTracker; extern u8 gLastUsedAbility; extern u16 gLastUsedItem; +extern u8 gUnknown_0203CF00[]; +extern const u8* gBattlescriptPtrsForSelection[BATTLE_BANKS_COUNT]; +extern const u8* gBattlescriptCurrInstr; +extern u32 gBattlePalaceMoveSelectionRngValue; extern const u8 gSpeciesNames[][POKEMON_NAME_LENGTH + 1]; extern const struct BattleMove gBattleMoves[]; @@ -153,6 +158,11 @@ extern const u8 gText_EmptyString3[]; // battlescripts extern const u8 gUnknown_082DB8BE[]; extern const u8 gUnknown_082DB881[]; +extern const u8 BattleScript_ActionSelectionItemsCantBeUsed[]; +extern const u8 gUnknown_082DAB11[]; +extern const u8 gUnknown_082DB9BA[]; +extern const u8 gUnknown_082DAAFE[]; +extern const u8 gUnknown_082DAB0B[]; extern void HandleLinkBattleSetup(void); // rom_3 extern void SetUpBattleVarsAndBirchZigzagoon(void); // rom_3 @@ -215,11 +225,12 @@ static void BattleIntroOpponent2SendsOutMonAnimation(void); static void BattleIntroRecordMonsToDex(void); static void BattleIntroPlayer1SendsOutMonAnimation(void); static void TryDoEventsBeforeFirstTurn(void); -void sub_803BE74(void); +void HandleTurnActionSelectionState(void); void bc_bs_exec(void); -void sub_803D2E8(void); +static void SetActionsAndBanksTurnOrder(void); void sub_803CDF8(void); bool8 sub_803CDB8(void); +void bc_80154A0(void); void CB2_InitBattle(void) { @@ -3509,13 +3520,13 @@ static void TryDoEventsBeforeFirstTurn(void) if (gBattleStruct->switchInAbilitiesCounter == 0) { for (i = 0; i < gNoOfAllBanks; i++) - gTurnOrder[i] = i; + gBanksByTurnOrder[i] = i; for (i = 0; i < gNoOfAllBanks - 1; i++) { for (j = i + 1; j < gNoOfAllBanks; j++) { - if (GetWhoStrikesFirst(gTurnOrder[i], gTurnOrder[j], TRUE) != 0) - sub_803CEDC(i, j); + if (GetWhoStrikesFirst(gBanksByTurnOrder[i], gBanksByTurnOrder[j], TRUE) != 0) + SwapTurnOrder(i, j); } } } @@ -3528,7 +3539,7 @@ static void TryDoEventsBeforeFirstTurn(void) // check all switch in abilities happening from the fastest mon to slowest while (gBattleStruct->switchInAbilitiesCounter < gNoOfAllBanks) { - if (AbilityBattleEffects(ABILITYEFFECT_ON_SWITCHIN, gTurnOrder[gBattleStruct->switchInAbilitiesCounter], 0, 0, 0) != 0) + if (AbilityBattleEffects(ABILITYEFFECT_ON_SWITCHIN, gBanksByTurnOrder[gBattleStruct->switchInAbilitiesCounter], 0, 0, 0) != 0) effect++; gBattleStruct->switchInAbilitiesCounter++; @@ -3543,7 +3554,7 @@ static void TryDoEventsBeforeFirstTurn(void) // check all switch in items having effect from the fastest mon to slowest while (gBattleStruct->switchInItemsCounter < gNoOfAllBanks) { - if (ItemBattleEffects(ITEMEFFECT_ON_SWITCH_IN, gTurnOrder[gBattleStruct->switchInItemsCounter], 0) != 0) + if (ItemBattleEffects(ITEMEFFECT_ON_SWITCH_IN, gBanksByTurnOrder[gBattleStruct->switchInItemsCounter], 0) != 0) effect++; gBattleStruct->switchInItemsCounter++; @@ -3554,14 +3565,14 @@ static void TryDoEventsBeforeFirstTurn(void) for (i = 0; i < BATTLE_BANKS_COUNT; i++) { *(gBattleStruct->field_5C + i) = 6; - gActionForBanks[i] = 0xFF; - gChosenMovesByBanks[i] = 0; + gActionForBanks[i] = ACTION_INIT_VALUE; + gChosenMovesByBanks[i] = MOVE_NONE; } TurnValuesCleanUp(0); SpecialStatusesClear(); *(&gBattleStruct->field_91) = gAbsentBankFlags; sub_814F9EC(gText_EmptyString3, 0); - gBattleMainFunc = sub_803BE74; + gBattleMainFunc = HandleTurnActionSelectionState; ResetSentPokesToOpponentValue(); for (i = 0; i < BATTLE_COMMUNICATION_ENTRIES_COUNT; i++) @@ -3659,8 +3670,8 @@ void BattleTurnPassed(void) for (i = 0; i < gNoOfAllBanks; i++) { - gActionForBanks[i] = 0xFF; - gChosenMovesByBanks[i] = 0; + gActionForBanks[i] = ACTION_INIT_VALUE; + gChosenMovesByBanks[i] = MOVE_NONE; } for (i = 0; i < 4; i++) @@ -3668,7 +3679,7 @@ void BattleTurnPassed(void) *(&gBattleStruct->field_91) = gAbsentBankFlags; sub_814F9EC(gText_EmptyString3, 0); - gBattleMainFunc = sub_803BE74; + gBattleMainFunc = HandleTurnActionSelectionState; gRandomTurnNumber = Random(); if (gBattleTypeFlags & BATTLE_TYPE_PALACE) @@ -3743,8 +3754,6 @@ u8 IsRunningFromBattleImpossible(void) return 0; } -extern u8 gUnknown_0203CF00[]; - void sub_803BDA0(u8 bank) { s32 i; @@ -3777,32 +3786,31 @@ void sub_803BDA0(u8 bank) } } -extern const u8* gBattlescriptPtrsForSelection[BATTLE_BANKS_COUNT]; -extern const u8* gBattlescriptCurrInstr; +#define STATE_TURN_START_RECORD 0 +#define STATE_BEFORE_ACTION_CHOSEN 1 +#define STATE_WAIT_ACTION_CHOSEN 2 +#define STATE_WAIT_ACTION_CASE_CHOSEN 3 +#define STATE_WAIT_ACTION_CONFIRMED_STANDBY 4 +#define STATE_WAIT_ACTION_CONFIRMED 5 +#define STATE_SELECTION_SCRIPT 6 +#define STATE_WAIT_SET_BEFORE_ACTION 7 +#define STATE_SELECTION_SCRIPT_MAY_RUN 8 -extern const u8 BattleScript_ActionSelectionItemsCantBeUsed[]; -extern const u8 gUnknown_082DAB11[]; -extern const u8 gUnknown_082DB9BA[]; -extern const u8 gUnknown_082DAAFE[]; -extern const u8 gUnknown_082DAB0B[]; - -extern u32 gBattlePalaceMoveSelectionRngValue; - -void sub_803BE74(void) +void HandleTurnActionSelectionState(void) { s32 i; - gBattleCommunication[4] = 0; + gBattleCommunication[ACTIONS_CONFIRMED_COUNT] = 0; for (gActiveBank = 0; gActiveBank < gNoOfAllBanks; gActiveBank++) { u8 identity = GetBankIdentity(gActiveBank); switch (gBattleCommunication[gActiveBank]) { - case 0: + case STATE_TURN_START_RECORD: // recorded battle related on start of every turn sub_8185FD0(); - gBattleCommunication[gActiveBank] = 1; + gBattleCommunication[gActiveBank] = STATE_BEFORE_ACTION_CHOSEN; break; - case 1: + case STATE_BEFORE_ACTION_CHOSEN: // choose an action *(gBattleStruct->field_5C + gActiveBank) = 6; if (gBattleTypeFlags & BATTLE_TYPE_MULTI || !(identity & BIT_MON) @@ -3811,19 +3819,19 @@ void sub_803BE74(void) { if (gBattleStruct->field_91 & gBitTable[gActiveBank]) { - gActionForBanks[gActiveBank] = 13; + gActionForBanks[gActiveBank] = ACTION_NOTHING_FAINTED; if (!(gBattleTypeFlags & BATTLE_TYPE_MULTI)) - gBattleCommunication[gActiveBank] = 5; + gBattleCommunication[gActiveBank] = STATE_WAIT_ACTION_CONFIRMED; else - gBattleCommunication[gActiveBank] = 4; + gBattleCommunication[gActiveBank] = STATE_WAIT_ACTION_CONFIRMED_STANDBY; } else { if (gBattleMons[gActiveBank].status2 & STATUS2_MULTIPLETURNS || gBattleMons[gActiveBank].status2 & STATUS2_RECHARGE) { - gActionForBanks[gActiveBank] = 0; - gBattleCommunication[gActiveBank] = 4; + gActionForBanks[gActiveBank] = ACTION_USE_MOVE; + gBattleCommunication[gActiveBank] = STATE_WAIT_ACTION_CONFIRMED_STANDBY; } else { @@ -3834,7 +3842,7 @@ void sub_803BE74(void) } } break; - case 2: + case STATE_WAIT_ACTION_CHOSEN: // try to perform an action if (!(gBattleExecBuffer & ((gBitTable[gActiveBank]) | (0xF0000000) | (gBitTable[gActiveBank] << 4) | (gBitTable[gActiveBank] << 8) | (gBitTable[gActiveBank] << 0xC)))) { RecordedBattle_SetBankAction(gActiveBank, gBattleBufferB[gActiveBank][1]); @@ -3842,12 +3850,12 @@ void sub_803BE74(void) switch (gBattleBufferB[gActiveBank][1]) { - case 0: + case ACTION_USE_MOVE: if (AreAllMovesUnusable()) { - gBattleCommunication[gActiveBank] = 6; - *(gBattleStruct->field_54 + gActiveBank) = 0; - *(gBattleStruct->field_84 + gActiveBank) = 4; + gBattleCommunication[gActiveBank] = STATE_SELECTION_SCRIPT; + *(gBattleStruct->selectionScriptFinished + gActiveBank) = FALSE; + *(gBattleStruct->stateIdAfterSelScript + gActiveBank) = STATE_WAIT_ACTION_CONFIRMED_STANDBY; *(gBattleStruct->moveTarget + gActiveBank) = gBattleBufferB[gActiveBank][3]; return; } @@ -3855,7 +3863,7 @@ void sub_803BE74(void) { gChosenMovesByBanks[gActiveBank] = gDisableStructs[gActiveBank].encoredMove; *(gBattleStruct->chosenMovesIds + gActiveBank) = gDisableStructs[gActiveBank].encoredMovePos; - gBattleCommunication[gActiveBank] = 4; + gBattleCommunication[gActiveBank] = STATE_WAIT_ACTION_CONFIRMED_STANDBY; return; } else @@ -3880,7 +3888,7 @@ void sub_803BE74(void) MarkBufferBankForExecution(gActiveBank); } break; - case 1: + case ACTION_USE_ITEM: if (gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_FRONTIER_NO_PYRAMID | BATTLE_TYPE_EREADER_TRAINER @@ -3888,9 +3896,9 @@ void sub_803BE74(void) { RecordedBattle_ClearBankAction(gActiveBank, 1); gBattlescriptPtrsForSelection[gActiveBank] = BattleScript_ActionSelectionItemsCantBeUsed; - gBattleCommunication[gActiveBank] = 6; - *(gBattleStruct->field_54 + gActiveBank) = 0; - *(gBattleStruct->field_84 + gActiveBank) = 1; + gBattleCommunication[gActiveBank] = STATE_SELECTION_SCRIPT; + *(gBattleStruct->selectionScriptFinished + gActiveBank) = FALSE; + *(gBattleStruct->stateIdAfterSelScript + gActiveBank) = STATE_BEFORE_ACTION_CHOSEN; return; } else @@ -3899,7 +3907,7 @@ void sub_803BE74(void) MarkBufferBankForExecution(gActiveBank); } break; - case 2: + case ACTION_SWITCH: *(gBattleStruct->field_58 + gActiveBank) = gBattlePartyID[gActiveBank]; if (gBattleMons[gActiveBank].status2 & (STATUS2_WRAPPED | STATUS2_ESCAPE_PREVENTION) || gBattleTypeFlags & BATTLE_TYPE_ARENA @@ -3920,30 +3928,30 @@ void sub_803BE74(void) } else { - if (gActiveBank == 2 && gActionForBanks[0] == 2) + if (gActiveBank == 2 && gActionForBanks[0] == ACTION_SWITCH) EmitChoosePokemon(0, 0, *(gBattleStruct->field_5C + 0), ABILITY_NONE, gBattleStruct->field_60[gActiveBank]); - else if (gActiveBank == 3 && gActionForBanks[1] == 2) + else if (gActiveBank == 3 && gActionForBanks[1] == ACTION_SWITCH) EmitChoosePokemon(0, 0, *(gBattleStruct->field_5C + 1), ABILITY_NONE, gBattleStruct->field_60[gActiveBank]); else EmitChoosePokemon(0, 0, 6, ABILITY_NONE, gBattleStruct->field_60[gActiveBank]); } MarkBufferBankForExecution(gActiveBank); break; - case 5: + case ACTION_SAFARI_ZONE_BALL: if (IsPlayerPartyAndPokemonStorageFull()) { gBattlescriptPtrsForSelection[gActiveBank] = gUnknown_082DAB11; - gBattleCommunication[gActiveBank] = 6; - *(gBattleStruct->field_54 + gActiveBank) = 0; - *(gBattleStruct->field_84 + gActiveBank) = 1; + gBattleCommunication[gActiveBank] = STATE_SELECTION_SCRIPT; + *(gBattleStruct->selectionScriptFinished + gActiveBank) = FALSE; + *(gBattleStruct->stateIdAfterSelScript + gActiveBank) = STATE_BEFORE_ACTION_CHOSEN; return; } break; - case 6: + case ACTION_POKEBLOCK_CASE: EmitOpenBag(0, gBattleStruct->field_60[gActiveBank]); MarkBufferBankForExecution(gActiveBank); break; - case 12: + case ACTION_CANCEL_PARTNER: gBattleCommunication[gActiveBank] = 7; gBattleCommunication[GetBankByIdentity(GetBankIdentity(gActiveBank) ^ BIT_MON)] = 1; RecordedBattle_ClearBankAction(gActiveBank, 1); @@ -3954,22 +3962,22 @@ void sub_803BE74(void) MarkBufferBankForExecution(gActiveBank); return; } - else if (gActionForBanks[GetBankByIdentity(GetBankIdentity(gActiveBank) ^ BIT_MON)] == 2) + else if (gActionForBanks[GetBankByIdentity(GetBankIdentity(gActiveBank) ^ BIT_MON)] == ACTION_SWITCH) { RecordedBattle_ClearBankAction(GetBankByIdentity(GetBankIdentity(gActiveBank) ^ BIT_MON), 2); } - else if (gActionForBanks[GetBankByIdentity(GetBankIdentity(gActiveBank) ^ BIT_MON)] == 3) + else if (gActionForBanks[GetBankByIdentity(GetBankIdentity(gActiveBank) ^ BIT_MON)] == ACTION_RUN) { RecordedBattle_ClearBankAction(GetBankByIdentity(GetBankIdentity(gActiveBank) ^ BIT_MON), 1); } - else if (gActionForBanks[GetBankByIdentity(GetBankIdentity(gActiveBank) ^ BIT_MON)] == 0 + else if (gActionForBanks[GetBankByIdentity(GetBankIdentity(gActiveBank) ^ BIT_MON)] == ACTION_USE_MOVE && (gProtectStructs[GetBankByIdentity(GetBankIdentity(gActiveBank) ^ BIT_MON)].onlyStruggle || gDisableStructs[GetBankByIdentity(GetBankIdentity(gActiveBank) ^ BIT_MON)].encoredMove)) { RecordedBattle_ClearBankAction(GetBankByIdentity(GetBankIdentity(gActiveBank) ^ BIT_MON), 1); } else if (gBattleTypeFlags & BATTLE_TYPE_PALACE - && gActionForBanks[GetBankByIdentity(GetBankIdentity(gActiveBank) ^ BIT_MON)] == 0) + && gActionForBanks[GetBankByIdentity(GetBankIdentity(gActiveBank) ^ BIT_MON)] == ACTION_USE_MOVE) { gRngValue = gBattlePalaceMoveSelectionRngValue; RecordedBattle_ClearBankAction(GetBankByIdentity(GetBankIdentity(gActiveBank) ^ BIT_MON), 1); @@ -3985,28 +3993,28 @@ void sub_803BE74(void) if (gBattleTypeFlags & BATTLE_TYPE_TRAINER && gBattleTypeFlags & (BATTLE_TYPE_FRONTIER | BATTLE_TYPE_x4000000) - && gBattleBufferB[gActiveBank][1] == 3) + && gBattleBufferB[gActiveBank][1] == ACTION_RUN) { gBattlescriptPtrsForSelection[gActiveBank] = gUnknown_082DB9BA; gBattleCommunication[gActiveBank] = 8; - *(gBattleStruct->field_54 + gActiveBank) = 0; - *(gBattleStruct->field_84 + gActiveBank) = 1; + *(gBattleStruct->selectionScriptFinished + gActiveBank) = FALSE; + *(gBattleStruct->stateIdAfterSelScript + gActiveBank) = STATE_BEFORE_ACTION_CHOSEN; return; } else if (gBattleTypeFlags & BATTLE_TYPE_TRAINER && !(gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_x2000000)) - && gBattleBufferB[gActiveBank][1] == 3) + && gBattleBufferB[gActiveBank][1] == ACTION_RUN) { BattleScriptExecute(gUnknown_082DAAFE); gBattleCommunication[gActiveBank] = 1; } else if (IsRunningFromBattleImpossible() != 0 - && gBattleBufferB[gActiveBank][1] == 3) + && gBattleBufferB[gActiveBank][1] == ACTION_RUN) { gBattlescriptPtrsForSelection[gActiveBank] = gUnknown_082DAB0B; - gBattleCommunication[gActiveBank] = 6; - *(gBattleStruct->field_54 + gActiveBank) = 0; - *(gBattleStruct->field_84 + gActiveBank) = 1; + gBattleCommunication[gActiveBank] = STATE_SELECTION_SCRIPT; + *(gBattleStruct->selectionScriptFinished + gActiveBank) = FALSE; + *(gBattleStruct->stateIdAfterSelScript + gActiveBank) = STATE_BEFORE_ACTION_CHOSEN; return; } else @@ -4015,12 +4023,12 @@ void sub_803BE74(void) } } break; - case 3: + case STATE_WAIT_ACTION_CASE_CHOSEN: if (!(gBattleExecBuffer & ((gBitTable[gActiveBank]) | (0xF0000000) | (gBitTable[gActiveBank] << 4) | (gBitTable[gActiveBank] << 8) | (gBitTable[gActiveBank] << 0xC)))) { switch (gActionForBanks[gActiveBank]) { - case 0: + case ACTION_USE_MOVE: switch (gBattleBufferB[gActiveBank][1]) { case 3: @@ -4033,7 +4041,7 @@ void sub_803BE74(void) gActionForBanks[gActiveBank] = gBattleBufferB[gActiveBank][1]; return; case 15: - gActionForBanks[gActiveBank] = 2; + gActionForBanks[gActiveBank] = ACTION_SWITCH; sub_803CDF8(); return; default: @@ -4046,10 +4054,10 @@ void sub_803BE74(void) else if (TrySetCantSelectMoveBattleScript()) { RecordedBattle_ClearBankAction(gActiveBank, 1); - gBattleCommunication[gActiveBank] = 6; - *(gBattleStruct->field_54 + gActiveBank) = 0; + gBattleCommunication[gActiveBank] = STATE_SELECTION_SCRIPT; + *(gBattleStruct->selectionScriptFinished + gActiveBank) = FALSE; gBattleBufferB[gActiveBank][1] = 0; - *(gBattleStruct->field_84 + gActiveBank) = 2; + *(gBattleStruct->stateIdAfterSelScript + gActiveBank) = STATE_WAIT_ACTION_CHOSEN; return; } else @@ -4067,7 +4075,7 @@ void sub_803BE74(void) break; } break; - case 1: + case ACTION_USE_ITEM: if ((gBattleBufferB[gActiveBank][1] | (gBattleBufferB[gActiveBank][2] << 8)) == 0) { gBattleCommunication[gActiveBank] = 1; @@ -4078,7 +4086,7 @@ void sub_803BE74(void) gBattleCommunication[gActiveBank]++; } break; - case 2: + case ACTION_SWITCH: if (gBattleBufferB[gActiveBank][1] == 6) { gBattleCommunication[gActiveBank] = 1; @@ -4090,40 +4098,40 @@ void sub_803BE74(void) gBattleCommunication[gActiveBank]++; } break; - case 3: + case ACTION_RUN: gHitMarker |= HITMARKER_x8000; gBattleCommunication[gActiveBank]++; break; - case 4: + case ACTION_WATCHES_CAREFULLY: gBattleCommunication[gActiveBank]++; break; - case 5: + case ACTION_SAFARI_ZONE_BALL: gBattleCommunication[gActiveBank]++; break; - case 6: + case ACTION_POKEBLOCK_CASE: if ((gBattleBufferB[gActiveBank][1] | (gBattleBufferB[gActiveBank][2] << 8)) != 0) { gBattleCommunication[gActiveBank]++; } else { - gBattleCommunication[gActiveBank] = 1; + gBattleCommunication[gActiveBank] = STATE_BEFORE_ACTION_CHOSEN; } break; - case 7: + case ACTION_GO_NEAR: gBattleCommunication[gActiveBank]++; break; - case 8: + case ACTION_SAFARI_ZONE_RUN: gHitMarker |= HITMARKER_x8000; gBattleCommunication[gActiveBank]++; break; - case 9: + case ACTION_9: gBattleCommunication[gActiveBank]++; break; } } break; - case 4: + case STATE_WAIT_ACTION_CONFIRMED_STANDBY: if (!(gBattleExecBuffer & ((gBitTable[gActiveBank]) | (0xF0000000) | (gBitTable[gActiveBank] << 4) | (gBitTable[gActiveBank] << 8) | (gBitTable[gActiveBank] << 0xC)))) { i = (sub_803CDB8() != 0); @@ -4142,16 +4150,16 @@ void sub_803BE74(void) gBattleCommunication[gActiveBank]++; } break; - case 5: + case STATE_WAIT_ACTION_CONFIRMED: if (!(gBattleExecBuffer & ((gBitTable[gActiveBank]) | (0xF0000000) | (gBitTable[gActiveBank] << 4) | (gBitTable[gActiveBank] << 8) | (gBitTable[gActiveBank] << 0xC)))) { - gBattleCommunication[4]++; + gBattleCommunication[ACTIONS_CONFIRMED_COUNT]++; } break; - case 6: - if (*(gBattleStruct->field_54 + gActiveBank) != 0) + case STATE_SELECTION_SCRIPT: + if (*(gBattleStruct->selectionScriptFinished + gActiveBank)) { - gBattleCommunication[gActiveBank] = *(gBattleStruct->field_84 + gActiveBank); + gBattleCommunication[gActiveBank] = *(gBattleStruct->stateIdAfterSelScript + gActiveBank); } else { @@ -4164,25 +4172,25 @@ void sub_803BE74(void) gBattlescriptPtrsForSelection[gActiveBank] = gBattlescriptCurrInstr; } break; - case 7: + case STATE_WAIT_SET_BEFORE_ACTION: if (!(gBattleExecBuffer & ((gBitTable[gActiveBank]) | (0xF0000000) | (gBitTable[gActiveBank] << 4) | (gBitTable[gActiveBank] << 8) | (gBitTable[gActiveBank] << 0xC)))) { gBattleCommunication[gActiveBank] = 1; } break; - case 8: - if (*(gBattleStruct->field_54 + gActiveBank) != 0) + case STATE_SELECTION_SCRIPT_MAY_RUN: + if (*(gBattleStruct->selectionScriptFinished + gActiveBank)) { if (gBattleBufferB[gActiveBank][1] == 13) { gHitMarker |= HITMARKER_x8000; - gActionForBanks[gActiveBank] = 3; - gBattleCommunication[gActiveBank] = 4; + gActionForBanks[gActiveBank] = ACTION_RUN; + gBattleCommunication[gActiveBank] = STATE_WAIT_ACTION_CONFIRMED_STANDBY; } else { RecordedBattle_ClearBankAction(gActiveBank, 1); - gBattleCommunication[gActiveBank] = *(gBattleStruct->field_84 + gActiveBank); + gBattleCommunication[gActiveBank] = *(gBattleStruct->stateIdAfterSelScript + gActiveBank); } } else @@ -4199,18 +4207,323 @@ void sub_803BE74(void) } } - if (gBattleCommunication[4] == gNoOfAllBanks) + // check if everyone chose actions + if (gBattleCommunication[ACTIONS_CONFIRMED_COUNT] == gNoOfAllBanks) { sub_818603C(1); - gBattleMainFunc = sub_803D2E8; + gBattleMainFunc = SetActionsAndBanksTurnOrder; if (gBattleTypeFlags & BATTLE_TYPE_INGAME_PARTNER) { for (i = 0; i < gNoOfAllBanks; i++) { - if (gActionForBanks[i] == 2) + if (gActionForBanks[i] == ACTION_SWITCH) sub_80571DC(i, *(gBattleStruct->field_5C + i)); } } } } + +bool8 sub_803CDB8(void) +{ + s32 i, var; + + for (var = 0, i = 0; i < gNoOfAllBanks; i++) + { + if (gBattleCommunication[i] == 5) + var++; + } + + if (var + 1 == gNoOfAllBanks) + return TRUE; + else + return FALSE; +} + +void sub_803CDF8(void) +{ + *(gBattleStruct->field_5C + gActiveBank) = gBattleBufferB[gActiveBank][1]; + RecordedBattle_SetBankAction(gActiveBank, gBattleBufferB[gActiveBank][1]); + + if (gBattleTypeFlags & BATTLE_TYPE_LINK && gBattleTypeFlags & BATTLE_TYPE_MULTI) + { + *(gActiveBank * 3 + (u8*)(gBattleStruct->field_60) + 0) &= 0xF; + *(gActiveBank * 3 + (u8*)(gBattleStruct->field_60) + 0) |= (gBattleBufferB[gActiveBank][2] & 0xF0); + *(gActiveBank * 3 + (u8*)(gBattleStruct->field_60) + 1) = gBattleBufferB[gActiveBank][3]; + + *((gActiveBank ^ BIT_MON) * 3 + (u8*)(gBattleStruct->field_60) + 0) &= (0xF0); + *((gActiveBank ^ BIT_MON) * 3 + (u8*)(gBattleStruct->field_60) + 0) |= (gBattleBufferB[gActiveBank][2] & 0xF0) >> 4; + *((gActiveBank ^ BIT_MON) * 3 + (u8*)(gBattleStruct->field_60) + 2) = gBattleBufferB[gActiveBank][3]; + } +} + +extern u8 gActionsByTurnOrder[BATTLE_BANKS_COUNT]; + +void SwapTurnOrder(u8 id1, u8 id2) +{ + u32 temp = gActionsByTurnOrder[id1]; + gActionsByTurnOrder[id1] = gActionsByTurnOrder[id2]; + gActionsByTurnOrder[id2] = temp; + + temp = gBanksByTurnOrder[id1]; + gBanksByTurnOrder[id1] = gBanksByTurnOrder[id2]; + gBanksByTurnOrder[id2] = temp; +} + +extern const u8 gStatStageRatios[][2]; + +u8 GetWhoStrikesFirst(u8 bank1, u8 bank2, bool8 ignoreChosenMoves) +{ + u8 strikesFirst = 0; + u8 speedMultiplierBank1 = 0, speedMultiplierBank2 = 0; + u32 speedBank1 = 0, speedBank2 = 0; + u8 holdEffect = 0; + u8 holdEffectParam = 0; + u16 moveBank1 = 0, moveBank2 = 0; + + if (WEATHER_HAS_EFFECT) + { + if ((gBattleMons[bank1].ability == ABILITY_SWIFT_SWIM && gBattleWeather & WEATHER_RAIN_ANY) + || (gBattleMons[bank1].ability == ABILITY_CHLOROPHYLL && gBattleWeather & WEATHER_SUN_ANY)) + speedMultiplierBank1 = 2; + else + speedMultiplierBank1 = 1; + + if ((gBattleMons[bank2].ability == ABILITY_SWIFT_SWIM && gBattleWeather & WEATHER_RAIN_ANY) + || (gBattleMons[bank2].ability == ABILITY_CHLOROPHYLL && gBattleWeather & WEATHER_SUN_ANY)) + speedMultiplierBank2 = 2; + else + speedMultiplierBank2 = 1; + } + else + { + speedMultiplierBank1 = 1; + speedMultiplierBank2 = 1; + } + + speedBank1 = (gBattleMons[bank1].speed * speedMultiplierBank1) + * (gStatStageRatios[gBattleMons[bank1].statStages[STAT_STAGE_SPEED]][0]) + / (gStatStageRatios[gBattleMons[bank1].statStages[STAT_STAGE_SPEED]][1]); + + if (gBattleMons[bank1].item == ITEM_ENIGMA_BERRY) + { + holdEffect = gEnigmaBerries[bank1].holdEffect; + holdEffectParam = gEnigmaBerries[bank1].holdEffectParam; + } + else + { + holdEffect = ItemId_GetHoldEffect(gBattleMons[bank1].item); + holdEffectParam = ItemId_GetHoldEffectParam(gBattleMons[bank1].item); + } + + // badge boost + if (!(gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_x2000000 | BATTLE_TYPE_FRONTIER)) + && FlagGet(BADGE03_GET) + && GetBankSide(bank1) == SIDE_PLAYER) + { + speedBank1 = (speedBank1 * 110) / 100; + } + + if (holdEffect == HOLD_EFFECT_MACHO_BRACE) + speedBank1 /= 2; + + if (gBattleMons[bank1].status1 & STATUS_PARALYSIS) + speedBank1 /= 4; + + if (holdEffect == HOLD_EFFECT_QUICK_CLAW && gRandomTurnNumber < (0xFFFF * holdEffectParam) / 100) + speedBank1 = UINT_MAX; + + // check second bank's speed + + speedBank2 = (gBattleMons[bank2].speed * speedMultiplierBank2) + * (gStatStageRatios[gBattleMons[bank2].statStages[STAT_STAGE_SPEED]][0]) + / (gStatStageRatios[gBattleMons[bank2].statStages[STAT_STAGE_SPEED]][1]); + + if (gBattleMons[bank2].item == ITEM_ENIGMA_BERRY) + { + holdEffect = gEnigmaBerries[bank2].holdEffect; + holdEffectParam = gEnigmaBerries[bank2].holdEffectParam; + } + else + { + holdEffect = ItemId_GetHoldEffect(gBattleMons[bank2].item); + holdEffectParam = ItemId_GetHoldEffectParam(gBattleMons[bank2].item); + } + + // badge boost + if (!(gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_x2000000 | BATTLE_TYPE_FRONTIER)) + && FlagGet(BADGE03_GET) + && GetBankSide(bank2) == SIDE_PLAYER) + { + speedBank2 = (speedBank2 * 110) / 100; + } + + if (holdEffect == HOLD_EFFECT_MACHO_BRACE) + speedBank2 /= 2; + + if (gBattleMons[bank2].status1 & STATUS_PARALYSIS) + speedBank2 /= 4; + + if (holdEffect == HOLD_EFFECT_QUICK_CLAW && gRandomTurnNumber < (0xFFFF * holdEffectParam) / 100) + speedBank2 = UINT_MAX; + + if (ignoreChosenMoves) + { + moveBank1 = MOVE_NONE; + moveBank2 = MOVE_NONE; + } + else + { + if (gActionForBanks[bank1] == ACTION_USE_MOVE) + { + if (gProtectStructs[bank1].onlyStruggle) + moveBank1 = MOVE_STRUGGLE; + else + moveBank1 = gBattleMons[bank1].moves[*(gBattleStruct->chosenMovesIds + bank1)]; + } + else + moveBank1 = MOVE_NONE; + + if (gActionForBanks[bank2] == ACTION_USE_MOVE) + { + if (gProtectStructs[bank2].onlyStruggle) + moveBank2 = MOVE_STRUGGLE; + else + moveBank2 = gBattleMons[bank2].moves[*(gBattleStruct->chosenMovesIds + bank2)]; + } + else + moveBank2 = MOVE_NONE; + } + + // both move priorities are different than 0 + if (gBattleMoves[moveBank1].priority != 0 || gBattleMoves[moveBank2].priority != 0) + { + // both priorities are the same + if (gBattleMoves[moveBank1].priority == gBattleMoves[moveBank2].priority) + { + if (speedBank1 == speedBank2 && Random() & 1) + strikesFirst = 2; // same speeds, same priorities + else if (speedBank1 < speedBank2) + strikesFirst = 1; // bank2 has more speed + + // else bank1 has more speed + } + else if (gBattleMoves[moveBank1].priority < gBattleMoves[moveBank2].priority) + strikesFirst = 1; // bank2's move has greater priority + + // else bank1's move has greater priority + } + // both priorities are equal to 0 + else + { + if (speedBank1 == speedBank2 && Random() & 1) + strikesFirst = 2; // same speeds, same priorities + else if (speedBank1 < speedBank2) + strikesFirst = 1; // bank2 has more speed + + // else bank1 has more speed + } + + return strikesFirst; +} + +static void SetActionsAndBanksTurnOrder(void) +{ + s32 var = 0; + s32 i, j; + + if (gBattleTypeFlags & BATTLE_TYPE_SAFARI) + { + for (gActiveBank = 0; gActiveBank < gNoOfAllBanks; gActiveBank++) + { + gActionsByTurnOrder[var] = gActionForBanks[gActiveBank]; + gBanksByTurnOrder[var] = gActiveBank; + var++; + } + } + else + { + if (gBattleTypeFlags & BATTLE_TYPE_LINK) + { + for (gActiveBank = 0; gActiveBank < gNoOfAllBanks; gActiveBank++) + { + if (gActionForBanks[gActiveBank] == ACTION_RUN) + { + var = 5; + break; + } + } + } + else + { + if (gActionForBanks[0] == ACTION_RUN) + { + gActiveBank = 0; + var = 5; + } + if (gActionForBanks[2] == ACTION_RUN) + { + gActiveBank = 2; + var = 5; + } + } + + if (var == 5) + { + gActionsByTurnOrder[0] = gActionForBanks[gActiveBank]; + gBanksByTurnOrder[0] = gActiveBank; + var = 1; + for (i = 0; i < gNoOfAllBanks; i++) + { + if (i != gActiveBank) + { + gActionsByTurnOrder[var] = gActionForBanks[i]; + gBanksByTurnOrder[var] = i; + var++; + } + } + gBattleMainFunc = bc_80154A0; + gBattleStruct->field_48 = 0; + return; + } + else + { + for (gActiveBank = 0; gActiveBank < gNoOfAllBanks; gActiveBank++) + { + if (gActionForBanks[gActiveBank] == ACTION_USE_ITEM || gActionForBanks[gActiveBank] == ACTION_SWITCH) + { + gActionsByTurnOrder[var] = gActionForBanks[gActiveBank]; + gBanksByTurnOrder[var] = gActiveBank; + var++; + } + } + for (gActiveBank = 0; gActiveBank < gNoOfAllBanks; gActiveBank++) + { + if (gActionForBanks[gActiveBank] != ACTION_USE_ITEM && gActionForBanks[gActiveBank] != ACTION_SWITCH) + { + gActionsByTurnOrder[var] = gActionForBanks[gActiveBank]; + gBanksByTurnOrder[var] = gActiveBank; + var++; + } + } + for (i = 0; i < gNoOfAllBanks - 1; i++) + { + for (j = i + 1; j < gNoOfAllBanks; j++) + { + u8 bank1 = gBanksByTurnOrder[i]; + u8 bank2 = gBanksByTurnOrder[j]; + if (gActionsByTurnOrder[i] != ACTION_USE_ITEM + && gActionsByTurnOrder[j] != ACTION_USE_ITEM + && gActionsByTurnOrder[i] != ACTION_SWITCH + && gActionsByTurnOrder[j] != ACTION_SWITCH) + { + if (GetWhoStrikesFirst(bank1, bank2, FALSE)) + SwapTurnOrder(i, j); + } + } + } + } + } + gBattleMainFunc = bc_80154A0; + gBattleStruct->field_48 = 0; +} diff --git a/src/battle_3.c b/src/battle_3.c index 59028410d..c20d361a4 100644 --- a/src/battle_3.c +++ b/src/battle_3.c @@ -32,7 +32,7 @@ extern u8 gBankAttacker; extern u8 gBankTarget; extern u8 gAbsentBankFlags; extern u16 gBattleWeather; -extern u8 gTurnOrder[BATTLE_BANKS_COUNT]; +extern u8 gBanksByTurnOrder[BATTLE_BANKS_COUNT]; extern u16 gSideAffecting[]; extern u8 gBattleCommunication[]; extern void (*gBattleMainFunc)(void); @@ -404,15 +404,15 @@ u8 UpdateTurnCounters(void) case 0: for (i = 0; i < gNoOfAllBanks; i++) { - gTurnOrder[i] = i; + gBanksByTurnOrder[i] = i; } for (i = 0; i < gNoOfAllBanks - 1; i++) { s32 j; for (j = i + 1; j < gNoOfAllBanks; j++) { - if (GetWhoStrikesFirst(gTurnOrder[i], gTurnOrder[j], 0)) - sub_803CEDC(i, j); + if (GetWhoStrikesFirst(gBanksByTurnOrder[i], gBanksByTurnOrder[j], 0)) + SwapTurnOrder(i, j); } } @@ -537,7 +537,7 @@ u8 UpdateTurnCounters(void) case 5: while (gBattleStruct->turnSideTracker < gNoOfAllBanks) { - gActiveBank = gTurnOrder[gBattleStruct->turnSideTracker]; + gActiveBank = gBanksByTurnOrder[gBattleStruct->turnSideTracker]; if (gWishFutureKnock.wishCounter[gActiveBank] != 0 && --gWishFutureKnock.wishCounter[gActiveBank] == 0 && gBattleMons[gActiveBank].hp != 0) @@ -649,7 +649,7 @@ u8 TurnBasedEffects(void) gHitMarker |= (HITMARKER_GRUDGE | HITMARKER_x20); while (gBattleStruct->turnEffectsBank < gNoOfAllBanks && gBattleStruct->turnEffectsTracker <= TURNBASED_MAX_CASE) { - gActiveBank = gBankAttacker = gTurnOrder[gBattleStruct->turnEffectsBank]; + gActiveBank = gBankAttacker = gBanksByTurnOrder[gBattleStruct->turnEffectsBank]; if (gAbsentBankFlags & gBitTable[gActiveBank]) { gBattleStruct->turnEffectsBank++; @@ -1018,7 +1018,7 @@ bool8 sub_8041364(void) case 1: while (gBattleStruct->field_1A1 < gNoOfAllBanks) { - gActiveBank = gBankAttacker = gTurnOrder[gBattleStruct->field_1A1]; + gActiveBank = gBankAttacker = gBanksByTurnOrder[gBattleStruct->field_1A1]; if (gAbsentBankFlags & gBitTable[gActiveBank]) { gBattleStruct->field_1A1++; diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 88c62841d..380f9ec40 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -47,8 +47,8 @@ extern u8 gActiveBank; extern u32 gBattleExecBuffer; extern u8 gNoOfAllBanks; extern u16 gBattlePartyID[BATTLE_BANKS_COUNT]; -extern u8 gTurnOrder[BATTLE_BANKS_COUNT]; -extern u8 gUnknown_0202407A[BATTLE_BANKS_COUNT]; +extern u8 gBanksByTurnOrder[BATTLE_BANKS_COUNT]; +extern u8 gActionsByTurnOrder[BATTLE_BANKS_COUNT]; extern u16 gCurrentMove; extern u8 gLastUsedAbility; extern u16 gBattleWeather; @@ -331,7 +331,7 @@ static void atk40_jump_if_move_affected_by_protect(void); static void atk41_call(void); static void atk42_jumpiftype2(void); static void atk43_jumpifabilitypresent(void); -static void atk44(void); +static void atk44_end_selection_script(void); static void atk45_playanimation(void); static void atk46_playanimation2(void); static void atk47_setgraphicalstatchangevalues(void); @@ -583,7 +583,7 @@ void (* const gBattleScriptingCommandsTable[])(void) = atk41_call, atk42_jumpiftype2, atk43_jumpifabilitypresent, - atk44, + atk44_end_selection_script, atk45_playanimation, atk46_playanimation2, atk47_setgraphicalstatchangevalues, @@ -1151,11 +1151,11 @@ static void atk00_attackcanceler(void) for (i = 0; i < gNoOfAllBanks; i++) { - if ((gProtectStructs[gTurnOrder[i]].stealMove) && gBattleMoves[gCurrentMove].flags & FLAG_SNATCH_AFFECTED) + if ((gProtectStructs[gBanksByTurnOrder[i]].stealMove) && gBattleMoves[gCurrentMove].flags & FLAG_SNATCH_AFFECTED) { - PressurePPLose(gBankAttacker, gTurnOrder[i], MOVE_SNATCH); - gProtectStructs[gTurnOrder[i]].stealMove = 0; - gBattleScripting.bank = gTurnOrder[i]; + PressurePPLose(gBankAttacker, gBanksByTurnOrder[i], MOVE_SNATCH); + gProtectStructs[gBanksByTurnOrder[i]].stealMove = 0; + gBattleScripting.bank = gBanksByTurnOrder[i]; BattleScriptPushCursor(); gBattlescriptCurrInstr = BattleScript_SnatchedMove; return; @@ -2378,7 +2378,7 @@ u8 BankGetTurnOrder(u8 bank) s32 i; for (i = 0; i < gNoOfAllBanks; i++) { - if (gTurnOrder[i] == bank) + if (gBanksByTurnOrder[i] == bank) break; } return i; @@ -4462,9 +4462,9 @@ static void atk43_jumpifabilitypresent(void) gBattlescriptCurrInstr += 6; } -static void atk44(void) +static void atk44_end_selection_script(void) { - *(gBankAttacker + gBattleStruct->field_54) = 1; + *(gBankAttacker + gBattleStruct->selectionScriptFinished) = TRUE; } static void atk45_playanimation(void) @@ -5903,15 +5903,15 @@ static void atk51_switch_handle_order(void) gBattleCommunication[0] = gBattleBufferB[gActiveBank][1]; *(gBattleStruct->field_5C + gActiveBank) = gBattleBufferB[gActiveBank][1]; - if ((gBattleTypeFlags & (BATTLE_TYPE_MULTI | BATTLE_TYPE_LINK)) == (BATTLE_TYPE_MULTI | BATTLE_TYPE_LINK)) + if (gBattleTypeFlags & BATTLE_TYPE_LINK && gBattleTypeFlags & BATTLE_TYPE_MULTI) { *(gActiveBank * 3 + (u8*)(gBattleStruct->field_60) + 0) &= 0xF; *(gActiveBank * 3 + (u8*)(gBattleStruct->field_60) + 0) |= (gBattleBufferB[gActiveBank][2] & 0xF0); *(gActiveBank * 3 + (u8*)(gBattleStruct->field_60) + 1) = gBattleBufferB[gActiveBank][3]; - *((gActiveBank ^ 2) * 3 + (u8*)(gBattleStruct->field_60) + 0) &= (0xF0); - *((gActiveBank ^ 2) * 3 + (u8*)(gBattleStruct->field_60) + 0) |= (gBattleBufferB[gActiveBank][2] & 0xF0) >> 4; - *((gActiveBank ^ 2) * 3 + (u8*)(gBattleStruct->field_60) + 2) = gBattleBufferB[gActiveBank][3]; + *((gActiveBank ^ BIT_MON) * 3 + (u8*)(gBattleStruct->field_60) + 0) &= (0xF0); + *((gActiveBank ^ BIT_MON) * 3 + (u8*)(gBattleStruct->field_60) + 0) |= (gBattleBufferB[gActiveBank][2] & 0xF0) >> 4; + *((gActiveBank ^ BIT_MON) * 3 + (u8*)(gBattleStruct->field_60) + 2) = gBattleBufferB[gActiveBank][3]; } else if (gBattleTypeFlags & BATTLE_TYPE_INGAME_PARTNER) { @@ -5983,8 +5983,8 @@ static void atk52_switch_in_effects(void) for (i = 0; i < gNoOfAllBanks; i++) { - if (gTurnOrder[i] == gActiveBank) - gUnknown_0202407A[i] = 0xC; + if (gBanksByTurnOrder[i] == gActiveBank) + gActionsByTurnOrder[i] = ACTION_CANCEL_PARTNER; } for (i = 0; i < gNoOfAllBanks; i++) @@ -6569,7 +6569,7 @@ static void atk68_80246A0(void) s32 i; for (i = 0; i < gNoOfAllBanks; i++) - gUnknown_0202407A[i] = 0xC; + gActionsByTurnOrder[i] = ACTION_CANCEL_PARTNER; gBattlescriptCurrInstr++; } @@ -9710,8 +9710,8 @@ static void atkBA_jumpifnopursuitswitchdmg(void) for (i = 0; i < gNoOfAllBanks; i++) { - if (gTurnOrder[i] == gBankTarget) - gUnknown_0202407A[i] = 11; + if (gBanksByTurnOrder[i] == gBankTarget) + gActionsByTurnOrder[i] = 11; } gCurrentMove = MOVE_PURSUIT; @@ -10942,7 +10942,7 @@ static void atkEC_pursuit_sth(void) && gActionForBanks[gActiveBank] == 0 && gChosenMovesByBanks[gActiveBank] == MOVE_PURSUIT) { - gUnknown_0202407A[gActiveBank] = 11; + gActionsByTurnOrder[gActiveBank] = 11; gCurrentMove = MOVE_PURSUIT; gBattlescriptCurrInstr += 5; gBattleScripting.animTurn = 1; diff --git a/sym_ewram.txt b/sym_ewram.txt index 7de63abce..c50d8f030 100644 --- a/sym_ewram.txt +++ b/sym_ewram.txt @@ -304,10 +304,10 @@ gBattlePartyID: @ 202406E gBanksBySide: @ 2024076 .space 0x4 -gUnknown_0202407A: @ 202407A +gActionsByTurnOrder: @ 202407A .space 0x4 -gTurnOrder: @ 202407E +gBanksByTurnOrder: @ 202407E .space 0x4 gCurrentMoveTurn: @ 2024082 From e7175999f55da53392d269a2f03f498a03c9826c Mon Sep 17 00:00:00 2001 From: ProjectRevoTPP Date: Thu, 5 Oct 2017 13:02:39 -0400 Subject: [PATCH 29/42] decompile braille_puzzles.c --- asm/braille_puzzles.s | 627 ------------------------------------ asm/field_control_avatar.s | 2 +- asm/rom6.s | 10 +- data/field_effect_scripts.s | 2 +- ld_script.txt | 2 +- src/braille_puzzles.c | 583 +++++++++++++++++++++++++++++++++ sym_ewram.txt | 2 +- 7 files changed, 592 insertions(+), 636 deletions(-) delete mode 100644 asm/braille_puzzles.s create mode 100755 src/braille_puzzles.c diff --git a/asm/braille_puzzles.s b/asm/braille_puzzles.s deleted file mode 100644 index 095b1b793..000000000 --- a/asm/braille_puzzles.s +++ /dev/null @@ -1,627 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .syntax unified - - .text - - thumb_func_start sub_81795E8 -sub_81795E8: @ 81795E8 - push {lr} - ldr r0, =0x000008af - bl FlagGet - lsls r0, 24 - cmp r0, 0 - bne _08179634 - ldr r0, =gSaveBlock1Ptr - ldr r2, [r0] - ldrh r1, [r2, 0x4] - ldr r0, =0x00004718 - cmp r1, r0 - bne _08179634 - ldr r1, [r2] - ldr r0, =0x0003000a - cmp r1, r0 - beq _08179616 - ldr r0, =0x00030009 - cmp r1, r0 - beq _08179616 - ldr r0, =0x0003000b - cmp r1, r0 - bne _08179634 -_08179616: - movs r0, 0x1 - b _08179636 - .pool -_08179634: - movs r0, 0 -_08179636: - pop {r1} - bx r1 - thumb_func_end sub_81795E8 - - thumb_func_start sub_817963C -sub_817963C: @ 817963C - push {lr} - ldr r2, =0x0000022a - movs r0, 0x10 - movs r1, 0x8 - bl MapGridSetMetatileIdAt - ldr r2, =0x0000022b - movs r0, 0x11 - movs r1, 0x8 - bl MapGridSetMetatileIdAt - movs r2, 0x8B - lsls r2, 2 - movs r0, 0x12 - movs r1, 0x8 - bl MapGridSetMetatileIdAt - ldr r2, =0x00000e32 - movs r0, 0x10 - movs r1, 0x9 - bl MapGridSetMetatileIdAt - ldr r2, =0x00000233 - movs r0, 0x11 - movs r1, 0x9 - bl MapGridSetMetatileIdAt - ldr r2, =0x00000e34 - movs r0, 0x12 - movs r1, 0x9 - bl MapGridSetMetatileIdAt - bl DrawWholeMapView - movs r0, 0x14 - bl PlaySE - ldr r0, =0x000008af - bl FlagSet - bl ScriptContext2_Disable - pop {r0} - bx r0 - .pool - thumb_func_end sub_817963C - - thumb_func_start sub_81796AC -sub_81796AC: @ 81796AC - push {r4,lr} - ldr r4, =gPlayerParty - adds r0, r4, 0 - movs r1, 0x41 - movs r2, 0 - bl GetMonData - movs r1, 0x9D - lsls r1, 1 - cmp r0, r1 - bne _081796F4 - bl CalculatePlayerPartyCount - ldr r0, =gPlayerPartyCount - ldrb r1, [r0] - movs r0, 0x64 - muls r0, r1 - adds r1, r4, 0 - subs r1, 0x64 - adds r0, r1 - movs r1, 0x41 - movs r2, 0 - bl GetMonData - ldr r1, =0x0000017d - cmp r0, r1 - bne _081796F4 - movs r0, 0x1 - b _081796F6 - .pool -_081796F4: - movs r0, 0 -_081796F6: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_81796AC - - thumb_func_start nullsub_84 -nullsub_84: @ 81796FC - bx lr - thumb_func_end nullsub_84 - - thumb_func_start sub_8179700 -sub_8179700: @ 8179700 - push {lr} - ldr r0, =sub_8179778 - movs r1, 0x9 - bl CreateTask - lsls r0, 24 - lsrs r0, 24 - ldr r2, =gTasks - lsls r1, r0, 2 - adds r1, r0 - lsls r1, 3 - adds r1, r2 - movs r0, 0 - strh r0, [r1, 0xA] - strh r0, [r1, 0xC] - movs r0, 0x2 - strh r0, [r1, 0x10] - movs r0, 0x5 - strh r0, [r1, 0x12] - movs r0, 0x32 - strh r0, [r1, 0x14] - movs r0, 0 - bl SetCameraPanningCallback - pop {r0} - bx r0 - .pool - thumb_func_end sub_8179700 - - thumb_func_start sub_817973C -sub_817973C: @ 817973C - push {lr} - ldr r0, =sub_8179778 - movs r1, 0x9 - bl CreateTask - lsls r0, 24 - lsrs r0, 24 - ldr r2, =gTasks - lsls r1, r0, 2 - adds r1, r0 - lsls r1, 3 - adds r1, r2 - movs r0, 0 - strh r0, [r1, 0xA] - strh r0, [r1, 0xC] - movs r0, 0x3 - strh r0, [r1, 0x10] - movs r0, 0x5 - strh r0, [r1, 0x12] - movs r0, 0x2 - strh r0, [r1, 0x14] - movs r0, 0 - bl SetCameraPanningCallback - pop {r0} - bx r0 - .pool - thumb_func_end sub_817973C - - thumb_func_start sub_8179778 -sub_8179778: @ 8179778 - push {r4,r5,lr} - lsls r0, 24 - lsrs r5, r0, 24 - lsls r0, r5, 2 - adds r0, r5 - lsls r0, 3 - ldr r1, =gTasks - adds r4, r0, r1 - ldrh r0, [r4, 0xA] - adds r0, 0x1 - strh r0, [r4, 0xA] - movs r1, 0xA - ldrsh r0, [r4, r1] - movs r2, 0x12 - ldrsh r1, [r4, r2] - bl __modsi3 - cmp r0, 0 - bne _081797D0 - strh r0, [r4, 0xA] - ldrh r0, [r4, 0xC] - adds r0, 0x1 - strh r0, [r4, 0xC] - ldrh r0, [r4, 0x10] - negs r0, r0 - strh r0, [r4, 0x10] - movs r0, 0x10 - ldrsh r1, [r4, r0] - movs r0, 0 - bl SetCameraPanning - movs r2, 0xC - ldrsh r1, [r4, r2] - movs r2, 0x14 - ldrsh r0, [r4, r2] - cmp r1, r0 - bne _081797D0 - adds r0, r5, 0 - bl DestroyTask - bl EnableBothScriptContexts - bl InstallCameraPanAheadCallback -_081797D0: - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8179778 - - thumb_func_start sub_81797DC -sub_81797DC: @ 81797DC - push {lr} - movs r0, 0x8B - lsls r0, 4 - bl FlagGet - lsls r0, 24 - lsrs r2, r0, 24 - cmp r2, 0 - bne _0817982C - ldr r0, =gSaveBlock1Ptr - ldr r3, [r0] - ldrh r1, [r3, 0x4] - movs r0, 0xC3 - lsls r0, 3 - cmp r1, r0 - bne _0817982C - ldr r1, [r3] - ldr r0, =0x00170006 - cmp r1, r0 - beq _08179810 - ldr r0, =0x00170005 - cmp r1, r0 - beq _08179810 - ldr r0, =0x00170007 - cmp r1, r0 - bne _0817982C -_08179810: - ldr r0, =gUnknown_0203BD14 - strb r2, [r0] - movs r0, 0x1 - b _0817982E - .pool -_0817982C: - movs r0, 0 -_0817982E: - pop {r1} - bx r1 - thumb_func_end sub_81797DC - - thumb_func_start sub_8179834 -sub_8179834: @ 8179834 - push {lr} - bl brm_get_pokemon_selection - ldr r1, =gFieldEffectSpawnParams - lsls r0, 24 - lsrs r0, 24 - str r0, [r1] - movs r0, 0x3C - bl FieldEffectStart - pop {r0} - bx r0 - .pool - thumb_func_end sub_8179834 - - thumb_func_start sub_8179850 -sub_8179850: @ 8179850 - push {lr} - movs r0, 0x3C - bl FieldEffectActiveListRemove - bl sub_8179860 - pop {r0} - bx r0 - thumb_func_end sub_8179850 - - thumb_func_start sub_8179860 -sub_8179860: @ 8179860 - push {lr} - ldr r2, =0x0000022a - movs r0, 0xE - movs r1, 0x1A - bl MapGridSetMetatileIdAt - ldr r2, =0x0000022b - movs r0, 0xF - movs r1, 0x1A - bl MapGridSetMetatileIdAt - movs r2, 0x8B - lsls r2, 2 - movs r0, 0x10 - movs r1, 0x1A - bl MapGridSetMetatileIdAt - ldr r2, =0x00000e32 - movs r0, 0xE - movs r1, 0x1B - bl MapGridSetMetatileIdAt - ldr r2, =0x00000233 - movs r0, 0xF - movs r1, 0x1B - bl MapGridSetMetatileIdAt - ldr r2, =0x00000e34 - movs r0, 0x10 - movs r1, 0x1B - bl MapGridSetMetatileIdAt - bl DrawWholeMapView - movs r0, 0x14 - bl PlaySE - movs r0, 0x8B - lsls r0, 4 - bl FlagSet - bl ScriptContext2_Disable - pop {r0} - bx r0 - .pool - thumb_func_end sub_8179860 - - thumb_func_start sub_81798D0 -sub_81798D0: @ 81798D0 - push {lr} - ldr r0, =0x000008b2 - bl FlagGet - lsls r0, 24 - cmp r0, 0 - bne _08179910 - ldr r0, =gSaveBlock1Ptr - ldr r2, [r0] - ldrh r1, [r2, 0x4] - ldr r0, =0x00004418 - cmp r1, r0 - bne _08179910 - ldr r1, [r2] - ldr r0, =0x00190008 - cmp r1, r0 - bne _08179910 - ldr r1, =gUnknown_0203BD14 - movs r0, 0x1 - strb r0, [r1] - movs r0, 0x1 - b _08179912 - .pool -_08179910: - movs r0, 0 -_08179912: - pop {r1} - bx r1 - thumb_func_end sub_81798D0 - - thumb_func_start sub_8179918 -sub_8179918: @ 8179918 - push {lr} - bl brm_get_pokemon_selection - ldr r1, =gFieldEffectSpawnParams - lsls r0, 24 - lsrs r0, 24 - str r0, [r1] - movs r0, 0x3C - bl FieldEffectStart - pop {r0} - bx r0 - .pool - thumb_func_end sub_8179918 - - thumb_func_start sub_8179934 -sub_8179934: @ 8179934 - push {lr} - movs r0, 0x3C - bl FieldEffectActiveListRemove - bl sub_8179944 - pop {r0} - bx r0 - thumb_func_end sub_8179934 - - thumb_func_start sub_8179944 -sub_8179944: @ 8179944 - push {lr} - ldr r2, =0x0000022a - movs r0, 0xE - movs r1, 0x1A - bl MapGridSetMetatileIdAt - ldr r2, =0x0000022b - movs r0, 0xF - movs r1, 0x1A - bl MapGridSetMetatileIdAt - movs r2, 0x8B - lsls r2, 2 - movs r0, 0x10 - movs r1, 0x1A - bl MapGridSetMetatileIdAt - ldr r2, =0x00000e32 - movs r0, 0xE - movs r1, 0x1B - bl MapGridSetMetatileIdAt - ldr r2, =0x00000233 - movs r0, 0xF - movs r1, 0x1B - bl MapGridSetMetatileIdAt - ldr r2, =0x00000e34 - movs r0, 0x10 - movs r1, 0x1B - bl MapGridSetMetatileIdAt - bl DrawWholeMapView - movs r0, 0x14 - bl PlaySE - ldr r0, =0x000008b2 - bl FlagSet - bl ScriptContext2_Disable - pop {r0} - bx r0 - .pool - thumb_func_end sub_8179944 - - thumb_func_start nullsub_64 -nullsub_64: @ 81799B4 - bx lr - thumb_func_end nullsub_64 - - thumb_func_start sub_81799B8 -sub_81799B8: @ 81799B8 - push {lr} - bl oei_task_add - lsls r0, 24 - lsrs r2, r0, 24 - ldr r0, =gUnknown_0203BD14 - ldrb r0, [r0] - cmp r0, 0x1 - bne _081799E4 - ldr r1, =gTasks - lsls r0, r2, 2 - adds r0, r2 - lsls r0, 3 - adds r0, r1 - ldr r2, =sub_8179934 - b _081799F0 - .pool -_081799E4: - ldr r1, =gTasks - lsls r0, r2, 2 - adds r0, r2 - lsls r0, 3 - adds r0, r1 - ldr r2, =sub_8179850 -_081799F0: - lsrs r1, r2, 16 - strh r1, [r0, 0x18] - strh r2, [r0, 0x1A] - movs r0, 0 - pop {r1} - bx r1 - .pool - thumb_func_end sub_81799B8 - - thumb_func_start sub_8179A04 -sub_8179A04: @ 8179A04 - push {r4-r7,lr} - mov r7, r9 - mov r6, r8 - push {r6,r7} - ldr r4, =gSaveBlock1Ptr - ldr r0, [r4] - ldrh r1, [r0, 0x4] - ldr r0, =0x00004318 - cmp r1, r0 - beq _08179A1A - b _08179B5A -_08179A1A: - ldr r0, =0x000008b1 - bl FlagGet - lsls r0, 24 - cmp r0, 0 - beq _08179A28 - b _08179B5A -_08179A28: - movs r0, 0x2 - bl FlagGet - lsls r0, 24 - cmp r0, 0 - bne _08179A36 - b _08179B5A -_08179A36: - movs r0, 0x3 - bl FlagGet - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x1 - bne _08179A58 - b _08179B5A - .pool -_08179A54: - movs r0, 0x1 - b _08179B5C -_08179A58: - movs r5, 0 - mov r8, r4 - ldr r4, =gUnknown_085EFE74 - adds r0, r4, 0x1 - mov r12, r0 - ldr r6, =0x0000403b - ldr r1, =0x0000403c - mov r9, r1 -_08179A68: - lsls r0, r5, 1 - adds r1, r0, r4 - add r0, r12 - ldrb r3, [r0] - mov r7, r8 - ldr r2, [r7] - movs r7, 0 - ldrsh r0, [r2, r7] - ldrb r1, [r1] - cmp r0, r1 - bne _08179B44 - movs r1, 0x2 - ldrsh r0, [r2, r1] - cmp r0, r3 - bne _08179B44 - cmp r5, 0xF - bhi _08179AB0 - adds r0, r6, 0 - bl VarGet - lsls r0, 16 - movs r1, 0x80 - lsls r1, 9 - lsls r1, r5 - orrs r1, r0 - lsrs r1, 16 - adds r0, r6, 0 - bl VarSet - b _08179AF0 - .pool -_08179AB0: - cmp r5, 0x1F - bhi _08179AD2 - mov r0, r9 - bl VarGet - lsls r0, 16 - adds r2, r5, 0 - subs r2, 0x10 - movs r1, 0x80 - lsls r1, 9 - lsls r1, r2 - orrs r1, r0 - lsrs r1, 16 - mov r0, r9 - bl VarSet - b _08179AF0 -_08179AD2: - ldr r4, =0x0000403d - adds r0, r4, 0 - bl VarGet - lsls r0, 16 - adds r2, r5, 0 - subs r2, 0x20 - movs r1, 0x80 - lsls r1, 9 - lsls r1, r2 - orrs r1, r0 - lsrs r1, 16 - adds r0, r4, 0 - bl VarSet -_08179AF0: - ldr r0, =0x0000403b - bl VarGet - lsls r0, 16 - lsrs r4, r0, 16 - ldr r0, =0x0000ffff - cmp r4, r0 - bne _08179B5A - ldr r0, =0x0000403c - bl VarGet - lsls r0, 16 - lsrs r0, 16 - cmp r0, r4 - bne _08179B5A - ldr r0, =0x0000403d - bl VarGet - lsls r0, 16 - lsrs r0, 16 - cmp r0, 0xF - bne _08179B5A - ldr r0, =gSaveBlock1Ptr - ldr r0, [r0] - ldr r1, [r0] - ldr r0, =0x00150008 - cmp r1, r0 - beq _08179A54 - b _08179B5A - .pool -_08179B44: - adds r0, r5, 0x1 - lsls r0, 24 - lsrs r5, r0, 24 - cmp r5, 0x23 - bls _08179A68 - movs r0, 0x3 - bl FlagSet - movs r0, 0x2 - bl FlagReset -_08179B5A: - movs r0, 0 -_08179B5C: - pop {r3,r4} - mov r8, r3 - mov r9, r4 - pop {r4-r7} - pop {r1} - bx r1 - thumb_func_end sub_8179A04 - - .align 2, 0 @ Don't pad with nop. diff --git a/asm/field_control_avatar.s b/asm/field_control_avatar.s index 1f2d638c3..fa923d94b 100644 --- a/asm/field_control_avatar.s +++ b/asm/field_control_avatar.s @@ -1411,7 +1411,7 @@ _0809CA64: b _0809CB28 .pool _0809CA7C: - bl sub_8179A04 + bl ShouldDoBrailleRegicePuzzle lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 diff --git a/asm/rom6.s b/asm/rom6.s index cd1421b4f..6d2fb532b 100644 --- a/asm/rom6.s +++ b/asm/rom6.s @@ -258,7 +258,7 @@ sub_813561C: @ 813561C thumb_func_start sub_8135654 sub_8135654: @ 8135654 push {r4,lr} - bl sub_81797DC + bl ShouldDoBrailleStrengthEffect lsls r0, 24 cmp r0, 0 beq _0813568C @@ -404,7 +404,7 @@ sub_8135780: @ 8135780 lsrs r0, r2, 16 strh r0, [r1, 0x18] strh r2, [r1, 0x1A] - bl sub_81795E8 + bl ShouldDoBrailleDigEffect lsls r0, 24 cmp r0, 0 bne _081357AC @@ -422,12 +422,12 @@ sub_81357BC: @ 81357BC push {r4,lr} movs r0, 0x26 bl FieldEffectActiveListRemove - bl sub_81795E8 + bl ShouldDoBrailleDigEffect lsls r0, 24 lsrs r4, r0, 24 cmp r4, 0 beq _081357D6 - bl sub_817963C + bl DoBrailleDigEffect b _081357EE _081357D6: ldr r0, =task08_080A1C44 @@ -3329,7 +3329,7 @@ _081370E2: thumb_func_start sub_81370FC sub_81370FC: @ 81370FC push {r4,lr} - bl sub_81798D0 + bl ShouldDoBrailleFlyEffect lsls r0, 24 cmp r0, 0 beq _08137134 diff --git a/data/field_effect_scripts.s b/data/field_effect_scripts.s index 89ed27301..ceb327084 100644 --- a/data/field_effect_scripts.s +++ b/data/field_effect_scripts.s @@ -316,7 +316,7 @@ gFieldEffectScript_FieldMoveShowMonInit:: @ 82DBCCC field_eff_end gFieldEffectScript_Unknown60:: @ 82DBCD2 - field_eff_callnative sub_81799B8 + field_eff_callnative FldEff_UsePuzzleEffect field_eff_end gFieldEffectScript_Unknown61:: @ 82DBCD8 diff --git a/ld_script.txt b/ld_script.txt index 3170e1919..0dc9d7bc9 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -222,7 +222,7 @@ SECTIONS { asm/berry_tag_screen.o(.text); asm/mystery_event_menu.o(.text); asm/save_failed_screen.o(.text); - asm/braille_puzzles.o(.text); + src/braille_puzzles.o(.text); asm/pokeblock_feed.o(.text); asm/clear_save_data_screen.o(.text); asm/intro_credits_graphics.o(.text); diff --git a/src/braille_puzzles.c b/src/braille_puzzles.c new file mode 100755 index 000000000..4d28daff4 --- /dev/null +++ b/src/braille_puzzles.c @@ -0,0 +1,583 @@ +#include "global.h" +#include "event_data.h" +#include "songs.h" +#include "sound.h" +#include "script.h" +#include "species.h" +#include "task.h" +#include "field_effect.h" +#include "flags.h" + +extern void MapGridSetMetatileIdAt(s32 x, s32 y, u16 metatileId); // fieldmap +extern void DrawWholeMapView(); // field_camera +extern void SetCameraPanningCallback(void ( *callback)()); // field_camera +extern void InstallCameraPanAheadCallback(void); +extern void SetCameraPanning(s16 x, s16 y); +extern u8 brm_get_pokemon_selection(void); +extern void FieldEffectActiveListRemove(u8 id); // field_effect +extern u8 oei_task_add(void); + +// why do this, GF? +enum +{ + STRENGTH_PUZZLE, + FLY_PUZZLE +}; + +extern u8 gBraillePuzzleCallbackFlag; +extern u8 gUnknown_085EFE74[][2]; + +void SealedChamberShakingEffect(u8); +void sub_8179860(void); +void sub_8179944(void); + +bool8 ShouldDoBrailleDigEffect(void) +{ + if (!FlagGet(SYS_BRAILLE_DIG) + && (gSaveBlock1Ptr->location.mapGroup == 0x18 + && gSaveBlock1Ptr->location.mapNum == 0x47)) + { + if (gSaveBlock1Ptr->pos.x == 10 && gSaveBlock1Ptr->pos.y == 3) + return TRUE; + if (gSaveBlock1Ptr->pos.x == 9 && gSaveBlock1Ptr->pos.y == 3) + return TRUE; + if (gSaveBlock1Ptr->pos.x == 11 && gSaveBlock1Ptr->pos.y == 3) + return TRUE; + } + + return FALSE; +} + +void DoBrailleDigEffect(void) +{ + MapGridSetMetatileIdAt(16, 8, 554); + MapGridSetMetatileIdAt(17, 8, 555); + MapGridSetMetatileIdAt(18, 8, 556); + MapGridSetMetatileIdAt(16, 9, 3634); + MapGridSetMetatileIdAt(17, 9, 563); + MapGridSetMetatileIdAt(18, 9, 3636); + DrawWholeMapView(); + PlaySE(SE_BAN); + FlagSet(SYS_BRAILLE_DIG); + ScriptContext2_Disable(); +} + +bool8 CheckRelicanthWailord(void) +{ + // Emerald change: why did they flip it? + // First comes Wailord + if (GetMonData(&gPlayerParty[0], MON_DATA_SPECIES2, 0) == SPECIES_WAILORD) + { + CalculatePlayerPartyCount(); + // Last comes Relicanth + if (GetMonData(&gPlayerParty[gPlayerPartyCount - 1], MON_DATA_SPECIES2, 0) == SPECIES_RELICANTH) + return TRUE; + } + return FALSE; +} + +// THEORY: this was caused by block commenting out all of the older R/S braille functions but leaving the call to it itself, which creates the nullsub. +// the code is shown below to show what this might look like. +void ShouldDoBrailleStrengthEffectOld(void) +{ + /* + if (!FlagGet(SYS_BRAILLE_STRENGTH) && (gSaveBlock1.location.mapGroup == MAP_GROUP_DESERT_RUINS && gSaveBlock1.location.mapNum == MAP_ID_DESERT_RUINS)) + { + if (gSaveBlock1.pos.x == 10 && gSaveBlock1.pos.y == 23) + return TRUE; + else if (gSaveBlock1.pos.x == 9 && gSaveBlock1.pos.y == 23) + return TRUE; + else if (gSaveBlock1.pos.x == 11 && gSaveBlock1.pos.y == 23) + return TRUE; + } + + return FALSE; +} + +void DoBrailleStrengthEffect(void) +{ + FieldEffectActiveListRemove(FLDEFF_USE_STRENGTH); + MapGridSetMetatileIdAt(14, 26, 554); + MapGridSetMetatileIdAt(15, 26, 555); + MapGridSetMetatileIdAt(16, 26, 556); + MapGridSetMetatileIdAt(14, 27, 3634); + MapGridSetMetatileIdAt(15, 27, 563); + MapGridSetMetatileIdAt(16, 27, 3636); + DrawWholeMapView(); + PlaySE(SE_BAN); + FlagSet(SYS_BRAILLE_STRENGTH); + ScriptContext2_Disable(); +} + +bool8 ShouldDoBrailleFlyEffect(void) +{ + if (!FlagGet(SYS_BRAILLE_FLY) && (gSaveBlock1.location.mapGroup == MAP_GROUP_ANCIENT_TOMB && gSaveBlock1.location.mapNum == MAP_ID_ANCIENT_TOMB)) + { + if (gSaveBlock1.pos.x == 8 && gSaveBlock1.pos.y == 25) + return TRUE; + } + + return FALSE; +} + +void DoBrailleFlyEffect(void) +{ + gFieldEffectArguments[0] = gLastFieldPokeMenuOpened; + FieldEffectStart(FLDEFF_USE_FLY_ANCIENT_TOMB); +} + +bool8 FldEff_UseFlyAncientTomb(void) +{ + u8 taskId = oei_task_add(); + + gTasks[taskId].data[8] = (u32)UseFlyAncientTomb_Callback >> 16; + gTasks[taskId].data[9] = (u32)UseFlyAncientTomb_Callback; + return FALSE; +} + +void UseFlyAncientTomb_Callback(void) +{ + FieldEffectActiveListRemove(FLDEFF_USE_FLY_ANCIENT_TOMB); + UseFlyAncientTomb_Finish(); +} + +void UseFlyAncientTomb_Finish(void) +{ + MapGridSetMetatileIdAt(14, 26, 554); + MapGridSetMetatileIdAt(15, 26, 555); + MapGridSetMetatileIdAt(16, 26, 556); + MapGridSetMetatileIdAt(14, 27, 3634); + MapGridSetMetatileIdAt(15, 27, 563); + MapGridSetMetatileIdAt(16, 27, 3636); + DrawWholeMapView(); + PlaySE(SE_BAN); + FlagSet(SYS_BRAILLE_FLY); + ScriptContext2_Disable(); +} + */ +} + +void DoSealedChamberShakingEffect1(void) +{ + u8 taskId = CreateTask(SealedChamberShakingEffect, 9); + + gTasks[taskId].data[1] = 0; + gTasks[taskId].data[2] = 0; + gTasks[taskId].data[4] = 2; + gTasks[taskId].data[5] = 5; + gTasks[taskId].data[6] = 50; + SetCameraPanningCallback(0); +} + +void DoSealedChamberShakingEffect2(void) +{ + u8 taskId = CreateTask(SealedChamberShakingEffect, 9); + + gTasks[taskId].data[1] = 0; + gTasks[taskId].data[2] = 0; + gTasks[taskId].data[4] = 3; + gTasks[taskId].data[5] = 5; + gTasks[taskId].data[6] = 2; + SetCameraPanningCallback(0); +} + +void SealedChamberShakingEffect(u8 taskId) +{ + struct Task *task = &gTasks[taskId]; + + task->data[1]++; + + if (!(task->data[1] % task->data[5])) + { + task->data[1] = 0; + task->data[2]++; + task->data[4] = -task->data[4]; + SetCameraPanning(0, task->data[4]); + if (task->data[2] == task->data[6]) + { + DestroyTask(taskId); + EnableBothScriptContexts(); + InstallCameraPanAheadCallback(); + } + } +} + +// moved later in the function because it was rewritten. +bool8 ShouldDoBrailleStrengthEffect(void) +{ + if (!FlagGet(SYS_BRAILLE_STRENGTH) && (gSaveBlock1Ptr->location.mapGroup == 0x18 && gSaveBlock1Ptr->location.mapNum == 0x06)) + { + if (gSaveBlock1Ptr->pos.x == 6 && gSaveBlock1Ptr->pos.y == 23) + { gBraillePuzzleCallbackFlag = STRENGTH_PUZZLE; return TRUE; } + else if (gSaveBlock1Ptr->pos.x == 5 && gSaveBlock1Ptr->pos.y == 23) + { gBraillePuzzleCallbackFlag = STRENGTH_PUZZLE; return TRUE; } + else if (gSaveBlock1Ptr->pos.x == 7 && gSaveBlock1Ptr->pos.y == 23) + { gBraillePuzzleCallbackFlag = STRENGTH_PUZZLE; return TRUE; } + } + + return FALSE; +} + +void sub_8179834(void) +{ + gFieldEffectSpawnParams[0] = brm_get_pokemon_selection(); + FieldEffectStart(FLDEFF_USE_FLY_ANCIENT_TOMB); +} + +void UseStrengthDesertRuins_Callback(void) +{ + FieldEffectActiveListRemove(FLDEFF_USE_FLY_ANCIENT_TOMB); + sub_8179860(); +} + +void sub_8179860(void) +{ + MapGridSetMetatileIdAt(14, 26, 554); + MapGridSetMetatileIdAt(15, 26, 555); + MapGridSetMetatileIdAt(16, 26, 556); + MapGridSetMetatileIdAt(14, 27, 3634); + MapGridSetMetatileIdAt(15, 27, 563); + MapGridSetMetatileIdAt(16, 27, 3636); + DrawWholeMapView(); + PlaySE(SE_BAN); + FlagSet(SYS_BRAILLE_STRENGTH); + ScriptContext2_Disable(); +} + +bool8 ShouldDoBrailleFlyEffect(void) +{ + if(!FlagGet(SYS_BRAILLE_FLY) && (gSaveBlock1Ptr->location.mapGroup == 0x18 && gSaveBlock1Ptr->location.mapNum == 0x44)) + { + if(gSaveBlock1Ptr->pos.x == 8 && gSaveBlock1Ptr->pos.y == 25) + { gBraillePuzzleCallbackFlag = FLY_PUZZLE; return TRUE; } + } + return FALSE; +} + +void sub_8179918(void) +{ + gFieldEffectSpawnParams[0] = brm_get_pokemon_selection(); + FieldEffectStart(FLDEFF_USE_FLY_ANCIENT_TOMB); +} + +void UseFlyAncientTomb_Callback(void) +{ + FieldEffectActiveListRemove(FLDEFF_USE_FLY_ANCIENT_TOMB); + sub_8179944(); +} + +void sub_8179944(void) +{ + MapGridSetMetatileIdAt(14, 26, 554); + MapGridSetMetatileIdAt(15, 26, 555); + MapGridSetMetatileIdAt(16, 26, 556); + MapGridSetMetatileIdAt(14, 27, 3634); + MapGridSetMetatileIdAt(15, 27, 563); + MapGridSetMetatileIdAt(16, 27, 3636); + DrawWholeMapView(); + PlaySE(SE_BAN); + FlagSet(SYS_BRAILLE_FLY); + ScriptContext2_Disable(); +} + +// theory: another commented out DoBrailleWait and Task_BrailleWait. +void DoBrailleWait(void) +{ + /* + if (!FlagGet(SYS_BRAILLE_WAIT)) + CreateTask(Task_BrailleWait, 0x50); +} + +void Task_BrailleWait(u8 taskId) +{ + s16 *data = gTasks[taskId].data; + + switch (data[0]) + { + case 0: + data[1] = 7200; + data[0] = 1; + break; + case 1: + if (BrailleWait_CheckButtonPress() != FALSE) + { + MenuZeroFillScreen(); + PlaySE(SE_SELECT); + data[0] = 2; + } + else + { + data[1] = data[1] - 1; + if (data[1] == 0) + { + MenuZeroFillScreen(); + data[0] = 3; + data[1] = 30; + } + } + break; + case 2: + if (BrailleWait_CheckButtonPress() == FALSE) + { + data[1] = data[1] - 1; + if (data[1] == 0) + data[0] = 4; + break; + } + sub_8064E2C(); + DestroyTask(taskId); + ScriptContext2_Disable(); + break; + case 3: + data[1] = data[1] - 1; + if (data[1] == 0) + data[0] = 4; + break; + case 4: + sub_8064E2C(); + ScriptContext1_SetupScript(S_OpenRegiceChamber); + DestroyTask(taskId); + break; + } +} + +bool32 BrailleWait_CheckButtonPress(void) +{ + u16 keyMask = A_BUTTON | B_BUTTON | START_BUTTON | SELECT_BUTTON | DPAD_ANY; + + if (gSaveBlock2.optionsButtonMode == OPTIONS_BUTTON_MODE_LR) + keyMask |= L_BUTTON | R_BUTTON; + if (gSaveBlock2.optionsButtonMode == OPTIONS_BUTTON_MODE_L_EQUALS_A) + keyMask |= L_BUTTON; + + if (gMain.newKeys & keyMask) + return TRUE; + else + return FALSE; + */ +} + +// this used to be FldEff_UseFlyAncientTomb . why did GF merge the 2 functions? +bool8 FldEff_UsePuzzleEffect(void) +{ + u8 taskId = oei_task_add(); + + if(gBraillePuzzleCallbackFlag == FLY_PUZZLE) + { + gTasks[taskId].data[8] = (u32)UseFlyAncientTomb_Callback >> 16; + gTasks[taskId].data[9] = (u32)UseFlyAncientTomb_Callback; + } + else + { + gTasks[taskId].data[8] = (u32)UseStrengthDesertRuins_Callback >> 16; + gTasks[taskId].data[9] = (u32)UseStrengthDesertRuins_Callback; + } + return FALSE; +} + +// can't get this one to match due to the weird macro-like varsets with strange bitshifting. +// to note: 0x10000 is loaded in, and its obviously supposed to be 1, but i cant get 0x80 << 9 to be loaded in without using it directly. +// maybe there's some way of writing it that works? +#ifdef NONMATCHING +// ShouldDoBrailleRegicePuzzle +bool8 ShouldDoBrailleRegicePuzzle(void) +{ + u8 i; + + if (gSaveBlock1Ptr->location.mapGroup == 0x18 && gSaveBlock1Ptr->location.mapNum == 0x43) + { + // _08179A1A + if (FlagGet(SYS_BRAILLE_WAIT) != FALSE) + return FALSE; + if (FlagGet(2) == FALSE) + return FALSE; + if (FlagGet(3) == TRUE) + return FALSE; + + for(i = 0; i < 36; i++) + { + if(gSaveBlock1Ptr->pos.x == gUnknown_085EFE74[i][0] && gSaveBlock1Ptr->pos.y == gUnknown_085EFE74[i][1]) + { + if(i < 16) + VarSet(0x403B, (0x10000 << i | VarGet(0x403B) << 16) >> 16); // correct + else if(i < 32) + VarSet(0x403C, (0x10000 << (i - 16) | VarGet(0x403C) << 16) >> 16); // hmm? + else + VarSet(0x403D, (0x10000 << (i - 32) | VarGet(0x403D) << 16) >> 16); // hmm? + + if(VarGet(0x403B) != 0xFFFF || VarGet(0x403C) != 0xFF || VarGet(0x403D) != 0xF) + return FALSE; + + if(gSaveBlock1Ptr->pos.x == 8 && gSaveBlock1Ptr->pos.y == 21) + return TRUE; + else + return FALSE; + } + } + } + // TODO: Find what flags 2 and 3 are. + FlagSet(3); + FlagReset(2); + return FALSE; +} +#else +__attribute__((naked)) +bool8 ShouldDoBrailleRegicePuzzle(void) +{ + asm(".syntax unified\n\ + push {r4-r7,lr}\n\ + mov r7, r9\n\ + mov r6, r8\n\ + push {r6,r7}\n\ + ldr r4, =gSaveBlock1Ptr\n\ + ldr r0, [r4]\n\ + ldrh r1, [r0, 0x4]\n\ + ldr r0, =0x00004318\n\ + cmp r1, r0\n\ + beq _08179A1A\n\ + b _08179B5A\n\ +_08179A1A:\n\ + ldr r0, =0x000008b1\n\ + bl FlagGet\n\ + lsls r0, 24\n\ + cmp r0, 0\n\ + beq _08179A28\n\ + b _08179B5A\n\ +_08179A28:\n\ + movs r0, 0x2\n\ + bl FlagGet\n\ + lsls r0, 24\n\ + cmp r0, 0\n\ + bne _08179A36\n\ + b _08179B5A\n\ +_08179A36:\n\ + movs r0, 0x3\n\ + bl FlagGet\n\ + lsls r0, 24\n\ + lsrs r0, 24\n\ + cmp r0, 0x1\n\ + bne _08179A58\n\ + b _08179B5A\n\ + .pool\n\ +_08179A54:\n\ + movs r0, 0x1\n\ + b _08179B5C\n\ +_08179A58:\n\ + movs r5, 0\n\ + mov r8, r4\n\ + ldr r4, =gUnknown_085EFE74\n\ + adds r0, r4, 0x1\n\ + mov r12, r0\n\ + ldr r6, =0x0000403b\n\ + ldr r1, =0x0000403c\n\ + mov r9, r1\n\ +_08179A68:\n\ + lsls r0, r5, 1\n\ + adds r1, r0, r4\n\ + add r0, r12\n\ + ldrb r3, [r0]\n\ + mov r7, r8\n\ + ldr r2, [r7]\n\ + movs r7, 0\n\ + ldrsh r0, [r2, r7]\n\ + ldrb r1, [r1]\n\ + cmp r0, r1\n\ + bne _08179B44\n\ + movs r1, 0x2\n\ + ldrsh r0, [r2, r1]\n\ + cmp r0, r3\n\ + bne _08179B44\n\ + cmp r5, 0xF\n\ + bhi _08179AB0\n\ + adds r0, r6, 0\n\ + bl VarGet\n\ + lsls r0, 16\n\ + movs r1, 0x80\n\ + lsls r1, 9\n\ + lsls r1, r5\n\ + orrs r1, r0\n\ + lsrs r1, 16\n\ + adds r0, r6, 0\n\ + bl VarSet\n\ + b _08179AF0\n\ + .pool\n\ +_08179AB0:\n\ + cmp r5, 0x1F\n\ + bhi _08179AD2\n\ + mov r0, r9\n\ + bl VarGet\n\ + lsls r0, 16\n\ + adds r2, r5, 0\n\ + subs r2, 0x10\n\ + movs r1, 0x80\n\ + lsls r1, 9\n\ + lsls r1, r2\n\ + orrs r1, r0\n\ + lsrs r1, 16\n\ + mov r0, r9\n\ + bl VarSet\n\ + b _08179AF0\n\ +_08179AD2:\n\ + ldr r4, =0x0000403d\n\ + adds r0, r4, 0\n\ + bl VarGet\n\ + lsls r0, 16\n\ + adds r2, r5, 0\n\ + subs r2, 0x20\n\ + movs r1, 0x80\n\ + lsls r1, 9\n\ + lsls r1, r2\n\ + orrs r1, r0\n\ + lsrs r1, 16\n\ + adds r0, r4, 0\n\ + bl VarSet\n\ +_08179AF0:\n\ + ldr r0, =0x0000403b\n\ + bl VarGet\n\ + lsls r0, 16\n\ + lsrs r4, r0, 16\n\ + ldr r0, =0x0000ffff\n\ + cmp r4, r0\n\ + bne _08179B5A\n\ + ldr r0, =0x0000403c\n\ + bl VarGet\n\ + lsls r0, 16\n\ + lsrs r0, 16\n\ + cmp r0, r4\n\ + bne _08179B5A\n\ + ldr r0, =0x0000403d\n\ + bl VarGet\n\ + lsls r0, 16\n\ + lsrs r0, 16\n\ + cmp r0, 0xF\n\ + bne _08179B5A\n\ + ldr r0, =gSaveBlock1Ptr\n\ + ldr r0, [r0]\n\ + ldr r1, [r0]\n\ + ldr r0, =0x00150008\n\ + cmp r1, r0\n\ + beq _08179A54\n\ + b _08179B5A\n\ + .pool\n\ +_08179B44:\n\ + adds r0, r5, 0x1\n\ + lsls r0, 24\n\ + lsrs r5, r0, 24\n\ + cmp r5, 0x23\n\ + bls _08179A68\n\ + movs r0, 0x3\n\ + bl FlagSet\n\ + movs r0, 0x2\n\ + bl FlagReset\n\ +_08179B5A:\n\ + movs r0, 0\n\ +_08179B5C:\n\ + pop {r3,r4}\n\ + mov r8, r3\n\ + mov r9, r4\n\ + pop {r4-r7}\n\ + pop {r1}\n\ + bx r1\n\ + .syntax divided"); +} +#endif diff --git a/sym_ewram.txt b/sym_ewram.txt index 7848dcc7c..cb42f9e76 100644 --- a/sym_ewram.txt +++ b/sym_ewram.txt @@ -1651,7 +1651,7 @@ gUnknown_0203BCFE: @ 203BCFE gUnknown_0203BD0E: @ 203BD0E .space 0x6 -gUnknown_0203BD14: @ 203BD14 +gBraillePuzzleCallbackFlag: @ 203BD14 .space 0x4 gUnknown_0203BD18: @ 203BD18 From c88a39b5d5e2fbe5548c77a194fb030fb59231f3 Mon Sep 17 00:00:00 2001 From: ProjectRevoTPP Date: Thu, 5 Oct 2017 13:05:25 -0400 Subject: [PATCH 30/42] formatting --- src/braille_puzzles.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/braille_puzzles.c b/src/braille_puzzles.c index 4d28daff4..83d32b56c 100755 --- a/src/braille_puzzles.c +++ b/src/braille_puzzles.c @@ -246,9 +246,9 @@ void sub_8179860(void) bool8 ShouldDoBrailleFlyEffect(void) { - if(!FlagGet(SYS_BRAILLE_FLY) && (gSaveBlock1Ptr->location.mapGroup == 0x18 && gSaveBlock1Ptr->location.mapNum == 0x44)) + if (!FlagGet(SYS_BRAILLE_FLY) && (gSaveBlock1Ptr->location.mapGroup == 0x18 && gSaveBlock1Ptr->location.mapNum == 0x44)) { - if(gSaveBlock1Ptr->pos.x == 8 && gSaveBlock1Ptr->pos.y == 25) + if (gSaveBlock1Ptr->pos.x == 8 && gSaveBlock1Ptr->pos.y == 25) { gBraillePuzzleCallbackFlag = FLY_PUZZLE; return TRUE; } } return FALSE; @@ -362,7 +362,7 @@ bool8 FldEff_UsePuzzleEffect(void) { u8 taskId = oei_task_add(); - if(gBraillePuzzleCallbackFlag == FLY_PUZZLE) + if (gBraillePuzzleCallbackFlag == FLY_PUZZLE) { gTasks[taskId].data[8] = (u32)UseFlyAncientTomb_Callback >> 16; gTasks[taskId].data[9] = (u32)UseFlyAncientTomb_Callback; @@ -394,21 +394,21 @@ bool8 ShouldDoBrailleRegicePuzzle(void) if (FlagGet(3) == TRUE) return FALSE; - for(i = 0; i < 36; i++) + for (i = 0; i < 36; i++) { - if(gSaveBlock1Ptr->pos.x == gUnknown_085EFE74[i][0] && gSaveBlock1Ptr->pos.y == gUnknown_085EFE74[i][1]) + if (gSaveBlock1Ptr->pos.x == gUnknown_085EFE74[i][0] && gSaveBlock1Ptr->pos.y == gUnknown_085EFE74[i][1]) { - if(i < 16) + if (i < 16) VarSet(0x403B, (0x10000 << i | VarGet(0x403B) << 16) >> 16); // correct - else if(i < 32) + else if (i < 32) VarSet(0x403C, (0x10000 << (i - 16) | VarGet(0x403C) << 16) >> 16); // hmm? else VarSet(0x403D, (0x10000 << (i - 32) | VarGet(0x403D) << 16) >> 16); // hmm? - if(VarGet(0x403B) != 0xFFFF || VarGet(0x403C) != 0xFF || VarGet(0x403D) != 0xF) + if (VarGet(0x403B) != 0xFFFF || VarGet(0x403C) != 0xFF || VarGet(0x403D) != 0xF) return FALSE; - if(gSaveBlock1Ptr->pos.x == 8 && gSaveBlock1Ptr->pos.y == 21) + if (gSaveBlock1Ptr->pos.x == 8 && gSaveBlock1Ptr->pos.y == 21) return TRUE; else return FALSE; From 342e616d4b49d1772628947782a931964d36e167 Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Fri, 6 Oct 2017 00:12:01 +0200 Subject: [PATCH 31/42] battle2 more and more and more --- asm/battle_2.s | 2623 +--------------------------------- asm/evolution_scene.s | 14 +- asm/party_menu.s | 2 +- asm/pokemon_item_effect.s | 2 +- data/battle_scripts_1.s | 22 +- data/battle_scripts_2.s | 8 +- data/data2b.s | 4 +- include/battle.h | 54 +- include/evolution_scene.h | 10 + include/pokemon.h | 6 + include/recorded_battle.h | 1 + include/songs.h | 84 +- src/battle_2.c | 896 +++++++++++- src/battle_3.c | 16 +- src/battle_script_commands.c | 54 +- sym_ewram.txt | 4 +- 16 files changed, 1046 insertions(+), 2754 deletions(-) create mode 100644 include/evolution_scene.h diff --git a/asm/battle_2.s b/asm/battle_2.s index 673a0a833..c0d8fd72a 100644 --- a/asm/battle_2.s +++ b/asm/battle_2.s @@ -6,2591 +6,12 @@ .text - thumb_func_start TurnValuesCleanUp -TurnValuesCleanUp: @ 803D580 - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - lsls r0, 24 - lsrs r0, 24 - mov r9, r0 - ldr r1, =gActiveBank - movs r0, 0 - strb r0, [r1] - ldr r0, =gNoOfAllBanks - ldrb r2, [r0] - adds r5, r1, 0 - cmp r2, 0 - beq _0803D678 - ldr r7, =gProtectStructs - adds r6, r5, 0 - ldr r0, =gBattleMons + 0x50 - mov r12, r0 - ldr r1, =gDisableStructs - mov r8, r1 - mov r10, r8 -_0803D5AE: - mov r2, r9 - cmp r2, 0 - beq _0803D5EC - ldrb r1, [r6] - lsls r1, 4 - adds r1, r7 - ldrb r2, [r1] - movs r0, 0x2 - negs r0, r0 - ands r0, r2 - strb r0, [r1] - ldrb r1, [r6] - lsls r1, 4 - adds r1, r7 - ldrb r2, [r1] - movs r0, 0x3 - negs r0, r0 - ands r0, r2 - strb r0, [r1] - b _0803D648 - .pool -_0803D5EC: - ldrb r0, [r6] - lsls r0, 4 - adds r2, r0, r7 - movs r1, 0 - mov r4, r10 - movs r3, 0 -_0803D5F8: - adds r0, r2, r1 - strb r3, [r0] - adds r1, 0x1 - cmp r1, 0xF - bls _0803D5F8 - ldrb r1, [r5] - lsls r0, r1, 3 - subs r0, r1 - lsls r0, 2 - adds r1, r0, r4 - ldrb r0, [r1, 0x16] - cmp r0, 0 - beq _0803D616 - subs r0, 0x1 - strb r0, [r1, 0x16] -_0803D616: - ldrb r1, [r5] - lsls r0, r1, 3 - subs r0, r1 - lsls r0, 2 - adds r1, r0, r4 - ldrb r0, [r1, 0x19] - cmp r0, 0 - beq _0803D648 - subs r0, 0x1 - strb r0, [r1, 0x19] - ldrb r2, [r5] - lsls r0, r2, 3 - subs r0, r2 - lsls r0, 2 - adds r0, r4 - ldrb r0, [r0, 0x19] - cmp r0, 0 - bne _0803D648 - movs r0, 0x58 - muls r2, r0 - add r2, r12 - ldr r0, [r2] - ldr r1, =0xffbfffff - ands r0, r1 - str r0, [r2] -_0803D648: - ldrb r2, [r5] - lsls r0, r2, 3 - subs r0, r2 - lsls r0, 2 - add r0, r8 - ldrb r0, [r0, 0xA] - cmp r0, 0 - bne _0803D666 - movs r0, 0x58 - muls r2, r0 - add r2, r12 - ldr r0, [r2] - ldr r1, =0xfeffffff - ands r0, r1 - str r0, [r2] -_0803D666: - ldrb r0, [r5] - adds r0, 0x1 - strb r0, [r5] - lsls r0, 24 - lsrs r0, 24 - ldr r1, =gNoOfAllBanks - ldrb r1, [r1] - cmp r0, r1 - bcc _0803D5AE -_0803D678: - movs r0, 0 - ldr r2, =gSideTimers - strb r0, [r2, 0x8] - strb r0, [r2, 0x14] - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end TurnValuesCleanUp - - thumb_func_start SpecialStatusesClear -SpecialStatusesClear: @ 803D6A0 - push {r4-r6,lr} - ldr r2, =gActiveBank - movs r0, 0 - strb r0, [r2] - ldr r0, =gNoOfAllBanks - ldrb r1, [r0] - adds r6, r0, 0 - cmp r1, 0 - beq _0803D6DE - adds r3, r2, 0 - movs r4, 0 - ldr r5, =gSpecialStatuses -_0803D6B8: - ldrb r1, [r3] - lsls r0, r1, 2 - adds r0, r1 - lsls r0, 2 - adds r2, r0, r5 - movs r1, 0 -_0803D6C4: - adds r0, r2, r1 - strb r4, [r0] - adds r1, 0x1 - cmp r1, 0x13 - bls _0803D6C4 - ldrb r0, [r3] - adds r0, 0x1 - strb r0, [r3] - lsls r0, 24 - lsrs r0, 24 - ldrb r1, [r6] - cmp r0, r1 - bcc _0803D6B8 -_0803D6DE: - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end SpecialStatusesClear - - thumb_func_start bc_80154A0 -bc_80154A0: @ 803D6F0 - push {r4-r7,lr} - ldr r0, =gHitMarker - ldr r0, [r0] - movs r1, 0x80 - lsls r1, 8 - ands r0, r1 - cmp r0, 0 - bne _0803D7AE - ldr r2, =gBattleStruct - ldr r0, [r2] - adds r0, 0x48 - ldr r1, =gNoOfAllBanks - ldrb r0, [r0] - mov r12, r2 - adds r6, r1, 0 - ldrb r1, [r6] - cmp r0, r1 - bcs _0803D7AE - ldr r5, =gActiveBank - ldr r4, =gBankAttacker - movs r7, 0x84 - lsls r7, 1 -_0803D71C: - ldr r1, [r2] - adds r1, 0x48 - ldrb r0, [r1] - strb r0, [r4] - strb r0, [r5] - ldrb r0, [r1] - adds r0, 0x1 - strb r0, [r1] - ldr r1, =gChosenMovesByBanks - ldrb r3, [r5] - lsls r0, r3, 1 - adds r0, r1 - ldrh r0, [r0] - cmp r0, r7 - bne _0803D7A0 - ldr r1, =gBattleMons - movs r0, 0x58 - muls r0, r3 - adds r1, 0x4C - adds r0, r1 - ldr r0, [r0] - movs r1, 0x7 - ands r0, r1 - cmp r0, 0 - bne _0803D7A0 - ldr r2, =gDisableStructs - ldrb r1, [r4] - lsls r0, r1, 3 - subs r0, r1 - lsls r0, 2 - adds r0, r2 - ldrb r0, [r0, 0x18] - lsls r0, 31 - cmp r0, 0 - bne _0803D7A0 - ldr r0, =gProtectStructs - lsls r1, r3, 4 - adds r1, r0 - ldrb r0, [r1] - lsls r0, 29 - cmp r0, 0 - blt _0803D7A0 - ldr r0, =gUnknown_082DB1FF - bl BattleScriptExecute - b _0803D7E8 - .pool -_0803D7A0: - mov r2, r12 - ldr r0, [r2] - adds r0, 0x48 - ldrb r0, [r0] - ldrb r1, [r6] - cmp r0, r1 - bcc _0803D71C -_0803D7AE: - bl b_clear_atk_up_if_hit_flag_unless_enraged - ldr r1, =gCurrentMoveTurn - movs r0, 0 - strb r0, [r1] - ldr r1, =gFightStateTracker - ldr r0, =gActionsByTurnOrder - movs r3, 0 - ldrb r0, [r0] - strb r0, [r1] - ldr r0, =gDynamicBasePower - movs r2, 0 - strh r3, [r0] - ldr r0, =gBattleStruct - ldr r0, [r0] - strb r2, [r0, 0x13] - ldr r1, =gBattleMainFunc - ldr r0, =bc_bs_exec - str r0, [r1] - ldr r0, =gBattleCommunication - strb r2, [r0, 0x3] - strb r2, [r0, 0x4] - ldr r0, =gBattleScripting - strb r2, [r0, 0x16] - ldr r0, =gBattleResources - ldr r0, [r0] - ldr r0, [r0, 0x8] - adds r0, 0x20 - strb r2, [r0] -_0803D7E8: - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end bc_80154A0 - - thumb_func_start bc_bs_exec -bc_bs_exec: @ 803D818 - push {r4-r6,lr} - ldr r6, =gBattleOutcome - ldrb r0, [r6] - ldr r2, =gFightStateTracker - cmp r0, 0 - beq _0803D828 - movs r0, 0xC - strb r0, [r2] -_0803D828: - ldr r5, =gBattleStruct - ldr r0, [r5] - adds r0, 0x4B - ldr r4, =gCurrentMoveTurn - ldrb r1, [r4] - strb r1, [r0] - ldr r1, =gUnknown_0831BC0C - ldrb r0, [r2] - lsls r0, 2 - adds r0, r1 - ldr r0, [r0] - bl _call_via_r0 - ldr r0, =gNoOfAllBanks - ldrb r1, [r4] - ldrb r0, [r0] - cmp r1, r0 - bcc _0803D894 - ldr r2, =gHitMarker - ldr r0, [r2] - ldr r1, =0xffefffff - ands r0, r1 - str r0, [r2] - ldr r3, =gBattleMainFunc - ldr r2, =gUnknown_0831BC44 - ldrb r1, [r6] - movs r0, 0x7F - ands r0, r1 - lsls r0, 2 - adds r0, r2 - ldr r0, [r0] - str r0, [r3] - b _0803D8AC - .pool -_0803D894: - ldr r0, [r5] - adds r0, 0x4B - ldrb r0, [r0] - cmp r0, r1 - beq _0803D8AC - ldr r2, =gHitMarker - ldr r0, [r2] - ldr r1, =0xfffffdff - ands r0, r1 - ldr r1, =0xfff7ffff - ands r0, r1 - str r0, [r2] -_0803D8AC: - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end bc_bs_exec - - thumb_func_start HandleEndTurn_BattleWon -HandleEndTurn_BattleWon: @ 803D8C0 - push {r4,lr} - ldr r1, =gFightStateTracker - movs r0, 0 - strb r0, [r1] - ldr r1, =gBattleTypeFlags - ldr r2, [r1] - ldr r0, =0x02000002 - ands r0, r2 - cmp r0, 0 - beq _0803D920 - ldr r1, =gScriptResult - ldr r4, =gBattleOutcome - ldrb r0, [r4] - strh r0, [r1] - ldr r1, =gBattleTextBuff1 - ldrb r0, [r4] - strb r0, [r1] - movs r0, 0 - bl GetBankByIdentity - ldr r1, =gBankAttacker - strb r0, [r1] - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DAA35 - str r0, [r1] - ldrb r1, [r4] - movs r0, 0x7F - ands r0, r1 - strb r0, [r4] - b _0803DAA4 - .pool -_0803D920: - movs r0, 0x8 - ands r0, r2 - cmp r0, 0 - beq _0803D95C - ldr r0, =0x043f0900 - ands r2, r0 - cmp r2, 0 - beq _0803D95C - bl BattleMusicStop - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DAA87 - str r0, [r1] - ldr r0, =gTrainerBattleOpponent_A - ldrh r1, [r0] - ldr r0, =0x000003fe - cmp r1, r0 - bne _0803D946 - b _0803DA8A -_0803D946: - b _0803DA94 - .pool -_0803D95C: - ldr r0, [r1] - movs r1, 0xA - ands r0, r1 - cmp r0, 0x8 - beq _0803D968 - b _0803DA9E -_0803D968: - bl BattleMusicStop - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DA92D - str r0, [r1] - ldr r2, =gTrainers - ldr r0, =gTrainerBattleOpponent_A - ldrh r1, [r0] - lsls r0, r1, 2 - adds r0, r1 - lsls r0, 3 - adds r0, r2 - ldrb r0, [r0, 0x1] - subs r0, 0x3 - cmp r0, 0x32 - bls _0803D98A - b _0803DA94 -_0803D98A: - lsls r0, 2 - ldr r1, =_0803D9A8 - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .pool - .align 2, 0 -_0803D9A8: - .4byte _0803DA80 - .4byte _0803DA94 - .4byte _0803DA94 - .4byte _0803DA94 - .4byte _0803DA94 - .4byte _0803DA94 - .4byte _0803DA80 - .4byte _0803DA94 - .4byte _0803DA80 - .4byte _0803DA94 - .4byte _0803DA80 - .4byte _0803DA94 - .4byte _0803DA94 - .4byte _0803DA94 - .4byte _0803DA94 - .4byte _0803DA94 - .4byte _0803DA94 - .4byte _0803DA94 - .4byte _0803DA94 - .4byte _0803DA94 - .4byte _0803DA94 - .4byte _0803DA94 - .4byte _0803DA94 - .4byte _0803DA94 - .4byte _0803DA94 - .4byte _0803DA94 - .4byte _0803DA94 - .4byte _0803DA94 - .4byte _0803DA74 - .4byte _0803DA8A - .4byte _0803DA94 - .4byte _0803DA94 - .4byte _0803DA94 - .4byte _0803DA94 - .4byte _0803DA94 - .4byte _0803DA74 - .4byte _0803DA94 - .4byte _0803DA94 - .4byte _0803DA94 - .4byte _0803DA94 - .4byte _0803DA94 - .4byte _0803DA94 - .4byte _0803DA94 - .4byte _0803DA94 - .4byte _0803DA94 - .4byte _0803DA94 - .4byte _0803DA80 - .4byte _0803DA94 - .4byte _0803DA94 - .4byte _0803DA94 - .4byte _0803DA80 -_0803DA74: - ldr r0, =0x00000163 - bl PlayBGM - b _0803DAA4 - .pool -_0803DA80: - movs r0, 0xD4 - lsls r0, 1 - bl PlayBGM - b _0803DAA4 -_0803DA8A: - movs r0, 0xB1 - lsls r0, 1 - bl PlayBGM - b _0803DAA4 -_0803DA94: - movs r0, 0xCE - lsls r0, 1 - bl PlayBGM - b _0803DAA4 -_0803DA9E: - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DA96A - str r0, [r1] -_0803DAA4: - ldr r1, =gBattleMainFunc - ldr r0, =HandleEndTurn_FinishBattle - str r0, [r1] - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end HandleEndTurn_BattleWon - - thumb_func_start HandleEndTurn_BattleLost -HandleEndTurn_BattleLost: @ 803DAC0 - push {r4,lr} - ldr r1, =gFightStateTracker - movs r0, 0 - strb r0, [r1] - ldr r0, =gBattleTypeFlags - ldr r1, [r0] - ldr r0, =0x02000002 - ands r0, r1 - cmp r0, 0 - beq _0803DB7C - ldr r0, =0x003f0100 - ands r1, r0 - cmp r1, 0 - beq _0803DB44 - ldr r3, =gBattleOutcome - ldrb r2, [r3] - movs r0, 0x80 - ands r0, r2 - cmp r0, 0 - beq _0803DB2C - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DB9C8 - str r0, [r1] - movs r0, 0x7F - ands r0, r2 - strb r0, [r3] - ldr r0, =gSaveBlock2Ptr - ldr r1, [r0] - ldr r0, =0x00000ca9 - adds r1, r0 - ldrb r0, [r1] - movs r2, 0x8 - orrs r0, r2 - strb r0, [r1] - b _0803DB82 - .pool -_0803DB2C: - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DAA0B - str r0, [r1] - movs r0, 0x7F - ands r0, r2 - strb r0, [r3] - b _0803DB82 - .pool -_0803DB44: - ldr r1, =gBattleTextBuff1 - ldr r4, =gBattleOutcome - ldrb r0, [r4] - strb r0, [r1] - movs r0, 0 - bl GetBankByIdentity - ldr r1, =gBankAttacker - strb r0, [r1] - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DAA35 - str r0, [r1] - ldrb r1, [r4] - movs r0, 0x7F - ands r0, r1 - strb r0, [r4] - b _0803DB82 - .pool -_0803DB7C: - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DA96D - str r0, [r1] -_0803DB82: - ldr r1, =gBattleMainFunc - ldr r0, =HandleEndTurn_FinishBattle - str r0, [r1] - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end HandleEndTurn_BattleLost - - thumb_func_start HandleEndTurn_RanFromBattle -HandleEndTurn_RanFromBattle: @ 803DBA0 - push {lr} - ldr r1, =gFightStateTracker - movs r0, 0 - strb r0, [r1] - ldr r1, =gBattleTypeFlags - ldr r2, [r1] - ldr r0, =0x003f0100 - ands r0, r2 - cmp r0, 0 - beq _0803DBFC - movs r0, 0x8 - ands r2, r0 - cmp r2, 0 - beq _0803DBFC - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DB9C1 - str r0, [r1] - ldr r1, =gBattleOutcome - movs r0, 0x9 - strb r0, [r1] - ldr r0, =gSaveBlock2Ptr - ldr r1, [r0] - ldr r0, =0x00000ca9 - adds r1, r0 - ldrb r0, [r1] - movs r2, 0x8 - orrs r0, r2 - strb r0, [r1] - b _0803DC6A - .pool -_0803DBFC: - ldr r0, [r1] - movs r1, 0x80 - lsls r1, 19 - ands r0, r1 - cmp r0, 0 - beq _0803DC24 - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DB9C1 - str r0, [r1] - ldr r1, =gBattleOutcome - movs r0, 0x9 - strb r0, [r1] - b _0803DC6A - .pool -_0803DC24: - ldr r1, =gProtectStructs - ldr r0, =gBankAttacker - ldrb r0, [r0] - lsls r0, 4 - adds r0, r1 - ldrb r0, [r0, 0x1] - lsls r0, 27 - lsrs r0, 30 - cmp r0, 0x1 - beq _0803DC54 - cmp r0, 0x2 - beq _0803DC64 - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DAAF0 - b _0803DC68 - .pool -_0803DC54: - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DAADB - b _0803DC68 - .pool -_0803DC64: - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DAAE9 -_0803DC68: - str r0, [r1] -_0803DC6A: - ldr r1, =gBattleMainFunc - ldr r0, =HandleEndTurn_FinishBattle - str r0, [r1] - pop {r0} - bx r0 - .pool - thumb_func_end HandleEndTurn_RanFromBattle - - thumb_func_start HandleEndTurn_MonFled -HandleEndTurn_MonFled: @ 803DC84 - ldr r1, =gFightStateTracker - movs r0, 0 - strb r0, [r1] - ldr r1, =gBattleTextBuff1 - movs r0, 0xFD - strb r0, [r1] - movs r0, 0x7 - strb r0, [r1, 0x1] - ldr r2, =gBankAttacker - ldrb r0, [r2] - strb r0, [r1, 0x2] - ldr r3, =gBattlePartyID - ldrb r0, [r2] - lsls r0, 1 - adds r0, r3 - ldrh r0, [r0] - strb r0, [r1, 0x3] - movs r0, 0xFF - strb r0, [r1, 0x4] - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DAAF7 - str r0, [r1] - ldr r1, =gBattleMainFunc - ldr r0, =HandleEndTurn_FinishBattle - str r0, [r1] - bx lr - .pool - thumb_func_end HandleEndTurn_MonFled - - thumb_func_start HandleEndTurn_FinishBattle -HandleEndTurn_FinishBattle: @ 803DCD8 - push {r4-r7,lr} - mov r7, r8 - push {r7} - ldr r0, =gFightStateTracker - ldrb r0, [r0] - subs r0, 0xB - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x1 - bls _0803DCEE - b _0803DE10 -_0803DCEE: - ldr r0, =gBattleTypeFlags - ldr r1, [r0] - ldr r0, =0x023f0b92 - ands r1, r0 - cmp r1, 0 - bne _0803DDB6 - ldr r2, =gActiveBank - strb r1, [r2] - ldr r0, =gNoOfAllBanks - ldrb r0, [r0] - cmp r1, r0 - bcs _0803DDB2 - adds r5, r2, 0 - ldr r0, =gBattlePartyID - mov r8, r0 - movs r7, 0x64 - ldr r6, =gPlayerParty -_0803DD10: - ldrb r0, [r5] - bl GetBankSide - lsls r0, 24 - cmp r0, 0 - bne _0803DDA0 - ldr r4, =gBattleResults - ldrh r0, [r4, 0x6] - cmp r0, 0 - bne _0803DD74 - ldrb r0, [r5] - lsls r0, 1 - add r0, r8 - ldrh r0, [r0] - muls r0, r7 - adds r0, r6 - movs r1, 0xB - movs r2, 0 - bl GetMonData - strh r0, [r4, 0x6] - ldrb r0, [r5] - lsls r0, 1 - add r0, r8 - ldrh r0, [r0] - muls r0, r7 - adds r0, r6 - movs r1, 0x2 - adds r2, r4, 0 - adds r2, 0x8 - bl GetMonData - b _0803DDA0 - .pool -_0803DD74: - ldrb r0, [r5] - lsls r0, 1 - add r0, r8 - ldrh r0, [r0] - muls r0, r7 - adds r0, r6 - movs r1, 0xB - movs r2, 0 - bl GetMonData - strh r0, [r4, 0x26] - ldrb r0, [r5] - lsls r0, 1 - add r0, r8 - ldrh r0, [r0] - muls r0, r7 - adds r0, r6 - movs r1, 0x2 - adds r2, r4, 0 - adds r2, 0x14 - bl GetMonData -_0803DDA0: - ldrb r0, [r5] - adds r0, 0x1 - strb r0, [r5] - ldr r1, =gNoOfAllBanks - lsls r0, 24 - lsrs r0, 24 - ldrb r1, [r1] - cmp r0, r1 - bcc _0803DD10 -_0803DDB2: - bl sub_80EC728 -_0803DDB6: - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - ldr r1, =0x023f0b9a - ands r0, r1 - cmp r0, 0 - bne _0803DDD2 - ldr r0, =gBattleResults - ldrb r1, [r0, 0x5] - movs r0, 0x40 - ands r0, r1 - cmp r0, 0 - beq _0803DDD2 - bl sub_80EE184 -_0803DDD2: - bl sub_8186444 - movs r0, 0x3 - bl BeginFastPaletteFade - movs r0, 0x5 - bl FadeOutMapMusic - ldr r1, =gBattleMainFunc - ldr r0, =sub_803DE40 - str r0, [r1] - ldr r1, =gUnknown_030061E8 - ldr r0, =BattleMainCB2 - str r0, [r1] - b _0803DE2A - .pool -_0803DE10: - ldr r0, =gBattleExecBuffer - ldr r0, [r0] - cmp r0, 0 - bne _0803DE2A - ldr r1, =gBattleScriptingCommandsTable - ldr r0, =gBattlescriptCurrInstr - ldr r0, [r0] - ldrb r0, [r0] - lsls r0, 2 - adds r0, r1 - ldr r0, [r0] - bl _call_via_r0 -_0803DE2A: - pop {r3} - mov r8, r3 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end HandleEndTurn_FinishBattle - - thumb_func_start sub_803DE40 -sub_803DE40: @ 803DE40 - push {lr} - ldr r0, =gPaletteFade - ldrb r1, [r0, 0x7] - movs r0, 0x80 - ands r0, r1 - cmp r0, 0 - bne _0803DE86 - bl ResetSpriteData - ldr r0, =gLeveledUpInBattle - ldrb r0, [r0] - cmp r0, 0 - beq _0803DE62 - ldr r0, =gBattleOutcome - ldrb r0, [r0] - cmp r0, 0x1 - beq _0803DE80 -_0803DE62: - ldr r1, =gBattleMainFunc - ldr r0, =c4_overworld - str r0, [r1] - b _0803DEA2 - .pool -_0803DE80: - ldr r1, =gBattleMainFunc - ldr r0, =bc_evolution_cutscene - str r0, [r1] -_0803DE86: - bl FreeAllWindowBuffers - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - movs r1, 0x2 - ands r0, r1 - cmp r0, 0 - bne _0803DEA2 - bl FreeMonSpritesGfx - bl FreeBattleResources - bl FreeBattleSpritesData -_0803DEA2: - pop {r0} - bx r0 - .pool - thumb_func_end sub_803DE40 - - thumb_func_start bc_evolution_cutscene -bc_evolution_cutscene: @ 803DEB4 - push {r4-r6,lr} - ldr r0, =gLeveledUpInBattle - ldrb r1, [r0] - adds r3, r0, 0 - cmp r1, 0 - beq _0803DF2E -_0803DEC0: - movs r6, 0 -_0803DEC2: - ldrb r2, [r3] - ldr r0, =gBitTable - lsls r1, r6, 2 - adds r1, r0 - ldr r1, [r1] - adds r0, r2, 0 - ands r0, r1 - cmp r0, 0 - beq _0803DF20 - bics r2, r1 - strb r2, [r3] - movs r0, 0x64 - adds r1, r6, 0 - muls r1, r0 - ldr r0, =gPlayerParty - adds r5, r1, r0 - adds r0, r5, 0 - movs r1, 0 - bl GetEvolutionTargetSpecies - lsls r0, 16 - lsrs r4, r0, 16 - cmp r4, 0 - beq _0803DF20 - bl FreeAllWindowBuffers - ldr r0, =gBattleMainFunc - ldr r1, =sub_803DF48 - str r1, [r0] - lsls r3, r6, 24 - lsrs r3, 24 - adds r0, r5, 0 - adds r1, r4, 0 - movs r2, 0x1 - bl evolution_cutscene - b _0803DF34 - .pool -_0803DF20: - adds r6, 0x1 - ldr r3, =gLeveledUpInBattle - cmp r6, 0x5 - ble _0803DEC2 - ldrb r0, [r3] - cmp r0, 0 - bne _0803DEC0 -_0803DF2E: - ldr r1, =gBattleMainFunc - ldr r0, =c4_overworld - str r0, [r1] -_0803DF34: - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end bc_evolution_cutscene - - thumb_func_start sub_803DF48 -sub_803DF48: @ 803DF48 - push {lr} - ldr r0, =gMain - ldr r1, [r0, 0x4] - ldr r0, =BattleMainCB2 - cmp r1, r0 - bne _0803DF5A - ldr r1, =gBattleMainFunc - ldr r0, =bc_evolution_cutscene - str r0, [r1] -_0803DF5A: - pop {r0} - bx r0 - .pool - thumb_func_end sub_803DF48 - - thumb_func_start c4_overworld -c4_overworld: @ 803DF70 - push {r4-r6,lr} - ldr r6, =gBattleTypeFlags - ldr r0, [r6] - movs r5, 0x2 - ands r0, r5 - cmp r0, 0 - bne _0803DF8C - ldr r4, =gPlayerParty - adds r0, r4, 0 - bl RandomlyGivePartyPokerus - adds r0, r4, 0 - bl PartySpreadPokerus -_0803DF8C: - ldr r4, [r6] - adds r0, r4, 0 - ands r0, r5 - cmp r0, 0 - beq _0803DF9E - ldr r0, =gReceivedRemoteLinkPlayers - ldrb r0, [r0] - cmp r0, 0 - bne _0803DFEC -_0803DF9E: - ldr r1, =gScriptResult - ldr r5, =gBattleOutcome - ldrb r0, [r5] - strh r0, [r1] - ldr r3, =gMain - ldr r0, =0x00000439 - adds r2, r3, r0 - ldrb r1, [r2] - movs r0, 0x3 - negs r0, r0 - ands r0, r1 - strb r0, [r2] - ldr r0, =gPreBattleCallback1 - ldr r0, [r0] - str r0, [r3] - movs r0, 0x80 - lsls r0, 3 - ands r4, r0 - cmp r4, 0 - beq _0803DFDE - ldr r0, =gEnemyParty - bl UpdateRoamerHPStatus - ldrb r1, [r5] - movs r0, 0x1 - ands r0, r1 - cmp r0, 0 - bne _0803DFDA - cmp r1, 0x7 - bne _0803DFDE -_0803DFDA: - bl SetRoamerInactive -_0803DFDE: - movs r0, 0x5A - bl m4aSongNumStop - ldr r0, =gMain - ldr r0, [r0, 0x8] - bl SetMainCallback2 -_0803DFEC: - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end c4_overworld - - thumb_func_start bc_move_exec_returning -bc_move_exec_returning: @ 803E018 - push {lr} - ldr r0, =gFightStateTracker - ldrb r0, [r0] - subs r0, 0xB - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x1 - bhi _0803E060 - ldr r3, =gBattleResources - ldr r0, [r3] - ldr r0, [r0, 0xC] - adds r1, r0, 0 - adds r1, 0x20 - ldrb r0, [r1] - cmp r0, 0 - beq _0803E03C - subs r0, 0x1 - strb r0, [r1] -_0803E03C: - ldr r2, =gBattleMainFunc - ldr r0, [r3] - ldr r1, [r0, 0xC] - adds r0, r1, 0 - adds r0, 0x20 - ldrb r0, [r0] - lsls r0, 2 - adds r1, r0 - ldr r0, [r1] - str r0, [r2] - b _0803E07A - .pool -_0803E060: - ldr r0, =gBattleExecBuffer - ldr r0, [r0] - cmp r0, 0 - bne _0803E07A - ldr r1, =gBattleScriptingCommandsTable - ldr r0, =gBattlescriptCurrInstr - ldr r0, [r0] - ldrb r0, [r0] - lsls r0, 2 - adds r0, r1 - ldr r0, [r0] - bl _call_via_r0 -_0803E07A: - pop {r0} - bx r0 - .pool - thumb_func_end bc_move_exec_returning - - thumb_func_start sub_803E08C -sub_803E08C: @ 803E08C - push {lr} - ldr r0, =gBattleExecBuffer - ldr r0, [r0] - cmp r0, 0 - bne _0803E0A8 - ldr r1, =gBattleScriptingCommandsTable - ldr r0, =gBattlescriptCurrInstr - ldr r0, [r0] - ldrb r0, [r0] - lsls r0, 2 - adds r0, r1 - ldr r0, [r0] - bl _call_via_r0 -_0803E0A8: - pop {r0} - bx r0 - .pool - thumb_func_end sub_803E08C - - thumb_func_start sub_803E0B8 -sub_803E0B8: @ 803E0B8 - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - sub sp, 0x4 - movs r0, 0x4 - str r0, [sp] - ldr r6, =gBankAttacker - ldr r1, =gBanksByTurnOrder - ldr r0, =gCurrentMoveTurn - ldrb r0, [r0] - adds r0, r1 - ldrb r0, [r0] - strb r0, [r6] - ldr r1, =gBattleStruct - ldr r3, [r1] - adds r0, r3, 0 - adds r0, 0x91 - ldrb r2, [r0] - ldr r1, =gBitTable - ldrb r0, [r6] - lsls r0, 2 - adds r0, r1 - ldr r0, [r0] - ands r2, r0 - cmp r2, 0 - beq _0803E110 - ldr r1, =gFightStateTracker - movs r0, 0xC - b _0803E83C - .pool -_0803E110: - ldr r1, =gCritMultiplier - movs r0, 0x1 - strb r0, [r1] - ldr r1, =gBattleScripting - movs r0, 0x1 - strb r0, [r1, 0xE] - ldr r5, =0x000001a3 - adds r0, r3, r5 - strb r2, [r0] - ldr r0, =gBattleMoveFlags - strb r2, [r0] - ldr r0, =gMultiHitCounter - strb r2, [r0] - ldr r0, =gBattleCommunication - strb r2, [r0, 0x6] - ldr r2, =gCurrMovePos - ldr r0, =gUnknown_020241E9 - mov r9, r0 - ldrb r0, [r6] - ldr r3, =gBattleStruct - ldr r1, [r3] - adds r0, r1 - adds r0, 0x80 - ldrb r0, [r0] - mov r5, r9 - strb r0, [r5] - strb r0, [r2] - ldr r1, =gProtectStructs - ldrb r4, [r6] - lsls r0, r4, 4 - adds r3, r0, r1 - ldrb r1, [r3] - lsls r0, r1, 29 - mov r8, r2 - cmp r0, 0 - bge _0803E1BC - movs r0, 0x5 - negs r0, r0 - ands r0, r1 - strb r0, [r3] - ldr r2, =gCurrentMove - ldr r1, =gLastUsedMove - movs r0, 0xA5 - strh r0, [r1] - strh r0, [r2] - ldr r2, =gHitMarker - ldr r0, [r2] - movs r1, 0x80 - lsls r1, 4 - orrs r0, r1 - str r0, [r2] - movs r0, 0xA5 - movs r1, 0 - bl GetMoveTarget - ldrb r1, [r6] - ldr r3, =gBattleStruct - ldr r2, [r3] - b _0803E316 - .pool -_0803E1BC: - ldr r5, =gBattleMons - mov r10, r5 - movs r0, 0x58 - adds r5, r4, 0 - muls r5, r0 - mov r0, r10 - adds r0, 0x50 - adds r0, r5, r0 - ldr r1, [r0] - movs r0, 0x80 - lsls r0, 5 - ands r0, r1 - cmp r0, 0 - bne _0803E1E2 - movs r7, 0x80 - lsls r7, 15 - ands r7, r1 - cmp r7, 0 - beq _0803E204 -_0803E1E2: - ldr r3, =gCurrentMove - ldr r2, =gLastUsedMove - ldr r1, =gLockedMoves - lsls r0, r4, 1 - adds r0, r1 - ldrh r0, [r0] - strh r0, [r2] - strh r0, [r3] - b _0803E33C - .pool -_0803E204: - ldr r1, =gDisableStructs - mov r12, r1 - lsls r0, r4, 3 - subs r0, r4 - lsls r0, 2 - add r0, r12 - ldrh r3, [r0, 0x6] - adds r1, r3, 0 - cmp r1, 0 - beq _0803E2DC - ldrb r2, [r0, 0xC] - lsls r0, r2, 1 - adds r0, r5 - mov r4, r10 - adds r4, 0xC - adds r0, r4 - ldrh r0, [r0] - cmp r1, r0 - bne _0803E268 - ldr r2, =gCurrentMove - ldr r0, =gLastUsedMove - strh r3, [r0] - strh r3, [r2] - ldrb r1, [r6] - lsls r0, r1, 3 - subs r0, r1 - lsls r0, 2 - add r0, r12 - ldrb r0, [r0, 0xC] - mov r3, r9 - strb r0, [r3] - mov r5, r8 - strb r0, [r5] - ldrh r0, [r2] - movs r1, 0 - bl GetMoveTarget - ldrb r1, [r6] - ldr r3, =gBattleStruct - ldr r2, [r3] - b _0803E316 - .pool -_0803E268: - cmp r1, 0 - beq _0803E2DC - cmp r1, r0 - beq _0803E2DC - mov r5, r9 - strb r2, [r5] - mov r0, r8 - strb r2, [r0] - ldr r3, =gCurrentMove - ldr r2, =gLastUsedMove - ldrb r0, [r0] - lsls r0, 1 - ldrb r1, [r6] - movs r5, 0x58 - muls r1, r5 - adds r0, r1 - adds r0, r4 - ldrh r0, [r0] - strh r0, [r2] - strh r0, [r3] - ldrb r1, [r6] - lsls r0, r1, 3 - subs r0, r1 - lsls r0, 2 - add r0, r12 - movs r2, 0 - strh r7, [r0, 0x6] - ldrb r1, [r6] - lsls r0, r1, 3 - subs r0, r1 - lsls r0, 2 - add r0, r12 - strb r2, [r0, 0xC] - ldrb r0, [r6] - lsls r1, r0, 3 - subs r1, r0 - lsls r1, 2 - add r1, r12 - ldrb r2, [r1, 0xE] - movs r0, 0x10 - negs r0, r0 - ands r0, r2 - strb r0, [r1, 0xE] - ldrh r0, [r3] - movs r1, 0 - bl GetMoveTarget - ldrb r1, [r6] - ldr r3, =gBattleStruct - ldr r2, [r3] - b _0803E316 - .pool -_0803E2DC: - ldr r3, =gBattleMons - mov r5, r8 - ldrb r0, [r5] - lsls r0, 1 - ldr r4, =gBankAttacker - ldrb r2, [r4] - movs r1, 0x58 - muls r1, r2 - adds r0, r1 - adds r3, 0xC - adds r0, r3 - ldr r1, =gChosenMovesByBanks - lsls r2, 1 - adds r2, r1 - ldrh r3, [r0] - ldrh r2, [r2] - cmp r3, r2 - beq _0803E334 - ldr r1, =gCurrentMove - ldr r0, =gLastUsedMove - strh r3, [r0] - strh r3, [r1] - ldrh r0, [r1] - movs r1, 0 - bl GetMoveTarget - ldrb r1, [r4] - ldr r2, =gBattleStruct - ldr r2, [r2] -_0803E316: - adds r1, r2 - strb r0, [r1, 0xC] - b _0803E33C - .pool -_0803E334: - ldr r1, =gCurrentMove - ldr r0, =gLastUsedMove - strh r3, [r0] - strh r3, [r1] -_0803E33C: - ldr r2, =gBattleMons - ldr r1, =gBankAttacker - ldrb r3, [r1] - movs r0, 0x58 - muls r0, r3 - adds r0, r2 - ldrh r0, [r0, 0x28] - mov r8, r1 - cmp r0, 0 - beq _0803E384 - adds r0, r3, 0 - bl GetBankSide - lsls r0, 24 - cmp r0, 0 - bne _0803E37C - ldr r0, =gBattleResults - ldr r1, =gCurrentMove - ldrh r1, [r1] - strh r1, [r0, 0x22] - b _0803E384 - .pool -_0803E37C: - ldr r0, =gBattleResults - ldr r1, =gCurrentMove - ldrh r1, [r1] - strh r1, [r0, 0x24] -_0803E384: - mov r1, r8 - ldrb r0, [r1] - bl GetBankSide - movs r1, 0x1 - eors r0, r1 - lsls r0, 24 - lsrs r6, r0, 24 - ldr r1, =gSideTimers - lsls r0, r6, 1 - adds r0, r6 - lsls r0, 2 - adds r5, r0, r1 - ldrb r0, [r5, 0x8] - cmp r0, 0 - beq _0803E400 - ldr r2, =gBattleMoves - ldr r0, =gCurrentMove - ldrh r1, [r0] - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 2 - adds r0, r2 - ldrb r0, [r0, 0x6] - cmp r0, 0 - bne _0803E400 - mov r3, r8 - ldrb r0, [r3] - bl GetBankSide - adds r4, r0, 0 - ldrb r0, [r5, 0x9] - bl GetBankSide - lsls r4, 24 - lsls r0, 24 - cmp r4, r0 - beq _0803E400 - ldr r1, =gBattleMons - ldrb r2, [r5, 0x9] - movs r0, 0x58 - muls r0, r2 - adds r0, r1 - ldrh r0, [r0, 0x28] - cmp r0, 0 - beq _0803E400 - ldr r0, =gBankTarget - strb r2, [r0] - b _0803E76A - .pool -_0803E400: - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - movs r1, 0x1 - ands r0, r1 - ldr r5, =gBankAttacker - mov r8, r5 - cmp r0, 0 - bne _0803E412 - b _0803E6E0 -_0803E412: - ldr r1, =gSideTimers - lsls r0, r6, 1 - adds r0, r6 - lsls r0, 2 - adds r0, r1 - ldrb r5, [r0, 0x8] - cmp r5, 0 - beq _0803E424 - b _0803E630 -_0803E424: - ldr r2, =gBattleMoves - ldr r0, =gCurrentMove - ldrh r1, [r0] - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 2 - adds r4, r0, r2 - ldrb r0, [r4, 0x1] - cmp r0, 0 - bne _0803E440 - ldrb r0, [r4, 0x6] - cmp r0, 0x10 - bne _0803E440 - b _0803E630 -_0803E440: - ldr r3, =gBattleMons - ldr r2, =gBankAttacker - ldrb r6, [r2] - ldr r0, =gBattleStruct - ldr r0, [r0] - adds r0, r6, r0 - ldrb r1, [r0, 0xC] - movs r0, 0x58 - muls r0, r1 - adds r0, r3 - adds r0, 0x20 - ldrb r0, [r0] - mov r8, r2 - cmp r0, 0x1F - bne _0803E460 - b _0803E630 -_0803E460: - ldrb r0, [r4, 0x2] - cmp r0, 0xD - beq _0803E468 - b _0803E630 -_0803E468: - adds r0, r6, 0 - bl GetBankSide - lsls r0, 24 - lsrs r6, r0, 24 - ldr r1, =gActiveBank - strb r5, [r1] - ldr r0, =gNoOfAllBanks - ldrb r0, [r0] - cmp r5, r0 - bcs _0803E4E0 - adds r4, r1, 0 -_0803E480: - ldrb r0, [r4] - bl GetBankSide - lsls r0, 24 - lsrs r0, 24 - cmp r6, r0 - beq _0803E4CE - ldr r0, =gBankAttacker - ldrb r1, [r0] - ldr r0, =gBattleStruct - ldr r0, [r0] - adds r1, r0 - ldrb r0, [r1, 0xC] - ldrb r1, [r4] - cmp r0, r1 - beq _0803E4CE - ldr r1, =gBattleMons - ldrb r2, [r4] - movs r0, 0x58 - muls r0, r2 - adds r0, r1 - adds r0, 0x20 - ldrb r0, [r0] - cmp r0, 0x1F - bne _0803E4CE - adds r0, r2, 0 - bl BankGetTurnOrder - lsls r0, 24 - lsrs r0, 24 - ldr r3, [sp] - cmp r0, r3 - bcs _0803E4CE - ldrb r0, [r4] - bl BankGetTurnOrder - lsls r0, 24 - lsrs r0, 24 - str r0, [sp] -_0803E4CE: - ldrb r0, [r4] - adds r0, 0x1 - strb r0, [r4] - ldr r1, =gNoOfAllBanks - lsls r0, 24 - lsrs r0, 24 - ldrb r1, [r1] - cmp r0, r1 - bcc _0803E480 -_0803E4E0: - ldr r5, [sp] - cmp r5, 0x4 - beq _0803E4E8 - b _0803E5E2 -_0803E4E8: - ldr r2, =gBattleMoves - ldr r0, =gLastUsedMove - ldrh r1, [r0] - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 2 - adds r0, r2 - ldrb r0, [r0, 0x6] - ands r5, r0 - cmp r5, 0 - beq _0803E568 - ldr r0, =gBankAttacker - ldrb r0, [r0] - bl GetBankSide - lsls r0, 24 - cmp r0, 0 - bne _0803E548 - bl Random - movs r1, 0x1 - ands r1, r0 - cmp r1, 0 - beq _0803E544 - movs r0, 0x1 - b _0803E55A - .pool -_0803E544: - movs r0, 0x3 - b _0803E55A -_0803E548: - bl Random - movs r1, 0x1 - ands r1, r0 - cmp r1, 0 - beq _0803E558 - movs r0, 0 - b _0803E55A -_0803E558: - movs r0, 0x2 -_0803E55A: - bl GetBankByIdentity - ldr r1, =gBankTarget - strb r0, [r1] - b _0803E578 - .pool -_0803E568: - ldr r2, =gBankTarget - ldr r0, =gBankAttacker - ldrb r0, [r0] - ldr r1, =gBattleStruct - ldr r1, [r1] - adds r0, r1 - ldrb r0, [r0, 0xC] - strb r0, [r2] -_0803E578: - ldr r7, =gAbsentBankFlags - ldrb r0, [r7] - ldr r1, =gBitTable - mov r8, r1 - ldr r5, =gBankTarget - ldrb r1, [r5] - lsls r1, 2 - add r1, r8 - ldr r1, [r1] - ands r0, r1 - cmp r0, 0 - bne _0803E592 - b _0803E76A -_0803E592: - ldr r6, =gBankAttacker - ldrb r0, [r6] - bl GetBankSide - adds r4, r0, 0 - ldrb r0, [r5] - bl GetBankSide - lsls r4, 24 - lsls r0, 24 - cmp r4, r0 - beq _0803E5C4 - ldrb r0, [r5] - b _0803E758 - .pool -_0803E5C4: - ldrb r0, [r6] - bl GetBankIdentity - movs r1, 0x1 - eors r0, r1 - lsls r0, 24 - lsrs r0, 24 - bl GetBankByIdentity - strb r0, [r5] - ldrb r1, [r7] - ldrb r2, [r5] - lsls r0, r2, 2 - add r0, r8 - b _0803E74E -_0803E5E2: - ldr r4, =gActiveBank - ldr r0, =gBanksByTurnOrder - ldr r3, [sp] - adds r0, r3, r0 - ldrb r0, [r0] - strb r0, [r4] - ldrb r0, [r4] - ldr r2, =gBattleMons - movs r1, 0x58 - muls r1, r0 - adds r1, r2 - adds r1, 0x20 - ldrb r1, [r1] - bl RecordAbilityBattle - ldr r2, =gSpecialStatuses - ldrb r1, [r4] - lsls r0, r1, 2 - adds r0, r1 - lsls r0, 2 - adds r0, r2 - ldrb r1, [r0] - movs r2, 0x2 - orrs r1, r2 - strb r1, [r0] - ldr r1, =gBankTarget - ldrb r0, [r4] - strb r0, [r1] - b _0803E76A - .pool -_0803E630: - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - movs r4, 0x1 - ands r0, r4 - cmp r0, 0 - beq _0803E6E0 - ldr r2, =gBattleMoves - ldr r0, =gLastUsedMove - ldrh r1, [r0] - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 2 - adds r0, r2 - ldrb r1, [r0, 0x6] - movs r0, 0x4 - ands r0, r1 - cmp r0, 0 - beq _0803E6E0 - mov r5, r8 - ldrb r0, [r5] - bl GetBankSide - lsls r0, 24 - cmp r0, 0 - bne _0803E684 - bl Random - adds r1, r4, 0 - ands r1, r0 - cmp r1, 0 - beq _0803E680 - movs r0, 0x1 - b _0803E696 - .pool -_0803E680: - movs r0, 0x3 - b _0803E696 -_0803E684: - bl Random - adds r1, r4, 0 - ands r1, r0 - cmp r1, 0 - beq _0803E694 - movs r0, 0 - b _0803E696 -_0803E694: - movs r0, 0x2 -_0803E696: - bl GetBankByIdentity - ldr r1, =gBankTarget - strb r0, [r1] - ldr r0, =gAbsentBankFlags - ldrb r1, [r0] - ldr r2, =gBitTable - ldr r5, =gBankTarget - ldrb r0, [r5] - lsls r0, 2 - adds r0, r2 - ldr r0, [r0] - ands r1, r0 - cmp r1, 0 - beq _0803E76A - ldr r0, =gBankAttacker - ldrb r0, [r0] - bl GetBankSide - adds r4, r0, 0 - ldrb r0, [r5] - bl GetBankSide - lsls r4, 24 - lsls r0, 24 - cmp r4, r0 - beq _0803E76A - ldrb r0, [r5] - b _0803E758 - .pool -_0803E6E0: - ldr r5, =gBankTarget - mov r2, r8 - ldrb r0, [r2] - ldr r1, =gBattleStruct - ldr r1, [r1] - adds r0, r1 - ldrb r0, [r0, 0xC] - strb r0, [r5] - ldr r6, =gAbsentBankFlags - ldrb r1, [r6] - ldr r7, =gBitTable - ldrb r0, [r5] - lsls r0, 2 - adds r0, r7 - ldr r0, [r0] - ands r1, r0 - cmp r1, 0 - beq _0803E76A - ldrb r0, [r2] - bl GetBankSide - adds r4, r0, 0 - ldrb r0, [r5] - bl GetBankSide - lsls r4, 24 - lsls r0, 24 - cmp r4, r0 - beq _0803E730 - ldrb r0, [r5] - b _0803E758 - .pool -_0803E730: - mov r1, r8 - ldrb r0, [r1] - bl GetBankIdentity - movs r1, 0x1 - eors r0, r1 - lsls r0, 24 - lsrs r0, 24 - bl GetBankByIdentity - strb r0, [r5] - ldrb r1, [r6] - ldrb r2, [r5] - lsls r0, r2, 2 - adds r0, r7 -_0803E74E: - ldr r0, [r0] - ands r1, r0 - cmp r1, 0 - beq _0803E76A - adds r0, r2, 0 -_0803E758: - bl GetBankIdentity - movs r1, 0x2 - eors r0, r1 - lsls r0, 24 - lsrs r0, 24 - bl GetBankByIdentity - strb r0, [r5] -_0803E76A: - ldr r0, =gBattleTypeFlags - ldr r1, [r0] - movs r2, 0x80 - lsls r2, 10 - ands r1, r2 - adds r5, r0, 0 - cmp r1, 0 - beq _0803E808 - ldr r0, =gProtectStructs - ldr r4, =gBankAttacker - ldrb r2, [r4] - lsls r1, r2, 4 - adds r1, r0 - ldrb r0, [r1, 0x2] - lsls r0, 27 - cmp r0, 0 - bge _0803E808 - ldr r1, =gBattleMons - movs r0, 0x58 - muls r0, r2 - adds r0, r1 - ldrh r0, [r0, 0x28] - cmp r0, 0 - bne _0803E7B4 - ldr r1, =gFightStateTracker - movs r0, 0xC - b _0803E83C - .pool -_0803E7B4: - ldr r3, =gUnknown_02024230 - lsls r0, r2, 2 - adds r0, r3 - ldr r0, [r0] - cmp r0, 0 - beq _0803E7EC - ldr r1, =gBattleCommunication - movs r2, 0 - movs r0, 0x4 - strb r0, [r1, 0x5] - ldr r1, =gBattlescriptCurrInstr - ldrb r0, [r4] - lsls r0, 2 - adds r0, r3 - ldr r0, [r0] - str r0, [r1] - ldrb r0, [r4] - lsls r0, 2 - adds r0, r3 - str r2, [r0] - b _0803E824 - .pool -_0803E7EC: - ldr r1, =gBattleCommunication - movs r0, 0x4 - strb r0, [r1, 0x5] - ldr r1, =gBattlescriptCurrInstr - ldr r0, =BattleScript_MoveUsedLoafingAround - str r0, [r1] - b _0803E824 - .pool -_0803E808: - ldr r4, =gBattlescriptCurrInstr - ldr r3, =gBattleScriptsForMoveEffects - ldr r2, =gBattleMoves - ldr r0, =gCurrentMove - ldrh r1, [r0] - lsls r0, r1, 1 - adds r0, r1 - lsls r0, 2 - adds r0, r2 - ldrb r0, [r0] - lsls r0, 2 - adds r0, r3 - ldr r0, [r0] - str r0, [r4] -_0803E824: - ldr r0, [r5] - movs r1, 0x80 - lsls r1, 11 - ands r0, r1 - cmp r0, 0 - beq _0803E838 - ldr r0, =gBankAttacker - ldrb r0, [r0] - bl sub_81A56E8 -_0803E838: - ldr r1, =gFightStateTracker - movs r0, 0xA -_0803E83C: - strb r0, [r1] - add sp, 0x4 - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end sub_803E0B8 - - thumb_func_start bs2_8016374 -bs2_8016374: @ 803E868 - push {r4,lr} - ldr r3, =gBankAttacker - ldr r1, =gBanksByTurnOrder - ldr r0, =gCurrentMoveTurn - ldrb r0, [r0] - adds r0, r1 - ldrb r0, [r0] - strb r0, [r3] - ldr r0, =gBattle_BG0_X - movs r2, 0 - strh r2, [r0] - ldr r0, =gBattle_BG0_Y - strh r2, [r0] - ldr r1, =gActionSelectionCursor - ldrb r0, [r3] - adds r0, r1 - strb r2, [r0] - ldr r1, =gMoveSelectionCursor - ldrb r0, [r3] - adds r0, r1 - strb r2, [r0] - ldr r2, =gBattleTextBuff1 - movs r0, 0xFD - strb r0, [r2] - movs r0, 0x7 - strb r0, [r2, 0x1] - ldrb r4, [r3] - strb r4, [r2, 0x2] - ldrb r0, [r3] - ldr r1, =gBattleStruct - ldr r1, [r1] - adds r0, r1 - adds r0, 0x58 - ldrb r0, [r0] - strb r0, [r2, 0x3] - movs r0, 0xFF - strb r0, [r2, 0x4] - ldr r0, =gBattleScripting - strb r4, [r0, 0x17] - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DAB15 - str r0, [r1] - ldr r1, =gFightStateTracker - movs r0, 0xA - strb r0, [r1] - ldr r1, =gBattleResults - ldrb r0, [r1, 0x2] - cmp r0, 0xFE - bhi _0803E8CE - adds r0, 0x1 - strb r0, [r1, 0x2] -_0803E8CE: - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end bs2_8016374 - - thumb_func_start sub_803E90C -sub_803E90C: @ 803E90C - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - ldr r4, =gBankAttacker - ldr r2, =gBankTarget - ldr r1, =gBanksByTurnOrder - ldr r0, =gCurrentMoveTurn - ldrb r0, [r0] - adds r0, r1 - ldrb r0, [r0] - strb r0, [r2] - strb r0, [r4] - ldr r0, =gBattle_BG0_X - movs r1, 0 - strh r1, [r0] - ldr r0, =gBattle_BG0_Y - strh r1, [r0] - ldrb r0, [r4] - bl sub_8045868 - ldr r5, =gLastUsedItem - ldr r2, =gBattleBufferB - ldrb r1, [r4] - lsls r1, 9 - adds r0, r2, 0x1 - adds r0, r1, r0 - ldrb r3, [r0] - adds r2, 0x2 - adds r1, r2 - ldrb r0, [r1] - lsls r0, 8 - orrs r3, r0 - strh r3, [r5] - cmp r3, 0xC - bhi _0803E998 - ldr r2, =gBattlescriptCurrInstr - ldr r1, =gUnknown_082DBD08 - ldrh r0, [r5] - lsls r0, 2 - adds r0, r1 - ldr r0, [r0] - str r0, [r2] - ldr r0, =gFightStateTracker - mov r10, r0 - b _0803EBF6 - .pool -_0803E998: - adds r0, r3, 0 - subs r0, 0x50 - lsls r0, 16 - lsrs r0, 16 - cmp r0, 0x1 - bhi _0803E9C0 - ldr r0, =gBattlescriptCurrInstr - ldr r1, =gUnknown_082DBD54 - ldr r1, [r1] - str r1, [r0] - ldr r1, =gFightStateTracker - mov r10, r1 - b _0803EBF6 - .pool -_0803E9C0: - ldrb r0, [r4] - bl GetBankSide - lsls r0, 24 - cmp r0, 0 - bne _0803E9E8 - ldr r0, =gBattlescriptCurrInstr - ldr r1, =gUnknown_082DBD3C - ldr r1, [r1] - str r1, [r0] - ldr r2, =gFightStateTracker - mov r10, r2 - b _0803EBF6 - .pool -_0803E9E8: - ldr r3, =gBattleScripting - ldrb r0, [r4] - strb r0, [r3, 0x17] - lsls r0, 24 - lsrs r0, 25 - ldr r2, =gBattleStruct - ldr r1, [r2] - adds r0, r1 - adds r0, 0xC4 - ldrb r0, [r0] - subs r0, 0x1 - mov r8, r4 - ldr r1, =gBattlescriptCurrInstr - mov r9, r1 - ldr r6, =gUnknown_082DBD3C - mov r12, r3 - adds r7, r2, 0 - ldr r2, =gFightStateTracker - mov r10, r2 - cmp r0, 0x4 - bls _0803EA14 - b _0803EBDE -_0803EA14: - lsls r0, 2 - ldr r1, =_0803EA38 - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .pool - .align 2, 0 -_0803EA38: - .4byte _0803EBDE - .4byte _0803EBDE - .4byte _0803EA4C - .4byte _0803EAE0 - .4byte _0803EBB0 -_0803EA4C: - ldr r5, =gBattleCommunication - movs r0, 0 - strb r0, [r5, 0x5] - ldr r2, =gBankAttacker - ldrb r0, [r2] - lsrs r0, 1 - ldr r1, [r7] - adds r0, r1 - adds r0, 0xC6 - ldrb r1, [r0] - movs r0, 0x1 - ands r0, r1 - mov r8, r2 - cmp r0, 0 - beq _0803EA98 - movs r0, 0x3E - ands r0, r1 - ldr r1, =gBattlescriptCurrInstr - mov r9, r1 - ldr r6, =gUnknown_082DBD3C - ldr r2, =gFightStateTracker - mov r10, r2 - cmp r0, 0 - bne _0803EA7E - b _0803EBDE -_0803EA7E: - movs r0, 0x5 - strb r0, [r5, 0x5] - b _0803EBDE - .pool -_0803EA98: - ldr r0, =gBattlescriptCurrInstr - mov r9, r0 - ldr r6, =gUnknown_082DBD3C - ldr r1, =gFightStateTracker - mov r10, r1 - mov r4, r8 - adds r3, r7, 0 - adds r2, r5, 0 -_0803EAA8: - ldrb r1, [r4] - lsrs r1, 1 - ldr r0, [r3] - adds r1, r0 - adds r1, 0xC6 - ldrb r0, [r1] - lsrs r0, 1 - strb r0, [r1] - ldrb r0, [r2, 0x5] - adds r0, 0x1 - strb r0, [r2, 0x5] - ldrb r0, [r4] - lsrs r0, 1 - ldr r1, [r3] - adds r0, r1 - adds r0, 0xC6 - ldrb r1, [r0] - movs r0, 0x1 - ands r0, r1 - cmp r0, 0 - beq _0803EAA8 - b _0803EBDE - .pool -_0803EAE0: - ldr r3, =gBattleCommunication - movs r0, 0x4 - strb r0, [r3, 0x5] - ldr r2, =gBankAttacker - ldrb r0, [r2] - lsrs r0, 1 - ldr r1, [r7] - adds r0, r1 - adds r6, r0, 0 - adds r6, 0xC6 - ldrb r1, [r6] - movs r0, 0x80 - ands r0, r1 - lsls r0, 24 - lsrs r5, r0, 24 - mov r8, r2 - cmp r5, 0 - beq _0803EB28 - movs r0, 0x5 - strb r0, [r3, 0x5] - ldr r2, =gBattlescriptCurrInstr - mov r9, r2 - ldr r6, =gUnknown_082DBD3C - ldr r0, =gFightStateTracker - mov r10, r0 - b _0803EBDE - .pool -_0803EB28: - ldr r3, =gBattleTextBuff1 - movs r4, 0xFD - strb r4, [r3] - movs r0, 0x5 - strb r0, [r3, 0x1] - movs r2, 0x1 - strb r2, [r3, 0x2] - movs r0, 0xFF - strb r0, [r3, 0x3] - ldr r1, =gBattleTextBuff2 - strb r4, [r1] - strb r5, [r1, 0x1] - movs r0, 0xD2 - strb r0, [r1, 0x2] - strb r5, [r1, 0x3] - subs r0, 0xD3 - strb r0, [r1, 0x4] - ldrb r0, [r6] - ands r2, r0 - ldr r1, =gBattlescriptCurrInstr - mov r9, r1 - ldr r6, =gUnknown_082DBD3C - ldr r0, =gFightStateTracker - mov r10, r0 - cmp r2, 0 - bne _0803EB8C - mov r5, r8 - adds r4, r7, 0 - adds r2, r3, 0 -_0803EB62: - ldrb r1, [r5] - lsrs r1, 1 - ldr r0, [r4] - adds r1, r0 - adds r1, 0xC6 - ldrb r0, [r1] - lsrs r0, 1 - strb r0, [r1] - ldrb r0, [r2, 0x2] - adds r0, 0x1 - strb r0, [r2, 0x2] - ldrb r0, [r5] - lsrs r0, 1 - ldr r1, [r4] - adds r0, r1 - adds r0, 0xC6 - ldrb r1, [r0] - movs r0, 0x1 - ands r0, r1 - cmp r0, 0 - beq _0803EB62 -_0803EB8C: - ldrb r0, [r3, 0x2] - adds r0, 0xE - movs r1, 0 - mov r2, r12 - strb r0, [r2, 0x10] - strb r1, [r2, 0x11] - b _0803EBDE - .pool -_0803EBB0: - ldr r0, =gBattleTypeFlags - ldr r1, [r0] - movs r0, 0x1 - ands r1, r0 - cmp r1, 0 - beq _0803EBCC - ldr r1, =gBattleCommunication - movs r0, 0x2 - strb r0, [r1, 0x5] - b _0803EBD0 - .pool -_0803EBCC: - ldr r0, =gBattleCommunication - strb r1, [r0, 0x5] -_0803EBD0: - ldr r0, =gBankAttacker - mov r8, r0 - ldr r1, =gBattlescriptCurrInstr - mov r9, r1 - ldr r6, =gUnknown_082DBD3C - ldr r2, =gFightStateTracker - mov r10, r2 -_0803EBDE: - mov r1, r8 - ldrb r0, [r1] - lsrs r0, 1 - ldr r1, [r7] - adds r0, r1 - adds r0, 0xC4 - ldrb r0, [r0] - lsls r0, 2 - adds r0, r6 - ldr r0, [r0] - mov r2, r9 - str r0, [r2] -_0803EBF6: - movs r0, 0xA - mov r1, r10 - strb r0, [r1] - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end sub_803E90C - - thumb_func_start CanRunFromBattle -CanRunFromBattle: @ 803EC20 - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - lsls r0, 24 - lsrs r5, r0, 24 - movs r7, 0 - ldr r1, =gBattleMons - movs r0, 0x58 - muls r0, r5 - adds r1, r0, r1 - ldrh r0, [r1, 0x2E] - cmp r0, 0xAF - bne _0803EC54 - ldr r1, =gEnigmaBerries - lsls r0, r5, 3 - subs r0, r5 - lsls r0, 2 - adds r0, r1 - ldrb r1, [r0, 0x7] - b _0803EC5E - .pool -_0803EC54: - ldrh r0, [r1, 0x2E] - bl ItemId_GetHoldEffect - lsls r0, 24 - lsrs r1, r0, 24 -_0803EC5E: - ldr r0, =gStringBank - strb r5, [r0] - cmp r1, 0x25 - bne _0803EC9C - ldr r2, =gLastUsedItem - ldr r1, =gBattleMons - movs r0, 0x58 - muls r0, r5 - adds r0, r1 - ldrh r0, [r0, 0x2E] - strh r0, [r2] - ldr r0, =gProtectStructs - lsls r2, r5, 4 - adds r2, r0 - ldrb r1, [r2, 0x1] - movs r0, 0x19 - negs r0, r0 - ands r0, r1 - movs r1, 0x8 - orrs r0, r1 - strb r0, [r2, 0x1] - b _0803ED70 - .pool -_0803EC9C: - ldr r0, =gBattleMons - mov r10, r0 - movs r2, 0x58 - mov r9, r2 - mov r0, r9 - muls r0, r5 - add r0, r10 - mov r8, r0 - adds r0, 0x20 - ldrb r6, [r0] - cmp r6, 0x32 - bne _0803ED5C - bl InBattlePyramid - lsls r0, 24 - cmp r0, 0 - beq _0803ED38 - ldr r4, =gBattleStruct - ldr r1, [r4] - adds r1, 0x6C - ldrb r0, [r1] - adds r0, 0x1 - strb r0, [r1] - bl sub_81A9E28 - lsls r0, 24 - lsrs r1, r0, 24 - mov r2, r8 - ldrh r0, [r2, 0x6] - muls r0, r1 - movs r2, 0x1 - adds r1, r5, 0 - eors r1, r2 - mov r2, r9 - muls r2, r1 - adds r1, r2, 0 - add r1, r10 - ldrh r1, [r1, 0x6] - bl __divsi3 - ldr r1, [r4] - adds r1, 0x6C - ldrb r2, [r1] - lsls r1, r2, 4 - subs r1, r2 - lsls r1, 1 - adds r0, r1 - lsls r0, 24 - lsrs r4, r0, 24 - bl Random - movs r1, 0xFF - ands r1, r0 - cmp r4, r1 - bhi _0803ED0C - b _0803EE12 -_0803ED0C: - ldr r0, =gLastUsedAbility - strb r6, [r0] - ldr r0, =gProtectStructs - lsls r2, r5, 4 - adds r2, r0 - ldrb r1, [r2, 0x1] - movs r0, 0x19 - negs r0, r0 - ands r0, r1 - movs r1, 0x10 - orrs r0, r1 - strb r0, [r2, 0x1] - b _0803ED70 - .pool -_0803ED38: - ldr r0, =gLastUsedAbility - strb r6, [r0] - ldr r0, =gProtectStructs - lsls r2, r5, 4 - adds r2, r0 - ldrb r1, [r2, 0x1] - movs r0, 0x19 - negs r0, r0 - ands r0, r1 - movs r1, 0x10 - orrs r0, r1 - strb r0, [r2, 0x1] - b _0803ED70 - .pool -_0803ED5C: - ldr r1, =gBattleTypeFlags - ldr r2, [r1] - ldr r0, =0x043f0100 - ands r0, r2 - cmp r0, 0 - beq _0803ED80 - movs r0, 0x8 - ands r2, r0 - cmp r2, 0 - beq _0803ED80 -_0803ED70: - adds r0, r7, 0x1 - lsls r0, 24 - lsrs r7, r0, 24 - b _0803EE12 - .pool -_0803ED80: - ldr r0, [r1] - movs r1, 0x1 - ands r0, r1 - cmp r0, 0 - bne _0803EE06 - bl InBattlePyramid - lsls r0, 24 - cmp r0, 0 - beq _0803EDBC - bl sub_81A9E28 - lsls r0, 24 - lsrs r1, r0, 24 - ldr r4, =gBattleMons - movs r3, 0x58 - adds r0, r5, 0 - muls r0, r3 - adds r0, r4 - ldrh r0, [r0, 0x6] - muls r0, r1 - movs r2, 0x1 - adds r1, r5, 0 - eors r1, r2 - muls r1, r3 - adds r1, r4 - b _0803EDDA - .pool -_0803EDBC: - ldr r3, =gBattleMons - movs r2, 0x58 - adds r0, r5, 0 - muls r0, r2 - adds r4, r0, r3 - movs r1, 0x1 - adds r0, r5, 0 - eors r0, r1 - muls r0, r2 - adds r1, r0, r3 - ldrh r0, [r4, 0x6] - ldrh r2, [r1, 0x6] - cmp r0, r2 - bcs _0803EE00 - lsls r0, 7 -_0803EDDA: - ldrh r1, [r1, 0x6] - bl __divsi3 - ldr r1, =gBattleStruct - ldr r1, [r1] - adds r1, 0x6C - ldrb r2, [r1] - lsls r1, r2, 4 - subs r1, r2 - lsls r1, 1 - adds r0, r1 - lsls r0, 24 - lsrs r4, r0, 24 - bl Random - movs r1, 0xFF - ands r1, r0 - cmp r4, r1 - bls _0803EE06 -_0803EE00: - adds r0, r7, 0x1 - lsls r0, 24 - lsrs r7, r0, 24 -_0803EE06: - ldr r0, =gBattleStruct - ldr r1, [r0] - adds r1, 0x6C - ldrb r0, [r1] - adds r0, 0x1 - strb r0, [r1] -_0803EE12: - cmp r7, 0 - beq _0803EE24 - ldr r1, =gCurrentMoveTurn - ldr r0, =gNoOfAllBanks - ldrb r0, [r0] - strb r0, [r1] - ldr r1, =gBattleOutcome - movs r0, 0x4 - strb r0, [r1] -_0803EE24: - adds r0, r7, 0 - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r1} - bx r1 - .pool - thumb_func_end CanRunFromBattle - thumb_func_start sub_803EE48 sub_803EE48: @ 803EE48 push {r4-r6,lr} ldr r4, =gBankAttacker ldr r1, =gBanksByTurnOrder - ldr r5, =gCurrentMoveTurn + ldr r5, =gCurrentTurnActionNumber ldrb r0, [r5] adds r0, r1 ldrb r0, [r0] @@ -2671,19 +92,19 @@ _0803EF0C: cmp r0, 0 bne _0803EF4C ldrb r0, [r4] - bl CanRunFromBattle + bl TryRunFromBattle lsls r0, 24 cmp r0, 0 bne _0803EF98 ldrb r0, [r4] - bl sub_8045868 + bl ClearFuryCutterDestinyBondGrudge ldr r1, =gBattleCommunication movs r0, 0x3 strb r0, [r1, 0x5] ldr r1, =gBattlescriptCurrInstr ldr r0, =gUnknown_082DAB02 str r0, [r1] - ldr r1, =gFightStateTracker + ldr r1, =gCurrentActionFuncId movs r0, 0xA b _0803EF96 .pool @@ -2705,7 +126,7 @@ _0803EF4C: ldr r1, =gBattlescriptCurrInstr ldr r0, =gUnknown_082DAB02 str r0, [r1] - ldr r1, =gFightStateTracker + ldr r1, =gCurrentActionFuncId movs r0, 0xA b _0803EF96 .pool @@ -2728,7 +149,7 @@ _0803EF98: sub_803EFA8: @ 803EFA8 ldr r2, =gBankAttacker ldr r1, =gBanksByTurnOrder - ldr r0, =gCurrentMoveTurn + ldr r0, =gCurrentTurnActionNumber ldrb r0, [r0] adds r0, r1 ldrb r0, [r0] @@ -2742,7 +163,7 @@ sub_803EFA8: @ 803EFA8 ldr r0, =gUnknown_082DBD58 ldr r0, [r0] str r0, [r1] - ldr r1, =gFightStateTracker + ldr r1, =gCurrentActionFuncId movs r0, 0xA strb r0, [r1] bx lr @@ -2753,7 +174,7 @@ sub_803EFA8: @ 803EFA8 bs5_8016AC0: @ 803EFF0 ldr r2, =gBankAttacker ldr r1, =gBanksByTurnOrder - ldr r0, =gCurrentMoveTurn + ldr r0, =gCurrentTurnActionNumber ldrb r0, [r0] adds r0, r1 ldrb r0, [r0] @@ -2771,10 +192,10 @@ bs5_8016AC0: @ 803EFF0 movs r0, 0x5 strh r0, [r1] ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DBD08 + ldr r0, =gBattlescriptsForBallThrow ldr r0, [r0, 0x14] str r0, [r1] - ldr r1, =gFightStateTracker + ldr r1, =gCurrentActionFuncId movs r0, 0xA strb r0, [r1] bx lr @@ -2786,7 +207,7 @@ sub_803F050: @ 803F050 push {r4-r6,lr} ldr r3, =gBankAttacker ldr r1, =gBanksByTurnOrder - ldr r0, =gCurrentMoveTurn + ldr r0, =gCurrentTurnActionNumber ldrb r0, [r0] adds r0, r1 ldrb r0, [r0] @@ -2859,7 +280,7 @@ _0803F100: ldr r0, =gUnknown_082DBD58 ldr r0, [r0, 0x8] str r0, [r1] - ldr r1, =gFightStateTracker + ldr r1, =gCurrentActionFuncId movs r0, 0xA strb r0, [r1] pop {r4-r6} @@ -2873,7 +294,7 @@ sub_803F120: @ 803F120 push {r4,lr} ldr r2, =gBankAttacker ldr r1, =gBanksByTurnOrder - ldr r0, =gCurrentMoveTurn + ldr r0, =gCurrentTurnActionNumber ldrb r0, [r0] adds r0, r1 ldrb r0, [r0] @@ -2945,7 +366,7 @@ _0803F1CA: ldr r0, =gUnknown_082DBD58 ldr r0, [r0, 0x4] str r0, [r1] - ldr r1, =gFightStateTracker + ldr r1, =gCurrentActionFuncId movs r0, 0xA strb r0, [r1] pop {r4} @@ -2959,7 +380,7 @@ bs8_exit_by_flight: @ 803F1F0 push {r4,lr} ldr r2, =gBankAttacker ldr r1, =gBanksByTurnOrder - ldr r4, =gCurrentMoveTurn + ldr r4, =gCurrentTurnActionNumber ldrb r0, [r4] adds r0, r1 ldrb r0, [r0] @@ -2982,7 +403,7 @@ bs8_exit_by_flight: @ 803F1F0 bs9_8016C9C: @ 803F22C ldr r3, =gBankAttacker ldr r1, =gBanksByTurnOrder - ldr r0, =gCurrentMoveTurn + ldr r0, =gCurrentTurnActionNumber ldrb r0, [r0] adds r0, r1 ldrb r2, [r0] @@ -3010,7 +431,7 @@ bs9_8016C9C: @ 803F22C ldr r0, =gUnknown_082DBD58 ldr r0, [r0, 0xC] str r0, [r1] - ldr r1, =gFightStateTracker + ldr r1, =gCurrentActionFuncId movs r0, 0xA strb r0, [r1] ldr r1, =gActionsByTurnOrder @@ -3032,7 +453,7 @@ bsB_exit_by_move: @ 803F2A4 ldr r0, [r0] adds r0, 0x4D strb r1, [r0] - ldr r1, =gFightStateTracker + ldr r1, =gCurrentActionFuncId movs r0, 0xC strb r0, [r1] _0803F2C0: @@ -3043,11 +464,11 @@ _0803F2C0: thumb_func_start bsD_proceed bsD_proceed: @ 803F2CC - ldr r1, =gCurrentMoveTurn + ldr r1, =gCurrentTurnActionNumber ldrb r0, [r1] adds r0, 0x1 strb r0, [r1] - ldr r3, =gFightStateTracker + ldr r3, =gCurrentActionFuncId ldr r2, =gActionsByTurnOrder ldrb r0, [r1] adds r0, r2 @@ -3066,7 +487,7 @@ bsD_proceed: @ 803F2CC bsC_8016D70: @ 803F300 push {r4-r6,lr} ldr r1, =gBanksByTurnOrder - ldr r2, =gCurrentMoveTurn + ldr r2, =gCurrentTurnActionNumber ldrb r0, [r2] adds r0, r1 ldrb r0, [r0] @@ -3079,7 +500,7 @@ bsC_8016D70: @ 803F300 ldrb r0, [r2] adds r0, 0x1 strb r0, [r2] - ldr r3, =gFightStateTracker + ldr r3, =gCurrentActionFuncId ldr r1, =gActionsByTurnOrder ldrb r0, [r2] adds r0, r1 diff --git a/asm/evolution_scene.s b/asm/evolution_scene.s index 889403787..e5e9aaab9 100644 --- a/asm/evolution_scene.s +++ b/asm/evolution_scene.s @@ -68,7 +68,7 @@ _0813DA00: adds r1, r4, 0 adds r2, r5, 0 adds r3, r6, 0 - bl evolution_cutscene + bl EvolutionScene _0813DA30: add sp, 0x4 pop {r4-r7} @@ -77,8 +77,8 @@ _0813DA30: .pool thumb_func_end sub_813D9C0 - thumb_func_start sub_813DA40 -sub_813DA40: @ 813DA40 + thumb_func_start BeginEvolutionScene +BeginEvolutionScene: @ 813DA40 push {r4-r6,lr} adds r4, r1, 0 adds r5, r2, 0 @@ -110,10 +110,10 @@ sub_813DA40: @ 813DA40 pop {r0} bx r0 .pool - thumb_func_end sub_813DA40 + thumb_func_end BeginEvolutionScene - thumb_func_start evolution_cutscene -evolution_cutscene: @ 813DA8C + thumb_func_start EvolutionScene +EvolutionScene: @ 813DA8C push {r4-r7,lr} mov r7, r10 mov r6, r9 @@ -393,7 +393,7 @@ evolution_cutscene: @ 813DA8C pop {r0} bx r0 .pool - thumb_func_end evolution_cutscene + thumb_func_end EvolutionScene thumb_func_start sub_813DD7C sub_813DD7C: @ 813DD7C diff --git a/asm/party_menu.s b/asm/party_menu.s index 4eb080b13..a881d4589 100755 --- a/asm/party_menu.s +++ b/asm/party_menu.s @@ -13868,7 +13868,7 @@ sub_81B7810: @ 81B7810 adds r0, r7, 0 adds r1, r4, 0 movs r2, 0x1 - bl sub_813DA40 + bl BeginEvolutionScene adds r0, r5, 0 bl DestroyTask b _081B786E diff --git a/asm/pokemon_item_effect.s b/asm/pokemon_item_effect.s index 5dc6452e9..49b205967 100644 --- a/asm/pokemon_item_effect.s +++ b/asm/pokemon_item_effect.s @@ -221,7 +221,7 @@ _0806BEE0: mov r0, r8 movs r2, 0 ldr r3, [sp, 0x10] - bl sub_813DA40 + bl BeginEvolutionScene movs r0, 0 bl _0806CD5C _0806BEF0: diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 0b797feef..faa945bdd 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -45,34 +45,34 @@ gUnknown_082DA7C4:: @ 82DA7C4 gUnknown_082DA7CD:: @ 82DA7CD .incbin "baserom.gba", 0x2da7cd, 0x160 -gUnknown_082DA92D:: @ 82DA92D +BattleScript_LocalTrainerBattleWon:: @ 82DA92D .incbin "baserom.gba", 0x2da92d, 0x3d -gUnknown_082DA96A:: @ 82DA96A +BattleScript_PayDayMoneyAndPickUpItems:: @ 82DA96A .incbin "baserom.gba", 0x2da96a, 0x3 -gUnknown_082DA96D:: @ 82DA96D +BattleScript_LocalBattleLost:: @ 82DA96D .incbin "baserom.gba", 0x2da96d, 0x9e gUnknown_082DAA0B:: @ 82DAA0B .incbin "baserom.gba", 0x2daa0b, 0x2a -gUnknown_082DAA35:: @ 82DAA35 +BattleScript_LinkBattleWonOrLost:: @ 82DAA35 .incbin "baserom.gba", 0x2daa35, 0x52 -gUnknown_082DAA87:: @ 82DAA87 +BattleScript_FrontierTrainerBattleWon:: @ 82DAA87 .incbin "baserom.gba", 0x2daa87, 0x54 -gUnknown_082DAADB:: @ 82DAADB +BattleScript_SmokeBallEscape:: @ 82DAADB .incbin "baserom.gba", 0x2daadb, 0xe -gUnknown_082DAAE9:: @ 82DAAE9 +BattleScript_RanAwayUsingMonAbility:: @ 82DAAE9 .incbin "baserom.gba", 0x2daae9, 0x7 -gUnknown_082DAAF0:: @ 82DAAF0 +BattleScript_GotAwaySafely:: @ 82DAAF0 .incbin "baserom.gba", 0x2daaf0, 0x7 -gUnknown_082DAAF7:: @ 82DAAF7 +BattleScript_WildMonFled:: @ 82DAAF7 .incbin "baserom.gba", 0x2daaf7, 0x7 gUnknown_082DAAFE:: @ 82DAAFE @@ -87,7 +87,7 @@ gUnknown_082DAB0B:: @ 82DAB0B gUnknown_082DAB11:: @ 82DAB11 .incbin "baserom.gba", 0x2dab11, 0x4 -gUnknown_082DAB15:: @ 82DAB15 +BattleScript_ActionSwitch:: @ 82DAB15 .incbin "baserom.gba", 0x2dab15, 0xa4 BattleScript_Pausex20:: @ 82DABB9 @@ -255,7 +255,7 @@ BattleScript_OneHitKOMsg:: @ 82DB1CE BattleScript_SAtkDown2:: @ 82DB1D5 .incbin "baserom.gba", 0x2db1d5, 0x2a -gUnknown_082DB1FF:: @ 82DB1FF +BattleScript_FocusPunchSetUp:: @ 82DB1FF .incbin "baserom.gba", 0x2db1ff, 0x14 BattleScript_MoveUsedIsAsleep:: @ 82DB213 diff --git a/data/battle_scripts_2.s b/data/battle_scripts_2.s index adabccb88..985c09b23 100644 --- a/data/battle_scripts_2.s +++ b/data/battle_scripts_2.s @@ -4,7 +4,7 @@ .section script_data, "aw", %progbits .align 2 -gUnknown_082DBD08:: @ 82DBD08 +gBattlescriptsForBallThrow:: @ 82DBD08 .4byte gUnknown_082DBD68 .4byte gUnknown_082DBD68 .4byte gUnknown_082DBD68 @@ -29,8 +29,8 @@ gUnknown_082DBD3C:: @ 82DBD3C .4byte gUnknown_082DBE91 .align 2 -gUnknown_082DBD54:: @ 82DBD54 - .4byte gUnknown_082DBEB3 +gBattlescriptsForRunningByItem:: @ 82DBD54 + .4byte BattleScript_RunByUsingItem .align 2 gUnknown_082DBD58:: @ 82DBD58 @@ -72,7 +72,7 @@ gUnknown_082DBE6F:: @ 82DBE6F gUnknown_082DBE91:: @ 82DBE91 .incbin "baserom.gba", 0x2dbe91, 0x22 -gUnknown_082DBEB3:: @ 82DBEB3 +BattleScript_RunByUsingItem:: @ 82DBEB3 .incbin "baserom.gba", 0x2dbeb3, 0xA gUnknown_082DBEBD:: @ 82DBEBD diff --git a/data/data2b.s b/data/data2b.s index 96d56c820..717b70d4d 100644 --- a/data/data2b.s +++ b/data/data2b.s @@ -226,10 +226,10 @@ gTrainerMoneyTable:: @ 831AEB8 @ 831BAD4 .include "data/text/ability_description_pointers.inc" -gUnknown_0831BC0C:: @ 831BC0C +gTurnActionsFuncsTable:: @ 831BC0C .incbin "baserom.gba", 0x31bc0c, 0x38 -gUnknown_0831BC44:: @ 831BC44 +gEndTurnFuncsTable:: @ 831BC44 .incbin "baserom.gba", 0x31bc44, 0x2c gStatusConditionString_PoisonJpn:: @ 831BC70 diff --git a/include/battle.h b/include/battle.h index 7c8d89e57..639558e60 100644 --- a/include/battle.h +++ b/include/battle.h @@ -56,6 +56,7 @@ #define BATTLE_TYPE_RAYQUAZA 0x40000000 #define BATTLE_TYPE_x80000000 0x80000000 +#define TRAINER_OPPONENT_3FE 0x3FE #define TRAINER_OPPONENT_C00 0xC00 #define TRAINER_OPPONENT_800 0x800 #define STEVEN_PARTNER_ID 0xC03 @@ -71,8 +72,11 @@ #define BATTLE_PLAYER_TELEPORTED 0x5 #define BATTLE_POKE_FLED 0x6 #define BATTLE_CAUGHT 0x7 +#define BATTLE_FORFEITED 0x9 #define BATTLE_OPPONENT_TELEPORTED 0xA +#define BATTLE_OUTCOME_BIT_x80 0x80 + #define STATUS_SLEEP 0x7 #define STATUS_POISON 0x8 #define STATUS_BURN 0x10 @@ -171,8 +175,10 @@ #define ACTION_GO_NEAR 7 #define ACTION_SAFARI_ZONE_RUN 8 #define ACTION_9 9 -#define ACTION_CANCEL_PARTNER 12 -#define ACTION_NOTHING_FAINTED 13 +#define ACTION_RUN_BATTLESCRIPT 10 // when executing an action +#define ACTION_CANCEL_PARTNER 12 // when choosing an action +#define ACTION_FINISHED 12 // when executing an action +#define ACTION_NOTHING_FAINTED 13 // when choosing an action #define ACTION_INIT_VALUE 0xFF #define ABILITYEFFECT_ON_SWITCHIN 0x0 @@ -559,22 +565,19 @@ struct BattleResults u8 playerSwitchesCounter; // 0x2 u8 unk3; // 0x3 u8 unk4; // 0x4 - u8 unk5_0:1; // 0x5 - u8 unk5_1:1; // 0x5 - u8 caughtMonBall:4; // 0x5 - u8 unk5_6:1; // 0x5 - u8 unk5_7:1; // 0x5 - u16 poke1Species; // 0x6 - u8 pokeString1[10]; // 0x8 - u8 unk12; + u8 unk5_0:1; // 0x5 , 0x1 + u8 unk5_1:1; // 0x5 , 0x2 + u8 caughtMonBall:4; // 0x5 , 0x4/0x8/0x10/0x20 + u8 unk5_6:1; // 0x5 , 0x40 + u8 unk5_7:1; // 0x5 , 0x80 + u16 playerMon1Species; // 0x6 + u8 playerMon1Name[11]; // 0x8 u8 battleTurnCounter; // 0x13 - u8 pokeString2[10]; // 0x14 - u8 field_1E; // 0x1E - u8 field_1F; // 0x1F + u8 playerMon2Name[11]; // 0x14 u16 lastOpponentSpecies; // 0x20 - u16 lastUsedMove; // 0x22 - u16 opponentMove; // 0x24 - u16 opponentSpecies; // 0x26 + u16 lastUsedMovePlayer; // 0x22 + u16 lastUsedMoveOpponent; // 0x24 + u16 playerMon2Species; // 0x26 u16 caughtMonSpecies; // 0x28 u8 caughtMonNick[10]; // 0x2A u8 filler34[2]; @@ -605,7 +608,7 @@ struct BattleStruct u8 field_45; u8 field_46; u8 field_47; - u8 field_48; + u8 focusPunchBank; u8 field_49; u8 moneyMultiplier; u8 field_4B; @@ -620,7 +623,7 @@ struct BattleStruct u8 field_58[4]; u8 field_5C[4]; u8 field_60[4][3]; - u8 field_6C; + u8 runTries; u8 caughtMonNick[11]; u8 field_78; u8 field_79; @@ -630,7 +633,7 @@ struct BattleStruct u8 field_7D; u8 field_7E; u8 formToChangeInto; - u8 chosenMovesIds[BATTLE_BANKS_COUNT]; + u8 chosenMovePositions[BATTLE_BANKS_COUNT]; u8 stateIdAfterSelScript[BATTLE_BANKS_COUNT]; u8 field_88; u8 field_89; @@ -665,7 +668,9 @@ struct BattleStruct u8 field_B3; void (*savedCallback)(void); u16 usedHeldItems[BATTLE_BANKS_COUNT]; - u8 field_C0[8]; + u8 field_C0[4]; + u8 field_C4[2]; + u8 field_C6[2]; u16 choicedMove[BATTLE_BANKS_COUNT]; u16 changedItems[BATTLE_BANKS_COUNT]; u8 intimidateBank; @@ -818,6 +823,7 @@ extern struct BattleStruct* gBattleStruct; #define VARIOUS_CANCEL_MULTI_TURN_MOVES 0 #define VARIOUS_SET_MAGIC_COAT_TARGET 1 +#define VARIOUS_CAN_RUN_FROM_BATTLE 2 #define VARIOUS_GET_MOVE_TARGET 3 #define VARIOUS_RESET_INTIMIDATE_TRACE_BITS 5 #define VARIOUS_UPDATE_CHOICE_MOVE_ON_LVL_UP 6 @@ -901,13 +907,15 @@ void sub_803FA70(u8 bank); void BattleMainCB2(void); void VBlankCB_Battle(void); void ResetSentPokesToOpponentValue(void); -bool8 CanRunFromBattle(u8 bank); +bool8 TryRunFromBattle(u8 bank); bool8 IsRunningFromBattleImpossible(void); void PressurePPLoseOnUsingPerishSong(u8 bankAtk); void PressurePPLoseOnUsingImprision(u8 bankAtk); u8 GetWhoStrikesFirst(u8 bank1, u8 bank2, bool8 ignoreChosenMoves); void SwapTurnOrder(u8, u8); void BattleTurnPassed(void); +void RunBattleScriptCommands_PopCallbacksStack(void); +void RunBattleScriptCommands(void); // battle_3 #define MOVE_LIMITATION_ZEROMOVE (1 << 0) @@ -928,7 +936,7 @@ u8 UpdateTurnCounters(void); u8 TurnBasedEffects(void); bool8 sub_8041364(void); bool8 sub_8041728(void); -void b_clear_atk_up_if_hit_flag_unless_enraged(void); +void TryClearRageStatuses(void); u8 AtkCanceller_UnableToUseMove(void); bool8 sub_80423F4(u8 bank, u8 r1, u8 r2); u8 CastformDataTypeChange(u8 bank); @@ -936,7 +944,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 bank, u8 ability, u8 special, u16 moveArg) void BattleScriptExecute(const u8* BS_ptr); void BattleScriptPushCursorAndCallback(const u8* BS_ptr); u8 ItemBattleEffects(u8 caseID, u8 bank, bool8 moveTurn); -void sub_8045868(u8 bank); +void ClearFuryCutterDestinyBondGrudge(u8 bank); void sub_80458B4(void); u8 GetMoveTarget(u16 move, u8 useMoveTarget); u8 IsPokeDisobedient(void); diff --git a/include/evolution_scene.h b/include/evolution_scene.h new file mode 100644 index 000000000..48bd6ebe1 --- /dev/null +++ b/include/evolution_scene.h @@ -0,0 +1,10 @@ +#ifndef GUARD_EVOLUTION_SCENE_H +#define GUARD_EVOLUTION_SCENE_H + +void EvolutionScene(struct Pokemon* mon, u16 speciesToEvolve, bool8 canStopEvo, u8 partyID); +void BeginEvolutionScene(struct Pokemon* mon, u16 speciesToEvolve, bool8 canStopEvo, u8 partyID); +void TradeEvolutionScene(struct Pokemon* mon, u16 speciesToEvolve, u8 preEvoSpriteID, u8 partyID); + +extern void (*gCB2_AfterEvolution)(void); + +#endif // GUARD_EVOLUTION_SCENE_H diff --git a/include/pokemon.h b/include/pokemon.h index 5d97c1666..c41099b09 100644 --- a/include/pokemon.h +++ b/include/pokemon.h @@ -634,6 +634,12 @@ bool16 sub_806D82C(u8 id); u16 MonTryLearningNewMove(struct Pokemon* mon, bool8); void sub_8068AA4(void); // sets stats for deoxys bool8 HasTwoFramesAnimation(u16 species); +u16 GetEvolutionTargetSpecies(struct Pokemon *mon, u8 type, u16 evolutionItem); +void RandomlyGivePartyPokerus(struct Pokemon *party); +u8 CheckPartyPokerus(struct Pokemon *party, u8 selection); +u8 CheckPartyHasHadPokerus(struct Pokemon *party, u8 selection); +void UpdatePartyPokerusTime(u16 days); +void PartySpreadPokerus(struct Pokemon *party); #include "sprite.h" diff --git a/include/recorded_battle.h b/include/recorded_battle.h index 2df1620e4..65ad998e6 100644 --- a/include/recorded_battle.h +++ b/include/recorded_battle.h @@ -14,5 +14,6 @@ u8 sub_8185FB8(void); u8 MoveRecordedBattleToSaveData(void); void sub_818603C(u8); void sub_8185FD0(void); +void sub_8186444(void); #endif // GUARD_RECORDED_BATTLE_H diff --git a/include/songs.h b/include/songs.h index d828e4068..5a1fff00c 100644 --- a/include/songs.h +++ b/include/songs.h @@ -252,23 +252,23 @@ enum SE_W114, SE_W063B, BGM_STOP = 349, - BGM_TETSUJI, - BGM_FIELD13, - BGM_KACHI22, - BGM_KACHI2, - BGM_KACHI3, - BGM_KACHI5, - BGM_PCC, - BGM_NIBI, - BGM_SUIKUN, - BGM_DOORO1, - BGM_DOORO_X1, - BGM_DOORO_X3, - BGM_MACHI_S2, - BGM_MACHI_S4, - BGM_GIM, - BGM_NAMINORI, - BGM_DAN01, + /*0x15E*/ BGM_TETSUJI, + /*0x15F*/ BGM_FIELD13, + /*0x160*/ BGM_KACHI22, + /*0x161*/ BGM_KACHI2, + /*0x162*/ BGM_KACHI3, + /*0x163*/ BGM_KACHI5, + /*0x164*/ BGM_PCC, + /*0x165*/ BGM_NIBI, + /*0x166*/ BGM_SUIKUN, + /*0x167*/ BGM_DOORO1, + /*0x168*/ BGM_DOORO_X1, + /*0x169*/ BGM_DOORO_X3, + /*0x16A*/ BGM_MACHI_S2, + /*0x16B*/ BGM_MACHI_S4, + /*0x16C*/ BGM_GIM, + /*0x16D*/ BGM_NAMINORI, + /*0x16E*/ BGM_DAN01, /*0x16F*/ BGM_FANFA1, /*0x170*/ BGM_ME_ASA, /*0x171*/ BGM_ME_BACHI, @@ -306,31 +306,31 @@ enum /*0x191*/ BGM_NEXTROAD, /*0x192*/ BGM_GRANROAD, /*0x193*/ BGM_CYCLING, - BGM_FRIENDLY, - BGM_MISHIRO, - BGM_TOZAN, - BGM_GIRLEYE, - BGM_MINAMO, - BGM_ASHROAD, - BGM_EVENT0, - BGM_DEEPDEEP, - BGM_KACHI1, - BGM_TITLE3, - BGM_DEMO1, - BGM_GIRL_SUP, - BGM_HAGESHII, - BGM_KAKKOII, - BGM_KAZANBAI, - BGM_AQA_0, - BGM_TSURETEK, - BGM_BOY_SUP, - BGM_RAINBOW, - BGM_AYASII, - BGM_KACHI4, - BGM_ROPEWAY, - BGM_CASINO, - BGM_HIGHTOWN, - BGM_SAFARI, + /*0x194*/ BGM_FRIENDLY, + /*0x195*/ BGM_MISHIRO, + /*0x196*/ BGM_TOZAN, + /*0x197*/ BGM_GIRLEYE, + /*0x198*/ BGM_MINAMO, + /*0x199*/ BGM_ASHROAD, + /*0x19A*/ BGM_EVENT0, + /*0x19B*/ BGM_DEEPDEEP, + /*0x19C*/ BGM_KACHI1, + /*0x19D*/ BGM_TITLE3, + /*0x19E*/ BGM_DEMO1, + /*0x19F*/ BGM_GIRL_SUP, + /*0x1A0*/ BGM_HAGESHII, + /*0x1A1*/ BGM_KAKKOII, + /*0x1A2*/ BGM_KAZANBAI, + /*0x1A3*/ BGM_AQA_0, + /*0x1A4*/ BGM_TSURETEK, + /*0x1A5*/ BGM_BOY_SUP, + /*0x1A6*/ BGM_RAINBOW, + /*0x1A7*/ BGM_AYASII, + /*0x1A8*/ BGM_KACHI4, + /*0x1A9*/ BGM_ROPEWAY, + /*0x1AA*/ BGM_CASINO, + /*0x1AB*/ BGM_HIGHTOWN, + /*0x1AC*/ BGM_SAFARI, BGM_C_ROAD, BGM_AJITO, BGM_M_BOAT, diff --git a/src/battle_2.c b/src/battle_2.c index 04907d0c0..ab1aae747 100644 --- a/src/battle_2.c +++ b/src/battle_2.c @@ -37,6 +37,9 @@ #include "pokedex.h" #include "abilities.h" #include "moves.h" +#include "trainer_classes.h" +#include "evolution_scene.h" +#include "roamer.h" struct UnknownStruct6 { @@ -80,6 +83,7 @@ extern u16 gTrainerBattleOpponent_B; extern struct BattleEnigmaBerry gEnigmaBerries[BATTLE_BANKS_COUNT]; extern void (*gPreBattleCallback1)(void); extern void (*gBattleMainFunc)(void); +extern void (*gUnknown_030061E8)(void); extern struct UnknownPokemonStruct2 gUnknown_02022FF8[3]; // what is it used for? extern struct UnknownPokemonStruct2* gUnknown_02023058; // what is it used for? extern u8 gBattleOutcome; @@ -131,13 +135,20 @@ extern struct BattlePokemon gBattleMons[BATTLE_BANKS_COUNT]; extern u8 gBanksByTurnOrder[BATTLE_BANKS_COUNT]; extern u8 gActionForBanks[BATTLE_BANKS_COUNT]; extern u16 gChosenMovesByBanks[BATTLE_BANKS_COUNT]; -extern u8 gFightStateTracker; +extern u8 gCurrentActionFuncId; extern u8 gLastUsedAbility; extern u16 gLastUsedItem; extern u8 gUnknown_0203CF00[]; extern const u8* gBattlescriptPtrsForSelection[BATTLE_BANKS_COUNT]; extern const u8* gBattlescriptCurrInstr; extern u32 gBattlePalaceMoveSelectionRngValue; +extern u8 gActionsByTurnOrder[BATTLE_BANKS_COUNT]; +extern u8 gCurrentTurnActionNumber; +extern u16 gDynamicBasePower; +extern u8 gCritMultiplier; +extern u8 gCurrMovePos; +extern u8 gUnknown_020241E9; +extern u16 gLastUsedMove; extern const u8 gSpeciesNames[][POKEMON_NAME_LENGTH + 1]; extern const struct BattleMove gBattleMoves[]; @@ -145,6 +156,7 @@ extern const u16 gUnknown_08C004E0[]; // battle textbox palette extern const struct BgTemplate gUnknown_0831AA08[]; extern const struct WindowTemplate * const gUnknown_0831ABA0[]; extern const u8 gUnknown_0831ACE0[]; +extern const u8 gStatStageRatios[][2]; // strings extern const u8 gText_LinkStandby3[]; @@ -163,7 +175,23 @@ extern const u8 gUnknown_082DAB11[]; extern const u8 gUnknown_082DB9BA[]; extern const u8 gUnknown_082DAAFE[]; extern const u8 gUnknown_082DAB0B[]; +extern const u8 BattleScript_FocusPunchSetUp[]; +extern const u8 BattleScript_LinkBattleWonOrLost[]; +extern const u8 BattleScript_FrontierTrainerBattleWon[]; +extern const u8 BattleScript_LocalTrainerBattleWon[]; +extern const u8 BattleScript_PayDayMoneyAndPickUpItems[]; +extern const u8 BattleScript_LocalBattleLost[]; +extern const u8 gUnknown_082DB9C8[]; +extern const u8 gUnknown_082DAA0B[]; +extern const u8 gUnknown_082DB9C1[]; +extern const u8 BattleScript_RanAwayUsingMonAbility[]; +extern const u8 BattleScript_SmokeBallEscape[]; +extern const u8 BattleScript_GotAwaySafely[]; +extern const u8 BattleScript_WildMonFled[]; +extern const u8 BattleScript_MoveUsedLoafingAround[]; +extern const u8 BattleScript_ActionSwitch[]; +// functions extern void HandleLinkBattleSetup(void); // rom_3 extern void SetUpBattleVarsAndBirchZigzagoon(void); // rom_3 extern void sub_8032768(void); // rom_3 @@ -179,8 +207,13 @@ extern void sub_80B3AF8(u8 taskId); // cable club extern void sub_8076918(u8 bank); extern void sub_80729D0(u8 healthoxSpriteId); extern void sub_81A56B4(void); // battle frontier 2 +extern u8 sub_81A9E28(void); // battle frontier 2 +extern void sub_81A56E8(u8 bank); // battle frontier 2 extern void sub_81B8FB0(u8, u8); // party menu extern u8 pokemon_order_func(u8); // party menu +extern void sub_80EC728(void); // tv +extern void sub_80EE184(void); // tv +extern bool8 InBattlePyramid(void); // this file's functions static void CB2_InitBattleInternal(void); @@ -209,7 +242,7 @@ void sub_8039E9C(struct Sprite *sprite); void SpriteCallbackDummy_3(struct Sprite *sprite); void oac_poke_ally_(struct Sprite *sprite); void SpecialStatusesClear(void); -void TurnValuesCleanUp(u8); +void TurnValuesCleanUp(bool8 var0); static void SpriteCB_HealthBoxBounce(struct Sprite *sprite); static void BattleStartClearSetData(void); static void BattleIntroGetMonsData(void); @@ -226,11 +259,16 @@ static void BattleIntroRecordMonsToDex(void); static void BattleIntroPlayer1SendsOutMonAnimation(void); static void TryDoEventsBeforeFirstTurn(void); void HandleTurnActionSelectionState(void); -void bc_bs_exec(void); +static void RunTurnActionsFunctions(void); static void SetActionsAndBanksTurnOrder(void); void sub_803CDF8(void); bool8 sub_803CDB8(void); -void bc_80154A0(void); +static void CheckFocusPunch_ClearVarsBeforeTurnStarts(void); +void HandleEndTurn_FinishBattle(void); +static void FreeResetData_ReturnToOvOrDoEvolutions(void); +static void ReturnFromBattleToOverworld(void); +static void TryEvolvePokemon(void); +static void WaitForEvoSceneToFinish(void); void CB2_InitBattle(void) { @@ -2645,7 +2683,7 @@ static void BattleStartClearSetData(void) u32 j; u8 *dataPtr; - TurnValuesCleanUp(0); + TurnValuesCleanUp(FALSE); SpecialStatusesClear(); for (i = 0; i < BATTLE_BANKS_COUNT; i++) @@ -2715,7 +2753,7 @@ static void BattleStartClearSetData(void) gBattleScripting.animTargetsHit = 0; gLeveledUpInBattle = 0; gAbsentBankFlags = 0; - gBattleStruct->field_6C = 0; + gBattleStruct->runTries = 0; gBattleStruct->field_79 = 0; gBattleStruct->field_7A = 0; *(&gBattleStruct->field_7C) = gBaseStats[GetMonData(&gEnemyParty[0], MON_DATA_SPECIES)].catchRate * 100 / 1275; @@ -3568,7 +3606,7 @@ static void TryDoEventsBeforeFirstTurn(void) gActionForBanks[i] = ACTION_INIT_VALUE; gChosenMovesByBanks[i] = MOVE_NONE; } - TurnValuesCleanUp(0); + TurnValuesCleanUp(FALSE); SpecialStatusesClear(); *(&gBattleStruct->field_91) = gAbsentBankFlags; sub_814F9EC(gText_EmptyString3, 0); @@ -3627,7 +3665,7 @@ void BattleTurnPassed(void) { s32 i; - TurnValuesCleanUp(1); + TurnValuesCleanUp(TRUE); if (gBattleOutcome == 0) { if (UpdateTurnCounters() != 0) @@ -3641,7 +3679,7 @@ void BattleTurnPassed(void) if (sub_8041364() != 0) return; - TurnValuesCleanUp(0); + TurnValuesCleanUp(FALSE); gHitMarker &= ~(HITMARKER_NO_ATTACKSTRING); gHitMarker &= ~(HITMARKER_UNABLE_TO_USE_MOVE); gHitMarker &= ~(HITMARKER_x400000); @@ -3657,8 +3695,8 @@ void BattleTurnPassed(void) if (gBattleOutcome != 0) { - gFightStateTracker = 12; - gBattleMainFunc = bc_bs_exec; + gCurrentActionFuncId = 12; + gBattleMainFunc = RunTurnActionsFunctions; return; } @@ -3862,7 +3900,7 @@ void HandleTurnActionSelectionState(void) else if (gDisableStructs[gActiveBank].encoredMove != 0) { gChosenMovesByBanks[gActiveBank] = gDisableStructs[gActiveBank].encoredMove; - *(gBattleStruct->chosenMovesIds + gActiveBank) = gDisableStructs[gActiveBank].encoredMovePos; + *(gBattleStruct->chosenMovePositions + gActiveBank) = gDisableStructs[gActiveBank].encoredMovePos; gBattleCommunication[gActiveBank] = STATE_WAIT_ACTION_CONFIRMED_STANDBY; return; } @@ -4067,8 +4105,8 @@ void HandleTurnActionSelectionState(void) RecordedBattle_SetBankAction(gActiveBank, gBattleBufferB[gActiveBank][2]); RecordedBattle_SetBankAction(gActiveBank, gBattleBufferB[gActiveBank][3]); } - *(gBattleStruct->chosenMovesIds + gActiveBank) = gBattleBufferB[gActiveBank][2]; - gChosenMovesByBanks[gActiveBank] = gBattleMons[gActiveBank].moves[*(gBattleStruct->chosenMovesIds + gActiveBank)]; + *(gBattleStruct->chosenMovePositions + gActiveBank) = gBattleBufferB[gActiveBank][2]; + gChosenMovesByBanks[gActiveBank] = gBattleMons[gActiveBank].moves[*(gBattleStruct->chosenMovePositions + gActiveBank)]; *(gBattleStruct->moveTarget + gActiveBank) = gBattleBufferB[gActiveBank][3]; gBattleCommunication[gActiveBank]++; } @@ -4257,8 +4295,6 @@ void sub_803CDF8(void) } } -extern u8 gActionsByTurnOrder[BATTLE_BANKS_COUNT]; - void SwapTurnOrder(u8 id1, u8 id2) { u32 temp = gActionsByTurnOrder[id1]; @@ -4270,8 +4306,6 @@ void SwapTurnOrder(u8 id1, u8 id2) gBanksByTurnOrder[id2] = temp; } -extern const u8 gStatStageRatios[][2]; - u8 GetWhoStrikesFirst(u8 bank1, u8 bank2, bool8 ignoreChosenMoves) { u8 strikesFirst = 0; @@ -4379,7 +4413,7 @@ u8 GetWhoStrikesFirst(u8 bank1, u8 bank2, bool8 ignoreChosenMoves) if (gProtectStructs[bank1].onlyStruggle) moveBank1 = MOVE_STRUGGLE; else - moveBank1 = gBattleMons[bank1].moves[*(gBattleStruct->chosenMovesIds + bank1)]; + moveBank1 = gBattleMons[bank1].moves[*(gBattleStruct->chosenMovePositions + bank1)]; } else moveBank1 = MOVE_NONE; @@ -4389,7 +4423,7 @@ u8 GetWhoStrikesFirst(u8 bank1, u8 bank2, bool8 ignoreChosenMoves) if (gProtectStructs[bank2].onlyStruggle) moveBank2 = MOVE_STRUGGLE; else - moveBank2 = gBattleMons[bank2].moves[*(gBattleStruct->chosenMovesIds + bank2)]; + moveBank2 = gBattleMons[bank2].moves[*(gBattleStruct->chosenMovePositions + bank2)]; } else moveBank2 = MOVE_NONE; @@ -4482,8 +4516,8 @@ static void SetActionsAndBanksTurnOrder(void) var++; } } - gBattleMainFunc = bc_80154A0; - gBattleStruct->field_48 = 0; + gBattleMainFunc = CheckFocusPunch_ClearVarsBeforeTurnStarts; + gBattleStruct->focusPunchBank = 0; return; } else @@ -4524,6 +4558,820 @@ static void SetActionsAndBanksTurnOrder(void) } } } - gBattleMainFunc = bc_80154A0; - gBattleStruct->field_48 = 0; + gBattleMainFunc = CheckFocusPunch_ClearVarsBeforeTurnStarts; + gBattleStruct->focusPunchBank = 0; +} + +void TurnValuesCleanUp(bool8 var0) +{ + s32 i; + u8 *dataPtr; + + for (gActiveBank = 0; gActiveBank < gNoOfAllBanks; gActiveBank++) + { + if (var0) + { + gProtectStructs[gActiveBank].protected = 0; + gProtectStructs[gActiveBank].endured = 0; + } + else + { + dataPtr = (u8*)(&gProtectStructs[gActiveBank]); + for (i = 0; i < sizeof(struct ProtectStruct); i++) + dataPtr[i] = 0; + + if (gDisableStructs[gActiveBank].isFirstTurn) + gDisableStructs[gActiveBank].isFirstTurn--; + + if (gDisableStructs[gActiveBank].rechargeCounter) + { + gDisableStructs[gActiveBank].rechargeCounter--; + if (gDisableStructs[gActiveBank].rechargeCounter == 0) + gBattleMons[gActiveBank].status2 &= ~(STATUS2_RECHARGE); + } + } + + if (gDisableStructs[gActiveBank].substituteHP == 0) + gBattleMons[gActiveBank].status2 &= ~(STATUS2_SUBSTITUTE); + } + + gSideTimers[0].followmeTimer = 0; + gSideTimers[1].followmeTimer = 0; +} + +void SpecialStatusesClear(void) +{ + for (gActiveBank = 0; gActiveBank < gNoOfAllBanks; gActiveBank++) + { + s32 i; + u8 *dataPtr = (u8*)(&gSpecialStatuses[gActiveBank]); + + for (i = 0; i < sizeof(struct SpecialStatus); i++) + dataPtr[i] = 0; + } +} + +static void CheckFocusPunch_ClearVarsBeforeTurnStarts(void) +{ + if (!(gHitMarker & HITMARKER_x8000)) + { + while (gBattleStruct->focusPunchBank < gNoOfAllBanks) + { + gActiveBank = gBankAttacker = gBattleStruct->focusPunchBank; + gBattleStruct->focusPunchBank++; + if (gChosenMovesByBanks[gActiveBank] == MOVE_FOCUS_PUNCH + && !(gBattleMons[gActiveBank].status1 & STATUS_SLEEP) + && !(gDisableStructs[gBankAttacker].truantCounter) + && !(gProtectStructs[gActiveBank].onlyStruggle)) + { + BattleScriptExecute(BattleScript_FocusPunchSetUp); + return; + } + } + } + + TryClearRageStatuses(); + gCurrentTurnActionNumber = 0; +{ + // something stupid needed to match + u8 zero; + gCurrentActionFuncId = gActionsByTurnOrder[(zero = 0)]; +} + gDynamicBasePower = 0; + gBattleStruct->dynamicMoveType = 0; + gBattleMainFunc = RunTurnActionsFunctions; + gBattleCommunication[3] = 0; + gBattleCommunication[4] = 0; + gBattleScripting.field_16 = 0; + gBattleResources->battleScriptsStack->size = 0; +} + +extern void (* const gTurnActionsFuncsTable[])(void); +extern void (* const gEndTurnFuncsTable[])(void); + +static void RunTurnActionsFunctions(void) +{ + if (gBattleOutcome != 0) + gCurrentActionFuncId = 12; + + *(&gBattleStruct->field_4B) = gCurrentTurnActionNumber; + gTurnActionsFuncsTable[gCurrentActionFuncId](); + + if (gCurrentTurnActionNumber >= gNoOfAllBanks) // everyone did their actions, turn finished + { + gHitMarker &= ~(HITMARKER_x100000); + gBattleMainFunc = gEndTurnFuncsTable[gBattleOutcome & 0x7F]; + } + else + { + if (gBattleStruct->field_4B != gCurrentTurnActionNumber) // action turn has been done, clear hitmarker bits for another bank + { + gHitMarker &= ~(HITMARKER_NO_ATTACKSTRING); + gHitMarker &= ~(HITMARKER_UNABLE_TO_USE_MOVE); + } + } +} + +void HandleEndTurn_BattleWon(void) +{ + gCurrentActionFuncId = 0; + + if (gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_x2000000)) + { + gScriptResult = gBattleOutcome; + gBattleTextBuff1[0] = gBattleOutcome; + gBankAttacker = GetBankByIdentity(IDENTITY_PLAYER_MON1); + gBattlescriptCurrInstr = BattleScript_LinkBattleWonOrLost; + gBattleOutcome &= ~(BATTLE_OUTCOME_BIT_x80); + } + else if (gBattleTypeFlags & BATTLE_TYPE_TRAINER + && gBattleTypeFlags & (BATTLE_TYPE_FRONTIER | BATTLE_TYPE_x4000000 | BATTLE_TYPE_EREADER_TRAINER)) + { + BattleMusicStop(); + gBattlescriptCurrInstr = BattleScript_FrontierTrainerBattleWon; + + if (gTrainerBattleOpponent_A == TRAINER_OPPONENT_3FE) + PlayBGM(BGM_KACHI3); + else + PlayBGM(BGM_KACHI1); + } + else if (gBattleTypeFlags & BATTLE_TYPE_TRAINER && !(gBattleTypeFlags & BATTLE_TYPE_LINK)) + { + BattleMusicStop(); + gBattlescriptCurrInstr = BattleScript_LocalTrainerBattleWon; + + switch (gTrainers[gTrainerBattleOpponent_A].trainerClass) + { + case CLASS_ELITE_FOUR: + case CLASS_CHAMPION: + PlayBGM(BGM_KACHI5); + break; + case CLASS_TEAM_AQUA: + case CLASS_TEAM_MAGMA: + case CLASS_AQUA_ADMIN: + case CLASS_AQUA_LEADER: + case CLASS_MAGMA_ADMIN: + case CLASS_MAGMA_LEADER: + PlayBGM(BGM_KACHI4); + break; + case CLASS_LEADER: + PlayBGM(BGM_KACHI3); + break; + default: + PlayBGM(BGM_KACHI1); + break; + } + } + else + { + gBattlescriptCurrInstr = BattleScript_PayDayMoneyAndPickUpItems; + } + + gBattleMainFunc = HandleEndTurn_FinishBattle; +} + +void HandleEndTurn_BattleLost(void) +{ + gCurrentActionFuncId = 0; + + if (gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_x2000000)) + { + if (gBattleTypeFlags & BATTLE_TYPE_FRONTIER) + { + if (gBattleOutcome & BATTLE_OUTCOME_BIT_x80) + { + gBattlescriptCurrInstr = gUnknown_082DB9C8; + gBattleOutcome &= ~(BATTLE_OUTCOME_BIT_x80); + gSaveBlock2Ptr->field_CA9_b = 1; + } + else + { + gBattlescriptCurrInstr = gUnknown_082DAA0B; + gBattleOutcome &= ~(BATTLE_OUTCOME_BIT_x80); + } + } + else + { + gBattleTextBuff1[0] = gBattleOutcome; + gBankAttacker = GetBankByIdentity(IDENTITY_PLAYER_MON1); + gBattlescriptCurrInstr = BattleScript_LinkBattleWonOrLost; + gBattleOutcome &= ~(BATTLE_OUTCOME_BIT_x80); + } + } + else + { + gBattlescriptCurrInstr = BattleScript_LocalBattleLost; + } + + gBattleMainFunc = HandleEndTurn_FinishBattle; +} + +void HandleEndTurn_RanFromBattle(void) +{ + gCurrentActionFuncId = 0; + + if (gBattleTypeFlags & BATTLE_TYPE_FRONTIER && gBattleTypeFlags & BATTLE_TYPE_TRAINER) + { + gBattlescriptCurrInstr = gUnknown_082DB9C1; + gBattleOutcome = BATTLE_FORFEITED; + gSaveBlock2Ptr->field_CA9_b = 1; + } + else if (gBattleTypeFlags & BATTLE_TYPE_x4000000) + { + gBattlescriptCurrInstr = gUnknown_082DB9C1; + gBattleOutcome = BATTLE_FORFEITED; + } + else + { + switch (gProtectStructs[gBankAttacker].fleeFlag) + { + default: + gBattlescriptCurrInstr = BattleScript_GotAwaySafely; + break; + case 1: + gBattlescriptCurrInstr = BattleScript_SmokeBallEscape; + break; + case 2: + gBattlescriptCurrInstr = BattleScript_RanAwayUsingMonAbility; + break; + } + } + + gBattleMainFunc = HandleEndTurn_FinishBattle; +} + +void HandleEndTurn_MonFled(void) +{ + gCurrentActionFuncId = 0; + + PREPARE_MON_NICK_BUFFER(gBattleTextBuff1, gBankAttacker, gBattlePartyID[gBankAttacker]); + gBattlescriptCurrInstr = BattleScript_WildMonFled; + + gBattleMainFunc = HandleEndTurn_FinishBattle; +} + +void HandleEndTurn_FinishBattle(void) +{ + if (gCurrentActionFuncId == 0xB || gCurrentActionFuncId == 0xC) + { + if (!(gBattleTypeFlags & (BATTLE_TYPE_LINK + | BATTLE_TYPE_x2000000 + | BATTLE_TYPE_FIRST_BATTLE + | BATTLE_TYPE_SAFARI + | BATTLE_TYPE_EREADER_TRAINER + | BATTLE_TYPE_WALLY_TUTORIAL + | BATTLE_TYPE_FRONTIER))) + { + for (gActiveBank = 0; gActiveBank < gNoOfAllBanks; gActiveBank++) + { + if (GetBankSide(gActiveBank) == SIDE_PLAYER) + { + if (gBattleResults.playerMon1Species == SPECIES_NONE) + { + gBattleResults.playerMon1Species = GetMonData(&gPlayerParty[gBattlePartyID[gActiveBank]], MON_DATA_SPECIES, NULL); + GetMonData(&gPlayerParty[gBattlePartyID[gActiveBank]], MON_DATA_NICKNAME, gBattleResults.playerMon1Name); + } + else + { + gBattleResults.playerMon2Species = GetMonData(&gPlayerParty[gBattlePartyID[gActiveBank]], MON_DATA_SPECIES, NULL); + GetMonData(&gPlayerParty[gBattlePartyID[gActiveBank]], MON_DATA_NICKNAME, gBattleResults.playerMon2Name); + } + } + } + sub_80EC728(); + } + + if (!(gBattleTypeFlags & (BATTLE_TYPE_LINK + | BATTLE_TYPE_x2000000 + | BATTLE_TYPE_TRAINER + | BATTLE_TYPE_FIRST_BATTLE + | BATTLE_TYPE_SAFARI + | BATTLE_TYPE_FRONTIER + | BATTLE_TYPE_EREADER_TRAINER + | BATTLE_TYPE_WALLY_TUTORIAL)) + && gBattleResults.unk5_6) + { + sub_80EE184(); + } + + sub_8186444(); + BeginFastPaletteFade(3); + FadeOutMapMusic(5); + gBattleMainFunc = FreeResetData_ReturnToOvOrDoEvolutions; + gUnknown_030061E8 = BattleMainCB2; + } + else + { + if (gBattleExecBuffer == 0) + gBattleScriptingCommandsTable[gBattlescriptCurrInstr[0]](); + } +} + +static void FreeResetData_ReturnToOvOrDoEvolutions(void) +{ + if (!gPaletteFade.active) + { + ResetSpriteData(); + if (gLeveledUpInBattle == 0 || gBattleOutcome != BATTLE_WON) + { + gBattleMainFunc = ReturnFromBattleToOverworld; + return; + } + else + { + gBattleMainFunc = TryEvolvePokemon; + } + } + + FreeAllWindowBuffers(); + if (!(gBattleTypeFlags & BATTLE_TYPE_LINK)) + { + FreeMonSpritesGfx(); + FreeBattleResources(); + FreeBattleSpritesData(); + } +} + +static void TryEvolvePokemon(void) +{ + s32 i; + + while (gLeveledUpInBattle != 0) + { + for (i = 0; i < 6; i++) + { + if (gLeveledUpInBattle & gBitTable[i]) + { + u16 species; + u8 levelUpBits = gLeveledUpInBattle; + + levelUpBits &= ~(gBitTable[i]); + gLeveledUpInBattle = levelUpBits; + + species = GetEvolutionTargetSpecies(&gPlayerParty[i], 0, levelUpBits); + if (species != SPECIES_NONE) + { + FreeAllWindowBuffers(); + gBattleMainFunc = WaitForEvoSceneToFinish; + EvolutionScene(&gPlayerParty[i], species, TRUE, i); + return; + } + } + } + } + + gBattleMainFunc = ReturnFromBattleToOverworld; +} + +static void WaitForEvoSceneToFinish(void) +{ + if (gMain.callback2 == BattleMainCB2) + gBattleMainFunc = TryEvolvePokemon; +} + +static void ReturnFromBattleToOverworld(void) +{ + if (!(gBattleTypeFlags & BATTLE_TYPE_LINK)) + { + RandomlyGivePartyPokerus(gPlayerParty); + PartySpreadPokerus(gPlayerParty); + } + + if (gBattleTypeFlags & BATTLE_TYPE_LINK && gReceivedRemoteLinkPlayers != 0) + return; + + gScriptResult = gBattleOutcome; + gMain.inBattle = 0; + gMain.callback1 = gPreBattleCallback1; + + if (gBattleTypeFlags & BATTLE_TYPE_ROAMER) + { + UpdateRoamerHPStatus(&gEnemyParty[0]); + if ((gBattleOutcome & BATTLE_WON) || gBattleOutcome == BATTLE_CAUGHT) + SetRoamerInactive(); + } + + m4aSongNumStop(0x5A); + SetMainCallback2(gMain.savedCallback); +} + +void RunBattleScriptCommands_PopCallbacksStack(void) +{ + if (gCurrentActionFuncId == 0xB || gCurrentActionFuncId == 0xC) + { + if (BATTLE_CALLBACKS_STACK->size != 0) + BATTLE_CALLBACKS_STACK->size--; + gBattleMainFunc = BATTLE_CALLBACKS_STACK->function[BATTLE_CALLBACKS_STACK->size]; + } + else + { + if (gBattleExecBuffer == 0) + gBattleScriptingCommandsTable[gBattlescriptCurrInstr[0]](); + } +} + +void RunBattleScriptCommands(void) +{ + if (gBattleExecBuffer == 0) + gBattleScriptingCommandsTable[gBattlescriptCurrInstr[0]](); +} + +extern const u8 * const gBattleScriptsForMoveEffects[]; + +void HandleAction_UseMove(void) +{ + u8 side; + u8 var = 4; + + gBankAttacker = gBanksByTurnOrder[gCurrentTurnActionNumber]; + + if (*(&gBattleStruct->field_91) & gBitTable[gBankAttacker]) + { + gCurrentActionFuncId = ACTION_FINISHED; + return; + } + + gCritMultiplier = 1; + gBattleScripting.dmgMultiplier = 1; + gBattleStruct->atkCancellerTracker = 0; + gBattleMoveFlags = 0; + gMultiHitCounter = 0; + gBattleCommunication[6] = 0; + gCurrMovePos = gUnknown_020241E9 = *(gBattleStruct->chosenMovePositions + gBankAttacker); + + // choose move + if (gProtectStructs[gBankAttacker].onlyStruggle) + { + gProtectStructs[gBankAttacker].onlyStruggle = 0; + gCurrentMove = gLastUsedMove = MOVE_STRUGGLE; + gHitMarker |= HITMARKER_NO_PPDEDUCT; + *(gBattleStruct->moveTarget + gBankAttacker) = GetMoveTarget(MOVE_STRUGGLE, 0); + } + else if (gBattleMons[gBankAttacker].status2 & STATUS2_MULTIPLETURNS || gBattleMons[gBankAttacker].status2 & STATUS2_RECHARGE) + { + gCurrentMove = gLastUsedMove = gLockedMoves[gBankAttacker]; + } + // encore forces you to use the same move + else if (gDisableStructs[gBankAttacker].encoredMove != MOVE_NONE + && gDisableStructs[gBankAttacker].encoredMove == gBattleMons[gBankAttacker].moves[gDisableStructs[gBankAttacker].encoredMovePos]) + { + gCurrentMove = gLastUsedMove = gDisableStructs[gBankAttacker].encoredMove; + gCurrMovePos = gUnknown_020241E9 = gDisableStructs[gBankAttacker].encoredMovePos; + *(gBattleStruct->moveTarget + gBankAttacker) = GetMoveTarget(gCurrentMove, 0); + } + // check if the encored move wasn't overwritten + else if (gDisableStructs[gBankAttacker].encoredMove != MOVE_NONE + && gDisableStructs[gBankAttacker].encoredMove != gBattleMons[gBankAttacker].moves[gDisableStructs[gBankAttacker].encoredMovePos]) + { + gCurrMovePos = gUnknown_020241E9 = gDisableStructs[gBankAttacker].encoredMovePos; + gCurrentMove = gLastUsedMove = gBattleMons[gBankAttacker].moves[gCurrMovePos]; + gDisableStructs[gBankAttacker].encoredMove = MOVE_NONE; + gDisableStructs[gBankAttacker].encoredMovePos = 0; + gDisableStructs[gBankAttacker].encoreTimer1 = 0; + *(gBattleStruct->moveTarget + gBankAttacker) = GetMoveTarget(gCurrentMove, 0); + } + else if (gBattleMons[gBankAttacker].moves[gCurrMovePos] != gChosenMovesByBanks[gBankAttacker]) + { + gCurrentMove = gLastUsedMove = gBattleMons[gBankAttacker].moves[gCurrMovePos]; + *(gBattleStruct->moveTarget + gBankAttacker) = GetMoveTarget(gCurrentMove, 0); + } + else + { + gCurrentMove = gLastUsedMove = gBattleMons[gBankAttacker].moves[gCurrMovePos]; + } + + if (gBattleMons[gBankAttacker].hp != 0) + { + if (GetBankSide(gBankAttacker) == SIDE_PLAYER) + gBattleResults.lastUsedMovePlayer = gCurrentMove; + else + gBattleResults.lastUsedMoveOpponent = gCurrentMove; + } + + // choose target + side = GetBankSide(gBankAttacker) ^ BIT_SIDE; + if (gSideTimers[side].followmeTimer != 0 + && gBattleMoves[gCurrentMove].target == MOVE_TARGET_SELECTED + && GetBankSide(gBankAttacker) != GetBankSide(gSideTimers[side].followmeTarget) + && gBattleMons[gSideTimers[side].followmeTarget].hp != 0) + { + gBankTarget = gSideTimers[side].followmeTarget; + } + else if ((gBattleTypeFlags & BATTLE_TYPE_DOUBLE) + && gSideTimers[side].followmeTimer == 0 + && (gBattleMoves[gCurrentMove].power != 0 + || gBattleMoves[gCurrentMove].target != MOVE_TARGET_x10) + && gBattleMons[*(gBattleStruct->moveTarget + gBankAttacker)].ability != ABILITY_LIGHTNING_ROD + && gBattleMoves[gCurrentMove].type == TYPE_ELECTRIC) + { + side = GetBankSide(gBankAttacker); + for (gActiveBank = 0; gActiveBank < gNoOfAllBanks; gActiveBank++) + { + if (side != GetBankSide(gActiveBank) + && *(gBattleStruct->moveTarget + gBankAttacker) != gActiveBank + && gBattleMons[gActiveBank].ability == ABILITY_LIGHTNING_ROD + && BankGetTurnOrder(gActiveBank) < var) + { + var = BankGetTurnOrder(gActiveBank); + } + } + if (var == 4) + { + if (gBattleMoves[gLastUsedMove].target & MOVE_TARGET_RANDOM) + { + if (GetBankSide(gBankAttacker) == SIDE_PLAYER) + { + if (Random() & 1) + gBankTarget = GetBankByIdentity(IDENTITY_OPPONENT_MON1); + else + gBankTarget = GetBankByIdentity(IDENTITY_OPPONENT_MON2); + } + else + { + if (Random() & 1) + gBankTarget = GetBankByIdentity(IDENTITY_PLAYER_MON1); + else + gBankTarget = GetBankByIdentity(IDENTITY_PLAYER_MON2); + } + } + else + { + gBankTarget = *(gBattleStruct->moveTarget + gBankAttacker); + } + + if (gAbsentBankFlags & gBitTable[gBankTarget]) + { + if (GetBankSide(gBankAttacker) != GetBankSide(gBankTarget)) + { + gBankTarget = GetBankByIdentity(GetBankIdentity(gBankTarget) ^ BIT_MON); + } + else + { + gBankTarget = GetBankByIdentity(GetBankIdentity(gBankAttacker) ^ BIT_SIDE); + if (gAbsentBankFlags & gBitTable[gBankTarget]) + gBankTarget = GetBankByIdentity(GetBankIdentity(gBankTarget) ^ BIT_MON); + } + } + } + else + { + gActiveBank = gBanksByTurnOrder[var]; + RecordAbilityBattle(gActiveBank, gBattleMons[gActiveBank].ability); + gSpecialStatuses[gActiveBank].lightningRodRedirected = 1; + gBankTarget = gActiveBank; + } + } + else if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE + && gBattleMoves[gLastUsedMove].target & MOVE_TARGET_RANDOM) + { + if (GetBankSide(gBankAttacker) == SIDE_PLAYER) + { + if (Random() & 1) + gBankTarget = GetBankByIdentity(IDENTITY_OPPONENT_MON1); + else + gBankTarget = GetBankByIdentity(IDENTITY_OPPONENT_MON2); + } + else + { + if (Random() & 1) + gBankTarget = GetBankByIdentity(IDENTITY_PLAYER_MON1); + else + gBankTarget = GetBankByIdentity(IDENTITY_PLAYER_MON2); + } + + if (gAbsentBankFlags & gBitTable[gBankTarget] + && GetBankSide(gBankAttacker) != GetBankSide(gBankTarget)) + { + gBankTarget = GetBankByIdentity(GetBankIdentity(gBankTarget) ^ BIT_MON); + } + } + else + { + gBankTarget = *(gBattleStruct->moveTarget + gBankAttacker); + if (gAbsentBankFlags & gBitTable[gBankTarget]) + { + if (GetBankSide(gBankAttacker) != GetBankSide(gBankTarget)) + { + gBankTarget = GetBankByIdentity(GetBankIdentity(gBankTarget) ^ BIT_MON); + } + else + { + gBankTarget = GetBankByIdentity(GetBankIdentity(gBankAttacker) ^ BIT_SIDE); + if (gAbsentBankFlags & gBitTable[gBankTarget]) + gBankTarget = GetBankByIdentity(GetBankIdentity(gBankTarget) ^ BIT_MON); + } + } + } + + // choose battlescript + if (gBattleTypeFlags & BATTLE_TYPE_PALACE + && gProtectStructs[gBankAttacker].flag_x10) + { + if (gBattleMons[gBankAttacker].hp == 0) + { + gCurrentActionFuncId = 12; + return; + } + else if (gUnknown_02024230[gBankAttacker] != NULL) + { + gBattleCommunication[MULTISTRING_CHOOSER] = 4; + gBattlescriptCurrInstr = gUnknown_02024230[gBankAttacker]; + gUnknown_02024230[gBankAttacker] = NULL; + } + else + { + gBattleCommunication[MULTISTRING_CHOOSER] = 4; + gBattlescriptCurrInstr = BattleScript_MoveUsedLoafingAround; + } + } + else + { + gBattlescriptCurrInstr = gBattleScriptsForMoveEffects[gBattleMoves[gCurrentMove].effect]; + } + + if (gBattleTypeFlags & BATTLE_TYPE_ARENA) + sub_81A56E8(gBankAttacker); + + gCurrentActionFuncId = ACTION_RUN_BATTLESCRIPT; +} + +void HandleAction_Switch(void) +{ + gBankAttacker = gBanksByTurnOrder[gCurrentTurnActionNumber]; + gBattle_BG0_X = 0; + gBattle_BG0_Y = 0; + gActionSelectionCursor[gBankAttacker] = 0; + gMoveSelectionCursor[gBankAttacker] = 0; + + PREPARE_MON_NICK_BUFFER(gBattleTextBuff1, gBankAttacker, *(gBattleStruct->field_58 + gBankAttacker)) + + gBattleScripting.bank = gBankAttacker; + gBattlescriptCurrInstr = BattleScript_ActionSwitch; + gCurrentActionFuncId = ACTION_RUN_BATTLESCRIPT; + + if (gBattleResults.playerSwitchesCounter < 255) + gBattleResults.playerSwitchesCounter++; +} + +extern const u8 * const gBattlescriptsForBallThrow[]; +extern const u8 * const gBattlescriptsForRunningByItem[]; +extern const u8 * const gUnknown_082DBD3C[]; + +void HandleAction_UseItem(void) +{ + gBankAttacker = gBankTarget = gBanksByTurnOrder[gCurrentTurnActionNumber]; + gBattle_BG0_X = 0; + gBattle_BG0_Y = 0; + ClearFuryCutterDestinyBondGrudge(gBankAttacker); + gLastUsedItem = gBattleBufferB[gBankAttacker][1] | (gBattleBufferB[gBankAttacker][2] << 8); + + if (gLastUsedItem <= ITEM_PREMIER_BALL) // is ball + { + gBattlescriptCurrInstr = gBattlescriptsForBallThrow[gLastUsedItem]; + } + else if (gLastUsedItem == ITEM_POKE_DOLL || gLastUsedItem == ITEM_FLUFFY_TAIL) + { + gBattlescriptCurrInstr = gBattlescriptsForRunningByItem[0]; + } + else if (GetBankSide(gBankAttacker) == SIDE_PLAYER) + { + gBattlescriptCurrInstr = gUnknown_082DBD3C[0]; + } + else + { + gBattleScripting.bank = gBankAttacker; + + switch (*(gBattleStruct->field_C4 + (gBankAttacker >> 1))) + { + case 1: + case 2: + break; + case 3: + gBattleCommunication[MULTISTRING_CHOOSER] = 0; + if (*(gBattleStruct->field_C6 + gBankAttacker / 2) & 1) + { + if (*(gBattleStruct->field_C6 + gBankAttacker / 2) & 0x3E) + gBattleCommunication[MULTISTRING_CHOOSER] = 5; + } + else + { + while (!(*(gBattleStruct->field_C6 + gBankAttacker / 2) & 1)) + { + *(gBattleStruct->field_C6 + gBankAttacker / 2) >>= 1; + gBattleCommunication[MULTISTRING_CHOOSER]++; + } + } + break; + case 4: + gBattleCommunication[MULTISTRING_CHOOSER] = 4; + if (*(gBattleStruct->field_C6 + (gBankAttacker >> 1)) & 0x80) + { + gBattleCommunication[MULTISTRING_CHOOSER] = 5; + } + else + { + PREPARE_STAT_BUFFER(gBattleTextBuff1, STAT_ATK) + PREPARE_STRING_BUFFER(gBattleTextBuff2, 0xD2) + + while (!((*(gBattleStruct->field_C6 + (gBankAttacker >> 1))) & 1)) + { + *(gBattleStruct->field_C6 + gBankAttacker / 2) >>= 1; + gBattleTextBuff1[2]++; + } + + gBattleScripting.animArg1 = gBattleTextBuff1[2] + 14; + gBattleScripting.animArg2 = 0; + } + break; + case 5: + if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE) + gBattleCommunication[MULTISTRING_CHOOSER] = 2; + else + gBattleCommunication[MULTISTRING_CHOOSER] = 0; + break; + } + + gBattlescriptCurrInstr = gUnknown_082DBD3C[*(gBattleStruct->field_C4 + gBankAttacker / 2)]; + } + gCurrentActionFuncId = ACTION_RUN_BATTLESCRIPT; +} + +bool8 TryRunFromBattle(u8 bank) +{ + bool8 effect = FALSE; + u8 holdEffect; + u8 pyramidMultiplier; + u8 speedVar; + + if (gBattleMons[bank].item == ITEM_ENIGMA_BERRY) + holdEffect = gEnigmaBerries[bank].holdEffect; + else + holdEffect = ItemId_GetHoldEffect(gBattleMons[bank].item); + + gStringBank = bank; + + if (holdEffect == HOLD_EFFECT_CAN_ALWAYS_RUN) + { + gLastUsedItem = gBattleMons[bank].item ; + gProtectStructs[bank].fleeFlag = 1; + effect++; + } + else if (gBattleMons[bank].ability == ABILITY_RUN_AWAY) + { + if (InBattlePyramid()) + { + gBattleStruct->runTries++; + pyramidMultiplier = sub_81A9E28(); + speedVar = (gBattleMons[bank].speed * pyramidMultiplier) / (gBattleMons[bank ^ BIT_SIDE].speed) + (gBattleStruct->runTries * 30); + if (speedVar > (Random() & 0xFF)) + { + gLastUsedAbility = ABILITY_RUN_AWAY; + gProtectStructs[bank].fleeFlag = 2; + effect++; + } + } + else + { + gLastUsedAbility = ABILITY_RUN_AWAY; + gProtectStructs[bank].fleeFlag = 2; + effect++; + } + } + else if (gBattleTypeFlags & (BATTLE_TYPE_FRONTIER | BATTLE_TYPE_x4000000) && gBattleTypeFlags & BATTLE_TYPE_TRAINER) + { + effect++; + } + else + { + if (!(gBattleTypeFlags & BATTLE_TYPE_DOUBLE)) + { + if (InBattlePyramid()) + { + pyramidMultiplier = sub_81A9E28(); + speedVar = (gBattleMons[bank].speed * pyramidMultiplier) / (gBattleMons[bank ^ BIT_SIDE].speed) + (gBattleStruct->runTries * 30); + if (speedVar > (Random() & 0xFF)) + effect++; + } + else if (gBattleMons[bank].speed < gBattleMons[bank ^ BIT_SIDE].speed) + { + speedVar = (gBattleMons[bank].speed * 128) / (gBattleMons[bank ^ BIT_SIDE].speed) + (gBattleStruct->runTries * 30); + if (speedVar > (Random() & 0xFF)) + effect++; + } + else // same speed or faster + { + effect++; + } + } + + gBattleStruct->runTries++; + } + + if (effect) + { + gCurrentTurnActionNumber = gNoOfAllBanks; + gBattleOutcome = BATTLE_RAN; + } + + return effect; } diff --git a/src/battle_3.c b/src/battle_3.c index c20d361a4..58e0a05c7 100644 --- a/src/battle_3.c +++ b/src/battle_3.c @@ -50,7 +50,7 @@ extern u8 gBattleMoveFlags; extern s32 gTakenDmg[BATTLE_BANKS_COUNT]; extern u8 gTakenDmgBanks[BATTLE_BANKS_COUNT]; extern u8 gLastUsedAbility; -extern u8 gFightStateTracker; +extern u8 gCurrentActionFuncId; extern u32 gBattleExecBuffer; extern u16 gRandomMove; extern u8 gCurrMovePos; @@ -181,8 +181,6 @@ extern const u16 gSoundMovesTable[]; extern void sub_803F9EC(); extern bool8 sub_80423F4(u8 bank, u8, u8); extern u8 weather_get_current(void); -extern void sub_803E08C(void); -extern void bc_move_exec_returning(void); extern s8 GetFlavourRelationByPersonality(u32 personality, u8 flavor); void BattleScriptPush(const u8* bsPtr) @@ -1156,7 +1154,7 @@ bool8 sub_8041728(void) return FALSE; } -void b_clear_atk_up_if_hit_flag_unless_enraged(void) +void TryClearRageStatuses(void) { int i; for (i = 0; i < gNoOfAllBanks; i++) @@ -5441,8 +5439,8 @@ void BattleScriptExecute(const u8* BS_ptr) { gBattlescriptCurrInstr = BS_ptr; BATTLE_CALLBACKS_STACK->function[BATTLE_CALLBACKS_STACK->size++] = gBattleMainFunc; - gBattleMainFunc = bc_move_exec_returning; - gFightStateTracker = 0; + gBattleMainFunc = RunBattleScriptCommands_PopCallbacksStack; + gCurrentActionFuncId = 0; } void BattleScriptPushCursorAndCallback(const u8* BS_ptr) @@ -5450,7 +5448,7 @@ void BattleScriptPushCursorAndCallback(const u8* BS_ptr) BattleScriptPushCursor(); gBattlescriptCurrInstr = BS_ptr; BATTLE_CALLBACKS_STACK->function[BATTLE_CALLBACKS_STACK->size++] = gBattleMainFunc; - gBattleMainFunc = sub_803E08C; + gBattleMainFunc = RunBattleScriptCommands; } enum @@ -5520,7 +5518,7 @@ u8 ItemBattleEffects(u8 caseID, u8 bank, bool8 moveTurn) switch (caseID) { - case 0: + case ITEMEFFECT_ON_SWITCH_IN: switch (bankHoldEffect) { case HOLD_EFFECT_DOUBLE_PRIZE: @@ -6185,7 +6183,7 @@ u8 ItemBattleEffects(u8 caseID, u8 bank, bool8 moveTurn) return effect; } -void sub_8045868(u8 bank) +void ClearFuryCutterDestinyBondGrudge(u8 bank) { gDisableStructs[bank].furyCutterCounter = 0; gBattleMons[bank].status2 &= ~(STATUS2_DESTINY_BOND); diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 380f9ec40..e68137c47 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -67,7 +67,7 @@ extern u8 gBankAttacker; extern u8 gBankTarget; extern const u8* gBattlescriptCurrInstr; extern u8 gCurrMovePos; -extern u8 gFightStateTracker; +extern u8 gCurrentActionFuncId; extern u32 gHitMarker; extern u8 gBattleMoveFlags; extern u8 gBattleCommunication[]; @@ -92,7 +92,7 @@ extern u16 gMoveToLearn; extern u16 gRandomMove; extern u8 gBankInMenu; extern u8 gActionForBanks[BATTLE_BANKS_COUNT]; -extern u8 gCurrentMoveTurn; +extern u8 gCurrentTurnActionNumber; extern u8 gBattleBufferB[BATTLE_BANKS_COUNT][0x200]; extern u16 gLockedMoves[BATTLE_BANKS_COUNT]; extern u16 gPartnerTrainerId; @@ -377,7 +377,7 @@ static void atk6E_set_atk_to_player0(void); static void atk6F_set_visible(void); static void atk70_record_last_used_ability(void); static void atk71_buffer_move_to_learn(void); -static void atk72_jump_if_can_run_frombattle(void); +static void atk72_jump_if_run_attempt_success(void); static void atk73_hp_thresholds(void); static void atk74_hp_thresholds2(void); static void atk75_item_effect_on_opponent(void); @@ -509,8 +509,8 @@ static void atkF2_display_dex_info(void); static void atkF3_nickname_caught_poke(void); static void atkF4_subattackerhpbydmg(void); static void atkF5_removeattackerstatus1(void); -static void atkF6_802BF48(void); -static void atkF7_802BF54(void); +static void atkF6_action_finished(void); +static void atkF7_turn_finished(void); static void atkF8_trainer_slide_back(void); void (* const gBattleScriptingCommandsTable[])(void) = @@ -629,7 +629,7 @@ void (* const gBattleScriptingCommandsTable[])(void) = atk6F_set_visible, atk70_record_last_used_ability, atk71_buffer_move_to_learn, - atk72_jump_if_can_run_frombattle, + atk72_jump_if_run_attempt_success, atk73_hp_thresholds, atk74_hp_thresholds2, atk75_item_effect_on_opponent, @@ -761,8 +761,8 @@ void (* const gBattleScriptingCommandsTable[])(void) = atkF3_nickname_caught_poke, atkF4_subattackerhpbydmg, atkF5_removeattackerstatus1, - atkF6_802BF48, - atkF7_802BF54, + atkF6_action_finished, + atkF7_turn_finished, atkF8_trainer_slide_back }; @@ -1097,9 +1097,9 @@ static void atk00_attackcanceler(void) { s32 i; - if (gBattleOutcome) + if (gBattleOutcome != 0) { - gFightStateTracker = 0xC; + gCurrentActionFuncId = ACTION_FINISHED; return; } if (gBattleMons[gBankAttacker].hp == 0 && !(gHitMarker & HITMARKER_NO_ATTACKSTRING)) @@ -2736,7 +2736,7 @@ void SetMoveEffect(bool8 primary, u8 certain) } else { - if (BankGetTurnOrder(gEffectBank) > gCurrentMoveTurn) + if (BankGetTurnOrder(gEffectBank) > gCurrentTurnActionNumber) gBattleMons[gEffectBank].status2 |= sStatusFlagsForMoveEffects[gBattleCommunication[MOVE_EFFECT_BYTE]]; gBattlescriptCurrInstr++; } @@ -3208,7 +3208,7 @@ static void atk19_faint_pokemon(void) && gBattleMons[gBankAttacker].hp != 0 && gCurrentMove != MOVE_STRUGGLE) { - u8 moveIndex = *(gBattleStruct->chosenMovesIds + gBankAttacker); + u8 moveIndex = *(gBattleStruct->chosenMovePositions + gBankAttacker); gBattleMons[gBankAttacker].pp[moveIndex] = 0; BattleScriptPush(gBattlescriptCurrInstr); @@ -4421,13 +4421,13 @@ static void atk3D_end(void) gBattleMoveFlags = 0; gActiveBank = 0; - gFightStateTracker = 0xB; + gCurrentActionFuncId = 0xB; } static void atk3E_end2(void) { gActiveBank = 0; - gFightStateTracker = 0xB; + gCurrentActionFuncId = 0xB; } static void atk3F_end3(void) // pops the main function stack @@ -6956,9 +6956,9 @@ static void atk71_buffer_move_to_learn(void) gBattlescriptCurrInstr++; } -static void atk72_jump_if_can_run_frombattle(void) +static void atk72_jump_if_run_attempt_success(void) { - if (CanRunFromBattle(gBank1)) + if (TryRunFromBattle(gBank1)) gBattlescriptCurrInstr = BSScriptReadPtr(gBattlescriptCurrInstr + 1); else gBattlescriptCurrInstr += 5; @@ -7045,7 +7045,7 @@ static void atk76_various(void) else gBankTarget = gActiveBank; break; - case 2: + case VARIOUS_CAN_RUN_FROM_BATTLE: gBattleCommunication[0] = IsRunningFromBattleImpossible(); break; case VARIOUS_GET_MOVE_TARGET: @@ -7196,7 +7196,7 @@ static void atk76_various(void) gBattleOutcome = BATTLE_OPPONENT_TELEPORTED; break; case VARIOUS_PLAY_TRAINER_DEFEATED_MUSIC: - EmitPlaySound(0, 0x19C, 1); + EmitPlaySound(0, BGM_KACHI1, 1); MarkBufferBankForExecution(gActiveBank); break; } @@ -7212,7 +7212,7 @@ static void atk77_set_protect_like(void) // protect and endure if (lastMove != MOVE_PROTECT && lastMove != MOVE_DETECT && lastMove != MOVE_ENDURE) gDisableStructs[gBankAttacker].protectUses = 0; - if (gCurrentMoveTurn == (gNoOfAllBanks - 1)) + if (gCurrentTurnActionNumber == (gNoOfAllBanks - 1)) notLastTurn = FALSE; if (sProtectSuccessRates[gDisableStructs[gBankAttacker].protectUses] >= Random() && notLastTurn) @@ -9715,7 +9715,7 @@ static void atkBA_jumpifnopursuitswitchdmg(void) } gCurrentMove = MOVE_PURSUIT; - gCurrMovePos = gUnknown_020241E9 = *(gBattleStruct->chosenMovesIds + gBankTarget); + gCurrMovePos = gUnknown_020241E9 = *(gBattleStruct->chosenMovePositions + gBankTarget); gBattlescriptCurrInstr += 5; gBattleScripting.animTurn = 1; gHitMarker &= ~(HITMARKER_ATTACKSTRING_PRINTED); @@ -10631,7 +10631,7 @@ static void atkDF_setmagiccoat(void) { gBankTarget = gBankAttacker; gSpecialStatuses[gBankAttacker].flag20 = 1; - if (gCurrentMoveTurn == gNoOfAllBanks - 1) // moves last turn + if (gCurrentTurnActionNumber == gNoOfAllBanks - 1) // moves last turn { gBattlescriptCurrInstr = BSScriptReadPtr(gBattlescriptCurrInstr + 1); } @@ -10645,7 +10645,7 @@ static void atkDF_setmagiccoat(void) static void atkE0_setstealstatchange(void) // snatch { gSpecialStatuses[gBankAttacker].flag20 = 1; - if (gCurrentMoveTurn == gNoOfAllBanks - 1) // moves last turn + if (gCurrentTurnActionNumber == gNoOfAllBanks - 1) // moves last turn { gBattlescriptCurrInstr = BSScriptReadPtr(gBattlescriptCurrInstr + 1); } @@ -11393,15 +11393,15 @@ static void atkF5_removeattackerstatus1(void) gBattlescriptCurrInstr++; } -static void atkF6_802BF48(void) +static void atkF6_action_finished(void) { - gFightStateTracker = 0xC; + gCurrentActionFuncId = ACTION_FINISHED; } -static void atkF7_802BF54(void) +static void atkF7_turn_finished(void) { - gFightStateTracker = 0xC; - gCurrentMoveTurn = gNoOfAllBanks; + gCurrentActionFuncId = ACTION_FINISHED; + gCurrentTurnActionNumber = gNoOfAllBanks; } static void atkF8_trainer_slide_back(void) diff --git a/sym_ewram.txt b/sym_ewram.txt index c50d8f030..c00f5e1d6 100644 --- a/sym_ewram.txt +++ b/sym_ewram.txt @@ -310,10 +310,10 @@ gActionsByTurnOrder: @ 202407A gBanksByTurnOrder: @ 202407E .space 0x4 -gCurrentMoveTurn: @ 2024082 +gCurrentTurnActionNumber: @ 2024082 .space 0x1 -gFightStateTracker: @ 2024083 +gCurrentActionFuncId: @ 2024083 .space 0x1 gBattleMons: @ 2024084 From 3cc20c7c3f9c3b6a3c0fc8b47c0128c067f34a4a Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Fri, 6 Oct 2017 17:06:45 +0200 Subject: [PATCH 32/42] battle 2 is done --- asm/battle_2.s | 1422 ----------------------------- asm/rom3.s | 6 +- data/battle_scripts_1.s | 2 +- data/battle_scripts_2.s | 2 +- include/battle.h | 166 +--- include/battle_2.h | 19 + include/battle_controllers.h | 49 +- include/battle_script_commands.h | 58 ++ include/battle_util.h | 83 ++ include/link.h | 1 + include/pokemon.h | 2 + ld_script.txt | 3 +- src/battle_2.c | 235 ++++- src/battle_script_commands.c | 18 +- src/{battle_3.c => battle_util.c} | 284 +++++- 15 files changed, 708 insertions(+), 1642 deletions(-) delete mode 100644 asm/battle_2.s create mode 100644 include/battle_2.h create mode 100644 include/battle_script_commands.h create mode 100644 include/battle_util.h rename src/{battle_3.c => battle_util.c} (96%) diff --git a/asm/battle_2.s b/asm/battle_2.s deleted file mode 100644 index c0d8fd72a..000000000 --- a/asm/battle_2.s +++ /dev/null @@ -1,1422 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .syntax unified - - .text - - - thumb_func_start sub_803EE48 -sub_803EE48: @ 803EE48 - push {r4-r6,lr} - ldr r4, =gBankAttacker - ldr r1, =gBanksByTurnOrder - ldr r5, =gCurrentTurnActionNumber - ldrb r0, [r5] - adds r0, r1 - ldrb r0, [r0] - strb r0, [r4] - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - ldr r1, =0x02000002 - ands r0, r1 - cmp r0, 0 - beq _0803EF0C - ldr r0, =gNoOfAllBanks - ldrb r1, [r0] - strb r1, [r5] - ldr r2, =gActiveBank - movs r0, 0 - strb r0, [r2] - lsls r1, 24 - cmp r1, 0 - beq _0803EEE0 - adds r4, r2, 0 - ldr r6, =gActionForBanks - ldr r5, =gBattleOutcome -_0803EE7C: - ldrb r0, [r4] - bl GetBankSide - lsls r0, 24 - cmp r0, 0 - bne _0803EEBC - ldrb r0, [r4] - adds r0, r6 - ldrb r0, [r0] - cmp r0, 0x3 - bne _0803EECE - ldrb r0, [r5] - movs r1, 0x2 - b _0803EECA - .pool -_0803EEBC: - ldrb r0, [r4] - adds r0, r6 - ldrb r0, [r0] - cmp r0, 0x3 - bne _0803EECE - ldrb r0, [r5] - movs r1, 0x1 -_0803EECA: - orrs r0, r1 - strb r0, [r5] -_0803EECE: - ldrb r0, [r4] - adds r0, 0x1 - strb r0, [r4] - ldr r1, =gNoOfAllBanks - lsls r0, 24 - lsrs r0, 24 - ldrb r1, [r1] - cmp r0, r1 - bcc _0803EE7C -_0803EEE0: - ldr r2, =gBattleOutcome - ldrb r0, [r2] - movs r1, 0x80 - orrs r0, r1 - strb r0, [r2] - ldr r0, =gSaveBlock2Ptr - ldr r1, [r0] - ldr r0, =0x00000ca9 - adds r1, r0 - ldrb r0, [r1] - movs r2, 0x8 - orrs r0, r2 - b _0803EF96 - .pool -_0803EF0C: - ldrb r0, [r4] - bl GetBankSide - lsls r0, 24 - cmp r0, 0 - bne _0803EF4C - ldrb r0, [r4] - bl TryRunFromBattle - lsls r0, 24 - cmp r0, 0 - bne _0803EF98 - ldrb r0, [r4] - bl ClearFuryCutterDestinyBondGrudge - ldr r1, =gBattleCommunication - movs r0, 0x3 - strb r0, [r1, 0x5] - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DAB02 - str r0, [r1] - ldr r1, =gCurrentActionFuncId - movs r0, 0xA - b _0803EF96 - .pool -_0803EF4C: - ldr r1, =gBattleMons - ldrb r2, [r4] - movs r0, 0x58 - muls r0, r2 - adds r1, 0x50 - adds r0, r1 - ldr r0, [r0] - ldr r1, =0x0400e000 - ands r0, r1 - cmp r0, 0 - beq _0803EF8C - ldr r1, =gBattleCommunication - movs r0, 0x4 - strb r0, [r1, 0x5] - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DAB02 - str r0, [r1] - ldr r1, =gCurrentActionFuncId - movs r0, 0xA - b _0803EF96 - .pool -_0803EF8C: - ldr r0, =gNoOfAllBanks - ldrb r0, [r0] - strb r0, [r5] - ldr r1, =gBattleOutcome - movs r0, 0x6 -_0803EF96: - strb r0, [r1] -_0803EF98: - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end sub_803EE48 - - thumb_func_start sub_803EFA8 -sub_803EFA8: @ 803EFA8 - ldr r2, =gBankAttacker - ldr r1, =gBanksByTurnOrder - ldr r0, =gCurrentTurnActionNumber - ldrb r0, [r0] - adds r0, r1 - ldrb r0, [r0] - strb r0, [r2] - ldr r0, =gBattle_BG0_X - movs r1, 0 - strh r1, [r0] - ldr r0, =gBattle_BG0_Y - strh r1, [r0] - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DBD58 - ldr r0, [r0] - str r0, [r1] - ldr r1, =gCurrentActionFuncId - movs r0, 0xA - strb r0, [r1] - bx lr - .pool - thumb_func_end sub_803EFA8 - - thumb_func_start bs5_8016AC0 -bs5_8016AC0: @ 803EFF0 - ldr r2, =gBankAttacker - ldr r1, =gBanksByTurnOrder - ldr r0, =gCurrentTurnActionNumber - ldrb r0, [r0] - adds r0, r1 - ldrb r0, [r0] - strb r0, [r2] - ldr r0, =gBattle_BG0_X - movs r1, 0 - strh r1, [r0] - ldr r0, =gBattle_BG0_Y - strh r1, [r0] - ldr r1, =gNumSafariBalls - ldrb r0, [r1] - subs r0, 0x1 - strb r0, [r1] - ldr r1, =gLastUsedItem - movs r0, 0x5 - strh r0, [r1] - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gBattlescriptsForBallThrow - ldr r0, [r0, 0x14] - str r0, [r1] - ldr r1, =gCurrentActionFuncId - movs r0, 0xA - strb r0, [r1] - bx lr - .pool - thumb_func_end bs5_8016AC0 - - thumb_func_start sub_803F050 -sub_803F050: @ 803F050 - push {r4-r6,lr} - ldr r3, =gBankAttacker - ldr r1, =gBanksByTurnOrder - ldr r0, =gCurrentTurnActionNumber - ldrb r0, [r0] - adds r0, r1 - ldrb r0, [r0] - strb r0, [r3] - ldr r0, =gBattle_BG0_X - movs r1, 0 - strh r1, [r0] - ldr r0, =gBattle_BG0_Y - strh r1, [r0] - ldr r6, =gBattleCommunication - ldr r2, =gBattleBufferB - ldrb r0, [r3] - lsls r0, 9 - adds r1, r2, 0x1 - adds r0, r1 - ldrb r0, [r0] - subs r0, 0x1 - strb r0, [r6, 0x5] - ldr r1, =gLastUsedItem - ldrb r0, [r3] - lsls r0, 9 - adds r2, 0x2 - adds r0, r2 - ldrb r0, [r0] - strh r0, [r1] - ldr r1, =gBattleResults - ldrb r0, [r1, 0x1F] - cmp r0, 0xFE - bhi _0803F096 - adds r0, 0x1 - strb r0, [r1, 0x1F] -_0803F096: - ldr r2, =gBattleStruct - ldr r0, [r2] - adds r1, r0, 0 - adds r1, 0x7A - ldrb r0, [r1] - cmp r0, 0x2 - bhi _0803F0A8 - adds r0, 0x1 - strb r0, [r1] -_0803F0A8: - ldr r0, [r2] - adds r3, r0, 0 - adds r3, 0x7B - ldrb r5, [r3] - adds r4, r5, 0 - cmp r4, 0x1 - bls _0803F100 - ldr r2, =gUnknown_0831BCE0 - adds r0, 0x7A - ldrb r1, [r0] - lsls r0, r1, 1 - adds r0, r1 - ldrb r6, [r6, 0x5] - adds r0, r6 - adds r0, r2 - ldrb r0, [r0] - cmp r4, r0 - bcs _0803F0FC - movs r0, 0x1 - b _0803F0FE - .pool -_0803F0FC: - subs r0, r5, r0 -_0803F0FE: - strb r0, [r3] -_0803F100: - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DBD58 - ldr r0, [r0, 0x8] - str r0, [r1] - ldr r1, =gCurrentActionFuncId - movs r0, 0xA - strb r0, [r1] - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end sub_803F050 - - thumb_func_start sub_803F120 -sub_803F120: @ 803F120 - push {r4,lr} - ldr r2, =gBankAttacker - ldr r1, =gBanksByTurnOrder - ldr r0, =gCurrentTurnActionNumber - ldrb r0, [r0] - adds r0, r1 - ldrb r0, [r0] - strb r0, [r2] - ldr r0, =gBattle_BG0_X - movs r4, 0 - strh r4, [r0] - ldr r0, =gBattle_BG0_Y - strh r4, [r0] - ldr r3, =gBattleStruct - ldr r0, [r3] - adds r2, r0, 0 - adds r2, 0x7C - ldr r1, =gUnknown_0831BCEF - adds r0, 0x79 - ldrb r0, [r0] - adds r0, r1 - ldrb r0, [r0] - ldrb r1, [r2] - adds r0, r1 - strb r0, [r2] - ldr r0, [r3] - adds r1, r0, 0 - adds r1, 0x7C - ldrb r0, [r1] - cmp r0, 0x14 - bls _0803F162 - movs r0, 0x14 - strb r0, [r1] -_0803F162: - ldr r0, [r3] - adds r2, r0, 0 - adds r2, 0x7B - ldr r1, =gUnknown_0831BCF3 - adds r0, 0x79 - ldrb r0, [r0] - adds r0, r1 - ldrb r0, [r0] - ldrb r1, [r2] - adds r0, r1 - strb r0, [r2] - ldr r0, [r3] - adds r1, r0, 0 - adds r1, 0x7B - ldrb r0, [r1] - cmp r0, 0x14 - bls _0803F188 - movs r0, 0x14 - strb r0, [r1] -_0803F188: - ldr r0, [r3] - adds r1, r0, 0 - adds r1, 0x79 - ldrb r0, [r1] - cmp r0, 0x2 - bhi _0803F1C4 - adds r0, 0x1 - strb r0, [r1] - ldr r0, =gBattleCommunication - strb r4, [r0, 0x5] - b _0803F1CA - .pool -_0803F1C4: - ldr r1, =gBattleCommunication - movs r0, 0x1 - strb r0, [r1, 0x5] -_0803F1CA: - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DBD58 - ldr r0, [r0, 0x4] - str r0, [r1] - ldr r1, =gCurrentActionFuncId - movs r0, 0xA - strb r0, [r1] - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end sub_803F120 - - thumb_func_start bs8_exit_by_flight -bs8_exit_by_flight: @ 803F1F0 - push {r4,lr} - ldr r2, =gBankAttacker - ldr r1, =gBanksByTurnOrder - ldr r4, =gCurrentTurnActionNumber - ldrb r0, [r4] - adds r0, r1 - ldrb r0, [r0] - strb r0, [r2] - movs r0, 0x11 - bl PlaySE - ldr r0, =gNoOfAllBanks - ldrb r0, [r0] - strb r0, [r4] - ldr r1, =gBattleOutcome - movs r0, 0x4 - strb r0, [r1] - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end bs8_exit_by_flight - - thumb_func_start bs9_8016C9C -bs9_8016C9C: @ 803F22C - ldr r3, =gBankAttacker - ldr r1, =gBanksByTurnOrder - ldr r0, =gCurrentTurnActionNumber - ldrb r0, [r0] - adds r0, r1 - ldrb r2, [r0] - strb r2, [r3] - ldr r0, =gBattle_BG0_X - movs r1, 0 - strh r1, [r0] - ldr r0, =gBattle_BG0_Y - strh r1, [r0] - ldr r1, =gBattleTextBuff1 - movs r0, 0xFD - strb r0, [r1] - movs r0, 0x7 - strb r0, [r1, 0x1] - strb r2, [r1, 0x2] - ldr r2, =gBattlePartyID - ldrb r0, [r3] - lsls r0, 1 - adds r0, r2 - ldrh r0, [r0] - strb r0, [r1, 0x3] - movs r0, 0xFF - strb r0, [r1, 0x4] - ldr r1, =gBattlescriptCurrInstr - ldr r0, =gUnknown_082DBD58 - ldr r0, [r0, 0xC] - str r0, [r1] - ldr r1, =gCurrentActionFuncId - movs r0, 0xA - strb r0, [r1] - ldr r1, =gActionsByTurnOrder - movs r0, 0xC - strb r0, [r1, 0x1] - bx lr - .pool - thumb_func_end bs9_8016C9C - - thumb_func_start bsB_exit_by_move -bsB_exit_by_move: @ 803F2A4 - push {lr} - bl sub_8041728 - lsls r0, 24 - lsrs r1, r0, 24 - cmp r1, 0 - bne _0803F2C0 - ldr r0, =gBattleStruct - ldr r0, [r0] - adds r0, 0x4D - strb r1, [r0] - ldr r1, =gCurrentActionFuncId - movs r0, 0xC - strb r0, [r1] -_0803F2C0: - pop {r0} - bx r0 - .pool - thumb_func_end bsB_exit_by_move - - thumb_func_start bsD_proceed -bsD_proceed: @ 803F2CC - ldr r1, =gCurrentTurnActionNumber - ldrb r0, [r1] - adds r0, 0x1 - strb r0, [r1] - ldr r3, =gCurrentActionFuncId - ldr r2, =gActionsByTurnOrder - ldrb r0, [r1] - adds r0, r2 - ldrb r0, [r0] - strb r0, [r3] - ldr r2, =gHitMarker - ldr r0, [r2] - ldr r1, =0xf1e892af - ands r0, r1 - str r0, [r2] - bx lr - .pool - thumb_func_end bsD_proceed - - thumb_func_start bsC_8016D70 -bsC_8016D70: @ 803F300 - push {r4-r6,lr} - ldr r1, =gBanksByTurnOrder - ldr r2, =gCurrentTurnActionNumber - ldrb r0, [r2] - adds r0, r1 - ldrb r0, [r0] - ldr r6, =gBattleStruct - ldr r1, [r6] - adds r0, r1 - adds r0, 0x5C - movs r1, 0x6 - strb r1, [r0] - ldrb r0, [r2] - adds r0, 0x1 - strb r0, [r2] - ldr r3, =gCurrentActionFuncId - ldr r1, =gActionsByTurnOrder - ldrb r0, [r2] - adds r0, r1 - ldrb r0, [r0] - strb r0, [r3] - bl SpecialStatusesClear - ldr r2, =gHitMarker - ldr r0, [r2] - ldr r1, =0xf1e892af - ands r0, r1 - str r0, [r2] - ldr r0, =gCurrentMove - movs r1, 0 - strh r1, [r0] - ldr r0, =gBattleMoveDamage - movs r4, 0 - str r4, [r0] - ldr r0, =gBattleMoveFlags - strb r1, [r0] - ldr r5, =gBattleScripting - strb r1, [r5, 0x18] - strb r1, [r5, 0x19] - ldr r2, =gUnknown_02024250 - ldr r3, =gBankAttacker - ldrb r0, [r3] - lsls r0, 1 - adds r0, r2 - strh r4, [r0] - ldr r2, =gUnknown_02024258 - ldrb r0, [r3] - lsls r0, 1 - adds r0, r2 - strh r4, [r0] - ldr r0, [r6] - strb r1, [r0, 0x13] - ldr r0, =gDynamicBasePower - strh r4, [r0] - strb r1, [r5, 0x14] - ldr r0, =gBattleCommunication - strb r1, [r0, 0x3] - strb r1, [r0, 0x4] - strb r1, [r5, 0x16] - ldr r0, =gBattleResources - ldr r0, [r0] - ldr r0, [r0, 0x8] - adds r0, 0x20 - strb r1, [r0] - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end bsC_8016D70 - - thumb_func_start GetBattleBank -GetBattleBank: @ 803F3CC - push {lr} - lsls r0, 24 - lsrs r1, r0, 24 - movs r0, 0 - cmp r1, 0xE - bhi _0803F47A - lsls r0, r1, 2 - ldr r1, =_0803F3E8 - adds r0, r1 - ldr r0, [r0] - mov pc, r0 - .pool - .align 2, 0 -_0803F3E8: - .4byte _0803F424 - .4byte _0803F430 - .4byte _0803F43C - .4byte _0803F458 - .4byte _0803F464 - .4byte _0803F458 - .4byte _0803F464 - .4byte _0803F448 - .4byte _0803F464 - .4byte _0803F464 - .4byte _0803F44C - .4byte _0803F464 - .4byte _0803F468 - .4byte _0803F46C - .4byte _0803F470 -_0803F424: - ldr r0, =gBankTarget - ldrb r0, [r0] - b _0803F47A - .pool -_0803F430: - ldr r0, =gBankAttacker - ldrb r0, [r0] - b _0803F47A - .pool -_0803F43C: - ldr r0, =gEffectBank - ldrb r0, [r0] - b _0803F47A - .pool -_0803F448: - movs r0, 0 - b _0803F47A -_0803F44C: - ldr r0, =gBattleScripting - ldrb r0, [r0, 0x17] - b _0803F47A - .pool -_0803F458: - ldr r0, =gBank1 - ldrb r0, [r0] - b _0803F47A - .pool -_0803F464: - movs r0, 0 - b _0803F472 -_0803F468: - movs r0, 0x1 - b _0803F472 -_0803F46C: - movs r0, 0x2 - b _0803F472 -_0803F470: - movs r0, 0x3 -_0803F472: - bl GetBankByIdentity - lsls r0, 24 - lsrs r0, 24 -_0803F47A: - pop {r1} - bx r1 - thumb_func_end GetBattleBank - - thumb_func_start PressurePPLose -PressurePPLose: @ 803F480 - push {r4-r7,lr} - sub sp, 0x4 - lsls r0, 24 - lsrs r0, 24 - lsls r1, 24 - lsrs r5, r1, 24 - lsls r2, 16 - lsrs r2, 16 - ldr r1, =gBattleMons - movs r4, 0x58 - muls r0, r4 - adds r0, r1 - adds r0, 0x20 - ldrb r0, [r0] - mov r12, r1 - cmp r0, 0x2E - bne _0803F532 - movs r3, 0 - adds r0, r5, 0 - muls r0, r4 - adds r1, 0xC - adds r1, r0, r1 - b _0803F4BC - .pool -_0803F4B4: - adds r1, 0x2 - adds r3, 0x1 - cmp r3, 0x3 - bgt _0803F4C2 -_0803F4BC: - ldrh r0, [r1] - cmp r0, r2 - bne _0803F4B4 -_0803F4C2: - cmp r3, 0x4 - beq _0803F532 - movs r7, 0x58 - adds r2, r5, 0 - muls r2, r7 - adds r0, r3, r2 - mov r6, r12 - adds r6, 0x24 - adds r1, r0, r6 - ldrb r0, [r1] - cmp r0, 0 - beq _0803F4DE - subs r0, 0x1 - strb r0, [r1] -_0803F4DE: - mov r0, r12 - adds r0, 0x50 - adds r0, r2, r0 - ldr r0, [r0] - movs r1, 0x80 - lsls r1, 14 - ands r0, r1 - cmp r0, 0 - bne _0803F532 - ldr r1, =gDisableStructs - lsls r0, r5, 3 - subs r0, r5 - lsls r0, 2 - adds r0, r1 - ldrb r1, [r0, 0x18] - lsrs r1, 4 - ldr r2, =gBitTable - lsls r0, r3, 2 - adds r0, r2 - ldr r0, [r0] - ands r1, r0 - cmp r1, 0 - bne _0803F532 - ldr r4, =gActiveBank - strb r5, [r4] - adds r1, r3, 0 - adds r1, 0x9 - lsls r1, 24 - lsrs r1, 24 - ldrb r0, [r4] - muls r0, r7 - adds r0, r6 - adds r0, r3 - str r0, [sp] - movs r0, 0 - movs r2, 0 - movs r3, 0x1 - bl EmitSetMonData - ldrb r0, [r4] - bl MarkBufferBankForExecution -_0803F532: - add sp, 0x4 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end PressurePPLose - - thumb_func_start PressurePPLoseOnUsingImprision -PressurePPLoseOnUsingImprision: @ 803F548 - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - sub sp, 0x4 - lsls r0, 24 - lsrs r5, r0, 24 - movs r0, 0x4 - mov r8, r0 - adds r0, r5, 0 - bl GetBankSide - lsls r0, 24 - lsrs r0, 24 - mov r9, r0 - movs r4, 0 - ldr r0, =gNoOfAllBanks - ldrb r0, [r0] - cmp r4, r0 - bge _0803F5F0 - ldr r1, =gBattleMons - movs r0, 0x58 - adds r7, r5, 0 - muls r7, r0 - adds r1, 0xC - mov r10, r1 -_0803F57E: - lsls r0, r4, 24 - lsrs r0, 24 - bl GetBankSide - lsls r0, 24 - lsrs r0, 24 - adds r6, r4, 0x1 - cmp r9, r0 - beq _0803F5E6 - ldr r0, =gBattleMons - movs r3, 0x58 - adds r1, r4, 0 - muls r1, r3 - adds r1, r0 - adds r1, 0x20 - ldrb r1, [r1] - adds r4, r0, 0 - cmp r1, 0x2E - bne _0803F5E6 - movs r2, 0 - adds r0, r5, 0 - muls r0, r3 - adds r1, r4, 0 - adds r1, 0xC - adds r0, r1 - ldrh r0, [r0] - movs r1, 0x8F - lsls r1, 1 - cmp r0, r1 - beq _0803F5CE - adds r3, r1, 0 - mov r0, r10 - adds r1, r7, r0 -_0803F5C0: - adds r1, 0x2 - adds r2, 0x1 - cmp r2, 0x3 - bgt _0803F5CE - ldrh r0, [r1] - cmp r0, r3 - bne _0803F5C0 -_0803F5CE: - cmp r2, 0x4 - beq _0803F5E6 - mov r8, r2 - adds r1, r2, r7 - adds r0, r4, 0 - adds r0, 0x24 - adds r1, r0 - ldrb r0, [r1] - cmp r0, 0 - beq _0803F5E6 - subs r0, 0x1 - strb r0, [r1] -_0803F5E6: - adds r4, r6, 0 - ldr r0, =gNoOfAllBanks - ldrb r0, [r0] - cmp r4, r0 - blt _0803F57E -_0803F5F0: - mov r1, r8 - cmp r1, 0x4 - beq _0803F658 - ldr r6, =gBattleMons - movs r3, 0x58 - adds r0, r5, 0 - muls r0, r3 - adds r1, r6, 0 - adds r1, 0x50 - adds r0, r1 - ldr r0, [r0] - movs r1, 0x80 - lsls r1, 14 - ands r0, r1 - cmp r0, 0 - bne _0803F658 - ldr r1, =gDisableStructs - lsls r0, r5, 3 - subs r0, r5 - lsls r0, 2 - adds r0, r1 - ldrb r1, [r0, 0x18] - lsrs r1, 4 - ldr r2, =gBitTable - mov r4, r8 - lsls r0, r4, 2 - adds r0, r2 - ldr r0, [r0] - ands r1, r0 - cmp r1, 0 - bne _0803F658 - ldr r4, =gActiveBank - strb r5, [r4] - mov r1, r8 - adds r1, 0x9 - lsls r1, 24 - lsrs r1, 24 - ldrb r0, [r4] - muls r0, r3 - adds r2, r6, 0 - adds r2, 0x24 - adds r0, r2 - add r0, r8 - str r0, [sp] - movs r0, 0 - movs r2, 0 - movs r3, 0x1 - bl EmitSetMonData - ldrb r0, [r4] - bl MarkBufferBankForExecution -_0803F658: - add sp, 0x4 - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end PressurePPLoseOnUsingImprision - - thumb_func_start PressurePPLoseOnUsingPerishSong -PressurePPLoseOnUsingPerishSong: @ 803F67C - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - sub sp, 0x4 - lsls r0, 24 - lsrs r3, r0, 24 - movs r6, 0x4 - movs r1, 0 - ldr r0, =gNoOfAllBanks - mov r8, r0 - ldrb r0, [r0] - cmp r1, r0 - bge _0803F6FE - ldr r7, =gBattleMons - movs r2, 0x58 - mov r12, r2 - mov r5, r12 - muls r5, r3 - adds r0, r7, 0 - adds r0, 0xC - adds r2, r5, r0 - mov r10, r2 - mov r9, r5 -_0803F6AE: - mov r0, r12 - muls r0, r1 - adds r0, r7 - adds r0, 0x20 - ldrb r0, [r0] - adds r4, r1, 0x1 - cmp r0, 0x2E - bne _0803F6F4 - cmp r1, r3 - beq _0803F6F4 - movs r2, 0 - mov r1, r10 - ldrh r0, [r1] - cmp r0, 0xC3 - beq _0803F6DE - ldr r1, =gBattleMons + 0xC - add r1, r9 -_0803F6D0: - adds r1, 0x2 - adds r2, 0x1 - cmp r2, 0x3 - bgt _0803F6DE - ldrh r0, [r1] - cmp r0, 0xC3 - bne _0803F6D0 -_0803F6DE: - cmp r2, 0x4 - beq _0803F6F4 - adds r6, r2, 0 - adds r0, r6, r5 - ldr r2, =gBattleMons + 0x24 - adds r1, r0, r2 - ldrb r0, [r1] - cmp r0, 0 - beq _0803F6F4 - subs r0, 0x1 - strb r0, [r1] -_0803F6F4: - adds r1, r4, 0 - mov r0, r8 - ldrb r0, [r0] - cmp r1, r0 - blt _0803F6AE -_0803F6FE: - cmp r6, 0x4 - beq _0803F762 - ldr r7, =gBattleMons - movs r5, 0x58 - adds r0, r3, 0 - muls r0, r5 - adds r1, r7, 0 - adds r1, 0x50 - adds r0, r1 - ldr r0, [r0] - movs r1, 0x80 - lsls r1, 14 - ands r0, r1 - cmp r0, 0 - bne _0803F762 - ldr r1, =gDisableStructs - lsls r0, r3, 3 - subs r0, r3 - lsls r0, 2 - adds r0, r1 - ldrb r1, [r0, 0x18] - lsrs r1, 4 - ldr r2, =gBitTable - lsls r0, r6, 2 - adds r0, r2 - ldr r0, [r0] - ands r1, r0 - cmp r1, 0 - bne _0803F762 - ldr r4, =gActiveBank - strb r3, [r4] - adds r1, r6, 0 - adds r1, 0x9 - lsls r1, 24 - lsrs r1, 24 - ldrb r0, [r4] - muls r0, r5 - adds r2, r7, 0 - adds r2, 0x24 - adds r0, r2 - adds r0, r6 - str r0, [sp] - movs r0, 0 - movs r2, 0 - movs r3, 0x1 - bl EmitSetMonData - ldrb r0, [r4] - bl MarkBufferBankForExecution -_0803F762: - add sp, 0x4 - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end PressurePPLoseOnUsingPerishSong - - thumb_func_start sub_803F790 -sub_803F790: @ 803F790 - push {r4,r5,lr} - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - movs r1, 0x2 - ands r0, r1 - cmp r0, 0 - beq _0803F7D0 - movs r2, 0 - ldr r4, =gNoOfAllBanks - ldrb r0, [r4] - cmp r2, r0 - bge _0803F7EE - ldr r3, =gBattleExecBuffer - ldr r5, =gBitTable -_0803F7AC: - ldm r5!, {r1} - lsls r1, 28 - ldr r0, [r3] - orrs r0, r1 - str r0, [r3] - adds r2, 0x1 - ldrb r0, [r4] - cmp r2, r0 - blt _0803F7AC - b _0803F7EE - .pool -_0803F7D0: - movs r2, 0 - ldr r4, =gNoOfAllBanks - ldrb r0, [r4] - cmp r2, r0 - bge _0803F7EE - ldr r3, =gBattleExecBuffer - ldr r5, =gBitTable -_0803F7DE: - ldr r0, [r3] - ldm r5!, {r1} - orrs r0, r1 - str r0, [r3] - adds r2, 0x1 - ldrb r0, [r4] - cmp r2, r0 - blt _0803F7DE -_0803F7EE: - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end sub_803F790 - - thumb_func_start MarkBufferBankForExecution -MarkBufferBankForExecution: @ 803F800 - push {lr} - lsls r0, 24 - lsrs r3, r0, 24 - ldr r0, =gBattleTypeFlags - ldr r0, [r0] - movs r1, 0x2 - ands r0, r1 - cmp r0, 0 - beq _0803F834 - ldr r2, =gBattleExecBuffer - ldr r1, =gBitTable - lsls r0, r3, 2 - adds r0, r1 - ldr r1, [r0] - lsls r1, 28 - ldr r0, [r2] - orrs r0, r1 - str r0, [r2] - b _0803F844 - .pool -_0803F834: - ldr r2, =gBattleExecBuffer - ldr r1, =gBitTable - lsls r0, r3, 2 - adds r0, r1 - ldr r1, [r2] - ldr r0, [r0] - orrs r1, r0 - str r1, [r2] -_0803F844: - pop {r0} - bx r0 - .pool - thumb_func_end MarkBufferBankForExecution - - thumb_func_start sub_803F850 -sub_803F850: @ 803F850 - push {r4-r7,lr} - lsls r0, 24 - lsrs r7, r0, 24 - movs r4, 0 - ldr r5, =gBattleExecBuffer - ldr r1, =gBitTable - lsls r0, r7, 2 - adds r6, r0, r1 - b _0803F87A - .pool -_0803F86C: - lsls r0, r4, 2 - ldr r1, [r6] - lsls r1, r0 - ldr r0, [r5] - orrs r0, r1 - str r0, [r5] - adds r4, 0x1 -_0803F87A: - bl sub_8009FCC - lsls r0, 24 - lsrs r0, 24 - cmp r4, r0 - blt _0803F86C - ldr r2, =gBattleExecBuffer - movs r1, 0x80 - lsls r1, 21 - lsls r1, r7 - ldr r0, [r2] - bics r0, r1 - str r0, [r2] - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end sub_803F850 - - thumb_func_start CancelMultiTurnMoves -CancelMultiTurnMoves: @ 803F8A0 - lsls r0, 24 - lsrs r0, 24 - ldr r1, =gBattleMons - movs r2, 0x58 - adds r3, r0, 0 - muls r3, r2 - adds r1, 0x50 - adds r3, r1 - ldr r1, [r3] - ldr r2, =0xffffefff - ands r1, r2 - ldr r2, =0xfffff3ff - ands r1, r2 - movs r2, 0x71 - negs r2, r2 - ands r1, r2 - ldr r2, =0xfffffcff - ands r1, r2 - str r1, [r3] - ldr r1, =gStatuses3 - lsls r2, r0, 2 - adds r2, r1 - ldr r1, [r2] - ldr r3, =0xfffbff3f - ands r1, r3 - str r1, [r2] - ldr r2, =gDisableStructs - lsls r1, r0, 3 - subs r1, r0 - lsls r1, 2 - adds r1, r2 - ldrb r2, [r1, 0x11] - movs r0, 0x10 - negs r0, r0 - ands r0, r2 - strb r0, [r1, 0x11] - movs r0, 0 - strb r0, [r1, 0x10] - bx lr - .pool - thumb_func_end CancelMultiTurnMoves - - thumb_func_start HasMoveFailed -HasMoveFailed: @ 803F90C - push {lr} - lsls r0, 24 - ldr r1, =gProtectStructs - lsrs r0, 20 - adds r1, r0, r1 - ldrb r0, [r1] - lsrs r0, 7 - cmp r0, 0 - bne _0803F952 - ldrb r2, [r1, 0x1] - lsls r0, r2, 30 - cmp r0, 0 - blt _0803F952 - lsls r0, r2, 26 - cmp r0, 0 - blt _0803F952 - lsls r0, r2, 25 - cmp r0, 0 - blt _0803F952 - lsrs r0, r2, 7 - cmp r0, 0 - bne _0803F952 - ldrb r1, [r1, 0x2] - lsls r0, r1, 31 - cmp r0, 0 - bne _0803F952 - lsls r0, r1, 30 - cmp r0, 0 - blt _0803F952 - lsls r0, r1, 29 - cmp r0, 0 - blt _0803F952 - lsls r0, r2, 31 - cmp r0, 0 - beq _0803F95C -_0803F952: - movs r0, 0x1 - b _0803F95E - .pool -_0803F95C: - movs r0, 0 -_0803F95E: - pop {r1} - bx r1 - thumb_func_end HasMoveFailed - - thumb_func_start PrepareStringBattle -PrepareStringBattle: @ 803F964 - push {r4,lr} - adds r2, r0, 0 - lsls r2, 16 - lsrs r2, 16 - ldr r4, =gActiveBank - strb r1, [r4] - movs r0, 0 - adds r1, r2, 0 - bl dp01_build_cmdbuf_x10_TODO - ldrb r0, [r4] - bl MarkBufferBankForExecution - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end PrepareStringBattle - - thumb_func_start ResetSentPokesToOpponentValue -ResetSentPokesToOpponentValue: @ 803F988 - push {r4-r6,lr} - movs r3, 0 - ldr r0, =gSentPokesToOpponent - strb r3, [r0] - strb r3, [r0, 0x1] - movs r1, 0 - ldr r0, =gNoOfAllBanks - ldrb r2, [r0] - adds r6, r0, 0 - cmp r1, r2 - bge _0803F9B6 - ldr r5, =gBitTable - adds r4, r2, 0 - ldr r2, =gBattlePartyID -_0803F9A4: - ldrh r0, [r2] - lsls r0, 2 - adds r0, r5 - ldr r0, [r0] - orrs r3, r0 - adds r2, 0x4 - adds r1, 0x2 - cmp r1, r4 - blt _0803F9A4 -_0803F9B6: - movs r1, 0x1 - adds r2, r6, 0 - ldrb r0, [r2] - cmp r1, r0 - bge _0803F9D6 - ldr r5, =gSentPokesToOpponent - movs r4, 0x2 -_0803F9C4: - adds r0, r1, 0 - ands r0, r4 - asrs r0, 1 - adds r0, r5 - strb r3, [r0] - adds r1, 0x2 - ldrb r0, [r2] - cmp r1, r0 - blt _0803F9C4 -_0803F9D6: - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end ResetSentPokesToOpponentValue - - thumb_func_start sub_803F9EC -sub_803F9EC: @ 803F9EC - push {r4-r7,lr} - mov r7, r8 - push {r7} - lsls r0, 24 - lsrs r5, r0, 24 - movs r4, 0 - adds r0, r5, 0 - bl GetBankSide - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x1 - bne _0803FA50 - movs r0, 0x2 - ands r0, r5 - lsls r0, 24 - lsrs r0, 25 - mov r12, r0 - ldr r1, =gSentPokesToOpponent - adds r0, r1 - strb r4, [r0] - adds r5, r4, 0 - ldr r0, =gNoOfAllBanks - ldrb r2, [r0] - mov r8, r1 - cmp r4, r2 - bge _0803FA4A - ldr r0, =gAbsentBankFlags - ldrb r7, [r0] - ldr r1, =gBitTable - adds r6, r2, 0 - ldr r3, =gBattlePartyID - adds r2, r1, 0 -_0803FA2E: - ldr r0, [r2] - ands r0, r7 - cmp r0, 0 - bne _0803FA40 - ldrh r0, [r3] - lsls r0, 2 - adds r0, r1 - ldr r0, [r0] - orrs r4, r0 -_0803FA40: - adds r3, 0x4 - adds r2, 0x8 - adds r5, 0x2 - cmp r5, r6 - blt _0803FA2E -_0803FA4A: - mov r0, r12 - add r0, r8 - strb r4, [r0] -_0803FA50: - pop {r3} - mov r8, r3 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end sub_803F9EC - - thumb_func_start sub_803FA70 -sub_803FA70: @ 803FA70 - push {r4-r7,lr} - lsls r0, 24 - lsrs r4, r0, 24 - adds r0, r4, 0 - bl GetBankSide - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x1 - bne _0803FA8C - adds r0, r4, 0 - bl sub_803F9EC - b _0803FAC2 -_0803FA8C: - movs r3, 0x1 - ldr r5, =gNoOfAllBanks - ldrb r0, [r5] - cmp r3, r0 - bge _0803FAC2 - ldr r0, =gSentPokesToOpponent - mov r12, r0 - movs r7, 0x2 - ldr r6, =gBitTable - ldr r1, =gBattlePartyID - lsls r0, r4, 1 - adds r4, r0, r1 -_0803FAA4: - adds r2, r3, 0 - ands r2, r7 - asrs r2, 1 - add r2, r12 - ldrh r0, [r4] - lsls r0, 2 - adds r0, r6 - ldr r0, [r0] - ldrb r1, [r2] - orrs r0, r1 - strb r0, [r2] - adds r3, 0x1 - ldrb r0, [r5] - cmp r3, r0 - blt _0803FAA4 -_0803FAC2: - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end sub_803FA70 - - .align 2, 0 @ Don't pad with nop. - \ No newline at end of file diff --git a/asm/rom3.s b/asm/rom3.s index 6a3e7e299..bde493568 100644 --- a/asm/rom3.s +++ b/asm/rom3.s @@ -2570,8 +2570,8 @@ _08033BB6: .pool thumb_func_end EmitMoveAnimation - thumb_func_start dp01_build_cmdbuf_x10_TODO -dp01_build_cmdbuf_x10_TODO: @ 8033BE4 + thumb_func_start EmitPrintString +EmitPrintString: @ 8033BE4 push {r4-r7,lr} mov r7, r10 mov r6, r9 @@ -2685,7 +2685,7 @@ _08033C88: pop {r0} bx r0 .pool - thumb_func_end dp01_build_cmdbuf_x10_TODO + thumb_func_end EmitPrintString thumb_func_start EmitPrintStringPlayerOnly EmitPrintStringPlayerOnly: @ 8033CFC diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index faa945bdd..b2dfec5d8 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -78,7 +78,7 @@ BattleScript_WildMonFled:: @ 82DAAF7 gUnknown_082DAAFE:: @ 82DAAFE .incbin "baserom.gba", 0x2daafe, 0x4 -gUnknown_082DAB02:: @ 82DAB02 +BattleScript_PrintFailedToRunString:: @ 82DAB02 .incbin "baserom.gba", 0x2dab02, 0x9 gUnknown_082DAB0B:: @ 82DAB0B diff --git a/data/battle_scripts_2.s b/data/battle_scripts_2.s index 985c09b23..4a4dc4665 100644 --- a/data/battle_scripts_2.s +++ b/data/battle_scripts_2.s @@ -33,7 +33,7 @@ gBattlescriptsForRunningByItem:: @ 82DBD54 .4byte BattleScript_RunByUsingItem .align 2 -gUnknown_082DBD58:: @ 82DBD58 +gBattlescriptsForSafariActions:: @ 82DBD58 .4byte gUnknown_082DBEBD .4byte gUnknown_082DBEC4 .4byte gUnknown_082DBECD diff --git a/include/battle.h b/include/battle.h index 639558e60..d41702396 100644 --- a/include/battle.h +++ b/include/battle.h @@ -1,6 +1,11 @@ #ifndef GUARD_BATTLE_H #define GUARD_BATTLE_H +// should they be included here or included individually by every file? +#include "battle_util.h" +#include "battle_script_commands.h" +#include "battle_2.h" + /* Banks are a name given to what could be called a 'battlerId' or 'monControllerId'. Each bank has a value consisting of two bits. @@ -119,8 +124,8 @@ #define STATUS3_MINIMIZED 0x100 #define STATUS3_ROOTED 0x400 #define STATUS3_CHARGED_UP 0x200 -#define STATUS3_YAWN 0x1800 //two bits -#define STATUS3_IMPRISONED_OTHERS 0x2000 +#define STATUS3_YAWN 0x1800 // two bits +#define STATUS3_IMPRISONED_OTHERS 0x2000 #define STATUS3_GRUDGE 0x4000 #define STATUS3_CANT_SCORE_A_CRIT 0x8000 #define STATUS3_MUDSPORT 0x10000 @@ -131,6 +136,7 @@ #define STATUS3_SEMI_INVULNERABLE ((STATUS3_UNDERGROUND | STATUS3_ON_AIR | STATUS3_UNDERWATER)) +#define HITMARKER_x10 0x00000010 #define HITMARKER_x20 0x00000020 #define HITMARKER_DESTINYBOND 0x00000040 #define HITMARKER_NO_ANIMATIONS 0x00000080 @@ -141,7 +147,7 @@ #define HITMARKER_PURSUIT_TRAP 0x00001000 #define HITMARKER_IGNORE_SAFEGUARD 0x00002000 #define HITMARKER_SYNCHRONISE_EFFECT 0x00004000 -#define HITMARKER_x8000 0x00008000 +#define HITMARKER_RUN 0x00008000 #define HITMARKER_IGNORE_ON_AIR 0x00010000 #define HITMARKER_IGNORE_UNDERGROUND 0x00020000 #define HITMARKER_IGNORE_UNDERWATER 0x00040000 @@ -152,6 +158,7 @@ #define HITMARKER_x800000 0x00800000 #define HITMARKER_GRUDGE 0x01000000 #define HITMARKER_OBEYS 0x02000000 +#define HITMARKER_x4000000 0x04000000 #define HITMARKER_x8000000 0x08000000 #define HITMARKER_FAINTED(bank) ((gBitTable[bank] << 0x1C)) #define HITMARKER_UNK(bank) ((0x10000000 << bank)) @@ -181,32 +188,6 @@ #define ACTION_NOTHING_FAINTED 13 // when choosing an action #define ACTION_INIT_VALUE 0xFF -#define ABILITYEFFECT_ON_SWITCHIN 0x0 -#define ABILITYEFFECT_ENDTURN 0x1 -#define ABILITYEFFECT_MOVES_BLOCK 0x2 -#define ABILITYEFFECT_ABSORBING 0x3 -#define ABILITYEFFECT_CONTACT 0x4 -#define ABILITYEFFECT_IMMUNITY 0x5 -#define ABILITYEFFECT_FORECAST 0x6 -#define ABILITYEFFECT_SYNCHRONIZE 0x7 -#define ABILITYEFFECT_ATK_SYNCHRONIZE 0x8 -#define ABILITYEFFECT_INTIMIDATE1 0x9 -#define ABILITYEFFECT_INTIMIDATE2 0xA -#define ABILITYEFFECT_TRACE 0xB -#define ABILITYEFFECT_CHECK_OTHER_SIDE 0xC -#define ABILITYEFFECT_CHECK_BANK_SIDE 0xD -#define ABILITYEFFECT_FIELD_SPORT 0xE -#define ABILITYEFFECT_CHECK_FIELD_EXCEPT_BANK 0xF -#define ABILITYEFFECT_COUNT_OTHER_SIDE 0x10 -#define ABILITYEFFECT_COUNT_BANK_SIDE 0x11 -#define ABILITYEFFECT_COUNT_ON_FIELD 0x12 -#define ABILITYEFFECT_CHECK_ON_FIELD 0x13 -#define ABILITYEFFECT_SWITCH_IN_WEATHER 0xFF - -#define ITEMEFFECT_ON_SWITCH_IN 0x0 - -#define WEATHER_HAS_EFFECT ((!AbilityBattleEffects(ABILITYEFFECT_CHECK_ON_FIELD, 0, ABILITY_CLOUD_NINE, 0, 0) && !AbilityBattleEffects(ABILITYEFFECT_CHECK_ON_FIELD, 0, ABILITY_AIR_LOCK, 0, 0))) - #define MOVESTATUS_MISSED (1 << 0) #define MOVESTATUS_SUPEREFFECTIVE (1 << 1) #define MOVESTATUS_NOTVERYEFFECTIVE (1 << 2) @@ -271,25 +252,6 @@ #define TYPE_MUL_NORMAL 10 #define TYPE_MUL_SUPER_EFFECTIVE 20 -#define BS_GET_TARGET 0 -#define BS_GET_ATTACKER 1 -#define BS_GET_EFFECT_BANK 2 -#define BS_ATTACKER_WITH_PARTNER 4 // for atk98_status_icon_update -#define BS_GET_ATTACKER_SIDE 8 // for atk1E_jumpifability -#define BS_GET_NOT_ATTACKER_SIDE 9 // for atk1E_jumpifability -#define BS_GET_SCRIPTING_BANK 10 -#define BS_GET_OPPONENT1 12 -#define BS_GET_PLAYER2 13 -#define BS_GET_OPPONENT2 14 - -// for battle script commands -#define CMP_EQUAL 0x0 -#define CMP_NOT_EQUAL 0x1 -#define CMP_GREATER_THAN 0x2 -#define CMP_LESS_THAN 0x3 -#define CMP_COMMON_BITS 0x4 -#define CMP_NO_COMMON_BITS 0x5 - struct TrainerMonNoItemDefaultMoves { u16 iv; @@ -375,8 +337,8 @@ struct DisableStruct /*0x0F*/ u8 perishSong1 : 4; /*0x0F*/ u8 perishSong2 : 4; /*0x10*/ u8 furyCutterCounter; - /*0x11*/ u8 rolloutTimer1 : 4; - /*0x11*/ u8 rolloutTimer2 : 4; + /*0x11*/ u8 rolloutCounter1 : 4; + /*0x11*/ u8 rolloutCounter2 : 4; /*0x12*/ u8 chargeTimer1 : 4; /*0x12*/ u8 chargeTimer2 : 4; /*0x13*/ u8 tauntTimer1:4; @@ -408,7 +370,7 @@ struct ProtectStruct u32 prlzImmobility:1; /* field_1 */ u32 confusionSelfDmg:1; - u32 notEffective:1; + u32 targetNotAffected:1; u32 chargingTurn:1; u32 fleeFlag:2; // for RunAway and Smoke Ball u32 usedImprisionedMove:1; @@ -574,6 +536,7 @@ struct BattleResults u8 playerMon1Name[11]; // 0x8 u8 battleTurnCounter; // 0x13 u8 playerMon2Name[11]; // 0x14 + u8 field_1F; // 0x1F u16 lastOpponentSpecies; // 0x20 u16 lastUsedMovePlayer; // 0x22 u16 lastUsedMoveOpponent; // 0x24 @@ -814,39 +777,10 @@ extern struct BattleStruct* gBattleStruct; #define B_ANIM_x1C 0x1C #define B_ANIM_x1D 0x1D -#define ATK48_STAT_NEGATIVE 0x1 -#define ATK48_STAT_BY_TWO 0x2 -#define ATK48_BIT_x4 0x4 -#define ATK48_LOWER_FAIL_CHECK 0x8 - -#define ATK4F_DONT_CHECK_STATUSES 0x80 - -#define VARIOUS_CANCEL_MULTI_TURN_MOVES 0 -#define VARIOUS_SET_MAGIC_COAT_TARGET 1 -#define VARIOUS_CAN_RUN_FROM_BATTLE 2 -#define VARIOUS_GET_MOVE_TARGET 3 -#define VARIOUS_RESET_INTIMIDATE_TRACE_BITS 5 -#define VARIOUS_UPDATE_CHOICE_MOVE_ON_LVL_UP 6 -#define VARIOUS_WAIT_CRY 18 -#define VARIOUS_RETURN_OPPONENT_MON1 19 -#define VARIOUS_RETURN_OPPONENT_MON2 20 -#define VARIOUS_SET_TELEPORT_OUTCOME 25 -#define VARIOUS_PLAY_TRAINER_DEFEATED_MUSIC 26 - -#define ATK80_DMG_CHANGE_SIGN 0 -#define ATK80_DMG_HALF_BY_TWO_NOT_MORE_THAN_HALF_MAX_HP 1 -#define ATK80_DMG_DOUBLED 2 - #define GET_STAT_BUFF_ID(n)((n & 0xF)) // first four bits 0x1, 0x2, 0x4, 0x8 #define GET_STAT_BUFF_VALUE(n)(((n >> 4) & 7)) // 0x10, 0x20, 0x40 #define STAT_BUFF_NEGATIVE 0x80 // 0x80, the sign bit -#define STAT_CHANGE_BS_PTR 0x1 -#define STAT_CHANGE_NOT_PROTECT_AFFECTED 0x20 - -#define STAT_CHANGE_WORKED 0 -#define STAT_CHANGE_DIDNT_WORK 1 - #define SET_STAT_BUFF_ID(n)((n & 0xF)) #define SET_STAT_BUFF_VALUE(n)(((s8)(((s8)(n) << 4)) & 0xF0)) @@ -892,78 +826,6 @@ void ApplyPlayerChosenFrameToBattleMenu(void); bool8 LoadChosenBattleElement(u8 caseId); void task00_0800F6FC(u8 taskId); -// battle_2 -void CB2_InitBattle(void); -void CB2_QuitRecordedBattle(void); -void CancelMultiTurnMoves(u8 bank); -void PressurePPLose(u8 bankAtk, u8 bankDef, u16 move); -void PrepareStringBattle(u16 stringId, u8 bank); -u8 GetBattleBank(u8 caseId); -void FaintClearSetData(void); -bool8 HasMoveFailed(u8 bank); -void SwitchInClearSetData(void); -void sub_803BDA0(u8 bank); -void sub_803FA70(u8 bank); -void BattleMainCB2(void); -void VBlankCB_Battle(void); -void ResetSentPokesToOpponentValue(void); -bool8 TryRunFromBattle(u8 bank); -bool8 IsRunningFromBattleImpossible(void); -void PressurePPLoseOnUsingPerishSong(u8 bankAtk); -void PressurePPLoseOnUsingImprision(u8 bankAtk); -u8 GetWhoStrikesFirst(u8 bank1, u8 bank2, bool8 ignoreChosenMoves); -void SwapTurnOrder(u8, u8); -void BattleTurnPassed(void); -void RunBattleScriptCommands_PopCallbacksStack(void); -void RunBattleScriptCommands(void); - -// battle_3 -#define MOVE_LIMITATION_ZEROMOVE (1 << 0) -#define MOVE_LIMITATION_PP (1 << 1) -#define MOVE_LIMITATION_DISABLED (1 << 2) -#define MOVE_LIMITATION_TORMENTED (1 << 3) -#define MOVE_LIMITATION_TAUNT (1 << 4) -#define MOVE_LIMITATION_IMPRISION (1 << 5) - -void BattleScriptPush(const u8* bsPtr); -void BattleScriptPushCursor(void); -void BattleScriptPop(void); -u8 TrySetCantSelectMoveBattleScript(void); -u8 CheckMoveLimitations(u8 bank, u8 unusableMoves, u8 check); -bool8 AreAllMovesUnusable(void); -u8 GetImprisonedMovesCount(u8 bank, u16 move); -u8 UpdateTurnCounters(void); -u8 TurnBasedEffects(void); -bool8 sub_8041364(void); -bool8 sub_8041728(void); -void TryClearRageStatuses(void); -u8 AtkCanceller_UnableToUseMove(void); -bool8 sub_80423F4(u8 bank, u8 r1, u8 r2); -u8 CastformDataTypeChange(u8 bank); -u8 AbilityBattleEffects(u8 caseID, u8 bank, u8 ability, u8 special, u16 moveArg); -void BattleScriptExecute(const u8* BS_ptr); -void BattleScriptPushCursorAndCallback(const u8* BS_ptr); -u8 ItemBattleEffects(u8 caseID, u8 bank, bool8 moveTurn); -void ClearFuryCutterDestinyBondGrudge(u8 bank); -void sub_80458B4(void); -u8 GetMoveTarget(u16 move, u8 useMoveTarget); -u8 IsPokeDisobedient(void); - -// battle_script_commands -void AI_CalcDmg(u8 bankAtk, u8 bankDef); -u8 TypeCalc(u16 move, u8 bankAtk, u8 bankDef); -u8 AI_TypeCalc(u16 move, u16 species, u8 ability); -u8 BankGetTurnOrder(u8 bank); -void SetMoveEffect(bool8 primary, u8 certain); -void BattleDestroyCursorAt(u8 cursorPosition); -void BattleCreateCursorAt(u8 cursorPosition); -void BufferMoveToLearnIntoBattleTextBuff2(void); -void sub_8056A3C(u8 xStart, u8 yStart, u8 xEnd, u8 yEnd, u8 flags); -bool8 UproarWakeUpCheck(u8 bank); - -extern void (* const gBattleScriptingCommandsTable[])(void); -extern const u8 gUnknown_0831C494[]; - // battle_5 void AllocateBattleResrouces(void); void FreeBattleResources(void); diff --git a/include/battle_2.h b/include/battle_2.h new file mode 100644 index 000000000..e4385db04 --- /dev/null +++ b/include/battle_2.h @@ -0,0 +1,19 @@ +#ifndef GUARD_BATTLE_2_H +#define GUARD_BATTLE_2_H + +void CB2_InitBattle(void); +void CB2_QuitRecordedBattle(void); +void FaintClearSetData(void); +void SwitchInClearSetData(void); +void sub_803BDA0(u8 bank); +void BattleMainCB2(void); +void VBlankCB_Battle(void); +bool8 TryRunFromBattle(u8 bank); +u8 IsRunningFromBattleImpossible(void); +u8 GetWhoStrikesFirst(u8 bank1, u8 bank2, bool8 ignoreChosenMoves); +void SwapTurnOrder(u8 id1, u8 id2); +void BattleTurnPassed(void); +void RunBattleScriptCommands_PopCallbacksStack(void); +void RunBattleScriptCommands(void); + +#endif // GUARD_BATTLE_2_H diff --git a/include/battle_controllers.h b/include/battle_controllers.h index 9a7f947fa..2281fdaff 100644 --- a/include/battle_controllers.h +++ b/include/battle_controllers.h @@ -1,6 +1,28 @@ #ifndef GUARD_BATTLE_CONTROLLERS_H #define GUARD_BATTLE_CONTROLLERS_H +#define REQUEST_ALL_BATTLE 0x0 +#define REQUEST_SPECIES_BATTLE 0x1 +#define REQUEST_HELDITEM_BATTLE 0x2 +#define REQUEST_MOVES_PP_BATTLE 0x3 +#define REQUEST_PPMOVE1_BATTLE 0x9 +#define REQUEST_PPMOVE2_BATTLE 0xA +#define REQUEST_PPMOVE3_BATTLE 0xB +#define REQUEST_PPMOVE4_BATTLE 0xC +#define REQUEST_STATUS_BATTLE 0x28 +#define REQUEST_HP_BATTLE 0x2A + +#define RESET_ACTION_MOVE_SELECTION 0 +#define RESET_ACTION_SELECTION 1 +#define RESET_MOVE_SELECTION 2 + +#define BALL_NO_SHAKES 0 +#define BALL_1_SHAKE 1 +#define BALL_2_SHAKES 2 +#define BALL_3_SHAKES_FAIL 3 +#define BALL_3_SHAKES_SUCCESS 4 +#define BALL_TRAINER_BLOCK 5 + struct HpAndStatus { u16 hp; @@ -24,17 +46,6 @@ struct ChooseMoveStruct u8 monType2; }; -#define REQUEST_ALL_BATTLE 0x0 -#define REQUEST_SPECIES_BATTLE 0x1 -#define REQUEST_HELDITEM_BATTLE 0x2 -#define REQUEST_MOVES_PP_BATTLE 0x3 -#define REQUEST_PPMOVE1_BATTLE 0x9 -#define REQUEST_PPMOVE2_BATTLE 0xA -#define REQUEST_PPMOVE3_BATTLE 0xB -#define REQUEST_PPMOVE4_BATTLE 0xC -#define REQUEST_STATUS_BATTLE 0x28 -#define REQUEST_HP_BATTLE 0x2A - // rom3.s, emitters void EmitSetMonData(u8 bufferId, u8 request, u8 c, u8 bytes, void *data); void EmitMoveAnimation(u8 bufferId, u16 move, u8 turnOfMove, u16 movePower, s32 dmg, u8 friendship, struct DisableStruct* disableStructPtr, u8 multihit); @@ -70,22 +81,8 @@ void EmitChooseAction(u8 bufferId, u8 arg1, u16 arg2); void EmitChooseMove(u8 bufferId, bool8 isDoubleBattle, bool8 NoPpNumber, struct ChooseMoveStruct* movePpData); void EmitOpenBag(u8 bufferId, u8* arg1); void Emit_x32(u8 bufferId); - -#define RESET_ACTION_MOVE_SELECTION 0 -#define RESET_ACTION_SELECTION 1 -#define RESET_MOVE_SELECTION 2 - +void EmitPrintString(u8 bufferId, u16 stringId); void EmitResetActionMoveSelection(u8 bufferId, u8 caseId); - -#define BALL_NO_SHAKES 0 -#define BALL_1_SHAKE 1 -#define BALL_2_SHAKES 2 -#define BALL_3_SHAKES_FAIL 3 -#define BALL_3_SHAKES_SUCCESS 4 -#define BALL_TRAINER_BLOCK 5 - void EmitBallThrow(u8 bufferId, u8 caseId); -void MarkBufferBankForExecution(u8 bank); - #endif // GUARD_BATTLE_CONTROLLERS_H diff --git a/include/battle_script_commands.h b/include/battle_script_commands.h new file mode 100644 index 000000000..ae0d20f28 --- /dev/null +++ b/include/battle_script_commands.h @@ -0,0 +1,58 @@ +#ifndef GUARD_BATTLE_SCRIPT_COMMANDS_H +#define GUARD_BATTLE_SCRIPT_COMMANDS_H + +#define CMP_EQUAL 0x0 +#define CMP_NOT_EQUAL 0x1 +#define CMP_GREATER_THAN 0x2 +#define CMP_LESS_THAN 0x3 +#define CMP_COMMON_BITS 0x4 +#define CMP_NO_COMMON_BITS 0x5 + +#define BS_ATTACKER_WITH_PARTNER 4 // for atk98_status_icon_update +#define BS_GET_ATTACKER_SIDE 8 // for atk1E_jumpifability +#define BS_GET_NOT_ATTACKER_SIDE 9 // for atk1E_jumpifability + +#define ATK48_STAT_NEGATIVE 0x1 +#define ATK48_STAT_BY_TWO 0x2 +#define ATK48_BIT_x4 0x4 +#define ATK48_LOWER_FAIL_CHECK 0x8 + +#define ATK4F_DONT_CHECK_STATUSES 0x80 + +#define VARIOUS_CANCEL_MULTI_TURN_MOVES 0 +#define VARIOUS_SET_MAGIC_COAT_TARGET 1 +#define VARIOUS_CAN_RUN_FROM_BATTLE 2 +#define VARIOUS_GET_MOVE_TARGET 3 +#define VARIOUS_RESET_INTIMIDATE_TRACE_BITS 5 +#define VARIOUS_UPDATE_CHOICE_MOVE_ON_LVL_UP 6 +#define VARIOUS_WAIT_CRY 18 +#define VARIOUS_RETURN_OPPONENT_MON1 19 +#define VARIOUS_RETURN_OPPONENT_MON2 20 +#define VARIOUS_SET_TELEPORT_OUTCOME 25 +#define VARIOUS_PLAY_TRAINER_DEFEATED_MUSIC 26 + +#define ATK80_DMG_CHANGE_SIGN 0 +#define ATK80_DMG_HALF_BY_TWO_NOT_MORE_THAN_HALF_MAX_HP 1 +#define ATK80_DMG_DOUBLED 2 + +#define STAT_CHANGE_BS_PTR 0x1 +#define STAT_CHANGE_NOT_PROTECT_AFFECTED 0x20 + +#define STAT_CHANGE_WORKED 0 +#define STAT_CHANGE_DIDNT_WORK 1 + +void AI_CalcDmg(u8 bankAtk, u8 bankDef); +u8 TypeCalc(u16 move, u8 bankAtk, u8 bankDef); +u8 AI_TypeCalc(u16 move, u16 species, u8 ability); +u8 BankGetTurnOrder(u8 bank); +void SetMoveEffect(bool8 primary, u8 certain); +void BattleDestroyCursorAt(u8 cursorPosition); +void BattleCreateCursorAt(u8 cursorPosition); +void BufferMoveToLearnIntoBattleTextBuff2(void); +void sub_8056A3C(u8 xStart, u8 yStart, u8 xEnd, u8 yEnd, u8 flags); +bool8 UproarWakeUpCheck(u8 bank); + +extern void (* const gBattleScriptingCommandsTable[])(void); +extern const u8 gUnknown_0831C494[]; + +#endif // GUARD_BATTLE_SCRIPT_COMMANDS_H diff --git a/include/battle_util.h b/include/battle_util.h new file mode 100644 index 000000000..c1ff7d8ab --- /dev/null +++ b/include/battle_util.h @@ -0,0 +1,83 @@ +#ifndef GUARD_BATTLE_UTIL_H +#define GUARD_BATTLE_UTIL_H + +#define MOVE_LIMITATION_ZEROMOVE (1 << 0) +#define MOVE_LIMITATION_PP (1 << 1) +#define MOVE_LIMITATION_DISABLED (1 << 2) +#define MOVE_LIMITATION_TORMENTED (1 << 3) +#define MOVE_LIMITATION_TAUNT (1 << 4) +#define MOVE_LIMITATION_IMPRISION (1 << 5) + +#define ABILITYEFFECT_ON_SWITCHIN 0x0 +#define ABILITYEFFECT_ENDTURN 0x1 +#define ABILITYEFFECT_MOVES_BLOCK 0x2 +#define ABILITYEFFECT_ABSORBING 0x3 +#define ABILITYEFFECT_CONTACT 0x4 +#define ABILITYEFFECT_IMMUNITY 0x5 +#define ABILITYEFFECT_FORECAST 0x6 +#define ABILITYEFFECT_SYNCHRONIZE 0x7 +#define ABILITYEFFECT_ATK_SYNCHRONIZE 0x8 +#define ABILITYEFFECT_INTIMIDATE1 0x9 +#define ABILITYEFFECT_INTIMIDATE2 0xA +#define ABILITYEFFECT_TRACE 0xB +#define ABILITYEFFECT_CHECK_OTHER_SIDE 0xC +#define ABILITYEFFECT_CHECK_BANK_SIDE 0xD +#define ABILITYEFFECT_FIELD_SPORT 0xE +#define ABILITYEFFECT_CHECK_FIELD_EXCEPT_BANK 0xF +#define ABILITYEFFECT_COUNT_OTHER_SIDE 0x10 +#define ABILITYEFFECT_COUNT_BANK_SIDE 0x11 +#define ABILITYEFFECT_COUNT_ON_FIELD 0x12 +#define ABILITYEFFECT_CHECK_ON_FIELD 0x13 +#define ABILITYEFFECT_SWITCH_IN_WEATHER 0xFF + +#define ITEMEFFECT_ON_SWITCH_IN 0x0 + +#define WEATHER_HAS_EFFECT ((!AbilityBattleEffects(ABILITYEFFECT_CHECK_ON_FIELD, 0, ABILITY_CLOUD_NINE, 0, 0) && !AbilityBattleEffects(ABILITYEFFECT_CHECK_ON_FIELD, 0, ABILITY_AIR_LOCK, 0, 0))) + +#define BS_GET_TARGET 0 +#define BS_GET_ATTACKER 1 +#define BS_GET_EFFECT_BANK 2 +#define BS_GET_SCRIPTING_BANK 10 +#define BS_GET_PLAYER1 11 +#define BS_GET_OPPONENT1 12 +#define BS_GET_PLAYER2 13 +#define BS_GET_OPPONENT2 14 + +u8 GetBattleBank(u8 caseId); +void PressurePPLose(u8 bankDef, u8 bankAtk, u16 move); +void PressurePPLoseOnUsingPerishSong(u8 bankAtk); +void PressurePPLoseOnUsingImprision(u8 bankAtk); +void MarkAllBufferBanksForExecution(void); // unused +void MarkBufferBankForExecution(u8 bank); +void sub_803F850(u8 arg0); +void CancelMultiTurnMoves(u8 bank); +bool8 WasUnableToUseMove(u8 bank); +void PrepareStringBattle(u16 stringId, u8 bank); +void ResetSentPokesToOpponentValue(void); +void sub_803F9EC(u8 bank); +void sub_803FA70(u8 bank); +void BattleScriptPush(const u8* bsPtr); +void BattleScriptPushCursor(void); +void BattleScriptPop(void); +u8 TrySetCantSelectMoveBattleScript(void); +u8 CheckMoveLimitations(u8 bank, u8 unusableMoves, u8 check); +bool8 AreAllMovesUnusable(void); +u8 GetImprisonedMovesCount(u8 bank, u16 move); +u8 UpdateTurnCounters(void); +u8 TurnBasedEffects(void); +bool8 sub_8041364(void); +bool8 sub_8041728(void); +void TryClearRageStatuses(void); +u8 AtkCanceller_UnableToUseMove(void); +bool8 sub_80423F4(u8 bank, u8 r1, u8 r2); +u8 CastformDataTypeChange(u8 bank); +u8 AbilityBattleEffects(u8 caseID, u8 bank, u8 ability, u8 special, u16 moveArg); +void BattleScriptExecute(const u8* BS_ptr); +void BattleScriptPushCursorAndCallback(const u8* BS_ptr); +u8 ItemBattleEffects(u8 caseID, u8 bank, bool8 moveTurn); +void ClearFuryCutterDestinyBondGrudge(u8 bank); +void HandleAction_RunBattleScript(void); +u8 GetMoveTarget(u16 move, u8 useMoveTarget); +u8 IsPokeDisobedient(void); + +#endif // GUARD_BATTLE_UTIL_H diff --git a/include/link.h b/include/link.h index 9d581a6c1..012c90480 100644 --- a/include/link.h +++ b/include/link.h @@ -183,5 +183,6 @@ bool8 sub_800A520(void); bool8 sub_8010500(void); void sub_800DFB4(u8, u8); void sub_800ADF8(void); +u8 sub_8009FCC(void); #endif // GUARD_LINK_H diff --git a/include/pokemon.h b/include/pokemon.h index c41099b09..263a37426 100644 --- a/include/pokemon.h +++ b/include/pokemon.h @@ -640,6 +640,8 @@ u8 CheckPartyPokerus(struct Pokemon *party, u8 selection); u8 CheckPartyHasHadPokerus(struct Pokemon *party, u8 selection); void UpdatePartyPokerusTime(u16 days); void PartySpreadPokerus(struct Pokemon *party); +s8 GetMonFlavourRelation(struct Pokemon *mon, u8 a2); +s8 GetFlavourRelationByPersonality(u32 personality, u8 a2); #include "sprite.h" diff --git a/ld_script.txt b/ld_script.txt index f5361e8e4..0e8454ef8 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -58,8 +58,7 @@ SECTIONS { src/decompress.o(.text); asm/battle_1.o(.text); src/battle_2.o(.text); - asm/battle_2.o(.text); - src/battle_3.o(.text); + src/battle_util.o(.text); src/battle_script_commands.o(.text); asm/battle_5.o(.text); asm/battle_controller_player.o(.text); diff --git a/src/battle_2.c b/src/battle_2.c index ab1aae747..37ab7ab1f 100644 --- a/src/battle_2.c +++ b/src/battle_2.c @@ -40,6 +40,7 @@ #include "trainer_classes.h" #include "evolution_scene.h" #include "roamer.h" +#include "safari_zone.h" struct UnknownStruct6 { @@ -157,6 +158,10 @@ extern const struct BgTemplate gUnknown_0831AA08[]; extern const struct WindowTemplate * const gUnknown_0831ABA0[]; extern const u8 gUnknown_0831ACE0[]; extern const u8 gStatStageRatios[][2]; +extern const u8 gUnknown_0831BCE0[]; +extern const u8 gUnknown_0831BCEF[]; +extern const u8 gUnknown_0831BCF3[]; +extern const u8 * const gBattleScriptsForMoveEffects[]; // strings extern const u8 gText_LinkStandby3[]; @@ -190,6 +195,7 @@ extern const u8 BattleScript_GotAwaySafely[]; extern const u8 BattleScript_WildMonFled[]; extern const u8 BattleScript_MoveUsedLoafingAround[]; extern const u8 BattleScript_ActionSwitch[]; +extern const u8 BattleScript_PrintFailedToRunString[]; // functions extern void HandleLinkBattleSetup(void); // rom_3 @@ -2942,7 +2948,7 @@ void FaintClearSetData(void) gProtectStructs[gActiveBank].flag0Unknown = 0; gProtectStructs[gActiveBank].prlzImmobility = 0; gProtectStructs[gActiveBank].confusionSelfDmg = 0; - gProtectStructs[gActiveBank].notEffective = 0; + gProtectStructs[gActiveBank].targetNotAffected = 0; gProtectStructs[gActiveBank].chargingTurn = 0; gProtectStructs[gActiveBank].fleeFlag = 0; gProtectStructs[gActiveBank].usedImprisionedMove = 0; @@ -3824,15 +3830,18 @@ void sub_803BDA0(u8 bank) } } -#define STATE_TURN_START_RECORD 0 -#define STATE_BEFORE_ACTION_CHOSEN 1 -#define STATE_WAIT_ACTION_CHOSEN 2 -#define STATE_WAIT_ACTION_CASE_CHOSEN 3 -#define STATE_WAIT_ACTION_CONFIRMED_STANDBY 4 -#define STATE_WAIT_ACTION_CONFIRMED 5 -#define STATE_SELECTION_SCRIPT 6 -#define STATE_WAIT_SET_BEFORE_ACTION 7 -#define STATE_SELECTION_SCRIPT_MAY_RUN 8 +enum +{ + STATE_TURN_START_RECORD, + STATE_BEFORE_ACTION_CHOSEN, + STATE_WAIT_ACTION_CHOSEN, + STATE_WAIT_ACTION_CASE_CHOSEN, + STATE_WAIT_ACTION_CONFIRMED_STANDBY, + STATE_WAIT_ACTION_CONFIRMED, + STATE_SELECTION_SCRIPT, + STATE_WAIT_SET_BEFORE_ACTION, + STATE_SELECTION_SCRIPT_MAY_RUN +}; void HandleTurnActionSelectionState(void) { @@ -4137,7 +4146,7 @@ void HandleTurnActionSelectionState(void) } break; case ACTION_RUN: - gHitMarker |= HITMARKER_x8000; + gHitMarker |= HITMARKER_RUN; gBattleCommunication[gActiveBank]++; break; case ACTION_WATCHES_CAREFULLY: @@ -4160,7 +4169,7 @@ void HandleTurnActionSelectionState(void) gBattleCommunication[gActiveBank]++; break; case ACTION_SAFARI_ZONE_RUN: - gHitMarker |= HITMARKER_x8000; + gHitMarker |= HITMARKER_RUN; gBattleCommunication[gActiveBank]++; break; case ACTION_9: @@ -4221,7 +4230,7 @@ void HandleTurnActionSelectionState(void) { if (gBattleBufferB[gActiveBank][1] == 13) { - gHitMarker |= HITMARKER_x8000; + gHitMarker |= HITMARKER_RUN; gActionForBanks[gActiveBank] = ACTION_RUN; gBattleCommunication[gActiveBank] = STATE_WAIT_ACTION_CONFIRMED_STANDBY; } @@ -4613,7 +4622,7 @@ void SpecialStatusesClear(void) static void CheckFocusPunch_ClearVarsBeforeTurnStarts(void) { - if (!(gHitMarker & HITMARKER_x8000)) + if (!(gHitMarker & HITMARKER_RUN)) { while (gBattleStruct->focusPunchBank < gNoOfAllBanks) { @@ -4976,8 +4985,6 @@ void RunBattleScriptCommands(void) gBattleScriptingCommandsTable[gBattlescriptCurrInstr[0]](); } -extern const u8 * const gBattleScriptsForMoveEffects[]; - void HandleAction_UseMove(void) { u8 side; @@ -5216,6 +5223,7 @@ void HandleAction_Switch(void) extern const u8 * const gBattlescriptsForBallThrow[]; extern const u8 * const gBattlescriptsForRunningByItem[]; extern const u8 * const gUnknown_082DBD3C[]; +extern const u8 * const gBattlescriptsForSafariActions[]; void HandleAction_UseItem(void) { @@ -5375,3 +5383,198 @@ bool8 TryRunFromBattle(u8 bank) return effect; } + +void HandleAction_Run(void) +{ + gBankAttacker = gBanksByTurnOrder[gCurrentTurnActionNumber]; + + if (gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_x2000000)) + { + gCurrentTurnActionNumber = gNoOfAllBanks; + + for (gActiveBank = 0; gActiveBank < gNoOfAllBanks; gActiveBank++) + { + if (GetBankSide(gActiveBank) == SIDE_PLAYER) + { + if (gActionForBanks[gActiveBank] == ACTION_RUN) + gBattleOutcome |= BATTLE_LOST; + } + else + { + if (gActionForBanks[gActiveBank] == ACTION_RUN) + gBattleOutcome |= BATTLE_WON; + } + } + + gBattleOutcome |= BATTLE_OUTCOME_BIT_x80; + gSaveBlock2Ptr->field_CA9_b = 1; + } + else + { + if (GetBankSide(gBankAttacker) == SIDE_PLAYER) + { + if (!TryRunFromBattle(gBankAttacker)) // failed to run away + { + ClearFuryCutterDestinyBondGrudge(gBankAttacker); + gBattleCommunication[MULTISTRING_CHOOSER] = 3; + gBattlescriptCurrInstr = BattleScript_PrintFailedToRunString; + gCurrentActionFuncId = ACTION_RUN_BATTLESCRIPT; + } + } + else + { + if (gBattleMons[gBankAttacker].status2 & (STATUS2_WRAPPED | STATUS2_ESCAPE_PREVENTION)) + { + gBattleCommunication[MULTISTRING_CHOOSER] = 4; + gBattlescriptCurrInstr = BattleScript_PrintFailedToRunString; + gCurrentActionFuncId = ACTION_RUN_BATTLESCRIPT; + } + else + { + gCurrentTurnActionNumber = gNoOfAllBanks; + gBattleOutcome = BATTLE_POKE_FLED; + } + } + } +} + +void HandleAction_WatchesCarefully(void) +{ + gBankAttacker = gBanksByTurnOrder[gCurrentTurnActionNumber]; + gBattle_BG0_X = 0; + gBattle_BG0_Y = 0; + gBattlescriptCurrInstr = gBattlescriptsForSafariActions[0]; + gCurrentActionFuncId = ACTION_RUN_BATTLESCRIPT; +} + +void HandleAction_SafariZoneBallThrow(void) +{ + gBankAttacker = gBanksByTurnOrder[gCurrentTurnActionNumber]; + gBattle_BG0_X = 0; + gBattle_BG0_Y = 0; + gNumSafariBalls--; + gLastUsedItem = ITEM_SAFARI_BALL; + gBattlescriptCurrInstr = gBattlescriptsForBallThrow[ITEM_SAFARI_BALL]; + gCurrentActionFuncId = ACTION_RUN_BATTLESCRIPT; +} + +void HandleAction_ThrowPokeblock(void) +{ + gBankAttacker = gBanksByTurnOrder[gCurrentTurnActionNumber]; + gBattle_BG0_X = 0; + gBattle_BG0_Y = 0; + gBattleCommunication[MULTISTRING_CHOOSER] = gBattleBufferB[gBankAttacker][1] - 1; + gLastUsedItem = gBattleBufferB[gBankAttacker][2]; + + if (gBattleResults.field_1F < 0xFF) + gBattleResults.field_1F++; + if (gBattleStruct->field_7A < 3) + gBattleStruct->field_7A++; + if (gBattleStruct->field_7B > 1) + { + if (gBattleStruct->field_7B < gUnknown_0831BCE0[3 * gBattleStruct->field_7A + gBattleCommunication[MULTISTRING_CHOOSER]]) + gBattleStruct->field_7B = 1; + else + gBattleStruct->field_7B -= gUnknown_0831BCE0[3 * gBattleStruct->field_7A + gBattleCommunication[MULTISTRING_CHOOSER]]; + } + + gBattlescriptCurrInstr = gBattlescriptsForSafariActions[2]; + gCurrentActionFuncId = ACTION_RUN_BATTLESCRIPT; +} + +void HandleAction_GoNear(void) +{ + gBankAttacker = gBanksByTurnOrder[gCurrentTurnActionNumber]; + gBattle_BG0_X = 0; + gBattle_BG0_Y = 0; + + gBattleStruct->field_7C += gUnknown_0831BCEF[gBattleStruct->field_79]; + if (gBattleStruct->field_7C > 20) + gBattleStruct->field_7C = 20; + + gBattleStruct->field_7B +=gUnknown_0831BCF3[gBattleStruct->field_79]; + if (gBattleStruct->field_7B > 20) + gBattleStruct->field_7B = 20; + + if (gBattleStruct->field_79 < 3) + { + gBattleStruct->field_79++; + gBattleCommunication[MULTISTRING_CHOOSER] = 0; + } + else + { + gBattleCommunication[MULTISTRING_CHOOSER] = 1; + } + gBattlescriptCurrInstr = gBattlescriptsForSafariActions[1]; + gCurrentActionFuncId = ACTION_RUN_BATTLESCRIPT; +} + +void HandleAction_SafriZoneRun(void) +{ + gBankAttacker = gBanksByTurnOrder[gCurrentTurnActionNumber]; + PlaySE(SE_NIGERU); + gCurrentTurnActionNumber = gNoOfAllBanks; + gBattleOutcome = BATTLE_RAN; +} + +void HandleAction_Action9(void) +{ + gBankAttacker = gBanksByTurnOrder[gCurrentTurnActionNumber]; + gBattle_BG0_X = 0; + gBattle_BG0_Y = 0; + + PREPARE_MON_NICK_BUFFER(gBattleTextBuff1, gBankAttacker, gBattlePartyID[gBankAttacker]) + + gBattlescriptCurrInstr = gBattlescriptsForSafariActions[3]; + gCurrentActionFuncId = ACTION_RUN_BATTLESCRIPT; + gActionsByTurnOrder[1] = ACTION_FINISHED; +} + +void HandleAction_Action11(void) +{ + if (!sub_8041728()) + { + gBattleStruct->field_4D = 0; + gCurrentActionFuncId = ACTION_FINISHED; + } +} + +void HandleAction_NothingIsFainted(void) +{ + gCurrentTurnActionNumber++; + gCurrentActionFuncId = gActionsByTurnOrder[gCurrentTurnActionNumber]; + gHitMarker &= ~(HITMARKER_DESTINYBOND | HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_ATTACKSTRING_PRINTED + | HITMARKER_NO_PPDEDUCT | HITMARKER_IGNORE_SAFEGUARD | HITMARKER_IGNORE_ON_AIR + | HITMARKER_IGNORE_UNDERGROUND | HITMARKER_IGNORE_UNDERWATER | HITMARKER_x100000 + | HITMARKER_OBEYS | HITMARKER_x10 | HITMARKER_SYNCHRONISE_EFFECT + | HITMARKER_x8000000 | HITMARKER_x4000000); +} + +void HandleAction_ActionFinished(void) +{ + *(gBattleStruct->field_5C + gBanksByTurnOrder[gCurrentTurnActionNumber]) = 6; + gCurrentTurnActionNumber++; + gCurrentActionFuncId = gActionsByTurnOrder[gCurrentTurnActionNumber]; + SpecialStatusesClear(); + gHitMarker &= ~(HITMARKER_DESTINYBOND | HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_ATTACKSTRING_PRINTED + | HITMARKER_NO_PPDEDUCT | HITMARKER_IGNORE_SAFEGUARD | HITMARKER_IGNORE_ON_AIR + | HITMARKER_IGNORE_UNDERGROUND | HITMARKER_IGNORE_UNDERWATER | HITMARKER_x100000 + | HITMARKER_OBEYS | HITMARKER_x10 | HITMARKER_SYNCHRONISE_EFFECT + | HITMARKER_x8000000 | HITMARKER_x4000000); + + gCurrentMove = 0; + gBattleMoveDamage = 0; + gBattleMoveFlags = 0; + gBattleScripting.animTurn = 0; + gBattleScripting.animTargetsHit = 0; + gUnknown_02024250[gBankAttacker] = 0; + gUnknown_02024258[gBankAttacker] = 0; + gBattleStruct->dynamicMoveType = 0; + gDynamicBasePower = 0; + gBattleScripting.atk49_state = 0; + gBattleCommunication[3] = 0; + gBattleCommunication[4] = 0; + gBattleScripting.field_16 = 0; + gBattleResources->battleScriptsStack->size = 0; +} + diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index e68137c47..e53292442 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -1600,7 +1600,7 @@ static void atk06_typecalc(void) RecordAbilityBattle(gBankTarget, gLastUsedAbility); } if (gBattleMoveFlags & MOVESTATUS_NOTAFFECTED) - gProtectStructs[gBankAttacker].notEffective = 1; + gProtectStructs[gBankAttacker].targetNotAffected = 1; gBattlescriptCurrInstr++; } @@ -1639,14 +1639,14 @@ static void CheckWonderGuardAndLevitate(void) if (gTypeEffectiveness[i + 1] == gBattleMons[gBankTarget].type1 && gTypeEffectiveness[i + 2] == 0) { gBattleMoveFlags |= MOVESTATUS_NOTAFFECTED; - gProtectStructs[gBankAttacker].notEffective = 1; + gProtectStructs[gBankAttacker].targetNotAffected = 1; } if (gTypeEffectiveness[i + 1] == gBattleMons[gBankTarget].type2 && gBattleMons[gBankTarget].type1 != gBattleMons[gBankTarget].type2 && gTypeEffectiveness[i + 2] == TYPE_MUL_NO_EFFECT) { gBattleMoveFlags |= MOVESTATUS_NOTAFFECTED; - gProtectStructs[gBankAttacker].notEffective = 1; + gProtectStructs[gBankAttacker].targetNotAffected = 1; } // check super effective @@ -5066,7 +5066,7 @@ static void atk49_moveend(void) case 9: // make attacker sprite visible if (gBattleMoveFlags & MOVESTATUS_NOEFFECT || !(gStatuses3[gBankAttacker] & (STATUS3_SEMI_INVULNERABLE)) - || HasMoveFailed(gBankAttacker)) + || WasUnableToUseMove(gBankAttacker)) { gActiveBank = gBankAttacker; EmitSpriteInvisibility(0, FALSE); @@ -5297,7 +5297,7 @@ static void atk4A_typecalc2(void) RecordAbilityBattle(gBankTarget, gLastUsedAbility); } if (gBattleMoveFlags & MOVESTATUS_NOTAFFECTED) - gProtectStructs[gBankAttacker].notEffective = 1; + gProtectStructs[gBankAttacker].targetNotAffected = 1; gBattlescriptCurrInstr++; } @@ -9518,19 +9518,19 @@ static void atkB3_rolloutdamagecalculation(void) if (!(gBattleMons[gBankAttacker].status2 & STATUS2_MULTIPLETURNS)) // first hit { - gDisableStructs[gBankAttacker].rolloutTimer1 = 5; - gDisableStructs[gBankAttacker].rolloutTimer2 = 5; + gDisableStructs[gBankAttacker].rolloutCounter1 = 5; + gDisableStructs[gBankAttacker].rolloutCounter2 = 5; gBattleMons[gBankAttacker].status2 |= STATUS2_MULTIPLETURNS; gLockedMoves[gBankAttacker] = gCurrentMove; } - if (--gDisableStructs[gBankAttacker].rolloutTimer1 == 0) // last hit + if (--gDisableStructs[gBankAttacker].rolloutCounter1 == 0) // last hit { gBattleMons[gBankAttacker].status2 &= ~(STATUS2_MULTIPLETURNS); } gDynamicBasePower = gBattleMoves[gCurrentMove].power; - for (i = 1; i < (5 - gDisableStructs[gBankAttacker].rolloutTimer1); i++) + for (i = 1; i < (5 - gDisableStructs[gBankAttacker].rolloutCounter1); i++) gDynamicBasePower *= 2; if (gBattleMons[gBankAttacker].status2 & STATUS2_DEFENSE_CURL) diff --git a/src/battle_3.c b/src/battle_util.c similarity index 96% rename from src/battle_3.c rename to src/battle_util.c index 58e0a05c7..c5a85dd2b 100644 --- a/src/battle_3.c +++ b/src/battle_util.c @@ -17,6 +17,7 @@ #include "battle_controllers.h" #include "event_data.h" #include "calculate_base_damage.h" +#include "link.h" extern const u8* gBattlescriptCurrInstr; extern const u8* gBattlescriptPtrsForSelection[BATTLE_BANKS_COUNT]; @@ -33,7 +34,7 @@ extern u8 gBankTarget; extern u8 gAbsentBankFlags; extern u16 gBattleWeather; extern u8 gBanksByTurnOrder[BATTLE_BANKS_COUNT]; -extern u16 gSideAffecting[]; +extern u16 gSideAffecting[2]; extern u8 gBattleCommunication[]; extern void (*gBattleMainFunc)(void); extern s32 gBattleMoveDamage; @@ -45,7 +46,7 @@ extern u32 gHitMarker; extern u8 gEffectBank; extern u16 gBattlePartyID[BATTLE_BANKS_COUNT]; extern u8 gBank1; -extern u16 gChosenMovesByBanks[]; +extern u16 gChosenMovesByBanks[BATTLE_BANKS_COUNT]; extern u8 gBattleMoveFlags; extern s32 gTakenDmg[BATTLE_BANKS_COUNT]; extern u8 gTakenDmgBanks[BATTLE_BANKS_COUNT]; @@ -55,8 +56,10 @@ extern u32 gBattleExecBuffer; extern u16 gRandomMove; extern u8 gCurrMovePos; extern u8 gUnknown_020241E9; +extern u8 gSentPokesToOpponent[2]; extern const struct BattleMove gBattleMoves[]; +extern const u16 gSoundMovesTable[]; // scripts extern const u8 gUnknown_082DAE2A[]; @@ -169,6 +172,7 @@ extern const u8 gUnknown_082DB6A5[]; //disobedient, uses a random move extern const u8 gUnknown_082DB6D9[]; //disobedient, went to sleep extern const u8 gUnknown_082DB6F0[]; //disobedient, hits itself +// strings extern const u8 gStatusConditionString_PoisonJpn[]; extern const u8 gStatusConditionString_SleepJpn[]; extern const u8 gStatusConditionString_ParalysisJpn[]; @@ -176,12 +180,272 @@ extern const u8 gStatusConditionString_BurnJpn[]; extern const u8 gStatusConditionString_IceJpn[]; extern const u8 gStatusConditionString_ConfusionJpn[]; extern const u8 gStatusConditionString_LoveJpn[]; -extern const u16 gSoundMovesTable[]; -extern void sub_803F9EC(); -extern bool8 sub_80423F4(u8 bank, u8, u8); extern u8 weather_get_current(void); -extern s8 GetFlavourRelationByPersonality(u32 personality, u8 flavor); + +u8 GetBattleBank(u8 caseId) +{ + u8 ret = 0; + switch (caseId) + { + case BS_GET_TARGET: + ret = gBankTarget; + break; + case BS_GET_ATTACKER: + ret = gBankAttacker; + break; + case BS_GET_EFFECT_BANK: + ret = gEffectBank; + break; + case 7: + ret = 0; + break; + case BS_GET_SCRIPTING_BANK: + ret = gBattleScripting.bank; + break; + case 3: + ret = gBank1; + break; + case 5: + ret = gBank1; + break; + case 4: + case 6: + case 8: + case 9: + case BS_GET_PLAYER1: + ret = GetBankByIdentity(IDENTITY_PLAYER_MON1); + break; + case BS_GET_OPPONENT1: + ret = GetBankByIdentity(IDENTITY_OPPONENT_MON1); + break; + case BS_GET_PLAYER2: + ret = GetBankByIdentity(IDENTITY_PLAYER_MON2); + break; + case BS_GET_OPPONENT2: + ret = GetBankByIdentity(IDENTITY_OPPONENT_MON2); + break; + } + return ret; +} + +void PressurePPLose(u8 bankDef, u8 bankAtk, u16 move) +{ + s32 i; + + if (gBattleMons[bankDef].ability != ABILITY_PRESSURE) + return; + + for (i = 0; i < 4; i++) + { + if (gBattleMons[bankAtk].moves[i] == move) + break; + } + + if (i == 4) // mons don't share any moves + return; + + if (gBattleMons[bankAtk].pp[i] != 0) + gBattleMons[bankAtk].pp[i]--; + + if (!(gBattleMons[bankAtk].status2 & STATUS2_TRANSFORMED) + && !(gDisableStructs[bankAtk].unk18_b & gBitTable[i])) + { + gActiveBank = bankAtk; + EmitSetMonData(0, REQUEST_PPMOVE1_BATTLE + i, 0, 1, &gBattleMons[gActiveBank].pp[i]); + MarkBufferBankForExecution(gActiveBank); + } +} + +void PressurePPLoseOnUsingImprision(u8 bankAtk) +{ + s32 i, j; + s32 imprisionPos = 4; + u8 atkSide = GetBankSide(bankAtk); + + for (i = 0; i < gNoOfAllBanks; i++) + { + if (atkSide != GetBankSide(i) && gBattleMons[i].ability == ABILITY_PRESSURE) + { + for (j = 0; j < 4; j++) + { + if (gBattleMons[bankAtk].moves[j] == MOVE_IMPRISON) + break; + } + if (j != 4) + { + imprisionPos = j; + if (gBattleMons[bankAtk].pp[j] != 0) + gBattleMons[bankAtk].pp[j]--; + } + } + } + + if (imprisionPos != 4 + && !(gBattleMons[bankAtk].status2 & STATUS2_TRANSFORMED) + && !(gDisableStructs[bankAtk].unk18_b & gBitTable[imprisionPos])) + { + gActiveBank = bankAtk; + EmitSetMonData(0, REQUEST_PPMOVE1_BATTLE + imprisionPos, 0, 1, &gBattleMons[gActiveBank].pp[imprisionPos]); + MarkBufferBankForExecution(gActiveBank); + } +} + +void PressurePPLoseOnUsingPerishSong(u8 bankAtk) +{ + s32 i, j; + s32 perishSongPos = 4; + + for (i = 0; i < gNoOfAllBanks; i++) + { + if (gBattleMons[i].ability == ABILITY_PRESSURE && i != bankAtk) + { + for (j = 0; j < 4; j++) + { + if (gBattleMons[bankAtk].moves[j] == MOVE_PERISH_SONG) + break; + } + if (j != 4) + { + perishSongPos = j; + if (gBattleMons[bankAtk].pp[j] != 0) + gBattleMons[bankAtk].pp[j]--; + } + } + } + + if (perishSongPos != 4 + && !(gBattleMons[bankAtk].status2 & STATUS2_TRANSFORMED) + && !(gDisableStructs[bankAtk].unk18_b & gBitTable[perishSongPos])) + { + gActiveBank = bankAtk; + EmitSetMonData(0, REQUEST_PPMOVE1_BATTLE + perishSongPos, 0, 1, &gBattleMons[gActiveBank].pp[perishSongPos]); + MarkBufferBankForExecution(gActiveBank); + } +} + +void MarkAllBufferBanksForExecution(void) // unused +{ + s32 i; + + if (gBattleTypeFlags & BATTLE_TYPE_LINK) + { + for (i = 0; i < gNoOfAllBanks; i++) + gBattleExecBuffer |= gBitTable[i] << 0x1C; + } + else + { + for (i = 0; i < gNoOfAllBanks; i++) + gBattleExecBuffer |= gBitTable[i]; + } +} + +void MarkBufferBankForExecution(u8 bank) +{ + if (gBattleTypeFlags & BATTLE_TYPE_LINK) + { + gBattleExecBuffer |= gBitTable[bank] << 0x1C; + } + else + { + gBattleExecBuffer |= gBitTable[bank]; + } +} + +void sub_803F850(u8 arg0) +{ + s32 i; + + for (i = 0; i < sub_8009FCC(); i++) + gBattleExecBuffer |= gBitTable[arg0] << (i << 2); + + gBattleExecBuffer &= ~(0x10000000 << arg0); +} + +void CancelMultiTurnMoves(u8 bank) +{ + gBattleMons[bank].status2 &= ~(STATUS2_MULTIPLETURNS); + gBattleMons[bank].status2 &= ~(STATUS2_LOCK_CONFUSE); + gBattleMons[bank].status2 &= ~(STATUS2_UPROAR); + gBattleMons[bank].status2 &= ~(STATUS2_BIDE); + + gStatuses3[bank] &= ~(STATUS3_SEMI_INVULNERABLE); + + gDisableStructs[bank].rolloutCounter1 = 0; + gDisableStructs[bank].furyCutterCounter = 0; +} + +bool8 WasUnableToUseMove(u8 bank) +{ + if (gProtectStructs[bank].prlzImmobility + || gProtectStructs[bank].targetNotAffected + || gProtectStructs[bank].usedImprisionedMove + || gProtectStructs[bank].loveImmobility + || gProtectStructs[bank].usedDisabledMove + || gProtectStructs[bank].usedTauntedMove + || gProtectStructs[bank].flag2Unknown + || gProtectStructs[bank].flinchImmobility + || gProtectStructs[bank].confusionSelfDmg) + return TRUE; + else + return FALSE; +} + +void PrepareStringBattle(u16 stringId, u8 bank) +{ + gActiveBank = bank; + EmitPrintString(0, stringId); + MarkBufferBankForExecution(gActiveBank); +} + +void ResetSentPokesToOpponentValue(void) +{ + s32 i; + u32 bits = 0; + + gSentPokesToOpponent[0] = 0; + gSentPokesToOpponent[1] = 0; + + for (i = 0; i < gNoOfAllBanks; i += 2) + bits |= gBitTable[gBattlePartyID[i]]; + + for (i = 1; i < gNoOfAllBanks; i += 2) + gSentPokesToOpponent[(i & BIT_MON) >> 1] = bits; +} + +void sub_803F9EC(u8 bank) +{ + s32 i = 0; + u32 bits = 0; + + if (GetBankSide(bank) == SIDE_OPPONENT) + { + u8 id = ((bank & BIT_MON) >> 1); + gSentPokesToOpponent[id] = 0; + + for (i = 0; i < gNoOfAllBanks; i += 2) + { + if (!(gAbsentBankFlags & gBitTable[i])) + bits |= gBitTable[gBattlePartyID[i]]; + } + + gSentPokesToOpponent[id] = bits; + } +} + +void sub_803FA70(u8 bank) +{ + if (GetBankSide(bank) == SIDE_OPPONENT) + { + sub_803F9EC(bank); + } + else + { + s32 i; + for (i = 1; i < gNoOfAllBanks; i++) + gSentPokesToOpponent[(i & BIT_MON) >> 1] |= gBitTable[gBattlePartyID[bank]]; + } +} void BattleScriptPush(const u8* bsPtr) { @@ -828,7 +1092,7 @@ u8 TurnBasedEffects(void) { gBankAttacker = gActiveBank; gBattleMons[gActiveBank].status2 -= 0x10; // uproar timer goes down - if (HasMoveFailed(gActiveBank)) + if (WasUnableToUseMove(gActiveBank)) { CancelMultiTurnMoves(gActiveBank); gBattleCommunication[MULTISTRING_CHOOSER] = 1; @@ -854,7 +1118,7 @@ u8 TurnBasedEffects(void) if (gBattleMons[gActiveBank].status2 & STATUS2_LOCK_CONFUSE) { gBattleMons[gActiveBank].status2 -= 0x400; - if (HasMoveFailed(gActiveBank)) + if (WasUnableToUseMove(gActiveBank)) CancelMultiTurnMoves(gActiveBank); else if (!(gBattleMons[gActiveBank].status2 & STATUS2_LOCK_CONFUSE) && (gBattleMons[gActiveBank].status2 & STATUS2_MULTIPLETURNS)) @@ -1125,7 +1389,7 @@ bool8 sub_8041728(void) case 4: do { - gBank1 = gBankTarget = gBattleStruct->field_4E; //or should banks be switched? + gBank1 = gBankTarget = gBattleStruct->field_4E; if (gBattleMons[gBattleStruct->field_4E].hp == 0 && !(gAbsentBankFlags & gBitTable[gBattleStruct->field_4E])) { @@ -6190,7 +6454,7 @@ void ClearFuryCutterDestinyBondGrudge(u8 bank) gStatuses3[bank] &= ~(STATUS3_GRUDGE); } -void sub_80458B4(void) +void HandleAction_RunBattleScript(void) // identical to RunBattleScriptCommands { if (gBattleExecBuffer == 0) gBattleScriptingCommandsTable[*gBattlescriptCurrInstr](); From 7b88c7f2f0bceb6adc0ea3081c18e175dd4cb21c Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Fri, 6 Oct 2017 19:09:37 +0200 Subject: [PATCH 33/42] move const data to battle files --- asm/battle_message.s | 2 +- data/battle_message.s | 7 ++ data/data2b.s | 43 ---------- include/battle_2.h | 11 +++ ld_script.txt | 2 + src/battle_2.c | 187 +++++++++++++++++++++++++++++------------- src/battle_util.c | 25 +++--- 7 files changed, 162 insertions(+), 115 deletions(-) diff --git a/asm/battle_message.s b/asm/battle_message.s index c39903dcc..b114a36f8 100644 --- a/asm/battle_message.s +++ b/asm/battle_message.s @@ -738,7 +738,7 @@ _0814E730: ldr r5, [sp] ldr r4, [sp, 0x4] movs r3, 0 - ldr r2, =gUnknown_0831BCA8 + ldr r2, =gStatusConditionStringsTable _0814E738: ldr r1, [r2] ldr r0, [r1] diff --git a/data/battle_message.s b/data/battle_message.s index 05847eed0..4c72557d8 100644 --- a/data/battle_message.s +++ b/data/battle_message.s @@ -1768,12 +1768,19 @@ gText_SafariBalls:: @ 85CCB2C gText_SafariBallLeft:: @ 85CCB3C .string "{HIGHLIGHT DARK_GREY}Left: $" .string "{HIGHLIGHT DARK_GREY}$" +gText_Sleep:: .string "sleep$" +gText_Poison:: .string "poison$" +gText_Burn:: .string "burn$" +gText_Paralysis:: .string "paralysis$" +gText_Ice:: .string "ice$" +gText_Confusion:: .string "confusion$" +gText_Love:: .string "love$" gText_SpaceAndSpace:: @ 85CCB79 diff --git a/data/data2b.s b/data/data2b.s index 717b70d4d..802399fca 100644 --- a/data/data2b.s +++ b/data/data2b.s @@ -225,46 +225,3 @@ gTrainerMoneyTable:: @ 831AEB8 @ 831BAD4 .include "data/text/ability_description_pointers.inc" - -gTurnActionsFuncsTable:: @ 831BC0C - .incbin "baserom.gba", 0x31bc0c, 0x38 - -gEndTurnFuncsTable:: @ 831BC44 - .incbin "baserom.gba", 0x31bc44, 0x2c - -gStatusConditionString_PoisonJpn:: @ 831BC70 - .incbin "baserom.gba", 0x31bc70, 0x8 - -gStatusConditionString_SleepJpn:: @ 831BC78 - .incbin "baserom.gba", 0x31bc78, 0x8 - -gStatusConditionString_ParalysisJpn:: @ 831BC80 - .incbin "baserom.gba", 0x31bc80, 0x8 - -gStatusConditionString_BurnJpn:: @ 831BC88 - .incbin "baserom.gba", 0x31bc88, 0x8 - -gStatusConditionString_IceJpn:: @ 831BC90 - .incbin "baserom.gba", 0x31bc90, 0x8 - -gStatusConditionString_ConfusionJpn:: @ 831BC98 - .incbin "baserom.gba", 0x31bc98, 0x8 - -gStatusConditionString_LoveJpn:: @ 831BCA0 - .incbin "baserom.gba", 0x31bca0, 0x8 - -gUnknown_0831BCA8:: @ 831BCA8 - .incbin "baserom.gba", 0x31bca8, 0x38 - -gUnknown_0831BCE0:: @ 831BCE0 - .incbin "baserom.gba", 0x31bce0, 0xf - -gUnknown_0831BCEF:: @ 831BCEF - .incbin "baserom.gba", 0x31bcef, 0x4 - -gUnknown_0831BCF3:: @ 831BCF3 - .incbin "baserom.gba", 0x31bcf3, 0x5 - -gSoundMovesTable:: @ 831BCF8 - .incbin "baserom.gba", 0x31bcf8, 0x18 - diff --git a/include/battle_2.h b/include/battle_2.h index e4385db04..edd6b6ef3 100644 --- a/include/battle_2.h +++ b/include/battle_2.h @@ -15,5 +15,16 @@ void SwapTurnOrder(u8 id1, u8 id2); void BattleTurnPassed(void); void RunBattleScriptCommands_PopCallbacksStack(void); void RunBattleScriptCommands(void); +void sub_8039E9C(struct Sprite *sprite); + +extern const u8 gStatusConditionString_PoisonJpn[8]; +extern const u8 gStatusConditionString_SleepJpn[8]; +extern const u8 gStatusConditionString_ParalysisJpn[8]; +extern const u8 gStatusConditionString_BurnJpn[8]; +extern const u8 gStatusConditionString_IceJpn[8]; +extern const u8 gStatusConditionString_ConfusionJpn[8]; +extern const u8 gStatusConditionString_LoveJpn[8]; + +extern const u8 * const gStatusConditionStringsTable[][2]; #endif // GUARD_BATTLE_2_H diff --git a/ld_script.txt b/ld_script.txt index 4d66ea561..cf8591194 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -325,6 +325,8 @@ SECTIONS { data/link.o(.rodata); src/rtc.o(.rodata); data/data2b.o(.rodata); + src/battle_2.o(.rodata); + src/battle_util.o(.rodata); src/battle_script_commands.o(.rodata); data/battle_controller_player.o(.rodata); data/smokescreen.o(.rodata); diff --git a/src/battle_2.c b/src/battle_2.c index 37ab7ab1f..fd7cf6863 100644 --- a/src/battle_2.c +++ b/src/battle_2.c @@ -158,10 +158,11 @@ extern const struct BgTemplate gUnknown_0831AA08[]; extern const struct WindowTemplate * const gUnknown_0831ABA0[]; extern const u8 gUnknown_0831ACE0[]; extern const u8 gStatStageRatios[][2]; -extern const u8 gUnknown_0831BCE0[]; -extern const u8 gUnknown_0831BCEF[]; -extern const u8 gUnknown_0831BCF3[]; extern const u8 * const gBattleScriptsForMoveEffects[]; +extern const u8 * const gBattlescriptsForBallThrow[]; +extern const u8 * const gBattlescriptsForRunningByItem[]; +extern const u8 * const gUnknown_082DBD3C[]; +extern const u8 * const gBattlescriptsForSafariActions[]; // strings extern const u8 gText_LinkStandby3[]; @@ -171,6 +172,13 @@ extern const u8 gText_BattleRecordCouldntBeSaved[]; extern const u8 gText_BattleRecordedOnPass[]; extern const u8 gText_ShedinjaJapaneseName[]; extern const u8 gText_EmptyString3[]; +extern const u8 gText_Poison[]; +extern const u8 gText_Sleep[]; +extern const u8 gText_Paralysis[]; +extern const u8 gText_Burn[]; +extern const u8 gText_Ice[]; +extern const u8 gText_Confusion[]; +extern const u8 gText_Love[]; // battlescripts extern const u8 gUnknown_082DB8BE[]; @@ -230,7 +238,7 @@ static void CB2_HandleStartMultiBattle(void); static void CB2_HandleStartBattle(void); static void TryCorrectShedinjaLanguage(struct Pokemon *mon); static u8 CreateNPCTrainerParty(struct Pokemon *party, u16 trainerNum, bool8 firstTrainer); -void BattleMainCB1(void); +static void BattleMainCB1(void); static void sub_8038538(struct Sprite *sprite); static void sub_8038F14(void); static void sub_8038F34(void); @@ -243,12 +251,11 @@ static void sub_8039838(struct Sprite *sprite); static void sub_8039894(struct Sprite *sprite); static void sub_80398D0(struct Sprite *sprite); static void sub_8039A48(struct Sprite *sprite); -void sub_8039AF4(struct Sprite *sprite); -void sub_8039E9C(struct Sprite *sprite); -void SpriteCallbackDummy_3(struct Sprite *sprite); -void oac_poke_ally_(struct Sprite *sprite); -void SpecialStatusesClear(void); -void TurnValuesCleanUp(bool8 var0); +static void sub_8039AF4(struct Sprite *sprite); +static void SpriteCallbackDummy_3(struct Sprite *sprite); +static void oac_poke_ally_(struct Sprite *sprite); +static void SpecialStatusesClear(void); +static void TurnValuesCleanUp(bool8 var0); static void SpriteCB_HealthBoxBounce(struct Sprite *sprite); static void BattleStartClearSetData(void); static void BattleIntroGetMonsData(void); @@ -264,17 +271,92 @@ static void BattleIntroOpponent2SendsOutMonAnimation(void); static void BattleIntroRecordMonsToDex(void); static void BattleIntroPlayer1SendsOutMonAnimation(void); static void TryDoEventsBeforeFirstTurn(void); -void HandleTurnActionSelectionState(void); +static void HandleTurnActionSelectionState(void); static void RunTurnActionsFunctions(void); static void SetActionsAndBanksTurnOrder(void); -void sub_803CDF8(void); -bool8 sub_803CDB8(void); +static void sub_803CDF8(void); +static bool8 sub_803CDB8(void); static void CheckFocusPunch_ClearVarsBeforeTurnStarts(void); -void HandleEndTurn_FinishBattle(void); static void FreeResetData_ReturnToOvOrDoEvolutions(void); static void ReturnFromBattleToOverworld(void); static void TryEvolvePokemon(void); static void WaitForEvoSceneToFinish(void); +static void HandleEndTurn_ContinueBattle(void); +static void HandleEndTurn_BattleWon(void); +static void HandleEndTurn_BattleLost(void); +static void HandleEndTurn_RanFromBattle(void); +static void HandleEndTurn_MonFled(void); +static void HandleEndTurn_FinishBattle(void); +static void HandleAction_UseMove(void); +static void HandleAction_Switch(void); +static void HandleAction_UseItem(void); +static void HandleAction_Run(void); +static void HandleAction_WatchesCarefully(void); +static void HandleAction_SafariZoneBallThrow(void); +static void HandleAction_ThrowPokeblock(void); +static void HandleAction_GoNear(void); +static void HandleAction_SafriZoneRun(void); +static void HandleAction_Action9(void); +static void HandleAction_Action11(void); +static void HandleAction_NothingIsFainted(void); +static void HandleAction_ActionFinished(void); + +// rom const data +static void (* const sTurnActionsFuncsTable[])(void) = +{ + HandleAction_UseMove, // ACTION_USE_MOVE + HandleAction_UseItem, // ACTION_USE_ITEM + HandleAction_Switch, // ACTION_SWITCH + HandleAction_Run, // ACTION_RUN + HandleAction_WatchesCarefully, // ACTION_WATCHES_CAREFULLY + HandleAction_SafariZoneBallThrow, // ACTION_SAFARI_ZONE_BALL + HandleAction_ThrowPokeblock, // ACTION_POKEBLOCK_CASE + HandleAction_GoNear, // ACTION_GO_NEAR + HandleAction_SafriZoneRun, // ACTION_SAFARI_ZONE_RUN + HandleAction_Action9, // ACTION_9 + HandleAction_RunBattleScript, // ACTION_RUN_BATTLESCRIPT + HandleAction_Action11, // not sure about this one + HandleAction_ActionFinished, // ACTION_FINISHED + HandleAction_NothingIsFainted, // ACTION_NOTHING_FAINTED +}; + +static void (* const sEndTurnFuncsTable[])(void) = +{ + HandleEndTurn_ContinueBattle, // battle outcome 0 + HandleEndTurn_BattleWon, // BATTLE_WON + HandleEndTurn_BattleLost, // BATTLE_LOST + HandleEndTurn_BattleLost, // BATTLE_DREW + HandleEndTurn_RanFromBattle, // BATTLE_RAN + HandleEndTurn_FinishBattle, // BATTLE_PLAYER_TELEPORTED + HandleEndTurn_MonFled, // BATTLE_POKE_FLED + HandleEndTurn_FinishBattle, // BATTLE_CAUGHT + HandleEndTurn_FinishBattle, // battle outcome 8 + HandleEndTurn_FinishBattle, // BATTLE_FORFEITED + HandleEndTurn_FinishBattle, // BATTLE_OPPONENT_TELEPORTED +}; + +const u8 gStatusConditionString_PoisonJpn[8] = _("どく$$$$$"); +const u8 gStatusConditionString_SleepJpn[8] = _("ねむり$$$$"); +const u8 gStatusConditionString_ParalysisJpn[8] = _("まひ$$$$$"); +const u8 gStatusConditionString_BurnJpn[8] = _("やけど$$$$"); +const u8 gStatusConditionString_IceJpn[8] = _("こおり$$$$"); +const u8 gStatusConditionString_ConfusionJpn[8] = _("こんらん$$$"); +const u8 gStatusConditionString_LoveJpn[8] = _("メロメロ$$$"); + +const u8 * const gStatusConditionStringsTable[][2] = +{ + {gStatusConditionString_PoisonJpn, gText_Poison}, + {gStatusConditionString_SleepJpn, gText_Sleep}, + {gStatusConditionString_ParalysisJpn, gText_Paralysis}, + {gStatusConditionString_BurnJpn, gText_Burn}, + {gStatusConditionString_IceJpn, gText_Ice}, + {gStatusConditionString_ConfusionJpn, gText_Confusion}, + {gStatusConditionString_LoveJpn, gText_Love} +}; + +static const u8 sUnknown_0831BCE0[][3] = {{0, 0, 0}, {3, 5, 0}, {2, 3, 0}, {1, 2, 0}, {1, 1, 0}}; +static const u8 sUnknown_0831BCEF[] = {4, 3, 2, 1}; +static const u8 sUnknown_0831BCF3[] = {4, 4, 4, 4}; void CB2_InitBattle(void) { @@ -2493,7 +2575,7 @@ void sub_8039AD8(struct Sprite *sprite) sprite->callback = sub_8039AF4; } -void sub_8039AF4(struct Sprite *sprite) +static void sub_8039AF4(struct Sprite *sprite) { sprite->data3--; if (sprite->data3 == 0) @@ -2528,7 +2610,7 @@ void sub_8039BB4(struct Sprite *sprite) sprite->callback = oac_poke_ally_; } -void oac_poke_ally_(struct Sprite *sprite) +static void oac_poke_ally_(struct Sprite *sprite) { if ((gUnknown_020243FC & 1) == 0) { @@ -2546,7 +2628,7 @@ void sub_80105DC(struct Sprite *sprite) sprite->callback = SpriteCallbackDummy_3; } -void SpriteCallbackDummy_3(struct Sprite *sprite) +static void SpriteCallbackDummy_3(struct Sprite *sprite) { } @@ -2675,7 +2757,7 @@ void BeginBattleIntro(void) gBattleMainFunc = BattleIntroGetMonsData; } -void BattleMainCB1(void) +static void BattleMainCB1(void) { gBattleMainFunc(); @@ -3643,7 +3725,7 @@ static void TryDoEventsBeforeFirstTurn(void) } } -void HandleEndTurn_ContinueBattle(void) +static void HandleEndTurn_ContinueBattle(void) { s32 i; @@ -3843,7 +3925,7 @@ enum STATE_SELECTION_SCRIPT_MAY_RUN }; -void HandleTurnActionSelectionState(void) +static void HandleTurnActionSelectionState(void) { s32 i; @@ -4271,7 +4353,7 @@ void HandleTurnActionSelectionState(void) } } -bool8 sub_803CDB8(void) +static bool8 sub_803CDB8(void) { s32 i, var; @@ -4287,7 +4369,7 @@ bool8 sub_803CDB8(void) return FALSE; } -void sub_803CDF8(void) +static void sub_803CDF8(void) { *(gBattleStruct->field_5C + gActiveBank) = gBattleBufferB[gActiveBank][1]; RecordedBattle_SetBankAction(gActiveBank, gBattleBufferB[gActiveBank][1]); @@ -4571,7 +4653,7 @@ static void SetActionsAndBanksTurnOrder(void) gBattleStruct->focusPunchBank = 0; } -void TurnValuesCleanUp(bool8 var0) +static void TurnValuesCleanUp(bool8 var0) { s32 i; u8 *dataPtr; @@ -4608,7 +4690,7 @@ void TurnValuesCleanUp(bool8 var0) gSideTimers[1].followmeTimer = 0; } -void SpecialStatusesClear(void) +static void SpecialStatusesClear(void) { for (gActiveBank = 0; gActiveBank < gNoOfAllBanks; gActiveBank++) { @@ -4655,21 +4737,18 @@ static void CheckFocusPunch_ClearVarsBeforeTurnStarts(void) gBattleResources->battleScriptsStack->size = 0; } -extern void (* const gTurnActionsFuncsTable[])(void); -extern void (* const gEndTurnFuncsTable[])(void); - static void RunTurnActionsFunctions(void) { if (gBattleOutcome != 0) gCurrentActionFuncId = 12; *(&gBattleStruct->field_4B) = gCurrentTurnActionNumber; - gTurnActionsFuncsTable[gCurrentActionFuncId](); + sTurnActionsFuncsTable[gCurrentActionFuncId](); if (gCurrentTurnActionNumber >= gNoOfAllBanks) // everyone did their actions, turn finished { gHitMarker &= ~(HITMARKER_x100000); - gBattleMainFunc = gEndTurnFuncsTable[gBattleOutcome & 0x7F]; + gBattleMainFunc = sEndTurnFuncsTable[gBattleOutcome & 0x7F]; } else { @@ -4681,7 +4760,7 @@ static void RunTurnActionsFunctions(void) } } -void HandleEndTurn_BattleWon(void) +static void HandleEndTurn_BattleWon(void) { gCurrentActionFuncId = 0; @@ -4739,7 +4818,7 @@ void HandleEndTurn_BattleWon(void) gBattleMainFunc = HandleEndTurn_FinishBattle; } -void HandleEndTurn_BattleLost(void) +static void HandleEndTurn_BattleLost(void) { gCurrentActionFuncId = 0; @@ -4775,7 +4854,7 @@ void HandleEndTurn_BattleLost(void) gBattleMainFunc = HandleEndTurn_FinishBattle; } -void HandleEndTurn_RanFromBattle(void) +static void HandleEndTurn_RanFromBattle(void) { gCurrentActionFuncId = 0; @@ -4809,7 +4888,7 @@ void HandleEndTurn_RanFromBattle(void) gBattleMainFunc = HandleEndTurn_FinishBattle; } -void HandleEndTurn_MonFled(void) +static void HandleEndTurn_MonFled(void) { gCurrentActionFuncId = 0; @@ -4819,7 +4898,7 @@ void HandleEndTurn_MonFled(void) gBattleMainFunc = HandleEndTurn_FinishBattle; } -void HandleEndTurn_FinishBattle(void) +static void HandleEndTurn_FinishBattle(void) { if (gCurrentActionFuncId == 0xB || gCurrentActionFuncId == 0xC) { @@ -4985,7 +5064,7 @@ void RunBattleScriptCommands(void) gBattleScriptingCommandsTable[gBattlescriptCurrInstr[0]](); } -void HandleAction_UseMove(void) +static void HandleAction_UseMove(void) { u8 side; u8 var = 4; @@ -5202,7 +5281,7 @@ void HandleAction_UseMove(void) gCurrentActionFuncId = ACTION_RUN_BATTLESCRIPT; } -void HandleAction_Switch(void) +static void HandleAction_Switch(void) { gBankAttacker = gBanksByTurnOrder[gCurrentTurnActionNumber]; gBattle_BG0_X = 0; @@ -5220,12 +5299,7 @@ void HandleAction_Switch(void) gBattleResults.playerSwitchesCounter++; } -extern const u8 * const gBattlescriptsForBallThrow[]; -extern const u8 * const gBattlescriptsForRunningByItem[]; -extern const u8 * const gUnknown_082DBD3C[]; -extern const u8 * const gBattlescriptsForSafariActions[]; - -void HandleAction_UseItem(void) +static void HandleAction_UseItem(void) { gBankAttacker = gBankTarget = gBanksByTurnOrder[gCurrentTurnActionNumber]; gBattle_BG0_X = 0; @@ -5384,7 +5458,7 @@ bool8 TryRunFromBattle(u8 bank) return effect; } -void HandleAction_Run(void) +static void HandleAction_Run(void) { gBankAttacker = gBanksByTurnOrder[gCurrentTurnActionNumber]; @@ -5438,7 +5512,7 @@ void HandleAction_Run(void) } } -void HandleAction_WatchesCarefully(void) +static void HandleAction_WatchesCarefully(void) { gBankAttacker = gBanksByTurnOrder[gCurrentTurnActionNumber]; gBattle_BG0_X = 0; @@ -5447,7 +5521,7 @@ void HandleAction_WatchesCarefully(void) gCurrentActionFuncId = ACTION_RUN_BATTLESCRIPT; } -void HandleAction_SafariZoneBallThrow(void) +static void HandleAction_SafariZoneBallThrow(void) { gBankAttacker = gBanksByTurnOrder[gCurrentTurnActionNumber]; gBattle_BG0_X = 0; @@ -5458,7 +5532,7 @@ void HandleAction_SafariZoneBallThrow(void) gCurrentActionFuncId = ACTION_RUN_BATTLESCRIPT; } -void HandleAction_ThrowPokeblock(void) +static void HandleAction_ThrowPokeblock(void) { gBankAttacker = gBanksByTurnOrder[gCurrentTurnActionNumber]; gBattle_BG0_X = 0; @@ -5472,27 +5546,27 @@ void HandleAction_ThrowPokeblock(void) gBattleStruct->field_7A++; if (gBattleStruct->field_7B > 1) { - if (gBattleStruct->field_7B < gUnknown_0831BCE0[3 * gBattleStruct->field_7A + gBattleCommunication[MULTISTRING_CHOOSER]]) + if (gBattleStruct->field_7B < sUnknown_0831BCE0[gBattleStruct->field_7A][gBattleCommunication[MULTISTRING_CHOOSER]]) gBattleStruct->field_7B = 1; else - gBattleStruct->field_7B -= gUnknown_0831BCE0[3 * gBattleStruct->field_7A + gBattleCommunication[MULTISTRING_CHOOSER]]; + gBattleStruct->field_7B -= sUnknown_0831BCE0[gBattleStruct->field_7A][gBattleCommunication[MULTISTRING_CHOOSER]]; } gBattlescriptCurrInstr = gBattlescriptsForSafariActions[2]; gCurrentActionFuncId = ACTION_RUN_BATTLESCRIPT; } -void HandleAction_GoNear(void) +static void HandleAction_GoNear(void) { gBankAttacker = gBanksByTurnOrder[gCurrentTurnActionNumber]; gBattle_BG0_X = 0; gBattle_BG0_Y = 0; - gBattleStruct->field_7C += gUnknown_0831BCEF[gBattleStruct->field_79]; + gBattleStruct->field_7C += sUnknown_0831BCEF[gBattleStruct->field_79]; if (gBattleStruct->field_7C > 20) gBattleStruct->field_7C = 20; - gBattleStruct->field_7B +=gUnknown_0831BCF3[gBattleStruct->field_79]; + gBattleStruct->field_7B +=sUnknown_0831BCF3[gBattleStruct->field_79]; if (gBattleStruct->field_7B > 20) gBattleStruct->field_7B = 20; @@ -5509,7 +5583,7 @@ void HandleAction_GoNear(void) gCurrentActionFuncId = ACTION_RUN_BATTLESCRIPT; } -void HandleAction_SafriZoneRun(void) +static void HandleAction_SafriZoneRun(void) { gBankAttacker = gBanksByTurnOrder[gCurrentTurnActionNumber]; PlaySE(SE_NIGERU); @@ -5517,7 +5591,7 @@ void HandleAction_SafriZoneRun(void) gBattleOutcome = BATTLE_RAN; } -void HandleAction_Action9(void) +static void HandleAction_Action9(void) { gBankAttacker = gBanksByTurnOrder[gCurrentTurnActionNumber]; gBattle_BG0_X = 0; @@ -5530,7 +5604,7 @@ void HandleAction_Action9(void) gActionsByTurnOrder[1] = ACTION_FINISHED; } -void HandleAction_Action11(void) +static void HandleAction_Action11(void) { if (!sub_8041728()) { @@ -5539,7 +5613,7 @@ void HandleAction_Action11(void) } } -void HandleAction_NothingIsFainted(void) +static void HandleAction_NothingIsFainted(void) { gCurrentTurnActionNumber++; gCurrentActionFuncId = gActionsByTurnOrder[gCurrentTurnActionNumber]; @@ -5550,7 +5624,7 @@ void HandleAction_NothingIsFainted(void) | HITMARKER_x8000000 | HITMARKER_x4000000); } -void HandleAction_ActionFinished(void) +static void HandleAction_ActionFinished(void) { *(gBattleStruct->field_5C + gBanksByTurnOrder[gCurrentTurnActionNumber]) = 6; gCurrentTurnActionNumber++; @@ -5577,4 +5651,3 @@ void HandleAction_ActionFinished(void) gBattleScripting.field_16 = 0; gBattleResources->battleScriptsStack->size = 0; } - diff --git a/src/battle_util.c b/src/battle_util.c index c5a85dd2b..c6762dd99 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -59,7 +59,6 @@ extern u8 gUnknown_020241E9; extern u8 gSentPokesToOpponent[2]; extern const struct BattleMove gBattleMoves[]; -extern const u16 gSoundMovesTable[]; // scripts extern const u8 gUnknown_082DAE2A[]; @@ -172,17 +171,15 @@ extern const u8 gUnknown_082DB6A5[]; //disobedient, uses a random move extern const u8 gUnknown_082DB6D9[]; //disobedient, went to sleep extern const u8 gUnknown_082DB6F0[]; //disobedient, hits itself -// strings -extern const u8 gStatusConditionString_PoisonJpn[]; -extern const u8 gStatusConditionString_SleepJpn[]; -extern const u8 gStatusConditionString_ParalysisJpn[]; -extern const u8 gStatusConditionString_BurnJpn[]; -extern const u8 gStatusConditionString_IceJpn[]; -extern const u8 gStatusConditionString_ConfusionJpn[]; -extern const u8 gStatusConditionString_LoveJpn[]; - extern u8 weather_get_current(void); +// rom const data +static const u16 sSoundMovesTable[] = +{ + MOVE_GROWL, MOVE_ROAR, MOVE_SING, MOVE_SUPERSONIC, MOVE_SCREECH, MOVE_SNORE, + MOVE_UPROAR, MOVE_METAL_SOUND, MOVE_GRASS_WHISTLE, MOVE_HYPER_VOICE, 0xFFFF +}; + u8 GetBattleBank(u8 caseId) { u8 ret = 0; @@ -2109,12 +2106,12 @@ u8 AbilityBattleEffects(u8 caseID, u8 bank, u8 ability, u8 special, u16 moveArg) //_08042EF8 if (gLastUsedAbility == ABILITY_SOUNDPROOF) { - for (i = 0; gSoundMovesTable[i] != 0xFFFF; i++) + for (i = 0; sSoundMovesTable[i] != 0xFFFF; i++) { - if (gSoundMovesTable[i] == move) + if (sSoundMovesTable[i] == move) break; } - if (gSoundMovesTable[i] != 0xFFFF) + if (sSoundMovesTable[i] != 0xFFFF) { if (gBattleMons[gBankAttacker].status2 & STATUS2_MULTIPLETURNS) gHitMarker |= HITMARKER_NO_PPDEDUCT; @@ -3415,7 +3412,7 @@ _08042EF8:\n\ bl _0804441E\n\ _08042F02:\n\ movs r4, 0\n\ - ldr r0, =gSoundMovesTable\n\ + ldr r0, =sSoundMovesTable\n\ ldrh r2, [r0]\n\ ldr r3, =0x0000ffff\n\ adds r1, r0, 0\n\ From d0dfc758fc6684e765736c7aad7190328d3e145c Mon Sep 17 00:00:00 2001 From: ProjectRevoTPP Date: Fri, 6 Oct 2017 18:33:35 -0400 Subject: [PATCH 34/42] decompile save_failed_screen.c --- asm/save_failed_screen.s | 707 ----------------------------------- include/gba/flash_internal.h | 1 + include/save.h | 2 +- ld_script.txt | 2 +- src/save_failed_screen.c | 332 ++++++++++++++++ 5 files changed, 335 insertions(+), 709 deletions(-) delete mode 100644 asm/save_failed_screen.s create mode 100755 src/save_failed_screen.c diff --git a/asm/save_failed_screen.s b/asm/save_failed_screen.s deleted file mode 100644 index 182ff8954..000000000 --- a/asm/save_failed_screen.s +++ /dev/null @@ -1,707 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .syntax unified - - .text - - thumb_func_start sub_8178F44 -sub_8178F44: @ 8178F44 - push {r4,r5,lr} - sub sp, 0x18 - adds r5, r0, 0 - adds r4, r1, 0 - adds r3, r2, 0 - lsls r3, 24 - add r0, sp, 0x14 - movs r2, 0 - strb r2, [r0] - adds r1, r0, 0 - movs r0, 0xF - strb r0, [r1, 0x1] - movs r0, 0x3 - strb r0, [r1, 0x2] - ldr r0, =gUnknown_0203BD0E - ldrb r0, [r0] - lsls r4, 27 - lsrs r4, 24 - lsrs r3, 21 - adds r3, 0x1 - lsls r3, 24 - lsrs r3, 24 - str r2, [sp] - str r2, [sp, 0x4] - str r1, [sp, 0x8] - str r2, [sp, 0xC] - str r5, [sp, 0x10] - movs r1, 0x1 - adds r2, r4, 0 - bl AddTextPrinterParametrized2 - add sp, 0x18 - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8178F44 - - thumb_func_start DoSaveFailedScreen -DoSaveFailedScreen: @ 8178F90 - push {r4,lr} - adds r4, r0, 0 - lsls r4, 24 - lsrs r4, 24 - ldr r0, =sub_8178FDC - bl SetMainCallback2 - ldr r0, =gUnknown_0203BCFC - strh r4, [r0] - ldr r1, =gUnknown_0203BCFE - movs r2, 0 - movs r0, 0 - strh r0, [r1] - strh r0, [r1, 0x2] - ldr r0, =gUnknown_0203BD0E - strb r2, [r0] - strb r2, [r0, 0x1] - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end DoSaveFailedScreen - - thumb_func_start sub_8178FC8 -sub_8178FC8: @ 8178FC8 - push {lr} - bl LoadOam - bl ProcessSpriteCopyRequests - bl TransferPlttBuffer - pop {r0} - bx r0 - thumb_func_end sub_8178FC8 - - thumb_func_start sub_8178FDC -sub_8178FDC: @ 8178FDC - push {r4-r7,lr} - mov r7, r8 - push {r7} - sub sp, 0xC - ldr r0, =gMain - movs r1, 0x87 - lsls r1, 3 - adds r7, r0, r1 - ldrb r0, [r7] - cmp r0, 0 - beq _08178FF8 - cmp r0, 0x1 - bne _08178FF8 - b _0817925C -_08178FF8: - movs r0, 0 - bl SetVBlankCallback - movs r0, 0 - movs r1, 0 - bl SetGpuReg - movs r0, 0xE - movs r1, 0 - bl SetGpuReg - movs r0, 0xC - movs r1, 0 - bl SetGpuReg - movs r0, 0xA - movs r1, 0 - bl SetGpuReg - movs r0, 0x8 - movs r1, 0 - bl SetGpuReg - movs r0, 0x1C - movs r1, 0 - bl SetGpuReg - movs r0, 0x1E - movs r1, 0 - bl SetGpuReg - movs r0, 0x18 - movs r1, 0 - bl SetGpuReg - movs r0, 0x1A - movs r1, 0 - bl SetGpuReg - movs r0, 0x14 - movs r1, 0 - bl SetGpuReg - movs r0, 0x16 - movs r1, 0 - bl SetGpuReg - movs r0, 0x10 - movs r1, 0 - bl SetGpuReg - movs r0, 0x12 - movs r1, 0 - bl SetGpuReg - add r1, sp, 0x4 - movs r0, 0 - strh r0, [r1] - ldr r2, =0x040000d4 - str r1, [r2] - movs r1, 0xC0 - lsls r1, 19 - str r1, [r2, 0x4] - ldr r0, =0x8100c000 - str r0, [r2, 0x8] - ldr r0, [r2, 0x8] - movs r3, 0 - mov r8, r3 - str r3, [sp, 0x8] - add r4, sp, 0x8 - str r4, [r2] - movs r0, 0xE0 - lsls r0, 19 - str r0, [r2, 0x4] - ldr r0, =0x85000100 - str r0, [r2, 0x8] - ldr r0, [r2, 0x8] - add r0, sp, 0x4 - mov r3, r8 - strh r3, [r0] - str r0, [r2] - movs r0, 0xA0 - lsls r0, 19 - str r0, [r2, 0x4] - ldr r0, =0x81000200 - str r0, [r2, 0x8] - ldr r0, [r2, 0x8] - ldr r0, =gUnknown_085B0E04 - bl LZ77UnCompVram - ldr r0, =gUnknown_085B0A80 - ldr r1, =0x06007000 - bl LZ77UnCompVram - ldr r0, =gUnknown_085B0C0C - ldr r1, =0x06007800 - bl LZ77UnCompVram - ldr r0, =gUnknown_085EFDE4 - ldr r1, =0x06010020 - bl LZ77UnCompVram - movs r0, 0 - bl ResetBgsAndClearDma3BusyFlags - ldr r1, =gUnknown_085EFD88 - movs r0, 0 - movs r2, 0x3 - bl InitBgsFromTemplates - ldr r5, =0x0201e000 - movs r0, 0 - adds r1, r5, 0 - bl SetBgTilemapBuffer - mov r0, r8 - str r0, [sp, 0x8] - ldr r2, =0x05000200 - adds r0, r4, 0 - adds r1, r5, 0 - bl CpuSet - ldr r1, =gUnknown_0850E87C - movs r2, 0x90 - lsls r2, 1 - movs r6, 0x85 - lsls r6, 2 - movs r0, 0 - adds r3, r6, 0 - bl LoadBgTiles - ldr r0, =gUnknown_085EFD94 - bl InitWindows - ldr r0, =gUnknown_085EFD9C - bl AddWindowWithoutTileMap - ldr r4, =gUnknown_0203BD0E - strb r0, [r4] - ldrb r0, [r4] - movs r1, 0x80 - lsls r1, 4 - adds r2, r5, r1 - movs r1, 0x7 - bl SetWindowAttribute - ldr r0, =gUnknown_085EFDA4 - bl AddWindowWithoutTileMap - strb r0, [r4, 0x1] - ldrb r0, [r4, 0x1] - movs r3, 0xE8 - lsls r3, 5 - adds r5, r3 - movs r1, 0x7 - adds r2, r5, 0 - bl SetWindowAttribute - bl DeactivateAllTextPrinters - bl ResetSpriteData - bl ResetTasks - bl ResetPaletteFade - ldr r0, =gUnknown_085B0A00 - movs r1, 0 - movs r2, 0x40 - bl LoadPalette - ldr r0, =gUnknown_085EFDC4 - movs r1, 0x80 - lsls r1, 1 - movs r2, 0x20 - bl LoadPalette - ldr r0, =gUnknown_0850FEFC - movs r1, 0xE0 - movs r2, 0x20 - bl LoadPalette - ldr r0, =gUnknown_0860F074 - movs r1, 0xF0 - movs r2, 0x20 - bl LoadPalette - ldrb r0, [r4] - movs r1, 0 - adds r2, r6, 0 - movs r3, 0xE - bl SetWindowBorderStyle - ldrb r0, [r4, 0x1] - movs r1, 0 - adds r2, r6, 0 - movs r3, 0xE - bl SetWindowBorderStyle - ldrb r0, [r4, 0x1] - movs r1, 0x11 - bl FillWindowPixelBuffer - ldrb r0, [r4] - movs r1, 0x11 - bl FillWindowPixelBuffer - ldrb r0, [r4, 0x1] - movs r1, 0x2 - bl CopyWindowToVram - ldrb r0, [r4] - movs r1, 0x1 - bl CopyWindowToVram - ldr r0, =gText_SaveFailedCheckingBackup - movs r1, 0x1 - movs r2, 0 - bl sub_8178F44 - movs r0, 0x1 - negs r0, r0 - mov r1, r8 - str r1, [sp] - movs r1, 0 - movs r2, 0x10 - movs r3, 0 - bl BeginNormalPaletteFade - movs r0, 0x1 - bl EnableInterrupts - ldr r0, =sub_8178FC8 - bl SetVBlankCallback - movs r1, 0x82 - lsls r1, 5 - movs r0, 0 - bl SetGpuReg - movs r0, 0 - bl ShowBg - movs r0, 0x2 - bl ShowBg - movs r0, 0x3 - bl ShowBg - ldrb r0, [r7] - adds r0, 0x1 - strb r0, [r7] - b _08179272 - .pool -_0817925C: - bl UpdatePaletteFade - lsls r0, 24 - cmp r0, 0 - bne _08179272 - ldr r0, =sub_8179288 - bl SetMainCallback2 - ldr r0, =sub_8179454 - bl SetVBlankCallback -_08179272: - add sp, 0xC - pop {r3} - mov r8, r3 - pop {r4-r7} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8178FDC - - thumb_func_start sub_8179288 -sub_8179288: @ 8179288 - push {r4-r6,lr} - movs r5, 0 - ldr r0, =gUnknown_0203BCFE - movs r1, 0x1 - strh r1, [r0] - ldr r1, =gDamagedSaveSectors - ldr r0, [r1] - cmp r0, 0 - beq _081792EC - adds r6, r1, 0 -_0817929C: - ldr r0, [r6] - bl sub_81795AC - lsls r0, 24 - cmp r0, 0 - bne _08179348 - ldr r4, =gUnknown_0203BD0E - ldrb r0, [r4] - movs r1, 0x11 - bl FillWindowPixelBuffer - ldr r0, =gText_CheckCompleted - movs r1, 0x1 - movs r2, 0 - bl sub_8178F44 - ldr r0, =gUnknown_0203BCFC - ldrb r0, [r0] - bl HandleSavingData - ldr r0, [r6] - cmp r0, 0 - beq _081792DC - ldrb r0, [r4] - movs r1, 0x11 - bl FillWindowPixelBuffer - ldr r0, =gText_SaveFailedCheckingBackup - movs r1, 0x1 - movs r2, 0 - bl sub_8178F44 -_081792DC: - adds r0, r5, 0x1 - lsls r0, 24 - lsrs r5, r0, 24 - ldr r0, [r6] - cmp r0, 0 - beq _081792EC - cmp r5, 0x2 - bls _0817929C -_081792EC: - cmp r5, 0x3 - bne _0817931C - ldr r0, =gUnknown_0203BD0E - ldrb r0, [r0] - movs r1, 0x11 - bl FillWindowPixelBuffer - ldr r0, =gText_BackupMemoryDamaged - b _08179330 - .pool -_0817931C: - ldr r0, =gUnknown_0203BD0E - ldrb r0, [r0] - movs r1, 0x11 - bl FillWindowPixelBuffer - ldr r0, =gGameContinueCallback - ldr r0, [r0] - cmp r0, 0 - bne _08179370 - ldr r0, =gText_SaveCompleteGameCannotContinue -_08179330: - movs r1, 0x1 - movs r2, 0 - bl sub_8178F44 - b _0817937A - .pool -_08179348: - ldr r0, =gUnknown_0203BD0E - ldrb r0, [r0] - movs r1, 0x11 - bl FillWindowPixelBuffer - ldr r0, =gText_BackupMemoryDamaged - movs r1, 0x1 - movs r2, 0 - bl sub_8178F44 - ldr r0, =sub_8179390 - bl SetMainCallback2 - b _08179380 - .pool -_08179370: - ldr r0, =gText_SaveCompletePressA - movs r1, 0x1 - movs r2, 0 - bl sub_8178F44 -_0817937A: - ldr r0, =sub_81793E0 - bl SetMainCallback2 -_08179380: - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8179288 - - thumb_func_start sub_8179390 -sub_8179390: @ 8179390 - push {lr} - ldr r1, =gUnknown_0203BCFE - movs r0, 0 - strh r0, [r1] - ldr r0, =gMain - ldrh r1, [r0, 0x2E] - movs r0, 0x1 - ands r0, r1 - cmp r0, 0 - beq _081793C4 - ldr r0, =gUnknown_0203BD0E - ldrb r0, [r0] - movs r1, 0x11 - bl FillWindowPixelBuffer - ldr r0, =gText_GamePlayCannotBeContinued - movs r1, 0x1 - movs r2, 0 - bl sub_8178F44 - ldr r0, =sub_8178FC8 - bl SetVBlankCallback - ldr r0, =sub_81793E0 - bl SetMainCallback2 -_081793C4: - pop {r0} - bx r0 - .pool - thumb_func_end sub_8179390 - - thumb_func_start sub_81793E0 -sub_81793E0: @ 81793E0 - push {lr} - sub sp, 0x4 - ldr r0, =gUnknown_0203BCFE - movs r2, 0 - strh r2, [r0] - ldr r0, =gMain - ldrh r1, [r0, 0x2E] - movs r0, 0x1 - ands r0, r1 - cmp r0, 0 - beq _08179410 - movs r0, 0x1 - negs r0, r0 - str r2, [sp] - movs r1, 0 - movs r3, 0x10 - bl BeginNormalPaletteFade - ldr r0, =sub_8178FC8 - bl SetVBlankCallback - ldr r0, =sub_8179428 - bl SetMainCallback2 -_08179410: - add sp, 0x4 - pop {r0} - bx r0 - .pool - thumb_func_end sub_81793E0 - - thumb_func_start sub_8179428 -sub_8179428: @ 8179428 - push {r4,r5,lr} - bl UpdatePaletteFade - lsls r0, 24 - lsrs r4, r0, 24 - cmp r4, 0 - bne _0817944E - ldr r5, =gGameContinueCallback - ldr r0, [r5] - cmp r0, 0 - bne _08179448 - bl DoSoftReset - b _0817944E - .pool -_08179448: - bl SetMainCallback2 - str r4, [r5] -_0817944E: - pop {r4,r5} - pop {r0} - bx r0 - thumb_func_end sub_8179428 - - thumb_func_start sub_8179454 -sub_8179454: @ 8179454 - push {r4,r5,lr} - ldr r5, =gMain - ldr r0, [r5, 0x24] - lsrs r4, r0, 3 - movs r0, 0x7 - ands r4, r0 - ldr r0, =gUnknown_085EFD80 - ldr r1, [r0, 0x4] - ldr r0, [r0] - str r0, [r5, 0x38] - str r1, [r5, 0x3C] - ldrh r1, [r5, 0x3A] - ldr r0, =0xfffffe00 - ands r0, r1 - movs r1, 0x70 - orrs r0, r1 - strh r0, [r5, 0x3A] - adds r1, r5, 0 - adds r1, 0x38 - movs r0, 0x48 - strb r0, [r1] - ldr r0, =gUnknown_0203BCFE - ldrh r0, [r0] - cmp r0, 0 - beq _081794DC - ldr r3, =gUnknown_085EFDAC - lsls r2, r4, 1 - adds r2, r4 - adds r0, r2, r3 - ldrb r4, [r0] - ldrh r1, [r5, 0x3C] - ldr r0, =0xfffffc00 - ands r0, r1 - orrs r0, r4 - strh r0, [r5, 0x3C] - adds r0, r3, 0x2 - adds r0, r2, r0 - ldrb r1, [r0] - lsls r1, 4 - adds r3, 0x1 - adds r2, r3 - ldrb r0, [r2] - lsls r0, 3 - orrs r1, r0 - adds r3, r5, 0 - adds r3, 0x3B - movs r0, 0x1F - ands r1, r0 - lsls r1, 1 - ldrb r2, [r3] - movs r0, 0x3F - negs r0, r0 - ands r0, r2 - orrs r0, r1 - strb r0, [r3] - b _081794E8 - .pool -_081794DC: - ldrh r0, [r5, 0x3C] - ldr r1, =0xfffffc00 - ands r1, r0 - movs r0, 0x1 - orrs r1, r0 - strh r1, [r5, 0x3C] -_081794E8: - ldr r0, =gUnknown_030022F8 - movs r1, 0xE0 - lsls r1, 19 - movs r2, 0x1 - bl CpuFastSet - ldr r1, =gUnknown_0203BCFE - ldrh r0, [r1, 0x2] - cmp r0, 0 - beq _08179500 - subs r0, 0x1 - strh r0, [r1, 0x2] -_08179500: - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8179454 - - thumb_func_start sub_8179514 -sub_8179514: @ 8179514 - push {r4,lr} - lsls r0, 16 - lsrs r0, 16 - ldr r4, =gSaveDataBuffer - movs r3, 0x80 - lsls r3, 5 - movs r1, 0 - adds r2, r4, 0 - bl ReadFlash - movs r1, 0 - ldr r2, =0x000003ff -_0817952C: - ldr r0, [r4] - cmp r0, 0 - beq _08179540 - movs r0, 0x1 - b _0817954E - .pool -_08179540: - adds r0, r1, 0x1 - lsls r0, 16 - lsrs r1, r0, 16 - adds r4, 0x4 - cmp r1, r2 - bls _0817952C - movs r0, 0 -_0817954E: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_8179514 - - thumb_func_start sub_8179554 -sub_8179554: @ 8179554 - push {r4-r7,lr} - mov r7, r8 - push {r7} - lsls r0, 16 - lsrs r6, r0, 16 - movs r0, 0 - ldr r1, =0x00000fff - mov r8, r1 - ldr r7, =ProgramFlashByte -_08179566: - movs r4, 0 - adds r5, r0, 0x1 -_0817956A: - ldr r3, [r7] - adds r0, r6, 0 - adds r1, r4, 0 - movs r2, 0 - bl _call_via_r3 - adds r0, r4, 0x1 - lsls r0, 16 - lsrs r4, r0, 16 - cmp r4, r8 - bls _0817956A - adds r0, r6, 0 - bl sub_8179514 - lsls r0, 24 - lsrs r1, r0, 24 - lsls r0, r5, 16 - lsrs r0, 16 - cmp r1, 0 - beq _08179596 - cmp r0, 0x81 - bls _08179566 -_08179596: - adds r0, r1, 0 - pop {r3} - mov r8, r3 - pop {r4-r7} - pop {r1} - bx r1 - .pool - thumb_func_end sub_8179554 - - thumb_func_start sub_81795AC -sub_81795AC: @ 81795AC - push {r4-r6,lr} - adds r5, r0, 0 - movs r6, 0 -_081795B2: - movs r4, 0x1 - lsls r4, r6 - adds r0, r5, 0 - ands r0, r4 - cmp r0, 0 - beq _081795CC - adds r0, r6, 0 - bl sub_8179554 - lsls r0, 24 - cmp r0, 0 - bne _081795CC - bics r5, r4 -_081795CC: - adds r0, r6, 0x1 - lsls r0, 16 - lsrs r6, r0, 16 - cmp r6, 0x1F - bls _081795B2 - cmp r5, 0 - beq _081795DE - movs r0, 0x1 - b _081795E0 -_081795DE: - movs r0, 0 -_081795E0: - pop {r4-r6} - pop {r1} - bx r1 - thumb_func_end sub_81795AC - - .align 2, 0 @ Don't pad with nop. diff --git a/include/gba/flash_internal.h b/include/gba/flash_internal.h index 6156b6c14..ba84546aa 100644 --- a/include/gba/flash_internal.h +++ b/include/gba/flash_internal.h @@ -65,6 +65,7 @@ u16 ReadFlashId(void); void StartFlashTimer(u8 phase); void SetReadFlash1(u16 *dest); void StopFlashTimer(void); +void ReadFlash(u16 sectorNum, u32 offset, u8 *dest, u32 size); u16 WaitForFlashWrite_Common(u8 phase, u8 *addr, u8 lastData); diff --git a/include/save.h b/include/save.h index e98233c67..6c1238cd2 100644 --- a/include/save.h +++ b/include/save.h @@ -76,7 +76,7 @@ u8 GetSaveValidStatus(const struct SaveSectionLocation *location); //u8 sub_8125B88(u8 a1, u8 *data, u16 size); u8 DoReadFlashWholeSection(u8, struct SaveSection *); u16 CalculateChecksum(void *, u16); -//u8 HandleSavingData(u8 saveType); +u8 HandleSavingData(u8 saveType); //u8 TrySavingData(u8 saveType); //u8 sub_8125D80(void); //bool8 sub_8125DA8(void); diff --git a/ld_script.txt b/ld_script.txt index 3170e1919..890e58a9e 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -221,7 +221,7 @@ SECTIONS { asm/diploma.o(.text); asm/berry_tag_screen.o(.text); asm/mystery_event_menu.o(.text); - asm/save_failed_screen.o(.text); + src/save_failed_screen.o(.text); asm/braille_puzzles.o(.text); asm/pokeblock_feed.o(.text); asm/clear_save_data_screen.o(.text); diff --git a/src/save_failed_screen.c b/src/save_failed_screen.c new file mode 100755 index 000000000..546342b9d --- /dev/null +++ b/src/save_failed_screen.c @@ -0,0 +1,332 @@ +#include "global.h" +#include "text.h" +#include "main.h" +#include "palette.h" +#include "gpu_regs.h" +#include "bg.h" +#include "task.h" +#include "window.h" +#include "menu.h" +#include "save.h" +#include "gba/flash_internal.h" + +#define MSG_WIN_TOP 12 +#define CLOCK_WIN_TOP (MSG_WIN_TOP - 4) + +extern void AddTextPrinterParametrized2(u8 windowId, u8 fontId, u8 x, u8 y, u8 letterSpacing, u8 lineSpacing, struct TextColor *color, u8 speed, u8 *str); + +extern void (*gGameContinueCallback)(void); + +extern u32 gDamagedSaveSectors; + +extern u16 gUnknown_0203BCFC; +extern const u8 gUnknown_085B0E04[]; +extern const u8 gUnknown_085B0A80[]; +extern const u8 gUnknown_085B0C0C[]; +extern const u8 gUnknown_085EFDE4[]; + +extern const struct OamData gUnknown_085EFD80; // sClockOamData +extern const u8 gUnknown_085EFDAC[8][3]; // sClockFrames + +extern const struct BgTemplate gUnknown_085EFD88[]; +extern const struct WindowTemplate gUnknown_085EFD94[]; +extern struct WindowTemplate gUnknown_085EFD9C; +extern struct WindowTemplate gUnknown_085EFDA4; +extern struct SaveSection gSaveDataBuffer; +extern const u32 gUnknown_0850E87C[]; + +extern const u16 gUnknown_085B0A00[]; +extern const u16 gUnknown_085EFDC4[]; +extern const u16 gUnknown_0850FEFC[]; +extern const u16 gUnknown_0860F074[]; + +extern u8 gText_SaveFailedCheckingBackup[]; +extern u8 gText_BackupMemoryDamaged[]; +extern u8 gText_CheckCompleted[]; +extern u8 gText_SaveCompleteGameCannotContinue[]; +extern u8 gText_SaveCompletePressA[]; +extern u8 gText_GamePlayCannotBeContinued[]; + +extern void sub_8179454(void); + +extern u8 gDecompressionBuffer[]; + +struct Unk203BCFC +{ + u16 unk0; + u16 unk2; +}; + +extern struct Unk203BCFC gUnknown_0203BCFE; + +struct Unk203BD0E +{ + u8 unk0; + u8 unk1; +}; + +extern struct Unk203BD0E gUnknown_0203BD0E; + +void sub_8178FDC(void); +void sub_8179288(void); +void sub_8179390(void); +void sub_81793E0(void); +bool8 sub_81795AC(u32); +void sub_8179428(void); +bool8 sub_8179514(u16 sector); + +void sub_8178F44(u8 *text, u8 var1, u8 var2) +{ + struct TextColor color; + + color.fgColor = 0; + color.bgColor = 15; + color.shadowColor = 3; + AddTextPrinterParametrized2(gUnknown_0203BD0E.unk0, 1, var1 * 8, var2 * 8 + 1, 0, 0, &color, 0, text); +} + +void DoSaveFailedScreen(u8 saveType) +{ + SetMainCallback2(sub_8178FDC); + gUnknown_0203BCFC = saveType; + gUnknown_0203BCFE.unk0 = 0; + gUnknown_0203BCFE.unk2 = 0; + gUnknown_0203BD0E.unk0 = 0; + gUnknown_0203BD0E.unk1 = 0; +} + +void sub_8178FC8(void) +{ + LoadOam(); + ProcessSpriteCopyRequests(); + TransferPlttBuffer(); +} + +void sub_8178FDC(void) +{ + switch(gMain.state) + { + case 0: + default: + SetVBlankCallback(NULL); + SetGpuReg(REG_OFFSET_DISPCNT, 0); + SetGpuReg(REG_OFFSET_BG3CNT, 0); + SetGpuReg(REG_OFFSET_BG2CNT, 0); + SetGpuReg(REG_OFFSET_BG1CNT, 0); + SetGpuReg(REG_OFFSET_BG0CNT, 0); + SetGpuReg(REG_OFFSET_BG3HOFS, 0); + SetGpuReg(REG_OFFSET_BG3VOFS, 0); + SetGpuReg(REG_OFFSET_BG2HOFS, 0); + SetGpuReg(REG_OFFSET_BG2VOFS, 0); + SetGpuReg(REG_OFFSET_BG1HOFS, 0); + SetGpuReg(REG_OFFSET_BG1VOFS, 0); + SetGpuReg(REG_OFFSET_BG0HOFS, 0); + SetGpuReg(REG_OFFSET_BG0VOFS, 0); + // how come this doesnt use the Dma manager? + DmaFill16(3, 0, VRAM, VRAM_SIZE); + DmaFill32(3, 0, OAM, OAM_SIZE); + DmaFill16(3, 0, PLTT, PLTT_SIZE); + LZ77UnCompVram(gUnknown_085B0E04, (void *)VRAM); + LZ77UnCompVram(gUnknown_085B0A80, (void *)(VRAM + 0x7000)); + LZ77UnCompVram(gUnknown_085B0C0C, (void *)(VRAM + 0x7800)); + LZ77UnCompVram(gUnknown_085EFDE4, (void *)(VRAM + 0x10020)); + ResetBgsAndClearDma3BusyFlags(0); + InitBgsFromTemplates(0, gUnknown_085EFD88, 3); + SetBgTilemapBuffer(0, (void *)&gDecompressionBuffer[0x2000]); + CpuFill32(0, &gDecompressionBuffer[0x2000], 0x800); + LoadBgTiles(0, gUnknown_0850E87C, 0x120, 0x214); + InitWindows(gUnknown_085EFD94); + // AddWindowWithoutTileMap returns a u16/integer, but the info is clobbered into a u8 here resulting in lost info. Bug? + gUnknown_0203BD0E.unk0 = AddWindowWithoutTileMap(&gUnknown_085EFD9C); + SetWindowAttribute(gUnknown_0203BD0E.unk0, 7, (u32)&gDecompressionBuffer[0x2800]); + gUnknown_0203BD0E.unk1 = AddWindowWithoutTileMap(&gUnknown_085EFDA4); + SetWindowAttribute(gUnknown_0203BD0E.unk1, 7, (u32)&gDecompressionBuffer[0x3D00]); + DeactivateAllTextPrinters(); + ResetSpriteData(); + ResetTasks(); + ResetPaletteFade(); + LoadPalette(gUnknown_085B0A00, 0, 0x40); + LoadPalette(gUnknown_085EFDC4, 0x100, 0x20); + LoadPalette(gUnknown_0850FEFC, 0xE0, 0x20); + LoadPalette(gUnknown_0860F074, 0xF0, 0x20); + SetWindowBorderStyle(gUnknown_0203BD0E.unk0, FALSE, 0x214, 0xE); + SetWindowBorderStyle(gUnknown_0203BD0E.unk1, FALSE, 0x214, 0xE); + FillWindowPixelBuffer(gUnknown_0203BD0E.unk1, 0x11); // backwards? + FillWindowPixelBuffer(gUnknown_0203BD0E.unk0, 0x11); + CopyWindowToVram(gUnknown_0203BD0E.unk1, 2); // again? + CopyWindowToVram(gUnknown_0203BD0E.unk0, 1); + sub_8178F44(gText_SaveFailedCheckingBackup, 1, 0); + BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, 0); + EnableInterrupts(1); + SetVBlankCallback(sub_8178FC8); + SetGpuReg(0, 0x1040); + ShowBg(0); + ShowBg(2); + ShowBg(3); + gMain.state++; + break; + case 1: + if(!UpdatePaletteFade()) + { + SetMainCallback2(sub_8179288); + SetVBlankCallback(sub_8179454); + } + break; + } +} + +void sub_8179288(void) +{ + u8 wipeTries = 0; + + gUnknown_0203BCFE.unk0 = TRUE; + + while (gDamagedSaveSectors != 0 && wipeTries < 3) + { + if (sub_81795AC(gDamagedSaveSectors) != FALSE) + { + FillWindowPixelBuffer(gUnknown_0203BD0E.unk0, 0x11); + sub_8178F44(gText_BackupMemoryDamaged, 1, 0); + SetMainCallback2(sub_8179390); + return; + } + + FillWindowPixelBuffer(gUnknown_0203BD0E.unk0, 0x11); + sub_8178F44(gText_CheckCompleted, 1, 0); + HandleSavingData(gUnknown_0203BCFC); + + if(gDamagedSaveSectors != 0) + { + FillWindowPixelBuffer(gUnknown_0203BD0E.unk0, 0x11); + sub_8178F44(gText_SaveFailedCheckingBackup, 1, 0); + } + + wipeTries++; + } + + if(wipeTries == 3) + { + FillWindowPixelBuffer(gUnknown_0203BD0E.unk0, 0x11); + sub_8178F44(gText_BackupMemoryDamaged, 1, 0); + } + else + { + FillWindowPixelBuffer(gUnknown_0203BD0E.unk0, 0x11); + + if(gGameContinueCallback == NULL) + sub_8178F44(gText_SaveCompleteGameCannotContinue, 1, 0); + else + sub_8178F44(gText_SaveCompletePressA, 1, 0); + } + + SetMainCallback2(sub_81793E0); +} + +void sub_8179390(void) +{ + gUnknown_0203BCFE.unk0 = FALSE; + + if(gMain.newKeys & A_BUTTON) + { + FillWindowPixelBuffer(gUnknown_0203BD0E.unk0, 0x11); + sub_8178F44(gText_GamePlayCannotBeContinued, 1, 0); + SetVBlankCallback(sub_8178FC8); + SetMainCallback2(sub_81793E0); + } +} + +void sub_81793E0(void) +{ + gUnknown_0203BCFE.unk0 = FALSE; + + if(gMain.newKeys & A_BUTTON) + { + BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, 0); + SetVBlankCallback(sub_8178FC8); + SetMainCallback2(sub_8179428); + } +} + +void sub_8179428(void) +{ + if(!UpdatePaletteFade()) + { + if(gGameContinueCallback == NULL) // no callback exists, so do a soft reset. + { + DoSoftReset(); + } + else + { + SetMainCallback2((MainCallback)gGameContinueCallback); + gGameContinueCallback = NULL; + } + } +} + +void sub_8179454(void) +{ + unsigned int n = (gMain.vblankCounter2 >> 3) & 7; + + gMain.oamBuffer[0] = gUnknown_085EFD80; + gMain.oamBuffer[0].x = 112; + gMain.oamBuffer[0].y = (CLOCK_WIN_TOP + 1) * 8;; + + if(gUnknown_0203BCFE.unk0 != FALSE) + { + gMain.oamBuffer[0].tileNum = gUnknown_085EFDAC[n][0]; + gMain.oamBuffer[0].matrixNum = (gUnknown_085EFDAC[n][2] << 4) | (gUnknown_085EFDAC[n][1] << 3); + } + else + { + gMain.oamBuffer[0].tileNum = 1; + } + + CpuFastCopy(gMain.oamBuffer, (void *)OAM, 4); + + if(gUnknown_0203BCFE.unk2) + gUnknown_0203BCFE.unk2--; +} + +bool8 sub_8179514(u16 sector) +{ + u32 *ptr = (u32 *)&gSaveDataBuffer; + u16 i; + + ReadFlash(sector, 0, (u8 *)ptr, 4096); + + for (i = 0; i < 0x400; i++, ptr++) + if (*ptr) + return TRUE; + + return FALSE; +} + +bool8 sub_8179554(u16 sector) +{ + u16 i, j; + bool8 failed = TRUE; + + for (i = 0; failed && i < 130; i++) + { + for (j = 0; j < 0x1000; j++) + ProgramFlashByte(sector, j, 0); + + failed = sub_8179514(sector); + } + + return failed; +} + +bool8 sub_81795AC(u32 sectorBits) +{ + u16 i; + + for (i = 0; i < 0x20; i++) + if ((sectorBits & (1 << i)) && !sub_8179554(i)) + sectorBits &= ~(1 << i); + + if (sectorBits == 0) + return FALSE; + else + return TRUE; +} From f383cb8354223de3d8a630800ebeffc470737960 Mon Sep 17 00:00:00 2001 From: ProjectRevoTPP Date: Fri, 6 Oct 2017 19:48:18 -0400 Subject: [PATCH 35/42] update labels --- asm/credits.s | 6 +- asm/starter_choose.s | 8 +- data/data4.s | 13 +-- data/save_failed_screen.s | 8 +- src/save_failed_screen.c | 210 +++++++++++++++++++------------------- sym_ewram.txt | 6 +- 6 files changed, 124 insertions(+), 127 deletions(-) diff --git a/asm/credits.s b/asm/credits.s index 0a568a3ae..0b2da16b8 100644 --- a/asm/credits.s +++ b/asm/credits.s @@ -491,14 +491,14 @@ _08175906: ldr r1, =gReservedSpritePaletteCount movs r0, 0x8 strb r0, [r1] - ldr r0, =gUnknown_085B0E04 + ldr r0, =gBirchHelpGfx movs r1, 0xC0 lsls r1, 19 bl LZ77UnCompVram - ldr r0, =gUnknown_085B0C0C + ldr r0, =gBirchGrassTilemap ldr r1, =0x06003800 bl LZ77UnCompVram - ldr r0, =gUnknown_085B0A02 + ldr r0, =gBirchBagGrassPal + 0x2 movs r1, 0x1 movs r2, 0x3E bl LoadPalette diff --git a/asm/starter_choose.s b/asm/starter_choose.s index 7e998c45f..da42959ea 100644 --- a/asm/starter_choose.s +++ b/asm/starter_choose.s @@ -122,12 +122,12 @@ set_256color_bg_bg0: @ 8133F0C ldr r0, =0x81000200 str r0, [r2, 0x8] ldr r0, [r2, 0x8] - ldr r0, =gUnknown_085B0E04 + ldr r0, =gBirchHelpGfx bl LZ77UnCompVram - ldr r0, =gUnknown_085B0A80 + ldr r0, =gBirchBagTilemap ldr r1, =0x06003000 bl LZ77UnCompVram - ldr r0, =gUnknown_085B0C0C + ldr r0, =gBirchGrassTilemap ldr r1, =0x06003800 bl LZ77UnCompVram movs r0, 0 @@ -155,7 +155,7 @@ set_256color_bg_bg0: @ 8133F0C movs r1, 0xE0 movs r2, 0x20 bl LoadPalette - ldr r0, =gUnknown_085B0A00 + ldr r0, =gBirchBagGrassPal movs r1, 0 movs r2, 0x40 bl LoadPalette diff --git a/data/data4.s b/data/data4.s index 202b1ffe7..d99336e87 100644 --- a/data/data4.s +++ b/data/data4.s @@ -14,19 +14,16 @@ gUnknown_085B09F4:: @ 85B09F4 gUnknown_085B09F8:: @ 85B09F8 .incbin "baserom.gba", 0x5b09f8, 0x8 -gUnknown_085B0A00:: @ 85B0A00 - .incbin "baserom.gba", 0x5b0a00, 0x2 +gBirchBagGrassPal:: @ 85B0A00 + .incbin "baserom.gba", 0x5b0a00, 0x80 -gUnknown_085B0A02:: @ 85B0A02 - .incbin "baserom.gba", 0x5b0a02, 0x7e - -gUnknown_085B0A80:: @ 85B0A80 +gBirchBagTilemap:: @ 85B0A80 .incbin "baserom.gba", 0x5b0a80, 0x18c -gUnknown_085B0C0C:: @ 85B0C0C +gBirchGrassTilemap:: @ 85B0C0C .incbin "baserom.gba", 0x5b0c0c, 0x1f8 -gUnknown_085B0E04:: @ 85B0E04 +gBirchHelpGfx:: @ 85B0E04 .incbin "baserom.gba", 0x5b0e04, 0xfc8 gUnknown_085B1DCC:: @ 85B1DCC diff --git a/data/save_failed_screen.s b/data/save_failed_screen.s index 446eee2d2..1b9fb7ed1 100644 --- a/data/save_failed_screen.s +++ b/data/save_failed_screen.s @@ -3,7 +3,7 @@ .section .rodata -gUnknown_085EFD80:: @ 85EFD80 +gClockOamData:: @ 85EFD80 .incbin "baserom.gba", 0x5efd80, 0x8 gUnknown_085EFD88:: @ 85EFD88 @@ -18,11 +18,11 @@ gUnknown_085EFD9C:: @ 85EFD9C gUnknown_085EFDA4:: @ 85EFDA4 .incbin "baserom.gba", 0x5efda4, 0x8 -gUnknown_085EFDAC:: @ 85EFDAC +gClockFrames:: @ 85EFDAC .incbin "baserom.gba", 0x5efdac, 0x18 -gUnknown_085EFDC4:: @ 85EFDC4 +gSaveFailedClockPal:: @ 85EFDC4 .incbin "baserom.gba", 0x5efdc4, 0x20 -gUnknown_085EFDE4:: @ 85EFDE4 +gSaveFailedClockGfx:: @ 85EFDE4 .incbin "baserom.gba", 0x5efde4, 0x90 diff --git a/src/save_failed_screen.c b/src/save_failed_screen.c index 546342b9d..666de5c95 100755 --- a/src/save_failed_screen.c +++ b/src/save_failed_screen.c @@ -19,14 +19,14 @@ extern void (*gGameContinueCallback)(void); extern u32 gDamagedSaveSectors; -extern u16 gUnknown_0203BCFC; -extern const u8 gUnknown_085B0E04[]; -extern const u8 gUnknown_085B0A80[]; -extern const u8 gUnknown_085B0C0C[]; -extern const u8 gUnknown_085EFDE4[]; +extern u16 gSaveFailedType; +extern const u8 gBirchHelpGfx[]; +extern const u8 gBirchBagTilemap[]; +extern const u8 gBirchGrassTilemap[]; +extern const u8 gSaveFailedClockGfx[]; -extern const struct OamData gUnknown_085EFD80; // sClockOamData -extern const u8 gUnknown_085EFDAC[8][3]; // sClockFrames +extern const struct OamData gClockOamData; // sClockOamData +extern const u8 gClockFrames[8][3]; // sClockFrames extern const struct BgTemplate gUnknown_085EFD88[]; extern const struct WindowTemplate gUnknown_085EFD94[]; @@ -35,8 +35,8 @@ extern struct WindowTemplate gUnknown_085EFDA4; extern struct SaveSection gSaveDataBuffer; extern const u32 gUnknown_0850E87C[]; -extern const u16 gUnknown_085B0A00[]; -extern const u16 gUnknown_085EFDC4[]; +extern const u16 gBirchBagGrassPal[]; +extern const u16 gSaveFailedClockPal[]; extern const u16 gUnknown_0850FEFC[]; extern const u16 gUnknown_0860F074[]; @@ -47,64 +47,64 @@ extern u8 gText_SaveCompleteGameCannotContinue[]; extern u8 gText_SaveCompletePressA[]; extern u8 gText_GamePlayCannotBeContinued[]; -extern void sub_8179454(void); - extern u8 gDecompressionBuffer[]; -struct Unk203BCFC +struct ClockInfo { - u16 unk0; - u16 unk2; + bool16 clockRunning; + u16 debugTimer; // appears to be unused; it's only set to 0 and never used within the game. perhaps it was a volatile-like timer expected to be modified by an external tool? }; -extern struct Unk203BCFC gUnknown_0203BCFE; +extern struct ClockInfo gSaveFailedClockInfo; -struct Unk203BD0E +struct WindowIds { - u8 unk0; - u8 unk1; + u8 textWindowId; + u8 clockWindowId; }; -extern struct Unk203BD0E gUnknown_0203BD0E; +extern struct WindowIds gSaveFailedWindowIds; -void sub_8178FDC(void); -void sub_8179288(void); -void sub_8179390(void); -void sub_81793E0(void); -bool8 sub_81795AC(u32); -void sub_8179428(void); -bool8 sub_8179514(u16 sector); +static void CB2_SaveFailedScreen(void); +static void CB2_WipeSave(void); +static void CB2_GameplayCannotBeContinued(void); +static void CB2_FadeAndReturnToTitleScreen(void); +static void CB2_ReturnToTitleScreen(void); +static void VBlankCB_UpdateClockGraphics(void); +static bool8 VerifySectorWipe(u16 sector); +static bool8 WipeSectors(u32); -void sub_8178F44(u8 *text, u8 var1, u8 var2) +// although this is a general text printer, it's only used in this file. +static void SaveFailedScreenTextPrint(u8 *text, u8 var1, u8 var2) { struct TextColor color; color.fgColor = 0; color.bgColor = 15; color.shadowColor = 3; - AddTextPrinterParametrized2(gUnknown_0203BD0E.unk0, 1, var1 * 8, var2 * 8 + 1, 0, 0, &color, 0, text); + AddTextPrinterParametrized2(gSaveFailedWindowIds.textWindowId, 1, var1 * 8, var2 * 8 + 1, 0, 0, &color, 0, text); } void DoSaveFailedScreen(u8 saveType) { - SetMainCallback2(sub_8178FDC); - gUnknown_0203BCFC = saveType; - gUnknown_0203BCFE.unk0 = 0; - gUnknown_0203BCFE.unk2 = 0; - gUnknown_0203BD0E.unk0 = 0; - gUnknown_0203BD0E.unk1 = 0; + SetMainCallback2(CB2_SaveFailedScreen); + gSaveFailedType = saveType; + gSaveFailedClockInfo.clockRunning = FALSE; + gSaveFailedClockInfo.debugTimer = 0; + gSaveFailedWindowIds.textWindowId = 0; + gSaveFailedWindowIds.clockWindowId = 0; } -void sub_8178FC8(void) +static void VBlankCB(void) { LoadOam(); ProcessSpriteCopyRequests(); TransferPlttBuffer(); } -void sub_8178FDC(void) +static void CB2_SaveFailedScreen(void) { - switch(gMain.state) + switch (gMain.state) { case 0: default: @@ -126,10 +126,10 @@ void sub_8178FDC(void) DmaFill16(3, 0, VRAM, VRAM_SIZE); DmaFill32(3, 0, OAM, OAM_SIZE); DmaFill16(3, 0, PLTT, PLTT_SIZE); - LZ77UnCompVram(gUnknown_085B0E04, (void *)VRAM); - LZ77UnCompVram(gUnknown_085B0A80, (void *)(VRAM + 0x7000)); - LZ77UnCompVram(gUnknown_085B0C0C, (void *)(VRAM + 0x7800)); - LZ77UnCompVram(gUnknown_085EFDE4, (void *)(VRAM + 0x10020)); + LZ77UnCompVram(gBirchHelpGfx, (void *)VRAM); + LZ77UnCompVram(gBirchBagTilemap, (void *)(VRAM + 0x7000)); + LZ77UnCompVram(gBirchGrassTilemap, (void *)(VRAM + 0x7800)); + LZ77UnCompVram(gSaveFailedClockGfx, (void *)(VRAM + 0x10020)); ResetBgsAndClearDma3BusyFlags(0); InitBgsFromTemplates(0, gUnknown_085EFD88, 3); SetBgTilemapBuffer(0, (void *)&gDecompressionBuffer[0x2000]); @@ -137,28 +137,28 @@ void sub_8178FDC(void) LoadBgTiles(0, gUnknown_0850E87C, 0x120, 0x214); InitWindows(gUnknown_085EFD94); // AddWindowWithoutTileMap returns a u16/integer, but the info is clobbered into a u8 here resulting in lost info. Bug? - gUnknown_0203BD0E.unk0 = AddWindowWithoutTileMap(&gUnknown_085EFD9C); - SetWindowAttribute(gUnknown_0203BD0E.unk0, 7, (u32)&gDecompressionBuffer[0x2800]); - gUnknown_0203BD0E.unk1 = AddWindowWithoutTileMap(&gUnknown_085EFDA4); - SetWindowAttribute(gUnknown_0203BD0E.unk1, 7, (u32)&gDecompressionBuffer[0x3D00]); + gSaveFailedWindowIds.textWindowId = AddWindowWithoutTileMap(&gUnknown_085EFD9C); + SetWindowAttribute(gSaveFailedWindowIds.textWindowId, 7, (u32)&gDecompressionBuffer[0x2800]); + gSaveFailedWindowIds.clockWindowId = AddWindowWithoutTileMap(&gUnknown_085EFDA4); + SetWindowAttribute(gSaveFailedWindowIds.clockWindowId, 7, (u32)&gDecompressionBuffer[0x3D00]); DeactivateAllTextPrinters(); ResetSpriteData(); ResetTasks(); ResetPaletteFade(); - LoadPalette(gUnknown_085B0A00, 0, 0x40); - LoadPalette(gUnknown_085EFDC4, 0x100, 0x20); + LoadPalette(gBirchBagGrassPal, 0, 0x40); + LoadPalette(gSaveFailedClockPal, 0x100, 0x20); LoadPalette(gUnknown_0850FEFC, 0xE0, 0x20); LoadPalette(gUnknown_0860F074, 0xF0, 0x20); - SetWindowBorderStyle(gUnknown_0203BD0E.unk0, FALSE, 0x214, 0xE); - SetWindowBorderStyle(gUnknown_0203BD0E.unk1, FALSE, 0x214, 0xE); - FillWindowPixelBuffer(gUnknown_0203BD0E.unk1, 0x11); // backwards? - FillWindowPixelBuffer(gUnknown_0203BD0E.unk0, 0x11); - CopyWindowToVram(gUnknown_0203BD0E.unk1, 2); // again? - CopyWindowToVram(gUnknown_0203BD0E.unk0, 1); - sub_8178F44(gText_SaveFailedCheckingBackup, 1, 0); + SetWindowBorderStyle(gSaveFailedWindowIds.textWindowId, FALSE, 0x214, 0xE); + SetWindowBorderStyle(gSaveFailedWindowIds.clockWindowId, FALSE, 0x214, 0xE); + FillWindowPixelBuffer(gSaveFailedWindowIds.clockWindowId, 0x11); // backwards? + FillWindowPixelBuffer(gSaveFailedWindowIds.textWindowId, 0x11); + CopyWindowToVram(gSaveFailedWindowIds.clockWindowId, 2); // again? + CopyWindowToVram(gSaveFailedWindowIds.textWindowId, 1); + SaveFailedScreenTextPrint(gText_SaveFailedCheckingBackup, 1, 0); BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, 0); EnableInterrupts(1); - SetVBlankCallback(sub_8178FC8); + SetVBlankCallback(VBlankCB); SetGpuReg(0, 0x1040); ShowBg(0); ShowBg(2); @@ -166,92 +166,92 @@ void sub_8178FDC(void) gMain.state++; break; case 1: - if(!UpdatePaletteFade()) + if (!UpdatePaletteFade()) { - SetMainCallback2(sub_8179288); - SetVBlankCallback(sub_8179454); + SetMainCallback2(CB2_WipeSave); + SetVBlankCallback(VBlankCB_UpdateClockGraphics); } break; } } -void sub_8179288(void) +static void CB2_WipeSave(void) { u8 wipeTries = 0; - gUnknown_0203BCFE.unk0 = TRUE; + gSaveFailedClockInfo.clockRunning = TRUE; while (gDamagedSaveSectors != 0 && wipeTries < 3) { - if (sub_81795AC(gDamagedSaveSectors) != FALSE) + if (WipeSectors(gDamagedSaveSectors) != FALSE) { - FillWindowPixelBuffer(gUnknown_0203BD0E.unk0, 0x11); - sub_8178F44(gText_BackupMemoryDamaged, 1, 0); - SetMainCallback2(sub_8179390); + FillWindowPixelBuffer(gSaveFailedWindowIds.textWindowId, 0x11); + SaveFailedScreenTextPrint(gText_BackupMemoryDamaged, 1, 0); + SetMainCallback2(CB2_GameplayCannotBeContinued); return; } - FillWindowPixelBuffer(gUnknown_0203BD0E.unk0, 0x11); - sub_8178F44(gText_CheckCompleted, 1, 0); - HandleSavingData(gUnknown_0203BCFC); + FillWindowPixelBuffer(gSaveFailedWindowIds.textWindowId, 0x11); + SaveFailedScreenTextPrint(gText_CheckCompleted, 1, 0); + HandleSavingData(gSaveFailedType); - if(gDamagedSaveSectors != 0) + if (gDamagedSaveSectors != 0) { - FillWindowPixelBuffer(gUnknown_0203BD0E.unk0, 0x11); - sub_8178F44(gText_SaveFailedCheckingBackup, 1, 0); + FillWindowPixelBuffer(gSaveFailedWindowIds.textWindowId, 0x11); + SaveFailedScreenTextPrint(gText_SaveFailedCheckingBackup, 1, 0); } wipeTries++; } - if(wipeTries == 3) + if (wipeTries == 3) { - FillWindowPixelBuffer(gUnknown_0203BD0E.unk0, 0x11); - sub_8178F44(gText_BackupMemoryDamaged, 1, 0); + FillWindowPixelBuffer(gSaveFailedWindowIds.textWindowId, 0x11); + SaveFailedScreenTextPrint(gText_BackupMemoryDamaged, 1, 0); } else { - FillWindowPixelBuffer(gUnknown_0203BD0E.unk0, 0x11); + FillWindowPixelBuffer(gSaveFailedWindowIds.textWindowId, 0x11); - if(gGameContinueCallback == NULL) - sub_8178F44(gText_SaveCompleteGameCannotContinue, 1, 0); + if (gGameContinueCallback == NULL) + SaveFailedScreenTextPrint(gText_SaveCompleteGameCannotContinue, 1, 0); else - sub_8178F44(gText_SaveCompletePressA, 1, 0); + SaveFailedScreenTextPrint(gText_SaveCompletePressA, 1, 0); } - SetMainCallback2(sub_81793E0); + SetMainCallback2(CB2_FadeAndReturnToTitleScreen); } -void sub_8179390(void) +static void CB2_GameplayCannotBeContinued(void) { - gUnknown_0203BCFE.unk0 = FALSE; + gSaveFailedClockInfo.clockRunning = FALSE; - if(gMain.newKeys & A_BUTTON) + if (gMain.newKeys & A_BUTTON) { - FillWindowPixelBuffer(gUnknown_0203BD0E.unk0, 0x11); - sub_8178F44(gText_GamePlayCannotBeContinued, 1, 0); - SetVBlankCallback(sub_8178FC8); - SetMainCallback2(sub_81793E0); + FillWindowPixelBuffer(gSaveFailedWindowIds.textWindowId, 0x11); + SaveFailedScreenTextPrint(gText_GamePlayCannotBeContinued, 1, 0); + SetVBlankCallback(VBlankCB); + SetMainCallback2(CB2_FadeAndReturnToTitleScreen); } } -void sub_81793E0(void) +static void CB2_FadeAndReturnToTitleScreen(void) { - gUnknown_0203BCFE.unk0 = FALSE; + gSaveFailedClockInfo.clockRunning = FALSE; - if(gMain.newKeys & A_BUTTON) + if (gMain.newKeys & A_BUTTON) { BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, 0); - SetVBlankCallback(sub_8178FC8); - SetMainCallback2(sub_8179428); + SetVBlankCallback(VBlankCB); + SetMainCallback2(CB2_ReturnToTitleScreen); } } -void sub_8179428(void) +void CB2_ReturnToTitleScreen(void) { - if(!UpdatePaletteFade()) + if (!UpdatePaletteFade()) { - if(gGameContinueCallback == NULL) // no callback exists, so do a soft reset. + if (gGameContinueCallback == NULL) // no callback exists, so do a soft reset. { DoSoftReset(); } @@ -263,18 +263,18 @@ void sub_8179428(void) } } -void sub_8179454(void) +static void VBlankCB_UpdateClockGraphics(void) { unsigned int n = (gMain.vblankCounter2 >> 3) & 7; - gMain.oamBuffer[0] = gUnknown_085EFD80; + gMain.oamBuffer[0] = gClockOamData; gMain.oamBuffer[0].x = 112; gMain.oamBuffer[0].y = (CLOCK_WIN_TOP + 1) * 8;; - if(gUnknown_0203BCFE.unk0 != FALSE) + if (gSaveFailedClockInfo.clockRunning != FALSE) { - gMain.oamBuffer[0].tileNum = gUnknown_085EFDAC[n][0]; - gMain.oamBuffer[0].matrixNum = (gUnknown_085EFDAC[n][2] << 4) | (gUnknown_085EFDAC[n][1] << 3); + gMain.oamBuffer[0].tileNum = gClockFrames[n][0]; + gMain.oamBuffer[0].matrixNum = (gClockFrames[n][2] << 4) | (gClockFrames[n][1] << 3); } else { @@ -283,11 +283,11 @@ void sub_8179454(void) CpuFastCopy(gMain.oamBuffer, (void *)OAM, 4); - if(gUnknown_0203BCFE.unk2) - gUnknown_0203BCFE.unk2--; + if (gSaveFailedClockInfo.debugTimer) + gSaveFailedClockInfo.debugTimer--; } -bool8 sub_8179514(u16 sector) +static bool8 VerifySectorWipe(u16 sector) { u32 *ptr = (u32 *)&gSaveDataBuffer; u16 i; @@ -301,7 +301,7 @@ bool8 sub_8179514(u16 sector) return FALSE; } -bool8 sub_8179554(u16 sector) +static bool8 WipeSector(u16 sector) { u16 i, j; bool8 failed = TRUE; @@ -311,18 +311,18 @@ bool8 sub_8179554(u16 sector) for (j = 0; j < 0x1000; j++) ProgramFlashByte(sector, j, 0); - failed = sub_8179514(sector); + failed = VerifySectorWipe(sector); } return failed; } -bool8 sub_81795AC(u32 sectorBits) +static bool8 WipeSectors(u32 sectorBits) { u16 i; for (i = 0; i < 0x20; i++) - if ((sectorBits & (1 << i)) && !sub_8179554(i)) + if ((sectorBits & (1 << i)) && !WipeSector(i)) sectorBits &= ~(1 << i); if (sectorBits == 0) diff --git a/sym_ewram.txt b/sym_ewram.txt index b7807e8a3..6331eb565 100644 --- a/sym_ewram.txt +++ b/sym_ewram.txt @@ -1639,13 +1639,13 @@ gUnknown_0203BCF4: @ 203BCF4 gUnknown_0203BCF8: @ 203BCF8 .space 0x4 -gUnknown_0203BCFC: @ 203BCFC +gSaveFailedType: @ 203BCFC .space 0x2 -gUnknown_0203BCFE: @ 203BCFE +gSaveFailedClockInfo: @ 203BCFE .space 0x10 -gUnknown_0203BD0E: @ 203BD0E +gSaveFailedWindowIds: @ 203BD0E .space 0x6 gBraillePuzzleCallbackFlag: @ 203BD14 From 35bb9b02e3089693e7c0424a9a1620ae5f7a1380 Mon Sep 17 00:00:00 2001 From: ProjectRevoTPP Date: Fri, 6 Oct 2017 20:26:53 -0400 Subject: [PATCH 36/42] ewram defines --- src/save_failed_screen.c | 77 +++++++++++++++++++++------------------- sym_ewram.txt | 9 +---- 2 files changed, 41 insertions(+), 45 deletions(-) diff --git a/src/save_failed_screen.c b/src/save_failed_screen.c index 666de5c95..8536e541a 100755 --- a/src/save_failed_screen.c +++ b/src/save_failed_screen.c @@ -19,7 +19,6 @@ extern void (*gGameContinueCallback)(void); extern u32 gDamagedSaveSectors; -extern u16 gSaveFailedType; extern const u8 gBirchHelpGfx[]; extern const u8 gBirchBagTilemap[]; extern const u8 gBirchGrassTilemap[]; @@ -49,21 +48,25 @@ extern u8 gText_GamePlayCannotBeContinued[]; extern u8 gDecompressionBuffer[]; -struct ClockInfo +// gSaveFailedClockInfo enum +enum { - bool16 clockRunning; - u16 debugTimer; // appears to be unused; it's only set to 0 and never used within the game. perhaps it was a volatile-like timer expected to be modified by an external tool? + CLOCK_RUNNING, + DEBUG_TIMER }; -extern struct ClockInfo gSaveFailedClockInfo; - -struct WindowIds +// gSaveFailedWindowIds enum +enum { - u8 textWindowId; - u8 clockWindowId; + TEXT_WIN_ID, + CLOCK_WIN_ID }; -extern struct WindowIds gSaveFailedWindowIds; +EWRAM_DATA u16 gSaveFailedType = {0}; +EWRAM_DATA u16 gSaveFailedClockInfo[2] = {0}; +EWRAM_DATA u8 gSaveFailedUnused1[12] = {0}; +EWRAM_DATA u8 gSaveFailedWindowIds[2] = {0}; +EWRAM_DATA u8 gSaveFailedUnused2[4] = {0}; static void CB2_SaveFailedScreen(void); static void CB2_WipeSave(void); @@ -82,17 +85,17 @@ static void SaveFailedScreenTextPrint(u8 *text, u8 var1, u8 var2) color.fgColor = 0; color.bgColor = 15; color.shadowColor = 3; - AddTextPrinterParametrized2(gSaveFailedWindowIds.textWindowId, 1, var1 * 8, var2 * 8 + 1, 0, 0, &color, 0, text); + AddTextPrinterParametrized2(gSaveFailedWindowIds[TEXT_WIN_ID], 1, var1 * 8, var2 * 8 + 1, 0, 0, &color, 0, text); } void DoSaveFailedScreen(u8 saveType) { SetMainCallback2(CB2_SaveFailedScreen); gSaveFailedType = saveType; - gSaveFailedClockInfo.clockRunning = FALSE; - gSaveFailedClockInfo.debugTimer = 0; - gSaveFailedWindowIds.textWindowId = 0; - gSaveFailedWindowIds.clockWindowId = 0; + gSaveFailedClockInfo[CLOCK_RUNNING] = FALSE; + gSaveFailedClockInfo[DEBUG_TIMER] = 0; + gSaveFailedWindowIds[TEXT_WIN_ID] = 0; + gSaveFailedWindowIds[CLOCK_WIN_ID] = 0; } static void VBlankCB(void) @@ -137,10 +140,10 @@ static void CB2_SaveFailedScreen(void) LoadBgTiles(0, gUnknown_0850E87C, 0x120, 0x214); InitWindows(gUnknown_085EFD94); // AddWindowWithoutTileMap returns a u16/integer, but the info is clobbered into a u8 here resulting in lost info. Bug? - gSaveFailedWindowIds.textWindowId = AddWindowWithoutTileMap(&gUnknown_085EFD9C); - SetWindowAttribute(gSaveFailedWindowIds.textWindowId, 7, (u32)&gDecompressionBuffer[0x2800]); - gSaveFailedWindowIds.clockWindowId = AddWindowWithoutTileMap(&gUnknown_085EFDA4); - SetWindowAttribute(gSaveFailedWindowIds.clockWindowId, 7, (u32)&gDecompressionBuffer[0x3D00]); + gSaveFailedWindowIds[TEXT_WIN_ID] = AddWindowWithoutTileMap(&gUnknown_085EFD9C); + SetWindowAttribute(gSaveFailedWindowIds[TEXT_WIN_ID], 7, (u32)&gDecompressionBuffer[0x2800]); + gSaveFailedWindowIds[CLOCK_WIN_ID] = AddWindowWithoutTileMap(&gUnknown_085EFDA4); + SetWindowAttribute(gSaveFailedWindowIds[CLOCK_WIN_ID], 7, (u32)&gDecompressionBuffer[0x3D00]); DeactivateAllTextPrinters(); ResetSpriteData(); ResetTasks(); @@ -149,12 +152,12 @@ static void CB2_SaveFailedScreen(void) LoadPalette(gSaveFailedClockPal, 0x100, 0x20); LoadPalette(gUnknown_0850FEFC, 0xE0, 0x20); LoadPalette(gUnknown_0860F074, 0xF0, 0x20); - SetWindowBorderStyle(gSaveFailedWindowIds.textWindowId, FALSE, 0x214, 0xE); - SetWindowBorderStyle(gSaveFailedWindowIds.clockWindowId, FALSE, 0x214, 0xE); - FillWindowPixelBuffer(gSaveFailedWindowIds.clockWindowId, 0x11); // backwards? - FillWindowPixelBuffer(gSaveFailedWindowIds.textWindowId, 0x11); - CopyWindowToVram(gSaveFailedWindowIds.clockWindowId, 2); // again? - CopyWindowToVram(gSaveFailedWindowIds.textWindowId, 1); + SetWindowBorderStyle(gSaveFailedWindowIds[TEXT_WIN_ID], FALSE, 0x214, 0xE); + SetWindowBorderStyle(gSaveFailedWindowIds[CLOCK_WIN_ID], FALSE, 0x214, 0xE); + FillWindowPixelBuffer(gSaveFailedWindowIds[CLOCK_WIN_ID], 0x11); // backwards? + FillWindowPixelBuffer(gSaveFailedWindowIds[TEXT_WIN_ID], 0x11); + CopyWindowToVram(gSaveFailedWindowIds[CLOCK_WIN_ID], 2); // again? + CopyWindowToVram(gSaveFailedWindowIds[TEXT_WIN_ID], 1); SaveFailedScreenTextPrint(gText_SaveFailedCheckingBackup, 1, 0); BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, 0); EnableInterrupts(1); @@ -179,25 +182,25 @@ static void CB2_WipeSave(void) { u8 wipeTries = 0; - gSaveFailedClockInfo.clockRunning = TRUE; + gSaveFailedClockInfo[CLOCK_RUNNING] = TRUE; while (gDamagedSaveSectors != 0 && wipeTries < 3) { if (WipeSectors(gDamagedSaveSectors) != FALSE) { - FillWindowPixelBuffer(gSaveFailedWindowIds.textWindowId, 0x11); + FillWindowPixelBuffer(gSaveFailedWindowIds[TEXT_WIN_ID], 0x11); SaveFailedScreenTextPrint(gText_BackupMemoryDamaged, 1, 0); SetMainCallback2(CB2_GameplayCannotBeContinued); return; } - FillWindowPixelBuffer(gSaveFailedWindowIds.textWindowId, 0x11); + FillWindowPixelBuffer(gSaveFailedWindowIds[TEXT_WIN_ID], 0x11); SaveFailedScreenTextPrint(gText_CheckCompleted, 1, 0); HandleSavingData(gSaveFailedType); if (gDamagedSaveSectors != 0) { - FillWindowPixelBuffer(gSaveFailedWindowIds.textWindowId, 0x11); + FillWindowPixelBuffer(gSaveFailedWindowIds[TEXT_WIN_ID], 0x11); SaveFailedScreenTextPrint(gText_SaveFailedCheckingBackup, 1, 0); } @@ -206,12 +209,12 @@ static void CB2_WipeSave(void) if (wipeTries == 3) { - FillWindowPixelBuffer(gSaveFailedWindowIds.textWindowId, 0x11); + FillWindowPixelBuffer(gSaveFailedWindowIds[TEXT_WIN_ID], 0x11); SaveFailedScreenTextPrint(gText_BackupMemoryDamaged, 1, 0); } else { - FillWindowPixelBuffer(gSaveFailedWindowIds.textWindowId, 0x11); + FillWindowPixelBuffer(gSaveFailedWindowIds[TEXT_WIN_ID], 0x11); if (gGameContinueCallback == NULL) SaveFailedScreenTextPrint(gText_SaveCompleteGameCannotContinue, 1, 0); @@ -224,11 +227,11 @@ static void CB2_WipeSave(void) static void CB2_GameplayCannotBeContinued(void) { - gSaveFailedClockInfo.clockRunning = FALSE; + gSaveFailedClockInfo[CLOCK_RUNNING] = FALSE; if (gMain.newKeys & A_BUTTON) { - FillWindowPixelBuffer(gSaveFailedWindowIds.textWindowId, 0x11); + FillWindowPixelBuffer(gSaveFailedWindowIds[TEXT_WIN_ID], 0x11); SaveFailedScreenTextPrint(gText_GamePlayCannotBeContinued, 1, 0); SetVBlankCallback(VBlankCB); SetMainCallback2(CB2_FadeAndReturnToTitleScreen); @@ -237,7 +240,7 @@ static void CB2_GameplayCannotBeContinued(void) static void CB2_FadeAndReturnToTitleScreen(void) { - gSaveFailedClockInfo.clockRunning = FALSE; + gSaveFailedClockInfo[CLOCK_RUNNING] = FALSE; if (gMain.newKeys & A_BUTTON) { @@ -271,7 +274,7 @@ static void VBlankCB_UpdateClockGraphics(void) gMain.oamBuffer[0].x = 112; gMain.oamBuffer[0].y = (CLOCK_WIN_TOP + 1) * 8;; - if (gSaveFailedClockInfo.clockRunning != FALSE) + if (gSaveFailedClockInfo[CLOCK_RUNNING] != FALSE) { gMain.oamBuffer[0].tileNum = gClockFrames[n][0]; gMain.oamBuffer[0].matrixNum = (gClockFrames[n][2] << 4) | (gClockFrames[n][1] << 3); @@ -283,8 +286,8 @@ static void VBlankCB_UpdateClockGraphics(void) CpuFastCopy(gMain.oamBuffer, (void *)OAM, 4); - if (gSaveFailedClockInfo.debugTimer) - gSaveFailedClockInfo.debugTimer--; + if (gSaveFailedClockInfo[DEBUG_TIMER]) + gSaveFailedClockInfo[DEBUG_TIMER]--; } static bool8 VerifySectorWipe(u16 sector) diff --git a/sym_ewram.txt b/sym_ewram.txt index 6331eb565..b1572bf25 100644 --- a/sym_ewram.txt +++ b/sym_ewram.txt @@ -1639,14 +1639,7 @@ gUnknown_0203BCF4: @ 203BCF4 gUnknown_0203BCF8: @ 203BCF8 .space 0x4 -gSaveFailedType: @ 203BCFC - .space 0x2 - -gSaveFailedClockInfo: @ 203BCFE - .space 0x10 - -gSaveFailedWindowIds: @ 203BD0E - .space 0x6 + .include "src/save_failed_screen.o" gBraillePuzzleCallbackFlag: @ 203BD14 .space 0x4 From 058fed1fd89d74182ec8bf6cca97a090496441e9 Mon Sep 17 00:00:00 2001 From: ProjectRevoTPP Date: Fri, 6 Oct 2017 20:35:29 -0400 Subject: [PATCH 37/42] oops --- src/save_failed_screen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/save_failed_screen.c b/src/save_failed_screen.c index 8536e541a..3f9219574 100755 --- a/src/save_failed_screen.c +++ b/src/save_failed_screen.c @@ -250,7 +250,7 @@ static void CB2_FadeAndReturnToTitleScreen(void) } } -void CB2_ReturnToTitleScreen(void) +static void CB2_ReturnToTitleScreen(void) { if (!UpdatePaletteFade()) { From e38fd8347d2519551648c351d528cc3fee3924d4 Mon Sep 17 00:00:00 2001 From: ProjectRevoTPP Date: Fri, 6 Oct 2017 21:59:47 -0400 Subject: [PATCH 38/42] use rodata for save_failed_screen --- data/save_failed_screen.s | 28 -------- graphics/misc/clock_small.pal | 19 +++++ graphics/misc/clock_small.png | Bin 0 -> 221 bytes include/window.h | 2 +- ld_script.txt | 2 +- src/save_failed_screen.c | 127 +++++++++++++++++++++++++++++----- src/window.c | 2 +- 7 files changed, 131 insertions(+), 49 deletions(-) delete mode 100644 data/save_failed_screen.s create mode 100755 graphics/misc/clock_small.pal create mode 100755 graphics/misc/clock_small.png diff --git a/data/save_failed_screen.s b/data/save_failed_screen.s deleted file mode 100644 index 1b9fb7ed1..000000000 --- a/data/save_failed_screen.s +++ /dev/null @@ -1,28 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .section .rodata - -gClockOamData:: @ 85EFD80 - .incbin "baserom.gba", 0x5efd80, 0x8 - -gUnknown_085EFD88:: @ 85EFD88 - .incbin "baserom.gba", 0x5efd88, 0xc - -gUnknown_085EFD94:: @ 85EFD94 - .incbin "baserom.gba", 0x5efd94, 0x8 - -gUnknown_085EFD9C:: @ 85EFD9C - .incbin "baserom.gba", 0x5efd9c, 0x8 - -gUnknown_085EFDA4:: @ 85EFDA4 - .incbin "baserom.gba", 0x5efda4, 0x8 - -gClockFrames:: @ 85EFDAC - .incbin "baserom.gba", 0x5efdac, 0x18 - -gSaveFailedClockPal:: @ 85EFDC4 - .incbin "baserom.gba", 0x5efdc4, 0x20 - -gSaveFailedClockGfx:: @ 85EFDE4 - .incbin "baserom.gba", 0x5efde4, 0x90 diff --git a/graphics/misc/clock_small.pal b/graphics/misc/clock_small.pal new file mode 100755 index 000000000..3398fcbe3 --- /dev/null +++ b/graphics/misc/clock_small.pal @@ -0,0 +1,19 @@ +JASC-PAL +0100 +16 +98 139 90 +0 0 0 +57 57 57 +123 123 123 +189 189 189 +255 255 255 +255 65 41 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 +0 0 0 diff --git a/graphics/misc/clock_small.png b/graphics/misc/clock_small.png new file mode 100755 index 0000000000000000000000000000000000000000..6b9f6c1f7730f24185477b95df18914f96c69791 GIT binary patch literal 221 zcmeAS@N?(olHy`uVBq!ia0vp^0zhoQ!VDx|6+TY^aRPioT$8$^fJ{qE%j)Xty?gim z2LeY;pa?FoQ?Nl1D3{^s;us<^H8~+6As{G;fmu~tT$MvsiYskpOWV>mD?Cop`l@FO oVxO-Qv)8zF-%tokl> 3) & 7; - gMain.oamBuffer[0] = gClockOamData; + gMain.oamBuffer[0] = sClockOamData; gMain.oamBuffer[0].x = 112; gMain.oamBuffer[0].y = (CLOCK_WIN_TOP + 1) * 8;; if (gSaveFailedClockInfo[CLOCK_RUNNING] != FALSE) { - gMain.oamBuffer[0].tileNum = gClockFrames[n][0]; - gMain.oamBuffer[0].matrixNum = (gClockFrames[n][2] << 4) | (gClockFrames[n][1] << 3); + gMain.oamBuffer[0].tileNum = sClockFrames[n][0]; + gMain.oamBuffer[0].matrixNum = (sClockFrames[n][2] << 4) | (sClockFrames[n][1] << 3); } else { diff --git a/src/window.c b/src/window.c index 704060b9d..f4cb48ec0 100644 --- a/src/window.c +++ b/src/window.c @@ -190,7 +190,7 @@ u16 AddWindow(const struct WindowTemplate *template) return win; } -int AddWindowWithoutTileMap(struct WindowTemplate *template) +int AddWindowWithoutTileMap(const struct WindowTemplate *template) { u16 win; u8 bgLayer; From 2ecb9fcd130af975dd85a86e8e0fb23520aa7869 Mon Sep 17 00:00:00 2001 From: ProjectRevoTPP Date: Fri, 6 Oct 2017 23:30:35 -0400 Subject: [PATCH 39/42] oops --- src/save.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/save.c b/src/save.c index aee20d451..2c1b26ca9 100644 --- a/src/save.c +++ b/src/save.c @@ -15,7 +15,6 @@ extern const struct SaveSectionOffsets gSaveSectionOffsets[0xE]; extern void DoSaveFailedScreen(u8); // save_failed_screen extern void LoadSerializedGame(void); // load_save extern bool32 ProgramFlashSectorAndVerify(u8 sector, u8 *data); -extern void ReadFlash(u8 sector, u32 arg1, void* data, u32 size); // iwram common u16 gLastWrittenSector; @@ -806,7 +805,7 @@ u32 sub_81535DC(u8 sector, u8* dst) if (sector != 30 && sector != 31) return 0xFF; - ReadFlash(sector, 0, &gSaveDataBuffer, sizeof(struct SaveSection)); + ReadFlash(sector, 0, (u8 *)&gSaveDataBuffer, sizeof(struct SaveSection)); if (*(u32*)(&gSaveDataBuffer.data[0]) != 0xB39D) return 0xFF; // copies whole save section except u32 counter From f0775000a1cd87174e9b3a5a6a365e189309385e Mon Sep 17 00:00:00 2001 From: ProjectRevoTPP Date: Sat, 7 Oct 2017 22:54:32 -0400 Subject: [PATCH 40/42] decompile diploma.c --- asm/diploma.s | 387 ----------------------------- asm/rom6.s | 2 +- data/diploma.s | 22 -- graphics/misc/diploma.png | Bin 0 -> 2064 bytes graphics/misc/diploma_hoenn.pal | 19 ++ graphics/misc/diploma_map.bin | Bin 0 -> 4096 bytes graphics/misc/diploma_national.pal | 19 ++ ld_script.txt | 4 +- src/diploma.c | 220 ++++++++++++++++ src/save_failed_screen.c | 2 +- sym_ewram.txt | 4 +- 11 files changed, 263 insertions(+), 416 deletions(-) delete mode 100644 asm/diploma.s delete mode 100644 data/diploma.s create mode 100755 graphics/misc/diploma.png create mode 100755 graphics/misc/diploma_hoenn.pal create mode 100755 graphics/misc/diploma_map.bin create mode 100755 graphics/misc/diploma_national.pal create mode 100755 src/diploma.c diff --git a/asm/diploma.s b/asm/diploma.s deleted file mode 100644 index 4f21fe39d..000000000 --- a/asm/diploma.s +++ /dev/null @@ -1,387 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .syntax unified - - .text - - thumb_func_start sub_8177874 -sub_8177874: @ 8177874 - push {lr} - bl LoadOam - bl ProcessSpriteCopyRequests - bl TransferPlttBuffer - pop {r0} - bx r0 - thumb_func_end sub_8177874 - - thumb_func_start sub_8177888 -sub_8177888: @ 8177888 - push {r4,r5,lr} - sub sp, 0xC - movs r0, 0 - bl SetVBlankCallback - movs r0, 0 - movs r1, 0 - bl SetGpuReg - movs r0, 0xE - movs r1, 0 - bl SetGpuReg - movs r0, 0xC - movs r1, 0 - bl SetGpuReg - movs r0, 0xA - movs r1, 0 - bl SetGpuReg - movs r0, 0x8 - movs r1, 0 - bl SetGpuReg - movs r0, 0x1C - movs r1, 0 - bl SetGpuReg - movs r0, 0x1E - movs r1, 0 - bl SetGpuReg - movs r0, 0x18 - movs r1, 0 - bl SetGpuReg - movs r0, 0x1A - movs r1, 0 - bl SetGpuReg - movs r0, 0x14 - movs r1, 0 - bl SetGpuReg - movs r0, 0x16 - movs r1, 0 - bl SetGpuReg - movs r0, 0x10 - movs r1, 0 - bl SetGpuReg - movs r0, 0x12 - movs r1, 0 - bl SetGpuReg - add r1, sp, 0x4 - movs r0, 0 - strh r0, [r1] - ldr r1, =0x040000d4 - add r0, sp, 0x4 - str r0, [r1] - movs r0, 0xC0 - lsls r0, 19 - str r0, [r1, 0x4] - ldr r0, =0x8100c000 - str r0, [r1, 0x8] - ldr r0, [r1, 0x8] - movs r5, 0 - str r5, [sp, 0x8] - add r0, sp, 0x8 - str r0, [r1] - movs r0, 0xE0 - lsls r0, 19 - str r0, [r1, 0x4] - ldr r0, =0x85000100 - str r0, [r1, 0x8] - ldr r0, [r1, 0x8] - add r0, sp, 0x4 - strh r5, [r0] - str r0, [r1] - movs r0, 0xA0 - lsls r0, 19 - str r0, [r1, 0x4] - ldr r0, =0x81000200 - str r0, [r1, 0x8] - ldr r0, [r1, 0x8] - bl remove_some_task - bl ResetTasks - bl ResetSpriteData - bl ResetPaletteFade - bl FreeAllSpritePalettes - ldr r0, =gUnknown_085E7088 - movs r1, 0 - movs r2, 0x40 - bl LoadPalette - ldr r4, =gUnknown_0203BCF0 - movs r0, 0x80 - lsls r0, 5 - bl Alloc - str r0, [r4] - bl sub_8177B44 - bl sub_8177B9C - bl reset_temp_tile_data_buffers - ldr r1, =gUnknown_085E7804 - str r5, [sp] - movs r0, 0x1 - movs r2, 0 - movs r3, 0 - bl decompress_and_copy_tile_data_to_vram -_0817797C: - bl free_temp_tile_data_buffers_if_possible - lsls r0, 24 - lsrs r5, r0, 24 - cmp r5, 0 - bne _0817797C - ldr r0, =gUnknown_085E70C8 - ldr r1, =gUnknown_0203BCF0 - ldr r1, [r1] - bl LZDecompressWram - movs r0, 0x1 - bl CopyBgTilemapBufferToVram - bl pokedex_diploma_something - movs r4, 0x1 - negs r4, r4 - adds r0, r4, 0 - movs r1, 0x10 - movs r2, 0 - bl BlendPalettes - str r5, [sp] - adds r0, r4, 0 - movs r1, 0 - movs r2, 0x10 - movs r3, 0 - bl BeginNormalPaletteFade - movs r0, 0x1 - bl EnableInterrupts - ldr r0, =sub_8177874 - bl SetVBlankCallback - ldr r0, =sub_8177A08 - bl SetMainCallback2 - ldr r0, =sub_8177A20 - movs r1, 0 - bl CreateTask - add sp, 0xC - pop {r4,r5} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8177888 - - thumb_func_start sub_8177A08 -sub_8177A08: @ 8177A08 - push {lr} - bl RunTasks - bl AnimateSprites - bl BuildOamBuffer - bl UpdatePaletteFade - pop {r0} - bx r0 - thumb_func_end sub_8177A08 - - thumb_func_start sub_8177A20 -sub_8177A20: @ 8177A20 - push {lr} - lsls r0, 24 - lsrs r2, r0, 24 - ldr r0, =gPaletteFade - ldrb r1, [r0, 0x7] - movs r0, 0x80 - ands r0, r1 - cmp r0, 0 - bne _08177A40 - ldr r0, =gTasks - lsls r1, r2, 2 - adds r1, r2 - lsls r1, 3 - adds r1, r0 - ldr r0, =sub_8177A50 - str r0, [r1] -_08177A40: - pop {r0} - bx r0 - .pool - thumb_func_end sub_8177A20 - - thumb_func_start sub_8177A50 -sub_8177A50: @ 8177A50 - push {r4,lr} - sub sp, 0x4 - lsls r0, 24 - lsrs r4, r0, 24 - ldr r0, =gMain - ldrh r1, [r0, 0x2E] - movs r0, 0x3 - ands r0, r1 - cmp r0, 0 - beq _08177A82 - movs r0, 0x1 - negs r0, r0 - movs r1, 0 - str r1, [sp] - movs r2, 0 - movs r3, 0x10 - bl BeginNormalPaletteFade - ldr r1, =gTasks - lsls r0, r4, 2 - adds r0, r4 - lsls r0, 3 - adds r0, r1 - ldr r1, =sub_8177A98 - str r1, [r0] -_08177A82: - add sp, 0x4 - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8177A50 - - thumb_func_start sub_8177A98 -sub_8177A98: @ 8177A98 - push {r4,lr} - lsls r0, 24 - lsrs r4, r0, 24 - ldr r0, =gPaletteFade - ldrb r1, [r0, 0x7] - movs r0, 0x80 - ands r0, r1 - cmp r0, 0 - bne _08177AC2 - ldr r0, =gUnknown_0203BCF0 - ldr r0, [r0] - bl Free - bl FreeAllWindowBuffers - adds r0, r4, 0 - bl DestroyTask - ldr r0, =sub_80861E8 - bl SetMainCallback2 -_08177AC2: - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8177A98 - - thumb_func_start pokedex_diploma_something -pokedex_diploma_something: @ 8177AD4 - push {r4,lr} - bl sub_80C0944 - lsls r0, 16 - cmp r0, 0 - beq _08177AFC - movs r1, 0x80 - lsls r1, 1 - movs r0, 0x14 - bl SetGpuReg - ldr r0, =gStringVar1 - ldr r1, =gText_DexNational - bl StringCopy - b _08177B0C - .pool -_08177AFC: - movs r0, 0x14 - movs r1, 0 - bl SetGpuReg - ldr r0, =gStringVar1 - ldr r1, =gText_DexHoenn - bl StringCopy -_08177B0C: - ldr r4, =gStringVar4 - ldr r1, =gText_PokedexDiploma - adds r0, r4, 0 - bl StringExpandPlaceholders - adds r0, r4, 0 - movs r1, 0 - movs r2, 0x1 - bl sub_8177BCC - movs r0, 0 - bl PutWindowTilemap - movs r0, 0 - movs r1, 0x3 - bl CopyWindowToVram - pop {r4} - pop {r0} - bx r0 - .pool - thumb_func_end pokedex_diploma_something - - thumb_func_start sub_8177B44 -sub_8177B44: @ 8177B44 - push {lr} - movs r0, 0 - bl ResetBgsAndClearDma3BusyFlags - ldr r1, =gUnknown_085E81FC - movs r0, 0 - movs r2, 0x2 - bl InitBgsFromTemplates - ldr r0, =gUnknown_0203BCF0 - ldr r1, [r0] - movs r0, 0x1 - bl SetBgTilemapBuffer - movs r1, 0x82 - lsls r1, 5 - movs r0, 0 - bl SetGpuReg - movs r0, 0 - bl ShowBg - movs r0, 0x1 - bl ShowBg - movs r0, 0x50 - movs r1, 0 - bl SetGpuReg - movs r0, 0x52 - movs r1, 0 - bl SetGpuReg - movs r0, 0x54 - movs r1, 0 - bl SetGpuReg - pop {r0} - bx r0 - .pool - thumb_func_end sub_8177B44 - - thumb_func_start sub_8177B9C -sub_8177B9C: @ 8177B9C - push {lr} - ldr r0, =gUnknown_085E8204 - bl InitWindows - bl DeactivateAllTextPrinters - ldr r0, =gUnknown_0860F074 - movs r1, 0xF0 - movs r2, 0x20 - bl LoadPalette - movs r0, 0 - movs r1, 0 - bl FillWindowPixelBuffer - movs r0, 0 - bl PutWindowTilemap - pop {r0} - bx r0 - .pool - thumb_func_end sub_8177B9C - - thumb_func_start sub_8177BCC -sub_8177BCC: @ 8177BCC - push {r4-r6,lr} - sub sp, 0x18 - adds r6, r0, 0 - adds r4, r1, 0 - adds r5, r2, 0 - lsls r4, 24 - lsrs r4, 24 - lsls r5, 24 - lsrs r5, 24 - ldr r1, =gUnknown_085E8214 - add r0, sp, 0x14 - movs r2, 0x3 - bl memcpy - movs r0, 0 - str r0, [sp] - str r0, [sp, 0x4] - add r0, sp, 0x14 - str r0, [sp, 0x8] - movs r0, 0x1 - negs r0, r0 - str r0, [sp, 0xC] - str r6, [sp, 0x10] - movs r0, 0 - movs r1, 0x1 - adds r2, r4, 0 - adds r3, r5, 0 - bl AddTextPrinterParametrized2 - add sp, 0x18 - pop {r4-r6} - pop {r0} - bx r0 - .pool - thumb_func_end sub_8177BCC - - .align 2, 0 @ Don't pad with nop. diff --git a/asm/rom6.s b/asm/rom6.s index c53e6fe6e..0a8960811 100644 --- a/asm/rom6.s +++ b/asm/rom6.s @@ -4705,7 +4705,7 @@ _08137CAC: thumb_func_start sub_8137CB4 sub_8137CB4: @ 8137CB4 push {lr} - ldr r0, =sub_8177888 + ldr r0, =CB2_ShowDiploma bl SetMainCallback2 bl ScriptContext2_Enable pop {r0} diff --git a/data/diploma.s b/data/diploma.s deleted file mode 100644 index 43a3d9c70..000000000 --- a/data/diploma.s +++ /dev/null @@ -1,22 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .section .rodata - -gUnknown_085E7088:: @ 85E7088 - .incbin "baserom.gba", 0x5e7088, 0x40 - -gUnknown_085E70C8:: @ 85E70C8 - .incbin "baserom.gba", 0x5e70c8, 0x73c - -gUnknown_085E7804:: @ 85E7804 - .incbin "baserom.gba", 0x5e7804, 0x9f8 - -gUnknown_085E81FC:: @ 85E81FC - .incbin "baserom.gba", 0x5e81fc, 0x8 - -gUnknown_085E8204:: @ 85E8204 - .incbin "baserom.gba", 0x5e8204, 0x10 - -gUnknown_085E8214:: @ 85E8214 - .incbin "baserom.gba", 0x5e8214, 0x4 diff --git a/graphics/misc/diploma.png b/graphics/misc/diploma.png new file mode 100755 index 0000000000000000000000000000000000000000..d9607dce6f2f5a8d97bf9629fcd1ea0622099fa7 GIT binary patch literal 2064 zcmV+r2=DiaP)000M@ zNkl-{jP!iuJ zB!-;jB68f7Ld1`^m~qSlh+q~k7XWx>>g2p?3yN=(V}LVMnMHS^_KGK7eFBgq#O9g+ z(CY!mVhZgjib;G|KFj1Y?gA}}L;i_uZg{W8S4=`W|D$|(EhV6+1@r;b!SmY+K#FtpLS(o$q#99iW-#y2Q0c*2ugZS#B#KOx#N)0Q6T$lmJlgjld0fxe!eP zKvxG)1Vnia2sMC-k>rO8{qTzxj4X`XfJhMxOaL)2$t6D&(~19jIv^4rY%2g%sREe7 z24sWlXlO!I9nb9oA~96{l7LXTAXCRn5n&E-z^9Q0;5mpOdwdwZfCma-sa`Ng$^o;b zA5w_`ClqTl#Stz<$Q9K*f5SRp$MG z?!qz>nqknv+vipk@Um25%nx8!YpemDt3GzHBuv?yCYG7&X?bn-EzE51{g=7+JM&THr51x2n!kmIc;@1zU)L5CiW$ zJPr_WA1gAYy=rQJ)L=+@}*`FyVmCvql!u z00^Jc>J*zb^{&Q3L)(W2fcgPrX?+OGnpvaM$)w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14QixXs-#jXq&&pO_LrLqQ)#M9wW%>Rw%S(NN?T#e?cfuLAhy5I z6q#aEVoFV!DYK=v#NL8iFaMZt!|fOXi=h~X;eq}yl7+HB=F2>pD|2MFz$ay&@XXT8XmWYWn@kUI7Nw8w$?JIZ{ui{5Fg=Ve1cE$89u+_Z#Nxgm+X`svR$^xR@ow(uj0SJm-q@_ z;~RX7@9;f-z>ny#?RMb%Z!xXrl$?|ka$JtdQ8^-qui__T3Vy=R_yxb>H~fx2@F!Yr zOO)?1y{6Cfn@-ae$S91)7>tq8GD^B^ryZPr+h==iPn2&kji$*on>te;$OKHpButWt dGC}HXogJKJ+hiMULzExb!_9HC1OL|!`~`@zlY9UG literal 0 HcmV?d00001 diff --git a/graphics/misc/diploma_national.pal b/graphics/misc/diploma_national.pal new file mode 100755 index 000000000..03c37bf22 --- /dev/null +++ b/graphics/misc/diploma_national.pal @@ -0,0 +1,19 @@ +JASC-PAL +0100 +16 +24 41 82 +255 255 222 +255 255 189 +230 238 90 +213 222 0 +238 238 222 +222 230 230 +255 222 197 +222 222 189 +246 246 180 +238 230 180 +213 213 156 +230 230 139 +255 255 123 +238 238 106 +255 205 172 diff --git a/ld_script.txt b/ld_script.txt index de6ba62f1..39e5c5bc1 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -218,7 +218,7 @@ SECTIONS { asm/hall_of_fame.o(.text); asm/credits.o(.text); src/lottery_corner.o(.text); - asm/diploma.o(.text); + src/diploma.o(.text); asm/berry_tag_screen.o(.text); asm/mystery_event_menu.o(.text); src/save_failed_screen.o(.text); @@ -430,7 +430,7 @@ SECTIONS { data/hall_of_fame.o(.rodata); data/credits.o(.rodata); src/lottery_corner.o(.rodata); - data/diploma.o(.rodata); + src/diploma.o(.rodata); data/strings.o(.rodata); data/berry_tag_screen.o(.rodata); data/mystery_event_menu.o(.rodata); diff --git a/src/diploma.c b/src/diploma.c new file mode 100755 index 000000000..765b018bc --- /dev/null +++ b/src/diploma.c @@ -0,0 +1,220 @@ +#include "global.h" +#include "palette.h" +#include "main.h" +#include "gpu_regs.h" +#include "unknown_task.h" +#include "task.h" +#include "malloc.h" +#include "decompress.h" +#include "bg.h" +#include "window.h" +#include "string_util.h" +#include "text.h" + +extern void reset_temp_tile_data_buffers(void); +extern int decompress_and_copy_tile_data_to_vram(u8 bg_id, void *src, int size, u16 offset, u8 mode); +extern bool8 free_temp_tile_data_buffers_if_possible(void); +extern void sub_80861E8(void); // rom4 +extern bool16 sub_80C0944(void); +extern void AddTextPrinterParametrized2(u8 windowId, u8 fontId, u8 x, u8 y, u8 letterSpacing, u8 lineSpacing, struct TextColor *color, s8 speed, u8 *str); + +extern u16 gUnknown_0860F074[]; + +extern u8 gText_DexNational[]; +extern u8 gText_DexHoenn[]; +extern u8 gText_PokedexDiploma[]; + +static void MainCB2(void); +static void Task_DiplomaFadeIn(u8); +static void Task_DiplomaWaitForKeyPress(u8); +static void Task_DiplomaFadeOut(u8); +static void DisplayDiplomaText(void); +static void InitDiplomaBg(void); +static void InitDiplomaWindow(void); +static void PrintDiplomaText(u8 *, u8, u8); + +EWRAM_DATA void **gDiplomaTilemapPtr = {NULL}; + +static void VBlankCB(void) +{ + LoadOam(); + ProcessSpriteCopyRequests(); + TransferPlttBuffer(); +} + +static const u16 gDiplomaPalettes[][16] = +{ + INCBIN_U16("graphics/misc/diploma_national.gbapal"), + INCBIN_U16("graphics/misc/diploma_hoenn.gbapal"), +}; + +static const u8 gDiplomaTilemap[] = INCBIN_U8("graphics/misc/diploma_map.bin.lz"); +static const u8 gDiplomaTiles[] = INCBIN_U8("graphics/misc/diploma.4bpp.lz"); + +void CB2_ShowDiploma(void) +{ + void **mallocPtr; + + SetVBlankCallback(NULL); + SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_MODE_0); + SetGpuReg(REG_OFFSET_BG3CNT, DISPCNT_MODE_0); + SetGpuReg(REG_OFFSET_BG2CNT, DISPCNT_MODE_0); + SetGpuReg(REG_OFFSET_BG1CNT, DISPCNT_MODE_0); + SetGpuReg(REG_OFFSET_BG0CNT, DISPCNT_MODE_0); + SetGpuReg(REG_OFFSET_BG3HOFS, DISPCNT_MODE_0); + SetGpuReg(REG_OFFSET_BG3VOFS, DISPCNT_MODE_0); + SetGpuReg(REG_OFFSET_BG2HOFS, DISPCNT_MODE_0); + SetGpuReg(REG_OFFSET_BG2VOFS, DISPCNT_MODE_0); + SetGpuReg(REG_OFFSET_BG1HOFS, DISPCNT_MODE_0); + SetGpuReg(REG_OFFSET_BG1VOFS, DISPCNT_MODE_0); + SetGpuReg(REG_OFFSET_BG0HOFS, DISPCNT_MODE_0); + SetGpuReg(REG_OFFSET_BG0VOFS, DISPCNT_MODE_0); + // why doesn't this one use the dma manager either? + DmaFill16(3, 0, VRAM, VRAM_SIZE); + DmaFill32(3, 0, OAM, OAM_SIZE); + DmaFill16(3, 0, PLTT, PLTT_SIZE); + remove_some_task(); + ResetTasks(); + ResetSpriteData(); + ResetPaletteFade(); + FreeAllSpritePalettes(); + LoadPalette(gDiplomaPalettes, 0, 64); + gDiplomaTilemapPtr = malloc(0x1000); + InitDiplomaBg(); + InitDiplomaWindow(); + reset_temp_tile_data_buffers(); + decompress_and_copy_tile_data_to_vram(1, &gDiplomaTiles, 0, 0, 0); + while (free_temp_tile_data_buffers_if_possible()) + ; + LZDecompressWram(&gDiplomaTilemap, gDiplomaTilemapPtr); + CopyBgTilemapBufferToVram(1); + DisplayDiplomaText(); + BlendPalettes(-1, 16, 0); + BeginNormalPaletteFade(-1, 0, 16, 0, 0); + EnableInterrupts(1); + SetVBlankCallback(VBlankCB); + SetMainCallback2(MainCB2); + CreateTask(Task_DiplomaFadeIn, 0); +} + +static void MainCB2(void) +{ + RunTasks(); + AnimateSprites(); + BuildOamBuffer(); + UpdatePaletteFade(); +} + +static void Task_DiplomaFadeIn(u8 taskId) +{ + if (!gPaletteFade.active) + gTasks[taskId].func = Task_DiplomaWaitForKeyPress; +} + +static void Task_DiplomaWaitForKeyPress(u8 taskId) +{ + if (gMain.newKeys & (A_BUTTON | B_BUTTON)) + { + BeginNormalPaletteFade(-1, 0, 0, 16, 0); + gTasks[taskId].func = Task_DiplomaFadeOut; + } +} + +static void Task_DiplomaFadeOut(u8 taskId) +{ + if (!gPaletteFade.active) + { + Free(gDiplomaTilemapPtr); + FreeAllWindowBuffers(); + DestroyTask(taskId); + SetMainCallback2(sub_80861E8); + } +} + +static void DisplayDiplomaText(void) +{ + if (sub_80C0944()) + { + SetGpuReg(REG_OFFSET_BG1HOFS, DISPCNT_BG0_ON); + StringCopy(gStringVar1, gText_DexNational); + } + else + { + SetGpuReg(REG_OFFSET_BG1HOFS, DISPCNT_MODE_0); + StringCopy(gStringVar1, gText_DexHoenn); + } + StringExpandPlaceholders(gStringVar4, gText_PokedexDiploma); + PrintDiplomaText(gStringVar4, 0, 1); + PutWindowTilemap(0); + CopyWindowToVram(0, 3); +} + +static const struct BgTemplate gDiplomaBgTemplates[2] = +{ + { + .bg = 0, + .charBaseIndex = 1, + .mapBaseIndex = 31, + .screenSize = 0, + .paletteMode = 0, + .priority = 0, + .baseTile = 0, + }, + { + .bg = 1, + .charBaseIndex = 0, + .mapBaseIndex = 6, + .screenSize = 1, + .paletteMode = 0, + .priority = 1, + .baseTile = 0, + }, +}; + +static void InitDiplomaBg(void) +{ + ResetBgsAndClearDma3BusyFlags(0); + InitBgsFromTemplates(0, gDiplomaBgTemplates, 2); + SetBgTilemapBuffer(1, gDiplomaTilemapPtr); + SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_OBJ_ON | DISPCNT_OBJ_1D_MAP); + ShowBg(0); + ShowBg(1); + SetGpuReg(REG_OFFSET_BLDCNT, DISPCNT_MODE_0); + SetGpuReg(REG_OFFSET_BLDALPHA, DISPCNT_MODE_0); + SetGpuReg(REG_OFFSET_BLDY, DISPCNT_MODE_0); +} + +static const struct WindowTemplate gDiplomaWinTemplates[2] = +{ + { + .priority = 0, + .tilemapLeft = 5, + .tilemapTop = 2, + .width = 20, + .height = 16, + .paletteNum = 15, + .baseBlock = 1, + }, + DUMMY_WIN_TEMPLATE, +}; + +static void InitDiplomaWindow(void) +{ + InitWindows(gDiplomaWinTemplates); + DeactivateAllTextPrinters(); + LoadPalette(gUnknown_0860F074, 0xF0, 0x20); + FillWindowPixelBuffer(0, 0); + PutWindowTilemap(0); +} + +static void PrintDiplomaText(u8 *text, u8 var1, u8 var2) +{ + struct TextColor color = + { + .fgColor = 0, + .bgColor = 2, + .shadowColor = 3, + }; + + AddTextPrinterParametrized2(0, 1, var1, var2, 0, 0, &color, -1, text); +} diff --git a/src/save_failed_screen.c b/src/save_failed_screen.c index 7a7c30388..3f49b89e6 100755 --- a/src/save_failed_screen.c +++ b/src/save_failed_screen.c @@ -13,7 +13,7 @@ #define MSG_WIN_TOP 12 #define CLOCK_WIN_TOP (MSG_WIN_TOP - 4) -extern void AddTextPrinterParametrized2(u8 windowId, u8 fontId, u8 x, u8 y, u8 letterSpacing, u8 lineSpacing, struct TextColor *color, u8 speed, u8 *str); +extern void AddTextPrinterParametrized2(u8 windowId, u8 fontId, u8 x, u8 y, u8 letterSpacing, u8 lineSpacing, struct TextColor *color, s8 speed, u8 *str); extern void (*gGameContinueCallback)(void); diff --git a/sym_ewram.txt b/sym_ewram.txt index b1572bf25..166ea64d0 100644 --- a/sym_ewram.txt +++ b/sym_ewram.txt @@ -1629,9 +1629,7 @@ gUnknown_0203BCE8: @ 203BCE8 .space 0x4 .include "src/lottery_corner.o" - -gUnknown_0203BCF0: @ 203BCF0 - .space 0x4 + .include "src/diploma.o" gUnknown_0203BCF4: @ 203BCF4 .space 0x4 From f775ccd571f82df745f608c23758185741867eab Mon Sep 17 00:00:00 2001 From: ProjectRevoTPP Date: Sat, 7 Oct 2017 22:58:21 -0400 Subject: [PATCH 41/42] forgot to remove unnecessary local ptr --- src/diploma.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/diploma.c b/src/diploma.c index 765b018bc..f2cbcabb7 100755 --- a/src/diploma.c +++ b/src/diploma.c @@ -53,8 +53,6 @@ static const u8 gDiplomaTiles[] = INCBIN_U8("graphics/misc/diploma.4bpp.lz"); void CB2_ShowDiploma(void) { - void **mallocPtr; - SetVBlankCallback(NULL); SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_MODE_0); SetGpuReg(REG_OFFSET_BG3CNT, DISPCNT_MODE_0); From a9d94cc5d62540f6f20b17280cb8f45adc5683b1 Mon Sep 17 00:00:00 2001 From: ProjectRevoTPP Date: Sun, 8 Oct 2017 22:21:34 -0400 Subject: [PATCH 42/42] decompile save_location.c --- asm/rom4.s | 4 +- asm/save_location.s | 205 ------------------------------------------- data/save_location.s | 13 --- ld_script.txt | 4 +- src/save_location.c | 145 ++++++++++++++++++++++++++++++ 5 files changed, 149 insertions(+), 222 deletions(-) delete mode 100755 asm/save_location.s delete mode 100644 data/save_location.s create mode 100755 src/save_location.c diff --git a/asm/rom4.s b/asm/rom4.s index 8423d0d9a..0a624620d 100644 --- a/asm/rom4.s +++ b/asm/rom4.s @@ -1375,7 +1375,7 @@ _080850C8: bl warp_shift bl set_current_map_header_from_sav1_save_old_name bl CopyFieldObjectTemplatesToSav1 - bl sav2_set_x9_depending_on_sav1_map + bl TrySetMapSaveWarpStatus bl ClearTempFieldEventData bl wild_pokemon_reroll bl prev_quest_postbuffer_cursor_backup_reset @@ -1463,7 +1463,7 @@ _080851A2: lsls r0, 24 lsrs r6, r0, 24 bl sub_80EB218 - bl sav2_set_x9_depending_on_sav1_map + bl TrySetMapSaveWarpStatus bl ClearTempFieldEventData bl wild_pokemon_reroll bl prev_quest_postbuffer_cursor_backup_reset diff --git a/asm/save_location.s b/asm/save_location.s deleted file mode 100755 index 1a5b3c6da..000000000 --- a/asm/save_location.s +++ /dev/null @@ -1,205 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .syntax unified - - .text - - thumb_func_start sav1_are_mapnumbers_in_given_list -sav1_are_mapnumbers_in_given_list: @ 81AFC84 - push {r4,lr} - adds r2, r0, 0 - ldr r0, =gSaveBlock1Ptr - ldr r0, [r0] - movs r1, 0x4 - ldrsb r1, [r0, r1] - lsls r1, 8 - ldrb r0, [r0, 0x5] - lsls r0, 24 - asrs r0, 24 - adds r0, r1 - lsls r0, 16 - lsrs r3, r0, 16 - ldrh r0, [r2] - ldr r1, =0x0000ffff - cmp r0, r1 - beq _081AFCC4 - adds r4, r1, 0 - adds r1, r2, 0 -_081AFCAA: - ldrh r0, [r1] - cmp r0, r3 - bne _081AFCBC - movs r0, 0x1 - b _081AFCC6 - .pool -_081AFCBC: - adds r1, 0x2 - ldrh r0, [r1] - cmp r0, r4 - bne _081AFCAA -_081AFCC4: - movs r0, 0 -_081AFCC6: - pop {r4} - pop {r1} - bx r1 - thumb_func_end sav1_are_mapnumbers_in_given_list - - thumb_func_start sav1_is_in_pokecenter -sav1_is_in_pokecenter: @ 81AFCCC - push {lr} - ldr r0, =gUnknown_086143BC - bl sav1_are_mapnumbers_in_given_list - pop {r1} - bx r1 - .pool - thumb_func_end sav1_is_in_pokecenter - - thumb_func_start sub_81AFCDC -sub_81AFCDC: @ 81AFCDC - push {lr} - ldr r0, =gUnknown_0861440A - bl sav1_are_mapnumbers_in_given_list - pop {r1} - bx r1 - .pool - thumb_func_end sub_81AFCDC - - thumb_func_start sub_81AFCEC -sub_81AFCEC: @ 81AFCEC - push {lr} - ldr r0, =gUnknown_0861440E - bl sav1_are_mapnumbers_in_given_list - pop {r1} - bx r1 - .pool - thumb_func_end sub_81AFCEC - - thumb_func_start sav2_set_x9_bit3_when_sav1_in_pokecenter -sav2_set_x9_bit3_when_sav1_in_pokecenter: @ 81AFCFC - push {lr} - bl sav1_is_in_pokecenter - cmp r0, 0 - bne _081AFD18 - ldr r0, =gSaveBlock2Ptr - ldr r2, [r0] - ldrb r1, [r2, 0x9] - movs r0, 0xFD - ands r0, r1 - b _081AFD22 - .pool -_081AFD18: - ldr r0, =gSaveBlock2Ptr - ldr r2, [r0] - ldrb r1, [r2, 0x9] - movs r0, 0x2 - orrs r0, r1 -_081AFD22: - strb r0, [r2, 0x9] - pop {r0} - bx r0 - .pool - thumb_func_end sav2_set_x9_bit3_when_sav1_in_pokecenter - - thumb_func_start sub_81AFD2C -sub_81AFD2C: @ 81AFD2C - push {lr} - bl sub_81AFCDC - cmp r0, 0 - bne _081AFD48 - ldr r0, =gSaveBlock2Ptr - ldr r2, [r0] - ldrb r1, [r2, 0x9] - movs r0, 0xFB - ands r0, r1 - b _081AFD52 - .pool -_081AFD48: - ldr r0, =gSaveBlock2Ptr - ldr r2, [r0] - ldrb r1, [r2, 0x9] - movs r0, 0x4 - orrs r0, r1 -_081AFD52: - strb r0, [r2, 0x9] - pop {r0} - bx r0 - .pool - thumb_func_end sub_81AFD2C - - thumb_func_start sub_81AFD5C -sub_81AFD5C: @ 81AFD5C - push {lr} - bl sub_81AFCEC - cmp r0, 0 - bne _081AFD78 - ldr r0, =gSaveBlock2Ptr - ldr r2, [r0] - ldrb r1, [r2, 0x9] - movs r0, 0xF7 - ands r0, r1 - b _081AFD82 - .pool -_081AFD78: - ldr r0, =gSaveBlock2Ptr - ldr r2, [r0] - ldrb r1, [r2, 0x9] - movs r0, 0x8 - orrs r0, r1 -_081AFD82: - strb r0, [r2, 0x9] - pop {r0} - bx r0 - .pool - thumb_func_end sub_81AFD5C - - thumb_func_start sav2_set_x9_depending_on_sav1_map -sav2_set_x9_depending_on_sav1_map: @ 81AFD8C - push {lr} - bl sav2_set_x9_bit3_when_sav1_in_pokecenter - bl sub_81AFD2C - bl sub_81AFD5C - pop {r0} - bx r0 - thumb_func_end sav2_set_x9_depending_on_sav1_map - - thumb_func_start sub_81AFDA0 -sub_81AFDA0: @ 81AFDA0 - ldr r0, =gSaveBlock2Ptr - ldr r2, [r0] - adds r2, 0xA8 - ldr r0, [r2] - movs r1, 0x80 - lsls r1, 8 - orrs r0, r1 - movs r1, 0x1 - orrs r0, r1 - movs r1, 0x2 - orrs r0, r1 - movs r1, 0x4 - orrs r0, r1 - movs r1, 0x10 - orrs r0, r1 - movs r1, 0x20 - orrs r0, r1 - movs r1, 0x8 - orrs r0, r1 - str r0, [r2] - bx lr - .pool - thumb_func_end sub_81AFDA0 - - thumb_func_start sub_81AFDD0 -sub_81AFDD0: @ 81AFDD0 - ldr r0, =gSaveBlock2Ptr - ldr r2, [r0] - ldrb r1, [r2, 0x9] - movs r0, 0x80 - orrs r0, r1 - strb r0, [r2, 0x9] - bx lr - .pool - thumb_func_end sub_81AFDD0 - - .align 2, 0 @ Don't pad with nop. diff --git a/data/save_location.s b/data/save_location.s deleted file mode 100644 index eabed7d86..000000000 --- a/data/save_location.s +++ /dev/null @@ -1,13 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .section .rodata - -gUnknown_086143BC:: @ 86143BC - .incbin "baserom.gba", 0x6143bc, 0x4e - -gUnknown_0861440A:: @ 861440A - .incbin "baserom.gba", 0x61440a, 0x4 - -gUnknown_0861440E:: @ 861440E - .incbin "baserom.gba", 0x61440e, 0x2 diff --git a/ld_script.txt b/ld_script.txt index 39e5c5bc1..82588be3a 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -244,7 +244,7 @@ SECTIONS { asm/list_menu.o(.text); asm/menu_indicators.o(.text); asm/unk_text_util.o(.text); - asm/save_location.o(.text); + src/save_location.o(.text); asm/item_icon.o(.text); asm/party_menu.o(.text); asm/battle_tent.o(.text); @@ -451,7 +451,7 @@ SECTIONS { data/battle_frontier_2.o(.rodata); data/item_menu.o(.rodata); data/menu_indicators.o(.rodata); - data/save_location.o(.rodata); + src/save_location.o(.rodata); data/item_icon.o(.rodata); data/party_menu.o(.rodata); data/battle_tent.o(.rodata); diff --git a/src/save_location.c b/src/save_location.c new file mode 100755 index 000000000..87067e14d --- /dev/null +++ b/src/save_location.c @@ -0,0 +1,145 @@ +#include "global.h" +#include "map_constants.h" + +// used to make the list defines a little less ugly. +#define MAP(name) ((MAP_GROUP_##name << 8) + (MAP_ID_##name)) + +// specialSaveWarp flags +#define POKECENTER_SAVEWARP (1 << 1) +#define LOBBY_SAVEWARP (1 << 2) +#define UNK_SPECIAL_SAVE_WARP_FLAG_3 (1 << 3) + +static bool32 IsCurMapInLocationList(const u16 *list) +{ + u16 locSum = (gSaveBlock1Ptr->location.mapGroup << 8) + (gSaveBlock1Ptr->location.mapNum); + + // im sure it was written a different way, but for the love of christ I cant figure out how to write it different where it still matches. + if (*list != 0xFFFF) + { + u16 termValue = 0xFFFF; + const u16 *localList; + for (localList = list; *localList != termValue; localList++) + if (*localList == locSum) + return TRUE; + } + return FALSE; +} + +// TODO: Not require a packed u16 array for these lists +static const u16 gSaveLocationPokeCenterList[] = +{ + MAP(OLDALE_TOWN_POKEMON_CENTER_1F), + MAP(OLDALE_TOWN_POKEMON_CENTER_2F), + MAP(DEWFORD_TOWN_POKEMON_CENTER_1F), + MAP(DEWFORD_TOWN_POKEMON_CENTER_2F), + MAP(LAVARIDGE_TOWN_POKEMON_CENTER_1F), + MAP(LAVARIDGE_TOWN_POKEMON_CENTER_2F), + MAP(FALLARBOR_TOWN_POKEMON_CENTER_1F), + MAP(FALLARBOR_TOWN_POKEMON_CENTER_2F), + MAP(VERDANTURF_TOWN_POKEMON_CENTER_1F), + MAP(VERDANTURF_TOWN_POKEMON_CENTER_2F), + MAP(PACIFIDLOG_TOWN_POKEMON_CENTER_1F), + MAP(PACIFIDLOG_TOWN_POKEMON_CENTER_2F), + MAP(PETALBURG_CITY_POKEMON_CENTER_1F), + MAP(PETALBURG_CITY_POKEMON_CENTER_2F), + MAP(SLATEPORT_CITY_POKEMON_CENTER_1F), + MAP(SLATEPORT_CITY_POKEMON_CENTER_2F), + MAP(MAUVILLE_CITY_POKEMON_CENTER_1F), + MAP(MAUVILLE_CITY_POKEMON_CENTER_2F), + MAP(RUSTBORO_CITY_POKEMON_CENTER_1F), + MAP(RUSTBORO_CITY_POKEMON_CENTER_2F), + MAP(FORTREE_CITY_POKEMON_CENTER_1F), + MAP(FORTREE_CITY_POKEMON_CENTER_2F), + MAP(LILYCOVE_CITY_POKEMON_CENTER_1F), + MAP(LILYCOVE_CITY_POKEMON_CENTER_2F), + MAP(MOSSDEEP_CITY_POKEMON_CENTER_1F), + MAP(MOSSDEEP_CITY_POKEMON_CENTER_2F), + MAP(SOOTOPOLIS_CITY_POKEMON_CENTER_1F), + MAP(SOOTOPOLIS_CITY_POKEMON_CENTER_2F), + MAP(EVER_GRANDE_CITY_POKEMON_CENTER_1F), + MAP(EVER_GRANDE_CITY_POKEMON_CENTER_2F), + MAP(EVER_GRANDE_CITY_POKEMON_LEAGUE_1F), + MAP(EVER_GRANDE_CITY_POKEMON_LEAGUE_2F), + MAP(BATTLE_FRONTIER_POKEMON_CENTER_1F), + MAP(BATTLE_FRONTIER_POKEMON_CENTER_2F), + MAP(SINGLE_BATTLE_COLOSSEUM), + MAP(TRADE_CENTER), + MAP(RECORD_CORNER), + MAP(DOUBLE_BATTLE_COLOSSEUM), + 0xFFFF, +}; + +static bool32 IsCurMapPokeCenter(void) +{ + return IsCurMapInLocationList(gSaveLocationPokeCenterList); +} + +static const u16 gSaveLocationReloadLocList[] = // there's only 1 location, and it's presumed its for the save reload feature for battle tower +{ + MAP(BATTLE_TOWER_LOBBY), + 0xFFFF, +}; + +static bool32 IsCurMapReloadLocation(void) +{ + return IsCurMapInLocationList(gSaveLocationReloadLocList); +} + +// nulled out list. unknown what this would have been +static const u16 gUnknown_0861440E[] = +{ + 0xFFFF, +}; + +bool32 sub_81AFCEC(void) +{ + return IsCurMapInLocationList(gUnknown_0861440E); +} + +static void TrySetPokeCenterWarpStatus(void) +{ + if (IsCurMapPokeCenter() == FALSE) + gSaveBlock2Ptr->specialSaveWarp &= ~(POKECENTER_SAVEWARP); + else + gSaveBlock2Ptr->specialSaveWarp |= POKECENTER_SAVEWARP; +} + +static void TrySetReloadWarpStatus(void) +{ + if (!IsCurMapReloadLocation()) + gSaveBlock2Ptr->specialSaveWarp &= ~(LOBBY_SAVEWARP); + else + gSaveBlock2Ptr->specialSaveWarp |= LOBBY_SAVEWARP; +} + +// this function definitely sets a warp status, but because the list is empty, it's unknown what this does yet. +static void sub_81AFD5C(void) +{ + if (!sub_81AFCEC()) + gSaveBlock2Ptr->specialSaveWarp &= ~(UNK_SPECIAL_SAVE_WARP_FLAG_3); + else + gSaveBlock2Ptr->specialSaveWarp |= UNK_SPECIAL_SAVE_WARP_FLAG_3; +} + +void TrySetMapSaveWarpStatus(void) +{ + TrySetPokeCenterWarpStatus(); + TrySetReloadWarpStatus(); + sub_81AFD5C(); +} + +void sub_81AFDA0(void) +{ + gSaveBlock2Ptr->field_A8 |= 0x8000; + gSaveBlock2Ptr->field_A8 |= 0x1; + gSaveBlock2Ptr->field_A8 |= 0x2; + gSaveBlock2Ptr->field_A8 |= 0x4; + gSaveBlock2Ptr->field_A8 |= 0x10; + gSaveBlock2Ptr->field_A8 |= 0x20; + gSaveBlock2Ptr->field_A8 |= 0x8; +} + +void sub_81AFDD0(void) +{ + gSaveBlock2Ptr->specialSaveWarp |= 0x80; +}