diff options
Diffstat (limited to 'asm')
-rwxr-xr-x | asm/aurora.s | 218 | ||||
-rw-r--r-- | asm/battle_2.s | 4 | ||||
-rwxr-xr-x | asm/beta_beat_up.s | 63 | ||||
-rwxr-xr-x | asm/bubble.s | 248 | ||||
-rw-r--r-- | asm/contest_ai.s | 4 | ||||
-rw-r--r-- | asm/contest_effect.s | 4 | ||||
-rw-r--r-- | asm/contest_link_80C2020.s | 60 | ||||
-rwxr-xr-x | asm/devil.s | 163 | ||||
-rw-r--r-- | asm/easy_chat.s | 8 | ||||
-rwxr-xr-x | asm/fury_cutter_count.s | 48 | ||||
-rwxr-xr-x | asm/guard.s | 80 | ||||
-rwxr-xr-x | asm/heated_rock.s | 302 | ||||
-rwxr-xr-x | asm/liquid_ball.s | 353 | ||||
-rw-r--r-- | asm/macros/event.inc | 708 | ||||
-rwxr-xr-x | asm/noise.s | 139 | ||||
-rwxr-xr-x | asm/note_spin.s | 234 | ||||
-rwxr-xr-x | asm/rain.s | 123 | ||||
-rwxr-xr-x | asm/shock.s | 259 | ||||
-rwxr-xr-x | asm/struggle.s | 111 | ||||
-rwxr-xr-x | asm/sunlight.s | 33 | ||||
-rwxr-xr-x | asm/swipe.s | 50 | ||||
-rwxr-xr-x | asm/thunder.s | 68 | ||||
-rwxr-xr-x | asm/uproar.s | 64 | ||||
-rwxr-xr-x | asm/water.s | 414 | ||||
-rwxr-xr-x | asm/wisp_orb.s | 230 |
25 files changed, 331 insertions, 3657 deletions
diff --git a/asm/aurora.s b/asm/aurora.s deleted file mode 100755 index e5de7c419..000000000 --- a/asm/aurora.s +++ /dev/null @@ -1,218 +0,0 @@ - .include "constants/gba_constants.inc" - .include "asm/macros.inc" - - .syntax unified - - .text - - @ aurora - - thumb_func_start sub_80D33B4 -sub_80D33B4: @ 80D33B4 - push {r4-r7,lr} - adds r5, r0, 0 - movs r1, 0x1 - bl sub_80787B0 - ldr r0, _080D33DC @ =gBattleAnimBankAttacker - ldrb r0, [r0] - bl GetBankSide - lsls r0, 24 - cmp r0, 0 - beq _080D33E4 - ldr r1, _080D33E0 @ =gBattleAnimArgs - ldrh r0, [r1, 0x4] - negs r0, r0 - lsls r0, 16 - lsrs r6, r0, 16 - adds r7, r1, 0 - b _080D33EA - .align 2, 0 -_080D33DC: .4byte gBattleAnimBankAttacker -_080D33E0: .4byte gBattleAnimArgs -_080D33E4: - ldr r0, _080D3440 @ =gBattleAnimArgs - ldrh r6, [r0, 0x4] - adds r7, r0, 0 -_080D33EA: - ldrh r0, [r7, 0x8] - strh r0, [r5, 0x2E] - ldrh r0, [r5, 0x20] - strh r0, [r5, 0x30] - ldr r4, _080D3444 @ =gBattleAnimBankTarget - ldrb r0, [r4] - movs r1, 0x2 - bl sub_8077ABC - lsls r0, 24 - lsrs r0, 24 - adds r0, r6 - strh r0, [r5, 0x32] - ldrh r0, [r5, 0x22] - strh r0, [r5, 0x34] - ldrb r0, [r4] - movs r1, 0x3 - bl sub_8077ABC - lsls r0, 24 - lsrs r0, 24 - ldrh r7, [r7, 0x6] - adds r0, r7 - strh r0, [r5, 0x36] - adds r0, r5, 0 - bl obj_translate_based_on_private_1_2_3_4 - ldr r0, _080D3448 @ =sub_80D344C - str r0, [r5, 0x1C] - adds r2, r5, 0 - adds r2, 0x2C - ldrb r0, [r2] - movs r1, 0x80 - orrs r0, r1 - strb r0, [r2] - ldr r1, [r5, 0x1C] - adds r0, r5, 0 - bl _call_via_r1 - pop {r4-r7} - pop {r0} - bx r0 - .align 2, 0 -_080D3440: .4byte gBattleAnimArgs -_080D3444: .4byte gBattleAnimBankTarget -_080D3448: .4byte sub_80D344C - thumb_func_end sub_80D33B4 - - thumb_func_start sub_80D344C -sub_80D344C: @ 80D344C - push {r4,lr} - adds r4, r0, 0 - ldr r0, _080D3488 @ =gBattleAnimArgs - ldrh r1, [r0, 0xE] - ldr r0, _080D348C @ =0x0000ffff - cmp r1, r0 - bne _080D346E - adds r0, r4, 0 - movs r1, 0x1 - bl StartSpriteAnim - adds r2, r4, 0 - adds r2, 0x2C - ldrb r1, [r2] - movs r0, 0x7F - ands r0, r1 - strb r0, [r2] -_080D346E: - adds r0, r4, 0 - bl sub_8078B5C - lsls r0, 24 - cmp r0, 0 - beq _080D3480 - adds r0, r4, 0 - bl move_anim_8072740 -_080D3480: - pop {r4} - pop {r0} - bx r0 - .align 2, 0 -_080D3488: .4byte gBattleAnimArgs -_080D348C: .4byte 0x0000ffff - thumb_func_end sub_80D344C - - thumb_func_start sub_80D3490 -sub_80D3490: @ 80D3490 - push {r4,lr} - lsls r0, 24 - lsrs r0, 24 - ldr r1, _080D34C4 @ =gTasks - lsls r4, r0, 2 - adds r4, r0 - lsls r4, 3 - adds r4, r1 - ldr r0, _080D34C8 @ =gBattleAnimArgs - ldrh r0, [r0] - strh r0, [r4, 0x8] - ldr r0, _080D34CC @ =0x0000279c - bl IndexOfSpritePaletteTag - lsls r0, 24 - lsrs r0, 20 - movs r1, 0x80 - lsls r1, 1 - adds r0, r1 - strh r0, [r4, 0xC] - ldr r0, _080D34D0 @ =sub_80D34D4 - str r0, [r4] - pop {r4} - pop {r0} - bx r0 - .align 2, 0 -_080D34C4: .4byte gTasks -_080D34C8: .4byte gBattleAnimArgs -_080D34CC: .4byte 0x0000279c -_080D34D0: .4byte sub_80D34D4 - thumb_func_end sub_80D3490 - - thumb_func_start sub_80D34D4 -sub_80D34D4: @ 80D34D4 - push {r4-r7,lr} - lsls r0, 24 - lsrs r4, r0, 24 - ldr r1, _080D354C @ =gTasks - lsls r0, r4, 2 - adds r0, r4 - lsls r0, 3 - adds r2, r0, r1 - ldrh r0, [r2, 0x1C] - adds r0, 0x1 - strh r0, [r2, 0x1C] - lsls r0, 16 - asrs r0, 16 - mov r12, r1 - cmp r0, 0x3 - bne _080D3526 - movs r0, 0 - strh r0, [r2, 0x1C] - ldrh r0, [r2, 0xC] - adds r0, 0x1 - lsls r0, 16 - lsrs r5, r0, 16 - ldr r1, _080D3550 @ =gPlttBufferFaded - lsls r0, r5, 1 - adds r0, r1 - ldrh r6, [r0] - adds r7, r1, 0 - adds r3, r0, 0x2 - movs r1, 0x6 - adds r2, r0, 0 -_080D3510: - ldrh r0, [r3] - strh r0, [r2] - adds r3, 0x2 - adds r2, 0x2 - subs r1, 0x1 - cmp r1, 0 - bge _080D3510 - adds r0, r5, 0x7 - lsls r0, 1 - adds r0, r7 - strh r6, [r0] -_080D3526: - lsls r0, r4, 2 - adds r0, r4 - lsls r0, 3 - add r0, r12 - ldrh r1, [r0, 0x1E] - adds r1, 0x1 - strh r1, [r0, 0x1E] - lsls r1, 16 - asrs r1, 16 - movs r2, 0x8 - ldrsh r0, [r0, r2] - cmp r1, r0 - bne _080D3546 - adds r0, r4, 0 - bl DestroyAnimVisualTask -_080D3546: - pop {r4-r7} - pop {r0} - bx r0 - .align 2, 0 -_080D354C: .4byte gTasks -_080D3550: .4byte gPlttBufferFaded - thumb_func_end sub_80D34D4 - - .align 2, 0 @ Don't pad with nop. diff --git a/asm/battle_2.s b/asm/battle_2.s index c8f8eb0f4..dd720ec79 100644 --- a/asm/battle_2.s +++ b/asm/battle_2.s @@ -3336,7 +3336,7 @@ _08013ECE: cmp r0, 0 bne _08013F2A _08013EE0: - ldr r1, _08013F3C @ =gScriptResult + ldr r1, _08013F3C @ =gSpecialVar_Result ldr r5, _08013F40 @ =gBattleOutcome ldrb r0, [r5] strh r0, [r1] @@ -3379,7 +3379,7 @@ _08013F2A: _08013F30: .4byte gBattleTypeFlags _08013F34: .4byte gPlayerParty _08013F38: .4byte gReceivedRemoteLinkPlayers -_08013F3C: .4byte gScriptResult +_08013F3C: .4byte gSpecialVar_Result _08013F40: .4byte gBattleOutcome _08013F44: .4byte gMain _08013F48: .4byte 0x0000043d diff --git a/asm/beta_beat_up.s b/asm/beta_beat_up.s deleted file mode 100755 index d6e1ba675..000000000 --- a/asm/beta_beat_up.s +++ /dev/null @@ -1,63 +0,0 @@ - .include "constants/gba_constants.inc" - .include "asm/macros.inc" - - .syntax unified - - .text - - @ beta_beat_up - - thumb_func_start sub_80D6234 -sub_80D6234: @ 80D6234 - push {r4,lr} - adds r4, r0, 0 - ldr r0, _080D6254 @ =gBattleAnimBankAttacker - ldrb r0, [r0] - bl GetBankSide - lsls r0, 24 - cmp r0, 0 - beq _080D625C - ldr r0, _080D6258 @ =gBattleAnimArgs - ldrh r1, [r4, 0x20] - ldrh r0, [r0] - subs r1, r0 - strh r1, [r4, 0x20] - b _080D6266 - .align 2, 0 -_080D6254: .4byte gBattleAnimBankAttacker -_080D6258: .4byte gBattleAnimArgs -_080D625C: - ldr r0, _080D6270 @ =gBattleAnimArgs - ldrh r0, [r0] - ldrh r1, [r4, 0x20] - adds r0, r1 - strh r0, [r4, 0x20] -_080D6266: - ldr r0, _080D6274 @ =sub_80D6278 - str r0, [r4, 0x1C] - pop {r4} - pop {r0} - bx r0 - .align 2, 0 -_080D6270: .4byte gBattleAnimArgs -_080D6274: .4byte sub_80D6278 - thumb_func_end sub_80D6234 - - thumb_func_start sub_80D6278 -sub_80D6278: @ 80D6278 - push {lr} - adds r2, r0, 0 - adds r0, 0x3F - ldrb r1, [r0] - movs r0, 0x20 - ands r0, r1 - cmp r0, 0 - beq _080D628E - adds r0, r2, 0 - bl move_anim_8074EE0 -_080D628E: - pop {r0} - bx r0 - thumb_func_end sub_80D6278 - - .align 2, 0 @ Don't pad with nop. diff --git a/asm/bubble.s b/asm/bubble.s deleted file mode 100755 index 466e31b0d..000000000 --- a/asm/bubble.s +++ /dev/null @@ -1,248 +0,0 @@ - .include "constants/gba_constants.inc" - .include "asm/macros.inc" - - .syntax unified - - .text - - @ bubble - - thumb_func_start sub_80D31C8 -sub_80D31C8: @ 80D31C8 - push {r4-r6,lr} - adds r6, r0, 0 - ldr r5, _080D31F0 @ =gBattleAnimBankAttacker - ldrb r0, [r5] - bl GetBankSide - lsls r0, 24 - cmp r0, 0 - beq _080D31F8 - ldrb r0, [r5] - movs r1, 0x2 - bl sub_8077ABC - lsls r0, 24 - lsrs r0, 24 - ldr r4, _080D31F4 @ =gBattleAnimArgs - ldrh r1, [r4] - subs r0, r1 - b _080D320A - .align 2, 0 -_080D31F0: .4byte gBattleAnimBankAttacker -_080D31F4: .4byte gBattleAnimArgs -_080D31F8: - ldrb r0, [r5] - movs r1, 0x2 - bl sub_8077ABC - lsls r0, 24 - ldr r4, _080D32D0 @ =gBattleAnimArgs - lsrs r0, 24 - ldrh r1, [r4] - adds r0, r1 -_080D320A: - strh r0, [r6, 0x20] - ldrb r0, [r5] - movs r1, 0x3 - bl sub_8077ABC - lsls r0, 24 - lsrs r0, 24 - ldrh r4, [r4, 0x2] - adds r0, r4 - strh r0, [r6, 0x22] - adds r2, r6, 0 - adds r2, 0x2C - ldrb r0, [r2] - movs r1, 0x40 - orrs r0, r1 - strb r0, [r2] - ldr r0, _080D32D4 @ =gBattleAnimBankAttacker - ldrb r0, [r0] - bl GetBankSide - lsls r0, 24 - cmp r0, 0 - beq _080D3240 - ldr r1, _080D32D0 @ =gBattleAnimArgs - ldrh r0, [r1, 0x4] - negs r0, r0 - strh r0, [r1, 0x4] -_080D3240: - ldr r5, _080D32D0 @ =gBattleAnimArgs - ldrh r0, [r5, 0xC] - strh r0, [r6, 0x2E] - ldrh r0, [r6, 0x20] - strh r0, [r6, 0x30] - ldr r4, _080D32D8 @ =gBattleAnimBankTarget - ldrb r0, [r4] - movs r1, 0x2 - bl sub_8077ABC - lsls r0, 24 - lsrs r0, 24 - strh r0, [r6, 0x32] - ldrh r0, [r6, 0x22] - strh r0, [r6, 0x34] - ldrb r0, [r4] - movs r1, 0x3 - bl sub_8077ABC - lsls r0, 24 - lsrs r0, 24 - strh r0, [r6, 0x36] - adds r0, r6, 0 - bl obj_translate_based_on_private_1_2_3_4 - ldr r0, _080D32DC @ =SpriteCallbackDummy - bl CreateInvisibleSpriteWithCallback - adds r4, r0, 0 - lsls r4, 24 - lsrs r4, 24 - strh r4, [r6, 0x38] - ldrb r0, [r5, 0x8] - movs r2, 0x4 - ldrsh r1, [r5, r2] - bl Sin - ldrh r1, [r6, 0x20] - subs r1, r0 - strh r1, [r6, 0x20] - ldrb r0, [r5, 0x8] - movs r2, 0x6 - ldrsh r1, [r5, r2] - bl Cos - ldrh r1, [r6, 0x22] - subs r1, r0 - strh r1, [r6, 0x22] - ldr r0, _080D32E0 @ =gSprites - lsls r1, r4, 4 - adds r1, r4 - lsls r1, 2 - adds r1, r0 - ldrh r0, [r5, 0x4] - strh r0, [r1, 0x2E] - ldrh r0, [r5, 0x6] - strh r0, [r1, 0x30] - ldrh r0, [r5, 0xA] - strh r0, [r1, 0x32] - ldrb r0, [r5, 0x8] - lsls r0, 8 - strh r0, [r1, 0x34] - ldrh r0, [r5, 0xC] - strh r0, [r1, 0x36] - ldr r1, _080D32E4 @ =sub_80D32E8 - str r1, [r6, 0x1C] - adds r0, r6, 0 - bl _call_via_r1 - pop {r4-r6} - pop {r0} - bx r0 - .align 2, 0 -_080D32D0: .4byte gBattleAnimArgs -_080D32D4: .4byte gBattleAnimBankAttacker -_080D32D8: .4byte gBattleAnimBankTarget -_080D32DC: .4byte SpriteCallbackDummy -_080D32E0: .4byte gSprites -_080D32E4: .4byte sub_80D32E8 - thumb_func_end sub_80D31C8 - - thumb_func_start sub_80D32E8 -sub_80D32E8: @ 80D32E8 - push {r4-r7,lr} - mov r7, r8 - push {r7} - sub sp, 0x4 - adds r5, r0, 0 - ldrh r1, [r5, 0x38] - lsls r1, 24 - lsrs r1, 24 - ldr r2, _080D3350 @ =gSprites - lsls r0, r1, 4 - adds r0, r1 - lsls r0, 2 - adds r7, r0, r2 - ldrh r4, [r7, 0x36] - lsls r4, 24 - lsrs r4, 24 - ldrh r0, [r7, 0x34] - mov r8, r0 - movs r0, 0x1 - strh r0, [r5, 0x2E] - adds r0, r5, 0 - bl sub_8078B5C - mov r1, r8 - lsrs r6, r1, 8 - movs r0, 0x2E - ldrsh r1, [r7, r0] - adds r0, r6, 0 - bl Sin - ldrh r1, [r5, 0x24] - adds r0, r1 - strh r0, [r5, 0x24] - movs r0, 0x30 - ldrsh r1, [r7, r0] - adds r0, r6, 0 - bl Cos - ldrh r1, [r5, 0x26] - adds r0, r1 - strh r0, [r5, 0x26] - ldrh r0, [r7, 0x32] - mov r1, r8 - adds r1, r0 - strh r1, [r7, 0x34] - subs r4, 0x1 - lsls r4, 24 - lsrs r4, 24 - cmp r4, 0 - beq _080D3354 - strh r4, [r7, 0x36] - b _080D335E - .align 2, 0 -_080D3350: .4byte gSprites -_080D3354: - ldr r0, _080D336C @ =sub_80D3370 - str r0, [r5, 0x1C] - adds r0, r7, 0 - bl DestroySprite -_080D335E: - add sp, 0x4 - pop {r3} - mov r8, r3 - pop {r4-r7} - pop {r0} - bx r0 - .align 2, 0 -_080D336C: .4byte sub_80D3370 - thumb_func_end sub_80D32E8 - - thumb_func_start sub_80D3370 -sub_80D3370: @ 80D3370 - push {lr} - adds r3, r0, 0 - adds r3, 0x2C - ldrb r2, [r3] - movs r1, 0x41 - negs r1, r1 - ands r1, r2 - strb r1, [r3] - ldr r1, _080D3390 @ =sub_8078600 - str r1, [r0, 0x1C] - ldr r1, _080D3394 @ =sub_80D3398 - bl StoreSpriteCallbackInData - pop {r0} - bx r0 - .align 2, 0 -_080D3390: .4byte sub_8078600 -_080D3394: .4byte sub_80D3398 - thumb_func_end sub_80D3370 - - thumb_func_start sub_80D3398 -sub_80D3398: @ 80D3398 - push {lr} - movs r1, 0xA - strh r1, [r0, 0x2E] - ldr r1, _080D33AC @ =sub_80782D8 - str r1, [r0, 0x1C] - ldr r1, _080D33B0 @ =move_anim_8074EE0 - bl StoreSpriteCallbackInData - pop {r0} - bx r0 - .align 2, 0 -_080D33AC: .4byte sub_80782D8 -_080D33B0: .4byte move_anim_8074EE0 - thumb_func_end sub_80D3398 - - .align 2, 0 @ Don't pad with nop. diff --git a/asm/contest_ai.s b/asm/contest_ai.s index 33862eb8c..94347f2ad 100644 --- a/asm/contest_ai.s +++ b/asm/contest_ai.s @@ -1315,7 +1315,7 @@ _0812923C: thumb_func_start ContestAICmd_get_contest_type ContestAICmd_get_contest_type: @ 8129244 ldr r1, _08129258 @ =gSharedMem + 0x192E4 - ldr r0, _0812925C @ =gScriptContestCategory + ldr r0, _0812925C @ =gSpecialVar_ContestCategory ldrh r0, [r0] strh r0, [r1, 0x18] ldr r1, _08129260 @ =gAIScriptPtr @@ -1325,7 +1325,7 @@ ContestAICmd_get_contest_type: @ 8129244 bx lr .align 2, 0 _08129258: .4byte gSharedMem + 0x192E4 -_0812925C: .4byte gScriptContestCategory +_0812925C: .4byte gSpecialVar_ContestCategory _08129260: .4byte gAIScriptPtr thumb_func_end ContestAICmd_get_contest_type diff --git a/asm/contest_effect.s b/asm/contest_effect.s index 2b339670b..d06789976 100644 --- a/asm/contest_effect.s +++ b/asm/contest_effect.s @@ -2412,7 +2412,7 @@ ContestEffect_44: @ 80B8EBC adds r0, r3 ldrb r0, [r0, 0x1] lsls r0, 29 - ldr r1, _080B8EF8 @ =gScriptContestCategory + ldr r1, _080B8EF8 @ =gSpecialVar_ContestCategory lsrs r0, 29 ldrh r1, [r1] cmp r0, r1 @@ -2427,7 +2427,7 @@ _080B8EEA: .align 2, 0 _080B8EF0: .4byte gContestMoves _080B8EF4: .4byte gSharedMem + 0x192D0 -_080B8EF8: .4byte gScriptContestCategory +_080B8EF8: .4byte gSpecialVar_ContestCategory thumb_func_end ContestEffect_44 thumb_func_start ContestEffect_45 diff --git a/asm/contest_link_80C2020.s b/asm/contest_link_80C2020.s index 101f25cda..5ade1419c 100644 --- a/asm/contest_link_80C2020.s +++ b/asm/contest_link_80C2020.s @@ -1713,7 +1713,7 @@ sub_80C2E14: @ 80C2E14 bl sub_80BE284 movs r0, 0x2 bl sub_810FB10 - ldr r0, _080C2E88 @ =gScriptContestRank + ldr r0, _080C2E88 @ =gSpecialVar_ContestRank ldrb r0, [r0] bl sub_80B2A7C movs r0, 0xFE @@ -1750,7 +1750,7 @@ sub_80C2E14: @ 80C2E14 .align 2, 0 _080C2E80: .4byte gUnknown_02038690 _080C2E84: .4byte gContestPlayerMonIndex -_080C2E88: .4byte gScriptContestRank +_080C2E88: .4byte gSpecialVar_ContestRank _080C2E8C: .4byte gSharedMem _080C2E90: .4byte 0x00015ddf _080C2E94: .4byte 0x00015dde @@ -2971,7 +2971,7 @@ _080C3808: .4byte gIsLinkContest _080C380C: .4byte 0x0600e000 _080C3810: .4byte gUnknown_08E964B8 _080C3814: - ldr r0, _080C3830 @ =gScriptContestRank + ldr r0, _080C3830 @ =gSpecialVar_ContestRank ldrh r2, [r0] cmp r2, 0 bne _080C383C @@ -2986,7 +2986,7 @@ _080C3814: str r1, [sp, 0xC] b _080C3870 .align 2, 0 -_080C3830: .4byte gScriptContestRank +_080C3830: .4byte gSpecialVar_ContestRank _080C3834: .4byte 0x0600e000 _080C3838: .4byte gUnknown_08E964B8 _080C383C: @@ -3040,7 +3040,7 @@ _080C3884: bl sub_809D104 _080C389E: adds r4, 0xD - ldr r0, _080C38C8 @ =gScriptContestCategory + ldr r0, _080C38C8 @ =gSpecialVar_ContestCategory ldrh r0, [r0] cmp r0, 0 bne _080C38CC @@ -3058,7 +3058,7 @@ _080C389E: .align 2, 0 _080C38C0: .4byte 0x0600e000 _080C38C4: .4byte gUnknown_08E964B8 -_080C38C8: .4byte gScriptContestCategory +_080C38C8: .4byte gSpecialVar_ContestCategory _080C38CC: cmp r0, 0x1 bne _080C38EC @@ -4545,15 +4545,15 @@ sub_80C43F4: @ 80C43F4 adds r5, r0, 0 cmp r5, 0 beq _080C4422 - ldr r4, _080C4434 @ =gScriptContestCategory + ldr r4, _080C4434 @ =gSpecialVar_ContestCategory ldrb r0, [r4] - ldr r1, _080C4438 @ =gScriptContestRank + ldr r1, _080C4438 @ =gSpecialVar_ContestRank ldrb r1, [r1] bl sub_80AE398 ldrb r0, [r4] bl sub_80AE82C _080C4422: - ldr r0, _080C443C @ =gScriptResult + ldr r0, _080C443C @ =gSpecialVar_Result strh r5, [r0] pop {r4,r5} pop {r0} @@ -4561,9 +4561,9 @@ _080C4422: .align 2, 0 _080C442C: .4byte gUnknown_02038694 _080C4430: .4byte gPlayerParty -_080C4434: .4byte gScriptContestCategory -_080C4438: .4byte gScriptContestRank -_080C443C: .4byte gScriptResult +_080C4434: .4byte gSpecialVar_ContestCategory +_080C4438: .4byte gSpecialVar_ContestRank +_080C443C: .4byte gSpecialVar_Result thumb_func_end sub_80C43F4 thumb_func_start sub_80C4440 @@ -4576,7 +4576,7 @@ sub_80C4440: @ 80C4440 muls r1, r0 ldr r0, _080C4468 @ =gPlayerParty adds r2, r1, r0 - ldr r0, _080C446C @ =gScriptContestCategory + ldr r0, _080C446C @ =gSpecialVar_ContestCategory ldrh r0, [r0] cmp r0, 0x4 bhi _080C44B2 @@ -4588,7 +4588,7 @@ sub_80C4440: @ 80C4440 .align 2, 0 _080C4464: .4byte gUnknown_02038694 _080C4468: .4byte gPlayerParty -_080C446C: .4byte gScriptContestCategory +_080C446C: .4byte gSpecialVar_ContestCategory _080C4470: .4byte _080C4474 .align 2, 0 _080C4474: @@ -4618,7 +4618,7 @@ _080C44A0: movs r1, 0x36 _080C44A4: bl GetMonData - ldr r1, _080C44BC @ =gScriptContestRank + ldr r1, _080C44BC @ =gSpecialVar_ContestRank ldrh r1, [r1] cmp r0, r1 bls _080C44B2 @@ -4629,7 +4629,7 @@ _080C44B2: pop {r1} bx r1 .align 2, 0 -_080C44BC: .4byte gScriptContestRank +_080C44BC: .4byte gSpecialVar_ContestRank thumb_func_end sub_80C4440 thumb_func_start sub_80C44C0 @@ -4645,7 +4645,7 @@ sub_80C44C0: @ 80C44C0 beq _080C44D4 b _080C465E _080C44D4: - ldr r0, _080C44F0 @ =gScriptContestCategory + ldr r0, _080C44F0 @ =gSpecialVar_ContestCategory ldrh r0, [r0] cmp r0, 0x4 bls _080C44DE @@ -4659,7 +4659,7 @@ _080C44DE: .align 2, 0 _080C44E8: .4byte gUnknown_02038690 _080C44EC: .4byte gContestPlayerMonIndex -_080C44F0: .4byte gScriptContestCategory +_080C44F0: .4byte gSpecialVar_ContestCategory _080C44F4: .4byte _080C44F8 .align 2, 0 _080C44F8: @@ -4681,7 +4681,7 @@ _080C450C: lsrs r1, r0, 24 mov r0, sp strb r1, [r0] - ldr r0, _080C4550 @ =gScriptContestRank + ldr r0, _080C4550 @ =gSpecialVar_ContestRank ldrh r0, [r0] cmp r1, r0 bls _080C4530 @@ -4703,7 +4703,7 @@ _080C4538: .align 2, 0 _080C4548: .4byte gUnknown_02038694 _080C454C: .4byte gPlayerParty -_080C4550: .4byte gScriptContestRank +_080C4550: .4byte gSpecialVar_ContestRank _080C4554: mov r4, sp ldr r7, _080C458C @ =gUnknown_02038694 @@ -4717,7 +4717,7 @@ _080C4554: strb r0, [r4] mov r0, sp ldrb r2, [r0] - ldr r0, _080C4594 @ =gScriptContestRank + ldr r0, _080C4594 @ =gSpecialVar_ContestRank ldrh r0, [r0] cmp r2, r0 bhi _080C465E @@ -4734,7 +4734,7 @@ _080C4554: .align 2, 0 _080C458C: .4byte gUnknown_02038694 _080C4590: .4byte gPlayerParty -_080C4594: .4byte gScriptContestRank +_080C4594: .4byte gSpecialVar_ContestRank _080C4598: mov r4, sp ldr r7, _080C45D0 @ =gUnknown_02038694 @@ -4748,7 +4748,7 @@ _080C4598: strb r0, [r4] mov r0, sp ldrb r2, [r0] - ldr r0, _080C45D8 @ =gScriptContestRank + ldr r0, _080C45D8 @ =gSpecialVar_ContestRank ldrh r0, [r0] cmp r2, r0 bhi _080C465E @@ -4765,7 +4765,7 @@ _080C4598: .align 2, 0 _080C45D0: .4byte gUnknown_02038694 _080C45D4: .4byte gPlayerParty -_080C45D8: .4byte gScriptContestRank +_080C45D8: .4byte gSpecialVar_ContestRank _080C45DC: mov r4, sp ldr r7, _080C4618 @ =gUnknown_02038694 @@ -4779,7 +4779,7 @@ _080C45DC: strb r0, [r4] mov r0, sp ldrb r2, [r0] - ldr r0, _080C4620 @ =gScriptContestRank + ldr r0, _080C4620 @ =gSpecialVar_ContestRank ldrh r0, [r0] cmp r2, r0 bhi _080C465E @@ -4799,7 +4799,7 @@ _080C4610: .align 2, 0 _080C4618: .4byte gUnknown_02038694 _080C461C: .4byte gPlayerParty -_080C4620: .4byte gScriptContestRank +_080C4620: .4byte gSpecialVar_ContestRank _080C4624: mov r4, sp ldr r7, _080C4668 @ =gUnknown_02038694 @@ -4813,7 +4813,7 @@ _080C4624: strb r0, [r4] mov r0, sp ldrb r2, [r0] - ldr r0, _080C4670 @ =gScriptContestRank + ldr r0, _080C4670 @ =gSpecialVar_ContestRank ldrh r0, [r0] cmp r2, r0 bhi _080C465E @@ -4836,7 +4836,7 @@ _080C465E: .align 2, 0 _080C4668: .4byte gUnknown_02038694 _080C466C: .4byte gPlayerParty -_080C4670: .4byte gScriptContestRank +_080C4670: .4byte gSpecialVar_ContestRank thumb_func_end sub_80C44C0 thumb_func_start sub_80C4674 @@ -5432,7 +5432,7 @@ _080C4AB8: bl sub_80C4B34 ldr r1, _080C4AFC @ =gUnknown_0203869B strb r0, [r1] - ldr r0, _080C4B00 @ =gScriptContestCategory + ldr r0, _080C4B00 @ =gSpecialVar_ContestCategory ldrb r0, [r0] bl sub_80AE82C ldr r1, _080C4B04 @ =sub_80C8EBC @@ -5448,7 +5448,7 @@ _080C4AB8: .align 2, 0 _080C4AF8: .4byte gTasks + 0x8 _080C4AFC: .4byte gUnknown_0203869B -_080C4B00: .4byte gScriptContestCategory +_080C4B00: .4byte gSpecialVar_ContestCategory _080C4B04: .4byte sub_80C8EBC _080C4B08: .4byte sub_80C4B0C thumb_func_end sub_80C4A44 diff --git a/asm/devil.s b/asm/devil.s deleted file mode 100755 index ae552f231..000000000 --- a/asm/devil.s +++ /dev/null @@ -1,163 +0,0 @@ - .include "constants/gba_constants.inc" - .include "asm/macros.inc" - - .syntax unified - - .text - - thumb_func_start sub_80D2ABC -sub_80D2ABC: @ 80D2ABC - push {r4,lr} - adds r4, r0, 0 - movs r1, 0x34 - ldrsh r0, [r4, r1] - cmp r0, 0 - bne _080D2AF6 - ldr r1, _080D2BB8 @ =gBattleAnimArgs - ldrh r0, [r1] - ldrh r2, [r4, 0x20] - adds r0, r2 - strh r0, [r4, 0x20] - ldrh r0, [r1, 0x2] - ldrh r1, [r4, 0x22] - adds r0, r1 - strh r0, [r4, 0x22] - adds r0, r4, 0 - movs r1, 0 - bl StartSpriteAnim - ldr r0, _080D2BBC @ =gBattleAnimBankTarget - ldrb r0, [r0] - bl sub_8079E90 - subs r0, 0x1 - adds r1, r4, 0 - adds r1, 0x43 - strb r0, [r1] - movs r0, 0x1 - strh r0, [r4, 0x32] -_080D2AF6: - ldrh r0, [r4, 0x32] - ldrh r2, [r4, 0x2E] - adds r0, r2 - strh r0, [r4, 0x2E] - movs r1, 0x2E - ldrsh r0, [r4, r1] - lsls r1, r0, 2 - adds r0, r1, 0 - cmp r1, 0 - bge _080D2B0C - adds r0, 0xFF -_080D2B0C: - asrs r0, 8 - lsls r0, 8 - subs r0, r1, r0 - strh r0, [r4, 0x30] - lsls r0, 16 - cmp r0, 0 - bge _080D2B1E - movs r0, 0 - strh r0, [r4, 0x30] -_080D2B1E: - movs r0, 0x30 - ldrsh r2, [r4, r0] - movs r1, 0x2E - ldrsh r0, [r4, r1] - cmp r0, 0 - bge _080D2B2C - adds r0, 0x3 -_080D2B2C: - asrs r0, 2 - movs r1, 0x1E - subs r1, r0 - adds r0, r2, 0 - bl Cos - strh r0, [r4, 0x24] - movs r0, 0x30 - ldrsh r2, [r4, r0] - movs r1, 0x2E - ldrsh r0, [r4, r1] - cmp r0, 0 - bge _080D2B48 - adds r0, 0x7 -_080D2B48: - asrs r0, 3 - movs r1, 0xA - subs r1, r0 - adds r0, r2, 0 - bl Sin - strh r0, [r4, 0x26] - movs r2, 0x30 - ldrsh r0, [r4, r2] - cmp r0, 0x80 - ble _080D2B6C - ldrh r1, [r4, 0x32] - movs r2, 0x32 - ldrsh r0, [r4, r2] - cmp r0, 0 - ble _080D2B6C - ldr r0, _080D2BC0 @ =0x0000ffff - strh r0, [r4, 0x32] -_080D2B6C: - movs r1, 0x30 - ldrsh r0, [r4, r1] - cmp r0, 0 - bne _080D2B80 - movs r2, 0x32 - ldrsh r0, [r4, r2] - cmp r0, 0 - bge _080D2B80 - movs r0, 0x1 - strh r0, [r4, 0x32] -_080D2B80: - ldrh r0, [r4, 0x34] - adds r1, r0, 0x1 - strh r1, [r4, 0x34] - subs r0, 0x9 - lsls r0, 16 - lsrs r0, 16 - cmp r0, 0x46 - bls _080D2BC4 - movs r0, 0x2E - ldrsh r1, [r4, r0] - lsrs r0, r1, 31 - adds r0, r1, r0 - asrs r0, 1 - lsls r0, 1 - subs r1, r0 - adds r3, r4, 0 - adds r3, 0x3E - movs r0, 0x1 - ands r1, r0 - lsls r1, 2 - ldrb r2, [r3] - movs r0, 0x5 - negs r0, r0 - ands r0, r2 - orrs r0, r1 - strb r0, [r3] - b _080D2BD2 - .align 2, 0 -_080D2BB8: .4byte gBattleAnimArgs -_080D2BBC: .4byte gBattleAnimBankTarget -_080D2BC0: .4byte 0x0000ffff -_080D2BC4: - adds r2, r4, 0 - adds r2, 0x3E - ldrb r1, [r2] - movs r0, 0x5 - negs r0, r0 - ands r0, r1 - strb r0, [r2] -_080D2BD2: - movs r1, 0x34 - ldrsh r0, [r4, r1] - cmp r0, 0x5A - ble _080D2BE0 - adds r0, r4, 0 - bl move_anim_8072740 -_080D2BE0: - pop {r4} - pop {r0} - bx r0 - thumb_func_end sub_80D2ABC - - .align 2, 0 @ Don't pad with nop. diff --git a/asm/easy_chat.s b/asm/easy_chat.s index 547ce174e..e08d71083 100644 --- a/asm/easy_chat.s +++ b/asm/easy_chat.s @@ -1578,13 +1578,13 @@ _080E6D3E: beq _080E6D58 b _080E6D72 _080E6D44: - ldr r0, _080E6D50 @ =gScriptResult + ldr r0, _080E6D50 @ =gSpecialVar_Result strh r1, [r0] ldr r0, _080E6D54 @ =sub_80E752C bl sub_80E682C b _080E6D72 .align 2, 0 -_080E6D50: .4byte gScriptResult +_080E6D50: .4byte gSpecialVar_Result _080E6D54: .4byte sub_80E752C _080E6D58: ldr r1, _080E6D60 @ =gSharedMem + 0x1000 @@ -1722,7 +1722,7 @@ _080E6E56: beq _080E6EDC b _080E6F5E _080E6E5C: - ldr r7, _080E6EC8 @ =gScriptResult + ldr r7, _080E6EC8 @ =gSpecialVar_Result bl sub_80E7FA8 lsls r0, 24 lsrs r0, 24 @@ -1774,7 +1774,7 @@ _080E6EBE: bl sub_80E682C b _080E6F5E .align 2, 0 -_080E6EC8: .4byte gScriptResult +_080E6EC8: .4byte gSpecialVar_Result _080E6ECC: .4byte gSpecialVar_0x8004 _080E6ED0: .4byte 0x00009c7c _080E6ED4: .4byte 0x0000ffff diff --git a/asm/fury_cutter_count.s b/asm/fury_cutter_count.s deleted file mode 100755 index 10444b254..000000000 --- a/asm/fury_cutter_count.s +++ /dev/null @@ -1,48 +0,0 @@ - .include "constants/gba_constants.inc" - .include "asm/macros.inc" - - .syntax unified - - .text - - @ fury_cutter_count - - thumb_func_start sub_80D30AC -sub_80D30AC: @ 80D30AC - push {lr} - lsls r0, 24 - lsrs r0, 24 - ldr r3, _080D30C8 @ =gBattleAnimArgs - ldr r1, _080D30CC @ =gDisableStructMoveAnim - ldr r1, [r1] - ldrb r2, [r1, 0x10] - movs r1, 0x1 - ands r1, r2 - strh r1, [r3, 0xE] - bl DestroyAnimVisualTask - pop {r0} - bx r0 - .align 2, 0 -_080D30C8: .4byte gBattleAnimArgs -_080D30CC: .4byte gDisableStructMoveAnim - thumb_func_end sub_80D30AC - - thumb_func_start update_fury_cutter_counter_copy -update_fury_cutter_counter_copy: @ 80D30D0 - push {lr} - lsls r0, 24 - lsrs r0, 24 - ldr r2, _080D30E8 @ =gBattleAnimArgs - ldr r1, _080D30EC @ =gDisableStructMoveAnim - ldr r1, [r1] - ldrb r1, [r1, 0x10] - strh r1, [r2, 0xE] - bl DestroyAnimVisualTask - pop {r0} - bx r0 - .align 2, 0 -_080D30E8: .4byte gBattleAnimArgs -_080D30EC: .4byte gDisableStructMoveAnim - thumb_func_end update_fury_cutter_counter_copy - - .align 2, 0 @ Don't pad with nop. diff --git a/asm/guard.s b/asm/guard.s deleted file mode 100755 index 13ead6879..000000000 --- a/asm/guard.s +++ /dev/null @@ -1,80 +0,0 @@ - .include "constants/gba_constants.inc" - .include "asm/macros.inc" - - .syntax unified - - .text - - thumb_func_start sub_80D3014 -sub_80D3014: @ 80D3014 - push {r4,r5,lr} - adds r5, r0, 0 - ldr r0, _080D3058 @ =gBattleTypeFlags - ldrh r1, [r0] - movs r0, 0x1 - ands r0, r1 - cmp r0, 0 - beq _080D3060 - ldr r4, _080D305C @ =gBattleAnimBankAttacker - ldrb r1, [r4] - movs r0, 0x2 - eors r0, r1 - bl IsAnimBankSpriteVisible - lsls r0, 24 - cmp r0, 0 - beq _080D3060 - ldrb r0, [r4] - adds r2, r5, 0 - adds r2, 0x20 - adds r3, r5, 0 - adds r3, 0x22 - movs r1, 0 - bl sub_807A3FC - ldrh r0, [r5, 0x22] - adds r0, 0x28 - strh r0, [r5, 0x22] - adds r0, r5, 0 - movs r1, 0x1 - bl StartSpriteAffineAnim - b _080D3080 - .align 2, 0 -_080D3058: .4byte gBattleTypeFlags -_080D305C: .4byte gBattleAnimBankAttacker -_080D3060: - ldr r4, _080D30A0 @ =gBattleAnimBankAttacker - ldrb r0, [r4] - movs r1, 0 - bl sub_8077ABC - lsls r0, 24 - lsrs r0, 24 - strh r0, [r5, 0x20] - ldrb r0, [r4] - movs r1, 0x1 - bl sub_8077ABC - lsls r0, 24 - lsrs r0, 24 - adds r0, 0x28 - strh r0, [r5, 0x22] -_080D3080: - movs r0, 0xD - strh r0, [r5, 0x2E] - ldrh r0, [r5, 0x20] - strh r0, [r5, 0x32] - ldrh r0, [r5, 0x22] - subs r0, 0x48 - strh r0, [r5, 0x36] - ldr r0, _080D30A4 @ =sub_8078B34 - str r0, [r5, 0x1C] - ldr r1, _080D30A8 @ =move_anim_8072740 - adds r0, r5, 0 - bl StoreSpriteCallbackInData - pop {r4,r5} - pop {r0} - bx r0 - .align 2, 0 -_080D30A0: .4byte gBattleAnimBankAttacker -_080D30A4: .4byte sub_8078B34 -_080D30A8: .4byte move_anim_8072740 - thumb_func_end sub_80D3014 - - .align 2, 0 @ Don't pad with nop. diff --git a/asm/heated_rock.s b/asm/heated_rock.s deleted file mode 100755 index eb957a6f1..000000000 --- a/asm/heated_rock.s +++ /dev/null @@ -1,302 +0,0 @@ - .include "constants/gba_constants.inc" - .include "asm/macros.inc" - - .syntax unified - - .text - - @ heated_rock - - thumb_func_start sub_80D58FC -sub_80D58FC: @ 80D58FC - push {r4,lr} - adds r4, r0, 0 - bl sub_80D59B0 - adds r0, r4, 0 - adds r0, 0x3E - ldrb r1, [r0] - movs r0, 0x4 - ands r0, r1 - cmp r0, 0 - beq _080D5936 - ldr r3, _080D593C @ =gTasks - movs r0, 0x3C - ldrsh r1, [r4, r0] - lsls r1, 1 - movs r0, 0x3A - ldrsh r2, [r4, r0] - lsls r0, r2, 2 - adds r0, r2 - lsls r0, 3 - adds r1, r0 - adds r3, 0x8 - adds r1, r3 - ldrh r0, [r1] - subs r0, 0x1 - strh r0, [r1] - adds r0, r4, 0 - bl DestroySprite -_080D5936: - pop {r4} - pop {r0} - bx r0 - .align 2, 0 -_080D593C: .4byte gTasks - thumb_func_end sub_80D58FC - - thumb_func_start sub_80D5940 -sub_80D5940: @ 80D5940 - push {r4,lr} - lsls r0, 24 - lsrs r0, 24 - ldr r2, _080D5978 @ =gSprites - lsls r1, r0, 4 - adds r1, r0 - lsls r1, 2 - adds r1, r2 - ldrh r2, [r1, 0x26] - ldrh r0, [r1, 0x22] - adds r2, r0 - adds r1, 0x29 - movs r0, 0 - ldrsb r0, [r1, r0] - adds r0, r2 - lsls r0, 16 - lsrs r4, r0, 16 - ldr r0, _080D597C @ =gBattleAnimBankAttacker - ldrb r0, [r0] - bl GetBankSide - lsls r0, 24 - cmp r0, 0 - bne _080D5980 - lsls r0, r4, 16 - movs r1, 0x94 - lsls r1, 15 - b _080D5986 - .align 2, 0 -_080D5978: .4byte gSprites -_080D597C: .4byte gBattleAnimBankAttacker -_080D5980: - lsls r0, r4, 16 - movs r1, 0xB0 - lsls r1, 14 -_080D5986: - adds r0, r1 - lsrs r4, r0, 16 - adds r0, r4, 0 - pop {r4} - pop {r1} - bx r1 - thumb_func_end sub_80D5940 - - thumb_func_start sub_80D5994 -sub_80D5994: @ 80D5994 - movs r3, 0 - strh r3, [r0, 0x2E] - strh r3, [r0, 0x30] - ldrh r3, [r0, 0x20] - lsls r3, 3 - strh r3, [r0, 0x32] - ldrh r3, [r0, 0x22] - lsls r3, 3 - strh r3, [r0, 0x34] - lsls r1, 3 - strh r1, [r0, 0x36] - lsls r2, 3 - strh r2, [r0, 0x38] - bx lr - thumb_func_end sub_80D5994 - - thumb_func_start sub_80D59B0 -sub_80D59B0: @ 80D59B0 - push {lr} - adds r2, r0, 0 - ldrh r0, [r2, 0x2E] - adds r0, 0x1 - strh r0, [r2, 0x2E] - lsls r0, 16 - asrs r0, 16 - cmp r0, 0x2 - ble _080D59DA - movs r0, 0 - strh r0, [r2, 0x2E] - ldrh r0, [r2, 0x30] - adds r0, 0x1 - strh r0, [r2, 0x30] - ldrh r0, [r2, 0x30] - adds r1, r0, 0 - muls r1, r0 - adds r0, r1, 0 - ldrh r3, [r2, 0x34] - adds r0, r3 - strh r0, [r2, 0x34] -_080D59DA: - ldrh r0, [r2, 0x36] - ldrh r1, [r2, 0x32] - adds r0, r1 - strh r0, [r2, 0x32] - lsls r0, 16 - asrs r0, 19 - strh r0, [r2, 0x20] - ldrh r1, [r2, 0x38] - ldrh r3, [r2, 0x34] - adds r1, r3 - strh r1, [r2, 0x34] - lsls r1, 16 - asrs r3, r1, 19 - strh r3, [r2, 0x22] - adds r0, 0x8 - lsls r0, 16 - movs r1, 0x80 - lsls r1, 17 - cmp r0, r1 - bhi _080D5A10 - adds r1, r3, 0 - movs r0, 0x8 - negs r0, r0 - cmp r1, r0 - blt _080D5A10 - cmp r1, 0x78 - ble _080D5A1C -_080D5A10: - adds r0, r2, 0 - adds r0, 0x3E - ldrb r1, [r0] - movs r2, 0x4 - orrs r1, r2 - strb r1, [r0] -_080D5A1C: - pop {r0} - bx r0 - thumb_func_end sub_80D59B0 - - thumb_func_start sub_80D5A20 -sub_80D5A20: @ 80D5A20 - push {r4,r5,lr} - ldr r3, _080D5A64 @ =gBattleAnimArgs - ldrh r1, [r3] - movs r2, 0 - strh r1, [r0, 0x20] - ldrh r1, [r3, 0x2] - strh r1, [r0, 0x22] - strh r2, [r0, 0x2E] - strh r2, [r0, 0x30] - strh r2, [r0, 0x32] - ldrh r1, [r3, 0x4] - strh r1, [r0, 0x3A] - ldrh r1, [r3, 0x6] - strh r1, [r0, 0x3C] - ldrh r4, [r0, 0x4] - lsls r2, r4, 22 - lsrs r2, 22 - movs r5, 0x8 - ldrsh r1, [r3, r5] - lsls r1, 4 - adds r2, r1 - ldr r3, _080D5A68 @ =0x000003ff - adds r1, r3, 0 - ands r2, r1 - ldr r1, _080D5A6C @ =0xfffffc00 - ands r1, r4 - orrs r1, r2 - strh r1, [r0, 0x4] - ldr r1, _080D5A70 @ =sub_80D5A74 - str r1, [r0, 0x1C] - pop {r4,r5} - pop {r0} - bx r0 - .align 2, 0 -_080D5A64: .4byte gBattleAnimArgs -_080D5A68: .4byte 0x000003ff -_080D5A6C: .4byte 0xfffffc00 -_080D5A70: .4byte sub_80D5A74 - thumb_func_end sub_80D5A20 - - thumb_func_start sub_80D5A74 -sub_80D5A74: @ 80D5A74 - push {r4,lr} - adds r2, r0, 0 - movs r1, 0x2E - ldrsh r0, [r2, r1] - cmp r0, 0x1 - beq _080D5AA6 - cmp r0, 0x1 - bgt _080D5A8A - cmp r0, 0 - beq _080D5A90 - b _080D5B04 -_080D5A8A: - cmp r0, 0x2 - beq _080D5AC4 - b _080D5B04 -_080D5A90: - ldrh r1, [r2, 0x3A] - movs r3, 0x3A - ldrsh r0, [r2, r3] - cmp r0, 0 - beq _080D5AA0 - subs r0, r1, 0x1 - strh r0, [r2, 0x3A] - b _080D5B04 -_080D5AA0: - ldrh r0, [r2, 0x2E] - adds r0, 0x1 - strh r0, [r2, 0x2E] -_080D5AA6: - ldrh r0, [r2, 0x22] - adds r0, 0x8 - strh r0, [r2, 0x22] - lsls r0, 16 - asrs r0, 16 - ldrh r3, [r2, 0x3C] - movs r4, 0x3C - ldrsh r1, [r2, r4] - cmp r0, r1 - blt _080D5B04 - strh r3, [r2, 0x22] - ldrh r0, [r2, 0x2E] - adds r0, 0x1 - strh r0, [r2, 0x2E] - b _080D5B04 -_080D5AC4: - ldrh r0, [r2, 0x30] - adds r0, 0x1 - strh r0, [r2, 0x30] - lsls r0, 16 - asrs r0, 16 - cmp r0, 0x1 - ble _080D5AF0 - movs r0, 0 - strh r0, [r2, 0x30] - ldrh r0, [r2, 0x32] - adds r0, 0x1 - strh r0, [r2, 0x32] - movs r1, 0x1 - ands r0, r1 - cmp r0, 0 - beq _080D5AEC - ldr r0, _080D5AE8 @ =0x0000fffd - b _080D5AEE - .align 2, 0 -_080D5AE8: .4byte 0x0000fffd -_080D5AEC: - movs r0, 0x3 -_080D5AEE: - strh r0, [r2, 0x26] -_080D5AF0: - ldrh r0, [r2, 0x34] - adds r0, 0x1 - strh r0, [r2, 0x34] - lsls r0, 16 - asrs r0, 16 - cmp r0, 0x10 - ble _080D5B04 - adds r0, r2, 0 - bl move_anim_8072740 -_080D5B04: - pop {r4} - pop {r0} - bx r0 - thumb_func_end sub_80D5A74 - - .align 2, 0 @ Don't pad with nop. diff --git a/asm/liquid_ball.s b/asm/liquid_ball.s deleted file mode 100755 index 6af030ecf..000000000 --- a/asm/liquid_ball.s +++ /dev/null @@ -1,353 +0,0 @@ - .include "constants/gba_constants.inc" - .include "asm/macros.inc" - - .syntax unified - - .text - - @ liquid_ball - - thumb_func_start sub_80D3554 -sub_80D3554: @ 80D3554 - push {r4,r5,lr} - adds r5, r0, 0 - movs r1, 0x1 - bl sub_80787B0 - movs r0, 0x1E - strh r0, [r5, 0x2E] - ldrh r0, [r5, 0x20] - strh r0, [r5, 0x30] - ldr r4, _080D35BC @ =gBattleAnimBankTarget - ldrb r0, [r4] - movs r1, 0x2 - bl sub_8077ABC - lsls r0, 24 - lsrs r0, 24 - strh r0, [r5, 0x32] - ldrh r0, [r5, 0x22] - strh r0, [r5, 0x34] - ldrb r0, [r4] - movs r1, 0x3 - bl sub_8077ABC - lsls r0, 24 - lsrs r0, 24 - strh r0, [r5, 0x36] - adds r0, r5, 0 - bl obj_translate_based_on_private_1_2_3_4 - movs r0, 0x2E - ldrsh r1, [r5, r0] - movs r0, 0xD2 - lsls r0, 8 - bl __divsi3 - strh r0, [r5, 0x38] - ldr r0, _080D35C0 @ =gBattleAnimArgs - ldrh r2, [r0, 0x6] - strh r2, [r5, 0x3C] - ldrh r1, [r0, 0xE] - movs r3, 0xE - ldrsh r0, [r0, r3] - cmp r0, 0x7F - ble _080D35C4 - adds r0, r1, 0 - subs r0, 0x7F - lsls r0, 8 - strh r0, [r5, 0x3A] - negs r0, r2 - strh r0, [r5, 0x3C] - b _080D35C8 - .align 2, 0 -_080D35BC: .4byte gBattleAnimBankTarget -_080D35C0: .4byte gBattleAnimArgs -_080D35C4: - lsls r0, r1, 8 - strh r0, [r5, 0x3A] -_080D35C8: - ldr r1, _080D35D8 @ =sub_80D35DC - str r1, [r5, 0x1C] - adds r0, r5, 0 - bl _call_via_r1 - pop {r4,r5} - pop {r0} - bx r0 - .align 2, 0 -_080D35D8: .4byte sub_80D35DC - thumb_func_end sub_80D3554 - - thumb_func_start sub_80D35DC -sub_80D35DC: @ 80D35DC - push {r4,lr} - adds r4, r0, 0 - bl sub_8078B5C - lsls r0, 24 - cmp r0, 0 - beq _080D35F0 - adds r0, r4, 0 - bl move_anim_8072740 -_080D35F0: - ldrh r0, [r4, 0x3A] - lsls r0, 16 - asrs r0, 24 - movs r2, 0x3C - ldrsh r1, [r4, r2] - bl Sin - ldrh r1, [r4, 0x26] - adds r0, r1 - strh r0, [r4, 0x26] - movs r2, 0x3A - ldrsh r0, [r4, r2] - movs r2, 0x38 - ldrsh r1, [r4, r2] - adds r0, r1 - asrs r0, 8 - cmp r0, 0x7F - ble _080D3620 - movs r0, 0 - strh r0, [r4, 0x3A] - ldrh r0, [r4, 0x3C] - negs r0, r0 - strh r0, [r4, 0x3C] - b _080D3628 -_080D3620: - ldrh r0, [r4, 0x38] - ldrh r1, [r4, 0x3A] - adds r0, r1 - strh r0, [r4, 0x3A] -_080D3628: - pop {r4} - pop {r0} - bx r0 - thumb_func_end sub_80D35DC - - thumb_func_start sub_80D3630 -sub_80D3630: @ 80D3630 - lsls r0, 24 - lsrs r0, 24 - ldr r2, _080D3650 @ =gTasks - lsls r1, r0, 2 - adds r1, r0 - lsls r1, 3 - adds r1, r2 - ldr r3, _080D3654 @ =gBattleAnimArgs - ldrh r0, [r3] - movs r2, 0 - strh r0, [r1, 0x8] - strh r2, [r3, 0xE] - ldr r0, _080D3658 @ =sub_80D365C - str r0, [r1] - bx lr - .align 2, 0 -_080D3650: .4byte gTasks -_080D3654: .4byte gBattleAnimArgs -_080D3658: .4byte sub_80D365C - thumb_func_end sub_80D3630 - - thumb_func_start sub_80D365C -sub_80D365C: @ 80D365C - push {lr} - lsls r0, 24 - lsrs r3, r0, 24 - ldr r2, _080D3690 @ =gBattleAnimArgs - ldrh r0, [r2, 0xE] - adds r0, 0x3 - movs r1, 0xFF - ands r0, r1 - strh r0, [r2, 0xE] - ldr r1, _080D3694 @ =gTasks - lsls r0, r3, 2 - adds r0, r3 - lsls r0, 3 - adds r0, r1 - ldrh r1, [r0, 0x8] - subs r1, 0x1 - strh r1, [r0, 0x8] - lsls r1, 16 - cmp r1, 0 - bne _080D368A - adds r0, r3, 0 - bl DestroyAnimVisualTask -_080D368A: - pop {r0} - bx r0 - .align 2, 0 -_080D3690: .4byte gBattleAnimArgs -_080D3694: .4byte gTasks - thumb_func_end sub_80D365C - - thumb_func_start sub_80D3698 -sub_80D3698: @ 80D3698 - push {r4-r7,lr} - adds r4, r0, 0 - ldr r7, _080D36E4 @ =gBattleAnimBankAttacker - ldrb r0, [r7] - movs r1, 0 - bl sub_8077ABC - lsls r0, 24 - lsrs r0, 24 - strh r0, [r4, 0x20] - ldrb r0, [r7] - movs r1, 0x1 - bl sub_8077ABC - lsls r0, 24 - lsrs r0, 24 - strh r0, [r4, 0x22] - ldr r6, _080D36E8 @ =0x0000fff6 - strh r6, [r4, 0x26] - ldrb r0, [r7] - bl sub_8079E90 - lsls r0, 24 - lsrs r5, r0, 24 - bl NotInBattle - lsls r0, 24 - cmp r0, 0 - bne _080D36F2 - ldrb r0, [r7] - bl GetBankSide - lsls r0, 24 - cmp r0, 0 - bne _080D36EC - movs r0, 0xA - strh r0, [r4, 0x24] - b _080D36F4 - .align 2, 0 -_080D36E4: .4byte gBattleAnimBankAttacker -_080D36E8: .4byte 0x0000fff6 -_080D36EC: - strh r6, [r4, 0x24] - subs r0, r5, 0x2 - b _080D36F6 -_080D36F2: - strh r6, [r4, 0x24] -_080D36F4: - adds r0, r5, 0x2 -_080D36F6: - adds r1, r4, 0 - adds r1, 0x43 - strb r0, [r1] - ldr r0, _080D3708 @ =sub_80D370C - str r0, [r4, 0x1C] - pop {r4-r7} - pop {r0} - bx r0 - .align 2, 0 -_080D3708: .4byte sub_80D370C - thumb_func_end sub_80D3698 - - thumb_func_start sub_80D370C -sub_80D370C: @ 80D370C - push {lr} - adds r2, r0, 0 - adds r0, 0x3F - ldrb r1, [r0] - movs r0, 0x20 - ands r0, r1 - cmp r0, 0 - beq _080D3722 - adds r0, r2, 0 - bl move_anim_8072740 -_080D3722: - pop {r0} - bx r0 - thumb_func_end sub_80D370C - - thumb_func_start sub_80D3728 -sub_80D3728: @ 80D3728 - push {r4-r7,lr} - adds r6, r0, 0 - ldr r5, _080D37E8 @ =gBattleAnimBankAttacker - ldrb r0, [r5] - bl GetBankSide - adds r4, r0, 0 - ldr r0, _080D37EC @ =gBattleAnimBankTarget - ldrb r0, [r0] - bl GetBankSide - lsls r4, 24 - lsls r0, 24 - cmp r4, r0 - bne _080D3772 - ldr r4, _080D37F0 @ =gBattleAnimArgs - movs r1, 0 - ldrsh r0, [r4, r1] - negs r0, r0 - strh r0, [r4] - ldrb r0, [r5] - bl GetBankIdentity - lsls r0, 24 - cmp r0, 0 - beq _080D376A - ldrb r0, [r5] - bl GetBankIdentity - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x1 - bne _080D3772 -_080D376A: - movs r1, 0 - ldrsh r0, [r4, r1] - negs r0, r0 - strh r0, [r4] -_080D3772: - ldr r5, _080D37F0 @ =gBattleAnimArgs - movs r1, 0xA - ldrsh r0, [r5, r1] - movs r1, 0xFF - lsls r1, 8 - ands r0, r1 - movs r1, 0 - cmp r0, 0 - bne _080D3786 - movs r1, 0x1 -_080D3786: - ldrb r0, [r5, 0xA] - movs r7, 0x1 - cmp r0, 0 - bne _080D3790 - movs r7, 0x3 -_080D3790: - adds r0, r6, 0 - bl sub_80787B0 - ldr r0, _080D37E8 @ =gBattleAnimBankAttacker - ldrb r0, [r0] - bl GetBankSide - lsls r0, 24 - cmp r0, 0 - beq _080D37AA - ldrh r0, [r5, 0x4] - negs r0, r0 - strh r0, [r5, 0x4] -_080D37AA: - ldrh r0, [r5, 0x8] - strh r0, [r6, 0x2E] - ldr r4, _080D37EC @ =gBattleAnimBankTarget - ldrb r0, [r4] - movs r1, 0x2 - bl sub_8077ABC - lsls r0, 24 - lsrs r0, 24 - ldrh r1, [r5, 0x4] - adds r0, r1 - strh r0, [r6, 0x32] - ldrb r0, [r4] - adds r1, r7, 0 - bl sub_8077ABC - lsls r0, 24 - lsrs r0, 24 - ldrh r5, [r5, 0x6] - adds r0, r5 - strh r0, [r6, 0x36] - ldr r0, _080D37F4 @ =sub_8078B34 - str r0, [r6, 0x1C] - ldr r1, _080D37F8 @ =move_anim_8072740 - adds r0, r6, 0 - bl StoreSpriteCallbackInData - pop {r4-r7} - pop {r0} - bx r0 - .align 2, 0 -_080D37E8: .4byte gBattleAnimBankAttacker -_080D37EC: .4byte gBattleAnimBankTarget -_080D37F0: .4byte gBattleAnimArgs -_080D37F4: .4byte sub_8078B34 -_080D37F8: .4byte move_anim_8072740 - thumb_func_end sub_80D3728 - - .align 2, 0 @ Don't pad with nop. diff --git a/asm/macros/event.inc b/asm/macros/event.inc index 960b300b7..738c2418e 100644 --- a/asm/macros/event.inc +++ b/asm/macros/event.inc @@ -80,20 +80,20 @@ .byte 0x0d .endm - @ Sets mystery event status + @ Sets some status related to Mystery Event. .macro setmysteryeventstatus value .byte 0x0e .byte \value .endm - @ Sets the specified script bank to immediate value. + @ Sets the specified script bank to value. .macro loadword destination, value .byte 0x0f .byte \destination .4byte \value .endm - @ Sets the specified script bank to immediate value. + @ Sets the specified script bank to value. .macro loadbyte destination, value .byte 0x10 .byte \destination @@ -219,7 +219,7 @@ .2byte \value .endm - @ Compares the value of `var` to the value of `var2`. + @ Compares the value of `var1` to the value of `var2`. .macro compare_var_to_var var1, var2 .byte 0x22 .2byte \var1 @@ -250,7 +250,7 @@ .4byte \func .endm - @ Calls a special function; that is, a piece of ASM code designed for use by scripts and listed in a table of pointers. + @ Calls a special function; that is, a function designed for use by scripts and listed in a table of pointers. .macro special function .byte 0x25 .2byte SPECIAL_\function @@ -292,19 +292,19 @@ .2byte \a .endm - @ In FireRed, this command is a nop. - .macro initclock hour minute + @ Initializes the RTC`s local time offset to the given hour and minute. In FireRed, this command is a nop. + .macro initclock hour, minute .byte 0x2c - .byte \hour - .byte \minute + .2byte \hour + .2byte \minute .endm - @ In FireRed, this command is a nop. + @ Runs time based events. In FireRed, this command is a nop. .macro dodailyevents .byte 0x2d .endm - @ Resets the values of variables 0x8000, 0x8001, and 0x8002. Related to RTC in RSE? + @ Sets the values of variables 0x8000, 0x8001, and 0x8002 to the current hour, minute, and second. In FRLG, this command sets those variables to zero. .macro gettime .byte 0x2e .endm @@ -315,7 +315,7 @@ .2byte \sound_number .endm - @ Blocks script execution until the currently-playing sound (triggered by sound) finishes playing. + @ Blocks script execution until the currently-playing sound (triggered by playse) finishes playing. .macro waitse .byte 0x30 .endm @@ -338,7 +338,7 @@ .byte \unknown .endm - @ Plays the specified (song_number) song. + @ Saves the specified (song_number) song to be played later. .macro savebgm song_number .byte 0x34 .2byte \song_number @@ -361,7 +361,7 @@ .byte \speed .endm - @ Fades the currently-playing song back in. + @ Fades the previously-playing song back in. .macro fadeinbgm speed .byte 0x38 .byte \speed @@ -385,7 +385,7 @@ .2byte \Y .endm - @ Clone of warp that uses "a walking effect". + @ Clone of warp that plays a door opening animation before stepping upwards into it. .macro warpdoor map, warp, X, Y .byte 0x3b map \map @@ -400,7 +400,7 @@ map \map .endm - @ Clone of warp that uses a teleport effect. It is apparently only used in R/S/E.[source] + @ Clone of warp that uses a teleport effect. It is apparently only used in R/S/E. .macro warpteleport map, warp, X, Y .byte 0x3d map \map @@ -409,7 +409,7 @@ .2byte \Y .endm - @ Clone of warp. Used by an (unused?) Safari Zone script to return the player to the gatehouse and end the Safari Game. + @ Sets the warp destination to be used later. .macro setwarp map, warp, X, Y .byte 0x3e map \map @@ -418,7 +418,7 @@ .2byte \Y .endm - @ Sets a default warp place. If a warp tries to send the player to Warp 127 on Map 127.127, they will instead be sent here. Useful when a map has warps that need to go to script-controlled locations (i.e. elevators). + @ Sets the warp destination that a warp to Warp 127 on Map 127.127 will connect to. Useful when a map has warps that need to go to script-controlled locations (i.e. elevators). .macro setdynamicwarp map, warp, X, Y .byte 0x3f map \map @@ -427,7 +427,7 @@ .2byte \Y .endm - @ Clone of warp3, except that this writes data to different offsets... + @ Sets the destination that diving or emerging from a dive will take the player to. .macro setdivewarp map, warp, X, Y .byte 0x40 map \map @@ -436,7 +436,7 @@ .2byte \Y .endm - @ Clone of warp3, except that this writes data to different offsets... + @ Sets the destination that falling into a hole will take the player to. .macro setholewarp map, warp, X, Y .byte 0x41 map \map @@ -452,20 +452,20 @@ .2byte \Y .endm - @ Retrieves the number of Pokmon in the player's party, and stores that number in variable 0x800D (LASTRESULT). - .macro countpokemon + @ Retrieves the number of Pokemon in the player's party, and stores that number in variable 0x800D (LASTRESULT). + .macro getpartysize .byte 0x43 .endm @ Attempts to add quantity of item index to the player's Bag. If the player has enough room, the item will be added and variable 0x800D (LASTRESULT) will be set to 0x0001; otherwise, LASTRESULT is set to 0x0000. - .macro additem index, quantity + .macro giveitem index, quantity .byte 0x44 .2byte \index .2byte \quantity .endm @ Removes quantity of item index from the player's Bag. - .macro removeitem index, quantity + .macro takeitem index, quantity .byte 0x45 .2byte \index .2byte \quantity @@ -492,7 +492,7 @@ .endm @ Adds a quantity amount of item index to the player's PC. Both arguments can be variables. - .macro addpcitem index, quantity + .macro givepcitem index, quantity .byte 0x49 .2byte \index .2byte \quantity @@ -505,32 +505,32 @@ .2byte \quantity .endm - @ In FireRed, this command is a nop. (The argument is read, but not used for anything.) - .macro adddecor a + @ Adds decoration to the player's PC. In FireRed, this command is a nop. (The argument is read, but not used for anything.) + .macro givedecoration decoration .byte 0x4b - .2byte \a + .2byte \decoration .endm - @ In FireRed, this command is a nop. (The argument is read, but not used for anything.) - .macro removedecor a + @ Removes a decoration from the player's PC. In FireRed, this command is a nop. (The argument is read, but not used for anything.) + .macro takedecoration decoration .byte 0x4c - .2byte \a + .2byte \decoration .endm - @ In FireRed, this command is a nop. (The argument is read, but not used for anything.) - .macro hasdecor a + @ Checks for decoration in the player's PC. In FireRed, this command is a nop. (The argument is read, but not used for anything.) + .macro checkdecor decoration .byte 0x4d - .2byte \a + .2byte \decoration .endm - @ In FireRed, this command is a nop. (The argument is read, but not used for anything.) - .macro checkdecor a + @ Checks if the player has enough space in their PC to hold decoration. Sets variable 0x800D (LASTRESULT) to 0x0001 if there is room, or 0x0000 is there is no room. In FireRed, this command is a nop. (The argument is read, but not used for anything.) + .macro checkdecorspace decoration .byte 0x4e - .2byte \a + .2byte \decoration .endm - @ Applies the movement data at movements to the specified (index) Person event. Also closes any standard message boxes that are still open. - @ This command in fact uses variables to access the Person event ID. So, for example, if you setvar 0x8000 to 0x3, and then use applymovementpos 0x8000 @move1, Person event 3 will have the movements at @move1 applied to them. Thank you Shiny Quagsire for bringing this to my attention. + @ Applies the movement data at movements to the specified (index) Object event. Also closes any standard message boxes that are still open. + @ This command in fact uses variables to access the Object event ID. So, for example, if you setvar 0x8000 to 0x3, and then use applymovementpos 0x8000 @move1, Object event 3 will have the movements at @move1 applied to them. .macro applymovement index, movements, mapGroup, mapNum .ifb \mapGroup .byte 0x4f @@ -545,7 +545,7 @@ .endif .endm - @ Blocks script execution until the movements being applied to the specified (index) Person event finish. If the specified Person event is 0x0000, then the command will block script execution until all Person events affected by applymovement finish their movements. If the specified Person event is not currently being manipulated with applymovement, then this command does nothing. + @ Blocks script execution until the movements being applied to the specified (index) Object event finish. If the specified Object event is 0x0000, then the command will block script execution until all Object events affected by applymovement finish their movements. If the specified Object event is not currently being manipulated with applymovement, then this command does nothing. .macro waitmovement index, mapBank, mapNum .ifb \mapBank .byte 0x51 @@ -558,7 +558,7 @@ .endif .endm - @ Attempts to hide the specified (local_ID, a local ID) Person event on the specified map, by setting its visibility flag if it has a valid one. If the Person does not have a valid visibility flag, this command does nothing. + @ Attempts to hide the specified (local_ID, a local ID) Object event on the specified map, by setting its visibility flag if it has a valid one. If the Object does not have a valid visibility flag, this command does nothing. @ If no map is specified, then the current map is used .macro removeobject localId, mapGroup, mapNum .ifb \mapGroup @@ -584,92 +584,92 @@ .endif .endm - .macro setobjectxy word1, word2, word3 - .byte 0x57 - .2byte \word1 - .2byte \word2 - .2byte \word3 + @ Sets the specified (index) Object's position on the current map. + .macro setobjectxy index, x, y + .byte 0x57 + .2byte \index + .2byte \x + .2byte \y .endm - .macro showobject word, byte1, byte2 - .byte 0x58 - .2byte \word - .byte \byte1 - .byte \byte2 + .macro showobjectat index, map + .byte 0x58 + .2byte \index + map \map .endm - .macro hideobject word, byte1, byte2 - .byte 0x59 - .2byte \word - .byte \byte1 - .byte \byte2 + .macro hideobjectat index, map + .byte 0x59 + .2byte \index + map \map .endm - @ If the script was called by a Person event, then that Person will turn to face toward the tile that the player is stepping off of. + @ If the script was called by a Object event, then that Object will turn to face toward the tile that the player is stepping off of. .macro faceplayer - .byte 0x5a + .byte 0x5a .endm - .macro turnobject word, byte - .byte 0x5b - .2byte \word - .byte \byte + .macro turnobject index, direction + .byte 0x5b + .2byte \index + .byte \direction .endm @ If the Trainer flag for Trainer index is not set, this command does absolutely nothing. .macro trainerbattle type, trainer, word, pointer1, pointer2, pointer3, pointer4 - .byte 0x5c - .byte \type - .2byte \trainer - .2byte \word - .if \type == 0 - .4byte \pointer1 @ text - .4byte \pointer2 @ text - .elseif \type == 1 - .4byte \pointer1 @ text - .4byte \pointer2 @ text - .4byte \pointer3 @ event script - .elseif \type == 2 - .4byte \pointer1 @ text - .4byte \pointer2 @ text - .4byte \pointer3 @ event script - .elseif \type == 3 - .4byte \pointer1 @ text - .elseif \type == 4 - .4byte \pointer1 @ text - .4byte \pointer2 @ text - .4byte \pointer3 @ text - .elseif \type == 5 - .4byte \pointer1 @ text - .4byte \pointer2 @ text - .elseif \type == 6 - .4byte \pointer1 @ text - .4byte \pointer2 @ text - .4byte \pointer3 @ text - .4byte \pointer4 @ event script - .elseif \type == 7 - .4byte \pointer1 @ text - .4byte \pointer2 @ text - .4byte \pointer3 @ text - .elseif \type == 8 - .4byte \pointer1 @ text - .4byte \pointer2 @ text - .4byte \pointer3 @ text - .4byte \pointer4 @ event script - .endif + .byte 0x5c + .byte \type + .2byte \trainer + .2byte \word + .if \type == 0 + .4byte \pointer1 @ text + .4byte \pointer2 @ text + .elseif \type == 1 + .4byte \pointer1 @ text + .4byte \pointer2 @ text + .4byte \pointer3 @ event script + .elseif \type == 2 + .4byte \pointer1 @ text + .4byte \pointer2 @ text + .4byte \pointer3 @ event script + .elseif \type == 3 + .4byte \pointer1 @ text + .elseif \type == 4 + .4byte \pointer1 @ text + .4byte \pointer2 @ text + .4byte \pointer3 @ text + .elseif \type == 5 + .4byte \pointer1 @ text + .4byte \pointer2 @ text + .elseif \type == 6 + .4byte \pointer1 @ text + .4byte \pointer2 @ text + .4byte \pointer3 @ text + .4byte \pointer4 @ event script + .elseif \type == 7 + .4byte \pointer1 @ text + .4byte \pointer2 @ text + .4byte \pointer3 @ text + .elseif \type == 8 + .4byte \pointer1 @ text + .4byte \pointer2 @ text + .4byte \pointer3 @ text + .4byte \pointer4 @ event script + .endif .endm - @ Starts a trainer battle using the battle information stored in RAM (usually by trainerbattle, which actually calls this command behind-the-scenes), and blocks script execution until the battle finishes. - .macro battlebegin + .macro trainerbattlebegin .byte 0x5d .endm - .macro ontrainerbattleend + @ Goes to address after the trainerbattle command (called by the battle functions, see battle_setup.c) + .macro gotopostbattlescript .byte 0x5e .endm - .macro ontrainerbattleendgoto + @ Goes to address specified in the trainerbattle command (called by the battle functions, see battle_setup.c) + .macro gotobeatenscript .byte 0x5f .endm @@ -679,28 +679,28 @@ .2byte \trainer .endm - @ Sets Flag (trainer + 0x500). (I didn't make a mistake. The command names actually are backwards.) + @ Sets Flag (trainer + 0x500). .macro settrainerflag trainer .byte 0x61 .2byte \trainer .endm - @ Clears Flag (trainer + 0x500). (I didn't make a mistake. The command names actually are backwards.) + @ Clears Flag (trainer + 0x500). .macro cleartrainerflag trainer .byte 0x62 .2byte \trainer .endm - .macro setobjectxyperm word1, word2, word3 + .macro setobjectxyperm index, x, y .byte 0x63 - .2byte \word1 - .2byte \word2 - .2byte \word3 + .2byte \index + .2byte \x + .2byte \y .endm - .macro moveobjectoffscreen word + .macro moveobjectoffscreen index .byte 0x64 - .2byte \word + .2byte \index .endm .macro setobjectmovementtype word, byte @@ -720,67 +720,67 @@ .4byte \text .endm - @ Holds the current message box open until the player presses a key. The message box is then closed. + @ Closes the current message box. .macro closemessage .byte 0x68 .endm - @ Ceases movement for all OWs on-screen. + @ Ceases movement for all Objects on-screen. .macro lockall .byte 0x69 .endm - @ If the script was called by a Person event, then that Person's movement will cease. + @ If the script was called by an Object, then that Object's movement will cease. .macro lock .byte 0x6a .endm - @ Resumes normal movement for all OWs on-screen, and closes any standard message boxes that are still open. + @ Resumes normal movement for all Objects on-screen, and closes any standard message boxes that are still open. .macro releaseall .byte 0x6b .endm - @ If the script was called by a Person event, then that Person's movement will resume. This command also closes any standard message boxes that are still open. + @ If the script was called by an Object, then that Object's movement will resume. This command also closes any standard message boxes that are still open. .macro release .byte 0x6c .endm @ Blocks script execution until the player presses any key. - .macro waitbutton + .macro waitbuttonpress .byte 0x6d .endm @ Displays a YES/NO multichoice box at the specified coordinates, and blocks script execution until the user makes a selection. Their selection is stored in variable 0x800D (LASTRESULT); 0x0000 for "NO" or if the user pressed B, and 0x0001 for "YES". - .macro yesnobox X, Y + .macro yesnobox x, y .byte 0x6e - .byte \X - .byte \Y + .byte \x + .byte \y .endm - @ Displays a multichoice box from which the user can choose a selection, and blocks script execution until a selection is made. Lists of options are predefined and the one to be used is specified with list. If B is set to a non-zero value, then the user will not be allowed to back out of the multichoice with the B button. - .macro multichoice X, Y, list, B + @ Displays a multichoice box from which the user can choose a selection, and blocks script execution until a selection is made. Lists of options are predefined and the one to be used is specified with list. If b is set to a non-zero value, then the user will not be allowed to back out of the multichoice with the B button. + .macro multichoice x, y, list, b .byte 0x6f - .byte \X - .byte \Y + .byte \x + .byte \y .byte \list - .byte \B + .byte \b .endm - @ Displays a multichoice box from which the user can choose a selection, and blocks script execution until a selection is made. Lists of options are predefined and the one to be used is specified with list. The default argument determines the initial position of the cursor when the box is first opened; it is zero-indexed, and if it is too large, it is treated as 0x00. If B is set to a non-zero value, then the user will not be allowed to back out of the multichoice with the B button. - .macro multichoicedefault X, Y, list, default, B + @ Displays a multichoice box from which the user can choose a selection, and blocks script execution until a selection is made. Lists of options are predefined and the one to be used is specified with list. The default argument determines the initial position of the cursor when the box is first opened; it is zero-indexed, and if it is too large, it is treated as 0x00. If b is set to a non-zero value, then the user will not be allowed to back out of the multichoice with the B button. + .macro multichoicedefault x, y, list, default, b .byte 0x70 - .byte \X - .byte \Y + .byte \x + .byte \y .byte \list .byte \default - .byte \B + .byte \b .endm @ Displays a multichoice box from which the user can choose a selection, and blocks script execution until a selection is made. Lists of options are predefined and the one to be used is specified with list. The per_row argument determines how many list items will be shown on a single row of the box. - .macro multichoicegrid X, Y, list, per_row, B + .macro multichoicegrid x, y, list, per_row, B .byte 0x71 - .byte \X - .byte \Y + .byte \x + .byte \y .byte \list .byte \per_row .byte \B @@ -810,20 +810,20 @@ .byte \byte4 .endm - @ Displays a box containing the front sprite for the specified (species) Pokmon species. - .macro drawpokepic species, X, Y + @ Displays a box containing the front sprite for the specified (species) Pokemon species. + .macro drawmonpic species, x, y .byte 0x75 .2byte \species - .byte \X - .byte \Y + .byte \x + .byte \y .endm - @ Hides all boxes displayed with showpokepic. - .macro erasepokepic + @ Hides all boxes displayed with drawmonpic. + .macro erasemonpic .byte 0x76 .endm - @ In FireRed, this command is a nop. (The argument is discarded.) + @ Draws an image of the winner of the contest. In FireRed, this command is a nop. (The argument is discarded.) .macro drawcontestwinner a .byte 0x77 .byte \a @@ -835,8 +835,8 @@ .4byte \text .endm - @ Gives the player one of the specified (species) Pokmon at level level holding item. The unknown arguments should all be zeroes. - .macro givepoke species, level, item, unknown1, unknown2, unknown3 + @ Gives the player one of the specified (species) Pokemon at level level holding item. The unknown arguments should all be zeroes. + .macro givemon species, level, item, unknown1, unknown2, unknown3 .byte 0x79 .2byte \species .byte \level @@ -846,81 +846,81 @@ .byte \unknown3 .endm - .macro giveegg word + .macro giveegg species .byte 0x7a - .2byte \word + .2byte \species .endm - .macro setpokemove byte1, byte2, word + .macro setmonmove index, slot, move .byte 0x7b - .byte \byte1 - .byte \byte2 - .2byte \word + .byte \index + .byte \slot + .2byte \move .endm - @ Checks if at least one Pokmon in the player's party knows the specified (index) attack. If so, variable 0x800D (LASTRESULT) is set to the (zero-indexed) slot number of the Pokmon that knows the move. If not, LASTRESULT is set to 0x0006. - .macro checkpokemove index + @ Checks if at least one Pokemon in the player's party knows the specified (index) attack. If so, variable 0x800D (LASTRESULT) is set to the (zero-indexed) slot number of the first Pokemon that knows the move. If not, LASTRESULT is set to 0x0006. Variable 0x8004 is also set to this Pokemon's species. + .macro checkpartymove index .byte 0x7c .2byte \index .endm - @ Writes the name of the Pokmon at index species to the specified buffer. - .macro getspeciesname out, species + @ Writes the name of the Pokemon at index species to the specified buffer. + .macro bufferspeciesname out, species .byte 0x7d .byte \out .2byte \species .endm - @ Writes the name of the first Pokmon in the player's party to the specified buffer. - .macro getfirstpartypokename out + @ Writes the name of the species of the first Pokemon in the player's party to the specified buffer. + .macro bufferleadmonspeciesname out .byte 0x7e .byte \out .endm - @ Writes the name of the Pokmon in slot slot (zero-indexed) of the player's party to the specified buffer. If an empty or invalid slot is specified, ten spaces ("") are written to the buffer. - .macro getpartypokename out, slot + @ Writes the nickname of the Pokemon in slot slot (zero-indexed) of the player's party to the specified buffer. If an empty or invalid slot is specified, ten spaces ("") are written to the buffer. + .macro bufferpartymonnick out, slot .byte 0x7f .byte \out .2byte \slot .endm @ Writes the name of the item at index item to the specified buffer. If the specified index is larger than the number of items in the game (0x176), the name of item 0 ("????????") is buffered instead. - .macro getitemname out, item + .macro bufferitemname out, item .byte 0x80 .byte \out .2byte \item .endm - @ In FireRed, this command is a nop. (The first argument is discarded immediately. The second argument is read, but not used for anything.) - .macro getdecorname a, b + @ Writes the name of the decoration at index decoration to the specified buffer. In FireRed, this command is a nop. + .macro bufferdecorationname out, decoration .byte 0x81 - .byte \a - .2byte \b + .byte \out + .2byte \decoration .endm - @ Writes the name of the attack at index attack to the specified buffer. - .macro getmovename out, attack + @ Writes the name of the move at index move to the specified buffer. + .macro buffermovename out, move .byte 0x82 .byte \out - .2byte \attack + .2byte \move .endm @ Converts the value of input to a decimal string, and writes that string to the specified buffer. - .macro getnumberstring out, input + .macro buffernumberstring out, input .byte 0x83 .byte \out .2byte \input .endm - @ Writes the standard string identified by index to the specified buffer. Specifying an invalid standard string (e.x. 0x2B) can and usually will cause data corruption (I've observed destruction of the stored player name and crashes when entering/exiting certain menu screens). - .macro getstdstring out, index + @ Writes the standard string identified by index to the specified buffer. This command has no protections in place at all, so specifying an invalid standard string (e.x. 0x2B) can and usually will cause data corruption. + .macro bufferstdstring out, index .byte 0x84 .byte \out .2byte \index .endm @ Copies the string at offset to the specified buffer. - .macro getstring out, offset + .macro bufferstring out, offset .byte 0x85 .byte \out .4byte \offset @@ -932,46 +932,49 @@ .4byte \products .endm - @ Apparent clone of pokemart. - .macro pokemartdecor products + @ Opens the Pokemart system and treats the list of items as decorations. + .macro pokemartdecoration products .byte 0x87 .4byte \products .endm - @ Apparent clone of pokemart. - .macro pokemartbp products + @ Apparent clone of pokemartdecoration. + .macro pokemartdecoration2 products .byte 0x88 .4byte \products .endm + @ Starts up the slot machine minigame. .macro playslotmachine word .byte 0x89 .2byte \word .endm - @ In FireRed, this command is a nop. - .macro plantberrytree byte1, byte2, byte3 + @ Sets a berry tree's specific berry and growth stage. In FireRed, this command is a nop. + .macro setberrytree tree_id, berry, growth_stage .byte 0x8a - .byte \byte1, \byte2, \byte3 + .byte \tree_id + .byte \berry + .byte \growth_stage .endm - @ In FireRed, this command sets the byte at 0x03000EA8 to 0x01. I do not know what that means. - .macro choosecontestpkmn + @ This allows you to choose a Pokemon to use in a contest. In FireRed, this command sets the byte at 0x03000EA8 to 0x01. + .macro choosecontestmon .byte 0x8b .endm - @ In FireRed, this command is a nop. - .macro startcontest + @ Starts a contest. In FireRed, this command is a nop. + .macro startcontest .byte 0x8c .endm - @ In FireRed, this command is a nop. - .macro showcontestresults + @ Shows the results of a contest. In FireRed, this command is a nop. + .macro showcontestresults .byte 0x8d .endm - @ In FireRed, this command is a nop. - .macro contestlinktransfer + @ Starts a contest over a link connection. In FireRed, this command is a nop. + .macro contestlinktransfer .byte 0x8e .endm @@ -1003,50 +1006,51 @@ .endm @ Spawns a secondary box showing how much money the player has. - .macro showmoneybox X, Y + .macro showmoneybox x, y .byte 0x93 - .byte \X - .byte \Y + .byte \x + .byte \y .endm @ Hides the secondary box spawned by showmoney. - .macro hidemoneybox X, Y + .macro hidemoneybox x, y .byte 0x94 - .byte \X - .byte \Y + .byte \x + .byte \y .endm - @ Updates the secondary box spawned by showmoney. (What does it do with its arguments?) - .macro updatemoneybox X, Y + @ Updates the secondary box spawned by showmoney. Consumes but does not use arguments. + .macro updatemoneybox x, y .byte 0x95 - .byte \X - .byte \Y + .byte \x + .byte \y .endm - @ In FireRed, this command is a nop. - .macro getpricereduction word + @ Gets the price reduction for the index given. In FireRed, this command is a nop. + .macro getpricereduction index .byte 0x96 - .2byte \word + .2byte \index .endm - @ Fades the screen to black or back, using the specified effect. Effect 0x00 fades in, and effect 0x01 fades out. I don't know if other effects exist. + @ Fades the screen to and from black and white. Mode 0x00 fades from black, mode 0x01 fades out to black, mode 0x2 fades in from white, and mode 0x3 fades out to white. .macro fadescreen effect .byte 0x97 .byte \effect .endm - .macro fadescreendelay byte1, byte2 + @ Fades the screen to and from black and white. Mode 0x00 fades from black, mode 0x01 fades out to black, mode 0x2 fades in from white, and mode 0x3 fades out to white. Other modes may exist. + .macro fadescreenspeed effect, speed .byte 0x98 - .byte \byte1 - .byte \byte2 + .byte \effect + .byte \speed .endm - .macro setdarklevel word + .macro setflashradius word .byte 0x99 .2byte \word .endm - .macro animdarklevel byte + .macro animateflash byte .byte 0x9a .byte \byte .endm @@ -1062,11 +1066,11 @@ .2byte \animation .endm - @ Tells the game which party Pokmon to use for the next field move animation. - .macro setfieldeffect animation, slot + @ Sets up the field effect argument argument with the value value. + .macro setfieldeffectargument argument, param .byte 0x9d - .byte \animation - .2byte \slot + .byte \argument + .2byte \param .endm @ Blocks script execution until all playing field move animations complete. @@ -1075,10 +1079,10 @@ .2byte \animation .endm - @ Sets which healing place the player will return to if all of the Pokmon in their party faint. A list of available healing places can be found on PokeCommunity. - .macro sethealplace flightspot + @ Sets which healing place the player will return to if all of the Pokemon in their party faint. + .macro setrespawn heallocation .byte 0x9f - .2byte \flightspot + .2byte \heallocation .endm @ Checks the player's gender. If male, then 0x0000 is stored in variable 0x800D (LASTRESULT). If female, then 0x0001 is stored in LASTRESULT. @@ -1086,19 +1090,19 @@ .byte 0xa0 .endm - @ Plays the specified (species) Pokmon's cry. You can use waitcry to block script execution until the sound finishes. - .macro playpokecry species, effect + @ Plays the specified (species) Pokemon's cry. You can use waitcry to block script execution until the sound finishes. + .macro playmoncry species, effect .byte 0xa1 .2byte \species .2byte \effect .endm - @ Changes the tile at (X, Y) on the current map. - .macro setmaptile X, Y, tile_number, tile_attrib + @ Changes the metatile at (x, y) on the current map. + .macro setmetatile x, y, metatile_number, tile_attrib .byte 0xa2 - .2byte \X - .2byte \Y - .2byte \tile_number + .2byte \x + .2byte \y + .2byte \metatile_number .2byte \tile_attrib .endm @@ -1119,78 +1123,76 @@ .endm @ This command manages cases in which maps have tiles that change state when stepped on (specifically, cracked/breakable floors). - .macro tileeffect subroutine + .macro setstepcallback subroutine .byte 0xa6 .byte \subroutine .endm - .macro setmaplayoutindex word + .macro setmaplayoutindex index .byte 0xa7 - .2byte \word + .2byte \index .endm - .macro setobjectpriority word, byte1, byte2, byte3 + .macro setobjectpriority index, map, priority .byte 0xa8 - .2byte \word - .byte \byte1 - .byte \byte2 - .byte \byte3 + .2byte \index + map \map + .byte \priority .endm - .macro resetobjectpriority word, byte1, byte2 + .macro resetobjectpriority index, map .byte 0xa9 - .2byte \word - .byte \byte1 - .byte \byte2 + .2byte \index + map \map .endm - .macro createvobject byte1, byte2, word1, word2, byte3, byte4 + .macro createvobject sprite, byte2, x, y, elevation, direction .byte 0xaa - .byte \byte1 + .byte \sprite .byte \byte2 - .2byte \word1 - .2byte \word2 - .byte \byte3 - .byte \byte4 + .2byte \x + .2byte \y + .byte \elevation + .byte \direction .endm - .macro turnvobject byte1, byte2 + .macro turnvobject index, direction .byte 0xab - .byte \byte1 - .byte \byte2 + .byte \index + .byte \direction .endm - @ Queues the opening of the door tile at (X, Y) with an animation. - .macro opendoor X, Y + @ Opens the door metatile at (X, Y) with an animation. + .macro opendoor x, y .byte 0xac - .2byte \X - .2byte \Y + .2byte \x + .2byte \y .endm - @ Queues the closing of the door tile at (X, Y) with an animation. - .macro closedoor X, Y + @ Closes the door metatile at (X, Y) with an animation. + .macro closedoor x, y .byte 0xad - .2byte \X - .2byte \Y + .2byte \x + .2byte \y .endm - @ Executes the state changes queued with setdooropened, setdoorclosed, setdooropened2, and setdoorclosed2. - .macro waitdooranim + @ Waits for the door animation started with opendoor or closedoor to finish. + .macro waitdooranim .byte 0xae .endm - @ Queues the opening of the door tile at (X, Y) without an animation. - .macro setdooropen X, Y + @ Sets the door tile at (x, y) to be open without an animation. + .macro setdooropen x, y .byte 0xaf - .2byte \X - .2byte \Y + .2byte \x + .2byte \y .endm - @ Queues the closing of the door tile at (X, Y) without an animation. - .macro setdoorclosed X, Y + @ Sets the door tile at (x, y) to be closed without an animation. + .macro setdoorclosed x, y .byte 0xb0 - .2byte \X - .2byte \Y + .2byte \x + .2byte \y .endm @ In FireRed, this command is a nop. @@ -1198,24 +1200,24 @@ .byte 0xb1 .endm - @ In FireRed, this command is a nop. - .macro showelevmenu + @ In FireRed and Emerald, this command is a nop. + .macro showelevmenu .byte 0xb2 .endm - .macro checkcoins word + .macro checkcoins out .byte 0xb3 - .2byte \word + .2byte \out .endm - .macro givecoins word + .macro givecoins count .byte 0xb4 - .2byte \word + .2byte \count .endm - .macro takecoins word + .macro takecoins count .byte 0xb5 - .2byte \word + .2byte \count .endm @ Prepares to start a wild battle against a species at Level level holding item. Running this command will not affect normal wild battles. You start the prepared battle with dowildbattle. @@ -1226,7 +1228,7 @@ .2byte \item .endm - @ Starts a wild battle against the Pokmon generated by setwildbattle. Blocks script execution until the battle finishes. + @ Starts a wild battle against the Pokemon generated by setwildbattle. Blocks script execution until the battle finishes. .macro dowildbattle .byte 0xb7 .endm @@ -1264,55 +1266,55 @@ .4byte \pointer .endm - .macro vloadword pointer + .macro vloadptr pointer .byte 0xbe .4byte \pointer .endm - .macro vgetstring byte, pointer + .macro vbufferstring byte, pointer .byte 0xbf .byte \byte .4byte \pointer .endm @ Spawns a secondary box showing how many Coins the player has. - .macro showcoinsbox X, Y + .macro showcoinsbox x, y .byte 0xc0 - .byte \X - .byte \Y + .byte \x + .byte \y .endm - @ Hides the secondary box spawned by showcoins. It doesn't appear to use its arguments, but they are still required. - .macro hidecoinsbox X, Y + @ Hides the secondary box spawned by showcoins. It consumes its arguments but doesn't use them. + .macro hidecoinsbox x, y .byte 0xc1 - .byte \X - .byte \Y + .byte \x + .byte \y .endm - @ Updates the secondary box spawned by showcoins. (What does it do with its arguments?) - .macro updatecoinsbox X, Y + @ Updates the secondary box spawned by showcoins. It consumes its arguments but doesn't use them. + .macro updatecoinsbox x, y .byte 0xc2 - .byte \X - .byte \Y + .byte \x + .byte \y .endm - @ Increases the value of the specified hidden variable by 1. The hidden variable's value will not be allowed to exceed 0x00FFFFFF. - .macro incrementgamestat a + @ Increases the value of the specified game stat by 1. The stat's value will not be allowed to exceed 0x00FFFFFF. + .macro incrementgamestat stat .byte 0xc3 - .byte \a + .byte \stat .endm - @ Clone of warp... Except that it doesn't appear to have any effect when used in some of FireRed's default level scripts. (If it did, Berry Forest would be impossible to enter...) - .macro setescapewarp map, warp, X, Y + @ Sets the destination that using an Escape Rope or Dig will take the player to. + .macro setescapewarp map, warp, x, y .byte 0xc4 map \map .byte \warp - .2byte \X - .2byte \Y + .2byte \x + .2byte \y .endm @ Blocks script execution until cry finishes. - .macro waitpokecry + .macro waitmoncry .byte 0xc5 .endm @@ -1357,134 +1359,6 @@ .4byte \value .endm - @ Makes the Pokmon in the specified slot of the player's party obedient. It will not randomly disobey orders in battle. - .macro setobedience slot - .byte 0xcd - .2byte \slot - .endm - - @ Checks if the Pokmon in the specified slot of the player's party is obedient. If the Pokmon is disobedient, 0x0001 is written to script variable 0x800D (LASTRESULT). If the Pokmon is obedient (or if the specified slot is empty or invalid), 0x0000 is written. - .macro checkobedience slot - .byte 0xce - .2byte \slot - .endm - - @ Depending on factors I haven't managed to understand yet, this command may cause script execution to jump to the offset specified by the pointer at 0x020370A4. - .macro execram - .byte 0xcf - .endm - - @ Sets worldmapflag to 1. This allows the player to Fly to the corresponding map, if that map has a flightspot. - .macro setworldflag worldmapflag - .byte 0xd0 - .2byte \worldmapflag - .endm - - @ Clone of warpteleport? It is apparently only used in FR/LG, and only with specials.[source] - .macro warpteleport2 map, warp, X, Y - .byte 0xd1 - map \map - .byte \warp - .2byte \X - .2byte \Y - .endm - - @ Changes the location where the player caught the Pokmon in the specified slot of their party. A list of valid catch locations can be found on PokeCommunity. - .macro setcatchlocale slot, location - .byte 0xd2 - .2byte \slot - .byte \location - .endm - - .macro event_d3 unknown - .byte 0xd3 - .2byte \unknown - .endm - - .macro event_d4 - .byte 0xd4 - .endm - - @ In FireRed, this command is a nop. - .macro event_d5 var - .byte 0xd5 - .2byte \var - .endm - - .macro event_d6 - .byte 0xd6 - .endm - - .macro warp7 map, byte, word1, word2 - .byte 0xd7 - map \map - .byte \byte - .2byte \word1 - .2byte \word2 - .endm - - .macro event_d8 - .byte 0xd8 - .endm - - .macro event_d9 - .byte 0xd9 - .endm - - .macro hidebox2 - .byte 0xda - .endm - - .macro message3 pointer - .byte 0xdb - .4byte \pointer - .endm - - .macro fadescreen3 byte - .byte 0xdc - .byte \byte - .endm - - .macro buffertrainerclass byte, word - .byte 0xdd - .byte \byte - .2byte \word - .endm - - .macro buffertrainername byte, word - .byte 0xde - .byte \byte - .2byte \word - .endm - - .macro pokenavcall pointer - .byte 0xdf - .4byte \pointer - .endm - - .macro warp8 map, byte, word1, word2 - .byte 0xe0 - map \map - .byte \byte - .2byte \word1 - .2byte \word2 - .endm - - .macro buffercontesttype byte, word - .byte 0xe1 - .byte \byte - .2byte \word - .endm - - @ Writes the name of the specified (item) item to the specified buffer. If the specified item is a Berry (0x85 - 0xAE) or Poke Ball (0x4) and if the quantity is 2 or more, the buffered string will be pluralized ("IES" or "S" appended). If the specified item is the Enigma Berry, I have no idea what this command does (but testing showed no pluralization). If the specified index is larger than the number of items in the game (0x176), the name of item 0 ("????????") is buffered instead. - .macro storeitems out, item, quantity - .byte 0xe2 - .byte \out - .2byte \item - .2byte \quantity - .endm - - @ Supplementary .macro goto_if_eq dest @@ -1511,13 +1385,13 @@ YES = 1 NO = 0 - .macro giveitem item, amount=1, function=0 + .macro giveitem_std item, amount=1, function=0 setorcopyvar 0x8000, \item setorcopyvar 0x8001, \amount callstd \function .endm - .macro givedecoration decoration + .macro givedecoration_std decoration setorcopyvar 0x8000, \decoration callstd 7 .endm diff --git a/asm/noise.s b/asm/noise.s deleted file mode 100755 index 930b77309..000000000 --- a/asm/noise.s +++ /dev/null @@ -1,139 +0,0 @@ - .include "constants/gba_constants.inc" - .include "asm/macros.inc" - - .syntax unified - - .text - - thumb_func_start sub_80D2D68 -sub_80D2D68: @ 80D2D68 - push {r4-r7,lr} - adds r5, r0, 0 - ldr r0, _080D2D7C @ =gBattleAnimArgs - movs r1, 0 - ldrsh r0, [r0, r1] - cmp r0, 0 - bne _080D2D84 - ldr r0, _080D2D80 @ =gBattleAnimBankAttacker - b _080D2D86 - .align 2, 0 -_080D2D7C: .4byte gBattleAnimArgs -_080D2D80: .4byte gBattleAnimBankAttacker -_080D2D84: - ldr r0, _080D2E1C @ =gBattleAnimBankTarget -_080D2D86: - ldrb r6, [r0] - adds r0, r6, 0 - bl GetBankSide - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x1 - bne _080D2DA0 - ldr r1, _080D2E20 @ =gBattleAnimArgs - movs r2, 0x2 - ldrsh r0, [r1, r2] - negs r0, r0 - strh r0, [r1, 0x2] -_080D2DA0: - adds r0, r6, 0 - movs r1, 0x2 - bl sub_8077ABC - lsls r0, 24 - ldr r7, _080D2E20 @ =gBattleAnimArgs - lsrs r0, 24 - ldrh r3, [r7, 0x2] - adds r0, r3 - movs r4, 0 - strh r0, [r5, 0x20] - adds r0, r6, 0 - movs r1, 0x3 - bl sub_8077ABC - lsls r0, 24 - lsrs r0, 24 - ldrh r1, [r7, 0x4] - adds r0, r1 - strh r0, [r5, 0x22] - strh r4, [r5, 0x2E] - ldrh r1, [r5, 0x20] - lsls r1, 3 - strh r1, [r5, 0x30] - lsls r0, 3 - strh r0, [r5, 0x32] - movs r2, 0x2 - ldrsh r0, [r7, r2] - lsls r0, 3 - cmp r0, 0 - bge _080D2DE0 - adds r0, 0x7 -_080D2DE0: - asrs r0, 3 - strh r0, [r5, 0x34] - movs r3, 0x4 - ldrsh r0, [r7, r3] - lsls r0, 3 - cmp r0, 0 - bge _080D2DF0 - adds r0, 0x7 -_080D2DF0: - asrs r0, 3 - strh r0, [r5, 0x36] - ldrh r2, [r5, 0x4] - lsls r1, r2, 22 - lsrs r1, 22 - movs r3, 0x6 - ldrsh r0, [r7, r3] - lsls r0, 4 - adds r1, r0 - ldr r3, _080D2E24 @ =0x000003ff - adds r0, r3, 0 - ands r1, r0 - ldr r0, _080D2E28 @ =0xfffffc00 - ands r0, r2 - orrs r0, r1 - strh r0, [r5, 0x4] - ldr r0, _080D2E2C @ =sub_80D2E30 - str r0, [r5, 0x1C] - pop {r4-r7} - pop {r0} - bx r0 - .align 2, 0 -_080D2E1C: .4byte gBattleAnimBankTarget -_080D2E20: .4byte gBattleAnimArgs -_080D2E24: .4byte 0x000003ff -_080D2E28: .4byte 0xfffffc00 -_080D2E2C: .4byte sub_80D2E30 - thumb_func_end sub_80D2D68 - - thumb_func_start sub_80D2E30 -sub_80D2E30: @ 80D2E30 - push {lr} - adds r2, r0, 0 - ldrh r0, [r2, 0x34] - ldrh r1, [r2, 0x30] - adds r0, r1 - strh r0, [r2, 0x30] - ldrh r1, [r2, 0x36] - ldrh r3, [r2, 0x32] - adds r1, r3 - strh r1, [r2, 0x32] - lsls r0, 16 - asrs r0, 19 - strh r0, [r2, 0x20] - lsls r1, 16 - asrs r1, 19 - strh r1, [r2, 0x22] - ldrh r0, [r2, 0x2E] - adds r0, 0x1 - strh r0, [r2, 0x2E] - lsls r0, 16 - asrs r0, 16 - cmp r0, 0x10 - ble _080D2E64 - adds r0, r2, 0 - bl move_anim_8072740 -_080D2E64: - pop {r0} - bx r0 - thumb_func_end sub_80D2E30 - - .align 2, 0 @ Don't pad with nop. diff --git a/asm/note_spin.s b/asm/note_spin.s deleted file mode 100755 index d0df90fd1..000000000 --- a/asm/note_spin.s +++ /dev/null @@ -1,234 +0,0 @@ - .include "constants/gba_constants.inc" - .include "asm/macros.inc" - - .syntax unified - - .text - - thumb_func_start sub_80D2E68 -sub_80D2E68: @ 80D2E68 - push {r4,lr} - adds r4, r0, 0 - movs r1, 0x2E - ldrsh r0, [r4, r1] - cmp r0, 0 - bne _080D2E8A - ldr r0, _080D2EC4 @ =gBattleAnimArgs - ldrh r1, [r0] - movs r0, 0x78 - subs r0, r1 - strh r0, [r4, 0x30] - adds r2, r4, 0 - adds r2, 0x3E - ldrb r0, [r2] - movs r1, 0x4 - orrs r0, r1 - strb r0, [r2] -_080D2E8A: - ldrh r0, [r4, 0x2E] - adds r0, 0x1 - strh r0, [r4, 0x2E] - lsls r0, 16 - asrs r0, 16 - movs r2, 0x30 - ldrsh r1, [r4, r2] - cmp r0, r1 - bne _080D2EA8 - ldrb r0, [r4, 0x5] - lsrs r0, 4 - adds r0, 0x10 - movs r1, 0 - bl sub_8079108 -_080D2EA8: - movs r0, 0x2E - ldrsh r1, [r4, r0] - movs r2, 0x30 - ldrsh r0, [r4, r2] - adds r0, 0x50 - cmp r1, r0 - bne _080D2EBC - adds r0, r4, 0 - bl move_anim_8072740 -_080D2EBC: - pop {r4} - pop {r0} - bx r0 - .align 2, 0 -_080D2EC4: .4byte gBattleAnimArgs - thumb_func_end sub_80D2E68 - - thumb_func_start sub_80D2EC8 -sub_80D2EC8: @ 80D2EC8 - push {r4-r6,lr} - adds r6, r0, 0 - movs r1, 0x2E - ldrsh r0, [r6, r1] - cmp r0, 0 - bne _080D2EF6 - movs r5, 0x78 - strh r5, [r6, 0x20] - ldr r4, _080D2F78 @ =gBattleAnimArgs - movs r2, 0 - ldrsh r0, [r4, r2] - lsrs r1, r0, 31 - adds r0, r1 - asrs r0, 1 - subs r0, 0xF - strh r0, [r6, 0x22] - ldrb r1, [r4, 0x2] - adds r0, r6, 0 - bl StartSpriteAnim - strh r5, [r6, 0x38] - ldrh r0, [r4, 0x4] - strh r0, [r6, 0x34] -_080D2EF6: - ldrh r0, [r6, 0x2E] - adds r0, 0x1 - movs r5, 0 - strh r0, [r6, 0x2E] - movs r1, 0x2E - ldrsh r0, [r6, r1] - lsrs r1, r0, 31 - adds r0, r1 - asrs r0, 1 - strh r0, [r6, 0x30] - movs r2, 0x2E - ldrsh r0, [r6, r2] - lsls r4, r0, 1 - adds r4, r0 - ldrh r0, [r6, 0x34] - adds r4, r0 - movs r2, 0xFF - ldrh r0, [r6, 0x3A] - adds r0, 0xA - movs r1, 0xFF - ands r0, r1 - strh r0, [r6, 0x3A] - ands r4, r2 - adds r0, r4, 0 - movs r1, 0x64 - bl Cos - strh r0, [r6, 0x24] - adds r0, r4, 0 - movs r1, 0xA - bl Sin - adds r4, r0, 0 - movs r1, 0x3A - ldrsh r0, [r6, r1] - movs r1, 0x4 - bl Cos - ldrh r2, [r6, 0x30] - adds r4, r2 - adds r0, r4 - strh r0, [r6, 0x26] - movs r0, 0x2E - ldrsh r1, [r6, r0] - movs r2, 0x38 - ldrsh r0, [r6, r2] - cmp r1, r0 - ble _080D2F72 - ldr r0, _080D2F7C @ =sub_80D2F80 - str r0, [r6, 0x1C] - strh r5, [r6, 0x2E] - adds r0, r6, 0 - bl oamt_add_pos2_onto_pos1 - movs r0, 0x5 - strh r0, [r6, 0x32] - strh r5, [r6, 0x36] - strh r5, [r6, 0x34] - adds r0, r6, 0 - movs r1, 0x1 - bl StartSpriteAffineAnim -_080D2F72: - pop {r4-r6} - pop {r0} - bx r0 - .align 2, 0 -_080D2F78: .4byte gBattleAnimArgs -_080D2F7C: .4byte sub_80D2F80 - thumb_func_end sub_80D2EC8 - - thumb_func_start sub_80D2F80 -sub_80D2F80: @ 80D2F80 - push {lr} - adds r1, r0, 0 - ldrh r0, [r1, 0x2E] - adds r0, 0x1 - strh r0, [r1, 0x2E] - lsls r0, 16 - asrs r0, 16 - cmp r0, 0xA - ble _080D2F9A - movs r0, 0 - strh r0, [r1, 0x2E] - ldr r0, _080D2FA0 @ =sub_80D2FA4 - str r0, [r1, 0x1C] -_080D2F9A: - pop {r0} - bx r0 - .align 2, 0 -_080D2FA0: .4byte sub_80D2FA4 - thumb_func_end sub_80D2F80 - - thumb_func_start sub_80D2FA4 -sub_80D2FA4: @ 80D2FA4 - push {r4,lr} - adds r4, r0, 0 - ldrh r1, [r4, 0x32] - ldrh r2, [r4, 0x34] - adds r0, r1, r2 - strh r0, [r4, 0x34] - strh r0, [r4, 0x26] - adds r1, 0x1 - strh r1, [r4, 0x32] - lsls r0, 16 - asrs r0, 16 - cmp r0, 0x30 - ble _080D2FCE - lsls r0, r1, 16 - cmp r0, 0 - ble _080D2FCE - ldrh r0, [r4, 0x36] - subs r1, r0, 0x5 - strh r1, [r4, 0x32] - adds r0, 0x1 - strh r0, [r4, 0x36] -_080D2FCE: - movs r1, 0x36 - ldrsh r0, [r4, r1] - cmp r0, 0x3 - ble _080D3000 - movs r2, 0x32 - ldrsh r1, [r4, r2] - lsrs r0, r1, 31 - adds r0, r1, r0 - asrs r0, 1 - lsls r0, 1 - subs r1, r0 - adds r3, r4, 0 - adds r3, 0x3E - movs r0, 0x1 - ands r1, r0 - lsls r1, 2 - ldrb r2, [r3] - movs r0, 0x5 - negs r0, r0 - ands r0, r2 - orrs r0, r1 - strb r0, [r3] - adds r0, r4, 0 - bl move_anim_8072740 -_080D3000: - movs r1, 0x36 - ldrsh r0, [r4, r1] - cmp r0, 0x4 - bne _080D300E - adds r0, r4, 0 - bl move_anim_8072740 -_080D300E: - pop {r4} - pop {r0} - bx r0 - thumb_func_end sub_80D2FA4 - - .align 2, 0 @ Don't pad with nop. diff --git a/asm/rain.s b/asm/rain.s deleted file mode 100755 index f8f68dd28..000000000 --- a/asm/rain.s +++ /dev/null @@ -1,123 +0,0 @@ - .include "constants/gba_constants.inc" - .include "asm/macros.inc" - - .syntax unified - - .text - - @ rain - - thumb_func_start sub_80D30F0 -sub_80D30F0: @ 80D30F0 - push {r4-r6,lr} - lsls r0, 24 - lsrs r0, 24 - adds r6, r0, 0 - ldr r1, _080D3178 @ =gTasks - lsls r0, r6, 2 - adds r0, r6 - lsls r0, 3 - adds r5, r0, r1 - movs r1, 0x8 - ldrsh r0, [r5, r1] - cmp r0, 0 - bne _080D3118 - ldr r1, _080D317C @ =gBattleAnimArgs - ldrh r0, [r1] - strh r0, [r5, 0xA] - ldrh r0, [r1, 0x2] - strh r0, [r5, 0xC] - ldrh r0, [r1, 0x4] - strh r0, [r5, 0xE] -_080D3118: - ldrh r0, [r5, 0x8] - adds r0, 0x1 - strh r0, [r5, 0x8] - movs r2, 0x8 - ldrsh r0, [r5, r2] - movs r2, 0xC - ldrsh r1, [r5, r2] - bl __modsi3 - cmp r0, 0x1 - bne _080D3160 - bl Random - lsls r0, 16 - lsrs r0, 16 - movs r1, 0xF0 - bl __umodsi3 - adds r4, r0, 0 - lsls r4, 24 - lsrs r4, 24 - bl Random - lsls r0, 16 - lsrs r0, 16 - movs r1, 0x50 - bl __umodsi3 - adds r2, r0, 0 - lsls r2, 24 - lsrs r2, 24 - ldr r0, _080D3180 @ =gSpriteTemplate_83D9130 - adds r1, r4, 0 - movs r3, 0x4 - bl CreateSprite -_080D3160: - movs r0, 0x8 - ldrsh r1, [r5, r0] - movs r2, 0xE - ldrsh r0, [r5, r2] - cmp r1, r0 - bne _080D3172 - adds r0, r6, 0 - bl DestroyAnimVisualTask -_080D3172: - pop {r4-r6} - pop {r0} - bx r0 - .align 2, 0 -_080D3178: .4byte gTasks -_080D317C: .4byte gBattleAnimArgs -_080D3180: .4byte gSpriteTemplate_83D9130 - thumb_func_end sub_80D30F0 - - thumb_func_start sub_80D3184 -sub_80D3184: @ 80D3184 - ldr r1, _080D318C @ =sub_80D3190 - str r1, [r0, 0x1C] - bx lr - .align 2, 0 -_080D318C: .4byte sub_80D3190 - thumb_func_end sub_80D3184 - - thumb_func_start sub_80D3190 -sub_80D3190: @ 80D3190 - push {lr} - adds r2, r0, 0 - ldrh r0, [r2, 0x2E] - adds r0, 0x1 - strh r0, [r2, 0x2E] - lsls r0, 16 - asrs r0, 16 - cmp r0, 0xD - bgt _080D31AE - ldrh r0, [r2, 0x24] - adds r0, 0x1 - strh r0, [r2, 0x24] - ldrh r0, [r2, 0x26] - adds r0, 0x4 - strh r0, [r2, 0x26] -_080D31AE: - adds r0, r2, 0 - adds r0, 0x3F - ldrb r1, [r0] - movs r0, 0x10 - ands r0, r1 - cmp r0, 0 - beq _080D31C2 - adds r0, r2, 0 - bl DestroySprite -_080D31C2: - pop {r0} - bx r0 - thumb_func_end sub_80D3190 - - .align 2, 0 @ Don't pad with nop. diff --git a/asm/shock.s b/asm/shock.s deleted file mode 100755 index 743aefe8a..000000000 --- a/asm/shock.s +++ /dev/null @@ -1,259 +0,0 @@ - .include "constants/gba_constants.inc" - .include "asm/macros.inc" - - .syntax unified - - .text - - @ shock - - thumb_func_start sub_80D6294 -sub_80D6294: @ 80D6294 - push {r4,r5,lr} - adds r5, r0, 0 - ldr r4, _080D62D8 @ =gBattleAnimBankTarget - ldrb r0, [r4] - movs r1, 0x2 - bl sub_8077ABC - lsls r0, 24 - lsrs r0, 24 - strh r0, [r5, 0x20] - ldrb r0, [r4] - movs r1, 0x3 - bl sub_8077ABC - lsls r0, 24 - lsrs r0, 24 - strh r0, [r5, 0x22] - ldr r0, _080D62DC @ =gBattleAnimBankAttacker - ldrb r0, [r0] - bl GetBankSide - lsls r0, 24 - cmp r0, 0 - beq _080D62E4 - ldr r2, _080D62E0 @ =gBattleAnimArgs - ldrh r0, [r5, 0x20] - ldrh r1, [r2] - subs r0, r1 - strh r0, [r5, 0x20] - ldrh r0, [r5, 0x22] - ldrh r1, [r2, 0x2] - subs r0, r1 - strh r0, [r5, 0x22] - b _080D62F8 - .align 2, 0 -_080D62D8: .4byte gBattleAnimBankTarget -_080D62DC: .4byte gBattleAnimBankAttacker -_080D62E0: .4byte gBattleAnimArgs -_080D62E4: - ldr r0, _080D631C @ =gBattleAnimArgs - ldrh r1, [r0] - ldrh r2, [r5, 0x20] - adds r1, r2 - strh r1, [r5, 0x20] - ldrh r1, [r0, 0x2] - ldrh r2, [r5, 0x22] - adds r1, r2 - strh r1, [r5, 0x22] - adds r2, r0, 0 -_080D62F8: - movs r0, 0 - strh r0, [r5, 0x2E] - ldrh r0, [r2, 0x4] - strh r0, [r5, 0x30] - ldrh r0, [r2, 0x6] - strh r0, [r5, 0x32] - ldrh r0, [r2, 0x8] - strh r0, [r5, 0x34] - ldr r1, _080D6320 @ =move_anim_8074EE0 - adds r0, r5, 0 - bl StoreSpriteCallbackInData - ldr r0, _080D6324 @ =sub_8078114 - str r0, [r5, 0x1C] - pop {r4,r5} - pop {r0} - bx r0 - .align 2, 0 -_080D631C: .4byte gBattleAnimArgs -_080D6320: .4byte move_anim_8074EE0 -_080D6324: .4byte sub_8078114 - thumb_func_end sub_80D6294 - - thumb_func_start sub_80D6328 -sub_80D6328: @ 80D6328 - push {r4-r7,lr} - adds r5, r0, 0 - ldr r0, _080D6340 @ =gBattleAnimArgs - movs r1, 0x8 - ldrsh r0, [r0, r1] - cmp r0, 0x1 - beq _080D63A0 - cmp r0, 0x1 - bgt _080D6344 - cmp r0, 0 - beq _080D634E - b _080D63A0 - .align 2, 0 -_080D6340: .4byte gBattleAnimArgs -_080D6344: - cmp r0, 0x2 - beq _080D6358 - cmp r0, 0x3 - beq _080D637C - b _080D63A0 -_080D634E: - ldr r0, _080D6354 @ =gBattleAnimBankAttacker - b _080D63A2 - .align 2, 0 -_080D6354: .4byte gBattleAnimBankAttacker -_080D6358: - ldr r4, _080D6370 @ =gBattleAnimBankAttacker - ldrb r0, [r4] - movs r6, 0x2 - eors r0, r6 - bl IsAnimBankSpriteVisible - lsls r0, 24 - cmp r0, 0 - bne _080D6374 - ldrb r4, [r4] - b _080D63A4 - .align 2, 0 -_080D6370: .4byte gBattleAnimBankAttacker -_080D6374: - ldrb r0, [r4] - adds r4, r6, 0 - eors r4, r0 - b _080D63A4 -_080D637C: - ldr r0, _080D6398 @ =gBattleAnimBankAttacker - ldrb r0, [r0] - movs r4, 0x2 - eors r0, r4 - bl IsAnimBankSpriteVisible - lsls r0, 24 - cmp r0, 0 - beq _080D63A0 - ldr r0, _080D639C @ =gBattleAnimBankTarget - ldrb r0, [r0] - eors r4, r0 - b _080D63A4 - .align 2, 0 -_080D6398: .4byte gBattleAnimBankAttacker -_080D639C: .4byte gBattleAnimBankTarget -_080D63A0: - ldr r0, _080D63C4 @ =gBattleAnimBankTarget -_080D63A2: - ldrb r4, [r0] -_080D63A4: - ldr r0, _080D63C8 @ =gBattleAnimArgs - movs r2, 0xA - ldrsh r0, [r0, r2] - cmp r0, 0 - bne _080D63CC - adds r0, r4, 0 - movs r1, 0 - bl sub_8077ABC - lsls r0, 24 - lsrs r0, 24 - strh r0, [r5, 0x20] - adds r0, r4, 0 - movs r1, 0x1 - b _080D63DE - .align 2, 0 -_080D63C4: .4byte gBattleAnimBankTarget -_080D63C8: .4byte gBattleAnimArgs -_080D63CC: - adds r0, r4, 0 - movs r1, 0x2 - bl sub_8077ABC - lsls r0, 24 - lsrs r0, 24 - strh r0, [r5, 0x20] - adds r0, r4, 0 - movs r1, 0x3 -_080D63DE: - bl sub_8077ABC - lsls r0, 24 - lsrs r0, 24 - strh r0, [r5, 0x22] - ldr r7, _080D647C @ =gSineTable - ldr r6, _080D6480 @ =gBattleAnimArgs - movs r1, 0 - ldrsh r0, [r6, r1] - lsls r0, 1 - adds r0, r7 - movs r2, 0 - ldrsh r1, [r0, r2] - movs r2, 0x2 - ldrsh r0, [r6, r2] - muls r0, r1 - asrs r0, 8 - strh r0, [r5, 0x24] - movs r1, 0 - ldrsh r0, [r6, r1] - adds r0, 0x40 - lsls r0, 1 - adds r0, r7 - movs r2, 0 - ldrsh r1, [r0, r2] - movs r2, 0x2 - ldrsh r0, [r6, r2] - muls r0, r1 - asrs r0, 8 - strh r0, [r5, 0x26] - ldrh r1, [r6, 0xC] - movs r0, 0x1 - ands r0, r1 - cmp r0, 0 - beq _080D6442 - adds r0, r4, 0 - bl sub_8079ED4 - lsls r0, 24 - lsrs r0, 24 - adds r0, 0x1 - movs r1, 0x3 - ands r0, r1 - lsls r0, 2 - ldrb r2, [r5, 0x5] - movs r1, 0xD - negs r1, r1 - ands r1, r2 - orrs r1, r0 - strb r1, [r5, 0x5] -_080D6442: - ldrb r2, [r5, 0x3] - lsls r2, 26 - lsrs r2, 27 - movs r0, 0x4 - ldrsh r1, [r6, r0] - lsls r0, r1, 1 - adds r0, r7 - ldrh r0, [r0] - ldr r3, _080D6484 @ =gOamMatrices - lsls r2, 3 - adds r2, r3 - adds r1, 0x40 - lsls r1, 1 - adds r1, r7 - ldrh r1, [r1] - strh r1, [r2, 0x6] - strh r1, [r2] - strh r0, [r2, 0x2] - lsls r0, 16 - asrs r0, 16 - negs r0, r0 - strh r0, [r2, 0x4] - ldrh r0, [r6, 0x6] - strh r0, [r5, 0x2E] - ldr r0, _080D6488 @ =sub_80DA48C - str r0, [r5, 0x1C] - pop {r4-r7} - pop {r0} - bx r0 - .align 2, 0 -_080D647C: .4byte gSineTable -_080D6480: .4byte gBattleAnimArgs -_080D6484: .4byte gOamMatrices -_080D6488: .4byte sub_80DA48C - thumb_func_end sub_80D6328 - - .align 2, 0 @ Don't pad with nop. diff --git a/asm/struggle.s b/asm/struggle.s deleted file mode 100755 index 2d618ed8f..000000000 --- a/asm/struggle.s +++ /dev/null @@ -1,111 +0,0 @@ - .include "constants/gba_constants.inc" - .include "asm/macros.inc" - - .syntax unified - - .text - - thumb_func_start sub_80D2C38 -sub_80D2C38: @ 80D2C38 - push {r4,r5,lr} - adds r5, r0, 0 - ldr r1, _080D2C50 @ =gBattleAnimArgs - movs r2, 0x4 - ldrsh r0, [r1, r2] - cmp r0, 0 - bne _080D2C54 - adds r0, r5, 0 - bl move_anim_8072740 - b _080D2CB8 - .align 2, 0 -_080D2C50: .4byte gBattleAnimArgs -_080D2C54: - movs r2, 0 - ldrsh r0, [r1, r2] - cmp r0, 0 - bne _080D2C64 - ldr r4, _080D2C60 @ =gBattleAnimBankAttacker - b _080D2C66 - .align 2, 0 -_080D2C60: .4byte gBattleAnimBankAttacker -_080D2C64: - ldr r4, _080D2C94 @ =gBattleAnimBankTarget -_080D2C66: - ldrb r0, [r4] - movs r1, 0x2 - bl sub_8077ABC - lsls r0, 24 - lsrs r0, 24 - strh r0, [r5, 0x20] - ldrb r0, [r4] - movs r1, 0x3 - bl sub_8077ABC - lsls r0, 24 - lsrs r0, 24 - strh r0, [r5, 0x22] - ldr r0, _080D2C98 @ =gBattleAnimArgs - movs r2, 0x2 - ldrsh r1, [r0, r2] - adds r2, r0, 0 - cmp r1, 0 - bne _080D2C9C - ldrh r0, [r5, 0x20] - adds r0, 0x20 - b _080D2CA0 - .align 2, 0 -_080D2C94: .4byte gBattleAnimBankTarget -_080D2C98: .4byte gBattleAnimArgs -_080D2C9C: - ldrh r0, [r5, 0x20] - subs r0, 0x20 -_080D2CA0: - strh r0, [r5, 0x20] - ldrh r0, [r2, 0x4] - strh r0, [r5, 0x2E] - ldrh r1, [r2, 0x2] - strh r1, [r5, 0x30] - lsls r1, 24 - lsrs r1, 24 - adds r0, r5, 0 - bl StartSpriteAnim - ldr r0, _080D2CC0 @ =sub_80D2CC4 - str r0, [r5, 0x1C] -_080D2CB8: - pop {r4,r5} - pop {r0} - bx r0 - .align 2, 0 -_080D2CC0: .4byte sub_80D2CC4 - thumb_func_end sub_80D2C38 - - thumb_func_start sub_80D2CC4 -sub_80D2CC4: @ 80D2CC4 - push {lr} - adds r2, r0, 0 - adds r0, 0x3F - ldrb r1, [r0] - movs r0, 0x10 - ands r0, r1 - cmp r0, 0 - beq _080D2CF4 - ldrh r0, [r2, 0x2E] - subs r0, 0x1 - strh r0, [r2, 0x2E] - lsls r0, 16 - cmp r0, 0 - beq _080D2CEE - ldrh r1, [r2, 0x30] - lsls r1, 24 - lsrs r1, 24 - adds r0, r2, 0 - bl StartSpriteAnim - b _080D2CF4 -_080D2CEE: - adds r0, r2, 0 - bl move_anim_8072740 -_080D2CF4: - pop {r0} - bx r0 - thumb_func_end sub_80D2CC4 - - .align 2, 0 @ Don't pad with nop. diff --git a/asm/sunlight.s b/asm/sunlight.s deleted file mode 100755 index 07895e1b9..000000000 --- a/asm/sunlight.s +++ /dev/null @@ -1,33 +0,0 @@ - .include "constants/gba_constants.inc" - .include "asm/macros.inc" - - .syntax unified - - .text - - @ sunlight - - thumb_func_start sub_80D517C -sub_80D517C: @ 80D517C - push {lr} - movs r1, 0 - strh r1, [r0, 0x20] - strh r1, [r0, 0x22] - movs r1, 0x3C - strh r1, [r0, 0x2E] - movs r1, 0x8C - strh r1, [r0, 0x32] - movs r1, 0x50 - strh r1, [r0, 0x36] - ldr r1, _080D51A0 @ =sub_8078B34 - str r1, [r0, 0x1C] - ldr r1, _080D51A4 @ =move_anim_8072740 - bl StoreSpriteCallbackInData - pop {r0} - bx r0 - .align 2, 0 -_080D51A0: .4byte sub_8078B34 -_080D51A4: .4byte move_anim_8072740 - thumb_func_end sub_80D517C - - .align 2, 0 @ Don't pad with nop. diff --git a/asm/swipe.s b/asm/swipe.s deleted file mode 100755 index 7f5284d7c..000000000 --- a/asm/swipe.s +++ /dev/null @@ -1,50 +0,0 @@ - .include "constants/gba_constants.inc" - .include "asm/macros.inc" - - .syntax unified - - .text - - thumb_func_start sub_80D2BE8 -sub_80D2BE8: @ 80D2BE8 - push {r4,lr} - adds r4, r0, 0 - movs r1, 0x2E - ldrsh r0, [r4, r1] - cmp r0, 0 - bne _080D2C1C - ldr r1, _080D2C18 @ =gBattleAnimArgs - ldrh r0, [r1] - ldrh r2, [r4, 0x20] - adds r0, r2 - strh r0, [r4, 0x20] - ldrh r0, [r1, 0x2] - ldrh r2, [r4, 0x22] - adds r0, r2 - strh r0, [r4, 0x22] - ldrb r1, [r1, 0x4] - adds r0, r4, 0 - bl StartSpriteAnim - ldrh r0, [r4, 0x2E] - adds r0, 0x1 - strh r0, [r4, 0x2E] - b _080D2C30 - .align 2, 0 -_080D2C18: .4byte gBattleAnimArgs -_080D2C1C: - adds r0, r4, 0 - adds r0, 0x3F - ldrb r1, [r0] - movs r0, 0x10 - ands r0, r1 - cmp r0, 0 - beq _080D2C30 - adds r0, r4, 0 - bl move_anim_8072740 -_080D2C30: - pop {r4} - pop {r0} - bx r0 - thumb_func_end sub_80D2BE8 - - .align 2, 0 @ Don't pad with nop. diff --git a/asm/thunder.s b/asm/thunder.s deleted file mode 100755 index df97608f9..000000000 --- a/asm/thunder.s +++ /dev/null @@ -1,68 +0,0 @@ - .include "constants/gba_constants.inc" - .include "asm/macros.inc" - - .syntax unified - - .text - - @ thunder - - thumb_func_start sub_80D61C8 -sub_80D61C8: @ 80D61C8 - push {r4,lr} - adds r4, r0, 0 - ldr r0, _080D61E8 @ =gBattleAnimBankAttacker - ldrb r0, [r0] - bl GetBankSide - lsls r0, 24 - cmp r0, 0 - beq _080D61F0 - ldr r0, _080D61EC @ =gBattleAnimArgs - ldrh r1, [r4, 0x20] - ldrh r2, [r0] - subs r1, r2 - strh r1, [r4, 0x20] - b _080D61FC - .align 2, 0 -_080D61E8: .4byte gBattleAnimBankAttacker -_080D61EC: .4byte gBattleAnimArgs -_080D61F0: - ldr r1, _080D6210 @ =gBattleAnimArgs - ldrh r0, [r1] - ldrh r2, [r4, 0x20] - adds r0, r2 - strh r0, [r4, 0x20] - adds r0, r1, 0 -_080D61FC: - ldrh r0, [r0, 0x2] - ldrh r1, [r4, 0x22] - adds r0, r1 - strh r0, [r4, 0x22] - ldr r0, _080D6214 @ =sub_80D6218 - str r0, [r4, 0x1C] - pop {r4} - pop {r0} - bx r0 - .align 2, 0 -_080D6210: .4byte gBattleAnimArgs -_080D6214: .4byte sub_80D6218 - thumb_func_end sub_80D61C8 - - thumb_func_start sub_80D6218 -sub_80D6218: @ 80D6218 - push {lr} - adds r2, r0, 0 - adds r0, 0x3F - ldrb r1, [r0] - movs r0, 0x10 - ands r0, r1 - cmp r0, 0 - beq _080D622E - adds r0, r2, 0 - bl move_anim_8072740 -_080D622E: - pop {r0} - bx r0 - thumb_func_end sub_80D6218 - - .align 2, 0 @ Don't pad with nop. diff --git a/asm/uproar.s b/asm/uproar.s deleted file mode 100755 index 04f428d4e..000000000 --- a/asm/uproar.s +++ /dev/null @@ -1,64 +0,0 @@ - .include "constants/gba_constants.inc" - .include "asm/macros.inc" - - .syntax unified - - .text - - thumb_func_start sub_80D2CF8 -sub_80D2CF8: @ 80D2CF8 - push {r4,r5,lr} - adds r5, r0, 0 - lsls r5, 24 - lsrs r5, 24 - ldr r0, _080D2D2C @ =gBattleAnimArgs - ldrb r0, [r0] - bl GetAnimBankSpriteId - adds r1, r0, 0 - lsls r1, 24 - lsrs r1, 24 - lsls r4, r5, 2 - adds r4, r5 - lsls r4, 3 - ldr r0, _080D2D30 @ =gTasks - adds r4, r0 - ldr r2, _080D2D34 @ =gUnknown_083D7CA8 - adds r0, r4, 0 - bl sub_80798F4 - ldr r0, _080D2D38 @ =sub_80D2D3C - str r0, [r4] - pop {r4,r5} - pop {r0} - bx r0 - .align 2, 0 -_080D2D2C: .4byte gBattleAnimArgs -_080D2D30: .4byte gTasks -_080D2D34: .4byte gUnknown_083D7CA8 -_080D2D38: .4byte sub_80D2D3C - thumb_func_end sub_80D2CF8 - - thumb_func_start sub_80D2D3C -sub_80D2D3C: @ 80D2D3C - push {r4,lr} - lsls r0, 24 - lsrs r4, r0, 24 - lsls r0, r4, 2 - adds r0, r4 - lsls r0, 3 - ldr r1, _080D2D64 @ =gTasks - adds r0, r1 - bl sub_807992C - lsls r0, 24 - cmp r0, 0 - bne _080D2D5C - adds r0, r4, 0 - bl DestroyAnimVisualTask -_080D2D5C: - pop {r4} - pop {r0} - bx r0 - .align 2, 0 -_080D2D64: .4byte gTasks - thumb_func_end sub_80D2D3C - - .align 2, 0 @ Don't pad with nop. diff --git a/asm/water.s b/asm/water.s index e982d4265..4bf95ab59 100755 --- a/asm/water.s +++ b/asm/water.s @@ -7,420 +7,6 @@ @ water - thumb_func_start sub_80D37FC -sub_80D37FC: @ 80D37FC - push {r4,lr} - adds r4, r0, 0 - movs r1, 0x1 - bl sub_8078764 - ldr r0, _080D382C @ =gBattleAnimArgs - ldrh r1, [r0, 0x8] - strh r1, [r4, 0x2E] - ldrh r0, [r0, 0x4] - ldrh r2, [r4, 0x20] - adds r0, r2 - strh r0, [r4, 0x32] - ldrh r0, [r4, 0x22] - adds r1, r0 - strh r1, [r4, 0x36] - ldr r0, _080D3830 @ =sub_8078B34 - str r0, [r4, 0x1C] - ldr r1, _080D3834 @ =move_anim_8072740 - adds r0, r4, 0 - bl StoreSpriteCallbackInData - pop {r4} - pop {r0} - bx r0 - .align 2, 0 -_080D382C: .4byte gBattleAnimArgs -_080D3830: .4byte sub_8078B34 -_080D3834: .4byte move_anim_8072740 - thumb_func_end sub_80D37FC - - thumb_func_start sub_80D3838 -sub_80D3838: @ 80D3838 - push {r4,lr} - adds r4, r0, 0 - ldr r0, _080D3850 @ =gBattleAnimArgs - movs r1, 0x6 - ldrsh r0, [r0, r1] - cmp r0, 0 - beq _080D3854 - adds r0, r4, 0 - movs r1, 0x1 - bl sub_8078764 - b _080D385C - .align 2, 0 -_080D3850: .4byte gBattleAnimArgs -_080D3854: - adds r0, r4, 0 - movs r1, 0x1 - bl sub_80787B0 -_080D385C: - ldr r0, _080D386C @ =gBattleAnimArgs - ldrh r0, [r0, 0x4] - strh r0, [r4, 0x3C] - ldr r0, _080D3870 @ =sub_80D3874 - str r0, [r4, 0x1C] - pop {r4} - pop {r0} - bx r0 - .align 2, 0 -_080D386C: .4byte gBattleAnimArgs -_080D3870: .4byte sub_80D3874 - thumb_func_end sub_80D3838 - - thumb_func_start sub_80D3874 -sub_80D3874: @ 80D3874 - push {r4,lr} - adds r4, r0, 0 - ldrh r0, [r4, 0x2E] - adds r0, 0xB - movs r1, 0xFF - ands r0, r1 - strh r0, [r4, 0x2E] - movs r1, 0x2E - ldrsh r0, [r4, r1] - movs r1, 0x4 - bl Sin - strh r0, [r4, 0x24] - ldrh r0, [r4, 0x30] - adds r0, 0x30 - strh r0, [r4, 0x30] - lsls r0, 16 - asrs r0, 24 - negs r0, r0 - strh r0, [r4, 0x26] - ldrh r0, [r4, 0x3C] - subs r0, 0x1 - strh r0, [r4, 0x3C] - lsls r0, 16 - asrs r0, 16 - movs r1, 0x1 - negs r1, r1 - cmp r0, r1 - bne _080D38B4 - adds r0, r4, 0 - bl move_anim_8072740 -_080D38B4: - pop {r4} - pop {r0} - bx r0 - thumb_func_end sub_80D3874 - - thumb_func_start sub_80D38BC -sub_80D38BC: @ 80D38BC - push {r4-r7,lr} - mov r7, r10 - mov r6, r9 - mov r5, r8 - push {r5-r7} - sub sp, 0x14 - lsls r0, 24 - lsrs r0, 24 - mov r10, r0 - ldr r1, _080D398C @ =REG_BLDCNT - ldr r2, _080D3990 @ =0x00003f42 - adds r0, r2, 0 - strh r0, [r1] - adds r1, 0x2 - movs r3, 0x80 - lsls r3, 5 - adds r0, r3, 0 - strh r0, [r1] - ldr r2, _080D3994 @ =REG_BG1CNT - ldrb r1, [r2] - movs r0, 0x4 - negs r0, r0 - ands r0, r1 - movs r1, 0x1 - orrs r0, r1 - strb r0, [r2] - ldrb r1, [r2, 0x1] - movs r0, 0x3F - ands r0, r1 - movs r1, 0x40 - orrs r0, r1 - strb r0, [r2, 0x1] - mov r0, sp - bl sub_8078914 - ldr r2, [sp] - movs r3, 0x80 - lsls r3, 6 - add r6, sp, 0x10 - add r0, sp, 0xC - mov r12, r0 - movs r5, 0 - ldr r1, _080D3998 @ =0x040000d4 - movs r4, 0x80 - lsls r4, 5 - mov r8, r6 - ldr r7, _080D399C @ =0x85000400 - movs r0, 0x85 - lsls r0, 24 - mov r9, r0 -_080D3920: - str r5, [sp, 0x10] - mov r0, r8 - str r0, [r1] - str r2, [r1, 0x4] - str r7, [r1, 0x8] - ldr r0, [r1, 0x8] - adds r2, r4 - subs r3, r4 - cmp r3, r4 - bhi _080D3920 - str r5, [sp, 0x10] - str r6, [r1] - str r2, [r1, 0x4] - lsrs r0, r3, 2 - mov r2, r9 - orrs r0, r2 - str r0, [r1, 0x8] - ldr r0, [r1, 0x8] - movs r0, 0 - mov r3, r12 - strb r0, [r3] - strb r0, [r3] - ldr r1, [sp, 0x4] - movs r0, 0 - str r0, [sp, 0x10] - ldr r0, _080D3998 @ =0x040000d4 - str r6, [r0] - str r1, [r0, 0x4] - ldr r1, _080D399C @ =0x85000400 - str r1, [r0, 0x8] - ldr r0, [r0, 0x8] - bl NotInBattle - lsls r0, 24 - cmp r0, 0 - bne _080D39B8 - ldr r2, _080D3994 @ =REG_BG1CNT - ldrb r1, [r2] - movs r0, 0xD - negs r0, r0 - ands r0, r1 - movs r1, 0x4 - orrs r0, r1 - strb r0, [r2] - ldr r0, _080D39A0 @ =gBattleAnimBankAttacker - ldrb r0, [r0] - bl GetBankSide - lsls r0, 24 - lsrs r0, 24 - cmp r0, 0x1 - bne _080D39A8 - ldr r0, _080D39A4 @ =gUnknown_08E70968 - b _080D39AA - .align 2, 0 -_080D398C: .4byte REG_BLDCNT -_080D3990: .4byte 0x00003f42 -_080D3994: .4byte REG_BG1CNT -_080D3998: .4byte 0x040000d4 -_080D399C: .4byte 0x85000400 -_080D39A0: .4byte gBattleAnimBankAttacker -_080D39A4: .4byte gUnknown_08E70968 -_080D39A8: - ldr r0, _080D39B4 @ =gUnknown_08E70C38 -_080D39AA: - ldr r1, [sp, 0x4] - bl LZDecompressVram - b _080D39CE - .align 2, 0 -_080D39B4: .4byte gUnknown_08E70C38 -_080D39B8: - ldr r0, _080D39F0 @ =gUnknown_08E70F0C - ldr r1, [sp, 0x4] - bl LZDecompressVram - mov r0, sp - ldrb r0, [r0, 0x8] - ldr r1, [sp, 0x4] - movs r2, 0 - movs r3, 0x1 - bl sub_80763FC -_080D39CE: - ldr r0, _080D39F4 @ =gBattleAnimBackgroundImage_Surf - ldr r1, [sp] - bl LZDecompressVram - ldr r0, _080D39F8 @ =gBattleAnimArgs - movs r1, 0 - ldrsh r0, [r0, r1] - cmp r0, 0 - bne _080D3A00 - ldr r0, _080D39FC @ =gBattleAnimBackgroundPalette_Surf - mov r1, sp - ldrb r1, [r1, 0x8] - lsls r1, 4 - movs r2, 0x20 - bl LoadCompressedPalette - b _080D3A0E - .align 2, 0 -_080D39F0: .4byte gUnknown_08E70F0C -_080D39F4: .4byte gBattleAnimBackgroundImage_Surf -_080D39F8: .4byte gBattleAnimArgs -_080D39FC: .4byte gBattleAnimBackgroundPalette_Surf -_080D3A00: - ldr r0, _080D3A78 @ =gBattleAnimBackgroundImageMuddyWater_Pal - mov r1, sp - ldrb r1, [r1, 0x8] - lsls r1, 4 - movs r2, 0x20 - bl LoadCompressedPalette -_080D3A0E: - ldr r0, _080D3A7C @ =sub_80D3D68 - ldr r4, _080D3A80 @ =gTasks - mov r2, r10 - lsls r5, r2, 2 - adds r1, r5, r2 - lsls r1, 3 - adds r6, r1, r4 - ldrb r1, [r6, 0x7] - adds r1, 0x1 - lsls r1, 24 - lsrs r1, 24 - bl CreateTask - lsls r0, 24 - lsrs r0, 24 - mov r8, r0 - movs r3, 0 - mov r9, r3 - mov r0, r8 - strh r0, [r6, 0x26] - mov r1, r8 - lsls r0, r1, 2 - add r0, r8 - lsls r0, 3 - adds r7, r0, r4 - mov r2, r9 - strh r2, [r7, 0x8] - movs r0, 0x80 - lsls r0, 5 - strh r0, [r7, 0xA] - strh r0, [r7, 0xC] - bl NotInBattle - lsls r0, 24 - lsrs r4, r0, 24 - cmp r4, 0 - beq _080D3A94 - ldr r3, _080D3A84 @ =0x0000ffb0 - adds r0, r3, 0 - ldr r1, _080D3A88 @ =gUnknown_030042C0 - strh r0, [r1] - ldr r2, _080D3A8C @ =0x0000ffd0 - adds r0, r2, 0 - ldr r3, _080D3A90 @ =gUnknown_030041B4 - strh r0, [r3] - movs r0, 0x2 - strh r0, [r6, 0x8] - movs r0, 0x1 - strh r0, [r6, 0xA] - mov r0, r9 - strh r0, [r7, 0xE] - b _080D3AEE - .align 2, 0 -_080D3A78: .4byte gBattleAnimBackgroundImageMuddyWater_Pal -_080D3A7C: .4byte sub_80D3D68 -_080D3A80: .4byte gTasks -_080D3A84: .4byte 0x0000ffb0 -_080D3A88: .4byte gUnknown_030042C0 -_080D3A8C: .4byte 0x0000ffd0 -_080D3A90: .4byte gUnknown_030041B4 -_080D3A94: - ldr r0, _080D3AC4 @ =gBattleAnimBankAttacker - ldrb r0, [r0] - bl GetBankSide - lsls r0, 24 - lsrs r1, r0, 24 - cmp r1, 0x1 - bne _080D3AD8 - ldr r2, _080D3AC8 @ =0x0000ff20 - adds r0, r2, 0 - ldr r3, _080D3ACC @ =gUnknown_030042C0 - strh r0, [r3] - movs r2, 0x80 - lsls r2, 1 - adds r0, r2, 0 - ldr r3, _080D3AD0 @ =gUnknown_030041B4 - strh r0, [r3] - movs r0, 0x2 - strh r0, [r6, 0x8] - ldr r0, _080D3AD4 @ =0x0000ffff - strh r0, [r6, 0xA] - strh r1, [r7, 0xE] - b _080D3AEE - .align 2, 0 -_080D3AC4: .4byte gBattleAnimBankAttacker -_080D3AC8: .4byte 0x0000ff20 -_080D3ACC: .4byte gUnknown_030042C0 -_080D3AD0: .4byte gUnknown_030041B4 -_080D3AD4: .4byte 0x0000ffff -_080D3AD8: - ldr r0, _080D3B1C @ =gUnknown_030042C0 - strh r4, [r0] - ldr r1, _080D3B20 @ =0x0000ffd0 - adds r0, r1, 0 - ldr r2, _080D3B24 @ =gUnknown_030041B4 - strh r0, [r2] - ldr r0, _080D3B28 @ =0x0000fffe - strh r0, [r6, 0x8] - movs r0, 0x1 - strh r0, [r6, 0xA] - strh r4, [r7, 0xE] -_080D3AEE: - ldr r1, _080D3B2C @ =REG_BG1HOFS - ldr r3, _080D3B1C @ =gUnknown_030042C0 - ldrh r0, [r3] - strh r0, [r1] - adds r1, 0x2 - ldr r2, _080D3B24 @ =gUnknown_030041B4 - ldrh r0, [r2] - strh r0, [r1] - ldr r1, _080D3B30 @ =gTasks - mov r3, r8 - lsls r0, r3, 2 - add r0, r8 - lsls r0, 3 - adds r2, r0, r1 - movs r3, 0xE - ldrsh r0, [r2, r3] - cmp r0, 0 - bne _080D3B34 - movs r0, 0x30 - strh r0, [r2, 0x10] - movs r0, 0x70 - b _080D3B38 - .align 2, 0 -_080D3B1C: .4byte gUnknown_030042C0 -_080D3B20: .4byte 0x0000ffd0 -_080D3B24: .4byte gUnknown_030041B4 -_080D3B28: .4byte 0x0000fffe -_080D3B2C: .4byte REG_BG1HOFS -_080D3B30: .4byte gTasks -_080D3B34: - movs r0, 0 - strh r0, [r2, 0x10] -_080D3B38: - strh r0, [r2, 0x12] - mov r2, r10 - adds r0, r5, r2 - lsls r0, 3 - adds r0, r1 - movs r1, 0x1 - strh r1, [r0, 0x14] - ldr r1, _080D3B5C @ =sub_80D3B60 - str r1, [r0] - add sp, 0x14 - pop {r3-r5} - mov r8, r3 - mov r9, r4 - mov r10, r5 - pop {r4-r7} - pop {r0} - bx r0 - .align 2, 0 -_080D3B5C: .4byte sub_80D3B60 - thumb_func_end sub_80D38BC - thumb_func_start sub_80D3B60 sub_80D3B60: @ 80D3B60 push {r4-r7,lr} diff --git a/asm/wisp_orb.s b/asm/wisp_orb.s deleted file mode 100755 index cb5920ba4..000000000 --- a/asm/wisp_orb.s +++ /dev/null @@ -1,230 +0,0 @@ - .include "constants/gba_constants.inc" - .include "asm/macros.inc" - - .syntax unified - - .text - - @ wisp_orb - - thumb_func_start sub_80D5B0C -sub_80D5B0C: @ 80D5B0C - push {r4,r5,lr} - adds r5, r0, 0 - movs r1, 0x2E - ldrsh r0, [r5, r1] - cmp r0, 0x1 - beq _080D5B80 - cmp r0, 0x1 - bgt _080D5B22 - cmp r0, 0 - beq _080D5B28 - b _080D5C4E -_080D5B22: - cmp r0, 0x2 - beq _080D5BDE - b _080D5C4E -_080D5B28: - adds r0, r5, 0 - movs r1, 0 - bl sub_80787B0 - ldr r4, _080D5B50 @ =gBattleAnimArgs - ldrb r1, [r4, 0x4] - adds r0, r5, 0 - bl StartSpriteAnim - ldrh r0, [r4, 0x4] - strh r0, [r5, 0x3C] - ldr r0, _080D5B54 @ =gBattleAnimBankAttacker - ldrb r0, [r0] - bl GetBankSide - lsls r0, 24 - cmp r0, 0 - beq _080D5B58 - movs r0, 0x4 - b _080D5B5A - .align 2, 0 -_080D5B50: .4byte gBattleAnimArgs -_080D5B54: .4byte gBattleAnimBankAttacker -_080D5B58: - ldr r0, _080D5B78 @ =0x0000fffc -_080D5B5A: - strh r0, [r5, 0x36] - ldr r0, _080D5B7C @ =gBattleAnimBankTarget - ldrb r0, [r0] - bl sub_8079ED4 - movs r1, 0x3 - ands r1, r0 - lsls r1, 2 - ldrb r2, [r5, 0x5] - movs r0, 0xD - negs r0, r0 - ands r0, r2 - orrs r0, r1 - strb r0, [r5, 0x5] - b _080D5BD6 - .align 2, 0 -_080D5B78: .4byte 0x0000fffc -_080D5B7C: .4byte gBattleAnimBankTarget -_080D5B80: - ldrh r0, [r5, 0x30] - adds r0, 0xC0 - strh r0, [r5, 0x30] - ldr r0, _080D5BA0 @ =gBattleAnimBankAttacker - ldrb r0, [r0] - bl GetBankSide - lsls r0, 24 - cmp r0, 0 - beq _080D5BA4 - ldrh r0, [r5, 0x30] - lsls r0, 16 - asrs r0, 24 - negs r0, r0 - b _080D5BAA - .align 2, 0 -_080D5BA0: .4byte gBattleAnimBankAttacker -_080D5BA4: - ldrh r0, [r5, 0x30] - lsls r0, 16 - asrs r0, 24 -_080D5BAA: - strh r0, [r5, 0x26] - movs r2, 0x32 - ldrsh r0, [r5, r2] - movs r2, 0x36 - ldrsh r1, [r5, r2] - bl Sin - strh r0, [r5, 0x24] - ldrh r0, [r5, 0x32] - adds r0, 0x4 - movs r1, 0xFF - ands r0, r1 - strh r0, [r5, 0x32] - ldrh r0, [r5, 0x34] - adds r0, 0x1 - strh r0, [r5, 0x34] - lsls r0, 16 - asrs r0, 16 - cmp r0, 0x1 - bne _080D5C4E - movs r0, 0 - strh r0, [r5, 0x34] -_080D5BD6: - ldrh r0, [r5, 0x2E] - adds r0, 0x1 - strh r0, [r5, 0x2E] - b _080D5C4E -_080D5BDE: - movs r1, 0x32 - ldrsh r0, [r5, r1] - movs r2, 0x36 - ldrsh r1, [r5, r2] - bl Sin - adds r2, r0, 0 - movs r3, 0 - strh r2, [r5, 0x24] - ldrh r0, [r5, 0x32] - adds r0, 0x4 - movs r1, 0xFF - ands r0, r1 - strh r0, [r5, 0x32] - ldrh r0, [r5, 0x34] - adds r0, 0x1 - strh r0, [r5, 0x34] - lsls r0, 16 - asrs r0, 16 - cmp r0, 0x1F - bne _080D5C4E - ldrh r0, [r5, 0x20] - adds r1, r2, r0 - strh r1, [r5, 0x20] - ldrh r0, [r5, 0x26] - ldrh r2, [r5, 0x22] - adds r0, r2 - strh r0, [r5, 0x22] - strh r3, [r5, 0x26] - strh r3, [r5, 0x24] - movs r0, 0x80 - lsls r0, 1 - strh r0, [r5, 0x2E] - strh r1, [r5, 0x30] - ldr r4, _080D5C54 @ =gBattleAnimBankTarget - ldrb r0, [r4] - movs r1, 0x2 - bl sub_8077ABC - lsls r0, 24 - lsrs r0, 24 - strh r0, [r5, 0x32] - ldrh r0, [r5, 0x22] - strh r0, [r5, 0x34] - ldrb r0, [r4] - movs r1, 0x3 - bl sub_8077ABC - lsls r0, 24 - lsrs r0, 24 - strh r0, [r5, 0x36] - adds r0, r5, 0 - bl sub_8078BD4 - ldr r0, _080D5C58 @ =sub_80D5C5C - str r0, [r5, 0x1C] -_080D5C4E: - pop {r4,r5} - pop {r0} - bx r0 - .align 2, 0 -_080D5C54: .4byte gBattleAnimBankTarget -_080D5C58: .4byte sub_80D5C5C - thumb_func_end sub_80D5B0C - - thumb_func_start sub_80D5C5C -sub_80D5C5C: @ 80D5C5C - push {r4,lr} - adds r4, r0, 0 - bl sub_8078B5C - lsls r0, 24 - cmp r0, 0 - bne _080D5CB4 - movs r1, 0x38 - ldrsh r0, [r4, r1] - movs r1, 0x10 - bl Sin - ldrh r1, [r4, 0x24] - adds r0, r1 - strh r0, [r4, 0x24] - ldrh r2, [r4, 0x38] - adds r0, r2, 0x4 - movs r1, 0xFF - ands r0, r1 - strh r0, [r4, 0x38] - ldrh r0, [r4, 0x38] - lsls r2, 16 - asrs r2, 16 - cmp r2, 0 - beq _080D5C92 - cmp r2, 0xC4 - ble _080D5CBA -_080D5C92: - lsls r0, 16 - cmp r0, 0 - ble _080D5CBA - movs r1, 0x3C - ldrsh r0, [r4, r1] - cmp r0, 0 - bne _080D5CBA - ldr r0, _080D5CB0 @ =gUnknown_0202F7D2 - movs r1, 0 - ldrsb r1, [r0, r1] - movs r0, 0x90 - bl PlaySE12WithPanning - b _080D5CBA - .align 2, 0 -_080D5CB0: .4byte gUnknown_0202F7D2 -_080D5CB4: - adds r0, r4, 0 - bl move_anim_8072740 -_080D5CBA: - pop {r4} - pop {r0} - bx r0 - thumb_func_end sub_80D5C5C - - .align 2, 0 @ Don't pad with nop. |