diff --git a/asm/battle_3.s b/asm/battle_3.s index b0cc747b57..e540d67bbb 100644 --- a/asm/battle_3.s +++ b/asm/battle_3.s @@ -10392,7 +10392,7 @@ sub_80458B4: @ 80458B4 ldr r0, [r0] cmp r0, 0 bne _080458D0 - ldr r1, =gUnknown_0831BD10 + ldr r1, =gBattleScriptingCommandsTable ldr r0, =gBattlescriptCurrInstr ldr r0, [r0] ldrb r0, [r0] diff --git a/asm/credits.s b/asm/credits.s index 8ba8287101..b98092f36c 100644 --- a/asm/credits.s +++ b/asm/credits.s @@ -3329,7 +3329,7 @@ _081770B4: adds r0, r4, 0 movs r2, 0 movs r3, 0 - bl SetSpriteTransformationMatrix + bl SetOamMatrix adds r2, r5, 0 adds r2, 0x3E ldrb r1, [r2] @@ -3364,7 +3364,7 @@ _0817710E: adds r0, r4, 0 movs r2, 0 movs r3, 0 - bl SetSpriteTransformationMatrix + bl SetOamMatrix b _0817714A _08177144: ldrh r0, [r5, 0x2E] diff --git a/asm/evolution_graphics.s b/asm/evolution_graphics.s index 3c01c71d49..a836217d18 100644 --- a/asm/evolution_graphics.s +++ b/asm/evolution_graphics.s @@ -27,7 +27,7 @@ _0817BA4C: str r1, [sp] movs r2, 0 movs r3, 0 - bl SetSpriteTransformationMatrix + bl SetOamMatrix adds r0, r4, 0x1 lsls r0, 16 lsrs r4, r0, 16 @@ -1260,7 +1260,7 @@ _0817C3BA: movs r0, 0x1E movs r2, 0 movs r3, 0 - bl SetSpriteTransformationMatrix + bl SetOamMatrix movs r0, 0x10 ldrsh r1, [r6, r0] adds r0, r4, 0 @@ -1272,7 +1272,7 @@ _0817C3BA: movs r0, 0x1F movs r2, 0 movs r3, 0 - bl SetSpriteTransformationMatrix + bl SetOamMatrix ldr r1, =gSprites mov r9, r1 lsls r2, r5, 4 @@ -1547,7 +1547,7 @@ _0817C626: movs r0, 0x1E movs r2, 0 movs r3, 0 - bl SetSpriteTransformationMatrix + bl SetOamMatrix movs r3, 0x10 ldrsh r1, [r5, r3] adds r0, r4, 0 @@ -1559,7 +1559,7 @@ _0817C626: movs r0, 0x1F movs r2, 0 movs r3, 0 - bl SetSpriteTransformationMatrix + bl SetOamMatrix cmp r6, 0x2 bne _0817C670 ldr r0, =sub_817C510 diff --git a/asm/intro.s b/asm/intro.s index fe387280f1..6130b920ad 100644 --- a/asm/intro.s +++ b/asm/intro.s @@ -4519,7 +4519,7 @@ _0816F336: str r1, [sp] movs r2, 0 movs r3, 0 - bl SetSpriteTransformationMatrix + bl SetOamMatrix movs r0, 0x32 ldrsh r1, [r4, r0] lsls r0, r1, 1 @@ -4795,7 +4795,7 @@ _0816F550: adds r1, r4, 0 movs r2, 0 movs r3, 0 - bl SetSpriteTransformationMatrix + bl SetOamMatrix ldrh r0, [r7, 0x30] adds r0, 0x1 lsls r0, 24 @@ -4808,7 +4808,7 @@ _0816F550: str r6, [sp] mov r1, r8 mov r2, r9 - bl SetSpriteTransformationMatrix + bl SetOamMatrix ldrh r0, [r7, 0x30] adds r0, 0x2 lsls r0, 24 @@ -4821,7 +4821,7 @@ _0816F550: mov r1, r8 mov r2, r9 adds r3, r5, 0 - bl SetSpriteTransformationMatrix + bl SetOamMatrix _0816F59E: add sp, 0x4 pop {r3-r5} @@ -4849,7 +4849,7 @@ sub_816F5B4: @ 816F5B4 str r1, [sp] movs r2, 0 movs r3, 0 - bl SetSpriteTransformationMatrix + bl SetOamMatrix ldrh r0, [r4, 0x30] adds r0, 0x1 lsls r0, 24 @@ -4861,7 +4861,7 @@ sub_816F5B4: @ 816F5B4 str r1, [sp] movs r2, 0 movs r3, 0 - bl SetSpriteTransformationMatrix + bl SetOamMatrix ldrh r0, [r4, 0x30] adds r0, 0x2 lsls r0, 24 @@ -4873,7 +4873,7 @@ sub_816F5B4: @ 816F5B4 str r1, [sp] movs r2, 0 movs r3, 0 - bl SetSpriteTransformationMatrix + bl SetOamMatrix ldrh r1, [r4, 0x36] movs r2, 0x36 ldrsh r0, [r4, r2] @@ -5320,7 +5320,7 @@ _0816F8A0: adds r1, r4, 0 movs r2, 0 movs r3, 0 - bl SetSpriteTransformationMatrix + bl SetOamMatrix mov r0, r9 lsls r0, 24 lsrs r0, 24 @@ -5329,7 +5329,7 @@ _0816F8A0: adds r1, r4, 0 movs r2, 0 movs r3, 0 - bl SetSpriteTransformationMatrix + bl SetOamMatrix mov r1, r8 lsls r1, 24 lsrs r1, 24 @@ -5341,7 +5341,7 @@ _0816F8A0: adds r1, r4, 0 movs r2, 0 movs r3, 0 - bl SetSpriteTransformationMatrix + bl SetOamMatrix ldr r0, [sp, 0x10] add sp, 0x14 pop {r3-r5} @@ -6045,7 +6045,7 @@ _0816FF38: adds r3, r5, 0 str r1, [sp] movs r0, 0x1 - bl SetSpriteTransformationMatrix + bl SetOamMatrix _0816FF48: movs r2, 0x2E ldrsh r0, [r4, r2] @@ -6259,7 +6259,7 @@ _081700BE: movs r0, 0x12 movs r2, 0 movs r3, 0 - bl SetSpriteTransformationMatrix + bl SetOamMatrix add sp, 0x4 pop {r4,r5} pop {r0} diff --git a/asm/pokedex.s b/asm/pokedex.s index 3880dd2139..bebfb9ade1 100644 --- a/asm/pokedex.s +++ b/asm/pokedex.s @@ -5706,7 +5706,7 @@ _080BE55C: str r2, [sp] movs r2, 0 movs r3, 0 - bl SetSpriteTransformationMatrix + bl SetOamMatrix adds r1, r6, 0x1 movs r0, 0x1F ands r1, r0 @@ -6009,7 +6009,7 @@ _080BE7AC: negs r3, r3 lsrs r3, 16 str r1, [sp] - bl SetSpriteTransformationMatrix + bl SetOamMatrix ldr r1, [r7] adds r1, r5 ldrh r0, [r6, 0x30] @@ -7972,7 +7972,7 @@ _080BF982: movs r0, 0x1 movs r2, 0 movs r3, 0 - bl SetSpriteTransformationMatrix + bl SetOamMatrix ldr r0, =gUnknown_0856E610 ldrb r1, [r4, 0x5] lsrs r1, 4 @@ -8041,7 +8041,7 @@ _080BFA34: movs r0, 0x2 movs r2, 0 movs r3, 0 - bl SetSpriteTransformationMatrix + bl SetOamMatrix ldr r0, =gUnknown_0856E610 ldrb r1, [r4, 0x5] lsrs r1, 4 diff --git a/asm/pokedex_cry_screen.s b/asm/pokedex_cry_screen.s index c12c4c1957..50c438e593 100644 --- a/asm/pokedex_cry_screen.s +++ b/asm/pokedex_cry_screen.s @@ -935,7 +935,7 @@ _08145A82: ldrh r0, [r4, 0x6] str r0, [sp] movs r0, 0 - bl SetSpriteTransformationMatrix + bl SetOamMatrix ldr r2, =gSineTable ldr r0, [r6] ldrb r0, [r0] diff --git a/asm/rom_8034C54.s b/asm/rom_8034C54.s index 6c43804073..420be2a3bb 100644 --- a/asm/rom_8034C54.s +++ b/asm/rom_8034C54.s @@ -14522,7 +14522,7 @@ _0803CCB4: ands r0, r1 cmp r0, 0 bne _0803CCFA - ldr r0, =gUnknown_0831BD10 + ldr r0, =gBattleScriptingCommandsTable ldrb r1, [r4] lsls r1, 2 adds r1, r0 @@ -16400,7 +16400,7 @@ _0803DE10: ldr r0, [r0] cmp r0, 0 bne _0803DE2A - ldr r1, =gUnknown_0831BD10 + ldr r1, =gBattleScriptingCommandsTable ldr r0, =gBattlescriptCurrInstr ldr r0, [r0] ldrb r0, [r0] @@ -16651,7 +16651,7 @@ _0803E060: ldr r0, [r0] cmp r0, 0 bne _0803E07A - ldr r1, =gUnknown_0831BD10 + ldr r1, =gBattleScriptingCommandsTable ldr r0, =gBattlescriptCurrInstr ldr r0, [r0] ldrb r0, [r0] @@ -16672,7 +16672,7 @@ sub_803E08C: @ 803E08C ldr r0, [r0] cmp r0, 0 bne _0803E0A8 - ldr r1, =gUnknown_0831BD10 + ldr r1, =gBattleScriptingCommandsTable ldr r0, =gBattlescriptCurrInstr ldr r0, [r0] ldrb r0, [r0] diff --git a/asm/sprite.s b/asm/sprite.s index 4ff7de4ee4..3073edc2af 100644 --- a/asm/sprite.s +++ b/asm/sprite.s @@ -1142,9 +1142,9 @@ _08007204: .pool thumb_func_end ResetOamMatrices - thumb_func_start SetSpriteTransformationMatrix -@ void SetSpriteTransformationMatrix(u8 index, u16 a, u16 b, u16 c, u16 d) -SetSpriteTransformationMatrix: @ 8007224 + thumb_func_start SetOamMatrix +@ void SetOamMatrix(u8 index, u16 a, u16 b, u16 c, u16 d) +SetOamMatrix: @ 8007224 push {r4,r5,lr} ldr r5, [sp, 0xC] lsls r0, 24 @@ -1159,13 +1159,13 @@ SetSpriteTransformationMatrix: @ 8007224 pop {r0} bx r0 .pool - thumb_func_end SetSpriteTransformationMatrix + thumb_func_end SetOamMatrix thumb_func_start ResetSprite @ void ResetSprite(struct obj *object) ResetSprite: @ 8007244 push {lr} - ldr r1, =gUnknown_082EC64C + ldr r1, =sDummySprite movs r2, 0x44 bl memcpy pop {r0} @@ -3617,7 +3617,7 @@ _08008406: adds r0, r2, 0 movs r2, 0 movs r3, 0 - bl SetSpriteTransformationMatrix + bl SetOamMatrix add sp, 0x4 pop {r0} bx r0 diff --git a/asm/wallclock.s b/asm/wallclock.s index 0d0c6c65a3..cfe048a544 100644 --- a/asm/wallclock.s +++ b/asm/wallclock.s @@ -1222,7 +1222,7 @@ _081351E8: lsrs r3, 16 str r1, [sp] movs r0, 0 - bl SetSpriteTransformationMatrix + bl SetOamMatrix ldr r1, =gUnknown_085B22D0 lsls r2, r7, 1 adds r0, r2, r1 @@ -1300,7 +1300,7 @@ _08135280: lsrs r3, 16 str r1, [sp] movs r0, 0x1 - bl SetSpriteTransformationMatrix + bl SetOamMatrix ldr r1, =gUnknown_085B22D0 lsls r2, r7, 1 adds r0, r2, r1 diff --git a/data/data2.s b/data/data2.s index 8a1ac0d238..09a3ff8d05 100644 --- a/data/data2.s +++ b/data/data2.s @@ -1344,8 +1344,257 @@ gUnknown_0831BCF3:: @ 831BCF3 gUnknown_0831BCF8:: @ 831BCF8 .incbin "baserom.gba", 0x31bcf8, 0x18 -gUnknown_0831BD10:: @ 831BD10 - .incbin "baserom.gba", 0x31bd10, 0x3e4 + .align 2, 0 +gBattleScriptingCommandsTable:: @ 831BD10 + .4byte atk00_attackcanceler + .4byte atk01_accuracycheck + .4byte atk02_attackstring + .4byte atk03_ppreduce + .4byte atk04_critcalc + .4byte atk05_cmd5 + .4byte sub_8047038 + .4byte atk07_cmd7 + .4byte atk08_cmd8 + .4byte atk09_attackanimation + .4byte sub_8047DC8 + .4byte atk0B_graphicalhpupdate + .4byte atk0C_datahpupdate + .4byte atk0D_critmessage + .4byte atk0E_missmessage + .4byte atk0F_resultmessage + .4byte atk10_printstring + .4byte atk11_printstring2 + .4byte atk12_waitmessage + .4byte atk13_printfromtable + .4byte atk14_printfromtable2 + .4byte atk15_seteffectwithchancetarget + .4byte sub_8049AC0 + .4byte sub_8049AD0 + .4byte sub_8049AE0 + .4byte atk19_faintpokemon + .4byte sub_8049E40 + .4byte sub_8049E7C + .4byte atk1C_jumpifstatus + .4byte atk1D_jumpifsecondarystatus + .4byte atk1E_jumpifability + .4byte sub_804A0DC + .4byte sub_804A154 + .4byte atk21_jumpifspecialstatusflag + .4byte sub_804A2D0 + .4byte sub_804A32C + .4byte sub_804ACD0 + .4byte atk25_cmd25 + .4byte atk26_80225F0_storebyteforjump + .4byte atk27_cmd27 + .4byte atk28_goto + .4byte atk29_jumpifbyte + .4byte sub_804B0A8 + .4byte sub_804B150 + .4byte sub_804B204 + .4byte sub_804B28C + .4byte sub_804B310 + .4byte sub_804B338 + .4byte sub_804B364 + .4byte atk31_copyarray + .4byte atk32_memcpy_with_offset + .4byte atk33_orbyte + .4byte atk34_orhalfword + .4byte atk35_orword + .4byte atk36_bicbyte + .4byte atk37_bichalfword + .4byte atk38_bicword + .4byte atk39_pause + .4byte sub_804B5E0 + .4byte atk3B_8022C68 + .4byte atk3C_return + .4byte sub_804B664 + .4byte atk3E_end2 + .4byte atk3F_end3 + .4byte atk40_801DBA0 + .4byte atk41_call + .4byte atk42_jumpiftype2 + .4byte sub_804B784 + .4byte sub_804B7D0 + .4byte atk46_cmd46 + .4byte sub_804B8B0 + .4byte sub_804B97C + .4byte atk48_playstatchangeanimation + .4byte sub_804BBCC + .4byte atk4A_damagecalc2 + .4byte atk4B_cmd4b + .4byte atk4C_switch1 + .4byte sub_804C904 + .4byte atk4E_switch3 + .4byte atk4F_jumpifcannotswitch + .4byte atk50_openpartyscreen + .4byte atk51_cmd51 + .4byte atk52_cmd52 + .4byte sub_804DDA8 + .4byte atk54_802511C + .4byte sub_804DE14 + .4byte atk56_8025194 + .4byte atk57_80251C4_flee + .4byte atk58_cmd58 + .4byte atk59_8025230 + .4byte sub_804E038 + .4byte atk5B_80256E0 + .4byte atk5C_cmd5c + .4byte sub_804E6D8 + .4byte atk5E_8025A70 + .4byte atk5F_8025B24 + .4byte atk60_cmd60 + .4byte atk61_8025BA4 + .4byte atk62_08025C6C + .4byte atk63_jumptoattack + .4byte atk64_statusanimation + .4byte atk65_8025D90 + .4byte atk66_8025E38 + .4byte atk67_8025ECC + .4byte sub_804ECA4 + .4byte atk69_8025FE0 + .4byte atk6A_stash_item_for_side + .4byte atk6B_end_battle_80261CC + .4byte atk6C_8026208 + .4byte sub_804F4D4 + .4byte atk6E_state0_side_becomes_attacker + .4byte atk6F_8026810 + .4byte atk70_record_ability_usage_of_side + .4byte atk71_80268A0 + .4byte atk72_flee + .4byte atk73_cmd73 + .4byte atk74_hp_tresholds_2 + .4byte atk75_8026A58 + .4byte sub_804F7AC + .4byte atk77_setprotect + .4byte atk78_faintifabilitynotdamp + .4byte atk79_setuserhptozero + .4byte sub_8050044 + .4byte sub_80500E8 + .4byte sub_8050164 + .4byte sub_80502C8 + .4byte atk7E_setreflect + .4byte sub_80503E8 + .4byte atk80_manipulatedamage + .4byte atk81_setrest + .4byte atk82_jumpifnotfirstturn + .4byte sub_8050640 + .4byte sub_80506EC + .4byte sub_8050768 + .4byte atk86_stockpiletobasedamage + .4byte atk87_stockpiletohprecovery + .4byte atk88_negativedamage + .4byte atk89_statbuffchange + .4byte atk8A_normalisebuffs + .4byte atk8B_setbide + .4byte atk8C_confuseifrepeatingattackends + .4byte atk8D_setloopcounter + .4byte atk8E_cmd8e + .4byte sub_805112C + .4byte sub_8051424 + .4byte atk91_givemoney + .4byte atk92_setlightscreen + .4byte atk93_ko_move + .4byte atk94_gethalfcurrentenemyhp + .4byte sub_8051AC0 + .4byte sub_8051B18 + .4byte atk97_tryinfatuatetarget + .4byte sub_8051E48 + .4byte atk99_setmisteffect + .4byte atk9A_setincreasedcriticalchance + .4byte atk9B_transformdataexecution + .4byte sub_80521FC + .4byte atk9D_copyattack + .4byte sub_80524DC + .4byte atk9F_nightshadedamageeffect + .4byte atkA0_psywavedamageeffect + .4byte atkA1_counterdamagecalculator + .4byte atkA2_mirrorcoatdamagecalculator + .4byte atkA3_disablelastusedattack + .4byte atkA4_setencore + .4byte sub_8052A70 + .4byte atkA6_settypetorandomresistance + .4byte atkA7_setalwayshitflag + .4byte atkA8_copymovepermanently + .4byte sub_8053018 + .4byte atkAA_destinybondeffect + .4byte atkAB_802A458 + .4byte atkAC_remaininghptopower + .4byte atkAD_reducepprandom + .4byte atkAE_clearstatusifnotsoundproofed + .4byte atkAF_cursetarget + .4byte atkB0_setspikes + .4byte atkB1_setforesight + .4byte atkB2_setperishsong + .4byte atkB3_rolloutdamagecalculation + .4byte atkB4_jumpifconfusedandattackmaxed + .4byte sub_8053AF8 + .4byte atkB6_happinesstodamagecalculation + .4byte atkB7_presentdamagecalculation + .4byte atkB8_setsafeguard + .4byte atkB9_magnitudedamagecalculation + .4byte atkBA_802B140 + .4byte sub_805405C + .4byte atkBC_maxattackhalvehp + .4byte atkBD_copyfoestats + .4byte atkBE_breakfree + .4byte atkBF_setcurled + .4byte atkC0_recoverbasedonsunlight + .4byte sub_8054400 + .4byte atkC2_selectnexttarget + .4byte atkC3_setfutureattack + .4byte atkC4_802B910 + .4byte atkC5_hidepreattack + .4byte atkC6_unhidepostattack + .4byte atkC7_setminimize + .4byte sub_8054A48 + .4byte atkC9_jumpifattackandspecialattackcannotfall + .4byte atkCA_setforcedtarget + .4byte atkCB_setcharge + .4byte atkCC_callterrainattack + .4byte atkCD_cureifburnedparalysedorpoisoned + .4byte atkCE_settorment + .4byte atkCF_jumpifnodamage + .4byte atkD0_settaunt + .4byte atkD1_sethelpinghand + .4byte sub_8054EB4 + .4byte sub_8055148 + .4byte atkD4_802C408 + .4byte sub_8055294 + .4byte atkD6_doubledamagedealtifdamaged + .4byte sub_805534C + .4byte atkD8_setdamagetohealthdifference + .4byte atkD9_scaledamagebyhealthratio + .4byte atkDA_abilityswap + .4byte atkDB_imprisoneffect + .4byte atkDC_setgrudge + .4byte atkDD_weightdamagecalculation + .4byte atkDE_asistattackselect + .4byte atkDF_setmagiccoat + .4byte atkE0_setstealstatchange + .4byte atkE1_802CBE4 + .4byte atkE2_cmde2 + .4byte atkE3_jumpiffainted + .4byte sub_8055B48 + .4byte atkE5_pickupitemcalculation + .4byte atkE6_castform_transform + .4byte atkE7_castform_switch + .4byte atkE8_settypebasedhalvers + .4byte atkE9_seteffectbyweather + .4byte atkEA_recycleitem + .4byte atkEB_settypetoterrain + .4byte atkEC_802D2A0 + .4byte atkED_802D364 + .4byte atkEE_removereflectlightscreen + .4byte sub_8056300 + .4byte atkF0_catch_pokemon + .4byte atkF1_802D95C + .4byte sub_80568CC + .4byte atkF3_receive_new_pokemon_maybe + .4byte sub_8056E78 + .4byte atkF5_reset_attacker_bd_x4C + .4byte sub_8056ED0 + .4byte sub_8056EDC + .4byte sub_8056EF8 gUnknown_0831C0F4:: @ 831C0F4 .incbin "baserom.gba", 0x31c0f4, 0x34 diff --git a/data/sprite.s b/data/sprite.s index 59308d286a..ba7d5eaf86 100644 --- a/data/sprite.s +++ b/data/sprite.s @@ -9,7 +9,7 @@ gUnknown_082EC634:: @ 82EC634 .incbin "baserom.gba", 0x2ec634, 0x18 -gUnknown_082EC64C:: @ 82EC64C +sDummySprite:: @ 82EC64C .incbin "baserom.gba", 0x2ec64c, 0x44 @ off-screen and low priority relative to background