diff options
author | PikalaxALT <pikalaxalt@gmail.com> | 2017-10-01 19:48:31 -0400 |
---|---|---|
committer | PikalaxALT <pikalaxalt@gmail.com> | 2017-10-01 19:52:40 -0400 |
commit | 0685dd4920c64eae6bcfbc9f201854b4da91bfab (patch) | |
tree | f759feaf819167d436ab4fde480eca35ba591b04 | |
parent | d0fbed6ad50c34593002c2b540c4e3e7f4c5cd16 (diff) | |
parent | 50dc4f429d4aa68e0365adc71d17e43a0dd7b843 (diff) |
Merge branch 'master' into trade
539 files changed, 13467 insertions, 14704 deletions
@@ -40,9 +40,9 @@ VERSIONS := ruby sapphire ruby_rev1 sapphire_rev1 ruby_rev2 sapphire_rev2 ruby_d $(VERSIONS) $(VERSIONS:%=compare_%) -$(shell mkdir -p build/ $(VERSIONS:%=build/%/{,src,asm,data})) +$(shell mkdir -p build/ $(VERSIONS:%=build/%/{,asm,data,src{,/battle,/field,/debug,/scene,/pokemon,/engine,/libs}})) -C_SRCS := $(wildcard src/*.c) +C_SRCS := $(wildcard src/*/*.c) $(wildcard src/*.c) ASM_SRCS := $(wildcard asm/*.s) DATA_ASM_SRCS := $(wildcard data/*.s) @@ -90,17 +90,17 @@ sound/direct_sound_samples/cry_%.bin: sound/direct_sound_samples/cry_%.aif ; $(A sound/songs/%.s: sound/songs/%.mid cd $(@D) && ../../$(MID) $(<F) -%src/libc.o: CC1 := tools/agbcc/bin/old_agbcc -%src/libc.o: CFLAGS := -O2 +%src/libs/libc.o: CC1 := tools/agbcc/bin/old_agbcc +%src/libs/libc.o: CFLAGS := -O2 -%src/siirtc.o: CFLAGS := -mthumb-interwork +%src/libs/siirtc.o: CFLAGS := -mthumb-interwork -%src/agb_flash.o: CFLAGS := -O -mthumb-interwork -%src/agb_flash_1m.o: CFLAGS := -O -mthumb-interwork -%src/agb_flash_mx.o: CFLAGS := -O -mthumb-interwork +%src/libs/agb_flash.o: CFLAGS := -O -mthumb-interwork +%src/libs/agb_flash_1m.o: CFLAGS := -O -mthumb-interwork +%src/libs/agb_flash_mx.o: CFLAGS := -O -mthumb-interwork -%src/m4a_2.o: CC1 := tools/agbcc/bin/old_agbcc -%src/m4a_4.o: CC1 := tools/agbcc/bin/old_agbcc +%src/libs/m4a_2.o: CC1 := tools/agbcc/bin/old_agbcc +%src/libs/m4a_4.o: CC1 := tools/agbcc/bin/old_agbcc $(SONG_OBJS): %.o: %.s $(AS) $(ASFLAGS) -I sound -o $@ $< @@ -113,7 +113,8 @@ $1_ASM_OBJS := $$(ASM_SRCS:%.s=build/$1/%.o) $1_DATA_ASM_OBJS := $$(DATA_ASM_SRCS:%.s=build/$1/%.o) ifeq ($$(NODEP),) -build/$1/src/%.o: c_dep = $$(shell $$(SCANINC) src/$$(*F).c) +build/$1/src/%.o: c_path = $$(*D)/$$(*F).c +build/$1/src/%.o: c_dep = $$(shell $$(SCANINC) $$(wildcard $$(c_path:build/$1/=))) build/$1/asm/%.o: asm_dep = $$(shell $$(SCANINC) asm/$$(*F).s) build/$1/data/%.o: asm_dep = $$(shell $$(SCANINC) data/$$(*F).s) endif diff --git a/asm-de/contest_link_80C2020.s b/asm-de/contest_link_80C2020.s index 646851c2d..65bbf0f22 100644 --- a/asm-de/contest_link_80C2020.s +++ b/asm-de/contest_link_80C2020.s @@ -1361,7 +1361,7 @@ _080C2B14: adds r0, r6, 0 ldr r1, [sp, 0xC] adds r2, r4, 0 - bl sub_80409C8 + bl GetMonSpritePalStructFromOtIdPersonality adds r4, r0, 0 bl LoadCompressedObjectPalette adds r0, r6, 0 @@ -1601,7 +1601,7 @@ _080C2D42: lsls r0, 16 lsrs r0, 16 movs r1, 0x2 - bl GetNationalPokedexFlag + bl GetSetPokedexFlag adds r5, 0x40 subs r4, 0x1 cmp r4, 0 diff --git a/asm-de/easy_chat.s b/asm-de/easy_chat.s index 2f6c28fdb..1d93e36b4 100644 --- a/asm-de/easy_chat.s +++ b/asm-de/easy_chat.s @@ -9984,7 +9984,7 @@ _080EAE50: lsls r0, 16 lsrs r0, 16 movs r1, 0 - bl GetNationalPokedexFlag + bl GetSetPokedexFlag b _080EAE7C _080EAE62: ldr r0, _080EAE74 @ =gUnknown_083DB694 diff --git a/asm/battle_2.s b/asm/battle_2.s index 7868f8492..f252e5716 100644 --- a/asm/battle_2.s +++ b/asm/battle_2.s @@ -1514,8 +1514,8 @@ _08012FE8: .4byte gUnknown_02024A76 _08012FEC: .4byte gTurnOrder thumb_func_end sub_8012FBC - thumb_func_start b_first_side -b_first_side: @ 8012FF0 + thumb_func_start GetWhoStrikesFirst +GetWhoStrikesFirst: @ 8012FF0 push {r4-r7,lr} mov r7, r10 mov r6, r9 @@ -2003,7 +2003,7 @@ _080133B6: pop {r4-r7} pop {r1} bx r1 - thumb_func_end b_first_side + thumb_func_end GetWhoStrikesFirst thumb_func_start sub_80133C8 sub_80133C8: @ 80133C8 @@ -2285,7 +2285,7 @@ _080135D0: beq _0801360C adds r0, r3, 0 movs r2, 0 - bl b_first_side + bl GetWhoStrikesFirst lsls r0, 24 cmp r0, 0 beq _0801360C diff --git a/asm/battle_9.s b/asm/battle_9.s index 9f4beef55..e92c2db33 100644 --- a/asm/battle_9.s +++ b/asm/battle_9.s @@ -6,8 +6,8 @@ .text - thumb_func_start ai_switch_perish_song -ai_switch_perish_song: @ 8035FEC + thumb_func_start AI_SwitchIfPerishSong +AI_SwitchIfPerishSong: @ 8035FEC push {lr} ldr r1, _08036038 @ =gStatuses3 ldr r0, _0803603C @ =gActiveBank @@ -55,10 +55,10 @@ _0803604C: _0803604E: pop {r1} bx r1 - thumb_func_end ai_switch_perish_song + thumb_func_end AI_SwitchIfPerishSong - thumb_func_start sub_8036054 -sub_8036054: @ 8036054 + thumb_func_start AI_SwitchIfWonderguard +AI_SwitchIfWonderguard: @ 8036054 push {r4-r7,lr} mov r7, r9 mov r6, r8 @@ -250,7 +250,7 @@ _080361D8: .4byte gBattleMons _080361DC: .4byte gActiveBank _080361E0: .4byte gEnemyParty _080361E4: .4byte gBattlePartyID - thumb_func_end sub_8036054 + thumb_func_end AI_SwitchIfWonderguard thumb_func_start sub_80361E8 sub_80361E8: @ 80361E8 @@ -521,8 +521,8 @@ _08036402: bx r1 thumb_func_end sub_80361E8 - thumb_func_start ai_switchout_natural_cure -ai_switchout_natural_cure: @ 8036410 + thumb_func_start AI_SwitchIfNaturalCure +AI_SwitchIfNaturalCure: @ 8036410 push {r4,r5,lr} ldr r3, _08036468 @ =gBattleMons ldr r5, _0803646C @ =gActiveBank @@ -645,7 +645,7 @@ _08036500: _08036508: .4byte gActiveBank _0803650C: .4byte 0x02000000 _08036510: .4byte 0x000160c8 - thumb_func_end ai_switchout_natural_cure + thumb_func_end AI_SwitchIfNaturalCure thumb_func_start ai_has_super_effective_move_on_field ai_has_super_effective_move_on_field: @ 8036514 @@ -808,8 +808,8 @@ _08036654: .4byte gBattleMons _08036658: .4byte gActiveBank thumb_func_end ai_has_super_effective_move_on_field - thumb_func_start ai_is_too_invested_in_stat_buffs -ai_is_too_invested_in_stat_buffs: @ 803665C + thumb_func_start AI_AreStatsRaised +AI_AreStatsRaised: @ 803665C push {r4,lr} movs r4, 0 ldr r1, _0803669C @ =gBattleMons @@ -848,7 +848,7 @@ _08036696: .align 2, 0 _0803669C: .4byte gBattleMons _080366A0: .4byte gActiveBank - thumb_func_end ai_is_too_invested_in_stat_buffs + thumb_func_end AI_AreStatsRaised thumb_func_start sub_80366A4 sub_80366A4: @ 80366A4 @@ -1140,8 +1140,8 @@ _080368FC: .4byte gBattleMons _08036900: .4byte gEnemyParty thumb_func_end sub_80366A4 - thumb_func_start sub_8036904 -sub_8036904: @ 8036904 + thumb_func_start AI_ShouldSwitch +AI_ShouldSwitch: @ 8036904 push {r4-r7,lr} mov r7, r8 push {r7} @@ -1331,11 +1331,11 @@ _08036A7E: mov r2, r8 cmp r2, 0 beq _08036AFC - bl ai_switch_perish_song + bl AI_SwitchIfPerishSong lsls r0, 24 cmp r0, 0 bne _08036AE4 - bl sub_8036054 + bl AI_SwitchIfWonderguard lsls r0, 24 cmp r0, 0 bne _08036AE4 @@ -1343,7 +1343,7 @@ _08036A7E: lsls r0, 24 cmp r0, 0 bne _08036AE4 - bl ai_switchout_natural_cure + bl AI_SwitchIfNaturalCure lsls r0, 24 cmp r0, 0 bne _08036AE4 @@ -1352,7 +1352,7 @@ _08036A7E: lsls r0, 24 cmp r0, 0 bne _08036AFC - bl ai_is_too_invested_in_stat_buffs + bl AI_AreStatsRaised lsls r0, 24 cmp r0, 0 bne _08036AFC @@ -1386,7 +1386,7 @@ _08036AFE: pop {r4-r7} pop {r1} bx r1 - thumb_func_end sub_8036904 + thumb_func_end AI_ShouldSwitch thumb_func_start sub_8036B0C sub_8036B0C: @ 8036B0C @@ -1399,7 +1399,7 @@ sub_8036B0C: @ 8036B0C bne _08036B1C b _08036C2E _08036B1C: - bl sub_8036904 + bl AI_ShouldSwitch lsls r0, 24 cmp r0, 0 bne _08036B28 @@ -1521,7 +1521,7 @@ _08036C18: .4byte 0x00016068 _08036C1C: .4byte gActiveBank _08036C20: .4byte 0x000160c8 _08036C24: - bl sub_803708C + bl AI_ShouldUseItem lsls r0, 24 cmp r0, 0 bne _08036C40 @@ -2083,8 +2083,8 @@ _08037086: bx r1 thumb_func_end ai_identify_item_effect - thumb_func_start sub_803708C -sub_803708C: @ 803708C + thumb_func_start AI_ShouldUseItem +AI_ShouldUseItem: @ 803708C push {r4-r7,lr} mov r7, r10 mov r6, r9 @@ -2665,6 +2665,6 @@ _080374FA: pop {r4-r7} pop {r1} bx r1 - thumb_func_end sub_803708C + thumb_func_end AI_ShouldUseItem .align 2, 0 @ Don't pad with nop. diff --git a/asm/battle_anim_80CA710.s b/asm/battle_anim_80CA710.s index fd5b9fb88..7b506ac24 100644 --- a/asm/battle_anim_80CA710.s +++ b/asm/battle_anim_80CA710.s @@ -23,7 +23,7 @@ sub_80CA710: @ 80CA710 strh r0, [r4, 0x2E] ldrh r0, [r5, 0x6] strh r0, [r4, 0x30] - ldr r0, _080CA748 @ =gBattleAnimPlayerMonIndex + ldr r0, _080CA748 @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -34,7 +34,7 @@ sub_80CA710: @ 80CA710 b _080CA74E .align 2, 0 _080CA744: .4byte gBattleAnimArgs -_080CA748: .4byte gBattleAnimPlayerMonIndex +_080CA748: .4byte gBattleAnimBankAttacker _080CA74C: ldrh r0, [r5, 0x8] _080CA74E: @@ -101,7 +101,7 @@ sub_80CA7B0: @ 80CA7B0 ldr r0, _080CA7F0 @ =gBattleAnimArgs ldrh r0, [r0, 0x4] strh r0, [r4, 0x2E] - ldr r5, _080CA7F4 @ =gBattleAnimPlayerMonIndex + ldr r5, _080CA7F4 @ =gBattleAnimBankAttacker ldrb r0, [r5] movs r1, 0x2 bl sub_8077ABC @@ -118,13 +118,13 @@ sub_80CA7B0: @ 80CA7B0 str r0, [r4, 0x1C] ldr r1, _080CA7FC @ =move_anim_8074EE0 adds r0, r4, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 pop {r4,r5} pop {r0} bx r0 .align 2, 0 _080CA7F0: .4byte gBattleAnimArgs -_080CA7F4: .4byte gBattleAnimPlayerMonIndex +_080CA7F4: .4byte gBattleAnimBankAttacker _080CA7F8: .4byte sub_8078B34 _080CA7FC: .4byte move_anim_8074EE0 thumb_func_end sub_80CA7B0 @@ -141,7 +141,7 @@ sub_80CA800: @ 80CA800 bl StartSpriteAnim ldrh r0, [r5, 0x4] strh r0, [r4, 0x2E] - ldr r5, _080CA84C @ =gBattleAnimEnemyMonIndex + ldr r5, _080CA84C @ =gBattleAnimBankTarget ldrb r0, [r5] movs r1, 0x2 bl sub_8077ABC @@ -158,13 +158,13 @@ sub_80CA800: @ 80CA800 str r0, [r4, 0x1C] ldr r1, _080CA854 @ =move_anim_8072740 adds r0, r4, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 pop {r4,r5} pop {r0} bx r0 .align 2, 0 _080CA848: .4byte gBattleAnimArgs -_080CA84C: .4byte gBattleAnimEnemyMonIndex +_080CA84C: .4byte gBattleAnimBankTarget _080CA850: .4byte sub_8078B34 _080CA854: .4byte move_anim_8072740 thumb_func_end sub_80CA800 @@ -180,7 +180,7 @@ sub_80CA858: @ 80CA858 strh r0, [r4, 0x2E] ldrh r0, [r4, 0x20] strh r0, [r4, 0x30] - ldr r5, _080CA8AC @ =gBattleAnimEnemyMonIndex + ldr r5, _080CA8AC @ =gBattleAnimBankTarget ldrb r0, [r5] movs r1, 0x2 bl sub_8077ABC @@ -208,7 +208,7 @@ sub_80CA858: @ 80CA858 bx r0 .align 2, 0 _080CA8A8: .4byte gBattleAnimArgs -_080CA8AC: .4byte gBattleAnimEnemyMonIndex +_080CA8AC: .4byte gBattleAnimBankTarget _080CA8B0: .4byte sub_80CA8B4 thumb_func_end sub_80CA858 @@ -228,15 +228,15 @@ _080CA8CA: ldrsh r0, [r4, r1] cmp r0, 0x7F ble _080CA8E4 - ldr r0, _080CA8E0 @ =gBattleAnimEnemyMonIndex + ldr r0, _080CA8E0 @ =gBattleAnimBankTarget ldrb r0, [r0] bl sub_8079E90 adds r0, 0x1 b _080CA8EE .align 2, 0 -_080CA8E0: .4byte gBattleAnimEnemyMonIndex +_080CA8E0: .4byte gBattleAnimBankTarget _080CA8E4: - ldr r0, _080CA924 @ =gBattleAnimEnemyMonIndex + ldr r0, _080CA924 @ =gBattleAnimBankTarget ldrb r0, [r0] bl sub_8079E90 adds r0, 0x6 @@ -268,7 +268,7 @@ _080CA91E: pop {r0} bx r0 .align 2, 0 -_080CA924: .4byte gBattleAnimEnemyMonIndex +_080CA924: .4byte gBattleAnimBankTarget thumb_func_end sub_80CA8B4 thumb_func_start sub_80CA928 @@ -305,7 +305,7 @@ sub_80CA928: @ 80CA928 strh r0, [r1, 0x4] strh r2, [r1, 0x6] ldr r4, _080CA9A0 @ =gSpriteTemplate_83D631C - ldr r0, _080CA9A4 @ =gBattleAnimEnemyMonIndex + ldr r0, _080CA9A4 @ =gBattleAnimBankTarget ldrb r0, [r0] bl sub_8079E90 adds r3, r0, 0 @@ -331,7 +331,7 @@ _080CA990: _080CA998: .4byte gTasks _080CA99C: .4byte gBattleAnimArgs _080CA9A0: .4byte gSpriteTemplate_83D631C -_080CA9A4: .4byte gBattleAnimEnemyMonIndex +_080CA9A4: .4byte gBattleAnimBankTarget thumb_func_end sub_80CA928 thumb_func_start sub_80CA9A8 @@ -343,7 +343,7 @@ sub_80CA9A8: @ 80CA9A8 ldr r6, _080CA9EC @ =gBattleAnimArgs ldrh r0, [r6, 0x6] strh r0, [r4, 0x2E] - ldr r5, _080CA9F0 @ =gBattleAnimPlayerMonIndex + ldr r5, _080CA9F0 @ =gBattleAnimBankAttacker ldrb r0, [r5] movs r1, 0x2 bl sub_8077ABC @@ -367,7 +367,7 @@ sub_80CA9A8: @ 80CA9A8 bx r0 .align 2, 0 _080CA9EC: .4byte gBattleAnimArgs -_080CA9F0: .4byte gBattleAnimPlayerMonIndex +_080CA9F0: .4byte gBattleAnimBankAttacker _080CA9F4: .4byte sub_80CA9F8 thumb_func_end sub_80CA9A8 @@ -399,7 +399,7 @@ sub_80CAA14: @ 80CAA14 ands r1, r0 adds r0, r5, 0 bl StartSpriteAnim - ldr r4, _080CAA5C @ =gBattleAnimPlayerMonIndex + ldr r4, _080CAA5C @ =gBattleAnimBankAttacker ldrb r0, [r4] movs r1, 0x2 bl sub_8077ABC @@ -421,7 +421,7 @@ sub_80CAA14: @ 80CAA14 subs r0, 0x14 b _080CAA64 .align 2, 0 -_080CAA5C: .4byte gBattleAnimPlayerMonIndex +_080CAA5C: .4byte gBattleAnimBankAttacker _080CAA60: ldrh r0, [r5, 0x20] adds r0, 0x14 @@ -436,7 +436,7 @@ _080CAA64: strh r0, [r5, 0x2E] ldrh r0, [r5, 0x20] strh r0, [r5, 0x30] - ldr r4, _080CAAC4 @ =gBattleAnimEnemyMonIndex + ldr r4, _080CAAC4 @ =gBattleAnimBankTarget ldrb r0, [r4] movs r1, 0x2 bl sub_8077ABC @@ -469,7 +469,7 @@ _080CAA64: pop {r0} bx r0 .align 2, 0 -_080CAAC4: .4byte gBattleAnimEnemyMonIndex +_080CAAC4: .4byte gBattleAnimBankTarget _080CAAC8: .4byte sub_80CAACC thumb_func_end sub_80CAA14 @@ -522,7 +522,7 @@ sub_80CAB18: @ 80CAB18 adds r6, r0, 0 movs r1, 0x1 bl sub_80787B0 - ldr r0, _080CAB78 @ =gBattleAnimPlayerMonIndex + ldr r0, _080CAB78 @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -536,7 +536,7 @@ _080CAB38: ldr r4, _080CAB7C @ =gBattleAnimArgs ldrh r0, [r4, 0x8] strh r0, [r6, 0x2E] - ldr r5, _080CAB80 @ =gBattleAnimEnemyMonIndex + ldr r5, _080CAB80 @ =gBattleAnimBankTarget ldrb r0, [r5] movs r1, 0 bl sub_8077ABC @@ -563,9 +563,9 @@ _080CAB38: pop {r0} bx r0 .align 2, 0 -_080CAB78: .4byte gBattleAnimPlayerMonIndex +_080CAB78: .4byte gBattleAnimBankAttacker _080CAB7C: .4byte gBattleAnimArgs -_080CAB80: .4byte gBattleAnimEnemyMonIndex +_080CAB80: .4byte gBattleAnimBankTarget _080CAB84: .4byte sub_80CAB88 thumb_func_end sub_80CAB18 @@ -589,7 +589,7 @@ sub_80CAB88: @ 80CAB88 str r0, [r4, 0x1C] ldr r1, _080CABBC @ =sub_80CABC0 adds r0, r4, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 _080CABB2: pop {r4} pop {r0} @@ -619,7 +619,7 @@ sub_80CABC0: @ 80CABC0 str r0, [r4, 0x1C] ldr r1, _080CABF4 @ =move_anim_8072740 adds r0, r4, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 pop {r4} pop {r0} bx r0 @@ -693,7 +693,7 @@ sub_80CAC44: @ 80CAC44 lsrs r0, 16 cmp r0, 0x7F bhi _080CAC98 - ldr r0, _080CAC94 @ =gBattleAnimEnemyMonIndex + ldr r0, _080CAC94 @ =gBattleAnimBankTarget ldrb r0, [r0] bl sub_8079ED4 movs r1, 0x3 @@ -706,9 +706,9 @@ sub_80CAC44: @ 80CAC44 orrs r0, r1 b _080CACBC .align 2, 0 -_080CAC94: .4byte gBattleAnimEnemyMonIndex +_080CAC94: .4byte gBattleAnimBankTarget _080CAC98: - ldr r0, _080CACE8 @ =gBattleAnimEnemyMonIndex + ldr r0, _080CACE8 @ =gBattleAnimBankTarget ldrb r0, [r0] bl sub_8079ED4 adds r0, 0x1 @@ -749,7 +749,7 @@ _080CACE0: pop {r0} bx r0 .align 2, 0 -_080CACE8: .4byte gBattleAnimEnemyMonIndex +_080CACE8: .4byte gBattleAnimBankTarget thumb_func_end sub_80CAC44 thumb_func_start sub_80CACEC @@ -770,7 +770,7 @@ _080CAD06: bl DestroyAnimVisualTask b _080CAD4A _080CAD0E: - ldr r0, _080CAD2C @ =gBattleAnimEnemyMonIndex + ldr r0, _080CAD2C @ =gBattleAnimBankTarget ldrb r0, [r0] bl GetBankIdentity_permutated lsls r0, 24 @@ -784,7 +784,7 @@ _080CAD0E: strb r1, [r0] b _080CAD44 .align 2, 0 -_080CAD2C: .4byte gBattleAnimEnemyMonIndex +_080CAD2C: .4byte gBattleAnimBankTarget _080CAD30: .4byte REG_BG2CNT _080CAD34: ldr r2, _080CAD50 @ =REG_BG1CNT @@ -820,7 +820,7 @@ sub_80CAD54: @ 80CAD54 strh r0, [r4, 0x32] ldrh r0, [r4, 0x22] strh r0, [r4, 0x34] - ldr r0, _080CADA0 @ =gBattleAnimPlayerMonIndex + ldr r0, _080CADA0 @ =gBattleAnimBankAttacker ldrb r0, [r0] movs r1, 0x3 bl sub_8077ABC @@ -842,7 +842,7 @@ sub_80CAD54: @ 80CAD54 bx r0 .align 2, 0 _080CAD9C: .4byte gBattleAnimArgs -_080CADA0: .4byte gBattleAnimPlayerMonIndex +_080CADA0: .4byte gBattleAnimBankAttacker _080CADA4: .4byte sub_80CADA8 thumb_func_end sub_80CAD54 @@ -875,15 +875,15 @@ sub_80CADA8: @ 80CADA8 lsrs r0, 16 cmp r0, 0x7F bhi _080CADF4 - ldr r0, _080CADF0 @ =gBattleAnimPlayerMonIndex + ldr r0, _080CADF0 @ =gBattleAnimBankAttacker ldrb r0, [r0] bl sub_8079E90 subs r0, 0x1 b _080CADFE .align 2, 0 -_080CADF0: .4byte gBattleAnimPlayerMonIndex +_080CADF0: .4byte gBattleAnimBankAttacker _080CADF4: - ldr r0, _080CAE10 @ =gBattleAnimPlayerMonIndex + ldr r0, _080CAE10 @ =gBattleAnimBankAttacker ldrb r0, [r0] bl sub_8079E90 adds r0, 0x1 @@ -898,7 +898,7 @@ _080CADFE: strh r0, [r4, 0x38] b _080CAE1A .align 2, 0 -_080CAE10: .4byte gBattleAnimPlayerMonIndex +_080CAE10: .4byte gBattleAnimBankAttacker _080CAE14: adds r0, r4, 0 bl move_anim_8072740 @@ -922,7 +922,7 @@ sub_80CAE20: @ 80CAE20 strh r0, [r4, 0x32] ldrh r0, [r4, 0x22] strh r0, [r4, 0x34] - ldr r0, _080CAE6C @ =gBattleAnimPlayerMonIndex + ldr r0, _080CAE6C @ =gBattleAnimBankAttacker ldrb r0, [r0] movs r1, 0x3 bl sub_8077ABC @@ -944,7 +944,7 @@ sub_80CAE20: @ 80CAE20 bx r0 .align 2, 0 _080CAE68: .4byte gBattleAnimArgs -_080CAE6C: .4byte gBattleAnimPlayerMonIndex +_080CAE6C: .4byte gBattleAnimBankAttacker _080CAE70: .4byte sub_80CAE74 thumb_func_end sub_80CAE20 @@ -1007,7 +1007,7 @@ _080CAED2: sub_80CAED8: @ 80CAED8 push {r4,r5,lr} adds r4, r0, 0 - ldr r5, _080CAF14 @ =gBattleAnimPlayerMonIndex + ldr r5, _080CAF14 @ =gBattleAnimBankAttacker ldrb r0, [r5] movs r1, 0x2 bl sub_8077ABC @@ -1033,7 +1033,7 @@ sub_80CAED8: @ 80CAED8 pop {r0} bx r0 .align 2, 0 -_080CAF14: .4byte gBattleAnimPlayerMonIndex +_080CAF14: .4byte gBattleAnimBankAttacker _080CAF18: .4byte gBattleAnimArgs _080CAF1C: .4byte sub_80CAF20 thumb_func_end sub_80CAED8 @@ -1087,7 +1087,7 @@ _080CAF68: sub_80CAF6C: @ 80CAF6C push {r4,lr} adds r4, r0, 0 - ldr r0, _080CAF8C @ =gBattleAnimPlayerMonIndex + ldr r0, _080CAF8C @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -1100,7 +1100,7 @@ sub_80CAF6C: @ 80CAF6C negs r0, r0 b _080CAF9A .align 2, 0 -_080CAF8C: .4byte gBattleAnimPlayerMonIndex +_080CAF8C: .4byte gBattleAnimBankAttacker _080CAF90: movs r1, 0x2E ldrsh r0, [r4, r1] @@ -1142,7 +1142,7 @@ sub_80CAFD0: @ 80CAFD0 adds r5, r0, 0 movs r1, 0x1 bl sub_80787B0 - ldr r0, _080CB024 @ =gBattleAnimPlayerMonIndex + ldr r0, _080CB024 @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -1160,7 +1160,7 @@ _080CAFF0: ldrsh r0, [r6, r1] cmp r0, 0 bne _080CB030 - ldr r4, _080CB02C @ =gBattleAnimEnemyMonIndex + ldr r4, _080CB02C @ =gBattleAnimBankTarget ldrb r0, [r4] movs r1, 0x2 bl sub_8077ABC @@ -1178,11 +1178,11 @@ _080CAFF0: adds r0, r6 b _080CB050 .align 2, 0 -_080CB024: .4byte gBattleAnimPlayerMonIndex +_080CB024: .4byte gBattleAnimBankAttacker _080CB028: .4byte gBattleAnimArgs -_080CB02C: .4byte gBattleAnimEnemyMonIndex +_080CB02C: .4byte gBattleAnimBankTarget _080CB030: - ldr r0, _080CB07C @ =gBattleAnimEnemyMonIndex + ldr r0, _080CB07C @ =gBattleAnimBankTarget ldrb r0, [r0] adds r2, r5, 0 adds r2, 0x32 @@ -1204,11 +1204,11 @@ _080CB050: strh r0, [r5, 0x38] adds r0, r5, 0 bl sub_80786EC - ldr r0, _080CB084 @ =gBattleAnimPlayerMonIndex + ldr r0, _080CB084 @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankSide adds r4, r0, 0 - ldr r0, _080CB07C @ =gBattleAnimEnemyMonIndex + ldr r0, _080CB07C @ =gBattleAnimBankTarget ldrb r0, [r0] bl GetBankSide lsls r4, 24 @@ -1218,9 +1218,9 @@ _080CB050: movs r0, 0x1 b _080CB08A .align 2, 0 -_080CB07C: .4byte gBattleAnimEnemyMonIndex +_080CB07C: .4byte gBattleAnimBankTarget _080CB080: .4byte gBattleAnimArgs -_080CB084: .4byte gBattleAnimPlayerMonIndex +_080CB084: .4byte gBattleAnimBankAttacker _080CB088: movs r0, 0 _080CB08A: @@ -1338,7 +1338,7 @@ sub_80CB144: @ 80CB144 lsrs r0, 24 cmp r0, 0x1 bne _080CB170 - ldr r0, _080CB198 @ =gBattleAnimEnemyMonIndex + ldr r0, _080CB198 @ =gBattleAnimBankTarget ldrb r0, [r0] adds r2, r4, 0 adds r2, 0x20 @@ -1367,7 +1367,7 @@ _080CB170: pop {r0} bx r0 .align 2, 0 -_080CB198: .4byte gBattleAnimEnemyMonIndex +_080CB198: .4byte gBattleAnimBankTarget _080CB19C: .4byte gBattleAnimArgs _080CB1A0: .4byte sub_80CB1A4 thumb_func_end sub_80CB144 @@ -1426,7 +1426,7 @@ _080CB1E0: ldrsh r0, [r4, r1] cmp r0, 0x7F bgt _080CB220 - ldr r0, _080CB21C @ =gBattleAnimEnemyMonIndex + ldr r0, _080CB21C @ =gBattleAnimBankTarget ldrb r0, [r0] bl sub_8079ED4 lsls r0, 24 @@ -1434,9 +1434,9 @@ _080CB1E0: subs r0, 0x1 b _080CB22E .align 2, 0 -_080CB21C: .4byte gBattleAnimEnemyMonIndex +_080CB21C: .4byte gBattleAnimBankTarget _080CB220: - ldr r0, _080CB258 @ =gBattleAnimEnemyMonIndex + ldr r0, _080CB258 @ =gBattleAnimBankTarget ldrb r0, [r0] bl sub_8079ED4 lsls r0, 24 @@ -1465,7 +1465,7 @@ _080CB252: pop {r0} bx r0 .align 2, 0 -_080CB258: .4byte gBattleAnimEnemyMonIndex +_080CB258: .4byte gBattleAnimBankTarget thumb_func_end sub_80CB1A4 thumb_func_start sub_80CB25C @@ -1514,7 +1514,7 @@ sub_80CB298: @ 80CB298 ands r0, r1 strb r0, [r2] movs r0, 0x1 - bl obj_id_for_side_relative_to_move + bl GetAnimBankSpriteId movs r0, 0x80 lsls r0, 1 strh r0, [r4, 0x2E] @@ -1535,7 +1535,7 @@ sub_80CB2D4: @ 80CB2D4 push {r4,lr} adds r4, r0, 0 movs r0, 0x1 - bl obj_id_for_side_relative_to_move + bl GetAnimBankSpriteId movs r1, 0x32 ldrsh r0, [r4, r1] cmp r0, 0 @@ -1596,7 +1596,7 @@ sub_80CB340: @ 80CB340 lsls r0, 24 lsrs r4, r0, 24 movs r0, 0x1 - bl obj_id_for_side_relative_to_move + bl GetAnimBankSpriteId lsls r0, 24 lsrs r2, r0, 24 ldr r1, _080CB36C @ =gSprites @@ -1650,7 +1650,7 @@ sub_80CB3A8: @ 80CB3A8 lsls r4, 24 lsrs r4, 24 movs r0, 0x1 - bl obj_id_for_side_relative_to_move + bl GetAnimBankSpriteId lsls r0, 24 lsrs r0, 24 adds r6, r0, 0 @@ -1671,7 +1671,7 @@ sub_80CB3A8: @ 80CB3A8 lsls r1, 16 asrs r1, 24 strh r1, [r5, 0x24] - ldr r0, _080CB430 @ =gBattleAnimEnemyMonIndex + ldr r0, _080CB430 @ =gBattleAnimBankTarget ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -1709,7 +1709,7 @@ _080CB420: .align 2, 0 _080CB428: .4byte gTasks _080CB42C: .4byte gSprites -_080CB430: .4byte gBattleAnimEnemyMonIndex +_080CB430: .4byte gBattleAnimBankTarget _080CB434: .4byte sub_80CB438 thumb_func_end sub_80CB3A8 @@ -1734,7 +1734,7 @@ sub_80CB438: @ 80CB438 cmp r5, 0 bne _080CB4A8 movs r0, 0x1 - bl obj_id_for_side_relative_to_move + bl GetAnimBankSpriteId adds r4, r0, 0 lsls r4, 24 lsrs r4, 24 @@ -1800,7 +1800,7 @@ sub_80CB4CC: @ 80CB4CC beq _080CB538 b _080CB58A _080CB4DE: - ldr r6, _080CB530 @ =gBattleAnimEnemyMonIndex + ldr r6, _080CB530 @ =gBattleAnimBankTarget ldrb r0, [r6] bl GetBankSide lsls r0, 24 @@ -1840,7 +1840,7 @@ _080CB4F6: strh r0, [r5, 0x2E] b _080CB58A .align 2, 0 -_080CB530: .4byte gBattleAnimEnemyMonIndex +_080CB530: .4byte gBattleAnimBankTarget _080CB534: .4byte gBattleAnimArgs _080CB538: adds r2, r5, 0 @@ -1862,7 +1862,7 @@ _080CB538: bl ChangeSpriteAffineAnim movs r0, 0x19 strh r0, [r5, 0x2E] - ldr r4, _080CB590 @ =gBattleAnimPlayerMonIndex + ldr r4, _080CB590 @ =gBattleAnimBankAttacker ldrb r0, [r4] movs r1, 0x2 bl sub_8077ABC @@ -1879,13 +1879,13 @@ _080CB538: str r0, [r5, 0x1C] ldr r1, _080CB598 @ =move_anim_8072740 adds r0, r5, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 _080CB58A: pop {r4-r6} pop {r0} bx r0 .align 2, 0 -_080CB590: .4byte gBattleAnimPlayerMonIndex +_080CB590: .4byte gBattleAnimBankAttacker _080CB594: .4byte sub_8078CC0 _080CB598: .4byte move_anim_8072740 thumb_func_end sub_80CB4CC @@ -1898,7 +1898,7 @@ sub_80CB59C: @ 80CB59C ldrsh r0, [r5, r1] cmp r0, 0 bne _080CB608 - ldr r4, _080CB614 @ =gBattleAnimPlayerMonIndex + ldr r4, _080CB614 @ =gBattleAnimBankAttacker ldrb r0, [r4] movs r1, 0x2 bl sub_8077ABC @@ -1950,7 +1950,7 @@ _080CB608: pop {r0} bx r0 .align 2, 0 -_080CB614: .4byte gBattleAnimPlayerMonIndex +_080CB614: .4byte gBattleAnimBankAttacker _080CB618: .4byte gBattleAnimArgs _080CB61C: .4byte sub_80CB710 thumb_func_end sub_80CB59C @@ -1964,7 +1964,7 @@ sub_80CB620: @ 80CB620 push {r4-r6} sub sp, 0x4 mov r9, r0 - ldr r4, _080CB6FC @ =gBattleAnimPlayerMonIndex + ldr r4, _080CB6FC @ =gBattleAnimBankAttacker ldrb r0, [r4] movs r1, 0x2 bl sub_8077ABC @@ -1979,7 +1979,7 @@ sub_80CB620: @ 80CB620 lsls r0, 24 lsrs r0, 24 mov r8, r0 - ldr r6, _080CB700 @ =gBattleAnimEnemyMonIndex + ldr r6, _080CB700 @ =gBattleAnimBankTarget ldrb r0, [r6] movs r1, 0x2 bl sub_8077ABC @@ -2060,8 +2060,8 @@ sub_80CB620: @ 80CB620 pop {r0} bx r0 .align 2, 0 -_080CB6FC: .4byte gBattleAnimPlayerMonIndex -_080CB700: .4byte gBattleAnimEnemyMonIndex +_080CB6FC: .4byte gBattleAnimBankAttacker +_080CB700: .4byte gBattleAnimBankTarget _080CB704: .4byte gBattleAnimArgs _080CB708: .4byte sub_80CB710 _080CB70C: .4byte gUnknown_03000728 @@ -2123,7 +2123,7 @@ sub_80CB768: @ 80CB768 ldrsh r0, [r6, r1] cmp r0, 0 bne _080CB7A8 - ldr r5, _080CB7E4 @ =gBattleAnimPlayerMonIndex + ldr r5, _080CB7E4 @ =gBattleAnimBankAttacker ldrb r0, [r5] movs r1, 0x2 bl sub_8077ABC @@ -2178,7 +2178,7 @@ _080CB7DE: pop {r0} bx r0 .align 2, 0 -_080CB7E4: .4byte gBattleAnimPlayerMonIndex +_080CB7E4: .4byte gBattleAnimBankAttacker _080CB7E8: .4byte gBattleAnimArgs thumb_func_end sub_80CB768 @@ -2380,7 +2380,7 @@ sub_80CB94C: @ 80CB94C adds r5, r0, 0 movs r1, 0 bl sub_80787B0 - ldr r4, _080CB994 @ =gBattleAnimEnemyMonIndex + ldr r4, _080CB994 @ =gBattleAnimBankTarget ldrb r0, [r4] movs r1, 0 bl sub_8077ABC @@ -2391,7 +2391,7 @@ sub_80CB94C: @ 80CB94C bl sub_8077ABC lsls r0, 24 lsrs r2, r0, 24 - ldr r0, _080CB998 @ =gBattleAnimPlayerMonIndex + ldr r0, _080CB998 @ =gBattleAnimBankAttacker ldrb r1, [r0] movs r0, 0x2 eors r0, r1 @@ -2408,8 +2408,8 @@ sub_80CB94C: @ 80CB94C movs r0, 0x1 b _080CB9AE .align 2, 0 -_080CB994: .4byte gBattleAnimEnemyMonIndex -_080CB998: .4byte gBattleAnimPlayerMonIndex +_080CB994: .4byte gBattleAnimBankTarget +_080CB998: .4byte gBattleAnimBankAttacker _080CB99C: strh r6, [r5, 0x3A] adds r0, r2, 0 @@ -2487,7 +2487,7 @@ _080CBA20: sub_80CBA28: @ 80CBA28 push {r4-r6,lr} adds r5, r0, 0 - ldr r4, _080CBA64 @ =gBattleAnimEnemyMonIndex + ldr r4, _080CBA64 @ =gBattleAnimBankTarget ldrb r0, [r4] movs r1, 0x1 bl sub_8077ABC @@ -2513,7 +2513,7 @@ sub_80CBA28: @ 80CBA28 ldr r0, _080CBA68 @ =sub_80CB8E8 b _080CBA96 .align 2, 0 -_080CBA64: .4byte gBattleAnimEnemyMonIndex +_080CBA64: .4byte gBattleAnimBankTarget _080CBA68: .4byte sub_80CB8E8 _080CBA6C: movs r0, 0xFF @@ -2589,7 +2589,7 @@ sub_80CBAE8: @ 80CBAE8 adds r5, r0, 0 movs r1, 0 bl sub_8078764 - ldr r4, _080CBB30 @ =gBattleAnimPlayerMonIndex + ldr r4, _080CBB30 @ =gBattleAnimBankAttacker ldrb r0, [r4] movs r1, 0 bl sub_8077ABC @@ -2600,7 +2600,7 @@ sub_80CBAE8: @ 80CBAE8 bl sub_8077ABC lsls r0, 24 lsrs r2, r0, 24 - ldr r0, _080CBB34 @ =gBattleAnimEnemyMonIndex + ldr r0, _080CBB34 @ =gBattleAnimBankTarget ldrb r1, [r0] movs r0, 0x2 eors r0, r1 @@ -2617,8 +2617,8 @@ sub_80CBAE8: @ 80CBAE8 movs r0, 0x1 b _080CBB4A .align 2, 0 -_080CBB30: .4byte gBattleAnimPlayerMonIndex -_080CBB34: .4byte gBattleAnimEnemyMonIndex +_080CBB30: .4byte gBattleAnimBankAttacker +_080CBB34: .4byte gBattleAnimBankTarget _080CBB38: strh r6, [r5, 0x3A] adds r0, r2, 0 @@ -3002,7 +3002,7 @@ sub_80CBDF4: @ 80CBDF4 lsls r0, 3 ldr r1, _080CBF48 @ =gTasks adds r5, r0, r1 - ldr r4, _080CBF4C @ =gBattleAnimEnemyMonIndex + ldr r4, _080CBF4C @ =gBattleAnimBankTarget ldrb r0, [r4] bl sub_8079E90 lsls r0, 24 @@ -3156,7 +3156,7 @@ _080CBE94: bx r0 .align 2, 0 _080CBF48: .4byte gTasks -_080CBF4C: .4byte gBattleAnimEnemyMonIndex +_080CBF4C: .4byte gBattleAnimBankTarget _080CBF50: .4byte gSpriteTemplate_83D6884 _080CBF54: .4byte gSprites _080CBF58: .4byte sub_80CBF5C @@ -3832,13 +3832,13 @@ sub_80CC474: @ 80CC474 ldrsh r0, [r0, r1] cmp r0, 0 bne _080CC490 - ldr r0, _080CC48C @ =gBattleAnimPlayerMonIndex + ldr r0, _080CC48C @ =gBattleAnimBankAttacker b _080CC492 .align 2, 0 _080CC488: .4byte gBattleAnimArgs -_080CC48C: .4byte gBattleAnimPlayerMonIndex +_080CC48C: .4byte gBattleAnimBankAttacker _080CC490: - ldr r0, _080CC4B0 @ =gBattleAnimEnemyMonIndex + ldr r0, _080CC4B0 @ =gBattleAnimBankTarget _080CC492: ldrb r6, [r0] adds r0, r6, 0 @@ -3854,7 +3854,7 @@ _080CC492: ldr r0, _080CC4B8 @ =0x0000fff0 b _080CC4CC .align 2, 0 -_080CC4B0: .4byte gBattleAnimEnemyMonIndex +_080CC4B0: .4byte gBattleAnimBankTarget _080CC4B4: .4byte gBattleAnimArgs _080CC4B8: .4byte 0x0000fff0 _080CC4BC: @@ -3923,7 +3923,7 @@ _080CC518: strb r0, [r4, 0x5] b _080CC56C _080CC534: - ldr r0, _080CC578 @ =gBattleAnimEnemyMonIndex + ldr r0, _080CC578 @ =gBattleAnimBankTarget ldrb r0, [r0] movs r1, 0x3 bl sub_8077ABC @@ -3933,7 +3933,7 @@ _080CC534: adds r0, r7 strh r0, [r4, 0x22] movs r0, 0x1 - bl obj_id_for_side_relative_to_move + bl GetAnimBankSpriteId _080CC54E: adds r0, r6, 0 bl sub_8079ED4 @@ -3956,7 +3956,7 @@ _080CC56C: pop {r0} bx r0 .align 2, 0 -_080CC578: .4byte gBattleAnimEnemyMonIndex +_080CC578: .4byte gBattleAnimBankTarget _080CC57C: .4byte sub_80CC580 thumb_func_end sub_80CC474 @@ -4149,12 +4149,12 @@ _080CC6E8: ldrsh r0, [r1, r3] cmp r0, 0 bne _080CC6F8 - ldr r4, _080CC6F4 @ =gBattleAnimPlayerMonIndex + ldr r4, _080CC6F4 @ =gBattleAnimBankAttacker b _080CC6FA .align 2, 0 -_080CC6F4: .4byte gBattleAnimPlayerMonIndex +_080CC6F4: .4byte gBattleAnimBankAttacker _080CC6F8: - ldr r4, _080CC734 @ =gBattleAnimEnemyMonIndex + ldr r4, _080CC734 @ =gBattleAnimBankTarget _080CC6FA: ldrb r0, [r4] movs r1, 0x2 @@ -4184,7 +4184,7 @@ _080CC6FA: strh r2, [r6, 0x3A] b _080CC74C .align 2, 0 -_080CC734: .4byte gBattleAnimEnemyMonIndex +_080CC734: .4byte gBattleAnimBankTarget _080CC738: .4byte gBattleAnimArgs _080CC73C: strh r5, [r6, 0x20] @@ -4317,7 +4317,7 @@ _080CC826: sub_80CC82C: @ 80CC82C push {r4,lr} adds r4, r0, 0 - ldr r0, _080CC84C @ =gBattleAnimPlayerMonIndex + ldr r0, _080CC84C @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -4331,7 +4331,7 @@ sub_80CC82C: @ 80CC82C ldrh r0, [r2, 0x2] b _080CC860 .align 2, 0 -_080CC84C: .4byte gBattleAnimPlayerMonIndex +_080CC84C: .4byte gBattleAnimBankAttacker _080CC850: .4byte gBattleAnimArgs _080CC854: ldr r0, _080CC878 @ =gBattleAnimArgs @@ -4348,7 +4348,7 @@ _080CC860: str r0, [r4, 0x1C] ldr r1, _080CC880 @ =move_anim_8072740 adds r0, r4, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 pop {r4} pop {r0} bx r0 @@ -4362,7 +4362,7 @@ _080CC880: .4byte move_anim_8072740 sub_80CC884: @ 80CC884 push {r4,r5,lr} adds r5, r0, 0 - ldr r0, _080CC8BC @ =gBattleAnimPlayerMonIndex + ldr r0, _080CC8BC @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -4387,7 +4387,7 @@ _080CC89E: pop {r0} bx r0 .align 2, 0 -_080CC8BC: .4byte gBattleAnimPlayerMonIndex +_080CC8BC: .4byte gBattleAnimBankAttacker _080CC8C0: .4byte sub_80CC810 _080CC8C4: .4byte gBattleAnimArgs thumb_func_end sub_80CC884 @@ -4418,7 +4418,7 @@ sub_80CC8C8: @ 80CC8C8 bl StartSpriteAffineAnim ldr r1, _080CC90C @ =move_anim_8074EE0 adds r0, r4, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 ldr r0, _080CC910 @ =sub_8078504 str r0, [r4, 0x1C] pop {r4} @@ -4434,7 +4434,7 @@ _080CC910: .4byte sub_8078504 sub_80CC914: @ 80CC914 push {r4,r5,lr} adds r5, r0, 0 - ldr r4, _080CC964 @ =gBattleAnimEnemyMonIndex + ldr r4, _080CC964 @ =gBattleAnimBankTarget ldrb r0, [r4] movs r1, 0 bl sub_8077ABC @@ -4470,7 +4470,7 @@ _080CC948: strh r0, [r5, 0x20] b _080CC984 .align 2, 0 -_080CC964: .4byte gBattleAnimEnemyMonIndex +_080CC964: .4byte gBattleAnimBankTarget _080CC968: .4byte sub_80CCB00 _080CC96C: .4byte gBattleAnimArgs _080CC970: @@ -4535,7 +4535,7 @@ sub_80CC9BC: @ 80CC9BC .align 2, 0 _080CC9D8: .4byte gBattleAnimArgs _080CC9DC: - ldr r5, _080CC9F8 @ =gBattleAnimEnemyMonIndex + ldr r5, _080CC9F8 @ =gBattleAnimBankTarget ldrb r0, [r5] movs r4, 0x2 eors r0, r4 @@ -4548,9 +4548,9 @@ _080CC9DC: adds r0, r4, 0 b _080CCA68 .align 2, 0 -_080CC9F8: .4byte gBattleAnimEnemyMonIndex +_080CC9F8: .4byte gBattleAnimBankTarget _080CC9FC: - ldr r5, _080CCA54 @ =gBattleAnimEnemyMonIndex + ldr r5, _080CCA54 @ =gBattleAnimBankTarget ldrb r0, [r5] movs r1, 0 bl sub_8077ABC @@ -4566,7 +4566,7 @@ _080CC9FC: mov r8, r2 mov r1, r8 eors r0, r1 - bl b_side_obj__get_some_boolean + bl IsAnimBankSpriteVisible lsls r0, 24 cmp r0, 0 beq _080CCA72 @@ -4590,9 +4590,9 @@ _080CC9FC: lsrs r4, r0, 1 b _080CCA72 .align 2, 0 -_080CCA54: .4byte gBattleAnimEnemyMonIndex +_080CCA54: .4byte gBattleAnimBankTarget _080CCA58: - ldr r4, _080CCAA4 @ =gBattleAnimEnemyMonIndex + ldr r4, _080CCAA4 @ =gBattleAnimBankTarget ldrb r0, [r4] movs r1, 0 bl sub_8077ABC @@ -4607,7 +4607,7 @@ _080CCA68: _080CCA72: strh r7, [r6, 0x20] strh r4, [r6, 0x22] - ldr r0, _080CCAA4 @ =gBattleAnimEnemyMonIndex + ldr r0, _080CCAA4 @ =gBattleAnimBankTarget ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -4631,7 +4631,7 @@ _080CCA8A: strh r0, [r6, 0x20] b _080CCAC4 .align 2, 0 -_080CCAA4: .4byte gBattleAnimEnemyMonIndex +_080CCAA4: .4byte gBattleAnimBankTarget _080CCAA8: .4byte sub_80CCB00 _080CCAAC: .4byte gBattleAnimArgs _080CCAB0: @@ -4723,7 +4723,7 @@ _080CCB26: bne _080CCB5C ldr r1, _080CCB64 @ =move_anim_8072740 adds r0, r4, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 movs r0, 0x3 strh r0, [r4, 0x2E] ldr r0, _080CCB68 @ =sub_80782D8 @@ -4861,7 +4861,7 @@ sub_80CCC50: @ 80CCC50 ldr r4, _080CCC70 @ =gBattleAnimArgs ldrh r0, [r4, 0x4] strh r0, [r5, 0x2E] - ldr r0, _080CCC74 @ =gBattleAnimPlayerMonIndex + ldr r0, _080CCC74 @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -4873,7 +4873,7 @@ sub_80CCC50: @ 80CCC50 b _080CCC7E .align 2, 0 _080CCC70: .4byte gBattleAnimArgs -_080CCC74: .4byte gBattleAnimPlayerMonIndex +_080CCC74: .4byte gBattleAnimBankAttacker _080CCC78: ldrh r0, [r4] ldrh r1, [r5, 0x20] @@ -4977,7 +4977,7 @@ sub_80CCD24: @ 80CCD24 adds r0, 0x8 strh r0, [r1, 0x2] _080CCD3A: - ldr r6, _080CCD9C @ =gBattleAnimPlayerMonIndex + ldr r6, _080CCD9C @ =gBattleAnimBankAttacker ldrb r0, [r6] movs r1, 0 bl sub_8077EE4 @@ -5022,7 +5022,7 @@ _080CCD78: b _080CCDB8 .align 2, 0 _080CCD98: .4byte gBattleAnimArgs -_080CCD9C: .4byte gBattleAnimPlayerMonIndex +_080CCD9C: .4byte gBattleAnimBankAttacker _080CCDA0: ldrb r0, [r6] bl sub_8079ED4 @@ -5207,7 +5207,7 @@ _080CCF00: .4byte sub_807861C sub_80CCF04: @ 80CCF04 push {r4-r6,lr} adds r4, r0, 0 - ldr r6, _080CCF5C @ =gBattleAnimEnemyMonIndex + ldr r6, _080CCF5C @ =gBattleAnimBankTarget ldrb r0, [r6] movs r1, 0x2 bl sub_8077ABC @@ -5248,7 +5248,7 @@ sub_80CCF04: @ 80CCF04 pop {r0} bx r0 .align 2, 0 -_080CCF5C: .4byte gBattleAnimEnemyMonIndex +_080CCF5C: .4byte gBattleAnimBankTarget _080CCF60: .4byte 0x0000ffe8 _080CCF64: .4byte REG_BLDCNT _080CCF68: .4byte REG_BLDALPHA @@ -5531,7 +5531,7 @@ _080CD154: strh r0, [r4, 0x32] ldr r1, _080CD188 @ =move_anim_8072740 adds r0, r4, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 ldr r0, _080CD18C @ =sub_8078394 str r0, [r4, 0x1C] pop {r4,r5} @@ -5552,13 +5552,13 @@ sub_80CD190: @ 80CD190 ldrsh r0, [r0, r1] cmp r0, 0 bne _080CD1AC - ldr r0, _080CD1A8 @ =gBattleAnimPlayerMonIndex + ldr r0, _080CD1A8 @ =gBattleAnimBankAttacker b _080CD1AE .align 2, 0 _080CD1A4: .4byte gBattleAnimArgs -_080CD1A8: .4byte gBattleAnimPlayerMonIndex +_080CD1A8: .4byte gBattleAnimBankAttacker _080CD1AC: - ldr r0, _080CD1F0 @ =gBattleAnimEnemyMonIndex + ldr r0, _080CD1F0 @ =gBattleAnimBankTarget _080CD1AE: ldrb r6, [r0] bl IsDoubleBattle @@ -5568,7 +5568,7 @@ _080CD1AE: movs r1, 0x2 adds r0, r6, 0 eors r0, r1 - bl b_side_obj__get_some_boolean + bl IsAnimBankSpriteVisible lsls r0, 24 cmp r0, 0 beq _080CD1F8 @@ -5590,7 +5590,7 @@ _080CD1AE: strh r0, [r5, 0x22] b _080CD248 .align 2, 0 -_080CD1F0: .4byte gBattleAnimEnemyMonIndex +_080CD1F0: .4byte gBattleAnimBankTarget _080CD1F4: .4byte gBattleAnimArgs _080CD1F8: ldr r4, _080CD218 @ =gBattleAnimArgs @@ -5640,7 +5640,7 @@ _080CD248: strh r0, [r5, 0x32] ldr r1, _080CD26C @ =move_anim_8072740 adds r0, r5, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 ldr r0, _080CD270 @ =sub_8078394 str r0, [r5, 0x1C] pop {r4-r6} @@ -5657,7 +5657,7 @@ sub_80CD274: @ 80CD274 push {r4,lr} adds r4, r0, 0 bl sub_8078650 - ldr r0, _080CD2A0 @ =gBattleAnimPlayerMonIndex + ldr r0, _080CD2A0 @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -5674,7 +5674,7 @@ sub_80CD274: @ 80CD274 strh r0, [r4, 0x22] b _080CD2C2 .align 2, 0 -_080CD2A0: .4byte gBattleAnimPlayerMonIndex +_080CD2A0: .4byte gBattleAnimBankAttacker _080CD2A4: .4byte gBattleAnimArgs _080CD2A8: ldr r2, _080CD2CC @ =gBattleAnimArgs @@ -5749,7 +5749,7 @@ sub_80CD328: @ 80CD328 push {r4,lr} adds r4, r0, 0 bl sub_8078650 - ldr r0, _080CD358 @ =gBattleAnimPlayerMonIndex + ldr r0, _080CD358 @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -5768,7 +5768,7 @@ sub_80CD328: @ 80CD328 strh r0, [r4, 0x34] b _080CD37E .align 2, 0 -_080CD358: .4byte gBattleAnimPlayerMonIndex +_080CD358: .4byte gBattleAnimBankAttacker _080CD35C: .4byte gBattleAnimArgs _080CD360: ldr r2, _080CD388 @ =gBattleAnimArgs @@ -5850,7 +5850,7 @@ sub_80CD3E0: @ 80CD3E0 ldr r1, _080CD400 @ =sub_80782D8 str r1, [r0, 0x1C] ldr r1, _080CD404 @ =sub_80CD408 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 pop {r0} bx r0 .align 2, 0 @@ -5877,7 +5877,7 @@ _080CD41E: str r0, [r5, 0x1C] ldr r1, _080CD434 @ =sub_80CD408 adds r0, r5, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 b _080CD49E .align 2, 0 _080CD430: .4byte sub_80782D8 @@ -5917,7 +5917,7 @@ _080CD438: str r0, [r5, 0x1C] ldr r1, _080CD4B4 @ =sub_80CD4B8 adds r0, r5, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 movs r1, 0x80 lsls r1, 1 adds r0, r1, 0 @@ -5960,7 +5960,7 @@ sub_80CD4B8: @ 80CD4B8 str r0, [r2, 0x1C] ldr r1, _080CD4DC @ =sub_80CD4EC adds r0, r2, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 b _080CD4E4 .align 2, 0 _080CD4D8: .4byte sub_80782D8 @@ -5990,7 +5990,7 @@ sub_80CD4EC: @ 80CD4EC str r0, [r5, 0x1C] ldr r1, _080CD510 @ =sub_80CD5A8 adds r0, r5, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 b _080CD594 .align 2, 0 _080CD50C: .4byte sub_80782D8 @@ -6043,7 +6043,7 @@ _080CD54C: strh r1, [r5, 0x24] movs r0, 0x6 strh r0, [r5, 0x2E] - ldr r4, _080CD59C @ =gBattleAnimEnemyMonIndex + ldr r4, _080CD59C @ =gBattleAnimBankTarget ldrb r0, [r4] movs r1, 0x2 bl sub_8077ABC @@ -6062,13 +6062,13 @@ _080CD54C: str r0, [r5, 0x1C] ldr r1, _080CD5A4 @ =sub_80CD654 adds r0, r5, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 _080CD594: pop {r4-r7} pop {r0} bx r0 .align 2, 0 -_080CD59C: .4byte gBattleAnimEnemyMonIndex +_080CD59C: .4byte gBattleAnimBankTarget _080CD5A0: .4byte sub_8078B34 _080CD5A4: .4byte sub_80CD654 thumb_func_end sub_80CD4EC @@ -6376,7 +6376,7 @@ sub_80CD7CC: @ 80CD7CC adds r4, r0, 0 movs r0, 0x6 strh r0, [r4, 0x2E] - ldr r5, _080CD80C @ =gBattleAnimPlayerMonIndex + ldr r5, _080CD80C @ =gBattleAnimBankAttacker ldrb r0, [r5] bl GetBankSide lsls r0, 24 @@ -6397,14 +6397,14 @@ _080CD7EA: strh r0, [r4, 0x34] ldr r1, _080CD814 @ =sub_80CD81C adds r0, r4, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 ldr r0, _080CD818 @ =sub_8078458 str r0, [r4, 0x1C] pop {r4,r5} pop {r0} bx r0 .align 2, 0 -_080CD80C: .4byte gBattleAnimPlayerMonIndex +_080CD80C: .4byte gBattleAnimBankAttacker _080CD810: .4byte gObjectBankIDs _080CD814: .4byte sub_80CD81C _080CD818: .4byte sub_8078458 @@ -6419,7 +6419,7 @@ sub_80CD81C: @ 80CD81C cmp r6, 0 bne _080CD858 ldr r1, _080CD898 @ =gObjectBankIDs - ldr r4, _080CD89C @ =gBattleAnimPlayerMonIndex + ldr r4, _080CD89C @ =gBattleAnimBankAttacker ldrb r0, [r4] adds r0, r1 ldrb r0, [r0] @@ -6475,7 +6475,7 @@ _080CD892: bx r0 .align 2, 0 _080CD898: .4byte gObjectBankIDs -_080CD89C: .4byte gBattleAnimPlayerMonIndex +_080CD89C: .4byte gBattleAnimBankAttacker _080CD8A0: .4byte 0xfffffd00 _080CD8A4: .4byte sub_80CD9B8 thumb_func_end sub_80CD81C @@ -6486,7 +6486,7 @@ sub_80CD8A8: @ 80CD8A8 adds r4, r0, 0 movs r0, 0x4 strh r0, [r4, 0x2E] - ldr r5, _080CD8E8 @ =gBattleAnimPlayerMonIndex + ldr r5, _080CD8E8 @ =gBattleAnimBankAttacker ldrb r0, [r5] bl GetBankSide lsls r0, 24 @@ -6507,14 +6507,14 @@ _080CD8C6: strh r0, [r4, 0x34] ldr r1, _080CD8F0 @ =sub_80CD9B8 adds r0, r4, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 ldr r0, _080CD8F4 @ =sub_8078458 str r0, [r4, 0x1C] pop {r4,r5} pop {r0} bx r0 .align 2, 0 -_080CD8E8: .4byte gBattleAnimPlayerMonIndex +_080CD8E8: .4byte gBattleAnimBankAttacker _080CD8EC: .4byte gObjectBankIDs _080CD8F0: .4byte sub_80CD9B8 _080CD8F4: .4byte sub_8078458 @@ -6551,7 +6551,7 @@ sub_80CD91C: @ 80CD91C cmp r0, 0 bne _080CD96C ldr r1, _080CD958 @ =gObjectBankIDs - ldr r4, _080CD95C @ =gBattleAnimPlayerMonIndex + ldr r4, _080CD95C @ =gBattleAnimBankAttacker ldrb r0, [r4] adds r0, r1 ldrb r0, [r0] @@ -6574,7 +6574,7 @@ sub_80CD91C: @ 80CD91C b _080CD96A .align 2, 0 _080CD958: .4byte gObjectBankIDs -_080CD95C: .4byte gBattleAnimPlayerMonIndex +_080CD95C: .4byte gBattleAnimBankAttacker _080CD960: movs r0, 0x80 lsls r0, 3 @@ -6660,7 +6660,7 @@ _080CD9EA: _080CD9F0: strh r5, [r4, 0x30] ldr r1, _080CDA74 @ =gObjectBankIDs - ldr r2, _080CDA78 @ =gBattleAnimPlayerMonIndex + ldr r2, _080CDA78 @ =gBattleAnimBankAttacker ldrb r0, [r2] adds r0, r1 ldrb r0, [r0] @@ -6724,7 +6724,7 @@ _080CDA2E: b _080CDAC2 .align 2, 0 _080CDA74: .4byte gObjectBankIDs -_080CDA78: .4byte gBattleAnimPlayerMonIndex +_080CDA78: .4byte gBattleAnimBankAttacker _080CDA7C: .4byte 0xfffffe00 _080CDA80: ldrh r0, [r4, 0x36] @@ -6773,7 +6773,7 @@ sub_80CDAC8: @ 80CDAC8 lsls r0, 3 adds r5, r0, r1 ldr r1, _080CDB10 @ =gObjectBankIDs - ldr r2, _080CDB14 @ =gBattleAnimPlayerMonIndex + ldr r2, _080CDB14 @ =gBattleAnimBankAttacker ldrb r0, [r2] adds r0, r1 ldrb r0, [r0] @@ -6798,7 +6798,7 @@ sub_80CDAC8: @ 80CDAC8 .align 2, 0 _080CDB0C: .4byte gTasks _080CDB10: .4byte gObjectBankIDs -_080CDB14: .4byte gBattleAnimPlayerMonIndex +_080CDB14: .4byte gBattleAnimBankAttacker _080CDB18: .4byte gBattleAnimArgs _080CDB1C: strh r1, [r5, 0xC] @@ -7134,13 +7134,13 @@ sub_80CDD74: @ 80CDD74 ldrsh r0, [r6, r1] cmp r0, 0 bne _080CDD90 - ldr r4, _080CDD8C @ =gBattleAnimPlayerMonIndex + ldr r4, _080CDD8C @ =gBattleAnimBankAttacker b _080CDD92 .align 2, 0 _080CDD88: .4byte gBattleAnimArgs -_080CDD8C: .4byte gBattleAnimPlayerMonIndex +_080CDD8C: .4byte gBattleAnimBankAttacker _080CDD90: - ldr r4, _080CDDD0 @ =gBattleAnimEnemyMonIndex + ldr r4, _080CDDD0 @ =gBattleAnimBankTarget _080CDD92: ldrb r0, [r4] movs r1, 0x2 @@ -7163,14 +7163,14 @@ _080CDD92: strh r0, [r5, 0x30] ldr r1, _080CDDD4 @ =sub_80CDEC0 adds r0, r5, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 ldr r0, _080CDDD8 @ =sub_8078600 str r0, [r5, 0x1C] pop {r4-r6} pop {r0} bx r0 .align 2, 0 -_080CDDD0: .4byte gBattleAnimEnemyMonIndex +_080CDDD0: .4byte gBattleAnimBankTarget _080CDDD4: .4byte sub_80CDEC0 _080CDDD8: .4byte sub_8078600 thumb_func_end sub_80CDD74 @@ -7179,7 +7179,7 @@ _080CDDD8: .4byte sub_8078600 sub_80CDDDC: @ 80CDDDC push {r4,r5,lr} adds r4, r0, 0 - ldr r5, _080CDE14 @ =gBattleAnimEnemyMonIndex + ldr r5, _080CDE14 @ =gBattleAnimBankTarget ldrb r0, [r5] movs r1, 0x2 bl sub_8077ABC @@ -7196,14 +7196,14 @@ sub_80CDDDC: @ 80CDDDC strh r0, [r4, 0x22] ldr r1, _080CDE1C @ =sub_80CDE78 adds r0, r4, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 ldr r0, _080CDE20 @ =sub_8078600 str r0, [r4, 0x1C] pop {r4,r5} pop {r0} bx r0 .align 2, 0 -_080CDE14: .4byte gBattleAnimEnemyMonIndex +_080CDE14: .4byte gBattleAnimBankTarget _080CDE18: .4byte 0x0000ffd0 _080CDE1C: .4byte sub_80CDE78 _080CDE20: .4byte sub_8078600 @@ -7213,7 +7213,7 @@ _080CDE20: .4byte sub_8078600 sub_80CDE24: @ 80CDE24 push {r4-r6,lr} adds r4, r0, 0 - ldr r5, _080CDE68 @ =gBattleAnimEnemyMonIndex + ldr r5, _080CDE68 @ =gBattleAnimBankTarget ldrb r0, [r5] movs r1, 0x2 bl sub_8077ABC @@ -7243,7 +7243,7 @@ sub_80CDE24: @ 80CDE24 pop {r0} bx r0 .align 2, 0 -_080CDE68: .4byte gBattleAnimEnemyMonIndex +_080CDE68: .4byte gBattleAnimBankTarget _080CDE6C: .4byte gBattleAnimArgs _080CDE70: .4byte 0x0000ffd0 _080CDE74: .4byte sub_80CDEC0 @@ -7268,7 +7268,7 @@ sub_80CDE78: @ 80CDE78 strh r0, [r4, 0x32] ldr r1, _080CDEA8 @ =sub_80CDEB0 adds r0, r4, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 ldr r0, _080CDEAC @ =sub_8078364 str r0, [r4, 0x1C] _080CDEA2: @@ -7343,13 +7343,13 @@ sub_80CDF0C: @ 80CDF0C ldrsh r0, [r6, r1] cmp r0, 0 bne _080CDF28 - ldr r4, _080CDF24 @ =gBattleAnimPlayerMonIndex + ldr r4, _080CDF24 @ =gBattleAnimBankAttacker b _080CDF2A .align 2, 0 _080CDF20: .4byte gBattleAnimArgs -_080CDF24: .4byte gBattleAnimPlayerMonIndex +_080CDF24: .4byte gBattleAnimBankAttacker _080CDF28: - ldr r4, _080CDF64 @ =gBattleAnimEnemyMonIndex + ldr r4, _080CDF64 @ =gBattleAnimBankTarget _080CDF2A: ldrb r0, [r4] movs r1, 0 @@ -7378,7 +7378,7 @@ _080CDF2A: pop {r0} bx r0 .align 2, 0 -_080CDF64: .4byte gBattleAnimEnemyMonIndex +_080CDF64: .4byte gBattleAnimBankTarget _080CDF68: .4byte gBattleAnimArgs _080CDF6C: .4byte sub_80CDF70 thumb_func_end sub_80CDF0C @@ -7424,7 +7424,7 @@ _080CDFAC: sub_80CDFB0: @ 80CDFB0 push {r4-r6,lr} adds r4, r0, 0 - ldr r6, _080CDFF8 @ =gBattleAnimPlayerMonIndex + ldr r6, _080CDFF8 @ =gBattleAnimBankAttacker ldrb r0, [r6] movs r1, 0x2 bl sub_8077ABC @@ -7456,7 +7456,7 @@ sub_80CDFB0: @ 80CDFB0 pop {r0} bx r0 .align 2, 0 -_080CDFF8: .4byte gBattleAnimPlayerMonIndex +_080CDFF8: .4byte gBattleAnimBankAttacker _080CDFFC: .4byte sub_80CE000 thumb_func_end sub_80CDFB0 @@ -7551,7 +7551,7 @@ sub_80CE09C: @ 80CE09C ldrsh r0, [r6, r1] cmp r0, 0 bne _080CE0E6 - ldr r4, _080CE0FC @ =gBattleAnimPlayerMonIndex + ldr r4, _080CE0FC @ =gBattleAnimBankAttacker ldrb r0, [r4] movs r1, 0 bl sub_8077ABC @@ -7593,7 +7593,7 @@ _080CE0F6: pop {r0} bx r0 .align 2, 0 -_080CE0FC: .4byte gBattleAnimPlayerMonIndex +_080CE0FC: .4byte gBattleAnimBankAttacker _080CE100: .4byte gBattleAnimArgs _080CE104: .4byte 0x0000ffff thumb_func_end sub_80CE09C @@ -7708,7 +7708,7 @@ _080CE1C0: strb r0, [r2] movs r0, 0x1E strh r0, [r5, 0x2E] - ldr r4, _080CE204 @ =gBattleAnimPlayerMonIndex + ldr r4, _080CE204 @ =gBattleAnimBankAttacker ldrb r0, [r4] movs r1, 0x2 bl sub_8077ABC @@ -7725,13 +7725,13 @@ _080CE1C0: str r0, [r5, 0x1C] ldr r1, _080CE20C @ =move_anim_8072740 adds r0, r5, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 _080CE1FC: pop {r4,r5} pop {r0} bx r0 .align 2, 0 -_080CE204: .4byte gBattleAnimPlayerMonIndex +_080CE204: .4byte gBattleAnimBankAttacker _080CE208: .4byte sub_8078B34 _080CE20C: .4byte move_anim_8072740 thumb_func_end sub_80CE1AC @@ -7926,7 +7926,7 @@ _080CE366: sub_80CE36C: @ 80CE36C push {r4,lr} adds r4, r0, 0 - ldr r0, _080CE3A4 @ =gBattleAnimPlayerMonIndex + ldr r0, _080CE3A4 @ =gBattleAnimBankAttacker ldrb r0, [r0] movs r1, 0x2 bl sub_8077ABC @@ -7951,7 +7951,7 @@ sub_80CE36C: @ 80CE36C pop {r0} bx r0 .align 2, 0 -_080CE3A4: .4byte gBattleAnimPlayerMonIndex +_080CE3A4: .4byte gBattleAnimBankAttacker _080CE3A8: .4byte gBattleAnimArgs _080CE3AC: .4byte sub_80CE3B0 thumb_func_end sub_80CE36C @@ -8339,7 +8339,7 @@ _080CE68E: strh r0, [r5, 0x2E] ldrh r0, [r6, 0x4] strh r0, [r5, 0x30] - ldr r4, _080CE6F8 @ =gBattleAnimEnemyMonIndex + ldr r4, _080CE6F8 @ =gBattleAnimBankTarget ldrb r0, [r4] movs r1, 0x2 bl sub_8077ABC @@ -8384,10 +8384,10 @@ _080CE68E: b _080CE726 .align 2, 0 _080CE6F4: .4byte gBattleAnimArgs -_080CE6F8: .4byte gBattleAnimEnemyMonIndex +_080CE6F8: .4byte gBattleAnimBankTarget _080CE6FC: .4byte 0xffffec00 _080CE700: - ldr r0, _080CE740 @ =gBattleAnimPlayerMonIndex + ldr r0, _080CE740 @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -8417,7 +8417,7 @@ _080CE726: strh r0, [r5, 0x38] b _080CE784 .align 2, 0 -_080CE740: .4byte gBattleAnimPlayerMonIndex +_080CE740: .4byte gBattleAnimBankAttacker _080CE744: .4byte 0xfffff600 _080CE748: ldrh r0, [r5, 0x20] @@ -8515,7 +8515,7 @@ sub_80CE7E0: @ 80CE7E0 ldr r1, _080CE870 @ =gTasks adds r6, r0, r1 movs r0, 0 - bl obj_id_for_side_relative_to_move + bl GetAnimBankSpriteId lsls r0, 24 lsrs r0, 24 strh r0, [r6, 0x8] @@ -8615,7 +8615,7 @@ _080CE8B4: _080CE8C6: ldr r0, _080CE8E8 @ =sub_80CE910 str r0, [r6] - ldr r0, _080CE8EC @ =gBattleAnimPlayerMonIndex + ldr r0, _080CE8EC @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankIdentity_permutated lsls r0, 24 @@ -8630,7 +8630,7 @@ _080CE8C6: .align 2, 0 _080CE8E4: .4byte sub_80CE974 _080CE8E8: .4byte sub_80CE910 -_080CE8EC: .4byte gBattleAnimPlayerMonIndex +_080CE8EC: .4byte gBattleAnimBankAttacker _080CE8F0: .4byte 0x0000fdff _080CE8F4: movs r2, 0x80 @@ -8664,7 +8664,7 @@ sub_80CE910: @ 80CE910 ldrsh r0, [r0, r1] cmp r0, 0 bne _080CE968 - ldr r0, _080CE948 @ =gBattleAnimPlayerMonIndex + ldr r0, _080CE948 @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankIdentity_permutated lsls r0, 24 @@ -8679,7 +8679,7 @@ sub_80CE910: @ 80CE910 b _080CE956 .align 2, 0 _080CE944: .4byte gTasks -_080CE948: .4byte gBattleAnimPlayerMonIndex +_080CE948: .4byte gBattleAnimBankAttacker _080CE94C: movs r0, 0x80 lsls r0, 19 @@ -8782,7 +8782,7 @@ sub_80CEA04: @ 80CEA04 push {r4,lr} adds r4, r0, 0 ldr r1, _080CEA18 @ =move_anim_8072740 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 ldr r0, _080CEA1C @ =sub_8078600 str r0, [r4, 0x1C] pop {r4} @@ -8964,7 +8964,7 @@ _080CEB48: _080CEB64: .4byte gBattleAnimArgs _080CEB68: .4byte gUnknown_083D712C _080CEB6C: - ldr r4, _080CEBBC @ =gBattleAnimEnemyMonIndex + ldr r4, _080CEBBC @ =gBattleAnimBankTarget ldrb r0, [r4] movs r1, 0x2 bl sub_8077ABC @@ -9002,7 +9002,7 @@ _080CEB86: pop {r0} bx r0 .align 2, 0 -_080CEBBC: .4byte gBattleAnimEnemyMonIndex +_080CEBBC: .4byte gBattleAnimBankTarget _080CEBC0: .4byte sub_80CEC1C thumb_func_end sub_80CEB0C @@ -9165,7 +9165,7 @@ _080CECE4: .4byte gUnknown_083D712C sub_80CECE8: @ 80CECE8 push {r4-r7,lr} adds r6, r0, 0 - ldr r7, _080CED6C @ =gBattleAnimPlayerMonIndex + ldr r7, _080CED6C @ =gBattleAnimBankAttacker ldrb r0, [r7] bl GetBankSide lsls r0, 24 @@ -9225,7 +9225,7 @@ _080CED06: pop {r0} bx r0 .align 2, 0 -_080CED6C: .4byte gBattleAnimPlayerMonIndex +_080CED6C: .4byte gBattleAnimBankAttacker _080CED70: .4byte gBattleAnimArgs _080CED74: .4byte sub_80CED78 thumb_func_end sub_80CECE8 @@ -9316,7 +9316,7 @@ _080CEE10: .4byte gBattleAnimArgs _080CEE14: ldr r6, _080CEE50 @ =0x0000fff0 _080CEE16: - ldr r4, _080CEE54 @ =gBattleAnimPlayerMonIndex + ldr r4, _080CEE54 @ =gBattleAnimBankAttacker ldrb r0, [r4] movs r1, 0x2 bl sub_8077ABC @@ -9337,13 +9337,13 @@ _080CEE16: str r0, [r5, 0x1C] ldr r1, _080CEE5C @ =move_anim_8072740 adds r0, r5, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 pop {r4-r6} pop {r0} bx r0 .align 2, 0 _080CEE50: .4byte 0x0000fff0 -_080CEE54: .4byte gBattleAnimPlayerMonIndex +_080CEE54: .4byte gBattleAnimBankAttacker _080CEE58: .4byte sub_80782D8 _080CEE5C: .4byte move_anim_8072740 thumb_func_end sub_80CEDF0 @@ -9519,13 +9519,13 @@ sub_80CEF9C: @ 80CEF9C ldrsh r0, [r0, r1] cmp r0, 0 bne _080CEFB8 - ldr r0, _080CEFB4 @ =gBattleAnimPlayerMonIndex + ldr r0, _080CEFB4 @ =gBattleAnimBankAttacker b _080CEFBA .align 2, 0 _080CEFB0: .4byte gBattleAnimArgs -_080CEFB4: .4byte gBattleAnimPlayerMonIndex +_080CEFB4: .4byte gBattleAnimBankAttacker _080CEFB8: - ldr r0, _080CEFF8 @ =gBattleAnimEnemyMonIndex + ldr r0, _080CEFF8 @ =gBattleAnimBankTarget _080CEFBA: ldrb r4, [r0] adds r0, r4, 0 @@ -9547,14 +9547,14 @@ _080CEFBA: bl StartSpriteAnim ldr r1, _080CF000 @ =sub_80CF008 adds r0, r5, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 ldr r0, _080CF004 @ =sub_8078600 str r0, [r5, 0x1C] pop {r4,r5} pop {r0} bx r0 .align 2, 0 -_080CEFF8: .4byte gBattleAnimEnemyMonIndex +_080CEFF8: .4byte gBattleAnimBankTarget _080CEFFC: .4byte gBattleAnimArgs _080CF000: .4byte sub_80CF008 _080CF004: .4byte sub_8078600 @@ -9572,7 +9572,7 @@ sub_80CF008: @ 80CF008 bne _080CF030 ldr r1, _080CF038 @ =move_anim_8072740 adds r0, r4, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 ldrh r1, [r4, 0x30] lsls r1, 24 lsrs r1, 24 @@ -9598,13 +9598,13 @@ sub_80CF040: @ 80CF040 ldrsh r0, [r0, r1] cmp r0, 0 bne _080CF05C - ldr r0, _080CF058 @ =gBattleAnimPlayerMonIndex + ldr r0, _080CF058 @ =gBattleAnimBankAttacker b _080CF05E .align 2, 0 _080CF054: .4byte gBattleAnimArgs -_080CF058: .4byte gBattleAnimPlayerMonIndex +_080CF058: .4byte gBattleAnimBankAttacker _080CF05C: - ldr r0, _080CF07C @ =gBattleAnimEnemyMonIndex + ldr r0, _080CF07C @ =gBattleAnimBankTarget _080CF05E: ldrb r0, [r0] adds r1, r4, 0 @@ -9613,14 +9613,14 @@ _080CF05E: strh r0, [r4, 0x2E] ldr r1, _080CF080 @ =sub_80CF088 adds r0, r4, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 ldr r0, _080CF084 @ =sub_80785E4 str r0, [r4, 0x1C] pop {r4} pop {r0} bx r0 .align 2, 0 -_080CF07C: .4byte gBattleAnimEnemyMonIndex +_080CF07C: .4byte gBattleAnimBankTarget _080CF080: .4byte sub_80CF088 _080CF084: .4byte sub_80785E4 thumb_func_end sub_80CF040 @@ -9641,7 +9641,7 @@ sub_80CF088: @ 80CF088 bl StartSpriteAffineAnim ldr r1, _080CF0B4 @ =move_anim_8074EE0 adds r0, r4, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 ldr r0, _080CF0B8 @ =sub_80785E4 str r0, [r4, 0x1C] _080CF0AE: @@ -9662,13 +9662,13 @@ sub_80CF0BC: @ 80CF0BC ldrsh r0, [r0, r1] cmp r0, 0 bne _080CF0D8 - ldr r0, _080CF0D4 @ =gBattleAnimPlayerMonIndex + ldr r0, _080CF0D4 @ =gBattleAnimBankAttacker b _080CF0DA .align 2, 0 _080CF0D0: .4byte gBattleAnimArgs -_080CF0D4: .4byte gBattleAnimPlayerMonIndex +_080CF0D4: .4byte gBattleAnimBankAttacker _080CF0D8: - ldr r0, _080CF12C @ =gBattleAnimEnemyMonIndex + ldr r0, _080CF12C @ =gBattleAnimBankTarget _080CF0DA: ldrb r5, [r0] adds r0, r5, 0 @@ -9702,14 +9702,14 @@ _080CF102: strh r6, [r4, 0x36] ldr r1, _080CF130 @ =sub_80CF138 adds r0, r4, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 ldr r0, _080CF134 @ =sub_80785E4 str r0, [r4, 0x1C] pop {r4-r6} pop {r0} bx r0 .align 2, 0 -_080CF12C: .4byte gBattleAnimEnemyMonIndex +_080CF12C: .4byte gBattleAnimBankTarget _080CF130: .4byte sub_80CF138 _080CF134: .4byte sub_80785E4 thumb_func_end sub_80CF0BC @@ -9808,13 +9808,13 @@ sub_80CF1C8: @ 80CF1C8 ldrsh r0, [r0, r1] cmp r0, 0 bne _080CF1E4 - ldr r0, _080CF1E0 @ =gBattleAnimPlayerMonIndex + ldr r0, _080CF1E0 @ =gBattleAnimBankAttacker b _080CF1E6 .align 2, 0 _080CF1DC: .4byte gBattleAnimArgs -_080CF1E0: .4byte gBattleAnimPlayerMonIndex +_080CF1E0: .4byte gBattleAnimBankAttacker _080CF1E4: - ldr r0, _080CF208 @ =gBattleAnimEnemyMonIndex + ldr r0, _080CF208 @ =gBattleAnimBankTarget _080CF1E6: ldrb r4, [r0] adds r0, r4, 0 @@ -9831,7 +9831,7 @@ _080CF1E6: movs r0, 0x2 b _080CF216 .align 2, 0 -_080CF208: .4byte gBattleAnimEnemyMonIndex +_080CF208: .4byte gBattleAnimBankTarget _080CF20C: adds r0, r5, 0 movs r1, 0x1 @@ -9868,7 +9868,7 @@ sub_80CF228: @ 80CF228 bl StartSpriteAnim ldr r1, _080CF25C @ =sub_80CF264 adds r0, r4, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 ldr r0, _080CF260 @ =sub_8078600 str r0, [r4, 0x1C] _080CF256: @@ -9922,7 +9922,7 @@ sub_80CF280: @ 80CF280 strh r0, [r4, 0x36] ldr r1, _080CF2C8 @ =move_anim_8074EE0 adds r0, r4, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 ldr r1, _080CF2CC @ =sub_8078278 str r1, [r4, 0x1C] adds r0, r4, 0 @@ -9945,13 +9945,13 @@ sub_80CF2D0: @ 80CF2D0 ldrsh r0, [r0, r1] cmp r0, 0 bne _080CF2EC - ldr r0, _080CF2E8 @ =gBattleAnimPlayerMonIndex + ldr r0, _080CF2E8 @ =gBattleAnimBankAttacker b _080CF2EE .align 2, 0 _080CF2E4: .4byte gBattleAnimArgs -_080CF2E8: .4byte gBattleAnimPlayerMonIndex +_080CF2E8: .4byte gBattleAnimBankAttacker _080CF2EC: - ldr r0, _080CF308 @ =gBattleAnimEnemyMonIndex + ldr r0, _080CF308 @ =gBattleAnimBankTarget _080CF2EE: ldrb r0, [r0] adds r1, r4, 0 @@ -9965,7 +9965,7 @@ _080CF2EE: pop {r0} bx r0 .align 2, 0 -_080CF308: .4byte gBattleAnimEnemyMonIndex +_080CF308: .4byte gBattleAnimBankTarget _080CF30C: .4byte sub_80CF310 thumb_func_end sub_80CF2D0 @@ -10075,7 +10075,7 @@ _080CF3C0: .4byte gSprites sub_80CF3C4: @ 80CF3C4 push {r4-r6,lr} adds r5, r0, 0 - ldr r4, _080CF40C @ =gBattleAnimPlayerMonIndex + ldr r4, _080CF40C @ =gBattleAnimBankAttacker ldrb r0, [r4] movs r1, 0x2 bl sub_8077ABC @@ -10089,7 +10089,7 @@ sub_80CF3C4: @ 80CF3C4 lsrs r0, 24 strh r0, [r5, 0x22] ldr r1, _080CF410 @ =gObjectBankIDs - ldr r0, _080CF414 @ =gBattleAnimEnemyMonIndex + ldr r0, _080CF414 @ =gBattleAnimBankTarget ldrb r0, [r0] adds r0, r1 ldrb r6, [r0] @@ -10106,9 +10106,9 @@ sub_80CF3C4: @ 80CF3C4 adds r1, r0, 0 b _080CF426 .align 2, 0 -_080CF40C: .4byte gBattleAnimPlayerMonIndex +_080CF40C: .4byte gBattleAnimBankAttacker _080CF410: .4byte gObjectBankIDs -_080CF414: .4byte gBattleAnimEnemyMonIndex +_080CF414: .4byte gBattleAnimBankTarget _080CF418: .4byte gBattleAnimArgs _080CF41C: ldr r1, _080CF450 @ =gBattleAnimArgs @@ -10159,7 +10159,7 @@ sub_80CF458: @ 80CF458 str r0, [r4, 0x1C] ldr r1, _080CF48C @ =sub_80CF490 adds r0, r4, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 pop {r4} pop {r0} bx r0 @@ -10182,7 +10182,7 @@ sub_80CF490: @ 80CF490 ldr r1, _080CF4B0 @ =sub_8078B34 str r1, [r0, 0x1C] ldr r1, _080CF4B4 @ =sub_80CF4B8 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 pop {r0} bx r0 .align 2, 0 @@ -10217,7 +10217,7 @@ sub_80CF4D8: @ 80CF4D8 lsls r4, 24 lsrs r4, 24 ldr r1, _080CF504 @ =gObjectBankIDs - ldr r0, _080CF508 @ =gBattleAnimPlayerMonIndex + ldr r0, _080CF508 @ =gBattleAnimBankAttacker ldrb r0, [r0] adds r0, r1 ldrb r0, [r0] @@ -10235,7 +10235,7 @@ sub_80CF4D8: @ 80CF4D8 bx r0 .align 2, 0 _080CF504: .4byte gObjectBankIDs -_080CF508: .4byte gBattleAnimPlayerMonIndex +_080CF508: .4byte gBattleAnimBankAttacker _080CF50C: .4byte gTasks _080CF510: .4byte sub_80CF514 thumb_func_end sub_80CF4D8 @@ -10246,7 +10246,7 @@ sub_80CF514: @ 80CF514 lsls r0, 24 lsrs r5, r0, 24 ldr r1, _080CF544 @ =gObjectBankIDs - ldr r0, _080CF548 @ =gBattleAnimPlayerMonIndex + ldr r0, _080CF548 @ =gBattleAnimBankAttacker ldrb r0, [r0] adds r1, r0, r1 ldrb r4, [r1] @@ -10267,7 +10267,7 @@ sub_80CF514: @ 80CF514 b _080CF55E .align 2, 0 _080CF544: .4byte gObjectBankIDs -_080CF548: .4byte gBattleAnimPlayerMonIndex +_080CF548: .4byte gBattleAnimBankAttacker _080CF54C: .4byte gTasks _080CF550: ldr r2, _080CF590 @ =gTasks @@ -10382,7 +10382,7 @@ sub_80CF610: @ 80CF610 ldrh r1, [r4, 0x22] adds r0, r1 strh r0, [r4, 0x22] - ldr r0, _080CF65C @ =gBattleAnimPlayerMonIndex + ldr r0, _080CF65C @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -10404,7 +10404,7 @@ sub_80CF610: @ 80CF610 b _080CF674 .align 2, 0 _080CF658: .4byte gBattleAnimArgs -_080CF65C: .4byte gBattleAnimPlayerMonIndex +_080CF65C: .4byte gBattleAnimBankAttacker _080CF660: movs r1, 0x4 ldrsh r0, [r5, r1] @@ -10421,7 +10421,7 @@ _080CF674: str r0, [r4, 0x1C] ldr r1, _080CF68C @ =move_anim_8072740 adds r0, r4, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 pop {r4,r5} pop {r0} bx r0 @@ -10440,7 +10440,7 @@ sub_80CF690: @ 80CF690 str r0, [r4, 0x1C] ldr r1, _080CF6B0 @ =sub_80CF6B4 adds r0, r4, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 pop {r4} pop {r0} bx r0 @@ -10462,7 +10462,7 @@ sub_80CF6B4: @ 80CF6B4 ldr r1, _080CF6D4 @ =sub_8078B34 str r1, [r0, 0x1C] ldr r1, _080CF6D8 @ =move_anim_8072740 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 pop {r0} bx r0 .align 2, 0 @@ -10489,7 +10489,7 @@ sub_80CF6DC: @ 80CF6DC .align 2, 0 _080CF6FC: .4byte gBattleAnimArgs _080CF700: - ldr r0, _080CF7C8 @ =gBattleAnimPlayerMonIndex + ldr r0, _080CF7C8 @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -10509,7 +10509,7 @@ _080CF722: adds r0, r5, 0 movs r1, 0x1 bl sub_80787B0 - ldr r4, _080CF7D0 @ =gBattleAnimEnemyMonIndex + ldr r4, _080CF7D0 @ =gBattleAnimBankTarget ldrb r0, [r4] movs r1, 0x2 bl sub_8077ABC @@ -10575,7 +10575,7 @@ _080CF794: str r0, [r5, 0x1C] ldr r1, _080CF7DC @ =move_anim_8072740 adds r0, r5, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 add sp, 0x4 pop {r3} mov r8, r3 @@ -10583,9 +10583,9 @@ _080CF794: pop {r0} bx r0 .align 2, 0 -_080CF7C8: .4byte gBattleAnimPlayerMonIndex +_080CF7C8: .4byte gBattleAnimBankAttacker _080CF7CC: .4byte gBattleAnimArgs -_080CF7D0: .4byte gBattleAnimEnemyMonIndex +_080CF7D0: .4byte gBattleAnimBankTarget _080CF7D4: .4byte 0xffffa000 _080CF7D8: .4byte sub_8078B34 _080CF7DC: .4byte move_anim_8072740 @@ -11068,7 +11068,7 @@ _080CFB68: b _080CFBCA _080CFB70: ldr r1, _080CFBB4 @ =gBanksBySide - ldr r0, _080CFBB8 @ =gBattleAnimEnemyMonIndex + ldr r0, _080CFBB8 @ =gBattleAnimBankTarget ldrb r0, [r0] adds r0, r1 ldrb r1, [r0] @@ -11102,7 +11102,7 @@ _080CFB70: b _080CFBC8 .align 2, 0 _080CFBB4: .4byte gBanksBySide -_080CFBB8: .4byte gBattleAnimEnemyMonIndex +_080CFBB8: .4byte gBattleAnimBankTarget _080CFBBC: .4byte gTasks _080CFBC0: .4byte gBattleAnimArgs _080CFBC4: @@ -11111,7 +11111,7 @@ _080CFBC4: _080CFBC8: strh r0, [r2, 0x4] _080CFBCA: - ldr r5, _080CFC24 @ =gBattleAnimPlayerMonIndex + ldr r5, _080CFC24 @ =gBattleAnimBankAttacker ldrb r0, [r5] movs r1, 0 bl sub_8077ABC @@ -11137,11 +11137,11 @@ _080CFBCA: ands r0, r1 cmp r0, 0 beq _080CFC34 - ldr r4, _080CFC30 @ =gBattleAnimEnemyMonIndex + ldr r4, _080CFC30 @ =gBattleAnimBankTarget ldrb r1, [r4] movs r0, 0x2 eors r0, r1 - bl b_side_obj__get_some_boolean + bl IsAnimBankSpriteVisible lsls r0, 24 cmp r0, 0 beq _080CFC34 @@ -11152,13 +11152,13 @@ _080CFBCA: bl sub_807A3FC b _080CFC56 .align 2, 0 -_080CFC24: .4byte gBattleAnimPlayerMonIndex +_080CFC24: .4byte gBattleAnimBankAttacker _080CFC28: .4byte gTasks _080CFC2C: .4byte gBattleTypeFlags -_080CFC30: .4byte gBattleAnimEnemyMonIndex +_080CFC30: .4byte gBattleAnimBankTarget _080CFC34: mov r5, sp - ldr r4, _080CFC90 @ =gBattleAnimEnemyMonIndex + ldr r4, _080CFC90 @ =gBattleAnimBankTarget ldrb r0, [r4] movs r1, 0 bl sub_8077ABC @@ -11203,7 +11203,7 @@ _080CFC56: subs r0, r2, r1 b _080CFC9E .align 2, 0 -_080CFC90: .4byte gBattleAnimEnemyMonIndex +_080CFC90: .4byte gBattleAnimBankTarget _080CFC94: .4byte gTasks _080CFC98: .4byte gBattleAnimArgs _080CFC9C: @@ -11301,7 +11301,7 @@ _080CFD3C: asrs r0, 16 cmp r0, 0x3F ble _080CFDB4 - ldr r0, _080CFD84 @ =gBattleAnimEnemyMonIndex + ldr r0, _080CFD84 @ =gBattleAnimBankTarget ldrb r0, [r0] bl sub_8079E90 lsls r0, 24 @@ -11315,14 +11315,14 @@ _080CFD3C: .align 2, 0 _080CFD7C: .4byte gTasks _080CFD80: .4byte gBattleAnimArgs -_080CFD84: .4byte gBattleAnimEnemyMonIndex +_080CFD84: .4byte gBattleAnimBankTarget _080CFD88: .4byte 0x0000ffc0 _080CFD8C: lsls r0, r1, 16 asrs r0, 16 cmp r0, 0x3F ble _080CFDB4 - ldr r0, _080CFDAC @ =gBattleAnimEnemyMonIndex + ldr r0, _080CFDAC @ =gBattleAnimBankTarget ldrb r0, [r0] bl sub_8079E90 lsls r0, 24 @@ -11334,10 +11334,10 @@ _080CFD8C: adds r0, r1 b _080CFDC4 .align 2, 0 -_080CFDAC: .4byte gBattleAnimEnemyMonIndex +_080CFDAC: .4byte gBattleAnimBankTarget _080CFDB0: .4byte 0x0000ffc0 _080CFDB4: - ldr r0, _080CFDF0 @ =gBattleAnimEnemyMonIndex + ldr r0, _080CFDF0 @ =gBattleAnimBankTarget ldrb r0, [r0] bl sub_8079E90 lsls r0, 24 @@ -11369,7 +11369,7 @@ _080CFDDC: pop {r0} bx r0 .align 2, 0 -_080CFDF0: .4byte gBattleAnimEnemyMonIndex +_080CFDF0: .4byte gBattleAnimBankTarget _080CFDF4: .4byte gTasks _080CFDF8: .4byte sub_80CFA20 thumb_func_end sub_80CFB04 @@ -11466,7 +11466,7 @@ sub_80CFE9C: @ 80CFE9C adds r5, r0, 0 movs r1, 0x1 bl sub_80787B0 - ldr r4, _080CFF3C @ =gBattleAnimEnemyMonIndex + ldr r4, _080CFF3C @ =gBattleAnimBankTarget ldrb r0, [r4] movs r1, 0x2 bl sub_8077ABC @@ -11482,7 +11482,7 @@ sub_80CFE9C: @ 80CFE9C adds r0, r1 lsls r0, 16 lsrs r7, r0, 16 - ldr r0, _080CFF44 @ =gBattleAnimPlayerMonIndex + ldr r0, _080CFF44 @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -11530,15 +11530,15 @@ _080CFEE0: str r0, [r5, 0x1C] ldr r1, _080CFF4C @ =move_anim_8072740 adds r0, r5, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 add sp, 0x4 pop {r4-r7} pop {r0} bx r0 .align 2, 0 -_080CFF3C: .4byte gBattleAnimEnemyMonIndex +_080CFF3C: .4byte gBattleAnimBankTarget _080CFF40: .4byte gBattleAnimArgs -_080CFF44: .4byte gBattleAnimPlayerMonIndex +_080CFF44: .4byte gBattleAnimBankAttacker _080CFF48: .4byte sub_8078C00 _080CFF4C: .4byte move_anim_8072740 thumb_func_end sub_80CFE9C @@ -11568,7 +11568,7 @@ sub_80CFF68: @ 80CFF68 lsls r0, 16 asrs r0, 24 strh r0, [r4, 0x24] - ldr r0, _080CFFD4 @ =gBattleAnimPlayerMonIndex + ldr r0, _080CFFD4 @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -11613,7 +11613,7 @@ _080CFFCC: pop {r0} bx r0 .align 2, 0 -_080CFFD4: .4byte gBattleAnimPlayerMonIndex +_080CFFD4: .4byte gBattleAnimBankAttacker thumb_func_end sub_80CFF68 thumb_func_start sub_80CFFD8 @@ -11624,7 +11624,7 @@ sub_80CFFD8: @ 80CFFD8 bl sub_80787B0 movs r0, 0x14 strh r0, [r4, 0x2E] - ldr r5, _080D0024 @ =gBattleAnimEnemyMonIndex + ldr r5, _080D0024 @ =gBattleAnimBankTarget ldrb r0, [r5] movs r1, 0x2 bl sub_8077ABC @@ -11647,12 +11647,12 @@ sub_80CFFD8: @ 80CFFD8 strb r0, [r2] ldr r1, _080D002C @ =sub_80D0030 adds r0, r4, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 pop {r4,r5} pop {r0} bx r0 .align 2, 0 -_080D0024: .4byte gBattleAnimEnemyMonIndex +_080D0024: .4byte gBattleAnimBankTarget _080D0028: .4byte sub_8078B34 _080D002C: .4byte sub_80D0030 thumb_func_end sub_80CFFD8 @@ -11781,7 +11781,7 @@ sub_80D0118: @ 80D0118 adds r4, r0, 0 movs r1, 0 bl sub_80787B0 - ldr r0, _080D0168 @ =gBattleAnimPlayerMonIndex + ldr r0, _080D0168 @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -11806,7 +11806,7 @@ _080D0136: str r0, [r4, 0x1C] ldr r1, _080D0174 @ =move_anim_8072740 adds r0, r4, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 ldr r1, [r4, 0x1C] adds r0, r4, 0 bl _call_via_r1 @@ -11814,7 +11814,7 @@ _080D0136: pop {r0} bx r0 .align 2, 0 -_080D0168: .4byte gBattleAnimPlayerMonIndex +_080D0168: .4byte gBattleAnimBankAttacker _080D016C: .4byte gBattleAnimArgs _080D0170: .4byte sub_8078114 _080D0174: .4byte move_anim_8072740 @@ -11856,7 +11856,7 @@ _080D01A4: strh r0, [r5, 0x22] movs r0, 0x6 strh r0, [r5, 0x2E] - ldr r4, _080D0200 @ =gBattleAnimEnemyMonIndex + ldr r4, _080D0200 @ =gBattleAnimBankTarget ldrb r0, [r4] movs r1, 0x2 bl sub_8077ABC @@ -11875,7 +11875,7 @@ _080D01A4: str r0, [r5, 0x1C] ldr r1, _080D0208 @ =sub_80D020C adds r0, r5, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 pop {r3} mov r8, r3 pop {r4-r7} @@ -11885,7 +11885,7 @@ _080D01A4: _080D01F4: .4byte 0x0000ffe0 _080D01F8: .4byte 0x0000fff0 _080D01FC: .4byte gBattleAnimArgs -_080D0200: .4byte gBattleAnimEnemyMonIndex +_080D0200: .4byte gBattleAnimBankTarget _080D0204: .4byte sub_8078B34 _080D0208: .4byte sub_80D020C thumb_func_end sub_80D0178 @@ -11949,7 +11949,7 @@ _080D025C: movs r0, 0x6 strh r0, [r5, 0x2E] strh r1, [r5, 0x30] - ldr r4, _080D02C8 @ =gBattleAnimEnemyMonIndex + ldr r4, _080D02C8 @ =gBattleAnimBankTarget ldrb r0, [r4] movs r1, 0x2 bl sub_8077ABC @@ -11984,7 +11984,7 @@ _080D025C: _080D02BC: .4byte 0x0000ffe0 _080D02C0: .4byte 0x0000fff0 _080D02C4: .4byte gBattleAnimArgs -_080D02C8: .4byte gBattleAnimEnemyMonIndex +_080D02C8: .4byte gBattleAnimBankTarget _080D02CC: .4byte sub_80D02D0 thumb_func_end sub_80D0228 @@ -12125,7 +12125,7 @@ sub_80D03C4: @ 80D03C4 lsls r5, 24 lsrs r5, 24 movs r0, 0x1 - bl obj_id_for_side_relative_to_move + bl GetAnimBankSpriteId adds r4, r0, 0 lsls r4, 24 lsrs r4, 24 @@ -12185,7 +12185,7 @@ sub_80D0428: @ 80D0428 cmp r1, r0 bne _080D0478 movs r0, 0x1 - bl obj_id_for_side_relative_to_move + bl GetAnimBankSpriteId adds r4, r0, 0 lsls r4, 24 lsrs r4, 24 @@ -12223,7 +12223,7 @@ sub_80D0488: @ 80D0488 ldr r0, _080D04D4 @ =gTasks adds r4, r0 movs r0, 0 - bl obj_id_for_side_relative_to_move + bl GetAnimBankSpriteId lsls r0, 24 lsrs r0, 24 movs r5, 0 @@ -12238,7 +12238,7 @@ sub_80D0488: @ 80D0488 strh r0, [r4, 0x10] strh r5, [r4, 0x12] strh r5, [r4, 0x14] - ldr r0, _080D04D8 @ =gBattleAnimPlayerMonIndex + ldr r0, _080D04D8 @ =gBattleAnimBankAttacker ldrb r0, [r0] bl sub_8079E90 lsls r0, 24 @@ -12251,7 +12251,7 @@ sub_80D0488: @ 80D0488 bx r0 .align 2, 0 _080D04D4: .4byte gTasks -_080D04D8: .4byte gBattleAnimPlayerMonIndex +_080D04D8: .4byte gBattleAnimBankAttacker _080D04DC: .4byte sub_80D04E0 thumb_func_end sub_80D0488 @@ -12593,7 +12593,7 @@ _080D0770: .4byte gTasks _080D0774: .4byte gBattleAnimArgs _080D0778: ldrb r0, [r5] - bl obj_id_for_side_relative_to_move + bl GetAnimBankSpriteId adds r1, r0, 0 lsls r1, 24 lsrs r1, 24 @@ -12775,7 +12775,7 @@ sub_80D08C8: @ 80D08C8 ldr r0, _080D08F8 @ =gTasks adds r4, r0 movs r0, 0 - bl obj_id_for_side_relative_to_move + bl GetAnimBankSpriteId adds r1, r0, 0 lsls r1, 24 lsrs r1, 24 @@ -12821,7 +12821,7 @@ _080D092C: .4byte gTasks sub_80D0930: @ 80D0930 push {r4,r5,lr} adds r4, r0, 0 - ldr r5, _080D0960 @ =gBattleAnimPlayerMonIndex + ldr r5, _080D0960 @ =gBattleAnimBankAttacker ldrb r0, [r5] bl GetBankSide lsls r0, 24 @@ -12840,7 +12840,7 @@ sub_80D0930: @ 80D0930 movs r0, 0x40 b _080D097E .align 2, 0 -_080D0960: .4byte gBattleAnimPlayerMonIndex +_080D0960: .4byte gBattleAnimBankAttacker _080D0964: adds r0, r4, 0 movs r1, 0x1 @@ -12855,7 +12855,7 @@ _080D0964: ldr r0, _080D09B0 @ =0x0000ffc0 _080D097E: strh r0, [r4, 0x30] - ldr r0, _080D09B4 @ =gBattleAnimPlayerMonIndex + ldr r0, _080D09B4 @ =gBattleAnimBankAttacker ldrb r0, [r0] movs r1, 0x3 bl sub_8077ABC @@ -12870,7 +12870,7 @@ _080D097E: strh r1, [r4, 0x36] ldr r1, _080D09B8 @ =move_anim_8072740 adds r0, r4, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 ldr r0, _080D09BC @ =sub_8078394 str r0, [r4, 0x1C] pop {r4,r5} @@ -12878,7 +12878,7 @@ _080D097E: bx r0 .align 2, 0 _080D09B0: .4byte 0x0000ffc0 -_080D09B4: .4byte gBattleAnimPlayerMonIndex +_080D09B4: .4byte gBattleAnimBankAttacker _080D09B8: .4byte move_anim_8072740 _080D09BC: .4byte sub_8078394 thumb_func_end sub_80D0930 @@ -12892,13 +12892,13 @@ sub_80D09C0: @ 80D09C0 ldrsh r0, [r0, r1] cmp r0, 0 bne _080D09DC - ldr r0, _080D09D8 @ =gBattleAnimPlayerMonIndex + ldr r0, _080D09D8 @ =gBattleAnimBankAttacker b _080D09DE .align 2, 0 _080D09D4: .4byte gBattleAnimArgs -_080D09D8: .4byte gBattleAnimPlayerMonIndex +_080D09D8: .4byte gBattleAnimBankAttacker _080D09DC: - ldr r0, _080D0A3C @ =gBattleAnimEnemyMonIndex + ldr r0, _080D0A3C @ =gBattleAnimBankTarget _080D09DE: ldrb r5, [r0] adds r0, r5, 0 @@ -12939,14 +12939,14 @@ _080D09F8: _080D0A2A: ldr r1, _080D0A44 @ =move_anim_8074EE0 adds r0, r6, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 ldr r0, _080D0A48 @ =sub_80785E4 str r0, [r6, 0x1C] pop {r4-r6} pop {r0} bx r0 .align 2, 0 -_080D0A3C: .4byte gBattleAnimEnemyMonIndex +_080D0A3C: .4byte gBattleAnimBankTarget _080D0A40: .4byte gBattleAnimArgs _080D0A44: .4byte move_anim_8074EE0 _080D0A48: .4byte sub_80785E4 @@ -12963,7 +12963,7 @@ sub_80D0A4C: @ 80D0A4C ldr r0, _080D0A80 @ =gTasks adds r4, r0 movs r0, 0 - bl obj_id_for_side_relative_to_move + bl GetAnimBankSpriteId adds r1, r0, 0 lsls r1, 24 lsrs r1, 24 @@ -13019,7 +13019,7 @@ sub_80D0AB8: @ 80D0AB8 ldr r0, _080D0B2C @ =gTasks adds r4, r1, r0 movs r0, 0 - bl obj_id_for_side_relative_to_move + bl GetAnimBankSpriteId lsls r0, 24 lsrs r0, 24 movs r2, 0 @@ -13050,7 +13050,7 @@ sub_80D0AB8: @ 80D0AB8 strh r2, [r4, 0x18] movs r0, 0x2 strh r0, [r4, 0x1A] - ldr r0, _080D0B34 @ =gBattleAnimPlayerMonIndex + ldr r0, _080D0B34 @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -13070,7 +13070,7 @@ _080D0B22: .align 2, 0 _080D0B2C: .4byte gTasks _080D0B30: .4byte gSprites -_080D0B34: .4byte gBattleAnimPlayerMonIndex +_080D0B34: .4byte gBattleAnimBankAttacker _080D0B38: .4byte sub_80D0B3C thumb_func_end sub_80D0AB8 @@ -13260,7 +13260,7 @@ sub_80D0C88: @ 80D0C88 lsls r1, 3 ldr r0, _080D0CD8 @ =gTasks adds r5, r1, r0 - ldr r4, _080D0CDC @ =gBattleAnimEnemyMonIndex + ldr r4, _080D0CDC @ =gBattleAnimBankTarget ldrb r0, [r4] bl sub_8077FC0 lsls r0, 24 @@ -13290,7 +13290,7 @@ sub_80D0C88: @ 80D0C88 b _080D0CF0 .align 2, 0 _080D0CD8: .4byte gTasks -_080D0CDC: .4byte gBattleAnimEnemyMonIndex +_080D0CDC: .4byte gBattleAnimBankTarget _080D0CE0: .4byte gUnknown_030042C0 _080D0CE4: .4byte REG_BG1HOFS _080D0CE8: @@ -13472,7 +13472,7 @@ _080D0E2C: .4byte gUnknown_03004DC0 sub_80D0E30: @ 80D0E30 push {r4-r6,lr} adds r4, r0, 0 - ldr r6, _080D0E84 @ =gBattleAnimEnemyMonIndex + ldr r6, _080D0E84 @ =gBattleAnimBankTarget ldrb r0, [r6] movs r1, 0 bl sub_8077ABC @@ -13509,7 +13509,7 @@ sub_80D0E30: @ 80D0E30 pop {r0} bx r0 .align 2, 0 -_080D0E84: .4byte gBattleAnimEnemyMonIndex +_080D0E84: .4byte gBattleAnimBankTarget _080D0E88: .4byte sub_80D0E8C thumb_func_end sub_80D0E30 @@ -13709,13 +13709,13 @@ sub_80D0FD8: @ 80D0FD8 adds r1, r0, 0 cmp r2, 0 bne _080D1004 - ldr r0, _080D1000 @ =gBattleAnimPlayerMonIndex + ldr r0, _080D1000 @ =gBattleAnimBankAttacker b _080D1006 .align 2, 0 _080D0FFC: .4byte gBattleAnimArgs -_080D1000: .4byte gBattleAnimPlayerMonIndex +_080D1000: .4byte gBattleAnimBankAttacker _080D1004: - ldr r0, _080D1040 @ =gBattleAnimEnemyMonIndex + ldr r0, _080D1040 @ =gBattleAnimBankTarget _080D1006: ldrb r5, [r0] ldrb r1, [r1, 0x6] @@ -13729,7 +13729,7 @@ _080D1006: movs r1, 0x2 adds r0, r5, 0 eors r0, r1 - bl b_side_obj__get_some_boolean + bl IsAnimBankSpriteVisible lsls r0, 24 cmp r0, 0 beq _080D107E @@ -13744,7 +13744,7 @@ _080D1006: movs r1, 0 b _080D1048 .align 2, 0 -_080D1040: .4byte gBattleAnimEnemyMonIndex +_080D1040: .4byte gBattleAnimBankTarget _080D1044: adds r0, r5, 0 movs r1, 0x2 @@ -13826,18 +13826,18 @@ sub_80D10B8: @ 80D10B8 ldrsh r0, [r0, r2] cmp r0, 0 bne _080D10F0 - ldr r0, _080D10E8 @ =gBattleAnimPlayerMonIndex + ldr r0, _080D10E8 @ =gBattleAnimBankAttacker ldrb r7, [r0] - ldr r0, _080D10EC @ =gBattleAnimEnemyMonIndex + ldr r0, _080D10EC @ =gBattleAnimBankTarget b _080D10F6 .align 2, 0 _080D10E4: .4byte gBattleAnimArgs -_080D10E8: .4byte gBattleAnimPlayerMonIndex -_080D10EC: .4byte gBattleAnimEnemyMonIndex +_080D10E8: .4byte gBattleAnimBankAttacker +_080D10EC: .4byte gBattleAnimBankTarget _080D10F0: - ldr r0, _080D1110 @ =gBattleAnimEnemyMonIndex + ldr r0, _080D1110 @ =gBattleAnimBankTarget ldrb r7, [r0] - ldr r0, _080D1114 @ =gBattleAnimPlayerMonIndex + ldr r0, _080D1114 @ =gBattleAnimBankAttacker _080D10F6: ldrb r0, [r0] mov r8, r0 @@ -13852,8 +13852,8 @@ _080D10F6: str r1, [sp, 0x4] b _080D1124 .align 2, 0 -_080D1110: .4byte gBattleAnimEnemyMonIndex -_080D1114: .4byte gBattleAnimPlayerMonIndex +_080D1110: .4byte gBattleAnimBankTarget +_080D1114: .4byte gBattleAnimBankAttacker _080D1118: .4byte gBattleAnimArgs _080D111C: movs r2, 0x2 @@ -13881,7 +13881,7 @@ _080D1124: mov r4, r8 eors r4, r0 adds r0, r4, 0 - bl b_side_obj__get_some_boolean + bl IsAnimBankSpriteVisible lsls r0, 24 cmp r0, 0 beq _080D1170 @@ -13925,7 +13925,7 @@ _080D1180: movs r0, 0x2 eors r4, r0 adds r0, r4, 0 - bl b_side_obj__get_some_boolean + bl IsAnimBankSpriteVisible lsls r0, 24 cmp r0, 0 beq _080D1204 @@ -14002,7 +14002,7 @@ _080D121A: mov r0, r8 movs r1, 0x2 eors r0, r1 - bl b_side_obj__get_some_boolean + bl IsAnimBankSpriteVisible lsls r0, 24 cmp r0, 0 beq _080D127C @@ -14139,7 +14139,7 @@ sub_80D1368: @ 80D1368 adds r4, r0, 0 movs r1, 0 bl sub_80787B0 - ldr r0, _080D139C @ =gBattleAnimPlayerMonIndex + ldr r0, _080D139C @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -14161,7 +14161,7 @@ _080D1384: pop {r0} bx r0 .align 2, 0 -_080D139C: .4byte gBattleAnimPlayerMonIndex +_080D139C: .4byte gBattleAnimBankAttacker _080D13A0: .4byte 0x0000ff60 _080D13A4: .4byte gBattleAnimArgs _080D13A8: .4byte sub_80D13AC @@ -14184,7 +14184,7 @@ sub_80D13AC: @ 80D13AC strh r0, [r4, 0x24] subs r2, 0x20 strh r2, [r4, 0x2E] - ldr r0, _080D1418 @ =gBattleAnimPlayerMonIndex + ldr r0, _080D1418 @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -14223,7 +14223,7 @@ _080D1410: pop {r0} bx r0 .align 2, 0 -_080D1418: .4byte gBattleAnimPlayerMonIndex +_080D1418: .4byte gBattleAnimBankAttacker _080D141C: .4byte 0x0000ff60 _080D1420: .4byte sub_80D1424 thumb_func_end sub_80D13AC @@ -14449,7 +14449,7 @@ sub_80D15A4: @ 80D15A4 ldr r0, _080D15D4 @ =gTasks adds r4, r0 movs r0, 0 - bl obj_id_for_side_relative_to_move + bl GetAnimBankSpriteId adds r1, r0, 0 lsls r1, 24 lsrs r1, 24 @@ -14531,7 +14531,7 @@ sub_80D1638: @ 80D1638 strh r0, [r4, 0xE] movs r0, 0x3 strh r0, [r4, 0x20] - ldr r0, _080D1670 @ =gBattleAnimEnemyMonIndex + ldr r0, _080D1670 @ =gBattleAnimBankTarget ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -14543,7 +14543,7 @@ sub_80D1638: @ 80D1638 b _080D167E .align 2, 0 _080D166C: .4byte gTasks -_080D1670: .4byte gBattleAnimEnemyMonIndex +_080D1670: .4byte gBattleAnimBankTarget _080D1674: .4byte 0x0000ffff _080D1678: movs r0, 0x1 @@ -14552,7 +14552,7 @@ _080D1678: _080D167E: strh r0, [r4, 0x24] movs r0, 0x1 - bl obj_id_for_side_relative_to_move + bl GetAnimBankSpriteId lsls r0, 24 lsrs r0, 24 strh r0, [r4, 0x26] @@ -14745,7 +14745,7 @@ sub_80D17C4: @ 80D17C4 movs r0, 0x2 strh r0, [r4, 0x24] movs r0, 0 - bl obj_id_for_side_relative_to_move + bl GetAnimBankSpriteId lsls r0, 24 lsrs r0, 24 strh r0, [r4, 0x26] @@ -14888,7 +14888,7 @@ sub_80D18D4: @ 80D18D4 strh r0, [r4, 0x16] strh r0, [r4, 0x18] strh r0, [r4, 0x22] - ldr r5, _080D1928 @ =gBattleAnimPlayerMonIndex + ldr r5, _080D1928 @ =gBattleAnimBankAttacker ldrb r0, [r5] movs r1, 0 bl sub_8077ABC @@ -14908,7 +14908,7 @@ sub_80D18D4: @ 80D18D4 bx r0 .align 2, 0 _080D1924: .4byte gTasks -_080D1928: .4byte gBattleAnimPlayerMonIndex +_080D1928: .4byte gBattleAnimBankAttacker _080D192C: .4byte sub_80D1930 thumb_func_end sub_80D18D4 @@ -15171,7 +15171,7 @@ _080D1AF4: adds r1, r0 _080D1B1C: adds r0, r4, 0 - bl sub_800D238 + bl LZDecompressWram movs r5, 0 _080D1B24: lsls r4, r5, 5 @@ -15293,7 +15293,7 @@ sub_80D1C08: @ 80D1C08 adds r5, r0, 0 movs r1, 0 bl sub_80787B0 - ldr r6, _080D1C70 @ =gBattleAnimPlayerMonIndex + ldr r6, _080D1C70 @ =gBattleAnimBankAttacker ldrb r0, [r6] bl GetBankSide lsls r0, 24 @@ -15327,7 +15327,7 @@ _080D1C28: str r0, [r5, 0x1C] ldr r1, _080D1C7C @ =move_anim_8072740 adds r0, r5, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 ldrb r1, [r4, 0xA] ldrb r2, [r4, 0xC] adds r0, r5, 0 @@ -15336,7 +15336,7 @@ _080D1C28: pop {r0} bx r0 .align 2, 0 -_080D1C70: .4byte gBattleAnimPlayerMonIndex +_080D1C70: .4byte gBattleAnimBankAttacker _080D1C74: .4byte gBattleAnimArgs _080D1C78: .4byte sub_8078B34 _080D1C7C: .4byte move_anim_8072740 @@ -15569,7 +15569,7 @@ sub_80D1E38: @ 80D1E38 lsrs r0, 24 adds r6, r0, 0 movs r0, 0x1 - bl obj_id_for_side_relative_to_move + bl GetAnimBankSpriteId lsls r0, 24 lsrs r4, r0, 24 ldr r1, _080D1E88 @ =gTasks @@ -15585,7 +15585,7 @@ sub_80D1E38: @ 80D1E38 cmp r0, 0x1 bne _080D1E94 movs r0, 0x1 - bl obj_id_for_side_relative_to_move + bl GetAnimBankSpriteId adds r1, r0, 0 lsls r1, 24 lsrs r1, 24 @@ -15638,7 +15638,7 @@ sub_80D1EC8: @ 80D1EC8 lsrs r0, 24 adds r6, r0, 0 movs r0, 0 - bl obj_id_for_side_relative_to_move + bl GetAnimBankSpriteId lsls r0, 24 lsrs r4, r0, 24 ldr r1, _080D1F18 @ =gTasks @@ -15654,7 +15654,7 @@ sub_80D1EC8: @ 80D1EC8 cmp r0, 0x1 bne _080D1F24 movs r0, 0 - bl obj_id_for_side_relative_to_move + bl GetAnimBankSpriteId adds r1, r0, 0 lsls r1, 24 lsrs r1, 24 @@ -15710,7 +15710,7 @@ sub_80D1F58: @ 80D1F58 strh r0, [r4, 0x2E] ldrh r0, [r4, 0x20] strh r0, [r4, 0x30] - ldr r5, _080D1F9C @ =gBattleAnimEnemyMonIndex + ldr r5, _080D1F9C @ =gBattleAnimBankTarget ldrb r0, [r5] movs r1, 0x2 bl sub_8077ABC @@ -15733,7 +15733,7 @@ sub_80D1F58: @ 80D1F58 pop {r0} bx r0 .align 2, 0 -_080D1F9C: .4byte gBattleAnimEnemyMonIndex +_080D1F9C: .4byte gBattleAnimBankTarget _080D1FA0: .4byte sub_80D1FA4 thumb_func_end sub_80D1F58 @@ -15853,7 +15853,7 @@ sub_80D2064: @ 80D2064 ldr r1, _080D208C @ =sub_80782D8 str r1, [r0, 0x1C] ldr r1, _080D2090 @ =sub_80D2094 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 pop {r0} bx r0 .align 2, 0 @@ -16330,7 +16330,7 @@ _080D2450: .4byte 0x040000d4 _080D2454: .4byte 0x85000400 _080D2458: .4byte gBattleAnimBackgroundTilemap_ScaryFaceContest _080D245C: - ldr r0, _080D2478 @ =gBattleAnimEnemyMonIndex + ldr r0, _080D2478 @ =gBattleAnimBankTarget ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -16343,7 +16343,7 @@ _080D246E: bl LZDecompressVram b _080D2488 .align 2, 0 -_080D2478: .4byte gBattleAnimEnemyMonIndex +_080D2478: .4byte gBattleAnimBankTarget _080D247C: .4byte gBattleAnimBackgroundTilemap_ScaryFacePlayer _080D2480: ldr r0, _080D24CC @ =gBattleAnimBackgroundTilemap_ScaryFaceOpponent @@ -16621,7 +16621,7 @@ _080D26A0: .4byte REG_BLDCNT sub_80D26A4: @ 80D26A4 push {r4,r5,lr} adds r4, r0, 0 - ldr r5, _080D26F8 @ =gBattleAnimPlayerMonIndex + ldr r5, _080D26F8 @ =gBattleAnimBankAttacker ldrb r0, [r5] movs r1, 0x2 bl sub_8077ABC @@ -16658,7 +16658,7 @@ sub_80D26A4: @ 80D26A4 pop {r0} bx r0 .align 2, 0 -_080D26F8: .4byte gBattleAnimPlayerMonIndex +_080D26F8: .4byte gBattleAnimBankAttacker _080D26FC: .4byte gBattleAnimArgs _080D2700: .4byte sub_80D2704 thumb_func_end sub_80D26A4 @@ -16779,7 +16779,7 @@ _080D27DC: .4byte 0x0000ffff sub_80D27E0: @ 80D27E0 push {r4,r5,lr} adds r5, r0, 0 - ldr r4, _080D2828 @ =gBattleAnimPlayerMonIndex + ldr r4, _080D2828 @ =gBattleAnimBankAttacker ldrb r0, [r4] movs r1, 0x2 bl sub_8077ABC @@ -16809,7 +16809,7 @@ sub_80D27E0: @ 80D27E0 pop {r0} bx r0 .align 2, 0 -_080D2828: .4byte gBattleAnimPlayerMonIndex +_080D2828: .4byte gBattleAnimBankAttacker _080D282C: .4byte gBattleAnimArgs _080D2830: .4byte sub_80D2834 thumb_func_end sub_80D27E0 @@ -16887,7 +16887,7 @@ _080D28A8: sub_80D28AC: @ 80D28AC push {r4,r5,lr} adds r5, r0, 0 - ldr r4, _080D28F8 @ =gBattleAnimPlayerMonIndex + ldr r4, _080D28F8 @ =gBattleAnimBankAttacker ldrb r0, [r4] movs r1, 0x2 bl sub_8077ABC @@ -16919,7 +16919,7 @@ sub_80D28AC: @ 80D28AC pop {r0} bx r0 .align 2, 0 -_080D28F8: .4byte gBattleAnimPlayerMonIndex +_080D28F8: .4byte gBattleAnimBankAttacker _080D28FC: .4byte gBattleAnimArgs _080D2900: .4byte sub_80D287C thumb_func_end sub_80D28AC @@ -17179,7 +17179,7 @@ sub_80D2ABC: @ 80D2ABC adds r0, r4, 0 movs r1, 0 bl StartSpriteAnim - ldr r0, _080D2BBC @ =gBattleAnimEnemyMonIndex + ldr r0, _080D2BBC @ =gBattleAnimBankTarget ldrb r0, [r0] bl sub_8079E90 subs r0, 0x1 @@ -17291,7 +17291,7 @@ _080D2B80: b _080D2BD2 .align 2, 0 _080D2BB8: .4byte gBattleAnimArgs -_080D2BBC: .4byte gBattleAnimEnemyMonIndex +_080D2BBC: .4byte gBattleAnimBankTarget _080D2BC0: .4byte 0x0000ffff _080D2BC4: adds r2, r4, 0 @@ -17375,12 +17375,12 @@ _080D2C54: ldrsh r0, [r1, r2] cmp r0, 0 bne _080D2C64 - ldr r4, _080D2C60 @ =gBattleAnimPlayerMonIndex + ldr r4, _080D2C60 @ =gBattleAnimBankAttacker b _080D2C66 .align 2, 0 -_080D2C60: .4byte gBattleAnimPlayerMonIndex +_080D2C60: .4byte gBattleAnimBankAttacker _080D2C64: - ldr r4, _080D2C94 @ =gBattleAnimEnemyMonIndex + ldr r4, _080D2C94 @ =gBattleAnimBankTarget _080D2C66: ldrb r0, [r4] movs r1, 0x2 @@ -17404,7 +17404,7 @@ _080D2C66: adds r0, 0x20 b _080D2CA0 .align 2, 0 -_080D2C94: .4byte gBattleAnimEnemyMonIndex +_080D2C94: .4byte gBattleAnimBankTarget _080D2C98: .4byte gBattleAnimArgs _080D2C9C: ldrh r0, [r5, 0x20] @@ -17467,7 +17467,7 @@ sub_80D2CF8: @ 80D2CF8 lsrs r5, 24 ldr r0, _080D2D2C @ =gBattleAnimArgs ldrb r0, [r0] - bl obj_id_for_side_relative_to_move + bl GetAnimBankSpriteId adds r1, r0, 0 lsls r1, 24 lsrs r1, 24 @@ -17524,13 +17524,13 @@ sub_80D2D68: @ 80D2D68 ldrsh r0, [r0, r1] cmp r0, 0 bne _080D2D84 - ldr r0, _080D2D80 @ =gBattleAnimPlayerMonIndex + ldr r0, _080D2D80 @ =gBattleAnimBankAttacker b _080D2D86 .align 2, 0 _080D2D7C: .4byte gBattleAnimArgs -_080D2D80: .4byte gBattleAnimPlayerMonIndex +_080D2D80: .4byte gBattleAnimBankAttacker _080D2D84: - ldr r0, _080D2E1C @ =gBattleAnimEnemyMonIndex + ldr r0, _080D2E1C @ =gBattleAnimBankTarget _080D2D86: ldrb r6, [r0] adds r0, r6, 0 @@ -17607,7 +17607,7 @@ _080D2DF0: pop {r0} bx r0 .align 2, 0 -_080D2E1C: .4byte gBattleAnimEnemyMonIndex +_080D2E1C: .4byte gBattleAnimBankTarget _080D2E20: .4byte gBattleAnimArgs _080D2E24: .4byte 0x000003ff _080D2E28: .4byte 0xfffffc00 @@ -17882,11 +17882,11 @@ sub_80D3014: @ 80D3014 ands r0, r1 cmp r0, 0 beq _080D3060 - ldr r4, _080D305C @ =gBattleAnimPlayerMonIndex + ldr r4, _080D305C @ =gBattleAnimBankAttacker ldrb r1, [r4] movs r0, 0x2 eors r0, r1 - bl b_side_obj__get_some_boolean + bl IsAnimBankSpriteVisible lsls r0, 24 cmp r0, 0 beq _080D3060 @@ -17906,9 +17906,9 @@ sub_80D3014: @ 80D3014 b _080D3080 .align 2, 0 _080D3058: .4byte gBattleTypeFlags -_080D305C: .4byte gBattleAnimPlayerMonIndex +_080D305C: .4byte gBattleAnimBankAttacker _080D3060: - ldr r4, _080D30A0 @ =gBattleAnimPlayerMonIndex + ldr r4, _080D30A0 @ =gBattleAnimBankAttacker ldrb r0, [r4] movs r1, 0 bl sub_8077ABC @@ -17934,12 +17934,12 @@ _080D3080: str r0, [r5, 0x1C] ldr r1, _080D30A8 @ =move_anim_8072740 adds r0, r5, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 pop {r4,r5} pop {r0} bx r0 .align 2, 0 -_080D30A0: .4byte gBattleAnimPlayerMonIndex +_080D30A0: .4byte gBattleAnimBankAttacker _080D30A4: .4byte sub_8078B34 _080D30A8: .4byte move_anim_8072740 thumb_func_end sub_80D3014 @@ -18099,7 +18099,7 @@ _080D31C2: sub_80D31C8: @ 80D31C8 push {r4-r6,lr} adds r6, r0, 0 - ldr r5, _080D31F0 @ =gBattleAnimPlayerMonIndex + ldr r5, _080D31F0 @ =gBattleAnimBankAttacker ldrb r0, [r5] bl GetBankSide lsls r0, 24 @@ -18115,7 +18115,7 @@ sub_80D31C8: @ 80D31C8 subs r0, r1 b _080D320A .align 2, 0 -_080D31F0: .4byte gBattleAnimPlayerMonIndex +_080D31F0: .4byte gBattleAnimBankAttacker _080D31F4: .4byte gBattleAnimArgs _080D31F8: ldrb r0, [r5] @@ -18142,7 +18142,7 @@ _080D320A: movs r1, 0x40 orrs r0, r1 strb r0, [r2] - ldr r0, _080D32D4 @ =gBattleAnimPlayerMonIndex + ldr r0, _080D32D4 @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -18158,7 +18158,7 @@ _080D3240: strh r0, [r6, 0x2E] ldrh r0, [r6, 0x20] strh r0, [r6, 0x30] - ldr r4, _080D32D8 @ =gBattleAnimEnemyMonIndex + ldr r4, _080D32D8 @ =gBattleAnimBankTarget ldrb r0, [r4] movs r1, 0x2 bl sub_8077ABC @@ -18220,8 +18220,8 @@ _080D3240: bx r0 .align 2, 0 _080D32D0: .4byte gBattleAnimArgs -_080D32D4: .4byte gBattleAnimPlayerMonIndex -_080D32D8: .4byte gBattleAnimEnemyMonIndex +_080D32D4: .4byte gBattleAnimBankAttacker +_080D32D8: .4byte gBattleAnimBankTarget _080D32DC: .4byte SpriteCallbackDummy _080D32E0: .4byte gSprites _080D32E4: .4byte sub_80D32E8 @@ -18309,7 +18309,7 @@ sub_80D3370: @ 80D3370 ldr r1, _080D3390 @ =sub_8078600 str r1, [r0, 0x1C] ldr r1, _080D3394 @ =sub_80D3398 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 pop {r0} bx r0 .align 2, 0 @@ -18325,7 +18325,7 @@ sub_80D3398: @ 80D3398 ldr r1, _080D33AC @ =sub_80782D8 str r1, [r0, 0x1C] ldr r1, _080D33B0 @ =move_anim_8074EE0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 pop {r0} bx r0 .align 2, 0 @@ -18339,7 +18339,7 @@ sub_80D33B4: @ 80D33B4 adds r5, r0, 0 movs r1, 0x1 bl sub_80787B0 - ldr r0, _080D33DC @ =gBattleAnimPlayerMonIndex + ldr r0, _080D33DC @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -18353,7 +18353,7 @@ sub_80D33B4: @ 80D33B4 adds r7, r1, 0 b _080D33EA .align 2, 0 -_080D33DC: .4byte gBattleAnimPlayerMonIndex +_080D33DC: .4byte gBattleAnimBankAttacker _080D33E0: .4byte gBattleAnimArgs _080D33E4: ldr r0, _080D3440 @ =gBattleAnimArgs @@ -18364,7 +18364,7 @@ _080D33EA: strh r0, [r5, 0x2E] ldrh r0, [r5, 0x20] strh r0, [r5, 0x30] - ldr r4, _080D3444 @ =gBattleAnimEnemyMonIndex + ldr r4, _080D3444 @ =gBattleAnimBankTarget ldrb r0, [r4] movs r1, 0x2 bl sub_8077ABC @@ -18400,7 +18400,7 @@ _080D33EA: bx r0 .align 2, 0 _080D3440: .4byte gBattleAnimArgs -_080D3444: .4byte gBattleAnimEnemyMonIndex +_080D3444: .4byte gBattleAnimBankTarget _080D3448: .4byte sub_80D344C thumb_func_end sub_80D33B4 @@ -18551,7 +18551,7 @@ sub_80D3554: @ 80D3554 strh r0, [r5, 0x2E] ldrh r0, [r5, 0x20] strh r0, [r5, 0x30] - ldr r4, _080D35BC @ =gBattleAnimEnemyMonIndex + ldr r4, _080D35BC @ =gBattleAnimBankTarget ldrb r0, [r4] movs r1, 0x2 bl sub_8077ABC @@ -18590,7 +18590,7 @@ sub_80D3554: @ 80D3554 strh r0, [r5, 0x3C] b _080D35C8 .align 2, 0 -_080D35BC: .4byte gBattleAnimEnemyMonIndex +_080D35BC: .4byte gBattleAnimBankTarget _080D35C0: .4byte gBattleAnimArgs _080D35C4: lsls r0, r1, 8 @@ -18711,7 +18711,7 @@ _080D3694: .4byte gTasks sub_80D3698: @ 80D3698 push {r4-r7,lr} adds r4, r0, 0 - ldr r7, _080D36E4 @ =gBattleAnimPlayerMonIndex + ldr r7, _080D36E4 @ =gBattleAnimBankAttacker ldrb r0, [r7] movs r1, 0 bl sub_8077ABC @@ -18743,7 +18743,7 @@ sub_80D3698: @ 80D3698 strh r0, [r4, 0x24] b _080D36F4 .align 2, 0 -_080D36E4: .4byte gBattleAnimPlayerMonIndex +_080D36E4: .4byte gBattleAnimBankAttacker _080D36E8: .4byte 0x0000fff6 _080D36EC: strh r6, [r4, 0x24] @@ -18787,11 +18787,11 @@ _080D3722: sub_80D3728: @ 80D3728 push {r4-r7,lr} adds r6, r0, 0 - ldr r5, _080D37E8 @ =gBattleAnimPlayerMonIndex + ldr r5, _080D37E8 @ =gBattleAnimBankAttacker ldrb r0, [r5] bl GetBankSide adds r4, r0, 0 - ldr r0, _080D37EC @ =gBattleAnimEnemyMonIndex + ldr r0, _080D37EC @ =gBattleAnimBankTarget ldrb r0, [r0] bl GetBankSide lsls r4, 24 @@ -18839,7 +18839,7 @@ _080D3786: _080D3790: adds r0, r6, 0 bl sub_80787B0 - ldr r0, _080D37E8 @ =gBattleAnimPlayerMonIndex + ldr r0, _080D37E8 @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -18851,7 +18851,7 @@ _080D3790: _080D37AA: ldrh r0, [r5, 0x8] strh r0, [r6, 0x2E] - ldr r4, _080D37EC @ =gBattleAnimEnemyMonIndex + ldr r4, _080D37EC @ =gBattleAnimBankTarget ldrb r0, [r4] movs r1, 0x2 bl sub_8077ABC @@ -18872,13 +18872,13 @@ _080D37AA: str r0, [r6, 0x1C] ldr r1, _080D37F8 @ =move_anim_8072740 adds r0, r6, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 pop {r4-r7} pop {r0} bx r0 .align 2, 0 -_080D37E8: .4byte gBattleAnimPlayerMonIndex -_080D37EC: .4byte gBattleAnimEnemyMonIndex +_080D37E8: .4byte gBattleAnimBankAttacker +_080D37EC: .4byte gBattleAnimBankTarget _080D37F0: .4byte gBattleAnimArgs _080D37F4: .4byte sub_8078B34 _080D37F8: .4byte move_anim_8072740 @@ -18904,7 +18904,7 @@ sub_80D37FC: @ 80D37FC str r0, [r4, 0x1C] ldr r1, _080D3834 @ =move_anim_8072740 adds r0, r4, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 pop {r4} pop {r0} bx r0 @@ -19080,7 +19080,7 @@ _080D3920: movs r1, 0x4 orrs r0, r1 strb r0, [r2] - ldr r0, _080D39A0 @ =gBattleAnimPlayerMonIndex + ldr r0, _080D39A0 @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -19095,7 +19095,7 @@ _080D3990: .4byte 0x00003f42 _080D3994: .4byte REG_BG1CNT _080D3998: .4byte 0x040000d4 _080D399C: .4byte 0x85000400 -_080D39A0: .4byte gBattleAnimPlayerMonIndex +_080D39A0: .4byte gBattleAnimBankAttacker _080D39A4: .4byte gUnknown_08E70968 _080D39A8: ldr r0, _080D39B4 @ =gUnknown_08E70C38 @@ -19203,7 +19203,7 @@ _080D3A88: .4byte gUnknown_030042C0 _080D3A8C: .4byte 0x0000ffd0 _080D3A90: .4byte gUnknown_030041B4 _080D3A94: - ldr r0, _080D3AC4 @ =gBattleAnimPlayerMonIndex + ldr r0, _080D3AC4 @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -19226,7 +19226,7 @@ _080D3A94: strh r1, [r7, 0xE] b _080D3AEE .align 2, 0 -_080D3AC4: .4byte gBattleAnimPlayerMonIndex +_080D3AC4: .4byte gBattleAnimBankAttacker _080D3AC8: .4byte 0x0000ff20 _080D3ACC: .4byte gUnknown_030042C0 _080D3AD0: .4byte gUnknown_030041B4 @@ -20048,7 +20048,7 @@ sub_80D40F4: @ 80D40F4 ldr r0, _080D4144 @ =gTasks adds r4, r0 movs r0, 0 - bl obj_id_for_side_relative_to_move + bl GetAnimBankSpriteId lsls r0, 24 lsrs r0, 24 strh r0, [r4, 0x26] @@ -20374,7 +20374,7 @@ _080D438A: thumb_func_start sub_80D4394 sub_80D4394: @ 80D4394 push {r4,r5,lr} - ldr r4, _080D43B8 @ =gBattleAnimPlayerMonIndex + ldr r4, _080D43B8 @ =gBattleAnimBankAttacker ldrb r0, [r4] bl GetBankSide lsls r0, 24 @@ -20390,7 +20390,7 @@ sub_80D4394: @ 80D4394 ldr r0, _080D43C0 @ =gPlayerParty b _080D43D8 .align 2, 0 -_080D43B8: .4byte gBattleAnimPlayerMonIndex +_080D43B8: .4byte gBattleAnimBankAttacker _080D43BC: .4byte gBattlePartyID _080D43C0: .4byte gPlayerParty _080D43C4: @@ -20451,7 +20451,7 @@ sub_80D4418: @ 80D4418 lsls r1, 24 lsrs r1, 24 str r1, [sp] - ldr r4, _080D4520 @ =gBattleAnimPlayerMonIndex + ldr r4, _080D4520 @ =gBattleAnimBankAttacker ldrb r0, [r4] movs r1, 0x2 bl sub_8077ABC @@ -20571,7 +20571,7 @@ _080D44EA: pop {r0} bx r0 .align 2, 0 -_080D4520: .4byte gBattleAnimPlayerMonIndex +_080D4520: .4byte gBattleAnimBankAttacker _080D4524: .4byte gSpriteTemplate_83D9378 _080D4528: .4byte gSprites thumb_func_end sub_80D4418 @@ -20681,7 +20681,7 @@ sub_80D45D8: @ 80D45D8 lsls r0, 24 lsrs r0, 24 strh r0, [r4, 0xA] - ldr r0, _080D460C @ =gBattleAnimPlayerMonIndex + ldr r0, _080D460C @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -20693,7 +20693,7 @@ sub_80D45D8: @ 80D45D8 b _080D4616 .align 2, 0 _080D4608: .4byte gTasks -_080D460C: .4byte gBattleAnimPlayerMonIndex +_080D460C: .4byte gBattleAnimBankAttacker _080D4610: movs r0, 0x10 strh r0, [r4, 0x10] @@ -21079,7 +21079,7 @@ sub_80D48F4: @ 80D48F4 lsls r1, 3 ldr r0, _080D4978 @ =gTasks adds r5, r1, r0 - ldr r4, _080D497C @ =gBattleAnimPlayerMonIndex + ldr r4, _080D497C @ =gBattleAnimBankAttacker ldrb r0, [r4] movs r1, 0x2 bl sub_8077ABC @@ -21136,7 +21136,7 @@ _080D494C: bx r0 .align 2, 0 _080D4978: .4byte gTasks -_080D497C: .4byte gBattleAnimPlayerMonIndex +_080D497C: .4byte gBattleAnimBankAttacker _080D4980: .4byte 0x0000ffe0 _080D4984: .4byte sub_80D4988 thumb_func_end sub_80D48F4 @@ -21556,7 +21556,7 @@ sub_80D4CA4: @ 80D4CA4 adds r4, r0, 0 movs r1, 0x1 bl sub_80787B0 - ldr r5, _080D4CE0 @ =gBattleAnimEnemyMonIndex + ldr r5, _080D4CE0 @ =gBattleAnimBankTarget ldrb r0, [r5] movs r1, 0x2 bl sub_8077ABC @@ -21580,7 +21580,7 @@ sub_80D4CA4: @ 80D4CA4 pop {r0} bx r0 .align 2, 0 -_080D4CE0: .4byte gBattleAnimEnemyMonIndex +_080D4CE0: .4byte gBattleAnimBankTarget _080D4CE4: .4byte gBattleAnimArgs _080D4CE8: .4byte sub_80D4CEC thumb_func_end sub_80D4CA4 @@ -21734,7 +21734,7 @@ _080D4DF2: strh r0, [r4, 0x2E] mov r0, r9 strh r0, [r4, 0x30] - ldr r0, _080D4E3C @ =gBattleAnimPlayerMonIndex + ldr r0, _080D4E3C @ =gBattleAnimBankAttacker ldrb r0, [r0] bl sub_8079E90 subs r0, 0x1 @@ -21750,7 +21750,7 @@ _080D4DF2: .align 2, 0 _080D4E34: .4byte gSpriteTemplate_83D9420 _080D4E38: .4byte gSprites -_080D4E3C: .4byte gBattleAnimPlayerMonIndex +_080D4E3C: .4byte gBattleAnimBankAttacker _080D4E40: strh r7, [r4, 0x32] _080D4E42: @@ -21792,7 +21792,7 @@ _080D4E68: strh r0, [r4, 0x2E] mov r0, r9 strh r0, [r4, 0x30] - ldr r0, _080D4EB4 @ =gBattleAnimPlayerMonIndex + ldr r0, _080D4EB4 @ =gBattleAnimBankAttacker ldrb r0, [r0] bl sub_8079E90 subs r0, 0x1 @@ -21808,7 +21808,7 @@ _080D4E68: .align 2, 0 _080D4EAC: .4byte gSpriteTemplate_83D9420 _080D4EB0: .4byte gSprites -_080D4EB4: .4byte gBattleAnimPlayerMonIndex +_080D4EB4: .4byte gBattleAnimBankAttacker _080D4EB8: strh r7, [r4, 0x32] _080D4EBA: @@ -21847,7 +21847,7 @@ sub_80D4ED8: @ 80D4ED8 strh r0, [r4, 0x36] ldr r1, _080D4F10 @ =move_anim_8072740 adds r0, r4, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 ldr r1, _080D4F14 @ =sub_8078174 str r1, [r4, 0x1C] adds r0, r4, 0 @@ -21884,7 +21884,7 @@ sub_80D4F18: @ 80D4F18 str r0, [r4, 0x1C] ldr r1, _080D4F58 @ =move_anim_8072740 adds r0, r4, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 pop {r4,r5} pop {r0} bx r0 @@ -21899,7 +21899,7 @@ sub_80D4F5C: @ 80D4F5C push {r4,lr} adds r4, r0, 0 bl sub_8078650 - ldr r0, _080D4F90 @ =gBattleAnimPlayerMonIndex + ldr r0, _080D4F90 @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -21920,7 +21920,7 @@ sub_80D4F5C: @ 80D4F5C adds r1, r2, 0 b _080D4FAE .align 2, 0 -_080D4F90: .4byte gBattleAnimPlayerMonIndex +_080D4F90: .4byte gBattleAnimBankAttacker _080D4F94: .4byte gBattleAnimArgs _080D4F98: ldr r1, _080D4FC4 @ =gBattleAnimArgs @@ -21955,7 +21955,7 @@ _080D4FC8: .4byte sub_80D5038 sub_80D4FCC: @ 80D4FCC push {r4,lr} adds r4, r0, 0 - ldr r0, _080D4FF8 @ =gBattleAnimPlayerMonIndex + ldr r0, _080D4FF8 @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -21975,7 +21975,7 @@ sub_80D4FCC: @ 80D4FCC adds r1, r2, 0 b _080D5018 .align 2, 0 -_080D4FF8: .4byte gBattleAnimPlayerMonIndex +_080D4FF8: .4byte gBattleAnimBankAttacker _080D4FFC: .4byte gBattleAnimArgs _080D5000: ldr r1, _080D5030 @ =gBattleAnimArgs @@ -22047,7 +22047,7 @@ sub_80D5074: @ 80D5074 push {r4,lr} adds r4, r0, 0 bl sub_8078650 - ldr r0, _080D5098 @ =gBattleAnimPlayerMonIndex + ldr r0, _080D5098 @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -22060,7 +22060,7 @@ sub_80D5074: @ 80D5074 strh r1, [r4, 0x20] b _080D50B2 .align 2, 0 -_080D5098: .4byte gBattleAnimPlayerMonIndex +_080D5098: .4byte gBattleAnimBankAttacker _080D509C: .4byte gBattleAnimArgs _080D50A0: ldr r0, _080D50E0 @ =gBattleAnimArgs @@ -22194,7 +22194,7 @@ sub_80D517C: @ 80D517C ldr r1, _080D51A0 @ =sub_8078B34 str r1, [r0, 0x1C] ldr r1, _080D51A4 @ =move_anim_8072740 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 pop {r0} bx r0 .align 2, 0 @@ -22206,11 +22206,11 @@ _080D51A4: .4byte move_anim_8072740 sub_80D51A8: @ 80D51A8 push {r4-r6,lr} adds r6, r0, 0 - ldr r5, _080D5200 @ =gBattleAnimPlayerMonIndex + ldr r5, _080D5200 @ =gBattleAnimBankAttacker ldrb r0, [r5] bl GetBankSide adds r4, r0, 0 - ldr r0, _080D5204 @ =gBattleAnimEnemyMonIndex + ldr r0, _080D5204 @ =gBattleAnimBankTarget ldrb r0, [r0] bl GetBankSide lsls r4, 24 @@ -22245,8 +22245,8 @@ _080D51EE: pop {r0} bx r0 .align 2, 0 -_080D5200: .4byte gBattleAnimPlayerMonIndex -_080D5204: .4byte gBattleAnimEnemyMonIndex +_080D5200: .4byte gBattleAnimBankAttacker +_080D5204: .4byte gBattleAnimBankTarget _080D5208: .4byte gBattleAnimArgs _080D520C: .4byte sub_8079534 thumb_func_end sub_80D51A8 @@ -22305,7 +22305,7 @@ sub_80D5254: @ 80D5254 strh r0, [r5, 0x2E] ldrh r0, [r5, 0x20] strh r0, [r5, 0x30] - ldr r4, _080D52A4 @ =gBattleAnimEnemyMonIndex + ldr r4, _080D52A4 @ =gBattleAnimBankTarget ldrb r0, [r4] movs r1, 0x2 bl sub_8077ABC @@ -22329,7 +22329,7 @@ _080D529E: pop {r0} bx r0 .align 2, 0 -_080D52A4: .4byte gBattleAnimEnemyMonIndex +_080D52A4: .4byte gBattleAnimBankTarget _080D52A8: .4byte sub_80D52AC thumb_func_end sub_80D5254 @@ -22343,7 +22343,7 @@ sub_80D52AC: @ 80D52AC beq _080D52F4 movs r4, 0 strh r4, [r6, 0x2E] - ldr r5, _080D52EC @ =gBattleAnimEnemyMonIndex + ldr r5, _080D52EC @ =gBattleAnimBankTarget ldrb r0, [r5] movs r1, 0x2 bl sub_8077ABC @@ -22364,7 +22364,7 @@ sub_80D52AC: @ 80D52AC bl _call_via_r1 b _080D531E .align 2, 0 -_080D52EC: .4byte gBattleAnimEnemyMonIndex +_080D52EC: .4byte gBattleAnimBankTarget _080D52F0: .4byte sub_80D5324 _080D52F4: movs r1, 0x3C @@ -22457,7 +22457,7 @@ sub_80D5374: @ 80D5374 strh r0, [r4, 0x32] ldr r1, _080D53AC @ =move_anim_8072740 adds r0, r4, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 ldr r0, _080D53B0 @ =sub_8078364 str r0, [r4, 0x1C] pop {r4} @@ -22490,7 +22490,7 @@ sub_80D53B4: @ 80D53B4 str r0, [r4, 0x1C] ldr r1, _080D53F0 @ =sub_80D53F4 adds r0, r4, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 pop {r4} pop {r0} bx r0 @@ -22577,7 +22577,7 @@ sub_80D5470: @ 80D5470 ldr r0, _080D54D0 @ =gTasks adds r4, r0 movs r0, 0 - bl obj_id_for_side_relative_to_move + bl GetAnimBankSpriteId lsls r0, 24 lsrs r0, 24 movs r5, 0 @@ -22595,7 +22595,7 @@ sub_80D5470: @ 80D5470 adds r0, r2 ldrh r0, [r0, 0x22] strh r0, [r4, 0x10] - ldr r0, _080D54D8 @ =gBattleAnimPlayerMonIndex + ldr r0, _080D54D8 @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -22615,7 +22615,7 @@ sub_80D5470: @ 80D5470 .align 2, 0 _080D54D0: .4byte gTasks _080D54D4: .4byte gSprites -_080D54D8: .4byte gBattleAnimPlayerMonIndex +_080D54D8: .4byte gBattleAnimBankAttacker _080D54DC: .4byte sub_80D54E0 thumb_func_end sub_80D5470 @@ -23021,7 +23021,7 @@ sub_80D57C4: @ 80D57C4 lsls r0, 2 adds r0, r1 ldrh r4, [r0, 0x20] - ldr r0, _080D5818 @ =gBattleAnimPlayerMonIndex + ldr r0, _080D5818 @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -23035,7 +23035,7 @@ sub_80D57C4: @ 80D57C4 b _080D5826 .align 2, 0 _080D5814: .4byte gSprites -_080D5818: .4byte gBattleAnimPlayerMonIndex +_080D5818: .4byte gBattleAnimBankAttacker _080D581C: adds r0, r4, 0 adds r0, 0x10 @@ -23203,7 +23203,7 @@ sub_80D5940: @ 80D5940 adds r0, r2 lsls r0, 16 lsrs r4, r0, 16 - ldr r0, _080D597C @ =gBattleAnimPlayerMonIndex + ldr r0, _080D597C @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -23215,7 +23215,7 @@ sub_80D5940: @ 80D5940 b _080D5986 .align 2, 0 _080D5978: .4byte gSprites -_080D597C: .4byte gBattleAnimPlayerMonIndex +_080D597C: .4byte gBattleAnimBankAttacker _080D5980: lsls r0, r4, 16 movs r1, 0xB0 @@ -23466,7 +23466,7 @@ _080D5B28: bl StartSpriteAnim ldrh r0, [r4, 0x4] strh r0, [r5, 0x3C] - ldr r0, _080D5B54 @ =gBattleAnimPlayerMonIndex + ldr r0, _080D5B54 @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -23476,12 +23476,12 @@ _080D5B28: b _080D5B5A .align 2, 0 _080D5B50: .4byte gBattleAnimArgs -_080D5B54: .4byte gBattleAnimPlayerMonIndex +_080D5B54: .4byte gBattleAnimBankAttacker _080D5B58: ldr r0, _080D5B78 @ =0x0000fffc _080D5B5A: strh r0, [r5, 0x36] - ldr r0, _080D5B7C @ =gBattleAnimEnemyMonIndex + ldr r0, _080D5B7C @ =gBattleAnimBankTarget ldrb r0, [r0] bl sub_8079ED4 movs r1, 0x3 @@ -23496,12 +23496,12 @@ _080D5B5A: b _080D5BD6 .align 2, 0 _080D5B78: .4byte 0x0000fffc -_080D5B7C: .4byte gBattleAnimEnemyMonIndex +_080D5B7C: .4byte gBattleAnimBankTarget _080D5B80: ldrh r0, [r5, 0x30] adds r0, 0xC0 strh r0, [r5, 0x30] - ldr r0, _080D5BA0 @ =gBattleAnimPlayerMonIndex + ldr r0, _080D5BA0 @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -23513,7 +23513,7 @@ _080D5B80: negs r0, r0 b _080D5BAA .align 2, 0 -_080D5BA0: .4byte gBattleAnimPlayerMonIndex +_080D5BA0: .4byte gBattleAnimBankAttacker _080D5BA4: ldrh r0, [r5, 0x30] lsls r0, 16 @@ -23579,7 +23579,7 @@ _080D5BDE: lsls r0, 1 strh r0, [r5, 0x2E] strh r1, [r5, 0x30] - ldr r4, _080D5C54 @ =gBattleAnimEnemyMonIndex + ldr r4, _080D5C54 @ =gBattleAnimBankTarget ldrb r0, [r4] movs r1, 0x2 bl sub_8077ABC @@ -23603,7 +23603,7 @@ _080D5C4E: pop {r0} bx r0 .align 2, 0 -_080D5C54: .4byte gBattleAnimEnemyMonIndex +_080D5C54: .4byte gBattleAnimBankTarget _080D5C58: .4byte sub_80D5C5C thumb_func_end sub_80D5B0C @@ -23715,7 +23715,7 @@ _080D5CD8: lsrs r0, 16 cmp r0, 0x83 bls _080D5D5C - ldr r0, _080D5D58 @ =gBattleAnimEnemyMonIndex + ldr r0, _080D5D58 @ =gBattleAnimBankTarget ldrb r0, [r0] bl sub_8079ED4 movs r1, 0x3 @@ -23732,9 +23732,9 @@ _080D5CD8: _080D5D4C: .4byte gBattleAnimArgs _080D5D50: .4byte gMain _080D5D54: .4byte 0x0000043d -_080D5D58: .4byte gBattleAnimEnemyMonIndex +_080D5D58: .4byte gBattleAnimBankTarget _080D5D5C: - ldr r0, _080D5D80 @ =gBattleAnimEnemyMonIndex + ldr r0, _080D5D80 @ =gBattleAnimBankTarget ldrb r0, [r0] bl sub_8079ED4 lsls r0, 24 @@ -23751,7 +23751,7 @@ _080D5D5C: strb r1, [r4, 0x5] b _080D5DA0 .align 2, 0 -_080D5D80: .4byte gBattleAnimEnemyMonIndex +_080D5D80: .4byte gBattleAnimBankTarget _080D5D84: adds r0, r2, 0 subs r0, 0x40 @@ -23813,7 +23813,7 @@ sub_80D5DDC: @ 80D5DDC lsls r1, 3 ldr r0, _080D5E3C @ =gTasks adds r4, r1, r0 - ldr r0, _080D5E40 @ =gBattleAnimPlayerMonIndex + ldr r0, _080D5E40 @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -23825,22 +23825,22 @@ sub_80D5DDC: @ 80D5DDC movs r1, 0x1 _080D5E02: strh r1, [r4, 0x20] - ldr r0, _080D5E44 @ =gBattleAnimEnemyMonIndex + ldr r0, _080D5E44 @ =gBattleAnimBankTarget ldrb r1, [r0] movs r0, 0x2 eors r0, r1 - bl b_side_obj__get_some_boolean + bl IsAnimBankSpriteVisible lsls r0, 24 lsrs r0, 24 adds r0, 0x1 strh r0, [r4, 0x22] movs r0, 0x1 - bl obj_id_for_side_relative_to_move + bl GetAnimBankSpriteId lsls r0, 24 lsrs r0, 24 strh r0, [r4, 0x24] movs r0, 0x3 - bl obj_id_for_side_relative_to_move + bl GetAnimBankSpriteId lsls r0, 24 lsrs r0, 24 strh r0, [r4, 0x26] @@ -23851,8 +23851,8 @@ _080D5E02: bx r0 .align 2, 0 _080D5E3C: .4byte gTasks -_080D5E40: .4byte gBattleAnimPlayerMonIndex -_080D5E44: .4byte gBattleAnimEnemyMonIndex +_080D5E40: .4byte gBattleAnimBankAttacker +_080D5E44: .4byte gBattleAnimBankTarget _080D5E48: .4byte sub_80D5E4C thumb_func_end sub_80D5DDC @@ -24222,7 +24222,7 @@ _080D60EA: adds r0, 0x1 strh r0, [r2, 0x8] ldr r1, _080D6114 @ =gObjectBankIDs - ldr r0, _080D6118 @ =gBattleAnimEnemyMonIndex + ldr r0, _080D6118 @ =gBattleAnimBankTarget ldrb r0, [r0] adds r0, r1 ldrb r6, [r0] @@ -24238,7 +24238,7 @@ _080D60EA: _080D610C: .4byte gTasks _080D6110: .4byte gBattleAnimArgs _080D6114: .4byte gObjectBankIDs -_080D6118: .4byte gBattleAnimEnemyMonIndex +_080D6118: .4byte gBattleAnimBankTarget _080D611C: .4byte gUnknown_083D9794 _080D6120: ldr r4, _080D616C @ =gUnknown_083D97A4 @@ -24331,7 +24331,7 @@ _080D61C4: .4byte gSprites sub_80D61C8: @ 80D61C8 push {r4,lr} adds r4, r0, 0 - ldr r0, _080D61E8 @ =gBattleAnimPlayerMonIndex + ldr r0, _080D61E8 @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -24344,7 +24344,7 @@ sub_80D61C8: @ 80D61C8 strh r1, [r4, 0x20] b _080D61FC .align 2, 0 -_080D61E8: .4byte gBattleAnimPlayerMonIndex +_080D61E8: .4byte gBattleAnimBankAttacker _080D61EC: .4byte gBattleAnimArgs _080D61F0: ldr r1, _080D6210 @ =gBattleAnimArgs @@ -24389,7 +24389,7 @@ _080D622E: sub_80D6234: @ 80D6234 push {r4,lr} adds r4, r0, 0 - ldr r0, _080D6254 @ =gBattleAnimPlayerMonIndex + ldr r0, _080D6254 @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -24402,7 +24402,7 @@ sub_80D6234: @ 80D6234 strh r1, [r4, 0x20] b _080D6266 .align 2, 0 -_080D6254: .4byte gBattleAnimPlayerMonIndex +_080D6254: .4byte gBattleAnimBankAttacker _080D6258: .4byte gBattleAnimArgs _080D625C: ldr r0, _080D6270 @ =gBattleAnimArgs @@ -24442,7 +24442,7 @@ _080D628E: sub_80D6294: @ 80D6294 push {r4,r5,lr} adds r5, r0, 0 - ldr r4, _080D62D8 @ =gBattleAnimEnemyMonIndex + ldr r4, _080D62D8 @ =gBattleAnimBankTarget ldrb r0, [r4] movs r1, 0x2 bl sub_8077ABC @@ -24455,7 +24455,7 @@ sub_80D6294: @ 80D6294 lsls r0, 24 lsrs r0, 24 strh r0, [r5, 0x22] - ldr r0, _080D62DC @ =gBattleAnimPlayerMonIndex + ldr r0, _080D62DC @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -24472,8 +24472,8 @@ sub_80D6294: @ 80D6294 strh r0, [r5, 0x22] b _080D62F8 .align 2, 0 -_080D62D8: .4byte gBattleAnimEnemyMonIndex -_080D62DC: .4byte gBattleAnimPlayerMonIndex +_080D62D8: .4byte gBattleAnimBankTarget +_080D62DC: .4byte gBattleAnimBankAttacker _080D62E0: .4byte gBattleAnimArgs _080D62E4: ldr r0, _080D631C @ =gBattleAnimArgs @@ -24497,7 +24497,7 @@ _080D62F8: strh r0, [r5, 0x34] ldr r1, _080D6320 @ =move_anim_8074EE0 adds r0, r5, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 ldr r0, _080D6324 @ =sub_8078114 str r0, [r5, 0x1C] pop {r4,r5} @@ -24532,46 +24532,46 @@ _080D6344: beq _080D637C b _080D63A0 _080D634E: - ldr r0, _080D6354 @ =gBattleAnimPlayerMonIndex + ldr r0, _080D6354 @ =gBattleAnimBankAttacker b _080D63A2 .align 2, 0 -_080D6354: .4byte gBattleAnimPlayerMonIndex +_080D6354: .4byte gBattleAnimBankAttacker _080D6358: - ldr r4, _080D6370 @ =gBattleAnimPlayerMonIndex + ldr r4, _080D6370 @ =gBattleAnimBankAttacker ldrb r0, [r4] movs r6, 0x2 eors r0, r6 - bl b_side_obj__get_some_boolean + bl IsAnimBankSpriteVisible lsls r0, 24 cmp r0, 0 bne _080D6374 ldrb r4, [r4] b _080D63A4 .align 2, 0 -_080D6370: .4byte gBattleAnimPlayerMonIndex +_080D6370: .4byte gBattleAnimBankAttacker _080D6374: ldrb r0, [r4] adds r4, r6, 0 eors r4, r0 b _080D63A4 _080D637C: - ldr r0, _080D6398 @ =gBattleAnimPlayerMonIndex + ldr r0, _080D6398 @ =gBattleAnimBankAttacker ldrb r0, [r0] movs r4, 0x2 eors r0, r4 - bl b_side_obj__get_some_boolean + bl IsAnimBankSpriteVisible lsls r0, 24 cmp r0, 0 beq _080D63A0 - ldr r0, _080D639C @ =gBattleAnimEnemyMonIndex + ldr r0, _080D639C @ =gBattleAnimBankTarget ldrb r0, [r0] eors r4, r0 b _080D63A4 .align 2, 0 -_080D6398: .4byte gBattleAnimPlayerMonIndex -_080D639C: .4byte gBattleAnimEnemyMonIndex +_080D6398: .4byte gBattleAnimBankAttacker +_080D639C: .4byte gBattleAnimBankTarget _080D63A0: - ldr r0, _080D63C4 @ =gBattleAnimEnemyMonIndex + ldr r0, _080D63C4 @ =gBattleAnimBankTarget _080D63A2: ldrb r4, [r0] _080D63A4: @@ -24590,7 +24590,7 @@ _080D63A4: movs r1, 0x1 b _080D63DE .align 2, 0 -_080D63C4: .4byte gBattleAnimEnemyMonIndex +_080D63C4: .4byte gBattleAnimBankTarget _080D63C8: .4byte gBattleAnimArgs _080D63CC: adds r0, r4, 0 @@ -24698,7 +24698,7 @@ sub_80D648C: @ 80D648C strh r0, [r4, 0x2E] ldrh r0, [r4, 0x20] strh r0, [r4, 0x30] - ldr r6, _080D6504 @ =gBattleAnimEnemyMonIndex + ldr r6, _080D6504 @ =gBattleAnimBankTarget ldrb r0, [r6] movs r1, 0x2 bl sub_8077ABC @@ -24744,7 +24744,7 @@ sub_80D648C: @ 80D648C bx r0 .align 2, 0 _080D6500: .4byte gBattleAnimArgs -_080D6504: .4byte gBattleAnimEnemyMonIndex +_080D6504: .4byte gBattleAnimBankTarget _080D6508: .4byte 0x000003ff _080D650C: .4byte 0xfffffc00 _080D6510: .4byte sub_80D6514 @@ -24866,7 +24866,7 @@ sub_80D65DC: @ 80D65DC ands r0, r1 cmp r0, 0 beq _080D65FE - ldr r0, _080D664C @ =gBattleAnimEnemyMonIndex + ldr r0, _080D664C @ =gBattleAnimBankTarget ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -24878,7 +24878,7 @@ _080D65FE: negs r0, r0 strh r0, [r1, 0x2] _080D6606: - ldr r5, _080D664C @ =gBattleAnimEnemyMonIndex + ldr r5, _080D664C @ =gBattleAnimBankTarget ldrb r0, [r5] movs r1, 0x2 bl sub_8077ABC @@ -24909,7 +24909,7 @@ _080D6606: .align 2, 0 _080D6644: .4byte gMain _080D6648: .4byte 0x0000043d -_080D664C: .4byte gBattleAnimEnemyMonIndex +_080D664C: .4byte gBattleAnimBankTarget _080D6650: .4byte gBattleAnimArgs _080D6654: .4byte sub_80D658C thumb_func_end sub_80D65DC @@ -24928,13 +24928,13 @@ sub_80D6658: @ 80D6658 ands r0, r1 cmp r0, 0 beq _080D667C - ldr r0, _080D6678 @ =gBattleAnimEnemyMonIndex + ldr r0, _080D6678 @ =gBattleAnimBankTarget b _080D667E .align 2, 0 _080D6674: .4byte gBattleAnimArgs -_080D6678: .4byte gBattleAnimEnemyMonIndex +_080D6678: .4byte gBattleAnimBankTarget _080D667C: - ldr r0, _080D670C @ =gBattleAnimPlayerMonIndex + ldr r0, _080D670C @ =gBattleAnimBankAttacker _080D667E: ldrb r6, [r0] ldr r0, _080D6710 @ =gMain @@ -25005,7 +25005,7 @@ _080D66A4: pop {r0} bx r0 .align 2, 0 -_080D670C: .4byte gBattleAnimPlayerMonIndex +_080D670C: .4byte gBattleAnimBankAttacker _080D6710: .4byte gMain _080D6714: .4byte 0x0000043d _080D6718: .4byte gBattleAnimArgs @@ -25126,7 +25126,7 @@ _080D67F6: str r0, [r4, 0x1C] ldr r1, _080D6818 @ =move_anim_8072740 adds r0, r4, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 pop {r4,r5} pop {r0} bx r0 @@ -25142,7 +25142,7 @@ sub_80D681C: @ 80D681C adds r5, r0, 0 lsls r5, 24 lsrs r5, 24 - ldr r6, _080D6864 @ =gBattleAnimEnemyMonIndex + ldr r6, _080D6864 @ =gBattleAnimBankTarget ldrb r0, [r6] movs r1, 0 bl sub_8077ABC @@ -25173,7 +25173,7 @@ sub_80D681C: @ 80D681C pop {r0} bx r0 .align 2, 0 -_080D6864: .4byte gBattleAnimEnemyMonIndex +_080D6864: .4byte gBattleAnimBankTarget _080D6868: .4byte gTasks _080D686C: .4byte gBattleAnimArgs _080D6870: .4byte sub_80D6874 @@ -25556,14 +25556,14 @@ sub_80D6B3C: @ 80D6B3C ldrsh r0, [r0, r1] cmp r0, 0 bne _080D6B68 - ldr r4, _080D6B64 @ =gBattleAnimPlayerMonIndex + ldr r4, _080D6B64 @ =gBattleAnimBankAttacker b _080D6B6A .align 2, 0 _080D6B5C: .4byte gTasks _080D6B60: .4byte gBattleAnimArgs -_080D6B64: .4byte gBattleAnimPlayerMonIndex +_080D6B64: .4byte gBattleAnimBankAttacker _080D6B68: - ldr r4, _080D6BAC @ =gBattleAnimEnemyMonIndex + ldr r4, _080D6BAC @ =gBattleAnimBankTarget _080D6B6A: ldrb r0, [r4] movs r1, 0x2 @@ -25596,7 +25596,7 @@ _080D6B6A: pop {r0} bx r0 .align 2, 0 -_080D6BAC: .4byte gBattleAnimEnemyMonIndex +_080D6BAC: .4byte gBattleAnimBankTarget _080D6BB0: .4byte gBattleAnimArgs _080D6BB4: .4byte sub_80D6BB8 thumb_func_end sub_80D6B3C @@ -25681,7 +25681,7 @@ sub_80D6BB8: @ 80D6BB8 bl obj_translate_based_on_private_1_2_3_4 ldr r1, _080D6CB0 @ =sub_80D6D00 adds r0, r4, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 ldr r0, _080D6CB4 @ =sub_8078600 str r0, [r4, 0x1C] ldrh r0, [r5, 0x1A] @@ -25790,13 +25790,13 @@ sub_80D6D18: @ 80D6D18 ldrsh r0, [r0, r1] cmp r0, 0 bne _080D6D34 - ldr r4, _080D6D30 @ =gBattleAnimPlayerMonIndex + ldr r4, _080D6D30 @ =gBattleAnimBankAttacker b _080D6D36 .align 2, 0 _080D6D2C: .4byte gBattleAnimArgs -_080D6D30: .4byte gBattleAnimPlayerMonIndex +_080D6D30: .4byte gBattleAnimBankAttacker _080D6D34: - ldr r4, _080D6D64 @ =gBattleAnimEnemyMonIndex + ldr r4, _080D6D64 @ =gBattleAnimBankTarget _080D6D36: ldrb r0, [r4] movs r1, 0x2 @@ -25812,14 +25812,14 @@ _080D6D36: strh r0, [r5, 0x22] ldr r1, _080D6D68 @ =move_anim_8074EE0 adds r0, r5, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 ldr r0, _080D6D6C @ =sub_80785E4 str r0, [r5, 0x1C] pop {r4,r5} pop {r0} bx r0 .align 2, 0 -_080D6D64: .4byte gBattleAnimEnemyMonIndex +_080D6D64: .4byte gBattleAnimBankTarget _080D6D68: .4byte move_anim_8074EE0 _080D6D6C: .4byte sub_80785E4 thumb_func_end sub_80D6D18 @@ -25833,13 +25833,13 @@ sub_80D6D70: @ 80D6D70 ldrsh r0, [r0, r1] cmp r0, 0 bne _080D6D8C - ldr r4, _080D6D88 @ =gBattleAnimPlayerMonIndex + ldr r4, _080D6D88 @ =gBattleAnimBankAttacker b _080D6D8E .align 2, 0 _080D6D84: .4byte gBattleAnimArgs -_080D6D88: .4byte gBattleAnimPlayerMonIndex +_080D6D88: .4byte gBattleAnimBankAttacker _080D6D8C: - ldr r4, _080D6DC8 @ =gBattleAnimEnemyMonIndex + ldr r4, _080D6DC8 @ =gBattleAnimBankTarget _080D6D8E: ldrb r0, [r4] movs r1, 0x2 @@ -25860,14 +25860,14 @@ _080D6D8E: strh r0, [r5, 0x26] ldr r1, _080D6DD0 @ =move_anim_8072740 adds r0, r5, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 ldr r0, _080D6DD4 @ =sub_8078600 str r0, [r5, 0x1C] pop {r4,r5} pop {r0} bx r0 .align 2, 0 -_080D6DC8: .4byte gBattleAnimEnemyMonIndex +_080D6DC8: .4byte gBattleAnimBankTarget _080D6DCC: .4byte gBattleAnimArgs _080D6DD0: .4byte move_anim_8072740 _080D6DD4: .4byte sub_8078600 @@ -25879,7 +25879,7 @@ sub_80D6DD8: @ 80D6DD8 adds r5, r0, 0 movs r1, 0x1 bl StartSpriteAffineAnim - ldr r4, _080D6E30 @ =gBattleAnimPlayerMonIndex + ldr r4, _080D6E30 @ =gBattleAnimBankAttacker ldrb r0, [r4] movs r1, 0x2 bl sub_8077ABC @@ -25893,7 +25893,7 @@ sub_80D6DD8: @ 80D6DD8 lsrs r0, 24 strh r0, [r5, 0x22] movs r0, 0 - bl obj_id_for_side_relative_to_move + bl GetAnimBankSpriteId lsls r0, 24 lsrs r0, 24 strh r0, [r5, 0x3A] @@ -25916,7 +25916,7 @@ _080D6E26: pop {r0} bx r0 .align 2, 0 -_080D6E30: .4byte gBattleAnimPlayerMonIndex +_080D6E30: .4byte gBattleAnimBankAttacker _080D6E34: .4byte sub_80D6E38 thumb_func_end sub_80D6DD8 @@ -26006,12 +26006,12 @@ _080D6ECE: b _080D7000 _080D6ED0: movs r0, 0 - bl obj_id_for_side_relative_to_move + bl GetAnimBankSpriteId lsls r0, 24 lsrs r0, 24 movs r6, 0 strh r0, [r5, 0x26] - ldr r4, _080D6F04 @ =gBattleAnimPlayerMonIndex + ldr r4, _080D6F04 @ =gBattleAnimBankAttacker ldrb r0, [r4] movs r1, 0x2 bl sub_8077ABC @@ -26028,7 +26028,7 @@ _080D6ED0: movs r0, 0x2 b _080D6F12 .align 2, 0 -_080D6F04: .4byte gBattleAnimPlayerMonIndex +_080D6F04: .4byte gBattleAnimBankAttacker _080D6F08: .4byte 0x0000ffe0 _080D6F0C: movs r0, 0x20 @@ -26193,7 +26193,7 @@ _080D7034: _080D703A: b _080D718E _080D703C: - ldr r4, _080D707C @ =gBattleAnimPlayerMonIndex + ldr r4, _080D707C @ =gBattleAnimBankAttacker ldrb r0, [r4] bl GetBankSide lsls r0, 24 @@ -26225,7 +26225,7 @@ _080D7052: ldr r0, _080D7084 @ =0x0000fff0 b _080D70F0 .align 2, 0 -_080D707C: .4byte gBattleAnimPlayerMonIndex +_080D707C: .4byte gBattleAnimBankAttacker _080D7080: .4byte gBattleAnimArgs _080D7084: .4byte 0x0000fff0 _080D7088: @@ -26254,7 +26254,7 @@ _080D70B0: movs r0, 0x78 subs r0, r1 strh r0, [r5, 0xE] - ldr r4, _080D70E4 @ =gBattleAnimEnemyMonIndex + ldr r4, _080D70E4 @ =gBattleAnimBankTarget ldrb r0, [r4] movs r1, 0x3 bl sub_8077ABC @@ -26273,7 +26273,7 @@ _080D70B0: strh r0, [r5, 0x10] b _080D7126 .align 2, 0 -_080D70E4: .4byte gBattleAnimEnemyMonIndex +_080D70E4: .4byte gBattleAnimBankTarget _080D70E8: ldr r0, _080D710C @ =0x0000fff0 strh r0, [r5, 0xE] @@ -26506,7 +26506,7 @@ sub_80D727C: @ 80D727C beq _080D72C0 b _080D72D4 _080D728E: - ldr r4, _080D72BC @ =gBattleAnimPlayerMonIndex + ldr r4, _080D72BC @ =gBattleAnimBankAttacker ldrb r0, [r4] movs r1, 0x2 bl sub_8077ABC @@ -26527,7 +26527,7 @@ _080D728E: strh r0, [r5, 0x2E] b _080D72D4 .align 2, 0 -_080D72BC: .4byte gBattleAnimPlayerMonIndex +_080D72BC: .4byte gBattleAnimBankAttacker _080D72C0: adds r0, r5, 0 adds r0, 0x3F @@ -26576,7 +26576,7 @@ _080D7308: .4byte _080D7444 .4byte _080D7454 _080D731C: - ldr r4, _080D73A0 @ =gBattleAnimPlayerMonIndex + ldr r4, _080D73A0 @ =gBattleAnimBankAttacker ldrb r0, [r4] movs r1, 0x2 bl sub_8077ABC @@ -26591,7 +26591,7 @@ _080D731C: strh r0, [r5, 0x16] movs r0, 0x4 strh r0, [r5, 0x18] - ldr r0, _080D73A4 @ =gBattleAnimEnemyMonIndex + ldr r0, _080D73A4 @ =gBattleAnimBankTarget ldrb r0, [r0] movs r1, 0x2 bl sub_8077ABC @@ -26636,8 +26636,8 @@ _080D731C: adds r0, 0x1 b _080D7466 .align 2, 0 -_080D73A0: .4byte gBattleAnimPlayerMonIndex -_080D73A4: .4byte gBattleAnimEnemyMonIndex +_080D73A0: .4byte gBattleAnimBankAttacker +_080D73A4: .4byte gBattleAnimBankTarget _080D73A8: .4byte 0x0000ffff _080D73AC: ldrh r0, [r5, 0xA] @@ -26934,7 +26934,7 @@ _080D75C4: beq _080D7640 b _080D764E _080D75CA: - ldr r0, _080D7614 @ =gBattleAnimEnemyMonIndex + ldr r0, _080D7614 @ =gBattleAnimBankTarget ldrb r0, [r0] movs r1, 0x1 bl sub_8077ABC @@ -26956,7 +26956,7 @@ _080D75E4: bgt _080D75E4 strh r1, [r5, 0x24] _080D75F4: - ldr r4, _080D7614 @ =gBattleAnimEnemyMonIndex + ldr r4, _080D7614 @ =gBattleAnimBankTarget ldrb r0, [r4] movs r1, 0x2 bl sub_8077ABC @@ -26971,7 +26971,7 @@ _080D75F4: strh r0, [r5, 0x20] b _080D7638 .align 2, 0 -_080D7614: .4byte gBattleAnimEnemyMonIndex +_080D7614: .4byte gBattleAnimBankTarget _080D7618: ldrh r0, [r5, 0xA] adds r0, 0x1 @@ -27121,7 +27121,7 @@ sub_80D7704: @ 80D7704 ands r0, r2 orrs r0, r1 strh r0, [r5, 0x4] - ldr r4, _080D7814 @ =gBattleAnimEnemyMonIndex + ldr r4, _080D7814 @ =gBattleAnimBankTarget ldrb r0, [r4] movs r1, 0x2 bl sub_8077ABC @@ -27134,7 +27134,7 @@ sub_80D7704: @ 80D7704 lsls r0, 24 lsrs r0, 24 mov r8, r0 - ldr r4, _080D7818 @ =gBattleAnimPlayerMonIndex + ldr r4, _080D7818 @ =gBattleAnimBankAttacker ldrb r0, [r4] movs r1, 0x2 bl sub_8077ABC @@ -27235,8 +27235,8 @@ _080D77DE: .align 2, 0 _080D780C: .4byte 0x000003ff _080D7810: .4byte 0xfffffc00 -_080D7814: .4byte gBattleAnimEnemyMonIndex -_080D7818: .4byte gBattleAnimPlayerMonIndex +_080D7814: .4byte gBattleAnimBankTarget +_080D7818: .4byte gBattleAnimBankAttacker _080D781C: .4byte gBattleAnimArgs _080D7820: lsls r1, r3, 16 @@ -27365,7 +27365,7 @@ sub_80D78EC: @ 80D78EC strh r0, [r4, 0x36] ldr r1, _080D7924 @ =move_anim_8072740 adds r0, r4, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 ldr r1, _080D7928 @ =sub_8078174 str r1, [r4, 0x1C] adds r0, r4, 0 @@ -27385,14 +27385,14 @@ sub_80D792C: @ 80D792C adds r4, r0, 0 movs r1, 0x1 bl sub_80787B0 - ldr r0, _080D7960 @ =gBattleAnimEnemyMonIndex + ldr r0, _080D7960 @ =gBattleAnimBankTarget ldrb r0, [r0] movs r1, 0x2 bl sub_8077ABC lsls r0, 24 lsrs r0, 24 strh r0, [r4, 0x32] - ldr r0, _080D7964 @ =gBattleAnimPlayerMonIndex + ldr r0, _080D7964 @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -27405,8 +27405,8 @@ sub_80D792C: @ 80D792C strh r1, [r4, 0x32] b _080D7976 .align 2, 0 -_080D7960: .4byte gBattleAnimEnemyMonIndex -_080D7964: .4byte gBattleAnimPlayerMonIndex +_080D7960: .4byte gBattleAnimBankTarget +_080D7964: .4byte gBattleAnimBankAttacker _080D7968: .4byte gBattleAnimArgs _080D796C: ldr r0, _080D79A4 @ =gBattleAnimArgs @@ -27415,7 +27415,7 @@ _080D796C: adds r0, r1 strh r0, [r4, 0x32] _080D7976: - ldr r0, _080D79A8 @ =gBattleAnimEnemyMonIndex + ldr r0, _080D79A8 @ =gBattleAnimBankTarget ldrb r0, [r0] movs r1, 0x3 bl sub_8077ABC @@ -27429,7 +27429,7 @@ _080D7976: strh r0, [r4, 0x2E] ldr r1, _080D79AC @ =move_anim_8072740 adds r0, r4, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 ldr r0, _080D79B0 @ =sub_8078B34 str r0, [r4, 0x1C] pop {r4} @@ -27437,7 +27437,7 @@ _080D7976: bx r0 .align 2, 0 _080D79A4: .4byte gBattleAnimArgs -_080D79A8: .4byte gBattleAnimEnemyMonIndex +_080D79A8: .4byte gBattleAnimBankTarget _080D79AC: .4byte move_anim_8072740 _080D79B0: .4byte sub_8078B34 thumb_func_end sub_80D792C @@ -27458,7 +27458,7 @@ sub_80D79B4: @ 80D79B4 .align 2, 0 _080D79CC: .4byte gBattleAnimArgs _080D79D0: - ldr r0, _080D7A18 @ =gBattleAnimEnemyMonIndex + ldr r0, _080D7A18 @ =gBattleAnimBankTarget ldrb r0, [r0] adds r2, r4, 0 adds r2, 0x20 @@ -27466,7 +27466,7 @@ _080D79D0: adds r3, 0x22 movs r1, 0x1 bl sub_807A3FC - ldr r0, _080D7A1C @ =gBattleAnimPlayerMonIndex + ldr r0, _080D7A1C @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -27487,15 +27487,15 @@ _080D79F6: _080D7A06: ldr r1, _080D7A20 @ =sub_80D7A28 adds r0, r4, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 ldr r0, _080D7A24 @ =sub_80785E4 str r0, [r4, 0x1C] pop {r4,r5} pop {r0} bx r0 .align 2, 0 -_080D7A18: .4byte gBattleAnimEnemyMonIndex -_080D7A1C: .4byte gBattleAnimPlayerMonIndex +_080D7A18: .4byte gBattleAnimBankTarget +_080D7A1C: .4byte gBattleAnimBankAttacker _080D7A20: .4byte sub_80D7A28 _080D7A24: .4byte sub_80785E4 thumb_func_end sub_80D79B4 @@ -27551,7 +27551,7 @@ sub_80D7A64: @ 80D7A64 ldrsh r0, [r6, r1] cmp r0, 0 bne _080D7AB4 - ldr r4, _080D7AB0 @ =gBattleAnimEnemyMonIndex + ldr r4, _080D7AB0 @ =gBattleAnimBankTarget ldrb r0, [r4] movs r1, 0x2 bl sub_8077ABC @@ -27569,9 +27569,9 @@ sub_80D7A64: @ 80D7A64 b _080D7AC6 .align 2, 0 _080D7AAC: .4byte gBattleAnimArgs -_080D7AB0: .4byte gBattleAnimEnemyMonIndex +_080D7AB0: .4byte gBattleAnimBankTarget _080D7AB4: - ldr r0, _080D7AE0 @ =gBattleAnimEnemyMonIndex + ldr r0, _080D7AE0 @ =gBattleAnimBankTarget ldrb r0, [r0] adds r2, r5, 0 adds r2, 0x32 @@ -27580,7 +27580,7 @@ _080D7AB4: movs r1, 0x1 bl sub_807A3FC _080D7AC6: - ldr r0, _080D7AE4 @ =gBattleAnimPlayerMonIndex + ldr r0, _080D7AE4 @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -27593,8 +27593,8 @@ _080D7AC6: strh r1, [r5, 0x32] b _080D7AF6 .align 2, 0 -_080D7AE0: .4byte gBattleAnimEnemyMonIndex -_080D7AE4: .4byte gBattleAnimPlayerMonIndex +_080D7AE0: .4byte gBattleAnimBankTarget +_080D7AE4: .4byte gBattleAnimBankAttacker _080D7AE8: .4byte gBattleAnimArgs _080D7AEC: ldr r0, _080D7B94 @ =gBattleAnimArgs @@ -27678,7 +27678,7 @@ _080D7B76: bge _080D7B76 str r6, [r5, 0x1C] adds r0, r5, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 add sp, 0x10 pop {r4-r7} pop {r0} @@ -27706,7 +27706,7 @@ sub_80D7BA0: @ 80D7BA0 strh r5, [r4, 0x24] movs r0, 0x80 strh r0, [r4, 0x2E] - ldr r0, _080D7BFC @ =gBattleAnimPlayerMonIndex + ldr r0, _080D7BFC @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -27735,7 +27735,7 @@ _080D7BD0: pop {r0} bx r0 .align 2, 0 -_080D7BFC: .4byte gBattleAnimPlayerMonIndex +_080D7BFC: .4byte gBattleAnimBankAttacker _080D7C00: .4byte 0x0000ffec _080D7C04: .4byte sub_80D7C08 thumb_func_end sub_80D7BA0 @@ -27744,7 +27744,7 @@ _080D7C04: .4byte sub_80D7C08 sub_80D7C08: @ 80D7C08 push {r4,lr} adds r4, r0, 0 - ldr r0, _080D7C5C @ =gBattleAnimPlayerMonIndex + ldr r0, _080D7C5C @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -27782,7 +27782,7 @@ _080D7C1E: strh r0, [r4, 0x38] b _080D7C82 .align 2, 0 -_080D7C5C: .4byte gBattleAnimPlayerMonIndex +_080D7C5C: .4byte gBattleAnimBankAttacker _080D7C60: .4byte 0x0000ffec _080D7C64: ldrh r0, [r4, 0x24] @@ -27866,7 +27866,7 @@ sub_80D7CD4: @ 80D7CD4 ldrsh r0, [r1, r2] cmp r0, 0 bne _080D7D20 - ldr r4, _080D7D1C @ =gBattleAnimEnemyMonIndex + ldr r4, _080D7D1C @ =gBattleAnimBankTarget ldrb r0, [r4] movs r1, 0x2 bl sub_8077ABC @@ -27882,9 +27882,9 @@ sub_80D7CD4: @ 80D7CD4 b _080D7D32 .align 2, 0 _080D7D18: .4byte gBattleAnimArgs -_080D7D1C: .4byte gBattleAnimEnemyMonIndex +_080D7D1C: .4byte gBattleAnimBankTarget _080D7D20: - ldr r0, _080D7D50 @ =gBattleAnimEnemyMonIndex + ldr r0, _080D7D50 @ =gBattleAnimBankTarget ldrb r0, [r0] adds r2, r5, 0 adds r2, 0x32 @@ -27893,7 +27893,7 @@ _080D7D20: movs r1, 0x1 bl sub_807A3FC _080D7D32: - ldr r0, _080D7D54 @ =gBattleAnimPlayerMonIndex + ldr r0, _080D7D54 @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -27907,8 +27907,8 @@ _080D7D32: adds r1, r0, 0 b _080D7D66 .align 2, 0 -_080D7D50: .4byte gBattleAnimEnemyMonIndex -_080D7D54: .4byte gBattleAnimPlayerMonIndex +_080D7D50: .4byte gBattleAnimBankTarget +_080D7D54: .4byte gBattleAnimBankAttacker _080D7D58: .4byte gBattleAnimArgs _080D7D5C: ldr r1, _080D7E10 @ =gBattleAnimArgs @@ -28088,7 +28088,7 @@ sub_80D7E88: @ 80D7E88 .align 2, 0 _080D7EA8: .4byte gBattleAnimArgs _080D7EAC: - ldr r0, _080D7EEC @ =gBattleAnimEnemyMonIndex + ldr r0, _080D7EEC @ =gBattleAnimBankTarget ldrb r0, [r0] adds r2, r4, 0 adds r2, 0x20 @@ -28096,7 +28096,7 @@ _080D7EAC: adds r3, 0x22 movs r1, 0 bl sub_807A3FC - ldr r0, _080D7EF0 @ =gBattleAnimPlayerMonIndex + ldr r0, _080D7EF0 @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -28120,8 +28120,8 @@ _080D7EE2: strh r0, [r4, 0x2E] b _080D7F08 .align 2, 0 -_080D7EEC: .4byte gBattleAnimEnemyMonIndex -_080D7EF0: .4byte gBattleAnimPlayerMonIndex +_080D7EEC: .4byte gBattleAnimBankTarget +_080D7EF0: .4byte gBattleAnimBankAttacker _080D7EF4: adds r0, r4, 0 adds r0, 0x3F @@ -28158,7 +28158,7 @@ sub_80D7F10: @ 80D7F10 .align 2, 0 _080D7F30: .4byte gBattleAnimArgs _080D7F34: - ldr r4, _080D7F5C @ =gBattleAnimPlayerMonIndex + ldr r4, _080D7F5C @ =gBattleAnimBankAttacker ldrb r0, [r4] adds r2, r5, 0 adds r2, 0x20 @@ -28176,7 +28176,7 @@ _080D7F34: subs r0, r1 b _080D7F66 .align 2, 0 -_080D7F5C: .4byte gBattleAnimPlayerMonIndex +_080D7F5C: .4byte gBattleAnimBankAttacker _080D7F60: ldrh r0, [r6] ldrh r1, [r5, 0x20] @@ -28189,11 +28189,11 @@ _080D7F66: adds r0, r1 strh r0, [r5, 0x22] _080D7F72: - ldr r0, _080D7F7C @ =gBattleAnimPlayerMonIndex + ldr r0, _080D7F7C @ =gBattleAnimBankAttacker b _080D7FD0 .align 2, 0 _080D7F78: .4byte gBattleAnimArgs -_080D7F7C: .4byte gBattleAnimPlayerMonIndex +_080D7F7C: .4byte gBattleAnimBankAttacker _080D7F80: movs r1, 0xA ldrsh r0, [r6, r1] @@ -28204,7 +28204,7 @@ _080D7F80: bl sub_8078764 b _080D7FCE _080D7F92: - ldr r4, _080D7FB8 @ =gBattleAnimEnemyMonIndex + ldr r4, _080D7FB8 @ =gBattleAnimBankTarget ldrb r0, [r4] adds r2, r5, 0 adds r2, 0x20 @@ -28222,7 +28222,7 @@ _080D7F92: subs r0, r1 b _080D7FC2 .align 2, 0 -_080D7FB8: .4byte gBattleAnimEnemyMonIndex +_080D7FB8: .4byte gBattleAnimBankTarget _080D7FBC: ldrh r0, [r6] ldrh r1, [r5, 0x20] @@ -28235,7 +28235,7 @@ _080D7FC2: adds r0, r1 strh r0, [r5, 0x22] _080D7FCE: - ldr r0, _080D7FF0 @ =gBattleAnimEnemyMonIndex + ldr r0, _080D7FF0 @ =gBattleAnimBankTarget _080D7FD0: ldrb r0, [r0] strh r0, [r5, 0x3C] @@ -28253,12 +28253,12 @@ _080D7FE8: b _080D7FF6 .align 2, 0 _080D7FEC: .4byte gBattleAnimArgs -_080D7FF0: .4byte gBattleAnimEnemyMonIndex +_080D7FF0: .4byte gBattleAnimBankTarget _080D7FF4: movs r0, 0x40 _080D7FF6: strh r0, [r5, 0x3A] - ldr r0, _080D803C @ =gBattleAnimEnemyMonIndex + ldr r0, _080D803C @ =gBattleAnimBankTarget ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -28291,7 +28291,7 @@ _080D800C: pop {r0} bx r0 .align 2, 0 -_080D803C: .4byte gBattleAnimEnemyMonIndex +_080D803C: .4byte gBattleAnimBankTarget _080D8040: .4byte gBattleAnimArgs _080D8044: .4byte sub_80D8048 thumb_func_end sub_80D7F10 @@ -28742,7 +28742,7 @@ _080D83DC: .4byte REG_BLDCNT sub_80D83E0: @ 80D83E0 push {r4,r5,lr} adds r4, r0, 0 - ldr r5, _080D840C @ =gBattleAnimPlayerMonIndex + ldr r5, _080D840C @ =gBattleAnimBankAttacker ldrb r0, [r5] movs r1, 0x2 bl sub_8077ABC @@ -28761,7 +28761,7 @@ sub_80D83E0: @ 80D83E0 pop {r0} bx r0 .align 2, 0 -_080D840C: .4byte gBattleAnimPlayerMonIndex +_080D840C: .4byte gBattleAnimBankAttacker _080D8410: .4byte sub_807941C thumb_func_end sub_80D83E0 @@ -29129,13 +29129,13 @@ sub_80D8700: @ 80D8700 ldr r6, _080D87E8 @ =gBattleAnimArgs ldrh r0, [r6] strh r0, [r5, 0x2E] - ldr r0, _080D87EC @ =gBattleAnimPlayerMonIndex + ldr r0, _080D87EC @ =gBattleAnimBankAttacker mov r8, r0 ldrb r0, [r0] movs r1, 0x2 bl sub_8077ABC adds r4, r0, 0 - ldr r7, _080D87F0 @ =gBattleAnimEnemyMonIndex + ldr r7, _080D87F0 @ =gBattleAnimBankTarget ldrb r0, [r7] movs r1, 0x2 bl sub_8077ABC @@ -29178,7 +29178,7 @@ _080D8734: cmp r0, 0 bne _080D8790 movs r0, 0x1 - bl obj_id_for_side_relative_to_move + bl GetAnimBankSpriteId ldr r2, _080D87F8 @ =gSprites lsls r0, 24 lsrs r0, 24 @@ -29196,7 +29196,7 @@ _080D8790: movs r0, 0x1 strh r0, [r5, 0x3A] _080D8794: - ldr r4, _080D87EC @ =gBattleAnimPlayerMonIndex + ldr r4, _080D87EC @ =gBattleAnimBankAttacker ldrb r0, [r4] movs r1, 0x2 bl sub_8077ABC @@ -29218,7 +29218,7 @@ _080D8794: ldrh r1, [r5, 0x20] adds r0, r1 strh r0, [r5, 0x30] - ldr r4, _080D87F0 @ =gBattleAnimEnemyMonIndex + ldr r4, _080D87F0 @ =gBattleAnimBankTarget ldrb r0, [r4] movs r1, 0x2 bl sub_8077ABC @@ -29236,8 +29236,8 @@ _080D8794: b _080D8824 .align 2, 0 _080D87E8: .4byte gBattleAnimArgs -_080D87EC: .4byte gBattleAnimPlayerMonIndex -_080D87F0: .4byte gBattleAnimEnemyMonIndex +_080D87EC: .4byte gBattleAnimBankAttacker +_080D87F0: .4byte gBattleAnimBankTarget _080D87F4: .4byte gBanksBySide _080D87F8: .4byte gSprites _080D87FC: @@ -29245,7 +29245,7 @@ _080D87FC: ldrh r1, [r5, 0x20] adds r0, r1 strh r0, [r5, 0x30] - ldr r4, _080D886C @ =gBattleAnimEnemyMonIndex + ldr r4, _080D886C @ =gBattleAnimBankTarget ldrb r0, [r4] movs r1, 0 bl sub_8077ABC @@ -29295,7 +29295,7 @@ _080D8858: pop {r0} bx r0 .align 2, 0 -_080D886C: .4byte gBattleAnimEnemyMonIndex +_080D886C: .4byte gBattleAnimBankTarget _080D8870: .4byte sub_80D8874 thumb_func_end sub_80D8700 @@ -29357,7 +29357,7 @@ _080D88C8: _080D88D6: movs r5, 0x50 strh r5, [r4, 0x2E] - ldr r6, _080D8928 @ =gBattleAnimEnemyMonIndex + ldr r6, _080D8928 @ =gBattleAnimBankTarget ldrb r0, [r6] movs r1, 0 bl sub_8077ABC @@ -29396,7 +29396,7 @@ _080D88D6: strh r0, [r4, 0x38] b _080D893A .align 2, 0 -_080D8928: .4byte gBattleAnimEnemyMonIndex +_080D8928: .4byte gBattleAnimBankTarget _080D892C: .4byte gMain _080D8930: .4byte 0x0000043d _080D8934: .4byte gBanksBySide @@ -29545,7 +29545,7 @@ _080D8A12: cmp r0, 0 beq _080D8A78 ldr r1, _080D8A70 @ =gBanksBySide - ldr r0, _080D8A74 @ =gBattleAnimEnemyMonIndex + ldr r0, _080D8A74 @ =gBattleAnimBankTarget ldrb r0, [r0] adds r0, r1 ldrb r1, [r0] @@ -29560,7 +29560,7 @@ _080D8A12: _080D8A68: .4byte gMain _080D8A6C: .4byte 0x0000043d _080D8A70: .4byte gBanksBySide -_080D8A74: .4byte gBattleAnimEnemyMonIndex +_080D8A74: .4byte gBattleAnimBankTarget _080D8A78: ldr r0, _080D8A90 @ =0x0000fff0 _080D8A7A: @@ -29764,7 +29764,7 @@ sub_80D8BA8: @ 80D8BA8 lsls r0, 24 lsrs r5, r0, 24 adds r0, r5, 0 - bl b_side_obj__get_some_boolean + bl IsAnimBankSpriteVisible lsls r0, 24 cmp r0, 0 beq _080D8C94 @@ -30089,7 +30089,7 @@ _080D8E6A: ldr r6, _080D8ED0 @ =gBattleAnimArgs ldrh r0, [r6, 0x8] strh r0, [r5, 0x2E] - ldr r0, _080D8ED4 @ =gBattleAnimPlayerMonIndex + ldr r0, _080D8ED4 @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -30099,7 +30099,7 @@ _080D8E6A: negs r0, r0 strh r0, [r6, 0x4] _080D8E92: - ldr r4, _080D8ED8 @ =gBattleAnimEnemyMonIndex + ldr r4, _080D8ED8 @ =gBattleAnimBankTarget ldrb r0, [r4] movs r1, 0x2 bl sub_8077ABC @@ -30128,8 +30128,8 @@ _080D8E92: .align 2, 0 _080D8ECC: .4byte gDisableStructMoveAnim _080D8ED0: .4byte gBattleAnimArgs -_080D8ED4: .4byte gBattleAnimPlayerMonIndex -_080D8ED8: .4byte gBattleAnimEnemyMonIndex +_080D8ED4: .4byte gBattleAnimBankAttacker +_080D8ED8: .4byte gBattleAnimBankTarget _080D8EDC: .4byte sub_80D8EE0 thumb_func_end unc_080B06FC @@ -30148,7 +30148,7 @@ sub_80D8EE0: @ 80D8EE0 str r0, [r4, 0x1C] ldr r1, _080D8F0C @ =move_anim_8072740 adds r0, r4, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 _080D8F02: pop {r4} pop {r0} @@ -30296,7 +30296,7 @@ unc_080B08A0: @ 80D8FF0 str r0, [r4, 0x1C] ldr r1, _080D9028 @ =move_anim_8072740 adds r0, r4, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 pop {r4,r5} pop {r0} bx r0 @@ -30315,7 +30315,7 @@ sub_80D902C: @ 80D902C ldrsh r0, [r4, r1] cmp r0, 0x1 bne _080D9054 - ldr r0, _080D9074 @ =gBattleAnimPlayerMonIndex + ldr r0, _080D9074 @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -30341,7 +30341,7 @@ _080D9054: bx r0 .align 2, 0 _080D9070: .4byte gBattleAnimArgs -_080D9074: .4byte gBattleAnimPlayerMonIndex +_080D9074: .4byte gBattleAnimBankAttacker thumb_func_end sub_80D902C thumb_func_start sub_80D9078 @@ -30398,7 +30398,7 @@ _080D90D0: str r0, [r5, 0x1C] ldr r1, _080D90F0 @ =move_anim_8072740 adds r0, r5, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 pop {r4,r5} pop {r0} bx r0 @@ -30421,13 +30421,13 @@ sub_80D90F4: @ 80D90F4 mov r9, r0 cmp r1, 0 bne _080D9118 - ldr r0, _080D9114 @ =gBattleAnimPlayerMonIndex + ldr r0, _080D9114 @ =gBattleAnimBankAttacker b _080D911A .align 2, 0 _080D9110: .4byte gBattleAnimArgs -_080D9114: .4byte gBattleAnimPlayerMonIndex +_080D9114: .4byte gBattleAnimBankAttacker _080D9118: - ldr r0, _080D9260 @ =gBattleAnimEnemyMonIndex + ldr r0, _080D9260 @ =gBattleAnimBankTarget _080D911A: ldrb r0, [r0] mov r8, r0 @@ -30584,7 +30584,7 @@ _080D9250: pop {r0} bx r0 .align 2, 0 -_080D9260: .4byte gBattleAnimEnemyMonIndex +_080D9260: .4byte gBattleAnimBankTarget _080D9264: .4byte gBanksBySide _080D9268: .4byte 0xfff00000 _080D926C: .4byte gBattleAnimSpriteTemplate_83DB4A8 @@ -30675,7 +30675,7 @@ _080D9306: str r0, [r4, 0x1C] ldr r1, _080D9324 @ =sub_80D9328 adds r0, r4, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 pop {r4} pop {r0} bx r0 @@ -30716,7 +30716,7 @@ sub_80D9328: @ 80D9328 str r0, [r5, 0x1C] ldr r1, _080D9374 @ =move_anim_8072740 adds r0, r5, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 _080D9368: pop {r4-r6} pop {r0} @@ -30730,10 +30730,10 @@ _080D9374: .4byte move_anim_8072740 sub_80D9378: @ 80D9378 push {r4-r6,lr} adds r6, r0, 0 - ldr r0, _080D93F4 @ =gBattleAnimPlayerMonIndex + ldr r0, _080D93F4 @ =gBattleAnimBankAttacker ldrb r1, [r0] movs r0, 0x2 - ldr r2, _080D93F8 @ =gBattleAnimEnemyMonIndex + ldr r2, _080D93F8 @ =gBattleAnimBankTarget eors r0, r1 ldrb r1, [r2] cmp r0, r1 @@ -30753,7 +30753,7 @@ _080D93A4: adds r0, r6, 0 movs r1, 0x1 bl sub_8078764 - ldr r0, _080D93F4 @ =gBattleAnimPlayerMonIndex + ldr r0, _080D93F4 @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -30789,8 +30789,8 @@ _080D93C2: pop {r0} bx r0 .align 2, 0 -_080D93F4: .4byte gBattleAnimPlayerMonIndex -_080D93F8: .4byte gBattleAnimEnemyMonIndex +_080D93F4: .4byte gBattleAnimBankAttacker +_080D93F8: .4byte gBattleAnimBankTarget _080D93FC: .4byte gBattleAnimArgs _080D9400: .4byte sub_80D9404 thumb_func_end sub_80D9378 @@ -30842,7 +30842,7 @@ sub_80D943C: @ 80D943C str r0, [r4, 0x1C] ldr r1, _080D9470 @ =sub_80D9474 adds r0, r4, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 pop {r4,r5} pop {r0} bx r0 @@ -30870,7 +30870,7 @@ sub_80D9474: @ 80D9474 str r0, [r4, 0x1C] ldr r1, _080D94A4 @ =move_anim_8072740 adds r0, r4, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 pop {r4} pop {r0} bx r0 @@ -30913,7 +30913,7 @@ sub_80D94CC: @ 80D94CC bne _080D9510 movs r0, 0x6 strh r0, [r5, 0x2E] - ldr r4, _080D9518 @ =gBattleAnimEnemyMonIndex + ldr r4, _080D9518 @ =gBattleAnimBankTarget ldrb r0, [r4] movs r1, 0x2 bl sub_8077ABC @@ -30930,13 +30930,13 @@ sub_80D94CC: @ 80D94CC str r0, [r5, 0x1C] ldr r1, _080D9520 @ =sub_80D9524 adds r0, r5, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 _080D9510: pop {r4,r5} pop {r0} bx r0 .align 2, 0 -_080D9518: .4byte gBattleAnimEnemyMonIndex +_080D9518: .4byte gBattleAnimBankTarget _080D951C: .4byte sub_8078B34 _080D9520: .4byte sub_80D9524 thumb_func_end sub_80D94CC @@ -30949,7 +30949,7 @@ sub_80D9524: @ 80D9524 ldr r1, _080D9538 @ =sub_80782D8 str r1, [r0, 0x1C] ldr r1, _080D953C @ =move_anim_8072740 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 pop {r0} bx r0 .align 2, 0 @@ -31040,13 +31040,13 @@ sub_80D95D0: @ 80D95D0 ldrsh r0, [r0, r1] cmp r0, 0 bne _080D95EC - ldr r4, _080D95E8 @ =gBattleAnimPlayerMonIndex + ldr r4, _080D95E8 @ =gBattleAnimBankAttacker b _080D95EE .align 2, 0 _080D95E4: .4byte gBattleAnimArgs -_080D95E8: .4byte gBattleAnimPlayerMonIndex +_080D95E8: .4byte gBattleAnimBankAttacker _080D95EC: - ldr r4, _080D9634 @ =gBattleAnimEnemyMonIndex + ldr r4, _080D9634 @ =gBattleAnimBankTarget _080D95EE: ldrb r0, [r4] movs r1, 0 @@ -31082,7 +31082,7 @@ _080D95EE: pop {r0} bx r0 .align 2, 0 -_080D9634: .4byte gBattleAnimEnemyMonIndex +_080D9634: .4byte gBattleAnimBankTarget _080D9638: .4byte gBattleAnimArgs _080D963C: .4byte sub_80D9640 thumb_func_end sub_80D95D0 @@ -31165,7 +31165,7 @@ sub_80D96B8: @ 80D96B8 ldrsh r0, [r6, r1] cmp r0, 0 bne _080D96E4 - ldr r4, _080D96E0 @ =gBattleAnimPlayerMonIndex + ldr r4, _080D96E0 @ =gBattleAnimBankAttacker ldrb r0, [r4] movs r1, 0 bl sub_8077ABC @@ -31176,9 +31176,9 @@ sub_80D96B8: @ 80D96B8 b _080D96F6 .align 2, 0 _080D96DC: .4byte gBattleAnimArgs -_080D96E0: .4byte gBattleAnimPlayerMonIndex +_080D96E0: .4byte gBattleAnimBankAttacker _080D96E4: - ldr r4, _080D9740 @ =gBattleAnimEnemyMonIndex + ldr r4, _080D9740 @ =gBattleAnimBankTarget ldrb r0, [r4] movs r1, 0 bl sub_8077ABC @@ -31224,7 +31224,7 @@ _080D96F6: beq _080D975A b _080D978A .align 2, 0 -_080D9740: .4byte gBattleAnimEnemyMonIndex +_080D9740: .4byte gBattleAnimBankTarget _080D9744: .4byte gBattleAnimArgs _080D9748: .4byte 0x000003ff _080D974C: .4byte 0xfffffc00 @@ -31322,7 +31322,7 @@ sub_80D97CC: @ 80D97CC lsls r0, 24 lsrs r0, 24 strh r0, [r5, 0x22] - ldr r0, _080D9820 @ =gBattleAnimPlayerMonIndex + ldr r0, _080D9820 @ =gBattleAnimBankAttacker ldrb r0, [r0] bl sub_8079ED4 movs r1, 0x3 @@ -31334,15 +31334,15 @@ sub_80D97CC: @ 80D97CC ands r0, r2 orrs r0, r1 strb r0, [r5, 0x5] - ldr r0, _080D9824 @ =gBattleAnimEnemyMonIndex + ldr r0, _080D9824 @ =gBattleAnimBankTarget b _080D9844 .align 2, 0 _080D9818: .4byte gBattleAnimArgs _080D981C: .4byte gBankAttacker -_080D9820: .4byte gBattleAnimPlayerMonIndex -_080D9824: .4byte gBattleAnimEnemyMonIndex +_080D9820: .4byte gBattleAnimBankAttacker +_080D9824: .4byte gBattleAnimBankTarget _080D9828: - ldr r0, _080D9860 @ =gBattleAnimEnemyMonIndex + ldr r0, _080D9860 @ =gBattleAnimBankTarget ldrb r0, [r0] bl sub_8079ED4 movs r1, 0x3 @@ -31354,7 +31354,7 @@ _080D9828: ands r0, r2 orrs r0, r1 strb r0, [r5, 0x5] - ldr r0, _080D9864 @ =gBattleAnimPlayerMonIndex + ldr r0, _080D9864 @ =gBattleAnimBankAttacker _080D9844: ldrb r0, [r0] strh r0, [r5, 0x3C] @@ -31370,8 +31370,8 @@ _080D9844: pop {r0} bx r0 .align 2, 0 -_080D9860: .4byte gBattleAnimEnemyMonIndex -_080D9864: .4byte gBattleAnimPlayerMonIndex +_080D9860: .4byte gBattleAnimBankTarget +_080D9864: .4byte gBattleAnimBankAttacker _080D9868: .4byte sub_80D986C thumb_func_end sub_80D97CC @@ -31415,7 +31415,7 @@ sub_80D986C: @ 80D986C bl obj_translate_based_on_private_1_2_3_4 ldr r1, _080D98D0 @ =move_anim_8074EE0 adds r0, r4, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 ldr r0, _080D98D4 @ =sub_8078BB8 str r0, [r4, 0x1C] _080D98C6: @@ -31515,7 +31515,7 @@ _080D997E: strh r0, [r7, 0x2E] b _080D99DC _080D9986: - ldr r4, _080D99E8 @ =gBattleAnimPlayerMonIndex + ldr r4, _080D99E8 @ =gBattleAnimBankAttacker ldrb r0, [r4] movs r1, 0x2 bl sub_8077ABC @@ -31528,7 +31528,7 @@ _080D9986: adds r5, r0, 0 lsls r5, 24 lsrs r5, 24 - ldr r2, _080D99EC @ =gBattleAnimEnemyMonIndex + ldr r2, _080D99EC @ =gBattleAnimBankTarget mov r8, r2 ldrb r0, [r2] movs r1, 0x2 @@ -31561,8 +31561,8 @@ _080D99DC: pop {r0} bx r0 .align 2, 0 -_080D99E8: .4byte gBattleAnimPlayerMonIndex -_080D99EC: .4byte gBattleAnimEnemyMonIndex +_080D99E8: .4byte gBattleAnimBankAttacker +_080D99EC: .4byte gBattleAnimBankTarget _080D99F0: .4byte sub_80D99F4 thumb_func_end sub_80D9934 @@ -31627,19 +31627,19 @@ sub_80D9A38: @ 80D9A38 lsls r0, 24 lsrs r0, 24 strh r0, [r5, 0x22] - ldr r0, _080D9A74 @ =gBattleAnimEnemyMonIndex + ldr r0, _080D9A74 @ =gBattleAnimBankTarget ldrb r4, [r0] - ldr r0, _080D9A78 @ =gBattleAnimPlayerMonIndex + ldr r0, _080D9A78 @ =gBattleAnimBankAttacker b _080D9A82 .align 2, 0 _080D9A6C: .4byte gBattleAnimArgs _080D9A70: .4byte gBankAttacker -_080D9A74: .4byte gBattleAnimEnemyMonIndex -_080D9A78: .4byte gBattleAnimPlayerMonIndex +_080D9A74: .4byte gBattleAnimBankTarget +_080D9A78: .4byte gBattleAnimBankAttacker _080D9A7C: - ldr r0, _080D9AB4 @ =gBattleAnimPlayerMonIndex + ldr r0, _080D9AB4 @ =gBattleAnimBankAttacker ldrb r4, [r0] - ldr r0, _080D9AB8 @ =gBattleAnimEnemyMonIndex + ldr r0, _080D9AB8 @ =gBattleAnimBankTarget _080D9A82: ldrb r0, [r0] bl sub_8079ED4 @@ -31665,8 +31665,8 @@ _080D9A82: subs r0, 0x47 b _080D9AD6 .align 2, 0 -_080D9AB4: .4byte gBattleAnimPlayerMonIndex -_080D9AB8: .4byte gBattleAnimEnemyMonIndex +_080D9AB4: .4byte gBattleAnimBankAttacker +_080D9AB8: .4byte gBattleAnimBankTarget _080D9ABC: adds r0, r4, 0 bl GetBankSide @@ -31707,7 +31707,7 @@ _080D9ADC: bl obj_translate_based_on_private_1_2_3_4 ldr r1, _080D9B1C @ =move_anim_8072740 adds r0, r5, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 ldr r0, _080D9B20 @ =sub_8078BB8 str r0, [r5, 0x1C] pop {r4,r5} @@ -31743,7 +31743,7 @@ _080D9B3A: sub_80D9B48: @ 80D9B48 push {r4-r6,lr} adds r5, r0, 0 - ldr r4, _080D9BC4 @ =gBattleAnimEnemyMonIndex + ldr r4, _080D9BC4 @ =gBattleAnimBankTarget ldrb r0, [r4] movs r1, 0x2 bl sub_8077ABC @@ -31802,7 +31802,7 @@ _080D9BA6: pop {r0} bx r0 .align 2, 0 -_080D9BC4: .4byte gBattleAnimEnemyMonIndex +_080D9BC4: .4byte gBattleAnimBankTarget _080D9BC8: .4byte gBattleAnimArgs _080D9BCC: .4byte gUnknown_0202F7C4 _080D9BD0: .4byte sub_80D9B24 @@ -31837,7 +31837,7 @@ _080D9BF8: bl StartSpriteAnim b _080D9C22 _080D9C0C: - ldr r0, _080D9C34 @ =gBattleAnimPlayerMonIndex + ldr r0, _080D9C34 @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -31851,12 +31851,12 @@ _080D9C22: str r0, [r4, 0x1C] ldr r1, _080D9C3C @ =move_anim_8072740 adds r0, r4, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 pop {r4} pop {r0} bx r0 .align 2, 0 -_080D9C34: .4byte gBattleAnimPlayerMonIndex +_080D9C34: .4byte gBattleAnimBankAttacker _080D9C38: .4byte sub_8078600 _080D9C3C: .4byte move_anim_8072740 thumb_func_end sub_80D9BD4 @@ -31952,7 +31952,7 @@ _080D9CDE: ldrh r1, [r4, 0x1C] adds r0, r1 strh r0, [r4, 0x1C] - ldr r0, _080D9D0C @ =gBattleAnimEnemyMonIndex + ldr r0, _080D9D0C @ =gBattleAnimBankTarget ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -31968,7 +31968,7 @@ _080D9CDE: adds r7, r1, 0 b _080D9D24 .align 2, 0 -_080D9D0C: .4byte gBattleAnimEnemyMonIndex +_080D9D0C: .4byte gBattleAnimBankTarget _080D9D10: .4byte gUnknown_030041B0 _080D9D14: ldr r2, _080D9D64 @ =gUnknown_030041B0 @@ -32034,7 +32034,7 @@ _080D9D86: bl sub_80787B0 ldrh r0, [r4, 0x4] strh r0, [r5, 0x2E] - ldr r4, _080D9DC8 @ =gBattleAnimEnemyMonIndex + ldr r4, _080D9DC8 @ =gBattleAnimBankTarget ldrb r0, [r4] movs r1, 0x2 bl sub_8077ABC @@ -32058,7 +32058,7 @@ _080D9D86: bx r0 .align 2, 0 _080D9DC4: .4byte gBattleAnimArgs -_080D9DC8: .4byte gBattleAnimEnemyMonIndex +_080D9DC8: .4byte gBattleAnimBankTarget _080D9DCC: .4byte 0x0000ffe2 _080D9DD0: .4byte sub_80D9DD4 thumb_func_end sub_80D9D70 @@ -32096,7 +32096,7 @@ _080D9E08: adds r0, r4, 0 movs r1, 0x1 bl sub_80787B0 - ldr r0, _080D9E68 @ =gBattleAnimEnemyMonIndex + ldr r0, _080D9E68 @ =gBattleAnimBankTarget ldrb r0, [r0] mov r6, sp adds r6, 0x2 @@ -32104,7 +32104,7 @@ _080D9E08: mov r2, sp adds r3, r6, 0 bl sub_807A3FC - ldr r0, _080D9E6C @ =gBattleAnimPlayerMonIndex + ldr r0, _080D9E6C @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -32137,8 +32137,8 @@ _080D9E36: bx r0 .align 2, 0 _080D9E64: .4byte gBattleAnimArgs -_080D9E68: .4byte gBattleAnimEnemyMonIndex -_080D9E6C: .4byte gBattleAnimPlayerMonIndex +_080D9E68: .4byte gBattleAnimBankTarget +_080D9E6C: .4byte gBattleAnimBankAttacker _080D9E70: .4byte 0x0000ffe2 _080D9E74: .4byte sub_80D9E78 thumb_func_end sub_80D9DF0 @@ -32229,7 +32229,7 @@ _080D9F0E: sub_80D9F14: @ 80D9F14 push {r4,lr} adds r4, r0, 0 - ldr r0, _080D9F74 @ =gBattleAnimEnemyMonIndex + ldr r0, _080D9F74 @ =gBattleAnimBankTarget ldrb r0, [r0] adds r2, r4, 0 adds r2, 0x20 @@ -32237,7 +32237,7 @@ sub_80D9F14: @ 80D9F14 adds r3, 0x22 movs r1, 0x1 bl sub_807A3FC - ldr r0, _080D9F78 @ =gBattleAnimPlayerMonIndex + ldr r0, _080D9F78 @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -32268,13 +32268,13 @@ _080D9F40: str r0, [r4, 0x1C] ldr r1, _080D9F84 @ =move_anim_8072740 adds r0, r4, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 pop {r4} pop {r0} bx r0 .align 2, 0 -_080D9F74: .4byte gBattleAnimEnemyMonIndex -_080D9F78: .4byte gBattleAnimPlayerMonIndex +_080D9F74: .4byte gBattleAnimBankTarget +_080D9F78: .4byte gBattleAnimBankAttacker _080D9F7C: .4byte gBattleAnimArgs _080D9F80: .4byte sub_8078B34 _080D9F84: .4byte move_anim_8072740 @@ -32296,7 +32296,7 @@ sub_80D9F88: @ 80D9F88 .align 2, 0 _080D9FA0: .4byte gBattleAnimArgs _080D9FA4: - ldr r0, _080D9FE4 @ =gBattleAnimEnemyMonIndex + ldr r0, _080D9FE4 @ =gBattleAnimBankTarget ldrb r0, [r0] adds r2, r4, 0 adds r2, 0x20 @@ -32304,7 +32304,7 @@ _080D9FA4: adds r3, 0x22 movs r1, 0x1 bl sub_807A3FC - ldr r0, _080D9FE8 @ =gBattleAnimPlayerMonIndex + ldr r0, _080D9FE8 @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -32329,8 +32329,8 @@ _080D9FDA: pop {r0} bx r0 .align 2, 0 -_080D9FE4: .4byte gBattleAnimEnemyMonIndex -_080D9FE8: .4byte gBattleAnimPlayerMonIndex +_080D9FE4: .4byte gBattleAnimBankTarget +_080D9FE8: .4byte gBattleAnimBankAttacker _080D9FEC: .4byte sub_80D9FF0 thumb_func_end sub_80D9F88 @@ -32538,7 +32538,7 @@ sub_80DA16C: @ 80DA16C adds r6, r0, 0 movs r1, 0x1 bl sub_80787B0 - ldr r0, _080DA1D8 @ =gBattleAnimPlayerMonIndex + ldr r0, _080DA1D8 @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -32554,7 +32554,7 @@ _080DA18C: strh r0, [r6, 0x2E] ldrh r0, [r6, 0x20] strh r0, [r6, 0x30] - ldr r5, _080DA1E0 @ =gBattleAnimEnemyMonIndex + ldr r5, _080DA1E0 @ =gBattleAnimBankTarget ldrb r0, [r5] movs r1, 0x2 bl sub_8077ABC @@ -32579,14 +32579,14 @@ _080DA18C: str r0, [r6, 0x1C] ldr r1, _080DA1E8 @ =sub_80DA1EC adds r0, r6, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 pop {r4-r6} pop {r0} bx r0 .align 2, 0 -_080DA1D8: .4byte gBattleAnimPlayerMonIndex +_080DA1D8: .4byte gBattleAnimBankAttacker _080DA1DC: .4byte gBattleAnimArgs -_080DA1E0: .4byte gBattleAnimEnemyMonIndex +_080DA1E0: .4byte gBattleAnimBankTarget _080DA1E4: .4byte sub_80785E4 _080DA1E8: .4byte sub_80DA1EC thumb_func_end sub_80DA16C @@ -32611,7 +32611,7 @@ _080DA200: sub_80DA208: @ 80DA208 push {r4,r5,lr} adds r5, r0, 0 - ldr r4, _080DA2A4 @ =gBattleAnimPlayerMonIndex + ldr r4, _080DA2A4 @ =gBattleAnimBankAttacker ldrb r0, [r4] bl GetBankSide lsls r0, 24 @@ -32668,7 +32668,7 @@ _080DA24C: ldrsh r0, [r2, r3] cmp r0, 0 bne _080DA2B0 - ldr r4, _080DA2AC @ =gBattleAnimEnemyMonIndex + ldr r4, _080DA2AC @ =gBattleAnimBankTarget ldrb r0, [r4] movs r1, 0x2 bl sub_8077ABC @@ -32683,11 +32683,11 @@ _080DA24C: strh r0, [r5, 0x36] b _080DA2C2 .align 2, 0 -_080DA2A4: .4byte gBattleAnimPlayerMonIndex +_080DA2A4: .4byte gBattleAnimBankAttacker _080DA2A8: .4byte gBattleAnimArgs -_080DA2AC: .4byte gBattleAnimEnemyMonIndex +_080DA2AC: .4byte gBattleAnimBankTarget _080DA2B0: - ldr r0, _080DA2F0 @ =gBattleAnimEnemyMonIndex + ldr r0, _080DA2F0 @ =gBattleAnimBankTarget ldrb r0, [r0] adds r2, r5, 0 adds r2, 0x32 @@ -32709,7 +32709,7 @@ _080DA2C2: str r0, [r5, 0x1C] ldr r1, _080DA2FC @ =move_anim_8072740 adds r0, r5, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 ldrb r1, [r4, 0xA] adds r0, r5, 0 bl SeekSpriteAnim @@ -32717,7 +32717,7 @@ _080DA2C2: pop {r0} bx r0 .align 2, 0 -_080DA2F0: .4byte gBattleAnimEnemyMonIndex +_080DA2F0: .4byte gBattleAnimBankTarget _080DA2F4: .4byte gBattleAnimArgs _080DA2F8: .4byte sub_8078B34 _080DA2FC: .4byte move_anim_8072740 @@ -32737,7 +32737,7 @@ sub_80DA300: @ 80DA300 ldr r0, _080DA340 @ =sub_80DA348 str r0, [r4, 0x1C] movs r0, 0 - bl obj_id_for_side_relative_to_move + bl GetAnimBankSpriteId ldr r2, _080DA344 @ =gSprites lsls r0, 24 lsrs r0, 24 @@ -32802,7 +32802,7 @@ _080DA386: sub_80DA38C: @ 80DA38C push {r4,r5,lr} adds r5, r0, 0 - ldr r0, _080DA3B4 @ =gBattleAnimPlayerMonIndex + ldr r0, _080DA3B4 @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -32818,7 +32818,7 @@ sub_80DA38C: @ 80DA38C bl StartSpriteAffineAnim b _080DA3C2 .align 2, 0 -_080DA3B4: .4byte gBattleAnimPlayerMonIndex +_080DA3B4: .4byte gBattleAnimBankAttacker _080DA3B8: .4byte 0x0000ffe0 _080DA3BC: ldr r0, _080DA400 @ =0x0000ffe0 @@ -32830,7 +32830,7 @@ _080DA3C2: strh r0, [r5, 0x2E] ldrh r0, [r5, 0x20] strh r0, [r5, 0x30] - ldr r4, _080DA408 @ =gBattleAnimEnemyMonIndex + ldr r4, _080DA408 @ =gBattleAnimBankTarget ldrb r0, [r4] movs r1, 0x2 bl sub_8077ABC @@ -32855,7 +32855,7 @@ _080DA3C2: .align 2, 0 _080DA400: .4byte 0x0000ffe0 _080DA404: .4byte gBattleAnimArgs -_080DA408: .4byte gBattleAnimEnemyMonIndex +_080DA408: .4byte gBattleAnimBankTarget _080DA40C: .4byte sub_80DA410 thumb_func_end sub_80DA38C @@ -32900,7 +32900,7 @@ _080DA438: ble _080DA480 _080DA45A: movs r0, 0 - bl obj_id_for_side_relative_to_move + bl GetAnimBankSpriteId ldr r2, _080DA488 @ =gSprites lsls r0, 24 lsrs r0, 24 @@ -32980,13 +32980,13 @@ sub_80DA4D8: @ 80DA4D8 ands r0, r1 cmp r0, 0 beq _080DA500 - ldr r0, _080DA4FC @ =gBattleAnimPlayerMonIndex + ldr r0, _080DA4FC @ =gBattleAnimBankAttacker b _080DA502 .align 2, 0 _080DA4F8: .4byte gBattleAnimArgs -_080DA4FC: .4byte gBattleAnimPlayerMonIndex +_080DA4FC: .4byte gBattleAnimBankAttacker _080DA500: - ldr r0, _080DA5B0 @ =gBattleAnimEnemyMonIndex + ldr r0, _080DA5B0 @ =gBattleAnimBankTarget _080DA502: ldrb r6, [r0] adds r0, r6, 0 @@ -33073,7 +33073,7 @@ _080DA518: strb r1, [r7, 0x5] b _080DA5D8 .align 2, 0 -_080DA5B0: .4byte gBattleAnimEnemyMonIndex +_080DA5B0: .4byte gBattleAnimBankTarget _080DA5B4: .4byte gBattleAnimArgs _080DA5B8: .4byte gMain _080DA5BC: .4byte 0x0000043d @@ -34081,7 +34081,7 @@ _080DAD2C: .4byte sub_80DA48C sub_80DAD30: @ 80DAD30 push {r4,r5,lr} adds r4, r0, 0 - ldr r0, _080DAD78 @ =gBattleAnimEnemyMonIndex + ldr r0, _080DAD78 @ =gBattleAnimBankTarget ldrb r0, [r0] bl sub_8079ED4 movs r1, 0x3 @@ -34093,7 +34093,7 @@ sub_80DAD30: @ 80DAD30 ands r0, r2 orrs r0, r1 strb r0, [r4, 0x5] - ldr r5, _080DAD7C @ =gBattleAnimPlayerMonIndex + ldr r5, _080DAD7C @ =gBattleAnimBankAttacker ldrb r0, [r5] movs r1, 0x2 bl sub_8077ABC @@ -34112,8 +34112,8 @@ sub_80DAD30: @ 80DAD30 pop {r0} bx r0 .align 2, 0 -_080DAD78: .4byte gBattleAnimEnemyMonIndex -_080DAD7C: .4byte gBattleAnimPlayerMonIndex +_080DAD78: .4byte gBattleAnimBankTarget +_080DAD7C: .4byte gBattleAnimBankAttacker _080DAD80: .4byte sub_807941C thumb_func_end sub_80DAD30 @@ -34137,7 +34137,7 @@ sub_80DAD84: @ 80DAD84 cmp r0, 0 beq _080DAE44 ldr r0, _080DADD8 @ =gBanksBySide - ldr r1, _080DADDC @ =gBattleAnimEnemyMonIndex + ldr r1, _080DADDC @ =gBattleAnimBankTarget ldrb r2, [r1] adds r0, r2, r0 ldrb r1, [r0] @@ -34158,7 +34158,7 @@ _080DADCC: .4byte gBattleAnimArgs _080DADD0: .4byte gMain _080DADD4: .4byte 0x0000043d _080DADD8: .4byte gBanksBySide -_080DADDC: .4byte gBattleAnimEnemyMonIndex +_080DADDC: .4byte gBattleAnimBankTarget _080DADE0: adds r0, r2, 0 movs r1, 0x1 @@ -34173,7 +34173,7 @@ _080DADEE: ldrsh r0, [r0, r1] cmp r0, 0 beq _080DAE24 - ldr r0, _080DAE20 @ =gBattleAnimEnemyMonIndex + ldr r0, _080DAE20 @ =gBattleAnimBankTarget ldrb r0, [r0] bl sub_8079ED4 lsls r0, 24 @@ -34191,9 +34191,9 @@ _080DADEE: b _080DAE58 .align 2, 0 _080DAE1C: .4byte gBattleAnimArgs -_080DAE20: .4byte gBattleAnimEnemyMonIndex +_080DAE20: .4byte gBattleAnimBankTarget _080DAE24: - ldr r0, _080DAE40 @ =gBattleAnimEnemyMonIndex + ldr r0, _080DAE40 @ =gBattleAnimBankTarget ldrb r0, [r0] bl sub_8079ED4 movs r1, 0x3 @@ -34207,9 +34207,9 @@ _080DAE24: strb r0, [r4, 0x5] b _080DAE58 .align 2, 0 -_080DAE40: .4byte gBattleAnimEnemyMonIndex +_080DAE40: .4byte gBattleAnimBankTarget _080DAE44: - ldr r0, _080DAEFC @ =gBattleAnimEnemyMonIndex + ldr r0, _080DAEFC @ =gBattleAnimBankTarget ldrb r0, [r0] movs r1, 0x1 bl sub_8077ABC @@ -34303,7 +34303,7 @@ _080DAEF2: pop {r0} bx r0 .align 2, 0 -_080DAEFC: .4byte gBattleAnimEnemyMonIndex +_080DAEFC: .4byte gBattleAnimBankTarget _080DAF00: .4byte gSineTable _080DAF04: .4byte gOamMatrices _080DAF08: .4byte sub_80DAF0C @@ -34463,7 +34463,7 @@ _080DB024: ldrsh r0, [r4, r2] cmp r0, 0 bne _080DB03C - ldr r0, _080DB090 @ =gBattleAnimPlayerMonIndex + ldr r0, _080DB090 @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -34474,7 +34474,7 @@ _080DB03C: ldrsh r0, [r4, r1] cmp r0, 0x1 bne _080DB058 - ldr r0, _080DB094 @ =gBattleAnimEnemyMonIndex + ldr r0, _080DB094 @ =gBattleAnimBankTarget ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -34512,8 +34512,8 @@ _080DB058: bx r0 .align 2, 0 _080DB08C: .4byte gBattleAnimArgs -_080DB090: .4byte gBattleAnimPlayerMonIndex -_080DB094: .4byte gBattleAnimEnemyMonIndex +_080DB090: .4byte gBattleAnimBankAttacker +_080DB094: .4byte gBattleAnimBankTarget _080DB098: .4byte 0x00000ccc _080DB09C: .4byte sub_80DB0A0 thumb_func_end sub_80DB000 @@ -34599,7 +34599,7 @@ sub_80DB0E8: @ 80DB0E8 strh r0, [r4, 0x6] ldr r0, _080DB18C @ =gBattleAnimSpriteTemplate_83DB538 mov r8, r0 - ldr r5, _080DB190 @ =gBattleAnimEnemyMonIndex + ldr r5, _080DB190 @ =gBattleAnimBankTarget ldrb r0, [r5] movs r1, 0x2 bl sub_8077ABC @@ -34637,7 +34637,7 @@ _080DB180: .4byte gTasks _080DB184: .4byte gAnimVisualTaskCount _080DB188: .4byte gBattleAnimArgs _080DB18C: .4byte gBattleAnimSpriteTemplate_83DB538 -_080DB190: .4byte gBattleAnimEnemyMonIndex +_080DB190: .4byte gBattleAnimBankTarget thumb_func_end sub_80DB0E8 thumb_func_start sub_80DB194 @@ -34656,7 +34656,7 @@ _080DB1A6: movs r1, 0x1 bl sub_80787B0 movs r0, 0 - bl obj_id_for_side_relative_to_move + bl GetAnimBankSpriteId ldr r2, _080DB1D4 @ =gSprites lsls r0, 24 lsrs r0, 24 @@ -34709,7 +34709,7 @@ _080DB20A: beq _080DB240 b _080DB27E _080DB210: - ldr r0, _080DB228 @ =gBattleAnimEnemyMonIndex + ldr r0, _080DB228 @ =gBattleAnimBankTarget ldrb r0, [r0] movs r1, 0x1 bl sub_8077ABC @@ -34721,7 +34721,7 @@ _080DB210: strh r0, [r4, 0x26] b _080DB238 .align 2, 0 -_080DB228: .4byte gBattleAnimEnemyMonIndex +_080DB228: .4byte gBattleAnimBankTarget _080DB22C: ldrh r0, [r4, 0x26] adds r0, 0xA @@ -34748,7 +34748,7 @@ _080DB240: cmp r0, r1 bge _080DB27E movs r0, 0 - bl obj_id_for_side_relative_to_move + bl GetAnimBankSpriteId ldr r2, _080DB284 @ =gSprites lsls r0, 24 lsrs r0, 24 @@ -34786,7 +34786,7 @@ sub_80DB288: @ 80DB288 ldr r0, _080DB2C8 @ =sub_80DB2D0 str r0, [r4, 0x1C] movs r0, 0 - bl obj_id_for_side_relative_to_move + bl GetAnimBankSpriteId ldr r2, _080DB2CC @ =gSprites lsls r0, 24 lsrs r0, 24 @@ -34919,13 +34919,13 @@ _080DB388: ldrsh r0, [r0, r2] cmp r0, 0 bne _080DB3A0 - ldr r4, _080DB39C @ =gBattleAnimPlayerMonIndex + ldr r4, _080DB39C @ =gBattleAnimBankAttacker b _080DB3A2 .align 2, 0 _080DB398: .4byte gBattleAnimArgs -_080DB39C: .4byte gBattleAnimPlayerMonIndex +_080DB39C: .4byte gBattleAnimBankAttacker _080DB3A0: - ldr r4, _080DB3DC @ =gBattleAnimEnemyMonIndex + ldr r4, _080DB3DC @ =gBattleAnimBankTarget _080DB3A2: ldrb r0, [r4] movs r1, 0 @@ -34954,7 +34954,7 @@ _080DB3A2: strh r0, [r5, 0x2E] b _080DB44C .align 2, 0 -_080DB3DC: .4byte gBattleAnimEnemyMonIndex +_080DB3DC: .4byte gBattleAnimBankTarget _080DB3E0: movs r1, 0x32 ldrsh r0, [r5, r1] @@ -35079,13 +35079,13 @@ _080DB4C0: ldrsh r0, [r2, r1] cmp r0, 0 bne _080DB4D4 - ldr r4, _080DB4D0 @ =gBattleAnimPlayerMonIndex + ldr r4, _080DB4D0 @ =gBattleAnimBankAttacker b _080DB4D6 .align 2, 0 _080DB4CC: .4byte gBattleAnimArgs -_080DB4D0: .4byte gBattleAnimPlayerMonIndex +_080DB4D0: .4byte gBattleAnimBankAttacker _080DB4D4: - ldr r4, _080DB500 @ =gBattleAnimEnemyMonIndex + ldr r4, _080DB500 @ =gBattleAnimBankTarget _080DB4D6: ldrb r0, [r4] movs r1, 0 @@ -35106,7 +35106,7 @@ _080DB4D6: pop {r0} bx r0 .align 2, 0 -_080DB500: .4byte gBattleAnimEnemyMonIndex +_080DB500: .4byte gBattleAnimBankTarget _080DB504: .4byte sub_80DB508 thumb_func_end sub_80DB458 @@ -35245,7 +35245,7 @@ sub_80DB5E4: @ 80DB5E4 mov r8, r0 ldrh r4, [r0, 0x20] ldrh r5, [r0, 0x22] - ldr r6, _080DB698 @ =gBattleAnimPlayerMonIndex + ldr r6, _080DB698 @ =gBattleAnimBankAttacker ldrb r0, [r6] movs r1, 0x2 bl sub_8077ABC @@ -35321,7 +35321,7 @@ sub_80DB5E4: @ 80DB5E4 pop {r0} bx r0 .align 2, 0 -_080DB698: .4byte gBattleAnimPlayerMonIndex +_080DB698: .4byte gBattleAnimBankAttacker _080DB69C: .4byte sub_80DB6A0 thumb_func_end sub_80DB5E4 @@ -35375,7 +35375,7 @@ unref_sub_80DB6E4: @ 80DB6E4 cmp r0, 0 bne _080DB71C movs r0, 0 - bl obj_id_for_side_relative_to_move + bl GetAnimBankSpriteId lsls r0, 24 lsrs r0, 24 ldr r2, _080DB718 @ =gSprites @@ -35393,7 +35393,7 @@ _080DB714: .4byte gBattleAnimArgs _080DB718: .4byte gSprites _080DB71C: movs r0, 0 - bl obj_id_for_side_relative_to_move + bl GetAnimBankSpriteId lsls r0, 24 lsrs r0, 24 ldr r2, _080DB748 @ =gSprites @@ -35421,7 +35421,7 @@ _080DB748: .4byte gSprites sub_80DB74C: @ 80DB74C push {r4-r7,lr} adds r6, r0, 0 - ldr r0, _080DB804 @ =gBattleAnimPlayerMonIndex + ldr r0, _080DB804 @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -35463,7 +35463,7 @@ _080DB77E: orrs r1, r0 lsrs r5, r1, 31 adds r0, r4, 0 - bl b_side_obj__get_some_boolean + bl IsAnimBankSpriteVisible lsls r0, 24 cmp r0, 0 beq _080DB7BC @@ -35475,7 +35475,7 @@ _080DB7BC: adds r4, r0, 0 eors r4, r7 adds r0, r4, 0 - bl b_side_obj__get_some_boolean + bl IsAnimBankSpriteVisible lsls r0, 24 cmp r0, 0 beq _080DB7DA @@ -35493,7 +35493,7 @@ _080DB7DA: lsls r0, 24 cmp r0, 0 beq _080DB810 - ldr r0, _080DB804 @ =gBattleAnimPlayerMonIndex + ldr r0, _080DB804 @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -35504,14 +35504,14 @@ _080DB7DA: movs r0, 0x50 b _080DB84A .align 2, 0 -_080DB804: .4byte gBattleAnimPlayerMonIndex +_080DB804: .4byte gBattleAnimBankAttacker _080DB808: movs r0, 0xB0 strh r0, [r6, 0x20] movs r0, 0x28 b _080DB84A _080DB810: - ldr r5, _080DB880 @ =gBattleAnimPlayerMonIndex + ldr r5, _080DB880 @ =gBattleAnimBankAttacker ldrb r0, [r5] bl GetBankSide lsls r0, 24 @@ -35565,7 +35565,7 @@ _080DB85C: pop {r0} bx r0 .align 2, 0 -_080DB880: .4byte gBattleAnimPlayerMonIndex +_080DB880: .4byte gBattleAnimBankAttacker _080DB884: .4byte gBattleAnimArgs _080DB888: .4byte sub_80DB88C thumb_func_end sub_80DB74C @@ -35689,7 +35689,7 @@ sub_80DB92C: @ 80DB92C lsrs r4, r0, 24 adds r6, r4, 0 adds r0, r4, 0 - bl b_side_obj__get_some_boolean + bl IsAnimBankSpriteVisible lsls r0, 24 cmp r0, 0 beq _080DB98E @@ -35712,7 +35712,7 @@ _080DB98E: adds r4, r0, 0 eors r4, r6 adds r0, r4, 0 - bl b_side_obj__get_some_boolean + bl IsAnimBankSpriteVisible lsls r0, 24 cmp r0, 0 beq _080DB9BC @@ -35772,7 +35772,7 @@ sub_80DB9E4: @ 80DB9E4 orrs r1, r0 lsrs r5, r1, 31 adds r0, r4, 0 - bl b_side_obj__get_some_boolean + bl IsAnimBankSpriteVisible lsls r0, 24 cmp r0, 0 beq _080DBA22 @@ -35782,7 +35782,7 @@ _080DBA22: movs r0, 0x2 eors r4, r0 adds r0, r4, 0 - bl b_side_obj__get_some_boolean + bl IsAnimBankSpriteVisible lsls r0, 24 cmp r0, 0 beq _080DBA3C @@ -35824,7 +35824,7 @@ _080DBA66: lsls r0, 24 cmp r0, 0 beq _080DBAAE - ldr r0, _080DBA9C @ =gBattleAnimPlayerMonIndex + ldr r0, _080DBA9C @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -35840,7 +35840,7 @@ _080DBA66: b _080DBAD0 .align 2, 0 _080DBA98: .4byte gBattleAnimArgs -_080DBA9C: .4byte gBattleAnimPlayerMonIndex +_080DBA9C: .4byte gBattleAnimBankAttacker _080DBAA0: ldrh r0, [r5] adds r0, 0xB0 @@ -35890,7 +35890,7 @@ _080DBAEC: sub_80DBAF4: @ 80DBAF4 push {r4,r5,lr} adds r5, r0, 0 - ldr r4, _080DBB3C @ =gBattleAnimPlayerMonIndex + ldr r4, _080DBB3C @ =gBattleAnimBankAttacker ldrb r0, [r4] movs r1, 0x2 bl sub_8077ABC @@ -35920,7 +35920,7 @@ sub_80DBAF4: @ 80DBAF4 ldr r0, _080DBB40 @ =0x0000ffff b _080DBB52 .align 2, 0 -_080DBB3C: .4byte gBattleAnimPlayerMonIndex +_080DBB3C: .4byte gBattleAnimBankAttacker _080DBB40: .4byte 0x0000ffff _080DBB44: ldrh r0, [r5, 0x20] @@ -35934,7 +35934,7 @@ _080DBB52: strh r0, [r5, 0x30] ldr r1, _080DBB68 @ =move_anim_8072740 adds r0, r5, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 ldr r0, _080DBB6C @ =sub_8078600 str r0, [r5, 0x1C] pop {r4,r5} @@ -35949,7 +35949,7 @@ _080DBB6C: .4byte sub_8078600 sub_80DBB70: @ 80DBB70 push {r4-r7,lr} adds r5, r0, 0 - ldr r6, _080DBBF4 @ =gBattleAnimPlayerMonIndex + ldr r6, _080DBBF4 @ =gBattleAnimBankAttacker ldrb r0, [r6] movs r1, 0x1 bl sub_807A100 @@ -36003,14 +36003,14 @@ _080DBBB6: _080DBBE2: ldr r1, _080DBBF8 @ =sub_80DBC00 adds r0, r5, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 ldr r0, _080DBBFC @ =sub_8078600 str r0, [r5, 0x1C] pop {r4-r7} pop {r0} bx r0 .align 2, 0 -_080DBBF4: .4byte gBattleAnimPlayerMonIndex +_080DBBF4: .4byte gBattleAnimBankAttacker _080DBBF8: .4byte sub_80DBC00 _080DBBFC: .4byte sub_8078600 thumb_func_end sub_80DBB70 @@ -36105,7 +36105,7 @@ sub_80DBC94: @ 80DBC94 ldr r0, _080DBCC4 @ =gTasks adds r4, r0 movs r0, 0 - bl obj_id_for_side_relative_to_move + bl GetAnimBankSpriteId adds r1, r0, 0 lsls r1, 24 lsrs r1, 24 @@ -36159,14 +36159,14 @@ sub_80DBCFC: @ 80DBCFC ldr r0, _080DBD48 @ =gTasks adds r4, r1, r0 movs r0, 0 - bl obj_id_for_side_relative_to_move + bl GetAnimBankSpriteId lsls r0, 24 lsrs r0, 24 movs r1, 0 strh r0, [r4, 0x8] strh r1, [r4, 0xA] strh r1, [r4, 0xC] - ldr r0, _080DBD4C @ =gBattleAnimPlayerMonIndex + ldr r0, _080DBD4C @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -36187,7 +36187,7 @@ _080DBD30: bx r0 .align 2, 0 _080DBD48: .4byte gTasks -_080DBD4C: .4byte gBattleAnimPlayerMonIndex +_080DBD4C: .4byte gBattleAnimBankAttacker _080DBD50: .4byte gUnknown_083DA8C4 _080DBD54: .4byte sub_80DBD58 thumb_func_end sub_80DBCFC @@ -36294,7 +36294,7 @@ sub_80DBE00: @ 80DBE00 movs r7, 0x10 strh r7, [r5, 0xE] strh r0, [r5, 0x10] - ldr r4, _080DBE88 @ =gBattleAnimPlayerMonIndex + ldr r4, _080DBE88 @ =gBattleAnimBankAttacker ldrb r0, [r4] movs r1, 0x2 bl sub_8077ABC @@ -36345,7 +36345,7 @@ _080DBE6A: bx r0 .align 2, 0 _080DBE84: .4byte gTasks -_080DBE88: .4byte gBattleAnimPlayerMonIndex +_080DBE88: .4byte gBattleAnimBankAttacker _080DBE8C: .4byte REG_BLDCNT _080DBE90: .4byte REG_BLDALPHA _080DBE94: .4byte sub_80DBE98 @@ -36614,7 +36614,7 @@ sub_80DC068: @ 80DC068 ldrsh r0, [r6, r1] cmp r0, 0 bne _080DC094 - ldr r4, _080DC0A8 @ =gBattleAnimPlayerMonIndex + ldr r4, _080DC0A8 @ =gBattleAnimBankAttacker ldrb r0, [r4] movs r1, 0x2 bl sub_8077ABC @@ -36637,7 +36637,7 @@ _080DC094: bx r0 .align 2, 0 _080DC0A4: .4byte gBattleAnimArgs -_080DC0A8: .4byte gBattleAnimPlayerMonIndex +_080DC0A8: .4byte gBattleAnimBankAttacker _080DC0AC: .4byte sub_80DC020 thumb_func_end sub_80DC068 @@ -36662,7 +36662,7 @@ sub_80DC0B0: @ 80DC0B0 bne _080DC120 ldr r0, _080DC114 @ =0x0000fff6 strh r0, [r5, 0x1C] - ldr r4, _080DC118 @ =gBattleAnimEnemyMonIndex + ldr r4, _080DC118 @ =gBattleAnimBankTarget ldrb r0, [r4] movs r1, 0x5 bl sub_807A100 @@ -36673,7 +36673,7 @@ sub_80DC0B0: @ 80DC0B0 bl sub_807A100 adds r0, 0x8 strh r0, [r5, 0x20] - ldr r4, _080DC11C @ =gBattleAnimPlayerMonIndex + ldr r4, _080DC11C @ =gBattleAnimBankAttacker ldrb r0, [r4] movs r1, 0x5 bl sub_807A100 @@ -36688,12 +36688,12 @@ sub_80DC0B0: @ 80DC0B0 _080DC10C: .4byte gTasks _080DC110: .4byte gBattleAnimArgs _080DC114: .4byte 0x0000fff6 -_080DC118: .4byte gBattleAnimEnemyMonIndex -_080DC11C: .4byte gBattleAnimPlayerMonIndex +_080DC118: .4byte gBattleAnimBankTarget +_080DC11C: .4byte gBattleAnimBankAttacker _080DC120: movs r0, 0xA strh r0, [r5, 0x1C] - ldr r4, _080DC14C @ =gBattleAnimPlayerMonIndex + ldr r4, _080DC14C @ =gBattleAnimBankAttacker ldrb r0, [r4] movs r1, 0x4 bl sub_807A100 @@ -36704,15 +36704,15 @@ _080DC120: bl sub_807A100 subs r0, 0x8 strh r0, [r5, 0x20] - ldr r4, _080DC150 @ =gBattleAnimEnemyMonIndex + ldr r4, _080DC150 @ =gBattleAnimBankTarget ldrb r0, [r4] movs r1, 0x4 bl sub_807A100 adds r0, 0x8 b _080DC1D2 .align 2, 0 -_080DC14C: .4byte gBattleAnimPlayerMonIndex -_080DC150: .4byte gBattleAnimEnemyMonIndex +_080DC14C: .4byte gBattleAnimBankAttacker +_080DC150: .4byte gBattleAnimBankTarget _080DC154: ldr r0, _080DC198 @ =gBattleAnimArgs movs r1, 0 @@ -36721,7 +36721,7 @@ _080DC154: bne _080DC1A8 ldr r0, _080DC19C @ =0x0000fff6 strh r0, [r5, 0x1C] - ldr r4, _080DC1A0 @ =gBattleAnimEnemyMonIndex + ldr r4, _080DC1A0 @ =gBattleAnimBankTarget ldrb r0, [r4] movs r1, 0x4 bl sub_807A100 @@ -36732,7 +36732,7 @@ _080DC154: bl sub_807A100 adds r0, 0x8 strh r0, [r5, 0x20] - ldr r4, _080DC1A4 @ =gBattleAnimPlayerMonIndex + ldr r4, _080DC1A4 @ =gBattleAnimBankAttacker ldrb r0, [r4] movs r1, 0x4 bl sub_807A100 @@ -36746,12 +36746,12 @@ _080DC154: .align 2, 0 _080DC198: .4byte gBattleAnimArgs _080DC19C: .4byte 0x0000fff6 -_080DC1A0: .4byte gBattleAnimEnemyMonIndex -_080DC1A4: .4byte gBattleAnimPlayerMonIndex +_080DC1A0: .4byte gBattleAnimBankTarget +_080DC1A4: .4byte gBattleAnimBankAttacker _080DC1A8: movs r0, 0xA strh r0, [r5, 0x1C] - ldr r4, _080DC1F0 @ =gBattleAnimPlayerMonIndex + ldr r4, _080DC1F0 @ =gBattleAnimBankAttacker ldrb r0, [r4] movs r1, 0x5 bl sub_807A100 @@ -36762,7 +36762,7 @@ _080DC1A8: bl sub_807A100 subs r0, 0x8 strh r0, [r5, 0x20] - ldr r4, _080DC1F4 @ =gBattleAnimEnemyMonIndex + ldr r4, _080DC1F4 @ =gBattleAnimBankTarget ldrb r0, [r4] movs r1, 0x5 bl sub_807A100 @@ -36783,8 +36783,8 @@ _080DC1DE: pop {r0} bx r0 .align 2, 0 -_080DC1F0: .4byte gBattleAnimPlayerMonIndex -_080DC1F4: .4byte gBattleAnimEnemyMonIndex +_080DC1F0: .4byte gBattleAnimBankAttacker +_080DC1F4: .4byte gBattleAnimBankTarget _080DC1F8: .4byte sub_80DC1FC thumb_func_end sub_80DC0B0 @@ -36909,7 +36909,7 @@ sub_80DC2D4: @ 80DC2D4 lsls r1, 3 ldr r0, _080DC30C @ =gTasks adds r4, r1, r0 - ldr r0, _080DC310 @ =gBattleAnimEnemyMonIndex + ldr r0, _080DC310 @ =gBattleAnimBankTarget ldrb r0, [r0] bl sub_8077FC0 lsls r0, 24 @@ -36929,7 +36929,7 @@ sub_80DC2D4: @ 80DC2D4 b _080DC346 .align 2, 0 _080DC30C: .4byte gTasks -_080DC310: .4byte gBattleAnimEnemyMonIndex +_080DC310: .4byte gBattleAnimBankTarget _080DC314: .4byte gBattleAnimArgs _080DC318: cmp r0, 0x2 @@ -36967,7 +36967,7 @@ _080DC346: movs r0, 0 strh r0, [r4, 0x24] _080DC352: - ldr r0, _080DC36C @ =gBattleAnimEnemyMonIndex + ldr r0, _080DC36C @ =gBattleAnimBankTarget ldrb r0, [r0] bl GetBankIdentity_permutated lsls r0, 24 @@ -36980,7 +36980,7 @@ _080DC352: ldr r0, _080DC374 @ =REG_BG1HOFS b _080DC380 .align 2, 0 -_080DC36C: .4byte gBattleAnimEnemyMonIndex +_080DC36C: .4byte gBattleAnimBankTarget _080DC370: .4byte gUnknown_030042C0 _080DC374: .4byte REG_BG1HOFS _080DC378: @@ -37282,7 +37282,7 @@ _080DC554: bl CalcCenterToCornerVec ldr r1, _080DC5EC @ =gBattleAnimArgs ldrb r0, [r1] - bl obj_id_for_side_relative_to_move + bl GetAnimBankSpriteId lsls r0, 24 lsrs r0, 24 strh r0, [r7, 0x22] @@ -37461,7 +37461,7 @@ _080DC716: beq _080DC808 b _080DC818 _080DC720: - ldr r4, _080DC76C @ =gBattleAnimPlayerMonIndex + ldr r4, _080DC76C @ =gBattleAnimBankAttacker ldrb r0, [r4] movs r1, 0 bl sub_8077ABC @@ -37498,7 +37498,7 @@ _080DC74E: strh r0, [r2] b _080DC7A2 .align 2, 0 -_080DC76C: .4byte gBattleAnimPlayerMonIndex +_080DC76C: .4byte gBattleAnimBankAttacker _080DC770: .4byte REG_BLDCNT _080DC774: .4byte REG_BLDALPHA _080DC778: @@ -37612,7 +37612,7 @@ sub_80DC824: @ 80DC824 .align 2, 0 _080DC84C: .4byte gBattleAnimArgs _080DC850: - ldr r0, _080DC8E4 @ =gBattleAnimEnemyMonIndex + ldr r0, _080DC8E4 @ =gBattleAnimBankTarget ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -37635,7 +37635,7 @@ _080DC850: negs r0, r0 strh r0, [r1] _080DC880: - ldr r5, _080DC8E4 @ =gBattleAnimEnemyMonIndex + ldr r5, _080DC8E4 @ =gBattleAnimBankTarget ldrb r0, [r5] movs r1, 0x2 bl sub_8077EE4 @@ -37675,12 +37675,12 @@ _080DC880: str r0, [r6, 0x1C] ldr r1, _080DC8F0 @ =move_anim_8072740 adds r0, r6, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 pop {r4-r6} pop {r0} bx r0 .align 2, 0 -_080DC8E4: .4byte gBattleAnimEnemyMonIndex +_080DC8E4: .4byte gBattleAnimBankTarget _080DC8E8: .4byte gBattleAnimArgs _080DC8EC: .4byte sub_8078B34 _080DC8F0: .4byte move_anim_8072740 @@ -37705,7 +37705,7 @@ sub_80DC8F4: @ 80DC8F4 .align 2, 0 _080DC914: .4byte gBattleAnimArgs _080DC918: - ldr r0, _080DC990 @ =gBattleAnimEnemyMonIndex + ldr r0, _080DC990 @ =gBattleAnimBankTarget ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -37719,7 +37719,7 @@ _080DC918: negs r1, r1 strh r1, [r0] _080DC934: - ldr r5, _080DC990 @ =gBattleAnimEnemyMonIndex + ldr r5, _080DC990 @ =gBattleAnimBankTarget ldrb r0, [r5] movs r1, 0x2 bl sub_8077EE4 @@ -37755,12 +37755,12 @@ _080DC934: str r0, [r6, 0x1C] ldr r1, _080DC99C @ =move_anim_8072740 adds r0, r6, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 pop {r4-r6} pop {r0} bx r0 .align 2, 0 -_080DC990: .4byte gBattleAnimEnemyMonIndex +_080DC990: .4byte gBattleAnimBankTarget _080DC994: .4byte gBattleAnimArgs _080DC998: .4byte sub_8078B34 _080DC99C: .4byte move_anim_8072740 @@ -37796,7 +37796,7 @@ _080DC9BC: ldrsh r0, [r1, r2] cmp r0, 0 bne _080DCA04 - ldr r4, _080DCA00 @ =gBattleAnimEnemyMonIndex + ldr r4, _080DCA00 @ =gBattleAnimBankTarget ldrb r0, [r4] movs r1, 0x2 bl sub_8077ABC @@ -37812,9 +37812,9 @@ _080DC9BC: b _080DCA16 .align 2, 0 _080DC9FC: .4byte gBattleAnimArgs -_080DCA00: .4byte gBattleAnimEnemyMonIndex +_080DCA00: .4byte gBattleAnimBankTarget _080DCA04: - ldr r0, _080DCA2C @ =gBattleAnimEnemyMonIndex + ldr r0, _080DCA2C @ =gBattleAnimBankTarget ldrb r0, [r0] adds r2, r5, 0 adds r2, 0x32 @@ -37834,7 +37834,7 @@ _080DCA16: pop {r0} bx r0 .align 2, 0 -_080DCA2C: .4byte gBattleAnimEnemyMonIndex +_080DCA2C: .4byte gBattleAnimBankTarget _080DCA30: .4byte gBattleAnimArgs _080DCA34: .4byte sub_80DCA38 thumb_func_end sub_80DC9A0 @@ -37874,7 +37874,7 @@ _080DCA6A: sub_80DCA70: @ 80DCA70 push {r4,lr} adds r4, r0, 0 - ldr r0, _080DCAA0 @ =gBattleAnimEnemyMonIndex + ldr r0, _080DCAA0 @ =gBattleAnimBankTarget ldrb r0, [r0] adds r2, r4, 0 adds r2, 0x20 @@ -37882,7 +37882,7 @@ sub_80DCA70: @ 80DCA70 adds r3, 0x22 movs r1, 0 bl sub_807A3FC - ldr r0, _080DCAA4 @ =gBattleAnimPlayerMonIndex + ldr r0, _080DCAA4 @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -37895,8 +37895,8 @@ sub_80DCA70: @ 80DCA70 strh r1, [r4, 0x20] b _080DCAB8 .align 2, 0 -_080DCAA0: .4byte gBattleAnimEnemyMonIndex -_080DCAA4: .4byte gBattleAnimPlayerMonIndex +_080DCAA0: .4byte gBattleAnimBankTarget +_080DCAA4: .4byte gBattleAnimBankAttacker _080DCAA8: .4byte gBattleAnimArgs _080DCAAC: ldr r1, _080DCAE0 @ =gBattleAnimArgs @@ -37910,7 +37910,7 @@ _080DCAB8: ldrh r1, [r4, 0x22] adds r0, r1 strh r0, [r4, 0x22] - ldr r0, _080DCAE4 @ =gBattleAnimEnemyMonIndex + ldr r0, _080DCAE4 @ =gBattleAnimBankTarget ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -37927,7 +37927,7 @@ _080DCAD4: bx r0 .align 2, 0 _080DCAE0: .4byte gBattleAnimArgs -_080DCAE4: .4byte gBattleAnimEnemyMonIndex +_080DCAE4: .4byte gBattleAnimBankTarget _080DCAE8: .4byte sub_80DCAEC thumb_func_end sub_80DCA70 @@ -38075,7 +38075,7 @@ sub_80DCBCC: @ 80DCBCC .align 2, 0 _080DCBE8: .4byte gBattleAnimArgs _080DCBEC: - ldr r0, _080DCCE8 @ =gBattleAnimPlayerMonIndex + ldr r0, _080DCCE8 @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -38096,11 +38096,11 @@ _080DCC0E: lsls r0, 24 cmp r0, 0 bne _080DCC5E - ldr r0, _080DCCE8 @ =gBattleAnimPlayerMonIndex + ldr r0, _080DCCE8 @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankSide adds r4, r0, 0 - ldr r5, _080DCCF0 @ =gBattleAnimEnemyMonIndex + ldr r5, _080DCCF0 @ =gBattleAnimBankTarget ldrb r0, [r5] bl GetBankSide lsls r4, 24 @@ -38132,7 +38132,7 @@ _080DCC5E: adds r0, r7, 0 movs r1, 0x1 bl sub_80787B0 - ldr r5, _080DCCF0 @ =gBattleAnimEnemyMonIndex + ldr r5, _080DCCF0 @ =gBattleAnimBankTarget ldrb r0, [r5] movs r1, 0x2 bl sub_8077ABC @@ -38186,15 +38186,15 @@ _080DCC5E: str r0, [r7, 0x1C] ldr r1, _080DCCF8 @ =move_anim_8072740 adds r0, r7, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 add sp, 0x4 pop {r4-r7} pop {r0} bx r0 .align 2, 0 -_080DCCE8: .4byte gBattleAnimPlayerMonIndex +_080DCCE8: .4byte gBattleAnimBankAttacker _080DCCEC: .4byte gBattleAnimArgs -_080DCCF0: .4byte gBattleAnimEnemyMonIndex +_080DCCF0: .4byte gBattleAnimBankTarget _080DCCF4: .4byte sub_8078B34 _080DCCF8: .4byte move_anim_8072740 thumb_func_end sub_80DCBCC @@ -38205,7 +38205,7 @@ sub_80DCCFC: @ 80DCCFC adds r6, r0, 0 movs r1, 0x1 bl sub_80787B0 - ldr r0, _080DCD68 @ =gBattleAnimPlayerMonIndex + ldr r0, _080DCD68 @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -38219,7 +38219,7 @@ _080DCD1C: ldr r4, _080DCD6C @ =gBattleAnimArgs ldrh r0, [r4, 0x8] strh r0, [r6, 0x2E] - ldr r5, _080DCD70 @ =gBattleAnimEnemyMonIndex + ldr r5, _080DCD70 @ =gBattleAnimBankTarget ldrb r0, [r5] movs r1, 0x2 bl sub_8077ABC @@ -38252,9 +38252,9 @@ _080DCD1C: pop {r0} bx r0 .align 2, 0 -_080DCD68: .4byte gBattleAnimPlayerMonIndex +_080DCD68: .4byte gBattleAnimBankAttacker _080DCD6C: .4byte gBattleAnimArgs -_080DCD70: .4byte gBattleAnimEnemyMonIndex +_080DCD70: .4byte gBattleAnimBankTarget _080DCD74: .4byte sub_80DCD78 thumb_func_end sub_80DCCFC @@ -38370,13 +38370,13 @@ sub_80DCE40: @ 80DCE40 ldrsh r0, [r0, r1] cmp r0, 0 bne _080DCE5C - ldr r4, _080DCE58 @ =gBattleAnimPlayerMonIndex + ldr r4, _080DCE58 @ =gBattleAnimBankAttacker b _080DCE5E .align 2, 0 _080DCE54: .4byte gBattleAnimArgs -_080DCE58: .4byte gBattleAnimPlayerMonIndex +_080DCE58: .4byte gBattleAnimBankAttacker _080DCE5C: - ldr r4, _080DCE90 @ =gBattleAnimEnemyMonIndex + ldr r4, _080DCE90 @ =gBattleAnimBankTarget _080DCE5E: ldrb r0, [r4] movs r1, 0x2 @@ -38393,14 +38393,14 @@ _080DCE5E: strh r0, [r5, 0x22] ldr r1, _080DCE94 @ =move_anim_8074EE0 adds r0, r5, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 ldr r0, _080DCE98 @ =sub_80785E4 str r0, [r5, 0x1C] pop {r4,r5} pop {r0} bx r0 .align 2, 0 -_080DCE90: .4byte gBattleAnimEnemyMonIndex +_080DCE90: .4byte gBattleAnimBankTarget _080DCE94: .4byte move_anim_8074EE0 _080DCE98: .4byte sub_80785E4 thumb_func_end sub_80DCE40 @@ -38414,7 +38414,7 @@ sub_80DCE9C: @ 80DCE9C ldrsh r0, [r6, r1] cmp r0, 0 beq _080DCEBC - ldr r0, _080DCF0C @ =gBattleAnimEnemyMonIndex + ldr r0, _080DCF0C @ =gBattleAnimBankTarget ldrb r0, [r0] adds r2, r5, 0 adds r2, 0x20 @@ -38448,7 +38448,7 @@ _080DCEBC: strh r0, [r5, 0x38] ldr r1, _080DCF14 @ =sub_80DCF1C adds r0, r5, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 ldr r1, _080DCF18 @ =sub_8078278 str r1, [r5, 0x1C] adds r0, r5, 0 @@ -38458,7 +38458,7 @@ _080DCEBC: bx r0 .align 2, 0 _080DCF08: .4byte gBattleAnimArgs -_080DCF0C: .4byte gBattleAnimEnemyMonIndex +_080DCF0C: .4byte gBattleAnimBankTarget _080DCF10: .4byte 0x0000ffba _080DCF14: .4byte sub_80DCF1C _080DCF18: .4byte sub_8078278 @@ -38483,7 +38483,7 @@ sub_80DCF1C: @ 80DCF1C strh r0, [r4, 0x36] ldr r1, _080DCF58 @ =move_anim_8074EE0 adds r0, r4, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 ldr r1, _080DCF5C @ =sub_8078278 str r1, [r4, 0x1C] adds r0, r4, 0 @@ -38506,7 +38506,7 @@ sub_80DCF60: @ 80DCF60 bl StartSpriteAnim adds r0, r5, 0 bl AnimateSprite - ldr r0, _080DCF8C @ =gBattleAnimPlayerMonIndex + ldr r0, _080DCF8C @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -38518,7 +38518,7 @@ sub_80DCF60: @ 80DCF60 b _080DCF96 .align 2, 0 _080DCF88: .4byte gBattleAnimArgs -_080DCF8C: .4byte gBattleAnimPlayerMonIndex +_080DCF8C: .4byte gBattleAnimBankAttacker _080DCF90: ldrh r0, [r4] ldrh r1, [r5, 0x20] @@ -38550,7 +38550,7 @@ _080DCF96: str r0, [r5, 0x1C] ldr r1, _080DCFE0 @ =move_anim_8074EE0 adds r0, r5, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 pop {r4,r5} pop {r0} bx r0 @@ -38726,7 +38726,7 @@ _080DD120: ldrsh r0, [r0, r1] cmp r0, 0 beq _080DD13A - ldr r0, _080DD184 @ =gBattleAnimPlayerMonIndex + ldr r0, _080DD184 @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -38759,7 +38759,7 @@ _080DD174: .4byte gBattleAnimBackgroundTilemap_SandstormBrew _080DD178: .4byte gBattleAnimBackgroundImage_SandstormBrew _080DD17C: .4byte gBattleAnimSpritePalette_261 _080DD180: .4byte gBattleAnimArgs -_080DD184: .4byte gBattleAnimPlayerMonIndex +_080DD184: .4byte gBattleAnimBankAttacker _080DD188: .4byte gTasks _080DD18C: .4byte sub_80DD190 thumb_func_end do_boulder_dust @@ -39044,7 +39044,7 @@ sub_80DD3AC: @ 80DD3AC ldrsh r0, [r4, r2] cmp r0, 0 beq _080DD3F8 - ldr r0, _080DD3F4 @ =gBattleAnimPlayerMonIndex + ldr r0, _080DD3F4 @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -39067,7 +39067,7 @@ sub_80DD3AC: @ 80DD3AC b _080DD3FC .align 2, 0 _080DD3F0: .4byte gBattleAnimArgs -_080DD3F4: .4byte gBattleAnimPlayerMonIndex +_080DD3F4: .4byte gBattleAnimBankAttacker _080DD3F8: ldr r0, _080DD41C @ =0x0000ffc0 strh r0, [r5, 0x20] @@ -39169,7 +39169,7 @@ sub_80DD490: @ 80DD490 str r0, [r4, 0x1C] ldr r1, _080DD4D0 @ =move_anim_8072740 adds r0, r4, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 pop {r4,r5} pop {r0} bx r0 @@ -39193,7 +39193,7 @@ sub_80DD4D4: @ 80DD4D4 lsls r1, 3 ldr r0, _080DD554 @ =gTasks adds r6, r1, r0 - ldr r5, _080DD558 @ =gBattleAnimPlayerMonIndex + ldr r5, _080DD558 @ =gBattleAnimBankAttacker ldrb r0, [r5] movs r1, 0x2 bl sub_8077ABC @@ -39209,7 +39209,7 @@ sub_80DD4D4: @ 80DD4D4 lsls r1, 13 adds r0, r1 lsrs r7, r0, 16 - ldr r4, _080DD55C @ =gBattleAnimEnemyMonIndex + ldr r4, _080DD55C @ =gBattleAnimBankTarget ldrb r0, [r4] movs r1, 0x2 bl sub_8077ABC @@ -39243,8 +39243,8 @@ _080DD544: b _080DD566 .align 2, 0 _080DD554: .4byte gTasks -_080DD558: .4byte gBattleAnimPlayerMonIndex -_080DD55C: .4byte gBattleAnimEnemyMonIndex +_080DD558: .4byte gBattleAnimBankAttacker +_080DD55C: .4byte gBattleAnimBankTarget _080DD560: lsls r1, r5, 3 movs r0, 0x30 @@ -39308,7 +39308,7 @@ _080DD57E: strh r0, [r6, 0x24] strh r5, [r6, 0xA] movs r0, 0 - bl obj_id_for_side_relative_to_move + bl GetAnimBankSpriteId lsls r0, 24 lsrs r0, 24 strh r0, [r6, 0x26] @@ -39787,7 +39787,7 @@ _080DD972: sub_80DD978: @ 80DD978 push {r4,lr} adds r4, r0, 0 - ldr r0, _080DD9A0 @ =gBattleAnimPlayerMonIndex + ldr r0, _080DD9A0 @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -39804,14 +39804,14 @@ _080DD994: pop {r0} bx r0 .align 2, 0 -_080DD9A0: .4byte gBattleAnimPlayerMonIndex +_080DD9A0: .4byte gBattleAnimBankAttacker thumb_func_end sub_80DD978 thumb_func_start sub_80DD9A4 sub_80DD9A4: @ 80DD9A4 push {r4,r5,lr} adds r4, r0, 0 - ldr r5, _080DD9F0 @ =gBattleAnimEnemyMonIndex + ldr r5, _080DD9F0 @ =gBattleAnimBankTarget ldrb r0, [r5] movs r1, 0 bl sub_8077ABC @@ -39844,7 +39844,7 @@ sub_80DD9A4: @ 80DD9A4 pop {r0} bx r0 .align 2, 0 -_080DD9F0: .4byte gBattleAnimEnemyMonIndex +_080DD9F0: .4byte gBattleAnimBankTarget _080DD9F4: .4byte gBattleAnimArgs _080DD9F8: .4byte sub_80DD9FC thumb_func_end sub_80DD9A4 @@ -40049,7 +40049,7 @@ sub_80DDB6C: @ 80DDB6C strh r0, [r4, 0x2E] ldrh r0, [r4, 0x20] strh r0, [r4, 0x30] - ldr r5, _080DDBCC @ =gBattleAnimEnemyMonIndex + ldr r5, _080DDBCC @ =gBattleAnimBankTarget ldrb r0, [r5] movs r1, 0x2 bl sub_8077ABC @@ -40083,7 +40083,7 @@ sub_80DDB6C: @ 80DDB6C bx r0 .align 2, 0 _080DDBC8: .4byte gBattleAnimArgs -_080DDBCC: .4byte gBattleAnimEnemyMonIndex +_080DDBCC: .4byte gBattleAnimBankTarget _080DDBD0: .4byte sub_80DDBD8 _080DDBD4: .4byte REG_BLDCNT thumb_func_end sub_80DDB6C @@ -40389,7 +40389,7 @@ sub_80DDDF0: @ 80DDDF0 adds r0, r2, 0 strh r0, [r1] movs r0, 0 - bl obj_id_for_side_relative_to_move + bl GetAnimBankSpriteId adds r4, r0, 0 lsls r4, 24 lsrs r4, 24 @@ -40506,7 +40506,7 @@ sub_80DDED0: @ 80DDED0 _080DDEF4: .4byte gTasks _080DDEF8: movs r0, 0 - bl obj_id_for_side_relative_to_move + bl GetAnimBankSpriteId lsls r0, 24 lsrs r1, r0, 24 ldrh r0, [r4, 0x8] @@ -40551,7 +40551,7 @@ sub_80DDF40: @ 80DDF40 adds r4, r0, 0 ldrh r5, [r4, 0x20] ldrh r6, [r4, 0x22] - ldr r0, _080DDFDC @ =gBattleAnimPlayerMonIndex + ldr r0, _080DDFDC @ =gBattleAnimBankAttacker mov r8, r0 ldrb r0, [r0] movs r1, 0x2 @@ -40618,7 +40618,7 @@ sub_80DDF40: @ 80DDF40 pop {r0} bx r0 .align 2, 0 -_080DDFDC: .4byte gBattleAnimPlayerMonIndex +_080DDFDC: .4byte gBattleAnimBankAttacker _080DDFE0: .4byte gBattleAnimArgs _080DDFE4: .4byte sub_80DDFE8 thumb_func_end sub_80DDF40 @@ -40671,7 +40671,7 @@ _080DE032: lsls r0, 16 cmp r0, 0 bgt _080DE0F6 - ldr r4, _080DE098 @ =gBattleAnimEnemyMonIndex + ldr r4, _080DE098 @ =gBattleAnimBankTarget ldrb r0, [r4] movs r1, 0x2 bl sub_8077ABC @@ -40712,7 +40712,7 @@ _080DE032: strh r0, [r5, 0x3C] b _080DE0E2 .align 2, 0 -_080DE098: .4byte gBattleAnimEnemyMonIndex +_080DE098: .4byte gBattleAnimBankTarget _080DE09C: ldrh r0, [r5, 0x3A] ldrh r1, [r5, 0x36] @@ -40734,7 +40734,7 @@ _080DE09C: lsls r0, 16 cmp r0, 0 bgt _080DE0F6 - ldr r4, _080DE0EC @ =gBattleAnimEnemyMonIndex + ldr r4, _080DE0EC @ =gBattleAnimBankTarget ldrb r0, [r4] movs r1, 0x2 bl sub_8077ABC @@ -40753,7 +40753,7 @@ _080DE0E2: strh r0, [r5, 0x2E] b _080DE0F6 .align 2, 0 -_080DE0EC: .4byte gBattleAnimEnemyMonIndex +_080DE0EC: .4byte gBattleAnimBankTarget _080DE0F0: adds r0, r5, 0 bl move_anim_8074EE0 @@ -40917,7 +40917,7 @@ _080DE1E0: adds r0, r4 movs r1, 0x50 strh r1, [r0, 0x2E] - ldr r0, _080DE250 @ =gBattleAnimEnemyMonIndex + ldr r0, _080DE250 @ =gBattleAnimBankTarget ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -40943,7 +40943,7 @@ _080DE1E0: _080DE244: .4byte REG_BLDCNT _080DE248: .4byte REG_BLDALPHA _080DE24C: .4byte gSprites -_080DE250: .4byte gBattleAnimEnemyMonIndex +_080DE250: .4byte gBattleAnimBankTarget _080DE254: .4byte 0x0000ff70 _080DE258: movs r2, 0x8 @@ -40986,7 +40986,7 @@ _080DE276: lsls r0, 2 adds r0, r4 ldr r1, _080DE2D0 @ =SpriteCallbackDummy - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 movs r0, 0x8 ldrsh r1, [r5, r0] lsls r0, r1, 4 @@ -41156,7 +41156,7 @@ sub_80DE3D4: @ 80DE3D4 lsls r0, 3 ldr r1, _080DE40C @ =gTasks adds r5, r0, r1 - ldr r0, _080DE410 @ =gBattleAnimEnemyMonIndex + ldr r0, _080DE410 @ =gBattleAnimBankTarget ldrb r0, [r0] bl GetBankIdentity_permutated lsls r0, 24 @@ -41174,7 +41174,7 @@ _080DE400: mov pc, r0 .align 2, 0 _080DE40C: .4byte gTasks -_080DE410: .4byte gBattleAnimEnemyMonIndex +_080DE410: .4byte gBattleAnimBankTarget _080DE414: .4byte _080DE418 .align 2, 0 _080DE418: @@ -41250,7 +41250,7 @@ _080DE464: movs r0, 0x10 strh r0, [r5, 0xE] movs r0, 0x1 - bl obj_id_for_side_relative_to_move + bl GetAnimBankSpriteId lsls r0, 24 lsrs r0, 24 strh r0, [r5, 0x22] @@ -41516,7 +41516,7 @@ sub_80DE6B0: @ 80DE6B0 lsls r0, 3 ldr r1, _080DE6E0 @ =gTasks adds r4, r0, r1 - ldr r0, _080DE6E4 @ =gBattleAnimEnemyMonIndex + ldr r0, _080DE6E4 @ =gBattleAnimBankTarget ldrb r0, [r0] bl GetBankIdentity_permutated lsls r0, 24 @@ -41532,7 +41532,7 @@ sub_80DE6B0: @ 80DE6B0 b _080DE7AA .align 2, 0 _080DE6E0: .4byte gTasks -_080DE6E4: .4byte gBattleAnimEnemyMonIndex +_080DE6E4: .4byte gBattleAnimBankTarget _080DE6E8: cmp r0, 0x2 beq _080DE740 @@ -41542,7 +41542,7 @@ _080DE6EE: movs r0, 0x3 strb r0, [r1, 0x15] movs r0, 0x1 - bl obj_id_for_side_relative_to_move + bl GetAnimBankSpriteId lsls r0, 24 lsrs r0, 24 strh r0, [r4, 0x24] @@ -41648,7 +41648,7 @@ sub_80DE7B8: @ 80DE7B8 ldrsh r0, [r0, r1] cmp r0, 0 bne _080DE800 - ldr r4, _080DE7F8 @ =gBattleAnimPlayerMonIndex + ldr r4, _080DE7F8 @ =gBattleAnimBankAttacker ldrb r0, [r4] movs r1, 0 bl sub_8077ABC @@ -41663,14 +41663,14 @@ sub_80DE7B8: @ 80DE7B8 lsls r2, 13 adds r0, r2 lsrs r5, r0, 16 - ldr r4, _080DE7FC @ =gBattleAnimEnemyMonIndex + ldr r4, _080DE7FC @ =gBattleAnimBankTarget b _080DE824 .align 2, 0 _080DE7F4: .4byte gBattleAnimArgs -_080DE7F8: .4byte gBattleAnimPlayerMonIndex -_080DE7FC: .4byte gBattleAnimEnemyMonIndex +_080DE7F8: .4byte gBattleAnimBankAttacker +_080DE7FC: .4byte gBattleAnimBankTarget _080DE800: - ldr r4, _080DE8C8 @ =gBattleAnimEnemyMonIndex + ldr r4, _080DE8C8 @ =gBattleAnimBankTarget ldrb r0, [r4] movs r1, 0 bl sub_8077ABC @@ -41685,7 +41685,7 @@ _080DE800: lsls r2, 13 adds r0, r2 lsrs r5, r0, 16 - ldr r4, _080DE8CC @ =gBattleAnimPlayerMonIndex + ldr r4, _080DE8CC @ =gBattleAnimBankAttacker _080DE824: ldrb r0, [r4] movs r1, 0 @@ -41765,8 +41765,8 @@ _080DE824: pop {r0} bx r0 .align 2, 0 -_080DE8C8: .4byte gBattleAnimEnemyMonIndex -_080DE8CC: .4byte gBattleAnimPlayerMonIndex +_080DE8C8: .4byte gBattleAnimBankTarget +_080DE8CC: .4byte gBattleAnimBankAttacker _080DE8D0: .4byte gBattleAnimArgs _080DE8D4: .4byte sub_80DE8D8 thumb_func_end sub_80DE7B8 @@ -41844,7 +41844,7 @@ sub_80DE918: @ 80DE918 ldr r2, _080DEA70 @ =gBattleAnimArgs ldrh r0, [r2] strh r0, [r1, 0x1C] - ldr r4, _080DEA74 @ =gBattleAnimPlayerMonIndex + ldr r4, _080DEA74 @ =gBattleAnimBankAttacker ldrb r0, [r4] movs r1, 0x2 bl sub_8077ABC @@ -41867,7 +41867,7 @@ _080DE988: _080DE98A: lsls r1, r4, 16 asrs r3, r1, 16 - ldr r0, _080DEA74 @ =gBattleAnimPlayerMonIndex + ldr r0, _080DEA74 @ =gBattleAnimBankAttacker ldrb r2, [r0] str r1, [sp, 0x10] cmp r3, r2 @@ -41879,7 +41879,7 @@ _080DE98A: lsls r0, r4, 24 lsrs r4, r0, 24 adds r0, r4, 0 - bl b_side_obj__get_some_boolean + bl IsAnimBankSpriteVisible lsls r0, 24 cmp r0, 0 beq _080DEA56 @@ -41975,7 +41975,7 @@ _080DEA56: _080DEA68: .4byte gTasks _080DEA6C: .4byte REG_BLDCNT _080DEA70: .4byte gBattleAnimArgs -_080DEA74: .4byte gBattleAnimPlayerMonIndex +_080DEA74: .4byte gBattleAnimBankAttacker _080DEA78: .4byte gSpriteTemplate_83DAF08 _080DEA7C: .4byte gSprites _080DEA80: .4byte gSprites + 0x1C @@ -42290,7 +42290,7 @@ sub_80DECB0: @ 80DECB0 adds r1, 0x4 movs r0, 0x10 strh r0, [r1] - ldr r0, _080DED08 @ =gBattleAnimPlayerMonIndex + ldr r0, _080DED08 @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -42308,7 +42308,7 @@ _080DECF8: .4byte gUnknown_030042C4 _080DECFC: .4byte gUnknown_03004240 _080DED00: .4byte REG_WININ _080DED04: .4byte 0x00003f3f -_080DED08: .4byte gBattleAnimPlayerMonIndex +_080DED08: .4byte gBattleAnimBankAttacker _080DED0C: movs r6, 0xC8 _080DED0E: @@ -42571,7 +42571,7 @@ sub_80DEF3C: @ 80DEF3C adds r4, r0, 0 movs r1, 0x1 bl sub_80787B0 - ldr r0, _080DEF68 @ =gBattleAnimPlayerMonIndex + ldr r0, _080DEF68 @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -42588,7 +42588,7 @@ sub_80DEF3C: @ 80DEF3C strb r1, [r4, 0x3] b _080DEF74 .align 2, 0 -_080DEF68: .4byte gBattleAnimPlayerMonIndex +_080DEF68: .4byte gBattleAnimBankAttacker _080DEF6C: .4byte 0x0000fffe _080DEF70: ldr r2, _080DEF90 @ =0x0000ffe8 @@ -42662,7 +42662,7 @@ _080DEFAA: str r0, [r3, 0x1C] ldr r1, _080DF008 @ =sub_80DF018 adds r0, r3, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 b _080DF010 .align 2, 0 _080DEFFC: .4byte 0x000003ff @@ -42775,7 +42775,7 @@ sub_80DF0B8: @ 80DF0B8 movs r1, 0xC bl Sin strh r0, [r4, 0x24] - ldr r0, _080DF120 @ =gBattleAnimPlayerMonIndex + ldr r0, _080DF120 @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -42819,7 +42819,7 @@ _080DF0DC: strh r0, [r1] b _080DF17E .align 2, 0 -_080DF120: .4byte gBattleAnimPlayerMonIndex +_080DF120: .4byte gBattleAnimBankAttacker _080DF124: .4byte 0x0000050b _080DF128: .4byte REG_BLDCNT _080DF12C: @@ -42908,7 +42908,7 @@ sub_80DF1A4: @ 80DF1A4 mov r8, r0 mov r2, r8 strh r2, [r4, 0xA] - ldr r5, _080DF240 @ =gBattleAnimPlayerMonIndex + ldr r5, _080DF240 @ =gBattleAnimBankAttacker ldrb r0, [r5] movs r1, 0x2 bl sub_8077ABC @@ -42965,7 +42965,7 @@ sub_80DF1A4: @ 80DF1A4 bx r0 .align 2, 0 _080DF23C: .4byte gTasks -_080DF240: .4byte gBattleAnimPlayerMonIndex +_080DF240: .4byte gBattleAnimBankAttacker _080DF244: .4byte REG_BLDCNT _080DF248: .4byte sub_80DF24C thumb_func_end sub_80DF1A4 @@ -43022,7 +43022,7 @@ _080DF292: lsls r0, 2 adds r5, r0, r1 strh r7, [r5, 0x2E] - ldr r0, _080DF2FC @ =gBattleAnimPlayerMonIndex + ldr r0, _080DF2FC @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankSide movs r1, 0 @@ -43056,7 +43056,7 @@ _080DF2E6: .align 2, 0 _080DF2F4: .4byte gSpriteTemplate_83DAF80 _080DF2F8: .4byte gSprites -_080DF2FC: .4byte gBattleAnimPlayerMonIndex +_080DF2FC: .4byte gBattleAnimBankAttacker _080DF300: ldrh r0, [r4, 0xA] adds r0, 0x1 @@ -43289,7 +43289,7 @@ sub_80DF49C: @ 80DF49C orrs r1, r2 strb r1, [r3] ldr r2, _080DF4E0 @ =gObjectBankIDs - ldr r1, _080DF4E4 @ =gBattleAnimPlayerMonIndex + ldr r1, _080DF4E4 @ =gBattleAnimBankAttacker ldrb r1, [r1] adds r1, r2 ldrb r1, [r1] @@ -43318,7 +43318,7 @@ sub_80DF49C: @ 80DF49C bx lr .align 2, 0 _080DF4E0: .4byte gObjectBankIDs -_080DF4E4: .4byte gBattleAnimPlayerMonIndex +_080DF4E4: .4byte gBattleAnimBankAttacker _080DF4E8: .4byte gBattleAnimArgs _080DF4EC: .4byte sub_80DF4F4 _080DF4F0: .4byte gSprites @@ -43415,7 +43415,7 @@ _080DF59C: .4byte move_anim_8074EE0 sub_80DF5A0: @ 80DF5A0 push {r4,r5,lr} adds r5, r0, 0 - ldr r4, _080DF5E8 @ =gBattleAnimPlayerMonIndex + ldr r4, _080DF5E8 @ =gBattleAnimBankAttacker ldrb r0, [r4] movs r1, 0x2 bl sub_8077ABC @@ -43447,7 +43447,7 @@ sub_80DF5A0: @ 80DF5A0 adds r1, r2, 0 b _080DF5FA .align 2, 0 -_080DF5E8: .4byte gBattleAnimPlayerMonIndex +_080DF5E8: .4byte gBattleAnimBankAttacker _080DF5EC: .4byte gBattleAnimArgs _080DF5F0: ldr r1, _080DF630 @ =gBattleAnimArgs @@ -43476,7 +43476,7 @@ _080DF5FA: strb r0, [r2] ldr r1, _080DF634 @ =move_anim_8074EE0 adds r0, r5, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 ldr r0, _080DF638 @ =sub_8078504 str r0, [r5, 0x1C] pop {r4,r5} @@ -43493,7 +43493,7 @@ sub_80DF63C: @ 80DF63C push {r4,r5,lr} adds r5, r0, 0 bl sub_8078650 - ldr r4, _080DF694 @ =gBattleAnimEnemyMonIndex + ldr r4, _080DF694 @ =gBattleAnimBankTarget ldrb r0, [r4] movs r1, 0x2 bl sub_8077ABC @@ -43506,7 +43506,7 @@ sub_80DF63C: @ 80DF63C lsls r0, 24 lsrs r0, 24 strh r0, [r5, 0x36] - ldr r0, _080DF698 @ =gBattleAnimPlayerMonIndex + ldr r0, _080DF698 @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -43530,8 +43530,8 @@ sub_80DF63C: @ 80DF63C strh r0, [r5, 0x36] b _080DF6CA .align 2, 0 -_080DF694: .4byte gBattleAnimEnemyMonIndex -_080DF698: .4byte gBattleAnimPlayerMonIndex +_080DF694: .4byte gBattleAnimBankTarget +_080DF698: .4byte gBattleAnimBankAttacker _080DF69C: .4byte gBattleAnimArgs _080DF6A0: ldr r1, _080DF6E4 @ =gBattleAnimArgs @@ -43562,7 +43562,7 @@ _080DF6CA: str r0, [r5, 0x1C] ldr r1, _080DF6EC @ =move_anim_8074EE0 adds r0, r5, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 pop {r4,r5} pop {r0} bx r0 @@ -43581,13 +43581,13 @@ sub_80DF6F0: @ 80DF6F0 ldrsh r0, [r0, r1] cmp r0, 0 bne _080DF70C - ldr r4, _080DF708 @ =gBattleAnimPlayerMonIndex + ldr r4, _080DF708 @ =gBattleAnimBankAttacker b _080DF70E .align 2, 0 _080DF704: .4byte gBattleAnimArgs -_080DF708: .4byte gBattleAnimPlayerMonIndex +_080DF708: .4byte gBattleAnimBankAttacker _080DF70C: - ldr r4, _080DF750 @ =gBattleAnimEnemyMonIndex + ldr r4, _080DF750 @ =gBattleAnimBankTarget _080DF70E: ldrb r0, [r4] movs r1, 0 @@ -43614,12 +43614,12 @@ _080DF70E: str r0, [r5, 0x1C] ldr r1, _080DF75C @ =move_anim_8074EE0 adds r0, r5, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 pop {r4,r5} pop {r0} bx r0 .align 2, 0 -_080DF750: .4byte gBattleAnimEnemyMonIndex +_080DF750: .4byte gBattleAnimBankTarget _080DF754: .4byte gBattleAnimArgs _080DF758: .4byte sub_8078600 _080DF75C: .4byte move_anim_8074EE0 @@ -43629,7 +43629,7 @@ _080DF75C: .4byte move_anim_8074EE0 sub_80DF760: @ 80DF760 push {r4,lr} adds r4, r0, 0 - ldr r0, _080DF788 @ =gBattleAnimPlayerMonIndex + ldr r0, _080DF788 @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -43645,14 +43645,14 @@ _080DF77A: pop {r0} bx r0 .align 2, 0 -_080DF788: .4byte gBattleAnimPlayerMonIndex +_080DF788: .4byte gBattleAnimBankAttacker thumb_func_end sub_80DF760 thumb_func_start sub_80DF78C sub_80DF78C: @ 80DF78C push {r4-r7,lr} adds r6, r0, 0 - ldr r4, _080DF7E0 @ =gBattleAnimPlayerMonIndex + ldr r4, _080DF7E0 @ =gBattleAnimBankAttacker ldrb r0, [r4] movs r1, 0x2 bl sub_8077ABC @@ -43688,7 +43688,7 @@ sub_80DF78C: @ 80DF78C lsrs r0, r7, 17 b _080DF7EE .align 2, 0 -_080DF7E0: .4byte gBattleAnimPlayerMonIndex +_080DF7E0: .4byte gBattleAnimBankAttacker _080DF7E4: .4byte gBattleAnimArgs _080DF7E8: .4byte gBankAttacker _080DF7EC: @@ -43864,7 +43864,7 @@ sub_80DF924: @ 80DF924 lsls r1, 3 ldr r0, _080DF950 @ =gTasks adds r4, r1, r0 - ldr r0, _080DF954 @ =gBattleAnimPlayerMonIndex + ldr r0, _080DF954 @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankIdentity_permutated lsls r0, 24 @@ -43877,7 +43877,7 @@ sub_80DF924: @ 80DF924 b _080DF966 .align 2, 0 _080DF950: .4byte gTasks -_080DF954: .4byte gBattleAnimPlayerMonIndex +_080DF954: .4byte gBattleAnimBankAttacker _080DF958: .4byte REG_BG1HOFS _080DF95C: .4byte gUnknown_030042C0 _080DF960: @@ -43895,7 +43895,7 @@ _080DF966: strb r0, [r1, 0x8] mov r0, sp strb r5, [r0, 0x9] - ldr r0, _080DF9E8 @ =gBattleAnimPlayerMonIndex + ldr r0, _080DF9E8 @ =gBattleAnimBankAttacker ldrb r0, [r0] bl sub_8077FC0 lsls r0, 24 @@ -43948,7 +43948,7 @@ _080DF9C4: _080DF9DC: .4byte REG_BG2HOFS _080DF9E0: .4byte gUnknown_03004288 _080DF9E4: .4byte 0xa2600001 -_080DF9E8: .4byte gBattleAnimPlayerMonIndex +_080DF9E8: .4byte gBattleAnimBankAttacker _080DF9EC: .4byte gUnknown_03004DE0 _080DF9F0: .4byte sub_80DF9F4 thumb_func_end sub_80DF924 @@ -44128,7 +44128,7 @@ sub_80DFB28: @ 80DFB28 movs r1, 0x5 bl __divsi3 adds r6, r0, 0 - ldr r1, _080DFBCC @ =gBattleAnimPlayerMonIndex + ldr r1, _080DFBCC @ =gBattleAnimBankAttacker mov r8, r1 ldrb r0, [r1] movs r1, 0x2 @@ -44194,7 +44194,7 @@ _080DFBB0: bx r0 .align 2, 0 _080DFBC8: .4byte gBattleAnimArgs -_080DFBCC: .4byte gBattleAnimPlayerMonIndex +_080DFBCC: .4byte gBattleAnimBankAttacker _080DFBD0: .4byte sub_80DFBD8 _080DFBD4: .4byte gUnknown_03000730 thumb_func_end sub_80DFB28 @@ -44251,7 +44251,7 @@ sub_80DFC24: @ 80DFC24 ldr r0, _080DFC5C @ =gBattleAnimArgs ldrh r0, [r0] strh r0, [r1, 0x8] - ldr r0, _080DFC60 @ =gBattleAnimPlayerMonIndex + ldr r0, _080DFC60 @ =gBattleAnimBankAttacker ldrb r0, [r0] movs r2, 0x10 strh r2, [r1, 0xA] @@ -44268,7 +44268,7 @@ sub_80DFC24: @ 80DFC24 .align 2, 0 _080DFC58: .4byte gTasks _080DFC5C: .4byte gBattleAnimArgs -_080DFC60: .4byte gBattleAnimPlayerMonIndex +_080DFC60: .4byte gBattleAnimBankAttacker _080DFC64: .4byte REG_BLDALPHA _080DFC68: .4byte REG_BLDCNT _080DFC6C: .4byte 0x00003f42 @@ -44331,7 +44331,7 @@ sub_80DFC9C: @ 80DFC9C bne _080DFD1E ldr r2, _080DFD0C @ =gSprites ldr r1, _080DFD10 @ =gObjectBankIDs - ldr r0, _080DFD14 @ =gBattleAnimPlayerMonIndex + ldr r0, _080DFD14 @ =gBattleAnimBankAttacker ldrb r0, [r0] adds r0, r1 ldrb r1, [r0] @@ -44352,7 +44352,7 @@ _080DFD04: .4byte gTasks _080DFD08: .4byte REG_BLDALPHA _080DFD0C: .4byte gSprites _080DFD10: .4byte gObjectBankIDs -_080DFD14: .4byte gBattleAnimPlayerMonIndex +_080DFD14: .4byte gBattleAnimBankAttacker _080DFD18: ldrh r0, [r4, 0xC] adds r0, 0x1 @@ -44454,7 +44454,7 @@ sub_80DFDC0: @ 80DFDC0 lsls r2, 5 adds r0, r2, 0 strh r0, [r1] - ldr r0, _080DFDEC @ =gBattleAnimPlayerMonIndex + ldr r0, _080DFDEC @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankIdentity_permutated lsls r0, 24 @@ -44466,7 +44466,7 @@ sub_80DFDC0: @ 80DFDC0 b _080DFDFC .align 2, 0 _080DFDE8: .4byte REG_BLDALPHA -_080DFDEC: .4byte gBattleAnimPlayerMonIndex +_080DFDEC: .4byte gBattleAnimBankAttacker _080DFDF0: .4byte REG_BLDCNT _080DFDF4: .4byte 0x00003f42 _080DFDF8: @@ -44489,14 +44489,14 @@ _080DFE10: .4byte 0x00003f44 sub_80DFE14: @ 80DFE14 push {r4-r6,lr} adds r4, r0, 0 - ldr r6, _080DFE80 @ =gBattleAnimEnemyMonIndex + ldr r6, _080DFE80 @ =gBattleAnimBankTarget ldrb r0, [r6] movs r1, 0x2 bl sub_8077ABC lsls r0, 24 lsrs r0, 24 strh r0, [r4, 0x30] - ldr r5, _080DFE84 @ =gBattleAnimPlayerMonIndex + ldr r5, _080DFE84 @ =gBattleAnimBankAttacker ldrb r0, [r5] movs r1, 0x2 bl sub_8077ABC @@ -44535,8 +44535,8 @@ sub_80DFE14: @ 80DFE14 pop {r0} bx r0 .align 2, 0 -_080DFE80: .4byte gBattleAnimEnemyMonIndex -_080DFE84: .4byte gBattleAnimPlayerMonIndex +_080DFE80: .4byte gBattleAnimBankTarget +_080DFE84: .4byte gBattleAnimBankAttacker _080DFE88: .4byte 0x0000ffd8 _080DFE8C: .4byte sub_80DFE90 thumb_func_end sub_80DFE14 @@ -44724,13 +44724,13 @@ sub_80DFFD0: @ 80DFFD0 adds r3, r0, 0 cmp r1, 0 bne _080DFFEC - ldr r0, _080DFFE8 @ =gBattleAnimPlayerMonIndex + ldr r0, _080DFFE8 @ =gBattleAnimBankAttacker b _080DFFEE .align 2, 0 _080DFFE4: .4byte gBattleAnimArgs -_080DFFE8: .4byte gBattleAnimPlayerMonIndex +_080DFFE8: .4byte gBattleAnimBankAttacker _080DFFEC: - ldr r0, _080E001C @ =gBattleAnimEnemyMonIndex + ldr r0, _080E001C @ =gBattleAnimBankTarget _080DFFEE: ldrb r5, [r0] movs r6, 0x14 @@ -44755,7 +44755,7 @@ _080DFFEE: beq _080E0032 b _080E00A0 .align 2, 0 -_080E001C: .4byte gBattleAnimEnemyMonIndex +_080E001C: .4byte gBattleAnimBankTarget _080E0020: .4byte 0x000003ff _080E0024: .4byte 0xfffffc00 _080E0028: @@ -44867,7 +44867,7 @@ sub_80E00EC: @ 80E00EC lsls r1, 3 ldr r0, _080E0150 @ =gTasks adds r5, r1, r0 - ldr r4, _080E0154 @ =gBattleAnimPlayerMonIndex + ldr r4, _080E0154 @ =gBattleAnimBankAttacker ldrb r0, [r4] movs r1, 0x1 bl sub_8077ABC @@ -44906,13 +44906,13 @@ sub_80E00EC: @ 80E00EC b _080E015E .align 2, 0 _080E0150: .4byte gTasks -_080E0154: .4byte gBattleAnimPlayerMonIndex +_080E0154: .4byte gBattleAnimBankAttacker _080E0158: .4byte 0x0000fff4 _080E015C: ldr r0, _080E01A8 @ =0x0000ffc0 _080E015E: strh r0, [r5, 0x18] - ldr r0, _080E01AC @ =gBattleAnimPlayerMonIndex + ldr r0, _080E01AC @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankIdentity_permutated lsls r0, 24 @@ -44946,7 +44946,7 @@ _080E015E: b _080E01EE .align 2, 0 _080E01A8: .4byte 0x0000ffc0 -_080E01AC: .4byte gBattleAnimPlayerMonIndex +_080E01AC: .4byte gBattleAnimBankAttacker _080E01B0: .4byte gUnknown_030041B4 _080E01B4: .4byte REG_BLDCNT _080E01B8: .4byte 0x00003f42 @@ -45260,7 +45260,7 @@ _080E0430: .4byte gUnknown_03004240 _080E0434: .4byte REG_WININ _080E0438: .4byte 0x00003f3f _080E043C: - ldr r0, _080E045C @ =gBattleAnimEnemyMonIndex + ldr r0, _080E045C @ =gBattleAnimBankTarget ldrb r0, [r0] bl GetBankIdentity_permutated lsls r0, 24 @@ -45275,7 +45275,7 @@ _080E043C: ldr r1, _080E0468 @ =gUnknown_03004288 b _080E0476 .align 2, 0 -_080E045C: .4byte gBattleAnimEnemyMonIndex +_080E045C: .4byte gBattleAnimBankTarget _080E0460: .4byte REG_BLDCNT _080E0464: .4byte 0x00003f42 _080E0468: .4byte gUnknown_03004288 @@ -45328,7 +45328,7 @@ _080E04C4: .align 2, 0 _080E04CC: .4byte gUnknown_03004280 _080E04D0: - ldr r4, _080E051C @ =gBattleAnimEnemyMonIndex + ldr r4, _080E051C @ =gBattleAnimBankTarget ldrb r0, [r4] movs r1, 0x1 bl sub_8077ABC @@ -45363,7 +45363,7 @@ _080E04D0: ldr r0, _080E0520 @ =0x0000fff4 b _080E0526 .align 2, 0 -_080E051C: .4byte gBattleAnimEnemyMonIndex +_080E051C: .4byte gBattleAnimBankTarget _080E0520: .4byte 0x0000fff4 _080E0524: ldr r0, _080E0538 @ =0x0000ffc0 @@ -45865,7 +45865,7 @@ sub_80E08CC: @ 80E08CC _080E08E2: lsls r0, r4, 24 lsrs r0, 24 - bl obj_id_for_side_relative_to_move + bl GetAnimBankSpriteId lsls r0, 24 lsrs r0, 24 cmp r0, 0xFF @@ -45901,7 +45901,7 @@ sub_80E0918: @ 80E0918 lsls r0, 24 lsrs r0, 24 mov r10, r0 - ldr r6, _080E09B8 @ =gBattleAnimPlayerMonIndex + ldr r6, _080E09B8 @ =gBattleAnimBankAttacker ldrb r0, [r6] bl GetBankIdentity_permutated lsls r0, 24 @@ -45935,7 +45935,7 @@ sub_80E0918: @ 80E0918 ldrb r0, [r6] movs r5, 0x2 eors r0, r5 - bl b_side_obj__get_some_boolean + bl IsAnimBankSpriteVisible lsls r0, 24 cmp r0, 0 beq _080E09A2 @@ -45969,7 +45969,7 @@ _080E09A2: pop {r0} bx r0 .align 2, 0 -_080E09B8: .4byte gBattleAnimPlayerMonIndex +_080E09B8: .4byte gBattleAnimBankAttacker _080E09BC: .4byte gSprites _080E09C0: .4byte gObjectBankIDs thumb_func_end sub_80E0918 @@ -45979,7 +45979,7 @@ sub_80E09C4: @ 80E09C4 push {r4-r6,lr} lsls r0, 24 lsrs r6, r0, 24 - ldr r4, _080E0A0C @ =gBattleAnimPlayerMonIndex + ldr r4, _080E0A0C @ =gBattleAnimBankAttacker ldrb r0, [r4] bl GetBankIdentity_permutated lsls r0, 24 @@ -45994,7 +45994,7 @@ sub_80E09C4: @ 80E09C4 ldrb r1, [r4] movs r0, 0x2 eors r0, r1 - bl b_side_obj__get_some_boolean + bl IsAnimBankSpriteVisible lsls r0, 24 cmp r0, 0 beq _080E0A00 @@ -46009,7 +46009,7 @@ _080E0A00: pop {r0} bx r0 .align 2, 0 -_080E0A0C: .4byte gBattleAnimPlayerMonIndex +_080E0A0C: .4byte gBattleAnimBankAttacker thumb_func_end sub_80E09C4 thumb_func_start sub_80E0A10 @@ -46032,7 +46032,7 @@ sub_80E0A10: @ 80E0A10 str r0, [r4, 0x1C] ldr r1, _080E0A48 @ =move_anim_8072740 adds r0, r4, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 pop {r4} pop {r0} bx r0 @@ -46112,7 +46112,7 @@ _080E0AC4: lsls r0, 24 cmp r0, 0 bne _080E0B40 - ldr r4, _080E0B74 @ =gBattleAnimPlayerMonIndex + ldr r4, _080E0B74 @ =gBattleAnimBankAttacker ldrb r0, [r4] bl GetBankIdentity lsls r0, 24 @@ -46128,7 +46128,7 @@ _080E0AF4: ldrb r0, [r4] movs r6, 0x2 eors r0, r6 - bl b_side_obj__get_some_boolean + bl IsAnimBankSpriteVisible lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -46180,12 +46180,12 @@ _080E0B64: .4byte REG_BLDCNT _080E0B68: .4byte 0x00003f42 _080E0B6C: .4byte 0x00000c08 _080E0B70: .4byte REG_BG1CNT -_080E0B74: .4byte gBattleAnimPlayerMonIndex +_080E0B74: .4byte gBattleAnimBankAttacker _080E0B78: .4byte gSprites _080E0B7C: .4byte gObjectBankIDs _080E0B80: .4byte 0x02019348 _080E0B84: - ldr r4, _080E0BA4 @ =gBattleAnimPlayerMonIndex + ldr r4, _080E0BA4 @ =gBattleAnimBankAttacker ldrb r0, [r4] bl GetBankSide lsls r0, 24 @@ -46201,7 +46201,7 @@ _080E0B84: ldr r1, _080E0BAC @ =gEnemyParty b _080E0BC0 .align 2, 0 -_080E0BA4: .4byte gBattleAnimPlayerMonIndex +_080E0BA4: .4byte gBattleAnimBankAttacker _080E0BA8: .4byte gBattlePartyID _080E0BAC: .4byte gEnemyParty _080E0BB0: @@ -46221,11 +46221,11 @@ _080E0BC0: lsrs r5, r0, 16 _080E0BCC: movs r0, 0 - bl obj_id_for_side_relative_to_move + bl GetAnimBankSpriteId adds r4, r0, 0 lsls r4, 24 lsrs r4, 24 - ldr r0, _080E0C60 @ =gBattleAnimPlayerMonIndex + ldr r0, _080E0C60 @ =gBattleAnimBankAttacker ldrb r0, [r0] adds r1, r4, 0 adds r2, r5, 0 @@ -46286,7 +46286,7 @@ _080E0BCC: .align 2, 0 _080E0C58: .4byte gBattlePartyID _080E0C5C: .4byte gPlayerParty -_080E0C60: .4byte gBattleAnimPlayerMonIndex +_080E0C60: .4byte gBattleAnimBankAttacker _080E0C64: .4byte 0x040000d4 _080E0C68: .4byte 0x85000400 _080E0C6C: .4byte gUnknown_08D1D574 @@ -46403,7 +46403,7 @@ _080E0D40: adds r0, 0x2 strh r5, [r0] movs r0, 0 - bl obj_id_for_side_relative_to_move + bl GetAnimBankSpriteId lsls r0, 24 lsrs r0, 24 ldr r6, _080E0E10 @ =gSprites @@ -46446,7 +46446,7 @@ _080E0D84: cmp r0, 0x1 bne _080E0DE2 ldr r2, _080E0E1C @ =gObjectBankIDs - ldr r0, _080E0E20 @ =gBattleAnimPlayerMonIndex + ldr r0, _080E0E20 @ =gBattleAnimBankAttacker ldrb r1, [r0] movs r0, 0x2 eors r0, r1 @@ -46489,7 +46489,7 @@ _080E0E10: .4byte gSprites _080E0E14: .4byte 0x040000d4 _080E0E18: .4byte 0x85000200 _080E0E1C: .4byte gObjectBankIDs -_080E0E20: .4byte gBattleAnimPlayerMonIndex +_080E0E20: .4byte gBattleAnimBankAttacker thumb_func_end sub_80E0CD0 thumb_func_start sub_80E0E24 @@ -46524,7 +46524,7 @@ _080E0E4C: .4byte _080E0E84 _080E0E6C: ldrb r0, [r2] - bl obj_id_for_side_relative_to_move + bl GetAnimBankSpriteId lsls r0, 24 lsrs r2, r0, 24 b _080E0E8A @@ -46552,7 +46552,7 @@ _080E0E90: lsls r0, 24 lsrs r4, r0, 24 adds r0, r4, 0 - bl b_side_obj__get_some_boolean + bl IsAnimBankSpriteVisible lsls r0, 24 cmp r0, 0 beq _080E0EB4 @@ -46622,7 +46622,7 @@ _080E0F18: .4byte gBattleAnimArgs sub_80E0F1C: @ 80E0F1C push {r4,r5,lr} adds r4, r0, 0 - ldr r5, _080E0F74 @ =gBattleAnimPlayerMonIndex + ldr r5, _080E0F74 @ =gBattleAnimBankAttacker ldrb r0, [r5] movs r1, 0x2 bl sub_8077ABC @@ -46637,7 +46637,7 @@ sub_80E0F1C: @ 80E0F1C strh r0, [r4, 0x22] movs r0, 0x14 strh r0, [r4, 0x2E] - ldr r5, _080E0F78 @ =gBattleAnimEnemyMonIndex + ldr r5, _080E0F78 @ =gBattleAnimBankTarget ldrb r0, [r5] movs r1, 0x2 bl sub_8077ABC @@ -46660,8 +46660,8 @@ sub_80E0F1C: @ 80E0F1C pop {r0} bx r0 .align 2, 0 -_080E0F74: .4byte gBattleAnimPlayerMonIndex -_080E0F78: .4byte gBattleAnimEnemyMonIndex +_080E0F74: .4byte gBattleAnimBankAttacker +_080E0F78: .4byte gBattleAnimBankTarget _080E0F7C: .4byte 0x0000ffd8 _080E0F80: .4byte sub_80E0F84 thumb_func_end sub_80E0F1C @@ -46687,7 +46687,7 @@ sub_80E0F84: @ 80E0F84 strh r1, [r5, 0x24] movs r0, 0x14 strh r0, [r5, 0x2E] - ldr r4, _080E0FE0 @ =gBattleAnimPlayerMonIndex + ldr r4, _080E0FE0 @ =gBattleAnimBankAttacker ldrb r0, [r4] movs r1, 0x2 bl sub_8077ABC @@ -46711,7 +46711,7 @@ _080E0FD8: pop {r0} bx r0 .align 2, 0 -_080E0FE0: .4byte gBattleAnimPlayerMonIndex +_080E0FE0: .4byte gBattleAnimBankAttacker _080E0FE4: .4byte sub_80E0FE8 thumb_func_end sub_80E0F84 @@ -46737,7 +46737,7 @@ sub_80E1004: @ 80E1004 adds r6, r0, 0 movs r1, 0x1 bl sub_8078764 - ldr r0, _080E1064 @ =gBattleAnimPlayerMonIndex + ldr r0, _080E1064 @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -46751,7 +46751,7 @@ _080E1024: ldr r4, _080E1068 @ =gBattleAnimArgs ldrh r0, [r4, 0x8] strh r0, [r6, 0x2E] - ldr r5, _080E106C @ =gBattleAnimEnemyMonIndex + ldr r5, _080E106C @ =gBattleAnimBankTarget ldrb r0, [r5] movs r1, 0x2 bl sub_8077ABC @@ -46772,14 +46772,14 @@ _080E1024: str r0, [r6, 0x1C] ldr r1, _080E1074 @ =move_anim_8072740 adds r0, r6, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 pop {r4-r6} pop {r0} bx r0 .align 2, 0 -_080E1064: .4byte gBattleAnimPlayerMonIndex +_080E1064: .4byte gBattleAnimBankAttacker _080E1068: .4byte gBattleAnimArgs -_080E106C: .4byte gBattleAnimEnemyMonIndex +_080E106C: .4byte gBattleAnimBankTarget _080E1070: .4byte sub_8078B34 _080E1074: .4byte move_anim_8072740 thumb_func_end sub_80E1004 @@ -46792,7 +46792,7 @@ sub_80E1078: @ 80E1078 adds r6, r0, 0 movs r1, 0x1 bl sub_80787B0 - ldr r4, _080E10F8 @ =gBattleAnimEnemyMonIndex + ldr r4, _080E10F8 @ =gBattleAnimBankTarget ldrb r0, [r4] movs r1, 0x2 bl sub_8077EE4 @@ -46839,14 +46839,14 @@ _080E10D0: str r0, [r6, 0x1C] ldr r1, _080E1104 @ =move_anim_8074EE0 adds r0, r6, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 pop {r3} mov r8, r3 pop {r4-r7} pop {r0} bx r0 .align 2, 0 -_080E10F8: .4byte gBattleAnimEnemyMonIndex +_080E10F8: .4byte gBattleAnimBankTarget _080E10FC: .4byte gBattleAnimArgs _080E1100: .4byte sub_8078B34 _080E1104: .4byte move_anim_8074EE0 @@ -46872,7 +46872,7 @@ sub_80E1108: @ 80E1108 ldrsh r0, [r6, r1] cmp r0, 0 bne _080E117C - ldr r4, _080E1174 @ =gBattleAnimPlayerMonIndex + ldr r4, _080E1174 @ =gBattleAnimBankAttacker ldrb r0, [r4] movs r1, 0x2 bl sub_8077ABC @@ -46905,7 +46905,7 @@ _080E1162: _080E1168: .4byte 0x000003ff _080E116C: .4byte 0xfffffc00 _080E1170: .4byte gBattleAnimArgs -_080E1174: .4byte gBattleAnimPlayerMonIndex +_080E1174: .4byte gBattleAnimBankAttacker _080E1178: .4byte sub_80E1198 _080E117C: ldrh r0, [r6, 0x2] @@ -47086,11 +47086,11 @@ _080E12B0: .4byte _080E1414 _080E12C4: movs r0, 0 - bl obj_id_for_side_relative_to_move + bl GetAnimBankSpriteId lsls r0, 24 lsrs r0, 24 strh r0, [r4, 0x1C] - ldr r0, _080E12EC @ =gBattleAnimPlayerMonIndex + ldr r0, _080E12EC @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankIdentity_permutated lsls r0, 24 @@ -47104,7 +47104,7 @@ _080E12C4: ldr r0, _080E12F4 @ =gUnknown_030041B4 b _080E1300 .align 2, 0 -_080E12EC: .4byte gBattleAnimPlayerMonIndex +_080E12EC: .4byte gBattleAnimBankAttacker _080E12F0: .4byte gUnknown_030042C0 _080E12F4: .4byte gUnknown_030041B4 _080E12F8: @@ -47115,7 +47115,7 @@ _080E12F8: _080E1300: ldrh r0, [r0] strh r0, [r4, 0x22] - ldr r0, _080E1344 @ =gBattleAnimPlayerMonIndex + ldr r0, _080E1344 @ =gBattleAnimBankAttacker ldrb r0, [r0] bl sub_8077FC0 lsls r0, 24 @@ -47146,7 +47146,7 @@ _080E1322: .align 2, 0 _080E133C: .4byte gUnknown_03004288 _080E1340: .4byte gUnknown_03004280 -_080E1344: .4byte gBattleAnimPlayerMonIndex +_080E1344: .4byte gBattleAnimBankAttacker _080E1348: .4byte gSprites _080E134C: ldrb r0, [r4, 0x1E] @@ -47281,7 +47281,7 @@ sub_80E143C: @ 80E143C lsls r0, 24 lsrs r5, r0, 24 movs r0, 0 - bl obj_id_for_side_relative_to_move + bl GetAnimBankSpriteId lsls r0, 24 lsrs r0, 24 ldr r2, _080E147C @ =gSprites @@ -47298,7 +47298,7 @@ sub_80E143C: @ 80E143C movs r4, 0 strh r4, [r1, 0x24] strh r4, [r1, 0x26] - ldr r0, _080E1480 @ =gBattleAnimPlayerMonIndex + ldr r0, _080E1480 @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankIdentity_permutated lsls r0, 24 @@ -47309,7 +47309,7 @@ sub_80E143C: @ 80E143C b _080E148A .align 2, 0 _080E147C: .4byte gSprites -_080E1480: .4byte gBattleAnimPlayerMonIndex +_080E1480: .4byte gBattleAnimBankAttacker _080E1484: .4byte gUnknown_030041B4 _080E1488: ldr r0, _080E1498 @ =gUnknown_03004280 @@ -47379,7 +47379,7 @@ sub_80E14DC: @ 80E14DC _080E14FC: .4byte gTasks _080E1500: movs r0, 0 - bl obj_id_for_side_relative_to_move + bl GetAnimBankSpriteId lsls r0, 24 lsrs r0, 24 strh r0, [r4, 0x1C] @@ -47459,11 +47459,11 @@ _080E158C: .4byte _080E165C _080E15A0: movs r0, 0 - bl obj_id_for_side_relative_to_move + bl GetAnimBankSpriteId lsls r0, 24 lsrs r0, 24 strh r0, [r4, 0x1C] - ldr r0, _080E15C4 @ =gBattleAnimPlayerMonIndex + ldr r0, _080E15C4 @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankIdentity_permutated lsls r0, 24 @@ -47474,14 +47474,14 @@ _080E15A0: ldr r0, _080E15C8 @ =gUnknown_030042C0 b _080E15CE .align 2, 0 -_080E15C4: .4byte gBattleAnimPlayerMonIndex +_080E15C4: .4byte gBattleAnimBankAttacker _080E15C8: .4byte gUnknown_030042C0 _080E15CC: ldr r0, _080E15EC @ =gUnknown_03004288 _080E15CE: ldrh r0, [r0] strh r0, [r4, 0x20] - ldr r0, _080E15F0 @ =gBattleAnimPlayerMonIndex + ldr r0, _080E15F0 @ =gBattleAnimBankAttacker ldrb r0, [r0] bl sub_8077FC0 lsls r0, 24 @@ -47494,7 +47494,7 @@ _080E15CE: b _080E164A .align 2, 0 _080E15EC: .4byte gUnknown_03004288 -_080E15F0: .4byte gBattleAnimPlayerMonIndex +_080E15F0: .4byte gBattleAnimBankAttacker _080E15F4: ldrb r0, [r4, 0x1E] movs r1, 0x26 @@ -47668,13 +47668,13 @@ sub_80E1728: @ 80E1728 adds r7, r0, 0 cmp r1, 0 bne _080E1744 - ldr r0, _080E1740 @ =gBattleAnimPlayerMonIndex + ldr r0, _080E1740 @ =gBattleAnimBankAttacker b _080E1746 .align 2, 0 _080E173C: .4byte gBattleAnimArgs -_080E1740: .4byte gBattleAnimPlayerMonIndex +_080E1740: .4byte gBattleAnimBankAttacker _080E1744: - ldr r0, _080E17A8 @ =gBattleAnimEnemyMonIndex + ldr r0, _080E17A8 @ =gBattleAnimBankTarget _080E1746: ldrb r4, [r0] movs r6, 0x18 @@ -47723,7 +47723,7 @@ _080E1762: pop {r0} bx r0 .align 2, 0 -_080E17A8: .4byte gBattleAnimEnemyMonIndex +_080E17A8: .4byte gBattleAnimBankTarget _080E17AC: .4byte sub_80E17B0 thumb_func_end sub_80E1728 @@ -47752,13 +47752,13 @@ sub_80E17CC: @ 80E17CC ldrsh r0, [r0, r1] cmp r0, 0 bne _080E17E8 - ldr r0, _080E17E4 @ =gBattleAnimPlayerMonIndex + ldr r0, _080E17E4 @ =gBattleAnimBankAttacker b _080E17EA .align 2, 0 _080E17E0: .4byte gBattleAnimArgs -_080E17E4: .4byte gBattleAnimPlayerMonIndex +_080E17E4: .4byte gBattleAnimBankAttacker _080E17E8: - ldr r0, _080E1848 @ =gBattleAnimEnemyMonIndex + ldr r0, _080E1848 @ =gBattleAnimBankTarget _080E17EA: ldrb r5, [r0] adds r0, r5, 0 @@ -47796,7 +47796,7 @@ _080E17EA: strh r0, [r6, 0x4] ldr r1, _080E185C @ =move_anim_8072740 adds r0, r6, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 ldrh r0, [r4, 0x4] strh r0, [r6, 0x2E] ldr r0, _080E1860 @ =sub_80782D8 @@ -47805,7 +47805,7 @@ _080E17EA: pop {r0} bx r0 .align 2, 0 -_080E1848: .4byte gBattleAnimEnemyMonIndex +_080E1848: .4byte gBattleAnimBankTarget _080E184C: .4byte 0x0000fff0 _080E1850: .4byte gBattleAnimArgs _080E1854: .4byte 0x000003ff @@ -47870,7 +47870,7 @@ _080E18C8: _080E18CE: lsls r0, r5, 24 lsrs r0, 24 - bl b_side_obj__get_some_boolean + bl IsAnimBankSpriteVisible lsls r0, 24 cmp r0, 0 beq _080E18F8 @@ -47899,7 +47899,7 @@ _080E18F8: _080E1904: .4byte gObjectBankIDs _080E1908: ldrb r0, [r6] - bl obj_id_for_side_relative_to_move + bl GetAnimBankSpriteId lsls r0, 24 lsrs r0, 24 strh r0, [r4, 0x1A] @@ -48282,13 +48282,13 @@ sub_80E1BB0: @ 80E1BB0 adds r6, r2, 0 cmp r0, 0 beq _080E1BD0 - ldr r0, _080E1BCC @ =gBattleAnimEnemyMonIndex + ldr r0, _080E1BCC @ =gBattleAnimBankTarget b _080E1BD2 .align 2, 0 _080E1BC8: .4byte gBattleAnimArgs -_080E1BCC: .4byte gBattleAnimEnemyMonIndex +_080E1BCC: .4byte gBattleAnimBankTarget _080E1BD0: - ldr r0, _080E1C40 @ =gBattleAnimPlayerMonIndex + ldr r0, _080E1C40 @ =gBattleAnimBankAttacker _080E1BD2: ldrb r0, [r0] adds r5, r0, 0 @@ -48343,7 +48343,7 @@ _080E1BE2: pop {r0} bx r0 .align 2, 0 -_080E1C40: .4byte gBattleAnimPlayerMonIndex +_080E1C40: .4byte gBattleAnimBankAttacker _080E1C44: .4byte sub_80E1C58 _080E1C48: .4byte gTasks _080E1C4C: .4byte 0x000001ff @@ -48412,7 +48412,7 @@ sub_80E1CB4: @ 80E1CB4 strh r0, [r4, 0x22] ldrh r0, [r5, 0x4] strh r0, [r4, 0x2E] - ldr r0, _080E1CF0 @ =gBattleAnimPlayerMonIndex + ldr r0, _080E1CF0 @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -48427,7 +48427,7 @@ sub_80E1CB4: @ 80E1CB4 b _080E1D02 .align 2, 0 _080E1CEC: .4byte gBattleAnimArgs -_080E1CF0: .4byte gBattleAnimPlayerMonIndex +_080E1CF0: .4byte gBattleAnimBankAttacker _080E1CF4: ldrh r0, [r5, 0x6] strh r0, [r4, 0x30] @@ -48763,7 +48763,7 @@ sub_80E1F3C: @ 80E1F3C strh r2, [r4, 0x38] ldr r1, _080E1F84 @ =move_anim_8074EE0 adds r0, r4, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 ldr r1, _080E1F88 @ =sub_8078174 str r1, [r4, 0x1C] adds r0, r4, 0 @@ -49265,9 +49265,9 @@ sub_80E2324: @ 80E2324 lsrs r0, 24 mov r8, r0 movs r2, 0 - ldr r0, _080E239C @ =gBattleAnimPlayerMonIndex + ldr r0, _080E239C @ =gBattleAnimBankAttacker ldrb r6, [r0] - ldr r0, _080E23A0 @ =gBattleAnimEnemyMonIndex + ldr r0, _080E23A0 @ =gBattleAnimBankTarget ldrb r7, [r0] ldr r4, _080E23A4 @ =gBattleAnimArgs ldrh r1, [r4] @@ -49317,8 +49317,8 @@ _080E2382: pop {r0} bx r0 .align 2, 0 -_080E239C: .4byte gBattleAnimPlayerMonIndex -_080E23A0: .4byte gBattleAnimEnemyMonIndex +_080E239C: .4byte gBattleAnimBankAttacker +_080E23A0: .4byte gBattleAnimBankTarget _080E23A4: .4byte gBattleAnimArgs thumb_func_end sub_80E2324 @@ -49361,10 +49361,10 @@ _080E23EA: ldrh r0, [r4, 0x8] adds r0, 0x1 strh r0, [r4, 0x8] - ldr r0, _080E24A4 @ =gBattleAnimPlayerMonIndex + ldr r0, _080E24A4 @ =gBattleAnimBankAttacker ldrb r0, [r0] mov r9, r0 - ldr r0, _080E24A8 @ =gBattleAnimEnemyMonIndex + ldr r0, _080E24A8 @ =gBattleAnimBankTarget ldrb r0, [r0] mov r10, r0 ldrh r1, [r4, 0xC] @@ -49451,8 +49451,8 @@ _080E248E: .align 2, 0 _080E249C: .4byte gTasks _080E24A0: .4byte gBattleAnimArgs -_080E24A4: .4byte gBattleAnimPlayerMonIndex -_080E24A8: .4byte gBattleAnimEnemyMonIndex +_080E24A4: .4byte gBattleAnimBankAttacker +_080E24A8: .4byte gBattleAnimBankTarget _080E24AC: .4byte 0x0000ffff _080E24B0: .4byte gSprites _080E24B4: .4byte gHealthboxIDs @@ -49506,14 +49506,14 @@ _080E2508: ldr r1, _080E2514 @ =gSpriteCoordOffsetX _080E250A: adds r0, r4, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 b _080E2520 .align 2, 0 _080E2514: .4byte gSpriteCoordOffsetX _080E2518: ldr r1, _080E2550 @ =gSpriteCoordOffsetY adds r0, r4, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 _080E2520: movs r0, 0x3A ldrsh r1, [r4, r0] @@ -49643,7 +49643,7 @@ sub_80E260C: @ 80E260C push {r4-r6,lr} ldr r6, _080E2680 @ =gSprites ldr r4, _080E2684 @ =gObjectBankIDs - ldr r5, _080E2688 @ =gBattleAnimPlayerMonIndex + ldr r5, _080E2688 @ =gBattleAnimBankAttacker ldrb r0, [r5] adds r0, r4 ldrb r0, [r0] @@ -49658,7 +49658,7 @@ sub_80E260C: @ 80E260C adds r0, r2, 0 ands r0, r3 strb r0, [r1] - ldr r3, _080E268C @ =gBattleAnimEnemyMonIndex + ldr r3, _080E268C @ =gBattleAnimBankTarget ldrb r0, [r3] adds r0, r4 ldrb r1, [r0] @@ -49700,8 +49700,8 @@ sub_80E260C: @ 80E260C .align 2, 0 _080E2680: .4byte gSprites _080E2684: .4byte gObjectBankIDs -_080E2688: .4byte gBattleAnimPlayerMonIndex -_080E268C: .4byte gBattleAnimEnemyMonIndex +_080E2688: .4byte gBattleAnimBankAttacker +_080E268C: .4byte gBattleAnimBankTarget _080E2690: .4byte gBattleAnimArgs _080E2694: cmp r0, 0 @@ -49874,7 +49874,7 @@ _080E27CC: str r0, [r5, 0x1C] ldr r1, _080E27E4 @ =move_anim_8072740 adds r0, r5, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 pop {r4,r5} pop {r0} bx r0 @@ -49912,7 +49912,7 @@ _080E2814: str r0, [r5, 0x1C] ldr r1, _080E2834 @ =sub_80DA48C adds r0, r5, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 pop {r4,r5} pop {r0} bx r0 @@ -49926,7 +49926,7 @@ _080E2834: .4byte sub_80DA48C sub_80E2838: @ 80E2838 push {r4,lr} adds r4, r0, 0 - ldr r0, _080E2868 @ =gBattleAnimPlayerMonIndex + ldr r0, _080E2868 @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -49947,7 +49947,7 @@ _080E285C: pop {r0} bx r0 .align 2, 0 -_080E2868: .4byte gBattleAnimPlayerMonIndex +_080E2868: .4byte gBattleAnimBankAttacker _080E286C: .4byte gBattleAnimArgs thumb_func_end sub_80E2838 @@ -50007,7 +50007,7 @@ _080E28B4: strh r0, [r4, 0x26] ldr r1, _080E2900 @ =move_anim_8074EE0 adds r0, r4, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 ldr r0, _080E2904 @ =sub_80785E4 str r0, [r4, 0x1C] pop {r4,r5} @@ -50026,7 +50026,7 @@ sub_80E2908: @ 80E2908 adds r4, r0, 0 ldr r5, _080E2968 @ =gBattleAnimArgs ldrb r0, [r5] - bl obj_id_for_side_relative_to_move + bl GetAnimBankSpriteId lsls r0, 24 lsrs r0, 24 strh r0, [r4, 0x2E] @@ -50060,7 +50060,7 @@ sub_80E2908: @ 80E2908 bl StartSpriteAffineAnim ldr r1, _080E2970 @ =move_anim_8074EE0 adds r0, r4, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 ldr r0, _080E2974 @ =sub_80785E4 str r0, [r4, 0x1C] pop {r4,r5} @@ -50098,7 +50098,7 @@ _080E299C: strh r0, [r4, 0x2E] ldr r1, _080E29B8 @ =move_anim_8072740 adds r0, r4, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 ldr r0, _080E29BC @ =sub_80782D8 str r0, [r4, 0x1C] pop {r4} @@ -50247,33 +50247,33 @@ _080E2AD0: movs r5, 0 _080E2AD2: mov r0, sp - ldr r1, _080E2AD8 @ =gBattleAnimPlayerMonIndex + ldr r1, _080E2AD8 @ =gBattleAnimBankAttacker b _080E2AE2 .align 2, 0 -_080E2AD8: .4byte gBattleAnimPlayerMonIndex +_080E2AD8: .4byte gBattleAnimBankAttacker _080E2ADC: movs r5, 0 _080E2ADE: mov r0, sp - ldr r1, _080E2AE8 @ =gBattleAnimEnemyMonIndex + ldr r1, _080E2AE8 @ =gBattleAnimBankTarget _080E2AE2: ldrb r1, [r1] strb r1, [r0] b _080E2B26 .align 2, 0 -_080E2AE8: .4byte gBattleAnimEnemyMonIndex +_080E2AE8: .4byte gBattleAnimBankTarget _080E2AEC: mov r1, sp - ldr r0, _080E2AFC @ =gBattleAnimPlayerMonIndex + ldr r0, _080E2AFC @ =gBattleAnimBankAttacker ldrb r0, [r0] strb r0, [r1] - ldr r0, _080E2B00 @ =gBattleAnimEnemyMonIndex + ldr r0, _080E2B00 @ =gBattleAnimBankTarget ldrb r0, [r0] strb r0, [r1, 0x1] b _080E2B26 .align 2, 0 -_080E2AFC: .4byte gBattleAnimPlayerMonIndex -_080E2B00: .4byte gBattleAnimEnemyMonIndex +_080E2AFC: .4byte gBattleAnimBankAttacker +_080E2B00: .4byte gBattleAnimBankTarget _080E2B04: mov r1, sp movs r0, 0xFF @@ -50282,14 +50282,14 @@ _080E2B04: _080E2B0C: movs r5, 0 mov r2, sp - ldr r0, _080E2B14 @ =gBattleAnimPlayerMonIndex + ldr r0, _080E2B14 @ =gBattleAnimBankAttacker b _080E2B1E .align 2, 0 -_080E2B14: .4byte gBattleAnimPlayerMonIndex +_080E2B14: .4byte gBattleAnimBankAttacker _080E2B18: movs r5, 0 mov r2, sp - ldr r0, _080E2B70 @ =gBattleAnimEnemyMonIndex + ldr r0, _080E2B70 @ =gBattleAnimBankTarget _080E2B1E: ldrb r0, [r0] movs r1, 0x2 @@ -50306,7 +50306,7 @@ _080E2B2A: cmp r4, r0 beq _080E2B54 adds r0, r4, 0 - bl b_side_obj__get_some_boolean + bl IsAnimBankSpriteVisible lsls r0, 24 cmp r0, 0 beq _080E2B54 @@ -50332,7 +50332,7 @@ _080E2B54: pop {r0} bx r0 .align 2, 0 -_080E2B70: .4byte gBattleAnimEnemyMonIndex +_080E2B70: .4byte gBattleAnimBankTarget thumb_func_end sub_80E2A7C thumb_func_start sub_80E2B74 @@ -50900,7 +50900,7 @@ _080E2FAC: lsls r0, 24 cmp r0, 0 bne _080E3028 - ldr r5, _080E305C @ =gBattleAnimPlayerMonIndex + ldr r5, _080E305C @ =gBattleAnimBankAttacker ldrb r0, [r5] bl GetBankIdentity lsls r0, 24 @@ -50916,7 +50916,7 @@ _080E2FDC: ldrb r0, [r5] movs r6, 0x2 eors r0, r6 - bl b_side_obj__get_some_boolean + bl IsAnimBankSpriteVisible lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -50968,12 +50968,12 @@ _080E304C: .4byte REG_BLDCNT _080E3050: .4byte 0x00003f42 _080E3054: .4byte 0x00000c08 _080E3058: .4byte REG_BG1CNT -_080E305C: .4byte gBattleAnimPlayerMonIndex +_080E305C: .4byte gBattleAnimBankAttacker _080E3060: .4byte gSprites _080E3064: .4byte gObjectBankIDs _080E3068: .4byte 0x02019348 _080E306C: - ldr r4, _080E308C @ =gBattleAnimPlayerMonIndex + ldr r4, _080E308C @ =gBattleAnimBankAttacker ldrb r0, [r4] bl GetBankSide lsls r0, 24 @@ -50989,7 +50989,7 @@ _080E306C: ldr r1, _080E3094 @ =gEnemyParty b _080E30A8 .align 2, 0 -_080E308C: .4byte gBattleAnimPlayerMonIndex +_080E308C: .4byte gBattleAnimBankAttacker _080E3090: .4byte gBattlePartyID _080E3094: .4byte gEnemyParty _080E3098: @@ -51009,10 +51009,10 @@ _080E30A8: lsrs r4, r0, 16 _080E30B4: movs r0, 0 - bl obj_id_for_side_relative_to_move + bl GetAnimBankSpriteId lsls r0, 24 lsrs r5, r0, 24 - ldr r0, _080E3168 @ =gBattleAnimPlayerMonIndex + ldr r0, _080E3168 @ =gBattleAnimBankAttacker ldrb r0, [r0] adds r1, r5, 0 adds r2, r4, 0 @@ -51089,7 +51089,7 @@ _080E3106: .align 2, 0 _080E3160: .4byte gBattlePartyID _080E3164: .4byte gPlayerParty -_080E3168: .4byte gBattleAnimPlayerMonIndex +_080E3168: .4byte gBattleAnimBankAttacker _080E316C: .4byte 0x040000d4 _080E3170: .4byte 0x85000400 _080E3174: .4byte gUnknown_08D20A30 @@ -51174,7 +51174,7 @@ _080E3208: adds r0, 0x2 strh r5, [r0] movs r0, 0 - bl obj_id_for_side_relative_to_move + bl GetAnimBankSpriteId ldr r0, _080E32CC @ =gSprites mov r8, r0 movs r2, 0x8 @@ -51200,7 +51200,7 @@ _080E3208: cmp r0, 0x1 bne _080E3288 ldr r2, _080E32D8 @ =gObjectBankIDs - ldr r0, _080E32DC @ =gBattleAnimPlayerMonIndex + ldr r0, _080E32DC @ =gBattleAnimBankAttacker ldrb r1, [r0] movs r0, 0x2 eors r0, r1 @@ -51253,7 +51253,7 @@ _080E32CC: .4byte gSprites _080E32D0: .4byte 0x040000d4 _080E32D4: .4byte 0x85000200 _080E32D8: .4byte gObjectBankIDs -_080E32DC: .4byte gBattleAnimPlayerMonIndex +_080E32DC: .4byte gBattleAnimBankAttacker thumb_func_end sub_80E3194 thumb_func_start sub_80E32E0 @@ -51344,13 +51344,13 @@ _080E336C: ldrsh r0, [r7, r1] cmp r0, 0 bne _080E3390 - ldr r0, _080E338C @ =gBattleAnimPlayerMonIndex + ldr r0, _080E338C @ =gBattleAnimBankAttacker b _080E3392 .align 2, 0 _080E3388: .4byte gTasks -_080E338C: .4byte gBattleAnimPlayerMonIndex +_080E338C: .4byte gBattleAnimBankAttacker _080E3390: - ldr r0, _080E34B4 @ =gBattleAnimEnemyMonIndex + ldr r0, _080E34B4 @ =gBattleAnimBankTarget _080E3392: ldrb r5, [r0] movs r0, 0x2 @@ -51367,7 +51367,7 @@ _080E3392: cmp r0, 0 beq _080E33C0 mov r0, r8 - bl b_side_obj__get_some_boolean + bl IsAnimBankSpriteVisible lsls r0, 24 cmp r0, 0 bne _080E33C0 @@ -51453,7 +51453,7 @@ _080E3432: bne _080E34A4 _080E345E: mov r0, r8 - bl b_side_obj__get_some_boolean + bl IsAnimBankSpriteVisible lsls r0, 24 lsrs r0, 24 cmp r0, 0x1 @@ -51495,7 +51495,7 @@ _080E34A4: ldrh r4, [r0] b _080E3522 .align 2, 0 -_080E34B4: .4byte gBattleAnimEnemyMonIndex +_080E34B4: .4byte gBattleAnimBankTarget _080E34B8: .4byte gUnknown_030042C4 _080E34BC: .4byte gUnknown_03004240 _080E34C0: .4byte REG_WININ @@ -52181,7 +52181,7 @@ sub_80E3A08: @ 80E3A08 lsrs r6, r0, 24 movs r4, 0 movs r2, 0 - ldr r0, _080E3A50 @ =gBattleAnimPlayerMonIndex + ldr r0, _080E3A50 @ =gBattleAnimBankAttacker ldrb r3, [r0] movs r5, 0x1 _080E3A18: @@ -52214,7 +52214,7 @@ _080E3A34: pop {r0} bx r0 .align 2, 0 -_080E3A50: .4byte gBattleAnimPlayerMonIndex +_080E3A50: .4byte gBattleAnimBankAttacker _080E3A54: .4byte gBattleAnimArgs thumb_func_end sub_80E3A08 @@ -52235,7 +52235,7 @@ sub_80E3A58: @ 80E3A58 ldrsh r0, [r4, r1] cmp r0, 0 beq _080E3A94 - ldr r0, _080E3AC8 @ =gBattleAnimPlayerMonIndex + ldr r0, _080E3AC8 @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -52271,7 +52271,7 @@ _080E3A94: .align 2, 0 _080E3AC0: .4byte sub_80E3AD0 _080E3AC4: .4byte gBattleAnimArgs -_080E3AC8: .4byte gBattleAnimPlayerMonIndex +_080E3AC8: .4byte gBattleAnimBankAttacker _080E3ACC: .4byte gTasks thumb_func_end sub_80E3A58 @@ -52343,7 +52343,7 @@ sub_80E3B4C: @ 80E3B4C adds r4, r0, 0 lsls r4, 24 lsrs r4, 24 - ldr r0, _080E3B70 @ =gBattleAnimPlayerMonIndex + ldr r0, _080E3B70 @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankSide ldr r1, _080E3B74 @ =gBattleAnimArgs @@ -52356,7 +52356,7 @@ sub_80E3B4C: @ 80E3B4C pop {r0} bx r0 .align 2, 0 -_080E3B70: .4byte gBattleAnimPlayerMonIndex +_080E3B70: .4byte gBattleAnimBankAttacker _080E3B74: .4byte gBattleAnimArgs thumb_func_end sub_80E3B4C @@ -52366,7 +52366,7 @@ sub_80E3B78: @ 80E3B78 adds r4, r0, 0 lsls r4, 24 lsrs r4, 24 - ldr r0, _080E3B9C @ =gBattleAnimEnemyMonIndex + ldr r0, _080E3B9C @ =gBattleAnimBankTarget ldrb r0, [r0] bl GetBankSide ldr r1, _080E3BA0 @ =gBattleAnimArgs @@ -52379,7 +52379,7 @@ sub_80E3B78: @ 80E3B78 pop {r0} bx r0 .align 2, 0 -_080E3B9C: .4byte gBattleAnimEnemyMonIndex +_080E3B9C: .4byte gBattleAnimBankTarget _080E3BA0: .4byte gBattleAnimArgs thumb_func_end sub_80E3B78 @@ -52390,10 +52390,10 @@ sub_80E3BA4: @ 80E3BA4 lsrs r3, r0, 24 ldr r5, _080E3BD0 @ =gBattleAnimArgs movs r4, 0 - ldr r0, _080E3BD4 @ =gBattleAnimPlayerMonIndex + ldr r0, _080E3BD4 @ =gBattleAnimBankAttacker ldrb r2, [r0] movs r0, 0x2 - ldr r1, _080E3BD8 @ =gBattleAnimEnemyMonIndex + ldr r1, _080E3BD8 @ =gBattleAnimBankTarget eors r0, r2 ldrb r1, [r1] cmp r0, r1 @@ -52408,8 +52408,8 @@ _080E3BC0: bx r0 .align 2, 0 _080E3BD0: .4byte gBattleAnimArgs -_080E3BD4: .4byte gBattleAnimPlayerMonIndex -_080E3BD8: .4byte gBattleAnimEnemyMonIndex +_080E3BD4: .4byte gBattleAnimBankAttacker +_080E3BD8: .4byte gBattleAnimBankTarget thumb_func_end sub_80E3BA4 thumb_func_start sub_80E3BDC @@ -52420,13 +52420,13 @@ sub_80E3BDC: @ 80E3BDC movs r4, 0 ldr r6, _080E3C3C @ =gSprites _080E3BE6: - ldr r0, _080E3C40 @ =gBattleAnimPlayerMonIndex + ldr r0, _080E3C40 @ =gBattleAnimBankAttacker ldrb r0, [r0] cmp r4, r0 beq _080E3C24 lsls r0, r4, 24 lsrs r0, 24 - bl b_side_obj__get_some_boolean + bl IsAnimBankSpriteVisible lsls r0, 24 cmp r0, 0 beq _080E3C24 @@ -52463,7 +52463,7 @@ _080E3C24: bx r0 .align 2, 0 _080E3C3C: .4byte gSprites -_080E3C40: .4byte gBattleAnimPlayerMonIndex +_080E3C40: .4byte gBattleAnimBankAttacker _080E3C44: .4byte gObjectBankIDs _080E3C48: .4byte gBattleAnimArgs thumb_func_end sub_80E3BDC @@ -52513,7 +52513,7 @@ sub_80E3C4C: @ 80E3C4C cmp r1, 0 beq _080E3CB2 adds r0, r6, 0 - bl b_side_obj__get_some_boolean + bl IsAnimBankSpriteVisible lsls r0, 24 cmp r0, 0 bne _080E3CB2 @@ -52986,14 +52986,14 @@ _080E4068: .4byte gBattleAnimArgs _080E406C: cmp r0, 0x1 bne _080E4078 - ldr r0, _080E4074 @ =gBattleAnimPlayerMonIndex + ldr r0, _080E4074 @ =gBattleAnimBankAttacker b _080E407E .align 2, 0 -_080E4074: .4byte gBattleAnimPlayerMonIndex +_080E4074: .4byte gBattleAnimBankAttacker _080E4078: cmp r0, 0x2 bne _080E4084 - ldr r0, _080E409C @ =gBattleAnimEnemyMonIndex + ldr r0, _080E409C @ =gBattleAnimBankTarget _080E407E: ldrb r0, [r0] adds r4, r0, 0 @@ -53010,7 +53010,7 @@ _080E4084: ldr r0, _080E40A4 @ =0x02014800 b _080E40AA .align 2, 0 -_080E409C: .4byte gBattleAnimEnemyMonIndex +_080E409C: .4byte gBattleAnimBankTarget _080E40A0: .4byte gBattleAnimArgs _080E40A4: .4byte 0x02014800 _080E40A8: @@ -53073,14 +53073,14 @@ _080E4110: .4byte gBattleAnimArgs _080E4114: cmp r0, 0x1 bne _080E4120 - ldr r0, _080E411C @ =gBattleAnimPlayerMonIndex + ldr r0, _080E411C @ =gBattleAnimBankAttacker b _080E4126 .align 2, 0 -_080E411C: .4byte gBattleAnimPlayerMonIndex +_080E411C: .4byte gBattleAnimBankAttacker _080E4120: cmp r0, 0x2 bne _080E412C - ldr r0, _080E4148 @ =gBattleAnimEnemyMonIndex + ldr r0, _080E4148 @ =gBattleAnimBankTarget _080E4126: ldrb r0, [r0] adds r4, r0, 0 @@ -53100,7 +53100,7 @@ _080E412C: ldr r0, _080E4154 @ =0x02014800 b _080E415A .align 2, 0 -_080E4148: .4byte gBattleAnimEnemyMonIndex +_080E4148: .4byte gBattleAnimBankTarget _080E414C: .4byte gPlttBufferUnfaded _080E4150: .4byte gBattleAnimArgs _080E4154: .4byte 0x02014800 @@ -53160,14 +53160,14 @@ _080E41B8: .4byte gBattleAnimArgs _080E41BC: cmp r0, 0x1 bne _080E41C8 - ldr r0, _080E41C4 @ =gBattleAnimPlayerMonIndex + ldr r0, _080E41C4 @ =gBattleAnimBankAttacker b _080E41CE .align 2, 0 -_080E41C4: .4byte gBattleAnimPlayerMonIndex +_080E41C4: .4byte gBattleAnimBankAttacker _080E41C8: cmp r0, 0x2 bne _080E41D4 - ldr r0, _080E41F4 @ =gBattleAnimEnemyMonIndex + ldr r0, _080E41F4 @ =gBattleAnimBankTarget _080E41CE: ldrb r0, [r0] adds r4, r0, 0 @@ -53187,7 +53187,7 @@ _080E41D4: pop {r0} bx r0 .align 2, 0 -_080E41F4: .4byte gBattleAnimEnemyMonIndex +_080E41F4: .4byte gBattleAnimBankTarget _080E41F8: .4byte gPlttBufferUnfaded _080E41FC: .4byte gPlttBufferFaded thumb_func_end sub_80E4178 @@ -53226,11 +53226,11 @@ sub_80E4234: @ 80E4234 push {lr} lsls r0, 24 lsrs r0, 24 - ldr r2, _080E4254 @ =gBattleAnimPlayerMonIndex + ldr r2, _080E4254 @ =gBattleAnimBankAttacker ldr r1, _080E4258 @ =gBankTarget ldrb r1, [r1] strb r1, [r2] - ldr r2, _080E425C @ =gBattleAnimEnemyMonIndex + ldr r2, _080E425C @ =gBattleAnimBankTarget ldr r1, _080E4260 @ =gEffectBank ldrb r1, [r1] strb r1, [r2] @@ -53238,9 +53238,9 @@ sub_80E4234: @ 80E4234 pop {r0} bx r0 .align 2, 0 -_080E4254: .4byte gBattleAnimPlayerMonIndex +_080E4254: .4byte gBattleAnimBankAttacker _080E4258: .4byte gBankTarget -_080E425C: .4byte gBattleAnimEnemyMonIndex +_080E425C: .4byte gBattleAnimBankTarget _080E4260: .4byte gEffectBank thumb_func_end sub_80E4234 @@ -53249,11 +53249,11 @@ sub_80E4264: @ 80E4264 push {r4,r5,lr} lsls r0, 24 lsrs r5, r0, 24 - ldr r0, _080E428C @ =gBattleAnimPlayerMonIndex + ldr r0, _080E428C @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankSide adds r4, r0, 0 - ldr r0, _080E4290 @ =gBattleAnimEnemyMonIndex + ldr r0, _080E4290 @ =gBattleAnimBankTarget ldrb r0, [r0] bl GetBankSide lsls r4, 24 @@ -53264,8 +53264,8 @@ sub_80E4264: @ 80E4264 movs r0, 0x1 b _080E429C .align 2, 0 -_080E428C: .4byte gBattleAnimPlayerMonIndex -_080E4290: .4byte gBattleAnimEnemyMonIndex +_080E428C: .4byte gBattleAnimBankAttacker +_080E4290: .4byte gBattleAnimBankTarget _080E4294: .4byte gBattleAnimArgs _080E4298: ldr r1, _080E42AC @ =gBattleAnimArgs @@ -53286,7 +53286,7 @@ sub_80E42B0: @ 80E42B0 push {lr} lsls r0, 24 lsrs r0, 24 - ldr r2, _080E42C8 @ =gBattleAnimEnemyMonIndex + ldr r2, _080E42C8 @ =gBattleAnimBankTarget ldr r1, _080E42CC @ =gBankTarget ldrb r1, [r1] strb r1, [r2] @@ -53294,7 +53294,7 @@ sub_80E42B0: @ 80E42B0 pop {r0} bx r0 .align 2, 0 -_080E42C8: .4byte gBattleAnimEnemyMonIndex +_080E42C8: .4byte gBattleAnimBankTarget _080E42CC: .4byte gBankTarget thumb_func_end sub_80E42B0 @@ -53303,11 +53303,11 @@ sub_80E42D0: @ 80E42D0 push {lr} lsls r0, 24 lsrs r0, 24 - ldr r2, _080E42F0 @ =gBattleAnimPlayerMonIndex + ldr r2, _080E42F0 @ =gBattleAnimBankAttacker ldr r1, _080E42F4 @ =gBankAttacker ldrb r1, [r1] strb r1, [r2] - ldr r2, _080E42F8 @ =gBattleAnimEnemyMonIndex + ldr r2, _080E42F8 @ =gBattleAnimBankTarget ldr r1, _080E42FC @ =gEffectBank ldrb r1, [r1] strb r1, [r2] @@ -53315,9 +53315,9 @@ sub_80E42D0: @ 80E42D0 pop {r0} bx r0 .align 2, 0 -_080E42F0: .4byte gBattleAnimPlayerMonIndex +_080E42F0: .4byte gBattleAnimBankAttacker _080E42F4: .4byte gBankAttacker -_080E42F8: .4byte gBattleAnimEnemyMonIndex +_080E42F8: .4byte gBattleAnimBankTarget _080E42FC: .4byte gEffectBank thumb_func_end sub_80E42D0 @@ -53339,7 +53339,7 @@ _080E4318: adds r3, r4 lsls r3, 3 adds r3, r0 - ldr r1, _080E4358 @ =gBattleAnimPlayerMonIndex + ldr r1, _080E4358 @ =gBattleAnimBankAttacker ldrb r0, [r1] lsls r0, 2 ldr r2, _080E435C @ =0x02017800 @@ -53367,7 +53367,7 @@ _080E434E: bx r0 .align 2, 0 _080E4354: .4byte gTasks -_080E4358: .4byte gBattleAnimPlayerMonIndex +_080E4358: .4byte gBattleAnimBankAttacker _080E435C: .4byte 0x02017800 _080E4360: .4byte sub_80E4368 _080E4364: .4byte gAnimVisualTaskCount @@ -53385,7 +53385,7 @@ sub_80E4368: @ 80E4368 lsls r0, 5 cmp r1, r0 bne _080E43A8 - ldr r0, _080E43B4 @ =gBattleAnimPlayerMonIndex + ldr r0, _080E43B4 @ =gBattleAnimBankAttacker ldrb r3, [r0] lsls r3, 2 ldr r0, _080E43B8 @ =0x02017800 @@ -53412,7 +53412,7 @@ _080E43A8: bx r0 .align 2, 0 _080E43B0: .4byte gBattleAnimArgs -_080E43B4: .4byte gBattleAnimPlayerMonIndex +_080E43B4: .4byte gBattleAnimBankAttacker _080E43B8: .4byte 0x02017800 _080E43BC: .4byte gTasks thumb_func_end sub_80E4368 diff --git a/asm/battle_anim_81258BC.s b/asm/battle_anim_81258BC.s index 951c0e2fc..69b95b703 100644 --- a/asm/battle_anim_81258BC.s +++ b/asm/battle_anim_81258BC.s @@ -403,29 +403,29 @@ _0812B1CC: adds r2, r0, 0 cmp r1, 0 bne _0812B1E8 - ldr r0, _0812B1E4 @ =gBattleAnimPlayerMonIndex + ldr r0, _0812B1E4 @ =gBattleAnimBankAttacker ldrb r4, [r0] b _0812B20E .align 2, 0 _0812B1E0: .4byte gBattleAnimArgs -_0812B1E4: .4byte gBattleAnimPlayerMonIndex +_0812B1E4: .4byte gBattleAnimBankAttacker _0812B1E8: cmp r1, 0x1 bne _0812B1F8 - ldr r0, _0812B1F4 @ =gBattleAnimEnemyMonIndex + ldr r0, _0812B1F4 @ =gBattleAnimBankTarget ldrb r4, [r0] b _0812B20E .align 2, 0 -_0812B1F4: .4byte gBattleAnimEnemyMonIndex +_0812B1F4: .4byte gBattleAnimBankTarget _0812B1F8: cmp r1, 0x2 bne _0812B204 - ldr r0, _0812B200 @ =gBattleAnimPlayerMonIndex + ldr r0, _0812B200 @ =gBattleAnimBankAttacker b _0812B206 .align 2, 0 -_0812B200: .4byte gBattleAnimPlayerMonIndex +_0812B200: .4byte gBattleAnimBankAttacker _0812B204: - ldr r0, _0812B230 @ =gBattleAnimEnemyMonIndex + ldr r0, _0812B230 @ =gBattleAnimBankTarget _0812B206: ldrb r1, [r0] movs r0, 0x2 @@ -440,7 +440,7 @@ _0812B20E: bne _0812B234 _0812B21A: adds r0, r4, 0 - bl b_side_obj__get_some_boolean + bl IsAnimBankSpriteVisible lsls r0, 24 cmp r0, 0 bne _0812B234 @@ -448,7 +448,7 @@ _0812B21A: bl DestroyAnimVisualTask b _0812B2B0 .align 2, 0 -_0812B230: .4byte gBattleAnimEnemyMonIndex +_0812B230: .4byte gBattleAnimBankTarget _0812B234: adds r0, r4, 0 bl GetBankSide @@ -534,7 +534,7 @@ sub_812B2B8: @ 812B2B8 _0812B2D8: .4byte 0x02019348 _0812B2DC: ldr r1, _0812B304 @ =gUnknown_0202F7CA - ldr r0, _0812B308 @ =gBattleAnimPlayerMonIndex + ldr r0, _0812B308 @ =gBattleAnimBankAttacker ldrb r0, [r0] lsls r0, 1 adds r0, r1 @@ -554,7 +554,7 @@ _0812B2F6: bx r0 .align 2, 0 _0812B304: .4byte gUnknown_0202F7CA -_0812B308: .4byte gBattleAnimPlayerMonIndex +_0812B308: .4byte gBattleAnimBankAttacker thumb_func_end sub_812B2B8 thumb_func_start sub_812B30C diff --git a/asm/battle_anim_812C144.s b/asm/battle_anim_812C144.s index bae3d9bc2..4562ad2f5 100644 --- a/asm/battle_anim_812C144.s +++ b/asm/battle_anim_812C144.s @@ -90,7 +90,7 @@ sub_812C1D0: @ 812C1D0 adds r5, r0, 0 lsls r5, 24 lsrs r5, 24 - ldr r6, _0812C21C @ =gBattleAnimEnemyMonIndex + ldr r6, _0812C21C @ =gBattleAnimBankTarget ldrb r0, [r6] movs r1, 0x2 bl sub_8077ABC @@ -120,7 +120,7 @@ sub_812C1D0: @ 812C1D0 pop {r0} bx r0 .align 2, 0 -_0812C21C: .4byte gBattleAnimEnemyMonIndex +_0812C21C: .4byte gBattleAnimBankTarget thumb_func_end sub_812C1D0 thumb_func_start sub_812C220 @@ -135,7 +135,7 @@ sub_812C220: @ 812C220 strh r0, [r4, 0x30] ldr r1, _0812C25C @ =sub_812C268 adds r0, r4, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 ldr r1, _0812C260 @ =REG_BLDCNT movs r2, 0xFD lsls r2, 6 @@ -211,7 +211,7 @@ sub_812C2BC: @ 812C2BC push {r4-r7,lr} sub sp, 0x4 adds r5, r0, 0 - ldr r4, _0812C348 @ =gBattleAnimEnemyMonIndex + ldr r4, _0812C348 @ =gBattleAnimBankTarget ldrb r0, [r4] movs r1, 0x2 bl sub_8077ABC @@ -267,13 +267,13 @@ _0812C31A: str r0, [r5, 0x1C] ldr r1, _0812C354 @ =move_anim_8072740 adds r0, r5, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 add sp, 0x4 pop {r4-r7} pop {r0} bx r0 .align 2, 0 -_0812C348: .4byte gBattleAnimEnemyMonIndex +_0812C348: .4byte gBattleAnimBankTarget _0812C34C: .4byte gBattleAnimArgs _0812C350: .4byte sub_8078B34 _0812C354: .4byte move_anim_8072740 @@ -797,7 +797,7 @@ sub_812C720: @ 812C720 adds r4, r0, 0 movs r1, 0x1 bl sub_80787B0 - ldr r0, _0812C784 @ =gBattleAnimEnemyMonIndex + ldr r0, _0812C784 @ =gBattleAnimBankTarget ldrb r0, [r0] mov r5, sp adds r5, 0x2 @@ -805,7 +805,7 @@ sub_812C720: @ 812C720 mov r2, sp adds r3, r5, 0 bl sub_807A3FC - ldr r0, _0812C788 @ =gBattleAnimPlayerMonIndex + ldr r0, _0812C788 @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -839,8 +839,8 @@ _0812C754: pop {r0} bx r0 .align 2, 0 -_0812C784: .4byte gBattleAnimEnemyMonIndex -_0812C788: .4byte gBattleAnimPlayerMonIndex +_0812C784: .4byte gBattleAnimBankTarget +_0812C788: .4byte gBattleAnimBankAttacker _0812C78C: .4byte gBattleAnimArgs _0812C790: .4byte 0x0000ffce _0812C794: .4byte sub_812C798 @@ -862,7 +862,7 @@ sub_812C798: @ 812C798 str r0, [r4, 0x1C] ldr r1, _0812C7C4 @ =sub_812C7C8 adds r0, r4, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 _0812C7BA: pop {r4} pop {r0} @@ -929,7 +929,7 @@ sub_812C80C: @ 812C80C str r0, [r4, 0x1C] ldr r1, _0812C844 @ =move_anim_8072740 adds r0, r4, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 pop {r4,r5} pop {r0} bx r0 @@ -958,7 +958,7 @@ sub_812C848: @ 812C848 lsls r0, 24 cmp r0, 0 bne _0812C89C - ldr r0, _0812C888 @ =gBattleAnimPlayerMonIndex + ldr r0, _0812C888 @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -968,7 +968,7 @@ sub_812C848: @ 812C848 b _0812C8A2 .align 2, 0 _0812C884: .4byte gBattleAnimArgs -_0812C888: .4byte gBattleAnimPlayerMonIndex +_0812C888: .4byte gBattleAnimBankAttacker _0812C88C: movs r1, 0x4 ldrsh r0, [r5, r1] @@ -1058,7 +1058,7 @@ sub_812C924: @ 812C924 push {r4,lr} lsls r0, 24 lsrs r4, r0, 24 - ldr r0, _0812C940 @ =gBattleAnimEnemyMonIndex + ldr r0, _0812C940 @ =gBattleAnimBankTarget ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -1069,7 +1069,7 @@ sub_812C924: @ 812C924 movs r0, 0 b _0812C94C .align 2, 0 -_0812C940: .4byte gBattleAnimEnemyMonIndex +_0812C940: .4byte gBattleAnimBankTarget _0812C944: .4byte gBattleAnimArgs _0812C948: ldr r1, _0812C95C @ =gBattleAnimArgs @@ -1307,7 +1307,7 @@ sub_812CAFC: @ 812CAFC ldrsh r0, [r6, r1] cmp r0, 0 bne _0812CB28 - ldr r4, _0812CB74 @ =gBattleAnimPlayerMonIndex + ldr r4, _0812CB74 @ =gBattleAnimBankAttacker ldrb r0, [r4] movs r1, 0 bl sub_8077ABC @@ -1358,7 +1358,7 @@ _0812CB28: b _0812CB8A .align 2, 0 _0812CB70: .4byte gBattleAnimArgs -_0812CB74: .4byte gBattleAnimPlayerMonIndex +_0812CB74: .4byte gBattleAnimBankAttacker _0812CB78: .4byte 0x000003ff _0812CB7C: .4byte 0xfffffc00 _0812CB80: .4byte 0x0000fff4 @@ -1553,13 +1553,13 @@ sub_812CCE8: @ 812CCE8 ldrsh r0, [r6, r1] cmp r0, 0 bne _0812CD04 - ldr r4, _0812CD00 @ =gBattleAnimPlayerMonIndex + ldr r4, _0812CD00 @ =gBattleAnimBankAttacker b _0812CD06 .align 2, 0 _0812CCFC: .4byte gBattleAnimArgs -_0812CD00: .4byte gBattleAnimPlayerMonIndex +_0812CD00: .4byte gBattleAnimBankAttacker _0812CD04: - ldr r4, _0812CD58 @ =gBattleAnimEnemyMonIndex + ldr r4, _0812CD58 @ =gBattleAnimBankTarget _0812CD06: ldrb r0, [r4] movs r1, 0 @@ -1602,7 +1602,7 @@ _0812CD3E: pop {r0} bx r0 .align 2, 0 -_0812CD58: .4byte gBattleAnimEnemyMonIndex +_0812CD58: .4byte gBattleAnimBankTarget _0812CD5C: .4byte gBattleAnimArgs _0812CD60: .4byte sub_812CD64 thumb_func_end sub_812CCE8 @@ -1675,14 +1675,14 @@ sub_812CDC8: @ 812CDC8 ldrsh r0, [r0, r1] cmp r0, 0 bne _0812CDF4 - ldr r4, _0812CDF0 @ =gBattleAnimPlayerMonIndex + ldr r4, _0812CDF0 @ =gBattleAnimBankAttacker b _0812CDF6 .align 2, 0 _0812CDE8: .4byte gTasks _0812CDEC: .4byte gBattleAnimArgs -_0812CDF0: .4byte gBattleAnimPlayerMonIndex +_0812CDF0: .4byte gBattleAnimBankAttacker _0812CDF4: - ldr r4, _0812CE3C @ =gBattleAnimEnemyMonIndex + ldr r4, _0812CE3C @ =gBattleAnimBankTarget _0812CDF6: ldrb r0, [r4] bl sub_8077FC0 @@ -1718,7 +1718,7 @@ _0812CE20: ldr r0, _0812CE44 @ =gUnknown_030042C0 b _0812CE4A .align 2, 0 -_0812CE3C: .4byte gBattleAnimEnemyMonIndex +_0812CE3C: .4byte gBattleAnimBankTarget _0812CE40: .4byte gBattleAnimArgs _0812CE44: .4byte gUnknown_030042C0 _0812CE48: @@ -1975,7 +1975,7 @@ sub_812D008: @ 812D008 movs r5, 0 strh r5, [r4, 0x8] strh r5, [r4, 0xA] - ldr r6, _0812D060 @ =gBattleAnimPlayerMonIndex + ldr r6, _0812D060 @ =gBattleAnimBankAttacker ldrb r0, [r6] movs r1, 0x2 bl sub_8077ABC @@ -1994,7 +1994,7 @@ sub_812D008: @ 812D008 strh r0, [r4, 0x12] strh r5, [r4, 0x14] movs r0, 0 - bl obj_id_for_side_relative_to_move + bl GetAnimBankSpriteId lsls r0, 24 lsrs r0, 24 strh r0, [r4, 0x26] @@ -2005,7 +2005,7 @@ sub_812D008: @ 812D008 bx r0 .align 2, 0 _0812D05C: .4byte gTasks -_0812D060: .4byte gBattleAnimPlayerMonIndex +_0812D060: .4byte gBattleAnimBankAttacker _0812D064: .4byte 0x0000ffec _0812D068: .4byte sub_812D06C thumb_func_end sub_812D008 @@ -2350,7 +2350,7 @@ _0812D2F0: bne _0812D33C ldr r1, _0812D344 @ =move_anim_8072740 adds r0, r5, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 ldrh r0, [r5, 0x24] ldrh r2, [r5, 0x20] adds r0, r2 @@ -2364,7 +2364,7 @@ _0812D2F0: strh r1, [r5, 0x26] movs r0, 0x14 strh r0, [r5, 0x2E] - ldr r4, _0812D348 @ =gBattleAnimEnemyMonIndex + ldr r4, _0812D348 @ =gBattleAnimBankTarget ldrb r0, [r4] movs r1, 0x2 bl sub_8077ABC @@ -2385,7 +2385,7 @@ _0812D33C: bx r0 .align 2, 0 _0812D344: .4byte move_anim_8072740 -_0812D348: .4byte gBattleAnimEnemyMonIndex +_0812D348: .4byte gBattleAnimBankTarget _0812D34C: .4byte sub_8078B34 thumb_func_end sub_812D294 @@ -2410,7 +2410,7 @@ sub_812D350: @ 812D350 _0812D370: .4byte gTasks _0812D374: movs r0, 0 - bl obj_id_for_side_relative_to_move + bl GetAnimBankSpriteId adds r1, r0, 0 lsls r1, 24 lsrs r1, 24 @@ -2442,7 +2442,7 @@ sub_812D3AC: @ 812D3AC push {r4-r6,lr} adds r5, r0, 0 movs r0, 0 - bl obj_id_for_side_relative_to_move + bl GetAnimBankSpriteId lsls r0, 24 lsrs r6, r0, 24 movs r1, 0x2E @@ -2461,7 +2461,7 @@ _0812D3CC: beq _0812D490 b _0812D4AE _0812D3D6: - ldr r4, _0812D408 @ =gBattleAnimPlayerMonIndex + ldr r4, _0812D408 @ =gBattleAnimBankAttacker ldrb r0, [r4] movs r1, 0x2 bl sub_8077ABC @@ -2483,7 +2483,7 @@ _0812D3D6: strh r0, [r5, 0x32] b _0812D484 .align 2, 0 -_0812D408: .4byte gBattleAnimPlayerMonIndex +_0812D408: .4byte gBattleAnimBankAttacker _0812D40C: ldrh r0, [r5, 0x30] adds r0, 0x60 @@ -2575,7 +2575,7 @@ _0812D4AE: sub_812D4B4: @ 812D4B4 push {r4,lr} adds r4, r0, 0 - ldr r0, _0812D4CC @ =gBattleAnimPlayerMonIndex + ldr r0, _0812D4CC @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -2584,7 +2584,7 @@ sub_812D4B4: @ 812D4B4 ldr r0, _0812D4D0 @ =0x0000fff0 b _0812D4D8 .align 2, 0 -_0812D4CC: .4byte gBattleAnimPlayerMonIndex +_0812D4CC: .4byte gBattleAnimBankAttacker _0812D4D0: .4byte 0x0000fff0 _0812D4D4: movs r0, 0x80 @@ -2609,7 +2609,7 @@ sub_812D4EC: @ 812D4EC ldrh r0, [r4, 0x2E] adds r0, 0x48 strh r0, [r4, 0x2E] - ldr r0, _0812D50C @ =gBattleAnimPlayerMonIndex + ldr r0, _0812D50C @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -2620,7 +2620,7 @@ sub_812D4EC: @ 812D4EC asrs r0, 20 b _0812D518 .align 2, 0 -_0812D50C: .4byte gBattleAnimPlayerMonIndex +_0812D50C: .4byte gBattleAnimBankAttacker _0812D510: ldrh r0, [r4, 0x2E] lsls r0, 16 @@ -2830,7 +2830,7 @@ sub_812D674: @ 812D674 cmp r0, 0 bne _0812D6B4 movs r0, 0 - bl obj_id_for_side_relative_to_move + bl GetAnimBankSpriteId adds r1, r0, 0 lsls r1, 24 lsrs r1, 24 @@ -2874,7 +2874,7 @@ sub_812D6CC: @ 812D6CC cmp r0, 0 bne _0812D70C movs r0, 0 - bl obj_id_for_side_relative_to_move + bl GetAnimBankSpriteId adds r1, r0, 0 lsls r1, 24 lsrs r1, 24 @@ -2920,7 +2920,7 @@ _0812D736: movs r0, 0x90 lsls r0, 4 strh r0, [r4, 0x30] - ldr r0, _0812D75C @ =gBattleAnimPlayerMonIndex + ldr r0, _0812D75C @ =gBattleAnimBankAttacker ldrb r0, [r0] movs r1, 0x3 bl sub_8077ABC @@ -2932,7 +2932,7 @@ _0812D736: strh r0, [r4, 0x2E] b _0812D788 .align 2, 0 -_0812D75C: .4byte gBattleAnimPlayerMonIndex +_0812D75C: .4byte gBattleAnimBankAttacker _0812D760: ldrh r2, [r4, 0x30] lsls r1, r2, 16 @@ -2975,7 +2975,7 @@ sub_812D790: @ 812D790 cmp r0, 0 bne _0812D7D0 movs r0, 0 - bl obj_id_for_side_relative_to_move + bl GetAnimBankSpriteId adds r1, r0, 0 lsls r1, 24 lsrs r1, 24 @@ -3044,7 +3044,7 @@ _0812D834: ldr r1, _0812D850 @ =REG_MOSAIC movs r0, 0 strh r0, [r1] - ldr r0, _0812D854 @ =gBattleAnimPlayerMonIndex + ldr r0, _0812D854 @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankIdentity_permutated lsls r0, 24 @@ -3055,7 +3055,7 @@ _0812D834: b _0812D85E .align 2, 0 _0812D850: .4byte REG_MOSAIC -_0812D854: .4byte gBattleAnimPlayerMonIndex +_0812D854: .4byte gBattleAnimBankAttacker _0812D858: .4byte REG_BG1CNT _0812D85C: ldr r0, _0812D87C @ =REG_BG2CNT @@ -3111,9 +3111,9 @@ _0812D8BC: .align 2, 0 _0812D8C0: .4byte REG_MOSAIC _0812D8C4: - ldr r5, _0812D8F4 @ =gBattleAnimPlayerMonIndex + ldr r5, _0812D8F4 @ =gBattleAnimBankAttacker ldrb r0, [r5] - ldr r1, _0812D8F8 @ =gBattleAnimEnemyMonIndex + ldr r1, _0812D8F8 @ =gBattleAnimBankTarget ldrb r1, [r1] mov r2, r8 lsls r4, r2, 2 @@ -3133,8 +3133,8 @@ _0812D8C4: movs r1, 0 b _0812D906 .align 2, 0 -_0812D8F4: .4byte gBattleAnimPlayerMonIndex -_0812D8F8: .4byte gBattleAnimEnemyMonIndex +_0812D8F4: .4byte gBattleAnimBankAttacker +_0812D8F8: .4byte gBattleAnimBankTarget _0812D8FC: ldrb r0, [r5] bl GetBankIdentity @@ -3145,7 +3145,7 @@ _0812D906: lsls r1, 2 adds r1, r0 ldr r2, _0812D9D0 @ =gBattleMonForms - ldr r0, _0812D9D4 @ =gBattleAnimPlayerMonIndex + ldr r0, _0812D9D4 @ =gBattleAnimBankAttacker ldrb r0, [r0] adds r0, r2 ldrb r0, [r0] @@ -3229,7 +3229,7 @@ _0812D9A2: beq _0812D9F0 ldr r3, _0812D9E4 @ =gSprites ldr r4, _0812D9E8 @ =gObjectBankIDs - ldr r2, _0812D9D4 @ =gBattleAnimPlayerMonIndex + ldr r2, _0812D9D4 @ =gBattleAnimBankAttacker ldrb r0, [r2] adds r0, r4 ldrb r1, [r0] @@ -3244,7 +3244,7 @@ _0812D9A2: .align 2, 0 _0812D9CC: .4byte gUnknown_081FAF4C _0812D9D0: .4byte gBattleMonForms -_0812D9D4: .4byte gBattleAnimPlayerMonIndex +_0812D9D4: .4byte gBattleAnimBankAttacker _0812D9D8: .4byte 0x040000d4 _0812D9DC: .4byte 0x84000200 _0812D9E0: .4byte 0x02019348 @@ -3254,7 +3254,7 @@ _0812D9EC: .4byte gSpriteAffineAnimTable_81E7C18 _0812D9F0: ldr r3, _0812DA34 @ =gSprites ldr r4, _0812DA38 @ =gObjectBankIDs - ldr r2, _0812DA3C @ =gBattleAnimPlayerMonIndex + ldr r2, _0812DA3C @ =gBattleAnimBankAttacker ldrb r0, [r2] adds r0, r4 ldrb r1, [r0] @@ -3290,7 +3290,7 @@ _0812DA2A: .align 2, 0 _0812DA34: .4byte gSprites _0812DA38: .4byte gObjectBankIDs -_0812DA3C: .4byte gBattleAnimPlayerMonIndex +_0812DA3C: .4byte gBattleAnimBankAttacker _0812DA40: .4byte gSpriteAffineAnimTable_81E7BEC _0812DA44: .4byte gTasks _0812DA48: @@ -3329,7 +3329,7 @@ _0812DA84: ldr r1, _0812DAA0 @ =REG_MOSAIC movs r0, 0 strh r0, [r1] - ldr r0, _0812DAA4 @ =gBattleAnimPlayerMonIndex + ldr r0, _0812DAA4 @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankIdentity_permutated lsls r0, 24 @@ -3340,7 +3340,7 @@ _0812DA84: b _0812DAAE .align 2, 0 _0812DAA0: .4byte REG_MOSAIC -_0812DAA4: .4byte gBattleAnimPlayerMonIndex +_0812DAA4: .4byte gBattleAnimBankAttacker _0812DAA8: .4byte REG_BG1CNT _0812DAAC: ldr r2, _0812DB08 @ =REG_BG2CNT @@ -3354,7 +3354,7 @@ _0812DAAE: lsls r0, 24 cmp r0, 0 bne _0812DAF4 - ldr r4, _0812DB0C @ =gBattleAnimPlayerMonIndex + ldr r4, _0812DB0C @ =gBattleAnimBankAttacker ldrb r0, [r4] bl GetBankSide lsls r0, 24 @@ -3390,7 +3390,7 @@ _0812DAFA: bx r0 .align 2, 0 _0812DB08: .4byte REG_BG2CNT -_0812DB0C: .4byte gBattleAnimPlayerMonIndex +_0812DB0C: .4byte gBattleAnimBankAttacker _0812DB10: .4byte gTasks _0812DB14: .4byte 0x02017800 thumb_func_end sub_812D7E8 @@ -3403,7 +3403,7 @@ c3_80DFBE4: @ 812DB18 ldr r4, _0812DB48 @ =gBattleAnimArgs ldr r3, _0812DB4C @ =gSprites ldr r2, _0812DB50 @ =gObjectBankIDs - ldr r1, _0812DB54 @ =gBattleAnimPlayerMonIndex + ldr r1, _0812DB54 @ =gBattleAnimBankAttacker ldrb r1, [r1] adds r1, r2 ldrb r2, [r1] @@ -3424,7 +3424,7 @@ c3_80DFBE4: @ 812DB18 _0812DB48: .4byte gBattleAnimArgs _0812DB4C: .4byte gSprites _0812DB50: .4byte gObjectBankIDs -_0812DB54: .4byte gBattleAnimPlayerMonIndex +_0812DB54: .4byte gBattleAnimBankAttacker thumb_func_end c3_80DFBE4 thumb_func_start sub_812DB58 @@ -3433,9 +3433,9 @@ sub_812DB58: @ 812DB58 adds r4, r0, 0 lsls r4, 24 lsrs r4, 24 - ldr r0, _0812DB7C @ =gBattleAnimPlayerMonIndex + ldr r0, _0812DB7C @ =gBattleAnimBankAttacker ldrb r0, [r0] - ldr r1, _0812DB80 @ =gBattleAnimEnemyMonIndex + ldr r1, _0812DB80 @ =gBattleAnimBankTarget ldrb r1, [r1] movs r2, 0x1 bl sub_8031FC4 @@ -3445,8 +3445,8 @@ sub_812DB58: @ 812DB58 pop {r0} bx r0 .align 2, 0 -_0812DB7C: .4byte gBattleAnimPlayerMonIndex -_0812DB80: .4byte gBattleAnimEnemyMonIndex +_0812DB7C: .4byte gBattleAnimBankAttacker +_0812DB80: .4byte gBattleAnimBankTarget thumb_func_end sub_812DB58 thumb_func_start sub_812DB84 @@ -3572,7 +3572,7 @@ _0812DC90: .4byte gUnknown_030042C0 _0812DC94: .4byte 0x0000ffc8 _0812DC98: .4byte gUnknown_030041B4 _0812DC9C: - ldr r0, _0812DCB4 @ =gBattleAnimPlayerMonIndex + ldr r0, _0812DCB4 @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -3583,7 +3583,7 @@ _0812DC9C: adds r0, r4, 0 b _0812DCC6 .align 2, 0 -_0812DCB4: .4byte gBattleAnimPlayerMonIndex +_0812DCB4: .4byte gBattleAnimBankAttacker _0812DCB8: .4byte gUnknown_030042C0 _0812DCBC: .4byte 0x0000ff79 _0812DCC0: @@ -3856,7 +3856,7 @@ sub_812DEAC: @ 812DEAC lsls r0, 16 lsrs r5, r0, 16 _0812DED6: - ldr r4, _0812DFD0 @ =gBattleAnimPlayerMonIndex + ldr r4, _0812DFD0 @ =gBattleAnimBankAttacker ldrb r0, [r4] movs r1, 0 bl sub_8077ABC @@ -3975,7 +3975,7 @@ _0812DED6: pop {r0} bx r0 .align 2, 0 -_0812DFD0: .4byte gBattleAnimPlayerMonIndex +_0812DFD0: .4byte gBattleAnimBankAttacker _0812DFD4: .4byte gBattleAnimArgs _0812DFD8: .4byte gBattleAnimSpriteTemplate_84025EC _0812DFDC: .4byte gSprites @@ -4292,7 +4292,7 @@ _0812E254: .4byte gUnknown_030042C0 _0812E258: .4byte 0x0000ffc8 _0812E25C: .4byte gUnknown_030041B4 _0812E260: - ldr r0, _0812E2A0 @ =gBattleAnimEnemyMonIndex + ldr r0, _0812E2A0 @ =gBattleAnimBankTarget ldrb r0, [r0] bl GetBankIdentity lsls r0, 24 @@ -4326,7 +4326,7 @@ _0812E296: ldr r2, _0812E2B0 @ =0x0000ffec b _0812E2C8 .align 2, 0 -_0812E2A0: .4byte gBattleAnimEnemyMonIndex +_0812E2A0: .4byte gBattleAnimBankTarget _0812E2A4: .4byte gUnknown_030042C0 _0812E2A8: .4byte 0x0000ff65 _0812E2AC: .4byte 0x0000ff8d @@ -4377,7 +4377,7 @@ _0812E300: adds r5, r0, r1 movs r0, 0 strh r0, [r5, 0xE] - ldr r0, _0812E338 @ =gBattleAnimEnemyMonIndex + ldr r0, _0812E338 @ =gBattleAnimBankTarget ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -4397,7 +4397,7 @@ _0812E300: b _0812E356 .align 2, 0 _0812E334: .4byte gTasks -_0812E338: .4byte gBattleAnimEnemyMonIndex +_0812E338: .4byte gBattleAnimBankTarget _0812E33C: .4byte gUnknown_030042C0 _0812E340: .4byte gUnknown_08402604 _0812E344: @@ -4588,7 +4588,7 @@ sub_812E498: @ 812E498 cmp r0, 0 bne _0812E4D8 movs r0, 0 - bl obj_id_for_side_relative_to_move + bl GetAnimBankSpriteId adds r1, r0, 0 lsls r1, 24 lsrs r1, 24 @@ -4643,7 +4643,7 @@ _0812E50E: ldrh r0, [r4, 0x32] adds r0, 0x80 strh r0, [r4, 0x32] - ldr r0, _0812E53C @ =gBattleAnimPlayerMonIndex + ldr r0, _0812E53C @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -4655,7 +4655,7 @@ _0812E50E: negs r0, r0 b _0812E546 .align 2, 0 -_0812E53C: .4byte gBattleAnimPlayerMonIndex +_0812E53C: .4byte gBattleAnimBankAttacker _0812E540: ldrh r0, [r4, 0x30] lsls r0, 16 @@ -4740,7 +4740,7 @@ _0812E5AC: subs r0, 0x1 strh r0, [r4, 0x14] ldrb r0, [r5] - bl obj_id_for_side_relative_to_move + bl GetAnimBankSpriteId lsls r0, 24 lsrs r0, 24 strh r0, [r4, 0x26] @@ -4748,12 +4748,12 @@ _0812E5AC: ldrsh r0, [r5, r1] cmp r0, 0 bne _0812E5F8 - ldr r0, _0812E5F4 @ =gBattleAnimPlayerMonIndex + ldr r0, _0812E5F4 @ =gBattleAnimBankAttacker b _0812E5FA .align 2, 0 -_0812E5F4: .4byte gBattleAnimPlayerMonIndex +_0812E5F4: .4byte gBattleAnimBankAttacker _0812E5F8: - ldr r0, _0812E630 @ =gBattleAnimEnemyMonIndex + ldr r0, _0812E630 @ =gBattleAnimBankTarget _0812E5FA: ldrb r0, [r0] bl GetBankSide @@ -4782,7 +4782,7 @@ _0812E628: pop {r0} bx r0 .align 2, 0 -_0812E630: .4byte gBattleAnimEnemyMonIndex +_0812E630: .4byte gBattleAnimBankTarget _0812E634: .4byte sub_812E638 thumb_func_end sub_812E568 @@ -4971,7 +4971,7 @@ _0812E798: sub_812E7A0: @ 812E7A0 push {r4,lr} adds r4, r0, 0 - ldr r0, _0812E7BC @ =gBattleAnimPlayerMonIndex + ldr r0, _0812E7BC @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -4983,7 +4983,7 @@ sub_812E7A0: @ 812E7A0 ldrh r0, [r1] b _0812E7CE .align 2, 0 -_0812E7BC: .4byte gBattleAnimPlayerMonIndex +_0812E7BC: .4byte gBattleAnimBankAttacker _0812E7C0: .4byte gBattleAnimArgs _0812E7C4: movs r0, 0xF0 @@ -5015,7 +5015,7 @@ sub_812E7F0: @ 812E7F0 ldrh r0, [r4, 0x2E] adds r0, 0x3 strh r0, [r4, 0x2E] - ldr r0, _0812E830 @ =gBattleAnimPlayerMonIndex + ldr r0, _0812E830 @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -5041,7 +5041,7 @@ _0812E822: bl Sin b _0812E858 .align 2, 0 -_0812E830: .4byte gBattleAnimPlayerMonIndex +_0812E830: .4byte gBattleAnimBankAttacker _0812E834: ldrh r1, [r4, 0x20] subs r1, 0x5 @@ -5091,7 +5091,7 @@ sub_812E860: @ 812E860 strh r0, [r4, 0x24] ldr r0, _0812E8AC @ =gBattleAnimArgs ldrb r0, [r0] - bl obj_id_for_side_relative_to_move + bl GetAnimBankSpriteId lsls r0, 24 lsrs r0, 24 strh r0, [r4, 0x26] @@ -5330,7 +5330,7 @@ sub_812EA4C: @ 812EA4C ldrsh r0, [r6, r2] cmp r0, 0 bne _0812EA80 - ldr r4, _0812EAA8 @ =gBattleAnimPlayerMonIndex + ldr r4, _0812EAA8 @ =gBattleAnimBankAttacker ldrb r0, [r4] movs r1, 0x2 bl sub_8077ABC @@ -5364,7 +5364,7 @@ _0812EA80: b _0812EB0A .align 2, 0 _0812EAA4: .4byte gBattleAnimArgs -_0812EAA8: .4byte gBattleAnimPlayerMonIndex +_0812EAA8: .4byte gBattleAnimBankAttacker _0812EAAC: ldrh r1, [r5, 0x30] lsls r0, r1, 16 @@ -5441,20 +5441,20 @@ sub_812EB10: @ 812EB10 mov r8, r0 cmp r1, 0 bne _0812EB4C - ldr r0, _0812EB48 @ =gBattleAnimPlayerMonIndex + ldr r0, _0812EB48 @ =gBattleAnimBankAttacker b _0812EB4E .align 2, 0 _0812EB40: .4byte gTasks _0812EB44: .4byte gBattleAnimArgs -_0812EB48: .4byte gBattleAnimPlayerMonIndex +_0812EB48: .4byte gBattleAnimBankAttacker _0812EB4C: - ldr r0, _0812EB88 @ =gBattleAnimEnemyMonIndex + ldr r0, _0812EB88 @ =gBattleAnimBankTarget _0812EB4E: ldrb r0, [r0] strh r0, [r2, 0x1E] mov r1, r8 ldrb r0, [r1] - bl obj_id_for_side_relative_to_move + bl GetAnimBankSpriteId lsls r0, 24 lsrs r5, r0, 24 ldr r1, _0812EB8C @ =gTasks @@ -5478,7 +5478,7 @@ _0812EB4E: lsls r2, r5, 4 b _0812EBF8 .align 2, 0 -_0812EB88: .4byte gBattleAnimEnemyMonIndex +_0812EB88: .4byte gBattleAnimBankTarget _0812EB8C: .4byte gTasks _0812EB90: cmp r0, 0x2 @@ -5893,7 +5893,7 @@ _0812EEA0: .4byte 0x00003f3f sub_812EEA4: @ 812EEA4 push {r4,r5,lr} adds r4, r0, 0 - ldr r5, _0812EEE0 @ =gBattleAnimPlayerMonIndex + ldr r5, _0812EEE0 @ =gBattleAnimBankAttacker ldrb r0, [r5] movs r1, 0x2 bl sub_8077ABC @@ -5919,7 +5919,7 @@ sub_812EEA4: @ 812EEA4 pop {r0} bx r0 .align 2, 0 -_0812EEE0: .4byte gBattleAnimPlayerMonIndex +_0812EEE0: .4byte gBattleAnimBankAttacker _0812EEE4: .4byte gBattleAnimArgs _0812EEE8: .4byte sub_812EEEC thumb_func_end sub_812EEA4 @@ -5954,15 +5954,15 @@ sub_812EEEC: @ 812EEEC cmp r0, 0xC3 ble _0812EF38 _0812EF26: - ldr r0, _0812EF34 @ =gBattleAnimPlayerMonIndex + ldr r0, _0812EF34 @ =gBattleAnimBankAttacker ldrb r0, [r0] bl sub_8079E90 subs r0, 0x1 b _0812EF42 .align 2, 0 -_0812EF34: .4byte gBattleAnimPlayerMonIndex +_0812EF34: .4byte gBattleAnimBankAttacker _0812EF38: - ldr r0, _0812EF84 @ =gBattleAnimPlayerMonIndex + ldr r0, _0812EF84 @ =gBattleAnimBankAttacker ldrb r0, [r0] bl sub_8079E90 adds r0, 0x1 @@ -6000,7 +6000,7 @@ _0812EF42: strh r0, [r4, 0x38] b _0812EFB8 .align 2, 0 -_0812EF84: .4byte gBattleAnimPlayerMonIndex +_0812EF84: .4byte gBattleAnimBankAttacker _0812EF88: cmp r2, 0x1 bne _0812EFB8 @@ -6046,7 +6046,7 @@ sub_812EFC8: @ 812EFC8 lsrs r0, 24 str r0, [sp, 0x10] movs r0, 0 - bl obj_id_for_side_relative_to_move + bl GetAnimBankSpriteId bl IsContest lsls r0, 24 cmp r0, 0 @@ -6064,7 +6064,7 @@ sub_812EFC8: @ 812EFC8 .align 2, 0 _0812F000: .4byte 0x02019348 _0812F004: - ldr r0, _0812F070 @ =gBattleAnimPlayerMonIndex + ldr r0, _0812F070 @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -6073,7 +6073,7 @@ _0812F004: movs r0, 0 str r0, [sp, 0x14] ldr r6, _0812F074 @ =gBattlePartyID - ldr r4, _0812F078 @ =gBattleAnimEnemyMonIndex + ldr r4, _0812F078 @ =gBattleAnimBankTarget ldrb r0, [r4] lsls r0, 1 adds r0, r6 @@ -6114,9 +6114,9 @@ _0812F004: adds r0, r7 b _0812F092 .align 2, 0 -_0812F070: .4byte gBattleAnimPlayerMonIndex +_0812F070: .4byte gBattleAnimBankAttacker _0812F074: .4byte gBattlePartyID -_0812F078: .4byte gBattleAnimEnemyMonIndex +_0812F078: .4byte gBattleAnimBankTarget _0812F07C: .4byte gPlayerParty _0812F080: .4byte 0x02017800 _0812F084: @@ -6145,7 +6145,7 @@ _0812F0AC: movs r2, 0x1 str r2, [sp, 0x14] ldr r6, _0812F10C @ =gBattlePartyID - ldr r4, _0812F110 @ =gBattleAnimEnemyMonIndex + ldr r4, _0812F110 @ =gBattleAnimBankTarget ldrb r0, [r4] lsls r0, 1 adds r0, r6 @@ -6188,7 +6188,7 @@ _0812F0AC: b _0812F12C .align 2, 0 _0812F10C: .4byte gBattlePartyID -_0812F110: .4byte gBattleAnimEnemyMonIndex +_0812F110: .4byte gBattleAnimBankTarget _0812F114: .4byte gEnemyParty _0812F118: .4byte 0x02017800 _0812F11C: .4byte gPlayerParty @@ -6212,12 +6212,12 @@ _0812F13A: _0812F13C: mov r10, r3 _0812F13E: - ldr r0, _0812F21C @ =gBattleAnimPlayerMonIndex + ldr r0, _0812F21C @ =gBattleAnimBankAttacker ldrb r0, [r0] bl sub_8079ED4 lsls r0, 24 lsrs r7, r0, 24 - ldr r5, _0812F21C @ =gBattleAnimPlayerMonIndex + ldr r5, _0812F21C @ =gBattleAnimBankAttacker ldrb r0, [r5] movs r1, 0 bl sub_8077ABC @@ -6318,7 +6318,7 @@ _0812F13E: bx r0 .align 2, 0 _0812F218: .4byte 0x0000ffec -_0812F21C: .4byte gBattleAnimPlayerMonIndex +_0812F21C: .4byte gBattleAnimBankAttacker _0812F220: .4byte gSprites _0812F224: .4byte 0x00007fff _0812F228: .4byte REG_BLDCNT @@ -6455,14 +6455,14 @@ sub_812F314: @ 812F314 ldrsh r0, [r0, r1] cmp r0, 0 bne _0812F340 - ldr r0, _0812F33C @ =gBattleAnimPlayerMonIndex + ldr r0, _0812F33C @ =gBattleAnimBankAttacker b _0812F342 .align 2, 0 _0812F334: .4byte gTasks _0812F338: .4byte gBattleAnimArgs -_0812F33C: .4byte gBattleAnimPlayerMonIndex +_0812F33C: .4byte gBattleAnimBankAttacker _0812F340: - ldr r0, _0812F3C0 @ =gBattleAnimEnemyMonIndex + ldr r0, _0812F3C0 @ =gBattleAnimBankTarget _0812F342: ldrb r5, [r0] movs r6, 0 @@ -6504,7 +6504,7 @@ _0812F388: strh r0, [r4, 0x24] ldr r0, _0812F3C4 @ =gBattleAnimArgs ldrb r0, [r0] - bl obj_id_for_side_relative_to_move + bl GetAnimBankSpriteId lsls r0, 24 lsrs r0, 24 strh r0, [r4, 0x26] @@ -6525,7 +6525,7 @@ _0812F388: ldr r0, _0812F3D8 @ =gUnknown_030041B4 b _0812F3EE .align 2, 0 -_0812F3C0: .4byte gBattleAnimEnemyMonIndex +_0812F3C0: .4byte gBattleAnimBankTarget _0812F3C4: .4byte gBattleAnimArgs _0812F3C8: .4byte REG_BG1HOFS _0812F3CC: .4byte REG_BLDCNT @@ -6975,7 +6975,7 @@ sub_812F724: @ 812F724 strh r0, [r4, 0x8] ldr r0, _0812F760 @ =gBattleAnimArgs ldrb r0, [r0] - bl obj_id_for_side_relative_to_move + bl GetAnimBankSpriteId adds r1, r0, 0 lsls r1, 24 lsrs r1, 24 @@ -7250,7 +7250,7 @@ sub_812F948: @ 812F948 ldrb r1, [r6] adds r0, r5, 0 bl StartSpriteAffineAnim - ldr r0, _0812F9A4 @ =gBattleAnimEnemyMonIndex + ldr r0, _0812F9A4 @ =gBattleAnimBankTarget ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -7260,7 +7260,7 @@ sub_812F948: @ 812F948 negs r0, r0 strh r0, [r6, 0x2] _0812F96E: - ldr r4, _0812F9A8 @ =gBattleAnimPlayerMonIndex + ldr r4, _0812F9A8 @ =gBattleAnimBankAttacker ldrb r0, [r4] movs r1, 0x2 bl sub_8077ABC @@ -7284,8 +7284,8 @@ _0812F96E: bx r0 .align 2, 0 _0812F9A0: .4byte gBattleAnimArgs -_0812F9A4: .4byte gBattleAnimEnemyMonIndex -_0812F9A8: .4byte gBattleAnimPlayerMonIndex +_0812F9A4: .4byte gBattleAnimBankTarget +_0812F9A8: .4byte gBattleAnimBankAttacker _0812F9AC: .4byte sub_80DA48C thumb_func_end sub_812F948 @@ -7674,7 +7674,7 @@ sub_812FC68: @ 812FC68 mov r1, r8 adds r4, r0, r1 ldr r1, _0812FCCC @ =gObjectBankIDs - ldr r2, _0812FCD0 @ =gBattleAnimPlayerMonIndex + ldr r2, _0812FCD0 @ =gBattleAnimBankAttacker ldrb r0, [r2] adds r0, r1 ldrb r0, [r0] @@ -7711,7 +7711,7 @@ _0812FCAC: .align 2, 0 _0812FCC8: .4byte gTasks _0812FCCC: .4byte gObjectBankIDs -_0812FCD0: .4byte gBattleAnimPlayerMonIndex +_0812FCD0: .4byte gBattleAnimBankAttacker _0812FCD4: .4byte gBattleAnimArgs _0812FCD8: .4byte 0xffff8000 _0812FCDC: @@ -7822,14 +7822,14 @@ _0812FD9C: ldrsh r0, [r4, r1] cmp r0, 0 bne _0812FDC0 - ldr r0, _0812FDBC @ =gBattleAnimPlayerMonIndex + ldr r0, _0812FDBC @ =gBattleAnimBankAttacker b _0812FDC2 .align 2, 0 _0812FDB4: .4byte gTasks _0812FDB8: .4byte gBattleAnimArgs -_0812FDBC: .4byte gBattleAnimPlayerMonIndex +_0812FDBC: .4byte gBattleAnimBankAttacker _0812FDC0: - ldr r0, _0812FE10 @ =gBattleAnimEnemyMonIndex + ldr r0, _0812FE10 @ =gBattleAnimBankTarget _0812FDC2: ldrb r4, [r0] adds r0, r4, 0 @@ -7851,7 +7851,7 @@ _0812FDC2: strh r0, [r5, 0x14] ldr r0, _0812FE14 @ =gBattleAnimArgs ldrb r0, [r0] - bl obj_id_for_side_relative_to_move + bl GetAnimBankSpriteId adds r1, r0, 0 lsls r1, 24 lsrs r1, 24 @@ -7865,7 +7865,7 @@ _0812FDC2: pop {r0} bx r0 .align 2, 0 -_0812FE10: .4byte gBattleAnimEnemyMonIndex +_0812FE10: .4byte gBattleAnimBankTarget _0812FE14: .4byte gBattleAnimArgs _0812FE18: .4byte gUnknown_084028AC _0812FE1C: .4byte sub_812FE20 @@ -8124,7 +8124,7 @@ sub_812FFE4: @ 812FFE4 ldrh r0, [r1, 0x2] strh r0, [r4, 0xA] ldrb r0, [r1] - bl obj_id_for_side_relative_to_move + bl GetAnimBankSpriteId lsls r0, 24 lsrs r0, 24 ldr r2, _08130034 @ =gSprites @@ -8215,7 +8215,7 @@ sub_81300A4: @ 81300A4 lsrs r0, 24 movs r2, 0xD0 lsls r2, 1 - ldr r1, _081300E0 @ =gBattleAnimPlayerMonIndex + ldr r1, _081300E0 @ =gBattleAnimBankAttacker ldrb r3, [r1] ldr r1, _081300E4 @ =gBattleAnimArgs ldrb r1, [r1] @@ -8238,7 +8238,7 @@ sub_81300A4: @ 81300A4 pop {r0} bx r0 .align 2, 0 -_081300E0: .4byte gBattleAnimPlayerMonIndex +_081300E0: .4byte gBattleAnimBankAttacker _081300E4: .4byte gBattleAnimArgs _081300E8: .4byte gUnknown_08D2E014 _081300EC: .4byte gUnknown_08D2E170 @@ -8249,7 +8249,7 @@ _081300F0: .4byte gUnknown_08D2E150 sub_81300F4: @ 81300F4 push {r4-r6,lr} adds r5, r0, 0 - ldr r6, _0813014C @ =gBattleAnimPlayerMonIndex + ldr r6, _0813014C @ =gBattleAnimBankAttacker ldrb r0, [r6] bl GetBankSide lsls r0, 24 @@ -8289,7 +8289,7 @@ _08130110: strh r0, [r5, 0x30] b _08130180 .align 2, 0 -_0813014C: .4byte gBattleAnimPlayerMonIndex +_0813014C: .4byte gBattleAnimBankAttacker _08130150: .4byte gBattleAnimArgs _08130154: .4byte 0x0000fd80 _08130158: @@ -8314,7 +8314,7 @@ _08130172: lsls r0, 2 strh r0, [r5, 0x2E] _08130180: - ldr r0, _081301AC @ =gBattleAnimPlayerMonIndex + ldr r0, _081301AC @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -8336,7 +8336,7 @@ _081301A0: pop {r0} bx r0 .align 2, 0 -_081301AC: .4byte gBattleAnimPlayerMonIndex +_081301AC: .4byte gBattleAnimBankAttacker _081301B0: .4byte sub_81301B4 thumb_func_end sub_81300F4 @@ -8403,7 +8403,7 @@ _0813021C: strh r0, [r6, 0x14] strh r1, [r6, 0x16] _08130226: - ldr r5, _0813025C @ =gBattleAnimPlayerMonIndex + ldr r5, _0813025C @ =gBattleAnimBankAttacker ldrb r0, [r5] bl GetBankSide lsls r0, 24 @@ -8428,7 +8428,7 @@ _08130254: adds r0, r4, r0 b _08130284 .align 2, 0 -_0813025C: .4byte gBattleAnimPlayerMonIndex +_0813025C: .4byte gBattleAnimBankAttacker _08130260: ldrb r0, [r5] movs r1, 0x2 @@ -8449,7 +8449,7 @@ _08130280: subs r0, r4, r0 _08130284: strh r0, [r6, 0x1E] - ldr r5, _081302D8 @ =gBattleAnimPlayerMonIndex + ldr r5, _081302D8 @ =gBattleAnimBankAttacker ldrb r0, [r5] movs r1, 0x3 bl sub_8077ABC @@ -8468,7 +8468,7 @@ _081302A8: asrs r0, 2 subs r0, r4, r0 strh r0, [r6, 0x20] - ldr r4, _081302DC @ =gBattleAnimEnemyMonIndex + ldr r4, _081302DC @ =gBattleAnimBankTarget ldrb r0, [r4] movs r1, 0x2 bl sub_8077ABC @@ -8487,8 +8487,8 @@ _081302A8: pop {r0} bx r0 .align 2, 0 -_081302D8: .4byte gBattleAnimPlayerMonIndex -_081302DC: .4byte gBattleAnimEnemyMonIndex +_081302D8: .4byte gBattleAnimBankAttacker +_081302DC: .4byte gBattleAnimBankTarget _081302E0: .4byte sub_81302E4 thumb_func_end sub_81301EC @@ -8810,7 +8810,7 @@ sub_813051C: @ 813051C strh r0, [r4, 0x2E] ldr r1, _0813054C @ =move_anim_8072740 adds r0, r4, 0 - bl oamt_set_x3A_32 + bl StoreSpriteCallbackInData6 ldr r0, _08130550 @ =sub_8078CC0 str r0, [r4, 0x1C] pop {r4} @@ -8837,7 +8837,7 @@ sub_8130554: @ 8130554 lsls r0, 3 ldr r1, _08130674 @ =gTasks adds r7, r0, r1 - ldr r0, _08130678 @ =gBattleAnimPlayerMonIndex + ldr r0, _08130678 @ =gBattleAnimBankAttacker mov r10, r0 ldrb r0, [r0] movs r1, 0x2 @@ -8852,7 +8852,7 @@ sub_8130554: @ 8130554 lsls r0, 24 lsrs r0, 24 strh r0, [r7, 0x20] - ldr r0, _0813067C @ =gBattleAnimEnemyMonIndex + ldr r0, _0813067C @ =gBattleAnimBankTarget mov r8, r0 ldrb r0, [r0] movs r1, 0x2 @@ -8962,8 +8962,8 @@ _0813066E: b _08130696 .align 2, 0 _08130674: .4byte gTasks -_08130678: .4byte gBattleAnimPlayerMonIndex -_0813067C: .4byte gBattleAnimEnemyMonIndex +_08130678: .4byte gBattleAnimBankAttacker +_0813067C: .4byte gBattleAnimBankTarget _08130680: .4byte gSpriteTemplate_84029AC _08130684: .4byte gSprites _08130688: .4byte 0x0000ffe0 @@ -9129,13 +9129,13 @@ sub_81307B0: @ 81307B0 adds r6, r0, 0 cmp r1, 0 bne _081307CC - ldr r0, _081307C8 @ =gBattleAnimPlayerMonIndex + ldr r0, _081307C8 @ =gBattleAnimBankAttacker b _081307CE .align 2, 0 _081307C4: .4byte gBattleAnimArgs -_081307C8: .4byte gBattleAnimPlayerMonIndex +_081307C8: .4byte gBattleAnimBankAttacker _081307CC: - ldr r0, _08130834 @ =gBattleAnimEnemyMonIndex + ldr r0, _08130834 @ =gBattleAnimBankTarget _081307CE: ldrb r5, [r0] ldrh r2, [r4, 0x4] @@ -9188,7 +9188,7 @@ _081307FC: subs r0, 0x8 b _0813084A .align 2, 0 -_08130834: .4byte gBattleAnimEnemyMonIndex +_08130834: .4byte gBattleAnimBankTarget _08130838: .4byte 0x000003ff _0813083C: .4byte 0xfffffc00 _08130840: @@ -9337,7 +9337,7 @@ _08130934: ldrh r0, [r2, 0x2] strh r0, [r4, 0x8] ldrb r0, [r2] - bl obj_id_for_side_relative_to_move + bl GetAnimBankSpriteId adds r1, r0, 0 lsls r1, 24 lsrs r1, 24 @@ -9461,13 +9461,13 @@ sub_8130A2C: @ 8130A2C ldrsh r0, [r0, r1] cmp r0, 0 bne _08130A48 - ldr r4, _08130A44 @ =gBattleAnimPlayerMonIndex + ldr r4, _08130A44 @ =gBattleAnimBankAttacker b _08130A4A .align 2, 0 _08130A40: .4byte gBattleAnimArgs -_08130A44: .4byte gBattleAnimPlayerMonIndex +_08130A44: .4byte gBattleAnimBankAttacker _08130A48: - ldr r4, _08130A88 @ =gBattleAnimEnemyMonIndex + ldr r4, _08130A88 @ =gBattleAnimBankTarget _08130A4A: ldrb r0, [r4] movs r1, 0x2 @@ -9500,7 +9500,7 @@ _08130A6E: pop {r0} bx r0 .align 2, 0 -_08130A88: .4byte gBattleAnimEnemyMonIndex +_08130A88: .4byte gBattleAnimBankTarget _08130A8C: .4byte gBattleAnimArgs _08130A90: .4byte sub_8130A94 thumb_func_end sub_8130A2C @@ -9859,7 +9859,7 @@ sub_8130D20: @ 8130D20 ldr r0, _08130D7C @ =gTasks adds r6, r1, r0 movs r0, 0 - bl obj_id_for_side_relative_to_move + bl GetAnimBankSpriteId lsls r0, 24 lsrs r0, 24 strh r0, [r6, 0x26] @@ -9872,7 +9872,7 @@ sub_8130D20: @ 8130D20 lsrs r7, r0, 24 cmp r7, 0x1 bne _08130D8C - ldr r5, _08130D80 @ =gBattleAnimPlayerMonIndex + ldr r5, _08130D80 @ =gBattleAnimBankAttacker ldrb r0, [r5] movs r1, 0 bl sub_8077ABC @@ -9892,14 +9892,14 @@ sub_8130D20: @ 8130D20 b _08130DAC .align 2, 0 _08130D7C: .4byte gTasks -_08130D80: .4byte gBattleAnimPlayerMonIndex +_08130D80: .4byte gBattleAnimBankAttacker _08130D84: ldr r0, _08130D88 @ =0x0000ffff b _08130DAA .align 2, 0 _08130D88: .4byte 0x0000ffff _08130D8C: - ldr r0, _08130DA0 @ =gBattleAnimPlayerMonIndex + ldr r0, _08130DA0 @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -9908,7 +9908,7 @@ _08130D8C: ldr r0, _08130DA4 @ =0x0000ffff b _08130DAA .align 2, 0 -_08130DA0: .4byte gBattleAnimPlayerMonIndex +_08130DA0: .4byte gBattleAnimBankAttacker _08130DA4: .4byte 0x0000ffff _08130DA8: movs r0, 0x1 @@ -10153,13 +10153,13 @@ sub_8130F5C: @ 8130F5C adds r0, r4, 0 movs r1, 0x1 bl sub_80787B0 - ldr r0, _08130F7C @ =gBattleAnimPlayerMonIndex + ldr r0, _08130F7C @ =gBattleAnimBankAttacker b _08130F82 .align 2, 0 _08130F78: .4byte gBattleAnimArgs -_08130F7C: .4byte gBattleAnimPlayerMonIndex +_08130F7C: .4byte gBattleAnimBankAttacker _08130F80: - ldr r0, _08130FD8 @ =gBattleAnimEnemyMonIndex + ldr r0, _08130FD8 @ =gBattleAnimBankTarget _08130F82: ldrb r0, [r0] strh r0, [r4, 0x3C] @@ -10204,7 +10204,7 @@ _08130FA6: pop {r0} bx r0 .align 2, 0 -_08130FD8: .4byte gBattleAnimEnemyMonIndex +_08130FD8: .4byte gBattleAnimBankTarget _08130FDC: .4byte sub_8130FE0 thumb_func_end sub_8130F5C @@ -10545,7 +10545,7 @@ _08131260: .4byte gSpriteTemplate_8402500 sub_8131264: @ 8131264 push {r4,r5,lr} adds r5, r0, 0 - ldr r4, _081312A0 @ =gBattleAnimEnemyMonIndex + ldr r4, _081312A0 @ =gBattleAnimBankTarget ldrb r0, [r4] movs r1, 0x2 bl sub_8077ABC @@ -10571,7 +10571,7 @@ _08131290: subs r1, r0 b _081312B6 .align 2, 0 -_081312A0: .4byte gBattleAnimEnemyMonIndex +_081312A0: .4byte gBattleAnimBankTarget _081312A4: .4byte gBattleAnimArgs _081312A8: ldr r2, _081312DC @ =gBattleAnimArgs @@ -10615,7 +10615,7 @@ sub_81312E4: @ 81312E4 lsls r0, 24 lsrs r6, r0, 24 movs r0, 0 - bl obj_id_for_side_relative_to_move + bl GetAnimBankSpriteId lsls r0, 24 lsrs r5, r0, 24 adds r2, r5, 0 @@ -10686,7 +10686,7 @@ _08131378: .align 2, 0 _08131380: .4byte gSprites _08131384: - ldr r4, _081313F4 @ =gBattleAnimPlayerMonIndex + ldr r4, _081313F4 @ =gBattleAnimBankAttacker ldrb r0, [r4] movs r1, 0 bl refresh_graphics_maybe @@ -10743,7 +10743,7 @@ _081313E8: pop {r0} bx r0 .align 2, 0 -_081313F4: .4byte gBattleAnimPlayerMonIndex +_081313F4: .4byte gBattleAnimBankAttacker _081313F8: .4byte gSprites _081313FC: .4byte gObjectBankIDs _08131400: .4byte gSpriteAffineAnimTable_81E7C18 @@ -10756,7 +10756,7 @@ sub_8131408: @ 8131408 lsls r0, 24 lsrs r6, r0, 24 movs r0, 0 - bl obj_id_for_side_relative_to_move + bl GetAnimBankSpriteId lsls r0, 24 lsrs r3, r0, 24 ldr r1, _08131434 @ =gTasks @@ -10932,7 +10932,7 @@ _08131560: .4byte gSprites sub_8131564: @ 8131564 push {r4,r5,lr} adds r5, r0, 0 - ldr r4, _08131588 @ =gBattleAnimEnemyMonIndex + ldr r4, _08131588 @ =gBattleAnimBankTarget ldrb r0, [r4] bl GetBankSide lsls r0, 24 @@ -10947,7 +10947,7 @@ sub_8131564: @ 8131564 ldr r4, _0813158C @ =0x0000ff70 b _081315A0 .align 2, 0 -_08131588: .4byte gBattleAnimEnemyMonIndex +_08131588: .4byte gBattleAnimBankTarget _0813158C: .4byte 0x0000ff70 _08131590: ldrb r0, [r4] @@ -10958,7 +10958,7 @@ _08131590: strb r0, [r1] ldr r4, _081315BC @ =0x0000ffa0 _081315A0: - ldr r0, _081315C0 @ =gBattleAnimEnemyMonIndex + ldr r0, _081315C0 @ =gBattleAnimBankTarget ldrb r0, [r0] movs r1, 0x3 bl sub_8077ABC @@ -10973,7 +10973,7 @@ _081315A0: bx r0 .align 2, 0 _081315BC: .4byte 0x0000ffa0 -_081315C0: .4byte gBattleAnimEnemyMonIndex +_081315C0: .4byte gBattleAnimBankTarget _081315C4: .4byte sub_81315C8 thumb_func_end sub_8131564 @@ -11474,7 +11474,7 @@ _0813197C: .4byte _08131DC4 _08131990: movs r0, 0 - bl obj_id_for_side_relative_to_move + bl GetAnimBankSpriteId lsls r0, 24 lsrs r7, r0, 24 ldr r1, _081319DC @ =gTasks @@ -11489,7 +11489,7 @@ _08131990: ldrh r1, [r6, 0xA] adds r0, r1 strh r0, [r6, 0xA] - ldr r0, _081319E0 @ =gBattleAnimPlayerMonIndex + ldr r0, _081319E0 @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -11510,7 +11510,7 @@ _08131990: b _08131A02 .align 2, 0 _081319DC: .4byte gTasks -_081319E0: .4byte gBattleAnimPlayerMonIndex +_081319E0: .4byte gBattleAnimBankAttacker _081319E4: .4byte gSprites _081319E8: ldr r3, _08131A3C @ =gSprites @@ -11570,7 +11570,7 @@ _08131A44: ldr r3, [r0, 0xC] mov r9, r3 ldrh r5, [r0] - ldr r0, _08131A70 @ =gBattleAnimPlayerMonIndex + ldr r0, _08131A70 @ =gBattleAnimBankAttacker ldrb r0, [r0] bl sub_8079E90 lsls r0, 24 @@ -11579,9 +11579,9 @@ _08131A44: b _08131B92 .align 2, 0 _08131A6C: .4byte 0x02019348 -_08131A70: .4byte gBattleAnimPlayerMonIndex +_08131A70: .4byte gBattleAnimBankAttacker _08131A74: - ldr r4, _08131AD4 @ =gBattleAnimPlayerMonIndex + ldr r4, _08131AD4 @ =gBattleAnimBankAttacker ldrb r0, [r4] bl GetBankSide lsls r0, 24 @@ -11626,7 +11626,7 @@ _08131A74: lsrs r5, r0, 16 b _08131AE6 .align 2, 0 -_08131AD4: .4byte gBattleAnimPlayerMonIndex +_08131AD4: .4byte gBattleAnimBankAttacker _08131AD8: .4byte gBattlePartyID _08131ADC: .4byte gPlayerParty _08131AE0: .4byte 0x02017800 @@ -11634,7 +11634,7 @@ _08131AE4: ldrh r5, [r1, 0x2] _08131AE6: movs r0, 0x1 - bl obj_id_for_side_relative_to_move + bl GetAnimBankSpriteId ldr r2, _08131B0C @ =gSprites lsls r0, 24 lsrs r0, 24 @@ -11700,7 +11700,7 @@ _08131B70: ldrh r5, [r1, 0x2] _08131B72: movs r0, 0x1 - bl obj_id_for_side_relative_to_move + bl GetAnimBankSpriteId ldr r2, _08131C04 @ =gSprites lsls r0, 24 lsrs r0, 24 @@ -11717,7 +11717,7 @@ _08131B72: _08131B92: ldr r6, _08131C08 @ =0x0000ffe0 _08131B94: - ldr r0, _08131C0C @ =gBattleAnimEnemyMonIndex + ldr r0, _08131C0C @ =gBattleAnimBankTarget ldrb r0, [r0] movs r1, 0x1 bl sub_8077ABC @@ -11737,7 +11737,7 @@ _08131B94: bl sub_8079F44 lsls r0, 24 lsrs r5, r0, 24 - ldr r0, _08131C10 @ =gBattleAnimPlayerMonIndex + ldr r0, _08131C10 @ =gBattleAnimBankAttacker ldrb r0, [r0] lsls r0, 2 ldr r1, _08131C14 @ =0x02017800 @@ -11773,8 +11773,8 @@ _08131BF2: .align 2, 0 _08131C04: .4byte gSprites _08131C08: .4byte 0x0000ffe0 -_08131C0C: .4byte gBattleAnimEnemyMonIndex -_08131C10: .4byte gBattleAnimPlayerMonIndex +_08131C0C: .4byte gBattleAnimBankTarget +_08131C10: .4byte gBattleAnimBankAttacker _08131C14: .4byte 0x02017800 _08131C18: .4byte 0x00007fff _08131C1C: .4byte gTasks @@ -11794,7 +11794,7 @@ _08131C20: ldrh r2, [r6, 0xA] adds r0, r2 strh r0, [r6, 0xA] - ldr r0, _08131C70 @ =gBattleAnimPlayerMonIndex + ldr r0, _08131C70 @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -11817,7 +11817,7 @@ _08131C20: b _08131C8E .align 2, 0 _08131C6C: .4byte gTasks -_08131C70: .4byte gBattleAnimPlayerMonIndex +_08131C70: .4byte gBattleAnimBankAttacker _08131C74: .4byte gSprites _08131C78: ldr r2, _08131CDC @ =gSprites @@ -11851,7 +11851,7 @@ _08131C8E: ldrsh r0, [r6, r1] cmp r0, 0 bne _08131D0E - ldr r0, _08131CE4 @ =gBattleAnimPlayerMonIndex + ldr r0, _08131CE4 @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -11859,7 +11859,7 @@ _08131C8E: bne _08131CEC lsls r4, r5, 16 asrs r4, 16 - ldr r0, _08131CE8 @ =gBattleAnimEnemyMonIndex + ldr r0, _08131CE8 @ =gBattleAnimBankTarget ldrb r0, [r0] movs r1, 0 bl sub_8077ABC @@ -11871,12 +11871,12 @@ _08131C8E: .align 2, 0 _08131CDC: .4byte gSprites _08131CE0: .4byte gTasks -_08131CE4: .4byte gBattleAnimPlayerMonIndex -_08131CE8: .4byte gBattleAnimEnemyMonIndex +_08131CE4: .4byte gBattleAnimBankAttacker +_08131CE8: .4byte gBattleAnimBankTarget _08131CEC: lsls r4, r5, 16 asrs r4, 16 - ldr r0, _08131D30 @ =gBattleAnimEnemyMonIndex + ldr r0, _08131D30 @ =gBattleAnimBankTarget ldrb r0, [r0] movs r1, 0 bl sub_8077ABC @@ -11911,13 +11911,13 @@ _08131D20: strh r0, [r1, 0xA] b _08131DB6 .align 2, 0 -_08131D30: .4byte gBattleAnimEnemyMonIndex +_08131D30: .4byte gBattleAnimBankTarget _08131D34: .4byte gBattleAnimArgs _08131D38: .4byte 0x0000ffff _08131D3C: .4byte gTasks _08131D40: movs r0, 0 - bl obj_id_for_side_relative_to_move + bl GetAnimBankSpriteId lsls r0, 24 lsrs r7, r0, 24 ldr r1, _08131D8C @ =gTasks @@ -11935,7 +11935,7 @@ _08131D40: ldr r5, _08131D90 @ =gSprites adds r0, r5 bl sub_807A0F4 - ldr r0, _08131D94 @ =gBattleAnimPlayerMonIndex + ldr r0, _08131D94 @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -11954,7 +11954,7 @@ _08131D40: .align 2, 0 _08131D8C: .4byte gTasks _08131D90: .4byte gSprites -_08131D94: .4byte gBattleAnimPlayerMonIndex +_08131D94: .4byte gBattleAnimBankAttacker _08131D98: lsls r0, r7, 4 adds r0, r7 @@ -11981,7 +11981,7 @@ _08131DB6: _08131DC0: .4byte gTasks _08131DC4: movs r0, 0 - bl obj_id_for_side_relative_to_move + bl GetAnimBankSpriteId lsls r0, 24 lsrs r7, r0, 24 ldr r1, _08131E38 @ =gTasks @@ -11996,7 +11996,7 @@ _08131DC4: ldrh r3, [r2, 0xA] adds r0, r3 strh r0, [r2, 0xA] - ldr r0, _08131E3C @ =gBattleAnimPlayerMonIndex + ldr r0, _08131E3C @ =gBattleAnimBankAttacker mov r10, r0 ldrb r0, [r0] str r2, [sp, 0x10] @@ -12036,7 +12036,7 @@ _08131DC4: b _08131E7C .align 2, 0 _08131E38: .4byte gTasks -_08131E3C: .4byte gBattleAnimPlayerMonIndex +_08131E3C: .4byte gBattleAnimBankAttacker _08131E40: .4byte gSprites _08131E44: ldr r1, _08131EB0 @ =gSprites @@ -12124,7 +12124,7 @@ _08131ECA: asrs r1, 24 movs r0, 0x7A bl PlaySE12WithPanning - ldr r0, _08131F54 @ =gBattleAnimEnemyMonIndex + ldr r0, _08131F54 @ =gBattleAnimBankTarget ldrb r0, [r0] movs r1, 0x1 bl sub_8077ABC @@ -12144,7 +12144,7 @@ _08131ECA: negs r0, r0 ands r0, r1 strb r0, [r2] - ldr r0, _08131F5C @ =gBattleAnimPlayerMonIndex + ldr r0, _08131F5C @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -12156,7 +12156,7 @@ _08131ECA: cmp r0, 0 bne _08131FF4 movs r0, 0x1 - bl obj_id_for_side_relative_to_move + bl GetAnimBankSpriteId ldr r2, _08131F60 @ =gSprites lsls r0, 24 lsrs r0, 24 @@ -12173,9 +12173,9 @@ _08131ECA: b _08131FF4 .align 2, 0 _08131F50: .4byte gBattleAnimArgs -_08131F54: .4byte gBattleAnimEnemyMonIndex +_08131F54: .4byte gBattleAnimBankTarget _08131F58: .4byte 0x0000ffe0 -_08131F5C: .4byte gBattleAnimPlayerMonIndex +_08131F5C: .4byte gBattleAnimBankAttacker _08131F60: .4byte gSprites _08131F64: adds r0, r4, 0 @@ -12218,7 +12218,7 @@ _08131FA6: ldrh r1, [r4, 0x32] adds r0, r1 strh r0, [r4, 0x32] - ldr r0, _08131FD0 @ =gBattleAnimPlayerMonIndex + ldr r0, _08131FD0 @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -12233,7 +12233,7 @@ _08131FA6: adds r1, r2, 0 b _08131FE0 .align 2, 0 -_08131FD0: .4byte gBattleAnimPlayerMonIndex +_08131FD0: .4byte gBattleAnimBankAttacker _08131FD4: ldrh r1, [r4, 0x32] lsls r0, r1, 16 @@ -12290,14 +12290,14 @@ _0813202C: .4byte _08132104 .4byte _0813216A _08132040: - ldr r0, _08132084 @ =gBattleAnimPlayerMonIndex + ldr r0, _08132084 @ =gBattleAnimBankAttacker ldrb r0, [r0] movs r1, 0 bl sub_8077ABC lsls r0, 24 lsrs r0, 24 adds r5, r0, 0 - ldr r0, _08132088 @ =gBattleAnimEnemyMonIndex + ldr r0, _08132088 @ =gBattleAnimBankTarget ldrb r0, [r0] movs r1, 0 bl sub_8077ABC @@ -12323,12 +12323,12 @@ _08132076: strh r0, [r1, 0x26] b _08132188 .align 2, 0 -_08132084: .4byte gBattleAnimPlayerMonIndex -_08132088: .4byte gBattleAnimEnemyMonIndex +_08132084: .4byte gBattleAnimBankAttacker +_08132088: .4byte gBattleAnimBankTarget _0813208C: .4byte gTasks _08132090: ldr r1, _081320CC @ =gObjectBankIDs - ldr r0, _081320D0 @ =gBattleAnimPlayerMonIndex + ldr r0, _081320D0 @ =gBattleAnimBankAttacker ldrb r0, [r0] adds r0, r1 ldrb r2, [r0] @@ -12359,7 +12359,7 @@ _08132090: b _0813215E .align 2, 0 _081320CC: .4byte gObjectBankIDs -_081320D0: .4byte gBattleAnimPlayerMonIndex +_081320D0: .4byte gBattleAnimBankAttacker _081320D4: .4byte gSprites _081320D8: movs r3, 0x20 @@ -12387,7 +12387,7 @@ _081320EC: b _08132188 _08132104: ldr r1, _08132144 @ =gObjectBankIDs - ldr r0, _08132148 @ =gBattleAnimPlayerMonIndex + ldr r0, _08132148 @ =gBattleAnimBankAttacker ldrb r0, [r0] adds r0, r1 ldrb r2, [r0] @@ -12420,7 +12420,7 @@ _08132104: b _08132162 .align 2, 0 _08132144: .4byte gObjectBankIDs -_08132148: .4byte gBattleAnimPlayerMonIndex +_08132148: .4byte gBattleAnimBankAttacker _0813214C: .4byte gSprites _08132150: movs r3, 0x20 @@ -12440,7 +12440,7 @@ _08132162: b _08132188 _0813216A: ldr r1, _08132190 @ =gObjectBankIDs - ldr r0, _08132194 @ =gBattleAnimPlayerMonIndex + ldr r0, _08132194 @ =gBattleAnimBankAttacker ldrb r0, [r0] adds r0, r1 ldrb r2, [r0] @@ -12459,7 +12459,7 @@ _08132188: bx r0 .align 2, 0 _08132190: .4byte gObjectBankIDs -_08132194: .4byte gBattleAnimPlayerMonIndex +_08132194: .4byte gBattleAnimBankAttacker _08132198: .4byte gSprites thumb_func_end sub_8131FFC @@ -12474,12 +12474,12 @@ sub_813219C: @ 813219C ldr r0, _08132204 @ =gTasks adds r4, r1, r0 movs r0, 0 - bl obj_id_for_side_relative_to_move + bl GetAnimBankSpriteId lsls r0, 24 lsrs r0, 24 movs r5, 0 strh r0, [r4, 0xE] - ldr r0, _08132208 @ =gBattleAnimPlayerMonIndex + ldr r0, _08132208 @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -12518,7 +12518,7 @@ _081321D0: bx r0 .align 2, 0 _08132204: .4byte gTasks -_08132208: .4byte gBattleAnimPlayerMonIndex +_08132208: .4byte gBattleAnimBankAttacker _0813220C: .4byte gSprites _08132210: .4byte sub_8132214 thumb_func_end sub_813219C @@ -12662,7 +12662,7 @@ _08132312: sub_8132318: @ 8132318 push {r4,lr} adds r4, r0, 0 - ldr r0, _0813236C @ =gBattleAnimEnemyMonIndex + ldr r0, _0813236C @ =gBattleAnimBankTarget ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -12699,14 +12699,14 @@ _0813235E: pop {r0} bx r0 .align 2, 0 -_0813236C: .4byte gBattleAnimEnemyMonIndex +_0813236C: .4byte gBattleAnimBankTarget thumb_func_end sub_8132318 thumb_func_start sub_8132370 sub_8132370: @ 8132370 push {r4,lr} adds r4, r0, 0 - ldr r0, _081323A8 @ =gBattleAnimEnemyMonIndex + ldr r0, _081323A8 @ =gBattleAnimBankTarget ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -12730,7 +12730,7 @@ sub_8132370: @ 8132370 bl StartSpriteAffineAnim b _081323CE .align 2, 0 -_081323A8: .4byte gBattleAnimEnemyMonIndex +_081323A8: .4byte gBattleAnimBankTarget _081323AC: .4byte gBattleAnimArgs _081323B0: .4byte 0x0000fff5 _081323B4: @@ -12762,7 +12762,7 @@ _081323DC: .4byte sub_8132318 sub_81323E0: @ 81323E0 push {r4,r5,lr} adds r5, r0, 0 - ldr r4, _08132424 @ =gBattleAnimPlayerMonIndex + ldr r4, _08132424 @ =gBattleAnimBankAttacker ldrb r0, [r4] movs r1, 0x2 bl sub_8077ABC @@ -12793,7 +12793,7 @@ _0813240A: pop {r0} bx r0 .align 2, 0 -_08132424: .4byte gBattleAnimPlayerMonIndex +_08132424: .4byte gBattleAnimBankAttacker _08132428: .4byte sub_8132430 _0813242C: .4byte REG_BLDALPHA thumb_func_end sub_81323E0 @@ -12997,7 +12997,7 @@ sub_813257C: @ 813257C strh r0, [r4, 0x8] ldr r0, _081325B8 @ =gBattleAnimArgs ldrb r0, [r0] - bl obj_id_for_side_relative_to_move + bl GetAnimBankSpriteId adds r1, r0, 0 lsls r1, 24 lsrs r1, 24 diff --git a/asm/battle_anim_813F0F4.s b/asm/battle_anim_813F0F4.s index a5ab2fb83..ab8a222df 100644 --- a/asm/battle_anim_813F0F4.s +++ b/asm/battle_anim_813F0F4.s @@ -17,7 +17,7 @@ unref_sub_813F0F4: @ 813F0F4 lsls r0, 24 lsrs r0, 24 str r0, [sp, 0x10] - ldr r0, _0813F2AC @ =gBattleAnimPlayerMonIndex + ldr r0, _0813F2AC @ =gBattleAnimBankAttacker ldrb r3, [r0] ldr r0, _0813F2B0 @ =gUnknown_030042C4 movs r1, 0 @@ -220,7 +220,7 @@ unref_sub_813F0F4: @ 813F0F4 pop {r0} bx r0 .align 2, 0 -_0813F2AC: .4byte gBattleAnimPlayerMonIndex +_0813F2AC: .4byte gBattleAnimBankAttacker _0813F2B0: .4byte gUnknown_030042C4 _0813F2B4: .4byte gUnknown_03004240 _0813F2B8: .4byte REG_WININ @@ -252,7 +252,7 @@ sub_813F300: @ 813F300 sub sp, 0x10 lsls r0, 24 lsrs r7, r0, 24 - ldr r0, _0813F34C @ =gBattleAnimPlayerMonIndex + ldr r0, _0813F34C @ =gBattleAnimBankAttacker ldrb r0, [r0] mov r9, r0 ldr r1, _0813F350 @ =gTasks @@ -284,7 +284,7 @@ sub_813F300: @ 813F300 beq _0813F35E b _0813F4B2 .align 2, 0 -_0813F34C: .4byte gBattleAnimPlayerMonIndex +_0813F34C: .4byte gBattleAnimBankAttacker _0813F350: .4byte gTasks _0813F354: .4byte gUnknown_030041B4 _0813F358: @@ -495,7 +495,7 @@ sub_813F4EC: @ 813F4EC lsrs r0, 24 str r0, [sp] ldr r1, _0813F5D0 @ =gHealthboxIDs - ldr r0, _0813F5D4 @ =gBattleAnimPlayerMonIndex + ldr r0, _0813F5D4 @ =gBattleAnimBankAttacker ldrb r0, [r0] adds r0, r1 ldrb r0, [r0] @@ -595,7 +595,7 @@ sub_813F4EC: @ 813F4EC bx r0 .align 2, 0 _0813F5D0: .4byte gHealthboxIDs -_0813F5D4: .4byte gBattleAnimPlayerMonIndex +_0813F5D4: .4byte gBattleAnimBankAttacker _0813F5D8: .4byte gSprites _0813F5DC: .4byte 0x0000d709 _0813F5E0: .4byte 0x0000d70a @@ -614,7 +614,7 @@ sub_813F5E8: @ 813F5E8 lsrs r0, 24 mov r8, r0 ldr r1, _0813F684 @ =gHealthboxIDs - ldr r0, _0813F688 @ =gBattleAnimPlayerMonIndex + ldr r0, _0813F688 @ =gBattleAnimBankAttacker ldrb r0, [r0] adds r0, r1 ldrb r0, [r0] @@ -678,7 +678,7 @@ sub_813F5E8: @ 813F5E8 bx r0 .align 2, 0 _0813F684: .4byte gHealthboxIDs -_0813F688: .4byte gBattleAnimPlayerMonIndex +_0813F688: .4byte gBattleAnimBankAttacker _0813F68C: .4byte gSprites _0813F690: .4byte 0x0000d709 _0813F694: .4byte 0x0000d70a @@ -820,7 +820,7 @@ sub_813F798: @ 813F798 lsls r0, 24 lsrs r6, r0, 24 ldr r1, _0813F7C4 @ =gObjectBankIDs - ldr r0, _0813F7C8 @ =gBattleAnimPlayerMonIndex + ldr r0, _0813F7C8 @ =gBattleAnimBankAttacker ldrb r0, [r0] adds r0, r1 ldrb r5, [r0] @@ -840,7 +840,7 @@ sub_813F798: @ 813F798 b _0813F838 .align 2, 0 _0813F7C4: .4byte gObjectBankIDs -_0813F7C8: .4byte gBattleAnimPlayerMonIndex +_0813F7C8: .4byte gBattleAnimBankAttacker _0813F7CC: .4byte gTasks _0813F7D0: cmp r0, 0x2 @@ -911,7 +911,7 @@ sub_813F844: @ 813F844 lsls r0, 24 lsrs r5, r0, 24 ldr r1, _0813F87C @ =gObjectBankIDs - ldr r4, _0813F880 @ =gBattleAnimPlayerMonIndex + ldr r4, _0813F880 @ =gBattleAnimBankAttacker ldrb r0, [r4] adds r1, r0, r1 ldrb r1, [r1] @@ -931,7 +931,7 @@ sub_813F844: @ 813F844 b _0813F89C .align 2, 0 _0813F87C: .4byte gObjectBankIDs -_0813F880: .4byte gBattleAnimPlayerMonIndex +_0813F880: .4byte gBattleAnimBankAttacker _0813F884: .4byte gBattlePartyID _0813F888: .4byte gPlayerParty _0813F88C: @@ -970,7 +970,7 @@ _0813F8CC: .4byte gBattlePartyID _0813F8D0: .4byte gEnemyParty _0813F8D4: .4byte gTasks _0813F8D8: - ldr r5, _0813F950 @ =gBattleAnimPlayerMonIndex + ldr r5, _0813F950 @ =gBattleAnimBankAttacker ldrb r0, [r5] movs r1, 0 bl sub_8077ABC @@ -1025,7 +1025,7 @@ _0813F8D8: strh r0, [r6, 0x8] b _0813F982 .align 2, 0 -_0813F950: .4byte gBattleAnimPlayerMonIndex +_0813F950: .4byte gBattleAnimBankAttacker _0813F954: .4byte gSprites _0813F958: movs r1, 0x1C @@ -1235,7 +1235,7 @@ sub_813FA94: @ 813FA94 adds r6, r4, r1 movs r0, 0x22 strh r0, [r6, 0x2E] - ldr r2, _0813FB64 @ =gBattleAnimEnemyMonIndex + ldr r2, _0813FB64 @ =gBattleAnimBankTarget mov r8, r2 ldrb r0, [r2] movs r1, 0 @@ -1297,7 +1297,7 @@ sub_813FA94: @ 813FA94 _0813FB58: .4byte gLastUsedItem _0813FB5C: .4byte gBallSpriteTemplates _0813FB60: .4byte gSprites -_0813FB64: .4byte gBattleAnimEnemyMonIndex +_0813FB64: .4byte gBattleAnimBankTarget _0813FB68: .4byte sub_813FD90 _0813FB6C: .4byte 0x02017840 _0813FB70: .4byte gObjectBankIDs @@ -1397,7 +1397,7 @@ _0813FBE0: adds r6, r4, r0 movs r0, 0x22 strh r0, [r6, 0x2E] - ldr r1, _0813FCA8 @ =gBattleAnimEnemyMonIndex + ldr r1, _0813FCA8 @ =gBattleAnimBankTarget mov r8, r1 ldrb r0, [r1] movs r1, 0 @@ -1449,7 +1449,7 @@ _0813FBE0: _0813FC9C: .4byte gLastUsedItem _0813FCA0: .4byte gBallSpriteTemplates _0813FCA4: .4byte gSprites -_0813FCA8: .4byte gBattleAnimEnemyMonIndex +_0813FCA8: .4byte gBattleAnimBankTarget _0813FCAC: .4byte SpriteCallbackDummy _0813FCB0: .4byte gObjectBankIDs _0813FCB4: .4byte gTasks @@ -1652,7 +1652,7 @@ _0813FE10: movs r2, 0x1 movs r3, 0x1C bl sub_814086C - ldr r0, _0813FE6C @ =gBattleAnimEnemyMonIndex + ldr r0, _0813FE6C @ =gBattleAnimBankTarget ldrb r1, [r0] movs r0, 0 movs r2, 0xE @@ -1666,7 +1666,7 @@ _0813FE5A: .align 2, 0 _0813FE64: .4byte sub_813FE70 _0813FE68: .4byte gLastUsedItem -_0813FE6C: .4byte gBattleAnimEnemyMonIndex +_0813FE6C: .4byte gBattleAnimBankTarget thumb_func_end sub_813FDC0 thumb_func_start sub_813FE70 @@ -1690,7 +1690,7 @@ sub_813FE70: @ 813FE70 str r0, [r4, 0x1C] ldr r2, _0813FEBC @ =gSprites ldr r1, _0813FEC0 @ =gObjectBankIDs - ldr r0, _0813FEC4 @ =gBattleAnimEnemyMonIndex + ldr r0, _0813FEC4 @ =gBattleAnimBankTarget ldrb r0, [r0] adds r0, r1 ldrb r1, [r0] @@ -1709,7 +1709,7 @@ _0813FEB4: .4byte TaskDummy _0813FEB8: .4byte sub_813FEC8 _0813FEBC: .4byte gSprites _0813FEC0: .4byte gObjectBankIDs -_0813FEC4: .4byte gBattleAnimEnemyMonIndex +_0813FEC4: .4byte gBattleAnimBankTarget thumb_func_end sub_813FE70 thumb_func_start sub_813FEC8 @@ -1717,7 +1717,7 @@ sub_813FEC8: @ 813FEC8 push {r4-r7,lr} adds r7, r0, 0 ldr r1, _0813FF0C @ =gObjectBankIDs - ldr r0, _0813FF10 @ =gBattleAnimEnemyMonIndex + ldr r0, _0813FF10 @ =gBattleAnimBankTarget ldrb r0, [r0] adds r0, r1 ldrb r4, [r0] @@ -1750,7 +1750,7 @@ _0813FEFA: b _0813FFDC .align 2, 0 _0813FF0C: .4byte gObjectBankIDs -_0813FF10: .4byte gBattleAnimEnemyMonIndex +_0813FF10: .4byte gBattleAnimBankTarget _0813FF14: .4byte gTasks _0813FF18: cmp r0, 0x2 @@ -2451,7 +2451,7 @@ _08140450: .4byte sub_8140454 sub_8140454: @ 8140454 push {r4-r7,lr} adds r6, r0, 0 - ldr r7, _08140484 @ =gBattleAnimEnemyMonIndex + ldr r7, _08140484 @ =gBattleAnimBankTarget ldrh r0, [r6, 0x36] adds r0, 0x1 strh r0, [r6, 0x36] @@ -2471,7 +2471,7 @@ sub_8140454: @ 8140454 bl PlaySE b _081404CC .align 2, 0 -_08140484: .4byte gBattleAnimEnemyMonIndex +_08140484: .4byte gBattleAnimBankTarget _08140488: .4byte gDoingBattleAnim _0814048C: .4byte 0x00000173 _08140490: @@ -2690,7 +2690,7 @@ sub_81405F4: @ 81405F4 movs r2, 0x1 movs r3, 0x1C bl sub_814086C - ldr r0, _081406B0 @ =gBattleAnimEnemyMonIndex + ldr r0, _081406B0 @ =gBattleAnimBankTarget ldrb r1, [r0] movs r0, 0x1 movs r2, 0xE @@ -2699,7 +2699,7 @@ sub_81405F4: @ 81405F4 _08140646: ldr r6, _081406B4 @ =gSprites ldr r5, _081406B8 @ =gObjectBankIDs - ldr r4, _081406B0 @ =gBattleAnimEnemyMonIndex + ldr r4, _081406B0 @ =gBattleAnimBankTarget ldrb r0, [r4] adds r0, r5 ldrb r1, [r0] @@ -2747,7 +2747,7 @@ _08140646: .align 2, 0 _081406A8: .4byte sub_81406BC _081406AC: .4byte gLastUsedItem -_081406B0: .4byte gBattleAnimEnemyMonIndex +_081406B0: .4byte gBattleAnimBankTarget _081406B4: .4byte gSprites _081406B8: .4byte gObjectBankIDs thumb_func_end sub_81405F4 @@ -2772,7 +2772,7 @@ sub_81406BC: @ 81406BC _081406DA: ldr r4, _08140708 @ =gSprites ldr r3, _0814070C @ =gObjectBankIDs - ldr r2, _08140710 @ =gBattleAnimEnemyMonIndex + ldr r2, _08140710 @ =gBattleAnimBankTarget ldrb r0, [r2] adds r0, r3 ldrb r1, [r0] @@ -2794,7 +2794,7 @@ _081406DA: .align 2, 0 _08140708: .4byte gSprites _0814070C: .4byte gObjectBankIDs -_08140710: .4byte gBattleAnimEnemyMonIndex +_08140710: .4byte gBattleAnimBankTarget _08140714: ldr r6, _0814079C @ =0xfffffee0 adds r0, r6, 0 @@ -2824,7 +2824,7 @@ _08140734: beq _08140796 ldr r4, _081407A0 @ =gSprites ldr r3, _081407A4 @ =gObjectBankIDs - ldr r2, _081407A8 @ =gBattleAnimEnemyMonIndex + ldr r2, _081407A8 @ =gBattleAnimBankTarget ldrb r0, [r2] adds r0, r3 ldrb r1, [r0] @@ -2869,7 +2869,7 @@ _08140796: _0814079C: .4byte 0xfffffee0 _081407A0: .4byte gSprites _081407A4: .4byte gObjectBankIDs -_081407A8: .4byte gBattleAnimEnemyMonIndex +_081407A8: .4byte gBattleAnimBankTarget _081407AC: .4byte 0x02017840 _081407B0: .4byte sub_81405C8 _081407B4: .4byte gDoingBattleAnim @@ -4583,7 +4583,7 @@ sub_814151C: @ 814151C movs r0, 0 mov r8, r0 ldr r0, _08141550 @ =gObjectBankIDs - ldr r3, _08141554 @ =gBattleAnimPlayerMonIndex + ldr r3, _08141554 @ =gBattleAnimBankAttacker ldrb r2, [r3] adds r0, r2, r0 ldrb r6, [r0] @@ -4603,7 +4603,7 @@ sub_814151C: @ 814151C b _081416B6 .align 2, 0 _08141550: .4byte gObjectBankIDs -_08141554: .4byte gBattleAnimPlayerMonIndex +_08141554: .4byte gBattleAnimBankAttacker _08141558: .4byte gTasks _0814155C: cmp r0, 0x2 @@ -4738,7 +4738,7 @@ _08141654: adds r0, r1 ldrb r1, [r0, 0x8] strh r1, [r0, 0x8] - ldr r0, _08141690 @ =gBattleAnimPlayerMonIndex + ldr r0, _08141690 @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankSide lsls r0, 24 @@ -4759,7 +4759,7 @@ _08141654: .align 2, 0 _08141688: .4byte gSprites _0814168C: .4byte gTasks -_08141690: .4byte gBattleAnimPlayerMonIndex +_08141690: .4byte gBattleAnimBankAttacker _08141694: ldr r0, _081416C0 @ =gSprites adds r1, r4, r6 @@ -4816,7 +4816,7 @@ _081416EC: beq _0814177C b _081417B8 _081416F2: - ldr r0, _08141708 @ =gBattleAnimPlayerMonIndex + ldr r0, _08141708 @ =gBattleAnimBankAttacker ldrb r0, [r0] bl GetBankIdentity_permutated lsls r0, 24 @@ -4827,7 +4827,7 @@ _081416F2: ldr r2, _08141710 @ =0x00003f42 b _08141718 .align 2, 0 -_08141708: .4byte gBattleAnimPlayerMonIndex +_08141708: .4byte gBattleAnimBankAttacker _0814170C: .4byte REG_BLDCNT _08141710: .4byte 0x00003f42 _08141714: @@ -4884,7 +4884,7 @@ _08141744: _08141778: .4byte REG_BLDALPHA _0814177C: ldr r1, _081417C0 @ =gObjectBankIDs - ldr r3, _081417C4 @ =gBattleAnimPlayerMonIndex + ldr r3, _081417C4 @ =gBattleAnimBankAttacker ldrb r0, [r3] adds r0, r1 ldrb r1, [r0] @@ -4918,7 +4918,7 @@ _081417B8: bx r0 .align 2, 0 _081417C0: .4byte gObjectBankIDs -_081417C4: .4byte gBattleAnimPlayerMonIndex +_081417C4: .4byte gBattleAnimBankAttacker _081417C8: .4byte gSprites _081417CC: .4byte 0x06010000 _081417D0: .4byte 0x040000d4 @@ -4931,7 +4931,7 @@ sub_81417D8: @ 81417D8 lsls r0, 24 lsrs r0, 24 ldr r3, _081417FC @ =gBattleAnimArgs - ldr r1, _08141800 @ =gBattleAnimPlayerMonIndex + ldr r1, _08141800 @ =gBattleAnimBankAttacker ldrb r1, [r1] lsls r1, 2 ldr r2, _08141804 @ =0x02017800 @@ -4945,7 +4945,7 @@ sub_81417D8: @ 81417D8 bx r0 .align 2, 0 _081417FC: .4byte gBattleAnimArgs -_08141800: .4byte gBattleAnimPlayerMonIndex +_08141800: .4byte gBattleAnimBankAttacker _08141804: .4byte 0x02017800 thumb_func_end sub_81417D8 @@ -4954,7 +4954,7 @@ sub_8141808: @ 8141808 push {lr} lsls r0, 24 lsrs r0, 24 - ldr r2, _08141820 @ =gBattleAnimEnemyMonIndex + ldr r2, _08141820 @ =gBattleAnimBankTarget ldr r1, _08141824 @ =gEffectBank ldrb r1, [r1] strb r1, [r2] @@ -4962,7 +4962,7 @@ sub_8141808: @ 8141808 pop {r0} bx r0 .align 2, 0 -_08141820: .4byte gBattleAnimEnemyMonIndex +_08141820: .4byte gBattleAnimBankTarget _08141824: .4byte gEffectBank thumb_func_end sub_8141808 @@ -4994,7 +4994,7 @@ sub_8141828: @ 8141828 bl GetMonData adds r4, r0, 0 adds r0, r6, 0 - bl b_side_obj__get_some_boolean + bl IsAnimBankSpriteVisible lsls r0, 24 cmp r0, 0 beq _081418FC @@ -5511,7 +5511,7 @@ sub_8141C30: @ 8141C30 adds r0, r4, 0 bl sub_80786EC ldr r1, _08141CAC @ =gObjectBankIDs - ldr r0, _08141CB0 @ =gBattleAnimPlayerMonIndex + ldr r0, _08141CB0 @ =gBattleAnimBankAttacker ldrb r0, [r0] adds r0, r1 ldrb r1, [r0] @@ -5531,7 +5531,7 @@ sub_8141C30: @ 8141C30 _08141CA4: .4byte gBattleAnimArgs _08141CA8: .4byte 0x0000ffe0 _08141CAC: .4byte gObjectBankIDs -_08141CB0: .4byte gBattleAnimPlayerMonIndex +_08141CB0: .4byte gBattleAnimBankAttacker _08141CB4: .4byte gSprites _08141CB8: .4byte sub_8141CBC thumb_func_end sub_8141C30 @@ -5542,7 +5542,7 @@ sub_8141CBC: @ 8141CBC adds r3, r0, 0 ldr r2, _08141CE4 @ =gSprites ldr r1, _08141CE8 @ =gObjectBankIDs - ldr r0, _08141CEC @ =gBattleAnimPlayerMonIndex + ldr r0, _08141CEC @ =gBattleAnimBankAttacker ldrb r0, [r0] adds r0, r1 ldrb r1, [r0] @@ -5562,7 +5562,7 @@ _08141CE0: .align 2, 0 _08141CE4: .4byte gSprites _08141CE8: .4byte gObjectBankIDs -_08141CEC: .4byte gBattleAnimPlayerMonIndex +_08141CEC: .4byte gBattleAnimBankAttacker _08141CF0: .4byte sub_8141CF4 thumb_func_end sub_8141CBC @@ -5598,7 +5598,7 @@ sub_8141D20: @ 8141D20 adds r4, r0, 0 ldr r5, _08141D70 @ =gSprites ldr r3, _08141D74 @ =gObjectBankIDs - ldr r2, _08141D78 @ =gBattleAnimPlayerMonIndex + ldr r2, _08141D78 @ =gBattleAnimBankAttacker ldrb r0, [r2] adds r0, r3 ldrb r1, [r0] @@ -5635,7 +5635,7 @@ _08141D68: .align 2, 0 _08141D70: .4byte gSprites _08141D74: .4byte gObjectBankIDs -_08141D78: .4byte gBattleAnimPlayerMonIndex +_08141D78: .4byte gBattleAnimBankAttacker thumb_func_end sub_8141D20 thumb_func_start sub_8141D7C @@ -5646,11 +5646,11 @@ sub_8141D7C: @ 8141D7C lsrs r4, 24 movs r0, 0 bl GetBankByPlayerAI - ldr r1, _08141DA4 @ =gBattleAnimPlayerMonIndex + ldr r1, _08141DA4 @ =gBattleAnimBankAttacker strb r0, [r1] movs r0, 0x1 bl GetBankByPlayerAI - ldr r1, _08141DA8 @ =gBattleAnimEnemyMonIndex + ldr r1, _08141DA8 @ =gBattleAnimBankTarget strb r0, [r1] adds r0, r4, 0 bl DestroyAnimVisualTask @@ -5658,8 +5658,8 @@ sub_8141D7C: @ 8141D7C pop {r0} bx r0 .align 2, 0 -_08141DA4: .4byte gBattleAnimPlayerMonIndex -_08141DA8: .4byte gBattleAnimEnemyMonIndex +_08141DA4: .4byte gBattleAnimBankAttacker +_08141DA8: .4byte gBattleAnimBankTarget thumb_func_end sub_8141D7C thumb_func_start sub_8141DAC @@ -5721,20 +5721,20 @@ sub_8141E10: @ 8141E10 push {lr} lsls r0, 24 lsrs r0, 24 - ldr r2, _08141E2C @ =gBattleAnimPlayerMonIndex + ldr r2, _08141E2C @ =gBattleAnimBankAttacker ldr r1, _08141E30 @ =0x02017840 ldrh r1, [r1] strb r1, [r2] - ldr r2, _08141E34 @ =gBattleAnimEnemyMonIndex + ldr r2, _08141E34 @ =gBattleAnimBankTarget lsrs r1, 8 strb r1, [r2] bl DestroyAnimVisualTask pop {r0} bx r0 .align 2, 0 -_08141E2C: .4byte gBattleAnimPlayerMonIndex +_08141E2C: .4byte gBattleAnimBankAttacker _08141E30: .4byte 0x02017840 -_08141E34: .4byte gBattleAnimEnemyMonIndex +_08141E34: .4byte gBattleAnimBankTarget thumb_func_end sub_8141E10 .align 2, 0 @ Don't pad with nop. diff --git a/asm/battle_tower.s b/asm/battle_tower.s index 65fbd0c05..cd8eede60 100644 --- a/asm/battle_tower.s +++ b/asm/battle_tower.s @@ -1522,7 +1522,7 @@ _081350AE: lsls r0, 16 lsrs r0, 16 movs r1, 0x1 - bl GetNationalPokedexFlag + bl GetSetPokedexFlag lsls r0, 24 cmp r0, 0 beq _081350C6 @@ -1555,7 +1555,7 @@ AppendBattleTowerBannedSpeciesName: @ 81350E0 lsls r0, 16 lsrs r0, 16 movs r1, 0x1 - bl GetNationalPokedexFlag + bl GetSetPokedexFlag lsls r0, 24 cmp r0, 0 beq _081351E6 diff --git a/asm/cable_car.s b/asm/cable_car.s index e4d989844..385cd404d 100644 --- a/asm/cable_car.s +++ b/asm/cable_car.s @@ -256,22 +256,22 @@ _081233EC: ldr r0, _0812345C @ =gCableCarMtChimneyTilemap ldr r4, _08123460 @ =0x02019000 adds r1, r4, 0 - bl sub_800D238 + bl LZDecompressWram ldr r0, _08123464 @ =gCableCarTreeTilemap movs r2, 0xB4 lsls r2, 1 adds r1, r4, r2 - bl sub_800D238 + bl LZDecompressWram ldr r0, _08123468 @ =gCableCarMountainTilemap movs r2, 0xA5 lsls r2, 3 adds r1, r4, r2 - bl sub_800D238 + bl LZDecompressWram ldr r0, _0812346C @ =gCableCarPylonStemTilemap ldr r1, _08123470 @ =0x000009d8 adds r4, r1 adds r1, r4, 0 - bl sub_800D238 + bl LZDecompressWram ldr r0, _08123474 @ =gCableCarBG_Pal movs r1, 0 movs r2, 0x80 diff --git a/asm/contest.s b/asm/contest.s index 4a85f3d16..c5dfe3e2e 100644 --- a/asm/contest.s +++ b/asm/contest.s @@ -6904,7 +6904,7 @@ sub_80AE9FC: @ 80AE9FC adds r0, r5, 0 mov r1, r8 adds r2, r6, 0 - bl species_and_otid_get_pal + bl GetMonSpritePalFromOtIdPersonality movs r1, 0x90 lsls r1, 1 movs r2, 0x20 diff --git a/asm/contest_link_80C2020.s b/asm/contest_link_80C2020.s index 93dd26eee..b91a9665b 100644 --- a/asm/contest_link_80C2020.s +++ b/asm/contest_link_80C2020.s @@ -1361,7 +1361,7 @@ _080C2B14: adds r0, r6, 0 ldr r1, [sp, 0xC] adds r2, r4, 0 - bl sub_80409C8 + bl GetMonSpritePalStructFromOtIdPersonality adds r4, r0, 0 bl LoadCompressedObjectPalette adds r0, r6, 0 @@ -1601,7 +1601,7 @@ _080C2D42: lsls r0, 16 lsrs r0, 16 movs r1, 0x2 - bl GetNationalPokedexFlag + bl GetSetPokedexFlag adds r5, 0x40 subs r4, 0x1 cmp r4, 0 diff --git a/asm/easy_chat.s b/asm/easy_chat.s index 6b85e1e76..7bb496641 100644 --- a/asm/easy_chat.s +++ b/asm/easy_chat.s @@ -9975,7 +9975,7 @@ _080EAE50: lsls r0, 16 lsrs r0, 16 movs r1, 0 - bl GetNationalPokedexFlag + bl GetSetPokedexFlag b _080EAE7C _080EAE62: ldr r0, _080EAE74 @ =gUnknown_083DB694 diff --git a/asm/macros/event.inc b/asm/macros/event.inc index 9fddd9194..960b300b7 100644 --- a/asm/macros/event.inc +++ b/asm/macros/event.inc @@ -1,10 +1,10 @@ @ Does nothing. - .macro snop + .macro nop .byte 0x00 .endm @ Does nothing. - .macro snop1 + .macro nop1 .byte 0x01 .endm @@ -25,27 +25,27 @@ .endm @ Jumps to destination and continues script execution from there. - .macro jump destination + .macro goto destination .byte 0x05 .4byte \destination .endm @ If the result of the last comparison matches condition (see Comparison operators), jumps to destination and continues script execution from there. - .macro jumpif condition, destination + .macro goto_if condition, destination .byte 0x06 .byte \condition .4byte \destination .endm @ If the result of the last comparison matches condition (see Comparison operators), calls destination. - .macro callif condition, destination + .macro call_if condition, destination .byte 0x07 .byte \condition .4byte \destination .endm @ Jumps to the standard function at index function. - .macro jumpstd function + .macro gotostd function .byte 0x08 .byte \function .endm @@ -57,58 +57,58 @@ .endm @ If the result of the last comparison matches condition (see Comparison operators), jumps to the standard function at index function. - .macro jumpstdif condition, function + .macro gotostd_if condition, function .byte 0x0a .byte \condition .byte \function .endm @ If the result of the last comparison matches condition (see Comparison operators), calls the standard function at index function. - .macro callstdif condition, function + .macro callstd_if condition, function .byte 0x0b .byte \condition .byte \function .endm @ Executes a script stored in a default RAM location. - .macro jumpram + .macro gotoram .byte 0x0c .endm @ Terminates script execution and "resets the script RAM". - .macro die + .macro killscript .byte 0x0d .endm - @ Pads the specified value to a dword, and then writes that dword to a predefined address (0x0203AAA8). - .macro setbyte value + @ Sets mystery event status + .macro setmysteryeventstatus value .byte 0x0e .byte \value .endm - @ Sets the specified script bank to value. - .macro loadptr destination, value + @ Sets the specified script bank to immediate value. + .macro loadword destination, value .byte 0x0f .byte \destination .4byte \value .endm - @ Sets the specified script bank to value. - .macro setbufferbyte destination, value + @ Sets the specified script bank to immediate value. + .macro loadbyte destination, value .byte 0x10 .byte \destination .byte \value .endm @ Sets the byte at offset to value. - .macro writebytetooffset value, offset + .macro writebytetoaddr value, offset .byte 0x11 .byte \value .4byte \offset .endm @ Copies the byte value at source into the specified script bank. - .macro loadbytefrompointer destination, source + .macro loadbytefromaddr destination, source .byte 0x12 .byte \destination .4byte \source @@ -122,7 +122,7 @@ .endm @ Copies the contents of bank source into bank destination. - .macro copybuffers destination, source + .macro copylocal destination, source .byte 0x14 .byte \destination .byte \source @@ -171,71 +171,83 @@ .endm @ Compares the values of script banks a and b, after forcing the values to bytes. - .macro comparebuffers byte1, byte2 + .macro compare_local_to_local byte1, byte2 .byte 0x1b .byte \byte1 .byte \byte2 .endm @ Compares the least-significant byte of the value of script bank a to a fixed byte value (b). - .macro comparebuffertobyte a, b + .macro compare_local_to_value a, b .byte 0x1c .byte \a .byte \b .endm @ Compares the least-significant byte of the value of script bank a to the byte located at offset b. - .macro comparebuffertoptrbyte a, b + .macro compare_local_to_addr a, b .byte 0x1d .byte \a .4byte \b .endm @ Compares the byte located at offset a to the least-significant byte of the value of script bank b. - .macro compareptrbytetobuffer a, b + .macro compare_addr_to_local a, b .byte 0x1e .4byte \a .byte \b .endm @ Compares the byte located at offset a to a fixed byte value (b). - .macro compareptrbytetobyte a, b + .macro compare_addr_to_value a, b .byte 0x1f .4byte \a .byte \b .endm @ Compares the byte located at offset a to the byte located at offset b. - .macro compareptrbytes a, b + .macro compare_addr_to_addr a, b .byte 0x20 .4byte \a .4byte \b .endm @ Compares the value of `var` to a fixed word value (b). - .macro compare var, value + .macro compare_var_to_value var, value .byte 0x21 .2byte \var .2byte \value .endm @ Compares the value of `var` to the value of `var2`. - .macro comparevars var1, var2 + .macro compare_var_to_var var1, var2 .byte 0x22 .2byte \var1 .2byte \var2 .endm - @ Calls the ASM routine stored at code. Script execution is blocked until the ASM returns (bx lr, mov pc, lr, etc.). Remember to add 1 to the offset when calling THUMB code. - .macro callasm code + @ Generic compare macro which attempts to deduce argument types based on their values + @ Any values between 0x4000 to 0x4FFF and 0x8000 to 0x8FFF are considered event variable identifiers + .macro compare arg1, arg2 + .if ((\arg1 >> 12) == 4 || (\arg1 >> 12) == 8) && ((\arg2 >> 12) == 4 || (\arg2 >> 12) == 8) + compare_var_to_var \arg1, \arg2 + .elseif ((\arg1 >> 12) == 4 || (\arg1 >> 12) == 8) && (\arg2 >= 0 && \arg2 <= 0xFFFF) + compare_var_to_value \arg1, \arg2 + .else + .error "Invalid arguments for 'compare'" + .endif + .endm + + @ Calls the native C function stored at `func`. + .macro callnative func .byte 0x23 - .4byte \code + .4byte \func .endm - @ Replaces a pointer in the script engine RAM with asm_pointer. - .macro jumpasm asm_pointer + @ Replaces the script with the function stored at `func`. Execution returns to the bytecode script when func returns TRUE. + .macro gotonative func .byte 0x24 - .4byte \asm_pointer + .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. @@ -245,7 +257,7 @@ .endm @ Calls a special function. That function's output (if any) will be written to the variable you specify. - .macro specialval output, function + .macro specialvar output, function .byte 0x26 .2byte \output .2byte SPECIAL_\function @@ -257,7 +269,7 @@ .endm @ Blocks script execution for time (frames? milliseconds?). - .macro pause time + .macro delay time .byte 0x28 .2byte \time .endm @@ -281,33 +293,35 @@ .endm @ In FireRed, this command is a nop. - .macro compareflags + .macro initclock hour minute .byte 0x2c + .byte \hour + .byte \minute .endm @ In FireRed, this command is a nop. - .macro checkdailyflags + .macro dodailyevents .byte 0x2d .endm @ Resets the values of variables 0x8000, 0x8001, and 0x8002. Related to RTC in RSE? - .macro resetvars + .macro gettime .byte 0x2e .endm @ Plays the specified (sound_number) sound. Only one sound may play at a time, with newer ones interrupting older ones. - .macro playsfx sound_number + .macro playse sound_number .byte 0x2f .2byte \sound_number .endm @ Blocks script execution until the currently-playing sound (triggered by sound) finishes playing. - .macro checksound + .macro waitse .byte 0x30 .endm @ Plays the specified (fanfare_number) fanfare. - .macro fanfare fanfare_number + .macro playfanfare fanfare_number .byte 0x31 .2byte \fanfare_number .endm @@ -318,37 +332,37 @@ .endm @ Plays the specified (song_number) song. The byte is apparently supposed to be 0x00. - .macro playmusic song_number, unknown + .macro playbgm song_number, unknown .byte 0x33 .2byte \song_number .byte \unknown .endm @ Plays the specified (song_number) song. - .macro playmusicbattle song_number + .macro savebgm song_number .byte 0x34 .2byte \song_number .endm @ Crossfades the currently-playing song into the map's default song. - .macro fadedefault + .macro fadedefaultbgm .byte 0x35 .endm @ Crossfades the currently-playng song into the specified (song_number) song. - .macro fademusic song_number + .macro fadenewbgm song_number .byte 0x36 .2byte \song_number .endm @ Fades out the currently-playing song. - .macro fadeout speed + .macro fadeoutbgm speed .byte 0x37 .byte \speed .endm @ Fades the currently-playing song back in. - .macro fadein speed + .macro fadeinbgm speed .byte 0x38 .byte \speed .endm @@ -363,7 +377,7 @@ .endm @ Clone of warp that does not play a sound effect. - .macro warpmuted map, warp, X, Y + .macro warpsilent map, warp, X, Y .byte 0x3a map \map .byte \warp @@ -372,7 +386,7 @@ .endm @ Clone of warp that uses "a walking effect". - .macro warpwalk map, warp, X, Y + .macro warpdoor map, warp, X, Y .byte 0x3b map \map .byte \warp @@ -396,7 +410,7 @@ .endm @ Clone of warp. Used by an (unused?) Safari Zone script to return the player to the gatehouse and end the Safari Game. - .macro warp3 map, warp, X, Y + .macro setwarp map, warp, X, Y .byte 0x3e map \map .byte \warp @@ -405,7 +419,7 @@ .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). - .macro warpplace map, warp, X, Y + .macro setdynamicwarp map, warp, X, Y .byte 0x3f map \map .byte \warp @@ -414,7 +428,7 @@ .endm @ Clone of warp3, except that this writes data to different offsets... - .macro warp4 map, warp, X, Y + .macro setdivewarp map, warp, X, Y .byte 0x40 map \map .byte \warp @@ -423,7 +437,7 @@ .endm @ Clone of warp3, except that this writes data to different offsets... - .macro warp5 map, warp, X, Y + .macro setholewarp map, warp, X, Y .byte 0x41 map \map .byte \warp @@ -504,7 +518,7 @@ .endm @ In FireRed, this command is a nop. (The argument is read, but not used for anything.) - .macro testdecor a + .macro hasdecor a .byte 0x4d .2byte \a .endm @@ -516,148 +530,146 @@ .endm @ Applies the movement data at movements to the specified (index) Person event. Also closes any standard message boxes that are still open. - .macro move index, movements - .byte 0x4f - .2byte \index - .4byte \movements - .endm - - @ Apparent clone of applymovement. Oddly, it doesn't seem to work at all if applied to any Person other than the player (0xFF), and the X and Y arguments don't seem to do anything. @ 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. - .macro movecoords variable, movements, x, y - .byte 0x50 - .2byte \variable - .4byte \movements - .byte \x - .byte \y + .macro applymovement index, movements, mapGroup, mapNum + .ifb \mapGroup + .byte 0x4f + .2byte \index + .4byte \movements + .else + .byte 0x50 + .2byte \index + .4byte \movements + .byte \mapGroup + .byte \mapNum + .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. - .macro waitmove index - .byte 0x51 - .2byte \index - .endm - - @ Apparent clone of waitmovement. Oddly, it doesn't seem to work at all if applied to any Person other than the player (0xFF), and the X and Y arguments don't seem to do anything. - .macro waitmovexy index, X, Y - .byte 0x52 - .2byte \index - .byte \X - .byte \Y - .endm - - @ Attempts to hide the specified (local_ID, a local ID) Person event on the current 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. - .macro disappear local_ID - .byte 0x53 - .2byte \local_ID - .endm - - @ Clone of hidesprite that also moves the Person? Test it! - .macro disappearxy index, X, Y - .byte 0x54 - .2byte \index - .byte \X - .byte \Y - .endm - - .macro reappear word - .byte 0x55 - .2byte \word - .endm - - .macro reappearxy word, byte1, byte2 - .byte 0x56 - .2byte \word - .byte \byte1 - .byte \byte2 - .endm - - .macro movesprite word1, word2, word3 - .byte 0x57 - .2byte \word1 - .2byte \word2 - .2byte \word3 - .endm - - .macro spritevisible word, byte1, byte2 - .byte 0x58 - .2byte \word - .byte \byte1 - .byte \byte2 - .endm - - .macro spriteinvisible word, byte1, byte2 - .byte 0x59 - .2byte \word - .byte \byte1 - .byte \byte2 + .macro waitmovement index, mapBank, mapNum + .ifb \mapBank + .byte 0x51 + .2byte \index + .else + .byte 0x52 + .2byte \index + .byte \mapBank + .byte \mapNum + .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. + @ If no map is specified, then the current map is used + .macro removeobject localId, mapGroup, mapNum + .ifb \mapGroup + .byte 0x53 + .2byte \localId + .else + .byte 0x54 + .2byte \localId + .byte \mapGroup + .byte \mapNum + .endif + .endm + + .macro addobject localId, mapGroup, mapNum + .ifb \mapGroup + .byte 0x55 + .2byte \localId + .else + .byte 0x56 + .2byte \localId + .byte \mapGroup + .byte \mapNum + .endif + .endm + + .macro setobjectxy word1, word2, word3 + .byte 0x57 + .2byte \word1 + .2byte \word2 + .2byte \word3 + .endm + + .macro showobject word, byte1, byte2 + .byte 0x58 + .2byte \word + .byte \byte1 + .byte \byte2 + .endm + + .macro hideobject word, byte1, byte2 + .byte 0x59 + .2byte \word + .byte \byte1 + .byte \byte2 .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. .macro faceplayer - .byte 0x5a + .byte 0x5a .endm - .macro spriteface word, byte - .byte 0x5b - .2byte \word - .byte \byte + .macro turnobject word, byte + .byte 0x5b + .2byte \word + .byte \byte .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 reptrainerbattle + .macro battlebegin .byte 0x5d .endm - .macro endtrainerbattle + .macro ontrainerbattleend .byte 0x5e .endm - .macro endtrainerbattle2 + .macro ontrainerbattleendgoto .byte 0x5f .endm @@ -668,37 +680,37 @@ .endm @ Sets Flag (trainer + 0x500). (I didn't make a mistake. The command names actually are backwards.) - .macro cleartrainerflag trainer + .macro settrainerflag trainer .byte 0x61 .2byte \trainer .endm @ Clears Flag (trainer + 0x500). (I didn't make a mistake. The command names actually are backwards.) - .macro settrainerflag trainer + .macro cleartrainerflag trainer .byte 0x62 .2byte \trainer .endm - .macro movespriteperm word1, word2, word3 + .macro setobjectxyperm word1, word2, word3 .byte 0x63 .2byte \word1 .2byte \word2 .2byte \word3 .endm - .macro moveoffscreen word + .macro moveobjectoffscreen word .byte 0x64 .2byte \word .endm - .macro spritebehave word, byte + .macro setobjectmovementtype word, byte .byte 0x65 .2byte \word .byte \byte .endm @ If a standard message box (or its text) is being drawn on-screen, this command blocks script execution until the box and its text have been fully drawn. - .macro waittext + .macro waitmessage .byte 0x66 .endm @@ -709,7 +721,7 @@ .endm @ Holds the current message box open until the player presses a key. The message box is then closed. - .macro closebutton + .macro closemessage .byte 0x68 .endm @@ -755,7 +767,7 @@ .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 multichoicedef X, Y, list, default, B + .macro multichoicedefault X, Y, list, default, B .byte 0x70 .byte \X .byte \Y @@ -765,7 +777,7 @@ .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 multichoicerow X, Y, list, per_row, B + .macro multichoicegrid X, Y, list, per_row, B .byte 0x71 .byte \X .byte \Y @@ -774,7 +786,7 @@ .byte \B .endm - .macro showbox byte1, byte2, byte3, byte4 + .macro drawbox byte1, byte2, byte3, byte4 .byte 0x72 .byte \byte1 .byte \byte2 @@ -782,7 +794,7 @@ .byte \byte4 .endm - .macro hidebox byte1, byte2, byte3, byte4 + .macro erasebox byte1, byte2, byte3, byte4 .byte 0x73 .byte \byte1 .byte \byte2 @@ -790,7 +802,7 @@ .byte \byte4 .endm - .macro clearbox byte1, byte2, byte3, byte4 + .macro drawboxtext byte1, byte2, byte3, byte4 .byte 0x74 .byte \byte1 .byte \byte2 @@ -799,7 +811,7 @@ .endm @ Displays a box containing the front sprite for the specified (species) Pokmon species. - .macro showpokepic species, X, Y + .macro drawpokepic species, X, Y .byte 0x75 .2byte \species .byte \X @@ -807,24 +819,24 @@ .endm @ Hides all boxes displayed with showpokepic. - .macro hidepokepic + .macro erasepokepic .byte 0x76 .endm @ In FireRed, this command is a nop. (The argument is discarded.) - .macro showcontestwinner a + .macro drawcontestwinner a .byte 0x77 .byte \a .endm @ Displays the string at pointer as braille text in a standard message box. The string must be formatted to use braille characters. - .macro braillemsg text + .macro braillemessage text .byte 0x78 .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 givepokemon species, level, item, unknown1, unknown2, unknown3 + .macro givepoke species, level, item, unknown1, unknown2, unknown3 .byte 0x79 .2byte \species .byte \level @@ -847,68 +859,68 @@ .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 checkattack index + .macro checkpokemove index .byte 0x7c .2byte \index .endm @ Writes the name of the Pokmon at index species to the specified buffer. - .macro bufferpoke out, species + .macro getspeciesname 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 bufferfirstpoke out + .macro getfirstpartypokename 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 bufferpartypoke out, slot + .macro getpartypokename 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 bufferitem out, item + .macro getitemname 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 bufferdecor a, b + .macro getdecorname a, b .byte 0x81 .byte \a .2byte \b .endm @ Writes the name of the attack at index attack to the specified buffer. - .macro bufferattack out, attack + .macro getmovename out, attack .byte 0x82 .byte \out .2byte \attack .endm @ Converts the value of input to a decimal string, and writes that string to the specified buffer. - .macro buffernum out, input + .macro getnumberstring 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 bufferstd out, index + .macro getstdstring out, index .byte 0x84 .byte \out .2byte \index .endm @ Copies the string at offset to the specified buffer. - .macro buffertext out, offset + .macro getstring out, offset .byte 0x85 .byte \out .4byte \offset @@ -932,13 +944,13 @@ .4byte \products .endm - .macro pokecasino word + .macro playslotmachine word .byte 0x89 .2byte \word .endm @ In FireRed, this command is a nop. - .macro event_8a byte1, byte2, byte3 + .macro plantberrytree byte1, byte2, byte3 .byte 0x8a .byte \byte1, \byte2, \byte3 .endm @@ -977,7 +989,7 @@ .endm @ If check is 0x00, this command subtracts value from the player's money. - .macro paymoney value, check + .macro takemoney value, check .byte 0x91 .4byte \value .byte \check @@ -991,28 +1003,28 @@ .endm @ Spawns a secondary box showing how much money the player has. - .macro showmoney X, Y + .macro showmoneybox X, Y .byte 0x93 .byte \X .byte \Y .endm @ Hides the secondary box spawned by showmoney. - .macro hidemoney X, Y + .macro hidemoneybox X, Y .byte 0x94 .byte \X .byte \Y .endm @ Updates the secondary box spawned by showmoney. (What does it do with its arguments?) - .macro updatemoney X, Y + .macro updatemoneybox X, Y .byte 0x95 .byte \X .byte \Y .endm @ In FireRed, this command is a nop. - .macro event_96 word + .macro getpricereduction word .byte 0x96 .2byte \word .endm @@ -1029,36 +1041,36 @@ .byte \byte2 .endm - .macro darken word + .macro setdarklevel word .byte 0x99 .2byte \word .endm - .macro lighten byte + .macro animdarklevel byte .byte 0x9a .byte \byte .endm - .macro message2 pointer + .macro messageautoscroll pointer .byte 0x9b .4byte \pointer .endm @ Executes the specified field move animation. - .macro doanimation animation + .macro dofieldeffect animation .byte 0x9c .2byte \animation .endm @ Tells the game which party Pokmon to use for the next field move animation. - .macro setanimation animation, slot + .macro setfieldeffect animation, slot .byte 0x9d .byte \animation .2byte \slot .endm @ Blocks script execution until all playing field move animations complete. - .macro checkanimation animation + .macro waitfieldeffect animation .byte 0x9e .2byte \animation .endm @@ -1070,12 +1082,12 @@ .endm @ Checks the player's gender. If male, then 0x0000 is stored in variable 0x800D (LASTRESULT). If female, then 0x0001 is stored in LASTRESULT. - .macro checkgender + .macro checkplayergender .byte 0xa0 .endm @ Plays the specified (species) Pokmon's cry. You can use waitcry to block script execution until the sound finishes. - .macro pokecry species, effect + .macro playpokecry species, effect .byte 0xa1 .2byte \species .2byte \effect @@ -1112,12 +1124,12 @@ .byte \subroutine .endm - .macro setmapfooter word + .macro setmaplayoutindex word .byte 0xa7 .2byte \word .endm - .macro spritelevelup word, byte1, byte2, byte3 + .macro setobjectpriority word, byte1, byte2, byte3 .byte 0xa8 .2byte \word .byte \byte1 @@ -1125,14 +1137,14 @@ .byte \byte3 .endm - .macro restorespritelevel word, byte1, byte2 + .macro resetobjectpriority word, byte1, byte2 .byte 0xa9 .2byte \word .byte \byte1 .byte \byte2 .endm - .macro createvsprite byte1, byte2, word1, word2, byte3, byte4 + .macro createvobject byte1, byte2, word1, word2, byte3, byte4 .byte 0xaa .byte \byte1 .byte \byte2 @@ -1142,52 +1154,52 @@ .byte \byte4 .endm - .macro vspriteface byte1, byte2 + .macro turnvobject byte1, byte2 .byte 0xab .byte \byte1 .byte \byte2 .endm @ Queues the opening of the door tile at (X, Y) with an animation. - .macro setdooropened X, Y + .macro opendoor X, Y .byte 0xac .2byte \X .2byte \Y .endm @ Queues the closing of the door tile at (X, Y) with an animation. - .macro setdoorclosed X, Y + .macro closedoor X, Y .byte 0xad .2byte \X .2byte \Y .endm @ Executes the state changes queued with setdooropened, setdoorclosed, setdooropened2, and setdoorclosed2. - .macro doorchange + .macro waitdooranim .byte 0xae .endm @ Queues the opening of the door tile at (X, Y) without an animation. - .macro setdooropened2 X, Y + .macro setdooropen X, Y .byte 0xaf .2byte \X .2byte \Y .endm @ Queues the closing of the door tile at (X, Y) without an animation. - .macro setdoorclosed2 X, Y + .macro setdoorclosed X, Y .byte 0xb0 .2byte \X .2byte \Y .endm @ In FireRed, this command is a nop. - .macro event_b1 + .macro addelevmenuitem .byte 0xb1 .endm @ In FireRed, this command is a nop. - .macro event_b2 + .macro showelevmenu .byte 0xb2 .endm @@ -1201,7 +1213,7 @@ .2byte \word .endm - .macro removecoins word + .macro takecoins word .byte 0xb5 .2byte \word .endm @@ -1225,7 +1237,7 @@ .2byte \word .endm - .macro vjump pointer + .macro vgoto pointer .byte 0xb9 .4byte \pointer .endm @@ -1235,63 +1247,63 @@ .4byte \pointer .endm - .macro if5 byte, pointer + .macro vgoto_if byte, pointer .byte 0xbb .byte \byte .4byte \pointer .endm - .macro if6 byte, pointer + .macro vcall_if byte, pointer .byte 0xbc .byte \byte .4byte \pointer .endm - .macro vtext pointer + .macro vmessage pointer .byte 0xbd .4byte \pointer .endm - .macro vloadptr pointer + .macro vloadword pointer .byte 0xbe .4byte \pointer .endm - .macro vbuffer byte, pointer + .macro vgetstring byte, pointer .byte 0xbf .byte \byte .4byte \pointer .endm @ Spawns a secondary box showing how many Coins the player has. - .macro showcoins X, Y + .macro showcoinsbox X, Y .byte 0xc0 .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 hidecoins X, Y + .macro hidecoinsbox X, Y .byte 0xc1 .byte \X .byte \Y .endm @ Updates the secondary box spawned by showcoins. (What does it do with its arguments?) - .macro updatecoins X, Y + .macro updatecoinsbox X, Y .byte 0xc2 .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 inccounter a + .macro incrementgamestat a .byte 0xc3 .byte \a .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 warp6 map, warp, X, Y + .macro setescapewarp map, warp, X, Y .byte 0xc4 map \map .byte \warp @@ -1475,8 +1487,8 @@ @ Supplementary - .macro jumpeq dest - jumpif 1, \dest + .macro goto_if_eq dest + goto_if 1, \dest .endm .macro switch var @@ -1484,12 +1496,12 @@ .endm .macro case condition, dest - compare 0x8000, \condition - jumpeq \dest + compare_var_to_value 0x8000, \condition + goto_if_eq \dest .endm .macro msgbox text, type=4 - loadptr 0, \text + loadword 0, \text callstd \type .endm diff --git a/asm/pokemon_storage_system.s b/asm/pokemon_storage_system.s index db16c2788..eaf44749b 100644 --- a/asm/pokemon_storage_system.s +++ b/asm/pokemon_storage_system.s @@ -12958,7 +12958,7 @@ _0809C08C: adds r1, r6, r2 str r0, [r1] adds r0, r7, 0 - bl pokemon_get_pal + bl GetMonSpritePal ldr r2, _0809C11C @ =0x000011e8 adds r1, r6, r2 str r0, [r1] @@ -13031,7 +13031,7 @@ _0809C120: str r2, [r4] ldrh r0, [r5] mov r1, r9 - bl species_and_otid_get_pal + bl GetMonSpritePalFromOtIdPersonality ldr r2, _0809C1D0 @ =0x000011e8 adds r1, r6, r2 str r0, [r1] diff --git a/asm/pokemon_summary_screen.s b/asm/pokemon_summary_screen.s index fea619ac8..859fd177f 100644 --- a/asm/pokemon_summary_screen.s +++ b/asm/pokemon_summary_screen.s @@ -3859,7 +3859,7 @@ _0809F718: adds r1, r0, 0 adds r0, r5, 0 adds r2, r6, 0 - bl sub_80409C8 + bl GetMonSpritePalStructFromOtIdPersonality adds r4, r0, 0 bl LoadCompressedObjectPalette ldrh r0, [r4, 0x4] @@ -7620,7 +7620,7 @@ sub_80A1808: @ 80A1808 ldr r0, _080A1868 @ =sub_80A1888 str r0, [r4] adds r0, r6, 0 - bl sub_8040A3C + bl IsPokeSpriteNotFlipped lsls r0, 24 cmp r0, 0 bne _080A186C diff --git a/asm/pokenav.s b/asm/pokenav.s index 1062abc48..a4d585815 100644 --- a/asm/pokenav.s +++ b/asm/pokenav.s @@ -17787,7 +17787,7 @@ sub_80F4824: @ 80F4824 adds r0, r5, 0 mov r1, r8 adds r2, r4, 0 - bl species_and_otid_get_pal + bl GetMonSpritePalFromOtIdPersonality mov r2, r9 lsls r1, r2, 7 adds r1, r7, r1 diff --git a/asm/slot_machine.s b/asm/slot_machine.s index 46af5bc0f..bebe3633e 100644 --- a/asm/slot_machine.s +++ b/asm/slot_machine.s @@ -10098,13 +10098,13 @@ sub_81063C0: @ 81063C0 ldr r0, _081063F0 @ =gSlotMachineReelTimeLights_Gfx ldr r4, _081063F4 @ =0x02010000 adds r1, r4, 0 - bl sub_800D238 + bl LZDecompressWram ldr r0, _081063F8 @ =gUnknown_083EDE8C movs r1, 0xC8 lsls r1, 6 adds r4, r1 adds r1, r4, 0 - bl sub_800D238 + bl LZDecompressWram ldr r0, _081063FC @ =gUnknown_083EDC2C bl LoadSpriteSheets ldr r0, _08106400 @ =gSlotMachineSpritePalettes diff --git a/asmdiff.sh b/asmdiff.sh new file mode 100644 index 000000000..a4b465b6e --- /dev/null +++ b/asmdiff.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +OBJDUMP="$DEVKITARM/bin/arm-none-eabi-objdump -D -bbinary -marmv4t -Mforce-thumb" +OPTIONS="--start-address=$(($1)) --stop-address=$(($1 + $2))" +$OBJDUMP $OPTIONS baserom.gba > baserom.dump +$OBJDUMP $OPTIONS pokeruby.gba > pokeruby.dump +diff baserom.dump pokeruby.dump diff --git a/common_syms/battle_anim.txt b/common_syms/battle/battle_anim.txt index a93ac9b5d..a93ac9b5d 100644 --- a/common_syms/battle_anim.txt +++ b/common_syms/battle/battle_anim.txt diff --git a/common_syms/mori_debug_menu.txt b/common_syms/debug/mori_debug_menu.txt index 77ab5531c..77ab5531c 100644 --- a/common_syms/mori_debug_menu.txt +++ b/common_syms/debug/mori_debug_menu.txt diff --git a/common_syms/sound_check_menu.txt b/common_syms/debug/sound_check_menu.txt index ba350ad8e..e9e3032e6 100644 --- a/common_syms/sound_check_menu.txt +++ b/common_syms/debug/sound_check_menu.txt @@ -1 +1,2 @@ gUnknown_03005D30 +gSoundTestCryNum diff --git a/common_syms/link.txt b/common_syms/engine/link.txt index faafda4d0..faafda4d0 100644 --- a/common_syms/link.txt +++ b/common_syms/engine/link.txt diff --git a/common_syms/load_save.txt b/common_syms/engine/load_save.txt index 3b969deca..3b969deca 100644 --- a/common_syms/load_save.txt +++ b/common_syms/engine/load_save.txt diff --git a/common_syms/main.txt b/common_syms/engine/main.txt index a620083d1..a620083d1 100644 --- a/common_syms/main.txt +++ b/common_syms/engine/main.txt diff --git a/common_syms/record_mixing.txt b/common_syms/engine/record_mixing.txt index a6f4f8df3..a6f4f8df3 100644 --- a/common_syms/record_mixing.txt +++ b/common_syms/engine/record_mixing.txt diff --git a/common_syms/rng.txt b/common_syms/engine/rng.txt index 794439ea5..794439ea5 100644 --- a/common_syms/rng.txt +++ b/common_syms/engine/rng.txt diff --git a/common_syms/rtc.txt b/common_syms/engine/rtc.txt index fa00a34d5..fa00a34d5 100644 --- a/common_syms/rtc.txt +++ b/common_syms/engine/rtc.txt diff --git a/common_syms/save.txt b/common_syms/engine/save.txt index d09a52bcf..d09a52bcf 100644 --- a/common_syms/save.txt +++ b/common_syms/engine/save.txt diff --git a/common_syms/sound.txt b/common_syms/engine/sound.txt index 0f6f2fc75..0f6f2fc75 100644 --- a/common_syms/sound.txt +++ b/common_syms/engine/sound.txt diff --git a/common_syms/sprite.txt b/common_syms/engine/sprite.txt index fe38dc61f..fe38dc61f 100644 --- a/common_syms/sprite.txt +++ b/common_syms/engine/sprite.txt diff --git a/common_syms/string_util.txt b/common_syms/engine/string_util.txt index 1ee62aaad..1ee62aaad 100644 --- a/common_syms/string_util.txt +++ b/common_syms/engine/string_util.txt diff --git a/common_syms/task.txt b/common_syms/engine/task.txt index 6601bd11b..6601bd11b 100644 --- a/common_syms/task.txt +++ b/common_syms/engine/task.txt diff --git a/common_syms/field_camera.txt b/common_syms/field/field_camera.txt index 7aad967f8..7aad967f8 100644 --- a/common_syms/field_camera.txt +++ b/common_syms/field/field_camera.txt diff --git a/common_syms/field_control_avatar.txt b/common_syms/field/field_control_avatar.txt index 040a9e6c1..040a9e6c1 100644 --- a/common_syms/field_control_avatar.txt +++ b/common_syms/field/field_control_avatar.txt diff --git a/common_syms/field_map_obj.txt b/common_syms/field/field_map_obj.txt index 32d8b1915..32d8b1915 100644 --- a/common_syms/field_map_obj.txt +++ b/common_syms/field/field_map_obj.txt diff --git a/common_syms/fieldmap.txt b/common_syms/field/fieldmap.txt index 7819b3b40..7819b3b40 100644 --- a/common_syms/fieldmap.txt +++ b/common_syms/field/fieldmap.txt diff --git a/common_syms/overworld.txt b/common_syms/field/overworld.txt index ecdb190b2..ecdb190b2 100644 --- a/common_syms/overworld.txt +++ b/common_syms/field/overworld.txt diff --git a/common_syms/start_menu.txt b/common_syms/field/start_menu.txt index bc0c247d1..bc0c247d1 100644 --- a/common_syms/start_menu.txt +++ b/common_syms/field/start_menu.txt diff --git a/common_syms/tv.txt b/common_syms/field/tv.txt index 829139f8f..829139f8f 100644 --- a/common_syms/tv.txt +++ b/common_syms/field/tv.txt diff --git a/common_syms/agb_flash.txt b/common_syms/libs/agb_flash.txt index cb421ec80..cb421ec80 100644 --- a/common_syms/agb_flash.txt +++ b/common_syms/libs/agb_flash.txt diff --git a/common_syms/m4a_2.txt b/common_syms/libs/m4a_2.txt index a80d8a79d..a80d8a79d 100644 --- a/common_syms/m4a_2.txt +++ b/common_syms/libs/m4a_2.txt diff --git a/common_syms/pokeblock_feed.txt b/common_syms/pokemon/pokeblock_feed.txt index 827e6526e..827e6526e 100644 --- a/common_syms/pokeblock_feed.txt +++ b/common_syms/pokemon/pokeblock_feed.txt diff --git a/common_syms/pokedex.txt b/common_syms/pokemon/pokedex.txt index 18b14f3ed..18b14f3ed 100644 --- a/common_syms/pokedex.txt +++ b/common_syms/pokemon/pokedex.txt diff --git a/common_syms/pokemon_1.txt b/common_syms/pokemon/pokemon_1.txt index c588d53a7..c588d53a7 100644 --- a/common_syms/pokemon_1.txt +++ b/common_syms/pokemon/pokemon_1.txt diff --git a/common_syms/pokemon_menu.txt b/common_syms/pokemon/pokemon_menu.txt index 98a1bf53b..98a1bf53b 100644 --- a/common_syms/pokemon_menu.txt +++ b/common_syms/pokemon/pokemon_menu.txt diff --git a/common_syms/berry_blender.txt b/common_syms/scene/berry_blender.txt index 524a31411..524a31411 100644 --- a/common_syms/berry_blender.txt +++ b/common_syms/scene/berry_blender.txt diff --git a/common_syms/contest_painting.txt b/common_syms/scene/contest_painting.txt index 2e8490348..2e8490348 100644 --- a/common_syms/contest_painting.txt +++ b/common_syms/scene/contest_painting.txt diff --git a/common_syms/cute_sketch.txt b/common_syms/scene/cute_sketch.txt index e69de29bb..e69de29bb 100644 --- a/common_syms/cute_sketch.txt +++ b/common_syms/scene/cute_sketch.txt diff --git a/common_syms/egg_hatch.txt b/common_syms/scene/egg_hatch.txt index 891ccc104..891ccc104 100644 --- a/common_syms/egg_hatch.txt +++ b/common_syms/scene/egg_hatch.txt diff --git a/common_syms/evolution_scene.txt b/common_syms/scene/evolution_scene.txt index 137cd3e05..137cd3e05 100644 --- a/common_syms/evolution_scene.txt +++ b/common_syms/scene/evolution_scene.txt diff --git a/common_syms/intro.txt b/common_syms/scene/intro.txt index d069b1014..d069b1014 100644 --- a/common_syms/intro.txt +++ b/common_syms/scene/intro.txt diff --git a/data-de/event_scripts.s b/data-de/event_scripts.s index 114bc4d97..677aa9f21 100644 --- a/data-de/event_scripts.s +++ b/data-de/event_scripts.s @@ -386,27 +386,27 @@ gStdScripts_End:: gUnknown_0815F36C:: @ 815F36C lockall - playsfx 2 + playse 2 message UnknownString_81A3A72 - doanimation 61 + dofieldeffect 61 waitstate - waittext + waitmessage waitbutton - playsfx 5 - jump EventScript_15F384 + playse 5 + goto EventScript_15F384 end EventScript_15F384: message UnknownString_81A3A87 - waittext + waitmessage checkflag 268 - jumpeq EventScript_15F3A0 - jump EventScript_15F3E2 + goto_if_eq EventScript_15F3A0 + goto EventScript_15F3E2 end gUnknown_0815F399:: @ 815F399 lockall - jump EventScript_15F384 + goto EventScript_15F384 end EventScript_15F3A0: @@ -431,8 +431,8 @@ EventScript_15F3E2: EventScript_15F419: msgbox UnknownString_81A38FB, 5 compare RESULT, 0 - jumpeq EventScript_15F384 - closebutton + goto_if_eq EventScript_15F384 + closemessage special SecretBasePC_PackUp releaseall end @@ -448,18 +448,18 @@ EventScript_15F436: gUnknown_0815F43A:: @ 815F43A lockall message UnknownString_81A3A72 - playsfx 2 - doanimation 61 + playse 2 + dofieldeffect 61 waitstate - waittext + waitmessage waitbutton - playsfx 5 - jump EventScript_15F452 + playse 5 + goto EventScript_15F452 end EventScript_15F452: message UnknownString_81A3A87 - waittext + waitmessage multichoice 0, 0, 7, 0 switch RESULT case 0, EventScript_15F4A1 @@ -471,19 +471,19 @@ EventScript_15F452: gUnknown_0815F49A:: @ 815F49A lockall - jump EventScript_15F452 + goto EventScript_15F452 end EventScript_15F4A1: special sub_80BC56C compare RESULT, 1 - jumpeq EventScript_15F4E0 + goto_if_eq EventScript_15F4E0 compare RESULT, 2 - jumpeq EventScript_15F503 + goto_if_eq EventScript_15F503 special sub_80BC224 msgbox UnknownString_81A3958, 5 compare RESULT, 0 - jumpeq EventScript_15F452 + goto_if_eq EventScript_15F452 msgbox UnknownString_81A3A22, 3 special sub_80BC5BC special sub_80C683C @@ -493,7 +493,7 @@ EventScript_15F4A1: EventScript_15F4E0: msgbox UnknownString_81A3982, 5 compare RESULT, 0 - jumpeq EventScript_15F452 + goto_if_eq EventScript_15F452 msgbox UnknownString_81A3A3A, 3 special sub_80BC5BC special sub_80C683C @@ -503,37 +503,37 @@ EventScript_15F4E0: EventScript_15F503: msgbox UnknownString_81A39C0, 3 special sub_80C683C - closebutton + closemessage releaseall end EventScript_15F511: message UnknownString_81A3AA2 - waittext - jump EventScript_15F452 + waitmessage + goto EventScript_15F452 end EventScript_15F51D: special sub_80C683C - closebutton + closemessage releaseall end gUnknown_0815F523:: @ 815F523 - doanimation 52 + dofieldeffect 52 waitstate end gUnknown_0815F528:: @ 815F528 special GetShieldToyTVDecorationInfo compare RESULT, 0 - jumpeq EventScript_15F558 + goto_if_eq EventScript_15F558 compare RESULT, 1 - jumpeq EventScript_15F561 + goto_if_eq EventScript_15F561 compare RESULT, 2 - jumpeq EventScript_15F56A + goto_if_eq EventScript_15F56A compare RESULT, 3 - jumpeq EventScript_15F573 + goto_if_eq EventScript_15F573 end EventScript_15F558: @@ -891,7 +891,7 @@ Std_2: lock faceplayer message 0x0 - waittext + waitmessage waitbutton release return @@ -899,20 +899,20 @@ Std_2: Std_3: lockall message 0x0 - waittext + waitmessage waitbutton releaseall return Std_4: message 0x0 - waittext + waitmessage waitbutton return Std_5: message 0x0 - waittext + waitmessage yesnobox 20, 8 return @@ -934,63 +934,63 @@ gUnknown_0819F80B:: @ 819F80B special PlayTrainerEncounterMusic special ScrSpecial_EndTrainerApproach waitstate - jump EventScript_19F8F2 + goto EventScript_19F8F2 gUnknown_0819F818:: @ 819F818 lock faceplayer - move LAST_TALKED, Movement_19F8F0 - waitmove 0 - specialval RESULT, ScrSpecial_HasTrainerBeenFought + applymovement LAST_TALKED, Movement_19F8F0 + waitmovement 0 + specialvar RESULT, ScrSpecial_HasTrainerBeenFought compare RESULT, 0 - jumpif 5, EventScript_19F83F + goto_if 5, EventScript_19F83F special PlayTrainerEncounterMusic special sub_8082524 - jump EventScript_19F8F2 + goto EventScript_19F8F2 EventScript_19F83F: - endtrainerbattle + ontrainerbattleend gUnknown_0819F840:: @ 819F840 lock faceplayer call EventScript_19F8E5 - specialval RESULT, ScrSpecial_HasTrainerBeenFought + specialvar RESULT, ScrSpecial_HasTrainerBeenFought compare RESULT, 0 - jumpif 5, EventScript_19F877 + goto_if 5, EventScript_19F877 special CheckForAlivePartyMons compare RESULT, 0 - jumpif 5, EventScript_19F870 + goto_if 5, EventScript_19F870 special PlayTrainerEncounterMusic special sub_8082524 - jump EventScript_19F8F2 + goto EventScript_19F8F2 EventScript_19F870: special ScrSpecial_ShowTrainerNonBattlingSpeech - waittext + waitmessage waitbutton release end EventScript_19F877: - endtrainerbattle + ontrainerbattleend gUnknown_0819F878:: @ 819F878 - move LAST_TALKED, Movement_19F8F0 - waitmove 0 + applymovement LAST_TALKED, Movement_19F8F0 + waitmovement 0 special PlayTrainerEncounterMusic - reptrainerbattle - endtrainerbattle + battlebegin + ontrainerbattleend gUnknown_0819F887:: @ 819F887 call EventScript_19F8E5 - specialval RESULT, ScrSpecial_GetTrainerEyeRematchFlag + specialvar RESULT, ScrSpecial_GetTrainerEyeRematchFlag compare RESULT, 0 - jumpeq EventScript_19F8AD + goto_if_eq EventScript_19F8AD special PlayTrainerEncounterMusic special sub_8082524 special ScrSpecial_ShowTrainerIntroSpeech - waittext + waitmessage waitbutton special ScrSpecial_StartTrainerEyeRematch waitstate @@ -998,19 +998,19 @@ gUnknown_0819F887:: @ 819F887 end EventScript_19F8AD: - endtrainerbattle + ontrainerbattleend gUnknown_0819F8AE:: @ 819F8AE - specialval RESULT, ScrSpecial_GetTrainerEyeRematchFlag + specialvar RESULT, ScrSpecial_GetTrainerEyeRematchFlag compare RESULT, 0 - jumpeq EventScript_19F8DD + goto_if_eq EventScript_19F8DD special CheckForAlivePartyMons compare RESULT, 0 - jumpif 5, EventScript_19F8DE + goto_if 5, EventScript_19F8DE special PlayTrainerEncounterMusic special sub_8082524 special ScrSpecial_ShowTrainerIntroSpeech - waittext + waitmessage waitbutton special ScrSpecial_StartTrainerEyeRematch waitstate @@ -1018,18 +1018,18 @@ gUnknown_0819F8AE:: @ 819F8AE end EventScript_19F8DD: - endtrainerbattle + ontrainerbattleend EventScript_19F8DE: special ScrSpecial_ShowTrainerNonBattlingSpeech - waittext + waitmessage waitbutton release end EventScript_19F8E5: - move LAST_TALKED, Movement_19F8F0 - waitmove 0 + applymovement LAST_TALKED, Movement_19F8F0 + waitmovement 0 return Movement_19F8F0:: @@ -1038,116 +1038,116 @@ Movement_19F8F0:: EventScript_19F8F2: special ScrSpecial_ShowTrainerIntroSpeech - waittext + waitmessage waitbutton - reptrainerbattle - specialval RESULT, ScrSpecial_GetTrainerBattleMode + battlebegin + specialvar RESULT, ScrSpecial_GetTrainerBattleMode compare RESULT, 0 - jumpeq EventScript_19F934 + goto_if_eq EventScript_19F934 compare RESULT, 2 - jumpeq EventScript_19F936 + goto_if_eq EventScript_19F936 compare RESULT, 1 - jumpeq EventScript_19F936 + goto_if_eq EventScript_19F936 compare RESULT, 6 - jumpeq EventScript_19F936 + goto_if_eq EventScript_19F936 compare RESULT, 8 - jumpeq EventScript_19F936 + goto_if_eq EventScript_19F936 EventScript_19F934: releaseall end EventScript_19F936: - endtrainerbattle2 + ontrainerbattleendgoto Std_6:: message 0x0 - waittext + waitmessage waitbutton release return Event_ResetBerryTrees: @ 19F940 - event_8a 2, 7, 5 - event_8a 1, 3, 5 - event_8a 11, 7, 5 - event_8a 13, 3, 5 - event_8a 4, 7, 5 - event_8a 76, 1, 5 - event_8a 8, 1, 5 - event_8a 10, 6, 5 - event_8a 25, 20, 5 - event_8a 26, 2, 5 - event_8a 66, 2, 5 - event_8a 67, 20, 5 - event_8a 69, 22, 5 - event_8a 70, 22, 5 - event_8a 71, 22, 5 - event_8a 55, 17, 5 - event_8a 56, 17, 5 - event_8a 5, 1, 5 - event_8a 6, 6, 5 - event_8a 7, 1, 5 - event_8a 16, 18, 5 - event_8a 17, 18, 5 - event_8a 18, 18, 5 - event_8a 29, 19, 5 - event_8a 28, 19, 5 - event_8a 27, 19, 5 - event_8a 24, 4, 5 - event_8a 23, 3, 5 - event_8a 22, 3, 5 - event_8a 21, 4, 5 - event_8a 19, 16, 5 - event_8a 20, 16, 5 - event_8a 80, 7, 5 - event_8a 81, 7, 5 - event_8a 77, 8, 5 - event_8a 78, 8, 5 - event_8a 68, 8, 5 - event_8a 31, 10, 5 - event_8a 33, 10, 5 - event_8a 34, 21, 5 - event_8a 35, 21, 5 - event_8a 36, 21, 5 - event_8a 83, 24, 5 - event_8a 84, 24, 5 - event_8a 85, 10, 5 - event_8a 86, 6, 5 - event_8a 37, 5, 5 - event_8a 38, 5, 5 - event_8a 39, 5, 5 - event_8a 40, 3, 5 - event_8a 41, 3, 5 - event_8a 42, 3, 5 - event_8a 46, 19, 5 - event_8a 45, 20, 5 - event_8a 44, 18, 5 - event_8a 43, 16, 5 - event_8a 47, 8, 5 - event_8a 48, 5, 5 - event_8a 49, 4, 5 - event_8a 50, 2, 5 - event_8a 52, 18, 5 - event_8a 53, 18, 5 - event_8a 62, 6, 5 - event_8a 64, 6, 5 - event_8a 58, 21, 5 - event_8a 59, 21, 5 - event_8a 60, 25, 5 - event_8a 61, 25, 5 - event_8a 79, 23, 5 - event_8a 14, 23, 5 - event_8a 15, 21, 5 - event_8a 30, 21, 5 - event_8a 65, 25, 5 - event_8a 72, 25, 5 - event_8a 73, 23, 5 - event_8a 74, 23, 5 - event_8a 87, 3, 5 - event_8a 88, 10, 5 - event_8a 89, 4, 5 - event_8a 82, 36, 5 + plantberrytree 2, 7, 5 + plantberrytree 1, 3, 5 + plantberrytree 11, 7, 5 + plantberrytree 13, 3, 5 + plantberrytree 4, 7, 5 + plantberrytree 76, 1, 5 + plantberrytree 8, 1, 5 + plantberrytree 10, 6, 5 + plantberrytree 25, 20, 5 + plantberrytree 26, 2, 5 + plantberrytree 66, 2, 5 + plantberrytree 67, 20, 5 + plantberrytree 69, 22, 5 + plantberrytree 70, 22, 5 + plantberrytree 71, 22, 5 + plantberrytree 55, 17, 5 + plantberrytree 56, 17, 5 + plantberrytree 5, 1, 5 + plantberrytree 6, 6, 5 + plantberrytree 7, 1, 5 + plantberrytree 16, 18, 5 + plantberrytree 17, 18, 5 + plantberrytree 18, 18, 5 + plantberrytree 29, 19, 5 + plantberrytree 28, 19, 5 + plantberrytree 27, 19, 5 + plantberrytree 24, 4, 5 + plantberrytree 23, 3, 5 + plantberrytree 22, 3, 5 + plantberrytree 21, 4, 5 + plantberrytree 19, 16, 5 + plantberrytree 20, 16, 5 + plantberrytree 80, 7, 5 + plantberrytree 81, 7, 5 + plantberrytree 77, 8, 5 + plantberrytree 78, 8, 5 + plantberrytree 68, 8, 5 + plantberrytree 31, 10, 5 + plantberrytree 33, 10, 5 + plantberrytree 34, 21, 5 + plantberrytree 35, 21, 5 + plantberrytree 36, 21, 5 + plantberrytree 83, 24, 5 + plantberrytree 84, 24, 5 + plantberrytree 85, 10, 5 + plantberrytree 86, 6, 5 + plantberrytree 37, 5, 5 + plantberrytree 38, 5, 5 + plantberrytree 39, 5, 5 + plantberrytree 40, 3, 5 + plantberrytree 41, 3, 5 + plantberrytree 42, 3, 5 + plantberrytree 46, 19, 5 + plantberrytree 45, 20, 5 + plantberrytree 44, 18, 5 + plantberrytree 43, 16, 5 + plantberrytree 47, 8, 5 + plantberrytree 48, 5, 5 + plantberrytree 49, 4, 5 + plantberrytree 50, 2, 5 + plantberrytree 52, 18, 5 + plantberrytree 53, 18, 5 + plantberrytree 62, 6, 5 + plantberrytree 64, 6, 5 + plantberrytree 58, 21, 5 + plantberrytree 59, 21, 5 + plantberrytree 60, 25, 5 + plantberrytree 61, 25, 5 + plantberrytree 79, 23, 5 + plantberrytree 14, 23, 5 + plantberrytree 15, 21, 5 + plantberrytree 30, 21, 5 + plantberrytree 65, 25, 5 + plantberrytree 72, 25, 5 + plantberrytree 73, 23, 5 + plantberrytree 74, 23, 5 + plantberrytree 87, 3, 5 + plantberrytree 88, 10, 5 + plantberrytree 89, 4, 5 + plantberrytree 82, 36, 5 return gUnknown_0819FA81:: @ 819FA81 @@ -1298,13 +1298,13 @@ EverGrandeCity_HallOfFame_EventScript_19FC13:: @ 819FC13 clearflag 861 special sub_810FAA0 checkflag 291 - callif 0, EverGrandeCity_HallOfFame_EventScript_19FC62 + call_if 0, EverGrandeCity_HallOfFame_EventScript_19FC62 checkflag 255 - callif 0, EverGrandeCity_HallOfFame_EventScript_19FC70 + call_if 0, EverGrandeCity_HallOfFame_EventScript_19FC70 checkflag 298 - callif 0, EverGrandeCity_HallOfFame_EventScript_19FC5A + call_if 0, EverGrandeCity_HallOfFame_EventScript_19FC5A checkflag 123 - callif 0, EverGrandeCity_HallOfFame_EventScript_19FC5E + call_if 0, EverGrandeCity_HallOfFame_EventScript_19FC5E return EverGrandeCity_HallOfFame_EventScript_19FC5A:: @ 819FC5A @@ -1328,25 +1328,25 @@ EverGrandeCity_HallOfFame_EventScript_19FC70:: @ 819FC70 S_WhiteOut:: @ 819FC74 call EverGrandeCity_HallOfFame_EventScript_19FD09 call EventScript_19FC84 - jump gUnknown_0819FC9F + goto gUnknown_0819FC9F end EventScript_19FC84: checkflag 221 - jumpeq Route101_EventScript_1A14DC + goto_if_eq Route101_EventScript_1A14DC checkflag 1213 - jumpif 0, Route101_EventScript_1A14DC + goto_if 0, Route101_EventScript_1A14DC clearflag 929 setvar 0x4053, 2 return gUnknown_0819FC9F:: @ 819FC9F compare 0x4096, 1 - jumpeq EventScript_19FCC1 + goto_if_eq EventScript_19FCC1 compare 0x4096, 2 - jumpeq EventScript_19FCD7 + goto_if_eq EventScript_19FCD7 compare 0x4096, 3 - jumpeq EventScript_19FCF0 + goto_if_eq EventScript_19FCF0 end EventScript_19FCC1: @@ -1399,15 +1399,15 @@ RustboroCity_PokemonCenter_1F_EventScript_19FD1B:: @ 819FD1B SlateportCity_PokemonCenter_1F_EventScript_19FD1B:: @ 819FD1B VerdanturfTown_PokemonCenter_1F_EventScript_19FD1B:: @ 819FD1B checkflag 188 - jumpif 0, OldaleTown_PokemonCenter_1F_EventScript_1A14DC + goto_if 0, OldaleTown_PokemonCenter_1F_EventScript_1A14DC checkflag 1217 - jumpeq OldaleTown_PokemonCenter_1F_EventScript_1A14DC + goto_if_eq OldaleTown_PokemonCenter_1F_EventScript_1A14DC checkflag 742 - jumpif 0, OldaleTown_PokemonCenter_1F_EventScript_19FD49 + goto_if 0, OldaleTown_PokemonCenter_1F_EventScript_19FD49 checkflag 740 - jumpif 0, OldaleTown_PokemonCenter_1F_EventScript_19FD4F + goto_if 0, OldaleTown_PokemonCenter_1F_EventScript_19FD4F checkflag 741 - jumpif 0, OldaleTown_PokemonCenter_1F_EventScript_19FD55 + goto_if 0, OldaleTown_PokemonCenter_1F_EventScript_19FD55 return OldaleTown_PokemonCenter_1F_EventScript_19FD49:: @ 819FD49 @@ -1440,52 +1440,52 @@ VerdanturfTown_PokemonCenter_1F_EventScript_19FD5B:: @ 819FD5B faceplayer msgbox gText_NurseJoy_Welcome, 5 compare RESULT, 1 - jumpeq OldaleTown_PokemonCenter_1F_EventScript_19FD7C + goto_if_eq OldaleTown_PokemonCenter_1F_EventScript_19FD7C compare RESULT, 0 - jumpeq OldaleTown_PokemonCenter_1F_EventScript_19FDC7 + goto_if_eq OldaleTown_PokemonCenter_1F_EventScript_19FDC7 end OldaleTown_PokemonCenter_1F_EventScript_19FD7C:: @ 819FD7C - inccounter GAME_STAT_USED_POKECENTER + incrementgamestat GAME_STAT_USED_POKECENTER message gText_NurseJoy_OkayIllTakeYourPokemon - waittext - move 0x800b, OldaleTown_PokemonCenter_1F_Movement_1A083F - waitmove 0 - doanimation 25 - checkanimation 25 - move 0x800b, OldaleTown_PokemonCenter_1F_Movement_1A0845 - waitmove 0 + waitmessage + applymovement 0x800b, OldaleTown_PokemonCenter_1F_Movement_1A083F + waitmovement 0 + dofieldeffect 25 + waitfieldeffect 25 + applymovement 0x800b, OldaleTown_PokemonCenter_1F_Movement_1A0845 + waitmovement 0 special ScrSpecial_HealPlayerParty checkflag 273 - jumpif 0, OldaleTown_PokemonCenter_1F_EventScript_19FDCE - jump OldaleTown_PokemonCenter_1F_EventScript_19FDB0 + goto_if 0, OldaleTown_PokemonCenter_1F_EventScript_19FDCE + goto OldaleTown_PokemonCenter_1F_EventScript_19FDB0 end OldaleTown_PokemonCenter_1F_EventScript_19FDB0:: @ 819FDB0 message gText_NurseJoy_ThankYouForWaiting - waittext - move 0x800b, OldaleTown_PokemonCenter_1F_Movement_19FDF4 - waitmove 0 + waitmessage + applymovement 0x800b, OldaleTown_PokemonCenter_1F_Movement_19FDF4 + waitmovement 0 message gText_NurseJoy_WeHopeToSeeYouAgain - waittext + waitmessage return OldaleTown_PokemonCenter_1F_EventScript_19FDC7:: @ 819FDC7 message gText_NurseJoy_WeHopeToSeeYouAgain - waittext + waitmessage return OldaleTown_PokemonCenter_1F_EventScript_19FDCE:: @ 819FDCE - specialval RESULT, IsPokerusInParty + specialvar RESULT, IsPokerusInParty compare RESULT, 1 - jumpeq OldaleTown_PokemonCenter_1F_EventScript_19FDEA + goto_if_eq OldaleTown_PokemonCenter_1F_EventScript_19FDEA compare RESULT, 0 - jumpeq OldaleTown_PokemonCenter_1F_EventScript_19FDB0 + goto_if_eq OldaleTown_PokemonCenter_1F_EventScript_19FDB0 end OldaleTown_PokemonCenter_1F_EventScript_19FDEA:: @ 819FDEA message gText_NurseJoy_Pokerus - waittext + waitmessage setflag 273 return @@ -1501,13 +1501,13 @@ Std_ObtainItem: @ 819FDF7 return Std_ObtainItem_: @ 819FE07 - bufferitem 1, 0x8000 + getitemname 1, 0x8000 checkitemtype 0x8000 call GetItem_HandlePocket compare 0x8007, 0x1 - callif 1, Std_ObtainItem_Success + call_if 1, Std_ObtainItem_Success compare 0x8007, 0x0 - callif 1, Std_ObtainItem_Fail + call_if 1, Std_ObtainItem_Fail return GetItem_HandlePocket: @@ -1520,39 +1520,39 @@ GetItem_HandlePocket: end GetItem_HandlePocket_Items: - bufferstd 2, 0xE + getstdstring 2, 0xE compare 0x8007, 1 - callif 1, PlayGetItemFanfare + call_if 1, PlayGetItemFanfare return GetItem_HandlePocket_KeyItems: - bufferstd 2, 0xF + getstdstring 2, 0xF compare 0x8007, 1 - callif 1, PlayGetItemFanfare + call_if 1, PlayGetItemFanfare return GetItem_HandlePocket_PokeBalls: - bufferstd 2, 0x10 + getstdstring 2, 0x10 compare 0x8007, 1 - callif 1, PlayGetItemFanfare + call_if 1, PlayGetItemFanfare return GetItem_HandlePocket_TMsHMs: - bufferstd 2, 0x11 + getstdstring 2, 0x11 compare 0x8007, 1 - callif 1, PlayGetTMHMFanfare + call_if 1, PlayGetTMHMFanfare return GetItem_HandlePocket_Berries: - bufferstd 2, 0x12 + getstdstring 2, 0x12 compare 0x8007, 1 - callif 1, PlayGetItemFanfare + call_if 1, PlayGetItemFanfare return Std_ObtainItem_Success: @ 819FEB7 message Message_ObtainedItem waitfanfare - waittext + waitmessage msgbox Message_PutAwayItem setvar RESULT, 1 return @@ -1562,11 +1562,11 @@ Std_ObtainItem_Fail: @ 819FECC return PlayGetItemFanfare: - fanfare 0x172 + playfanfare 0x172 return PlayGetTMHMFanfare: - fanfare 0x174 + playfanfare 0x174 return Std_ObtainDecoration: @ 819FEDA @@ -1576,18 +1576,18 @@ Std_ObtainDecoration: @ 819FEDA return Std_ObtainDecoration_: @ 819FEE8 - bufferdecor 1, 0x8000 + getdecorname 1, 0x8000 compare 0x8007, 1 - callif 1, Std_ObtainDecoration_Success + call_if 1, Std_ObtainDecoration_Success compare 0x8007, 0 - callif 1, Std_ObtainDecoration_Fail + call_if 1, Std_ObtainDecoration_Fail return Std_ObtainDecoration_Success: @ 819FF03 - fanfare 0x172 + playfanfare 0x172 message Message_ObtainedDecoration waitfanfare - waittext + waitmessage msgbox Message_TransferredToPC setvar RESULT, 1 return @@ -1599,24 +1599,24 @@ Std_ObtainDecoration_Fail: @ 819FF1B Std_FindItem: @ 819FF21 lock faceplayer - checksound + waitse additem 0x8000, 0x8001 copyvar 0x8007, RESULT - bufferitem 1, 0x8000 + getitemname 1, 0x8000 checkitemtype 0x8000 call GetItem_HandlePocket compare 0x8007, 1 - callif 1, Std_FindItem_Success + call_if 1, Std_FindItem_Success compare 0x8007, 0 - callif 1, Std_FindItem_Fail + call_if 1, Std_FindItem_Fail release return Std_FindItem_Success: @ 819FF52 - disappear LAST_TALKED + removeobject LAST_TALKED message Message_FoundOneItem waitfanfare - waittext + waitmessage msgbox Message_PutAwayItem return @@ -1628,22 +1628,22 @@ Std_FindItem_Fail: @ 819FF65 HiddenItemScript:: @ 819FF7B lockall - checksound + waitse additem 0x8005, 1 copyvar 0x8007, RESULT - bufferitem 0x1, 0x8005 + getitemname 0x1, 0x8005 checkitemtype 0x8005 call GetItem_HandlePocket compare 0x8007, 1 - jumpeq HiddenItemScript_Success + goto_if_eq HiddenItemScript_Success compare 0x8007, 0 - jumpeq HiddenItemScript_Fail + goto_if_eq HiddenItemScript_Fail end HiddenItemScript_Success: message Message_FoundOneItem waitfanfare - waittext + waitmessage msgbox Message_PutAwayItem special SetFlagInVar releaseall @@ -1661,10 +1661,10 @@ UnusedMixRecordsScript: @ 819FFD5 faceplayer msgbox UnusedMixRecordsPromptText, 5 compare RESULT, 1 - jumpeq UnusedMixRecordsScript_Yes + goto_if_eq UnusedMixRecordsScript_Yes compare RESULT, 0 - jumpeq UnusedMixRecordsScript_Done - jump UnusedMixRecordsScript_Done + goto_if_eq UnusedMixRecordsScript_Done + goto UnusedMixRecordsScript_Done UnusedMixRecordsScript_Yes: @ 819FFFA special sub_80B929C waitstate @@ -1672,7 +1672,7 @@ UnusedMixRecordsScript_Yes: @ 819FFFA faceplayer UnusedMixRecordsScript_Done: @ 81A0000 message UnusedMixRecordsSeeYouAgainText - waittext + waitmessage waitbutton release end @@ -1681,17 +1681,17 @@ gUnknown_081A0009:: @ 81A0009 lockall setvar 0x8004, 0 special DoPCTurnOnEffect - playsfx 4 + playse 4 msgbox UnknownString_81A09EC, 4 - jump EventScript_1A0023 + goto EventScript_1A0023 end EventScript_1A0023: message gPCText_WhichPCShouldBeAccessed - waittext + waitmessage special ScrSpecial_CreatePCMenu waitstate - jump EventScript_1A0033 + goto EventScript_1A0033 end EventScript_1A0033: @@ -1704,23 +1704,23 @@ EventScript_1A0033: end EventScript_1A0070: - playsfx 2 + playse 2 msgbox UnknownString_81A0A54, 4 special PlayerPC waitstate - jump EventScript_1A0023 + goto EventScript_1A0023 end EventScript_1A0085: - playsfx 2 + playse 2 checkflag 2123 - callif 0, EventScript_1A00AC + call_if 0, EventScript_1A00AC checkflag 2123 - callif 1, EventScript_1A00B5 + call_if 1, EventScript_1A00B5 msgbox UnknownString_81A0A35, 4 special ShowPokemonStorageSystem waitstate - jump EventScript_1A0023 + goto EventScript_1A0023 end EventScript_1A00AC: @@ -1733,18 +1733,18 @@ EventScript_1A00B5: EventScript_1A00BE: setvar 0x8004, 0 - playsfx 3 + playse 3 special DoPCTurnOffEffect releaseall end EventScript_1A00CB: checkflag 2052 - jumpif 0, EventScript_1A00BE - playsfx 2 + goto_if 0, EventScript_1A00BE + playse 2 special AccessHallOfFamePC waitstate - jump EventScript_1A0033 + goto EventScript_1A0033 end FallarborTown_EventScript_1A00E1:: @ 81A00E1 @@ -1803,7 +1803,7 @@ RustboroCity_Gym_EventScript_1A00FB:: @ 81A00FB DewfordTown_EventScript_1A0102:: @ 81A0102 DewfordTown_Hall_EventScript_1A0102:: @ 81A0102 - checkdailyflags + dodailyevents setvar 0x8004, 0 special sub_80FA5BC return @@ -1816,17 +1816,17 @@ Route109_EventScript_1A010C:: @ 81A010C return UseSurfScript:: @ 81A0117 - checkattack MOVE_SURF + checkpokemove MOVE_SURF compare RESULT, 6 - jumpeq UseSurfScript_NoMon - bufferpartypoke 0, RESULT - setanimation 0, RESULT + goto_if_eq UseSurfScript_NoMon + getpartypokename 0, RESULT + setfieldeffect 0, RESULT lockall msgbox UseSurfPromptText, 5 compare RESULT, 0 - jumpeq UseSurfScript_No + goto_if_eq UseSurfScript_No msgbox UsedSurfText, 4 - doanimation 9 + dofieldeffect 9 UseSurfScript_No: @ 81A014C releaseall UseSurfScript_NoMon: @ 81A014D @@ -1841,11 +1841,11 @@ Route103_EventScript_1A014E:: @ 81A014E Route110_EventScript_1A014E:: @ 81A014E Route119_EventScript_1A014E:: @ 81A014E RustboroCity_EventScript_1A014E:: @ 81A014E - checkgender + checkplayergender compare RESULT, 0 - jumpeq RustboroCity_EventScript_1A0166 + goto_if_eq RustboroCity_EventScript_1A0166 compare RESULT, 1 - jumpeq RustboroCity_EventScript_1A016C + goto_if_eq RustboroCity_EventScript_1A016C end RustboroCity_EventScript_1A0166:: @ 81A0166 @@ -1859,11 +1859,11 @@ RustboroCity_EventScript_1A016C:: @ 81A016C LavaridgeTown_EventScript_1A0172:: @ 81A0172 Route110_EventScript_1A0172:: @ 81A0172 Route119_EventScript_1A0172:: @ 81A0172 - checkgender + checkplayergender compare RESULT, 0 - jumpeq LavaridgeTown_EventScript_1A018A + goto_if_eq LavaridgeTown_EventScript_1A018A compare RESULT, 1 - jumpeq LavaridgeTown_EventScript_1A0190 + goto_if_eq LavaridgeTown_EventScript_1A0190 end LavaridgeTown_EventScript_1A018A:: @ 81A018A @@ -1945,66 +1945,66 @@ SootopolisCity_Gym_1F_EventScript_1A01C0:: @ 81A01C0 end DewfordTown_Gym_EventScript_1A021E:: @ 81A021E - cleartrainerflag OPPONENT_JOSH - cleartrainerflag OPPONENT_TOMMY + settrainerflag OPPONENT_JOSH + settrainerflag OPPONENT_TOMMY return DewfordTown_Gym_EventScript_1A0225:: @ 81A0225 - cleartrainerflag OPPONENT_HIDEKI - cleartrainerflag OPPONENT_TESSA - cleartrainerflag OPPONENT_LAURA + settrainerflag OPPONENT_HIDEKI + settrainerflag OPPONENT_TESSA + settrainerflag OPPONENT_LAURA return DewfordTown_Gym_EventScript_1A022F:: @ 81A022F - cleartrainerflag OPPONENT_KIRK - cleartrainerflag OPPONENT_SHAWN - cleartrainerflag OPPONENT_BEN - cleartrainerflag OPPONENT_VIVIAN + settrainerflag OPPONENT_KIRK + settrainerflag OPPONENT_SHAWN + settrainerflag OPPONENT_BEN + settrainerflag OPPONENT_VIVIAN return DewfordTown_Gym_EventScript_1A023C:: @ 81A023C - cleartrainerflag OPPONENT_COLE - cleartrainerflag OPPONENT_AXLE - cleartrainerflag OPPONENT_ANDY - cleartrainerflag OPPONENT_ZANE - cleartrainerflag OPPONENT_SADIE + settrainerflag OPPONENT_COLE + settrainerflag OPPONENT_AXLE + settrainerflag OPPONENT_ANDY + settrainerflag OPPONENT_ZANE + settrainerflag OPPONENT_SADIE return DewfordTown_Gym_EventScript_1A024C:: @ 81A024C - cleartrainerflag OPPONENT_RANDALL - cleartrainerflag OPPONENT_PARKER - cleartrainerflag OPPONENT_GEORGE - cleartrainerflag OPPONENT_BERKE - cleartrainerflag OPPONENT_MARY - cleartrainerflag OPPONENT_LORI - cleartrainerflag OPPONENT_JODY + settrainerflag OPPONENT_RANDALL + settrainerflag OPPONENT_PARKER + settrainerflag OPPONENT_GEORGE + settrainerflag OPPONENT_BERKE + settrainerflag OPPONENT_MARY + settrainerflag OPPONENT_LORI + settrainerflag OPPONENT_JODY return DewfordTown_Gym_EventScript_1A0262:: @ 81A0262 - cleartrainerflag OPPONENT_JARED - cleartrainerflag OPPONENT_TERRELL - cleartrainerflag OPPONENT_KYLEE - cleartrainerflag OPPONENT_WILL + settrainerflag OPPONENT_JARED + settrainerflag OPPONENT_TERRELL + settrainerflag OPPONENT_KYLEE + settrainerflag OPPONENT_WILL return DewfordTown_Gym_EventScript_1A026F:: @ 81A026F - cleartrainerflag OPPONENT_PRESTON - cleartrainerflag OPPONENT_VIRGIL - cleartrainerflag OPPONENT_FRITZ - cleartrainerflag OPPONENT_HANNAH - cleartrainerflag OPPONENT_SAMANTHA - cleartrainerflag OPPONENT_MAURA + settrainerflag OPPONENT_PRESTON + settrainerflag OPPONENT_VIRGIL + settrainerflag OPPONENT_FRITZ + settrainerflag OPPONENT_HANNAH + settrainerflag OPPONENT_SAMANTHA + settrainerflag OPPONENT_MAURA return DewfordTown_Gym_EventScript_1A0282:: @ 81A0282 - cleartrainerflag OPPONENT_ANDREA - cleartrainerflag OPPONENT_CRISSY - cleartrainerflag OPPONENT_BRIANNA_2 - cleartrainerflag OPPONENT_CONNIE - cleartrainerflag OPPONENT_BRIDGET - cleartrainerflag OPPONENT_OLIVIA - cleartrainerflag OPPONENT_TIFFANY - cleartrainerflag OPPONENT_MARISSA + settrainerflag OPPONENT_ANDREA + settrainerflag OPPONENT_CRISSY + settrainerflag OPPONENT_BRIANNA_2 + settrainerflag OPPONENT_CONNIE + settrainerflag OPPONENT_BRIDGET + settrainerflag OPPONENT_OLIVIA + settrainerflag OPPONENT_TIFFANY + settrainerflag OPPONENT_MARISSA return DewfordTown_Gym_EventScript_1A029B:: @ 81A029B @@ -2101,7 +2101,7 @@ MossdeepCity_Gym_EventScript_1A02C5:: @ 81A02C5 PetalburgCity_Gym_EventScript_1A02C5:: @ 81A02C5 RustboroCity_Gym_EventScript_1A02C5:: @ 81A02C5 SootopolisCity_Gym_1F_EventScript_1A02C5:: @ 81A02C5 - fanfare 369 + playfanfare 369 waitfanfare return @@ -2110,7 +2110,7 @@ Route111_OldLadysRestStop_EventScript_1A02CA:: @ 81A02CA Route119_WeatherInstitute_1F_EventScript_1A02CA:: @ 81A02CA SSTidalRooms_EventScript_1A02CA:: @ 81A02CA fadescreen 1 - fanfare 368 + playfanfare 368 waitfanfare special ScrSpecial_HealPlayerParty fadescreen 0 @@ -2129,37 +2129,37 @@ DewfordTown_EventScript_1A02E7:: @ 81A02E7 Route104_EventScript_1A02E7:: @ 81A02E7 Route109_EventScript_1A02E7:: @ 81A02E7 setflag 0x4001 - playmusic 431, 0 + playbgm 431, 0 return DewfordTown_EventScript_1A02EF:: @ 81A02EF Route104_EventScript_1A02EF:: @ 81A02EF Route109_EventScript_1A02EF:: @ 81A02EF clearflag 0x4001 - fadedefault + fadedefaultbgm return LittlerootTown_ProfessorBirchsLab_EventScript_1A02F4:: @ 81A02F4 Route101_EventScript_1A02F4:: @ 81A02F4 Route103_EventScript_1A02F4:: @ 81A02F4 compare 0x4085, 0 - jumpeq Route101_EventScript_1A14DC + goto_if_eq Route101_EventScript_1A14DC compare 0x4049, 0 - callif 1, Route101_EventScript_1A0358 + call_if 1, Route101_EventScript_1A0358 compare 0x4049, 1 - callif 1, Route101_EventScript_1A0358 + call_if 1, Route101_EventScript_1A0358 compare 0x4049, 2 - callif 1, Route101_EventScript_1A0365 + call_if 1, Route101_EventScript_1A0365 compare 0x4049, 3 - callif 1, Route101_EventScript_1A0365 + call_if 1, Route101_EventScript_1A0365 compare 0x4049, 4 - callif 1, Route101_EventScript_1A0372 + call_if 1, Route101_EventScript_1A0372 compare 0x4049, 5 - callif 1, Route101_EventScript_1A0372 + call_if 1, Route101_EventScript_1A0372 compare 0x4049, 6 - callif 1, Route101_EventScript_1A0358 + call_if 1, Route101_EventScript_1A0358 compare 0x4049, 7 - callif 1, Route101_EventScript_1A0358 + call_if 1, Route101_EventScript_1A0358 return Route101_EventScript_1A0358:: @ 81A0358 @@ -2190,7 +2190,7 @@ Route103_EventScript_1A037F:: @ 81A037F faceplayer msgbox Route101_Text_1C4449, 5 compare RESULT, 0 - jumpeq Route101_EventScript_1A039B + goto_if_eq Route101_EventScript_1A039B call Route101_EventScript_1A03B0 release end @@ -2203,38 +2203,38 @@ Route101_EventScript_1A039B:: @ 81A039B Route101_EventScript_1A03A5:: @ 81A03A5 copyvar 0x8004, 0x8009 special ShowPokedexRatingMessage - waittext + waitmessage waitbutton return EverGrandeCity_ChampionsRoom_EventScript_1A03B0:: @ 81A03B0 Route101_EventScript_1A03B0:: @ 81A03B0 setvar 0x8004, 0 - specialval RESULT, ScriptGetPokedexInfo + specialvar RESULT, ScriptGetPokedexInfo copyvar 0x8008, 0x8005 copyvar 0x8009, 0x8006 copyvar 0x800a, RESULT - buffernum 0, 0x8008 - buffernum 1, 0x8009 + getnumberstring 0, 0x8008 + getnumberstring 1, 0x8009 msgbox Route101_Text_1C44DC, 4 call Route101_EventScript_1A03A5 compare 0x800a, 0 - jumpeq Route101_EventScript_1A14DC + goto_if_eq Route101_EventScript_1A14DC setvar 0x8004, 1 - specialval RESULT, ScriptGetPokedexInfo + specialvar RESULT, ScriptGetPokedexInfo copyvar 0x8008, 0x8005 copyvar 0x8009, 0x8006 - buffernum 0, 0x8008 - buffernum 1, 0x8009 + getnumberstring 0, 0x8008 + getnumberstring 1, 0x8009 msgbox Route101_Text_1C4B05, 4 return BattleTower_Outside_EventScript_1A040E:: @ 81A040E LilycoveCity_Harbor_EventScript_1A040E:: @ 81A040E SlateportCity_Harbor_EventScript_1A040E:: @ 81A040E - pause 60 - move 0x8004, SlateportCity_Harbor_Movement_1A041C - waitmove 0 + delay 60 + applymovement 0x8004, SlateportCity_Harbor_Movement_1A041C + waitmovement 0 return SlateportCity_Harbor_Movement_1A041C:: @ 81A041C @@ -2260,8 +2260,8 @@ PetalburgCity_Gym_EventScript_1A0424:: @ 81A0424 return RusturfTunnel_EventScript_1A0442:: @ 81A0442 - disappear 1 - disappear 10 + removeobject 1 + removeobject 10 clearflag 808 clearflag 984 setvar 0x409a, 6 @@ -2269,14 +2269,14 @@ RusturfTunnel_EventScript_1A0442:: @ 81A0442 return EventScript_1A0457: @ unreferenced? - pause 30 - move 255, SlateportCity_OceanicMuseum_2F_Movement_1A0841 - waitmove 0 - spritevisible 255, 0, 0 - pause 30 - move 255, Movement_1A047A - waitmove 0 - pause 30 + delay 30 + applymovement 255, SlateportCity_OceanicMuseum_2F_Movement_1A0841 + waitmovement 0 + showobject 255, 0, 0 + delay 30 + applymovement 255, Movement_1A047A + waitmovement 0 + delay 30 return Movement_1A047A: @@ -2286,18 +2286,18 @@ Movement_1A047A: BattleTower_Outside_EventScript_1A047C:: @ 81A047C SouthernIsland_Exterior_EventScript_1A047C:: @ 81A047C compare FACING, 1 - callif 1, BattleTower_Outside_EventScript_160B2F + call_if 1, BattleTower_Outside_EventScript_160B2F compare FACING, 3 - callif 1, BattleTower_Outside_EventScript_160B3A - pause 30 - spriteinvisible 255, 0, 0 + call_if 1, BattleTower_Outside_EventScript_160B3A + delay 30 + hideobject 255, 0, 0 call BattleTower_Outside_EventScript_1A040E return CaveOfOrigin_B4F_EventScript_1A04A0:: @ 81A04A0 lockall - checksound - pokecry SPECIES_GROUDON_OR_KYOGRE, 2 + waitse + playpokecry SPECIES_GROUDON_OR_KYOGRE, 2 waitpokecry setvar 0x4005, 1 releaseall @@ -2309,20 +2309,20 @@ CaveOfOrigin_B2F_EventScript_1A04AF:: @ 81A04AF CaveOfOrigin_B3F_EventScript_1A04AF:: @ 81A04AF lockall setvar 0x4001, 1 - jump CaveOfOrigin_1F_EventScript_1A04D3 + goto CaveOfOrigin_1F_EventScript_1A04D3 end CaveOfOrigin_B2F_EventScript_1A04BB:: @ 81A04BB CaveOfOrigin_B3F_EventScript_1A04BB:: @ 81A04BB lockall setvar 0x4002, 1 - jump CaveOfOrigin_B2F_EventScript_1A04D3 + goto CaveOfOrigin_B2F_EventScript_1A04D3 end @ 81A04C7 lockall setvar 0x4003, 1 - jump CaveOfOrigin_B2F_EventScript_1A04D3 + goto CaveOfOrigin_B2F_EventScript_1A04D3 end CaveOfOrigin_1F_EventScript_1A04D3:: @ 81A04D3 @@ -2351,9 +2351,9 @@ MagmaHideout_B1F_EventScript_1A04FD:: @ 81A04FD lock faceplayer setwildbattle SPECIES_ELECTRODE, 30, ITEM_NONE - checksound - pokecry SPECIES_ELECTRODE, 2 - pause 40 + waitse + playpokecry SPECIES_ELECTRODE, 2 + delay 40 waitpokecry setflag 977 setflag 2145 @@ -2367,9 +2367,9 @@ MagmaHideout_B1F_EventScript_1A051B:: @ 81A051B lock faceplayer setwildbattle SPECIES_ELECTRODE, 30, ITEM_NONE - checksound - pokecry SPECIES_ELECTRODE, 2 - pause 40 + waitse + playpokecry SPECIES_ELECTRODE, 2 + delay 40 waitpokecry setflag 978 setflag 2145 @@ -2382,56 +2382,56 @@ Route120_EventScript_1A0539:: @ 81A0539 lock faceplayer setvar 0x8004, 1 - jump Route120_EventScript_1A0594 + goto Route120_EventScript_1A0594 end Route120_EventScript_1A0546:: @ 81A0546 lock faceplayer setvar 0x8004, 2 - jump Route120_EventScript_1A0594 + goto Route120_EventScript_1A0594 end Route120_EventScript_1A0553:: @ 81A0553 lock faceplayer setvar 0x8004, 3 - jump Route120_EventScript_1A0594 + goto Route120_EventScript_1A0594 end Route120_EventScript_1A0560:: @ 81A0560 lock faceplayer setvar 0x8004, 4 - jump Route120_EventScript_1A0594 + goto Route120_EventScript_1A0594 end Route120_EventScript_1A056D:: @ 81A056D lock faceplayer setvar 0x8004, 5 - jump Route120_EventScript_1A0594 + goto Route120_EventScript_1A0594 end Route119_EventScript_1A057A:: @ 81A057A lock faceplayer setvar 0x8004, 6 - jump Route119_EventScript_1A0594 + goto Route119_EventScript_1A0594 end Route119_EventScript_1A0587:: @ 81A0587 lock faceplayer setvar 0x8004, 7 - jump Route119_EventScript_1A0594 + goto Route119_EventScript_1A0594 end Route119_EventScript_1A0594:: @ 81A0594 Route120_EventScript_1A0594:: @ 81A0594 checkitem ITEM_DEVON_SCOPE, 1 compare RESULT, 1 - jumpeq Route119_EventScript_1A05AE + goto_if_eq Route119_EventScript_1A05AE msgbox Route119_Text_171B93, 4 release end @@ -2439,36 +2439,36 @@ Route120_EventScript_1A0594:: @ 81A0594 Route119_EventScript_1A05AE:: @ 81A05AE msgbox Route119_Text_171BB6, 5 compare RESULT, 1 - jumpeq Route119_EventScript_1A05C3 + goto_if_eq Route119_EventScript_1A05C3 release end Route119_EventScript_1A05C3:: @ 81A05C3 msgbox Route119_Text_171BF6, 4 - closebutton - move LAST_TALKED, Route119_Movement_1A0839 - waitmove 0 - move LAST_TALKED, Route119_Movement_1A0662 - waitmove 0 - checksound - pokecry SPECIES_KECLEON, 2 - pause 40 + closemessage + applymovement LAST_TALKED, Route119_Movement_1A0839 + waitmovement 0 + applymovement LAST_TALKED, Route119_Movement_1A0662 + waitmovement 0 + waitse + playpokecry SPECIES_KECLEON, 2 + delay 40 waitpokecry setwildbattle SPECIES_KECLEON, 30, ITEM_NONE compare 0x8004, 1 - callif 1, Route119_EventScript_1A0646 + call_if 1, Route119_EventScript_1A0646 compare 0x8004, 2 - callif 1, Route119_EventScript_1A064A + call_if 1, Route119_EventScript_1A064A compare 0x8004, 3 - callif 1, Route119_EventScript_1A064E + call_if 1, Route119_EventScript_1A064E compare 0x8004, 4 - callif 1, Route119_EventScript_1A0652 + call_if 1, Route119_EventScript_1A0652 compare 0x8004, 5 - callif 1, Route119_EventScript_1A0656 + call_if 1, Route119_EventScript_1A0656 compare 0x8004, 6 - callif 1, Route119_EventScript_1A065A + call_if 1, Route119_EventScript_1A065A compare 0x8004, 7 - callif 1, Route119_EventScript_1A065E + call_if 1, Route119_EventScript_1A065E setflag 2145 dowildbattle clearflag 2145 @@ -2542,10 +2542,10 @@ FallarborTown_House1_EventScript_1A067F:: @ 81A067F GraniteCave_StevensRoom_EventScript_1A067F:: @ 81A067F MtPyre_Summit_EventScript_1A067F:: @ 81A067F SlateportCity_OceanicMuseum_2F_EventScript_1A067F:: @ 81A067F - bufferitem 0, 0x8004 - fanfare 372 + getitemname 0, 0x8004 + playfanfare 372 message FallarborTown_House1_Text_1A1498 - waittext + waitmessage waitfanfare removeitem 0x8004, 1 return @@ -2554,9 +2554,9 @@ EverGrandeCity_DrakesRoom_EventScript_1A0693:: @ 81A0693 EverGrandeCity_GlaciasRoom_EventScript_1A0693:: @ 81A0693 EverGrandeCity_PhoebesRoom_EventScript_1A0693:: @ 81A0693 EverGrandeCity_SidneysRoom_EventScript_1A0693:: @ 81A0693 - move 255, EverGrandeCity_SidneysRoom_Movement_1A0853 - waitmove 0 - playsfx 8 + applymovement 255, EverGrandeCity_SidneysRoom_Movement_1A0853 + waitmovement 0 + playse 8 setmaptile 6, 1, 836, 0 setmaptile 6, 2, 837, 0 setmaptile 0, 2, 734, 1 @@ -2576,9 +2576,9 @@ EverGrandeCity_DrakesRoom_EventScript_1A0710:: @ 81A0710 EverGrandeCity_GlaciasRoom_EventScript_1A0710:: @ 81A0710 EverGrandeCity_PhoebesRoom_EventScript_1A0710:: @ 81A0710 EverGrandeCity_SidneysRoom_EventScript_1A0710:: @ 81A0710 - move 255, EverGrandeCity_SidneysRoom_Movement_1A0847 - waitmove 0 - playsfx 52 + applymovement 255, EverGrandeCity_SidneysRoom_Movement_1A0847 + waitmovement 0 + playse 52 setmaptile 5, 12, 518, 1 setmaptile 6, 12, 518, 1 setmaptile 7, 12, 518, 1 @@ -3264,13 +3264,13 @@ gUnknown_081A14B8:: @ 81A14B8 special ExecuteWhiteOut waitstate compare RESULT, 1 - jumpeq EventScript_1A14CA + goto_if_eq EventScript_1A14CA releaseall end EventScript_1A14CA:: message UnknownString_81A1141 - waittext + waitmessage waitbutton special sub_8081924 waitstate @@ -3619,44 +3619,44 @@ gUnknown_081A2C51:: @ 81A2C51 special sub_80BB70C special sub_80BB63C compare RESULT, 1 - jumpeq EventScript_1A2E45 - checkattack MOVE_SECRET_POWER - setanimation 0, RESULT - bufferattack 1, MOVE_SECRET_POWER + goto_if_eq EventScript_1A2E45 + checkpokemove MOVE_SECRET_POWER + setfieldeffect 0, RESULT + getmovename 1, MOVE_SECRET_POWER compare 0x8007, 1 - jumpeq EventScript_1A2CB0 + goto_if_eq EventScript_1A2CB0 compare 0x8007, 2 - jumpeq EventScript_1A2CB0 + goto_if_eq EventScript_1A2CB0 compare 0x8007, 3 - jumpeq EventScript_1A2CB0 + goto_if_eq EventScript_1A2CB0 compare 0x8007, 4 - jumpeq EventScript_1A2CB0 + goto_if_eq EventScript_1A2CB0 compare 0x8007, 5 - jumpeq EventScript_1A2D08 + goto_if_eq EventScript_1A2D08 compare 0x8007, 6 - jumpeq EventScript_1A2D60 + goto_if_eq EventScript_1A2D60 end EventScript_1A2CB0: lockall compare RESULT, 6 - jumpeq EventScript_1A2CF1 - bufferpartypoke 0, RESULT + goto_if_eq EventScript_1A2CF1 + getpartypokename 0, RESULT msgbox UnknownString_8198F34, 5 compare RESULT, 0 - jumpeq EventScript_1A2F3A + goto_if_eq EventScript_1A2F3A msgbox UsedCutRockSmashText, 4 - closebutton - doanimation 11 + closemessage + dofieldeffect 11 waitstate - jump EventScript_1A2CFA + goto EventScript_1A2CFA end gUnknown_081A2CE6:: @ 81A2CE6 lockall - doanimation 11 + dofieldeffect 11 waitstate - jump EventScript_1A2CFA + goto EventScript_1A2CFA end EventScript_1A2CF1: @@ -3665,29 +3665,29 @@ EventScript_1A2CF1: EventScript_1A2CFA: msgbox UnknownString_8198F6E, 4 - jump EventScript_1A2DB8 + goto EventScript_1A2DB8 end EventScript_1A2D08: lockall compare RESULT, 6 - jumpeq EventScript_1A2D49 - bufferpartypoke 0, RESULT + goto_if_eq EventScript_1A2D49 + getpartypokename 0, RESULT msgbox UnknownString_81A197B, 5 compare RESULT, 0 - jumpeq EventScript_1A2F3A + goto_if_eq EventScript_1A2F3A msgbox UsedCutRockSmashText, 4 - closebutton - doanimation 26 + closemessage + dofieldeffect 26 waitstate - jump EventScript_1A2D52 + goto EventScript_1A2D52 end gUnknown_081A2D3E:: @ 81A2D3E lockall - doanimation 26 + dofieldeffect 26 waitstate - jump EventScript_1A2D52 + goto EventScript_1A2D52 end EventScript_1A2D49: @@ -3696,29 +3696,29 @@ EventScript_1A2D49: EventScript_1A2D52: msgbox UnknownString_81A19C4, 4 - jump EventScript_1A2DB8 + goto EventScript_1A2DB8 end EventScript_1A2D60: lockall compare RESULT, 6 - jumpeq EventScript_1A2DA1 - bufferpartypoke 0, RESULT + goto_if_eq EventScript_1A2DA1 + getpartypokename 0, RESULT msgbox UnknownString_81A1A4B, 5 compare RESULT, 0 - jumpeq EventScript_1A2F3A + goto_if_eq EventScript_1A2F3A msgbox UsedCutRockSmashText, 4 - closebutton - doanimation 27 + closemessage + dofieldeffect 27 waitstate - jump EventScript_1A2DAA + goto EventScript_1A2DAA end gUnknown_081A2D96:: @ 81A2D96 lockall - doanimation 27 + dofieldeffect 27 waitstate - jump EventScript_1A2DAA + goto EventScript_1A2DAA end EventScript_1A2DA1: @@ -3727,12 +3727,12 @@ EventScript_1A2DA1: EventScript_1A2DAA: msgbox UnknownString_81A1AA9, 4 - jump EventScript_1A2DB8 + goto EventScript_1A2DB8 end EventScript_1A2DB8: - closebutton - playsfx 9 + closemessage + playse 9 setvar 0x4097, 0 setflag 173 special sub_80BB8CC @@ -3745,19 +3745,19 @@ EventScript_1A2DB8: end SecretBase_RedCave1_EventScript_1A2DDE:: @ 81A2DDE - move 255, SecretBase_RedCave1_Movement_1A2E11 - waitmove 0 + applymovement 255, SecretBase_RedCave1_Movement_1A2E11 + waitmovement 0 setvar 0x4097, 1 msgbox SecretBase_RedCave1_Text_198F89, 5 compare RESULT, 1 - jumpeq SecretBase_RedCave1_EventScript_1A2E08 - closebutton - playsfx 9 + goto_if_eq SecretBase_RedCave1_EventScript_1A2E08 + closemessage + playse 9 special sub_80BC440 end SecretBase_RedCave1_EventScript_1A2E08:: @ 81A2E08 - closebutton + closemessage setflag 96 special sub_80BBC78 waitstate @@ -3771,10 +3771,10 @@ SecretBase_RedCave1_Movement_1A2E11:: @ 81A2E11 gUnknown_081A2E14:: @ 81A2E14 lockall setvar 0x4097, 1 - playsfx 9 + playse 9 special sub_80BC114 compare RESULT, 0 - jumpeq EventScript_1A2E38 + goto_if_eq EventScript_1A2E38 clearflag 173 special sub_80BBAF0 setvar 0x4089, 0 @@ -3789,63 +3789,63 @@ EventScript_1A2E38: end EventScript_1A2E45: - checkattack MOVE_SECRET_POWER + checkpokemove MOVE_SECRET_POWER compare RESULT, 6 - jumpeq EventScript_1A2EF7 - setanimation 0, RESULT + goto_if_eq EventScript_1A2EF7 + setfieldeffect 0, RESULT setorcopyvar 0x8004, RESULT lockall special GetSecretBaseNearbyMapName msgbox UnknownString_81A3C71, 5 compare RESULT, 0 - jumpeq EventScript_1A2F3A + goto_if_eq EventScript_1A2F3A msgbox UnknownString_81A38FB, 5 compare RESULT, 0 - jumpeq EventScript_1A2F3A + goto_if_eq EventScript_1A2F3A fadescreen 1 special sub_80BC50C - closebutton + closemessage fadescreen 0 msgbox UnknownString_81A3CC9, 5 compare RESULT, 0 - jumpeq EventScript_1A2F3A - bufferpartypoke 0, 0x8004 - bufferattack 1, MOVE_SECRET_POWER + goto_if_eq EventScript_1A2F3A + getpartypokename 0, 0x8004 + getmovename 1, MOVE_SECRET_POWER msgbox UsedCutRockSmashText, 4 - closebutton - closebutton + closemessage + closemessage compare 0x8007, 1 - jumpeq gUnknown_081A2CE6 + goto_if_eq gUnknown_081A2CE6 compare 0x8007, 2 - jumpeq gUnknown_081A2CE6 + goto_if_eq gUnknown_081A2CE6 compare 0x8007, 3 - jumpeq gUnknown_081A2CE6 + goto_if_eq gUnknown_081A2CE6 compare 0x8007, 4 - jumpeq gUnknown_081A2CE6 + goto_if_eq gUnknown_081A2CE6 compare 0x8007, 5 - jumpeq gUnknown_081A2D3E + goto_if_eq gUnknown_081A2D3E compare 0x8007, 6 - jumpeq gUnknown_081A2D96 + goto_if_eq gUnknown_081A2D96 releaseall end EventScript_1A2EF7:: compare 0x8007, 1 - jumpeq EventScript_1A2CF1 + goto_if_eq EventScript_1A2CF1 compare 0x8007, 2 - jumpeq EventScript_1A2CF1 + goto_if_eq EventScript_1A2CF1 compare 0x8007, 3 - jumpeq EventScript_1A2CF1 + goto_if_eq EventScript_1A2CF1 compare 0x8007, 4 - jumpeq EventScript_1A2CF1 + goto_if_eq EventScript_1A2CF1 compare 0x8007, 5 - jumpeq EventScript_1A2D49 + goto_if_eq EventScript_1A2D49 compare 0x8007, 6 - jumpeq EventScript_1A2DA1 + goto_if_eq EventScript_1A2DA1 end EventScript_1A2F3A:: - closebutton + closemessage releaseall end @@ -3879,7 +3879,7 @@ SecretBase_RedCave1_EventScript_1A2F68:: @ 81A2F68 gUnknown_081A2F7B:: @ 81A2F7B setvar 0x8005, 0 - jump EventScript_1A2F86 + goto EventScript_1A2F86 end EventScript_1A2F86: @@ -3888,19 +3888,19 @@ EventScript_1A2F86: gUnknown_081A2F8A:: @ 81A2F8A setvar 0x8004, 0 - jump EventScript_1A2F95 + goto EventScript_1A2F95 end EventScript_1A2F95: special sub_8100A7C compare RESULT, 1 - jumpeq EventScript_1A2FBF + goto_if_eq EventScript_1A2FBF addvar 0x8004, 1 compare 0x8005, 0 - jumpeq EventScript_1A2F95 - disappear 0x8006 + goto_if_eq EventScript_1A2F95 + removeobject 0x8006 setflag 0x8005 - jump EventScript_1A2F95 + goto EventScript_1A2F95 end EventScript_1A2FBF: @@ -3932,45 +3932,45 @@ SecretBase_YellowCave3_EventScript_1A2FC0:: @ 81A2FC0 SecretBase_YellowCave4_EventScript_1A2FC0:: @ 81A2FC0 special sub_80BCE90 compare 0x8004, 0 - jumpeq SecretBase_RedCave1_EventScript_1A3032 + goto_if_eq SecretBase_RedCave1_EventScript_1A3032 compare 0x8004, 1 - jumpeq SecretBase_RedCave1_EventScript_1A30AE + goto_if_eq SecretBase_RedCave1_EventScript_1A30AE compare 0x8004, 2 - jumpeq SecretBase_RedCave1_EventScript_1A312A + goto_if_eq SecretBase_RedCave1_EventScript_1A312A compare 0x8004, 3 - jumpeq SecretBase_RedCave1_EventScript_1A31A6 + goto_if_eq SecretBase_RedCave1_EventScript_1A31A6 compare 0x8004, 4 - jumpeq SecretBase_RedCave1_EventScript_1A3222 + goto_if_eq SecretBase_RedCave1_EventScript_1A3222 compare 0x8004, 5 - jumpeq SecretBase_RedCave1_EventScript_1A329E + goto_if_eq SecretBase_RedCave1_EventScript_1A329E compare 0x8004, 6 - jumpeq SecretBase_RedCave1_EventScript_1A331A + goto_if_eq SecretBase_RedCave1_EventScript_1A331A compare 0x8004, 7 - jumpeq SecretBase_RedCave1_EventScript_1A3396 + goto_if_eq SecretBase_RedCave1_EventScript_1A3396 compare 0x8004, 8 - jumpeq SecretBase_RedCave1_EventScript_1A3412 + goto_if_eq SecretBase_RedCave1_EventScript_1A3412 compare 0x8004, 9 - jumpeq SecretBase_RedCave1_EventScript_1A348E + goto_if_eq SecretBase_RedCave1_EventScript_1A348E end SecretBase_RedCave1_EventScript_1A3032:: @ 81A3032 checkflag 2052 - jumpif 0, SecretBase_RedCave1_EventScript_1A3086 + goto_if 0, SecretBase_RedCave1_EventScript_1A3086 compare RESULT, 1 - jumpeq SecretBase_RedCave1_EventScript_1A30A5 + goto_if_eq SecretBase_RedCave1_EventScript_1A30A5 lock faceplayer msgbox SecretBase_RedCave1_Text_1A1AEA, 5 compare RESULT, 0 - jumpeq SecretBase_RedCave1_EventScript_1A308F + goto_if_eq SecretBase_RedCave1_EventScript_1A308F setvar RESULT, 1 special sub_80BCE4C call S_DoSaveDialog compare RESULT, 0 - jumpeq SecretBase_RedCave1_EventScript_1A308F - hidebox 0, 0, 15, 10 + goto_if_eq SecretBase_RedCave1_EventScript_1A308F + erasebox 0, 0, 15, 10 msgbox SecretBase_RedCave1_Text_1A1B83, 4 - jump SecretBase_RedCave1_EventScript_1A350A + goto SecretBase_RedCave1_EventScript_1A350A end SecretBase_RedCave1_EventScript_1A3086:: @ 81A3086 @@ -3980,7 +3980,7 @@ SecretBase_RedCave1_EventScript_1A3086:: @ 81A3086 SecretBase_RedCave1_EventScript_1A308F:: @ 81A308F setvar RESULT, 0 special sub_80BCE4C - hidebox 0, 0, 15, 10 + erasebox 0, 0, 15, 10 msgbox SecretBase_RedCave1_Text_1A1B97, 2 end @@ -3990,22 +3990,22 @@ SecretBase_RedCave1_EventScript_1A30A5:: @ 81A30A5 SecretBase_RedCave1_EventScript_1A30AE:: @ 81A30AE checkflag 2052 - jumpif 0, SecretBase_RedCave1_EventScript_1A3102 + goto_if 0, SecretBase_RedCave1_EventScript_1A3102 compare RESULT, 1 - jumpeq SecretBase_RedCave1_EventScript_1A3121 + goto_if_eq SecretBase_RedCave1_EventScript_1A3121 lock faceplayer msgbox SecretBase_RedCave1_Text_1A1E67, 5 compare RESULT, 0 - jumpeq SecretBase_RedCave1_EventScript_1A310B + goto_if_eq SecretBase_RedCave1_EventScript_1A310B setvar RESULT, 1 special sub_80BCE4C call S_DoSaveDialog compare RESULT, 0 - jumpeq SecretBase_RedCave1_EventScript_1A310B - hidebox 0, 0, 15, 10 + goto_if_eq SecretBase_RedCave1_EventScript_1A310B + erasebox 0, 0, 15, 10 msgbox SecretBase_RedCave1_Text_1A1F04, 4 - jump SecretBase_RedCave1_EventScript_1A350A + goto SecretBase_RedCave1_EventScript_1A350A end SecretBase_RedCave1_EventScript_1A3102:: @ 81A3102 @@ -4015,7 +4015,7 @@ SecretBase_RedCave1_EventScript_1A3102:: @ 81A3102 SecretBase_RedCave1_EventScript_1A310B:: @ 81A310B setvar RESULT, 0 special sub_80BCE4C - hidebox 0, 0, 15, 10 + erasebox 0, 0, 15, 10 msgbox SecretBase_RedCave1_Text_1A1F2E, 2 end @@ -4025,22 +4025,22 @@ SecretBase_RedCave1_EventScript_1A3121:: @ 81A3121 SecretBase_RedCave1_EventScript_1A312A:: @ 81A312A checkflag 2052 - jumpif 0, SecretBase_RedCave1_EventScript_1A317E + goto_if 0, SecretBase_RedCave1_EventScript_1A317E compare RESULT, 1 - jumpeq SecretBase_RedCave1_EventScript_1A319D + goto_if_eq SecretBase_RedCave1_EventScript_1A319D lock faceplayer msgbox SecretBase_RedCave1_Text_1A218F, 5 compare RESULT, 0 - jumpeq SecretBase_RedCave1_EventScript_1A3187 + goto_if_eq SecretBase_RedCave1_EventScript_1A3187 setvar RESULT, 1 special sub_80BCE4C call S_DoSaveDialog compare RESULT, 0 - jumpeq SecretBase_RedCave1_EventScript_1A3187 - hidebox 0, 0, 15, 10 + goto_if_eq SecretBase_RedCave1_EventScript_1A3187 + erasebox 0, 0, 15, 10 msgbox SecretBase_RedCave1_Text_1A2220, 4 - jump SecretBase_RedCave1_EventScript_1A350A + goto SecretBase_RedCave1_EventScript_1A350A end SecretBase_RedCave1_EventScript_1A317E:: @ 81A317E @@ -4050,7 +4050,7 @@ SecretBase_RedCave1_EventScript_1A317E:: @ 81A317E SecretBase_RedCave1_EventScript_1A3187:: @ 81A3187 setvar RESULT, 0 special sub_80BCE4C - hidebox 0, 0, 15, 10 + erasebox 0, 0, 15, 10 msgbox SecretBase_RedCave1_Text_1A2230, 2 end @@ -4060,22 +4060,22 @@ SecretBase_RedCave1_EventScript_1A319D:: @ 81A319D SecretBase_RedCave1_EventScript_1A31A6:: @ 81A31A6 checkflag 2052 - jumpif 0, SecretBase_RedCave1_EventScript_1A31FA + goto_if 0, SecretBase_RedCave1_EventScript_1A31FA compare RESULT, 1 - jumpeq SecretBase_RedCave1_EventScript_1A3219 + goto_if_eq SecretBase_RedCave1_EventScript_1A3219 lock faceplayer msgbox SecretBase_RedCave1_Text_1A24E1, 5 compare RESULT, 0 - jumpeq SecretBase_RedCave1_EventScript_1A3203 + goto_if_eq SecretBase_RedCave1_EventScript_1A3203 setvar RESULT, 1 special sub_80BCE4C call S_DoSaveDialog compare RESULT, 0 - jumpeq SecretBase_RedCave1_EventScript_1A3203 - hidebox 0, 0, 15, 10 + goto_if_eq SecretBase_RedCave1_EventScript_1A3203 + erasebox 0, 0, 15, 10 msgbox SecretBase_RedCave1_Text_1A256F, 4 - jump SecretBase_RedCave1_EventScript_1A350A + goto SecretBase_RedCave1_EventScript_1A350A end SecretBase_RedCave1_EventScript_1A31FA:: @ 81A31FA @@ -4085,7 +4085,7 @@ SecretBase_RedCave1_EventScript_1A31FA:: @ 81A31FA SecretBase_RedCave1_EventScript_1A3203:: @ 81A3203 setvar RESULT, 0 special sub_80BCE4C - hidebox 0, 0, 15, 10 + erasebox 0, 0, 15, 10 msgbox SecretBase_RedCave1_Text_1A258A, 2 end @@ -4095,22 +4095,22 @@ SecretBase_RedCave1_EventScript_1A3219:: @ 81A3219 SecretBase_RedCave1_EventScript_1A3222:: @ 81A3222 checkflag 2052 - jumpif 0, SecretBase_RedCave1_EventScript_1A3276 + goto_if 0, SecretBase_RedCave1_EventScript_1A3276 compare RESULT, 1 - jumpeq SecretBase_RedCave1_EventScript_1A3295 + goto_if_eq SecretBase_RedCave1_EventScript_1A3295 lock faceplayer msgbox SecretBase_RedCave1_Text_1A2830, 5 compare RESULT, 0 - jumpeq SecretBase_RedCave1_EventScript_1A327F + goto_if_eq SecretBase_RedCave1_EventScript_1A327F setvar RESULT, 1 special sub_80BCE4C call S_DoSaveDialog compare RESULT, 0 - jumpeq SecretBase_RedCave1_EventScript_1A327F - hidebox 0, 0, 15, 10 + goto_if_eq SecretBase_RedCave1_EventScript_1A327F + erasebox 0, 0, 15, 10 msgbox SecretBase_RedCave1_Text_1A28D7, 4 - jump SecretBase_RedCave1_EventScript_1A350A + goto SecretBase_RedCave1_EventScript_1A350A end SecretBase_RedCave1_EventScript_1A3276:: @ 81A3276 @@ -4120,7 +4120,7 @@ SecretBase_RedCave1_EventScript_1A3276:: @ 81A3276 SecretBase_RedCave1_EventScript_1A327F:: @ 81A327F setvar RESULT, 0 special sub_80BCE4C - hidebox 0, 0, 15, 10 + erasebox 0, 0, 15, 10 msgbox SecretBase_RedCave1_Text_1A28F4, 2 end @@ -4130,22 +4130,22 @@ SecretBase_RedCave1_EventScript_1A3295:: @ 81A3295 SecretBase_RedCave1_EventScript_1A329E:: @ 81A329E checkflag 2052 - jumpif 0, SecretBase_RedCave1_EventScript_1A32F2 + goto_if 0, SecretBase_RedCave1_EventScript_1A32F2 compare RESULT, 1 - jumpeq SecretBase_RedCave1_EventScript_1A3311 + goto_if_eq SecretBase_RedCave1_EventScript_1A3311 lock faceplayer msgbox SecretBase_RedCave1_Text_1A1CB2, 5 compare RESULT, 0 - jumpeq SecretBase_RedCave1_EventScript_1A32FB + goto_if_eq SecretBase_RedCave1_EventScript_1A32FB setvar RESULT, 1 special sub_80BCE4C call S_DoSaveDialog compare RESULT, 0 - jumpeq SecretBase_RedCave1_EventScript_1A32FB - hidebox 0, 0, 15, 10 + goto_if_eq SecretBase_RedCave1_EventScript_1A32FB + erasebox 0, 0, 15, 10 msgbox SecretBase_RedCave1_Text_1A1D48, 4 - jump SecretBase_RedCave1_EventScript_1A350A + goto SecretBase_RedCave1_EventScript_1A350A end SecretBase_RedCave1_EventScript_1A32F2:: @ 81A32F2 @@ -4155,7 +4155,7 @@ SecretBase_RedCave1_EventScript_1A32F2:: @ 81A32F2 SecretBase_RedCave1_EventScript_1A32FB:: @ 81A32FB setvar RESULT, 0 special sub_80BCE4C - hidebox 0, 0, 15, 10 + erasebox 0, 0, 15, 10 msgbox SecretBase_RedCave1_Text_1A1D59, 2 end @@ -4165,22 +4165,22 @@ SecretBase_RedCave1_EventScript_1A3311:: @ 81A3311 SecretBase_RedCave1_EventScript_1A331A:: @ 81A331A checkflag 2052 - jumpif 0, SecretBase_RedCave1_EventScript_1A336E + goto_if 0, SecretBase_RedCave1_EventScript_1A336E compare RESULT, 1 - jumpeq SecretBase_RedCave1_EventScript_1A338D + goto_if_eq SecretBase_RedCave1_EventScript_1A338D lock faceplayer msgbox SecretBase_RedCave1_Text_1A2026, 5 compare RESULT, 0 - jumpeq SecretBase_RedCave1_EventScript_1A3377 + goto_if_eq SecretBase_RedCave1_EventScript_1A3377 setvar RESULT, 1 special sub_80BCE4C call S_DoSaveDialog compare RESULT, 0 - jumpeq SecretBase_RedCave1_EventScript_1A3377 - hidebox 0, 0, 15, 10 + goto_if_eq SecretBase_RedCave1_EventScript_1A3377 + erasebox 0, 0, 15, 10 msgbox SecretBase_RedCave1_Text_1A2095, 4 - jump SecretBase_RedCave1_EventScript_1A350A + goto SecretBase_RedCave1_EventScript_1A350A end SecretBase_RedCave1_EventScript_1A336E:: @ 81A336E @@ -4190,7 +4190,7 @@ SecretBase_RedCave1_EventScript_1A336E:: @ 81A336E SecretBase_RedCave1_EventScript_1A3377:: @ 81A3377 setvar RESULT, 0 special sub_80BCE4C - hidebox 0, 0, 15, 10 + erasebox 0, 0, 15, 10 msgbox SecretBase_RedCave1_Text_1A20AE, 2 end @@ -4200,22 +4200,22 @@ SecretBase_RedCave1_EventScript_1A338D:: @ 81A338D SecretBase_RedCave1_EventScript_1A3396:: @ 81A3396 checkflag 2052 - jumpif 0, SecretBase_RedCave1_EventScript_1A33EA + goto_if 0, SecretBase_RedCave1_EventScript_1A33EA compare RESULT, 1 - jumpeq SecretBase_RedCave1_EventScript_1A3409 + goto_if_eq SecretBase_RedCave1_EventScript_1A3409 lock faceplayer msgbox SecretBase_RedCave1_Text_1A236A, 5 compare RESULT, 0 - jumpeq SecretBase_RedCave1_EventScript_1A33F3 + goto_if_eq SecretBase_RedCave1_EventScript_1A33F3 setvar RESULT, 1 special sub_80BCE4C call S_DoSaveDialog compare RESULT, 0 - jumpeq SecretBase_RedCave1_EventScript_1A33F3 - hidebox 0, 0, 15, 10 + goto_if_eq SecretBase_RedCave1_EventScript_1A33F3 + erasebox 0, 0, 15, 10 msgbox SecretBase_RedCave1_Text_1A2405, 4 - jump SecretBase_RedCave1_EventScript_1A350A + goto SecretBase_RedCave1_EventScript_1A350A end SecretBase_RedCave1_EventScript_1A33EA:: @ 81A33EA @@ -4225,7 +4225,7 @@ SecretBase_RedCave1_EventScript_1A33EA:: @ 81A33EA SecretBase_RedCave1_EventScript_1A33F3:: @ 81A33F3 setvar RESULT, 0 special sub_80BCE4C - hidebox 0, 0, 15, 10 + erasebox 0, 0, 15, 10 msgbox SecretBase_RedCave1_Text_1A2420, 2 end @@ -4235,22 +4235,22 @@ SecretBase_RedCave1_EventScript_1A3409:: @ 81A3409 SecretBase_RedCave1_EventScript_1A3412:: @ 81A3412 checkflag 2052 - jumpif 0, SecretBase_RedCave1_EventScript_1A3466 + goto_if 0, SecretBase_RedCave1_EventScript_1A3466 compare RESULT, 1 - jumpeq SecretBase_RedCave1_EventScript_1A3485 + goto_if_eq SecretBase_RedCave1_EventScript_1A3485 lock faceplayer msgbox SecretBase_RedCave1_Text_1A2663, 5 compare RESULT, 0 - jumpeq SecretBase_RedCave1_EventScript_1A346F + goto_if_eq SecretBase_RedCave1_EventScript_1A346F setvar RESULT, 1 special sub_80BCE4C call S_DoSaveDialog compare RESULT, 0 - jumpeq SecretBase_RedCave1_EventScript_1A346F - hidebox 0, 0, 15, 10 + goto_if_eq SecretBase_RedCave1_EventScript_1A346F + erasebox 0, 0, 15, 10 msgbox SecretBase_RedCave1_Text_1A2710, 4 - jump SecretBase_RedCave1_EventScript_1A350A + goto SecretBase_RedCave1_EventScript_1A350A end SecretBase_RedCave1_EventScript_1A3466:: @ 81A3466 @@ -4260,7 +4260,7 @@ SecretBase_RedCave1_EventScript_1A3466:: @ 81A3466 SecretBase_RedCave1_EventScript_1A346F:: @ 81A346F setvar RESULT, 0 special sub_80BCE4C - hidebox 0, 0, 15, 10 + erasebox 0, 0, 15, 10 msgbox SecretBase_RedCave1_Text_1A2736, 2 end @@ -4270,22 +4270,22 @@ SecretBase_RedCave1_EventScript_1A3485:: @ 81A3485 SecretBase_RedCave1_EventScript_1A348E:: @ 81A348E checkflag 2052 - jumpif 0, SecretBase_RedCave1_EventScript_1A34E2 + goto_if 0, SecretBase_RedCave1_EventScript_1A34E2 compare RESULT, 1 - jumpeq SecretBase_RedCave1_EventScript_1A3501 + goto_if_eq SecretBase_RedCave1_EventScript_1A3501 lock faceplayer msgbox SecretBase_RedCave1_Text_1A2A13, 5 compare RESULT, 0 - jumpeq SecretBase_RedCave1_EventScript_1A34EB + goto_if_eq SecretBase_RedCave1_EventScript_1A34EB setvar RESULT, 1 special sub_80BCE4C call S_DoSaveDialog compare RESULT, 0 - jumpeq SecretBase_RedCave1_EventScript_1A34EB - hidebox 0, 0, 15, 10 + goto_if_eq SecretBase_RedCave1_EventScript_1A34EB + erasebox 0, 0, 15, 10 msgbox SecretBase_RedCave1_Text_1A2AE2, 4 - jump SecretBase_RedCave1_EventScript_1A350A + goto SecretBase_RedCave1_EventScript_1A350A end SecretBase_RedCave1_EventScript_1A34E2:: @ 81A34E2 @@ -4295,7 +4295,7 @@ SecretBase_RedCave1_EventScript_1A34E2:: @ 81A34E2 SecretBase_RedCave1_EventScript_1A34EB:: @ 81A34EB setvar RESULT, 0 special sub_80BCE4C - hidebox 0, 0, 15, 10 + erasebox 0, 0, 15, 10 msgbox SecretBase_RedCave1_Text_1A2AFB, 2 end @@ -4406,7 +4406,7 @@ FallarborTown_ContestLobby_EventScript_1ADE46:: @ 81ADE46 SlateportCity_OceanicMuseum_1F_EventScript_1ADE46:: @ 81ADE46 SlateportCity_PokemonFanClub_EventScript_1ADE46:: @ 81ADE46 special sub_80BDE48 - inccounter GAME_STAT_GOT_INTERVIEWED + incrementgamestat GAME_STAT_GOT_INTERVIEWED release end @@ -4414,13 +4414,13 @@ SlateportCity_PokemonFanClub_EventScript_1ADE4D:: @ 81ADE4D setvar 0x8005, 1 special sub_80BF2C4 compare RESULT, 1 - jumpeq SlateportCity_PokemonFanClub_EventScript_1ADED6 + goto_if_eq SlateportCity_PokemonFanClub_EventScript_1ADED6 copyvar 0x8009, 0x8006 msgbox SlateportCity_PokemonFanClub_Text_1A8704, 5 compare RESULT, 1 - jumpeq SlateportCity_PokemonFanClub_EventScript_1ADE84 + goto_if_eq SlateportCity_PokemonFanClub_EventScript_1ADE84 compare RESULT, 0 - jumpeq SlateportCity_PokemonFanClub_EventScript_1ADEB9 + goto_if_eq SlateportCity_PokemonFanClub_EventScript_1ADEB9 end SlateportCity_PokemonFanClub_EventScript_1ADE84:: @ 81ADE84 @@ -4432,9 +4432,9 @@ SlateportCity_PokemonFanClub_EventScript_1ADE84:: @ 81ADE84 lock faceplayer compare RESULT, 1 - jumpeq SlateportCity_PokemonFanClub_EventScript_1ADEC3 + goto_if_eq SlateportCity_PokemonFanClub_EventScript_1ADEC3 compare RESULT, 0 - jumpeq SlateportCity_PokemonFanClub_EventScript_1ADEB9 + goto_if_eq SlateportCity_PokemonFanClub_EventScript_1ADEB9 end SlateportCity_PokemonFanClub_EventScript_1ADEB9:: @ 81ADEB9 @@ -4445,7 +4445,7 @@ SlateportCity_PokemonFanClub_EventScript_1ADEB9:: @ 81ADEB9 SlateportCity_PokemonFanClub_EventScript_1ADEC3:: @ 81ADEC3 msgbox SlateportCity_PokemonFanClub_Text_1A8818, 4 setvar 0x8005, 1 - jump SlateportCity_PokemonFanClub_EventScript_1ADE46 + goto SlateportCity_PokemonFanClub_EventScript_1ADE46 end SlateportCity_PokemonFanClub_EventScript_1ADED6:: @ 81ADED6 @@ -4459,24 +4459,24 @@ SlateportCity_OceanicMuseum_1F_EventScript_1ADEE0:: @ 81ADEE0 setvar 0x8005, 2 special sub_80BF2C4 compare RESULT, 1 - jumpeq SlateportCity_OceanicMuseum_1F_EventScript_1ADF96 + goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_1ADF96 copyvar 0x8009, 0x8006 checkflag 105 - jumpeq SlateportCity_OceanicMuseum_1F_EventScript_1ADF25 + goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_1ADF25 setflag 105 msgbox SlateportCity_OceanicMuseum_1F_Text_1A927F, 5 compare RESULT, 1 - jumpeq SlateportCity_OceanicMuseum_1F_EventScript_1ADF44 + goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_1ADF44 compare RESULT, 0 - jumpeq SlateportCity_OceanicMuseum_1F_EventScript_1ADF79 + goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_1ADF79 end SlateportCity_OceanicMuseum_1F_EventScript_1ADF25:: @ 81ADF25 msgbox SlateportCity_OceanicMuseum_1F_Text_1A934C, 5 compare RESULT, 1 - jumpeq SlateportCity_OceanicMuseum_1F_EventScript_1ADF44 + goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_1ADF44 compare RESULT, 0 - jumpeq SlateportCity_OceanicMuseum_1F_EventScript_1ADF79 + goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_1ADF79 end SlateportCity_OceanicMuseum_1F_EventScript_1ADF44:: @ 81ADF44 @@ -4488,9 +4488,9 @@ SlateportCity_OceanicMuseum_1F_EventScript_1ADF44:: @ 81ADF44 lock faceplayer compare RESULT, 1 - jumpeq SlateportCity_OceanicMuseum_1F_EventScript_1ADF83 + goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_1ADF83 compare RESULT, 0 - jumpeq SlateportCity_OceanicMuseum_1F_EventScript_1ADF79 + goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_1ADF79 end SlateportCity_OceanicMuseum_1F_EventScript_1ADF79:: @ 81ADF79 @@ -4501,7 +4501,7 @@ SlateportCity_OceanicMuseum_1F_EventScript_1ADF79:: @ 81ADF79 SlateportCity_OceanicMuseum_1F_EventScript_1ADF83:: @ 81ADF83 msgbox SlateportCity_OceanicMuseum_1F_Text_1A949A, 4 setvar 0x8005, 2 - jump SlateportCity_OceanicMuseum_1F_EventScript_1ADE46 + goto SlateportCity_OceanicMuseum_1F_EventScript_1ADE46 end SlateportCity_OceanicMuseum_1F_EventScript_1ADF96:: @ 81ADF96 @@ -4512,19 +4512,19 @@ SlateportCity_OceanicMuseum_1F_EventScript_1ADF96:: @ 81ADF96 SlateportCity_PokemonFanClub_EventScript_1ADFA0:: @ 81ADFA0 lock faceplayer - specialval RESULT, sub_80BF544 + specialvar RESULT, sub_80BF544 compare RESULT, 0 - jumpeq SlateportCity_PokemonFanClub_EventScript_1ADE4D + goto_if_eq SlateportCity_PokemonFanClub_EventScript_1ADE4D setvar 0x8005, 3 special sub_80BF2C4 compare RESULT, 1 - jumpeq SlateportCity_PokemonFanClub_EventScript_1AE0AC + goto_if_eq SlateportCity_PokemonFanClub_EventScript_1AE0AC copyvar 0x8009, 0x8006 msgbox SlateportCity_PokemonFanClub_Text_1A82F1, 5 compare RESULT, 1 - jumpeq SlateportCity_PokemonFanClub_EventScript_1ADFE9 + goto_if_eq SlateportCity_PokemonFanClub_EventScript_1ADFE9 compare RESULT, 0 - jumpeq SlateportCity_PokemonFanClub_EventScript_1AE0A2 + goto_if_eq SlateportCity_PokemonFanClub_EventScript_1AE0A2 end SlateportCity_PokemonFanClub_EventScript_1ADFE9:: @ 81ADFE9 @@ -4539,17 +4539,17 @@ SlateportCity_PokemonFanClub_EventScript_1ADFE9:: @ 81ADFE9 SlateportCity_PokemonFanClub_EventScript_1AE020:: @ 81AE020 msgbox SlateportCity_PokemonFanClub_Text_1A8414, 4 - jump SlateportCity_PokemonFanClub_EventScript_1AE04A + goto SlateportCity_PokemonFanClub_EventScript_1AE04A end SlateportCity_PokemonFanClub_EventScript_1AE02E:: @ 81AE02E msgbox SlateportCity_PokemonFanClub_Text_1A8470, 4 - jump SlateportCity_PokemonFanClub_EventScript_1AE04A + goto SlateportCity_PokemonFanClub_EventScript_1AE04A end SlateportCity_PokemonFanClub_EventScript_1AE03C:: @ 81AE03C msgbox SlateportCity_PokemonFanClub_Text_1A84D5, 4 - jump SlateportCity_PokemonFanClub_EventScript_1AE04A + goto SlateportCity_PokemonFanClub_EventScript_1AE04A end SlateportCity_PokemonFanClub_EventScript_1AE04A:: @ 81AE04A @@ -4560,18 +4560,18 @@ SlateportCity_PokemonFanClub_EventScript_1AE04A:: @ 81AE04A lock faceplayer compare RESULT, 0 - jumpeq SlateportCity_PokemonFanClub_EventScript_1AE0A2 + goto_if_eq SlateportCity_PokemonFanClub_EventScript_1AE0A2 msgbox SlateportCity_PokemonFanClub_Text_1A852D, 4 setvar 0x8006, 1 call SlateportCity_PokemonFanClub_EventScript_1A00F3 lock faceplayer compare RESULT, 0 - jumpeq SlateportCity_PokemonFanClub_EventScript_1AE0A2 + goto_if_eq SlateportCity_PokemonFanClub_EventScript_1AE0A2 msgbox SlateportCity_PokemonFanClub_Text_1A85A6, 4 copyvar 0x8007, 0x800a setvar 0x8005, 3 - jump SlateportCity_PokemonFanClub_EventScript_1ADE46 + goto SlateportCity_PokemonFanClub_EventScript_1ADE46 end SlateportCity_PokemonFanClub_EventScript_1AE0A2:: @ 81AE0A2 @@ -4591,17 +4591,17 @@ VerdanturfTown_ContestLobby_EventScript_1AE0B6:: @ 81AE0B6 lock faceplayer checkflag 2 - jumpeq FallarborTown_ContestLobby_EventScript_1AE17E + goto_if_eq FallarborTown_ContestLobby_EventScript_1AE17E setvar 0x8005, 6 special sub_80BF2C4 compare RESULT, 1 - jumpeq FallarborTown_ContestLobby_EventScript_1AE17E + goto_if_eq FallarborTown_ContestLobby_EventScript_1AE17E copyvar 0x8009, 0x8006 msgbox FallarborTown_ContestLobby_Text_1A6F7C, 5 compare RESULT, 1 - jumpeq FallarborTown_ContestLobby_EventScript_1AE0F8 + goto_if_eq FallarborTown_ContestLobby_EventScript_1AE0F8 compare RESULT, 0 - jumpeq FallarborTown_ContestLobby_EventScript_1AE12D + goto_if_eq FallarborTown_ContestLobby_EventScript_1AE12D end FallarborTown_ContestLobby_EventScript_1AE0F8:: @ 81AE0F8 @@ -4613,9 +4613,9 @@ FallarborTown_ContestLobby_EventScript_1AE0F8:: @ 81AE0F8 lock faceplayer compare RESULT, 1 - jumpeq FallarborTown_ContestLobby_EventScript_1AE137 + goto_if_eq FallarborTown_ContestLobby_EventScript_1AE137 compare RESULT, 0 - jumpeq FallarborTown_ContestLobby_EventScript_1AE12D + goto_if_eq FallarborTown_ContestLobby_EventScript_1AE12D end FallarborTown_ContestLobby_EventScript_1AE12D:: @ 81AE12D @@ -4634,11 +4634,11 @@ FallarborTown_ContestLobby_EventScript_1AE137:: @ 81AE137 lock faceplayer compare RESULT, 0 - jumpeq FallarborTown_ContestLobby_EventScript_1AE12D + goto_if_eq FallarborTown_ContestLobby_EventScript_1AE12D msgbox FallarborTown_ContestLobby_Text_1A7153, 4 setflag 2 setvar 0x8005, 6 - jump FallarborTown_ContestLobby_EventScript_1ADE46 + goto FallarborTown_ContestLobby_EventScript_1ADE46 end FallarborTown_ContestLobby_EventScript_1AE17E:: @ 81AE17E @@ -4651,11 +4651,11 @@ LilycoveCity_ContestLobby_EventScript_1AE188:: @ 81AE188 SlateportCity_ContestLobby_EventScript_1AE188:: @ 81AE188 VerdanturfTown_ContestLobby_EventScript_1AE188:: @ 81AE188 compare 0x4086, 2 - jumpif 5, FallarborTown_ContestLobby_EventScript_1AE1FE + goto_if 5, FallarborTown_ContestLobby_EventScript_1AE1FE setvar 0x8005, 6 special sub_80BF2C4 compare RESULT, 1 - jumpeq FallarborTown_ContestLobby_EventScript_1AE1FE + goto_if_eq FallarborTown_ContestLobby_EventScript_1AE1FE switch 0x4088 case 0, FallarborTown_ContestLobby_EventScript_1AE1FE case 2, FallarborTown_ContestLobby_EventScript_1AE1EE @@ -4688,28 +4688,28 @@ BattleTower_Lobby_EventScript_1AE1FF:: @ 81AE1FF lock faceplayer checkflag 2 - jumpeq BattleTower_Lobby_EventScript_1AE2E3 + goto_if_eq BattleTower_Lobby_EventScript_1AE2E3 setvar 0x8005, 7 special sub_80BF2C4 compare RESULT, 1 - jumpeq BattleTower_Lobby_EventScript_1AE2E3 + goto_if_eq BattleTower_Lobby_EventScript_1AE2E3 copyvar 0x8009, 0x8006 msgbox BattleTower_Lobby_Text_1A776D, 5 compare RESULT, 1 - jumpeq BattleTower_Lobby_EventScript_1AE241 + goto_if_eq BattleTower_Lobby_EventScript_1AE241 compare RESULT, 0 - jumpeq BattleTower_Lobby_EventScript_1AE297 + goto_if_eq BattleTower_Lobby_EventScript_1AE297 end BattleTower_Lobby_EventScript_1AE241:: @ 81AE241 message BattleTower_Lobby_Text_1A7823 - waittext + waitmessage multichoice 19, 8, 45, 1 copyvar 0x8008, RESULT compare RESULT, 0 - callif 1, BattleTower_Lobby_EventScript_1AE2A1 + call_if 1, BattleTower_Lobby_EventScript_1AE2A1 compare RESULT, 1 - callif 1, BattleTower_Lobby_EventScript_1AE2AA + call_if 1, BattleTower_Lobby_EventScript_1AE2AA msgbox BattleTower_Lobby_Text_1A79EB, 4 setvar 0x8004, 12 copyvar 0x8005, 0x8009 @@ -4717,9 +4717,9 @@ BattleTower_Lobby_EventScript_1AE241:: @ 81AE241 lock faceplayer compare RESULT, 1 - jumpeq BattleTower_Lobby_EventScript_1AE2B3 + goto_if_eq BattleTower_Lobby_EventScript_1AE2B3 compare RESULT, 0 - jumpeq BattleTower_Lobby_EventScript_1AE2D9 + goto_if_eq BattleTower_Lobby_EventScript_1AE2D9 end BattleTower_Lobby_EventScript_1AE297:: @ 81AE297 @@ -4737,12 +4737,12 @@ BattleTower_Lobby_EventScript_1AE2AA:: @ 81AE2AA BattleTower_Lobby_EventScript_1AE2B3:: @ 81AE2B3 compare RESULT, 0 - jumpeq BattleTower_Lobby_EventScript_1AE2D9 + goto_if_eq BattleTower_Lobby_EventScript_1AE2D9 msgbox BattleTower_Lobby_Text_1A7A6E, 4 setflag 2 copyvar 0x8004, 0x8008 setvar 0x8005, 7 - jump BattleTower_Lobby_EventScript_1ADE46 + goto BattleTower_Lobby_EventScript_1ADE46 end BattleTower_Lobby_EventScript_1AE2D9:: @ 81AE2D9 @@ -4757,11 +4757,11 @@ BattleTower_Lobby_EventScript_1AE2E3:: @ 81AE2E3 BattleTower_Lobby_EventScript_1AE2ED:: @ 81AE2ED compare 0x40bc, 0 - jumpeq BattleTower_Lobby_EventScript_1AE30F + goto_if_eq BattleTower_Lobby_EventScript_1AE30F setvar 0x8005, 7 special sub_80BF2C4 compare RESULT, 1 - jumpeq BattleTower_Lobby_EventScript_1AE30F + goto_if_eq BattleTower_Lobby_EventScript_1AE30F clearflag 918 return @@ -4795,8 +4795,8 @@ BattleTower_Lobby_EventScript_1AE30F:: @ 81AE30F .include "data/text/magma_summit.inc" gUnknown_081B694A:: @ 81B694A - lighten 1 - darken 1 + animdarklevel 1 + setdarklevel 1 end .include "data/scripts/players_house.inc" @@ -4823,25 +4823,25 @@ Text_RepelWoreOff: @ 81C33EF MauvilleCity_GameCorner_EventScript_1C407E:: @ 81C407E checkitem ITEM_COIN_CASE, 1 compare RESULT, 0 - jumpeq MauvilleCity_GameCorner_EventScript_1572B5 + goto_if_eq MauvilleCity_GameCorner_EventScript_1572B5 setvar 0x8004, 0 - event_96 2 + getpricereduction 2 compare RESULT, 0 - jumpeq MauvilleCity_GameCorner_EventScript_1C40DA + goto_if_eq MauvilleCity_GameCorner_EventScript_1C40DA addvar 0x8004, 128 - jump MauvilleCity_GameCorner_EventScript_1C40DA + goto MauvilleCity_GameCorner_EventScript_1C40DA end MauvilleCity_GameCorner_EventScript_1C40AC:: @ 81C40AC checkitem ITEM_COIN_CASE, 1 compare RESULT, 0 - jumpeq MauvilleCity_GameCorner_EventScript_1572B5 + goto_if_eq MauvilleCity_GameCorner_EventScript_1572B5 setvar 0x8004, 1 - event_96 2 + getpricereduction 2 compare RESULT, 0 - jumpeq MauvilleCity_GameCorner_EventScript_1C40DA + goto_if_eq MauvilleCity_GameCorner_EventScript_1C40DA addvar 0x8004, 128 - jump MauvilleCity_GameCorner_EventScript_1C40DA + goto MauvilleCity_GameCorner_EventScript_1C40DA end MauvilleCity_GameCorner_EventScript_1C40DA:: @ 81C40DA @@ -4902,22 +4902,22 @@ SkyPillar_4F_MapScript1_1C6BBF:: @ 81C6BBF S_FallDownHole:: @ 81C6BC5 lockall - pause 20 - move 255, GraniteCave_B1F_Movement_1C6BF7 - waitmove 0 - playsfx 43 - pause 60 + delay 20 + applymovement 255, GraniteCave_B1F_Movement_1C6BF7 + waitmovement 0 + playse 43 + delay 60 warphole UNDEFINED waitstate end gUnknown_081C6BDE:: @ 81C6BDE lockall - pause 20 - move 255, GraniteCave_B1F_Movement_1C6BF7 - waitmove 0 - playsfx 43 - pause 60 + delay 20 + applymovement 255, GraniteCave_B1F_Movement_1C6BF7 + waitmovement 0 + playse 43 + delay 60 special sp13F_fall_to_last_warp waitstate end @@ -4949,9 +4949,9 @@ gUnknown_081C6C02:: @ 81C6C02 @ 81C6C1D lockall - braillemsg Underwater_SealedChamber_Braille_1C533D + braillemessage Underwater_SealedChamber_Braille_1C533D waitbutton - hidebox 0, 0, 29, 19 + erasebox 0, 0, 29, 19 releaseall end diff --git a/data-de/field_move_scripts.inc b/data-de/field_move_scripts.inc index 017198c2d..497408299 100644 --- a/data-de/field_move_scripts.inc +++ b/data-de/field_move_scripts.inc @@ -1,34 +1,34 @@ S_CuttableTree:: @ 81B0DCC lockall checkflag 2055 - jumpif 0, CannotUseCut - checkattack MOVE_CUT + goto_if 0, CannotUseCut + checkpokemove MOVE_CUT compare RESULT, 6 - jumpeq CannotUseCut - setanimation 0, RESULT - bufferpartypoke 0, RESULT - bufferattack 1, MOVE_CUT + goto_if_eq CannotUseCut + setfieldeffect 0, RESULT + getpartypokename 0, RESULT + getmovename 1, MOVE_CUT msgbox UseCutPromptText, 5 compare RESULT, 0 - jumpeq Cut_ChoseNo + goto_if_eq Cut_ChoseNo msgbox UsedCutRockSmashText, 4 - closebutton - doanimation 2 + closemessage + dofieldeffect 2 waitstate - jump DoTreeCutMovement + goto DoTreeCutMovement end S_UseCut:: @ 81B0E16 lockall - doanimation 2 + dofieldeffect 2 waitstate - jump DoTreeCutMovement + goto DoTreeCutMovement end DoTreeCutMovement: @ 81B0E21 - move LAST_TALKED, TreeCutMovement @ tree cut animation - waitmove 0 - disappear LAST_TALKED @ tree disappears + applymovement LAST_TALKED, TreeCutMovement @ tree cut animation + waitmovement 0 + removeobject LAST_TALKED @ tree disappears releaseall end @@ -42,7 +42,7 @@ CannotUseCut: @ 81B0E32 end Cut_ChoseNo: @ 81B0E3C - closebutton + closemessage releaseall end @@ -62,40 +62,40 @@ CannotUseCutText: @ 81B0E8E S_BreakableRock:: @ 81B0EB7 lockall checkflag 2057 - jumpif 0, CannotUseRockSmash - checkattack MOVE_ROCK_SMASH + goto_if 0, CannotUseRockSmash + checkpokemove MOVE_ROCK_SMASH compare RESULT, 6 - jumpeq CannotUseRockSmash - setanimation 0, RESULT - bufferpartypoke 0, RESULT - bufferattack 1, MOVE_ROCK_SMASH + goto_if_eq CannotUseRockSmash + setfieldeffect 0, RESULT + getpartypokename 0, RESULT + getmovename 1, MOVE_ROCK_SMASH msgbox UseRockSmashPromptText, 5 compare RESULT, 0 - jumpeq RockSmash_ChoseNo + goto_if_eq RockSmash_ChoseNo msgbox UsedCutRockSmashText, 4 - closebutton - doanimation 37 + closemessage + dofieldeffect 37 waitstate - jump DoRockSmashMovement + goto DoRockSmashMovement end S_UseRockSmash:: @ 81B0F01 lockall - doanimation 37 + dofieldeffect 37 waitstate - jump DoRockSmashMovement + goto DoRockSmashMovement end DoRockSmashMovement: @ 81B0F0C - move LAST_TALKED, RockSmashMovement - waitmove 0 - disappear LAST_TALKED - specialval RESULT, sub_810F5BC + applymovement LAST_TALKED, RockSmashMovement + waitmovement 0 + removeobject LAST_TALKED + specialvar RESULT, sub_810F5BC compare RESULT, 1 - jumpeq DoRockSmashMovement_Done + goto_if_eq DoRockSmashMovement_Done special ScrSpecial_RockSmashWildEncounter compare RESULT, 0 - jumpeq DoRockSmashMovement_Done + goto_if_eq DoRockSmashMovement_Done waitstate releaseall end @@ -114,7 +114,7 @@ CannotUseRockSmash: @ 81B0F3E end RockSmash_ChoseNo: @ 81B0F48 - closebutton + closemessage releaseall end @@ -129,27 +129,27 @@ CannotUseRockSmashText: @ 81B0F90 S_PushableBoulder:: @ 81B0FCB lockall checkflag 2058 - jumpif 0, CannotUseStrength + goto_if 0, CannotUseStrength checkflag 2089 - jumpeq AlreadyUsedStrength - checkattack 70 + goto_if_eq AlreadyUsedStrength + checkpokemove 70 compare RESULT, 6 - jumpeq CannotUseStrength - setanimation 0, RESULT + goto_if_eq CannotUseStrength + setfieldeffect 0, RESULT msgbox UseStrengthPromptText, 5 compare RESULT, 0 - jumpeq Strength_ChoseNo - closebutton - doanimation 40 + goto_if_eq Strength_ChoseNo + closemessage + dofieldeffect 40 waitstate - jump UsedStrength + goto UsedStrength end S_UseStrength:: @ 81B100E lockall - doanimation 40 + dofieldeffect 40 waitstate - jump UsedStrength + goto UsedStrength end UsedStrength: @ 81B1019 @@ -169,7 +169,7 @@ AlreadyUsedStrength: @ 81B1030 end Strength_ChoseNo: @ 81B103A - closebutton + closemessage releaseall end @@ -193,17 +193,17 @@ AlreadyUsedStrengthText: @ 81B1127 S_UseWaterfall:: @ 81B115A lockall - checkattack MOVE_WATERFALL + checkpokemove MOVE_WATERFALL compare RESULT, 6 - jumpeq Waterfall_NoMonKnows - bufferpartypoke 0, RESULT - setanimation 0, RESULT + goto_if_eq Waterfall_NoMonKnows + getpartypokename 0, RESULT + setfieldeffect 0, RESULT msgbox UseWaterfallPromptText, 5 compare RESULT, 0 - jumpeq Waterfall_Done + goto_if_eq Waterfall_Done msgbox UsedWaterfallText, 4 - doanimation 43 - jump Waterfall_Done + dofieldeffect 43 + goto Waterfall_Done S_CannotUseWaterfall:: @ 81B1194 lockall @@ -226,18 +226,18 @@ UsedWaterfallText: @ 81B120D UseDiveScript:: @ 81B1220 lockall - checkattack MOVE_DIVE + checkpokemove MOVE_DIVE compare RESULT, 6 - jumpeq CannotUseDive - bufferpartypoke 0, RESULT - setanimation 0, RESULT - setanimation 1, 1 + goto_if_eq CannotUseDive + getpartypokename 0, RESULT + setfieldeffect 0, RESULT + setfieldeffect 1, 1 msgbox UseDivePromptText, 5 compare RESULT, 0 - jumpeq Dive_Done + goto_if_eq Dive_Done msgbox UsedDiveText, 4 - doanimation 44 - jump Dive_Done + dofieldeffect 44 + goto Dive_Done lockall CannotUseDive: @ 81B125F @@ -249,23 +249,23 @@ Dive_Done: @ 81B1267 S_UseDiveUnderwater:: @ 81B1269 lockall - checkattack MOVE_DIVE + checkpokemove MOVE_DIVE compare RESULT, 6 - jumpeq UnderwaterCannotUseDive - bufferpartypoke 0, RESULT - setanimation 0, RESULT - setanimation 1, 1 + goto_if_eq UnderwaterCannotUseDive + getpartypokename 0, RESULT + setfieldeffect 0, RESULT + setfieldeffect 1, 1 msgbox UnderwaterUseDivePromptText, 5 compare RESULT, 0 - jumpeq UnderwaterDive_Done + goto_if_eq UnderwaterDive_Done msgbox UsedDiveText, 4 - doanimation 44 - jump UnderwaterDive_Done + dofieldeffect 44 + goto UnderwaterDive_Done UnderwaterCannotUseDive: @ 81B12A7 lockall msgbox UnderwaterCannotUseDiveText, 4 - jump UnderwaterDive_Done + goto UnderwaterDive_Done @ not used SurfacingBlocked: @ 81B12B5 diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 0945d75c8..e046794b3 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -3485,7 +3485,7 @@ BattleScript_PerishSongTimerGoesDown:: @ 81D921D waitmessage 64 end2 -gUnknown_081D9224:: @ 81D9224 +BattleScript_AllStatsUp:: @ 81D9224 jumpifstat USER, 3, 1, 12, BattleScript_1D9251 jumpifstat USER, 3, 2, 12, BattleScript_1D9251 jumpifstat USER, 3, 3, 12, BattleScript_1D9251 @@ -3659,7 +3659,7 @@ BattleScript_1D93EC: @ 81D93EC waitmessage 64 jump BattleScript_EndTurn -gUnknown_081D93FA:: @ 81D93FA +BattleScript_AtkDefDown:: @ 81D93FA setbyte 0x20160dc, 0 playstatchangeanimation USER, 6, 13 playstatchangeanimation USER, 2, 9 @@ -3731,7 +3731,7 @@ BattleScript_OneHitKOMsg:: @ 81D94A9 waitmessage 64 return -gUnknown_081D94B0:: @ 81D94B0 +BattleScript_SAtkDown2:: @ 81D94B0 setbyte 0x20160dc, 0 playstatchangeanimation USER, 16, 11 setbyte 0x201601e, 164 diff --git a/data/event_scripts.s b/data/event_scripts.s index 0a8390a8f..854b52c9e 100644 --- a/data/event_scripts.s +++ b/data/event_scripts.s @@ -386,27 +386,27 @@ gStdScripts_End:: gUnknown_0815F36C:: @ 815F36C lockall - playsfx 2 + playse 2 message UnknownString_81A3A72 - doanimation 61 + dofieldeffect 61 waitstate - waittext + waitmessage waitbutton - playsfx 5 - jump EventScript_15F384 + playse 5 + goto EventScript_15F384 end EventScript_15F384: message UnknownString_81A3A87 - waittext + waitmessage checkflag 268 - jumpeq EventScript_15F3A0 - jump EventScript_15F3E2 + goto_if_eq EventScript_15F3A0 + goto EventScript_15F3E2 end gUnknown_0815F399:: @ 815F399 lockall - jump EventScript_15F384 + goto EventScript_15F384 end EventScript_15F3A0: @@ -431,8 +431,8 @@ EventScript_15F3E2: EventScript_15F419: msgbox UnknownString_81A38FB, 5 compare RESULT, 0 - jumpeq EventScript_15F384 - closebutton + goto_if_eq EventScript_15F384 + closemessage special SecretBasePC_PackUp releaseall end @@ -448,18 +448,18 @@ EventScript_15F436: gUnknown_0815F43A:: @ 815F43A lockall message UnknownString_81A3A72 - playsfx 2 - doanimation 61 + playse 2 + dofieldeffect 61 waitstate - waittext + waitmessage waitbutton - playsfx 5 - jump EventScript_15F452 + playse 5 + goto EventScript_15F452 end EventScript_15F452: message UnknownString_81A3A87 - waittext + waitmessage multichoice 0, 0, 7, 0 switch RESULT case 0, EventScript_15F4A1 @@ -471,19 +471,19 @@ EventScript_15F452: gUnknown_0815F49A:: @ 815F49A lockall - jump EventScript_15F452 + goto EventScript_15F452 end EventScript_15F4A1: special sub_80BC56C compare RESULT, 1 - jumpeq EventScript_15F4E0 + goto_if_eq EventScript_15F4E0 compare RESULT, 2 - jumpeq EventScript_15F503 + goto_if_eq EventScript_15F503 special sub_80BC224 msgbox UnknownString_81A3958, 5 compare RESULT, 0 - jumpeq EventScript_15F452 + goto_if_eq EventScript_15F452 msgbox UnknownString_81A3A22, 3 special sub_80BC5BC special sub_80C683C @@ -493,7 +493,7 @@ EventScript_15F4A1: EventScript_15F4E0: msgbox UnknownString_81A3982, 5 compare RESULT, 0 - jumpeq EventScript_15F452 + goto_if_eq EventScript_15F452 msgbox UnknownString_81A3A3A, 3 special sub_80BC5BC special sub_80C683C @@ -503,37 +503,37 @@ EventScript_15F4E0: EventScript_15F503: msgbox UnknownString_81A39C0, 3 special sub_80C683C - closebutton + closemessage releaseall end EventScript_15F511: message UnknownString_81A3AA2 - waittext - jump EventScript_15F452 + waitmessage + goto EventScript_15F452 end EventScript_15F51D: special sub_80C683C - closebutton + closemessage releaseall end gUnknown_0815F523:: @ 815F523 - doanimation 52 + dofieldeffect 52 waitstate end gUnknown_0815F528:: @ 815F528 special GetShieldToyTVDecorationInfo compare RESULT, 0 - jumpeq EventScript_15F558 + goto_if_eq EventScript_15F558 compare RESULT, 1 - jumpeq EventScript_15F561 + goto_if_eq EventScript_15F561 compare RESULT, 2 - jumpeq EventScript_15F56A + goto_if_eq EventScript_15F56A compare RESULT, 3 - jumpeq EventScript_15F573 + goto_if_eq EventScript_15F573 end EventScript_15F558: @@ -890,7 +890,7 @@ Std_2: lock faceplayer message 0x0 - waittext + waitmessage waitbutton release return @@ -898,20 +898,20 @@ Std_2: Std_3: lockall message 0x0 - waittext + waitmessage waitbutton releaseall return Std_4: message 0x0 - waittext + waitmessage waitbutton return Std_5: message 0x0 - waittext + waitmessage yesnobox 20, 8 return @@ -928,63 +928,63 @@ gUnknown_0819F80B:: @ 819F80B special PlayTrainerEncounterMusic special ScrSpecial_EndTrainerApproach waitstate - jump EventScript_19F8F2 + goto EventScript_19F8F2 gUnknown_0819F818:: @ 819F818 lock faceplayer - move LAST_TALKED, Movement_19F8F0 - waitmove 0 - specialval RESULT, ScrSpecial_HasTrainerBeenFought + applymovement LAST_TALKED, Movement_19F8F0 + waitmovement 0 + specialvar RESULT, ScrSpecial_HasTrainerBeenFought compare RESULT, 0 - jumpif 5, EventScript_19F83F + goto_if 5, EventScript_19F83F special PlayTrainerEncounterMusic special sub_8082524 - jump EventScript_19F8F2 + goto EventScript_19F8F2 EventScript_19F83F: - endtrainerbattle + ontrainerbattleend gUnknown_0819F840:: @ 819F840 lock faceplayer call EventScript_19F8E5 - specialval RESULT, ScrSpecial_HasTrainerBeenFought + specialvar RESULT, ScrSpecial_HasTrainerBeenFought compare RESULT, 0 - jumpif 5, EventScript_19F877 + goto_if 5, EventScript_19F877 special CheckForAlivePartyMons compare RESULT, 0 - jumpif 5, EventScript_19F870 + goto_if 5, EventScript_19F870 special PlayTrainerEncounterMusic special sub_8082524 - jump EventScript_19F8F2 + goto EventScript_19F8F2 EventScript_19F870: special ScrSpecial_ShowTrainerNonBattlingSpeech - waittext + waitmessage waitbutton release end EventScript_19F877: - endtrainerbattle + ontrainerbattleend gUnknown_0819F878:: @ 819F878 - move LAST_TALKED, Movement_19F8F0 - waitmove 0 + applymovement LAST_TALKED, Movement_19F8F0 + waitmovement 0 special PlayTrainerEncounterMusic - reptrainerbattle - endtrainerbattle + battlebegin + ontrainerbattleend gUnknown_0819F887:: @ 819F887 call EventScript_19F8E5 - specialval RESULT, ScrSpecial_GetTrainerEyeRematchFlag + specialvar RESULT, ScrSpecial_GetTrainerEyeRematchFlag compare RESULT, 0 - jumpeq EventScript_19F8AD + goto_if_eq EventScript_19F8AD special PlayTrainerEncounterMusic special sub_8082524 special ScrSpecial_ShowTrainerIntroSpeech - waittext + waitmessage waitbutton special ScrSpecial_StartTrainerEyeRematch waitstate @@ -992,19 +992,19 @@ gUnknown_0819F887:: @ 819F887 end EventScript_19F8AD: - endtrainerbattle + ontrainerbattleend gUnknown_0819F8AE:: @ 819F8AE - specialval RESULT, ScrSpecial_GetTrainerEyeRematchFlag + specialvar RESULT, ScrSpecial_GetTrainerEyeRematchFlag compare RESULT, 0 - jumpeq EventScript_19F8DD + goto_if_eq EventScript_19F8DD special CheckForAlivePartyMons compare RESULT, 0 - jumpif 5, EventScript_19F8DE + goto_if 5, EventScript_19F8DE special PlayTrainerEncounterMusic special sub_8082524 special ScrSpecial_ShowTrainerIntroSpeech - waittext + waitmessage waitbutton special ScrSpecial_StartTrainerEyeRematch waitstate @@ -1012,18 +1012,18 @@ gUnknown_0819F8AE:: @ 819F8AE end EventScript_19F8DD: - endtrainerbattle + ontrainerbattleend EventScript_19F8DE: special ScrSpecial_ShowTrainerNonBattlingSpeech - waittext + waitmessage waitbutton release end EventScript_19F8E5: - move LAST_TALKED, Movement_19F8F0 - waitmove 0 + applymovement LAST_TALKED, Movement_19F8F0 + waitmovement 0 return Movement_19F8F0:: @@ -1032,116 +1032,116 @@ Movement_19F8F0:: EventScript_19F8F2: special ScrSpecial_ShowTrainerIntroSpeech - waittext + waitmessage waitbutton - reptrainerbattle - specialval RESULT, ScrSpecial_GetTrainerBattleMode + battlebegin + specialvar RESULT, ScrSpecial_GetTrainerBattleMode compare RESULT, 0 - jumpeq EventScript_19F934 + goto_if_eq EventScript_19F934 compare RESULT, 2 - jumpeq EventScript_19F936 + goto_if_eq EventScript_19F936 compare RESULT, 1 - jumpeq EventScript_19F936 + goto_if_eq EventScript_19F936 compare RESULT, 6 - jumpeq EventScript_19F936 + goto_if_eq EventScript_19F936 compare RESULT, 8 - jumpeq EventScript_19F936 + goto_if_eq EventScript_19F936 EventScript_19F934: releaseall end EventScript_19F936: - endtrainerbattle2 + ontrainerbattleendgoto Std_6:: message 0x0 - waittext + waitmessage waitbutton release return Event_ResetBerryTrees: @ 19F940 - event_8a 2, 7, 5 - event_8a 1, 3, 5 - event_8a 11, 7, 5 - event_8a 13, 3, 5 - event_8a 4, 7, 5 - event_8a 76, 1, 5 - event_8a 8, 1, 5 - event_8a 10, 6, 5 - event_8a 25, 20, 5 - event_8a 26, 2, 5 - event_8a 66, 2, 5 - event_8a 67, 20, 5 - event_8a 69, 22, 5 - event_8a 70, 22, 5 - event_8a 71, 22, 5 - event_8a 55, 17, 5 - event_8a 56, 17, 5 - event_8a 5, 1, 5 - event_8a 6, 6, 5 - event_8a 7, 1, 5 - event_8a 16, 18, 5 - event_8a 17, 18, 5 - event_8a 18, 18, 5 - event_8a 29, 19, 5 - event_8a 28, 19, 5 - event_8a 27, 19, 5 - event_8a 24, 4, 5 - event_8a 23, 3, 5 - event_8a 22, 3, 5 - event_8a 21, 4, 5 - event_8a 19, 16, 5 - event_8a 20, 16, 5 - event_8a 80, 7, 5 - event_8a 81, 7, 5 - event_8a 77, 8, 5 - event_8a 78, 8, 5 - event_8a 68, 8, 5 - event_8a 31, 10, 5 - event_8a 33, 10, 5 - event_8a 34, 21, 5 - event_8a 35, 21, 5 - event_8a 36, 21, 5 - event_8a 83, 24, 5 - event_8a 84, 24, 5 - event_8a 85, 10, 5 - event_8a 86, 6, 5 - event_8a 37, 5, 5 - event_8a 38, 5, 5 - event_8a 39, 5, 5 - event_8a 40, 3, 5 - event_8a 41, 3, 5 - event_8a 42, 3, 5 - event_8a 46, 19, 5 - event_8a 45, 20, 5 - event_8a 44, 18, 5 - event_8a 43, 16, 5 - event_8a 47, 8, 5 - event_8a 48, 5, 5 - event_8a 49, 4, 5 - event_8a 50, 2, 5 - event_8a 52, 18, 5 - event_8a 53, 18, 5 - event_8a 62, 6, 5 - event_8a 64, 6, 5 - event_8a 58, 21, 5 - event_8a 59, 21, 5 - event_8a 60, 25, 5 - event_8a 61, 25, 5 - event_8a 79, 23, 5 - event_8a 14, 23, 5 - event_8a 15, 21, 5 - event_8a 30, 21, 5 - event_8a 65, 25, 5 - event_8a 72, 25, 5 - event_8a 73, 23, 5 - event_8a 74, 23, 5 - event_8a 87, 3, 5 - event_8a 88, 10, 5 - event_8a 89, 4, 5 - event_8a 82, 36, 5 + plantberrytree 2, 7, 5 + plantberrytree 1, 3, 5 + plantberrytree 11, 7, 5 + plantberrytree 13, 3, 5 + plantberrytree 4, 7, 5 + plantberrytree 76, 1, 5 + plantberrytree 8, 1, 5 + plantberrytree 10, 6, 5 + plantberrytree 25, 20, 5 + plantberrytree 26, 2, 5 + plantberrytree 66, 2, 5 + plantberrytree 67, 20, 5 + plantberrytree 69, 22, 5 + plantberrytree 70, 22, 5 + plantberrytree 71, 22, 5 + plantberrytree 55, 17, 5 + plantberrytree 56, 17, 5 + plantberrytree 5, 1, 5 + plantberrytree 6, 6, 5 + plantberrytree 7, 1, 5 + plantberrytree 16, 18, 5 + plantberrytree 17, 18, 5 + plantberrytree 18, 18, 5 + plantberrytree 29, 19, 5 + plantberrytree 28, 19, 5 + plantberrytree 27, 19, 5 + plantberrytree 24, 4, 5 + plantberrytree 23, 3, 5 + plantberrytree 22, 3, 5 + plantberrytree 21, 4, 5 + plantberrytree 19, 16, 5 + plantberrytree 20, 16, 5 + plantberrytree 80, 7, 5 + plantberrytree 81, 7, 5 + plantberrytree 77, 8, 5 + plantberrytree 78, 8, 5 + plantberrytree 68, 8, 5 + plantberrytree 31, 10, 5 + plantberrytree 33, 10, 5 + plantberrytree 34, 21, 5 + plantberrytree 35, 21, 5 + plantberrytree 36, 21, 5 + plantberrytree 83, 24, 5 + plantberrytree 84, 24, 5 + plantberrytree 85, 10, 5 + plantberrytree 86, 6, 5 + plantberrytree 37, 5, 5 + plantberrytree 38, 5, 5 + plantberrytree 39, 5, 5 + plantberrytree 40, 3, 5 + plantberrytree 41, 3, 5 + plantberrytree 42, 3, 5 + plantberrytree 46, 19, 5 + plantberrytree 45, 20, 5 + plantberrytree 44, 18, 5 + plantberrytree 43, 16, 5 + plantberrytree 47, 8, 5 + plantberrytree 48, 5, 5 + plantberrytree 49, 4, 5 + plantberrytree 50, 2, 5 + plantberrytree 52, 18, 5 + plantberrytree 53, 18, 5 + plantberrytree 62, 6, 5 + plantberrytree 64, 6, 5 + plantberrytree 58, 21, 5 + plantberrytree 59, 21, 5 + plantberrytree 60, 25, 5 + plantberrytree 61, 25, 5 + plantberrytree 79, 23, 5 + plantberrytree 14, 23, 5 + plantberrytree 15, 21, 5 + plantberrytree 30, 21, 5 + plantberrytree 65, 25, 5 + plantberrytree 72, 25, 5 + plantberrytree 73, 23, 5 + plantberrytree 74, 23, 5 + plantberrytree 87, 3, 5 + plantberrytree 88, 10, 5 + plantberrytree 89, 4, 5 + plantberrytree 82, 36, 5 return gUnknown_0819FA81:: @ 819FA81 @@ -1292,13 +1292,13 @@ EverGrandeCity_HallOfFame_EventScript_19FC13:: @ 819FC13 clearflag 861 special sub_810FAA0 checkflag 291 - callif 0, EverGrandeCity_HallOfFame_EventScript_19FC62 + call_if 0, EverGrandeCity_HallOfFame_EventScript_19FC62 checkflag 255 - callif 0, EverGrandeCity_HallOfFame_EventScript_19FC70 + call_if 0, EverGrandeCity_HallOfFame_EventScript_19FC70 checkflag 298 - callif 0, EverGrandeCity_HallOfFame_EventScript_19FC5A + call_if 0, EverGrandeCity_HallOfFame_EventScript_19FC5A checkflag 123 - callif 0, EverGrandeCity_HallOfFame_EventScript_19FC5E + call_if 0, EverGrandeCity_HallOfFame_EventScript_19FC5E return EverGrandeCity_HallOfFame_EventScript_19FC5A:: @ 819FC5A @@ -1322,25 +1322,25 @@ EverGrandeCity_HallOfFame_EventScript_19FC70:: @ 819FC70 S_WhiteOut:: @ 819FC74 call EverGrandeCity_HallOfFame_EventScript_19FD09 call EventScript_19FC84 - jump gUnknown_0819FC9F + goto gUnknown_0819FC9F end EventScript_19FC84: checkflag 221 - jumpeq Route101_EventScript_1A14DC + goto_if_eq Route101_EventScript_1A14DC checkflag 1213 - jumpif 0, Route101_EventScript_1A14DC + goto_if 0, Route101_EventScript_1A14DC clearflag 929 setvar 0x4053, 2 return gUnknown_0819FC9F:: @ 819FC9F compare 0x4096, 1 - jumpeq EventScript_19FCC1 + goto_if_eq EventScript_19FCC1 compare 0x4096, 2 - jumpeq EventScript_19FCD7 + goto_if_eq EventScript_19FCD7 compare 0x4096, 3 - jumpeq EventScript_19FCF0 + goto_if_eq EventScript_19FCF0 end EventScript_19FCC1: @@ -1393,15 +1393,15 @@ RustboroCity_PokemonCenter_1F_EventScript_19FD1B:: @ 819FD1B SlateportCity_PokemonCenter_1F_EventScript_19FD1B:: @ 819FD1B VerdanturfTown_PokemonCenter_1F_EventScript_19FD1B:: @ 819FD1B checkflag 188 - jumpif 0, OldaleTown_PokemonCenter_1F_EventScript_1A14DC + goto_if 0, OldaleTown_PokemonCenter_1F_EventScript_1A14DC checkflag 1217 - jumpeq OldaleTown_PokemonCenter_1F_EventScript_1A14DC + goto_if_eq OldaleTown_PokemonCenter_1F_EventScript_1A14DC checkflag 742 - jumpif 0, OldaleTown_PokemonCenter_1F_EventScript_19FD49 + goto_if 0, OldaleTown_PokemonCenter_1F_EventScript_19FD49 checkflag 740 - jumpif 0, OldaleTown_PokemonCenter_1F_EventScript_19FD4F + goto_if 0, OldaleTown_PokemonCenter_1F_EventScript_19FD4F checkflag 741 - jumpif 0, OldaleTown_PokemonCenter_1F_EventScript_19FD55 + goto_if 0, OldaleTown_PokemonCenter_1F_EventScript_19FD55 return OldaleTown_PokemonCenter_1F_EventScript_19FD49:: @ 819FD49 @@ -1434,52 +1434,52 @@ VerdanturfTown_PokemonCenter_1F_EventScript_19FD5B:: @ 819FD5B faceplayer msgbox gText_NurseJoy_Welcome, MSGBOX_YESNO compare RESULT, 1 - jumpeq do_heal_party + goto_if_eq do_heal_party compare RESULT, 0 - jumpeq dont_heal_party + goto_if_eq dont_heal_party end do_heal_party:: @ 819FD7C - inccounter GAME_STAT_USED_POKECENTER + incrementgamestat GAME_STAT_USED_POKECENTER message gText_NurseJoy_OkayIllTakeYourPokemon - waittext - move 0x800b, OldaleTown_PokemonCenter_1F_Movement_1A083F - waitmove 0 - doanimation 25 - checkanimation 25 - move 0x800b, OldaleTown_PokemonCenter_1F_Movement_1A0845 - waitmove 0 + waitmessage + applymovement 0x800b, OldaleTown_PokemonCenter_1F_Movement_1A083F + waitmovement 0 + dofieldeffect 25 + waitfieldeffect 25 + applymovement 0x800b, OldaleTown_PokemonCenter_1F_Movement_1A0845 + waitmovement 0 special ScrSpecial_HealPlayerParty checkflag 273 - jumpif 0, OldaleTown_PokemonCenter_1F_EventScript_19FDCE - jump OldaleTown_PokemonCenter_1F_EventScript_19FDB0 + goto_if 0, OldaleTown_PokemonCenter_1F_EventScript_19FDCE + goto OldaleTown_PokemonCenter_1F_EventScript_19FDB0 end OldaleTown_PokemonCenter_1F_EventScript_19FDB0:: @ 819FDB0 message gText_NurseJoy_ThankYouForWaiting - waittext - move 0x800b, OldaleTown_PokemonCenter_1F_Movement_19FDF4 - waitmove 0 + waitmessage + applymovement 0x800b, OldaleTown_PokemonCenter_1F_Movement_19FDF4 + waitmovement 0 message gText_NurseJoy_WeHopeToSeeYouAgain - waittext + waitmessage return dont_heal_party:: @ 819FDC7 message gText_NurseJoy_WeHopeToSeeYouAgain - waittext + waitmessage return OldaleTown_PokemonCenter_1F_EventScript_19FDCE:: @ 819FDCE - specialval RESULT, IsPokerusInParty + specialvar RESULT, IsPokerusInParty compare RESULT, 1 - jumpeq OldaleTown_PokemonCenter_1F_EventScript_19FDEA + goto_if_eq OldaleTown_PokemonCenter_1F_EventScript_19FDEA compare RESULT, 0 - jumpeq OldaleTown_PokemonCenter_1F_EventScript_19FDB0 + goto_if_eq OldaleTown_PokemonCenter_1F_EventScript_19FDB0 end OldaleTown_PokemonCenter_1F_EventScript_19FDEA:: @ 819FDEA message gText_NurseJoy_Pokerus - waittext + waitmessage setflag 273 return @@ -1495,13 +1495,13 @@ Std_ObtainItem: @ 819FDF7 return Std_ObtainItem_: @ 819FE07 - bufferitem 1, 0x8000 + getitemname 1, 0x8000 checkitemtype 0x8000 call GetItem_HandlePocket compare 0x8007, 0x1 - callif 1, Std_ObtainItem_Success + call_if 1, Std_ObtainItem_Success compare 0x8007, 0x0 - callif 1, Std_ObtainItem_Fail + call_if 1, Std_ObtainItem_Fail return GetItem_HandlePocket: @@ -1514,39 +1514,39 @@ GetItem_HandlePocket: end GetItem_HandlePocket_Items: - bufferstd 2, 0xE + getstdstring 2, 0xE compare 0x8007, 1 - callif 1, PlayGetItemFanfare + call_if 1, PlayGetItemFanfare return GetItem_HandlePocket_KeyItems: - bufferstd 2, 0xF + getstdstring 2, 0xF compare 0x8007, 1 - callif 1, PlayGetItemFanfare + call_if 1, PlayGetItemFanfare return GetItem_HandlePocket_PokeBalls: - bufferstd 2, 0x10 + getstdstring 2, 0x10 compare 0x8007, 1 - callif 1, PlayGetItemFanfare + call_if 1, PlayGetItemFanfare return GetItem_HandlePocket_TMsHMs: - bufferstd 2, 0x11 + getstdstring 2, 0x11 compare 0x8007, 1 - callif 1, PlayGetTMHMFanfare + call_if 1, PlayGetTMHMFanfare return GetItem_HandlePocket_Berries: - bufferstd 2, 0x12 + getstdstring 2, 0x12 compare 0x8007, 1 - callif 1, PlayGetItemFanfare + call_if 1, PlayGetItemFanfare return Std_ObtainItem_Success: @ 819FEB7 message Message_ObtainedItem waitfanfare - waittext + waitmessage msgbox Message_PutAwayItem setvar RESULT, 1 return @@ -1556,11 +1556,11 @@ Std_ObtainItem_Fail: @ 819FECC return PlayGetItemFanfare: - fanfare 0x172 + playfanfare 0x172 return PlayGetTMHMFanfare: - fanfare 0x174 + playfanfare 0x174 return Std_ObtainDecoration: @ 819FEDA @@ -1570,18 +1570,18 @@ Std_ObtainDecoration: @ 819FEDA return Std_ObtainDecoration_: @ 819FEE8 - bufferdecor 1, 0x8000 + getdecorname 1, 0x8000 compare 0x8007, 1 - callif 1, Std_ObtainDecoration_Success + call_if 1, Std_ObtainDecoration_Success compare 0x8007, 0 - callif 1, Std_ObtainDecoration_Fail + call_if 1, Std_ObtainDecoration_Fail return Std_ObtainDecoration_Success: @ 819FF03 - fanfare 0x172 + playfanfare 0x172 message Message_ObtainedDecoration waitfanfare - waittext + waitmessage msgbox Message_TransferredToPC setvar RESULT, 1 return @@ -1593,24 +1593,24 @@ Std_ObtainDecoration_Fail: @ 819FF1B Std_FindItem: @ 819FF21 lock faceplayer - checksound + waitse additem 0x8000, 0x8001 copyvar 0x8007, RESULT - bufferitem 1, 0x8000 + getitemname 1, 0x8000 checkitemtype 0x8000 call GetItem_HandlePocket compare 0x8007, 1 - callif 1, Std_FindItem_Success + call_if 1, Std_FindItem_Success compare 0x8007, 0 - callif 1, Std_FindItem_Fail + call_if 1, Std_FindItem_Fail release return Std_FindItem_Success: @ 819FF52 - disappear LAST_TALKED + removeobject LAST_TALKED message Message_FoundOneItem waitfanfare - waittext + waitmessage msgbox Message_PutAwayItem return @@ -1622,22 +1622,22 @@ Std_FindItem_Fail: @ 819FF65 HiddenItemScript:: @ 819FF7B lockall - checksound + waitse additem 0x8005, 1 copyvar 0x8007, RESULT - bufferitem 0x1, 0x8005 + getitemname 0x1, 0x8005 checkitemtype 0x8005 call GetItem_HandlePocket compare 0x8007, 1 - jumpeq HiddenItemScript_Success + goto_if_eq HiddenItemScript_Success compare 0x8007, 0 - jumpeq HiddenItemScript_Fail + goto_if_eq HiddenItemScript_Fail end HiddenItemScript_Success: message Message_FoundOneItem waitfanfare - waittext + waitmessage msgbox Message_PutAwayItem special SetFlagInVar releaseall @@ -1655,10 +1655,10 @@ UnusedMixRecordsScript: @ 819FFD5 faceplayer msgbox UnusedMixRecordsPromptText, 5 compare RESULT, 1 - jumpeq UnusedMixRecordsScript_Yes + goto_if_eq UnusedMixRecordsScript_Yes compare RESULT, 0 - jumpeq UnusedMixRecordsScript_Done - jump UnusedMixRecordsScript_Done + goto_if_eq UnusedMixRecordsScript_Done + goto UnusedMixRecordsScript_Done UnusedMixRecordsScript_Yes: @ 819FFFA special sub_80B929C waitstate @@ -1666,7 +1666,7 @@ UnusedMixRecordsScript_Yes: @ 819FFFA faceplayer UnusedMixRecordsScript_Done: @ 81A0000 message UnusedMixRecordsSeeYouAgainText - waittext + waitmessage waitbutton release end @@ -1675,17 +1675,17 @@ gUnknown_081A0009:: @ 81A0009 lockall setvar 0x8004, 0 special DoPCTurnOnEffect - playsfx 4 + playse 4 msgbox UnknownString_81A09EC, 4 - jump EventScript_1A0023 + goto EventScript_1A0023 end EventScript_1A0023: message gPCText_WhichPCShouldBeAccessed - waittext + waitmessage special ScrSpecial_CreatePCMenu waitstate - jump EventScript_1A0033 + goto EventScript_1A0033 end EventScript_1A0033: @@ -1698,23 +1698,23 @@ EventScript_1A0033: end EventScript_1A0070: - playsfx 2 + playse 2 msgbox UnknownString_81A0A54, 4 special PlayerPC waitstate - jump EventScript_1A0023 + goto EventScript_1A0023 end EventScript_1A0085: - playsfx 2 + playse 2 checkflag 2123 - callif 0, EventScript_1A00AC + call_if 0, EventScript_1A00AC checkflag 2123 - callif 1, EventScript_1A00B5 + call_if 1, EventScript_1A00B5 msgbox UnknownString_81A0A35, 4 special ShowPokemonStorageSystem waitstate - jump EventScript_1A0023 + goto EventScript_1A0023 end EventScript_1A00AC: @@ -1727,18 +1727,18 @@ EventScript_1A00B5: EventScript_1A00BE: setvar 0x8004, 0 - playsfx 3 + playse 3 special DoPCTurnOffEffect releaseall end EventScript_1A00CB: checkflag 2052 - jumpif 0, EventScript_1A00BE - playsfx 2 + goto_if 0, EventScript_1A00BE + playse 2 special AccessHallOfFamePC waitstate - jump EventScript_1A0033 + goto EventScript_1A0033 end FallarborTown_EventScript_1A00E1:: @ 81A00E1 @@ -1797,7 +1797,7 @@ RustboroCity_Gym_EventScript_1A00FB:: @ 81A00FB DewfordTown_EventScript_1A0102:: @ 81A0102 DewfordTown_Hall_EventScript_1A0102:: @ 81A0102 - checkdailyflags + dodailyevents setvar 0x8004, 0 special sub_80FA5BC return @@ -1810,17 +1810,17 @@ Route109_EventScript_1A010C:: @ 81A010C return UseSurfScript:: @ 81A0117 - checkattack MOVE_SURF + checkpokemove MOVE_SURF compare RESULT, 6 - jumpeq UseSurfScript_NoMon - bufferpartypoke 0, RESULT - setanimation 0, RESULT + goto_if_eq UseSurfScript_NoMon + getpartypokename 0, RESULT + setfieldeffect 0, RESULT lockall msgbox UseSurfPromptText, 5 compare RESULT, 0 - jumpeq UseSurfScript_No + goto_if_eq UseSurfScript_No msgbox UsedSurfText, 4 - doanimation 9 + dofieldeffect 9 UseSurfScript_No: @ 81A014C releaseall UseSurfScript_NoMon: @ 81A014D @@ -1835,11 +1835,11 @@ Route103_EventScript_1A014E:: @ 81A014E Route110_EventScript_1A014E:: @ 81A014E Route119_EventScript_1A014E:: @ 81A014E RustboroCity_EventScript_1A014E:: @ 81A014E - checkgender + checkplayergender compare RESULT, 0 - jumpeq RustboroCity_EventScript_1A0166 + goto_if_eq RustboroCity_EventScript_1A0166 compare RESULT, 1 - jumpeq RustboroCity_EventScript_1A016C + goto_if_eq RustboroCity_EventScript_1A016C end RustboroCity_EventScript_1A0166:: @ 81A0166 @@ -1853,11 +1853,11 @@ RustboroCity_EventScript_1A016C:: @ 81A016C LavaridgeTown_EventScript_1A0172:: @ 81A0172 Route110_EventScript_1A0172:: @ 81A0172 Route119_EventScript_1A0172:: @ 81A0172 - checkgender + checkplayergender compare RESULT, 0 - jumpeq LavaridgeTown_EventScript_1A018A + goto_if_eq LavaridgeTown_EventScript_1A018A compare RESULT, 1 - jumpeq LavaridgeTown_EventScript_1A0190 + goto_if_eq LavaridgeTown_EventScript_1A0190 end LavaridgeTown_EventScript_1A018A:: @ 81A018A @@ -1939,66 +1939,66 @@ SootopolisCity_Gym_1F_EventScript_1A01C0:: @ 81A01C0 end DewfordTown_Gym_EventScript_1A021E:: @ 81A021E - cleartrainerflag OPPONENT_JOSH - cleartrainerflag OPPONENT_TOMMY + settrainerflag OPPONENT_JOSH + settrainerflag OPPONENT_TOMMY return DewfordTown_Gym_EventScript_1A0225:: @ 81A0225 - cleartrainerflag OPPONENT_HIDEKI - cleartrainerflag OPPONENT_TESSA - cleartrainerflag OPPONENT_LAURA + settrainerflag OPPONENT_HIDEKI + settrainerflag OPPONENT_TESSA + settrainerflag OPPONENT_LAURA return DewfordTown_Gym_EventScript_1A022F:: @ 81A022F - cleartrainerflag OPPONENT_KIRK - cleartrainerflag OPPONENT_SHAWN - cleartrainerflag OPPONENT_BEN - cleartrainerflag OPPONENT_VIVIAN + settrainerflag OPPONENT_KIRK + settrainerflag OPPONENT_SHAWN + settrainerflag OPPONENT_BEN + settrainerflag OPPONENT_VIVIAN return DewfordTown_Gym_EventScript_1A023C:: @ 81A023C - cleartrainerflag OPPONENT_COLE - cleartrainerflag OPPONENT_AXLE - cleartrainerflag OPPONENT_ANDY - cleartrainerflag OPPONENT_ZANE - cleartrainerflag OPPONENT_SADIE + settrainerflag OPPONENT_COLE + settrainerflag OPPONENT_AXLE + settrainerflag OPPONENT_ANDY + settrainerflag OPPONENT_ZANE + settrainerflag OPPONENT_SADIE return DewfordTown_Gym_EventScript_1A024C:: @ 81A024C - cleartrainerflag OPPONENT_RANDALL - cleartrainerflag OPPONENT_PARKER - cleartrainerflag OPPONENT_GEORGE - cleartrainerflag OPPONENT_BERKE - cleartrainerflag OPPONENT_MARY - cleartrainerflag OPPONENT_LORI - cleartrainerflag OPPONENT_JODY + settrainerflag OPPONENT_RANDALL + settrainerflag OPPONENT_PARKER + settrainerflag OPPONENT_GEORGE + settrainerflag OPPONENT_BERKE + settrainerflag OPPONENT_MARY + settrainerflag OPPONENT_LORI + settrainerflag OPPONENT_JODY return DewfordTown_Gym_EventScript_1A0262:: @ 81A0262 - cleartrainerflag OPPONENT_JARED - cleartrainerflag OPPONENT_TERRELL - cleartrainerflag OPPONENT_KYLEE - cleartrainerflag OPPONENT_WILL + settrainerflag OPPONENT_JARED + settrainerflag OPPONENT_TERRELL + settrainerflag OPPONENT_KYLEE + settrainerflag OPPONENT_WILL return DewfordTown_Gym_EventScript_1A026F:: @ 81A026F - cleartrainerflag OPPONENT_PRESTON - cleartrainerflag OPPONENT_VIRGIL - cleartrainerflag OPPONENT_FRITZ - cleartrainerflag OPPONENT_HANNAH - cleartrainerflag OPPONENT_SAMANTHA - cleartrainerflag OPPONENT_MAURA + settrainerflag OPPONENT_PRESTON + settrainerflag OPPONENT_VIRGIL + settrainerflag OPPONENT_FRITZ + settrainerflag OPPONENT_HANNAH + settrainerflag OPPONENT_SAMANTHA + settrainerflag OPPONENT_MAURA return DewfordTown_Gym_EventScript_1A0282:: @ 81A0282 - cleartrainerflag OPPONENT_ANDREA - cleartrainerflag OPPONENT_CRISSY - cleartrainerflag OPPONENT_BRIANNA_2 - cleartrainerflag OPPONENT_CONNIE - cleartrainerflag OPPONENT_BRIDGET - cleartrainerflag OPPONENT_OLIVIA - cleartrainerflag OPPONENT_TIFFANY - cleartrainerflag OPPONENT_MARISSA + settrainerflag OPPONENT_ANDREA + settrainerflag OPPONENT_CRISSY + settrainerflag OPPONENT_BRIANNA_2 + settrainerflag OPPONENT_CONNIE + settrainerflag OPPONENT_BRIDGET + settrainerflag OPPONENT_OLIVIA + settrainerflag OPPONENT_TIFFANY + settrainerflag OPPONENT_MARISSA return DewfordTown_Gym_EventScript_1A029B:: @ 81A029B @@ -2095,7 +2095,7 @@ MossdeepCity_Gym_EventScript_1A02C5:: @ 81A02C5 PetalburgCity_Gym_EventScript_1A02C5:: @ 81A02C5 RustboroCity_Gym_EventScript_1A02C5:: @ 81A02C5 SootopolisCity_Gym_1F_EventScript_1A02C5:: @ 81A02C5 - fanfare 369 + playfanfare 369 waitfanfare return @@ -2104,7 +2104,7 @@ Route111_OldLadysRestStop_EventScript_1A02CA:: @ 81A02CA Route119_WeatherInstitute_1F_EventScript_1A02CA:: @ 81A02CA SSTidalRooms_EventScript_1A02CA:: @ 81A02CA fadescreen 1 - fanfare 368 + playfanfare 368 waitfanfare special ScrSpecial_HealPlayerParty fadescreen 0 @@ -2123,37 +2123,37 @@ DewfordTown_EventScript_1A02E7:: @ 81A02E7 Route104_EventScript_1A02E7:: @ 81A02E7 Route109_EventScript_1A02E7:: @ 81A02E7 setflag 0x4001 - playmusic 431, 0 + playbgm 431, 0 return DewfordTown_EventScript_1A02EF:: @ 81A02EF Route104_EventScript_1A02EF:: @ 81A02EF Route109_EventScript_1A02EF:: @ 81A02EF clearflag 0x4001 - fadedefault + fadedefaultbgm return LittlerootTown_ProfessorBirchsLab_EventScript_1A02F4:: @ 81A02F4 Route101_EventScript_1A02F4:: @ 81A02F4 Route103_EventScript_1A02F4:: @ 81A02F4 compare 0x4085, 0 - jumpeq Route101_EventScript_1A14DC + goto_if_eq Route101_EventScript_1A14DC compare 0x4049, 0 - callif 1, Route101_EventScript_1A0358 + call_if 1, Route101_EventScript_1A0358 compare 0x4049, 1 - callif 1, Route101_EventScript_1A0358 + call_if 1, Route101_EventScript_1A0358 compare 0x4049, 2 - callif 1, Route101_EventScript_1A0365 + call_if 1, Route101_EventScript_1A0365 compare 0x4049, 3 - callif 1, Route101_EventScript_1A0365 + call_if 1, Route101_EventScript_1A0365 compare 0x4049, 4 - callif 1, Route101_EventScript_1A0372 + call_if 1, Route101_EventScript_1A0372 compare 0x4049, 5 - callif 1, Route101_EventScript_1A0372 + call_if 1, Route101_EventScript_1A0372 compare 0x4049, 6 - callif 1, Route101_EventScript_1A0358 + call_if 1, Route101_EventScript_1A0358 compare 0x4049, 7 - callif 1, Route101_EventScript_1A0358 + call_if 1, Route101_EventScript_1A0358 return Route101_EventScript_1A0358:: @ 81A0358 @@ -2184,7 +2184,7 @@ Route103_EventScript_1A037F:: @ 81A037F faceplayer msgbox Route101_Text_1C4449, 5 compare RESULT, 0 - jumpeq Route101_EventScript_1A039B + goto_if_eq Route101_EventScript_1A039B call Route101_EventScript_1A03B0 release end @@ -2197,38 +2197,38 @@ Route101_EventScript_1A039B:: @ 81A039B Route101_EventScript_1A03A5:: @ 81A03A5 copyvar 0x8004, 0x8009 special ShowPokedexRatingMessage - waittext + waitmessage waitbutton return EverGrandeCity_ChampionsRoom_EventScript_1A03B0:: @ 81A03B0 Route101_EventScript_1A03B0:: @ 81A03B0 setvar 0x8004, 0 - specialval RESULT, ScriptGetPokedexInfo + specialvar RESULT, ScriptGetPokedexInfo copyvar 0x8008, 0x8005 copyvar 0x8009, 0x8006 copyvar 0x800a, RESULT - buffernum 0, 0x8008 - buffernum 1, 0x8009 + getnumberstring 0, 0x8008 + getnumberstring 1, 0x8009 msgbox Route101_Text_1C44DC, 4 call Route101_EventScript_1A03A5 compare 0x800a, 0 - jumpeq Route101_EventScript_1A14DC + goto_if_eq Route101_EventScript_1A14DC setvar 0x8004, 1 - specialval RESULT, ScriptGetPokedexInfo + specialvar RESULT, ScriptGetPokedexInfo copyvar 0x8008, 0x8005 copyvar 0x8009, 0x8006 - buffernum 0, 0x8008 - buffernum 1, 0x8009 + getnumberstring 0, 0x8008 + getnumberstring 1, 0x8009 msgbox Route101_Text_1C4B05, 4 return BattleTower_Outside_EventScript_1A040E:: @ 81A040E LilycoveCity_Harbor_EventScript_1A040E:: @ 81A040E SlateportCity_Harbor_EventScript_1A040E:: @ 81A040E - pause 60 - move 0x8004, SlateportCity_Harbor_Movement_1A041C - waitmove 0 + delay 60 + applymovement 0x8004, SlateportCity_Harbor_Movement_1A041C + waitmovement 0 return SlateportCity_Harbor_Movement_1A041C:: @ 81A041C @@ -2254,8 +2254,8 @@ PetalburgCity_Gym_EventScript_1A0424:: @ 81A0424 return RusturfTunnel_EventScript_1A0442:: @ 81A0442 - disappear 1 - disappear 10 + removeobject 1 + removeobject 10 clearflag 808 clearflag 984 setvar 0x409a, 6 @@ -2263,14 +2263,14 @@ RusturfTunnel_EventScript_1A0442:: @ 81A0442 return EventScript_1A0457: @ unreferenced? - pause 30 - move 255, SlateportCity_OceanicMuseum_2F_Movement_1A0841 - waitmove 0 - spritevisible 255, 0, 0 - pause 30 - move 255, Movement_1A047A - waitmove 0 - pause 30 + delay 30 + applymovement 255, SlateportCity_OceanicMuseum_2F_Movement_1A0841 + waitmovement 0 + showobject 255, 0, 0 + delay 30 + applymovement 255, Movement_1A047A + waitmovement 0 + delay 30 return Movement_1A047A: @@ -2280,18 +2280,18 @@ Movement_1A047A: BattleTower_Outside_EventScript_1A047C:: @ 81A047C SouthernIsland_Exterior_EventScript_1A047C:: @ 81A047C compare FACING, 1 - callif 1, BattleTower_Outside_EventScript_160B2F + call_if 1, BattleTower_Outside_EventScript_160B2F compare FACING, 3 - callif 1, BattleTower_Outside_EventScript_160B3A - pause 30 - spriteinvisible 255, 0, 0 + call_if 1, BattleTower_Outside_EventScript_160B3A + delay 30 + hideobject 255, 0, 0 call BattleTower_Outside_EventScript_1A040E return CaveOfOrigin_B4F_EventScript_1A04A0:: @ 81A04A0 lockall - checksound - pokecry SPECIES_GROUDON_OR_KYOGRE, 2 + waitse + playpokecry SPECIES_GROUDON_OR_KYOGRE, 2 waitpokecry setvar 0x4005, 1 releaseall @@ -2303,20 +2303,20 @@ CaveOfOrigin_B2F_EventScript_1A04AF:: @ 81A04AF CaveOfOrigin_B3F_EventScript_1A04AF:: @ 81A04AF lockall setvar 0x4001, 1 - jump CaveOfOrigin_1F_EventScript_1A04D3 + goto CaveOfOrigin_1F_EventScript_1A04D3 end CaveOfOrigin_B2F_EventScript_1A04BB:: @ 81A04BB CaveOfOrigin_B3F_EventScript_1A04BB:: @ 81A04BB lockall setvar 0x4002, 1 - jump CaveOfOrigin_B2F_EventScript_1A04D3 + goto CaveOfOrigin_B2F_EventScript_1A04D3 end @ 81A04C7 lockall setvar 0x4003, 1 - jump CaveOfOrigin_B2F_EventScript_1A04D3 + goto CaveOfOrigin_B2F_EventScript_1A04D3 end CaveOfOrigin_1F_EventScript_1A04D3:: @ 81A04D3 @@ -2345,9 +2345,9 @@ MagmaHideout_B1F_EventScript_1A04FD:: @ 81A04FD lock faceplayer setwildbattle SPECIES_ELECTRODE, 30, ITEM_NONE - checksound - pokecry SPECIES_ELECTRODE, 2 - pause 40 + waitse + playpokecry SPECIES_ELECTRODE, 2 + delay 40 waitpokecry setflag 977 setflag 2145 @@ -2361,9 +2361,9 @@ MagmaHideout_B1F_EventScript_1A051B:: @ 81A051B lock faceplayer setwildbattle SPECIES_ELECTRODE, 30, ITEM_NONE - checksound - pokecry SPECIES_ELECTRODE, 2 - pause 40 + waitse + playpokecry SPECIES_ELECTRODE, 2 + delay 40 waitpokecry setflag 978 setflag 2145 @@ -2376,56 +2376,56 @@ Route120_EventScript_1A0539:: @ 81A0539 lock faceplayer setvar 0x8004, 1 - jump Route120_EventScript_1A0594 + goto Route120_EventScript_1A0594 end Route120_EventScript_1A0546:: @ 81A0546 lock faceplayer setvar 0x8004, 2 - jump Route120_EventScript_1A0594 + goto Route120_EventScript_1A0594 end Route120_EventScript_1A0553:: @ 81A0553 lock faceplayer setvar 0x8004, 3 - jump Route120_EventScript_1A0594 + goto Route120_EventScript_1A0594 end Route120_EventScript_1A0560:: @ 81A0560 lock faceplayer setvar 0x8004, 4 - jump Route120_EventScript_1A0594 + goto Route120_EventScript_1A0594 end Route120_EventScript_1A056D:: @ 81A056D lock faceplayer setvar 0x8004, 5 - jump Route120_EventScript_1A0594 + goto Route120_EventScript_1A0594 end Route119_EventScript_1A057A:: @ 81A057A lock faceplayer setvar 0x8004, 6 - jump Route119_EventScript_1A0594 + goto Route119_EventScript_1A0594 end Route119_EventScript_1A0587:: @ 81A0587 lock faceplayer setvar 0x8004, 7 - jump Route119_EventScript_1A0594 + goto Route119_EventScript_1A0594 end Route119_EventScript_1A0594:: @ 81A0594 Route120_EventScript_1A0594:: @ 81A0594 checkitem ITEM_DEVON_SCOPE, 1 compare RESULT, 1 - jumpeq Route119_EventScript_1A05AE + goto_if_eq Route119_EventScript_1A05AE msgbox Route119_Text_171B93, 4 release end @@ -2433,36 +2433,36 @@ Route120_EventScript_1A0594:: @ 81A0594 Route119_EventScript_1A05AE:: @ 81A05AE msgbox Route119_Text_171BB6, 5 compare RESULT, 1 - jumpeq Route119_EventScript_1A05C3 + goto_if_eq Route119_EventScript_1A05C3 release end Route119_EventScript_1A05C3:: @ 81A05C3 msgbox Route119_Text_171BF6, 4 - closebutton - move LAST_TALKED, Route119_Movement_1A0839 - waitmove 0 - move LAST_TALKED, Route119_Movement_1A0662 - waitmove 0 - checksound - pokecry SPECIES_KECLEON, 2 - pause 40 + closemessage + applymovement LAST_TALKED, Route119_Movement_1A0839 + waitmovement 0 + applymovement LAST_TALKED, Route119_Movement_1A0662 + waitmovement 0 + waitse + playpokecry SPECIES_KECLEON, 2 + delay 40 waitpokecry setwildbattle SPECIES_KECLEON, 30, ITEM_NONE compare 0x8004, 1 - callif 1, Route119_EventScript_1A0646 + call_if 1, Route119_EventScript_1A0646 compare 0x8004, 2 - callif 1, Route119_EventScript_1A064A + call_if 1, Route119_EventScript_1A064A compare 0x8004, 3 - callif 1, Route119_EventScript_1A064E + call_if 1, Route119_EventScript_1A064E compare 0x8004, 4 - callif 1, Route119_EventScript_1A0652 + call_if 1, Route119_EventScript_1A0652 compare 0x8004, 5 - callif 1, Route119_EventScript_1A0656 + call_if 1, Route119_EventScript_1A0656 compare 0x8004, 6 - callif 1, Route119_EventScript_1A065A + call_if 1, Route119_EventScript_1A065A compare 0x8004, 7 - callif 1, Route119_EventScript_1A065E + call_if 1, Route119_EventScript_1A065E setflag 2145 dowildbattle clearflag 2145 @@ -2536,10 +2536,10 @@ FallarborTown_House1_EventScript_1A067F:: @ 81A067F GraniteCave_StevensRoom_EventScript_1A067F:: @ 81A067F MtPyre_Summit_EventScript_1A067F:: @ 81A067F SlateportCity_OceanicMuseum_2F_EventScript_1A067F:: @ 81A067F - bufferitem 0, 0x8004 - fanfare 372 + getitemname 0, 0x8004 + playfanfare 372 message FallarborTown_House1_Text_1A1498 - waittext + waitmessage waitfanfare removeitem 0x8004, 1 return @@ -2548,9 +2548,9 @@ EverGrandeCity_DrakesRoom_EventScript_1A0693:: @ 81A0693 EverGrandeCity_GlaciasRoom_EventScript_1A0693:: @ 81A0693 EverGrandeCity_PhoebesRoom_EventScript_1A0693:: @ 81A0693 EverGrandeCity_SidneysRoom_EventScript_1A0693:: @ 81A0693 - move 255, EverGrandeCity_SidneysRoom_Movement_1A0853 - waitmove 0 - playsfx 8 + applymovement 255, EverGrandeCity_SidneysRoom_Movement_1A0853 + waitmovement 0 + playse 8 setmaptile 6, 1, 836, 0 setmaptile 6, 2, 837, 0 setmaptile 0, 2, 734, 1 @@ -2570,9 +2570,9 @@ EverGrandeCity_DrakesRoom_EventScript_1A0710:: @ 81A0710 EverGrandeCity_GlaciasRoom_EventScript_1A0710:: @ 81A0710 EverGrandeCity_PhoebesRoom_EventScript_1A0710:: @ 81A0710 EverGrandeCity_SidneysRoom_EventScript_1A0710:: @ 81A0710 - move 255, EverGrandeCity_SidneysRoom_Movement_1A0847 - waitmove 0 - playsfx 52 + applymovement 255, EverGrandeCity_SidneysRoom_Movement_1A0847 + waitmovement 0 + playse 52 setmaptile 5, 12, 518, 1 setmaptile 6, 12, 518, 1 setmaptile 7, 12, 518, 1 @@ -3254,13 +3254,13 @@ gUnknown_081A14B8:: @ 81A14B8 special ExecuteWhiteOut waitstate compare RESULT, 1 - jumpeq EventScript_1A14CA + goto_if_eq EventScript_1A14CA releaseall end EventScript_1A14CA:: message UnknownString_81A1141 - waittext + waitmessage waitbutton special sub_8081924 waitstate @@ -3598,44 +3598,44 @@ gUnknown_081A2C51:: @ 81A2C51 special sub_80BB70C special sub_80BB63C compare RESULT, 1 - jumpeq EventScript_1A2E45 - checkattack MOVE_SECRET_POWER - setanimation 0, RESULT - bufferattack 1, MOVE_SECRET_POWER + goto_if_eq EventScript_1A2E45 + checkpokemove MOVE_SECRET_POWER + setfieldeffect 0, RESULT + getmovename 1, MOVE_SECRET_POWER compare 0x8007, 1 - jumpeq EventScript_1A2CB0 + goto_if_eq EventScript_1A2CB0 compare 0x8007, 2 - jumpeq EventScript_1A2CB0 + goto_if_eq EventScript_1A2CB0 compare 0x8007, 3 - jumpeq EventScript_1A2CB0 + goto_if_eq EventScript_1A2CB0 compare 0x8007, 4 - jumpeq EventScript_1A2CB0 + goto_if_eq EventScript_1A2CB0 compare 0x8007, 5 - jumpeq EventScript_1A2D08 + goto_if_eq EventScript_1A2D08 compare 0x8007, 6 - jumpeq EventScript_1A2D60 + goto_if_eq EventScript_1A2D60 end EventScript_1A2CB0: lockall compare RESULT, 6 - jumpeq EventScript_1A2CF1 - bufferpartypoke 0, RESULT + goto_if_eq EventScript_1A2CF1 + getpartypokename 0, RESULT msgbox UnknownString_8198F34, 5 compare RESULT, 0 - jumpeq EventScript_1A2F3A + goto_if_eq EventScript_1A2F3A msgbox UsedCutRockSmashText, 4 - closebutton - doanimation 11 + closemessage + dofieldeffect 11 waitstate - jump EventScript_1A2CFA + goto EventScript_1A2CFA end gUnknown_081A2CE6:: @ 81A2CE6 lockall - doanimation 11 + dofieldeffect 11 waitstate - jump EventScript_1A2CFA + goto EventScript_1A2CFA end EventScript_1A2CF1: @@ -3644,29 +3644,29 @@ EventScript_1A2CF1: EventScript_1A2CFA: msgbox UnknownString_8198F6E, 4 - jump EventScript_1A2DB8 + goto EventScript_1A2DB8 end EventScript_1A2D08: lockall compare RESULT, 6 - jumpeq EventScript_1A2D49 - bufferpartypoke 0, RESULT + goto_if_eq EventScript_1A2D49 + getpartypokename 0, RESULT msgbox UnknownString_81A197B, 5 compare RESULT, 0 - jumpeq EventScript_1A2F3A + goto_if_eq EventScript_1A2F3A msgbox UsedCutRockSmashText, 4 - closebutton - doanimation 26 + closemessage + dofieldeffect 26 waitstate - jump EventScript_1A2D52 + goto EventScript_1A2D52 end gUnknown_081A2D3E:: @ 81A2D3E lockall - doanimation 26 + dofieldeffect 26 waitstate - jump EventScript_1A2D52 + goto EventScript_1A2D52 end EventScript_1A2D49: @@ -3675,29 +3675,29 @@ EventScript_1A2D49: EventScript_1A2D52: msgbox UnknownString_81A19C4, 4 - jump EventScript_1A2DB8 + goto EventScript_1A2DB8 end EventScript_1A2D60: lockall compare RESULT, 6 - jumpeq EventScript_1A2DA1 - bufferpartypoke 0, RESULT + goto_if_eq EventScript_1A2DA1 + getpartypokename 0, RESULT msgbox UnknownString_81A1A4B, 5 compare RESULT, 0 - jumpeq EventScript_1A2F3A + goto_if_eq EventScript_1A2F3A msgbox UsedCutRockSmashText, 4 - closebutton - doanimation 27 + closemessage + dofieldeffect 27 waitstate - jump EventScript_1A2DAA + goto EventScript_1A2DAA end gUnknown_081A2D96:: @ 81A2D96 lockall - doanimation 27 + dofieldeffect 27 waitstate - jump EventScript_1A2DAA + goto EventScript_1A2DAA end EventScript_1A2DA1: @@ -3706,12 +3706,12 @@ EventScript_1A2DA1: EventScript_1A2DAA: msgbox UnknownString_81A1AA9, 4 - jump EventScript_1A2DB8 + goto EventScript_1A2DB8 end EventScript_1A2DB8: - closebutton - playsfx 9 + closemessage + playse 9 setvar 0x4097, 0 setflag 173 special sub_80BB8CC @@ -3724,19 +3724,19 @@ EventScript_1A2DB8: end SecretBase_RedCave1_EventScript_1A2DDE:: @ 81A2DDE - move 255, SecretBase_RedCave1_Movement_1A2E11 - waitmove 0 + applymovement 255, SecretBase_RedCave1_Movement_1A2E11 + waitmovement 0 setvar 0x4097, 1 msgbox SecretBase_RedCave1_Text_198F89, 5 compare RESULT, 1 - jumpeq SecretBase_RedCave1_EventScript_1A2E08 - closebutton - playsfx 9 + goto_if_eq SecretBase_RedCave1_EventScript_1A2E08 + closemessage + playse 9 special sub_80BC440 end SecretBase_RedCave1_EventScript_1A2E08:: @ 81A2E08 - closebutton + closemessage setflag 96 special sub_80BBC78 waitstate @@ -3750,10 +3750,10 @@ SecretBase_RedCave1_Movement_1A2E11:: @ 81A2E11 gUnknown_081A2E14:: @ 81A2E14 lockall setvar 0x4097, 1 - playsfx 9 + playse 9 special sub_80BC114 compare RESULT, 0 - jumpeq EventScript_1A2E38 + goto_if_eq EventScript_1A2E38 clearflag 173 special sub_80BBAF0 setvar 0x4089, 0 @@ -3768,63 +3768,63 @@ EventScript_1A2E38: end EventScript_1A2E45: - checkattack MOVE_SECRET_POWER + checkpokemove MOVE_SECRET_POWER compare RESULT, 6 - jumpeq EventScript_1A2EF7 - setanimation 0, RESULT + goto_if_eq EventScript_1A2EF7 + setfieldeffect 0, RESULT setorcopyvar 0x8004, RESULT lockall special GetSecretBaseNearbyMapName msgbox UnknownString_81A3C71, 5 compare RESULT, 0 - jumpeq EventScript_1A2F3A + goto_if_eq EventScript_1A2F3A msgbox UnknownString_81A38FB, 5 compare RESULT, 0 - jumpeq EventScript_1A2F3A + goto_if_eq EventScript_1A2F3A fadescreen 1 special sub_80BC50C - closebutton + closemessage fadescreen 0 msgbox UnknownString_81A3CC9, 5 compare RESULT, 0 - jumpeq EventScript_1A2F3A - bufferpartypoke 0, 0x8004 - bufferattack 1, MOVE_SECRET_POWER + goto_if_eq EventScript_1A2F3A + getpartypokename 0, 0x8004 + getmovename 1, MOVE_SECRET_POWER msgbox UsedCutRockSmashText, 4 - closebutton - closebutton + closemessage + closemessage compare 0x8007, 1 - jumpeq gUnknown_081A2CE6 + goto_if_eq gUnknown_081A2CE6 compare 0x8007, 2 - jumpeq gUnknown_081A2CE6 + goto_if_eq gUnknown_081A2CE6 compare 0x8007, 3 - jumpeq gUnknown_081A2CE6 + goto_if_eq gUnknown_081A2CE6 compare 0x8007, 4 - jumpeq gUnknown_081A2CE6 + goto_if_eq gUnknown_081A2CE6 compare 0x8007, 5 - jumpeq gUnknown_081A2D3E + goto_if_eq gUnknown_081A2D3E compare 0x8007, 6 - jumpeq gUnknown_081A2D96 + goto_if_eq gUnknown_081A2D96 releaseall end EventScript_1A2EF7:: compare 0x8007, 1 - jumpeq EventScript_1A2CF1 + goto_if_eq EventScript_1A2CF1 compare 0x8007, 2 - jumpeq EventScript_1A2CF1 + goto_if_eq EventScript_1A2CF1 compare 0x8007, 3 - jumpeq EventScript_1A2CF1 + goto_if_eq EventScript_1A2CF1 compare 0x8007, 4 - jumpeq EventScript_1A2CF1 + goto_if_eq EventScript_1A2CF1 compare 0x8007, 5 - jumpeq EventScript_1A2D49 + goto_if_eq EventScript_1A2D49 compare 0x8007, 6 - jumpeq EventScript_1A2DA1 + goto_if_eq EventScript_1A2DA1 end EventScript_1A2F3A:: - closebutton + closemessage releaseall end @@ -3858,7 +3858,7 @@ SecretBase_RedCave1_EventScript_1A2F68:: @ 81A2F68 gUnknown_081A2F7B:: @ 81A2F7B setvar 0x8005, 0 - jump EventScript_1A2F86 + goto EventScript_1A2F86 end EventScript_1A2F86: @@ -3867,19 +3867,19 @@ EventScript_1A2F86: gUnknown_081A2F8A:: @ 81A2F8A setvar 0x8004, 0 - jump EventScript_1A2F95 + goto EventScript_1A2F95 end EventScript_1A2F95: special sub_8100A7C compare RESULT, 1 - jumpeq EventScript_1A2FBF + goto_if_eq EventScript_1A2FBF addvar 0x8004, 1 compare 0x8005, 0 - jumpeq EventScript_1A2F95 - disappear 0x8006 + goto_if_eq EventScript_1A2F95 + removeobject 0x8006 setflag 0x8005 - jump EventScript_1A2F95 + goto EventScript_1A2F95 end EventScript_1A2FBF: @@ -3911,45 +3911,45 @@ SecretBase_YellowCave3_EventScript_1A2FC0:: @ 81A2FC0 SecretBase_YellowCave4_EventScript_1A2FC0:: @ 81A2FC0 special sub_80BCE90 compare 0x8004, 0 - jumpeq SecretBase_RedCave1_EventScript_1A3032 + goto_if_eq SecretBase_RedCave1_EventScript_1A3032 compare 0x8004, 1 - jumpeq SecretBase_RedCave1_EventScript_1A30AE + goto_if_eq SecretBase_RedCave1_EventScript_1A30AE compare 0x8004, 2 - jumpeq SecretBase_RedCave1_EventScript_1A312A + goto_if_eq SecretBase_RedCave1_EventScript_1A312A compare 0x8004, 3 - jumpeq SecretBase_RedCave1_EventScript_1A31A6 + goto_if_eq SecretBase_RedCave1_EventScript_1A31A6 compare 0x8004, 4 - jumpeq SecretBase_RedCave1_EventScript_1A3222 + goto_if_eq SecretBase_RedCave1_EventScript_1A3222 compare 0x8004, 5 - jumpeq SecretBase_RedCave1_EventScript_1A329E + goto_if_eq SecretBase_RedCave1_EventScript_1A329E compare 0x8004, 6 - jumpeq SecretBase_RedCave1_EventScript_1A331A + goto_if_eq SecretBase_RedCave1_EventScript_1A331A compare 0x8004, 7 - jumpeq SecretBase_RedCave1_EventScript_1A3396 + goto_if_eq SecretBase_RedCave1_EventScript_1A3396 compare 0x8004, 8 - jumpeq SecretBase_RedCave1_EventScript_1A3412 + goto_if_eq SecretBase_RedCave1_EventScript_1A3412 compare 0x8004, 9 - jumpeq SecretBase_RedCave1_EventScript_1A348E + goto_if_eq SecretBase_RedCave1_EventScript_1A348E end SecretBase_RedCave1_EventScript_1A3032:: @ 81A3032 checkflag 2052 - jumpif 0, SecretBase_RedCave1_EventScript_1A3086 + goto_if 0, SecretBase_RedCave1_EventScript_1A3086 compare RESULT, 1 - jumpeq SecretBase_RedCave1_EventScript_1A30A5 + goto_if_eq SecretBase_RedCave1_EventScript_1A30A5 lock faceplayer msgbox SecretBase_RedCave1_Text_1A1AEA, 5 compare RESULT, 0 - jumpeq SecretBase_RedCave1_EventScript_1A308F + goto_if_eq SecretBase_RedCave1_EventScript_1A308F setvar RESULT, 1 special sub_80BCE4C call S_DoSaveDialog compare RESULT, 0 - jumpeq SecretBase_RedCave1_EventScript_1A308F - hidebox 0, 0, 15, 10 + goto_if_eq SecretBase_RedCave1_EventScript_1A308F + erasebox 0, 0, 15, 10 msgbox SecretBase_RedCave1_Text_1A1B83, 4 - jump SecretBase_RedCave1_EventScript_1A350A + goto SecretBase_RedCave1_EventScript_1A350A end SecretBase_RedCave1_EventScript_1A3086:: @ 81A3086 @@ -3959,7 +3959,7 @@ SecretBase_RedCave1_EventScript_1A3086:: @ 81A3086 SecretBase_RedCave1_EventScript_1A308F:: @ 81A308F setvar RESULT, 0 special sub_80BCE4C - hidebox 0, 0, 15, 10 + erasebox 0, 0, 15, 10 msgbox SecretBase_RedCave1_Text_1A1B97, 2 end @@ -3969,22 +3969,22 @@ SecretBase_RedCave1_EventScript_1A30A5:: @ 81A30A5 SecretBase_RedCave1_EventScript_1A30AE:: @ 81A30AE checkflag 2052 - jumpif 0, SecretBase_RedCave1_EventScript_1A3102 + goto_if 0, SecretBase_RedCave1_EventScript_1A3102 compare RESULT, 1 - jumpeq SecretBase_RedCave1_EventScript_1A3121 + goto_if_eq SecretBase_RedCave1_EventScript_1A3121 lock faceplayer msgbox SecretBase_RedCave1_Text_1A1E67, 5 compare RESULT, 0 - jumpeq SecretBase_RedCave1_EventScript_1A310B + goto_if_eq SecretBase_RedCave1_EventScript_1A310B setvar RESULT, 1 special sub_80BCE4C call S_DoSaveDialog compare RESULT, 0 - jumpeq SecretBase_RedCave1_EventScript_1A310B - hidebox 0, 0, 15, 10 + goto_if_eq SecretBase_RedCave1_EventScript_1A310B + erasebox 0, 0, 15, 10 msgbox SecretBase_RedCave1_Text_1A1F04, 4 - jump SecretBase_RedCave1_EventScript_1A350A + goto SecretBase_RedCave1_EventScript_1A350A end SecretBase_RedCave1_EventScript_1A3102:: @ 81A3102 @@ -3994,7 +3994,7 @@ SecretBase_RedCave1_EventScript_1A3102:: @ 81A3102 SecretBase_RedCave1_EventScript_1A310B:: @ 81A310B setvar RESULT, 0 special sub_80BCE4C - hidebox 0, 0, 15, 10 + erasebox 0, 0, 15, 10 msgbox SecretBase_RedCave1_Text_1A1F2E, 2 end @@ -4004,22 +4004,22 @@ SecretBase_RedCave1_EventScript_1A3121:: @ 81A3121 SecretBase_RedCave1_EventScript_1A312A:: @ 81A312A checkflag 2052 - jumpif 0, SecretBase_RedCave1_EventScript_1A317E + goto_if 0, SecretBase_RedCave1_EventScript_1A317E compare RESULT, 1 - jumpeq SecretBase_RedCave1_EventScript_1A319D + goto_if_eq SecretBase_RedCave1_EventScript_1A319D lock faceplayer msgbox SecretBase_RedCave1_Text_1A218F, 5 compare RESULT, 0 - jumpeq SecretBase_RedCave1_EventScript_1A3187 + goto_if_eq SecretBase_RedCave1_EventScript_1A3187 setvar RESULT, 1 special sub_80BCE4C call S_DoSaveDialog compare RESULT, 0 - jumpeq SecretBase_RedCave1_EventScript_1A3187 - hidebox 0, 0, 15, 10 + goto_if_eq SecretBase_RedCave1_EventScript_1A3187 + erasebox 0, 0, 15, 10 msgbox SecretBase_RedCave1_Text_1A2220, 4 - jump SecretBase_RedCave1_EventScript_1A350A + goto SecretBase_RedCave1_EventScript_1A350A end SecretBase_RedCave1_EventScript_1A317E:: @ 81A317E @@ -4029,7 +4029,7 @@ SecretBase_RedCave1_EventScript_1A317E:: @ 81A317E SecretBase_RedCave1_EventScript_1A3187:: @ 81A3187 setvar RESULT, 0 special sub_80BCE4C - hidebox 0, 0, 15, 10 + erasebox 0, 0, 15, 10 msgbox SecretBase_RedCave1_Text_1A2230, 2 end @@ -4039,22 +4039,22 @@ SecretBase_RedCave1_EventScript_1A319D:: @ 81A319D SecretBase_RedCave1_EventScript_1A31A6:: @ 81A31A6 checkflag 2052 - jumpif 0, SecretBase_RedCave1_EventScript_1A31FA + goto_if 0, SecretBase_RedCave1_EventScript_1A31FA compare RESULT, 1 - jumpeq SecretBase_RedCave1_EventScript_1A3219 + goto_if_eq SecretBase_RedCave1_EventScript_1A3219 lock faceplayer msgbox SecretBase_RedCave1_Text_1A24E1, 5 compare RESULT, 0 - jumpeq SecretBase_RedCave1_EventScript_1A3203 + goto_if_eq SecretBase_RedCave1_EventScript_1A3203 setvar RESULT, 1 special sub_80BCE4C call S_DoSaveDialog compare RESULT, 0 - jumpeq SecretBase_RedCave1_EventScript_1A3203 - hidebox 0, 0, 15, 10 + goto_if_eq SecretBase_RedCave1_EventScript_1A3203 + erasebox 0, 0, 15, 10 msgbox SecretBase_RedCave1_Text_1A256F, 4 - jump SecretBase_RedCave1_EventScript_1A350A + goto SecretBase_RedCave1_EventScript_1A350A end SecretBase_RedCave1_EventScript_1A31FA:: @ 81A31FA @@ -4064,7 +4064,7 @@ SecretBase_RedCave1_EventScript_1A31FA:: @ 81A31FA SecretBase_RedCave1_EventScript_1A3203:: @ 81A3203 setvar RESULT, 0 special sub_80BCE4C - hidebox 0, 0, 15, 10 + erasebox 0, 0, 15, 10 msgbox SecretBase_RedCave1_Text_1A258A, 2 end @@ -4074,22 +4074,22 @@ SecretBase_RedCave1_EventScript_1A3219:: @ 81A3219 SecretBase_RedCave1_EventScript_1A3222:: @ 81A3222 checkflag 2052 - jumpif 0, SecretBase_RedCave1_EventScript_1A3276 + goto_if 0, SecretBase_RedCave1_EventScript_1A3276 compare RESULT, 1 - jumpeq SecretBase_RedCave1_EventScript_1A3295 + goto_if_eq SecretBase_RedCave1_EventScript_1A3295 lock faceplayer msgbox SecretBase_RedCave1_Text_1A2830, 5 compare RESULT, 0 - jumpeq SecretBase_RedCave1_EventScript_1A327F + goto_if_eq SecretBase_RedCave1_EventScript_1A327F setvar RESULT, 1 special sub_80BCE4C call S_DoSaveDialog compare RESULT, 0 - jumpeq SecretBase_RedCave1_EventScript_1A327F - hidebox 0, 0, 15, 10 + goto_if_eq SecretBase_RedCave1_EventScript_1A327F + erasebox 0, 0, 15, 10 msgbox SecretBase_RedCave1_Text_1A28D7, 4 - jump SecretBase_RedCave1_EventScript_1A350A + goto SecretBase_RedCave1_EventScript_1A350A end SecretBase_RedCave1_EventScript_1A3276:: @ 81A3276 @@ -4099,7 +4099,7 @@ SecretBase_RedCave1_EventScript_1A3276:: @ 81A3276 SecretBase_RedCave1_EventScript_1A327F:: @ 81A327F setvar RESULT, 0 special sub_80BCE4C - hidebox 0, 0, 15, 10 + erasebox 0, 0, 15, 10 msgbox SecretBase_RedCave1_Text_1A28F4, 2 end @@ -4109,22 +4109,22 @@ SecretBase_RedCave1_EventScript_1A3295:: @ 81A3295 SecretBase_RedCave1_EventScript_1A329E:: @ 81A329E checkflag 2052 - jumpif 0, SecretBase_RedCave1_EventScript_1A32F2 + goto_if 0, SecretBase_RedCave1_EventScript_1A32F2 compare RESULT, 1 - jumpeq SecretBase_RedCave1_EventScript_1A3311 + goto_if_eq SecretBase_RedCave1_EventScript_1A3311 lock faceplayer msgbox SecretBase_RedCave1_Text_1A1CB2, 5 compare RESULT, 0 - jumpeq SecretBase_RedCave1_EventScript_1A32FB + goto_if_eq SecretBase_RedCave1_EventScript_1A32FB setvar RESULT, 1 special sub_80BCE4C call S_DoSaveDialog compare RESULT, 0 - jumpeq SecretBase_RedCave1_EventScript_1A32FB - hidebox 0, 0, 15, 10 + goto_if_eq SecretBase_RedCave1_EventScript_1A32FB + erasebox 0, 0, 15, 10 msgbox SecretBase_RedCave1_Text_1A1D48, 4 - jump SecretBase_RedCave1_EventScript_1A350A + goto SecretBase_RedCave1_EventScript_1A350A end SecretBase_RedCave1_EventScript_1A32F2:: @ 81A32F2 @@ -4134,7 +4134,7 @@ SecretBase_RedCave1_EventScript_1A32F2:: @ 81A32F2 SecretBase_RedCave1_EventScript_1A32FB:: @ 81A32FB setvar RESULT, 0 special sub_80BCE4C - hidebox 0, 0, 15, 10 + erasebox 0, 0, 15, 10 msgbox SecretBase_RedCave1_Text_1A1D59, 2 end @@ -4144,22 +4144,22 @@ SecretBase_RedCave1_EventScript_1A3311:: @ 81A3311 SecretBase_RedCave1_EventScript_1A331A:: @ 81A331A checkflag 2052 - jumpif 0, SecretBase_RedCave1_EventScript_1A336E + goto_if 0, SecretBase_RedCave1_EventScript_1A336E compare RESULT, 1 - jumpeq SecretBase_RedCave1_EventScript_1A338D + goto_if_eq SecretBase_RedCave1_EventScript_1A338D lock faceplayer msgbox SecretBase_RedCave1_Text_1A2026, 5 compare RESULT, 0 - jumpeq SecretBase_RedCave1_EventScript_1A3377 + goto_if_eq SecretBase_RedCave1_EventScript_1A3377 setvar RESULT, 1 special sub_80BCE4C call S_DoSaveDialog compare RESULT, 0 - jumpeq SecretBase_RedCave1_EventScript_1A3377 - hidebox 0, 0, 15, 10 + goto_if_eq SecretBase_RedCave1_EventScript_1A3377 + erasebox 0, 0, 15, 10 msgbox SecretBase_RedCave1_Text_1A2095, 4 - jump SecretBase_RedCave1_EventScript_1A350A + goto SecretBase_RedCave1_EventScript_1A350A end SecretBase_RedCave1_EventScript_1A336E:: @ 81A336E @@ -4169,7 +4169,7 @@ SecretBase_RedCave1_EventScript_1A336E:: @ 81A336E SecretBase_RedCave1_EventScript_1A3377:: @ 81A3377 setvar RESULT, 0 special sub_80BCE4C - hidebox 0, 0, 15, 10 + erasebox 0, 0, 15, 10 msgbox SecretBase_RedCave1_Text_1A20AE, 2 end @@ -4179,22 +4179,22 @@ SecretBase_RedCave1_EventScript_1A338D:: @ 81A338D SecretBase_RedCave1_EventScript_1A3396:: @ 81A3396 checkflag 2052 - jumpif 0, SecretBase_RedCave1_EventScript_1A33EA + goto_if 0, SecretBase_RedCave1_EventScript_1A33EA compare RESULT, 1 - jumpeq SecretBase_RedCave1_EventScript_1A3409 + goto_if_eq SecretBase_RedCave1_EventScript_1A3409 lock faceplayer msgbox SecretBase_RedCave1_Text_1A236A, 5 compare RESULT, 0 - jumpeq SecretBase_RedCave1_EventScript_1A33F3 + goto_if_eq SecretBase_RedCave1_EventScript_1A33F3 setvar RESULT, 1 special sub_80BCE4C call S_DoSaveDialog compare RESULT, 0 - jumpeq SecretBase_RedCave1_EventScript_1A33F3 - hidebox 0, 0, 15, 10 + goto_if_eq SecretBase_RedCave1_EventScript_1A33F3 + erasebox 0, 0, 15, 10 msgbox SecretBase_RedCave1_Text_1A2405, 4 - jump SecretBase_RedCave1_EventScript_1A350A + goto SecretBase_RedCave1_EventScript_1A350A end SecretBase_RedCave1_EventScript_1A33EA:: @ 81A33EA @@ -4204,7 +4204,7 @@ SecretBase_RedCave1_EventScript_1A33EA:: @ 81A33EA SecretBase_RedCave1_EventScript_1A33F3:: @ 81A33F3 setvar RESULT, 0 special sub_80BCE4C - hidebox 0, 0, 15, 10 + erasebox 0, 0, 15, 10 msgbox SecretBase_RedCave1_Text_1A2420, 2 end @@ -4214,22 +4214,22 @@ SecretBase_RedCave1_EventScript_1A3409:: @ 81A3409 SecretBase_RedCave1_EventScript_1A3412:: @ 81A3412 checkflag 2052 - jumpif 0, SecretBase_RedCave1_EventScript_1A3466 + goto_if 0, SecretBase_RedCave1_EventScript_1A3466 compare RESULT, 1 - jumpeq SecretBase_RedCave1_EventScript_1A3485 + goto_if_eq SecretBase_RedCave1_EventScript_1A3485 lock faceplayer msgbox SecretBase_RedCave1_Text_1A2663, 5 compare RESULT, 0 - jumpeq SecretBase_RedCave1_EventScript_1A346F + goto_if_eq SecretBase_RedCave1_EventScript_1A346F setvar RESULT, 1 special sub_80BCE4C call S_DoSaveDialog compare RESULT, 0 - jumpeq SecretBase_RedCave1_EventScript_1A346F - hidebox 0, 0, 15, 10 + goto_if_eq SecretBase_RedCave1_EventScript_1A346F + erasebox 0, 0, 15, 10 msgbox SecretBase_RedCave1_Text_1A2710, 4 - jump SecretBase_RedCave1_EventScript_1A350A + goto SecretBase_RedCave1_EventScript_1A350A end SecretBase_RedCave1_EventScript_1A3466:: @ 81A3466 @@ -4239,7 +4239,7 @@ SecretBase_RedCave1_EventScript_1A3466:: @ 81A3466 SecretBase_RedCave1_EventScript_1A346F:: @ 81A346F setvar RESULT, 0 special sub_80BCE4C - hidebox 0, 0, 15, 10 + erasebox 0, 0, 15, 10 msgbox SecretBase_RedCave1_Text_1A2736, 2 end @@ -4249,22 +4249,22 @@ SecretBase_RedCave1_EventScript_1A3485:: @ 81A3485 SecretBase_RedCave1_EventScript_1A348E:: @ 81A348E checkflag 2052 - jumpif 0, SecretBase_RedCave1_EventScript_1A34E2 + goto_if 0, SecretBase_RedCave1_EventScript_1A34E2 compare RESULT, 1 - jumpeq SecretBase_RedCave1_EventScript_1A3501 + goto_if_eq SecretBase_RedCave1_EventScript_1A3501 lock faceplayer msgbox SecretBase_RedCave1_Text_1A2A13, 5 compare RESULT, 0 - jumpeq SecretBase_RedCave1_EventScript_1A34EB + goto_if_eq SecretBase_RedCave1_EventScript_1A34EB setvar RESULT, 1 special sub_80BCE4C call S_DoSaveDialog compare RESULT, 0 - jumpeq SecretBase_RedCave1_EventScript_1A34EB - hidebox 0, 0, 15, 10 + goto_if_eq SecretBase_RedCave1_EventScript_1A34EB + erasebox 0, 0, 15, 10 msgbox SecretBase_RedCave1_Text_1A2AE2, 4 - jump SecretBase_RedCave1_EventScript_1A350A + goto SecretBase_RedCave1_EventScript_1A350A end SecretBase_RedCave1_EventScript_1A34E2:: @ 81A34E2 @@ -4274,7 +4274,7 @@ SecretBase_RedCave1_EventScript_1A34E2:: @ 81A34E2 SecretBase_RedCave1_EventScript_1A34EB:: @ 81A34EB setvar RESULT, 0 special sub_80BCE4C - hidebox 0, 0, 15, 10 + erasebox 0, 0, 15, 10 msgbox SecretBase_RedCave1_Text_1A2AFB, 2 end @@ -4374,7 +4374,7 @@ FallarborTown_ContestLobby_EventScript_1ADE46:: @ 81ADE46 SlateportCity_OceanicMuseum_1F_EventScript_1ADE46:: @ 81ADE46 SlateportCity_PokemonFanClub_EventScript_1ADE46:: @ 81ADE46 special sub_80BDE48 - inccounter GAME_STAT_GOT_INTERVIEWED + incrementgamestat GAME_STAT_GOT_INTERVIEWED release end @@ -4382,13 +4382,13 @@ SlateportCity_PokemonFanClub_EventScript_1ADE4D:: @ 81ADE4D setvar 0x8005, 1 special sub_80BF2C4 compare RESULT, 1 - jumpeq SlateportCity_PokemonFanClub_EventScript_1ADED6 + goto_if_eq SlateportCity_PokemonFanClub_EventScript_1ADED6 copyvar 0x8009, 0x8006 msgbox SlateportCity_PokemonFanClub_Text_1A8704, 5 compare RESULT, 1 - jumpeq SlateportCity_PokemonFanClub_EventScript_1ADE84 + goto_if_eq SlateportCity_PokemonFanClub_EventScript_1ADE84 compare RESULT, 0 - jumpeq SlateportCity_PokemonFanClub_EventScript_1ADEB9 + goto_if_eq SlateportCity_PokemonFanClub_EventScript_1ADEB9 end SlateportCity_PokemonFanClub_EventScript_1ADE84:: @ 81ADE84 @@ -4400,9 +4400,9 @@ SlateportCity_PokemonFanClub_EventScript_1ADE84:: @ 81ADE84 lock faceplayer compare RESULT, 1 - jumpeq SlateportCity_PokemonFanClub_EventScript_1ADEC3 + goto_if_eq SlateportCity_PokemonFanClub_EventScript_1ADEC3 compare RESULT, 0 - jumpeq SlateportCity_PokemonFanClub_EventScript_1ADEB9 + goto_if_eq SlateportCity_PokemonFanClub_EventScript_1ADEB9 end SlateportCity_PokemonFanClub_EventScript_1ADEB9:: @ 81ADEB9 @@ -4413,7 +4413,7 @@ SlateportCity_PokemonFanClub_EventScript_1ADEB9:: @ 81ADEB9 SlateportCity_PokemonFanClub_EventScript_1ADEC3:: @ 81ADEC3 msgbox SlateportCity_PokemonFanClub_Text_1A8818, 4 setvar 0x8005, 1 - jump SlateportCity_PokemonFanClub_EventScript_1ADE46 + goto SlateportCity_PokemonFanClub_EventScript_1ADE46 end SlateportCity_PokemonFanClub_EventScript_1ADED6:: @ 81ADED6 @@ -4427,24 +4427,24 @@ SlateportCity_OceanicMuseum_1F_EventScript_1ADEE0:: @ 81ADEE0 setvar 0x8005, 2 special sub_80BF2C4 compare RESULT, 1 - jumpeq SlateportCity_OceanicMuseum_1F_EventScript_1ADF96 + goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_1ADF96 copyvar 0x8009, 0x8006 checkflag 105 - jumpeq SlateportCity_OceanicMuseum_1F_EventScript_1ADF25 + goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_1ADF25 setflag 105 msgbox SlateportCity_OceanicMuseum_1F_Text_1A927F, 5 compare RESULT, 1 - jumpeq SlateportCity_OceanicMuseum_1F_EventScript_1ADF44 + goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_1ADF44 compare RESULT, 0 - jumpeq SlateportCity_OceanicMuseum_1F_EventScript_1ADF79 + goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_1ADF79 end SlateportCity_OceanicMuseum_1F_EventScript_1ADF25:: @ 81ADF25 msgbox SlateportCity_OceanicMuseum_1F_Text_1A934C, 5 compare RESULT, 1 - jumpeq SlateportCity_OceanicMuseum_1F_EventScript_1ADF44 + goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_1ADF44 compare RESULT, 0 - jumpeq SlateportCity_OceanicMuseum_1F_EventScript_1ADF79 + goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_1ADF79 end SlateportCity_OceanicMuseum_1F_EventScript_1ADF44:: @ 81ADF44 @@ -4456,9 +4456,9 @@ SlateportCity_OceanicMuseum_1F_EventScript_1ADF44:: @ 81ADF44 lock faceplayer compare RESULT, 1 - jumpeq SlateportCity_OceanicMuseum_1F_EventScript_1ADF83 + goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_1ADF83 compare RESULT, 0 - jumpeq SlateportCity_OceanicMuseum_1F_EventScript_1ADF79 + goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_1ADF79 end SlateportCity_OceanicMuseum_1F_EventScript_1ADF79:: @ 81ADF79 @@ -4469,7 +4469,7 @@ SlateportCity_OceanicMuseum_1F_EventScript_1ADF79:: @ 81ADF79 SlateportCity_OceanicMuseum_1F_EventScript_1ADF83:: @ 81ADF83 msgbox SlateportCity_OceanicMuseum_1F_Text_1A949A, 4 setvar 0x8005, 2 - jump SlateportCity_OceanicMuseum_1F_EventScript_1ADE46 + goto SlateportCity_OceanicMuseum_1F_EventScript_1ADE46 end SlateportCity_OceanicMuseum_1F_EventScript_1ADF96:: @ 81ADF96 @@ -4480,19 +4480,19 @@ SlateportCity_OceanicMuseum_1F_EventScript_1ADF96:: @ 81ADF96 SlateportCity_PokemonFanClub_EventScript_1ADFA0:: @ 81ADFA0 lock faceplayer - specialval RESULT, sub_80BF544 + specialvar RESULT, sub_80BF544 compare RESULT, 0 - jumpeq SlateportCity_PokemonFanClub_EventScript_1ADE4D + goto_if_eq SlateportCity_PokemonFanClub_EventScript_1ADE4D setvar 0x8005, 3 special sub_80BF2C4 compare RESULT, 1 - jumpeq SlateportCity_PokemonFanClub_EventScript_1AE0AC + goto_if_eq SlateportCity_PokemonFanClub_EventScript_1AE0AC copyvar 0x8009, 0x8006 msgbox SlateportCity_PokemonFanClub_Text_1A82F1, 5 compare RESULT, 1 - jumpeq SlateportCity_PokemonFanClub_EventScript_1ADFE9 + goto_if_eq SlateportCity_PokemonFanClub_EventScript_1ADFE9 compare RESULT, 0 - jumpeq SlateportCity_PokemonFanClub_EventScript_1AE0A2 + goto_if_eq SlateportCity_PokemonFanClub_EventScript_1AE0A2 end SlateportCity_PokemonFanClub_EventScript_1ADFE9:: @ 81ADFE9 @@ -4507,17 +4507,17 @@ SlateportCity_PokemonFanClub_EventScript_1ADFE9:: @ 81ADFE9 SlateportCity_PokemonFanClub_EventScript_1AE020:: @ 81AE020 msgbox SlateportCity_PokemonFanClub_Text_1A8414, 4 - jump SlateportCity_PokemonFanClub_EventScript_1AE04A + goto SlateportCity_PokemonFanClub_EventScript_1AE04A end SlateportCity_PokemonFanClub_EventScript_1AE02E:: @ 81AE02E msgbox SlateportCity_PokemonFanClub_Text_1A8470, 4 - jump SlateportCity_PokemonFanClub_EventScript_1AE04A + goto SlateportCity_PokemonFanClub_EventScript_1AE04A end SlateportCity_PokemonFanClub_EventScript_1AE03C:: @ 81AE03C msgbox SlateportCity_PokemonFanClub_Text_1A84D5, 4 - jump SlateportCity_PokemonFanClub_EventScript_1AE04A + goto SlateportCity_PokemonFanClub_EventScript_1AE04A end SlateportCity_PokemonFanClub_EventScript_1AE04A:: @ 81AE04A @@ -4528,18 +4528,18 @@ SlateportCity_PokemonFanClub_EventScript_1AE04A:: @ 81AE04A lock faceplayer compare RESULT, 0 - jumpeq SlateportCity_PokemonFanClub_EventScript_1AE0A2 + goto_if_eq SlateportCity_PokemonFanClub_EventScript_1AE0A2 msgbox SlateportCity_PokemonFanClub_Text_1A852D, 4 setvar 0x8006, 1 call SlateportCity_PokemonFanClub_EventScript_1A00F3 lock faceplayer compare RESULT, 0 - jumpeq SlateportCity_PokemonFanClub_EventScript_1AE0A2 + goto_if_eq SlateportCity_PokemonFanClub_EventScript_1AE0A2 msgbox SlateportCity_PokemonFanClub_Text_1A85A6, 4 copyvar 0x8007, 0x800a setvar 0x8005, 3 - jump SlateportCity_PokemonFanClub_EventScript_1ADE46 + goto SlateportCity_PokemonFanClub_EventScript_1ADE46 end SlateportCity_PokemonFanClub_EventScript_1AE0A2:: @ 81AE0A2 @@ -4559,17 +4559,17 @@ VerdanturfTown_ContestLobby_EventScript_1AE0B6:: @ 81AE0B6 lock faceplayer checkflag 2 - jumpeq FallarborTown_ContestLobby_EventScript_1AE17E + goto_if_eq FallarborTown_ContestLobby_EventScript_1AE17E setvar 0x8005, 6 special sub_80BF2C4 compare RESULT, 1 - jumpeq FallarborTown_ContestLobby_EventScript_1AE17E + goto_if_eq FallarborTown_ContestLobby_EventScript_1AE17E copyvar 0x8009, 0x8006 msgbox FallarborTown_ContestLobby_Text_1A6F7C, 5 compare RESULT, 1 - jumpeq FallarborTown_ContestLobby_EventScript_1AE0F8 + goto_if_eq FallarborTown_ContestLobby_EventScript_1AE0F8 compare RESULT, 0 - jumpeq FallarborTown_ContestLobby_EventScript_1AE12D + goto_if_eq FallarborTown_ContestLobby_EventScript_1AE12D end FallarborTown_ContestLobby_EventScript_1AE0F8:: @ 81AE0F8 @@ -4581,9 +4581,9 @@ FallarborTown_ContestLobby_EventScript_1AE0F8:: @ 81AE0F8 lock faceplayer compare RESULT, 1 - jumpeq FallarborTown_ContestLobby_EventScript_1AE137 + goto_if_eq FallarborTown_ContestLobby_EventScript_1AE137 compare RESULT, 0 - jumpeq FallarborTown_ContestLobby_EventScript_1AE12D + goto_if_eq FallarborTown_ContestLobby_EventScript_1AE12D end FallarborTown_ContestLobby_EventScript_1AE12D:: @ 81AE12D @@ -4602,11 +4602,11 @@ FallarborTown_ContestLobby_EventScript_1AE137:: @ 81AE137 lock faceplayer compare RESULT, 0 - jumpeq FallarborTown_ContestLobby_EventScript_1AE12D + goto_if_eq FallarborTown_ContestLobby_EventScript_1AE12D msgbox FallarborTown_ContestLobby_Text_1A7153, 4 setflag 2 setvar 0x8005, 6 - jump FallarborTown_ContestLobby_EventScript_1ADE46 + goto FallarborTown_ContestLobby_EventScript_1ADE46 end FallarborTown_ContestLobby_EventScript_1AE17E:: @ 81AE17E @@ -4619,11 +4619,11 @@ LilycoveCity_ContestLobby_EventScript_1AE188:: @ 81AE188 SlateportCity_ContestLobby_EventScript_1AE188:: @ 81AE188 VerdanturfTown_ContestLobby_EventScript_1AE188:: @ 81AE188 compare 0x4086, 2 - jumpif 5, FallarborTown_ContestLobby_EventScript_1AE1FE + goto_if 5, FallarborTown_ContestLobby_EventScript_1AE1FE setvar 0x8005, 6 special sub_80BF2C4 compare RESULT, 1 - jumpeq FallarborTown_ContestLobby_EventScript_1AE1FE + goto_if_eq FallarborTown_ContestLobby_EventScript_1AE1FE switch 0x4088 case 0, FallarborTown_ContestLobby_EventScript_1AE1FE case 2, FallarborTown_ContestLobby_EventScript_1AE1EE @@ -4656,28 +4656,28 @@ BattleTower_Lobby_EventScript_1AE1FF:: @ 81AE1FF lock faceplayer checkflag 2 - jumpeq BattleTower_Lobby_EventScript_1AE2E3 + goto_if_eq BattleTower_Lobby_EventScript_1AE2E3 setvar 0x8005, 7 special sub_80BF2C4 compare RESULT, 1 - jumpeq BattleTower_Lobby_EventScript_1AE2E3 + goto_if_eq BattleTower_Lobby_EventScript_1AE2E3 copyvar 0x8009, 0x8006 msgbox BattleTower_Lobby_Text_1A776D, 5 compare RESULT, 1 - jumpeq BattleTower_Lobby_EventScript_1AE241 + goto_if_eq BattleTower_Lobby_EventScript_1AE241 compare RESULT, 0 - jumpeq BattleTower_Lobby_EventScript_1AE297 + goto_if_eq BattleTower_Lobby_EventScript_1AE297 end BattleTower_Lobby_EventScript_1AE241:: @ 81AE241 message BattleTower_Lobby_Text_1A7823 - waittext + waitmessage multichoice 19, 8, 45, 1 copyvar 0x8008, RESULT compare RESULT, 0 - callif 1, BattleTower_Lobby_EventScript_1AE2A1 + call_if 1, BattleTower_Lobby_EventScript_1AE2A1 compare RESULT, 1 - callif 1, BattleTower_Lobby_EventScript_1AE2AA + call_if 1, BattleTower_Lobby_EventScript_1AE2AA msgbox BattleTower_Lobby_Text_1A79EB, 4 setvar 0x8004, 12 copyvar 0x8005, 0x8009 @@ -4685,9 +4685,9 @@ BattleTower_Lobby_EventScript_1AE241:: @ 81AE241 lock faceplayer compare RESULT, 1 - jumpeq BattleTower_Lobby_EventScript_1AE2B3 + goto_if_eq BattleTower_Lobby_EventScript_1AE2B3 compare RESULT, 0 - jumpeq BattleTower_Lobby_EventScript_1AE2D9 + goto_if_eq BattleTower_Lobby_EventScript_1AE2D9 end BattleTower_Lobby_EventScript_1AE297:: @ 81AE297 @@ -4705,12 +4705,12 @@ BattleTower_Lobby_EventScript_1AE2AA:: @ 81AE2AA BattleTower_Lobby_EventScript_1AE2B3:: @ 81AE2B3 compare RESULT, 0 - jumpeq BattleTower_Lobby_EventScript_1AE2D9 + goto_if_eq BattleTower_Lobby_EventScript_1AE2D9 msgbox BattleTower_Lobby_Text_1A7A6E, 4 setflag 2 copyvar 0x8004, 0x8008 setvar 0x8005, 7 - jump BattleTower_Lobby_EventScript_1ADE46 + goto BattleTower_Lobby_EventScript_1ADE46 end BattleTower_Lobby_EventScript_1AE2D9:: @ 81AE2D9 @@ -4725,11 +4725,11 @@ BattleTower_Lobby_EventScript_1AE2E3:: @ 81AE2E3 BattleTower_Lobby_EventScript_1AE2ED:: @ 81AE2ED compare 0x40bc, 0 - jumpeq BattleTower_Lobby_EventScript_1AE30F + goto_if_eq BattleTower_Lobby_EventScript_1AE30F setvar 0x8005, 7 special sub_80BF2C4 compare RESULT, 1 - jumpeq BattleTower_Lobby_EventScript_1AE30F + goto_if_eq BattleTower_Lobby_EventScript_1AE30F clearflag 918 return @@ -4763,8 +4763,8 @@ BattleTower_Lobby_EventScript_1AE30F:: @ 81AE30F .include "data/text/magma_summit.inc" gUnknown_081B694A:: @ 81B694A - lighten 1 - darken 1 + animdarklevel 1 + setdarklevel 1 end .include "data/scripts/players_house.inc" @@ -4791,25 +4791,25 @@ Text_RepelWoreOff: @ 81C33EF MauvilleCity_GameCorner_EventScript_1C407E:: @ 81C407E checkitem ITEM_COIN_CASE, 1 compare RESULT, 0 - jumpeq MauvilleCity_GameCorner_EventScript_1572B5 + goto_if_eq MauvilleCity_GameCorner_EventScript_1572B5 setvar 0x8004, 0 - event_96 2 + getpricereduction 2 compare RESULT, 0 - jumpeq MauvilleCity_GameCorner_EventScript_1C40DA + goto_if_eq MauvilleCity_GameCorner_EventScript_1C40DA addvar 0x8004, 128 - jump MauvilleCity_GameCorner_EventScript_1C40DA + goto MauvilleCity_GameCorner_EventScript_1C40DA end MauvilleCity_GameCorner_EventScript_1C40AC:: @ 81C40AC checkitem ITEM_COIN_CASE, 1 compare RESULT, 0 - jumpeq MauvilleCity_GameCorner_EventScript_1572B5 + goto_if_eq MauvilleCity_GameCorner_EventScript_1572B5 setvar 0x8004, 1 - event_96 2 + getpricereduction 2 compare RESULT, 0 - jumpeq MauvilleCity_GameCorner_EventScript_1C40DA + goto_if_eq MauvilleCity_GameCorner_EventScript_1C40DA addvar 0x8004, 128 - jump MauvilleCity_GameCorner_EventScript_1C40DA + goto MauvilleCity_GameCorner_EventScript_1C40DA end MauvilleCity_GameCorner_EventScript_1C40DA:: @ 81C40DA @@ -4870,22 +4870,22 @@ SkyPillar_4F_MapScript1_1C6BBF:: @ 81C6BBF S_FallDownHole:: @ 81C6BC5 lockall - pause 20 - move 255, GraniteCave_B1F_Movement_1C6BF7 - waitmove 0 - playsfx 43 - pause 60 + delay 20 + applymovement 255, GraniteCave_B1F_Movement_1C6BF7 + waitmovement 0 + playse 43 + delay 60 warphole UNDEFINED waitstate end gUnknown_081C6BDE:: @ 81C6BDE lockall - pause 20 - move 255, GraniteCave_B1F_Movement_1C6BF7 - waitmove 0 - playsfx 43 - pause 60 + delay 20 + applymovement 255, GraniteCave_B1F_Movement_1C6BF7 + waitmovement 0 + playse 43 + delay 60 special sp13F_fall_to_last_warp waitstate end @@ -4917,9 +4917,9 @@ gUnknown_081C6C02:: @ 81C6C02 @ 81C6C1D lockall - braillemsg Underwater_SealedChamber_Braille_1C533D + braillemessage Underwater_SealedChamber_Braille_1C533D waitbutton - hidebox 0, 0, 29, 19 + erasebox 0, 0, 29, 19 releaseall end diff --git a/data/field_move_scripts.inc b/data/field_move_scripts.inc index 9911dca3a..c36f95460 100644 --- a/data/field_move_scripts.inc +++ b/data/field_move_scripts.inc @@ -1,34 +1,34 @@ S_CuttableTree:: @ 81B0DCC lockall checkflag 2055 - jumpif 0, CannotUseCut - checkattack MOVE_CUT + goto_if 0, CannotUseCut + checkpokemove MOVE_CUT compare RESULT, 6 - jumpeq CannotUseCut - setanimation 0, RESULT - bufferpartypoke 0, RESULT - bufferattack 1, MOVE_CUT + goto_if_eq CannotUseCut + setfieldeffect 0, RESULT + getpartypokename 0, RESULT + getmovename 1, MOVE_CUT msgbox UseCutPromptText, 5 compare RESULT, 0 - jumpeq Cut_ChoseNo + goto_if_eq Cut_ChoseNo msgbox UsedCutRockSmashText, 4 - closebutton - doanimation 2 + closemessage + dofieldeffect 2 waitstate - jump DoTreeCutMovement + goto DoTreeCutMovement end S_UseCut:: @ 81B0E16 lockall - doanimation 2 + dofieldeffect 2 waitstate - jump DoTreeCutMovement + goto DoTreeCutMovement end DoTreeCutMovement: @ 81B0E21 - move LAST_TALKED, TreeCutMovement @ tree cut animation - waitmove 0 - disappear LAST_TALKED @ tree disappears + applymovement LAST_TALKED, TreeCutMovement @ tree cut animation + waitmovement 0 + removeobject LAST_TALKED @ tree disappears releaseall end @@ -42,7 +42,7 @@ CannotUseCut: @ 81B0E32 end Cut_ChoseNo: @ 81B0E3C - closebutton + closemessage releaseall end @@ -59,40 +59,40 @@ CannotUseCutText: @ 81B0E8E S_BreakableRock:: @ 81B0EB7 lockall checkflag 2057 - jumpif 0, CannotUseRockSmash - checkattack MOVE_ROCK_SMASH + goto_if 0, CannotUseRockSmash + checkpokemove MOVE_ROCK_SMASH compare RESULT, 6 - jumpeq CannotUseRockSmash - setanimation 0, RESULT - bufferpartypoke 0, RESULT - bufferattack 1, MOVE_ROCK_SMASH + goto_if_eq CannotUseRockSmash + setfieldeffect 0, RESULT + getpartypokename 0, RESULT + getmovename 1, MOVE_ROCK_SMASH msgbox UseRockSmashPromptText, 5 compare RESULT, 0 - jumpeq RockSmash_ChoseNo + goto_if_eq RockSmash_ChoseNo msgbox UsedCutRockSmashText, 4 - closebutton - doanimation 37 + closemessage + dofieldeffect 37 waitstate - jump DoRockSmashMovement + goto DoRockSmashMovement end S_UseRockSmash:: @ 81B0F01 lockall - doanimation 37 + dofieldeffect 37 waitstate - jump DoRockSmashMovement + goto DoRockSmashMovement end DoRockSmashMovement: @ 81B0F0C - move LAST_TALKED, RockSmashMovement - waitmove 0 - disappear LAST_TALKED - specialval RESULT, sub_810F5BC + applymovement LAST_TALKED, RockSmashMovement + waitmovement 0 + removeobject LAST_TALKED + specialvar RESULT, sub_810F5BC compare RESULT, 1 - jumpeq DoRockSmashMovement_Done + goto_if_eq DoRockSmashMovement_Done special ScrSpecial_RockSmashWildEncounter compare RESULT, 0 - jumpeq DoRockSmashMovement_Done + goto_if_eq DoRockSmashMovement_Done waitstate releaseall end @@ -111,7 +111,7 @@ CannotUseRockSmash: @ 81B0F3E end RockSmash_ChoseNo: @ 81B0F48 - closebutton + closemessage releaseall end @@ -126,27 +126,27 @@ CannotUseRockSmashText: @ 81B0F90 S_PushableBoulder:: @ 81B0FCB lockall checkflag 2058 - jumpif 0, CannotUseStrength + goto_if 0, CannotUseStrength checkflag 2089 - jumpeq AlreadyUsedStrength - checkattack 70 + goto_if_eq AlreadyUsedStrength + checkpokemove 70 compare RESULT, 6 - jumpeq CannotUseStrength - setanimation 0, RESULT + goto_if_eq CannotUseStrength + setfieldeffect 0, RESULT msgbox UseStrengthPromptText, 5 compare RESULT, 0 - jumpeq Strength_ChoseNo - closebutton - doanimation 40 + goto_if_eq Strength_ChoseNo + closemessage + dofieldeffect 40 waitstate - jump UsedStrength + goto UsedStrength end S_UseStrength:: @ 81B100E lockall - doanimation 40 + dofieldeffect 40 waitstate - jump UsedStrength + goto UsedStrength end UsedStrength: @ 81B1019 @@ -166,7 +166,7 @@ AlreadyUsedStrength: @ 81B1030 end Strength_ChoseNo: @ 81B103A - closebutton + closemessage releaseall end @@ -190,17 +190,17 @@ AlreadyUsedStrengthText: @ 81B1127 S_UseWaterfall:: @ 81B115A lockall - checkattack MOVE_WATERFALL + checkpokemove MOVE_WATERFALL compare RESULT, 6 - jumpeq Waterfall_NoMonKnows - bufferpartypoke 0, RESULT - setanimation 0, RESULT + goto_if_eq Waterfall_NoMonKnows + getpartypokename 0, RESULT + setfieldeffect 0, RESULT msgbox UseWaterfallPromptText, 5 compare RESULT, 0 - jumpeq Waterfall_Done + goto_if_eq Waterfall_Done msgbox UsedWaterfallText, 4 - doanimation 43 - jump Waterfall_Done + dofieldeffect 43 + goto Waterfall_Done S_CannotUseWaterfall:: @ 81B1194 lockall @@ -223,18 +223,18 @@ UsedWaterfallText: @ 81B120D UseDiveScript:: @ 81B1220 lockall - checkattack MOVE_DIVE + checkpokemove MOVE_DIVE compare RESULT, 6 - jumpeq CannotUseDive - bufferpartypoke 0, RESULT - setanimation 0, RESULT - setanimation 1, 1 + goto_if_eq CannotUseDive + getpartypokename 0, RESULT + setfieldeffect 0, RESULT + setfieldeffect 1, 1 msgbox UseDivePromptText, 5 compare RESULT, 0 - jumpeq Dive_Done + goto_if_eq Dive_Done msgbox UsedDiveText, 4 - doanimation 44 - jump Dive_Done + dofieldeffect 44 + goto Dive_Done lockall CannotUseDive: @ 81B125F @@ -246,23 +246,23 @@ Dive_Done: @ 81B1267 S_UseDiveUnderwater:: @ 81B1269 lockall - checkattack MOVE_DIVE + checkpokemove MOVE_DIVE compare RESULT, 6 - jumpeq UnderwaterCannotUseDive - bufferpartypoke 0, RESULT - setanimation 0, RESULT - setanimation 1, 1 + goto_if_eq UnderwaterCannotUseDive + getpartypokename 0, RESULT + setfieldeffect 0, RESULT + setfieldeffect 1, 1 msgbox UnderwaterUseDivePromptText, 5 compare RESULT, 0 - jumpeq UnderwaterDive_Done + goto_if_eq UnderwaterDive_Done msgbox UsedDiveText, 4 - doanimation 44 - jump UnderwaterDive_Done + dofieldeffect 44 + goto UnderwaterDive_Done UnderwaterCannotUseDive: @ 81B12A7 lockall msgbox UnderwaterCannotUseDiveText, 4 - jump UnderwaterDive_Done + goto UnderwaterDive_Done @ not used SurfacingBlocked: @ 81B12B5 diff --git a/data/script_cmd_table.inc b/data/script_cmd_table.inc index a68f2ca8d..b6b7401f3 100644 --- a/data/script_cmd_table.inc +++ b/data/script_cmd_table.inc @@ -1,203 +1,203 @@ .align 2 gScriptCmdTable:: @ 814AE30 - .4byte ScrCmd_snop - .4byte ScrCmd_snop1 - .4byte ScrCmd_end - .4byte ScrCmd_return - .4byte ScrCmd_call - .4byte ScrCmd_jump - .4byte ScrCmd_jumpif - .4byte ScrCmd_callif - .4byte ScrCmd_jumpstd - .4byte ScrCmd_callstd - .4byte ScrCmd_jumpstdif - .4byte ScrCmd_callstdif - .4byte ScrCmd_jumpram - .4byte ScrCmd_die - .4byte ScrCmd_setbyte - .4byte ScrCmd_loadptr - .4byte ScrCmd_setbufferbyte - .4byte ScrCmd_writebytetooffset - .4byte ScrCmd_loadbytefrompointer - .4byte ScrCmd_setptrbyte - .4byte ScrCmd_copybuffers - .4byte ScrCmd_copybyte - .4byte ScrCmd_setvar - .4byte ScrCmd_addvar - .4byte ScrCmd_subvar - .4byte ScrCmd_copyvar - .4byte ScrCmd_setorcopyvar - .4byte ScrCmd_comparebuffers - .4byte ScrCmd_comparebuffertobyte - .4byte ScrCmd_comparebuffertoptrbyte - .4byte ScrCmd_compareptrbytetobuffer - .4byte ScrCmd_compareptrbytetobyte - .4byte ScrCmd_compareptrbytes - .4byte ScrCmd_compare - .4byte ScrCmd_comparevars - .4byte ScrCmd_callasm - .4byte ScrCmd_jumpasm - .4byte ScrCmd_special - .4byte ScrCmd_specialval - .4byte ScrCmd_waitstate - .4byte ScrCmd_pause - .4byte ScrCmd_setflag - .4byte ScrCmd_clearflag - .4byte ScrCmd_checkflag - .4byte ScrCmd_compareflags - .4byte ScrCmd_checkdailyflags - .4byte ScrCmd_resetvars - .4byte ScrCmd_playsfx - .4byte ScrCmd_checksound - .4byte ScrCmd_fanfare - .4byte ScrCmd_waitfanfare - .4byte ScrCmd_playmusic - .4byte ScrCmd_playmusicbattle - .4byte ScrCmd_fadedefault - .4byte ScrCmd_fademusic - .4byte ScrCmd_fadeout - .4byte ScrCmd_fadein - .4byte ScrCmd_warp - .4byte ScrCmd_warpmuted - .4byte ScrCmd_warpwalk - .4byte ScrCmd_warphole - .4byte ScrCmd_warpteleport - .4byte ScrCmd_warp3 - .4byte ScrCmd_warpplace - .4byte ScrCmd_warp4 - .4byte ScrCmd_warp5 - .4byte ScrCmd_getplayerxy - .4byte ScrCmd_countpokemon - .4byte ScrCmd_additem - .4byte ScrCmd_removeitem - .4byte ScrCmd_checkitemspace - .4byte ScrCmd_checkitem - .4byte ScrCmd_checkitemtype - .4byte ScrCmd_addpcitem - .4byte ScrCmd_checkpcitem - .4byte ScrCmd_adddecor - .4byte ScrCmd_removedecor - .4byte ScrCmd_testdecor - .4byte ScrCmd_checkdecor - .4byte ScrCmd_move - .4byte ScrCmd_movecoords - .4byte ScrCmd_waitmove - .4byte ScrCmd_waitmovexy - .4byte ScrCmd_disappear - .4byte ScrCmd_disappearxy - .4byte ScrCmd_reappear - .4byte ScrCmd_reappearxy - .4byte ScrCmd_movesprite - .4byte ScrCmd_spritevisible - .4byte ScrCmd_spriteinvisible - .4byte ScrCmd_faceplayer - .4byte ScrCmd_spriteface - .4byte ScrCmd_trainerbattle - .4byte ScrCmd_reptrainerbattle - .4byte ScrCmd_endtrainerbattle - .4byte ScrCmd_endtrainerbattle2 - .4byte ScrCmd_checktrainerflag - .4byte ScrCmd_cleartrainerflag - .4byte ScrCmd_settrainerflag - .4byte ScrCmd_movespriteperm - .4byte ScrCmd_moveoffscreen - .4byte ScrCmd_spritebehave - .4byte ScrCmd_waittext - .4byte ScrCmd_message - .4byte ScrCmd_closebutton - .4byte ScrCmd_lockall - .4byte ScrCmd_lock - .4byte ScrCmd_releaseall - .4byte ScrCmd_release - .4byte ScrCmd_waitbutton - .4byte ScrCmd_yesnobox - .4byte ScrCmd_multichoice - .4byte ScrCmd_multichoicedef - .4byte ScrCmd_multichoicerow - .4byte ScrCmd_showbox - .4byte ScrCmd_hidebox - .4byte ScrCmd_clearbox - .4byte ScrCmd_showpokepic - .4byte ScrCmd_hidepokepic - .4byte ScrCmd_showcontestwinner - .4byte ScrCmd_braillemsg - .4byte ScrCmd_givepokemon - .4byte ScrCmd_giveegg - .4byte ScrCmd_setpokemove - .4byte ScrCmd_checkattack - .4byte ScrCmd_bufferpoke - .4byte ScrCmd_bufferfirstpoke - .4byte ScrCmd_bufferpartypoke - .4byte ScrCmd_bufferitem - .4byte ScrCmd_bufferdecor - .4byte ScrCmd_bufferattack - .4byte ScrCmd_buffernum - .4byte ScrCmd_bufferstd - .4byte ScrCmd_buffertext - .4byte ScrCmd_pokemart - .4byte ScrCmd_pokemartdecor - .4byte ScrCmd_pokemartbp - .4byte ScrCmd_pokecasino - .4byte ScrCmd_event_8a - .4byte ScrCmd_choosecontestpkmn - .4byte ScrCmd_startcontest - .4byte ScrCmd_showcontestresults - .4byte ScrCmd_contestlinktransfer - .4byte ScrCmd_random - .4byte ScrCmd_givemoney - .4byte ScrCmd_paymoney - .4byte ScrCmd_checkmoney - .4byte ScrCmd_showmoney - .4byte ScrCmd_hidemoney - .4byte ScrCmd_updatemoney - .4byte ScrCmd_event_96 - .4byte ScrCmd_fadescreen - .4byte ScrCmd_fadescreendelay - .4byte ScrCmd_darken - .4byte ScrCmd_lighten - .4byte ScrCmd_message2 - .4byte ScrCmd_doanimation - .4byte ScrCmd_setanimation - .4byte ScrCmd_checkanimation - .4byte ScrCmd_sethealplace - .4byte ScrCmd_checkgender - .4byte ScrCmd_pokecry - .4byte ScrCmd_setmaptile - .4byte ScrCmd_resetweather - .4byte ScrCmd_setweather - .4byte ScrCmd_doweather - .4byte ScrCmd_tileeffect - .4byte ScrCmd_setmapfooter - .4byte ScrCmd_spritelevelup - .4byte ScrCmd_restorespritelevel - .4byte ScrCmd_createvsprite - .4byte ScrCmd_vspriteface - .4byte ScrCmd_setdooropened - .4byte ScrCmd_setdoorclosed - .4byte ScrCmd_doorchange - .4byte ScrCmd_setdooropened2 - .4byte ScrCmd_setdoorclosed2 - .4byte ScrCmd_event_b1 - .4byte ScrCmd_event_b2 - .4byte ScrCmd_checkcoins - .4byte ScrCmd_givecoins - .4byte ScrCmd_removecoins - .4byte ScrCmd_setwildbattle - .4byte ScrCmd_dowildbattle - .4byte ScrCmd_setvaddress - .4byte ScrCmd_vjump - .4byte ScrCmd_vcall - .4byte ScrCmd_if5 - .4byte ScrCmd_if6 - .4byte ScrCmd_vtext - .4byte ScrCmd_vloadptr - .4byte ScrCmd_vbuffer - .4byte ScrCmd_showcoins - .4byte ScrCmd_hidecoins - .4byte ScrCmd_updatecoins - .4byte ScrCmd_inccounter - .4byte ScrCmd_warp6 - .4byte ScrCmd_waitpokecry + .4byte ScrCmd_nop @ 0x00 + .4byte ScrCmd_nop1 @ 0x01 + .4byte ScrCmd_end @ 0x02 + .4byte ScrCmd_return @ 0x03 + .4byte ScrCmd_call @ 0x04 + .4byte ScrCmd_goto @ 0x05 + .4byte ScrCmd_goto_if @ 0x06 + .4byte ScrCmd_call_if @ 0x07 + .4byte ScrCmd_gotostd @ 0x08 + .4byte ScrCmd_callstd @ 0x09 + .4byte ScrCmd_gotostd_if @ 0x0A + .4byte ScrCmd_callstd_if @ 0x0B + .4byte ScrCmd_gotoram @ 0x0C + .4byte ScrCmd_killscript @ 0x0D + .4byte ScrCmd_setmysteryeventstatus @ 0x0E + .4byte ScrCmd_loadword @ 0x0F + .4byte ScrCmd_loadbyte @ 0x10 + .4byte ScrCmd_writebytetoaddr @ 0x11 + .4byte ScrCmd_loadbytefromaddr @ 0x12 + .4byte ScrCmd_setptrbyte @ 0x13 + .4byte ScrCmd_copylocal @ 0x14 + .4byte ScrCmd_copybyte @ 0x15 + .4byte ScrCmd_setvar @ 0x16 + .4byte ScrCmd_addvar @ 0x17 + .4byte ScrCmd_subvar @ 0x18 + .4byte ScrCmd_copyvar @ 0x19 + .4byte ScrCmd_setorcopyvar @ 0x1A + .4byte ScrCmd_compare_local_to_local @ 0x1B + .4byte ScrCmd_compare_local_to_value @ 0x1C + .4byte ScrCmd_compare_local_to_addr @ 0x1D + .4byte ScrCmd_compare_addr_to_local @ 0x1E + .4byte ScrCmd_compare_addr_to_value @ 0x1F + .4byte ScrCmd_compare_addr_to_addr @ 0x20 + .4byte ScrCmd_compare_var_to_value @ 0x21 + .4byte ScrCmd_compare_var_to_var @ 0x22 + .4byte ScrCmd_callnative @ 0x23 + .4byte ScrCmd_gotonative @ 0x24 + .4byte ScrCmd_special @ 0x25 + .4byte ScrCmd_specialvar @ 0x26 + .4byte ScrCmd_waitstate @ 0x27 + .4byte ScrCmd_delay @ 0x28 + .4byte ScrCmd_setflag @ 0x29 + .4byte ScrCmd_clearflag @ 0x2A + .4byte ScrCmd_checkflag @ 0x2B + .4byte ScrCmd_initclock @ 0x2C + .4byte ScrCmd_dodailyevents @ 0x2D + .4byte ScrCmd_gettime @ 0x2E + .4byte ScrCmd_playse @ 0x2F + .4byte ScrCmd_waitse @ 0x30 + .4byte ScrCmd_playfanfare @ 0x31 + .4byte ScrCmd_waitfanfare @ 0x32 + .4byte ScrCmd_playbgm @ 0x33 + .4byte ScrCmd_savebgm @ 0x34 + .4byte ScrCmd_fadedefaultbgm @ 0x35 + .4byte ScrCmd_fadenewbgm @ 0x36 + .4byte ScrCmd_fadeoutbgm @ 0x37 + .4byte ScrCmd_fadeinbgm @ 0x38 + .4byte ScrCmd_warp @ 0x39 + .4byte ScrCmd_warpsilent @ 0x3A + .4byte ScrCmd_warpdoor @ 0x3B + .4byte ScrCmd_warphole @ 0x3C + .4byte ScrCmd_warpteleport @ 0x3D + .4byte ScrCmd_setwarp @ 0x3E + .4byte ScrCmd_setdynamicwarp @ 0x3F + .4byte ScrCmd_setdivewarp @ 0x40 + .4byte ScrCmd_setholewarp @ 0x41 + .4byte ScrCmd_getplayerxy @ 0x42 + .4byte ScrCmd_countpokemon @ 0x43 + .4byte ScrCmd_additem @ 0x44 + .4byte ScrCmd_removeitem @ 0x45 + .4byte ScrCmd_checkitemspace @ 0x46 + .4byte ScrCmd_checkitem @ 0x47 + .4byte ScrCmd_checkitemtype @ 0x48 + .4byte ScrCmd_addpcitem @ 0x49 + .4byte ScrCmd_checkpcitem @ 0x4A + .4byte ScrCmd_adddecor @ 0x4B + .4byte ScrCmd_removedecor @ 0x4C + .4byte ScrCmd_hasdecor @ 0x4D + .4byte ScrCmd_checkdecor @ 0x4E + .4byte ScrCmd_applymovement @ 0x4F + .4byte ScrCmd_applymovement_at @ 0x50 + .4byte ScrCmd_waitmovement @ 0x51 + .4byte ScrCmd_waitmovement_at @ 0x52 + .4byte ScrCmd_removeobject @ 0x53 + .4byte ScrCmd_removeobject_at @ 0x54 + .4byte ScrCmd_addobject @ 0x55 + .4byte ScrCmd_addobject_at @ 0x56 + .4byte ScrCmd_setobjectxy @ 0x57 + .4byte ScrCmd_showobject @ 0x58 + .4byte ScrCmd_hideobject @ 0x59 + .4byte ScrCmd_faceplayer @ 0x5A + .4byte ScrCmd_turnobject @ 0x5B + .4byte ScrCmd_trainerbattle @ 0x5C + .4byte ScrCmd_battlebegin @ 0x5D + .4byte ScrCmd_ontrainerbattleend @ 0x5E + .4byte ScrCmd_ontrainerbattleendgoto @ 0x5F + .4byte ScrCmd_checktrainerflag @ 0x60 + .4byte ScrCmd_settrainerflag @ 0x61 + .4byte ScrCmd_cleartrainerflag @ 0x62 + .4byte ScrCmd_setobjectxyperm @ 0x63 + .4byte ScrCmd_moveobjectoffscreen @ 0x64 + .4byte ScrCmd_setobjectmovementtype @ 0x65 + .4byte ScrCmd_waitmessage @ 0x66 + .4byte ScrCmd_message @ 0x67 + .4byte ScrCmd_closemessage @ 0x68 + .4byte ScrCmd_lockall @ 0x69 + .4byte ScrCmd_lock @ 0x6A + .4byte ScrCmd_releaseall @ 0x6B + .4byte ScrCmd_release @ 0x6C + .4byte ScrCmd_waitbutton @ 0x6D + .4byte ScrCmd_yesnobox @ 0x6E + .4byte ScrCmd_multichoice @ 0x6F + .4byte ScrCmd_multichoicedefault @ 0x70 + .4byte ScrCmd_multichoicegrid @ 0x71 + .4byte ScrCmd_drawbox @ 0x72 + .4byte ScrCmd_erasebox @ 0x73 + .4byte ScrCmd_drawboxtext @ 0x74 + .4byte ScrCmd_drawpokepic @ 0x75 + .4byte ScrCmd_erasepokepic @ 0x76 + .4byte ScrCmd_drawcontestwinner @ 0x77 + .4byte ScrCmd_braillemessage @ 0x78 + .4byte ScrCmd_givepoke @ 0x79 + .4byte ScrCmd_giveegg @ 0x7A + .4byte ScrCmd_setpokemove @ 0x7B + .4byte ScrCmd_checkpokemove @ 0x7C + .4byte ScrCmd_getspeciesname @ 0x7D + .4byte ScrCmd_getfirstpartypokename @ 0x7E + .4byte ScrCmd_getpartypokename @ 0x7F + .4byte ScrCmd_getitemname @ 0x80 + .4byte ScrCmd_getdecorname @ 0x81 + .4byte ScrCmd_getmovename @ 0x82 + .4byte ScrCmd_getnumberstring @ 0x83 + .4byte ScrCmd_getstdstring @ 0x84 + .4byte ScrCmd_getstring @ 0x85 + .4byte ScrCmd_pokemart @ 0x86 + .4byte ScrCmd_pokemartdecor @ 0x87 + .4byte ScrCmd_pokemartbp @ 0x88 + .4byte ScrCmd_playslotmachine @ 0x89 + .4byte ScrCmd_plantberrytree @ 0x8A + .4byte ScrCmd_choosecontestpkmn @ 0x8B + .4byte ScrCmd_startcontest @ 0x8C + .4byte ScrCmd_showcontestresults @ 0x8D + .4byte ScrCmd_contestlinktransfer @ 0x8E + .4byte ScrCmd_random @ 0x8F + .4byte ScrCmd_givemoney @ 0x90 + .4byte ScrCmd_takemoney @ 0x91 + .4byte ScrCmd_checkmoney @ 0x92 + .4byte ScrCmd_showmoneybox @ 0x93 + .4byte ScrCmd_hidemoneybox @ 0x94 + .4byte ScrCmd_updatemoneybox @ 0x95 + .4byte ScrCmd_getpricereduction @ 0x96 + .4byte ScrCmd_fadescreen @ 0x97 + .4byte ScrCmd_fadescreendelay @ 0x98 + .4byte ScrCmd_setdarklevel @ 0x99 + .4byte ScrCmd_animdarklevel @ 0x9A + .4byte ScrCmd_messageautoscroll @ 0x9B + .4byte ScrCmd_dofieldeffect @ 0x9C + .4byte ScrCmd_setfieldeffect @ 0x9D + .4byte ScrCmd_waitfieldeffect @ 0x9E + .4byte ScrCmd_sethealplace @ 0x9F + .4byte ScrCmd_checkplayergender @ 0xA0 + .4byte ScrCmd_playpokecry @ 0xA1 + .4byte ScrCmd_setmaptile @ 0xA2 + .4byte ScrCmd_resetweather @ 0xA3 + .4byte ScrCmd_setweather @ 0xA4 + .4byte ScrCmd_doweather @ 0xA5 + .4byte ScrCmd_tileeffect @ 0xA6 + .4byte ScrCmd_setmaplayoutindex @ 0xA7 + .4byte ScrCmd_setobjectpriority @ 0xA8 + .4byte ScrCmd_resetobjectpriority @ 0xA9 + .4byte ScrCmd_createvobject @ 0xAA + .4byte ScrCmd_turnvobject @ 0xAB + .4byte ScrCmd_opendoor @ 0xAC + .4byte ScrCmd_closedoor @ 0xAD + .4byte ScrCmd_waitdooranim @ 0xAE + .4byte ScrCmd_setdooropen @ 0xAF + .4byte ScrCmd_setdoorclosed @ 0xB0 + .4byte ScrCmd_addelevmenuitem @ 0xB1 + .4byte ScrCmd_showelevmenu @ 0xB2 + .4byte ScrCmd_checkcoins @ 0xB3 + .4byte ScrCmd_givecoins @ 0xB4 + .4byte ScrCmd_takecoins @ 0xB5 + .4byte ScrCmd_setwildbattle @ 0xB6 + .4byte ScrCmd_dowildbattle @ 0xB7 + .4byte ScrCmd_setvaddress @ 0xB8 + .4byte ScrCmd_vgoto @ 0xB9 + .4byte ScrCmd_vcall @ 0xBA + .4byte ScrCmd_vgoto_if @ 0xBB + .4byte ScrCmd_vcall_if @ 0xBC + .4byte ScrCmd_vmessage @ 0xBD + .4byte ScrCmd_vloadword @ 0xBE + .4byte ScrCmd_vgetstring @ 0xBF + .4byte ScrCmd_showcoinsbox @ 0xC0 + .4byte ScrCmd_hidecoinsbox @ 0xC1 + .4byte ScrCmd_updatecoinsbox @ 0xC2 + .4byte ScrCmd_incrementgamestat @ 0xC3 + .4byte ScrCmd_setescapewarp @ 0xC4 + .4byte ScrCmd_waitpokecry @ 0xC5 gScriptCmdTableEnd:: - .4byte ScrCmd_snop + .4byte ScrCmd_nop diff --git a/data/scripts/berry_tree.inc b/data/scripts/berry_tree.inc index f4707d8cb..9e219a339 100644 --- a/data/scripts/berry_tree.inc +++ b/data/scripts/berry_tree.inc @@ -13,7 +13,7 @@ S_BerryTree:: @ 81A14DD Route102_EventScript_1A1533:: @ 81A1533 lockall message Route102_Text_1A1946 - waittext + waitmessage waitbutton releaseall end @@ -21,11 +21,11 @@ Route102_EventScript_1A1533:: @ 81A1533 Route102_EventScript_1A153D:: @ 81A153D lock faceplayer - specialval RESULT, PlayerHasBerries + specialvar RESULT, PlayerHasBerries compare RESULT, 1 - jumpeq Route102_EventScript_1A1558 + goto_if_eq Route102_EventScript_1A1558 message Route102_Text_1A16B6 - waittext + waitmessage waitbutton release end @@ -33,18 +33,18 @@ Route102_EventScript_1A153D:: @ 81A153D Route102_EventScript_1A1558:: @ 81A1558 msgbox Route102_Text_1A16CD, 5 compare RESULT, 1 - jumpeq Route102_EventScript_1A1577 + goto_if_eq Route102_EventScript_1A1577 compare RESULT, 0 - jumpeq Route102_EventScript_1A1593 + goto_if_eq Route102_EventScript_1A1593 end Route102_EventScript_1A1577:: @ 81A1577 fadescreen 1 - closebutton + closemessage special sub_80B4EE4 waitstate compare ITEM_ID, 0 - jumpeq Route102_EventScript_1A1593 + goto_if_eq Route102_EventScript_1A1593 removeitem ITEM_ID, 1 call Route102_EventScript_1A16A9 @@ -55,84 +55,84 @@ Route102_EventScript_1A1593:: @ 81A1593 Route102_EventScript_1A1595:: @ 81A1595 lockall message Route102_Text_1A172C - waittext + waitmessage waitbutton - jump Route102_EventScript_1A165F + goto Route102_EventScript_1A165F Route102_EventScript_1A15A2:: @ 81A15A2 lockall message Route102_Text_1A174B - waittext + waitmessage waitbutton - jump Route102_EventScript_1A165F + goto Route102_EventScript_1A165F Route102_EventScript_1A15AF:: @ 81A15AF lockall message Route102_Text_1A175C - waittext + waitmessage waitbutton - jump Route102_EventScript_1A165F + goto Route102_EventScript_1A165F Route102_EventScript_1A15BC:: @ 81A15BC call Route102_EventScript_1A15CE lockall message Route102_Text_1A177D - waittext + waitmessage waitbutton - jump Route102_EventScript_1A165F + goto Route102_EventScript_1A165F Route102_EventScript_1A15CE:: @ 81A15CE compare 0x8005, 0 - jumpeq Route102_EventScript_1A15F2 + goto_if_eq Route102_EventScript_1A15F2 compare 0x8005, 4 - jumpeq Route102_EventScript_1A15EB - buffertext 1, Route102_Text_1A17B7 + goto_if_eq Route102_EventScript_1A15EB + getstring 1, Route102_Text_1A17B7 return Route102_EventScript_1A15EB:: @ 81A15EB - buffertext 1, Route102_Text_1A179F + getstring 1, Route102_Text_1A179F return Route102_EventScript_1A15F2:: @ 81A15F2 - buffertext 1, Route102_Text_1A17B0 + getstring 1, Route102_Text_1A17B0 return Route102_EventScript_1A15F9:: @ 81A15F9 - buffernum 1, 0x8006 + getnumberstring 1, 0x8006 lock faceplayer msgbox Route102_Text_1A17C0, 5 compare RESULT, 1 - jumpeq Route102_EventScript_1A161D + goto_if_eq Route102_EventScript_1A161D compare RESULT, 0 - jumpeq Route102_EventScript_1A164B + goto_if_eq Route102_EventScript_1A164B Route102_EventScript_1A161D:: @ 81A161D special FieldObjectInteractionPickBerryTree compare 0x8004, 0 - jumpeq Route102_EventScript_1A1642 + goto_if_eq Route102_EventScript_1A1642 special FieldObjectInteractionRemoveBerryTree message Route102_Text_1A17FD - fanfare 387 - waittext + playfanfare 387 + waitmessage waitfanfare waitbutton message Route102_Text_1A181A - waittext + waitmessage waitbutton release end Route102_EventScript_1A1642:: @ 81A1642 message Route102_Text_1A1881 - waittext + waitmessage waitbutton release end Route102_EventScript_1A164B:: @ 81A164B message Route102_Text_1A18C5 - waittext + waitmessage waitbutton release end @@ -147,12 +147,12 @@ gUnknown_081A1654:: @ 81A1654 Route102_EventScript_1A165F:: @ 81A165F checkitem ITEM_WAILMER_PAIL, 1 compare RESULT, 0 - jumpeq Route102_EventScript_1A168D + goto_if_eq Route102_EventScript_1A168D msgbox Route102_Text_1A18E6, 5 compare RESULT, 1 - jumpeq Route102_EventScript_1A1693 + goto_if_eq Route102_EventScript_1A1693 compare RESULT, 0 - jumpeq Route102_EventScript_1A168D + goto_if_eq Route102_EventScript_1A168D Route102_EventScript_1A168D:: @ 81A168D releaseall @@ -164,20 +164,20 @@ gUnknown_081A168F:: @ 81A168F Route102_EventScript_1A1693:: @ 81A1693 message Route102_Text_1A1912 - waittext + waitmessage special FieldObjectInteractionWaterBerryTree special DoWateringBerryTreeAnim waitstate message Route102_Text_1A1925 - waittext + waitmessage waitbutton releaseall end Route102_EventScript_1A16A9:: @ 81A16A9 special FieldObjectInteractionPlantBerryTree - inccounter GAME_STAT_PLANTED_BERRIES + incrementgamestat GAME_STAT_PLANTED_BERRIES message Route102_Text_1A16FB - waittext + waitmessage waitbutton return diff --git a/data/scripts/cable_club.inc b/data/scripts/cable_club.inc index 6507677e0..9f44e131b 100644 --- a/data/scripts/cable_club.inc +++ b/data/scripts/cable_club.inc @@ -21,7 +21,7 @@ VerdanturfTown_PokemonCenter_2F_MapScript2_1A3D03:: @ 81A3D03 .2byte 0 OldaleTown_PokemonCenter_2F_EventScript_1A3D2D:: @ 81A3D2D - spriteface 0x8007, 4 + turnobject 0x8007, 4 end DewfordTown_PokemonCenter_2F_MapScript1_1A3D32:: @ 81A3D32 @@ -40,15 +40,15 @@ SlateportCity_PokemonCenter_2F_MapScript1_1A3D32:: @ 81A3D32 SootopolisCity_PokemonCenter_2F_MapScript1_1A3D32:: @ 81A3D32 VerdanturfTown_PokemonCenter_2F_MapScript1_1A3D32:: @ 81A3D32 compare 0x4087, 1 - jumpeq OldaleTown_PokemonCenter_2F_EventScript_1A3D6A + goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_1A3D6A compare 0x4087, 2 - jumpeq OldaleTown_PokemonCenter_2F_EventScript_1A3D6A + goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_1A3D6A compare 0x4087, 5 - jumpeq OldaleTown_PokemonCenter_2F_EventScript_1A3D6A + goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_1A3D6A compare 0x4087, 3 - jumpeq OldaleTown_PokemonCenter_2F_EventScript_1A3D74 + goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_1A3D74 compare 0x4087, 4 - jumpeq OldaleTown_PokemonCenter_2F_EventScript_1A3D7E + goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_1A3D7E end OldaleTown_PokemonCenter_2F_EventScript_1A3D6A:: @ 81A3D6A @@ -88,12 +88,12 @@ VerdanturfTown_PokemonCenter_2F_MapScript2_1A3D88:: @ 81A3D88 OldaleTown_PokemonCenter_2F_EventScript_1A3DB2:: @ 81A3DB2 special CloseLink setvar 0x4087, 0 - move 255, OldaleTown_PokemonCenter_2F_Movement_1A4358 - waitmove 0 + applymovement 255, OldaleTown_PokemonCenter_2F_Movement_1A4358 + waitmovement 0 compare 0x8007, 0 - jumpeq OldaleTown_PokemonCenter_2F_EventScript_1A3DD9 - move 0x8007, OldaleTown_PokemonCenter_2F_Movement_1A4354 - waitmove 0 + goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_1A3DD9 + applymovement 0x8007, OldaleTown_PokemonCenter_2F_Movement_1A4354 + waitmovement 0 OldaleTown_PokemonCenter_2F_EventScript_1A3DD9:: @ 81A3DD9 return @@ -102,18 +102,18 @@ OldaleTown_PokemonCenter_2F_EventScript_1A3DDA:: @ 81A3DDA special CloseLink setvar 0x4087, 0 compare 0x8007, 0 - jumpeq OldaleTown_PokemonCenter_2F_EventScript_1A3E0C - move 0x8007, OldaleTown_PokemonCenter_2F_Movement_1A4356 - waitmove 0 - move 255, OldaleTown_PokemonCenter_2F_Movement_1A4358 - waitmove 0 - move 0x8007, OldaleTown_PokemonCenter_2F_Movement_1A4354 - waitmove 0 + goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_1A3E0C + applymovement 0x8007, OldaleTown_PokemonCenter_2F_Movement_1A4356 + waitmovement 0 + applymovement 255, OldaleTown_PokemonCenter_2F_Movement_1A4358 + waitmovement 0 + applymovement 0x8007, OldaleTown_PokemonCenter_2F_Movement_1A4354 + waitmovement 0 return OldaleTown_PokemonCenter_2F_EventScript_1A3E0C:: @ 81A3E0C - move 255, OldaleTown_PokemonCenter_2F_Movement_1A4358 - waitmove 0 + applymovement 255, OldaleTown_PokemonCenter_2F_Movement_1A4358 + waitmovement 0 return OldaleTown_PokemonCenter_2F_EventScript_1A3E17:: @ 81A3E17 @@ -121,7 +121,7 @@ OldaleTown_PokemonCenter_2F_EventScript_1A3E17:: @ 81A3E17 call OldaleTown_PokemonCenter_2F_EventScript_1A3E30 setmaptile 8, 3, 605, 1 special DrawWholeMapView - hidebox 0, 0, 29, 19 + erasebox 0, 0, 29, 19 releaseall end @@ -129,20 +129,20 @@ OldaleTown_PokemonCenter_2F_EventScript_1A3E30:: @ 81A3E30 special CloseLink setvar 0x4087, 0 compare 0x8007, 0 - jumpeq OldaleTown_PokemonCenter_2F_EventScript_1A3E0C - move 255, OldaleTown_PokemonCenter_2F_Movement_1A4361 - waitmove 0 - move 0x8007, OldaleTown_PokemonCenter_2F_Movement_1A4356 - waitmove 0 + goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_1A3E0C + applymovement 255, OldaleTown_PokemonCenter_2F_Movement_1A4361 + waitmovement 0 + applymovement 0x8007, OldaleTown_PokemonCenter_2F_Movement_1A4356 + waitmovement 0 message OldaleTown_PokemonCenter_2F_Text_1A4E50 - waittext - playsfx 21 + waitmessage + playse 21 message OldaleTown_PokemonCenter_2F_Text_1A4E79 - waittext - move 255, OldaleTown_PokemonCenter_2F_Movement_1A4358 - waitmove 0 - move 0x8007, OldaleTown_PokemonCenter_2F_Movement_1A4354 - waitmove 0 + waitmessage + applymovement 255, OldaleTown_PokemonCenter_2F_Movement_1A4358 + waitmovement 0 + applymovement 0x8007, OldaleTown_PokemonCenter_2F_Movement_1A4354 + waitmovement 0 return OldaleTown_PokemonCenter_2F_EventScript_1A3E7B:: @ 81A3E7B @@ -156,7 +156,7 @@ OldaleTown_PokemonCenter_2F_EventScript_1A3E8D:: @ 81A3E8D call OldaleTown_PokemonCenter_2F_EventScript_1A3DDA setmaptile 5, 3, 605, 1 special DrawWholeMapView - hidebox 0, 0, 29, 19 + erasebox 0, 0, 29, 19 releaseall end @@ -175,12 +175,12 @@ SlateportCity_PokemonCenter_2F_EventScript_1A3EA6:: @ 81A3EA6 SootopolisCity_PokemonCenter_2F_EventScript_1A3EA6:: @ 81A3EA6 VerdanturfTown_PokemonCenter_2F_EventScript_1A3EA6:: @ 81A3EA6 checkflag 2049 - jumpif 0, OldaleTown_PokemonCenter_2F_EventScript_1A4342 + goto_if 0, OldaleTown_PokemonCenter_2F_EventScript_1A4342 copyvar 0x8007, LAST_TALKED lock faceplayer message OldaleTown_PokemonCenter_2F_Text_1A4510 - waittext + waitmessage OldaleTown_PokemonCenter_2F_EventScript_1A3EBC:: @ 81A3EBC multichoice 17, 6, 17, 0 @@ -193,52 +193,52 @@ OldaleTown_PokemonCenter_2F_EventScript_1A3EBC:: @ 81A3EBC OldaleTown_PokemonCenter_2F_EventScript_1A3EF2:: @ 81A3EF2 call S_DoSaveDialog compare RESULT, 0 - jumpeq OldaleTown_PokemonCenter_2F_EventScript_1A4319 + goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_1A4319 call OldaleTown_PokemonCenter_2F_EventScript_1A3FEF compare 0x8004, 0 - jumpeq OldaleTown_PokemonCenter_2F_EventScript_1A4319 + goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_1A4319 message OldaleTown_PokemonCenter_2F_Text_1A490C - waittext + waitmessage special sub_808347C waitstate compare RESULT, 1 - jumpeq OldaleTown_PokemonCenter_2F_EventScript_1A3F5E + goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_1A3F5E compare RESULT, 2 - jumpeq OldaleTown_PokemonCenter_2F_EventScript_1A4301 + goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_1A4301 compare RESULT, 3 - jumpeq OldaleTown_PokemonCenter_2F_EventScript_1A430D + goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_1A430D compare RESULT, 4 - jumpeq OldaleTown_PokemonCenter_2F_EventScript_1A4068 + goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_1A4068 compare RESULT, 5 - jumpeq OldaleTown_PokemonCenter_2F_EventScript_1A4319 + goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_1A4319 compare RESULT, 6 - jumpeq OldaleTown_PokemonCenter_2F_EventScript_1A42F5 + goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_1A42F5 OldaleTown_PokemonCenter_2F_EventScript_1A3F5E:: @ 81A3F5E special ScrSpecial_HealPlayerParty special SavePlayerParty special LoadPlayerBag copyvar 0x4087, 0x8004 - message2 OldaleTown_PokemonCenter_2F_Text_1A4A22 - waittext + messageautoscroll OldaleTown_PokemonCenter_2F_Text_1A4A22 + waitmessage setmaptile 5, 3, 514, 0 special DrawWholeMapView - pause 60 - move LAST_TALKED, OldaleTown_PokemonCenter_2F_Movement_1A4356 - waitmove 0 - closebutton - move 255, OldaleTown_PokemonCenter_2F_Movement_1A435B - waitmove 0 - setdooropened 5, 1 - doorchange - move 255, OldaleTown_PokemonCenter_2F_Movement_1A435F - waitmove 0 - spriteinvisible 255, 0, 0 - setdoorclosed 5, 1 - doorchange + delay 60 + applymovement LAST_TALKED, OldaleTown_PokemonCenter_2F_Movement_1A4356 + waitmovement 0 + closemessage + applymovement 255, OldaleTown_PokemonCenter_2F_Movement_1A435B + waitmovement 0 + opendoor 5, 1 + waitdooranim + applymovement 255, OldaleTown_PokemonCenter_2F_Movement_1A435F + waitmovement 0 + hideobject 255, 0, 0 + closedoor 5, 1 + waitdooranim release compare 0x8004, 5 - jumpeq OldaleTown_PokemonCenter_2F_EventScript_1A3FCD + goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_1A3FCD special SetCableClubWarp warp SingleBattleColosseum, 255, 6, 8 special DoCableClubWarp @@ -254,15 +254,15 @@ OldaleTown_PokemonCenter_2F_EventScript_1A3FCD:: @ 81A3FCD OldaleTown_PokemonCenter_2F_EventScript_1A3FDD:: @ 81A3FDD message OldaleTown_PokemonCenter_2F_Text_1A4696 - waittext + waitmessage waitbutton message OldaleTown_PokemonCenter_2F_Text_1A4826 - waittext - jump OldaleTown_PokemonCenter_2F_EventScript_1A3EBC + waitmessage + goto OldaleTown_PokemonCenter_2F_EventScript_1A3EBC OldaleTown_PokemonCenter_2F_EventScript_1A3FEF:: @ 81A3FEF message OldaleTown_PokemonCenter_2F_Text_1A4840 - waittext + waitmessage multichoice 0, 0, 18, 0 switch RESULT case 0, OldaleTown_PokemonCenter_2F_EventScript_1A4062 @@ -282,15 +282,15 @@ OldaleTown_PokemonCenter_2F_EventScript_1A403C:: @ 81A403C OldaleTown_PokemonCenter_2F_EventScript_1A4042:: @ 81A4042 special CheckForAlivePartyMons compare RESULT, 0 - jumpif 5, OldaleTown_PokemonCenter_2F_EventScript_1A4056 + goto_if 5, OldaleTown_PokemonCenter_2F_EventScript_1A4056 setvar 0x8004, 2 return OldaleTown_PokemonCenter_2F_EventScript_1A4056:: @ 81A4056 message OldaleTown_PokemonCenter_2F_Text_1A486A - waittext + waitmessage waitbutton - jump OldaleTown_PokemonCenter_2F_EventScript_1A3FEF + goto OldaleTown_PokemonCenter_2F_EventScript_1A3FEF OldaleTown_PokemonCenter_2F_EventScript_1A4062:: @ 81A4062 setvar 0x8004, 1 @@ -301,33 +301,33 @@ OldaleTown_PokemonCenter_2F_EventScript_1A4068:: @ 81A4068 case 1, OldaleTown_PokemonCenter_2F_EventScript_1A40B1 case 2, OldaleTown_PokemonCenter_2F_EventScript_1A40A2 case 5, OldaleTown_PokemonCenter_2F_EventScript_1A4093 - jump OldaleTown_PokemonCenter_2F_EventScript_1A432D + goto OldaleTown_PokemonCenter_2F_EventScript_1A432D OldaleTown_PokemonCenter_2F_EventScript_1A4093:: @ 81A4093 special CloseLink message OldaleTown_PokemonCenter_2F_Text_1A4C03 - waittext + waitmessage waitbutton - jump OldaleTown_PokemonCenter_2F_EventScript_1A40C0 + goto OldaleTown_PokemonCenter_2F_EventScript_1A40C0 OldaleTown_PokemonCenter_2F_EventScript_1A40A2:: @ 81A40A2 special CloseLink message OldaleTown_PokemonCenter_2F_Text_1A4BCC - waittext + waitmessage waitbutton - jump OldaleTown_PokemonCenter_2F_EventScript_1A40C0 + goto OldaleTown_PokemonCenter_2F_EventScript_1A40C0 OldaleTown_PokemonCenter_2F_EventScript_1A40B1:: @ 81A40B1 special CloseLink message OldaleTown_PokemonCenter_2F_Text_1A4B95 - waittext + waitmessage waitbutton - jump OldaleTown_PokemonCenter_2F_EventScript_1A40C0 + goto OldaleTown_PokemonCenter_2F_EventScript_1A40C0 OldaleTown_PokemonCenter_2F_EventScript_1A40C0:: @ 81A40C0 special CloseLink message OldaleTown_PokemonCenter_2F_Text_1A4C38 - waittext + waitmessage waitbutton release end @@ -347,83 +347,83 @@ SlateportCity_PokemonCenter_2F_EventScript_1A40CC:: @ 81A40CC SootopolisCity_PokemonCenter_2F_EventScript_1A40CC:: @ 81A40CC VerdanturfTown_PokemonCenter_2F_EventScript_1A40CC:: @ 81A40CC checkflag 2049 - jumpif 0, OldaleTown_PokemonCenter_2F_EventScript_1A4339 + goto_if 0, OldaleTown_PokemonCenter_2F_EventScript_1A4339 copyvar 0x8007, LAST_TALKED lock faceplayer msgbox OldaleTown_PokemonCenter_2F_Text_1A457E, 5 compare RESULT, 0 - jumpeq OldaleTown_PokemonCenter_2F_EventScript_1A4319 + goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_1A4319 compare RESULT, 1 - jumpeq OldaleTown_PokemonCenter_2F_EventScript_1A40FA + goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_1A40FA OldaleTown_PokemonCenter_2F_EventScript_1A40FA:: @ 81A40FA call OldaleTown_PokemonCenter_2F_EventScript_1A41BB compare RESULT, 0 - jumpeq OldaleTown_PokemonCenter_2F_EventScript_1A4319 + goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_1A4319 call S_DoSaveDialog compare RESULT, 0 - jumpeq OldaleTown_PokemonCenter_2F_EventScript_1A4319 + goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_1A4319 message OldaleTown_PokemonCenter_2F_Text_1A490C - waittext + waitmessage special sub_80834E4 waitstate compare RESULT, 1 - jumpeq OldaleTown_PokemonCenter_2F_EventScript_1A4166 + goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_1A4166 compare RESULT, 2 - jumpeq OldaleTown_PokemonCenter_2F_EventScript_1A4301 + goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_1A4301 compare RESULT, 3 - jumpeq OldaleTown_PokemonCenter_2F_EventScript_1A430D + goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_1A430D compare RESULT, 4 - jumpeq OldaleTown_PokemonCenter_2F_EventScript_1A432D + goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_1A432D compare RESULT, 5 - jumpeq OldaleTown_PokemonCenter_2F_EventScript_1A4319 + goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_1A4319 compare RESULT, 6 - jumpeq OldaleTown_PokemonCenter_2F_EventScript_1A42F5 + goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_1A42F5 OldaleTown_PokemonCenter_2F_EventScript_1A4166:: @ 81A4166 setvar 0x8004, 3 copyvar 0x4087, 0x8004 - message2 OldaleTown_PokemonCenter_2F_Text_1A4A22 - waittext + messageautoscroll OldaleTown_PokemonCenter_2F_Text_1A4A22 + waitmessage setmaptile 8, 3, 514, 0 special DrawWholeMapView - pause 60 - move LAST_TALKED, OldaleTown_PokemonCenter_2F_Movement_1A4356 - waitmove 0 - closebutton - move 255, OldaleTown_PokemonCenter_2F_Movement_1A435B - waitmove 0 - setdooropened 8, 1 - doorchange - move 255, OldaleTown_PokemonCenter_2F_Movement_1A435F - waitmove 0 - spriteinvisible 255, 0, 0 - setdoorclosed 8, 1 - doorchange + delay 60 + applymovement LAST_TALKED, OldaleTown_PokemonCenter_2F_Movement_1A4356 + waitmovement 0 + closemessage + applymovement 255, OldaleTown_PokemonCenter_2F_Movement_1A435B + waitmovement 0 + opendoor 8, 1 + waitdooranim + applymovement 255, OldaleTown_PokemonCenter_2F_Movement_1A435F + waitmovement 0 + hideobject 255, 0, 0 + closedoor 8, 1 + waitdooranim release - jump OldaleTown_PokemonCenter_2F_EventScript_1A4325 + goto OldaleTown_PokemonCenter_2F_EventScript_1A4325 OldaleTown_PokemonCenter_2F_EventScript_1A41BB:: @ 81A41BB - specialval RESULT, CalculatePlayerPartyCount + specialvar RESULT, CalculatePlayerPartyCount compare RESULT, 2 - jumpif 0, OldaleTown_PokemonCenter_2F_EventScript_1A41E1 - specialval RESULT, GetNameOfEnigmaBerryInPlayerParty + goto_if 0, OldaleTown_PokemonCenter_2F_EventScript_1A41E1 + specialvar RESULT, GetNameOfEnigmaBerryInPlayerParty compare RESULT, 1 - jumpeq OldaleTown_PokemonCenter_2F_EventScript_1A41EE + goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_1A41EE setvar RESULT, 1 return OldaleTown_PokemonCenter_2F_EventScript_1A41E1:: @ 81A41E1 message OldaleTown_PokemonCenter_2F_Text_1A48A3 - waittext + waitmessage waitbutton setvar RESULT, 0 return OldaleTown_PokemonCenter_2F_EventScript_1A41EE:: @ 81A41EE message OldaleTown_PokemonCenter_2F_Text_1A48DD - waittext + waitmessage waitbutton setvar RESULT, 0 return @@ -444,68 +444,68 @@ SlateportCity_PokemonCenter_2F_EventScript_1A41FB:: @ 81A41FB SootopolisCity_PokemonCenter_2F_EventScript_1A41FB:: @ 81A41FB VerdanturfTown_PokemonCenter_2F_EventScript_1A41FB:: @ 81A41FB checkflag 2072 - jumpif 0, OldaleTown_PokemonCenter_2F_EventScript_1A434B + goto_if 0, OldaleTown_PokemonCenter_2F_EventScript_1A434B copyvar 0x8007, LAST_TALKED lock faceplayer msgbox OldaleTown_PokemonCenter_2F_Text_1A45FE, 5 compare RESULT, 0 - jumpeq OldaleTown_PokemonCenter_2F_EventScript_1A4319 + goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_1A4319 compare RESULT, 1 - jumpeq OldaleTown_PokemonCenter_2F_EventScript_1A4229 + goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_1A4229 OldaleTown_PokemonCenter_2F_EventScript_1A4229:: @ 81A4229 call S_DoSaveDialog compare RESULT, 0 - jumpeq OldaleTown_PokemonCenter_2F_EventScript_1A4319 + goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_1A4319 message OldaleTown_PokemonCenter_2F_Text_1A490C - waittext + waitmessage special sub_808350C waitstate special sub_80835D8 waitstate compare RESULT, 1 - jumpeq OldaleTown_PokemonCenter_2F_EventScript_1A4294 + goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_1A4294 compare RESULT, 2 - jumpeq OldaleTown_PokemonCenter_2F_EventScript_1A4301 + goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_1A4301 compare RESULT, 3 - jumpeq OldaleTown_PokemonCenter_2F_EventScript_1A430D + goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_1A430D compare RESULT, 4 - jumpeq OldaleTown_PokemonCenter_2F_EventScript_1A432D + goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_1A432D compare RESULT, 5 - jumpeq OldaleTown_PokemonCenter_2F_EventScript_1A4319 + goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_1A4319 compare RESULT, 6 - jumpeq OldaleTown_PokemonCenter_2F_EventScript_1A42F5 + goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_1A42F5 compare RESULT, 7 - jumpeq OldaleTown_PokemonCenter_2F_EventScript_1A42E9 + goto_if_eq OldaleTown_PokemonCenter_2F_EventScript_1A42E9 OldaleTown_PokemonCenter_2F_EventScript_1A4294:: @ 81A4294 setvar 0x8004, 4 copyvar 0x4087, 0x8004 - message2 OldaleTown_PokemonCenter_2F_Text_1A4A22 - waittext + messageautoscroll OldaleTown_PokemonCenter_2F_Text_1A4A22 + waitmessage setmaptile 11, 3, 514, 0 special DrawWholeMapView - pause 60 - move LAST_TALKED, OldaleTown_PokemonCenter_2F_Movement_1A4356 - waitmove 0 - closebutton - move 255, OldaleTown_PokemonCenter_2F_Movement_1A435B - waitmove 0 - setdooropened 11, 1 - doorchange - move 255, OldaleTown_PokemonCenter_2F_Movement_1A435F - waitmove 0 - spriteinvisible 255, 0, 0 - setdoorclosed 11, 1 - doorchange + delay 60 + applymovement LAST_TALKED, OldaleTown_PokemonCenter_2F_Movement_1A4356 + waitmovement 0 + closemessage + applymovement 255, OldaleTown_PokemonCenter_2F_Movement_1A435B + waitmovement 0 + opendoor 11, 1 + waitdooranim + applymovement 255, OldaleTown_PokemonCenter_2F_Movement_1A435F + waitmovement 0 + hideobject 255, 0, 0 + closedoor 11, 1 + waitdooranim release - jump OldaleTown_PokemonCenter_2F_EventScript_1A4325 + goto OldaleTown_PokemonCenter_2F_EventScript_1A4325 OldaleTown_PokemonCenter_2F_EventScript_1A42E9:: @ 81A42E9 special CloseLink message OldaleTown_PokemonCenter_2F_Text_1A4AC8 - waittext + waitmessage waitbutton release end @@ -513,7 +513,7 @@ OldaleTown_PokemonCenter_2F_EventScript_1A42E9:: @ 81A42E9 OldaleTown_PokemonCenter_2F_EventScript_1A42F5:: @ 81A42F5 special CloseLink message OldaleTown_PokemonCenter_2F_Text_1A4A85 - waittext + waitmessage waitbutton release end @@ -521,7 +521,7 @@ OldaleTown_PokemonCenter_2F_EventScript_1A42F5:: @ 81A42F5 OldaleTown_PokemonCenter_2F_EventScript_1A4301:: @ 81A4301 special CloseLink message OldaleTown_PokemonCenter_2F_Text_1A4A30 - waittext + waitmessage waitbutton release end @@ -529,7 +529,7 @@ OldaleTown_PokemonCenter_2F_EventScript_1A4301:: @ 81A4301 OldaleTown_PokemonCenter_2F_EventScript_1A430D:: @ 81A430D special CloseLink message OldaleTown_PokemonCenter_2F_Text_1A4B1D - waittext + waitmessage waitbutton release end @@ -537,7 +537,7 @@ OldaleTown_PokemonCenter_2F_EventScript_1A430D:: @ 81A430D OldaleTown_PokemonCenter_2F_EventScript_1A4319:: @ 81A4319 special CloseLink message OldaleTown_PokemonCenter_2F_Text_1A4B59 - waittext + waitmessage waitbutton release end @@ -551,7 +551,7 @@ OldaleTown_PokemonCenter_2F_EventScript_1A4325:: @ 81A4325 OldaleTown_PokemonCenter_2F_EventScript_1A432D:: @ 81A432D special CloseLink message OldaleTown_PokemonCenter_2F_Text_1A4B6C - waittext + waitmessage waitbutton release end @@ -599,7 +599,7 @@ gUnknown_081A4363:: @ 81A4363 lockall special ShowLinkBattleRecords waitbutton - hidebox 0, 0, 29, 19 + erasebox 0, 0, 29, 19 releaseall end @@ -620,7 +620,7 @@ DoubleBattleColosseum_EventScript_1A4383:: @ 81A4383 special sub_80C5568 waitstate compare RESULT, 0 - jumpeq DoubleBattleColosseum_EventScript_1A43EF + goto_if_eq DoubleBattleColosseum_EventScript_1A43EF setvar 0x8005, 0 special sub_8083B90 waitstate @@ -631,7 +631,7 @@ DoubleBattleColosseum_EventScript_1A439E:: @ 81A439E special sub_80C5568 waitstate compare RESULT, 0 - jumpeq DoubleBattleColosseum_EventScript_1A43EF + goto_if_eq DoubleBattleColosseum_EventScript_1A43EF setvar 0x8005, 1 special sub_8083B90 waitstate @@ -642,7 +642,7 @@ DoubleBattleColosseum_EventScript_1A43B9:: @ 81A43B9 special sub_80C5568 waitstate compare RESULT, 0 - jumpeq DoubleBattleColosseum_EventScript_1A43EF + goto_if_eq DoubleBattleColosseum_EventScript_1A43EF setvar 0x8005, 2 special sub_8083B90 waitstate @@ -653,7 +653,7 @@ DoubleBattleColosseum_EventScript_1A43D4:: @ 81A43D4 special sub_80C5568 waitstate compare RESULT, 0 - jumpeq DoubleBattleColosseum_EventScript_1A43EF + goto_if_eq DoubleBattleColosseum_EventScript_1A43EF setvar 0x8005, 3 special sub_8083B90 waitstate @@ -691,7 +691,7 @@ RecordCorner_EventScript_1A4418:: @ 81A4418 special sub_80B929C waitstate compare 0x4001, 0 - jumpif 5, RecordCorner_EventScript_1A446C + goto_if 5, RecordCorner_EventScript_1A446C end RecordCorner_EventScript_1A442D:: @ 81A442D @@ -699,7 +699,7 @@ RecordCorner_EventScript_1A442D:: @ 81A442D special sub_80B929C waitstate compare 0x4001, 0 - jumpif 5, RecordCorner_EventScript_1A446C + goto_if 5, RecordCorner_EventScript_1A446C end RecordCorner_EventScript_1A4442:: @ 81A4442 @@ -707,7 +707,7 @@ RecordCorner_EventScript_1A4442:: @ 81A4442 special sub_80B929C waitstate compare 0x4001, 0 - jumpif 5, RecordCorner_EventScript_1A446C + goto_if 5, RecordCorner_EventScript_1A446C end RecordCorner_EventScript_1A4457:: @ 81A4457 @@ -715,20 +715,20 @@ RecordCorner_EventScript_1A4457:: @ 81A4457 special sub_80B929C waitstate compare 0x4001, 0 - jumpif 5, RecordCorner_EventScript_1A446C + goto_if 5, RecordCorner_EventScript_1A446C end RecordCorner_EventScript_1A446C:: @ 81A446C - bufferitem 1, 0x4001 + getitemname 1, 0x4001 message RecordCorner_Text_1A4E3B - waittext + waitmessage waitbutton releaseall end TradeRoom_ReadTrainerCard1:: @ 81A4479 message CableClub_LookAtTrainerCard1 - waittext + waitmessage waitbutton fadescreen 1 special sub_8083BDC @@ -737,7 +737,7 @@ TradeRoom_ReadTrainerCard1:: @ 81A4479 TradeRoom_ReadTrainerCard2:: @ 81A4487 message CableClub_LookAtTrainerCard2 - waittext + waitmessage waitbutton fadescreen 1 special sub_8083BDC @@ -746,59 +746,59 @@ TradeRoom_ReadTrainerCard2:: @ 81A4487 TradeRoom_TooBusyToNotice:: @ 81A4495 message CableClub_TooBusyToNotice - waittext + waitmessage waitbutton - closebutton + closemessage end SingleBattleColosseum_EventScript_1A449E:: @ 81A449E special sub_8064EAC message SingleBattleColosseum_Text_1A4D7E - waittext + waitmessage waitbutton special sub_8064ED4 - closebutton + closemessage end TradeCenter_EventScript_1A44AD:: @ 81A44AD special sub_8064EAC message TradeCenter_Text_1A4DAB - waittext + waitmessage waitbutton special sub_8064ED4 - closebutton + closemessage end RecordCorner_EventScript_1A44BC:: @ 81A44BC compare 0x4000, 0 - jumpif 5, RecordCorner_EventScript_1A44D6 + goto_if 5, RecordCorner_EventScript_1A44D6 special sub_8064EAC message RecordCorner_Text_1A4DD7 - waittext + waitmessage waitbutton special sub_8064ED4 - closebutton + closemessage end RecordCorner_EventScript_1A44D6:: @ 81A44D6 special sub_8064EAC message RecordCorner_Text_1A4DF7 - waittext + waitmessage waitbutton special sub_8064ED4 - closebutton + closemessage end TradeRoom_PromptToCancelLink:: @ 81A44E5 msgbox TradeRoom_WillLinkBeTerminated, 5 compare RESULT, 1 - jumpeq TradeRoom_TerminateLink - hidebox 0, 0, 29, 19 + goto_if_eq TradeRoom_TerminateLink + erasebox 0, 0, 29, 19 end TradeRoom_TerminateLink:: @ 81A44FE - message2 TradeRoom_TerminatingLink - waittext + messageautoscroll TradeRoom_TerminatingLink + waitmessage special sub_80839D0 end diff --git a/data/scripts/contest_hall.inc b/data/scripts/contest_hall.inc index 1952264d2..1b5c29fee 100644 --- a/data/scripts/contest_hall.inc +++ b/data/scripts/contest_hall.inc @@ -6,18 +6,18 @@ VerdanturfTown_ContestLobby_EventScript_1A4E92:: @ 81A4E92 faceplayer checkitem ITEM_CONTEST_PASS, 1 compare RESULT, 0 - callif 1, FallarborTown_ContestLobby_EventScript_1A4EDD + call_if 1, FallarborTown_ContestLobby_EventScript_1A4EDD compare 0x408a, 0 - jumpif 5, FallarborTown_ContestLobby_EventScript_1A4F4E + goto_if 5, FallarborTown_ContestLobby_EventScript_1A4F4E checkflag 1 - jumpeq FallarborTown_ContestLobby_EventScript_1A4F8F - bufferstd 0, 0x800b + goto_if_eq FallarborTown_ContestLobby_EventScript_1A4F8F + getstdstring 0, 0x800b msgbox FallarborTown_ContestLobby_Text_1A5DFC, 4 checkitem ITEM_CONTEST_PASS, 1 compare RESULT, 0 - jumpeq FallarborTown_ContestLobby_EventScript_1A4EE1 + goto_if_eq FallarborTown_ContestLobby_EventScript_1A4EE1 setflag 1 - jump FallarborTown_ContestLobby_EventScript_1A4F8F + goto FallarborTown_ContestLobby_EventScript_1A4F8F end FallarborTown_ContestLobby_EventScript_1A4EDD:: @ 81A4EDD @@ -26,7 +26,7 @@ FallarborTown_ContestLobby_EventScript_1A4EDD:: @ 81A4EDD FallarborTown_ContestLobby_EventScript_1A4EE1:: @ 81A4EE1 compare CONTEST_RANK, 0 - jumpeq FallarborTown_ContestLobby_EventScript_1A4EF6 + goto_if_eq FallarborTown_ContestLobby_EventScript_1A4EF6 msgbox FallarborTown_ContestLobby_Text_1A6340, 4 releaseall end @@ -34,20 +34,20 @@ FallarborTown_ContestLobby_EventScript_1A4EE1:: @ 81A4EE1 FallarborTown_ContestLobby_EventScript_1A4EF6:: @ 81A4EF6 msgbox FallarborTown_ContestLobby_Text_1A64F4, 5 compare RESULT, 1 - jumpeq FallarborTown_ContestLobby_EventScript_1A4F13 + goto_if_eq FallarborTown_ContestLobby_EventScript_1A4F13 msgbox FallarborTown_ContestLobby_Text_1A65EA, 4 releaseall end FallarborTown_ContestLobby_EventScript_1A4F13:: @ 81A4F13 checkflag 150 - jumpeq FallarborTown_ContestLobby_EventScript_1A4F44 + goto_if_eq FallarborTown_ContestLobby_EventScript_1A4F44 msgbox FallarborTown_ContestLobby_Text_1A6583, 4 giveitem ITEM_CONTEST_PASS setflag 150 setflag 1 msgbox FallarborTown_ContestLobby_Text_1A5E98, 4 - jump FallarborTown_ContestLobby_EventScript_1A4F8F + goto FallarborTown_ContestLobby_EventScript_1A4F8F end FallarborTown_ContestLobby_EventScript_1A4F44:: @ 81A4F44 @@ -64,9 +64,9 @@ FallarborTown_ContestLobby_EventScript_1A4F4E:: @ 81A4F4E FallarborTown_ContestLobby_EventScript_1A4F67:: @ 81A4F67 giveitem ITEM_LUXURY_BALL compare RESULT, 0 - jumpeq FallarborTown_ContestLobby_EventScript_1A4F86 + goto_if_eq FallarborTown_ContestLobby_EventScript_1A4F86 setvar 0x408a, 0 - closebutton + closemessage release end @@ -76,7 +76,7 @@ FallarborTown_ContestLobby_EventScript_1A4F86:: @ 81A4F86 FallarborTown_ContestLobby_EventScript_1A4F8F:: @ 81A4F8F message FallarborTown_ContestLobby_Text_1A5E46 - waittext + waitmessage multichoice 0, 0, 2, 0 switch RESULT case 0, FallarborTown_ContestLobby_EventScript_1A5097 @@ -87,7 +87,7 @@ FallarborTown_ContestLobby_EventScript_1A4F8F:: @ 81A4F8F FallarborTown_ContestLobby_EventScript_1A4FCC:: @ 81A4FCC message FallarborTown_ContestLobby_Text_1A5E7C - waittext + waitmessage multichoice 0, 0, 3, 0 switch RESULT case 0, FallarborTown_ContestLobby_EventScript_1A5014 @@ -99,17 +99,17 @@ FallarborTown_ContestLobby_EventScript_1A4FCC:: @ 81A4FCC FallarborTown_ContestLobby_EventScript_1A5014:: @ 81A5014 msgbox FallarborTown_ContestLobby_Text_1A5E98, 4 - jump FallarborTown_ContestLobby_EventScript_1A4FCC + goto FallarborTown_ContestLobby_EventScript_1A4FCC end FallarborTown_ContestLobby_EventScript_1A5022:: @ 81A5022 msgbox FallarborTown_ContestLobby_Text_1A609B, 4 - jump FallarborTown_ContestLobby_EventScript_1A4FCC + goto FallarborTown_ContestLobby_EventScript_1A4FCC end FallarborTown_ContestLobby_EventScript_1A5030:: @ 81A5030 msgbox FallarborTown_ContestLobby_Text_1A613F, 4 - jump FallarborTown_ContestLobby_EventScript_1A4FCC + goto FallarborTown_ContestLobby_EventScript_1A4FCC end FallarborTown_ContestLobby_EventScript_1A503E:: @ 81A503E @@ -121,34 +121,34 @@ FallarborTown_ContestLobby_EventScript_1A5048:: @ 81A5048 msgbox FallarborTown_ContestLobby_Text_1A6319, 4 choosecontestpkmn compare 0x8004, 255 - jumpeq FallarborTown_ContestLobby_EventScript_1A5097 + goto_if_eq FallarborTown_ContestLobby_EventScript_1A5097 special sub_80C43F4 compare RESULT, 0 - jumpeq FallarborTown_ContestLobby_EventScript_1A50C8 + goto_if_eq FallarborTown_ContestLobby_EventScript_1A50C8 compare RESULT, 1 - jumpeq FallarborTown_ContestLobby_EventScript_1A50D7 + goto_if_eq FallarborTown_ContestLobby_EventScript_1A50D7 compare RESULT, 2 - jumpeq FallarborTown_ContestLobby_EventScript_1A50FB + goto_if_eq FallarborTown_ContestLobby_EventScript_1A50FB compare RESULT, 3 - jumpeq FallarborTown_ContestLobby_EventScript_1A511F + goto_if_eq FallarborTown_ContestLobby_EventScript_1A511F compare RESULT, 4 - jumpeq FallarborTown_ContestLobby_EventScript_1A512E + goto_if_eq FallarborTown_ContestLobby_EventScript_1A512E end FallarborTown_ContestLobby_EventScript_1A5097:: @ 81A5097 message FallarborTown_ContestLobby_Text_1A6623 - waittext + waitmessage multichoice 0, 0, 4, 0 switch RESULT case 5, FallarborTown_ContestLobby_EventScript_1A503E case 127, FallarborTown_ContestLobby_EventScript_1A503E copyvar CONTEST_CATEGORY, RESULT - jump FallarborTown_ContestLobby_EventScript_1A5048 + goto FallarborTown_ContestLobby_EventScript_1A5048 end FallarborTown_ContestLobby_EventScript_1A50C8:: @ 81A50C8 msgbox FallarborTown_ContestLobby_Text_1A664A, 4 - jump FallarborTown_ContestLobby_EventScript_1A5048 + goto FallarborTown_ContestLobby_EventScript_1A5048 release end @@ -168,19 +168,19 @@ FallarborTown_ContestLobby_EventScript_1A50FB:: @ 81A50FB FallarborTown_ContestLobby_EventScript_1A511F:: @ 81A511F msgbox FallarborTown_ContestLobby_Text_1A669F, 4 - jump FallarborTown_ContestLobby_EventScript_1A5048 + goto FallarborTown_ContestLobby_EventScript_1A5048 release end FallarborTown_ContestLobby_EventScript_1A512E:: @ 81A512E msgbox FallarborTown_ContestLobby_Text_1A66DC, 4 - jump FallarborTown_ContestLobby_EventScript_1A5048 + goto FallarborTown_ContestLobby_EventScript_1A5048 release end FallarborTown_ContestLobby_EventScript_1A513D:: @ 81A513D msgbox FallarborTown_ContestLobby_Text_1A67C1, 4 - closebutton + closemessage releaseall setvar 0x4086, 1 return @@ -188,10 +188,10 @@ FallarborTown_ContestLobby_EventScript_1A513D:: @ 81A513D LinkContestRoom1_EventScript_1A514D:: @ 81A514D setvar 0x8006, 0 lockall - move 14, LinkContestRoom1_Movement_1A5DBF - waitmove 0 - move 1, LinkContestRoom1_Movement_1A5D85 - waitmove 0 + applymovement 14, LinkContestRoom1_Movement_1A5DBF + waitmovement 0 + applymovement 1, LinkContestRoom1_Movement_1A5D85 + waitmovement 0 releaseall call LinkContestRoom1_EventScript_1A51A0 call LinkContestRoom1_EventScript_1A51EA @@ -260,24 +260,24 @@ LinkContestRoom1_EventScript_1A523F:: @ 81A523F return LinkContestRoom1_EventScript_1A5245:: @ 81A5245 - bufferstd 1, 0x8008 - bufferstd 2, 0x8009 + getstdstring 1, 0x8008 + getstdstring 2, 0x8009 call LinkContestRoom1_EventScript_1A525F lockall - move 1, LinkContestRoom1_Movement_1A5D87 - waitmove 0 + applymovement 1, LinkContestRoom1_Movement_1A5D87 + waitmovement 0 releaseall return LinkContestRoom1_EventScript_1A525F:: @ 81A525F compare 0x4088, 5 - jumpeq LinkContestRoom1_EventScript_1A5273 + goto_if_eq LinkContestRoom1_EventScript_1A5273 msgbox LinkContestRoom1_Text_1A68F0, 3 return LinkContestRoom1_EventScript_1A5273:: @ 81A5273 - message2 LinkContestRoom1_Text_1A6976 - waittext + messageautoscroll LinkContestRoom1_Text_1A6976 + waitmessage return LinkContestRoom1_EventScript_1A527A:: @ 81A527A @@ -288,50 +288,50 @@ LinkContestRoom1_EventScript_1A527A:: @ 81A527A call LinkContestRoom1_EventScript_1A5880 addvar 0x8006, 1 compare 0x8006, 4 - jumpif 5, LinkContestRoom1_EventScript_1A527A + goto_if 5, LinkContestRoom1_EventScript_1A527A call LinkContestRoom1_EventScript_1A5377 setvar 0x4001, 6 return LinkContestRoom1_EventScript_1A52AE:: @ 81A52AE compare 0x8006, 0 - jumpeq LinkContestRoom1_EventScript_1A52DB + goto_if_eq LinkContestRoom1_EventScript_1A52DB compare 0x8006, 1 - jumpeq LinkContestRoom1_EventScript_1A52ED + goto_if_eq LinkContestRoom1_EventScript_1A52ED compare 0x8006, 2 - jumpeq LinkContestRoom1_EventScript_1A52FF + goto_if_eq LinkContestRoom1_EventScript_1A52FF compare 0x8006, 3 - jumpeq LinkContestRoom1_EventScript_1A5311 + goto_if_eq LinkContestRoom1_EventScript_1A5311 return LinkContestRoom1_EventScript_1A52DB:: @ 81A52DB lockall - move 3, LinkContestRoom1_Movement_1A5DCE - waitmove 0 + applymovement 3, LinkContestRoom1_Movement_1A5DCE + waitmovement 0 releaseall setvar 0x800b, 3 return LinkContestRoom1_EventScript_1A52ED:: @ 81A52ED lockall - move 4, LinkContestRoom1_Movement_1A5DDA - waitmove 0 + applymovement 4, LinkContestRoom1_Movement_1A5DDA + waitmovement 0 releaseall setvar 0x800b, 4 return LinkContestRoom1_EventScript_1A52FF:: @ 81A52FF lockall - move 5, LinkContestRoom1_Movement_1A5DE2 - waitmove 0 + applymovement 5, LinkContestRoom1_Movement_1A5DE2 + waitmovement 0 releaseall setvar 0x800b, 5 return LinkContestRoom1_EventScript_1A5311:: @ 81A5311 lockall - move 14, LinkContestRoom1_Movement_1A5DEA - waitmove 0 + applymovement 14, LinkContestRoom1_Movement_1A5DEA + waitmovement 0 releaseall setvar 0x800b, 14 return @@ -339,108 +339,108 @@ LinkContestRoom1_EventScript_1A5311:: @ 81A5311 LinkContestRoom1_EventScript_1A5323:: @ 81A5323 special sub_80C4C64 addvar 0x8006, 1 - buffernum 1, 0x8006 + getnumberstring 1, 0x8006 lockall - move 0x800b, LinkContestRoom1_Movement_1A5D9C - waitmove 0 + applymovement 0x800b, LinkContestRoom1_Movement_1A5D9C + waitmovement 0 releaseall - reappear 13 - playsfx 10 + addobject 13 + playse 10 lockall - move 0x800b, LinkContestRoom1_Movement_1A5D9C - waitmove 0 + applymovement 0x800b, LinkContestRoom1_Movement_1A5D9C + waitmovement 0 releaseall addvar 0x8006, -1 - playsfx 15 + playse 15 special ShowContestEntryMonPic call LinkContestRoom1_EventScript_1A535E return LinkContestRoom1_EventScript_1A535E:: @ 81A535E compare 0x4088, 5 - jumpeq LinkContestRoom1_EventScript_1A5370 + goto_if_eq LinkContestRoom1_EventScript_1A5370 message LinkContestRoom1_Text_1A6A04 - waittext + waitmessage return LinkContestRoom1_EventScript_1A5370:: @ 81A5370 - message2 LinkContestRoom1_Text_1A6A04 - waittext + messageautoscroll LinkContestRoom1_Text_1A6A04 + waitmessage return LinkContestRoom1_EventScript_1A5377:: @ 81A5377 call LinkContestRoom1_EventScript_1A53B3 call LinkContestRoom1_EventScript_1A53CE - playsfx 223 - waittext + playse 223 + waitmessage call LinkContestRoom1_EventScript_1A5A90 - move 1, LinkContestRoom1_Movement_1A5D9F - waitmove 0 - move 2, LinkContestRoom1_Movement_1A5DA1 - waitmove 0 - pause 20 - move 1, LinkContestRoom1_Movement_1A5D8F - move 2, LinkContestRoom1_Movement_1A5D8F - waitmove 0 + applymovement 1, LinkContestRoom1_Movement_1A5D9F + waitmovement 0 + applymovement 2, LinkContestRoom1_Movement_1A5DA1 + waitmovement 0 + delay 20 + applymovement 1, LinkContestRoom1_Movement_1A5D8F + applymovement 2, LinkContestRoom1_Movement_1A5D8F + waitmovement 0 return LinkContestRoom1_EventScript_1A53B3:: @ 81A53B3 compare 0x4088, 5 - jumpeq LinkContestRoom1_EventScript_1A53C7 + goto_if_eq LinkContestRoom1_EventScript_1A53C7 msgbox LinkContestRoom1_Text_1A6A1F, 4 return LinkContestRoom1_EventScript_1A53C7:: @ 81A53C7 - message2 LinkContestRoom1_Text_1A6A1F - waittext + messageautoscroll LinkContestRoom1_Text_1A6A1F + waitmessage return LinkContestRoom1_EventScript_1A53CE:: @ 81A53CE compare 0x4088, 5 - jumpeq LinkContestRoom1_EventScript_1A53DF + goto_if_eq LinkContestRoom1_EventScript_1A53DF message LinkContestRoom1_Text_1A6AE1 return LinkContestRoom1_EventScript_1A53DF:: @ 81A53DF - message2 LinkContestRoom1_Text_1A6AE1 + messageautoscroll LinkContestRoom1_Text_1A6AE1 return LinkContestRoom1_EventScript_1A53E5:: @ 81A53E5 - move 1, LinkContestRoom1_Movement_1A5DAF - waitmove 0 - playsfx 223 + applymovement 1, LinkContestRoom1_Movement_1A5DAF + waitmovement 0 + playse 223 call LinkContestRoom1_EventScript_1A5AE4 - move 9, LinkContestRoom1_Movement_1A5DB7 - move 12, LinkContestRoom1_Movement_1A5DBB - move 7, LinkContestRoom1_Movement_1A5DB7 - waitmove 0 - move 1, LinkContestRoom1_Movement_1A5DB7 - waitmove 0 - move 10, LinkContestRoom1_Movement_1A5DAF - move 11, LinkContestRoom1_Movement_1A5DBB - move 6, LinkContestRoom1_Movement_1A5DB3 - move 8, LinkContestRoom1_Movement_1A5DAF - waitmove 0 - move 1, LinkContestRoom1_Movement_1A5DC1 - waitmove 0 - move 1, LinkContestRoom1_Movement_1A5DCA - move 2, LinkContestRoom1_Movement_1A5DC5 - waitmove 0 + applymovement 9, LinkContestRoom1_Movement_1A5DB7 + applymovement 12, LinkContestRoom1_Movement_1A5DBB + applymovement 7, LinkContestRoom1_Movement_1A5DB7 + waitmovement 0 + applymovement 1, LinkContestRoom1_Movement_1A5DB7 + waitmovement 0 + applymovement 10, LinkContestRoom1_Movement_1A5DAF + applymovement 11, LinkContestRoom1_Movement_1A5DBB + applymovement 6, LinkContestRoom1_Movement_1A5DB3 + applymovement 8, LinkContestRoom1_Movement_1A5DAF + waitmovement 0 + applymovement 1, LinkContestRoom1_Movement_1A5DC1 + waitmovement 0 + applymovement 1, LinkContestRoom1_Movement_1A5DCA + applymovement 2, LinkContestRoom1_Movement_1A5DC5 + waitmovement 0 releaseall return LinkContestRoom1_EventScript_1A5455:: @ 81A5455 special sub_80C47A0 compare 0x4088, 1 - callif 1, LinkContestRoom1_EventScript_1A555A + call_if 1, LinkContestRoom1_EventScript_1A555A compare 0x4088, 2 - callif 1, LinkContestRoom1_EventScript_1A55B8 + call_if 1, LinkContestRoom1_EventScript_1A55B8 compare 0x4088, 3 - callif 1, LinkContestRoom1_EventScript_1A5616 + call_if 1, LinkContestRoom1_EventScript_1A5616 compare 0x4088, 4 - callif 1, LinkContestRoom1_EventScript_1A5674 + call_if 1, LinkContestRoom1_EventScript_1A5674 compare 0x4088, 5 - callif 1, LinkContestRoom1_EventScript_1A56D2 + call_if 1, LinkContestRoom1_EventScript_1A56D2 setvar 0x4001, 9 setvar 0x4002, 9 setvar 0x4003, 9 @@ -450,7 +450,7 @@ LinkContestRoom1_EventScript_1A5455:: @ 81A5455 setvar 0x4007, 9 setvar 0x4008, 9 compare 0x4000, 0 - callif 2, LinkContestRoom1_EventScript_1A54EB + call_if 2, LinkContestRoom1_EventScript_1A54EB setvar 0x4001, 0 setvar 0x4002, 0 setvar 0x4003, 0 @@ -465,123 +465,123 @@ LinkContestRoom1_EventScript_1A54EB:: @ 81A54EB setvar RESULT, 8 special ScriptRandom compare RESULT, 0 - callif 1, LinkContestRoom1_EventScript_1A5760 + call_if 1, LinkContestRoom1_EventScript_1A5760 compare RESULT, 1 - callif 1, LinkContestRoom1_EventScript_1A5784 + call_if 1, LinkContestRoom1_EventScript_1A5784 compare RESULT, 2 - callif 1, LinkContestRoom1_EventScript_1A57A8 + call_if 1, LinkContestRoom1_EventScript_1A57A8 compare RESULT, 3 - callif 1, LinkContestRoom1_EventScript_1A57CC + call_if 1, LinkContestRoom1_EventScript_1A57CC compare RESULT, 4 - callif 1, LinkContestRoom1_EventScript_1A57F0 + call_if 1, LinkContestRoom1_EventScript_1A57F0 compare RESULT, 5 - callif 1, LinkContestRoom1_EventScript_1A5814 + call_if 1, LinkContestRoom1_EventScript_1A5814 compare RESULT, 6 - callif 1, LinkContestRoom1_EventScript_1A5838 + call_if 1, LinkContestRoom1_EventScript_1A5838 compare RESULT, 7 - callif 1, LinkContestRoom1_EventScript_1A585C + call_if 1, LinkContestRoom1_EventScript_1A585C compare 0x4000, 0 - jumpif 2, LinkContestRoom1_EventScript_1A54EB - waitmove 0 + goto_if 2, LinkContestRoom1_EventScript_1A54EB + waitmovement 0 return LinkContestRoom1_EventScript_1A555A:: @ 81A555A compare 0x8004, 80 - jumpif 2, LinkContestRoom1_EventScript_1A575A + goto_if 2, LinkContestRoom1_EventScript_1A575A compare 0x8004, 70 - jumpif 2, LinkContestRoom1_EventScript_1A5754 + goto_if 2, LinkContestRoom1_EventScript_1A5754 compare 0x8004, 60 - jumpif 2, LinkContestRoom1_EventScript_1A574E + goto_if 2, LinkContestRoom1_EventScript_1A574E compare 0x8004, 50 - jumpif 2, LinkContestRoom1_EventScript_1A5748 + goto_if 2, LinkContestRoom1_EventScript_1A5748 compare 0x8004, 40 - jumpif 2, LinkContestRoom1_EventScript_1A5742 + goto_if 2, LinkContestRoom1_EventScript_1A5742 compare 0x8004, 30 - jumpif 2, LinkContestRoom1_EventScript_1A573C + goto_if 2, LinkContestRoom1_EventScript_1A573C compare 0x8004, 20 - jumpif 2, LinkContestRoom1_EventScript_1A5736 + goto_if 2, LinkContestRoom1_EventScript_1A5736 compare 0x8004, 10 - jumpif 2, LinkContestRoom1_EventScript_1A5730 + goto_if 2, LinkContestRoom1_EventScript_1A5730 setvar 0x4000, 0 return LinkContestRoom1_EventScript_1A55B8:: @ 81A55B8 compare 0x8004, 230 - jumpif 2, LinkContestRoom1_EventScript_1A575A + goto_if 2, LinkContestRoom1_EventScript_1A575A compare 0x8004, 210 - jumpif 2, LinkContestRoom1_EventScript_1A5754 + goto_if 2, LinkContestRoom1_EventScript_1A5754 compare 0x8004, 190 - jumpif 2, LinkContestRoom1_EventScript_1A574E + goto_if 2, LinkContestRoom1_EventScript_1A574E compare 0x8004, 170 - jumpif 2, LinkContestRoom1_EventScript_1A5748 + goto_if 2, LinkContestRoom1_EventScript_1A5748 compare 0x8004, 150 - jumpif 2, LinkContestRoom1_EventScript_1A5742 + goto_if 2, LinkContestRoom1_EventScript_1A5742 compare 0x8004, 130 - jumpif 2, LinkContestRoom1_EventScript_1A573C + goto_if 2, LinkContestRoom1_EventScript_1A573C compare 0x8004, 110 - jumpif 2, LinkContestRoom1_EventScript_1A5736 + goto_if 2, LinkContestRoom1_EventScript_1A5736 compare 0x8004, 90 - jumpif 2, LinkContestRoom1_EventScript_1A5730 + goto_if 2, LinkContestRoom1_EventScript_1A5730 setvar 0x4000, 0 return LinkContestRoom1_EventScript_1A5616:: @ 81A5616 compare 0x8004, 380 - jumpif 2, LinkContestRoom1_EventScript_1A575A + goto_if 2, LinkContestRoom1_EventScript_1A575A compare 0x8004, 350 - jumpif 2, LinkContestRoom1_EventScript_1A5754 + goto_if 2, LinkContestRoom1_EventScript_1A5754 compare 0x8004, 320 - jumpif 2, LinkContestRoom1_EventScript_1A574E + goto_if 2, LinkContestRoom1_EventScript_1A574E compare 0x8004, 290 - jumpif 2, LinkContestRoom1_EventScript_1A5748 + goto_if 2, LinkContestRoom1_EventScript_1A5748 compare 0x8004, 260 - jumpif 2, LinkContestRoom1_EventScript_1A5742 + goto_if 2, LinkContestRoom1_EventScript_1A5742 compare 0x8004, 230 - jumpif 2, LinkContestRoom1_EventScript_1A573C + goto_if 2, LinkContestRoom1_EventScript_1A573C compare 0x8004, 200 - jumpif 2, LinkContestRoom1_EventScript_1A5736 + goto_if 2, LinkContestRoom1_EventScript_1A5736 compare 0x8004, 170 - jumpif 2, LinkContestRoom1_EventScript_1A5730 + goto_if 2, LinkContestRoom1_EventScript_1A5730 setvar 0x4000, 0 return LinkContestRoom1_EventScript_1A5674:: @ 81A5674 compare 0x8004, 600 - jumpif 2, LinkContestRoom1_EventScript_1A575A + goto_if 2, LinkContestRoom1_EventScript_1A575A compare 0x8004, 560 - jumpif 2, LinkContestRoom1_EventScript_1A5754 + goto_if 2, LinkContestRoom1_EventScript_1A5754 compare 0x8004, 520 - jumpif 2, LinkContestRoom1_EventScript_1A574E + goto_if 2, LinkContestRoom1_EventScript_1A574E compare 0x8004, 480 - jumpif 2, LinkContestRoom1_EventScript_1A5748 + goto_if 2, LinkContestRoom1_EventScript_1A5748 compare 0x8004, 440 - jumpif 2, LinkContestRoom1_EventScript_1A5742 + goto_if 2, LinkContestRoom1_EventScript_1A5742 compare 0x8004, 400 - jumpif 2, LinkContestRoom1_EventScript_1A573C + goto_if 2, LinkContestRoom1_EventScript_1A573C compare 0x8004, 360 - jumpif 2, LinkContestRoom1_EventScript_1A5736 + goto_if 2, LinkContestRoom1_EventScript_1A5736 compare 0x8004, 320 - jumpif 2, LinkContestRoom1_EventScript_1A5730 + goto_if 2, LinkContestRoom1_EventScript_1A5730 setvar 0x4000, 0 return LinkContestRoom1_EventScript_1A56D2:: @ 81A56D2 compare 0x8004, 600 - jumpif 2, LinkContestRoom1_EventScript_1A575A + goto_if 2, LinkContestRoom1_EventScript_1A575A compare 0x8004, 550 - jumpif 2, LinkContestRoom1_EventScript_1A5754 + goto_if 2, LinkContestRoom1_EventScript_1A5754 compare 0x8004, 500 - jumpif 2, LinkContestRoom1_EventScript_1A574E + goto_if 2, LinkContestRoom1_EventScript_1A574E compare 0x8004, 450 - jumpif 2, LinkContestRoom1_EventScript_1A5748 + goto_if 2, LinkContestRoom1_EventScript_1A5748 compare 0x8004, 400 - jumpif 2, LinkContestRoom1_EventScript_1A5742 + goto_if 2, LinkContestRoom1_EventScript_1A5742 compare 0x8004, 300 - jumpif 2, LinkContestRoom1_EventScript_1A573C + goto_if 2, LinkContestRoom1_EventScript_1A573C compare 0x8004, 200 - jumpif 2, LinkContestRoom1_EventScript_1A5736 + goto_if 2, LinkContestRoom1_EventScript_1A5736 compare 0x8004, 100 - jumpif 2, LinkContestRoom1_EventScript_1A5730 + goto_if 2, LinkContestRoom1_EventScript_1A5730 setvar 0x4000, 0 return @@ -619,10 +619,10 @@ LinkContestRoom1_EventScript_1A575A:: @ 81A575A LinkContestRoom1_EventScript_1A5760:: @ 81A5760 compare 0x4001, 1 - jumpeq LinkContestRoom1_EventScript_1A5783 - move 6, LinkContestRoom1_Movement_1A5D8D - playsfx 21 - pause 14 + goto_if_eq LinkContestRoom1_EventScript_1A5783 + applymovement 6, LinkContestRoom1_Movement_1A5D8D + playse 21 + delay 14 setvar 0x4001, 1 addvar 0x4000, 65535 return @@ -632,10 +632,10 @@ LinkContestRoom1_EventScript_1A5783:: @ 81A5783 LinkContestRoom1_EventScript_1A5784:: @ 81A5784 compare 0x4002, 1 - jumpeq LinkContestRoom1_EventScript_1A57A7 - move 12, LinkContestRoom1_Movement_1A5D8D - playsfx 21 - pause 14 + goto_if_eq LinkContestRoom1_EventScript_1A57A7 + applymovement 12, LinkContestRoom1_Movement_1A5D8D + playse 21 + delay 14 setvar 0x4002, 1 addvar 0x4000, 65535 return @@ -645,10 +645,10 @@ LinkContestRoom1_EventScript_1A57A7:: @ 81A57A7 LinkContestRoom1_EventScript_1A57A8:: @ 81A57A8 compare 0x4003, 1 - jumpeq LinkContestRoom1_EventScript_1A57CB - move 7, LinkContestRoom1_Movement_1A5D8D - playsfx 21 - pause 14 + goto_if_eq LinkContestRoom1_EventScript_1A57CB + applymovement 7, LinkContestRoom1_Movement_1A5D8D + playse 21 + delay 14 setvar 0x4003, 1 addvar 0x4000, 65535 return @@ -658,10 +658,10 @@ LinkContestRoom1_EventScript_1A57CB:: @ 81A57CB LinkContestRoom1_EventScript_1A57CC:: @ 81A57CC compare 0x4004, 1 - jumpeq LinkContestRoom1_EventScript_1A57EF - move 8, LinkContestRoom1_Movement_1A5D8D - playsfx 21 - pause 14 + goto_if_eq LinkContestRoom1_EventScript_1A57EF + applymovement 8, LinkContestRoom1_Movement_1A5D8D + playse 21 + delay 14 setvar 0x4004, 1 addvar 0x4000, 65535 return @@ -671,10 +671,10 @@ LinkContestRoom1_EventScript_1A57EF:: @ 81A57EF LinkContestRoom1_EventScript_1A57F0:: @ 81A57F0 compare 0x4005, 1 - jumpeq LinkContestRoom1_EventScript_1A5813 - move 9, LinkContestRoom1_Movement_1A5D8D - playsfx 21 - pause 14 + goto_if_eq LinkContestRoom1_EventScript_1A5813 + applymovement 9, LinkContestRoom1_Movement_1A5D8D + playse 21 + delay 14 setvar 0x4005, 1 addvar 0x4000, 65535 return @@ -684,10 +684,10 @@ LinkContestRoom1_EventScript_1A5813:: @ 81A5813 LinkContestRoom1_EventScript_1A5814:: @ 81A5814 compare 0x4006, 1 - jumpeq LinkContestRoom1_EventScript_1A5837 - move 10, LinkContestRoom1_Movement_1A5D8D - playsfx 21 - pause 14 + goto_if_eq LinkContestRoom1_EventScript_1A5837 + applymovement 10, LinkContestRoom1_Movement_1A5D8D + playse 21 + delay 14 setvar 0x4006, 1 addvar 0x4000, 65535 return @@ -697,10 +697,10 @@ LinkContestRoom1_EventScript_1A5837:: @ 81A5837 LinkContestRoom1_EventScript_1A5838:: @ 81A5838 compare 0x4007, 1 - jumpeq LinkContestRoom1_EventScript_1A585B - move 11, LinkContestRoom1_Movement_1A5D8D - playsfx 21 - pause 14 + goto_if_eq LinkContestRoom1_EventScript_1A585B + applymovement 11, LinkContestRoom1_Movement_1A5D8D + playse 21 + delay 14 setvar 0x4007, 1 addvar 0x4000, 65535 return @@ -710,10 +710,10 @@ LinkContestRoom1_EventScript_1A585B:: @ 81A585B LinkContestRoom1_EventScript_1A585C:: @ 81A585C compare 0x4008, 1 - jumpeq LinkContestRoom1_EventScript_1A587F - move 15, LinkContestRoom1_Movement_1A5D8D - playsfx 21 - pause 14 + goto_if_eq LinkContestRoom1_EventScript_1A587F + applymovement 15, LinkContestRoom1_Movement_1A5D8D + playse 21 + delay 14 setvar 0x4008, 1 addvar 0x4000, 65535 return @@ -722,9 +722,9 @@ LinkContestRoom1_EventScript_1A587F:: @ 81A587F return LinkContestRoom1_EventScript_1A5880:: @ 81A5880 - closebutton + closemessage release - disappear 13 + removeobject 13 special sub_80C5164 switch 0x8006 case 0, LinkContestRoom1_EventScript_1A58BA @@ -735,125 +735,125 @@ LinkContestRoom1_EventScript_1A5880:: @ 81A5880 LinkContestRoom1_EventScript_1A58BA:: @ 81A58BA lockall - move 0x800b, LinkContestRoom1_Movement_1A5DD4 - waitmove 0 + applymovement 0x800b, LinkContestRoom1_Movement_1A5DD4 + waitmovement 0 releaseall return LinkContestRoom1_EventScript_1A58C7:: @ 81A58C7 lockall - move 0x800b, LinkContestRoom1_Movement_1A5DDE - waitmove 0 + applymovement 0x800b, LinkContestRoom1_Movement_1A5DDE + waitmovement 0 releaseall return LinkContestRoom1_EventScript_1A58D4:: @ 81A58D4 lockall - move 0x800b, LinkContestRoom1_Movement_1A5DE6 - waitmove 0 + applymovement 0x800b, LinkContestRoom1_Movement_1A5DE6 + waitmovement 0 releaseall return LinkContestRoom1_EventScript_1A58E1:: @ 81A58E1 lockall - move 0x800b, LinkContestRoom1_Movement_1A5DF0 - waitmove 0 + applymovement 0x800b, LinkContestRoom1_Movement_1A5DF0 + waitmovement 0 releaseall return LinkContestRoom1_EventScript_1A58EE:: @ 81A58EE lockall - move 1, LinkContestRoom1_Movement_1A5DA3 - waitmove 0 + applymovement 1, LinkContestRoom1_Movement_1A5DA3 + waitmovement 0 call LinkContestRoom1_EventScript_1A5930 - waittext - move 1, LinkContestRoom1_Movement_1A5D91 - move 2, LinkContestRoom1_Movement_1A5D95 - waitmove 0 + waitmessage + applymovement 1, LinkContestRoom1_Movement_1A5D91 + applymovement 2, LinkContestRoom1_Movement_1A5D95 + waitmovement 0 releaseall setvar 0x4009, 1 startcontest setvar 0x4009, 0 lockall - move 1, LinkContestRoom1_Movement_1A5D95 - move 2, LinkContestRoom1_Movement_1A5D91 - waitmove 0 + applymovement 1, LinkContestRoom1_Movement_1A5D95 + applymovement 2, LinkContestRoom1_Movement_1A5D91 + waitmovement 0 releaseall return LinkContestRoom1_EventScript_1A5930:: @ 81A5930 compare 0x4088, 5 - jumpeq LinkContestRoom1_EventScript_1A5944 + goto_if_eq LinkContestRoom1_EventScript_1A5944 msgbox LinkContestRoom1_Text_1A6AF5, 3 return LinkContestRoom1_EventScript_1A5944:: @ 81A5944 - message2 LinkContestRoom1_Text_1A6AF5 + messageautoscroll LinkContestRoom1_Text_1A6AF5 return LinkContestRoom1_EventScript_1A594A:: @ 81A594A call LinkContestRoom1_EventScript_1A5984 call LinkContestRoom1_EventScript_1A59A2 - move 1, LinkContestRoom1_Movement_1A5D8B - waitmove 0 + applymovement 1, LinkContestRoom1_Movement_1A5D8B + waitmovement 0 call LinkContestRoom1_EventScript_1A59C0 call LinkContestRoom1_EventScript_1A59DE - move 1, LinkContestRoom1_Movement_1A5D8F - waitmove 0 - closebutton + applymovement 1, LinkContestRoom1_Movement_1A5D8F + waitmovement 0 + closemessage releaseall setvar 0x4009, 1 showcontestresults setvar 0x4009, 0 - playmusic 439, 0 + playbgm 439, 0 return LinkContestRoom1_EventScript_1A5984:: @ 81A5984 compare 0x4088, 5 - jumpeq LinkContestRoom1_EventScript_1A5998 + goto_if_eq LinkContestRoom1_EventScript_1A5998 msgbox LinkContestRoom1_Text_1A6C06, 4 return LinkContestRoom1_EventScript_1A5998:: @ 81A5998 - message2 LinkContestRoom1_Text_1A6C06 - waittext - pause 30 + messageautoscroll LinkContestRoom1_Text_1A6C06 + waitmessage + delay 30 return LinkContestRoom1_EventScript_1A59A2:: @ 81A59A2 compare 0x4088, 5 - jumpeq LinkContestRoom1_EventScript_1A59B6 + goto_if_eq LinkContestRoom1_EventScript_1A59B6 msgbox LinkContestRoom1_Text_1A6C21, 4 return LinkContestRoom1_EventScript_1A59B6:: @ 81A59B6 - message2 LinkContestRoom1_Text_1A6C21 - waittext - pause 30 + messageautoscroll LinkContestRoom1_Text_1A6C21 + waitmessage + delay 30 return LinkContestRoom1_EventScript_1A59C0:: @ 81A59C0 compare 0x4088, 5 - jumpeq LinkContestRoom1_EventScript_1A59D4 + goto_if_eq LinkContestRoom1_EventScript_1A59D4 msgbox LinkContestRoom1_Text_1A6C9D, 4 return LinkContestRoom1_EventScript_1A59D4:: @ 81A59D4 - message2 LinkContestRoom1_Text_1A6C9D - waittext - pause 30 + messageautoscroll LinkContestRoom1_Text_1A6C9D + waitmessage + delay 30 return LinkContestRoom1_EventScript_1A59DE:: @ 81A59DE compare 0x4088, 5 - jumpeq LinkContestRoom1_EventScript_1A59F2 + goto_if_eq LinkContestRoom1_EventScript_1A59F2 msgbox LinkContestRoom1_Text_1A6D16, 4 return LinkContestRoom1_EventScript_1A59F2:: @ 81A59F2 - message2 LinkContestRoom1_Text_1A6D16 - waittext - pause 30 + messageautoscroll LinkContestRoom1_Text_1A6D16 + waitmessage + delay 30 return LinkContestRoom1_EventScript_1A59FC:: @ 81A59FC @@ -885,156 +885,156 @@ LinkContestRoom1_EventScript_1A5A49:: @ 81A5A49 special sub_80C47F0 special sub_80C4858 addvar 0x8005, 1 - buffernum 1, 0x8005 + getnumberstring 1, 0x8005 addvar 0x8005, -1 call LinkContestRoom1_EventScript_1A5A75 - move 0x4003, LinkContestRoom1_Movement_1A5D99 - waitmove 0 - playsfx 223 + applymovement 0x4003, LinkContestRoom1_Movement_1A5D99 + waitmovement 0 + playse 223 setvar 0x4001, 0 return LinkContestRoom1_EventScript_1A5A75:: @ 81A5A75 compare 0x4088, 5 - jumpeq LinkContestRoom1_EventScript_1A5A89 + goto_if_eq LinkContestRoom1_EventScript_1A5A89 msgbox LinkContestRoom1_Text_1A6D3C, 4 return LinkContestRoom1_EventScript_1A5A89:: @ 81A5A89 - message2 LinkContestRoom1_Text_1A6D3C - waittext + messageautoscroll LinkContestRoom1_Text_1A6D3C + waitmessage return LinkContestRoom1_EventScript_1A5A90:: @ 81A5A90 addvar 0x4001, 1 lockall compare 0x4088, 1 - callif 2, LinkContestRoom1_EventScript_1A5AE4 - move 9, LinkContestRoom1_Movement_1A5DB7 - move 12, LinkContestRoom1_Movement_1A5DBB - move 7, LinkContestRoom1_Movement_1A5DB7 - pause 30 - move 10, LinkContestRoom1_Movement_1A5DAF - move 11, LinkContestRoom1_Movement_1A5DBB - move 6, LinkContestRoom1_Movement_1A5DB3 - move 8, LinkContestRoom1_Movement_1A5DAF + call_if 2, LinkContestRoom1_EventScript_1A5AE4 + applymovement 9, LinkContestRoom1_Movement_1A5DB7 + applymovement 12, LinkContestRoom1_Movement_1A5DBB + applymovement 7, LinkContestRoom1_Movement_1A5DB7 + delay 30 + applymovement 10, LinkContestRoom1_Movement_1A5DAF + applymovement 11, LinkContestRoom1_Movement_1A5DBB + applymovement 6, LinkContestRoom1_Movement_1A5DB3 + applymovement 8, LinkContestRoom1_Movement_1A5DAF compare 0x4001, 4 - jumpif 5, LinkContestRoom1_EventScript_1A5A90 - pause 30 + goto_if 5, LinkContestRoom1_EventScript_1A5A90 + delay 30 return LinkContestRoom1_EventScript_1A5AE4:: @ 81A5AE4 - vspriteface 0, 1 - vspriteface 2, 1 - vspriteface 4, 4 - vspriteface 6, 1 - vspriteface 8, 1 - vspriteface 10, 1 - vspriteface 12, 1 - vspriteface 14, 1 - vspriteface 16, 1 - vspriteface 18, 1 - vspriteface 20, 4 - vspriteface 22, 4 - vspriteface 25, 4 - vspriteface 27, 3 - vspriteface 28, 4 - pause 10 - vspriteface 0, 4 - vspriteface 2, 4 - vspriteface 4, 4 - vspriteface 6, 4 - vspriteface 8, 4 - vspriteface 10, 3 - vspriteface 12, 3 - vspriteface 14, 3 - vspriteface 16, 3 - vspriteface 18, 3 - vspriteface 20, 1 - vspriteface 22, 1 - vspriteface 25, 2 - vspriteface 27, 2 - vspriteface 28, 2 - pause 10 - vspriteface 1, 2 - vspriteface 3, 2 - vspriteface 5, 2 - vspriteface 7, 2 - vspriteface 9, 4 - vspriteface 11, 2 - vspriteface 15, 2 - vspriteface 13, 2 - vspriteface 17, 2 - vspriteface 19, 2 - vspriteface 21, 3 - vspriteface 23, 3 - vspriteface 24, 3 - vspriteface 26, 4 - vspriteface 29, 3 - vspriteface 30, 3 - pause 10 - vspriteface 1, 4 - vspriteface 3, 4 - vspriteface 5, 4 - vspriteface 7, 4 - vspriteface 9, 4 - vspriteface 11, 3 - vspriteface 15, 3 - vspriteface 13, 3 - vspriteface 17, 3 - vspriteface 19, 3 - vspriteface 21, 1 - vspriteface 23, 1 - vspriteface 24, 1 - vspriteface 26, 2 - vspriteface 29, 2 - vspriteface 30, 2 - pause 10 + turnvobject 0, 1 + turnvobject 2, 1 + turnvobject 4, 4 + turnvobject 6, 1 + turnvobject 8, 1 + turnvobject 10, 1 + turnvobject 12, 1 + turnvobject 14, 1 + turnvobject 16, 1 + turnvobject 18, 1 + turnvobject 20, 4 + turnvobject 22, 4 + turnvobject 25, 4 + turnvobject 27, 3 + turnvobject 28, 4 + delay 10 + turnvobject 0, 4 + turnvobject 2, 4 + turnvobject 4, 4 + turnvobject 6, 4 + turnvobject 8, 4 + turnvobject 10, 3 + turnvobject 12, 3 + turnvobject 14, 3 + turnvobject 16, 3 + turnvobject 18, 3 + turnvobject 20, 1 + turnvobject 22, 1 + turnvobject 25, 2 + turnvobject 27, 2 + turnvobject 28, 2 + delay 10 + turnvobject 1, 2 + turnvobject 3, 2 + turnvobject 5, 2 + turnvobject 7, 2 + turnvobject 9, 4 + turnvobject 11, 2 + turnvobject 15, 2 + turnvobject 13, 2 + turnvobject 17, 2 + turnvobject 19, 2 + turnvobject 21, 3 + turnvobject 23, 3 + turnvobject 24, 3 + turnvobject 26, 4 + turnvobject 29, 3 + turnvobject 30, 3 + delay 10 + turnvobject 1, 4 + turnvobject 3, 4 + turnvobject 5, 4 + turnvobject 7, 4 + turnvobject 9, 4 + turnvobject 11, 3 + turnvobject 15, 3 + turnvobject 13, 3 + turnvobject 17, 3 + turnvobject 19, 3 + turnvobject 21, 1 + turnvobject 23, 1 + turnvobject 24, 1 + turnvobject 26, 2 + turnvobject 29, 2 + turnvobject 30, 2 + delay 10 return LinkContestRoom1_EventScript_1A5BAB:: @ 81A5BAB compare 0x4088, 5 - jumpeq LinkContestRoom1_EventScript_1A5C4C + goto_if_eq LinkContestRoom1_EventScript_1A5C4C call LinkContestRoom1_EventScript_1A5C12 checkflag 2 - jumpeq LinkContestRoom1_EventScript_1A5BF6 + goto_if_eq LinkContestRoom1_EventScript_1A5BF6 msgbox LinkContestRoom1_Text_1A6DC5, 3 - waittext + waitmessage call LinkContestRoom1_EventScript_1A5C7F call LinkContestRoom1_EventScript_1A5CE5 - playsfx 223 + playse 223 setvar 0x4001, 0 call LinkContestRoom1_EventScript_1A5A90 - pause 30 + delay 30 special sub_80C4CF8 compare 0x8004, 1 - jumpeq LinkContestRoom1_EventScript_1A5C46 + goto_if_eq LinkContestRoom1_EventScript_1A5C46 return LinkContestRoom1_EventScript_1A5BF6:: @ 81A5BF6 - inccounter GAME_STAT_WON_CONTEST + incrementgamestat GAME_STAT_WON_CONTEST msgbox LinkContestRoom1_Text_1A6DF1, 3 - pause 90 + delay 90 special sub_80C4CF8 compare 0x8004, 1 - jumpeq LinkContestRoom1_EventScript_1A5C46 + goto_if_eq LinkContestRoom1_EventScript_1A5C46 return LinkContestRoom1_EventScript_1A5C12:: @ 81A5C12 - specialval RESULT, sub_80C4440 + specialvar RESULT, sub_80C4440 compare RESULT, 1 - jumpeq LinkContestRoom1_EventScript_1A5C23 + goto_if_eq LinkContestRoom1_EventScript_1A5C23 return LinkContestRoom1_EventScript_1A5C23:: @ 81A5C23 special sub_80C47C0 compare 0x8005, 3 - jumpeq LinkContestRoom1_EventScript_1A5C32 + goto_if_eq LinkContestRoom1_EventScript_1A5C32 return LinkContestRoom1_EventScript_1A5C32:: @ 81A5C32 compare CONTEST_RANK, 3 - jumpeq LinkContestRoom1_EventScript_1A5C41 + goto_if_eq LinkContestRoom1_EventScript_1A5C41 setflag 2 return @@ -1050,12 +1050,12 @@ LinkContestRoom1_EventScript_1A5C46:: @ 81A5C46 return LinkContestRoom1_EventScript_1A5C4C:: @ 81A5C4C - pause 60 + delay 60 call LinkContestRoom1_EventScript_1A5C6A special sub_80C4CF8 compare 0x8004, 1 - jumpeq LinkContestRoom1_EventScript_1A5C64 - closebutton + goto_if_eq LinkContestRoom1_EventScript_1A5C64 + closemessage return LinkContestRoom1_EventScript_1A5C64:: @ 81A5C64 @@ -1065,12 +1065,12 @@ LinkContestRoom1_EventScript_1A5C64:: @ 81A5C64 LinkContestRoom1_EventScript_1A5C6A:: @ 81A5C6A special sub_80C496C special sub_80C47C0 - comparevars 0x8004, 0x8005 - jumpeq LinkContestRoom1_EventScript_1A5C7C + compare 0x8004, 0x8005 + goto_if_eq LinkContestRoom1_EventScript_1A5C7C return LinkContestRoom1_EventScript_1A5C7C:: @ 81A5C7C - inccounter GAME_STAT_WON_LINK_CONTEST + incrementgamestat GAME_STAT_WON_LINK_CONTEST return LinkContestRoom1_EventScript_1A5C7F:: @ 81A5C7F @@ -1083,48 +1083,48 @@ LinkContestRoom1_EventScript_1A5C7F:: @ 81A5C7F LinkContestRoom1_EventScript_1A5CB1:: @ 81A5CB1 lockall - move 0x4003, LinkContestRoom1_Movement_1A5DF6 - waitmove 0 + applymovement 0x4003, LinkContestRoom1_Movement_1A5DF6 + waitmovement 0 releaseall return LinkContestRoom1_EventScript_1A5CBE:: @ 81A5CBE lockall - move 0x4003, LinkContestRoom1_Movement_1A5DFA - waitmove 0 + applymovement 0x4003, LinkContestRoom1_Movement_1A5DFA + waitmovement 0 releaseall return LinkContestRoom1_EventScript_1A5CCB:: @ 81A5CCB lockall - move 0x4003, LinkContestRoom1_Movement_1A5DA5 - waitmove 0 + applymovement 0x4003, LinkContestRoom1_Movement_1A5DA5 + waitmovement 0 releaseall return LinkContestRoom1_EventScript_1A5CD8:: @ 81A5CD8 lockall - move 0x4003, LinkContestRoom1_Movement_1A5DA9 - waitmove 0 + applymovement 0x4003, LinkContestRoom1_Movement_1A5DA9 + waitmovement 0 releaseall return LinkContestRoom1_EventScript_1A5CE5:: @ 81A5CE5 special sub_80C47C0 compare 0x8005, 3 - jumpeq LinkContestRoom1_EventScript_1A5CFC + goto_if_eq LinkContestRoom1_EventScript_1A5CFC msgbox LinkContestRoom1_Text_1A6DF1, 3 return LinkContestRoom1_EventScript_1A5CFC:: @ 81A5CFC compare 0x4088, 2 - callif 1, LinkContestRoom1_EventScript_1A5C42 - inccounter GAME_STAT_WON_CONTEST - specialval RESULT, sub_80C4440 + call_if 1, LinkContestRoom1_EventScript_1A5C42 + incrementgamestat GAME_STAT_WON_CONTEST + specialvar RESULT, sub_80C4440 compare RESULT, 0 - jumpeq LinkContestRoom1_EventScript_1A5D5B + goto_if_eq LinkContestRoom1_EventScript_1A5D5B compare CONTEST_RANK, 3 - jumpeq LinkContestRoom1_EventScript_1A5D3B + goto_if_eq LinkContestRoom1_EventScript_1A5D3B msgbox LinkContestRoom1_Text_1A6DF1, 3 return @@ -1136,17 +1136,17 @@ LinkContestRoom1_EventScript_1A5D2D:: @ 81A5D2D LinkContestRoom1_EventScript_1A5D3B:: @ 81A5D3B giveitem ITEM_LUXURY_BALL compare RESULT, 0 - jumpeq LinkContestRoom1_EventScript_1A5D2D + goto_if_eq LinkContestRoom1_EventScript_1A5D2D msgbox LinkContestRoom1_Text_1A6DF1, 3 return LinkContestRoom1_EventScript_1A5D5B:: @ 81A5D5B special sub_80C44C0 - inccounter GAME_STAT_RECEIVED_RIBBONS + incrementgamestat GAME_STAT_RECEIVED_RIBBONS setflag 2107 lockall msgbox LinkContestRoom1_Text_1A6D6A, 4 - fanfare 370 + playfanfare 370 msgbox LinkContestRoom1_Text_1A6D96, 4 waitfanfare special sub_80C4858 diff --git a/data/scripts/day_care.inc b/data/scripts/day_care.inc index dcc4b44e7..f8151b86a 100644 --- a/data/scripts/day_care.inc +++ b/data/scripts/day_care.inc @@ -2,13 +2,13 @@ Route117_EventScript_1B222D:: @ 81B222D lock faceplayer special sp0B5_daycare - specialval RESULT, sp0B6_daycare + specialvar RESULT, sp0B6_daycare compare RESULT, 1 - jumpeq Route117_EventScript_1B2262 + goto_if_eq Route117_EventScript_1B2262 compare RESULT, 2 - jumpeq Route117_EventScript_1B22E7 + goto_if_eq Route117_EventScript_1B22E7 compare RESULT, 3 - jumpeq Route117_EventScript_1B22FE + goto_if_eq Route117_EventScript_1B22FE msgbox Route117_Text_1B25CB, 4 release end @@ -16,10 +16,10 @@ Route117_EventScript_1B222D:: @ 81B222D Route117_EventScript_1B2262:: @ 81B2262 msgbox Route117_Text_1B2659, 5 compare RESULT, 1 - jumpeq Route117_EventScript_1B2298 + goto_if_eq Route117_EventScript_1B2298 msgbox Route117_Text_1B28C4, 5 compare RESULT, 1 - jumpeq Route117_EventScript_1B2298 + goto_if_eq Route117_EventScript_1B2298 msgbox Route117_Text_1B2745, 4 clearflag 134 special sub_8041E7C @@ -27,18 +27,18 @@ Route117_EventScript_1B2262:: @ 81B2262 end Route117_EventScript_1B2298:: @ 81B2298 - specialval RESULT, CalculatePlayerPartyCount + specialvar RESULT, CalculatePlayerPartyCount compare RESULT, 6 - jumpif 5, Route117_EventScript_1B22B2 + goto_if 5, Route117_EventScript_1B22B2 msgbox Route117_Text_1B2766, 4 release end Route117_EventScript_1B22B2:: @ 81B22B2 message Route117_Text_1B27A2 - fanfare 367 + playfanfare 367 waitfanfare - waittext + waitmessage waitbutton msgbox Route117_Text_1B27CD, 4 special sp0B8_daycare @@ -47,9 +47,9 @@ Route117_EventScript_1B22B2:: @ 81B22B2 end Route117_EventScript_1B22CD:: @ 81B22CD - specialval RESULT, sub_8042B4C + specialvar RESULT, sub_8042B4C compare RESULT, 1 - callif 1, Route117_EventScript_1B22DE + call_if 1, Route117_EventScript_1B22DE return Route117_EventScript_1B22DE:: @ 81B22DE @@ -69,7 +69,7 @@ Route117_EventScript_1B22FE:: @ 81B22FE msgbox Route117_Text_1B2897, 4 special sp0B9_daycare_relationship_comment special ShowFieldMessageStringVar4 - waittext + waitmessage waitbutton setvar 0x8004, 0 call Route117_EventScript_1B22CD @@ -81,43 +81,43 @@ Route117_EventScript_1B22FE:: @ 81B22FE Route117_PokemonDayCare_EventScript_1B2327:: @ 81B2327 lock faceplayer - specialval RESULT, sp0B6_daycare + specialvar RESULT, sp0B6_daycare compare RESULT, 1 - jumpeq Route117_PokemonDayCare_EventScript_1B2407 + goto_if_eq Route117_PokemonDayCare_EventScript_1B2407 compare RESULT, 2 - jumpeq Route117_PokemonDayCare_EventScript_1B242B + goto_if_eq Route117_PokemonDayCare_EventScript_1B242B compare RESULT, 3 - jumpeq Route117_PokemonDayCare_EventScript_1B2558 + goto_if_eq Route117_PokemonDayCare_EventScript_1B2558 msgbox Route117_PokemonDayCare_Text_1B28F2, 5 compare RESULT, 1 - jumpeq Route117_PokemonDayCare_EventScript_1B236C + goto_if_eq Route117_PokemonDayCare_EventScript_1B236C msgbox Route117_PokemonDayCare_Text_1B2A14, 4 release end Route117_PokemonDayCare_EventScript_1B236C:: @ 81B236C - specialval RESULT, sub_8095B6C + specialvar RESULT, sub_8095B6C compare RESULT, 1 - jumpeq Route117_PokemonDayCare_EventScript_1B23F3 + goto_if_eq Route117_PokemonDayCare_EventScript_1B23F3 msgbox Route117_PokemonDayCare_Text_1B2947, 4 fadescreen 1 special ChooseSendDaycareMon waitstate compare 0x8004, 255 - jumpeq Route117_PokemonDayCare_EventScript_1B23D0 - specialval RESULT, sub_8095C10 + goto_if_eq Route117_PokemonDayCare_EventScript_1B23D0 + specialvar RESULT, sub_8095C10 compare RESULT, 0 - jumpeq Route117_PokemonDayCare_EventScript_1B23FD - specialval 0x8005, sub_8042328 - checksound - pokecry 0x8005, 0 + goto_if_eq Route117_PokemonDayCare_EventScript_1B23FD + specialvar 0x8005, sub_8042328 + waitse + playpokecry 0x8005, 0 msgbox Route117_PokemonDayCare_Text_1B296E, 4 waitpokecry special Daycare_SendPokemon_Special - inccounter GAME_STAT_USED_DAYCARE - specialval RESULT, sp0B6_daycare + incrementgamestat GAME_STAT_USED_DAYCARE + specialvar RESULT, sp0B6_daycare compare RESULT, 2 - jumpeq Route117_PokemonDayCare_EventScript_1B23DA + goto_if_eq Route117_PokemonDayCare_EventScript_1B23DA release end @@ -129,8 +129,8 @@ Route117_PokemonDayCare_EventScript_1B23D0:: @ 81B23D0 Route117_PokemonDayCare_EventScript_1B23DA:: @ 81B23DA msgbox Route117_PokemonDayCare_Text_1B29AD, 5 compare RESULT, 1 - jumpeq Route117_PokemonDayCare_EventScript_1B236C - jump Route117_PokemonDayCare_EventScript_1B23D0 + goto_if_eq Route117_PokemonDayCare_EventScript_1B236C + goto Route117_PokemonDayCare_EventScript_1B23D0 end Route117_PokemonDayCare_EventScript_1B23F3:: @ 81B23F3 @@ -153,9 +153,9 @@ Route117_PokemonDayCare_EventScript_1B2411:: @ 81B2411 return Route117_PokemonDayCare_EventScript_1B241A:: @ 81B241A - specialval RESULT, sub_80417B8 + specialvar RESULT, sub_80417B8 compare RESULT, 0 - callif 5, Route117_PokemonDayCare_EventScript_1B2411 + call_if 5, Route117_PokemonDayCare_EventScript_1B2411 return Route117_PokemonDayCare_EventScript_1B242B:: @ 81B242B @@ -164,67 +164,67 @@ Route117_PokemonDayCare_EventScript_1B242B:: @ 81B242B call Route117_PokemonDayCare_EventScript_1B241A msgbox Route117_PokemonDayCare_Text_1B29AD, 5 compare RESULT, 1 - jumpeq Route117_PokemonDayCare_EventScript_1B236C + goto_if_eq Route117_PokemonDayCare_EventScript_1B236C msgbox Route117_PokemonDayCare_Text_1B2BF6, 5 compare RESULT, 1 - jumpeq Route117_PokemonDayCare_EventScript_1B2469 - jump Route117_PokemonDayCare_EventScript_1B23D0 + goto_if_eq Route117_PokemonDayCare_EventScript_1B2469 + goto Route117_PokemonDayCare_EventScript_1B23D0 end Route117_PokemonDayCare_EventScript_1B2469:: @ 81B2469 - specialval RESULT, CalculatePlayerPartyCount + specialvar RESULT, CalculatePlayerPartyCount compare RESULT, 6 - jumpeq Route117_PokemonDayCare_EventScript_1B2539 - specialval RESULT, sp0B6_daycare + goto_if_eq Route117_PokemonDayCare_EventScript_1B2539 + specialvar RESULT, sp0B6_daycare setvar 0x8004, 0 compare RESULT, 2 - jumpeq Route117_PokemonDayCare_EventScript_1B24A8 + goto_if_eq Route117_PokemonDayCare_EventScript_1B24A8 special ShowDaycareLevelMenu waitstate copyvar 0x8004, RESULT compare RESULT, 2 - jumpeq Route117_PokemonDayCare_EventScript_1B23D0 - jump Route117_PokemonDayCare_EventScript_1B24A8 + goto_if_eq Route117_PokemonDayCare_EventScript_1B23D0 + goto Route117_PokemonDayCare_EventScript_1B24A8 end Route117_PokemonDayCare_EventScript_1B24A8:: @ 81B24A8 special sub_8041770 msgbox Route117_PokemonDayCare_Text_1B2B49, 5 compare RESULT, 1 - jumpeq Route117_PokemonDayCare_EventScript_1B24C4 - jump Route117_PokemonDayCare_EventScript_1B23D0 + goto_if_eq Route117_PokemonDayCare_EventScript_1B24C4 + goto Route117_PokemonDayCare_EventScript_1B23D0 end Route117_PokemonDayCare_EventScript_1B24C4:: @ 81B24C4 - specialval RESULT, sub_80B7CE8 + specialvar RESULT, sub_80B7CE8 compare RESULT, 1 - jumpeq Route117_PokemonDayCare_EventScript_1B24DE + goto_if_eq Route117_PokemonDayCare_EventScript_1B24DE msgbox Route117_PokemonDayCare_Text_1B2A30, 4 release end Route117_PokemonDayCare_EventScript_1B24DE:: @ 81B24DE - move 1, Route117_PokemonDayCare_Movement_1B2543 - waitmove 0 - specialval RESULT, sub_8041648 + applymovement 1, Route117_PokemonDayCare_Movement_1B2543 + waitmovement 0 + specialvar RESULT, sub_8041648 special sub_80B7D0C - playsfx 95 + playse 95 msgbox Route117_PokemonDayCare_Text_1B2B75, 4 - checksound - pokecry RESULT, 0 + waitse + playpokecry RESULT, 0 msgbox Route117_PokemonDayCare_Text_1B2B93, 4 waitpokecry - specialval RESULT, sp0B6_daycare + specialvar RESULT, sp0B6_daycare compare RESULT, 2 - jumpeq Route117_PokemonDayCare_EventScript_1B2520 - jump Route117_PokemonDayCare_EventScript_1B23D0 + goto_if_eq Route117_PokemonDayCare_EventScript_1B2520 + goto Route117_PokemonDayCare_EventScript_1B23D0 end Route117_PokemonDayCare_EventScript_1B2520:: @ 81B2520 msgbox Route117_PokemonDayCare_Text_1B2A4F, 5 compare RESULT, 1 - jumpeq Route117_PokemonDayCare_EventScript_1B2469 - jump Route117_PokemonDayCare_EventScript_1B23D0 + goto_if_eq Route117_PokemonDayCare_EventScript_1B2469 + goto Route117_PokemonDayCare_EventScript_1B23D0 end Route117_PokemonDayCare_EventScript_1B2539:: @ 81B2539 @@ -265,7 +265,7 @@ Route117_PokemonDayCare_EventScript_1B2558:: @ 81B2558 call Route117_PokemonDayCare_EventScript_1B241A msgbox Route117_PokemonDayCare_Text_1B2BF6, 5 compare RESULT, 1 - jumpeq Route117_PokemonDayCare_EventScript_1B2469 + goto_if_eq Route117_PokemonDayCare_EventScript_1B2469 msgbox Route117_PokemonDayCare_Text_1B2A76, 4 release end @@ -274,9 +274,9 @@ Route117_PokemonDayCare_EventScript_1B2558:: @ 81B2558 special ShowDaycareLevelMenu waitstate compare RESULT, 2 - jumpeq Route117_PokemonDayCare_EventScript_1B23D0 + goto_if_eq Route117_PokemonDayCare_EventScript_1B23D0 copyvar 0x8004, RESULT - specialval RESULT, sub_8041648 + specialvar RESULT, sub_8041648 msgbox Route117_PokemonDayCare_Text_1B2B75, 4 msgbox Route117_PokemonDayCare_Text_1B2A76, 4 release diff --git a/data/scripts/gabby_and_ty.inc b/data/scripts/gabby_and_ty.inc index 67a0920fa..214c61142 100644 --- a/data/scripts/gabby_and_ty.inc +++ b/data/scripts/gabby_and_ty.inc @@ -1,8 +1,8 @@ Route111_EventScript_1AE313:: @ 81AE313 Route118_EventScript_1AE313:: @ 81AE313 Route120_EventScript_1AE313:: @ 81AE313 - settrainerflag OPPONENT_GABBY_AND_TY_6 - specialval RESULT, GabbyAndTyGetBattleNum + cleartrainerflag OPPONENT_GABBY_AND_TY_6 + specialvar RESULT, GabbyAndTyGetBattleNum switch RESULT case 0, Route111_EventScript_1AE384 case 1, Route111_EventScript_1AE38A @@ -203,32 +203,32 @@ Route111_EventScript_1AE5A2:: @ 81AE5A2 special GabbyAndTyBeforeInterview special GabbyAndTySetScriptVarsToFieldObjectLocalIds compare FACING, 2 - callif 1, Route111_EventScript_1AE5E0 + call_if 1, Route111_EventScript_1AE5E0 compare FACING, 1 - callif 1, Route111_EventScript_1AE5EB + call_if 1, Route111_EventScript_1AE5EB compare FACING, 4 - callif 1, Route111_EventScript_1AE5FD + call_if 1, Route111_EventScript_1AE5FD checkflag 1 - jumpeq Route111_EventScript_1AE73A + goto_if_eq Route111_EventScript_1AE73A msgbox Route111_Text_1AC015, 5 - jump Route111_EventScript_1AE6F3 + goto Route111_EventScript_1AE6F3 end Route111_EventScript_1AE5E0:: @ 81AE5E0 - move 0x8004, Route111_Movement_1AE699 - waitmove 0 + applymovement 0x8004, Route111_Movement_1AE699 + waitmovement 0 return Route111_EventScript_1AE5EB:: @ 81AE5EB - move 0x8004, Route111_Movement_1AE69B - move 0x8005, Route111_Movement_1A0841 - waitmove 0 + applymovement 0x8004, Route111_Movement_1AE69B + applymovement 0x8005, Route111_Movement_1A0841 + waitmovement 0 return Route111_EventScript_1AE5FD:: @ 81AE5FD - move 0x8004, Route111_Movement_1AE69D - move 0x8005, Route111_Movement_1A083F - waitmove 0 + applymovement 0x8004, Route111_Movement_1AE69D + applymovement 0x8005, Route111_Movement_1A083F + waitmovement 0 return Route111_EventScript_1AE60F:: @ 81AE60F @@ -237,18 +237,18 @@ Route120_EventScript_1AE60F:: @ 81AE60F special GabbyAndTyBeforeInterview special GabbyAndTySetScriptVarsToFieldObjectLocalIds compare FACING, 2 - callif 1, Route111_EventScript_1AE5E0 + call_if 1, Route111_EventScript_1AE5E0 compare FACING, 1 - callif 1, Route111_EventScript_1AE5EB + call_if 1, Route111_EventScript_1AE5EB compare FACING, 4 - callif 1, Route111_EventScript_1AE5FD + call_if 1, Route111_EventScript_1AE5FD checkflag 1 - jumpeq Route111_EventScript_1AE73A - specialval RESULT, GabbyAndTyGetLastQuote + goto_if_eq Route111_EventScript_1AE73A + specialvar RESULT, GabbyAndTyGetLastQuote compare RESULT, 0 - jumpeq Route111_EventScript_1AE69F + goto_if_eq Route111_EventScript_1AE69F msgbox Route111_Text_1AC10A, 4 - specialval RESULT, sub_80BDD18 + specialvar RESULT, sub_80BDD18 switch RESULT case 0, Route111_EventScript_1AE6AD case 1, Route111_EventScript_1AE6BB @@ -271,44 +271,44 @@ Route111_Movement_1AE69D:: @ 81AE69D Route111_EventScript_1AE69F:: @ 81AE69F msgbox Route111_Text_1AC60B, 5 - jump Route111_EventScript_1AE6F3 + goto Route111_EventScript_1AE6F3 end Route111_EventScript_1AE6AD:: @ 81AE6AD msgbox Route111_Text_1AC3CF, 5 - jump Route111_EventScript_1AE6F3 + goto Route111_EventScript_1AE6F3 end Route111_EventScript_1AE6BB:: @ 81AE6BB msgbox Route111_Text_1AC18D, 5 - jump Route111_EventScript_1AE6F3 + goto Route111_EventScript_1AE6F3 end Route111_EventScript_1AE6C9:: @ 81AE6C9 msgbox Route111_Text_1AC219, 5 - jump Route111_EventScript_1AE6F3 + goto Route111_EventScript_1AE6F3 end Route111_EventScript_1AE6D7:: @ 81AE6D7 msgbox Route111_Text_1AC2D6, 5 - jump Route111_EventScript_1AE6F3 + goto Route111_EventScript_1AE6F3 end Route111_EventScript_1AE6E5:: @ 81AE6E5 msgbox Route111_Text_1AC355, 5 - jump Route111_EventScript_1AE6F3 + goto Route111_EventScript_1AE6F3 end Route111_EventScript_1AE6F3:: @ 81AE6F3 compare RESULT, 0 - jumpeq Route111_EventScript_1AE72D + goto_if_eq Route111_EventScript_1AE72D msgbox Route111_Text_1AC40F, 4 setvar 0x8004, 10 call Route111_EventScript_1A00F3 lock faceplayer compare RESULT, 0 - jumpeq Route111_EventScript_1AE72D + goto_if_eq Route111_EventScript_1AE72D msgbox Route111_Text_1AC487, 4 special sub_80BDC14 setflag 1 diff --git a/data/scripts/magma_chimney.inc b/data/scripts/magma_chimney.inc index a2f4f67b7..f13b319f4 100644 --- a/data/scripts/magma_chimney.inc +++ b/data/scripts/magma_chimney.inc @@ -2,12 +2,12 @@ MtChimney_EventScript_1B2C95:: @ 81B2C95 lock faceplayer checkflag 219 - callif 0, MtChimney_EventScript_1B2CB9 + call_if 0, MtChimney_EventScript_1B2CB9 checkflag 219 - callif 1, MtChimney_EventScript_1B2CC2 - closebutton - move 1, MtChimney_Movement_1A083D - waitmove 0 + call_if 1, MtChimney_EventScript_1B2CC2 + closemessage + applymovement 1, MtChimney_Movement_1A083D + waitmovement 0 setflag 219 release end @@ -35,13 +35,13 @@ MtChimney_EventScript_1B2CCB:: @ 81B2CCB .else msgbox MtChimney_Text_1B37BB, 4 .endif - move 2, MtChimney_Movement_1A0839 - waitmove 0 - playsfx 21 - move 2, MtChimney_Movement_1A0833 - waitmove 0 - move 2, MtChimney_Movement_1A0835 - waitmove 0 + applymovement 2, MtChimney_Movement_1A0839 + waitmovement 0 + playse 21 + applymovement 2, MtChimney_Movement_1A0833 + waitmovement 0 + applymovement 2, MtChimney_Movement_1A0835 + waitmovement 0 .ifdef SAPPHIRE msgbox MtChimney_Text_1B2ED9, 4 .else @@ -57,33 +57,33 @@ MtChimney_EventScript_1B2CCB:: @ 81B2CCB .else msgbox MtChimney_Text_1B3A90, 4 .endif - closebutton - pause 30 + closemessage + delay 30 fadescreen 1 - disappear 2 - disappear 3 - disappear 22 + removeobject 2 + removeobject 3 + removeobject 22 setflag 926 fadescreen 0 - movespriteperm 1, 10, 12 - reappear 1 + setobjectxyperm 1, 10, 12 + addobject 1 compare FACING, 4 - callif 1, MtChimney_EventScript_1B2D7D + call_if 1, MtChimney_EventScript_1B2D7D compare FACING, 2 - callif 1, MtChimney_EventScript_1B2D88 - move 255, MtChimney_Movement_1A083F - waitmove 0 + call_if 1, MtChimney_EventScript_1B2D88 + applymovement 255, MtChimney_Movement_1A083F + waitmovement 0 .ifdef SAPPHIRE msgbox MtChimney_Text_1B3608, 4 .else msgbox MtChimney_Text_1B3FFE, 4 .endif - closebutton + closemessage compare FACING, 4 - callif 1, MtChimney_EventScript_1B2D93 + call_if 1, MtChimney_EventScript_1B2D93 compare FACING, 2 - callif 1, MtChimney_EventScript_1B2D9E - disappear 1 + call_if 1, MtChimney_EventScript_1B2D9E + removeobject 1 setflag 927 setflag 139 clearflag 928 @@ -92,21 +92,21 @@ MtChimney_EventScript_1B2CCB:: @ 81B2CCB end MtChimney_EventScript_1B2D7D:: @ 81B2D7D - move 1, MtChimney_Movement_15D025 - waitmove 0 + applymovement 1, MtChimney_Movement_15D025 + waitmovement 0 return MtChimney_EventScript_1B2D88:: @ 81B2D88 - move 1, MtChimney_Movement_15D036 - waitmove 0 + applymovement 1, MtChimney_Movement_15D036 + waitmovement 0 return MtChimney_EventScript_1B2D93:: @ 81B2D93 - move 1, MtChimney_Movement_15D02D - waitmove 0 + applymovement 1, MtChimney_Movement_15D02D + waitmovement 0 return MtChimney_EventScript_1B2D9E:: @ 81B2D9E - move 1, MtChimney_Movement_15D03E - waitmove 0 + applymovement 1, MtChimney_Movement_15D03E + waitmovement 0 return diff --git a/data/scripts/maps/AbandonedShip_CaptainsOffice.inc b/data/scripts/maps/AbandonedShip_CaptainsOffice.inc index cf525003e..eb912028a 100644 --- a/data/scripts/maps/AbandonedShip_CaptainsOffice.inc +++ b/data/scripts/maps/AbandonedShip_CaptainsOffice.inc @@ -5,12 +5,12 @@ AbandonedShip_CaptainsOffice_EventScript_15EAF5:: @ 815EAF5 lock faceplayer checkflag 294 - jumpeq AbandonedShip_CaptainsOffice_EventScript_15EB2D + goto_if_eq AbandonedShip_CaptainsOffice_EventScript_15EB2D checkitem ITEM_SCANNER, 1 compare RESULT, 1 - jumpeq AbandonedShip_CaptainsOffice_EventScript_15EB23 + goto_if_eq AbandonedShip_CaptainsOffice_EventScript_15EB23 checkflag 1078 - jumpeq AbandonedShip_CaptainsOffice_EventScript_15EB2D + goto_if_eq AbandonedShip_CaptainsOffice_EventScript_15EB2D msgbox AbandonedShip_CaptainsOffice_Text_198C85, 4 release end diff --git a/data/scripts/maps/AbandonedShip_Corridors_B1F.inc b/data/scripts/maps/AbandonedShip_Corridors_B1F.inc index b0ae966ad..f3c3c0aa0 100644 --- a/data/scripts/maps/AbandonedShip_Corridors_B1F.inc +++ b/data/scripts/maps/AbandonedShip_Corridors_B1F.inc @@ -4,14 +4,14 @@ AbandonedShip_Corridors_B1F_MapScripts:: @ 815E98F .byte 0 AbandonedShip_Corridors_B1F_MapScript1_15E99A:: @ 815E99A - warp4 AbandonedShip_Underwater1, 255, 5, 4 + setdivewarp AbandonedShip_Underwater1, 255, 5, 4 end AbandonedShip_Corridors_B1F_MapScript1_15E9A3:: @ 815E9A3 checkflag 239 - callif 0, AbandonedShip_Corridors_B1F_EventScript_15E9B6 + call_if 0, AbandonedShip_Corridors_B1F_EventScript_15E9B6 checkflag 239 - callif 1, AbandonedShip_Corridors_B1F_EventScript_15E9C0 + call_if 1, AbandonedShip_Corridors_B1F_EventScript_15E9C0 end AbandonedShip_Corridors_B1F_EventScript_15E9B6:: @ 815E9B6 @@ -29,12 +29,12 @@ AbandonedShip_Corridors_B1F_EventScript_15E9CA:: @ 815E9CA AbandonedShip_Corridors_B1F_EventScript_15E9D3:: @ 815E9D3 lockall checkflag 239 - jumpeq AbandonedShip_Corridors_B1F_EventScript_15EA14 + goto_if_eq AbandonedShip_Corridors_B1F_EventScript_15EA14 checkitem ITEM_STORAGE_KEY, 1 compare RESULT, 0 - jumpeq AbandonedShip_Corridors_B1F_EventScript_15EA0A + goto_if_eq AbandonedShip_Corridors_B1F_EventScript_15EA0A msgbox AbandonedShip_Corridors_B1F_Text_198692, 4 - playsfx 21 + playse 21 removeitem ITEM_STORAGE_KEY, 1 setflag 239 call AbandonedShip_Corridors_B1F_EventScript_15E9C0 diff --git a/data/scripts/maps/AbandonedShip_HiddenFloorCorridors.inc b/data/scripts/maps/AbandonedShip_HiddenFloorCorridors.inc index 8cb2aed22..29a89a620 100644 --- a/data/scripts/maps/AbandonedShip_HiddenFloorCorridors.inc +++ b/data/scripts/maps/AbandonedShip_HiddenFloorCorridors.inc @@ -4,26 +4,26 @@ AbandonedShip_HiddenFloorCorridors_MapScripts:: @ 815EB46 .byte 0 AbandonedShip_HiddenFloorCorridors_MapScript1_15EB51:: @ 815EB51 - warp4 AbandonedShip_Underwater1, 255, 5, 4 + setdivewarp AbandonedShip_Underwater1, 255, 5, 4 end AbandonedShip_HiddenFloorCorridors_MapScript1_15EB5A:: @ 815EB5A checkflag 240 - callif 0, AbandonedShip_HiddenFloorCorridors_EventScript_15EBCB + call_if 0, AbandonedShip_HiddenFloorCorridors_EventScript_15EBCB checkflag 241 - callif 0, AbandonedShip_HiddenFloorCorridors_EventScript_15EBD5 + call_if 0, AbandonedShip_HiddenFloorCorridors_EventScript_15EBD5 checkflag 242 - callif 0, AbandonedShip_HiddenFloorCorridors_EventScript_15EBDF + call_if 0, AbandonedShip_HiddenFloorCorridors_EventScript_15EBDF checkflag 243 - callif 0, AbandonedShip_HiddenFloorCorridors_EventScript_15EBE9 + call_if 0, AbandonedShip_HiddenFloorCorridors_EventScript_15EBE9 checkflag 240 - callif 1, AbandonedShip_HiddenFloorCorridors_EventScript_15EBA3 + call_if 1, AbandonedShip_HiddenFloorCorridors_EventScript_15EBA3 checkflag 241 - callif 1, AbandonedShip_HiddenFloorCorridors_EventScript_15EBAD + call_if 1, AbandonedShip_HiddenFloorCorridors_EventScript_15EBAD checkflag 242 - callif 1, AbandonedShip_HiddenFloorCorridors_EventScript_15EBB7 + call_if 1, AbandonedShip_HiddenFloorCorridors_EventScript_15EBB7 checkflag 243 - callif 1, AbandonedShip_HiddenFloorCorridors_EventScript_15EBC1 + call_if 1, AbandonedShip_HiddenFloorCorridors_EventScript_15EBC1 end AbandonedShip_HiddenFloorCorridors_EventScript_15EBA3:: @ 815EBA3 @@ -61,12 +61,12 @@ AbandonedShip_HiddenFloorCorridors_EventScript_15EBE9:: @ 815EBE9 AbandonedShip_HiddenFloorCorridors_EventScript_15EBF3:: @ 815EBF3 lockall checkflag 240 - jumpeq AbandonedShip_HiddenFloorCorridors_EventScript_15ECF7 + goto_if_eq AbandonedShip_HiddenFloorCorridors_EventScript_15ECF7 checkitem ITEM_ROOM_1_KEY, 1 compare RESULT, 0 - jumpeq AbandonedShip_HiddenFloorCorridors_EventScript_15ECCF + goto_if_eq AbandonedShip_HiddenFloorCorridors_EventScript_15ECCF msgbox AbandonedShip_HiddenFloorCorridors_Text_198E90, 4 - playsfx 21 + playse 21 removeitem ITEM_ROOM_1_KEY, 1 setflag 240 call AbandonedShip_HiddenFloorCorridors_EventScript_15EBA3 @@ -77,12 +77,12 @@ AbandonedShip_HiddenFloorCorridors_EventScript_15EBF3:: @ 815EBF3 AbandonedShip_HiddenFloorCorridors_EventScript_15EC2A:: @ 815EC2A lockall checkflag 241 - jumpeq AbandonedShip_HiddenFloorCorridors_EventScript_15ECF7 + goto_if_eq AbandonedShip_HiddenFloorCorridors_EventScript_15ECF7 checkitem ITEM_ROOM_2_KEY, 1 compare RESULT, 0 - jumpeq AbandonedShip_HiddenFloorCorridors_EventScript_15ECD9 + goto_if_eq AbandonedShip_HiddenFloorCorridors_EventScript_15ECD9 msgbox AbandonedShip_HiddenFloorCorridors_Text_198E90, 4 - playsfx 21 + playse 21 removeitem ITEM_ROOM_2_KEY, 1 setflag 241 call AbandonedShip_HiddenFloorCorridors_EventScript_15EBAD @@ -93,12 +93,12 @@ AbandonedShip_HiddenFloorCorridors_EventScript_15EC2A:: @ 815EC2A AbandonedShip_HiddenFloorCorridors_EventScript_15EC61:: @ 815EC61 lockall checkflag 242 - jumpeq AbandonedShip_HiddenFloorCorridors_EventScript_15ECF7 + goto_if_eq AbandonedShip_HiddenFloorCorridors_EventScript_15ECF7 checkitem ITEM_ROOM_4_KEY, 1 compare RESULT, 0 - jumpeq AbandonedShip_HiddenFloorCorridors_EventScript_15ECE3 + goto_if_eq AbandonedShip_HiddenFloorCorridors_EventScript_15ECE3 msgbox AbandonedShip_HiddenFloorCorridors_Text_198E90, 4 - playsfx 21 + playse 21 removeitem ITEM_ROOM_4_KEY, 1 setflag 242 call AbandonedShip_HiddenFloorCorridors_EventScript_15EBB7 @@ -109,12 +109,12 @@ AbandonedShip_HiddenFloorCorridors_EventScript_15EC61:: @ 815EC61 AbandonedShip_HiddenFloorCorridors_EventScript_15EC98:: @ 815EC98 lockall checkflag 243 - jumpeq AbandonedShip_HiddenFloorCorridors_EventScript_15ECF7 + goto_if_eq AbandonedShip_HiddenFloorCorridors_EventScript_15ECF7 checkitem ITEM_ROOM_6_KEY, 1 compare RESULT, 0 - jumpeq AbandonedShip_HiddenFloorCorridors_EventScript_15ECED + goto_if_eq AbandonedShip_HiddenFloorCorridors_EventScript_15ECED msgbox AbandonedShip_HiddenFloorCorridors_Text_198E90, 4 - playsfx 21 + playse 21 removeitem ITEM_ROOM_6_KEY, 1 setflag 243 call AbandonedShip_HiddenFloorCorridors_EventScript_15EBC1 diff --git a/data/scripts/maps/AbandonedShip_HiddenFloorRooms.inc b/data/scripts/maps/AbandonedShip_HiddenFloorRooms.inc index 5c4c050a0..eb5c1dccd 100644 --- a/data/scripts/maps/AbandonedShip_HiddenFloorRooms.inc +++ b/data/scripts/maps/AbandonedShip_HiddenFloorRooms.inc @@ -11,11 +11,11 @@ AbandonedShip_HiddenFloorRooms_EventScript_15ED11:: @ 815ED11 getplayerxy 0x4002, 0x4003 setvar 0x4004, 1 compare 0x4002, 21 - callif 1, AbandonedShip_HiddenFloorRooms_EventScript_15ED89 + call_if 1, AbandonedShip_HiddenFloorRooms_EventScript_15ED89 compare 0x4002, 36 - callif 1, AbandonedShip_HiddenFloorRooms_EventScript_15ED8F + call_if 1, AbandonedShip_HiddenFloorRooms_EventScript_15ED8F compare 0x4003, 2 - callif 1, AbandonedShip_HiddenFloorRooms_EventScript_15ED95 + call_if 1, AbandonedShip_HiddenFloorRooms_EventScript_15ED95 switch 0x4004 case 1, AbandonedShip_HiddenFloorRooms_EventScript_15ED9B case 2, AbandonedShip_HiddenFloorRooms_EventScript_15EDC4 @@ -38,102 +38,102 @@ AbandonedShip_HiddenFloorRooms_EventScript_15ED95:: @ 815ED95 return AbandonedShip_HiddenFloorRooms_EventScript_15ED9B:: @ 815ED9B - pause 20 - setanimation 0, 10 - setanimation 1, 10 - setanimation 2, 0 - doanimation 54 - specialval RESULT, sub_810F4D4 + delay 20 + setfieldeffect 0, 10 + setfieldeffect 1, 10 + setfieldeffect 2, 0 + dofieldeffect 54 + specialvar RESULT, sub_810F4D4 compare RESULT, 0 - callif 1, AbandonedShip_HiddenFloorRooms_EventScript_15EE8B - checkanimation 54 - pause 10 + call_if 1, AbandonedShip_HiddenFloorRooms_EventScript_15EE8B + waitfieldeffect 54 + delay 10 end AbandonedShip_HiddenFloorRooms_EventScript_15EDC4:: @ 815EDC4 end AbandonedShip_HiddenFloorRooms_EventScript_15EDC5:: @ 815EDC5 - specialval RESULT, sub_810F488 + specialvar RESULT, sub_810F488 compare RESULT, 1 - jumpeq AbandonedShip_HiddenFloorRooms_EventScript_15EDEA - pause 20 + goto_if_eq AbandonedShip_HiddenFloorRooms_EventScript_15EDEA + delay 20 compare RESULT, 0 - callif 1, AbandonedShip_HiddenFloorRooms_EventScript_15EE6B - checkanimation 54 - pause 10 + call_if 1, AbandonedShip_HiddenFloorRooms_EventScript_15EE6B + waitfieldeffect 54 + delay 10 end AbandonedShip_HiddenFloorRooms_EventScript_15EDEA:: @ 815EDEA end AbandonedShip_HiddenFloorRooms_EventScript_15EDEB:: @ 815EDEB - pause 20 - setanimation 0, 8 - setanimation 1, 5 - setanimation 2, 0 - doanimation 54 - setanimation 0, 11 - setanimation 1, 3 - setanimation 2, 0 - doanimation 54 - specialval RESULT, sub_810F4FC + delay 20 + setfieldeffect 0, 8 + setfieldeffect 1, 5 + setfieldeffect 2, 0 + dofieldeffect 54 + setfieldeffect 0, 11 + setfieldeffect 1, 3 + setfieldeffect 2, 0 + dofieldeffect 54 + specialvar RESULT, sub_810F4FC compare RESULT, 0 - callif 1, AbandonedShip_HiddenFloorRooms_EventScript_15EE9B - checkanimation 54 - pause 10 + call_if 1, AbandonedShip_HiddenFloorRooms_EventScript_15EE9B + waitfieldeffect 54 + delay 10 end AbandonedShip_HiddenFloorRooms_EventScript_15EE23:: @ 815EE23 - pause 20 - setanimation 0, 16 - setanimation 1, 3 - setanimation 2, 0 - doanimation 54 - setanimation 0, 25 - setanimation 1, 2 - setanimation 2, 0 - doanimation 54 - setanimation 0, 24 - setanimation 1, 6 - setanimation 2, 0 - doanimation 54 - specialval RESULT, sub_810F4B0 + delay 20 + setfieldeffect 0, 16 + setfieldeffect 1, 3 + setfieldeffect 2, 0 + dofieldeffect 54 + setfieldeffect 0, 25 + setfieldeffect 1, 2 + setfieldeffect 2, 0 + dofieldeffect 54 + setfieldeffect 0, 24 + setfieldeffect 1, 6 + setfieldeffect 2, 0 + dofieldeffect 54 + specialvar RESULT, sub_810F4B0 compare RESULT, 0 - callif 1, AbandonedShip_HiddenFloorRooms_EventScript_15EE7B - checkanimation 54 - pause 10 + call_if 1, AbandonedShip_HiddenFloorRooms_EventScript_15EE7B + waitfieldeffect 54 + delay 10 end AbandonedShip_HiddenFloorRooms_EventScript_15EE6A:: @ 815EE6A end AbandonedShip_HiddenFloorRooms_EventScript_15EE6B:: @ 815EE6B - setanimation 0, 42 - setanimation 1, 10 - setanimation 2, 0 - doanimation 54 + setfieldeffect 0, 42 + setfieldeffect 1, 10 + setfieldeffect 2, 0 + dofieldeffect 54 return AbandonedShip_HiddenFloorRooms_EventScript_15EE7B:: @ 815EE7B - setanimation 0, 20 - setanimation 1, 5 - setanimation 2, 0 - doanimation 54 + setfieldeffect 0, 20 + setfieldeffect 1, 5 + setfieldeffect 2, 0 + dofieldeffect 54 return AbandonedShip_HiddenFloorRooms_EventScript_15EE8B:: @ 815EE8B - setanimation 0, 1 - setanimation 1, 12 - setanimation 2, 0 - doanimation 54 + setfieldeffect 0, 1 + setfieldeffect 1, 12 + setfieldeffect 2, 0 + dofieldeffect 54 return AbandonedShip_HiddenFloorRooms_EventScript_15EE9B:: @ 815EE9B - setanimation 0, 1 - setanimation 1, 2 - setanimation 2, 0 - doanimation 54 + setfieldeffect 0, 1 + setfieldeffect 1, 2 + setfieldeffect 2, 0 + dofieldeffect 54 return AbandonedShip_HiddenFloorRooms_EventScript_15EEAB:: @ 815EEAB diff --git a/data/scripts/maps/AbandonedShip_Rooms2_1F.inc b/data/scripts/maps/AbandonedShip_Rooms2_1F.inc index a6ccdc43c..5e8ab1062 100644 --- a/data/scripts/maps/AbandonedShip_Rooms2_1F.inc +++ b/data/scripts/maps/AbandonedShip_Rooms2_1F.inc @@ -3,9 +3,9 @@ AbandonedShip_Rooms2_1F_MapScripts:: @ 815EA67 AbandonedShip_Rooms2_1F_EventScript_15EA68:: @ 815EA68 trainerbattle 4, OPPONENT_LOIS_AND_HAL_1, 0, AbandonedShip_Rooms2_1F_Text_1987C1, AbandonedShip_Rooms2_1F_Text_1987FE, AbandonedShip_Rooms2_1F_Text_19887F - specialval RESULT, sub_8082C68 + specialvar RESULT, sub_8082C68 compare RESULT, 1 - jumpeq AbandonedShip_Rooms2_1F_EventScript_15EA93 + goto_if_eq AbandonedShip_Rooms2_1F_EventScript_15EA93 msgbox AbandonedShip_Rooms2_1F_Text_198835, 6 end @@ -16,9 +16,9 @@ AbandonedShip_Rooms2_1F_EventScript_15EA93:: @ 815EA93 AbandonedShip_Rooms2_1F_EventScript_15EAAE:: @ 815EAAE trainerbattle 4, OPPONENT_LOIS_AND_HAL_1, 0, AbandonedShip_Rooms2_1F_Text_1988CC, AbandonedShip_Rooms2_1F_Text_198916, AbandonedShip_Rooms2_1F_Text_19899A - specialval RESULT, sub_8082C68 + specialvar RESULT, sub_8082C68 compare RESULT, 1 - jumpeq AbandonedShip_Rooms2_1F_EventScript_15EAD9 + goto_if_eq AbandonedShip_Rooms2_1F_EventScript_15EAD9 msgbox AbandonedShip_Rooms2_1F_Text_198934, 6 end diff --git a/data/scripts/maps/AbandonedShip_Rooms_B1F.inc b/data/scripts/maps/AbandonedShip_Rooms_B1F.inc index 44b8c5f20..218f1a2ca 100644 --- a/data/scripts/maps/AbandonedShip_Rooms_B1F.inc +++ b/data/scripts/maps/AbandonedShip_Rooms_B1F.inc @@ -3,7 +3,7 @@ AbandonedShip_Rooms_B1F_MapScripts:: @ 815EA35 .byte 0 AbandonedShip_Rooms_B1F_MapScript1_15EA3B:: @ 815EA3B - warp4 AbandonedShip_Underwater2, 255, 17, 4 + setdivewarp AbandonedShip_Underwater2, 255, 17, 4 end AbandonedShip_Rooms_B1F_EventScript_15EA44:: @ 815EA44 diff --git a/data/scripts/maps/AbandonedShip_Underwater1.inc b/data/scripts/maps/AbandonedShip_Underwater1.inc index 71d903682..afac470ea 100644 --- a/data/scripts/maps/AbandonedShip_Underwater1.inc +++ b/data/scripts/maps/AbandonedShip_Underwater1.inc @@ -3,5 +3,5 @@ AbandonedShip_Underwater1_MapScripts:: @ 815EA57 .byte 0 AbandonedShip_Underwater1_MapScript1_15EA5D:: @ 815EA5D - warp4 AbandonedShip_HiddenFloorCorridors, 255, 0, 10 + setdivewarp AbandonedShip_HiddenFloorCorridors, 255, 0, 10 end diff --git a/data/scripts/maps/AbandonedShip_Underwater2.inc b/data/scripts/maps/AbandonedShip_Underwater2.inc index f7b434c07..b8facc4ec 100644 --- a/data/scripts/maps/AbandonedShip_Underwater2.inc +++ b/data/scripts/maps/AbandonedShip_Underwater2.inc @@ -3,5 +3,5 @@ AbandonedShip_Underwater2_MapScripts:: @ 815EB37 .byte 0 AbandonedShip_Underwater2_MapScript1_15EB3D:: @ 815EB3D - warp4 AbandonedShip_Rooms_B1F, 255, 13, 7 + setdivewarp AbandonedShip_Rooms_B1F, 255, 13, 7 end diff --git a/data/scripts/maps/AncientTomb.inc b/data/scripts/maps/AncientTomb.inc index bfc5b6a79..188691e73 100644 --- a/data/scripts/maps/AncientTomb.inc +++ b/data/scripts/maps/AncientTomb.inc @@ -6,11 +6,11 @@ AncientTomb_MapScripts:: @ 815EFBE AncientTomb_MapScript1_15EFCE:: @ 815EFCE checkflag 2145 - callif 1, AncientTomb_EventScript_15EFD8 + call_if 1, AncientTomb_EventScript_15EFD8 end AncientTomb_EventScript_15EFD8:: @ 815EFD8 - disappear LAST_TALKED + removeobject LAST_TALKED return AncientTomb_MapScript1_15EFDC:: @ 815EFDC @@ -19,7 +19,7 @@ AncientTomb_MapScript1_15EFDC:: @ 815EFDC AncientTomb_MapScript1_15EFE0:: @ 815EFE0 checkflag 2130 - callif 0, AncientTomb_EventScript_15EFEA + call_if 0, AncientTomb_EventScript_15EFEA end AncientTomb_EventScript_15EFEA:: @ 815EFEA @@ -34,10 +34,10 @@ AncientTomb_EventScript_15EFEA:: @ 815EFEA AncientTomb_EventScript_15F021:: @ 815F021 lockall checkflag 2130 - jumpeq AncientTomb_EventScript_15F038 - braillemsg AncientTomb_Braille_1C552E + goto_if_eq AncientTomb_EventScript_15F038 + braillemessage AncientTomb_Braille_1C552E waitbutton - hidebox 0, 0, 29, 19 + erasebox 0, 0, 29, 19 releaseall end @@ -48,18 +48,18 @@ AncientTomb_EventScript_15F038:: @ 815F038 AncientTomb_EventScript_15F042:: @ 815F042 lockall - braillemsg AncientTomb_Braille_1C552E + braillemessage AncientTomb_Braille_1C552E waitbutton - hidebox 0, 0, 29, 19 + erasebox 0, 0, 29, 19 releaseall end AncientTomb_EventScript_15F050:: @ 815F050 lock faceplayer - checksound - pokecry SPECIES_REGISTEEL, 2 - pause 40 + waitse + playpokecry SPECIES_REGISTEEL, 2 + delay 40 waitpokecry setwildbattle SPECIES_REGISTEEL, 40, ITEM_NONE setflag 937 diff --git a/data/scripts/maps/AquaHideout_1F.inc b/data/scripts/maps/AquaHideout_1F.inc index cc1ad33b1..2eb2ae7e9 100644 --- a/data/scripts/maps/AquaHideout_1F.inc +++ b/data/scripts/maps/AquaHideout_1F.inc @@ -11,7 +11,7 @@ MagmaHideout_1F_EventScript_15D7CE:: @ 815D7CE lock faceplayer checkflag 111 - jumpeq AquaHideout_1F_EventScript_15D7E3 + goto_if_eq AquaHideout_1F_EventScript_15D7E3 msgbox AquaHideout_1F_Text_196AFD, 4 release end @@ -26,7 +26,7 @@ MagmaHideout_1F_EventScript_15D7ED:: @ 815D7ED lock faceplayer checkflag 111 - jumpeq AquaHideout_1F_EventScript_15D802 + goto_if_eq AquaHideout_1F_EventScript_15D802 msgbox AquaHideout_1F_Text_196C83, 4 release end diff --git a/data/scripts/maps/AquaHideout_B1F.inc b/data/scripts/maps/AquaHideout_B1F.inc index 969d590e3..0001d7574 100644 --- a/data/scripts/maps/AquaHideout_B1F.inc +++ b/data/scripts/maps/AquaHideout_B1F.inc @@ -5,11 +5,11 @@ AquaHideout_B1F_MapScripts:: @ 815D831 AquaHideout_B1F_MapScript1_15D83C:: @ 815D83C checkflag 2145 - callif 1, AquaHideout_B1F_EventScript_15D846 + call_if 1, AquaHideout_B1F_EventScript_15D846 end AquaHideout_B1F_EventScript_15D846:: @ 815D846 - disappear LAST_TALKED + removeobject LAST_TALKED return AquaHideout_B1F_MapScript1_15D84A:: @ 815D84A diff --git a/data/scripts/maps/AquaHideout_B2F.inc b/data/scripts/maps/AquaHideout_B2F.inc index 845b755b7..230d0e2db 100644 --- a/data/scripts/maps/AquaHideout_B2F.inc +++ b/data/scripts/maps/AquaHideout_B2F.inc @@ -10,15 +10,15 @@ AquaHideout_B2F_EventScript_15D8BD:: @ 815D8BD MagmaHideout_B2F_EventScript_15D8BD:: @ 815D8BD lockall setvar 0x8008, 1 - playsfx 21 - move 0x8008, AquaHideout_B2F_Movement_1A0833 - waitmove 0 + playse 21 + applymovement 0x8008, AquaHideout_B2F_Movement_1A0833 + waitmovement 0 .ifdef SAPPHIRE - move 0x8008, AquaHideout_B2F_Movement_1A0839 + applymovement 0x8008, AquaHideout_B2F_Movement_1A0839 .else - move 0x8008, AquaHideout_B2F_Movement_1A0841 + applymovement 0x8008, AquaHideout_B2F_Movement_1A0841 .endif - waitmove 0 + waitmovement 0 setvar 0x4001, 1 releaseall end @@ -38,31 +38,31 @@ AquaHideout_B2F_EventScript_15D8FD:: @ 815D8FD setvar 0x8009, 3 .endif .ifdef SAPPHIRE - move 0x8008, Movement_1A083F + applymovement 0x8008, Movement_1A083F .else - move 0x8008, AquaHideout_B2F_Movement_1A0843 + applymovement 0x8008, AquaHideout_B2F_Movement_1A0843 .endif - waitmove 0 - pause 20 - move 0x8008, AquaHideout_B2F_Movement_1A0839 - waitmove 0 + waitmovement 0 + delay 20 + applymovement 0x8008, AquaHideout_B2F_Movement_1A0839 + waitmovement 0 msgbox AquaHideout_B2F_Text_197162, 4 - closebutton + closemessage .ifdef SAPPHIRE - move 0x8008, Movement_1A083F + applymovement 0x8008, Movement_1A083F .else - move 0x8008, AquaHideout_B2F_Movement_1A0843 + applymovement 0x8008, AquaHideout_B2F_Movement_1A0843 .endif .ifdef SAPPHIRE - move 0x8009, AquaHideout_B2F_Movement_15D958 + applymovement 0x8009, AquaHideout_B2F_Movement_15D958 .else - move 0x8009, AquaHideout_B2F_Movement_15D95D + applymovement 0x8009, AquaHideout_B2F_Movement_15D95D .endif - waitmove 0 - disappear 0x8009 - pause 20 - move 0x8008, AquaHideout_B2F_Movement_1A0839 - waitmove 0 + waitmovement 0 + removeobject 0x8009 + delay 20 + applymovement 0x8008, AquaHideout_B2F_Movement_1A0839 + waitmovement 0 msgbox AquaHideout_B2F_Text_1971AE, 4 setflag 112 setflag 852 diff --git a/data/scripts/maps/BattleTower_BattleRoom.inc b/data/scripts/maps/BattleTower_BattleRoom.inc index 2f0fb97b9..3f1aad4a0 100644 --- a/data/scripts/maps/BattleTower_BattleRoom.inc +++ b/data/scripts/maps/BattleTower_BattleRoom.inc @@ -8,18 +8,18 @@ BattleTower_BattleRoom_MapScript2_1608E1:: @ 81608E1 BattleTower_BattleRoom_EventScript_1608EB:: @ 81608EB setvar 0x4000, 1 - move 255, BattleTower_BattleRoom_Movement_160AB7 - waitmove 0 + applymovement 255, BattleTower_BattleRoom_Movement_160AB7 + waitmovement 0 BattleTower_BattleRoom_EventScript_1608FA:: @ 81608FA special sub_81347F8 - reappear 1 - move 1, BattleTower_BattleRoom_Movement_160AC0 - waitmove 0 + addobject 1 + applymovement 1, BattleTower_BattleRoom_Movement_160AC0 + waitmovement 0 special sub_8135474 msgbox 0x20234cc, 4 - waittext - closebutton + waitmessage + closemessage special ScrSpecial_HealPlayerParty setvar 0x8004, 0 setvar 0x8005, 0 @@ -43,18 +43,18 @@ BattleTower_BattleRoom_EventScript_160961:: @ 8160961 special sub_8135668 switch RESULT case 8, BattleTower_BattleRoom_EventScript_160A56 - move 1, BattleTower_BattleRoom_Movement_160AC6 - waitmove 0 - disappear 1 - move 2, BattleTower_BattleRoom_Movement_160ACB - waitmove 0 - move 255, BattleTower_BattleRoom_Movement_160ABC - waitmove 0 + applymovement 1, BattleTower_BattleRoom_Movement_160AC6 + waitmovement 0 + removeobject 1 + applymovement 2, BattleTower_BattleRoom_Movement_160ACB + waitmovement 0 + applymovement 255, BattleTower_BattleRoom_Movement_160ABC + waitmovement 0 msgbox BattleTower_BattleRoom_Text_19ACDC, 4 special LoadPlayerParty special SavePlayerParty special sub_8135A14 - fanfare 368 + playfanfare 368 waitfanfare special ScrSpecial_HealPlayerParty @@ -80,12 +80,12 @@ BattleTower_BattleRoom_EventScript_160A0E:: @ 8160A0E case 127, BattleTower_BattleRoom_EventScript_1609B2 BattleTower_BattleRoom_EventScript_160A3C:: @ 8160A3C - closebutton - move 255, BattleTower_BattleRoom_Movement_160ABE - waitmove 0 - move 2, BattleTower_BattleRoom_Movement_160AD0 - waitmove 0 - jump BattleTower_BattleRoom_EventScript_1608FA + closemessage + applymovement 255, BattleTower_BattleRoom_Movement_160ABE + waitmovement 0 + applymovement 2, BattleTower_BattleRoom_Movement_160AD0 + waitmovement 0 + goto BattleTower_BattleRoom_EventScript_1608FA BattleTower_BattleRoom_EventScript_160A56:: @ 8160A56 special LoadPlayerParty @@ -108,10 +108,10 @@ BattleTower_BattleRoom_EventScript_160A94:: @ 8160A94 setvar 0x8004, 2 special sub_8135BA0 message BattleTower_BattleRoom_Text_1C6CE1 - pause 60 - waittext - playsfx 55 - checksound + delay 60 + waitmessage + playse 55 + waitse msgbox BattleTower_BattleRoom_Text_1C6D05, 4 BattleTower_BattleRoom_EventScript_160AB1:: @ 8160AB1 diff --git a/data/scripts/maps/BattleTower_Corridor.inc b/data/scripts/maps/BattleTower_Corridor.inc index 4ccf2028c..9d4fbc844 100644 --- a/data/scripts/maps/BattleTower_Corridor.inc +++ b/data/scripts/maps/BattleTower_Corridor.inc @@ -5,7 +5,7 @@ BattleTower_Corridor_MapScripts:: @ 8160845 BattleTower_Corridor_MapScript1_160850:: @ 8160850 compare 0x8006, 1 - jumpeq BattleTower_Corridor_EventScript_16086E + goto_if_eq BattleTower_Corridor_EventScript_16086E setmaptile 12, 0, 519, 0 setmaptile 12, 1, 527, 0 end @@ -22,16 +22,16 @@ BattleTower_Corridor_MapScript2_160881:: @ 8160881 BattleTower_Corridor_EventScript_16088B:: @ 816088B setvar 0x4000, 1 compare 0x8006, 1 - jumpeq BattleTower_Corridor_EventScript_1608B1 - move 1, BattleTower_Corridor_Movement_1608D5 - move 255, BattleTower_Corridor_Movement_1608D4 - waitmove 0 - jump BattleTower_Corridor_EventScript_1608C2 + goto_if_eq BattleTower_Corridor_EventScript_1608B1 + applymovement 1, BattleTower_Corridor_Movement_1608D5 + applymovement 255, BattleTower_Corridor_Movement_1608D4 + waitmovement 0 + goto BattleTower_Corridor_EventScript_1608C2 BattleTower_Corridor_EventScript_1608B1:: @ 81608B1 - move 1, BattleTower_Corridor_Movement_1608D2 - move 255, BattleTower_Corridor_Movement_1608D1 - waitmove 0 + applymovement 1, BattleTower_Corridor_Movement_1608D2 + applymovement 255, BattleTower_Corridor_Movement_1608D1 + waitmovement 0 BattleTower_Corridor_EventScript_1608C2:: @ 81608C2 setvar 0x4000, 0 diff --git a/data/scripts/maps/BattleTower_Elevator.inc b/data/scripts/maps/BattleTower_Elevator.inc index 408e7485e..a147a3b5a 100644 --- a/data/scripts/maps/BattleTower_Elevator.inc +++ b/data/scripts/maps/BattleTower_Elevator.inc @@ -9,15 +9,15 @@ BattleTower_Elevator_MapScript2_1607DA:: @ 81607DA BattleTower_Elevator_EventScript_1607E4:: @ 81607E4 setvar 0x4000, 1 - move 1, BattleTower_Elevator_Movement_160835 - move 255, BattleTower_Elevator_Movement_160839 - waitmove 0 + applymovement 1, BattleTower_Elevator_Movement_160835 + applymovement 255, BattleTower_Elevator_Movement_160839 + waitmovement 0 special sub_810EBEC waitstate - pause 64 - move 1, BattleTower_Elevator_Movement_16083D - move 255, BattleTower_Elevator_Movement_160841 - waitmove 0 + delay 64 + applymovement 1, BattleTower_Elevator_Movement_16083D + applymovement 255, BattleTower_Elevator_Movement_160841 + waitmovement 0 setvar 0x4000, 0 warp BattleTower_Corridor, 255, 8, 1 waitstate @@ -29,7 +29,7 @@ BattleTower_Elevator_MapScript2_160821:: @ 8160821 BattleTower_Elevator_EventScript_16082B:: @ 816082B setvar 0x4001, 1 - spriteface 255, 2 + turnobject 255, 2 end BattleTower_Elevator_Movement_160835:: @ 8160835 diff --git a/data/scripts/maps/BattleTower_Lobby.inc b/data/scripts/maps/BattleTower_Lobby.inc index a1570ac13..3227df991 100644 --- a/data/scripts/maps/BattleTower_Lobby.inc +++ b/data/scripts/maps/BattleTower_Lobby.inc @@ -14,20 +14,20 @@ BattleTower_Lobby_EventScript_16029C:: @ 816029C setvar 0x8004, 10 special sub_8135668 checkflag 238 - jumpeq BattleTower_Lobby_EventScript_1602E4 + goto_if_eq BattleTower_Lobby_EventScript_1602E4 checkflag 237 - jumpeq BattleTower_Lobby_EventScript_1602CD - specialval 0x8007, sub_810F404 + goto_if_eq BattleTower_Lobby_EventScript_1602CD + specialvar 0x8007, sub_810F404 compare 0x8007, 50 - jumpif 0, BattleTower_Lobby_EventScript_1602E4 + goto_if 0, BattleTower_Lobby_EventScript_1602E4 clearflag 941 special sub_810F8FC return BattleTower_Lobby_EventScript_1602CD:: @ 81602CD - specialval 0x8007, sub_810F404 + specialvar 0x8007, sub_810F404 compare 0x8007, 100 - jumpif 0, BattleTower_Lobby_EventScript_1602E4 + goto_if 0, BattleTower_Lobby_EventScript_1602E4 clearflag 941 special sub_810F8FC return @@ -46,7 +46,7 @@ BattleTower_Lobby_MapScript2_1602EE:: @ 81602EE BattleTower_Lobby_EventScript_1602F8:: @ 81602F8 setvar 0x4001, 1 - spriteface 255, 2 + turnobject 255, 2 end BattleTower_Lobby_MapScript2_160302:: @ 8160302 @@ -65,7 +65,7 @@ BattleTower_Lobby_EventScript_160330:: @ 8160330 lock faceplayer msgbox BattleTower_Lobby_Text_19A3FD, 4 - closebutton + closemessage setvar 0x4000, 5 release end @@ -74,17 +74,17 @@ BattleTower_Lobby_EventScript_160342:: @ 8160342 lock faceplayer message BattleTower_Lobby_Text_19A487 - waittext + waitmessage setvar 0x8004, 0 special sub_81358A4 compare RESULT, 6 - jumpeq BattleTower_Lobby_EventScript_16037D + goto_if_eq BattleTower_Lobby_EventScript_16037D special sub_8135E50 compare RESULT, 0 - jumpeq BattleTower_Lobby_EventScript_16037D + goto_if_eq BattleTower_Lobby_EventScript_16037D message BattleTower_Lobby_Text_19A6BE - waittext - fanfare 370 + waitmessage + playfanfare 370 waitfanfare msgbox BattleTower_Lobby_Text_19A719, 4 @@ -92,47 +92,47 @@ BattleTower_Lobby_EventScript_16037D:: @ 816037D setvar 0x8004, 8 special sub_81358A4 compare RESULT, 1 - jumpeq BattleTower_Lobby_EventScript_1603AD + goto_if_eq BattleTower_Lobby_EventScript_1603AD message BattleTower_Lobby_Text_19A589 - waittext + waitmessage setvar 0x8004, 13 special sub_8135668 special sub_8135D84 setvar 0x8004, 3 special sub_8135BA0 - playsfx 55 - checksound + playse 55 + waitse BattleTower_Lobby_EventScript_1603AD:: @ 81603AD setvar 0x8004, 0 setvar 0x8005, 3 special sub_8135668 message BattleTower_Lobby_Text_19A4BB - waittext + waitmessage special sub_8135DEC switch RESULT case 0, BattleTower_Lobby_EventScript_160408 message BattleTower_Lobby_Text_19A506 - waittext - fanfare 370 + waitmessage + playfanfare 370 waitfanfare setvar 0x8004, 9 special sub_81358A4 compare RESULT, 49 - jumpif 5, BattleTower_Lobby_EventScript_1603F8 + goto_if 5, BattleTower_Lobby_EventScript_1603F8 msgbox BattleTower_Lobby_Text_19A617, 4 BattleTower_Lobby_EventScript_1603F8:: @ 81603F8 msgbox BattleTower_Lobby_Text_199FA9, 4 - closebutton + closemessage setvar 0x4000, 5 release end BattleTower_Lobby_EventScript_160408:: @ 8160408 msgbox BattleTower_Lobby_Text_19A520, 4 - waittext - closebutton + waitmessage + closemessage setvar 0x4000, 5 release end @@ -141,17 +141,17 @@ BattleTower_Lobby_EventScript_160419:: @ 8160419 lock faceplayer message BattleTower_Lobby_Text_19A571 - waittext + waitmessage message BattleTower_Lobby_Text_19A589 - waittext + waitmessage setvar 0x8004, 13 special sub_8135668 setvar 0x8004, 0 special sub_8135BA0 - playsfx 55 - checksound + playse 55 + waitse msgbox BattleTower_Lobby_Text_199FA9, 4 - closebutton + closemessage setvar 0x4000, 5 release end @@ -161,13 +161,13 @@ BattleTower_Lobby_EventScript_16044B:: @ 816044B faceplayer setvar 0x40bc, 1 message BattleTower_Lobby_Text_19A5B1 - waittext + waitmessage message BattleTower_Lobby_Text_19A5CE - waittext + waitmessage setvar 0x8004, 1 special sub_8135BA0 - playsfx 55 - checksound + playse 55 + waitse setvar 0x8004, 8 setvar 0x8005, 0 special sub_8135668 @@ -175,7 +175,7 @@ BattleTower_Lobby_EventScript_16044B:: @ 816044B special SavePlayerParty special sub_8135A14 msgbox BattleTower_Lobby_Text_19A0A8, 4 - closebutton + closemessage call BattleTower_Lobby_EventScript_160664 warp BattleTower_Elevator, 255, 1, 6 setvar 0x4000, 0 @@ -187,13 +187,13 @@ BattleTower_Lobby_EventScript_16049E:: @ 816049E setvar 0x8004, 0 special sub_81358A4 compare RESULT, 6 - jumpeq BattleTower_Lobby_EventScript_160342 + goto_if_eq BattleTower_Lobby_EventScript_160342 special SavePlayerParty msgbox BattleTower_Lobby_Text_199F2C, 4 BattleTower_Lobby_EventScript_1604BE:: @ 81604BE message BattleTower_Lobby_Text_199F79 - waittext + waitmessage multichoice 15, 6, 23, 0 switch RESULT case 0, BattleTower_Lobby_EventScript_1604FA @@ -203,14 +203,14 @@ BattleTower_Lobby_EventScript_1604BE:: @ 81604BE BattleTower_Lobby_EventScript_1604FA:: @ 81604FA message BattleTower_Lobby_Text_19A024 - waittext + waitmessage multichoice 18, 6, 24, 0 switch RESULT case 2, BattleTower_Lobby_EventScript_160652 case 127, BattleTower_Lobby_EventScript_160652 special CheckPartyBattleTowerBanlist compare 0x8004, 1 - jumpeq BattleTower_Lobby_EventScript_16060D + goto_if_eq BattleTower_Lobby_EventScript_16060D setvar 0x8004, 1 copyvar 0x8005, RESULT copyvar 0x8006, RESULT @@ -220,7 +220,7 @@ BattleTower_Lobby_EventScript_1604FA:: @ 81604FA special ChooseBattleTowerPlayerParty waitstate compare RESULT, 0 - jumpeq BattleTower_Lobby_EventScript_16064F + goto_if_eq BattleTower_Lobby_EventScript_16064F msgbox BattleTower_Lobby_Text_199FDA, 5 switch RESULT case 0, BattleTower_Lobby_EventScript_16064F @@ -240,19 +240,19 @@ BattleTower_Lobby_EventScript_160587:: @ 8160587 setvar 0x8005, 0 special sub_8135668 special LoadPlayerParty - closebutton - pause 2 + closemessage + delay 2 call S_DoSaveDialog setvar 0x4000, 5 - hidebox 0, 0, 15, 10 + erasebox 0, 0, 15, 10 compare RESULT, 0 - jumpeq BattleTower_Lobby_EventScript_160642 - inccounter GAME_STAT_ENTERED_BATTLE_TOWER + goto_if_eq BattleTower_Lobby_EventScript_160642 + incrementgamestat GAME_STAT_ENTERED_BATTLE_TOWER special SavePlayerParty special sub_8135A14 setvar 0x40bc, 1 msgbox BattleTower_Lobby_Text_19A0A8, 4 - closebutton + closemessage call BattleTower_Lobby_EventScript_160664 warp BattleTower_Elevator, 255, 1, 6 setvar 0x4000, 0 @@ -260,7 +260,7 @@ BattleTower_Lobby_EventScript_160587:: @ 8160587 BattleTower_Lobby_EventScript_160600:: @ 8160600 msgbox BattleTower_Lobby_Text_19A0D1, 4 - jump BattleTower_Lobby_EventScript_1604BE + goto BattleTower_Lobby_EventScript_1604BE BattleTower_Lobby_EventScript_16060D:: @ 816060D switch RESULT @@ -269,16 +269,16 @@ BattleTower_Lobby_EventScript_16060D:: @ 816060D BattleTower_Lobby_EventScript_160628:: @ 8160628 msgbox BattleTower_Lobby_Text_19A249, 4 - jump BattleTower_Lobby_EventScript_160662 + goto BattleTower_Lobby_EventScript_160662 BattleTower_Lobby_EventScript_160635:: @ 8160635 msgbox BattleTower_Lobby_Text_19A32D, 4 - jump BattleTower_Lobby_EventScript_160662 + goto BattleTower_Lobby_EventScript_160662 BattleTower_Lobby_EventScript_160642:: @ 8160642 setvar 0x8004, 12 special sub_8135668 - jump BattleTower_Lobby_EventScript_160652 + goto BattleTower_Lobby_EventScript_160652 BattleTower_Lobby_EventScript_16064F:: @ 816064F special LoadPlayerParty @@ -293,16 +293,16 @@ BattleTower_Lobby_EventScript_160662:: @ 8160662 end BattleTower_Lobby_EventScript_160664:: @ 8160664 - move 1, BattleTower_Lobby_Movement_160693 - move 255, BattleTower_Lobby_Movement_160693 - waitmove 0 - setdooropened 6, 1 - doorchange - move 1, BattleTower_Lobby_Movement_160697 - move 255, BattleTower_Lobby_Movement_16069A - waitmove 0 - setdoorclosed 6, 1 - doorchange + applymovement 1, BattleTower_Lobby_Movement_160693 + applymovement 255, BattleTower_Lobby_Movement_160693 + waitmovement 0 + opendoor 6, 1 + waitdooranim + applymovement 1, BattleTower_Lobby_Movement_160697 + applymovement 255, BattleTower_Lobby_Movement_16069A + waitmovement 0 + closedoor 6, 1 + waitdooranim return BattleTower_Lobby_Movement_160693:: @ 8160693 @@ -348,9 +348,9 @@ BattleTower_Lobby_EventScript_1606CC:: @ 81606CC lock faceplayer compare RESULT, 0 - jumpeq BattleTower_Lobby_EventScript_160701 + goto_if_eq BattleTower_Lobby_EventScript_160701 compare RESULT, 1 - jumpeq BattleTower_Lobby_EventScript_16070B + goto_if_eq BattleTower_Lobby_EventScript_16070B end BattleTower_Lobby_EventScript_1606F7:: @ 81606F7 @@ -380,7 +380,7 @@ BattleTower_Lobby_EventScript_160727:: @ 8160727 lockall special ShowBattleTowerRecords waitbutton - hidebox 0, 0, 29, 19 + erasebox 0, 0, 29, 19 releaseall end @@ -388,35 +388,35 @@ BattleTower_Lobby_EventScript_160733:: @ 8160733 lock faceplayer checkflag 238 - jumpeq BattleTower_Lobby_EventScript_1607C5 + goto_if_eq BattleTower_Lobby_EventScript_1607C5 checkflag 237 - jumpeq BattleTower_Lobby_EventScript_160773 + goto_if_eq BattleTower_Lobby_EventScript_160773 msgbox BattleTower_Lobby_Text_19A9EE, 4 setvar 0x8008, 42 givedecoration 42 compare RESULT, 0 - jumpeq BattleTower_Lobby_EventScript_1607AF + goto_if_eq BattleTower_Lobby_EventScript_1607AF setflag 237 msgbox BattleTower_Lobby_Text_19ABAA, 4 release end BattleTower_Lobby_EventScript_160773:: @ 8160773 - specialval RESULT, sub_810F404 + specialvar RESULT, sub_810F404 compare RESULT, 100 - jumpif 0, BattleTower_Lobby_EventScript_1607C5 + goto_if 0, BattleTower_Lobby_EventScript_1607C5 msgbox BattleTower_Lobby_Text_19AAC4, 4 setvar 0x8008, 43 givedecoration 43 compare RESULT, 0 - jumpeq BattleTower_Lobby_EventScript_1607AF + goto_if_eq BattleTower_Lobby_EventScript_1607AF setflag 238 msgbox BattleTower_Lobby_Text_19ABAA, 4 release end BattleTower_Lobby_EventScript_1607AF:: @ 81607AF - bufferdecor 1, 0x8008 + getdecorname 1, 0x8008 msgbox BattleTower_Lobby_Text_1A0CEF, 4 msgbox BattleTower_Lobby_Text_19ABED, 4 release diff --git a/data/scripts/maps/BattleTower_Outside.inc b/data/scripts/maps/BattleTower_Outside.inc index 02c4e0c6f..95c5a9d77 100644 --- a/data/scripts/maps/BattleTower_Outside.inc +++ b/data/scripts/maps/BattleTower_Outside.inc @@ -14,14 +14,14 @@ BattleTower_Outside_EventScript_160168:: @ 8160168 msgbox BattleTower_Outside_Text_199D06, 4 checkitem ITEM_SS_TICKET, 1 compare RESULT, 0 - jumpeq BattleTower_Outside_EventScript_1601C6 + goto_if_eq BattleTower_Outside_EventScript_1601C6 message BattleTower_Outside_Text_199D9D - waittext - jump BattleTower_Outside_EventScript_16018E + waitmessage + goto BattleTower_Outside_EventScript_16018E end BattleTower_Outside_EventScript_16018E:: @ 816018E - multichoicedef 21, 6, 53, 2, 0 + multichoicedefault 21, 6, 53, 2, 0 switch RESULT case 0, BattleTower_Outside_EventScript_1601D0 case 1, BattleTower_Outside_EventScript_1601FB @@ -37,7 +37,7 @@ BattleTower_Outside_EventScript_1601C6:: @ 81601C6 BattleTower_Outside_EventScript_1601D0:: @ 81601D0 msgbox BattleTower_Outside_Text_199DF2, 5 compare RESULT, 0 - jumpeq BattleTower_Outside_EventScript_160226 + goto_if_eq BattleTower_Outside_EventScript_160226 msgbox BattleTower_Outside_Text_199E4B, 4 call BattleTower_Outside_EventScript_160232 warp SlateportCity_Harbor, 255, 8, 11 @@ -48,7 +48,7 @@ BattleTower_Outside_EventScript_1601D0:: @ 81601D0 BattleTower_Outside_EventScript_1601FB:: @ 81601FB msgbox BattleTower_Outside_Text_199E0E, 5 compare RESULT, 0 - jumpeq BattleTower_Outside_EventScript_160226 + goto_if_eq BattleTower_Outside_EventScript_160226 msgbox BattleTower_Outside_Text_199E4B, 4 call BattleTower_Outside_EventScript_160232 warp LilycoveCity_Harbor, 255, 8, 11 @@ -58,16 +58,16 @@ BattleTower_Outside_EventScript_1601FB:: @ 81601FB BattleTower_Outside_EventScript_160226:: @ 8160226 message BattleTower_Outside_Text_199E7A - waittext - jump BattleTower_Outside_EventScript_16018E + waitmessage + goto BattleTower_Outside_EventScript_16018E end BattleTower_Outside_EventScript_160232:: @ 8160232 - closebutton - move LAST_TALKED, BattleTower_Outside_Movement_1A0845 - waitmove 0 - pause 30 - spriteinvisible 5, 26, 4 + closemessage + applymovement LAST_TALKED, BattleTower_Outside_Movement_1A0845 + waitmovement 0 + delay 30 + hideobject 5, 26, 4 setvar 0x8004, 4 call BattleTower_Outside_EventScript_1A047C return diff --git a/data/scripts/maps/CaveOfOrigin_1F.inc b/data/scripts/maps/CaveOfOrigin_1F.inc index 7fd365b36..3ad36cc18 100644 --- a/data/scripts/maps/CaveOfOrigin_1F.inc +++ b/data/scripts/maps/CaveOfOrigin_1F.inc @@ -4,5 +4,5 @@ CaveOfOrigin_1F_MapScripts:: @ 815DD6C CaveOfOrigin_1F_MapScript1_15DD72:: @ 815DD72 checkflag 113 - callif 1, CaveOfOrigin_1F_EventScript_1A04E3 + call_if 1, CaveOfOrigin_1F_EventScript_1A04E3 end diff --git a/data/scripts/maps/CaveOfOrigin_B1F.inc b/data/scripts/maps/CaveOfOrigin_B1F.inc index 9603ae83b..c3bbdd45f 100644 --- a/data/scripts/maps/CaveOfOrigin_B1F.inc +++ b/data/scripts/maps/CaveOfOrigin_B1F.inc @@ -4,5 +4,5 @@ CaveOfOrigin_B1F_MapScripts:: @ 815DD7C CaveOfOrigin_B1F_MapScript1_15DD82:: @ 815DD82 checkflag 113 - callif 1, CaveOfOrigin_B1F_EventScript_1A04E3 + call_if 1, CaveOfOrigin_B1F_EventScript_1A04E3 end diff --git a/data/scripts/maps/CaveOfOrigin_B2F.inc b/data/scripts/maps/CaveOfOrigin_B2F.inc index 6b3a55648..fb65de171 100644 --- a/data/scripts/maps/CaveOfOrigin_B2F.inc +++ b/data/scripts/maps/CaveOfOrigin_B2F.inc @@ -4,5 +4,5 @@ CaveOfOrigin_B2F_MapScripts:: @ 815DD8C CaveOfOrigin_B2F_MapScript1_15DD92:: @ 815DD92 checkflag 113 - callif 1, CaveOfOrigin_B2F_EventScript_1A04E3 + call_if 1, CaveOfOrigin_B2F_EventScript_1A04E3 end diff --git a/data/scripts/maps/CaveOfOrigin_B3F.inc b/data/scripts/maps/CaveOfOrigin_B3F.inc index 8e61048d2..c21b04e91 100644 --- a/data/scripts/maps/CaveOfOrigin_B3F.inc +++ b/data/scripts/maps/CaveOfOrigin_B3F.inc @@ -4,5 +4,5 @@ CaveOfOrigin_B3F_MapScripts:: @ 815DD9C CaveOfOrigin_B3F_MapScript1_15DDA2:: @ 815DDA2 checkflag 113 - callif 1, CaveOfOrigin_B3F_EventScript_1A04E3 + call_if 1, CaveOfOrigin_B3F_EventScript_1A04E3 end diff --git a/data/scripts/maps/CaveOfOrigin_B4F.inc b/data/scripts/maps/CaveOfOrigin_B4F.inc index 5517a9c7e..c6c3cd45e 100644 --- a/data/scripts/maps/CaveOfOrigin_B4F.inc +++ b/data/scripts/maps/CaveOfOrigin_B4F.inc @@ -5,69 +5,69 @@ CaveOfOrigin_B4F_MapScripts:: @ 815DDAC CaveOfOrigin_B4F_MapScript1_15DDB7:: @ 815DDB7 checkflag 2145 - callif 1, CaveOfOrigin_B4F_EventScript_15DDC1 + call_if 1, CaveOfOrigin_B4F_EventScript_15DDC1 end CaveOfOrigin_B4F_EventScript_15DDC1:: @ 815DDC1 - disappear 1 + removeobject 1 return CaveOfOrigin_B4F_MapScript1_15DDC5:: @ 815DDC5 .ifdef SAPPHIRE - setmapfooter 163 + setmaplayoutindex 163 .else - setmapfooter 313 + setmaplayoutindex 313 .endif call CaveOfOrigin_B4F_EventScript_1A01B5 checkflag 113 - callif 1, CaveOfOrigin_B4F_EventScript_1A04E3 + call_if 1, CaveOfOrigin_B4F_EventScript_1A04E3 end CaveOfOrigin_B4F_EventScript_15DDD7:: @ 815DDD7 lockall - move 255, CaveOfOrigin_B4F_Movement_1A0841 - waitmove 0 + applymovement 255, CaveOfOrigin_B4F_Movement_1A0841 + waitmovement 0 .ifdef SAPPHIRE msgbox UnknownString_81B4F03, 4 .else msgbox CaveOfOrigin_B4F_Text_1B4FE4, 4 .endif - closebutton + closemessage setweather 0 doweather special WaitWeather waitstate - playsfx 209 - setanimation 0, 9 - setanimation 1, 13 - setanimation 2, 0 - doanimation 54 - checkanimation 54 + playse 209 + setfieldeffect 0, 9 + setfieldeffect 1, 13 + setfieldeffect 2, 0 + dofieldeffect 54 + waitfieldeffect 54 .ifdef SAPPHIRE setvar RESULT, 3 .else setvar RESULT, 2 .endif - playsfx 107 + playse 107 special sub_80818A4 waitstate special sub_80818FC waitstate - move 1, CaveOfOrigin_B4F_Movement_15DE7D - waitmove 0 - pause 60 + applymovement 1, CaveOfOrigin_B4F_Movement_15DE7D + waitmovement 0 + delay 60 setwildbattle SPECIES_GROUDON_OR_KYOGRE, 45, ITEM_NONE - checksound - pokecry SPECIES_GROUDON_OR_KYOGRE, 2 - pause 40 + waitse + playpokecry SPECIES_GROUDON_OR_KYOGRE, 2 + delay 40 waitpokecry setflag 2145 special ScrSpecial_StartGroudonKyogreBattle waitstate clearflag 2145 - specialval RESULT, sub_810E300 + specialvar RESULT, sub_810E300 compare RESULT, 1 - callif 1, CaveOfOrigin_B4F_EventScript_15DE73 + call_if 1, CaveOfOrigin_B4F_EventScript_15DE73 setflag 816 setflag 855 setflag 856 @@ -87,7 +87,7 @@ CaveOfOrigin_B4F_EventScript_15DE73:: @ 815DE73 .else msgbox CaveOfOrigin_B4F_Text_1B5009, 4 .endif - closebutton + closemessage return CaveOfOrigin_B4F_Movement_15DE7D:: @ 815DE7D diff --git a/data/scripts/maps/DesertRuins.inc b/data/scripts/maps/DesertRuins.inc index 97a22bae3..9f6f7b388 100644 --- a/data/scripts/maps/DesertRuins.inc +++ b/data/scripts/maps/DesertRuins.inc @@ -6,16 +6,16 @@ DesertRuins_MapScripts:: @ 815CAF3 DesertRuins_MapScript1_15CB03:: @ 815CB03 checkflag 2145 - callif 1, DesertRuins_EventScript_15CB0D + call_if 1, DesertRuins_EventScript_15CB0D end DesertRuins_EventScript_15CB0D:: @ 815CB0D - disappear LAST_TALKED + removeobject LAST_TALKED return DesertRuins_MapScript1_15CB11:: @ 815CB11 checkflag 2128 - callif 0, DesertRuins_EventScript_15CB1B + call_if 0, DesertRuins_EventScript_15CB1B end DesertRuins_EventScript_15CB1B:: @ 815CB1B @@ -34,10 +34,10 @@ DesertRuins_MapScript1_15CB52:: @ 815CB52 DesertRuins_EventScript_15CB56:: @ 815CB56 lockall checkflag 2128 - jumpeq DesertRuins_EventScript_15CB6D - braillemsg DesertRuins_Braille_1C54C8 + goto_if_eq DesertRuins_EventScript_15CB6D + braillemessage DesertRuins_Braille_1C54C8 waitbutton - hidebox 0, 0, 29, 19 + erasebox 0, 0, 29, 19 releaseall end @@ -48,18 +48,18 @@ DesertRuins_EventScript_15CB6D:: @ 815CB6D DesertRuins_EventScript_15CB77:: @ 815CB77 lockall - braillemsg DesertRuins_Braille_1C54C8 + braillemessage DesertRuins_Braille_1C54C8 waitbutton - hidebox 0, 0, 29, 19 + erasebox 0, 0, 29, 19 releaseall end DesertRuins_EventScript_15CB85:: @ 815CB85 lock faceplayer - checksound - pokecry SPECIES_REGIROCK, 2 - pause 40 + waitse + playpokecry SPECIES_REGIROCK, 2 + delay 40 waitpokecry setwildbattle SPECIES_REGIROCK, 40, ITEM_NONE setflag 935 diff --git a/data/scripts/maps/DewfordTown.inc b/data/scripts/maps/DewfordTown.inc index 8ca2eb3df..aa3584741 100644 --- a/data/scripts/maps/DewfordTown.inc +++ b/data/scripts/maps/DewfordTown.inc @@ -10,10 +10,10 @@ DewfordTown_EventScript_14E002:: @ 814E002 lock faceplayer checkflag 189 - jumpif 0, DewfordTown_EventScript_14E076 + goto_if 0, DewfordTown_EventScript_14E076 message DewfordTown_Text_16B522 - waittext - multichoicedef 21, 6, 0, 2, 0 + waitmessage + multichoicedefault 21, 6, 0, 2, 0 switch RESULT case 0, DewfordTown_EventScript_14E04B case 1, DewfordTown_EventScript_14E05B @@ -23,36 +23,36 @@ DewfordTown_EventScript_14E002:: @ 814E002 DewfordTown_EventScript_14E04B:: @ 814E04B msgbox DewfordTown_Text_16B57D, 4 - closebutton - jump DewfordTown_EventScript_14E151 + closemessage + goto DewfordTown_EventScript_14E151 release end DewfordTown_EventScript_14E05B:: @ 814E05B msgbox DewfordTown_Text_16B5D2, 4 - closebutton - jump DewfordTown_EventScript_14E1D8 + closemessage + goto DewfordTown_EventScript_14E1D8 release end DewfordTown_EventScript_14E06B:: @ 814E06B msgbox DewfordTown_Text_16B627, 4 - closebutton + closemessage release end DewfordTown_EventScript_14E076:: @ 814E076 msgbox DewfordTown_Text_16B3BC, 5 compare RESULT, 1 - jumpeq DewfordTown_EventScript_14E093 + goto_if_eq DewfordTown_EventScript_14E093 msgbox DewfordTown_Text_16B471, 4 release end DewfordTown_EventScript_14E093:: @ 814E093 msgbox DewfordTown_Text_16B417, 4 - closebutton - jump DewfordTown_EventScript_14E151 + closemessage + goto DewfordTown_EventScript_14E151 end DewfordTown_EventScript_14E0A2:: @ 814E0A2 @@ -75,12 +75,12 @@ DewfordTown_EventScript_14E0C6:: @ 814E0C6 lock faceplayer checkflag 257 - jumpeq DewfordTown_EventScript_14E11B + goto_if_eq DewfordTown_EventScript_14E11B msgbox DewfordTown_Text_16B665, 5 compare RESULT, 1 - jumpeq DewfordTown_EventScript_14E0F0 + goto_if_eq DewfordTown_EventScript_14E0F0 compare RESULT, 0 - jumpeq DewfordTown_EventScript_14E111 + goto_if_eq DewfordTown_EventScript_14E111 end DewfordTown_EventScript_14E0F0:: @ 814E0F0 @@ -98,12 +98,12 @@ DewfordTown_EventScript_14E111:: @ 814E111 DewfordTown_EventScript_14E11B:: @ 814E11B message DewfordTown_Text_16B84E - waittext + waitmessage multichoice 20, 8, 50, 1 compare RESULT, 0 - jumpeq DewfordTown_EventScript_14E13D + goto_if_eq DewfordTown_EventScript_14E13D compare RESULT, 1 - jumpeq DewfordTown_EventScript_14E147 + goto_if_eq DewfordTown_EventScript_14E147 end DewfordTown_EventScript_14E13D:: @ 814E13D @@ -118,30 +118,30 @@ DewfordTown_EventScript_14E147:: @ 814E147 DewfordTown_EventScript_14E151:: @ 814E151 call DewfordTown_EventScript_1A010C - spritelevelup 2, 0, 11, 0 - spritelevelup 255, 0, 11, 0 - move 2, DewfordTown_Movement_14E40E - waitmove 0 - disappear 2 - move 255, DewfordTown_Movement_14E402 - waitmove 0 - spriteinvisible 255, 0, 11 + setobjectpriority 2, 0, 11, 0 + setobjectpriority 255, 0, 11, 0 + applymovement 2, DewfordTown_Movement_14E40E + waitmovement 0 + removeobject 2 + applymovement 255, DewfordTown_Movement_14E402 + waitmovement 0 + hideobject 255, 0, 11 call DewfordTown_EventScript_1A02E7 - move 4, DewfordTown_Movement_14E293 - move 255, DewfordTown_Movement_14E293 - waitmove 0 - spritevisible 255, 0, 19 + applymovement 4, DewfordTown_Movement_14E293 + applymovement 255, DewfordTown_Movement_14E293 + waitmovement 0 + showobject 255, 0, 19 call DewfordTown_EventScript_1A02EF - move 255, DewfordTown_Movement_14E405 - waitmove 0 - spritevisible 255, 0, 19 + applymovement 255, DewfordTown_Movement_14E405 + waitmovement 0 + showobject 255, 0, 19 clearflag 739 clearflag 881 clearflag 742 setflag 743 - spriteinvisible 4, 0, 11 + hideobject 4, 0, 11 setvar 0x408e, 2 - restorespritelevel 255, 0, 11 + resetobjectpriority 255, 0, 11 warp Route104_MrBrineysHouse, 255, 5, 4 copyvar 0x4096, 0x8008 waitstate @@ -150,41 +150,41 @@ DewfordTown_EventScript_14E151:: @ 814E151 DewfordTown_EventScript_14E1D8:: @ 814E1D8 call DewfordTown_EventScript_1A010C - spritelevelup 2, 0, 11, 0 - spritelevelup 255, 0, 11, 1 - move 2, DewfordTown_Movement_14E40E - waitmove 0 - disappear 2 - move 255, DewfordTown_Movement_14E402 - waitmove 0 - spriteinvisible 255, 0, 11 + setobjectpriority 2, 0, 11, 0 + setobjectpriority 255, 0, 11, 1 + applymovement 2, DewfordTown_Movement_14E40E + waitmovement 0 + removeobject 2 + applymovement 255, DewfordTown_Movement_14E402 + waitmovement 0 + hideobject 255, 0, 11 call DewfordTown_EventScript_1A02E7 - move 4, DewfordTown_Movement_14E356 - move 255, DewfordTown_Movement_14E356 - waitmove 0 + applymovement 4, DewfordTown_Movement_14E356 + applymovement 255, DewfordTown_Movement_14E356 + waitmovement 0 call DewfordTown_EventScript_1A02EF - spritevisible 255, 0, 24 - move 255, DewfordTown_Movement_14E409 - waitmove 0 - movespriteperm 2, 21, 26 - reappear 2 - spritelevelup 2, 0, 24, 0 - move 2, DewfordTown_Movement_14E410 - waitmove 0 + showobject 255, 0, 24 + applymovement 255, DewfordTown_Movement_14E409 + waitmovement 0 + setobjectxyperm 2, 21, 26 + addobject 2 + setobjectpriority 2, 0, 24, 0 + applymovement 2, DewfordTown_Movement_14E410 + waitmovement 0 clearflag 741 - reappear 1 + addobject 1 clearflag 744 setflag 743 - spriteinvisible 4, 0, 11 + hideobject 4, 0, 11 checkflag 149 - callif 0, DewfordTown_EventScript_14E281 + call_if 0, DewfordTown_EventScript_14E281 checkflag 149 - callif 1, DewfordTown_EventScript_14E28A - closebutton + call_if 1, DewfordTown_EventScript_14E28A + closemessage copyvar 0x4096, 0x8008 - restorespritelevel 255, 0, 11 - restorespritelevel 2, 0, 24 - moveoffscreen 2 + resetobjectpriority 255, 0, 11 + resetobjectpriority 2, 0, 24 + moveobjectoffscreen 2 release end @@ -600,9 +600,9 @@ DewfordTown_EventScript_14E413:: @ 814E413 call DewfordTown_EventScript_1A0102 msgbox DewfordTown_Text_16B9CE, 5 compare RESULT, 1 - jumpeq DewfordTown_EventScript_14E439 + goto_if_eq DewfordTown_EventScript_14E439 compare RESULT, 0 - jumpeq DewfordTown_EventScript_14E443 + goto_if_eq DewfordTown_EventScript_14E443 end DewfordTown_EventScript_14E439:: @ 814E439 @@ -617,15 +617,15 @@ DewfordTown_EventScript_14E443:: @ 814E443 lock faceplayer compare RESULT, 1 - jumpeq DewfordTown_EventScript_14E46E + goto_if_eq DewfordTown_EventScript_14E46E compare RESULT, 0 - jumpeq DewfordTown_EventScript_14E485 + goto_if_eq DewfordTown_EventScript_14E485 end DewfordTown_EventScript_14E46E:: @ 814E46E - inccounter GAME_STAT_STARTED_TRENDS + incrementgamestat GAME_STAT_STARTED_TRENDS compare 0x8004, 0 - jumpeq DewfordTown_EventScript_14E48F + goto_if_eq DewfordTown_EventScript_14E48F msgbox DewfordTown_Text_16BB44, 4 release end diff --git a/data/scripts/maps/DewfordTown_Gym.inc b/data/scripts/maps/DewfordTown_Gym.inc index 51d4f44ba..92776afb1 100644 --- a/data/scripts/maps/DewfordTown_Gym.inc +++ b/data/scripts/maps/DewfordTown_Gym.inc @@ -8,91 +8,91 @@ DewfordTown_Gym_MapScript1_15306B:: @ 815306B DewfordTown_Gym_EventScript_153071:: @ 8153071 checktrainerflag OPPONENT_BRAWLY - jumpeq DewfordTown_Gym_EventScript_1530AA + goto_if_eq DewfordTown_Gym_EventScript_1530AA call DewfordTown_Gym_EventScript_153122 copyvar 0x8001, 0x8000 compare 0x8000, 0 - jumpeq DewfordTown_Gym_EventScript_1530BA + goto_if_eq DewfordTown_Gym_EventScript_1530BA compare 0x8000, 1 - jumpeq DewfordTown_Gym_EventScript_1530B6 + goto_if_eq DewfordTown_Gym_EventScript_1530B6 compare 0x8000, 2 - jumpeq DewfordTown_Gym_EventScript_1530B2 - jump DewfordTown_Gym_EventScript_1530AE + goto_if_eq DewfordTown_Gym_EventScript_1530B2 + goto DewfordTown_Gym_EventScript_1530AE DewfordTown_Gym_EventScript_1530AA:: @ 81530AA - darken 0 + setdarklevel 0 return DewfordTown_Gym_EventScript_1530AE:: @ 81530AE - darken 1 + setdarklevel 1 return DewfordTown_Gym_EventScript_1530B2:: @ 81530B2 - darken 2 + setdarklevel 2 return DewfordTown_Gym_EventScript_1530B6:: @ 81530B6 - darken 3 + setdarklevel 3 return DewfordTown_Gym_EventScript_1530BA:: @ 81530BA - darken 4 + setdarklevel 4 return DewfordTown_Gym_EventScript_1530BE:: @ 81530BE call DewfordTown_Gym_EventScript_153122 - snop1 - comparevars 0x8000, 0x8001 - jumpeq DewfordTown_Gym_EventScript_1530F5 + nop1 + compare 0x8000, 0x8001 + goto_if_eq DewfordTown_Gym_EventScript_1530F5 copyvar 0x8001, 0x8000 compare 0x8000, 1 - jumpeq DewfordTown_Gym_EventScript_1530F6 + goto_if_eq DewfordTown_Gym_EventScript_1530F6 compare 0x8000, 2 - jumpeq DewfordTown_Gym_EventScript_153101 + goto_if_eq DewfordTown_Gym_EventScript_153101 compare 0x8000, 3 - jumpeq DewfordTown_Gym_EventScript_15310C + goto_if_eq DewfordTown_Gym_EventScript_15310C DewfordTown_Gym_EventScript_1530F5:: @ 81530F5 return DewfordTown_Gym_EventScript_1530F6:: @ 81530F6 - playsfx 35 - lighten 3 + playse 35 + animdarklevel 3 call DewfordTown_Gym_EventScript_153071 return DewfordTown_Gym_EventScript_153101:: @ 8153101 - playsfx 35 - lighten 2 + playse 35 + animdarklevel 2 call DewfordTown_Gym_EventScript_153071 return DewfordTown_Gym_EventScript_15310C:: @ 815310C - playsfx 35 - lighten 1 + playse 35 + animdarklevel 1 call DewfordTown_Gym_EventScript_153071 return DewfordTown_Gym_EventScript_153117:: @ 8153117 - playsfx 35 - lighten 0 + playse 35 + animdarklevel 0 call DewfordTown_Gym_EventScript_153071 return DewfordTown_Gym_EventScript_153122:: @ 8153122 setvar 0x8000, 0 checktrainerflag OPPONENT_HIDEKI - jumpif 0, DewfordTown_Gym_EventScript_153135 + goto_if 0, DewfordTown_Gym_EventScript_153135 addvar 0x8000, 1 DewfordTown_Gym_EventScript_153135:: @ 8153135 checktrainerflag OPPONENT_TESSA - jumpif 0, DewfordTown_Gym_EventScript_153143 + goto_if 0, DewfordTown_Gym_EventScript_153143 addvar 0x8000, 1 DewfordTown_Gym_EventScript_153143:: @ 8153143 checktrainerflag OPPONENT_LAURA - jumpif 0, DewfordTown_Gym_EventScript_153151 + goto_if 0, DewfordTown_Gym_EventScript_153151 addvar 0x8000, 1 DewfordTown_Gym_EventScript_153151:: @ 8153151 @@ -101,7 +101,7 @@ DewfordTown_Gym_EventScript_153151:: @ 8153151 DewfordTown_Gym_EventScript_153152:: @ 8153152 trainerbattle 1, OPPONENT_BRAWLY, 0, DewfordTown_Gym_Text_175182, DewfordTown_Gym_Text_175246, DewfordTown_Gym_EventScript_153177 checkflag 166 - jumpif 0, DewfordTown_Gym_EventScript_1531B5 + goto_if 0, DewfordTown_Gym_EventScript_1531B5 msgbox DewfordTown_Gym_Text_175412, 4 release end @@ -109,23 +109,23 @@ DewfordTown_Gym_EventScript_153152:: @ 8153152 DewfordTown_Gym_EventScript_153177:: @ 8153177 call DewfordTown_Gym_EventScript_153117 message DewfordTown_Gym_Text_1752BB - waittext + waitmessage call DewfordTown_Gym_EventScript_1A02C5 msgbox DewfordTown_Gym_Text_1752E6, 4 setflag 1204 setflag 2056 addvar 0x4085, 1 compare 0x4085, 6 - callif 1, DewfordTown_Gym_EventScript_1A00FB + call_if 1, DewfordTown_Gym_EventScript_1A00FB setvar 0x8008, 2 call DewfordTown_Gym_EventScript_1A01C0 - jump DewfordTown_Gym_EventScript_1531B5 + goto DewfordTown_Gym_EventScript_1531B5 end DewfordTown_Gym_EventScript_1531B5:: @ 81531B5 giveitem ITEM_TM08 compare RESULT, 0 - jumpeq DewfordTown_Gym_EventScript_1A029B + goto_if_eq DewfordTown_Gym_EventScript_1A029B msgbox DewfordTown_Gym_Text_1753BF, 4 setflag 166 release @@ -165,7 +165,7 @@ DewfordTown_Gym_EventScript_15323F:: @ 815323F lock faceplayer checkflag 1204 - jumpeq DewfordTown_Gym_EventScript_153254 + goto_if_eq DewfordTown_Gym_EventScript_153254 msgbox DewfordTown_Gym_Text_174D98, 4 release end @@ -178,15 +178,15 @@ DewfordTown_Gym_EventScript_153254:: @ 8153254 DewfordTown_Gym_EventScript_15325E:: @ 815325E lockall checkflag 2056 - jumpeq DewfordTown_Gym_EventScript_15327E - jump DewfordTown_Gym_EventScript_153288 + goto_if_eq DewfordTown_Gym_EventScript_15327E + goto DewfordTown_Gym_EventScript_153288 end DewfordTown_Gym_EventScript_15326E:: @ 815326E lockall checkflag 2056 - jumpeq DewfordTown_Gym_EventScript_15327E - jump DewfordTown_Gym_EventScript_153288 + goto_if_eq DewfordTown_Gym_EventScript_15327E + goto DewfordTown_Gym_EventScript_153288 end DewfordTown_Gym_EventScript_15327E:: @ 815327E diff --git a/data/scripts/maps/DewfordTown_Hall.inc b/data/scripts/maps/DewfordTown_Hall.inc index 28d396a3e..ea4016147 100644 --- a/data/scripts/maps/DewfordTown_Hall.inc +++ b/data/scripts/maps/DewfordTown_Hall.inc @@ -7,7 +7,7 @@ DewfordTown_Hall_EventScript_153293:: @ 8153293 call DewfordTown_Hall_EventScript_1A0102 special sub_80FA5E4 compare RESULT, 1 - jumpeq DewfordTown_Hall_EventScript_1532B2 + goto_if_eq DewfordTown_Hall_EventScript_1532B2 msgbox DewfordTown_Hall_Text_1754C9, 4 release end @@ -32,9 +32,9 @@ DewfordTown_Hall_EventScript_1532CD:: @ 81532CD special sub_80EB83C msgbox DewfordTown_Hall_Text_1755F9, 5 compare RESULT, 1 - jumpeq DewfordTown_Hall_EventScript_1532F6 + goto_if_eq DewfordTown_Hall_EventScript_1532F6 compare RESULT, 0 - jumpeq DewfordTown_Hall_EventScript_153300 + goto_if_eq DewfordTown_Hall_EventScript_153300 end DewfordTown_Hall_EventScript_1532F6:: @ 81532F6 @@ -52,9 +52,9 @@ DewfordTown_Hall_EventScript_15330A:: @ 815330A faceplayer call DewfordTown_Hall_EventScript_1A0102 msgbox DewfordTown_Hall_Text_17570D, 4 - closebutton - move 4, DewfordTown_Hall_Movement_1A0841 - waitmove 0 + closemessage + applymovement 4, DewfordTown_Hall_Movement_1A0841 + waitmovement 0 release end @@ -63,9 +63,9 @@ DewfordTown_Hall_EventScript_153326:: @ 8153326 faceplayer call DewfordTown_Hall_EventScript_1A0102 msgbox DewfordTown_Hall_Text_17574C, 4 - closebutton - move 5, DewfordTown_Hall_Movement_1A0841 - waitmove 0 + closemessage + applymovement 5, DewfordTown_Hall_Movement_1A0841 + waitmovement 0 release end @@ -122,13 +122,13 @@ DewfordTown_Hall_EventScript_1533E8:: @ 81533E8 DewfordTown_Hall_EventScript_1533F2:: @ 81533F2 lockall setvar 0x8008, 0 - jump DewfordTown_Hall_EventScript_15340A + goto DewfordTown_Hall_EventScript_15340A end DewfordTown_Hall_EventScript_1533FE:: @ 81533FE lockall setvar 0x8008, 1 - jump DewfordTown_Hall_EventScript_15340A + goto DewfordTown_Hall_EventScript_15340A end DewfordTown_Hall_EventScript_15340A:: @ 815340A @@ -189,55 +189,55 @@ DewfordTown_Hall_EventScript_1534FC:: @ 81534FC return DewfordTown_Hall_EventScript_1534FD:: @ 81534FD - move 8, DewfordTown_Hall_Movement_153599 - waitmove 0 + applymovement 8, DewfordTown_Hall_Movement_153599 + waitmovement 0 compare 0x8008, 0 - jumpeq DewfordTown_Hall_EventScript_15351E + goto_if_eq DewfordTown_Hall_EventScript_15351E compare 0x8008, 1 - jumpeq DewfordTown_Hall_EventScript_153534 + goto_if_eq DewfordTown_Hall_EventScript_153534 end DewfordTown_Hall_EventScript_15351E:: @ 815351E compare FACING, 4 - jumpeq DewfordTown_Hall_EventScript_1534FC - move 255, DewfordTown_Hall_Movement_1A0843 - waitmove 0 + goto_if_eq DewfordTown_Hall_EventScript_1534FC + applymovement 255, DewfordTown_Hall_Movement_1A0843 + waitmovement 0 return DewfordTown_Hall_EventScript_153534:: @ 8153534 return DewfordTown_Hall_EventScript_153535:: @ 8153535 - move 7, DewfordTown_Hall_Movement_15359B - waitmove 0 + applymovement 7, DewfordTown_Hall_Movement_15359B + waitmovement 0 compare 0x8008, 0 - jumpeq DewfordTown_Hall_EventScript_153556 + goto_if_eq DewfordTown_Hall_EventScript_153556 compare 0x8008, 1 - jumpeq DewfordTown_Hall_EventScript_153583 + goto_if_eq DewfordTown_Hall_EventScript_153583 end DewfordTown_Hall_EventScript_153556:: @ 8153556 compare FACING, 2 - callif 1, DewfordTown_Hall_EventScript_15356D + call_if 1, DewfordTown_Hall_EventScript_15356D compare FACING, 1 - callif 1, DewfordTown_Hall_EventScript_153578 + call_if 1, DewfordTown_Hall_EventScript_153578 return DewfordTown_Hall_EventScript_15356D:: @ 815356D - move 255, DewfordTown_Hall_Movement_1A0841 - waitmove 0 + applymovement 255, DewfordTown_Hall_Movement_1A0841 + waitmovement 0 return DewfordTown_Hall_EventScript_153578:: @ 8153578 - move 255, DewfordTown_Hall_Movement_1A0845 - waitmove 0 + applymovement 255, DewfordTown_Hall_Movement_1A0845 + waitmovement 0 return DewfordTown_Hall_EventScript_153583:: @ 8153583 compare FACING, 3 - jumpeq DewfordTown_Hall_EventScript_1534FC - move 255, DewfordTown_Hall_Movement_1A083F - waitmove 0 + goto_if_eq DewfordTown_Hall_EventScript_1534FC + applymovement 255, DewfordTown_Hall_Movement_1A083F + waitmovement 0 return DewfordTown_Hall_Movement_153599:: @ 8153599 @@ -253,11 +253,11 @@ DewfordTown_Hall_EventScript_15359D:: @ 815359D faceplayer call DewfordTown_Hall_EventScript_1A0102 checkflag 230 - jumpeq DewfordTown_Hall_EventScript_1535D1 + goto_if_eq DewfordTown_Hall_EventScript_1535D1 msgbox DewfordTown_Hall_Text_175E13, 4 giveitem ITEM_TM36 compare RESULT, 0 - jumpeq DewfordTown_Hall_EventScript_1A029B + goto_if_eq DewfordTown_Hall_EventScript_1A029B setflag 230 release end diff --git a/data/scripts/maps/DewfordTown_House1.inc b/data/scripts/maps/DewfordTown_House1.inc index 40e06357c..e8897b974 100644 --- a/data/scripts/maps/DewfordTown_House1.inc +++ b/data/scripts/maps/DewfordTown_House1.inc @@ -12,8 +12,8 @@ DewfordTown_House1_EventScript_152FF8:: @ 8152FF8 DewfordTown_House1_EventScript_153001:: @ 8153001 lock faceplayer - checksound - pokecry SPECIES_ZIGZAGOON, 0 + waitse + playpokecry SPECIES_ZIGZAGOON, 0 msgbox DewfordTown_House1_Text_174CC8, 4 waitpokecry release diff --git a/data/scripts/maps/DewfordTown_House2.inc b/data/scripts/maps/DewfordTown_House2.inc index 529f8bb24..befe47404 100644 --- a/data/scripts/maps/DewfordTown_House2.inc +++ b/data/scripts/maps/DewfordTown_House2.inc @@ -5,11 +5,11 @@ DewfordTown_House2_EventScript_1535DC:: @ 81535DC lock faceplayer checkflag 289 - jumpeq DewfordTown_House2_EventScript_153615 + goto_if_eq DewfordTown_House2_EventScript_153615 msgbox DewfordTown_House2_Text_175EFE, 4 giveitem ITEM_SILK_SCARF compare RESULT, 0 - jumpeq DewfordTown_House2_EventScript_15360B + goto_if_eq DewfordTown_House2_EventScript_15360B setflag 289 release end diff --git a/data/scripts/maps/DewfordTown_PokemonCenter_1F.inc b/data/scripts/maps/DewfordTown_PokemonCenter_1F.inc index 96c198ae5..70e75492e 100644 --- a/data/scripts/maps/DewfordTown_PokemonCenter_1F.inc +++ b/data/scripts/maps/DewfordTown_PokemonCenter_1F.inc @@ -10,7 +10,7 @@ DewfordTown_PokemonCenter_1F_MapScript1_15301A:: @ 815301A DewfordTown_PokemonCenter_1F_EventScript_153023:: @ 8153023 setvar 0x800b, 1 call DewfordTown_PokemonCenter_1F_EventScript_19FD5B - waittext + waitmessage waitbutton release end diff --git a/data/scripts/maps/EverGrandeCity.inc b/data/scripts/maps/EverGrandeCity.inc index 9b6d2a8b7..c9768d006 100644 --- a/data/scripts/maps/EverGrandeCity.inc +++ b/data/scripts/maps/EverGrandeCity.inc @@ -4,7 +4,7 @@ EverGrandeCity_MapScripts:: @ 814D4D5 EverGrandeCity_MapScript1_14D4DB:: @ 814D4DB checkflag 2090 - callif 1, EverGrandeCity_EventScript_1A02C1 + call_if 1, EverGrandeCity_EventScript_1A02C1 end EverGrandeCity_EventScript_14D4E5:: @ 814D4E5 diff --git a/data/scripts/maps/EverGrandeCity_ChampionsRoom.inc b/data/scripts/maps/EverGrandeCity_ChampionsRoom.inc index bddcfa74b..90df9ab4e 100644 --- a/data/scripts/maps/EverGrandeCity_ChampionsRoom.inc +++ b/data/scripts/maps/EverGrandeCity_ChampionsRoom.inc @@ -13,7 +13,7 @@ EverGrandeCity_ChampionsRoom_MapScript2_15B7C5:: @ 815B7C5 .2byte 0 EverGrandeCity_ChampionsRoom_EventScript_15B7CF:: @ 815B7CF - spriteface 255, 2 + turnobject 255, 2 end EverGrandeCity_ChampionsRoom_MapScript2_15B7D4:: @ 815B7D4 @@ -22,13 +22,13 @@ EverGrandeCity_ChampionsRoom_MapScript2_15B7D4:: @ 815B7D4 EverGrandeCity_ChampionsRoom_EventScript_15B7DE:: @ 815B7DE lockall - move 255, EverGrandeCity_ChampionsRoom_Movement_1A084E - waitmove 0 - pause 40 - move 255, EverGrandeCity_ChampionsRoom_Movement_15B802 - waitmove 0 + applymovement 255, EverGrandeCity_ChampionsRoom_Movement_1A084E + waitmovement 0 + delay 40 + applymovement 255, EverGrandeCity_ChampionsRoom_Movement_15B802 + waitmovement 0 setvar 0x4001, 1 - jump EverGrandeCity_ChampionsRoom_EventScript_15B805 + goto EverGrandeCity_ChampionsRoom_EventScript_15B805 releaseall end @@ -38,104 +38,104 @@ EverGrandeCity_ChampionsRoom_Movement_15B802:: @ 815B802 step_end EverGrandeCity_ChampionsRoom_EventScript_15B805:: @ 815B805 - playmusic 454, 0 + playbgm 454, 0 msgbox EverGrandeCity_ChampionsRoom_Text_190F9C, 4 trainerbattle 3, OPPONENT_STEVEN, 0, EverGrandeCity_ChampionsRoom_Text_1910A0 - jump EverGrandeCity_ChampionsRoom_EventScript_15B821 + goto EverGrandeCity_ChampionsRoom_EventScript_15B821 end EverGrandeCity_ChampionsRoom_EventScript_15B821:: @ 815B821 - playsfx 8 + playse 8 setmaptile 6, 1, 838, 0 setmaptile 6, 2, 839, 0 special DrawWholeMapView msgbox EverGrandeCity_ChampionsRoom_Text_1910FE, 4 - closebutton - playsfx 8 - checkgender + closemessage + playse 8 + checkplayergender compare RESULT, 0 - callif 1, EverGrandeCity_ChampionsRoom_EventScript_15B87C + call_if 1, EverGrandeCity_ChampionsRoom_EventScript_15B87C compare RESULT, 1 - callif 1, EverGrandeCity_ChampionsRoom_EventScript_15B881 - reappear 2 + call_if 1, EverGrandeCity_ChampionsRoom_EventScript_15B881 + addobject 2 call EverGrandeCity_ChampionsRoom_EventScript_15B9BD - checkgender + checkplayergender compare RESULT, 0 - jumpeq EverGrandeCity_ChampionsRoom_EventScript_15B886 + goto_if_eq EverGrandeCity_ChampionsRoom_EventScript_15B886 compare RESULT, 1 - jumpeq EverGrandeCity_ChampionsRoom_EventScript_15B8BB + goto_if_eq EverGrandeCity_ChampionsRoom_EventScript_15B8BB end EverGrandeCity_ChampionsRoom_EventScript_15B87C:: @ 815B87C - playmusic 415, 0 + playbgm 415, 0 return EverGrandeCity_ChampionsRoom_EventScript_15B881:: @ 815B881 - playmusic 421, 0 + playbgm 421, 0 return EverGrandeCity_ChampionsRoom_EventScript_15B886:: @ 815B886 msgbox EverGrandeCity_ChampionsRoom_Text_191225, 4 - pause 40 - playsfx 21 - move 2, EverGrandeCity_ChampionsRoom_Movement_1A0833 - waitmove 0 - move 2, EverGrandeCity_ChampionsRoom_Movement_1A0835 - waitmove 0 + delay 40 + playse 21 + applymovement 2, EverGrandeCity_ChampionsRoom_Movement_1A0833 + waitmovement 0 + applymovement 2, EverGrandeCity_ChampionsRoom_Movement_1A0835 + waitmovement 0 call EverGrandeCity_ChampionsRoom_EventScript_15B9D2 msgbox EverGrandeCity_ChampionsRoom_Text_191268, 4 - jump EverGrandeCity_ChampionsRoom_EventScript_15B8F0 + goto EverGrandeCity_ChampionsRoom_EventScript_15B8F0 end EverGrandeCity_ChampionsRoom_EventScript_15B8BB:: @ 815B8BB msgbox EverGrandeCity_ChampionsRoom_Text_1912B3, 4 - pause 40 - playsfx 21 - move 2, EverGrandeCity_ChampionsRoom_Movement_1A0833 - waitmove 0 - move 2, EverGrandeCity_ChampionsRoom_Movement_1A0835 - waitmove 0 + delay 40 + playse 21 + applymovement 2, EverGrandeCity_ChampionsRoom_Movement_1A0833 + waitmovement 0 + applymovement 2, EverGrandeCity_ChampionsRoom_Movement_1A0835 + waitmovement 0 call EverGrandeCity_ChampionsRoom_EventScript_15B9D2 msgbox EverGrandeCity_ChampionsRoom_Text_191305, 4 - jump EverGrandeCity_ChampionsRoom_EventScript_15B8F0 + goto EverGrandeCity_ChampionsRoom_EventScript_15B8F0 end EverGrandeCity_ChampionsRoom_EventScript_15B8F0:: @ 815B8F0 - closebutton - reappear 3 - move 3, EverGrandeCity_ChampionsRoom_Movement_15BA03 - waitmove 0 - move 255, EverGrandeCity_ChampionsRoom_Movement_1A0843 - waitmove 0 + closemessage + addobject 3 + applymovement 3, EverGrandeCity_ChampionsRoom_Movement_15BA03 + waitmovement 0 + applymovement 255, EverGrandeCity_ChampionsRoom_Movement_1A0843 + waitmovement 0 msgbox EverGrandeCity_ChampionsRoom_Text_19134D, 4 call EverGrandeCity_ChampionsRoom_EventScript_1A03B0 msgbox EverGrandeCity_ChampionsRoom_Text_1914C6, 4 - move 1, EverGrandeCity_ChampionsRoom_Movement_1A0841 - waitmove 0 - pause 20 - move 1, EverGrandeCity_ChampionsRoom_Movement_1A0845 - waitmove 0 + applymovement 1, EverGrandeCity_ChampionsRoom_Movement_1A0841 + waitmovement 0 + delay 20 + applymovement 1, EverGrandeCity_ChampionsRoom_Movement_1A0845 + waitmovement 0 msgbox EverGrandeCity_ChampionsRoom_Text_191512, 4 - closebutton - pause 30 - move 1, EverGrandeCity_ChampionsRoom_Movement_15B9FB - move 255, EverGrandeCity_ChampionsRoom_Movement_15B9DD - move 3, EverGrandeCity_ChampionsRoom_Movement_1A0841 - move 2, EverGrandeCity_ChampionsRoom_Movement_15B9F8 - waitmove 0 - pause 20 - move 255, EverGrandeCity_ChampionsRoom_Movement_1A0845 - waitmove 0 + closemessage + delay 30 + applymovement 1, EverGrandeCity_ChampionsRoom_Movement_15B9FB + applymovement 255, EverGrandeCity_ChampionsRoom_Movement_15B9DD + applymovement 3, EverGrandeCity_ChampionsRoom_Movement_1A0841 + applymovement 2, EverGrandeCity_ChampionsRoom_Movement_15B9F8 + waitmovement 0 + delay 20 + applymovement 255, EverGrandeCity_ChampionsRoom_Movement_1A0845 + waitmovement 0 msgbox EverGrandeCity_ChampionsRoom_Text_191546, 4 - checkgender + checkplayergender compare RESULT, 0 - callif 1, EverGrandeCity_ChampionsRoom_EventScript_15B9AB + call_if 1, EverGrandeCity_ChampionsRoom_EventScript_15B9AB compare RESULT, 1 - callif 1, EverGrandeCity_ChampionsRoom_EventScript_15B9B4 - closebutton - move 1, EverGrandeCity_ChampionsRoom_Movement_15B9FF - move 255, EverGrandeCity_ChampionsRoom_Movement_15B9E0 - waitmove 0 + call_if 1, EverGrandeCity_ChampionsRoom_EventScript_15B9B4 + closemessage + applymovement 1, EverGrandeCity_ChampionsRoom_Movement_15B9FF + applymovement 255, EverGrandeCity_ChampionsRoom_Movement_15B9E0 + waitmovement 0 setflag 781 warp EverGrandeCity_HallOfFame, 255, 7, 16 waitstate @@ -151,15 +151,15 @@ EverGrandeCity_ChampionsRoom_EventScript_15B9B4:: @ 815B9B4 return EverGrandeCity_ChampionsRoom_EventScript_15B9BD:: @ 815B9BD - move 2, EverGrandeCity_ChampionsRoom_Movement_15B9E6 - waitmove 0 - move 255, EverGrandeCity_ChampionsRoom_Movement_1A083F - waitmove 0 + applymovement 2, EverGrandeCity_ChampionsRoom_Movement_15B9E6 + waitmovement 0 + applymovement 255, EverGrandeCity_ChampionsRoom_Movement_1A083F + waitmovement 0 return EverGrandeCity_ChampionsRoom_EventScript_15B9D2:: @ 815B9D2 - move 2, EverGrandeCity_ChampionsRoom_Movement_15B9EF - waitmove 0 + applymovement 2, EverGrandeCity_ChampionsRoom_Movement_15B9EF + waitmovement 0 return EverGrandeCity_ChampionsRoom_Movement_15B9DD:: @ 815B9DD diff --git a/data/scripts/maps/EverGrandeCity_Corridor1.inc b/data/scripts/maps/EverGrandeCity_Corridor1.inc index 499ad673f..104504960 100644 --- a/data/scripts/maps/EverGrandeCity_Corridor1.inc +++ b/data/scripts/maps/EverGrandeCity_Corridor1.inc @@ -7,5 +7,5 @@ EverGrandeCity_Corridor1_MapScript2_15BA12:: @ 815BA12 .2byte 0 EverGrandeCity_Corridor1_EventScript_15BA1C:: @ 815BA1C - spriteface 255, 2 + turnobject 255, 2 end diff --git a/data/scripts/maps/EverGrandeCity_Corridor2.inc b/data/scripts/maps/EverGrandeCity_Corridor2.inc index 692de1ed9..c7c049020 100644 --- a/data/scripts/maps/EverGrandeCity_Corridor2.inc +++ b/data/scripts/maps/EverGrandeCity_Corridor2.inc @@ -7,5 +7,5 @@ EverGrandeCity_Corridor2_MapScript2_15BA27:: @ 815BA27 .2byte 0 EverGrandeCity_Corridor2_EventScript_15BA31:: @ 815BA31 - spriteface 255, 2 + turnobject 255, 2 end diff --git a/data/scripts/maps/EverGrandeCity_Corridor3.inc b/data/scripts/maps/EverGrandeCity_Corridor3.inc index f8ed19669..1714db5cc 100644 --- a/data/scripts/maps/EverGrandeCity_Corridor3.inc +++ b/data/scripts/maps/EverGrandeCity_Corridor3.inc @@ -7,5 +7,5 @@ EverGrandeCity_Corridor3_MapScript2_15BA3C:: @ 815BA3C .2byte 0 EverGrandeCity_Corridor3_EventScript_15BA46:: @ 815BA46 - spriteface 255, 2 + turnobject 255, 2 end diff --git a/data/scripts/maps/EverGrandeCity_Corridor4.inc b/data/scripts/maps/EverGrandeCity_Corridor4.inc index 616a25ec5..64cc234eb 100644 --- a/data/scripts/maps/EverGrandeCity_Corridor4.inc +++ b/data/scripts/maps/EverGrandeCity_Corridor4.inc @@ -7,5 +7,5 @@ EverGrandeCity_Corridor4_MapScript2_15BA51:: @ 815BA51 .2byte 0 EverGrandeCity_Corridor4_EventScript_15BA5B:: @ 815BA5B - spriteface 255, 2 + turnobject 255, 2 end diff --git a/data/scripts/maps/EverGrandeCity_Corridor5.inc b/data/scripts/maps/EverGrandeCity_Corridor5.inc index 783b03aec..73c0b5a84 100644 --- a/data/scripts/maps/EverGrandeCity_Corridor5.inc +++ b/data/scripts/maps/EverGrandeCity_Corridor5.inc @@ -7,5 +7,5 @@ EverGrandeCity_Corridor5_MapScript2_15BA66:: @ 815BA66 .2byte 0 EverGrandeCity_Corridor5_EventScript_15BA70:: @ 815BA70 - spriteface 255, 2 + turnobject 255, 2 end diff --git a/data/scripts/maps/EverGrandeCity_DrakesRoom.inc b/data/scripts/maps/EverGrandeCity_DrakesRoom.inc index d10957a8e..3d3d56ff9 100644 --- a/data/scripts/maps/EverGrandeCity_DrakesRoom.inc +++ b/data/scripts/maps/EverGrandeCity_DrakesRoom.inc @@ -9,7 +9,7 @@ EverGrandeCity_DrakesRoom_MapScripts:: @ 815B70D .2byte 0 EverGrandeCity_DrakesRoom_EventScript_15B727:: @ 815B727 - spriteface 255, 2 + turnobject 255, 2 end EverGrandeCity_DrakesRoom_MapScript2_15B72C:: @ 815B72C @@ -25,9 +25,9 @@ EverGrandeCity_DrakesRoom_EventScript_15B736:: @ 815B736 EverGrandeCity_DrakesRoom_MapScript1_15B743:: @ 815B743 checkflag 1248 - callif 1, EverGrandeCity_DrakesRoom_EventScript_15B758 + call_if 1, EverGrandeCity_DrakesRoom_EventScript_15B758 compare 0x409c, 4 - callif 1, EverGrandeCity_DrakesRoom_EventScript_15B75E + call_if 1, EverGrandeCity_DrakesRoom_EventScript_15B75E end EverGrandeCity_DrakesRoom_EventScript_15B758:: @ 815B758 @@ -42,11 +42,11 @@ EverGrandeCity_DrakesRoom_EventScript_15B764:: @ 815B764 lock faceplayer checkflag 1248 - jumpeq EverGrandeCity_DrakesRoom_EventScript_15B78B - playmusic 450, 0 + goto_if_eq EverGrandeCity_DrakesRoom_EventScript_15B78B + playbgm 450, 0 msgbox EverGrandeCity_DrakesRoom_Text_190CEB, 4 trainerbattle 3, OPPONENT_DRAKE, 0, EverGrandeCity_DrakesRoom_Text_190E42 - jump EverGrandeCity_DrakesRoom_EventScript_15B795 + goto EverGrandeCity_DrakesRoom_EventScript_15B795 end EverGrandeCity_DrakesRoom_EventScript_15B78B:: @ 815B78B diff --git a/data/scripts/maps/EverGrandeCity_GlaciasRoom.inc b/data/scripts/maps/EverGrandeCity_GlaciasRoom.inc index 039b2a772..07f6e8877 100644 --- a/data/scripts/maps/EverGrandeCity_GlaciasRoom.inc +++ b/data/scripts/maps/EverGrandeCity_GlaciasRoom.inc @@ -9,7 +9,7 @@ EverGrandeCity_GlaciasRoom_MapScript2_15B683:: @ 815B683 .2byte 0 EverGrandeCity_GlaciasRoom_EventScript_15B68D:: @ 815B68D - spriteface 255, 2 + turnobject 255, 2 end EverGrandeCity_GlaciasRoom_MapScript2_15B692:: @ 815B692 @@ -25,9 +25,9 @@ EverGrandeCity_GlaciasRoom_EventScript_15B69C:: @ 815B69C EverGrandeCity_GlaciasRoom_MapScript1_15B6A9:: @ 815B6A9 checkflag 1247 - callif 1, EverGrandeCity_GlaciasRoom_EventScript_15B6BE + call_if 1, EverGrandeCity_GlaciasRoom_EventScript_15B6BE compare 0x409c, 3 - callif 1, EverGrandeCity_GlaciasRoom_EventScript_15B6C4 + call_if 1, EverGrandeCity_GlaciasRoom_EventScript_15B6C4 end EverGrandeCity_GlaciasRoom_EventScript_15B6BE:: @ 815B6BE @@ -42,11 +42,11 @@ EverGrandeCity_GlaciasRoom_EventScript_15B6CA:: @ 815B6CA lock faceplayer checkflag 1247 - jumpeq EverGrandeCity_GlaciasRoom_EventScript_15B6F1 - playmusic 450, 0 + goto_if_eq EverGrandeCity_GlaciasRoom_EventScript_15B6F1 + playbgm 450, 0 msgbox EverGrandeCity_GlaciasRoom_Text_190AF9, 4 trainerbattle 3, OPPONENT_GLACIA, 0, EverGrandeCity_GlaciasRoom_Text_190C01 - jump EverGrandeCity_GlaciasRoom_EventScript_15B6FB + goto EverGrandeCity_GlaciasRoom_EventScript_15B6FB end EverGrandeCity_GlaciasRoom_EventScript_15B6F1:: @ 815B6F1 diff --git a/data/scripts/maps/EverGrandeCity_HallOfFame.inc b/data/scripts/maps/EverGrandeCity_HallOfFame.inc index 175990328..d9baaee89 100644 --- a/data/scripts/maps/EverGrandeCity_HallOfFame.inc +++ b/data/scripts/maps/EverGrandeCity_HallOfFame.inc @@ -8,7 +8,7 @@ EverGrandeCity_HallOfFame_MapScript2_15BB8F:: @ 815BB8F .2byte 0 EverGrandeCity_HallOfFame_EventScript_15BB99:: @ 815BB99 - spriteface 255, 2 + turnobject 255, 2 end EverGrandeCity_HallOfFame_MapScript2_15BB9E:: @ 815BB9E @@ -17,37 +17,37 @@ EverGrandeCity_HallOfFame_MapScript2_15BB9E:: @ 815BB9E EverGrandeCity_HallOfFame_EventScript_15BBA8:: @ 815BBA8 lockall - move 1, EverGrandeCity_HallOfFame_Movement_15BC59 - move 255, EverGrandeCity_HallOfFame_Movement_15BC59 - waitmove 0 - move 1, EverGrandeCity_HallOfFame_Movement_1A0843 - move 255, EverGrandeCity_HallOfFame_Movement_1A083F - waitmove 0 + applymovement 1, EverGrandeCity_HallOfFame_Movement_15BC59 + applymovement 255, EverGrandeCity_HallOfFame_Movement_15BC59 + waitmovement 0 + applymovement 1, EverGrandeCity_HallOfFame_Movement_1A0843 + applymovement 255, EverGrandeCity_HallOfFame_Movement_1A083F + waitmovement 0 msgbox EverGrandeCity_HallOfFame_Text_191841, 4 - closebutton - move 1, EverGrandeCity_HallOfFame_Movement_15BC60 - move 255, EverGrandeCity_HallOfFame_Movement_15BC60 - waitmove 0 - pause 20 - move 1, EverGrandeCity_HallOfFame_Movement_1A0843 - move 255, EverGrandeCity_HallOfFame_Movement_1A083F - waitmove 0 + closemessage + applymovement 1, EverGrandeCity_HallOfFame_Movement_15BC60 + applymovement 255, EverGrandeCity_HallOfFame_Movement_15BC60 + waitmovement 0 + delay 20 + applymovement 1, EverGrandeCity_HallOfFame_Movement_1A0843 + applymovement 255, EverGrandeCity_HallOfFame_Movement_1A083F + waitmovement 0 msgbox EverGrandeCity_HallOfFame_Text_1918D7, 4 - closebutton - move 1, EverGrandeCity_HallOfFame_Movement_1A0841 - move 255, EverGrandeCity_HallOfFame_Movement_1A0841 - waitmove 0 - pause 20 - doanimation 62 - checkanimation 62 - pause 40 + closemessage + applymovement 1, EverGrandeCity_HallOfFame_Movement_1A0841 + applymovement 255, EverGrandeCity_HallOfFame_Movement_1A0841 + waitmovement 0 + delay 20 + dofieldeffect 62 + waitfieldeffect 62 + delay 40 setvar 0x4001, 1 call EverGrandeCity_HallOfFame_EventScript_19FC13 - checkgender + checkplayergender compare RESULT, 0 - jumpeq EverGrandeCity_HallOfFame_EventScript_15BC41 + goto_if_eq EverGrandeCity_HallOfFame_EventScript_15BC41 compare RESULT, 1 - jumpeq EverGrandeCity_HallOfFame_EventScript_15BC4D + goto_if_eq EverGrandeCity_HallOfFame_EventScript_15BC4D end EverGrandeCity_HallOfFame_EventScript_15BC41:: @ 815BC41 diff --git a/data/scripts/maps/EverGrandeCity_PhoebesRoom.inc b/data/scripts/maps/EverGrandeCity_PhoebesRoom.inc index 7e8ee131a..b7c1618ba 100644 --- a/data/scripts/maps/EverGrandeCity_PhoebesRoom.inc +++ b/data/scripts/maps/EverGrandeCity_PhoebesRoom.inc @@ -9,7 +9,7 @@ EverGrandeCity_PhoebesRoom_MapScript2_15B5E9:: @ 815B5E9 .2byte 0 EverGrandeCity_PhoebesRoom_EventScript_15B5F3:: @ 815B5F3 - spriteface 255, 2 + turnobject 255, 2 end EverGrandeCity_PhoebesRoom_MapScript2_15B5F8:: @ 815B5F8 @@ -25,9 +25,9 @@ EverGrandeCity_PhoebesRoom_EventScript_15B602:: @ 815B602 EverGrandeCity_PhoebesRoom_MapScript1_15B60F:: @ 815B60F checkflag 1246 - callif 1, EverGrandeCity_PhoebesRoom_EventScript_15B624 + call_if 1, EverGrandeCity_PhoebesRoom_EventScript_15B624 compare 0x409c, 2 - callif 1, EverGrandeCity_PhoebesRoom_EventScript_15B62A + call_if 1, EverGrandeCity_PhoebesRoom_EventScript_15B62A end EverGrandeCity_PhoebesRoom_EventScript_15B624:: @ 815B624 @@ -42,11 +42,11 @@ EverGrandeCity_PhoebesRoom_EventScript_15B630:: @ 815B630 lock faceplayer checkflag 1246 - jumpeq EverGrandeCity_PhoebesRoom_EventScript_15B657 - playmusic 450, 0 + goto_if_eq EverGrandeCity_PhoebesRoom_EventScript_15B657 + playbgm 450, 0 msgbox EverGrandeCity_PhoebesRoom_Text_1908F5, 4 trainerbattle 3, OPPONENT_PHOEBE, 0, EverGrandeCity_PhoebesRoom_Text_190A0C - jump EverGrandeCity_PhoebesRoom_EventScript_15B661 + goto EverGrandeCity_PhoebesRoom_EventScript_15B661 end EverGrandeCity_PhoebesRoom_EventScript_15B657:: @ 815B657 diff --git a/data/scripts/maps/EverGrandeCity_PokemonCenter_1F.inc b/data/scripts/maps/EverGrandeCity_PokemonCenter_1F.inc index 7c0b8b0a4..57262b211 100644 --- a/data/scripts/maps/EverGrandeCity_PokemonCenter_1F.inc +++ b/data/scripts/maps/EverGrandeCity_PokemonCenter_1F.inc @@ -10,7 +10,7 @@ EverGrandeCity_PokemonCenter_1F_EventScript_15BC70:: @ 815BC70 SootopolisCity_PokemonCenter_1F_EventScript_15BC70:: @ 815BC70 setvar 0x800b, 1 call SootopolisCity_PokemonCenter_1F_EventScript_19FD5B - waittext + waitmessage waitbutton release end diff --git a/data/scripts/maps/EverGrandeCity_PokemonLeague.inc b/data/scripts/maps/EverGrandeCity_PokemonLeague.inc index bfb3cdc1b..acbdac899 100644 --- a/data/scripts/maps/EverGrandeCity_PokemonLeague.inc +++ b/data/scripts/maps/EverGrandeCity_PokemonLeague.inc @@ -6,18 +6,18 @@ EverGrandeCity_PokemonLeague_MapScript1_15BA7B:: @ 815BA7B sethealplace 20 setflag 2132 checkflag 263 - callif 0, EverGrandeCity_PokemonLeague_EventScript_15BA8B + call_if 0, EverGrandeCity_PokemonLeague_EventScript_15BA8B end EverGrandeCity_PokemonLeague_EventScript_15BA8B:: @ 815BA8B - movespriteperm 3, 9, 2 - movespriteperm 4, 10, 2 + setobjectxyperm 3, 9, 2 + setobjectxyperm 4, 10, 2 return EverGrandeCity_PokemonLeague_EventScript_15BA9A:: @ 815BA9A setvar 0x800b, 1 call EverGrandeCity_PokemonLeague_EventScript_19FD5B - waittext + waitmessage waitbutton release end @@ -26,7 +26,7 @@ EverGrandeCity_PokemonLeague_EventScript_15BAA8:: @ 815BAA8 lock faceplayer message EverGrandeCity_PokemonLeague_Text_1A0BE4 - waittext + waitmessage pokemart EverGrandeCity_PokemonLeague_Items msgbox EverGrandeCity_PokemonLeague_Text_1A0C02, 4 release @@ -48,56 +48,56 @@ EverGrandeCity_PokemonLeague_Items:: @ 815BAC0 EverGrandeCity_PokemonLeague_EventScript_15BAD2:: @ 815BAD2 lockall checkflag 263 - jumpeq EverGrandeCity_PokemonLeague_EventScript_15BB57 + goto_if_eq EverGrandeCity_PokemonLeague_EventScript_15BB57 getplayerxy 0x4000, 0x4001 compare 0x4000, 11 - callif 4, EverGrandeCity_PokemonLeague_EventScript_15BB34 + call_if 4, EverGrandeCity_PokemonLeague_EventScript_15BB34 compare 0x4000, 8 - callif 3, EverGrandeCity_PokemonLeague_EventScript_15BB3F + call_if 3, EverGrandeCity_PokemonLeague_EventScript_15BB3F message EverGrandeCity_PokemonLeague_Text_1916FD - waittext - pause 75 + waitmessage + delay 75 checkflag 2060 - jumpif 0, EverGrandeCity_PokemonLeague_EventScript_15BB4A - closebutton - move 3, EverGrandeCity_PokemonLeague_Movement_15BB7E - move 4, EverGrandeCity_PokemonLeague_Movement_15BB81 - waitmove 0 - pause 10 - fanfare 369 + goto_if 0, EverGrandeCity_PokemonLeague_EventScript_15BB4A + closemessage + applymovement 3, EverGrandeCity_PokemonLeague_Movement_15BB7E + applymovement 4, EverGrandeCity_PokemonLeague_Movement_15BB81 + waitmovement 0 + delay 10 + playfanfare 369 message EverGrandeCity_PokemonLeague_Text_191804 - waittext + waitmessage waitfanfare - closebutton - moveoffscreen 3 - moveoffscreen 4 + closemessage + moveobjectoffscreen 3 + moveobjectoffscreen 4 setflag 263 releaseall end EverGrandeCity_PokemonLeague_EventScript_15BB34:: @ 815BB34 - move 255, EverGrandeCity_PokemonLeague_Movement_15BB76 - waitmove 0 + applymovement 255, EverGrandeCity_PokemonLeague_Movement_15BB76 + waitmovement 0 return EverGrandeCity_PokemonLeague_EventScript_15BB3F:: @ 815BB3F - move 255, EverGrandeCity_PokemonLeague_Movement_15BB7A - waitmove 0 + applymovement 255, EverGrandeCity_PokemonLeague_Movement_15BB7A + waitmovement 0 return EverGrandeCity_PokemonLeague_EventScript_15BB4A:: @ 815BB4A - playsfx 32 + playse 32 msgbox EverGrandeCity_PokemonLeague_Text_19179C, 4 releaseall end EverGrandeCity_PokemonLeague_EventScript_15BB57:: @ 815BB57 - move LAST_TALKED, EverGrandeCity_PokemonLeague_Movement_1A0839 - waitmove 0 + applymovement LAST_TALKED, EverGrandeCity_PokemonLeague_Movement_1A0839 + waitmovement 0 msgbox EverGrandeCity_PokemonLeague_Text_191804, 4 - closebutton - move LAST_TALKED, EverGrandeCity_PokemonLeague_Movement_1A083D - waitmove 0 + closemessage + applymovement LAST_TALKED, EverGrandeCity_PokemonLeague_Movement_1A083D + waitmovement 0 releaseall end diff --git a/data/scripts/maps/EverGrandeCity_SidneysRoom.inc b/data/scripts/maps/EverGrandeCity_SidneysRoom.inc index 84a6c3fdc..daca98176 100644 --- a/data/scripts/maps/EverGrandeCity_SidneysRoom.inc +++ b/data/scripts/maps/EverGrandeCity_SidneysRoom.inc @@ -6,9 +6,9 @@ EverGrandeCity_SidneysRoom_MapScripts:: @ 815B53F EverGrandeCity_SidneysRoom_MapScript1_15B54F:: @ 815B54F checkflag 1245 - callif 1, EverGrandeCity_SidneysRoom_EventScript_15B564 + call_if 1, EverGrandeCity_SidneysRoom_EventScript_15B564 compare 0x409c, 1 - callif 1, EverGrandeCity_SidneysRoom_EventScript_15B56A + call_if 1, EverGrandeCity_SidneysRoom_EventScript_15B56A end EverGrandeCity_SidneysRoom_EventScript_15B564:: @ 815B564 @@ -25,7 +25,7 @@ EverGrandeCity_SidneysRoom_MapScript2_15B570:: @ 815B570 .2byte 0 EverGrandeCity_SidneysRoom_EventScript_15B57A:: @ 815B57A - spriteface 255, 2 + turnobject 255, 2 end EverGrandeCity_SidneysRoom_MapScript2_15B57F:: @ 815B57F @@ -43,11 +43,11 @@ EverGrandeCity_SidneysRoom_EventScript_15B596:: @ 815B596 lock faceplayer checkflag 1245 - jumpeq EverGrandeCity_SidneysRoom_EventScript_15B5BD - playmusic 450, 0 + goto_if_eq EverGrandeCity_SidneysRoom_EventScript_15B5BD + playbgm 450, 0 msgbox EverGrandeCity_SidneysRoom_Text_190728, 4 trainerbattle 3, OPPONENT_SIDNEY, 0, EverGrandeCity_SidneysRoom_Text_190823 - jump EverGrandeCity_SidneysRoom_EventScript_15B5C7 + goto EverGrandeCity_SidneysRoom_EventScript_15B5C7 end EverGrandeCity_SidneysRoom_EventScript_15B5BD:: @ 815B5BD diff --git a/data/scripts/maps/FallarborTown.inc b/data/scripts/maps/FallarborTown.inc index a48be5b24..13c8a9f2e 100644 --- a/data/scripts/maps/FallarborTown.inc +++ b/data/scripts/maps/FallarborTown.inc @@ -13,7 +13,7 @@ FallarborTown_EventScript_14E7F5:: @ 814E7F5 lock faceplayer checkflag 139 - jumpeq FallarborTown_EventScript_14E80A + goto_if_eq FallarborTown_EventScript_14E80A msgbox FallarborTown_Text_16C7FF, 4 release end @@ -34,8 +34,8 @@ FallarborTown_EventScript_14E81D:: @ 814E81D FallarborTown_EventScript_14E826:: @ 814E826 lock faceplayer - checksound - pokecry SPECIES_AZURILL, 0 + waitse + playpokecry SPECIES_AZURILL, 0 msgbox FallarborTown_Text_16C92C, 4 waitpokecry release diff --git a/data/scripts/maps/FallarborTown_ContestLobby.inc b/data/scripts/maps/FallarborTown_ContestLobby.inc index ed67d922d..c4c590b53 100644 --- a/data/scripts/maps/FallarborTown_ContestLobby.inc +++ b/data/scripts/maps/FallarborTown_ContestLobby.inc @@ -20,28 +20,28 @@ FallarborTown_ContestLobby_EventScript_1539CD:: @ 81539CD FallarborTown_ContestLobby_EventScript_1539F8:: @ 81539F8 lockall - move 1, FallarborTown_ContestLobby_Movement_153A7C - waitmove 0 - playsfx 71 + applymovement 1, FallarborTown_ContestLobby_Movement_153A7C + waitmovement 0 + playse 71 setmaptile 4, 2, 545, 1 setmaptile 4, 3, 609, 1 special DrawWholeMapView - move 1, FallarborTown_ContestLobby_Movement_153A7F - waitmove 0 - playsfx 71 + applymovement 1, FallarborTown_ContestLobby_Movement_153A7F + waitmovement 0 + playse 71 setmaptile 4, 2, 721, 1 setmaptile 4, 3, 729, 1 special DrawWholeMapView - pause 20 - move 1, FallarborTown_ContestLobby_Movement_153A8C - waitmove 0 - move 255, FallarborTown_ContestLobby_Movement_153A7A - waitmove 0 + delay 20 + applymovement 1, FallarborTown_ContestLobby_Movement_153A8C + waitmovement 0 + applymovement 255, FallarborTown_ContestLobby_Movement_153A7A + waitmovement 0 msgbox FallarborTown_ContestLobby_Text_1A6832, 4 - closebutton - move 1, FallarborTown_ContestLobby_Movement_153A83 - move 255, FallarborTown_ContestLobby_Movement_153A70 - waitmove 0 + closemessage + applymovement 1, FallarborTown_ContestLobby_Movement_153A83 + applymovement 255, FallarborTown_ContestLobby_Movement_153A70 + waitmovement 0 releaseall return @@ -93,7 +93,7 @@ FallarborTown_ContestLobby_EventScript_153A8E:: @ 8153A8E FallarborTown_ContestLobby_EventScript_153A97:: @ 8153A97 checkflag 270 - jumpeq FallarborTown_ContestLobby_EventScript_153AA9 + goto_if_eq FallarborTown_ContestLobby_EventScript_153AA9 msgbox FallarborTown_ContestLobby_Text_177246, 2 end @@ -108,7 +108,7 @@ FallarborTown_ContestLobby_EventScript_153AB2:: @ 8153AB2 FallarborTown_ContestLobby_EventScript_153ABB:: @ 8153ABB lockall fadescreen 1 - showcontestwinner 2 + drawcontestwinner 2 releaseall end @@ -116,6 +116,6 @@ FallarborTown_ContestLobby_EventScript_153AC2:: @ 8153AC2 lockall special ShowBerryBlenderRecordWindow waitbutton - hidebox 0, 0, 29, 19 + erasebox 0, 0, 29, 19 releaseall end diff --git a/data/scripts/maps/FallarborTown_House1.inc b/data/scripts/maps/FallarborTown_House1.inc index 8a44cdcfb..0228fe25d 100644 --- a/data/scripts/maps/FallarborTown_House1.inc +++ b/data/scripts/maps/FallarborTown_House1.inc @@ -9,25 +9,25 @@ FallarborTown_House1_EventScript_153BB5:: @ 8153BB5 lock faceplayer checkflag 229 - jumpeq FallarborTown_House1_EventScript_153C54 + goto_if_eq FallarborTown_House1_EventScript_153C54 checkitem ITEM_METEORITE, 1 compare RESULT, 1 - jumpeq FallarborTown_House1_EventScript_153BDA + goto_if_eq FallarborTown_House1_EventScript_153BDA msgbox FallarborTown_House1_Text_177755, 4 release end FallarborTown_House1_EventScript_153BDA:: @ 8153BDA checkflag 2 - callif 0, FallarborTown_House1_EventScript_153C2D + call_if 0, FallarborTown_House1_EventScript_153C2D checkflag 2 - callif 1, FallarborTown_House1_EventScript_153C3E + call_if 1, FallarborTown_House1_EventScript_153C3E compare RESULT, 0 - jumpeq FallarborTown_House1_EventScript_153C47 + goto_if_eq FallarborTown_House1_EventScript_153C47 msgbox FallarborTown_House1_Text_1778C4, 4 giveitem ITEM_TM27 compare RESULT, 0 - jumpeq FallarborTown_House1_EventScript_1A029B + goto_if_eq FallarborTown_House1_EventScript_1A029B setvar 0x8004, 280 call FallarborTown_House1_EventScript_1A067F setflag 229 @@ -59,9 +59,9 @@ FallarborTown_House1_EventScript_153C5E:: @ 8153C5E lock faceplayer checkflag 229 - jumpeq FallarborTown_House1_EventScript_153C86 + goto_if_eq FallarborTown_House1_EventScript_153C86 checkflag 139 - jumpeq FallarborTown_House1_EventScript_153C7C + goto_if_eq FallarborTown_House1_EventScript_153C7C msgbox FallarborTown_House1_Text_177A2B, 4 release end diff --git a/data/scripts/maps/FallarborTown_House2.inc b/data/scripts/maps/FallarborTown_House2.inc index 1351b96d3..3b215a697 100644 --- a/data/scripts/maps/FallarborTown_House2.inc +++ b/data/scripts/maps/FallarborTown_House2.inc @@ -3,23 +3,23 @@ FallarborTown_House2_MapScripts:: @ 8153C90 FallarborTown_House2_EventScript_153C91:: @ 8153C91 lockall - move 1, FallarborTown_House2_Movement_1A0839 - waitmove 0 + applymovement 1, FallarborTown_House2_Movement_1A0839 + waitmovement 0 checkflag 1 - jumpeq FallarborTown_House2_EventScript_153CB6 + goto_if_eq FallarborTown_House2_EventScript_153CB6 msgbox FallarborTown_House2_Text_177AF4, 4 setflag 1 - jump FallarborTown_House2_EventScript_153CB6 + goto FallarborTown_House2_EventScript_153CB6 end FallarborTown_House2_EventScript_153CB6:: @ 8153CB6 checkitem ITEM_HEART_SCALE, 1 compare RESULT, 0 - jumpeq FallarborTown_House2_EventScript_153D60 + goto_if_eq FallarborTown_House2_EventScript_153D60 msgbox FallarborTown_House2_Text_177BDB, 5 switch RESULT case 0, FallarborTown_House2_EventScript_153D60 - jump FallarborTown_House2_EventScript_153CE4 + goto FallarborTown_House2_EventScript_153CE4 end FallarborTown_House2_EventScript_153CE4:: @ 8153CE4 @@ -27,13 +27,13 @@ FallarborTown_House2_EventScript_153CE4:: @ 8153CE4 special sub_80F9A4C waitstate compare 0x8004, 255 - jumpeq FallarborTown_House2_EventScript_153D60 + goto_if_eq FallarborTown_House2_EventScript_153D60 special sub_80FA148 compare RESULT, 1 - jumpeq FallarborTown_House2_EventScript_153D52 + goto_if_eq FallarborTown_House2_EventScript_153D52 compare 0x8005, 0 - jumpeq FallarborTown_House2_EventScript_153D44 - jump FallarborTown_House2_EventScript_153D1A + goto_if_eq FallarborTown_House2_EventScript_153D44 + goto FallarborTown_House2_EventScript_153D1A end FallarborTown_House2_EventScript_153D1A:: @ 8153D1A @@ -41,20 +41,20 @@ FallarborTown_House2_EventScript_153D1A:: @ 8153D1A special sub_8132670 waitstate compare 0x8004, 0 - jumpeq FallarborTown_House2_EventScript_153CE4 + goto_if_eq FallarborTown_House2_EventScript_153CE4 msgbox FallarborTown_House2_Text_177CC3, 4 removeitem ITEM_HEART_SCALE, 1 - jump FallarborTown_House2_EventScript_153D60 + goto FallarborTown_House2_EventScript_153D60 end FallarborTown_House2_EventScript_153D44:: @ 8153D44 msgbox FallarborTown_House2_Text_177C78, 4 - jump FallarborTown_House2_EventScript_153CE4 + goto FallarborTown_House2_EventScript_153CE4 end FallarborTown_House2_EventScript_153D52:: @ 8153D52 msgbox FallarborTown_House2_Text_177D33, 4 - jump FallarborTown_House2_EventScript_153CE4 + goto FallarborTown_House2_EventScript_153CE4 end FallarborTown_House2_EventScript_153D60:: @ 8153D60 diff --git a/data/scripts/maps/FallarborTown_Mart.inc b/data/scripts/maps/FallarborTown_Mart.inc index 4b66546e8..e6f715697 100644 --- a/data/scripts/maps/FallarborTown_Mart.inc +++ b/data/scripts/maps/FallarborTown_Mart.inc @@ -5,7 +5,7 @@ FallarborTown_Mart_EventScript_153967:: @ 8153967 lock faceplayer message FallarborTown_Mart_Text_1A0BE4 - waittext + waitmessage pokemart FallarborTown_Mart_Items msgbox FallarborTown_Mart_Text_1A0C02, 4 release @@ -40,8 +40,8 @@ FallarborTown_Mart_EventScript_1539A5:: @ 81539A5 FallarborTown_Mart_EventScript_1539AE:: @ 81539AE lock faceplayer - checksound - pokecry SPECIES_SKITTY, 0 + waitse + playpokecry SPECIES_SKITTY, 0 msgbox FallarborTown_Mart_Text_1770D3, 4 waitpokecry release diff --git a/data/scripts/maps/FallarborTown_PokemonCenter_1F.inc b/data/scripts/maps/FallarborTown_PokemonCenter_1F.inc index 636cac8f1..5b1f1c948 100644 --- a/data/scripts/maps/FallarborTown_PokemonCenter_1F.inc +++ b/data/scripts/maps/FallarborTown_PokemonCenter_1F.inc @@ -10,7 +10,7 @@ FallarborTown_PokemonCenter_1F_MapScript1_153AF9:: @ 8153AF9 FallarborTown_PokemonCenter_1F_EventScript_153B02:: @ 8153B02 setvar 0x800b, 1 call FallarborTown_PokemonCenter_1F_EventScript_19FD5B - waittext + waitmessage waitbutton release end @@ -27,27 +27,27 @@ FallarborTown_PokemonCenter_1F_EventScript_153B22:: @ 8153B22 lock faceplayer msgbox FallarborTown_PokemonCenter_1F_Text_1774D4, 4 - closebutton + closemessage switch FACING case 2, FallarborTown_PokemonCenter_1F_EventScript_153B49 case 3, FallarborTown_PokemonCenter_1F_EventScript_153B59 end FallarborTown_PokemonCenter_1F_EventScript_153B49:: @ 8153B49 - move 4, FallarborTown_PokemonCenter_1F_Movement_153B74 - waitmove 0 - jump FallarborTown_PokemonCenter_1F_EventScript_153B69 + applymovement 4, FallarborTown_PokemonCenter_1F_Movement_153B74 + waitmovement 0 + goto FallarborTown_PokemonCenter_1F_EventScript_153B69 end FallarborTown_PokemonCenter_1F_EventScript_153B59:: @ 8153B59 - move 4, FallarborTown_PokemonCenter_1F_Movement_153B81 - waitmove 0 - jump FallarborTown_PokemonCenter_1F_EventScript_153B69 + applymovement 4, FallarborTown_PokemonCenter_1F_Movement_153B81 + waitmovement 0 + goto FallarborTown_PokemonCenter_1F_EventScript_153B69 end FallarborTown_PokemonCenter_1F_EventScript_153B69:: @ 8153B69 - playsfx 18 - disappear 4 + playse 18 + removeobject 4 clearflag 870 release end diff --git a/data/scripts/maps/FortreeCity.inc b/data/scripts/maps/FortreeCity.inc index 7f9d5ae12..6ea89dcb7 100644 --- a/data/scripts/maps/FortreeCity.inc +++ b/data/scripts/maps/FortreeCity.inc @@ -19,7 +19,7 @@ FortreeCity_EventScript_14C95E:: @ 814C95E lock faceplayer checkflag 295 - jumpeq FortreeCity_EventScript_14C973 + goto_if_eq FortreeCity_EventScript_14C973 msgbox FortreeCity_Text_1675C2, 4 release end @@ -58,7 +58,7 @@ FortreeCity_EventScript_14C9B3:: @ 814C9B3 faceplayer checkitem ITEM_DEVON_SCOPE, 1 compare RESULT, 1 - jumpeq FortreeCity_EventScript_14C9CF + goto_if_eq FortreeCity_EventScript_14C9CF msgbox FortreeCity_Text_167868, 4 release end @@ -66,22 +66,22 @@ FortreeCity_EventScript_14C9B3:: @ 814C9B3 FortreeCity_EventScript_14C9CF:: @ 814C9CF msgbox FortreeCity_Text_16788B, 5 compare RESULT, 1 - jumpeq FortreeCity_EventScript_14C9E4 + goto_if_eq FortreeCity_EventScript_14C9E4 release end FortreeCity_EventScript_14C9E4:: @ 814C9E4 msgbox FortreeCity_Text_1678CB, 4 - closebutton - move LAST_TALKED, FortreeCity_Movement_1A0662 - waitmove 0 - checksound - pokecry SPECIES_KECLEON, 2 - pause 40 + closemessage + applymovement LAST_TALKED, FortreeCity_Movement_1A0662 + waitmovement 0 + waitse + playpokecry SPECIES_KECLEON, 2 + delay 40 waitpokecry - move LAST_TALKED, FortreeCity_Movement_14CA13 - waitmove 0 - disappear LAST_TALKED + applymovement LAST_TALKED, FortreeCity_Movement_14CA13 + waitmovement 0 + removeobject LAST_TALKED setflag 295 release end diff --git a/data/scripts/maps/FortreeCity_DecorationShop.inc b/data/scripts/maps/FortreeCity_DecorationShop.inc index c9d9fdd4e..fca20b866 100644 --- a/data/scripts/maps/FortreeCity_DecorationShop.inc +++ b/data/scripts/maps/FortreeCity_DecorationShop.inc @@ -13,7 +13,7 @@ FortreeCity_DecorationShop_EventScript_15826A:: @ 815826A lock faceplayer message FortreeCity_DecorationShop_Text_1A0BE4 - waittext + waitmessage pokemartdecor FortreeCity_DecorationShop_Decorations1 msgbox FortreeCity_DecorationShop_Text_1A0C02, 4 release @@ -37,7 +37,7 @@ FortreeCity_DecorationShop_EventScript_158298:: @ 8158298 lock faceplayer message FortreeCity_DecorationShop_Text_1A0BE4 - waittext + waitmessage pokemartdecor FortreeCity_DecorationShop_Decorations2 msgbox FortreeCity_DecorationShop_Text_1A0C02, 4 release diff --git a/data/scripts/maps/FortreeCity_Gym.inc b/data/scripts/maps/FortreeCity_Gym.inc index 44f5890a2..7309be0bb 100644 --- a/data/scripts/maps/FortreeCity_Gym.inc +++ b/data/scripts/maps/FortreeCity_Gym.inc @@ -18,27 +18,27 @@ FortreeCity_Gym_EventScript_157EEC:: @ 8157EEC FortreeCity_Gym_EventScript_157EF0:: @ 8157EF0 trainerbattle 1, OPPONENT_WINONA, 0, FortreeCity_Gym_Text_185CCB, FortreeCity_Gym_Text_185DBA, FortreeCity_Gym_EventScript_157F15 checkflag 170 - jumpif 0, FortreeCity_Gym_EventScript_157F3E + goto_if 0, FortreeCity_Gym_EventScript_157F3E msgbox FortreeCity_Gym_Text_185F98, 4 release end FortreeCity_Gym_EventScript_157F15:: @ 8157F15 message FortreeCity_Gym_Text_185E48 - waittext + waitmessage call FortreeCity_Gym_EventScript_1A02C5 msgbox FortreeCity_Gym_Text_185E73, 4 setflag 1225 setflag 2060 setvar 0x8008, 6 call FortreeCity_Gym_EventScript_1A01C0 - jump FortreeCity_Gym_EventScript_157F3E + goto FortreeCity_Gym_EventScript_157F3E end FortreeCity_Gym_EventScript_157F3E:: @ 8157F3E giveitem ITEM_TM40 compare RESULT, 0 - jumpeq FortreeCity_Gym_EventScript_1A029B + goto_if_eq FortreeCity_Gym_EventScript_1A029B msgbox FortreeCity_Gym_Text_185F4A, 4 setflag 170 release @@ -68,7 +68,7 @@ FortreeCity_Gym_EventScript_157FBE:: @ 8157FBE lock faceplayer checkflag 1225 - jumpeq FortreeCity_Gym_EventScript_157FD3 + goto_if_eq FortreeCity_Gym_EventScript_157FD3 msgbox FortreeCity_Gym_Text_18589C, 4 release end @@ -81,15 +81,15 @@ FortreeCity_Gym_EventScript_157FD3:: @ 8157FD3 FortreeCity_Gym_EventScript_157FDD:: @ 8157FDD lockall checkflag 2060 - jumpeq FortreeCity_Gym_EventScript_157FFD - jump FortreeCity_Gym_EventScript_158007 + goto_if_eq FortreeCity_Gym_EventScript_157FFD + goto FortreeCity_Gym_EventScript_158007 end FortreeCity_Gym_EventScript_157FED:: @ 8157FED lockall checkflag 2060 - jumpeq FortreeCity_Gym_EventScript_157FFD - jump FortreeCity_Gym_EventScript_158007 + goto_if_eq FortreeCity_Gym_EventScript_157FFD + goto FortreeCity_Gym_EventScript_158007 end FortreeCity_Gym_EventScript_157FFD:: @ 8157FFD diff --git a/data/scripts/maps/FortreeCity_House1.inc b/data/scripts/maps/FortreeCity_House1.inc index f5bda05ab..7b7ef0b2e 100644 --- a/data/scripts/maps/FortreeCity_House1.inc +++ b/data/scripts/maps/FortreeCity_House1.inc @@ -5,30 +5,30 @@ FortreeCity_House1_EventScript_157E13:: @ 8157E13 lock faceplayer checkflag 155 - jumpeq FortreeCity_House1_EventScript_157EAD + goto_if_eq FortreeCity_House1_EventScript_157EAD setvar 0x8008, 1 copyvar 0x8004, 0x8008 - specialval RESULT, sub_804D89C + specialvar RESULT, sub_804D89C copyvar 0x8009, RESULT msgbox FortreeCity_House1_Text_18568C, 5 compare RESULT, 0 - jumpeq FortreeCity_House1_EventScript_157E95 + goto_if_eq FortreeCity_House1_EventScript_157E95 special sub_80F9A0C waitstate copyvar 0x800a, 0x8004 compare 0x8004, 255 - jumpeq FortreeCity_House1_EventScript_157E95 + goto_if_eq FortreeCity_House1_EventScript_157E95 copyvar 0x8005, 0x800a - specialval RESULT, sub_804DB2C + specialvar RESULT, sub_804DB2C copyvar 0x800b, RESULT - comparevars RESULT, 0x8009 - jumpif 5, FortreeCity_House1_EventScript_157E9F + compare RESULT, 0x8009 + goto_if 5, FortreeCity_House1_EventScript_157E9F copyvar 0x8004, 0x8008 copyvar 0x8005, 0x800a special sub_804DB68 special sub_804E174 waitstate - bufferpoke 0, 0x8009 + getspeciesname 0, 0x8009 msgbox FortreeCity_House1_Text_1856F7, 4 setflag 155 release @@ -40,7 +40,7 @@ FortreeCity_House1_EventScript_157E95:: @ 8157E95 end FortreeCity_House1_EventScript_157E9F:: @ 8157E9F - bufferpoke 0, 0x8009 + getspeciesname 0, 0x8009 msgbox FortreeCity_House1_Text_185737, 4 release end @@ -57,8 +57,8 @@ FortreeCity_House1_EventScript_157EB7:: @ 8157EB7 FortreeCity_House1_EventScript_157EC0:: @ 8157EC0 lock faceplayer - checksound - pokecry SPECIES_ZIGZAGOON, 0 + waitse + playpokecry SPECIES_ZIGZAGOON, 0 msgbox FortreeCity_House1_Text_185888, 4 waitpokecry release diff --git a/data/scripts/maps/FortreeCity_House2.inc b/data/scripts/maps/FortreeCity_House2.inc index ea4aad3d8..f210dd3ac 100644 --- a/data/scripts/maps/FortreeCity_House2.inc +++ b/data/scripts/maps/FortreeCity_House2.inc @@ -5,9 +5,9 @@ FortreeCity_House2_EventScript_1580B4:: @ 81580B4 lock faceplayer checkflag 264 - jumpeq FortreeCity_House2_EventScript_158157 + goto_if_eq FortreeCity_House2_EventScript_158157 checkflag 118 - callif 0, FortreeCity_House2_EventScript_15814B + call_if 0, FortreeCity_House2_EventScript_15814B msgbox FortreeCity_House2_Text_186360, 4 multichoice 21, 8, 54, 1 switch RESULT @@ -23,7 +23,7 @@ FortreeCity_House2_EventScript_1580B4:: @ 81580B4 msgbox FortreeCity_House2_Text_1864C6, 4 giveitem ITEM_TM10 compare RESULT, 0 - jumpeq FortreeCity_House2_EventScript_1A029B + goto_if_eq FortreeCity_House2_EventScript_1A029B setflag 264 msgbox FortreeCity_House2_Text_18652F, 4 release diff --git a/data/scripts/maps/FortreeCity_House4.inc b/data/scripts/maps/FortreeCity_House4.inc index 33d0ed1ae..b261e14fb 100644 --- a/data/scripts/maps/FortreeCity_House4.inc +++ b/data/scripts/maps/FortreeCity_House4.inc @@ -8,42 +8,42 @@ FortreeCity_House4_EventScript_15817F:: @ 815817F FortreeCity_House4_EventScript_158188:: @ 8158188 lockall checkflag 223 - jumpeq FortreeCity_House4_EventScript_158204 + goto_if_eq FortreeCity_House4_EventScript_158204 checkflag 224 - jumpeq FortreeCity_House4_EventScript_1581D6 + goto_if_eq FortreeCity_House4_EventScript_1581D6 checkflag 222 - jumpeq FortreeCity_House4_EventScript_1581C2 + goto_if_eq FortreeCity_House4_EventScript_1581C2 msgbox FortreeCity_House4_Text_186835, 4 - closebutton + closemessage setflag 222 clearflag 934 - move 3, FortreeCity_House4_Movement_158218 - waitmove 0 - disappear 3 + applymovement 3, FortreeCity_House4_Movement_158218 + waitmovement 0 + removeobject 3 releaseall end FortreeCity_House4_EventScript_1581C2:: @ 81581C2 - move LAST_TALKED, FortreeCity_House4_Movement_1A0839 - waitmove 0 + applymovement LAST_TALKED, FortreeCity_House4_Movement_1A0839 + waitmovement 0 msgbox FortreeCity_House4_Text_18684E, 4 releaseall end FortreeCity_House4_EventScript_1581D6:: @ 81581D6 - move LAST_TALKED, FortreeCity_House4_Movement_1A0839 - waitmove 0 + applymovement LAST_TALKED, FortreeCity_House4_Movement_1A0839 + waitmovement 0 msgbox FortreeCity_House4_Text_186881, 4 giveitem ITEM_MENTAL_HERB compare RESULT, 0 - jumpeq FortreeCity_House4_EventScript_1A029B + goto_if_eq FortreeCity_House4_EventScript_1A029B setflag 223 releaseall end FortreeCity_House4_EventScript_158204:: @ 8158204 - move LAST_TALKED, FortreeCity_House4_Movement_1A0839 - waitmove 0 + applymovement LAST_TALKED, FortreeCity_House4_Movement_1A0839 + waitmovement 0 msgbox FortreeCity_House4_Text_186924, 4 releaseall end @@ -59,8 +59,8 @@ FortreeCity_House4_Movement_158218:: @ 8158218 FortreeCity_House4_EventScript_15821E:: @ 815821E lock faceplayer - checksound - pokecry SPECIES_WINGULL, 0 + waitse + playpokecry SPECIES_WINGULL, 0 msgbox FortreeCity_House4_Text_18695C, 4 waitpokecry release diff --git a/data/scripts/maps/FortreeCity_House5.inc b/data/scripts/maps/FortreeCity_House5.inc index 1144a8e81..fe10b53b0 100644 --- a/data/scripts/maps/FortreeCity_House5.inc +++ b/data/scripts/maps/FortreeCity_House5.inc @@ -12,8 +12,8 @@ FortreeCity_House5_EventScript_15823B:: @ 815823B FortreeCity_House5_EventScript_158244:: @ 8158244 lock faceplayer - checksound - pokecry SPECIES_ZIGZAGOON, 0 + waitse + playpokecry SPECIES_ZIGZAGOON, 0 msgbox FortreeCity_House5_Text_186A4F, 4 waitpokecry release diff --git a/data/scripts/maps/FortreeCity_Mart.inc b/data/scripts/maps/FortreeCity_Mart.inc index 9e5f34ff9..076f702af 100644 --- a/data/scripts/maps/FortreeCity_Mart.inc +++ b/data/scripts/maps/FortreeCity_Mart.inc @@ -5,7 +5,7 @@ FortreeCity_Mart_EventScript_158067:: @ 8158067 lock faceplayer message FortreeCity_Mart_Text_1A0BE4 - waittext + waitmessage pokemart FortreeCity_Mart_Items msgbox FortreeCity_Mart_Text_1A0C02, 4 release diff --git a/data/scripts/maps/FortreeCity_PokemonCenter_1F.inc b/data/scripts/maps/FortreeCity_PokemonCenter_1F.inc index 148324abf..5268cbeed 100644 --- a/data/scripts/maps/FortreeCity_PokemonCenter_1F.inc +++ b/data/scripts/maps/FortreeCity_PokemonCenter_1F.inc @@ -9,7 +9,7 @@ FortreeCity_PokemonCenter_1F_MapScript1_158017:: @ 8158017 FortreeCity_PokemonCenter_1F_EventScript_15801B:: @ 815801B setvar 0x800b, 1 call FortreeCity_PokemonCenter_1F_EventScript_19FD5B - waittext + waitmessage waitbutton release end diff --git a/data/scripts/maps/GraniteCave_1F.inc b/data/scripts/maps/GraniteCave_1F.inc index 59aaa2fc3..f389a774e 100644 --- a/data/scripts/maps/GraniteCave_1F.inc +++ b/data/scripts/maps/GraniteCave_1F.inc @@ -5,7 +5,7 @@ GraniteCave_1F_EventScript_15CBA7:: @ 815CBA7 lock faceplayer checkflag 109 - jumpeq GraniteCave_1F_EventScript_15CBD3 + goto_if_eq GraniteCave_1F_EventScript_15CBD3 msgbox GraniteCave_1F_Text_194917, 4 giveitem ITEM_HM05 setflag 109 diff --git a/data/scripts/maps/GraniteCave_B1F.inc b/data/scripts/maps/GraniteCave_B1F.inc index 240de1d98..aa8d705c7 100644 --- a/data/scripts/maps/GraniteCave_B1F.inc +++ b/data/scripts/maps/GraniteCave_B1F.inc @@ -6,5 +6,5 @@ GraniteCave_B1F_MapScripts:: @ 815CBDD GraniteCave_B1F_MapScript1_15CBED:: @ 815CBED tileeffect 7 - warp5 GraniteCave_B2F, 255, 0, 0 + setholewarp GraniteCave_B2F, 255, 0, 0 end diff --git a/data/scripts/maps/GraniteCave_StevensRoom.inc b/data/scripts/maps/GraniteCave_StevensRoom.inc index 895241406..070276e58 100644 --- a/data/scripts/maps/GraniteCave_StevensRoom.inc +++ b/data/scripts/maps/GraniteCave_StevensRoom.inc @@ -11,30 +11,30 @@ GraniteCave_StevensRoom_EventScript_15CBFA:: @ 815CBFA msgbox GraniteCave_StevensRoom_Text_194BDD, 4 giveitem ITEM_TM47 compare RESULT, 0 - callif 1, GraniteCave_StevensRoom_EventScript_15CC83 + call_if 1, GraniteCave_StevensRoom_EventScript_15CC83 msgbox GraniteCave_StevensRoom_Text_194C8D, 4 - closebutton + closemessage compare FACING, 2 - callif 1, GraniteCave_StevensRoom_EventScript_15CC6D + call_if 1, GraniteCave_StevensRoom_EventScript_15CC6D compare FACING, 1 - callif 1, GraniteCave_StevensRoom_EventScript_15CC78 + call_if 1, GraniteCave_StevensRoom_EventScript_15CC78 compare FACING, 3 - callif 1, GraniteCave_StevensRoom_EventScript_15CC6D + call_if 1, GraniteCave_StevensRoom_EventScript_15CC6D compare FACING, 4 - callif 1, GraniteCave_StevensRoom_EventScript_15CC6D - playsfx 9 - disappear 1 + call_if 1, GraniteCave_StevensRoom_EventScript_15CC6D + playse 9 + removeobject 1 release end GraniteCave_StevensRoom_EventScript_15CC6D:: @ 815CC6D - move 1, GraniteCave_StevensRoom_Movement_15CC8C - waitmove 0 + applymovement 1, GraniteCave_StevensRoom_Movement_15CC8C + waitmovement 0 return GraniteCave_StevensRoom_EventScript_15CC78:: @ 815CC78 - move 1, GraniteCave_StevensRoom_Movement_15CC93 - waitmove 0 + applymovement 1, GraniteCave_StevensRoom_Movement_15CC93 + waitmovement 0 return GraniteCave_StevensRoom_EventScript_15CC83:: @ 815CC83 diff --git a/data/scripts/maps/InsideOfTruck.inc b/data/scripts/maps/InsideOfTruck.inc index 0c26f0f88..fc2930aa5 100644 --- a/data/scripts/maps/InsideOfTruck.inc +++ b/data/scripts/maps/InsideOfTruck.inc @@ -16,11 +16,11 @@ InsideOfTruck_MapScript1_15FC26:: @ 815FC26 InsideOfTruck_EventScript_15FC29:: @ 815FC29 lockall setflag 0x4000 - checkgender + checkplayergender compare RESULT, 0 - jumpeq InsideOfTruck_EventScript_15FC45 + goto_if_eq InsideOfTruck_EventScript_15FC45 compare RESULT, 1 - jumpeq InsideOfTruck_EventScript_15FC68 + goto_if_eq InsideOfTruck_EventScript_15FC68 end InsideOfTruck_EventScript_15FC45:: @ 815FC45 @@ -31,7 +31,7 @@ InsideOfTruck_EventScript_15FC45:: @ 815FC45 setflag 784 setflag 760 setvar 0x408c, 1 - warpplace LittlerootTown, 255, 3, 10 + setdynamicwarp LittlerootTown, 255, 3, 10 releaseall end @@ -43,7 +43,7 @@ InsideOfTruck_EventScript_15FC68:: @ 815FC68 setflag 785 setflag 722 setvar 0x4082, 1 - warpplace LittlerootTown, 255, 12, 10 + setdynamicwarp LittlerootTown, 255, 12, 10 releaseall end diff --git a/data/scripts/maps/IslandCave.inc b/data/scripts/maps/IslandCave.inc index 2f8ba2121..75399bde8 100644 --- a/data/scripts/maps/IslandCave.inc +++ b/data/scripts/maps/IslandCave.inc @@ -6,16 +6,16 @@ IslandCave_MapScripts:: @ 815EEB6 IslandCave_MapScript1_15EEC6:: @ 815EEC6 checkflag 2145 - callif 1, IslandCave_EventScript_15EED0 + call_if 1, IslandCave_EventScript_15EED0 end IslandCave_EventScript_15EED0:: @ 815EED0 - disappear LAST_TALKED + removeobject LAST_TALKED return IslandCave_MapScript1_15EED4:: @ 815EED4 checkflag 2129 - callif 0, IslandCave_EventScript_15EEDE + call_if 0, IslandCave_EventScript_15EEDE end IslandCave_EventScript_15EEDE:: @ 815EEDE @@ -39,18 +39,18 @@ S_OpenRegiceChamber:: @ 815EF19 setmaptile 8, 20, 563, 0 setmaptile 9, 20, 564, 1 special DrawWholeMapView - playsfx SE_BAN + playse SE_BAN setflag 2129 end IslandCave_EventScript_15EF59:: @ 815EF59 lockall checkflag 2129 - jumpeq IslandCave_EventScript_15EF72 - braillemsg IslandCave_Braille_1C54FC + goto_if_eq IslandCave_EventScript_15EF72 + braillemessage IslandCave_Braille_1C54FC special DoBrailleWait waitstate - jump IslandCave_EventScript_15EF95 + goto IslandCave_EventScript_15EF95 end IslandCave_EventScript_15EF72:: @ 815EF72 @@ -60,26 +60,26 @@ IslandCave_EventScript_15EF72:: @ 815EF72 IslandCave_EventScript_15EF7C:: @ 815EF7C lockall - braillemsg IslandCave_Braille_1C54FC + braillemessage IslandCave_Braille_1C54FC checkflag 2129 - jumpeq IslandCave_EventScript_15EF95 + goto_if_eq IslandCave_EventScript_15EF95 special DoBrailleWait waitstate - jump IslandCave_EventScript_15EF95 + goto IslandCave_EventScript_15EF95 end IslandCave_EventScript_15EF95:: @ 815EF95 waitbutton - hidebox 0, 0, 29, 19 + erasebox 0, 0, 29, 19 releaseall end IslandCave_EventScript_15EF9D:: @ 815EF9D lock faceplayer - checksound - pokecry SPECIES_REGICE, 2 - pause 40 + waitse + playpokecry SPECIES_REGICE, 2 + delay 40 waitpokecry setwildbattle SPECIES_REGICE, 40, ITEM_NONE setflag 936 diff --git a/data/scripts/maps/JaggedPass.inc b/data/scripts/maps/JaggedPass.inc index 151f1ec79..6f910d0ad 100644 --- a/data/scripts/maps/JaggedPass.inc +++ b/data/scripts/maps/JaggedPass.inc @@ -9,7 +9,7 @@ JaggedPass_MapScript1_15D271:: @ 815D271 JaggedPass_MapScript1_15D274:: @ 815D274 compare 0x40bd, 1 - callif 1, JaggedPass_EventScript_15D280 + call_if 1, JaggedPass_EventScript_15D280 end JaggedPass_EventScript_15D280:: @ 815D280 @@ -24,9 +24,9 @@ JaggedPass_EventScript_15D285:: @ 815D285 JaggedPass_EventScript_15D29C:: @ 815D29C trainerbattle 0, OPPONENT_DIANA_1, 0, JaggedPass_Text_195E9E, JaggedPass_Text_195EDF - specialval RESULT, sub_8082C68 + specialvar RESULT, sub_8082C68 compare RESULT, 1 - jumpeq JaggedPass_EventScript_15D2C3 + goto_if_eq JaggedPass_EventScript_15D2C3 msgbox JaggedPass_Text_195F04, 6 end @@ -37,9 +37,9 @@ JaggedPass_EventScript_15D2C3:: @ 815D2C3 JaggedPass_EventScript_15D2DA:: @ 815D2DA trainerbattle 0, OPPONENT_ETHAN_1, 0, JaggedPass_Text_195FF2, JaggedPass_Text_196032 - specialval RESULT, sub_8082C68 + specialvar RESULT, sub_8082C68 compare RESULT, 1 - jumpeq JaggedPass_EventScript_15D301 + goto_if_eq JaggedPass_EventScript_15D301 msgbox JaggedPass_Text_196077, 6 end diff --git a/data/scripts/maps/LavaridgeTown.inc b/data/scripts/maps/LavaridgeTown.inc index 685e44d58..5192176a7 100644 --- a/data/scripts/maps/LavaridgeTown.inc +++ b/data/scripts/maps/LavaridgeTown.inc @@ -6,16 +6,16 @@ LavaridgeTown_MapScripts:: @ 814E4A3 LavaridgeTown_MapScript1_14E4AE:: @ 814E4AE setflag 2066 checkflag 139 - callif 1, LavaridgeTown_EventScript_14E4DF + call_if 1, LavaridgeTown_EventScript_14E4DF call LavaridgeTown_EventScript_1A014E call LavaridgeTown_EventScript_1A0172 compare 0x4053, 2 - callif 1, LavaridgeTown_EventScript_14E4D0 + call_if 1, LavaridgeTown_EventScript_14E4D0 end LavaridgeTown_EventScript_14E4D0:: @ 814E4D0 - movespriteperm 8, 11, 9 - movespriteperm 7, 11, 9 + setobjectxyperm 8, 11, 9 + setobjectxyperm 7, 11, 9 return LavaridgeTown_EventScript_14E4DF:: @ 814E4DF @@ -29,56 +29,56 @@ LavaridgeTown_MapScript2_14E4E3:: @ 814E4E3 LavaridgeTown_EventScript_14E4ED:: @ 814E4ED lockall setvar 0x8008, 1 - setdooropened 12, 15 - doorchange - reappear 8 - move 8, LavaridgeTown_Movement_14E70E - waitmove 0 - setdoorclosed 12, 15 - doorchange - move 8, LavaridgeTown_Movement_1A083F - waitmove 0 - move 255, LavaridgeTown_Movement_1A0843 - move 8, LavaridgeTown_Movement_1A0833 - waitmove 0 - move 8, LavaridgeTown_Movement_1A0835 - waitmove 0 - checkgender + opendoor 12, 15 + waitdooranim + addobject 8 + applymovement 8, LavaridgeTown_Movement_14E70E + waitmovement 0 + closedoor 12, 15 + waitdooranim + applymovement 8, LavaridgeTown_Movement_1A083F + waitmovement 0 + applymovement 255, LavaridgeTown_Movement_1A0843 + applymovement 8, LavaridgeTown_Movement_1A0833 + waitmovement 0 + applymovement 8, LavaridgeTown_Movement_1A0835 + waitmovement 0 + checkplayergender compare RESULT, 0 - callif 1, LavaridgeTown_EventScript_14E56B + call_if 1, LavaridgeTown_EventScript_14E56B compare RESULT, 1 - callif 1, LavaridgeTown_EventScript_14E570 + call_if 1, LavaridgeTown_EventScript_14E570 compare 0x8008, 1 - callif 1, LavaridgeTown_EventScript_14E68F - checkgender + call_if 1, LavaridgeTown_EventScript_14E68F + checkplayergender compare RESULT, 0 - jumpeq LavaridgeTown_EventScript_14E5AB + goto_if_eq LavaridgeTown_EventScript_14E5AB compare RESULT, 1 - jumpeq LavaridgeTown_EventScript_14E5D0 + goto_if_eq LavaridgeTown_EventScript_14E5D0 end LavaridgeTown_EventScript_14E56B:: @ 814E56B - playmusic 415, 1 + playbgm 415, 1 return LavaridgeTown_EventScript_14E570:: @ 814E570 - playmusic 421, 1 + playbgm 421, 1 return LavaridgeTown_EventScript_14E575:: @ 814E575 lock faceplayer setvar 0x8008, 0 - checkgender + checkplayergender compare RESULT, 0 - callif 1, LavaridgeTown_EventScript_14E56B + call_if 1, LavaridgeTown_EventScript_14E56B compare RESULT, 1 - callif 1, LavaridgeTown_EventScript_14E570 - checkgender + call_if 1, LavaridgeTown_EventScript_14E570 + checkplayergender compare RESULT, 0 - jumpeq LavaridgeTown_EventScript_14E5AB + goto_if_eq LavaridgeTown_EventScript_14E5AB compare RESULT, 1 - jumpeq LavaridgeTown_EventScript_14E5D0 + goto_if_eq LavaridgeTown_EventScript_14E5D0 end LavaridgeTown_EventScript_14E5AB:: @ 814E5AB @@ -86,7 +86,7 @@ LavaridgeTown_EventScript_14E5AB:: @ 814E5AB giveitem ITEM_GO_GOGGLES setflag 221 msgbox LavaridgeTown_Text_16BE7D, 4 - jump LavaridgeTown_EventScript_14E5F5 + goto LavaridgeTown_EventScript_14E5F5 end LavaridgeTown_EventScript_14E5D0:: @ 814E5D0 @@ -94,28 +94,28 @@ LavaridgeTown_EventScript_14E5D0:: @ 814E5D0 giveitem ITEM_GO_GOGGLES setflag 221 msgbox LavaridgeTown_Text_16C020, 4 - jump LavaridgeTown_EventScript_14E5F5 + goto LavaridgeTown_EventScript_14E5F5 end LavaridgeTown_EventScript_14E5F5:: @ 814E5F5 - closebutton + closemessage compare 0x8008, 1 - callif 1, LavaridgeTown_EventScript_14E646 + call_if 1, LavaridgeTown_EventScript_14E646 compare 0x8008, 0 - callif 1, LavaridgeTown_EventScript_14E64E - disappear 8 - reappear 7 - pause 30 + call_if 1, LavaridgeTown_EventScript_14E64E + removeobject 8 + addobject 7 + delay 30 compare 0x8008, 1 - callif 1, LavaridgeTown_EventScript_14E69A + call_if 1, LavaridgeTown_EventScript_14E69A compare 0x8008, 0 - callif 1, LavaridgeTown_EventScript_14E6A5 - disappear 7 + call_if 1, LavaridgeTown_EventScript_14E6A5 + removeobject 7 setvar 0x4053, 2 - playmusicbattle 0 - fadedefault + savebgm 0 + fadedefaultbgm compare 0x8008, 0 - jumpeq LavaridgeTown_EventScript_14E644 + goto_if_eq LavaridgeTown_EventScript_14E644 releaseall end @@ -124,65 +124,65 @@ LavaridgeTown_EventScript_14E644:: @ 814E644 end LavaridgeTown_EventScript_14E646:: @ 814E646 - movespriteperm 7, 6, 16 + setobjectxyperm 7, 6, 16 return LavaridgeTown_EventScript_14E64E:: @ 814E64E compare FACING, 2 - callif 1, LavaridgeTown_EventScript_14E67B + call_if 1, LavaridgeTown_EventScript_14E67B compare FACING, 1 - callif 1, LavaridgeTown_EventScript_14E680 + call_if 1, LavaridgeTown_EventScript_14E680 compare FACING, 3 - callif 1, LavaridgeTown_EventScript_14E685 + call_if 1, LavaridgeTown_EventScript_14E685 compare FACING, 4 - callif 1, LavaridgeTown_EventScript_14E68A + call_if 1, LavaridgeTown_EventScript_14E68A return LavaridgeTown_EventScript_14E67B:: @ 814E67B - spritebehave 7, 8 + setobjectmovementtype 7, 8 return LavaridgeTown_EventScript_14E680:: @ 814E680 - spritebehave 7, 7 + setobjectmovementtype 7, 7 return LavaridgeTown_EventScript_14E685:: @ 814E685 - spritebehave 7, 10 + setobjectmovementtype 7, 10 return LavaridgeTown_EventScript_14E68A:: @ 814E68A - spritebehave 7, 9 + setobjectmovementtype 7, 9 return LavaridgeTown_EventScript_14E68F:: @ 814E68F - move 8, LavaridgeTown_Movement_14E6E8 - waitmove 0 + applymovement 8, LavaridgeTown_Movement_14E6E8 + waitmovement 0 return LavaridgeTown_EventScript_14E69A:: @ 814E69A - move 7, LavaridgeTown_Movement_14E6EF - waitmove 0 + applymovement 7, LavaridgeTown_Movement_14E6EF + waitmovement 0 return LavaridgeTown_EventScript_14E6A5:: @ 814E6A5 compare FACING, 2 - callif 1, LavaridgeTown_EventScript_14E6D2 + call_if 1, LavaridgeTown_EventScript_14E6D2 compare FACING, 1 - callif 1, LavaridgeTown_EventScript_14E6D2 + call_if 1, LavaridgeTown_EventScript_14E6D2 compare FACING, 3 - callif 1, LavaridgeTown_EventScript_14E6DD + call_if 1, LavaridgeTown_EventScript_14E6DD compare FACING, 4 - callif 1, LavaridgeTown_EventScript_14E6D2 + call_if 1, LavaridgeTown_EventScript_14E6D2 return LavaridgeTown_EventScript_14E6D2:: @ 814E6D2 - move 7, LavaridgeTown_Movement_14E6FA - waitmove 0 + applymovement 7, LavaridgeTown_Movement_14E6FA + waitmovement 0 return LavaridgeTown_EventScript_14E6DD:: @ 814E6DD - move 7, LavaridgeTown_Movement_14E703 - waitmove 0 + applymovement 7, LavaridgeTown_Movement_14E703 + waitmovement 0 return LavaridgeTown_Movement_14E6E8:: @ 814E6E8 @@ -236,13 +236,13 @@ LavaridgeTown_Movement_14E70E:: @ 814E70E step_end LavaridgeTown_EventScript_14E710:: @ 814E710 - specialval RESULT, player_get_direction_lower_nybble + specialvar RESULT, player_get_direction_lower_nybble compare RESULT, 1 - jumpeq LavaridgeTown_EventScript_14E721 + goto_if_eq LavaridgeTown_EventScript_14E721 end LavaridgeTown_EventScript_14E721:: @ 814E721 - inccounter GAME_STAT_ENTERED_HOT_SPRINGS + incrementgamestat GAME_STAT_ENTERED_HOT_SPRINGS end LavaridgeTown_EventScript_14E724:: @ 814E724 @@ -273,19 +273,19 @@ LavaridgeTown_EventScript_14E75A:: @ 814E75A lock faceplayer checkflag 266 - jumpeq LavaridgeTown_EventScript_14E79E + goto_if_eq LavaridgeTown_EventScript_14E79E msgbox LavaridgeTown_Text_16C174, 5 compare RESULT, 0 - jumpeq LavaridgeTown_EventScript_14E7B2 + goto_if_eq LavaridgeTown_EventScript_14E7B2 countpokemon compare RESULT, 6 - jumpeq LavaridgeTown_EventScript_14E7A8 + goto_if_eq LavaridgeTown_EventScript_14E7A8 msgbox LavaridgeTown_Text_16C2B6, 4 setflag 266 - fanfare 370 + playfanfare 370 message LavaridgeTown_Text_16C2EA waitfanfare - waittext + waitmessage giveegg 360 release end diff --git a/data/scripts/maps/LavaridgeTown_Gym_1F.inc b/data/scripts/maps/LavaridgeTown_Gym_1F.inc index 57506bdb6..2edffe9f0 100644 --- a/data/scripts/maps/LavaridgeTown_Gym_1F.inc +++ b/data/scripts/maps/LavaridgeTown_Gym_1F.inc @@ -14,27 +14,27 @@ LavaridgeTown_Gym_1F_EventScript_15369F:: @ 815369F setvar 0x400e, 0 setvar 0x400f, 0 checktrainerflag OPPONENT_COLE - jumpeq LavaridgeTown_Gym_1F_EventScript_1536C6 + goto_if_eq LavaridgeTown_Gym_1F_EventScript_1536C6 setvar 0x400b, 1 LavaridgeTown_Gym_1F_EventScript_1536C6:: @ 81536C6 checktrainerflag OPPONENT_ZANE - jumpeq LavaridgeTown_Gym_1F_EventScript_1536D4 + goto_if_eq LavaridgeTown_Gym_1F_EventScript_1536D4 setvar 0x400c, 1 LavaridgeTown_Gym_1F_EventScript_1536D4:: @ 81536D4 checktrainerflag OPPONENT_AXLE - jumpeq LavaridgeTown_Gym_1F_EventScript_1536E2 + goto_if_eq LavaridgeTown_Gym_1F_EventScript_1536E2 setvar 0x400d, 1 LavaridgeTown_Gym_1F_EventScript_1536E2:: @ 81536E2 checktrainerflag OPPONENT_SADIE - jumpeq LavaridgeTown_Gym_1F_EventScript_1536F0 + goto_if_eq LavaridgeTown_Gym_1F_EventScript_1536F0 setvar 0x400e, 1 LavaridgeTown_Gym_1F_EventScript_1536F0:: @ 81536F0 checktrainerflag OPPONENT_ANDY - jumpeq LavaridgeTown_Gym_1F_EventScript_1536FE + goto_if_eq LavaridgeTown_Gym_1F_EventScript_1536FE setvar 0x400f, 1 LavaridgeTown_Gym_1F_EventScript_1536FE:: @ 81536FE @@ -42,28 +42,28 @@ LavaridgeTown_Gym_1F_EventScript_1536FE:: @ 81536FE LavaridgeTown_Gym_1F_EventScript_1536FF:: @ 81536FF checktrainerflag OPPONENT_COLE - jumpeq LavaridgeTown_Gym_1F_EventScript_15370C - spritebehave 2, 63 + goto_if_eq LavaridgeTown_Gym_1F_EventScript_15370C + setobjectmovementtype 2, 63 LavaridgeTown_Gym_1F_EventScript_15370C:: @ 815370C checktrainerflag OPPONENT_ZANE - jumpeq LavaridgeTown_Gym_1F_EventScript_153719 - spritebehave 3, 63 + goto_if_eq LavaridgeTown_Gym_1F_EventScript_153719 + setobjectmovementtype 3, 63 LavaridgeTown_Gym_1F_EventScript_153719:: @ 8153719 checktrainerflag OPPONENT_AXLE - jumpeq LavaridgeTown_Gym_1F_EventScript_153726 - spritebehave 4, 63 + goto_if_eq LavaridgeTown_Gym_1F_EventScript_153726 + setobjectmovementtype 4, 63 LavaridgeTown_Gym_1F_EventScript_153726:: @ 8153726 checktrainerflag OPPONENT_SADIE - jumpeq LavaridgeTown_Gym_1F_EventScript_153733 - spritebehave 5, 63 + goto_if_eq LavaridgeTown_Gym_1F_EventScript_153733 + setobjectmovementtype 5, 63 LavaridgeTown_Gym_1F_EventScript_153733:: @ 8153733 checktrainerflag OPPONENT_ANDY - jumpeq LavaridgeTown_Gym_1F_EventScript_153740 - spritebehave 7, 63 + goto_if_eq LavaridgeTown_Gym_1F_EventScript_153740 + setobjectmovementtype 7, 63 LavaridgeTown_Gym_1F_EventScript_153740:: @ 8153740 return @@ -71,32 +71,32 @@ LavaridgeTown_Gym_1F_EventScript_153740:: @ 8153740 LavaridgeTown_Gym_1F_EventScript_153741:: @ 8153741 trainerbattle 1, OPPONENT_FLANNERY, 0, LavaridgeTown_Gym_1F_Text_176801, LavaridgeTown_Gym_1F_Text_176960, LavaridgeTown_Gym_1F_EventScript_153766 checkflag 168 - jumpif 0, LavaridgeTown_Gym_1F_EventScript_1537A7 + goto_if 0, LavaridgeTown_Gym_1F_EventScript_1537A7 msgbox LavaridgeTown_Gym_1F_Text_176C4A, 4 release end LavaridgeTown_Gym_1F_EventScript_153766:: @ 8153766 message LavaridgeTown_Gym_1F_Text_176A62 - waittext + waitmessage call LavaridgeTown_Gym_1F_EventScript_1A02C5 msgbox LavaridgeTown_Gym_1F_Text_176A8C, 4 setflag 1213 setflag 2058 addvar 0x4085, 1 compare 0x4085, 6 - callif 1, LavaridgeTown_Gym_1F_EventScript_1A00FB + call_if 1, LavaridgeTown_Gym_1F_EventScript_1A00FB setvar 0x8008, 4 call LavaridgeTown_Gym_1F_EventScript_1A01C0 setflag 806 setvar 0x4053, 1 - jump LavaridgeTown_Gym_1F_EventScript_1537A7 + goto LavaridgeTown_Gym_1F_EventScript_1537A7 end LavaridgeTown_Gym_1F_EventScript_1537A7:: @ 81537A7 giveitem ITEM_TM50 compare RESULT, 0 - jumpeq LavaridgeTown_Gym_1F_EventScript_1A029B + goto_if_eq LavaridgeTown_Gym_1F_EventScript_1A029B msgbox LavaridgeTown_Gym_1F_Text_176B8F, 4 setflag 168 release @@ -136,7 +136,7 @@ LavaridgeTown_Gym_1F_EventScript_153859:: @ 8153859 lock faceplayer checkflag 1213 - jumpeq LavaridgeTown_Gym_1F_EventScript_15386E + goto_if_eq LavaridgeTown_Gym_1F_EventScript_15386E msgbox LavaridgeTown_Gym_1F_Text_176312, 4 release end @@ -149,15 +149,15 @@ LavaridgeTown_Gym_1F_EventScript_15386E:: @ 815386E LavaridgeTown_Gym_1F_EventScript_153878:: @ 8153878 lockall checkflag 2058 - jumpeq LavaridgeTown_Gym_1F_EventScript_153898 - jump LavaridgeTown_Gym_1F_EventScript_1538A2 + goto_if_eq LavaridgeTown_Gym_1F_EventScript_153898 + goto LavaridgeTown_Gym_1F_EventScript_1538A2 end LavaridgeTown_Gym_1F_EventScript_153888:: @ 8153888 lockall checkflag 2058 - jumpeq LavaridgeTown_Gym_1F_EventScript_153898 - jump LavaridgeTown_Gym_1F_EventScript_1538A2 + goto_if_eq LavaridgeTown_Gym_1F_EventScript_153898 + goto LavaridgeTown_Gym_1F_EventScript_1538A2 end LavaridgeTown_Gym_1F_EventScript_153898:: @ 8153898 diff --git a/data/scripts/maps/LavaridgeTown_HerbShop.inc b/data/scripts/maps/LavaridgeTown_HerbShop.inc index 6ff103ce3..5ec6731d4 100644 --- a/data/scripts/maps/LavaridgeTown_HerbShop.inc +++ b/data/scripts/maps/LavaridgeTown_HerbShop.inc @@ -5,7 +5,7 @@ LavaridgeTown_HerbShop_EventScript_153629:: @ 8153629 lock faceplayer message LavaridgeTown_HerbShop_Text_17615C - waittext + waitmessage pokemart LavaridgeTown_HerbShop_Items msgbox LavaridgeTown_HerbShop_Text_1A0C02, 4 release @@ -29,11 +29,11 @@ LavaridgeTown_HerbShop_EventScript_153655:: @ 8153655 lock faceplayer checkflag 254 - jumpeq LavaridgeTown_HerbShop_EventScript_153684 + goto_if_eq LavaridgeTown_HerbShop_EventScript_153684 msgbox LavaridgeTown_HerbShop_Text_1761A2, 4 giveitem ITEM_CHARCOAL compare RESULT, 0 - jumpeq LavaridgeTown_HerbShop_EventScript_1A029B + goto_if_eq LavaridgeTown_HerbShop_EventScript_1A029B setflag 254 release end diff --git a/data/scripts/maps/LavaridgeTown_House.inc b/data/scripts/maps/LavaridgeTown_House.inc index 944427bb6..c75cb9e4b 100644 --- a/data/scripts/maps/LavaridgeTown_House.inc +++ b/data/scripts/maps/LavaridgeTown_House.inc @@ -8,8 +8,8 @@ LavaridgeTown_House_EventScript_1538AE:: @ 81538AE LavaridgeTown_House_EventScript_1538B7:: @ 81538B7 lock faceplayer - checksound - pokecry SPECIES_ZIGZAGOON, 0 + waitse + playpokecry SPECIES_ZIGZAGOON, 0 msgbox LavaridgeTown_House_Text_176D94, 4 waitpokecry release diff --git a/data/scripts/maps/LavaridgeTown_Mart.inc b/data/scripts/maps/LavaridgeTown_Mart.inc index 4f28e16b0..99b567e06 100644 --- a/data/scripts/maps/LavaridgeTown_Mart.inc +++ b/data/scripts/maps/LavaridgeTown_Mart.inc @@ -5,7 +5,7 @@ LavaridgeTown_Mart_EventScript_1538CB:: @ 81538CB lock faceplayer message LavaridgeTown_Mart_Text_1A0BE4 - waittext + waitmessage pokemart LavaridgeTown_Mart_Items msgbox LavaridgeTown_Mart_Text_1A0C02, 4 release diff --git a/data/scripts/maps/LavaridgeTown_PokemonCenter_1F.inc b/data/scripts/maps/LavaridgeTown_PokemonCenter_1F.inc index c0762bcc3..9d0f31059 100644 --- a/data/scripts/maps/LavaridgeTown_PokemonCenter_1F.inc +++ b/data/scripts/maps/LavaridgeTown_PokemonCenter_1F.inc @@ -10,7 +10,7 @@ LavaridgeTown_PokemonCenter_1F_MapScript1_153912:: @ 8153912 LavaridgeTown_PokemonCenter_1F_EventScript_15391B:: @ 815391B setvar 0x800b, 1 call LavaridgeTown_PokemonCenter_1F_EventScript_19FD5B - waittext + waitmessage waitbutton release end diff --git a/data/scripts/maps/LilycoveCity.inc b/data/scripts/maps/LilycoveCity.inc index b688107ce..cf8e2e07d 100644 --- a/data/scripts/maps/LilycoveCity.inc +++ b/data/scripts/maps/LilycoveCity.inc @@ -8,7 +8,7 @@ LilycoveCity_MapScript1_14CA20:: @ 814CA20 setvar 0x4086, 0 setflag 802 checkflag 2090 - callif 1, LilycoveCity_EventScript_1A02C1 + call_if 1, LilycoveCity_EventScript_1A02C1 call LilycoveCity_EventScript_1A0196 call LilycoveCity_EventScript_1A014E end @@ -29,9 +29,9 @@ LilycoveCity_MapScript1_14CA3F:: @ 814CA3F setmaptile 72, 6, 445, 0 .endif checkflag 112 - callif 0, LilycoveCity_EventScript_14CABE + call_if 0, LilycoveCity_EventScript_14CABE checkflag 2061 - callif 1, LilycoveCity_EventScript_14CB2B + call_if 1, LilycoveCity_EventScript_14CB2B end LilycoveCity_EventScript_14CABE:: @ 814CABE @@ -63,15 +63,15 @@ LilycoveCity_EventScript_14CB2B:: @ 814CB2B LilycoveCity_EventScript_14CB74:: @ 814CB74 lock faceplayer - checkdailyflags + dodailyevents checkflag 2255 - jumpeq LilycoveCity_EventScript_14CBB4 + goto_if_eq LilycoveCity_EventScript_14CBB4 msgbox LilycoveCity_Text_1C5A7A, 4 random 10 addvar RESULT, 133 giveitem RESULT compare RESULT, 0 - jumpeq LilycoveCity_EventScript_1A029B + goto_if_eq LilycoveCity_EventScript_1A029B setflag 2255 msgbox LilycoveCity_Text_1C5B1D, 4 release @@ -90,7 +90,7 @@ LilycoveCity_EventScript_14CBC7:: @ 814CBC7 lock faceplayer checkflag 2061 - jumpeq LilycoveCity_EventScript_14CBDC + goto_if_eq LilycoveCity_EventScript_14CBDC msgbox LilycoveCity_Text_168750, 4 release end @@ -108,7 +108,7 @@ LilycoveCity_EventScript_14CBEF:: @ 814CBEF lock faceplayer checkflag 112 - jumpeq LilycoveCity_EventScript_14CC04 + goto_if_eq LilycoveCity_EventScript_14CC04 msgbox LilycoveCity_Text_1688C1, 4 release end @@ -122,7 +122,7 @@ LilycoveCity_EventScript_14CC0E:: @ 814CC0E lock faceplayer checkflag 112 - jumpeq LilycoveCity_EventScript_14CC23 + goto_if_eq LilycoveCity_EventScript_14CC23 msgbox LilycoveCity_Text_1689BF, 4 release end @@ -148,7 +148,7 @@ LilycoveCity_EventScript_14CC48:: @ 814CC48 lock faceplayer checkflag 2061 - jumpeq LilycoveCity_EventScript_14CC5D + goto_if_eq LilycoveCity_EventScript_14CC5D msgbox LilycoveCity_Text_168C16, 4 release end @@ -172,7 +172,7 @@ LilycoveCity_EventScript_14CC79:: @ 814CC79 LilycoveCity_EventScript_14CC82:: @ 814CC82 lockall - specialval 0x8004, sub_80C4D50 + specialvar 0x8004, sub_80C4D50 switch 0x8004 case 0, LilycoveCity_EventScript_14CCA2 msgbox LilycoveCity_Text_168EA4, 4 @@ -187,7 +187,7 @@ LilycoveCity_EventScript_14CCA2:: @ 814CCA2 LilycoveCity_EventScript_14CCAC:: @ 814CCAC lockall checkflag 2052 - jumpeq LilycoveCity_EventScript_14CCC0 + goto_if_eq LilycoveCity_EventScript_14CCC0 msgbox LilycoveCity_Text_168EDA, 4 releaseall end @@ -212,13 +212,13 @@ LilycoveCity_EventScript_14CCDC:: @ 814CCDC LilycoveCity_EventScript_14CCE5:: @ 814CCE5 lockall checkflag 218 - jumpeq LilycoveCity_EventScript_14CD18 + goto_if_eq LilycoveCity_EventScript_14CD18 msgbox LilycoveCity_Text_16864A, 4 - move LAST_TALKED, LilycoveCity_Movement_1A0839 - waitmove 0 + applymovement LAST_TALKED, LilycoveCity_Movement_1A0839 + waitmovement 0 msgbox LilycoveCity_Text_168675, 4 - move LAST_TALKED, LilycoveCity_Movement_1A083D - waitmove 0 + applymovement LAST_TALKED, LilycoveCity_Movement_1A083D + waitmovement 0 setflag 218 releaseall end @@ -247,21 +247,21 @@ LilycoveCity_EventScript_14CD3D:: @ 814CD3D LilycoveCity_EventScript_14CD46:: @ 814CD46 lock faceplayer - checkgender + checkplayergender compare RESULT, 0 - jumpeq LilycoveCity_EventScript_14CD60 + goto_if_eq LilycoveCity_EventScript_14CD60 compare RESULT, 1 - jumpeq LilycoveCity_EventScript_14CDD3 + goto_if_eq LilycoveCity_EventScript_14CDD3 end LilycoveCity_EventScript_14CD60:: @ 814CD60 - playmusic 415, 1 + playbgm 415, 1 checkflag 286 - callif 1, LilycoveCity_EventScript_14CDB0 + call_if 1, LilycoveCity_EventScript_14CDB0 checkflag 286 - callif 0, LilycoveCity_EventScript_14CDB9 + call_if 0, LilycoveCity_EventScript_14CDB9 compare RESULT, 0 - jumpeq LilycoveCity_EventScript_14CDC2 + goto_if_eq LilycoveCity_EventScript_14CDC2 msgbox LilycoveCity_Text_167B94, 4 switch 0x4023 case 0, LilycoveCity_EventScript_14CE46 @@ -280,19 +280,19 @@ LilycoveCity_EventScript_14CDB9:: @ 814CDB9 LilycoveCity_EventScript_14CDC2:: @ 814CDC2 setflag 286 msgbox LilycoveCity_Text_167AEB, 4 - playmusicbattle 0 - fadedefault + savebgm 0 + fadedefaultbgm release end LilycoveCity_EventScript_14CDD3:: @ 814CDD3 - playmusic 421, 1 + playbgm 421, 1 checkflag 286 - callif 1, LilycoveCity_EventScript_14CE23 + call_if 1, LilycoveCity_EventScript_14CE23 checkflag 286 - callif 0, LilycoveCity_EventScript_14CE2C + call_if 0, LilycoveCity_EventScript_14CE2C compare RESULT, 0 - jumpeq LilycoveCity_EventScript_14CE35 + goto_if_eq LilycoveCity_EventScript_14CE35 msgbox LilycoveCity_Text_1680A9, 4 switch 0x4023 case 0, LilycoveCity_EventScript_14CE76 @@ -311,58 +311,58 @@ LilycoveCity_EventScript_14CE2C:: @ 814CE2C LilycoveCity_EventScript_14CE35:: @ 814CE35 setflag 286 msgbox LilycoveCity_Text_16802C, 4 - playmusicbattle 0 - fadedefault + savebgm 0 + fadedefaultbgm release end LilycoveCity_EventScript_14CE46:: @ 814CE46 trainerbattle 3, OPPONENT_MAY_11, 0, LilycoveCity_Text_167BD5 - jump LilycoveCity_EventScript_14CEA6 + goto LilycoveCity_EventScript_14CEA6 end LilycoveCity_EventScript_14CE56:: @ 814CE56 trainerbattle 3, OPPONENT_MAY_12, 0, LilycoveCity_Text_167BD5 - jump LilycoveCity_EventScript_14CEA6 + goto LilycoveCity_EventScript_14CEA6 end LilycoveCity_EventScript_14CE66:: @ 814CE66 trainerbattle 3, OPPONENT_MAY_10, 0, LilycoveCity_Text_167BD5 - jump LilycoveCity_EventScript_14CEA6 + goto LilycoveCity_EventScript_14CEA6 end LilycoveCity_EventScript_14CE76:: @ 814CE76 trainerbattle 3, OPPONENT_BRENDAN_11, 0, LilycoveCity_Text_1680E4 - jump LilycoveCity_EventScript_14CF12 + goto LilycoveCity_EventScript_14CF12 end LilycoveCity_EventScript_14CE86:: @ 814CE86 trainerbattle 3, OPPONENT_BRENDAN_12, 0, LilycoveCity_Text_1680E4 - jump LilycoveCity_EventScript_14CF12 + goto LilycoveCity_EventScript_14CF12 end LilycoveCity_EventScript_14CE96:: @ 814CE96 trainerbattle 3, OPPONENT_BRENDAN_10, 0, LilycoveCity_Text_1680E4 - jump LilycoveCity_EventScript_14CF12 + goto LilycoveCity_EventScript_14CF12 end LilycoveCity_EventScript_14CEA6:: @ 814CEA6 msgbox LilycoveCity_Text_167C6B, 4 setvar RESULT, 0 checkflag 2060 - callif 1, LilycoveCity_EventScript_14CEDE + call_if 1, LilycoveCity_EventScript_14CEDE compare RESULT, 0 - callif 1, LilycoveCity_EventScript_14CEEE + call_if 1, LilycoveCity_EventScript_14CEEE compare RESULT, 1 - callif 1, LilycoveCity_EventScript_14CEF7 + call_if 1, LilycoveCity_EventScript_14CEF7 clearflag 722 clearflag 849 - jump LilycoveCity_EventScript_14CF6B + goto LilycoveCity_EventScript_14CF6B end LilycoveCity_EventScript_14CEDE:: @ 814CEDE checkflag 2062 - jumpeq LilycoveCity_EventScript_14CEE8 + goto_if_eq LilycoveCity_EventScript_14CEE8 return LilycoveCity_EventScript_14CEE8:: @ 814CEE8 @@ -375,7 +375,7 @@ LilycoveCity_EventScript_14CEEE:: @ 814CEEE LilycoveCity_EventScript_14CEF7:: @ 814CEF7 checkflag 2052 - jumpeq LilycoveCity_EventScript_14CF09 + goto_if_eq LilycoveCity_EventScript_14CF09 msgbox LilycoveCity_Text_167DDD, 4 return @@ -387,13 +387,13 @@ LilycoveCity_EventScript_14CF12:: @ 814CF12 msgbox LilycoveCity_Text_168149, 4 setvar RESULT, 0 checkflag 2060 - callif 1, LilycoveCity_EventScript_14CEDE + call_if 1, LilycoveCity_EventScript_14CEDE compare RESULT, 0 - callif 1, LilycoveCity_EventScript_14CF47 + call_if 1, LilycoveCity_EventScript_14CF47 compare RESULT, 1 - callif 1, LilycoveCity_EventScript_14CF50 + call_if 1, LilycoveCity_EventScript_14CF50 clearflag 760 - jump LilycoveCity_EventScript_14CF6B + goto LilycoveCity_EventScript_14CF6B end LilycoveCity_EventScript_14CF47:: @ 814CF47 @@ -402,7 +402,7 @@ LilycoveCity_EventScript_14CF47:: @ 814CF47 LilycoveCity_EventScript_14CF50:: @ 814CF50 checkflag 2052 - jumpeq LilycoveCity_EventScript_14CF62 + goto_if_eq LilycoveCity_EventScript_14CF62 msgbox LilycoveCity_Text_168282, 4 return @@ -411,17 +411,17 @@ LilycoveCity_EventScript_14CF62:: @ 814CF62 return LilycoveCity_EventScript_14CF6B:: @ 814CF6B - closebutton - move LAST_TALKED, LilycoveCity_Movement_1A0845 - waitmove 0 - pause 50 - setanimation 0, 1 - doanimation 30 - pause 15 - disappear LAST_TALKED - checkanimation 30 - playmusicbattle 0 - fadedefault + closemessage + applymovement LAST_TALKED, LilycoveCity_Movement_1A0845 + waitmovement 0 + delay 50 + setfieldeffect 0, 1 + dofieldeffect 30 + delay 15 + removeobject LAST_TALKED + waitfieldeffect 30 + savebgm 0 + fadedefaultbgm setflag 292 release end diff --git a/data/scripts/maps/LilycoveCity_ContestHall.inc b/data/scripts/maps/LilycoveCity_ContestHall.inc index 3601cb455..944857a21 100644 --- a/data/scripts/maps/LilycoveCity_ContestHall.inc +++ b/data/scripts/maps/LilycoveCity_ContestHall.inc @@ -22,48 +22,48 @@ LilycoveCity_ContestHall_EventScript_1590B6:: @ 81590B6 LilycoveCity_ContestHall_EventScript_1590BF:: @ 81590BF msgbox LilycoveCity_ContestHall_Text_189301, 2 lockall - move 4, LilycoveCity_ContestHall_Movement_1A083D - waitmove 0 + applymovement 4, LilycoveCity_ContestHall_Movement_1A083D + waitmovement 0 releaseall end LilycoveCity_ContestHall_EventScript_1590D4:: @ 81590D4 msgbox LilycoveCity_ContestHall_Text_189366, 2 lockall - move 5, LilycoveCity_ContestHall_Movement_1A083D - waitmove 0 + applymovement 5, LilycoveCity_ContestHall_Movement_1A083D + waitmovement 0 releaseall end LilycoveCity_ContestHall_EventScript_1590E9:: @ 81590E9 msgbox LilycoveCity_ContestHall_Text_1893CE, 2 lockall - move 6, LilycoveCity_ContestHall_Movement_1A083D - waitmove 0 + applymovement 6, LilycoveCity_ContestHall_Movement_1A083D + waitmovement 0 releaseall end LilycoveCity_ContestHall_EventScript_1590FE:: @ 81590FE msgbox LilycoveCity_ContestHall_Text_189463, 2 lockall - move 7, LilycoveCity_ContestHall_Movement_1A083D - waitmove 0 + applymovement 7, LilycoveCity_ContestHall_Movement_1A083D + waitmovement 0 releaseall end LilycoveCity_ContestHall_EventScript_159113:: @ 8159113 msgbox LilycoveCity_ContestHall_Text_189512, 2 lockall - move 8, LilycoveCity_ContestHall_Movement_1A083D - waitmove 0 + applymovement 8, LilycoveCity_ContestHall_Movement_1A083D + waitmovement 0 releaseall end LilycoveCity_ContestHall_EventScript_159128:: @ 8159128 msgbox LilycoveCity_ContestHall_Text_18956B, 2 lockall - move 9, LilycoveCity_ContestHall_Movement_1A083D - waitmove 0 + applymovement 9, LilycoveCity_ContestHall_Movement_1A083D + waitmovement 0 releaseall end @@ -74,154 +74,154 @@ LilycoveCity_ContestHall_EventScript_15913D:: @ 815913D LilycoveCity_ContestHall_EventScript_159146:: @ 8159146 msgbox LilycoveCity_ContestHall_Text_189617, 2 lockall - move 12, LilycoveCity_ContestHall_Movement_1A083D - waitmove 0 + applymovement 12, LilycoveCity_ContestHall_Movement_1A083D + waitmovement 0 releaseall end LilycoveCity_ContestHall_EventScript_15915B:: @ 815915B msgbox LilycoveCity_ContestHall_Text_1896BE, 2 lockall - move 22, LilycoveCity_ContestHall_Movement_1A083D - waitmove 0 + applymovement 22, LilycoveCity_ContestHall_Movement_1A083D + waitmovement 0 releaseall end LilycoveCity_ContestHall_EventScript_159170:: @ 8159170 msgbox LilycoveCity_ContestHall_Text_1896FE, 2 lockall - move 11, LilycoveCity_ContestHall_Movement_1A083D - waitmove 0 + applymovement 11, LilycoveCity_ContestHall_Movement_1A083D + waitmovement 0 releaseall end LilycoveCity_ContestHall_EventScript_159185:: @ 8159185 msgbox LilycoveCity_ContestHall_Text_189771, 2 lockall - move 13, LilycoveCity_ContestHall_Movement_1A083D - waitmove 0 + applymovement 13, LilycoveCity_ContestHall_Movement_1A083D + waitmovement 0 releaseall end LilycoveCity_ContestHall_EventScript_15919A:: @ 815919A msgbox LilycoveCity_ContestHall_Text_1897AA, 2 lockall - move 14, LilycoveCity_ContestHall_Movement_1A083D - waitmove 0 + applymovement 14, LilycoveCity_ContestHall_Movement_1A083D + waitmovement 0 releaseall end LilycoveCity_ContestHall_EventScript_1591AF:: @ 81591AF msgbox LilycoveCity_ContestHall_Text_18980B, 2 lockall - move 15, LilycoveCity_ContestHall_Movement_1A083D - waitmove 0 + applymovement 15, LilycoveCity_ContestHall_Movement_1A083D + waitmovement 0 releaseall end LilycoveCity_ContestHall_EventScript_1591C4:: @ 81591C4 msgbox LilycoveCity_ContestHall_Text_189874, 2 lockall - move 16, LilycoveCity_ContestHall_Movement_1A083D - waitmove 0 + applymovement 16, LilycoveCity_ContestHall_Movement_1A083D + waitmovement 0 releaseall end LilycoveCity_ContestHall_EventScript_1591D9:: @ 81591D9 msgbox LilycoveCity_ContestHall_Text_18990A, 2 lockall - move 17, LilycoveCity_ContestHall_Movement_1A083D - waitmove 0 + applymovement 17, LilycoveCity_ContestHall_Movement_1A083D + waitmovement 0 releaseall end LilycoveCity_ContestHall_EventScript_1591EE:: @ 81591EE msgbox LilycoveCity_ContestHall_Text_189981, 2 lockall - move 18, LilycoveCity_ContestHall_Movement_1A083D - waitmove 0 + applymovement 18, LilycoveCity_ContestHall_Movement_1A083D + waitmovement 0 releaseall end LilycoveCity_ContestHall_EventScript_159203:: @ 8159203 msgbox LilycoveCity_ContestHall_Text_189A1D, 2 lockall - move 19, LilycoveCity_ContestHall_Movement_1A083D - waitmove 0 + applymovement 19, LilycoveCity_ContestHall_Movement_1A083D + waitmovement 0 releaseall end LilycoveCity_ContestHall_EventScript_159218:: @ 8159218 msgbox LilycoveCity_ContestHall_Text_189A82, 2 lockall - move 21, LilycoveCity_ContestHall_Movement_1A083D - waitmove 0 + applymovement 21, LilycoveCity_ContestHall_Movement_1A083D + waitmovement 0 releaseall end LilycoveCity_ContestHall_EventScript_15922D:: @ 815922D msgbox LilycoveCity_ContestHall_Text_189AE1, 2 lockall - move 20, LilycoveCity_ContestHall_Movement_1A083D - waitmove 0 + applymovement 20, LilycoveCity_ContestHall_Movement_1A083D + waitmovement 0 releaseall end LilycoveCity_ContestHall_EventScript_159242:: @ 8159242 msgbox LilycoveCity_ContestHall_Text_189B4E, 2 lockall - move 23, LilycoveCity_ContestHall_Movement_1A083D - waitmove 0 + applymovement 23, LilycoveCity_ContestHall_Movement_1A083D + waitmovement 0 releaseall end LilycoveCity_ContestHall_EventScript_159257:: @ 8159257 msgbox LilycoveCity_ContestHall_Text_189BBF, 2 lockall - move 24, LilycoveCity_ContestHall_Movement_1A083D - waitmove 0 + applymovement 24, LilycoveCity_ContestHall_Movement_1A083D + waitmovement 0 releaseall end LilycoveCity_ContestHall_EventScript_15926C:: @ 815926C msgbox LilycoveCity_ContestHall_Text_189C29, 2 lockall - move 25, LilycoveCity_ContestHall_Movement_1A083D - waitmove 0 + applymovement 25, LilycoveCity_ContestHall_Movement_1A083D + waitmovement 0 releaseall end LilycoveCity_ContestHall_EventScript_159281:: @ 8159281 msgbox LilycoveCity_ContestHall_Text_189C67, 2 lockall - move 26, LilycoveCity_ContestHall_Movement_1A083D - waitmove 0 + applymovement 26, LilycoveCity_ContestHall_Movement_1A083D + waitmovement 0 releaseall end LilycoveCity_ContestHall_EventScript_159296:: @ 8159296 msgbox LilycoveCity_ContestHall_Text_189CB3, 2 lockall - move 27, LilycoveCity_ContestHall_Movement_1A083D - waitmove 0 + applymovement 27, LilycoveCity_ContestHall_Movement_1A083D + waitmovement 0 releaseall end LilycoveCity_ContestHall_EventScript_1592AB:: @ 81592AB msgbox LilycoveCity_ContestHall_Text_189D11, 2 lockall - move 28, LilycoveCity_ContestHall_Movement_1A083D - waitmove 0 + applymovement 28, LilycoveCity_ContestHall_Movement_1A083D + waitmovement 0 releaseall end LilycoveCity_ContestHall_EventScript_1592C0:: @ 81592C0 lockall - move 29, LilycoveCity_ContestHall_Movement_1A0839 - waitmove 0 - pause 25 - move 29, LilycoveCity_ContestHall_Movement_1A083D - waitmove 0 + applymovement 29, LilycoveCity_ContestHall_Movement_1A0839 + waitmovement 0 + delay 25 + applymovement 29, LilycoveCity_ContestHall_Movement_1A083D + waitmovement 0 msgbox LilycoveCity_ContestHall_Text_189DA2, 3 releaseall end @@ -229,16 +229,16 @@ LilycoveCity_ContestHall_EventScript_1592C0:: @ 81592C0 LilycoveCity_ContestHall_EventScript_1592E2:: @ 81592E2 msgbox LilycoveCity_ContestHall_Text_189E5F, 2 lockall - move 31, LilycoveCity_ContestHall_Movement_1A083D - waitmove 0 + applymovement 31, LilycoveCity_ContestHall_Movement_1A083D + waitmovement 0 releaseall end LilycoveCity_ContestHall_EventScript_1592F7:: @ 81592F7 msgbox LilycoveCity_ContestHall_Text_189DF3, 2 lockall - move 30, LilycoveCity_ContestHall_Movement_1A083D - waitmove 0 + applymovement 30, LilycoveCity_ContestHall_Movement_1A083D + waitmovement 0 releaseall end diff --git a/data/scripts/maps/LilycoveCity_ContestLobby.inc b/data/scripts/maps/LilycoveCity_ContestLobby.inc index 6bdcf55e2..a8c32a4fe 100644 --- a/data/scripts/maps/LilycoveCity_ContestLobby.inc +++ b/data/scripts/maps/LilycoveCity_ContestLobby.inc @@ -14,41 +14,41 @@ LilycoveCity_ContestLobby_MapScript2_158877:: @ 8158877 LilycoveCity_ContestLobby_EventScript_158889:: @ 8158889 checkflag 775 - jumpeq LilycoveCity_ContestLobby_EventScript_158898 + goto_if_eq LilycoveCity_ContestLobby_EventScript_158898 setvar 0x4099, 0 end LilycoveCity_ContestLobby_EventScript_158898:: @ 8158898 lockall - reappear 4 - move 4, LilycoveCity_ContestLobby_Movement_158A3B - waitmove 4 - move 255, LilycoveCity_ContestLobby_Movement_158A4C - waitmove 0 + addobject 4 + applymovement 4, LilycoveCity_ContestLobby_Movement_158A3B + waitmovement 4 + applymovement 255, LilycoveCity_ContestLobby_Movement_158A4C + waitmovement 0 msgbox LilycoveCity_ContestLobby_Text_18890F, 4 lockall fadescreen 1 - showcontestwinner 0 + drawcontestwinner 0 lockall msgbox LilycoveCity_ContestLobby_Text_1889FD, 5 compare RESULT, 1 - jumpeq LilycoveCity_ContestLobby_EventScript_1588DE + goto_if_eq LilycoveCity_ContestLobby_EventScript_1588DE compare RESULT, 0 - jumpeq LilycoveCity_ContestLobby_EventScript_158918 + goto_if_eq LilycoveCity_ContestLobby_EventScript_158918 releaseall end LilycoveCity_ContestLobby_EventScript_1588DE:: @ 81588DE msgbox LilycoveCity_ContestLobby_Text_188AE8, 4 - closebutton + closemessage special sub_80C4CEC setvar 0x4099, 0 - specialval RESULT, GiveMonArtistRibbon + specialvar RESULT, GiveMonArtistRibbon compare RESULT, 1 - callif 1, LilycoveCity_ContestLobby_EventScript_158948 - move 4, LilycoveCity_ContestLobby_Movement_158A43 - waitmove 0 - disappear 4 + call_if 1, LilycoveCity_ContestLobby_EventScript_158948 + applymovement 4, LilycoveCity_ContestLobby_Movement_158A43 + waitmovement 0 + removeobject 4 call LilycoveCity_ContestLobby_EventScript_158994 call LilycoveCity_ContestLobby_EventScript_1589EA releaseall @@ -57,37 +57,37 @@ LilycoveCity_ContestLobby_EventScript_1588DE:: @ 81588DE LilycoveCity_ContestLobby_EventScript_158918:: @ 8158918 msgbox LilycoveCity_ContestLobby_Text_188C41, 5 compare RESULT, 1 - jumpeq LilycoveCity_ContestLobby_EventScript_1588DE + goto_if_eq LilycoveCity_ContestLobby_EventScript_1588DE msgbox LilycoveCity_ContestLobby_Text_188CBD, 4 - closebutton - move 4, LilycoveCity_ContestLobby_Movement_158A43 - waitmove 0 + closemessage + applymovement 4, LilycoveCity_ContestLobby_Movement_158A43 + waitmovement 0 setvar 0x4099, 0 - disappear 4 + removeobject 4 releaseall end LilycoveCity_ContestLobby_EventScript_158948:: @ 8158948 - inccounter GAME_STAT_RECEIVED_RIBBONS + incrementgamestat GAME_STAT_RECEIVED_RIBBONS special sub_80C4858 - move 4, LilycoveCity_ContestLobby_Movement_158A4E - waitmove 0 - playsfx 21 - move 4, LilycoveCity_ContestLobby_Movement_1A0833 - waitmove 0 - move 4, LilycoveCity_ContestLobby_Movement_158A52 - waitmove 0 + applymovement 4, LilycoveCity_ContestLobby_Movement_158A4E + waitmovement 0 + playse 21 + applymovement 4, LilycoveCity_ContestLobby_Movement_1A0833 + waitmovement 0 + applymovement 4, LilycoveCity_ContestLobby_Movement_158A52 + waitmovement 0 msgbox LilycoveCity_ContestLobby_Text_188BB5, 4 - fanfare 370 + playfanfare 370 msgbox LilycoveCity_ContestLobby_Text_188C03, 4 waitfanfare msgbox LilycoveCity_ContestLobby_Text_188C19, 4 msgbox LilycoveCity_ContestLobby_Text_188C32, 4 - closebutton + closemessage return LilycoveCity_ContestLobby_EventScript_158994:: @ 8158994 - specialval 0x8004, sub_80C4D50 + specialvar 0x8004, sub_80C4D50 switch 0x8004 case 1, LilycoveCity_ContestLobby_EventScript_1589D6 case 2, LilycoveCity_ContestLobby_EventScript_1589DA @@ -189,39 +189,39 @@ LilycoveCity_ContestLobby_Movement_158A52:: @ 8158A52 LilycoveCity_ContestLobby_EventScript_158A5B:: @ 8158A5B checkflag 775 - jumpeq LilycoveCity_ContestLobby_EventScript_158A6A + goto_if_eq LilycoveCity_ContestLobby_EventScript_158A6A setvar 0x4099, 0 end LilycoveCity_ContestLobby_EventScript_158A6A:: @ 8158A6A lockall - reappear 11 - move 11, LilycoveCity_ContestLobby_Movement_158B64 - waitmove 11 - move 255, LilycoveCity_ContestLobby_Movement_158B76 - waitmove 0 + addobject 11 + applymovement 11, LilycoveCity_ContestLobby_Movement_158B64 + waitmovement 11 + applymovement 255, LilycoveCity_ContestLobby_Movement_158B76 + waitmovement 0 msgbox LilycoveCity_ContestLobby_Text_18890F, 4 lockall fadescreen 1 - showcontestwinner 0 + drawcontestwinner 0 msgbox LilycoveCity_ContestLobby_Text_1889FD, 5 compare RESULT, 1 - jumpeq LilycoveCity_ContestLobby_EventScript_158AAE + goto_if_eq LilycoveCity_ContestLobby_EventScript_158AAE compare RESULT, 0 - jumpeq LilycoveCity_ContestLobby_EventScript_158AE8 + goto_if_eq LilycoveCity_ContestLobby_EventScript_158AE8 end LilycoveCity_ContestLobby_EventScript_158AAE:: @ 8158AAE msgbox LilycoveCity_ContestLobby_Text_188AE8, 4 - closebutton + closemessage special sub_80C4CEC setvar 0x4099, 0 - specialval RESULT, GiveMonArtistRibbon + specialvar RESULT, GiveMonArtistRibbon compare RESULT, 1 - callif 1, LilycoveCity_ContestLobby_EventScript_158B18 - move 11, LilycoveCity_ContestLobby_Movement_158B6D - waitmove 0 - disappear 11 + call_if 1, LilycoveCity_ContestLobby_EventScript_158B18 + applymovement 11, LilycoveCity_ContestLobby_Movement_158B6D + waitmovement 0 + removeobject 11 call LilycoveCity_ContestLobby_EventScript_158994 call LilycoveCity_ContestLobby_EventScript_1589EA releaseall @@ -230,33 +230,33 @@ LilycoveCity_ContestLobby_EventScript_158AAE:: @ 8158AAE LilycoveCity_ContestLobby_EventScript_158AE8:: @ 8158AE8 msgbox LilycoveCity_ContestLobby_Text_188C41, 5 compare RESULT, 1 - jumpeq LilycoveCity_ContestLobby_EventScript_158AAE + goto_if_eq LilycoveCity_ContestLobby_EventScript_158AAE msgbox LilycoveCity_ContestLobby_Text_188CBD, 4 - closebutton - move 11, LilycoveCity_ContestLobby_Movement_158B6D - waitmove 0 + closemessage + applymovement 11, LilycoveCity_ContestLobby_Movement_158B6D + waitmovement 0 setvar 0x4099, 0 - disappear 11 + removeobject 11 releaseall end LilycoveCity_ContestLobby_EventScript_158B18:: @ 8158B18 - inccounter GAME_STAT_RECEIVED_RIBBONS + incrementgamestat GAME_STAT_RECEIVED_RIBBONS special sub_80C4858 - move 11, LilycoveCity_ContestLobby_Movement_158B78 - waitmove 0 - playsfx 21 - move 11, LilycoveCity_ContestLobby_Movement_1A0833 - waitmove 0 - move 11, LilycoveCity_ContestLobby_Movement_158B7C - waitmove 0 + applymovement 11, LilycoveCity_ContestLobby_Movement_158B78 + waitmovement 0 + playse 21 + applymovement 11, LilycoveCity_ContestLobby_Movement_1A0833 + waitmovement 0 + applymovement 11, LilycoveCity_ContestLobby_Movement_158B7C + waitmovement 0 msgbox LilycoveCity_ContestLobby_Text_188BB5, 4 - fanfare 370 + playfanfare 370 msgbox LilycoveCity_ContestLobby_Text_188C03, 4 waitfanfare msgbox LilycoveCity_ContestLobby_Text_188C19, 4 msgbox LilycoveCity_ContestLobby_Text_188C32, 4 - closebutton + closemessage return LilycoveCity_ContestLobby_Movement_158B64:: @ 8158B64 @@ -306,19 +306,19 @@ LilycoveCity_ContestLobby_EventScript_158B85:: @ 8158B85 lockall checkitem ITEM_CONTEST_PASS, 1 compare RESULT, 0 - jumpeq LilycoveCity_ContestLobby_EventScript_158BBA + goto_if_eq LilycoveCity_ContestLobby_EventScript_158BBA checkflag 2 - jumpeq LilycoveCity_ContestLobby_EventScript_158BAE + goto_if_eq LilycoveCity_ContestLobby_EventScript_158BAE message LilycoveCity_ContestLobby_Text_18848C - waittext + waitmessage setflag 2 - jump LilycoveCity_ContestLobby_EventScript_158BF0 + goto LilycoveCity_ContestLobby_EventScript_158BF0 end LilycoveCity_ContestLobby_EventScript_158BAE:: @ 8158BAE message LilycoveCity_ContestLobby_Text_188584 - waittext - jump LilycoveCity_ContestLobby_EventScript_158BF0 + waitmessage + goto LilycoveCity_ContestLobby_EventScript_158BF0 end LilycoveCity_ContestLobby_EventScript_158BBA:: @ 8158BBA @@ -329,11 +329,11 @@ LilycoveCity_ContestLobby_EventScript_158BBA:: @ 8158BBA LilycoveCity_ContestLobby_EventScript_158BC4:: @ 8158BC4 msgbox LilycoveCity_ContestLobby_Text_188521, 5 compare RESULT, 0 - jumpeq LilycoveCity_ContestLobby_EventScript_158C35 + goto_if_eq LilycoveCity_ContestLobby_EventScript_158C35 call S_DoSaveDialog - hidebox 0, 0, 15, 9 + erasebox 0, 0, 15, 9 compare RESULT, 0 - jumpeq LilycoveCity_ContestLobby_EventScript_158C35 + goto_if_eq LilycoveCity_ContestLobby_EventScript_158C35 setflag 3 return @@ -348,7 +348,7 @@ LilycoveCity_ContestLobby_EventScript_158BF0:: @ 8158BF0 LilycoveCity_ContestLobby_EventScript_158C27:: @ 8158C27 msgbox LilycoveCity_ContestLobby_Text_1885A7, 4 - jump LilycoveCity_ContestLobby_EventScript_158B85 + goto LilycoveCity_ContestLobby_EventScript_158B85 end LilycoveCity_ContestLobby_EventScript_158C35:: @ 8158C35 @@ -362,39 +362,39 @@ LilycoveCity_ContestLobby_EventScript_158C42:: @ 8158C42 setvar CONTEST_RANK, 0 choosecontestpkmn compare 0x8004, 255 - jumpeq LilycoveCity_ContestLobby_EventScript_158CEA + goto_if_eq LilycoveCity_ContestLobby_EventScript_158CEA special sub_80C43F4 compare RESULT, 0 - jumpeq LilycoveCity_ContestLobby_EventScript_158C96 + goto_if_eq LilycoveCity_ContestLobby_EventScript_158C96 compare RESULT, 1 - jumpeq LilycoveCity_ContestLobby_EventScript_158CC0 + goto_if_eq LilycoveCity_ContestLobby_EventScript_158CC0 compare RESULT, 2 - jumpeq LilycoveCity_ContestLobby_EventScript_158CC0 + goto_if_eq LilycoveCity_ContestLobby_EventScript_158CC0 compare RESULT, 3 - jumpeq LilycoveCity_ContestLobby_EventScript_158CA4 + goto_if_eq LilycoveCity_ContestLobby_EventScript_158CA4 compare RESULT, 4 - jumpeq LilycoveCity_ContestLobby_EventScript_158CB2 + goto_if_eq LilycoveCity_ContestLobby_EventScript_158CB2 end LilycoveCity_ContestLobby_EventScript_158C96:: @ 8158C96 msgbox LilycoveCity_ContestLobby_Text_1A664A, 4 - jump LilycoveCity_ContestLobby_EventScript_158C42 + goto LilycoveCity_ContestLobby_EventScript_158C42 end LilycoveCity_ContestLobby_EventScript_158CA4:: @ 8158CA4 msgbox LilycoveCity_ContestLobby_Text_1A669F, 4 - jump LilycoveCity_ContestLobby_EventScript_158C42 + goto LilycoveCity_ContestLobby_EventScript_158C42 end LilycoveCity_ContestLobby_EventScript_158CB2:: @ 8158CB2 msgbox LilycoveCity_ContestLobby_Text_1A66DC, 4 - jump LilycoveCity_ContestLobby_EventScript_158C42 + goto LilycoveCity_ContestLobby_EventScript_158C42 end LilycoveCity_ContestLobby_EventScript_158CC0:: @ 8158CC0 copyvar 0x8008, 0x8004 message LilycoveCity_ContestLobby_Text_1A67A3 - waittext + waitmessage yesnobox 20, 8 switch RESULT case 0, LilycoveCity_ContestLobby_EventScript_158C42 @@ -403,31 +403,31 @@ LilycoveCity_ContestLobby_EventScript_158CC0:: @ 8158CC0 LilycoveCity_ContestLobby_EventScript_158CEA:: @ 8158CEA checkflag 3 - callif 0, LilycoveCity_ContestLobby_EventScript_158BC4 + call_if 0, LilycoveCity_ContestLobby_EventScript_158BC4 message LilycoveCity_ContestLobby_Text_1886DC - waittext + waitmessage multichoice 0, 0, 4, 0 switch RESULT case 5, LilycoveCity_ContestLobby_EventScript_158C35 case 127, LilycoveCity_ContestLobby_EventScript_158C35 copyvar CONTEST_CATEGORY, RESULT - jump LilycoveCity_ContestLobby_EventScript_158C42 + goto LilycoveCity_ContestLobby_EventScript_158C42 end LilycoveCity_ContestLobby_EventScript_158D24:: @ 8158D24 message LilycoveCity_ContestLobby_Text_1887C7 - waittext + waitmessage copyvar 0x8004, RESULT special sub_808363C waitstate compare RESULT, 3 - jumpeq LilycoveCity_ContestLobby_EventScript_158D90 + goto_if_eq LilycoveCity_ContestLobby_EventScript_158D90 compare RESULT, 5 - jumpeq LilycoveCity_ContestLobby_EventScript_158DA1 + goto_if_eq LilycoveCity_ContestLobby_EventScript_158DA1 compare RESULT, 6 - jumpeq LilycoveCity_ContestLobby_EventScript_158DB2 - message2 LilycoveCity_ContestLobby_Text_18872A - waittext + goto_if_eq LilycoveCity_ContestLobby_EventScript_158DB2 + messageautoscroll LilycoveCity_ContestLobby_Text_18872A + waitmessage contestlinktransfer switch 0x8004 case 0, LilycoveCity_ContestLobby_EventScript_158DD1 @@ -437,13 +437,13 @@ LilycoveCity_ContestLobby_EventScript_158D24:: @ 8158D24 LilycoveCity_ContestLobby_EventScript_158D82:: @ 8158D82 msgbox LilycoveCity_ContestLobby_Text_188750, 4 - jump LilycoveCity_ContestLobby_EventScript_158CEA + goto LilycoveCity_ContestLobby_EventScript_158CEA end LilycoveCity_ContestLobby_EventScript_158D90:: @ 8158D90 special CloseLink msgbox LilycoveCity_ContestLobby_Text_18878D, 4 - closebutton + closemessage releaseall clearflag 3 end @@ -451,7 +451,7 @@ LilycoveCity_ContestLobby_EventScript_158D90:: @ 8158D90 LilycoveCity_ContestLobby_EventScript_158DA1:: @ 8158DA1 special CloseLink msgbox LilycoveCity_ContestLobby_Text_1887F4, 4 - closebutton + closemessage releaseall clearflag 3 end @@ -459,24 +459,24 @@ LilycoveCity_ContestLobby_EventScript_158DA1:: @ 8158DA1 LilycoveCity_ContestLobby_EventScript_158DB2:: @ 8158DB2 special CloseLink msgbox LilycoveCity_ContestLobby_Text_18881F, 4 - closebutton + closemessage releaseall clearflag 3 end LilycoveCity_ContestLobby_EventScript_158DC3:: @ 8158DC3 msgbox LilycoveCity_ContestLobby_Text_18873A, 4 - jump LilycoveCity_ContestLobby_EventScript_158CEA + goto LilycoveCity_ContestLobby_EventScript_158CEA end LilycoveCity_ContestLobby_EventScript_158DD1:: @ 8158DD1 special sub_80C496C addvar 0x8004, 1 - buffernum 1, 32772 - message2 LilycoveCity_ContestLobby_Text_188845 - waittext + getnumberstring 1, 32772 + messageautoscroll LilycoveCity_ContestLobby_Text_188845 + waitmessage addvar 0x8004, 65535 - jump LilycoveCity_ContestLobby_EventScript_158DEE + goto LilycoveCity_ContestLobby_EventScript_158DEE end LilycoveCity_ContestLobby_EventScript_158DEE:: @ 8158DEE @@ -490,34 +490,34 @@ LilycoveCity_ContestLobby_EventScript_158DEE:: @ 8158DEE LilycoveCity_ContestLobby_EventScript_158E0B:: @ 8158E0B lockall - message2 LilycoveCity_ContestLobby_Text_1888C6 - waittext - pause 20 - closebutton - move 2, LilycoveCity_ContestLobby_Movement_158E9C - waitmove 0 - playsfx 71 + messageautoscroll LilycoveCity_ContestLobby_Text_1888C6 + waitmessage + delay 20 + closemessage + applymovement 2, LilycoveCity_ContestLobby_Movement_158E9C + waitmovement 0 + playse 71 setmaptile 9, 2, 545, 1 setmaptile 9, 3, 609, 1 special DrawWholeMapView - move 2, LilycoveCity_ContestLobby_Movement_158EA0 - waitmove 0 - playsfx 71 + applymovement 2, LilycoveCity_ContestLobby_Movement_158EA0 + waitmovement 0 + playse 71 setmaptile 9, 2, 721, 1 setmaptile 9, 3, 729, 1 special DrawWholeMapView - pause 20 - move 2, LilycoveCity_ContestLobby_Movement_158EAE - waitmove 0 - move 255, LilycoveCity_ContestLobby_Movement_158E99 - waitmove 0 - message2 LilycoveCity_ContestLobby_Text_1A6832 - waittext - pause 20 - closebutton - move 2, LilycoveCity_ContestLobby_Movement_158EA4 - move 255, LilycoveCity_ContestLobby_Movement_158E8E - waitmove 0 + delay 20 + applymovement 2, LilycoveCity_ContestLobby_Movement_158EAE + waitmovement 0 + applymovement 255, LilycoveCity_ContestLobby_Movement_158E99 + waitmovement 0 + messageautoscroll LilycoveCity_ContestLobby_Text_1A6832 + waitmessage + delay 20 + closemessage + applymovement 2, LilycoveCity_ContestLobby_Movement_158EA4 + applymovement 255, LilycoveCity_ContestLobby_Movement_158E8E + waitmovement 0 releaseall return @@ -568,9 +568,9 @@ LilycoveCity_ContestLobby_Movement_158EAE:: @ 8158EAE step_end LilycoveCity_ContestLobby_EventScript_158EB0:: @ 8158EB0 - specialval RESULT, sub_80C5044 + specialvar RESULT, sub_80C5044 compare RESULT, 1 - jumpeq LilycoveCity_ContestLobby_EventScript_158EE8 + goto_if_eq LilycoveCity_ContestLobby_EventScript_158EE8 setvar 0x800b, 8 setvar CONTEST_RANK, 3 call LilycoveCity_ContestLobby_EventScript_1A4E92 @@ -602,59 +602,59 @@ LilycoveCity_ContestLobby_EventScript_158F08:: @ 8158F08 return LilycoveCity_ContestLobby_EventScript_158F45:: @ 8158F45 - warp3 LinkContestRoom4, 255, 7, 5 + setwarp LinkContestRoom4, 255, 7, 5 special sub_8081334 waitstate return LilycoveCity_ContestLobby_EventScript_158F52:: @ 8158F52 - warp3 LinkContestRoom2, 255, 7, 5 + setwarp LinkContestRoom2, 255, 7, 5 special sub_8081334 waitstate return LilycoveCity_ContestLobby_EventScript_158F5F:: @ 8158F5F - warp3 LinkContestRoom6, 255, 7, 5 + setwarp LinkContestRoom6, 255, 7, 5 special sub_8081334 waitstate return LilycoveCity_ContestLobby_EventScript_158F6C:: @ 8158F6C - warp3 LinkContestRoom5, 255, 7, 5 + setwarp LinkContestRoom5, 255, 7, 5 special sub_8081334 waitstate return LilycoveCity_ContestLobby_EventScript_158F79:: @ 8158F79 - warp3 LinkContestRoom3, 255, 7, 5 + setwarp LinkContestRoom3, 255, 7, 5 special sub_8081334 waitstate return LilycoveCity_ContestLobby_EventScript_158F86:: @ 8158F86 lockall - move 1, LilycoveCity_ContestLobby_Movement_15900B - waitmove 0 - playsfx 71 + applymovement 1, LilycoveCity_ContestLobby_Movement_15900B + waitmovement 0 + playse 71 setmaptile 4, 2, 545, 1 setmaptile 4, 3, 609, 1 special DrawWholeMapView - move 1, LilycoveCity_ContestLobby_Movement_15900F - waitmove 0 - playsfx 71 + applymovement 1, LilycoveCity_ContestLobby_Movement_15900F + waitmovement 0 + playse 71 setmaptile 4, 2, 721, 1 setmaptile 4, 3, 729, 1 special DrawWholeMapView - pause 20 - move 1, LilycoveCity_ContestLobby_Movement_15901C - waitmove 0 - move 255, LilycoveCity_ContestLobby_Movement_159008 - waitmove 0 + delay 20 + applymovement 1, LilycoveCity_ContestLobby_Movement_15901C + waitmovement 0 + applymovement 255, LilycoveCity_ContestLobby_Movement_159008 + waitmovement 0 msgbox LilycoveCity_ContestLobby_Text_1A6832, 4 - closebutton - move 1, LilycoveCity_ContestLobby_Movement_159013 - move 255, LilycoveCity_ContestLobby_Movement_158FFE - waitmove 0 + closemessage + applymovement 1, LilycoveCity_ContestLobby_Movement_159013 + applymovement 255, LilycoveCity_ContestLobby_Movement_158FFE + waitmovement 0 releaseall return @@ -708,7 +708,7 @@ LilycoveCity_ContestLobby_EventScript_15901E:: @ 815901E LilycoveCity_ContestLobby_EventScript_159027:: @ 8159027 checkflag 150 - jumpif 0, LilycoveCity_ContestLobby_EventScript_159039 + goto_if 0, LilycoveCity_ContestLobby_EventScript_159039 msgbox LilycoveCity_ContestLobby_Text_188DDA, 2 end @@ -735,21 +735,21 @@ LilycoveCity_ContestLobby_EventScript_15905D:: @ 815905D LilycoveCity_ContestLobby_EventScript_159066:: @ 8159066 lockall fadescreen 1 - showcontestwinner 6 + drawcontestwinner 6 releaseall end LilycoveCity_ContestLobby_EventScript_15906D:: @ 815906D lockall fadescreen 1 - showcontestwinner 7 + drawcontestwinner 7 releaseall end LilycoveCity_ContestLobby_EventScript_159074:: @ 8159074 lockall fadescreen 1 - showcontestwinner 8 + drawcontestwinner 8 releaseall end @@ -766,6 +766,6 @@ SlateportCity_ContestLobby_EventScript_15908D:: @ 815908D lockall special ShowBerryBlenderRecordWindow waitbutton - hidebox 0, 0, 29, 19 + erasebox 0, 0, 29, 19 releaseall end diff --git a/data/scripts/maps/LilycoveCity_CoveLilyMotel_1F.inc b/data/scripts/maps/LilycoveCity_CoveLilyMotel_1F.inc index 95945a595..7b602b2c7 100644 --- a/data/scripts/maps/LilycoveCity_CoveLilyMotel_1F.inc +++ b/data/scripts/maps/LilycoveCity_CoveLilyMotel_1F.inc @@ -4,57 +4,57 @@ LilycoveCity_CoveLilyMotel_1F_MapScripts:: @ 81582C4 LilycoveCity_CoveLilyMotel_1F_EventScript_1582C5:: @ 81582C5 lockall checkflag 2052 - jumpeq LilycoveCity_CoveLilyMotel_1F_EventScript_158326 + goto_if_eq LilycoveCity_CoveLilyMotel_1F_EventScript_158326 checkflag 2061 - jumpeq LilycoveCity_CoveLilyMotel_1F_EventScript_1582FF + goto_if_eq LilycoveCity_CoveLilyMotel_1F_EventScript_1582FF msgbox LilycoveCity_CoveLilyMotel_1F_Text_186B71, 4 - move 1, LilycoveCity_CoveLilyMotel_1F_Movement_1A0839 - waitmove 0 + applymovement 1, LilycoveCity_CoveLilyMotel_1F_Movement_1A0839 + waitmovement 0 msgbox LilycoveCity_CoveLilyMotel_1F_Text_186C2B, 4 - closebutton - move 1, LilycoveCity_CoveLilyMotel_1F_Movement_1A083D - waitmove 0 + closemessage + applymovement 1, LilycoveCity_CoveLilyMotel_1F_Movement_1A083D + waitmovement 0 releaseall end LilycoveCity_CoveLilyMotel_1F_EventScript_1582FF:: @ 81582FF msgbox LilycoveCity_CoveLilyMotel_1F_Text_186CCE, 4 - move 1, LilycoveCity_CoveLilyMotel_1F_Movement_1A0839 - waitmove 0 + applymovement 1, LilycoveCity_CoveLilyMotel_1F_Movement_1A0839 + waitmovement 0 msgbox LilycoveCity_CoveLilyMotel_1F_Text_186D7F, 4 - closebutton - move 1, LilycoveCity_CoveLilyMotel_1F_Movement_1A083D - waitmove 0 + closemessage + applymovement 1, LilycoveCity_CoveLilyMotel_1F_Movement_1A083D + waitmovement 0 releaseall end LilycoveCity_CoveLilyMotel_1F_EventScript_158326:: @ 8158326 msgbox LilycoveCity_CoveLilyMotel_1F_Text_186E57, 4 - move 1, LilycoveCity_CoveLilyMotel_1F_Movement_1A0839 - waitmove 0 + applymovement 1, LilycoveCity_CoveLilyMotel_1F_Movement_1A0839 + waitmovement 0 msgbox LilycoveCity_CoveLilyMotel_1F_Text_186F09, 4 - closebutton - move 1, LilycoveCity_CoveLilyMotel_1F_Movement_1A083D - waitmove 0 + closemessage + applymovement 1, LilycoveCity_CoveLilyMotel_1F_Movement_1A083D + waitmovement 0 releaseall end LilycoveCity_CoveLilyMotel_1F_EventScript_15834D:: @ 815834D lockall - playsfx 21 - move 1, LilycoveCity_CoveLilyMotel_1F_Movement_1A0833 - waitmove 0 - move 1, LilycoveCity_CoveLilyMotel_1F_Movement_1A0835 - waitmove 0 - move 255, LilycoveCity_CoveLilyMotel_1F_Movement_1A0845 - waitmove 0 + playse 21 + applymovement 1, LilycoveCity_CoveLilyMotel_1F_Movement_1A0833 + waitmovement 0 + applymovement 1, LilycoveCity_CoveLilyMotel_1F_Movement_1A0835 + waitmovement 0 + applymovement 255, LilycoveCity_CoveLilyMotel_1F_Movement_1A0845 + waitmovement 0 msgbox LilycoveCity_CoveLilyMotel_1F_Text_186CA6, 4 - closebutton - move 255, LilycoveCity_CoveLilyMotel_1F_Movement_158395 - move 1, LilycoveCity_CoveLilyMotel_1F_Movement_15839A - waitmove 0 - move 1, LilycoveCity_CoveLilyMotel_1F_Movement_15839C - waitmove 0 + closemessage + applymovement 255, LilycoveCity_CoveLilyMotel_1F_Movement_158395 + applymovement 1, LilycoveCity_CoveLilyMotel_1F_Movement_15839A + waitmovement 0 + applymovement 1, LilycoveCity_CoveLilyMotel_1F_Movement_15839C + waitmovement 0 release end diff --git a/data/scripts/maps/LilycoveCity_CoveLilyMotel_2F.inc b/data/scripts/maps/LilycoveCity_CoveLilyMotel_2F.inc index 09d19c1c5..fd9ea8a58 100644 --- a/data/scripts/maps/LilycoveCity_CoveLilyMotel_2F.inc +++ b/data/scripts/maps/LilycoveCity_CoveLilyMotel_2F.inc @@ -5,12 +5,12 @@ LilycoveCity_CoveLilyMotel_2F_EventScript_1583A1:: @ 81583A1 lock faceplayer checkflag 2 - callif 0, LilycoveCity_CoveLilyMotel_2F_EventScript_1583C7 + call_if 0, LilycoveCity_CoveLilyMotel_2F_EventScript_1583C7 checkflag 2 - callif 1, LilycoveCity_CoveLilyMotel_2F_EventScript_1583DD - specialval RESULT, sub_8090FC0 + call_if 1, LilycoveCity_CoveLilyMotel_2F_EventScript_1583DD + specialvar RESULT, sub_8090FC0 compare RESULT, 1 - jumpeq LilycoveCity_CoveLilyMotel_2F_EventScript_1583D0 + goto_if_eq LilycoveCity_CoveLilyMotel_2F_EventScript_1583D0 release end @@ -20,14 +20,14 @@ LilycoveCity_CoveLilyMotel_2F_EventScript_1583C7:: @ 81583C7 LilycoveCity_CoveLilyMotel_2F_EventScript_1583D0:: @ 81583D0 setflag 2 - fanfare 370 + playfanfare 370 waitfanfare - jump LilycoveCity_CoveLilyMotel_2F_EventScript_1583DD + goto LilycoveCity_CoveLilyMotel_2F_EventScript_1583DD end LilycoveCity_CoveLilyMotel_2F_EventScript_1583DD:: @ 81583DD message LilycoveCity_CoveLilyMotel_2F_Text_18708F - waittext + waitmessage call LilycoveCity_CoveLilyMotel_2F_EventScript_1A02C5 special ScrSpecial_ShowDiploma waitstate diff --git a/data/scripts/maps/LilycoveCity_DepartmentStoreElevator.inc b/data/scripts/maps/LilycoveCity_DepartmentStoreElevator.inc index 74b746633..9d04d2e33 100644 --- a/data/scripts/maps/LilycoveCity_DepartmentStoreElevator.inc +++ b/data/scripts/maps/LilycoveCity_DepartmentStoreElevator.inc @@ -5,11 +5,11 @@ LilycoveCity_DepartmentStoreElevator_EventScript_15A39C:: @ 815A39C lock faceplayer checkflag 2 - callif 0, LilycoveCity_DepartmentStoreElevator_EventScript_15A4CF + call_if 0, LilycoveCity_DepartmentStoreElevator_EventScript_15A4CF copyvar 0x8005, 0x4043 special sub_810E944 message LilycoveCity_DepartmentStoreElevator_Text_1A0EF6 - waittext + waitmessage multichoice 0, 0, 57, 0 switch RESULT case 0, LilycoveCity_DepartmentStoreElevator_EventScript_15A402 @@ -21,59 +21,59 @@ LilycoveCity_DepartmentStoreElevator_EventScript_15A39C:: @ 815A39C end LilycoveCity_DepartmentStoreElevator_EventScript_15A402:: @ 815A402 - warpplace LilycoveCity_DepartmentStore_1F, 255, 2, 1 + setdynamicwarp LilycoveCity_DepartmentStore_1F, 255, 2, 1 compare 0x4043, 0 - jumpeq LilycoveCity_DepartmentStoreElevator_EventScript_15A4B1 + goto_if_eq LilycoveCity_DepartmentStoreElevator_EventScript_15A4B1 call LilycoveCity_DepartmentStoreElevator_EventScript_15A4B8 setvar 0x4043, 0 - jump LilycoveCity_DepartmentStoreElevator_EventScript_15A4B1 + goto LilycoveCity_DepartmentStoreElevator_EventScript_15A4B1 end LilycoveCity_DepartmentStoreElevator_EventScript_15A425:: @ 815A425 - warpplace LilycoveCity_DepartmentStore_2F, 255, 2, 1 + setdynamicwarp LilycoveCity_DepartmentStore_2F, 255, 2, 1 compare 0x4043, 1 - jumpeq LilycoveCity_DepartmentStoreElevator_EventScript_15A4B1 + goto_if_eq LilycoveCity_DepartmentStoreElevator_EventScript_15A4B1 call LilycoveCity_DepartmentStoreElevator_EventScript_15A4B8 setvar 0x4043, 1 - jump LilycoveCity_DepartmentStoreElevator_EventScript_15A4B1 + goto LilycoveCity_DepartmentStoreElevator_EventScript_15A4B1 end LilycoveCity_DepartmentStoreElevator_EventScript_15A448:: @ 815A448 - warpplace LilycoveCity_DepartmentStore_3F, 255, 2, 1 + setdynamicwarp LilycoveCity_DepartmentStore_3F, 255, 2, 1 compare 0x4043, 2 - jumpeq LilycoveCity_DepartmentStoreElevator_EventScript_15A4B1 + goto_if_eq LilycoveCity_DepartmentStoreElevator_EventScript_15A4B1 call LilycoveCity_DepartmentStoreElevator_EventScript_15A4B8 setvar 0x4043, 2 - jump LilycoveCity_DepartmentStoreElevator_EventScript_15A4B1 + goto LilycoveCity_DepartmentStoreElevator_EventScript_15A4B1 end LilycoveCity_DepartmentStoreElevator_EventScript_15A46B:: @ 815A46B - warpplace LilycoveCity_DepartmentStore_4F, 255, 2, 1 + setdynamicwarp LilycoveCity_DepartmentStore_4F, 255, 2, 1 compare 0x4043, 3 - jumpeq LilycoveCity_DepartmentStoreElevator_EventScript_15A4B1 + goto_if_eq LilycoveCity_DepartmentStoreElevator_EventScript_15A4B1 call LilycoveCity_DepartmentStoreElevator_EventScript_15A4B8 setvar 0x4043, 3 - jump LilycoveCity_DepartmentStoreElevator_EventScript_15A4B1 + goto LilycoveCity_DepartmentStoreElevator_EventScript_15A4B1 end LilycoveCity_DepartmentStoreElevator_EventScript_15A48E:: @ 815A48E - warpplace LilycoveCity_DepartmentStore_5F, 255, 2, 1 + setdynamicwarp LilycoveCity_DepartmentStore_5F, 255, 2, 1 compare 0x4043, 4 - jumpeq LilycoveCity_DepartmentStoreElevator_EventScript_15A4B1 + goto_if_eq LilycoveCity_DepartmentStoreElevator_EventScript_15A4B1 call LilycoveCity_DepartmentStoreElevator_EventScript_15A4B8 setvar 0x4043, 4 - jump LilycoveCity_DepartmentStoreElevator_EventScript_15A4B1 + goto LilycoveCity_DepartmentStoreElevator_EventScript_15A4B1 end LilycoveCity_DepartmentStoreElevator_EventScript_15A4B1:: @ 815A4B1 - hidebox 0, 0, 29, 19 + erasebox 0, 0, 29, 19 release end LilycoveCity_DepartmentStoreElevator_EventScript_15A4B8:: @ 815A4B8 - hidebox 0, 0, 29, 19 - move LAST_TALKED, LilycoveCity_DepartmentStoreElevator_Movement_1A0845 - waitmove 0 + erasebox 0, 0, 29, 19 + applymovement LAST_TALKED, LilycoveCity_DepartmentStoreElevator_Movement_1A0845 + waitmovement 0 special sub_810EBEC waitstate setflag 2 diff --git a/data/scripts/maps/LilycoveCity_DepartmentStoreRooftop.inc b/data/scripts/maps/LilycoveCity_DepartmentStoreRooftop.inc index f84c84201..29914a9b5 100644 --- a/data/scripts/maps/LilycoveCity_DepartmentStoreRooftop.inc +++ b/data/scripts/maps/LilycoveCity_DepartmentStoreRooftop.inc @@ -3,11 +3,11 @@ LilycoveCity_DepartmentStoreRooftop_MapScripts:: @ 815A13F .byte 0 LilycoveCity_DepartmentStoreRooftop_MapScript1_15A145:: @ 815A145 - event_96 3 + getpricereduction 3 compare RESULT, 1 - callif 1, LilycoveCity_DepartmentStoreRooftop_EventScript_15A15F + call_if 1, LilycoveCity_DepartmentStoreRooftop_EventScript_15A15F compare RESULT, 0 - callif 1, LilycoveCity_DepartmentStoreRooftop_EventScript_15A163 + call_if 1, LilycoveCity_DepartmentStoreRooftop_EventScript_15A163 end LilycoveCity_DepartmentStoreRooftop_EventScript_15A15F:: @ 815A15F @@ -22,7 +22,7 @@ LilycoveCity_DepartmentStoreRooftop_EventScript_15A167:: @ 815A167 lock faceplayer message LilycoveCity_DepartmentStoreRooftop_Text_1A0BE4 - waittext + waitmessage pokemartdecor LilycoveCity_DepartmentStoreRooftop_Decorations msgbox LilycoveCity_DepartmentStoreRooftop_Text_1A0C02, 4 release @@ -51,9 +51,9 @@ LilycoveCity_DepartmentStoreRooftop_Decorations:: @ 815A180 LilycoveCity_DepartmentStoreRooftop_EventScript_15A1A0:: @ 815A1A0 lock faceplayer - event_96 3 + getpricereduction 3 compare RESULT, 1 - callif 1, LilycoveCity_DepartmentStoreRooftop_EventScript_15A1BA + call_if 1, LilycoveCity_DepartmentStoreRooftop_EventScript_15A1BA msgbox LilycoveCity_DepartmentStoreRooftop_Text_18C61F, 4 release end @@ -70,10 +70,10 @@ LilycoveCity_DepartmentStoreRooftop_EventScript_15A1C4:: @ 815A1C4 LilycoveCity_DepartmentStoreRooftop_EventScript_15A1CD:: @ 815A1CD lockall message LilycoveCity_DepartmentStoreRooftop_Text_18C72B - waittext - showmoney 0, 0 - snop - jump LilycoveCity_DepartmentStoreRooftop_EventScript_15A1DE + waitmessage + showmoneybox 0, 0 + nop + goto LilycoveCity_DepartmentStoreRooftop_EventScript_15A1DE end LilycoveCity_DepartmentStoreRooftop_EventScript_15A1DE:: @ 815A1DE @@ -84,22 +84,22 @@ LilycoveCity_DepartmentStoreRooftop_EventScript_15A1DE:: @ 815A1DE case 1, LilycoveCity_DepartmentStoreRooftop_EventScript_15A227 case 2, LilycoveCity_DepartmentStoreRooftop_EventScript_15A232 msgbox LilycoveCity_DepartmentStoreRooftop_Text_18C7C3, 4 - jump LilycoveCity_DepartmentStoreRooftop_EventScript_15A396 + goto LilycoveCity_DepartmentStoreRooftop_EventScript_15A396 end LilycoveCity_DepartmentStoreRooftop_EventScript_15A21C:: @ 815A21C setvar 0x4000, 26 - jump LilycoveCity_DepartmentStoreRooftop_EventScript_15A267 + goto LilycoveCity_DepartmentStoreRooftop_EventScript_15A267 end LilycoveCity_DepartmentStoreRooftop_EventScript_15A227:: @ 815A227 setvar 0x4000, 27 - jump LilycoveCity_DepartmentStoreRooftop_EventScript_15A267 + goto LilycoveCity_DepartmentStoreRooftop_EventScript_15A267 end LilycoveCity_DepartmentStoreRooftop_EventScript_15A232:: @ 815A232 setvar 0x4000, 28 - jump LilycoveCity_DepartmentStoreRooftop_EventScript_15A267 + goto LilycoveCity_DepartmentStoreRooftop_EventScript_15A267 end LilycoveCity_DepartmentStoreRooftop_EventScript_15A23D:: @ 815A23D @@ -115,88 +115,88 @@ LilycoveCity_DepartmentStoreRooftop_EventScript_15A24B:: @ 815A24B return LilycoveCity_DepartmentStoreRooftop_EventScript_15A252:: @ 815A252 - paymoney 0xc8, 0 + takemoney 0xc8, 0 return LilycoveCity_DepartmentStoreRooftop_EventScript_15A259:: @ 815A259 - paymoney 0x12c, 0 + takemoney 0x12c, 0 return LilycoveCity_DepartmentStoreRooftop_EventScript_15A260:: @ 815A260 - paymoney 0x15e, 0 + takemoney 0x15e, 0 return LilycoveCity_DepartmentStoreRooftop_EventScript_15A267:: @ 815A267 compare 0x4001, 0 - callif 1, LilycoveCity_DepartmentStoreRooftop_EventScript_15A23D + call_if 1, LilycoveCity_DepartmentStoreRooftop_EventScript_15A23D compare 0x4001, 1 - callif 1, LilycoveCity_DepartmentStoreRooftop_EventScript_15A244 + call_if 1, LilycoveCity_DepartmentStoreRooftop_EventScript_15A244 compare 0x4001, 2 - callif 1, LilycoveCity_DepartmentStoreRooftop_EventScript_15A24B + call_if 1, LilycoveCity_DepartmentStoreRooftop_EventScript_15A24B compare RESULT, 0 - jumpeq LilycoveCity_DepartmentStoreRooftop_EventScript_15A37A + goto_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_15A37A checkitemspace 0x4000, 1 compare RESULT, 0 - jumpeq LilycoveCity_DepartmentStoreRooftop_EventScript_15A388 + goto_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_15A388 compare 0x4001, 0 - callif 1, LilycoveCity_DepartmentStoreRooftop_EventScript_15A252 + call_if 1, LilycoveCity_DepartmentStoreRooftop_EventScript_15A252 compare 0x4001, 1 - callif 1, LilycoveCity_DepartmentStoreRooftop_EventScript_15A259 + call_if 1, LilycoveCity_DepartmentStoreRooftop_EventScript_15A259 compare 0x4001, 2 - callif 1, LilycoveCity_DepartmentStoreRooftop_EventScript_15A260 - updatemoney 0, 0 - snop - bufferitem 0, 0x4000 - playsfx 106 + call_if 1, LilycoveCity_DepartmentStoreRooftop_EventScript_15A260 + updatemoneybox 0, 0 + nop + getitemname 0, 0x4000 + playse 106 msgbox LilycoveCity_DepartmentStoreRooftop_Text_18C75F, 4 additem 0x4000, 1 - bufferitem 1, 0x4000 - bufferstd 2, 14 + getitemname 1, 0x4000 + getstdstring 2, 14 msgbox LilycoveCity_DepartmentStoreRooftop_Text_1A0C8C, 4 random 64 compare RESULT, 0 - jumpif 5, LilycoveCity_DepartmentStoreRooftop_EventScript_15A36E + goto_if 5, LilycoveCity_DepartmentStoreRooftop_EventScript_15A36E checkitemspace 0x4000, 1 compare RESULT, 0 - jumpeq LilycoveCity_DepartmentStoreRooftop_EventScript_15A388 - playsfx 106 + goto_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_15A388 + playse 106 msgbox LilycoveCity_DepartmentStoreRooftop_Text_18C780, 4 additem 0x4000, 1 - bufferitem 1, 0x4000 - bufferstd 2, 14 + getitemname 1, 0x4000 + getstdstring 2, 14 msgbox LilycoveCity_DepartmentStoreRooftop_Text_1A0C8C, 4 random 64 compare RESULT, 0 - jumpif 5, LilycoveCity_DepartmentStoreRooftop_EventScript_15A36E + goto_if 5, LilycoveCity_DepartmentStoreRooftop_EventScript_15A36E checkitemspace 0x4000, 1 compare RESULT, 0 - jumpeq LilycoveCity_DepartmentStoreRooftop_EventScript_15A388 - playsfx 106 + goto_if_eq LilycoveCity_DepartmentStoreRooftop_EventScript_15A388 + playse 106 msgbox LilycoveCity_DepartmentStoreRooftop_Text_18C780, 4 additem 0x4000, 1 - bufferitem 1, 0x4000 - bufferstd 2, 14 + getitemname 1, 0x4000 + getstdstring 2, 14 msgbox LilycoveCity_DepartmentStoreRooftop_Text_1A0C8C, 4 - jump LilycoveCity_DepartmentStoreRooftop_EventScript_15A36E + goto LilycoveCity_DepartmentStoreRooftop_EventScript_15A36E end LilycoveCity_DepartmentStoreRooftop_EventScript_15A36E:: @ 815A36E message LilycoveCity_DepartmentStoreRooftop_Text_18C72B - waittext - jump LilycoveCity_DepartmentStoreRooftop_EventScript_15A1DE + waitmessage + goto LilycoveCity_DepartmentStoreRooftop_EventScript_15A1DE end LilycoveCity_DepartmentStoreRooftop_EventScript_15A37A:: @ 815A37A msgbox LilycoveCity_DepartmentStoreRooftop_Text_18C7AF, 4 - jump LilycoveCity_DepartmentStoreRooftop_EventScript_15A396 + goto LilycoveCity_DepartmentStoreRooftop_EventScript_15A396 end LilycoveCity_DepartmentStoreRooftop_EventScript_15A388:: @ 815A388 msgbox LilycoveCity_DepartmentStoreRooftop_Text_1A0C79, 4 - jump LilycoveCity_DepartmentStoreRooftop_EventScript_15A396 + goto LilycoveCity_DepartmentStoreRooftop_EventScript_15A396 end LilycoveCity_DepartmentStoreRooftop_EventScript_15A396:: @ 815A396 - hidemoney 0, 0 + hidemoneybox 0, 0 releaseall end diff --git a/data/scripts/maps/LilycoveCity_DepartmentStore_1F.inc b/data/scripts/maps/LilycoveCity_DepartmentStore_1F.inc index feff49c42..7acd29523 100644 --- a/data/scripts/maps/LilycoveCity_DepartmentStore_1F.inc +++ b/data/scripts/maps/LilycoveCity_DepartmentStore_1F.inc @@ -8,51 +8,51 @@ LilycoveCity_DepartmentStore_1F_EventScript_159D55:: @ 8159D55 LilycoveCity_DepartmentStore_1F_EventScript_159D5E:: @ 8159D5E lock faceplayer - checkdailyflags + dodailyevents compare 0x4045, 0 - jumpif 5, LilycoveCity_DepartmentStore_1F_EventScript_159EB1 + goto_if 5, LilycoveCity_DepartmentStore_1F_EventScript_159EB1 checkflag 2250 - jumpeq LilycoveCity_DepartmentStore_1F_EventScript_159E4C + goto_if_eq LilycoveCity_DepartmentStore_1F_EventScript_159E4C msgbox LilycoveCity_DepartmentStore_1F_Text_1C4B5E, 5 compare RESULT, 0 - jumpeq LilycoveCity_DepartmentStore_1F_EventScript_159E56 + goto_if_eq LilycoveCity_DepartmentStore_1F_EventScript_159E56 setflag 2250 message LilycoveCity_DepartmentStore_1F_Text_1C4CC6 - waittext + waitmessage special RetrieveLotteryNumber copyvar 0x8008, RESULT special sub_810F9AC msgbox LilycoveCity_DepartmentStore_1F_Text_1C4CF6, 4 - move 2, LilycoveCity_DepartmentStore_1F_Movement_1A0843 - waitmove 0 - playsfx 4 + applymovement 2, LilycoveCity_DepartmentStore_1F_Movement_1A0843 + waitmovement 0 + playse 4 special DoLotteryCornerComputerEffect special PickLotteryCornerTicket - pause 220 + delay 220 special EndLotteryCornerComputerEffect - pause 10 - move 2, LilycoveCity_DepartmentStore_1F_Movement_1A0839 - waitmove 0 + delay 10 + applymovement 2, LilycoveCity_DepartmentStore_1F_Movement_1A0839 + waitmovement 0 compare 0x8004, 0 - jumpeq LilycoveCity_DepartmentStore_1F_EventScript_159E60 - inccounter GAME_STAT_WON_POKEMON_LOTTERY + goto_if_eq LilycoveCity_DepartmentStore_1F_EventScript_159E60 + incrementgamestat GAME_STAT_WON_POKEMON_LOTTERY compare 0x8006, 0 - callif 1, LilycoveCity_DepartmentStore_1F_EventScript_159E3A + call_if 1, LilycoveCity_DepartmentStore_1F_EventScript_159E3A compare 0x8006, 1 - callif 1, LilycoveCity_DepartmentStore_1F_EventScript_159E43 - bufferitem 0, 0x8005 + call_if 1, LilycoveCity_DepartmentStore_1F_EventScript_159E43 + getitemname 0, 0x8005 compare 0x8004, 1 - callif 1, LilycoveCity_DepartmentStore_1F_EventScript_159E78 + call_if 1, LilycoveCity_DepartmentStore_1F_EventScript_159E78 compare 0x8004, 2 - callif 1, LilycoveCity_DepartmentStore_1F_EventScript_159E81 + call_if 1, LilycoveCity_DepartmentStore_1F_EventScript_159E81 compare 0x8004, 3 - callif 1, LilycoveCity_DepartmentStore_1F_EventScript_159E8A + call_if 1, LilycoveCity_DepartmentStore_1F_EventScript_159E8A compare 0x8004, 4 - callif 1, LilycoveCity_DepartmentStore_1F_EventScript_159E93 + call_if 1, LilycoveCity_DepartmentStore_1F_EventScript_159E93 giveitem 0x8005 compare RESULT, 0 - jumpeq LilycoveCity_DepartmentStore_1F_EventScript_159E9C - jump LilycoveCity_DepartmentStore_1F_EventScript_159E6E + goto_if_eq LilycoveCity_DepartmentStore_1F_EventScript_159E9C + goto LilycoveCity_DepartmentStore_1F_EventScript_159E6E end LilycoveCity_DepartmentStore_1F_EventScript_159E3A:: @ 8159E3A @@ -75,7 +75,7 @@ LilycoveCity_DepartmentStore_1F_EventScript_159E56:: @ 8159E56 LilycoveCity_DepartmentStore_1F_EventScript_159E60:: @ 8159E60 msgbox LilycoveCity_DepartmentStore_1F_Text_1C4E27, 4 - jump LilycoveCity_DepartmentStore_1F_EventScript_159E6E + goto LilycoveCity_DepartmentStore_1F_EventScript_159E6E end LilycoveCity_DepartmentStore_1F_EventScript_159E6E:: @ 8159E6E @@ -101,7 +101,7 @@ LilycoveCity_DepartmentStore_1F_EventScript_159E93:: @ 8159E93 LilycoveCity_DepartmentStore_1F_EventScript_159E9C:: @ 8159E9C copyvar 0x4045, 0x8005 - jump LilycoveCity_DepartmentStore_1F_EventScript_159EA7 + goto LilycoveCity_DepartmentStore_1F_EventScript_159EA7 end LilycoveCity_DepartmentStore_1F_EventScript_159EA7:: @ 8159EA7 @@ -113,7 +113,7 @@ LilycoveCity_DepartmentStore_1F_EventScript_159EB1:: @ 8159EB1 msgbox LilycoveCity_DepartmentStore_1F_Text_1C4FCC, 4 giveitem 0x4045 compare RESULT, 0 - jumpeq LilycoveCity_DepartmentStore_1F_EventScript_159EA7 + goto_if_eq LilycoveCity_DepartmentStore_1F_EventScript_159EA7 setvar 0x4045, 0 release end @@ -133,8 +133,8 @@ LilycoveCity_DepartmentStore_1F_EventScript_159EE9:: @ 8159EE9 LilycoveCity_DepartmentStore_1F_EventScript_159EF2:: @ 8159EF2 lock faceplayer - checksound - pokecry SPECIES_AZUMARILL, 0 + waitse + playpokecry SPECIES_AZUMARILL, 0 msgbox LilycoveCity_DepartmentStore_1F_Text_18C0C3, 4 waitpokecry release diff --git a/data/scripts/maps/LilycoveCity_DepartmentStore_2F.inc b/data/scripts/maps/LilycoveCity_DepartmentStore_2F.inc index e54883714..25e981628 100644 --- a/data/scripts/maps/LilycoveCity_DepartmentStore_2F.inc +++ b/data/scripts/maps/LilycoveCity_DepartmentStore_2F.inc @@ -17,7 +17,7 @@ LilycoveCity_DepartmentStore_2F_EventScript_159F2A:: @ 8159F2A lock faceplayer message LilycoveCity_DepartmentStore_2F_Text_1A0BE4 - waittext + waitmessage pokemart LilycoveCity_DepartmentStore_2F_Items1 msgbox LilycoveCity_DepartmentStore_2F_Text_1A0C02, 4 release @@ -44,7 +44,7 @@ LilycoveCity_DepartmentStore_2F_EventScript_159F5E:: @ 8159F5E lock faceplayer message LilycoveCity_DepartmentStore_2F_Text_1A0BE4 - waittext + waitmessage pokemart LilycoveCity_DepartmentStore_2F_Items2 msgbox LilycoveCity_DepartmentStore_2F_Text_1A0C02, 4 release diff --git a/data/scripts/maps/LilycoveCity_DepartmentStore_3F.inc b/data/scripts/maps/LilycoveCity_DepartmentStore_3F.inc index e669cef7f..1f55f5018 100644 --- a/data/scripts/maps/LilycoveCity_DepartmentStore_3F.inc +++ b/data/scripts/maps/LilycoveCity_DepartmentStore_3F.inc @@ -5,7 +5,7 @@ LilycoveCity_DepartmentStore_3F_EventScript_159F91:: @ 8159F91 lock faceplayer message LilycoveCity_DepartmentStore_3F_Text_1A0BE4 - waittext + waitmessage pokemart LilycoveCity_DepartmentStore_3F_Items1 msgbox LilycoveCity_DepartmentStore_3F_Text_1A0C02, 4 release @@ -27,7 +27,7 @@ LilycoveCity_DepartmentStore_3F_EventScript_159FB8:: @ 8159FB8 lock faceplayer message LilycoveCity_DepartmentStore_3F_Text_1A0BE4 - waittext + waitmessage pokemart LilycoveCity_DepartmentStore_3F_Items2 msgbox LilycoveCity_DepartmentStore_3F_Text_1A0C02, 4 release diff --git a/data/scripts/maps/LilycoveCity_DepartmentStore_4F.inc b/data/scripts/maps/LilycoveCity_DepartmentStore_4F.inc index 994b3b63f..d922d9181 100644 --- a/data/scripts/maps/LilycoveCity_DepartmentStore_4F.inc +++ b/data/scripts/maps/LilycoveCity_DepartmentStore_4F.inc @@ -17,7 +17,7 @@ LilycoveCity_DepartmentStore_4F_EventScript_15A019:: @ 815A019 lock faceplayer message LilycoveCity_DepartmentStore_4F_Text_1A0BE4 - waittext + waitmessage pokemart LilycoveCity_DepartmentStore_4F_Items1 msgbox LilycoveCity_DepartmentStore_4F_Text_1A0C02, 4 release @@ -37,7 +37,7 @@ LilycoveCity_DepartmentStore_4F_EventScript_15A03C:: @ 815A03C lock faceplayer message LilycoveCity_DepartmentStore_4F_Text_1A0BE4 - waittext + waitmessage pokemart LilycoveCity_DepartmentStore_4F_Items2 msgbox LilycoveCity_DepartmentStore_4F_Text_1A0C02, 4 release diff --git a/data/scripts/maps/LilycoveCity_DepartmentStore_5F.inc b/data/scripts/maps/LilycoveCity_DepartmentStore_5F.inc index 0bef8866a..835a0f48d 100644 --- a/data/scripts/maps/LilycoveCity_DepartmentStore_5F.inc +++ b/data/scripts/maps/LilycoveCity_DepartmentStore_5F.inc @@ -5,7 +5,7 @@ LilycoveCity_DepartmentStore_5F_EventScript_15A061:: @ 815A061 lock faceplayer message LilycoveCity_DepartmentStore_5F_Text_1A0BE4 - waittext + waitmessage pokemartbp LilycoveCity_DepartmentStore_5F_Items1 msgbox LilycoveCity_DepartmentStore_5F_Text_1A0C02, 4 release @@ -33,7 +33,7 @@ LilycoveCity_DepartmentStore_5F_EventScript_15A094:: @ 815A094 lock faceplayer message LilycoveCity_DepartmentStore_5F_Text_1A0BE4 - waittext + waitmessage pokemartbp LilycoveCity_DepartmentStore_5F_Items2 msgbox LilycoveCity_DepartmentStore_5F_Text_1A0C02, 4 release @@ -58,7 +58,7 @@ LilycoveCity_DepartmentStore_5F_EventScript_15A0C2:: @ 815A0C2 lock faceplayer message LilycoveCity_DepartmentStore_5F_Text_1A0BE4 - waittext + waitmessage pokemartbp LilycoveCity_DepartmentStore_5F_Items3 msgbox LilycoveCity_DepartmentStore_5F_Text_1A0C02, 4 release @@ -83,7 +83,7 @@ LilycoveCity_DepartmentStore_5F_EventScript_15A0F2:: @ 815A0F2 lock faceplayer message LilycoveCity_DepartmentStore_5F_Text_1A0BE4 - waittext + waitmessage pokemartbp LilycoveCity_DepartmentStore_5F_Items4 msgbox LilycoveCity_DepartmentStore_5F_Text_1A0C02, 4 release diff --git a/data/scripts/maps/LilycoveCity_Harbor.inc b/data/scripts/maps/LilycoveCity_Harbor.inc index aca6b16d4..7e14db994 100644 --- a/data/scripts/maps/LilycoveCity_Harbor.inc +++ b/data/scripts/maps/LilycoveCity_Harbor.inc @@ -3,7 +3,7 @@ LilycoveCity_Harbor_MapScripts:: @ 8159893 .byte 0 LilycoveCity_Harbor_MapScript1_159899:: @ 8159899 - warp6 LilycoveCity, 255, 12, 33 + setescapewarp LilycoveCity, 255, 12, 33 end LilycoveCity_Harbor_EventScript_1598A2:: @ 81598A2 @@ -11,13 +11,13 @@ LilycoveCity_Harbor_EventScript_1598A2:: @ 81598A2 faceplayer checkitem ITEM_EON_TICKET, 1 compare RESULT, 1 - jumpeq LilycoveCity_Harbor_EventScript_1599EE - jump LilycoveCity_Harbor_EventScript_1598BA + goto_if_eq LilycoveCity_Harbor_EventScript_1599EE + goto LilycoveCity_Harbor_EventScript_1598BA end LilycoveCity_Harbor_EventScript_1598BA:: @ 81598BA checkflag 2052 - jumpeq LilycoveCity_Harbor_EventScript_1598CD + goto_if_eq LilycoveCity_Harbor_EventScript_1598CD msgbox LilycoveCity_Harbor_Text_18B306, 4 release end @@ -26,14 +26,14 @@ LilycoveCity_Harbor_EventScript_1598CD:: @ 81598CD msgbox LilycoveCity_Harbor_Text_18B36F, 4 checkitem ITEM_SS_TICKET, 1 compare RESULT, 0 - jumpeq LilycoveCity_Harbor_EventScript_159929 + goto_if_eq LilycoveCity_Harbor_EventScript_159929 message LilycoveCity_Harbor_Text_18B406 - waittext - jump LilycoveCity_Harbor_EventScript_1598F1 + waitmessage + goto LilycoveCity_Harbor_EventScript_1598F1 end LilycoveCity_Harbor_EventScript_1598F1:: @ 81598F1 - multichoicedef 18, 6, 56, 2, 0 + multichoicedefault 18, 6, 56, 2, 0 switch RESULT case 0, LilycoveCity_Harbor_EventScript_159933 case 1, LilycoveCity_Harbor_EventScript_15995B @@ -49,7 +49,7 @@ LilycoveCity_Harbor_EventScript_159929:: @ 8159929 LilycoveCity_Harbor_EventScript_159933:: @ 8159933 msgbox LilycoveCity_Harbor_Text_18B47D, 5 compare RESULT, 0 - jumpeq LilycoveCity_Harbor_EventScript_15997E + goto_if_eq LilycoveCity_Harbor_EventScript_15997E setvar 0x40b4, 5 call LilycoveCity_Harbor_EventScript_15998A warp SSTidalCorridor, 255, 1, 10 @@ -60,7 +60,7 @@ LilycoveCity_Harbor_EventScript_159933:: @ 8159933 LilycoveCity_Harbor_EventScript_15995B:: @ 815995B msgbox LilycoveCity_Harbor_Text_18B499, 5 compare RESULT, 0 - jumpeq LilycoveCity_Harbor_EventScript_15997E + goto_if_eq LilycoveCity_Harbor_EventScript_15997E call LilycoveCity_Harbor_EventScript_15998A warp BattleTower_Outside, 255, 19, 23 waitstate @@ -69,35 +69,35 @@ LilycoveCity_Harbor_EventScript_15995B:: @ 815995B LilycoveCity_Harbor_EventScript_15997E:: @ 815997E message LilycoveCity_Harbor_Text_18B4E2 - waittext - jump LilycoveCity_Harbor_EventScript_1598F1 + waitmessage + goto LilycoveCity_Harbor_EventScript_1598F1 end LilycoveCity_Harbor_EventScript_15998A:: @ 815998A msgbox LilycoveCity_Harbor_Text_18B4B3, 4 - closebutton - move LAST_TALKED, LilycoveCity_Harbor_Movement_1A0841 - waitmove 0 - pause 30 - spriteinvisible LAST_TALKED, 13, 10 + closemessage + applymovement LAST_TALKED, LilycoveCity_Harbor_Movement_1A0841 + waitmovement 0 + delay 30 + hideobject LAST_TALKED, 13, 10 compare FACING, 2 - callif 1, LilycoveCity_Harbor_EventScript_1599D9 + call_if 1, LilycoveCity_Harbor_EventScript_1599D9 compare FACING, 4 - callif 1, LilycoveCity_Harbor_EventScript_1599CE - pause 30 - spriteinvisible 255, 0, 0 + call_if 1, LilycoveCity_Harbor_EventScript_1599CE + delay 30 + hideobject 255, 0, 0 setvar 0x8004, 2 call LilycoveCity_Harbor_EventScript_1A040E return LilycoveCity_Harbor_EventScript_1599CE:: @ 81599CE - move 255, LilycoveCity_Harbor_Movement_159A86 - waitmove 0 + applymovement 255, LilycoveCity_Harbor_Movement_159A86 + waitmovement 0 return LilycoveCity_Harbor_EventScript_1599D9:: @ 81599D9 - move 255, LilycoveCity_Harbor_Movement_159A89 - waitmove 0 + applymovement 255, LilycoveCity_Harbor_Movement_159A89 + waitmovement 0 return LilycoveCity_Harbor_EventScript_1599E4:: @ 81599E4 @@ -107,34 +107,34 @@ LilycoveCity_Harbor_EventScript_1599E4:: @ 81599E4 LilycoveCity_Harbor_EventScript_1599EE:: @ 81599EE checkflag 2052 - jumpif 0, LilycoveCity_Harbor_EventScript_1598BA + goto_if 0, LilycoveCity_Harbor_EventScript_1598BA checkflag 206 - jumpeq LilycoveCity_Harbor_EventScript_1598BA + goto_if_eq LilycoveCity_Harbor_EventScript_1598BA checkflag 2131 - jumpif 0, LilycoveCity_Harbor_EventScript_1598BA + goto_if 0, LilycoveCity_Harbor_EventScript_1598BA msgbox LilycoveCity_Harbor_Text_1C50F2, 4 - closebutton - move LAST_TALKED, LilycoveCity_Harbor_Movement_1A0841 - waitmove 0 - pause 30 - spriteinvisible LAST_TALKED, 13, 10 - pause 60 - reappear 4 - pause 30 - move 4, LilycoveCity_Harbor_Movement_1A0839 - waitmove 0 + closemessage + applymovement LAST_TALKED, LilycoveCity_Harbor_Movement_1A0841 + waitmovement 0 + delay 30 + hideobject LAST_TALKED, 13, 10 + delay 60 + addobject 4 + delay 30 + applymovement 4, LilycoveCity_Harbor_Movement_1A0839 + waitmovement 0 msgbox LilycoveCity_Harbor_Text_1C5120, 4 - closebutton - move 4, LilycoveCity_Harbor_Movement_1A0841 - waitmove 0 - pause 30 - disappear 4 + closemessage + applymovement 4, LilycoveCity_Harbor_Movement_1A0841 + waitmovement 0 + delay 30 + removeobject 4 compare FACING, 2 - callif 1, LilycoveCity_Harbor_EventScript_1599D9 + call_if 1, LilycoveCity_Harbor_EventScript_1599D9 compare FACING, 4 - callif 1, LilycoveCity_Harbor_EventScript_1599CE - pause 30 - spriteinvisible 255, 0, 0 + call_if 1, LilycoveCity_Harbor_EventScript_1599CE + delay 30 + hideobject 255, 0, 0 special ScrSpecial_HealPlayerParty setvar 0x8004, 2 call LilycoveCity_Harbor_EventScript_1A040E @@ -160,7 +160,7 @@ LilycoveCity_Harbor_EventScript_159A8D:: @ 8159A8D lock faceplayer checkflag 2052 - jumpeq LilycoveCity_Harbor_EventScript_159AA2 + goto_if_eq LilycoveCity_Harbor_EventScript_159AA2 msgbox LilycoveCity_Harbor_Text_18B504, 4 release end diff --git a/data/scripts/maps/LilycoveCity_House1.inc b/data/scripts/maps/LilycoveCity_House1.inc index 3dae362c1..4defe37b8 100644 --- a/data/scripts/maps/LilycoveCity_House1.inc +++ b/data/scripts/maps/LilycoveCity_House1.inc @@ -8,8 +8,8 @@ LilycoveCity_House1_EventScript_159B86:: @ 8159B86 LilycoveCity_House1_EventScript_159B8F:: @ 8159B8F lock faceplayer - checksound - pokecry SPECIES_KECLEON, 0 + waitse + playpokecry SPECIES_KECLEON, 0 msgbox LilycoveCity_House1_Text_18B82B, 4 waitpokecry release diff --git a/data/scripts/maps/LilycoveCity_House2.inc b/data/scripts/maps/LilycoveCity_House2.inc index 75780667d..d3399f5ac 100644 --- a/data/scripts/maps/LilycoveCity_House2.inc +++ b/data/scripts/maps/LilycoveCity_House2.inc @@ -5,11 +5,11 @@ LilycoveCity_House2_EventScript_159BA3:: @ 8159BA3 lock faceplayer checkflag 234 - jumpeq LilycoveCity_House2_EventScript_159BDA + goto_if_eq LilycoveCity_House2_EventScript_159BDA msgbox LilycoveCity_House2_Text_18B83C, 4 giveitem ITEM_TM44 compare RESULT, 0 - jumpeq LilycoveCity_House2_EventScript_1A029B + goto_if_eq LilycoveCity_House2_EventScript_1A029B setflag 234 msgbox LilycoveCity_House2_Text_18B883, 4 release diff --git a/data/scripts/maps/LilycoveCity_House3.inc b/data/scripts/maps/LilycoveCity_House3.inc index 51e4988b3..f700eed9d 100644 --- a/data/scripts/maps/LilycoveCity_House3.inc +++ b/data/scripts/maps/LilycoveCity_House3.inc @@ -12,19 +12,19 @@ LilycoveCity_House3_EventScript_159BF3:: @ 8159BF3 faceplayer msgbox LilycoveCity_House3_Text_18B8CC, 5 compare RESULT, 0 - jumpeq LilycoveCity_House3_EventScript_159C1D + goto_if_eq LilycoveCity_House3_EventScript_159C1D msgbox LilycoveCity_House3_Text_18BA2B, 4 - closebutton - move LAST_TALKED, LilycoveCity_House3_Movement_1A083D - waitmove 0 + closemessage + applymovement LAST_TALKED, LilycoveCity_House3_Movement_1A083D + waitmovement 0 release end LilycoveCity_House3_EventScript_159C1D:: @ 8159C1D msgbox LilycoveCity_House3_Text_18B9DC, 4 - closebutton - move LAST_TALKED, LilycoveCity_House3_Movement_1A083D - waitmove 0 + closemessage + applymovement LAST_TALKED, LilycoveCity_House3_Movement_1A083D + waitmovement 0 release end @@ -32,9 +32,9 @@ LilycoveCity_House3_EventScript_159C32:: @ 8159C32 lock faceplayer msgbox LilycoveCity_House3_Text_18BD64, 4 - closebutton - move LAST_TALKED, LilycoveCity_House3_Movement_1A083D - waitmove 0 + closemessage + applymovement LAST_TALKED, LilycoveCity_House3_Movement_1A083D + waitmovement 0 release end diff --git a/data/scripts/maps/LilycoveCity_LilycoveMuseum_1F.inc b/data/scripts/maps/LilycoveCity_LilycoveMuseum_1F.inc index a481f9c32..06e82d5f8 100644 --- a/data/scripts/maps/LilycoveCity_LilycoveMuseum_1F.inc +++ b/data/scripts/maps/LilycoveCity_LilycoveMuseum_1F.inc @@ -7,14 +7,14 @@ LilycoveCity_LilycoveMuseum_1F_EventScript_15841C:: @ 815841C LilycoveCity_LilycoveMuseum_1F_EventScript_158425:: @ 8158425 lockall - move 2, LilycoveCity_LilycoveMuseum_1F_Movement_1A0839 + applymovement 2, LilycoveCity_LilycoveMuseum_1F_Movement_1A0839 message LilycoveCity_LilycoveMuseum_1F_Text_1873B9 - waittext + waitmessage multichoice 20, 8, 16, 1 compare RESULT, 0 - jumpeq LilycoveCity_LilycoveMuseum_1F_EventScript_158458 + goto_if_eq LilycoveCity_LilycoveMuseum_1F_EventScript_158458 compare RESULT, 1 - jumpeq LilycoveCity_LilycoveMuseum_1F_EventScript_15844F + goto_if_eq LilycoveCity_LilycoveMuseum_1F_EventScript_15844F end LilycoveCity_LilycoveMuseum_1F_EventScript_15844F:: @ 815844F @@ -24,9 +24,9 @@ LilycoveCity_LilycoveMuseum_1F_EventScript_15844F:: @ 815844F LilycoveCity_LilycoveMuseum_1F_EventScript_158458:: @ 8158458 msgbox LilycoveCity_LilycoveMuseum_1F_Text_187495, 5 compare RESULT, 0 - jumpeq LilycoveCity_LilycoveMuseum_1F_EventScript_158477 + goto_if_eq LilycoveCity_LilycoveMuseum_1F_EventScript_158477 compare RESULT, 1 - jumpeq LilycoveCity_LilycoveMuseum_1F_EventScript_158481 + goto_if_eq LilycoveCity_LilycoveMuseum_1F_EventScript_158481 end LilycoveCity_LilycoveMuseum_1F_EventScript_158477:: @ 8158477 @@ -36,9 +36,9 @@ LilycoveCity_LilycoveMuseum_1F_EventScript_158477:: @ 8158477 LilycoveCity_LilycoveMuseum_1F_EventScript_158481:: @ 8158481 msgbox LilycoveCity_LilycoveMuseum_1F_Text_187534, 3 - move 2, LilycoveCity_LilycoveMuseum_1F_Movement_1584FC - waitmove 0 - disappear 2 + applymovement 2, LilycoveCity_LilycoveMuseum_1F_Movement_1584FC + waitmovement 0 + removeobject 2 switch FACING case 2, LilycoveCity_LilycoveMuseum_1F_EventScript_1584BD case 3, LilycoveCity_LilycoveMuseum_1F_EventScript_1584D2 @@ -47,24 +47,24 @@ LilycoveCity_LilycoveMuseum_1F_EventScript_158481:: @ 8158481 LilycoveCity_LilycoveMuseum_1F_EventScript_1584BD:: @ 81584BD lockall - move 255, LilycoveCity_LilycoveMuseum_1F_Movement_158504 - waitmove 0 + applymovement 255, LilycoveCity_LilycoveMuseum_1F_Movement_158504 + waitmovement 0 warp LilycoveCity_LilycoveMuseum_2F, 255, 11, 8 waitstate end LilycoveCity_LilycoveMuseum_1F_EventScript_1584D2:: @ 81584D2 lockall - move 255, LilycoveCity_LilycoveMuseum_1F_Movement_1584FE - waitmove 0 + applymovement 255, LilycoveCity_LilycoveMuseum_1F_Movement_1584FE + waitmovement 0 warp LilycoveCity_LilycoveMuseum_2F, 255, 11, 8 waitstate end LilycoveCity_LilycoveMuseum_1F_EventScript_1584E7:: @ 81584E7 lockall - move 255, LilycoveCity_LilycoveMuseum_1F_Movement_158501 - waitmove 0 + applymovement 255, LilycoveCity_LilycoveMuseum_1F_Movement_158501 + waitmovement 0 warp LilycoveCity_LilycoveMuseum_2F, 255, 11, 8 waitstate end @@ -152,8 +152,8 @@ LilycoveCity_LilycoveMuseum_1F_EventScript_158585:: @ 8158585 LilycoveCity_LilycoveMuseum_1F_EventScript_15858E:: @ 815858E msgbox LilycoveCity_LilycoveMuseum_1F_Text_187B04, 2 lockall - move 8, LilycoveCity_LilycoveMuseum_1F_Movement_1A083D - waitmove 0 + applymovement 8, LilycoveCity_LilycoveMuseum_1F_Movement_1A083D + waitmovement 0 releaseall end diff --git a/data/scripts/maps/LilycoveCity_LilycoveMuseum_2F.inc b/data/scripts/maps/LilycoveCity_LilycoveMuseum_2F.inc index b3564ebf5..a4599f14a 100644 --- a/data/scripts/maps/LilycoveCity_LilycoveMuseum_2F.inc +++ b/data/scripts/maps/LilycoveCity_LilycoveMuseum_2F.inc @@ -5,55 +5,55 @@ LilycoveCity_LilycoveMuseum_2F_MapScripts:: @ 81585AC LilycoveCity_LilycoveMuseum_2F_MapScript1_1585B7:: @ 81585B7 checkflag 160 - jumpeq LilycoveCity_LilycoveMuseum_2F_EventScript_1585FD - jump LilycoveCity_LilycoveMuseum_2F_EventScript_1585C6 + goto_if_eq LilycoveCity_LilycoveMuseum_2F_EventScript_1585FD + goto LilycoveCity_LilycoveMuseum_2F_EventScript_1585C6 end LilycoveCity_LilycoveMuseum_2F_EventScript_1585C6:: @ 81585C6 checkflag 161 - jumpeq LilycoveCity_LilycoveMuseum_2F_EventScript_158615 - jump LilycoveCity_LilycoveMuseum_2F_EventScript_1585D5 + goto_if_eq LilycoveCity_LilycoveMuseum_2F_EventScript_158615 + goto LilycoveCity_LilycoveMuseum_2F_EventScript_1585D5 end LilycoveCity_LilycoveMuseum_2F_EventScript_1585D5:: @ 81585D5 checkflag 162 - jumpeq LilycoveCity_LilycoveMuseum_2F_EventScript_15862D - jump LilycoveCity_LilycoveMuseum_2F_EventScript_1585E4 + goto_if_eq LilycoveCity_LilycoveMuseum_2F_EventScript_15862D + goto LilycoveCity_LilycoveMuseum_2F_EventScript_1585E4 end LilycoveCity_LilycoveMuseum_2F_EventScript_1585E4:: @ 81585E4 checkflag 163 - jumpeq LilycoveCity_LilycoveMuseum_2F_EventScript_158645 - jump LilycoveCity_LilycoveMuseum_2F_EventScript_1585F3 + goto_if_eq LilycoveCity_LilycoveMuseum_2F_EventScript_158645 + goto LilycoveCity_LilycoveMuseum_2F_EventScript_1585F3 end LilycoveCity_LilycoveMuseum_2F_EventScript_1585F3:: @ 81585F3 checkflag 164 - jumpeq LilycoveCity_LilycoveMuseum_2F_EventScript_15865D + goto_if_eq LilycoveCity_LilycoveMuseum_2F_EventScript_15865D end LilycoveCity_LilycoveMuseum_2F_EventScript_1585FD:: @ 81585FD setmaptile 10, 6, 606, 1 setmaptile 11, 6, 607, 1 - jump LilycoveCity_LilycoveMuseum_2F_EventScript_1585C6 + goto LilycoveCity_LilycoveMuseum_2F_EventScript_1585C6 end LilycoveCity_LilycoveMuseum_2F_EventScript_158615:: @ 8158615 setmaptile 18, 6, 604, 1 setmaptile 19, 6, 605, 1 - jump LilycoveCity_LilycoveMuseum_2F_EventScript_1585D5 + goto LilycoveCity_LilycoveMuseum_2F_EventScript_1585D5 end LilycoveCity_LilycoveMuseum_2F_EventScript_15862D:: @ 815862D setmaptile 14, 10, 608, 1 setmaptile 15, 10, 609, 1 - jump LilycoveCity_LilycoveMuseum_2F_EventScript_1585E4 + goto LilycoveCity_LilycoveMuseum_2F_EventScript_1585E4 end LilycoveCity_LilycoveMuseum_2F_EventScript_158645:: @ 8158645 setmaptile 6, 10, 602, 1 setmaptile 7, 10, 603, 1 - jump LilycoveCity_LilycoveMuseum_2F_EventScript_1585F3 + goto LilycoveCity_LilycoveMuseum_2F_EventScript_1585F3 end LilycoveCity_LilycoveMuseum_2F_EventScript_15865D:: @ 815865D @@ -67,19 +67,19 @@ LilycoveCity_LilycoveMuseum_2F_MapScript2_158670:: @ 8158670 LilycoveCity_LilycoveMuseum_2F_EventScript_15867A:: @ 815867A lockall - move 1, LilycoveCity_LilycoveMuseum_2F_Movement_1A0839 - move 255, LilycoveCity_LilycoveMuseum_2F_Movement_1586D3 - waitmove 0 + applymovement 1, LilycoveCity_LilycoveMuseum_2F_Movement_1A0839 + applymovement 255, LilycoveCity_LilycoveMuseum_2F_Movement_1586D3 + waitmovement 0 msgbox LilycoveCity_LilycoveMuseum_2F_Text_187C42, 3 - move 1, LilycoveCity_LilycoveMuseum_2F_Movement_1586D5 - waitmove 0 - move 255, LilycoveCity_LilycoveMuseum_2F_Movement_1586D5 - waitmove 0 + applymovement 1, LilycoveCity_LilycoveMuseum_2F_Movement_1586D5 + waitmovement 0 + applymovement 255, LilycoveCity_LilycoveMuseum_2F_Movement_1586D5 + waitmovement 0 msgbox LilycoveCity_LilycoveMuseum_2F_Text_187C64, 3 - move 1, LilycoveCity_LilycoveMuseum_2F_Movement_1A0839 - waitmove 0 - move 255, LilycoveCity_LilycoveMuseum_2F_Movement_1586D3 - waitmove 0 + applymovement 1, LilycoveCity_LilycoveMuseum_2F_Movement_1A0839 + waitmovement 0 + applymovement 255, LilycoveCity_LilycoveMuseum_2F_Movement_1586D3 + waitmovement 0 msgbox LilycoveCity_LilycoveMuseum_2F_Text_187E1D, 3 copyvar 0x4094, 0x1 releaseall @@ -97,8 +97,8 @@ LilycoveCity_LilycoveMuseum_2F_Movement_1586D5:: @ 81586D5 LilycoveCity_LilycoveMuseum_2F_EventScript_1586D8:: @ 81586D8 lockall checkflag 236 - jumpeq LilycoveCity_LilycoveMuseum_2F_EventScript_158793 - specialval 0x8004, sub_80C4D50 + goto_if_eq LilycoveCity_LilycoveMuseum_2F_EventScript_158793 + specialvar 0x8004, sub_80C4D50 switch 0x8004 case 1, LilycoveCity_LilycoveMuseum_2F_EventScript_15872C case 2, LilycoveCity_LilycoveMuseum_2F_EventScript_15872C @@ -113,29 +113,29 @@ LilycoveCity_LilycoveMuseum_2F_EventScript_15872C:: @ 815872C end LilycoveCity_LilycoveMuseum_2F_EventScript_158735:: @ 8158735 - move 1, LilycoveCity_LilycoveMuseum_2F_Movement_1A0839 - waitmove 0 + applymovement 1, LilycoveCity_LilycoveMuseum_2F_Movement_1A0839 + waitmovement 0 msgbox LilycoveCity_LilycoveMuseum_2F_Text_18802F, 4 - move 1, LilycoveCity_LilycoveMuseum_2F_Movement_1586D5 + applymovement 1, LilycoveCity_LilycoveMuseum_2F_Movement_1586D5 msgbox LilycoveCity_LilycoveMuseum_2F_Text_188041, 4 - jump LilycoveCity_LilycoveMuseum_2F_EventScript_15875C + goto LilycoveCity_LilycoveMuseum_2F_EventScript_15875C end LilycoveCity_LilycoveMuseum_2F_EventScript_15875C:: @ 815875C - move 1, LilycoveCity_LilycoveMuseum_2F_Movement_1A0839 + applymovement 1, LilycoveCity_LilycoveMuseum_2F_Movement_1A0839 msgbox LilycoveCity_LilycoveMuseum_2F_Text_188120, 4 givedecoration 44 compare RESULT, 0 - jumpeq LilycoveCity_LilycoveMuseum_2F_EventScript_158783 + goto_if_eq LilycoveCity_LilycoveMuseum_2F_EventScript_158783 setflag 236 - closebutton + closemessage releaseall end LilycoveCity_LilycoveMuseum_2F_EventScript_158783:: @ 8158783 call LilycoveCity_LilycoveMuseum_2F_EventScript_1A02B8 msgbox LilycoveCity_LilycoveMuseum_2F_Text_188166, 4 - closebutton + closemessage releaseall end @@ -147,35 +147,35 @@ LilycoveCity_LilycoveMuseum_2F_EventScript_158793:: @ 8158793 LilycoveCity_LilycoveMuseum_2F_EventScript_15879D:: @ 815879D lockall checkflag 162 - jumpeq LilycoveCity_LilycoveMuseum_2F_EventScript_15883C + goto_if_eq LilycoveCity_LilycoveMuseum_2F_EventScript_15883C msgbox LilycoveCity_LilycoveMuseum_2F_Text_188219, 3 end LilycoveCity_LilycoveMuseum_2F_EventScript_1587B0:: @ 81587B0 lockall checkflag 164 - jumpeq LilycoveCity_LilycoveMuseum_2F_EventScript_158858 + goto_if_eq LilycoveCity_LilycoveMuseum_2F_EventScript_158858 msgbox LilycoveCity_LilycoveMuseum_2F_Text_18824C, 3 end LilycoveCity_LilycoveMuseum_2F_EventScript_1587C3:: @ 81587C3 lockall checkflag 160 - jumpeq LilycoveCity_LilycoveMuseum_2F_EventScript_158820 + goto_if_eq LilycoveCity_LilycoveMuseum_2F_EventScript_158820 msgbox LilycoveCity_LilycoveMuseum_2F_Text_1882B4, 3 end LilycoveCity_LilycoveMuseum_2F_EventScript_1587D6:: @ 81587D6 lockall checkflag 161 - jumpeq LilycoveCity_LilycoveMuseum_2F_EventScript_15882E + goto_if_eq LilycoveCity_LilycoveMuseum_2F_EventScript_15882E msgbox LilycoveCity_LilycoveMuseum_2F_Text_188281, 3 end LilycoveCity_LilycoveMuseum_2F_EventScript_1587E9:: @ 81587E9 lockall checkflag 163 - jumpeq LilycoveCity_LilycoveMuseum_2F_EventScript_15884A + goto_if_eq LilycoveCity_LilycoveMuseum_2F_EventScript_15884A msgbox LilycoveCity_LilycoveMuseum_2F_Text_1882E6, 3 end @@ -198,34 +198,34 @@ LilycoveCity_LilycoveMuseum_2F_EventScript_158817:: @ 8158817 LilycoveCity_LilycoveMuseum_2F_EventScript_158820:: @ 8158820 msgbox LilycoveCity_LilycoveMuseum_2F_Text_18831A, 3 fadescreen 1 - showcontestwinner 9 + drawcontestwinner 9 releaseall end LilycoveCity_LilycoveMuseum_2F_EventScript_15882E:: @ 815882E msgbox LilycoveCity_LilycoveMuseum_2F_Text_18831A, 3 fadescreen 1 - showcontestwinner 10 + drawcontestwinner 10 releaseall end LilycoveCity_LilycoveMuseum_2F_EventScript_15883C:: @ 815883C msgbox LilycoveCity_LilycoveMuseum_2F_Text_18831A, 3 fadescreen 1 - showcontestwinner 11 + drawcontestwinner 11 releaseall end LilycoveCity_LilycoveMuseum_2F_EventScript_15884A:: @ 815884A msgbox LilycoveCity_LilycoveMuseum_2F_Text_18831A, 3 fadescreen 1 - showcontestwinner 12 + drawcontestwinner 12 releaseall end LilycoveCity_LilycoveMuseum_2F_EventScript_158858:: @ 8158858 msgbox LilycoveCity_LilycoveMuseum_2F_Text_18831A, 3 fadescreen 1 - showcontestwinner 13 + drawcontestwinner 13 releaseall end diff --git a/data/scripts/maps/LilycoveCity_MoveDeletersHouse.inc b/data/scripts/maps/LilycoveCity_MoveDeletersHouse.inc index 2786c930c..02558e9d3 100644 --- a/data/scripts/maps/LilycoveCity_MoveDeletersHouse.inc +++ b/data/scripts/maps/LilycoveCity_MoveDeletersHouse.inc @@ -3,8 +3,8 @@ LilycoveCity_MoveDeletersHouse_MapScripts:: @ 8159AAD LilycoveCity_MoveDeletersHouse_EventScript_159AAE:: @ 8159AAE lockall - move 1, LilycoveCity_MoveDeletersHouse_Movement_1A0839 - waitmove 0 + applymovement 1, LilycoveCity_MoveDeletersHouse_Movement_1A0839 + waitmovement 0 msgbox LilycoveCity_MoveDeletersHouse_Text_18B622, 5 switch RESULT case 1, LilycoveCity_MoveDeletersHouse_EventScript_159ADE @@ -17,19 +17,19 @@ LilycoveCity_MoveDeletersHouse_EventScript_159ADE:: @ 8159ADE special sub_80F9A0C waitstate compare 0x8004, 255 - jumpeq LilycoveCity_MoveDeletersHouse_EventScript_159B7B + goto_if_eq LilycoveCity_MoveDeletersHouse_EventScript_159B7B special sub_80FA148 compare RESULT, 1 - jumpeq LilycoveCity_MoveDeletersHouse_EventScript_159B71 + goto_if_eq LilycoveCity_MoveDeletersHouse_EventScript_159B71 special ScrSpecial_CountPokemonMoves compare RESULT, 1 - jumpeq LilycoveCity_MoveDeletersHouse_EventScript_159B64 + goto_if_eq LilycoveCity_MoveDeletersHouse_EventScript_159B64 msgbox LilycoveCity_MoveDeletersHouse_Text_18B6B0, 4 fadescreen 1 special sub_80F9EEC fadescreen 0 compare 0x8005, 4 - jumpeq LilycoveCity_MoveDeletersHouse_EventScript_159ADE + goto_if_eq LilycoveCity_MoveDeletersHouse_EventScript_159ADE special ScrSpecial_GetPokemonNicknameAndMoveName msgbox LilycoveCity_MoveDeletersHouse_Text_18B6F2, 5 switch RESULT @@ -40,7 +40,7 @@ LilycoveCity_MoveDeletersHouse_EventScript_159ADE:: @ 8159ADE LilycoveCity_MoveDeletersHouse_EventScript_159B53:: @ 8159B53 special sub_80FA0DC - fanfare 378 + playfanfare 378 waitfanfare msgbox LilycoveCity_MoveDeletersHouse_Text_18B71E, 4 releaseall diff --git a/data/scripts/maps/LilycoveCity_PokemonCenter_1F.inc b/data/scripts/maps/LilycoveCity_PokemonCenter_1F.inc index 5809e28c8..20b5c5f13 100644 --- a/data/scripts/maps/LilycoveCity_PokemonCenter_1F.inc +++ b/data/scripts/maps/LilycoveCity_PokemonCenter_1F.inc @@ -9,7 +9,7 @@ LilycoveCity_PokemonCenter_1F_MapScript1_15932D:: @ 815932D LilycoveCity_PokemonCenter_1F_EventScript_159331:: @ 8159331 setvar 0x800b, 1 call LilycoveCity_PokemonCenter_1F_EventScript_19FD5B - waittext + waitmessage waitbutton release end @@ -22,7 +22,7 @@ LilycoveCity_PokemonCenter_1F_EventScript_159348:: @ 8159348 lock faceplayer checkflag 2061 - jumpeq LilycoveCity_PokemonCenter_1F_EventScript_15935D + goto_if_eq LilycoveCity_PokemonCenter_1F_EventScript_15935D msgbox LilycoveCity_PokemonCenter_1F_Text_18A048, 4 release end diff --git a/data/scripts/maps/LilycoveCity_PokemonTrainerFanClub.inc b/data/scripts/maps/LilycoveCity_PokemonTrainerFanClub.inc index e503ef4ec..13217b340 100644 --- a/data/scripts/maps/LilycoveCity_PokemonTrainerFanClub.inc +++ b/data/scripts/maps/LilycoveCity_PokemonTrainerFanClub.inc @@ -9,21 +9,21 @@ LilycoveCity_PokemonTrainerFanClub_MapScript2_159395:: @ 8159395 LilycoveCity_PokemonTrainerFanClub_EventScript_15939F:: @ 815939F lockall - move 1, LilycoveCity_PokemonTrainerFanClub_Movement_1A0845 - waitmove 0 + applymovement 1, LilycoveCity_PokemonTrainerFanClub_Movement_1A0845 + waitmovement 0 msgbox LilycoveCity_PokemonTrainerFanClub_Text_18A1D6, 4 - move 4, LilycoveCity_PokemonTrainerFanClub_Movement_159402 - move 2, LilycoveCity_PokemonTrainerFanClub_Movement_1593FA - waitmove 0 - move 255, LilycoveCity_PokemonTrainerFanClub_Movement_1A0843 - waitmove 0 + applymovement 4, LilycoveCity_PokemonTrainerFanClub_Movement_159402 + applymovement 2, LilycoveCity_PokemonTrainerFanClub_Movement_1593FA + waitmovement 0 + applymovement 255, LilycoveCity_PokemonTrainerFanClub_Movement_1A0843 + waitmovement 0 msgbox LilycoveCity_PokemonTrainerFanClub_Text_18A1E8, 4 - move 4, LilycoveCity_PokemonTrainerFanClub_Movement_159409 - waitmove 0 - move 255, LilycoveCity_PokemonTrainerFanClub_Movement_1A083F - waitmove 0 - move 4, LilycoveCity_PokemonTrainerFanClub_Movement_15940C - waitmove 0 + applymovement 4, LilycoveCity_PokemonTrainerFanClub_Movement_159409 + waitmovement 0 + applymovement 255, LilycoveCity_PokemonTrainerFanClub_Movement_1A083F + waitmovement 0 + applymovement 4, LilycoveCity_PokemonTrainerFanClub_Movement_15940C + waitmovement 0 setvar 0x4095, 2 releaseall end @@ -62,77 +62,77 @@ LilycoveCity_PokemonTrainerFanClub_Movement_15940C:: @ 815940C LilycoveCity_PokemonTrainerFanClub_MapScript1_159412:: @ 8159412 compare 0x4095, 1 - jumpeq LilycoveCity_PokemonTrainerFanClub_EventScript_159515 + goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_159515 compare 0x4095, 2 - jumpeq LilycoveCity_PokemonTrainerFanClub_EventScript_159429 + goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_159429 end LilycoveCity_PokemonTrainerFanClub_EventScript_159429:: @ 8159429 special sub_810FCE8 setvar 0x8004, 8 - specialval RESULT, sub_810FD60 + specialvar RESULT, sub_810FD60 compare RESULT, 0 - callif 1, LilycoveCity_PokemonTrainerFanClub_EventScript_1594D5 + call_if 1, LilycoveCity_PokemonTrainerFanClub_EventScript_1594D5 setvar 0x8004, 9 - specialval RESULT, sub_810FD60 + specialvar RESULT, sub_810FD60 compare RESULT, 0 - callif 1, LilycoveCity_PokemonTrainerFanClub_EventScript_1594DD + call_if 1, LilycoveCity_PokemonTrainerFanClub_EventScript_1594DD setvar 0x8004, 10 - specialval RESULT, sub_810FD60 + specialvar RESULT, sub_810FD60 compare RESULT, 0 - callif 1, LilycoveCity_PokemonTrainerFanClub_EventScript_1594E5 + call_if 1, LilycoveCity_PokemonTrainerFanClub_EventScript_1594E5 setvar 0x8004, 11 - specialval RESULT, sub_810FD60 + specialvar RESULT, sub_810FD60 compare RESULT, 0 - callif 1, LilycoveCity_PokemonTrainerFanClub_EventScript_1594ED + call_if 1, LilycoveCity_PokemonTrainerFanClub_EventScript_1594ED setvar 0x8004, 12 - specialval RESULT, sub_810FD60 + specialvar RESULT, sub_810FD60 compare RESULT, 0 - callif 1, LilycoveCity_PokemonTrainerFanClub_EventScript_1594F5 + call_if 1, LilycoveCity_PokemonTrainerFanClub_EventScript_1594F5 setvar 0x8004, 13 - specialval RESULT, sub_810FD60 + specialvar RESULT, sub_810FD60 compare RESULT, 0 - callif 1, LilycoveCity_PokemonTrainerFanClub_EventScript_1594FD + call_if 1, LilycoveCity_PokemonTrainerFanClub_EventScript_1594FD setvar 0x8004, 14 - specialval RESULT, sub_810FD60 + specialvar RESULT, sub_810FD60 compare RESULT, 0 - callif 1, LilycoveCity_PokemonTrainerFanClub_EventScript_159505 + call_if 1, LilycoveCity_PokemonTrainerFanClub_EventScript_159505 setvar 0x8004, 15 - specialval RESULT, sub_810FD60 + specialvar RESULT, sub_810FD60 compare RESULT, 0 - callif 1, LilycoveCity_PokemonTrainerFanClub_EventScript_15950D + call_if 1, LilycoveCity_PokemonTrainerFanClub_EventScript_15950D end LilycoveCity_PokemonTrainerFanClub_EventScript_1594D5:: @ 81594D5 - movespriteperm 1, 7, 5 + setobjectxyperm 1, 7, 5 return LilycoveCity_PokemonTrainerFanClub_EventScript_1594DD:: @ 81594DD - movespriteperm 3, 3, 4 + setobjectxyperm 3, 3, 4 return LilycoveCity_PokemonTrainerFanClub_EventScript_1594E5:: @ 81594E5 - movespriteperm 4, 7, 2 + setobjectxyperm 4, 7, 2 return LilycoveCity_PokemonTrainerFanClub_EventScript_1594ED:: @ 81594ED - movespriteperm 5, 5, 5 + setobjectxyperm 5, 5, 5 return LilycoveCity_PokemonTrainerFanClub_EventScript_1594F5:: @ 81594F5 - movespriteperm 6, 5, 2 + setobjectxyperm 6, 5, 2 return LilycoveCity_PokemonTrainerFanClub_EventScript_1594FD:: @ 81594FD - movespriteperm 2, 8, 4 + setobjectxyperm 2, 8, 4 return LilycoveCity_PokemonTrainerFanClub_EventScript_159505:: @ 8159505 - movespriteperm 7, 3, 3 + setobjectxyperm 7, 3, 3 return LilycoveCity_PokemonTrainerFanClub_EventScript_15950D:: @ 815950D - movespriteperm 8, 8, 3 + setobjectxyperm 8, 8, 3 return LilycoveCity_PokemonTrainerFanClub_EventScript_159515:: @ 8159515 @@ -149,21 +149,21 @@ LilycoveCity_PokemonTrainerFanClub_EventScript_15952F:: @ 815952F setvar 0x8004, 13 special sub_810FDAC compare 0x4095, 0 - jumpeq LilycoveCity_PokemonTrainerFanClub_EventScript_15959C - specialval RESULT, sub_810FD60 + goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_15959C + specialvar RESULT, sub_810FD60 compare RESULT, 1 - jumpeq LilycoveCity_PokemonTrainerFanClub_EventScript_15956E - specialval RESULT, sub_810FCB0 + goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_15956E + specialvar RESULT, sub_810FCB0 compare RESULT, 7 - jumpeq LilycoveCity_PokemonTrainerFanClub_EventScript_159592 + goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_159592 msgbox LilycoveCity_PokemonTrainerFanClub_Text_18A400, 4 release end LilycoveCity_PokemonTrainerFanClub_EventScript_15956E:: @ 815956E - specialval RESULT, sub_810FCB0 + specialvar RESULT, sub_810FCB0 compare RESULT, 1 - jumpeq LilycoveCity_PokemonTrainerFanClub_EventScript_159588 + goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_159588 msgbox LilycoveCity_PokemonTrainerFanClub_Text_18A36A, 4 release end @@ -189,21 +189,21 @@ LilycoveCity_PokemonTrainerFanClub_EventScript_1595A6:: @ 81595A6 setvar 0x8004, 8 special sub_810FDAC compare 0x4095, 0 - jumpeq LilycoveCity_PokemonTrainerFanClub_EventScript_159613 - specialval RESULT, sub_810FD60 + goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_159613 + specialvar RESULT, sub_810FD60 compare RESULT, 1 - jumpeq LilycoveCity_PokemonTrainerFanClub_EventScript_1595E5 - specialval RESULT, sub_810FCB0 + goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_1595E5 + specialvar RESULT, sub_810FCB0 compare RESULT, 7 - jumpeq LilycoveCity_PokemonTrainerFanClub_EventScript_159609 + goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_159609 msgbox LilycoveCity_PokemonTrainerFanClub_Text_18A629, 4 release end LilycoveCity_PokemonTrainerFanClub_EventScript_1595E5:: @ 81595E5 - specialval RESULT, sub_810FCB0 + specialvar RESULT, sub_810FCB0 compare RESULT, 1 - jumpeq LilycoveCity_PokemonTrainerFanClub_EventScript_1595FF + goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_1595FF msgbox LilycoveCity_PokemonTrainerFanClub_Text_18A584, 4 release end @@ -229,21 +229,21 @@ LilycoveCity_PokemonTrainerFanClub_EventScript_15961D:: @ 815961D setvar 0x8004, 9 special sub_810FDAC compare 0x4095, 0 - jumpeq LilycoveCity_PokemonTrainerFanClub_EventScript_15968A - specialval RESULT, sub_810FD60 + goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_15968A + specialvar RESULT, sub_810FD60 compare RESULT, 1 - jumpeq LilycoveCity_PokemonTrainerFanClub_EventScript_15965C - specialval RESULT, sub_810FCB0 + goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_15965C + specialvar RESULT, sub_810FCB0 compare RESULT, 7 - jumpeq LilycoveCity_PokemonTrainerFanClub_EventScript_159680 + goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_159680 msgbox LilycoveCity_PokemonTrainerFanClub_Text_18A814, 4 release end LilycoveCity_PokemonTrainerFanClub_EventScript_15965C:: @ 815965C - specialval RESULT, sub_810FCB0 + specialvar RESULT, sub_810FCB0 compare RESULT, 1 - jumpeq LilycoveCity_PokemonTrainerFanClub_EventScript_159676 + goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_159676 msgbox LilycoveCity_PokemonTrainerFanClub_Text_18A71E, 4 release end @@ -269,21 +269,21 @@ LilycoveCity_PokemonTrainerFanClub_EventScript_159694:: @ 8159694 setvar 0x8004, 10 special sub_810FDAC compare 0x4095, 0 - jumpeq LilycoveCity_PokemonTrainerFanClub_EventScript_159701 - specialval RESULT, sub_810FD60 + goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_159701 + specialvar RESULT, sub_810FD60 compare RESULT, 1 - jumpeq LilycoveCity_PokemonTrainerFanClub_EventScript_1596D3 - specialval RESULT, sub_810FCB0 + goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_1596D3 + specialvar RESULT, sub_810FCB0 compare RESULT, 7 - jumpeq LilycoveCity_PokemonTrainerFanClub_EventScript_1596F7 + goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_1596F7 msgbox LilycoveCity_PokemonTrainerFanClub_Text_18AB0A, 4 release end LilycoveCity_PokemonTrainerFanClub_EventScript_1596D3:: @ 81596D3 - specialval RESULT, sub_810FCB0 + specialvar RESULT, sub_810FCB0 compare RESULT, 1 - jumpeq LilycoveCity_PokemonTrainerFanClub_EventScript_1596ED + goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_1596ED msgbox LilycoveCity_PokemonTrainerFanClub_Text_18AA39, 4 release end @@ -308,20 +308,20 @@ LilycoveCity_PokemonTrainerFanClub_EventScript_15970B:: @ 815970B faceplayer setvar 0x8004, 11 special sub_810FDAC - specialval RESULT, sub_810FD60 + specialvar RESULT, sub_810FD60 compare RESULT, 1 - jumpeq LilycoveCity_PokemonTrainerFanClub_EventScript_15973F - specialval RESULT, sub_810FCB0 + goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_15973F + specialvar RESULT, sub_810FCB0 compare RESULT, 7 - jumpeq LilycoveCity_PokemonTrainerFanClub_EventScript_159763 + goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_159763 msgbox LilycoveCity_PokemonTrainerFanClub_Text_18ACC7, 4 release end LilycoveCity_PokemonTrainerFanClub_EventScript_15973F:: @ 815973F - specialval RESULT, sub_810FCB0 + specialvar RESULT, sub_810FCB0 compare RESULT, 1 - jumpeq LilycoveCity_PokemonTrainerFanClub_EventScript_159759 + goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_159759 msgbox LilycoveCity_PokemonTrainerFanClub_Text_18AC15, 4 release end @@ -341,20 +341,20 @@ LilycoveCity_PokemonTrainerFanClub_EventScript_15976D:: @ 815976D faceplayer setvar 0x8004, 12 special sub_810FDAC - specialval RESULT, sub_810FD60 + specialvar RESULT, sub_810FD60 compare RESULT, 1 - jumpeq LilycoveCity_PokemonTrainerFanClub_EventScript_1597A1 - specialval RESULT, sub_810FCB0 + goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_1597A1 + specialvar RESULT, sub_810FCB0 compare RESULT, 7 - jumpeq LilycoveCity_PokemonTrainerFanClub_EventScript_1597C5 + goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_1597C5 msgbox LilycoveCity_PokemonTrainerFanClub_Text_18AE63, 4 release end LilycoveCity_PokemonTrainerFanClub_EventScript_1597A1:: @ 81597A1 - specialval RESULT, sub_810FCB0 + specialvar RESULT, sub_810FCB0 compare RESULT, 1 - jumpeq LilycoveCity_PokemonTrainerFanClub_EventScript_1597BB + goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_1597BB msgbox LilycoveCity_PokemonTrainerFanClub_Text_18AD6D, 4 release end @@ -374,20 +374,20 @@ LilycoveCity_PokemonTrainerFanClub_EventScript_1597CF:: @ 81597CF faceplayer setvar 0x8004, 14 special sub_810FDAC - specialval RESULT, sub_810FD60 + specialvar RESULT, sub_810FD60 compare RESULT, 1 - jumpeq LilycoveCity_PokemonTrainerFanClub_EventScript_159803 - specialval RESULT, sub_810FCB0 + goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_159803 + specialvar RESULT, sub_810FCB0 compare RESULT, 7 - jumpeq LilycoveCity_PokemonTrainerFanClub_EventScript_159827 + goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_159827 msgbox LilycoveCity_PokemonTrainerFanClub_Text_18B030, 4 release end LilycoveCity_PokemonTrainerFanClub_EventScript_159803:: @ 8159803 - specialval RESULT, sub_810FCB0 + specialvar RESULT, sub_810FCB0 compare RESULT, 1 - jumpeq LilycoveCity_PokemonTrainerFanClub_EventScript_15981D + goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_15981D msgbox LilycoveCity_PokemonTrainerFanClub_Text_18AF62, 4 release end @@ -407,20 +407,20 @@ LilycoveCity_PokemonTrainerFanClub_EventScript_159831:: @ 8159831 faceplayer setvar 0x8004, 15 special sub_810FDAC - specialval RESULT, sub_810FD60 + specialvar RESULT, sub_810FD60 compare RESULT, 1 - jumpeq LilycoveCity_PokemonTrainerFanClub_EventScript_159865 - specialval RESULT, sub_810FCB0 + goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_159865 + specialvar RESULT, sub_810FCB0 compare RESULT, 7 - jumpeq LilycoveCity_PokemonTrainerFanClub_EventScript_159889 + goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_159889 msgbox LilycoveCity_PokemonTrainerFanClub_Text_18B1FD, 4 release end LilycoveCity_PokemonTrainerFanClub_EventScript_159865:: @ 8159865 - specialval RESULT, sub_810FCB0 + specialvar RESULT, sub_810FCB0 compare RESULT, 1 - jumpeq LilycoveCity_PokemonTrainerFanClub_EventScript_15987F + goto_if_eq LilycoveCity_PokemonTrainerFanClub_EventScript_15987F msgbox LilycoveCity_PokemonTrainerFanClub_Text_18B16E, 4 release end diff --git a/data/scripts/maps/LittlerootTown.inc b/data/scripts/maps/LittlerootTown.inc index 2a4f77529..220aeead7 100644 --- a/data/scripts/maps/LittlerootTown.inc +++ b/data/scripts/maps/LittlerootTown.inc @@ -6,19 +6,19 @@ LittlerootTown_MapScripts:: @ 814D509 LittlerootTown_MapScript1_14D514:: @ 814D514 setflag 2063 compare 0x4092, 2 - callif 1, LittlerootTown_EventScript_14D57B + call_if 1, LittlerootTown_EventScript_14D57B checkflag 82 - callif 0, LittlerootTown_EventScript_14D583 + call_if 0, LittlerootTown_EventScript_14D583 compare 0x4050, 3 - callif 1, LittlerootTown_EventScript_14D5A6 + call_if 1, LittlerootTown_EventScript_14D5A6 compare 0x4082, 4 - callif 1, LittlerootTown_EventScript_14D570 + call_if 1, LittlerootTown_EventScript_14D570 compare 0x408c, 4 - callif 1, LittlerootTown_EventScript_14D570 + call_if 1, LittlerootTown_EventScript_14D570 compare 0x40c7, 1 - callif 1, LittlerootTown_EventScript_14D567 + call_if 1, LittlerootTown_EventScript_14D567 compare 0x408d, 3 - callif 1, LittlerootTown_EventScript_14D563 + call_if 1, LittlerootTown_EventScript_14D563 end LittlerootTown_EventScript_14D563:: @ 814D563 @@ -36,37 +36,37 @@ LittlerootTown_EventScript_14D570:: @ 814D570 return LittlerootTown_EventScript_14D57B:: @ 814D57B - movespriteperm 4, 14, 8 + setobjectxyperm 4, 14, 8 return LittlerootTown_EventScript_14D583:: @ 814D583 compare 0x4050, 0 - jumpeq LittlerootTown_EventScript_14D59A - movespriteperm 1, 10, 1 - spritebehave 1, 7 + goto_if_eq LittlerootTown_EventScript_14D59A + setobjectxyperm 1, 10, 1 + setobjectmovementtype 1, 7 return LittlerootTown_EventScript_14D59A:: @ 814D59A - movespriteperm 1, 7, 2 - spritebehave 1, 8 + setobjectxyperm 1, 7, 2 + setobjectmovementtype 1, 8 return LittlerootTown_EventScript_14D5A6:: @ 814D5A6 clearflag 752 - spritebehave 4, 8 - checkgender + setobjectmovementtype 4, 8 + checkplayergender compare RESULT, 0 - callif 1, LittlerootTown_EventScript_14D5C5 + call_if 1, LittlerootTown_EventScript_14D5C5 compare RESULT, 1 - callif 1, LittlerootTown_EventScript_14D5CD + call_if 1, LittlerootTown_EventScript_14D5CD return LittlerootTown_EventScript_14D5C5:: @ 814D5C5 - movespriteperm 4, 5, 9 + setobjectxyperm 4, 5, 9 return LittlerootTown_EventScript_14D5CD:: @ 814D5CD - movespriteperm 4, 14, 9 + setobjectxyperm 4, 14, 9 return LittlerootTown_MapScript2_14D5D5:: @ 814D5D5 @@ -81,7 +81,7 @@ LittlerootTown_EventScript_14D5EF:: @ 814D5EF setvar 0x8005, 8 call LittlerootTown_EventScript_14D62B setflag 761 - warpmuted LittlerootTown_BrendansHouse_1F, 255, 8, 8 + warpsilent LittlerootTown_BrendansHouse_1F, 255, 8, 8 waitstate releaseall end @@ -92,41 +92,41 @@ LittlerootTown_EventScript_14D60D:: @ 814D60D setvar 0x8005, 8 call LittlerootTown_EventScript_14D62B setflag 762 - warpmuted LittlerootTown_MaysHouse_1F, 255, 2, 8 + warpsilent LittlerootTown_MaysHouse_1F, 255, 2, 8 waitstate releaseall end LittlerootTown_EventScript_14D62B:: @ 814D62B - pause 15 - playsfx 10 - move 255, LittlerootTown_Movement_14D6C0 - waitmove 0 - setdooropened 0x8004, 0x8005 - doorchange - reappear 4 - move 4, LittlerootTown_Movement_14D6AC - waitmove 0 - setdoorclosed 0x8004, 0x8005 - doorchange - pause 10 - move 4, LittlerootTown_Movement_14D6AE - waitmove 0 + delay 15 + playse 10 + applymovement 255, LittlerootTown_Movement_14D6C0 + waitmovement 0 + opendoor 0x8004, 0x8005 + waitdooranim + addobject 4 + applymovement 4, LittlerootTown_Movement_14D6AC + waitmovement 0 + closedoor 0x8004, 0x8005 + waitdooranim + delay 10 + applymovement 4, LittlerootTown_Movement_14D6AE + waitmovement 0 msgbox LittlerootTown_Text_16A7C9, 4 - closebutton - move 4, LittlerootTown_Movement_14D6B1 - move 255, LittlerootTown_Movement_14D6B8 - waitmove 0 - setdooropened 0x8004, 0x8005 - doorchange - move 4, LittlerootTown_Movement_14D6B5 - move 255, LittlerootTown_Movement_14D6BD - waitmove 0 + closemessage + applymovement 4, LittlerootTown_Movement_14D6B1 + applymovement 255, LittlerootTown_Movement_14D6B8 + waitmovement 0 + opendoor 0x8004, 0x8005 + waitdooranim + applymovement 4, LittlerootTown_Movement_14D6B5 + applymovement 255, LittlerootTown_Movement_14D6BD + waitmovement 0 setflag 752 setvar 0x4092, 3 - spriteinvisible 255, 0, 0 - setdoorclosed 0x8004, 0x8005 - doorchange + hideobject 255, 0, 0 + closedoor 0x8004, 0x8005 + waitdooranim clearflag 868 clearflag 0x4000 return @@ -188,20 +188,20 @@ LittlerootTown_EventScript_14D6DF:: @ 814D6DF lock faceplayer checkflag 116 - jumpeq LittlerootTown_EventScript_14D72F + goto_if_eq LittlerootTown_EventScript_14D72F checkflag 82 - jumpeq LittlerootTown_EventScript_14D722 + goto_if_eq LittlerootTown_EventScript_14D722 compare 0x4050, 0 - jumpif 5, LittlerootTown_EventScript_14D708 + goto_if 5, LittlerootTown_EventScript_14D708 msgbox LittlerootTown_Text_16ACEB, 4 release end LittlerootTown_EventScript_14D708:: @ 814D708 msgbox LittlerootTown_Text_16AD82, 4 - closebutton - move 1, LittlerootTown_Movement_1A083D - waitmove 0 + closemessage + applymovement 1, LittlerootTown_Movement_1A083D + waitmovement 0 setvar 0x4050, 2 release end @@ -219,22 +219,22 @@ LittlerootTown_EventScript_14D72F:: @ 814D72F LittlerootTown_EventScript_14D739:: @ 814D739 lockall - move 1, LittlerootTown_Movement_14D779 - waitmove 0 + applymovement 1, LittlerootTown_Movement_14D779 + waitmovement 0 call LittlerootTown_EventScript_14D755 - move 1, LittlerootTown_Movement_14D789 - waitmove 0 + applymovement 1, LittlerootTown_Movement_14D789 + waitmovement 0 releaseall end LittlerootTown_EventScript_14D755:: @ 814D755 msgbox LittlerootTown_Text_16ACEB, 4 - closebutton - move 1, LittlerootTown_Movement_14D787 - move 255, LittlerootTown_Movement_14D793 - waitmove 0 + closemessage + applymovement 1, LittlerootTown_Movement_14D787 + applymovement 255, LittlerootTown_Movement_14D793 + waitmovement 0 msgbox LittlerootTown_Text_16AD3C, 4 - closebutton + closemessage return LittlerootTown_Movement_14D779:: @ 814D779 @@ -277,11 +277,11 @@ LittlerootTown_Movement_14D793:: @ 814D793 LittlerootTown_EventScript_14D797:: @ 814D797 lockall - move 1, LittlerootTown_Movement_14D7B3 - waitmove 0 + applymovement 1, LittlerootTown_Movement_14D7B3 + waitmovement 0 call LittlerootTown_EventScript_14D755 - move 1, LittlerootTown_Movement_14D7C0 - waitmove 0 + applymovement 1, LittlerootTown_Movement_14D7C0 + waitmovement 0 releaseall end @@ -311,14 +311,14 @@ LittlerootTown_Movement_14D7C0:: @ 814D7C0 LittlerootTown_EventScript_14D7C7:: @ 814D7C7 lockall - move 1, LittlerootTown_Movement_1A0843 - waitmove 0 - move 255, LittlerootTown_Movement_1A083F - waitmove 0 + applymovement 1, LittlerootTown_Movement_1A0843 + waitmovement 0 + applymovement 255, LittlerootTown_Movement_1A083F + waitmovement 0 msgbox LittlerootTown_Text_16AD82, 4 - closebutton - move 1, LittlerootTown_Movement_1A083D - waitmove 0 + closemessage + applymovement 1, LittlerootTown_Movement_1A083D + waitmovement 0 setvar 0x4050, 2 releaseall end @@ -333,11 +333,11 @@ LittlerootTown_EventScript_14D7FF:: @ 814D7FF LittlerootTown_EventScript_14D808:: @ 814D808 lockall - checkgender + checkplayergender compare RESULT, 0 - callif 1, LittlerootTown_EventScript_14D822 + call_if 1, LittlerootTown_EventScript_14D822 compare RESULT, 1 - callif 1, LittlerootTown_EventScript_14D82B + call_if 1, LittlerootTown_EventScript_14D82B releaseall end @@ -351,11 +351,11 @@ LittlerootTown_EventScript_14D82B:: @ 814D82B LittlerootTown_EventScript_14D834:: @ 814D834 lockall - checkgender + checkplayergender compare RESULT, 0 - callif 1, LittlerootTown_EventScript_14D84E + call_if 1, LittlerootTown_EventScript_14D84E compare RESULT, 1 - callif 1, LittlerootTown_EventScript_14D857 + call_if 1, LittlerootTown_EventScript_14D857 releaseall end @@ -370,66 +370,66 @@ LittlerootTown_EventScript_14D857:: @ 814D857 LittlerootTown_EventScript_14D860:: @ 814D860 lockall setvar 0x8008, 0 - movesprite 4, 10, 9 - jump LittlerootTown_EventScript_14D8B6 + setobjectxy 4, 10, 9 + goto LittlerootTown_EventScript_14D8B6 end LittlerootTown_EventScript_14D873:: @ 814D873 lockall setvar 0x8008, 1 - movesprite 4, 11, 9 - jump LittlerootTown_EventScript_14D8B6 + setobjectxy 4, 11, 9 + goto LittlerootTown_EventScript_14D8B6 end LittlerootTown_EventScript_14D886:: @ 814D886 lockall setvar 0x8008, 2 - jump LittlerootTown_EventScript_14D8B6 + goto LittlerootTown_EventScript_14D8B6 end LittlerootTown_EventScript_14D892:: @ 814D892 lockall setvar 0x8008, 3 - jump LittlerootTown_EventScript_14D8B6 + goto LittlerootTown_EventScript_14D8B6 end LittlerootTown_EventScript_14D89E:: @ 814D89E lockall setvar 0x8008, 4 - jump LittlerootTown_EventScript_14D8B6 + goto LittlerootTown_EventScript_14D8B6 end LittlerootTown_EventScript_14D8AA:: @ 814D8AA lockall setvar 0x8008, 5 - jump LittlerootTown_EventScript_14D8B6 + goto LittlerootTown_EventScript_14D8B6 end LittlerootTown_EventScript_14D8B6:: @ 814D8B6 - checkgender + checkplayergender compare RESULT, 0 - callif 1, LittlerootTown_EventScript_14D93C + call_if 1, LittlerootTown_EventScript_14D93C compare RESULT, 1 - callif 1, LittlerootTown_EventScript_14D947 - checkgender + call_if 1, LittlerootTown_EventScript_14D947 + checkplayergender compare RESULT, 0 - callif 1, LittlerootTown_EventScript_14D926 + call_if 1, LittlerootTown_EventScript_14D926 compare RESULT, 1 - callif 1, LittlerootTown_EventScript_14D931 + call_if 1, LittlerootTown_EventScript_14D931 msgbox LittlerootTown_Text_16A8EE, 4 - closebutton - checkgender + closemessage + checkplayergender compare RESULT, 0 - callif 1, LittlerootTown_EventScript_14D952 + call_if 1, LittlerootTown_EventScript_14D952 compare RESULT, 1 - callif 1, LittlerootTown_EventScript_14D995 + call_if 1, LittlerootTown_EventScript_14D995 call LittlerootTown_EventScript_14DD38 - checkgender + checkplayergender compare RESULT, 0 - callif 1, LittlerootTown_EventScript_14DAAA + call_if 1, LittlerootTown_EventScript_14DAAA compare RESULT, 1 - callif 1, LittlerootTown_EventScript_14DAED - jump LittlerootTown_EventScript_14DD2B + call_if 1, LittlerootTown_EventScript_14DAED + goto LittlerootTown_EventScript_14DD2B end LittlerootTown_EventScript_14D926:: @ 814D926 @@ -443,249 +443,249 @@ LittlerootTown_EventScript_14D931:: @ 814D931 return LittlerootTown_EventScript_14D93C:: @ 814D93C - move 4, LittlerootTown_Movement_1A0843 - waitmove 0 + applymovement 4, LittlerootTown_Movement_1A0843 + waitmovement 0 return LittlerootTown_EventScript_14D947:: @ 814D947 - move 4, LittlerootTown_Movement_1A083F - waitmove 0 + applymovement 4, LittlerootTown_Movement_1A083F + waitmovement 0 return LittlerootTown_EventScript_14D952:: @ 814D952 compare 0x8008, 0 - callif 1, LittlerootTown_EventScript_14D9D8 + call_if 1, LittlerootTown_EventScript_14D9D8 compare 0x8008, 1 - callif 1, LittlerootTown_EventScript_14D9ED + call_if 1, LittlerootTown_EventScript_14D9ED compare 0x8008, 2 - callif 1, LittlerootTown_EventScript_14DA02 + call_if 1, LittlerootTown_EventScript_14DA02 compare 0x8008, 3 - callif 1, LittlerootTown_EventScript_14DA17 + call_if 1, LittlerootTown_EventScript_14DA17 compare 0x8008, 4 - callif 1, LittlerootTown_EventScript_14DA2C + call_if 1, LittlerootTown_EventScript_14DA2C compare 0x8008, 5 - callif 1, LittlerootTown_EventScript_14DA41 + call_if 1, LittlerootTown_EventScript_14DA41 return LittlerootTown_EventScript_14D995:: @ 814D995 compare 0x8008, 0 - callif 1, LittlerootTown_EventScript_14D9D8 + call_if 1, LittlerootTown_EventScript_14D9D8 compare 0x8008, 1 - callif 1, LittlerootTown_EventScript_14D9ED + call_if 1, LittlerootTown_EventScript_14D9ED compare 0x8008, 2 - callif 1, LittlerootTown_EventScript_14DA56 + call_if 1, LittlerootTown_EventScript_14DA56 compare 0x8008, 3 - callif 1, LittlerootTown_EventScript_14DA6B + call_if 1, LittlerootTown_EventScript_14DA6B compare 0x8008, 4 - callif 1, LittlerootTown_EventScript_14DA80 + call_if 1, LittlerootTown_EventScript_14DA80 compare 0x8008, 5 - callif 1, LittlerootTown_EventScript_14DA95 + call_if 1, LittlerootTown_EventScript_14DA95 return LittlerootTown_EventScript_14D9D8:: @ 814D9D8 - move 255, LittlerootTown_Movement_1A0845 - waitmove 0 - move 4, LittlerootTown_Movement_14DC76 - waitmove 0 + applymovement 255, LittlerootTown_Movement_1A0845 + waitmovement 0 + applymovement 4, LittlerootTown_Movement_14DC76 + waitmovement 0 return LittlerootTown_EventScript_14D9ED:: @ 814D9ED - move 255, LittlerootTown_Movement_1A0845 - waitmove 0 - move 4, LittlerootTown_Movement_14DC7D - waitmove 0 + applymovement 255, LittlerootTown_Movement_1A0845 + waitmovement 0 + applymovement 4, LittlerootTown_Movement_14DC7D + waitmovement 0 return LittlerootTown_EventScript_14DA02:: @ 814DA02 - move 255, LittlerootTown_Movement_1A083F - waitmove 0 - move 4, LittlerootTown_Movement_14DC84 - waitmove 0 + applymovement 255, LittlerootTown_Movement_1A083F + waitmovement 0 + applymovement 4, LittlerootTown_Movement_14DC84 + waitmovement 0 return LittlerootTown_EventScript_14DA17:: @ 814DA17 - move 255, LittlerootTown_Movement_1A083F - waitmove 0 - move 4, LittlerootTown_Movement_14DC89 - waitmove 0 + applymovement 255, LittlerootTown_Movement_1A083F + waitmovement 0 + applymovement 4, LittlerootTown_Movement_14DC89 + waitmovement 0 return LittlerootTown_EventScript_14DA2C:: @ 814DA2C - move 255, LittlerootTown_Movement_1A083F - waitmove 0 - move 4, LittlerootTown_Movement_14DC8F - waitmove 0 + applymovement 255, LittlerootTown_Movement_1A083F + waitmovement 0 + applymovement 4, LittlerootTown_Movement_14DC8F + waitmovement 0 return LittlerootTown_EventScript_14DA41:: @ 814DA41 - move 255, LittlerootTown_Movement_1A083F - waitmove 0 - move 4, LittlerootTown_Movement_14DC92 - waitmove 0 + applymovement 255, LittlerootTown_Movement_1A083F + waitmovement 0 + applymovement 4, LittlerootTown_Movement_14DC92 + waitmovement 0 return LittlerootTown_EventScript_14DA56:: @ 814DA56 - move 255, LittlerootTown_Movement_1A0843 - waitmove 0 - move 4, LittlerootTown_Movement_14DC96 - waitmove 0 + applymovement 255, LittlerootTown_Movement_1A0843 + waitmovement 0 + applymovement 4, LittlerootTown_Movement_14DC96 + waitmovement 0 return LittlerootTown_EventScript_14DA6B:: @ 814DA6B - move 255, LittlerootTown_Movement_1A0843 - waitmove 0 - move 4, LittlerootTown_Movement_14DC9A - waitmove 0 + applymovement 255, LittlerootTown_Movement_1A0843 + waitmovement 0 + applymovement 4, LittlerootTown_Movement_14DC9A + waitmovement 0 return LittlerootTown_EventScript_14DA80:: @ 814DA80 - move 255, LittlerootTown_Movement_1A0843 - waitmove 0 - move 4, LittlerootTown_Movement_14DC9D - waitmove 0 + applymovement 255, LittlerootTown_Movement_1A0843 + waitmovement 0 + applymovement 4, LittlerootTown_Movement_14DC9D + waitmovement 0 return LittlerootTown_EventScript_14DA95:: @ 814DA95 - move 255, LittlerootTown_Movement_1A0843 - waitmove 0 - move 4, LittlerootTown_Movement_14DCA3 - waitmove 0 + applymovement 255, LittlerootTown_Movement_1A0843 + waitmovement 0 + applymovement 4, LittlerootTown_Movement_14DCA3 + waitmovement 0 return LittlerootTown_EventScript_14DAAA:: @ 814DAAA compare 0x8008, 0 - callif 1, LittlerootTown_EventScript_14DB30 + call_if 1, LittlerootTown_EventScript_14DB30 compare 0x8008, 1 - callif 1, LittlerootTown_EventScript_14DB3B + call_if 1, LittlerootTown_EventScript_14DB3B compare 0x8008, 2 - callif 1, LittlerootTown_EventScript_14DB46 + call_if 1, LittlerootTown_EventScript_14DB46 compare 0x8008, 3 - callif 1, LittlerootTown_EventScript_14DB6C + call_if 1, LittlerootTown_EventScript_14DB6C compare 0x8008, 4 - callif 1, LittlerootTown_EventScript_14DB92 + call_if 1, LittlerootTown_EventScript_14DB92 compare 0x8008, 5 - callif 1, LittlerootTown_EventScript_14DBB8 + call_if 1, LittlerootTown_EventScript_14DBB8 return LittlerootTown_EventScript_14DAED:: @ 814DAED compare 0x8008, 0 - callif 1, LittlerootTown_EventScript_14DB30 + call_if 1, LittlerootTown_EventScript_14DB30 compare 0x8008, 1 - callif 1, LittlerootTown_EventScript_14DB3B + call_if 1, LittlerootTown_EventScript_14DB3B compare 0x8008, 2 - callif 1, LittlerootTown_EventScript_14DBDE + call_if 1, LittlerootTown_EventScript_14DBDE compare 0x8008, 3 - callif 1, LittlerootTown_EventScript_14DC04 + call_if 1, LittlerootTown_EventScript_14DC04 compare 0x8008, 4 - callif 1, LittlerootTown_EventScript_14DC2A + call_if 1, LittlerootTown_EventScript_14DC2A compare 0x8008, 5 - callif 1, LittlerootTown_EventScript_14DC50 + call_if 1, LittlerootTown_EventScript_14DC50 return LittlerootTown_EventScript_14DB30:: @ 814DB30 - move 4, LittlerootTown_Movement_14DCA8 - waitmove 0 + applymovement 4, LittlerootTown_Movement_14DCA8 + waitmovement 0 return LittlerootTown_EventScript_14DB3B:: @ 814DB3B - move 4, LittlerootTown_Movement_14DCAE - waitmove 0 + applymovement 4, LittlerootTown_Movement_14DCAE + waitmovement 0 return LittlerootTown_EventScript_14DB46:: @ 814DB46 - move 4, LittlerootTown_Movement_14DCB4 - waitmove 0 - setdooropened 0x8009, 0x800a - doorchange - move 4, LittlerootTown_Movement_14DCE0 - waitmove 0 - spriteinvisible 4, 0, 9 - setdoorclosed 0x8009, 0x800a - doorchange + applymovement 4, LittlerootTown_Movement_14DCB4 + waitmovement 0 + opendoor 0x8009, 0x800a + waitdooranim + applymovement 4, LittlerootTown_Movement_14DCE0 + waitmovement 0 + hideobject 4, 0, 9 + closedoor 0x8009, 0x800a + waitdooranim return LittlerootTown_EventScript_14DB6C:: @ 814DB6C - move 4, LittlerootTown_Movement_14DCBA - waitmove 0 - setdooropened 0x8009, 0x800a - doorchange - move 4, LittlerootTown_Movement_14DCE0 - waitmove 0 - spriteinvisible 4, 0, 9 - setdoorclosed 0x8009, 0x800a - doorchange + applymovement 4, LittlerootTown_Movement_14DCBA + waitmovement 0 + opendoor 0x8009, 0x800a + waitdooranim + applymovement 4, LittlerootTown_Movement_14DCE0 + waitmovement 0 + hideobject 4, 0, 9 + closedoor 0x8009, 0x800a + waitdooranim return LittlerootTown_EventScript_14DB92:: @ 814DB92 - move 4, LittlerootTown_Movement_14DCC1 - waitmove 0 - setdooropened 0x8009, 0x800a - doorchange - move 4, LittlerootTown_Movement_14DCE0 - waitmove 0 - spriteinvisible 4, 0, 9 - setdoorclosed 0x8009, 0x800a - doorchange + applymovement 4, LittlerootTown_Movement_14DCC1 + waitmovement 0 + opendoor 0x8009, 0x800a + waitdooranim + applymovement 4, LittlerootTown_Movement_14DCE0 + waitmovement 0 + hideobject 4, 0, 9 + closedoor 0x8009, 0x800a + waitdooranim return LittlerootTown_EventScript_14DBB8:: @ 814DBB8 - move 4, LittlerootTown_Movement_14DCC5 - waitmove 0 - setdooropened 0x8009, 0x800a - doorchange - move 4, LittlerootTown_Movement_14DCE0 - waitmove 0 - spriteinvisible 4, 0, 9 - setdoorclosed 0x8009, 0x800a - doorchange + applymovement 4, LittlerootTown_Movement_14DCC5 + waitmovement 0 + opendoor 0x8009, 0x800a + waitdooranim + applymovement 4, LittlerootTown_Movement_14DCE0 + waitmovement 0 + hideobject 4, 0, 9 + closedoor 0x8009, 0x800a + waitdooranim return LittlerootTown_EventScript_14DBDE:: @ 814DBDE - move 4, LittlerootTown_Movement_14DCCA - waitmove 0 - setdooropened 0x8009, 0x800a - doorchange - move 4, LittlerootTown_Movement_14DCE0 - waitmove 0 - spriteinvisible 4, 0, 9 - setdoorclosed 0x8009, 0x800a - doorchange + applymovement 4, LittlerootTown_Movement_14DCCA + waitmovement 0 + opendoor 0x8009, 0x800a + waitdooranim + applymovement 4, LittlerootTown_Movement_14DCE0 + waitmovement 0 + hideobject 4, 0, 9 + closedoor 0x8009, 0x800a + waitdooranim return LittlerootTown_EventScript_14DC04:: @ 814DC04 - move 4, LittlerootTown_Movement_14DCCF - waitmove 0 - setdooropened 0x8009, 0x800a - doorchange - move 4, LittlerootTown_Movement_14DCE0 - waitmove 0 - spriteinvisible 4, 0, 9 - setdoorclosed 0x8009, 0x800a - doorchange + applymovement 4, LittlerootTown_Movement_14DCCF + waitmovement 0 + opendoor 0x8009, 0x800a + waitdooranim + applymovement 4, LittlerootTown_Movement_14DCE0 + waitmovement 0 + hideobject 4, 0, 9 + closedoor 0x8009, 0x800a + waitdooranim return LittlerootTown_EventScript_14DC2A:: @ 814DC2A - move 4, LittlerootTown_Movement_14DCD3 - waitmove 0 - setdooropened 0x8009, 0x800a - doorchange - move 4, LittlerootTown_Movement_14DCE0 - waitmove 0 - spriteinvisible 4, 0, 9 - setdoorclosed 0x8009, 0x800a - doorchange + applymovement 4, LittlerootTown_Movement_14DCD3 + waitmovement 0 + opendoor 0x8009, 0x800a + waitdooranim + applymovement 4, LittlerootTown_Movement_14DCE0 + waitmovement 0 + hideobject 4, 0, 9 + closedoor 0x8009, 0x800a + waitdooranim return LittlerootTown_EventScript_14DC50:: @ 814DC50 - move 4, LittlerootTown_Movement_14DCDA - waitmove 0 - setdooropened 0x8009, 0x800a - doorchange - move 4, LittlerootTown_Movement_14DCE0 - waitmove 0 - spriteinvisible 4, 0, 9 - setdoorclosed 0x8009, 0x800a - doorchange + applymovement 4, LittlerootTown_Movement_14DCDA + waitmovement 0 + opendoor 0x8009, 0x800a + waitdooranim + applymovement 4, LittlerootTown_Movement_14DCE0 + waitmovement 0 + hideobject 4, 0, 9 + closedoor 0x8009, 0x800a + waitdooranim return LittlerootTown_Movement_14DC76:: @ 814DC76 @@ -841,26 +841,26 @@ LittlerootTown_Movement_14DCE0:: @ 814DCE0 LittlerootTown_EventScript_14DCE2:: @ 814DCE2 lock faceplayer - checkgender + checkplayergender compare RESULT, 0 - callif 1, LittlerootTown_EventScript_14D926 + call_if 1, LittlerootTown_EventScript_14D926 compare RESULT, 1 - callif 1, LittlerootTown_EventScript_14D931 + call_if 1, LittlerootTown_EventScript_14D931 call LittlerootTown_EventScript_14DD38 - move 4, LittlerootTown_Movement_1A0841 - waitmove 0 - setdooropened 0x8009, 0x800a - doorchange - move 4, LittlerootTown_Movement_14DCE0 - waitmove 0 - spriteinvisible 4, 0, 9 - setdoorclosed 0x8009, 0x800a - doorchange - jump LittlerootTown_EventScript_14DD2B + applymovement 4, LittlerootTown_Movement_1A0841 + waitmovement 0 + opendoor 0x8009, 0x800a + waitdooranim + applymovement 4, LittlerootTown_Movement_14DCE0 + waitmovement 0 + hideobject 4, 0, 9 + closedoor 0x8009, 0x800a + waitdooranim + goto LittlerootTown_EventScript_14DD2B end LittlerootTown_EventScript_14DD2B:: @ 814DD2B - disappear 4 + removeobject 4 setflag 2144 setvar 0x4050, 4 release @@ -868,13 +868,13 @@ LittlerootTown_EventScript_14DD2B:: @ 814DD2B LittlerootTown_EventScript_14DD38:: @ 814DD38 msgbox LittlerootTown_Text_16A8FD, 4 - fanfare 370 + playfanfare 370 message LittlerootTown_Text_16AA32 waitfanfare - waittext + waitmessage setflag 274 msgbox LittlerootTown_Text_16AA5C, 4 msgbox LittlerootTown_Text_16AB10, 4 - closebutton - pause 30 + closemessage + delay 30 return diff --git a/data/scripts/maps/LittlerootTown_BrendansHouse_1F.inc b/data/scripts/maps/LittlerootTown_BrendansHouse_1F.inc index 69206566a..04256cacb 100644 --- a/data/scripts/maps/LittlerootTown_BrendansHouse_1F.inc +++ b/data/scripts/maps/LittlerootTown_BrendansHouse_1F.inc @@ -6,9 +6,9 @@ LittlerootTown_BrendansHouse_1F_MapScripts:: @ 815263B LittlerootTown_BrendansHouse_1F_MapScript1_15264B:: @ 815264B compare 0x4092, 6 - callif 0, LittlerootTown_BrendansHouse_1F_EventScript_152660 + call_if 0, LittlerootTown_BrendansHouse_1F_EventScript_152660 checkflag 274 - callif 1, LittlerootTown_BrendansHouse_1F_EventScript_152673 + call_if 1, LittlerootTown_BrendansHouse_1F_EventScript_152673 end LittlerootTown_BrendansHouse_1F_EventScript_152660:: @ 8152660 @@ -17,9 +17,9 @@ LittlerootTown_BrendansHouse_1F_EventScript_152660:: @ 8152660 return LittlerootTown_BrendansHouse_1F_EventScript_152673:: @ 8152673 - checkgender + checkplayergender compare RESULT, 0 - jumpeq LittlerootTown_BrendansHouse_1F_EventScript_152680 + goto_if_eq LittlerootTown_BrendansHouse_1F_EventScript_152680 return LittlerootTown_BrendansHouse_1F_EventScript_152680:: @ 8152680 @@ -28,26 +28,26 @@ LittlerootTown_BrendansHouse_1F_EventScript_152680:: @ 8152680 LittlerootTown_BrendansHouse_1F_MapScript1_15268A:: @ 815268A compare 0x4092, 3 - callif 1, LittlerootTown_BrendansHouse_1F_EventScript_1526C4 + call_if 1, LittlerootTown_BrendansHouse_1F_EventScript_1526C4 compare 0x4092, 5 - callif 1, LittlerootTown_BrendansHouse_1F_EventScript_1526AC + call_if 1, LittlerootTown_BrendansHouse_1F_EventScript_1526AC compare 0x4092, 6 - callif 1, LittlerootTown_BrendansHouse_1F_EventScript_1526B8 + call_if 1, LittlerootTown_BrendansHouse_1F_EventScript_1526B8 end LittlerootTown_BrendansHouse_1F_EventScript_1526AC:: @ 81526AC - movespriteperm 1, 8, 4 - spritebehave 1, 7 + setobjectxyperm 1, 8, 4 + setobjectmovementtype 1, 7 return LittlerootTown_BrendansHouse_1F_EventScript_1526B8:: @ 81526B8 - movespriteperm 1, 4, 5 - spritebehave 1, 7 + setobjectxyperm 1, 4, 5 + setobjectmovementtype 1, 7 return LittlerootTown_BrendansHouse_1F_EventScript_1526C4:: @ 81526C4 - movespriteperm 1, 9, 8 - spritebehave 1, 7 + setobjectxyperm 1, 9, 8 + setobjectmovementtype 1, 7 return LittlerootTown_BrendansHouse_1F_MapScript2_1526D0:: @ 81526D0 @@ -61,10 +61,10 @@ LittlerootTown_BrendansHouse_1F_MapScript2_1526D0:: @ 81526D0 LittlerootTown_BrendansHouse_1F_EventScript_1526FA:: @ 81526FA lockall msgbox LittlerootTown_BrendansHouse_1F_Text_172574, 4 - closebutton - move 255, LittlerootTown_BrendansHouse_1F_Movement_152720 - move 1, LittlerootTown_BrendansHouse_1F_Movement_152720 - waitmove 0 + closemessage + applymovement 255, LittlerootTown_BrendansHouse_1F_Movement_152720 + applymovement 1, LittlerootTown_BrendansHouse_1F_Movement_152720 + waitmovement 0 warp LittlerootTown_BrendansHouse_2F, 255, 7, 1 waitstate releaseall @@ -78,26 +78,26 @@ LittlerootTown_BrendansHouse_1F_EventScript_152722:: @ 8152722 lockall setvar 0x8004, 1 setvar 0x8005, 0 - jump LittlerootTown_BrendansHouse_1F_EventScript_1B6956 + goto LittlerootTown_BrendansHouse_1F_EventScript_1B6956 end LittlerootTown_BrendansHouse_1F_EventScript_152733:: @ 8152733 lockall setvar 0x8004, 0 setvar 0x8005, 1 - jump LittlerootTown_BrendansHouse_1F_EventScript_1B6ABF + goto LittlerootTown_BrendansHouse_1F_EventScript_1B6ABF end LittlerootTown_BrendansHouse_1F_EventScript_152744:: @ 8152744 lockall - playsfx 21 - move 4, LittlerootTown_BrendansHouse_1F_Movement_1A0833 - waitmove 0 - move 4, LittlerootTown_BrendansHouse_1F_Movement_1A0835 - waitmove 0 - move 255, LittlerootTown_BrendansHouse_1F_Movement_1A083F - move 4, LittlerootTown_BrendansHouse_1F_Movement_152782 - waitmove 0 + playse 21 + applymovement 4, LittlerootTown_BrendansHouse_1F_Movement_1A0833 + waitmovement 0 + applymovement 4, LittlerootTown_BrendansHouse_1F_Movement_1A0835 + waitmovement 0 + applymovement 255, LittlerootTown_BrendansHouse_1F_Movement_1A083F + applymovement 4, LittlerootTown_BrendansHouse_1F_Movement_152782 + waitmovement 0 special GetRivalSonDaughterString msgbox LittlerootTown_BrendansHouse_1F_Text_1730C2, 4 setflag 87 @@ -118,7 +118,7 @@ LittlerootTown_BrendansHouse_1F_EventScript_152789:: @ 8152789 lockall setvar 0x8004, 1 setvar 0x8005, 0 - move 0x8004, LittlerootTown_BrendansHouse_1F_Movement_1A083F - waitmove 0 - jump LittlerootTown_BrendansHouse_1F_EventScript_1B69B7 + applymovement 0x8004, LittlerootTown_BrendansHouse_1F_Movement_1A083F + waitmovement 0 + goto LittlerootTown_BrendansHouse_1F_EventScript_1B69B7 end diff --git a/data/scripts/maps/LittlerootTown_BrendansHouse_2F.inc b/data/scripts/maps/LittlerootTown_BrendansHouse_2F.inc index 0803cd512..8ff7f8b81 100644 --- a/data/scripts/maps/LittlerootTown_BrendansHouse_2F.inc +++ b/data/scripts/maps/LittlerootTown_BrendansHouse_2F.inc @@ -5,16 +5,16 @@ LittlerootTown_BrendansHouse_2F_MapScripts:: @ 81527A4 LittlerootTown_BrendansHouse_2F_MapScript1_1527AF:: @ 81527AF checkflag 130 - callif 0, LittlerootTown_BrendansHouse_2F_EventScript_1527CE + call_if 0, LittlerootTown_BrendansHouse_2F_EventScript_1527CE compare 0x4092, 4 - callif 1, LittlerootTown_BrendansHouse_2F_EventScript_1B6950 + call_if 1, LittlerootTown_BrendansHouse_2F_EventScript_1B6950 call LittlerootTown_BrendansHouse_2F_EventScript_1A2F3D setvar 0x4089, 0 end LittlerootTown_BrendansHouse_2F_EventScript_1527CE:: @ 81527CE - movespriteperm 1, 1, 2 - spritebehave 1, 7 + setobjectxyperm 1, 1, 2 + setobjectmovementtype 1, 7 return LittlerootTown_BrendansHouse_2F_MapScript2_1527DA:: @ 81527DA @@ -22,18 +22,18 @@ LittlerootTown_BrendansHouse_2F_MapScript2_1527DA:: @ 81527DA .2byte 0 LittlerootTown_BrendansHouse_2F_EventScript_1527E4:: @ 81527E4 - checkgender + checkplayergender compare RESULT, 0 - jumpeq LittlerootTown_BrendansHouse_2F_EventScript_1A2F68 + goto_if_eq LittlerootTown_BrendansHouse_2F_EventScript_1A2F68 end @ 81527F1 lockall - checkgender + checkplayergender compare RESULT, 0 - jumpeq LittlerootTown_BrendansHouse_2F_EventScript_15280A + goto_if_eq LittlerootTown_BrendansHouse_2F_EventScript_15280A compare RESULT, 1 - jumpeq LittlerootTown_BrendansHouse_2F_EventScript_152814 + goto_if_eq LittlerootTown_BrendansHouse_2F_EventScript_152814 end LittlerootTown_BrendansHouse_2F_EventScript_15280A:: @ 815280A @@ -50,17 +50,17 @@ gUnknown_0815281E:: @ 815281E LittlerootTown_BrendansHouse_2F_EventScript_15281E:: @ 815281E lockall - checkgender + checkplayergender compare RESULT, 0 - jumpeq LittlerootTown_BrendansHouse_2F_EventScript_152837 + goto_if_eq LittlerootTown_BrendansHouse_2F_EventScript_152837 compare RESULT, 1 - jumpeq LittlerootTown_BrendansHouse_2F_EventScript_15285D + goto_if_eq LittlerootTown_BrendansHouse_2F_EventScript_15285D end LittlerootTown_BrendansHouse_2F_EventScript_152837:: @ 8152837 setvar 0x8004, 1 special DoPCTurnOnEffect - playsfx SE_PC_ON + playse SE_PC_ON msgbox LittlerootTown_BrendansHouse_2F_Text_1A10D6, 4 special BedroomPC waitstate @@ -69,7 +69,7 @@ LittlerootTown_BrendansHouse_2F_EventScript_152837:: @ 8152837 gBrendanHouse_TurnPCOff:: @ 8152850 setvar 0x8004, 1 - playsfx SE_PC_OFF + playse SE_PC_OFF special DoPCTurnOffEffect releaseall end diff --git a/data/scripts/maps/LittlerootTown_MaysHouse_1F.inc b/data/scripts/maps/LittlerootTown_MaysHouse_1F.inc index 5f7f20d63..14c7f5d8a 100644 --- a/data/scripts/maps/LittlerootTown_MaysHouse_1F.inc +++ b/data/scripts/maps/LittlerootTown_MaysHouse_1F.inc @@ -6,9 +6,9 @@ LittlerootTown_MaysHouse_1F_MapScripts:: @ 8152879 LittlerootTown_MaysHouse_1F_MapScript1_152889:: @ 8152889 compare 0x4092, 6 - callif 0, LittlerootTown_MaysHouse_1F_EventScript_15289E + call_if 0, LittlerootTown_MaysHouse_1F_EventScript_15289E checkflag 274 - callif 1, LittlerootTown_MaysHouse_1F_EventScript_1528B1 + call_if 1, LittlerootTown_MaysHouse_1F_EventScript_1528B1 end LittlerootTown_MaysHouse_1F_EventScript_15289E:: @ 815289E @@ -17,9 +17,9 @@ LittlerootTown_MaysHouse_1F_EventScript_15289E:: @ 815289E return LittlerootTown_MaysHouse_1F_EventScript_1528B1:: @ 81528B1 - checkgender + checkplayergender compare RESULT, 1 - jumpeq LittlerootTown_MaysHouse_1F_EventScript_1528BE + goto_if_eq LittlerootTown_MaysHouse_1F_EventScript_1528BE return LittlerootTown_MaysHouse_1F_EventScript_1528BE:: @ 81528BE @@ -28,26 +28,26 @@ LittlerootTown_MaysHouse_1F_EventScript_1528BE:: @ 81528BE LittlerootTown_MaysHouse_1F_MapScript1_1528C8:: @ 81528C8 compare 0x4092, 3 - callif 1, LittlerootTown_MaysHouse_1F_EventScript_152902 + call_if 1, LittlerootTown_MaysHouse_1F_EventScript_152902 compare 0x4092, 5 - callif 1, LittlerootTown_MaysHouse_1F_EventScript_1528EA + call_if 1, LittlerootTown_MaysHouse_1F_EventScript_1528EA compare 0x4092, 6 - callif 1, LittlerootTown_MaysHouse_1F_EventScript_1528F6 + call_if 1, LittlerootTown_MaysHouse_1F_EventScript_1528F6 end LittlerootTown_MaysHouse_1F_EventScript_1528EA:: @ 81528EA - movespriteperm 1, 2, 4 - spritebehave 1, 7 + setobjectxyperm 1, 2, 4 + setobjectmovementtype 1, 7 return LittlerootTown_MaysHouse_1F_EventScript_1528F6:: @ 81528F6 - movespriteperm 1, 6, 5 - spritebehave 1, 7 + setobjectxyperm 1, 6, 5 + setobjectmovementtype 1, 7 return LittlerootTown_MaysHouse_1F_EventScript_152902:: @ 8152902 - movespriteperm 1, 1, 8 - spritebehave 1, 7 + setobjectxyperm 1, 1, 8 + setobjectmovementtype 1, 7 return LittlerootTown_MaysHouse_1F_MapScript2_15290E:: @ 815290E @@ -61,10 +61,10 @@ LittlerootTown_MaysHouse_1F_MapScript2_15290E:: @ 815290E LittlerootTown_MaysHouse_1F_EventScript_152938:: @ 8152938 lockall msgbox LittlerootTown_MaysHouse_1F_Text_172574, 4 - closebutton - move 255, LittlerootTown_MaysHouse_1F_Movement_15295E - move 1, LittlerootTown_MaysHouse_1F_Movement_15295E - waitmove 0 + closemessage + applymovement 255, LittlerootTown_MaysHouse_1F_Movement_15295E + applymovement 1, LittlerootTown_MaysHouse_1F_Movement_15295E + waitmovement 0 warp LittlerootTown_MaysHouse_2F, 255, 1, 1 waitstate releaseall @@ -78,26 +78,26 @@ LittlerootTown_MaysHouse_1F_EventScript_152960:: @ 8152960 lockall setvar 0x8004, 1 setvar 0x8005, 1 - jump LittlerootTown_MaysHouse_1F_EventScript_1B6956 + goto LittlerootTown_MaysHouse_1F_EventScript_1B6956 end LittlerootTown_MaysHouse_1F_EventScript_152971:: @ 8152971 lockall setvar 0x8004, 1 setvar 0x8005, 1 - jump LittlerootTown_MaysHouse_1F_EventScript_1B6B2E + goto LittlerootTown_MaysHouse_1F_EventScript_1B6B2E end LittlerootTown_MaysHouse_1F_EventScript_152982:: @ 8152982 lockall - playsfx 21 - move 4, LittlerootTown_MaysHouse_1F_Movement_1A0833 - waitmove 0 - move 4, LittlerootTown_MaysHouse_1F_Movement_1A0835 - waitmove 0 - move 255, LittlerootTown_MaysHouse_1F_Movement_1A0843 - move 4, LittlerootTown_MaysHouse_1F_Movement_1529C0 - waitmove 0 + playse 21 + applymovement 4, LittlerootTown_MaysHouse_1F_Movement_1A0833 + waitmovement 0 + applymovement 4, LittlerootTown_MaysHouse_1F_Movement_1A0835 + waitmovement 0 + applymovement 255, LittlerootTown_MaysHouse_1F_Movement_1A0843 + applymovement 4, LittlerootTown_MaysHouse_1F_Movement_1529C0 + waitmovement 0 special GetRivalSonDaughterString msgbox LittlerootTown_MaysHouse_1F_Text_1730C2, 4 setflag 87 @@ -116,11 +116,11 @@ LittlerootTown_MaysHouse_1F_Movement_1529C0:: @ 81529C0 @ 81529C7 lockall - checkgender + checkplayergender compare RESULT, 0 - callif 1, LittlerootTown_MaysHouse_1F_EventScript_1529E1 + call_if 1, LittlerootTown_MaysHouse_1F_EventScript_1529E1 compare RESULT, 1 - callif 1, LittlerootTown_MaysHouse_1F_EventScript_1529E2 + call_if 1, LittlerootTown_MaysHouse_1F_EventScript_1529E2 releaseall end @@ -136,11 +136,11 @@ LittlerootTown_MaysHouse_1F_EventScript_1529EB:: @ 81529EB lock faceplayer checkflag 130 - jumpeq LittlerootTown_BrendansHouse_1F_EventScript_152A21 + goto_if_eq LittlerootTown_BrendansHouse_1F_EventScript_152A21 checkflag 301 - jumpeq LittlerootTown_BrendansHouse_1F_EventScript_152A17 + goto_if_eq LittlerootTown_BrendansHouse_1F_EventScript_152A17 compare 0x408d, 3 - jumpeq LittlerootTown_BrendansHouse_1F_EventScript_152A2B + goto_if_eq LittlerootTown_BrendansHouse_1F_EventScript_152A2B special GetRivalSonDaughterString msgbox LittlerootTown_BrendansHouse_1F_Text_1731C6, 4 release @@ -165,7 +165,7 @@ LittlerootTown_MaysHouse_1F_EventScript_152A35:: @ 8152A35 lockall setvar 0x8004, 1 setvar 0x8005, 1 - move 0x8004, LittlerootTown_MaysHouse_1F_Movement_1A0843 - waitmove 0 - jump LittlerootTown_MaysHouse_1F_EventScript_1B69B7 + applymovement 0x8004, LittlerootTown_MaysHouse_1F_Movement_1A0843 + waitmovement 0 + goto LittlerootTown_MaysHouse_1F_EventScript_1B69B7 end diff --git a/data/scripts/maps/LittlerootTown_MaysHouse_2F.inc b/data/scripts/maps/LittlerootTown_MaysHouse_2F.inc index 85a41caff..68bdf0fcb 100644 --- a/data/scripts/maps/LittlerootTown_MaysHouse_2F.inc +++ b/data/scripts/maps/LittlerootTown_MaysHouse_2F.inc @@ -5,16 +5,16 @@ LittlerootTown_MaysHouse_2F_MapScripts:: @ 8152A50 LittlerootTown_MaysHouse_2F_MapScript1_152A5B:: @ 8152A5B checkflag 130 - callif 0, LittlerootTown_MaysHouse_2F_EventScript_152A7A + call_if 0, LittlerootTown_MaysHouse_2F_EventScript_152A7A compare 0x4092, 4 - callif 1, LittlerootTown_MaysHouse_2F_EventScript_1B6950 + call_if 1, LittlerootTown_MaysHouse_2F_EventScript_1B6950 call LittlerootTown_MaysHouse_2F_EventScript_1A2F3D setvar 0x4089, 0 end LittlerootTown_MaysHouse_2F_EventScript_152A7A:: @ 8152A7A - movespriteperm 1, 7, 2 - spritebehave 1, 7 + setobjectxyperm 1, 7, 2 + setobjectmovementtype 1, 7 return LittlerootTown_MaysHouse_2F_MapScript2_152A86:: @ 8152A86 @@ -22,114 +22,114 @@ LittlerootTown_MaysHouse_2F_MapScript2_152A86:: @ 8152A86 .2byte 0 LittlerootTown_MaysHouse_2F_EventScript_152A90:: @ 8152A90 - checkgender + checkplayergender compare RESULT, 1 - jumpeq LittlerootTown_MaysHouse_2F_EventScript_1A2F68 + goto_if_eq LittlerootTown_MaysHouse_2F_EventScript_1A2F68 end LittlerootTown_BrendansHouse_2F_EventScript_152A9D:: @ 8152A9D LittlerootTown_MaysHouse_2F_EventScript_152A9D:: @ 8152A9D lockall checkflag 292 - jumpeq LittlerootTown_BrendansHouse_2F_EventScript_152BB5 - checkgender + goto_if_eq LittlerootTown_BrendansHouse_2F_EventScript_152BB5 + checkplayergender compare RESULT, 0 - callif 1, LittlerootTown_BrendansHouse_2F_EventScript_152AD4 + call_if 1, LittlerootTown_BrendansHouse_2F_EventScript_152AD4 compare RESULT, 1 - callif 1, LittlerootTown_BrendansHouse_2F_EventScript_152B4A - playsfx 9 - disappear LAST_TALKED + call_if 1, LittlerootTown_BrendansHouse_2F_EventScript_152B4A + playse 9 + removeobject LAST_TALKED setvar 0x408d, 3 setvar 0x4050, 1 - playmusicbattle 0 - fadedefault + savebgm 0 + fadedefaultbgm releaseall end LittlerootTown_BrendansHouse_2F_EventScript_152AD4:: @ 8152AD4 msgbox LittlerootTown_BrendansHouse_2F_Text_17337E, 4 - playmusic 415, 1 - move LAST_TALKED, LittlerootTown_BrendansHouse_2F_Movement_1A0839 - waitmove 0 - move LAST_TALKED, LittlerootTown_BrendansHouse_2F_Movement_1A0833 - waitmove 0 - move LAST_TALKED, LittlerootTown_BrendansHouse_2F_Movement_1A0835 - waitmove 0 + playbgm 415, 1 + applymovement LAST_TALKED, LittlerootTown_BrendansHouse_2F_Movement_1A0839 + waitmovement 0 + applymovement LAST_TALKED, LittlerootTown_BrendansHouse_2F_Movement_1A0833 + waitmovement 0 + applymovement LAST_TALKED, LittlerootTown_BrendansHouse_2F_Movement_1A0835 + waitmovement 0 msgbox LittlerootTown_BrendansHouse_2F_Text_1733AF, 4 - closebutton + closemessage compare FACING, 4 - callif 1, LittlerootTown_BrendansHouse_2F_EventScript_152B29 + call_if 1, LittlerootTown_BrendansHouse_2F_EventScript_152B29 compare FACING, 2 - callif 1, LittlerootTown_BrendansHouse_2F_EventScript_152B34 + call_if 1, LittlerootTown_BrendansHouse_2F_EventScript_152B34 compare FACING, 3 - callif 1, LittlerootTown_BrendansHouse_2F_EventScript_152B3F + call_if 1, LittlerootTown_BrendansHouse_2F_EventScript_152B3F return LittlerootTown_BrendansHouse_2F_EventScript_152B29:: @ 8152B29 - move LAST_TALKED, LittlerootTown_BrendansHouse_2F_Movement_152C11 - waitmove 0 + applymovement LAST_TALKED, LittlerootTown_BrendansHouse_2F_Movement_152C11 + waitmovement 0 return LittlerootTown_BrendansHouse_2F_EventScript_152B34:: @ 8152B34 - move LAST_TALKED, LittlerootTown_BrendansHouse_2F_Movement_152C1C - waitmove 0 + applymovement LAST_TALKED, LittlerootTown_BrendansHouse_2F_Movement_152C1C + waitmovement 0 return LittlerootTown_BrendansHouse_2F_EventScript_152B3F:: @ 8152B3F - move LAST_TALKED, LittlerootTown_BrendansHouse_2F_Movement_152C1C - waitmove 0 + applymovement LAST_TALKED, LittlerootTown_BrendansHouse_2F_Movement_152C1C + waitmovement 0 return LittlerootTown_BrendansHouse_2F_EventScript_152B4A:: @ 8152B4A msgbox LittlerootTown_BrendansHouse_2F_Text_1735C9, 4 - playmusic 421, 1 - move LAST_TALKED, LittlerootTown_BrendansHouse_2F_Movement_1A0839 - waitmove 0 - move LAST_TALKED, LittlerootTown_BrendansHouse_2F_Movement_1A0833 - waitmove 0 - move LAST_TALKED, LittlerootTown_BrendansHouse_2F_Movement_1A0835 - waitmove 0 + playbgm 421, 1 + applymovement LAST_TALKED, LittlerootTown_BrendansHouse_2F_Movement_1A0839 + waitmovement 0 + applymovement LAST_TALKED, LittlerootTown_BrendansHouse_2F_Movement_1A0833 + waitmovement 0 + applymovement LAST_TALKED, LittlerootTown_BrendansHouse_2F_Movement_1A0835 + waitmovement 0 msgbox LittlerootTown_BrendansHouse_2F_Text_1735FC, 4 - closebutton + closemessage compare FACING, 4 - callif 1, LittlerootTown_BrendansHouse_2F_EventScript_152B9F + call_if 1, LittlerootTown_BrendansHouse_2F_EventScript_152B9F compare FACING, 2 - callif 1, LittlerootTown_BrendansHouse_2F_EventScript_152B9F + call_if 1, LittlerootTown_BrendansHouse_2F_EventScript_152B9F compare FACING, 3 - callif 1, LittlerootTown_BrendansHouse_2F_EventScript_152BAA + call_if 1, LittlerootTown_BrendansHouse_2F_EventScript_152BAA return LittlerootTown_BrendansHouse_2F_EventScript_152B9F:: @ 8152B9F - move LAST_TALKED, LittlerootTown_BrendansHouse_2F_Movement_152C30 - waitmove 0 + applymovement LAST_TALKED, LittlerootTown_BrendansHouse_2F_Movement_152C30 + waitmovement 0 return LittlerootTown_BrendansHouse_2F_EventScript_152BAA:: @ 8152BAA - move LAST_TALKED, LittlerootTown_BrendansHouse_2F_Movement_152C25 - waitmove 0 + applymovement LAST_TALKED, LittlerootTown_BrendansHouse_2F_Movement_152C25 + waitmovement 0 return LittlerootTown_BrendansHouse_2F_EventScript_152BB5:: @ 8152BB5 - move LAST_TALKED, LittlerootTown_BrendansHouse_2F_Movement_1A0839 - waitmove 0 - checkgender + applymovement LAST_TALKED, LittlerootTown_BrendansHouse_2F_Movement_1A0839 + waitmovement 0 + checkplayergender compare RESULT, 0 - callif 1, LittlerootTown_BrendansHouse_2F_EventScript_152BDB + call_if 1, LittlerootTown_BrendansHouse_2F_EventScript_152BDB compare RESULT, 1 - callif 1, LittlerootTown_BrendansHouse_2F_EventScript_152BED + call_if 1, LittlerootTown_BrendansHouse_2F_EventScript_152BED setflag 293 releaseall end LittlerootTown_BrendansHouse_2F_EventScript_152BDB:: @ 8152BDB checkflag 293 - jumpeq LittlerootTown_BrendansHouse_2F_EventScript_152BFF + goto_if_eq LittlerootTown_BrendansHouse_2F_EventScript_152BFF msgbox LittlerootTown_BrendansHouse_2F_Text_1737AE, 4 return LittlerootTown_BrendansHouse_2F_EventScript_152BED:: @ 8152BED checkflag 293 - jumpeq LittlerootTown_BrendansHouse_2F_EventScript_152C08 + goto_if_eq LittlerootTown_BrendansHouse_2F_EventScript_152C08 msgbox LittlerootTown_BrendansHouse_2F_Text_1738F2, 4 return @@ -193,11 +193,11 @@ gUnknown_08152C39:: @ 8152C39 LittlerootTown_MaysHouse_2F_EventScript_152C39:: @ 8152C39 lockall - checkgender + checkplayergender compare RESULT, 0 - jumpeq LittlerootTown_MaysHouse_2F_EventScript_152C52 + goto_if_eq LittlerootTown_MaysHouse_2F_EventScript_152C52 compare RESULT, 1 - jumpeq LittlerootTown_MaysHouse_2F_EventScript_152C5C + goto_if_eq LittlerootTown_MaysHouse_2F_EventScript_152C5C end LittlerootTown_MaysHouse_2F_EventScript_152C52:: @ 8152C52 @@ -208,7 +208,7 @@ LittlerootTown_MaysHouse_2F_EventScript_152C52:: @ 8152C52 LittlerootTown_MaysHouse_2F_EventScript_152C5C:: @ 8152C5C setvar 0x8004, 2 special DoPCTurnOnEffect - playsfx SE_PC_ON + playse SE_PC_ON msgbox LittlerootTown_MaysHouse_2F_Text_1A10D6, 4 special BedroomPC waitstate @@ -217,7 +217,7 @@ LittlerootTown_MaysHouse_2F_EventScript_152C5C:: @ 8152C5C gMayHouse_TurnPCOff:: @ 8152C75 setvar 0x8004, 2 - playsfx SE_PC_OFF + playse SE_PC_OFF special DoPCTurnOffEffect releaseall end diff --git a/data/scripts/maps/LittlerootTown_ProfessorBirchsLab.inc b/data/scripts/maps/LittlerootTown_ProfessorBirchsLab.inc index 94aeadfa6..e7ccd73f6 100644 --- a/data/scripts/maps/LittlerootTown_ProfessorBirchsLab.inc +++ b/data/scripts/maps/LittlerootTown_ProfessorBirchsLab.inc @@ -14,7 +14,7 @@ LittlerootTown_ProfessorBirchsLab_MapScript2_152C9D:: @ 8152C9D .2byte 0 LittlerootTown_ProfessorBirchsLab_EventScript_152CA7:: @ 8152CA7 - spriteface 255, 2 + turnobject 255, 2 end LittlerootTown_ProfessorBirchsLab_MapScript2_152CAC:: @ 8152CAC @@ -24,30 +24,30 @@ LittlerootTown_ProfessorBirchsLab_MapScript2_152CAC:: @ 8152CAC LittlerootTown_ProfessorBirchsLab_EventScript_152CBE:: @ 8152CBE lockall - bufferfirstpoke 0 + getfirstpartypokename 0 message LittlerootTown_ProfessorBirchsLab_Text_173D94 - waittext - fanfare 370 + waitmessage + playfanfare 370 waitfanfare msgbox LittlerootTown_ProfessorBirchsLab_Text_173EF8, 5 compare RESULT, 1 - jumpeq LittlerootTown_ProfessorBirchsLab_EventScript_152CEA + goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_152CEA compare RESULT, 0 - jumpeq LittlerootTown_ProfessorBirchsLab_EventScript_152CFA + goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_152CFA end LittlerootTown_ProfessorBirchsLab_EventScript_152CEA:: @ 8152CEA setvar 0x8004, 0 call LittlerootTown_ProfessorBirchsLab_EventScript_1A0678 - jump LittlerootTown_ProfessorBirchsLab_EventScript_152CFA + goto LittlerootTown_ProfessorBirchsLab_EventScript_152CFA end LittlerootTown_ProfessorBirchsLab_EventScript_152CFA:: @ 8152CFA msgbox LittlerootTown_ProfessorBirchsLab_Text_173F3D, 5 compare RESULT, 1 - jumpeq LittlerootTown_ProfessorBirchsLab_EventScript_152D19 + goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_152D19 compare RESULT, 0 - jumpeq LittlerootTown_ProfessorBirchsLab_EventScript_152D2B + goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_152D2B end LittlerootTown_ProfessorBirchsLab_EventScript_152D19:: @ 8152D19 @@ -60,16 +60,16 @@ LittlerootTown_ProfessorBirchsLab_EventScript_152D19:: @ 8152D19 LittlerootTown_ProfessorBirchsLab_EventScript_152D2B:: @ 8152D2B msgbox LittlerootTown_ProfessorBirchsLab_Text_174075, 5 compare RESULT, 1 - jumpeq LittlerootTown_ProfessorBirchsLab_EventScript_152D19 + goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_152D19 compare RESULT, 0 - jumpeq LittlerootTown_ProfessorBirchsLab_EventScript_152D2B + goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_152D2B end LittlerootTown_ProfessorBirchsLab_EventScript_152D4A:: @ 8152D4A lockall - move 255, LittlerootTown_ProfessorBirchsLab_Movement_152D5B - waitmove 0 - jump LittlerootTown_ProfessorBirchsLab_EventScript_152DBA + applymovement 255, LittlerootTown_ProfessorBirchsLab_Movement_152D5B + waitmovement 0 + goto LittlerootTown_ProfessorBirchsLab_EventScript_152DBA end LittlerootTown_ProfessorBirchsLab_Movement_152D5B:: @ 8152D5B @@ -86,9 +86,9 @@ LittlerootTown_ProfessorBirchsLab_EventScript_152D63:: @ 8152D63 lock faceplayer compare 0x4084, 3 - jumpif 4, LittlerootTown_ProfessorBirchsLab_EventScript_152D90 + goto_if 4, LittlerootTown_ProfessorBirchsLab_EventScript_152D90 checkflag 88 - jumpeq LittlerootTown_ProfessorBirchsLab_EventScript_152D86 + goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_152D86 msgbox LittlerootTown_ProfessorBirchsLab_Text_173B29, 4 setflag 88 release @@ -108,9 +108,9 @@ LittlerootTown_ProfessorBirchsLab_EventScript_152D9A:: @ 8152D9A lock faceplayer checkflag 896 - jumpif 0, LittlerootTown_ProfessorBirchsLab_EventScript_1A037F + goto_if 0, LittlerootTown_ProfessorBirchsLab_EventScript_1A037F compare 0x4084, 5 - jumpeq LittlerootTown_ProfessorBirchsLab_EventScript_152E7B + goto_if_eq LittlerootTown_ProfessorBirchsLab_EventScript_152E7B msgbox LittlerootTown_ProfessorBirchsLab_Text_1740B4, 4 release end @@ -119,15 +119,15 @@ LittlerootTown_ProfessorBirchsLab_EventScript_152DBA:: @ 8152DBA msgbox LittlerootTown_ProfessorBirchsLab_Text_17411F, 4 call LittlerootTown_ProfessorBirchsLab_EventScript_152E6D msgbox LittlerootTown_ProfessorBirchsLab_Text_174248, 4 - move 3, LittlerootTown_ProfessorBirchsLab_Movement_152E97 - waitmove 0 - move 255, LittlerootTown_ProfessorBirchsLab_Movement_1A0843 - waitmove 0 - checkgender + applymovement 3, LittlerootTown_ProfessorBirchsLab_Movement_152E97 + waitmovement 0 + applymovement 255, LittlerootTown_ProfessorBirchsLab_Movement_1A0843 + waitmovement 0 + checkplayergender compare RESULT, 0 - callif 1, LittlerootTown_ProfessorBirchsLab_EventScript_152E13 + call_if 1, LittlerootTown_ProfessorBirchsLab_EventScript_152E13 compare RESULT, 1 - callif 1, LittlerootTown_ProfessorBirchsLab_EventScript_152E40 + call_if 1, LittlerootTown_ProfessorBirchsLab_EventScript_152E40 setvar 0x4084, 5 setflag 116 setvar 0x4051, 1 @@ -140,7 +140,7 @@ LittlerootTown_ProfessorBirchsLab_EventScript_152E13:: @ 8152E13 msgbox LittlerootTown_ProfessorBirchsLab_Text_1743D4, 4 giveitem ITEM_POKE_BALL, 5 compare RESULT, 0 - callif 1, LittlerootTown_ProfessorBirchsLab_EventScript_152E85 + call_if 1, LittlerootTown_ProfessorBirchsLab_EventScript_152E85 msgbox LittlerootTown_ProfessorBirchsLab_Text_17443D, 4 setvar RESULT, 0 return @@ -149,16 +149,16 @@ LittlerootTown_ProfessorBirchsLab_EventScript_152E40:: @ 8152E40 msgbox LittlerootTown_ProfessorBirchsLab_Text_17453C, 4 giveitem ITEM_POKE_BALL, 5 compare RESULT, 0 - callif 1, LittlerootTown_ProfessorBirchsLab_EventScript_152E8E + call_if 1, LittlerootTown_ProfessorBirchsLab_EventScript_152E8E msgbox LittlerootTown_ProfessorBirchsLab_Text_17458C, 4 setvar RESULT, 1 return LittlerootTown_ProfessorBirchsLab_EventScript_152E6D:: @ 8152E6D - fanfare 370 + playfanfare 370 message LittlerootTown_ProfessorBirchsLab_Text_17422F waitfanfare - waittext + waitmessage setflag 2049 return @@ -187,11 +187,11 @@ LittlerootTown_ProfessorBirchsLab_EventScript_152E9A:: @ 8152E9A LittlerootTown_ProfessorBirchsLab_EventScript_152EA3:: @ 8152EA3 lock faceplayer - checkgender + checkplayergender compare RESULT, 0 - callif 1, LittlerootTown_ProfessorBirchsLab_EventScript_152EBE + call_if 1, LittlerootTown_ProfessorBirchsLab_EventScript_152EBE compare RESULT, 1 - callif 1, LittlerootTown_ProfessorBirchsLab_EventScript_152EC7 + call_if 1, LittlerootTown_ProfessorBirchsLab_EventScript_152EC7 release end diff --git a/data/scripts/maps/MagmaHideout_B1F.inc b/data/scripts/maps/MagmaHideout_B1F.inc index 0304181fb..780eea4f5 100644 --- a/data/scripts/maps/MagmaHideout_B1F.inc +++ b/data/scripts/maps/MagmaHideout_B1F.inc @@ -4,9 +4,9 @@ MagmaHideout_B1F_MapScripts:: @ 815F2A8 MagmaHideout_B1F_MapScript1_15F2AE:: @ 815F2AE checkflag 2145 - callif 1, MagmaHideout_B1F_EventScript_15F2B8 + call_if 1, MagmaHideout_B1F_EventScript_15F2B8 end MagmaHideout_B1F_EventScript_15F2B8:: @ 815F2B8 - disappear LAST_TALKED + removeobject LAST_TALKED return diff --git a/data/scripts/maps/MauvilleCity.inc b/data/scripts/maps/MauvilleCity.inc index 1b2827f2a..5c93aa252 100644 --- a/data/scripts/maps/MauvilleCity.inc +++ b/data/scripts/maps/MauvilleCity.inc @@ -9,7 +9,7 @@ MauvilleCity_MapScript1_14C038:: @ 814C038 clearflag 99 setvar 0x4093, 0 checkflag 209 - callif 1, MauvilleCity_EventScript_14C053 + call_if 1, MauvilleCity_EventScript_14C053 end MauvilleCity_EventScript_14C053:: @ 814C053 @@ -53,7 +53,7 @@ MauvilleCity_EventScript_14C0A2:: @ 814C0A2 lock faceplayer checkflag 98 - jumpeq MauvilleCity_EventScript_14C0BA + goto_if_eq MauvilleCity_EventScript_14C0BA msgbox MauvilleCity_Text_16674A, 4 setflag 98 release @@ -68,94 +68,94 @@ MauvilleCity_EventScript_14C0C4:: @ 814C0C4 lock faceplayer checkflag 284 - jumpeq MauvilleCity_EventScript_14C0E4 + goto_if_eq MauvilleCity_EventScript_14C0E4 msgbox MauvilleCity_Text_165B76, 4 - closebutton - move 7, MauvilleCity_Movement_1A083D - waitmove 0 + closemessage + applymovement 7, MauvilleCity_Movement_1A083D + waitmovement 0 release end MauvilleCity_EventScript_14C0E4:: @ 814C0E4 msgbox MauvilleCity_Text_165E45, 4 - closebutton - move 7, MauvilleCity_Movement_1A083D - waitmove 0 + closemessage + applymovement 7, MauvilleCity_Movement_1A083D + waitmovement 0 release end MauvilleCity_EventScript_14C0F9:: @ 814C0F9 lockall checkflag 284 - jumpeq MauvilleCity_EventScript_14C292 - move 6, MauvilleCity_Movement_1A0843 - waitmove 0 + goto_if_eq MauvilleCity_EventScript_14C292 + applymovement 6, MauvilleCity_Movement_1A0843 + waitmovement 0 msgbox MauvilleCity_Text_165BE3, 4 msgbox MauvilleCity_Text_165C57, 4 msgbox MauvilleCity_Text_165D01, 4 - move 6, MauvilleCity_Movement_1A0839 - waitmove 0 - playsfx 21 - move 6, MauvilleCity_Movement_1A0833 - waitmove 0 - move 6, MauvilleCity_Movement_1A0835 - waitmove 0 + applymovement 6, MauvilleCity_Movement_1A0839 + waitmovement 0 + playse 21 + applymovement 6, MauvilleCity_Movement_1A0833 + waitmovement 0 + applymovement 6, MauvilleCity_Movement_1A0835 + waitmovement 0 msgbox MauvilleCity_Text_165D50, 5 - jump MauvilleCity_EventScript_14C154 + goto MauvilleCity_EventScript_14C154 end MauvilleCity_EventScript_14C154:: @ 814C154 compare RESULT, 1 - callif 1, MauvilleCity_EventScript_14C23C + call_if 1, MauvilleCity_EventScript_14C23C compare RESULT, 0 - jumpeq MauvilleCity_EventScript_14C285 - closebutton + goto_if_eq MauvilleCity_EventScript_14C285 + closemessage switch FACING case 2, MauvilleCity_EventScript_14C187 case 4, MauvilleCity_EventScript_14C1D9 end MauvilleCity_EventScript_14C187:: @ 814C187 - move 6, MauvilleCity_Movement_14C2AA - move 7, MauvilleCity_Movement_14C2CC - waitmove 0 - move 6, MauvilleCity_Movement_1A0843 - waitmove 0 - pause 30 - move 7, MauvilleCity_Movement_14C2D8 - waitmove 0 - move 255, MauvilleCity_Movement_1A0845 - waitmove 0 + applymovement 6, MauvilleCity_Movement_14C2AA + applymovement 7, MauvilleCity_Movement_14C2CC + waitmovement 0 + applymovement 6, MauvilleCity_Movement_1A0843 + waitmovement 0 + delay 30 + applymovement 7, MauvilleCity_Movement_14C2D8 + waitmovement 0 + applymovement 255, MauvilleCity_Movement_1A0845 + waitmovement 0 msgbox MauvilleCity_Text_1660FA, 4 - closebutton - move 6, MauvilleCity_Movement_14C2B6 - move 7, MauvilleCity_Movement_14C2DF - waitmove 0 - jump MauvilleCity_EventScript_14C22B + closemessage + applymovement 6, MauvilleCity_Movement_14C2B6 + applymovement 7, MauvilleCity_Movement_14C2DF + waitmovement 0 + goto MauvilleCity_EventScript_14C22B end MauvilleCity_EventScript_14C1D9:: @ 814C1D9 - move 6, MauvilleCity_Movement_14C2B0 - move 7, MauvilleCity_Movement_14C2D2 - waitmove 0 - move 6, MauvilleCity_Movement_1A0843 - waitmove 0 - pause 30 - move 7, MauvilleCity_Movement_14C2DC - waitmove 0 - move 255, MauvilleCity_Movement_1A0845 - waitmove 0 + applymovement 6, MauvilleCity_Movement_14C2B0 + applymovement 7, MauvilleCity_Movement_14C2D2 + waitmovement 0 + applymovement 6, MauvilleCity_Movement_1A0843 + waitmovement 0 + delay 30 + applymovement 7, MauvilleCity_Movement_14C2DC + waitmovement 0 + applymovement 255, MauvilleCity_Movement_1A0845 + waitmovement 0 msgbox MauvilleCity_Text_1660FA, 4 - closebutton - move 6, MauvilleCity_Movement_14C2C1 - move 7, MauvilleCity_Movement_14C2E8 - waitmove 0 - jump MauvilleCity_EventScript_14C22B + closemessage + applymovement 6, MauvilleCity_Movement_14C2C1 + applymovement 7, MauvilleCity_Movement_14C2E8 + waitmovement 0 + goto MauvilleCity_EventScript_14C22B end MauvilleCity_EventScript_14C22B:: @ 814C22B - disappear 6 - disappear 7 + removeobject 6 + removeobject 7 clearflag 806 clearflag 809 setflag 190 @@ -165,14 +165,14 @@ MauvilleCity_EventScript_14C22B:: @ 814C22B MauvilleCity_EventScript_14C23C:: @ 814C23C msgbox MauvilleCity_Text_165F0D, 4 trainerbattle 3, OPPONENT_WALLY_2, 0, MauvilleCity_Text_165F38 - move 6, MauvilleCity_Movement_1A0843 - waitmove 0 + applymovement 6, MauvilleCity_Movement_1A0843 + waitmovement 0 msgbox MauvilleCity_Text_165F85, 4 - move 6, MauvilleCity_Movement_1A0839 - waitmove 0 + applymovement 6, MauvilleCity_Movement_1A0839 + waitmovement 0 msgbox MauvilleCity_Text_165FB3, 4 - move 6, MauvilleCity_Movement_1A0843 - waitmove 0 + applymovement 6, MauvilleCity_Movement_1A0843 + waitmovement 0 msgbox MauvilleCity_Text_166050, 4 return @@ -183,10 +183,10 @@ MauvilleCity_EventScript_14C285:: @ 814C285 end MauvilleCity_EventScript_14C292:: @ 814C292 - move 6, MauvilleCity_Movement_1A0839 - waitmove 0 + applymovement 6, MauvilleCity_Movement_1A0839 + waitmovement 0 msgbox MauvilleCity_Text_165EE2, 5 - jump MauvilleCity_EventScript_14C154 + goto MauvilleCity_EventScript_14C154 end MauvilleCity_Movement_14C2AA:: @ 814C2AA @@ -285,11 +285,11 @@ MauvilleCity_EventScript_14C2F2:: @ 814C2F2 lock faceplayer checkflag 209 - jumpeq MauvilleCity_EventScript_14C368 + goto_if_eq MauvilleCity_EventScript_14C368 compare 0x40ba, 2 - jumpeq MauvilleCity_EventScript_14C33C + goto_if_eq MauvilleCity_EventScript_14C33C checkflag 208 - jumpeq MauvilleCity_EventScript_14C332 + goto_if_eq MauvilleCity_EventScript_14C332 msgbox MauvilleCity_Text_1661C1, 4 giveitem ITEM_BASEMENT_KEY setflag 208 @@ -306,7 +306,7 @@ MauvilleCity_EventScript_14C33C:: @ 814C33C msgbox MauvilleCity_Text_1663EB, 4 giveitem ITEM_TM24 compare RESULT, 0 - jumpeq MauvilleCity_EventScript_1A029B + goto_if_eq MauvilleCity_EventScript_1A029B setflag 209 msgbox MauvilleCity_Text_166488, 4 release diff --git a/data/scripts/maps/MauvilleCity_BikeShop.inc b/data/scripts/maps/MauvilleCity_BikeShop.inc index 5436bf38a..a93ff5170 100644 --- a/data/scripts/maps/MauvilleCity_BikeShop.inc +++ b/data/scripts/maps/MauvilleCity_BikeShop.inc @@ -5,28 +5,28 @@ MauvilleCity_BikeShop_EventScript_156796:: @ 8156796 lock faceplayer checkflag 90 - jumpeq MauvilleCity_BikeShop_EventScript_15686E + goto_if_eq MauvilleCity_BikeShop_EventScript_15686E checkflag 89 - jumpeq MauvilleCity_BikeShop_EventScript_1567D1 + goto_if_eq MauvilleCity_BikeShop_EventScript_1567D1 msgbox MauvilleCity_BikeShop_Text_180F9F, 4 msgbox MauvilleCity_BikeShop_Text_181016, 5 compare RESULT, 1 - jumpeq MauvilleCity_BikeShop_EventScript_156824 + goto_if_eq MauvilleCity_BikeShop_EventScript_156824 compare RESULT, 0 - jumpeq MauvilleCity_BikeShop_EventScript_156817 + goto_if_eq MauvilleCity_BikeShop_EventScript_156817 end MauvilleCity_BikeShop_EventScript_1567D1:: @ 81567D1 msgbox MauvilleCity_BikeShop_Text_181016, 5 compare RESULT, 1 - jumpeq MauvilleCity_BikeShop_EventScript_156824 + goto_if_eq MauvilleCity_BikeShop_EventScript_156824 compare RESULT, 0 - jumpeq MauvilleCity_BikeShop_EventScript_156817 + goto_if_eq MauvilleCity_BikeShop_EventScript_156817 end MauvilleCity_BikeShop_EventScript_1567F0:: @ 81567F0 message MauvilleCity_BikeShop_Text_1810B1 - waittext + waitmessage multichoice 21, 8, 12, 1 switch RESULT case 0, MauvilleCity_BikeShop_EventScript_15682D @@ -41,19 +41,19 @@ MauvilleCity_BikeShop_EventScript_156817:: @ 8156817 MauvilleCity_BikeShop_EventScript_156824:: @ 8156824 setflag 90 - jump MauvilleCity_BikeShop_EventScript_1567F0 + goto MauvilleCity_BikeShop_EventScript_1567F0 end MauvilleCity_BikeShop_EventScript_15682D:: @ 815682D msgbox MauvilleCity_BikeShop_Text_181332, 4 giveitem ITEM_MACH_BIKE - jump MauvilleCity_BikeShop_EventScript_156861 + goto MauvilleCity_BikeShop_EventScript_156861 end MauvilleCity_BikeShop_EventScript_156847:: @ 8156847 msgbox MauvilleCity_BikeShop_Text_18134A, 4 giveitem ITEM_ACRO_BIKE - jump MauvilleCity_BikeShop_EventScript_156861 + goto MauvilleCity_BikeShop_EventScript_156861 end MauvilleCity_BikeShop_EventScript_156861:: @ 8156861 @@ -65,19 +65,19 @@ MauvilleCity_BikeShop_EventScript_156861:: @ 8156861 MauvilleCity_BikeShop_EventScript_15686E:: @ 815686E msgbox MauvilleCity_BikeShop_Text_1813A0, 5 compare RESULT, 1 - jumpeq MauvilleCity_BikeShop_EventScript_15688D + goto_if_eq MauvilleCity_BikeShop_EventScript_15688D compare RESULT, 0 - jumpeq MauvilleCity_BikeShop_EventScript_1568BF + goto_if_eq MauvilleCity_BikeShop_EventScript_1568BF end MauvilleCity_BikeShop_EventScript_15688D:: @ 815688D msgbox MauvilleCity_BikeShop_Text_1813D4, 4 checkitem ITEM_ACRO_BIKE, 1 compare RESULT, 1 - jumpeq MauvilleCity_BikeShop_EventScript_1568C9 + goto_if_eq MauvilleCity_BikeShop_EventScript_1568C9 checkitem ITEM_MACH_BIKE, 1 compare RESULT, 1 - jumpeq MauvilleCity_BikeShop_EventScript_1568EA + goto_if_eq MauvilleCity_BikeShop_EventScript_1568EA msgbox MauvilleCity_BikeShop_Text_181498, 4 release end @@ -88,19 +88,19 @@ MauvilleCity_BikeShop_EventScript_1568BF:: @ 81568BF end MauvilleCity_BikeShop_EventScript_1568C9:: @ 81568C9 - inccounter GAME_STAT_TRADED_BIKES + incrementgamestat GAME_STAT_TRADED_BIKES msgbox MauvilleCity_BikeShop_Text_181439, 4 removeitem ITEM_ACRO_BIKE, 1 giveitem ITEM_MACH_BIKE - jump MauvilleCity_BikeShop_EventScript_156861 + goto MauvilleCity_BikeShop_EventScript_156861 end MauvilleCity_BikeShop_EventScript_1568EA:: @ 81568EA - inccounter GAME_STAT_TRADED_BIKES + incrementgamestat GAME_STAT_TRADED_BIKES msgbox MauvilleCity_BikeShop_Text_181408, 4 removeitem ITEM_MACH_BIKE, 1 giveitem ITEM_ACRO_BIKE - jump MauvilleCity_BikeShop_EventScript_156861 + goto MauvilleCity_BikeShop_EventScript_156861 end MauvilleCity_BikeShop_EventScript_15690B:: @ 815690B @@ -109,8 +109,8 @@ MauvilleCity_BikeShop_EventScript_15690B:: @ 815690B MauvilleCity_BikeShop_EventScript_156914:: @ 8156914 message MauvilleCity_BikeShop_Text_1815EA - waittext - jump MauvilleCity_BikeShop_EventScript_156920 + waitmessage + goto MauvilleCity_BikeShop_EventScript_156920 end MauvilleCity_BikeShop_EventScript_156920:: @ 8156920 @@ -125,20 +125,20 @@ MauvilleCity_BikeShop_EventScript_156920:: @ 8156920 MauvilleCity_BikeShop_EventScript_156962:: @ 8156962 message MauvilleCity_BikeShop_Text_18162C - waittext - jump MauvilleCity_BikeShop_EventScript_156920 + waitmessage + goto MauvilleCity_BikeShop_EventScript_156920 end MauvilleCity_BikeShop_EventScript_15696E:: @ 815696E message MauvilleCity_BikeShop_Text_1816F5 - waittext - jump MauvilleCity_BikeShop_EventScript_156920 + waitmessage + goto MauvilleCity_BikeShop_EventScript_156920 end MauvilleCity_BikeShop_EventScript_15697A:: @ 815697A message MauvilleCity_BikeShop_Text_1817BF - waittext - jump MauvilleCity_BikeShop_EventScript_156920 + waitmessage + goto MauvilleCity_BikeShop_EventScript_156920 end MauvilleCity_BikeShop_EventScript_156986:: @ 8156986 @@ -147,8 +147,8 @@ MauvilleCity_BikeShop_EventScript_156986:: @ 8156986 MauvilleCity_BikeShop_EventScript_156988:: @ 8156988 message MauvilleCity_BikeShop_Text_181892 - waittext - jump MauvilleCity_BikeShop_EventScript_156994 + waitmessage + goto MauvilleCity_BikeShop_EventScript_156994 end MauvilleCity_BikeShop_EventScript_156994:: @ 8156994 @@ -163,20 +163,20 @@ MauvilleCity_BikeShop_EventScript_156994:: @ 8156994 MauvilleCity_BikeShop_EventScript_1569D6:: @ 81569D6 message MauvilleCity_BikeShop_Text_1818D4 - waittext - jump MauvilleCity_BikeShop_EventScript_156994 + waitmessage + goto MauvilleCity_BikeShop_EventScript_156994 end MauvilleCity_BikeShop_EventScript_1569E2:: @ 81569E2 message MauvilleCity_BikeShop_Text_18199A - waittext - jump MauvilleCity_BikeShop_EventScript_156994 + waitmessage + goto MauvilleCity_BikeShop_EventScript_156994 end MauvilleCity_BikeShop_EventScript_1569EE:: @ 81569EE message MauvilleCity_BikeShop_Text_181A3D - waittext - jump MauvilleCity_BikeShop_EventScript_156994 + waitmessage + goto MauvilleCity_BikeShop_EventScript_156994 end MauvilleCity_BikeShop_EventScript_1569FA:: @ 81569FA diff --git a/data/scripts/maps/MauvilleCity_GameCorner.inc b/data/scripts/maps/MauvilleCity_GameCorner.inc index f20a7dacd..2e0231287 100644 --- a/data/scripts/maps/MauvilleCity_GameCorner.inc +++ b/data/scripts/maps/MauvilleCity_GameCorner.inc @@ -7,65 +7,65 @@ MauvilleCity_GameCorner_EventScript_156A34:: @ 8156A34 msgbox MauvilleCity_GameCorner_Text_181C35, 4 checkitem ITEM_COIN_CASE, 1 compare RESULT, 0 - jumpeq MauvilleCity_GameCorner_EventScript_156B32 + goto_if_eq MauvilleCity_GameCorner_EventScript_156B32 message MauvilleCity_GameCorner_Text_181CB4 - waittext - showmoney 0, 0 - snop - showcoins 0, 5 - jump MauvilleCity_GameCorner_EventScript_156A60 + waitmessage + showmoneybox 0, 0 + nop + showcoinsbox 0, 5 + goto MauvilleCity_GameCorner_EventScript_156A60 MauvilleCity_GameCorner_EventScript_156A60:: @ 8156A60 - multichoicedef 15, 0, 49, 0, 0 + multichoicedefault 15, 0, 49, 0, 0 switch RESULT case 0, MauvilleCity_GameCorner_EventScript_156AAE case 1, MauvilleCity_GameCorner_EventScript_156AF0 - jump MauvilleCity_GameCorner_EventScript_156B4C + goto MauvilleCity_GameCorner_EventScript_156B4C end @ 8156A87 - multichoicedef 15, 0, 49, 1, 0 + multichoicedefault 15, 0, 49, 1, 0 switch RESULT case 0, MauvilleCity_GameCorner_EventScript_156AAE case 1, MauvilleCity_GameCorner_EventScript_156AF0 - jump MauvilleCity_GameCorner_EventScript_156B4C + goto MauvilleCity_GameCorner_EventScript_156B4C end MauvilleCity_GameCorner_EventScript_156AAE:: @ 8156AAE checkcoins 16385 compare 0x4001, 9950 - jumpif 4, MauvilleCity_GameCorner_EventScript_156B5C + goto_if 4, MauvilleCity_GameCorner_EventScript_156B5C checkmoney 0x3e8, 0 compare RESULT, 0 - jumpeq MauvilleCity_GameCorner_EventScript_156B3C + goto_if_eq MauvilleCity_GameCorner_EventScript_156B3C givecoins 50 - paymoney 0x3e8, 0 - updatemoney 0, 0 - snop - updatecoins 0, 5 - playsfx 95 + takemoney 0x3e8, 0 + updatemoneybox 0, 0 + nop + updatecoinsbox 0, 5 + playse 95 msgbox MauvilleCity_GameCorner_Text_181CFE, 4 - hidemoney 0, 0 - hidecoins 0, 5 + hidemoneybox 0, 0 + hidecoinsbox 0, 5 release end MauvilleCity_GameCorner_EventScript_156AF0:: @ 8156AF0 checkcoins 16385 compare 0x4001, 9500 - jumpif 4, MauvilleCity_GameCorner_EventScript_156B5C + goto_if 4, MauvilleCity_GameCorner_EventScript_156B5C checkmoney 0x2710, 0 compare RESULT, 0 - jumpeq MauvilleCity_GameCorner_EventScript_156B3C + goto_if_eq MauvilleCity_GameCorner_EventScript_156B3C givecoins 500 - paymoney 0x2710, 0 - updatemoney 0, 0 - snop - updatecoins 0, 5 - playsfx 95 + takemoney 0x2710, 0 + updatemoneybox 0, 0 + nop + updatecoinsbox 0, 5 + playse 95 msgbox MauvilleCity_GameCorner_Text_181CFE, 4 - hidemoney 0, 0 - hidecoins 0, 5 + hidemoneybox 0, 0 + hidecoinsbox 0, 5 release end @@ -76,22 +76,22 @@ MauvilleCity_GameCorner_EventScript_156B32:: @ 8156B32 MauvilleCity_GameCorner_EventScript_156B3C:: @ 8156B3C msgbox MauvilleCity_GameCorner_Text_181D28, 4 - hidemoney 0, 0 - hidecoins 0, 5 + hidemoneybox 0, 0 + hidecoinsbox 0, 5 release end MauvilleCity_GameCorner_EventScript_156B4C:: @ 8156B4C msgbox MauvilleCity_GameCorner_Text_181D73, 4 - hidemoney 0, 0 - hidecoins 0, 5 + hidemoneybox 0, 0 + hidecoinsbox 0, 5 release end MauvilleCity_GameCorner_EventScript_156B5C:: @ 8156B5C msgbox MauvilleCity_GameCorner_Text_181D57, 4 - hidemoney 0, 0 - hidecoins 0, 5 + hidemoneybox 0, 0 + hidecoinsbox 0, 5 release end @@ -101,21 +101,21 @@ MauvilleCity_GameCorner_EventScript_156B6C:: @ 8156B6C msgbox MauvilleCity_GameCorner_Text_181DE1, 4 checkitem ITEM_COIN_CASE, 1 compare RESULT, 1 - jumpeq MauvilleCity_GameCorner_EventScript_156B88 + goto_if_eq MauvilleCity_GameCorner_EventScript_156B88 release end MauvilleCity_GameCorner_EventScript_156B88:: @ 8156B88 message MauvilleCity_GameCorner_Text_181E17 - waittext - showcoins 0, 0 + waitmessage + showcoinsbox 0, 0 setvar 0x4001, 0 - jump MauvilleCity_GameCorner_EventScript_156BA6 + goto MauvilleCity_GameCorner_EventScript_156BA6 MauvilleCity_GameCorner_EventScript_156B9B:: @ 8156B9B message MauvilleCity_GameCorner_Text_181E17 - waittext - jump MauvilleCity_GameCorner_EventScript_156BA6 + waitmessage + goto MauvilleCity_GameCorner_EventScript_156BA6 MauvilleCity_GameCorner_EventScript_156BA6:: @ 8156BA6 multichoice 12, 0, 48, 0 @@ -124,28 +124,28 @@ MauvilleCity_GameCorner_EventScript_156BA6:: @ 8156BA6 case 1, MauvilleCity_GameCorner_EventScript_156BF0 case 2, MauvilleCity_GameCorner_EventScript_156BFE case 3, MauvilleCity_GameCorner_EventScript_156D0D - jump MauvilleCity_GameCorner_EventScript_156D0D + goto MauvilleCity_GameCorner_EventScript_156D0D end MauvilleCity_GameCorner_EventScript_156BE2:: @ 8156BE2 setvar 0x4001, 1 - bufferdecor 0, 88 - jump MauvilleCity_GameCorner_EventScript_156C0C + getdecorname 0, 88 + goto MauvilleCity_GameCorner_EventScript_156C0C MauvilleCity_GameCorner_EventScript_156BF0:: @ 8156BF0 setvar 0x4001, 2 - bufferdecor 0, 89 - jump MauvilleCity_GameCorner_EventScript_156C0C + getdecorname 0, 89 + goto MauvilleCity_GameCorner_EventScript_156C0C MauvilleCity_GameCorner_EventScript_156BFE:: @ 8156BFE setvar 0x4001, 3 - bufferdecor 0, 90 - jump MauvilleCity_GameCorner_EventScript_156C0C + getdecorname 0, 90 + goto MauvilleCity_GameCorner_EventScript_156C0C MauvilleCity_GameCorner_EventScript_156C0C:: @ 8156C0C msgbox MauvilleCity_GameCorner_Text_181E33, 5 compare RESULT, 0 - jumpeq MauvilleCity_GameCorner_EventScript_156D0D + goto_if_eq MauvilleCity_GameCorner_EventScript_156D0D switch 0x4001 case 1, MauvilleCity_GameCorner_EventScript_156C46 case 2, MauvilleCity_GameCorner_EventScript_156C80 @@ -155,64 +155,64 @@ MauvilleCity_GameCorner_EventScript_156C0C:: @ 8156C0C MauvilleCity_GameCorner_EventScript_156C46:: @ 8156C46 checkcoins 16386 compare 0x4002, 1000 - jumpif 0, MauvilleCity_GameCorner_EventScript_156CF4 - bufferdecor 1, 88 + goto_if 0, MauvilleCity_GameCorner_EventScript_156CF4 + getdecorname 1, 88 checkdecor 88 compare RESULT, 0 - jumpeq MauvilleCity_GameCorner_EventScript_156D02 - removecoins 1000 + goto_if_eq MauvilleCity_GameCorner_EventScript_156D02 + takecoins 1000 adddecor 88 - updatecoins 0, 0 - playsfx 95 + updatecoinsbox 0, 0 + playse 95 msgbox MauvilleCity_GameCorner_Text_181E49, 4 - jump MauvilleCity_GameCorner_EventScript_156B9B + goto MauvilleCity_GameCorner_EventScript_156B9B end MauvilleCity_GameCorner_EventScript_156C80:: @ 8156C80 checkcoins 16386 compare 0x4002, 1000 - jumpif 0, MauvilleCity_GameCorner_EventScript_156CF4 - bufferdecor 1, 89 + goto_if 0, MauvilleCity_GameCorner_EventScript_156CF4 + getdecorname 1, 89 checkdecor 89 compare RESULT, 0 - jumpeq MauvilleCity_GameCorner_EventScript_156D02 - removecoins 1000 + goto_if_eq MauvilleCity_GameCorner_EventScript_156D02 + takecoins 1000 adddecor 89 - updatecoins 0, 0 - playsfx 95 + updatecoinsbox 0, 0 + playse 95 msgbox MauvilleCity_GameCorner_Text_181E49, 4 - jump MauvilleCity_GameCorner_EventScript_156B9B + goto MauvilleCity_GameCorner_EventScript_156B9B end MauvilleCity_GameCorner_EventScript_156CBA:: @ 8156CBA checkcoins 16386 compare 0x4002, 1000 - jumpif 0, MauvilleCity_GameCorner_EventScript_156CF4 - bufferdecor 1, 90 + goto_if 0, MauvilleCity_GameCorner_EventScript_156CF4 + getdecorname 1, 90 checkdecor 90 compare RESULT, 0 - jumpeq MauvilleCity_GameCorner_EventScript_156D02 - removecoins 1000 + goto_if_eq MauvilleCity_GameCorner_EventScript_156D02 + takecoins 1000 adddecor 90 - updatecoins 0, 0 - playsfx 95 + updatecoinsbox 0, 0 + playse 95 msgbox MauvilleCity_GameCorner_Text_181E49, 4 - jump MauvilleCity_GameCorner_EventScript_156B9B + goto MauvilleCity_GameCorner_EventScript_156B9B end MauvilleCity_GameCorner_EventScript_156CF4:: @ 8156CF4 msgbox MauvilleCity_GameCorner_Text_181E76, 4 - jump MauvilleCity_GameCorner_EventScript_156B9B + goto MauvilleCity_GameCorner_EventScript_156B9B end MauvilleCity_GameCorner_EventScript_156D02:: @ 8156D02 call MauvilleCity_GameCorner_EventScript_1A02B8 - jump MauvilleCity_GameCorner_EventScript_156B9B + goto MauvilleCity_GameCorner_EventScript_156B9B end MauvilleCity_GameCorner_EventScript_156D0D:: @ 8156D0D msgbox MauvilleCity_GameCorner_Text_181EC2, 4 - hidecoins 0, 0 + hidecoinsbox 0, 0 release end @@ -222,21 +222,21 @@ MauvilleCity_GameCorner_EventScript_156D1A:: @ 8156D1A msgbox MauvilleCity_GameCorner_Text_181DE1, 4 checkitem ITEM_COIN_CASE, 1 compare RESULT, 1 - jumpeq MauvilleCity_GameCorner_EventScript_156D36 + goto_if_eq MauvilleCity_GameCorner_EventScript_156D36 release end MauvilleCity_GameCorner_EventScript_156D36:: @ 8156D36 message MauvilleCity_GameCorner_Text_181E17 - waittext - showcoins 0, 0 + waitmessage + showcoinsbox 0, 0 setvar 0x4001, 0 - jump MauvilleCity_GameCorner_EventScript_156D54 + goto MauvilleCity_GameCorner_EventScript_156D54 MauvilleCity_GameCorner_EventScript_156D49:: @ 8156D49 message MauvilleCity_GameCorner_Text_181E17 - waittext - jump MauvilleCity_GameCorner_EventScript_156D54 + waitmessage + goto MauvilleCity_GameCorner_EventScript_156D54 MauvilleCity_GameCorner_EventScript_156D54:: @ 8156D54 multichoice 12, 0, 55, 0 @@ -247,38 +247,38 @@ MauvilleCity_GameCorner_EventScript_156D54:: @ 8156D54 case 3, MauvilleCity_GameCorner_EventScript_156DD0 case 4, MauvilleCity_GameCorner_EventScript_156DDE case 5, MauvilleCity_GameCorner_EventScript_156F77 - jump MauvilleCity_GameCorner_EventScript_156F77 + goto MauvilleCity_GameCorner_EventScript_156F77 end MauvilleCity_GameCorner_EventScript_156DA6:: @ 8156DA6 setvar 0x4001, 1 - bufferitem 0, ITEM_TM32 - jump MauvilleCity_GameCorner_EventScript_156DEC + getitemname 0, ITEM_TM32 + goto MauvilleCity_GameCorner_EventScript_156DEC MauvilleCity_GameCorner_EventScript_156DB4:: @ 8156DB4 setvar 0x4001, 2 - bufferitem 0, ITEM_TM29 - jump MauvilleCity_GameCorner_EventScript_156DEC + getitemname 0, ITEM_TM29 + goto MauvilleCity_GameCorner_EventScript_156DEC MauvilleCity_GameCorner_EventScript_156DC2:: @ 8156DC2 setvar 0x4001, 3 - bufferitem 0, ITEM_TM35 - jump MauvilleCity_GameCorner_EventScript_156DEC + getitemname 0, ITEM_TM35 + goto MauvilleCity_GameCorner_EventScript_156DEC MauvilleCity_GameCorner_EventScript_156DD0:: @ 8156DD0 setvar 0x4001, 4 - bufferitem 0, ITEM_TM24 - jump MauvilleCity_GameCorner_EventScript_156DEC + getitemname 0, ITEM_TM24 + goto MauvilleCity_GameCorner_EventScript_156DEC MauvilleCity_GameCorner_EventScript_156DDE:: @ 8156DDE setvar 0x4001, 5 - bufferitem 0, ITEM_TM13 - jump MauvilleCity_GameCorner_EventScript_156DEC + getitemname 0, ITEM_TM13 + goto MauvilleCity_GameCorner_EventScript_156DEC MauvilleCity_GameCorner_EventScript_156DEC:: @ 8156DEC msgbox MauvilleCity_GameCorner_Text_181E33, 5 compare RESULT, 0 - jumpeq MauvilleCity_GameCorner_EventScript_156F77 + goto_if_eq MauvilleCity_GameCorner_EventScript_156F77 switch 0x4001 case 1, MauvilleCity_GameCorner_EventScript_156E3C case 2, MauvilleCity_GameCorner_EventScript_156E76 @@ -290,91 +290,91 @@ MauvilleCity_GameCorner_EventScript_156DEC:: @ 8156DEC MauvilleCity_GameCorner_EventScript_156E3C:: @ 8156E3C checkcoins 16386 compare 0x4002, 1500 - jumpif 0, MauvilleCity_GameCorner_EventScript_156F5E + goto_if 0, MauvilleCity_GameCorner_EventScript_156F5E checkitemspace ITEM_TM32, 1 compare RESULT, 0 - jumpeq MauvilleCity_GameCorner_EventScript_156F6C - removecoins 1500 + goto_if_eq MauvilleCity_GameCorner_EventScript_156F6C + takecoins 1500 additem ITEM_TM32, 1 - updatecoins 0, 0 - playsfx 95 + updatecoinsbox 0, 0 + playse 95 msgbox MauvilleCity_GameCorner_Text_181F08, 4 - jump MauvilleCity_GameCorner_EventScript_156D49 + goto MauvilleCity_GameCorner_EventScript_156D49 end MauvilleCity_GameCorner_EventScript_156E76:: @ 8156E76 checkcoins 16386 compare 0x4002, 3500 - jumpif 0, MauvilleCity_GameCorner_EventScript_156F5E + goto_if 0, MauvilleCity_GameCorner_EventScript_156F5E checkitemspace ITEM_TM29, 1 compare RESULT, 0 - jumpeq MauvilleCity_GameCorner_EventScript_156F6C - removecoins 3500 + goto_if_eq MauvilleCity_GameCorner_EventScript_156F6C + takecoins 3500 additem ITEM_TM29, 1 - updatecoins 0, 0 - playsfx 95 + updatecoinsbox 0, 0 + playse 95 msgbox MauvilleCity_GameCorner_Text_181F08, 4 - jump MauvilleCity_GameCorner_EventScript_156D49 + goto MauvilleCity_GameCorner_EventScript_156D49 end MauvilleCity_GameCorner_EventScript_156EB0:: @ 8156EB0 checkcoins 16386 compare 0x4002, 4000 - jumpif 0, MauvilleCity_GameCorner_EventScript_156F5E + goto_if 0, MauvilleCity_GameCorner_EventScript_156F5E checkitemspace ITEM_TM35, 1 compare RESULT, 0 - jumpeq MauvilleCity_GameCorner_EventScript_156F6C - removecoins 4000 + goto_if_eq MauvilleCity_GameCorner_EventScript_156F6C + takecoins 4000 additem ITEM_TM35, 1 - updatecoins 0, 0 - playsfx 95 + updatecoinsbox 0, 0 + playse 95 msgbox MauvilleCity_GameCorner_Text_181F08, 4 - jump MauvilleCity_GameCorner_EventScript_156D49 + goto MauvilleCity_GameCorner_EventScript_156D49 end MauvilleCity_GameCorner_EventScript_156EEA:: @ 8156EEA checkcoins 16386 compare 0x4002, 4000 - jumpif 0, MauvilleCity_GameCorner_EventScript_156F5E + goto_if 0, MauvilleCity_GameCorner_EventScript_156F5E checkitemspace ITEM_TM24, 1 compare RESULT, 0 - jumpeq MauvilleCity_GameCorner_EventScript_156F6C - removecoins 4000 + goto_if_eq MauvilleCity_GameCorner_EventScript_156F6C + takecoins 4000 additem ITEM_TM24, 1 - updatecoins 0, 0 - playsfx 95 + updatecoinsbox 0, 0 + playse 95 msgbox MauvilleCity_GameCorner_Text_181F08, 4 - jump MauvilleCity_GameCorner_EventScript_156D49 + goto MauvilleCity_GameCorner_EventScript_156D49 end MauvilleCity_GameCorner_EventScript_156F24:: @ 8156F24 checkcoins 16386 compare 0x4002, 4000 - jumpif 0, MauvilleCity_GameCorner_EventScript_156F5E + goto_if 0, MauvilleCity_GameCorner_EventScript_156F5E checkitemspace ITEM_TM13, 1 compare RESULT, 0 - jumpeq MauvilleCity_GameCorner_EventScript_156F6C - removecoins 4000 + goto_if_eq MauvilleCity_GameCorner_EventScript_156F6C + takecoins 4000 additem ITEM_TM13, 1 - updatecoins 0, 0 - playsfx 95 + updatecoinsbox 0, 0 + playse 95 msgbox MauvilleCity_GameCorner_Text_181F08, 4 - jump MauvilleCity_GameCorner_EventScript_156D49 + goto MauvilleCity_GameCorner_EventScript_156D49 end MauvilleCity_GameCorner_EventScript_156F5E:: @ 8156F5E msgbox MauvilleCity_GameCorner_Text_181E76, 4 - jump MauvilleCity_GameCorner_EventScript_156D49 + goto MauvilleCity_GameCorner_EventScript_156D49 end MauvilleCity_GameCorner_EventScript_156F6C:: @ 8156F6C call MauvilleCity_GameCorner_EventScript_1A02A5 - jump MauvilleCity_GameCorner_EventScript_156D49 + goto MauvilleCity_GameCorner_EventScript_156D49 end MauvilleCity_GameCorner_EventScript_156F77:: @ 8156F77 msgbox MauvilleCity_GameCorner_Text_181EC2, 4 - hidecoins 0, 0 + hidecoinsbox 0, 0 release end @@ -390,10 +390,10 @@ MauvilleCity_GameCorner_EventScript_156F96:: @ 8156F96 lock faceplayer checkflag 226 - jumpeq MauvilleCity_GameCorner_EventScript_157072 + goto_if_eq MauvilleCity_GameCorner_EventScript_157072 msgbox MauvilleCity_GameCorner_Text_181F3D, 5 compare RESULT, 0 - jumpeq MauvilleCity_GameCorner_EventScript_157068 + goto_if_eq MauvilleCity_GameCorner_EventScript_157068 switch 0x4023 case 0, MauvilleCity_GameCorner_EventScript_156FDB case 1, MauvilleCity_GameCorner_EventScript_157005 @@ -401,36 +401,36 @@ MauvilleCity_GameCorner_EventScript_156F96:: @ 8156F96 end MauvilleCity_GameCorner_EventScript_156FDB:: @ 8156FDB - bufferdecor 1, 88 + getdecorname 1, 88 checkdecor 88 compare RESULT, 0 - jumpeq MauvilleCity_GameCorner_EventScript_157059 + goto_if_eq MauvilleCity_GameCorner_EventScript_157059 msgbox MauvilleCity_GameCorner_Text_181F89, 4 givedecoration 88 setflag 226 - jump MauvilleCity_GameCorner_EventScript_157072 + goto MauvilleCity_GameCorner_EventScript_157072 end MauvilleCity_GameCorner_EventScript_157005:: @ 8157005 - bufferdecor 1, 89 + getdecorname 1, 89 checkdecor 89 compare RESULT, 0 - jumpeq MauvilleCity_GameCorner_EventScript_157059 + goto_if_eq MauvilleCity_GameCorner_EventScript_157059 msgbox MauvilleCity_GameCorner_Text_181F89, 4 givedecoration 89 setflag 226 - jump MauvilleCity_GameCorner_EventScript_157072 + goto MauvilleCity_GameCorner_EventScript_157072 end MauvilleCity_GameCorner_EventScript_15702F:: @ 815702F - bufferdecor 1, 90 + getdecorname 1, 90 checkdecor 90 compare RESULT, 0 - jumpeq MauvilleCity_GameCorner_EventScript_157059 + goto_if_eq MauvilleCity_GameCorner_EventScript_157059 msgbox MauvilleCity_GameCorner_Text_181F89, 4 givedecoration 90 setflag 226 - jump MauvilleCity_GameCorner_EventScript_157072 + goto MauvilleCity_GameCorner_EventScript_157072 end MauvilleCity_GameCorner_EventScript_157059:: @ 8157059 @@ -454,54 +454,54 @@ MauvilleCity_GameCorner_EventScript_15707C:: @ 815707C faceplayer checkitem ITEM_COIN_CASE, 1 compare RESULT, 1 - jumpeq MauvilleCity_GameCorner_EventScript_15709C + goto_if_eq MauvilleCity_GameCorner_EventScript_15709C msgbox MauvilleCity_GameCorner_Text_18201E, 4 - jump MauvilleCity_GameCorner_EventScript_157108 + goto MauvilleCity_GameCorner_EventScript_157108 end MauvilleCity_GameCorner_EventScript_15709C:: @ 815709C checkflag 225 - jumpeq MauvilleCity_GameCorner_EventScript_1570CA + goto_if_eq MauvilleCity_GameCorner_EventScript_1570CA checkcoins 16385 compare 0x4001, 1 - jumpif 4, MauvilleCity_GameCorner_EventScript_1570CA + goto_if 4, MauvilleCity_GameCorner_EventScript_1570CA setflag 225 givecoins 20 msgbox MauvilleCity_GameCorner_Text_18208E, 4 - playsfx 95 - jump MauvilleCity_GameCorner_EventScript_1570CA + playse 95 + goto MauvilleCity_GameCorner_EventScript_1570CA end MauvilleCity_GameCorner_EventScript_1570CA:: @ 81570CA msgbox MauvilleCity_GameCorner_Text_1820DD, 4 - jump MauvilleCity_GameCorner_EventScript_157108 + goto MauvilleCity_GameCorner_EventScript_157108 end MauvilleCity_GameCorner_EventScript_1570D8:: @ 81570D8 lock faceplayer msgbox MauvilleCity_GameCorner_Text_182120, 4 - jump MauvilleCity_GameCorner_EventScript_157108 + goto MauvilleCity_GameCorner_EventScript_157108 end MauvilleCity_GameCorner_EventScript_1570E8:: @ 81570E8 lock faceplayer msgbox MauvilleCity_GameCorner_Text_18217C, 4 - jump MauvilleCity_GameCorner_EventScript_157108 + goto MauvilleCity_GameCorner_EventScript_157108 end MauvilleCity_GameCorner_EventScript_1570F8:: @ 81570F8 lock faceplayer msgbox MauvilleCity_GameCorner_Text_182241, 4 - jump MauvilleCity_GameCorner_EventScript_157108 + goto MauvilleCity_GameCorner_EventScript_157108 end MauvilleCity_GameCorner_EventScript_157108:: @ 8157108 - closebutton - move LAST_TALKED, MauvilleCity_GameCorner_Movement_1A083D - waitmove 0 + closemessage + applymovement LAST_TALKED, MauvilleCity_GameCorner_Movement_1A083D + waitmovement 0 release end @@ -509,24 +509,24 @@ MauvilleCity_GameCorner_EventScript_157115:: @ 8157115 lock faceplayer msgbox MauvilleCity_GameCorner_Text_182272, 4 - jump MauvilleCity_GameCorner_EventScript_157108 + goto MauvilleCity_GameCorner_EventScript_157108 end MauvilleCity_GameCorner_EventScript_157125:: @ 8157125 lock faceplayer msgbox MauvilleCity_GameCorner_Text_1822F4, 4 - jump MauvilleCity_GameCorner_EventScript_157108 + goto MauvilleCity_GameCorner_EventScript_157108 end MauvilleCity_GameCorner_EventScript_157135:: @ 8157135 lockall checkitem ITEM_COIN_CASE, 1 compare RESULT, 0 - jumpeq MauvilleCity_GameCorner_EventScript_1572B5 + goto_if_eq MauvilleCity_GameCorner_EventScript_1572B5 setvar 0x8004, 0 - specialval RESULT, sub_810F424 - pokecasino RESULT + specialvar RESULT, sub_810F424 + playslotmachine RESULT releaseall end @@ -534,10 +534,10 @@ MauvilleCity_GameCorner_EventScript_157155:: @ 8157155 lockall checkitem ITEM_COIN_CASE, 1 compare RESULT, 0 - jumpeq MauvilleCity_GameCorner_EventScript_1572B5 + goto_if_eq MauvilleCity_GameCorner_EventScript_1572B5 setvar 0x8004, 1 - specialval RESULT, sub_810F424 - pokecasino RESULT + specialvar RESULT, sub_810F424 + playslotmachine RESULT releaseall end @@ -545,10 +545,10 @@ MauvilleCity_GameCorner_EventScript_157175:: @ 8157175 lockall checkitem ITEM_COIN_CASE, 1 compare RESULT, 0 - jumpeq MauvilleCity_GameCorner_EventScript_1572B5 + goto_if_eq MauvilleCity_GameCorner_EventScript_1572B5 setvar 0x8004, 2 - specialval RESULT, sub_810F424 - pokecasino RESULT + specialvar RESULT, sub_810F424 + playslotmachine RESULT releaseall end @@ -556,10 +556,10 @@ MauvilleCity_GameCorner_EventScript_157195:: @ 8157195 lockall checkitem ITEM_COIN_CASE, 1 compare RESULT, 0 - jumpeq MauvilleCity_GameCorner_EventScript_1572B5 + goto_if_eq MauvilleCity_GameCorner_EventScript_1572B5 setvar 0x8004, 3 - specialval RESULT, sub_810F424 - pokecasino RESULT + specialvar RESULT, sub_810F424 + playslotmachine RESULT releaseall end @@ -567,10 +567,10 @@ MauvilleCity_GameCorner_EventScript_1571B5:: @ 81571B5 lockall checkitem ITEM_COIN_CASE, 1 compare RESULT, 0 - jumpeq MauvilleCity_GameCorner_EventScript_1572B5 + goto_if_eq MauvilleCity_GameCorner_EventScript_1572B5 setvar 0x8004, 4 - specialval RESULT, sub_810F424 - pokecasino RESULT + specialvar RESULT, sub_810F424 + playslotmachine RESULT releaseall end @@ -578,10 +578,10 @@ MauvilleCity_GameCorner_EventScript_1571D5:: @ 81571D5 lockall checkitem ITEM_COIN_CASE, 1 compare RESULT, 0 - jumpeq MauvilleCity_GameCorner_EventScript_1572B5 + goto_if_eq MauvilleCity_GameCorner_EventScript_1572B5 setvar 0x8004, 5 - specialval RESULT, sub_810F424 - pokecasino RESULT + specialvar RESULT, sub_810F424 + playslotmachine RESULT releaseall end @@ -589,10 +589,10 @@ MauvilleCity_GameCorner_EventScript_1571F5:: @ 81571F5 lockall checkitem ITEM_COIN_CASE, 1 compare RESULT, 0 - jumpeq MauvilleCity_GameCorner_EventScript_1572B5 + goto_if_eq MauvilleCity_GameCorner_EventScript_1572B5 setvar 0x8004, 6 - specialval RESULT, sub_810F424 - pokecasino RESULT + specialvar RESULT, sub_810F424 + playslotmachine RESULT releaseall end @@ -600,10 +600,10 @@ MauvilleCity_GameCorner_EventScript_157215:: @ 8157215 lockall checkitem ITEM_COIN_CASE, 1 compare RESULT, 0 - jumpeq MauvilleCity_GameCorner_EventScript_1572B5 + goto_if_eq MauvilleCity_GameCorner_EventScript_1572B5 setvar 0x8004, 7 - specialval RESULT, sub_810F424 - pokecasino RESULT + specialvar RESULT, sub_810F424 + playslotmachine RESULT releaseall end @@ -611,10 +611,10 @@ MauvilleCity_GameCorner_EventScript_157235:: @ 8157235 lockall checkitem ITEM_COIN_CASE, 1 compare RESULT, 0 - jumpeq MauvilleCity_GameCorner_EventScript_1572B5 + goto_if_eq MauvilleCity_GameCorner_EventScript_1572B5 setvar 0x8004, 8 - specialval RESULT, sub_810F424 - pokecasino RESULT + specialvar RESULT, sub_810F424 + playslotmachine RESULT releaseall end @@ -622,10 +622,10 @@ MauvilleCity_GameCorner_EventScript_157255:: @ 8157255 lockall checkitem ITEM_COIN_CASE, 1 compare RESULT, 0 - jumpeq MauvilleCity_GameCorner_EventScript_1572B5 + goto_if_eq MauvilleCity_GameCorner_EventScript_1572B5 setvar 0x8004, 9 - specialval RESULT, sub_810F424 - pokecasino RESULT + specialvar RESULT, sub_810F424 + playslotmachine RESULT releaseall end @@ -633,10 +633,10 @@ MauvilleCity_GameCorner_EventScript_157275:: @ 8157275 lockall checkitem ITEM_COIN_CASE, 1 compare RESULT, 0 - jumpeq MauvilleCity_GameCorner_EventScript_1572B5 + goto_if_eq MauvilleCity_GameCorner_EventScript_1572B5 setvar 0x8004, 10 - specialval RESULT, sub_810F424 - pokecasino RESULT + specialvar RESULT, sub_810F424 + playslotmachine RESULT releaseall end @@ -644,10 +644,10 @@ MauvilleCity_GameCorner_EventScript_157295:: @ 8157295 lockall checkitem ITEM_COIN_CASE, 1 compare RESULT, 0 - jumpeq MauvilleCity_GameCorner_EventScript_1572B5 + goto_if_eq MauvilleCity_GameCorner_EventScript_1572B5 setvar 0x8004, 11 - specialval RESULT, sub_810F424 - pokecasino RESULT + specialvar RESULT, sub_810F424 + playslotmachine RESULT releaseall end diff --git a/data/scripts/maps/MauvilleCity_Gym.inc b/data/scripts/maps/MauvilleCity_Gym.inc index bd5c119f3..5221add7a 100644 --- a/data/scripts/maps/MauvilleCity_Gym.inc +++ b/data/scripts/maps/MauvilleCity_Gym.inc @@ -4,7 +4,7 @@ MauvilleCity_Gym_MapScripts:: @ 8156450 MauvilleCity_Gym_MapScript1_156456:: @ 8156456 checkflag 1208 - jumpeq MauvilleCity_Gym_EventScript_1565A7 + goto_if_eq MauvilleCity_Gym_EventScript_1565A7 switch 0x4093 case 0, MauvilleCity_Gym_EventScript_156491 case 1, MauvilleCity_Gym_EventScript_15657D @@ -14,7 +14,7 @@ MauvilleCity_Gym_MapScript1_156456:: @ 8156456 MauvilleCity_Gym_EventScript_156491:: @ 8156491 checkflag 99 - jumpeq MauvilleCity_Gym_EventScript_15649B + goto_if_eq MauvilleCity_Gym_EventScript_15649B end MauvilleCity_Gym_EventScript_15649B:: @ 815649B @@ -48,19 +48,19 @@ MauvilleCity_Gym_EventScript_15649B:: @ 815649B MauvilleCity_Gym_EventScript_15657D:: @ 815657D setvar 0x8004, 0 special MauvilleGymSpecial1 - jump MauvilleCity_Gym_EventScript_156491 + goto MauvilleCity_Gym_EventScript_156491 end MauvilleCity_Gym_EventScript_15658B:: @ 815658B setvar 0x8004, 1 special MauvilleGymSpecial1 - jump MauvilleCity_Gym_EventScript_156491 + goto MauvilleCity_Gym_EventScript_156491 end MauvilleCity_Gym_EventScript_156599:: @ 8156599 setvar 0x8004, 2 special MauvilleGymSpecial1 - jump MauvilleCity_Gym_EventScript_156491 + goto MauvilleCity_Gym_EventScript_156491 end MauvilleCity_Gym_EventScript_1565A7:: @ 81565A7 @@ -70,35 +70,35 @@ MauvilleCity_Gym_EventScript_1565A7:: @ 81565A7 MauvilleCity_Gym_EventScript_1565AB:: @ 81565AB trainerbattle 1, OPPONENT_WATTSON, 0, MauvilleCity_Gym_Text_180C32, MauvilleCity_Gym_Text_180D64, MauvilleCity_Gym_EventScript_1565DB checkflag 167 - jumpif 0, MauvilleCity_Gym_EventScript_15661D + goto_if 0, MauvilleCity_Gym_EventScript_15661D compare 0x40ba, 2 - jumpeq MauvilleCity_Gym_EventScript_156641 + goto_if_eq MauvilleCity_Gym_EventScript_156641 msgbox MauvilleCity_Gym_Text_180EDB, 4 release end MauvilleCity_Gym_EventScript_1565DB:: @ 81565DB message MauvilleCity_Gym_Text_180DAF - waittext + waitmessage call MauvilleCity_Gym_EventScript_1A02C5 msgbox MauvilleCity_Gym_Text_180DDA, 4 setflag 1208 setflag 2057 addvar 0x4085, 1 compare 0x4085, 6 - callif 1, MauvilleCity_Gym_EventScript_1A00FB + call_if 1, MauvilleCity_Gym_EventScript_1A00FB setvar 0x8008, 3 call MauvilleCity_Gym_EventScript_1A01C0 special MauvilleGymSpecial3 special DrawWholeMapView - playsfx 44 - jump MauvilleCity_Gym_EventScript_15661D + playse 44 + goto MauvilleCity_Gym_EventScript_15661D end MauvilleCity_Gym_EventScript_15661D:: @ 815661D giveitem ITEM_TM34 compare RESULT, 0 - jumpeq MauvilleCity_Gym_EventScript_1A029B + goto_if_eq MauvilleCity_Gym_EventScript_1A029B msgbox MauvilleCity_Gym_Text_180E76, 4 setflag 167 release @@ -112,45 +112,45 @@ MauvilleCity_Gym_EventScript_156641:: @ 8156641 MauvilleCity_Gym_EventScript_15664B:: @ 815664B lockall checkflag 1208 - jumpeq MauvilleCity_Gym_EventScript_1566DA + goto_if_eq MauvilleCity_Gym_EventScript_1566DA compare 0x4093, 1 - jumpeq MauvilleCity_Gym_EventScript_1566DA + goto_if_eq MauvilleCity_Gym_EventScript_1566DA setvar 0x4093, 1 setvar 0x8004, 0 - jump MauvilleCity_Gym_EventScript_1566BA + goto MauvilleCity_Gym_EventScript_1566BA end MauvilleCity_Gym_EventScript_156670:: @ 8156670 lockall checkflag 1208 - jumpeq MauvilleCity_Gym_EventScript_1566DA + goto_if_eq MauvilleCity_Gym_EventScript_1566DA compare 0x4093, 2 - jumpeq MauvilleCity_Gym_EventScript_1566DA + goto_if_eq MauvilleCity_Gym_EventScript_1566DA setvar 0x4093, 2 setvar 0x8004, 1 - jump MauvilleCity_Gym_EventScript_1566BA + goto MauvilleCity_Gym_EventScript_1566BA end MauvilleCity_Gym_EventScript_156695:: @ 8156695 lockall checkflag 1208 - jumpeq MauvilleCity_Gym_EventScript_1566DA + goto_if_eq MauvilleCity_Gym_EventScript_1566DA compare 0x4093, 3 - jumpeq MauvilleCity_Gym_EventScript_1566DA + goto_if_eq MauvilleCity_Gym_EventScript_1566DA setvar 0x4093, 3 setvar 0x8004, 2 - jump MauvilleCity_Gym_EventScript_1566BA + goto MauvilleCity_Gym_EventScript_1566BA end MauvilleCity_Gym_EventScript_1566BA:: @ 81566BA special MauvilleGymSpecial2 special MauvilleGymSpecial1 special DrawWholeMapView - playsfx 44 + playse 44 checkflag 99 - jumpeq MauvilleCity_Gym_EventScript_1566E1 + goto_if_eq MauvilleCity_Gym_EventScript_1566E1 checkflag 99 - jumpif 0, MauvilleCity_Gym_EventScript_1566DC + goto_if 0, MauvilleCity_Gym_EventScript_1566DC releaseall end @@ -192,7 +192,7 @@ MauvilleCity_Gym_EventScript_156742:: @ 8156742 lock faceplayer checkflag 1208 - jumpeq MauvilleCity_Gym_EventScript_156757 + goto_if_eq MauvilleCity_Gym_EventScript_156757 msgbox MauvilleCity_Gym_Text_180815, 4 release end @@ -205,15 +205,15 @@ MauvilleCity_Gym_EventScript_156757:: @ 8156757 MauvilleCity_Gym_EventScript_156761:: @ 8156761 lockall checkflag 2057 - jumpeq MauvilleCity_Gym_EventScript_156781 - jump MauvilleCity_Gym_EventScript_15678B + goto_if_eq MauvilleCity_Gym_EventScript_156781 + goto MauvilleCity_Gym_EventScript_15678B end MauvilleCity_Gym_EventScript_156771:: @ 8156771 lockall checkflag 2057 - jumpeq MauvilleCity_Gym_EventScript_156781 - jump MauvilleCity_Gym_EventScript_15678B + goto_if_eq MauvilleCity_Gym_EventScript_156781 + goto MauvilleCity_Gym_EventScript_15678B end MauvilleCity_Gym_EventScript_156781:: @ 8156781 diff --git a/data/scripts/maps/MauvilleCity_House1.inc b/data/scripts/maps/MauvilleCity_House1.inc index 48ee31be5..e76564847 100644 --- a/data/scripts/maps/MauvilleCity_House1.inc +++ b/data/scripts/maps/MauvilleCity_House1.inc @@ -5,7 +5,7 @@ MauvilleCity_House1_EventScript_1569FD:: @ 81569FD lock faceplayer checkflag 107 - jumpeq MauvilleCity_House1_EventScript_156A29 + goto_if_eq MauvilleCity_House1_EventScript_156A29 msgbox MauvilleCity_House1_Text_181B1A, 4 giveitem ITEM_HM06 setflag 107 diff --git a/data/scripts/maps/MauvilleCity_House2.inc b/data/scripts/maps/MauvilleCity_House2.inc index 8a73af034..a500a246e 100644 --- a/data/scripts/maps/MauvilleCity_House2.inc +++ b/data/scripts/maps/MauvilleCity_House2.inc @@ -5,25 +5,25 @@ MauvilleCity_House2_EventScript_1572C0:: @ 81572C0 lock faceplayer checkflag 258 - jumpeq MauvilleCity_House2_EventScript_15733D + goto_if_eq MauvilleCity_House2_EventScript_15733D msgbox MauvilleCity_House2_Text_18244E, 4 checkitem ITEM_HARBOR_MAIL, 1 compare RESULT, 1 - jumpeq MauvilleCity_House2_EventScript_1572E5 + goto_if_eq MauvilleCity_House2_EventScript_1572E5 release end MauvilleCity_House2_EventScript_1572E5:: @ 81572E5 - playsfx 21 - move LAST_TALKED, MauvilleCity_House2_Movement_1A0833 - waitmove 0 - move LAST_TALKED, MauvilleCity_House2_Movement_1A0835 - waitmove 0 + playse 21 + applymovement LAST_TALKED, MauvilleCity_House2_Movement_1A0833 + waitmovement 0 + applymovement LAST_TALKED, MauvilleCity_House2_Movement_1A0835 + waitmovement 0 msgbox MauvilleCity_House2_Text_1824D8, 5 compare RESULT, 1 - jumpeq MauvilleCity_House2_EventScript_15731B + goto_if_eq MauvilleCity_House2_EventScript_15731B compare RESULT, 0 - jumpeq MauvilleCity_House2_EventScript_157347 + goto_if_eq MauvilleCity_House2_EventScript_157347 end MauvilleCity_House2_EventScript_15731B:: @ 815731B @@ -31,7 +31,7 @@ MauvilleCity_House2_EventScript_15731B:: @ 815731B removeitem ITEM_HARBOR_MAIL, 1 giveitem ITEM_COIN_CASE setflag 258 - jump MauvilleCity_House2_EventScript_15733D + goto MauvilleCity_House2_EventScript_15733D end MauvilleCity_House2_EventScript_15733D:: @ 815733D diff --git a/data/scripts/maps/MauvilleCity_Mart.inc b/data/scripts/maps/MauvilleCity_Mart.inc index fac5906ad..0dd66eddf 100644 --- a/data/scripts/maps/MauvilleCity_Mart.inc +++ b/data/scripts/maps/MauvilleCity_Mart.inc @@ -5,7 +5,7 @@ MauvilleCity_Mart_EventScript_1573BE:: @ 81573BE lock faceplayer message MauvilleCity_Mart_Text_1A0BE4 - waittext + waitmessage pokemart MauvilleCity_Mart_Items msgbox MauvilleCity_Mart_Text_1A0C02, 4 release diff --git a/data/scripts/maps/MauvilleCity_PokemonCenter_1F.inc b/data/scripts/maps/MauvilleCity_PokemonCenter_1F.inc index b2b5dabd4..7122b8c3c 100644 --- a/data/scripts/maps/MauvilleCity_PokemonCenter_1F.inc +++ b/data/scripts/maps/MauvilleCity_PokemonCenter_1F.inc @@ -5,7 +5,7 @@ MauvilleCity_PokemonCenter_1F_MapScripts:: @ 8157351 MauvilleCity_PokemonCenter_1F_MapScript1_157357:: @ 8157357 sethealplace 5 call MauvilleCity_PokemonCenter_1F_EventScript_19FD1B - jump MauvilleCity_PokemonCenter_1F_EventScript_157365 + goto MauvilleCity_PokemonCenter_1F_EventScript_157365 end MauvilleCity_PokemonCenter_1F_EventScript_157365:: @ 8157365 @@ -15,7 +15,7 @@ MauvilleCity_PokemonCenter_1F_EventScript_157365:: @ 8157365 MauvilleCity_PokemonCenter_1F_EventScript_157369:: @ 8157369 setvar 0x800b, 1 call MauvilleCity_PokemonCenter_1F_EventScript_19FD5B - waittext + waitmessage waitbutton release end diff --git a/data/scripts/maps/MeteorFalls_1F_1R.inc b/data/scripts/maps/MeteorFalls_1F_1R.inc index 3e7155955..06abbc8f6 100644 --- a/data/scripts/maps/MeteorFalls_1F_1R.inc +++ b/data/scripts/maps/MeteorFalls_1F_1R.inc @@ -8,75 +8,75 @@ MeteorFalls_1F_1R_MapScript1_15C496:: @ 815C496 MeteorFalls_1F_1R_EventScript_15C49C:: @ 815C49C lockall - move 255, MeteorFalls_1F_1R_Movement_1A0845 - waitmove 0 - pause 30 - move 5, MeteorFalls_1F_1R_Movement_1A0845 - waitmove 0 + applymovement 255, MeteorFalls_1F_1R_Movement_1A0845 + waitmovement 0 + delay 30 + applymovement 5, MeteorFalls_1F_1R_Movement_1A0845 + waitmovement 0 msgbox MeteorFalls_1F_1R_Text_193237, 4 - closebutton - move 5, MeteorFalls_1F_1R_Movement_1A0841 - move 6, MeteorFalls_1F_1R_Movement_1A0841 - waitmove 0 - playsfx 21 - move 5, MeteorFalls_1F_1R_Movement_1A0833 - waitmove 0 - move 5, MeteorFalls_1F_1R_Movement_1A0835 - waitmove 0 + closemessage + applymovement 5, MeteorFalls_1F_1R_Movement_1A0841 + applymovement 6, MeteorFalls_1F_1R_Movement_1A0841 + waitmovement 0 + playse 21 + applymovement 5, MeteorFalls_1F_1R_Movement_1A0833 + waitmovement 0 + applymovement 5, MeteorFalls_1F_1R_Movement_1A0835 + waitmovement 0 msgbox MeteorFalls_1F_1R_Text_193268, 4 - closebutton - move 5, MeteorFalls_1F_1R_Movement_15C5EE - waitmove 0 + closemessage + applymovement 5, MeteorFalls_1F_1R_Movement_15C5EE + waitmovement 0 msgbox MeteorFalls_1F_1R_Text_1932C5, 4 - closebutton - move 255, MeteorFalls_1F_1R_Movement_1A083F - move 5, MeteorFalls_1F_1R_Movement_1A083F - move 6, MeteorFalls_1F_1R_Movement_1A083F - waitmove 0 - reappear 7 - reappear 8 - reappear 9 - move 7, MeteorFalls_1F_1R_Movement_15C608 - move 8, MeteorFalls_1F_1R_Movement_15C60F - move 9, MeteorFalls_1F_1R_Movement_15C617 - waitmove 0 - move 5, MeteorFalls_1F_1R_Movement_1A083F - move 6, MeteorFalls_1F_1R_Movement_1A083F - waitmove 0 + closemessage + applymovement 255, MeteorFalls_1F_1R_Movement_1A083F + applymovement 5, MeteorFalls_1F_1R_Movement_1A083F + applymovement 6, MeteorFalls_1F_1R_Movement_1A083F + waitmovement 0 + addobject 7 + addobject 8 + addobject 9 + applymovement 7, MeteorFalls_1F_1R_Movement_15C608 + applymovement 8, MeteorFalls_1F_1R_Movement_15C60F + applymovement 9, MeteorFalls_1F_1R_Movement_15C617 + waitmovement 0 + applymovement 5, MeteorFalls_1F_1R_Movement_1A083F + applymovement 6, MeteorFalls_1F_1R_Movement_1A083F + waitmovement 0 msgbox MeteorFalls_1F_1R_Text_193320, 4 - closebutton - move 255, MeteorFalls_1F_1R_Movement_15C64F - move 5, MeteorFalls_1F_1R_Movement_15C5F1 - move 6, MeteorFalls_1F_1R_Movement_15C5FC - waitmove 0 - disappear 5 - disappear 6 - move 7, MeteorFalls_1F_1R_Movement_15C628 - waitmove 0 + closemessage + applymovement 255, MeteorFalls_1F_1R_Movement_15C64F + applymovement 5, MeteorFalls_1F_1R_Movement_15C5F1 + applymovement 6, MeteorFalls_1F_1R_Movement_15C5FC + waitmovement 0 + removeobject 5 + removeobject 6 + applymovement 7, MeteorFalls_1F_1R_Movement_15C628 + waitmovement 0 .ifdef SAPPHIRE msgbox MeteorFalls_1F_1R_Text_1933EC, 4 .else msgbox MeteorFalls_1F_1R_Text_193584, 4 .endif - closebutton - move 8, MeteorFalls_1F_1R_Movement_15C639 - move 9, MeteorFalls_1F_1R_Movement_15C64A - waitmove 0 + closemessage + applymovement 8, MeteorFalls_1F_1R_Movement_15C639 + applymovement 9, MeteorFalls_1F_1R_Movement_15C64A + waitmovement 0 msgbox MeteorFalls_1F_1R_Text_193720, 4 - move 7, MeteorFalls_1F_1R_Movement_1A0845 - waitmove 0 + applymovement 7, MeteorFalls_1F_1R_Movement_1A0845 + waitmovement 0 msgbox MeteorFalls_1F_1R_Text_193747, 4 - move 7, MeteorFalls_1F_1R_Movement_1A083F - waitmove 0 + applymovement 7, MeteorFalls_1F_1R_Movement_1A083F + waitmovement 0 msgbox MeteorFalls_1F_1R_Text_1937AA, 4 - closebutton - move 7, MeteorFalls_1F_1R_Movement_15C61F - move 8, MeteorFalls_1F_1R_Movement_15C62E - move 9, MeteorFalls_1F_1R_Movement_15C63E - waitmove 0 - disappear 7 - disappear 8 - disappear 9 + closemessage + applymovement 7, MeteorFalls_1F_1R_Movement_15C61F + applymovement 8, MeteorFalls_1F_1R_Movement_15C62E + applymovement 9, MeteorFalls_1F_1R_Movement_15C63E + waitmovement 0 + removeobject 7 + removeobject 8 + removeobject 9 setflag 819 setvar 0x40bf, 1 releaseall @@ -216,7 +216,7 @@ MeteorFalls_1F_1R_EventScript_15C656:: @ 815C656 lock faceplayer checkflag 244 - jumpeq MeteorFalls_1F_1R_EventScript_15C66E + goto_if_eq MeteorFalls_1F_1R_EventScript_15C66E setflag 244 msgbox MeteorFalls_1F_1R_Text_1937EB, 4 release diff --git a/data/scripts/maps/MeteorFalls_1F_2R.inc b/data/scripts/maps/MeteorFalls_1F_2R.inc index 8e45c34ae..b3a0c51fe 100644 --- a/data/scripts/maps/MeteorFalls_1F_2R.inc +++ b/data/scripts/maps/MeteorFalls_1F_2R.inc @@ -3,9 +3,9 @@ MeteorFalls_1F_2R_MapScripts:: @ 815C678 MeteorFalls_1F_2R_EventScript_15C679:: @ 815C679 trainerbattle 0, OPPONENT_NICOLAS_1, 0, MeteorFalls_1F_2R_Text_1939C5, MeteorFalls_1F_2R_Text_193A35 - specialval RESULT, sub_8082C68 + specialvar RESULT, sub_8082C68 compare RESULT, 1 - jumpeq MeteorFalls_1F_2R_EventScript_15C6A0 + goto_if_eq MeteorFalls_1F_2R_EventScript_15C6A0 msgbox MeteorFalls_1F_2R_Text_193A60, 6 end @@ -16,9 +16,9 @@ MeteorFalls_1F_2R_EventScript_15C6A0:: @ 815C6A0 MeteorFalls_1F_2R_EventScript_15C6B7:: @ 815C6B7 trainerbattle 4, OPPONENT_JOHN_AND_JAY_1, 0, MeteorFalls_1F_2R_Text_193BB7, MeteorFalls_1F_2R_Text_193C10, MeteorFalls_1F_2R_Text_193C9F - specialval RESULT, sub_8082C68 + specialvar RESULT, sub_8082C68 compare RESULT, 1 - jumpeq MeteorFalls_1F_2R_EventScript_15C6E2 + goto_if_eq MeteorFalls_1F_2R_EventScript_15C6E2 msgbox MeteorFalls_1F_2R_Text_193C35, 6 end @@ -29,9 +29,9 @@ MeteorFalls_1F_2R_EventScript_15C6E2:: @ 815C6E2 MeteorFalls_1F_2R_EventScript_15C6FD:: @ 815C6FD trainerbattle 4, OPPONENT_JOHN_AND_JAY_1, 0, MeteorFalls_1F_2R_Text_193D10, MeteorFalls_1F_2R_Text_193D6E, MeteorFalls_1F_2R_Text_193DFB - specialval RESULT, sub_8082C68 + specialvar RESULT, sub_8082C68 compare RESULT, 1 - jumpeq MeteorFalls_1F_2R_EventScript_15C728 + goto_if_eq MeteorFalls_1F_2R_EventScript_15C728 msgbox MeteorFalls_1F_2R_Text_193D9A, 6 end diff --git a/data/scripts/maps/MossdeepCity.inc b/data/scripts/maps/MossdeepCity.inc index ddb317364..44deb9d63 100644 --- a/data/scripts/maps/MossdeepCity.inc +++ b/data/scripts/maps/MossdeepCity.inc @@ -8,7 +8,7 @@ MossdeepCity_MapScript1_14CF98:: @ 814CF98 clearflag 102 clearflag 103 checkflag 2090 - callif 1, MossdeepCity_EventScript_1A02C1 + call_if 1, MossdeepCity_EventScript_1A02C1 end MossdeepCity_EventScript_14CFAE:: @ 814CFAE @@ -60,8 +60,8 @@ MossdeepCity_EventScript_14D011:: @ 814D011 lock faceplayer msgbox MossdeepCity_Text_16944E, 4 - move LAST_TALKED, MossdeepCity_Movement_1A083D - waitmove 0 + applymovement LAST_TALKED, MossdeepCity_Movement_1A083D + waitmovement 0 release end @@ -69,14 +69,14 @@ MossdeepCity_EventScript_14D027:: @ 814D027 lock faceplayer checkflag 276 - jumpeq MossdeepCity_EventScript_14D069 + goto_if_eq MossdeepCity_EventScript_14D069 msgbox MossdeepCity_Text_1690A9, 5 compare RESULT, 0 - jumpeq MossdeepCity_EventScript_14D073 + goto_if_eq MossdeepCity_EventScript_14D073 msgbox MossdeepCity_Text_169117, 4 giveitem ITEM_KINGS_ROCK compare RESULT, 0 - jumpeq MossdeepCity_EventScript_1A029B + goto_if_eq MossdeepCity_EventScript_1A029B setflag 276 release end diff --git a/data/scripts/maps/MossdeepCity_GameCorner_1F.inc b/data/scripts/maps/MossdeepCity_GameCorner_1F.inc index 59669596a..66ad747f9 100644 --- a/data/scripts/maps/MossdeepCity_GameCorner_1F.inc +++ b/data/scripts/maps/MossdeepCity_GameCorner_1F.inc @@ -7,7 +7,7 @@ MossdeepCity_GameCorner_1F_MapScripts:: @ 815AC52 MossdeepCity_GameCorner_1F_MapScript1_15AC62:: @ 815AC62 special sub_813601C compare RESULT, 1 - callif 1, MossdeepCity_GameCorner_1F_EventScript_15AC71 + call_if 1, MossdeepCity_GameCorner_1F_EventScript_15AC71 end MossdeepCity_GameCorner_1F_EventScript_15AC71:: @ 815AC71 @@ -18,20 +18,20 @@ MossdeepCity_GameCorner_1F_EventScript_15AC71:: @ 815AC71 MossdeepCity_GameCorner_1F_MapScript1_15AC84:: @ 815AC84 special sub_813601C compare RESULT, 0 - callif 1, MossdeepCity_GameCorner_1F_EventScript_15AC9E + call_if 1, MossdeepCity_GameCorner_1F_EventScript_15AC9E compare 0x40c0, 0 - callif 5, MossdeepCity_GameCorner_1F_EventScript_15ACAF + call_if 5, MossdeepCity_GameCorner_1F_EventScript_15ACAF end MossdeepCity_GameCorner_1F_EventScript_15AC9E:: @ 815AC9E setvar 0x4001, 1 - movespriteperm 1, 3, 2 - spritebehave 1, 8 + setobjectxyperm 1, 3, 2 + setobjectmovementtype 1, 8 return MossdeepCity_GameCorner_1F_EventScript_15ACAF:: @ 815ACAF - movespriteperm 1, 2, 2 - spritebehave 1, 10 + setobjectxyperm 1, 2, 2 + setobjectmovementtype 1, 10 return MossdeepCity_GameCorner_1F_MapScript2_15ACBB:: @ 815ACBB @@ -42,19 +42,19 @@ MossdeepCity_GameCorner_1F_MapScript2_15ACBB:: @ 815ACBB MossdeepCity_GameCorner_1F_EventScript_15ACD5:: @ 815ACD5 lockall - move 255, MossdeepCity_GameCorner_1F_Movement_15AD3D - waitmove 0 - move 1, MossdeepCity_GameCorner_1F_Movement_15AD3F - waitmove 0 - moveoffscreen 1 - move 255, MossdeepCity_GameCorner_1F_Movement_1A0841 - waitmove 0 + applymovement 255, MossdeepCity_GameCorner_1F_Movement_15AD3D + waitmovement 0 + applymovement 1, MossdeepCity_GameCorner_1F_Movement_15AD3F + waitmovement 0 + moveobjectoffscreen 1 + applymovement 255, MossdeepCity_GameCorner_1F_Movement_1A0841 + waitmovement 0 compare 0x40c0, 1 - callif 1, MossdeepCity_GameCorner_1F_EventScript_15AD22 + call_if 1, MossdeepCity_GameCorner_1F_EventScript_15AD22 compare 0x40c0, 2 - callif 1, MossdeepCity_GameCorner_1F_EventScript_15AD2B + call_if 1, MossdeepCity_GameCorner_1F_EventScript_15AD2B compare 0x40c0, 3 - callif 1, MossdeepCity_GameCorner_1F_EventScript_15AD34 + call_if 1, MossdeepCity_GameCorner_1F_EventScript_15AD34 special LoadPlayerParty setvar 0x40c0, 0 releaseall @@ -85,7 +85,7 @@ MossdeepCity_GameCorner_1F_EventScript_15AD42:: @ 815AD42 lock faceplayer compare 0x4001, 1 - jumpeq MossdeepCity_GameCorner_1F_EventScript_15AD59 + goto_if_eq MossdeepCity_GameCorner_1F_EventScript_15AD59 msgbox MossdeepCity_GameCorner_1F_Text_18E59A, 4 release end @@ -95,28 +95,28 @@ MossdeepCity_GameCorner_1F_EventScript_15AD59:: @ 815AD59 special sub_810F414 msgbox MossdeepCity_GameCorner_1F_Text_18E650, 5 compare RESULT, 0 - jumpeq MossdeepCity_GameCorner_1F_EventScript_15ADE8 + goto_if_eq MossdeepCity_GameCorner_1F_EventScript_15ADE8 call MossdeepCity_GameCorner_1F_EventScript_15ADF5 compare RESULT, 0 - jumpeq MossdeepCity_GameCorner_1F_EventScript_15ADE8 + goto_if_eq MossdeepCity_GameCorner_1F_EventScript_15ADE8 msgbox MossdeepCity_GameCorner_1F_Text_18E741, 5 compare RESULT, 0 - callif 1, MossdeepCity_GameCorner_1F_EventScript_15ADE8 + call_if 1, MossdeepCity_GameCorner_1F_EventScript_15ADE8 special LoadPlayerParty call S_DoSaveDialog compare RESULT, 0 - jumpeq MossdeepCity_GameCorner_1F_EventScript_15ADE8 - hidebox 0, 0, 15, 10 + goto_if_eq MossdeepCity_GameCorner_1F_EventScript_15ADE8 + erasebox 0, 0, 15, 10 special SavePlayerParty special ReducePlayerPartyToThree msgbox MossdeepCity_GameCorner_1F_Text_18E777, 4 - closebutton + closemessage compare FACING, 2 - callif 1, MossdeepCity_GameCorner_1F_EventScript_15AE04 + call_if 1, MossdeepCity_GameCorner_1F_EventScript_15AE04 compare FACING, 4 - callif 1, MossdeepCity_GameCorner_1F_EventScript_15AE16 + call_if 1, MossdeepCity_GameCorner_1F_EventScript_15AE16 compare FACING, 3 - callif 1, MossdeepCity_GameCorner_1F_EventScript_15AE28 + call_if 1, MossdeepCity_GameCorner_1F_EventScript_15AE28 warp MossdeepCity_GameCorner_B1F, 255, 3, 1 waitstate release @@ -136,21 +136,21 @@ MossdeepCity_GameCorner_1F_EventScript_15ADF5:: @ 815ADF5 return MossdeepCity_GameCorner_1F_EventScript_15AE04:: @ 815AE04 - move LAST_TALKED, MossdeepCity_GameCorner_1F_Movement_15AE46 - move 255, MossdeepCity_GameCorner_1F_Movement_15AE3A - waitmove 0 + applymovement LAST_TALKED, MossdeepCity_GameCorner_1F_Movement_15AE46 + applymovement 255, MossdeepCity_GameCorner_1F_Movement_15AE3A + waitmovement 0 return MossdeepCity_GameCorner_1F_EventScript_15AE16:: @ 815AE16 - move LAST_TALKED, MossdeepCity_GameCorner_1F_Movement_15AE49 - move 255, MossdeepCity_GameCorner_1F_Movement_15AE3E - waitmove 0 + applymovement LAST_TALKED, MossdeepCity_GameCorner_1F_Movement_15AE49 + applymovement 255, MossdeepCity_GameCorner_1F_Movement_15AE3E + waitmovement 0 return MossdeepCity_GameCorner_1F_EventScript_15AE28:: @ 815AE28 - move LAST_TALKED, MossdeepCity_GameCorner_1F_Movement_15AE46 - move 255, MossdeepCity_GameCorner_1F_Movement_15AE42 - waitmove 0 + applymovement LAST_TALKED, MossdeepCity_GameCorner_1F_Movement_15AE46 + applymovement 255, MossdeepCity_GameCorner_1F_Movement_15AE42 + waitmovement 0 return MossdeepCity_GameCorner_1F_Movement_15AE3A:: @ 815AE3A diff --git a/data/scripts/maps/MossdeepCity_GameCorner_B1F.inc b/data/scripts/maps/MossdeepCity_GameCorner_B1F.inc index c7d1201fd..886c64d29 100644 --- a/data/scripts/maps/MossdeepCity_GameCorner_B1F.inc +++ b/data/scripts/maps/MossdeepCity_GameCorner_B1F.inc @@ -13,25 +13,25 @@ MossdeepCity_GameCorner_B1F_MapScript2_15AE64:: @ 815AE64 MossdeepCity_GameCorner_B1F_EventScript_15AE6E:: @ 815AE6E lockall - move 255, MossdeepCity_GameCorner_B1F_Movement_15AEF9 - waitmove 0 + applymovement 255, MossdeepCity_GameCorner_B1F_Movement_15AEF9 + waitmovement 0 special sub_81360C0 msgbox 0x20234cc, 4 - closebutton + closemessage setvar 0x8004, 2 setvar 0x8005, 0 special sub_813556C waitstate compare RESULT, 3 - callif 1, MossdeepCity_GameCorner_B1F_EventScript_15AED5 + call_if 1, MossdeepCity_GameCorner_B1F_EventScript_15AED5 compare RESULT, 1 - callif 1, MossdeepCity_GameCorner_B1F_EventScript_15AEE3 + call_if 1, MossdeepCity_GameCorner_B1F_EventScript_15AEE3 compare RESULT, 2 - callif 1, MossdeepCity_GameCorner_B1F_EventScript_15AEEE - closebutton + call_if 1, MossdeepCity_GameCorner_B1F_EventScript_15AEEE + closemessage special ScrSpecial_HealPlayerParty - move 255, MossdeepCity_GameCorner_B1F_Movement_15AEFF - waitmove 0 + applymovement 255, MossdeepCity_GameCorner_B1F_Movement_15AEFF + waitmovement 0 special LoadPlayerParty setvar 0x4001, 1 warp MossdeepCity_GameCorner_1F, 255, 3, 1 @@ -47,14 +47,14 @@ MossdeepCity_GameCorner_B1F_EventScript_15AED5:: @ 815AED5 MossdeepCity_GameCorner_B1F_EventScript_15AEE3:: @ 815AEE3 setvar 0x40c0, 1 special ShowFieldMessageStringVar4 - waittext + waitmessage waitbutton return MossdeepCity_GameCorner_B1F_EventScript_15AEEE:: @ 815AEEE setvar 0x40c0, 2 special ShowFieldMessageStringVar4 - waittext + waitmessage waitbutton return diff --git a/data/scripts/maps/MossdeepCity_Gym.inc b/data/scripts/maps/MossdeepCity_Gym.inc index 20f43a150..944860f2d 100644 --- a/data/scripts/maps/MossdeepCity_Gym.inc +++ b/data/scripts/maps/MossdeepCity_Gym.inc @@ -4,43 +4,43 @@ MossdeepCity_Gym_MapScripts:: @ 815A4D3 MossdeepCity_Gym_MapScript1_15A4D9:: @ 815A4D9 checkflag 100 - jumpeq MossdeepCity_Gym_EventScript_15A510 - jump MossdeepCity_Gym_EventScript_15A4E8 + goto_if_eq MossdeepCity_Gym_EventScript_15A510 + goto MossdeepCity_Gym_EventScript_15A4E8 end MossdeepCity_Gym_EventScript_15A4E8:: @ 815A4E8 checkflag 101 - jumpeq MossdeepCity_Gym_EventScript_15A528 - jump MossdeepCity_Gym_EventScript_15A4F7 + goto_if_eq MossdeepCity_Gym_EventScript_15A528 + goto MossdeepCity_Gym_EventScript_15A4F7 end MossdeepCity_Gym_EventScript_15A4F7:: @ 815A4F7 checkflag 102 - jumpeq MossdeepCity_Gym_EventScript_15A540 - jump MossdeepCity_Gym_EventScript_15A506 + goto_if_eq MossdeepCity_Gym_EventScript_15A540 + goto MossdeepCity_Gym_EventScript_15A506 end MossdeepCity_Gym_EventScript_15A506:: @ 815A506 checkflag 103 - jumpeq MossdeepCity_Gym_EventScript_15A558 + goto_if_eq MossdeepCity_Gym_EventScript_15A558 end MossdeepCity_Gym_EventScript_15A510:: @ 815A510 setmaptile 5, 5, 516, 0 setmaptile 2, 7, 569, 1 - jump MossdeepCity_Gym_EventScript_15A4E8 + goto MossdeepCity_Gym_EventScript_15A4E8 end MossdeepCity_Gym_EventScript_15A528:: @ 815A528 setmaptile 8, 14, 516, 0 setmaptile 8, 10, 569, 1 - jump MossdeepCity_Gym_EventScript_15A4F7 + goto MossdeepCity_Gym_EventScript_15A4F7 end MossdeepCity_Gym_EventScript_15A540:: @ 815A540 setmaptile 15, 17, 524, 0 setmaptile 17, 15, 569, 1 - jump MossdeepCity_Gym_EventScript_15A506 + goto MossdeepCity_Gym_EventScript_15A506 end MossdeepCity_Gym_EventScript_15A558:: @ 815A558 @@ -51,14 +51,14 @@ MossdeepCity_Gym_EventScript_15A558:: @ 815A558 MossdeepCity_Gym_EventScript_15A56B:: @ 815A56B trainerbattle 8, OPPONENT_TATE_AND_LIZA, 0, MossdeepCity_Gym_Text_18CF02, MossdeepCity_Gym_Text_18D077, MossdeepCity_Gym_Text_18D324, MossdeepCity_Gym_EventScript_15A594 checkflag 171 - jumpif 0, MossdeepCity_Gym_EventScript_15A5C6 + goto_if 0, MossdeepCity_Gym_EventScript_15A5C6 msgbox MossdeepCity_Gym_Text_18D273, 4 release end MossdeepCity_Gym_EventScript_15A594:: @ 815A594 message MossdeepCity_Gym_Text_18D0F9 - waittext + waitmessage call MossdeepCity_Gym_EventScript_1A02C5 msgbox MossdeepCity_Gym_Text_18D128, 4 setflag 1229 @@ -68,13 +68,13 @@ MossdeepCity_Gym_EventScript_15A594:: @ 815A594 setvar 0x8008, 7 call MossdeepCity_Gym_EventScript_1A01C0 clearflag 905 - jump MossdeepCity_Gym_EventScript_15A5C6 + goto MossdeepCity_Gym_EventScript_15A5C6 end MossdeepCity_Gym_EventScript_15A5C6:: @ 815A5C6 giveitem ITEM_TM04 compare RESULT, 0 - jumpeq MossdeepCity_Gym_EventScript_1A029B + goto_if_eq MossdeepCity_Gym_EventScript_1A029B msgbox MossdeepCity_Gym_Text_18D1CF, 4 setflag 171 release @@ -83,91 +83,91 @@ MossdeepCity_Gym_EventScript_15A5C6:: @ 815A5C6 MossdeepCity_Gym_EventScript_15A5EA:: @ 815A5EA lockall checkflag 100 - jumpeq MossdeepCity_Gym_EventScript_15A621 + goto_if_eq MossdeepCity_Gym_EventScript_15A621 setflag 100 - move 255, MossdeepCity_Gym_Movement_15A7F7 - waitmove 0 + applymovement 255, MossdeepCity_Gym_Movement_15A7F7 + waitmovement 0 setmaptile 5, 5, 516, 0 setmaptile 2, 7, 569, 1 - jump MossdeepCity_Gym_EventScript_15A619 + goto MossdeepCity_Gym_EventScript_15A619 end MossdeepCity_Gym_EventScript_15A619:: @ 815A619 special DrawWholeMapView - playsfx 36 + playse 36 releaseall end MossdeepCity_Gym_EventScript_15A621:: @ 815A621 clearflag 100 - move 255, MossdeepCity_Gym_Movement_15A7F7 - waitmove 0 + applymovement 255, MossdeepCity_Gym_Movement_15A7F7 + waitmovement 0 setmaptile 5, 5, 524, 0 setmaptile 2, 7, 568, 1 - jump MossdeepCity_Gym_EventScript_15A619 + goto MossdeepCity_Gym_EventScript_15A619 end MossdeepCity_Gym_EventScript_15A646:: @ 815A646 lockall checkflag 101 - jumpeq MossdeepCity_Gym_EventScript_15A675 + goto_if_eq MossdeepCity_Gym_EventScript_15A675 setflag 101 - move 255, MossdeepCity_Gym_Movement_15A7F7 - waitmove 0 + applymovement 255, MossdeepCity_Gym_Movement_15A7F7 + waitmovement 0 setmaptile 8, 14, 516, 0 setmaptile 8, 10, 569, 1 - jump MossdeepCity_Gym_EventScript_15A619 + goto MossdeepCity_Gym_EventScript_15A619 end MossdeepCity_Gym_EventScript_15A675:: @ 815A675 clearflag 101 - move 255, MossdeepCity_Gym_Movement_15A7F7 - waitmove 0 + applymovement 255, MossdeepCity_Gym_Movement_15A7F7 + waitmovement 0 setmaptile 8, 14, 517, 0 setmaptile 8, 10, 568, 1 - jump MossdeepCity_Gym_EventScript_15A619 + goto MossdeepCity_Gym_EventScript_15A619 end MossdeepCity_Gym_EventScript_15A69A:: @ 815A69A lockall checkflag 102 - jumpeq MossdeepCity_Gym_EventScript_15A6C9 + goto_if_eq MossdeepCity_Gym_EventScript_15A6C9 setflag 102 - move 255, MossdeepCity_Gym_Movement_15A7F7 - waitmove 0 + applymovement 255, MossdeepCity_Gym_Movement_15A7F7 + waitmovement 0 setmaptile 15, 17, 524, 0 setmaptile 17, 15, 569, 1 - jump MossdeepCity_Gym_EventScript_15A619 + goto MossdeepCity_Gym_EventScript_15A619 end MossdeepCity_Gym_EventScript_15A6C9:: @ 815A6C9 clearflag 102 - move 255, MossdeepCity_Gym_Movement_15A7F7 - waitmove 0 + applymovement 255, MossdeepCity_Gym_Movement_15A7F7 + waitmovement 0 setmaptile 15, 17, 516, 0 setmaptile 17, 15, 568, 1 - jump MossdeepCity_Gym_EventScript_15A619 + goto MossdeepCity_Gym_EventScript_15A619 end MossdeepCity_Gym_EventScript_15A6EE:: @ 815A6EE lockall checkflag 103 - jumpeq MossdeepCity_Gym_EventScript_15A71D + goto_if_eq MossdeepCity_Gym_EventScript_15A71D setflag 103 - move 255, MossdeepCity_Gym_Movement_15A7F7 - waitmove 0 + applymovement 255, MossdeepCity_Gym_Movement_15A7F7 + waitmovement 0 setmaptile 1, 23, 525, 0 setmaptile 5, 24, 569, 1 - jump MossdeepCity_Gym_EventScript_15A619 + goto MossdeepCity_Gym_EventScript_15A619 end MossdeepCity_Gym_EventScript_15A71D:: @ 815A71D clearflag 103 - move 255, MossdeepCity_Gym_Movement_15A7F7 - waitmove 0 + applymovement 255, MossdeepCity_Gym_Movement_15A7F7 + waitmovement 0 setmaptile 1, 23, 516, 0 setmaptile 5, 24, 568, 1 - jump MossdeepCity_Gym_EventScript_15A619 + goto MossdeepCity_Gym_EventScript_15A619 end MossdeepCity_Gym_EventScript_15A742:: @ 815A742 @@ -211,7 +211,7 @@ MossdeepCity_Gym_EventScript_15A7D8:: @ 815A7D8 lock faceplayer checkflag 1229 - jumpeq MossdeepCity_Gym_EventScript_15A7ED + goto_if_eq MossdeepCity_Gym_EventScript_15A7ED msgbox MossdeepCity_Gym_Text_18C7E3, 4 release end @@ -229,15 +229,15 @@ MossdeepCity_Gym_Movement_15A7F7:: @ 815A7F7 MossdeepCity_Gym_EventScript_15A7FA:: @ 815A7FA lockall checkflag 2061 - jumpeq MossdeepCity_Gym_EventScript_15A81A - jump MossdeepCity_Gym_EventScript_15A824 + goto_if_eq MossdeepCity_Gym_EventScript_15A81A + goto MossdeepCity_Gym_EventScript_15A824 end MossdeepCity_Gym_EventScript_15A80A:: @ 815A80A lockall checkflag 2061 - jumpeq MossdeepCity_Gym_EventScript_15A81A - jump MossdeepCity_Gym_EventScript_15A824 + goto_if_eq MossdeepCity_Gym_EventScript_15A81A + goto MossdeepCity_Gym_EventScript_15A824 end MossdeepCity_Gym_EventScript_15A81A:: @ 815A81A diff --git a/data/scripts/maps/MossdeepCity_House1.inc b/data/scripts/maps/MossdeepCity_House1.inc index 319dfba8e..62edffc8b 100644 --- a/data/scripts/maps/MossdeepCity_House1.inc +++ b/data/scripts/maps/MossdeepCity_House1.inc @@ -4,11 +4,11 @@ MossdeepCity_House1_MapScripts:: @ 815A82E MossdeepCity_House1_EventScript_15A82F:: @ 815A82F lock faceplayer - bufferfirstpoke 0 + getfirstpartypokename 0 msgbox MossdeepCity_House1_Text_18D465, 4 - specialval RESULT, GetPokeblockNameByMonNature + specialvar RESULT, GetPokeblockNameByMonNature compare RESULT, 0 - jumpeq MossdeepCity_House1_EventScript_15A855 + goto_if_eq MossdeepCity_House1_EventScript_15A855 msgbox MossdeepCity_House1_Text_18D475, 4 release end diff --git a/data/scripts/maps/MossdeepCity_House2.inc b/data/scripts/maps/MossdeepCity_House2.inc index f3d07b64e..f7f66b843 100644 --- a/data/scripts/maps/MossdeepCity_House2.inc +++ b/data/scripts/maps/MossdeepCity_House2.inc @@ -12,29 +12,29 @@ MossdeepCity_House2_EventScript_15A872:: @ 815A872 MossdeepCity_House2_EventScript_15A87B:: @ 815A87B lock faceplayer - checksound - pokecry SPECIES_WINGULL, 0 + waitse + playpokecry SPECIES_WINGULL, 0 msgbox MossdeepCity_House2_Text_18D61E, 4 waitpokecry - closebutton + closemessage setflag 224 clearflag 933 compare FACING, 2 - callif 1, MossdeepCity_House2_EventScript_15A8AE + call_if 1, MossdeepCity_House2_EventScript_15A8AE compare FACING, 3 - callif 1, MossdeepCity_House2_EventScript_15A8B9 - disappear 3 + call_if 1, MossdeepCity_House2_EventScript_15A8B9 + removeobject 3 release end MossdeepCity_House2_EventScript_15A8AE:: @ 815A8AE - move 3, MossdeepCity_House2_Movement_15A8C4 - waitmove 0 + applymovement 3, MossdeepCity_House2_Movement_15A8C4 + waitmovement 0 return MossdeepCity_House2_EventScript_15A8B9:: @ 815A8B9 - move 3, MossdeepCity_House2_Movement_15A8CB - waitmove 0 + applymovement 3, MossdeepCity_House2_Movement_15A8CB + waitmovement 0 return MossdeepCity_House2_Movement_15A8C4:: @ 815A8C4 diff --git a/data/scripts/maps/MossdeepCity_House3.inc b/data/scripts/maps/MossdeepCity_House3.inc index fd97ee598..8f9bf4dc5 100644 --- a/data/scripts/maps/MossdeepCity_House3.inc +++ b/data/scripts/maps/MossdeepCity_House3.inc @@ -5,10 +5,10 @@ MossdeepCity_House3_EventScript_15A972:: @ 815A972 lock faceplayer checkflag 152 - jumpeq MossdeepCity_House3_EventScript_15A9B1 + goto_if_eq MossdeepCity_House3_EventScript_15A9B1 msgbox MossdeepCity_House3_Text_18D909, 5 compare RESULT, 0 - jumpeq MossdeepCity_House3_EventScript_15A9BB + goto_if_eq MossdeepCity_House3_EventScript_15A9BB msgbox MossdeepCity_House3_Text_18D9A9, 4 giveitem ITEM_SUPER_ROD setflag 152 diff --git a/data/scripts/maps/MossdeepCity_House4.inc b/data/scripts/maps/MossdeepCity_House4.inc index 12dc941e7..fd173899d 100644 --- a/data/scripts/maps/MossdeepCity_House4.inc +++ b/data/scripts/maps/MossdeepCity_House4.inc @@ -5,7 +5,7 @@ MossdeepCity_House4_EventScript_15AB31:: @ 815AB31 lock faceplayer checkflag 2052 - jumpeq MossdeepCity_House4_EventScript_15AB46 + goto_if_eq MossdeepCity_House4_EventScript_15AB46 msgbox MossdeepCity_House4_Text_18E0E3, 4 release end @@ -20,7 +20,7 @@ MossdeepCity_House4_EventScript_15AB50:: @ 815AB50 faceplayer special sub_80BB63C compare RESULT, 0 - jumpeq MossdeepCity_House4_EventScript_15AB6D + goto_if_eq MossdeepCity_House4_EventScript_15AB6D special GetSecretBaseNearbyMapName msgbox MossdeepCity_House4_Text_18E17E, 4 release @@ -34,8 +34,8 @@ MossdeepCity_House4_EventScript_15AB6D:: @ 815AB6D MossdeepCity_House4_EventScript_15AB77:: @ 815AB77 lock faceplayer - checksound - pokecry SPECIES_SKITTY, 0 + waitse + playpokecry SPECIES_SKITTY, 0 msgbox MossdeepCity_House4_Text_18E1E1, 4 waitpokecry release diff --git a/data/scripts/maps/MossdeepCity_Mart.inc b/data/scripts/maps/MossdeepCity_Mart.inc index d1e861b99..ce5845c81 100644 --- a/data/scripts/maps/MossdeepCity_Mart.inc +++ b/data/scripts/maps/MossdeepCity_Mart.inc @@ -5,7 +5,7 @@ MossdeepCity_Mart_EventScript_15A926:: @ 815A926 lock faceplayer message MossdeepCity_Mart_Text_1A0BE4 - waittext + waitmessage pokemart MossdeepCity_Mart_Items msgbox MossdeepCity_Mart_Text_1A0C02, 4 release diff --git a/data/scripts/maps/MossdeepCity_PokemonCenter_1F.inc b/data/scripts/maps/MossdeepCity_PokemonCenter_1F.inc index 988608ffd..4ed3ea57e 100644 --- a/data/scripts/maps/MossdeepCity_PokemonCenter_1F.inc +++ b/data/scripts/maps/MossdeepCity_PokemonCenter_1F.inc @@ -9,7 +9,7 @@ MossdeepCity_PokemonCenter_1F_MapScript1_15A8D6:: @ 815A8D6 MossdeepCity_PokemonCenter_1F_EventScript_15A8DA:: @ 815A8DA setvar 0x800b, 1 call MossdeepCity_PokemonCenter_1F_EventScript_19FD5B - waittext + waitmessage waitbutton release end diff --git a/data/scripts/maps/MossdeepCity_SpaceCenter_1F.inc b/data/scripts/maps/MossdeepCity_SpaceCenter_1F.inc index db31e4c62..260cb4b6e 100644 --- a/data/scripts/maps/MossdeepCity_SpaceCenter_1F.inc +++ b/data/scripts/maps/MossdeepCity_SpaceCenter_1F.inc @@ -4,16 +4,16 @@ MossdeepCity_SpaceCenter_1F_MapScripts:: @ 815AB8A MossdeepCity_SpaceCenter_1F_EventScript_15AB8B:: @ 815AB8B lock faceplayer - checkdailyflags - specialval RESULT, GetWeekCount - buffernum 0, RESULT + dodailyevents + specialvar RESULT, GetWeekCount + getnumberstring 0, RESULT compare RESULT, 0 - callif 1, MossdeepCity_SpaceCenter_1F_EventScript_15ABBA + call_if 1, MossdeepCity_SpaceCenter_1F_EventScript_15ABBA compare RESULT, 1 - callif 4, MossdeepCity_SpaceCenter_1F_EventScript_15ABC3 - closebutton - move LAST_TALKED, MossdeepCity_SpaceCenter_1F_Movement_1A083D - waitmove 0 + call_if 4, MossdeepCity_SpaceCenter_1F_EventScript_15ABC3 + closemessage + applymovement LAST_TALKED, MossdeepCity_SpaceCenter_1F_Movement_1A083D + waitmovement 0 release end @@ -33,11 +33,11 @@ MossdeepCity_SpaceCenter_1F_EventScript_15ABD5:: @ 815ABD5 lock faceplayer checkflag 192 - jumpeq MossdeepCity_SpaceCenter_1F_EventScript_15AC0C + goto_if_eq MossdeepCity_SpaceCenter_1F_EventScript_15AC0C msgbox MossdeepCity_SpaceCenter_1F_Text_18E335, 4 giveitem ITEM_SUN_STONE compare RESULT, 0 - jumpeq MossdeepCity_SpaceCenter_1F_EventScript_1A029B + goto_if_eq MossdeepCity_SpaceCenter_1F_EventScript_1A029B setflag 192 msgbox MossdeepCity_SpaceCenter_1F_Text_18E39B, 4 release @@ -56,8 +56,8 @@ MossdeepCity_SpaceCenter_1F_EventScript_15AC1F:: @ 815AC1F lock faceplayer msgbox MossdeepCity_SpaceCenter_1F_Text_18E427, 4 - closebutton - move LAST_TALKED, MossdeepCity_SpaceCenter_1F_Movement_1A083D - waitmove 0 + closemessage + applymovement LAST_TALKED, MossdeepCity_SpaceCenter_1F_Movement_1A083D + waitmovement 0 release end diff --git a/data/scripts/maps/MossdeepCity_StevensHouse.inc b/data/scripts/maps/MossdeepCity_StevensHouse.inc index d4477bd39..8bf899780 100644 --- a/data/scripts/maps/MossdeepCity_StevensHouse.inc +++ b/data/scripts/maps/MossdeepCity_StevensHouse.inc @@ -6,7 +6,7 @@ MossdeepCity_StevensHouse_MapScripts:: @ 815A9C5 MossdeepCity_StevensHouse_MapScript1_15A9D5:: @ 815A9D5 checkflag 2052 - callif 0, MossdeepCity_StevensHouse_EventScript_15A9DF + call_if 0, MossdeepCity_StevensHouse_EventScript_15A9DF end MossdeepCity_StevensHouse_EventScript_15A9DF:: @ 815A9DF @@ -15,12 +15,12 @@ MossdeepCity_StevensHouse_EventScript_15A9DF:: @ 815A9DF MossdeepCity_StevensHouse_MapScript1_15A9E9:: @ 815A9E9 compare 0x40c6, 1 - callif 1, MossdeepCity_StevensHouse_EventScript_15A9F5 + call_if 1, MossdeepCity_StevensHouse_EventScript_15A9F5 end MossdeepCity_StevensHouse_EventScript_15A9F5:: @ 815A9F5 - movespriteperm 1, 6, 5 - spritebehave 1, 7 + setobjectxyperm 1, 6, 5 + setobjectmovementtype 1, 7 return MossdeepCity_StevensHouse_MapScript2_15AA01:: @ 815AA01 @@ -29,24 +29,24 @@ MossdeepCity_StevensHouse_MapScript2_15AA01:: @ 815AA01 MossdeepCity_StevensHouse_EventScript_15AA0B:: @ 815AA0B lockall - move 1, MossdeepCity_StevensHouse_Movement_1A083F - waitmove 0 - playsfx 21 - move 1, MossdeepCity_StevensHouse_Movement_1A0833 - waitmove 0 - move 1, MossdeepCity_StevensHouse_Movement_1A0835 - waitmove 0 - move 1, MossdeepCity_StevensHouse_Movement_15AA6E - waitmove 0 + applymovement 1, MossdeepCity_StevensHouse_Movement_1A083F + waitmovement 0 + playse 21 + applymovement 1, MossdeepCity_StevensHouse_Movement_1A0833 + waitmovement 0 + applymovement 1, MossdeepCity_StevensHouse_Movement_1A0835 + waitmovement 0 + applymovement 1, MossdeepCity_StevensHouse_Movement_15AA6E + waitmovement 0 msgbox MossdeepCity_StevensHouse_Text_18DA77, 4 giveitem ITEM_HM08 setflag 123 setflag 302 msgbox MossdeepCity_StevensHouse_Text_18DB22, 4 - closebutton - pause 20 - move 1, MossdeepCity_StevensHouse_Movement_15AA76 - waitmove 0 + closemessage + delay 20 + applymovement 1, MossdeepCity_StevensHouse_Movement_15AA76 + waitmovement 0 setvar 0x40c6, 1 releaseall end @@ -73,21 +73,21 @@ MossdeepCity_StevensHouse_EventScript_15AA7C:: @ 815AA7C lockall msgbox MossdeepCity_StevensHouse_Text_18DD12, 5 compare RESULT, 0 - jumpeq MossdeepCity_StevensHouse_EventScript_15AAE6 + goto_if_eq MossdeepCity_StevensHouse_EventScript_15AAE6 countpokemon compare RESULT, 6 - jumpeq MossdeepCity_StevensHouse_EventScript_15AADC + goto_if_eq MossdeepCity_StevensHouse_EventScript_15AADC copyvar 0x8004, RESULT - disappear 2 - fanfare 370 + removeobject 2 + playfanfare 370 message MossdeepCity_StevensHouse_Text_18DD61 waitfanfare - waittext - givepokemon SPECIES_BELDUM, 5, ITEM_NONE, 0x0, 0x0, 0 - bufferpoke 1, SPECIES_BELDUM + waitmessage + givepoke SPECIES_BELDUM, 5, ITEM_NONE, 0x0, 0x0, 0 + getspeciesname 1, SPECIES_BELDUM msgbox MossdeepCity_StevensHouse_Text_1A1102, 5 compare RESULT, 1 - callif 1, MossdeepCity_StevensHouse_EventScript_1A0678 + call_if 1, MossdeepCity_StevensHouse_EventScript_1A0678 setflag 968 setflag 298 releaseall @@ -114,7 +114,7 @@ MossdeepCity_StevensHouse_EventScript_15AAF9:: @ 815AAF9 MossdeepCity_StevensHouse_EventScript_15AB02:: @ 815AB02 lockall checkflag 302 - jumpeq MossdeepCity_StevensHouse_EventScript_15AB16 + goto_if_eq MossdeepCity_StevensHouse_EventScript_15AB16 msgbox MossdeepCity_StevensHouse_Text_18DF1A, 4 releaseall end diff --git a/data/scripts/maps/MtChimney.inc b/data/scripts/maps/MtChimney.inc index fdebcf102..a8eec9a32 100644 --- a/data/scripts/maps/MtChimney.inc +++ b/data/scripts/maps/MtChimney.inc @@ -15,46 +15,46 @@ MtChimney_MapScript1_15CF92:: @ 815CF92 MtChimney_EventScript_15CF95:: @ 815CF95 lock faceplayer - showmoney 0, 0 - snop + showmoneybox 0, 0 + nop msgbox MtChimney_Text_195760, 5 compare RESULT, 0 - jumpeq MtChimney_EventScript_15D00B + goto_if_eq MtChimney_EventScript_15D00B checkmoney 0xc8, 0 compare RESULT, 0 - jumpeq MtChimney_EventScript_15D018 + goto_if_eq MtChimney_EventScript_15D018 msgbox MtChimney_Text_1957A9, 4 checkitemspace ITEM_LAVA_COOKIE, 1 compare RESULT, 1 - callif 1, MtChimney_EventScript_15D000 + call_if 1, MtChimney_EventScript_15D000 giveitem ITEM_LAVA_COOKIE compare RESULT, 0 - jumpeq MtChimney_EventScript_15CFF3 - hidemoney 0, 0 + goto_if_eq MtChimney_EventScript_15CFF3 + hidemoneybox 0, 0 release end MtChimney_EventScript_15CFF3:: @ 815CFF3 msgbox MtChimney_Text_1A0CC2, 4 - hidemoney 0, 0 + hidemoneybox 0, 0 release end MtChimney_EventScript_15D000:: @ 815D000 - paymoney 0xc8, 0 - updatemoney 0, 0 - snop + takemoney 0xc8, 0 + updatemoneybox 0, 0 + nop return MtChimney_EventScript_15D00B:: @ 815D00B msgbox MtChimney_Text_1957F7, 4 - hidemoney 0, 0 + hidemoneybox 0, 0 release end MtChimney_EventScript_15D018:: @ 815D018 msgbox MtChimney_Text_1957BA, 4 - hidemoney 0, 0 + hidemoneybox 0, 0 release end @@ -407,12 +407,12 @@ MtChimney_EventScript_15D174:: @ 815D174 MtChimney_EventScript_15D17D:: @ 815D17D lockall checkflag 139 - jumpif 0, MtChimney_EventScript_15D1D0 + goto_if 0, MtChimney_EventScript_15D1D0 checkflag 115 - jumpeq MtChimney_EventScript_15D1C6 + goto_if_eq MtChimney_EventScript_15D1C6 msgbox MtChimney_Text_195870, 5 compare RESULT, 0 - jumpeq MtChimney_EventScript_15D1BC + goto_if_eq MtChimney_EventScript_15D1BC msgbox MtChimney_Text_1958C6, 4 giveitem ITEM_METEORITE setflag 115 @@ -440,9 +440,9 @@ MtChimney_EventScript_15D1DA:: @ 815D1DA MtChimney_EventScript_15D1E3:: @ 815D1E3 trainerbattle 0, OPPONENT_SHELBY_1, 0, MtChimney_Text_19597F, MtChimney_Text_1959D8 - specialval RESULT, sub_8082C68 + specialvar RESULT, sub_8082C68 compare RESULT, 1 - jumpeq MtChimney_EventScript_15D20A + goto_if_eq MtChimney_EventScript_15D20A msgbox MtChimney_Text_195A04, 6 end diff --git a/data/scripts/maps/MtChimney_CableCarStation.inc b/data/scripts/maps/MtChimney_CableCarStation.inc index 24101b0cb..9d99eb5fb 100644 --- a/data/scripts/maps/MtChimney_CableCarStation.inc +++ b/data/scripts/maps/MtChimney_CableCarStation.inc @@ -5,12 +5,12 @@ MtChimney_CableCarStation_MapScripts:: @ 815C0FA MtChimney_CableCarStation_MapScript1_15C105:: @ 815C105 compare 0x40a3, 1 - callif 1, MtChimney_CableCarStation_EventScript_15C111 + call_if 1, MtChimney_CableCarStation_EventScript_15C111 end MtChimney_CableCarStation_EventScript_15C111:: @ 815C111 - movespriteperm 1, 5, 4 - spritebehave 1, 10 + setobjectxyperm 1, 5, 4 + setobjectmovementtype 1, 10 return MtChimney_CableCarStation_MapScript2_15C11D:: @ 815C11D @@ -19,12 +19,12 @@ MtChimney_CableCarStation_MapScript2_15C11D:: @ 815C11D MtChimney_CableCarStation_EventScript_15C127:: @ 815C127 lockall - move 255, MtChimney_CableCarStation_Movement_15C1B4 - move 1, MtChimney_CableCarStation_Movement_15C1AA - waitmove 0 + applymovement 255, MtChimney_CableCarStation_Movement_15C1B4 + applymovement 1, MtChimney_CableCarStation_Movement_15C1AA + waitmovement 0 setvar 0x40a3, 0 - movespriteperm 1, 6, 7 - spritebehave 1, 8 + setobjectxyperm 1, 6, 7 + setobjectmovementtype 1, 8 releaseall end @@ -33,20 +33,20 @@ MtChimney_CableCarStation_EventScript_15C14B:: @ 815C14B faceplayer msgbox MtChimney_CableCarStation_Text_19256A, 5 compare RESULT, 1 - jumpeq MtChimney_CableCarStation_EventScript_15C16C + goto_if_eq MtChimney_CableCarStation_EventScript_15C16C compare RESULT, 0 - jumpeq MtChimney_CableCarStation_EventScript_15C19B + goto_if_eq MtChimney_CableCarStation_EventScript_15C19B end MtChimney_CableCarStation_EventScript_15C16C:: @ 815C16C msgbox MtChimney_CableCarStation_Text_1925A9, 4 - closebutton - move 1, MtChimney_CableCarStation_Movement_15C1A5 - move 255, MtChimney_CableCarStation_Movement_15C1AF - waitmove 0 + closemessage + applymovement 1, MtChimney_CableCarStation_Movement_15C1A5 + applymovement 255, MtChimney_CableCarStation_Movement_15C1AF + waitmovement 0 setvar 0x8004, 1 setvar 0x40a3, 2 - inccounter GAME_STAT_RODE_CABLE_CAR + incrementgamestat GAME_STAT_RODE_CABLE_CAR special CableCarWarp special sub_8123218 waitstate diff --git a/data/scripts/maps/MtPyre_1F.inc b/data/scripts/maps/MtPyre_1F.inc index 805c4a8d3..026d54bfe 100644 --- a/data/scripts/maps/MtPyre_1F.inc +++ b/data/scripts/maps/MtPyre_1F.inc @@ -5,11 +5,11 @@ MtPyre_1F_EventScript_15D323:: @ 815D323 lock faceplayer checkflag 282 - jumpeq MtPyre_1F_EventScript_15D352 + goto_if_eq MtPyre_1F_EventScript_15D352 msgbox MtPyre_1F_Text_196151, 4 giveitem ITEM_CLEANSE_TAG compare RESULT, 0 - jumpeq MtPyre_1F_EventScript_1A029B + goto_if_eq MtPyre_1F_EventScript_1A029B setflag 282 release end diff --git a/data/scripts/maps/MtPyre_2F.inc b/data/scripts/maps/MtPyre_2F.inc index c44251af7..8d48dac84 100644 --- a/data/scripts/maps/MtPyre_2F.inc +++ b/data/scripts/maps/MtPyre_2F.inc @@ -6,7 +6,7 @@ MtPyre_2F_MapScripts:: @ 815D36E MtPyre_2F_MapScript1_15D37E:: @ 815D37E tileeffect 7 - warp5 MtPyre_1F, 255, 0, 0 + setholewarp MtPyre_1F, 255, 0, 0 end MtPyre_2F_EventScript_15D389:: @ 815D389 diff --git a/data/scripts/maps/MtPyre_6F.inc b/data/scripts/maps/MtPyre_6F.inc index 657b4ef15..433b533b3 100644 --- a/data/scripts/maps/MtPyre_6F.inc +++ b/data/scripts/maps/MtPyre_6F.inc @@ -3,9 +3,9 @@ MtPyre_6F_MapScripts:: @ 815D447 MtPyre_6F_EventScript_15D448:: @ 815D448 trainerbattle 0, OPPONENT_VALERIE_1, 0, MtPyre_6F_Text_1969FE, MtPyre_6F_Text_196A30 - specialval RESULT, sub_8082C68 + specialvar RESULT, sub_8082C68 compare RESULT, 1 - jumpeq MtPyre_6F_EventScript_15D46F + goto_if_eq MtPyre_6F_EventScript_15D46F msgbox MtPyre_6F_Text_196A4C, 6 end diff --git a/data/scripts/maps/MtPyre_Exterior.inc b/data/scripts/maps/MtPyre_Exterior.inc index efffc7c3b..550f74d9a 100644 --- a/data/scripts/maps/MtPyre_Exterior.inc +++ b/data/scripts/maps/MtPyre_Exterior.inc @@ -9,7 +9,7 @@ MtPyre_Exterior_MapScript1_15D48C:: @ 815D48C MtPyre_Exterior_EventScript_15D492:: @ 815D492 getplayerxy 0x4000, 0x4001 compare 0x4001, 12 - jumpif 0, MtPyre_Exterior_EventScript_15D4A3 + goto_if 0, MtPyre_Exterior_EventScript_15D4A3 return MtPyre_Exterior_EventScript_15D4A3:: @ 815D4A3 diff --git a/data/scripts/maps/MtPyre_Summit.inc b/data/scripts/maps/MtPyre_Summit.inc index e352ac30e..533fb6e90 100644 --- a/data/scripts/maps/MtPyre_Summit.inc +++ b/data/scripts/maps/MtPyre_Summit.inc @@ -9,55 +9,55 @@ MtPyre_Summit_MapScript1_15D4B7:: @ 815D4B7 MtPyre_Summit_EventScript_15D4BD:: @ 815D4BD lockall setvar 0x8008, 0 - jump MtPyre_Summit_EventScript_15D4E1 + goto MtPyre_Summit_EventScript_15D4E1 end MtPyre_Summit_EventScript_15D4C9:: @ 815D4C9 lockall setvar 0x8008, 1 - jump MtPyre_Summit_EventScript_15D4E1 + goto MtPyre_Summit_EventScript_15D4E1 end MtPyre_Summit_EventScript_15D4D5:: @ 815D4D5 lockall setvar 0x8008, 2 - jump MtPyre_Summit_EventScript_15D4E1 + goto MtPyre_Summit_EventScript_15D4E1 end MtPyre_Summit_EventScript_15D4E1:: @ 815D4E1 - move 255, MtPyre_Summit_Movement_1A0841 - waitmove 0 - move 2, MtPyre_Summit_Movement_1A0845 - waitmove 0 - pause 50 + applymovement 255, MtPyre_Summit_Movement_1A0841 + waitmovement 0 + applymovement 2, MtPyre_Summit_Movement_1A0845 + waitmovement 0 + delay 50 compare 0x8008, 0 - callif 1, MtPyre_Summit_EventScript_15D593 + call_if 1, MtPyre_Summit_EventScript_15D593 compare 0x8008, 1 - callif 1, MtPyre_Summit_EventScript_15D59E + call_if 1, MtPyre_Summit_EventScript_15D59E compare 0x8008, 2 - callif 1, MtPyre_Summit_EventScript_15D59F + call_if 1, MtPyre_Summit_EventScript_15D59F .ifdef SAPPHIRE msgbox UnknownString_81B52B0, 4 .else msgbox MtPyre_Summit_Text_1B5EEC, 4 .endif - closebutton + closemessage fadescreen 1 - disappear 2 - disappear 4 - disappear 5 - disappear 6 + removeobject 2 + removeobject 4 + removeobject 5 + removeobject 6 setflag 916 setflag 917 fadescreen 0 - pause 20 + delay 20 call MtPyre_Summit_EventScript_15D57A compare 0x8008, 0 - callif 1, MtPyre_Summit_EventScript_15D5AA + call_if 1, MtPyre_Summit_EventScript_15D5AA compare 0x8008, 1 - callif 1, MtPyre_Summit_EventScript_15D5BF + call_if 1, MtPyre_Summit_EventScript_15D5BF compare 0x8008, 2 - callif 1, MtPyre_Summit_EventScript_15D5CA + call_if 1, MtPyre_Summit_EventScript_15D5CA .ifdef SAPPHIRE msgbox UnknownString_81B53AB, 4 .else @@ -78,35 +78,35 @@ MtPyre_Summit_EventScript_15D57A:: @ 815D57A return MtPyre_Summit_EventScript_15D593:: @ 815D593 - move 2, MtPyre_Summit_Movement_15D5E9 - waitmove 0 + applymovement 2, MtPyre_Summit_Movement_15D5E9 + waitmovement 0 return MtPyre_Summit_EventScript_15D59E:: @ 815D59E return MtPyre_Summit_EventScript_15D59F:: @ 815D59F - move 2, MtPyre_Summit_Movement_15D5EC - waitmove 0 + applymovement 2, MtPyre_Summit_Movement_15D5EC + waitmovement 0 return MtPyre_Summit_EventScript_15D5AA:: @ 815D5AA - move 3, MtPyre_Summit_Movement_15D5DF - waitmove 0 - move 255, MtPyre_Summit_Movement_1A0843 - waitmove 0 + applymovement 3, MtPyre_Summit_Movement_15D5DF + waitmovement 0 + applymovement 255, MtPyre_Summit_Movement_1A0843 + waitmovement 0 return MtPyre_Summit_EventScript_15D5BF:: @ 815D5BF - move 3, MtPyre_Summit_Movement_15D5E3 - waitmove 0 + applymovement 3, MtPyre_Summit_Movement_15D5E3 + waitmovement 0 return MtPyre_Summit_EventScript_15D5CA:: @ 815D5CA - move 3, MtPyre_Summit_Movement_15D5E5 - waitmove 0 - move 255, MtPyre_Summit_Movement_1A083F - waitmove 0 + applymovement 3, MtPyre_Summit_Movement_15D5E5 + waitmovement 0 + applymovement 255, MtPyre_Summit_Movement_1A083F + waitmovement 0 return MtPyre_Summit_Movement_15D5DF:: @ 815D5DF @@ -144,9 +144,9 @@ MtPyre_Summit_EventScript_15D5EF:: @ 815D5EF msgbox MtPyre_Summit_Text_1B64B3, 5 .endif compare RESULT, 1 - callif 1, MtPyre_Summit_EventScript_15D611 + call_if 1, MtPyre_Summit_EventScript_15D611 compare RESULT, 0 - callif 1, MtPyre_Summit_EventScript_15D61A + call_if 1, MtPyre_Summit_EventScript_15D61A release end @@ -170,11 +170,11 @@ MtPyre_Summit_EventScript_15D623:: @ 815D623 lock faceplayer checkflag 259 - jumpeq MtPyre_Summit_EventScript_15D6C4 + goto_if_eq MtPyre_Summit_EventScript_15D6C4 checkflag 113 - jumpeq MtPyre_Summit_EventScript_15D64A + goto_if_eq MtPyre_Summit_EventScript_15D64A checkflag 129 - jumpeq MtPyre_Summit_EventScript_15D6BA + goto_if_eq MtPyre_Summit_EventScript_15D6BA .ifdef SAPPHIRE msgbox UnknownString_81B54BE, 4 .else @@ -190,21 +190,21 @@ MtPyre_Summit_EventScript_15D64A:: @ 815D64A msgbox MtPyre_Summit_Text_1B6283, 5 .endif compare RESULT, 1 - jumpeq MtPyre_Summit_EventScript_15D669 + goto_if_eq MtPyre_Summit_EventScript_15D669 compare RESULT, 0 - jumpeq MtPyre_Summit_EventScript_15D69B + goto_if_eq MtPyre_Summit_EventScript_15D69B end MtPyre_Summit_EventScript_15D669:: @ 815D669 setvar 0x8004, ITEM_RED_OR_BLUE_ORB call MtPyre_Summit_EventScript_1A067F - closebutton - move LAST_TALKED, MtPyre_Summit_Movement_1A0841 - waitmove 0 - pause 40 - move LAST_TALKED, MtPyre_Summit_Movement_1A0839 - waitmove 0 - pause 10 + closemessage + applymovement LAST_TALKED, MtPyre_Summit_Movement_1A0841 + waitmovement 0 + delay 40 + applymovement LAST_TALKED, MtPyre_Summit_Movement_1A0839 + waitmovement 0 + delay 10 .ifdef SAPPHIRE msgbox UnknownString_81B5762, 4 .else @@ -221,9 +221,9 @@ MtPyre_Summit_EventScript_15D69B:: @ 815D69B msgbox MtPyre_Summit_Text_1B62E7, 5 .endif compare RESULT, 1 - jumpeq MtPyre_Summit_EventScript_15D669 + goto_if_eq MtPyre_Summit_EventScript_15D669 compare RESULT, 0 - jumpeq MtPyre_Summit_EventScript_15D69B + goto_if_eq MtPyre_Summit_EventScript_15D69B end MtPyre_Summit_EventScript_15D6BA:: @ 815D6BA @@ -247,78 +247,78 @@ MtPyre_Summit_EventScript_15D6C4:: @ 815D6C4 MtPyre_Summit_EventScript_15D6CE:: @ 815D6CE lockall setvar 0x8008, 0 - jump MtPyre_Summit_EventScript_15D6F2 + goto MtPyre_Summit_EventScript_15D6F2 end MtPyre_Summit_EventScript_15D6DA:: @ 815D6DA lockall setvar 0x8008, 1 - jump MtPyre_Summit_EventScript_15D6F2 + goto MtPyre_Summit_EventScript_15D6F2 end MtPyre_Summit_EventScript_15D6E6:: @ 815D6E6 lockall setvar 0x8008, 2 - jump MtPyre_Summit_EventScript_15D6F2 + goto MtPyre_Summit_EventScript_15D6F2 end MtPyre_Summit_EventScript_15D6F2:: @ 815D6F2 - move 255, MtPyre_Summit_Movement_1A0841 - waitmove 0 - move 2, MtPyre_Summit_Movement_1A0845 - waitmove 0 - pause 50 + applymovement 255, MtPyre_Summit_Movement_1A0841 + waitmovement 0 + applymovement 2, MtPyre_Summit_Movement_1A0845 + waitmovement 0 + delay 50 compare 0x8008, 0 - callif 1, MtPyre_Summit_EventScript_15D75E + call_if 1, MtPyre_Summit_EventScript_15D75E compare 0x8008, 1 - callif 1, MtPyre_Summit_EventScript_15D769 + call_if 1, MtPyre_Summit_EventScript_15D769 compare 0x8008, 2 - callif 1, MtPyre_Summit_EventScript_15D774 + call_if 1, MtPyre_Summit_EventScript_15D774 .ifdef SAPPHIRE msgbox UnknownString_81B5BFC, 4 .else msgbox MtPyre_Summit_Text_1B6848, 4 .endif - closebutton + closemessage compare 0x8008, 0 - callif 1, MtPyre_Summit_EventScript_15D77F + call_if 1, MtPyre_Summit_EventScript_15D77F compare 0x8008, 1 - callif 1, MtPyre_Summit_EventScript_15D78A + call_if 1, MtPyre_Summit_EventScript_15D78A compare 0x8008, 2 - callif 1, MtPyre_Summit_EventScript_15D795 - disappear 2 + call_if 1, MtPyre_Summit_EventScript_15D795 + removeobject 2 setvar 0x40b9, 3 releaseall end MtPyre_Summit_EventScript_15D75E:: @ 815D75E - move 2, MtPyre_Summit_Movement_15D7A0 - waitmove 0 + applymovement 2, MtPyre_Summit_Movement_15D7A0 + waitmovement 0 return MtPyre_Summit_EventScript_15D769:: @ 815D769 - move 2, MtPyre_Summit_Movement_15D7A3 - waitmove 0 + applymovement 2, MtPyre_Summit_Movement_15D7A3 + waitmovement 0 return MtPyre_Summit_EventScript_15D774:: @ 815D774 - move 2, MtPyre_Summit_Movement_15D7A4 - waitmove 0 + applymovement 2, MtPyre_Summit_Movement_15D7A4 + waitmovement 0 return MtPyre_Summit_EventScript_15D77F:: @ 815D77F - move 2, MtPyre_Summit_Movement_15D7A7 - waitmove 0 + applymovement 2, MtPyre_Summit_Movement_15D7A7 + waitmovement 0 return MtPyre_Summit_EventScript_15D78A:: @ 815D78A - move 2, MtPyre_Summit_Movement_15D7B0 - waitmove 0 + applymovement 2, MtPyre_Summit_Movement_15D7B0 + waitmovement 0 return MtPyre_Summit_EventScript_15D795:: @ 815D795 - move 2, MtPyre_Summit_Movement_15D7B9 - waitmove 0 + applymovement 2, MtPyre_Summit_Movement_15D7B9 + waitmovement 0 return MtPyre_Summit_Movement_15D7A0:: @ 815D7A0 diff --git a/data/scripts/maps/NewMauville_Entrance.inc b/data/scripts/maps/NewMauville_Entrance.inc index 547fc72e7..6429ff2f9 100644 --- a/data/scripts/maps/NewMauville_Entrance.inc +++ b/data/scripts/maps/NewMauville_Entrance.inc @@ -5,7 +5,7 @@ NewMauville_Entrance_MapScripts:: @ 815E48A NewMauville_Entrance_MapScript1_15E495:: @ 815E495 compare 0x40ba, 0 - callif 1, NewMauville_Entrance_EventScript_15E4A1 + call_if 1, NewMauville_Entrance_EventScript_15E4A1 end NewMauville_Entrance_EventScript_15E4A1:: @ 815E4A1 @@ -23,15 +23,15 @@ NewMauville_Entrance_MapScript1_15E4D8:: @ 815E4D8 NewMauville_Entrance_EventScript_15E4DC:: @ 815E4DC lockall - move 255, NewMauville_Entrance_Movement_1A0841 - waitmove 0 + applymovement 255, NewMauville_Entrance_Movement_1A0841 + waitmovement 0 msgbox NewMauville_Entrance_Text_1982C0, 4 checkitem ITEM_BASEMENT_KEY, 1 compare RESULT, 0 - jumpeq NewMauville_Entrance_EventScript_15E55D + goto_if_eq NewMauville_Entrance_EventScript_15E55D msgbox NewMauville_Entrance_Text_1982D4, 5 compare RESULT, 0 - jumpeq NewMauville_Entrance_EventScript_15E55D + goto_if_eq NewMauville_Entrance_EventScript_15E55D msgbox NewMauville_Entrance_Text_1982EA, 4 setmaptile 3, 0, 707, 0 setmaptile 4, 0, 708, 0 @@ -40,7 +40,7 @@ NewMauville_Entrance_EventScript_15E4DC:: @ 815E4DC setmaptile 4, 1, 716, 0 setmaptile 5, 1, 717, 1 special DrawWholeMapView - playsfx 20 + playse 20 setvar 0x40ba, 1 releaseall end diff --git a/data/scripts/maps/NewMauville_Inside.inc b/data/scripts/maps/NewMauville_Inside.inc index b088b8e7d..2d2a46ab4 100644 --- a/data/scripts/maps/NewMauville_Inside.inc +++ b/data/scripts/maps/NewMauville_Inside.inc @@ -6,15 +6,15 @@ NewMauville_Inside_MapScripts:: @ 815E55F NewMauville_Inside_MapScript1_15E56F:: @ 815E56F compare 0x4001, 1 - callif 1, NewMauville_Inside_EventScript_15E5DA + call_if 1, NewMauville_Inside_EventScript_15E5DA compare 0x4002, 1 - callif 1, NewMauville_Inside_EventScript_15E728 + call_if 1, NewMauville_Inside_EventScript_15E728 checkflag 2145 - callif 1, NewMauville_Inside_EventScript_15E58F + call_if 1, NewMauville_Inside_EventScript_15E58F end NewMauville_Inside_EventScript_15E58F:: @ 815E58F - disappear LAST_TALKED + removeobject LAST_TALKED return NewMauville_Inside_MapScript1_15E593:: @ 815E593 @@ -24,14 +24,14 @@ NewMauville_Inside_MapScript1_15E593:: @ 815E593 NewMauville_Inside_MapScript1_15E59E:: @ 815E59E compare 0x40ba, 2 - callif 1, NewMauville_Inside_EventScript_15E88B + call_if 1, NewMauville_Inside_EventScript_15E88B end NewMauville_Inside_EventScript_15E5AA:: @ 815E5AA lockall setvar 0x4001, 1 setvar 0x4002, 0 - playsfx 21 + playse 21 call NewMauville_Inside_EventScript_15E5DA special DrawWholeMapView releaseall @@ -41,7 +41,7 @@ NewMauville_Inside_EventScript_15E5C2:: @ 815E5C2 lockall setvar 0x4001, 0 setvar 0x4002, 1 - playsfx 21 + playse 21 call NewMauville_Inside_EventScript_15E728 special DrawWholeMapView releaseall @@ -151,7 +151,7 @@ NewMauville_Inside_EventScript_15E88B:: @ 815E88B NewMauville_Inside_EventScript_15E8E0:: @ 815E8E0 lockall compare 0x40ba, 2 - jumpeq NewMauville_Inside_EventScript_15E8F6 + goto_if_eq NewMauville_Inside_EventScript_15E8F6 msgbox NewMauville_Inside_Text_198315, 4 releaseall end @@ -165,9 +165,9 @@ NewMauville_Inside_EventScript_15E900:: @ 815E900 lock faceplayer setwildbattle SPECIES_VOLTORB, 25, ITEM_NONE - checksound - pokecry SPECIES_VOLTORB, 2 - pause 40 + waitse + playpokecry SPECIES_VOLTORB, 2 + delay 40 waitpokecry setflag 974 setflag 2145 @@ -180,9 +180,9 @@ NewMauville_Inside_EventScript_15E91E:: @ 815E91E lock faceplayer setwildbattle SPECIES_VOLTORB, 25, ITEM_NONE - checksound - pokecry SPECIES_VOLTORB, 2 - pause 40 + waitse + playpokecry SPECIES_VOLTORB, 2 + delay 40 waitpokecry setflag 975 setflag 2145 @@ -195,9 +195,9 @@ NewMauville_Inside_EventScript_15E93C:: @ 815E93C lock faceplayer setwildbattle SPECIES_VOLTORB, 25, ITEM_NONE - checksound - pokecry SPECIES_VOLTORB, 2 - pause 40 + waitse + playpokecry SPECIES_VOLTORB, 2 + delay 40 waitpokecry setflag 976 setflag 2145 diff --git a/data/scripts/maps/OldaleTown.inc b/data/scripts/maps/OldaleTown.inc index 68ed80949..e80df2cd2 100644 --- a/data/scripts/maps/OldaleTown.inc +++ b/data/scripts/maps/OldaleTown.inc @@ -6,11 +6,11 @@ OldaleTown_MapScript1_14DD68:: @ 814DD68 call OldaleTown_EventScript_1A014E setflag 2064 checkflag 116 - callif 0, OldaleTown_EventScript_14DD92 + call_if 0, OldaleTown_EventScript_14DD92 checkflag 132 - callif 0, OldaleTown_EventScript_14DD9E + call_if 0, OldaleTown_EventScript_14DD9E checkflag 116 - callif 1, OldaleTown_EventScript_14DD8C + call_if 1, OldaleTown_EventScript_14DD8C end OldaleTown_EventScript_14DD8C:: @ 814DD8C @@ -18,13 +18,13 @@ OldaleTown_EventScript_14DD8C:: @ 814DD8C return OldaleTown_EventScript_14DD92:: @ 814DD92 - movespriteperm 3, 1, 11 - spritebehave 3, 9 + setobjectxyperm 3, 1, 11 + setobjectmovementtype 3, 9 return OldaleTown_EventScript_14DD9E:: @ 814DD9E - movespriteperm 2, 13, 14 - spritebehave 2, 8 + setobjectxyperm 2, 13, 14 + setobjectmovementtype 2, 8 return OldaleTown_EventScript_14DDAA:: @ 814DDAA @@ -39,13 +39,13 @@ OldaleTown_EventScript_14DDBC:: @ 814DDBC lock faceplayer checkflag 132 - jumpeq OldaleTown_EventScript_14DE79 + goto_if_eq OldaleTown_EventScript_14DE79 checkflag 1 - jumpeq OldaleTown_EventScript_14DE79 + goto_if_eq OldaleTown_EventScript_14DE79 setflag 1 - playmusic 420, 0 + playbgm 420, 0 msgbox OldaleTown_Text_16AEF2, 4 - closebutton + closemessage switch FACING case 1, OldaleTown_EventScript_14DE07 case 2, OldaleTown_EventScript_14DE1E @@ -53,34 +53,34 @@ OldaleTown_EventScript_14DDBC:: @ 814DDBC end OldaleTown_EventScript_14DE07:: @ 814DE07 - move 2, OldaleTown_Movement_14DE97 - move 255, OldaleTown_Movement_14DEC1 - waitmove 0 - jump OldaleTown_EventScript_14DE4C + applymovement 2, OldaleTown_Movement_14DE97 + applymovement 255, OldaleTown_Movement_14DEC1 + waitmovement 0 + goto OldaleTown_EventScript_14DE4C end OldaleTown_EventScript_14DE1E:: @ 814DE1E - move 2, OldaleTown_Movement_14DEA2 - move 255, OldaleTown_Movement_14DECB - waitmove 0 - jump OldaleTown_EventScript_14DE4C + applymovement 2, OldaleTown_Movement_14DEA2 + applymovement 255, OldaleTown_Movement_14DECB + waitmovement 0 + goto OldaleTown_EventScript_14DE4C end OldaleTown_EventScript_14DE35:: @ 814DE35 - move 255, OldaleTown_Movement_14DEB9 - move 2, OldaleTown_Movement_14DE8E - waitmove 0 - jump OldaleTown_EventScript_14DE4C + applymovement 255, OldaleTown_Movement_14DEB9 + applymovement 2, OldaleTown_Movement_14DE8E + waitmovement 0 + goto OldaleTown_EventScript_14DE4C end OldaleTown_EventScript_14DE4C:: @ 814DE4C msgbox OldaleTown_Text_16AF2F, 4 giveitem ITEM_POTION compare RESULT, 0 - jumpeq OldaleTown_EventScript_14DE83 + goto_if_eq OldaleTown_EventScript_14DE83 msgbox OldaleTown_Text_16AFE1, 4 setflag 132 - fadedefault + fadedefaultbgm release end @@ -91,7 +91,7 @@ OldaleTown_EventScript_14DE79:: @ 814DE79 OldaleTown_EventScript_14DE83:: @ 814DE83 msgbox OldaleTown_Text_1A0CC2, 4 - fadedefault + fadedefaultbgm release end @@ -196,23 +196,23 @@ OldaleTown_EventScript_14DEDF:: @ 814DEDF lock faceplayer checkflag 116 - jumpeq OldaleTown_EventScript_14DF26 + goto_if_eq OldaleTown_EventScript_14DF26 msgbox OldaleTown_Text_16B0CC, 4 - closebutton - move 3, OldaleTown_Movement_1A083D - waitmove 0 + closemessage + applymovement 3, OldaleTown_Movement_1A083D + waitmovement 0 release end OldaleTown_EventScript_14DEFF:: @ 814DEFF lockall - move 255, OldaleTown_Movement_14DFEC - move 3, OldaleTown_Movement_14DFEF - waitmove 0 + applymovement 255, OldaleTown_Movement_14DFEC + applymovement 3, OldaleTown_Movement_14DFEF + waitmovement 0 msgbox OldaleTown_Text_16B045, 4 - closebutton - move 3, OldaleTown_Movement_14DFF5 - waitmove 0 + closemessage + applymovement 3, OldaleTown_Movement_14DFF5 + waitmovement 0 releaseall end @@ -223,61 +223,61 @@ OldaleTown_EventScript_14DF26:: @ 814DF26 OldaleTown_EventScript_14DF30:: @ 814DF30 lockall - move 4, OldaleTown_Movement_1A0839 - waitmove 0 - jump OldaleTown_EventScript_14DF92 + applymovement 4, OldaleTown_Movement_1A0839 + waitmovement 0 + goto OldaleTown_EventScript_14DF92 end OldaleTown_EventScript_14DF41:: @ 814DF41 lockall - move 4, OldaleTown_Movement_14DFDE - waitmove 0 - move 255, OldaleTown_Movement_1A0843 - waitmove 0 - jump OldaleTown_EventScript_14DF92 + applymovement 4, OldaleTown_Movement_14DFDE + waitmovement 0 + applymovement 255, OldaleTown_Movement_1A0843 + waitmovement 0 + goto OldaleTown_EventScript_14DF92 end OldaleTown_EventScript_14DF5C:: @ 814DF5C lockall - move 4, OldaleTown_Movement_14DFE1 - waitmove 0 - move 255, OldaleTown_Movement_1A0843 - waitmove 0 - jump OldaleTown_EventScript_14DF92 + applymovement 4, OldaleTown_Movement_14DFE1 + waitmovement 0 + applymovement 255, OldaleTown_Movement_1A0843 + waitmovement 0 + goto OldaleTown_EventScript_14DF92 end OldaleTown_EventScript_14DF77:: @ 814DF77 lockall - move 4, OldaleTown_Movement_14DFE3 - waitmove 0 - move 255, OldaleTown_Movement_1A0843 - waitmove 0 - jump OldaleTown_EventScript_14DF92 + applymovement 4, OldaleTown_Movement_14DFE3 + waitmovement 0 + applymovement 255, OldaleTown_Movement_1A0843 + waitmovement 0 + goto OldaleTown_EventScript_14DF92 end OldaleTown_EventScript_14DF92:: @ 814DF92 - checkgender + checkplayergender compare RESULT, 0 - jumpeq OldaleTown_EventScript_14DFAA + goto_if_eq OldaleTown_EventScript_14DFAA compare RESULT, 1 - jumpeq OldaleTown_EventScript_14DFB8 + goto_if_eq OldaleTown_EventScript_14DFB8 end OldaleTown_EventScript_14DFAA:: @ 814DFAA msgbox OldaleTown_Text_16B196, 4 - jump OldaleTown_EventScript_14DFC6 + goto OldaleTown_EventScript_14DFC6 end OldaleTown_EventScript_14DFB8:: @ 814DFB8 msgbox OldaleTown_Text_16B1BE, 4 - jump OldaleTown_EventScript_14DFC6 + goto OldaleTown_EventScript_14DFC6 end OldaleTown_EventScript_14DFC6:: @ 814DFC6 - closebutton - move 4, OldaleTown_Movement_14DFE5 - waitmove 0 - disappear 4 + closemessage + applymovement 4, OldaleTown_Movement_14DFE5 + waitmovement 0 + removeobject 4 setvar 0x40c7, 2 setflag 979 releaseall diff --git a/data/scripts/maps/OldaleTown_Mart.inc b/data/scripts/maps/OldaleTown_Mart.inc index 3f4994890..b9698b58f 100644 --- a/data/scripts/maps/OldaleTown_Mart.inc +++ b/data/scripts/maps/OldaleTown_Mart.inc @@ -5,9 +5,9 @@ OldaleTown_Mart_EventScript_152F79:: @ 8152F79 lock faceplayer message OldaleTown_Mart_Text_1A0BE4 - waittext + waitmessage checkflag 116 - jumpeq OldaleTown_Mart_EventScript_152FA8 + goto_if_eq OldaleTown_Mart_EventScript_152FA8 pokemart OldaleTown_Mart_Items1 msgbox OldaleTown_Mart_Text_1A0C02, 4 release @@ -44,7 +44,7 @@ OldaleTown_Mart_EventScript_152FC6:: @ 8152FC6 lock faceplayer checkflag 116 - jumpeq OldaleTown_Mart_EventScript_152FDB + goto_if_eq OldaleTown_Mart_EventScript_152FDB msgbox OldaleTown_Mart_Text_174A8A, 4 release end diff --git a/data/scripts/maps/OldaleTown_PokemonCenter_1F.inc b/data/scripts/maps/OldaleTown_PokemonCenter_1F.inc index 4ba96ddc8..494f109fe 100644 --- a/data/scripts/maps/OldaleTown_PokemonCenter_1F.inc +++ b/data/scripts/maps/OldaleTown_PokemonCenter_1F.inc @@ -10,7 +10,7 @@ OldaleTown_PokemonCenter_1F_MapScript1_152F0E:: @ 8152F0E OldaleTown_PokemonCenter_1F_EventScript_152F17:: @ 8152F17 setvar 0x800b, 1 call OldaleTown_PokemonCenter_1F_EventScript_19FD5B - waittext + waitmessage waitbutton release end @@ -27,7 +27,7 @@ OldaleTown_PokemonCenter_1F_EventScript_152F37:: @ 8152F37 lock faceplayer checkflag 2049 - jumpeq OldaleTown_PokemonCenter_1F_EventScript_152F4C + goto_if_eq OldaleTown_PokemonCenter_1F_EventScript_152F4C msgbox OldaleTown_PokemonCenter_1F_Text_1749C0, 4 release end diff --git a/data/scripts/maps/PacifidlogTown_House2.inc b/data/scripts/maps/PacifidlogTown_House2.inc index e45f09de4..e04a8caae 100644 --- a/data/scripts/maps/PacifidlogTown_House2.inc +++ b/data/scripts/maps/PacifidlogTown_House2.inc @@ -4,30 +4,30 @@ PacifidlogTown_House2_MapScripts:: @ 8154167 PacifidlogTown_House2_EventScript_154168:: @ 8154168 lock faceplayer - checkdailyflags + dodailyevents call PacifidlogTown_House2_EventScript_1541B4 checkflag 299 - jumpeq PacifidlogTown_House2_EventScript_154254 + goto_if_eq PacifidlogTown_House2_EventScript_154254 checkflag 300 - callif 1, PacifidlogTown_House2_EventScript_1541CE + call_if 1, PacifidlogTown_House2_EventScript_1541CE checkflag 300 - callif 0, PacifidlogTown_House2_EventScript_1541D7 + call_if 0, PacifidlogTown_House2_EventScript_1541D7 setflag 300 - specialval RESULT, GetLeadMonFriendshipScore + specialvar RESULT, GetLeadMonFriendshipScore compare RESULT, 4 - jumpif 4, PacifidlogTown_House2_EventScript_1541EC - specialval RESULT, GetLeadMonFriendshipScore + goto_if 4, PacifidlogTown_House2_EventScript_1541EC + specialvar RESULT, GetLeadMonFriendshipScore compare RESULT, 2 - jumpif 4, PacifidlogTown_House2_EventScript_15421B - jump PacifidlogTown_House2_EventScript_154225 + goto_if 4, PacifidlogTown_House2_EventScript_15421B + goto PacifidlogTown_House2_EventScript_154225 end PacifidlogTown_House2_EventScript_1541B4:: @ 81541B4 checkflag 299 - jumpif 0, PacifidlogTown_House2_EventScript_1A14DC - specialval RESULT, sub_810F908 + goto_if 0, PacifidlogTown_House2_EventScript_1A14DC + specialvar RESULT, sub_810F908 compare RESULT, 0 - callif 1, PacifidlogTown_House2_EventScript_1541E8 + call_if 1, PacifidlogTown_House2_EventScript_1541E8 return PacifidlogTown_House2_EventScript_1541CE:: @ 81541CE @@ -47,7 +47,7 @@ PacifidlogTown_House2_EventScript_1541EC:: @ 81541EC msgbox PacifidlogTown_House2_Text_179169, 4 giveitem ITEM_TM27 compare RESULT, 0 - jumpeq PacifidlogTown_House2_EventScript_1A029B + goto_if_eq PacifidlogTown_House2_EventScript_1A029B setflag 299 special sub_810F950 msgbox PacifidlogTown_House2_Text_179283, 4 @@ -63,7 +63,7 @@ PacifidlogTown_House2_EventScript_154225:: @ 8154225 msgbox PacifidlogTown_House2_Text_17922D, 4 giveitem ITEM_TM21 compare RESULT, 0 - jumpeq PacifidlogTown_House2_EventScript_1A029B + goto_if_eq PacifidlogTown_House2_EventScript_1A029B setflag 299 special sub_810F950 msgbox PacifidlogTown_House2_Text_179283, 4 @@ -71,8 +71,8 @@ PacifidlogTown_House2_EventScript_154225:: @ 8154225 end PacifidlogTown_House2_EventScript_154254:: @ 8154254 - specialval RESULT, sub_810F908 - buffernum 0, RESULT + specialvar RESULT, sub_810F908 + getnumberstring 0, RESULT msgbox PacifidlogTown_House2_Text_1792F2, 4 release end @@ -80,8 +80,8 @@ PacifidlogTown_House2_EventScript_154254:: @ 8154254 PacifidlogTown_House2_EventScript_154267:: @ 8154267 lock faceplayer - checksound - pokecry SPECIES_AZURILL, 0 + waitse + playpokecry SPECIES_AZURILL, 0 msgbox PacifidlogTown_House2_Text_17938B, 4 waitpokecry msgbox PacifidlogTown_House2_Text_17939B, 4 @@ -91,8 +91,8 @@ PacifidlogTown_House2_EventScript_154267:: @ 8154267 PacifidlogTown_House2_EventScript_154282:: @ 8154282 lock faceplayer - checksound - pokecry SPECIES_AZURILL, 2 + waitse + playpokecry SPECIES_AZURILL, 2 msgbox PacifidlogTown_House2_Text_1793CC, 4 waitpokecry msgbox PacifidlogTown_House2_Text_1793DD, 4 diff --git a/data/scripts/maps/PacifidlogTown_House3.inc b/data/scripts/maps/PacifidlogTown_House3.inc index 6ab9a09b0..28b9dbd80 100644 --- a/data/scripts/maps/PacifidlogTown_House3.inc +++ b/data/scripts/maps/PacifidlogTown_House3.inc @@ -5,30 +5,30 @@ PacifidlogTown_House3_EventScript_15429E:: @ 815429E lock faceplayer checkflag 154 - jumpeq PacifidlogTown_House3_EventScript_154338 + goto_if_eq PacifidlogTown_House3_EventScript_154338 setvar 0x8008, 2 copyvar 0x8004, 0x8008 - specialval RESULT, sub_804D89C + specialvar RESULT, sub_804D89C copyvar 0x8009, RESULT msgbox PacifidlogTown_House3_Text_17940E, 5 compare RESULT, 0 - jumpeq PacifidlogTown_House3_EventScript_154320 + goto_if_eq PacifidlogTown_House3_EventScript_154320 special sub_80F9A0C waitstate copyvar 0x800a, 0x8004 compare 0x8004, 255 - jumpeq PacifidlogTown_House3_EventScript_154320 + goto_if_eq PacifidlogTown_House3_EventScript_154320 copyvar 0x8005, 0x800a - specialval RESULT, sub_804DB2C + specialvar RESULT, sub_804DB2C copyvar 0x800b, RESULT - comparevars RESULT, 0x8009 - jumpif 5, PacifidlogTown_House3_EventScript_15432A + compare RESULT, 0x8009 + goto_if 5, PacifidlogTown_House3_EventScript_15432A copyvar 0x8004, 0x8008 copyvar 0x8005, 0x800a special sub_804DB68 special sub_804E174 waitstate - bufferpoke 0, 0x8009 + getspeciesname 0, 0x8009 msgbox PacifidlogTown_House3_Text_1794C4, 4 setflag 154 release @@ -40,7 +40,7 @@ PacifidlogTown_House3_EventScript_154320:: @ 8154320 end PacifidlogTown_House3_EventScript_15432A:: @ 815432A - bufferpoke 0, 0x8009 + getspeciesname 0, 0x8009 msgbox PacifidlogTown_House3_Text_1794DF, 4 release end diff --git a/data/scripts/maps/PacifidlogTown_House4.inc b/data/scripts/maps/PacifidlogTown_House4.inc index e48644beb..b7a6c9f86 100644 --- a/data/scripts/maps/PacifidlogTown_House4.inc +++ b/data/scripts/maps/PacifidlogTown_House4.inc @@ -14,9 +14,9 @@ PacifidlogTown_House4_EventScript_15435E:: @ 815435E faceplayer msgbox PacifidlogTown_House4_Text_17963D, 5 compare RESULT, 1 - jumpeq PacifidlogTown_House4_EventScript_15437F + goto_if_eq PacifidlogTown_House4_EventScript_15437F compare RESULT, 0 - jumpeq PacifidlogTown_House4_EventScript_154389 + goto_if_eq PacifidlogTown_House4_EventScript_154389 end PacifidlogTown_House4_EventScript_15437F:: @ 815437F diff --git a/data/scripts/maps/PacifidlogTown_House5.inc b/data/scripts/maps/PacifidlogTown_House5.inc index dca1a51b0..46b1990df 100644 --- a/data/scripts/maps/PacifidlogTown_House5.inc +++ b/data/scripts/maps/PacifidlogTown_House5.inc @@ -4,9 +4,9 @@ PacifidlogTown_House5_MapScripts:: @ 8154393 PacifidlogTown_House5_EventScript_154394:: @ 8154394 lock faceplayer - specialval RESULT, IsMirageIslandPresent + specialvar RESULT, IsMirageIslandPresent compare RESULT, 1 - jumpeq PacifidlogTown_House5_EventScript_1543B0 + goto_if_eq PacifidlogTown_House5_EventScript_1543B0 msgbox PacifidlogTown_House5_Text_179718, 4 release end diff --git a/data/scripts/maps/PacifidlogTown_PokemonCenter_1F.inc b/data/scripts/maps/PacifidlogTown_PokemonCenter_1F.inc index 973f80a55..64dd5008c 100644 --- a/data/scripts/maps/PacifidlogTown_PokemonCenter_1F.inc +++ b/data/scripts/maps/PacifidlogTown_PokemonCenter_1F.inc @@ -9,7 +9,7 @@ PacifidlogTown_PokemonCenter_1F_MapScript1_154105:: @ 8154105 @ 8154109 setvar 0x800b, 1 call VerdanturfTown_PokemonCenter_1F_EventScript_19FD5B - waittext + waitmessage waitbutton release end diff --git a/data/scripts/maps/PetalburgCity.inc b/data/scripts/maps/PetalburgCity.inc index 123b099fe..1c2711b83 100644 --- a/data/scripts/maps/PetalburgCity.inc +++ b/data/scripts/maps/PetalburgCity.inc @@ -6,17 +6,17 @@ PetalburgCity_MapScripts:: @ 814B70C PetalburgCity_MapScript1_14B717:: @ 814B717 setflag 2070 compare 0x4057, 0 - callif 1, PetalburgCity_EventScript_14B731 + call_if 1, PetalburgCity_EventScript_14B731 compare 0x4057, 2 - callif 1, PetalburgCity_EventScript_14B739 + call_if 1, PetalburgCity_EventScript_14B739 end PetalburgCity_EventScript_14B731:: @ 814B731 - movespriteperm 9, 5, 11 + setobjectxyperm 9, 5, 11 return PetalburgCity_EventScript_14B739:: @ 814B739 - playmusicbattle 420 + savebgm 420 return PetalburgCity_MapScript2_14B73D:: @ 814B73D @@ -28,20 +28,20 @@ PetalburgCity_EventScript_14B747:: @ 814B747 setflag 0x4000 special SavePlayerParty special PutZigzagoonInPlayerParty - move 2, PetalburgCity_Movement_14B7ED - move 255, PetalburgCity_Movement_14B7CC - waitmove 0 + applymovement 2, PetalburgCity_Movement_14B7ED + applymovement 255, PetalburgCity_Movement_14B7CC + waitmovement 0 msgbox PetalburgCity_Text_16D361, 4 special ScrSpecial_StartWallyTutorialBattle waitstate msgbox PetalburgCity_Text_16D3DE, 4 - movecoords 2, PetalburgCity_Movement_1A083F, 0, 0 - waitmovexy 0, 0, 2 + applymovement 2, PetalburgCity_Movement_1A083F, 0, 0 + waitmovement 0, 0, 2 msgbox PetalburgCity_Text_16D408, 4 - closebutton + closemessage clearflag 0x4000 setvar 0x4057, 3 - fadedefault + fadedefaultbgm clearflag 0x4001 special LoadPlayerParty setvar 0x4085, 1 @@ -54,9 +54,9 @@ PetalburgCity_EventScript_14B7AC:: @ 814B7AC lock faceplayer msgbox PetalburgCity_Text_164490, 4 - closebutton - move 3, PetalburgCity_Movement_1A083D - waitmove 0 + closemessage + applymovement 3, PetalburgCity_Movement_1A083D + waitmovement 0 release end @@ -157,114 +157,114 @@ PetalburgCity_EventScript_14B82D:: @ 814B82D PetalburgCity_EventScript_14B836:: @ 814B836 lockall setvar 0x8008, 0 - jump PetalburgCity_EventScript_14B866 + goto PetalburgCity_EventScript_14B866 end PetalburgCity_EventScript_14B842:: @ 814B842 lockall setvar 0x8008, 1 - jump PetalburgCity_EventScript_14B866 + goto PetalburgCity_EventScript_14B866 end PetalburgCity_EventScript_14B84E:: @ 814B84E lockall setvar 0x8008, 2 - jump PetalburgCity_EventScript_14B866 + goto PetalburgCity_EventScript_14B866 end PetalburgCity_EventScript_14B85A:: @ 814B85A lockall setvar 0x8008, 3 - jump PetalburgCity_EventScript_14B866 + goto PetalburgCity_EventScript_14B866 end PetalburgCity_EventScript_14B866:: @ 814B866 - move 9, PetalburgCity_Movement_1A0839 - waitmove 0 - playmusic 420, 0 - playsfx 21 - move 9, PetalburgCity_Movement_1A0833 - waitmove 0 - move 9, PetalburgCity_Movement_1A0835 - waitmove 0 + applymovement 9, PetalburgCity_Movement_1A0839 + waitmovement 0 + playbgm 420, 0 + playse 21 + applymovement 9, PetalburgCity_Movement_1A0833 + waitmovement 0 + applymovement 9, PetalburgCity_Movement_1A0835 + waitmovement 0 compare 0x8008, 0 - callif 1, PetalburgCity_EventScript_14B91B + call_if 1, PetalburgCity_EventScript_14B91B compare 0x8008, 1 - callif 1, PetalburgCity_EventScript_14B930 + call_if 1, PetalburgCity_EventScript_14B930 compare 0x8008, 2 - callif 1, PetalburgCity_EventScript_14B93B + call_if 1, PetalburgCity_EventScript_14B93B compare 0x8008, 3 - callif 1, PetalburgCity_EventScript_14B950 + call_if 1, PetalburgCity_EventScript_14B950 msgbox PetalburgCity_Text_16438A, 4 - closebutton + closemessage compare 0x8008, 0 - callif 1, PetalburgCity_EventScript_14B965 + call_if 1, PetalburgCity_EventScript_14B965 compare 0x8008, 1 - callif 1, PetalburgCity_EventScript_14B977 + call_if 1, PetalburgCity_EventScript_14B977 compare 0x8008, 2 - callif 1, PetalburgCity_EventScript_14B989 + call_if 1, PetalburgCity_EventScript_14B989 compare 0x8008, 3 - callif 1, PetalburgCity_EventScript_14B99B + call_if 1, PetalburgCity_EventScript_14B99B msgbox PetalburgCity_Text_164426, 4 - move 9, PetalburgCity_Movement_1A0843 - move 255, PetalburgCity_Movement_1A0843 - waitmove 0 + applymovement 9, PetalburgCity_Movement_1A0843 + applymovement 255, PetalburgCity_Movement_1A0843 + waitmovement 0 msgbox PetalburgCity_Text_164449, 4 - closebutton - move 9, PetalburgCity_Movement_14B9F4 - waitmove 0 - fadedefault + closemessage + applymovement 9, PetalburgCity_Movement_14B9F4 + waitmovement 0 + fadedefaultbgm releaseall end PetalburgCity_EventScript_14B91B:: @ 814B91B - move 9, PetalburgCity_Movement_14B9B1 - waitmove 0 - move 255, PetalburgCity_Movement_1A0845 - waitmove 0 + applymovement 9, PetalburgCity_Movement_14B9B1 + waitmovement 0 + applymovement 255, PetalburgCity_Movement_1A0845 + waitmovement 0 return PetalburgCity_EventScript_14B930:: @ 814B930 - move 9, PetalburgCity_Movement_14B9B6 - waitmove 0 + applymovement 9, PetalburgCity_Movement_14B9B6 + waitmovement 0 return PetalburgCity_EventScript_14B93B:: @ 814B93B - move 9, PetalburgCity_Movement_14B9B9 - waitmove 0 - move 255, PetalburgCity_Movement_1A0841 - waitmove 0 + applymovement 9, PetalburgCity_Movement_14B9B9 + waitmovement 0 + applymovement 255, PetalburgCity_Movement_1A0841 + waitmovement 0 return PetalburgCity_EventScript_14B950:: @ 814B950 - move 9, PetalburgCity_Movement_14B9BE - waitmove 0 - move 255, PetalburgCity_Movement_1A0841 - waitmove 0 + applymovement 9, PetalburgCity_Movement_14B9BE + waitmovement 0 + applymovement 255, PetalburgCity_Movement_1A0841 + waitmovement 0 return PetalburgCity_EventScript_14B965:: @ 814B965 - move 9, PetalburgCity_Movement_14B9C4 - move 255, PetalburgCity_Movement_14BA01 - waitmove 0 + applymovement 9, PetalburgCity_Movement_14B9C4 + applymovement 255, PetalburgCity_Movement_14BA01 + waitmovement 0 return PetalburgCity_EventScript_14B977:: @ 814B977 - move 9, PetalburgCity_Movement_14B9CF - move 255, PetalburgCity_Movement_14BA0B - waitmove 0 + applymovement 9, PetalburgCity_Movement_14B9CF + applymovement 255, PetalburgCity_Movement_14BA0B + waitmovement 0 return PetalburgCity_EventScript_14B989:: @ 814B989 - move 9, PetalburgCity_Movement_14B9DD - move 255, PetalburgCity_Movement_14BA18 - waitmove 0 + applymovement 9, PetalburgCity_Movement_14B9DD + applymovement 255, PetalburgCity_Movement_14BA18 + waitmovement 0 return PetalburgCity_EventScript_14B99B:: @ 814B99B - move 9, PetalburgCity_Movement_14B9E8 - move 255, PetalburgCity_Movement_14BA22 - waitmove 0 + applymovement 9, PetalburgCity_Movement_14B9E8 + applymovement 255, PetalburgCity_Movement_14BA22 + waitmovement 0 return @ 814B9AD diff --git a/data/scripts/maps/PetalburgCity_Gym.inc b/data/scripts/maps/PetalburgCity_Gym.inc index c534cb538..b2d104894 100644 --- a/data/scripts/maps/PetalburgCity_Gym.inc +++ b/data/scripts/maps/PetalburgCity_Gym.inc @@ -7,28 +7,28 @@ PetalburgCity_Gym_MapScripts:: @ 8154477 PetalburgCity_Gym_MapScript1_15448C:: @ 815448C compare 0x4085, 6 - jumpeq PetalburgCity_Gym_EventScript_1544A3 + goto_if_eq PetalburgCity_Gym_EventScript_1544A3 compare 0x4085, 7 - callif 4, PetalburgCity_Gym_EventScript_1544ED + call_if 4, PetalburgCity_Gym_EventScript_1544ED end PetalburgCity_Gym_EventScript_1544A3:: @ 81544A3 setvar 0x8005, 1 call PetalburgCity_Gym_EventScript_154F9A checktrainerflag OPPONENT_RANDALL - callif 1, PetalburgCity_Gym_EventScript_154FBB + call_if 1, PetalburgCity_Gym_EventScript_154FBB checktrainerflag OPPONENT_MARY - callif 1, PetalburgCity_Gym_EventScript_154FDC + call_if 1, PetalburgCity_Gym_EventScript_154FDC checktrainerflag OPPONENT_PARKER - callif 1, PetalburgCity_Gym_EventScript_154FFD + call_if 1, PetalburgCity_Gym_EventScript_154FFD checktrainerflag OPPONENT_LORI - callif 1, PetalburgCity_Gym_EventScript_15501E + call_if 1, PetalburgCity_Gym_EventScript_15501E checktrainerflag OPPONENT_GEORGE - callif 1, PetalburgCity_Gym_EventScript_15503F + call_if 1, PetalburgCity_Gym_EventScript_15503F checktrainerflag OPPONENT_JODY - callif 1, PetalburgCity_Gym_EventScript_155060 + call_if 1, PetalburgCity_Gym_EventScript_155060 checktrainerflag OPPONENT_BERKE - callif 1, PetalburgCity_Gym_EventScript_155081 + call_if 1, PetalburgCity_Gym_EventScript_155081 end PetalburgCity_Gym_EventScript_1544ED:: @ 81544ED @@ -45,23 +45,23 @@ PetalburgCity_Gym_EventScript_1544ED:: @ 81544ED PetalburgCity_Gym_MapScript1_15451B:: @ 815451B compare 0x4085, 1 - callif 1, PetalburgCity_Gym_EventScript_15453B + call_if 1, PetalburgCity_Gym_EventScript_15453B compare 0x4085, 6 - callif 0, PetalburgCity_Gym_EventScript_154543 + call_if 0, PetalburgCity_Gym_EventScript_154543 checkflag 2052 - callif 1, PetalburgCity_Gym_EventScript_15454B + call_if 1, PetalburgCity_Gym_EventScript_15454B end PetalburgCity_Gym_EventScript_15453B:: @ 815453B - movespriteperm 10, 5, 108 + setobjectxyperm 10, 5, 108 return PetalburgCity_Gym_EventScript_154543:: @ 8154543 - movespriteperm 1, 4, 107 + setobjectxyperm 1, 4, 107 return PetalburgCity_Gym_EventScript_15454B:: @ 815454B - movespriteperm 1, 4, 107 + setobjectxyperm 1, 4, 107 return PetalburgCity_Gym_MapScript2_154553:: @ 8154553 @@ -69,7 +69,7 @@ PetalburgCity_Gym_MapScript2_154553:: @ 8154553 .2byte 0 PetalburgCity_Gym_EventScript_15455D:: @ 815455D - spriteface 255, 2 + turnobject 255, 2 end PetalburgCity_Gym_MapScript2_154562:: @ 8154562 @@ -80,16 +80,16 @@ PetalburgCity_Gym_EventScript_15456C:: @ 815456C lockall msgbox PetalburgCity_Gym_Text_17A196, 4 msgbox PetalburgCity_Gym_Text_17A1B0, 4 - closebutton - move 255, PetalburgCity_Gym_Movement_1A0845 - move 10, PetalburgCity_Gym_Movement_1545B4 - waitmove 0 - playsfx 9 - disappear 10 + closemessage + applymovement 255, PetalburgCity_Gym_Movement_1A0845 + applymovement 10, PetalburgCity_Gym_Movement_1545B4 + waitmovement 0 + playse 9 + removeobject 10 setflag 726 - pause 30 - move 255, PetalburgCity_Gym_Movement_1A0841 - waitmove 0 + delay 30 + applymovement 255, PetalburgCity_Gym_Movement_1A0841 + waitmovement 0 msgbox PetalburgCity_Gym_Text_17A2A4, 4 setvar 0x4085, 2 releaseall @@ -113,7 +113,7 @@ PetalburgCity_Gym_EventScript_1545B9:: @ 81545B9 case 6, PetalburgCity_Gym_EventScript_1549D6 case 7, PetalburgCity_Gym_EventScript_15493D msgbox PetalburgCity_Gym_Text_179DF6, 4 - closebutton + closemessage switch FACING case 1, PetalburgCity_Gym_EventScript_15463D case 2, PetalburgCity_Gym_EventScript_154648 @@ -123,88 +123,88 @@ PetalburgCity_Gym_EventScript_1545B9:: @ 81545B9 PetalburgCity_Gym_EventScript_15463D:: @ 815463D setvar 0x8008, 0 - jump PetalburgCity_Gym_EventScript_154669 + goto PetalburgCity_Gym_EventScript_154669 end PetalburgCity_Gym_EventScript_154648:: @ 8154648 setvar 0x8008, 1 - jump PetalburgCity_Gym_EventScript_154669 + goto PetalburgCity_Gym_EventScript_154669 end PetalburgCity_Gym_EventScript_154653:: @ 8154653 setvar 0x8008, 2 - jump PetalburgCity_Gym_EventScript_154669 + goto PetalburgCity_Gym_EventScript_154669 end PetalburgCity_Gym_EventScript_15465E:: @ 815465E setvar 0x8008, 3 - jump PetalburgCity_Gym_EventScript_154669 + goto PetalburgCity_Gym_EventScript_154669 end PetalburgCity_Gym_EventScript_154669:: @ 8154669 - reappear 10 - playsfx 8 + addobject 10 + playse 8 compare 0x8008, 0 - callif 1, PetalburgCity_Gym_EventScript_1547EE + call_if 1, PetalburgCity_Gym_EventScript_1547EE compare 0x8008, 1 - callif 1, PetalburgCity_Gym_EventScript_154800 + call_if 1, PetalburgCity_Gym_EventScript_154800 compare 0x8008, 2 - callif 1, PetalburgCity_Gym_EventScript_15481C + call_if 1, PetalburgCity_Gym_EventScript_15481C compare 0x8008, 3 - callif 1, PetalburgCity_Gym_EventScript_15481C + call_if 1, PetalburgCity_Gym_EventScript_15481C msgbox PetalburgCity_Gym_Text_179F07, 4 msgbox PetalburgCity_Gym_Text_179F37, 4 msgbox PetalburgCity_Gym_Text_179F70, 4 msgbox PetalburgCity_Gym_Text_17A03A, 4 compare 0x8008, 0 - callif 1, PetalburgCity_Gym_EventScript_154884 + call_if 1, PetalburgCity_Gym_EventScript_154884 compare 0x8008, 1 - callif 1, PetalburgCity_Gym_EventScript_15488F + call_if 1, PetalburgCity_Gym_EventScript_15488F compare 0x8008, 2 - callif 1, PetalburgCity_Gym_EventScript_1548A1 + call_if 1, PetalburgCity_Gym_EventScript_1548A1 compare 0x8008, 3 - callif 1, PetalburgCity_Gym_EventScript_1548B3 + call_if 1, PetalburgCity_Gym_EventScript_1548B3 msgbox PetalburgCity_Gym_Text_17A04A, 4 compare 0x8008, 0 - callif 1, PetalburgCity_Gym_EventScript_1548C5 + call_if 1, PetalburgCity_Gym_EventScript_1548C5 compare 0x8008, 1 - callif 1, PetalburgCity_Gym_EventScript_1548D0 + call_if 1, PetalburgCity_Gym_EventScript_1548D0 compare 0x8008, 2 - callif 1, PetalburgCity_Gym_EventScript_1548DB + call_if 1, PetalburgCity_Gym_EventScript_1548DB compare 0x8008, 3 - callif 1, PetalburgCity_Gym_EventScript_1548E6 + call_if 1, PetalburgCity_Gym_EventScript_1548E6 msgbox PetalburgCity_Gym_Text_17A0A8, 4 msgbox PetalburgCity_Gym_Text_17A0EB, 4 msgbox PetalburgCity_Gym_Text_17A156, 4 compare 0x8008, 0 - callif 1, PetalburgCity_Gym_EventScript_15492F + call_if 1, PetalburgCity_Gym_EventScript_15492F compare 0x8008, 1 - callif 1, PetalburgCity_Gym_EventScript_154930 + call_if 1, PetalburgCity_Gym_EventScript_154930 compare 0x8008, 2 - callif 1, PetalburgCity_Gym_EventScript_15493B + call_if 1, PetalburgCity_Gym_EventScript_15493B compare 0x8008, 3 - callif 1, PetalburgCity_Gym_EventScript_15493C + call_if 1, PetalburgCity_Gym_EventScript_15493C compare 0x8008, 0 - callif 1, PetalburgCity_Gym_EventScript_1548F1 + call_if 1, PetalburgCity_Gym_EventScript_1548F1 compare 0x8008, 1 - callif 1, PetalburgCity_Gym_EventScript_1548FC + call_if 1, PetalburgCity_Gym_EventScript_1548FC compare 0x8008, 2 - callif 1, PetalburgCity_Gym_EventScript_1548F1 + call_if 1, PetalburgCity_Gym_EventScript_1548F1 compare 0x8008, 3 - callif 1, PetalburgCity_Gym_EventScript_1548F1 + call_if 1, PetalburgCity_Gym_EventScript_1548F1 msgbox PetalburgCity_Gym_Text_17A171, 4 - closebutton + closemessage setflag 0x4001 - playmusic 420, 0 + playbgm 420, 0 compare 0x8008, 0 - callif 1, PetalburgCity_Gym_EventScript_154835 + call_if 1, PetalburgCity_Gym_EventScript_154835 compare 0x8008, 1 - callif 1, PetalburgCity_Gym_EventScript_15484E + call_if 1, PetalburgCity_Gym_EventScript_15484E compare 0x8008, 2 - callif 1, PetalburgCity_Gym_EventScript_154860 + call_if 1, PetalburgCity_Gym_EventScript_154860 compare 0x8008, 3 - callif 1, PetalburgCity_Gym_EventScript_154872 - disappear 10 + call_if 1, PetalburgCity_Gym_EventScript_154872 + removeobject 10 setflag 728 setvar 0x4085, 1 setvar 0x4057, 2 @@ -218,102 +218,102 @@ PetalburgCity_Gym_EventScript_154669:: @ 8154669 end PetalburgCity_Gym_EventScript_1547EE:: @ 81547EE - move 1, PetalburgCity_Gym_Movement_1A0845 - move 10, PetalburgCity_Gym_Movement_154B27 - waitmove 0 + applymovement 1, PetalburgCity_Gym_Movement_1A0845 + applymovement 10, PetalburgCity_Gym_Movement_154B27 + waitmovement 0 return PetalburgCity_Gym_EventScript_154800:: @ 8154800 - move 10, PetalburgCity_Gym_Movement_154B1D - waitmove 0 - move 1, PetalburgCity_Gym_Movement_1A0843 - move 255, PetalburgCity_Gym_Movement_1A0843 - waitmove 0 + applymovement 10, PetalburgCity_Gym_Movement_154B1D + waitmovement 0 + applymovement 1, PetalburgCity_Gym_Movement_1A0843 + applymovement 255, PetalburgCity_Gym_Movement_1A0843 + waitmovement 0 return PetalburgCity_Gym_EventScript_15481C:: @ 815481C - move 1, PetalburgCity_Gym_Movement_1A0845 - move 255, PetalburgCity_Gym_Movement_1A0845 - move 10, PetalburgCity_Gym_Movement_154B27 - waitmove 0 + applymovement 1, PetalburgCity_Gym_Movement_1A0845 + applymovement 255, PetalburgCity_Gym_Movement_1A0845 + applymovement 10, PetalburgCity_Gym_Movement_154B27 + waitmovement 0 return PetalburgCity_Gym_EventScript_154835:: @ 8154835 - move 1, PetalburgCity_Gym_Movement_1A0845 - move 10, PetalburgCity_Gym_Movement_154B3E - move 255, PetalburgCity_Gym_Movement_154B4D - waitmove 0 + applymovement 1, PetalburgCity_Gym_Movement_1A0845 + applymovement 10, PetalburgCity_Gym_Movement_154B3E + applymovement 255, PetalburgCity_Gym_Movement_154B4D + waitmovement 0 return PetalburgCity_Gym_EventScript_15484E:: @ 815484E - move 10, PetalburgCity_Gym_Movement_154B2E - move 255, PetalburgCity_Gym_Movement_154B45 - waitmove 0 + applymovement 10, PetalburgCity_Gym_Movement_154B2E + applymovement 255, PetalburgCity_Gym_Movement_154B45 + waitmovement 0 return PetalburgCity_Gym_EventScript_154860:: @ 8154860 - move 10, PetalburgCity_Gym_Movement_154B3E - move 255, PetalburgCity_Gym_Movement_154B57 - waitmove 0 + applymovement 10, PetalburgCity_Gym_Movement_154B3E + applymovement 255, PetalburgCity_Gym_Movement_154B57 + waitmovement 0 return PetalburgCity_Gym_EventScript_154872:: @ 8154872 - move 10, PetalburgCity_Gym_Movement_154B36 - move 255, PetalburgCity_Gym_Movement_154B5F - waitmove 0 + applymovement 10, PetalburgCity_Gym_Movement_154B36 + applymovement 255, PetalburgCity_Gym_Movement_154B5F + waitmovement 0 return PetalburgCity_Gym_EventScript_154884:: @ 8154884 - move 1, PetalburgCity_Gym_Movement_1A0841 - waitmove 0 + applymovement 1, PetalburgCity_Gym_Movement_1A0841 + waitmovement 0 return PetalburgCity_Gym_EventScript_15488F:: @ 815488F - move 1, PetalburgCity_Gym_Movement_1A0845 - move 255, PetalburgCity_Gym_Movement_1A0841 - waitmove 0 + applymovement 1, PetalburgCity_Gym_Movement_1A0845 + applymovement 255, PetalburgCity_Gym_Movement_1A0841 + waitmovement 0 return PetalburgCity_Gym_EventScript_1548A1:: @ 81548A1 - move 1, PetalburgCity_Gym_Movement_1A0843 - move 255, PetalburgCity_Gym_Movement_1A083F - waitmove 0 + applymovement 1, PetalburgCity_Gym_Movement_1A0843 + applymovement 255, PetalburgCity_Gym_Movement_1A083F + waitmovement 0 return PetalburgCity_Gym_EventScript_1548B3:: @ 81548B3 - move 1, PetalburgCity_Gym_Movement_1A083F - move 255, PetalburgCity_Gym_Movement_1A0843 - waitmove 0 + applymovement 1, PetalburgCity_Gym_Movement_1A083F + applymovement 255, PetalburgCity_Gym_Movement_1A0843 + waitmovement 0 return PetalburgCity_Gym_EventScript_1548C5:: @ 81548C5 - move 1, PetalburgCity_Gym_Movement_1A0845 - waitmove 0 + applymovement 1, PetalburgCity_Gym_Movement_1A0845 + waitmovement 0 return PetalburgCity_Gym_EventScript_1548D0:: @ 81548D0 - move 1, PetalburgCity_Gym_Movement_1A0843 - waitmove 0 + applymovement 1, PetalburgCity_Gym_Movement_1A0843 + waitmovement 0 return PetalburgCity_Gym_EventScript_1548DB:: @ 81548DB - move 1, PetalburgCity_Gym_Movement_1A0845 - waitmove 0 + applymovement 1, PetalburgCity_Gym_Movement_1A0845 + waitmovement 0 return PetalburgCity_Gym_EventScript_1548E6:: @ 81548E6 - move 1, PetalburgCity_Gym_Movement_1A0845 - waitmove 0 + applymovement 1, PetalburgCity_Gym_Movement_1A0845 + waitmovement 0 return PetalburgCity_Gym_EventScript_1548F1:: @ 81548F1 - move 10, PetalburgCity_Gym_Movement_1A0839 - waitmove 0 + applymovement 10, PetalburgCity_Gym_Movement_1A0839 + waitmovement 0 return PetalburgCity_Gym_EventScript_1548FC:: @ 81548FC - move 10, PetalburgCity_Gym_Movement_1A0845 - waitmove 0 + applymovement 10, PetalburgCity_Gym_Movement_1A0845 + waitmovement 0 return PetalburgCity_Gym_EventScript_154907:: @ 8154907 @@ -340,8 +340,8 @@ PetalburgCity_Gym_EventScript_15492F:: @ 815492F return PetalburgCity_Gym_EventScript_154930:: @ 8154930 - move 1, PetalburgCity_Gym_Movement_1A0845 - waitmove 0 + applymovement 1, PetalburgCity_Gym_Movement_1A0845 + waitmovement 0 return PetalburgCity_Gym_EventScript_15493B:: @ 815493B @@ -353,27 +353,27 @@ PetalburgCity_Gym_EventScript_15493C:: @ 815493C PetalburgCity_Gym_EventScript_15493D:: @ 815493D call PetalburgCity_Gym_EventScript_154969 compare RESULT, 1 - jumpeq PetalburgCity_Gym_EventScript_1549B8 + goto_if_eq PetalburgCity_Gym_EventScript_1549B8 checkflag 169 - jumpif 0, PetalburgCity_Gym_EventScript_154A2C + goto_if 0, PetalburgCity_Gym_EventScript_154A2C checkflag 2052 - jumpeq PetalburgCity_Gym_EventScript_154B69 + goto_if_eq PetalburgCity_Gym_EventScript_154B69 msgbox PetalburgCity_Gym_Text_17AA6B, 4 release end PetalburgCity_Gym_EventScript_154969:: @ 8154969 - specialval RESULT, IsEnigmaBerryValid + specialvar RESULT, IsEnigmaBerryValid compare RESULT, 0 - jumpeq PetalburgCity_Gym_EventScript_1549B2 + goto_if_eq PetalburgCity_Gym_EventScript_1549B2 checkitem ITEM_ENIGMA_BERRY, 1 compare RESULT, 1 - jumpeq PetalburgCity_Gym_EventScript_1549B2 + goto_if_eq PetalburgCity_Gym_EventScript_1549B2 checkpcitem ITEM_ENIGMA_BERRY, 1 compare RESULT, 1 - jumpeq PetalburgCity_Gym_EventScript_1549B2 + goto_if_eq PetalburgCity_Gym_EventScript_1549B2 compare 0x402d, 0 - jumpeq PetalburgCity_Gym_EventScript_1549B2 + goto_if_eq PetalburgCity_Gym_EventScript_1549B2 msgbox PetalburgCity_Gym_Text_1C5570, 4 setvar RESULT, 1 return @@ -385,7 +385,7 @@ PetalburgCity_Gym_EventScript_1549B2:: @ 81549B2 PetalburgCity_Gym_EventScript_1549B8:: @ 81549B8 giveitem ITEM_ENIGMA_BERRY compare RESULT, 0 - jumpeq PetalburgCity_Gym_EventScript_1A029B + goto_if_eq PetalburgCity_Gym_EventScript_1A029B setvar 0x402d, 0 release end @@ -394,7 +394,7 @@ PetalburgCity_Gym_EventScript_1549D6:: @ 81549D6 msgbox PetalburgCity_Gym_Text_17A653, 4 trainerbattle 3, OPPONENT_NORMAN, 0, PetalburgCity_Gym_Text_17A77A message PetalburgCity_Gym_Text_17A7DD - waittext + waitmessage call PetalburgCity_Gym_EventScript_1A02C5 msgbox PetalburgCity_Gym_Text_17A805, 4 setflag 1217 @@ -408,76 +408,76 @@ PetalburgCity_Gym_EventScript_1549D6:: @ 81549D6 clearflag 940 call PetalburgCity_Gym_EventScript_1544ED special DrawWholeMapView - jump PetalburgCity_Gym_EventScript_154A2C + goto PetalburgCity_Gym_EventScript_154A2C end PetalburgCity_Gym_EventScript_154A2C:: @ 8154A2C giveitem ITEM_TM42 compare RESULT, 0 - jumpeq PetalburgCity_Gym_EventScript_1A029B + goto_if_eq PetalburgCity_Gym_EventScript_1A029B setflag 169 msgbox PetalburgCity_Gym_Text_17A8CF, 4 msgbox PetalburgCity_Gym_Text_17A976, 4 - closebutton + closemessage compare FACING, 2 - callif 1, PetalburgCity_Gym_EventScript_154ABC + call_if 1, PetalburgCity_Gym_EventScript_154ABC compare FACING, 1 - callif 1, PetalburgCity_Gym_EventScript_154AC7 + call_if 1, PetalburgCity_Gym_EventScript_154AC7 compare FACING, 3 - callif 1, PetalburgCity_Gym_EventScript_154AD2 + call_if 1, PetalburgCity_Gym_EventScript_154AD2 compare FACING, 4 - callif 1, PetalburgCity_Gym_EventScript_154ADD - pause 70 + call_if 1, PetalburgCity_Gym_EventScript_154ADD + delay 70 compare FACING, 2 - callif 1, PetalburgCity_Gym_EventScript_154AE8 + call_if 1, PetalburgCity_Gym_EventScript_154AE8 compare FACING, 1 - callif 1, PetalburgCity_Gym_EventScript_154AF3 + call_if 1, PetalburgCity_Gym_EventScript_154AF3 compare FACING, 3 - callif 1, PetalburgCity_Gym_EventScript_154AFE + call_if 1, PetalburgCity_Gym_EventScript_154AFE compare FACING, 4 - callif 1, PetalburgCity_Gym_EventScript_154B09 + call_if 1, PetalburgCity_Gym_EventScript_154B09 msgbox PetalburgCity_Gym_Text_17A9F6, 4 release end PetalburgCity_Gym_EventScript_154ABC:: @ 8154ABC - move 1, PetalburgCity_Gym_Movement_1A0841 - waitmove 0 + applymovement 1, PetalburgCity_Gym_Movement_1A0841 + waitmovement 0 return PetalburgCity_Gym_EventScript_154AC7:: @ 8154AC7 - move 1, PetalburgCity_Gym_Movement_1A0845 - waitmove 0 + applymovement 1, PetalburgCity_Gym_Movement_1A0845 + waitmovement 0 return PetalburgCity_Gym_EventScript_154AD2:: @ 8154AD2 - move 1, PetalburgCity_Gym_Movement_1A083F - waitmove 0 + applymovement 1, PetalburgCity_Gym_Movement_1A083F + waitmovement 0 return PetalburgCity_Gym_EventScript_154ADD:: @ 8154ADD - move 1, PetalburgCity_Gym_Movement_1A0843 - waitmove 0 + applymovement 1, PetalburgCity_Gym_Movement_1A0843 + waitmovement 0 return PetalburgCity_Gym_EventScript_154AE8:: @ 8154AE8 - move 1, PetalburgCity_Gym_Movement_1A0845 - waitmove 0 + applymovement 1, PetalburgCity_Gym_Movement_1A0845 + waitmovement 0 return PetalburgCity_Gym_EventScript_154AF3:: @ 8154AF3 - move 1, PetalburgCity_Gym_Movement_1A0841 - waitmove 0 + applymovement 1, PetalburgCity_Gym_Movement_1A0841 + waitmovement 0 return PetalburgCity_Gym_EventScript_154AFE:: @ 8154AFE - move 1, PetalburgCity_Gym_Movement_1A0843 - waitmove 0 + applymovement 1, PetalburgCity_Gym_Movement_1A0843 + waitmovement 0 return PetalburgCity_Gym_EventScript_154B09:: @ 8154B09 - move 1, PetalburgCity_Gym_Movement_1A083F - waitmove 0 + applymovement 1, PetalburgCity_Gym_Movement_1A083F + waitmovement 0 return @ 8154B14 @@ -593,20 +593,20 @@ PetalburgCity_Gym_EventScript_154B69:: @ 8154B69 PetalburgCity_Gym_EventScript_154B73:: @ 8154B73 lockall compare 0x4085, 6 - jumpif 0, PetalburgCity_Gym_EventScript_154BB9 + goto_if 0, PetalburgCity_Gym_EventScript_154BB9 setvar 0x8008, 7 setvar 0x8009, 85 msgbox PetalburgCity_Gym_Text_17B870, 5 compare RESULT, 1 - jumpeq PetalburgCity_Gym_EventScript_154BA8 + goto_if_eq PetalburgCity_Gym_EventScript_154BA8 compare RESULT, 0 - jumpeq PetalburgCity_Gym_EventScript_154BB7 + goto_if_eq PetalburgCity_Gym_EventScript_154BB7 end PetalburgCity_Gym_EventScript_154BA8:: @ 8154BA8 - closebutton - pause 30 - warpwalk PetalburgCity_Gym, 255, 32776, 32777 + closemessage + delay 30 + warpdoor PetalburgCity_Gym, 255, 32776, 32777 waitstate releaseall end @@ -623,150 +623,150 @@ PetalburgCity_Gym_EventScript_154BB9:: @ 8154BB9 PetalburgCity_Gym_EventScript_154BC3:: @ 8154BC3 lockall compare 0x4085, 6 - jumpif 0, PetalburgCity_Gym_EventScript_154BB9 + goto_if 0, PetalburgCity_Gym_EventScript_154BB9 setvar 0x8008, 1 setvar 0x8009, 98 msgbox PetalburgCity_Gym_Text_17B8D4, 5 compare RESULT, 1 - jumpeq PetalburgCity_Gym_EventScript_154BA8 + goto_if_eq PetalburgCity_Gym_EventScript_154BA8 compare RESULT, 0 - jumpeq PetalburgCity_Gym_EventScript_154BB7 + goto_if_eq PetalburgCity_Gym_EventScript_154BB7 end PetalburgCity_Gym_EventScript_154BF8:: @ 8154BF8 lockall checktrainerflag OPPONENT_RANDALL - jumpif 0, PetalburgCity_Gym_EventScript_154BB9 + goto_if 0, PetalburgCity_Gym_EventScript_154BB9 setvar 0x8008, 7 setvar 0x8009, 46 msgbox PetalburgCity_Gym_Text_17B90F, 5 compare RESULT, 1 - jumpeq PetalburgCity_Gym_EventScript_154BA8 + goto_if_eq PetalburgCity_Gym_EventScript_154BA8 compare RESULT, 0 - jumpeq PetalburgCity_Gym_EventScript_154BB7 + goto_if_eq PetalburgCity_Gym_EventScript_154BB7 end PetalburgCity_Gym_EventScript_154C2B:: @ 8154C2B lockall checktrainerflag OPPONENT_RANDALL - jumpif 0, PetalburgCity_Gym_EventScript_154BB9 + goto_if 0, PetalburgCity_Gym_EventScript_154BB9 setvar 0x8008, 1 setvar 0x8009, 59 msgbox PetalburgCity_Gym_Text_17B950, 5 compare RESULT, 1 - jumpeq PetalburgCity_Gym_EventScript_154BA8 + goto_if_eq PetalburgCity_Gym_EventScript_154BA8 compare RESULT, 0 - jumpeq PetalburgCity_Gym_EventScript_154BB7 + goto_if_eq PetalburgCity_Gym_EventScript_154BB7 end PetalburgCity_Gym_EventScript_154C5E:: @ 8154C5E lockall checktrainerflag OPPONENT_MARY - jumpif 0, PetalburgCity_Gym_EventScript_154BB9 + goto_if 0, PetalburgCity_Gym_EventScript_154BB9 setvar 0x8008, 7 setvar 0x8009, 59 msgbox PetalburgCity_Gym_Text_17B950, 5 compare RESULT, 1 - jumpeq PetalburgCity_Gym_EventScript_154BA8 + goto_if_eq PetalburgCity_Gym_EventScript_154BA8 compare RESULT, 0 - jumpeq PetalburgCity_Gym_EventScript_154BB7 + goto_if_eq PetalburgCity_Gym_EventScript_154BB7 end PetalburgCity_Gym_EventScript_154C91:: @ 8154C91 lockall checktrainerflag OPPONENT_MARY - jumpif 0, PetalburgCity_Gym_EventScript_154BB9 + goto_if 0, PetalburgCity_Gym_EventScript_154BB9 setvar 0x8008, 1 setvar 0x8009, 72 msgbox PetalburgCity_Gym_Text_17B98A, 5 compare RESULT, 1 - jumpeq PetalburgCity_Gym_EventScript_154BA8 + goto_if_eq PetalburgCity_Gym_EventScript_154BA8 compare RESULT, 0 - jumpeq PetalburgCity_Gym_EventScript_154BB7 + goto_if_eq PetalburgCity_Gym_EventScript_154BB7 end PetalburgCity_Gym_EventScript_154CC4:: @ 8154CC4 lockall checktrainerflag OPPONENT_PARKER - jumpif 0, PetalburgCity_Gym_EventScript_154BB9 + goto_if 0, PetalburgCity_Gym_EventScript_154BB9 setvar 0x8008, 1 setvar 0x8009, 20 msgbox PetalburgCity_Gym_Text_17B9C5, 5 compare RESULT, 1 - jumpeq PetalburgCity_Gym_EventScript_154BA8 + goto_if_eq PetalburgCity_Gym_EventScript_154BA8 compare RESULT, 0 - jumpeq PetalburgCity_Gym_EventScript_154BB7 + goto_if_eq PetalburgCity_Gym_EventScript_154BB7 end PetalburgCity_Gym_EventScript_154CF7:: @ 8154CF7 lockall checktrainerflag OPPONENT_LORI - jumpif 0, PetalburgCity_Gym_EventScript_154BB9 + goto_if 0, PetalburgCity_Gym_EventScript_154BB9 setvar 0x8008, 7 setvar 0x8009, 20 msgbox PetalburgCity_Gym_Text_17B9C5, 5 compare RESULT, 1 - jumpeq PetalburgCity_Gym_EventScript_154BA8 + goto_if_eq PetalburgCity_Gym_EventScript_154BA8 compare RESULT, 0 - jumpeq PetalburgCity_Gym_EventScript_154BB7 + goto_if_eq PetalburgCity_Gym_EventScript_154BB7 end PetalburgCity_Gym_EventScript_154D2A:: @ 8154D2A lockall checktrainerflag OPPONENT_LORI - jumpif 0, PetalburgCity_Gym_EventScript_154BB9 + goto_if 0, PetalburgCity_Gym_EventScript_154BB9 setvar 0x8008, 1 setvar 0x8009, 33 msgbox PetalburgCity_Gym_Text_17BA00, 5 compare RESULT, 1 - jumpeq PetalburgCity_Gym_EventScript_154BA8 + goto_if_eq PetalburgCity_Gym_EventScript_154BA8 compare RESULT, 0 - jumpeq PetalburgCity_Gym_EventScript_154BB7 + goto_if_eq PetalburgCity_Gym_EventScript_154BB7 end PetalburgCity_Gym_EventScript_154D5D:: @ 8154D5D lockall checktrainerflag OPPONENT_GEORGE - jumpif 0, PetalburgCity_Gym_EventScript_154BB9 + goto_if 0, PetalburgCity_Gym_EventScript_154BB9 setvar 0x8008, 7 setvar 0x8009, 33 msgbox PetalburgCity_Gym_Text_17BA00, 5 compare RESULT, 1 - jumpeq PetalburgCity_Gym_EventScript_154BA8 + goto_if_eq PetalburgCity_Gym_EventScript_154BA8 compare RESULT, 0 - jumpeq PetalburgCity_Gym_EventScript_154BB7 + goto_if_eq PetalburgCity_Gym_EventScript_154BB7 end PetalburgCity_Gym_EventScript_154D90:: @ 8154D90 lockall checktrainerflag OPPONENT_JODY - jumpif 0, PetalburgCity_Gym_EventScript_154BB9 + goto_if 0, PetalburgCity_Gym_EventScript_154BB9 setvar 0x8008, 1 setvar 0x8009, 7 msgbox PetalburgCity_Gym_Text_17BA3D, 5 compare RESULT, 1 - jumpeq PetalburgCity_Gym_EventScript_154BA8 + goto_if_eq PetalburgCity_Gym_EventScript_154BA8 compare RESULT, 0 - jumpeq PetalburgCity_Gym_EventScript_154BB7 + goto_if_eq PetalburgCity_Gym_EventScript_154BB7 end PetalburgCity_Gym_EventScript_154DC3:: @ 8154DC3 lockall checktrainerflag OPPONENT_BERKE - jumpif 0, PetalburgCity_Gym_EventScript_154BB9 + goto_if 0, PetalburgCity_Gym_EventScript_154BB9 setvar 0x8008, 7 setvar 0x8009, 7 msgbox PetalburgCity_Gym_Text_17BA3D, 5 compare RESULT, 1 - jumpeq PetalburgCity_Gym_EventScript_154BA8 + goto_if_eq PetalburgCity_Gym_EventScript_154BA8 compare RESULT, 0 - jumpeq PetalburgCity_Gym_EventScript_154BB7 + goto_if_eq PetalburgCity_Gym_EventScript_154BB7 end PetalburgCity_Gym_EventScript_154DF6:: @ 8154DF6 trainerbattle 2, OPPONENT_RANDALL, 0, PetalburgCity_Gym_Text_17ADA5, PetalburgCity_Gym_Text_17AE11, PetalburgCity_Gym_EventScript_154E1A checkflag 1217 - jumpeq PetalburgCity_Gym_EventScript_154E29 + goto_if_eq PetalburgCity_Gym_EventScript_154E29 msgbox PetalburgCity_Gym_Text_17AE30, 6 end @@ -784,7 +784,7 @@ PetalburgCity_Gym_EventScript_154E29:: @ 8154E29 PetalburgCity_Gym_EventScript_154E32:: @ 8154E32 trainerbattle 2, OPPONENT_PARKER, 0, PetalburgCity_Gym_Text_17AF5A, PetalburgCity_Gym_Text_17AF98, PetalburgCity_Gym_EventScript_154E56 checkflag 1217 - jumpeq PetalburgCity_Gym_EventScript_154E65 + goto_if_eq PetalburgCity_Gym_EventScript_154E65 msgbox PetalburgCity_Gym_Text_17AFD3, 6 end @@ -802,7 +802,7 @@ PetalburgCity_Gym_EventScript_154E65:: @ 8154E65 PetalburgCity_Gym_EventScript_154E6E:: @ 8154E6E trainerbattle 2, OPPONENT_GEORGE, 0, PetalburgCity_Gym_Text_17B058, PetalburgCity_Gym_Text_17B0F7, PetalburgCity_Gym_EventScript_154E92 checkflag 1217 - jumpeq PetalburgCity_Gym_EventScript_154EA1 + goto_if_eq PetalburgCity_Gym_EventScript_154EA1 msgbox PetalburgCity_Gym_Text_17B12C, 6 end @@ -820,7 +820,7 @@ PetalburgCity_Gym_EventScript_154EA1:: @ 8154EA1 PetalburgCity_Gym_EventScript_154EAA:: @ 8154EAA trainerbattle 2, OPPONENT_BERKE, 0, PetalburgCity_Gym_Text_17B237, PetalburgCity_Gym_Text_17B2C0, PetalburgCity_Gym_EventScript_154ECE checkflag 1217 - jumpeq PetalburgCity_Gym_EventScript_154EDD + goto_if_eq PetalburgCity_Gym_EventScript_154EDD msgbox PetalburgCity_Gym_Text_17B2E4, 6 end @@ -838,7 +838,7 @@ PetalburgCity_Gym_EventScript_154EDD:: @ 8154EDD PetalburgCity_Gym_EventScript_154EE6:: @ 8154EE6 trainerbattle 2, OPPONENT_MARY, 0, PetalburgCity_Gym_Text_17B3F7, PetalburgCity_Gym_Text_17B454, PetalburgCity_Gym_EventScript_154F0A checkflag 1217 - jumpeq PetalburgCity_Gym_EventScript_154F19 + goto_if_eq PetalburgCity_Gym_EventScript_154F19 msgbox PetalburgCity_Gym_Text_17B46F, 6 end @@ -856,7 +856,7 @@ PetalburgCity_Gym_EventScript_154F19:: @ 8154F19 PetalburgCity_Gym_EventScript_154F22:: @ 8154F22 trainerbattle 2, OPPONENT_LORI, 0, PetalburgCity_Gym_Text_17B58D, PetalburgCity_Gym_Text_17B5CB, PetalburgCity_Gym_EventScript_154F46 checkflag 1217 - jumpeq PetalburgCity_Gym_EventScript_154F55 + goto_if_eq PetalburgCity_Gym_EventScript_154F55 msgbox PetalburgCity_Gym_Text_17B5EA, 6 end @@ -874,7 +874,7 @@ PetalburgCity_Gym_EventScript_154F55:: @ 8154F55 PetalburgCity_Gym_EventScript_154F5E:: @ 8154F5E trainerbattle 2, OPPONENT_JODY, 0, PetalburgCity_Gym_Text_17B6D4, PetalburgCity_Gym_Text_17B732, PetalburgCity_Gym_EventScript_154F82 checkflag 1217 - jumpeq PetalburgCity_Gym_EventScript_154F91 + goto_if_eq PetalburgCity_Gym_EventScript_154F91 msgbox PetalburgCity_Gym_Text_17B749, 6 end @@ -892,72 +892,72 @@ PetalburgCity_Gym_EventScript_154F91:: @ 8154F91 PetalburgCity_Gym_EventScript_154F9A:: @ 8154F9A setvar 0x8004, 1 compare 0x8005, 0 - callif 1, PetalburgCity_Gym_EventScript_155182 + call_if 1, PetalburgCity_Gym_EventScript_155182 compare 0x8005, 1 - callif 1, PetalburgCity_Gym_EventScript_155187 + call_if 1, PetalburgCity_Gym_EventScript_155187 call PetalburgCity_Gym_EventScript_1550A2 return PetalburgCity_Gym_EventScript_154FBB:: @ 8154FBB setvar 0x8004, 2 compare 0x8005, 0 - callif 1, PetalburgCity_Gym_EventScript_155182 + call_if 1, PetalburgCity_Gym_EventScript_155182 compare 0x8005, 1 - callif 1, PetalburgCity_Gym_EventScript_155187 + call_if 1, PetalburgCity_Gym_EventScript_155187 call PetalburgCity_Gym_EventScript_1550C7 return PetalburgCity_Gym_EventScript_154FDC:: @ 8154FDC setvar 0x8004, 3 compare 0x8005, 0 - callif 1, PetalburgCity_Gym_EventScript_155182 + call_if 1, PetalburgCity_Gym_EventScript_155182 compare 0x8005, 1 - callif 1, PetalburgCity_Gym_EventScript_155187 + call_if 1, PetalburgCity_Gym_EventScript_155187 call PetalburgCity_Gym_EventScript_1550EC return PetalburgCity_Gym_EventScript_154FFD:: @ 8154FFD setvar 0x8004, 4 compare 0x8005, 0 - callif 1, PetalburgCity_Gym_EventScript_155182 + call_if 1, PetalburgCity_Gym_EventScript_155182 compare 0x8005, 1 - callif 1, PetalburgCity_Gym_EventScript_155187 + call_if 1, PetalburgCity_Gym_EventScript_155187 call PetalburgCity_Gym_EventScript_155111 return PetalburgCity_Gym_EventScript_15501E:: @ 815501E setvar 0x8004, 5 compare 0x8005, 0 - callif 1, PetalburgCity_Gym_EventScript_155182 + call_if 1, PetalburgCity_Gym_EventScript_155182 compare 0x8005, 1 - callif 1, PetalburgCity_Gym_EventScript_155187 + call_if 1, PetalburgCity_Gym_EventScript_155187 call PetalburgCity_Gym_EventScript_155124 return PetalburgCity_Gym_EventScript_15503F:: @ 815503F setvar 0x8004, 6 compare 0x8005, 0 - callif 1, PetalburgCity_Gym_EventScript_155182 + call_if 1, PetalburgCity_Gym_EventScript_155182 compare 0x8005, 1 - callif 1, PetalburgCity_Gym_EventScript_155187 + call_if 1, PetalburgCity_Gym_EventScript_155187 call PetalburgCity_Gym_EventScript_155149 return PetalburgCity_Gym_EventScript_155060:: @ 8155060 setvar 0x8004, 7 compare 0x8005, 0 - callif 1, PetalburgCity_Gym_EventScript_155182 + call_if 1, PetalburgCity_Gym_EventScript_155182 compare 0x8005, 1 - callif 1, PetalburgCity_Gym_EventScript_155187 + call_if 1, PetalburgCity_Gym_EventScript_155187 call PetalburgCity_Gym_EventScript_15515C return PetalburgCity_Gym_EventScript_155081:: @ 8155081 setvar 0x8004, 8 compare 0x8005, 0 - callif 1, PetalburgCity_Gym_EventScript_155182 + call_if 1, PetalburgCity_Gym_EventScript_155182 compare 0x8005, 1 - callif 1, PetalburgCity_Gym_EventScript_155187 + call_if 1, PetalburgCity_Gym_EventScript_155187 call PetalburgCity_Gym_EventScript_15516F return @@ -1022,7 +1022,7 @@ PetalburgCity_Gym_EventScript_15518B:: @ 815518B lock faceplayer checkflag 1217 - jumpeq PetalburgCity_Gym_EventScript_1551A0 + goto_if_eq PetalburgCity_Gym_EventScript_1551A0 msgbox PetalburgCity_Gym_Text_17AB96, 4 release end @@ -1035,15 +1035,15 @@ PetalburgCity_Gym_EventScript_1551A0:: @ 81551A0 PetalburgCity_Gym_EventScript_1551AA:: @ 81551AA lockall checkflag 2059 - jumpeq PetalburgCity_Gym_EventScript_1551CA - jump PetalburgCity_Gym_EventScript_1551D4 + goto_if_eq PetalburgCity_Gym_EventScript_1551CA + goto PetalburgCity_Gym_EventScript_1551D4 end PetalburgCity_Gym_EventScript_1551BA:: @ 81551BA lockall checkflag 2059 - jumpeq PetalburgCity_Gym_EventScript_1551CA - jump PetalburgCity_Gym_EventScript_1551D4 + goto_if_eq PetalburgCity_Gym_EventScript_1551CA + goto PetalburgCity_Gym_EventScript_1551D4 end PetalburgCity_Gym_EventScript_1551CA:: @ 81551CA diff --git a/data/scripts/maps/PetalburgCity_Mart.inc b/data/scripts/maps/PetalburgCity_Mart.inc index 2eac03cac..e4186eaae 100644 --- a/data/scripts/maps/PetalburgCity_Mart.inc +++ b/data/scripts/maps/PetalburgCity_Mart.inc @@ -5,9 +5,9 @@ PetalburgCity_Mart_EventScript_1552B0:: @ 81552B0 lock faceplayer message PetalburgCity_Mart_Text_1A0BE4 - waittext + waitmessage checkflag 296 - jumpeq PetalburgCity_Mart_EventScript_1552EA + goto_if_eq PetalburgCity_Mart_EventScript_1552EA pokemart PetalburgCity_Mart_Items1 msgbox PetalburgCity_Mart_Text_1A0C02, 4 release diff --git a/data/scripts/maps/PetalburgCity_PokemonCenter_1F.inc b/data/scripts/maps/PetalburgCity_PokemonCenter_1F.inc index 5ef99eee1..e2013a1d6 100644 --- a/data/scripts/maps/PetalburgCity_PokemonCenter_1F.inc +++ b/data/scripts/maps/PetalburgCity_PokemonCenter_1F.inc @@ -10,7 +10,7 @@ PetalburgCity_PokemonCenter_1F_MapScript1_15520A:: @ 815520A PetalburgCity_PokemonCenter_1F_EventScript_155213:: @ 8155213 setvar 0x800b, 1 call PetalburgCity_PokemonCenter_1F_EventScript_19FD5B - waittext + waitmessage waitbutton release end @@ -27,19 +27,19 @@ PetalburgCity_PokemonCenter_1F_EventScript_155233:: @ 8155233 lock faceplayer msgbox PetalburgCity_PokemonCenter_1F_Text_17BDC5, 4 - specialval RESULT, IsStarterInParty + specialvar RESULT, IsStarterInParty compare RESULT, 1 - jumpeq PetalburgCity_PokemonCenter_1F_EventScript_15524F + goto_if_eq PetalburgCity_PokemonCenter_1F_EventScript_15524F release end PetalburgCity_PokemonCenter_1F_EventScript_15524F:: @ 815524F compare 0x4023, 0 - callif 1, PetalburgCity_PokemonCenter_1F_EventScript_155272 + call_if 1, PetalburgCity_PokemonCenter_1F_EventScript_155272 compare 0x4023, 1 - callif 1, PetalburgCity_PokemonCenter_1F_EventScript_15527B + call_if 1, PetalburgCity_PokemonCenter_1F_EventScript_15527B compare 0x4023, 2 - callif 1, PetalburgCity_PokemonCenter_1F_EventScript_155284 + call_if 1, PetalburgCity_PokemonCenter_1F_EventScript_155284 release end diff --git a/data/scripts/maps/PetalburgCity_WallysHouse.inc b/data/scripts/maps/PetalburgCity_WallysHouse.inc index e8ac407dc..d8e95d8c6 100644 --- a/data/scripts/maps/PetalburgCity_WallysHouse.inc +++ b/data/scripts/maps/PetalburgCity_WallysHouse.inc @@ -5,13 +5,13 @@ PetalburgCity_WallysHouse_EventScript_1543C4:: @ 81543C4 lock faceplayer checkflag 126 - jumpeq PetalburgCity_WallysHouse_EventScript_1543F7 + goto_if_eq PetalburgCity_WallysHouse_EventScript_1543F7 checkflag 122 - jumpeq PetalburgCity_WallysHouse_EventScript_154427 + goto_if_eq PetalburgCity_WallysHouse_EventScript_154427 checkflag 1217 - jumpeq PetalburgCity_WallysHouse_EventScript_154406 + goto_if_eq PetalburgCity_WallysHouse_EventScript_154406 checkflag 135 - jumpeq PetalburgCity_WallysHouse_EventScript_15443B + goto_if_eq PetalburgCity_WallysHouse_EventScript_15443B msgbox PetalburgCity_WallysHouse_Text_179805, 4 setflag 135 release @@ -19,8 +19,8 @@ PetalburgCity_WallysHouse_EventScript_1543C4:: @ 81543C4 PetalburgCity_WallysHouse_EventScript_1543F7:: @ 81543F7 checkflag 122 - jumpeq PetalburgCity_WallysHouse_EventScript_154431 - jump PetalburgCity_WallysHouse_EventScript_154406 + goto_if_eq PetalburgCity_WallysHouse_EventScript_154431 + goto PetalburgCity_WallysHouse_EventScript_154406 end PetalburgCity_WallysHouse_EventScript_154406:: @ 8154406 @@ -50,9 +50,9 @@ PetalburgCity_WallysHouse_EventScript_154445:: @ 8154445 lock faceplayer checkflag 122 - jumpeq PetalburgCity_WallysHouse_EventScript_15446D + goto_if_eq PetalburgCity_WallysHouse_EventScript_15446D checkflag 1217 - jumpeq PetalburgCity_WallysHouse_EventScript_154463 + goto_if_eq PetalburgCity_WallysHouse_EventScript_154463 msgbox PetalburgCity_WallysHouse_Text_179C2C, 4 release end diff --git a/data/scripts/maps/PetalburgWoods.inc b/data/scripts/maps/PetalburgWoods.inc index c24f7c195..0b0c72f70 100644 --- a/data/scripts/maps/PetalburgWoods.inc +++ b/data/scripts/maps/PetalburgWoods.inc @@ -9,108 +9,108 @@ PetalburgWoods_MapScript1_15CCA2:: @ 815CCA2 PetalburgWoods_EventScript_15CCA8:: @ 815CCA8 lockall call PetalburgWoods_EventScript_15CDE6 - move 4, PetalburgWoods_Movement_15CE89 - waitmove 0 + applymovement 4, PetalburgWoods_Movement_15CE89 + waitmovement 0 msgbox PetalburgWoods_Text_194D92, 4 - closebutton - playmusic BGM_EVIL_TEAM, 0 - move 3, PetalburgWoods_Movement_15CEC3 - waitmove 0 + closemessage + playbgm BGM_EVIL_TEAM, 0 + applymovement 3, PetalburgWoods_Movement_15CEC3 + waitmovement 0 msgbox PetalburgWoods_Text_194DED, 4 - closebutton - move 3, PetalburgWoods_Movement_15CEB0 - waitmove 0 - move 4, PetalburgWoods_Movement_1A0841 - waitmove 0 + closemessage + applymovement 3, PetalburgWoods_Movement_15CEB0 + waitmovement 0 + applymovement 4, PetalburgWoods_Movement_1A0841 + waitmovement 0 msgbox PetalburgWoods_Text_194E6B, 4 - closebutton - move 4, PetalburgWoods_Movement_15CE9E - waitmove 0 + closemessage + applymovement 4, PetalburgWoods_Movement_15CE9E + waitmovement 0 msgbox PetalburgWoods_Text_194E9A, 4 - move 3, PetalburgWoods_Movement_15CEC8 - waitmove 0 + applymovement 3, PetalburgWoods_Movement_15CEC8 + waitmovement 0 msgbox PetalburgWoods_Text_194EE8, 4 trainerbattle 3, OPPONENT_PETALBURG_WOODS_GRUNT, 0, PetalburgWoods_Text_194F83 - move 3, PetalburgWoods_Movement_15CEB3 - waitmove 0 + applymovement 3, PetalburgWoods_Movement_15CEB3 + waitmovement 0 call PetalburgWoods_EventScript_15CDFA - move 4, PetalburgWoods_Movement_15CE80 - waitmove 0 - jump PetalburgWoods_EventScript_15CE69 + applymovement 4, PetalburgWoods_Movement_15CE80 + waitmovement 0 + goto PetalburgWoods_EventScript_15CE69 end PetalburgWoods_EventScript_15CD42:: @ 815CD42 lockall call PetalburgWoods_EventScript_15CDE6 - move 4, PetalburgWoods_Movement_15CE8E - waitmove 0 - move 255, PetalburgWoods_Movement_1A083F - waitmove 0 + applymovement 4, PetalburgWoods_Movement_15CE8E + waitmovement 0 + applymovement 255, PetalburgWoods_Movement_1A083F + waitmovement 0 msgbox PetalburgWoods_Text_194D92, 4 - closebutton - playmusic BGM_EVIL_TEAM, 0 - move 3, PetalburgWoods_Movement_15CEC3 - waitmove 0 + closemessage + playbgm BGM_EVIL_TEAM, 0 + applymovement 3, PetalburgWoods_Movement_15CEC3 + waitmovement 0 msgbox PetalburgWoods_Text_194DED, 4 - closebutton - move 3, PetalburgWoods_Movement_15CEBF - waitmove 0 - move 4, PetalburgWoods_Movement_1A0841 - waitmove 0 + closemessage + applymovement 3, PetalburgWoods_Movement_15CEBF + waitmovement 0 + applymovement 4, PetalburgWoods_Movement_1A0841 + waitmovement 0 msgbox PetalburgWoods_Text_194E6B, 4 - closebutton - move 4, PetalburgWoods_Movement_15CEA4 - waitmove 0 + closemessage + applymovement 4, PetalburgWoods_Movement_15CEA4 + waitmovement 0 msgbox PetalburgWoods_Text_194E9A, 4 - move 255, PetalburgWoods_Movement_1A0841 - waitmove 0 + applymovement 255, PetalburgWoods_Movement_1A0841 + waitmovement 0 msgbox PetalburgWoods_Text_194EE8, 4 trainerbattle 3, OPPONENT_PETALBURG_WOODS_GRUNT, 0, PetalburgWoods_Text_194F83 - move 3, PetalburgWoods_Movement_15CEB3 - waitmove 0 + applymovement 3, PetalburgWoods_Movement_15CEB3 + waitmovement 0 call PetalburgWoods_EventScript_15CDFA - move 4, PetalburgWoods_Movement_15CE95 - waitmove 0 - jump PetalburgWoods_EventScript_15CE69 + applymovement 4, PetalburgWoods_Movement_15CE95 + waitmovement 0 + goto PetalburgWoods_EventScript_15CE69 end PetalburgWoods_EventScript_15CDE6:: @ 815CDE6 - move 4, PetalburgWoods_Movement_15CE73 - waitmove 0 + applymovement 4, PetalburgWoods_Movement_15CE73 + waitmovement 0 msgbox PetalburgWoods_Text_194D71, 4 - closebutton + closemessage return PetalburgWoods_EventScript_15CDFA:: @ 815CDFA msgbox PetalburgWoods_Text_194FA4, 4 - closebutton - move 3, PetalburgWoods_Movement_15CEB7 - waitmove 0 - disappear 3 - move 255, PetalburgWoods_Movement_1A0845 - waitmove 0 + closemessage + applymovement 3, PetalburgWoods_Movement_15CEB7 + waitmovement 0 + removeobject 3 + applymovement 255, PetalburgWoods_Movement_1A0845 + waitmovement 0 msgbox PetalburgWoods_Text_19507E, 4 giveitem ITEM_GREAT_BALL compare RESULT, 0 - jumpeq PetalburgWoods_EventScript_15CE3F - jump PetalburgWoods_EventScript_15CE4D + goto_if_eq PetalburgWoods_EventScript_15CE3F + goto PetalburgWoods_EventScript_15CE4D end PetalburgWoods_EventScript_15CE3F:: @ 815CE3F msgbox PetalburgWoods_Text_195182, 4 - jump PetalburgWoods_EventScript_15CE4D + goto PetalburgWoods_EventScript_15CE4D end PetalburgWoods_EventScript_15CE4D:: @ 815CE4D msgbox PetalburgWoods_Text_19510A, 4 - move 4, PetalburgWoods_Movement_15CEA8 - waitmove 0 + applymovement 4, PetalburgWoods_Movement_15CEA8 + waitmovement 0 msgbox PetalburgWoods_Text_195153, 4 - closebutton + closemessage return PetalburgWoods_EventScript_15CE69:: @ 815CE69 - disappear 4 + removeobject 4 setvar 0x4098, 1 releaseall end @@ -242,11 +242,11 @@ PetalburgWoods_EventScript_15CEDC:: @ 815CEDC lock faceplayer checkflag 297 - jumpeq PetalburgWoods_EventScript_15CF0B + goto_if_eq PetalburgWoods_EventScript_15CF0B msgbox PetalburgWoods_Text_19549E, 4 giveitem ITEM_MIRACLE_SEED compare RESULT, 0 - jumpeq PetalburgWoods_EventScript_1A029B + goto_if_eq PetalburgWoods_EventScript_1A029B setflag 297 release end @@ -271,9 +271,9 @@ PetalburgWoods_EventScript_15CF27:: @ 815CF27 PetalburgWoods_EventScript_15CF3E:: @ 815CF3E trainerbattle 0, OPPONENT_JAMES_1, 0, PetalburgWoods_Text_19526A, PetalburgWoods_Text_1952AE - specialval RESULT, sub_8082C68 + specialvar RESULT, sub_8082C68 compare RESULT, 1 - jumpeq PetalburgWoods_EventScript_15CF65 + goto_if_eq PetalburgWoods_EventScript_15CF65 msgbox PetalburgWoods_Text_1952CC, 6 end diff --git a/data/scripts/maps/Route101.inc b/data/scripts/maps/Route101.inc index d945aadfc..2fe80e098 100644 --- a/data/scripts/maps/Route101.inc +++ b/data/scripts/maps/Route101.inc @@ -18,25 +18,25 @@ Route101_EventScript_14E93F:: @ 814E93F Route101_EventScript_14E948:: @ 814E948 lockall - playmusic 410, 1 + playbgm 410, 1 msgbox Route101_Text_16D10E, 4 - closebutton - movesprite 2, 0, 15 - movesprite 4, 0, 16 - move 255, Route101_Movement_14EA2C - move 2, Route101_Movement_14EA50 - move 4, Route101_Movement_14EA1F - waitmove 0 - move 4, Route101_Movement_14EA00 - move 2, Route101_Movement_14EA31 - waitmove 0 - move 2, Route101_Movement_1A0843 - waitmove 0 - move 4, Route101_Movement_14EA27 - move 2, Route101_Movement_14EA58 - waitmove 0 + closemessage + setobjectxy 2, 0, 15 + setobjectxy 4, 0, 16 + applymovement 255, Route101_Movement_14EA2C + applymovement 2, Route101_Movement_14EA50 + applymovement 4, Route101_Movement_14EA1F + waitmovement 0 + applymovement 4, Route101_Movement_14EA00 + applymovement 2, Route101_Movement_14EA31 + waitmovement 0 + applymovement 2, Route101_Movement_1A0843 + waitmovement 0 + applymovement 4, Route101_Movement_14EA27 + applymovement 2, Route101_Movement_14EA58 + waitmovement 0 msgbox Route101_Text_16D119, 4 - closebutton + closemessage setvar 0x4060, 2 releaseall end @@ -44,27 +44,27 @@ Route101_EventScript_14E948:: @ 814E948 Route101_EventScript_14E9B8:: @ 814E9B8 lockall msgbox Route101_Text_16D15E, 4 - closebutton - move 255, Route101_Movement_14E9FA - waitmove 0 + closemessage + applymovement 255, Route101_Movement_14E9FA + waitmovement 0 releaseall end Route101_EventScript_14E9CE:: @ 814E9CE lockall msgbox Route101_Text_16D15E, 4 - closebutton - move 255, Route101_Movement_14E9FC - waitmove 0 + closemessage + applymovement 255, Route101_Movement_14E9FC + waitmovement 0 releaseall end Route101_EventScript_14E9E4:: @ 814E9E4 lockall msgbox Route101_Text_16D15E, 4 - closebutton - move 255, Route101_Movement_14E9FE - waitmove 0 + closemessage + applymovement 255, Route101_Movement_14E9FE + waitmovement 0 releaseall end @@ -220,14 +220,14 @@ Route101_EventScript_14EA7F:: @ 814EA7F setflag 2048 setflag 82 fadescreen 1 - disappear 4 - movesprite 255, 6, 13 - move 255, Route101_Movement_1A083F - waitmove 0 + removeobject 4 + setobjectxy 255, 6, 13 + applymovement 255, Route101_Movement_1A083F + waitmovement 0 special ScrSpecial_ChooseStarter waitstate - move 2, Route101_Movement_14EAD7 - waitmove 0 + applymovement 2, Route101_Movement_14EAD7 + waitmovement 0 msgbox Route101_Text_16D191, 4 special ScrSpecial_HealPlayerParty setflag 720 diff --git a/data/scripts/maps/Route102.inc b/data/scripts/maps/Route102.inc index b0a714763..95a0a4a1f 100644 --- a/data/scripts/maps/Route102.inc +++ b/data/scripts/maps/Route102.inc @@ -19,9 +19,9 @@ Route102_EventScript_14EAF5:: @ 814EAF5 Route102_EventScript_14EAFE:: @ 814EAFE trainerbattle 0, OPPONENT_CALVIN_1, 0, Route102_Text_1B79C3, Route102_Text_1B7A2C - specialval RESULT, sub_8082C68 + specialvar RESULT, sub_8082C68 compare RESULT, 1 - jumpeq Route102_EventScript_14EB25 + goto_if_eq Route102_EventScript_14EB25 msgbox Route102_Text_1B7A60, 6 end diff --git a/data/scripts/maps/Route103.inc b/data/scripts/maps/Route103.inc index 4c7da3d0d..ff0ccce30 100644 --- a/data/scripts/maps/Route103.inc +++ b/data/scripts/maps/Route103.inc @@ -9,22 +9,22 @@ Route103_MapScript1_14EB87:: @ 814EB87 Route103_EventScript_14EB92:: @ 814EB92 lockall - checkgender + checkplayergender compare RESULT, 0 - jumpeq Route103_EventScript_14EBAB + goto_if_eq Route103_EventScript_14EBAB compare RESULT, 1 - jumpeq Route103_EventScript_14EC04 + goto_if_eq Route103_EventScript_14EC04 end Route103_EventScript_14EBAB:: @ 814EBAB msgbox Route103_Text_16D57A, 4 - playmusic 415, 1 - move 2, Route103_Movement_1A0839 - waitmove 0 - move 2, Route103_Movement_1A0833 - waitmove 0 - move 2, Route103_Movement_1A0835 - waitmove 0 + playbgm 415, 1 + applymovement 2, Route103_Movement_1A0839 + waitmovement 0 + applymovement 2, Route103_Movement_1A0833 + waitmovement 0 + applymovement 2, Route103_Movement_1A0835 + waitmovement 0 msgbox Route103_Text_16D5B6, 4 switch 0x4023 case 0, Route103_EventScript_14EC5D @@ -34,13 +34,13 @@ Route103_EventScript_14EBAB:: @ 814EBAB Route103_EventScript_14EC04:: @ 814EC04 msgbox Route103_Text_16D762, 4 - playmusic 421, 1 - move 2, Route103_Movement_1A0839 - waitmove 0 - move 2, Route103_Movement_1A0833 - waitmove 0 - move 2, Route103_Movement_1A0835 - waitmove 0 + playbgm 421, 1 + applymovement 2, Route103_Movement_1A0839 + waitmovement 0 + applymovement 2, Route103_Movement_1A0833 + waitmovement 0 + applymovement 2, Route103_Movement_1A0835 + waitmovement 0 msgbox Route103_Text_16D7A9, 4 switch 0x4023 case 0, Route103_EventScript_14EC8D @@ -50,46 +50,46 @@ Route103_EventScript_14EC04:: @ 814EC04 Route103_EventScript_14EC5D:: @ 814EC5D trainerbattle 3, OPPONENT_MAY_4, 0, Route103_Text_16D65B - jump Route103_EventScript_14ECBD + goto Route103_EventScript_14ECBD end Route103_EventScript_14EC6D:: @ 814EC6D trainerbattle 3, OPPONENT_MAY_7, 0, Route103_Text_16D65B - jump Route103_EventScript_14ECBD + goto Route103_EventScript_14ECBD end Route103_EventScript_14EC7D:: @ 814EC7D trainerbattle 3, OPPONENT_MAY_1, 0, Route103_Text_16D65B - jump Route103_EventScript_14ECBD + goto Route103_EventScript_14ECBD end Route103_EventScript_14EC8D:: @ 814EC8D trainerbattle 3, OPPONENT_BRENDAN_4, 0, Route103_Text_16D836 - jump Route103_EventScript_14ECCB + goto Route103_EventScript_14ECCB end Route103_EventScript_14EC9D:: @ 814EC9D trainerbattle 3, OPPONENT_BRENDAN_7, 0, Route103_Text_16D836 - jump Route103_EventScript_14ECCB + goto Route103_EventScript_14ECCB end Route103_EventScript_14ECAD:: @ 814ECAD trainerbattle 3, OPPONENT_BRENDAN_1, 0, Route103_Text_16D836 - jump Route103_EventScript_14ECCB + goto Route103_EventScript_14ECCB end Route103_EventScript_14ECBD:: @ 814ECBD msgbox Route103_Text_16D688, 4 - jump Route103_EventScript_14ECD9 + goto Route103_EventScript_14ECD9 end Route103_EventScript_14ECCB:: @ 814ECCB msgbox Route103_Text_16D856, 4 - jump Route103_EventScript_14ECD9 + goto Route103_EventScript_14ECD9 end Route103_EventScript_14ECD9:: @ 814ECD9 - closebutton + closemessage switch FACING case 1, Route103_EventScript_14ED29 case 2, Route103_EventScript_14ED0C @@ -98,33 +98,33 @@ Route103_EventScript_14ECD9:: @ 814ECD9 end Route103_EventScript_14ED0C:: @ 814ED0C - move 2, Route103_Movement_14ED67 - waitmove 0 - playsfx 10 - move 2, Route103_Movement_14ED6B - waitmove 0 - jump Route103_EventScript_14ED46 + applymovement 2, Route103_Movement_14ED67 + waitmovement 0 + playse 10 + applymovement 2, Route103_Movement_14ED6B + waitmovement 0 + goto Route103_EventScript_14ED46 end Route103_EventScript_14ED29:: @ 814ED29 - move 2, Route103_Movement_14ED71 - waitmove 0 - playsfx 10 - move 2, Route103_Movement_14ED74 - waitmove 0 - jump Route103_EventScript_14ED46 + applymovement 2, Route103_Movement_14ED71 + waitmovement 0 + playse 10 + applymovement 2, Route103_Movement_14ED74 + waitmovement 0 + goto Route103_EventScript_14ED46 end Route103_EventScript_14ED46:: @ 814ED46 - disappear 2 + removeobject 2 setvar 0x4062, 1 setvar 0x4084, 4 clearflag 889 setflag 130 setvar 0x40c7, 1 clearflag 979 - playmusicbattle 0 - fadedefault + savebgm 0 + fadedefaultbgm releaseall end @@ -173,9 +173,9 @@ Route103_EventScript_14ED94:: @ 814ED94 Route103_EventScript_14EDAB:: @ 814EDAB trainerbattle 4, OPPONENT_AMY_AND_LIV_1, 0, Route103_Text_1B7DF7, Route103_Text_1B7E3B, Route103_Text_1B7EAC - specialval RESULT, sub_8082C68 + specialvar RESULT, sub_8082C68 compare RESULT, 1 - jumpeq Route103_EventScript_14EDD6 + goto_if_eq Route103_EventScript_14EDD6 msgbox Route103_Text_1B7E50, 6 end @@ -186,9 +186,9 @@ Route103_EventScript_14EDD6:: @ 814EDD6 Route103_EventScript_14EDF1:: @ 814EDF1 trainerbattle 4, OPPONENT_AMY_AND_LIV_1, 0, Route103_Text_1B7EFB, Route103_Text_1B7F20, Route103_Text_1B7F8E - specialval RESULT, sub_8082C68 + specialvar RESULT, sub_8082C68 compare RESULT, 1 - jumpeq Route103_EventScript_14EE1C + goto_if_eq Route103_EventScript_14EE1C msgbox Route103_Text_1B7F40, 6 end @@ -204,9 +204,9 @@ Route103_EventScript_14EE37:: @ 814EE37 Route103_EventScript_14EE4E:: @ 814EE4E trainerbattle 0, OPPONENT_MIGUEL_1, 0, Route103_Text_1B82A9, Route103_Text_1B82EC - specialval RESULT, sub_8082C68 + specialvar RESULT, sub_8082C68 compare RESULT, 1 - jumpeq Route103_EventScript_14EE75 + goto_if_eq Route103_EventScript_14EE75 msgbox Route103_Text_1B830D, 6 end diff --git a/data/scripts/maps/Route104.inc b/data/scripts/maps/Route104.inc index b617767bf..651f2afb4 100644 --- a/data/scripts/maps/Route104.inc +++ b/data/scripts/maps/Route104.inc @@ -9,7 +9,7 @@ Route104_MapScript2_14EE97:: @ 814EE97 Route104_EventScript_14EEA1:: @ 814EEA1 lockall - jump Route104_EventScript_14EFD5 + goto Route104_EventScript_14EFD5 end Route104_MapScript1_14EEA8:: @ 814EEA8 @@ -18,9 +18,9 @@ Route104_MapScript1_14EEA8:: @ 814EEA8 Route104_EventScript_14EEAE:: @ 814EEAE checkflag 127 - jumpif 0, Route104_EventScript_14EEC4 + goto_if 0, Route104_EventScript_14EEC4 checkflag 2057 - jumpif 0, Route104_EventScript_14EEC4 + goto_if 0, Route104_EventScript_14EEC4 clearflag 906 return @@ -32,11 +32,11 @@ Route104_EventScript_14EEC8:: @ 814EEC8 lock faceplayer checkflag 246 - jumpeq Route104_EventScript_14EEFF + goto_if_eq Route104_EventScript_14EEFF msgbox Route104_Text_1C55B9, 4 giveitem ITEM_CHESTO_BERRY compare RESULT, 0 - jumpeq Route104_EventScript_1A029B + goto_if_eq Route104_EventScript_1A029B setflag 246 msgbox Route104_Text_1C5665, 4 release @@ -51,11 +51,11 @@ Route104_EventScript_14EF09:: @ 814EF09 lock faceplayer checkflag 279 - jumpeq Route104_EventScript_14EF38 + goto_if_eq Route104_EventScript_14EF38 msgbox Route104_Text_16DD91, 4 giveitem ITEM_WHITE_HERB compare RESULT, 0 - jumpeq Route104_EventScript_1A029B + goto_if_eq Route104_EventScript_1A029B setflag 279 release end @@ -105,11 +105,11 @@ Route104_EventScript_14EF93:: @ 814EF93 lock faceplayer checkflag 262 - jumpeq Route104_EventScript_14EFC2 + goto_if_eq Route104_EventScript_14EFC2 msgbox Route104_Text_16DC5F, 4 giveitem ITEM_TM09 compare RESULT, 0 - jumpeq Route104_EventScript_1A029B + goto_if_eq Route104_EventScript_1A029B setflag 262 release end @@ -124,44 +124,44 @@ Route104_EventScript_14EFCC:: @ 814EFCC end Route104_EventScript_14EFD5:: @ 814EFD5 - spritelevelup 8, 0, 19, 0 - spritelevelup 255, 0, 19, 0 - move 8, Route104_Movement_14F16C - waitmove 0 - disappear 8 - move 255, Route104_Movement_14F162 - waitmove 0 - spriteinvisible 255, 0, 19 + setobjectpriority 8, 0, 19, 0 + setobjectpriority 255, 0, 19, 0 + applymovement 8, Route104_Movement_14F16C + waitmovement 0 + removeobject 8 + applymovement 255, Route104_Movement_14F162 + waitmovement 0 + hideobject 255, 0, 19 call Route104_EventScript_1A02E7 - move 7, Route104_Movement_14F09F - move 255, Route104_Movement_14F09F - waitmove 0 - move 255, Route104_Movement_14F166 - waitmove 0 + applymovement 7, Route104_Movement_14F09F + applymovement 255, Route104_Movement_14F09F + waitmovement 0 + applymovement 255, Route104_Movement_14F166 + waitmovement 0 call Route104_EventScript_1A02EF - spritevisible 255, 0, 11 - move 255, Route104_Movement_14F168 - waitmove 0 - movespriteperm 2, 12, 8 - reappear 2 - spritelevelup 2, 0, 11, 0 + showobject 255, 0, 11 + applymovement 255, Route104_Movement_14F168 + waitmovement 0 + setobjectxyperm 2, 12, 8 + addobject 2 + setobjectpriority 2, 0, 11, 0 clearflag 740 - move 2, Route104_Movement_14F16F - waitmove 0 - reappear 4 + applymovement 2, Route104_Movement_14F16F + waitmovement 0 + addobject 4 clearflag 743 call Route104_EventScript_1A02EF setflag 742 - spriteinvisible 7, 0, 19 + hideobject 7, 0, 19 copyvar 0x4096, 0x8008 - restorespritelevel 255, 0, 19 - restorespritelevel 2, 0, 11 - moveoffscreen 2 + resetobjectpriority 255, 0, 19 + resetobjectpriority 2, 0, 11 + moveobjectoffscreen 2 setvar 0x408e, 0 checkflag 189 - jumpif 0, Route104_EventScript_14F08B + goto_if 0, Route104_EventScript_14F08B checkflag 189 - jumpeq Route104_EventScript_14F095 + goto_if_eq Route104_EventScript_14F095 end Route104_EventScript_14F08B:: @ 814F08B @@ -409,9 +409,9 @@ Route104_EventScript_14F189:: @ 814F189 Route104_EventScript_14F1A0:: @ 814F1A0 trainerbattle 0, OPPONENT_HALEY_1, 0, Route104_Text_1B8770, Route104_Text_1B87A7 - specialval RESULT, sub_8082C68 + specialvar RESULT, sub_8082C68 compare RESULT, 1 - jumpeq Route104_EventScript_14F1C7 + goto_if_eq Route104_EventScript_14F1C7 msgbox Route104_Text_1B87C3, 6 end @@ -422,9 +422,9 @@ Route104_EventScript_14F1C7:: @ 814F1C7 Route104_EventScript_14F1DE:: @ 814F1DE trainerbattle 0, OPPONENT_WINSTON_1, 0, Route104_Text_1B88D4, Route104_Text_1B8911 - specialval RESULT, sub_8082C68 + specialvar RESULT, sub_8082C68 compare RESULT, 1 - jumpeq Route104_EventScript_14F205 + goto_if_eq Route104_EventScript_14F205 msgbox Route104_Text_1B8925, 6 end @@ -435,9 +435,9 @@ Route104_EventScript_14F205:: @ 814F205 Route104_EventScript_14F21C:: @ 814F21C trainerbattle 0, OPPONENT_CINDY_1, 0, Route104_Text_1B8A24, Route104_Text_1B8A61 - specialval RESULT, sub_8082C68 + specialvar RESULT, sub_8082C68 compare RESULT, 1 - jumpeq Route104_EventScript_14F243 + goto_if_eq Route104_EventScript_14F243 msgbox Route104_Text_1B8A69, 6 end diff --git a/data/scripts/maps/Route104_MrBrineysHouse.inc b/data/scripts/maps/Route104_MrBrineysHouse.inc index 5c6704e67..f24e92cd4 100644 --- a/data/scripts/maps/Route104_MrBrineysHouse.inc +++ b/data/scripts/maps/Route104_MrBrineysHouse.inc @@ -5,9 +5,9 @@ Route104_MrBrineysHouse_MapScripts:: @ 815BCB2 Route104_MrBrineysHouse_MapScript1_15BCB8:: @ 815BCB8 setflag 2109 compare 0x4090, 1 - callif 1, Route104_MrBrineysHouse_EventScript_15BCD4 + call_if 1, Route104_MrBrineysHouse_EventScript_15BCD4 checkflag 188 - callif 1, Route104_MrBrineysHouse_EventScript_15BCD0 + call_if 1, Route104_MrBrineysHouse_EventScript_15BCD0 end Route104_MrBrineysHouse_EventScript_15BCD0:: @ 815BCD0 @@ -15,22 +15,22 @@ Route104_MrBrineysHouse_EventScript_15BCD0:: @ 815BCD0 return Route104_MrBrineysHouse_EventScript_15BCD4:: @ 815BCD4 - movespriteperm 1, 9, 3 - spritebehave 1, 50 - movespriteperm 2, 9, 6 - spritebehave 2, 51 + setobjectxyperm 1, 9, 3 + setobjectmovementtype 1, 50 + setobjectxyperm 2, 9, 6 + setobjectmovementtype 2, 51 return Route104_MrBrineysHouse_EventScript_15BCEB:: @ 815BCEB lock faceplayer checkflag 147 - callif 0, Route104_MrBrineysHouse_EventScript_15BD0E + call_if 0, Route104_MrBrineysHouse_EventScript_15BD0E checkflag 189 - jumpif 0, Route104_MrBrineysHouse_EventScript_15BD65 + goto_if 0, Route104_MrBrineysHouse_EventScript_15BD65 checkflag 149 - jumpif 0, Route104_MrBrineysHouse_EventScript_15BD7E - jump Route104_MrBrineysHouse_EventScript_15BD32 + goto_if 0, Route104_MrBrineysHouse_EventScript_15BD7E + goto Route104_MrBrineysHouse_EventScript_15BD32 end Route104_MrBrineysHouse_EventScript_15BD0E:: @ 815BD0E @@ -38,14 +38,14 @@ Route104_MrBrineysHouse_EventScript_15BD0E:: @ 815BD0E msgbox Route104_MrBrineysHouse_Text_191A82, 4 msgbox Route104_MrBrineysHouse_Text_191AAD, 5 compare RESULT, 0 - jumpeq Route104_MrBrineysHouse_EventScript_15BD97 - jump Route104_MrBrineysHouse_EventScript_15BDAB + goto_if_eq Route104_MrBrineysHouse_EventScript_15BD97 + goto Route104_MrBrineysHouse_EventScript_15BDAB end Route104_MrBrineysHouse_EventScript_15BD32:: @ 815BD32 message Route104_MrBrineysHouse_Text_191E80 - waittext - multichoicedef 21, 8, 14, 1, 0 + waitmessage + multichoicedefault 21, 8, 14, 1, 0 switch RESULT case 0, Route104_MrBrineysHouse_EventScript_15BDAB case 1, Route104_MrBrineysHouse_EventScript_15BDA1 @@ -55,15 +55,15 @@ Route104_MrBrineysHouse_EventScript_15BD32:: @ 815BD32 Route104_MrBrineysHouse_EventScript_15BD65:: @ 815BD65 msgbox Route104_MrBrineysHouse_Text_191CC3, 5 compare RESULT, 0 - jumpeq Route104_MrBrineysHouse_EventScript_15BD97 - jump Route104_MrBrineysHouse_EventScript_15BDAB + goto_if_eq Route104_MrBrineysHouse_EventScript_15BD97 + goto Route104_MrBrineysHouse_EventScript_15BDAB end Route104_MrBrineysHouse_EventScript_15BD7E:: @ 815BD7E msgbox Route104_MrBrineysHouse_Text_191DA6, 5 compare RESULT, 0 - jumpeq Route104_MrBrineysHouse_EventScript_15BD97 - jump Route104_MrBrineysHouse_EventScript_15BDAB + goto_if_eq Route104_MrBrineysHouse_EventScript_15BD97 + goto Route104_MrBrineysHouse_EventScript_15BDAB end Route104_MrBrineysHouse_EventScript_15BD97:: @ 815BD97 @@ -91,8 +91,8 @@ Route104_MrBrineysHouse_EventScript_15BDAB:: @ 815BDAB Route104_MrBrineysHouse_EventScript_15BDD1:: @ 815BDD1 lock faceplayer - checksound - pokecry SPECIES_WINGULL, 0 + waitse + playpokecry SPECIES_WINGULL, 0 msgbox Route104_MrBrineysHouse_Text_191FB9, 4 waitpokecry release diff --git a/data/scripts/maps/Route104_PrettyPetalFlowerShop.inc b/data/scripts/maps/Route104_PrettyPetalFlowerShop.inc index 02842c62d..4c5becf88 100644 --- a/data/scripts/maps/Route104_PrettyPetalFlowerShop.inc +++ b/data/scripts/maps/Route104_PrettyPetalFlowerShop.inc @@ -5,39 +5,39 @@ Route104_PrettyPetalFlowerShop_MapScripts:: @ 815BDE4 Route104_PrettyPetalFlowerShop_MapScript1_15BDEA:: @ 815BDEA setflag 2108 checkflag 127 - jumpif 0, Route104_PrettyPetalFlowerShop_EventScript_15BE03 + goto_if 0, Route104_PrettyPetalFlowerShop_EventScript_15BE03 checkflag 2057 - jumpif 0, Route104_PrettyPetalFlowerShop_EventScript_15BE03 + goto_if 0, Route104_PrettyPetalFlowerShop_EventScript_15BE03 setflag 1 end Route104_PrettyPetalFlowerShop_EventScript_15BE03:: @ 815BE03 - movespriteperm 1, 4, 6 + setobjectxyperm 1, 4, 6 end Route104_PrettyPetalFlowerShop_EventScript_15BE0B:: @ 815BE0B lock faceplayer checkflag 1 - jumpeq Route104_PrettyPetalFlowerShop_EventScript_15BE7C + goto_if_eq Route104_PrettyPetalFlowerShop_EventScript_15BE7C msgbox Route104_PrettyPetalFlowerShop_Text_1C5EC6, 4 checkflag 127 - jumpeq Route104_PrettyPetalFlowerShop_EventScript_15BE4A + goto_if_eq Route104_PrettyPetalFlowerShop_EventScript_15BE4A setflag 127 msgbox Route104_PrettyPetalFlowerShop_Text_1C5F48, 5 compare RESULT, 1 - callif 1, Route104_PrettyPetalFlowerShop_EventScript_15BE6A + call_if 1, Route104_PrettyPetalFlowerShop_EventScript_15BE6A compare RESULT, 0 - callif 1, Route104_PrettyPetalFlowerShop_EventScript_15BE73 + call_if 1, Route104_PrettyPetalFlowerShop_EventScript_15BE73 release end Route104_PrettyPetalFlowerShop_EventScript_15BE4A:: @ 815BE4A msgbox Route104_PrettyPetalFlowerShop_Text_1C5F1B, 5 compare RESULT, 1 - callif 1, Route104_PrettyPetalFlowerShop_EventScript_15BE6A + call_if 1, Route104_PrettyPetalFlowerShop_EventScript_15BE6A compare RESULT, 0 - callif 1, Route104_PrettyPetalFlowerShop_EventScript_15BE73 + call_if 1, Route104_PrettyPetalFlowerShop_EventScript_15BE73 release end @@ -51,7 +51,7 @@ Route104_PrettyPetalFlowerShop_EventScript_15BE73:: @ 815BE73 Route104_PrettyPetalFlowerShop_EventScript_15BE7C:: @ 815BE7C message Route104_PrettyPetalFlowerShop_Text_1A0C42 - waittext + waitmessage pokemartbp Route104_PrettyPetalFlowerShop_Items msgbox Route104_PrettyPetalFlowerShop_Text_1A0C02, 4 release @@ -73,7 +73,7 @@ Route104_PrettyPetalFlowerShop_EventScript_15BEA4:: @ 815BEA4 lock faceplayer checkflag 94 - jumpif 0, Route104_PrettyPetalFlowerShop_EventScript_15BEB9 + goto_if 0, Route104_PrettyPetalFlowerShop_EventScript_15BEB9 msgbox Route104_PrettyPetalFlowerShop_Text_1C61E8, 4 release end @@ -89,15 +89,15 @@ Route104_PrettyPetalFlowerShop_EventScript_15BEB9:: @ 815BEB9 Route104_PrettyPetalFlowerShop_EventScript_15BEDA:: @ 815BEDA lock faceplayer - checkdailyflags + dodailyevents checkflag 2256 - jumpeq Route104_PrettyPetalFlowerShop_EventScript_15BF1A + goto_if_eq Route104_PrettyPetalFlowerShop_EventScript_15BF1A msgbox Route104_PrettyPetalFlowerShop_Text_1C62DA, 4 random 8 addvar RESULT, 133 giveitem RESULT compare RESULT, 0 - jumpeq Route104_PrettyPetalFlowerShop_EventScript_1A029B + goto_if_eq Route104_PrettyPetalFlowerShop_EventScript_1A029B setflag 2256 msgbox Route104_PrettyPetalFlowerShop_Text_1C6335, 4 release diff --git a/data/scripts/maps/Route104_Prototype.inc b/data/scripts/maps/Route104_Prototype.inc index ff1c9d258..3c218747a 100644 --- a/data/scripts/maps/Route104_Prototype.inc +++ b/data/scripts/maps/Route104_Prototype.inc @@ -5,21 +5,21 @@ Route104_Prototype_EventScript_160C4B:: @ 8160C4B lock faceplayer checktrainerflag OPPONENT_BRIANNA_1 - jumpif 0, Route104_Prototype_EventScript_160C99 + goto_if 0, Route104_Prototype_EventScript_160C99 checktrainerflag OPPONENT_CINDY_2 - jumpif 0, Route104_Prototype_EventScript_160C99 + goto_if 0, Route104_Prototype_EventScript_160C99 checktrainerflag OPPONENT_AMY_AND_LIV_3 - jumpif 0, Route104_Prototype_EventScript_160C99 + goto_if 0, Route104_Prototype_EventScript_160C99 checktrainerflag OPPONENT_GINA_AND_MIA_2 - jumpif 0, Route104_Prototype_EventScript_160C99 + goto_if 0, Route104_Prototype_EventScript_160C99 checktrainerflag OPPONENT_LUCAS_2 - jumpif 0, Route104_Prototype_EventScript_160C99 + goto_if 0, Route104_Prototype_EventScript_160C99 checktrainerflag OPPONENT_MIKE_1 - jumpif 0, Route104_Prototype_EventScript_160C99 + goto_if 0, Route104_Prototype_EventScript_160C99 setflag 215 msgbox Route104_Prototype_Text_19B267, 4 checkflag 216 - jumpeq Route104_Prototype_EventScript_160CFB + goto_if_eq Route104_Prototype_EventScript_160CFB release end @@ -32,21 +32,21 @@ Route104_Prototype_EventScript_160CA3:: @ 8160CA3 lock faceplayer checktrainerflag OPPONENT_BRIANNA_1 - jumpif 0, Route104_Prototype_EventScript_160CF1 + goto_if 0, Route104_Prototype_EventScript_160CF1 checktrainerflag OPPONENT_CINDY_2 - jumpif 0, Route104_Prototype_EventScript_160CF1 + goto_if 0, Route104_Prototype_EventScript_160CF1 checktrainerflag OPPONENT_AMY_AND_LIV_3 - jumpif 0, Route104_Prototype_EventScript_160CF1 + goto_if 0, Route104_Prototype_EventScript_160CF1 checktrainerflag OPPONENT_GINA_AND_MIA_2 - jumpif 0, Route104_Prototype_EventScript_160CF1 + goto_if 0, Route104_Prototype_EventScript_160CF1 checktrainerflag OPPONENT_LUCAS_2 - jumpif 0, Route104_Prototype_EventScript_160CF1 + goto_if 0, Route104_Prototype_EventScript_160CF1 checktrainerflag OPPONENT_MIKE_1 - jumpif 0, Route104_Prototype_EventScript_160CF1 + goto_if 0, Route104_Prototype_EventScript_160CF1 setflag 216 msgbox Route104_Prototype_Text_19B2E9, 4 checkflag 215 - jumpeq Route104_Prototype_EventScript_160CFB + goto_if_eq Route104_Prototype_EventScript_160CFB release end @@ -56,10 +56,10 @@ Route104_Prototype_EventScript_160CF1:: @ 8160CF1 end Route104_Prototype_EventScript_160CFB:: @ 8160CFB - closebutton - pause 60 + closemessage + delay 60 fadescreen 1 - pause 60 + delay 60 special DoSoftReset waitstate release diff --git a/data/scripts/maps/Route105.inc b/data/scripts/maps/Route105.inc index c71e2ce05..1182dae7e 100644 --- a/data/scripts/maps/Route105.inc +++ b/data/scripts/maps/Route105.inc @@ -4,7 +4,7 @@ Route105_MapScripts:: @ 814F298 Route105_MapScript1_14F29E:: @ 814F29E checkflag 228 - callif 0, Route105_EventScript_14F2A8 + call_if 0, Route105_EventScript_14F2A8 end Route105_EventScript_14F2A8:: @ 814F2A8 diff --git a/data/scripts/maps/Route106.inc b/data/scripts/maps/Route106.inc index 0c25594c6..2ec903363 100644 --- a/data/scripts/maps/Route106.inc +++ b/data/scripts/maps/Route106.inc @@ -17,9 +17,9 @@ Route106_EventScript_14F34F:: @ 814F34F Route106_EventScript_14F366:: @ 814F366 trainerbattle 0, OPPONENT_ELLIOT_1, 0, Route106_Text_1B8EF0, Route106_Text_1B8F25 - specialval RESULT, sub_8082C68 + specialvar RESULT, sub_8082C68 compare RESULT, 1 - jumpeq Route106_EventScript_14F38D + goto_if_eq Route106_EventScript_14F38D msgbox Route106_Text_1B8F55, 6 end diff --git a/data/scripts/maps/Route107.inc b/data/scripts/maps/Route107.inc index a14bb7298..b6973407b 100644 --- a/data/scripts/maps/Route107.inc +++ b/data/scripts/maps/Route107.inc @@ -8,9 +8,9 @@ Route107_EventScript_14F3BC:: @ 814F3BC Route107_EventScript_14F3D3:: @ 814F3D3 trainerbattle 0, OPPONENT_TONY_1, 0, Route107_Text_1B933A, Route107_Text_1B9365 - specialval RESULT, sub_8082C68 + specialvar RESULT, sub_8082C68 compare RESULT, 1 - jumpeq Route107_EventScript_14F3FA + goto_if_eq Route107_EventScript_14F3FA msgbox Route107_Text_1B938E, 6 end diff --git a/data/scripts/maps/Route109.inc b/data/scripts/maps/Route109.inc index 58c38173e..9f0ef8c8d 100644 --- a/data/scripts/maps/Route109.inc +++ b/data/scripts/maps/Route109.inc @@ -3,11 +3,11 @@ Route109_MapScripts:: @ 814F4D2 Route109_EventScript_14F4D3:: @ 814F4D3 call Route109_EventScript_1A010C - spritelevelup 2, 0, 24, 0 - spritelevelup 255, 0, 24, 0 - move 2, Route109_Movement_14F67B - waitmove 0 - disappear 2 + setobjectpriority 2, 0, 24, 0 + setobjectpriority 255, 0, 24, 0 + applymovement 2, Route109_Movement_14F67B + waitmovement 0 + removeobject 2 switch FACING case 1, Route109_EventScript_14F518 case 3, Route109_EventScript_14F538 @@ -15,49 +15,49 @@ Route109_EventScript_14F4D3:: @ 814F4D3 end Route109_EventScript_14F518:: @ 814F518 - move 255, Route109_Movement_14F66D - waitmove 0 - jump Route109_EventScript_14F548 + applymovement 255, Route109_Movement_14F66D + waitmovement 0 + goto Route109_EventScript_14F548 end Route109_EventScript_14F528:: @ 814F528 - move 255, Route109_Movement_14F675 - waitmove 0 - jump Route109_EventScript_14F548 + applymovement 255, Route109_Movement_14F675 + waitmovement 0 + goto Route109_EventScript_14F548 end Route109_EventScript_14F538:: @ 814F538 - move 255, Route109_Movement_14F678 - waitmove 0 - jump Route109_EventScript_14F548 + applymovement 255, Route109_Movement_14F678 + waitmovement 0 + goto Route109_EventScript_14F548 end Route109_EventScript_14F548:: @ 814F548 - spriteinvisible 255, 0, 24 + hideobject 255, 0, 24 call Route109_EventScript_1A02E7 - move 1, Route109_Movement_14F5BF - move 255, Route109_Movement_14F5BF - waitmove 0 + applymovement 1, Route109_Movement_14F5BF + applymovement 255, Route109_Movement_14F5BF + waitmovement 0 call Route109_EventScript_1A02EF - spritevisible 255, 0, 11 - move 255, Route109_Movement_14F670 - waitmove 0 - reappear 4 + showobject 255, 0, 11 + applymovement 255, Route109_Movement_14F670 + waitmovement 0 + addobject 4 clearflag 743 - movespriteperm 2, 12, 8 - reappear 2 - spritelevelup 2, 0, 11, 0 - move 2, Route109_Movement_14F67D - waitmove 0 + setobjectxyperm 2, 12, 8 + addobject 2 + setobjectpriority 2, 0, 11, 0 + applymovement 2, Route109_Movement_14F67D + waitmovement 0 clearflag 740 setflag 744 - spriteinvisible 1, 0, 24 + hideobject 1, 0, 24 msgbox Route109_Text_16B4B5, 4 - closebutton + closemessage copyvar 0x4096, 0x8008 - restorespritelevel 255, 0, 24 - restorespritelevel 2, 0, 11 - moveoffscreen 2 + resetobjectpriority 255, 0, 24 + resetobjectpriority 2, 0, 11 + moveobjectoffscreen 2 release end @@ -272,22 +272,22 @@ Route109_EventScript_14F680:: @ 814F680 lock faceplayer checkflag 149 - jumpif 0, Route109_EventScript_14F691 - jump Route109_EventScript_14F6AF + goto_if 0, Route109_EventScript_14F691 + goto Route109_EventScript_14F6AF end Route109_EventScript_14F691:: @ 814F691 message Route109_Text_16E0F9 msgbox Route109_Text_16E0F9, 5 compare RESULT, 0 - jumpeq Route109_EventScript_14F6F1 - jump Route109_EventScript_14F6E2 + goto_if_eq Route109_EventScript_14F6F1 + goto Route109_EventScript_14F6E2 end Route109_EventScript_14F6AF:: @ 814F6AF message Route109_Text_16E26A - waittext - multichoicedef 21, 8, 14, 1, 0 + waitmessage + multichoicedefault 21, 8, 14, 1, 0 switch RESULT case 0, Route109_EventScript_14F6E2 case 1, Route109_EventScript_14F6FB @@ -296,8 +296,8 @@ Route109_EventScript_14F6AF:: @ 814F6AF Route109_EventScript_14F6E2:: @ 814F6E2 msgbox Route109_Text_16E159, 4 - closebutton - jump Route109_EventScript_14F4D3 + closemessage + goto Route109_EventScript_14F4D3 end Route109_EventScript_14F6F1:: @ 814F6F1 @@ -318,9 +318,9 @@ Route109_EventScript_14F70E:: @ 814F70E lock faceplayer msgbox Route109_Text_16E405, 4 - closebutton - move LAST_TALKED, Route109_Movement_1A083D - waitmove 0 + closemessage + applymovement LAST_TALKED, Route109_Movement_1A083D + waitmovement 0 release end @@ -329,22 +329,22 @@ Route109_EventScript_14F725:: @ 814F725 faceplayer special GetPlayerBigGuyGirlString checkflag 280 - jumpeq Route109_EventScript_14F762 + goto_if_eq Route109_EventScript_14F762 msgbox Route109_Text_16E433, 4 giveitem ITEM_SOFT_SAND compare RESULT, 0 - jumpeq Route109_EventScript_1A029B - closebutton - move LAST_TALKED, Route109_Movement_1A083D - waitmove 0 + goto_if_eq Route109_EventScript_1A029B + closemessage + applymovement LAST_TALKED, Route109_Movement_1A083D + waitmovement 0 setflag 280 release end Route109_EventScript_14F762:: @ 814F762 msgbox Route109_Text_16E446, 4 - move LAST_TALKED, Route109_Movement_1A083D - waitmove 0 + applymovement LAST_TALKED, Route109_Movement_1A083D + waitmovement 0 release end @@ -359,8 +359,8 @@ Route109_EventScript_14F77F:: @ 814F77F Route109_EventScript_14F788:: @ 814F788 lock faceplayer - checksound - pokecry SPECIES_ZIGZAGOON, 0 + waitse + playpokecry SPECIES_ZIGZAGOON, 0 msgbox Route109_Text_16E5CA, 4 waitpokecry release @@ -396,9 +396,9 @@ Route109_EventScript_14F7F2:: @ 814F7F2 Route109_EventScript_14F809:: @ 814F809 trainerbattle 0, OPPONENT_RICKY_1, 0, Route109_Text_1B9C23, Route109_Text_1B9C65 - specialval RESULT, sub_8082C68 + specialvar RESULT, sub_8082C68 compare RESULT, 1 - jumpeq Route109_EventScript_14F830 + goto_if_eq Route109_EventScript_14F830 msgbox Route109_Text_1B9C6E, 6 end @@ -409,9 +409,9 @@ Route109_EventScript_14F830:: @ 814F830 Route109_EventScript_14F847:: @ 814F847 trainerbattle 0, OPPONENT_LOLA_1, 0, Route109_Text_1B9D54, Route109_Text_1B9D87 - specialval RESULT, sub_8082C68 + specialvar RESULT, sub_8082C68 compare RESULT, 1 - jumpeq Route109_EventScript_14F86E + goto_if_eq Route109_EventScript_14F86E msgbox Route109_Text_1B9D8E, 6 end diff --git a/data/scripts/maps/Route109_SeashoreHouse.inc b/data/scripts/maps/Route109_SeashoreHouse.inc index e1d9c380b..4d8d363aa 100644 --- a/data/scripts/maps/Route109_SeashoreHouse.inc +++ b/data/scripts/maps/Route109_SeashoreHouse.inc @@ -10,11 +10,11 @@ Route109_SeashoreHouse_EventScript_160DD4:: @ 8160DD4 lock faceplayer checkflag 140 - jumpeq Route109_SeashoreHouse_EventScript_160E36 + goto_if_eq Route109_SeashoreHouse_EventScript_160E36 checkflag 141 - jumpeq Route109_SeashoreHouse_EventScript_160E08 + goto_if_eq Route109_SeashoreHouse_EventScript_160E08 checkflag 2 - jumpeq Route109_SeashoreHouse_EventScript_160DFE + goto_if_eq Route109_SeashoreHouse_EventScript_160DFE msgbox Route109_SeashoreHouse_Text_19B4D9, 4 setflag 2 release @@ -29,7 +29,7 @@ Route109_SeashoreHouse_EventScript_160E08:: @ 8160E08 msgbox Route109_SeashoreHouse_Text_19B609, 4 giveitem ITEM_SODA_POP, 6 compare RESULT, 0 - jumpeq Route109_SeashoreHouse_EventScript_160E2C + goto_if_eq Route109_SeashoreHouse_EventScript_160E2C setflag 140 release end @@ -40,41 +40,41 @@ Route109_SeashoreHouse_EventScript_160E2C:: @ 8160E2C end Route109_SeashoreHouse_EventScript_160E36:: @ 8160E36 - showmoney 0, 0 - snop + showmoneybox 0, 0 + nop msgbox Route109_SeashoreHouse_Text_19B702, 5 compare RESULT, 1 - jumpeq Route109_SeashoreHouse_EventScript_160E5A + goto_if_eq Route109_SeashoreHouse_EventScript_160E5A msgbox Route109_SeashoreHouse_Text_19B773, 4 - hidemoney 0, 0 + hidemoneybox 0, 0 release end Route109_SeashoreHouse_EventScript_160E5A:: @ 8160E5A checkmoney 0x12c, 0 compare RESULT, 0 - jumpeq Route109_SeashoreHouse_EventScript_160E9E + goto_if_eq Route109_SeashoreHouse_EventScript_160E9E checkitemspace ITEM_SODA_POP, 1 compare RESULT, 0 - jumpeq Route109_SeashoreHouse_EventScript_160EAB + goto_if_eq Route109_SeashoreHouse_EventScript_160EAB msgbox Route109_SeashoreHouse_Text_19B74C, 4 - paymoney 0x12c, 0 - updatemoney 0, 0 - snop + takemoney 0x12c, 0 + updatemoneybox 0, 0 + nop giveitem ITEM_SODA_POP - hidemoney 0, 0 + hidemoneybox 0, 0 release end Route109_SeashoreHouse_EventScript_160E9E:: @ 8160E9E msgbox Route109_SeashoreHouse_Text_19B759, 4 - hidemoney 0, 0 + hidemoneybox 0, 0 release end Route109_SeashoreHouse_EventScript_160EAB:: @ 8160EAB msgbox Route109_SeashoreHouse_Text_1A0CC2, 4 - hidemoney 0, 0 + hidemoneybox 0, 0 release end @@ -95,11 +95,11 @@ Route109_SeashoreHouse_EventScript_160EEE:: @ 8160EEE Route109_SeashoreHouse_EventScript_160F09:: @ 8160F09 checktrainerflag OPPONENT_DWAYNE - jumpif 0, Route109_SeashoreHouse_EventScript_160F29 + goto_if 0, Route109_SeashoreHouse_EventScript_160F29 checktrainerflag OPPONENT_JOHANNA - jumpif 0, Route109_SeashoreHouse_EventScript_160F29 + goto_if 0, Route109_SeashoreHouse_EventScript_160F29 checktrainerflag OPPONENT_SIMON - jumpif 0, Route109_SeashoreHouse_EventScript_160F29 + goto_if 0, Route109_SeashoreHouse_EventScript_160F29 setflag 141 release end diff --git a/data/scripts/maps/Route110.inc b/data/scripts/maps/Route110.inc index a77feaa0f..146be5959 100644 --- a/data/scripts/maps/Route110.inc +++ b/data/scripts/maps/Route110.inc @@ -13,11 +13,11 @@ Route110_MapScript1_14F914:: @ 814F914 call Route110_EventScript_1A014E call Route110_EventScript_1A0172 compare 0x40a9, 1 - callif 1, Route110_EventScript_14F92F + call_if 1, Route110_EventScript_14F92F end Route110_EventScript_14F92F:: @ 814F92F - playmusicbattle 403 @ Bicycle music + savebgm 403 @ Bicycle music return Route110_MapScript2_14F933:: @ 814F933 @@ -33,8 +33,8 @@ Route110_EventScript_14F946:: @ 814F946 lock faceplayer msgbox Route110_Text_16E6C0, 4 - move LAST_TALKED, Route110_Movement_1A083D - waitmove 0 + applymovement LAST_TALKED, Route110_Movement_1A083D + waitmovement 0 release end @@ -42,8 +42,8 @@ Route110_EventScript_14F95C:: @ 814F95C lock faceplayer msgbox Route110_Text_16E6F2, 4 - move LAST_TALKED, Route110_Movement_1A083D - waitmove 0 + applymovement LAST_TALKED, Route110_Movement_1A083D + waitmovement 0 release end @@ -51,8 +51,8 @@ Route110_EventScript_14F972:: @ 814F972 lock faceplayer msgbox Route110_Text_16E729, 4 - move LAST_TALKED, Route110_Movement_1A083D - waitmove 0 + applymovement LAST_TALKED, Route110_Movement_1A083D + waitmovement 0 release end @@ -60,8 +60,8 @@ Route110_EventScript_14F988:: @ 814F988 lock faceplayer msgbox Route110_Text_16E76A, 4 - move LAST_TALKED, Route110_Movement_1A083D - waitmove 0 + applymovement LAST_TALKED, Route110_Movement_1A083D + waitmovement 0 release end @@ -131,9 +131,9 @@ Route110_EventScript_14FA25:: @ 814FA25 Route110_EventScript_14FA2E:: @ 814FA2E lockall - specialval RESULT, GetRecordedCyclingRoadResults + specialvar RESULT, GetRecordedCyclingRoadResults compare RESULT, 0 - jumpeq Route110_EventScript_14FA49 + goto_if_eq Route110_EventScript_14FA49 msgbox Route110_Text_16F53A, 4 releaseall end @@ -146,11 +146,11 @@ Route110_EventScript_14FA49:: @ 814FA49 Route110_EventScript_14FA53:: @ 814FA53 lock faceplayer - specialval RESULT, GetPlayerAvatarBike + specialvar RESULT, GetPlayerAvatarBike compare RESULT, 1 - jumpeq Route110_EventScript_14FA84 + goto_if_eq Route110_EventScript_14FA84 compare 0x40a9, 0 - jumpeq Route110_EventScript_14FA7A + goto_if_eq Route110_EventScript_14FA7A msgbox Route110_Text_16F26A, 4 release end @@ -177,9 +177,9 @@ Route110_EventScript_14FAA5:: @ 814FAA5 Route110_EventScript_14FABC:: @ 814FABC trainerbattle 0, OPPONENT_EDWIN_1, 0, Route110_Text_1BA7D2, Route110_Text_1BA803 - specialval RESULT, sub_8082C68 + specialvar RESULT, sub_8082C68 compare RESULT, 1 - jumpeq Route110_EventScript_14FAE3 + goto_if_eq Route110_EventScript_14FAE3 msgbox Route110_Text_1BA829, 6 end @@ -205,9 +205,9 @@ Route110_EventScript_14FB28:: @ 814FB28 Route110_EventScript_14FB3F:: @ 814FB3F trainerbattle 0, OPPONENT_BENJAMIN_1, 0, Route110_Text_1BA352, Route110_Text_1BA379 - specialval RESULT, sub_8082C68 + specialvar RESULT, sub_8082C68 compare RESULT, 1 - jumpeq Route110_EventScript_14FB66 + goto_if_eq Route110_EventScript_14FB66 msgbox Route110_Text_1BA3A5, 6 end @@ -223,9 +223,9 @@ Route110_EventScript_14FB7D:: @ 814FB7D Route110_EventScript_14FB94:: @ 814FB94 trainerbattle 0, OPPONENT_ABIGAIL_1, 0, Route110_Text_1BA4A0, Route110_Text_1BA50F - specialval RESULT, sub_8082C68 + specialvar RESULT, sub_8082C68 compare RESULT, 1 - jumpeq Route110_EventScript_14FBBB + goto_if_eq Route110_EventScript_14FBBB msgbox Route110_Text_1BA52E, 6 end @@ -236,9 +236,9 @@ Route110_EventScript_14FBBB:: @ 814FBBB Route110_EventScript_14FBD2:: @ 814FBD2 trainerbattle 0, OPPONENT_ISABEL_1, 0, Route110_Text_1BA990, Route110_Text_1BA9D0 - specialval RESULT, sub_8082C68 + specialvar RESULT, sub_8082C68 compare RESULT, 1 - jumpeq Route110_EventScript_14FBF9 + goto_if_eq Route110_EventScript_14FBF9 msgbox Route110_Text_1BA9E9, 6 end @@ -254,8 +254,8 @@ Route110_EventScript_14FC10:: @ 814FC10 Route110_EventScript_14FC27:: @ 814FC27 lockall - move 21, Route110_Movement_1A0843 - waitmove 0 + applymovement 21, Route110_Movement_1A0843 + waitmovement 0 call Route110_EventScript_14FC39 releaseall end @@ -279,84 +279,84 @@ Route110_EventScript_14FC39:: @ 814FC39 Route110_EventScript_14FCC3:: @ 814FCC3 msgbox Route110_Text_16EF9F, 4 - jump Route110_EventScript_14FD09 + goto Route110_EventScript_14FD09 end Route110_EventScript_14FCD1:: @ 814FCD1 msgbox Route110_Text_16F012, 4 - jump Route110_EventScript_14FD09 + goto Route110_EventScript_14FD09 end Route110_EventScript_14FCDF:: @ 814FCDF msgbox Route110_Text_16F069, 4 - jump Route110_EventScript_14FD09 + goto Route110_EventScript_14FD09 end Route110_EventScript_14FCED:: @ 814FCED msgbox Route110_Text_16F0D0, 4 - jump Route110_EventScript_14FD09 + goto Route110_EventScript_14FD09 end Route110_EventScript_14FCFB:: @ 814FCFB msgbox Route110_Text_16F139, 4 - jump Route110_EventScript_14FD09 + goto Route110_EventScript_14FD09 end Route110_EventScript_14FD09:: @ 814FD09 setvar 0x40a9, 3 - playmusicbattle 0 - fadedefault + savebgm 0 + fadedefaultbgm return Route110_EventScript_14FD13:: @ 814FD13 setvar 0x8008, 1 - jump Route110_EventScript_14FD34 + goto Route110_EventScript_14FD34 end Route110_EventScript_14FD1E:: @ 814FD1E setvar 0x8008, 2 - jump Route110_EventScript_14FD34 + goto Route110_EventScript_14FD34 end Route110_EventScript_14FD29:: @ 814FD29 setvar 0x8008, 3 - jump Route110_EventScript_14FD34 + goto Route110_EventScript_14FD34 end Route110_EventScript_14FD34:: @ 814FD34 lockall - checkgender + checkplayergender compare RESULT, 0 - callif 1, Route110_EventScript_14FDA7 + call_if 1, Route110_EventScript_14FDA7 compare RESULT, 1 - callif 1, Route110_EventScript_14FDAC - move 28, Route110_Movement_1A0845 - waitmove 0 - move 28, Route110_Movement_1A0833 - waitmove 0 - move 28, Route110_Movement_1A0835 - waitmove 0 - pause 30 + call_if 1, Route110_EventScript_14FDAC + applymovement 28, Route110_Movement_1A0845 + waitmovement 0 + applymovement 28, Route110_Movement_1A0833 + waitmovement 0 + applymovement 28, Route110_Movement_1A0835 + waitmovement 0 + delay 30 compare 0x8008, 1 - callif 1, Route110_EventScript_14FF14 + call_if 1, Route110_EventScript_14FF14 compare 0x8008, 2 - callif 1, Route110_EventScript_14FF1F + call_if 1, Route110_EventScript_14FF1F compare 0x8008, 3 - callif 1, Route110_EventScript_14FF2A - checkgender + call_if 1, Route110_EventScript_14FF2A + checkplayergender compare RESULT, 0 - jumpeq Route110_EventScript_14FDB1 + goto_if_eq Route110_EventScript_14FDB1 compare RESULT, 1 - jumpeq Route110_EventScript_14FE2B + goto_if_eq Route110_EventScript_14FE2B releaseall end Route110_EventScript_14FDA7:: @ 814FDA7 - playmusic 415, 1 + playbgm 415, 1 return Route110_EventScript_14FDAC:: @ 814FDAC - playmusic 421, 1 + playbgm 421, 1 return Route110_EventScript_14FDB1:: @ 814FDB1 @@ -369,24 +369,24 @@ Route110_EventScript_14FDB1:: @ 814FDB1 Route110_EventScript_14FDE0:: @ 814FDE0 trainerbattle 3, OPPONENT_MAY_5, 0, Route110_Text_16E826 - jump Route110_EventScript_14FE10 + goto Route110_EventScript_14FE10 end Route110_EventScript_14FDF0:: @ 814FDF0 trainerbattle 3, OPPONENT_MAY_8, 0, Route110_Text_16E826 - jump Route110_EventScript_14FE10 + goto Route110_EventScript_14FE10 end Route110_EventScript_14FE00:: @ 814FE00 trainerbattle 3, OPPONENT_MAY_2, 0, Route110_Text_16E826 - jump Route110_EventScript_14FE10 + goto Route110_EventScript_14FE10 end Route110_EventScript_14FE10:: @ 814FE10 msgbox Route110_Text_16E84C, 4 call Route110_EventScript_14FEA5 msgbox Route110_Text_16E8B3, 4 - jump Route110_EventScript_14FEB2 + goto Route110_EventScript_14FEB2 end Route110_EventScript_14FE2B:: @ 814FE2B @@ -399,24 +399,24 @@ Route110_EventScript_14FE2B:: @ 814FE2B Route110_EventScript_14FE5A:: @ 814FE5A trainerbattle 3, OPPONENT_BRENDAN_5, 0, Route110_Text_16EA0F - jump Route110_EventScript_14FE8A + goto Route110_EventScript_14FE8A end Route110_EventScript_14FE6A:: @ 814FE6A trainerbattle 3, OPPONENT_BRENDAN_8, 0, Route110_Text_16EA0F - jump Route110_EventScript_14FE8A + goto Route110_EventScript_14FE8A end Route110_EventScript_14FE7A:: @ 814FE7A trainerbattle 3, OPPONENT_BRENDAN_2, 0, Route110_Text_16EA0F - jump Route110_EventScript_14FE8A + goto Route110_EventScript_14FE8A end Route110_EventScript_14FE8A:: @ 814FE8A msgbox Route110_Text_16EA2A, 4 call Route110_EventScript_14FEA5 msgbox Route110_Text_16EA7B, 4 - jump Route110_EventScript_14FEB2 + goto Route110_EventScript_14FEB2 end Route110_EventScript_14FEA5:: @ 814FEA5 @@ -424,71 +424,71 @@ Route110_EventScript_14FEA5:: @ 814FEA5 return Route110_EventScript_14FEB2:: @ 814FEB2 - closebutton + closemessage compare 0x8008, 1 - callif 1, Route110_EventScript_14FF56 + call_if 1, Route110_EventScript_14FF56 compare 0x8008, 2 - callif 1, Route110_EventScript_14FF5E + call_if 1, Route110_EventScript_14FF5E compare 0x8008, 3 - callif 1, Route110_EventScript_14FF66 - spritebehave 28, 10 - spritebehave 29, 10 - disappear 28 - reappear 29 - pause 45 + call_if 1, Route110_EventScript_14FF66 + setobjectmovementtype 28, 10 + setobjectmovementtype 29, 10 + removeobject 28 + addobject 29 + delay 45 compare 0x8008, 1 - callif 1, Route110_EventScript_14FF35 + call_if 1, Route110_EventScript_14FF35 compare 0x8008, 2 - callif 1, Route110_EventScript_14FF40 + call_if 1, Route110_EventScript_14FF40 compare 0x8008, 3 - callif 1, Route110_EventScript_14FF4B - disappear 29 + call_if 1, Route110_EventScript_14FF4B + removeobject 29 setvar 0x4069, 1 - playmusicbattle 0 - fadedefault + savebgm 0 + fadedefaultbgm releaseall end Route110_EventScript_14FF14:: @ 814FF14 - move 28, Route110_Movement_14FF6E - waitmove 0 + applymovement 28, Route110_Movement_14FF6E + waitmovement 0 return Route110_EventScript_14FF1F:: @ 814FF1F - move 28, Route110_Movement_14FF72 - waitmove 0 + applymovement 28, Route110_Movement_14FF72 + waitmovement 0 return Route110_EventScript_14FF2A:: @ 814FF2A - move 28, Route110_Movement_14FF74 - waitmove 0 + applymovement 28, Route110_Movement_14FF74 + waitmovement 0 return Route110_EventScript_14FF35:: @ 814FF35 - move 29, Route110_Movement_14FF78 - waitmove 0 + applymovement 29, Route110_Movement_14FF78 + waitmovement 0 return Route110_EventScript_14FF40:: @ 814FF40 - move 29, Route110_Movement_14FF80 - waitmove 0 + applymovement 29, Route110_Movement_14FF80 + waitmovement 0 return Route110_EventScript_14FF4B:: @ 814FF4B - move 29, Route110_Movement_14FF89 - waitmove 0 + applymovement 29, Route110_Movement_14FF89 + waitmovement 0 return Route110_EventScript_14FF56:: @ 814FF56 - movespriteperm 29, 33, 55 + setobjectxyperm 29, 33, 55 return Route110_EventScript_14FF5E:: @ 814FF5E - movespriteperm 29, 34, 55 + setobjectxyperm 29, 34, 55 return Route110_EventScript_14FF66:: @ 814FF66 - movespriteperm 29, 35, 55 + setobjectxyperm 29, 35, 55 return Route110_Movement_14FF6E:: @ 814FF6E diff --git a/data/scripts/maps/Route110_SeasideCyclingRoadNorthEntrance.inc b/data/scripts/maps/Route110_SeasideCyclingRoadNorthEntrance.inc index 96e492b39..c60bc366e 100644 --- a/data/scripts/maps/Route110_SeasideCyclingRoadNorthEntrance.inc +++ b/data/scripts/maps/Route110_SeasideCyclingRoadNorthEntrance.inc @@ -4,9 +4,9 @@ Route110_SeasideCyclingRoadNorthEntrance_MapScripts:: @ 81634C8 Route110_SeasideCyclingRoadNorthEntrance_MapScript1_1634CE:: @ 81634CE compare 0x40a9, 3 - callif 1, Route110_SeasideCyclingRoadNorthEntrance_EventScript_1634E5 + call_if 1, Route110_SeasideCyclingRoadNorthEntrance_EventScript_1634E5 compare 0x40a9, 2 - callif 1, Route110_SeasideCyclingRoadNorthEntrance_EventScript_1634E5 + call_if 1, Route110_SeasideCyclingRoadNorthEntrance_EventScript_1634E5 end Route110_SeasideCyclingRoadNorthEntrance_EventScript_1634E5:: @ 81634E5 @@ -23,11 +23,11 @@ Route110_SeasideCyclingRoadNorthEntrance_EventScript_1634EB:: @ 81634EB Route110_SeasideCyclingRoadNorthEntrance_EventScript_1634F7:: @ 81634F7 @ Coord event directly in front of the gatesman heading left to right lockall - specialval RESULT, GetPlayerAvatarBike @ player state? + specialvar RESULT, GetPlayerAvatarBike @ player state? compare RESULT, 2 - callif 1, Route110_SeasideCyclingRoadNorthEntrance_EventScript_16351D + call_if 1, Route110_SeasideCyclingRoadNorthEntrance_EventScript_16351D compare RESULT, 0 - jumpeq Route110_SeasideCyclingRoadNorthEntrance_EventScript_163523 + goto_if_eq Route110_SeasideCyclingRoadNorthEntrance_EventScript_163523 setflag 2091 setvar 0x4001, 1 releaseall @@ -41,9 +41,9 @@ Route110_SeasideCyclingRoadNorthEntrance_EventScript_16351D:: @ 816351D Route110_SeasideCyclingRoadNorthEntrance_EventScript_163523:: @ 8163523 @ You don't have a bike! msgbox Route110_SeasideCyclingRoadNorthEntrance_Text_19E3AD, 4 - closebutton - move 255, Route110_SeasideCyclingRoadNorthEntrance_Movement_163538 - waitmove 0 + closemessage + applymovement 255, Route110_SeasideCyclingRoadNorthEntrance_Movement_163538 + waitmovement 0 releaseall end diff --git a/data/scripts/maps/Route110_SeasideCyclingRoadSouthEntrance.inc b/data/scripts/maps/Route110_SeasideCyclingRoadSouthEntrance.inc index 08d6fb5f1..cf18a8e36 100644 --- a/data/scripts/maps/Route110_SeasideCyclingRoadSouthEntrance.inc +++ b/data/scripts/maps/Route110_SeasideCyclingRoadSouthEntrance.inc @@ -10,9 +10,9 @@ Route110_SeasideCyclingRoadSouthEntrance_EventScript_16347F:: @ 816347F Route110_SeasideCyclingRoadSouthEntrance_EventScript_16348B:: @ 816348B lockall - specialval RESULT, GetPlayerAvatarBike + specialvar RESULT, GetPlayerAvatarBike compare RESULT, 0 - jumpeq Route110_SeasideCyclingRoadSouthEntrance_EventScript_1634A6 + goto_if_eq Route110_SeasideCyclingRoadSouthEntrance_EventScript_1634A6 setflag 2091 setvar 0x4001, 1 releaseall @@ -20,9 +20,9 @@ Route110_SeasideCyclingRoadSouthEntrance_EventScript_16348B:: @ 816348B Route110_SeasideCyclingRoadSouthEntrance_EventScript_1634A6:: @ 81634A6 msgbox Route110_SeasideCyclingRoadSouthEntrance_Text_19E3AD, 4 - closebutton - move 255, Route110_SeasideCyclingRoadSouthEntrance_Movement_1634BB - waitmove 0 + closemessage + applymovement 255, Route110_SeasideCyclingRoadSouthEntrance_Movement_1634BB + waitmovement 0 releaseall end diff --git a/data/scripts/maps/Route110_TrickHouseEnd.inc b/data/scripts/maps/Route110_TrickHouseEnd.inc index 10e1a6865..12309207c 100644 --- a/data/scripts/maps/Route110_TrickHouseEnd.inc +++ b/data/scripts/maps/Route110_TrickHouseEnd.inc @@ -7,7 +7,7 @@ Route110_TrickHouseEnd_MapScripts:: @ 8161936 Route110_TrickHouseEnd_MapScript1_16194B:: @ 816194B compare 0x4001, 1 - callif 1, Route110_TrickHouseEnd_EventScript_161994 + call_if 1, Route110_TrickHouseEnd_EventScript_161994 end Route110_TrickHouseEnd_MapScript1_161957:: @ 8161957 @@ -21,9 +21,9 @@ Route110_TrickHouseEnd_MapScript2_161965:: @ 8161965 .2byte 0 Route110_TrickHouseEnd_EventScript_16196F:: @ 816196F - reappear 1 - spritevisible 1, 29, 1 - spriteface 1, 4 + addobject 1 + showobject 1, 29, 1 + turnobject 1, 4 end Route110_TrickHouseEnd_MapScript2_16197C:: @ 816197C @@ -62,9 +62,9 @@ Route110_TrickHouseEnd_EventScript_161A0B:: @ 8161A0B setvar 0x40c1, 0 giveitem ITEM_RARE_CANDY compare RESULT, 0 - callif 1, Route110_TrickHouseEnd_EventScript_161C4E + call_if 1, Route110_TrickHouseEnd_EventScript_161C4E msgbox Route110_TrickHouseEnd_Text_19C9BD, 4 - closebutton + closemessage call Route110_TrickHouseEnd_EventScript_161C2E release end @@ -75,9 +75,9 @@ Route110_TrickHouseEnd_EventScript_161A47:: @ 8161A47 setvar 0x40c1, 0 giveitem ITEM_TIMER_BALL compare RESULT, 0 - callif 1, Route110_TrickHouseEnd_EventScript_161C4E + call_if 1, Route110_TrickHouseEnd_EventScript_161C4E msgbox Route110_TrickHouseEnd_Text_19C9BD, 4 - closebutton + closemessage call Route110_TrickHouseEnd_EventScript_161C2E release end @@ -88,9 +88,9 @@ Route110_TrickHouseEnd_EventScript_161A83:: @ 8161A83 setvar 0x40c1, 0 giveitem ITEM_HARD_STONE compare RESULT, 0 - callif 1, Route110_TrickHouseEnd_EventScript_161C4E + call_if 1, Route110_TrickHouseEnd_EventScript_161C4E msgbox Route110_TrickHouseEnd_Text_19C9BD, 4 - closebutton + closemessage call Route110_TrickHouseEnd_EventScript_161C2E release end @@ -101,9 +101,9 @@ Route110_TrickHouseEnd_EventScript_161ABF:: @ 8161ABF setvar 0x40c1, 0 giveitem ITEM_SMOKE_BALL compare RESULT, 0 - callif 1, Route110_TrickHouseEnd_EventScript_161C4E + call_if 1, Route110_TrickHouseEnd_EventScript_161C4E msgbox Route110_TrickHouseEnd_Text_19C9BD, 4 - closebutton + closemessage call Route110_TrickHouseEnd_EventScript_161C2E release end @@ -114,9 +114,9 @@ Route110_TrickHouseEnd_EventScript_161AFB:: @ 8161AFB setvar 0x40c1, 0 giveitem ITEM_TM12 compare RESULT, 0 - callif 1, Route110_TrickHouseEnd_EventScript_161C4E + call_if 1, Route110_TrickHouseEnd_EventScript_161C4E msgbox Route110_TrickHouseEnd_Text_19C9BD, 4 - closebutton + closemessage call Route110_TrickHouseEnd_EventScript_161C2E release end @@ -127,9 +127,9 @@ Route110_TrickHouseEnd_EventScript_161B37:: @ 8161B37 setvar 0x40c1, 0 giveitem ITEM_MAGNET compare RESULT, 0 - callif 1, Route110_TrickHouseEnd_EventScript_161C4E + call_if 1, Route110_TrickHouseEnd_EventScript_161C4E msgbox Route110_TrickHouseEnd_Text_19C9BD, 4 - closebutton + closemessage call Route110_TrickHouseEnd_EventScript_161C2E release end @@ -140,30 +140,30 @@ Route110_TrickHouseEnd_EventScript_161B73:: @ 8161B73 setvar 0x40c1, 0 giveitem ITEM_PP_MAX compare RESULT, 0 - callif 1, Route110_TrickHouseEnd_EventScript_161C4E + call_if 1, Route110_TrickHouseEnd_EventScript_161C4E msgbox Route110_TrickHouseEnd_Text_19C9BD, 4 - closebutton + closemessage call Route110_TrickHouseEnd_EventScript_161C2E release end Route110_TrickHouseEnd_EventScript_161BAF:: @ 8161BAF msgbox Route110_TrickHouseEnd_Text_19C5AF, 4 - closebutton + closemessage compare FACING, 1 - callif 1, Route110_TrickHouseEnd_EventScript_161C74 + call_if 1, Route110_TrickHouseEnd_EventScript_161C74 compare FACING, 2 - callif 1, Route110_TrickHouseEnd_EventScript_161C7F + call_if 1, Route110_TrickHouseEnd_EventScript_161C7F compare FACING, 3 - callif 1, Route110_TrickHouseEnd_EventScript_161C8A + call_if 1, Route110_TrickHouseEnd_EventScript_161C8A compare FACING, 4 - callif 1, Route110_TrickHouseEnd_EventScript_161C95 - pause 30 + call_if 1, Route110_TrickHouseEnd_EventScript_161C95 + delay 30 msgbox Route110_TrickHouseEnd_Text_19C602, 4 - closebutton - move 1, Route110_TrickHouseEnd_Movement_1A0839 - waitmove 0 - pause 30 + closemessage + applymovement 1, Route110_TrickHouseEnd_Movement_1A0839 + waitmovement 0 + delay 30 msgbox Route110_TrickHouseEnd_Text_19C691, 4 setvar 0x40c1, 0 .ifdef SAPPHIRE @@ -172,7 +172,7 @@ Route110_TrickHouseEnd_EventScript_161BAF:: @ 8161BAF givedecoration 31 .endc compare RESULT, 0 - callif 1, Route110_TrickHouseEnd_EventScript_161C61 + call_if 1, Route110_TrickHouseEnd_EventScript_161C61 msgbox Route110_TrickHouseEnd_Text_19C85C, 4 call Route110_TrickHouseEnd_EventScript_161C2E special ResetTrickHouseEndRoomFlag @@ -180,12 +180,12 @@ Route110_TrickHouseEnd_EventScript_161BAF:: @ 8161BAF end Route110_TrickHouseEnd_EventScript_161C2E:: @ 8161C2E - move 1, Route110_TrickHouseEnd_Movement_161315 - waitmove 0 - playsfx 178 - move 1, Route110_TrickHouseEnd_Movement_16131E - waitmove 0 - disappear 1 + applymovement 1, Route110_TrickHouseEnd_Movement_161315 + waitmovement 0 + playse 178 + applymovement 1, Route110_TrickHouseEnd_Movement_16131E + waitmovement 0 + removeobject 1 addvar 0x4044, 1 return @@ -202,43 +202,43 @@ Route110_TrickHouseEnd_EventScript_161C61:: @ 8161C61 return Route110_TrickHouseEnd_EventScript_161C74:: @ 8161C74 - move 1, Route110_TrickHouseEnd_Movement_1A0845 - waitmove 0 + applymovement 1, Route110_TrickHouseEnd_Movement_1A0845 + waitmovement 0 return Route110_TrickHouseEnd_EventScript_161C7F:: @ 8161C7F - move 1, Route110_TrickHouseEnd_Movement_1A0841 - waitmove 0 + applymovement 1, Route110_TrickHouseEnd_Movement_1A0841 + waitmovement 0 return Route110_TrickHouseEnd_EventScript_161C8A:: @ 8161C8A - move 1, Route110_TrickHouseEnd_Movement_1A083F - waitmove 0 + applymovement 1, Route110_TrickHouseEnd_Movement_1A083F + waitmovement 0 return Route110_TrickHouseEnd_EventScript_161C95:: @ 8161C95 - move 1, Route110_TrickHouseEnd_Movement_1A0843 - waitmove 0 + applymovement 1, Route110_TrickHouseEnd_Movement_1A0843 + waitmovement 0 return Route110_TrickHouseEnd_EventScript_161CA0:: @ 8161CA0 lockall - spriteface 1, 3 - playsfx 21 - move 1, Route110_TrickHouseEnd_Movement_1A0833 - waitmove 0 - pause 20 - move 1, Route110_TrickHouseEnd_Movement_161CEA - waitmove 0 - playsfx 178 - move 255, Route110_TrickHouseEnd_Movement_1A0845 - waitmove 0 + turnobject 1, 3 + playse 21 + applymovement 1, Route110_TrickHouseEnd_Movement_1A0833 + waitmovement 0 + delay 20 + applymovement 1, Route110_TrickHouseEnd_Movement_161CEA + waitmovement 0 + playse 178 + applymovement 255, Route110_TrickHouseEnd_Movement_1A0845 + waitmovement 0 msgbox Route110_TrickHouseEnd_Text_19CA8B, 4 - closebutton - move 255, Route110_TrickHouseEnd_Movement_161CE8 - waitmove 0 - pause 4 - spriteface 1, 4 + closemessage + applymovement 255, Route110_TrickHouseEnd_Movement_161CE8 + waitmovement 0 + delay 4 + turnobject 1, 4 releaseall end diff --git a/data/scripts/maps/Route110_TrickHouseEntrance.inc b/data/scripts/maps/Route110_TrickHouseEntrance.inc index 2601942be..568ba2af6 100644 --- a/data/scripts/maps/Route110_TrickHouseEntrance.inc +++ b/data/scripts/maps/Route110_TrickHouseEntrance.inc @@ -7,17 +7,17 @@ Route110_TrickHouseEntrance_MapScripts:: @ 8160F2B Route110_TrickHouseEntrance_MapScript1_160F3B:: @ 8160F3B setflag 2114 compare 0x40b5, 1 - jumpeq Route110_TrickHouseEntrance_EventScript_160FCE + goto_if_eq Route110_TrickHouseEntrance_EventScript_160FCE compare 0x40c1, 1 - jumpeq Route110_TrickHouseEntrance_EventScript_160FB2 + goto_if_eq Route110_TrickHouseEntrance_EventScript_160FB2 compare 0x40a6, 1 - jumpeq Route110_TrickHouseEntrance_EventScript_16108E + goto_if_eq Route110_TrickHouseEntrance_EventScript_16108E compare 0x40a7, 5 - callif 1, Route110_TrickHouseEntrance_EventScript_160FDE + call_if 1, Route110_TrickHouseEntrance_EventScript_160FDE compare 0x40a7, 3 - callif 1, Route110_TrickHouseEntrance_EventScript_160FDE + call_if 1, Route110_TrickHouseEntrance_EventScript_160FDE compare 0x40a7, 0 - callif 1, Route110_TrickHouseEntrance_EventScript_160FDE + call_if 1, Route110_TrickHouseEntrance_EventScript_160FDE switch 0x40a7 case 0, Route110_TrickHouseEntrance_EventScript_16109A case 1, Route110_TrickHouseEntrance_EventScript_1610A0 @@ -28,7 +28,7 @@ Route110_TrickHouseEntrance_MapScript1_160F3B:: @ 8160F3B Route110_TrickHouseEntrance_EventScript_160FB2:: @ 8160FB2 setvar 0x40a5, 1 compare 0x4044, 8 - jumpeq Route110_TrickHouseEntrance_EventScript_160FC8 + goto_if_eq Route110_TrickHouseEntrance_EventScript_160FC8 setvar 0x40a7, 2 end @@ -45,56 +45,56 @@ Route110_TrickHouseEntrance_EventScript_160FCE:: @ 8160FCE Route110_TrickHouseEntrance_EventScript_160FDE:: @ 8160FDE setvar 0x40a7, 0 compare 0x4044, 1 - callif 1, Route110_TrickHouseEntrance_EventScript_16103C + call_if 1, Route110_TrickHouseEntrance_EventScript_16103C compare 0x4044, 2 - callif 1, Route110_TrickHouseEntrance_EventScript_161046 + call_if 1, Route110_TrickHouseEntrance_EventScript_161046 compare 0x4044, 3 - callif 1, Route110_TrickHouseEntrance_EventScript_161050 + call_if 1, Route110_TrickHouseEntrance_EventScript_161050 compare 0x4044, 4 - callif 1, Route110_TrickHouseEntrance_EventScript_16105A + call_if 1, Route110_TrickHouseEntrance_EventScript_16105A compare 0x4044, 5 - callif 1, Route110_TrickHouseEntrance_EventScript_161064 + call_if 1, Route110_TrickHouseEntrance_EventScript_161064 compare 0x4044, 6 - callif 1, Route110_TrickHouseEntrance_EventScript_16106E + call_if 1, Route110_TrickHouseEntrance_EventScript_16106E compare 0x4044, 7 - callif 1, Route110_TrickHouseEntrance_EventScript_161078 + call_if 1, Route110_TrickHouseEntrance_EventScript_161078 compare 0x4044, 8 - callif 1, Route110_TrickHouseEntrance_EventScript_161082 + call_if 1, Route110_TrickHouseEntrance_EventScript_161082 return Route110_TrickHouseEntrance_EventScript_16103C:: @ 816103C checkflag 2057 - callif 0, Route110_TrickHouseEntrance_EventScript_161088 + call_if 0, Route110_TrickHouseEntrance_EventScript_161088 return Route110_TrickHouseEntrance_EventScript_161046:: @ 8161046 checkflag 2058 - callif 0, Route110_TrickHouseEntrance_EventScript_161088 + call_if 0, Route110_TrickHouseEntrance_EventScript_161088 return Route110_TrickHouseEntrance_EventScript_161050:: @ 8161050 checkflag 2059 - callif 0, Route110_TrickHouseEntrance_EventScript_161088 + call_if 0, Route110_TrickHouseEntrance_EventScript_161088 return Route110_TrickHouseEntrance_EventScript_16105A:: @ 816105A checkflag 2060 - callif 0, Route110_TrickHouseEntrance_EventScript_161088 + call_if 0, Route110_TrickHouseEntrance_EventScript_161088 return Route110_TrickHouseEntrance_EventScript_161064:: @ 8161064 checkflag 2061 - callif 0, Route110_TrickHouseEntrance_EventScript_161088 + call_if 0, Route110_TrickHouseEntrance_EventScript_161088 return Route110_TrickHouseEntrance_EventScript_16106E:: @ 816106E checkflag 2062 - callif 0, Route110_TrickHouseEntrance_EventScript_161088 + call_if 0, Route110_TrickHouseEntrance_EventScript_161088 return Route110_TrickHouseEntrance_EventScript_161078:: @ 8161078 checkflag 2052 - callif 0, Route110_TrickHouseEntrance_EventScript_161088 + call_if 0, Route110_TrickHouseEntrance_EventScript_161088 return Route110_TrickHouseEntrance_EventScript_161082:: @ 8161082 @@ -106,8 +106,8 @@ Route110_TrickHouseEntrance_EventScript_161088:: @ 8161088 return Route110_TrickHouseEntrance_EventScript_16108E:: @ 816108E - movespriteperm 1, 5, 2 - spritebehave 1, 4 + setobjectxyperm 1, 5, 2 + setobjectmovementtype 1, 4 end Route110_TrickHouseEntrance_EventScript_16109A:: @ 816109A @@ -138,15 +138,15 @@ Route110_TrickHouseEntrance_MapScript2_1610B2:: @ 81610B2 .2byte 0 Route110_TrickHouseEntrance_EventScript_1610F4:: @ 81610F4 - reappear 1 - spritevisible 1, 29, 0 - spriteface 1, 4 - spriteface 255, 3 + addobject 1 + showobject 1, 29, 0 + turnobject 1, 4 + turnobject 255, 3 end Route110_TrickHouseEntrance_EventScript_161105:: @ 8161105 - reappear 1 - spriteinvisible 1, 29, 0 + addobject 1 + hideobject 1, 29, 0 switch 0x4044 case 0, Route110_TrickHouseEntrance_EventScript_16116B case 1, Route110_TrickHouseEntrance_EventScript_161173 @@ -159,51 +159,51 @@ Route110_TrickHouseEntrance_EventScript_161105:: @ 8161105 end Route110_TrickHouseEntrance_EventScript_16116B:: @ 816116B - movesprite 1, 6, 3 + setobjectxy 1, 6, 3 end Route110_TrickHouseEntrance_EventScript_161173:: @ 8161173 - movesprite 1, 11, 5 + setobjectxy 1, 11, 5 end Route110_TrickHouseEntrance_EventScript_16117B:: @ 816117B - movesprite 1, 11, 1 + setobjectxy 1, 11, 1 end Route110_TrickHouseEntrance_EventScript_161183:: @ 8161183 - movesprite 1, 3, 1 + setobjectxy 1, 3, 1 end Route110_TrickHouseEntrance_EventScript_16118B:: @ 816118B - movesprite 1, 0, 5 + setobjectxy 1, 0, 5 end Route110_TrickHouseEntrance_EventScript_161193:: @ 8161193 - movesprite 1, 9, 1 + setobjectxy 1, 9, 1 end Route110_TrickHouseEntrance_EventScript_16119B:: @ 816119B - movesprite 1, 8, 1 + setobjectxy 1, 8, 1 end Route110_TrickHouseEntrance_EventScript_1611A3:: @ 81611A3 - movesprite 1, 4, 4 + setobjectxy 1, 4, 4 end Route110_TrickHouseEntrance_EventScript_1611AB:: @ 81611AB - disappear 1 + removeobject 1 end Route110_TrickHouseEntrance_EventScript_1611AF:: @ 81611AF - reappear 1 - movesprite 1, 5, 2 - spriteface 1, 2 + addobject 1 + setobjectxy 1, 5, 2 + turnobject 1, 2 end Route110_TrickHouseEntrance_EventScript_1611BE:: @ 81611BE - reappear 1 - movesprite 1, 5, 2 - spriteface 1, 1 + addobject 1 + setobjectxy 1, 5, 2 + turnobject 1, 1 end Route110_TrickHouseEntrance_MapScript2_1611CD:: @ 81611CD @@ -212,18 +212,18 @@ Route110_TrickHouseEntrance_MapScript2_1611CD:: @ 81611CD Route110_TrickHouseEntrance_EventScript_1611D7:: @ 81611D7 lockall - pause 20 + delay 20 compare 0x4044, 0 - callif 1, Route110_TrickHouseEntrance_EventScript_161327 + call_if 1, Route110_TrickHouseEntrance_EventScript_161327 msgbox Route110_TrickHouseEntrance_Text_19BD82, 4 - closebutton - pause 20 - move 1, Route110_TrickHouseEntrance_Movement_161315 - waitmove 0 - playsfx 178 - move 1, Route110_TrickHouseEntrance_Movement_16131E - waitmove 0 - disappear 1 + closemessage + delay 20 + applymovement 1, Route110_TrickHouseEntrance_Movement_161315 + waitmovement 0 + playse 178 + applymovement 1, Route110_TrickHouseEntrance_Movement_16131E + waitmovement 0 + removeobject 1 setvar 0x40a7, 1 setvar 0x40a6, 0 releaseall @@ -243,28 +243,28 @@ Route110_TrickHouseEntrance_EventScript_16121A:: @ 816121A end Route110_TrickHouseEntrance_EventScript_16124D:: @ 816124D - playsfx 21 - move 255, Route110_TrickHouseEntrance_Movement_1A0833 - waitmove 0 - move 255, Route110_TrickHouseEntrance_Movement_1A0835 - waitmove 0 + playse 21 + applymovement 255, Route110_TrickHouseEntrance_Movement_1A0833 + waitmovement 0 + applymovement 255, Route110_TrickHouseEntrance_Movement_1A0835 + waitmovement 0 compare 0x4044, 0 - callif 1, Route110_TrickHouseEntrance_EventScript_1612CD + call_if 1, Route110_TrickHouseEntrance_EventScript_1612CD compare 0x4044, 1 - callif 1, Route110_TrickHouseEntrance_EventScript_1612D6 + call_if 1, Route110_TrickHouseEntrance_EventScript_1612D6 compare 0x4044, 2 - callif 1, Route110_TrickHouseEntrance_EventScript_1612DF + call_if 1, Route110_TrickHouseEntrance_EventScript_1612DF compare 0x4044, 3 - callif 1, Route110_TrickHouseEntrance_EventScript_1612E8 + call_if 1, Route110_TrickHouseEntrance_EventScript_1612E8 compare 0x4044, 4 - callif 1, Route110_TrickHouseEntrance_EventScript_1612F1 + call_if 1, Route110_TrickHouseEntrance_EventScript_1612F1 compare 0x4044, 5 - callif 1, Route110_TrickHouseEntrance_EventScript_1612FA + call_if 1, Route110_TrickHouseEntrance_EventScript_1612FA compare 0x4044, 6 - callif 1, Route110_TrickHouseEntrance_EventScript_161303 + call_if 1, Route110_TrickHouseEntrance_EventScript_161303 compare 0x4044, 7 - callif 1, Route110_TrickHouseEntrance_EventScript_16130C - closebutton + call_if 1, Route110_TrickHouseEntrance_EventScript_16130C + closemessage setvar 0x40a6, 1 warp Route110_TrickHouseEntrance, 255, 6, 2 waitstate @@ -333,46 +333,46 @@ Route110_TrickHouseEntrance_EventScript_161327:: @ 8161327 Route110_TrickHouseEntrance_EventScript_161330:: @ 8161330 msgbox Route110_TrickHouseEntrance_Text_19BF19, 4 - closebutton - move 1, Route110_TrickHouseEntrance_Movement_1A0839 - waitmove 0 - playsfx 21 - move 1, Route110_TrickHouseEntrance_Movement_1A0833 - waitmove 0 - move 1, Route110_TrickHouseEntrance_Movement_1A0835 - waitmove 0 + closemessage + applymovement 1, Route110_TrickHouseEntrance_Movement_1A0839 + waitmovement 0 + playse 21 + applymovement 1, Route110_TrickHouseEntrance_Movement_1A0833 + waitmovement 0 + applymovement 1, Route110_TrickHouseEntrance_Movement_1A0835 + waitmovement 0 msgbox Route110_TrickHouseEntrance_Text_19BFAB, 4 - move 1, Route110_TrickHouseEntrance_Movement_1A0841 - waitmove 0 + applymovement 1, Route110_TrickHouseEntrance_Movement_1A0841 + waitmovement 0 releaseall end Route110_TrickHouseEntrance_EventScript_16136E:: @ 816136E - move 1, Route110_TrickHouseEntrance_Movement_1A0839 - waitmove 0 + applymovement 1, Route110_TrickHouseEntrance_Movement_1A0839 + waitmovement 0 msgbox Route110_TrickHouseEntrance_Text_19C07E, 4 compare 0x4044, 1 - jumpeq Route110_TrickHouseEntrance_EventScript_1613CE + goto_if_eq Route110_TrickHouseEntrance_EventScript_1613CE compare 0x4044, 2 - jumpeq Route110_TrickHouseEntrance_EventScript_1613FA + goto_if_eq Route110_TrickHouseEntrance_EventScript_1613FA compare 0x4044, 3 - jumpeq Route110_TrickHouseEntrance_EventScript_161426 + goto_if_eq Route110_TrickHouseEntrance_EventScript_161426 compare 0x4044, 4 - jumpeq Route110_TrickHouseEntrance_EventScript_161452 + goto_if_eq Route110_TrickHouseEntrance_EventScript_161452 compare 0x4044, 5 - jumpeq Route110_TrickHouseEntrance_EventScript_16147E + goto_if_eq Route110_TrickHouseEntrance_EventScript_16147E compare 0x4044, 6 - jumpeq Route110_TrickHouseEntrance_EventScript_1614AA + goto_if_eq Route110_TrickHouseEntrance_EventScript_1614AA compare 0x4044, 7 - jumpeq Route110_TrickHouseEntrance_EventScript_1614D6 + goto_if_eq Route110_TrickHouseEntrance_EventScript_1614D6 end Route110_TrickHouseEntrance_EventScript_1613CE:: @ 81613CE giveitem ITEM_RARE_CANDY compare RESULT, 1 - jumpeq Route110_TrickHouseEntrance_EventScript_161502 + goto_if_eq Route110_TrickHouseEntrance_EventScript_161502 compare RESULT, 0 - callif 1, Route110_TrickHouseEntrance_EventScript_1A02A5 + call_if 1, Route110_TrickHouseEntrance_EventScript_1A02A5 msgbox Route110_TrickHouseEntrance_Text_19C0FC, 4 releaseall end @@ -380,9 +380,9 @@ Route110_TrickHouseEntrance_EventScript_1613CE:: @ 81613CE Route110_TrickHouseEntrance_EventScript_1613FA:: @ 81613FA giveitem ITEM_TIMER_BALL compare RESULT, 1 - jumpeq Route110_TrickHouseEntrance_EventScript_161502 + goto_if_eq Route110_TrickHouseEntrance_EventScript_161502 compare RESULT, 0 - callif 1, Route110_TrickHouseEntrance_EventScript_1A02A5 + call_if 1, Route110_TrickHouseEntrance_EventScript_1A02A5 msgbox Route110_TrickHouseEntrance_Text_19C0FC, 4 releaseall end @@ -390,9 +390,9 @@ Route110_TrickHouseEntrance_EventScript_1613FA:: @ 81613FA Route110_TrickHouseEntrance_EventScript_161426:: @ 8161426 giveitem ITEM_HARD_STONE compare RESULT, 1 - jumpeq Route110_TrickHouseEntrance_EventScript_161502 + goto_if_eq Route110_TrickHouseEntrance_EventScript_161502 compare RESULT, 0 - callif 1, Route110_TrickHouseEntrance_EventScript_1A02A5 + call_if 1, Route110_TrickHouseEntrance_EventScript_1A02A5 msgbox Route110_TrickHouseEntrance_Text_19C0FC, 4 releaseall end @@ -400,9 +400,9 @@ Route110_TrickHouseEntrance_EventScript_161426:: @ 8161426 Route110_TrickHouseEntrance_EventScript_161452:: @ 8161452 giveitem ITEM_SMOKE_BALL compare RESULT, 1 - jumpeq Route110_TrickHouseEntrance_EventScript_161502 + goto_if_eq Route110_TrickHouseEntrance_EventScript_161502 compare RESULT, 0 - callif 1, Route110_TrickHouseEntrance_EventScript_1A02A5 + call_if 1, Route110_TrickHouseEntrance_EventScript_1A02A5 msgbox Route110_TrickHouseEntrance_Text_19C0FC, 4 releaseall end @@ -410,9 +410,9 @@ Route110_TrickHouseEntrance_EventScript_161452:: @ 8161452 Route110_TrickHouseEntrance_EventScript_16147E:: @ 816147E giveitem ITEM_TM12 compare RESULT, 1 - jumpeq Route110_TrickHouseEntrance_EventScript_161502 + goto_if_eq Route110_TrickHouseEntrance_EventScript_161502 compare RESULT, 0 - callif 1, Route110_TrickHouseEntrance_EventScript_1A02A5 + call_if 1, Route110_TrickHouseEntrance_EventScript_1A02A5 msgbox Route110_TrickHouseEntrance_Text_19C0FC, 4 releaseall end @@ -420,9 +420,9 @@ Route110_TrickHouseEntrance_EventScript_16147E:: @ 816147E Route110_TrickHouseEntrance_EventScript_1614AA:: @ 81614AA giveitem ITEM_MAGNET compare RESULT, 1 - jumpeq Route110_TrickHouseEntrance_EventScript_161502 + goto_if_eq Route110_TrickHouseEntrance_EventScript_161502 compare RESULT, 0 - callif 1, Route110_TrickHouseEntrance_EventScript_1A02A5 + call_if 1, Route110_TrickHouseEntrance_EventScript_1A02A5 msgbox Route110_TrickHouseEntrance_Text_19C0FC, 4 releaseall end @@ -430,9 +430,9 @@ Route110_TrickHouseEntrance_EventScript_1614AA:: @ 81614AA Route110_TrickHouseEntrance_EventScript_1614D6:: @ 81614D6 giveitem ITEM_PP_MAX compare RESULT, 1 - jumpeq Route110_TrickHouseEntrance_EventScript_161502 + goto_if_eq Route110_TrickHouseEntrance_EventScript_161502 compare RESULT, 0 - callif 1, Route110_TrickHouseEntrance_EventScript_1A02A5 + call_if 1, Route110_TrickHouseEntrance_EventScript_1A02A5 msgbox Route110_TrickHouseEntrance_Text_19C0FC, 4 releaseall end @@ -440,14 +440,14 @@ Route110_TrickHouseEntrance_EventScript_1614D6:: @ 81614D6 Route110_TrickHouseEntrance_EventScript_161502:: @ 8161502 setvar 0x40c1, 0 setvar 0x40a7, 3 - move 1, Route110_TrickHouseEntrance_Movement_1A0841 - waitmove 0 + applymovement 1, Route110_TrickHouseEntrance_Movement_1A0841 + waitmovement 0 releaseall end Route110_TrickHouseEntrance_EventScript_161518:: @ 8161518 - move 1, Route110_TrickHouseEntrance_Movement_1A0839 - waitmove 0 + applymovement 1, Route110_TrickHouseEntrance_Movement_1A0839 + waitmovement 0 msgbox Route110_TrickHouseEntrance_Text_19C128, 4 .ifdef SAPPHIRE givedecoration 32 @@ -455,24 +455,24 @@ Route110_TrickHouseEntrance_EventScript_161518:: @ 8161518 givedecoration 31 .endif compare RESULT, 1 - jumpeq Route110_TrickHouseEntrance_EventScript_161551 + goto_if_eq Route110_TrickHouseEntrance_EventScript_161551 compare RESULT, 0 - callif 1, Route110_TrickHouseEntrance_EventScript_1A02B8 + call_if 1, Route110_TrickHouseEntrance_EventScript_1A02B8 msgbox Route110_TrickHouseEntrance_Text_19C18D, 4 releaseall end Route110_TrickHouseEntrance_EventScript_161551:: @ 8161551 msgbox Route110_TrickHouseEntrance_Text_19C17E, 4 - closebutton - move 1, Route110_TrickHouseEntrance_Movement_16309F - waitmove 0 - move 1, Route110_TrickHouseEntrance_Movement_161315 - waitmove 0 - playsfx 178 - move 1, Route110_TrickHouseEntrance_Movement_16131E - waitmove 0 - disappear 1 + closemessage + applymovement 1, Route110_TrickHouseEntrance_Movement_16309F + waitmovement 0 + applymovement 1, Route110_TrickHouseEntrance_Movement_161315 + waitmovement 0 + playse 178 + applymovement 1, Route110_TrickHouseEntrance_Movement_16131E + waitmovement 0 + removeobject 1 setvar 0x40c1, 0 setvar 0x40a7, 5 releaseall @@ -494,20 +494,20 @@ Route110_TrickHouseEntrance_EventScript_1615BD:: @ 81615BD Route110_TrickHouseEntrance_EventScript_1615C7:: @ 81615C7 msgbox Route110_TrickHouseEntrance_Text_19BE7D, 5 - closebutton + closemessage compare RESULT, 1 - jumpeq Route110_TrickHouseEntrance_EventScript_1615DD + goto_if_eq Route110_TrickHouseEntrance_EventScript_1615DD releaseall end Route110_TrickHouseEntrance_EventScript_1615DD:: @ 81615DD setmaptile 5, 1, 537, 0 special DrawWholeMapView - pause 20 - move 255, Route110_TrickHouseEntrance_Movement_1A0856 - waitmove 0 - move 255, Route110_TrickHouseEntrance_Movement_16165E - waitmove 0 + delay 20 + applymovement 255, Route110_TrickHouseEntrance_Movement_1A0856 + waitmovement 0 + applymovement 255, Route110_TrickHouseEntrance_Movement_16165E + waitmovement 0 switch 0x4044 case 0, Route110_TrickHouseEntrance_EventScript_161660 case 1, Route110_TrickHouseEntrance_EventScript_16166B @@ -578,7 +578,7 @@ Route110_TrickHouseEntrance_EventScript_1616B8:: @ 81616B8 Route110_TrickHouseEntrance_EventScript_1616C2:: @ 81616C2 compare 0x4044, 8 - jumpeq Route110_TrickHouseEntrance_EventScript_1616D7 + goto_if_eq Route110_TrickHouseEntrance_EventScript_1616D7 msgbox Route110_TrickHouseEntrance_Text_19BE6E, 4 releaseall end @@ -603,9 +603,9 @@ gUnknown_081616E1:: @ 81616E1 Route110_TrickHouseEntrance_EventScript_161740:: @ 8161740 compare 0x40AB, 0 - jumpeq Route110_TrickHouseEntrance_EventScript_161888 + goto_if_eq Route110_TrickHouseEntrance_EventScript_161888 msgbox UnknownString_819CAD1, 4 - playsfx SE_PIN + playse SE_PIN setvar 0x40AB, 2 setmaptile 13, 1, 523, 0 special DrawWholeMapView @@ -614,9 +614,9 @@ Route110_TrickHouseEntrance_EventScript_161740:: @ 8161740 Route110_TrickHouseEntrance_EventScript_161769:: @ 8161769 compare 0x40AC, 0 - jumpeq Route110_TrickHouseEntrance_EventScript_161888 + goto_if_eq Route110_TrickHouseEntrance_EventScript_161888 msgbox UnknownString_819CCCB, 4 - playsfx SE_PIN + playse SE_PIN setvar 0x40AC, 2 setmaptile 13, 1, 523, 0 special DrawWholeMapView @@ -625,9 +625,9 @@ Route110_TrickHouseEntrance_EventScript_161769:: @ 8161769 Route110_TrickHouseEntrance_EventScript_161792:: @ 8161792 compare 0x40AD, 0 - jumpeq Route110_TrickHouseEntrance_EventScript_161888 + goto_if_eq Route110_TrickHouseEntrance_EventScript_161888 msgbox UnknownString_819CEF9, 4 - playsfx SE_PIN + playse SE_PIN setvar 0x40AD, 2 setmaptile 13, 1, 523, 0 special DrawWholeMapView @@ -636,9 +636,9 @@ Route110_TrickHouseEntrance_EventScript_161792:: @ 8161792 Route110_TrickHouseEntrance_EventScript_1617BB:: @ 81617BB compare 0x40AE, 0 - jumpeq Route110_TrickHouseEntrance_EventScript_161888 + goto_if_eq Route110_TrickHouseEntrance_EventScript_161888 msgbox UnknownString_819D164, 4 - playsfx SE_PIN + playse SE_PIN setvar 0x40AE, 2 setmaptile 13, 1, 523, 0 special DrawWholeMapView @@ -647,9 +647,9 @@ Route110_TrickHouseEntrance_EventScript_1617BB:: @ 81617BB Route110_TrickHouseEntrance_EventScript_1617E4:: @ 81617E4 compare 0x40AF, 0 - jumpeq Route110_TrickHouseEntrance_EventScript_161888 + goto_if_eq Route110_TrickHouseEntrance_EventScript_161888 msgbox UnknownString_819D3A5, 4 - playsfx SE_PIN + playse SE_PIN setvar 0x40AF, 2 setmaptile 13, 1, 523, 0 special DrawWholeMapView @@ -658,9 +658,9 @@ Route110_TrickHouseEntrance_EventScript_1617E4:: @ 81617E4 Route110_TrickHouseEntrance_EventScript_16180D:: @ 816180D compare 0x40B0, 0 - jumpeq Route110_TrickHouseEntrance_EventScript_161888 + goto_if_eq Route110_TrickHouseEntrance_EventScript_161888 msgbox UnknownString_819DC0A, 4 - playsfx SE_PIN + playse SE_PIN setvar 0x40B0, 2 setmaptile 13, 1, 523, 0 special DrawWholeMapView @@ -669,9 +669,9 @@ Route110_TrickHouseEntrance_EventScript_16180D:: @ 816180D Route110_TrickHouseEntrance_EventScript_161836:: @ 8161836 compare 0x40B1, 0 - jumpeq Route110_TrickHouseEntrance_EventScript_161888 + goto_if_eq Route110_TrickHouseEntrance_EventScript_161888 msgbox UnknownString_819DE8D, 4 - playsfx SE_PIN + playse SE_PIN setvar 0x40B1, 2 setmaptile 13, 1, 523, 0 special DrawWholeMapView @@ -680,9 +680,9 @@ Route110_TrickHouseEntrance_EventScript_161836:: @ 8161836 Route110_TrickHouseEntrance_EventScript_16185F:: @ 816185F compare 0x40B2, 0 - jumpeq Route110_TrickHouseEntrance_EventScript_161888 + goto_if_eq Route110_TrickHouseEntrance_EventScript_161888 msgbox UnknownString_819E0FF, 4 - playsfx SE_PIN + playse SE_PIN setvar 0x40B2, 2 setmaptile 13, 1, 523, 0 special DrawWholeMapView @@ -714,10 +714,10 @@ Route110_TrickHousePuzzle5_EventScript_16189C:: @ 816189C Route110_TrickHousePuzzle6_EventScript_16189C:: @ 816189C Route110_TrickHousePuzzle7_EventScript_16189C:: @ 816189C Route110_TrickHousePuzzle8_EventScript_16189C:: @ 816189C - fanfare 370 + playfanfare 370 message Route110_TrickHousePuzzle1_Text_19C1B8 waitfanfare - waittext + waitmessage msgbox Route110_TrickHousePuzzle1_Text_19C1CB, 4 releaseall end @@ -727,11 +727,11 @@ Route110_TrickHouseEntrance_EventScript_1618B0:: @ 81618B0 msgbox Route110_TrickHouseEntrance_Text_19BA56, 4 releaseall compare 0x4044, 0 - callif 1, Route110_TrickHouseEntrance_EventScript_1618E1 + call_if 1, Route110_TrickHouseEntrance_EventScript_1618E1 compare 0x4044, 1 - callif 1, Route110_TrickHouseEntrance_EventScript_1618F6 + call_if 1, Route110_TrickHouseEntrance_EventScript_1618F6 compare 0x4044, 2 - callif 1, Route110_TrickHouseEntrance_EventScript_16190B + call_if 1, Route110_TrickHouseEntrance_EventScript_16190B setvar 0x40a5, 1 end @@ -757,10 +757,10 @@ Route110_TrickHouseEntrance_EventScript_16190B:: @ 816190B return Route110_TrickHouseEntrance_EventScript_161920:: @ 8161920 - setanimation 0, 32772 - setanimation 1, 32773 - setanimation 2, 32774 - doanimation 54 - checkanimation 54 - pause 10 + setfieldeffect 0, 32772 + setfieldeffect 1, 32773 + setfieldeffect 2, 32774 + dofieldeffect 54 + waitfieldeffect 54 + delay 10 return diff --git a/data/scripts/maps/Route110_TrickHousePuzzle1.inc b/data/scripts/maps/Route110_TrickHousePuzzle1.inc index 6b6d45af2..3a89c2db1 100644 --- a/data/scripts/maps/Route110_TrickHousePuzzle1.inc +++ b/data/scripts/maps/Route110_TrickHousePuzzle1.inc @@ -4,7 +4,7 @@ Route110_TrickHousePuzzle1_MapScripts:: @ 8161CF8 Route110_TrickHousePuzzle1_MapScript1_161CFE:: @ 8161CFE compare 0x40ab, 2 - jumpeq Route110_TrickHousePuzzle1_EventScript_161D0A + goto_if_eq Route110_TrickHousePuzzle1_EventScript_161D0A end Route110_TrickHousePuzzle1_EventScript_161D0A:: @ 8161D0A @@ -14,13 +14,13 @@ Route110_TrickHousePuzzle1_EventScript_161D0A:: @ 8161D0A Route110_TrickHousePuzzle1_EventScript_161D14:: @ 8161D14 lockall compare 0x40ab, 0 - jumpeq Route110_TrickHousePuzzle1_EventScript_161D26 - jump Route110_TrickHousePuzzle1_EventScript_161892 + goto_if_eq Route110_TrickHousePuzzle1_EventScript_161D26 + goto Route110_TrickHousePuzzle1_EventScript_161892 end Route110_TrickHousePuzzle1_EventScript_161D26:: @ 8161D26 setvar 0x40ab, 1 - jump Route110_TrickHousePuzzle1_EventScript_16189C + goto Route110_TrickHousePuzzle1_EventScript_16189C end Route110_TrickHousePuzzle1_EventScript_161D31:: @ 8161D31 diff --git a/data/scripts/maps/Route110_TrickHousePuzzle2.inc b/data/scripts/maps/Route110_TrickHousePuzzle2.inc index 27ffad50d..f71a9611a 100644 --- a/data/scripts/maps/Route110_TrickHousePuzzle2.inc +++ b/data/scripts/maps/Route110_TrickHousePuzzle2.inc @@ -5,13 +5,13 @@ Route110_TrickHousePuzzle2_MapScripts:: @ 8161D76 Route110_TrickHousePuzzle2_MapScript1_161D81:: @ 8161D81 compare 0x4001, 1 - callif 1, Route110_TrickHousePuzzle2_EventScript_161E2C + call_if 1, Route110_TrickHousePuzzle2_EventScript_161E2C compare 0x4002, 1 - callif 1, Route110_TrickHousePuzzle2_EventScript_161E3F + call_if 1, Route110_TrickHousePuzzle2_EventScript_161E3F compare 0x4003, 1 - callif 1, Route110_TrickHousePuzzle2_EventScript_161E52 + call_if 1, Route110_TrickHousePuzzle2_EventScript_161E52 compare 0x4004, 1 - callif 1, Route110_TrickHousePuzzle2_EventScript_161E65 + call_if 1, Route110_TrickHousePuzzle2_EventScript_161E65 end Route110_TrickHousePuzzle2_MapScript1_161DAE:: @ 8161DAE @@ -24,19 +24,19 @@ Route110_TrickHousePuzzle2_MapScript1_161DAE:: @ 8161DAE Route110_TrickHousePuzzle2_EventScript_161DC3:: @ 8161DC3 lockall compare 0x40ac, 0 - jumpeq Route110_TrickHousePuzzle2_EventScript_161DD5 - jump Route110_TrickHousePuzzle2_EventScript_161892 + goto_if_eq Route110_TrickHousePuzzle2_EventScript_161DD5 + goto Route110_TrickHousePuzzle2_EventScript_161892 end Route110_TrickHousePuzzle2_EventScript_161DD5:: @ 8161DD5 setvar 0x40ac, 1 - jump Route110_TrickHousePuzzle2_EventScript_16189C + goto Route110_TrickHousePuzzle2_EventScript_16189C end Route110_TrickHousePuzzle2_EventScript_161DE0:: @ 8161DE0 lockall setvar 0x4001, 1 - playsfx 21 + playse 21 call Route110_TrickHousePuzzle2_EventScript_161E2C special DrawWholeMapView releaseall @@ -45,7 +45,7 @@ Route110_TrickHousePuzzle2_EventScript_161DE0:: @ 8161DE0 Route110_TrickHousePuzzle2_EventScript_161DF3:: @ 8161DF3 lockall setvar 0x4002, 1 - playsfx 21 + playse 21 call Route110_TrickHousePuzzle2_EventScript_161E3F special DrawWholeMapView releaseall @@ -54,7 +54,7 @@ Route110_TrickHousePuzzle2_EventScript_161DF3:: @ 8161DF3 Route110_TrickHousePuzzle2_EventScript_161E06:: @ 8161E06 lockall setvar 0x4003, 1 - playsfx 21 + playse 21 call Route110_TrickHousePuzzle2_EventScript_161E52 special DrawWholeMapView releaseall @@ -63,7 +63,7 @@ Route110_TrickHousePuzzle2_EventScript_161E06:: @ 8161E06 Route110_TrickHousePuzzle2_EventScript_161E19:: @ 8161E19 lockall setvar 0x4004, 1 - playsfx 21 + playse 21 call Route110_TrickHousePuzzle2_EventScript_161E65 special DrawWholeMapView releaseall diff --git a/data/scripts/maps/Route110_TrickHousePuzzle3.inc b/data/scripts/maps/Route110_TrickHousePuzzle3.inc index efd96ec44..a50ecd3ce 100644 --- a/data/scripts/maps/Route110_TrickHousePuzzle3.inc +++ b/data/scripts/maps/Route110_TrickHousePuzzle3.inc @@ -6,9 +6,9 @@ Route110_TrickHousePuzzle3_MapScripts:: @ 8161EBD Route110_TrickHousePuzzle3_MapScript1_161EC8:: @ 8161EC8 call Route110_TrickHousePuzzle3_EventScript_161F12 compare 0x4009, 0 - callif 1, Route110_TrickHousePuzzle3_EventScript_161FE5 + call_if 1, Route110_TrickHousePuzzle3_EventScript_161FE5 compare 0x4009, 1 - callif 1, Route110_TrickHousePuzzle3_EventScript_1622C8 + call_if 1, Route110_TrickHousePuzzle3_EventScript_1622C8 end Route110_TrickHousePuzzle3_MapScript1_161EE4:: @ 8161EE4 @@ -32,19 +32,19 @@ Route110_TrickHousePuzzle3_EventScript_161F12:: @ 8161F12 setmaptile 1, 3, 600, 0 setmaptile 10, 2, 600, 0 compare 0x4008, 1 - callif 1, Route110_TrickHousePuzzle3_EventScript_161F9F + call_if 1, Route110_TrickHousePuzzle3_EventScript_161F9F compare 0x4008, 2 - callif 1, Route110_TrickHousePuzzle3_EventScript_161FA9 + call_if 1, Route110_TrickHousePuzzle3_EventScript_161FA9 compare 0x4008, 3 - callif 1, Route110_TrickHousePuzzle3_EventScript_161FB3 + call_if 1, Route110_TrickHousePuzzle3_EventScript_161FB3 compare 0x4008, 4 - callif 1, Route110_TrickHousePuzzle3_EventScript_161FBD + call_if 1, Route110_TrickHousePuzzle3_EventScript_161FBD compare 0x4008, 5 - callif 1, Route110_TrickHousePuzzle3_EventScript_161FC7 + call_if 1, Route110_TrickHousePuzzle3_EventScript_161FC7 compare 0x4008, 6 - callif 1, Route110_TrickHousePuzzle3_EventScript_161FD1 + call_if 1, Route110_TrickHousePuzzle3_EventScript_161FD1 compare 0x4008, 7 - callif 1, Route110_TrickHousePuzzle3_EventScript_161FDB + call_if 1, Route110_TrickHousePuzzle3_EventScript_161FDB return Route110_TrickHousePuzzle3_EventScript_161F9F:: @ 8161F9F @@ -248,50 +248,50 @@ Route110_TrickHousePuzzle3_EventScript_1622C8:: @ 81622C8 Route110_TrickHousePuzzle3_EventScript_1625AB:: @ 81625AB lockall setvar 0x4008, 1 - jump Route110_TrickHousePuzzle3_EventScript_1625FF + goto Route110_TrickHousePuzzle3_EventScript_1625FF end Route110_TrickHousePuzzle3_EventScript_1625B7:: @ 81625B7 lockall setvar 0x4008, 2 - jump Route110_TrickHousePuzzle3_EventScript_1625FF + goto Route110_TrickHousePuzzle3_EventScript_1625FF end Route110_TrickHousePuzzle3_EventScript_1625C3:: @ 81625C3 lockall setvar 0x4008, 3 - jump Route110_TrickHousePuzzle3_EventScript_1625FF + goto Route110_TrickHousePuzzle3_EventScript_1625FF end Route110_TrickHousePuzzle3_EventScript_1625CF:: @ 81625CF lockall setvar 0x4008, 4 - jump Route110_TrickHousePuzzle3_EventScript_1625FF + goto Route110_TrickHousePuzzle3_EventScript_1625FF end Route110_TrickHousePuzzle3_EventScript_1625DB:: @ 81625DB lockall setvar 0x4008, 5 - jump Route110_TrickHousePuzzle3_EventScript_1625FF + goto Route110_TrickHousePuzzle3_EventScript_1625FF end Route110_TrickHousePuzzle3_EventScript_1625E7:: @ 81625E7 lockall setvar 0x4008, 6 - jump Route110_TrickHousePuzzle3_EventScript_1625FF + goto Route110_TrickHousePuzzle3_EventScript_1625FF end Route110_TrickHousePuzzle3_EventScript_1625F3:: @ 81625F3 lockall setvar 0x4008, 7 - jump Route110_TrickHousePuzzle3_EventScript_1625FF + goto Route110_TrickHousePuzzle3_EventScript_1625FF end Route110_TrickHousePuzzle3_EventScript_1625FF:: @ 81625FF call Route110_TrickHousePuzzle3_EventScript_162612 - playsfx 21 + playse 21 call Route110_TrickHousePuzzle3_EventScript_161F12 - jump Route110_TrickHousePuzzle3_EventScript_1626AD + goto Route110_TrickHousePuzzle3_EventScript_1626AD end Route110_TrickHousePuzzle3_EventScript_162612:: @ 8162612 @@ -303,19 +303,19 @@ Route110_TrickHousePuzzle3_EventScript_162612:: @ 8162612 setvar 0x4006, 0 setvar 0x4007, 0 compare 0x4008, 1 - callif 1, Route110_TrickHousePuzzle3_EventScript_162683 + call_if 1, Route110_TrickHousePuzzle3_EventScript_162683 compare 0x4008, 2 - callif 1, Route110_TrickHousePuzzle3_EventScript_162689 + call_if 1, Route110_TrickHousePuzzle3_EventScript_162689 compare 0x4008, 3 - callif 1, Route110_TrickHousePuzzle3_EventScript_16268F + call_if 1, Route110_TrickHousePuzzle3_EventScript_16268F compare 0x4008, 4 - callif 1, Route110_TrickHousePuzzle3_EventScript_162695 + call_if 1, Route110_TrickHousePuzzle3_EventScript_162695 compare 0x4008, 5 - callif 1, Route110_TrickHousePuzzle3_EventScript_16269B + call_if 1, Route110_TrickHousePuzzle3_EventScript_16269B compare 0x4008, 6 - callif 1, Route110_TrickHousePuzzle3_EventScript_1626A1 + call_if 1, Route110_TrickHousePuzzle3_EventScript_1626A1 compare 0x4008, 7 - callif 1, Route110_TrickHousePuzzle3_EventScript_1626A7 + call_if 1, Route110_TrickHousePuzzle3_EventScript_1626A7 return Route110_TrickHousePuzzle3_EventScript_162683:: @ 8162683 @@ -348,14 +348,14 @@ Route110_TrickHousePuzzle3_EventScript_1626A7:: @ 81626A7 Route110_TrickHousePuzzle3_EventScript_1626AD:: @ 81626AD compare 0x4009, 1 - callif 1, Route110_TrickHousePuzzle3_EventScript_161FE5 + call_if 1, Route110_TrickHousePuzzle3_EventScript_161FE5 compare 0x4009, 0 - callif 1, Route110_TrickHousePuzzle3_EventScript_1622C8 + call_if 1, Route110_TrickHousePuzzle3_EventScript_1622C8 special DrawWholeMapView compare 0x4009, 1 - jumpeq Route110_TrickHousePuzzle3_EventScript_1626DD + goto_if_eq Route110_TrickHousePuzzle3_EventScript_1626DD compare 0x4009, 0 - jumpeq Route110_TrickHousePuzzle3_EventScript_1626E4 + goto_if_eq Route110_TrickHousePuzzle3_EventScript_1626E4 end Route110_TrickHousePuzzle3_EventScript_1626DD:: @ 81626DD @@ -371,13 +371,13 @@ Route110_TrickHousePuzzle3_EventScript_1626E4:: @ 81626E4 Route110_TrickHousePuzzle3_EventScript_1626EB:: @ 81626EB lockall compare 0x40ad, 0 - jumpeq Route110_TrickHousePuzzle3_EventScript_1626FD - jump Route110_TrickHousePuzzle3_EventScript_161892 + goto_if_eq Route110_TrickHousePuzzle3_EventScript_1626FD + goto Route110_TrickHousePuzzle3_EventScript_161892 end Route110_TrickHousePuzzle3_EventScript_1626FD:: @ 81626FD setvar 0x40ad, 1 - jump Route110_TrickHousePuzzle3_EventScript_16189C + goto Route110_TrickHousePuzzle3_EventScript_16189C end Route110_TrickHousePuzzle3_EventScript_162708:: @ 8162708 diff --git a/data/scripts/maps/Route110_TrickHousePuzzle4.inc b/data/scripts/maps/Route110_TrickHousePuzzle4.inc index 89d5e45c3..0c9fc426f 100644 --- a/data/scripts/maps/Route110_TrickHousePuzzle4.inc +++ b/data/scripts/maps/Route110_TrickHousePuzzle4.inc @@ -4,13 +4,13 @@ Route110_TrickHousePuzzle4_MapScripts:: @ 816274D Route110_TrickHousePuzzle4_EventScript_16274E:: @ 816274E lockall compare 0x40ae, 0 - jumpeq Route110_TrickHousePuzzle4_EventScript_162760 - jump Route110_TrickHousePuzzle4_EventScript_161892 + goto_if_eq Route110_TrickHousePuzzle4_EventScript_162760 + goto Route110_TrickHousePuzzle4_EventScript_161892 end Route110_TrickHousePuzzle4_EventScript_162760:: @ 8162760 setvar 0x40ae, 1 - jump Route110_TrickHousePuzzle4_EventScript_16189C + goto Route110_TrickHousePuzzle4_EventScript_16189C end Route110_TrickHousePuzzle4_EventScript_16276B:: @ 816276B diff --git a/data/scripts/maps/Route110_TrickHousePuzzle5.inc b/data/scripts/maps/Route110_TrickHousePuzzle5.inc index cd5d2fbb9..222a71138 100644 --- a/data/scripts/maps/Route110_TrickHousePuzzle5.inc +++ b/data/scripts/maps/Route110_TrickHousePuzzle5.inc @@ -14,163 +14,163 @@ Route110_TrickHousePuzzle5_MapScript1_1627B6:: @ 81627B6 Route110_TrickHousePuzzle5_EventScript_1627D5:: @ 81627D5 lockall compare 0x40af, 0 - jumpeq Route110_TrickHousePuzzle5_EventScript_1627E7 - jump Route110_TrickHousePuzzle5_EventScript_161892 + goto_if_eq Route110_TrickHousePuzzle5_EventScript_1627E7 + goto Route110_TrickHousePuzzle5_EventScript_161892 end Route110_TrickHousePuzzle5_EventScript_1627E7:: @ 81627E7 setvar 0x40af, 1 - jump Route110_TrickHousePuzzle5_EventScript_16189C + goto Route110_TrickHousePuzzle5_EventScript_16189C end Route110_TrickHousePuzzle5_EventScript_1627F2:: @ 81627F2 lockall - move 1, Route110_TrickHousePuzzle5_Movement_1A0839 - waitmove 0 + applymovement 1, Route110_TrickHousePuzzle5_Movement_1A0839 + waitmovement 0 compare 0x4001, 1 - jumpeq Route110_TrickHousePuzzle5_EventScript_162DE9 + goto_if_eq Route110_TrickHousePuzzle5_EventScript_162DE9 setvar 0x4009, 0 - jump Route110_TrickHousePuzzle5_EventScript_16293F + goto Route110_TrickHousePuzzle5_EventScript_16293F end Route110_TrickHousePuzzle5_EventScript_162813:: @ 8162813 lockall - move 2, Route110_TrickHousePuzzle5_Movement_1A0839 - waitmove 0 + applymovement 2, Route110_TrickHousePuzzle5_Movement_1A0839 + waitmovement 0 compare 0x4002, 1 - jumpeq Route110_TrickHousePuzzle5_EventScript_162DE9 + goto_if_eq Route110_TrickHousePuzzle5_EventScript_162DE9 setvar 0x4009, 0 - jump Route110_TrickHousePuzzle5_EventScript_1629B3 + goto Route110_TrickHousePuzzle5_EventScript_1629B3 end Route110_TrickHousePuzzle5_EventScript_162834:: @ 8162834 lockall - move 3, Route110_TrickHousePuzzle5_Movement_1A0839 - waitmove 0 + applymovement 3, Route110_TrickHousePuzzle5_Movement_1A0839 + waitmovement 0 compare 0x4003, 1 - jumpeq Route110_TrickHousePuzzle5_EventScript_162DE9 + goto_if_eq Route110_TrickHousePuzzle5_EventScript_162DE9 setvar 0x4009, 0 - jump Route110_TrickHousePuzzle5_EventScript_162A27 + goto Route110_TrickHousePuzzle5_EventScript_162A27 end Route110_TrickHousePuzzle5_EventScript_162855:: @ 8162855 lockall - move 4, Route110_TrickHousePuzzle5_Movement_1A0839 - waitmove 0 + applymovement 4, Route110_TrickHousePuzzle5_Movement_1A0839 + waitmovement 0 compare 0x4004, 1 - jumpeq Route110_TrickHousePuzzle5_EventScript_162DE9 + goto_if_eq Route110_TrickHousePuzzle5_EventScript_162DE9 setvar 0x4009, 0 - jump Route110_TrickHousePuzzle5_EventScript_162A9B + goto Route110_TrickHousePuzzle5_EventScript_162A9B end Route110_TrickHousePuzzle5_EventScript_162876:: @ 8162876 lockall - move 5, Route110_TrickHousePuzzle5_Movement_1A0839 - waitmove 0 + applymovement 5, Route110_TrickHousePuzzle5_Movement_1A0839 + waitmovement 0 compare 0x4005, 1 - jumpeq Route110_TrickHousePuzzle5_EventScript_162DE9 + goto_if_eq Route110_TrickHousePuzzle5_EventScript_162DE9 setvar 0x4009, 0 - jump Route110_TrickHousePuzzle5_EventScript_162B0F + goto Route110_TrickHousePuzzle5_EventScript_162B0F end Route110_TrickHousePuzzle5_EventScript_162897:: @ 8162897 lockall setvar 0x4009, 0 - jump Route110_TrickHousePuzzle5_EventScript_16293F + goto Route110_TrickHousePuzzle5_EventScript_16293F end Route110_TrickHousePuzzle5_EventScript_1628A3:: @ 81628A3 lockall setvar 0x4009, 1 - jump Route110_TrickHousePuzzle5_EventScript_16293F + goto Route110_TrickHousePuzzle5_EventScript_16293F end Route110_TrickHousePuzzle5_EventScript_1628AF:: @ 81628AF lockall setvar 0x4009, 2 - jump Route110_TrickHousePuzzle5_EventScript_16293F + goto Route110_TrickHousePuzzle5_EventScript_16293F end Route110_TrickHousePuzzle5_EventScript_1628BB:: @ 81628BB lockall setvar 0x4009, 3 - jump Route110_TrickHousePuzzle5_EventScript_16293F + goto Route110_TrickHousePuzzle5_EventScript_16293F end Route110_TrickHousePuzzle5_EventScript_1628C7:: @ 81628C7 lockall setvar 0x4009, 0 - jump Route110_TrickHousePuzzle5_EventScript_1629B3 + goto Route110_TrickHousePuzzle5_EventScript_1629B3 end Route110_TrickHousePuzzle5_EventScript_1628D3:: @ 81628D3 lockall setvar 0x4009, 1 - jump Route110_TrickHousePuzzle5_EventScript_1629B3 + goto Route110_TrickHousePuzzle5_EventScript_1629B3 end Route110_TrickHousePuzzle5_EventScript_1628DF:: @ 81628DF lockall setvar 0x4009, 0 - jump Route110_TrickHousePuzzle5_EventScript_162A27 + goto Route110_TrickHousePuzzle5_EventScript_162A27 end Route110_TrickHousePuzzle5_EventScript_1628EB:: @ 81628EB lockall setvar 0x4009, 1 - jump Route110_TrickHousePuzzle5_EventScript_162A27 + goto Route110_TrickHousePuzzle5_EventScript_162A27 end Route110_TrickHousePuzzle5_EventScript_1628F7:: @ 81628F7 lockall setvar 0x4009, 2 - jump Route110_TrickHousePuzzle5_EventScript_162A27 + goto Route110_TrickHousePuzzle5_EventScript_162A27 end Route110_TrickHousePuzzle5_EventScript_162903:: @ 8162903 lockall setvar 0x4009, 0 - jump Route110_TrickHousePuzzle5_EventScript_162A9B + goto Route110_TrickHousePuzzle5_EventScript_162A9B end Route110_TrickHousePuzzle5_EventScript_16290F:: @ 816290F lockall setvar 0x4009, 1 - jump Route110_TrickHousePuzzle5_EventScript_162A9B + goto Route110_TrickHousePuzzle5_EventScript_162A9B end Route110_TrickHousePuzzle5_EventScript_16291B:: @ 816291B lockall setvar 0x4009, 0 - jump Route110_TrickHousePuzzle5_EventScript_162B0F + goto Route110_TrickHousePuzzle5_EventScript_162B0F end Route110_TrickHousePuzzle5_EventScript_162927:: @ 8162927 lockall setvar 0x4009, 1 - jump Route110_TrickHousePuzzle5_EventScript_162B0F + goto Route110_TrickHousePuzzle5_EventScript_162B0F end Route110_TrickHousePuzzle5_EventScript_162933:: @ 8162933 lockall setvar 0x4009, 2 - jump Route110_TrickHousePuzzle5_EventScript_162B0F + goto Route110_TrickHousePuzzle5_EventScript_162B0F end Route110_TrickHousePuzzle5_EventScript_16293F:: @ 816293F setvar 0x4001, 1 setvar 0x4008, 1 - playsfx 21 - move 1, Route110_TrickHousePuzzle5_Movement_1A0833 - waitmove 0 - move 1, Route110_TrickHousePuzzle5_Movement_1A0835 - waitmove 0 + playse 21 + applymovement 1, Route110_TrickHousePuzzle5_Movement_1A0833 + waitmovement 0 + applymovement 1, Route110_TrickHousePuzzle5_Movement_1A0835 + waitmovement 0 compare 0x4009, 1 - callif 1, Route110_TrickHousePuzzle5_EventScript_162DF3 + call_if 1, Route110_TrickHousePuzzle5_EventScript_162DF3 compare 0x4009, 2 - callif 1, Route110_TrickHousePuzzle5_EventScript_162E2B + call_if 1, Route110_TrickHousePuzzle5_EventScript_162E2B compare 0x4009, 3 - callif 1, Route110_TrickHousePuzzle5_EventScript_162E63 + call_if 1, Route110_TrickHousePuzzle5_EventScript_162E63 msgbox Route110_TrickHousePuzzle5_Text_19D423, 4 random 3 switch RESULT @@ -182,17 +182,17 @@ Route110_TrickHousePuzzle5_EventScript_16293F:: @ 816293F Route110_TrickHousePuzzle5_EventScript_1629B3:: @ 81629B3 setvar 0x4002, 1 setvar 0x4008, 2 - playsfx 21 - move 2, Route110_TrickHousePuzzle5_Movement_1A0833 - waitmove 0 - move 2, Route110_TrickHousePuzzle5_Movement_1A0835 - waitmove 0 + playse 21 + applymovement 2, Route110_TrickHousePuzzle5_Movement_1A0833 + waitmovement 0 + applymovement 2, Route110_TrickHousePuzzle5_Movement_1A0835 + waitmovement 0 compare 0x4009, 1 - callif 1, Route110_TrickHousePuzzle5_EventScript_162E9B + call_if 1, Route110_TrickHousePuzzle5_EventScript_162E9B compare 0x4009, 2 - callif 1, Route110_TrickHousePuzzle5_EventScript_162ED3 + call_if 1, Route110_TrickHousePuzzle5_EventScript_162ED3 compare 0x4009, 3 - callif 1, Route110_TrickHousePuzzle5_EventScript_162F0B + call_if 1, Route110_TrickHousePuzzle5_EventScript_162F0B msgbox Route110_TrickHousePuzzle5_Text_19D636, 4 random 3 switch RESULT @@ -204,17 +204,17 @@ Route110_TrickHousePuzzle5_EventScript_1629B3:: @ 81629B3 Route110_TrickHousePuzzle5_EventScript_162A27:: @ 8162A27 setvar 0x4003, 1 setvar 0x4008, 3 - playsfx 21 - move 3, Route110_TrickHousePuzzle5_Movement_1A0833 - waitmove 0 - move 3, Route110_TrickHousePuzzle5_Movement_1A0835 - waitmove 0 + playse 21 + applymovement 3, Route110_TrickHousePuzzle5_Movement_1A0833 + waitmovement 0 + applymovement 3, Route110_TrickHousePuzzle5_Movement_1A0835 + waitmovement 0 compare 0x4009, 1 - callif 1, Route110_TrickHousePuzzle5_EventScript_162DF3 + call_if 1, Route110_TrickHousePuzzle5_EventScript_162DF3 compare 0x4009, 2 - callif 1, Route110_TrickHousePuzzle5_EventScript_162E2B + call_if 1, Route110_TrickHousePuzzle5_EventScript_162E2B compare 0x4009, 3 - callif 1, Route110_TrickHousePuzzle5_EventScript_162E63 + call_if 1, Route110_TrickHousePuzzle5_EventScript_162E63 msgbox Route110_TrickHousePuzzle5_Text_19D7D3, 4 random 3 switch RESULT @@ -226,17 +226,17 @@ Route110_TrickHousePuzzle5_EventScript_162A27:: @ 8162A27 Route110_TrickHousePuzzle5_EventScript_162A9B:: @ 8162A9B setvar 0x4004, 1 setvar 0x4008, 4 - playsfx 21 - move 4, Route110_TrickHousePuzzle5_Movement_1A0833 - waitmove 0 - move 4, Route110_TrickHousePuzzle5_Movement_1A0835 - waitmove 0 + playse 21 + applymovement 4, Route110_TrickHousePuzzle5_Movement_1A0833 + waitmovement 0 + applymovement 4, Route110_TrickHousePuzzle5_Movement_1A0835 + waitmovement 0 compare 0x4009, 1 - callif 1, Route110_TrickHousePuzzle5_EventScript_162DF3 + call_if 1, Route110_TrickHousePuzzle5_EventScript_162DF3 compare 0x4009, 2 - callif 1, Route110_TrickHousePuzzle5_EventScript_162E2B + call_if 1, Route110_TrickHousePuzzle5_EventScript_162E2B compare 0x4009, 3 - callif 1, Route110_TrickHousePuzzle5_EventScript_162E63 + call_if 1, Route110_TrickHousePuzzle5_EventScript_162E63 msgbox Route110_TrickHousePuzzle5_Text_19D93D, 4 random 3 switch RESULT @@ -248,17 +248,17 @@ Route110_TrickHousePuzzle5_EventScript_162A9B:: @ 8162A9B Route110_TrickHousePuzzle5_EventScript_162B0F:: @ 8162B0F setvar 0x4005, 1 setvar 0x4008, 5 - playsfx 21 - move 5, Route110_TrickHousePuzzle5_Movement_1A0833 - waitmove 0 - move 5, Route110_TrickHousePuzzle5_Movement_1A0835 - waitmove 0 + playse 21 + applymovement 5, Route110_TrickHousePuzzle5_Movement_1A0833 + waitmovement 0 + applymovement 5, Route110_TrickHousePuzzle5_Movement_1A0835 + waitmovement 0 compare 0x4009, 1 - callif 1, Route110_TrickHousePuzzle5_EventScript_162E9B + call_if 1, Route110_TrickHousePuzzle5_EventScript_162E9B compare 0x4009, 2 - callif 1, Route110_TrickHousePuzzle5_EventScript_162ED3 + call_if 1, Route110_TrickHousePuzzle5_EventScript_162ED3 compare 0x4009, 3 - callif 1, Route110_TrickHousePuzzle5_EventScript_162F0B + call_if 1, Route110_TrickHousePuzzle5_EventScript_162F0B msgbox Route110_TrickHousePuzzle5_Text_19DA9A, 4 random 3 switch RESULT @@ -272,7 +272,7 @@ Route110_TrickHousePuzzle5_EventScript_162B83:: @ 8162B83 multichoice 0, 0, 25, 1 switch RESULT case 1, Route110_TrickHousePuzzle5_EventScript_162DDF - jump Route110_TrickHousePuzzle5_EventScript_162D90 + goto Route110_TrickHousePuzzle5_EventScript_162D90 end Route110_TrickHousePuzzle5_EventScript_162BA6:: @ 8162BA6 @@ -280,7 +280,7 @@ Route110_TrickHousePuzzle5_EventScript_162BA6:: @ 8162BA6 multichoice 0, 0, 26, 1 switch RESULT case 0, Route110_TrickHousePuzzle5_EventScript_162DDF - jump Route110_TrickHousePuzzle5_EventScript_162D90 + goto Route110_TrickHousePuzzle5_EventScript_162D90 end Route110_TrickHousePuzzle5_EventScript_162BC9:: @ 8162BC9 @@ -288,7 +288,7 @@ Route110_TrickHousePuzzle5_EventScript_162BC9:: @ 8162BC9 multichoice 0, 0, 27, 1 switch RESULT case 1, Route110_TrickHousePuzzle5_EventScript_162DDF - jump Route110_TrickHousePuzzle5_EventScript_162D90 + goto Route110_TrickHousePuzzle5_EventScript_162D90 end Route110_TrickHousePuzzle5_EventScript_162BEC:: @ 8162BEC @@ -296,7 +296,7 @@ Route110_TrickHousePuzzle5_EventScript_162BEC:: @ 8162BEC multichoice 0, 0, 28, 1 switch RESULT case 2, Route110_TrickHousePuzzle5_EventScript_162DDF - jump Route110_TrickHousePuzzle5_EventScript_162D90 + goto Route110_TrickHousePuzzle5_EventScript_162D90 end Route110_TrickHousePuzzle5_EventScript_162C0F:: @ 8162C0F @@ -304,7 +304,7 @@ Route110_TrickHousePuzzle5_EventScript_162C0F:: @ 8162C0F multichoice 0, 0, 29, 1 switch RESULT case 0, Route110_TrickHousePuzzle5_EventScript_162DDF - jump Route110_TrickHousePuzzle5_EventScript_162D90 + goto Route110_TrickHousePuzzle5_EventScript_162D90 end Route110_TrickHousePuzzle5_EventScript_162C32:: @ 8162C32 @@ -312,7 +312,7 @@ Route110_TrickHousePuzzle5_EventScript_162C32:: @ 8162C32 multichoice 0, 0, 30, 1 switch RESULT case 0, Route110_TrickHousePuzzle5_EventScript_162DDF - jump Route110_TrickHousePuzzle5_EventScript_162D90 + goto Route110_TrickHousePuzzle5_EventScript_162D90 end Route110_TrickHousePuzzle5_EventScript_162C55:: @ 8162C55 @@ -320,7 +320,7 @@ Route110_TrickHousePuzzle5_EventScript_162C55:: @ 8162C55 multichoice 0, 0, 31, 1 switch RESULT case 1, Route110_TrickHousePuzzle5_EventScript_162DDF - jump Route110_TrickHousePuzzle5_EventScript_162D90 + goto Route110_TrickHousePuzzle5_EventScript_162D90 end Route110_TrickHousePuzzle5_EventScript_162C78:: @ 8162C78 @@ -328,7 +328,7 @@ Route110_TrickHousePuzzle5_EventScript_162C78:: @ 8162C78 multichoice 0, 0, 32, 1 switch RESULT case 2, Route110_TrickHousePuzzle5_EventScript_162DDF - jump Route110_TrickHousePuzzle5_EventScript_162D90 + goto Route110_TrickHousePuzzle5_EventScript_162D90 end Route110_TrickHousePuzzle5_EventScript_162C9B:: @ 8162C9B @@ -336,7 +336,7 @@ Route110_TrickHousePuzzle5_EventScript_162C9B:: @ 8162C9B multichoice 0, 0, 33, 1 switch RESULT case 1, Route110_TrickHousePuzzle5_EventScript_162DDF - jump Route110_TrickHousePuzzle5_EventScript_162D90 + goto Route110_TrickHousePuzzle5_EventScript_162D90 end Route110_TrickHousePuzzle5_EventScript_162CBE:: @ 8162CBE @@ -344,7 +344,7 @@ Route110_TrickHousePuzzle5_EventScript_162CBE:: @ 8162CBE multichoice 0, 0, 34, 1 switch RESULT case 1, Route110_TrickHousePuzzle5_EventScript_162DDF - jump Route110_TrickHousePuzzle5_EventScript_162D90 + goto Route110_TrickHousePuzzle5_EventScript_162D90 end Route110_TrickHousePuzzle5_EventScript_162CE1:: @ 8162CE1 @@ -352,7 +352,7 @@ Route110_TrickHousePuzzle5_EventScript_162CE1:: @ 8162CE1 multichoice 0, 0, 35, 1 switch RESULT case 0, Route110_TrickHousePuzzle5_EventScript_162DDF - jump Route110_TrickHousePuzzle5_EventScript_162D90 + goto Route110_TrickHousePuzzle5_EventScript_162D90 end Route110_TrickHousePuzzle5_EventScript_162D04:: @ 8162D04 @@ -360,7 +360,7 @@ Route110_TrickHousePuzzle5_EventScript_162D04:: @ 8162D04 multichoice 0, 0, 36, 1 switch RESULT case 1, Route110_TrickHousePuzzle5_EventScript_162DDF - jump Route110_TrickHousePuzzle5_EventScript_162D90 + goto Route110_TrickHousePuzzle5_EventScript_162D90 end Route110_TrickHousePuzzle5_EventScript_162D27:: @ 8162D27 @@ -368,7 +368,7 @@ Route110_TrickHousePuzzle5_EventScript_162D27:: @ 8162D27 multichoice 0, 0, 37, 1 switch RESULT case 1, Route110_TrickHousePuzzle5_EventScript_162DDF - jump Route110_TrickHousePuzzle5_EventScript_162D90 + goto Route110_TrickHousePuzzle5_EventScript_162D90 end Route110_TrickHousePuzzle5_EventScript_162D4A:: @ 8162D4A @@ -376,7 +376,7 @@ Route110_TrickHousePuzzle5_EventScript_162D4A:: @ 8162D4A multichoice 0, 0, 38, 1 switch RESULT case 0, Route110_TrickHousePuzzle5_EventScript_162DDF - jump Route110_TrickHousePuzzle5_EventScript_162D90 + goto Route110_TrickHousePuzzle5_EventScript_162D90 end Route110_TrickHousePuzzle5_EventScript_162D6D:: @ 8162D6D @@ -384,32 +384,32 @@ Route110_TrickHousePuzzle5_EventScript_162D6D:: @ 8162D6D multichoice 0, 0, 39, 1 switch RESULT case 2, Route110_TrickHousePuzzle5_EventScript_162DDF - jump Route110_TrickHousePuzzle5_EventScript_162D90 + goto Route110_TrickHousePuzzle5_EventScript_162D90 end Route110_TrickHousePuzzle5_EventScript_162D90:: @ 8162D90 - checksound - playsfx 32 + waitse + playse 32 msgbox Route110_TrickHousePuzzle5_Text_19D5CF, 4 - move 1, Route110_TrickHousePuzzle5_Movement_16309F - move 2, Route110_TrickHousePuzzle5_Movement_16309F - move 3, Route110_TrickHousePuzzle5_Movement_16309F - move 4, Route110_TrickHousePuzzle5_Movement_16309F - move 5, Route110_TrickHousePuzzle5_Movement_16309F + applymovement 1, Route110_TrickHousePuzzle5_Movement_16309F + applymovement 2, Route110_TrickHousePuzzle5_Movement_16309F + applymovement 3, Route110_TrickHousePuzzle5_Movement_16309F + applymovement 4, Route110_TrickHousePuzzle5_Movement_16309F + applymovement 5, Route110_TrickHousePuzzle5_Movement_16309F msgbox Route110_TrickHousePuzzle5_Text_19D5ED, 4 - waitmove 0 - closebutton + waitmovement 0 + closemessage msgbox Route110_TrickHousePuzzle5_Text_19D615, 4 - closebutton + closemessage warp Route110_TrickHousePuzzle5, 255, 0, 21 waitstate releaseall end Route110_TrickHousePuzzle5_EventScript_162DDF:: @ 8162DDF - checksound - playsfx 31 - jump Route110_TrickHousePuzzle5_EventScript_162DE9 + waitse + playse 31 + goto Route110_TrickHousePuzzle5_EventScript_162DE9 end Route110_TrickHousePuzzle5_EventScript_162DE9:: @ 8162DE9 @@ -419,230 +419,230 @@ Route110_TrickHousePuzzle5_EventScript_162DE9:: @ 8162DE9 Route110_TrickHousePuzzle5_EventScript_162DF3:: @ 8162DF3 compare 0x4008, 1 - callif 1, Route110_TrickHousePuzzle5_EventScript_162F43 + call_if 1, Route110_TrickHousePuzzle5_EventScript_162F43 compare 0x4008, 2 - callif 1, Route110_TrickHousePuzzle5_EventScript_162F4E + call_if 1, Route110_TrickHousePuzzle5_EventScript_162F4E compare 0x4008, 3 - callif 1, Route110_TrickHousePuzzle5_EventScript_162F59 + call_if 1, Route110_TrickHousePuzzle5_EventScript_162F59 compare 0x4008, 4 - callif 1, Route110_TrickHousePuzzle5_EventScript_162F64 + call_if 1, Route110_TrickHousePuzzle5_EventScript_162F64 compare 0x4008, 5 - callif 1, Route110_TrickHousePuzzle5_EventScript_162F6F + call_if 1, Route110_TrickHousePuzzle5_EventScript_162F6F return Route110_TrickHousePuzzle5_EventScript_162E2B:: @ 8162E2B compare 0x4008, 1 - callif 1, Route110_TrickHousePuzzle5_EventScript_162F7A + call_if 1, Route110_TrickHousePuzzle5_EventScript_162F7A compare 0x4008, 2 - callif 1, Route110_TrickHousePuzzle5_EventScript_162F85 + call_if 1, Route110_TrickHousePuzzle5_EventScript_162F85 compare 0x4008, 3 - callif 1, Route110_TrickHousePuzzle5_EventScript_162F90 + call_if 1, Route110_TrickHousePuzzle5_EventScript_162F90 compare 0x4008, 4 - callif 1, Route110_TrickHousePuzzle5_EventScript_162F9B + call_if 1, Route110_TrickHousePuzzle5_EventScript_162F9B compare 0x4008, 5 - callif 1, Route110_TrickHousePuzzle5_EventScript_162FA6 + call_if 1, Route110_TrickHousePuzzle5_EventScript_162FA6 return Route110_TrickHousePuzzle5_EventScript_162E63:: @ 8162E63 compare 0x4008, 1 - callif 1, Route110_TrickHousePuzzle5_EventScript_162FB1 + call_if 1, Route110_TrickHousePuzzle5_EventScript_162FB1 compare 0x4008, 2 - callif 1, Route110_TrickHousePuzzle5_EventScript_162FBC + call_if 1, Route110_TrickHousePuzzle5_EventScript_162FBC compare 0x4008, 3 - callif 1, Route110_TrickHousePuzzle5_EventScript_162FC7 + call_if 1, Route110_TrickHousePuzzle5_EventScript_162FC7 compare 0x4009, 4 - callif 1, Route110_TrickHousePuzzle5_EventScript_162FD2 + call_if 1, Route110_TrickHousePuzzle5_EventScript_162FD2 compare 0x4009, 5 - callif 1, Route110_TrickHousePuzzle5_EventScript_162FDD + call_if 1, Route110_TrickHousePuzzle5_EventScript_162FDD return Route110_TrickHousePuzzle5_EventScript_162E9B:: @ 8162E9B compare 0x4008, 1 - callif 1, Route110_TrickHousePuzzle5_EventScript_162FE8 + call_if 1, Route110_TrickHousePuzzle5_EventScript_162FE8 compare 0x4008, 2 - callif 1, Route110_TrickHousePuzzle5_EventScript_162FF3 + call_if 1, Route110_TrickHousePuzzle5_EventScript_162FF3 compare 0x4008, 3 - callif 1, Route110_TrickHousePuzzle5_EventScript_162FFE + call_if 1, Route110_TrickHousePuzzle5_EventScript_162FFE compare 0x4008, 4 - callif 1, Route110_TrickHousePuzzle5_EventScript_163009 + call_if 1, Route110_TrickHousePuzzle5_EventScript_163009 compare 0x4008, 5 - callif 1, Route110_TrickHousePuzzle5_EventScript_163014 + call_if 1, Route110_TrickHousePuzzle5_EventScript_163014 return Route110_TrickHousePuzzle5_EventScript_162ED3:: @ 8162ED3 compare 0x4008, 1 - callif 1, Route110_TrickHousePuzzle5_EventScript_16301F + call_if 1, Route110_TrickHousePuzzle5_EventScript_16301F compare 0x4008, 2 - callif 1, Route110_TrickHousePuzzle5_EventScript_16302A + call_if 1, Route110_TrickHousePuzzle5_EventScript_16302A compare 0x4008, 3 - callif 1, Route110_TrickHousePuzzle5_EventScript_163035 + call_if 1, Route110_TrickHousePuzzle5_EventScript_163035 compare 0x4008, 4 - callif 1, Route110_TrickHousePuzzle5_EventScript_163040 + call_if 1, Route110_TrickHousePuzzle5_EventScript_163040 compare 0x4008, 5 - callif 1, Route110_TrickHousePuzzle5_EventScript_16304B + call_if 1, Route110_TrickHousePuzzle5_EventScript_16304B return Route110_TrickHousePuzzle5_EventScript_162F0B:: @ 8162F0B compare 0x4008, 1 - callif 1, Route110_TrickHousePuzzle5_EventScript_163056 + call_if 1, Route110_TrickHousePuzzle5_EventScript_163056 compare 0x4008, 2 - callif 1, Route110_TrickHousePuzzle5_EventScript_163061 + call_if 1, Route110_TrickHousePuzzle5_EventScript_163061 compare 0x4008, 3 - callif 1, Route110_TrickHousePuzzle5_EventScript_16306C + call_if 1, Route110_TrickHousePuzzle5_EventScript_16306C compare 0x4008, 4 - callif 1, Route110_TrickHousePuzzle5_EventScript_163077 + call_if 1, Route110_TrickHousePuzzle5_EventScript_163077 compare 0x4008, 5 - callif 1, Route110_TrickHousePuzzle5_EventScript_163082 + call_if 1, Route110_TrickHousePuzzle5_EventScript_163082 return Route110_TrickHousePuzzle5_EventScript_162F43:: @ 8162F43 - move 1, Route110_TrickHousePuzzle5_Movement_16308D - waitmove 0 + applymovement 1, Route110_TrickHousePuzzle5_Movement_16308D + waitmovement 0 return Route110_TrickHousePuzzle5_EventScript_162F4E:: @ 8162F4E - move 2, Route110_TrickHousePuzzle5_Movement_16308D - waitmove 0 + applymovement 2, Route110_TrickHousePuzzle5_Movement_16308D + waitmovement 0 return Route110_TrickHousePuzzle5_EventScript_162F59:: @ 8162F59 - move 3, Route110_TrickHousePuzzle5_Movement_16308D - waitmove 0 + applymovement 3, Route110_TrickHousePuzzle5_Movement_16308D + waitmovement 0 return Route110_TrickHousePuzzle5_EventScript_162F64:: @ 8162F64 - move 4, Route110_TrickHousePuzzle5_Movement_16308D - waitmove 0 + applymovement 4, Route110_TrickHousePuzzle5_Movement_16308D + waitmovement 0 return Route110_TrickHousePuzzle5_EventScript_162F6F:: @ 8162F6F - move 5, Route110_TrickHousePuzzle5_Movement_16308D - waitmove 0 + applymovement 5, Route110_TrickHousePuzzle5_Movement_16308D + waitmovement 0 return Route110_TrickHousePuzzle5_EventScript_162F7A:: @ 8162F7A - move 1, Route110_TrickHousePuzzle5_Movement_16308F - waitmove 0 + applymovement 1, Route110_TrickHousePuzzle5_Movement_16308F + waitmovement 0 return Route110_TrickHousePuzzle5_EventScript_162F85:: @ 8162F85 - move 2, Route110_TrickHousePuzzle5_Movement_16308F - waitmove 0 + applymovement 2, Route110_TrickHousePuzzle5_Movement_16308F + waitmovement 0 return Route110_TrickHousePuzzle5_EventScript_162F90:: @ 8162F90 - move 3, Route110_TrickHousePuzzle5_Movement_16308F - waitmove 0 + applymovement 3, Route110_TrickHousePuzzle5_Movement_16308F + waitmovement 0 return Route110_TrickHousePuzzle5_EventScript_162F9B:: @ 8162F9B - move 4, Route110_TrickHousePuzzle5_Movement_16308F - waitmove 0 + applymovement 4, Route110_TrickHousePuzzle5_Movement_16308F + waitmovement 0 return Route110_TrickHousePuzzle5_EventScript_162FA6:: @ 8162FA6 - move 5, Route110_TrickHousePuzzle5_Movement_16308F - waitmove 0 + applymovement 5, Route110_TrickHousePuzzle5_Movement_16308F + waitmovement 0 return Route110_TrickHousePuzzle5_EventScript_162FB1:: @ 8162FB1 - move 1, Route110_TrickHousePuzzle5_Movement_163092 - waitmove 0 + applymovement 1, Route110_TrickHousePuzzle5_Movement_163092 + waitmovement 0 return Route110_TrickHousePuzzle5_EventScript_162FBC:: @ 8162FBC - move 2, Route110_TrickHousePuzzle5_Movement_163092 - waitmove 0 + applymovement 2, Route110_TrickHousePuzzle5_Movement_163092 + waitmovement 0 return Route110_TrickHousePuzzle5_EventScript_162FC7:: @ 8162FC7 - move 3, Route110_TrickHousePuzzle5_Movement_163092 - waitmove 0 + applymovement 3, Route110_TrickHousePuzzle5_Movement_163092 + waitmovement 0 return Route110_TrickHousePuzzle5_EventScript_162FD2:: @ 8162FD2 - move 4, Route110_TrickHousePuzzle5_Movement_163092 - waitmove 0 + applymovement 4, Route110_TrickHousePuzzle5_Movement_163092 + waitmovement 0 return Route110_TrickHousePuzzle5_EventScript_162FDD:: @ 8162FDD - move 5, Route110_TrickHousePuzzle5_Movement_163092 - waitmove 0 + applymovement 5, Route110_TrickHousePuzzle5_Movement_163092 + waitmovement 0 return Route110_TrickHousePuzzle5_EventScript_162FE8:: @ 8162FE8 - move 1, Route110_TrickHousePuzzle5_Movement_163096 - waitmove 0 + applymovement 1, Route110_TrickHousePuzzle5_Movement_163096 + waitmovement 0 return Route110_TrickHousePuzzle5_EventScript_162FF3:: @ 8162FF3 - move 2, Route110_TrickHousePuzzle5_Movement_163096 - waitmove 0 + applymovement 2, Route110_TrickHousePuzzle5_Movement_163096 + waitmovement 0 return Route110_TrickHousePuzzle5_EventScript_162FFE:: @ 8162FFE - move 3, Route110_TrickHousePuzzle5_Movement_163096 - waitmove 0 + applymovement 3, Route110_TrickHousePuzzle5_Movement_163096 + waitmovement 0 return Route110_TrickHousePuzzle5_EventScript_163009:: @ 8163009 - move 4, Route110_TrickHousePuzzle5_Movement_163096 - waitmove 0 + applymovement 4, Route110_TrickHousePuzzle5_Movement_163096 + waitmovement 0 return Route110_TrickHousePuzzle5_EventScript_163014:: @ 8163014 - move 5, Route110_TrickHousePuzzle5_Movement_163096 - waitmove 0 + applymovement 5, Route110_TrickHousePuzzle5_Movement_163096 + waitmovement 0 return Route110_TrickHousePuzzle5_EventScript_16301F:: @ 816301F - move 1, Route110_TrickHousePuzzle5_Movement_163098 - waitmove 0 + applymovement 1, Route110_TrickHousePuzzle5_Movement_163098 + waitmovement 0 return Route110_TrickHousePuzzle5_EventScript_16302A:: @ 816302A - move 2, Route110_TrickHousePuzzle5_Movement_163098 - waitmove 0 + applymovement 2, Route110_TrickHousePuzzle5_Movement_163098 + waitmovement 0 return Route110_TrickHousePuzzle5_EventScript_163035:: @ 8163035 - move 3, Route110_TrickHousePuzzle5_Movement_163098 - waitmove 0 + applymovement 3, Route110_TrickHousePuzzle5_Movement_163098 + waitmovement 0 return Route110_TrickHousePuzzle5_EventScript_163040:: @ 8163040 - move 4, Route110_TrickHousePuzzle5_Movement_163098 - waitmove 0 + applymovement 4, Route110_TrickHousePuzzle5_Movement_163098 + waitmovement 0 return Route110_TrickHousePuzzle5_EventScript_16304B:: @ 816304B - move 5, Route110_TrickHousePuzzle5_Movement_163098 - waitmove 0 + applymovement 5, Route110_TrickHousePuzzle5_Movement_163098 + waitmovement 0 return Route110_TrickHousePuzzle5_EventScript_163056:: @ 8163056 - move 1, Route110_TrickHousePuzzle5_Movement_16309B - waitmove 0 + applymovement 1, Route110_TrickHousePuzzle5_Movement_16309B + waitmovement 0 return Route110_TrickHousePuzzle5_EventScript_163061:: @ 8163061 - move 2, Route110_TrickHousePuzzle5_Movement_16309B - waitmove 0 + applymovement 2, Route110_TrickHousePuzzle5_Movement_16309B + waitmovement 0 return Route110_TrickHousePuzzle5_EventScript_16306C:: @ 816306C - move 3, Route110_TrickHousePuzzle5_Movement_16309B - waitmove 0 + applymovement 3, Route110_TrickHousePuzzle5_Movement_16309B + waitmovement 0 return Route110_TrickHousePuzzle5_EventScript_163077:: @ 8163077 - move 4, Route110_TrickHousePuzzle5_Movement_16309B - waitmove 0 + applymovement 4, Route110_TrickHousePuzzle5_Movement_16309B + waitmovement 0 return Route110_TrickHousePuzzle5_EventScript_163082:: @ 8163082 - move 5, Route110_TrickHousePuzzle5_Movement_16309B - waitmove 0 + applymovement 5, Route110_TrickHousePuzzle5_Movement_16309B + waitmovement 0 return Route110_TrickHousePuzzle5_Movement_16308D:: @ 816308D diff --git a/data/scripts/maps/Route110_TrickHousePuzzle6.inc b/data/scripts/maps/Route110_TrickHousePuzzle6.inc index 1e47bbd83..ddf845142 100644 --- a/data/scripts/maps/Route110_TrickHousePuzzle6.inc +++ b/data/scripts/maps/Route110_TrickHousePuzzle6.inc @@ -18,13 +18,13 @@ Route110_TrickHousePuzzle6_EventScript_1630E6:: @ 81630E6 Route110_TrickHousePuzzle6_EventScript_1630EA:: @ 81630EA lockall compare 0x40b0, 0 - jumpeq Route110_TrickHousePuzzle6_EventScript_1630FC - jump Route110_TrickHousePuzzle6_EventScript_161892 + goto_if_eq Route110_TrickHousePuzzle6_EventScript_1630FC + goto Route110_TrickHousePuzzle6_EventScript_161892 end Route110_TrickHousePuzzle6_EventScript_1630FC:: @ 81630FC setvar 0x40b0, 1 - jump Route110_TrickHousePuzzle6_EventScript_16189C + goto Route110_TrickHousePuzzle6_EventScript_16189C end Route110_TrickHousePuzzle6_EventScript_163107:: @ 8163107 diff --git a/data/scripts/maps/Route110_TrickHousePuzzle7.inc b/data/scripts/maps/Route110_TrickHousePuzzle7.inc index 7f965b467..3361e3e9d 100644 --- a/data/scripts/maps/Route110_TrickHousePuzzle7.inc +++ b/data/scripts/maps/Route110_TrickHousePuzzle7.inc @@ -11,15 +11,15 @@ Route110_TrickHousePuzzle7_MapScript1_163161:: @ 8163161 Route110_TrickHousePuzzle7_EventScript_163167:: @ 8163167 checkflag 194 - callif 1, Route110_TrickHousePuzzle7_EventScript_163195 + call_if 1, Route110_TrickHousePuzzle7_EventScript_163195 checkflag 195 - callif 1, Route110_TrickHousePuzzle7_EventScript_1631A8 + call_if 1, Route110_TrickHousePuzzle7_EventScript_1631A8 checkflag 196 - callif 1, Route110_TrickHousePuzzle7_EventScript_1631BB + call_if 1, Route110_TrickHousePuzzle7_EventScript_1631BB checkflag 197 - callif 1, Route110_TrickHousePuzzle7_EventScript_1631CE + call_if 1, Route110_TrickHousePuzzle7_EventScript_1631CE checkflag 198 - callif 1, Route110_TrickHousePuzzle7_EventScript_1631E1 + call_if 1, Route110_TrickHousePuzzle7_EventScript_1631E1 return Route110_TrickHousePuzzle7_EventScript_163195:: @ 8163195 @@ -74,7 +74,7 @@ Route110_TrickHousePuzzle7_EventScript_163240:: @ 8163240 Route110_TrickHousePuzzle7_MapScript1_163253:: @ 8163253 compare 0x40b6, 1 - jumpeq Route110_TrickHousePuzzle7_EventScript_16326E + goto_if_eq Route110_TrickHousePuzzle7_EventScript_16326E clearflag 194 clearflag 195 clearflag 196 @@ -87,7 +87,7 @@ Route110_TrickHousePuzzle7_EventScript_16326E:: @ 816326E Route110_TrickHousePuzzle7_MapScript1_16326F:: @ 816326F compare 0x40b6, 1 - callif 1, Route110_TrickHousePuzzle7_EventScript_163167 + call_if 1, Route110_TrickHousePuzzle7_EventScript_163167 end Route110_TrickHousePuzzle7_MapScript2_16327B:: @ 816327B @@ -101,13 +101,13 @@ Route110_TrickHousePuzzle7_EventScript_163285:: @ 8163285 Route110_TrickHousePuzzle7_EventScript_16328B:: @ 816328B lockall compare 0x40b1, 0 - jumpeq Route110_TrickHousePuzzle7_EventScript_16329D - jump Route110_TrickHousePuzzle7_EventScript_161892 + goto_if_eq Route110_TrickHousePuzzle7_EventScript_16329D + goto Route110_TrickHousePuzzle7_EventScript_161892 end Route110_TrickHousePuzzle7_EventScript_16329D:: @ 816329D setvar 0x40b1, 1 - jump Route110_TrickHousePuzzle7_EventScript_16189C + goto Route110_TrickHousePuzzle7_EventScript_16189C end Route110_TrickHousePuzzle7_EventScript_1632A8:: @ 81632A8 @@ -120,77 +120,77 @@ Route110_TrickHousePuzzle7_EventScript_1632A8:: @ 81632A8 Route110_TrickHousePuzzle7_EventScript_1632B9:: @ 81632B9 lockall - pause 32 + delay 32 checkflag 194 - callif 0, Route110_TrickHousePuzzle7_EventScript_163195 + call_if 0, Route110_TrickHousePuzzle7_EventScript_163195 checkflag 194 - callif 1, Route110_TrickHousePuzzle7_EventScript_1631F4 + call_if 1, Route110_TrickHousePuzzle7_EventScript_1631F4 special DrawWholeMapView - playsfx 36 + playse 36 checkflag 194 - jumpif 0, Route110_TrickHousePuzzle7_EventScript_1633A4 + goto_if 0, Route110_TrickHousePuzzle7_EventScript_1633A4 checkflag 194 - jumpeq Route110_TrickHousePuzzle7_EventScript_1633A9 + goto_if_eq Route110_TrickHousePuzzle7_EventScript_1633A9 end Route110_TrickHousePuzzle7_EventScript_1632E8:: @ 81632E8 lockall - pause 32 + delay 32 checkflag 195 - callif 0, Route110_TrickHousePuzzle7_EventScript_1631A8 + call_if 0, Route110_TrickHousePuzzle7_EventScript_1631A8 checkflag 195 - callif 1, Route110_TrickHousePuzzle7_EventScript_163207 + call_if 1, Route110_TrickHousePuzzle7_EventScript_163207 special DrawWholeMapView - playsfx 36 + playse 36 checkflag 195 - jumpif 0, Route110_TrickHousePuzzle7_EventScript_1633AE + goto_if 0, Route110_TrickHousePuzzle7_EventScript_1633AE checkflag 195 - jumpeq Route110_TrickHousePuzzle7_EventScript_1633B3 + goto_if_eq Route110_TrickHousePuzzle7_EventScript_1633B3 end Route110_TrickHousePuzzle7_EventScript_163317:: @ 8163317 lockall - pause 32 + delay 32 checkflag 196 - callif 0, Route110_TrickHousePuzzle7_EventScript_1631BB + call_if 0, Route110_TrickHousePuzzle7_EventScript_1631BB checkflag 196 - callif 1, Route110_TrickHousePuzzle7_EventScript_16321A + call_if 1, Route110_TrickHousePuzzle7_EventScript_16321A special DrawWholeMapView - playsfx 36 + playse 36 checkflag 196 - jumpif 0, Route110_TrickHousePuzzle7_EventScript_1633B8 + goto_if 0, Route110_TrickHousePuzzle7_EventScript_1633B8 checkflag 196 - jumpeq Route110_TrickHousePuzzle7_EventScript_1633BD + goto_if_eq Route110_TrickHousePuzzle7_EventScript_1633BD end Route110_TrickHousePuzzle7_EventScript_163346:: @ 8163346 lockall - pause 32 + delay 32 checkflag 197 - callif 0, Route110_TrickHousePuzzle7_EventScript_1631CE + call_if 0, Route110_TrickHousePuzzle7_EventScript_1631CE checkflag 197 - callif 1, Route110_TrickHousePuzzle7_EventScript_16322D + call_if 1, Route110_TrickHousePuzzle7_EventScript_16322D special DrawWholeMapView - playsfx 36 + playse 36 checkflag 197 - jumpif 0, Route110_TrickHousePuzzle7_EventScript_1633C2 + goto_if 0, Route110_TrickHousePuzzle7_EventScript_1633C2 checkflag 197 - jumpeq Route110_TrickHousePuzzle7_EventScript_1633C7 + goto_if_eq Route110_TrickHousePuzzle7_EventScript_1633C7 end Route110_TrickHousePuzzle7_EventScript_163375:: @ 8163375 lockall - pause 32 + delay 32 checkflag 198 - callif 0, Route110_TrickHousePuzzle7_EventScript_1631E1 + call_if 0, Route110_TrickHousePuzzle7_EventScript_1631E1 checkflag 198 - callif 1, Route110_TrickHousePuzzle7_EventScript_163240 + call_if 1, Route110_TrickHousePuzzle7_EventScript_163240 special DrawWholeMapView - playsfx 36 + playse 36 checkflag 198 - jumpif 0, Route110_TrickHousePuzzle7_EventScript_1633CC + goto_if 0, Route110_TrickHousePuzzle7_EventScript_1633CC checkflag 198 - jumpeq Route110_TrickHousePuzzle7_EventScript_1633D1 + goto_if_eq Route110_TrickHousePuzzle7_EventScript_1633D1 end Route110_TrickHousePuzzle7_EventScript_1633A4:: @ 81633A4 diff --git a/data/scripts/maps/Route110_TrickHousePuzzle8.inc b/data/scripts/maps/Route110_TrickHousePuzzle8.inc index a31c868be..5f0b00684 100644 --- a/data/scripts/maps/Route110_TrickHousePuzzle8.inc +++ b/data/scripts/maps/Route110_TrickHousePuzzle8.inc @@ -4,13 +4,13 @@ Route110_TrickHousePuzzle8_MapScripts:: @ 816341B Route110_TrickHousePuzzle8_EventScript_16341C:: @ 816341C lockall compare 0x40b2, 0 - jumpeq Route110_TrickHousePuzzle8_EventScript_16342E - jump Route110_TrickHousePuzzle8_EventScript_161892 + goto_if_eq Route110_TrickHousePuzzle8_EventScript_16342E + goto Route110_TrickHousePuzzle8_EventScript_161892 end Route110_TrickHousePuzzle8_EventScript_16342E:: @ 816342E setvar 0x40b2, 1 - jump Route110_TrickHousePuzzle8_EventScript_16189C + goto Route110_TrickHousePuzzle8_EventScript_16189C end Route110_TrickHousePuzzle8_EventScript_163439:: @ 8163439 diff --git a/data/scripts/maps/Route111.inc b/data/scripts/maps/Route111.inc index 1358a44be..545e62921 100644 --- a/data/scripts/maps/Route111.inc +++ b/data/scripts/maps/Route111.inc @@ -5,7 +5,7 @@ Route111_MapScripts:: @ 814FF91 Route111_MapScript1_14FF9C:: @ 814FF9C checkflag 228 - callif 0, Route111_EventScript_14FFA6 + call_if 0, Route111_EventScript_14FFA6 end Route111_EventScript_14FFA6:: @ 814FFA6 @@ -17,21 +17,21 @@ Route111_MapScript1_14FFB9:: @ 814FFB9 call Route111_EventScript_14FFCD call Route111_EventScript_1AE313 checktrainerflag OPPONENT_VICKY - jumpif 0, Route111_EventScript_15000D + goto_if 0, Route111_EventScript_15000D end Route111_EventScript_14FFCD:: @ 814FFCD getplayerxy 0x4000, 0x4001 compare 0x4001, 34 - jumpif 0, Route111_EventScript_15000C + goto_if 0, Route111_EventScript_15000C compare 0x4001, 107 - jumpif 2, Route111_EventScript_15000C + goto_if 2, Route111_EventScript_15000C compare 0x4001, 72 - jumpif 2, Route111_EventScript_150009 + goto_if 2, Route111_EventScript_150009 compare 0x4000, 2000 - jumpif 2, Route111_EventScript_15000C + goto_if 2, Route111_EventScript_15000C compare 0x4000, 8 - jumpif 0, Route111_EventScript_15000C + goto_if 0, Route111_EventScript_15000C Route111_EventScript_150009:: @ 8150009 setweather 8 @@ -44,25 +44,25 @@ Route111_EventScript_15000D:: @ 815000D setflag 769 setflag 770 setflag 771 - settrainerflag OPPONENT_VICTOR - settrainerflag OPPONENT_VICTORIA - settrainerflag OPPONENT_VIVI + cleartrainerflag OPPONENT_VICTOR + cleartrainerflag OPPONENT_VICTORIA + cleartrainerflag OPPONENT_VIVI end Route111_EventScript_150023:: @ 8150023 lockall msgbox Route111_Text_16FA54, 5 compare RESULT, 0 - jumpeq Route111_EventScript_15005F + goto_if_eq Route111_EventScript_15005F giveitem ITEM_ROOT_FOSSIL - closebutton + closemessage setflag 963 setflag 964 - disappear 34 - pause 30 - move 35, Route111_Movement_1500AF - waitmove 0 - disappear 35 + removeobject 34 + delay 30 + applymovement 35, Route111_Movement_1500AF + waitmovement 0 + removeobject 35 releaseall end @@ -75,16 +75,16 @@ Route111_EventScript_150069:: @ 8150069 lockall msgbox Route111_Text_16FAED, 5 compare RESULT, 0 - jumpeq Route111_EventScript_1500A5 + goto_if_eq Route111_EventScript_1500A5 giveitem ITEM_CLAW_FOSSIL - closebutton + closemessage setflag 964 setflag 963 - disappear 35 - pause 30 - move 34, Route111_Movement_1500AF - waitmove 0 - disappear 34 + removeobject 35 + delay 30 + applymovement 34, Route111_Movement_1500AF + waitmovement 0 + removeobject 34 releaseall end @@ -120,13 +120,13 @@ Route111_Movement_1500AF:: @ 81500AF Route111_EventScript_1500C5:: @ 81500C5 lock faceplayer - checkdailyflags + dodailyevents checkflag 2252 - jumpeq Route111_EventScript_150100 + goto_if_eq Route111_EventScript_150100 msgbox Route111_Text_1C56F0, 4 giveitem ITEM_RAZZ_BERRY compare RESULT, 0 - jumpeq Route111_EventScript_1A029B + goto_if_eq Route111_EventScript_1A029B setflag 2252 special GetPlayerBigGuyGirlString msgbox Route111_Text_1C5781, 4 @@ -141,67 +141,67 @@ Route111_EventScript_150100:: @ 8150100 @ 815010A lockall setvar 0x8004, 0 - jump Route111_EventScript_15013A + goto Route111_EventScript_15013A end Route111_EventScript_150116:: @ 8150116 lockall setvar 0x8004, 1 - jump Route111_EventScript_15013A + goto Route111_EventScript_15013A end Route111_EventScript_150122:: @ 8150122 lockall setvar 0x8004, 2 - jump Route111_EventScript_15013A + goto Route111_EventScript_15013A end @ 815012E lockall setvar 0x8004, 3 - jump Route111_EventScript_15013A + goto Route111_EventScript_15013A end Route111_EventScript_15013A:: @ 815013A checkitem ITEM_GO_GOGGLES, 1 compare RESULT, 0 - jumpeq Route111_EventScript_150151 + goto_if_eq Route111_EventScript_150151 setvar 0x4003, 1 releaseall end Route111_EventScript_150151:: @ 8150151 msgbox Route111_Text_1A0F93, 4 - closebutton + closemessage compare 0x8004, 0 - callif 1, Route111_EventScript_150188 + call_if 1, Route111_EventScript_150188 compare 0x8004, 1 - callif 1, Route111_EventScript_150193 + call_if 1, Route111_EventScript_150193 compare 0x8004, 2 - callif 1, Route111_EventScript_15019E + call_if 1, Route111_EventScript_15019E compare 0x8004, 3 - callif 1, Route111_EventScript_1501A9 + call_if 1, Route111_EventScript_1501A9 releaseall end Route111_EventScript_150188:: @ 8150188 - move 255, Route111_Movement_1501B4 - waitmove 0 + applymovement 255, Route111_Movement_1501B4 + waitmovement 0 return Route111_EventScript_150193:: @ 8150193 - move 255, Route111_Movement_1501B6 - waitmove 0 + applymovement 255, Route111_Movement_1501B6 + waitmovement 0 return Route111_EventScript_15019E:: @ 815019E - move 255, Route111_Movement_1501B8 - waitmove 0 + applymovement 255, Route111_Movement_1501B8 + waitmovement 0 return Route111_EventScript_1501A9:: @ 81501A9 - move 255, Route111_Movement_1501BA - waitmove 0 + applymovement 255, Route111_Movement_1501BA + waitmovement 0 return Route111_Movement_1501B4:: @ 81501B4 @@ -222,14 +222,14 @@ Route111_Movement_1501BA:: @ 81501BA Route111_EventScript_1501BC:: @ 81501BC setweather 2 - fademusic 360 + fadenewbgm 360 doweather setvar 0x4003, 0 end Route111_EventScript_1501C9:: @ 81501C9 setweather 8 - fademusic 409 + fadenewbgm 409 doweather end @@ -239,7 +239,7 @@ Route111_EventScript_1501D1:: @ 81501D1 setflag 2115 msgbox Route111_Text_16F705, 5 compare RESULT, 1 - jumpeq Route111_EventScript_1501F3 + goto_if_eq Route111_EventScript_1501F3 msgbox Route111_Text_16F785, 4 release end @@ -247,80 +247,80 @@ Route111_EventScript_1501D1:: @ 81501D1 Route111_EventScript_1501F3:: @ 81501F3 msgbox Route111_Text_16F7B3, 4 trainerbattle 3, OPPONENT_VICTOR, 0, Route111_Text_16F7D2 - move 1, Route111_Movement_1A0841 - waitmove 0 + applymovement 1, Route111_Movement_1A0841 + waitmovement 0 call Route111_EventScript_150348 msgbox Route111_Text_16F7FF, 4 - closebutton - move 1, Route111_Movement_150356 - waitmove 0 - disappear 1 + closemessage + applymovement 1, Route111_Movement_150356 + waitmovement 0 + removeobject 1 call Route111_EventScript_15034F - move 255, Route111_Movement_15035B - waitmove 0 + applymovement 255, Route111_Movement_15035B + waitmovement 0 call Route111_EventScript_150348 - reappear 2 - move 2, Route111_Movement_150359 - waitmove 0 + addobject 2 + applymovement 2, Route111_Movement_150359 + waitmovement 0 call Route111_EventScript_15034F msgbox Route111_Text_16F82D, 4 trainerbattle 3, OPPONENT_VICTORIA, 0, Route111_Text_16F8A6 - move 2, Route111_Movement_1A0841 - waitmove 0 + applymovement 2, Route111_Movement_1A0841 + waitmovement 0 call Route111_EventScript_150348 msgbox Route111_Text_16F8D5, 4 - closebutton - move 2, Route111_Movement_150356 - waitmove 0 - disappear 2 + closemessage + applymovement 2, Route111_Movement_150356 + waitmovement 0 + removeobject 2 call Route111_EventScript_15034F - move 255, Route111_Movement_15035B - waitmove 0 + applymovement 255, Route111_Movement_15035B + waitmovement 0 call Route111_EventScript_150348 - reappear 3 - move 3, Route111_Movement_150359 - waitmove 0 + addobject 3 + applymovement 3, Route111_Movement_150359 + waitmovement 0 call Route111_EventScript_15034F msgbox Route111_Text_16F90E, 4 trainerbattle 3, OPPONENT_VIVI, 0, Route111_Text_16F956 - move 3, Route111_Movement_1A0841 - waitmove 0 + applymovement 3, Route111_Movement_1A0841 + waitmovement 0 call Route111_EventScript_150348 msgbox Route111_Text_16F96C, 4 - closebutton - move 3, Route111_Movement_150356 - waitmove 0 - disappear 3 + closemessage + applymovement 3, Route111_Movement_150356 + waitmovement 0 + removeobject 3 call Route111_EventScript_15034F - move 255, Route111_Movement_15035B - waitmove 0 + applymovement 255, Route111_Movement_15035B + waitmovement 0 call Route111_EventScript_150348 - reappear 4 - move 4, Route111_Movement_150359 - waitmove 0 + addobject 4 + applymovement 4, Route111_Movement_150359 + waitmovement 0 call Route111_EventScript_15034F msgbox Route111_Text_16F991, 4 trainerbattle 3, OPPONENT_VICKY, 0, Route111_Text_16F9EC msgbox Route111_Text_16FA22, 4 - closebutton - move 4, Route111_Movement_1A0841 - waitmove 0 + closemessage + applymovement 4, Route111_Movement_1A0841 + waitmovement 0 call Route111_EventScript_150348 - move 4, Route111_Movement_150356 - waitmove 0 - disappear 4 + applymovement 4, Route111_Movement_150356 + waitmovement 0 + removeobject 4 call Route111_EventScript_15034F release end Route111_EventScript_150348:: @ 8150348 - setdooropened 13, 113 - doorchange + opendoor 13, 113 + waitdooranim return Route111_EventScript_15034F:: @ 815034F - setdoorclosed 13, 113 - doorchange + closedoor 13, 113 + waitdooranim return Route111_Movement_150356:: @ 8150356 @@ -392,9 +392,9 @@ Route111_EventScript_1503EC:: @ 81503EC Route111_EventScript_150403:: @ 8150403 trainerbattle 0, OPPONENT_DUSTY_1, 0, Route111_Text_1BAEC9, Route111_Text_1BAF14 - specialval RESULT, sub_8082C68 + specialvar RESULT, sub_8082C68 compare RESULT, 1 - jumpeq Route111_EventScript_15042A + goto_if_eq Route111_EventScript_15042A msgbox Route111_Text_1BAF5B, 6 end @@ -420,9 +420,9 @@ Route111_EventScript_15046F:: @ 815046F Route111_EventScript_150486:: @ 8150486 trainerbattle 0, OPPONENT_WILTON_1, 0, Route111_Text_1BB2E3, Route111_Text_1BB313 - specialval RESULT, sub_8082C68 + specialvar RESULT, sub_8082C68 compare RESULT, 1 - jumpeq Route111_EventScript_1504AD + goto_if_eq Route111_EventScript_1504AD msgbox Route111_Text_1BB33E, 6 end @@ -433,9 +433,9 @@ Route111_EventScript_1504AD:: @ 81504AD Route111_EventScript_1504C4:: @ 81504C4 trainerbattle 0, OPPONENT_BROOKE_1, 0, Route111_Text_1BB44F, Route111_Text_1BB49F - specialval RESULT, sub_8082C68 + specialvar RESULT, sub_8082C68 compare RESULT, 1 - jumpeq Route111_EventScript_1504EB + goto_if_eq Route111_EventScript_1504EB msgbox Route111_Text_1BB4CE, 6 end diff --git a/data/scripts/maps/Route111_OldLadysRestStop.inc b/data/scripts/maps/Route111_OldLadysRestStop.inc index 107026a4b..5576a44ff 100644 --- a/data/scripts/maps/Route111_OldLadysRestStop.inc +++ b/data/scripts/maps/Route111_OldLadysRestStop.inc @@ -11,20 +11,20 @@ Route111_OldLadysRestStop_EventScript_15BFDB:: @ 815BFDB faceplayer msgbox Route111_OldLadysRestStop_Text_1923AF, 5 compare RESULT, 1 - jumpeq Route111_OldLadysRestStop_EventScript_15BFFC + goto_if_eq Route111_OldLadysRestStop_EventScript_15BFFC compare RESULT, 0 - jumpeq Route111_OldLadysRestStop_EventScript_15C029 + goto_if_eq Route111_OldLadysRestStop_EventScript_15C029 end Route111_OldLadysRestStop_EventScript_15BFFC:: @ 815BFFC msgbox Route111_OldLadysRestStop_Text_192423, 4 - closebutton + closemessage call Route111_OldLadysRestStop_EventScript_1A02CA msgbox Route111_OldLadysRestStop_Text_19244D, 5 compare RESULT, 1 - jumpeq Route111_OldLadysRestStop_EventScript_15BFFC + goto_if_eq Route111_OldLadysRestStop_EventScript_15BFFC compare RESULT, 0 - jumpeq Route111_OldLadysRestStop_EventScript_15C029 + goto_if_eq Route111_OldLadysRestStop_EventScript_15C029 end Route111_OldLadysRestStop_EventScript_15C029:: @ 815C029 diff --git a/data/scripts/maps/Route111_WinstrateFamilysHouse.inc b/data/scripts/maps/Route111_WinstrateFamilysHouse.inc index 3eb514ad2..d9a94ce75 100644 --- a/data/scripts/maps/Route111_WinstrateFamilysHouse.inc +++ b/data/scripts/maps/Route111_WinstrateFamilysHouse.inc @@ -6,7 +6,7 @@ Route111_WinstrateFamilysHouse_EventScript_15BF25:: @ 815BF25 faceplayer setvar 0x8008, 2 msgbox Route111_WinstrateFamilysHouse_Text_191FCE, 4 - jump Route111_WinstrateFamilysHouse_EventScript_15BFC4 + goto Route111_WinstrateFamilysHouse_EventScript_15BFC4 end Route111_WinstrateFamilysHouse_EventScript_15BF3A:: @ 815BF3A @@ -14,18 +14,18 @@ Route111_WinstrateFamilysHouse_EventScript_15BF3A:: @ 815BF3A faceplayer setvar 0x8008, 3 checkflag 277 - jumpeq Route111_WinstrateFamilysHouse_EventScript_15BF72 + goto_if_eq Route111_WinstrateFamilysHouse_EventScript_15BF72 msgbox Route111_WinstrateFamilysHouse_Text_19208A, 4 giveitem ITEM_MACHO_BRACE compare RESULT, 0 - jumpeq Route111_WinstrateFamilysHouse_EventScript_1A029B + goto_if_eq Route111_WinstrateFamilysHouse_EventScript_1A029B setflag 277 - jump Route111_WinstrateFamilysHouse_EventScript_15BFC4 + goto Route111_WinstrateFamilysHouse_EventScript_15BFC4 end Route111_WinstrateFamilysHouse_EventScript_15BF72:: @ 815BF72 msgbox Route111_WinstrateFamilysHouse_Text_19214D, 4 - jump Route111_WinstrateFamilysHouse_EventScript_15BFC4 + goto Route111_WinstrateFamilysHouse_EventScript_15BFC4 end Route111_WinstrateFamilysHouse_EventScript_15BF80:: @ 815BF80 @@ -33,7 +33,7 @@ Route111_WinstrateFamilysHouse_EventScript_15BF80:: @ 815BF80 faceplayer setvar 0x8008, 1 msgbox Route111_WinstrateFamilysHouse_Text_192190, 4 - jump Route111_WinstrateFamilysHouse_EventScript_15BFC4 + goto Route111_WinstrateFamilysHouse_EventScript_15BFC4 end Route111_WinstrateFamilysHouse_EventScript_15BF95:: @ 815BF95 @@ -41,20 +41,20 @@ Route111_WinstrateFamilysHouse_EventScript_15BF95:: @ 815BF95 faceplayer setvar 0x8008, 4 checkflag 4 - jumpeq Route111_WinstrateFamilysHouse_EventScript_15BFB6 + goto_if_eq Route111_WinstrateFamilysHouse_EventScript_15BFB6 msgbox Route111_WinstrateFamilysHouse_Text_192219, 4 setflag 4 - jump Route111_WinstrateFamilysHouse_EventScript_15BFC4 + goto Route111_WinstrateFamilysHouse_EventScript_15BFC4 end Route111_WinstrateFamilysHouse_EventScript_15BFB6:: @ 815BFB6 msgbox Route111_WinstrateFamilysHouse_Text_192334, 4 - jump Route111_WinstrateFamilysHouse_EventScript_15BFC4 + goto Route111_WinstrateFamilysHouse_EventScript_15BFC4 end Route111_WinstrateFamilysHouse_EventScript_15BFC4:: @ 815BFC4 - closebutton - move 0x8008, Route111_WinstrateFamilysHouse_Movement_1A083D - waitmove 0 + closemessage + applymovement 0x8008, Route111_WinstrateFamilysHouse_Movement_1A083D + waitmovement 0 release end diff --git a/data/scripts/maps/Route112.inc b/data/scripts/maps/Route112.inc index 1c1e36838..d0d464207 100644 --- a/data/scripts/maps/Route112.inc +++ b/data/scripts/maps/Route112.inc @@ -38,9 +38,9 @@ Route112_EventScript_150549:: @ 8150549 Route112_EventScript_150560:: @ 8150560 trainerbattle 0, OPPONENT_TRENT_1, 0, Route112_Text_1BB6A0, Route112_Text_1BB707 - specialval RESULT, sub_8082C68 + specialvar RESULT, sub_8082C68 compare RESULT, 1 - jumpeq Route112_EventScript_150587 + goto_if_eq Route112_EventScript_150587 msgbox Route112_Text_1BB721, 6 end diff --git a/data/scripts/maps/Route112_CableCarStation.inc b/data/scripts/maps/Route112_CableCarStation.inc index 016b868a8..22534aa77 100644 --- a/data/scripts/maps/Route112_CableCarStation.inc +++ b/data/scripts/maps/Route112_CableCarStation.inc @@ -4,14 +4,14 @@ Route112_CableCarStation_MapScripts:: @ 815C033 .byte 0 Route112_CableCarStation_MapScript1_15C03E:: @ 815C03E - warp6 Route112, 255, 28, 28 + setescapewarp Route112, 255, 28, 28 compare 0x40a3, 2 - callif 1, Route112_CableCarStation_EventScript_15C052 + call_if 1, Route112_CableCarStation_EventScript_15C052 end Route112_CableCarStation_EventScript_15C052:: @ 815C052 - movespriteperm 1, 7, 4 - spritebehave 1, 9 + setobjectxyperm 1, 7, 4 + setobjectmovementtype 1, 9 return Route112_CableCarStation_MapScript2_15C05E:: @ 815C05E @@ -20,12 +20,12 @@ Route112_CableCarStation_MapScript2_15C05E:: @ 815C05E Route112_CableCarStation_EventScript_15C068:: @ 815C068 lockall - move 255, Route112_CableCarStation_Movement_15C0F5 - move 1, Route112_CableCarStation_Movement_15C0EB - waitmove 0 + applymovement 255, Route112_CableCarStation_Movement_15C0F5 + applymovement 1, Route112_CableCarStation_Movement_15C0EB + waitmovement 0 setvar 0x40a3, 0 - movespriteperm 1, 6, 7 - spritebehave 1, 8 + setobjectxyperm 1, 6, 7 + setobjectmovementtype 1, 8 releaseall end @@ -34,20 +34,20 @@ Route112_CableCarStation_EventScript_15C08C:: @ 815C08C faceplayer msgbox Route112_CableCarStation_Text_1924F5, 5 compare RESULT, 1 - jumpeq Route112_CableCarStation_EventScript_15C0AD + goto_if_eq Route112_CableCarStation_EventScript_15C0AD compare RESULT, 0 - jumpeq Route112_CableCarStation_EventScript_15C0DC + goto_if_eq Route112_CableCarStation_EventScript_15C0DC end Route112_CableCarStation_EventScript_15C0AD:: @ 815C0AD msgbox Route112_CableCarStation_Text_1925A9, 4 - closebutton - move 1, Route112_CableCarStation_Movement_15C0E6 - move 255, Route112_CableCarStation_Movement_15C0F0 - waitmove 0 + closemessage + applymovement 1, Route112_CableCarStation_Movement_15C0E6 + applymovement 255, Route112_CableCarStation_Movement_15C0F0 + waitmovement 0 setvar 0x8004, 0 setvar 0x40a3, 1 - inccounter GAME_STAT_RODE_CABLE_CAR + incrementgamestat GAME_STAT_RODE_CABLE_CAR special CableCarWarp special sub_8123218 waitstate diff --git a/data/scripts/maps/Route113.inc b/data/scripts/maps/Route113.inc index 1fc5a9345..2eb34cdf3 100644 --- a/data/scripts/maps/Route113.inc +++ b/data/scripts/maps/Route113.inc @@ -15,9 +15,9 @@ Route113_MapScript1_1505DA:: @ 81505DA Route113_EventScript_1505E5:: @ 81505E5 getplayerxy 0x4000, 0x4001 compare 0x4000, 19 - jumpif 0, Route113_EventScript_150604 + goto_if 0, Route113_EventScript_150604 compare 0x4000, 84 - jumpif 2, Route113_EventScript_150604 + goto_if 2, Route113_EventScript_150604 setweather 7 return @@ -60,9 +60,9 @@ Route113_EventScript_150652:: @ 8150652 Route113_EventScript_150669:: @ 8150669 trainerbattle 0, OPPONENT_MADELINE_1, 0, Route113_Text_1BBB27, Route113_Text_1BBB7A - specialval RESULT, sub_8082C68 + specialvar RESULT, sub_8082C68 compare RESULT, 1 - jumpeq Route113_EventScript_150690 + goto_if_eq Route113_EventScript_150690 msgbox Route113_Text_1BBB9A, 6 end @@ -73,9 +73,9 @@ Route113_EventScript_150690:: @ 8150690 Route113_EventScript_1506A7:: @ 81506A7 trainerbattle 0, OPPONENT_LAO_1, 0, Route113_Text_1BBC59, Route113_Text_1BBC90 - specialval RESULT, sub_8082C68 + specialvar RESULT, sub_8082C68 compare RESULT, 1 - jumpeq Route113_EventScript_1506CE + goto_if_eq Route113_EventScript_1506CE msgbox Route113_Text_1BBCAB, 6 end diff --git a/data/scripts/maps/Route113_GlassWorkshop.inc b/data/scripts/maps/Route113_GlassWorkshop.inc index 83983f9bb..d0b608339 100644 --- a/data/scripts/maps/Route113_GlassWorkshop.inc +++ b/data/scripts/maps/Route113_GlassWorkshop.inc @@ -5,7 +5,7 @@ Route113_GlassWorkshop_MapScripts:: @ 816354A Route113_GlassWorkshop_MapScript1_163550:: @ 8163550 setflag 2116 compare 0x40be, 1 - callif 1, Route113_GlassWorkshop_EventScript_16355F + call_if 1, Route113_GlassWorkshop_EventScript_16355F end Route113_GlassWorkshop_EventScript_16355F:: @ 816355F @@ -16,11 +16,11 @@ Route113_GlassWorkshop_EventScript_163565:: @ 8163565 lock faceplayer compare 0x40be, 10 - jumpif 4, Route113_GlassWorkshop_EventScript_1638D2 + goto_if 4, Route113_GlassWorkshop_EventScript_1638D2 compare 0x40be, 2 - jumpeq Route113_GlassWorkshop_EventScript_1635B5 + goto_if_eq Route113_GlassWorkshop_EventScript_1635B5 compare 0x40be, 1 - jumpeq Route113_GlassWorkshop_EventScript_1635AB + goto_if_eq Route113_GlassWorkshop_EventScript_1635AB msgbox Route113_GlassWorkshop_Text_19E4E6, 4 giveitem ITEM_SOOT_SACK setvar 0x40be, 1 @@ -36,13 +36,13 @@ Route113_GlassWorkshop_EventScript_1635AB:: @ 81635AB Route113_GlassWorkshop_EventScript_1635B5:: @ 81635B5 checkitem ITEM_SOOT_SACK, 1 compare RESULT, 0 - jumpeq Route113_GlassWorkshop_EventScript_1635E4 + goto_if_eq Route113_GlassWorkshop_EventScript_1635E4 msgbox Route113_GlassWorkshop_Text_19E65B, 4 compare 0x4048, 250 - jumpif 0, Route113_GlassWorkshop_EventScript_163818 + goto_if 0, Route113_GlassWorkshop_EventScript_163818 message Route113_GlassWorkshop_Text_19E757 - waittext - jump Route113_GlassWorkshop_EventScript_1635EE + waitmessage + goto Route113_GlassWorkshop_EventScript_1635EE end Route113_GlassWorkshop_EventScript_1635E4:: @ 81635E4 @@ -68,102 +68,102 @@ Route113_GlassWorkshop_EventScript_1635EE:: @ 81635EE Route113_GlassWorkshop_EventScript_163660:: @ 8163660 setvar 0x8008, 39 - bufferitem 0, 0x8008 + getitemname 0, 0x8008 setvar 0x800a, 250 compare 0x4048, 250 - jumpif 0, Route113_GlassWorkshop_EventScript_163830 + goto_if 0, Route113_GlassWorkshop_EventScript_163830 msgbox Route113_GlassWorkshop_Text_19E7CD, 5 compare RESULT, 0 - jumpeq Route113_GlassWorkshop_EventScript_163845 + goto_if_eq Route113_GlassWorkshop_EventScript_163845 setvar 0x40be, 10 subvar 0x4048, 250 - jump Route113_GlassWorkshop_EventScript_163851 + goto Route113_GlassWorkshop_EventScript_163851 end Route113_GlassWorkshop_EventScript_16369C:: @ 816369C setvar 0x8008, 40 - bufferitem 0, 0x8008 + getitemname 0, 0x8008 setvar 0x800a, 500 compare 0x4048, 500 - jumpif 0, Route113_GlassWorkshop_EventScript_163830 + goto_if 0, Route113_GlassWorkshop_EventScript_163830 msgbox Route113_GlassWorkshop_Text_19E7CD, 5 compare RESULT, 0 - jumpeq Route113_GlassWorkshop_EventScript_163845 + goto_if_eq Route113_GlassWorkshop_EventScript_163845 setvar 0x40be, 11 subvar 0x4048, 500 - jump Route113_GlassWorkshop_EventScript_163851 + goto Route113_GlassWorkshop_EventScript_163851 end Route113_GlassWorkshop_EventScript_1636D8:: @ 81636D8 setvar 0x8008, 41 - bufferitem 0, 0x8008 + getitemname 0, 0x8008 setvar 0x800a, 500 compare 0x4048, 500 - jumpif 0, Route113_GlassWorkshop_EventScript_163830 + goto_if 0, Route113_GlassWorkshop_EventScript_163830 msgbox Route113_GlassWorkshop_Text_19E7CD, 5 compare RESULT, 0 - jumpeq Route113_GlassWorkshop_EventScript_163845 + goto_if_eq Route113_GlassWorkshop_EventScript_163845 setvar 0x40be, 12 subvar 0x4048, 500 - jump Route113_GlassWorkshop_EventScript_163851 + goto Route113_GlassWorkshop_EventScript_163851 end Route113_GlassWorkshop_EventScript_163714:: @ 8163714 setvar 0x8008, 43 - bufferitem 0, 0x8008 + getitemname 0, 0x8008 setvar 0x800a, 1000 compare 0x4048, 1000 - jumpif 0, Route113_GlassWorkshop_EventScript_163830 + goto_if 0, Route113_GlassWorkshop_EventScript_163830 msgbox Route113_GlassWorkshop_Text_19E7CD, 5 compare RESULT, 0 - jumpeq Route113_GlassWorkshop_EventScript_163845 + goto_if_eq Route113_GlassWorkshop_EventScript_163845 setvar 0x40be, 13 subvar 0x4048, 1000 - jump Route113_GlassWorkshop_EventScript_163851 + goto Route113_GlassWorkshop_EventScript_163851 end Route113_GlassWorkshop_EventScript_163750:: @ 8163750 setvar 0x8008, 42 - bufferitem 0, 0x8008 + getitemname 0, 0x8008 setvar 0x800a, 1000 compare 0x4048, 1000 - jumpif 0, Route113_GlassWorkshop_EventScript_163830 + goto_if 0, Route113_GlassWorkshop_EventScript_163830 msgbox Route113_GlassWorkshop_Text_19E7CD, 5 compare RESULT, 0 - jumpeq Route113_GlassWorkshop_EventScript_163845 + goto_if_eq Route113_GlassWorkshop_EventScript_163845 setvar 0x40be, 14 subvar 0x4048, 1000 - jump Route113_GlassWorkshop_EventScript_163851 + goto Route113_GlassWorkshop_EventScript_163851 end Route113_GlassWorkshop_EventScript_16378C:: @ 816378C setvar 0x8009, 1 setvar 0x8008, 13 - bufferdecor 0, 0x8008 + getdecorname 0, 0x8008 setvar 0x800a, 6000 compare 0x4048, 6000 - jumpif 0, Route113_GlassWorkshop_EventScript_163830 + goto_if 0, Route113_GlassWorkshop_EventScript_163830 msgbox Route113_GlassWorkshop_Text_19E7CD, 5 compare RESULT, 0 - jumpeq Route113_GlassWorkshop_EventScript_163845 + goto_if_eq Route113_GlassWorkshop_EventScript_163845 setvar 0x40be, 15 subvar 0x4048, 6000 - jump Route113_GlassWorkshop_EventScript_163851 + goto Route113_GlassWorkshop_EventScript_163851 end Route113_GlassWorkshop_EventScript_1637CD:: @ 81637CD setvar 0x8009, 1 setvar 0x8008, 6 - bufferdecor 0, 0x8008 + getdecorname 0, 0x8008 setvar 0x800a, 8000 compare 0x4048, 8000 - jumpif 0, Route113_GlassWorkshop_EventScript_163830 + goto_if 0, Route113_GlassWorkshop_EventScript_163830 msgbox Route113_GlassWorkshop_Text_19E7CD, 5 compare RESULT, 0 - jumpeq Route113_GlassWorkshop_EventScript_163845 + goto_if_eq Route113_GlassWorkshop_EventScript_163845 setvar 0x40be, 16 subvar 0x4048, 8000 - jump Route113_GlassWorkshop_EventScript_163851 + goto Route113_GlassWorkshop_EventScript_163851 end Route113_GlassWorkshop_EventScript_16380E:: @ 816380E @@ -174,37 +174,37 @@ Route113_GlassWorkshop_EventScript_16380E:: @ 816380E Route113_GlassWorkshop_EventScript_163818:: @ 8163818 setvar 0x800a, 250 subvar 0x800a, 16456 - buffernum 0, 32778 + getnumberstring 0, 32778 msgbox Route113_GlassWorkshop_Text_19E697, 4 release end Route113_GlassWorkshop_EventScript_163830:: @ 8163830 subvar 0x800a, 16456 - buffernum 1, 32778 + getnumberstring 1, 32778 message Route113_GlassWorkshop_Text_19E890 - waittext - jump Route113_GlassWorkshop_EventScript_1635EE + waitmessage + goto Route113_GlassWorkshop_EventScript_1635EE end Route113_GlassWorkshop_EventScript_163845:: @ 8163845 message Route113_GlassWorkshop_Text_19E802 - waittext - jump Route113_GlassWorkshop_EventScript_1635EE + waitmessage + goto Route113_GlassWorkshop_EventScript_1635EE end Route113_GlassWorkshop_EventScript_163851:: @ 8163851 msgbox Route113_GlassWorkshop_Text_19E827, 4 - closebutton + closemessage fadescreen 1 - playsfx 5 - pause 30 + playse 5 + delay 30 fadescreen 0 msgbox Route113_GlassWorkshop_Text_19E9D7, 4 compare 0x8009, 0 - callif 1, Route113_GlassWorkshop_EventScript_163889 + call_if 1, Route113_GlassWorkshop_EventScript_163889 compare 0x8009, 1 - callif 1, Route113_GlassWorkshop_EventScript_1638A1 + call_if 1, Route113_GlassWorkshop_EventScript_1638A1 setvar 0x40be, 2 release end @@ -212,13 +212,13 @@ Route113_GlassWorkshop_EventScript_163851:: @ 8163851 Route113_GlassWorkshop_EventScript_163889:: @ 8163889 giveitem 0x8008 compare RESULT, 0 - jumpeq Route113_GlassWorkshop_EventScript_1638B4 + goto_if_eq Route113_GlassWorkshop_EventScript_1638B4 return Route113_GlassWorkshop_EventScript_1638A1:: @ 81638A1 givedecoration 0x8008 compare RESULT, 0 - jumpeq Route113_GlassWorkshop_EventScript_1638C3 + goto_if_eq Route113_GlassWorkshop_EventScript_1638C3 return Route113_GlassWorkshop_EventScript_1638B4:: @ 81638B4 @@ -247,58 +247,58 @@ Route113_GlassWorkshop_EventScript_1638D2:: @ 81638D2 Route113_GlassWorkshop_EventScript_163925:: @ 8163925 setvar 0x8009, 0 setvar 0x8008, 39 - bufferitem 0, 0x8008 - jump Route113_GlassWorkshop_EventScript_1639B1 + getitemname 0, 0x8008 + goto Route113_GlassWorkshop_EventScript_1639B1 end Route113_GlassWorkshop_EventScript_163939:: @ 8163939 setvar 0x8009, 0 setvar 0x8008, 40 - bufferitem 0, 0x8008 - jump Route113_GlassWorkshop_EventScript_1639B1 + getitemname 0, 0x8008 + goto Route113_GlassWorkshop_EventScript_1639B1 end Route113_GlassWorkshop_EventScript_16394D:: @ 816394D setvar 0x8009, 0 setvar 0x8008, 41 - bufferitem 0, 0x8008 - jump Route113_GlassWorkshop_EventScript_1639B1 + getitemname 0, 0x8008 + goto Route113_GlassWorkshop_EventScript_1639B1 end Route113_GlassWorkshop_EventScript_163961:: @ 8163961 setvar 0x8009, 0 setvar 0x8008, 43 - bufferitem 0, 0x8008 - jump Route113_GlassWorkshop_EventScript_1639B1 + getitemname 0, 0x8008 + goto Route113_GlassWorkshop_EventScript_1639B1 end Route113_GlassWorkshop_EventScript_163975:: @ 8163975 setvar 0x8009, 0 setvar 0x8008, 42 - bufferitem 0, 0x8008 - jump Route113_GlassWorkshop_EventScript_1639B1 + getitemname 0, 0x8008 + goto Route113_GlassWorkshop_EventScript_1639B1 end Route113_GlassWorkshop_EventScript_163989:: @ 8163989 setvar 0x8009, 1 setvar 0x8008, 13 - bufferdecor 0, 13 - jump Route113_GlassWorkshop_EventScript_1639B1 + getdecorname 0, 13 + goto Route113_GlassWorkshop_EventScript_1639B1 end Route113_GlassWorkshop_EventScript_16399D:: @ 816399D setvar 0x8009, 1 setvar 0x8008, 6 - bufferdecor 0, 6 - jump Route113_GlassWorkshop_EventScript_1639B1 + getdecorname 0, 6 + goto Route113_GlassWorkshop_EventScript_1639B1 end Route113_GlassWorkshop_EventScript_1639B1:: @ 81639B1 msgbox Route113_GlassWorkshop_Text_19E9D7, 4 compare 0x8009, 0 - callif 1, Route113_GlassWorkshop_EventScript_163889 + call_if 1, Route113_GlassWorkshop_EventScript_163889 compare 0x8009, 1 - callif 1, Route113_GlassWorkshop_EventScript_1638A1 + call_if 1, Route113_GlassWorkshop_EventScript_1638A1 setvar 0x40be, 2 release end diff --git a/data/scripts/maps/Route114.inc b/data/scripts/maps/Route114.inc index cfe1dfe7d..0730db23a 100644 --- a/data/scripts/maps/Route114.inc +++ b/data/scripts/maps/Route114.inc @@ -4,16 +4,16 @@ Route114_MapScripts:: @ 8150732 Route114_EventScript_150733:: @ 8150733 lock faceplayer - checkdailyflags + dodailyevents checkflag 2251 - jumpeq Route114_EventScript_150778 + goto_if_eq Route114_EventScript_150778 msgbox Route114_Text_1C5803, 4 random 5 addvar RESULT, 15 addvar RESULT, 133 giveitem RESULT compare RESULT, 0 - jumpeq Route114_EventScript_1A029B + goto_if_eq Route114_EventScript_1A029B setflag 2251 msgbox Route114_Text_1C5861, 4 release @@ -28,11 +28,11 @@ Route114_EventScript_150782:: @ 8150782 lock faceplayer checkflag 231 - jumpeq Route114_EventScript_1507B9 + goto_if_eq Route114_EventScript_1507B9 msgbox Route114_Text_170154, 4 giveitem ITEM_TM05 compare RESULT, 0 - jumpeq Route114_EventScript_1A029B + goto_if_eq Route114_EventScript_1A029B setflag 231 msgbox Route114_Text_1701C5, 4 release @@ -46,8 +46,8 @@ Route114_EventScript_1507B9:: @ 81507B9 Route114_EventScript_1507C3:: @ 81507C3 lock faceplayer - checksound - pokecry SPECIES_POOCHYENA, 2 + waitse + playpokecry SPECIES_POOCHYENA, 2 msgbox Route114_Text_1701F9, 4 waitpokecry release @@ -87,9 +87,9 @@ Route114_EventScript_150836:: @ 8150836 Route114_EventScript_15084D:: @ 815084D trainerbattle 0, OPPONENT_STEVE_1, 0, Route114_Text_1BC2F5, Route114_Text_1BC327 - specialval RESULT, sub_8082C68 + specialvar RESULT, sub_8082C68 compare RESULT, 1 - jumpeq Route114_EventScript_150874 + goto_if_eq Route114_EventScript_150874 msgbox Route114_Text_1BC337, 6 end @@ -100,9 +100,9 @@ Route114_EventScript_150874:: @ 8150874 Route114_EventScript_15088B:: @ 815088B trainerbattle 0, OPPONENT_BERNIE_1, 0, Route114_Text_1BC45A, Route114_Text_1BC499 - specialval RESULT, sub_8082C68 + specialvar RESULT, sub_8082C68 compare RESULT, 1 - jumpeq Route114_EventScript_1508B2 + goto_if_eq Route114_EventScript_1508B2 msgbox Route114_Text_1BC4B5, 6 end diff --git a/data/scripts/maps/Route114_FossilManiacsHouse.inc b/data/scripts/maps/Route114_FossilManiacsHouse.inc index 50305dc04..b217f24c4 100644 --- a/data/scripts/maps/Route114_FossilManiacsHouse.inc +++ b/data/scripts/maps/Route114_FossilManiacsHouse.inc @@ -10,11 +10,11 @@ Route114_FossilManiacsHouse_EventScript_15C1C3:: @ 815C1C3 lock faceplayer checkflag 261 - jumpeq Route114_FossilManiacsHouse_EventScript_15C1F2 + goto_if_eq Route114_FossilManiacsHouse_EventScript_15C1F2 msgbox Route114_FossilManiacsHouse_Text_1925E1, 4 giveitem ITEM_TM28 compare RESULT, 0 - jumpeq Route114_FossilManiacsHouse_EventScript_1A029B + goto_if_eq Route114_FossilManiacsHouse_EventScript_1A029B setflag 261 release end diff --git a/data/scripts/maps/Route114_FossilManiacsTunnel.inc b/data/scripts/maps/Route114_FossilManiacsTunnel.inc index 7986a0436..13843f758 100644 --- a/data/scripts/maps/Route114_FossilManiacsTunnel.inc +++ b/data/scripts/maps/Route114_FossilManiacsTunnel.inc @@ -5,13 +5,13 @@ Route114_FossilManiacsTunnel_EventScript_15C20F:: @ 815C20F lock faceplayer checkflag 267 - jumpeq Route114_FossilManiacsTunnel_EventScript_15C24E + goto_if_eq Route114_FossilManiacsTunnel_EventScript_15C24E checkitem ITEM_ROOT_FOSSIL, 1 compare RESULT, 1 - jumpeq Route114_FossilManiacsTunnel_EventScript_15C244 + goto_if_eq Route114_FossilManiacsTunnel_EventScript_15C244 checkitem ITEM_CLAW_FOSSIL, 1 compare RESULT, 1 - jumpeq Route114_FossilManiacsTunnel_EventScript_15C244 + goto_if_eq Route114_FossilManiacsTunnel_EventScript_15C244 msgbox Route114_FossilManiacsTunnel_Text_192795, 4 release end diff --git a/data/scripts/maps/Route114_LanettesHouse.inc b/data/scripts/maps/Route114_LanettesHouse.inc index ff8a1c565..e4334647c 100644 --- a/data/scripts/maps/Route114_LanettesHouse.inc +++ b/data/scripts/maps/Route114_LanettesHouse.inc @@ -10,7 +10,7 @@ Route114_LanettesHouse_EventScript_15C262:: @ 815C262 lock faceplayer checkflag 131 - jumpeq Route114_LanettesHouse_EventScript_15C28F + goto_if_eq Route114_LanettesHouse_EventScript_15C28F setflag 2123 msgbox Route114_LanettesHouse_Text_192A0D, 4 .ifdef SAPPHIRE @@ -19,7 +19,7 @@ Route114_LanettesHouse_EventScript_15C262:: @ 815C262 givedecoration 100 .endif compare RESULT, 0 - jumpeq Route114_LanettesHouse_EventScript_1A02AE + goto_if_eq Route114_LanettesHouse_EventScript_1A02AE setflag 131 release end @@ -33,7 +33,7 @@ Route114_LanettesHouse_EventScript_15C299:: @ 815C299 lockall msgbox Route114_LanettesHouse_Text_192B4A, 5 compare RESULT, 1 - jumpeq Route114_LanettesHouse_EventScript_15C2B7 + goto_if_eq Route114_LanettesHouse_EventScript_15C2B7 msgbox Route114_LanettesHouse_Text_192DA9, 4 releaseall end @@ -41,7 +41,7 @@ Route114_LanettesHouse_EventScript_15C299:: @ 815C299 Route114_LanettesHouse_EventScript_15C2B7:: @ 815C2B7 msgbox Route114_LanettesHouse_Text_192C01, 5 compare RESULT, 1 - callif 1, Route114_LanettesHouse_EventScript_15C2CC + call_if 1, Route114_LanettesHouse_EventScript_15C2CC releaseall end diff --git a/data/scripts/maps/Route115.inc b/data/scripts/maps/Route115.inc index 2b0d744ca..8e0eb7855 100644 --- a/data/scripts/maps/Route115.inc +++ b/data/scripts/maps/Route115.inc @@ -15,9 +15,9 @@ Route115_EventScript_150940:: @ 8150940 Route115_EventScript_150949:: @ 8150949 trainerbattle 0, OPPONENT_TIMOTHY_1, 0, Route115_Text_1BC9AC, Route115_Text_1BC9E6 - specialval RESULT, sub_8082C68 + specialvar RESULT, sub_8082C68 compare RESULT, 1 - jumpeq Route115_EventScript_150970 + goto_if_eq Route115_EventScript_150970 msgbox Route115_Text_1BCA0E, 6 end @@ -33,9 +33,9 @@ Route115_EventScript_150987:: @ 8150987 Route115_EventScript_15099E:: @ 815099E trainerbattle 0, OPPONENT_NOB_1, 0, Route115_Text_1BCB8A, Route115_Text_1BCBC1 - specialval RESULT, sub_8082C68 + specialvar RESULT, sub_8082C68 compare RESULT, 1 - jumpeq Route115_EventScript_1509C5 + goto_if_eq Route115_EventScript_1509C5 msgbox Route115_Text_1BCBDE, 6 end @@ -46,9 +46,9 @@ Route115_EventScript_1509C5:: @ 81509C5 Route115_EventScript_1509DC:: @ 81509DC trainerbattle 0, OPPONENT_CYNDY_1, 0, Route115_Text_1BCCF4, Route115_Text_1BCD32 - specialval RESULT, sub_8082C68 + specialvar RESULT, sub_8082C68 compare RESULT, 1 - jumpeq Route115_EventScript_150A03 + goto_if_eq Route115_EventScript_150A03 msgbox Route115_Text_1BCD4C, 6 end diff --git a/data/scripts/maps/Route116.inc b/data/scripts/maps/Route116.inc index f5ef82f8b..beb01e083 100644 --- a/data/scripts/maps/Route116.inc +++ b/data/scripts/maps/Route116.inc @@ -4,20 +4,20 @@ Route116_MapScripts:: @ 8150A31 Route116_MapScript1_150A37:: @ 8150A37 checkflag 143 - callif 1, Route116_EventScript_150A41 + call_if 1, Route116_EventScript_150A41 end Route116_EventScript_150A41:: @ 8150A41 - movespriteperm 21, 41, 10 + setobjectxyperm 21, 41, 10 return Route116_EventScript_150A49:: @ 8150A49 lock faceplayer checkflag 143 - jumpeq Route116_EventScript_150A67 + goto_if_eq Route116_EventScript_150A67 checkflag 142 - jumpeq Route116_EventScript_150A71 + goto_if_eq Route116_EventScript_150A71 msgbox Route116_Text_1703CF, 4 release end @@ -36,45 +36,45 @@ Route116_EventScript_150A7B:: @ 8150A7B lock faceplayer checkflag 287 - jumpeq Route116_EventScript_150B04 + goto_if_eq Route116_EventScript_150B04 msgbox Route116_Text_1705AE, 4 - jump Route116_EventScript_150A94 + goto Route116_EventScript_150A94 end Route116_EventScript_150A94:: @ 8150A94 setflag 287 giveitem ITEM_REPEAT_BALL compare RESULT, 0 - jumpeq Route116_EventScript_150B12 + goto_if_eq Route116_EventScript_150B12 msgbox Route116_Text_1707B8, 4 - closebutton + closemessage compare FACING, 2 - callif 1, Route116_EventScript_150AEE + call_if 1, Route116_EventScript_150AEE compare FACING, 1 - callif 1, Route116_EventScript_150AEE + call_if 1, Route116_EventScript_150AEE compare FACING, 3 - callif 1, Route116_EventScript_150AEE + call_if 1, Route116_EventScript_150AEE compare FACING, 4 - callif 1, Route116_EventScript_150AF9 - disappear LAST_TALKED + call_if 1, Route116_EventScript_150AF9 + removeobject LAST_TALKED clearflag 949 setflag 256 release end Route116_EventScript_150AEE:: @ 8150AEE - move LAST_TALKED, Route116_Movement_150B1C - waitmove 0 + applymovement LAST_TALKED, Route116_Movement_150B1C + waitmovement 0 return Route116_EventScript_150AF9:: @ 8150AF9 - move LAST_TALKED, Route116_Movement_150B25 - waitmove 0 + applymovement LAST_TALKED, Route116_Movement_150B25 + waitmovement 0 return Route116_EventScript_150B04:: @ 8150B04 msgbox Route116_Text_170865, 4 - jump Route116_EventScript_150A94 + goto Route116_EventScript_150A94 end Route116_EventScript_150B12:: @ 8150B12 @@ -136,9 +136,9 @@ Route116_EventScript_150B5D:: @ 8150B5D Route116_EventScript_150B6E:: @ 8150B6E lockall - move 11, Route116_Movement_1A0843 - move 255, Route116_Movement_1A083F - waitmove 0 + applymovement 11, Route116_Movement_1A0843 + applymovement 255, Route116_Movement_1A083F + waitmovement 0 msgbox Route116_Text_17032A, 4 setvar 0x406f, 2 releaseall @@ -149,58 +149,58 @@ Route116_EventScript_150B8F:: @ 8150B8F faceplayer checkitem ITEM_BLACK_GLASSES, 1 compare RESULT, 1 - jumpeq Route116_EventScript_150BCA - specialval RESULT, sub_810F828 + goto_if_eq Route116_EventScript_150BCA + specialvar RESULT, sub_810F828 compare RESULT, 1 - jumpeq Route116_EventScript_150BBB + goto_if_eq Route116_EventScript_150BBB msgbox Route116_Text_1708EE, 4 release end Route116_EventScript_150BBB:: @ 8150BBB msgbox Route116_Text_1709B7, 4 - closebutton - jump Route116_EventScript_150C03 + closemessage + goto Route116_EventScript_150C03 end Route116_EventScript_150BCA:: @ 8150BCA msgbox Route116_Text_1708EE, 4 msgbox Route116_Text_170921, 4 - specialval RESULT, sub_810F828 + specialvar RESULT, sub_810F828 compare RESULT, 1 - jumpeq Route116_EventScript_150BF4 + goto_if_eq Route116_EventScript_150BF4 msgbox Route116_Text_170A03, 4 release end Route116_EventScript_150BF4:: @ 8150BF4 msgbox Route116_Text_17094D, 4 - closebutton - jump Route116_EventScript_150C03 + closemessage + goto Route116_EventScript_150C03 end Route116_EventScript_150C03:: @ 8150C03 - pause 20 + delay 20 compare FACING, 2 - callif 1, Route116_EventScript_150C37 + call_if 1, Route116_EventScript_150C37 compare FACING, 1 - callif 1, Route116_EventScript_150C37 + call_if 1, Route116_EventScript_150C37 compare FACING, 3 - callif 1, Route116_EventScript_150C37 + call_if 1, Route116_EventScript_150C37 compare FACING, 4 - callif 1, Route116_EventScript_150C42 - disappear LAST_TALKED + call_if 1, Route116_EventScript_150C42 + removeobject LAST_TALKED release end Route116_EventScript_150C37:: @ 8150C37 - move LAST_TALKED, Route116_Movement_150C4D - waitmove 0 + applymovement LAST_TALKED, Route116_Movement_150C4D + waitmovement 0 return Route116_EventScript_150C42:: @ 8150C42 - move LAST_TALKED, Route116_Movement_150C57 - waitmove 0 + applymovement LAST_TALKED, Route116_Movement_150C57 + waitmovement 0 return Route116_Movement_150C4D:: @ 8150C4D @@ -240,9 +240,9 @@ Route116_EventScript_150C79:: @ 8150C79 Route116_EventScript_150C90:: @ 8150C90 trainerbattle 0, OPPONENT_JERRY_1, 0, Route116_Text_1BD1C0, Route116_Text_1BD21A - specialval RESULT, sub_8082C68 + specialvar RESULT, sub_8082C68 compare RESULT, 1 - jumpeq Route116_EventScript_150CB7 + goto_if_eq Route116_EventScript_150CB7 msgbox Route116_Text_1BD248, 6 end @@ -263,9 +263,9 @@ Route116_EventScript_150CE5:: @ 8150CE5 Route116_EventScript_150CFC:: @ 8150CFC trainerbattle 0, OPPONENT_KAREN_1, 0, Route116_Text_1BD377, Route116_Text_1BD3AC - specialval RESULT, sub_8082C68 + specialvar RESULT, sub_8082C68 compare RESULT, 1 - jumpeq Route116_EventScript_150D23 + goto_if_eq Route116_EventScript_150D23 msgbox Route116_Text_1BD3C3, 6 end diff --git a/data/scripts/maps/Route116_TunnelersRestHouse.inc b/data/scripts/maps/Route116_TunnelersRestHouse.inc index d141fae37..10991c38c 100644 --- a/data/scripts/maps/Route116_TunnelersRestHouse.inc +++ b/data/scripts/maps/Route116_TunnelersRestHouse.inc @@ -18,7 +18,7 @@ Route116_TunnelersRestHouse_EventScript_15C2FA:: @ 815C2FA lock faceplayer checkflag 199 - jumpeq Route116_TunnelersRestHouse_EventScript_15C30F + goto_if_eq Route116_TunnelersRestHouse_EventScript_15C30F msgbox Route116_TunnelersRestHouse_Text_193135, 4 release end diff --git a/data/scripts/maps/Route117.inc b/data/scripts/maps/Route117.inc index 61dbf6a30..40affd3fd 100644 --- a/data/scripts/maps/Route117.inc +++ b/data/scripts/maps/Route117.inc @@ -8,8 +8,8 @@ Route117_MapScript1_150D40:: @ 8150D40 Route117_EventScript_150D46:: @ 8150D46 checkflag 134 - jumpif 0, Route117_EventScript_150D56 - movespriteperm 3, 47, 6 + goto_if 0, Route117_EventScript_150D56 + setobjectxyperm 3, 47, 6 Route117_EventScript_150D56:: @ 8150D56 return @@ -40,9 +40,9 @@ Route117_EventScript_150D84:: @ 8150D84 Route117_EventScript_150D8D:: @ 8150D8D trainerbattle 0, OPPONENT_ISAAC_1, 0, Route117_Text_1BD49E, Route117_Text_1BD4D9 - specialval RESULT, sub_8082C68 + specialvar RESULT, sub_8082C68 compare RESULT, 1 - jumpeq Route117_EventScript_150DB4 + goto_if_eq Route117_EventScript_150DB4 msgbox Route117_Text_1BD4F9, 6 end @@ -53,9 +53,9 @@ Route117_EventScript_150DB4:: @ 8150DB4 Route117_EventScript_150DCB:: @ 8150DCB trainerbattle 0, OPPONENT_LYDIA_1, 0, Route117_Text_1BD634, Route117_Text_1BD67B - specialval RESULT, sub_8082C68 + specialvar RESULT, sub_8082C68 compare RESULT, 1 - jumpeq Route117_EventScript_150DF2 + goto_if_eq Route117_EventScript_150DF2 msgbox Route117_Text_1BD69B, 6 end @@ -66,9 +66,9 @@ Route117_EventScript_150DF2:: @ 8150DF2 Route117_EventScript_150E09:: @ 8150E09 trainerbattle 0, OPPONENT_DYLAN_1, 0, Route117_Text_1BD79A, Route117_Text_1BD7E0 - specialval RESULT, sub_8082C68 + specialvar RESULT, sub_8082C68 compare RESULT, 1 - jumpeq Route117_EventScript_150E30 + goto_if_eq Route117_EventScript_150E30 msgbox Route117_Text_1BD7F5, 6 end @@ -79,9 +79,9 @@ Route117_EventScript_150E30:: @ 8150E30 Route117_EventScript_150E47:: @ 8150E47 trainerbattle 0, OPPONENT_MARIA_1, 0, Route117_Text_1BD914, Route117_Text_1BD965 - specialval RESULT, sub_8082C68 + specialvar RESULT, sub_8082C68 compare RESULT, 1 - jumpeq Route117_EventScript_150E6E + goto_if_eq Route117_EventScript_150E6E msgbox Route117_Text_1BD98F, 6 end @@ -97,9 +97,9 @@ Route117_EventScript_150E85:: @ 8150E85 Route117_EventScript_150E9C:: @ 8150E9C trainerbattle 4, OPPONENT_ANNA_AND_MEG_1, 0, Route117_Text_1BDBC3, Route117_Text_1BDC07, Route117_Text_1BDC96 - specialval RESULT, sub_8082C68 + specialvar RESULT, sub_8082C68 compare RESULT, 1 - jumpeq Route117_EventScript_150EC7 + goto_if_eq Route117_EventScript_150EC7 msgbox Route117_Text_1BDC44, 6 end @@ -110,9 +110,9 @@ Route117_EventScript_150EC7:: @ 8150EC7 Route117_EventScript_150EE2:: @ 8150EE2 trainerbattle 4, OPPONENT_ANNA_AND_MEG_1, 0, Route117_Text_1BDCD2, Route117_Text_1BDD1E, Route117_Text_1BDD8B - specialval RESULT, sub_8082C68 + specialvar RESULT, sub_8082C68 compare RESULT, 1 - jumpeq Route117_EventScript_150F0D + goto_if_eq Route117_EventScript_150F0D msgbox Route117_Text_1BDD4E, 6 end diff --git a/data/scripts/maps/Route118.inc b/data/scripts/maps/Route118.inc index 0b5b4748e..b96346f15 100644 --- a/data/scripts/maps/Route118.inc +++ b/data/scripts/maps/Route118.inc @@ -10,12 +10,12 @@ Route118_EventScript_150F34:: @ 8150F34 lock faceplayer checkflag 227 - jumpeq Route118_EventScript_150F89 + goto_if_eq Route118_EventScript_150F89 msgbox Route118_Text_170F12, 5 compare RESULT, 1 - jumpeq Route118_EventScript_150F5E + goto_if_eq Route118_EventScript_150F5E compare RESULT, 0 - jumpeq Route118_EventScript_150F7F + goto_if_eq Route118_EventScript_150F7F end Route118_EventScript_150F5E:: @ 8150F5E @@ -51,62 +51,62 @@ Route118_EventScript_150FA5:: @ 8150FA5 Route118_EventScript_150FAE:: @ 8150FAE lockall setvar 0x8008, 0 - move 255, Route118_Movement_1A0841 - waitmove 0 - move 19, Route118_Movement_151069 - waitmove 0 - jump Route118_EventScript_151004 + applymovement 255, Route118_Movement_1A0841 + waitmovement 0 + applymovement 19, Route118_Movement_151069 + waitmovement 0 + goto Route118_EventScript_151004 end Route118_EventScript_150FCE:: @ 8150FCE lockall setvar 0x8008, 1 - move 255, Route118_Movement_1A0841 - waitmove 0 - jump Route118_EventScript_151004 + applymovement 255, Route118_Movement_1A0841 + waitmovement 0 + goto Route118_EventScript_151004 end Route118_EventScript_150FE4:: @ 8150FE4 lockall setvar 0x8008, 2 - move 255, Route118_Movement_1A0841 - waitmove 0 - move 19, Route118_Movement_15106B - waitmove 0 - jump Route118_EventScript_151004 + applymovement 255, Route118_Movement_1A0841 + waitmovement 0 + applymovement 19, Route118_Movement_15106B + waitmovement 0 + goto Route118_EventScript_151004 end Route118_EventScript_151004:: @ 8151004 - playsfx 10 - move 19, Route118_Movement_15106D - waitmove 0 - pause 30 + playse 10 + applymovement 19, Route118_Movement_15106D + waitmovement 0 + delay 30 msgbox Route118_Text_170D66, 4 - closebutton + closemessage compare 0x8008, 0 - callif 1, Route118_EventScript_151048 + call_if 1, Route118_EventScript_151048 compare 0x8008, 1 - callif 1, Route118_EventScript_151053 + call_if 1, Route118_EventScript_151053 compare 0x8008, 2 - callif 1, Route118_EventScript_15105E + call_if 1, Route118_EventScript_15105E setvar 0x4071, 1 - disappear 19 + removeobject 19 releaseall end Route118_EventScript_151048:: @ 8151048 - move 19, Route118_Movement_151071 - waitmove 0 + applymovement 19, Route118_Movement_151071 + waitmovement 0 return Route118_EventScript_151053:: @ 8151053 - move 19, Route118_Movement_15107C - waitmove 0 + applymovement 19, Route118_Movement_15107C + waitmovement 0 return Route118_EventScript_15105E:: @ 815105E - move 19, Route118_Movement_151086 - waitmove 0 + applymovement 19, Route118_Movement_151086 + waitmovement 0 return Route118_Movement_151069:: @ 8151069 @@ -161,9 +161,9 @@ Route118_Movement_151086:: @ 8151086 Route118_EventScript_15108F:: @ 815108F trainerbattle 0, OPPONENT_ROSE_1, 0, Route118_Text_1BDFF4, Route118_Text_1BE03C - specialval RESULT, sub_8082C68 + specialvar RESULT, sub_8082C68 compare RESULT, 1 - jumpeq Route118_EventScript_1510B6 + goto_if_eq Route118_EventScript_1510B6 msgbox Route118_Text_1BE05E, 6 end @@ -184,9 +184,9 @@ Route118_EventScript_1510E4:: @ 81510E4 Route118_EventScript_1510FB:: @ 81510FB trainerbattle 0, OPPONENT_DALTON_1, 0, Route118_Text_1BE3E8, Route118_Text_1BE406 - specialval RESULT, sub_8082C68 + specialvar RESULT, sub_8082C68 compare RESULT, 1 - jumpeq Route118_EventScript_151122 + goto_if_eq Route118_EventScript_151122 msgbox Route118_Text_1BE413, 6 end diff --git a/data/scripts/maps/Route119.inc b/data/scripts/maps/Route119.inc index 55a3fb1dc..2179a7e18 100644 --- a/data/scripts/maps/Route119.inc +++ b/data/scripts/maps/Route119.inc @@ -5,22 +5,22 @@ Route119_MapScripts:: @ 8151167 Route119_MapScript1_151172:: @ 8151172 checkflag 2145 - callif 1, Route119_EventScript_15117C + call_if 1, Route119_EventScript_15117C end Route119_EventScript_15117C:: @ 815117C compare 0x8004, 6 - callif 1, Route119_EventScript_151193 + call_if 1, Route119_EventScript_151193 compare 0x8004, 7 - callif 1, Route119_EventScript_151197 + call_if 1, Route119_EventScript_151197 return Route119_EventScript_151193:: @ 8151193 - disappear 35 + removeobject 35 return Route119_EventScript_151197:: @ 8151197 - disappear 36 + removeobject 36 return Route119_MapScript1_15119B:: @ 815119B @@ -28,7 +28,7 @@ Route119_MapScript1_15119B:: @ 815119B call Route119_EventScript_1A0172 call Route119_EventScript_1A0196 compare 0x40b3, 1 - callif 1, Route119_EventScript_1511B9 + call_if 1, Route119_EventScript_1511B9 special SetRoute119Weather end @@ -40,51 +40,51 @@ Route119_EventScript_1511B9:: @ 81511B9 Route119_EventScript_1511C5:: @ 81511C5 setvar 0x4001, 1 - jump Route119_EventScript_1511DB + goto Route119_EventScript_1511DB end Route119_EventScript_1511D0:: @ 81511D0 setvar 0x4001, 2 - jump Route119_EventScript_1511DB + goto Route119_EventScript_1511DB end Route119_EventScript_1511DB:: @ 81511DB lockall - reappear 25 - checkgender + addobject 25 + checkplayergender compare RESULT, 0 - callif 1, Route119_EventScript_151254 + call_if 1, Route119_EventScript_151254 compare RESULT, 1 - callif 1, Route119_EventScript_151259 - pause 65 + call_if 1, Route119_EventScript_151259 + delay 65 compare 0x4001, 1 - callif 1, Route119_EventScript_1513A6 + call_if 1, Route119_EventScript_1513A6 compare 0x4001, 2 - callif 1, Route119_EventScript_1513B1 - move 255, Route119_Movement_1A0845 - waitmove 0 - pause 30 + call_if 1, Route119_EventScript_1513B1 + applymovement 255, Route119_Movement_1A0845 + waitmovement 0 + delay 30 compare 0x4001, 1 - callif 1, Route119_EventScript_1513D2 + call_if 1, Route119_EventScript_1513D2 compare 0x4001, 2 - callif 1, Route119_EventScript_1513E1 - disappear 25 - reappear 16 - pause 30 - checkgender + call_if 1, Route119_EventScript_1513E1 + removeobject 25 + addobject 16 + delay 30 + checkplayergender compare RESULT, 0 - jumpeq Route119_EventScript_15125E + goto_if_eq Route119_EventScript_15125E compare RESULT, 1 - jumpeq Route119_EventScript_1512D8 + goto_if_eq Route119_EventScript_1512D8 releaseall end Route119_EventScript_151254:: @ 8151254 - playmusic 415, 1 + playbgm 415, 1 return Route119_EventScript_151259:: @ 8151259 - playmusic 421, 1 + playbgm 421, 1 return Route119_EventScript_15125E:: @ 815125E @@ -97,24 +97,24 @@ Route119_EventScript_15125E:: @ 815125E Route119_EventScript_15128D:: @ 815128D trainerbattle 3, OPPONENT_MAY_6, 0, Route119_Text_171156 - jump Route119_EventScript_1512BD + goto Route119_EventScript_1512BD end Route119_EventScript_15129D:: @ 815129D trainerbattle 3, OPPONENT_MAY_9, 0, Route119_Text_171156 - jump Route119_EventScript_1512BD + goto Route119_EventScript_1512BD end Route119_EventScript_1512AD:: @ 81512AD trainerbattle 3, OPPONENT_MAY_3, 0, Route119_Text_171156 - jump Route119_EventScript_1512BD + goto Route119_EventScript_1512BD end Route119_EventScript_1512BD:: @ 81512BD msgbox Route119_Text_1711B1, 4 call Route119_EventScript_151352 msgbox Route119_Text_171214, 4 - jump Route119_EventScript_151362 + goto Route119_EventScript_151362 end Route119_EventScript_1512D8:: @ 81512D8 @@ -127,24 +127,24 @@ Route119_EventScript_1512D8:: @ 81512D8 Route119_EventScript_151307:: @ 8151307 trainerbattle 3, OPPONENT_BRENDAN_6, 0, Route119_Text_1713E2 - jump Route119_EventScript_151337 + goto Route119_EventScript_151337 end Route119_EventScript_151317:: @ 8151317 trainerbattle 3, OPPONENT_BRENDAN_9, 0, Route119_Text_1713E2 - jump Route119_EventScript_151337 + goto Route119_EventScript_151337 end Route119_EventScript_151327:: @ 8151327 trainerbattle 3, OPPONENT_BRENDAN_3, 0, Route119_Text_1713E2 - jump Route119_EventScript_151337 + goto Route119_EventScript_151337 end Route119_EventScript_151337:: @ 8151337 msgbox Route119_Text_17140B, 4 call Route119_EventScript_151352 msgbox Route119_Text_171475, 4 - jump Route119_EventScript_151362 + goto Route119_EventScript_151362 end Route119_EventScript_151352:: @ 8151352 @@ -153,53 +153,53 @@ Route119_EventScript_151352:: @ 8151352 return Route119_EventScript_151362:: @ 8151362 - closebutton + closemessage compare 0x4001, 1 - callif 1, Route119_EventScript_1513D2 + call_if 1, Route119_EventScript_1513D2 compare 0x4001, 2 - callif 1, Route119_EventScript_1513E1 - disappear 16 - reappear 25 - pause 30 + call_if 1, Route119_EventScript_1513E1 + removeobject 16 + addobject 25 + delay 30 compare 0x4001, 1 - callif 1, Route119_EventScript_1513BC + call_if 1, Route119_EventScript_1513BC compare 0x4001, 2 - callif 1, Route119_EventScript_1513C7 - disappear 25 + call_if 1, Route119_EventScript_1513C7 + removeobject 25 setvar 0x4072, 1 - playmusicbattle 0 - fadedefault + savebgm 0 + fadedefaultbgm releaseall end Route119_EventScript_1513A6:: @ 81513A6 - move 25, Route119_Movement_1513F0 - waitmove 0 + applymovement 25, Route119_Movement_1513F0 + waitmovement 0 return Route119_EventScript_1513B1:: @ 81513B1 - move 25, Route119_Movement_1513FA - waitmove 0 + applymovement 25, Route119_Movement_1513FA + waitmovement 0 return Route119_EventScript_1513BC:: @ 81513BC - move 25, Route119_Movement_151405 - waitmove 0 + applymovement 25, Route119_Movement_151405 + waitmovement 0 return Route119_EventScript_1513C7:: @ 81513C7 - move 25, Route119_Movement_15140F - waitmove 0 + applymovement 25, Route119_Movement_15140F + waitmovement 0 return Route119_EventScript_1513D2:: @ 81513D2 - movespriteperm 16, 25, 32 - movespriteperm 25, 25, 32 + setobjectxyperm 16, 25, 32 + setobjectxyperm 25, 25, 32 return Route119_EventScript_1513E1:: @ 81513E1 - movespriteperm 16, 26, 32 - movespriteperm 25, 26, 32 + setobjectxyperm 16, 26, 32 + setobjectxyperm 25, 26, 32 return Route119_Movement_1513F0:: @ 81513F0 @@ -296,9 +296,9 @@ Route119_EventScript_1514A8:: @ 81514A8 Route119_EventScript_1514BF:: @ 81514BF trainerbattle 0, OPPONENT_JACKSON_1, 0, Route119_Text_1BE8BB, Route119_Text_1BE90E - specialval RESULT, sub_8082C68 + specialvar RESULT, sub_8082C68 compare RESULT, 1 - jumpeq Route119_EventScript_1514E6 + goto_if_eq Route119_EventScript_1514E6 msgbox Route119_Text_1BE937, 6 end @@ -309,9 +309,9 @@ Route119_EventScript_1514E6:: @ 81514E6 Route119_EventScript_1514FD:: @ 81514FD trainerbattle 0, OPPONENT_CATHERINE_1, 0, Route119_Text_1BEA3A, Route119_Text_1BEA88 - specialval RESULT, sub_8082C68 + specialvar RESULT, sub_8082C68 compare RESULT, 1 - jumpeq Route119_EventScript_151524 + goto_if_eq Route119_EventScript_151524 msgbox Route119_Text_1BEAB3, 6 end @@ -354,9 +354,9 @@ Route119_EventScript_1515C5:: @ 81515C5 lock faceplayer msgbox Route119_Text_171520, 4 - closebutton - move LAST_TALKED, Route119_Movement_1A083D - waitmove 0 + closemessage + applymovement LAST_TALKED, Route119_Movement_1A083D + waitmovement 0 release end @@ -364,9 +364,9 @@ Route119_EventScript_1515DC:: @ 81515DC lock faceplayer msgbox Route119_Text_17157C, 4 - closebutton - move LAST_TALKED, Route119_Movement_1A083D - waitmove 0 + closemessage + applymovement LAST_TALKED, Route119_Movement_1A083D + waitmovement 0 release end diff --git a/data/scripts/maps/Route119_House.inc b/data/scripts/maps/Route119_House.inc index 6395e40eb..42cc89068 100644 --- a/data/scripts/maps/Route119_House.inc +++ b/data/scripts/maps/Route119_House.inc @@ -8,8 +8,8 @@ Route119_House_EventScript_163DDE:: @ 8163DDE Route119_House_EventScript_163DE7:: @ 8163DE7 lock faceplayer - checksound - pokecry SPECIES_WINGULL, 0 + waitse + playpokecry SPECIES_WINGULL, 0 msgbox Route119_House_Text_19F406, 4 waitpokecry release diff --git a/data/scripts/maps/Route119_WeatherInstitute_1F.inc b/data/scripts/maps/Route119_WeatherInstitute_1F.inc index 95ec39d61..3dc9672e3 100644 --- a/data/scripts/maps/Route119_WeatherInstitute_1F.inc +++ b/data/scripts/maps/Route119_WeatherInstitute_1F.inc @@ -5,12 +5,12 @@ Route119_WeatherInstitute_1F_MapScripts:: @ 8163C2A Route119_WeatherInstitute_1F_MapScript1_163C30:: @ 8163C30 call Route119_WeatherInstitute_1F_EventScript_1A0196 compare 0x40b3, 0 - callif 1, Route119_WeatherInstitute_1F_EventScript_163C41 + call_if 1, Route119_WeatherInstitute_1F_EventScript_163C41 end Route119_WeatherInstitute_1F_EventScript_163C41:: @ 8163C41 - movespriteperm 5, 0, 5 - spritebehave 5, 10 + setobjectxyperm 5, 0, 5 + setobjectmovementtype 5, 10 return Route119_WeatherInstitute_1F_EventScript_163C4D:: @ 8163C4D @@ -18,7 +18,7 @@ Route119_WeatherInstitute_1F_EventScript_163C4D:: @ 8163C4D faceplayer special GetPlayerBigGuyGirlString compare 0x40b3, 0 - jumpeq Route119_WeatherInstitute_1F_EventScript_163C67 + goto_if_eq Route119_WeatherInstitute_1F_EventScript_163C67 msgbox Route119_WeatherInstitute_1F_Text_19ED22, 4 release end @@ -39,7 +39,7 @@ Route119_WeatherInstitute_1F_EventScript_163C7A:: @ 8163C7A Route119_WeatherInstitute_1F_EventScript_163C83:: @ 8163C83 lockall msgbox Route119_WeatherInstitute_1F_Text_19EE8B, 4 - closebutton + closemessage call Route119_WeatherInstitute_1F_EventScript_1A02CA releaseall end diff --git a/data/scripts/maps/Route119_WeatherInstitute_2F.inc b/data/scripts/maps/Route119_WeatherInstitute_2F.inc index 37f8e9ec6..ac64904a2 100644 --- a/data/scripts/maps/Route119_WeatherInstitute_2F.inc +++ b/data/scripts/maps/Route119_WeatherInstitute_2F.inc @@ -5,19 +5,19 @@ Route119_WeatherInstitute_2F_MapScripts:: @ 8163CC2 Route119_WeatherInstitute_2F_MapScript1_163CC8:: @ 8163CC8 call Route119_WeatherInstitute_2F_EventScript_1A0196 compare 0x40b3, 0 - callif 1, Route119_WeatherInstitute_2F_EventScript_163CE4 + call_if 1, Route119_WeatherInstitute_2F_EventScript_163CE4 compare 0x40b3, 1 - callif 1, Route119_WeatherInstitute_2F_EventScript_163CF0 + call_if 1, Route119_WeatherInstitute_2F_EventScript_163CF0 end Route119_WeatherInstitute_2F_EventScript_163CE4:: @ 8163CE4 - movespriteperm 5, 1, 6 - spritebehave 5, 10 + setobjectxyperm 5, 1, 6 + setobjectmovementtype 5, 10 return Route119_WeatherInstitute_2F_EventScript_163CF0:: @ 8163CF0 - movespriteperm 5, 4, 6 - spritebehave 5, 10 + setobjectxyperm 5, 4, 6 + setobjectmovementtype 5, 10 return Route119_WeatherInstitute_2F_EventScript_163CFC:: @ 8163CFC @@ -37,32 +37,32 @@ Route119_WeatherInstitute_2F_EventScript_163D2A:: @ 8163D2A Route119_WeatherInstitute_2F_EventScript_163D45:: @ 8163D45 msgbox Route119_WeatherInstitute_2F_Text_19F11B, 4 - closebutton + closemessage setvar 0x40b3, 1 clearflag 893 - fadedefault + fadedefaultbgm fadescreen 1 setflag 890 - disappear 1 - disappear 2 - disappear 3 + removeobject 1 + removeobject 2 + removeobject 3 fadescreen 0 - move 5, Route119_WeatherInstitute_2F_Movement_163DC8 - waitmove 0 - moveoffscreen 5 - jump Route119_WeatherInstitute_2F_EventScript_163D7A + applymovement 5, Route119_WeatherInstitute_2F_Movement_163DC8 + waitmovement 0 + moveobjectoffscreen 5 + goto Route119_WeatherInstitute_2F_EventScript_163D7A end Route119_WeatherInstitute_2F_EventScript_163D7A:: @ 8163D7A msgbox Route119_WeatherInstitute_2F_Text_19F1CF, 4 countpokemon compare RESULT, 6 - jumpeq Route119_WeatherInstitute_2F_EventScript_163DB4 - fanfare 370 + goto_if_eq Route119_WeatherInstitute_2F_EventScript_163DB4 + playfanfare 370 message Route119_WeatherInstitute_2F_Text_19F267 waitfanfare - waittext - givepokemon SPECIES_CASTFORM, 25, ITEM_MYSTIC_WATER, 0x0, 0x0, 0 + waitmessage + givepoke SPECIES_CASTFORM, 25, ITEM_MYSTIC_WATER, 0x0, 0x0, 0 setflag 151 msgbox Route119_WeatherInstitute_2F_Text_19F27D, 4 release @@ -88,6 +88,6 @@ Route119_WeatherInstitute_2F_EventScript_163DCC:: @ 8163DCC lock faceplayer checkflag 151 - jumpeq Route119_WeatherInstitute_2F_EventScript_163DBE - jump Route119_WeatherInstitute_2F_EventScript_163D7A + goto_if_eq Route119_WeatherInstitute_2F_EventScript_163DBE + goto Route119_WeatherInstitute_2F_EventScript_163D7A end diff --git a/data/scripts/maps/Route120.inc b/data/scripts/maps/Route120.inc index 75385fe8f..868d00324 100644 --- a/data/scripts/maps/Route120.inc +++ b/data/scripts/maps/Route120.inc @@ -6,56 +6,56 @@ Route120_MapScripts:: @ 815160E Route120_MapScript1_15161E:: @ 815161E checkflag 2145 - callif 1, Route120_EventScript_151628 + call_if 1, Route120_EventScript_151628 end Route120_EventScript_151628:: @ 8151628 compare 0x8004, 0 - callif 1, Route120_EventScript_15166B + call_if 1, Route120_EventScript_15166B compare 0x8004, 1 - callif 1, Route120_EventScript_151672 + call_if 1, Route120_EventScript_151672 compare 0x8004, 2 - callif 1, Route120_EventScript_151676 + call_if 1, Route120_EventScript_151676 compare 0x8004, 3 - callif 1, Route120_EventScript_15167A + call_if 1, Route120_EventScript_15167A compare 0x8004, 4 - callif 1, Route120_EventScript_15167E + call_if 1, Route120_EventScript_15167E compare 0x8004, 5 - callif 1, Route120_EventScript_151682 + call_if 1, Route120_EventScript_151682 return Route120_EventScript_15166B:: @ 815166B - disappear 30 - disappear 36 + removeobject 30 + removeobject 36 return Route120_EventScript_151672:: @ 8151672 - disappear 37 + removeobject 37 return Route120_EventScript_151676:: @ 8151676 - disappear 38 + removeobject 38 return Route120_EventScript_15167A:: @ 815167A - disappear 39 + removeobject 39 return Route120_EventScript_15167E:: @ 815167E - disappear 41 + removeobject 41 return Route120_EventScript_151682:: @ 8151682 - disappear 40 + removeobject 40 return Route120_MapScript1_151686:: @ 8151686 checkflag 228 - callif 0, Route120_EventScript_1516A2 + call_if 0, Route120_EventScript_1516A2 checkflag 285 - callif 1, Route120_EventScript_1516B5 + call_if 1, Route120_EventScript_1516B5 checkflag 285 - callif 0, Route120_EventScript_1516DA + call_if 0, Route120_EventScript_1516DA end Route120_EventScript_1516A2:: @ 81516A2 @@ -71,7 +71,7 @@ Route120_EventScript_1516B5:: @ 81516B5 return Route120_EventScript_1516DA:: @ 81516DA - spritebehave 36, 10 + setobjectmovementtype 36, 10 return Route120_MapScript1_1516DF:: @ 81516DF @@ -82,11 +82,11 @@ Route120_MapScript1_1516DF:: @ 81516DF Route120_EventScript_1516EA:: @ 81516EA getplayerxy 0x4000, 0x4001 compare 0x4001, 14 - jumpif 3, Route120_EventScript_151715 + goto_if 3, Route120_EventScript_151715 compare 0x4001, 60 - jumpif 3, Route120_EventScript_151719 + goto_if 3, Route120_EventScript_151719 compare 0x4001, 61 - jumpif 4, Route120_EventScript_151711 + goto_if 4, Route120_EventScript_151711 return Route120_EventScript_151711:: @ 8151711 @@ -99,10 +99,10 @@ Route120_EventScript_151715:: @ 8151715 Route120_EventScript_151719:: @ 8151719 compare 0x4000, 7 - jumpif 3, Route120_EventScript_151735 + goto_if 3, Route120_EventScript_151735 compare 0x4000, 19 - jumpif 3, Route120_EventScript_151715 - jump Route120_EventScript_151735 + goto_if 3, Route120_EventScript_151715 + goto Route120_EventScript_151735 end Route120_EventScript_151735:: @ 8151735 @@ -112,15 +112,15 @@ Route120_EventScript_151735:: @ 8151735 Route120_EventScript_151739:: @ 8151739 lock faceplayer - checkdailyflags + dodailyevents checkflag 2254 - jumpeq Route120_EventScript_151837 + goto_if_eq Route120_EventScript_151837 msgbox Route120_Text_1C58F1, 5 compare RESULT, 1 - callif 1, Route120_EventScript_151841 + call_if 1, Route120_EventScript_151841 compare RESULT, 0 - callif 1, Route120_EventScript_15184A - specialval RESULT, GetPlayerTrainerIdOnesDigit + call_if 1, Route120_EventScript_15184A + specialvar RESULT, GetPlayerTrainerIdOnesDigit switch RESULT case 0, Route120_EventScript_1517DC case 5, Route120_EventScript_1517DC @@ -136,33 +136,33 @@ Route120_EventScript_151739:: @ 8151739 Route120_EventScript_1517DC:: @ 81517DC setvar 0x8004, 143 - jump Route120_EventScript_151813 + goto Route120_EventScript_151813 end Route120_EventScript_1517E7:: @ 81517E7 setvar 0x8004, 144 - jump Route120_EventScript_151813 + goto Route120_EventScript_151813 end Route120_EventScript_1517F2:: @ 81517F2 setvar 0x8004, 145 - jump Route120_EventScript_151813 + goto Route120_EventScript_151813 end Route120_EventScript_1517FD:: @ 81517FD setvar 0x8004, 146 - jump Route120_EventScript_151813 + goto Route120_EventScript_151813 end Route120_EventScript_151808:: @ 8151808 setvar 0x8004, 147 - jump Route120_EventScript_151813 + goto Route120_EventScript_151813 end Route120_EventScript_151813:: @ 8151813 giveitem 0x8004 compare RESULT, 0 - jumpeq Route120_EventScript_1A029B + goto_if_eq Route120_EventScript_1A029B setflag 2254 msgbox Route120_Text_1C5A0B, 4 release @@ -185,11 +185,11 @@ Route120_EventScript_151853:: @ 8151853 lock faceplayer checkflag 290 - jumpeq Route120_EventScript_151884 + goto_if_eq Route120_EventScript_151884 msgbox Route120_Text_171827, 5 compare RESULT, 0 - jumpeq Route120_EventScript_151877 - jump Route120_EventScript_15189D + goto_if_eq Route120_EventScript_151877 + goto Route120_EventScript_15189D end Route120_EventScript_151877:: @ 8151877 @@ -201,55 +201,55 @@ Route120_EventScript_151877:: @ 8151877 Route120_EventScript_151884:: @ 8151884 msgbox Route120_Text_17196F, 5 compare RESULT, 0 - jumpeq Route120_EventScript_151877 - jump Route120_EventScript_15189D + goto_if_eq Route120_EventScript_151877 + goto Route120_EventScript_15189D end Route120_EventScript_15189D:: @ 815189D msgbox Route120_Text_1719A0, 4 - closebutton + closemessage compare FACING, 2 - callif 1, Route120_EventScript_15197F + call_if 1, Route120_EventScript_15197F compare FACING, 3 - callif 1, Route120_EventScript_15198A - move 31, Route120_Movement_1A083F - waitmove 0 - pause 20 + call_if 1, Route120_EventScript_15198A + applymovement 31, Route120_Movement_1A083F + waitmovement 0 + delay 20 msgbox Route120_Text_1719D4, 4 - closebutton - move 30, Route120_Movement_1A0843 - waitmove 0 - move 30, Route120_Movement_1A0662 - waitmove 0 - checksound - pokecry SPECIES_KECLEON, 2 - pause 40 + closemessage + applymovement 30, Route120_Movement_1A0843 + waitmovement 0 + applymovement 30, Route120_Movement_1A0662 + waitmovement 0 + waitse + playpokecry SPECIES_KECLEON, 2 + delay 40 waitpokecry setwildbattle SPECIES_KECLEON, 30, ITEM_NONE setvar 0x8004, 0 setflag 2145 dowildbattle clearflag 2145 - jump Route120_EventScript_151908 + goto Route120_EventScript_151908 end Route120_EventScript_151908:: @ 8151908 - move 31, Route120_Movement_1A0845 - move 255, Route120_Movement_1A0841 - waitmove 0 + applymovement 31, Route120_Movement_1A0845 + applymovement 255, Route120_Movement_1A0841 + waitmovement 0 msgbox Route120_Text_171A40, 4 giveitem ITEM_DEVON_SCOPE setflag 285 msgbox Route120_Text_171B0E, 4 - closebutton - move 31, Route120_Movement_1A0845 - waitmove 0 - pause 50 - setanimation 0, 1 - doanimation 30 - pause 15 - disappear 31 - checkanimation 30 + closemessage + applymovement 31, Route120_Movement_1A0845 + waitmovement 0 + delay 50 + setfieldeffect 0, 1 + dofieldeffect 30 + delay 15 + removeobject 31 + waitfieldeffect 30 setmaptile 13, 15, 663, 0 setmaptile 12, 16, 671, 0 setmaptile 12, 17, 161, 0 @@ -259,13 +259,13 @@ Route120_EventScript_151908:: @ 8151908 end Route120_EventScript_15197F:: @ 815197F - move 255, Route120_Movement_1A083F - waitmove 0 + applymovement 255, Route120_Movement_1A083F + waitmovement 0 return Route120_EventScript_15198A:: @ 815198A - move 255, Route120_Movement_151995 - waitmove 0 + applymovement 255, Route120_Movement_151995 + waitmovement 0 return Route120_Movement_151995:: @ 8151995 @@ -292,9 +292,9 @@ Route120_EventScript_1519B3:: @ 81519B3 Route120_EventScript_1519CA:: @ 81519CA trainerbattle 0, OPPONENT_ROBERT_1, 0, Route120_Text_1BF07E, Route120_Text_1BF0A5 - specialval RESULT, sub_8082C68 + specialvar RESULT, sub_8082C68 compare RESULT, 1 - jumpeq Route120_EventScript_1519F1 + goto_if_eq Route120_EventScript_1519F1 msgbox Route120_Text_1BF0C3, 6 end @@ -315,9 +315,9 @@ Route120_EventScript_151A1F:: @ 8151A1F Route120_EventScript_151A36:: @ 8151A36 trainerbattle 0, OPPONENT_BRANDON_1, 0, Route120_Text_1BF32B, Route120_Text_1BF36B - specialval RESULT, sub_8082C68 + specialvar RESULT, sub_8082C68 compare RESULT, 1 - jumpeq Route120_EventScript_151A5D + goto_if_eq Route120_EventScript_151A5D msgbox Route120_Text_1BF38D, 6 end diff --git a/data/scripts/maps/Route121.inc b/data/scripts/maps/Route121.inc index e1aaec716..39443d2f9 100644 --- a/data/scripts/maps/Route121.inc +++ b/data/scripts/maps/Route121.inc @@ -21,14 +21,14 @@ Route121_EventScript_151B1C:: @ 8151B1C Route121_EventScript_151B25:: @ 8151B25 lockall msgbox Route121_Text_171C8F, 4 - closebutton - move 12, Route121_Movement_151B57 - move 13, Route121_Movement_151B60 - move 14, Route121_Movement_151B69 - waitmove 0 - disappear 12 - disappear 13 - disappear 14 + closemessage + applymovement 12, Route121_Movement_151B57 + applymovement 13, Route121_Movement_151B60 + applymovement 14, Route121_Movement_151B69 + waitmovement 0 + removeobject 12 + removeobject 13 + removeobject 14 setvar 0x4074, 1 releaseall end @@ -73,9 +73,9 @@ Route121_EventScript_151B72:: @ 8151B72 Route121_EventScript_151B89:: @ 8151B89 trainerbattle 0, OPPONENT_WALTER_1, 0, Route121_Text_1BFA1B, Route121_Text_1BFA8C - specialval RESULT, sub_8082C68 + specialvar RESULT, sub_8082C68 compare RESULT, 1 - jumpeq Route121_EventScript_151BB0 + goto_if_eq Route121_EventScript_151BB0 msgbox Route121_Text_1BFA9D, 6 end @@ -101,9 +101,9 @@ Route121_EventScript_151BF9:: @ 8151BF9 Route121_EventScript_151C14:: @ 8151C14 trainerbattle 0, OPPONENT_JESSICA_1, 0, Route121_Text_1BFE51, Route121_Text_1BFE80 - specialval RESULT, sub_8082C68 + specialvar RESULT, sub_8082C68 compare RESULT, 1 - jumpeq Route121_EventScript_151C3B + goto_if_eq Route121_EventScript_151C3B msgbox Route121_Text_1BFEAE, 6 end diff --git a/data/scripts/maps/Route121_SafariZoneEntrance.inc b/data/scripts/maps/Route121_SafariZoneEntrance.inc index 251b09c73..9649271f4 100644 --- a/data/scripts/maps/Route121_SafariZoneEntrance.inc +++ b/data/scripts/maps/Route121_SafariZoneEntrance.inc @@ -8,8 +8,8 @@ Route121_SafariZoneEntrance_MapScript2_15C329:: @ 815C329 Route121_SafariZoneEntrance_EventScript_15C333:: @ 815C333 lockall - move 255, Route121_SafariZoneEntrance_Movement_15C348 - waitmove 0 + applymovement 255, Route121_SafariZoneEntrance_Movement_15C348 + waitmovement 0 special ExitSafariMode setvar 0x40a4, 0 releaseall @@ -35,7 +35,7 @@ Route121_SafariZoneEntrance_EventScript_15C35A:: @ 815C35A faceplayer msgbox Route121_SafariZoneEntrance_Text_1C3704, 5 compare RESULT, 1 - jumpeq Route121_SafariZoneEntrance_EventScript_15C379 + goto_if_eq Route121_SafariZoneEntrance_EventScript_15C379 msgbox Route121_SafariZoneEntrance_Text_1C373C, 4 release end @@ -47,39 +47,39 @@ Route121_SafariZoneEntrance_EventScript_15C379:: @ 815C379 Route121_SafariZoneEntrance_EventScript_15C383:: @ 815C383 lockall - move 255, Route121_SafariZoneEntrance_Movement_1A0841 - waitmove 0 - showmoney 0, 0 - snop + applymovement 255, Route121_SafariZoneEntrance_Movement_1A0841 + waitmovement 0 + showmoneybox 0, 0 + nop msgbox Route121_SafariZoneEntrance_Text_1C3832, 5 compare RESULT, 1 - jumpeq Route121_SafariZoneEntrance_EventScript_15C3B3 + goto_if_eq Route121_SafariZoneEntrance_EventScript_15C3B3 msgbox Route121_SafariZoneEntrance_Text_1C3895, 4 - jump Route121_SafariZoneEntrance_EventScript_15C46C + goto Route121_SafariZoneEntrance_EventScript_15C46C end Route121_SafariZoneEntrance_EventScript_15C3B3:: @ 815C3B3 checkitem ITEM_POKEBLOCK_CASE, 1 compare RESULT, 0 - jumpeq Route121_SafariZoneEntrance_EventScript_15C450 + goto_if_eq Route121_SafariZoneEntrance_EventScript_15C450 call Route121_SafariZoneEntrance_EventScript_15C425 checkmoney 0x1f4, 0 compare RESULT, 0 - jumpeq Route121_SafariZoneEntrance_EventScript_15C45E + goto_if_eq Route121_SafariZoneEntrance_EventScript_15C45E msgbox Route121_SafariZoneEntrance_Text_1C38D9, 4 - paymoney 0x1f4, 0 - updatemoney 0, 0 - snop + takemoney 0x1f4, 0 + updatemoneybox 0, 0 + nop msgbox Route121_SafariZoneEntrance_Text_1C38F4, 4 - fanfare 370 + playfanfare 370 message Route121_SafariZoneEntrance_Text_1C3910 waitfanfare - waittext + waitmessage msgbox Route121_SafariZoneEntrance_Text_1C392D, 4 - closebutton - hidemoney 0, 0 - move 255, Route121_SafariZoneEntrance_Movement_15C47E - waitmove 0 + closemessage + hidemoneybox 0, 0 + applymovement 255, Route121_SafariZoneEntrance_Movement_15C47E + waitmovement 0 special EnterSafariMode setvar 0x40a4, 2 warp SafariZone_Southeast, 255, 32, 33 @@ -89,12 +89,12 @@ Route121_SafariZoneEntrance_EventScript_15C3B3:: @ 815C3B3 Route121_SafariZoneEntrance_EventScript_15C425:: @ 815C425 countpokemon compare RESULT, 6 - jumpif 5, Route121_SafariZoneEntrance_EventScript_15C44F - specialval RESULT, CheckFreePokemonStorageSpace + goto_if 5, Route121_SafariZoneEntrance_EventScript_15C44F + specialvar RESULT, CheckFreePokemonStorageSpace compare RESULT, 1 - jumpeq Route121_SafariZoneEntrance_EventScript_15C44F + goto_if_eq Route121_SafariZoneEntrance_EventScript_15C44F msgbox Route121_SafariZoneEntrance_Text_1C39A3, 4 - jump Route121_SafariZoneEntrance_EventScript_15C46C + goto Route121_SafariZoneEntrance_EventScript_15C46C end Route121_SafariZoneEntrance_EventScript_15C44F:: @ 815C44F @@ -102,19 +102,19 @@ Route121_SafariZoneEntrance_EventScript_15C44F:: @ 815C44F Route121_SafariZoneEntrance_EventScript_15C450:: @ 815C450 msgbox Route121_SafariZoneEntrance_Text_1C39C3, 4 - jump Route121_SafariZoneEntrance_EventScript_15C46C + goto Route121_SafariZoneEntrance_EventScript_15C46C end Route121_SafariZoneEntrance_EventScript_15C45E:: @ 815C45E msgbox Route121_SafariZoneEntrance_Text_1C38B5, 4 - jump Route121_SafariZoneEntrance_EventScript_15C46C + goto Route121_SafariZoneEntrance_EventScript_15C46C end Route121_SafariZoneEntrance_EventScript_15C46C:: @ 815C46C - closebutton - hidemoney 0, 0 - move 255, Route121_SafariZoneEntrance_Movement_15C47C - waitmove 0 + closemessage + hidemoneybox 0, 0 + applymovement 255, Route121_SafariZoneEntrance_Movement_15C47C + waitmovement 0 releaseall end diff --git a/data/scripts/maps/Route123.inc b/data/scripts/maps/Route123.inc index 891a395f0..14c5a2dba 100644 --- a/data/scripts/maps/Route123.inc +++ b/data/scripts/maps/Route123.inc @@ -10,15 +10,15 @@ Route123_EventScript_151C5D:: @ 8151C5D lock faceplayer checkflag 232 - jumpeq Route123_EventScript_151CAC + goto_if_eq Route123_EventScript_151CAC msgbox Route123_Text_171D83, 4 special IsGrassTypeInParty compare RESULT, 0 - jumpeq Route123_EventScript_151CAA + goto_if_eq Route123_EventScript_151CAA msgbox Route123_Text_171DC2, 4 giveitem ITEM_TM19 compare RESULT, 0 - jumpeq Route123_EventScript_1A029B + goto_if_eq Route123_EventScript_1A029B setflag 232 msgbox Route123_Text_171E34, 4 release @@ -62,9 +62,9 @@ Route123_EventScript_151CFF:: @ 8151CFF Route123_EventScript_151D16:: @ 8151D16 trainerbattle 0, OPPONENT_CAMERON_1, 0, Route123_Text_1C013F, Route123_Text_1C01A3 - specialval RESULT, sub_8082C68 + specialvar RESULT, sub_8082C68 compare RESULT, 1 - jumpeq Route123_EventScript_151D3D + goto_if_eq Route123_EventScript_151D3D msgbox Route123_Text_1C01B1, 6 end @@ -75,9 +75,9 @@ Route123_EventScript_151D3D:: @ 8151D3D Route123_EventScript_151D54:: @ 8151D54 trainerbattle 0, OPPONENT_JACKI_1, 0, Route123_Text_1C028C, Route123_Text_1C0303 - specialval RESULT, sub_8082C68 + specialvar RESULT, sub_8082C68 compare RESULT, 1 - jumpeq Route123_EventScript_151D7B + goto_if_eq Route123_EventScript_151D7B msgbox Route123_Text_1C030F, 6 end diff --git a/data/scripts/maps/Route123_BerryMastersHouse.inc b/data/scripts/maps/Route123_BerryMastersHouse.inc index 9290f845d..64888759d 100644 --- a/data/scripts/maps/Route123_BerryMastersHouse.inc +++ b/data/scripts/maps/Route123_BerryMastersHouse.inc @@ -9,16 +9,16 @@ Route123_BerryMastersHouse_MapScript1_1639E5:: @ 81639E5 Route123_BerryMastersHouse_EventScript_1639E9:: @ 81639E9 lock faceplayer - checkdailyflags + dodailyevents checkflag 2253 - jumpeq Route123_BerryMastersHouse_EventScript_163A5A + goto_if_eq Route123_BerryMastersHouse_EventScript_163A5A msgbox Route123_BerryMastersHouse_Text_1C5BC4, 4 random 10 addvar RESULT, 20 addvar RESULT, 133 giveitem RESULT compare RESULT, 0 - jumpeq Route123_BerryMastersHouse_EventScript_1A029B + goto_if_eq Route123_BerryMastersHouse_EventScript_1A029B setflag 2253 msgbox Route123_BerryMastersHouse_Text_1C5C66, 4 random 10 @@ -26,7 +26,7 @@ Route123_BerryMastersHouse_EventScript_1639E9:: @ 81639E9 addvar RESULT, 133 giveitem RESULT compare RESULT, 0 - jumpeq Route123_BerryMastersHouse_EventScript_1A029B + goto_if_eq Route123_BerryMastersHouse_EventScript_1A029B msgbox Route123_BerryMastersHouse_Text_1C5C83, 4 release end @@ -39,18 +39,18 @@ Route123_BerryMastersHouse_EventScript_163A5A:: @ 8163A5A Route123_BerryMastersHouse_EventScript_163A64:: @ 8163A64 lock faceplayer - checkdailyflags + dodailyevents checkflag 2257 - jumpeq Route123_BerryMastersHouse_EventScript_163C13 + goto_if_eq Route123_BerryMastersHouse_EventScript_163C13 msgbox Route123_BerryMastersHouse_Text_1C5D24, 4 setvar 0x8004, 13 call Route123_BerryMastersHouse_EventScript_1A00F3 lock faceplayer compare RESULT, 1 - jumpeq Route123_BerryMastersHouse_EventScript_163AAD + goto_if_eq Route123_BerryMastersHouse_EventScript_163AAD compare RESULT, 0 - jumpeq Route123_BerryMastersHouse_EventScript_163A9B + goto_if_eq Route123_BerryMastersHouse_EventScript_163A9B end Route123_BerryMastersHouse_EventScript_163A9B:: @ 8163A9B @@ -61,17 +61,17 @@ Route123_BerryMastersHouse_EventScript_163A9B:: @ 8163A9B Route123_BerryMastersHouse_EventScript_163AAD:: @ 8163AAD compare 0x8004, 0 - jumpeq Route123_BerryMastersHouse_EventScript_163AF0 + goto_if_eq Route123_BerryMastersHouse_EventScript_163AF0 compare 0x8004, 1 - jumpeq Route123_BerryMastersHouse_EventScript_163B1E + goto_if_eq Route123_BerryMastersHouse_EventScript_163B1E compare 0x8004, 2 - jumpeq Route123_BerryMastersHouse_EventScript_163B4F + goto_if_eq Route123_BerryMastersHouse_EventScript_163B4F compare 0x8004, 3 - jumpeq Route123_BerryMastersHouse_EventScript_163B80 + goto_if_eq Route123_BerryMastersHouse_EventScript_163B80 compare 0x8004, 4 - jumpeq Route123_BerryMastersHouse_EventScript_163BB1 + goto_if_eq Route123_BerryMastersHouse_EventScript_163BB1 compare 0x8004, 5 - jumpeq Route123_BerryMastersHouse_EventScript_163BE2 + goto_if_eq Route123_BerryMastersHouse_EventScript_163BE2 end Route123_BerryMastersHouse_EventScript_163AF0:: @ 8163AF0 @@ -80,64 +80,64 @@ Route123_BerryMastersHouse_EventScript_163AF0:: @ 8163AF0 addvar RESULT, 133 giveitem RESULT compare RESULT, 0 - jumpeq Route123_BerryMastersHouse_EventScript_1A029B - jump Route123_BerryMastersHouse_EventScript_163C1D + goto_if_eq Route123_BerryMastersHouse_EventScript_1A029B + goto Route123_BerryMastersHouse_EventScript_163C1D release end Route123_BerryMastersHouse_EventScript_163B1E:: @ 8163B1E checkflag 248 - jumpeq Route123_BerryMastersHouse_EventScript_163AF0 + goto_if_eq Route123_BerryMastersHouse_EventScript_163AF0 msgbox Route123_BerryMastersHouse_Text_1C5DC1, 4 giveitem ITEM_SPELON_BERRY compare RESULT, 0 - jumpeq Route123_BerryMastersHouse_EventScript_1A029B + goto_if_eq Route123_BerryMastersHouse_EventScript_1A029B setflag 248 - jump Route123_BerryMastersHouse_EventScript_163C1D + goto Route123_BerryMastersHouse_EventScript_163C1D end Route123_BerryMastersHouse_EventScript_163B4F:: @ 8163B4F checkflag 249 - jumpeq Route123_BerryMastersHouse_EventScript_163AF0 + goto_if_eq Route123_BerryMastersHouse_EventScript_163AF0 msgbox Route123_BerryMastersHouse_Text_1C5DC1, 4 giveitem ITEM_PAMTRE_BERRY compare RESULT, 0 - jumpeq Route123_BerryMastersHouse_EventScript_1A029B + goto_if_eq Route123_BerryMastersHouse_EventScript_1A029B setflag 249 - jump Route123_BerryMastersHouse_EventScript_163C1D + goto Route123_BerryMastersHouse_EventScript_163C1D end Route123_BerryMastersHouse_EventScript_163B80:: @ 8163B80 checkflag 250 - jumpeq Route123_BerryMastersHouse_EventScript_163AF0 + goto_if_eq Route123_BerryMastersHouse_EventScript_163AF0 msgbox Route123_BerryMastersHouse_Text_1C5DC1, 4 giveitem ITEM_WATMEL_BERRY compare RESULT, 0 - jumpeq Route123_BerryMastersHouse_EventScript_1A029B + goto_if_eq Route123_BerryMastersHouse_EventScript_1A029B setflag 250 - jump Route123_BerryMastersHouse_EventScript_163C1D + goto Route123_BerryMastersHouse_EventScript_163C1D end Route123_BerryMastersHouse_EventScript_163BB1:: @ 8163BB1 checkflag 251 - jumpeq Route123_BerryMastersHouse_EventScript_163AF0 + goto_if_eq Route123_BerryMastersHouse_EventScript_163AF0 msgbox Route123_BerryMastersHouse_Text_1C5DC1, 4 giveitem ITEM_DURIN_BERRY compare RESULT, 0 - jumpeq Route123_BerryMastersHouse_EventScript_1A029B + goto_if_eq Route123_BerryMastersHouse_EventScript_1A029B setflag 251 - jump Route123_BerryMastersHouse_EventScript_163C1D + goto Route123_BerryMastersHouse_EventScript_163C1D end Route123_BerryMastersHouse_EventScript_163BE2:: @ 8163BE2 checkflag 252 - jumpeq Route123_BerryMastersHouse_EventScript_163AF0 + goto_if_eq Route123_BerryMastersHouse_EventScript_163AF0 msgbox Route123_BerryMastersHouse_Text_1C5DC1, 4 giveitem ITEM_BELUE_BERRY compare RESULT, 0 - jumpeq Route123_BerryMastersHouse_EventScript_1A029B + goto_if_eq Route123_BerryMastersHouse_EventScript_1A029B setflag 252 - jump Route123_BerryMastersHouse_EventScript_163C1D + goto Route123_BerryMastersHouse_EventScript_163C1D end Route123_BerryMastersHouse_EventScript_163C13:: @ 8163C13 diff --git a/data/scripts/maps/Route124.inc b/data/scripts/maps/Route124.inc index 68f17b12a..ffe4cef97 100644 --- a/data/scripts/maps/Route124.inc +++ b/data/scripts/maps/Route124.inc @@ -4,7 +4,7 @@ Route124_MapScripts:: @ 8151DDF Route124_MapScript1_151DE5:: @ 8151DE5 checkflag 2090 - callif 1, Route124_EventScript_1A02C1 + call_if 1, Route124_EventScript_1A02C1 end Route124_EventScript_151DEF:: @ 8151DEF @@ -23,9 +23,9 @@ Route124_EventScript_151E0F:: @ 8151E0F Route124_EventScript_151E26:: @ 8151E26 trainerbattle 0, OPPONENT_JENNY_1, 0, Route124_Text_1C07B4, Route124_Text_1C07F9 - specialval RESULT, sub_8082C68 + specialvar RESULT, sub_8082C68 compare RESULT, 1 - jumpeq Route124_EventScript_151E4D + goto_if_eq Route124_EventScript_151E4D msgbox Route124_Text_1C080E, 6 end @@ -46,9 +46,9 @@ Route124_EventScript_151E7B:: @ 8151E7B Route124_EventScript_151E92:: @ 8151E92 trainerbattle 4, OPPONENT_RITA_AND_SAM_1, 0, Route124_Text_1C0ABD, Route124_Text_1C0B36, Route124_Text_1C0BC8 - specialval RESULT, sub_8082C68 + specialvar RESULT, sub_8082C68 compare RESULT, 1 - jumpeq Route124_EventScript_151EBD + goto_if_eq Route124_EventScript_151EBD msgbox Route124_Text_1C0B72, 6 end @@ -59,9 +59,9 @@ Route124_EventScript_151EBD:: @ 8151EBD Route124_EventScript_151ED8:: @ 8151ED8 trainerbattle 4, OPPONENT_RITA_AND_SAM_1, 0, Route124_Text_1C0C0E, Route124_Text_1C0C4F, Route124_Text_1C0CE0 - specialval RESULT, sub_8082C68 + specialvar RESULT, sub_8082C68 compare RESULT, 1 - jumpeq Route124_EventScript_151F03 + goto_if_eq Route124_EventScript_151F03 msgbox Route124_Text_1C0C7F, 6 end diff --git a/data/scripts/maps/Route124_DivingTreasureHuntersHouse.inc b/data/scripts/maps/Route124_DivingTreasureHuntersHouse.inc index e1049c8be..7421e94e0 100644 --- a/data/scripts/maps/Route124_DivingTreasureHuntersHouse.inc +++ b/data/scripts/maps/Route124_DivingTreasureHuntersHouse.inc @@ -10,38 +10,38 @@ Route124_DivingTreasureHuntersHouse_EventScript_163E04:: @ 8163E04 lock faceplayer checkflag 217 - jumpeq Route124_DivingTreasureHuntersHouse_EventScript_163E20 + goto_if_eq Route124_DivingTreasureHuntersHouse_EventScript_163E20 msgbox Route124_DivingTreasureHuntersHouse_Text_19F416, 4 setflag 217 - jump Route124_DivingTreasureHuntersHouse_EventScript_163E2E + goto Route124_DivingTreasureHuntersHouse_EventScript_163E2E end Route124_DivingTreasureHuntersHouse_EventScript_163E20:: @ 8163E20 msgbox Route124_DivingTreasureHuntersHouse_Text_19F48F, 4 - jump Route124_DivingTreasureHuntersHouse_EventScript_163E2E + goto Route124_DivingTreasureHuntersHouse_EventScript_163E2E end Route124_DivingTreasureHuntersHouse_EventScript_163E2E:: @ 8163E2E call Route124_DivingTreasureHuntersHouse_EventScript_163E44 compare 0x4001, 0 - jumpeq Route124_DivingTreasureHuntersHouse_EventScript_164329 - jump Route124_DivingTreasureHuntersHouse_EventScript_163EA2 + goto_if_eq Route124_DivingTreasureHuntersHouse_EventScript_164329 + goto Route124_DivingTreasureHuntersHouse_EventScript_163EA2 end Route124_DivingTreasureHuntersHouse_EventScript_163E44:: @ 8163E44 setvar 0x4001, 0 checkitem ITEM_RED_SHARD, 1 compare RESULT, 1 - callif 1, Route124_DivingTreasureHuntersHouse_EventScript_163E8A + call_if 1, Route124_DivingTreasureHuntersHouse_EventScript_163E8A checkitem ITEM_YELLOW_SHARD, 1 compare RESULT, 1 - callif 1, Route124_DivingTreasureHuntersHouse_EventScript_163E90 + call_if 1, Route124_DivingTreasureHuntersHouse_EventScript_163E90 checkitem ITEM_BLUE_SHARD, 1 compare RESULT, 1 - callif 1, Route124_DivingTreasureHuntersHouse_EventScript_163E96 + call_if 1, Route124_DivingTreasureHuntersHouse_EventScript_163E96 checkitem ITEM_GREEN_SHARD, 1 compare RESULT, 1 - callif 1, Route124_DivingTreasureHuntersHouse_EventScript_163E9C + call_if 1, Route124_DivingTreasureHuntersHouse_EventScript_163E9C return Route124_DivingTreasureHuntersHouse_EventScript_163E8A:: @ 8163E8A @@ -62,12 +62,12 @@ Route124_DivingTreasureHuntersHouse_EventScript_163E9C:: @ 8163E9C Route124_DivingTreasureHuntersHouse_EventScript_163EA2:: @ 8163EA2 msgbox Route124_DivingTreasureHuntersHouse_Text_19F544, 4 - jump Route124_DivingTreasureHuntersHouse_EventScript_163EB0 + goto Route124_DivingTreasureHuntersHouse_EventScript_163EB0 end Route124_DivingTreasureHuntersHouse_EventScript_163EB0:: @ 8163EB0 message Route124_DivingTreasureHuntersHouse_Text_19F5C5 - waittext + waitmessage switch 0x4001 case 1, Route124_DivingTreasureHuntersHouse_EventScript_163F61 case 2, Route124_DivingTreasureHuntersHouse_EventScript_163F87 @@ -91,7 +91,7 @@ Route124_DivingTreasureHuntersHouse_EventScript_163F61:: @ 8163F61 switch RESULT case 0, Route124_DivingTreasureHuntersHouse_EventScript_164256 case 1, Route124_DivingTreasureHuntersHouse_EventScript_16431F - jump Route124_DivingTreasureHuntersHouse_EventScript_16431F + goto Route124_DivingTreasureHuntersHouse_EventScript_16431F end Route124_DivingTreasureHuntersHouse_EventScript_163F87:: @ 8163F87 @@ -99,7 +99,7 @@ Route124_DivingTreasureHuntersHouse_EventScript_163F87:: @ 8163F87 switch RESULT case 0, Route124_DivingTreasureHuntersHouse_EventScript_164265 case 1, Route124_DivingTreasureHuntersHouse_EventScript_16431F - jump Route124_DivingTreasureHuntersHouse_EventScript_16431F + goto Route124_DivingTreasureHuntersHouse_EventScript_16431F end Route124_DivingTreasureHuntersHouse_EventScript_163FAD:: @ 8163FAD @@ -108,7 +108,7 @@ Route124_DivingTreasureHuntersHouse_EventScript_163FAD:: @ 8163FAD case 0, Route124_DivingTreasureHuntersHouse_EventScript_164256 case 1, Route124_DivingTreasureHuntersHouse_EventScript_164265 case 2, Route124_DivingTreasureHuntersHouse_EventScript_16431F - jump Route124_DivingTreasureHuntersHouse_EventScript_16431F + goto Route124_DivingTreasureHuntersHouse_EventScript_16431F end Route124_DivingTreasureHuntersHouse_EventScript_163FDE:: @ 8163FDE @@ -116,7 +116,7 @@ Route124_DivingTreasureHuntersHouse_EventScript_163FDE:: @ 8163FDE switch RESULT case 0, Route124_DivingTreasureHuntersHouse_EventScript_164274 case 1, Route124_DivingTreasureHuntersHouse_EventScript_16431F - jump Route124_DivingTreasureHuntersHouse_EventScript_16431F + goto Route124_DivingTreasureHuntersHouse_EventScript_16431F end Route124_DivingTreasureHuntersHouse_EventScript_164004:: @ 8164004 @@ -125,7 +125,7 @@ Route124_DivingTreasureHuntersHouse_EventScript_164004:: @ 8164004 case 0, Route124_DivingTreasureHuntersHouse_EventScript_164256 case 1, Route124_DivingTreasureHuntersHouse_EventScript_164274 case 2, Route124_DivingTreasureHuntersHouse_EventScript_16431F - jump Route124_DivingTreasureHuntersHouse_EventScript_16431F + goto Route124_DivingTreasureHuntersHouse_EventScript_16431F end Route124_DivingTreasureHuntersHouse_EventScript_164035:: @ 8164035 @@ -134,7 +134,7 @@ Route124_DivingTreasureHuntersHouse_EventScript_164035:: @ 8164035 case 0, Route124_DivingTreasureHuntersHouse_EventScript_164265 case 1, Route124_DivingTreasureHuntersHouse_EventScript_164274 case 2, Route124_DivingTreasureHuntersHouse_EventScript_16431F - jump Route124_DivingTreasureHuntersHouse_EventScript_16431F + goto Route124_DivingTreasureHuntersHouse_EventScript_16431F end Route124_DivingTreasureHuntersHouse_EventScript_164066:: @ 8164066 @@ -144,7 +144,7 @@ Route124_DivingTreasureHuntersHouse_EventScript_164066:: @ 8164066 case 1, Route124_DivingTreasureHuntersHouse_EventScript_164265 case 2, Route124_DivingTreasureHuntersHouse_EventScript_164274 case 3, Route124_DivingTreasureHuntersHouse_EventScript_16431F - jump Route124_DivingTreasureHuntersHouse_EventScript_16431F + goto Route124_DivingTreasureHuntersHouse_EventScript_16431F end Route124_DivingTreasureHuntersHouse_EventScript_1640A2:: @ 81640A2 @@ -152,7 +152,7 @@ Route124_DivingTreasureHuntersHouse_EventScript_1640A2:: @ 81640A2 switch RESULT case 0, Route124_DivingTreasureHuntersHouse_EventScript_164283 case 1, Route124_DivingTreasureHuntersHouse_EventScript_16431F - jump Route124_DivingTreasureHuntersHouse_EventScript_16431F + goto Route124_DivingTreasureHuntersHouse_EventScript_16431F end Route124_DivingTreasureHuntersHouse_EventScript_1640C8:: @ 81640C8 @@ -161,7 +161,7 @@ Route124_DivingTreasureHuntersHouse_EventScript_1640C8:: @ 81640C8 case 0, Route124_DivingTreasureHuntersHouse_EventScript_164256 case 1, Route124_DivingTreasureHuntersHouse_EventScript_164283 case 2, Route124_DivingTreasureHuntersHouse_EventScript_16431F - jump Route124_DivingTreasureHuntersHouse_EventScript_16431F + goto Route124_DivingTreasureHuntersHouse_EventScript_16431F end Route124_DivingTreasureHuntersHouse_EventScript_1640F9:: @ 81640F9 @@ -170,7 +170,7 @@ Route124_DivingTreasureHuntersHouse_EventScript_1640F9:: @ 81640F9 case 0, Route124_DivingTreasureHuntersHouse_EventScript_164265 case 1, Route124_DivingTreasureHuntersHouse_EventScript_164283 case 2, Route124_DivingTreasureHuntersHouse_EventScript_16431F - jump Route124_DivingTreasureHuntersHouse_EventScript_16431F + goto Route124_DivingTreasureHuntersHouse_EventScript_16431F end Route124_DivingTreasureHuntersHouse_EventScript_16412A:: @ 816412A @@ -180,7 +180,7 @@ Route124_DivingTreasureHuntersHouse_EventScript_16412A:: @ 816412A case 1, Route124_DivingTreasureHuntersHouse_EventScript_164265 case 2, Route124_DivingTreasureHuntersHouse_EventScript_164283 case 3, Route124_DivingTreasureHuntersHouse_EventScript_16431F - jump Route124_DivingTreasureHuntersHouse_EventScript_16431F + goto Route124_DivingTreasureHuntersHouse_EventScript_16431F end Route124_DivingTreasureHuntersHouse_EventScript_164166:: @ 8164166 @@ -189,7 +189,7 @@ Route124_DivingTreasureHuntersHouse_EventScript_164166:: @ 8164166 case 0, Route124_DivingTreasureHuntersHouse_EventScript_164274 case 1, Route124_DivingTreasureHuntersHouse_EventScript_164283 case 2, Route124_DivingTreasureHuntersHouse_EventScript_16431F - jump Route124_DivingTreasureHuntersHouse_EventScript_16431F + goto Route124_DivingTreasureHuntersHouse_EventScript_16431F end Route124_DivingTreasureHuntersHouse_EventScript_164197:: @ 8164197 @@ -199,7 +199,7 @@ Route124_DivingTreasureHuntersHouse_EventScript_164197:: @ 8164197 case 1, Route124_DivingTreasureHuntersHouse_EventScript_164274 case 2, Route124_DivingTreasureHuntersHouse_EventScript_164283 case 3, Route124_DivingTreasureHuntersHouse_EventScript_16431F - jump Route124_DivingTreasureHuntersHouse_EventScript_16431F + goto Route124_DivingTreasureHuntersHouse_EventScript_16431F end Route124_DivingTreasureHuntersHouse_EventScript_1641D3:: @ 81641D3 @@ -209,7 +209,7 @@ Route124_DivingTreasureHuntersHouse_EventScript_1641D3:: @ 81641D3 case 1, Route124_DivingTreasureHuntersHouse_EventScript_164274 case 2, Route124_DivingTreasureHuntersHouse_EventScript_164283 case 3, Route124_DivingTreasureHuntersHouse_EventScript_16431F - jump Route124_DivingTreasureHuntersHouse_EventScript_16431F + goto Route124_DivingTreasureHuntersHouse_EventScript_16431F end Route124_DivingTreasureHuntersHouse_EventScript_16420F:: @ 816420F @@ -220,42 +220,42 @@ Route124_DivingTreasureHuntersHouse_EventScript_16420F:: @ 816420F case 2, Route124_DivingTreasureHuntersHouse_EventScript_164274 case 3, Route124_DivingTreasureHuntersHouse_EventScript_164283 case 4, Route124_DivingTreasureHuntersHouse_EventScript_16431F - jump Route124_DivingTreasureHuntersHouse_EventScript_16431F + goto Route124_DivingTreasureHuntersHouse_EventScript_16431F end Route124_DivingTreasureHuntersHouse_EventScript_164256:: @ 8164256 setvar 0x8008, 48 setvar 0x8009, 95 - jump Route124_DivingTreasureHuntersHouse_EventScript_164292 + goto Route124_DivingTreasureHuntersHouse_EventScript_164292 Route124_DivingTreasureHuntersHouse_EventScript_164265:: @ 8164265 setvar 0x8008, 50 setvar 0x8009, 96 - jump Route124_DivingTreasureHuntersHouse_EventScript_164292 + goto Route124_DivingTreasureHuntersHouse_EventScript_164292 Route124_DivingTreasureHuntersHouse_EventScript_164274:: @ 8164274 setvar 0x8008, 49 setvar 0x8009, 97 - jump Route124_DivingTreasureHuntersHouse_EventScript_164292 + goto Route124_DivingTreasureHuntersHouse_EventScript_164292 Route124_DivingTreasureHuntersHouse_EventScript_164283:: @ 8164283 setvar 0x8008, 51 setvar 0x8009, 98 - jump Route124_DivingTreasureHuntersHouse_EventScript_164292 + goto Route124_DivingTreasureHuntersHouse_EventScript_164292 Route124_DivingTreasureHuntersHouse_EventScript_164292:: @ 8164292 - bufferitem 0, 0x8008 - bufferitem 1, 0x8009 + getitemname 0, 0x8008 + getitemname 1, 0x8009 msgbox Route124_DivingTreasureHuntersHouse_Text_19F5E0, 5 compare RESULT, 0 - jumpeq Route124_DivingTreasureHuntersHouse_EventScript_16431F + goto_if_eq Route124_DivingTreasureHuntersHouse_EventScript_16431F checkitemspace 0x8009, 1 compare RESULT, 1 - jumpeq Route124_DivingTreasureHuntersHouse_EventScript_1642D3 + goto_if_eq Route124_DivingTreasureHuntersHouse_EventScript_1642D3 checkitem 0x8008, 2 compare RESULT, 0 - jumpeq Route124_DivingTreasureHuntersHouse_EventScript_1642D3 - jump Route124_DivingTreasureHuntersHouse_EventScript_164315 + goto_if_eq Route124_DivingTreasureHuntersHouse_EventScript_1642D3 + goto Route124_DivingTreasureHuntersHouse_EventScript_164315 end Route124_DivingTreasureHuntersHouse_EventScript_1642D3:: @ 81642D3 @@ -264,11 +264,11 @@ Route124_DivingTreasureHuntersHouse_EventScript_1642D3:: @ 81642D3 msgbox Route124_DivingTreasureHuntersHouse_Text_19F606, 4 call Route124_DivingTreasureHuntersHouse_EventScript_163E44 compare 0x4001, 0 - jumpeq Route124_DivingTreasureHuntersHouse_EventScript_164333 + goto_if_eq Route124_DivingTreasureHuntersHouse_EventScript_164333 msgbox Route124_DivingTreasureHuntersHouse_Text_19F629, 5 compare RESULT, 1 - jumpeq Route124_DivingTreasureHuntersHouse_EventScript_163EB0 - jump Route124_DivingTreasureHuntersHouse_EventScript_16431F + goto_if_eq Route124_DivingTreasureHuntersHouse_EventScript_163EB0 + goto Route124_DivingTreasureHuntersHouse_EventScript_16431F end Route124_DivingTreasureHuntersHouse_EventScript_164315:: @ 8164315 diff --git a/data/scripts/maps/Route125.inc b/data/scripts/maps/Route125.inc index a5d2457d5..489a7314b 100644 --- a/data/scripts/maps/Route125.inc +++ b/data/scripts/maps/Route125.inc @@ -4,7 +4,7 @@ Route125_MapScripts:: @ 8151F1E Route125_MapScript1_151F24:: @ 8151F24 checkflag 2090 - callif 1, Route125_EventScript_1A02C1 + call_if 1, Route125_EventScript_1A02C1 end Route125_EventScript_151F2E:: @ 8151F2E @@ -29,9 +29,9 @@ Route125_EventScript_151F73:: @ 8151F73 Route125_EventScript_151F8A:: @ 8151F8A trainerbattle 0, OPPONENT_ERNEST_1, 0, Route125_Text_1C11AF, Route125_Text_1C11ED - specialval RESULT, sub_8082C68 + specialvar RESULT, sub_8082C68 compare RESULT, 1 - jumpeq Route125_EventScript_151FB1 + goto_if_eq Route125_EventScript_151FB1 msgbox Route125_Text_1C1208, 6 end diff --git a/data/scripts/maps/Route126.inc b/data/scripts/maps/Route126.inc index f3d1a77f9..729922681 100644 --- a/data/scripts/maps/Route126.inc +++ b/data/scripts/maps/Route126.inc @@ -4,7 +4,7 @@ Route126_MapScripts:: @ 8151FFE Route126_MapScript1_152004:: @ 8152004 checkflag 2090 - callif 1, Route126_EventScript_1A02C1 + call_if 1, Route126_EventScript_1A02C1 end Route126_EventScript_15200E:: @ 815200E diff --git a/data/scripts/maps/Route127.inc b/data/scripts/maps/Route127.inc index b4461b253..284d1fbd4 100644 --- a/data/scripts/maps/Route127.inc +++ b/data/scripts/maps/Route127.inc @@ -4,7 +4,7 @@ Route127_MapScripts:: @ 815206A Route127_MapScript1_152070:: @ 8152070 checkflag 2090 - callif 1, Route127_EventScript_1A02C1 + call_if 1, Route127_EventScript_1A02C1 end Route127_EventScript_15207A:: @ 815207A diff --git a/data/scripts/maps/Route128.inc b/data/scripts/maps/Route128.inc index 011591400..615662fc1 100644 --- a/data/scripts/maps/Route128.inc +++ b/data/scripts/maps/Route128.inc @@ -5,7 +5,7 @@ Route128_MapScripts:: @ 815211B Route128_MapScript1_152126:: @ 8152126 checkflag 2090 - callif 1, Route128_EventScript_1A02C1 + call_if 1, Route128_EventScript_1A02C1 call Route128_EventScript_1A0196 end @@ -15,73 +15,73 @@ Route128_MapScript2_152135:: @ 8152135 Route128_EventScript_15213F:: @ 815213F lockall - pause 20 + delay 20 .ifndef SAPPHIRE special sub_807E25C waitstate .endif - move 4, Route128_Movement_152271 - waitmove 0 + applymovement 4, Route128_Movement_152271 + waitmovement 0 msgbox Route128_Text_171EE0, 4 - move 4, Route128_Movement_152279 - waitmove 0 + applymovement 4, Route128_Movement_152279 + waitmovement 0 msgbox Route128_Text_171F35, 4 - closebutton - move 5, Route128_Movement_152293 - waitmove 0 - move 4, Route128_Movement_1A0841 - waitmove 0 + closemessage + applymovement 5, Route128_Movement_152293 + waitmovement 0 + applymovement 4, Route128_Movement_1A0841 + waitmovement 0 msgbox Route128_Text_171F4B, 4 - closebutton - move 5, Route128_Movement_1522A1 - waitmove 0 - move 255, Route128_Movement_1A0841 - waitmove 0 + closemessage + applymovement 5, Route128_Movement_1522A1 + waitmovement 0 + applymovement 255, Route128_Movement_1A0841 + waitmovement 0 msgbox Route128_Text_172008, 4 - closebutton - move 4, Route128_Movement_15227E - move 255, Route128_Movement_1A083F - move 5, Route128_Movement_152290 - waitmove 0 + closemessage + applymovement 4, Route128_Movement_15227E + applymovement 255, Route128_Movement_1A083F + applymovement 5, Route128_Movement_152290 + waitmovement 0 msgbox Route128_Text_17210B, 4 - closebutton - pause 40 - move 5, Route128_Movement_152296 - move 4, Route128_Movement_152283 - waitmove 0 - disappear 5 - disappear 4 - pause 100 - setanimation 0, 1 - doanimation 30 - checkanimation 30 - reappear 3 - move 3, Route128_Movement_15226F - waitmove 0 - move 255, Route128_Movement_1A0843 - waitmove 0 + closemessage + delay 40 + applymovement 5, Route128_Movement_152296 + applymovement 4, Route128_Movement_152283 + waitmovement 0 + removeobject 5 + removeobject 4 + delay 100 + setfieldeffect 0, 1 + dofieldeffect 30 + waitfieldeffect 30 + addobject 3 + applymovement 3, Route128_Movement_15226F + waitmovement 0 + applymovement 255, Route128_Movement_1A0843 + waitmovement 0 msgbox Route128_Text_172181, 4 - closebutton - move 3, Route128_Movement_15226D - move 255, Route128_Movement_1A0841 - waitmove 0 + closemessage + applymovement 3, Route128_Movement_15226D + applymovement 255, Route128_Movement_1A0841 + waitmovement 0 .ifdef SAPPHIRE msgbox Route128_Text_1721A2, 4 .else msgbox Route128_Text_1722A1, 4 .endif - move 3, Route128_Movement_1A0845 - waitmove 0 + applymovement 3, Route128_Movement_1A0845 + waitmovement 0 msgbox Route128_Text_1723BE, 4 - closebutton - move 3, Route128_Movement_1A0845 - waitmove 0 - pause 50 - setanimation 0, 1 - doanimation 30 - pause 15 - disappear 3 - checkanimation 30 + closemessage + applymovement 3, Route128_Movement_1A0845 + waitmovement 0 + delay 50 + setfieldeffect 0, 1 + dofieldeffect 30 + delay 15 + removeobject 3 + waitfieldeffect 30 setvar 0x407b, 2 releaseall end @@ -182,9 +182,9 @@ Route128_Movement_1522A1:: @ 81522A1 Route128_EventScript_1522A4:: @ 81522A4 trainerbattle 0, OPPONENT_ISAIAH_1, 0, Route128_Text_1C1C67, Route128_Text_1C1C95 - specialval RESULT, sub_8082C68 + specialvar RESULT, sub_8082C68 compare RESULT, 1 - jumpeq Route128_EventScript_1522CB + goto_if_eq Route128_EventScript_1522CB msgbox Route128_Text_1C1CC3, 6 end @@ -195,9 +195,9 @@ Route128_EventScript_1522CB:: @ 81522CB Route128_EventScript_1522E2:: @ 81522E2 trainerbattle 0, OPPONENT_KATELYN_1, 0, Route128_Text_1C1DB0, Route128_Text_1C1E25 - specialval RESULT, sub_8082C68 + specialvar RESULT, sub_8082C68 compare RESULT, 1 - jumpeq Route128_EventScript_152309 + goto_if_eq Route128_EventScript_152309 msgbox Route128_Text_1C1E4A, 6 end diff --git a/data/scripts/maps/Route130.inc b/data/scripts/maps/Route130.inc index bac6728a7..69da29471 100644 --- a/data/scripts/maps/Route130.inc +++ b/data/scripts/maps/Route130.inc @@ -3,9 +3,9 @@ Route130_MapScripts:: @ 81523C2 .byte 0 Route130_MapScript1_1523C8:: @ 81523C8 - specialval RESULT, IsMirageIslandPresent + specialvar RESULT, IsMirageIslandPresent compare RESULT, 1 - jumpeq Route130_EventScript_15240C + goto_if_eq Route130_EventScript_15240C setflag 17 setflag 18 setflag 19 @@ -22,11 +22,11 @@ Route130_MapScript1_1523C8:: @ 81523C8 setflag 30 setflag 31 setflag 32 - setmapfooter 264 + setmaplayoutindex 264 end Route130_EventScript_15240C:: @ 815240C - setmapfooter 46 + setmaplayoutindex 46 end Route130_EventScript_152410:: @ 8152410 diff --git a/data/scripts/maps/Route131.inc b/data/scripts/maps/Route131.inc index 81cb7dc02..50ad4222b 100644 --- a/data/scripts/maps/Route131.inc +++ b/data/scripts/maps/Route131.inc @@ -4,11 +4,11 @@ Route131_MapScripts:: @ 815243E Route131_MapScript1_152444:: @ 8152444 checkflag 2052 - callif 1, Route131_EventScript_15244E + call_if 1, Route131_EventScript_15244E end Route131_EventScript_15244E:: @ 815244E - setmapfooter 320 + setmaplayoutindex 320 return Route131_EventScript_152452:: @ 8152452 diff --git a/data/scripts/maps/Route134.inc b/data/scripts/maps/Route134.inc index b1f77fac1..6b4d330d1 100644 --- a/data/scripts/maps/Route134.inc +++ b/data/scripts/maps/Route134.inc @@ -3,7 +3,7 @@ Route134_MapScripts:: @ 81525B5 .byte 0 Route134_MapScript1_1525BB:: @ 81525BB - warp4 Underwater_Route134, 255, 8, 6 + setdivewarp Underwater_Route134, 255, 8, 6 end Route134_EventScript_1525C4:: @ 81525C4 diff --git a/data/scripts/maps/RustboroCity.inc b/data/scripts/maps/RustboroCity.inc index c338e8b67..916eb8108 100644 --- a/data/scripts/maps/RustboroCity.inc +++ b/data/scripts/maps/RustboroCity.inc @@ -12,7 +12,7 @@ RustboroCity_EventScript_14C386:: @ 814C386 lock faceplayer checkflag 142 - jumpeq RustboroCity_EventScript_14C39B + goto_if_eq RustboroCity_EventScript_14C39B msgbox RustboroCity_Text_16689D, 4 release end @@ -37,7 +37,7 @@ RustboroCity_EventScript_14C3BA:: @ 814C3BA lock faceplayer checkflag 2055 - jumpeq RustboroCity_EventScript_14C3CF + goto_if_eq RustboroCity_EventScript_14C3CF msgbox RustboroCity_Text_16696D, 4 release end @@ -51,7 +51,7 @@ RustboroCity_EventScript_14C3D9:: @ 814C3D9 lock faceplayer checkflag 188 - jumpeq RustboroCity_EventScript_14C3EE + goto_if_eq RustboroCity_EventScript_14C3EE msgbox RustboroCity_Text_166B86, 4 release end @@ -101,8 +101,8 @@ RustboroCity_EventScript_14C449:: @ 814C449 lock faceplayer msgbox RustboroCity_Text_166D59, 4 - move 7, RustboroCity_Movement_1A083D - waitmove 0 + applymovement 7, RustboroCity_Movement_1A083D + waitmovement 0 release end @@ -110,8 +110,8 @@ RustboroCity_EventScript_14C45F:: @ 814C45F lock faceplayer msgbox RustboroCity_Text_166DB0, 4 - move 8, RustboroCity_Movement_1A083D - waitmove 0 + applymovement 8, RustboroCity_Movement_1A083D + waitmovement 0 release end @@ -124,60 +124,60 @@ RustboroCity_EventScript_14C475:: @ 814C475 RustboroCity_EventScript_14C481:: @ 814C481 lockall - movespriteperm 9, 14, 21 - spritebehave 9, 10 + setobjectxyperm 9, 14, 21 + setobjectmovementtype 9, 10 setvar 0x8004, 0 - jump RustboroCity_EventScript_14C4F4 + goto RustboroCity_EventScript_14C4F4 end RustboroCity_EventScript_14C498:: @ 814C498 lockall - movespriteperm 9, 14, 21 - spritebehave 9, 10 + setobjectxyperm 9, 14, 21 + setobjectmovementtype 9, 10 setvar 0x8004, 1 - jump RustboroCity_EventScript_14C4F4 + goto RustboroCity_EventScript_14C4F4 end RustboroCity_EventScript_14C4AF:: @ 814C4AF lockall - movespriteperm 9, 14, 21 - spritebehave 9, 10 + setobjectxyperm 9, 14, 21 + setobjectmovementtype 9, 10 setvar 0x8004, 2 - jump RustboroCity_EventScript_14C4F4 + goto RustboroCity_EventScript_14C4F4 end RustboroCity_EventScript_14C4C6:: @ 814C4C6 lockall - movespriteperm 9, 14, 21 - spritebehave 9, 10 + setobjectxyperm 9, 14, 21 + setobjectmovementtype 9, 10 setvar 0x8004, 3 - jump RustboroCity_EventScript_14C4F4 + goto RustboroCity_EventScript_14C4F4 end RustboroCity_EventScript_14C4DD:: @ 814C4DD lockall - movespriteperm 9, 14, 21 - spritebehave 9, 10 + setobjectxyperm 9, 14, 21 + setobjectmovementtype 9, 10 setvar 0x8004, 4 - jump RustboroCity_EventScript_14C4F4 + goto RustboroCity_EventScript_14C4F4 end RustboroCity_EventScript_14C4F4:: @ 814C4F4 msgbox RustboroCity_Text_166E65, 4 - closebutton - reappear 10 - reappear 9 - move 10, RustboroCity_Movement_14C5C2 - waitmove 0 - disappear 10 - move 9, RustboroCity_Movement_14C5D3 - waitmove 0 + closemessage + addobject 10 + addobject 9 + applymovement 10, RustboroCity_Movement_14C5C2 + waitmovement 0 + removeobject 10 + applymovement 9, RustboroCity_Movement_14C5D3 + waitmovement 0 msgbox RustboroCity_Text_166E7E, 4 - closebutton - move 9, RustboroCity_Movement_14C5DB - waitmove 0 - disappear 9 - movespriteperm 9, 30, 10 + closemessage + applymovement 9, RustboroCity_Movement_14C5DB + waitmovement 0 + removeobject 9 + setobjectxyperm 9, 30, 10 clearflag 732 setflag 142 setvar 0x405a, 2 @@ -200,30 +200,30 @@ RustboroCity_EventScript_14C4F4:: @ 814C4F4 return @ 814C56F - move 9, RustboroCity_Movement_14C5E3 - waitmove 0 + applymovement 9, RustboroCity_Movement_14C5E3 + waitmovement 0 return @ 814C57A - move 9, RustboroCity_Movement_14C5E7 - waitmove 0 + applymovement 9, RustboroCity_Movement_14C5E7 + waitmovement 0 return @ 814C585 - move 9, RustboroCity_Movement_14C5EC - waitmove 0 + applymovement 9, RustboroCity_Movement_14C5EC + waitmovement 0 return @ 814C590 - move 9, RustboroCity_Movement_14C5F1 - waitmove 0 + applymovement 9, RustboroCity_Movement_14C5F1 + waitmovement 0 return @ 814C59B - move 9, RustboroCity_Movement_14C5F7 - waitmove 0 - move 255, RustboroCity_Movement_1A0841 - waitmove 0 + applymovement 9, RustboroCity_Movement_14C5F7 + waitmovement 0 + applymovement 255, RustboroCity_Movement_1A0841 + waitmovement 0 return @ 814C5B0 @@ -327,105 +327,105 @@ RustboroCity_EventScript_14C5FF:: @ 814C5FF lock faceplayer checkflag 143 - jumpeq RustboroCity_EventScript_14C614 + goto_if_eq RustboroCity_EventScript_14C614 msgbox RustboroCity_Text_166F6B, 4 release end RustboroCity_EventScript_14C614:: @ 814C614 - checksound + waitse setvar 0x4001, 4 - jump RustboroCity_EventScript_14C77D + goto RustboroCity_EventScript_14C77D end RustboroCity_EventScript_14C620:: @ 814C620 lockall setvar 0x4001, 0 - jump RustboroCity_EventScript_14C650 + goto RustboroCity_EventScript_14C650 end RustboroCity_EventScript_14C62C:: @ 814C62C lockall setvar 0x4001, 1 - jump RustboroCity_EventScript_14C650 + goto RustboroCity_EventScript_14C650 end RustboroCity_EventScript_14C638:: @ 814C638 lockall setvar 0x4001, 2 - jump RustboroCity_EventScript_14C650 + goto RustboroCity_EventScript_14C650 end RustboroCity_EventScript_14C644:: @ 814C644 lockall setvar 0x4001, 3 - jump RustboroCity_EventScript_14C650 + goto RustboroCity_EventScript_14C650 end RustboroCity_EventScript_14C650:: @ 814C650 compare 0x4001, 0 - callif 1, RustboroCity_EventScript_14C691 + call_if 1, RustboroCity_EventScript_14C691 compare 0x4001, 1 - callif 1, RustboroCity_EventScript_14C6BD + call_if 1, RustboroCity_EventScript_14C6BD compare 0x4001, 2 - callif 1, RustboroCity_EventScript_14C6E9 + call_if 1, RustboroCity_EventScript_14C6E9 compare 0x4001, 3 - callif 1, RustboroCity_EventScript_14C715 + call_if 1, RustboroCity_EventScript_14C715 setflag 159 setvar 0x405a, 3 - moveoffscreen 9 + moveobjectoffscreen 9 msgbox RustboroCity_Text_166EA5, 4 releaseall end RustboroCity_EventScript_14C691:: @ 814C691 - move 9, RustboroCity_Movement_1A0841 - waitmove 0 - playsfx 21 - move 9, RustboroCity_Movement_1A0833 - waitmove 0 - move 9, RustboroCity_Movement_1A0835 - waitmove 0 - move 255, RustboroCity_Movement_1A0845 - waitmove 0 + applymovement 9, RustboroCity_Movement_1A0841 + waitmovement 0 + playse 21 + applymovement 9, RustboroCity_Movement_1A0833 + waitmovement 0 + applymovement 9, RustboroCity_Movement_1A0835 + waitmovement 0 + applymovement 255, RustboroCity_Movement_1A0845 + waitmovement 0 return RustboroCity_EventScript_14C6BD:: @ 814C6BD - move 9, RustboroCity_Movement_1A083F - waitmove 0 - playsfx 21 - move 9, RustboroCity_Movement_1A0833 - waitmove 0 - move 9, RustboroCity_Movement_1A0835 - waitmove 0 - move 255, RustboroCity_Movement_1A0843 - waitmove 0 + applymovement 9, RustboroCity_Movement_1A083F + waitmovement 0 + playse 21 + applymovement 9, RustboroCity_Movement_1A0833 + waitmovement 0 + applymovement 9, RustboroCity_Movement_1A0835 + waitmovement 0 + applymovement 255, RustboroCity_Movement_1A0843 + waitmovement 0 return RustboroCity_EventScript_14C6E9:: @ 814C6E9 - move 9, RustboroCity_Movement_1A0845 - waitmove 0 - playsfx 21 - move 9, RustboroCity_Movement_1A0833 - waitmove 0 - move 9, RustboroCity_Movement_1A0835 - waitmove 0 - move 255, RustboroCity_Movement_1A0841 - waitmove 0 + applymovement 9, RustboroCity_Movement_1A0845 + waitmovement 0 + playse 21 + applymovement 9, RustboroCity_Movement_1A0833 + waitmovement 0 + applymovement 9, RustboroCity_Movement_1A0835 + waitmovement 0 + applymovement 255, RustboroCity_Movement_1A0841 + waitmovement 0 return RustboroCity_EventScript_14C715:: @ 814C715 - move 9, RustboroCity_Movement_1A0845 - waitmove 0 - playsfx 21 - move 9, RustboroCity_Movement_1A0833 - waitmove 0 - move 9, RustboroCity_Movement_1A0835 - waitmove 0 - move 9, RustboroCity_Movement_14C74B - waitmove 0 - move 255, RustboroCity_Movement_1A0841 - waitmove 0 + applymovement 9, RustboroCity_Movement_1A0845 + waitmovement 0 + playse 21 + applymovement 9, RustboroCity_Movement_1A0833 + waitmovement 0 + applymovement 9, RustboroCity_Movement_1A0835 + waitmovement 0 + applymovement 9, RustboroCity_Movement_14C74B + waitmovement 0 + applymovement 255, RustboroCity_Movement_1A0841 + waitmovement 0 return RustboroCity_Movement_14C74B:: @ 814C74B @@ -435,48 +435,48 @@ RustboroCity_Movement_14C74B:: @ 814C74B RustboroCity_EventScript_14C74D:: @ 814C74D lockall setvar 0x4001, 0 - jump RustboroCity_EventScript_14C77D + goto RustboroCity_EventScript_14C77D end RustboroCity_EventScript_14C759:: @ 814C759 lockall setvar 0x4001, 1 - jump RustboroCity_EventScript_14C77D + goto RustboroCity_EventScript_14C77D end RustboroCity_EventScript_14C765:: @ 814C765 lockall setvar 0x4001, 2 - jump RustboroCity_EventScript_14C77D + goto RustboroCity_EventScript_14C77D end RustboroCity_EventScript_14C771:: @ 814C771 lockall setvar 0x4001, 3 - jump RustboroCity_EventScript_14C77D + goto RustboroCity_EventScript_14C77D end RustboroCity_EventScript_14C77D:: @ 814C77D compare 0x4001, 0 - callif 1, RustboroCity_EventScript_14C7FE + call_if 1, RustboroCity_EventScript_14C7FE compare 0x4001, 1 - callif 1, RustboroCity_EventScript_14C82A + call_if 1, RustboroCity_EventScript_14C82A compare 0x4001, 2 - callif 1, RustboroCity_EventScript_14C856 + call_if 1, RustboroCity_EventScript_14C856 compare 0x4001, 3 - callif 1, RustboroCity_EventScript_14C882 + call_if 1, RustboroCity_EventScript_14C882 compare 0x4001, 4 - callif 1, RustboroCity_EventScript_14C8B8 + call_if 1, RustboroCity_EventScript_14C8B8 msgbox RustboroCity_Text_166FB4, 4 giveitem ITEM_GREAT_BALL compare RESULT, 0 - callif 1, RustboroCity_EventScript_14C7F5 + call_if 1, RustboroCity_EventScript_14C7F5 msgbox RustboroCity_Text_16707F, 4 - closebutton + closemessage setflag 144 setflag 732 setvar 0x405a, 5 - pause 30 + delay 30 warp RustboroCity_DevonCorp_3F, 255, 2, 2 waitstate releaseall @@ -487,75 +487,75 @@ RustboroCity_EventScript_14C7F5:: @ 814C7F5 return RustboroCity_EventScript_14C7FE:: @ 814C7FE - move 9, RustboroCity_Movement_1A0841 - waitmove 0 - playsfx 21 - move 9, RustboroCity_Movement_1A0833 - waitmove 0 - move 9, RustboroCity_Movement_1A0835 - waitmove 0 - move 255, RustboroCity_Movement_1A0845 - waitmove 0 + applymovement 9, RustboroCity_Movement_1A0841 + waitmovement 0 + playse 21 + applymovement 9, RustboroCity_Movement_1A0833 + waitmovement 0 + applymovement 9, RustboroCity_Movement_1A0835 + waitmovement 0 + applymovement 255, RustboroCity_Movement_1A0845 + waitmovement 0 return RustboroCity_EventScript_14C82A:: @ 814C82A - move 9, RustboroCity_Movement_1A0843 - waitmove 0 - playsfx 21 - move 9, RustboroCity_Movement_1A0833 - waitmove 0 - move 9, RustboroCity_Movement_1A0835 - waitmove 0 - move 255, RustboroCity_Movement_1A083F - waitmove 0 + applymovement 9, RustboroCity_Movement_1A0843 + waitmovement 0 + playse 21 + applymovement 9, RustboroCity_Movement_1A0833 + waitmovement 0 + applymovement 9, RustboroCity_Movement_1A0835 + waitmovement 0 + applymovement 255, RustboroCity_Movement_1A083F + waitmovement 0 return RustboroCity_EventScript_14C856:: @ 814C856 - move 9, RustboroCity_Movement_1A0845 - waitmove 0 - playsfx 21 - move 9, RustboroCity_Movement_1A0833 - waitmove 0 - move 9, RustboroCity_Movement_1A0835 - waitmove 0 - move 255, RustboroCity_Movement_1A0841 - waitmove 0 + applymovement 9, RustboroCity_Movement_1A0845 + waitmovement 0 + playse 21 + applymovement 9, RustboroCity_Movement_1A0833 + waitmovement 0 + applymovement 9, RustboroCity_Movement_1A0835 + waitmovement 0 + applymovement 255, RustboroCity_Movement_1A0841 + waitmovement 0 return RustboroCity_EventScript_14C882:: @ 814C882 - move 9, RustboroCity_Movement_1A0845 - waitmove 0 - playsfx 21 - move 9, RustboroCity_Movement_1A0833 - waitmove 0 - move 9, RustboroCity_Movement_1A0835 - waitmove 0 - move 9, RustboroCity_Movement_14C74B - waitmove 0 - move 255, RustboroCity_Movement_1A0841 - waitmove 0 + applymovement 9, RustboroCity_Movement_1A0845 + waitmovement 0 + playse 21 + applymovement 9, RustboroCity_Movement_1A0833 + waitmovement 0 + applymovement 9, RustboroCity_Movement_1A0835 + waitmovement 0 + applymovement 9, RustboroCity_Movement_14C74B + waitmovement 0 + applymovement 255, RustboroCity_Movement_1A0841 + waitmovement 0 return RustboroCity_EventScript_14C8B8:: @ 814C8B8 - move 9, RustboroCity_Movement_1A083F - waitmove 0 - playsfx 21 - move 9, RustboroCity_Movement_1A0833 - waitmove 0 - move 9, RustboroCity_Movement_1A0835 - waitmove 0 + applymovement 9, RustboroCity_Movement_1A083F + waitmovement 0 + playse 21 + applymovement 9, RustboroCity_Movement_1A0833 + waitmovement 0 + applymovement 9, RustboroCity_Movement_1A0835 + waitmovement 0 return RustboroCity_EventScript_14C8DA:: @ 814C8DA lock faceplayer checkflag 288 - jumpeq RustboroCity_EventScript_14C917 - checkgender + goto_if_eq RustboroCity_EventScript_14C917 + checkplayergender compare RESULT, 0 - jumpeq RustboroCity_EventScript_14C8FD + goto_if_eq RustboroCity_EventScript_14C8FD compare RESULT, 1 - jumpeq RustboroCity_EventScript_14C90A + goto_if_eq RustboroCity_EventScript_14C90A end RustboroCity_EventScript_14C8FD:: @ 814C8FD @@ -571,11 +571,11 @@ RustboroCity_EventScript_14C90A:: @ 814C90A end RustboroCity_EventScript_14C917:: @ 814C917 - checkgender + checkplayergender compare RESULT, 0 - jumpeq RustboroCity_EventScript_14C92F + goto_if_eq RustboroCity_EventScript_14C92F compare RESULT, 1 - jumpeq RustboroCity_EventScript_14C939 + goto_if_eq RustboroCity_EventScript_14C939 end RustboroCity_EventScript_14C92F:: @ 814C92F diff --git a/data/scripts/maps/RustboroCity_CuttersHouse.inc b/data/scripts/maps/RustboroCity_CuttersHouse.inc index d400de1ef..3e98746f3 100644 --- a/data/scripts/maps/RustboroCity_CuttersHouse.inc +++ b/data/scripts/maps/RustboroCity_CuttersHouse.inc @@ -5,7 +5,7 @@ RustboroCity_CuttersHouse_EventScript_157D27:: @ 8157D27 lock faceplayer checkflag 137 - jumpeq RustboroCity_CuttersHouse_EventScript_157D53 + goto_if_eq RustboroCity_CuttersHouse_EventScript_157D53 msgbox RustboroCity_CuttersHouse_Text_18509C, 4 giveitem ITEM_HM01 setflag 137 diff --git a/data/scripts/maps/RustboroCity_DevonCorp_1F.inc b/data/scripts/maps/RustboroCity_DevonCorp_1F.inc index 97a59257f..48d8aaf9f 100644 --- a/data/scripts/maps/RustboroCity_DevonCorp_1F.inc +++ b/data/scripts/maps/RustboroCity_DevonCorp_1F.inc @@ -4,21 +4,21 @@ RustboroCity_DevonCorp_1F_MapScripts:: @ 8157406 RustboroCity_DevonCorp_1F_MapScript1_15740C:: @ 815740C checkflag 144 - callif 0, RustboroCity_DevonCorp_1F_EventScript_157416 + call_if 0, RustboroCity_DevonCorp_1F_EventScript_157416 end RustboroCity_DevonCorp_1F_EventScript_157416:: @ 8157416 - movespriteperm 2, 14, 2 - spritebehave 2, 8 + setobjectxyperm 2, 14, 2 + setobjectmovementtype 2, 8 return RustboroCity_DevonCorp_1F_EventScript_157422:: @ 8157422 lock faceplayer checkflag 144 - jumpeq RustboroCity_DevonCorp_1F_EventScript_15744A + goto_if_eq RustboroCity_DevonCorp_1F_EventScript_15744A checkflag 142 - jumpeq RustboroCity_DevonCorp_1F_EventScript_157440 + goto_if_eq RustboroCity_DevonCorp_1F_EventScript_157440 msgbox RustboroCity_DevonCorp_1F_Text_1829A4, 4 release end @@ -37,11 +37,11 @@ RustboroCity_DevonCorp_1F_EventScript_157454:: @ 8157454 lock faceplayer checkflag 144 - jumpeq RustboroCity_DevonCorp_1F_EventScript_15747B + goto_if_eq RustboroCity_DevonCorp_1F_EventScript_15747B checkflag 143 - jumpeq RustboroCity_DevonCorp_1F_EventScript_157485 + goto_if_eq RustboroCity_DevonCorp_1F_EventScript_157485 checkflag 142 - jumpeq RustboroCity_DevonCorp_1F_EventScript_157485 + goto_if_eq RustboroCity_DevonCorp_1F_EventScript_157485 msgbox RustboroCity_DevonCorp_1F_Text_182AF0, 4 release end @@ -60,11 +60,11 @@ RustboroCity_DevonCorp_1F_EventScript_15748F:: @ 815748F lock faceplayer checkflag 144 - jumpeq RustboroCity_DevonCorp_1F_EventScript_1574B6 + goto_if_eq RustboroCity_DevonCorp_1F_EventScript_1574B6 checkflag 143 - jumpeq RustboroCity_DevonCorp_1F_EventScript_1574C0 + goto_if_eq RustboroCity_DevonCorp_1F_EventScript_1574C0 checkflag 142 - jumpeq RustboroCity_DevonCorp_1F_EventScript_1574C0 + goto_if_eq RustboroCity_DevonCorp_1F_EventScript_1574C0 msgbox RustboroCity_DevonCorp_1F_Text_1828EE, 4 release end diff --git a/data/scripts/maps/RustboroCity_DevonCorp_2F.inc b/data/scripts/maps/RustboroCity_DevonCorp_2F.inc index e35015b3e..f40c1b87b 100644 --- a/data/scripts/maps/RustboroCity_DevonCorp_2F.inc +++ b/data/scripts/maps/RustboroCity_DevonCorp_2F.inc @@ -4,7 +4,7 @@ RustboroCity_DevonCorp_2F_MapScripts:: @ 81574CA RustboroCity_DevonCorp_2F_MapScript1_1574D0:: @ 81574D0 compare 0x40c4, 1 - callif 1, RustboroCity_DevonCorp_2F_EventScript_1574DC + call_if 1, RustboroCity_DevonCorp_2F_EventScript_1574DC end RustboroCity_DevonCorp_2F_EventScript_1574DC:: @ 81574DC @@ -15,7 +15,7 @@ RustboroCity_DevonCorp_2F_EventScript_1574E2:: @ 81574E2 lock faceplayer compare 0x40c4, 1 - callif 1, RustboroCity_DevonCorp_2F_EventScript_1574DC + call_if 1, RustboroCity_DevonCorp_2F_EventScript_1574DC msgbox RustboroCity_DevonCorp_2F_Text_182B81, 4 release end @@ -24,9 +24,9 @@ RustboroCity_DevonCorp_2F_EventScript_1574F9:: @ 81574F9 lock faceplayer compare 0x40c4, 1 - callif 1, RustboroCity_DevonCorp_2F_EventScript_1574DC + call_if 1, RustboroCity_DevonCorp_2F_EventScript_1574DC checkflag 287 - jumpeq RustboroCity_DevonCorp_2F_EventScript_157519 + goto_if_eq RustboroCity_DevonCorp_2F_EventScript_157519 msgbox RustboroCity_DevonCorp_2F_Text_182BD8, 4 release end @@ -40,9 +40,9 @@ RustboroCity_DevonCorp_2F_EventScript_157523:: @ 8157523 lock faceplayer compare 0x40c4, 1 - callif 1, RustboroCity_DevonCorp_2F_EventScript_1574DC + call_if 1, RustboroCity_DevonCorp_2F_EventScript_1574DC checkflag 188 - jumpeq RustboroCity_DevonCorp_2F_EventScript_157543 + goto_if_eq RustboroCity_DevonCorp_2F_EventScript_157543 msgbox RustboroCity_DevonCorp_2F_Text_182D2A, 4 release end @@ -56,7 +56,7 @@ RustboroCity_DevonCorp_2F_EventScript_15754D:: @ 815754D lock faceplayer compare 0x40c4, 1 - callif 1, RustboroCity_DevonCorp_2F_EventScript_1574DC + call_if 1, RustboroCity_DevonCorp_2F_EventScript_1574DC msgbox RustboroCity_DevonCorp_2F_Text_182E6B, 4 release end @@ -65,30 +65,30 @@ RustboroCity_DevonCorp_2F_EventScript_157564:: @ 8157564 lock faceplayer compare 0x40c4, 2 - jumpeq RustboroCity_DevonCorp_2F_EventScript_15764A + goto_if_eq RustboroCity_DevonCorp_2F_EventScript_15764A compare 0x40c4, 1 - jumpeq RustboroCity_DevonCorp_2F_EventScript_157640 + goto_if_eq RustboroCity_DevonCorp_2F_EventScript_157640 msgbox RustboroCity_DevonCorp_2F_Text_182ED5, 4 checkitem ITEM_ROOT_FOSSIL, 1 compare RESULT, 1 - jumpeq RustboroCity_DevonCorp_2F_EventScript_1575A6 + goto_if_eq RustboroCity_DevonCorp_2F_EventScript_1575A6 checkitem ITEM_CLAW_FOSSIL, 1 compare RESULT, 1 - jumpeq RustboroCity_DevonCorp_2F_EventScript_1575EE + goto_if_eq RustboroCity_DevonCorp_2F_EventScript_1575EE release end RustboroCity_DevonCorp_2F_EventScript_1575A6:: @ 81575A6 - closebutton - playsfx 21 - move 5, RustboroCity_DevonCorp_2F_Movement_1A0833 - waitmove 0 - move 5, RustboroCity_DevonCorp_2F_Movement_1A0835 - waitmove 0 + closemessage + playse 21 + applymovement 5, RustboroCity_DevonCorp_2F_Movement_1A0833 + waitmovement 0 + applymovement 5, RustboroCity_DevonCorp_2F_Movement_1A0835 + waitmovement 0 msgbox RustboroCity_DevonCorp_2F_Text_182F35, 5 compare RESULT, 0 - jumpeq RustboroCity_DevonCorp_2F_EventScript_157636 - bufferitem 0, ITEM_ROOT_FOSSIL + goto_if_eq RustboroCity_DevonCorp_2F_EventScript_157636 + getitemname 0, ITEM_ROOT_FOSSIL msgbox RustboroCity_DevonCorp_2F_Text_183023, 4 removeitem ITEM_ROOT_FOSSIL, 1 setvar 0x40c4, 1 @@ -97,16 +97,16 @@ RustboroCity_DevonCorp_2F_EventScript_1575A6:: @ 81575A6 end RustboroCity_DevonCorp_2F_EventScript_1575EE:: @ 81575EE - closebutton - playsfx 21 - move 5, RustboroCity_DevonCorp_2F_Movement_1A0833 - waitmove 0 - move 5, RustboroCity_DevonCorp_2F_Movement_1A0835 - waitmove 0 + closemessage + playse 21 + applymovement 5, RustboroCity_DevonCorp_2F_Movement_1A0833 + waitmovement 0 + applymovement 5, RustboroCity_DevonCorp_2F_Movement_1A0835 + waitmovement 0 msgbox RustboroCity_DevonCorp_2F_Text_182F35, 5 compare RESULT, 0 - jumpeq RustboroCity_DevonCorp_2F_EventScript_157636 - bufferitem 0, ITEM_CLAW_FOSSIL + goto_if_eq RustboroCity_DevonCorp_2F_EventScript_157636 + getitemname 0, ITEM_CLAW_FOSSIL msgbox RustboroCity_DevonCorp_2F_Text_183023, 4 removeitem ITEM_CLAW_FOSSIL, 1 setvar 0x40c4, 1 @@ -126,48 +126,48 @@ RustboroCity_DevonCorp_2F_EventScript_157640:: @ 8157640 RustboroCity_DevonCorp_2F_EventScript_15764A:: @ 815764A compare 0x40c5, 1 - jumpeq RustboroCity_DevonCorp_2F_EventScript_157661 + goto_if_eq RustboroCity_DevonCorp_2F_EventScript_157661 compare 0x40c5, 2 - jumpeq RustboroCity_DevonCorp_2F_EventScript_1576B4 + goto_if_eq RustboroCity_DevonCorp_2F_EventScript_1576B4 end RustboroCity_DevonCorp_2F_EventScript_157661:: @ 8157661 - bufferpoke 1, SPECIES_LILEEP + getspeciesname 1, SPECIES_LILEEP msgbox RustboroCity_DevonCorp_2F_Text_183124, 4 countpokemon compare RESULT, 6 - jumpeq RustboroCity_DevonCorp_2F_EventScript_157707 + goto_if_eq RustboroCity_DevonCorp_2F_EventScript_157707 copyvar 0x8004, RESULT setvar 0x40c4, 0 setflag 267 - fanfare 370 + playfanfare 370 message RustboroCity_DevonCorp_2F_Text_18319E waitfanfare - waittext - givepokemon SPECIES_LILEEP, 20, ITEM_NONE, 0x0, 0x0, 0 + waitmessage + givepoke SPECIES_LILEEP, 20, ITEM_NONE, 0x0, 0x0, 0 msgbox RustboroCity_DevonCorp_2F_Text_1A1102, 5 compare RESULT, 1 - callif 1, RustboroCity_DevonCorp_2F_EventScript_1A0678 + call_if 1, RustboroCity_DevonCorp_2F_EventScript_1A0678 release end RustboroCity_DevonCorp_2F_EventScript_1576B4:: @ 81576B4 - bufferpoke 1, SPECIES_ANORITH + getspeciesname 1, SPECIES_ANORITH msgbox RustboroCity_DevonCorp_2F_Text_183124, 4 countpokemon compare RESULT, 6 - jumpeq RustboroCity_DevonCorp_2F_EventScript_157707 + goto_if_eq RustboroCity_DevonCorp_2F_EventScript_157707 copyvar 0x8004, RESULT setvar 0x40c4, 0 setflag 267 - fanfare 370 + playfanfare 370 message RustboroCity_DevonCorp_2F_Text_18319E waitfanfare - waittext - givepokemon SPECIES_ANORITH, 20, ITEM_NONE, 0x0, 0x0, 0 + waitmessage + givepoke SPECIES_ANORITH, 20, ITEM_NONE, 0x0, 0x0, 0 msgbox RustboroCity_DevonCorp_2F_Text_1A1102, 5 compare RESULT, 1 - callif 1, RustboroCity_DevonCorp_2F_EventScript_1A0678 + call_if 1, RustboroCity_DevonCorp_2F_EventScript_1A0678 release end diff --git a/data/scripts/maps/RustboroCity_DevonCorp_3F.inc b/data/scripts/maps/RustboroCity_DevonCorp_3F.inc index 2b749c873..6f0152e60 100644 --- a/data/scripts/maps/RustboroCity_DevonCorp_3F.inc +++ b/data/scripts/maps/RustboroCity_DevonCorp_3F.inc @@ -6,12 +6,12 @@ RustboroCity_DevonCorp_3F_MapScripts:: @ 8157711 RustboroCity_DevonCorp_3F_MapScript1_157721:: @ 8157721 compare 0x408f, 0 - callif 1, RustboroCity_DevonCorp_3F_EventScript_15772D + call_if 1, RustboroCity_DevonCorp_3F_EventScript_15772D end RustboroCity_DevonCorp_3F_EventScript_15772D:: @ 815772D - movespriteperm 2, 3, 2 - spritebehave 2, 9 + setobjectxyperm 2, 3, 2 + setobjectmovementtype 2, 9 return RustboroCity_DevonCorp_3F_MapScript2_157739:: @ 8157739 @@ -19,7 +19,7 @@ RustboroCity_DevonCorp_3F_MapScript2_157739:: @ 8157739 .2byte 0 RustboroCity_DevonCorp_3F_EventScript_157743:: @ 8157743 - spriteface 255, 4 + turnobject 255, 4 end RustboroCity_DevonCorp_3F_MapScript2_157748:: @ 8157748 @@ -29,31 +29,31 @@ RustboroCity_DevonCorp_3F_MapScript2_157748:: @ 8157748 RustboroCity_DevonCorp_3F_EventScript_157752:: @ 8157752 lockall msgbox RustboroCity_DevonCorp_3F_Text_18374C, 4 - closebutton - move 2, RustboroCity_DevonCorp_3F_Movement_157815 - waitmove 0 - pause 80 - move 2, RustboroCity_DevonCorp_3F_Movement_15781E - waitmove 0 + closemessage + applymovement 2, RustboroCity_DevonCorp_3F_Movement_157815 + waitmovement 0 + delay 80 + applymovement 2, RustboroCity_DevonCorp_3F_Movement_15781E + waitmovement 0 msgbox RustboroCity_DevonCorp_3F_Text_183903, 4 - closebutton - playmusic 420, 0 - move 2, RustboroCity_DevonCorp_3F_Movement_157803 - move 255, RustboroCity_DevonCorp_3F_Movement_157827 - waitmove 0 + closemessage + playbgm 420, 0 + applymovement 2, RustboroCity_DevonCorp_3F_Movement_157803 + applymovement 255, RustboroCity_DevonCorp_3F_Movement_157827 + waitmovement 0 msgbox RustboroCity_DevonCorp_3F_Text_18394A, 4 - closebutton - fadedefault - move 2, RustboroCity_DevonCorp_3F_Movement_157812 - move 255, RustboroCity_DevonCorp_3F_Movement_157835 - waitmove 0 + closemessage + fadedefaultbgm + applymovement 2, RustboroCity_DevonCorp_3F_Movement_157812 + applymovement 255, RustboroCity_DevonCorp_3F_Movement_157835 + waitmovement 0 msgbox RustboroCity_DevonCorp_3F_Text_18320B, 4 giveitem ITEM_LETTER msgbox RustboroCity_DevonCorp_3F_Text_18337E, 4 - fanfare 370 + playfanfare 370 message RustboroCity_DevonCorp_3F_Text_183422 waitfanfare - waittext + waitmessage setflag 2050 setflag 188 msgbox RustboroCity_DevonCorp_3F_Text_183439, 4 @@ -147,13 +147,13 @@ RustboroCity_DevonCorp_3F_EventScript_15783B:: @ 815783B lock faceplayer checkflag 272 - jumpeq RustboroCity_DevonCorp_3F_EventScript_15789B + goto_if_eq RustboroCity_DevonCorp_3F_EventScript_15789B checkflag 189 - jumpeq RustboroCity_DevonCorp_3F_EventScript_157864 + goto_if_eq RustboroCity_DevonCorp_3F_EventScript_157864 msgbox RustboroCity_DevonCorp_3F_Text_18351E, 4 - closebutton - move LAST_TALKED, RustboroCity_DevonCorp_3F_Movement_1A083D - waitmove 0 + closemessage + applymovement LAST_TALKED, RustboroCity_DevonCorp_3F_Movement_1A083D + waitmovement 0 release end @@ -161,20 +161,20 @@ RustboroCity_DevonCorp_3F_EventScript_157864:: @ 8157864 msgbox RustboroCity_DevonCorp_3F_Text_18353E, 4 giveitem ITEM_EXP_SHARE compare RESULT, 0 - jumpeq RustboroCity_DevonCorp_3F_EventScript_1A029B + goto_if_eq RustboroCity_DevonCorp_3F_EventScript_1A029B setflag 272 msgbox RustboroCity_DevonCorp_3F_Text_1835B3, 4 - closebutton - move LAST_TALKED, RustboroCity_DevonCorp_3F_Movement_1A083D - waitmove 0 + closemessage + applymovement LAST_TALKED, RustboroCity_DevonCorp_3F_Movement_1A083D + waitmovement 0 release end RustboroCity_DevonCorp_3F_EventScript_15789B:: @ 815789B msgbox RustboroCity_DevonCorp_3F_Text_18368D, 4 - closebutton - move LAST_TALKED, RustboroCity_DevonCorp_3F_Movement_1A083D - waitmove 0 + closemessage + applymovement LAST_TALKED, RustboroCity_DevonCorp_3F_Movement_1A083D + waitmovement 0 release end @@ -182,7 +182,7 @@ RustboroCity_DevonCorp_3F_EventScript_1578B0:: @ 81578B0 lock faceplayer checkflag 256 - jumpeq RustboroCity_DevonCorp_3F_EventScript_1578C5 + goto_if_eq RustboroCity_DevonCorp_3F_EventScript_1578C5 msgbox RustboroCity_DevonCorp_3F_Text_18395C, 4 release end diff --git a/data/scripts/maps/RustboroCity_Flat2_1F.inc b/data/scripts/maps/RustboroCity_Flat2_1F.inc index 5aa91d5d1..b6b8b41b1 100644 --- a/data/scripts/maps/RustboroCity_Flat2_1F.inc +++ b/data/scripts/maps/RustboroCity_Flat2_1F.inc @@ -8,8 +8,8 @@ RustboroCity_Flat2_1F_EventScript_157D7A:: @ 8157D7A RustboroCity_Flat2_1F_EventScript_157D83:: @ 8157D83 lock faceplayer - checksound - pokecry SPECIES_SKITTY, 0 + waitse + playpokecry SPECIES_SKITTY, 0 msgbox RustboroCity_Flat2_1F_Text_185410, 4 waitpokecry release diff --git a/data/scripts/maps/RustboroCity_Flat2_2F.inc b/data/scripts/maps/RustboroCity_Flat2_2F.inc index d6e0c92b3..0dfec5cfa 100644 --- a/data/scripts/maps/RustboroCity_Flat2_2F.inc +++ b/data/scripts/maps/RustboroCity_Flat2_2F.inc @@ -9,11 +9,11 @@ RustboroCity_Flat2_2F_EventScript_157DA0:: @ 8157DA0 lock faceplayer checkflag 213 - jumpeq RustboroCity_Flat2_2F_EventScript_157DCF + goto_if_eq RustboroCity_Flat2_2F_EventScript_157DCF msgbox RustboroCity_Flat2_2F_Text_185461, 4 giveitem ITEM_PREMIER_BALL compare RESULT, 0 - jumpeq RustboroCity_Flat2_2F_EventScript_1A029B + goto_if_eq RustboroCity_Flat2_2F_EventScript_1A029B setflag 213 release end diff --git a/data/scripts/maps/RustboroCity_Gym.inc b/data/scripts/maps/RustboroCity_Gym.inc index e4f91f82e..b1bbfb8d8 100644 --- a/data/scripts/maps/RustboroCity_Gym.inc +++ b/data/scripts/maps/RustboroCity_Gym.inc @@ -4,14 +4,14 @@ RustboroCity_Gym_MapScripts:: @ 81578D8 RustboroCity_Gym_EventScript_1578D9:: @ 81578D9 trainerbattle 1, OPPONENT_ROXANNE, 0, RustboroCity_Gym_Text_183EE5, RustboroCity_Gym_Text_183FC4, RustboroCity_Gym_EventScript_1578FE checkflag 165 - jumpif 0, RustboroCity_Gym_EventScript_15793C + goto_if 0, RustboroCity_Gym_EventScript_15793C msgbox RustboroCity_Gym_Text_184252, 4 release end RustboroCity_Gym_EventScript_1578FE:: @ 81578FE message RustboroCity_Gym_Text_1840AB - waittext + waitmessage call RustboroCity_Gym_EventScript_1A02C5 msgbox RustboroCity_Gym_Text_1840D5, 4 setflag 1201 @@ -21,14 +21,14 @@ RustboroCity_Gym_EventScript_1578FE:: @ 81578FE setvar 0x8008, 1 call RustboroCity_Gym_EventScript_1A01C0 compare 0x4085, 6 - callif 1, RustboroCity_Gym_EventScript_1A00FB - jump RustboroCity_Gym_EventScript_15793C + call_if 1, RustboroCity_Gym_EventScript_1A00FB + goto RustboroCity_Gym_EventScript_15793C end RustboroCity_Gym_EventScript_15793C:: @ 815793C giveitem ITEM_TM39 compare RESULT, 0 - jumpeq RustboroCity_Gym_EventScript_1A029B + goto_if_eq RustboroCity_Gym_EventScript_1A029B setflag 165 msgbox RustboroCity_Gym_Text_184170, 4 release @@ -48,7 +48,7 @@ RustboroCity_Gym_EventScript_15798E:: @ 815798E lock faceplayer checkflag 1201 - jumpeq RustboroCity_Gym_EventScript_1579A3 + goto_if_eq RustboroCity_Gym_EventScript_1579A3 msgbox RustboroCity_Gym_Text_183A4B, 4 release end @@ -61,15 +61,15 @@ RustboroCity_Gym_EventScript_1579A3:: @ 81579A3 RustboroCity_Gym_EventScript_1579AD:: @ 81579AD lockall checkflag 2055 - jumpeq RustboroCity_Gym_EventScript_1579CD - jump RustboroCity_Gym_EventScript_1579D7 + goto_if_eq RustboroCity_Gym_EventScript_1579CD + goto RustboroCity_Gym_EventScript_1579D7 end RustboroCity_Gym_EventScript_1579BD:: @ 81579BD lockall checkflag 2055 - jumpeq RustboroCity_Gym_EventScript_1579CD - jump RustboroCity_Gym_EventScript_1579D7 + goto_if_eq RustboroCity_Gym_EventScript_1579CD + goto RustboroCity_Gym_EventScript_1579D7 end RustboroCity_Gym_EventScript_1579CD:: @ 81579CD diff --git a/data/scripts/maps/RustboroCity_House1.inc b/data/scripts/maps/RustboroCity_House1.inc index 402fff1d3..b983617e0 100644 --- a/data/scripts/maps/RustboroCity_House1.inc +++ b/data/scripts/maps/RustboroCity_House1.inc @@ -5,24 +5,24 @@ RustboroCity_House1_EventScript_157C7D:: @ 8157C7D lock faceplayer checkflag 153 - jumpeq RustboroCity_House1_EventScript_157D13 + goto_if_eq RustboroCity_House1_EventScript_157D13 setvar 0x8008, 0 copyvar 0x8004, 0x8008 - specialval RESULT, sub_804D89C + specialvar RESULT, sub_804D89C copyvar 0x8009, RESULT msgbox RustboroCity_House1_Text_184EBA, 5 compare RESULT, 0 - jumpeq RustboroCity_House1_EventScript_157CFB + goto_if_eq RustboroCity_House1_EventScript_157CFB special sub_80F9A0C waitstate copyvar 0x800a, 0x8004 compare 0x8004, 255 - jumpeq RustboroCity_House1_EventScript_157CFB + goto_if_eq RustboroCity_House1_EventScript_157CFB copyvar 0x8005, 0x800a - specialval RESULT, sub_804DB2C + specialvar RESULT, sub_804DB2C copyvar 0x800b, RESULT - comparevars RESULT, 0x8009 - jumpif 5, RustboroCity_House1_EventScript_157D05 + compare RESULT, 0x8009 + goto_if 5, RustboroCity_House1_EventScript_157D05 copyvar 0x8004, 0x8008 copyvar 0x8005, 0x800a special sub_804DB68 @@ -39,7 +39,7 @@ RustboroCity_House1_EventScript_157CFB:: @ 8157CFB end RustboroCity_House1_EventScript_157D05:: @ 8157D05 - bufferpoke 0, 0x8009 + getspeciesname 0, 0x8009 msgbox RustboroCity_House1_Text_184F8F, 4 release end diff --git a/data/scripts/maps/RustboroCity_House3.inc b/data/scripts/maps/RustboroCity_House3.inc index 0e81ed158..a5088175e 100644 --- a/data/scripts/maps/RustboroCity_House3.inc +++ b/data/scripts/maps/RustboroCity_House3.inc @@ -12,8 +12,8 @@ RustboroCity_House3_EventScript_157DF6:: @ 8157DF6 RustboroCity_House3_EventScript_157DFF:: @ 8157DFF lock faceplayer - checksound - pokecry SPECIES_PIKACHU, 0 + waitse + playpokecry SPECIES_PIKACHU, 0 msgbox RustboroCity_House3_Text_18567D, 4 waitpokecry release diff --git a/data/scripts/maps/RustboroCity_Mart.inc b/data/scripts/maps/RustboroCity_Mart.inc index 6b4ff3a77..cb722a6af 100644 --- a/data/scripts/maps/RustboroCity_Mart.inc +++ b/data/scripts/maps/RustboroCity_Mart.inc @@ -5,11 +5,11 @@ RustboroCity_Mart_EventScript_157BD4:: @ 8157BD4 lock faceplayer message RustboroCity_Mart_Text_1A0BE4 - waittext + waitmessage checkflag 287 - jumpif 0, RustboroCity_Mart_EventScript_157BEF + goto_if 0, RustboroCity_Mart_EventScript_157BEF checkflag 287 - jumpeq RustboroCity_Mart_EventScript_157C18 + goto_if_eq RustboroCity_Mart_EventScript_157C18 end RustboroCity_Mart_EventScript_157BEF:: @ 8157BEF diff --git a/data/scripts/maps/RustboroCity_PokemonCenter_1F.inc b/data/scripts/maps/RustboroCity_PokemonCenter_1F.inc index 896e8e220..53b481832 100644 --- a/data/scripts/maps/RustboroCity_PokemonCenter_1F.inc +++ b/data/scripts/maps/RustboroCity_PokemonCenter_1F.inc @@ -10,7 +10,7 @@ RustboroCity_PokemonCenter_1F_MapScript1_157B7F:: @ 8157B7F RustboroCity_PokemonCenter_1F_EventScript_157B88:: @ 8157B88 setvar 0x800b, 1 call RustboroCity_PokemonCenter_1F_EventScript_19FD5B - waittext + waitmessage waitbutton release end diff --git a/data/scripts/maps/RustboroCity_PokemonSchool.inc b/data/scripts/maps/RustboroCity_PokemonSchool.inc index 8b037a3e7..73b364f5e 100644 --- a/data/scripts/maps/RustboroCity_PokemonSchool.inc +++ b/data/scripts/maps/RustboroCity_PokemonSchool.inc @@ -4,13 +4,13 @@ RustboroCity_PokemonSchool_MapScripts:: @ 81579E1 RustboroCity_PokemonSchool_EventScript_1579E2:: @ 81579E2 lockall msgbox RustboroCity_PokemonSchool_Text_184321, 4 - jump RustboroCity_PokemonSchool_EventScript_1579F1 + goto RustboroCity_PokemonSchool_EventScript_1579F1 end RustboroCity_PokemonSchool_EventScript_1579F1:: @ 81579F1 message RustboroCity_PokemonSchool_Text_184368 - waittext - multichoicerow 8, 1, 13, 3, 0 + waitmessage + multichoicegrid 8, 1, 13, 3, 0 switch RESULT case 0, RustboroCity_PokemonSchool_EventScript_157A50 case 1, RustboroCity_PokemonSchool_EventScript_157A5E @@ -23,27 +23,27 @@ RustboroCity_PokemonSchool_EventScript_1579F1:: @ 81579F1 RustboroCity_PokemonSchool_EventScript_157A50:: @ 8157A50 msgbox RustboroCity_PokemonSchool_Text_184389, 4 - jump RustboroCity_PokemonSchool_EventScript_1579F1 + goto RustboroCity_PokemonSchool_EventScript_1579F1 end RustboroCity_PokemonSchool_EventScript_157A5E:: @ 8157A5E msgbox RustboroCity_PokemonSchool_Text_184447, 4 - jump RustboroCity_PokemonSchool_EventScript_1579F1 + goto RustboroCity_PokemonSchool_EventScript_1579F1 end RustboroCity_PokemonSchool_EventScript_157A6C:: @ 8157A6C msgbox RustboroCity_PokemonSchool_Text_1844EC, 4 - jump RustboroCity_PokemonSchool_EventScript_1579F1 + goto RustboroCity_PokemonSchool_EventScript_1579F1 end RustboroCity_PokemonSchool_EventScript_157A7A:: @ 8157A7A msgbox RustboroCity_PokemonSchool_Text_1845A5, 4 - jump RustboroCity_PokemonSchool_EventScript_1579F1 + goto RustboroCity_PokemonSchool_EventScript_1579F1 end RustboroCity_PokemonSchool_EventScript_157A88:: @ 8157A88 msgbox RustboroCity_PokemonSchool_Text_184627, 4 - jump RustboroCity_PokemonSchool_EventScript_1579F1 + goto RustboroCity_PokemonSchool_EventScript_1579F1 end RustboroCity_PokemonSchool_EventScript_157A96:: @ 8157A96 @@ -78,37 +78,37 @@ RustboroCity_PokemonSchool_EventScript_157ACE:: @ 8157ACE lock faceplayer checkflag 275 - jumpeq RustboroCity_PokemonSchool_EventScript_157B34 + goto_if_eq RustboroCity_PokemonSchool_EventScript_157B34 compare FACING, 4 - callif 1, RustboroCity_PokemonSchool_EventScript_157B1E + call_if 1, RustboroCity_PokemonSchool_EventScript_157B1E compare FACING, 3 - callif 1, RustboroCity_PokemonSchool_EventScript_157B29 + call_if 1, RustboroCity_PokemonSchool_EventScript_157B29 msgbox RustboroCity_PokemonSchool_Text_1846A2, 4 giveitem ITEM_QUICK_CLAW compare RESULT, 0 - jumpeq RustboroCity_PokemonSchool_EventScript_1A029B - closebutton - move LAST_TALKED, RustboroCity_PokemonSchool_Movement_1A0845 - waitmove 0 + goto_if_eq RustboroCity_PokemonSchool_EventScript_1A029B + closemessage + applymovement LAST_TALKED, RustboroCity_PokemonSchool_Movement_1A0845 + waitmovement 0 setflag 275 release end RustboroCity_PokemonSchool_EventScript_157B1E:: @ 8157B1E - move LAST_TALKED, RustboroCity_PokemonSchool_Movement_157B60 - waitmove 0 + applymovement LAST_TALKED, RustboroCity_PokemonSchool_Movement_157B60 + waitmovement 0 return RustboroCity_PokemonSchool_EventScript_157B29:: @ 8157B29 - move LAST_TALKED, RustboroCity_PokemonSchool_Movement_157B49 - waitmove 0 + applymovement LAST_TALKED, RustboroCity_PokemonSchool_Movement_157B49 + waitmovement 0 return RustboroCity_PokemonSchool_EventScript_157B34:: @ 8157B34 msgbox RustboroCity_PokemonSchool_Text_184737, 4 - closebutton - move LAST_TALKED, RustboroCity_PokemonSchool_Movement_1A0845 - waitmove 0 + closemessage + applymovement LAST_TALKED, RustboroCity_PokemonSchool_Movement_1A0845 + waitmovement 0 release end diff --git a/data/scripts/maps/RusturfTunnel.inc b/data/scripts/maps/RusturfTunnel.inc index 129bef7c9..28f6f0ad4 100644 --- a/data/scripts/maps/RusturfTunnel.inc +++ b/data/scripts/maps/RusturfTunnel.inc @@ -11,21 +11,21 @@ RusturfTunnel_MapScript2_15C750:: @ 815C750 RusturfTunnel_MapScript1_15C762:: @ 815C762 call RusturfTunnel_EventScript_1A0196 compare 0x409a, 2 - callif 1, RusturfTunnel_EventScript_15C773 + call_if 1, RusturfTunnel_EventScript_15C773 end RusturfTunnel_EventScript_15C773:: @ 815C773 - movespriteperm 7, 13, 4 - movespriteperm 6, 13, 5 + setobjectxyperm 7, 13, 4 + setobjectxyperm 6, 13, 5 return RusturfTunnel_EventScript_15C782:: @ 815C782 lock faceplayer msgbox RusturfTunnel_Text_194766, 4 - closebutton - move LAST_TALKED, RusturfTunnel_Movement_1A083D - waitmove 0 + closemessage + applymovement LAST_TALKED, RusturfTunnel_Movement_1A083D + waitmovement 0 release end @@ -33,126 +33,126 @@ RusturfTunnel_EventScript_15C799:: @ 815C799 lock faceplayer checkflag 1 - jumpeq RusturfTunnel_EventScript_15C7BC + goto_if_eq RusturfTunnel_EventScript_15C7BC setflag 1 msgbox RusturfTunnel_Text_1944C5, 4 - closebutton - move LAST_TALKED, RusturfTunnel_Movement_1A083D - waitmove 0 + closemessage + applymovement LAST_TALKED, RusturfTunnel_Movement_1A083D + waitmovement 0 release end RusturfTunnel_EventScript_15C7BC:: @ 815C7BC msgbox RusturfTunnel_Text_1945B2, 4 - closebutton - move LAST_TALKED, RusturfTunnel_Movement_1A083D - waitmove 0 + closemessage + applymovement LAST_TALKED, RusturfTunnel_Movement_1A083D + waitmovement 0 release end RusturfTunnel_EventScript_15C7D1:: @ 815C7D1 lockall compare 0x4001, 1 - callif 1, RusturfTunnel_EventScript_15C8CA + call_if 1, RusturfTunnel_EventScript_15C8CA compare 0x4001, 2 - callif 1, RusturfTunnel_EventScript_15C8DF + call_if 1, RusturfTunnel_EventScript_15C8DF compare 0x4001, 3 - callif 1, RusturfTunnel_EventScript_15C8EA + call_if 1, RusturfTunnel_EventScript_15C8EA call RusturfTunnel_EventScript_15C92D msgbox RusturfTunnel_Text_19461D, 4 compare 0x4001, 2 - callif 1, RusturfTunnel_EventScript_15C8EB + call_if 1, RusturfTunnel_EventScript_15C8EB compare 0x4001, 3 - callif 1, RusturfTunnel_EventScript_15C8EB + call_if 1, RusturfTunnel_EventScript_15C8EB giveitem ITEM_HM04 setflag 106 msgbox RusturfTunnel_Text_194693, 4 - closebutton + closemessage compare 0x4001, 1 - callif 1, RusturfTunnel_EventScript_15C880 + call_if 1, RusturfTunnel_EventScript_15C880 compare 0x4001, 2 - callif 1, RusturfTunnel_EventScript_15C892 + call_if 1, RusturfTunnel_EventScript_15C892 compare 0x4001, 3 - callif 1, RusturfTunnel_EventScript_15C8AE + call_if 1, RusturfTunnel_EventScript_15C8AE msgbox RusturfTunnel_Text_194706, 4 - closebutton + closemessage compare 0x4001, 1 - callif 1, RusturfTunnel_EventScript_15C8F7 + call_if 1, RusturfTunnel_EventScript_15C8F7 compare 0x4001, 2 - callif 1, RusturfTunnel_EventScript_15C909 + call_if 1, RusturfTunnel_EventScript_15C909 compare 0x4001, 3 - callif 1, RusturfTunnel_EventScript_15C91B + call_if 1, RusturfTunnel_EventScript_15C91B call RusturfTunnel_EventScript_1A0442 releaseall end RusturfTunnel_EventScript_15C880:: @ 815C880 - move 255, RusturfTunnel_Movement_15C96A - move 1, RusturfTunnel_Movement_15C98F - waitmove 0 + applymovement 255, RusturfTunnel_Movement_15C96A + applymovement 1, RusturfTunnel_Movement_15C98F + waitmovement 0 return RusturfTunnel_EventScript_15C892:: @ 815C892 - move 255, RusturfTunnel_Movement_15C96D - move 1, RusturfTunnel_Movement_15C994 - waitmove 0 - move 10, RusturfTunnel_Movement_1A0845 - waitmove 0 + applymovement 255, RusturfTunnel_Movement_15C96D + applymovement 1, RusturfTunnel_Movement_15C994 + waitmovement 0 + applymovement 10, RusturfTunnel_Movement_1A0845 + waitmovement 0 return RusturfTunnel_EventScript_15C8AE:: @ 815C8AE - move 255, RusturfTunnel_Movement_15C96D - move 1, RusturfTunnel_Movement_15C994 - waitmove 0 - move 10, RusturfTunnel_Movement_1A0845 - waitmove 0 + applymovement 255, RusturfTunnel_Movement_15C96D + applymovement 1, RusturfTunnel_Movement_15C994 + waitmovement 0 + applymovement 10, RusturfTunnel_Movement_1A0845 + waitmovement 0 return RusturfTunnel_EventScript_15C8CA:: @ 815C8CA - move 1, RusturfTunnel_Movement_1A0841 - waitmove 0 - move 255, RusturfTunnel_Movement_1A0845 - waitmove 0 + applymovement 1, RusturfTunnel_Movement_1A0841 + waitmovement 0 + applymovement 255, RusturfTunnel_Movement_1A0845 + waitmovement 0 return RusturfTunnel_EventScript_15C8DF:: @ 815C8DF - move 1, RusturfTunnel_Movement_15C970 - waitmove 0 + applymovement 1, RusturfTunnel_Movement_15C970 + waitmovement 0 return RusturfTunnel_EventScript_15C8EA:: @ 815C8EA return RusturfTunnel_EventScript_15C8EB:: @ 815C8EB - closebutton - move 1, RusturfTunnel_Movement_15C98D - waitmove 0 + closemessage + applymovement 1, RusturfTunnel_Movement_15C98D + waitmovement 0 return RusturfTunnel_EventScript_15C8F7:: @ 815C8F7 - move 10, RusturfTunnel_Movement_15C945 - move 1, RusturfTunnel_Movement_15C973 - waitmove 0 + applymovement 10, RusturfTunnel_Movement_15C945 + applymovement 1, RusturfTunnel_Movement_15C973 + waitmovement 0 return RusturfTunnel_EventScript_15C909:: @ 815C909 - move 10, RusturfTunnel_Movement_15C951 - move 1, RusturfTunnel_Movement_15C980 - waitmove 0 + applymovement 10, RusturfTunnel_Movement_15C951 + applymovement 1, RusturfTunnel_Movement_15C980 + waitmovement 0 return RusturfTunnel_EventScript_15C91B:: @ 815C91B - move 10, RusturfTunnel_Movement_15C951 - move 1, RusturfTunnel_Movement_15C980 - waitmove 0 + applymovement 10, RusturfTunnel_Movement_15C951 + applymovement 1, RusturfTunnel_Movement_15C980 + waitmovement 0 return RusturfTunnel_EventScript_15C92D:: @ 815C92D - playsfx 21 - move 1, RusturfTunnel_Movement_1A0833 - waitmove 0 - move 1, RusturfTunnel_Movement_1A0835 - waitmove 0 + playse 21 + applymovement 1, RusturfTunnel_Movement_1A0833 + waitmovement 0 + applymovement 1, RusturfTunnel_Movement_1A0835 + waitmovement 0 return RusturfTunnel_Movement_15C945:: @ 815C945 @@ -280,12 +280,12 @@ RusturfTunnel_EventScript_15C9A5:: @ 815C9A5 RusturfTunnel_EventScript_15C9AB:: @ 815C9AB lockall msgbox RusturfTunnel_Text_194159, 4 - closebutton - move 6, RusturfTunnel_Movement_15C9D3 - move 7, RusturfTunnel_Movement_15C9D3 - waitmove 0 - moveoffscreen 6 - moveoffscreen 7 + closemessage + applymovement 6, RusturfTunnel_Movement_15C9D3 + applymovement 7, RusturfTunnel_Movement_15C9D3 + waitmovement 0 + moveobjectoffscreen 6 + moveobjectoffscreen 7 setvar 0x409a, 3 releaseall end @@ -299,8 +299,8 @@ RusturfTunnel_Movement_15C9D3:: @ 815C9D3 RusturfTunnel_EventScript_15C9D7:: @ 815C9D7 lock faceplayer - checksound - pokecry SPECIES_WINGULL, 0 + waitse + playpokecry SPECIES_WINGULL, 0 msgbox RusturfTunnel_Text_194188, 4 waitpokecry release @@ -309,38 +309,38 @@ RusturfTunnel_EventScript_15C9D7:: @ 815C9D7 RusturfTunnel_EventScript_15C9EA:: @ 815C9EA lock faceplayer - playmusic BGM_EVIL_TEAM, 0 + playbgm BGM_EVIL_TEAM, 0 msgbox RusturfTunnel_Text_19419B, 4 trainerbattle 3, OPPONENT_RUSTURF_TUNNEL_GRUNT, 0, RusturfTunnel_Text_194243 msgbox RusturfTunnel_Text_194274, 4 giveitem ITEM_DEVON_GOODS - closebutton - move 255, RusturfTunnel_Movement_15CA99 - move 6, RusturfTunnel_Movement_15CAA2 - waitmove 0 - disappear 6 - pause 50 - reappear 5 - move 5, RusturfTunnel_Movement_15CAAC - waitmove 0 - move 255, RusturfTunnel_Movement_15CA9F - move 5, RusturfTunnel_Movement_15CAC0 - waitmove 0 + closemessage + applymovement 255, RusturfTunnel_Movement_15CA99 + applymovement 6, RusturfTunnel_Movement_15CAA2 + waitmovement 0 + removeobject 6 + delay 50 + addobject 5 + applymovement 5, RusturfTunnel_Movement_15CAAC + waitmovement 0 + applymovement 255, RusturfTunnel_Movement_15CA9F + applymovement 5, RusturfTunnel_Movement_15CAC0 + waitmovement 0 msgbox RusturfTunnel_Text_19432A, 4 - move 5, RusturfTunnel_Movement_1A0839 - waitmove 0 + applymovement 5, RusturfTunnel_Movement_1A0839 + waitmovement 0 message RusturfTunnel_Text_19434F - waittext - checksound - pokecry SPECIES_WINGULL, 0 + waitmessage + waitse + playpokecry SPECIES_WINGULL, 0 waitbutton waitpokecry - closebutton - move 5, RusturfTunnel_Movement_15CAB4 - move 7, RusturfTunnel_Movement_15CAC3 - waitmove 0 - disappear 5 - disappear 7 + closemessage + applymovement 5, RusturfTunnel_Movement_15CAB4 + applymovement 7, RusturfTunnel_Movement_15CAC3 + waitmovement 0 + removeobject 5 + removeobject 7 clearflag 142 setflag 143 setvar 0x405a, 4 diff --git a/data/scripts/maps/SSTidalCorridor.inc b/data/scripts/maps/SSTidalCorridor.inc index 58cfbec47..2c55a9443 100644 --- a/data/scripts/maps/SSTidalCorridor.inc +++ b/data/scripts/maps/SSTidalCorridor.inc @@ -13,7 +13,7 @@ SSTidalCorridor_EventScript_15FCBC:: @ 815FCBC special SetSSTidalFlag setvar 0x40b4, 2 lockall - playsfx 73 + playse 73 msgbox SSTidalCorridor_Text_199007, 4 releaseall end @@ -21,7 +21,7 @@ SSTidalCorridor_EventScript_15FCBC:: @ 815FCBC SSTidalCorridor_EventScript_15FCD2:: @ 815FCD2 setvar 0x40b4, 6 lockall - playsfx 73 + playse 73 msgbox SSTidalCorridor_Text_199088, 4 releaseall end @@ -29,29 +29,29 @@ SSTidalCorridor_EventScript_15FCD2:: @ 815FCD2 SSTidalRooms_EventScript_15FCE5:: @ 815FCE5 special SetSSTidalFlag setvar 0x40b4, 7 - playsfx 73 + playse 73 msgbox SSTidalRooms_Text_199007, 4 return SSTidalRooms_EventScript_15FCF9:: @ 815FCF9 special ResetSSTidalFlag setvar 0x40b4, 4 - playsfx 73 + playse 73 msgbox SSTidalRooms_Text_1990F8, 4 return gUnknown_0815FD0D:: @ 815FD0D compare 0x40B4, 2 - jumpeq SSTidalCorridor_EventScript_15FD24 + goto_if_eq SSTidalCorridor_EventScript_15FD24 compare 0x40B4, 7 - jumpeq SSTidalCorridor_EventScript_15FD3A + goto_if_eq SSTidalCorridor_EventScript_15FD3A end SSTidalCorridor_EventScript_15FD24:: @ 815FD24 special ResetSSTidalFlag setvar 0x40b4, 3 lockall - playsfx 73 + playse 73 msgbox SSTidalCorridor_Text_199088, 4 releaseall end @@ -60,7 +60,7 @@ SSTidalCorridor_EventScript_15FD3A:: @ 815FD3A special ResetSSTidalFlag setvar 0x40b4, 8 lockall - playsfx 73 + playse 73 msgbox SSTidalCorridor_Text_1990B4, 4 releaseall end @@ -68,7 +68,7 @@ SSTidalCorridor_EventScript_15FD3A:: @ 815FD3A SSTidalRooms_EventScript_15FD50:: @ 815FD50 special ResetSSTidalFlag setvar 0x40b4, 8 - playsfx 73 + playse 73 msgbox SSTidalRooms_Text_1990B4, 4 return @@ -87,8 +87,8 @@ SSTidalCorridor_EventScript_15FD96:: @ 815FD96 SSTidalCorridor_EventScript_15FD9F:: @ 815FD9F lock faceplayer - checksound - pokecry SPECIES_WINGULL, 0 + waitse + playpokecry SPECIES_WINGULL, 0 msgbox SSTidalCorridor_Text_199388, 4 waitpokecry release @@ -114,9 +114,9 @@ SSTidalCorridor_EventScript_15FDD6:: @ 815FDD6 lock faceplayer compare 0x40b4, 4 - jumpeq SSTidalCorridor_EventScript_15FDF8 + goto_if_eq SSTidalCorridor_EventScript_15FDF8 compare 0x40b4, 8 - jumpeq SSTidalCorridor_EventScript_15FE17 + goto_if_eq SSTidalCorridor_EventScript_15FE17 msgbox SSTidalCorridor_Text_19913B, 4 release end @@ -125,7 +125,7 @@ SSTidalCorridor_EventScript_15FDF8:: @ 815FDF8 sethealplace 8 msgbox SSTidalCorridor_Text_1991F4, 4 checkflag 260 - callif 1, SSTidalCorridor_EventScript_15FE36 + call_if 1, SSTidalCorridor_EventScript_15FE36 warp LilycoveCity_Harbor, 255, 8, 11 waitstate release @@ -135,7 +135,7 @@ SSTidalCorridor_EventScript_15FE17:: @ 815FE17 sethealplace 4 msgbox SSTidalCorridor_Text_1991F4, 4 checkflag 260 - callif 1, SSTidalCorridor_EventScript_15FE36 + call_if 1, SSTidalCorridor_EventScript_15FE36 warp SlateportCity_Harbor, 255, 8, 11 waitstate release @@ -148,9 +148,9 @@ SSTidalCorridor_EventScript_15FE36:: @ 815FE36 SSTidalCorridor_EventScript_15FE3A:: @ 815FE3A lockall compare 0x40b4, 2 - jumpeq SSTidalCorridor_EventScript_15FE5B + goto_if_eq SSTidalCorridor_EventScript_15FE5B compare 0x40b4, 7 - jumpeq SSTidalCorridor_EventScript_15FE5B + goto_if_eq SSTidalCorridor_EventScript_15FE5B msgbox SSTidalCorridor_Text_199268, 4 releaseall end @@ -164,7 +164,7 @@ SSTidalCorridor_EventScript_15FE60:: @ 815FE60 lock faceplayer checkflag 247 - jumpeq SSTidalCorridor_EventScript_15FE7A + goto_if_eq SSTidalCorridor_EventScript_15FE7A call SSTidalCorridor_EventScript_15FE84 msgbox SSTidalCorridor_Text_199203, 4 release @@ -177,23 +177,23 @@ SSTidalCorridor_EventScript_15FE7A:: @ 815FE7A SSTidalCorridor_EventScript_15FE84:: @ 815FE84 checktrainerflag OPPONENT_PHILLIP - jumpif 0, SSTidalCorridor_EventScript_15FED5 + goto_if 0, SSTidalCorridor_EventScript_15FED5 checktrainerflag OPPONENT_LEONARD - jumpif 0, SSTidalCorridor_EventScript_15FED5 + goto_if 0, SSTidalCorridor_EventScript_15FED5 checktrainerflag OPPONENT_COLTON - jumpif 0, SSTidalCorridor_EventScript_15FED5 + goto_if 0, SSTidalCorridor_EventScript_15FED5 checktrainerflag OPPONENT_TUCKER - jumpif 0, SSTidalCorridor_EventScript_15FED5 + goto_if 0, SSTidalCorridor_EventScript_15FED5 checktrainerflag OPPONENT_THOMAS - jumpif 0, SSTidalCorridor_EventScript_15FED5 + goto_if 0, SSTidalCorridor_EventScript_15FED5 checktrainerflag OPPONENT_LEA_AND_JED - jumpif 0, SSTidalCorridor_EventScript_15FED5 + goto_if 0, SSTidalCorridor_EventScript_15FED5 checktrainerflag OPPONENT_GARRET - jumpif 0, SSTidalCorridor_EventScript_15FED5 + goto_if 0, SSTidalCorridor_EventScript_15FED5 checktrainerflag OPPONENT_ANETTE - jumpif 0, SSTidalCorridor_EventScript_15FED5 + goto_if 0, SSTidalCorridor_EventScript_15FED5 setflag 247 - jump SSTidalCorridor_EventScript_15FE7A + goto SSTidalCorridor_EventScript_15FE7A return SSTidalCorridor_EventScript_15FED5:: @ 815FED5 diff --git a/data/scripts/maps/SSTidalRooms.inc b/data/scripts/maps/SSTidalRooms.inc index 4d588cd46..c7cd4447d 100644 --- a/data/scripts/maps/SSTidalRooms.inc +++ b/data/scripts/maps/SSTidalRooms.inc @@ -5,11 +5,11 @@ SSTidalRooms_EventScript_15FF06:: @ 815FF06 lock faceplayer checkflag 260 - jumpeq SSTidalRooms_EventScript_15FF3D + goto_if_eq SSTidalRooms_EventScript_15FF3D msgbox SSTidalRooms_Text_199B65, 4 giveitem ITEM_TM49 compare RESULT, 0 - jumpeq SSTidalRooms_EventScript_1A029B + goto_if_eq SSTidalRooms_EventScript_1A029B setflag 260 msgbox SSTidalRooms_Text_199C1A, 4 release @@ -23,7 +23,7 @@ SSTidalRooms_EventScript_15FF3D:: @ 815FF3D SSTidalRooms_EventScript_15FF47:: @ 815FF47 lockall msgbox SSTidalRooms_Text_19956B, 4 - closebutton + closemessage call SSTidalRooms_EventScript_1A02CA call SSTidalRooms_EventScript_15FD64 releaseall diff --git a/data/scripts/maps/SafariZone_Southeast.inc b/data/scripts/maps/SafariZone_Southeast.inc index 22fd5ec56..06a400810 100644 --- a/data/scripts/maps/SafariZone_Southeast.inc +++ b/data/scripts/maps/SafariZone_Southeast.inc @@ -10,22 +10,22 @@ SafariZone_Southeast_MapScript2_160041:: @ 8160041 SafariZone_Southeast_EventScript_16004B:: @ 816004B lockall setvar 0x4001, 0 - move 255, SafariZone_Southeast_Movement_160087 - waitmove 0 - move 1, SafariZone_Southeast_Movement_160089 - waitmove 0 - movespriteperm 1, 32, 34 + applymovement 255, SafariZone_Southeast_Movement_160087 + waitmovement 0 + applymovement 1, SafariZone_Southeast_Movement_160089 + waitmovement 0 + setobjectxyperm 1, 32, 34 setvar 0x40a4, 0 releaseall end SafariZone_Southeast_MapScript1_160073:: @ 8160073 compare 0x40a4, 2 - callif 1, SafariZone_Southeast_EventScript_16007F + call_if 1, SafariZone_Southeast_EventScript_16007F end SafariZone_Southeast_EventScript_16007F:: @ 816007F - movespriteperm 1, 31, 34 + setobjectxyperm 1, 31, 34 return SafariZone_Southeast_Movement_160087:: @ 8160087 @@ -53,10 +53,10 @@ SafariZone_Southeast_EventScript_1600A7:: @ 81600A7 lock faceplayer compare 0x4001, 0 - jumpeq SafariZone_Southeast_EventScript_1600D1 + goto_if_eq SafariZone_Southeast_EventScript_1600D1 msgbox SafariZone_Southeast_Text_1C3A56, 5 compare RESULT, 1 - jumpeq SafariZone_Southeast_EventScript_1600E0 + goto_if_eq SafariZone_Southeast_EventScript_1600E0 msgbox SafariZone_Southeast_Text_1C3A9C, 4 release end @@ -69,32 +69,32 @@ SafariZone_Southeast_EventScript_1600D1:: @ 81600D1 SafariZone_Southeast_EventScript_1600E0:: @ 81600E0 msgbox SafariZone_Southeast_Text_1C3ACA, 4 - closebutton + closemessage switch FACING case 2, SafariZone_Southeast_EventScript_160105 case 4, SafariZone_Southeast_EventScript_16011F end SafariZone_Southeast_EventScript_160105:: @ 8160105 - move 1, SafariZone_Southeast_Movement_160150 - waitmove 0 - move 255, SafariZone_Southeast_Movement_16014B - waitmove 0 - jump SafariZone_Southeast_EventScript_160139 + applymovement 1, SafariZone_Southeast_Movement_160150 + waitmovement 0 + applymovement 255, SafariZone_Southeast_Movement_16014B + waitmovement 0 + goto SafariZone_Southeast_EventScript_160139 end SafariZone_Southeast_EventScript_16011F:: @ 816011F - move 1, SafariZone_Southeast_Movement_160153 - waitmove 0 - move 255, SafariZone_Southeast_Movement_16014D - waitmove 0 - jump SafariZone_Southeast_EventScript_160139 + applymovement 1, SafariZone_Southeast_Movement_160153 + waitmovement 0 + applymovement 255, SafariZone_Southeast_Movement_16014D + waitmovement 0 + goto SafariZone_Southeast_EventScript_160139 end SafariZone_Southeast_EventScript_160139:: @ 8160139 setvar 0x40a4, 1 special ExitSafariMode - warpwalk Route121_SafariZoneEntrance, 255, 2, 5 + warpdoor Route121_SafariZoneEntrance, 255, 2, 5 waitstate end diff --git a/data/scripts/maps/SeafloorCavern_Entrance.inc b/data/scripts/maps/SeafloorCavern_Entrance.inc index 0bf99d2ad..7ea46d9b0 100644 --- a/data/scripts/maps/SeafloorCavern_Entrance.inc +++ b/data/scripts/maps/SeafloorCavern_Entrance.inc @@ -3,6 +3,6 @@ SeafloorCavern_Entrance_MapScripts:: @ 815DA4A .byte 0 SeafloorCavern_Entrance_MapScript1_15DA50:: @ 815DA50 - warp4 Underwater_SeafloorCavern, 255, 6, 5 - warp6 Underwater_SeafloorCavern, 255, 6, 5 + setdivewarp Underwater_SeafloorCavern, 255, 6, 5 + setescapewarp Underwater_SeafloorCavern, 255, 6, 5 end diff --git a/data/scripts/maps/SeafloorCavern_Room9.inc b/data/scripts/maps/SeafloorCavern_Room9.inc index 71184346f..eb3d108a6 100644 --- a/data/scripts/maps/SeafloorCavern_Room9.inc +++ b/data/scripts/maps/SeafloorCavern_Room9.inc @@ -6,9 +6,9 @@ SeafloorCavern_Room9_MapScript1_15DAEC:: @ 815DAEC call SeafloorCavern_Room9_EventScript_1A0196 call SeafloorCavern_Room9_EventScript_1A01B5 .ifdef SAPPHIRE - setmapfooter 157 + setmaplayoutindex 157 .else - setmapfooter 327 + setmaplayoutindex 327 .endif end @@ -18,35 +18,35 @@ SeafloorCavern_Room9_EventScript_15DAFA:: @ 815DAFA setvar 0x8005, 3 setvar 0x8006, 4 setvar 0x8007, 5 - move 255, SeafloorCavern_Room9_Movement_1A0841 - waitmove 0 - move 255, SeafloorCavern_Room9_Movement_15DD68 - waitmove 0 + applymovement 255, SeafloorCavern_Room9_Movement_1A0841 + waitmovement 0 + applymovement 255, SeafloorCavern_Room9_Movement_15DD68 + waitmovement 0 .ifdef SAPPHIRE msgbox UnknownString_81B41B8, 4 .else msgbox SeafloorCavern_Room9_Text_1B4850, 4 .endif - closebutton - reappear 0x8004 - move 255, SeafloorCavern_Room9_Movement_1A083F - waitmove 0 - move 0x8004, SeafloorCavern_Room9_Movement_15DD36 - waitmove 0 + closemessage + addobject 0x8004 + applymovement 255, SeafloorCavern_Room9_Movement_1A083F + waitmovement 0 + applymovement 0x8004, SeafloorCavern_Room9_Movement_15DD36 + waitmovement 0 .ifdef SAPPHIRE msgbox UnknownString_81B41D5, 4 .else msgbox SeafloorCavern_Room9_Text_1B486C, 4 .endif - move 0x8004, SeafloorCavern_Room9_Movement_1A0841 - waitmove 0 + applymovement 0x8004, SeafloorCavern_Room9_Movement_1A0841 + waitmovement 0 .ifdef SAPPHIRE msgbox UnknownString_81B4201, 4 .else msgbox SeafloorCavern_Room9_Text_1B4897, 4 .endif - move 0x8004, SeafloorCavern_Room9_Movement_1A0839 - waitmove 0 + applymovement 0x8004, SeafloorCavern_Room9_Movement_1A0839 + waitmovement 0 .ifdef SAPPHIRE msgbox UnknownString_81B4289, 4 .else @@ -78,45 +78,45 @@ SeafloorCavern_Room9_EventScript_15DAFA:: @ 815DAFA .else setvar RESULT, 0 .endif - playsfx 209 - setanimation 0, 16 - setanimation 1, 42 - setanimation 2, 0 - doanimation 54 - checkanimation 54 + playse 209 + setfieldeffect 0, 16 + setfieldeffect 1, 42 + setfieldeffect 2, 0 + dofieldeffect 54 + waitfieldeffect 54 .ifdef SAPPHIRE setvar RESULT, 0 .else setvar RESULT, 1 .endif - fanfare 388 - playsfx 107 + playfanfare 388 + playse 107 special sub_80818A4 - move 0x8004, SeafloorCavern_Room9_Movement_1A0841 - move 255, SeafloorCavern_Room9_Movement_1A0841 - waitmove 0 - pause 150 - disappear 7 - reappear 1 + applymovement 0x8004, SeafloorCavern_Room9_Movement_1A0841 + applymovement 255, SeafloorCavern_Room9_Movement_1A0841 + waitmovement 0 + delay 150 + removeobject 7 + addobject 1 waitstate - pause 60 - move 1, SeafloorCavern_Room9_Movement_15DD4C - waitmove 0 + delay 60 + applymovement 1, SeafloorCavern_Room9_Movement_15DD4C + waitmovement 0 special sub_80818FC waitstate setvar 0x8004, 1 setvar 0x8005, 1 special sub_810F758 waitstate - move 1, SeafloorCavern_Room9_Movement_15DD57 - waitmove 0 - disappear 1 - pause 4 + applymovement 1, SeafloorCavern_Room9_Movement_15DD57 + waitmovement 0 + removeobject 1 + delay 4 setvar 0x8004, 2 setvar 0x8005, 2 special sub_810F758 waitstate - pause 30 + delay 30 setvar 0x8004, 2 setvar 0x8005, 3 setvar 0x8006, 4 @@ -126,52 +126,52 @@ SeafloorCavern_Room9_EventScript_15DAFA:: @ 815DAFA .else msgbox SeafloorCavern_Room9_Text_1B4A89, 4 .endif - playsfx 2 - move 255, SeafloorCavern_Room9_Movement_1A083F - waitmove 0 + playse 2 + applymovement 255, SeafloorCavern_Room9_Movement_1A083F + waitmovement 0 .ifdef SAPPHIRE msgbox UnknownString_81B4443, 4 .else msgbox SeafloorCavern_Room9_Text_1B4ADB, 4 .endif - closebutton - move 0x8004, SeafloorCavern_Room9_Movement_15DD41 - waitmove 0 + closemessage + applymovement 0x8004, SeafloorCavern_Room9_Movement_15DD41 + waitmovement 0 .ifdef SAPPHIRE msgbox UnknownString_81B447A, 4 .else msgbox SeafloorCavern_Room9_Text_1B4B11, 4 .endif - closebutton - playsfx 3 - pause 20 - move 0x8004, SeafloorCavern_Room9_Movement_1A0845 - waitmove 0 + closemessage + playse 3 + delay 20 + applymovement 0x8004, SeafloorCavern_Room9_Movement_1A0845 + waitmovement 0 .ifdef SAPPHIRE msgbox UnknownString_81B45C6, 4 .else msgbox SeafloorCavern_Room9_Text_1B4C79, 4 .endif - closebutton - reappear 0x8005 - reappear 0x8006 - reappear 0x8007 - move 0x8007, SeafloorCavern_Room9_Movement_15DD63 - move 0x8006, SeafloorCavern_Room9_Movement_15DD63 - move 0x8005, SeafloorCavern_Room9_Movement_15DD5A - waitmove 0 - move 0x8004, SeafloorCavern_Room9_Movement_1A083F - waitmove 0 + closemessage + addobject 0x8005 + addobject 0x8006 + addobject 0x8007 + applymovement 0x8007, SeafloorCavern_Room9_Movement_15DD63 + applymovement 0x8006, SeafloorCavern_Room9_Movement_15DD63 + applymovement 0x8005, SeafloorCavern_Room9_Movement_15DD5A + waitmovement 0 + applymovement 0x8004, SeafloorCavern_Room9_Movement_1A083F + waitmovement 0 .ifdef SAPPHIRE msgbox UnknownString_81B464D, 4 .else msgbox SeafloorCavern_Room9_Text_1B4D02, 4 .endif - playsfx 21 - move 0x8004, SeafloorCavern_Room9_Movement_1A0833 - waitmove 0 - move 0x8004, SeafloorCavern_Room9_Movement_1A0835 - waitmove 0 + playse 21 + applymovement 0x8004, SeafloorCavern_Room9_Movement_1A0833 + waitmovement 0 + applymovement 0x8004, SeafloorCavern_Room9_Movement_1A0835 + waitmovement 0 .ifdef SAPPHIRE msgbox UnknownString_81B4723, 4 .else @@ -182,10 +182,10 @@ SeafloorCavern_Room9_EventScript_15DAFA:: @ 815DAFA .else msgbox SeafloorCavern_Room9_Text_1B4E37, 4 .endif - closebutton - move 0x8005, SeafloorCavern_Room9_Movement_15DD60 - move 0x8004, SeafloorCavern_Room9_Movement_15DD46 - waitmove 0 + closemessage + applymovement 0x8005, SeafloorCavern_Room9_Movement_15DD60 + applymovement 0x8004, SeafloorCavern_Room9_Movement_15DD46 + waitmovement 0 .ifdef SAPPHIRE msgbox UnknownString_81B4818, 4 .else diff --git a/data/scripts/maps/SealedChamber_InnerRoom.inc b/data/scripts/maps/SealedChamber_InnerRoom.inc index 76a930dc0..526ada367 100644 --- a/data/scripts/maps/SealedChamber_InnerRoom.inc +++ b/data/scripts/maps/SealedChamber_InnerRoom.inc @@ -3,34 +3,34 @@ SealedChamber_InnerRoom_MapScripts:: @ 815F1E7 SealedChamber_InnerRoom_EventScript_15F1E8:: @ 815F1E8 lockall - braillemsg SealedChamber_InnerRoom_Braille_1C53C1 + braillemessage SealedChamber_InnerRoom_Braille_1C53C1 waitbutton - hidebox 0, 0, 29, 19 + erasebox 0, 0, 29, 19 checkflag 228 - jumpeq SealedChamber_InnerRoom_EventScript_15F247 - specialval RESULT, CheckRelicanthWailord + goto_if_eq SealedChamber_InnerRoom_EventScript_15F247 + specialvar RESULT, CheckRelicanthWailord compare RESULT, 0 - jumpeq SealedChamber_InnerRoom_EventScript_15F247 - fadeout 0 - playsfx 49 + goto_if_eq SealedChamber_InnerRoom_EventScript_15F247 + fadeoutbgm 0 + playse 49 special DoSealedChamberShakingEffect1 waitstate - pause 40 + delay 40 special DoSealedChamberShakingEffect2 waitstate - playsfx 8 - pause 40 + playse 8 + delay 40 special DoSealedChamberShakingEffect2 waitstate - playsfx 8 - pause 40 + playse 8 + delay 40 special DoSealedChamberShakingEffect2 waitstate - playsfx 8 - pause 40 + playse 8 + delay 40 msgbox SealedChamber_InnerRoom_Text_1A138B, 4 - closebutton - fadein 0 + closemessage + fadeinbgm 0 setflag 228 releaseall end @@ -41,48 +41,48 @@ SealedChamber_InnerRoom_EventScript_15F247:: @ 815F247 SealedChamber_InnerRoom_EventScript_15F249:: @ 815F249 lockall - braillemsg SealedChamber_InnerRoom_Braille_1C53F2 + braillemessage SealedChamber_InnerRoom_Braille_1C53F2 waitbutton - hidebox 0, 0, 29, 19 + erasebox 0, 0, 29, 19 releaseall end SealedChamber_InnerRoom_EventScript_15F257:: @ 815F257 lockall - braillemsg SealedChamber_InnerRoom_Braille_1C5414 + braillemessage SealedChamber_InnerRoom_Braille_1C5414 waitbutton - hidebox 0, 0, 29, 19 + erasebox 0, 0, 29, 19 releaseall end SealedChamber_InnerRoom_EventScript_15F265:: @ 815F265 lockall - braillemsg SealedChamber_InnerRoom_Braille_1C5435 + braillemessage SealedChamber_InnerRoom_Braille_1C5435 waitbutton - hidebox 0, 0, 29, 19 + erasebox 0, 0, 29, 19 releaseall end SealedChamber_InnerRoom_EventScript_15F273:: @ 815F273 lockall - braillemsg SealedChamber_InnerRoom_Braille_1C545C + braillemessage SealedChamber_InnerRoom_Braille_1C545C waitbutton - hidebox 0, 0, 29, 19 + erasebox 0, 0, 29, 19 releaseall end SealedChamber_InnerRoom_EventScript_15F281:: @ 815F281 lockall - braillemsg SealedChamber_InnerRoom_Braille_1C5470 + braillemessage SealedChamber_InnerRoom_Braille_1C5470 waitbutton - hidebox 0, 0, 29, 19 + erasebox 0, 0, 29, 19 releaseall end SealedChamber_InnerRoom_EventScript_15F28F:: @ 815F28F lockall - braillemsg SealedChamber_InnerRoom_Braille_1C549B + braillemessage SealedChamber_InnerRoom_Braille_1C549B waitbutton - hidebox 0, 0, 29, 19 + erasebox 0, 0, 29, 19 releaseall end diff --git a/data/scripts/maps/SealedChamber_OuterRoom.inc b/data/scripts/maps/SealedChamber_OuterRoom.inc index 83ca4e4df..f16a88802 100644 --- a/data/scripts/maps/SealedChamber_OuterRoom.inc +++ b/data/scripts/maps/SealedChamber_OuterRoom.inc @@ -5,8 +5,8 @@ SealedChamber_OuterRoom_MapScripts:: @ 815F0C6 .byte 0 SealedChamber_OuterRoom_MapScript1_15F0D6:: @ 815F0D6 - warp4 Underwater_SealedChamber, 255, 12, 44 - warp6 Underwater_SealedChamber, 255, 12, 44 + setdivewarp Underwater_SealedChamber, 255, 12, 44 + setescapewarp Underwater_SealedChamber, 255, 12, 44 end SealedChamber_OuterRoom_MapScript1_15F0E7:: @ 815F0E7 @@ -15,7 +15,7 @@ SealedChamber_OuterRoom_MapScript1_15F0E7:: @ 815F0E7 SealedChamber_OuterRoom_MapScript1_15F0EB:: @ 815F0EB checkflag 2127 - callif 0, SealedChamber_OuterRoom_EventScript_15F0F5 + call_if 0, SealedChamber_OuterRoom_EventScript_15F0F5 end SealedChamber_OuterRoom_EventScript_15F0F5:: @ 815F0F5 @@ -29,91 +29,91 @@ SealedChamber_OuterRoom_EventScript_15F0F5:: @ 815F0F5 SealedChamber_OuterRoom_EventScript_15F12C:: @ 815F12C lockall - braillemsg SealedChamber_OuterRoom_Braille_1C534F + braillemessage SealedChamber_OuterRoom_Braille_1C534F waitbutton - hidebox 0, 0, 29, 19 + erasebox 0, 0, 29, 19 releaseall end SealedChamber_OuterRoom_EventScript_15F13A:: @ 815F13A lockall - braillemsg SealedChamber_OuterRoom_Braille_1C5359 + braillemessage SealedChamber_OuterRoom_Braille_1C5359 waitbutton - hidebox 0, 0, 29, 19 + erasebox 0, 0, 29, 19 releaseall end SealedChamber_OuterRoom_EventScript_15F148:: @ 815F148 lockall - braillemsg SealedChamber_OuterRoom_Braille_1C5363 + braillemessage SealedChamber_OuterRoom_Braille_1C5363 waitbutton - hidebox 0, 0, 29, 19 + erasebox 0, 0, 29, 19 releaseall end SealedChamber_OuterRoom_EventScript_15F156:: @ 815F156 lockall - braillemsg SealedChamber_OuterRoom_Braille_1C536D + braillemessage SealedChamber_OuterRoom_Braille_1C536D waitbutton - hidebox 0, 0, 29, 19 + erasebox 0, 0, 29, 19 releaseall end SealedChamber_OuterRoom_EventScript_15F164:: @ 815F164 lockall - braillemsg SealedChamber_OuterRoom_Braille_1C5377 + braillemessage SealedChamber_OuterRoom_Braille_1C5377 waitbutton - hidebox 0, 0, 29, 19 + erasebox 0, 0, 29, 19 releaseall end SealedChamber_OuterRoom_EventScript_15F172:: @ 815F172 lockall - braillemsg SealedChamber_OuterRoom_Braille_1C5381 + braillemessage SealedChamber_OuterRoom_Braille_1C5381 waitbutton - hidebox 0, 0, 29, 19 + erasebox 0, 0, 29, 19 releaseall end SealedChamber_OuterRoom_EventScript_15F180:: @ 815F180 lockall - braillemsg SealedChamber_OuterRoom_Braille_1C538B + braillemessage SealedChamber_OuterRoom_Braille_1C538B waitbutton - hidebox 0, 0, 29, 19 + erasebox 0, 0, 29, 19 releaseall end SealedChamber_OuterRoom_EventScript_15F18E:: @ 815F18E lockall - braillemsg SealedChamber_OuterRoom_Braille_1C5396 + braillemessage SealedChamber_OuterRoom_Braille_1C5396 waitbutton - hidebox 0, 0, 29, 19 + erasebox 0, 0, 29, 19 releaseall end SealedChamber_OuterRoom_EventScript_15F19C:: @ 815F19C lockall - braillemsg SealedChamber_OuterRoom_Braille_1C539E + braillemessage SealedChamber_OuterRoom_Braille_1C539E waitbutton - hidebox 0, 0, 29, 19 + erasebox 0, 0, 29, 19 releaseall end SealedChamber_OuterRoom_EventScript_15F1AA:: @ 815F1AA lockall - braillemsg SealedChamber_OuterRoom_Braille_1C53A9 + braillemessage SealedChamber_OuterRoom_Braille_1C53A9 waitbutton - hidebox 0, 0, 29, 19 + erasebox 0, 0, 29, 19 releaseall end SealedChamber_OuterRoom_EventScript_15F1B8:: @ 815F1B8 lockall checkflag 2127 - jumpeq SealedChamber_OuterRoom_EventScript_15F1CF - braillemsg SealedChamber_OuterRoom_Braille_1C53B1 + goto_if_eq SealedChamber_OuterRoom_EventScript_15F1CF + braillemessage SealedChamber_OuterRoom_Braille_1C53B1 waitbutton - hidebox 0, 0, 29, 19 + erasebox 0, 0, 29, 19 releaseall end @@ -124,8 +124,8 @@ SealedChamber_OuterRoom_EventScript_15F1CF:: @ 815F1CF SealedChamber_OuterRoom_EventScript_15F1D9:: @ 815F1D9 lockall - braillemsg SealedChamber_OuterRoom_Braille_1C53B1 + braillemessage SealedChamber_OuterRoom_Braille_1C53B1 waitbutton - hidebox 0, 0, 29, 19 + erasebox 0, 0, 29, 19 releaseall end diff --git a/data/scripts/maps/ShoalCave_LowTideEntranceRoom.inc b/data/scripts/maps/ShoalCave_LowTideEntranceRoom.inc index 38a1c9a74..52d430db5 100644 --- a/data/scripts/maps/ShoalCave_LowTideEntranceRoom.inc +++ b/data/scripts/maps/ShoalCave_LowTideEntranceRoom.inc @@ -5,43 +5,43 @@ ShoalCave_LowTideEntranceRoom_MapScripts:: @ 815E057 ShoalCave_LowTideEntranceRoom_MapScript1_15E05D:: @ 815E05D special UpdateShoalTideFlag checkflag 2106 - jumpeq ShoalCave_LowTideEntranceRoom_EventScript_15E06E - jump ShoalCave_LowTideEntranceRoom_EventScript_15E072 + goto_if_eq ShoalCave_LowTideEntranceRoom_EventScript_15E06E + goto ShoalCave_LowTideEntranceRoom_EventScript_15E072 ShoalCave_LowTideEntranceRoom_EventScript_15E06E:: @ 815E06E - setmapfooter 169 + setmaplayoutindex 169 end ShoalCave_LowTideEntranceRoom_EventScript_15E072:: @ 815E072 - setmapfooter 165 + setmaplayoutindex 165 end ShoalCave_LowTideEntranceRoom_EventScript_15E076:: @ 815E076 lock faceplayer - checkdailyflags + dodailyevents checkflag 2143 - callif 1, ShoalCave_LowTideEntranceRoom_EventScript_15E176 + call_if 1, ShoalCave_LowTideEntranceRoom_EventScript_15E176 checkitem ITEM_SHOAL_SALT, 4 compare RESULT, 0 - jumpeq ShoalCave_LowTideEntranceRoom_EventScript_15E138 + goto_if_eq ShoalCave_LowTideEntranceRoom_EventScript_15E138 checkitem ITEM_SHOAL_SHELL, 4 compare RESULT, 0 - jumpeq ShoalCave_LowTideEntranceRoom_EventScript_15E138 + goto_if_eq ShoalCave_LowTideEntranceRoom_EventScript_15E138 msgbox ShoalCave_LowTideEntranceRoom_Text_1C6793, 5 compare RESULT, 0 - jumpeq ShoalCave_LowTideEntranceRoom_EventScript_15E16C + goto_if_eq ShoalCave_LowTideEntranceRoom_EventScript_15E16C checkitemspace ITEM_SHELL_BELL, 1 compare RESULT, 0 - callif 1, ShoalCave_LowTideEntranceRoom_EventScript_15E106 + call_if 1, ShoalCave_LowTideEntranceRoom_EventScript_15E106 compare RESULT, 2 - jumpeq ShoalCave_LowTideEntranceRoom_EventScript_15E12E + goto_if_eq ShoalCave_LowTideEntranceRoom_EventScript_15E12E msgbox ShoalCave_LowTideEntranceRoom_Text_1C6808, 4 removeitem ITEM_SHOAL_SALT, 4 removeitem ITEM_SHOAL_SHELL, 4 giveitem ITEM_SHELL_BELL compare RESULT, 0 - jumpeq ShoalCave_LowTideEntranceRoom_EventScript_1A029B + goto_if_eq ShoalCave_LowTideEntranceRoom_EventScript_1A029B msgbox ShoalCave_LowTideEntranceRoom_Text_1C688E, 4 setflag 2 release @@ -50,13 +50,13 @@ ShoalCave_LowTideEntranceRoom_EventScript_15E076:: @ 815E076 ShoalCave_LowTideEntranceRoom_EventScript_15E106:: @ 815E106 checkitem ITEM_SHOAL_SALT, 5 compare RESULT, 1 - jumpeq ShoalCave_LowTideEntranceRoom_EventScript_15E117 + goto_if_eq ShoalCave_LowTideEntranceRoom_EventScript_15E117 return ShoalCave_LowTideEntranceRoom_EventScript_15E117:: @ 815E117 checkitem ITEM_SHOAL_SHELL, 5 compare RESULT, 1 - jumpeq ShoalCave_LowTideEntranceRoom_EventScript_15E128 + goto_if_eq ShoalCave_LowTideEntranceRoom_EventScript_15E128 return ShoalCave_LowTideEntranceRoom_EventScript_15E128:: @ 815E128 @@ -71,10 +71,10 @@ ShoalCave_LowTideEntranceRoom_EventScript_15E12E:: @ 815E12E ShoalCave_LowTideEntranceRoom_EventScript_15E138:: @ 815E138 checkitem ITEM_SHOAL_SALT, 1 compare RESULT, 1 - jumpeq ShoalCave_LowTideEntranceRoom_EventScript_15E162 + goto_if_eq ShoalCave_LowTideEntranceRoom_EventScript_15E162 checkitem ITEM_SHOAL_SHELL, 1 compare RESULT, 1 - jumpeq ShoalCave_LowTideEntranceRoom_EventScript_15E162 + goto_if_eq ShoalCave_LowTideEntranceRoom_EventScript_15E162 msgbox ShoalCave_LowTideEntranceRoom_Text_1C6668, 4 release end diff --git a/data/scripts/maps/ShoalCave_LowTideInnerRoom.inc b/data/scripts/maps/ShoalCave_LowTideInnerRoom.inc index 3078b4625..ada997023 100644 --- a/data/scripts/maps/ShoalCave_LowTideInnerRoom.inc +++ b/data/scripts/maps/ShoalCave_LowTideInnerRoom.inc @@ -5,15 +5,15 @@ ShoalCave_LowTideInnerRoom_MapScripts:: @ 815E192 ShoalCave_LowTideInnerRoom_MapScript1_15E19D:: @ 815E19D checkflag 2106 - jumpeq ShoalCave_LowTideInnerRoom_EventScript_15E1AB - jump ShoalCave_LowTideInnerRoom_EventScript_15E1AF + goto_if_eq ShoalCave_LowTideInnerRoom_EventScript_15E1AB + goto ShoalCave_LowTideInnerRoom_EventScript_15E1AF ShoalCave_LowTideInnerRoom_EventScript_15E1AB:: @ 815E1AB - setmapfooter 170 + setmaplayoutindex 170 end ShoalCave_LowTideInnerRoom_EventScript_15E1AF:: @ 815E1AF - setmapfooter 166 + setmaplayoutindex 166 end ShoalCave_LowTideInnerRoom_MapScript1_15E1B3:: @ 815E1B3 @@ -22,46 +22,46 @@ ShoalCave_LowTideInnerRoom_MapScript1_15E1B3:: @ 815E1B3 ShoalCave_LowTideInnerRoom_EventScript_15E1B9:: @ 815E1B9 checkflag 952 - jumpeq ShoalCave_LowTideInnerRoom_EventScript_15E1DA + goto_if_eq ShoalCave_LowTideInnerRoom_EventScript_15E1DA checkflag 2106 - jumpeq ShoalCave_LowTideInnerRoom_EventScript_15E1DA + goto_if_eq ShoalCave_LowTideInnerRoom_EventScript_15E1DA setmaptile 31, 8, 856, 1 - jump ShoalCave_LowTideInnerRoom_EventScript_15E1DA + goto ShoalCave_LowTideInnerRoom_EventScript_15E1DA end ShoalCave_LowTideInnerRoom_EventScript_15E1DA:: @ 815E1DA checkflag 953 - jumpeq ShoalCave_LowTideInnerRoom_EventScript_15E1FB + goto_if_eq ShoalCave_LowTideInnerRoom_EventScript_15E1FB checkflag 2106 - jumpeq ShoalCave_LowTideInnerRoom_EventScript_15E1FB + goto_if_eq ShoalCave_LowTideInnerRoom_EventScript_15E1FB setmaptile 14, 26, 856, 1 - jump ShoalCave_LowTideInnerRoom_EventScript_15E1FB + goto ShoalCave_LowTideInnerRoom_EventScript_15E1FB end ShoalCave_LowTideInnerRoom_EventScript_15E1FB:: @ 815E1FB checkflag 956 - jumpeq ShoalCave_LowTideInnerRoom_EventScript_15E213 + goto_if_eq ShoalCave_LowTideInnerRoom_EventScript_15E213 setmaptile 41, 20, 857, 1 - jump ShoalCave_LowTideInnerRoom_EventScript_15E213 + goto ShoalCave_LowTideInnerRoom_EventScript_15E213 end ShoalCave_LowTideInnerRoom_EventScript_15E213:: @ 815E213 checkflag 957 - jumpeq ShoalCave_LowTideInnerRoom_EventScript_15E22B + goto_if_eq ShoalCave_LowTideInnerRoom_EventScript_15E22B setmaptile 41, 10, 857, 1 - jump ShoalCave_LowTideInnerRoom_EventScript_15E22B + goto ShoalCave_LowTideInnerRoom_EventScript_15E22B end ShoalCave_LowTideInnerRoom_EventScript_15E22B:: @ 815E22B checkflag 958 - jumpeq ShoalCave_LowTideInnerRoom_EventScript_15E243 + goto_if_eq ShoalCave_LowTideInnerRoom_EventScript_15E243 setmaptile 6, 9, 857, 1 - jump ShoalCave_LowTideInnerRoom_EventScript_15E243 + goto ShoalCave_LowTideInnerRoom_EventScript_15E243 end ShoalCave_LowTideInnerRoom_EventScript_15E243:: @ 815E243 checkflag 959 - jumpeq ShoalCave_LowTideInnerRoom_EventScript_15E256 + goto_if_eq ShoalCave_LowTideInnerRoom_EventScript_15E256 setmaptile 16, 13, 857, 1 return @@ -71,10 +71,10 @@ ShoalCave_LowTideInnerRoom_EventScript_15E256:: @ 815E256 ShoalCave_LowTideInnerRoom_EventScript_15E257:: @ 815E257 lockall checkflag 956 - jumpeq ShoalCave_LowTideInnerRoom_EventScript_15E289 + goto_if_eq ShoalCave_LowTideInnerRoom_EventScript_15E289 giveitem ITEM_SHOAL_SHELL compare RESULT, 0 - jumpeq ShoalCave_LowTideInnerRoom_EventScript_1A029B + goto_if_eq ShoalCave_LowTideInnerRoom_EventScript_1A029B setmaptile 41, 20, 859, 0 special DrawWholeMapView setflag 956 @@ -89,10 +89,10 @@ ShoalCave_LowTideInnerRoom_EventScript_15E289:: @ 815E289 ShoalCave_LowTideInnerRoom_EventScript_15E293:: @ 815E293 lockall checkflag 957 - jumpeq ShoalCave_LowTideInnerRoom_EventScript_15E289 + goto_if_eq ShoalCave_LowTideInnerRoom_EventScript_15E289 giveitem ITEM_SHOAL_SHELL compare RESULT, 0 - jumpeq ShoalCave_LowTideInnerRoom_EventScript_1A029B + goto_if_eq ShoalCave_LowTideInnerRoom_EventScript_1A029B setmaptile 41, 10, 859, 0 special DrawWholeMapView setflag 957 @@ -102,10 +102,10 @@ ShoalCave_LowTideInnerRoom_EventScript_15E293:: @ 815E293 ShoalCave_LowTideInnerRoom_EventScript_15E2C5:: @ 815E2C5 lockall checkflag 958 - jumpeq ShoalCave_LowTideInnerRoom_EventScript_15E289 + goto_if_eq ShoalCave_LowTideInnerRoom_EventScript_15E289 giveitem ITEM_SHOAL_SHELL compare RESULT, 0 - jumpeq ShoalCave_LowTideInnerRoom_EventScript_1A029B + goto_if_eq ShoalCave_LowTideInnerRoom_EventScript_1A029B setmaptile 6, 9, 859, 0 special DrawWholeMapView setflag 958 @@ -115,10 +115,10 @@ ShoalCave_LowTideInnerRoom_EventScript_15E2C5:: @ 815E2C5 ShoalCave_LowTideInnerRoom_EventScript_15E2F7:: @ 815E2F7 lockall checkflag 959 - jumpeq ShoalCave_LowTideInnerRoom_EventScript_15E289 + goto_if_eq ShoalCave_LowTideInnerRoom_EventScript_15E289 giveitem ITEM_SHOAL_SHELL compare RESULT, 0 - jumpeq ShoalCave_LowTideInnerRoom_EventScript_1A029B + goto_if_eq ShoalCave_LowTideInnerRoom_EventScript_1A029B setmaptile 16, 13, 859, 0 special DrawWholeMapView setflag 959 @@ -128,10 +128,10 @@ ShoalCave_LowTideInnerRoom_EventScript_15E2F7:: @ 815E2F7 ShoalCave_LowTideInnerRoom_EventScript_15E329:: @ 815E329 lockall checkflag 952 - jumpeq ShoalCave_LowTideInnerRoom_EventScript_15E35B + goto_if_eq ShoalCave_LowTideInnerRoom_EventScript_15E35B giveitem ITEM_SHOAL_SALT compare RESULT, 0 - jumpeq ShoalCave_LowTideInnerRoom_EventScript_1A029B + goto_if_eq ShoalCave_LowTideInnerRoom_EventScript_1A029B setmaptile 31, 8, 858, 0 special DrawWholeMapView setflag 952 @@ -146,10 +146,10 @@ ShoalCave_LowTideInnerRoom_EventScript_15E35B:: @ 815E35B ShoalCave_LowTideInnerRoom_EventScript_15E365:: @ 815E365 lockall checkflag 953 - jumpeq ShoalCave_LowTideInnerRoom_EventScript_15E35B + goto_if_eq ShoalCave_LowTideInnerRoom_EventScript_15E35B giveitem ITEM_SHOAL_SALT compare RESULT, 0 - jumpeq ShoalCave_LowTideInnerRoom_EventScript_1A029B + goto_if_eq ShoalCave_LowTideInnerRoom_EventScript_1A029B setmaptile 14, 26, 858, 0 special DrawWholeMapView setflag 953 diff --git a/data/scripts/maps/ShoalCave_LowTideLowerRoom.inc b/data/scripts/maps/ShoalCave_LowTideLowerRoom.inc index 67de2676f..db5779efe 100644 --- a/data/scripts/maps/ShoalCave_LowTideLowerRoom.inc +++ b/data/scripts/maps/ShoalCave_LowTideLowerRoom.inc @@ -8,7 +8,7 @@ ShoalCave_LowTideLowerRoom_MapScript1_15E3F9:: @ 815E3F9 ShoalCave_LowTideLowerRoom_EventScript_15E3FF:: @ 815E3FF checkflag 955 - jumpeq ShoalCave_LowTideLowerRoom_EventScript_15E412 + goto_if_eq ShoalCave_LowTideLowerRoom_EventScript_15E412 setmaptile 18, 2, 856, 1 return @@ -18,10 +18,10 @@ ShoalCave_LowTideLowerRoom_EventScript_15E412:: @ 815E412 ShoalCave_LowTideLowerRoom_EventScript_15E413:: @ 815E413 lockall checkflag 955 - jumpeq ShoalCave_LowTideLowerRoom_EventScript_15E445 + goto_if_eq ShoalCave_LowTideLowerRoom_EventScript_15E445 giveitem ITEM_SHOAL_SALT compare RESULT, 0 - jumpeq ShoalCave_LowTideLowerRoom_EventScript_1A029B + goto_if_eq ShoalCave_LowTideLowerRoom_EventScript_1A029B setmaptile 18, 2, 858, 0 special DrawWholeMapView setflag 955 @@ -37,11 +37,11 @@ ShoalCave_LowTideLowerRoom_EventScript_15E44F:: @ 815E44F lock faceplayer checkflag 283 - jumpeq ShoalCave_LowTideLowerRoom_EventScript_15E47E + goto_if_eq ShoalCave_LowTideLowerRoom_EventScript_15E47E msgbox ShoalCave_LowTideLowerRoom_Text_198200, 4 giveitem ITEM_FOCUS_BAND compare RESULT, 0 - jumpeq ShoalCave_LowTideLowerRoom_EventScript_1A029B + goto_if_eq ShoalCave_LowTideLowerRoom_EventScript_1A029B setflag 283 release end diff --git a/data/scripts/maps/ShoalCave_LowTideStairsRoom.inc b/data/scripts/maps/ShoalCave_LowTideStairsRoom.inc index c46a2cb2d..bffb7bd49 100644 --- a/data/scripts/maps/ShoalCave_LowTideStairsRoom.inc +++ b/data/scripts/maps/ShoalCave_LowTideStairsRoom.inc @@ -8,7 +8,7 @@ ShoalCave_LowTideStairsRoom_MapScript1_15E39D:: @ 815E39D ShoalCave_LowTideStairsRoom_EventScript_15E3A3:: @ 815E3A3 checkflag 954 - jumpeq ShoalCave_LowTideStairsRoom_EventScript_15E3B6 + goto_if_eq ShoalCave_LowTideStairsRoom_EventScript_15E3B6 setmaptile 11, 11, 856, 1 return @@ -18,10 +18,10 @@ ShoalCave_LowTideStairsRoom_EventScript_15E3B6:: @ 815E3B6 ShoalCave_LowTideStairsRoom_EventScript_15E3B7:: @ 815E3B7 lockall checkflag 954 - jumpeq ShoalCave_LowTideStairsRoom_EventScript_15E3E9 + goto_if_eq ShoalCave_LowTideStairsRoom_EventScript_15E3E9 giveitem ITEM_SHOAL_SALT compare RESULT, 0 - jumpeq ShoalCave_LowTideStairsRoom_EventScript_1A029B + goto_if_eq ShoalCave_LowTideStairsRoom_EventScript_1A029B setmaptile 11, 11, 858, 0 special DrawWholeMapView setflag 954 diff --git a/data/scripts/maps/SkyPillar_2F.inc b/data/scripts/maps/SkyPillar_2F.inc index 62cb389f2..3b3585bf8 100644 --- a/data/scripts/maps/SkyPillar_2F.inc +++ b/data/scripts/maps/SkyPillar_2F.inc @@ -6,5 +6,5 @@ SkyPillar_2F_MapScripts:: @ 815F2C9 SkyPillar_2F_MapScript1_15F2D9:: @ 815F2D9 tileeffect 7 - warp5 SkyPillar_1F, 255, 0, 0 + setholewarp SkyPillar_1F, 255, 0, 0 end diff --git a/data/scripts/maps/SkyPillar_4F.inc b/data/scripts/maps/SkyPillar_4F.inc index 5e1f7f4e6..3d535a25a 100644 --- a/data/scripts/maps/SkyPillar_4F.inc +++ b/data/scripts/maps/SkyPillar_4F.inc @@ -6,5 +6,5 @@ SkyPillar_4F_MapScripts:: @ 815F2E5 SkyPillar_4F_MapScript1_15F2F5:: @ 815F2F5 tileeffect 7 - warp5 SkyPillar_3F, 255, 0, 0 + setholewarp SkyPillar_3F, 255, 0, 0 end diff --git a/data/scripts/maps/SkyPillar_Top.inc b/data/scripts/maps/SkyPillar_Top.inc index d659a23c1..1dee6e9c4 100644 --- a/data/scripts/maps/SkyPillar_Top.inc +++ b/data/scripts/maps/SkyPillar_Top.inc @@ -4,20 +4,20 @@ SkyPillar_Top_MapScripts:: @ 815F302 SkyPillar_Top_MapScript1_15F308:: @ 815F308 checkflag 2145 - callif 1, SkyPillar_Top_EventScript_15F312 + call_if 1, SkyPillar_Top_EventScript_15F312 end SkyPillar_Top_EventScript_15F312:: @ 815F312 - disappear LAST_TALKED + removeobject LAST_TALKED return SkyPillar_Top_EventScript_15F316:: @ 815F316 lock faceplayer setwildbattle SPECIES_RAYQUAZA, 70, ITEM_NONE - checksound - pokecry SPECIES_RAYQUAZA, 2 - pause 40 + waitse + playpokecry SPECIES_RAYQUAZA, 2 + delay 40 waitpokecry setflag 773 setflag 2145 diff --git a/data/scripts/maps/SlateportCity.inc b/data/scripts/maps/SlateportCity.inc index e156f8948..bea1455a7 100644 --- a/data/scripts/maps/SlateportCity.inc +++ b/data/scripts/maps/SlateportCity.inc @@ -13,7 +13,7 @@ SlateportCity_MapScript1_14BA3C:: @ 814BA3C setvar 0x40aa, 0 call SlateportCity_EventScript_14BA5C compare 0x4058, 1 - callif 1, SlateportCity_EventScript_14BA68 + call_if 1, SlateportCity_EventScript_14BA68 end SlateportCity_EventScript_14BA5C:: @ 814BA5C @@ -23,27 +23,27 @@ SlateportCity_EventScript_14BA5C:: @ 814BA5C return SlateportCity_EventScript_14BA68:: @ 814BA68 - movespriteperm 11, 28, 13 - movespriteperm 7, 25, 13 - movespriteperm 3, 25, 14 - movespriteperm 6, 27, 16 - movespriteperm 8, 28, 16 - movespriteperm 1, 29, 16 - movespriteperm 2, 31, 14 - spritebehave 11, 8 - spritebehave 7, 18 - spritebehave 3, 16 - spritebehave 6, 7 - spritebehave 8, 7 - spritebehave 1, 7 - spritebehave 2, 9 + setobjectxyperm 11, 28, 13 + setobjectxyperm 7, 25, 13 + setobjectxyperm 3, 25, 14 + setobjectxyperm 6, 27, 16 + setobjectxyperm 8, 28, 16 + setobjectxyperm 1, 29, 16 + setobjectxyperm 2, 31, 14 + setobjectmovementtype 11, 8 + setobjectmovementtype 7, 18 + setobjectmovementtype 3, 16 + setobjectmovementtype 6, 7 + setobjectmovementtype 8, 7 + setobjectmovementtype 1, 7 + setobjectmovementtype 2, 9 return SlateportCity_EventScript_14BAB6:: @ 814BAB6 lock faceplayer message SlateportCity_Text_164642 - waittext + waitmessage pokemart SlateportCity_Items1 msgbox SlateportCity_Text_1A0C02, 4 release @@ -64,19 +64,19 @@ SlateportCity_Items1:: @ 814BAD0 SlateportCity_EventScript_14BAE0:: @ 814BAE0 lock faceplayer - bufferfirstpoke 0 + getfirstpartypokename 0 msgbox SlateportCity_Text_164682, 4 - specialval RESULT, LeadMonHasEffortRibbon + specialvar RESULT, LeadMonHasEffortRibbon compare RESULT, 1 - callif 1, SlateportCity_EventScript_14BB35 - specialval RESULT, ScrSpecial_AreLeadMonEVsMaxedOut + call_if 1, SlateportCity_EventScript_14BB35 + specialvar RESULT, ScrSpecial_AreLeadMonEVsMaxedOut compare RESULT, 0 - callif 1, SlateportCity_EventScript_14BB2B + call_if 1, SlateportCity_EventScript_14BB2B msgbox SlateportCity_Text_164691, 4 - fanfare 370 + playfanfare 370 message SlateportCity_Text_1646DD waitfanfare - waittext + waitmessage msgbox SlateportCity_Text_1646FC, 4 special GivLeadMonEffortRibbon release @@ -96,7 +96,7 @@ SlateportCity_EventScript_14BB3F:: @ 814BB3F lock faceplayer compare 0x4058, 1 - callif 1, SlateportCity_EventScript_14BB56 + call_if 1, SlateportCity_EventScript_14BB56 msgbox SlateportCity_Text_164814, 4 release end @@ -110,7 +110,7 @@ SlateportCity_EventScript_14BB60:: @ 814BB60 lock faceplayer compare 0x4058, 1 - callif 1, SlateportCity_EventScript_14BB77 + call_if 1, SlateportCity_EventScript_14BB77 msgbox SlateportCity_Text_1648A0, 4 release end @@ -124,9 +124,9 @@ SlateportCity_EventScript_14BB81:: @ 814BB81 lock faceplayer compare 0x4058, 1 - callif 1, SlateportCity_EventScript_14BBA1 + call_if 1, SlateportCity_EventScript_14BBA1 checkflag 96 - jumpeq SlateportCity_EventScript_14BBAB + goto_if_eq SlateportCity_EventScript_14BBAB msgbox SlateportCity_Text_164937, 4 release end @@ -145,7 +145,7 @@ SlateportCity_EventScript_14BBB5:: @ 814BBB5 lock faceplayer compare 0x4058, 1 - callif 1, SlateportCity_EventScript_14BBCC + call_if 1, SlateportCity_EventScript_14BBCC msgbox SlateportCity_Text_164A30, 4 release end @@ -157,7 +157,7 @@ SlateportCity_EventScript_14BBCC:: @ 814BBCC SlateportCity_EventScript_14BBD6:: @ 814BBD6 compare 0x4058, 1 - jumpeq SlateportCity_EventScript_14BBEA + goto_if_eq SlateportCity_EventScript_14BBEA msgbox SlateportCity_Text_164AA9, 2 end @@ -169,7 +169,7 @@ SlateportCity_EventScript_14BBF3:: @ 814BBF3 lock faceplayer compare 0x4058, 1 - callif 1, SlateportCity_EventScript_14BC0A + call_if 1, SlateportCity_EventScript_14BC0A msgbox SlateportCity_Text_164B34, 4 release end @@ -183,7 +183,7 @@ SlateportCity_EventScript_14BC14:: @ 814BC14 lock faceplayer checkflag 148 - jumpeq SlateportCity_EventScript_14BC29 + goto_if_eq SlateportCity_EventScript_14BC29 msgbox SlateportCity_Text_164BBF, 4 release end @@ -200,9 +200,9 @@ SlateportCity_EventScript_14BC33:: @ 814BC33 SlateportCity_EventScript_14BC3C:: @ 814BC3C lockall checkflag 2052 - jumpeq SlateportCity_EventScript_14BC63 + goto_if_eq SlateportCity_EventScript_14BC63 checkflag 2061 - jumpeq SlateportCity_EventScript_14BC59 + goto_if_eq SlateportCity_EventScript_14BC59 msgbox SlateportCity_Text_1658A0, 4 releaseall end @@ -236,7 +236,7 @@ SlateportCity_EventScript_14BC88:: @ 814BC88 SlateportCity_EventScript_14BC91:: @ 814BC91 lockall checkflag 2052 - jumpeq SlateportCity_EventScript_14BCA5 + goto_if_eq SlateportCity_EventScript_14BCA5 msgbox SlateportCity_Text_165A8B, 4 releaseall end @@ -254,7 +254,7 @@ SlateportCity_EventScript_14BCB8:: @ 814BCB8 lock faceplayer compare 0x4058, 1 - callif 1, SlateportCity_EventScript_14BCCF + call_if 1, SlateportCity_EventScript_14BCCF msgbox SlateportCity_Text_164F9E, 4 release end @@ -289,9 +289,9 @@ SlateportCity_EventScript_14BD06:: @ 814BD06 faceplayer msgbox SlateportCity_Text_1650F1, 5 compare RESULT, 1 - callif 1, SlateportCity_EventScript_14BD28 + call_if 1, SlateportCity_EventScript_14BD28 compare RESULT, 0 - callif 1, SlateportCity_EventScript_14BD31 + call_if 1, SlateportCity_EventScript_14BD31 release end @@ -307,9 +307,9 @@ SlateportCity_EventScript_14BD3A:: @ 814BD3A lock faceplayer msgbox SlateportCity_Text_164C64, 4 - closebutton - move 5, SlateportCity_Movement_1A083D - waitmove 0 + closemessage + applymovement 5, SlateportCity_Movement_1A083D + waitmovement 0 release end @@ -317,9 +317,9 @@ SlateportCity_EventScript_14BD51:: @ 814BD51 lock faceplayer msgbox SlateportCity_Text_164C9F, 4 - closebutton - move 19, SlateportCity_Movement_1A083D - waitmove 0 + closemessage + applymovement 19, SlateportCity_Movement_1A083D + waitmovement 0 release end @@ -327,9 +327,9 @@ SlateportCity_EventScript_14BD68:: @ 814BD68 lock faceplayer msgbox SlateportCity_Text_164CE8, 4 - closebutton - move 20, SlateportCity_Movement_1A083D - waitmove 0 + closemessage + applymovement 20, SlateportCity_Movement_1A083D + waitmovement 0 release end @@ -337,9 +337,9 @@ SlateportCity_EventScript_14BD7F:: @ 814BD7F lock faceplayer msgbox SlateportCity_Text_164D2B, 4 - closebutton - move 27, SlateportCity_Movement_1A083D - waitmove 0 + closemessage + applymovement 27, SlateportCity_Movement_1A083D + waitmovement 0 release end @@ -347,9 +347,9 @@ SlateportCity_EventScript_14BD96:: @ 814BD96 lock faceplayer msgbox SlateportCity_Text_164D92, 4 - closebutton - move 28, SlateportCity_Movement_1A083D - waitmove 0 + closemessage + applymovement 28, SlateportCity_Movement_1A083D + waitmovement 0 release end @@ -357,9 +357,9 @@ SlateportCity_EventScript_14BDAD:: @ 814BDAD lock faceplayer msgbox SlateportCity_Text_164DD5, 4 - closebutton - move 29, SlateportCity_Movement_1A083D - waitmove 0 + closemessage + applymovement 29, SlateportCity_Movement_1A083D + waitmovement 0 release end @@ -367,9 +367,9 @@ SlateportCity_EventScript_14BDC4:: @ 814BDC4 lock faceplayer msgbox SlateportCity_Text_164DF4, 4 - closebutton - move 30, SlateportCity_Movement_1A083D - waitmove 0 + closemessage + applymovement 30, SlateportCity_Movement_1A083D + waitmovement 0 release end @@ -377,9 +377,9 @@ SlateportCity_EventScript_14BDDB:: @ 814BDDB lock faceplayer msgbox SlateportCity_Text_164E46, 4 - closebutton - move 31, SlateportCity_Movement_1A083D - waitmove 0 + closemessage + applymovement 31, SlateportCity_Movement_1A083D + waitmovement 0 release end @@ -387,7 +387,7 @@ SlateportCity_EventScript_14BDF2:: @ 814BDF2 lock faceplayer message SlateportCity_Text_1A0BE4 - waittext + waitmessage pokemartdecor SlateportCity_Decorations1 msgbox SlateportCity_Text_1A0C02, 4 release @@ -411,9 +411,9 @@ SlateportCity_EventScript_14BE20:: @ 814BE20 lock faceplayer checkflag 96 - jumpif 0, SlateportCity_EventScript_14BE16 + goto_if 0, SlateportCity_EventScript_14BE16 message SlateportCity_Text_1A0BE4 - waittext + waitmessage pokemartdecor SlateportCity_Decorations2 msgbox SlateportCity_Text_1A0C02, 4 release @@ -443,9 +443,9 @@ SlateportCity_Decorations2:: @ 814BE40 lock faceplayer checkflag 96 - jumpif 0, SlateportCity_EventScript_14BE16 + goto_if 0, SlateportCity_EventScript_14BE16 message SlateportCity_Text_1A0BE4 - waittext + waitmessage pokemartdecor SlateportCity_Decorations3 msgbox SlateportCity_Text_1A0C02, 4 release @@ -472,7 +472,7 @@ SlateportCity_EventScript_14BE9A:: @ 814BE9A lock faceplayer message SlateportCity_Text_1A0BE4 - waittext + waitmessage pokemart SlateportCity_Items2 msgbox SlateportCity_Text_1A0C02, 4 release @@ -490,49 +490,49 @@ SlateportCity_EventScript_14BEBC:: @ 814BEBC lockall msgbox SlateportCity_Text_165498, 4 msgbox SlateportCity_Text_1654E0, 4 - closebutton - move 10, SlateportCity_Movement_1A0843 - waitmove 0 - pause 10 - move 9, SlateportCity_Movement_1A0845 - waitmove 0 - pause 25 - move 11, SlateportCity_Movement_14C000 - move 255, SlateportCity_Movement_14C00E - move 10, SlateportCity_Movement_14BFDD - move 9, SlateportCity_Movement_14BFEA - waitmove 0 - disappear 10 - disappear 9 + closemessage + applymovement 10, SlateportCity_Movement_1A0843 + waitmovement 0 + delay 10 + applymovement 9, SlateportCity_Movement_1A0845 + waitmovement 0 + delay 25 + applymovement 11, SlateportCity_Movement_14C000 + applymovement 255, SlateportCity_Movement_14C00E + applymovement 10, SlateportCity_Movement_14BFDD + applymovement 9, SlateportCity_Movement_14BFEA + waitmovement 0 + removeobject 10 + removeobject 9 msgbox SlateportCity_Text_16558D, 4 - move 11, SlateportCity_Movement_1A0841 - waitmove 0 + applymovement 11, SlateportCity_Movement_1A0841 + waitmovement 0 msgbox SlateportCity_Text_1655E7, 4 - playmusic BGM_EVIL_TEAM, 0 + playbgm BGM_EVIL_TEAM, 0 msgbox SlateportCity_Text_1656BC, 4 - move 6, SlateportCity_Movement_1A083F - move 1, SlateportCity_Movement_1A083F - move 7, SlateportCity_Movement_14BFCD - move 3, SlateportCity_Movement_1A0831 - move 2, SlateportCity_Movement_14BFD5 - waitmove 0 - move 11, SlateportCity_Movement_1A0845 - waitmove 0 + applymovement 6, SlateportCity_Movement_1A083F + applymovement 1, SlateportCity_Movement_1A083F + applymovement 7, SlateportCity_Movement_14BFCD + applymovement 3, SlateportCity_Movement_1A0831 + applymovement 2, SlateportCity_Movement_14BFD5 + waitmovement 0 + applymovement 11, SlateportCity_Movement_1A0845 + waitmovement 0 msgbox SlateportCity_Text_16578F, 4 - playsfx 21 - move 11, SlateportCity_Movement_1A0833 - waitmove 0 - move 11, SlateportCity_Movement_1A0835 - waitmove 0 + playse 21 + applymovement 11, SlateportCity_Movement_1A0833 + waitmovement 0 + applymovement 11, SlateportCity_Movement_1A0835 + waitmovement 0 msgbox SlateportCity_Text_1657FA, 4 - move 11, SlateportCity_Movement_1A0839 - waitmove 0 + applymovement 11, SlateportCity_Movement_1A0839 + waitmovement 0 msgbox SlateportCity_Text_16583A, 4 - closebutton - move 11, SlateportCity_Movement_14BFFB - move 255, SlateportCity_Movement_14C008 - waitmove 0 - disappear 11 + closemessage + applymovement 11, SlateportCity_Movement_14BFFB + applymovement 255, SlateportCity_Movement_14C008 + waitmovement 0 + removeobject 11 clearflag 841 clearflag 848 clearflag 845 diff --git a/data/scripts/maps/SlateportCity_ContestHall.inc b/data/scripts/maps/SlateportCity_ContestHall.inc index 559719583..f8070f1a1 100644 --- a/data/scripts/maps/SlateportCity_ContestHall.inc +++ b/data/scripts/maps/SlateportCity_ContestHall.inc @@ -13,11 +13,11 @@ SlateportCity_ContestHall_EventScript_15555E:: @ 815555E lock faceplayer checkflag 265 - jumpeq SlateportCity_ContestHall_EventScript_155595 + goto_if_eq SlateportCity_ContestHall_EventScript_155595 msgbox SlateportCity_ContestHall_Text_17CCE2, 4 giveitem ITEM_TM41 compare RESULT, 0 - jumpeq SlateportCity_ContestHall_EventScript_1A029B + goto_if_eq SlateportCity_ContestHall_EventScript_1A029B setflag 265 msgbox SlateportCity_ContestHall_Text_17CE28, 4 release @@ -31,80 +31,80 @@ SlateportCity_ContestHall_EventScript_155595:: @ 8155595 SlateportCity_ContestHall_EventScript_15559F:: @ 815559F msgbox SlateportCity_ContestHall_Text_17CEF3, 2 lockall - move 3, SlateportCity_ContestHall_Movement_1A083D - waitmove 0 + applymovement 3, SlateportCity_ContestHall_Movement_1A083D + waitmovement 0 releaseall end SlateportCity_ContestHall_EventScript_1555B4:: @ 81555B4 msgbox SlateportCity_ContestHall_Text_17CFA7, 2 lockall - move 4, SlateportCity_ContestHall_Movement_1A083D - waitmove 0 + applymovement 4, SlateportCity_ContestHall_Movement_1A083D + waitmovement 0 releaseall end SlateportCity_ContestHall_EventScript_1555C9:: @ 81555C9 msgbox SlateportCity_ContestHall_Text_17D054, 2 lockall - move 5, SlateportCity_ContestHall_Movement_1A083D - waitmove 0 + applymovement 5, SlateportCity_ContestHall_Movement_1A083D + waitmovement 0 releaseall end SlateportCity_ContestHall_EventScript_1555DE:: @ 81555DE msgbox SlateportCity_ContestHall_Text_17D07F, 2 lockall - move 6, SlateportCity_ContestHall_Movement_1A083D - waitmove 0 + applymovement 6, SlateportCity_ContestHall_Movement_1A083D + waitmovement 0 releaseall end SlateportCity_ContestHall_EventScript_1555F3:: @ 81555F3 msgbox SlateportCity_ContestHall_Text_17D0F9, 2 lockall - move 7, SlateportCity_ContestHall_Movement_1A083D - waitmove 0 + applymovement 7, SlateportCity_ContestHall_Movement_1A083D + waitmovement 0 releaseall end SlateportCity_ContestHall_EventScript_155608:: @ 8155608 msgbox SlateportCity_ContestHall_Text_17D222, 2 lockall - move 8, SlateportCity_ContestHall_Movement_1A083D - waitmove 0 + applymovement 8, SlateportCity_ContestHall_Movement_1A083D + waitmovement 0 releaseall end SlateportCity_ContestHall_EventScript_15561D:: @ 815561D msgbox SlateportCity_ContestHall_Text_17D39A, 2 lockall - move 9, SlateportCity_ContestHall_Movement_1A083D - waitmove 0 + applymovement 9, SlateportCity_ContestHall_Movement_1A083D + waitmovement 0 releaseall end SlateportCity_ContestHall_EventScript_155632:: @ 8155632 msgbox SlateportCity_ContestHall_Text_17D3F0, 2 lockall - move 10, SlateportCity_ContestHall_Movement_1A083D - waitmove 0 + applymovement 10, SlateportCity_ContestHall_Movement_1A083D + waitmovement 0 releaseall end SlateportCity_ContestHall_EventScript_155647:: @ 8155647 msgbox SlateportCity_ContestHall_Text_17D300, 2 lockall - move 12, SlateportCity_ContestHall_Movement_1A083D - waitmove 0 + applymovement 12, SlateportCity_ContestHall_Movement_1A083D + waitmovement 0 releaseall end SlateportCity_ContestHall_EventScript_15565C:: @ 815565C msgbox SlateportCity_ContestHall_Text_17D27F, 2 lockall - move 11, SlateportCity_ContestHall_Movement_1A083D - waitmove 0 + applymovement 11, SlateportCity_ContestHall_Movement_1A083D + waitmovement 0 releaseall end diff --git a/data/scripts/maps/SlateportCity_ContestLobby.inc b/data/scripts/maps/SlateportCity_ContestLobby.inc index b1ce50815..cb4632d77 100644 --- a/data/scripts/maps/SlateportCity_ContestLobby.inc +++ b/data/scripts/maps/SlateportCity_ContestLobby.inc @@ -20,28 +20,28 @@ SlateportCity_ContestLobby_EventScript_15541D:: @ 815541D SlateportCity_ContestLobby_EventScript_155448:: @ 8155448 lockall - move 1, SlateportCity_ContestLobby_Movement_1554CC - waitmove 0 - playsfx 71 + applymovement 1, SlateportCity_ContestLobby_Movement_1554CC + waitmovement 0 + playse 71 setmaptile 4, 2, 545, 1 setmaptile 4, 3, 609, 1 special DrawWholeMapView - move 1, SlateportCity_ContestLobby_Movement_1554CF - waitmove 0 - playsfx 71 + applymovement 1, SlateportCity_ContestLobby_Movement_1554CF + waitmovement 0 + playse 71 setmaptile 4, 2, 721, 1 setmaptile 4, 3, 729, 1 special DrawWholeMapView - pause 20 - move 1, SlateportCity_ContestLobby_Movement_1554DC - waitmove 0 - move 255, SlateportCity_ContestLobby_Movement_1554CA - waitmove 0 + delay 20 + applymovement 1, SlateportCity_ContestLobby_Movement_1554DC + waitmovement 0 + applymovement 255, SlateportCity_ContestLobby_Movement_1554CA + waitmovement 0 msgbox SlateportCity_ContestLobby_Text_1A6832, 4 - closebutton - move 1, SlateportCity_ContestLobby_Movement_1554D3 - move 255, SlateportCity_ContestLobby_Movement_1554C0 - waitmove 0 + closemessage + applymovement 1, SlateportCity_ContestLobby_Movement_1554D3 + applymovement 255, SlateportCity_ContestLobby_Movement_1554C0 + waitmovement 0 releaseall return @@ -102,9 +102,9 @@ SlateportCity_ContestLobby_EventScript_1554F0:: @ 81554F0 SlateportCity_ContestLobby_EventScript_1554F9:: @ 81554F9 lockall checkflag 95 - jumpeq SlateportCity_ContestLobby_EventScript_155526 - move 7, SlateportCity_ContestLobby_Movement_1A0839 - waitmove 0 + goto_if_eq SlateportCity_ContestLobby_EventScript_155526 + applymovement 7, SlateportCity_ContestLobby_Movement_1A0839 + waitmovement 0 msgbox SlateportCity_ContestLobby_Text_17CA67, 4 giveitem ITEM_POKEBLOCK_CASE setflag 95 @@ -118,7 +118,7 @@ SlateportCity_ContestLobby_EventScript_155526:: @ 8155526 SlateportCity_ContestLobby_EventScript_15552F:: @ 815552F lockall fadescreen 1 - showcontestwinner 3 + drawcontestwinner 3 releaseall end @@ -130,6 +130,6 @@ SlateportCity_ContestLobby_EventScript_155536:: @ 8155536 lockall special ShowBerryBlenderRecordWindow waitbutton - hidebox 0, 0, 29, 19 + erasebox 0, 0, 29, 19 releaseall end diff --git a/data/scripts/maps/SlateportCity_Harbor.inc b/data/scripts/maps/SlateportCity_Harbor.inc index d65d28877..f145c4a3d 100644 --- a/data/scripts/maps/SlateportCity_Harbor.inc +++ b/data/scripts/maps/SlateportCity_Harbor.inc @@ -3,12 +3,12 @@ SlateportCity_Harbor_MapScripts:: @ 8155F5D .byte 0 SlateportCity_Harbor_MapScript1_155F63:: @ 8155F63 - warp6 SlateportCity, 255, 28, 13 + setescapewarp SlateportCity, 255, 28, 13 setvar 0x4001, 0 compare 0x40a0, 1 - callif 1, SlateportCity_Harbor_EventScript_155F89 + call_if 1, SlateportCity_Harbor_EventScript_155F89 checkflag 2052 - callif 1, SlateportCity_Harbor_EventScript_155F85 + call_if 1, SlateportCity_Harbor_EventScript_155F85 end SlateportCity_Harbor_EventScript_155F85:: @ 8155F85 @@ -16,89 +16,89 @@ SlateportCity_Harbor_EventScript_155F85:: @ 8155F85 return SlateportCity_Harbor_EventScript_155F89:: @ 8155F89 - playmusicbattle BGM_EVIL_TEAM - movespriteperm 4, 12, 13 - spritebehave 4, 9 + savebgm BGM_EVIL_TEAM + setobjectxyperm 4, 12, 13 + setobjectmovementtype 4, 9 setflag 905 return SlateportCity_Harbor_EventScript_155F9B:: @ 8155F9B lockall setvar 0x8008, 0 - jump SlateportCity_Harbor_EventScript_155FD5 + goto SlateportCity_Harbor_EventScript_155FD5 end SlateportCity_Harbor_EventScript_155FA7:: @ 8155FA7 lockall setvar 0x8008, 1 - jump SlateportCity_Harbor_EventScript_155FD5 + goto SlateportCity_Harbor_EventScript_155FD5 end SlateportCity_Harbor_EventScript_155FB3:: @ 8155FB3 lockall setvar 0x8008, 2 - jump SlateportCity_Harbor_EventScript_155FD5 + goto SlateportCity_Harbor_EventScript_155FD5 end SlateportCity_Harbor_EventScript_155FBF:: @ 8155FBF lockall setvar 0x8008, 3 - move 255, SlateportCity_Harbor_Movement_1560C2 - waitmove 0 - jump SlateportCity_Harbor_EventScript_155FD5 + applymovement 255, SlateportCity_Harbor_Movement_1560C2 + waitmovement 0 + goto SlateportCity_Harbor_EventScript_155FD5 end SlateportCity_Harbor_EventScript_155FD5:: @ 8155FD5 - move 7, SlateportCity_Harbor_Movement_1A0845 - waitmove 0 - move 255, SlateportCity_Harbor_Movement_1A0841 - waitmove 0 + applymovement 7, SlateportCity_Harbor_Movement_1A0845 + waitmovement 0 + applymovement 255, SlateportCity_Harbor_Movement_1A0841 + waitmovement 0 msgbox SlateportCity_Harbor_Text_17FD7D, 4 - closebutton - move 6, SlateportCity_Harbor_Movement_15609B - move 7, SlateportCity_Harbor_Movement_15609B - move 8, SlateportCity_Harbor_Movement_1560A5 - waitmove 0 - disappear 6 - disappear 7 - disappear 8 + closemessage + applymovement 6, SlateportCity_Harbor_Movement_15609B + applymovement 7, SlateportCity_Harbor_Movement_15609B + applymovement 8, SlateportCity_Harbor_Movement_1560A5 + waitmovement 0 + removeobject 6 + removeobject 7 + removeobject 8 setvar 0x40a0, 2 compare 0x8008, 0 - callif 1, SlateportCity_Harbor_EventScript_15605C + call_if 1, SlateportCity_Harbor_EventScript_15605C compare 0x8008, 1 - callif 1, SlateportCity_Harbor_EventScript_156071 + call_if 1, SlateportCity_Harbor_EventScript_156071 compare 0x8008, 2 - callif 1, SlateportCity_Harbor_EventScript_156086 + call_if 1, SlateportCity_Harbor_EventScript_156086 compare 0x8008, 3 - callif 1, SlateportCity_Harbor_EventScript_156086 + call_if 1, SlateportCity_Harbor_EventScript_156086 msgbox SlateportCity_Harbor_Text_17FE60, 4 - closebutton + closemessage setflag 821 setflag 822 - moveoffscreen 4 - spritebehave 4, 10 + moveobjectoffscreen 4 + setobjectmovementtype 4, 10 releaseall end SlateportCity_Harbor_EventScript_15605C:: @ 815605C - move 4, SlateportCity_Harbor_Movement_1560B3 - waitmove 0 - move 255, SlateportCity_Harbor_Movement_1A0845 - waitmove 0 + applymovement 4, SlateportCity_Harbor_Movement_1560B3 + waitmovement 0 + applymovement 255, SlateportCity_Harbor_Movement_1A0845 + waitmovement 0 return SlateportCity_Harbor_EventScript_156071:: @ 8156071 - move 4, SlateportCity_Harbor_Movement_1560B9 - waitmove 0 - move 255, SlateportCity_Harbor_Movement_1A0843 - waitmove 0 + applymovement 4, SlateportCity_Harbor_Movement_1560B9 + waitmovement 0 + applymovement 255, SlateportCity_Harbor_Movement_1A0843 + waitmovement 0 return SlateportCity_Harbor_EventScript_156086:: @ 8156086 - move 4, SlateportCity_Harbor_Movement_1560BE - waitmove 0 - move 255, SlateportCity_Harbor_Movement_1A0843 - waitmove 0 + applymovement 4, SlateportCity_Harbor_Movement_1560BE + waitmovement 0 + applymovement 255, SlateportCity_Harbor_Movement_1A0843 + waitmovement 0 return SlateportCity_Harbor_Movement_15609B:: @ 815609B @@ -160,7 +160,7 @@ SlateportCity_Harbor_EventScript_1560C4:: @ 81560C4 lock faceplayer checkflag 2052 - jumpeq SlateportCity_Harbor_EventScript_1560D9 + goto_if_eq SlateportCity_Harbor_EventScript_1560D9 msgbox SlateportCity_Harbor_Text_17FA0A, 4 release end @@ -169,14 +169,14 @@ SlateportCity_Harbor_EventScript_1560D9:: @ 81560D9 msgbox SlateportCity_Harbor_Text_17FA73, 4 checkitem ITEM_SS_TICKET, 1 compare RESULT, 0 - jumpeq SlateportCity_Harbor_EventScript_156135 + goto_if_eq SlateportCity_Harbor_EventScript_156135 message SlateportCity_Harbor_Text_17FB0A - waittext - jump SlateportCity_Harbor_EventScript_1560FD + waitmessage + goto SlateportCity_Harbor_EventScript_1560FD end SlateportCity_Harbor_EventScript_1560FD:: @ 81560FD - multichoicedef 18, 6, 52, 2, 0 + multichoicedefault 18, 6, 52, 2, 0 switch RESULT case 0, SlateportCity_Harbor_EventScript_15613F case 1, SlateportCity_Harbor_EventScript_156167 @@ -192,7 +192,7 @@ SlateportCity_Harbor_EventScript_156135:: @ 8156135 SlateportCity_Harbor_EventScript_15613F:: @ 815613F msgbox SlateportCity_Harbor_Text_17FB81, 5 compare RESULT, 0 - jumpeq SlateportCity_Harbor_EventScript_15618A + goto_if_eq SlateportCity_Harbor_EventScript_15618A setvar 0x40b4, 1 call SlateportCity_Harbor_EventScript_156196 warp SSTidalCorridor, 255, 1, 10 @@ -203,7 +203,7 @@ SlateportCity_Harbor_EventScript_15613F:: @ 815613F SlateportCity_Harbor_EventScript_156167:: @ 8156167 msgbox SlateportCity_Harbor_Text_17FB9C, 5 compare RESULT, 0 - jumpeq SlateportCity_Harbor_EventScript_15618A + goto_if_eq SlateportCity_Harbor_EventScript_15618A call SlateportCity_Harbor_EventScript_156196 warp BattleTower_Outside, 255, 19, 23 waitstate @@ -212,23 +212,23 @@ SlateportCity_Harbor_EventScript_156167:: @ 8156167 SlateportCity_Harbor_EventScript_15618A:: @ 815618A message SlateportCity_Harbor_Text_17FBE5 - waittext - jump SlateportCity_Harbor_EventScript_1560FD + waitmessage + goto SlateportCity_Harbor_EventScript_1560FD end SlateportCity_Harbor_EventScript_156196:: @ 8156196 msgbox SlateportCity_Harbor_Text_17FBB6, 4 - closebutton - move LAST_TALKED, SlateportCity_Harbor_Movement_1A0841 - waitmove 0 - pause 30 - spriteinvisible LAST_TALKED, 9, 8 + closemessage + applymovement LAST_TALKED, SlateportCity_Harbor_Movement_1A0841 + waitmovement 0 + delay 30 + hideobject LAST_TALKED, 9, 8 compare FACING, 2 - callif 1, SlateportCity_Harbor_EventScript_1561EF + call_if 1, SlateportCity_Harbor_EventScript_1561EF compare FACING, 4 - callif 1, SlateportCity_Harbor_EventScript_1561E4 - pause 30 - spriteinvisible 255, 0, 0 + call_if 1, SlateportCity_Harbor_EventScript_1561E4 + delay 30 + hideobject 255, 0, 0 setvar 0x8004, 5 call SlateportCity_Harbor_EventScript_1A040E return @@ -239,13 +239,13 @@ SlateportCity_Harbor_EventScript_1561DA:: @ 81561DA end SlateportCity_Harbor_EventScript_1561E4:: @ 81561E4 - move 255, SlateportCity_Harbor_Movement_1561FA - waitmove 0 + applymovement 255, SlateportCity_Harbor_Movement_1561FA + waitmovement 0 return SlateportCity_Harbor_EventScript_1561EF:: @ 81561EF - move 255, SlateportCity_Harbor_Movement_1561FD - waitmove 0 + applymovement 255, SlateportCity_Harbor_Movement_1561FD + waitmovement 0 return SlateportCity_Harbor_Movement_1561FA:: @ 81561FA @@ -269,17 +269,17 @@ SlateportCity_Harbor_EventScript_156211:: @ 8156211 lock faceplayer checkflag 2061 - jumpeq SlateportCity_Harbor_EventScript_15626F + goto_if_eq SlateportCity_Harbor_EventScript_15626F checkflag 271 - jumpeq SlateportCity_Harbor_EventScript_156265 + goto_if_eq SlateportCity_Harbor_EventScript_156265 checkflag 112 - jumpeq SlateportCity_Harbor_EventScript_156258 + goto_if_eq SlateportCity_Harbor_EventScript_156258 compare 0x40a0, 2 - jumpeq SlateportCity_Harbor_EventScript_15624E + goto_if_eq SlateportCity_Harbor_EventScript_15624E msgbox SlateportCity_Harbor_Text_17FD1C, 4 - closebutton - move LAST_TALKED, SlateportCity_Harbor_Movement_1A083D - waitmove 0 + closemessage + applymovement LAST_TALKED, SlateportCity_Harbor_Movement_1A083D + waitmovement 0 release end @@ -301,12 +301,12 @@ SlateportCity_Harbor_EventScript_156265:: @ 8156265 SlateportCity_Harbor_EventScript_15626F:: @ 815626F compare 0x4001, 1 - jumpeq SlateportCity_Harbor_EventScript_156380 + goto_if_eq SlateportCity_Harbor_EventScript_156380 checkitem ITEM_SCANNER, 1 compare RESULT, 1 - jumpeq SlateportCity_Harbor_EventScript_1562A7 + goto_if_eq SlateportCity_Harbor_EventScript_1562A7 checkflag 2052 - jumpeq SlateportCity_Harbor_EventScript_15629D + goto_if_eq SlateportCity_Harbor_EventScript_15629D msgbox SlateportCity_Harbor_Text_18017B, 4 release end @@ -318,8 +318,8 @@ SlateportCity_Harbor_EventScript_15629D:: @ 815629D SlateportCity_Harbor_EventScript_1562A7:: @ 81562A7 message SlateportCity_Harbor_Text_18028B - waittext - jump SlateportCity_Harbor_EventScript_1562B3 + waitmessage + goto SlateportCity_Harbor_EventScript_1562B3 end SlateportCity_Harbor_EventScript_1562B3:: @ 81562B3 @@ -334,27 +334,27 @@ SlateportCity_Harbor_EventScript_1562B3:: @ 81562B3 SlateportCity_Harbor_EventScript_1562EA:: @ 81562EA msgbox SlateportCity_Harbor_Text_1803DD, 5 compare RESULT, 0 - jumpeq SlateportCity_Harbor_EventScript_156374 + goto_if_eq SlateportCity_Harbor_EventScript_156374 giveitem ITEM_DEEP_SEA_TOOTH compare RESULT, 0 - jumpeq SlateportCity_Harbor_EventScript_1A029B + goto_if_eq SlateportCity_Harbor_EventScript_1A029B removeitem ITEM_SCANNER, 1 msgbox SlateportCity_Harbor_Text_18046B, 4 setflag 294 - jump SlateportCity_Harbor_EventScript_156380 + goto SlateportCity_Harbor_EventScript_156380 end SlateportCity_Harbor_EventScript_15632A:: @ 815632A msgbox SlateportCity_Harbor_Text_180412, 5 compare RESULT, 0 - jumpeq SlateportCity_Harbor_EventScript_156374 + goto_if_eq SlateportCity_Harbor_EventScript_156374 giveitem ITEM_DEEP_SEA_SCALE compare RESULT, 0 - jumpeq SlateportCity_Harbor_EventScript_1A029B + goto_if_eq SlateportCity_Harbor_EventScript_1A029B removeitem ITEM_SCANNER, 1 msgbox SlateportCity_Harbor_Text_18046B, 4 setflag 294 - jump SlateportCity_Harbor_EventScript_156380 + goto SlateportCity_Harbor_EventScript_156380 end SlateportCity_Harbor_EventScript_15636A:: @ 815636A @@ -364,8 +364,8 @@ SlateportCity_Harbor_EventScript_15636A:: @ 815636A SlateportCity_Harbor_EventScript_156374:: @ 8156374 message SlateportCity_Harbor_Text_180447 - waittext - jump SlateportCity_Harbor_EventScript_1562B3 + waitmessage + goto SlateportCity_Harbor_EventScript_1562B3 end SlateportCity_Harbor_EventScript_156380:: @ 8156380 diff --git a/data/scripts/maps/SlateportCity_House1.inc b/data/scripts/maps/SlateportCity_House1.inc index 4161889e1..c72aa229a 100644 --- a/data/scripts/maps/SlateportCity_House1.inc +++ b/data/scripts/maps/SlateportCity_House1.inc @@ -6,9 +6,9 @@ SlateportCity_House1_EventScript_15567B:: @ 815567B faceplayer msgbox SlateportCity_House1_Text_17D46A, 5 compare RESULT, 1 - jumpeq SlateportCity_House1_EventScript_15569C + goto_if_eq SlateportCity_House1_EventScript_15569C compare RESULT, 0 - jumpeq SlateportCity_House1_EventScript_1556BF + goto_if_eq SlateportCity_House1_EventScript_1556BF end SlateportCity_House1_EventScript_15569C:: @ 815569C @@ -16,9 +16,9 @@ SlateportCity_House1_EventScript_15569C:: @ 815569C special sub_80F9A0C waitstate compare 0x8004, 255 - jumpif 5, SlateportCity_House1_EventScript_1556C9 + goto_if 5, SlateportCity_House1_EventScript_1556C9 compare 0x8004, 255 - jumpeq SlateportCity_House1_EventScript_1556BF + goto_if_eq SlateportCity_House1_EventScript_1556BF end SlateportCity_House1_EventScript_1556BF:: @ 81556BF @@ -27,22 +27,22 @@ SlateportCity_House1_EventScript_1556BF:: @ 81556BF end SlateportCity_House1_EventScript_1556C9:: @ 81556C9 - specialval RESULT, ScriptGetPartyMonSpecies + specialvar RESULT, ScriptGetPartyMonSpecies compare RESULT, SPECIES_EGG - jumpeq SlateportCity_House1_EventScript_15571C + goto_if_eq SlateportCity_House1_EventScript_15571C special sub_80BFAE0 special sub_80BFB10 compare RESULT, 1 - jumpeq SlateportCity_House1_EventScript_155726 - specialval RESULT, sub_810F96C + goto_if_eq SlateportCity_House1_EventScript_155726 + specialvar RESULT, sub_810F96C special sub_80BFAE0 compare RESULT, 1 - jumpeq SlateportCity_House1_EventScript_155726 + goto_if_eq SlateportCity_House1_EventScript_155726 msgbox SlateportCity_House1_Text_17D505, 5 compare RESULT, 1 - jumpeq SlateportCity_House1_EventScript_155730 + goto_if_eq SlateportCity_House1_EventScript_155730 compare RESULT, 0 - jumpeq SlateportCity_House1_EventScript_1556BF + goto_if_eq SlateportCity_House1_EventScript_1556BF end SlateportCity_House1_EventScript_15571C:: @ 815571C @@ -58,10 +58,10 @@ SlateportCity_House1_EventScript_155726:: @ 8155726 SlateportCity_House1_EventScript_155730:: @ 8155730 msgbox SlateportCity_House1_Text_17D580, 4 call SlateportCity_House1_EventScript_1A0678 - specialval RESULT, sub_80BF9B4 + specialvar RESULT, sub_80BF9B4 special sub_80BFAE0 compare RESULT, 1 - jumpeq SlateportCity_House1_EventScript_15575A + goto_if_eq SlateportCity_House1_EventScript_15575A msgbox SlateportCity_House1_Text_17D63A, 4 release end diff --git a/data/scripts/maps/SlateportCity_House2.inc b/data/scripts/maps/SlateportCity_House2.inc index 2d50f0851..934fae153 100644 --- a/data/scripts/maps/SlateportCity_House2.inc +++ b/data/scripts/maps/SlateportCity_House2.inc @@ -10,7 +10,7 @@ SlateportCity_House2_EventScript_156399:: @ 8156399 faceplayer checkitem ITEM_CONTEST_PASS, 1 compare RESULT, 1 - jumpeq SlateportCity_House2_EventScript_1563B5 + goto_if_eq SlateportCity_House2_EventScript_1563B5 msgbox SlateportCity_House2_Text_180567, 4 release end diff --git a/data/scripts/maps/SlateportCity_Mart.inc b/data/scripts/maps/SlateportCity_Mart.inc index 730afe6d4..39a1d5ba2 100644 --- a/data/scripts/maps/SlateportCity_Mart.inc +++ b/data/scripts/maps/SlateportCity_Mart.inc @@ -5,7 +5,7 @@ SlateportCity_Mart_EventScript_156411:: @ 8156411 lock faceplayer message SlateportCity_Mart_Text_1A0BE4 - waittext + waitmessage pokemart SlateportCity_Mart_Items msgbox SlateportCity_Mart_Text_1A0C02, 4 release diff --git a/data/scripts/maps/SlateportCity_OceanicMuseum_1F.inc b/data/scripts/maps/SlateportCity_OceanicMuseum_1F.inc index e84f8ccc6..1ee8ff39b 100644 --- a/data/scripts/maps/SlateportCity_OceanicMuseum_1F.inc +++ b/data/scripts/maps/SlateportCity_OceanicMuseum_1F.inc @@ -18,59 +18,59 @@ SlateportCity_OceanicMuseum_1F_EventScript_155ADB:: @ 8155ADB SlateportCity_OceanicMuseum_1F_EventScript_155AE4:: @ 8155AE4 lockall - move 255, SlateportCity_OceanicMuseum_1F_Movement_1A083F - waitmove 0 - jump SlateportCity_OceanicMuseum_1F_EventScript_155B06 + applymovement 255, SlateportCity_OceanicMuseum_1F_Movement_1A083F + waitmovement 0 + goto SlateportCity_OceanicMuseum_1F_EventScript_155B06 end SlateportCity_OceanicMuseum_1F_EventScript_155AF5:: @ 8155AF5 lockall - move 255, SlateportCity_OceanicMuseum_1F_Movement_1A0843 - waitmove 0 - jump SlateportCity_OceanicMuseum_1F_EventScript_155B06 + applymovement 255, SlateportCity_OceanicMuseum_1F_Movement_1A0843 + waitmovement 0 + goto SlateportCity_OceanicMuseum_1F_EventScript_155B06 end SlateportCity_OceanicMuseum_1F_EventScript_155B06:: @ 8155B06 - showmoney 0, 0 - snop + showmoneybox 0, 0 + nop msgbox SlateportCity_OceanicMuseum_1F_Text_17E18D, 5 compare RESULT, 1 - jumpeq SlateportCity_OceanicMuseum_1F_EventScript_155B2D - closebutton - hidemoney 0, 0 - move 255, SlateportCity_OceanicMuseum_1F_Movement_155B8D - waitmove 0 + goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_155B2D + closemessage + hidemoneybox 0, 0 + applymovement 255, SlateportCity_OceanicMuseum_1F_Movement_155B8D + waitmovement 0 releaseall end SlateportCity_OceanicMuseum_1F_EventScript_155B2D:: @ 8155B2D checkmoney 0x32, 0 compare RESULT, 0 - jumpeq SlateportCity_OceanicMuseum_1F_EventScript_155B5A - paymoney 0x32, 0 - updatemoney 0, 0 - snop + goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_155B5A + takemoney 0x32, 0 + updatemoneybox 0, 0 + nop msgbox SlateportCity_OceanicMuseum_1F_Text_17E1DE, 4 setvar 0x40aa, 1 - hidemoney 0, 0 + hidemoneybox 0, 0 releaseall end SlateportCity_OceanicMuseum_1F_EventScript_155B5A:: @ 8155B5A checkflag 149 - jumpif 0, SlateportCity_OceanicMuseum_1F_EventScript_155B7B + goto_if 0, SlateportCity_OceanicMuseum_1F_EventScript_155B7B msgbox SlateportCity_OceanicMuseum_1F_Text_17E1F5, 4 - closebutton - hidemoney 0, 0 - move 255, SlateportCity_OceanicMuseum_1F_Movement_155B8D - waitmove 0 + closemessage + hidemoneybox 0, 0 + applymovement 255, SlateportCity_OceanicMuseum_1F_Movement_155B8D + waitmovement 0 releaseall end SlateportCity_OceanicMuseum_1F_EventScript_155B7B:: @ 8155B7B msgbox SlateportCity_OceanicMuseum_1F_Text_17E22D, 4 setvar 0x40aa, 1 - hidemoney 0, 0 + hidemoneybox 0, 0 releaseall end @@ -157,40 +157,40 @@ SlateportCity_OceanicMuseum_1F_EventScript_155C31:: @ 8155C31 SlateportCity_OceanicMuseum_1F_EventScript_155C3A:: @ 8155C3A lock faceplayer - pause 8 - playsfx 21 - move 13, SlateportCity_OceanicMuseum_1F_Movement_1A0833 - waitmove 0 - move 13, SlateportCity_OceanicMuseum_1F_Movement_1A0835 - waitmove 0 + delay 8 + playse 21 + applymovement 13, SlateportCity_OceanicMuseum_1F_Movement_1A0833 + waitmovement 0 + applymovement 13, SlateportCity_OceanicMuseum_1F_Movement_1A0835 + waitmovement 0 msgbox SlateportCity_OceanicMuseum_1F_Text_17E582, 4 giveitem ITEM_TM46 compare RESULT, 0 - jumpeq SlateportCity_OceanicMuseum_1F_EventScript_155CC2 + goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_155CC2 setflag 269 msgbox SlateportCity_OceanicMuseum_1F_Text_17E606, 4 - closebutton + closemessage compare FACING, 2 - jumpeq SlateportCity_OceanicMuseum_1F_EventScript_155C98 + goto_if_eq SlateportCity_OceanicMuseum_1F_EventScript_155C98 compare FACING, 2 - jumpif 5, SlateportCity_OceanicMuseum_1F_EventScript_155CAD + goto_if 5, SlateportCity_OceanicMuseum_1F_EventScript_155CAD end SlateportCity_OceanicMuseum_1F_EventScript_155C98:: @ 8155C98 - move 13, SlateportCity_OceanicMuseum_1F_Movement_155CD3 - waitmove 0 + applymovement 13, SlateportCity_OceanicMuseum_1F_Movement_155CD3 + waitmovement 0 setflag 965 - playsfx 9 - disappear 13 + playse 9 + removeobject 13 release end SlateportCity_OceanicMuseum_1F_EventScript_155CAD:: @ 8155CAD - move 13, SlateportCity_OceanicMuseum_1F_Movement_155CCC - waitmove 0 + applymovement 13, SlateportCity_OceanicMuseum_1F_Movement_155CCC + waitmovement 0 setflag 965 - playsfx 9 - disappear 13 + playse 9 + removeobject 13 release end diff --git a/data/scripts/maps/SlateportCity_OceanicMuseum_2F.inc b/data/scripts/maps/SlateportCity_OceanicMuseum_2F.inc index 57bfbbd03..e379c633d 100644 --- a/data/scripts/maps/SlateportCity_OceanicMuseum_2F.inc +++ b/data/scripts/maps/SlateportCity_OceanicMuseum_2F.inc @@ -10,82 +10,82 @@ SlateportCity_OceanicMuseum_2F_EventScript_155CE6:: @ 8155CE6 lock faceplayer msgbox SlateportCity_OceanicMuseum_2F_Text_17ECFD, 4 - closebutton - playmusic BGM_EVIL_TEAM, 1 - reappear 3 - move 3, SlateportCity_OceanicMuseum_2F_Movement_155EB4 - waitmove 0 - reappear 4 - move 4, SlateportCity_OceanicMuseum_2F_Movement_155EC3 - waitmove 0 - move 3, SlateportCity_OceanicMuseum_2F_Movement_155EB8 - move 4, SlateportCity_OceanicMuseum_2F_Movement_155EC5 - waitmove 0 + closemessage + playbgm BGM_EVIL_TEAM, 1 + addobject 3 + applymovement 3, SlateportCity_OceanicMuseum_2F_Movement_155EB4 + waitmovement 0 + addobject 4 + applymovement 4, SlateportCity_OceanicMuseum_2F_Movement_155EC3 + waitmovement 0 + applymovement 3, SlateportCity_OceanicMuseum_2F_Movement_155EB8 + applymovement 4, SlateportCity_OceanicMuseum_2F_Movement_155EC5 + waitmovement 0 compare FACING, 1 - callif 1, SlateportCity_OceanicMuseum_2F_EventScript_155E62 + call_if 1, SlateportCity_OceanicMuseum_2F_EventScript_155E62 compare FACING, 4 - callif 1, SlateportCity_OceanicMuseum_2F_EventScript_155E62 + call_if 1, SlateportCity_OceanicMuseum_2F_EventScript_155E62 msgbox SlateportCity_OceanicMuseum_2F_Text_17EDAE, 4 compare FACING, 4 - callif 5, SlateportCity_OceanicMuseum_2F_EventScript_155E6D + call_if 5, SlateportCity_OceanicMuseum_2F_EventScript_155E6D msgbox SlateportCity_OceanicMuseum_2F_Text_17EDD7, 4 msgbox SlateportCity_OceanicMuseum_2F_Text_17EE01, 4 - closebutton - move 4, SlateportCity_OceanicMuseum_2F_Movement_155EB2 - waitmove 0 + closemessage + applymovement 4, SlateportCity_OceanicMuseum_2F_Movement_155EB2 + waitmovement 0 compare FACING, 1 - callif 1, SlateportCity_OceanicMuseum_2F_EventScript_155E78 + call_if 1, SlateportCity_OceanicMuseum_2F_EventScript_155E78 compare FACING, 3 - callif 1, SlateportCity_OceanicMuseum_2F_EventScript_155E83 + call_if 1, SlateportCity_OceanicMuseum_2F_EventScript_155E83 trainerbattle 3, OPPONENT_MUSEUM_2F_GRUNT_1, 0, SlateportCity_OceanicMuseum_2F_Text_17EE4E msgbox SlateportCity_OceanicMuseum_2F_Text_17EE66, 4 - closebutton - move 4, SlateportCity_OceanicMuseum_2F_Movement_155EBF - waitmove 0 - move 3, SlateportCity_OceanicMuseum_2F_Movement_155EB2 - waitmove 0 + closemessage + applymovement 4, SlateportCity_OceanicMuseum_2F_Movement_155EBF + waitmovement 0 + applymovement 3, SlateportCity_OceanicMuseum_2F_Movement_155EB2 + waitmovement 0 msgbox SlateportCity_OceanicMuseum_2F_Text_17EEA5, 4 - playmusicbattle 0 + savebgm 0 trainerbattle 3, OPPONENT_MUSEUM_2F_GRUNT_2, 0, SlateportCity_OceanicMuseum_2F_Text_17EED6 - move 3, SlateportCity_OceanicMuseum_2F_Movement_155EBF - waitmove 0 - move 3, SlateportCity_OceanicMuseum_2F_Movement_1A0845 - move 4, SlateportCity_OceanicMuseum_2F_Movement_1A0841 - waitmove 0 + applymovement 3, SlateportCity_OceanicMuseum_2F_Movement_155EBF + waitmovement 0 + applymovement 3, SlateportCity_OceanicMuseum_2F_Movement_1A0845 + applymovement 4, SlateportCity_OceanicMuseum_2F_Movement_1A0841 + waitmovement 0 msgbox SlateportCity_OceanicMuseum_2F_Text_17EEEA, 4 - closebutton - pause 35 - reappear 2 - move 2, SlateportCity_OceanicMuseum_2F_Movement_155EA8 - move 4, SlateportCity_OceanicMuseum_2F_Movement_155ECE - waitmove 0 + closemessage + delay 35 + addobject 2 + applymovement 2, SlateportCity_OceanicMuseum_2F_Movement_155EA8 + applymovement 4, SlateportCity_OceanicMuseum_2F_Movement_155ECE + waitmovement 0 msgbox SlateportCity_OceanicMuseum_2F_Text_17EF62, 4 - move 2, SlateportCity_OceanicMuseum_2F_Movement_155EA6 - waitmove 0 + applymovement 2, SlateportCity_OceanicMuseum_2F_Movement_155EA6 + waitmovement 0 .ifdef SAPPHIRE msgbox SlateportCity_OceanicMuseum_2F_Text_17EFC9, 4 .else msgbox SlateportCity_OceanicMuseum_2F_Text_17F17E, 4 .endif - closebutton + closemessage fadescreen 1 - disappear 2 - disappear 3 - disappear 4 + removeobject 2 + removeobject 3 + removeobject 4 fadescreen 0 - pause 30 + delay 30 setflag 883 - move 255, SlateportCity_OceanicMuseum_2F_Movement_1A0843 - waitmove 0 + applymovement 255, SlateportCity_OceanicMuseum_2F_Movement_1A0843 + waitmovement 0 msgbox SlateportCity_OceanicMuseum_2F_Text_17F352, 4 setvar 0x8004, 269 call SlateportCity_OceanicMuseum_2F_EventScript_1A067F msgbox SlateportCity_OceanicMuseum_2F_Text_17F433, 4 - closebutton - move 1, SlateportCity_OceanicMuseum_2F_Movement_155E98 - waitmove 0 - playsfx 9 - disappear 1 + closemessage + applymovement 1, SlateportCity_OceanicMuseum_2F_Movement_155E98 + waitmovement 0 + playse 9 + removeobject 1 setflag 900 setflag 149 clearflag 947 @@ -94,23 +94,23 @@ SlateportCity_OceanicMuseum_2F_EventScript_155CE6:: @ 8155CE6 end SlateportCity_OceanicMuseum_2F_EventScript_155E62:: @ 8155E62 - move 255, SlateportCity_OceanicMuseum_2F_Movement_1A083F - waitmove 0 + applymovement 255, SlateportCity_OceanicMuseum_2F_Movement_1A083F + waitmovement 0 return SlateportCity_OceanicMuseum_2F_EventScript_155E6D:: @ 8155E6D - move 1, SlateportCity_OceanicMuseum_2F_Movement_1A083F - waitmove 0 + applymovement 1, SlateportCity_OceanicMuseum_2F_Movement_1A083F + waitmovement 0 return SlateportCity_OceanicMuseum_2F_EventScript_155E78:: @ 8155E78 - move 255, SlateportCity_OceanicMuseum_2F_Movement_155E8E - waitmove 0 + applymovement 255, SlateportCity_OceanicMuseum_2F_Movement_155E8E + waitmovement 0 return SlateportCity_OceanicMuseum_2F_EventScript_155E83:: @ 8155E83 - move 255, SlateportCity_OceanicMuseum_2F_Movement_155E92 - waitmove 0 + applymovement 255, SlateportCity_OceanicMuseum_2F_Movement_155E92 + waitmovement 0 return SlateportCity_OceanicMuseum_2F_Movement_155E8E:: @ 8155E8E @@ -265,8 +265,8 @@ SlateportCity_OceanicMuseum_2F_EventScript_155F46:: @ 8155F46 lock faceplayer msgbox SlateportCity_OceanicMuseum_2F_Text_17F53B, 4 - closebutton - move LAST_TALKED, SlateportCity_OceanicMuseum_2F_Movement_1A083D - waitmove 0 + closemessage + applymovement LAST_TALKED, SlateportCity_OceanicMuseum_2F_Movement_1A083D + waitmovement 0 release end diff --git a/data/scripts/maps/SlateportCity_PokemonCenter_1F.inc b/data/scripts/maps/SlateportCity_PokemonCenter_1F.inc index c550a6850..9aa326f70 100644 --- a/data/scripts/maps/SlateportCity_PokemonCenter_1F.inc +++ b/data/scripts/maps/SlateportCity_PokemonCenter_1F.inc @@ -10,7 +10,7 @@ SlateportCity_PokemonCenter_1F_MapScript1_1563C5:: @ 81563C5 SlateportCity_PokemonCenter_1F_EventScript_1563CE:: @ 81563CE setvar 0x800b, 1 call SlateportCity_PokemonCenter_1F_EventScript_19FD5B - waittext + waitmessage waitbutton release end diff --git a/data/scripts/maps/SlateportCity_PokemonFanClub.inc b/data/scripts/maps/SlateportCity_PokemonFanClub.inc index 0a7466a3b..4195ad43a 100644 --- a/data/scripts/maps/SlateportCity_PokemonFanClub.inc +++ b/data/scripts/maps/SlateportCity_PokemonFanClub.inc @@ -18,27 +18,27 @@ SlateportCity_PokemonFanClub_EventScript_15576B:: @ 815576B SlateportCity_PokemonFanClub_EventScript_155795:: @ 8155795 setvar 0x40b7, 1 msgbox SlateportCity_PokemonFanClub_Text_17D773, 4 - jump SlateportCity_PokemonFanClub_EventScript_155808 + goto SlateportCity_PokemonFanClub_EventScript_155808 end SlateportCity_PokemonFanClub_EventScript_1557A8:: @ 81557A8 setvar 0x4002, 0 checkflag 204 - callif 1, SlateportCity_PokemonFanClub_EventScript_155893 + call_if 1, SlateportCity_PokemonFanClub_EventScript_155893 checkflag 203 - callif 1, SlateportCity_PokemonFanClub_EventScript_155893 + call_if 1, SlateportCity_PokemonFanClub_EventScript_155893 checkflag 202 - callif 1, SlateportCity_PokemonFanClub_EventScript_155893 + call_if 1, SlateportCity_PokemonFanClub_EventScript_155893 checkflag 201 - callif 1, SlateportCity_PokemonFanClub_EventScript_155893 + call_if 1, SlateportCity_PokemonFanClub_EventScript_155893 checkflag 200 - callif 1, SlateportCity_PokemonFanClub_EventScript_155893 + call_if 1, SlateportCity_PokemonFanClub_EventScript_155893 compare 0x4002, 5 - callif 1, SlateportCity_PokemonFanClub_EventScript_15588D + call_if 1, SlateportCity_PokemonFanClub_EventScript_15588D compare 0x40b7, 2 - jumpeq SlateportCity_PokemonFanClub_EventScript_1557FE + goto_if_eq SlateportCity_PokemonFanClub_EventScript_1557FE msgbox SlateportCity_PokemonFanClub_Text_17DA14, 4 - jump SlateportCity_PokemonFanClub_EventScript_155808 + goto SlateportCity_PokemonFanClub_EventScript_155808 end SlateportCity_PokemonFanClub_EventScript_1557FE:: @ 81557FE @@ -50,16 +50,16 @@ SlateportCity_PokemonFanClub_EventScript_155808:: @ 8155808 msgbox SlateportCity_PokemonFanClub_Text_17DA49, 4 setvar 0x4001, 0 checkflag 204 - callif 0, SlateportCity_PokemonFanClub_EventScript_1559FE + call_if 0, SlateportCity_PokemonFanClub_EventScript_1559FE checkflag 203 - callif 0, SlateportCity_PokemonFanClub_EventScript_1559E7 + call_if 0, SlateportCity_PokemonFanClub_EventScript_1559E7 checkflag 202 - callif 0, SlateportCity_PokemonFanClub_EventScript_1559D0 + call_if 0, SlateportCity_PokemonFanClub_EventScript_1559D0 checkflag 201 - callif 0, SlateportCity_PokemonFanClub_EventScript_1559B9 + call_if 0, SlateportCity_PokemonFanClub_EventScript_1559B9 checkflag 200 - callif 0, SlateportCity_PokemonFanClub_EventScript_1559A2 - bufferfirstpoke 0 + call_if 0, SlateportCity_PokemonFanClub_EventScript_1559A2 + getfirstpartypokename 0 switch 0x4001 case 0, SlateportCity_PokemonFanClub_EventScript_155899 case 1, SlateportCity_PokemonFanClub_EventScript_1558A3 @@ -86,7 +86,7 @@ SlateportCity_PokemonFanClub_EventScript_155899:: @ 8155899 SlateportCity_PokemonFanClub_EventScript_1558A3:: @ 81558A3 checkitemspace ITEM_RED_SCARF, 1 compare RESULT, 0 - jumpeq SlateportCity_PokemonFanClub_EventScript_155998 + goto_if_eq SlateportCity_PokemonFanClub_EventScript_155998 msgbox SlateportCity_PokemonFanClub_Text_17DB89, 4 setflag 200 giveitem ITEM_RED_SCARF @@ -97,7 +97,7 @@ SlateportCity_PokemonFanClub_EventScript_1558A3:: @ 81558A3 SlateportCity_PokemonFanClub_EventScript_1558D4:: @ 81558D4 checkitemspace ITEM_BLUE_SCARF, 1 compare RESULT, 0 - jumpeq SlateportCity_PokemonFanClub_EventScript_155998 + goto_if_eq SlateportCity_PokemonFanClub_EventScript_155998 msgbox SlateportCity_PokemonFanClub_Text_17DB89, 4 setflag 201 giveitem ITEM_BLUE_SCARF @@ -108,7 +108,7 @@ SlateportCity_PokemonFanClub_EventScript_1558D4:: @ 81558D4 SlateportCity_PokemonFanClub_EventScript_155905:: @ 8155905 checkitemspace ITEM_PINK_SCARF, 1 compare RESULT, 0 - jumpeq SlateportCity_PokemonFanClub_EventScript_155998 + goto_if_eq SlateportCity_PokemonFanClub_EventScript_155998 msgbox SlateportCity_PokemonFanClub_Text_17DB89, 4 setflag 202 giveitem ITEM_PINK_SCARF @@ -119,7 +119,7 @@ SlateportCity_PokemonFanClub_EventScript_155905:: @ 8155905 SlateportCity_PokemonFanClub_EventScript_155936:: @ 8155936 checkitemspace ITEM_GREEN_SCARF, 1 compare RESULT, 0 - jumpeq SlateportCity_PokemonFanClub_EventScript_155998 + goto_if_eq SlateportCity_PokemonFanClub_EventScript_155998 msgbox SlateportCity_PokemonFanClub_Text_17DB89, 4 setflag 203 giveitem ITEM_GREEN_SCARF @@ -130,7 +130,7 @@ SlateportCity_PokemonFanClub_EventScript_155936:: @ 8155936 SlateportCity_PokemonFanClub_EventScript_155967:: @ 8155967 checkitemspace ITEM_YELLOW_SCARF, 1 compare RESULT, 0 - jumpeq SlateportCity_PokemonFanClub_EventScript_155998 + goto_if_eq SlateportCity_PokemonFanClub_EventScript_155998 msgbox SlateportCity_PokemonFanClub_Text_17DB89, 4 setflag 204 giveitem ITEM_YELLOW_SCARF @@ -144,9 +144,9 @@ SlateportCity_PokemonFanClub_EventScript_155998:: @ 8155998 end SlateportCity_PokemonFanClub_EventScript_1559A2:: @ 81559A2 - specialval RESULT, CheckLeadMonCool + specialvar RESULT, CheckLeadMonCool compare RESULT, 1 - callif 1, SlateportCity_PokemonFanClub_EventScript_1559B3 + call_if 1, SlateportCity_PokemonFanClub_EventScript_1559B3 return SlateportCity_PokemonFanClub_EventScript_1559B3:: @ 81559B3 @@ -154,9 +154,9 @@ SlateportCity_PokemonFanClub_EventScript_1559B3:: @ 81559B3 return SlateportCity_PokemonFanClub_EventScript_1559B9:: @ 81559B9 - specialval RESULT, CheckLeadMonBeauty + specialvar RESULT, CheckLeadMonBeauty compare RESULT, 1 - callif 1, SlateportCity_PokemonFanClub_EventScript_1559CA + call_if 1, SlateportCity_PokemonFanClub_EventScript_1559CA return SlateportCity_PokemonFanClub_EventScript_1559CA:: @ 81559CA @@ -164,9 +164,9 @@ SlateportCity_PokemonFanClub_EventScript_1559CA:: @ 81559CA return SlateportCity_PokemonFanClub_EventScript_1559D0:: @ 81559D0 - specialval RESULT, CheckLeadMonCute + specialvar RESULT, CheckLeadMonCute compare RESULT, 1 - callif 1, SlateportCity_PokemonFanClub_EventScript_1559E1 + call_if 1, SlateportCity_PokemonFanClub_EventScript_1559E1 return SlateportCity_PokemonFanClub_EventScript_1559E1:: @ 81559E1 @@ -174,9 +174,9 @@ SlateportCity_PokemonFanClub_EventScript_1559E1:: @ 81559E1 return SlateportCity_PokemonFanClub_EventScript_1559E7:: @ 81559E7 - specialval RESULT, CheckLeadMonSmart + specialvar RESULT, CheckLeadMonSmart compare RESULT, 1 - callif 1, SlateportCity_PokemonFanClub_EventScript_1559F8 + call_if 1, SlateportCity_PokemonFanClub_EventScript_1559F8 return SlateportCity_PokemonFanClub_EventScript_1559F8:: @ 81559F8 @@ -184,9 +184,9 @@ SlateportCity_PokemonFanClub_EventScript_1559F8:: @ 81559F8 return SlateportCity_PokemonFanClub_EventScript_1559FE:: @ 81559FE - specialval RESULT, CheckLeadMonTough + specialvar RESULT, CheckLeadMonTough compare RESULT, 1 - callif 1, SlateportCity_PokemonFanClub_EventScript_155A0F + call_if 1, SlateportCity_PokemonFanClub_EventScript_155A0F return SlateportCity_PokemonFanClub_EventScript_155A0F:: @ 8155A0F @@ -197,24 +197,24 @@ SlateportCity_PokemonFanClub_EventScript_155A15:: @ 8155A15 lock faceplayer checkflag 278 - jumpeq SlateportCity_PokemonFanClub_EventScript_155A75 + goto_if_eq SlateportCity_PokemonFanClub_EventScript_155A75 msgbox SlateportCity_PokemonFanClub_Text_17DE6B, 4 - specialval RESULT, GetLeadMonFriendshipScore + specialvar RESULT, GetLeadMonFriendshipScore compare RESULT, 4 - jumpif 4, SlateportCity_PokemonFanClub_EventScript_155A3A + goto_if 4, SlateportCity_PokemonFanClub_EventScript_155A3A release end SlateportCity_PokemonFanClub_EventScript_155A3A:: @ 8155A3A - playsfx 21 - move LAST_TALKED, SlateportCity_PokemonFanClub_Movement_1A0833 - waitmove 0 - move LAST_TALKED, SlateportCity_PokemonFanClub_Movement_1A0835 - waitmove 0 + playse 21 + applymovement LAST_TALKED, SlateportCity_PokemonFanClub_Movement_1A0833 + waitmovement 0 + applymovement LAST_TALKED, SlateportCity_PokemonFanClub_Movement_1A0835 + waitmovement 0 msgbox SlateportCity_PokemonFanClub_Text_17DF57, 4 giveitem ITEM_SOOTHE_BELL compare RESULT, 0 - jumpeq SlateportCity_PokemonFanClub_EventScript_1A029B + goto_if_eq SlateportCity_PokemonFanClub_EventScript_1A029B setflag 278 release end @@ -235,8 +235,8 @@ SlateportCity_PokemonFanClub_EventScript_155A88:: @ 8155A88 SlateportCity_PokemonFanClub_EventScript_155A91:: @ 8155A91 lock faceplayer - checksound - pokecry SPECIES_SKITTY, 0 + waitse + playpokecry SPECIES_SKITTY, 0 msgbox SlateportCity_PokemonFanClub_Text_17E14E, 4 waitpokecry release @@ -245,8 +245,8 @@ SlateportCity_PokemonFanClub_EventScript_155A91:: @ 8155A91 SlateportCity_PokemonFanClub_EventScript_155AA4:: @ 8155AA4 lock faceplayer - checksound - pokecry SPECIES_ZIGZAGOON, 0 + waitse + playpokecry SPECIES_ZIGZAGOON, 0 msgbox SlateportCity_PokemonFanClub_Text_17E164, 4 waitpokecry release @@ -255,8 +255,8 @@ SlateportCity_PokemonFanClub_EventScript_155AA4:: @ 8155AA4 SlateportCity_PokemonFanClub_EventScript_155AB7:: @ 8155AB7 lock faceplayer - checksound - pokecry SPECIES_AZUMARILL, 0 + waitse + playpokecry SPECIES_AZUMARILL, 0 msgbox SlateportCity_PokemonFanClub_Text_17E178, 4 waitpokecry release diff --git a/data/scripts/maps/SlateportCity_SternsShipyard_1F.inc b/data/scripts/maps/SlateportCity_SternsShipyard_1F.inc index 4c0596d29..9fe7f1f1a 100644 --- a/data/scripts/maps/SlateportCity_SternsShipyard_1F.inc +++ b/data/scripts/maps/SlateportCity_SternsShipyard_1F.inc @@ -4,52 +4,52 @@ SlateportCity_SternsShipyard_1F_MapScripts:: @ 8155335 SlateportCity_SternsShipyard_1F_EventScript_155336:: @ 8155336 lockall checkflag 2052 - jumpeq SlateportCity_SternsShipyard_1F_EventScript_155388 + goto_if_eq SlateportCity_SternsShipyard_1F_EventScript_155388 checkflag 2061 - jumpeq SlateportCity_SternsShipyard_1F_EventScript_15539C + goto_if_eq SlateportCity_SternsShipyard_1F_EventScript_15539C checkflag 149 - jumpeq SlateportCity_SternsShipyard_1F_EventScript_1553CF + goto_if_eq SlateportCity_SternsShipyard_1F_EventScript_1553CF checkflag 148 - jumpeq SlateportCity_SternsShipyard_1F_EventScript_1553B0 + goto_if_eq SlateportCity_SternsShipyard_1F_EventScript_1553B0 msgbox SlateportCity_SternsShipyard_1F_Text_17C14B, 4 - move 1, SlateportCity_SternsShipyard_1F_Movement_1A0839 - waitmove 0 + applymovement 1, SlateportCity_SternsShipyard_1F_Movement_1A0839 + waitmovement 0 msgbox SlateportCity_SternsShipyard_1F_Text_17C1EC, 4 - closebutton - move 1, SlateportCity_SternsShipyard_1F_Movement_1A083D - waitmove 0 + closemessage + applymovement 1, SlateportCity_SternsShipyard_1F_Movement_1A083D + waitmovement 0 setflag 148 setflag 882 releaseall end SlateportCity_SternsShipyard_1F_EventScript_155388:: @ 8155388 - move 1, SlateportCity_SternsShipyard_1F_Movement_1A0839 - waitmove 0 + applymovement 1, SlateportCity_SternsShipyard_1F_Movement_1A0839 + waitmovement 0 msgbox SlateportCity_SternsShipyard_1F_Text_17C472, 4 releaseall end SlateportCity_SternsShipyard_1F_EventScript_15539C:: @ 815539C - move 1, SlateportCity_SternsShipyard_1F_Movement_1A0839 - waitmove 0 + applymovement 1, SlateportCity_SternsShipyard_1F_Movement_1A0839 + waitmovement 0 msgbox SlateportCity_SternsShipyard_1F_Text_17C3F7, 4 releaseall end SlateportCity_SternsShipyard_1F_EventScript_1553B0:: @ 81553B0 - move 1, SlateportCity_SternsShipyard_1F_Movement_1A0839 - waitmove 0 + applymovement 1, SlateportCity_SternsShipyard_1F_Movement_1A0839 + waitmovement 0 msgbox SlateportCity_SternsShipyard_1F_Text_17C2F2, 4 - closebutton - move 1, SlateportCity_SternsShipyard_1F_Movement_1A083D - waitmove 0 + closemessage + applymovement 1, SlateportCity_SternsShipyard_1F_Movement_1A083D + waitmovement 0 releaseall end SlateportCity_SternsShipyard_1F_EventScript_1553CF:: @ 81553CF - move 1, SlateportCity_SternsShipyard_1F_Movement_1A0839 - waitmove 0 + applymovement 1, SlateportCity_SternsShipyard_1F_Movement_1A0839 + waitmovement 0 msgbox SlateportCity_SternsShipyard_1F_Text_17C360, 4 releaseall end diff --git a/data/scripts/maps/SootopolisCity.inc b/data/scripts/maps/SootopolisCity.inc index 0c22fbc37..bddc5965d 100644 --- a/data/scripts/maps/SootopolisCity.inc +++ b/data/scripts/maps/SootopolisCity.inc @@ -6,19 +6,19 @@ SootopolisCity_MapScripts:: @ 814D07D SootopolisCity_MapScript1_14D08D:: @ 814D08D checkflag 129 - callif 0, SootopolisCity_EventScript_14D0A0 + call_if 0, SootopolisCity_EventScript_14D0A0 checkflag 129 - callif 1, SootopolisCity_EventScript_14D0B1 + call_if 1, SootopolisCity_EventScript_14D0B1 end SootopolisCity_EventScript_14D0A0:: @ 814D0A0 - movespriteperm 3, 31, 18 + setobjectxyperm 3, 31, 18 setmaptile 31, 32, 592, 1 return SootopolisCity_EventScript_14D0B1:: @ 814D0B1 checkflag 113 - callif 0, SootopolisCity_EventScript_14D0BB + call_if 0, SootopolisCity_EventScript_14D0BB return SootopolisCity_EventScript_14D0BB:: @ 814D0BB @@ -36,40 +36,40 @@ SootopolisCity_EventScript_14D0BB:: @ 814D0BB SootopolisCity_MapScript1_14D10D:: @ 814D10D setflag 2077 checkflag 113 - callif 1, SootopolisCity_EventScript_14D159 + call_if 1, SootopolisCity_EventScript_14D159 checkflag 2090 - callif 1, SootopolisCity_EventScript_14D123 + call_if 1, SootopolisCity_EventScript_14D123 end SootopolisCity_EventScript_14D123:: @ 814D123 call SootopolisCity_EventScript_1A02C1 - movespriteperm 1, 29, 19 - movespriteperm 2, 33, 19 + setobjectxyperm 1, 29, 19 + setobjectxyperm 2, 33, 19 compare 0x405e, 1 - callif 1, SootopolisCity_EventScript_14D142 + call_if 1, SootopolisCity_EventScript_14D142 return SootopolisCity_EventScript_14D142:: @ 814D142 - movespriteperm 10, 29, 6 - spritebehave 10, 10 - movespriteperm 5, 30, 6 - spritebehave 5, 9 + setobjectxyperm 10, 29, 6 + setobjectmovementtype 10, 10 + setobjectxyperm 5, 30, 6 + setobjectmovementtype 5, 9 return SootopolisCity_EventScript_14D159:: @ 814D159 - movespriteperm 10, 31, 33 - spritebehave 10, 8 + setobjectxyperm 10, 31, 33 + setobjectmovementtype 10, 8 return SootopolisCity_MapScript1_14D165:: @ 814D165 - warp4 Underwater_SootopolisCity, 255, 9, 6 + setdivewarp Underwater_SootopolisCity, 255, 9, 6 end SootopolisCity_EventScript_14D16E:: @ 814D16E lock faceplayer checkflag 113 - jumpeq SootopolisCity_EventScript_14D183 + goto_if_eq SootopolisCity_EventScript_14D183 msgbox SootopolisCity_Text_1696A4, 4 release end @@ -90,30 +90,30 @@ SootopolisCity_EventScript_14D196:: @ 814D196 SootopolisCity_EventScript_14D19F:: @ 814D19F lock faceplayer - checkdailyflags + dodailyevents special GetPlayerBigGuyGirlString checkflag 2258 - jumpeq SootopolisCity_EventScript_14D241 + goto_if_eq SootopolisCity_EventScript_14D241 msgbox SootopolisCity_Text_1C63F2, 4 random 10 addvar RESULT, 20 addvar RESULT, 133 giveitem RESULT compare RESULT, 0 - jumpeq SootopolisCity_EventScript_1A029B + goto_if_eq SootopolisCity_EventScript_1A029B setflag 2258 msgbox SootopolisCity_Text_1C64D0, 4 random 2 compare RESULT, 0 - jumpeq SootopolisCity_EventScript_14D1FF + goto_if_eq SootopolisCity_EventScript_14D1FF compare RESULT, 1 - jumpeq SootopolisCity_EventScript_14D220 + goto_if_eq SootopolisCity_EventScript_14D220 end SootopolisCity_EventScript_14D1FF:: @ 814D1FF giveitem ITEM_FIGY_BERRY compare RESULT, 0 - jumpeq SootopolisCity_EventScript_1A029B + goto_if_eq SootopolisCity_EventScript_1A029B msgbox SootopolisCity_Text_1C650B, 4 release end @@ -121,7 +121,7 @@ SootopolisCity_EventScript_14D1FF:: @ 814D1FF SootopolisCity_EventScript_14D220:: @ 814D220 giveitem ITEM_IAPAPA_BERRY compare RESULT, 0 - jumpeq SootopolisCity_EventScript_1A029B + goto_if_eq SootopolisCity_EventScript_1A029B msgbox SootopolisCity_Text_1C650B, 4 release end @@ -129,7 +129,7 @@ SootopolisCity_EventScript_14D220:: @ 814D220 SootopolisCity_EventScript_14D241:: @ 814D241 msgbox SootopolisCity_Text_1C6540, 5 compare RESULT, 1 - jumpeq SootopolisCity_EventScript_14D25E + goto_if_eq SootopolisCity_EventScript_14D25E msgbox SootopolisCity_Text_1C6626, 4 release end @@ -143,7 +143,7 @@ SootopolisCity_EventScript_14D268:: @ 814D268 lock faceplayer checkflag 1236 - jumpeq SootopolisCity_EventScript_14D27D + goto_if_eq SootopolisCity_EventScript_14D27D msgbox SootopolisCity_Text_16A4D6, 4 release end @@ -157,7 +157,7 @@ SootopolisCity_EventScript_14D287:: @ 814D287 lock faceplayer checkflag 113 - jumpeq SootopolisCity_EventScript_14D29C + goto_if_eq SootopolisCity_EventScript_14D29C msgbox SootopolisCity_Text_169813, 4 release end @@ -171,7 +171,7 @@ SootopolisCity_EventScript_14D2A6:: @ 814D2A6 lock faceplayer checkflag 113 - jumpeq SootopolisCity_EventScript_14D2BB + goto_if_eq SootopolisCity_EventScript_14D2BB msgbox SootopolisCity_Text_1698A0, 4 release end @@ -185,7 +185,7 @@ SootopolisCity_EventScript_14D2C5:: @ 814D2C5 lock faceplayer checkflag 113 - jumpeq SootopolisCity_EventScript_14D2DA + goto_if_eq SootopolisCity_EventScript_14D2DA msgbox SootopolisCity_Text_1697A7, 4 release end @@ -213,81 +213,81 @@ ClosedSootopolisGymDoorScript:: @ 814D2FF SootopolisCity_EventScript_14D308:: @ 814D308 lockall - move 10, SootopolisCity_Movement_1A083F - move 255, SootopolisCity_Movement_1A0843 - waitmove 0 - playsfx 21 - move 10, SootopolisCity_Movement_1A0833 - waitmove 0 - move 10, SootopolisCity_Movement_1A0835 - waitmove 0 - move 10, SootopolisCity_Movement_14D413 - waitmove 0 + applymovement 10, SootopolisCity_Movement_1A083F + applymovement 255, SootopolisCity_Movement_1A0843 + waitmovement 0 + playse 21 + applymovement 10, SootopolisCity_Movement_1A0833 + waitmovement 0 + applymovement 10, SootopolisCity_Movement_1A0835 + waitmovement 0 + applymovement 10, SootopolisCity_Movement_14D413 + waitmovement 0 .ifdef SAPPHIRE msgbox SootopolisCity_Text_169988, 4 .else msgbox SootopolisCity_Text_169E0F, 4 .endif - closebutton - move 10, SootopolisCity_Movement_14D417 - move 255, SootopolisCity_Movement_14D440 - waitmove 10 + closemessage + applymovement 10, SootopolisCity_Movement_14D417 + applymovement 255, SootopolisCity_Movement_14D440 + waitmovement 10 .ifdef SAPPHIRE msgbox SootopolisCity_Text_1699FD, 4 .else msgbox SootopolisCity_Text_169E82, 4 .endif - playsfx 21 - move 5, SootopolisCity_Movement_1A0833 - waitmove 0 - move 5, SootopolisCity_Movement_1A0835 - waitmove 0 + playse 21 + applymovement 5, SootopolisCity_Movement_1A0833 + waitmovement 0 + applymovement 5, SootopolisCity_Movement_1A0835 + waitmovement 0 .ifdef SAPPHIRE msgbox SootopolisCity_Text_169AB7, 4 .else msgbox SootopolisCity_Text_169F3C, 4 .endif - closebutton - pause 30 - move 5, SootopolisCity_Movement_14D46A - move 10, SootopolisCity_Movement_14D41D - move 255, SootopolisCity_Movement_14D445 - waitmove 0 - move 5, SootopolisCity_Movement_1A0843 - move 255, SootopolisCity_Movement_1A0843 - waitmove 0 - pause 30 - move 10, SootopolisCity_Movement_1A0845 - waitmove 0 + closemessage + delay 30 + applymovement 5, SootopolisCity_Movement_14D46A + applymovement 10, SootopolisCity_Movement_14D41D + applymovement 255, SootopolisCity_Movement_14D445 + waitmovement 0 + applymovement 5, SootopolisCity_Movement_1A0843 + applymovement 255, SootopolisCity_Movement_1A0843 + waitmovement 0 + delay 30 + applymovement 10, SootopolisCity_Movement_1A0845 + waitmovement 0 .ifdef SAPPHIRE msgbox SootopolisCity_Text_169AE7, 4 .else msgbox SootopolisCity_Text_169F6B, 4 .endif - closebutton - pause 30 - move 5, SootopolisCity_Movement_14D47C - move 255, SootopolisCity_Movement_14D457 - move 10, SootopolisCity_Movement_14D42D - waitmove 0 - move 5, SootopolisCity_Movement_1A083F - waitmove 0 + closemessage + delay 30 + applymovement 5, SootopolisCity_Movement_14D47C + applymovement 255, SootopolisCity_Movement_14D457 + applymovement 10, SootopolisCity_Movement_14D42D + waitmovement 0 + applymovement 5, SootopolisCity_Movement_1A083F + waitmovement 0 .ifdef SAPPHIRE msgbox SootopolisCity_Text_169BC7, 4 .else msgbox SootopolisCity_Text_16A06C, 4 .endif - move 255, SootopolisCity_Movement_1A083F - waitmove 0 + applymovement 255, SootopolisCity_Movement_1A083F + waitmovement 0 .ifdef SAPPHIRE msgbox SootopolisCity_Text_169C99, 4 .else msgbox SootopolisCity_Text_16A13E, 4 .endif - moveoffscreen 5 - spritebehave 5, 9 - moveoffscreen 10 - spritebehave 10, 10 + moveobjectoffscreen 5 + setobjectmovementtype 5, 9 + moveobjectoffscreen 10 + setobjectmovementtype 10, 10 setvar 0x405e, 2 releaseall end @@ -446,7 +446,7 @@ SootopolisCity_EventScript_14D498:: @ 814D498 lock faceplayer checkflag 113 - jumpeq SootopolisCity_EventScript_14D4AD + goto_if_eq SootopolisCity_EventScript_14D4AD .ifdef SAPPHIRE msgbox SootopolisCity_Text_169DA6, 4 .else @@ -457,14 +457,14 @@ SootopolisCity_EventScript_14D498:: @ 814D498 SootopolisCity_EventScript_14D4AD:: @ 814D4AD msgbox SootopolisCity_Text_16A33E, 4 - closebutton - move LAST_TALKED, SootopolisCity_Movement_1A0845 - waitmove 0 - pause 50 - setanimation 0, 1 - doanimation 30 - pause 15 - disappear LAST_TALKED - checkanimation 30 + closemessage + applymovement LAST_TALKED, SootopolisCity_Movement_1A0845 + waitmovement 0 + delay 50 + setfieldeffect 0, 1 + dofieldeffect 30 + delay 15 + removeobject LAST_TALKED + waitfieldeffect 30 release end diff --git a/data/scripts/maps/SootopolisCity_Gym_1F.inc b/data/scripts/maps/SootopolisCity_Gym_1F.inc index 32bf4d619..51b67ee4b 100644 --- a/data/scripts/maps/SootopolisCity_Gym_1F.inc +++ b/data/scripts/maps/SootopolisCity_Gym_1F.inc @@ -20,11 +20,11 @@ SootopolisCity_Gym_1F_MapScript1_15AF25:: @ 815AF25 SootopolisCity_Gym_1F_EventScript_15AF2E:: @ 815AF2E compare 0x4022, 8 - jumpif 0, SootopolisCity_Gym_1F_EventScript_15AF85 + goto_if 0, SootopolisCity_Gym_1F_EventScript_15AF85 compare 0x4022, 28 - jumpif 0, SootopolisCity_Gym_1F_EventScript_15AF73 + goto_if 0, SootopolisCity_Gym_1F_EventScript_15AF73 compare 0x4022, 69 - jumpif 0, SootopolisCity_Gym_1F_EventScript_15AF61 + goto_if 0, SootopolisCity_Gym_1F_EventScript_15AF61 setmaptile 8, 4, 519, 0 setmaptile 8, 5, 519, 0 @@ -48,35 +48,35 @@ SootopolisCity_Gym_1F_MapScript2_15AF86:: @ 815AF86 SootopolisCity_Gym_1F_EventScript_15AFA8:: @ 815AFA8 addvar 0x4022, 1 - pause 40 - playsfx 40 + delay 40 + playse 40 call SootopolisCity_Gym_1F_EventScript_15AF2E special DrawWholeMapView end SootopolisCity_Gym_1F_EventScript_15AFBC:: @ 815AFBC addvar 0x4022, 1 - pause 40 - playsfx 40 + delay 40 + playse 40 call SootopolisCity_Gym_1F_EventScript_15AF2E special DrawWholeMapView end SootopolisCity_Gym_1F_EventScript_15AFD0:: @ 815AFD0 addvar 0x4022, 1 - pause 40 - playsfx 40 + delay 40 + playse 40 call SootopolisCity_Gym_1F_EventScript_15AF2E special DrawWholeMapView end SootopolisCity_Gym_1F_EventScript_15AFE4:: @ 815AFE4 lockall - pause 20 - move 255, SootopolisCity_Gym_1F_Movement_15AFFD - waitmove 0 - playsfx 43 - pause 60 + delay 20 + applymovement 255, SootopolisCity_Gym_1F_Movement_15AFFD + waitmovement 0 + playse 43 + delay 60 warphole SootopolisCity_Gym_B1F waitstate end @@ -88,29 +88,29 @@ SootopolisCity_Gym_1F_Movement_15AFFD:: @ 815AFFD SootopolisCity_Gym_1F_EventScript_15AFFF:: @ 815AFFF trainerbattle 1, OPPONENT_WALLACE, 0, SootopolisCity_Gym_1F_Text_18F0CA, SootopolisCity_Gym_1F_Text_18F282, SootopolisCity_Gym_1F_EventScript_15B02D checkflag 172 - jumpif 0, SootopolisCity_Gym_1F_EventScript_15B056 + goto_if 0, SootopolisCity_Gym_1F_EventScript_15B056 checkflag 2060 - jumpif 0, SootopolisCity_Gym_1F_EventScript_15B07A + goto_if 0, SootopolisCity_Gym_1F_EventScript_15B07A msgbox SootopolisCity_Gym_1F_Text_18F4D7, 4 release end SootopolisCity_Gym_1F_EventScript_15B02D:: @ 815B02D message SootopolisCity_Gym_1F_Text_18F342 - waittext + waitmessage call SootopolisCity_Gym_1F_EventScript_1A02C5 msgbox SootopolisCity_Gym_1F_Text_18F36B, 4 setflag 1236 setflag 2062 setvar 0x8008, 8 call SootopolisCity_Gym_1F_EventScript_1A01C0 - jump SootopolisCity_Gym_1F_EventScript_15B056 + goto SootopolisCity_Gym_1F_EventScript_15B056 end SootopolisCity_Gym_1F_EventScript_15B056:: @ 815B056 giveitem ITEM_TM03 compare RESULT, 0 - jumpeq SootopolisCity_Gym_1F_EventScript_1A029B + goto_if_eq SootopolisCity_Gym_1F_EventScript_1A029B msgbox SootopolisCity_Gym_1F_Text_18F466, 4 setflag 172 release @@ -125,7 +125,7 @@ SootopolisCity_Gym_1F_EventScript_15B084:: @ 815B084 lock faceplayer checkflag 1236 - jumpeq SootopolisCity_Gym_1F_EventScript_15B099 + goto_if_eq SootopolisCity_Gym_1F_EventScript_15B099 msgbox SootopolisCity_Gym_1F_Text_18E8A5, 4 release end @@ -138,15 +138,15 @@ SootopolisCity_Gym_1F_EventScript_15B099:: @ 815B099 SootopolisCity_Gym_1F_EventScript_15B0A3:: @ 815B0A3 lockall checkflag 2062 - jumpeq SootopolisCity_Gym_1F_EventScript_15B0C3 - jump SootopolisCity_Gym_1F_EventScript_15B0CD + goto_if_eq SootopolisCity_Gym_1F_EventScript_15B0C3 + goto SootopolisCity_Gym_1F_EventScript_15B0CD end SootopolisCity_Gym_1F_EventScript_15B0B3:: @ 815B0B3 lockall checkflag 2062 - jumpeq SootopolisCity_Gym_1F_EventScript_15B0C3 - jump SootopolisCity_Gym_1F_EventScript_15B0CD + goto_if_eq SootopolisCity_Gym_1F_EventScript_15B0C3 + goto SootopolisCity_Gym_1F_EventScript_15B0CD end SootopolisCity_Gym_1F_EventScript_15B0C3:: @ 815B0C3 diff --git a/data/scripts/maps/SootopolisCity_House1.inc b/data/scripts/maps/SootopolisCity_House1.inc index 604f04c4f..4877d6d6e 100644 --- a/data/scripts/maps/SootopolisCity_House1.inc +++ b/data/scripts/maps/SootopolisCity_House1.inc @@ -5,7 +5,7 @@ SootopolisCity_House1_EventScript_15B29B:: @ 815B29B lock faceplayer checkflag 121 - jumpeq SootopolisCity_House1_EventScript_15B2C7 + goto_if_eq SootopolisCity_House1_EventScript_15B2C7 msgbox SootopolisCity_House1_Text_18F991, 4 giveitem ITEM_TM31 setflag 121 @@ -21,8 +21,8 @@ SootopolisCity_House1_EventScript_15B2C7:: @ 815B2C7 SootopolisCity_House1_EventScript_15B2D1:: @ 815B2D1 lock faceplayer - checksound - pokecry SPECIES_KECLEON, 0 + waitse + playpokecry SPECIES_KECLEON, 0 msgbox SootopolisCity_House1_Text_18FA50, 4 waitpokecry release diff --git a/data/scripts/maps/SootopolisCity_House2.inc b/data/scripts/maps/SootopolisCity_House2.inc index 409a871a8..011806291 100644 --- a/data/scripts/maps/SootopolisCity_House2.inc +++ b/data/scripts/maps/SootopolisCity_House2.inc @@ -6,9 +6,9 @@ SootopolisCity_House2_EventScript_15B2E5:: @ 815B2E5 faceplayer msgbox SootopolisCity_House2_Text_18FA66, 5 compare RESULT, 1 - callif 1, SootopolisCity_House2_EventScript_15B307 + call_if 1, SootopolisCity_House2_EventScript_15B307 compare RESULT, 0 - callif 1, SootopolisCity_House2_EventScript_15B310 + call_if 1, SootopolisCity_House2_EventScript_15B310 release end diff --git a/data/scripts/maps/SootopolisCity_House3.inc b/data/scripts/maps/SootopolisCity_House3.inc index 88e35730e..f1bf0bf19 100644 --- a/data/scripts/maps/SootopolisCity_House3.inc +++ b/data/scripts/maps/SootopolisCity_House3.inc @@ -6,7 +6,7 @@ SootopolisCity_House3_EventScript_15B31A:: @ 815B31A faceplayer msgbox SootopolisCity_House3_Text_18FB36, 5 compare RESULT, 1 - jumpeq SootopolisCity_House3_EventScript_15B339 + goto_if_eq SootopolisCity_House3_EventScript_15B339 msgbox SootopolisCity_House3_Text_18FBC0, 4 release end diff --git a/data/scripts/maps/SootopolisCity_House4.inc b/data/scripts/maps/SootopolisCity_House4.inc index ee3bfe61b..c192a0340 100644 --- a/data/scripts/maps/SootopolisCity_House4.inc +++ b/data/scripts/maps/SootopolisCity_House4.inc @@ -12,8 +12,8 @@ SootopolisCity_House4_EventScript_15B356:: @ 815B356 SootopolisCity_House4_EventScript_15B35F:: @ 815B35F lock faceplayer - checksound - pokecry SPECIES_AZUMARILL, 0 + waitse + playpokecry SPECIES_AZUMARILL, 0 msgbox SootopolisCity_House4_Text_18FDD8, 4 waitpokecry release diff --git a/data/scripts/maps/SootopolisCity_House6.inc b/data/scripts/maps/SootopolisCity_House6.inc index cccfa78ee..a0fdc5ca4 100644 --- a/data/scripts/maps/SootopolisCity_House6.inc +++ b/data/scripts/maps/SootopolisCity_House6.inc @@ -5,14 +5,14 @@ SootopolisCity_House6_EventScript_15B386:: @ 815B386 lock faceplayer checkflag 245 - jumpeq SootopolisCity_House6_EventScript_15B3CD + goto_if_eq SootopolisCity_House6_EventScript_15B3CD msgbox SootopolisCity_House6_Text_18FEA1, 5 compare RESULT, 0 - callif 1, SootopolisCity_House6_EventScript_15B3C3 + call_if 1, SootopolisCity_House6_EventScript_15B3C3 msgbox SootopolisCity_House6_Text_18FF12, 4 givedecoration 117 compare RESULT, 0 - jumpeq SootopolisCity_House6_EventScript_15B3D7 + goto_if_eq SootopolisCity_House6_EventScript_15B3D7 setflag 245 release end @@ -28,7 +28,7 @@ SootopolisCity_House6_EventScript_15B3CD:: @ 815B3CD end SootopolisCity_House6_EventScript_15B3D7:: @ 815B3D7 - bufferdecor 1, 117 + getdecorname 1, 117 msgbox SootopolisCity_House6_Text_1A0CEF, 4 msgbox SootopolisCity_House6_Text_18FF28, 4 release diff --git a/data/scripts/maps/SootopolisCity_House8.inc b/data/scripts/maps/SootopolisCity_House8.inc index 9d7618316..df536004e 100644 --- a/data/scripts/maps/SootopolisCity_House8.inc +++ b/data/scripts/maps/SootopolisCity_House8.inc @@ -10,14 +10,14 @@ SootopolisCity_House8_EventScript_15B401:: @ 815B401 waitstate copyvar RESULT, 0x8004 compare RESULT, 255 - jumpeq SootopolisCity_House8_EventScript_15B448 + goto_if_eq SootopolisCity_House8_EventScript_15B448 special CompareShroomishSize compare RESULT, 1 - jumpeq SootopolisCity_House8_EventScript_15B452 + goto_if_eq SootopolisCity_House8_EventScript_15B452 compare RESULT, 2 - jumpeq SootopolisCity_House8_EventScript_15B45C + goto_if_eq SootopolisCity_House8_EventScript_15B45C compare RESULT, 3 - jumpeq SootopolisCity_House8_EventScript_15B466 + goto_if_eq SootopolisCity_House8_EventScript_15B466 release end @@ -40,8 +40,8 @@ SootopolisCity_House8_EventScript_15B466:: @ 815B466 msgbox SootopolisCity_House8_Text_19021D, 4 giveitem ITEM_ELIXIR compare RESULT, 0 - jumpeq SootopolisCity_House8_EventScript_15B488 - closebutton + goto_if_eq SootopolisCity_House8_EventScript_15B488 + closemessage release end @@ -59,14 +59,14 @@ SootopolisCity_House8_EventScript_15B492:: @ 815B492 waitstate copyvar RESULT, 0x8004 compare RESULT, 255 - jumpeq SootopolisCity_House8_EventScript_15B4D9 + goto_if_eq SootopolisCity_House8_EventScript_15B4D9 special CompareBarboachSize compare RESULT, 1 - jumpeq SootopolisCity_House8_EventScript_15B4E3 + goto_if_eq SootopolisCity_House8_EventScript_15B4E3 compare RESULT, 2 - jumpeq SootopolisCity_House8_EventScript_15B4ED + goto_if_eq SootopolisCity_House8_EventScript_15B4ED compare RESULT, 3 - jumpeq SootopolisCity_House8_EventScript_15B4F7 + goto_if_eq SootopolisCity_House8_EventScript_15B4F7 release end @@ -89,8 +89,8 @@ SootopolisCity_House8_EventScript_15B4F7:: @ 815B4F7 msgbox SootopolisCity_House8_Text_190536, 4 giveitem ITEM_ELIXIR compare RESULT, 0 - jumpeq SootopolisCity_House8_EventScript_15B519 - closebutton + goto_if_eq SootopolisCity_House8_EventScript_15B519 + closemessage release end diff --git a/data/scripts/maps/SootopolisCity_Mart.inc b/data/scripts/maps/SootopolisCity_Mart.inc index 9f37f9d0b..b88347002 100644 --- a/data/scripts/maps/SootopolisCity_Mart.inc +++ b/data/scripts/maps/SootopolisCity_Mart.inc @@ -5,7 +5,7 @@ SootopolisCity_Mart_EventScript_15B21B:: @ 815B21B lock faceplayer message SootopolisCity_Mart_Text_1A0BE4 - waittext + waitmessage pokemart SootopolisCity_Mart_Items msgbox SootopolisCity_Mart_Text_1A0C02, 4 release @@ -30,9 +30,9 @@ SootopolisCity_Mart_EventScript_15B24A:: @ 815B24A lock faceplayer checkflag 113 - jumpeq SootopolisCity_Mart_EventScript_15B268 + goto_if_eq SootopolisCity_Mart_EventScript_15B268 checkflag 129 - jumpif 0, SootopolisCity_Mart_EventScript_15B268 + goto_if 0, SootopolisCity_Mart_EventScript_15B268 msgbox SootopolisCity_Mart_Text_18F8D7, 4 release end @@ -46,9 +46,9 @@ SootopolisCity_Mart_EventScript_15B272:: @ 815B272 lock faceplayer checkflag 113 - jumpeq SootopolisCity_Mart_EventScript_15B290 + goto_if_eq SootopolisCity_Mart_EventScript_15B290 checkflag 129 - jumpif 0, SootopolisCity_Mart_EventScript_15B290 + goto_if 0, SootopolisCity_Mart_EventScript_15B290 msgbox SootopolisCity_Mart_Text_18F96B, 4 release end diff --git a/data/scripts/maps/SootopolisCity_PokemonCenter_1F.inc b/data/scripts/maps/SootopolisCity_PokemonCenter_1F.inc index 29cc06584..cb09d8856 100644 --- a/data/scripts/maps/SootopolisCity_PokemonCenter_1F.inc +++ b/data/scripts/maps/SootopolisCity_PokemonCenter_1F.inc @@ -9,7 +9,7 @@ SootopolisCity_PokemonCenter_1F_MapScript1_15B196:: @ 815B196 @ 815B19A setvar 0x800B, 1 call VerdanturfTown_PokemonCenter_1F_EventScript_19FD5B - waittext + waitmessage waitbutton release end @@ -18,9 +18,9 @@ SootopolisCity_PokemonCenter_1F_EventScript_15B1A8:: @ 815B1A8 lock faceplayer checkflag 113 - jumpeq SootopolisCity_PokemonCenter_1F_EventScript_15B1C6 + goto_if_eq SootopolisCity_PokemonCenter_1F_EventScript_15B1C6 checkflag 129 - jumpif 0, SootopolisCity_PokemonCenter_1F_EventScript_15B1C6 + goto_if 0, SootopolisCity_PokemonCenter_1F_EventScript_15B1C6 msgbox SootopolisCity_PokemonCenter_1F_Text_18F770, 4 release end @@ -34,9 +34,9 @@ SootopolisCity_PokemonCenter_1F_EventScript_15B1D0:: @ 815B1D0 lock faceplayer checkflag 113 - jumpeq SootopolisCity_PokemonCenter_1F_EventScript_15B1EE + goto_if_eq SootopolisCity_PokemonCenter_1F_EventScript_15B1EE checkflag 129 - jumpif 0, SootopolisCity_PokemonCenter_1F_EventScript_15B1EE + goto_if 0, SootopolisCity_PokemonCenter_1F_EventScript_15B1EE msgbox SootopolisCity_PokemonCenter_1F_Text_18F860, 4 release end diff --git a/data/scripts/maps/SouthernIsland_Exterior.inc b/data/scripts/maps/SouthernIsland_Exterior.inc index 9723647cd..3c6426024 100644 --- a/data/scripts/maps/SouthernIsland_Exterior.inc +++ b/data/scripts/maps/SouthernIsland_Exterior.inc @@ -11,13 +11,13 @@ SouthernIsland_Exterior_EventScript_160AE0:: @ 8160AE0 faceplayer msgbox SouthernIsland_Exterior_Text_1C5215, 5 compare RESULT, 0 - jumpeq SouthernIsland_Exterior_EventScript_160B25 + goto_if_eq SouthernIsland_Exterior_EventScript_160B25 msgbox SouthernIsland_Exterior_Text_1C5281, 4 - closebutton - move LAST_TALKED, SouthernIsland_Exterior_Movement_1A0845 - waitmove 0 - pause 30 - spriteinvisible 1, 26, 9 + closemessage + applymovement LAST_TALKED, SouthernIsland_Exterior_Movement_1A0845 + waitmovement 0 + delay 30 + hideobject 1, 26, 9 setvar 0x8004, 2 call SouthernIsland_Exterior_EventScript_1A047C warp LilycoveCity_Harbor, 255, 8, 11 @@ -31,13 +31,13 @@ SouthernIsland_Exterior_EventScript_160B25:: @ 8160B25 end BattleTower_Outside_EventScript_160B2F:: @ 8160B2F - move 255, BattleTower_Outside_Movement_160B45 - waitmove 0 + applymovement 255, BattleTower_Outside_Movement_160B45 + waitmovement 0 return BattleTower_Outside_EventScript_160B3A:: @ 8160B3A - move 255, BattleTower_Outside_Movement_160B47 - waitmove 0 + applymovement 255, BattleTower_Outside_Movement_160B47 + waitmovement 0 return BattleTower_Outside_Movement_160B45:: @ 8160B45 diff --git a/data/scripts/maps/SouthernIsland_Interior.inc b/data/scripts/maps/SouthernIsland_Interior.inc index e5eaadab5..bcb316f96 100644 --- a/data/scripts/maps/SouthernIsland_Interior.inc +++ b/data/scripts/maps/SouthernIsland_Interior.inc @@ -5,11 +5,11 @@ SouthernIsland_Interior_MapScripts:: @ 8160B53 SouthernIsland_Interior_MapScript1_160B5E:: @ 8160B5E checkflag 2145 - callif 1, SouthernIsland_Interior_EventScript_160B68 + call_if 1, SouthernIsland_Interior_EventScript_160B68 end SouthernIsland_Interior_EventScript_160B68:: @ 8160B68 - disappear 2 + removeobject 2 return SouthernIsland_Interior_MapScript1_160B6C:: @ 8160B6C @@ -22,11 +22,11 @@ SouthernIsland_Interior_MapScript1_160B6C:: @ 8160B6C end SouthernIsland_Interior_EventScript_160B77:: @ 8160B77 - checkgender + checkplayergender compare RESULT, 0 - jumpeq SouthernIsland_Interior_EventScript_160B8F + goto_if_eq SouthernIsland_Interior_EventScript_160B8F compare RESULT, 1 - jumpeq SouthernIsland_Interior_EventScript_160B95 + goto_if_eq SouthernIsland_Interior_EventScript_160B95 end SouthernIsland_Interior_EventScript_160B8F:: @ 8160B8F @@ -40,29 +40,29 @@ SouthernIsland_Interior_EventScript_160B95:: @ 8160B95 SouthernIsland_Interior_EventScript_160B9B:: @ 8160B9B lockall setvar 0x8008, 12 - jump SouthernIsland_Interior_EventScript_160BA7 + goto SouthernIsland_Interior_EventScript_160BA7 end SouthernIsland_Interior_EventScript_160BA7:: @ 8160BA7 checkflag 206 - jumpeq SouthernIsland_Interior_EventScript_160C08 + goto_if_eq SouthernIsland_Interior_EventScript_160C08 checkflag 2131 - jumpif 0, SouthernIsland_Interior_EventScript_160C08 + goto_if 0, SouthernIsland_Interior_EventScript_160C08 setflag 206 special SpawnCameraDummy - move 127, SouthernIsland_Interior_Movement_160C12 - waitmove 0 - pause 50 - checksound - pokecry SPECIES_LATIAS_OR_LATIOS, 0 - pause 30 + applymovement 127, SouthernIsland_Interior_Movement_160C12 + waitmovement 0 + delay 50 + waitse + playpokecry SPECIES_LATIAS_OR_LATIOS, 0 + delay 30 waitpokecry - reappear 2 - pause 30 - move 127, SouthernIsland_Interior_Movement_160C16 - move 2, SouthernIsland_Interior_Movement_160C22 - waitmove 0 - pause 50 + addobject 2 + delay 30 + applymovement 127, SouthernIsland_Interior_Movement_160C16 + applymovement 2, SouthernIsland_Interior_Movement_160C22 + waitmovement 0 + delay 50 special RemoveCameraDummy setwildbattle SPECIES_LATIAS_OR_LATIOS, 50, ITEM_SOUL_DEW setflag 911 diff --git a/data/scripts/maps/Underwater_Route134.inc b/data/scripts/maps/Underwater_Route134.inc index ee79f9799..bbe7e1ce2 100644 --- a/data/scripts/maps/Underwater_Route134.inc +++ b/data/scripts/maps/Underwater_Route134.inc @@ -3,5 +3,5 @@ Underwater_Route134_MapScripts:: @ 815F071 .byte 0 Underwater_Route134_MapScript1_15F077:: @ 815F077 - warp4 Route134, 255, 60, 31 + setdivewarp Route134, 255, 60, 31 end diff --git a/data/scripts/maps/Underwater_SeafloorCavern.inc b/data/scripts/maps/Underwater_SeafloorCavern.inc index c879ec609..3d2fe81b2 100644 --- a/data/scripts/maps/Underwater_SeafloorCavern.inc +++ b/data/scripts/maps/Underwater_SeafloorCavern.inc @@ -7,7 +7,7 @@ Underwater_SeafloorCavern_MapScripts:: @ 815D99E Underwater_SeafloorCavern_MapScript1_15D9AE:: @ 815D9AE setflag 2119 checkflag 129 - jumpeq Underwater_SeafloorCavern_EventScript_15D9BB + goto_if_eq Underwater_SeafloorCavern_EventScript_15D9BB end Underwater_SeafloorCavern_EventScript_15D9BB:: @ 815D9BB @@ -16,7 +16,7 @@ Underwater_SeafloorCavern_EventScript_15D9BB:: @ 815D9BB Underwater_SeafloorCavern_MapScript1_15D9BF:: @ 815D9BF checkflag 129 - callif 1, Underwater_SeafloorCavern_EventScript_15D9C9 + call_if 1, Underwater_SeafloorCavern_EventScript_15D9C9 end Underwater_SeafloorCavern_EventScript_15D9C9:: @ 815D9C9 @@ -35,7 +35,7 @@ Underwater_SeafloorCavern_EventScript_15D9C9:: @ 815D9C9 return Underwater_SeafloorCavern_MapScript1_15DA36:: @ 815DA36 - warp4 SeafloorCavern_Entrance, 255, 10, 17 + setdivewarp SeafloorCavern_Entrance, 255, 10, 17 end Underwater_SeafloorCavern_EventScript_15DA3F:: @ 815DA3F diff --git a/data/scripts/maps/Underwater_SealedChamber.inc b/data/scripts/maps/Underwater_SealedChamber.inc index d7e7aabcb..836ad86e2 100644 --- a/data/scripts/maps/Underwater_SealedChamber.inc +++ b/data/scripts/maps/Underwater_SealedChamber.inc @@ -5,23 +5,23 @@ Underwater_SealedChamber_MapScripts:: @ 815F080 Underwater_SealedChamber_MapScript1_15F086:: @ 815F086 getplayerxy 0x8004, 0x8005 compare 0x8004, 12 - jumpif 5, Underwater_SealedChamber_EventScript_15F0A6 + goto_if 5, Underwater_SealedChamber_EventScript_15F0A6 compare 0x8005, 44 - jumpif 5, Underwater_SealedChamber_EventScript_15F0A6 - jump Underwater_SealedChamber_EventScript_15F0AF + goto_if 5, Underwater_SealedChamber_EventScript_15F0A6 + goto Underwater_SealedChamber_EventScript_15F0AF Underwater_SealedChamber_EventScript_15F0A6:: @ 815F0A6 - warp4 Route134, 255, 60, 31 + setdivewarp Route134, 255, 60, 31 end Underwater_SealedChamber_EventScript_15F0AF:: @ 815F0AF - warp4 SealedChamber_OuterRoom, 255, 10, 19 + setdivewarp SealedChamber_OuterRoom, 255, 10, 19 end Underwater_SealedChamber_EventScript_15F0B8:: @ 815F0B8 lockall - braillemsg Underwater_SealedChamber_Braille_1C533D + braillemessage Underwater_SealedChamber_Braille_1C533D waitbutton - hidebox 0, 0, 29, 19 + erasebox 0, 0, 29, 19 releaseall end diff --git a/data/scripts/maps/Underwater_SootopolisCity.inc b/data/scripts/maps/Underwater_SootopolisCity.inc index 624c2c83e..c9405dfd7 100644 --- a/data/scripts/maps/Underwater_SootopolisCity.inc +++ b/data/scripts/maps/Underwater_SootopolisCity.inc @@ -3,5 +3,5 @@ Underwater_SootopolisCity_MapScripts:: @ 815CAE4 .byte 0 Underwater_SootopolisCity_MapScript1_15CAEA:: @ 815CAEA - warp4 SootopolisCity, 255, 29, 53 + setdivewarp SootopolisCity, 255, 29, 53 end diff --git a/data/scripts/maps/UnknownMap_25_34.inc b/data/scripts/maps/UnknownMap_25_34.inc index cbd782f35..34d0bb70b 100644 --- a/data/scripts/maps/UnknownMap_25_34.inc +++ b/data/scripts/maps/UnknownMap_25_34.inc @@ -14,40 +14,40 @@ LinkContestRoom1_MapScript1_15F595:: @ 815F595 LinkContestRoom1_EventScript_15F5A5:: @ 815F5A5 special ScriptGetMultiplayerId compare RESULT, 0 - callif 1, LinkContestRoom1_EventScript_15F5E0 + call_if 1, LinkContestRoom1_EventScript_15F5E0 compare RESULT, 1 - callif 1, LinkContestRoom1_EventScript_15F5E4 + call_if 1, LinkContestRoom1_EventScript_15F5E4 compare RESULT, 2 - callif 1, LinkContestRoom1_EventScript_15F5E8 + call_if 1, LinkContestRoom1_EventScript_15F5E8 compare RESULT, 3 - callif 1, LinkContestRoom1_EventScript_15F5EC + call_if 1, LinkContestRoom1_EventScript_15F5EC compare RESULT, 4 - callif 1, LinkContestRoom1_EventScript_15F5F0 + call_if 1, LinkContestRoom1_EventScript_15F5F0 return LinkContestRoom1_EventScript_15F5E0:: @ 815F5E0 - playmusicbattle 393 + savebgm 393 return LinkContestRoom1_EventScript_15F5E4:: @ 815F5E4 - playmusicbattle 394 + savebgm 394 return LinkContestRoom1_EventScript_15F5E8:: @ 815F5E8 - playmusicbattle 395 + savebgm 395 return LinkContestRoom1_EventScript_15F5EC:: @ 815F5EC - playmusicbattle 396 + savebgm 396 return LinkContestRoom1_EventScript_15F5F0:: @ 815F5F0 - playmusicbattle 440 + savebgm 440 return LinkContestRoom1_MapScript1_15F5F4:: @ 815F5F4 compare 0x4009, 1 - callif 1, LinkContestRoom1_EventScript_15F600 + call_if 1, LinkContestRoom1_EventScript_15F600 end LinkContestRoom1_EventScript_15F600:: @ 815F600 @@ -68,7 +68,7 @@ LinkContestRoom1_EventScript_15F61A:: @ 815F61A end LinkContestRoom1_EventScript_15F625:: @ 815F625 - spriteinvisible 255, 0, 9 + hideobject 255, 0, 9 call LinkContestRoom1_EventScript_15F919 end @@ -76,7 +76,7 @@ LinkContestRoom1_EventScript_15F630:: @ 815F630 call LinkContestRoom1_EventScript_15F6E6 call LinkContestRoom1_EventScript_15F646 compare 0x4000, 8 - jumpif 0, LinkContestRoom1_EventScript_15F630 + goto_if 0, LinkContestRoom1_EventScript_15F630 return LinkContestRoom1_EventScript_15F646:: @ 815F646 @@ -302,73 +302,73 @@ LinkContestRoom1_EventScript_15F919:: @ 815F919 return LinkContestRoom1_EventScript_15F956:: @ 815F956 - createvsprite 5, 20, 3, 2, 3, 1 - createvsprite 46, 24, 11, 2, 3, 1 + createvobject 5, 20, 3, 2, 3, 1 + createvobject 46, 24, 11, 2, 3, 1 return LinkContestRoom1_EventScript_15F969:: @ 815F969 - createvsprite 45, 0, 2, 3, 3, 4 - createvsprite 66, 1, 2, 4, 3, 4 - createvsprite 55, 2, 2, 7, 3, 4 - createvsprite 46, 3, 2, 8, 3, 4 - createvsprite 5, 10, 12, 3, 3, 3 - createvsprite 20, 11, 12, 4, 3, 3 - createvsprite 24, 12, 12, 7, 3, 3 - createvsprite 12, 13, 12, 8, 3, 3 - createvsprite 47, 20, 3, 2, 3, 1 - createvsprite 46, 24, 11, 2, 3, 1 + createvobject 45, 0, 2, 3, 3, 4 + createvobject 66, 1, 2, 4, 3, 4 + createvobject 55, 2, 2, 7, 3, 4 + createvobject 46, 3, 2, 8, 3, 4 + createvobject 5, 10, 12, 3, 3, 3 + createvobject 20, 11, 12, 4, 3, 3 + createvobject 24, 12, 12, 7, 3, 3 + createvobject 12, 13, 12, 8, 3, 3 + createvobject 47, 20, 3, 2, 3, 1 + createvobject 46, 24, 11, 2, 3, 1 return LinkContestRoom1_EventScript_15F9C4:: @ 815F9C4 - createvsprite 45, 0, 2, 3, 3, 4 - createvsprite 66, 1, 2, 4, 3, 4 - createvsprite 55, 2, 2, 7, 3, 4 - createvsprite 48, 3, 2, 8, 3, 4 - createvsprite 5, 10, 12, 3, 3, 3 - createvsprite 20, 11, 12, 4, 3, 3 - createvsprite 24, 12, 12, 7, 3, 3 - createvsprite 45, 13, 12, 8, 3, 3 - createvsprite 22, 20, 3, 2, 3, 1 - createvsprite 23, 20, 6, 2, 3, 1 - createvsprite 34, 20, 7, 2, 3, 1 - createvsprite 46, 24, 8, 2, 3, 1 - createvsprite 48, 24, 11, 2, 3, 1 - createvsprite 11, 25, 3, 9, 3, 2 - createvsprite 35, 26, 4, 9, 3, 2 - createvsprite 17, 27, 5, 9, 3, 2 - createvsprite 41, 28, 9, 9, 3, 2 - createvsprite 38, 29, 10, 9, 3, 2 - createvsprite 83, 30, 11, 9, 3, 2 + createvobject 45, 0, 2, 3, 3, 4 + createvobject 66, 1, 2, 4, 3, 4 + createvobject 55, 2, 2, 7, 3, 4 + createvobject 48, 3, 2, 8, 3, 4 + createvobject 5, 10, 12, 3, 3, 3 + createvobject 20, 11, 12, 4, 3, 3 + createvobject 24, 12, 12, 7, 3, 3 + createvobject 45, 13, 12, 8, 3, 3 + createvobject 22, 20, 3, 2, 3, 1 + createvobject 23, 20, 6, 2, 3, 1 + createvobject 34, 20, 7, 2, 3, 1 + createvobject 46, 24, 8, 2, 3, 1 + createvobject 48, 24, 11, 2, 3, 1 + createvobject 11, 25, 3, 9, 3, 2 + createvobject 35, 26, 4, 9, 3, 2 + createvobject 17, 27, 5, 9, 3, 2 + createvobject 41, 28, 9, 9, 3, 2 + createvobject 38, 29, 10, 9, 3, 2 + createvobject 83, 30, 11, 9, 3, 2 return LinkContestRoom1_EventScript_15FA70:: @ 815FA70 - createvsprite 45, 0, 2, 3, 3, 4 - createvsprite 66, 1, 2, 4, 3, 4 - createvsprite 55, 2, 2, 7, 3, 4 - createvsprite 12, 3, 2, 8, 3, 4 - createvsprite 39, 4, 1, 3, 3, 4 - createvsprite 34, 6, 1, 5, 3, 4 - createvsprite 26, 7, 1, 6, 3, 4 - createvsprite 48, 9, 1, 8, 3, 4 - createvsprite 5, 10, 12, 3, 3, 3 - createvsprite 20, 11, 12, 4, 3, 3 - createvsprite 24, 12, 12, 7, 3, 3 - createvsprite 45, 13, 12, 8, 3, 3 - createvsprite 50, 14, 13, 3, 3, 3 - createvsprite 52, 15, 13, 4, 3, 3 - createvsprite 65, 17, 13, 6, 3, 3 - createvsprite 83, 18, 13, 7, 3, 3 - createvsprite 116, 19, 13, 8, 3, 3 - createvsprite 25, 20, 3, 2, 3, 1 - createvsprite 31, 21, 6, 2, 3, 1 - createvsprite 33, 22, 7, 2, 3, 1 - createvsprite 46, 24, 11, 2, 3, 1 - createvsprite 49, 25, 3, 9, 3, 2 - createvsprite 35, 26, 4, 9, 3, 2 - createvsprite 48, 27, 5, 9, 3, 2 - createvsprite 41, 28, 9, 9, 3, 2 - createvsprite 38, 29, 10, 9, 3, 2 - createvsprite 83, 30, 11, 9, 3, 2 + createvobject 45, 0, 2, 3, 3, 4 + createvobject 66, 1, 2, 4, 3, 4 + createvobject 55, 2, 2, 7, 3, 4 + createvobject 12, 3, 2, 8, 3, 4 + createvobject 39, 4, 1, 3, 3, 4 + createvobject 34, 6, 1, 5, 3, 4 + createvobject 26, 7, 1, 6, 3, 4 + createvobject 48, 9, 1, 8, 3, 4 + createvobject 5, 10, 12, 3, 3, 3 + createvobject 20, 11, 12, 4, 3, 3 + createvobject 24, 12, 12, 7, 3, 3 + createvobject 45, 13, 12, 8, 3, 3 + createvobject 50, 14, 13, 3, 3, 3 + createvobject 52, 15, 13, 4, 3, 3 + createvobject 65, 17, 13, 6, 3, 3 + createvobject 83, 18, 13, 7, 3, 3 + createvobject 116, 19, 13, 8, 3, 3 + createvobject 25, 20, 3, 2, 3, 1 + createvobject 31, 21, 6, 2, 3, 1 + createvobject 33, 22, 7, 2, 3, 1 + createvobject 46, 24, 11, 2, 3, 1 + createvobject 49, 25, 3, 9, 3, 2 + createvobject 35, 26, 4, 9, 3, 2 + createvobject 48, 27, 5, 9, 3, 2 + createvobject 41, 28, 9, 9, 3, 2 + createvobject 38, 29, 10, 9, 3, 2 + createvobject 83, 30, 11, 9, 3, 2 return LinkContestRoom1_EventScript_15FB64:: @ 815FB64 @@ -381,25 +381,25 @@ LinkContestRoom1_EventScript_15FB64:: @ 815FB64 return LinkContestRoom1_EventScript_15FBA1:: @ 815FBA1 - inccounter GAME_STAT_ENTERED_CONTEST + incrementgamestat GAME_STAT_ENTERED_CONTEST warp VerdanturfTown_ContestLobby, 255, 5, 4 waitstate end LinkContestRoom1_EventScript_15FBAD:: @ 815FBAD - inccounter GAME_STAT_ENTERED_CONTEST + incrementgamestat GAME_STAT_ENTERED_CONTEST warp FallarborTown_ContestLobby, 255, 5, 4 waitstate end LinkContestRoom1_EventScript_15FBB9:: @ 815FBB9 - inccounter GAME_STAT_ENTERED_CONTEST + incrementgamestat GAME_STAT_ENTERED_CONTEST warp SlateportCity_ContestLobby, 255, 5, 4 waitstate end LinkContestRoom1_EventScript_15FBC5:: @ 815FBC5 - inccounter GAME_STAT_ENTERED_CONTEST + incrementgamestat GAME_STAT_ENTERED_CONTEST warp LilycoveCity_ContestLobby, 255, 6, 4 waitstate end @@ -413,11 +413,11 @@ FallarborTown_ContestLobby_EventScript_15FBDB:: @ 815FBDB LilycoveCity_ContestLobby_EventScript_15FBDB:: @ 815FBDB SlateportCity_ContestLobby_EventScript_15FBDB:: @ 815FBDB VerdanturfTown_ContestLobby_EventScript_15FBDB:: @ 815FBDB - checkgender + checkplayergender compare RESULT, 0 - jumpeq FallarborTown_ContestLobby_EventScript_15FBF3 + goto_if_eq FallarborTown_ContestLobby_EventScript_15FBF3 compare RESULT, 1 - jumpeq FallarborTown_ContestLobby_EventScript_15FBF9 + goto_if_eq FallarborTown_ContestLobby_EventScript_15FBF9 return FallarborTown_ContestLobby_EventScript_15FBF3:: @ 815FBF3 diff --git a/data/scripts/maps/VerdanturfTown.inc b/data/scripts/maps/VerdanturfTown.inc index 610643823..3e8f02302 100644 --- a/data/scripts/maps/VerdanturfTown.inc +++ b/data/scripts/maps/VerdanturfTown.inc @@ -12,17 +12,17 @@ VerdanturfTown_EventScript_14E866:: @ 814E866 lock faceplayer checkflag 199 - jumpeq VerdanturfTown_EventScript_14E885 + goto_if_eq VerdanturfTown_EventScript_14E885 msgbox VerdanturfTown_Text_16CAEB, 4 - move 2, VerdanturfTown_Movement_1A083D - waitmove 0 + applymovement 2, VerdanturfTown_Movement_1A083D + waitmovement 0 release end VerdanturfTown_EventScript_14E885:: @ 814E885 msgbox VerdanturfTown_Text_16CBCE, 4 - move 2, VerdanturfTown_Movement_1A083D - waitmove 0 + applymovement 2, VerdanturfTown_Movement_1A083D + waitmovement 0 release end @@ -38,7 +38,7 @@ VerdanturfTown_EventScript_14E8AB:: @ 814E8AB lock faceplayer checkflag 199 - jumpeq VerdanturfTown_EventScript_14E8C0 + goto_if_eq VerdanturfTown_EventScript_14E8C0 msgbox VerdanturfTown_Text_16CD4D, 4 release end diff --git a/data/scripts/maps/VerdanturfTown_ContestLobby.inc b/data/scripts/maps/VerdanturfTown_ContestLobby.inc index 8fd4016d1..8462892e6 100644 --- a/data/scripts/maps/VerdanturfTown_ContestLobby.inc +++ b/data/scripts/maps/VerdanturfTown_ContestLobby.inc @@ -20,28 +20,28 @@ VerdanturfTown_ContestLobby_EventScript_153D76:: @ 8153D76 VerdanturfTown_ContestLobby_EventScript_153DA1:: @ 8153DA1 lockall - move 1, VerdanturfTown_ContestLobby_Movement_153E25 - waitmove 0 - playsfx 71 + applymovement 1, VerdanturfTown_ContestLobby_Movement_153E25 + waitmovement 0 + playse 71 setmaptile 4, 2, 545, 1 setmaptile 4, 3, 609, 1 special DrawWholeMapView - move 1, VerdanturfTown_ContestLobby_Movement_153E28 - waitmove 0 - playsfx 71 + applymovement 1, VerdanturfTown_ContestLobby_Movement_153E28 + waitmovement 0 + playse 71 setmaptile 4, 2, 721, 1 setmaptile 4, 3, 729, 1 special DrawWholeMapView - pause 20 - move 1, VerdanturfTown_ContestLobby_Movement_153E35 - waitmove 0 - move 255, VerdanturfTown_ContestLobby_Movement_153E23 - waitmove 0 + delay 20 + applymovement 1, VerdanturfTown_ContestLobby_Movement_153E35 + waitmovement 0 + applymovement 255, VerdanturfTown_ContestLobby_Movement_153E23 + waitmovement 0 msgbox VerdanturfTown_ContestLobby_Text_1A6832, 4 - closebutton - move 1, VerdanturfTown_ContestLobby_Movement_153E2C - move 255, VerdanturfTown_ContestLobby_Movement_153E19 - waitmove 0 + closemessage + applymovement 1, VerdanturfTown_ContestLobby_Movement_153E2C + applymovement 255, VerdanturfTown_ContestLobby_Movement_153E19 + waitmovement 0 releaseall return @@ -90,7 +90,7 @@ VerdanturfTown_ContestLobby_Movement_153E35:: @ 8153E35 VerdanturfTown_ContestLobby_EventScript_153E37:: @ 8153E37 lockall fadescreen 1 - showcontestwinner 1 + drawcontestwinner 1 releaseall end @@ -102,11 +102,11 @@ VerdanturfTown_ContestLobby_EventScript_153E47:: @ 8153E47 lock faceplayer checkflag 235 - jumpeq VerdanturfTown_ContestLobby_EventScript_153E76 + goto_if_eq VerdanturfTown_ContestLobby_EventScript_153E76 msgbox VerdanturfTown_ContestLobby_Text_177DEC, 4 giveitem ITEM_TM45 compare RESULT, 0 - jumpeq VerdanturfTown_ContestLobby_EventScript_1A029B + goto_if_eq VerdanturfTown_ContestLobby_EventScript_1A029B setflag 235 release end @@ -124,6 +124,6 @@ VerdanturfTown_ContestLobby_EventScript_153E89:: @ 8153E89 lockall special ShowBerryBlenderRecordWindow waitbutton - hidebox 0, 0, 29, 19 + erasebox 0, 0, 29, 19 releaseall end diff --git a/data/scripts/maps/VerdanturfTown_FriendshipRatersHouse.inc b/data/scripts/maps/VerdanturfTown_FriendshipRatersHouse.inc index 5453fb42c..1cfa785d3 100644 --- a/data/scripts/maps/VerdanturfTown_FriendshipRatersHouse.inc +++ b/data/scripts/maps/VerdanturfTown_FriendshipRatersHouse.inc @@ -5,7 +5,7 @@ VerdanturfTown_FriendshipRatersHouse_EventScript_154030:: @ 8154030 lock faceplayer msgbox VerdanturfTown_FriendshipRatersHouse_Text_178A9C, 4 - specialval RESULT, GetLeadMonFriendshipScore + specialvar RESULT, GetLeadMonFriendshipScore switch RESULT case 0, VerdanturfTown_FriendshipRatersHouse_EventScript_154093 case 1, VerdanturfTown_FriendshipRatersHouse_EventScript_15409D @@ -55,8 +55,8 @@ VerdanturfTown_FriendshipRatersHouse_EventScript_1540CF:: @ 81540CF VerdanturfTown_FriendshipRatersHouse_EventScript_1540D9:: @ 81540D9 lock faceplayer - checksound - pokecry SPECIES_PIKACHU, 0 + waitse + playpokecry SPECIES_PIKACHU, 0 msgbox VerdanturfTown_FriendshipRatersHouse_Text_178CFD, 4 waitpokecry release diff --git a/data/scripts/maps/VerdanturfTown_Mart.inc b/data/scripts/maps/VerdanturfTown_Mart.inc index 4227dc8b1..db72de227 100644 --- a/data/scripts/maps/VerdanturfTown_Mart.inc +++ b/data/scripts/maps/VerdanturfTown_Mart.inc @@ -5,7 +5,7 @@ VerdanturfTown_Mart_EventScript_153EBC:: @ 8153EBC lock faceplayer message VerdanturfTown_Mart_Text_1A0BE4 - waittext + waitmessage pokemart VerdanturfTown_Mart_Items msgbox VerdanturfTown_Mart_Text_1A0C02, 4 release diff --git a/data/scripts/maps/VerdanturfTown_PokemonCenter_1F.inc b/data/scripts/maps/VerdanturfTown_PokemonCenter_1F.inc index e0fee3fb8..a0b1f87de 100644 --- a/data/scripts/maps/VerdanturfTown_PokemonCenter_1F.inc +++ b/data/scripts/maps/VerdanturfTown_PokemonCenter_1F.inc @@ -11,7 +11,7 @@ PacifidlogTown_PokemonCenter_1F_EventScript_153F18:: @ 8153F18 VerdanturfTown_PokemonCenter_1F_EventScript_153F18:: @ 8153F18 setvar 0x800b, 1 call VerdanturfTown_PokemonCenter_1F_EventScript_19FD5B - waittext + waitmessage waitbutton release end diff --git a/data/scripts/maps/VerdanturfTown_WandasHouse.inc b/data/scripts/maps/VerdanturfTown_WandasHouse.inc index 80bd6151d..fad64292b 100644 --- a/data/scripts/maps/VerdanturfTown_WandasHouse.inc +++ b/data/scripts/maps/VerdanturfTown_WandasHouse.inc @@ -5,7 +5,7 @@ VerdanturfTown_WandasHouse_EventScript_153F5B:: @ 8153F5B lock faceplayer checkflag 193 - jumpeq VerdanturfTown_WandasHouse_EventScript_153F73 + goto_if_eq VerdanturfTown_WandasHouse_EventScript_153F73 msgbox VerdanturfTown_WandasHouse_Text_1783F6, 4 setflag 193 release @@ -20,9 +20,9 @@ VerdanturfTown_WandasHouse_EventScript_153F7D:: @ 8153F7D lock faceplayer checkflag 126 - jumpeq VerdanturfTown_WandasHouse_EventScript_153FA5 + goto_if_eq VerdanturfTown_WandasHouse_EventScript_153FA5 checkflag 1213 - jumpeq VerdanturfTown_WandasHouse_EventScript_153F9B + goto_if_eq VerdanturfTown_WandasHouse_EventScript_153F9B msgbox VerdanturfTown_WandasHouse_Text_17859A, 4 release end @@ -45,9 +45,9 @@ VerdanturfTown_WandasHouse_EventScript_153FB8:: @ 8153FB8 lock faceplayer checkflag 1213 - jumpeq VerdanturfTown_WandasHouse_EventScript_153FE0 + goto_if_eq VerdanturfTown_WandasHouse_EventScript_153FE0 checkflag 190 - jumpeq VerdanturfTown_WandasHouse_EventScript_153FD6 + goto_if_eq VerdanturfTown_WandasHouse_EventScript_153FD6 msgbox VerdanturfTown_WandasHouse_Text_1787FB, 4 release end @@ -66,11 +66,11 @@ VerdanturfTown_WandasHouse_EventScript_153FEA:: @ 8153FEA lock faceplayer checkflag 126 - jumpeq VerdanturfTown_WandasHouse_EventScript_154025 + goto_if_eq VerdanturfTown_WandasHouse_EventScript_154025 checkflag 1213 - jumpeq VerdanturfTown_WandasHouse_EventScript_15401B + goto_if_eq VerdanturfTown_WandasHouse_EventScript_15401B checkflag 199 - jumpeq VerdanturfTown_WandasHouse_EventScript_154011 + goto_if_eq VerdanturfTown_WandasHouse_EventScript_154011 msgbox VerdanturfTown_WandasHouse_Text_1788B1, 4 release end diff --git a/data/scripts/maps/VictoryRoad_1F.inc b/data/scripts/maps/VictoryRoad_1F.inc index f64ca20ab..fe775d793 100644 --- a/data/scripts/maps/VictoryRoad_1F.inc +++ b/data/scripts/maps/VictoryRoad_1F.inc @@ -4,7 +4,7 @@ VictoryRoad_1F_MapScripts:: @ 815DE83 VictoryRoad_1F_MapScript1_15DE89:: @ 815DE89 checkflag 126 - callif 1, VictoryRoad_1F_EventScript_15DE93 + call_if 1, VictoryRoad_1F_EventScript_15DE93 end VictoryRoad_1F_EventScript_15DE93:: @ 815DE93 @@ -13,36 +13,36 @@ VictoryRoad_1F_EventScript_15DE93:: @ 815DE93 VictoryRoad_1F_EventScript_15DE97:: @ 815DE97 lockall - reappear 4 - move 4, VictoryRoad_1F_Movement_15DF07 - waitmove 0 - jump VictoryRoad_1F_EventScript_15DED3 + addobject 4 + applymovement 4, VictoryRoad_1F_Movement_15DF07 + waitmovement 0 + goto VictoryRoad_1F_EventScript_15DED3 end VictoryRoad_1F_EventScript_15DEAB:: @ 815DEAB lockall - reappear 4 - move 4, VictoryRoad_1F_Movement_15DF13 - waitmove 0 - jump VictoryRoad_1F_EventScript_15DED3 + addobject 4 + applymovement 4, VictoryRoad_1F_Movement_15DF13 + waitmovement 0 + goto VictoryRoad_1F_EventScript_15DED3 end VictoryRoad_1F_EventScript_15DEBF:: @ 815DEBF lockall - reappear 4 - move 4, VictoryRoad_1F_Movement_15DF1E - waitmove 0 - jump VictoryRoad_1F_EventScript_15DED3 + addobject 4 + applymovement 4, VictoryRoad_1F_Movement_15DF1E + waitmovement 0 + goto VictoryRoad_1F_EventScript_15DED3 end VictoryRoad_1F_EventScript_15DED3:: @ 815DED3 - move 255, VictoryRoad_1F_Movement_1A083F - waitmove 0 + applymovement 255, VictoryRoad_1F_Movement_1A083F + waitmovement 0 msgbox VictoryRoad_1F_Text_19782B, 4 trainerbattle 3, OPPONENT_WALLY_1, 0, VictoryRoad_1F_Text_197943 msgbox VictoryRoad_1F_Text_197967, 4 clearflag 858 - moveoffscreen 4 + moveobjectoffscreen 4 setflag 126 setvar 0x40c3, 1 releaseall @@ -93,9 +93,9 @@ VictoryRoad_1F_EventScript_15DF28:: @ 815DF28 VictoryRoad_1F_EventScript_15DF31:: @ 815DF31 trainerbattle 0, OPPONENT_WALLY_3, 0, VictoryRoad_1F_Text_1979BA, VictoryRoad_1F_Text_197A23 - specialval RESULT, sub_8082C68 + specialvar RESULT, sub_8082C68 compare RESULT, 1 - jumpeq VictoryRoad_1F_EventScript_15DF58 + goto_if_eq VictoryRoad_1F_EventScript_15DF58 msgbox VictoryRoad_1F_Text_197A47, 6 end diff --git a/data/scripts/mauville_man.inc b/data/scripts/mauville_man.inc index 997b5a31c..402afae23 100644 --- a/data/scripts/mauville_man.inc +++ b/data/scripts/mauville_man.inc @@ -27,20 +27,20 @@ SpeakToBard: faceplayer msgbox gTextBard_HiImTheBard, MSGBOX_YESNO compare RESULT, YES - jumpeq yes_hear_song + goto_if_eq yes_hear_song compare RESULT, NO - jumpeq dont_hear_song + goto_if_eq dont_hear_song end yes_hear_song: setvar 0x8004, 0 @ Give the player ear rape special ScrSpecial_PlayBardSong - pause 60 + delay 60 special ScrSpecial_HasBardSongBeenChanged compare RESULT, FALSE @ Prompt new lyrics only if song hasn't been changed - jumpeq prompt_write_lyrics + goto_if_eq prompt_write_lyrics msgbox gTextBard_OhWhatAMovingSong, 4 release end @@ -53,9 +53,9 @@ dont_hear_song: prompt_write_lyrics: msgbox gTextBard_SoHowDoYouLikeMySong, MSGBOX_YESNO compare RESULT, YES - jumpeq write_lyrics + goto_if_eq write_lyrics compare RESULT, NO - jumpeq dont_write_lyrics + goto_if_eq dont_write_lyrics end write_lyrics: @@ -64,15 +64,15 @@ write_lyrics: lock faceplayer compare RESULT, NO - jumpeq dont_write_lyrics + goto_if_eq dont_write_lyrics msgbox gTextBard_ThankYouKindly, 4 setvar 0x8004, 1 @ Give the player ear rape again special ScrSpecial_PlayBardSong - pause 60 + delay 60 msgbox gTextBard_WasThatHowYouWanted, MSGBOX_YESNO compare RESULT, NO - jumpeq write_lyrics @ Keep looping until player responds YES + goto_if_eq write_lyrics @ Keep looping until player responds YES special ScrSpecial_SaveBardSongLyrics msgbox gTextBard_OkayThatsIt, 4 release @@ -95,7 +95,7 @@ SpeakToHipster: msgbox gTextHipster_TheyCallMeTheHipster, 4 special ScrSpecial_GetHipsterSpokenFlag compare RESULT, FALSE - jumpeq hipster_first_time + goto_if_eq hipster_first_time msgbox gTextHipster_TaughtYouAlready, 4 release end @@ -103,7 +103,7 @@ SpeakToHipster: hipster_first_time: special ScrSpecial_HipsterTeachWord compare RESULT, TRUE @ TRUE if player learned a new word - jumpeq teach_new_word + goto_if_eq teach_new_word msgbox gTextHipster_YouAlreadyKnowALot, 4 release end @@ -126,13 +126,13 @@ SpeakToTrader: faceplayer msgbox gTextTrader_Introduction, MSGBOX_YESNO compare RESULT, NO - jumpeq dont_want_to_trade + goto_if_eq dont_want_to_trade special ScrSpecial_GetTraderTradedFlag compare RESULT, TRUE - jumpeq already_traded + goto_if_eq already_traded message gTextTrader_MenuPrompt - waittext - jump do_trader_menu_get + waitmessage + goto do_trader_menu_get end dont_want_to_trade: @@ -147,16 +147,16 @@ do_trader_menu_get: special ScrSpecial_TraderMenuGetDecoration waitstate compare 0x8004, 0 - jumpeq cancelled_get_menu + goto_if_eq cancelled_get_menu compare 0x8004, 65535 - jumpeq rare_item_cant_trade_away + goto_if_eq rare_item_cant_trade_away msgbox gTextTrader_ItemOnceBelongedTo, MSGBOX_YESNO compare RESULT, NO - jumpeq dont_want_item + goto_if_eq dont_want_item special ScrSpecial_DoesPlayerHaveNoDecorations compare RESULT, TRUE - jumpeq player_has_no_decorations - jump do_trader_menu_give + goto_if_eq player_has_no_decorations + goto do_trader_menu_give end cancelled_get_menu: @@ -165,14 +165,14 @@ cancelled_get_menu: rare_item_cant_trade_away: message gTextTrader_ICantTradeThatOneAway - waittext - jump do_trader_menu_get + waitmessage + goto do_trader_menu_get end dont_want_item: message gTextTrader_MenuPrompt - waittext - jump do_trader_menu_get + waitmessage + goto do_trader_menu_get end player_has_no_decorations: @@ -184,15 +184,15 @@ do_trader_menu_give: special ScrSpecial_TraderMenuGiveDecoration waitstate compare 0x8006, 0 - jumpeq cancelled_give_menu + goto_if_eq cancelled_give_menu compare 0x8006, 65535 - jumpeq decoration_is_in_use + goto_if_eq decoration_is_in_use special ScrSpecial_IsDecorationFull compare RESULT, 1 - jumpeq decorations_full + goto_if_eq decorations_full msgbox gTextTrader_SoWellTrade, MSGBOX_YESNO compare RESULT, NO - jumpeq do_trader_menu_give + goto_if_eq do_trader_menu_give special ScrSpecial_TraderDoDecorationTrade msgbox gTextTrader_ThenWellTrade, 2 end @@ -203,7 +203,7 @@ cancelled_give_menu: decoration_is_in_use: msgbox gTextTrader_InUseYouCantTradeIt, 4 - jump do_trader_menu_give + goto do_trader_menu_give end decorations_full: @@ -226,71 +226,71 @@ SpeakToStoryteller: faceplayer msgbox gTextStoryteller_Introduction, MSGBOX_YESNO compare RESULT, NO - jumpeq dont_hear_story - specialval RESULT, ScrSpecial_StorytellerGetFreeStorySlot + goto_if_eq dont_hear_story + specialvar RESULT, ScrSpecial_StorytellerGetFreeStorySlot compare RESULT, 0 @ If slot is 0, then the list is empty - jumpeq no_stories_recorded + goto_if_eq no_stories_recorded choose_story: message gTextStoryteller_WhichTale - waittext + waitmessage special ScrSpecial_StorytellerStoryListMenu waitstate compare RESULT, FALSE - jumpeq cancel_story_menu + goto_if_eq cancel_story_menu setvar 0x8008, 1 special ScrSpecial_StorytellerDisplayStory - waittext + waitmessage waitbutton - specialval RESULT, ScrSpecial_StorytellerUpdateStat + specialvar RESULT, ScrSpecial_StorytellerUpdateStat compare RESULT, FALSE - jumpeq no_stat_update - jump stat_update + goto_if_eq no_stat_update + goto stat_update cancel_story_menu: compare 0x8008, 0 - jumpeq dont_hear_story - jump yes_hear_story + goto_if_eq dont_hear_story + goto yes_hear_story no_stat_update: msgbox gTextStoryteller_CouldThereBeOtherTrainers, 4 msgbox gTextStoryteller_HearAnotherLegendaryTale, MSGBOX_YESNO compare RESULT, YES - jumpeq choose_story + goto_if_eq choose_story yes_hear_story: - specialval RESULT, ScrSpecial_HasStorytellerAlreadyRecorded + specialvar RESULT, ScrSpecial_HasStorytellerAlreadyRecorded compare RESULT, TRUE - jumpeq cant_record_story @ already recorded story - specialval RESULT, ScrSpecial_StorytellerGetFreeStorySlot + goto_if_eq cant_record_story @ already recorded story + specialvar RESULT, ScrSpecial_StorytellerGetFreeStorySlot compare RESULT, 4 - jumpeq cant_record_story @ story list is full - jump prompt_record_story + goto_if_eq cant_record_story @ story list is full + goto prompt_record_story no_stories_recorded: msgbox gTextStoryteller_ButIKnowOfNoLegendaryTrainers, 4 prompt_record_story: msgbox gTextStoryteller_HaveYouAnyTales, MSGBOX_YESNO compare RESULT, NO - jumpeq dont_hear_story - specialval RESULT, ScrSpecial_StorytellerInitializeRandomStat + goto_if_eq dont_hear_story + specialvar RESULT, ScrSpecial_StorytellerInitializeRandomStat compare RESULT, TRUE - jumpeq stat_update + goto_if_eq stat_update msgbox gTextStoryteller_ImNotSatisfied, 4 - closebutton + closemessage release end stat_update: msgbox gTextStoryteller_BirthOfANewLegend, 4 - closebutton + closemessage release end dont_hear_story: msgbox gTextStoryteller_OhIFeelStifled, 4 - closebutton + closemessage release end cant_record_story: msgbox gTextStoryteller_WishMorePeopleWould, 4 - closebutton + closemessage release end @@ -306,41 +306,41 @@ SpeakToGiddy: faceplayer msgbox gTextGiddy_Introduction, MSGBOX_YESNO compare RESULT, YES - jumpeq yes_hear_giddy + goto_if_eq yes_hear_giddy compare RESULT, NO - jumpeq dont_hear_giddy + goto_if_eq dont_hear_giddy end yes_hear_giddy: special ScrSpecial_GiddyShouldTellAnotherTale compare RESULT, TRUE - jumpeq tell_giddy_tale + goto_if_eq tell_giddy_tale compare RESULT, FALSE - jumpeq bye_bye + goto_if_eq bye_bye end tell_another_giddy_tale: special ScrSpecial_GiddyShouldTellAnotherTale compare RESULT, TRUE - jumpeq also_i_was_thinking + goto_if_eq also_i_was_thinking compare RESULT, FALSE - jumpeq bye_bye + goto_if_eq bye_bye end also_i_was_thinking: msgbox gTextGiddy_AlsoIWasThinking, 4 - jump tell_giddy_tale + goto tell_giddy_tale end tell_giddy_tale: special ScrSpecial_GenerateGiddyLine special ShowFieldMessageStringVar4 - waittext + waitmessage yesnobox 20, 8 compare RESULT, 1 - jumpeq tell_another_giddy_tale + goto_if_eq tell_another_giddy_tale compare RESULT, 0 - jumpeq tell_another_giddy_tale + goto_if_eq tell_another_giddy_tale end dont_hear_giddy: diff --git a/data/scripts/mystery_event_club.inc b/data/scripts/mystery_event_club.inc index 5fd68beca..df097fc19 100644 --- a/data/scripts/mystery_event_club.inc +++ b/data/scripts/mystery_event_club.inc @@ -2,9 +2,9 @@ PetalburgCity_PokemonCenter_1F_EventScript_1B1B14:: @ 81B1B14 lock faceplayer checkflag 2053 - jumpeq PetalburgCity_PokemonCenter_1F_EventScript_1B1BDB + goto_if_eq PetalburgCity_PokemonCenter_1F_EventScript_1B1BDB msgbox PetalburgCity_PokemonCenter_1F_Text_1B1C97, 4 - jump PetalburgCity_PokemonCenter_1F_EventScript_1B1B2D + goto PetalburgCity_PokemonCenter_1F_EventScript_1B1B2D end PetalburgCity_PokemonCenter_1F_EventScript_1B1B2D:: @ 81B1B2D @@ -19,22 +19,22 @@ PetalburgCity_PokemonCenter_1F_EventScript_1B1B2D:: @ 81B1B2D PetalburgCity_PokemonCenter_1F_EventScript_1B1B6C:: @ 81B1B6C msgbox PetalburgCity_PokemonCenter_1F_Text_1B1D3A, 4 - jump PetalburgCity_PokemonCenter_1F_EventScript_1B1B2D + goto PetalburgCity_PokemonCenter_1F_EventScript_1B1B2D end PetalburgCity_PokemonCenter_1F_EventScript_1B1B7A:: @ 81B1B7A msgbox PetalburgCity_PokemonCenter_1F_Text_1B1F7B, 4 - closebutton + closemessage setvar 0x8004, 0 call PetalburgCity_PokemonCenter_1F_EventScript_1A00F3 lock faceplayer compare 0x8004, 1 - callif 1, PetalburgCity_PokemonCenter_1F_EventScript_1B1C77 + call_if 1, PetalburgCity_PokemonCenter_1F_EventScript_1B1C77 compare RESULT, 0 - jumpeq PetalburgCity_PokemonCenter_1F_EventScript_1B1BB1 + goto_if_eq PetalburgCity_PokemonCenter_1F_EventScript_1B1BB1 compare RESULT, 1 - jumpeq PetalburgCity_PokemonCenter_1F_EventScript_1B1BBB + goto_if_eq PetalburgCity_PokemonCenter_1F_EventScript_1B1BBB end PetalburgCity_PokemonCenter_1F_EventScript_1B1BB1:: @ 81B1BB1 @@ -45,8 +45,8 @@ PetalburgCity_PokemonCenter_1F_EventScript_1B1BB1:: @ 81B1BB1 PetalburgCity_PokemonCenter_1F_EventScript_1B1BBB:: @ 81B1BBB setvar 0x8004, 0 special sub_80EB7C4 - waittext - pause 80 + waitmessage + delay 80 msgbox PetalburgCity_PokemonCenter_1F_Text_1B2137, 4 release end @@ -58,7 +58,7 @@ PetalburgCity_PokemonCenter_1F_EventScript_1B1BD1:: @ 81B1BD1 PetalburgCity_PokemonCenter_1F_EventScript_1B1BDB:: @ 81B1BDB msgbox PetalburgCity_PokemonCenter_1F_Text_1B202F, 4 - jump PetalburgCity_PokemonCenter_1F_EventScript_1B1BE9 + goto PetalburgCity_PokemonCenter_1F_EventScript_1B1BE9 end PetalburgCity_PokemonCenter_1F_EventScript_1B1BE9:: @ 81B1BE9 @@ -73,22 +73,22 @@ PetalburgCity_PokemonCenter_1F_EventScript_1B1BE9:: @ 81B1BE9 PetalburgCity_PokemonCenter_1F_EventScript_1B1C28:: @ 81B1C28 msgbox PetalburgCity_PokemonCenter_1F_Text_1B1D3A, 4 - jump PetalburgCity_PokemonCenter_1F_EventScript_1B1BE9 + goto PetalburgCity_PokemonCenter_1F_EventScript_1B1BE9 end PetalburgCity_PokemonCenter_1F_EventScript_1B1C36:: @ 81B1C36 msgbox PetalburgCity_PokemonCenter_1F_Text_1B207F, 4 - closebutton + closemessage setvar 0x8004, 0 call PetalburgCity_PokemonCenter_1F_EventScript_1A00F3 lock faceplayer compare 0x8004, 1 - callif 1, PetalburgCity_PokemonCenter_1F_EventScript_1B1C77 + call_if 1, PetalburgCity_PokemonCenter_1F_EventScript_1B1C77 compare RESULT, 0 - jumpeq PetalburgCity_PokemonCenter_1F_EventScript_1B1BB1 + goto_if_eq PetalburgCity_PokemonCenter_1F_EventScript_1B1BB1 compare RESULT, 1 - jumpeq PetalburgCity_PokemonCenter_1F_EventScript_1B1BBB + goto_if_eq PetalburgCity_PokemonCenter_1F_EventScript_1B1BBB end PetalburgCity_PokemonCenter_1F_EventScript_1B1C6D:: @ 81B1C6D @@ -98,9 +98,9 @@ PetalburgCity_PokemonCenter_1F_EventScript_1B1C6D:: @ 81B1C6D PetalburgCity_PokemonCenter_1F_EventScript_1B1C77:: @ 81B1C77 checkflag 2059 - jumpif 0, PetalburgCity_PokemonCenter_1F_EventScript_1B1C96 + goto_if 0, PetalburgCity_PokemonCenter_1F_EventScript_1B1C96 checkflag 2124 - jumpeq PetalburgCity_PokemonCenter_1F_EventScript_1B1C96 + goto_if_eq PetalburgCity_PokemonCenter_1F_EventScript_1B1C96 setflag 2124 msgbox PetalburgCity_PokemonCenter_1F_Text_1B21CC, 3 release diff --git a/data/scripts/players_house.inc b/data/scripts/players_house.inc index e9f379b24..69a4dc3e9 100644 --- a/data/scripts/players_house.inc +++ b/data/scripts/players_house.inc @@ -6,29 +6,29 @@ LittlerootTown_MaysHouse_2F_EventScript_1B6950:: @ 81B6950 LittlerootTown_BrendansHouse_1F_EventScript_1B6956:: @ 81B6956 LittlerootTown_MaysHouse_1F_EventScript_1B6956:: @ 81B6956 msgbox LittlerootTown_BrendansHouse_1F_Text_172429, 4 - move 0x8004, LittlerootTown_BrendansHouse_1F_Movement_1A0839 - waitmove 0 + applymovement 0x8004, LittlerootTown_BrendansHouse_1F_Movement_1A0839 + waitmovement 0 compare 0x8005, 0 - callif 1, LittlerootTown_BrendansHouse_1F_EventScript_1B699F + call_if 1, LittlerootTown_BrendansHouse_1F_EventScript_1B699F compare 0x8005, 1 - callif 1, LittlerootTown_BrendansHouse_1F_EventScript_1B69AA + call_if 1, LittlerootTown_BrendansHouse_1F_EventScript_1B69AA msgbox LittlerootTown_BrendansHouse_1F_Text_172453, 4 - closebutton + closemessage setvar 0x4092, 4 - move 255, LittlerootTown_BrendansHouse_1F_Movement_1B69B5 - move 0x8004, LittlerootTown_BrendansHouse_1F_Movement_1A0841 - waitmove 0 + applymovement 255, LittlerootTown_BrendansHouse_1F_Movement_1B69B5 + applymovement 0x8004, LittlerootTown_BrendansHouse_1F_Movement_1A0841 + waitmovement 0 releaseall end LittlerootTown_BrendansHouse_1F_EventScript_1B699F:: @ 81B699F - move 255, LittlerootTown_BrendansHouse_1F_Movement_1A0843 - waitmove 0 + applymovement 255, LittlerootTown_BrendansHouse_1F_Movement_1A0843 + waitmovement 0 return LittlerootTown_BrendansHouse_1F_EventScript_1B69AA:: @ 81B69AA - move 255, LittlerootTown_BrendansHouse_1F_Movement_1A083F - waitmove 0 + applymovement 255, LittlerootTown_BrendansHouse_1F_Movement_1A083F + waitmovement 0 return LittlerootTown_BrendansHouse_1F_Movement_1B69B5:: @ 81B69B5 @@ -38,74 +38,74 @@ LittlerootTown_BrendansHouse_1F_Movement_1B69B5:: @ 81B69B5 LittlerootTown_BrendansHouse_1F_EventScript_1B69B7:: @ 81B69B7 LittlerootTown_MaysHouse_1F_EventScript_1B69B7:: @ 81B69B7 msgbox LittlerootTown_BrendansHouse_1F_Text_172531, 4 - closebutton - move 0x8004, LittlerootTown_BrendansHouse_1F_Movement_1A0841 - move 255, LittlerootTown_BrendansHouse_1F_Movement_1B6CDC - waitmove 0 + closemessage + applymovement 0x8004, LittlerootTown_BrendansHouse_1F_Movement_1A0841 + applymovement 255, LittlerootTown_BrendansHouse_1F_Movement_1B6CDC + waitmovement 0 releaseall end LittlerootTown_BrendansHouse_2F_EventScript_1B69D3:: @ 81B69D3 lockall setvar 0x8004, 0 - jump LittlerootTown_BrendansHouse_2F_EventScript_1B69EB + goto LittlerootTown_BrendansHouse_2F_EventScript_1B69EB end LittlerootTown_MaysHouse_2F_EventScript_1B69DF:: @ 81B69DF lockall setvar 0x8004, 1 - jump LittlerootTown_MaysHouse_2F_EventScript_1B69EB + goto LittlerootTown_MaysHouse_2F_EventScript_1B69EB end LittlerootTown_BrendansHouse_2F_EventScript_1B69EB:: @ 81B69EB LittlerootTown_MaysHouse_2F_EventScript_1B69EB:: @ 81B69EB checkflag 81 - jumpeq LittlerootTown_BrendansHouse_2F_EventScript_1B6A91 + goto_if_eq LittlerootTown_BrendansHouse_2F_EventScript_1B6A91 msgbox LittlerootTown_BrendansHouse_2F_Text_172E18, 4 call LittlerootTown_BrendansHouse_2F_EventScript_1B6A9B - pause 30 + delay 30 setvar 0x4092, 6 setflag 81 setflag 754 setflag 755 - checkgender + checkplayergender compare RESULT, 0 - callif 1, LittlerootTown_BrendansHouse_2F_EventScript_1B6A31 + call_if 1, LittlerootTown_BrendansHouse_2F_EventScript_1B6A31 compare RESULT, 1 - callif 1, LittlerootTown_BrendansHouse_2F_EventScript_1B6A61 - playsfx 9 - disappear 0x8008 + call_if 1, LittlerootTown_BrendansHouse_2F_EventScript_1B6A61 + playse 9 + removeobject 0x8008 releaseall end LittlerootTown_BrendansHouse_2F_EventScript_1B6A31:: @ 81B6A31 setvar 0x8008, 14 - reappear 0x8008 - move 0x8008, LittlerootTown_BrendansHouse_2F_Movement_1B6AA2 - waitmove 0 - move 255, LittlerootTown_BrendansHouse_2F_Movement_1A0843 - waitmove 0 + addobject 0x8008 + applymovement 0x8008, LittlerootTown_BrendansHouse_2F_Movement_1B6AA2 + waitmovement 0 + applymovement 255, LittlerootTown_BrendansHouse_2F_Movement_1A0843 + waitmovement 0 msgbox LittlerootTown_BrendansHouse_2F_Text_172E4C, 4 - closebutton - move 0x8008, LittlerootTown_BrendansHouse_2F_Movement_1B6AA9 - waitmove 0 + closemessage + applymovement 0x8008, LittlerootTown_BrendansHouse_2F_Movement_1B6AA9 + waitmovement 0 return LittlerootTown_BrendansHouse_2F_EventScript_1B6A61:: @ 81B6A61 setvar 0x8008, 14 - reappear 0x8008 - move 0x8008, LittlerootTown_BrendansHouse_2F_Movement_1B6AAD - waitmove 0 - move 255, LittlerootTown_BrendansHouse_2F_Movement_1A083F - waitmove 0 + addobject 0x8008 + applymovement 0x8008, LittlerootTown_BrendansHouse_2F_Movement_1B6AAD + waitmovement 0 + applymovement 255, LittlerootTown_BrendansHouse_2F_Movement_1A083F + waitmovement 0 msgbox LittlerootTown_BrendansHouse_2F_Text_172E4C, 4 - closebutton - move 0x8008, LittlerootTown_BrendansHouse_2F_Movement_1B6AB4 - waitmove 0 + closemessage + applymovement 0x8008, LittlerootTown_BrendansHouse_2F_Movement_1B6AB4 + waitmovement 0 return LittlerootTown_BrendansHouse_2F_EventScript_1B6A91:: @ 81B6A91 - inccounter GAME_STAT_CHECKED_CLOCK + incrementgamestat GAME_STAT_CHECKED_CLOCK fadescreen 1 special ScrSpecial_ViewWallClock waitstate @@ -155,75 +155,75 @@ LittlerootTown_MaysHouse_1F_EventScript_1B6AB8:: @ 81B6AB8 end LittlerootTown_BrendansHouse_1F_EventScript_1B6ABF:: @ 81B6ABF - move 0x8005, LittlerootTown_BrendansHouse_1F_Movement_1A0843 - waitmove 0 + applymovement 0x8005, LittlerootTown_BrendansHouse_1F_Movement_1A0843 + waitmovement 0 call LittlerootTown_BrendansHouse_1F_EventScript_1B6B9D - move 255, LittlerootTown_BrendansHouse_1F_Movement_1B6CCC - waitmove 0 - playmusic 453, 0 + applymovement 255, LittlerootTown_BrendansHouse_1F_Movement_1B6CCC + waitmovement 0 + playbgm 453, 0 msgbox LittlerootTown_BrendansHouse_1F_Text_1725C9, 4 - closebutton - move 0x8005, LittlerootTown_BrendansHouse_1F_Movement_1B6BDB - waitmove 0 - move 255, LittlerootTown_BrendansHouse_1F_Movement_1B6CD2 - waitmove 0 + closemessage + applymovement 0x8005, LittlerootTown_BrendansHouse_1F_Movement_1B6BDB + waitmovement 0 + applymovement 255, LittlerootTown_BrendansHouse_1F_Movement_1B6CD2 + waitmovement 0 call LittlerootTown_BrendansHouse_1F_EventScript_1B6BBE - move 255, LittlerootTown_BrendansHouse_1F_Movement_1A083F - waitmove 0 + applymovement 255, LittlerootTown_BrendansHouse_1F_Movement_1A083F + waitmovement 0 msgbox LittlerootTown_BrendansHouse_1F_Text_1725FE, 4 msgbox LittlerootTown_BrendansHouse_1F_Text_172644, 4 - closebutton + closemessage setvar 0x4001, 1 - move 0x8005, LittlerootTown_BrendansHouse_1F_Movement_1B6BE1 - waitmove 0 - jump LittlerootTown_BrendansHouse_1F_EventScript_1B6AB8 + applymovement 0x8005, LittlerootTown_BrendansHouse_1F_Movement_1B6BE1 + waitmovement 0 + goto LittlerootTown_BrendansHouse_1F_EventScript_1B6AB8 end LittlerootTown_MaysHouse_1F_EventScript_1B6B2E:: @ 81B6B2E - move 0x8005, LittlerootTown_MaysHouse_1F_Movement_1A083F - waitmove 0 + applymovement 0x8005, LittlerootTown_MaysHouse_1F_Movement_1A083F + waitmovement 0 call LittlerootTown_MaysHouse_1F_EventScript_1B6B9D - move 255, LittlerootTown_MaysHouse_1F_Movement_1B6CD4 - waitmove 0 - playmusic 453, 0 + applymovement 255, LittlerootTown_MaysHouse_1F_Movement_1B6CD4 + waitmovement 0 + playbgm 453, 0 msgbox LittlerootTown_MaysHouse_1F_Text_1725C9, 4 - closebutton - move 0x8005, LittlerootTown_MaysHouse_1F_Movement_1B6BDE - waitmove 0 - move 255, LittlerootTown_MaysHouse_1F_Movement_1B6CDA - waitmove 0 + closemessage + applymovement 0x8005, LittlerootTown_MaysHouse_1F_Movement_1B6BDE + waitmovement 0 + applymovement 255, LittlerootTown_MaysHouse_1F_Movement_1B6CDA + waitmovement 0 call LittlerootTown_MaysHouse_1F_EventScript_1B6BBE - move 255, LittlerootTown_MaysHouse_1F_Movement_1A0843 - waitmove 0 + applymovement 255, LittlerootTown_MaysHouse_1F_Movement_1A0843 + waitmovement 0 msgbox LittlerootTown_MaysHouse_1F_Text_1725FE, 4 msgbox LittlerootTown_MaysHouse_1F_Text_172644, 4 - closebutton + closemessage setvar 0x4001, 1 - move 0x8005, LittlerootTown_MaysHouse_1F_Movement_1B6BE5 - waitmove 0 - jump LittlerootTown_MaysHouse_1F_EventScript_1B6AB8 + applymovement 0x8005, LittlerootTown_MaysHouse_1F_Movement_1B6BE5 + waitmovement 0 + goto LittlerootTown_MaysHouse_1F_EventScript_1B6AB8 end LittlerootTown_BrendansHouse_1F_EventScript_1B6B9D:: @ 81B6B9D LittlerootTown_MaysHouse_1F_EventScript_1B6B9D:: @ 81B6B9D - playsfx 21 - move 0x8005, LittlerootTown_BrendansHouse_1F_Movement_1A0833 - waitmove 0 - move 0x8005, LittlerootTown_BrendansHouse_1F_Movement_1A0835 - waitmove 0 + playse 21 + applymovement 0x8005, LittlerootTown_BrendansHouse_1F_Movement_1A0833 + waitmovement 0 + applymovement 0x8005, LittlerootTown_BrendansHouse_1F_Movement_1A0835 + waitmovement 0 msgbox LittlerootTown_BrendansHouse_1F_Text_1725A3, 4 - closebutton + closemessage return LittlerootTown_BrendansHouse_1F_EventScript_1B6BBE:: @ 81B6BBE LittlerootTown_MaysHouse_1F_EventScript_1B6BBE:: @ 81B6BBE - move 255, LittlerootTown_BrendansHouse_1F_Movement_1A0841 - waitmove 0 + applymovement 255, LittlerootTown_BrendansHouse_1F_Movement_1A0841 + waitmovement 0 msgbox LittlerootTown_BrendansHouse_1F_Text_172841, 4 - fadedefault + fadedefaultbgm special TurnOffTVScreen setflag 2096 - pause 35 + delay 35 return LittlerootTown_BrendansHouse_1F_Movement_1B6BDB:: @ 81B6BDB @@ -253,17 +253,17 @@ LittlerootTown_MaysHouse_1F_EventScript_1B6BE9:: @ 81B6BE9 lock faceplayer compare 0x4082, 4 - jumpeq LittlerootTown_BrendansHouse_1F_EventScript_1B6C33 + goto_if_eq LittlerootTown_BrendansHouse_1F_EventScript_1B6C33 compare 0x408c, 4 - jumpeq LittlerootTown_BrendansHouse_1F_EventScript_1B6C33 + goto_if_eq LittlerootTown_BrendansHouse_1F_EventScript_1B6C33 checkflag 2059 - jumpeq LittlerootTown_BrendansHouse_1F_EventScript_1B6C3D + goto_if_eq LittlerootTown_BrendansHouse_1F_EventScript_1B6C3D checkflag 82 - jumpeq LittlerootTown_BrendansHouse_1F_EventScript_1B6C72 + goto_if_eq LittlerootTown_BrendansHouse_1F_EventScript_1B6C72 compare 0x4001, 1 - jumpeq LittlerootTown_BrendansHouse_1F_EventScript_1B6C80 + goto_if_eq LittlerootTown_BrendansHouse_1F_EventScript_1B6C80 compare 0x4092, 7 - jumpif 4, LittlerootTown_BrendansHouse_1F_EventScript_1B6C9C + goto_if 4, LittlerootTown_BrendansHouse_1F_EventScript_1B6C9C msgbox LittlerootTown_BrendansHouse_1F_Text_172429, 4 release end @@ -275,11 +275,11 @@ LittlerootTown_BrendansHouse_1F_EventScript_1B6C33:: @ 81B6C33 LittlerootTown_BrendansHouse_1F_EventScript_1B6C3D:: @ 81B6C3D checkflag 133 - jumpeq LittlerootTown_BrendansHouse_1F_EventScript_1B6C72 + goto_if_eq LittlerootTown_BrendansHouse_1F_EventScript_1B6C72 msgbox LittlerootTown_BrendansHouse_1F_Text_172782, 4 giveitem ITEM_AMULET_COIN compare RESULT, 0 - jumpeq LittlerootTown_BrendansHouse_1F_EventScript_1A029B + goto_if_eq LittlerootTown_BrendansHouse_1F_EventScript_1A029B msgbox LittlerootTown_BrendansHouse_1F_Text_1727CD, 4 setflag 133 release @@ -287,7 +287,7 @@ LittlerootTown_BrendansHouse_1F_EventScript_1B6C3D:: @ 81B6C3D LittlerootTown_BrendansHouse_1F_EventScript_1B6C72:: @ 81B6C72 msgbox LittlerootTown_BrendansHouse_1F_Text_172717, 4 - jump LittlerootTown_BrendansHouse_1F_EventScript_1B6C8A + goto LittlerootTown_BrendansHouse_1F_EventScript_1B6C8A end LittlerootTown_BrendansHouse_1F_EventScript_1B6C80:: @ 81B6C80 @@ -296,9 +296,9 @@ LittlerootTown_BrendansHouse_1F_EventScript_1B6C80:: @ 81B6C80 end LittlerootTown_BrendansHouse_1F_EventScript_1B6C8A:: @ 81B6C8A - closebutton + closemessage call LittlerootTown_BrendansHouse_1F_EventScript_1A02CA - inccounter GAME_STAT_RESTED_AT_HOME + incrementgamestat GAME_STAT_RESTED_AT_HOME msgbox LittlerootTown_BrendansHouse_1F_Text_17276B, 4 release end @@ -312,8 +312,8 @@ LittlerootTown_BrendansHouse_1F_EventScript_1B6CA6:: @ 81B6CA6 LittlerootTown_MaysHouse_1F_EventScript_1B6CA6:: @ 81B6CA6 lock faceplayer - checksound - pokecry SPECIES_MACHOKE, 0 + waitse + playpokecry SPECIES_MACHOKE, 0 msgbox LittlerootTown_BrendansHouse_1F_Text_17281D, 4 waitpokecry release @@ -323,8 +323,8 @@ LittlerootTown_BrendansHouse_1F_EventScript_1B6CB9:: @ 81B6CB9 LittlerootTown_MaysHouse_1F_EventScript_1B6CB9:: @ 81B6CB9 lock faceplayer - checksound - pokecry SPECIES_MACHOKE, 0 + waitse + playpokecry SPECIES_MACHOKE, 0 msgbox LittlerootTown_BrendansHouse_1F_Text_172831, 4 waitpokecry release @@ -361,43 +361,43 @@ LittlerootTown_BrendansHouse_1F_Movement_1B6CDC:: @ 81B6CDC LittlerootTown_BrendansHouse_1F_EventScript_1B6CDE:: @ 81B6CDE LittlerootTown_MaysHouse_1F_EventScript_1B6CDE:: @ 81B6CDE lockall - checkgender + checkplayergender compare RESULT, 0 - callif 1, LittlerootTown_BrendansHouse_1F_EventScript_1B6DAD + call_if 1, LittlerootTown_BrendansHouse_1F_EventScript_1B6DAD compare RESULT, 1 - callif 1, LittlerootTown_BrendansHouse_1F_EventScript_1B6DBD + call_if 1, LittlerootTown_BrendansHouse_1F_EventScript_1B6DBD compare 0x8008, 0 - callif 1, LittlerootTown_BrendansHouse_1F_EventScript_1B6E1D + call_if 1, LittlerootTown_BrendansHouse_1F_EventScript_1B6E1D compare 0x8008, 1 - callif 1, LittlerootTown_BrendansHouse_1F_EventScript_1B6E28 - move 0x8009, LittlerootTown_BrendansHouse_1F_Movement_1A0839 - waitmove 0 - playsfx 21 - move 0x8009, LittlerootTown_BrendansHouse_1F_Movement_1A0833 - waitmove 0 - move 0x8009, LittlerootTown_BrendansHouse_1F_Movement_1A0835 - waitmove 0 - pause 20 + call_if 1, LittlerootTown_BrendansHouse_1F_EventScript_1B6E28 + applymovement 0x8009, LittlerootTown_BrendansHouse_1F_Movement_1A0839 + waitmovement 0 + playse 21 + applymovement 0x8009, LittlerootTown_BrendansHouse_1F_Movement_1A0833 + waitmovement 0 + applymovement 0x8009, LittlerootTown_BrendansHouse_1F_Movement_1A0835 + waitmovement 0 + delay 20 compare 0x8008, 0 - callif 1, LittlerootTown_BrendansHouse_1F_EventScript_1B6DCD + call_if 1, LittlerootTown_BrendansHouse_1F_EventScript_1B6DCD compare 0x8008, 1 - callif 1, LittlerootTown_BrendansHouse_1F_EventScript_1B6DD8 + call_if 1, LittlerootTown_BrendansHouse_1F_EventScript_1B6DD8 msgbox LittlerootTown_BrendansHouse_1F_Text_17298B, 4 giveitem ITEM_SS_TICKET msgbox LittlerootTown_BrendansHouse_1F_Text_172A7D, 4 - closebutton + closemessage compare 0x8008, 0 - callif 1, LittlerootTown_BrendansHouse_1F_EventScript_1B6DE3 + call_if 1, LittlerootTown_BrendansHouse_1F_EventScript_1B6DE3 compare 0x8008, 1 - callif 1, LittlerootTown_BrendansHouse_1F_EventScript_1B6DEE + call_if 1, LittlerootTown_BrendansHouse_1F_EventScript_1B6DEE msgbox LittlerootTown_BrendansHouse_1F_Text_172B5E, 4 - closebutton + closemessage compare 0x8008, 0 - callif 1, LittlerootTown_BrendansHouse_1F_EventScript_1B6DF9 + call_if 1, LittlerootTown_BrendansHouse_1F_EventScript_1B6DF9 compare 0x8008, 1 - callif 1, LittlerootTown_BrendansHouse_1F_EventScript_1B6E0B - playsfx 8 - disappear 0x8009 + call_if 1, LittlerootTown_BrendansHouse_1F_EventScript_1B6E0B + playse 8 + removeobject 0x8009 setflag 291 setvar 0x4082, 4 setvar 0x408c, 4 @@ -417,45 +417,45 @@ LittlerootTown_BrendansHouse_1F_EventScript_1B6DBD:: @ 81B6DBD return LittlerootTown_BrendansHouse_1F_EventScript_1B6DCD:: @ 81B6DCD - move 0x8009, LittlerootTown_BrendansHouse_1F_Movement_1B6E33 - waitmove 0 + applymovement 0x8009, LittlerootTown_BrendansHouse_1F_Movement_1B6E33 + waitmovement 0 return LittlerootTown_BrendansHouse_1F_EventScript_1B6DD8:: @ 81B6DD8 - move 0x8009, LittlerootTown_BrendansHouse_1F_Movement_1B6E36 - waitmove 0 + applymovement 0x8009, LittlerootTown_BrendansHouse_1F_Movement_1B6E36 + waitmovement 0 return LittlerootTown_BrendansHouse_1F_EventScript_1B6DE3:: @ 81B6DE3 - move 0x8009, LittlerootTown_BrendansHouse_1F_Movement_1B6E39 - waitmove 0 + applymovement 0x8009, LittlerootTown_BrendansHouse_1F_Movement_1B6E39 + waitmovement 0 return LittlerootTown_BrendansHouse_1F_EventScript_1B6DEE:: @ 81B6DEE - move 0x8009, LittlerootTown_BrendansHouse_1F_Movement_1B6E3B - waitmove 0 + applymovement 0x8009, LittlerootTown_BrendansHouse_1F_Movement_1B6E3B + waitmovement 0 return LittlerootTown_BrendansHouse_1F_EventScript_1B6DF9:: @ 81B6DF9 - move 255, LittlerootTown_BrendansHouse_1F_Movement_1B6E4F - move 0x8009, LittlerootTown_BrendansHouse_1F_Movement_1B6E3D - waitmove 0 + applymovement 255, LittlerootTown_BrendansHouse_1F_Movement_1B6E4F + applymovement 0x8009, LittlerootTown_BrendansHouse_1F_Movement_1B6E3D + waitmovement 0 return LittlerootTown_BrendansHouse_1F_EventScript_1B6E0B:: @ 81B6E0B - move 255, LittlerootTown_BrendansHouse_1F_Movement_1B6E4F - move 0x8009, LittlerootTown_BrendansHouse_1F_Movement_1B6E43 - waitmove 0 + applymovement 255, LittlerootTown_BrendansHouse_1F_Movement_1B6E4F + applymovement 0x8009, LittlerootTown_BrendansHouse_1F_Movement_1B6E43 + waitmovement 0 return LittlerootTown_BrendansHouse_1F_EventScript_1B6E1D:: @ 81B6E1D - move 255, LittlerootTown_BrendansHouse_1F_Movement_1B6E49 - waitmove 0 + applymovement 255, LittlerootTown_BrendansHouse_1F_Movement_1B6E49 + waitmovement 0 return LittlerootTown_BrendansHouse_1F_EventScript_1B6E28:: @ 81B6E28 - move 255, LittlerootTown_BrendansHouse_1F_Movement_1B6E54 - waitmove 0 + applymovement 255, LittlerootTown_BrendansHouse_1F_Movement_1B6E54 + waitmovement 0 return LittlerootTown_BrendansHouse_1F_Movement_1B6E33:: @ 81B6E33 diff --git a/data/scripts/pokeblocks.inc b/data/scripts/pokeblocks.inc index 852acd292..6fe754097 100644 --- a/data/scripts/pokeblocks.inc +++ b/data/scripts/pokeblocks.inc @@ -1,36 +1,36 @@ FallarborTown_ContestLobby_EventScript_1B7604:: @ 81B7604 setvar 0x8008, 4 setvar 0x8009, 1 - move 0x8008, FallarborTown_ContestLobby_Movement_1B7821 - waitmove 0 - jump FallarborTown_ContestLobby_EventScript_1B7681 + applymovement 0x8008, FallarborTown_ContestLobby_Movement_1B7821 + waitmovement 0 + goto FallarborTown_ContestLobby_EventScript_1B7681 end SlateportCity_ContestLobby_EventScript_1B761E:: @ 81B761E setvar 0x8008, 2 setvar 0x8009, 2 - move 6, SlateportCity_ContestLobby_Movement_1A083D - move 0x8008, SlateportCity_ContestLobby_Movement_1B7821 - waitmove 0 - jump SlateportCity_ContestLobby_EventScript_1B7681 + applymovement 6, SlateportCity_ContestLobby_Movement_1A083D + applymovement 0x8008, SlateportCity_ContestLobby_Movement_1B7821 + waitmovement 0 + goto SlateportCity_ContestLobby_EventScript_1B7681 end VerdanturfTown_ContestLobby_EventScript_1B763F:: @ 81B763F setvar 0x8008, 2 setvar 0x8009, 1 - move 0x8008, VerdanturfTown_ContestLobby_Movement_1B7821 - waitmove 0 - jump VerdanturfTown_ContestLobby_EventScript_1B7681 + applymovement 0x8008, VerdanturfTown_ContestLobby_Movement_1B7821 + waitmovement 0 + goto VerdanturfTown_ContestLobby_EventScript_1B7681 end LilycoveCity_ContestLobby_EventScript_1B7659:: @ 81B7659 setvar 0x8008, 3 setvar 0x8009, 3 - move 9, LilycoveCity_ContestLobby_Movement_1A083D - move 10, LilycoveCity_ContestLobby_Movement_1A083D - move 0x8008, LilycoveCity_ContestLobby_Movement_1B7821 - waitmove 0 - jump LilycoveCity_ContestLobby_EventScript_1B7681 + applymovement 9, LilycoveCity_ContestLobby_Movement_1A083D + applymovement 10, LilycoveCity_ContestLobby_Movement_1A083D + applymovement 0x8008, LilycoveCity_ContestLobby_Movement_1B7821 + waitmovement 0 + goto LilycoveCity_ContestLobby_EventScript_1B7681 end FallarborTown_ContestLobby_EventScript_1B7681:: @ 81B7681 @@ -40,24 +40,24 @@ VerdanturfTown_ContestLobby_EventScript_1B7681:: @ 81B7681 lockall msgbox FallarborTown_ContestLobby_Text_1B6E63, 5 compare RESULT, 1 - jumpeq FallarborTown_ContestLobby_EventScript_1B76A1 + goto_if_eq FallarborTown_ContestLobby_EventScript_1B76A1 compare RESULT, 0 - jumpeq FallarborTown_ContestLobby_EventScript_1B76E5 + goto_if_eq FallarborTown_ContestLobby_EventScript_1B76E5 end FallarborTown_ContestLobby_EventScript_1B76A1:: @ 81B76A1 checkitem ITEM_POKEBLOCK_CASE, 1 compare RESULT, 0 - jumpeq FallarborTown_ContestLobby_EventScript_1B7780 - specialval RESULT, PlayerHasBerries + goto_if_eq FallarborTown_ContestLobby_EventScript_1B7780 + specialvar RESULT, PlayerHasBerries compare RESULT, 0 - jumpeq FallarborTown_ContestLobby_EventScript_1B770E + goto_if_eq FallarborTown_ContestLobby_EventScript_1B770E msgbox FallarborTown_ContestLobby_Text_1B6E9D, 4 - specialval RESULT, sub_810CA00 + specialvar RESULT, sub_810CA00 compare RESULT, 65535 - jumpif 5, FallarborTown_ContestLobby_EventScript_1B76EF + goto_if 5, FallarborTown_ContestLobby_EventScript_1B76EF compare RESULT, 65535 - jumpeq FallarborTown_ContestLobby_EventScript_1B7776 + goto_if_eq FallarborTown_ContestLobby_EventScript_1B7776 end FallarborTown_ContestLobby_EventScript_1B76E5:: @ 81B76E5 @@ -68,27 +68,27 @@ FallarborTown_ContestLobby_EventScript_1B76E5:: @ 81B76E5 FallarborTown_ContestLobby_EventScript_1B76EF:: @ 81B76EF msgbox FallarborTown_ContestLobby_Text_1B6ED0, 5 compare RESULT, 1 - jumpeq FallarborTown_ContestLobby_EventScript_1B7734 + goto_if_eq FallarborTown_ContestLobby_EventScript_1B7734 compare RESULT, 0 - jumpeq FallarborTown_ContestLobby_EventScript_1B7726 + goto_if_eq FallarborTown_ContestLobby_EventScript_1B7726 end FallarborTown_ContestLobby_EventScript_1B770E:: @ 81B770E msgbox FallarborTown_ContestLobby_Text_1B6FF0, 4 - checkdailyflags + dodailyevents checkflag 2241 - jumpeq FallarborTown_ContestLobby_EventScript_1B774F - jump FallarborTown_ContestLobby_EventScript_1B7759 + goto_if_eq FallarborTown_ContestLobby_EventScript_1B774F + goto FallarborTown_ContestLobby_EventScript_1B7759 end FallarborTown_ContestLobby_EventScript_1B7726:: @ 81B7726 msgbox FallarborTown_ContestLobby_Text_1B6F1F, 4 - jump FallarborTown_ContestLobby_EventScript_1B7734 + goto FallarborTown_ContestLobby_EventScript_1B7734 end FallarborTown_ContestLobby_EventScript_1B7734:: @ 81B7734 msgbox FallarborTown_ContestLobby_Text_1B6EF1, 4 - jump FallarborTown_ContestLobby_EventScript_1B7742 + goto FallarborTown_ContestLobby_EventScript_1B7742 end FallarborTown_ContestLobby_EventScript_1B7742:: @ 81B7742 @@ -108,7 +108,7 @@ FallarborTown_ContestLobby_EventScript_1B7759:: @ 81B7759 msgbox FallarborTown_ContestLobby_Text_1B704A, 4 giveitem ITEM_PECHA_BERRY setflag 2241 - jump FallarborTown_ContestLobby_EventScript_1B76EF + goto FallarborTown_ContestLobby_EventScript_1B76EF end FallarborTown_ContestLobby_EventScript_1B7776:: @ 81B7776 @@ -123,22 +123,22 @@ FallarborTown_ContestLobby_EventScript_1B7780:: @ 81B7780 FallarborTown_ContestLobby_EventScript_1B778A:: @ 81B778A setvar 0x8008, 4 - jump FallarborTown_ContestLobby_EventScript_1B77B6 + goto FallarborTown_ContestLobby_EventScript_1B77B6 end SlateportCity_ContestLobby_EventScript_1B7795:: @ 81B7795 setvar 0x8008, 2 - jump SlateportCity_ContestLobby_EventScript_1B77B6 + goto SlateportCity_ContestLobby_EventScript_1B77B6 end VerdanturfTown_ContestLobby_EventScript_1B77A0:: @ 81B77A0 setvar 0x8008, 2 - jump VerdanturfTown_ContestLobby_EventScript_1B77B6 + goto VerdanturfTown_ContestLobby_EventScript_1B77B6 end LilycoveCity_ContestLobby_EventScript_1B77AB:: @ 81B77AB setvar 0x8008, 3 - jump LilycoveCity_ContestLobby_EventScript_1B77B6 + goto LilycoveCity_ContestLobby_EventScript_1B77B6 end FallarborTown_ContestLobby_EventScript_1B77B6:: @ 81B77B6 @@ -148,11 +148,11 @@ VerdanturfTown_ContestLobby_EventScript_1B77B6:: @ 81B77B6 lock faceplayer msgbox FallarborTown_ContestLobby_Text_1B742F, 4 - specialval RESULT, PlayerHasBerries + specialvar RESULT, PlayerHasBerries compare RESULT, 1 - jumpeq FallarborTown_ContestLobby_EventScript_1B77DC + goto_if_eq FallarborTown_ContestLobby_EventScript_1B77DC compare RESULT, 0 - jumpeq FallarborTown_ContestLobby_EventScript_1B77E6 + goto_if_eq FallarborTown_ContestLobby_EventScript_1B77E6 end FallarborTown_ContestLobby_EventScript_1B77DC:: @ 81B77DC @@ -161,10 +161,10 @@ FallarborTown_ContestLobby_EventScript_1B77DC:: @ 81B77DC end FallarborTown_ContestLobby_EventScript_1B77E6:: @ 81B77E6 - checkdailyflags + dodailyevents checkflag 2241 - jumpeq FallarborTown_ContestLobby_EventScript_1B77F6 - jump FallarborTown_ContestLobby_EventScript_1B7800 + goto_if_eq FallarborTown_ContestLobby_EventScript_1B77F6 + goto FallarborTown_ContestLobby_EventScript_1B7800 end FallarborTown_ContestLobby_EventScript_1B77F6:: @ 81B77F6 @@ -188,19 +188,19 @@ VerdanturfTown_ContestLobby_Movement_1B7821:: @ 81B7821 step_end FallarborTown_ContestLobby_EventScript_1B7823:: @ 81B7823 - jump FallarborTown_ContestLobby_EventScript_1B783B + goto FallarborTown_ContestLobby_EventScript_1B783B end SlateportCity_ContestLobby_EventScript_1B7829:: @ 81B7829 - jump SlateportCity_ContestLobby_EventScript_1B783B + goto SlateportCity_ContestLobby_EventScript_1B783B end VerdanturfTown_ContestLobby_EventScript_1B782F:: @ 81B782F - jump VerdanturfTown_ContestLobby_EventScript_1B783B + goto VerdanturfTown_ContestLobby_EventScript_1B783B end LilycoveCity_ContestLobby_EventScript_1B7835:: @ 81B7835 - jump LilycoveCity_ContestLobby_EventScript_1B783B + goto LilycoveCity_ContestLobby_EventScript_1B783B end FallarborTown_ContestLobby_EventScript_1B783B:: @ 81B783B @@ -208,25 +208,25 @@ LilycoveCity_ContestLobby_EventScript_1B783B:: @ 81B783B SlateportCity_ContestLobby_EventScript_1B783B:: @ 81B783B VerdanturfTown_ContestLobby_EventScript_1B783B:: @ 81B783B lockall - specialval RESULT, PlayerHasBerries + specialvar RESULT, PlayerHasBerries compare RESULT, 0 - jumpeq FallarborTown_ContestLobby_EventScript_1B7897 + goto_if_eq FallarborTown_ContestLobby_EventScript_1B7897 checkitem ITEM_POKEBLOCK_CASE, 1 compare RESULT, 0 - jumpeq FallarborTown_ContestLobby_EventScript_1B7942 - specialval RESULT, sub_810CA00 + goto_if_eq FallarborTown_ContestLobby_EventScript_1B7942 + specialvar RESULT, sub_810CA00 compare RESULT, 65535 - jumpif 5, FallarborTown_ContestLobby_EventScript_1B7878 + goto_if 5, FallarborTown_ContestLobby_EventScript_1B7878 compare RESULT, 65535 - jumpeq FallarborTown_ContestLobby_EventScript_1B7938 + goto_if_eq FallarborTown_ContestLobby_EventScript_1B7938 end FallarborTown_ContestLobby_EventScript_1B7878:: @ 81B7878 msgbox FallarborTown_ContestLobby_Text_1B727C, 5 compare RESULT, 1 - jumpeq FallarborTown_ContestLobby_EventScript_1B78A1 + goto_if_eq FallarborTown_ContestLobby_EventScript_1B78A1 compare RESULT, 0 - jumpeq FallarborTown_ContestLobby_EventScript_1B7936 + goto_if_eq FallarborTown_ContestLobby_EventScript_1B7936 end FallarborTown_ContestLobby_EventScript_1B7897:: @ 81B7897 @@ -237,45 +237,45 @@ FallarborTown_ContestLobby_EventScript_1B7897:: @ 81B7897 FallarborTown_ContestLobby_EventScript_1B78A1:: @ 81B78A1 call S_DoSaveDialog compare RESULT, 0 - jumpeq FallarborTown_ContestLobby_EventScript_1B7936 + goto_if_eq FallarborTown_ContestLobby_EventScript_1B7936 message FallarborTown_ContestLobby_Text_1B7304 - waittext + waitmessage special sub_8083614 waitstate compare RESULT, 1 - jumpeq FallarborTown_ContestLobby_EventScript_1B7980 + goto_if_eq FallarborTown_ContestLobby_EventScript_1B7980 compare RESULT, 2 - jumpeq FallarborTown_ContestLobby_EventScript_1B794C + goto_if_eq FallarborTown_ContestLobby_EventScript_1B794C compare RESULT, 3 - jumpeq FallarborTown_ContestLobby_EventScript_1B7959 + goto_if_eq FallarborTown_ContestLobby_EventScript_1B7959 compare RESULT, 5 - jumpeq FallarborTown_ContestLobby_EventScript_1B7966 + goto_if_eq FallarborTown_ContestLobby_EventScript_1B7966 compare RESULT, 6 - jumpeq FallarborTown_ContestLobby_EventScript_1B7973 + goto_if_eq FallarborTown_ContestLobby_EventScript_1B7973 end FallarborTown_ContestLobby_EventScript_1B78F3:: @ 81B78F3 msgbox FallarborTown_ContestLobby_Text_1B733B, 4 - jump FallarborTown_ContestLobby_EventScript_1B791D + goto FallarborTown_ContestLobby_EventScript_1B791D end FallarborTown_ContestLobby_EventScript_1B7901:: @ 81B7901 msgbox FallarborTown_ContestLobby_Text_1B7347, 4 - jump FallarborTown_ContestLobby_EventScript_1B791D + goto FallarborTown_ContestLobby_EventScript_1B791D end FallarborTown_ContestLobby_EventScript_1B790F:: @ 81B790F msgbox FallarborTown_ContestLobby_Text_1B735A, 4 - jump FallarborTown_ContestLobby_EventScript_1B791D + goto FallarborTown_ContestLobby_EventScript_1B791D end FallarborTown_ContestLobby_EventScript_1B791D:: @ 81B791D setvar 0x8004, 0 fadescreen 1 - disappear 240 - disappear 239 - disappear 238 - disappear 237 + removeobject 240 + removeobject 239 + removeobject 238 + removeobject 237 special sub_804E538 waitstate releaseall @@ -321,11 +321,11 @@ FallarborTown_ContestLobby_EventScript_1B7973:: @ 81B7973 FallarborTown_ContestLobby_EventScript_1B7980:: @ 81B7980 fadescreen 1 - specialval RESULT, GetLinkPartnerNames + specialvar RESULT, GetLinkPartnerNames copyvar 0x8008, RESULT copyvar 0x8004, 0x8008 special SpawnBerryBlenderLinkPlayerSprites - jump FallarborTown_ContestLobby_EventScript_1B799A + goto FallarborTown_ContestLobby_EventScript_1B799A end FallarborTown_ContestLobby_EventScript_1B799A:: @ 81B799A diff --git a/data/scripts/safari_zone.inc b/data/scripts/safari_zone.inc index 03293115b..d0283f072 100644 --- a/data/scripts/safari_zone.inc +++ b/data/scripts/safari_zone.inc @@ -1,7 +1,7 @@ gUnknown_081C340A:: @ 81C340A setvar 0x40a4, 1 special ExitSafariMode - warp3 Route121_SafariZoneEntrance, 255, 2, 5 + setwarp Route121_SafariZoneEntrance, 255, 2, 5 end EventScript_1C341B: @ 81C341B @@ -15,39 +15,39 @@ gUnknown_081C342D:: @ 81C342D lockall msgbox UnknownString_81C34B2, 5 compare RESULT, 1 - jumpeq EventScript_1C3443 + goto_if_eq EventScript_1C3443 releaseall end EventScript_1C3443: - jump EventScript_1C341B + goto EventScript_1C341B gUnknown_081C3448:: @ 81C3448 lockall - playsfx 73 + playse 73 message UnknownString_81C34E4 - waittext + waitmessage waitbutton releaseall - jump EventScript_1C341B + goto EventScript_1C341B gUnknown_081C3459:: @ 81C3459 lockall - playsfx 73 + playse 73 message UnknownString_81C3514 - waittext + waitmessage waitbutton releaseall - jump EventScript_1C341B + goto EventScript_1C341B gUnknown_081C346A:: @ 81C346A lockall special SafariZoneGetPokeblockNameInFeeder - compare RESULT, -1 - jumpif 5, EventScript_1C34A9 + compare RESULT, 0xFFFF + goto_if 5, EventScript_1C34A9 msgbox UnknownString_81C354E, 5 compare RESULT, 1 - jumpeq EventScript_1C348E + goto_if_eq EventScript_1C348E releaseall end @@ -55,20 +55,20 @@ EventScript_1C348E: fadescreen 1 special sub_810BAF4 waitstate - compare RESULT, -1 - jumpif 5, EventScript_1C34A0 + compare RESULT, 0xFFFF + goto_if 5, EventScript_1C34A0 end EventScript_1C34A0: message UnknownString_81C35A9 - waittext + waitmessage waitbutton releaseall end EventScript_1C34A9: message UnknownString_81C3583 - waittext + waitmessage waitbutton releaseall end diff --git a/data/scripts/secret_power_tm.inc b/data/scripts/secret_power_tm.inc index 629125030..f3c03a853 100644 --- a/data/scripts/secret_power_tm.inc +++ b/data/scripts/secret_power_tm.inc @@ -3,7 +3,7 @@ Route111_EventScript_1A3858:: @ 81A3858 faceplayer msgbox Route111_Text_1A3520, 5 compare RESULT, 1 - jumpeq Route111_EventScript_1A3877 + goto_if_eq Route111_EventScript_1A3877 msgbox Route111_Text_1A37B5, 4 release end @@ -11,29 +11,29 @@ Route111_EventScript_1A3858:: @ 81A3858 Route111_EventScript_1A3877:: @ 81A3877 giveitem ITEM_TM43 compare RESULT, 0 - jumpeq Route111_EventScript_1A38D9 + goto_if_eq Route111_EventScript_1A38D9 msgbox Route111_Text_1A35C5, 4 - closebutton + closemessage setflag 96 clearflag 948 compare FACING, 3 - callif 1, Route111_EventScript_1A38C3 + call_if 1, Route111_EventScript_1A38C3 compare FACING, 4 - callif 1, Route111_EventScript_1A38C3 + call_if 1, Route111_EventScript_1A38C3 compare FACING, 2 - callif 1, Route111_EventScript_1A38CE - disappear LAST_TALKED + call_if 1, Route111_EventScript_1A38CE + removeobject LAST_TALKED release end Route111_EventScript_1A38C3:: @ 81A38C3 - move LAST_TALKED, Route111_Movement_1A38E3 - waitmove 0 + applymovement LAST_TALKED, Route111_Movement_1A38E3 + waitmovement 0 return Route111_EventScript_1A38CE:: @ 81A38CE - move LAST_TALKED, Route111_Movement_1A38EF - waitmove 0 + applymovement LAST_TALKED, Route111_Movement_1A38EF + waitmovement 0 return Route111_EventScript_1A38D9:: @ 81A38D9 diff --git a/data/scripts/tv.inc b/data/scripts/tv.inc index 1f8956811..425f42a85 100644 --- a/data/scripts/tv.inc +++ b/data/scripts/tv.inc @@ -1,33 +1,33 @@ Event_TV:: @ 81A6E72 lockall - inccounter GAME_STAT_WATCHED_TV + incrementgamestat GAME_STAT_WATCHED_TV special sub_80C2014 - specialval RESULT, CheckForBigMovieOrEmergencyNewsOnTV + specialvar RESULT, CheckForBigMovieOrEmergencyNewsOnTV compare RESULT, 2 - jumpeq EventScript_1A6F01 + goto_if_eq EventScript_1A6F01 compare RESULT, 1 - jumpeq EventScript_1A6F0B + goto_if_eq EventScript_1A6F0B checkflag 2098 - jumpif 0, EventScript_1A6EF1 + goto_if 0, EventScript_1A6EF1 checkflag 2097 - jumpeq EventScript_1A6EF1 - specialval RESULT, IsTVShowInSearchOfTrainersAiring + goto_if_eq EventScript_1A6EF1 + specialvar RESULT, IsTVShowInSearchOfTrainersAiring compare RESULT, 1 - jumpeq EventScript_1A6F66 - jump EventScript_1A6F50 + goto_if_eq EventScript_1A6F66 + goto EventScript_1A6F50 end EventScript_1A6EBB: - specialval 0x8004, special_0x44 + specialvar 0x8004, special_0x44 compare 0x8004, 255 - jumpeq EventScript_1A6F3F - specialval RESULT, special_0x4a + goto_if_eq EventScript_1A6F3F + specialvar RESULT, special_0x4a compare RESULT, 255 - jumpeq EventScript_1A6F3F + goto_if_eq EventScript_1A6F3F copyvar 0x8004, RESULT - specialval RESULT, sub_80BDA0C + specialvar RESULT, sub_80BDA0C compare RESULT, 0 - jumpif 5, EventScript_1A6F21 + goto_if 5, EventScript_1A6F21 end EventScript_1A6EF1: @@ -57,11 +57,11 @@ EventScript_1A6F0B: EventScript_1A6F21: special DoTVShow - waittext + waitmessage waitbutton compare RESULT, 1 - jumpif 5, EventScript_1A6F21 - jump EventScript_1A6F37 + goto_if 5, EventScript_1A6F21 + goto EventScript_1A6F37 end EventScript_1A6F37: @@ -73,23 +73,23 @@ EventScript_1A6F37: EventScript_1A6F3F: special GetMomOrDadStringForTVMessage msgbox UnknownString_81A0E68, 4 - jump EventScript_1A6F37 + goto EventScript_1A6F37 end EventScript_1A6F50: special sub_80BECE8 compare RESULT, 0 - jumpeq EventScript_1A6EBB - waittext + goto_if_eq EventScript_1A6EBB + waitmessage waitbutton - jump EventScript_1A6F37 + goto EventScript_1A6F37 end EventScript_1A6F66: special DoTVShowInSearchOfTrainers - waittext + waitmessage waitbutton compare RESULT, 0 - jumpeq EventScript_1A6F66 - jump EventScript_1A6F37 + goto_if_eq EventScript_1A6F66 + goto EventScript_1A6F37 end diff --git a/data/specials.inc b/data/specials.inc index 3545d1dff..6ce9b5b1e 100644 --- a/data/specials.inc +++ b/data/specials.inc @@ -160,7 +160,7 @@ gSpecials:: def_special SetFlagInVar def_special CableCarWarp def_special sub_8123218 - def_special sub_8053E90 + def_special Overworld_PlaySpecialMapMusic def_special StartWallClock def_special ScrSpecial_ViewWallClock def_special ScrSpecial_ChooseStarter diff --git a/include/battle.h b/include/battle.h index 47cb7cf8e..7850a9dd6 100644 --- a/include/battle.h +++ b/include/battle.h @@ -243,12 +243,11 @@ struct BattleStruct /* 0x2000000 */ /*0x16001*/ u8 turnEffectsBank; /*0x16002*/ u8 animTurn; /*0x16003*/ u8 scriptingActive; - /*0x16004*/ u8 wrappedMove1[4]; - /*0x16008*/ u8 wrappedMove2[4]; + /*0x16004*/ u8 wrappedMove[8]; /*0x1600C*/ u8 cmd49StateTracker; /*0x1600D*/ u8 unk1600D; /*0x1600E*/ u8 turncountersTracker; - /*0x1600F*/ u8 cmd23StateTracker; + /*0x1600F*/ u8 atk23StateTracker; /*0x16010*/ u8 moveTarget[4]; /*0x16014*/ u8 unk16014; /*0x16015*/ u8 unk16015; @@ -796,7 +795,7 @@ void BattleTurnPassed(void); // asm/battle_2.o void sub_8012324(void); void sub_8012FBC(u8, u8); -u8 b_first_side(u8, u8, u8); +u8 GetWhoStrikesFirst(u8, u8, u8); void TurnValuesCleanUp(u8); void SpecialStatusesClear(void); void sub_80138F0(void); diff --git a/include/battle_anim.h b/include/battle_anim.h index 48ceece21..2386c515c 100644 --- a/include/battle_anim.h +++ b/include/battle_anim.h @@ -53,14 +53,14 @@ struct UnknownStruct3 }; void DoMoveAnim(const u8 *const moveAnims[], u16 b, u8 c); -bool8 b_side_obj__get_some_boolean(u8 a); +bool8 IsAnimBankSpriteVisible(u8 a); void sub_8076034(u8, u8); bool8 IsContest(void); void battle_anim_clear_some_data(void); void move_anim_8072740(struct Sprite *sprite); void DestroyAnimVisualTask(u8 task); void DestroyAnimVisualTask(u8 task); -bool8 b_side_obj__get_some_boolean(u8); +bool8 IsAnimBankSpriteVisible(u8); u8 IsContest(); diff --git a/include/decompress.h b/include/decompress.h index 84c1f29c0..01f66971c 100644 --- a/include/decompress.h +++ b/include/decompress.h @@ -3,7 +3,7 @@ #include "sprite.h" -void sub_800D238(const void *src, void *dest); +void LZDecompressWram(const void *src, void *dest); void LZDecompressVram(const void *src, void *dest); void LoadCompressedObjectPic(const struct CompressedSpriteSheet *a); void LoadCompressedObjectPicOverrideBuffer(const struct CompressedSpriteSheet *a, void *buffer); diff --git a/include/global.h b/include/global.h index ffb6dc328..f0eb7401f 100644 --- a/include/global.h +++ b/include/global.h @@ -37,6 +37,7 @@ fndec\ #define ARRAY_COUNT(array) (sizeof(array) / sizeof((array)[0])) +#define POKEMON_SLOTS_NUMBER 412 #define POKEMON_NAME_LENGTH 10 #define OT_NAME_LENGTH 7 @@ -613,15 +614,20 @@ struct RecordMixingGift struct RecordMixingGiftData data; }; +// there should be enough flags for all 412 slots +// each slot takes up 8 flags +// if the value is not divisible by 8, we need to account for the reminder as well +#define DEX_FLAGS_NO ((POKEMON_SLOTS_NUMBER / 8) + ((POKEMON_SLOTS_NUMBER % 8) ? 1 : 0)) + struct SaveBlock1 /* 0x02025734 */ { /*0x00*/ struct Coords16 pos; /*0x04*/ struct WarpData location; /*0x0C*/ struct WarpData warp1; /*0x14*/ struct WarpData warp2; - /*0x1C*/ struct WarpData warp3; + /*0x1C*/ struct WarpData lastHealLocation; /*0x24*/ struct WarpData warp4; - /*0x2C*/ u16 battleMusic; + /*0x2C*/ u16 savedMusic; /*0x2E*/ u8 weather; /*0x2F*/ u8 filler_2F; /*0x30*/ u8 flashLevel; // flash level on current map, 0 being normal and 4 being the darkest @@ -639,7 +645,7 @@ struct SaveBlock1 /* 0x02025734 */ /*0x640*/ struct ItemSlot bagPocket_TMHM[64]; /*0x740*/ struct ItemSlot bagPocket_Berries[46]; /*0x7F8*/ struct Pokeblock pokeblocks[40]; - /*0x938*/ u8 unk938[52]; // pokedex related + /*0x938*/ u8 dexSeen2[DEX_FLAGS_NO]; /*0x96C*/ u16 berryBlenderRecords[3]; /*0x972*/ u8 filler_972[0x6]; /*0x978*/ u16 trainerRematchStepCounter; @@ -695,7 +701,7 @@ struct SaveBlock1 /* 0x02025734 */ /*0x3160*/ struct EnigmaBerry enigmaBerry; /*0x3690*/ struct RamScript ramScript; /*0x3A7C*/ struct RecordMixingGift recordMixingGift; - /*0x3A8C*/ u8 unk3A8C[52]; //pokedex related + /*0x3A8C*/ u8 dexSeen3[DEX_FLAGS_NO]; }; extern struct SaveBlock1 gSaveBlock1; @@ -717,8 +723,8 @@ struct Pokedex /*0x04*/ u32 unownPersonality; // set when you first see Unown /*0x08*/ u32 spindaPersonality; // set when you first see Spinda /*0x0C*/ u32 unknown3; - /*0x10*/ u8 owned[52]; - /*0x44*/ u8 seen[52]; + /*0x10*/ u8 owned[DEX_FLAGS_NO]; + /*0x44*/ u8 seen[DEX_FLAGS_NO]; }; struct SaveBlock2_Sub diff --git a/include/overworld.h b/include/overworld.h index e11862ab8..0954f1b63 100644 --- a/include/overworld.h +++ b/include/overworld.h @@ -26,23 +26,23 @@ extern const struct UCoords32 gUnknown_0821664C[]; extern void (*gFieldCallback)(void); // sub_8052F5C -void flag_var_implications_of_teleport_(void); +void Overworld_ResetStateAfterFly(void); void Overworld_ResetStateAfterTeleport(void); -void sub_8053014(void); -void sub_8053050(void); +void Overworld_ResetStateAfterDigEscRope(void); +void Overworld_ResetStateAfterWhiteOut(void); // sub_805308C void ResetGameStats(void); void IncrementGameStat(u8 index); u32 GetGameStat(u8 index); void SetGameStat(u8, u32); -// sub_8053154 +// LoadMapObjTemplatesFromHeader // LoadSaveblockMapObjScripts -void Overworld_SaveMapObjCoords(u8, s16, s16); -void Overworld_SaveMapObjMovementType(u8, u8); +void Overworld_SetMapObjTemplateCoords(u8, s16, s16); +void Overworld_SetMapObjTemplateMovementType(u8, u8); // mapdata_load_assets_to_gpu_and_full_redraw // get_mapdata_header -// warp_shift -// warp_set +// ApplyCurrentWarp +// SetWarpData // warp_data_is_not_neg_1 struct MapHeader * const Overworld_GetMapHeaderByGroupAndId(u16 mapGroup, u16 mapNum); struct MapHeader * const warp1_get_mapheader(void); @@ -50,14 +50,14 @@ struct MapHeader * const warp1_get_mapheader(void); // LoadSaveblockMapHeader // sub_80533CC void warp_in(void); -void warp1_set(s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y); +void Overworld_SetWarpDestination(s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y); void warp1_set_2(s8 mapGroup, s8 mapNum, s8 warpId); void saved_warp2_set(int unused, s8 mapGroup, s8 mapNum, s8 warpId); void saved_warp2_set_2(int unused, s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y); void copy_saved_warp2_bank_and_enter_x_to_warp1(u8 unused); void sub_8053538(u8); -void sub_8053570(void); -void sub_8053588(u8); +void Overworld_SetWarpDestToLastHealLoc(void); +void Overworld_SetHealLocationWarp(u8); void sub_80535C4(s16 a1, s16 a2); void sub_805363C(s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y); void sub_8053678(void); @@ -69,7 +69,7 @@ void sub_8053720(s16, s16); // unref_sub_8053790 void sub_80537CC(u8); void gpu_sync_bg_hide(); -// sub_8053818 +// GetMapConnection // sub_8053850 bool8 sub_80538B0(u16 x, u16 y); bool8 sub_80538D0(u16 x, u16 y); @@ -81,7 +81,7 @@ void walkrun_find_lowest_active_bit_in_bitfield(void); u8 sub_8053B00(struct UnkPlayerStruct *playerStruct, u16 a2, u8 a3); u8 sub_8053B60(struct UnkPlayerStruct *playerStruct, u8, u16, u8); u16 cur_mapdata_block_role_at_screen_center_acc_to_sav1(void); -bool32 Overworld_IsBikeAllowedOnCurrentMap(void); +bool32 Overworld_IsBikingAllowed(void); void SetDefaultFlashLevel(void); void Overworld_SetFlashLevel(s32 a1); u8 Overworld_GetFlashLevel(void); @@ -89,19 +89,19 @@ void sub_8053D14(u16); // sub_8053D30 // sub_8053D6C // GetLocationMusic -// sav1_map_get_music -// warp1_target_get_music -// call_map_music_set_to_zero -void sub_8053E90(void); -void sav1_set_battle_music_maybe(u16); -void sav1_reset_battle_music_maybe(void); +// GetCurrLocationDefaultMusic +// GetWarpDestinationMusic +// Overworld_ResetMapMusic +void Overworld_PlaySpecialMapMusic(void); +void Overworld_SetSavedMusic(u16); +void Overworld_ClearSavedMusic(void); void sub_8053F0C(void); -void sub_8053F84(void); +void Overworld_ChangeMusicToDefault(void); void Overworld_ChangeMusicTo(u16); // GetMapMusicFadeoutSpeed void sub_8053FF8(void); bool8 sub_8054034(void); -void sub_8054044(void); +void Overworld_FadeOutMapMusic(void); // PlayAmbientCry void UpdateAmbientCry(s16 *, u16 *); void ChooseAmbientCrySpecies(void); diff --git a/include/pokedex.h b/include/pokedex.h index 1bc63a4ff..c47494e1f 100644 --- a/include/pokedex.h +++ b/include/pokedex.h @@ -9,7 +9,17 @@ void CB2_InitPokedex(void); u8 sub_809070C(u16 dexNum, u32 b, u32 c); const u8 *GetPokemonCategory(u16); u16 GetPokedexHeightWeight(u16 dexNum, u8 data); -s8 GetNationalPokedexFlag(u16, u8); + +enum +{ + FLAG_GET_SEEN, + FLAG_GET_CAUGHT, + FLAG_SET_SEEN, + FLAG_SET_CAUGHT +}; + +s8 GetSetPokedexFlag(u16, u8); + u16 GetNationalPokedexCount(u8); u16 GetHoennPokedexCount(u8); bool8 sub_8090FC0(void); diff --git a/include/pokemon.h b/include/pokemon.h index a5f802f24..76728a5ee 100644 --- a/include/pokemon.h +++ b/include/pokemon.h @@ -393,7 +393,7 @@ struct BaseStats /*0x17*/ u8 ability2; /*0x18*/ u8 safariZoneFleeRate; /*0x19*/ u8 bodyColor:7; - u8 unk19_7:1; + u8 noFlip:1; }; struct BattleMove @@ -591,9 +591,9 @@ u8 sub_8040574(struct Pokemon *party); void ClearBattleMonForms(void); void sub_80408BC(); void current_map_music_set__default_for_battle(u16); -const u8 *pokemon_get_pal(struct Pokemon *mon); -const u8 *species_and_otid_get_pal(u16, u32, u32); -const struct CompressedSpritePalette *sub_80409C8(u16, u32, u32); +const u8 *GetMonSpritePal(struct Pokemon *mon); +const u8 *GetMonSpritePalFromOtIdPersonality(u16, u32, u32); +const struct CompressedSpritePalette *GetMonSpritePalStructFromOtIdPersonality(u16, u32, u32); bool8 IsOtherTrainer(u32, u8 *); void sub_8040B8C(void); void SetWildMonHeldItem(void); @@ -602,8 +602,8 @@ bool32 sub_8040D3C(u16 species, u8 *name, u8 language); s8 sub_8040A54(struct Pokemon *, u8); u16 GetMonEVCount(struct Pokemon *); u16 GetEvolutionTargetSpecies(struct Pokemon *, u8, u16); -const struct CompressedSpritePalette *sub_8040990(struct Pokemon *); -bool8 sub_8040A3C(u16); +const struct CompressedSpritePalette *GetMonSpritePalStruct(struct Pokemon *); +bool8 IsPokeSpriteNotFlipped(u16); u8 GetLevelUpMovesBySpecies(u16, u16 *); u8 TryIncrementMonLevel(struct Pokemon *); diff --git a/include/rom_8077ABC.h b/include/rom_8077ABC.h index 34ad7b432..94e535df5 100644 --- a/include/rom_8077ABC.h +++ b/include/rom_8077ABC.h @@ -4,10 +4,18 @@ #include "sprite.h" #include "task.h" +enum +{ + ANIM_BANK_ATK, + ANIM_BANK_DEF, + ANIM_BANK_ATK_PARTNER, + ANIM_BANK_DEF_PARTNER +}; + u8 sub_8077ABC(u8, u8); u8 sub_8077E44(u8 slot, u16 species, u8 a3); -u8 obj_id_for_side_relative_to_move(u8 side); -void oamt_set_x3A_32(struct Sprite *sprite, void(*callback)(struct Sprite *)); +u8 GetAnimBankSpriteId(u8 side); +void StoreSpriteCallbackInData6(struct Sprite *sprite, void(*callback)(struct Sprite *)); void sub_8078314(struct Sprite *sprite); void sub_8078364(struct Sprite *sprite); void sub_8078458(struct Sprite *sprite); @@ -22,8 +30,8 @@ u8 GetBankIdentity(u8 slot); u8 GetBankByPlayerAI(u8); u8 GetBankByPlayerAI(u8); u8 GetBankByPlayerAI(u8 state); -u8 sub_8078874(u8); -bool8 sub_8078874(u8); +u8 AnimBankSpriteExists(u8); +bool8 AnimBankSpriteExists(u8); bool8 IsDoubleBattle(); u8 IsDoubleBattle(void); bool8 IsDoubleBattle(void); diff --git a/ld_script.txt b/ld_script.txt index 09d2a342c..5e38556fe 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -25,7 +25,7 @@ SECTIONS { <BSS> /* .bss.code starts at 0x3000F60 */ - src/m4a_2.o(.bss.code); + src/libs/m4a_2.o(.bss.code); /* COMMON starts at 0x3001760 */ <COMMON> @@ -39,225 +39,225 @@ SECTIONS { ALIGN(4) { asm/crt0.o(.text); - src/main.o(.text); - src/sprite.o(.text); - src/text.o(.text); - src/string_util.o(.text); - src/link.o(.text); - src/rtc.o(.text); - src/main_menu.o(.text); + src/engine/main.o(.text); + src/engine/sprite.o(.text); + src/engine/text.o(.text); + src/engine/string_util.o(.text); + src/engine/link.o(.text); + src/engine/rtc.o(.text); + src/engine/main_menu.o(.text); src/rom3.o(.text); - src/decompress.o(.text); + src/engine/decompress.o(.text); asm/battle_1.o(.text); src/rom_800D42C.o(.text); asm/battle_1.o(.text_800DC24); - src/battle_2.o(.text); + src/battle/battle_2.o(.text); asm/battle_2.o(.text); - src/battle_3.o(.text); - src/battle_4.o(.text); - src/battle_controller_player.o(.text); - src/battle_7.o(.text); - src/battle_controller_opponent.o(.text); + src/battle/battle_3.o(.text); + src/battle/battle_4.o(.text); + src/battle/battle_controller_player.o(.text); + src/battle/battle_7.o(.text); + src/battle/battle_controller_opponent.o(.text); asm/battle_9.o(.text); - src/battle_controller_linkopponent.o(.text); - src/pokemon_1.o(.text); - src/calculate_base_damage.o(.text); - src/pokemon_2.o(.text); + src/battle/battle_controller_linkopponent.o(.text); + src/pokemon/pokemon_1.o(.text); + src/battle/calculate_base_damage.o(.text); + src/pokemon/pokemon_2.o(.text); asm/pokemon_item_effect.o(.text); - src/pokemon_3.o(.text); + src/pokemon/pokemon_3.o(.text); src/de_rom_8040FE0.o(.text); - src/trig.o(.text); - src/rng.o(.text); - src/util.o(.text); - src/blend_palette.o(.text); - src/daycare.o(.text); - src/egg_hatch.o(.text); - src/battle_interface.o(.text); - src/smokescreen.o(.text); - src/pokeball.o(.text); - src/load_save.o(.text); - src/trade.o(.text); - src/berry_blender.o(.text); - src/play_time.o(.text); - src/new_game.o(.text); - src/overworld.o(.text); - src/fieldmap.o(.text); - src/metatile_behavior.o(.text); - src/field_camera.o(.text); - src/field_door.o(.text); - src/field_player_avatar.o(.text); - src/field_map_obj.o(.text); - src/field_ground_effect.o(.text); - src/field_map_obj_helpers.o(.text); - src/field_message_box.o(.text); - src/map_obj_lock.o(.text); - src/text_window.o(.text); - src/script.o(.text); - src/scrcmd.o(.text); - src/field_control_avatar.o(.text); - src/event_data.o(.text); - src/coord_event_weather.o(.text); - src/field_tasks.o(.text); - src/clock.o(.text); - src/reset_rtc_screen.o(.text); + src/engine/trig.o(.text); + src/engine/rng.o(.text); + src/engine/util.o(.text); + src/engine/blend_palette.o(.text); + src/field/daycare.o(.text); + src/scene/egg_hatch.o(.text); + src/battle/battle_interface.o(.text); + src/battle/smokescreen.o(.text); + src/battle/pokeball.o(.text); + src/engine/load_save.o(.text); + src/engine/trade.o(.text); + src/scene/berry_blender.o(.text); + src/engine/play_time.o(.text); + src/scene/new_game.o(.text); + src/field/overworld.o(.text); + src/field/fieldmap.o(.text); + src/field/metatile_behavior.o(.text); + src/field/field_camera.o(.text); + src/field/field_door.o(.text); + src/field/field_player_avatar.o(.text); + src/field/field_map_obj.o(.text); + src/field/field_ground_effect.o(.text); + src/field/field_map_obj_helpers.o(.text); + src/field/field_message_box.o(.text); + src/field/map_obj_lock.o(.text); + src/engine/text_window.o(.text); + src/engine/script.o(.text); + src/field/scrcmd.o(.text); + src/field/field_control_avatar.o(.text); + src/field/event_data.o(.text); + src/field/coord_event_weather.o(.text); + src/field/field_tasks.o(.text); + src/engine/clock.o(.text); + src/engine/reset_rtc_screen.o(.text); asm/party_menu.o(.text); - src/party_menu.o(.text); + src/field/party_menu.o(.text); asm/party_menu.o(.text_8070968); - src/start_menu.o(.text); - src/menu.o(.text); - src/tileset_anim.o(.text); - src/palette.o(.text); - src/sound.o(.text); - src/battle_anim.o(.text); + src/field/start_menu.o(.text); + src/engine/menu.o(.text); + src/engine/tileset_anim.o(.text); + src/engine/palette.o(.text); + src/engine/sound.o(.text); + src/battle/battle_anim.o(.text); src/rom_8077ABC.o(.text); - src/task.o(.text); - src/reshow_battle_screen.o(.text); - src/battle_anim_807B69C.o(.text); - src/title_screen.o(.text); - src/field_weather.o(.text); + src/engine/task.o(.text); + src/battle/reshow_battle_screen.o(.text); + src/battle/battle_anim_807B69C.o(.text); + src/scene/title_screen.o(.text); + src/field/field_weather.o(.text); asm/field_weather.o(.text); - src/field_fadetransition.o(.text); - src/field_screen_effect.o(.text); - src/battle_setup.o(.text); - src/cable_club.o(.text); - src/mori_debug_menu.o(.text); - src/trainer_see.o(.text); - src/wild_encounter.o(.text); - src/field_effect.o(.text); + src/field/field_fadetransition.o(.text); + src/field/field_screen_effect.o(.text); + src/battle/battle_setup.o(.text); + src/engine/cable_club.o(.text); + src/debug/mori_debug_menu.o(.text); + src/field/trainer_see.o(.text); + src/field/wild_encounter.o(.text); + src/field/field_effect.o(.text); src/unknown_task.o(.text); - src/pokemon_menu.o(.text); - src/option_menu.o(.text); - src/pokedex.o(.text); - src/trainer_card.o(.text); - src/save_menu_util.o(.text); - src/battle_party_menu.o(.text); + src/pokemon/pokemon_menu.o(.text); + src/engine/option_menu.o(.text); + src/pokemon/pokedex.o(.text); + src/engine/trainer_card.o(.text); + src/engine/save_menu_util.o(.text); + src/battle/battle_party_menu.o(.text); asm/pokemon_storage_system.o(.text); - src/pokemon_storage_system.o(.text); + src/pokemon/pokemon_storage_system.o(.text); asm/pokemon_storage_system.o(.text_8098A38); - src/pokemon_icon.o(.text); + src/pokemon/pokemon_icon.o(.text); asm/pokemon_summary_screen.o(.text); - src/pokemon_summary_screen.o(.text); + src/pokemon/pokemon_summary_screen.o(.text); asm/pokemon_summary_screen.o(.text_80A0958); - src/script_movement.o(.text); - src/fldeff_cut.o(.text); - src/mail_data.o(.text); - src/map_name_popup.o(.text); - src/item_menu.o(.text); - src/battle_anim_80A7E7C.o(.text); - src/item.o(.text); - src/matsuda_debug_menu.o(.text); + src/field/script_movement.o(.text); + src/field/fldeff_cut.o(.text); + src/pokemon/mail_data.o(.text); + src/field/map_name_popup.o(.text); + src/field/item_menu.o(.text); + src/battle/battle_anim_80A7E7C.o(.text); + src/field/item.o(.text); + src/debug/matsuda_debug_menu.o(.text); asm/contest.o(.text); - src/shop.o(.text); - src/berry.o(.text); - src/script_menu.o(.text); - src/naming_screen.o(.text); - src/money.o(.text); + src/field/shop.o(.text); + src/field/berry.o(.text); + src/field/script_menu.o(.text); + src/engine/naming_screen.o(.text); + src/field/money.o(.text); asm/contest_effect.o(.text); - src/record_mixing.o(.text); - src/sound_check_menu.o(.text); - src/secret_base.o(.text); + src/engine/record_mixing.o(.text); + src/debug/sound_check_menu.o(.text); + src/field/secret_base.o(.text); asm/secret_base.o(.text_80BC1D0); - src/tv.o(.text); + src/field/tv.o(.text); asm/contest_link_80C2020.o(.text); src/script_pokemon_util_80C4BF0.o(.text); - src/field_poison.o(.text); - src/pokemon_size_record.o(.text); + src/field/field_poison.o(.text); + src/pokemon/pokemon_size_record.o(.text); asm/fldeff_80C5CD4.o(.text); - src/field_special_scene.o(.text); - src/rotating_gate.o(.text); - src/safari_zone.o(.text); + src/field/field_special_scene.o(.text); + src/field/rotating_gate.o(.text); + src/field/safari_zone.o(.text); asm/contest_link_80C857C.o(.text); - src/contest_link_80C857C.o(.text); - src/item_use.o(.text); + src/battle/contest_link_80C857C.o(.text); + src/field/item_use.o(.text); asm/battle_anim_80CA710.o(.text); - src/bike.o(.text); + src/field/bike.o(.text); asm/easy_chat.o(.text); - src/easy_chat.o(.text); + src/field/easy_chat.o(.text); asm/pokenav.o(.text); - src/pokenav.o(.text); + src/field/pokenav.o(.text); asm/pokenav.o(.text_80F708C); - src/mon_markings.o(.text); - src/mauville_man.o(.text); - src/mail.o(.text); - src/menu_helpers.o(.text); + src/pokemon/mon_markings.o(.text); + src/field/mauville_man.o(.text); + src/pokemon/mail.o(.text); + src/field/menu_helpers.o(.text); src/script_pokemon_util_80F99CC.o(.text); - src/dewford_trend.o(.text); - src/heal_location.o(.text); - src/region_map.o(.text); - src/cute_sketch.o(.text); + src/field/dewford_trend.o(.text); + src/field/heal_location.o(.text); + src/field/region_map.o(.text); + src/scene/cute_sketch.o(.text); asm/cute_sketch.o(.text); - src/decoration.o(.text); + src/field/decoration.o(.text); asm/slot_machine.o(.text); - src/slot_machine.o(.text); + src/field/slot_machine.o(.text); asm/slot_machine.o(.text_8104D30) - src/slot_machine.o(.text_b); - src/contest_painting.o(.text); - src/battle_ai.o(.text); - src/trader.o(.text); - src/starter_choose.o(.text); - src/wallclock.o(.text); + src/field/slot_machine.o(.text_b); + src/scene/contest_painting.o(.text); + src/battle/battle_ai.o(.text); + src/field/trader.o(.text); + src/field/starter_choose.o(.text); + src/field/wallclock.o(.text); src/rom6.o(.text); - src/pokeblock.o(.text); - src/fldeff_flash.o(.text); - src/post_battle_event_funcs.o(.text); - src/time_events.o(.text); - src/birch_pc.o(.text); - src/hof_pc.o(.text); - src/field_specials.o(.text); - src/battle_records.o(.text); + src/field/pokeblock.o(.text); + src/field/fldeff_flash.o(.text); + src/battle/post_battle_event_funcs.o(.text); + src/engine/time_events.o(.text); + src/field/birch_pc.o(.text); + src/field/hof_pc.o(.text); + src/field/field_specials.o(.text); + src/battle/battle_records.o(.text); asm/pokedex_area_screen.o(.text); - src/evolution_scene.o(.text); + src/scene/evolution_scene.o(.text); asm/roulette.o(.text); asm/pokedex_cry_screen.o(.text); - src/pokedex_cry_screen.o(.text); + src/pokemon/pokedex_cry_screen.o(.text); asm/pokedex_cry_screen.o(.text_811A4F8); - src/coins.o(.text); - src/landmark.o(.text); - src/fldeff_strength.o(.text); - src/battle_transition.o(.text); - src/battle_controller_linkpartner.o(.text); - src/battle_message.o(.text); - src/choose_party.o(.text); + src/field/coins.o(.text); + src/field/landmark.o(.text); + src/field/fldeff_strength.o(.text); + src/battle/battle_transition.o(.text); + src/battle/battle_controller_linkpartner.o(.text); + src/battle/battle_message.o(.text); + src/field/choose_party.o(.text); asm/cable_car.o(.text); asm/roulette_util.o(.text); asm/cable_car_util.o(.text); src/unused_8124F94.o(.text); - src/save.o(.text); - src/mystery_event_script.o(.text); - src/field_effect_helpers.o(.text); + src/engine/save.o(.text); + src/engine/mystery_event_script.o(.text); + src/field/field_effect_helpers.o(.text); asm/contest_ai.o(.text); asm/battle_anim_81258BC.o(.text); - src/battle_controller_safari.o(.text); - src/fldeff_sweetscent.o(.text); + src/battle/battle_controller_safari.o(.text); + src/field/fldeff_sweetscent.o(.text); asm/battle_anim_812C144.o(.text); - src/learn_move.o(.text); - src/fldeff_softboiled.o(.text); - src/decoration_inventory.o(.text); - src/roamer.o(.text); + src/pokemon/learn_move.o(.text); + src/field/fldeff_softboiled.o(.text); + src/field/decoration_inventory.o(.text); + src/field/roamer.o(.text); asm/battle_tower.o(.text); - src/use_pokeblock.o(.text); - src/battle_controller_wally.o(.text); - src/player_pc.o(.text); - src/intro.o(.text); - src/field_region_map.o(.text); + src/field/use_pokeblock.o(.text); + src/battle/battle_controller_wally.o(.text); + src/field/player_pc.o(.text); + src/scene/intro.o(.text); + src/field/field_region_map.o(.text); asm/battle_anim_813F0F4.o(.text); - src/hall_of_fame.o(.text); - src/credits.o(.text); - src/lottery_corner.o(.text); - src/diploma.o(.text); - src/berry_tag_screen.o(.text); - src/mystery_event_menu.o(.text); - src/save_failed_screen.o(.text); - src/braille_puzzles.o(.text); - src/pokeblock_feed.o(.text); - src/clear_save_data_menu.o(.text); - src/intro_credits_graphics.o(.text); - src/evolution_graphics.o(.text); - src/bard_music.o(.text); - src/fldeff_teleport.o(.text); - src/unknown_debug_menu.o(.text); - src/name_string_util.o(.text); - src/menu_cursor.o(.text); + src/scene/hall_of_fame.o(.text); + src/scene/credits.o(.text); + src/field/lottery_corner.o(.text); + src/field/diploma.o(.text); + src/field/berry_tag_screen.o(.text); + src/engine/mystery_event_menu.o(.text); + src/engine/save_failed_screen.o(.text); + src/field/braille_puzzles.o(.text); + src/pokemon/pokeblock_feed.o(.text); + src/engine/clear_save_data_menu.o(.text); + src/scene/intro_credits_graphics.o(.text); + src/scene/evolution_graphics.o(.text); + src/field/bard_music.o(.text); + src/field/fldeff_teleport.o(.text); + src/debug/unknown_debug_menu.o(.text); + src/engine/name_string_util.o(.text); + src/engine/menu_cursor.o(.text); } =0 script_data : @@ -279,13 +279,13 @@ SECTIONS { { asm/libgcnmultiboot.o(.text); asm/m4a_1.o(.text); - src/m4a_2.o(.text); + src/libs/m4a_2.o(.text); asm/m4a_3.o(.text); - src/m4a_4.o(.text); - src/agb_flash.o(.text); - src/agb_flash_1m.o(.text); - src/agb_flash_mx.o(.text); - src/siirtc.o(.text); + src/libs/m4a_4.o(.text); + src/libs/agb_flash.o(.text); + src/libs/agb_flash_1m.o(.text); + src/libs/agb_flash_mx.o(.text); + src/libs/siirtc.o(.text); asm/libagbsyscall.o(.text); tools/agbcc/lib/libgcc.a:_call_via_rX.o(.text); tools/agbcc/lib/libgcc.a:_divsi3.o(.text); @@ -301,175 +301,175 @@ SECTIONS { tools/agbcc/lib/libgcc.a:fp-bit.o(.text); tools/agbcc/lib/libgcc.a:_lshrdi3.o(.text); tools/agbcc/lib/libgcc.a:_negdi2.o(.text); - src/libc.o(.text); + src/libs/libc.o(.text); } =0 .rodata : ALIGN(4) { - src/main.o(.rodata); - src/sprite.o(.rodata); + src/engine/main.o(.rodata); + src/engine/sprite.o(.rodata); . += 0x8; /* Why the gap? */ - src/text.o(.rodata); - src/string_util.o(.rodata); - src/link.o(.rodata); - src/rtc.o(.rodata); + src/engine/text.o(.rodata); + src/engine/string_util.o(.rodata); + src/engine/link.o(.rodata); + src/engine/rtc.o(.rodata); data/main_menu.o(.rodata); data/data2a.o(.rodata); - src/battle_4.o(.rodata); - src/battle_controller_player.o(.rodata); + src/battle/battle_4.o(.rodata); + src/battle/battle_controller_player.o(.rodata); data/data2b.o(.rodata); - src/battle_controller_opponent.o(.rodata); - src/battle_controller_linkopponent.o(.rodata); + src/battle/battle_controller_opponent.o(.rodata); + src/battle/battle_controller_linkopponent.o(.rodata); data/battle_moves.o(.rodata); - src/battle_3.o(.rodata); - src/pokemon_data.o(.rodata); + src/battle/battle_3.o(.rodata); + src/pokemon/pokemon_data.o(.rodata); . = ALIGN(4); - src/trig.o(.rodata); - src/util.o(.rodata); - src/daycare.o(.rodata); - src/egg_hatch.o(.rodata); + src/engine/trig.o(.rodata); + src/engine/util.o(.rodata); + src/field/daycare.o(.rodata); + src/scene/egg_hatch.o(.rodata); data/battle_interface.o(.rodata); - src/pokeball.o(.rodata); - src/trade.o(.rodata); - src/berry_blender.o(.rodata); - src/new_game.o(.rodata); - src/overworld.o(.rodata); + src/battle/pokeball.o(.rodata); + src/engine/trade.o(.rodata); + src/scene/berry_blender.o(.rodata); + src/scene/new_game.o(.rodata); + src/field/overworld.o(.rodata); data/tilesets.o(.rodata); data/maps.o(.rodata); - src/fieldmap.o(.rodata); - src/metatile_behavior.o(.rodata); + src/field/fieldmap.o(.rodata); + src/field/metatile_behavior.o(.rodata); data/field_door.o(.rodata); - src/field_player_avatar.o(.rodata); - src/field_map_obj.o(.rodata); - src/field_ground_effect.o(.rodata); + src/field/field_player_avatar.o(.rodata); + src/field/field_map_obj.o(.rodata); + src/field/field_ground_effect.o(.rodata); data/field_map_obj_helpers.o(.rodata); data/text_window.o(.rodata); - src/script.o(.rodata); - src/scrcmd.o(.rodata); - src/coord_event_weather.o(.rodata); - src/field_tasks.o(.rodata); + src/engine/script.o(.rodata); + src/field/scrcmd.o(.rodata); + src/field/coord_event_weather.o(.rodata); + src/field/field_tasks.o(.rodata); data/reset_rtc_screen.o(.rodata); data/party_menu.o(.rodata); - src/start_menu.o(.rodata); - src/menu.o(.rodata); + src/field/start_menu.o(.rodata); + src/engine/menu.o(.rodata); data/tileset_anim.o(.rodata); - src/palette.o(.rodata); - src/sound.o(.rodata); + src/engine/palette.o(.rodata); + src/engine/sound.o(.rodata); data/battle_anim.o(.rodata); - src/battle_anim.o(.rodata); + src/battle/battle_anim.o(.rodata); src/rom_8077ABC.o(.rodata); data/map_events.o(.rodata); data/data_8393054.o(.rodata); - src/task.o(.rodata); - src/battle_anim_807B69C.o(.rodata); - src/title_screen.o(.rodata); + src/engine/task.o(.rodata); + src/battle/battle_anim_807B69C.o(.rodata); + src/scene/title_screen.o(.rodata); data/field_weather.o(.rodata); - src/field_screen_effect.o(.rodata); - src/battle_setup.o(.rodata); + src/field/field_screen_effect.o(.rodata); + src/battle/battle_setup.o(.rodata); data/cable_club.o(.rodata); data/mori_debug_menu.o(.rodata); - src/trainer_see.o(.rodata); + src/field/trainer_see.o(.rodata); data/trainer_see.o(.rodata); - src/wild_encounter.o(.rodata); + src/field/wild_encounter.o(.rodata); data/wild_encounter.o(.rodata); - src/field_effect.o(.rodata); - src/pokemon_menu.o(.rodata); - src/option_menu.o(.rodata); - src/pokedex.o(.rodata); - src/trainer_card.o(.rodata); - src/battle_party_menu.o(.rodata); + src/field/field_effect.o(.rodata); + src/pokemon/pokemon_menu.o(.rodata); + src/engine/option_menu.o(.rodata); + src/pokemon/pokedex.o(.rodata); + src/engine/trainer_card.o(.rodata); + src/battle/battle_party_menu.o(.rodata); data/pokemon_storage_system.o(.rodata); - src/pokemon_icon.o(.rodata); + src/pokemon/pokemon_icon.o(.rodata); data/pokemon_summary_screen.o(.rodata); data/fldeff_cut.o(.rodata); - src/item_menu.o(.rodata); + src/field/item_menu.o(.rodata); data/battle_anim_80A7E7C.o(.rodata); - src/item.o(.rodata); + src/field/item.o(.rodata); data/matsuda_debug_menu.o(.rodata); data/contest.o(.rodata); - src/shop.o(.rodata); - src/berry.o(.rodata); - src/script_menu.o(.rodata); - src/naming_screen.o(.rodata); + src/field/shop.o(.rodata); + src/field/berry.o(.rodata); + src/field/script_menu.o(.rodata); + src/engine/naming_screen.o(.rodata); data/naming_screen.o(.rodata); data/money.o(.rodata); data/contest_effect.o(.rodata); - src/record_mixing.o(.data); - src/record_mixing.o(.rodata); - src/sound_check_menu.o(.rodata); + src/engine/record_mixing.o(.data); + src/engine/record_mixing.o(.rodata); + src/debug/sound_check_menu.o(.rodata); data/secret_base.o(.rodata); data/tv.o(.rodata); data/contest_link_80C2020.o(.rodata); - src/pokemon_size_record.o(.rodata); + src/pokemon/pokemon_size_record.o(.rodata); data/fldeff_80C5CD4.o(.rodata); - src/field_special_scene.o(.rodata); + src/field/field_special_scene.o(.rodata); data/field_special_scene.o(.rodata); - src/rotating_gate.o(.rodata); - src/item_use.o(.rodata); + src/field/rotating_gate.o(.rodata); + src/field/item_use.o(.rodata); data/battle_anim_80CA710.o(.rodata); - src/bike.o(.rodata); + src/field/bike.o(.rodata); data/easy_chat.o(.rodata); data/pokenav.o(.rodata); data/mon_markings.o(.rodata); - src/mauville_man.o(.rodata); + src/field/mauville_man.o(.rodata); data/mail.o(.rodata); - src/menu_helpers.o(.rodata); - src/heal_location.o(.rodata); - src/region_map.o(.rodata); + src/field/menu_helpers.o(.rodata); + src/field/heal_location.o(.rodata); + src/field/region_map.o(.rodata); data/cute_sketch.o(.rodata); - src/decoration.o(.rodata); + src/field/decoration.o(.rodata); data/slot_machine.o(.rodata); - src/contest_painting.o(.rodata); - src/battle_ai.o(.rodata); - src/trader.o(.rodata); - src/starter_choose.o(.rodata); - src/wallclock.o(.rodata); - src/pokeblock.o(.rodata); + src/scene/contest_painting.o(.rodata); + src/battle/battle_ai.o(.rodata); + src/field/trader.o(.rodata); + src/field/starter_choose.o(.rodata); + src/field/wallclock.o(.rodata); + src/field/pokeblock.o(.rodata); data/fldeff_flash.o(.rodata); - src/time_events.o(.rodata); - src/field_specials.o(.rodata); + src/engine/time_events.o(.rodata); + src/field/field_specials.o(.rodata); data/pokedex_area_screen.o(.rodata); - src/evolution_scene.o(.rodata); + src/scene/evolution_scene.o(.rodata); data/roulette.o(.rodata); data/pokedex_cry_screen.o(.rodata); data/landmark.o(.rodata); - src/battle_transition.o(.rodata); - src/battle_controller_linkpartner.o(.rodata); + src/battle/battle_transition.o(.rodata); + src/battle/battle_controller_linkpartner.o(.rodata); data/battle_message.o(.rodata); - src/choose_party.o(.rodata); + src/field/choose_party.o(.rodata); data/cable_car.o(.rodata); - src/save.o(.rodata); - src/field_effect_helpers.o(.rodata); + src/engine/save.o(.rodata); + src/field/field_effect_helpers.o(.rodata); data/contest_ai.o(.rodata); - src/battle_controller_safari.o(.rodata); + src/battle/battle_controller_safari.o(.rodata); data/battle_anim_812C144.o(.rodata); - src/learn_move.o(.rodata); - src/decoration_inventory.o(.rodata); - src/roamer.o(.rodata); + src/pokemon/learn_move.o(.rodata); + src/field/decoration_inventory.o(.rodata); + src/field/roamer.o(.rodata); data/battle_tower.o(.rodata); - src/use_pokeblock.o(.rodata); - src/battle_controller_wally.o(.rodata); - src/player_pc.o(.rodata); - src/intro.o(.rodata); + src/field/use_pokeblock.o(.rodata); + src/battle/battle_controller_wally.o(.rodata); + src/field/player_pc.o(.rodata); + src/scene/intro.o(.rodata); data/battle_anim_813F0F4.o(.rodata); - src/hall_of_fame.o(.rodata); - src/credits.o(.rodata); + src/scene/hall_of_fame.o(.rodata); + src/scene/credits.o(.rodata); data/credits.o(.rodata); - src/lottery_corner.o(.rodata); - src/diploma.o(.rodata); + src/field/lottery_corner.o(.rodata); + src/field/diploma.o(.rodata); src/strings.o(.rodata); - src/berry_tag_screen.o(.rodata); - src/save_failed_screen.o(.rodata); - src/pokeblock_feed.o(.rodata); + src/field/berry_tag_screen.o(.rodata); + src/engine/save_failed_screen.o(.rodata); + src/pokemon/pokeblock_feed.o(.rodata); data/intro_credits_graphics.o(.rodata); - src/evolution_graphics.o(.rodata); + src/scene/evolution_graphics.o(.rodata); data/bard_music.o(.rodata); data/unknown_debug_menu.o(.rodata); data/strings2.o(.rodata); data/menu_cursor.o(.rodata); data/mystery_event_msg.o(.rodata); - src/m4a_tables.o(.rodata); + src/libs/m4a_tables.o(.rodata); data/sound_data.o(.rodata); } =0 @@ -898,11 +898,11 @@ SECTIONS { lib_rodata : ALIGN(4) { - src/agb_flash.o(.rodata); - src/agb_flash_1m.o(.rodata); - src/agb_flash_mx.o(.rodata); - src/agb_flash_le.o(.rodata); - src/siirtc.o(.rodata); + src/libs/agb_flash.o(.rodata); + src/libs/agb_flash_1m.o(.rodata); + src/libs/agb_flash_mx.o(.rodata); + src/libs/agb_flash_le.o(.rodata); + src/libs/siirtc.o(.rodata); tools/agbcc/lib/libgcc.a:_udivdi3.o(.rodata); } =0 diff --git a/src/battle_2.c b/src/battle/battle_2.c index 3cdea07be..770aa1209 100644 --- a/src/battle_2.c +++ b/src/battle/battle_2.c @@ -1924,14 +1924,14 @@ void sub_8011384(void) } if (GetBankSide(gActiveBank) == 1 && !(gBattleTypeFlags & (BATTLE_TYPE_EREADER_TRAINER | BATTLE_TYPE_BATTLE_TOWER | BATTLE_TYPE_LINK))) - GetNationalPokedexFlag(SpeciesToNationalPokedexNum(gBattleMons[gActiveBank].species), 2); + GetSetPokedexFlag(SpeciesToNationalPokedexNum(gBattleMons[gActiveBank].species), 2); } else { if (GetBankSide(gActiveBank) == 1 && !(gBattleTypeFlags & (BATTLE_TYPE_EREADER_TRAINER | BATTLE_TYPE_BATTLE_TOWER | BATTLE_TYPE_LINK))) { - GetNationalPokedexFlag(SpeciesToNationalPokedexNum(gBattleMons[gActiveBank].species), 2); + GetSetPokedexFlag(SpeciesToNationalPokedexNum(gBattleMons[gActiveBank].species), 2); EmitLoadPokeSprite(0); MarkBufferBankForExecution(gActiveBank); } @@ -2086,7 +2086,7 @@ void bc_801362C(void) { if (GetBankSide(gActiveBank) == 1 && !(gBattleTypeFlags & (BATTLE_TYPE_EREADER_TRAINER | BATTLE_TYPE_BATTLE_TOWER | BATTLE_TYPE_LINK))) - GetNationalPokedexFlag(SpeciesToNationalPokedexNum(gBattleMons[gActiveBank].species), 2); + GetSetPokedexFlag(SpeciesToNationalPokedexNum(gBattleMons[gActiveBank].species), 2); } gBattleMainFunc = sub_8011970; } @@ -2168,7 +2168,7 @@ void BattleBeginFirstTurn(void) { for (j = i + 1; j < gNoOfAllBanks; j++) { - if (b_first_side(gTurnOrder[i], gTurnOrder[j], 1) != 0) + if (GetWhoStrikesFirst(gTurnOrder[i], gTurnOrder[j], 1) != 0) sub_8012FBC(i, j); } } diff --git a/src/battle_3.c b/src/battle/battle_3.c index f04e722c4..b59757f00 100644 --- a/src/battle_3.c +++ b/src/battle/battle_3.c @@ -378,7 +378,7 @@ u8 UpdateTurnCounters(void) s32 j; for (j = i + 1; j < gNoOfAllBanks; j++) { - if (b_first_side(gTurnOrder[i], gTurnOrder[j], 0)) + if (GetWhoStrikesFirst(gTurnOrder[i], gTurnOrder[j], 0)) sub_8012FBC(i, j); } } diff --git a/src/battle_4.c b/src/battle/battle_4.c index 65ea765cf..e4a4895b5 100644 --- a/src/battle_4.c +++ b/src/battle/battle_4.c @@ -93,6 +93,7 @@ extern u16 gUnknown_02024C2C[4]; //last used moves 2, used by sketch extern u16 gUnknown_030041B0; extern u16 gUnknown_02024C4C[4]; //last used moves by banks, another one extern u8 gCurrentMoveTurn; +extern u16 gTrappingMoves[]; //extern functions u8 AtkCanceller_UnableToUseMove(void); @@ -122,7 +123,7 @@ bool8 IsTradedMon(struct Pokemon*); void b_movescr_stack_pop_cursor(void); void SwitchInClearStructs(void); u8* ConvertIntToDecimalStringN(u8*, s32, u8, u8); -u8 GetNationalPokedexFlag(u16 nationalNum, u8 caseID); +u8 GetSetPokedexFlag(u16 nationalNum, u8 caseID); u16 SpeciesToNationalPokedexNum(u16 species); u8 sub_803FC34(u8 bank); u16 sub_803FBFC(u8 a); @@ -199,6 +200,9 @@ extern u8 BattleScript_TrainerBallBlock[]; extern u8 BattleScript_WallyBallThrow[]; extern u8 BattleScript_SuccessBallThrow[]; extern u8 BattleScript_ShakeBallThrow[]; +extern u8 BattleScript_AllStatsUp[]; +extern u8 BattleScript_AtkDefDown[]; +extern u8 BattleScript_SAtkDown2[]; extern u8 gUnknown_081D919F[]; //spikes1 extern u8 gUnknown_081D9171[]; //spikes2 @@ -211,6 +215,11 @@ extern u8 BattleScript_CastformChange[]; extern u8 gUnknown_081D9834[]; extern u8 gUnknown_081D90FC[]; //bs random switchout extern u8 gUnknown_081D95DB[]; //bs payday money give +extern u8 gUnknown_081D8C58[]; +extern u8 gUnknown_081D8C65[]; +extern u8 gUnknown_081D9156[]; +extern u8 gUnknown_081D9468[]; + //useful macros //read via orr @@ -408,6 +417,7 @@ static void atk85_stockpile(void); static void atk86_stockpiletobasedamage(void); static void atk87_stockpiletohpheal(void); static void atk88_negativedamage(void); +static u8 ChangeStatBuffs(s8, u8, u8, u8*); static void atk89_statbuffchange(void); static void atk8A_normalisebuffs(void); static void atk8B_setbide(void); @@ -862,19 +872,19 @@ static const u32 gStatusFlagsForMoveEffects[] = 0x00000000 }; -extern const u8 BattleScript_1D963E[]; -extern const u8 BattleScript_1D965A[]; -extern const u8 BattleScript_1D9669[]; -extern const u8 BattleScript_1D9678[]; -extern const u8 BattleScript_1D9687[]; -extern const u8 BattleScript_1D969D[]; -extern const u8 BattleScript_1D96BA[]; -extern const u8 BattleScript_1D9696[]; -extern const u8 BattleScript_1D96B1[]; -extern const u8 BattleScript_1D96AA[]; -extern const u8 BattleScript_1D96C8[]; +extern u8 BattleScript_1D963E[]; +extern u8 BattleScript_1D965A[]; +extern u8 BattleScript_1D9669[]; +extern u8 BattleScript_1D9678[]; +extern u8 BattleScript_1D9687[]; +extern u8 BattleScript_1D969D[]; +extern u8 BattleScript_1D96BA[]; +extern u8 BattleScript_1D9696[]; +extern u8 BattleScript_1D96B1[]; +extern u8 BattleScript_1D96AA[]; +extern u8 BattleScript_1D96C8[]; -const u8* const gMoveEffectBS_Ptrs[] = +u8* const gMoveEffectBS_Ptrs[] = { BattleScript_1D963E, BattleScript_1D963E, @@ -947,7 +957,7 @@ static const u16 sUnknown_081FACFE[] = //banned moves to copy 0xFFFF }; -static const u8 sUnknown_081FAD26[] = +static const u8 sUnknown_081FAD26[] = //reversal+flail HP thresholds to power { 1, 200, 4, 150, @@ -1445,73 +1455,71 @@ static void atk06_typecalc(void) { int i = 0; u8 move_type; - if (gCurrentMove == MOVE_STRUGGLE) {goto END;} - - if (BATTLE_STRUCT->dynamicMoveType) - move_type = BATTLE_STRUCT->dynamicMoveType & 0x3F; - else - move_type = gBattleMoves[gCurrentMove].type; - - //check stab - if (gBattleMons[gBankAttacker].type1 == move_type || gBattleMons[gBankAttacker].type2 == move_type) + if (gCurrentMove != MOVE_STRUGGLE) { - gBattleMoveDamage = gBattleMoveDamage * 15; - gBattleMoveDamage = gBattleMoveDamage / 10; - } + if (BATTLE_STRUCT->dynamicMoveType) + move_type = BATTLE_STRUCT->dynamicMoveType & 0x3F; + else + move_type = gBattleMoves[gCurrentMove].type; - if (gBattleMons[gBankTarget].ability == ABILITY_LEVITATE && move_type == TYPE_GROUND) - { - gLastUsedAbility = gBattleMons[gBankTarget].ability; - gBattleMoveFlags |= (MOVESTATUS_MISSED | MOVESTATUS_NOTAFFECTED); - gMoveHitWith[gBankTarget] = 0; - gUnknown_02024C44[gBankTarget] = 0; - gBattleCommunication[6] = move_type; - RecordAbilityBattle(gBankTarget, gLastUsedAbility); - } - else - { - while (gTypeEffectiveness[i]!= TYPE_ENDTABLE) + //check stab + if (gBattleMons[gBankAttacker].type1 == move_type || gBattleMons[gBankAttacker].type2 == move_type) { - if (gTypeEffectiveness[i] == TYPE_FORESIGHT) - { - if (gBattleMons[gBankTarget].status2 & STATUS2_FORESIGHT) - break; - i += 3; - continue; - } + gBattleMoveDamage = gBattleMoveDamage * 15; + gBattleMoveDamage = gBattleMoveDamage / 10; + } - else if (gTypeEffectiveness[i] == move_type) + if (gBattleMons[gBankTarget].ability == ABILITY_LEVITATE && move_type == TYPE_GROUND) + { + gLastUsedAbility = gBattleMons[gBankTarget].ability; + gBattleMoveFlags |= (MOVESTATUS_MISSED | MOVESTATUS_NOTAFFECTED); + gMoveHitWith[gBankTarget] = 0; + gUnknown_02024C44[gBankTarget] = 0; + gBattleCommunication[6] = move_type; + RecordAbilityBattle(gBankTarget, gLastUsedAbility); + } + else + { + while (gTypeEffectiveness[i]!= TYPE_ENDTABLE) { - //check type1 - if (gTypeEffectiveness[i + 1] == gBattleMons[gBankTarget].type1) - ModulateDmgByType(gTypeEffectiveness[i + 2]); - //check type2 - if (gTypeEffectiveness[i + 1] == gBattleMons[gBankTarget].type2 && - gBattleMons[gBankTarget].type1 != gBattleMons[gBankTarget].type2) - ModulateDmgByType(gTypeEffectiveness[i + 2]); + if (gTypeEffectiveness[i] == TYPE_FORESIGHT) + { + if (gBattleMons[gBankTarget].status2 & STATUS2_FORESIGHT) + break; + i += 3; + continue; + } + + else if (gTypeEffectiveness[i] == move_type) + { + //check type1 + if (gTypeEffectiveness[i + 1] == gBattleMons[gBankTarget].type1) + ModulateDmgByType(gTypeEffectiveness[i + 2]); + //check type2 + if (gTypeEffectiveness[i + 1] == gBattleMons[gBankTarget].type2 && + gBattleMons[gBankTarget].type1 != gBattleMons[gBankTarget].type2) + ModulateDmgByType(gTypeEffectiveness[i + 2]); + } + i += 3; } - i += 3; } - } - if (gBattleMons[gBankTarget].ability == ABILITY_WONDER_GUARD && AttacksThisTurn(gBankAttacker, gCurrentMove) == 2 - && (!(gBattleMoveFlags & MOVESTATUS_SUPEREFFECTIVE) || ((gBattleMoveFlags & (MOVESTATUS_SUPEREFFECTIVE | MOVESTATUS_NOTVERYEFFECTIVE)) == (MOVESTATUS_SUPEREFFECTIVE | MOVESTATUS_NOTVERYEFFECTIVE))) - && gBattleMoves[gCurrentMove].power) - { - gLastUsedAbility = ABILITY_WONDER_GUARD; - gBattleMoveFlags |= MOVESTATUS_MISSED; - gMoveHitWith[gBankTarget] = 0; - gUnknown_02024C44[gBankTarget] = 0; - gBattleCommunication[6] = 3; - RecordAbilityBattle(gBankTarget, gLastUsedAbility); + if (gBattleMons[gBankTarget].ability == ABILITY_WONDER_GUARD && AttacksThisTurn(gBankAttacker, gCurrentMove) == 2 + && (!(gBattleMoveFlags & MOVESTATUS_SUPEREFFECTIVE) || ((gBattleMoveFlags & (MOVESTATUS_SUPEREFFECTIVE | MOVESTATUS_NOTVERYEFFECTIVE)) == (MOVESTATUS_SUPEREFFECTIVE | MOVESTATUS_NOTVERYEFFECTIVE))) + && gBattleMoves[gCurrentMove].power) + { + gLastUsedAbility = ABILITY_WONDER_GUARD; + gBattleMoveFlags |= MOVESTATUS_MISSED; + gMoveHitWith[gBankTarget] = 0; + gUnknown_02024C44[gBankTarget] = 0; + gBattleCommunication[6] = 3; + RecordAbilityBattle(gBankTarget, gLastUsedAbility); + } + if (gBattleMoveFlags & MOVESTATUS_NOTAFFECTED) + gProtectStructs[gBankAttacker].notEffective = 1; } - if (gBattleMoveFlags & MOVESTATUS_NOTAFFECTED) - gProtectStructs[gBankAttacker].notEffective = 1; - - END: - gBattlescriptCurrInstr++; + gBattlescriptCurrInstr++; } - static void b_wonderguard_and_levitate(void) { u8 flags = 0; @@ -1620,7 +1628,6 @@ static void ModulateDmgByType2(u8 multiplier, u16 move, u8* flags) //a literal c } } -#ifdef NONMATCHING u8 TypeCalc(u16 move, u8 bank_atk, u8 bank_def) { int i = 0; @@ -1662,7 +1669,7 @@ u8 TypeCalc(u16 move, u8 bank_atk, u8 bank_def) ModulateDmgByType2(gTypeEffectiveness[i + 2], move, &flags); //check type2 if (gTypeEffectiveness[i + 1] == gBattleMons[bank_def].type2 && - gBattleMons[bank_def].type1 != gBattleMons[bank_def].type2) + gBattleMons[gBankTarget /* what the christ */].type1 != gBattleMons[bank_def].type2) ModulateDmgByType2(gTypeEffectiveness[i + 2], move, &flags); } i += 3; @@ -1678,254 +1685,6 @@ u8 TypeCalc(u16 move, u8 bank_atk, u8 bank_def) } return flags; } -#else -__attribute__((naked)) -u8 TypeCalc(u16 move, u8 bank_atk, u8 bank_def) -{ - asm(".syntax unified\n\ - push {r4-r7,lr}\n\ - mov r7, r10\n\ - mov r6, r9\n\ - mov r5, r8\n\ - push {r5-r7}\n\ - sub sp, 0x14\n\ - lsls r0, 16\n\ - lsrs r0, 16\n\ - mov r10, r0\n\ - lsls r1, 24\n\ - lsrs r1, 24\n\ - str r1, [sp, 0x4]\n\ - lsls r2, 24\n\ - lsrs r2, 24\n\ - mov r9, r2\n\ - movs r7, 0\n\ - mov r0, sp\n\ - strb r7, [r0]\n\ - mov r0, r10\n\ - cmp r0, 0xA5\n\ - bne _0801D2AE\n\ - movs r0, 0\n\ - b _0801D43A\n\ - _0801D2AE:\n\ - ldr r1, _0801D31C @ =gBattleMoves\n\ - mov r3, r10\n\ - lsls r2, r3, 1\n\ - adds r0, r2, r3\n\ - lsls r0, 2\n\ - adds r0, r1\n\ - ldrb r0, [r0, 0x2]\n\ - str r0, [sp, 0x8]\n\ - ldr r1, _0801D320 @ =gBattleMons\n\ - movs r0, 0x58\n\ - ldr r3, [sp, 0x4]\n\ - muls r0, r3\n\ - adds r3, r0, r1\n\ - adds r0, r3, 0\n\ - adds r0, 0x21\n\ - ldrb r0, [r0]\n\ - str r2, [sp, 0xC]\n\ - adds r5, r1, 0\n\ - ldr r1, [sp, 0x8]\n\ - cmp r0, r1\n\ - beq _0801D2E2\n\ - adds r0, r3, 0\n\ - adds r0, 0x22\n\ - ldrb r0, [r0]\n\ - cmp r0, r1\n\ - bne _0801D2F4\n\ - _0801D2E2:\n\ - ldr r4, _0801D324 @ =gBattleMoveDamage\n\ - ldr r1, [r4]\n\ - lsls r0, r1, 4\n\ - subs r0, r1\n\ - str r0, [r4]\n\ - movs r1, 0xA\n\ - bl __divsi3\n\ - str r0, [r4]\n\ - _0801D2F4:\n\ - movs r0, 0x58\n\ - mov r2, r9\n\ - muls r2, r0\n\ - adds r0, r2, 0\n\ - adds r0, r5\n\ - adds r0, 0x20\n\ - ldrb r0, [r0]\n\ - cmp r0, 0x1A\n\ - bne _0801D328\n\ - ldr r3, [sp, 0x8]\n\ - cmp r3, 0x4\n\ - bne _0801D328\n\ - movs r1, 0x9\n\ - mov r0, sp\n\ - ldrb r0, [r0]\n\ - orrs r0, r1\n\ - mov r1, sp\n\ - strb r0, [r1]\n\ - b _0801D3DC\n\ - .align 2, 0\n\ - _0801D31C: .4byte gBattleMoves\n\ - _0801D320: .4byte gBattleMons\n\ - _0801D324: .4byte gBattleMoveDamage\n\ - _0801D328:\n\ - ldr r1, _0801D344 @ =gTypeEffectiveness\n\ - adds r0, r7, r1\n\ - ldrb r0, [r0]\n\ - adds r2, r1, 0\n\ - cmp r0, 0xFF\n\ - beq _0801D3DC\n\ - cmp r0, 0xFE\n\ - bne _0801D34C\n\ - movs r0, 0x58\n\ - mov r1, r9\n\ - muls r1, r0\n\ - adds r0, r1, 0\n\ - b _0801D3CA\n\ - .align 2, 0\n\ - _0801D344: .4byte gTypeEffectiveness\n\ - _0801D348:\n\ - adds r7, 0x3\n\ - b _0801D3B6\n\ - _0801D34C:\n\ - ldr r6, _0801D44C @ =gTypeEffectiveness\n\ - adds r0, r7, r6\n\ - ldrb r0, [r0]\n\ - ldr r2, [sp, 0x8]\n\ - cmp r0, r2\n\ - bne _0801D3B0\n\ - adds r1, r7, 0x1\n\ - adds r1, r6\n\ - ldr r3, _0801D450 @ =gBattleMons\n\ - mov r8, r3\n\ - movs r3, 0x58\n\ - mov r0, r9\n\ - muls r0, r3\n\ - mov r2, r8\n\ - adds r5, r0, r2\n\ - adds r0, r5, 0\n\ - adds r0, 0x21\n\ - ldrb r4, [r1]\n\ - ldrb r0, [r0]\n\ - cmp r4, r0\n\ - bne _0801D388\n\ - adds r0, r7, 0x2\n\ - adds r0, r6\n\ - ldrb r0, [r0]\n\ - mov r1, r10\n\ - mov r2, sp\n\ - str r3, [sp, 0x10]\n\ - bl ModulateDmgByType2\n\ - ldr r3, [sp, 0x10]\n\ - _0801D388:\n\ - adds r0, r5, 0\n\ - adds r0, 0x22\n\ - ldrb r0, [r0]\n\ - cmp r4, r0\n\ - bne _0801D3B0\n\ - ldr r0, _0801D454 @ =gBankTarget\n\ - ldrb r0, [r0]\n\ - muls r0, r3\n\ - add r0, r8\n\ - adds r0, 0x21\n\ - ldrb r0, [r0]\n\ - cmp r0, r4\n\ - beq _0801D3B0\n\ - adds r0, r7, 0x2\n\ - adds r0, r6\n\ - ldrb r0, [r0]\n\ - mov r1, r10\n\ - mov r2, sp\n\ - bl ModulateDmgByType2\n\ - _0801D3B0:\n\ - adds r7, 0x3\n\ - ldr r5, _0801D450 @ =gBattleMons\n\ - ldr r2, _0801D44C @ =gTypeEffectiveness\n\ - _0801D3B6:\n\ - adds r0, r7, r2\n\ - ldrb r0, [r0]\n\ - cmp r0, 0xFF\n\ - beq _0801D3DC\n\ - cmp r0, 0xFE\n\ - bne _0801D34C\n\ - movs r0, 0x58\n\ - mov r3, r9\n\ - muls r3, r0\n\ - adds r0, r3, 0\n\ - _0801D3CA:\n\ - adds r1, r5, 0\n\ - adds r1, 0x50\n\ - adds r0, r1\n\ - ldr r0, [r0]\n\ - movs r1, 0x80\n\ - lsls r1, 22\n\ - ands r0, r1\n\ - cmp r0, 0\n\ - beq _0801D348\n\ - _0801D3DC:\n\ - movs r0, 0x58\n\ - mov r1, r9\n\ - muls r1, r0\n\ - adds r0, r1, 0\n\ - adds r0, r5\n\ - adds r0, 0x20\n\ - ldrb r0, [r0]\n\ - cmp r0, 0x19\n\ - bne _0801D436\n\ - mov r0, sp\n\ - ldrb r1, [r0]\n\ - movs r0, 0x1\n\ - ands r0, r1\n\ - cmp r0, 0\n\ - bne _0801D436\n\ - ldr r0, [sp, 0x4]\n\ - mov r1, r10\n\ - bl AttacksThisTurn\n\ - lsls r0, 24\n\ - lsrs r1, r0, 24\n\ - cmp r1, 0x2\n\ - bne _0801D436\n\ - mov r0, sp\n\ - ldrb r3, [r0]\n\ - adds r0, r1, 0\n\ - ands r0, r3\n\ - cmp r0, 0\n\ - beq _0801D41E\n\ - movs r0, 0x6\n\ - ands r0, r3\n\ - cmp r0, 0x6\n\ - bne _0801D436\n\ - _0801D41E:\n\ - ldr r0, _0801D458 @ =gBattleMoves\n\ - ldr r1, [sp, 0xC]\n\ - add r1, r10\n\ - lsls r1, 2\n\ - adds r1, r0\n\ - ldrb r0, [r1, 0x1]\n\ - cmp r0, 0\n\ - beq _0801D436\n\ - mov r0, sp\n\ - movs r1, 0x1\n\ - orrs r1, r3\n\ - strb r1, [r0]\n\ - _0801D436:\n\ - mov r0, sp\n\ - ldrb r0, [r0]\n\ - _0801D43A:\n\ - add sp, 0x14\n\ - pop {r3-r5}\n\ - mov r8, r3\n\ - mov r9, r4\n\ - mov r10, r5\n\ - pop {r4-r7}\n\ - pop {r1}\n\ - bx r1\n\ - .align 2, 0\n\ - _0801D44C: .4byte gTypeEffectiveness\n\ - _0801D450: .4byte gBattleMons\n\ - _0801D454: .4byte gBankTarget\n\ - _0801D458: .4byte gBattleMoves\n\ - .syntax divided\n"); -} -#endif // NONMATCHING u8 AI_TypeCalc(u16 move, u16 species, u8 ability) { @@ -2510,7 +2269,7 @@ void SetMoveEffect(bool8 primary, u8 certainArg) #define EffectAffectsUser 0x40 register u8 certain asm("r5") = certainArg; register bool32 StatusChanged asm("r10") = 0; - register int AffectsUser asm("r6") = 0; //0x40 otherwise + register int AffectsUser asm("r6") = 0; //0x40 otherwise bool32 NoSunCanFreeze = 1; if (gBattleCommunication[MOVE_EFFECT_BYTE] & EffectAffectsUser) @@ -2526,16 +2285,16 @@ void SetMoveEffect(bool8 primary, u8 certainArg) BATTLE_STRUCT->scriptingActive = gBankAttacker; } - if (gBattleMons[gEffectBank].ability_id == ABILITY_SHIELD_DUST && !(gHitMarker & HITMARKER_IGNORE_SAFEGUARD) && + if (gBattleMons[gEffectBank].ability == ABILITY_SHIELD_DUST && !(gHitMarker & HITMARKER_IGNORE_SAFEGUARD) && !primary && gBattleCommunication[MOVE_EFFECT_BYTE] <= 9) {gBattlescriptCurrInstr++; return;} - if (gSideAffecting[get_bank_identity(gEffectBank) & 1] & SIDE_STATUS_SAFEGUARD && !(gHitMarker & HITMARKER_IGNORE_SAFEGUARD) && + if (gSideAffecting[GetBankIdentity(gEffectBank) & 1] & SIDE_STATUS_SAFEGUARD && !(gHitMarker & HITMARKER_IGNORE_SAFEGUARD) && !primary && gBattleCommunication[MOVE_EFFECT_BYTE] <= 7) {gBattlescriptCurrInstr++; return;} //make sure at least ONE HP except payday and thief - if (gBattleMons[gEffectBank].current_hp == 0 && gBattleCommunication[MOVE_EFFECT_BYTE] != 0xB && gBattleCommunication[MOVE_EFFECT_BYTE] != 0x1F) + if (gBattleMons[gEffectBank].hp == 0 && gBattleCommunication[MOVE_EFFECT_BYTE] != 0xB && gBattleCommunication[MOVE_EFFECT_BYTE] != 0x1F) {gBattlescriptCurrInstr++; return;} if (gBattleMons[gEffectBank].status2 & STATUS2_SUBSTITUTE && AffectsUser != EffectAffectsUser) @@ -2547,81 +2306,82 @@ void SetMoveEffect(bool8 primary, u8 certainArg) { case STATUS_SLEEP: //check active uproar - if (gBattleMons[gEffectBank].ability_id != ABILITY_SOUNDPROOF) + if (gBattleMons[gEffectBank].ability != ABILITY_SOUNDPROOF) { for (gActiveBank = 0; gActiveBank < gNoOfAllBanks && !(gBattleMons[gActiveBank].status2 & STATUS2_UPROAR); gActiveBank++) {} } else gActiveBank = gNoOfAllBanks; - if (gBattleMons[gEffectBank].status) {break;} + if (gBattleMons[gEffectBank].status1) {break;} if (gActiveBank != gNoOfAllBanks) {break;} //nice way of checking uproar... - if (gBattleMons[gEffectBank].ability_id == ABILITY_VITAL_SPIRIT) {break;} - if (gBattleMons[gEffectBank].ability_id == ABILITY_INSOMNIA) {break;} + if (gBattleMons[gEffectBank].ability == ABILITY_VITAL_SPIRIT) {break;} + if (gBattleMons[gEffectBank].ability == ABILITY_INSOMNIA) {break;} - b_cancel_multi_turn_move_maybe(gEffectBank); + CancelMultiTurnMoves(gEffectBank); StatusChanged = 1; break; case STATUS_POISON: - if (gBattleMons[gEffectBank].ability_id == ABILITY_IMMUNITY && (primary == 1 || certain == 0x80)) + if (gBattleMons[gEffectBank].ability == ABILITY_IMMUNITY && (primary == 1 || certain == 0x80)) { gLastUsedAbility = ABILITY_IMMUNITY; - RecordAbility(gEffectBank, ABILITY_IMMUNITY); + RecordAbilityBattle(gEffectBank, ABILITY_IMMUNITY); b_movescr_stack_push(gBattlescriptCurrInstr + 1); //_0801E664: - gBattlescriptCurrInstr = BS_PSN_PREVENTION; + gBattlescriptCurrInstr = BattleScript_PSNPrevention; if (gHitMarker & HITMARKER_IGNORE_SAFEGUARD) { - gBattleCommunication.multistring_chooser = 1; + gBattleCommunication[MULTISTRING_CHOOSER] = 1; gHitMarker &= ~(HITMARKER_IGNORE_SAFEGUARD); return; } else - {gBattleCommunication.multistring_chooser = 0; return;} + {gBattleCommunication[MULTISTRING_CHOOSER] = 0; return;} } if ((gBattleMons[gEffectBank].type1 == TYPE_POISON || gBattleMons[gEffectBank].type2 == TYPE_POISON || gBattleMons[gEffectBank].type1 == TYPE_STEEL || gBattleMons[gEffectBank].type2 == TYPE_STEEL) && !(gHitMarker & HITMARKER_IGNORE_SAFEGUARD) && (primary == 1 || certain == 0x80)) { b_movescr_stack_push(gBattlescriptCurrInstr + 1); - gBattlescriptCurrInstr = BS_PSN_PREVENTION; - gBattleCommunication.multistring_chooser = 2; + gBattlescriptCurrInstr = BattleScript_PSNPrevention; + gBattleCommunication[MULTISTRING_CHOOSER] = 2; return; } if (gBattleMons[gEffectBank].type1 == TYPE_POISON) {break;} if (gBattleMons[gEffectBank].type2 == TYPE_POISON) {break;} if (gBattleMons[gEffectBank].type1 == TYPE_STEEL) {break;} if (gBattleMons[gEffectBank].type2 == TYPE_STEEL) {break;} - if (gBattleMons[gEffectBank].status) {break;} - if (gBattleMons[gEffectBank].ability_id == ABILITY_IMMUNITY) {break;} + if (gBattleMons[gEffectBank].status1) {break;} + if (gBattleMons[gEffectBank].ability == ABILITY_IMMUNITY) {break;} + StatusChanged = 1; break; case STATUS_BURN: - if (gBattleMons[gEffectBank].ability_id == ABILITY_WATER_VEIL && (primary == 1 || certain == 0x80)) + if (gBattleMons[gEffectBank].ability == ABILITY_WATER_VEIL && (primary == 1 || certain == 0x80)) { gLastUsedAbility = ABILITY_WATER_VEIL; - RecordAbility(gEffectBank, ABILITY_WATER_VEIL); + RecordAbilityBattle(gEffectBank, ABILITY_WATER_VEIL); b_movescr_stack_push(gBattlescriptCurrInstr + 1); //_0801E664: - gBattlescriptCurrInstr = BS_BRN_PREVENTION; + gBattlescriptCurrInstr = BattleScript_BRNPrevention; if (gHitMarker & HITMARKER_IGNORE_SAFEGUARD) { - gBattleCommunication.multistring_chooser = 1; + gBattleCommunication[MULTISTRING_CHOOSER] = 1; gHitMarker &= ~(HITMARKER_IGNORE_SAFEGUARD); return; } else - {gBattleCommunication.multistring_chooser = 0; return;} + {gBattleCommunication[MULTISTRING_CHOOSER] = 0; return;} } if ((gBattleMons[gEffectBank].type1 == TYPE_FIRE || gBattleMons[gEffectBank].type2 == TYPE_FIRE) && !(gHitMarker & HITMARKER_IGNORE_SAFEGUARD) && (primary == 1 || certain == 0x80)) { b_movescr_stack_push(gBattlescriptCurrInstr + 1); - gBattlescriptCurrInstr = BS_BRN_PREVENTION; - gBattleCommunication.multistring_chooser = 2; + gBattlescriptCurrInstr = BattleScript_BRNPrevention; + gBattleCommunication[MULTISTRING_CHOOSER] = 2; return; } if (gBattleMons[gEffectBank].type1 == TYPE_FIRE) {break;} if (gBattleMons[gEffectBank].type2 == TYPE_FIRE) {break;} - if (gBattleMons[gEffectBank].ability_id == ABILITY_WATER_VEIL) {break;} + if (gBattleMons[gEffectBank].ability == ABILITY_WATER_VEIL) {break;} if (gBattleMons[gEffectBank].status1 == 0) {break;} StatusChanged = 1; break; @@ -2629,70 +2389,70 @@ void SetMoveEffect(bool8 primary, u8 certainArg) if (WEATHER_HAS_EFFECT && gBattleWeather & WEATHER_SUN_ANY) {NoSunCanFreeze = 0;} if (gBattleMons[gEffectBank].type1 == TYPE_ICE) {break;} if (gBattleMons[gEffectBank].type2 == TYPE_ICE) {break;} - if (gBattleMons[gEffectBank].status) {break;} + if (gBattleMons[gEffectBank].status1) {break;} if (NoSunCanFreeze == 0) {break;} - if (gBattleMons[gEffectBank].ability_id == ABILITY_MAGMA_ARMOR) {break;} + if (gBattleMons[gEffectBank].ability == ABILITY_MAGMA_ARMOR) {break;} - b_cancel_multi_turn_move_maybe(gEffectBank); + CancelMultiTurnMoves(gEffectBank); StatusChanged = 1; break; case STATUS_PARALYSIS: - if (gBattleMons[gEffectBank].ability_id == ABILITY_LIMBER) + if (gBattleMons[gEffectBank].ability == ABILITY_LIMBER) { if ((primary == 1 || certain == 0x80)) { gLastUsedAbility = ABILITY_LIMBER; - RecordAbility(gEffectBank, ABILITY_LIMBER); + RecordAbilityBattle(gEffectBank, ABILITY_LIMBER); b_movescr_stack_push(gBattlescriptCurrInstr + 1); //_0801E664: - gBattlescriptCurrInstr = BS_PRLZ_PREVENTION; + gBattlescriptCurrInstr = BattleScript_PRLZPrevention; if (gHitMarker & HITMARKER_IGNORE_SAFEGUARD) { - gBattleCommunication.multistring_chooser = 1; + gBattleCommunication[MULTISTRING_CHOOSER] = 1; gHitMarker &= ~(HITMARKER_IGNORE_SAFEGUARD); return; } else - {gBattleCommunication.multistring_chooser = 0; return;} + {gBattleCommunication[MULTISTRING_CHOOSER] = 0; return;} } else {break;} } - if (gBattleMons[gEffectBank].status) {break;} + if (gBattleMons[gEffectBank].status1) {break;} StatusChanged = 1; break; case STATUS_TOXIC_POISON: - if (gBattleMons[gEffectBank].ability_id == ABILITY_IMMUNITY && (primary == 1 || certain == 0x80)) + if (gBattleMons[gEffectBank].ability == ABILITY_IMMUNITY && (primary == 1 || certain == 0x80)) { gLastUsedAbility = ABILITY_IMMUNITY; - RecordAbility(gEffectBank, ABILITY_IMMUNITY); + RecordAbilityBattle(gEffectBank, ABILITY_IMMUNITY); b_movescr_stack_push(gBattlescriptCurrInstr + 1); //_0801E664: - gBattlescriptCurrInstr = BS_PSN_PREVENTION; + gBattlescriptCurrInstr = BattleScript_PSNPrevention; if (gHitMarker & HITMARKER_IGNORE_SAFEGUARD) { - gBattleCommunication.multistring_chooser = 1; + gBattleCommunication[MULTISTRING_CHOOSER] = 1; gHitMarker &= ~(HITMARKER_IGNORE_SAFEGUARD); return; } else - {gBattleCommunication.multistring_chooser = 0; return;} + {gBattleCommunication[MULTISTRING_CHOOSER] = 0; return;} } if ((gBattleMons[gEffectBank].type1 == TYPE_POISON || gBattleMons[gEffectBank].type2 == TYPE_POISON || gBattleMons[gEffectBank].type1 == TYPE_STEEL || gBattleMons[gEffectBank].type2 == TYPE_STEEL) && !(gHitMarker & HITMARKER_IGNORE_SAFEGUARD) && (primary == 1 || certain == 0x80)) { b_movescr_stack_push(gBattlescriptCurrInstr + 1); - gBattlescriptCurrInstr = BS_PSN_PREVENTION; - gBattleCommunication.multistring_chooser = 2; + gBattlescriptCurrInstr = BattleScript_PSNPrevention; + gBattleCommunication[MULTISTRING_CHOOSER] = 2; return; } - if (gBattleMons[gEffectBank].status) {break;} + if (gBattleMons[gEffectBank].status1) {break;} if (gBattleMons[gEffectBank].type1 != TYPE_POISON && gBattleMons[gEffectBank].type2 != TYPE_POISON && gBattleMons[gEffectBank].type1 != TYPE_STEEL && gBattleMons[gEffectBank].type2 != TYPE_STEEL) { - if (gBattleMons[gEffectBank].ability_id == ABILITY_IMMUNITY) {break;} - gBattleMons[gEffectBank].status1 |= ~(STATUS_POISON); //TODO: fix OR to AND + if (gBattleMons[gEffectBank].ability == ABILITY_IMMUNITY) {break;} + gBattleMons[gEffectBank].status1 &= ~(0x9); //This gets (correctly) optimized out... StatusChanged = 1; break; } @@ -2707,20 +2467,20 @@ void SetMoveEffect(bool8 primary, u8 certainArg) gBattleMons[gEffectBank].status1 |= ((Random() & 3) + 2); else gBattleMons[gEffectBank].status1 |= gStatusFlagsForMoveEffects[gBattleCommunication[MOVE_EFFECT_BYTE]]; - gBattlescriptCurrInstr = MoveEffectBS_ptrs[gBattleCommunication[MOVE_EFFECT_BYTE]]; + gBattlescriptCurrInstr = gMoveEffectBS_Ptrs[gBattleCommunication[MOVE_EFFECT_BYTE]]; gActiveBank = gEffectBank; - bb2_setattributes_in_battle(0, REQUEST_STATUS_BATTLE, 0, 4, &gBattleMons[gEffectBank].status); - mark_buffer_bank_for_execution(gActiveBank); + EmitSetAttributes(0, REQUEST_STATUS_BATTLE, 0, 4, &gBattleMons[gEffectBank].status1); + MarkBufferBankForExecution(gActiveBank); if (gHitMarker & HITMARKER_IGNORE_SAFEGUARD) { - gBattleCommunication.multistring_chooser = 1; + gBattleCommunication[MULTISTRING_CHOOSER] = 1; gHitMarker &= ~(HITMARKER_IGNORE_SAFEGUARD); } else - gBattleCommunication.multistring_chooser = 0; + gBattleCommunication[MULTISTRING_CHOOSER] = 0; if (gBattleCommunication[MOVE_EFFECT_BYTE] == 2 || gBattleCommunication[MOVE_EFFECT_BYTE] == 6 || gBattleCommunication[MOVE_EFFECT_BYTE] == 5 || gBattleCommunication[MOVE_EFFECT_BYTE] == 3) { - BATTLE_STRUCT->SynchroniseEffect = gBattleCommunication[MOVE_EFFECT_BYTE]; + BATTLE_STRUCT->synchroniseEffect = gBattleCommunication[MOVE_EFFECT_BYTE]; gHitMarker |= HITMARKER_SYNCHRONISE_EFFECT; } return; @@ -2738,22 +2498,22 @@ void SetMoveEffect(bool8 primary, u8 certainArg) switch (gStatusFlagsForMoveEffects[gBattleCommunication[MOVE_EFFECT_BYTE]]) { case 7: //confusion - if (gBattleMons[gEffectBank].ability_id == ABILITY_OWN_TEMPO) + if (gBattleMons[gEffectBank].ability == ABILITY_OWN_TEMPO) {gBattlescriptCurrInstr++; return;} if (gBattleMons[gEffectBank].status2 & STATUS2_CONFUSION) {gBattlescriptCurrInstr++; return;} gBattleMons[gEffectBank].status2 |= (((Random()) % 0x4)) + 2; b_movescr_stack_push(gBattlescriptCurrInstr + 1); - gBattlescriptCurrInstr = MoveEffectBS_ptrs[gBattleCommunication[MOVE_EFFECT_BYTE]]; + gBattlescriptCurrInstr = gMoveEffectBS_Ptrs[gBattleCommunication[MOVE_EFFECT_BYTE]]; break; case 8: //flinch - if (gBattleMons[gEffectBank].ability_id == ABILITY_INNER_FOCUS) + if (gBattleMons[gEffectBank].ability == ABILITY_INNER_FOCUS) { if (primary == 1 || certain == 0x80) { gLastUsedAbility = ABILITY_INNER_FOCUS; - RecordAbility(gEffectBank, ABILITY_INNER_FOCUS); - gBattlescriptCurrInstr = BS_FLINCH_PREVENTION; + RecordAbilityBattle(gEffectBank, ABILITY_INNER_FOCUS); + gBattlescriptCurrInstr = BattleScript_FlinchPrevention; return; } else @@ -2773,21 +2533,21 @@ void SetMoveEffect(bool8 primary, u8 certainArg) gLockedMove[gEffectBank] = gCurrentMove; gBattleMons[gEffectBank].status2 |= ((Random() & 3) + 2) << 4; b_movescr_stack_push(gBattlescriptCurrInstr + 1); - gBattlescriptCurrInstr = MoveEffectBS_ptrs[gBattleCommunication[MOVE_EFFECT_BYTE]]; + gBattlescriptCurrInstr = gMoveEffectBS_Ptrs[gBattleCommunication[MOVE_EFFECT_BYTE]]; break; case 11: //pay day - if (!(get_bank_identity(gEffectBank) & 1)) + if (!(GetBankIdentity(gBankAttacker) & 1)) { u16 PayDay = gPaydayMoney; - gPaydayMoney += (gBattleMons[gEffectBank].level * 5); + gPaydayMoney += (gBattleMons[gBankAttacker].level * 5); if (PayDay > gPaydayMoney) gPaydayMoney = 0xFFFF; } b_movescr_stack_push(gBattlescriptCurrInstr + 1); - gBattlescriptCurrInstr = MoveEffectBS_ptrs[gBattleCommunication[MOVE_EFFECT_BYTE]]; + gBattlescriptCurrInstr = gMoveEffectBS_Ptrs[gBattleCommunication[MOVE_EFFECT_BYTE]]; break; case 9: //tri attack - if (gBattleMons[gEffectBank].status) + if (gBattleMons[gEffectBank].status1) {gBattlescriptCurrInstr++; return;} gBattleCommunication[MOVE_EFFECT_BYTE] = Random() % 3 + 3; SetMoveEffect(0, 0); @@ -2795,73 +2555,73 @@ void SetMoveEffect(bool8 primary, u8 certainArg) case 12: //charging move gBattleMons[gEffectBank].status2 |= STATUS2_MULTIPLETURNS; gLockedMove[gEffectBank] = gCurrentMove; - gProtectStructs[gEffectBank].flag1_chargingturn = 1; + gProtectStructs[gEffectBank].chargingTurn = 1; gBattlescriptCurrInstr++; break; case 13: //wrap if (gBattleMons[gEffectBank].status2 & STATUS2_WRAPPED) {gBattlescriptCurrInstr++; return;} gBattleMons[gEffectBank].status2 |= ((Random() & 3) + 2) << 0xD; - BATTLE_STRUCT->WrappedMove1[gEffectBank] = gCurrentMove; - BATTLE_STRUCT->WrappedMove2[gEffectBank] = gCurrentMove >> 8; - BATTLE_STRUCT->WrappedBy[gEffectBank] = gBankAttacker; + BATTLE_STRUCT->wrappedMove[gEffectBank*2] = (u8)gCurrentMove; + (1 + BATTLE_STRUCT->wrappedMove)[gEffectBank*2] = gCurrentMove >> 8; //don't ask. + BATTLE_STRUCT->wrappedBy[gEffectBank] = gBankAttacker; b_movescr_stack_push(gBattlescriptCurrInstr + 1); - gBattlescriptCurrInstr = MoveEffectBS_ptrs[gBattleCommunication[MOVE_EFFECT_BYTE]]; - gBattleCommunication.multistring_chooser = 0; - while (gBattleCommunication.multistring_chooser <= 4 - && gCurrentMove != gTrappingMoves[gBattleCommunication.multistring_chooser]) - gBattleCommunication.multistring_chooser++; + gBattlescriptCurrInstr = gMoveEffectBS_Ptrs[gBattleCommunication[MOVE_EFFECT_BYTE]]; + gBattleCommunication[MULTISTRING_CHOOSER] = 0; + while (gBattleCommunication[MULTISTRING_CHOOSER] <= 4 + && gCurrentMove != gTrappingMoves[gBattleCommunication[MULTISTRING_CHOOSER]]) + gBattleCommunication[MULTISTRING_CHOOSER]++; break; - case 14: //recoil + case 14: //25% recoil gBattleMoveDamage = (gHP_dealt) / 4; if (gBattleMoveDamage == 0) gBattleMoveDamage = 1; b_movescr_stack_push(gBattlescriptCurrInstr + 1); - gBattlescriptCurrInstr = MoveEffectBS_ptrs[gBattleCommunication[MOVE_EFFECT_BYTE]]; + gBattlescriptCurrInstr = gMoveEffectBS_Ptrs[gBattleCommunication[MOVE_EFFECT_BYTE]]; break; case 15 ... 21: //stat + 1 - if (ChangeStats(0x10, gBattleCommunication[MOVE_EFFECT_BYTE] + 0xF2, certain, 0)) {gBattlescriptCurrInstr++;} + if (ChangeStatBuffs(0x10, gBattleCommunication[MOVE_EFFECT_BYTE] + 0xF2, certain, 0)) {gBattlescriptCurrInstr++;} else { BATTLE_STRUCT->animArg1 = gBattleCommunication[MOVE_EFFECT_BYTE] & 0x3F; //TODO: the arg ptr is wrong by one BATTLE_STRUCT->animArg2 = 0; b_movescr_stack_push(gBattlescriptCurrInstr + 1); - gBattlescriptCurrInstr = BS_STAT_UP; + gBattlescriptCurrInstr = BattleScript_StatUp; } break; case 22 ... 28: //stat - 1 - if (ChangeStats(~(0x6f), gBattleCommunication[MOVE_EFFECT_BYTE] + 0xEB, certain, 0)) {gBattlescriptCurrInstr++;} //TODO: negation doesnt work correctly + if (ChangeStatBuffs(~(0x6f), gBattleCommunication[MOVE_EFFECT_BYTE] + 0xEB, certain, 0)) {gBattlescriptCurrInstr++;} //TODO: negation doesnt work correctly else { BATTLE_STRUCT->animArg1 = gBattleCommunication[MOVE_EFFECT_BYTE] & 0x3F; BATTLE_STRUCT->animArg2 = 0; b_movescr_stack_push(gBattlescriptCurrInstr + 1); - gBattlescriptCurrInstr = BS_STAT_DOWN; + gBattlescriptCurrInstr = BattleScript_StatDown; } break; case 39 ... 45: //stat + 2 - if (ChangeStats(0x20, gBattleCommunication[MOVE_EFFECT_BYTE] + 0xDA, certain, 0)) {gBattlescriptCurrInstr++;} + if (ChangeStatBuffs(0x20, gBattleCommunication[MOVE_EFFECT_BYTE] + 0xDA, certain, 0)) {gBattlescriptCurrInstr++;} else { BATTLE_STRUCT->animArg1 = gBattleCommunication[MOVE_EFFECT_BYTE] & 0x3F; BATTLE_STRUCT->animArg2 = 0; b_movescr_stack_push(gBattlescriptCurrInstr + 1); - gBattlescriptCurrInstr = BS_STAT_UP; + gBattlescriptCurrInstr = BattleScript_StatUp; } break; case 46 ... 52: //stat - 2 - if (ChangeStats(~(0x5f), gBattleCommunication[MOVE_EFFECT_BYTE] + 0xD3, certain, 0)) {gBattlescriptCurrInstr++;} + if (ChangeStatBuffs(~(0x5f), gBattleCommunication[MOVE_EFFECT_BYTE] + 0xD3, certain, 0)) {gBattlescriptCurrInstr++;} else { BATTLE_STRUCT->animArg1 = gBattleCommunication[MOVE_EFFECT_BYTE] & 0x3F; BATTLE_STRUCT->animArg2 = 0; b_movescr_stack_push(gBattlescriptCurrInstr + 1); - gBattlescriptCurrInstr = BS_STAT_DOWN; + gBattlescriptCurrInstr = BattleScript_StatDown; } break; case 29: //recharge gBattleMons[gEffectBank].status2 |= STATUS2_RECHARGE; - gDisableStructs[gEffectBank].recharge_counter = 2; + gDisableStructs[gEffectBank].rechargeCounter = 2; gLockedMove[gEffectBank] = gCurrentMove; gBattlescriptCurrInstr++; break; @@ -2871,83 +2631,85 @@ void SetMoveEffect(bool8 primary, u8 certainArg) break; case 31: //item steal { - u8 side = battle_side_get_owner(gBankAttacker); - if (battle_side_get_owner(gBankAttacker) == 1 && !(gBattleTypeFlags & (BATTLE_TYPE_EREADER_TRAINER | BATTLE_TYPE_BATTLE_TOWER | BATTLE_TYPE_LINK)) && gTrainerBattleOpponent != 0x400) + u8 side = GetBankSide(gBankAttacker); + if (GetBankSide(gBankAttacker) == 1 && !(gBattleTypeFlags & (BATTLE_TYPE_EREADER_TRAINER | BATTLE_TYPE_BATTLE_TOWER | BATTLE_TYPE_LINK)) && gTrainerBattleOpponent != 0x400) {gBattlescriptCurrInstr++; return;} - if (!(gBattleTypeFlags & (BATTLE_TYPE_EREADER_TRAINER | BATTLE_TYPE_BATTLE_TOWER | BATTLE_TYPE_LINK)) && gTrainerBattleOpponent != 0x400 && (gWishFutureKnock.KnockedOff[side] & gBitTable[gBattlePartyID[gBankAttacker]])) + if (!(gBattleTypeFlags & (BATTLE_TYPE_EREADER_TRAINER | BATTLE_TYPE_BATTLE_TOWER | BATTLE_TYPE_LINK)) && gTrainerBattleOpponent != 0x400 && (gWishFutureKnock.knockedOffPokes[side] & gBitTable[gBattlePartyID[gBankAttacker]])) {gBattlescriptCurrInstr++; return;} - if (gBattleMons[gBankTarget].held_item && gBattleMons[gBankTarget].ability_id == ABILITY_STICKY_HOLD) + if (gBattleMons[gBankTarget].item && gBattleMons[gBankTarget].ability == ABILITY_STICKY_HOLD) { b_movescr_stack_push_cursor(); - gBattlescriptCurrInstr = BS_NO_ITEMSTEAL; - gLastUsedAbility = gBattleMons[gBankTarget].ability_id; - RecordAbility(gBankTarget, gLastUsedAbility); + gBattlescriptCurrInstr = BattleScript_NoItemSteal; + gLastUsedAbility = gBattleMons[gBankTarget].ability; + RecordAbilityBattle(gBankTarget, gLastUsedAbility); return; } - if (gBattleMons[gBankAttacker].held_item) + if (gBattleMons[gBankAttacker].item) {gBattlescriptCurrInstr++; return;} - if (gBattleMons[gBankTarget].held_item == ITEM_ENIGMA_BERRY) + if (gBattleMons[gBankTarget].item == ITEM_ENIGMA_BERRY) {gBattlescriptCurrInstr++; return;} - if (gBattleMons[gBankTarget].held_item == 0) + if (gBattleMons[gBankTarget].item == 0) {gBattlescriptCurrInstr++; return;} - CHANGED_HELDITEMS[gBankAttacker] = gLastUsedItem = gBattleMons[gBankTarget].held_item; - gBattleMons[gBankTarget].held_item = 0; + gLastUsedItem = gBattleMons[gBankTarget].item; + unk_2000000[gBankAttacker * 2 + 0x160cc] = gLastUsedItem; + gBattleMons[gBankTarget].item = 0; gActiveBank = gBankAttacker; - bb2_setattributes_in_battle(0, REQUEST_HELDITEM_BATTLE, 0, 2, &gLastUsedItem); - mark_buffer_bank_for_execution(gBankAttacker); + EmitSetAttributes(0, REQUEST_HELDITEM_BATTLE, 0, 2, &gLastUsedItem); + MarkBufferBankForExecution(gBankAttacker); gActiveBank = gBankTarget; - bb2_setattributes_in_battle(0, REQUEST_HELDITEM_BATTLE, 0, 2, &gBattleMons[gBankTarget].held_item); - mark_buffer_bank_for_execution(gBankTarget); + EmitSetAttributes(0, REQUEST_HELDITEM_BATTLE, 0, 2, &gBattleMons[gBankTarget].item); + MarkBufferBankForExecution(gBankTarget); b_movescr_stack_push(gBattlescriptCurrInstr + 1); - gBattlescriptCurrInstr = BS_ITEMSTEAL; + gBattlescriptCurrInstr = BattleScript_ItemSteal; - STORE_CHOICEMOVE(gBankTarget, 0); + ewram[gBankTarget * 2 + 0x160e8] = 0; + //STORE_CHOICEMOVE(gBankTarget, 0); } break; case 32: //escape prevention gBattleMons[gBankTarget].status2 |= STATUS2_RECHARGE; - gDisableStructs[gBankTarget].BankPreventingEscape = gBankAttacker; + gDisableStructs[gBankTarget].bankPreventingEscape = gBankAttacker; gBattlescriptCurrInstr++; break; case 33: //nightmare gBattleMons[gBankTarget].status2 |= STATUS2_NIGHTMARE; gBattlescriptCurrInstr++; break; - case 34: + case 34: //ancientpower b_movescr_stack_push(gBattlescriptCurrInstr + 1); - gBattlescriptCurrInstr = gUnknown_081D9224; + gBattlescriptCurrInstr = BattleScript_AllStatsUp; return; case 35: //break free rapidspin b_movescr_stack_push(gBattlescriptCurrInstr + 1); - gBattlescriptCurrInstr = BS_RAPIDSPINAWAY; + gBattlescriptCurrInstr = BattleScript_RapidSpinAway; return; case 36: //paralysis removal if (gBattleMons[gBankTarget].status1 & STATUS_PARALYSIS) { gBattleMons[gBankTarget].status1 &= ~(STATUS_PARALYSIS); gActiveBank = gBankTarget; - bb2_setattributes_in_battle(0, REQUEST_STATUS_BATTLE, 0, 4, &gBattleMons[gBankTarget].status); - mark_buffer_bank_for_execution(gActiveBank); + EmitSetAttributes(0, REQUEST_STATUS_BATTLE, 0, 4, &gBattleMons[gBankTarget].status1); + MarkBufferBankForExecution(gActiveBank); b_movescr_stack_push(gBattlescriptCurrInstr + 1); - gBattlescriptCurrInstr = BS_PARALYSISHEALED; + gBattlescriptCurrInstr = BattleScript_TargetPRLZHeal; } else {gBattlescriptCurrInstr++; return;} break; - case 37: // + case 37: //superpower b_movescr_stack_push(gBattlescriptCurrInstr + 1); - gBattlescriptCurrInstr = gUnknown_081D93FA; + gBattlescriptCurrInstr = BattleScript_AtkDefDown; return; - case 38: //recoil plus paralysis + case 38: //33% recoil gBattleMoveDamage = gHP_dealt / 3; if (gBattleMoveDamage == 0) gBattleMoveDamage = 1; b_movescr_stack_push(gBattlescriptCurrInstr + 1); - gBattlescriptCurrInstr = MoveEffectBS_ptrs[gBattleCommunication[MOVE_EFFECT_BYTE]]; + gBattlescriptCurrInstr = gMoveEffectBS_Ptrs[gBattleCommunication[MOVE_EFFECT_BYTE]]; break; case 53: //thrash if (!(gBattleMons[gEffectBank].status2 & STATUS2_LOCK_CONFUSE)) @@ -2960,32 +2722,33 @@ void SetMoveEffect(bool8 primary, u8 certainArg) {gBattlescriptCurrInstr++; return;} break; case 54: //knock off - if (gBattleMons[gEffectBank].ability_id == ABILITY_STICKY_HOLD) + if (gBattleMons[gEffectBank].ability == ABILITY_STICKY_HOLD) { - if (gBattleMons[gEffectBank].held_item == 0) + if (gBattleMons[gEffectBank].item == 0) {gBattlescriptCurrInstr++; return;} gLastUsedAbility = ABILITY_STICKY_HOLD; - gBattlescriptCurrInstr = BS_STICKYHOLD_ACTIVATES; - RecordAbility(gEffectBank, ABILITY_STICKY_HOLD); + gBattlescriptCurrInstr = BattleScript_NoItemSteal; + RecordAbilityBattle(gEffectBank, ABILITY_STICKY_HOLD); return; } - if (gBattleMons[gEffectBank].held_item == 0) + if (gBattleMons[gEffectBank].item == 0) {gBattlescriptCurrInstr++; return;} else { - u8 side = battle_side_get_owner(gEffectBank); - gLastUsedItem = gBattleMons[gEffectBank].held_item; - gBattleMons[gEffectBank].held_item = 0; - gWishFutureKnock.KnockedOff[side] |= gBitTable[gBattlePartyID[gEffectBank]]; + u8 side = GetBankSide(gEffectBank); + gLastUsedItem = gBattleMons[gEffectBank].item; + gBattleMons[gEffectBank].item = 0; + gWishFutureKnock.knockedOffPokes[side] |= gBitTable[gBattlePartyID[gEffectBank]]; b_movescr_stack_push(gBattlescriptCurrInstr + 1); - gBattlescriptCurrInstr = BS_KNOCKEDOFF; + gBattlescriptCurrInstr = BattleScript_KnockedOff; - STORE_CHOICEMOVE(gEffectBank, 0); + ewram[gEffectBank * 2 + 0x160e8] = 0; + //STORE_CHOICEMOVE(gEffectBank, 0); } break; - case 59: //overheat I guess, dont remember + case 59: //overheat b_movescr_stack_push(gBattlescriptCurrInstr + 1); - gBattlescriptCurrInstr = gUnknown_081D94B0; + gBattlescriptCurrInstr = BattleScript_SAtkDown2; return; } } @@ -4888,11 +4651,11 @@ _0801F3BC:\n\ ldr r0, [r4]\n\ adds r0, 0x1\n\ bl b_movescr_stack_push\n\ - ldr r0, _0801F3D0 @ =gUnknown_081D9224\n\ + ldr r0, _0801F3D0 @ =BattleScript_AllStatsUp\n\ b _0801F5F8\n\ .align 2, 0\n\ _0801F3CC: .4byte gBattlescriptCurrInstr\n\ -_0801F3D0: .4byte gUnknown_081D9224\n\ +_0801F3D0: .4byte BattleScript_AllStatsUp\n\ _0801F3D4:\n\ ldr r4, _0801F3E4 @ =gBattlescriptCurrInstr\n\ ldr r0, [r4]\n\ @@ -4952,11 +4715,11 @@ _0801F44C:\n\ ldr r0, [r4]\n\ adds r0, 0x1\n\ bl b_movescr_stack_push\n\ - ldr r0, _0801F460 @ =gUnknown_081D93FA\n\ + ldr r0, _0801F460 @ =BattleScript_AtkDefDown\n\ b _0801F5F8\n\ .align 2, 0\n\ _0801F45C: .4byte gBattlescriptCurrInstr\n\ -_0801F460: .4byte gUnknown_081D93FA\n\ +_0801F460: .4byte BattleScript_AtkDefDown\n\ _0801F464:\n\ ldr r4, _0801F494 @ =gBattleMoveDamage\n\ ldr r0, _0801F498 @ =gHP_dealt\n\ @@ -5141,7 +4904,7 @@ _0801F5EC:\n\ ldr r0, [r4]\n\ adds r0, 0x1\n\ bl b_movescr_stack_push\n\ - ldr r0, _0801F610 @ =gUnknown_081D94B0\n\ + ldr r0, _0801F610 @ =BattleScript_SAtkDown2\n\ _0801F5F8:\n\ str r0, [r4]\n\ _0801F5FA:\n\ @@ -5155,11 +4918,12 @@ _0801F5FA:\n\ bx r0\n\ .align 2, 0\n\ _0801F60C: .4byte gBattlescriptCurrInstr\n\ -_0801F610: .4byte gUnknown_081D94B0\n\ +_0801F610: .4byte BattleScript_SAtkDown2\n\ .syntax divided\n"); } #endif // NONMATCHING + static void atk15_seteffectwithchancetarget(void) { u32 PercentChance; @@ -5208,425 +4972,107 @@ static void atk18_status_effect_clear(void) BATTLE_STRUCT->unk16112 = 0; } -//Fuck this, Maybe later -__attribute__((naked)) static void atk19_faint_pokemon(void) { - asm(".syntax unified\n\ -push {r4-r7,lr}\n\ - mov r7, r10\n\ - mov r6, r9\n\ - mov r5, r8\n\ - push {r5-r7}\n\ - sub sp, 0x4\n\ - ldr r0, _0801F81C @ =gBattlescriptCurrInstr\n\ - ldr r2, [r0]\n\ - ldrb r1, [r2, 0x2]\n\ - adds r6, r0, 0\n\ - cmp r1, 0\n\ - beq _0801F834\n\ - ldrb r0, [r2, 0x1]\n\ - bl GetBattleBank\n\ - ldr r5, _0801F820 @ =gActiveBank\n\ - strb r0, [r5]\n\ - ldr r2, _0801F824 @ =gHitMarker\n\ - ldr r1, _0801F828 @ =gBitTable\n\ - ldrb r0, [r5]\n\ - lsls r0, 2\n\ - adds r0, r1\n\ - ldr r1, [r0]\n\ - lsls r1, 28\n\ - ldr r0, [r2]\n\ - ands r0, r1\n\ - cmp r0, 0\n\ - bne _0801F7E6\n\ - b _0801FB1C\n\ -_0801F7E6:\n\ - ldr r1, [r6]\n\ - ldrb r4, [r1, 0x3]\n\ - ldrb r0, [r1, 0x4]\n\ - lsls r0, 8\n\ - orrs r4, r0\n\ - ldrb r0, [r1, 0x5]\n\ - lsls r0, 16\n\ - orrs r4, r0\n\ - ldrb r0, [r1, 0x6]\n\ - lsls r0, 24\n\ - orrs r4, r0\n\ - bl b_movescr_stack_pop_cursor\n\ - str r4, [r6]\n\ - ldrb r0, [r5]\n\ - bl GetBankSide\n\ - ldr r1, _0801F82C @ =gSideAffecting\n\ - lsls r0, 24\n\ - lsrs r0, 23\n\ - adds r0, r1\n\ - ldrh r2, [r0]\n\ - ldr r1, _0801F830 @ =0x0000fdff\n\ - ands r1, r2\n\ - strh r1, [r0]\n\ - b _0801FB22\n\ - .align 2, 0\n\ -_0801F81C: .4byte gBattlescriptCurrInstr\n\ -_0801F820: .4byte gActiveBank\n\ -_0801F824: .4byte gHitMarker\n\ -_0801F828: .4byte gBitTable\n\ -_0801F82C: .4byte gSideAffecting\n\ -_0801F830: .4byte 0x0000fdff\n\ -_0801F834:\n\ - ldrb r0, [r2, 0x1]\n\ - cmp r0, 0x1\n\ - bne _0801F85C\n\ - ldr r1, _0801F84C @ =gActiveBank\n\ - ldr r0, _0801F850 @ =gBankAttacker\n\ - ldrb r0, [r0]\n\ - strb r0, [r1]\n\ - ldr r0, _0801F854 @ =gBankTarget\n\ - ldrb r7, [r0]\n\ - ldr r4, _0801F858 @ =gUnknown_081D8C58\n\ - b _0801F86A\n\ - .align 2, 0\n\ -_0801F84C: .4byte gActiveBank\n\ -_0801F850: .4byte gBankAttacker\n\ -_0801F854: .4byte gBankTarget\n\ -_0801F858: .4byte gUnknown_081D8C58\n\ -_0801F85C:\n\ - ldr r1, _0801F954 @ =gActiveBank\n\ - ldr r0, _0801F958 @ =gBankTarget\n\ - ldrb r0, [r0]\n\ - strb r0, [r1]\n\ - ldr r0, _0801F95C @ =gBankAttacker\n\ - ldrb r7, [r0]\n\ - ldr r4, _0801F960 @ =gUnknown_081D8C65\n\ -_0801F86A:\n\ - ldr r0, _0801F964 @ =gAbsentBankFlags\n\ - ldrb r1, [r0]\n\ - ldr r0, _0801F968 @ =gBitTable\n\ - mov r12, r0\n\ - ldr r2, _0801F954 @ =gActiveBank\n\ - mov r8, r2\n\ - ldrb r2, [r2]\n\ - lsls r0, r2, 2\n\ - add r0, r12\n\ - ldr r0, [r0]\n\ - ands r1, r0\n\ - cmp r1, 0\n\ - beq _0801F886\n\ - b _0801FB1C\n\ -_0801F886:\n\ - ldr r3, _0801F96C @ =gBattleMons\n\ - mov r10, r3\n\ - movs r5, 0x58\n\ - mov r9, r5\n\ - mov r0, r9\n\ - muls r0, r2\n\ - add r0, r10\n\ - ldrh r3, [r0, 0x28]\n\ - cmp r3, 0\n\ - beq _0801F89C\n\ - b _0801FB1C\n\ -_0801F89C:\n\ - ldr r2, _0801F970 @ =0x02000000\n\ - lsls r1, r7, 1\n\ - ldr r5, _0801F974 @ =0x000160ac\n\ - adds r0, r1, r5\n\ - adds r0, r2\n\ - strb r3, [r0]\n\ - ldr r0, _0801F978 @ =0x000160ad\n\ - adds r1, r0\n\ - adds r1, r2\n\ - strb r3, [r1]\n\ - lsls r1, r7, 2\n\ - adds r5, 0x54\n\ - adds r0, r1, r5\n\ - adds r0, r2\n\ - strb r3, [r0]\n\ - adds r5, 0x1\n\ - adds r0, r1, r5\n\ - adds r0, r2\n\ - strb r3, [r0]\n\ - adds r5, 0x1\n\ - adds r0, r1, r5\n\ - adds r0, r2\n\ - strb r3, [r0]\n\ - ldr r0, _0801F97C @ =0x00016103\n\ - adds r1, r0\n\ - adds r1, r2\n\ - strb r3, [r1]\n\ - ldr r5, _0801F980 @ =gHitMarker\n\ - mov r1, r8\n\ - ldrb r0, [r1]\n\ - lsls r0, 2\n\ - add r0, r12\n\ - ldr r1, [r0]\n\ - lsls r1, 28\n\ - ldr r0, [r5]\n\ - orrs r0, r1\n\ - str r0, [r5]\n\ - ldr r0, [r6]\n\ - adds r0, 0x7\n\ - bl b_movescr_stack_push\n\ - str r4, [r6]\n\ - mov r2, r8\n\ - ldrb r0, [r2]\n\ - bl GetBankSide\n\ - lsls r0, 24\n\ - cmp r0, 0\n\ - bne _0801F9B0\n\ - ldr r0, [r5]\n\ - movs r1, 0x80\n\ - lsls r1, 15\n\ - orrs r0, r1\n\ - str r0, [r5]\n\ - ldr r1, _0801F984 @ =gBattleResults\n\ - ldrb r0, [r1]\n\ - cmp r0, 0xFE\n\ - bhi _0801F914\n\ - adds r0, 0x1\n\ - strb r0, [r1]\n\ -_0801F914:\n\ - mov r0, r9\n\ - muls r0, r7\n\ - add r0, r10\n\ - adds r3, r0, 0\n\ - adds r3, 0x2A\n\ - mov r4, r8\n\ - ldrb r2, [r4]\n\ - mov r0, r9\n\ - muls r0, r2\n\ - add r0, r10\n\ - adds r1, r0, 0\n\ - adds r1, 0x2A\n\ - ldrb r0, [r3]\n\ - ldrb r5, [r1]\n\ - cmp r0, r5\n\ - bls _0801F9CC\n\ - ldrb r1, [r1]\n\ - subs r0, r1\n\ - cmp r0, 0x1D\n\ - ble _0801F990\n\ - ldr r1, _0801F988 @ =gBattlePartyID\n\ - lsls r0, r2, 1\n\ - adds r0, r1\n\ - ldrh r1, [r0]\n\ - movs r0, 0x64\n\ - muls r0, r1\n\ - ldr r1, _0801F98C @ =gPlayerParty\n\ - adds r0, r1\n\ - movs r1, 0x8\n\ - bl AdjustFriendship\n\ - b _0801F9CC\n\ - .align 2, 0\n\ -_0801F954: .4byte gActiveBank\n\ -_0801F958: .4byte gBankTarget\n\ -_0801F95C: .4byte gBankAttacker\n\ -_0801F960: .4byte gUnknown_081D8C65\n\ -_0801F964: .4byte gAbsentBankFlags\n\ -_0801F968: .4byte gBitTable\n\ -_0801F96C: .4byte gBattleMons\n\ -_0801F970: .4byte 0x02000000\n\ -_0801F974: .4byte 0x000160ac\n\ -_0801F978: .4byte 0x000160ad\n\ -_0801F97C: .4byte 0x00016103\n\ -_0801F980: .4byte gHitMarker\n\ -_0801F984: .4byte gBattleResults\n\ -_0801F988: .4byte gBattlePartyID\n\ -_0801F98C: .4byte gPlayerParty\n\ -_0801F990:\n\ - ldr r1, _0801F9A8 @ =gBattlePartyID\n\ - lsls r0, r2, 1\n\ - adds r0, r1\n\ - ldrh r1, [r0]\n\ - movs r0, 0x64\n\ - muls r0, r1\n\ - ldr r1, _0801F9AC @ =gPlayerParty\n\ - adds r0, r1\n\ - movs r1, 0x6\n\ - bl AdjustFriendship\n\ - b _0801F9CC\n\ - .align 2, 0\n\ -_0801F9A8: .4byte gBattlePartyID\n\ -_0801F9AC: .4byte gPlayerParty\n\ -_0801F9B0:\n\ - ldr r1, _0801FAE0 @ =gBattleResults\n\ - ldrb r0, [r1, 0x1]\n\ - cmp r0, 0xFE\n\ - bhi _0801F9BC\n\ - adds r0, 0x1\n\ - strb r0, [r1, 0x1]\n\ -_0801F9BC:\n\ - ldr r2, _0801FAE4 @ =gActiveBank\n\ - ldrb r0, [r2]\n\ - mov r3, r9\n\ - muls r3, r0\n\ - adds r0, r3, 0\n\ - add r0, r10\n\ - ldrh r0, [r0]\n\ - strh r0, [r1, 0x20]\n\ -_0801F9CC:\n\ - ldr r0, _0801FAE8 @ =gHitMarker\n\ - ldr r0, [r0]\n\ - movs r1, 0x40\n\ - ands r0, r1\n\ - cmp r0, 0\n\ - beq _0801FA02\n\ - ldr r6, _0801FAEC @ =gBattleMons\n\ - ldr r0, _0801FAF0 @ =gBankAttacker\n\ - ldrb r0, [r0]\n\ - movs r5, 0x58\n\ - muls r0, r5\n\ - adds r0, r6\n\ - ldrh r0, [r0, 0x28]\n\ - cmp r0, 0\n\ - beq _0801FA02\n\ - ldr r4, _0801FAF4 @ =gBattlescriptCurrInstr\n\ - ldr r0, [r4]\n\ - bl b_movescr_stack_push\n\ - ldr r1, _0801FAF8 @ =gBattleMoveDamage\n\ - adds r0, r7, 0\n\ - muls r0, r5\n\ - adds r0, r6\n\ - ldrh r0, [r0, 0x28]\n\ - str r0, [r1]\n\ - ldr r0, _0801FAFC @ =gUnknown_081D9156\n\ - str r0, [r4]\n\ -_0801FA02:\n\ - ldr r1, _0801FB00 @ =gStatuses3\n\ - ldr r6, _0801FB04 @ =gBankTarget\n\ - ldrb r0, [r6]\n\ - lsls r0, 2\n\ - adds r0, r1\n\ - ldr r0, [r0]\n\ - movs r1, 0x80\n\ - lsls r1, 7\n\ - ands r0, r1\n\ - cmp r0, 0\n\ - bne _0801FA1A\n\ - b _0801FB22\n\ -_0801FA1A:\n\ - ldr r0, _0801FAE8 @ =gHitMarker\n\ - ldr r5, [r0]\n\ - movs r0, 0x80\n\ - lsls r0, 17\n\ - ands r5, r0\n\ - cmp r5, 0\n\ - bne _0801FB22\n\ - ldr r4, _0801FAF0 @ =gBankAttacker\n\ - mov r8, r4\n\ - ldrb r0, [r4]\n\ - bl GetBankSide\n\ - adds r4, r0, 0\n\ - ldrb r0, [r6]\n\ - bl GetBankSide\n\ - lsls r4, 24\n\ - lsls r0, 24\n\ - cmp r4, r0\n\ - beq _0801FB22\n\ - ldr r0, _0801FAEC @ =gBattleMons\n\ - mov r9, r0\n\ - mov r1, r8\n\ - ldrb r2, [r1]\n\ - movs r7, 0x58\n\ - adds r3, r2, 0\n\ - muls r3, r7\n\ - adds r0, r3, r0\n\ - ldrh r0, [r0, 0x28]\n\ - cmp r0, 0\n\ - beq _0801FB22\n\ - ldr r0, _0801FB08 @ =gCurrentMove\n\ - ldrh r0, [r0]\n\ - cmp r0, 0xA5\n\ - beq _0801FB22\n\ - ldr r1, _0801FB0C @ =0x02000000\n\ - ldr r4, _0801FB10 @ =0x0001608c\n\ - adds r0, r2, r4\n\ - adds r0, r1\n\ - ldrb r4, [r0]\n\ - adds r0, r4, r3\n\ - mov r6, r9\n\ - adds r6, 0x24\n\ - adds r0, r6\n\ - strb r5, [r0]\n\ - ldr r5, _0801FAF4 @ =gBattlescriptCurrInstr\n\ - ldr r0, [r5]\n\ - bl b_movescr_stack_push\n\ - ldr r0, _0801FB14 @ =gUnknown_081D9468\n\ - str r0, [r5]\n\ - ldr r5, _0801FAE4 @ =gActiveBank\n\ - mov r1, r8\n\ - ldrb r0, [r1]\n\ - strb r0, [r5]\n\ - adds r1, r4, 0\n\ - adds r1, 0x9\n\ - lsls r1, 24\n\ - lsrs r1, 24\n\ - ldrb r0, [r5]\n\ - muls r0, r7\n\ - adds r0, r6\n\ - adds r0, r4\n\ - str r0, [sp]\n\ - movs r0, 0\n\ - movs r2, 0\n\ - movs r3, 0x1\n\ - bl EmitSetAttributes\n\ - ldrb r0, [r5]\n\ - bl MarkBufferBankForExecution\n\ - ldr r1, _0801FB18 @ =gBattleTextBuff1\n\ - movs r0, 0xFD\n\ - strb r0, [r1]\n\ - movs r0, 0x2\n\ - strb r0, [r1, 0x1]\n\ - lsls r4, 1\n\ - mov r2, r8\n\ - ldrb r0, [r2]\n\ - muls r0, r7\n\ - adds r0, r4, r0\n\ - mov r2, r9\n\ - adds r2, 0xC\n\ - adds r0, r2\n\ - ldrh r0, [r0]\n\ - strb r0, [r1, 0x2]\n\ - mov r3, r8\n\ - ldrb r0, [r3]\n\ - muls r0, r7\n\ - adds r4, r0\n\ - adds r4, r2\n\ - ldrh r0, [r4]\n\ - lsrs r0, 8\n\ - strb r0, [r1, 0x3]\n\ - movs r0, 0xFF\n\ - strb r0, [r1, 0x4]\n\ - b _0801FB22\n\ - .align 2, 0\n\ -_0801FAE0: .4byte gBattleResults\n\ -_0801FAE4: .4byte gActiveBank\n\ -_0801FAE8: .4byte gHitMarker\n\ -_0801FAEC: .4byte gBattleMons\n\ -_0801FAF0: .4byte gBankAttacker\n\ -_0801FAF4: .4byte gBattlescriptCurrInstr\n\ -_0801FAF8: .4byte gBattleMoveDamage\n\ -_0801FAFC: .4byte gUnknown_081D9156\n\ -_0801FB00: .4byte gStatuses3\n\ -_0801FB04: .4byte gBankTarget\n\ -_0801FB08: .4byte gCurrentMove\n\ -_0801FB0C: .4byte 0x02000000\n\ -_0801FB10: .4byte 0x0001608c\n\ -_0801FB14: .4byte gUnknown_081D9468\n\ -_0801FB18: .4byte gBattleTextBuff1\n\ -_0801FB1C:\n\ - ldr r0, [r6]\n\ - adds r0, 0x7\n\ - str r0, [r6]\n\ -_0801FB22:\n\ - add sp, 0x4\n\ - pop {r3-r5}\n\ - mov r8, r3\n\ - mov r9, r4\n\ - mov r10, r5\n\ - pop {r4-r7}\n\ - pop {r0}\n\ - bx r0\n\ - .syntax divided\n"); + u8 *r4; + + if (gBattlescriptCurrInstr[2] != 0) + { + gActiveBank = GetBattleBank(gBattlescriptCurrInstr[1]); + if (gHitMarker & HITMARKER_FAINTED(gActiveBank)) + { + r4 = BSScriptReadPtr(gBattlescriptCurrInstr + 3); + + b_movescr_stack_pop_cursor(); + gBattlescriptCurrInstr = r4; + gSideAffecting[GetBankSide(gActiveBank)] &= ~SIDE_STATUS_SPIKES_DAMAGED; + } + else + { + gBattlescriptCurrInstr += 7; + } + } + else + { + u8 bank; + + if (gBattlescriptCurrInstr[1] == 1) + { + gActiveBank = gBankAttacker; + bank = gBankTarget; + r4 = gUnknown_081D8C58; + } + else + { + gActiveBank = gBankTarget; + bank = gBankAttacker; + r4 = gUnknown_081D8C65; + } + if (!(gAbsentBankFlags & gBitTable[gActiveBank]) + && gBattleMons[gActiveBank].hp == 0) + { + ewram[0x160AC + bank * 2 + 0] = 0; + ewram[0x160AC + bank * 2 + 1] = 0; + ewram[0x16100 + bank * 4 + 0] = 0; + ewram[0x16100 + bank * 4 + 1] = 0; + ewram[0x16100 + bank * 4 + 2] = 0; + ewram[0x16100 + bank * 4 + 3] = 0; + + gHitMarker |= HITMARKER_FAINTED(gActiveBank); + b_movescr_stack_push(gBattlescriptCurrInstr + 7); + gBattlescriptCurrInstr = r4; + if (GetBankSide(gActiveBank) == 0) + { + gHitMarker |= HITMARKER_x400000; + if (gBattleResults.playerFaintCounter < 0xFF) + gBattleResults.playerFaintCounter++; + if (gBattleMons[bank].level > gBattleMons[gActiveBank].level) + { + if (gBattleMons[bank].level - gBattleMons[gActiveBank].level > 0x1D) + AdjustFriendship(&gPlayerParty[gBattlePartyID[gActiveBank]], 8); + else + AdjustFriendship(&gPlayerParty[gBattlePartyID[gActiveBank]], 6); + } + } + else + { + if (gBattleResults.opponentFaintCounter < 0xFF) + gBattleResults.opponentFaintCounter++; + gBattleResults.lastOpponentSpecies = gBattleMons[gActiveBank].species; + } + if ((gHitMarker & HITMARKER_DESTINYBOND) && gBattleMons[gBankAttacker].hp != 0) + { + b_movescr_stack_push(gBattlescriptCurrInstr); + gBattleMoveDamage = gBattleMons[bank].hp; + gBattlescriptCurrInstr = gUnknown_081D9156; + } + if ((gStatuses3[gBankTarget] & STATUS3_GRUDGE) + && !(gHitMarker & HITMARKER_GRUDGE) + && GetBankSide(gBankAttacker) != GetBankSide(gBankTarget) + && gBattleMons[gBankAttacker].hp != 0 + && gCurrentMove != MOVE_STRUGGLE) + { + u8 moveIndex = ewram[0x1608C + gBankAttacker]; + + gBattleMons[gBankAttacker].pp[moveIndex] = 0; + b_movescr_stack_push(gBattlescriptCurrInstr); + gBattlescriptCurrInstr = gUnknown_081D9468; + gActiveBank = gBankAttacker; + EmitSetAttributes(0, moveIndex + 9, 0, 1, &gBattleMons[gActiveBank].pp[moveIndex]); + MarkBufferBankForExecution(gActiveBank); + + gBattleTextBuff1[0] = 0xFD; + gBattleTextBuff1[1] = 2; + gBattleTextBuff1[2] = gBattleMons[gBankAttacker].moves[moveIndex]; + gBattleTextBuff1[3] = gBattleMons[gBankAttacker].moves[moveIndex] >> 8; + gBattleTextBuff1[4] = EOS; + } + } + else + { + gBattlescriptCurrInstr += 7; + } + } } static void atk1A_faint_animation(void) @@ -5832,13 +5278,14 @@ static void atk23_getexp(void) else { BATTLE_STRUCT->atk23StateTracker++; - unk_2000000[0x16113] |= gBitTable[gBattlePartyID[gBank1]]; + ((u8*)ewram)[0x16113] |= gBitTable[gBattlePartyID[gBank1]]; } break; case 1: //calculate experience points to redistribute { - int via_sent_in = 0, i; + int via_sent_in = 0; u16 calculatedExp; + int i; for (i = 0; i < 6; i++) { u16 item; @@ -5894,15 +5341,14 @@ static void atk23_getexp(void) BATTLE_STRUCT->sentInPokes >>= 1; tracker = &BATTLE_STRUCT->atk23StateTracker; zero = 0; - goto LABEL; + *tracker = 5; //increment looper + gBattleMoveDamage = zero; //used for exp } else if (GetMonData(&gPlayerParty[BATTLE_STRUCT->expGetterID], MON_DATA_LEVEL) == 100) { - BATTLE_STRUCT->sentInPokes >>= 1; tracker = &BATTLE_STRUCT->atk23StateTracker; zero = 0; - LABEL: *tracker = 5; //increment looper gBattleMoveDamage = zero; //used for exp } @@ -5937,7 +5383,9 @@ static void atk23_getexp(void) stringID = 0x14A; } else - stringID = 0x149; + { + stringID = 0x149; + } //get exp getter bank if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE) @@ -5962,12 +5410,13 @@ static void atk23_getexp(void) gBattleTextBuff1[3] = BATTLE_STRUCT->expGetterID; gBattleTextBuff1[4] = 0xFF; - //buffer 'gained' or 'gained a boosted' - gBattleTextBuff2[0] = 0xFD; - gBattleTextBuff2[1] = 0; - gBattleTextBuff2[2] = sBYTE0_32(stringID); - gBattleTextBuff2[3] = sBYTE1_32(stringID); - gBattleTextBuff2[4] = 0xFF; + //buffer 'gained' or 'gained a boosted' + gBattleTextBuff2[0] = 0xFD; + gBattleTextBuff2[1] = 0; + gBattleTextBuff2[2] = stringID; + stringID = (stringID >> 8) & (0xFF); //this does not want to cooperate + gBattleTextBuff2[3] = stringID; + gBattleTextBuff2[4] = 0xFF; //buffer exp number gBattleTextBuff3[0] = 0xFD; @@ -5994,7 +5443,8 @@ static void atk23_getexp(void) gBattleBufferB[BATTLE_STRUCT->expGetterBank][0] = 0; if (GetMonData(&gPlayerParty[BATTLE_STRUCT->expGetterID], MON_DATA_HP) && GetMonData(&gPlayerParty[BATTLE_STRUCT->expGetterID], MON_DATA_LEVEL) != 100) { - BATTLE_STRUCT->beforeLvlUp[0] = GetMonData(&gPlayerParty[BATTLE_STRUCT->expGetterID], MON_DATA_MAX_HP); //doesnt match + // Doesn't match. + BATTLE_STRUCT->beforeLvlUp[0] = GetMonData(&gPlayerParty[BATTLE_STRUCT->expGetterID], MON_DATA_MAX_HP); BATTLE_STRUCT->beforeLvlUp[1] = GetMonData(&gPlayerParty[BATTLE_STRUCT->expGetterID], MON_DATA_ATK); BATTLE_STRUCT->beforeLvlUp[2] = GetMonData(&gPlayerParty[BATTLE_STRUCT->expGetterID], MON_DATA_DEF); BATTLE_STRUCT->beforeLvlUp[3] = GetMonData(&gPlayerParty[BATTLE_STRUCT->expGetterID], MON_DATA_SPD); @@ -8022,9 +7472,39 @@ _080214AE:\n\ #ifdef NONMATCHING static void atk46_playanimation2(void) { - + u8 arg1; + u8* arg2; + u16* arg3; + u32 something; + + arg1 = BSScriptRead8(gBattlescriptCurrInstr + 1); + gActiveBank = GetBattleBank(arg1); + arg2 = BS2ScriptReadPtr(gBattlescriptCurrInstr + 2); + arg3 = BS2ScriptReadPtr(gBattlescriptCurrInstr + 6); + + if (*arg2 == 1 || *arg2 == 0x11 || *arg2 == 2) + { + EmitBattleAnimation(0, *arg2, *arg3); + MarkBufferBankForExecution(gActiveBank); + gBattlescriptCurrInstr += 10; + return; + } + if ((gHitMarker & 0x80)) + { + something = (u32)(gBattlescriptCurrInstr + 10); + } + else + { + u8 yeah = *arg2 - 10; + if (yeah < 4 || (gStatuses3[gActiveBank] & 0x000400C0) == 0) + { + EmitBattleAnimation(0, *arg2, *arg3); + MarkBufferBankForExecution(gActiveBank); + } + something = (u32)(gBattlescriptCurrInstr + 10); + } + gBattlescriptCurrInstr = (u8*)something; } - #else __attribute__((naked)) static void atk46_playanimation2(void) @@ -10122,7 +9602,7 @@ static void atk4E_switchin_anim(void) gActiveBank = GetBattleBank(BSScriptRead8(gBattlescriptCurrInstr + 1)); if (GetBankSide(gActiveBank) == 1 && !(gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_EREADER_TRAINER | BATTLE_TYPE_BATTLE_TOWER))) { - GetNationalPokedexFlag(SpeciesToNationalPokedexNum(gBattleMons[gActiveBank].species), 2); + GetSetPokedexFlag(SpeciesToNationalPokedexNum(gBattleMons[gActiveBank].species), 2); } gAbsentBankFlags &= ~(gBitTable[gActiveBank]); EmitSendOutPoke(0, gBattlePartyID[gActiveBank], BSScriptRead8(gBattlescriptCurrInstr + 2)); @@ -17834,7 +17314,7 @@ void atkEF_pokeball_catch_calculation(void) ball_multiplier = 10; break; case ITEM_REPEAT_BALL: - if (GetNationalPokedexFlag(SpeciesToNationalPokedexNum(gBattleMons[gBankTarget].species), 1)) + if (GetSetPokedexFlag(SpeciesToNationalPokedexNum(gBattleMons[gBankTarget].species), 1)) ball_multiplier = 30; else ball_multiplier = 10; @@ -17920,11 +17400,11 @@ static void atkF0_copy_caught_poke(void) static void atkF1_setpoke_as_caught(void) { - if (GetNationalPokedexFlag(SpeciesToNationalPokedexNum(gBattleMons[gBankTarget].species), 1)) + if (GetSetPokedexFlag(SpeciesToNationalPokedexNum(gBattleMons[gBankTarget].species), 1)) gBattlescriptCurrInstr = BSScriptReadPtr(gBattlescriptCurrInstr + 1); else { - GetNationalPokedexFlag(SpeciesToNationalPokedexNum(gBattleMons[gBankTarget].species), 3); + GetSetPokedexFlag(SpeciesToNationalPokedexNum(gBattleMons[gBankTarget].species), 3); if (gBattleMons[gBankTarget].species == SPECIES_UNOWN) gSaveBlock2.pokedex.unownPersonality = gBattleMons[gBankTarget].personality; if (gBattleMons[gBankTarget].species == SPECIES_SPINDA) //else if diff --git a/src/battle_7.c b/src/battle/battle_7.c index cf3a3522e..ad96510cf 100644 --- a/src/battle_7.c +++ b/src/battle/battle_7.c @@ -48,8 +48,8 @@ extern struct MusicPlayerInfo gMPlay_BGM; extern u32 gBitTable[]; extern u16 gBattleTypeFlags; extern u8 gBattleMonForms[]; -extern u8 gBattleAnimPlayerMonIndex; -extern u8 gBattleAnimEnemyMonIndex; +extern u8 gBattleAnimBankAttacker; +extern u8 gBattleAnimBankTarget; extern void (*gAnimScriptCallback)(void); extern u8 gAnimScriptActive; extern const u8 *const gBattleAnims_Unknown1[]; @@ -78,7 +78,7 @@ extern void sub_80440EC(); extern void sub_804777C(); extern void sub_8141828(); extern u8 sub_8077ABC(); -extern u8 sub_8078874(u8); +extern u8 AnimBankSpriteExists(u8); extern u8 sub_8077F68(u8); extern u8 sub_8077F7C(u8); extern void sub_8094958(void); @@ -185,8 +185,8 @@ bool8 move_anim_start_t3(u8 a, u8 b, u8 c, u8 d, u16 e) sub_80324E0(a); return TRUE; } - gBattleAnimPlayerMonIndex = b; - gBattleAnimEnemyMonIndex = c; + gBattleAnimBankAttacker = b; + gBattleAnimBankTarget = c; ewram17840.unk0 = e; DoMoveAnim(gBattleAnims_Unknown1, d, 0); taskId = CreateTask(sub_80315E8, 10); @@ -225,8 +225,8 @@ void move_anim_start_t4(u8 a, u8 b, u8 c, u8 d) { u8 taskId; - gBattleAnimPlayerMonIndex = b; - gBattleAnimEnemyMonIndex = c; + gBattleAnimBankAttacker = b; + gBattleAnimBankTarget = c; DoMoveAnim(gBattleAnims_Unknown2, d, 0); taskId = CreateTask(sub_80316CC, 10); gTasks[taskId].data[0] = a; @@ -301,16 +301,16 @@ void BattleLoadOpponentMonSprite(struct Pokemon *pkmn, u8 b) r7); paletteOffset = 0x100 + b * 16; if (ewram17800[b].transformedSpecies == 0) - lzPaletteData = pokemon_get_pal(pkmn); + lzPaletteData = GetMonSpritePal(pkmn); else - lzPaletteData = species_and_otid_get_pal(species, otId, personalityValue); - sub_800D238(lzPaletteData, ewram); + lzPaletteData = GetMonSpritePalFromOtIdPersonality(species, otId, personalityValue); + LZDecompressWram(lzPaletteData, ewram); LoadPalette(ewram, paletteOffset, 0x20); LoadPalette(ewram, 0x80 + b * 16, 0x20); if (species == SPECIES_CASTFORM) { paletteOffset = 0x100 + b * 16; - sub_800D238(lzPaletteData, ewram + 0x16400); + LZDecompressWram(lzPaletteData, ewram + 0x16400); LoadPalette(ewram + 0x16400 + gBattleMonForms[b] * 32, paletteOffset, 0x20); } if (ewram17800[b].transformedSpecies != 0) @@ -353,16 +353,16 @@ void BattleLoadPlayerMonSprite(struct Pokemon *pkmn, u8 b) r7); paletteOffset = 0x100 + b * 16; if (ewram17800[b].transformedSpecies == 0) - lzPaletteData = pokemon_get_pal(pkmn); + lzPaletteData = GetMonSpritePal(pkmn); else - lzPaletteData = species_and_otid_get_pal(species, otId, personalityValue); - sub_800D238(lzPaletteData, ewram); + lzPaletteData = GetMonSpritePalFromOtIdPersonality(species, otId, personalityValue); + LZDecompressWram(lzPaletteData, ewram); LoadPalette(ewram, paletteOffset, 0x20); LoadPalette(ewram, 0x80 + b * 16, 0x20); if (species == SPECIES_CASTFORM) { paletteOffset = 0x100 + b * 16; - sub_800D238(lzPaletteData, ewram + 0x16400); + LZDecompressWram(lzPaletteData, ewram + 0x16400); LoadPalette(ewram + 0x16400 + gBattleMonForms[b] * 32, paletteOffset, 0x20); } if (ewram17800[b].transformedSpecies != 0) @@ -506,7 +506,7 @@ bool8 sub_8031C30(u8 a) void load_gfxc_health_bar(void) { - sub_800D238(gUnknown_08D09C48, (void *)0x02000000); + LZDecompressWram(gUnknown_08D09C48, (void *)0x02000000); } u8 battle_load_something(u8 *pState, u8 *b) @@ -690,14 +690,14 @@ void sub_8031FC4(u8 a, u8 b, bool8 c) dst = (void *)(VRAM + 0x10000 + gSprites[gObjectBankIDs[a]].oam.tileNum * 32); DmaCopy32(3, src, dst, 0x800); paletteOffset = 0x100 + a * 16; - lzPaletteData = species_and_otid_get_pal(species, otId, personalityValue); - sub_800D238(lzPaletteData, ewram); + lzPaletteData = GetMonSpritePalFromOtIdPersonality(species, otId, personalityValue); + LZDecompressWram(lzPaletteData, ewram); LoadPalette(ewram, paletteOffset, 32); if (species == SPECIES_CASTFORM) { u16 *paletteSrc = (u16 *)(ewram + 0x16400); - sub_800D238(lzPaletteData, paletteSrc); + LZDecompressWram(lzPaletteData, paletteSrc); LoadPalette(paletteSrc + gBattleMonForms[b] * 16, paletteOffset, 32); } BlendPalette(paletteOffset, 16, 6, 0x7FFF); @@ -846,7 +846,7 @@ void sub_80326EC(u8 a) for (i = 0; i < gNoOfAllBanks; i++) { - if (sub_8078874(i) != 0) + if (AnimBankSpriteExists(i) != 0) { gSprites[gObjectBankIDs[i]].oam.affineMode = a; if (a == 0) @@ -884,7 +884,7 @@ void sub_80328A4(struct Sprite *sprite) u8 r4 = sprite->data0; struct Sprite *r7 = &gSprites[gObjectBankIDs[r4]]; - if (!r7->inUse || sub_8078874(r4) == 0) + if (!r7->inUse || AnimBankSpriteExists(r4) == 0) { sprite->callback = sub_8032978; return; diff --git a/src/battle_ai.c b/src/battle/battle_ai.c index 0e20c6b05..1869bbe36 100644 --- a/src/battle_ai.c +++ b/src/battle/battle_ai.c @@ -1273,7 +1273,7 @@ static void BattleAICmd_if_arg_not_equal(void) static void BattleAICmd_if_would_go_first(void) { - if (b_first_side(gBankAttacker, gBankTarget, 1) == gAIScriptPtr[1]) + if (GetWhoStrikesFirst(gBankAttacker, gBankTarget, 1) == gAIScriptPtr[1]) gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 2); else gAIScriptPtr += 6; @@ -1281,7 +1281,7 @@ static void BattleAICmd_if_would_go_first(void) static void BattleAICmd_if_would_not_go_first(void) { - if (b_first_side(gBankAttacker, gBankTarget, 1) != gAIScriptPtr[1]) + if (GetWhoStrikesFirst(gBankAttacker, gBankTarget, 1) != gAIScriptPtr[1]) gAIScriptPtr = AIScriptReadPtr(gAIScriptPtr + 2); else gAIScriptPtr += 6; diff --git a/src/battle_anim.c b/src/battle/battle_anim.c index 6bd98099a..111d72813 100644 --- a/src/battle_anim.c +++ b/src/battle/battle_anim.c @@ -37,8 +37,8 @@ EWRAM_DATA u8 gMonAnimTaskIdArray[2] = {0}; EWRAM_DATA u8 gUnknown_0202F7C4 = 0; EWRAM_DATA u8 gUnknown_0202F7C5 = 0; EWRAM_DATA u16 gAnimMoveIndex = 0; // set but unused. -EWRAM_DATA u8 gBattleAnimPlayerMonIndex = 0; -EWRAM_DATA u8 gBattleAnimEnemyMonIndex = 0; +EWRAM_DATA u8 gBattleAnimBankAttacker = 0; +EWRAM_DATA u8 gBattleAnimBankTarget = 0; EWRAM_DATA u16 gUnknown_0202F7CA[4] = {0}; EWRAM_DATA u8 gUnknown_0202F7D2 = 0; extern u16 gUnknown_030041B4; @@ -201,15 +201,15 @@ void battle_anim_clear_some_data(void) gUnknown_0202F7C4 = 0; gUnknown_0202F7C5 = 0; gAnimMoveIndex = 0; - gBattleAnimPlayerMonIndex = 0; - gBattleAnimEnemyMonIndex = 0; + gBattleAnimBankAttacker = 0; + gBattleAnimBankTarget = 0; gUnknown_0202F7D2 = 0; } void ExecuteMoveAnim(u16 move) { - gBattleAnimPlayerMonIndex = gBankAttacker; - gBattleAnimEnemyMonIndex = gBankTarget; + gBattleAnimBankAttacker = gBankAttacker; + gBattleAnimBankTarget = gBankTarget; DoMoveAnim(gBattleAnims_Moves, move, 1); } @@ -396,7 +396,7 @@ static void ScriptCmd_sprite(void) r4 -= 0x40; else r4 = -r4; - _r0 = sub_8079E90(gBattleAnimEnemyMonIndex); + _r0 = sub_8079E90(gBattleAnimBankTarget); r1 = r4; } @@ -407,15 +407,15 @@ static void ScriptCmd_sprite(void) r4 -= 0x40; else r4 = -r4; - _r0 = sub_8079E90(gBattleAnimPlayerMonIndex); + _r0 = sub_8079E90(gBattleAnimBankAttacker); r1 = r4; } r6 = _r0 + r1; if ((s16)r6 < 3) r6 = 3; - r4 = sub_8077ABC(gBattleAnimEnemyMonIndex, 2); - r2 = sub_8077ABC(gBattleAnimEnemyMonIndex, 3); + r4 = sub_8077ABC(gBattleAnimBankTarget, 2); + r2 = sub_8077ABC(gBattleAnimBankTarget, 3); CreateSpriteAndAnimate(r7, r4, r2, r6); gAnimVisualTaskCount++; } @@ -485,10 +485,10 @@ _08075B34:\n\ _08075B36:\n\ lsls r0, 24\n\ lsrs r4, r0, 24\n\ - ldr r0, _08075B40 @ =gBattleAnimEnemyMonIndex\n\ + ldr r0, _08075B40 @ =gBattleAnimBankTarget\n\ b _08075B56\n\ .align 2, 0\n\ -_08075B40: .4byte gBattleAnimEnemyMonIndex\n\ +_08075B40: .4byte gBattleAnimBankTarget\n\ _08075B44:\n\ cmp r4, 0x3F\n\ bls _08075B4E\n\ @@ -500,7 +500,7 @@ _08075B4E:\n\ _08075B50:\n\ lsls r0, 24\n\ lsrs r4, r0, 24\n\ - ldr r0, _08075BAC @ =gBattleAnimPlayerMonIndex\n\ + ldr r0, _08075BAC @ =gBattleAnimBankAttacker\n\ _08075B56:\n\ ldrb r0, [r0]\n\ bl sub_8079E90\n\ @@ -517,7 +517,7 @@ _08075B56:\n\ bgt _08075B74\n\ movs r6, 0x3\n\ _08075B74:\n\ - ldr r5, _08075BB0 @ =gBattleAnimEnemyMonIndex\n\ + ldr r5, _08075BB0 @ =gBattleAnimBankTarget\n\ ldrb r0, [r5]\n\ movs r1, 0x2\n\ bl sub_8077ABC\n\ @@ -543,8 +543,8 @@ _08075B74:\n\ pop {r0}\n\ bx r0\n\ .align 2, 0\n\ -_08075BAC: .4byte gBattleAnimPlayerMonIndex\n\ -_08075BB0: .4byte gBattleAnimEnemyMonIndex\n\ +_08075BAC: .4byte gBattleAnimBankAttacker\n\ +_08075BB0: .4byte gBattleAnimBankTarget\n\ _08075BB4: .4byte gAnimVisualTaskCount\n\ .syntax divided\n"); } @@ -686,10 +686,10 @@ static void ScriptCmd_monbg(void) else if (r6 == 1) r6 = 3; if (r6 == 0 || r6 == 2) - r5 = gBattleAnimPlayerMonIndex; + r5 = gBattleAnimBankAttacker; else - r5 = gBattleAnimEnemyMonIndex; - if (b_side_obj__get_some_boolean(r5)) + r5 = gBattleAnimBankTarget; + if (IsAnimBankSpriteVisible(r5)) { r0 = GetBankIdentity(r5); r0 += 0xFF; @@ -719,7 +719,7 @@ static void ScriptCmd_monbg(void) } r5 ^= 2; - if (r6 > 1 && b_side_obj__get_some_boolean(r5)) + if (r6 > 1 && IsAnimBankSpriteVisible(r5)) { r0 = GetBankIdentity(r5); r0 += 0xFF; @@ -751,20 +751,20 @@ static void ScriptCmd_monbg(void) } #ifdef NONMATCHING -bool8 b_side_obj__get_some_boolean(u8 a) +bool8 IsAnimBankSpriteVisible(u8 a) { - if (IsContest() != 0) + if (IsContest()) { - if (a == gBattleAnimPlayerMonIndex) + if (a == gBattleAnimBankAttacker) return TRUE; else return FALSE; } - if (sub_8078874(a) == 0) + if (!AnimBankSpriteExists(a)) return FALSE; - if (IsContest() != 0) + if (IsContest()) return TRUE; // this line wont ever be reached. - if ((EWRAM_17800[a].unk0 & 1) == 0) + if (!(EWRAM_17800[a].unk0 & 1)) return TRUE; if (gSprites[gObjectBankIDs[a]].invisible) return FALSE; @@ -772,7 +772,7 @@ bool8 b_side_obj__get_some_boolean(u8 a) } #else __attribute__((naked)) -bool8 b_side_obj__get_some_boolean(u8 a) +bool8 IsAnimBankSpriteVisible(u8 a) { asm(".syntax unified\n\ push {r4,r5,lr}\n\ @@ -783,16 +783,16 @@ bool8 b_side_obj__get_some_boolean(u8 a) lsls r0, 24\n\ cmp r0, 0\n\ beq _08075FDC\n\ - ldr r0, _08075FD8 @ =gBattleAnimPlayerMonIndex\n\ + ldr r0, _08075FD8 @ =gBattleAnimBankAttacker\n\ ldrb r0, [r0]\n\ cmp r4, r0\n\ beq _0807601C\n\ b _0807602C\n\ .align 2, 0\n\ -_08075FD8: .4byte gBattleAnimPlayerMonIndex\n\ +_08075FD8: .4byte gBattleAnimBankAttacker\n\ _08075FDC:\n\ adds r0, r4, 0\n\ - bl sub_8078874\n\ + bl AnimBankSpriteExists\n\ lsls r0, 24\n\ cmp r0, 0\n\ beq _0807602C\n\ @@ -1096,9 +1096,9 @@ static void ScriptCmd_clearmonbg(void) else if (r4 == 1) r4 = 3; if (r4 == 0 || r4 == 2) - r5 = gBattleAnimPlayerMonIndex; + r5 = gBattleAnimBankAttacker; else - r5 = gBattleAnimEnemyMonIndex; + r5 = gBattleAnimBankTarget; if (gMonAnimTaskIdArray[0] != 0xFF) gSprites[gObjectBankIDs[r5]].invisible = FALSE; if (r4 > 1 && gMonAnimTaskIdArray[1] != 0xFF) @@ -1155,10 +1155,10 @@ static void ScriptCmd_monbg_22(void) else if (r5 == 1) r5 = 3; if (r5 == 0 || r5 == 2) - r4 = gBattleAnimPlayerMonIndex; + r4 = gBattleAnimBankAttacker; else - r4 = gBattleAnimEnemyMonIndex; - if (b_side_obj__get_some_boolean(r4)) + r4 = gBattleAnimBankTarget; + if (IsAnimBankSpriteVisible(r4)) { r0 = GetBankIdentity(r4); r0 += 0xFF; @@ -1170,7 +1170,7 @@ static void ScriptCmd_monbg_22(void) gSprites[gObjectBankIDs[r4]].invisible = FALSE; } r4 ^= 2; - if (r5 > 1 && b_side_obj__get_some_boolean(r4)) + if (r5 > 1 && IsAnimBankSpriteVisible(r4)) { r0 = GetBankIdentity(r4); r0 += 0xFF; @@ -1197,12 +1197,12 @@ static void ScriptCmd_clearmonbg_23(void) else if (r5 == 1) r5 = 3; if (r5 == 0 || r5 == 2) - r6 = gBattleAnimPlayerMonIndex; + r6 = gBattleAnimBankAttacker; else - r6 = gBattleAnimEnemyMonIndex; - if (b_side_obj__get_some_boolean(r6)) + r6 = gBattleAnimBankTarget; + if (IsAnimBankSpriteVisible(r6)) gSprites[gObjectBankIDs[r6]].invisible = FALSE; - if (r5 > 1 && b_side_obj__get_some_boolean(r6 ^ 2)) + if (r5 > 1 && IsAnimBankSpriteVisible(r6 ^ 2)) gSprites[gObjectBankIDs[r6 ^ 2]].invisible = FALSE; else r5 = 0; @@ -1228,9 +1228,9 @@ static void sub_80769A4(u8 taskId) r5 = 0; else r5 = 1; - if (b_side_obj__get_some_boolean(r4)) + if (IsAnimBankSpriteVisible(r4)) sub_8076464(r5); - if (gTasks[taskId].data[0] > 1 && b_side_obj__get_some_boolean(r4 ^ 2)) + if (gTasks[taskId].data[0] > 1 && IsAnimBankSpriteVisible(r4 ^ 2)) sub_8076464(r5 ^ 1); DestroyTask(taskId); } @@ -1371,7 +1371,7 @@ static void ScriptCmd_fadetobg_25(void) taskId = CreateTask(task_p5_load_battle_screen_elements, 5); if (IsContest() != 0) gTasks[taskId].data[0] = r6; - else if (GetBankSide(gBattleAnimEnemyMonIndex) == 0) + else if (GetBankSide(gBattleAnimBankTarget) == 0) gTasks[taskId].data[0] = r7; else gTasks[taskId].data[0] = r8; @@ -1422,7 +1422,7 @@ static void sub_8076DB8(u16 a) void *dmaSrc; void *dmaDest; - sub_800D238(tilemap, IsContest() ? EWRAM_14800 : EWRAM_18000); + LZDecompressWram(tilemap, IsContest() ? EWRAM_14800 : EWRAM_18000); sub_80763FC(sub_80789BC(), IsContest() ? EWRAM_14800 : EWRAM_18000, 0x100, 0); dmaSrc = IsContest() ? EWRAM_14800 : EWRAM_18000; dmaDest = (void *)(VRAM + 0xD000); @@ -1493,16 +1493,16 @@ static void ScriptCmd_changebg(void) /* s8 sub_8076F98(s8 a) { - if (!IsContest() && (EWRAM_17810[gBattleAnimPlayerMonIndex].unk0 & 0x10)) + if (!IsContest() && (EWRAM_17810[gBattleAnimBankAttacker].unk0 & 0x10)) { - a = GetBankSide(gBattleAnimPlayerMonIndex) ? 0xC0 : 0x3F; + a = GetBankSide(gBattleAnimBankAttacker) ? 0xC0 : 0x3F; } //_08076FDC else { if (IsContest()) { - if (gBattleAnimPlayerMonIndex == gBattleAnimEnemyMonIndex && gBattleAnimPlayerMonIndex == 2 + if (gBattleAnimBankAttacker == gBattleAnimBankTarget && gBattleAnimBankAttacker == 2 && a == 0x3F) { //jump to _0807707A @@ -1514,9 +1514,9 @@ s8 sub_8076F98(s8 a) //_08077004 else { - if (GetBankSide(gBattleAnimPlayerMonIndex) == 0) + if (GetBankSide(gBattleAnimBankAttacker) == 0) { - if (GetBankSide(gBattleAnimEnemyMonIndex) == 0) + if (GetBankSide(gBattleAnimBankTarget) == 0) } //_08077042 else @@ -1540,7 +1540,7 @@ s8 sub_8076F98(s8 a) lsls r0, 24\n\ cmp r0, 0\n\ bne _08076FDC\n\ - ldr r0, _08076FD4 @ =gBattleAnimPlayerMonIndex\n\ + ldr r0, _08076FD4 @ =gBattleAnimBankAttacker\n\ ldrb r2, [r0]\n\ lsls r0, r2, 1\n\ adds r0, r2\n\ @@ -1561,15 +1561,15 @@ s8 sub_8076F98(s8 a) movs r4, 0x3F\n\ b _0807706E\n\ .align 2, 0\n\ -_08076FD4: .4byte gBattleAnimPlayerMonIndex\n\ +_08076FD4: .4byte gBattleAnimBankAttacker\n\ _08076FD8: .4byte 0x02017810\n\ _08076FDC:\n\ bl IsContest\n\ lsls r0, 24\n\ cmp r0, 0\n\ beq _08077004\n\ - ldr r0, _08076FFC @ =gBattleAnimPlayerMonIndex\n\ - ldr r1, _08077000 @ =gBattleAnimEnemyMonIndex\n\ + ldr r0, _08076FFC @ =gBattleAnimBankAttacker\n\ + ldr r1, _08077000 @ =gBattleAnimBankTarget\n\ ldrb r0, [r0]\n\ ldrb r1, [r1]\n\ cmp r0, r1\n\ @@ -1580,16 +1580,16 @@ _08076FDC:\n\ beq _0807707A\n\ b _08077068\n\ .align 2, 0\n\ -_08076FFC: .4byte gBattleAnimPlayerMonIndex\n\ -_08077000: .4byte gBattleAnimEnemyMonIndex\n\ +_08076FFC: .4byte gBattleAnimBankAttacker\n\ +_08077000: .4byte gBattleAnimBankTarget\n\ _08077004:\n\ - ldr r0, _0807702C @ =gBattleAnimPlayerMonIndex\n\ + ldr r0, _0807702C @ =gBattleAnimBankAttacker\n\ ldrb r0, [r0]\n\ bl GetBankSide\n\ lsls r0, 24\n\ cmp r0, 0\n\ bne _08077042\n\ - ldr r0, _08077030 @ =gBattleAnimEnemyMonIndex\n\ + ldr r0, _08077030 @ =gBattleAnimBankTarget\n\ ldrb r0, [r0]\n\ bl GetBankSide\n\ lsls r0, 24\n\ @@ -1602,8 +1602,8 @@ _08077004:\n\ movs r4, 0xC0\n\ b _0807706E\n\ .align 2, 0\n\ -_0807702C: .4byte gBattleAnimPlayerMonIndex\n\ -_08077030: .4byte gBattleAnimEnemyMonIndex\n\ +_0807702C: .4byte gBattleAnimBankAttacker\n\ +_08077030: .4byte gBattleAnimBankTarget\n\ _08077034:\n\ movs r0, 0x40\n\ negs r0, r0\n\ @@ -1613,7 +1613,7 @@ _08077034:\n\ lsls r0, 24\n\ b _0807706C\n\ _08077042:\n\ - ldr r0, _08077064 @ =gBattleAnimEnemyMonIndex\n\ + ldr r0, _08077064 @ =gBattleAnimBankTarget\n\ ldrb r0, [r0]\n\ bl GetBankSide\n\ lsls r0, 24\n\ @@ -1629,7 +1629,7 @@ _08077042:\n\ movs r4, 0x3F\n\ b _0807706E\n\ .align 2, 0\n\ -_08077064: .4byte gBattleAnimEnemyMonIndex\n\ +_08077064: .4byte gBattleAnimBankTarget\n\ _08077068:\n\ lsls r0, r4, 24\n\ negs r0, r0\n\ @@ -1661,16 +1661,16 @@ _08077088:\n\ s8 sub_8077094(s8 a) { - if (!IsContest() && (EWRAM_17810[gBattleAnimPlayerMonIndex].unk0 & 0x10)) + if (!IsContest() && (EWRAM_17810[gBattleAnimBankAttacker].unk0 & 0x10)) { - if (GetBankSide(gBattleAnimPlayerMonIndex) != 0) + if (GetBankSide(gBattleAnimBankAttacker) != 0) a = 0x3F; else a = 0xC0; } else { - if (GetBankSide(gBattleAnimPlayerMonIndex) != 0 || IsContest() != 0) + if (GetBankSide(gBattleAnimBankAttacker) != 0 || IsContest() != 0) a = -a; } return a; @@ -2128,9 +2128,9 @@ static void ScriptCmd_monbgprio_28(void) r2 = SCRIPT_READ_8(gBattleAnimScriptPtr + 1); gBattleAnimScriptPtr += 2; if (r2 != 0) - r0 = gBattleAnimEnemyMonIndex; + r0 = gBattleAnimBankTarget; else - r0 = gBattleAnimPlayerMonIndex; + r0 = gBattleAnimBankAttacker; r4 = GetBankIdentity(r0); if (!IsContest() && (r4 == 0 || r4 == 3)) { @@ -2157,12 +2157,12 @@ static void ScriptCmd_monbgprio_2A(void) r6 = SCRIPT_READ_8(gBattleAnimScriptPtr + 1); gBattleAnimScriptPtr += 2; - if (GetBankSide(gBattleAnimPlayerMonIndex) != GetBankSide(gBattleAnimEnemyMonIndex)) + if (GetBankSide(gBattleAnimBankAttacker) != GetBankSide(gBattleAnimBankTarget)) { if (r6 != 0) - r0 = gBattleAnimEnemyMonIndex; + r0 = gBattleAnimBankTarget; else - r0 = gBattleAnimPlayerMonIndex; + r0 = gBattleAnimBankAttacker; r4 = GetBankIdentity(r0); if (!IsContest() && (r4 == 0 || r4 == 3)) { @@ -2178,7 +2178,7 @@ static void ScriptCmd_invisible(void) u8 spriteId; r0 = SCRIPT_READ_8(gBattleAnimScriptPtr + 1); - spriteId = obj_id_for_side_relative_to_move(r0); + spriteId = GetAnimBankSpriteId(r0); if (spriteId != 0xFF) { gSprites[spriteId].invisible = TRUE; @@ -2192,7 +2192,7 @@ static void ScriptCmd_visible(void) u8 spriteId; r0 = SCRIPT_READ_8(gBattleAnimScriptPtr + 1); - spriteId = obj_id_for_side_relative_to_move(r0); + spriteId = GetAnimBankSpriteId(r0); if (spriteId != 0xFF) { gSprites[spriteId].invisible = FALSE; @@ -2209,17 +2209,17 @@ static void ScriptCmd_doublebattle_2D(void) r7 = SCRIPT_READ_8(gBattleAnimScriptPtr + 1); gBattleAnimScriptPtr += 2; if (!IsContest() && IsDoubleBattle() - && GetBankSide(gBattleAnimPlayerMonIndex) == GetBankSide(gBattleAnimEnemyMonIndex)) + && GetBankSide(gBattleAnimBankAttacker) == GetBankSide(gBattleAnimBankTarget)) { if (r7 == 0) { - r4 = GetBankIdentity_permutated(gBattleAnimPlayerMonIndex); - spriteId = obj_id_for_side_relative_to_move(0); + r4 = GetBankIdentity_permutated(gBattleAnimBankAttacker); + spriteId = GetAnimBankSpriteId(0); } else { - r4 = GetBankIdentity_permutated(gBattleAnimEnemyMonIndex); - spriteId = obj_id_for_side_relative_to_move(1); + r4 = GetBankIdentity_permutated(gBattleAnimBankTarget); + spriteId = GetAnimBankSpriteId(1); } if (spriteId != 0xFF) { @@ -2243,17 +2243,17 @@ static void ScriptCmd_doublebattle_2E(void) r7 = SCRIPT_READ_8(gBattleAnimScriptPtr + 1); gBattleAnimScriptPtr += 2; if (!IsContest() && IsDoubleBattle() - && GetBankSide(gBattleAnimPlayerMonIndex) == GetBankSide(gBattleAnimEnemyMonIndex)) + && GetBankSide(gBattleAnimBankAttacker) == GetBankSide(gBattleAnimBankTarget)) { if (r7 == 0) { - r4 = GetBankIdentity_permutated(gBattleAnimPlayerMonIndex); - spriteId = obj_id_for_side_relative_to_move(0); + r4 = GetBankIdentity_permutated(gBattleAnimBankAttacker); + spriteId = GetAnimBankSpriteId(0); } else { - r4 = GetBankIdentity_permutated(gBattleAnimEnemyMonIndex); - spriteId = obj_id_for_side_relative_to_move(1); + r4 = GetBankIdentity_permutated(gBattleAnimBankTarget); + spriteId = GetAnimBankSpriteId(1); } if (spriteId != 0xFF && r4 == 2) { diff --git a/src/battle_anim_807B69C.c b/src/battle/battle_anim_807B69C.c index 42932877b..bf3eb7ef1 100644 --- a/src/battle_anim_807B69C.c +++ b/src/battle/battle_anim_807B69C.c @@ -8,12 +8,12 @@ #include "task.h" #include "trig.h" -extern u8 gBattleAnimPlayerMonIndex; -extern u8 gBattleAnimEnemyMonIndex; +extern u8 gBattleAnimBankAttacker; +extern u8 gBattleAnimBankTarget; extern bool8 gAnimScriptActive; extern void (*gAnimScriptCallback)(void); extern s16 gBattleAnimArgs[]; -extern u8 gBattleAnimEnemyMonIndex; +extern u8 gBattleAnimBankTarget; extern u8 gObjectBankIDs[]; extern const struct CompressedSpriteSheet gBattleAnimPicTable[]; extern const struct CompressedSpritePalette gBattleAnimPaletteTable[]; @@ -179,8 +179,8 @@ static void sub_807B8A4(struct Sprite *sprite) void sub_807B920(u8 taskId) { - s16 x = sub_8077ABC(gBattleAnimEnemyMonIndex, 2) - 32; - s16 y = sub_8077ABC(gBattleAnimEnemyMonIndex, 3) - 36; + s16 x = sub_8077ABC(gBattleAnimBankTarget, 2) - 32; + s16 y = sub_8077ABC(gBattleAnimBankTarget, 3) - 36; u8 spriteId; if (IsContest()) @@ -335,8 +335,8 @@ void move_anim_start_t2(u8 a, u8 b) { u8 taskId; - gBattleAnimPlayerMonIndex = a; - gBattleAnimEnemyMonIndex = a; + gBattleAnimBankAttacker = a; + gBattleAnimBankTarget = a; DoMoveAnim(gBattleAnims_StatusConditions, b, 0); taskId = CreateTask(sub_807BDAC, 10); gTasks[taskId].data[0] = a; diff --git a/src/battle_anim_80A7E7C.c b/src/battle/battle_anim_80A7E7C.c index 31984977f..e0c79dc8e 100644 --- a/src/battle_anim_80A7E7C.c +++ b/src/battle/battle_anim_80A7E7C.c @@ -12,8 +12,8 @@ extern s16 gBattleAnimArgs[8]; extern u8 gObjectBankIDs[]; extern s32 gMoveDmgMoveAnim; extern u16 gMovePowerMoveAnim; -extern u8 gBattleAnimPlayerMonIndex; -extern u8 gBattleAnimEnemyMonIndex; +extern u8 gBattleAnimBankAttacker; +extern u8 gBattleAnimBankTarget; static void sub_80A7EF0(u8 taskId); static void sub_80A808C(u8 taskId); @@ -34,7 +34,7 @@ static void sub_80A913C(u8 taskId); void sub_80A7E7C(u8 taskId) { u8 sprite; - sprite = obj_id_for_side_relative_to_move(gBattleAnimArgs[0]); + sprite = GetAnimBankSpriteId(gBattleAnimArgs[0]); if (sprite == 0xff) { DestroyAnimVisualTask(taskId); @@ -96,7 +96,7 @@ void sub_80A7FA0(u8 taskId) r6 = 0; if (gBattleAnimArgs[0] < 4) { - sprite = obj_id_for_side_relative_to_move(gBattleAnimArgs[0]); + sprite = GetAnimBankSpriteId(gBattleAnimArgs[0]); if (sprite == 0xff) { DestroyAnimVisualTask(taskId); @@ -121,7 +121,7 @@ void sub_80A7FA0(u8 taskId) side = GetBankByPlayerAI(3); break; } - if (b_side_obj__get_some_boolean(side) == FALSE) + if (IsAnimBankSpriteVisible(side) == FALSE) { r6 = 1; } @@ -129,7 +129,7 @@ void sub_80A7FA0(u8 taskId) } else { - sprite = gObjectBankIDs[gBattleAnimPlayerMonIndex]; + sprite = gObjectBankIDs[gBattleAnimBankAttacker]; } if (r6) { @@ -186,7 +186,7 @@ static void sub_80A808C(u8 taskId) void sub_80A8154(u8 taskId) { u8 sprite; - sprite = obj_id_for_side_relative_to_move(gBattleAnimArgs[0]); + sprite = GetAnimBankSpriteId(gBattleAnimArgs[0]); if (sprite == 0xff) { DestroyAnimVisualTask(taskId); @@ -244,7 +244,7 @@ static void sub_80A81D8(u8 taskId) void sub_80A8314(u8 taskId) { - u8 sprite = obj_id_for_side_relative_to_move(gBattleAnimArgs[0]); + u8 sprite = GetAnimBankSpriteId(gBattleAnimArgs[0]); gSprites[sprite].pos2.x = gBattleAnimArgs[1]; TASK.data[0] = sprite; TASK.data[1] = gBattleAnimArgs[1]; @@ -286,7 +286,7 @@ void sub_80A8408(u8 taskId) u8 sprite; u8 v1; v1 = 1; - sprite = obj_id_for_side_relative_to_move(gBattleAnimArgs[0]); + sprite = GetAnimBankSpriteId(gBattleAnimArgs[0]); if (gBattleAnimArgs[4] > 5) { gBattleAnimArgs[4] = 5; @@ -328,7 +328,7 @@ static void sub_80A8488(u8 taskId) void sub_80A8500(u8 taskId) { - if (GetBankSide(gBattleAnimPlayerMonIndex)) + if (GetBankSide(gBattleAnimBankAttacker)) { gBattleAnimArgs[1] = -gBattleAnimArgs[1]; } @@ -338,7 +338,7 @@ void sub_80A8500(u8 taskId) void sub_80A8530(struct Sprite *sprite) { sprite->invisible = TRUE; - if (GetBankSide(gBattleAnimPlayerMonIndex)) + if (GetBankSide(gBattleAnimBankAttacker)) { sprite->data1 = -gBattleAnimArgs[1]; } @@ -348,9 +348,9 @@ void sub_80A8530(struct Sprite *sprite) } sprite->data0 = gBattleAnimArgs[0]; sprite->data2 = 0; - sprite->data3 = gObjectBankIDs[gBattleAnimPlayerMonIndex]; + sprite->data3 = gObjectBankIDs[gBattleAnimBankAttacker]; sprite->data4 = gBattleAnimArgs[0]; - oamt_set_x3A_32(sprite, sub_80A85A4); + StoreSpriteCallbackInData6(sprite, sub_80A85A4); sprite->callback = sub_8078458; } @@ -359,20 +359,20 @@ static void sub_80A85A4(struct Sprite *sprite) sprite->data0 = sprite->data4; sprite->data1 = -sprite->data1; sprite->callback = sub_8078458; - oamt_set_x3A_32(sprite, move_anim_8072740); + StoreSpriteCallbackInData6(sprite, move_anim_8072740); } void sub_80A85C8(struct Sprite *sprite) { u8 spriteId; sprite->invisible = TRUE; - spriteId = obj_id_for_side_relative_to_move(gBattleAnimArgs[2]); + spriteId = GetAnimBankSpriteId(gBattleAnimArgs[2]); sprite->data0 = gBattleAnimArgs[0]; sprite->data1 = 0; sprite->data2 = gBattleAnimArgs[1]; sprite->data3 = spriteId; sprite->data4 = gBattleAnimArgs[0]; - oamt_set_x3A_32(sprite, sub_80A8614); + StoreSpriteCallbackInData6(sprite, sub_80A8614); sprite->callback = sub_8078458; } @@ -381,7 +381,7 @@ void sub_80A8614(struct Sprite *sprite) sprite->data0 = sprite->data4; sprite->data2 = -sprite->data2; sprite->callback = sub_8078458; - oamt_set_x3A_32(sprite, move_anim_8072740); + StoreSpriteCallbackInData6(sprite, move_anim_8072740); } void sub_80A8638(struct Sprite *sprite) @@ -390,11 +390,11 @@ void sub_80A8638(struct Sprite *sprite) int spriteId; if (!gBattleAnimArgs[0]) { - spriteId = gObjectBankIDs[gBattleAnimPlayerMonIndex]; + spriteId = gObjectBankIDs[gBattleAnimBankAttacker]; } else { - spriteId = gObjectBankIDs[gBattleAnimEnemyMonIndex]; + spriteId = gObjectBankIDs[gBattleAnimBankTarget]; } sprite->data0 = gBattleAnimArgs[2]; sprite->data1 = gSprites[spriteId].pos1.x + gSprites[spriteId].pos2.x; @@ -457,11 +457,11 @@ void sub_80A8764(struct Sprite *sprite) u8 spriteId; if (!gBattleAnimArgs[0]) { - v1 = gBattleAnimPlayerMonIndex; + v1 = gBattleAnimBankAttacker; } else { - v1 = gBattleAnimEnemyMonIndex; + v1 = gBattleAnimBankTarget; } spriteId = gObjectBankIDs[v1]; if (GetBankSide(v1)) @@ -482,7 +482,7 @@ void sub_80A8764(struct Sprite *sprite) sprite->data4 = 0; sprite->data5 = spriteId; sprite->invisible = TRUE; - oamt_set_x3A_32(sprite, move_anim_8072740); + StoreSpriteCallbackInData6(sprite, move_anim_8072740); sprite->callback = sub_80784A8; } @@ -493,11 +493,11 @@ void sub_80A8818(struct Sprite *sprite) sprite->invisible = TRUE; if (!gBattleAnimArgs[0]) { - v1 = gBattleAnimPlayerMonIndex; + v1 = gBattleAnimBankAttacker; } else { - v1 = gBattleAnimEnemyMonIndex; + v1 = gBattleAnimBankTarget; } spriteId = gObjectBankIDs[v1]; if (GetBankSide(v1)) @@ -520,11 +520,11 @@ void sub_80A8818(struct Sprite *sprite) sprite->data6 = gBattleAnimArgs[5]; if (!gBattleAnimArgs[5]) { - oamt_set_x3A_32(sprite, move_anim_8072740); + StoreSpriteCallbackInData6(sprite, move_anim_8072740); } else { - oamt_set_x3A_32(sprite, sub_80A88F0); + StoreSpriteCallbackInData6(sprite, sub_80A88F0); } sprite->callback = sub_80784A8; } @@ -541,12 +541,12 @@ void sub_80A8920(u8 taskId) { s16 r7; r7 = 0x8000 / gBattleAnimArgs[3]; - if (GetBankSide(gBattleAnimPlayerMonIndex)) + if (GetBankSide(gBattleAnimBankAttacker)) { gBattleAnimArgs[1] = -gBattleAnimArgs[1]; gBattleAnimArgs[5] = -gBattleAnimArgs[5]; } - TASK.data[0] = obj_id_for_side_relative_to_move(gBattleAnimArgs[0]); + TASK.data[0] = GetAnimBankSpriteId(gBattleAnimArgs[0]); TASK.data[1] = (gBattleAnimArgs[1] << 8) / gBattleAnimArgs[3]; TASK.data[2] = gBattleAnimArgs[2]; TASK.data[3] = gBattleAnimArgs[3]; @@ -600,30 +600,30 @@ void sub_80A8A80(u8 taskId) { case 0: case 1: - spriteId = obj_id_for_side_relative_to_move(gBattleAnimArgs[0]); + spriteId = GetAnimBankSpriteId(gBattleAnimArgs[0]); break; case 2: - if (!b_side_obj__get_some_boolean(gBattleAnimPlayerMonIndex ^ 2)) + if (!IsAnimBankSpriteVisible(gBattleAnimBankAttacker ^ 2)) { DestroyAnimVisualTask(taskId); return; } - spriteId = gObjectBankIDs[gBattleAnimPlayerMonIndex ^ 2]; + spriteId = gObjectBankIDs[gBattleAnimBankAttacker ^ 2]; break; case 3: - if (!b_side_obj__get_some_boolean(gBattleAnimEnemyMonIndex ^ 2)) + if (!IsAnimBankSpriteVisible(gBattleAnimBankTarget ^ 2)) { DestroyAnimVisualTask(taskId); return; } - spriteId = gObjectBankIDs[gBattleAnimEnemyMonIndex ^ 2]; + spriteId = gObjectBankIDs[gBattleAnimBankTarget ^ 2]; break; default: DestroyAnimVisualTask(taskId); return; } TASK.data[0] = spriteId; - if (GetBankSide(gBattleAnimEnemyMonIndex)) + if (GetBankSide(gBattleAnimBankTarget)) { TASK.data[1] = gBattleAnimArgs[1]; } @@ -648,11 +648,11 @@ static void sub_80A8B3C(u8 taskId) void sub_80A8B88(u8 taskId) { u8 spriteId; - if (GetBankSide(gBattleAnimPlayerMonIndex)) + if (GetBankSide(gBattleAnimBankAttacker)) { gBattleAnimArgs[1] = -gBattleAnimArgs[1]; } - spriteId = obj_id_for_side_relative_to_move(gBattleAnimArgs[4]); + spriteId = GetAnimBankSpriteId(gBattleAnimArgs[4]); TASK.data[0] = gBattleAnimArgs[0]; TASK.data[1] = gBattleAnimArgs[1]; TASK.data[2] = gBattleAnimArgs[2]; @@ -660,11 +660,11 @@ void sub_80A8B88(u8 taskId) TASK.data[4] = spriteId; if (gBattleAnimArgs[4] == 0) { - TASK.data[5] = gBattleAnimPlayerMonIndex; + TASK.data[5] = gBattleAnimBankAttacker; } else { - TASK.data[5] = gBattleAnimEnemyMonIndex; + TASK.data[5] = gBattleAnimBankTarget; } TASK.data[12] = 1; TASK.func = sub_80A8C0C; @@ -714,7 +714,7 @@ static void sub_80A8C0C(u8 taskId) void sub_80A8D34(u8 taskId) { u8 spriteId; - spriteId = obj_id_for_side_relative_to_move(gBattleAnimArgs[3]); + spriteId = GetAnimBankSpriteId(gBattleAnimArgs[3]); sub_8078E70(spriteId, gBattleAnimArgs[4]); TASK.data[0] = gBattleAnimArgs[0]; TASK.data[1] = gBattleAnimArgs[1]; @@ -754,7 +754,7 @@ static void sub_80A8D8C(u8 taskId) void sub_80A8E04(u8 taskId) { u8 spriteId; - spriteId = obj_id_for_side_relative_to_move(gBattleAnimArgs[2]); + spriteId = GetAnimBankSpriteId(gBattleAnimArgs[2]); sub_8078E70(spriteId, 0); TASK.data[1] = 0; TASK.data[2] = gBattleAnimArgs[0]; @@ -777,11 +777,11 @@ void sub_80A8E04(u8 taskId) { if (gBattleAnimArgs[2] == 0) { - TASK.data[7] = !GetBankSide(gBattleAnimPlayerMonIndex); + TASK.data[7] = !GetBankSide(gBattleAnimBankAttacker); } else { - TASK.data[7] = !GetBankSide(gBattleAnimEnemyMonIndex); + TASK.data[7] = !GetBankSide(gBattleAnimBankTarget); } } if (TASK.data[7]) @@ -798,20 +798,20 @@ void sub_80A8E04(u8 taskId) void sub_80A8EFC(u8 taskId) { u8 spriteId; - spriteId = obj_id_for_side_relative_to_move(gBattleAnimArgs[2]); + spriteId = GetAnimBankSpriteId(gBattleAnimArgs[2]); sub_8078E70(spriteId, 0); TASK.data[1] = 0; TASK.data[2] = gBattleAnimArgs[0]; if (gBattleAnimArgs[2] == 0) { - if (GetBankSide(gBattleAnimPlayerMonIndex)) + if (GetBankSide(gBattleAnimBankAttacker)) { gBattleAnimArgs[1] = -gBattleAnimArgs[1]; } } else { - if (GetBankSide(gBattleAnimEnemyMonIndex)) + if (GetBankSide(gBattleAnimBankTarget)) { gBattleAnimArgs[1] = -gBattleAnimArgs[1]; } @@ -891,7 +891,7 @@ void sub_80A9058(u8 taskId) TASK.data[12] = 0; TASK.data[10] = gBattleAnimArgs[3]; TASK.data[11] = gBattleAnimArgs[4]; - TASK.data[7] = obj_id_for_side_relative_to_move(1); + TASK.data[7] = GetAnimBankSpriteId(1); TASK.data[8] = gSprites[TASK.data[7]].pos2.x; TASK.data[9] = gSprites[TASK.data[7]].pos2.y; TASK.data[0] = 0; diff --git a/src/battle_anim_80CA710.c b/src/battle/battle_anim_80CA710.c index 65ccd7c21..65ccd7c21 100644 --- a/src/battle_anim_80CA710.c +++ b/src/battle/battle_anim_80CA710.c diff --git a/src/battle_controller_linkopponent.c b/src/battle/battle_controller_linkopponent.c index 93c6671e5..0b6c3b6a1 100644 --- a/src/battle_controller_linkopponent.c +++ b/src/battle/battle_controller_linkopponent.c @@ -71,7 +71,7 @@ extern void sub_8031A6C(u16, u8); extern void sub_80313A0(struct Sprite *); extern void sub_803757C(void); extern void oamt_add_pos2_onto_pos1(); -extern void oamt_set_x3A_32(); +extern void StoreSpriteCallbackInData6(); extern void sub_8078B34(struct Sprite *); extern void sub_80375B4(void); extern void sub_8010384(struct Sprite *); @@ -99,7 +99,7 @@ extern void nullsub_47(void); extern bool8 IsDoubleBattle(void); extern void sub_8037840(void); extern void sub_8031B74(); -extern u8 sub_8078874(); +extern u8 AnimBankSpriteExists(); extern u8 move_anim_start_t3(); extern void sub_8037FD8(void); extern void sub_8037F34(void); @@ -1285,7 +1285,7 @@ void LinkOpponentHandleTrainerSlideBack(void) gSprites[gObjectBankIDs[gActiveBank]].data2 = 280; gSprites[gObjectBankIDs[gActiveBank]].data4 = gSprites[gObjectBankIDs[gActiveBank]].pos1.y; gSprites[gObjectBankIDs[gActiveBank]].callback = sub_8078B34; - oamt_set_x3A_32(&gSprites[gObjectBankIDs[gActiveBank]], SpriteCallbackDummy); + StoreSpriteCallbackInData6(&gSprites[gObjectBankIDs[gActiveBank]], SpriteCallbackDummy); gBattleBankFunc[gActiveBank] = sub_80375B4; } @@ -1636,7 +1636,7 @@ void LinkOpponentHandleTrainerBallThrow(void) gSprites[gObjectBankIDs[gActiveBank]].data2 = 280; gSprites[gObjectBankIDs[gActiveBank]].data4 = gSprites[gObjectBankIDs[gActiveBank]].pos1.y; gSprites[gObjectBankIDs[gActiveBank]].callback = sub_8078B34; - oamt_set_x3A_32(&gSprites[gObjectBankIDs[gActiveBank]], sub_803A3A8); + StoreSpriteCallbackInData6(&gSprites[gObjectBankIDs[gActiveBank]], sub_803A3A8); taskId = CreateTask(sub_803A2C4, 5); gTasks[taskId].data[0] = gActiveBank; if (ewram17810[gActiveBank].unk0_0) @@ -1733,7 +1733,7 @@ void LinkOpponentHandlecmd50(void) void LinkOpponentHandleSpriteInvisibility(void) { - if (sub_8078874(gActiveBank) != 0) + if (AnimBankSpriteExists(gActiveBank) != 0) { gSprites[gObjectBankIDs[gActiveBank]].invisible = gBattleBufferA[gActiveBank][1]; sub_8031F88(gActiveBank); diff --git a/src/battle_controller_linkpartner.c b/src/battle/battle_controller_linkpartner.c index 95022eaaf..3e34b2e25 100644 --- a/src/battle_controller_linkpartner.c +++ b/src/battle/battle_controller_linkpartner.c @@ -66,7 +66,7 @@ extern u8 gAnimScriptActive; extern void (*gAnimScriptCallback)(void); extern u8 move_anim_start_t3(); -extern u8 sub_8078874(); +extern u8 AnimBankSpriteExists(); extern void sub_8044CA0(u8); extern void sub_8030E38(struct Sprite *); extern void sub_80E43C0(); @@ -82,7 +82,7 @@ extern void sub_80324BC(); extern u8 sub_8031720(); extern u8 mplay_80342A4(); extern void oamt_add_pos2_onto_pos1(); -extern void oamt_set_x3A_32(); +extern void StoreSpriteCallbackInData6(); extern void sub_8078B34(struct Sprite *); extern void sub_80105EC(struct Sprite *); extern s32 sub_803FC34(u16); @@ -1239,7 +1239,7 @@ void LinkPartnerHandleTrainerSlideBack(void) gSprites[gObjectBankIDs[gActiveBank]].data2 = -40; gSprites[gObjectBankIDs[gActiveBank]].data4 = gSprites[gObjectBankIDs[gActiveBank]].pos1.y; gSprites[gObjectBankIDs[gActiveBank]].callback = sub_8078B34; - oamt_set_x3A_32(&gSprites[gObjectBankIDs[gActiveBank]], SpriteCallbackDummy); + StoreSpriteCallbackInData6(&gSprites[gObjectBankIDs[gActiveBank]], SpriteCallbackDummy); gBattleBankFunc[gActiveBank] = sub_811DB1C; } @@ -1592,7 +1592,7 @@ void LinkPartnerHandleTrainerBallThrow(void) gSprites[gObjectBankIDs[gActiveBank]].data4 = gSprites[gObjectBankIDs[gActiveBank]].pos1.y; gSprites[gObjectBankIDs[gActiveBank]].callback = sub_8078B34; gSprites[gObjectBankIDs[gActiveBank]].data5 = gActiveBank; - oamt_set_x3A_32(&gSprites[gObjectBankIDs[gActiveBank]], sub_8030E38); + StoreSpriteCallbackInData6(&gSprites[gObjectBankIDs[gActiveBank]], sub_8030E38); StartSpriteAnim(&gSprites[gObjectBankIDs[gActiveBank]], 1); r4 = AllocSpritePalette(0xD6F9); LoadCompressedPalette( @@ -1682,7 +1682,7 @@ void LinkPartnerHandlecmd50(void) void LinkPartnerHandleSpriteInvisibility(void) { - if (sub_8078874(gActiveBank) != 0) + if (AnimBankSpriteExists(gActiveBank) != 0) { gSprites[gObjectBankIDs[gActiveBank]].invisible = gBattleBufferA[gActiveBank][1]; sub_8031F88(gActiveBank); diff --git a/src/battle_controller_opponent.c b/src/battle/battle_controller_opponent.c index dd8c62cce..72b56b962 100644 --- a/src/battle_controller_opponent.c +++ b/src/battle/battle_controller_opponent.c @@ -85,7 +85,7 @@ extern void sub_8032B84(void); extern void sub_8078B34(struct Sprite *); extern void sub_8032BBC(void); extern void oamt_add_pos2_onto_pos1(); -extern void oamt_set_x3A_32(); +extern void StoreSpriteCallbackInData6(); extern void sub_803311C(void); extern void sub_8010384(struct Sprite *); extern bool8 mplay_80342A4(u8); @@ -113,7 +113,7 @@ extern void nullsub_45(void); extern void sub_8031B74(); extern bool8 IsDoubleBattle(void); extern void sub_8032E2C(void); -extern u8 sub_8078874(); +extern u8 AnimBankSpriteExists(); extern u8 move_anim_start_t3(); extern void sub_80334C0(void); @@ -1281,7 +1281,7 @@ void OpponentHandleTrainerSlideBack(void) gSprites[gObjectBankIDs[gActiveBank]].data2 = 280; gSprites[gObjectBankIDs[gActiveBank]].data4 = gSprites[gObjectBankIDs[gActiveBank]].pos1.y; gSprites[gObjectBankIDs[gActiveBank]].callback = sub_8078B34; - oamt_set_x3A_32(&gSprites[gObjectBankIDs[gActiveBank]], SpriteCallbackDummy); + StoreSpriteCallbackInData6(&gSprites[gObjectBankIDs[gActiveBank]], SpriteCallbackDummy); gBattleBankFunc[gActiveBank] = sub_8032BBC; } @@ -1910,7 +1910,7 @@ void OpponentHandleTrainerBallThrow(void) gSprites[gObjectBankIDs[gActiveBank]].data2 = 280; gSprites[gObjectBankIDs[gActiveBank]].data4 = gSprites[gObjectBankIDs[gActiveBank]].pos1.y; gSprites[gObjectBankIDs[gActiveBank]].callback = sub_8078B34; - oamt_set_x3A_32(&gSprites[gObjectBankIDs[gActiveBank]], sub_8035C10); + StoreSpriteCallbackInData6(&gSprites[gObjectBankIDs[gActiveBank]], sub_8035C10); taskId = CreateTask(sub_8035C44, 5); gTasks[taskId].data[0] = gActiveBank; if (ewram17810[gActiveBank].unk0_0) @@ -2007,7 +2007,7 @@ void OpponentHandlecmd50(void) void OpponentHandleSpriteInvisibility(void) { - if (sub_8078874(gActiveBank) != 0) + if (AnimBankSpriteExists(gActiveBank) != 0) { gSprites[gObjectBankIDs[gActiveBank]].invisible = gBattleBufferA[gActiveBank][1]; sub_8031F88(gActiveBank); diff --git a/src/battle_controller_player.c b/src/battle/battle_controller_player.c index 5cfdeefbe..53b596c5e 100644 --- a/src/battle_controller_player.c +++ b/src/battle/battle_controller_player.c @@ -101,11 +101,11 @@ extern u8 GetBankSide(u8); extern void sub_80E43C0(); extern void oamt_add_pos2_onto_pos1(); extern void sub_8078B34(struct Sprite *); -extern void oamt_set_x3A_32(); +extern void StoreSpriteCallbackInData6(); extern void BattleLoadPlayerMonSprite(); extern bool8 IsDoubleBattle(void); extern void sub_802D500(void); -extern bool8 sub_8078874(u8); +extern bool8 AnimBankSpriteExists(u8); extern bool8 move_anim_start_t3(); extern void sub_802E460(void); extern void b_link_standby_message(void); @@ -2425,7 +2425,7 @@ void PlayerHandleTrainerSlideBack(void) gSprites[gObjectBankIDs[gActiveBank]].data2 = -40; gSprites[gObjectBankIDs[gActiveBank]].data4 = gSprites[gObjectBankIDs[gActiveBank]].pos1.y; gSprites[gObjectBankIDs[gActiveBank]].callback = sub_8078B34; - oamt_set_x3A_32(&gSprites[gObjectBankIDs[gActiveBank]], SpriteCallbackDummy); + StoreSpriteCallbackInData6(&gSprites[gObjectBankIDs[gActiveBank]], SpriteCallbackDummy); StartSpriteAnim(&gSprites[gObjectBankIDs[gActiveBank]], 1); gBattleBankFunc[gActiveBank] = sub_802D274; } @@ -2896,7 +2896,7 @@ void PlayerHandleTrainerBallThrow(void) gSprites[gObjectBankIDs[gActiveBank]].data4 = gSprites[gObjectBankIDs[gActiveBank]].pos1.y; gSprites[gObjectBankIDs[gActiveBank]].callback = sub_8078B34; gSprites[gObjectBankIDs[gActiveBank]].data5 = gActiveBank; - oamt_set_x3A_32(&gSprites[gObjectBankIDs[gActiveBank]], sub_8030E38); + StoreSpriteCallbackInData6(&gSprites[gObjectBankIDs[gActiveBank]], sub_8030E38); StartSpriteAnim(&gSprites[gObjectBankIDs[gActiveBank]], 1); paletteNum = AllocSpritePalette(0xD6F8); LoadCompressedPalette(gTrainerBackPicPaletteTable[gSaveBlock2.playerGender].data, 0x100 + paletteNum * 16, 32); @@ -2994,7 +2994,7 @@ void PlayerHandlecmd50(void) void PlayerHandleSpriteInvisibility(void) { - if (sub_8078874(gActiveBank)) + if (AnimBankSpriteExists(gActiveBank)) { gSprites[gObjectBankIDs[gActiveBank]].invisible = gBattleBufferA[gActiveBank][1]; sub_8031F88(gActiveBank); diff --git a/src/battle_controller_safari.c b/src/battle/battle_controller_safari.c index e05578c31..e05578c31 100644 --- a/src/battle_controller_safari.c +++ b/src/battle/battle_controller_safari.c diff --git a/src/battle_controller_wally.c b/src/battle/battle_controller_wally.c index f2cf5bbb4..bf6ef0892 100644 --- a/src/battle_controller_wally.c +++ b/src/battle/battle_controller_wally.c @@ -89,7 +89,7 @@ extern void sub_80E43C0(); extern void oamt_add_pos2_onto_pos1(); extern void sub_8078B34(struct Sprite *); extern void sub_8030E38(struct Sprite *); -extern void oamt_set_x3A_32(); +extern void StoreSpriteCallbackInData6(); extern u8 sub_8046400(); extern u8 sub_8077ABC(); extern u8 sub_8077F68(); @@ -1490,7 +1490,7 @@ void WallyHandleTrainerBallThrow(void) gSprites[gObjectBankIDs[gActiveBank]].data4 = gSprites[gObjectBankIDs[gActiveBank]].pos1.y; gSprites[gObjectBankIDs[gActiveBank]].callback = sub_8078B34; gSprites[gObjectBankIDs[gActiveBank]].data5 = gActiveBank; - oamt_set_x3A_32(&gSprites[gObjectBankIDs[gActiveBank]], sub_8030E38); + StoreSpriteCallbackInData6(&gSprites[gObjectBankIDs[gActiveBank]], sub_8030E38); StartSpriteAnim(&gSprites[gObjectBankIDs[gActiveBank]], 1); paletteNum = AllocSpritePalette(0xD6F8); LoadCompressedPalette(gTrainerBackPicPaletteTable[2].data, 0x100 + paletteNum * 16, 32); diff --git a/src/battle_interface.c b/src/battle/battle_interface.c index 246bda62b..0741ad33a 100644 --- a/src/battle_interface.c +++ b/src/battle/battle_interface.c @@ -2501,7 +2501,7 @@ static void sub_8045458(u8 a, u8 b) if (GetBankSide(r4) != 0) { u16 species = GetMonData(&gEnemyParty[gBattlePartyID[r4]], MON_DATA_SPECIES); - if (GetNationalPokedexFlag(SpeciesToNationalPokedexNum(species), 1) != 0) + if (GetSetPokedexFlag(SpeciesToNationalPokedexNum(species), 1) != 0) { r4 = gSprites[a].data5; if (b != 0) diff --git a/src/battle_message.c b/src/battle/battle_message.c index a3cc320ad..a3cc320ad 100644 --- a/src/battle_message.c +++ b/src/battle/battle_message.c diff --git a/src/battle_party_menu.c b/src/battle/battle_party_menu.c index 49e0b8432..49e0b8432 100644 --- a/src/battle_party_menu.c +++ b/src/battle/battle_party_menu.c diff --git a/src/battle_records.c b/src/battle/battle_records.c index d848a10b8..d848a10b8 100644 --- a/src/battle_records.c +++ b/src/battle/battle_records.c diff --git a/src/battle_setup.c b/src/battle/battle_setup.c index 59e17e9eb..40949ed38 100644 --- a/src/battle_setup.c +++ b/src/battle/battle_setup.c @@ -876,7 +876,7 @@ static void CB2_StartFirstBattle(void) static void CB2_EndFirstBattle(void) { - sav1_reset_battle_music_maybe(); + Overworld_ClearSavedMusic(); SetMainCallback2(c2_exit_to_overworld_1_continue_scripts_restart_music); } diff --git a/src/battle_transition.c b/src/battle/battle_transition.c index 53d32d03a..53d32d03a 100644 --- a/src/battle_transition.c +++ b/src/battle/battle_transition.c diff --git a/src/calculate_base_damage.c b/src/battle/calculate_base_damage.c index f5c679876..f5c679876 100644 --- a/src/calculate_base_damage.c +++ b/src/battle/calculate_base_damage.c diff --git a/src/contest_link_80C857C.c b/src/battle/contest_link_80C857C.c index 0ae98af09..0ae98af09 100644 --- a/src/contest_link_80C857C.c +++ b/src/battle/contest_link_80C857C.c diff --git a/src/pokeball.c b/src/battle/pokeball.c index ee3b95678..ee3b95678 100644 --- a/src/pokeball.c +++ b/src/battle/pokeball.c diff --git a/src/post_battle_event_funcs.c b/src/battle/post_battle_event_funcs.c index 27d7022fe..27d7022fe 100644 --- a/src/post_battle_event_funcs.c +++ b/src/battle/post_battle_event_funcs.c diff --git a/src/reshow_battle_screen.c b/src/battle/reshow_battle_screen.c index 343c8f183..343c8f183 100644 --- a/src/reshow_battle_screen.c +++ b/src/battle/reshow_battle_screen.c diff --git a/src/smokescreen.c b/src/battle/smokescreen.c index 8345cb6ad..8345cb6ad 100644 --- a/src/smokescreen.c +++ b/src/battle/smokescreen.c diff --git a/src/matsuda_debug_menu.c b/src/debug/matsuda_debug_menu.c index c7d81f502..c7d81f502 100644 --- a/src/matsuda_debug_menu.c +++ b/src/debug/matsuda_debug_menu.c diff --git a/src/mori_debug_menu.c b/src/debug/mori_debug_menu.c index 1595ecd2e..1595ecd2e 100644 --- a/src/mori_debug_menu.c +++ b/src/debug/mori_debug_menu.c diff --git a/src/debug/sound_check_menu.c b/src/debug/sound_check_menu.c new file mode 100644 index 000000000..14261b75e --- /dev/null +++ b/src/debug/sound_check_menu.c @@ -0,0 +1,1300 @@ +#include "global.h" +#include "sprite.h" +#include "palette.h" +#include "task.h" +#include "m4a.h" +#include "main.h" +#include "text.h" +#include "menu.h" +#include "songs.h" +#include "title_screen.h" +#include "sound.h" +#include "pokedex_cry_screen.h" + +// local task defines +#define tWindowSelected data[0] +#define tBgmIndex data[1] +#define tSeIndex data[2] + +// window selections +enum +{ + BGM_WINDOW, + SE_WINDOW +}; + +// driver test cry enums +enum +{ + CRY_TEST_VOICE, + CRY_TEST_VOLUME, + CRY_TEST_PANPOT, + CRY_TEST_PITCH, + CRY_TEST_LENGTH, + CRY_TEST_RELEASE, + CRY_TEST_PROGRESS, + CRY_TEST_CHORUS, + CRY_TEST_PRIORITY +}; + +// minmax range enums +enum +{ + MIN, + MAX +}; + +extern struct ToneData voicegroup_84537C0[]; +extern struct ToneData voicegroup_8452590[]; +extern struct ToneData voicegroup_8453DC0[]; +extern struct ToneData voicegroup_8452B90[]; +extern struct ToneData voicegroup_84543C0[]; +extern struct ToneData voicegroup_8453190[]; +extern struct ToneData voicegroup_84549C0[]; +extern struct ToneData voicegroup_8453790[]; + +static EWRAM_DATA u8 gUnknown_020387B0 = 0; +static EWRAM_DATA u8 gUnknown_020387B1 = 0; +static EWRAM_DATA u8 gUnknown_020387B2 = 0; +static EWRAM_DATA s8 sDriverTestSelection = 0; +static EWRAM_DATA int sSoundTestParams[9] = {0}; +static EWRAM_DATA u8 gUnknown_020387D8 = 0; +static EWRAM_DATA u8 gUnknown_020387D9 = 0; + +u16 gSoundTestCryNum; +extern u8 gUnknown_03005E98; + +struct MusicPlayerInfo *gUnknown_03005D30; + +extern struct MusicPlayerInfo gMPlay_BGM; + +void Task_InitSoundCheckMenu(u8); +void sub_80BA384(u8); +void sub_80BA65C(u8); +void sub_80BA68C(u8); +void HighlightSelectedWindow(u8); +void PrintSoundNumber(u16, u16, u16); +void sub_80BA79C(const u8 *const, u16, u16); +void Task_DrawDriverTestMenu(u8); +void Task_ProcessDriverTestInput(u8); +void AdjustSelectedDriverParam(s8); +void PrintDriverTestMenuText(void); +void sub_80BAE10(u8, u8); +void PrintSignedNumber(int, u16, u16, u8); +void sub_80BAF84(u8); +void sub_80BB038(u8); +void sub_80BB1D4(void); +void Task_InitCryTest(u8); +void Task_ProcessCryTestInput(u8); +void PrintCryNumber(void); + +void CB2_SoundCheckMenu(void) +{ + RunTasks(); + AnimateSprites(); + BuildOamBuffer(); + UpdatePaletteFade(); +} + +void VBlankCB_SoundCheckMenu(void) +{ + LoadOam(); + ProcessSpriteCopyRequests(); + TransferPlttBuffer(); + + if (gUnknown_020387B0 != 0) + { + m4aSoundMain(); + m4aSoundMain(); + m4aSoundMain(); + } +} + +// unused +void CB2_StartSoundCheckMenu(void) +{ + u8 taskId; + + SetVBlankCallback(NULL); + REG_DISPCNT = 0; + REG_BG2CNT = 0; + REG_BG1CNT = 0; + REG_BG0CNT = 0; + REG_BG2HOFS = 0; + REG_BG2VOFS = 0; + REG_BG1HOFS = 0; + REG_BG1VOFS = 0; + REG_BG0HOFS = 0; + REG_BG0VOFS = 0; + DmaFill16(3, 0, VRAM, VRAM_SIZE); + DmaFill32(3, 0, OAM, OAM_SIZE); + DmaFill16(3, 0, PLTT, PLTT_SIZE); + ResetPaletteFade(); + ResetTasks(); + ResetSpriteData(); + SetUpWindowConfig(&gWindowConfig_81E6C3C); + InitMenuWindow(&gWindowConfig_81E6CE4); + BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, 0); + REG_WIN0H = WIN_RANGE(0, 0); + REG_WIN0V = WIN_RANGE(0, 0); + REG_WIN1H = WIN_RANGE(0, 0); + REG_WIN1V = WIN_RANGE(0, 0); + REG_WININ = 0x1111; + REG_WINOUT = 0x31; + REG_BLDCNT = 0xE1; + REG_BLDALPHA = 0; + REG_BLDY = 7; + REG_IE = 1; // could be a typo of REG_IME + REG_IE |= 1; + REG_DISPSTAT |= 8; + SetVBlankCallback(VBlankCB_SoundCheckMenu); + SetMainCallback2(CB2_SoundCheckMenu); + REG_DISPCNT = 0x7140; + taskId = CreateTask(Task_InitSoundCheckMenu, 0); + gTasks[taskId].tWindowSelected = BGM_WINDOW; + gTasks[taskId].tBgmIndex = 0; + gTasks[taskId].tSeIndex = 0; + gTasks[taskId].data[3] = 0; + gUnknown_020387B0 = 0; + gTasks[taskId].data[3] = 0; // why? + m4aSoundInit(); +} + +void Task_InitSoundCheckMenu(u8 taskId) +{ + u8 soundcheckStr[] = _("サウンドチェック"); + u8 bgmStr[] = _("BGM"); + u8 seStr[] = _("SE "); + u8 abDescStr[] = _("A‥さいせい B‥おわり"); + u8 upDownStr[] = _("L‥UP R‥DOWN"); + u8 driverStr[] = _("R‥DRIVER-TEST"); + + if (!gPaletteFade.active) + { + MenuDrawTextWindow(2, 0, 27, 3); + MenuDrawTextWindow(2, 5, 27, 10); + MenuDrawTextWindow(2, 12, 27, 17); + MenuPrint(soundcheckStr, 4, 1); + MenuPrint(abDescStr, 14, 1); + MenuPrint(bgmStr, 4, 6); + MenuPrint(upDownStr, 14, 6); + MenuPrint(seStr, 4, 13); + MenuPrint(upDownStr, 14, 13); + MenuPrint(driverStr, 14, 18); + gTasks[taskId].func = sub_80BA384; + REG_WIN0H = WIN_RANGE(17, 223); + REG_WIN0V = WIN_RANGE(1, 31); + } +} + +// ideally this should be a multi Coords8 struct, but it wont match when its treated like a struct. +static const u8 gUnknown_083D0300[] = { 1, 1, 1, 3, 1, 5, 1, 7, 1, 9, 1, 11, 1, 13, 1, 15, 1, 17 }; + +extern const u8 *const gBGMNames[]; +extern const u8 *const gSENames[]; + +void sub_80BA384(u8 taskId) // Task_HandleDrawingSoundCheckMenuText +{ + HighlightSelectedWindow(gTasks[taskId].tWindowSelected); + PrintSoundNumber(gTasks[taskId].tBgmIndex + BGM_STOP, 7, 8); // print by BGM index + sub_80BA79C(gBGMNames[gTasks[taskId].tBgmIndex], 11, 8); + PrintSoundNumber(gTasks[taskId].tSeIndex, 7, 15); + sub_80BA79C(gSENames[gTasks[taskId].tSeIndex], 11, 15); + gTasks[taskId].func = sub_80BA65C; +} + +bool8 Task_ProcessSoundCheckMenuInput(u8 taskId) +{ + if (gMain.newKeys & R_BUTTON) // driver test + { + gTasks[taskId].func = Task_DrawDriverTestMenu; + } + else if (gMain.newKeys & L_BUTTON) + { + gTasks[taskId].func = sub_80BAF84; + } + else if (gMain.newKeys & START_BUTTON) + { + gTasks[taskId].func = Task_InitCryTest; + } + else if (gMain.newKeys & A_BUTTON) + { + if (gTasks[taskId].tWindowSelected != 0) // is playing? + { + if (gTasks[taskId].data[4] != 0) + { + if (gTasks[taskId].tSeIndex != 0) + { + m4aSongNumStop(gTasks[taskId].data[4]); + m4aSongNumStart(gTasks[taskId].tSeIndex); + gTasks[taskId].data[4] = gTasks[taskId].tSeIndex; + } + else + { + m4aSongNumStop(gTasks[taskId].data[4]); + gTasks[taskId].data[4] = 0; + } + } + else if (gTasks[taskId].tSeIndex != 0) + { + m4aSongNumStart(gTasks[taskId].tSeIndex); + gTasks[taskId].data[4] = gTasks[taskId].tSeIndex; + } + } + else + { + if (gTasks[taskId].data[3] != 0) + { + if (gTasks[taskId].tBgmIndex != 0) + { + m4aSongNumStop(gTasks[taskId].data[3] + BGM_STOP); + m4aSongNumStart(gTasks[taskId].tBgmIndex + BGM_STOP); + gTasks[taskId].data[3] = gTasks[taskId].tBgmIndex; + } + else + { + m4aSongNumStop(gTasks[taskId].data[3] + BGM_STOP); + gTasks[taskId].data[3] = 0; + } + } + else if (gTasks[taskId].tBgmIndex != 0) + { + m4aSongNumStart(gTasks[taskId].tBgmIndex + BGM_STOP); + gTasks[taskId].data[3] = gTasks[taskId].tBgmIndex; + } + } + } + else if (gMain.newKeys & B_BUTTON) + { + m4aSongNumStart(SE_SELECT); + BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, 0); + gTasks[taskId].func = sub_80BA68C; + } + else if (gMain.newAndRepeatedKeys & DPAD_UP) + { + gTasks[taskId].tWindowSelected ^= 1; + return TRUE; + } + else if (gMain.newAndRepeatedKeys & DPAD_DOWN) + { + gTasks[taskId].tWindowSelected ^= 1; + return TRUE; + } + else if (gMain.newAndRepeatedKeys & DPAD_RIGHT) + { + if (gTasks[taskId].tWindowSelected != 0) + { + if (gTasks[taskId].tSeIndex > 0) + gTasks[taskId].tSeIndex--; + else + gTasks[taskId].tSeIndex = 247; + } + else + { + if (gTasks[taskId].tBgmIndex > 0) + gTasks[taskId].tBgmIndex--; + else + gTasks[taskId].tBgmIndex = 117; + } + return TRUE; + } + else if (gMain.newAndRepeatedKeys & DPAD_LEFT) + { + if (gTasks[taskId].tWindowSelected != 0) + { + if (gTasks[taskId].tSeIndex < 247) + gTasks[taskId].tSeIndex++; + else + gTasks[taskId].tSeIndex = 0; + } + else + { + if (gTasks[taskId].tBgmIndex < 117) + gTasks[taskId].tBgmIndex++; + else + gTasks[taskId].tBgmIndex = 0; + } + return TRUE; + } + else if (gMain.heldKeys & SELECT_BUTTON) + { + gUnknown_020387B0 = 1; + } + else + { + gUnknown_020387B0 = 0; + } + return FALSE; +} + +void sub_80BA65C(u8 taskId) +{ + if (Task_ProcessSoundCheckMenuInput(taskId) != FALSE) + gTasks[taskId].func = sub_80BA384; +} + +void sub_80BA68C(u8 taskId) +{ + if (!gPaletteFade.active) + { + DestroyTask(taskId); + SetMainCallback2(CB2_InitTitleScreen); + } +} + +void HighlightSelectedWindow(u8 windowType) +{ + switch (windowType) + { + case BGM_WINDOW: + default: + REG_WIN1H = WIN_RANGE(17, 223); + REG_WIN1V = WIN_RANGE(41, 87); + break; + case SE_WINDOW: + REG_WIN1H = WIN_RANGE(17, 223); + REG_WIN1V = WIN_RANGE(97, 143); + break; + } +} + +void PrintSoundNumber(u16 soundIndex, u16 x, u16 y) // PrintSoundNumber ? +{ + u8 i; + u8 str[5]; + bool8 someBool; + u8 divisorValue; + + for (i = 0; i < 3; i++) + str[i] = 0; // initialize array + + str[3] = CHAR_ELLIPSIS; + str[4] = EOS; + someBool = FALSE; + + divisorValue = soundIndex / 100; + if (divisorValue) + { + str[0] = divisorValue + CHAR_0; + someBool = TRUE; + } + + divisorValue = (soundIndex % 100) / 10; + if (divisorValue || someBool) + str[1] = divisorValue + CHAR_0; + + str[2] = ((soundIndex % 100) % 10) + CHAR_0; + MenuPrint(str, x, y); +} + +void sub_80BA79C(const u8 *const string, u16 x, u16 y) +{ + u8 i; + u8 str[11]; + + for (i = 0; i <= 10; i++) + str[i] = 0; // format string. + + str[10] = EOS; // the above for loop formats the last element of the array unnecessarily. + + for (i = 0; string[i] != EOS && i < 10; i++) + str[i] = string[i]; + + MenuPrint(str, x, y); +} + +void Task_DrawDriverTestMenu(u8 taskId) // Task_DrawDriverTestMenu +{ + u8 bbackStr[] = _("Bぼたんで もどる"); + u8 aplayStr[] = _("Aぼたんで さいせい"); + u8 voiceStr[] = _("VOICE‥‥‥‥"); + u8 volumeStr[] = _("VOLUME‥‥‥"); + u8 panpotStr[] = _("PANPOT‥‥‥"); + u8 pitchStr[] = _("PITCH‥‥‥‥"); + u8 lengthStr[] = _("LENGTH‥‥‥"); + u8 releaseStr[] = _("RELEASE‥‥"); + u8 progressStr[] = _("PROGRESS‥"); + u8 chorusStr[] = _("CHORUS‥‥‥"); + u8 priorityStr[] = _("PRIORITY‥"); + u8 playingStr[] = _("さいせいちゆう‥"); // 再生中 (playing) + u8 reverseStr[] = _("はんてん‥‥‥‥"); // 反転 (reverse) + u8 stereoStr[] = _("すてれお‥‥‥‥"); // stereo + + REG_DISPCNT = 0x3140; + MenuDrawTextWindow(0, 0, 29, 19); + MenuPrint(bbackStr, 19, 4); + MenuPrint(aplayStr, 19, 2); + MenuPrint(voiceStr, 2, 1); + MenuPrint(volumeStr, 2, 3); + MenuPrint(panpotStr, 2, 5); + MenuPrint(pitchStr, 2, 7); + MenuPrint(lengthStr, 2, 9); + MenuPrint(releaseStr, 2, 11); + MenuPrint(progressStr, 2, 13); + MenuPrint(chorusStr, 2, 15); + MenuPrint(priorityStr, 2, 17); + MenuPrint(playingStr, 19, 16); + MenuPrint(reverseStr, 19, 14); + MenuPrint(stereoStr, 19, 12); + REG_WIN0H = WIN_RANGE(0, DISPLAY_WIDTH); + REG_WIN0V = WIN_RANGE(0, DISPLAY_HEIGHT); + sDriverTestSelection = 0; + gUnknown_020387B1 = 0; + gUnknown_020387B2 = 0; + gUnknown_03005D30 = NULL; + gUnknown_020387D8 = 0; + gUnknown_020387D9 = 1; + sSoundTestParams[CRY_TEST_VOICE] = 0; + sSoundTestParams[CRY_TEST_VOLUME] = 120; + sSoundTestParams[CRY_TEST_PANPOT] = 0; + sSoundTestParams[CRY_TEST_PITCH] = 15360; + sSoundTestParams[CRY_TEST_LENGTH] = 180; + sSoundTestParams[CRY_TEST_PROGRESS] = 0; + sSoundTestParams[CRY_TEST_RELEASE] = 0; + sSoundTestParams[CRY_TEST_CHORUS] = 0; + sSoundTestParams[CRY_TEST_PRIORITY] = 2; + PrintDriverTestMenuText(); + sub_80BAE10(0, 0); + gTasks[taskId].func = Task_ProcessDriverTestInput; +} + +void Task_ProcessDriverTestInput(u8 taskId) +{ + if (gMain.newKeys & B_BUTTON) + { + REG_DISPCNT = 0x7140; + REG_WIN0H = WIN_RANGE(17, 223); + REG_WIN0V = WIN_RANGE(1, 31); + MenuZeroFillWindowRect(0, 0, 29, 19); + gTasks[taskId].func = Task_InitSoundCheckMenu; + return; + } + if (gMain.newAndRepeatedKeys & DPAD_UP) // _080BAAA8 + { + u8 old = sDriverTestSelection; + + if(--sDriverTestSelection < 0) + sDriverTestSelection = 8; + sub_80BAE10(old, sDriverTestSelection); + return; + } + if (gMain.newAndRepeatedKeys & DPAD_DOWN) // _080BAAD0 + { + u8 old = sDriverTestSelection; + + if(++sDriverTestSelection > 8) + sDriverTestSelection = 0; + sub_80BAE10(old, sDriverTestSelection); + return; + } + if (gMain.newKeys & START_BUTTON) // _080BAAF8 + { + gUnknown_020387D8 ^= 1; + PrintDriverTestMenuText(); + return; + } + if (gMain.newKeys & SELECT_BUTTON) // _080BAB14 + { + gUnknown_020387D9 ^= 1; + PrintDriverTestMenuText(); + SetPokemonCryStereo(gUnknown_020387D9); + return; + } + if (gMain.newAndRepeatedKeys & R_BUTTON) // _080BAB38 + { + AdjustSelectedDriverParam(10); + PrintDriverTestMenuText(); + return; + } + if (gMain.newAndRepeatedKeys & L_BUTTON) // _080BAB46 + { + AdjustSelectedDriverParam(-10); + PrintDriverTestMenuText(); + return; + } + if (gMain.newAndRepeatedKeys & DPAD_LEFT) // _080BAB56 + { + AdjustSelectedDriverParam(-1); + PrintDriverTestMenuText(); + return; + } + if (gMain.newAndRepeatedKeys & DPAD_RIGHT) // _080BAB64 + { + AdjustSelectedDriverParam(1); + PrintDriverTestMenuText(); + return; + } + if (gMain.newKeys & A_BUTTON) // _080BAB78 + { + u8 divide, remaining; + + SetPokemonCryVolume(sSoundTestParams[CRY_TEST_VOLUME]); + SetPokemonCryPanpot(sSoundTestParams[CRY_TEST_PANPOT]); + SetPokemonCryPitch(sSoundTestParams[CRY_TEST_PITCH]); + SetPokemonCryLength(sSoundTestParams[CRY_TEST_LENGTH]); + SetPokemonCryProgress(sSoundTestParams[CRY_TEST_PROGRESS]); + SetPokemonCryRelease(sSoundTestParams[CRY_TEST_RELEASE]); + SetPokemonCryChorus(sSoundTestParams[CRY_TEST_CHORUS]); + SetPokemonCryPriority(sSoundTestParams[CRY_TEST_PRIORITY]); + + remaining = sSoundTestParams[CRY_TEST_VOICE] % 128; + divide = sSoundTestParams[CRY_TEST_VOICE] / 128; + + switch (divide) + { + case 0: + if (gUnknown_020387D8) + gUnknown_03005D30 = SetPokemonCryTone(&voicegroup_84537C0[remaining]); + else + gUnknown_03005D30 = SetPokemonCryTone(&voicegroup_8452590[remaining]); + break; + case 1: + if (gUnknown_020387D8) + gUnknown_03005D30 = SetPokemonCryTone(&voicegroup_8453DC0[remaining]); + else + gUnknown_03005D30 = SetPokemonCryTone(&voicegroup_8452B90[remaining]); + break; + case 2: + if (gUnknown_020387D8) + gUnknown_03005D30 = SetPokemonCryTone(&voicegroup_84543C0[remaining]); + else + gUnknown_03005D30 = SetPokemonCryTone(&voicegroup_8453190[remaining]); + break; + case 3: + if (gUnknown_020387D8) + gUnknown_03005D30 = SetPokemonCryTone(&voicegroup_84549C0[remaining]); + else + gUnknown_03005D30 = SetPokemonCryTone(&voicegroup_8453790[remaining]); + break; + } + } + + // _080BACA2 + if (gUnknown_03005D30 != NULL) + { + gUnknown_020387B1 = IsPokemonCryPlaying(gUnknown_03005D30); + + if (gUnknown_020387B1 != gUnknown_020387B2) + PrintDriverTestMenuText(); + + gUnknown_020387B2 = gUnknown_020387B1; + } +} + +void AdjustSelectedDriverParam(s8 delta) +{ + // also ideally should be a MinMax struct, but any attempt to make this into a struct causes it to not match due to the weird multi dim access. + int paramRanges[] = + { + 0, 387, // Voice + 0, 127, // Volume + -127, 127, // Panpot + -128, 32639, // Pitch + 0, 65535, // Length + 0, 255, // Release + 0, 65535, // Progress + -64, 63 // Chorus + // Priority??? Why is it missing? + }; + + sSoundTestParams[sDriverTestSelection] += delta; + + if (sSoundTestParams[sDriverTestSelection] > paramRanges[MULTI_DIM_ARR(sDriverTestSelection, B_16, MAX)]) + sSoundTestParams[sDriverTestSelection] = paramRanges[MULTI_DIM_ARR(sDriverTestSelection, B_16, MIN)]; + + if (sSoundTestParams[sDriverTestSelection] < paramRanges[MULTI_DIM_ARR(sDriverTestSelection, B_16, MIN)]) + sSoundTestParams[sDriverTestSelection] = paramRanges[MULTI_DIM_ARR(sDriverTestSelection, B_16, MAX)]; +} + +void PrintDriverTestMenuText(void) +{ + PrintSignedNumber(sSoundTestParams[CRY_TEST_VOICE] + 1, 11, 1, 5); + PrintSignedNumber(sSoundTestParams[CRY_TEST_VOLUME], 11, 3, 5); + PrintSignedNumber(sSoundTestParams[CRY_TEST_PANPOT], 11, 5, 5); + PrintSignedNumber(sSoundTestParams[CRY_TEST_PITCH], 11, 7, 5); + PrintSignedNumber(sSoundTestParams[CRY_TEST_LENGTH], 11, 9, 5); + PrintSignedNumber(sSoundTestParams[CRY_TEST_RELEASE], 11, 11, 5); + PrintSignedNumber(sSoundTestParams[CRY_TEST_PROGRESS], 11, 13, 5); + PrintSignedNumber(sSoundTestParams[CRY_TEST_CHORUS], 11, 15, 5); + PrintSignedNumber(sSoundTestParams[CRY_TEST_PRIORITY], 11, 17, 5); + PrintSignedNumber(gUnknown_020387B1, 27, 16, 1); + PrintSignedNumber(gUnknown_020387D8, 27, 14, 1); + PrintSignedNumber(gUnknown_020387D9, 27, 12, 1); +} + +void sub_80BAE10(u8 var1, u8 var2) +{ + u8 str1[] = _("▶"); + u8 str2[] = _(" "); + + MenuPrint(str2, gUnknown_083D0300[MULTI_DIM_ARR(var1, B_16, 0)], gUnknown_083D0300[MULTI_DIM_ARR(var1, B_16, 1)]); + MenuPrint(str1, gUnknown_083D0300[MULTI_DIM_ARR(var2, B_16, 0)], gUnknown_083D0300[MULTI_DIM_ARR(var2, B_16, 1)]); +} + +void PrintSignedNumber(int n, u16 x, u16 y, u8 digits) +{ + int powersOfTen[6] = + { + 1, + 10, + 100, + 1000, + 10000, + 100000 + }; + u8 str[8]; + s8 i; + s8 negative; + s8 someVar2; + + for (i = 0; i <= digits; i++) + str[i] = CHAR_SPACE; + str[digits + 1] = EOS; + + negative = FALSE; + if (n < 0) + { + n = -n; + negative = TRUE; + } + + if (digits == 1) + someVar2 = TRUE; + else + someVar2 = FALSE; + + for (i = digits - 1; i >= 0; i--) + { + s8 d = n / powersOfTen[i]; + + if (d != 0 || someVar2 || i == 0) + { + if (negative && !someVar2) + str[digits - i - 1] = CHAR_HYPHEN; + str[digits - i] = CHAR_0 + d; + someVar2 = TRUE; + } + n %= powersOfTen[i]; + } + + MenuPrint(str, x, y); +} + +static const s8 gUnknown_083D03F8[5] = { 0x3F, 0x00, 0xC0, 0x7F, 0x80 }; + +void sub_80BAF84(u8 taskId) +{ + u8 seStr[] = _("SE"); + u8 panStr[] = _("PAN"); + u8 playingStr[] = _("さいせいちゆう‥"); + + REG_DISPCNT = 0x3140; + MenuDrawTextWindow(0, 0, 29, 19); + MenuPrint(seStr, 3, 2); + MenuPrint(panStr, 3, 4); + MenuPrint(playingStr, 3, 8); + REG_WIN0H = WIN_RANGE(0, DISPLAY_WIDTH); + REG_WIN0V = WIN_RANGE(0, DISPLAY_HEIGHT); + sSoundTestParams[CRY_TEST_VOICE] = 1; + sSoundTestParams[CRY_TEST_PANPOT] = 0; + sSoundTestParams[CRY_TEST_CHORUS] = 0; + sSoundTestParams[CRY_TEST_PROGRESS] = 0; + sSoundTestParams[CRY_TEST_RELEASE] = 0; + sub_80BB1D4(); + gTasks[taskId].func = sub_80BB038; +} + +void sub_80BB038(u8 taskId) +{ + sub_80BB1D4(); + if (sSoundTestParams[CRY_TEST_PROGRESS]) + { + if (sSoundTestParams[CRY_TEST_RELEASE]) + { + sSoundTestParams[CRY_TEST_RELEASE]--; + } + else // _080BB05C + { + s8 panpot = gUnknown_083D03F8[sSoundTestParams[CRY_TEST_PANPOT]]; + if (panpot != -128) + { + if (panpot == 127) + { + sSoundTestParams[CRY_TEST_CHORUS] += 2; + if (sSoundTestParams[CRY_TEST_CHORUS] < 63) + SE12PanpotControl(sSoundTestParams[CRY_TEST_CHORUS]); + } + } + else // _080BB08C + { + sSoundTestParams[CRY_TEST_CHORUS] -= 2; + if (sSoundTestParams[CRY_TEST_CHORUS] > -64) + SE12PanpotControl(sSoundTestParams[CRY_TEST_CHORUS]); + } + } + } + // _080BB0A2 + if (gMain.newKeys & B_BUTTON) + { + REG_DISPCNT = 0x7140; + REG_WIN0H = WIN_RANGE(17, 223); + REG_WIN0V = WIN_RANGE(1, 31); + MenuZeroFillWindowRect(0, 0, 29, 19); + gTasks[taskId].func = Task_InitSoundCheckMenu; + return; + } + if (gMain.newKeys & A_BUTTON) // _080BB104 + { + s8 panpot = gUnknown_083D03F8[sSoundTestParams[CRY_TEST_PANPOT]]; + if (panpot != -128) + { + if (panpot == 127) + { + PlaySE12WithPanning(sSoundTestParams[CRY_TEST_VOICE], -64); + sSoundTestParams[CRY_TEST_CHORUS] = -64; + sSoundTestParams[CRY_TEST_PROGRESS] = 1; + sSoundTestParams[CRY_TEST_RELEASE] = 30; + return; + } + } + else // _080BB140 + { + PlaySE12WithPanning(sSoundTestParams[CRY_TEST_VOICE], 63); + sSoundTestParams[CRY_TEST_CHORUS] = 63; + sSoundTestParams[CRY_TEST_PROGRESS] = 1; + sSoundTestParams[CRY_TEST_RELEASE] = 30; + return; + } + // _080BB154 + PlaySE12WithPanning(sSoundTestParams[CRY_TEST_VOICE], panpot); + sSoundTestParams[CRY_TEST_PROGRESS] = 0; + return; + } + if (gMain.newKeys & L_BUTTON) // _080BB15E + { + sSoundTestParams[CRY_TEST_PANPOT]++; + if (sSoundTestParams[CRY_TEST_PANPOT] > 4) + sSoundTestParams[CRY_TEST_PANPOT] = 0; + } + if (gMain.newKeys & R_BUTTON) // _080BB176 + { + sSoundTestParams[CRY_TEST_PANPOT]--; + if (sSoundTestParams[CRY_TEST_PANPOT] < 0) + sSoundTestParams[CRY_TEST_PANPOT] = 4; + } + if (gMain.newAndRepeatedKeys & DPAD_RIGHT) // _080BB192 + { + sSoundTestParams[CRY_TEST_VOICE]++; + if (sSoundTestParams[CRY_TEST_VOICE] > 247) + sSoundTestParams[CRY_TEST_VOICE] = 0; + } + else if (gMain.newAndRepeatedKeys & DPAD_LEFT) // _080BB1B0 + { + sSoundTestParams[CRY_TEST_VOICE]--; + if (sSoundTestParams[CRY_TEST_VOICE] < 0) + sSoundTestParams[CRY_TEST_VOICE] = 247; + } +} + +void sub_80BB1D4(void) +{ + u8 lrStr[] = _(" LR"); + u8 rlStr[] = _(" RL"); + + PrintSignedNumber(sSoundTestParams[CRY_TEST_VOICE], 7, 2, 3); + + switch (gUnknown_083D03F8[sSoundTestParams[CRY_TEST_PANPOT]]) + { + case 127: + MenuPrint(lrStr, 7, 4); + break; + case -128: + MenuPrint(rlStr, 7, 4); + break; + default: + PrintSignedNumber(gUnknown_083D03F8[sSoundTestParams[CRY_TEST_PANPOT]], 7, 4, 3); + break; + } + PrintSignedNumber(IsSEPlaying(), 12, 8, 1); +} + +#define SOUND_LIST_BGM \ + X(BGM_STOP, "STOP") \ + X(BGM_TETSUJI, "TETSUJI") \ + X(BGM_FIELD13, "FIELD13") \ + X(BGM_KACHI22, "KACHI22") \ + X(BGM_KACHI2, "KACHI2") \ + X(BGM_KACHI3, "KACHI3") \ + X(BGM_KACHI5, "KACHI5") \ + X(BGM_PCC, "PCC") \ + X(BGM_NIBI, "NIBI") \ + X(BGM_SUIKUN, "SUIKUN") \ + X(BGM_DOORO1, "DOORO1") \ + X(BGM_DOORO_X1, "DOORO-X1") \ + X(BGM_DOORO_X3, "DOORO-X3") \ + X(BGM_MACHI_S2, "MACHI-S2") \ + X(BGM_MACHI_S4, "MACHI-S4") \ + X(BGM_GIM, "GIM") \ + X(BGM_NAMINORI, "NAMINORI") \ + X(BGM_DAN01, "DAN01") \ + X(BGM_FANFA1, "FANFA1") \ + X(BGM_ME_ASA, "ME-ASA") \ + X(BGM_ME_BACHI, "ME-BACHI") \ + X(BGM_FANFA4, "FANFA4") \ + X(BGM_FANFA5, "FANFA5") \ + X(BGM_ME_WAZA, "ME-WAZA") \ + X(BGM_BIJYUTU, "BIJYUTU") \ + X(BGM_DOORO_X4, "DOORO-X4") \ + X(BGM_FUNE_KAN, "FUNE-KAN") \ + X(BGM_ME_SHINKA, "ME-SHINKA") \ + X(BGM_SHINKA, "SHINKA") \ + X(BGM_ME_WASURE, "ME-WASURE") \ + X(BGM_SYOUJOEYE, "SYOUJOEYE") \ + X(BGM_BOYEYE, "BOYEYE") \ + X(BGM_DAN02, "DAN02") \ + X(BGM_MACHI_S3, "MACHI-S3") \ + X(BGM_ODAMAKI, "ODAMAKI") \ + X(BGM_B_TOWER, "B-TOWER") \ + X(BGM_SWIMEYE, "SWIMEYE") \ + X(BGM_DAN03, "DAN03") \ + X(BGM_ME_KINOMI, "ME-KINOMI") \ + X(BGM_ME_TAMA, "ME-TAMA") \ + X(BGM_ME_B_BIG, "ME-B-BIG") \ + X(BGM_ME_B_SMALL, "ME-B-SMALL") \ + X(BGM_ME_ZANNEN, "ME-ZANNEN") \ + X(BGM_BD_TIME, "BD-TIME") \ + X(BGM_TEST1, "TEST1") \ + X(BGM_TEST2, "TEST2") \ + X(BGM_TEST3, "TEST3") \ + X(BGM_TEST4, "TEST4") \ + X(BGM_TEST, "TEST") \ + X(BGM_GOMACHI0, "GOMACHI0") \ + X(BGM_GOTOWN, "GOTOWN") \ + X(BGM_POKECEN, "POKECEN") \ + X(BGM_NEXTROAD, "NEXTROAD") \ + X(BGM_GRANROAD, "GRANROAD") \ + X(BGM_CYCLING, "CYCLING") \ + X(BGM_FRIENDLY, "FRIENDLY") \ + X(BGM_MISHIRO, "MISHIRO") \ + X(BGM_TOZAN, "TOZAN") \ + X(BGM_GIRLEYE, "GIRLEYE") \ + X(BGM_MINAMO, "MINAMO") \ + X(BGM_ASHROAD, "ASHROAD") \ + X(BGM_EVENT0, "EVENT0") \ + X(BGM_DEEPDEEP, "DEEPDEEP") \ + X(BGM_KACHI1, "KACHI1") \ + X(BGM_TITLE3, "TITLE3") \ + X(BGM_DEMO1, "DEMO1") \ + X(BGM_GIRL_SUP, "GIRL-SUP") \ + X(BGM_HAGESHII, "HAGESHII") \ + X(BGM_KAKKOII, "KAKKOII") \ + X(BGM_KAZANBAI, "KAZANBAI") \ + X(BGM_AQA_0, "AQA-0") \ + X(BGM_TSURETEK, "TSURETEK") \ + X(BGM_BOY_SUP, "BOY-SUP") \ + X(BGM_RAINBOW, "RAINBOW") \ + X(BGM_AYASII, "AYASII") \ + X(BGM_KACHI4, "KACHI4") \ + X(BGM_ROPEWAY, "ROPEWAY") \ + X(BGM_CASINO, "CASINO") \ + X(BGM_HIGHTOWN, "HIGHTOWN") \ + X(BGM_SAFARI, "SAFARI") \ + X(BGM_C_ROAD, "C-ROAD") \ + X(BGM_AJITO, "AJITO") \ + X(BGM_M_BOAT, "M-BOAT") \ + X(BGM_M_DUNGON, "M-DUNGON") \ + X(BGM_FINECITY, "FINECITY") \ + X(BGM_MACHUPI, "MACHUPI") \ + X(BGM_P_SCHOOL, "P-SCHOOL") \ + X(BGM_DENDOU, "DENDOU") \ + X(BGM_TONEKUSA, "TONEKUSA") \ + X(BGM_MABOROSI, "MABOROSI") \ + X(BGM_CON_FAN, "CON-FAN") \ + X(BGM_CONTEST0, "CONTEST0") \ + X(BGM_MGM0, "MGM0") \ + X(BGM_T_BATTLE, "T-BATTLE") \ + X(BGM_OOAME, "OOAME") \ + X(BGM_HIDERI, "HIDERI") \ + X(BGM_RUNECITY, "RUNECITY") \ + X(BGM_CON_K, "CON-K") \ + X(BGM_EIKOU_R, "EIKOU-R") \ + X(BGM_KARAKURI, "KARAKURI") \ + X(BGM_HUTAGO, "HUTAGO") \ + X(BGM_SITENNOU, "SITENNOU") \ + X(BGM_YAMA_EYE, "YAMA-EYE") \ + X(BGM_CONLOBBY, "CONLOBBY") \ + X(BGM_INTER_V, "INTER-V") \ + X(BGM_DAIGO, "DAIGO") \ + X(BGM_THANKFOR, "THANKFOR") \ + X(BGM_END, "END") \ + X(BGM_BATTLE27, "BATTLE27") \ + X(BGM_BATTLE31, "BATTLE31") \ + X(BGM_BATTLE20, "BATTLE20") \ + X(BGM_BATTLE32, "BATTLE32") \ + X(BGM_BATTLE33, "BATTLE33") \ + X(BGM_BATTLE36, "BATTLE36") \ + X(BGM_BATTLE34, "BATTLE34") \ + X(BGM_BATTLE35, "BATTLE35") \ + X(BGM_BATTLE38, "BATTLE38") \ + X(BGM_BATTLE30, "BATTLE30") + +#define SOUND_LIST_SE \ + X(SE_STOP, "STOP") \ + X(SE_KAIFUKU, "KAIFUKU") \ + X(SE_PC_LOGON, "PC-LOGON") \ + X(SE_PC_OFF, "PC-OFF") \ + X(SE_PC_ON, "PC-ON") \ + X(SE_SELECT, "SELECT") \ + X(SE_WIN_OPEN, "WIN-OPEN") \ + X(SE_WALL_HIT, "WALL-HIT") \ + X(SE_DOOR, "DOOR") \ + X(SE_KAIDAN, "KAIDAN") \ + X(SE_DANSA, "DANSA") \ + X(SE_JITENSYA, "JITENSYA") \ + X(SE_KOUKA_L, "KOUKA-L") \ + X(SE_KOUKA_M, "KOUKA-M") \ + X(SE_KOUKA_H, "KOUKA-H") \ + X(SE_BOWA2, "BOWA2") \ + X(SE_POKE_DEAD, "POKE-DEAD") \ + X(SE_NIGERU, "NIGERU") \ + X(SE_JIDO_DOA, "JIDO-DOA") \ + X(SE_NAMINORI, "NAMINORI") \ + X(SE_BAN, "BAN") \ + X(SE_PIN, "PIN") \ + X(SE_BOO, "BOO") \ + X(SE_BOWA, "BOWA") \ + X(SE_JYUNI, "JYUNI") \ + X(SE_A, "A") \ + X(SE_I, "I") \ + X(SE_U, "U") \ + X(SE_E, "E") \ + X(SE_O, "O") \ + X(SE_N, "N") \ + X(SE_SEIKAI, "SEIKAI") \ + X(SE_HAZURE, "HAZURE") \ + X(SE_EXP, "EXP") \ + X(SE_JITE_PYOKO, "JITE-PYOKO") \ + X(SE_MU_PACHI, "MU-PACHI") \ + X(SE_TK_KASYA, "TK-KASYA") \ + X(SE_FU_ZAKU, "FU-ZAKU") \ + X(SE_FU_ZAKU2, "FU-ZAKU2") \ + X(SE_FU_ZUZUZU, "FU-ZUZUZU") \ + X(SE_RU_GASHIN, "RU-GASHIN") \ + X(SE_RU_GASYAN, "RU-GASYAN") \ + X(SE_RU_BARI, "RU-BARI") \ + X(SE_RU_HYUU, "RU-HYUU") \ + X(SE_KI_GASYAN, "KI-GASYAN") \ + X(SE_TK_WARPIN, "TK-WARPIN") \ + X(SE_TK_WARPOUT, "TK-WARPOUT") \ + X(SE_TU_SAA, "TU-SAA") \ + X(SE_HI_TURUN, "HI-TURUN") \ + X(SE_TRACK_MOVE, "TRACK-MOVE") \ + X(SE_TRACK_STOP, "TRACK-STOP") \ + X(SE_TRACK_HAIK, "TRACK-HAIK") \ + X(SE_TRACK_DOOR, "TRACK-DOOR") \ + X(SE_MOTER, "MOTER") \ + X(SE_CARD, "CARD") \ + X(SE_SAVE, "SAVE") \ + X(SE_KON, "KON") \ + X(SE_KON2, "KON2") \ + X(SE_KON3, "KON3") \ + X(SE_KON4, "KON4") \ + X(SE_SUIKOMU, "SUIKOMU") \ + X(SE_NAGERU, "NAGERU") \ + X(SE_TOY_C, "TOY-C") \ + X(SE_TOY_D, "TOY-D") \ + X(SE_TOY_E, "TOY-E") \ + X(SE_TOY_F, "TOY-F") \ + X(SE_TOY_G, "TOY-G") \ + X(SE_TOY_A, "TOY-A") \ + X(SE_TOY_B, "TOY-B") \ + X(SE_TOY_C1, "TOY-C1") \ + X(SE_MIZU, "MIZU") \ + X(SE_HASHI, "HASHI") \ + X(SE_DAUGI, "DAUGI") \ + X(SE_PINPON, "PINPON") \ + X(SE_FUUSEN1, "FUUSEN1") \ + X(SE_FUUSEN2, "FUUSEN2") \ + X(SE_FUUSEN3, "FUUSEN3") \ + X(SE_TOY_KABE, "TOY-KABE") \ + X(SE_TOY_DANGO, "TOY-DANGO") \ + X(SE_DOKU, "DOKU") \ + X(SE_ESUKA, "ESUKA") \ + X(SE_T_AME, "T-AME") \ + X(SE_T_AME_E, "T-AME-E") \ + X(SE_T_OOAME, "T-OOAME") \ + X(SE_T_OOAME_E, "T-OOAME-E") \ + X(SE_T_KOAME, "T-KOAME") \ + X(SE_T_KOAME_E, "T-KOAME-E") \ + X(SE_T_KAMI, "T-KAMI") \ + X(SE_T_KAMI2, "T-KAMI2") \ + X(SE_ELEBETA, "ELEBETA") \ + X(SE_HINSI, "HINSI") \ + X(SE_EXPMAX, "EXPMAX") \ + X(SE_TAMAKORO, "TAMAKORO") \ + X(SE_TAMAKORO_E, "TAMAKORO-E") \ + X(SE_BASABASA, "BASABASA") \ + X(SE_REGI, "REGI") \ + X(SE_C_GAJI, "C-GAJI") \ + X(SE_C_MAKU_U, "C-MAKU-U") \ + X(SE_C_MAKU_D, "C-MAKU-D") \ + X(SE_C_PASI, "C-PASI") \ + X(SE_C_SYU, "C-SYU") \ + X(SE_C_PIKON, "C-PIKON") \ + X(SE_REAPOKE, "REAPOKE") \ + X(SE_OP_BASYU, "OP-BASYU") \ + X(SE_BT_START, "BT-START") \ + X(SE_DENDOU, "DENDOU") \ + X(SE_JIHANKI, "JIHANKI") \ + X(SE_TAMA, "TAMA") \ + X(SE_Z_SCROLL, "Z-SCROLL") \ + X(SE_Z_PAGE, "Z-PAGE") \ + X(SE_PN_ON, "PN-ON") \ + X(SE_PN_OFF, "PN-OFF") \ + X(SE_Z_SEARCH, "Z-SEARCH") \ + X(SE_TAMAGO, "TAMAGO") \ + X(SE_TB_START, "TB-START") \ + X(SE_TB_KON, "TB-KON") \ + X(SE_TB_KARA, "TB-KARA") \ + X(SE_BIDORO, "BIDORO") \ + X(SE_W085, "W085") \ + X(SE_W085B, "W085B") \ + X(SE_W231, "W231") \ + X(SE_W171, "W171") \ + X(SE_W233, "W233") \ + X(SE_W233B, "W233B") \ + X(SE_W145, "W145") \ + X(SE_W145B, "W145B") \ + X(SE_W145C, "W145C") \ + X(SE_W240, "W240") \ + X(SE_W015, "W015") \ + X(SE_W081, "W081") \ + X(SE_W081B, "W081B") \ + X(SE_W088, "W088") \ + X(SE_W016, "W016") \ + X(SE_W016B, "W016B") \ + X(SE_W003, "W003") \ + X(SE_W104, "W104") \ + X(SE_W013, "W013") \ + X(SE_W196, "W196") \ + X(SE_W086, "W086") \ + X(SE_W004, "W004") \ + X(SE_W025, "W025") \ + X(SE_W025B, "W025B") \ + X(SE_W152, "W152") \ + X(SE_W026, "W026") \ + X(SE_W172, "W172") \ + X(SE_W172B, "W172B") \ + X(SE_W053, "W053") \ + X(SE_W007, "W007") \ + X(SE_W092, "W092") \ + X(SE_W221, "W221") \ + X(SE_W221B, "W221B") \ + X(SE_W052, "W052") \ + X(SE_W036, "W036") \ + X(SE_W059, "W059") \ + X(SE_W059B, "W059B") \ + X(SE_W010, "W010") \ + X(SE_W011, "W011") \ + X(SE_W017, "W017") \ + X(SE_W019, "W019") \ + X(SE_W028, "W028") \ + X(SE_W013B, "W013B") \ + X(SE_W044, "W044") \ + X(SE_W029, "W029") \ + X(SE_W057, "W057") \ + X(SE_W056, "W056") \ + X(SE_W250, "W250") \ + X(SE_W030, "W030") \ + X(SE_W039, "W039") \ + X(SE_W054, "W054") \ + X(SE_W077, "W077") \ + X(SE_W020, "W020") \ + X(SE_W082, "W082") \ + X(SE_W047, "W047") \ + X(SE_W195, "W195") \ + X(SE_W006, "W006") \ + X(SE_W091, "W091") \ + X(SE_W146, "W146") \ + X(SE_W120, "W120") \ + X(SE_W153, "W153") \ + X(SE_W071B, "W071B") \ + X(SE_W071, "W071") \ + X(SE_W103, "W103") \ + X(SE_W062, "W062") \ + X(SE_W062B, "W062B") \ + X(SE_W048, "W048") \ + X(SE_W187, "W187") \ + X(SE_W118, "W118") \ + X(SE_W155, "W155") \ + X(SE_W122, "W122") \ + X(SE_W060, "W060") \ + X(SE_W185, "W185") \ + X(SE_W014, "W014") \ + X(SE_W043, "W043") \ + X(SE_W207, "W207") \ + X(SE_W207B, "W207B") \ + X(SE_W215, "W215") \ + X(SE_W109, "W109") \ + X(SE_W173, "W173") \ + X(SE_W280, "W280") \ + X(SE_W202, "W202") \ + X(SE_W060B, "W060B") \ + X(SE_W076, "W076") \ + X(SE_W080, "W080") \ + X(SE_W100, "W100") \ + X(SE_W107, "W107") \ + X(SE_W166, "W166") \ + X(SE_W129, "W129") \ + X(SE_W115, "W115") \ + X(SE_W112, "W112") \ + X(SE_W197, "W197") \ + X(SE_W199, "W199") \ + X(SE_W236, "W236") \ + X(SE_W204, "W204") \ + X(SE_W268, "W268") \ + X(SE_W070, "W070") \ + X(SE_W063, "W063") \ + X(SE_W127, "W127") \ + X(SE_W179, "W179") \ + X(SE_W151, "W151") \ + X(SE_W201, "W201") \ + X(SE_W161, "W161") \ + X(SE_W161B, "W161B") \ + X(SE_W227, "W227") \ + X(SE_W227B, "W227B") \ + X(SE_W226, "W226") \ + X(SE_W208, "W208") \ + X(SE_W213, "W213") \ + X(SE_W213B, "W213B") \ + X(SE_W234, "W234") \ + X(SE_W260, "W260") \ + X(SE_W328, "W328") \ + X(SE_W320, "W320") \ + X(SE_W255, "W255") \ + X(SE_W291, "W291") \ + X(SE_W089, "W089") \ + X(SE_W239, "W239") \ + X(SE_W230, "W230") \ + X(SE_W281, "W281") \ + X(SE_W327, "W327") \ + X(SE_W287, "W287") \ + X(SE_W257, "W257") \ + X(SE_W253, "W253") \ + X(SE_W258, "W258") \ + X(SE_W322, "W322") \ + X(SE_W298, "W298") \ + X(SE_W287B, "W287B") \ + X(SE_W114, "W114") \ + X(SE_W063B, "W063B") + +// Create BGM list +#define X(songId, name) static const u8 sBGMName_##songId[] = _(name); +SOUND_LIST_BGM +#undef X + +#define X(songId, name) sBGMName_##songId, +static const u8 *const gBGMNames[] = +{ +SOUND_LIST_BGM +}; +#undef X + +// Create SE list +#define X(songId, name) static const u8 sSEName_##songId[] = _(name); +SOUND_LIST_SE +#undef X + +#define X(songId, name) sSEName_##songId, +static const u8 *const gSENames[] = +{ +SOUND_LIST_SE +}; +#undef X + +void Task_InitCryTest(u8 taskId) +{ + struct CryRelatedStruct cryStruct, cryStruct2; + u8 zero; + + SetUpWindowConfig(&gWindowConfig_81E6C3C); + InitMenuWindow(&gWindowConfig_81E6CE4); + gSoundTestCryNum = 1; + ResetSpriteData(); + FreeAllSpritePalettes(); + + cryStruct.unk0 = 0x2000; + cryStruct.unk2 = 29; + cryStruct.paletteNo = 12; + cryStruct.yPos = 30; + cryStruct.xPos = 4; + + zero = 0; // wtf? + gUnknown_03005E98 = 0; + + while (sub_8119E3C(&cryStruct, 3) == FALSE) + ; + + cryStruct2.unk0 = 0; + cryStruct2.unk2 = 15; + cryStruct2.paletteNo = 13; + cryStruct2.xPos = 12; + cryStruct2.yPos = 12; + + zero = 0; // wtf? + gUnknown_03005E98 = 0; + + while (ShowPokedexCryScreen(&cryStruct2, 2) == FALSE) + ; + + MenuDrawTextWindow(0, 16, 5, 19); + PrintCryNumber(); + BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, 0); + REG_BG2HOFS = 0; + REG_BG2VOFS = 0; + REG_BG2CNT = 0xF01; + REG_BG3CNT = 0x1D03; + REG_DISPCNT = 0x1d40; + m4aMPlayFadeOutTemporarily(&gMPlay_BGM, 2); + gTasks[taskId].func = Task_ProcessCryTestInput; +} + +void Task_ProcessCryTestInput(u8 taskId) +{ + sub_8119F88(3); + + if (gMain.newKeys & A_BUTTON) + { + sub_811A050(gSoundTestCryNum); + } + if (gMain.newKeys & R_BUTTON) + { + StopCryAndClearCrySongs(); + } + if (gMain.newAndRepeatedKeys & DPAD_UP) + { + if(--gSoundTestCryNum == 0) + gSoundTestCryNum = 384; // total species + PrintCryNumber(); + } + if (gMain.newAndRepeatedKeys & DPAD_DOWN) + { + if(++gSoundTestCryNum > 384) + gSoundTestCryNum = 1; + PrintCryNumber(); + } + if (gMain.newKeys & B_BUTTON) + { + REG_DISPCNT = 0x7140; + REG_WIN0H = WIN_RANGE(17, 223); + REG_WIN0V = WIN_RANGE(1, 31); + MenuZeroFillWindowRect(0, 0, 29, 19); + gTasks[taskId].func = Task_InitSoundCheckMenu; + DestroyCryMeterNeedleSprite(); + } +} + +void PrintCryNumber(void) +{ + PrintSignedNumber(gSoundTestCryNum, 1, 17, 3); +} diff --git a/src/unknown_debug_menu.c b/src/debug/unknown_debug_menu.c index a81625f2a..a81625f2a 100644 --- a/src/unknown_debug_menu.c +++ b/src/debug/unknown_debug_menu.c diff --git a/src/blend_palette.c b/src/engine/blend_palette.c index 843c50ac1..843c50ac1 100644 --- a/src/blend_palette.c +++ b/src/engine/blend_palette.c diff --git a/src/cable_club.c b/src/engine/cable_club.c index 7a85f2b6c..c61a1d01c 100644 --- a/src/cable_club.c +++ b/src/engine/cable_club.c @@ -68,7 +68,7 @@ static void sub_8083B6C(void); static void sub_8083CA4(u8 taskId); extern void sub_80831F8(u8 taskId); -extern void call_map_music_set_to_zero(void); +extern void Overworld_ResetMapMusic(void); extern void sub_810FEFC(void); extern void sub_8047CD8(void); extern void sub_805559C(void); @@ -708,7 +708,7 @@ static void sub_808382C(u8 taskId) static void sub_8083958(void) { - call_map_music_set_to_zero(); + Overworld_ResetMapMusic(); LoadPlayerParty(); SavePlayerBag(); sub_810FEFC(); diff --git a/src/clear_save_data_menu.c b/src/engine/clear_save_data_menu.c index 498562fe0..498562fe0 100644 --- a/src/clear_save_data_menu.c +++ b/src/engine/clear_save_data_menu.c diff --git a/src/clock.c b/src/engine/clock.c index 9635514d2..9635514d2 100644 --- a/src/clock.c +++ b/src/engine/clock.c diff --git a/src/decompress.c b/src/engine/decompress.c index d7f7087a7..3e5993118 100644 --- a/src/decompress.c +++ b/src/engine/decompress.c @@ -6,7 +6,7 @@ #define WRAM 0x02000000 -void sub_800D238(const void *src, void *dest) +void LZDecompressWram(const void *src, void *dest) { LZ77UnCompWram(src, dest); } diff --git a/src/link.c b/src/engine/link.c index 850201ccb..850201ccb 100644 --- a/src/link.c +++ b/src/engine/link.c diff --git a/src/load_save.c b/src/engine/load_save.c index 8424b1121..8424b1121 100644 --- a/src/load_save.c +++ b/src/engine/load_save.c diff --git a/src/main.c b/src/engine/main.c index d7c11b6c8..d7c11b6c8 100644 --- a/src/main.c +++ b/src/engine/main.c diff --git a/src/main_menu.c b/src/engine/main_menu.c index e0af86f3d..e0af86f3d 100644 --- a/src/main_menu.c +++ b/src/engine/main_menu.c diff --git a/src/menu.c b/src/engine/menu.c index a9c4aaa43..a9c4aaa43 100644 --- a/src/menu.c +++ b/src/engine/menu.c diff --git a/src/menu_cursor.c b/src/engine/menu_cursor.c index d43be2a2f..d43be2a2f 100644 --- a/src/menu_cursor.c +++ b/src/engine/menu_cursor.c diff --git a/src/mystery_event_menu.c b/src/engine/mystery_event_menu.c index 0e48dc177..0e48dc177 100644 --- a/src/mystery_event_menu.c +++ b/src/engine/mystery_event_menu.c diff --git a/src/mystery_event_script.c b/src/engine/mystery_event_script.c index f507942a7..a6568f5de 100644 --- a/src/mystery_event_script.c +++ b/src/engine/mystery_event_script.c @@ -401,8 +401,8 @@ bool8 MEScrCmd_givepokemon(struct ScriptContext *ctx) if (species != SPECIES_EGG) { u16 pokedexNum = SpeciesToNationalPokedexNum(species); - GetNationalPokedexFlag(pokedexNum, 2); - GetNationalPokedexFlag(pokedexNum, 3); + GetSetPokedexFlag(pokedexNum, 2); + GetSetPokedexFlag(pokedexNum, 3); } heldItem = GetMonData(&gPlayerParty[5], MON_DATA_HELD_ITEM); diff --git a/src/name_string_util.c b/src/engine/name_string_util.c index f1a935453..f1a935453 100644 --- a/src/name_string_util.c +++ b/src/engine/name_string_util.c diff --git a/src/naming_screen.c b/src/engine/naming_screen.c index 3f8417e6d..3f8417e6d 100644 --- a/src/naming_screen.c +++ b/src/engine/naming_screen.c diff --git a/src/option_menu.c b/src/engine/option_menu.c index dfc49b035..dfc49b035 100644 --- a/src/option_menu.c +++ b/src/engine/option_menu.c diff --git a/src/palette.c b/src/engine/palette.c index 94a4f8092..17e9ca178 100644 --- a/src/palette.c +++ b/src/engine/palette.c @@ -74,7 +74,7 @@ static bool8 IsSoftwarePaletteFadeFinishing(void); void LoadCompressedPalette(const void *src, u16 offset, u16 size) { - sub_800D238(src, sPaletteDecompressionBuffer); + LZDecompressWram(src, sPaletteDecompressionBuffer); CpuCopy16(sPaletteDecompressionBuffer, gPlttBufferUnfaded + offset, size); CpuCopy16(sPaletteDecompressionBuffer, gPlttBufferFaded + offset, size); } diff --git a/src/play_time.c b/src/engine/play_time.c index 9882c9c4b..9882c9c4b 100644 --- a/src/play_time.c +++ b/src/engine/play_time.c diff --git a/src/record_mixing.c b/src/engine/record_mixing.c index 8dff432c1..8dff432c1 100644 --- a/src/record_mixing.c +++ b/src/engine/record_mixing.c diff --git a/src/reset_rtc_screen.c b/src/engine/reset_rtc_screen.c index d052992ad..d052992ad 100644 --- a/src/reset_rtc_screen.c +++ b/src/engine/reset_rtc_screen.c diff --git a/src/rng.c b/src/engine/rng.c index 7d4b5600e..7d4b5600e 100644 --- a/src/rng.c +++ b/src/engine/rng.c diff --git a/src/rtc.c b/src/engine/rtc.c index d73f943d2..d73f943d2 100644 --- a/src/rtc.c +++ b/src/engine/rtc.c diff --git a/src/save.c b/src/engine/save.c index eae3f4470..eae3f4470 100644 --- a/src/save.c +++ b/src/engine/save.c diff --git a/src/save_failed_screen.c b/src/engine/save_failed_screen.c index b91e8b5bf..b91e8b5bf 100644 --- a/src/save_failed_screen.c +++ b/src/engine/save_failed_screen.c diff --git a/src/save_menu_util.c b/src/engine/save_menu_util.c index a2d17bd36..a2d17bd36 100644 --- a/src/save_menu_util.c +++ b/src/engine/save_menu_util.c diff --git a/src/script.c b/src/engine/script.c index f049b96fc..8625cfdc2 100644 --- a/src/script.c +++ b/src/engine/script.c @@ -3,6 +3,14 @@ #include "event_data.h" #define RAM_SCRIPT_MAGIC 51 +#define SCRIPT_STACK_SIZE 20 + +enum +{ + SCRIPT_MODE_STOPPED, + SCRIPT_MODE_BYTECODE, + SCRIPT_MODE_NATIVE, +}; EWRAM_DATA u8 *gUnknown_0202E8AC = NULL; @@ -19,66 +27,66 @@ void InitScriptContext(struct ScriptContext *ctx, void *cmdTable, void *cmdTable { s32 i; - ctx->mode = 0; - ctx->scriptPtr = 0; + ctx->mode = SCRIPT_MODE_STOPPED; + ctx->scriptPtr = NULL; ctx->stackDepth = 0; - ctx->nativePtr = 0; + ctx->nativePtr = NULL; ctx->cmdTable = cmdTable; ctx->cmdTableEnd = cmdTableEnd; for (i = 0; i < 4; i++) ctx->data[i] = 0; - for (i = 0; i < 20; i++) + for (i = 0; i < SCRIPT_STACK_SIZE; i++) ctx->stack[i] = 0; } u8 SetupBytecodeScript(struct ScriptContext *ctx, const u8 *ptr) { ctx->scriptPtr = ptr; - ctx->mode = 1; + ctx->mode = SCRIPT_MODE_BYTECODE; return 1; } void SetupNativeScript(struct ScriptContext *ctx, bool8 (*ptr)(void)) { - ctx->mode = 2; + ctx->mode = SCRIPT_MODE_NATIVE; ctx->nativePtr = ptr; } void StopScript(struct ScriptContext *ctx) { - ctx->mode = 0; - ctx->scriptPtr = 0; + ctx->mode = SCRIPT_MODE_STOPPED; + ctx->scriptPtr = NULL; } -u8 RunScriptCommand(struct ScriptContext *ctx) +bool8 RunScriptCommand(struct ScriptContext *ctx) { - if (ctx->mode == 0) - return 0; + if (ctx->mode == SCRIPT_MODE_STOPPED) + return FALSE; switch (ctx->mode) { - case 0: - return 0; - case 2: + case SCRIPT_MODE_STOPPED: + return FALSE; + case SCRIPT_MODE_NATIVE: if (ctx->nativePtr) { if (ctx->nativePtr() == TRUE) - ctx->mode = 1; - return 1; + ctx->mode = SCRIPT_MODE_BYTECODE; + return TRUE; } - ctx->mode = 1; - case 1: + ctx->mode = SCRIPT_MODE_BYTECODE; + case SCRIPT_MODE_BYTECODE: while (1) { u8 cmdCode; - ScrCmdFunc *func; + ScrCmdFunc *cmdFunc; - if (!ctx->scriptPtr) + if (ctx->scriptPtr == NULL) { - ctx->mode = 0; - return 0; + ctx->mode = SCRIPT_MODE_STOPPED; + return FALSE; } if (ctx->scriptPtr == gNullScriptPtr) @@ -89,25 +97,25 @@ u8 RunScriptCommand(struct ScriptContext *ctx) cmdCode = *(ctx->scriptPtr); ctx->scriptPtr++; - func = &ctx->cmdTable[cmdCode]; + cmdFunc = &ctx->cmdTable[cmdCode]; - if (func >= ctx->cmdTableEnd) + if (cmdFunc >= ctx->cmdTableEnd) { - ctx->mode = 0; - return 0; + ctx->mode = SCRIPT_MODE_STOPPED; + return FALSE; } - if ((*func)(ctx) == 1) - return 1; + if ((*cmdFunc)(ctx) == TRUE) + return TRUE; } } - return 1; + return TRUE; } u8 ScriptPush(struct ScriptContext *ctx, const u8 *ptr) { - if (ctx->stackDepth + 1 >= 20) + if (ctx->stackDepth + 1 >= SCRIPT_STACK_SIZE) { return 1; } diff --git a/src/sound.c b/src/engine/sound.c index 91f5e06a3..a6a61c0b5 100644 --- a/src/sound.c +++ b/src/engine/sound.c @@ -81,8 +81,6 @@ void MapMusicMain(void) PlayBGM(sCurrentMapMusic); break; case 2: - case 3: - case 4: break; case 5: if (IsBGMStopped()) diff --git a/src/sprite.c b/src/engine/sprite.c index fb8c2b648..fb8c2b648 100644 --- a/src/sprite.c +++ b/src/engine/sprite.c diff --git a/src/string_util.c b/src/engine/string_util.c index 9686256a1..9686256a1 100644 --- a/src/string_util.c +++ b/src/engine/string_util.c diff --git a/src/task.c b/src/engine/task.c index 7bd2b5937..7bd2b5937 100644 --- a/src/task.c +++ b/src/engine/task.c diff --git a/src/text.c b/src/engine/text.c index 35f74b339..87903608f 100644 --- a/src/text.c +++ b/src/engine/text.c @@ -219,12 +219,12 @@ static const u8 sBrailleGlyphs[] = INCBIN_U8("graphics/fonts/font6_braille.1bpp" static const u32 sDownArrowTiles[] = INCBIN_U32("graphics/fonts/down_arrow.4bpp"); // clang-format off -#include "data/text/type1_map.h" -#include "data/text/type3_map.h" -#include "data/text/font1_widths.h" -#include "data/text/font4_widths.h" -#include "data/text/font0_widths.h" -#include "data/text/font3_widths.h" +#include "../data/text/type1_map.h" +#include "../data/text/type3_map.h" +#include "../data/text/font1_widths.h" +#include "../data/text/font4_widths.h" +#include "../data/text/font0_widths.h" +#include "../data/text/font3_widths.h" // clang-format on const u16 gUnknownPalette_81E6692[] = INCBIN_U16("graphics/fonts/unknown_81E6692.gbapal"); diff --git a/src/text_window.c b/src/engine/text_window.c index 9a88789d1..9a88789d1 100644 --- a/src/text_window.c +++ b/src/engine/text_window.c diff --git a/src/tileset_anim.c b/src/engine/tileset_anim.c index 34685381d..34685381d 100644 --- a/src/tileset_anim.c +++ b/src/engine/tileset_anim.c diff --git a/src/time_events.c b/src/engine/time_events.c index accb03db8..accb03db8 100644 --- a/src/time_events.c +++ b/src/engine/time_events.c diff --git a/src/trade.c b/src/engine/trade.c index 37b91f57e..19381f4ee 100644 --- a/src/trade.c +++ b/src/engine/trade.c @@ -2403,7 +2403,7 @@ static void sub_8049ED4(u8 a0) gSprites[gUnknown_03004824->partyIcons[whichParty][whichPokemon]].data0 = 20; gSprites[gUnknown_03004824->partyIcons[whichParty][whichPokemon]].data2 = (gTradeMonSpriteCoords[6 * whichParty + whichPokemon][0] + gTradeMonSpriteCoords[6 * whichParty + whichPokemon + 1][0]) / 2 * 8 + 14; gSprites[gUnknown_03004824->partyIcons[whichParty][whichPokemon]].data4 = gTradeMonSpriteCoords[6 * whichParty + whichPokemon][1] * 8 - 12; - oamt_set_x3A_32(&gSprites[gUnknown_03004824->partyIcons[whichParty][whichPokemon]], sub_809D62C); + StoreSpriteCallbackInData6(&gSprites[gUnknown_03004824->partyIcons[whichParty][whichPokemon]], sub_809D62C); gUnknown_03004824->unk_0080[a0] ++; sub_8078A34(&gSprites[gUnknown_03004824->partyIcons[whichParty][whichPokemon]]); HandleDestroyMenuCursors(); @@ -2617,7 +2617,7 @@ static void sub_8049ED4(u8 a0) "\tlsls r0, 2\n" "\tadds r0, r7\n" "\tldr r1, _0804A0A0 @ =sub_809D62C\n" - "\tbl oamt_set_x3A_32\n" + "\tbl StoreSpriteCallbackInData6\n" "\tldr r2, _0804A09C @ =gUnknown_03004824\n" "\tldr r1, [r2]\n" "\tadds r1, 0x80\n" @@ -3943,11 +3943,11 @@ static void sub_804B2D0(u8 whichParty, u8 a1) species = GetMonData(pokemon, MON_DATA_SPECIES2); personality = GetMonData(pokemon, MON_DATA_PERSONALITY); HandleLoadSpecialPokePic(&gMonFrontPicTable[species], gMonFrontPicCoords[species].coords, gMonFrontPicCoords[species].y_offset, (u32)ewram, gUnknown_081FAF4C[whichParty * 2 + 1], species, personality); - LoadCompressedObjectPalette(sub_8040990(pokemon)); + LoadCompressedObjectPalette(GetMonSpritePalStruct(pokemon)); gUnknown_03004828->tradeSpecies[whichParty] = species; break; case 1: - GetMonSpriteTemplate_803C56C(sub_8040990(pokemon)->tag, v0); + GetMonSpriteTemplate_803C56C(GetMonSpritePalStruct(pokemon)->tag, v0); gUnknown_03004828->pokePicSpriteIdxs[whichParty] = CreateSprite(&gUnknown_02024E8C, 0x78, 0x3c, 0x6); gSprites[gUnknown_03004828->pokePicSpriteIdxs[whichParty]].invisible = TRUE; gSprites[gUnknown_03004828->pokePicSpriteIdxs[whichParty]].callback = SpriteCallbackDummy; @@ -4545,8 +4545,8 @@ static void sub_804BA18(u8 partyIdx) if (!GetMonData(pokemon, MON_DATA_IS_EGG)) { u16 species = SpeciesToNationalPokedexNum(GetMonData(pokemon, MON_DATA_SPECIES, NULL)); - GetNationalPokedexFlag(species, 2); - GetNationalPokedexFlag(species, 3); + GetSetPokedexFlag(species, 2); + GetSetPokedexFlag(species, 3); } } @@ -4949,7 +4949,7 @@ static bool8 sub_804C29C(void) gUnknown_03004828->unk_00c4 ++; break; case 37: - if (!sub_8040A3C(gUnknown_03004828->tradeSpecies[0])) + if (!IsPokeSpriteNotFlipped(gUnknown_03004828->tradeSpecies[0])) { gSprites[gUnknown_03004828->pokePicSpriteIdxs[0]].affineAnims = gSpriteAffineAnimTable_8215AC0; gSprites[gUnknown_03004828->pokePicSpriteIdxs[0]].oam.affineMode = 3; diff --git a/src/trainer_card.c b/src/engine/trainer_card.c index bcb62ede6..bcb62ede6 100644 --- a/src/trainer_card.c +++ b/src/engine/trainer_card.c diff --git a/src/trig.c b/src/engine/trig.c index e16a69e63..e16a69e63 100644 --- a/src/trig.c +++ b/src/engine/trig.c diff --git a/src/util.c b/src/engine/util.c index 582b9f806..582b9f806 100644 --- a/src/util.c +++ b/src/engine/util.c diff --git a/src/bard_music.c b/src/field/bard_music.c index daf003233..daf003233 100644 --- a/src/bard_music.c +++ b/src/field/bard_music.c diff --git a/src/berry.c b/src/field/berry.c index d82eab2a6..d82eab2a6 100644 --- a/src/berry.c +++ b/src/field/berry.c diff --git a/src/berry_tag_screen.c b/src/field/berry_tag_screen.c index 1413a02ca..1413a02ca 100644 --- a/src/berry_tag_screen.c +++ b/src/field/berry_tag_screen.c diff --git a/src/bike.c b/src/field/bike.c index dae86bd88..8df901b40 100644 --- a/src/bike.c +++ b/src/field/bike.c @@ -935,13 +935,13 @@ void GetOnOffBike(u8 var) if (gPlayerAvatar.flags & (PLAYER_AVATAR_FLAG_MACH_BIKE | PLAYER_AVATAR_FLAG_ACRO_BIKE)) { SetPlayerAvatarTransitionFlags(PLAYER_AVATAR_FLAG_ON_FOOT); - sav1_reset_battle_music_maybe(); - sub_8053E90(); + Overworld_ClearSavedMusic(); + Overworld_PlaySpecialMapMusic(); } else { SetPlayerAvatarTransitionFlags(var); - sav1_set_battle_music_maybe(BGM_CYCLING); + Overworld_SetSavedMusic(BGM_CYCLING); Overworld_ChangeMusicTo(BGM_CYCLING); } } diff --git a/src/birch_pc.c b/src/field/birch_pc.c index 5fb6427c3..9872dd54d 100644 --- a/src/birch_pc.c +++ b/src/field/birch_pc.c @@ -91,15 +91,15 @@ const u8 *GetPokedexRatingText(u16 count) return gBirchDexRatingText_LessThan200; if (count == 200) { - if (GetNationalPokedexFlag(SpeciesToNationalPokedexNum(SPECIES_JIRACHI), 1) - || GetNationalPokedexFlag(SpeciesToNationalPokedexNum(SPECIES_DEOXYS), 1)) // Jirachi or Deoxys is not counted towards the dex completion. If either of these flags are enabled, it means the actual count is less than 200. + if (GetSetPokedexFlag(SpeciesToNationalPokedexNum(SPECIES_JIRACHI), 1) + || GetSetPokedexFlag(SpeciesToNationalPokedexNum(SPECIES_DEOXYS), 1)) // Jirachi or Deoxys is not counted towards the dex completion. If either of these flags are enabled, it means the actual count is less than 200. return gBirchDexRatingText_LessThan200; return gBirchDexRatingText_DexCompleted; } if (count == 201) { - if (GetNationalPokedexFlag(SpeciesToNationalPokedexNum(SPECIES_JIRACHI), 1) - && GetNationalPokedexFlag(SpeciesToNationalPokedexNum(SPECIES_DEOXYS), 1)) // If both of these flags are enabled, it means the actual count is less than 200. + if (GetSetPokedexFlag(SpeciesToNationalPokedexNum(SPECIES_JIRACHI), 1) + && GetSetPokedexFlag(SpeciesToNationalPokedexNum(SPECIES_DEOXYS), 1)) // If both of these flags are enabled, it means the actual count is less than 200. return gBirchDexRatingText_LessThan200; return gBirchDexRatingText_DexCompleted; } diff --git a/src/braille_puzzles.c b/src/field/braille_puzzles.c index b11b1ff3a..b11b1ff3a 100644 --- a/src/braille_puzzles.c +++ b/src/field/braille_puzzles.c diff --git a/src/choose_party.c b/src/field/choose_party.c index 9cdf63fc8..9cdf63fc8 100644 --- a/src/choose_party.c +++ b/src/field/choose_party.c diff --git a/src/coins.c b/src/field/coins.c index 3c6356612..91a4b508d 100644 --- a/src/coins.c +++ b/src/field/coins.c @@ -6,47 +6,47 @@ #define MAX_COINS 9999 -void UpdateCoinsWindow(s32 a, u8 b, u8 c) +void UpdateCoinsWindow(s32 coins, u8 x, u8 y) { - PrintCoins(a, 4, b + 2, c + 1); + PrintCoins(coins, 4, x + 2, y + 1); } -void ShowCoinsWindow(u32 a, u8 b, u8 c) +void ShowCoinsWindow(u32 coins, u8 x, u8 y) { - MenuDrawTextWindow(b, c, b + 9, c + 3); - UpdateCoinsWindow(a, b, c); + MenuDrawTextWindow(x, y, x + 9, y + 3); + UpdateCoinsWindow(coins, x, y); } -void HideCoinsWindow(u8 a, u8 b) +void HideCoinsWindow(u8 x, u8 y) { - MenuZeroFillWindowRect(a, b, a + 9, b + 3); + MenuZeroFillWindowRect(x, y, x + 9, y + 3); } -void PrintCoins(s32 a, u8 b, u8 c, u8 d) +void PrintCoins(s32 coins, u8 b, u8 x, u8 y) { u8 string[16]; u8 *ptr; u8 r1; u8 foo; - ConvertIntToDecimalString(string, a); + ConvertIntToDecimalString(string, coins); r1 = (b * 6 + 0x21 - 8 * (b + 2)); - c = c - r1 / 8; + x = x - r1 / 8; foo = r1 % 8; ptr = gStringVar1; if (foo) { - ptr[0] = 0xFC; + ptr[0] = EXT_CTRL_CODE_BEGIN; ptr[1] = 0x11; ptr[2] = 8 - (foo); ptr += 3; } - ptr[0] = 0xFC; + ptr[0] = EXT_CTRL_CODE_BEGIN; ptr[1] = 0x11; ptr[2] = (b - StringLength(string)) * 6; ptr += 3; StringCopy(ptr, string); - MenuPrint(gOtherText_Coins2, c, d); + MenuPrint(gOtherText_Coins2, x, y); } u16 GetCoins(void) diff --git a/src/coord_event_weather.c b/src/field/coord_event_weather.c index 9c5a1ca4d..9c5a1ca4d 100644 --- a/src/coord_event_weather.c +++ b/src/field/coord_event_weather.c diff --git a/src/daycare.c b/src/field/daycare.c index 591b5b188..591b5b188 100644 --- a/src/daycare.c +++ b/src/field/daycare.c diff --git a/src/decoration.c b/src/field/decoration.c index 1d48692c1..e067191e9 100644 --- a/src/decoration.c +++ b/src/field/decoration.c @@ -619,7 +619,7 @@ const u8 DecorDesc_REGISTEEL_DOLL[] = _( "Place it on a mat\n" "or a desk."); #elif GERMAN -#include "data/decoration/descriptions_de.h" +#include "../data/decoration/descriptions_de.h" #endif const u16 DecorGfx_SMALL_DESK[] = { @@ -1389,7 +1389,7 @@ const struct Decoration gDecorations[] = { {DECOR_REGISTEEL_DOLL, _("REGISTEEL DOLL"), DECORPERM_SOLID_MAT, DECORSHAPE_1x2, DECORCAT_DOLL, 10000, DecorDesc_REGISTEEL_DOLL, DecorGfx_REGISTEEL_DOLL} }; #elif GERMAN -#include "data/decoration/decorations.h" +#include "../data/decoration/decorations.h" #endif const u8 *const gUnknown_083EC5E4[] = { @@ -2199,7 +2199,7 @@ void sub_80FF0E0(u8 taskId) void sub_80FF114(u8 taskId) { DrawWholeMapView(); - warp1_set(gSaveBlock1.location.mapGroup, gSaveBlock1.location.mapNum, -1, gTasks[taskId].data[3], gTasks[taskId].data[4]); + Overworld_SetWarpDestination(gSaveBlock1.location.mapGroup, gSaveBlock1.location.mapNum, -1, gTasks[taskId].data[3], gTasks[taskId].data[4]); warp_in(); } void sub_80FF160(u8 taskId) diff --git a/src/decoration_inventory.c b/src/field/decoration_inventory.c index 083cb260c..083cb260c 100644 --- a/src/decoration_inventory.c +++ b/src/field/decoration_inventory.c diff --git a/src/dewford_trend.c b/src/field/dewford_trend.c index aaf4dd66a..aaf4dd66a 100644 --- a/src/dewford_trend.c +++ b/src/field/dewford_trend.c diff --git a/src/diploma.c b/src/field/diploma.c index 27601404c..27601404c 100644 --- a/src/diploma.c +++ b/src/field/diploma.c diff --git a/src/easy_chat.c b/src/field/easy_chat.c index e71067454..6014b3d14 100644 --- a/src/easy_chat.c +++ b/src/field/easy_chat.c @@ -430,7 +430,7 @@ static u16 sub_80EB9D8(void) for (i = 0; i < gEasyChatGroupSizes[EC_GROUP_POKEMON]; i++) { const u16 dexNum = SpeciesToNationalPokedexNum(*speciesList); - const u8 local2 = GetNationalPokedexFlag(dexNum, 0); + const u8 local2 = GetSetPokedexFlag(dexNum, 0); if (local2) { diff --git a/src/event_data.c b/src/field/event_data.c index ee475343f..43d49c417 100644 --- a/src/event_data.c +++ b/src/field/event_data.c @@ -114,10 +114,8 @@ u16 *GetVarPointer(u16 id) { if (id < 0x4000) return NULL; - - if ((s16)id >= 0) + if (id < 0x8000) return &gSaveBlock1.vars[id - 0x4000]; - return gSpecialVars[id - 0x8000]; } diff --git a/src/field_camera.c b/src/field/field_camera.c index db51cf054..db51cf054 100644 --- a/src/field_camera.c +++ b/src/field/field_camera.c diff --git a/src/field_control_avatar.c b/src/field/field_control_avatar.c index ff8e8504c..ff8e8504c 100644 --- a/src/field_control_avatar.c +++ b/src/field/field_control_avatar.c diff --git a/src/field_door.c b/src/field/field_door.c index ab46f0696..ab46f0696 100644 --- a/src/field_door.c +++ b/src/field/field_door.c diff --git a/src/field_effect.c b/src/field/field_effect.c index 72224f299..afe020ac7 100644 --- a/src/field_effect.c +++ b/src/field/field_effect.c @@ -660,7 +660,7 @@ u8 CreateMonSprite_FieldMove(u16 species, u32 d, u32 g, s16 x, s16 y, u8 subprio const struct CompressedSpritePalette *spritePalette; HandleLoadSpecialPokePic(&gMonFrontPicTable[species], gMonFrontPicCoords[species].coords, gMonFrontPicCoords[species].y_offset, (u32)gUnknown_081FAF4C[3] /* this is actually u8* or something, pointing to ewram */, gUnknown_081FAF4C[3], species, g); - spritePalette = sub_80409C8(species, d, g); + spritePalette = GetMonSpritePalStructFromOtIdPersonality(species, d, g); LoadCompressedObjectPalette(spritePalette); GetMonSpriteTemplate_803C56C(species, 3); gUnknown_02024E8C.paletteTag = spritePalette->tag; @@ -1213,7 +1213,7 @@ void task00_8084310(u8 taskId) } if (!FieldEffectActiveListContains(FLDEFF_USE_FLY)) { - flag_var_implications_of_teleport_(); + Overworld_ResetStateAfterFly(); warp_in(); SetMainCallback2(CB2_LoadMap); gFieldCallback = mapldr_08084390; @@ -1223,7 +1223,7 @@ void task00_8084310(u8 taskId) void mapldr_08084390(void) { - sub_8053E90(); + Overworld_PlaySpecialMapMusic(); pal_fill_black(); CreateTask(c3_080843F8, 0); gMapObjects[gPlayerAvatar.mapObjectId].mapobj_bit_13 = 1; @@ -1264,7 +1264,7 @@ extern void CameraObjectReset1(void); void sub_8086748(void) { - sub_8053E90(); + Overworld_PlaySpecialMapMusic(); pal_fill_for_map_transition(); ScriptContext2_Enable(); FreezeMapObjects(); @@ -1533,7 +1533,7 @@ void sub_8086C40(void) void sub_8086C94(void) { - sub_8053E90(); + Overworld_PlaySpecialMapMusic(); pal_fill_for_map_transition(); ScriptContext2_Enable(); CreateTask(sub_8086CBC, 0); @@ -1897,7 +1897,7 @@ void sub_8087470(u8); void mapldr_080851BC(void) { - sub_8053E90(); + Overworld_PlaySpecialMapMusic(); pal_fill_for_map_transition(); ScriptContext2_Enable(); gFieldCallback = NULL; @@ -2134,7 +2134,7 @@ void sub_8087A74(u8); void mapldr_080859D4(void) { - sub_8053E90(); + Overworld_PlaySpecialMapMusic(); pal_fill_for_map_transition(); ScriptContext2_Enable(); FreezeMapObjects(); @@ -2266,7 +2266,7 @@ void sub_8087D78(struct Task *task) { if (!gPaletteFade.active && sub_8054034() == TRUE) { - sub_8053570(); + Overworld_SetWarpDestToLastHealLoc(); warp_in(); SetMainCallback2(CB2_LoadMap); gFieldCallback = mapldr_08085D88; @@ -2278,7 +2278,7 @@ void sub_8087E1C(u8); void mapldr_08085D88(void) { - sub_8053E90(); + Overworld_PlaySpecialMapMusic(); pal_fill_for_map_transition(); ScriptContext2_Enable(); FreezeMapObjects(); @@ -2879,7 +2879,7 @@ u8 FldEff_UseSurf(void) u8 taskId; taskId = CreateTask(sub_8088954, 0xff); gTasks[taskId].data[15] = gFieldEffectArguments[0]; - sav1_reset_battle_music_maybe(); + Overworld_ClearSavedMusic(); Overworld_ChangeMusicTo(0x016d); return FALSE; } diff --git a/src/field_effect_helpers.c b/src/field/field_effect_helpers.c index 2ad8bdce3..2ad8bdce3 100644 --- a/src/field_effect_helpers.c +++ b/src/field/field_effect_helpers.c diff --git a/src/field_fadetransition.c b/src/field/field_fadetransition.c index d95177821..82776d18c 100644 --- a/src/field_fadetransition.c +++ b/src/field/field_fadetransition.c @@ -89,7 +89,7 @@ void task0A_asap_script_env_2_enable_and_set_ctx_running(u8 taskID) void sub_8080990(void) { ScriptContext2_Enable(); - sub_8053E90(); + Overworld_PlaySpecialMapMusic(); pal_fill_black(); CreateTask(task0A_asap_script_env_2_enable_and_set_ctx_running, 10); } @@ -130,7 +130,7 @@ void task_mpl_807DD60(u8 taskId) void sub_8080A3C(void) { ScriptContext2_Enable(); - sub_8053E90(); + Overworld_PlaySpecialMapMusic(); palette_bg_fill_black(); CreateTask(task_mpl_807DD60, 10); } @@ -165,7 +165,7 @@ void sub_8080A5C(u8 taskId) void sub_8080AC4(void) { ScriptContext2_Enable(); - sub_8053E90(); + Overworld_PlaySpecialMapMusic(); palette_bg_fill_black(); CreateTask(sub_8080A5C, 10); } @@ -188,7 +188,7 @@ void sub_8080AE4(void) void mapldr_default(void) { - sub_8053E90(); + Overworld_PlaySpecialMapMusic(); pal_fill_for_map_transition(); sub_8080AE4(); ScriptContext2_Enable(); @@ -196,7 +196,7 @@ void mapldr_default(void) void sub_8080B60(void) { - sub_8053E90(); + Overworld_PlaySpecialMapMusic(); pal_fill_black(); sub_8080AE4(); ScriptContext2_Enable(); @@ -204,7 +204,7 @@ void sub_8080B60(void) void sub_8080B78(void) { - sub_8053E90(); + Overworld_PlaySpecialMapMusic(); pal_fill_for_map_transition(); PlaySE(SE_TK_WARPOUT); CreateTask(task_map_chg_seq_0807E2CC, 10); @@ -354,7 +354,7 @@ void sub_8080E28(void) void sub_8080E44(void) { ScriptContext2_Enable(); - sub_8053E90(); + Overworld_PlaySpecialMapMusic(); pal_fill_black(); CreateTask(task_mpl_807E3C8, 10); } diff --git a/src/field_ground_effect.c b/src/field/field_ground_effect.c index 5af8ea3e3..5af8ea3e3 100644 --- a/src/field_ground_effect.c +++ b/src/field/field_ground_effect.c diff --git a/src/field_map_obj.c b/src/field/field_map_obj.c index 59319a16e..0cba448a9 100644 --- a/src/field_map_obj.c +++ b/src/field/field_map_obj.c @@ -2462,24 +2462,24 @@ extern void sub_8064970(struct Sprite *); extern void sub_8060470(s16 *, s16 *, s16, s16); extern void InitObjectPriorityByZCoord(); -u8 sub_805B410(u8 a, u8 b, s16 c, s16 d, u8 e, u8 f) +u8 sub_805B410(u8 graphicsId, u8 b, s16 x, s16 y, u8 elevation, u8 direction) { const struct MapObjectGraphicsInfo *gfxInfo; struct SpriteTemplate spriteTemplate; const struct SubspriteTable *subspriteTables; u8 spriteId; - gfxInfo = GetFieldObjectGraphicsInfo(a); - MakeObjectTemplateFromFieldObjectGraphicsInfo(a, sub_8064970, &spriteTemplate, &subspriteTables); + gfxInfo = GetFieldObjectGraphicsInfo(graphicsId); + MakeObjectTemplateFromFieldObjectGraphicsInfo(graphicsId, sub_8064970, &spriteTemplate, &subspriteTables); #ifdef NONMATCHING spriteTemplate.paletteTag = 0xFFFF; #else *(u16 *)&spriteTemplate.paletteTag = 0xFFFF; #endif - c += 7; - d += 7; - sub_8060470(&c, &d, 8, 16); - spriteId = CreateSpriteAtEnd(&spriteTemplate, c, d, 0); + x += 7; + y += 7; + sub_8060470(&x, &y, 8, 16); + spriteId = CreateSpriteAtEnd(&spriteTemplate, x, y, 0); if (spriteId != 64) { struct Sprite *sprite = &gSprites[spriteId]; @@ -2490,7 +2490,7 @@ u8 sub_805B410(u8 a, u8 b, s16 c, s16 d, u8 e, u8 f) sprite->oam.paletteNum = gfxInfo->paletteSlot; sprite->coordOffsetEnabled = TRUE; sprite->data0 = b; - sprite->data1 = e; + sprite->data1 = elevation; if (gfxInfo->paletteSlot == 10) npc_load_two_palettes__and_record(gfxInfo->paletteTag1, gfxInfo->paletteSlot); if (subspriteTables != NULL) @@ -2498,9 +2498,9 @@ u8 sub_805B410(u8 a, u8 b, s16 c, s16 d, u8 e, u8 f) SetSubspriteTables(sprite, subspriteTables); sprite->subspriteMode = 2; } - InitObjectPriorityByZCoord(sprite, e); - SetObjectSubpriorityByZCoord(e, sprite, 1); - StartSpriteAnim(sprite, FieldObjectDirectionToImageAnimId(f)); + InitObjectPriorityByZCoord(sprite, elevation); + SetObjectSubpriorityByZCoord(elevation, sprite, 1); + StartSpriteAnim(sprite, FieldObjectDirectionToImageAnimId(direction)); } return spriteId; } diff --git a/src/field_map_obj_helpers.c b/src/field/field_map_obj_helpers.c index b453d3794..b453d3794 100644 --- a/src/field_map_obj_helpers.c +++ b/src/field/field_map_obj_helpers.c diff --git a/src/field_message_box.c b/src/field/field_message_box.c index 35aac7ac9..35aac7ac9 100644 --- a/src/field_message_box.c +++ b/src/field/field_message_box.c diff --git a/src/field_player_avatar.c b/src/field/field_player_avatar.c index e7947b704..6c1c9123a 100644 --- a/src/field_player_avatar.c +++ b/src/field/field_player_avatar.c @@ -1365,8 +1365,8 @@ void sub_805A20C(u8 a) u8 taskId; ScriptContext2_Enable(); - sav1_reset_battle_music_maybe(); - sub_8053F84(); + Overworld_ClearSavedMusic(); + Overworld_ChangeMusicToDefault(); gPlayerAvatar.flags &= ~PLAYER_AVATAR_FLAG_SURFING; gPlayerAvatar.flags |= PLAYER_AVATAR_FLAG_ON_FOOT; gPlayerAvatar.unk6 = 1; diff --git a/src/field_poison.c b/src/field/field_poison.c index 1244b9c62..1244b9c62 100644 --- a/src/field_poison.c +++ b/src/field/field_poison.c diff --git a/src/field_region_map.c b/src/field/field_region_map.c index 7cb22e5df..7cb22e5df 100644 --- a/src/field_region_map.c +++ b/src/field/field_region_map.c diff --git a/src/field_screen_effect.c b/src/field/field_screen_effect.c index 1464a99b1..0c76d254d 100644 --- a/src/field_screen_effect.c +++ b/src/field/field_screen_effect.c @@ -327,7 +327,7 @@ static void task50_0807F0C8(u8); void sub_8081924(void) { - sub_8054044(); + Overworld_FadeOutMapMusic(); CreateTask(task50_0807F0C8, 80); } diff --git a/src/field_special_scene.c b/src/field/field_special_scene.c index 38c076c51..d4b59c8a2 100644 --- a/src/field_special_scene.c +++ b/src/field/field_special_scene.c @@ -250,7 +250,7 @@ bool8 sub_80C7754(void) } else { - warp1_set(mapGroup, mapNum, -1, x, y); + Overworld_SetWarpDestination(mapGroup, mapNum, -1, x, y); return TRUE; } } diff --git a/src/field_specials.c b/src/field/field_specials.c index c23ea2ddc..36362d098 100644 --- a/src/field_specials.c +++ b/src/field/field_specials.c @@ -213,7 +213,7 @@ void UpdateCyclingRoadState(void) { if (VarGet(0x40a9) == 2 || VarGet(0x40a9) == 3) { VarSet(0x40a9, 0); - sav1_set_battle_music_maybe(SE_STOP); + Overworld_SetSavedMusic(SE_STOP); } } @@ -700,11 +700,11 @@ void CableCarWarp(void) { if (gSpecialVar_0x8004 != 0) { - warp1_set(MAP_GROUP_ROUTE112_CABLE_CAR_STATION, MAP_ID_ROUTE112_CABLE_CAR_STATION, -1, 6, 4); + Overworld_SetWarpDestination(MAP_GROUP_ROUTE112_CABLE_CAR_STATION, MAP_ID_ROUTE112_CABLE_CAR_STATION, -1, 6, 4); } else { - warp1_set(MAP_GROUP_MT_CHIMNEY_CABLE_CAR_STATION, MAP_ID_MT_CHIMNEY_CABLE_CAR_STATION, -1, 6, 4); + Overworld_SetWarpDestination(MAP_GROUP_MT_CHIMNEY_CABLE_CAR_STATION, MAP_ID_MT_CHIMNEY_CABLE_CAR_STATION, -1, 6, 4); } } diff --git a/src/field_tasks.c b/src/field/field_tasks.c index da6f162c2..da6f162c2 100644 --- a/src/field_tasks.c +++ b/src/field/field_tasks.c diff --git a/src/field_weather.c b/src/field/field_weather.c index 443a38357..443a38357 100644 --- a/src/field_weather.c +++ b/src/field/field_weather.c diff --git a/src/fieldmap.c b/src/field/fieldmap.c index 7a31ae720..7a31ae720 100644 --- a/src/fieldmap.c +++ b/src/field/fieldmap.c diff --git a/src/fldeff_cut.c b/src/field/fldeff_cut.c index 00643a979..00643a979 100644 --- a/src/fldeff_cut.c +++ b/src/field/fldeff_cut.c diff --git a/src/fldeff_flash.c b/src/field/fldeff_flash.c index 1ee8a8f05..1ee8a8f05 100644 --- a/src/fldeff_flash.c +++ b/src/field/fldeff_flash.c diff --git a/src/fldeff_softboiled.c b/src/field/fldeff_softboiled.c index cb26d9966..cb26d9966 100644 --- a/src/fldeff_softboiled.c +++ b/src/field/fldeff_softboiled.c diff --git a/src/fldeff_strength.c b/src/field/fldeff_strength.c index d9603d094..d9603d094 100644 --- a/src/fldeff_strength.c +++ b/src/field/fldeff_strength.c diff --git a/src/fldeff_sweetscent.c b/src/field/fldeff_sweetscent.c index b9dbf619d..b9dbf619d 100644 --- a/src/fldeff_sweetscent.c +++ b/src/field/fldeff_sweetscent.c diff --git a/src/fldeff_teleport.c b/src/field/fldeff_teleport.c index af48fb414..af48fb414 100644 --- a/src/fldeff_teleport.c +++ b/src/field/fldeff_teleport.c diff --git a/src/heal_location.c b/src/field/heal_location.c index 42bc18567..42bc18567 100644 --- a/src/heal_location.c +++ b/src/field/heal_location.c diff --git a/src/hof_pc.c b/src/field/hof_pc.c index aeeb7fe17..267ed4274 100644 --- a/src/hof_pc.c +++ b/src/field/hof_pc.c @@ -28,7 +28,7 @@ void ReturnFromHallOfFamePC(void) static void ReshowPCMenuAfterHallOfFamePC(void) { ScriptContext2_Enable(); - sub_8053E90(); + Overworld_PlaySpecialMapMusic(); BeginNormalPaletteFade(0xFFFFFFFF, 0, 0x10, 0, 0); ScrSpecial_CreatePCMenu(); ScriptMenu_DisplayPCStartupPrompt(); diff --git a/src/item.c b/src/field/item.c index 36871285a..fd49f5c39 100644 --- a/src/item.c +++ b/src/field/item.c @@ -30,11 +30,11 @@ enum }; #if ENGLISH -#include "data/item_descriptions_en.h" -#include "data/items_en.h" +#include "../data/item_descriptions_en.h" +#include "../data/items_en.h" #elif GERMAN -#include "data/item_descriptions_de.h" -#include "data/items_de.h" +#include "../data/item_descriptions_de.h" +#include "../data/items_de.h" #endif static void CompactPCItems(void); diff --git a/src/item_menu.c b/src/field/item_menu.c index 891eb135f..c508bcacf 100644 --- a/src/item_menu.c +++ b/src/field/item_menu.c @@ -152,7 +152,7 @@ static u8 sReturnLocation; static const u8 *sPopupMenuActionList; // common -void (*gUnknown_03005D00)(u8) = NULL; +void (*gFieldItemUseCallback)(u8) = NULL; extern u16 gUnknown_030041B4; extern struct PocketScrollState gBagPocketScrollStates[]; extern struct ItemSlot *gCurrentBagPocketItemSlots; // selected pocket item slots @@ -2718,7 +2718,7 @@ void ExecuteItemUseFromBlackPalette(void) static void Task_CallItemUseOnFieldCallback(u8 taskId) { if (sub_807D770() == TRUE) - gUnknown_03005D00(taskId); + gFieldItemUseCallback(taskId); } void sub_80A5D04(void) @@ -4492,7 +4492,7 @@ static void LoadBerryPic(u8 berryId) spritePal.data = (u16 *)sBerryGraphicsTable[berryId].lzPalette; spritePal.tag = 0x7544; LoadCompressedObjectPalette((struct CompressedSpritePalette *)&spritePal); - sub_800D238(sBerryGraphicsTable[berryId].lzPic, ewramBerryPicTemp); + LZDecompressWram(sBerryGraphicsTable[berryId].lzPic, ewramBerryPicTemp); DrawBerryPic(ewramBerryPicTemp, ewramBerryPic); } } diff --git a/src/item_use.c b/src/field/item_use.c index 8bc83bdc6..68da27fdb 100644 --- a/src/item_use.c +++ b/src/field/item_use.c @@ -36,7 +36,7 @@ #include "task.h" #include "vars.h" -extern void (*gUnknown_03005D00)(u8); +extern void (*gFieldItemUseCallback)(u8); extern void (*gFieldCallback)(void); extern void (*gUnknown_0300485C)(void); extern void (*gUnknown_03004AE4)(u8, u16, TaskFunc); @@ -106,11 +106,13 @@ void SetUpItemUseOnFieldCallback(u8 taskId) { if (gTasks[taskId].data[2] != 1) { - gFieldCallback = (void *)ExecuteItemUseFromBlackPalette; + gFieldCallback = ExecuteItemUseFromBlackPalette; ItemMenu_ConfirmNormalFade(taskId); } else - gUnknown_03005D00(taskId); + { + gFieldItemUseCallback(taskId); + } } void HandleDeniedItemUseMessage(u8 var1, u8 playerMenuStatus, const u8 *text) @@ -185,9 +187,9 @@ void ItemUseOutOfBattle_Bike(u8 taskId) } else { - if (Overworld_IsBikeAllowedOnCurrentMap() == TRUE && IsBikingDisallowedByPlayer() == FALSE) + if (Overworld_IsBikingAllowed() == TRUE && IsBikingDisallowedByPlayer() == FALSE) { - gUnknown_03005D00 = (void *)ItemUseOnFieldCB_Bike; + gFieldItemUseCallback = (void *)ItemUseOnFieldCB_Bike; SetUpItemUseOnFieldCallback(taskId); } else @@ -241,7 +243,7 @@ void ItemUseOutOfBattle_Rod(u8 taskId) { if (CanFish() == TRUE) { - gUnknown_03005D00 = (void *)ItemUseOnFieldCB_Rod; + gFieldItemUseCallback = (void *)ItemUseOnFieldCB_Rod; SetUpItemUseOnFieldCallback(taskId); } else @@ -257,7 +259,7 @@ void ItemUseOnFieldCB_Rod(u8 taskId) void ItemUseOutOfBattle_Itemfinder(u8 var) { IncrementGameStat(0x27); - gUnknown_03005D00 = (void *)ItemUseOnFieldCB_Itemfinder; + gFieldItemUseCallback = (void *)ItemUseOnFieldCB_Itemfinder; SetUpItemUseOnFieldCallback(var); } @@ -780,7 +782,7 @@ void sub_80C9C7C(u8 taskId) { if (IsPlayerFacingPlantedBerryTree() == TRUE) { - gUnknown_03005D00 = sub_80C9D00; + gFieldItemUseCallback = sub_80C9D00; gFieldCallback = ExecuteItemUseFromBlackPalette; gTasks[taskId].data[8] = (u32)c2_exit_to_overworld_2_switch >> 16; gTasks[taskId].data[9] = (u32)c2_exit_to_overworld_2_switch; @@ -805,7 +807,7 @@ void ItemUseOutOfBattle_WailmerPail(u8 taskId) { if (TryToWaterBerryTree() == TRUE) { - gUnknown_03005D00 = sub_80C9D74; + gFieldItemUseCallback = sub_80C9D74; SetUpItemUseOnFieldCallback(taskId); } else @@ -909,7 +911,7 @@ void sub_80C9FC0(u8 var) sub_80C9D98(var); } -void sub_80C9FDC(void) +static void PrepareItemUseMessage(void) { RemoveBagItem(gScriptItemId, 1); sub_80A3E0C(); @@ -922,7 +924,7 @@ void ItemUseOutOfBattle_Repel(u8 var) if (VarGet(VAR_REPEL_STEP_COUNT) == FALSE) { VarSet(VAR_REPEL_STEP_COUNT, ItemId_GetHoldEffectParam(gScriptItemId)); - sub_80C9FDC(); + PrepareItemUseMessage(); DisplayItemMessageOnField(var, gStringVar4, CleanUpItemMenuMessage, 1); } else @@ -975,10 +977,10 @@ void task08_080A1C44(u8 taskId) DestroyTask(taskId); } -void sub_80CA18C(u8 taskId) +void EscapeRopeCallback(u8 taskId) { - sub_8053014(); - sub_80C9FDC(); + Overworld_ResetStateAfterDigEscRope(); + PrepareItemUseMessage(); gTasks[taskId].data[0] = 0; DisplayItemMessageOnField(taskId, gStringVar4, task08_080A1C44, 0); } @@ -995,7 +997,7 @@ void ItemUseOutOfBattle_EscapeRope(u8 taskId) { if (CanUseEscapeRopeOnCurrMap() == TRUE) { - gUnknown_03005D00 = sub_80CA18C; + gFieldItemUseCallback = EscapeRopeCallback; SetUpItemUseOnFieldCallback(taskId); } else @@ -1114,7 +1116,7 @@ void ItemUseInBattle_Escape(u8 taskId) if((gBattleTypeFlags & BATTLE_TYPE_TRAINER) == FALSE) { - sub_80C9FDC(); + PrepareItemUseMessage(); DisplayItemMessageOnField(taskId, gStringVar4, sub_80A7094, 1); } else diff --git a/src/landmark.c b/src/field/landmark.c index 6a53716bb..6a53716bb 100644 --- a/src/landmark.c +++ b/src/field/landmark.c diff --git a/src/lottery_corner.c b/src/field/lottery_corner.c index c2c25b9ac..c2c25b9ac 100644 --- a/src/lottery_corner.c +++ b/src/field/lottery_corner.c diff --git a/src/map_name_popup.c b/src/field/map_name_popup.c index 01105d0db..01105d0db 100644 --- a/src/map_name_popup.c +++ b/src/field/map_name_popup.c diff --git a/src/map_obj_lock.c b/src/field/map_obj_lock.c index 2856320b8..2856320b8 100644 --- a/src/map_obj_lock.c +++ b/src/field/map_obj_lock.c diff --git a/src/mauville_man.c b/src/field/mauville_man.c index 33bc39648..33bc39648 100644 --- a/src/mauville_man.c +++ b/src/field/mauville_man.c diff --git a/src/menu_helpers.c b/src/field/menu_helpers.c index 14e823355..14e823355 100644 --- a/src/menu_helpers.c +++ b/src/field/menu_helpers.c diff --git a/src/metatile_behavior.c b/src/field/metatile_behavior.c index d05ba0b89..d05ba0b89 100644 --- a/src/metatile_behavior.c +++ b/src/field/metatile_behavior.c diff --git a/src/money.c b/src/field/money.c index 5d0f0ae8d..5d0f0ae8d 100644 --- a/src/money.c +++ b/src/field/money.c diff --git a/src/overworld.c b/src/field/overworld.c index 9b41a262d..d6f255409 100644 --- a/src/overworld.c +++ b/src/field/overworld.c @@ -91,7 +91,7 @@ extern struct MapHeader * const * const gMapGroups[]; extern s32 gMaxFlashLevel; EWRAM_DATA struct WarpData gUnknown_020297F0 = {0}; -EWRAM_DATA struct WarpData gUnknown_020297F8 = {0}; +EWRAM_DATA struct WarpData gWarpDestination = {0}; // new warp position EWRAM_DATA struct WarpData gUnknown_02029800 = {0}; EWRAM_DATA struct WarpData gUnknown_02029808 = {0}; EWRAM_DATA struct UnkPlayerStruct gUnknown_02029810 = {0}; @@ -195,12 +195,12 @@ static void DoWhiteOut(void) ScriptContext2_RunNewScript(S_WhiteOut); gSaveBlock1.money /= 2; ScrSpecial_HealPlayerParty(); - sub_8053050(); - sub_8053570(); + Overworld_ResetStateAfterWhiteOut(); + Overworld_SetWarpDestToLastHealLoc(); warp_in(); } -void flag_var_implications_of_teleport_(void) +void Overworld_ResetStateAfterFly(void) { player_avatar_init_params_reset(); FlagClear(SYS_CYCLING_ROAD); @@ -221,7 +221,7 @@ void Overworld_ResetStateAfterTeleport(void) ScriptContext2_RunNewScript(gUnknown_0819FC9F); } -void sub_8053014(void) +void Overworld_ResetStateAfterDigEscRope(void) { player_avatar_init_params_reset(); FlagClear(SYS_CYCLING_ROAD); @@ -231,7 +231,7 @@ void sub_8053014(void) FlagClear(SYS_USE_FLASH); } -void sub_8053050(void) +void Overworld_ResetStateAfterWhiteOut(void) { player_avatar_init_params_reset(); FlagClear(SYS_CYCLING_ROAD); @@ -283,9 +283,12 @@ void SetGameStat(u8 index, u32 value) gSaveBlock1.gameStats[index] = value; } -void sub_8053154(void) +void LoadMapObjTemplatesFromHeader(void) { + // Clear map object templates CpuFill32(0, gSaveBlock1.mapObjectTemplates, sizeof(gSaveBlock1.mapObjectTemplates)); + + // Copy map header events to save block CpuCopy32(gMapHeader.events->mapObjects, gSaveBlock1.mapObjectTemplates, gMapHeader.events->mapObjectCount * sizeof(struct MapObjectTemplate)); @@ -300,7 +303,7 @@ static void LoadSaveblockMapObjScripts(void) mapObjectTemplates[i].script = gMapHeader.events->mapObjects[i].script; } -void Overworld_SaveMapObjCoords(u8 localId, s16 x, s16 y) +void Overworld_SetMapObjTemplateCoords(u8 localId, s16 x, s16 y) { s32 i; for (i = 0; i < 64; i++) @@ -315,9 +318,10 @@ void Overworld_SaveMapObjCoords(u8 localId, s16 x, s16 y) } } -void Overworld_SaveMapObjMovementType(u8 localId, u8 movementType) +void Overworld_SetMapObjTemplateMovementType(u8 localId, u8 movementType) { s32 i; + for (i = 0; i < 64; i++) { struct MapObjectTemplate *mapObjectTemplate = &gSaveBlock1.mapObjectTemplates[i]; @@ -346,15 +350,15 @@ static struct MapData *get_mapdata_header(void) return NULL; } -static void warp_shift(void) +static void ApplyCurrentWarp(void) { gUnknown_020297F0 = gSaveBlock1.location; - gSaveBlock1.location = gUnknown_020297F8; + gSaveBlock1.location = gWarpDestination; gUnknown_02029800 = sDummyWarpData; gUnknown_02029808 = sDummyWarpData; } -static void warp_set(struct WarpData *warp, s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y) +static void SetWarpData(struct WarpData *warp, s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y) { warp->mapGroup = mapGroup; warp->mapNum = mapNum; @@ -385,7 +389,7 @@ struct MapHeader *const Overworld_GetMapHeaderByGroupAndId(u16 mapGroup, u16 map struct MapHeader *const warp1_get_mapheader(void) { - return Overworld_GetMapHeaderByGroupAndId(gUnknown_020297F8.mapGroup, gUnknown_020297F8.mapNum); + return Overworld_GetMapHeaderByGroupAndId(gWarpDestination.mapGroup, gWarpDestination.mapNum); } static void set_current_map_header_from_sav1_save_old_name(void) @@ -422,34 +426,34 @@ void sub_80533CC(void) void warp_in(void) { - warp_shift(); + ApplyCurrentWarp(); set_current_map_header_from_sav1_save_old_name(); sub_80533CC(); } -void warp1_set(s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y) +void Overworld_SetWarpDestination(s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y) { - warp_set(&gUnknown_020297F8, mapGroup, mapNum, warpId, x, y); + SetWarpData(&gWarpDestination, mapGroup, mapNum, warpId, x, y); } void warp1_set_2(s8 mapGroup, s8 mapNum, s8 warpId) { - warp1_set(mapGroup, mapNum, warpId, -1, -1); + Overworld_SetWarpDestination(mapGroup, mapNum, warpId, -1, -1); } void saved_warp2_set(int unused, s8 mapGroup, s8 mapNum, s8 warpId) { - warp_set(&gSaveBlock1.warp2, mapGroup, mapNum, warpId, gSaveBlock1.pos.x, gSaveBlock1.pos.y); + SetWarpData(&gSaveBlock1.warp2, mapGroup, mapNum, warpId, gSaveBlock1.pos.x, gSaveBlock1.pos.y); } void saved_warp2_set_2(int unused, s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y) { - warp_set(&gSaveBlock1.warp2, mapGroup, mapNum, warpId, x, y); + SetWarpData(&gSaveBlock1.warp2, mapGroup, mapNum, warpId, x, y); } void copy_saved_warp2_bank_and_enter_x_to_warp1(u8 unused) { - gUnknown_020297F8 = gSaveBlock1.warp2; + gWarpDestination = gSaveBlock1.warp2; } void sub_8053538(u8 a1) @@ -457,81 +461,82 @@ void sub_8053538(u8 a1) const struct HealLocation *warp = GetHealLocation(a1); if (warp) - warp1_set(warp->group, warp->map, -1, warp->x, warp->y); + Overworld_SetWarpDestination(warp->group, warp->map, -1, warp->x, warp->y); } -void sub_8053570(void) +void Overworld_SetWarpDestToLastHealLoc(void) { - gUnknown_020297F8 = gSaveBlock1.warp3; + gWarpDestination = gSaveBlock1.lastHealLocation; } -void sub_8053588(u8 a1) +void Overworld_SetHealLocationWarp(u8 healLocationId) { - const struct HealLocation *warp = GetHealLocation(a1); - if (warp) - warp_set(&gSaveBlock1.warp3, warp->group, warp->map, -1, warp->x, warp->y); + const struct HealLocation *healLocation = GetHealLocation(healLocationId); + + if (healLocation != NULL) + SetWarpData(&gSaveBlock1.lastHealLocation, healLocation->group, healLocation->map, -1, healLocation->x, healLocation->y); } void sub_80535C4(s16 a1, s16 a2) { - u8 v4 = Overworld_GetMapTypeOfSaveblockLocation(); - u8 v5 = GetMapTypeByGroupAndId(gUnknown_020297F8.mapGroup, gUnknown_020297F8.mapNum); - if (is_map_type_1_2_3_5_or_6(v4) && is_map_type_1_2_3_5_or_6(v5) != TRUE) + u8 currMapType = Overworld_GetMapTypeOfSaveblockLocation(); + u8 destMapType = GetMapTypeByGroupAndId(gWarpDestination.mapGroup, gWarpDestination.mapNum); + if (is_map_type_1_2_3_5_or_6(currMapType) && is_map_type_1_2_3_5_or_6(destMapType) != TRUE) sub_805363C(gSaveBlock1.location.mapGroup, gSaveBlock1.location.mapNum, -1, a1 - 7, a2 - 6); } void sub_805363C(s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y) { - warp_set(&gSaveBlock1.warp4, mapGroup, mapNum, warpId, x, y); + SetWarpData(&gSaveBlock1.warp4, mapGroup, mapNum, warpId, x, y); } void sub_8053678(void) { - gUnknown_020297F8 = gSaveBlock1.warp4; + gWarpDestination = gSaveBlock1.warp4; } void sub_8053690(s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y) { - warp_set(&gUnknown_02029800, mapGroup, mapNum, warpId, x, y); + SetWarpData(&gUnknown_02029800, mapGroup, mapNum, warpId, x, y); } -void warp1_set_to_warp2(void) +static void warp1_set_to_warp2(void) { - gUnknown_020297F8 = gUnknown_02029800; + gWarpDestination = gUnknown_02029800; } void sub_80536E4(s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y) { - warp_set(&gUnknown_02029808, mapGroup, mapNum, warpId, x, y); + SetWarpData(&gUnknown_02029808, mapGroup, mapNum, warpId, x, y); } void sub_8053720(s16 x, s16 y) { if (warp_data_is_not_neg_1(&gUnknown_02029808) == TRUE) { - gUnknown_020297F8 = gUnknown_020297F0; + gWarpDestination = gUnknown_020297F0; } else { - warp1_set(gUnknown_02029808.mapGroup, gUnknown_02029808.mapNum, -1, x, y); + Overworld_SetWarpDestination(gUnknown_02029808.mapGroup, gUnknown_02029808.mapNum, -1, x, y); } } void sub_8053778(void) { - gUnknown_020297F8 = gSaveBlock1.warp1; + gWarpDestination = gSaveBlock1.warp1; } void unref_sub_8053790(s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y) { - warp_set(&gSaveBlock1.warp1, mapGroup, mapNum, warpId, x, y); + SetWarpData(&gSaveBlock1.warp1, mapGroup, mapNum, warpId, x, y); } void sub_80537CC(u8 a1) { const struct HealLocation *warp = GetHealLocation(a1); if (warp) - warp_set(&gSaveBlock1.warp1, warp->group, warp->map, -1, warp->x, warp->y); + SetWarpData(&gSaveBlock1.warp1, warp->group, warp->map, -1, warp->x, warp->y); } void gpu_sync_bg_hide() @@ -539,7 +544,7 @@ void gpu_sync_bg_hide() gSaveBlock1.warp1 = gSaveBlock1.warp2; } -struct MapConnection *sub_8053818(u8 dir) +struct MapConnection *GetMapConnection(u8 dir) { s32 i; s32 count = gMapHeader.connections->count; @@ -557,10 +562,11 @@ struct MapConnection *sub_8053818(u8 dir) bool8 sub_8053850(u8 dir, u16 x, u16 y) { - struct MapConnection *connection = sub_8053818(dir); + struct MapConnection *connection = GetMapConnection(dir); + if (connection != NULL) { - warp1_set(connection->mapGroup, connection->mapNum, -1, x, y); + Overworld_SetWarpDestination(connection->mapGroup, connection->mapNum, -1, x, y); } else { @@ -586,11 +592,11 @@ void sub_80538F0(u8 mapGroup, u8 mapNum) { s32 i; - warp1_set(mapGroup, mapNum, -1, -1, -1); + Overworld_SetWarpDestination(mapGroup, mapNum, -1, -1, -1); sub_8053F0C(); - warp_shift(); + ApplyCurrentWarp(); set_current_map_header_from_sav1_save_old_name(); - sub_8053154(); + LoadMapObjTemplatesFromHeader(); ClearTempFieldEventData(); ResetCyclingRoadChallengeData(); prev_quest_postbuffer_cursor_backup_reset(); @@ -599,7 +605,7 @@ void sub_80538F0(u8 mapGroup, u8 mapNum) sub_80806E4(); ChooseAmbientCrySpecies(); SetDefaultFlashLevel(); - sav1_reset_battle_music_maybe(); + Overworld_ClearSavedMusic(); mapheader_run_script_with_tag_x3(); not_trainer_hill_battle_pyramid(); sub_8056D38(gMapHeader.mapData); @@ -623,7 +629,7 @@ void sub_8053994(u32 a1) bool8 v3; set_current_map_header_from_sav1_save_old_name(); - sub_8053154(); + LoadMapObjTemplatesFromHeader(); v2 = is_map_type_1_2_3_5_or_6(gMapHeader.mapType); v3 = Overworld_MapTypeIsIndoors(gMapHeader.mapType); ClearTempFieldEventData(); @@ -637,7 +643,7 @@ void sub_8053994(u32 a1) if (v2) FlagClear(SYS_USE_FLASH); SetDefaultFlashLevel(); - sav1_reset_battle_music_maybe(); + Overworld_ClearSavedMusic(); mapheader_run_script_with_tag_x3(); UpdateLocationHistoryForRoamer(); RoamerMoveToOtherLocationSet(); @@ -691,7 +697,7 @@ u8 sub_8053B00(struct UnkPlayerStruct *playerStruct, u16 a2, u8 a3) return 16; if (MetatileBehavior_IsSurfableWaterOrUnderwater(a2) == 1) return 8; - if (Overworld_IsBikeAllowedOnCurrentMap() != TRUE) + if (Overworld_IsBikingAllowed() != TRUE) return 1; if (playerStruct->player_field_0 == 2) return 2; @@ -729,7 +735,7 @@ u16 cur_mapdata_block_role_at_screen_center_acc_to_sav1(void) return MapGridGetMetatileBehaviorAt(gSaveBlock1.pos.x + 7, gSaveBlock1.pos.y + 7); } -bool32 Overworld_IsBikeAllowedOnCurrentMap(void) +bool32 Overworld_IsBikingAllowed(void) { // is player in cycling road entrance? if (gSaveBlock1.location.mapGroup == MAP_GROUP_ROUTE110_SEASIDE_CYCLING_ROAD_SOUTH_ENTRANCE @@ -830,10 +836,11 @@ static u16 GetLocationMusic(struct WarpData *warp) return Overworld_GetMapHeaderByGroupAndId(warp->mapGroup, warp->mapNum)->music; } -u16 sav1_map_get_music(void) +u16 GetCurrLocationDefaultMusic(void) { u16 music; + // Play the desert music only when the sandstorm is active on Route 111. if (gSaveBlock1.location.mapGroup == MAP_GROUP_ROUTE111 && gSaveBlock1.location.mapNum == MAP_ID_ROUTE111 && GetSav1Weather() == 8) @@ -853,9 +860,9 @@ u16 sav1_map_get_music(void) } } -u16 warp1_target_get_music(void) +u16 GetWarpDestinationMusic(void) { - u16 music = GetLocationMusic(&gUnknown_020297F8); + u16 music = GetLocationMusic(&gWarpDestination); if (music != 0x7FFF) { return music; @@ -870,19 +877,19 @@ u16 warp1_target_get_music(void) } } -void call_map_music_set_to_zero(void) +void Overworld_ResetMapMusic(void) { ResetMapMusic(); } -void sub_8053E90(void) +void Overworld_PlaySpecialMapMusic(void) { - u16 music = sav1_map_get_music(); + u16 music = GetCurrLocationDefaultMusic(); if (music != LEGENDARY_MUSIC) { - if (gSaveBlock1.battleMusic) - music = gSaveBlock1.battleMusic; + if (gSaveBlock1.savedMusic) + music = gSaveBlock1.savedMusic; else if (Overworld_GetMapTypeOfSaveblockLocation() == MAP_TYPE_UNDERWATER) music = BGM_DEEPDEEP; else if (TestPlayerAvatarFlags(PLAYER_AVATAR_FLAG_SURFING)) @@ -893,21 +900,21 @@ void sub_8053E90(void) PlayNewMapMusic(music); } -void sav1_set_battle_music_maybe(u16 songNum) +void Overworld_SetSavedMusic(u16 songNum) { - gSaveBlock1.battleMusic = songNum; + gSaveBlock1.savedMusic = songNum; } -void sav1_reset_battle_music_maybe(void) +void Overworld_ClearSavedMusic(void) { - gSaveBlock1.battleMusic = 0; + gSaveBlock1.savedMusic = 0; } void sub_8053F0C(void) { if (FlagGet(SPECIAL_FLAG_1) != TRUE) { - u16 newMusic = warp1_target_get_music(); + u16 newMusic = GetWarpDestinationMusic(); u16 currentMusic = GetCurrentMapMusic(); if (newMusic != LEGENDARY_MUSIC) { @@ -926,11 +933,11 @@ void sub_8053F0C(void) } } -void sub_8053F84(void) +void Overworld_ChangeMusicToDefault(void) { u16 currentMusic = GetCurrentMapMusic(); - if (currentMusic != sav1_map_get_music()) - FadeOutAndPlayNewMapMusic(sav1_map_get_music(), 8); + if (currentMusic != GetCurrLocationDefaultMusic()) + FadeOutAndPlayNewMapMusic(GetCurrLocationDefaultMusic(), 8); } void Overworld_ChangeMusicTo(u16 newMusic) @@ -951,7 +958,7 @@ u8 GetMapMusicFadeoutSpeed(void) void sub_8053FF8(void) { - u16 music = warp1_target_get_music(); + u16 music = GetWarpDestinationMusic(); if (FlagGet(SPECIAL_FLAG_1) != TRUE && music != GetCurrentMapMusic()) { u8 speed = GetMapMusicFadeoutSpeed(); @@ -964,7 +971,7 @@ bool8 sub_8054034(void) return IsNotWaitingForBGMStop(); } -void sub_8054044(void) +void Overworld_FadeOutMapMusic(void) { FadeOutMapMusic(4); } @@ -972,14 +979,16 @@ void sub_8054044(void) static void PlayAmbientCry(void) { s16 x, y; + s8 pan; + s8 volume; + PlayerGetDestCoords(&x, &y); - if (sIsAmbientCryWaterMon != TRUE - || MetatileBehavior_IsSurfableWaterOrUnderwater(MapGridGetMetatileBehaviorAt(x, y))) - { - s8 pan = (Random() % 88) + 212; - s8 volume = (Random() % 30) + 50; - PlayCry2(sAmbientCrySpecies, pan, volume, 1); - } + if (sIsAmbientCryWaterMon == TRUE + && !MetatileBehavior_IsSurfableWaterOrUnderwater(MapGridGetMetatileBehaviorAt(x, y))) + return; + pan = (Random() % 88) + 212; + volume = (Random() % 30) + 50; + PlayCry2(sAmbientCrySpecies, pan, volume, 1); } void UpdateAmbientCry(s16 *state, u16 *delayCounter) @@ -1149,6 +1158,7 @@ void OverworldBasic(void) sub_8072EDC(); } +// This CB2 is used when starting void CB2_OverworldBasic(void) { OverworldBasic(); @@ -1176,7 +1186,7 @@ void sub_80543DC(u16 (*a1)(u32)) void sub_80543E8(void) { - if (gFieldCallback) + if (gFieldCallback != NULL) gFieldCallback(); else mapldr_default(); @@ -1977,27 +1987,27 @@ void sub_8055280(u16 a1) u16 sub_80552B0(u32 a1) { - if (gMain.heldKeys & 0x40) + if (gMain.heldKeys & DPAD_UP) { return 19; } - else if (gMain.heldKeys & 0x80) + else if (gMain.heldKeys & DPAD_DOWN) { return 18; } - else if (gMain.heldKeys & 0x20) + else if (gMain.heldKeys & DPAD_LEFT) { return 20; } - else if (gMain.heldKeys & 0x10) + else if (gMain.heldKeys & DPAD_RIGHT) { return 21; } - else if (gMain.newKeys & 8) + else if (gMain.newKeys & START_BUTTON) { return 24; } - else if (gMain.newKeys & 1) + else if (gMain.newKeys & A_BUTTON) { return 25; } diff --git a/src/party_menu.c b/src/field/party_menu.c index 39477e293..39477e293 100644 --- a/src/party_menu.c +++ b/src/field/party_menu.c diff --git a/src/player_pc.c b/src/field/player_pc.c index 83e6dd221..83e6dd221 100644 --- a/src/player_pc.c +++ b/src/field/player_pc.c diff --git a/src/pokeblock.c b/src/field/pokeblock.c index 593d7344b..34f4ffa35 100644 --- a/src/pokeblock.c +++ b/src/field/pokeblock.c @@ -378,7 +378,7 @@ static bool8 sub_810B998(void) ewram[0x1ffff]++; break; case 1: - sub_800D238(gMenuPokeblock_Tilemap, gBGTilemapBuffers[2]); + LZDecompressWram(gMenuPokeblock_Tilemap, gBGTilemapBuffers[2]); ewram[0x1ffff]++; break; case 2: diff --git a/src/pokenav.c b/src/field/pokenav.c index 21d7bb4e3..21d7bb4e3 100644 --- a/src/pokenav.c +++ b/src/field/pokenav.c diff --git a/src/region_map.c b/src/field/region_map.c index 900c9ad71..bfd2729c2 100644 --- a/src/region_map.c +++ b/src/field/region_map.c @@ -140,12 +140,12 @@ static const u16 sRegionMapBkgnd_Pal[] = INCBIN_U16("graphics/pokenav/region_map static const u8 sRegionMapBkgnd_ImageLZ[] = INCBIN_U8("graphics/pokenav/region_map.8bpp.lz"); static const u8 sRegionMapBkgnd_TilemapLZ[] = INCBIN_U8("graphics/pokenav/region_map_map.bin.lz"); -#include "data/region_map_layout.h" +#include "../data/region_map_layout.h" #if ENGLISH -#include "data/region_map_names_en.h" +#include "../data/region_map_names_en.h" #elif GERMAN -#include "data/region_map_names_de.h" +#include "../data/region_map_names_de.h" #endif struct RegionMapLocation diff --git a/src/roamer.c b/src/field/roamer.c index 948828d5e..948828d5e 100644 --- a/src/roamer.c +++ b/src/field/roamer.c diff --git a/src/rotating_gate.c b/src/field/rotating_gate.c index e8ab7e1bf..e8ab7e1bf 100644 --- a/src/rotating_gate.c +++ b/src/field/rotating_gate.c diff --git a/src/safari_zone.c b/src/field/safari_zone.c index 14fd1ddc4..14fd1ddc4 100644 --- a/src/safari_zone.c +++ b/src/field/safari_zone.c diff --git a/src/scrcmd.c b/src/field/scrcmd.c index 31a90158a..28584d4d0 100644 --- a/src/scrcmd.c +++ b/src/field/scrcmd.c @@ -91,12 +91,12 @@ static u8 * const sScriptStringVars[] = gStringVar3, }; -bool8 ScrCmd_snop(struct ScriptContext *ctx) +bool8 ScrCmd_nop(struct ScriptContext *ctx) { return FALSE; } -bool8 ScrCmd_snop1(struct ScriptContext *ctx) +bool8 ScrCmd_nop1(struct ScriptContext *ctx) { return FALSE; } @@ -107,9 +107,10 @@ bool8 ScrCmd_end(struct ScriptContext *ctx) return FALSE; } -bool8 ScrCmd_jumpasm(struct ScriptContext *ctx) +bool8 ScrCmd_gotonative(struct ScriptContext *ctx) { bool8 (*addr)(void) = (bool8 (*)(void))ScriptReadWord(ctx); + SetupNativeScript(ctx, addr); return TRUE; } @@ -117,20 +118,23 @@ bool8 ScrCmd_jumpasm(struct ScriptContext *ctx) bool8 ScrCmd_special(struct ScriptContext *ctx) { u16 index = ScriptReadHalfword(ctx); + gSpecials[index](); return FALSE; } -bool8 ScrCmd_specialval(struct ScriptContext *ctx) +bool8 ScrCmd_specialvar(struct ScriptContext *ctx) { u16 *var = GetVarPointer(ScriptReadHalfword(ctx)); + *var = gSpecials[ScriptReadHalfword(ctx)](); return FALSE; } -bool8 ScrCmd_callasm(struct ScriptContext *ctx) +bool8 ScrCmd_callnative(struct ScriptContext *ctx) { NativeFunc func = (NativeFunc)ScriptReadWord(ctx); + func(); return FALSE; } @@ -141,9 +145,10 @@ bool8 ScrCmd_waitstate(struct ScriptContext *ctx) return TRUE; } -bool8 ScrCmd_jump(struct ScriptContext *ctx) +bool8 ScrCmd_goto(struct ScriptContext *ctx) { u8 *ptr = (u8 *)ScriptReadWord(ctx); + ScriptJump(ctx, ptr); return FALSE; } @@ -156,25 +161,27 @@ bool8 ScrCmd_return(struct ScriptContext *ctx) bool8 ScrCmd_call(struct ScriptContext *ctx) { - u8 *ptr = (u8 *)ScriptReadWord(ctx); + ScriptCall(ctx, ptr); return FALSE; } -bool8 ScrCmd_jumpif(struct ScriptContext *ctx) +bool8 ScrCmd_goto_if(struct ScriptContext *ctx) { u8 condition = ScriptReadByte(ctx); u8 *ptr = (u8 *)ScriptReadWord(ctx); + if (sScriptConditionTable[condition][ctx->comparisonResult] == 1) ScriptJump(ctx, ptr); return FALSE; } -bool8 ScrCmd_callif(struct ScriptContext *ctx) +bool8 ScrCmd_call_if(struct ScriptContext *ctx) { u8 condition = ScriptReadByte(ctx); u8 *ptr = (u8 *)ScriptReadWord(ctx); + if (sScriptConditionTable[condition][ctx->comparisonResult] == 1) ScriptCall(ctx, ptr); return FALSE; @@ -184,13 +191,15 @@ bool8 ScrCmd_setvaddress(struct ScriptContext *ctx) { u32 addr1 = (u32)ctx->scriptPtr - 1; u32 addr2 = ScriptReadWord(ctx); + gUnknown_0202E8B0 = addr2 - addr1; return FALSE; } -bool8 ScrCmd_vjump(struct ScriptContext *ctx) +bool8 ScrCmd_vgoto(struct ScriptContext *ctx) { u32 addr = ScriptReadWord(ctx); + ScriptJump(ctx, (u8 *)(addr - gUnknown_0202E8B0)); return FALSE; } @@ -198,32 +207,36 @@ bool8 ScrCmd_vjump(struct ScriptContext *ctx) bool8 ScrCmd_vcall(struct ScriptContext *ctx) { u32 addr = ScriptReadWord(ctx); + ScriptCall(ctx, (u8 *)(addr - gUnknown_0202E8B0)); return FALSE; } -bool8 ScrCmd_if5(struct ScriptContext *ctx) +bool8 ScrCmd_vgoto_if(struct ScriptContext *ctx) { u8 condition = ScriptReadByte(ctx); u8 *ptr = (u8 *)(ScriptReadWord(ctx) - gUnknown_0202E8B0); + if (sScriptConditionTable[condition][ctx->comparisonResult] == 1) ScriptJump(ctx, ptr); return FALSE; } -bool8 ScrCmd_if6(struct ScriptContext *ctx) +bool8 ScrCmd_vcall_if(struct ScriptContext *ctx) { u8 condition = ScriptReadByte(ctx); u8 *ptr = (u8 *)(ScriptReadWord(ctx) - gUnknown_0202E8B0); + if (sScriptConditionTable[condition][ctx->comparisonResult] == 1) ScriptCall(ctx, ptr); return FALSE; } -bool8 ScrCmd_jumpstd(struct ScriptContext *ctx) +bool8 ScrCmd_gotostd(struct ScriptContext *ctx) { u8 index = ScriptReadByte(ctx); u8 **ptr = &gStdScripts[index]; + if (ptr < gStdScripts_End) ScriptJump(ctx, *ptr); return FALSE; @@ -233,15 +246,17 @@ bool8 ScrCmd_callstd(struct ScriptContext *ctx) { u8 index = ScriptReadByte(ctx); u8 **ptr = &gStdScripts[index]; + if (ptr < gStdScripts_End) ScriptCall(ctx, *ptr); return FALSE; } -bool8 ScrCmd_jumpstdif(struct ScriptContext *ctx) +bool8 ScrCmd_gotostd_if(struct ScriptContext *ctx) { u8 condition = ScriptReadByte(ctx); u8 index = ScriptReadByte(ctx); + if (sScriptConditionTable[condition][ctx->comparisonResult] == 1) { u8 **ptr = &gStdScripts[index]; @@ -251,10 +266,11 @@ bool8 ScrCmd_jumpstdif(struct ScriptContext *ctx) return FALSE; } -bool8 ScrCmd_callstdif(struct ScriptContext *ctx) +bool8 ScrCmd_callstd_if(struct ScriptContext *ctx) { u8 condition = ScriptReadByte(ctx); u8 index = ScriptReadByte(ctx); + if (sScriptConditionTable[condition][ctx->comparisonResult] == 1) { u8 **ptr = &gStdScripts[index]; @@ -264,50 +280,55 @@ bool8 ScrCmd_callstdif(struct ScriptContext *ctx) return FALSE; } -bool8 ScrCmd_jumpram(struct ScriptContext *ctx) +bool8 ScrCmd_gotoram(struct ScriptContext *ctx) { ScriptJump(ctx, (u8 *)gUnknown_0202E8AC); return FALSE; } -bool8 ScrCmd_die(struct ScriptContext *ctx) +bool8 ScrCmd_killscript(struct ScriptContext *ctx) { ClearRamScript(); StopScript(ctx); return TRUE; } -bool8 ScrCmd_setbyte(struct ScriptContext *ctx) +bool8 ScrCmd_setmysteryeventstatus(struct ScriptContext *ctx) { u8 value = ScriptReadByte(ctx); + SetMysteryEventScriptStatus(value); return FALSE; } -bool8 ScrCmd_loadptr(struct ScriptContext *ctx) +bool8 ScrCmd_loadword(struct ScriptContext *ctx) { u8 index = ScriptReadByte(ctx); + ctx->data[index] = ScriptReadWord(ctx); return FALSE; } -bool8 ScrCmd_loadbytefrompointer(struct ScriptContext *ctx) +bool8 ScrCmd_loadbytefromaddr(struct ScriptContext *ctx) { u8 index = ScriptReadByte(ctx); + ctx->data[index] = *(u8 *)ScriptReadWord(ctx); return FALSE; } -bool8 ScrCmd_writebytetooffset(struct ScriptContext *ctx) +bool8 ScrCmd_writebytetoaddr(struct ScriptContext *ctx) { u8 value = ScriptReadByte(ctx); + *(u8 *)ScriptReadWord(ctx) = value; return FALSE; } -bool8 ScrCmd_setbufferbyte(struct ScriptContext *ctx) +bool8 ScrCmd_loadbyte(struct ScriptContext *ctx) { u8 index = ScriptReadByte(ctx); + ctx->data[index] = ScriptReadByte(ctx); return FALSE; } @@ -315,14 +336,16 @@ bool8 ScrCmd_setbufferbyte(struct ScriptContext *ctx) bool8 ScrCmd_setptrbyte(struct ScriptContext *ctx) { u8 index = ScriptReadByte(ctx); + *(u8 *)ScriptReadWord(ctx) = ctx->data[index]; return FALSE; } -bool8 ScrCmd_copybuffers(struct ScriptContext *ctx) +bool8 ScrCmd_copylocal(struct ScriptContext *ctx) { u8 destIndex = ScriptReadByte(ctx); u8 srcIndex = ScriptReadByte(ctx); + ctx->data[destIndex] = ctx->data[srcIndex]; return FALSE; } @@ -359,73 +382,81 @@ u8 compare_012(u16 a1, u16 a2) { if (a1 < a2) return 0; - if (a1 == a2) return 1; - return 2; } -bool8 ScrCmd_comparebuffers(struct ScriptContext *ctx) +// comparelocaltolocal +bool8 ScrCmd_compare_local_to_local(struct ScriptContext *ctx) { u8 value1 = ctx->data[ScriptReadByte(ctx)]; u8 value2 = ctx->data[ScriptReadByte(ctx)]; + ctx->comparisonResult = compare_012(value1, value2); return FALSE; } -bool8 ScrCmd_comparebuffertobyte(struct ScriptContext *ctx) +// comparelocaltoimm +bool8 ScrCmd_compare_local_to_value(struct ScriptContext *ctx) { u8 value1 = ctx->data[ScriptReadByte(ctx)]; u8 value2 = ScriptReadByte(ctx); + ctx->comparisonResult = compare_012(value1, value2); return FALSE; } -bool8 ScrCmd_comparebuffertoptrbyte(struct ScriptContext *ctx) +bool8 ScrCmd_compare_local_to_addr(struct ScriptContext *ctx) { u8 value1 = ctx->data[ScriptReadByte(ctx)]; u8 value2 = *(u8 *)ScriptReadWord(ctx); + ctx->comparisonResult = compare_012(value1, value2); return FALSE; } -bool8 ScrCmd_compareptrbytetobuffer(struct ScriptContext *ctx) +bool8 ScrCmd_compare_addr_to_local(struct ScriptContext *ctx) { u8 value1 = *(u8 *)ScriptReadWord(ctx); u8 value2 = ctx->data[ScriptReadByte(ctx)]; + ctx->comparisonResult = compare_012(value1, value2); return FALSE; } -bool8 ScrCmd_compareptrbytetobyte(struct ScriptContext *ctx) +bool8 ScrCmd_compare_addr_to_value(struct ScriptContext *ctx) { u8 value1 = *(u8 *)ScriptReadWord(ctx); u8 value2 = ScriptReadByte(ctx); + ctx->comparisonResult = compare_012(value1, value2); return FALSE; } -bool8 ScrCmd_compareptrbytes(struct ScriptContext *ctx) +bool8 ScrCmd_compare_addr_to_addr(struct ScriptContext *ctx) { u8 value1 = *(u8 *)ScriptReadWord(ctx); u8 value2 = *(u8 *)ScriptReadWord(ctx); + ctx->comparisonResult = compare_012(value1, value2); return FALSE; } -bool8 ScrCmd_compare(struct ScriptContext *ctx) +bool8 ScrCmd_compare_var_to_value(struct ScriptContext *ctx) { u16 value1 = *GetVarPointer(ScriptReadHalfword(ctx)); u16 value2 = ScriptReadHalfword(ctx); + ctx->comparisonResult = compare_012(value1, value2); return FALSE; } -bool8 ScrCmd_comparevars(struct ScriptContext *ctx) +bool8 ScrCmd_compare_var_to_var(struct ScriptContext *ctx) { u16 *ptr1 = GetVarPointer(ScriptReadHalfword(ctx)); u16 *ptr2 = GetVarPointer(ScriptReadHalfword(ctx)); + ctx->comparisonResult = compare_012(*ptr1, *ptr2); return FALSE; } @@ -447,6 +478,7 @@ bool8 ScrCmd_subvar(struct ScriptContext *ctx) bool8 ScrCmd_random(struct ScriptContext *ctx) { u16 max = VarGet(ScriptReadHalfword(ctx)); + gScriptResult = Random() % max; return FALSE; } @@ -455,6 +487,7 @@ bool8 ScrCmd_additem(struct ScriptContext *ctx) { u16 itemId = VarGet(ScriptReadHalfword(ctx)); u32 quantity = VarGet(ScriptReadHalfword(ctx)); + gScriptResult = AddBagItem(itemId, (u8)quantity); return FALSE; } @@ -463,6 +496,7 @@ bool8 ScrCmd_removeitem(struct ScriptContext *ctx) { u16 itemId = VarGet(ScriptReadHalfword(ctx)); u32 quantity = VarGet(ScriptReadHalfword(ctx)); + gScriptResult = RemoveBagItem(itemId, (u8)quantity); return FALSE; } @@ -471,6 +505,7 @@ bool8 ScrCmd_checkitemspace(struct ScriptContext *ctx) { u16 itemId = VarGet(ScriptReadHalfword(ctx)); u32 quantity = VarGet(ScriptReadHalfword(ctx)); + gScriptResult = CheckBagHasSpace(itemId, (u8)quantity); return FALSE; } @@ -479,6 +514,7 @@ bool8 ScrCmd_checkitem(struct ScriptContext *ctx) { u16 itemId = VarGet(ScriptReadHalfword(ctx)); u32 quantity = VarGet(ScriptReadHalfword(ctx)); + gScriptResult = CheckBagHasItem(itemId, (u8)quantity); return FALSE; } @@ -486,6 +522,7 @@ bool8 ScrCmd_checkitem(struct ScriptContext *ctx) bool8 ScrCmd_checkitemtype(struct ScriptContext *ctx) { u16 itemId = VarGet(ScriptReadHalfword(ctx)); + gScriptResult = GetPocketByItemId(itemId); return FALSE; } @@ -494,6 +531,7 @@ bool8 ScrCmd_addpcitem(struct ScriptContext *ctx) { u16 itemId = VarGet(ScriptReadHalfword(ctx)); u16 quantity = VarGet(ScriptReadHalfword(ctx)); + gScriptResult = AddPCItem(itemId, quantity); return FALSE; } @@ -502,6 +540,7 @@ bool8 ScrCmd_checkpcitem(struct ScriptContext *ctx) { u16 itemId = VarGet(ScriptReadHalfword(ctx)); u16 quantity = VarGet(ScriptReadHalfword(ctx)); + gScriptResult = CheckPCHasItem(itemId, quantity); return FALSE; } @@ -509,6 +548,7 @@ bool8 ScrCmd_checkpcitem(struct ScriptContext *ctx) bool8 ScrCmd_adddecor(struct ScriptContext *ctx) { u32 decorId = VarGet(ScriptReadHalfword(ctx)); + gScriptResult = IsThereStorageSpaceForDecoration(decorId); return FALSE; } @@ -516,6 +556,7 @@ bool8 ScrCmd_adddecor(struct ScriptContext *ctx) bool8 ScrCmd_removedecor(struct ScriptContext *ctx) { u32 decorId = VarGet(ScriptReadHalfword(ctx)); + gScriptResult = sub_81340A8(decorId); return FALSE; } @@ -523,13 +564,15 @@ bool8 ScrCmd_removedecor(struct ScriptContext *ctx) bool8 ScrCmd_checkdecor(struct ScriptContext *ctx) { u32 decorId = VarGet(ScriptReadHalfword(ctx)); + gScriptResult = sub_8134074(decorId); return FALSE; } -bool8 ScrCmd_testdecor(struct ScriptContext *ctx) +bool8 ScrCmd_hasdecor(struct ScriptContext *ctx) { u32 decorId = VarGet(ScriptReadHalfword(ctx)); + gScriptResult = sub_8133FE4(decorId); return FALSE; } @@ -552,22 +595,23 @@ bool8 ScrCmd_checkflag(struct ScriptContext *ctx) return FALSE; } -bool8 ScrCmd_inccounter(struct ScriptContext *ctx) +bool8 ScrCmd_incrementgamestat(struct ScriptContext *ctx) { IncrementGameStat(ScriptReadByte(ctx)); return FALSE; } -bool8 ScrCmd_lighten(struct ScriptContext *ctx) +bool8 ScrCmd_animdarklevel(struct ScriptContext *ctx) { sub_8081594(ScriptReadByte(ctx)); ScriptContext1_Stop(); return TRUE; } -bool8 ScrCmd_darken(struct ScriptContext *ctx) +bool8 ScrCmd_setdarklevel(struct ScriptContext *ctx) { u16 flashLevel = VarGet(ScriptReadHalfword(ctx)); + Overworld_SetFlashLevel(flashLevel); return FALSE; } @@ -591,6 +635,7 @@ bool8 ScrCmd_fadescreendelay(struct ScriptContext *ctx) { u8 duration = ScriptReadByte(ctx); u8 delay = ScriptReadByte(ctx); + fade_screen(duration, delay); SetupNativeScript(ctx, IsPaletteNotActive); return TRUE; @@ -606,28 +651,29 @@ bool8 s28_pause_asm() return FALSE; } -bool8 ScrCmd_pause(struct ScriptContext *ctx) +bool8 ScrCmd_delay(struct ScriptContext *ctx) { sPauseCounter = ScriptReadHalfword(ctx); SetupNativeScript(ctx, s28_pause_asm); return TRUE; } -bool8 ScrCmd_compareflags(struct ScriptContext *ctx) +bool8 ScrCmd_initclock(struct ScriptContext *ctx) { u8 hour = VarGet(ScriptReadHalfword(ctx)); u8 minute = VarGet(ScriptReadHalfword(ctx)); + RtcInitLocalTimeOffset(hour, minute); return FALSE; } -bool8 ScrCmd_checkdailyflags(struct ScriptContext *ctx) +bool8 ScrCmd_dodailyevents(struct ScriptContext *ctx) { DoTimeBasedEvents(); return FALSE; } -bool8 ScrCmd_resetvars(struct ScriptContext *ctx) +bool8 ScrCmd_gettime(struct ScriptContext *ctx) { RtcCalcLocalTime(); gSpecialVar_0x8000 = gLocalTime.hours; @@ -638,8 +684,9 @@ bool8 ScrCmd_resetvars(struct ScriptContext *ctx) bool8 ScrCmd_setweather(struct ScriptContext *ctx) { - u16 value = VarGet(ScriptReadHalfword(ctx)); - SetSav1Weather(value); + u16 weather = VarGet(ScriptReadHalfword(ctx)); + + SetSav1Weather(weather); return FALSE; } @@ -661,47 +708,51 @@ bool8 ScrCmd_tileeffect(struct ScriptContext *ctx) return FALSE; } -bool8 ScrCmd_setmapfooter(struct ScriptContext *ctx) +bool8 ScrCmd_setmaplayoutindex(struct ScriptContext *ctx) { u16 value = VarGet(ScriptReadHalfword(ctx)); + sub_8053D14(value); return FALSE; } bool8 ScrCmd_warp(struct ScriptContext *ctx) { - u8 v1 = ScriptReadByte(ctx); - u8 v2 = ScriptReadByte(ctx); - u8 v3 = ScriptReadByte(ctx); - u16 v4 = VarGet(ScriptReadHalfword(ctx)); - s8 v5 = VarGet(ScriptReadHalfword(ctx)); - warp1_set(v1, v2, v3, v4, v5); + u8 mapGroup = ScriptReadByte(ctx); + u8 mapNum = ScriptReadByte(ctx); + u8 warpId = ScriptReadByte(ctx); + u16 x = VarGet(ScriptReadHalfword(ctx)); + u16 y = VarGet(ScriptReadHalfword(ctx)); + + Overworld_SetWarpDestination(mapGroup, mapNum, warpId, x, y); sub_8080E88(); player_avatar_init_params_reset(); return TRUE; } -bool8 ScrCmd_warpmuted(struct ScriptContext *ctx) +bool8 ScrCmd_warpsilent(struct ScriptContext *ctx) { - u8 v1 = ScriptReadByte(ctx); - u8 v2 = ScriptReadByte(ctx); - u8 v3 = ScriptReadByte(ctx); - u16 v4 = VarGet(ScriptReadHalfword(ctx)); - s8 v5 = VarGet(ScriptReadHalfword(ctx)); - warp1_set(v1, v2, v3, v4, v5); + u8 mapGroup = ScriptReadByte(ctx); + u8 mapNum = ScriptReadByte(ctx); + u8 warpId = ScriptReadByte(ctx); + u16 x = VarGet(ScriptReadHalfword(ctx)); + u16 y = VarGet(ScriptReadHalfword(ctx)); + + Overworld_SetWarpDestination(mapGroup, mapNum, warpId, x, y); sp13E_warp_to_last_warp(); player_avatar_init_params_reset(); return TRUE; } -bool8 ScrCmd_warpwalk(struct ScriptContext *ctx) +bool8 ScrCmd_warpdoor(struct ScriptContext *ctx) { - u8 v1 = ScriptReadByte(ctx); - u8 v2 = ScriptReadByte(ctx); - u8 v3 = ScriptReadByte(ctx); - u16 v4 = VarGet(ScriptReadHalfword(ctx)); - s8 v5 = VarGet(ScriptReadHalfword(ctx)); - warp1_set(v1, v2, v3, v4, v5); + u8 mapGroup = ScriptReadByte(ctx); + u8 mapNum = ScriptReadByte(ctx); + u8 warpId = ScriptReadByte(ctx); + u16 x = VarGet(ScriptReadHalfword(ctx)); + u16 y = VarGet(ScriptReadHalfword(ctx)); + + Overworld_SetWarpDestination(mapGroup, mapNum, warpId, x, y); sub_8080EF0(); player_avatar_init_params_reset(); return TRUE; @@ -709,18 +760,16 @@ bool8 ScrCmd_warpwalk(struct ScriptContext *ctx) bool8 ScrCmd_warphole(struct ScriptContext *ctx) { - u8 v1 = ScriptReadByte(ctx); - u8 v2 = ScriptReadByte(ctx); + u8 mapGroup = ScriptReadByte(ctx); + u8 mapNum = ScriptReadByte(ctx); u16 x; u16 y; PlayerGetDestCoords(&x, &y); - - if (v1 == 0xFF && v2 == 0xFF) + if (mapGroup == 0xFF && mapNum == 0xFF) sub_8053720(x - 7, y - 7); else - warp1_set(v1, v2, -1, x - 7, y - 7); - + Overworld_SetWarpDestination(mapGroup, mapNum, -1, x - 7, y - 7); sp13F_fall_to_last_warp(); player_avatar_init_params_reset(); return TRUE; @@ -728,78 +777,85 @@ bool8 ScrCmd_warphole(struct ScriptContext *ctx) bool8 ScrCmd_warpteleport(struct ScriptContext *ctx) { - u8 v1 = ScriptReadByte(ctx); - u8 v2 = ScriptReadByte(ctx); - u8 v3 = ScriptReadByte(ctx); - u16 v4 = VarGet(ScriptReadHalfword(ctx)); - s8 v5 = VarGet(ScriptReadHalfword(ctx)); - warp1_set(v1, v2, v3, v4, v5); + u8 mapGroup = ScriptReadByte(ctx); + u8 mapNum = ScriptReadByte(ctx); + u8 warpId = ScriptReadByte(ctx); + u16 x = VarGet(ScriptReadHalfword(ctx)); + u16 y = VarGet(ScriptReadHalfword(ctx)); + + Overworld_SetWarpDestination(mapGroup, mapNum, warpId, x, y); sub_8080F68(); player_avatar_init_params_reset(); return TRUE; } -bool8 ScrCmd_warp3(struct ScriptContext *ctx) +bool8 ScrCmd_setwarp(struct ScriptContext *ctx) { - u8 v1 = ScriptReadByte(ctx); - u8 v2 = ScriptReadByte(ctx); - u8 v3 = ScriptReadByte(ctx); - u16 v4 = VarGet(ScriptReadHalfword(ctx)); - s8 v5 = VarGet(ScriptReadHalfword(ctx)); - warp1_set(v1, v2, v3, v4, v5); + u8 mapGroup = ScriptReadByte(ctx); + u8 mapNum = ScriptReadByte(ctx); + u8 warpId = ScriptReadByte(ctx); + u16 x = VarGet(ScriptReadHalfword(ctx)); + u16 y = VarGet(ScriptReadHalfword(ctx)); + + Overworld_SetWarpDestination(mapGroup, mapNum, warpId, x, y); return FALSE; } -bool8 ScrCmd_warpplace(struct ScriptContext *ctx) +bool8 ScrCmd_setdynamicwarp(struct ScriptContext *ctx) { - u8 v1 = ScriptReadByte(ctx); - u8 v2 = ScriptReadByte(ctx); - u8 v3 = ScriptReadByte(ctx); - u16 v4 = VarGet(ScriptReadHalfword(ctx)); - s8 v5 = VarGet(ScriptReadHalfword(ctx)); - saved_warp2_set_2(0, v1, v2, v3, v4, v5); + u8 mapGroup = ScriptReadByte(ctx); + u8 mapNum = ScriptReadByte(ctx); + u8 warpId = ScriptReadByte(ctx); + u16 x = VarGet(ScriptReadHalfword(ctx)); + u16 y = VarGet(ScriptReadHalfword(ctx)); + + saved_warp2_set_2(0, mapGroup, mapNum, warpId, x, y); return FALSE; } -bool8 ScrCmd_warp4(struct ScriptContext *ctx) +bool8 ScrCmd_setdivewarp(struct ScriptContext *ctx) { - u8 v1 = ScriptReadByte(ctx); - u8 v2 = ScriptReadByte(ctx); - u8 v3 = ScriptReadByte(ctx); - u16 v4 = VarGet(ScriptReadHalfword(ctx)); - s8 v5 = VarGet(ScriptReadHalfword(ctx)); - sub_8053690(v1, v2, v3, v4, v5); + u8 mapGroup = ScriptReadByte(ctx); + u8 mapNum = ScriptReadByte(ctx); + u8 warpId = ScriptReadByte(ctx); + u16 x = VarGet(ScriptReadHalfword(ctx)); + u16 y = VarGet(ScriptReadHalfword(ctx)); + + sub_8053690(mapGroup, mapNum, warpId, x, y); return FALSE; } -bool8 ScrCmd_warp5(struct ScriptContext *ctx) +bool8 ScrCmd_setholewarp(struct ScriptContext *ctx) { - u8 v1 = ScriptReadByte(ctx); - u8 v2 = ScriptReadByte(ctx); - u8 v3 = ScriptReadByte(ctx); - u16 v4 = VarGet(ScriptReadHalfword(ctx)); - s8 v5 = VarGet(ScriptReadHalfword(ctx)); - sub_80536E4(v1, v2, v3, v4, v5); + u8 mapGroup = ScriptReadByte(ctx); + u8 mapNum = ScriptReadByte(ctx); + u8 warpId = ScriptReadByte(ctx); + u16 x = VarGet(ScriptReadHalfword(ctx)); + u16 y = VarGet(ScriptReadHalfword(ctx)); + + sub_80536E4(mapGroup, mapNum, warpId, x, y); return FALSE; } -bool8 ScrCmd_warp6(struct ScriptContext *ctx) +bool8 ScrCmd_setescapewarp(struct ScriptContext *ctx) { - u8 v1 = ScriptReadByte(ctx); - u8 v2 = ScriptReadByte(ctx); - u8 v3 = ScriptReadByte(ctx); - u16 v4 = VarGet(ScriptReadHalfword(ctx)); - s8 v5 = VarGet(ScriptReadHalfword(ctx)); - sub_805363C(v1, v2, v3, v4, v5); + u8 mapGroup = ScriptReadByte(ctx); + u8 mapNum = ScriptReadByte(ctx); + u8 warpId = ScriptReadByte(ctx); + u16 x = VarGet(ScriptReadHalfword(ctx)); + u16 y = VarGet(ScriptReadHalfword(ctx)); + + sub_805363C(mapGroup, mapNum, warpId, x, y); return FALSE; } bool8 ScrCmd_getplayerxy(struct ScriptContext *ctx) { - u16 *ptr1 = GetVarPointer(ScriptReadHalfword(ctx)); - u16 *ptr2 = GetVarPointer(ScriptReadHalfword(ctx)); - *ptr1 = gSaveBlock1.pos.x; - *ptr2 = gSaveBlock1.pos.y; + u16 *pX = GetVarPointer(ScriptReadHalfword(ctx)); + u16 *pY = GetVarPointer(ScriptReadHalfword(ctx)); + + *pX = gSaveBlock1.pos.x; + *pY = gSaveBlock1.pos.y; return FALSE; } @@ -809,7 +865,7 @@ bool8 ScrCmd_countpokemon(struct ScriptContext *ctx) return FALSE; } -bool8 ScrCmd_playsfx(struct ScriptContext *ctx) +bool8 ScrCmd_playse(struct ScriptContext *ctx) { PlaySE(ScriptReadHalfword(ctx)); return FALSE; @@ -823,13 +879,13 @@ static bool8 WaitForSoundEffectFinish() return FALSE; } -bool8 ScrCmd_checksound(struct ScriptContext *ctx) +bool8 ScrCmd_waitse(struct ScriptContext *ctx) { SetupNativeScript(ctx, WaitForSoundEffectFinish); return TRUE; } -bool8 ScrCmd_fanfare(struct ScriptContext *ctx) +bool8 ScrCmd_playfanfare(struct ScriptContext *ctx) { PlayFanfare(ScriptReadHalfword(ctx)); return FALSE; @@ -846,37 +902,39 @@ bool8 ScrCmd_waitfanfare(struct ScriptContext *ctx) return TRUE; } -bool8 ScrCmd_playmusic(struct ScriptContext *ctx) +bool8 ScrCmd_playbgm(struct ScriptContext *ctx) { u16 songId = ScriptReadHalfword(ctx); bool8 val = ScriptReadByte(ctx); + if (val == TRUE) - sav1_set_battle_music_maybe(songId); + Overworld_SetSavedMusic(songId); PlayNewMapMusic(songId); return FALSE; } -bool8 ScrCmd_playmusicbattle(struct ScriptContext *ctx) +bool8 ScrCmd_savebgm(struct ScriptContext *ctx) { - sav1_set_battle_music_maybe(ScriptReadHalfword(ctx)); + Overworld_SetSavedMusic(ScriptReadHalfword(ctx)); return FALSE; } -bool8 ScrCmd_fadedefault(struct ScriptContext *ctx) +bool8 ScrCmd_fadedefaultbgm(struct ScriptContext *ctx) { - sub_8053F84(); + Overworld_ChangeMusicToDefault(); return FALSE; } -bool8 ScrCmd_fademusic(struct ScriptContext *ctx) +bool8 ScrCmd_fadenewbgm(struct ScriptContext *ctx) { Overworld_ChangeMusicTo(ScriptReadHalfword(ctx)); return FALSE; } -bool8 ScrCmd_fadeout(struct ScriptContext *ctx) +bool8 ScrCmd_fadeoutbgm(struct ScriptContext *ctx) { u8 speed = ScriptReadByte(ctx); + if (speed != 0) FadeOutBGMTemporarily(4 * speed); else @@ -885,9 +943,10 @@ bool8 ScrCmd_fadeout(struct ScriptContext *ctx) return TRUE; } -bool8 ScrCmd_fadein(struct ScriptContext *ctx) +bool8 ScrCmd_fadeinbgm(struct ScriptContext *ctx) { u8 speed = ScriptReadByte(ctx); + if (speed != 0) FadeInBGM(4 * speed); else @@ -895,7 +954,7 @@ bool8 ScrCmd_fadein(struct ScriptContext *ctx) return FALSE; } -bool8 ScrCmd_move(struct ScriptContext *ctx) +bool8 ScrCmd_applymovement(struct ScriptContext *ctx) { u16 localId = VarGet(ScriptReadHalfword(ctx)); void *movementScript = (void *)ScriptReadWord(ctx); @@ -905,7 +964,7 @@ bool8 ScrCmd_move(struct ScriptContext *ctx) return FALSE; } -bool8 ScrCmd_movecoords(struct ScriptContext *ctx) +bool8 ScrCmd_applymovement_at(struct ScriptContext *ctx) { u16 localId = VarGet(ScriptReadHalfword(ctx)); void *movementScript = (void *)ScriptReadWord(ctx); @@ -922,7 +981,7 @@ static bool8 WaitForMovementFinish(void) return ScriptMovement_IsObjectMovementFinished(sMovingNpcId, sMovingNpcMapId, sMovingNpcMapBank); } -bool8 ScrCmd_waitmove(struct ScriptContext *ctx) +bool8 ScrCmd_waitmovement(struct ScriptContext *ctx) { u16 localId = VarGet(ScriptReadHalfword(ctx)); @@ -934,7 +993,7 @@ bool8 ScrCmd_waitmove(struct ScriptContext *ctx) return TRUE; } -bool8 ScrCmd_waitmovexy(struct ScriptContext *ctx) +bool8 ScrCmd_waitmovement_at(struct ScriptContext *ctx) { u16 localId = VarGet(ScriptReadHalfword(ctx)); u8 mapBank; @@ -950,97 +1009,108 @@ bool8 ScrCmd_waitmovexy(struct ScriptContext *ctx) return TRUE; } -bool8 ScrCmd_disappear(struct ScriptContext *ctx) +bool8 ScrCmd_removeobject(struct ScriptContext *ctx) { - u16 objectId = VarGet(ScriptReadHalfword(ctx)); - RemoveFieldObjectByLocalIdAndMap(objectId, gSaveBlock1.location.mapNum, gSaveBlock1.location.mapGroup); + u16 localId = VarGet(ScriptReadHalfword(ctx)); + + RemoveFieldObjectByLocalIdAndMap(localId, gSaveBlock1.location.mapNum, gSaveBlock1.location.mapGroup); return FALSE; } -bool8 ScrCmd_disappearxy(struct ScriptContext *ctx) +bool8 ScrCmd_removeobject_at(struct ScriptContext *ctx) { u16 objectId = VarGet(ScriptReadHalfword(ctx)); u8 mapGroup = ScriptReadByte(ctx); u8 mapNum = ScriptReadByte(ctx); + RemoveFieldObjectByLocalIdAndMap(objectId, mapNum, mapGroup); return FALSE; } -bool8 ScrCmd_reappear(struct ScriptContext *ctx) +bool8 ScrCmd_addobject(struct ScriptContext *ctx) { u16 objectId = VarGet(ScriptReadHalfword(ctx)); + show_sprite(objectId, gSaveBlock1.location.mapNum, gSaveBlock1.location.mapGroup); return FALSE; } -bool8 ScrCmd_reappearxy(struct ScriptContext *ctx) +bool8 ScrCmd_addobject_at(struct ScriptContext *ctx) { u16 objectId = VarGet(ScriptReadHalfword(ctx)); u8 mapGroup = ScriptReadByte(ctx); u8 mapNum = ScriptReadByte(ctx); + show_sprite(objectId, mapNum, mapGroup); return FALSE; } -bool8 ScrCmd_movesprite(struct ScriptContext *ctx) +bool8 ScrCmd_setobjectxy(struct ScriptContext *ctx) { - u16 v1 = VarGet(ScriptReadHalfword(ctx)); - u16 v2 = VarGet(ScriptReadHalfword(ctx)); - u32 v3 = VarGet(ScriptReadHalfword(ctx)); - sub_805C0F8(v1, gSaveBlock1.location.mapNum, gSaveBlock1.location.mapGroup, v2, v3); + u16 localId = VarGet(ScriptReadHalfword(ctx)); + u16 x = VarGet(ScriptReadHalfword(ctx)); + u16 y = VarGet(ScriptReadHalfword(ctx)); + + sub_805C0F8(localId, gSaveBlock1.location.mapNum, gSaveBlock1.location.mapGroup, x, y); return FALSE; } -bool8 ScrCmd_movespriteperm(struct ScriptContext *ctx) +bool8 ScrCmd_setobjectxyperm(struct ScriptContext *ctx) { - u16 v1 = VarGet(ScriptReadHalfword(ctx)); - u16 v2 = VarGet(ScriptReadHalfword(ctx)); - u32 v3 = VarGet(ScriptReadHalfword(ctx)); - Overworld_SaveMapObjCoords(v1, v2, v3); + u16 localId = VarGet(ScriptReadHalfword(ctx)); + u16 x = VarGet(ScriptReadHalfword(ctx)); + u16 y = VarGet(ScriptReadHalfword(ctx)); + + Overworld_SetMapObjTemplateCoords(localId, x, y); return FALSE; } -bool8 ScrCmd_moveoffscreen(struct ScriptContext *ctx) +bool8 ScrCmd_moveobjectoffscreen(struct ScriptContext *ctx) { - u16 v1 = VarGet(ScriptReadHalfword(ctx)); - sub_805C78C(v1, gSaveBlock1.location.mapNum, gSaveBlock1.location.mapGroup); + u16 localId = VarGet(ScriptReadHalfword(ctx)); + + sub_805C78C(localId, gSaveBlock1.location.mapNum, gSaveBlock1.location.mapGroup); return FALSE; } -bool8 ScrCmd_spritevisible(struct ScriptContext *ctx) +bool8 ScrCmd_showobject(struct ScriptContext *ctx) { - u16 v1 = VarGet(ScriptReadHalfword(ctx)); - u8 v2 = ScriptReadByte(ctx); - u8 v3 = ScriptReadByte(ctx); - npc_by_local_id_and_map_set_field_1_bit_x20(v1, v3, v2, 0); + u16 localId = VarGet(ScriptReadHalfword(ctx)); + u8 mapGroup = ScriptReadByte(ctx); + u8 mapNum = ScriptReadByte(ctx); + + npc_by_local_id_and_map_set_field_1_bit_x20(localId, mapNum, mapGroup, 0); return FALSE; } -bool8 ScrCmd_spriteinvisible(struct ScriptContext *ctx) +bool8 ScrCmd_hideobject(struct ScriptContext *ctx) { - u16 v1 = VarGet(ScriptReadHalfword(ctx)); - u8 v2 = ScriptReadByte(ctx); - u8 v3 = ScriptReadByte(ctx); - npc_by_local_id_and_map_set_field_1_bit_x20(v1, v3, v2, 1); + u16 localId = VarGet(ScriptReadHalfword(ctx)); + u8 mapGroup = ScriptReadByte(ctx); + u8 mapNum = ScriptReadByte(ctx); + + npc_by_local_id_and_map_set_field_1_bit_x20(localId, mapNum, mapGroup, 1); return FALSE; } -bool8 ScrCmd_spritelevelup(struct ScriptContext *ctx) +bool8 ScrCmd_setobjectpriority(struct ScriptContext *ctx) { - u16 v1 = VarGet(ScriptReadHalfword(ctx)); - u8 v2 = ScriptReadByte(ctx); - u8 v3 = ScriptReadByte(ctx); - u8 v4 = ScriptReadByte(ctx); - sub_805BCF0(v1, v3, v2, v4 + 83); + u16 localId = VarGet(ScriptReadHalfword(ctx)); + u8 mapGroup = ScriptReadByte(ctx); + u8 mapNum = ScriptReadByte(ctx); + u8 priority = ScriptReadByte(ctx); + + sub_805BCF0(localId, mapNum, mapGroup, priority + 83); return FALSE; } -bool8 ScrCmd_restorespritelevel(struct ScriptContext *ctx) +bool8 ScrCmd_resetobjectpriority(struct ScriptContext *ctx) { - u16 v1 = VarGet(ScriptReadHalfword(ctx)); - u8 v2 = ScriptReadByte(ctx); - u8 v3 = ScriptReadByte(ctx); - sub_805BD48(v1, v3, v2); + u16 localId = VarGet(ScriptReadHalfword(ctx)); + u8 mapGroup = ScriptReadByte(ctx); + u8 mapNum = ScriptReadByte(ctx); + + sub_805BD48(localId, mapNum, mapGroup); return FALSE; } @@ -1054,39 +1124,43 @@ bool8 ScrCmd_faceplayer(struct ScriptContext *ctx) return FALSE; } -bool8 ScrCmd_spriteface(struct ScriptContext *ctx) +bool8 ScrCmd_turnobject(struct ScriptContext *ctx) { u16 localId = VarGet(ScriptReadHalfword(ctx)); u8 direction = ScriptReadByte(ctx); + FieldObjectTurnByLocalIdAndMap(localId, gSaveBlock1.location.mapNum, gSaveBlock1.location.mapGroup, direction); return FALSE; } -bool8 ScrCmd_spritebehave(struct ScriptContext *ctx) +bool8 ScrCmd_setobjectmovementtype(struct ScriptContext *ctx) { - u16 v1 = VarGet(ScriptReadHalfword(ctx)); - u8 v2 = ScriptReadByte(ctx); - Overworld_SaveMapObjMovementType(v1, v2); + u16 localId = VarGet(ScriptReadHalfword(ctx)); + u8 movementType = ScriptReadByte(ctx); + + Overworld_SetMapObjTemplateMovementType(localId, movementType); return FALSE; } -bool8 ScrCmd_createvsprite(struct ScriptContext *ctx) +bool8 ScrCmd_createvobject(struct ScriptContext *ctx) { - u8 v1 = ScriptReadByte(ctx); + u8 graphicsId = ScriptReadByte(ctx); u8 v2 = ScriptReadByte(ctx); - u16 v3 = VarGet(ScriptReadHalfword(ctx)); - u32 v4 = VarGet(ScriptReadHalfword(ctx)); - u8 v5 = ScriptReadByte(ctx); - u8 v6 = ScriptReadByte(ctx); - sub_805B410(v1, v2, v3, v4, v5, v6); + u16 x = VarGet(ScriptReadHalfword(ctx)); + u32 y = VarGet(ScriptReadHalfword(ctx)); + u8 elevation = ScriptReadByte(ctx); + u8 direction = ScriptReadByte(ctx); + + sub_805B410(graphicsId, v2, x, y, elevation, direction); return FALSE; } -bool8 ScrCmd_vspriteface(struct ScriptContext *ctx) +bool8 ScrCmd_turnvobject(struct ScriptContext *ctx) { u8 v1 = ScriptReadByte(ctx); - u8 v2 = ScriptReadByte(ctx); - sub_8064990(v1, v2); + u8 direction = ScriptReadByte(ctx); + + sub_8064990(v1, direction); return FALSE; } @@ -1122,7 +1196,6 @@ bool8 ScrCmd_lock(struct ScriptContext *ctx) ScriptFreezeMapObjects(); SetupNativeScript(ctx, sub_8064CFC); } - return TRUE; } } @@ -1156,34 +1229,36 @@ bool8 ScrCmd_release(struct ScriptContext *ctx) bool8 ScrCmd_message(struct ScriptContext *ctx) { u8 *msg = (u8 *)ScriptReadWord(ctx); - if (!msg) + + if (msg == NULL) msg = (u8 *)ctx->data[0]; ShowFieldMessage(msg); return FALSE; } -bool8 ScrCmd_message2(struct ScriptContext *ctx) +bool8 ScrCmd_messageautoscroll(struct ScriptContext *ctx) { u8 *msg = (u8 *)ScriptReadWord(ctx); - if (!msg) + + if (msg == NULL) msg = (u8 *)ctx->data[0]; ShowFieldAutoScrollMessage(msg); return FALSE; } -bool8 ScrCmd_waittext(struct ScriptContext *ctx) +bool8 ScrCmd_waitmessage(struct ScriptContext *ctx) { SetupNativeScript(ctx, IsFieldMessageBoxHidden); return TRUE; } -bool8 ScrCmd_closebutton(struct ScriptContext *ctx) +bool8 ScrCmd_closemessage(struct ScriptContext *ctx) { HideFieldMessageBox(); return FALSE; } -bool8 WaitForAorBPress(void) +static bool8 WaitForAorBPress(void) { if (gMain.newKeys & A_BUTTON) return TRUE; @@ -1202,6 +1277,7 @@ bool8 ScrCmd_yesnobox(struct ScriptContext *ctx) { u8 left = ScriptReadByte(ctx); u8 top = ScriptReadByte(ctx); + if (ScriptMenu_YesNo(left, top) == TRUE) { ScriptContext1_Stop(); @@ -1219,6 +1295,7 @@ bool8 ScrCmd_multichoice(struct ScriptContext *ctx) u8 top = ScriptReadByte(ctx); u8 multichoiceId = ScriptReadByte(ctx); u8 ignoreBPress = ScriptReadByte(ctx); + if (ScriptMenu_Multichoice(left, top, multichoiceId, ignoreBPress) == TRUE) { ScriptContext1_Stop(); @@ -1230,13 +1307,14 @@ bool8 ScrCmd_multichoice(struct ScriptContext *ctx) } } -bool8 ScrCmd_multichoicedef(struct ScriptContext *ctx) +bool8 ScrCmd_multichoicedefault(struct ScriptContext *ctx) { u8 left = ScriptReadByte(ctx); u8 top = ScriptReadByte(ctx); u8 multichoiceId = ScriptReadByte(ctx); u8 defaultChoice = ScriptReadByte(ctx); u8 ignoreBPress = ScriptReadByte(ctx); + if (ScriptMenu_MultichoiceWithDefault(left, top, multichoiceId, ignoreBPress, defaultChoice) == TRUE) { ScriptContext1_Stop(); @@ -1248,23 +1326,25 @@ bool8 ScrCmd_multichoicedef(struct ScriptContext *ctx) } } -bool8 ScrCmd_showbox(struct ScriptContext *ctx) +bool8 ScrCmd_drawbox(struct ScriptContext *ctx) { u8 left = ScriptReadByte(ctx); u8 top = ScriptReadByte(ctx); u8 right = ScriptReadByte(ctx); u8 bottom = ScriptReadByte(ctx); + MenuDrawTextWindow(left, top, right, bottom); return FALSE; } -bool8 ScrCmd_multichoicerow(struct ScriptContext *ctx) +bool8 ScrCmd_multichoicegrid(struct ScriptContext *ctx) { u8 left = ScriptReadByte(ctx); u8 top = ScriptReadByte(ctx); u8 multichoiceId = ScriptReadByte(ctx); u8 numColumns = ScriptReadByte(ctx); u8 ignoreBPress = ScriptReadByte(ctx); + if (ScriptMenu_MultichoiceGrid(left, top, multichoiceId, ignoreBPress, numColumns) == TRUE) { ScriptContext1_Stop(); @@ -1276,23 +1356,25 @@ bool8 ScrCmd_multichoicerow(struct ScriptContext *ctx) } } -bool8 ScrCmd_hidebox(struct ScriptContext *ctx) +bool8 ScrCmd_erasebox(struct ScriptContext *ctx) { u8 left = ScriptReadByte(ctx); u8 top = ScriptReadByte(ctx); u8 right = ScriptReadByte(ctx); u8 bottom = ScriptReadByte(ctx); + MenuZeroFillWindowRect(left, top, right, bottom); return FALSE; } // unused -bool8 ScrCmd_clearbox(struct ScriptContext *ctx) +bool8 ScrCmd_drawboxtext(struct ScriptContext *ctx) { u8 left = ScriptReadByte(ctx); u8 top = ScriptReadByte(ctx); u8 multichoiceId = ScriptReadByte(ctx); u8 ignoreBPress = ScriptReadByte(ctx); + if (Multichoice(left, top, multichoiceId, ignoreBPress) == TRUE) { ScriptContext1_Stop(); @@ -1304,16 +1386,17 @@ bool8 ScrCmd_clearbox(struct ScriptContext *ctx) } } -bool8 ScrCmd_showpokepic(struct ScriptContext *ctx) +bool8 ScrCmd_drawpokepic(struct ScriptContext *ctx) { u16 species = VarGet(ScriptReadHalfword(ctx)); u8 x = ScriptReadByte(ctx); u8 y = ScriptReadByte(ctx); + ScriptMenu_ShowPokemonPic(species, x, y); return FALSE; } -bool8 ScrCmd_hidepokepic(struct ScriptContext *ctx) +bool8 ScrCmd_erasepokepic(struct ScriptContext *ctx) { bool8 (*func)(void) = ScriptMenu_GetPicboxWaitFunc(); @@ -1323,9 +1406,10 @@ bool8 ScrCmd_hidepokepic(struct ScriptContext *ctx) return TRUE; } -bool8 ScrCmd_showcontestwinner(struct ScriptContext *ctx) +bool8 ScrCmd_drawcontestwinner(struct ScriptContext *ctx) { u8 v1 = ScriptReadByte(ctx); + if (v1) sub_8106630(v1); ShowContestWinner(); @@ -1333,9 +1417,10 @@ bool8 ScrCmd_showcontestwinner(struct ScriptContext *ctx) return TRUE; } -bool8 ScrCmd_braillemsg(struct ScriptContext *ctx) +bool8 ScrCmd_braillemessage(struct ScriptContext *ctx) { u8 *ptr = (u8 *)ScriptReadWord(ctx); + u8 v2 = ptr[0]; u8 v3 = ptr[1]; u8 v4 = ptr[2]; @@ -1348,24 +1433,27 @@ bool8 ScrCmd_braillemsg(struct ScriptContext *ctx) return FALSE; } -bool8 ScrCmd_vtext(struct ScriptContext *ctx) +bool8 ScrCmd_vmessage(struct ScriptContext *ctx) { u32 v1 = ScriptReadWord(ctx); + ShowFieldMessage((u8 *)(v1 - gUnknown_0202E8B0)); return FALSE; } -bool8 ScrCmd_bufferpoke(struct ScriptContext *ctx) +bool8 ScrCmd_getspeciesname(struct ScriptContext *ctx) { u8 stringVarIndex = ScriptReadByte(ctx); u16 species = VarGet(ScriptReadHalfword(ctx)); + StringCopy(sScriptStringVars[stringVarIndex], gSpeciesNames[species]); return FALSE; } -bool8 ScrCmd_bufferfirstpoke(struct ScriptContext *ctx) +bool8 ScrCmd_getfirstpartypokename(struct ScriptContext *ctx) { u8 stringVarIndex = ScriptReadByte(ctx); + u8 *dest = sScriptStringVars[stringVarIndex]; u8 partyIndex = GetLeadMonIndex(); u32 species = GetMonData(&gPlayerParty[partyIndex], MON_DATA_SPECIES, NULL); @@ -1373,82 +1461,91 @@ bool8 ScrCmd_bufferfirstpoke(struct ScriptContext *ctx) return FALSE; } -bool8 ScrCmd_bufferpartypoke(struct ScriptContext *ctx) +bool8 ScrCmd_getpartypokename(struct ScriptContext *ctx) { u8 stringVarIndex = ScriptReadByte(ctx); u16 partyIndex = VarGet(ScriptReadHalfword(ctx)); + GetMonData(&gPlayerParty[partyIndex], MON_DATA_NICKNAME, sScriptStringVars[stringVarIndex]); StringGetEnd10(sScriptStringVars[stringVarIndex]); return FALSE; } -bool8 ScrCmd_bufferitem(struct ScriptContext *ctx) +bool8 ScrCmd_getitemname(struct ScriptContext *ctx) { u8 stringVarIndex = ScriptReadByte(ctx); u16 itemId = VarGet(ScriptReadHalfword(ctx)); + CopyItemName(itemId, sScriptStringVars[stringVarIndex]); return FALSE; } -bool8 ScrCmd_bufferdecor(struct ScriptContext *ctx) +bool8 ScrCmd_getdecorname(struct ScriptContext *ctx) { u8 stringVarIndex = ScriptReadByte(ctx); u16 decorId = VarGet(ScriptReadHalfword(ctx)); + StringCopy(sScriptStringVars[stringVarIndex], gDecorations[decorId].name); return FALSE; } -bool8 ScrCmd_bufferattack(struct ScriptContext *ctx) +bool8 ScrCmd_getmovename(struct ScriptContext *ctx) { u8 stringVarIndex = ScriptReadByte(ctx); u16 moveId = VarGet(ScriptReadHalfword(ctx)); + StringCopy(sScriptStringVars[stringVarIndex], gMoveNames[moveId]); return FALSE; } -bool8 ScrCmd_buffernum(struct ScriptContext *ctx) +bool8 ScrCmd_getnumberstring(struct ScriptContext *ctx) { u8 stringVarIndex = ScriptReadByte(ctx); u16 v1 = VarGet(ScriptReadHalfword(ctx)); u8 v2 = sub_80BF0B8(v1); + ConvertIntToDecimalStringN(sScriptStringVars[stringVarIndex], v1, 0, v2); return FALSE; } -bool8 ScrCmd_bufferstd(struct ScriptContext *ctx) +bool8 ScrCmd_getstdstring(struct ScriptContext *ctx) { u8 stringVarIndex = ScriptReadByte(ctx); u16 index = VarGet(ScriptReadHalfword(ctx)); + StringCopy(sScriptStringVars[stringVarIndex], gUnknown_083CE048[index]); return FALSE; } -bool8 ScrCmd_buffertext(struct ScriptContext *ctx) +bool8 ScrCmd_getstring(struct ScriptContext *ctx) { u8 stringVarIndex = ScriptReadByte(ctx); u8 *text = (u8 *)ScriptReadWord(ctx); + StringCopy(sScriptStringVars[stringVarIndex], text); return FALSE; } -bool8 ScrCmd_vloadptr(struct ScriptContext *ctx) +bool8 ScrCmd_vloadword(struct ScriptContext *ctx) { u8 *ptr = (u8 *)(ScriptReadWord(ctx) - gUnknown_0202E8B0); + StringExpandPlaceholders(gStringVar4, ptr); return FALSE; } -bool8 ScrCmd_vbuffer(struct ScriptContext *ctx) +bool8 ScrCmd_vgetstring(struct ScriptContext *ctx) { u8 stringVarIndex = ScriptReadByte(ctx); u32 addr = ScriptReadWord(ctx); + u8 *src = (u8 *)(addr - gUnknown_0202E8B0); u8 *dest = sScriptStringVars[stringVarIndex]; StringCopy(dest, src); return FALSE; } -bool8 ScrCmd_givepokemon(struct ScriptContext *ctx) +bool8 ScrCmd_givepoke(struct ScriptContext *ctx) { u16 species = VarGet(ScriptReadHalfword(ctx)); u8 level = ScriptReadByte(ctx); @@ -1456,6 +1553,7 @@ bool8 ScrCmd_givepokemon(struct ScriptContext *ctx) u32 unkParam1 = ScriptReadWord(ctx); u32 unkParam2 = ScriptReadWord(ctx); u8 unkParam3 = ScriptReadByte(ctx); + gScriptResult = ScriptGiveMon(species, level, item, unkParam1, unkParam2, unkParam3); return FALSE; } @@ -1463,6 +1561,7 @@ bool8 ScrCmd_givepokemon(struct ScriptContext *ctx) bool8 ScrCmd_giveegg(struct ScriptContext *ctx) { u16 species = VarGet(ScriptReadHalfword(ctx)); + gScriptResult = ScriptGiveEgg(species); return FALSE; } @@ -1472,14 +1571,16 @@ bool8 ScrCmd_setpokemove(struct ScriptContext *ctx) u8 partyIndex = ScriptReadByte(ctx); u8 slot = ScriptReadByte(ctx); u16 move = ScriptReadHalfword(ctx); + ScriptSetMonMoveSlot(partyIndex, move, slot); return FALSE; } -bool8 ScrCmd_checkattack(struct ScriptContext *ctx) +bool8 ScrCmd_checkpokemove(struct ScriptContext *ctx) { u8 i; u16 moveId = ScriptReadHalfword(ctx); + gScriptResult = 6; for (i = 0; i < 6; i++) { @@ -1501,15 +1602,17 @@ bool8 ScrCmd_givemoney(struct ScriptContext *ctx) { u32 amount = ScriptReadWord(ctx); u8 ignore = ScriptReadByte(ctx); + if (!ignore) AddMoney(&gSaveBlock1.money, amount); return FALSE; } -bool8 ScrCmd_paymoney(struct ScriptContext *ctx) +bool8 ScrCmd_takemoney(struct ScriptContext *ctx) { u32 amount = ScriptReadWord(ctx); u8 ignore = ScriptReadByte(ctx); + if (!ignore) RemoveMoney(&gSaveBlock1.money, amount); return FALSE; @@ -1519,60 +1622,67 @@ bool8 ScrCmd_checkmoney(struct ScriptContext *ctx) { u32 amount = ScriptReadWord(ctx); u8 ignore = ScriptReadByte(ctx); + if (!ignore) gScriptResult = IsEnoughMoney(gSaveBlock1.money, amount); return FALSE; } -bool8 ScrCmd_showmoney(struct ScriptContext *ctx) +bool8 ScrCmd_showmoneybox(struct ScriptContext *ctx) { u8 x = ScriptReadByte(ctx); u8 y = ScriptReadByte(ctx); u8 ignore = ScriptReadByte(ctx); + if (!ignore) OpenMoneyWindow(gSaveBlock1.money, x, y); return FALSE; } -bool8 ScrCmd_hidemoney(struct ScriptContext *ctx) +bool8 ScrCmd_hidemoneybox(struct ScriptContext *ctx) { u8 x = ScriptReadByte(ctx); u8 y = ScriptReadByte(ctx); + CloseMoneyWindow(x, y); return FALSE; } -bool8 ScrCmd_updatemoney(struct ScriptContext *ctx) +bool8 ScrCmd_updatemoneybox(struct ScriptContext *ctx) { - u8 v2 = ScriptReadByte(ctx); - u8 v3 = ScriptReadByte(ctx); + u8 x = ScriptReadByte(ctx); + u8 y = ScriptReadByte(ctx); u8 ignore = ScriptReadByte(ctx); + if (!ignore) - UpdateMoneyWindow(gSaveBlock1.money, v2, v3); + UpdateMoneyWindow(gSaveBlock1.money, x, y); return FALSE; } -bool8 ScrCmd_showcoins(struct ScriptContext *ctx) +bool8 ScrCmd_showcoinsbox(struct ScriptContext *ctx) { - u8 v2 = ScriptReadByte(ctx); - u8 v3 = ScriptReadByte(ctx); - ShowCoinsWindow(gSaveBlock1.coins, v2, v3); + u8 x = ScriptReadByte(ctx); + u8 y = ScriptReadByte(ctx); + + ShowCoinsWindow(gSaveBlock1.coins, x, y); return FALSE; } -bool8 ScrCmd_hidecoins(struct ScriptContext *ctx) +bool8 ScrCmd_hidecoinsbox(struct ScriptContext *ctx) { - u8 v2 = ScriptReadByte(ctx); - u8 v3 = ScriptReadByte(ctx); - HideCoinsWindow(v2, v3); + u8 x = ScriptReadByte(ctx); + u8 y = ScriptReadByte(ctx); + + HideCoinsWindow(x, y); return FALSE; } -bool8 ScrCmd_updatecoins(struct ScriptContext *ctx) +bool8 ScrCmd_updatecoinsbox(struct ScriptContext *ctx) { - u8 v2 = ScriptReadByte(ctx); - u8 v3 = ScriptReadByte(ctx); - UpdateCoinsWindow(gSaveBlock1.coins, v2, v3); + u8 x = ScriptReadByte(ctx); + u8 y = ScriptReadByte(ctx); + + UpdateCoinsWindow(gSaveBlock1.coins, x, y); return FALSE; } @@ -1582,19 +1692,19 @@ bool8 ScrCmd_trainerbattle(struct ScriptContext *ctx) return FALSE; } -bool8 ScrCmd_reptrainerbattle(struct ScriptContext *ctx) +bool8 ScrCmd_battlebegin(struct ScriptContext *ctx) { BattleSetup_StartTrainerBattle(); return TRUE; } -bool8 ScrCmd_endtrainerbattle(struct ScriptContext *ctx) +bool8 ScrCmd_ontrainerbattleend(struct ScriptContext *ctx) { ctx->scriptPtr = BattleSetup_GetScriptAddrAfterBattle(); return FALSE; } -bool8 ScrCmd_endtrainerbattle2(struct ScriptContext *ctx) +bool8 ScrCmd_ontrainerbattleendgoto(struct ScriptContext *ctx) { ctx->scriptPtr = BattleSetup_GetTrainerPostBattleScript(); return FALSE; @@ -1603,20 +1713,23 @@ bool8 ScrCmd_endtrainerbattle2(struct ScriptContext *ctx) bool8 ScrCmd_checktrainerflag(struct ScriptContext *ctx) { u16 index = VarGet(ScriptReadHalfword(ctx)); + ctx->comparisonResult = HasTrainerAlreadyBeenFought(index); return FALSE; } -bool8 ScrCmd_cleartrainerflag(struct ScriptContext *ctx) +bool8 ScrCmd_settrainerflag(struct ScriptContext *ctx) { u16 index = VarGet(ScriptReadHalfword(ctx)); + trainer_flag_set(index); return FALSE; } -bool8 ScrCmd_settrainerflag(struct ScriptContext *ctx) +bool8 ScrCmd_cleartrainerflag(struct ScriptContext *ctx) { u16 index = VarGet(ScriptReadHalfword(ctx)); + trainer_flag_clear(index); return FALSE; } @@ -1626,6 +1739,7 @@ bool8 ScrCmd_setwildbattle(struct ScriptContext *ctx) u16 species = ScriptReadHalfword(ctx); u8 level = ScriptReadByte(ctx); u16 item = ScriptReadHalfword(ctx); + CreateScriptedWildMon(species, level, item); return FALSE; } @@ -1640,6 +1754,7 @@ bool8 ScrCmd_dowildbattle(struct ScriptContext *ctx) bool8 ScrCmd_pokemart(struct ScriptContext *ctx) { void *ptr = (void *)ScriptReadWord(ctx); + CreatePokemartMenu(ptr); ScriptContext1_Stop(); return TRUE; @@ -1648,6 +1763,7 @@ bool8 ScrCmd_pokemart(struct ScriptContext *ctx) bool8 ScrCmd_pokemartdecor(struct ScriptContext *ctx) { void *ptr = (void *)ScriptReadWord(ctx); + CreateDecorationShop1Menu(ptr); ScriptContext1_Stop(); return TRUE; @@ -1656,24 +1772,27 @@ bool8 ScrCmd_pokemartdecor(struct ScriptContext *ctx) bool8 ScrCmd_pokemartbp(struct ScriptContext *ctx) { void *ptr = (void *)ScriptReadWord(ctx); + CreateDecorationShop2Menu(ptr); ScriptContext1_Stop(); return TRUE; } -bool8 ScrCmd_pokecasino(struct ScriptContext *ctx) +bool8 ScrCmd_playslotmachine(struct ScriptContext *ctx) { u8 v2 = VarGet(ScriptReadHalfword(ctx)); + PlaySlotMachine(v2, c2_exit_to_overworld_1_continue_scripts_restart_music); ScriptContext1_Stop(); return TRUE; } -bool8 ScrCmd_event_8a(struct ScriptContext *ctx) +bool8 ScrCmd_plantberrytree(struct ScriptContext *ctx) { u8 treeId = ScriptReadByte(ctx); u8 berry = ScriptReadByte(ctx); u8 growthStage = ScriptReadByte(ctx); + if (berry == 0) PlantBerryTree(treeId, 0, growthStage, FALSE); else @@ -1681,9 +1800,10 @@ bool8 ScrCmd_event_8a(struct ScriptContext *ctx) return FALSE; } -bool8 ScrCmd_event_96(struct ScriptContext *ctx) +bool8 ScrCmd_getpricereduction(struct ScriptContext *ctx) { u16 value = VarGet(ScriptReadHalfword(ctx)); + gScriptResult = GetPriceReduction(value); return FALSE; } @@ -1716,17 +1836,19 @@ bool8 ScrCmd_contestlinktransfer(struct ScriptContext *ctx) return TRUE; } -bool8 ScrCmd_doanimation(struct ScriptContext *ctx) +bool8 ScrCmd_dofieldeffect(struct ScriptContext *ctx) { u16 effectId = VarGet(ScriptReadHalfword(ctx)); + sFieldEffectScriptId = effectId; FieldEffectStart(sFieldEffectScriptId); return FALSE; } -bool8 ScrCmd_setanimation(struct ScriptContext *ctx) +bool8 ScrCmd_setfieldeffect(struct ScriptContext *ctx) { u8 argNum = ScriptReadByte(ctx); + gFieldEffectArguments[argNum] = (s16)VarGet(ScriptReadHalfword(ctx)); return FALSE; } @@ -1739,7 +1861,7 @@ static bool8 sub_8067B48() return FALSE; } -bool8 ScrCmd_checkanimation(struct ScriptContext *ctx) +bool8 ScrCmd_waitfieldeffect(struct ScriptContext *ctx) { sFieldEffectScriptId = VarGet(ScriptReadHalfword(ctx)); SetupNativeScript(ctx, sub_8067B48); @@ -1748,21 +1870,23 @@ bool8 ScrCmd_checkanimation(struct ScriptContext *ctx) bool8 ScrCmd_sethealplace(struct ScriptContext *ctx) { - u16 v2 = VarGet(ScriptReadHalfword(ctx)); - sub_8053588(v2); + u16 healLocationId = VarGet(ScriptReadHalfword(ctx)); + + Overworld_SetHealLocationWarp(healLocationId); return FALSE; } -bool8 ScrCmd_checkgender(struct ScriptContext *ctx) +bool8 ScrCmd_checkplayergender(struct ScriptContext *ctx) { gScriptResult = gSaveBlock2.playerGender; return FALSE; } -bool8 ScrCmd_pokecry(struct ScriptContext *ctx) +bool8 ScrCmd_playpokecry(struct ScriptContext *ctx) { u16 species = VarGet(ScriptReadHalfword(ctx)); u16 mode = VarGet(ScriptReadHalfword(ctx)); + PlayCry5(species, mode); return FALSE; } @@ -1779,6 +1903,7 @@ bool8 ScrCmd_setmaptile(struct ScriptContext *ctx) u16 y = VarGet(ScriptReadHalfword(ctx)); u16 tileId = VarGet(ScriptReadHalfword(ctx)); u16 v8 = VarGet(ScriptReadHalfword(ctx)); + x += 7; y += 7; if (!v8) @@ -1788,10 +1913,11 @@ bool8 ScrCmd_setmaptile(struct ScriptContext *ctx) return FALSE; } -bool8 ScrCmd_setdooropened(struct ScriptContext *ctx) +bool8 ScrCmd_opendoor(struct ScriptContext *ctx) { u16 x = VarGet(ScriptReadHalfword(ctx)); u16 y = VarGet(ScriptReadHalfword(ctx)); + x += 7; y += 7; PlaySE(GetDoorSoundEffect(x, y)); @@ -1799,10 +1925,11 @@ bool8 ScrCmd_setdooropened(struct ScriptContext *ctx) return FALSE; } -bool8 ScrCmd_setdoorclosed(struct ScriptContext *ctx) +bool8 ScrCmd_closedoor(struct ScriptContext *ctx) { u16 x = VarGet(ScriptReadHalfword(ctx)); u16 y = VarGet(ScriptReadHalfword(ctx)); + x += 7; y += 7; FieldAnimateDoorClose(x, y); @@ -1817,43 +1944,46 @@ static bool8 IsDoorAnimationStopped() return FALSE; } -bool8 ScrCmd_doorchange(struct ScriptContext *ctx) +bool8 ScrCmd_waitdooranim(struct ScriptContext *ctx) { SetupNativeScript(ctx, IsDoorAnimationStopped); return TRUE; } -bool8 ScrCmd_setdooropened2(struct ScriptContext *ctx) +bool8 ScrCmd_setdooropen(struct ScriptContext *ctx) { u16 x = VarGet(ScriptReadHalfword(ctx)); u16 y = VarGet(ScriptReadHalfword(ctx)); + x += 7; y += 7; FieldSetDoorOpened(x, y); return FALSE; } -bool8 ScrCmd_setdoorclosed2(struct ScriptContext *ctx) +bool8 ScrCmd_setdoorclosed(struct ScriptContext *ctx) { u16 x = VarGet(ScriptReadHalfword(ctx)); u16 y = VarGet(ScriptReadHalfword(ctx)); + x += 7; y += 7; FieldSetDoorClosed(x, y); return FALSE; } -bool8 ScrCmd_event_b1(struct ScriptContext *ctx) +bool8 ScrCmd_addelevmenuitem(struct ScriptContext *ctx) { u8 v3 = ScriptReadByte(ctx); u16 v5 = VarGet(ScriptReadHalfword(ctx)); u16 v7 = VarGet(ScriptReadHalfword(ctx)); u16 v9 = VarGet(ScriptReadHalfword(ctx)); + ScriptAddElevatorMenuItem(v3, v5, v7, v9); return FALSE; } -bool8 ScrCmd_event_b2(struct ScriptContext *ctx) +bool8 ScrCmd_showelevmenu(struct ScriptContext *ctx) { ScriptShowElevatorMenu(); ScriptContext1_Stop(); @@ -1870,21 +2000,21 @@ bool8 ScrCmd_checkcoins(struct ScriptContext *ctx) bool8 ScrCmd_givecoins(struct ScriptContext *ctx) { u16 coins = VarGet(ScriptReadHalfword(ctx)); + if (GiveCoins(coins) == TRUE) gScriptResult = 0; else gScriptResult = 1; - return FALSE; } -bool8 ScrCmd_removecoins(struct ScriptContext *ctx) +bool8 ScrCmd_takecoins(struct ScriptContext *ctx) { u16 coins = VarGet(ScriptReadHalfword(ctx)); + if (TakeCoins(coins) == TRUE) gScriptResult = 0; else gScriptResult = 1; - return FALSE; } diff --git a/src/script_menu.c b/src/field/script_menu.c index e25e74d8c..e25e74d8c 100644 --- a/src/script_menu.c +++ b/src/field/script_menu.c diff --git a/src/script_movement.c b/src/field/script_movement.c index 30e10b451..30e10b451 100644 --- a/src/script_movement.c +++ b/src/field/script_movement.c diff --git a/src/secret_base.c b/src/field/secret_base.c index b2cd1f094..f221d7f16 100644 --- a/src/secret_base.c +++ b/src/field/secret_base.c @@ -301,7 +301,7 @@ void sub_80BBBEC(u8 taskid) s8 idx; if (!gPaletteFade.active) { idx = 4 * (gUnknown_020387DC / 10); - warp1_set(gSaveBlock1.location.mapGroup, gSaveBlock1.location.mapNum, -1, gUnknown_083D1374[idx + 2], gUnknown_083D1374[idx + 3]); + Overworld_SetWarpDestination(gSaveBlock1.location.mapGroup, gSaveBlock1.location.mapNum, -1, gUnknown_083D1374[idx + 2], gUnknown_083D1374[idx + 3]); warp_in(); gFieldCallback = sub_80BBB90; SetMainCallback2(CB2_LoadMap); diff --git a/src/shop.c b/src/field/shop.c index 22250b1c4..375205935 100644 --- a/src/shop.c +++ b/src/field/shop.c @@ -282,7 +282,7 @@ void BuyMenuDrawGraphics(void) register const u32 zero asm("r6") = 0; DmaFill32(3, zero, addr, OAM_SIZE); LZDecompressVram(gBuyMenuFrame_Gfx, (void*)(VRAM + 0x7C00)); - sub_800D238(gBuyMenuFrame_Tilemap, (void *)0x02018000); + LZDecompressWram(gBuyMenuFrame_Tilemap, (void *)0x02018000); LoadCompressedPalette(gMenuMoneyPal, 0xC0, sizeof(gMenuMoneyPal)); FreeAllSpritePalettes(); ResetPaletteFade(); diff --git a/src/slot_machine.c b/src/field/slot_machine.c index c9a06a758..e8e4f271b 100644 --- a/src/slot_machine.c +++ b/src/field/slot_machine.c @@ -71,7 +71,7 @@ void sub_8106448(void) { u32 offsetRead, offsetWrite; u32 size; - sub_800D238(gSlotMachine_Gfx, (void *) 0x02010000); + LZDecompressWram(gSlotMachine_Gfx, (void *) 0x02010000); offsetRead = 0x02010000; offsetWrite = BG_VRAM; diff --git a/src/start_menu.c b/src/field/start_menu.c index 6e44090df..6e44090df 100644 --- a/src/start_menu.c +++ b/src/field/start_menu.c diff --git a/src/starter_choose.c b/src/field/starter_choose.c index 2b28df4f0..2b28df4f0 100644 --- a/src/starter_choose.c +++ b/src/field/starter_choose.c diff --git a/src/trader.c b/src/field/trader.c index 61f48fad8..61f48fad8 100644 --- a/src/trader.c +++ b/src/field/trader.c diff --git a/src/trainer_see.c b/src/field/trainer_see.c index 5a8ebbafc..5a8ebbafc 100644 --- a/src/trainer_see.c +++ b/src/field/trainer_see.c diff --git a/src/tv.c b/src/field/tv.c index 734cbad6f..e9b5e850d 100644 --- a/src/tv.c +++ b/src/field/tv.c @@ -1555,7 +1555,7 @@ u16 sub_80BF674(u16 species) rspecies = (Random() % (NUM_SPECIES - 1)) + 1; cspecies = rspecies; - while (GetNationalPokedexFlag(SpeciesToNationalPokedexNum(cspecies), 0) != 1 || cspecies == species) + while (GetSetPokedexFlag(SpeciesToNationalPokedexNum(cspecies), 0) != 1 || cspecies == species) { if (cspecies == SPECIES_BULBASAUR) cspecies = NUM_SPECIES - 1; @@ -2319,7 +2319,7 @@ void sub_80C03A8(u8 showidx) void sub_80C03C8(u16 species, u8 showidx) { - if (GetNationalPokedexFlag(SpeciesToNationalPokedexNum(species), 0) == 0) + if (GetSetPokedexFlag(SpeciesToNationalPokedexNum(species), 0) == 0) gSaveBlock1.tvShows[showidx].common.var01 = 0; } diff --git a/src/use_pokeblock.c b/src/field/use_pokeblock.c index e946a9cfc..e946a9cfc 100644 --- a/src/use_pokeblock.c +++ b/src/field/use_pokeblock.c diff --git a/src/wallclock.c b/src/field/wallclock.c index 8db13dc2d..8db13dc2d 100644 --- a/src/wallclock.c +++ b/src/field/wallclock.c diff --git a/src/wild_encounter.c b/src/field/wild_encounter.c index 390898917..390898917 100644 --- a/src/wild_encounter.c +++ b/src/field/wild_encounter.c diff --git a/src/agb_flash.c b/src/libs/agb_flash.c index 340d469a7..340d469a7 100644 --- a/src/agb_flash.c +++ b/src/libs/agb_flash.c diff --git a/src/agb_flash_1m.c b/src/libs/agb_flash_1m.c index e249fab9a..e249fab9a 100644 --- a/src/agb_flash_1m.c +++ b/src/libs/agb_flash_1m.c diff --git a/src/agb_flash_le.c b/src/libs/agb_flash_le.c index 39d956e27..39d956e27 100644 --- a/src/agb_flash_le.c +++ b/src/libs/agb_flash_le.c diff --git a/src/agb_flash_mx.c b/src/libs/agb_flash_mx.c index 67348901f..67348901f 100644 --- a/src/agb_flash_mx.c +++ b/src/libs/agb_flash_mx.c diff --git a/src/libc.c b/src/libs/libc.c index 920673e3e..920673e3e 100644 --- a/src/libc.c +++ b/src/libs/libc.c diff --git a/src/m4a_2.c b/src/libs/m4a_2.c index 2d3c65848..2d3c65848 100644 --- a/src/m4a_2.c +++ b/src/libs/m4a_2.c diff --git a/src/m4a_4.c b/src/libs/m4a_4.c index 2e1d140b4..2e1d140b4 100644 --- a/src/m4a_4.c +++ b/src/libs/m4a_4.c diff --git a/src/m4a_tables.c b/src/libs/m4a_tables.c index 91f00a31d..91f00a31d 100644 --- a/src/m4a_tables.c +++ b/src/libs/m4a_tables.c diff --git a/src/siirtc.c b/src/libs/siirtc.c index 965a068f1..965a068f1 100644 --- a/src/siirtc.c +++ b/src/libs/siirtc.c diff --git a/src/learn_move.c b/src/pokemon/learn_move.c index 33252c66b..33252c66b 100644 --- a/src/learn_move.c +++ b/src/pokemon/learn_move.c diff --git a/src/mail.c b/src/pokemon/mail.c index c5dd119e3..c5dd119e3 100644 --- a/src/mail.c +++ b/src/pokemon/mail.c diff --git a/src/mail_data.c b/src/pokemon/mail_data.c index ae3f4b3e8..ae3f4b3e8 100644 --- a/src/mail_data.c +++ b/src/pokemon/mail_data.c diff --git a/src/mon_markings.c b/src/pokemon/mon_markings.c index 0cad8db59..0cad8db59 100644 --- a/src/mon_markings.c +++ b/src/pokemon/mon_markings.c diff --git a/src/pokeblock_feed.c b/src/pokemon/pokeblock_feed.c index ccbb391af..5d6b215cd 100644 --- a/src/pokeblock_feed.c +++ b/src/pokemon/pokeblock_feed.c @@ -46,7 +46,7 @@ extern const u8 gBattleTerrainPalette_BattleTower[]; extern const struct CompressedSpriteSheet gUnknown_083F7F74; extern const struct CompressedSpritePalette gUnknown_083F7F7C; -bool8 sub_8040A3C(u16 species); +bool8 IsPokeSpriteNotFlipped(u16 species); // this file's functions static void sub_8147B04(void); @@ -626,7 +626,7 @@ static bool8 sub_8147B20(struct Pokemon* mon) species = GetMonData(mon, MON_DATA_SPECIES2); PiD = GetMonData(mon, MON_DATA_PERSONALITY); TiD = GetMonData(mon, MON_DATA_OT_ID); - palette = sub_80409C8(species, TiD, PiD); + palette = GetMonSpritePalStructFromOtIdPersonality(species, TiD, PiD); LoadCompressedObjectPalette(palette); GetMonSpriteTemplate_803C56C(palette->tag, 1); ewram[0x1FFFF]++; @@ -766,7 +766,7 @@ static u8 PokeblockFeed_CreatePokeSprite(struct Pokemon* mon) gSprites[spriteID].data2 = species; gSprites[spriteID].callback = SpriteCallbackDummy; gPokeblockMonNotFlipped = 1; - if (!sub_8040A3C(species)) + if (!IsPokeSpriteNotFlipped(species)) { gSprites[spriteID].affineAnims = sSpriteAffineAnimTable_84120EC; gSprites[spriteID].oam.affineMode = 3; diff --git a/src/pokedex.c b/src/pokemon/pokedex.c index 274869d4d..947dfd218 100644 --- a/src/pokedex.c +++ b/src/pokemon/pokedex.c @@ -1,4 +1,3 @@ - #include "global.h" #include "gba/m4a_internal.h" #include "pokedex.h" @@ -185,7 +184,7 @@ static const u8 gUnknown_0839FA7C[] = INCBIN_U8("graphics/pokedex/noball.4bpp.lz extern const u8 gUnknown_0839FA7C[]; #endif -#include "data/pokedex_orders.h" +#include "../data/pokedex_orders.h" static const struct OamData gOamData_83A0404 = { .y = 160, @@ -514,9 +513,9 @@ static const u8 gUnknown_083A05F1[] = {16, 8, 4, 2, 1}; const u8 gEmptySpacce_83A05F6[] = {0, 0}; // Padding, maybe? static const u8 gUnknown_083A05F8[] = _(""); #if ENGLISH -#include "data/pokedex_entries_en.h" +#include "../data/pokedex_entries_en.h" #elif GERMAN -#include "data/pokedex_entries_de.h" +#include "../data/pokedex_entries_de.h" #endif static const u16 gUnknown_083B4EC4[16] = {0}; static const u8 *const sMonFootprintTable[] = @@ -1319,8 +1318,8 @@ void ResetPokedex(void) { gSaveBlock2.pokedex.owned[i] = 0; gSaveBlock2.pokedex.seen[i] = 0; - gSaveBlock1.unk938[i] = 0; - gSaveBlock1.unk3A8C[i] = 0; + gSaveBlock1.dexSeen2[i] = 0; + gSaveBlock1.dexSeen3[i] = 0; } } @@ -2029,8 +2028,8 @@ static void SortPokedex(u8 dexMode, u8 sortMode) { vars[2] = HoennToNationalOrder(i + 1); gPokedexView->unk0[i].dexNum = vars[2]; - gPokedexView->unk0[i].seen = GetNationalPokedexFlag(vars[2], 0); - gPokedexView->unk0[i].owned = GetNationalPokedexFlag(vars[2], 1); + gPokedexView->unk0[i].seen = GetSetPokedexFlag(vars[2], 0); + gPokedexView->unk0[i].owned = GetSetPokedexFlag(vars[2], 1); if (gPokedexView->unk0[i].seen) gPokedexView->pokemonListCount = i + 1; } @@ -2044,14 +2043,14 @@ static void SortPokedex(u8 dexMode, u8 sortMode) for (i = 0; i < vars[0]; i++) { vars[2] = i + 1; - if (GetNationalPokedexFlag(vars[2], 0)) + if (GetSetPokedexFlag(vars[2], 0)) r10 = 1; if (r10) { asm(""); //Needed to match for some reason gPokedexView->unk0[r5].dexNum = vars[2]; - gPokedexView->unk0[r5].seen = GetNationalPokedexFlag(vars[2], 0); - gPokedexView->unk0[r5].owned = GetNationalPokedexFlag(vars[2], 1); + gPokedexView->unk0[r5].seen = GetSetPokedexFlag(vars[2], 0); + gPokedexView->unk0[r5].owned = GetSetPokedexFlag(vars[2], 1); if (gPokedexView->unk0[r5].seen) gPokedexView->pokemonListCount = r5 + 1; r5++; @@ -2064,11 +2063,11 @@ static void SortPokedex(u8 dexMode, u8 sortMode) { vars[2] = gPokedexOrder_Alphabetical[i]; - if (NationalToHoennOrder(vars[2]) <= vars[0] && GetNationalPokedexFlag(vars[2], 0)) + if (NationalToHoennOrder(vars[2]) <= vars[0] && GetSetPokedexFlag(vars[2], 0)) { gPokedexView->unk0[gPokedexView->pokemonListCount].dexNum = vars[2]; gPokedexView->unk0[gPokedexView->pokemonListCount].seen = 1; - gPokedexView->unk0[gPokedexView->pokemonListCount].owned = GetNationalPokedexFlag(vars[2], 1); + gPokedexView->unk0[gPokedexView->pokemonListCount].owned = GetSetPokedexFlag(vars[2], 1); gPokedexView->pokemonListCount++; } } @@ -2078,7 +2077,7 @@ static void SortPokedex(u8 dexMode, u8 sortMode) { vars[2] = gPokedexOrder_Weight[i]; - if (NationalToHoennOrder(vars[2]) <= vars[0] && GetNationalPokedexFlag(vars[2], 1)) + if (NationalToHoennOrder(vars[2]) <= vars[0] && GetSetPokedexFlag(vars[2], 1)) { gPokedexView->unk0[gPokedexView->pokemonListCount].dexNum = vars[2]; gPokedexView->unk0[gPokedexView->pokemonListCount].seen = 1; @@ -2092,7 +2091,7 @@ static void SortPokedex(u8 dexMode, u8 sortMode) { vars[2] = gPokedexOrder_Weight[i]; - if (NationalToHoennOrder(vars[2]) <= vars[0] && GetNationalPokedexFlag(vars[2], 1)) + if (NationalToHoennOrder(vars[2]) <= vars[0] && GetSetPokedexFlag(vars[2], 1)) { gPokedexView->unk0[gPokedexView->pokemonListCount].dexNum = vars[2]; gPokedexView->unk0[gPokedexView->pokemonListCount].seen = 1; @@ -2106,7 +2105,7 @@ static void SortPokedex(u8 dexMode, u8 sortMode) { vars[2] = gPokedexOrder_Height[i]; - if (NationalToHoennOrder(vars[2]) <= vars[0] && GetNationalPokedexFlag(vars[2], 1)) + if (NationalToHoennOrder(vars[2]) <= vars[0] && GetSetPokedexFlag(vars[2], 1)) { gPokedexView->unk0[gPokedexView->pokemonListCount].dexNum = vars[2]; gPokedexView->unk0[gPokedexView->pokemonListCount].seen = 1; @@ -2120,7 +2119,7 @@ static void SortPokedex(u8 dexMode, u8 sortMode) { vars[2] = gPokedexOrder_Height[i]; - if (NationalToHoennOrder(vars[2]) <= vars[0] && GetNationalPokedexFlag(vars[2], 1)) + if (NationalToHoennOrder(vars[2]) <= vars[0] && GetSetPokedexFlag(vars[2], 1)) { gPokedexView->unk0[gPokedexView->pokemonListCount].dexNum = vars[2]; gPokedexView->unk0[gPokedexView->pokemonListCount].seen = 1; @@ -3945,7 +3944,7 @@ static void sub_8090B8C(u8 taskId) otId = ((u16)gTasks[taskId].data[13] << 16) | (u16)gTasks[taskId].data[12]; personality = ((u16)gTasks[taskId].data[15] << 16) | (u16)gTasks[taskId].data[14]; paletteNum = gSprites[gTasks[taskId].data[3]].oam.paletteNum; - lzPaletteData = species_and_otid_get_pal(species, otId, personality); + lzPaletteData = GetMonSpritePalFromOtIdPersonality(species, otId, personality); LoadCompressedPalette(lzPaletteData, 0x100 | paletteNum * 16, 32); DestroyTask(taskId); } @@ -4007,79 +4006,79 @@ u16 GetPokedexHeightWeight(u16 dexNum, u8 data) } } -s8 GetNationalPokedexFlag(u16 a, u8 b) +s8 GetSetPokedexFlag(u16 nationalDexNo, u8 caseID) { u8 index; u8 bit; u8 mask; s8 retVal; - a--; - index = a / 8; - bit = a % 8; + nationalDexNo--; + index = nationalDexNo / 8; + bit = nationalDexNo % 8; mask = 1 << bit; retVal = 0; - switch (b) + switch (caseID) { - case 0: + case FLAG_GET_SEEN: if (gSaveBlock2.pokedex.seen[index] & mask) { - if ((gSaveBlock2.pokedex.seen[index] & mask) == (gSaveBlock1.unk938[index] & mask) - && (gSaveBlock2.pokedex.seen[index] & mask) == (gSaveBlock1.unk3A8C[index] & mask)) + if ((gSaveBlock2.pokedex.seen[index] & mask) == (gSaveBlock1.dexSeen2[index] & mask) + && (gSaveBlock2.pokedex.seen[index] & mask) == (gSaveBlock1.dexSeen3[index] & mask)) retVal = 1; else { gSaveBlock2.pokedex.seen[index] &= ~mask; - gSaveBlock1.unk938[index] &= ~mask; - gSaveBlock1.unk3A8C[index] &= ~mask; + gSaveBlock1.dexSeen2[index] &= ~mask; + gSaveBlock1.dexSeen3[index] &= ~mask; retVal = 0; } } break; - case 1: + case FLAG_GET_CAUGHT: if (gSaveBlock2.pokedex.owned[index] & mask) { if ((gSaveBlock2.pokedex.owned[index] & mask) == (gSaveBlock2.pokedex.seen[index] & mask) - && (gSaveBlock2.pokedex.owned[index] & mask) == (gSaveBlock1.unk938[index] & mask) - && (gSaveBlock2.pokedex.owned[index] & mask) == (gSaveBlock1.unk3A8C[index] & mask)) + && (gSaveBlock2.pokedex.owned[index] & mask) == (gSaveBlock1.dexSeen2[index] & mask) + && (gSaveBlock2.pokedex.owned[index] & mask) == (gSaveBlock1.dexSeen3[index] & mask)) retVal = 1; else { gSaveBlock2.pokedex.owned[index] &= ~mask; gSaveBlock2.pokedex.seen[index] &= ~mask; - gSaveBlock1.unk938[index] &= ~mask; - gSaveBlock1.unk3A8C[index] &= ~mask; + gSaveBlock1.dexSeen2[index] &= ~mask; + gSaveBlock1.dexSeen3[index] &= ~mask; retVal = 0; } } break; - case 2: + case FLAG_SET_SEEN: gSaveBlock2.pokedex.seen[index] |= mask; - gSaveBlock1.unk938[index] |= mask; - gSaveBlock1.unk3A8C[index] |= mask; + gSaveBlock1.dexSeen2[index] |= mask; + gSaveBlock1.dexSeen3[index] |= mask; break; - case 3: + case FLAG_SET_CAUGHT: gSaveBlock2.pokedex.owned[index] |= mask; break; } return retVal; } -u16 GetNationalPokedexCount(u8 a) +u16 GetNationalPokedexCount(u8 caseID) { u16 count = 0; u16 i; for (i = 0; i < NATIONAL_DEX_COUNT; i++) { - switch (a) + switch (caseID) { - case 0: - if (GetNationalPokedexFlag(i + 1, 0) != 0) + case FLAG_GET_SEEN: + if (GetSetPokedexFlag(i + 1, FLAG_GET_SEEN)) count++; break; - case 1: - if (GetNationalPokedexFlag(i + 1, 1) != 0) + case FLAG_GET_CAUGHT: + if (GetSetPokedexFlag(i + 1, FLAG_GET_CAUGHT)) count++; break; } @@ -4087,21 +4086,21 @@ u16 GetNationalPokedexCount(u8 a) return count; } -u16 GetHoennPokedexCount(u8 a) +u16 GetHoennPokedexCount(u8 caseID) { u16 count = 0; u16 i; for (i = 0; i < 202; i++) { - switch (a) + switch (caseID) { - case 0: - if (GetNationalPokedexFlag(HoennToNationalOrder(i + 1), 0) != 0) + case FLAG_GET_SEEN: + if (GetSetPokedexFlag(HoennToNationalOrder(i + 1), FLAG_GET_SEEN)) count++; break; - case 1: - if (GetNationalPokedexFlag(HoennToNationalOrder(i + 1), 1) != 0) + case FLAG_GET_CAUGHT: + if (GetSetPokedexFlag(HoennToNationalOrder(i + 1), FLAG_GET_CAUGHT)) count++; break; } @@ -4115,7 +4114,7 @@ bool8 sub_8090FC0(void) for (i = 0; i < 200; i++) { - if (GetNationalPokedexFlag(HoennToNationalOrder(i + 1), 1) == 0) + if (!GetSetPokedexFlag(HoennToNationalOrder(i + 1), FLAG_GET_CAUGHT)) return FALSE; } return TRUE; @@ -4127,17 +4126,17 @@ u16 sub_8090FF4(void) for (i = 0; i < 150; i++) { - if (GetNationalPokedexFlag(i + 1, 1) == 0) + if (GetSetPokedexFlag(i + 1, 1) == 0) return 0; } for (i = 152; i < 250; i++) { - if (GetNationalPokedexFlag(i + 1, 1) == 0) + if (GetSetPokedexFlag(i + 1, 1) == 0) return 0; } for (i = 252; i < 384; i++) { - if (GetNationalPokedexFlag(i + 1, 1) == 0) + if (GetSetPokedexFlag(i + 1, 1) == 0) return 0; } return 1; diff --git a/src/pokedex_cry_screen.c b/src/pokemon/pokedex_cry_screen.c index 92fd832fc..92fd832fc 100644 --- a/src/pokedex_cry_screen.c +++ b/src/pokemon/pokedex_cry_screen.c diff --git a/src/pokemon_1.c b/src/pokemon/pokemon_1.c index 1d597cb17..1d597cb17 100644 --- a/src/pokemon_1.c +++ b/src/pokemon/pokemon_1.c diff --git a/src/pokemon_2.c b/src/pokemon/pokemon_2.c index f02ce6170..f02ce6170 100644 --- a/src/pokemon_2.c +++ b/src/pokemon/pokemon_2.c diff --git a/src/pokemon_3.c b/src/pokemon/pokemon_3.c index e51d3187b..1eff9b83c 100644 --- a/src/pokemon_3.c +++ b/src/pokemon/pokemon_3.c @@ -278,7 +278,7 @@ u16 GetEvolutionTargetSpecies(struct Pokemon *mon, u8 type, u16 evolutionItem) else holdEffect = ItemId_GetHoldEffect(heldItem); - if (holdEffect == 38 && type != 3) + if (holdEffect == HOLD_EFFECT_PREVENT_EVOLVE && type != 3) return 0; switch (type) @@ -1096,7 +1096,7 @@ void ClearBattleMonForms(void) gBattleMonForms[i] = 0; } -u16 sub_8040728(void) +u16 GetBGM_ForBattle(void) { if (gBattleTypeFlags & BATTLE_TYPE_KYOGRE_GROUDON) return BGM_BATTLE34; @@ -1137,7 +1137,7 @@ void sub_80408BC(void) { ResetMapMusic(); m4aMPlayAllStop(); - PlayBGM(sub_8040728()); + PlayBGM(GetBGM_ForBattle()); } void current_map_music_set__default_for_battle(u16 song) @@ -1147,15 +1147,15 @@ void current_map_music_set__default_for_battle(u16 song) if (song) PlayNewMapMusic(song); else - PlayNewMapMusic(sub_8040728()); + PlayNewMapMusic(GetBGM_ForBattle()); } -const u8 *pokemon_get_pal(struct Pokemon *mon) +const u8 *GetMonSpritePal(struct Pokemon *mon) { u16 species = GetMonData(mon, MON_DATA_SPECIES2, 0); u32 otId = GetMonData(mon, MON_DATA_OT_ID, 0); u32 personality = GetMonData(mon, MON_DATA_PERSONALITY, 0); - return species_and_otid_get_pal(species, otId, personality); + return GetMonSpritePalFromOtIdPersonality(species, otId, personality); } //Extracts the upper 16 bits of a 32-bit number @@ -1164,7 +1164,7 @@ const u8 *pokemon_get_pal(struct Pokemon *mon) //Extracts the lower 16 bits of a 32-bit number #define LOHALF(n) ((n) & 0xFFFF) -const u8 *species_and_otid_get_pal(u16 species, u32 otId, u32 personality) +const u8 *GetMonSpritePalFromOtIdPersonality(u16 species, u32 otId, u32 personality) { u32 shinyValue; @@ -1178,15 +1178,15 @@ const u8 *species_and_otid_get_pal(u16 species, u32 otId, u32 personality) return gMonPaletteTable[species].data; } -const struct CompressedSpritePalette *sub_8040990(struct Pokemon *mon) +const struct CompressedSpritePalette *GetMonSpritePalStruct(struct Pokemon *mon) { u16 species = GetMonData(mon, MON_DATA_SPECIES2, 0); u32 otId = GetMonData(mon, MON_DATA_OT_ID, 0); u32 personality = GetMonData(mon, MON_DATA_PERSONALITY, 0); - return sub_80409C8(species, otId, personality); + return GetMonSpritePalStructFromOtIdPersonality(species, otId, personality); } -const struct CompressedSpritePalette *sub_80409C8(u16 species, u32 otId , u32 personality) +const struct CompressedSpritePalette *GetMonSpritePalStructFromOtIdPersonality(u16 species, u32 otId , u32 personality) { u32 shinyValue; @@ -1208,9 +1208,9 @@ bool32 IsHMMove2(u16 move) return FALSE; } -bool8 sub_8040A3C(u16 species) +bool8 IsPokeSpriteNotFlipped(u16 species) { - return gBaseStats[species].unk19_7; + return gBaseStats[species].noFlip; } s8 sub_8040A54(struct Pokemon *mon, u8 a2) diff --git a/src/pokemon_data.c b/src/pokemon/pokemon_data.c index 6414134fb..6414134fb 100644 --- a/src/pokemon_data.c +++ b/src/pokemon/pokemon_data.c diff --git a/src/pokemon_icon.c b/src/pokemon/pokemon_icon.c index 9bb3386e1..9bb3386e1 100644 --- a/src/pokemon_icon.c +++ b/src/pokemon/pokemon_icon.c diff --git a/src/pokemon_menu.c b/src/pokemon/pokemon_menu.c index bc5150a16..bc5150a16 100644 --- a/src/pokemon_menu.c +++ b/src/pokemon/pokemon_menu.c diff --git a/src/pokemon_size_record.c b/src/pokemon/pokemon_size_record.c index f2222bd3b..f2222bd3b 100644 --- a/src/pokemon_size_record.c +++ b/src/pokemon/pokemon_size_record.c diff --git a/src/pokemon_storage_system.c b/src/pokemon/pokemon_storage_system.c index 5e97523e2..5e97523e2 100644 --- a/src/pokemon_storage_system.c +++ b/src/pokemon/pokemon_storage_system.c diff --git a/src/pokemon_summary_screen.c b/src/pokemon/pokemon_summary_screen.c index 00a0bea29..00a0bea29 100644 --- a/src/pokemon_summary_screen.c +++ b/src/pokemon/pokemon_summary_screen.c diff --git a/src/rom6.c b/src/rom6.c index 3a5071034..b91a9b2c0 100644 --- a/src/rom6.c +++ b/src/rom6.c @@ -169,7 +169,7 @@ int SetUpFieldMove_Dig(void) static void sub_810B5D8(void) { - sub_8053014(); + Overworld_ResetStateAfterDigEscRope(); FieldEffectStart(FLDEFF_USE_DIG); gFieldEffectArguments[0] = gLastFieldPokeMenuOpened; } diff --git a/src/rom_8077ABC.c b/src/rom_8077ABC.c index 249146b37..172233e6d 100644 --- a/src/rom_8077ABC.c +++ b/src/rom_8077ABC.c @@ -102,8 +102,8 @@ extern u32 gTransformPersonalities[NUM_BATTLE_SLOTS]; extern u8 gBattleMonForms[NUM_BATTLE_SLOTS]; extern u16 gUnknown_0202F7CA[]; extern u8 gBattleMonSprites[NUM_BATTLE_SLOTS]; -extern u8 gBattleAnimPlayerMonIndex; -extern u8 gBattleAnimEnemyMonIndex; +extern u8 gBattleAnimBankAttacker; +extern u8 gBattleAnimBankTarget; extern s16 gBattleAnimArgs[8]; extern u8 gBanksBySide[NUM_BATTLE_SLOTS]; extern u8 gNoOfAllBanks; // gNumBattleMons? @@ -402,43 +402,43 @@ u8 sub_8077FC0(u8 slot) { return r6; } -u8 obj_id_for_side_relative_to_move(u8 a1) { +u8 GetAnimBankSpriteId(u8 whichBank) { u8 *sprites; - if (a1 == 0) { - if (sub_8078874(gBattleAnimPlayerMonIndex)) { + if (whichBank == ANIM_BANK_ATK) { + if (AnimBankSpriteExists(gBattleAnimBankAttacker)) { sprites = gBattleMonSprites; - return sprites[gBattleAnimPlayerMonIndex]; + return sprites[gBattleAnimBankAttacker]; } else { return 0xff; } - } else if (a1 == 1) { - if (sub_8078874(gBattleAnimEnemyMonIndex)) { + } else if (whichBank == ANIM_BANK_DEF) { + if (AnimBankSpriteExists(gBattleAnimBankTarget)) { sprites = gBattleMonSprites; - return sprites[gBattleAnimEnemyMonIndex]; + return sprites[gBattleAnimBankTarget]; } else { return 0xff; } - } else if (a1 == 2) { - if (!b_side_obj__get_some_boolean(gBattleAnimPlayerMonIndex ^ 2)) { + } else if (whichBank == ANIM_BANK_ATK_PARTNER) { + if (!IsAnimBankSpriteVisible(gBattleAnimBankAttacker ^ 2)) { return 0xff; } else { - return gBattleMonSprites[gBattleAnimPlayerMonIndex ^ 2]; + return gBattleMonSprites[gBattleAnimBankAttacker ^ 2]; } } else { - if (b_side_obj__get_some_boolean(gBattleAnimEnemyMonIndex ^ 2)) { - return gBattleMonSprites[gBattleAnimEnemyMonIndex ^ 2]; + if (IsAnimBankSpriteVisible(gBattleAnimBankTarget ^ 2)) { + return gBattleMonSprites[gBattleAnimBankTarget ^ 2]; } else { return 0xff; } } } -void oamt_set_x3A_32(struct Sprite *sprite, void (*callback)(struct Sprite*)) { +void StoreSpriteCallbackInData6(struct Sprite *sprite, void (*callback)(struct Sprite*)) { sprite->data6 = (u32)(callback) & 0xffff; sprite->data7 = (u32)(callback) >> 16; } -void sub_8078104(struct Sprite *sprite) { +void SetCallbackToStoredInData6(struct Sprite *sprite) { u32 callback = (u16)sprite->data6 | (sprite->data7 << 16); sprite->callback = (void (*)(struct Sprite *))callback; } @@ -455,7 +455,7 @@ void sub_8078114(struct Sprite *sprite) { } sprite->data3--; } else { - sub_8078104(sprite); + SetCallbackToStoredInData6(sprite); } } @@ -472,7 +472,7 @@ void sub_8078174(struct Sprite *sprite) { } sprite->data3--; } else { - sub_8078104(sprite); + SetCallbackToStoredInData6(sprite); } } @@ -494,7 +494,7 @@ void unref_sub_80781F0(struct Sprite *sprite) { } sprite->data3--; } else { - sub_8078104(sprite); + SetCallbackToStoredInData6(sprite); } } @@ -510,7 +510,7 @@ void sub_8078278(struct Sprite *sprite) { } sprite->data3--; } else { - sub_8078104(sprite); + SetCallbackToStoredInData6(sprite); } } @@ -518,7 +518,7 @@ void sub_80782D8(struct Sprite *sprite) { if (sprite->data0 > 0) { sprite->data0--; } else { - sub_8078104(sprite); + SetCallbackToStoredInData6(sprite); } } @@ -547,7 +547,7 @@ void sub_8078364(struct Sprite *sprite) { sprite->pos2.x += sprite->data1; sprite->pos2.y += sprite->data2; } else { - sub_8078104(sprite); + SetCallbackToStoredInData6(sprite); } } @@ -559,7 +559,7 @@ void sub_8078394(struct Sprite *sprite) { sprite->pos2.x = sprite->data3 >> 8; sprite->pos2.y = sprite->data4 >> 8; } else { - sub_8078104(sprite); + SetCallbackToStoredInData6(sprite); } } @@ -571,7 +571,7 @@ void sub_80783D0(struct Sprite *sprite) { sprite->pos2.x = sprite->data3 >> 8; sprite->pos2.y = sprite->data4 >> 8; } else { - sub_8078104(sprite); + SetCallbackToStoredInData6(sprite); } UpdateMonIconFrame(sprite); } @@ -579,8 +579,8 @@ void sub_80783D0(struct Sprite *sprite) { void unref_sub_8078414(struct Sprite *sprite) { sprite->data1 = sprite->pos1.x + sprite->pos2.x; sprite->data3 = sprite->pos1.y + sprite->pos2.y; - sprite->data2 = sub_8077ABC(gBattleAnimEnemyMonIndex, 2); - sprite->data4 = sub_8077ABC(gBattleAnimEnemyMonIndex, 3); + sprite->data2 = sub_8077ABC(gBattleAnimBankTarget, 2); + sprite->data4 = sub_8077ABC(gBattleAnimBankTarget, 3); sprite->callback = sub_80782F8; } @@ -590,7 +590,7 @@ void sub_8078458(struct Sprite *sprite) { gSprites[sprite->data3].pos2.x += sprite->data1; gSprites[sprite->data3].pos2.y += sprite->data2; } else { - sub_8078104(sprite); + SetCallbackToStoredInData6(sprite); } } @@ -602,7 +602,7 @@ void sub_80784A8(struct Sprite *sprite) { gSprites[sprite->data5].pos2.x = sprite->data3 >> 8; gSprites[sprite->data5].pos2.y = sprite->data4 >> 8; } else { - sub_8078104(sprite); + SetCallbackToStoredInData6(sprite); } } @@ -619,7 +619,7 @@ void sub_8078504(struct Sprite *sprite) { } } } else { - sub_8078104(sprite); + SetCallbackToStoredInData6(sprite); } } @@ -631,8 +631,8 @@ void move_anim_8074EE0(struct Sprite *sprite) { void unref_sub_8078588(struct Sprite *sprite) { sprite->data1 = sprite->pos1.x + sprite->pos2.x; sprite->data3 = sprite->pos1.y + sprite->pos2.y; - sprite->data2 = sub_8077ABC(gBattleAnimPlayerMonIndex, 2); - sprite->data4 = sub_8077ABC(gBattleAnimPlayerMonIndex, 3); + sprite->data2 = sub_8077ABC(gBattleAnimBankAttacker, 2); + sprite->data4 = sub_8077ABC(gBattleAnimBankAttacker, 3); sprite->callback = sub_80782F8; } @@ -643,13 +643,13 @@ void unref_sub_80785CC(struct Sprite *sprite) { void sub_80785E4(struct Sprite *sprite) { if (sprite->affineAnimEnded) { - sub_8078104(sprite); + SetCallbackToStoredInData6(sprite); } } void sub_8078600(struct Sprite *sprite) { if (sprite->animEnded) { - sub_8078104(sprite); + SetCallbackToStoredInData6(sprite); } } @@ -666,19 +666,19 @@ void sub_8078634(u8 task) { } void sub_8078650(struct Sprite *sprite) { - sprite->pos1.x = sub_8077ABC(gBattleAnimPlayerMonIndex, 2); - sprite->pos1.y = sub_8077ABC(gBattleAnimPlayerMonIndex, 3); + sprite->pos1.x = sub_8077ABC(gBattleAnimBankAttacker, 2); + sprite->pos1.y = sub_8077ABC(gBattleAnimBankAttacker, 3); } void sub_807867C(struct Sprite *sprite, s16 a2) { - u16 v1 = sub_8077ABC(gBattleAnimPlayerMonIndex, 0); - u16 v2 = sub_8077ABC(gBattleAnimEnemyMonIndex, 0); + u16 v1 = sub_8077ABC(gBattleAnimBankAttacker, 0); + u16 v2 = sub_8077ABC(gBattleAnimBankTarget, 0); if (v1 > v2) { sprite->pos1.x -= a2; } else if (v1 < v2) { sprite->pos1.x += a2; } else { - if (GetBankSide(gBattleAnimPlayerMonIndex)) { + if (GetBankSide(gBattleAnimBankAttacker)) { sprite->pos1.x -= a2; } else { sprite->pos1.x += a2; @@ -712,8 +712,8 @@ void oamt_add_pos2_onto_pos1(struct Sprite *sprite) { void sub_8078764(struct Sprite *sprite, u8 a2) { if (!a2) { - sprite->pos1.x = sub_8077EE4(gBattleAnimEnemyMonIndex, 0); - sprite->pos1.y = sub_8077EE4(gBattleAnimEnemyMonIndex, 1); + sprite->pos1.x = sub_8077EE4(gBattleAnimBankTarget, 0); + sprite->pos1.y = sub_8077EE4(gBattleAnimBankTarget, 1); } sub_807867C(sprite, gBattleAnimArgs[0]); sprite->pos1.y += gBattleAnimArgs[1]; @@ -721,11 +721,11 @@ void sub_8078764(struct Sprite *sprite, u8 a2) { void sub_80787B0(struct Sprite *sprite, u8 a2) { if (!a2) { - sprite->pos1.x = sub_8077EE4(gBattleAnimPlayerMonIndex, 0); - sprite->pos1.y = sub_8077EE4(gBattleAnimPlayerMonIndex, 1); + sprite->pos1.x = sub_8077EE4(gBattleAnimBankAttacker, 0); + sprite->pos1.y = sub_8077EE4(gBattleAnimBankAttacker, 1); } else { - sprite->pos1.x = sub_8077EE4(gBattleAnimPlayerMonIndex, 2); - sprite->pos1.y = sub_8077EE4(gBattleAnimPlayerMonIndex, 3); + sprite->pos1.x = sub_8077EE4(gBattleAnimBankAttacker, 2); + sprite->pos1.y = sub_8077EE4(gBattleAnimBankAttacker, 3); } sub_807867C(sprite, gBattleAnimArgs[0]); sprite->pos1.y += gBattleAnimArgs[1]; @@ -749,12 +749,12 @@ u8 GetBankByPlayerAI(u8 slot) { return i; } -bool8 sub_8078874(u8 slot) { +bool8 AnimBankSpriteExists(u8 slot) { if (IsContest()) { - if (gBattleAnimPlayerMonIndex == slot) { + if (gBattleAnimBankAttacker == slot) { return TRUE; } - if (gBattleAnimEnemyMonIndex == slot) { + if (gBattleAnimBankTarget == slot) { return TRUE; } return FALSE; @@ -796,7 +796,7 @@ void sub_8078954(struct Struct_sub_8078914 *unk) { unk->field_0 = (u8 *)0x6008000; unk->field_4 = (u8 *)0x600f000; unk->field_8 = 0xe; - } else if (GetBankIdentity_permutated(gBattleAnimPlayerMonIndex) == 1) { + } else if (GetBankIdentity_permutated(gBattleAnimBankAttacker) == 1) { unk->field_0 = (u8 *)0x6004000; unk->field_4 = (u8 *)0x600e000; unk->field_8 = 0x8; @@ -906,7 +906,7 @@ bool8 sub_8078B5C(struct Sprite *sprite) { void sub_8078BB8(struct Sprite *sprite) { if (sub_8078B5C(sprite)) { - sub_8078104(sprite); + SetCallbackToStoredInData6(sprite); } } @@ -986,7 +986,7 @@ bool8 sub_8078CE8(struct Sprite *sprite) { void sub_8078D44(struct Sprite *sprite) { if (sub_8078CE8(sprite)) { - sub_8078104(sprite); + SetCallbackToStoredInData6(sprite); } } @@ -1024,7 +1024,7 @@ void obj_id_set_rotscale(u8 sprite, s16 xScale, s16 yScale, u16 rotation) { bool8 sub_8078E38() { if (IsContest()) { - if (gSprites[obj_id_for_side_relative_to_move(0)].data2 == 0xc9 /* XXX SPECIES_UNOWN? */) { + if (gSprites[GetAnimBankSpriteId(0)].data2 == 0xc9 /* XXX SPECIES_UNOWN? */) { return FALSE; } return TRUE; @@ -1035,7 +1035,7 @@ bool8 sub_8078E38() { void sub_8078E70(u8 sprite, u8 a2) { struct Struct_2017810 *unk; u8 r7 = gSprites[sprite].data0; - if (IsContest() || b_side_obj__get_some_boolean(r7)) { + if (IsContest() || IsAnimBankSpriteVisible(r7)) { gSprites[sprite].invisible = FALSE; } gSprites[sprite].oam.objMode = a2; @@ -1096,12 +1096,12 @@ void sub_8079098(struct Sprite *sprite) { CalcCenterToCornerVec(sprite, sprite->oam.shape, sprite->oam.size, sprite->oam.affineMode); } -u16 sub_80790D8(s16 a, s16 b) { +static u16 ArcTan2_(s16 a, s16 b) { return ArcTan2(a, b); } u16 sub_80790F0(s16 a, s16 b) { - u16 var = sub_80790D8(a, b); + u16 var = ArcTan2_(a, b); return -var; } @@ -1140,22 +1140,22 @@ u32 sub_80791A8(u8 a1, u8 a2, u8 a3, u8 a4, u8 a5, u8 a6, u8 a7) { } } if (a2) { - shift = gBattleAnimPlayerMonIndex + 16; + shift = gBattleAnimBankAttacker + 16; var |= 1 << shift; } if (a3) { - shift = gBattleAnimEnemyMonIndex + 16; + shift = gBattleAnimBankTarget + 16; var |= 1 << shift; } if (a4) { - if (b_side_obj__get_some_boolean(gBattleAnimPlayerMonIndex ^ 2)) { - shift = (gBattleAnimPlayerMonIndex ^ 2) + 16; + if (IsAnimBankSpriteVisible(gBattleAnimBankAttacker ^ 2)) { + shift = (gBattleAnimBankAttacker ^ 2) + 16; var |= 1 << shift; } } if (a5) { - if (b_side_obj__get_some_boolean(gBattleAnimEnemyMonIndex ^ 2)) { - shift = (gBattleAnimEnemyMonIndex ^ 2) + 16; + if (IsAnimBankSpriteVisible(gBattleAnimBankTarget ^ 2)) { + shift = (gBattleAnimBankTarget ^ 2) + 16; var |= 1 << shift; } } @@ -1184,24 +1184,24 @@ u32 sub_80792C0(u8 a1, u8 a2, u8 a3, u8 a4) { } } else { if (a1) { - if (b_side_obj__get_some_boolean(GetBankByPlayerAI(0))) { + if (IsAnimBankSpriteVisible(GetBankByPlayerAI(0))) { var |= 1 << (GetBankByPlayerAI(0) + 16); } } if (a2) { - if (b_side_obj__get_some_boolean(GetBankByPlayerAI(2))) { + if (IsAnimBankSpriteVisible(GetBankByPlayerAI(2))) { shift = GetBankByPlayerAI(2) + 16; var |= 1 << shift; } } if (a3) { - if (b_side_obj__get_some_boolean(GetBankByPlayerAI(1))) { + if (IsAnimBankSpriteVisible(GetBankByPlayerAI(1))) { shift = GetBankByPlayerAI(1) + 16; var |= 1 << shift; } } if (a4) { - if (b_side_obj__get_some_boolean(GetBankByPlayerAI(3))) { + if (IsAnimBankSpriteVisible(GetBankByPlayerAI(3))) { shift = GetBankByPlayerAI(3) + 16; var |= 1 << shift; } @@ -1252,24 +1252,24 @@ void sub_807941C(struct Sprite *sprite) { v2 = 1; } sub_80787B0(sprite, v1); - if (GetBankSide(gBattleAnimPlayerMonIndex)) { + if (GetBankSide(gBattleAnimBankAttacker)) { gBattleAnimArgs[2] = -gBattleAnimArgs[2]; } sprite->data0 = gBattleAnimArgs[4]; - sprite->data2 = sub_8077ABC(gBattleAnimEnemyMonIndex, 2) + gBattleAnimArgs[2]; - sprite->data4 = sub_8077ABC(gBattleAnimEnemyMonIndex, v2) + gBattleAnimArgs[3]; + sprite->data2 = sub_8077ABC(gBattleAnimBankTarget, 2) + gBattleAnimArgs[2]; + sprite->data4 = sub_8077ABC(gBattleAnimBankTarget, v2) + gBattleAnimArgs[3]; sprite->callback = sub_8078B34; - oamt_set_x3A_32(sprite, move_anim_8072740); + StoreSpriteCallbackInData6(sprite, move_anim_8072740); } void sub_80794A8(struct Sprite *sprite) { sub_80787B0(sprite, 1); - if (GetBankSide(gBattleAnimPlayerMonIndex)) { + if (GetBankSide(gBattleAnimBankAttacker)) { gBattleAnimArgs[2] = -gBattleAnimArgs[2]; } sprite->data0 = gBattleAnimArgs[4]; - sprite->data2 = sub_8077ABC(gBattleAnimEnemyMonIndex, 2) + gBattleAnimArgs[2]; - sprite->data4 = sub_8077ABC(gBattleAnimEnemyMonIndex, 3) + gBattleAnimArgs[3]; + sprite->data2 = sub_8077ABC(gBattleAnimBankTarget, 2) + gBattleAnimArgs[2]; + sprite->data4 = sub_8077ABC(gBattleAnimBankTarget, 3) + gBattleAnimArgs[3]; sprite->data5 = gBattleAnimArgs[5]; sub_80786EC(sprite); sprite->callback = sub_8079518; @@ -1292,12 +1292,12 @@ void sub_8079534(struct Sprite *sprite) { } if (!gBattleAnimArgs[5]) { sub_80787B0(sprite, r4); - slot = gBattleAnimPlayerMonIndex; + slot = gBattleAnimBankAttacker; } else { sub_8078764(sprite, r4); - slot = gBattleAnimEnemyMonIndex; + slot = gBattleAnimBankTarget; } - if (GetBankSide(gBattleAnimPlayerMonIndex)) { + if (GetBankSide(gBattleAnimBankAttacker)) { gBattleAnimArgs[2] = -gBattleAnimArgs[2]; } sub_8078764(sprite, r4); @@ -1305,12 +1305,12 @@ void sub_8079534(struct Sprite *sprite) { sprite->data2 = sub_8077ABC(slot, 2) + gBattleAnimArgs[2]; sprite->data4 = sub_8077ABC(slot, r7) + gBattleAnimArgs[3]; sprite->callback = sub_8078B34; - oamt_set_x3A_32(sprite, move_anim_8072740); + StoreSpriteCallbackInData6(sprite, move_anim_8072740); } s16 duplicate_obj_of_side_rel2move_in_transparent_mode(u8 a1) { u16 i; - u8 sprite = obj_id_for_side_relative_to_move(a1); + u8 sprite = GetAnimBankSpriteId(a1); if (sprite != 0xff) { for (i = 0; i < 0x40; i++) { if (gSprites[i].inUse) { @@ -1380,7 +1380,7 @@ void sub_80796F8(u8 taskId) { } void sub_8079790(u8 task) { - u8 sprite = obj_id_for_side_relative_to_move(gBattleAnimArgs[0]); + u8 sprite = GetAnimBankSpriteId(gBattleAnimArgs[0]); if (sprite == 0xff) { DestroyAnimVisualTask(task); return; @@ -1624,24 +1624,24 @@ void sub_8079CEC(u8 task) { } void unref_sub_8079D20(u8 priority) { - if (b_side_obj__get_some_boolean(gBattleAnimEnemyMonIndex)) { - gSprites[gBattleMonSprites[gBattleAnimEnemyMonIndex]].oam.priority = priority; + if (IsAnimBankSpriteVisible(gBattleAnimBankTarget)) { + gSprites[gBattleMonSprites[gBattleAnimBankTarget]].oam.priority = priority; } - if (b_side_obj__get_some_boolean(gBattleAnimPlayerMonIndex)) { - gSprites[gBattleMonSprites[gBattleAnimPlayerMonIndex]].oam.priority = priority; + if (IsAnimBankSpriteVisible(gBattleAnimBankAttacker)) { + gSprites[gBattleMonSprites[gBattleAnimBankAttacker]].oam.priority = priority; } - if (b_side_obj__get_some_boolean(gBattleAnimEnemyMonIndex ^ 2)) { - gSprites[gBattleMonSprites[gBattleAnimEnemyMonIndex ^ 2]].oam.priority = priority; + if (IsAnimBankSpriteVisible(gBattleAnimBankTarget ^ 2)) { + gSprites[gBattleMonSprites[gBattleAnimBankTarget ^ 2]].oam.priority = priority; } - if (b_side_obj__get_some_boolean(gBattleAnimPlayerMonIndex ^ 2)) { - gSprites[gBattleMonSprites[gBattleAnimPlayerMonIndex ^ 2]].oam.priority = priority; + if (IsAnimBankSpriteVisible(gBattleAnimBankAttacker ^ 2)) { + gSprites[gBattleMonSprites[gBattleAnimBankAttacker ^ 2]].oam.priority = priority; } } void sub_8079E24() { int i; for (i = 0; i < gNoOfAllBanks; i++) { - if (b_side_obj__get_some_boolean(i)) { + if (IsAnimBankSpriteVisible(i)) { gSprites[gBattleMonSprites[i]].subpriority = sub_8079E90(i); gSprites[gBattleMonSprites[i]].oam.priority = 2; } @@ -1706,7 +1706,7 @@ u8 sub_8079F44(u16 species, u8 isBackpic, u8 a3, s16 a4, s16 a5, u8 a6, u32 a7, u16 sheet = LoadSpriteSheet(&gUnknown_0837F5E0[a3]); u16 palette = AllocSpritePalette(gSpriteTemplate_837F5B0[a3].paletteTag); if (!isBackpic) { - LoadCompressedPalette(species_and_otid_get_pal(species, a8, a7), (palette * 0x10) + 0x100, 0x20); + LoadCompressedPalette(GetMonSpritePalFromOtIdPersonality(species, a8, a7), (palette * 0x10) + 0x100, 0x20); LoadSpecialPokePic( &gMonFrontPicTable[species], gMonFrontPicCoords[species].coords, @@ -1719,7 +1719,7 @@ u8 sub_8079F44(u16 species, u8 isBackpic, u8 a3, s16 a4, s16 a5, u8 a6, u32 a7, ); } else { LoadCompressedPalette( - species_and_otid_get_pal(species, a8, a7), (palette * 0x10) + 0x100, 0x20); + GetMonSpritePalFromOtIdPersonality(species, a8, a7), (palette * 0x10) + 0x100, 0x20); LoadSpecialPokePic( &gMonBackPicTable[species], gMonBackPicCoords[species].coords, @@ -1892,7 +1892,7 @@ u8 sub_807A4A0(int a1, u8 sprite, int a3) { void sub_807A544(struct Sprite *sprite) { sub_8078650(sprite); - if (GetBankSide(gBattleAnimPlayerMonIndex)) { + if (GetBankSide(gBattleAnimBankAttacker)) { sprite->pos1.x -= gBattleAnimArgs[0]; gBattleAnimArgs[3] = -gBattleAnimArgs[3]; sprite->hFlip = TRUE; @@ -1904,12 +1904,12 @@ void sub_807A544(struct Sprite *sprite) { sprite->data1 = gBattleAnimArgs[3]; sprite->data3 = gBattleAnimArgs[4]; sprite->data5 = gBattleAnimArgs[5]; - oamt_set_x3A_32(sprite, move_anim_8074EE0); + StoreSpriteCallbackInData6(sprite, move_anim_8074EE0); sprite->callback = sub_8078504; } void sub_807A5C4(struct Sprite *sprite) { - if (GetBankSide(gBattleAnimPlayerMonIndex)) { + if (GetBankSide(gBattleAnimBankAttacker)) { sprite->pos1.x -= gBattleAnimArgs[0]; gBattleAnimArgs[3] *= -1; } else { @@ -1921,28 +1921,28 @@ void sub_807A5C4(struct Sprite *sprite) { sprite->data3 = gBattleAnimArgs[4]; sprite->data5 = gBattleAnimArgs[5]; StartSpriteAnim(sprite, gBattleAnimArgs[6]); - oamt_set_x3A_32(sprite, move_anim_8074EE0); + StoreSpriteCallbackInData6(sprite, move_anim_8074EE0); sprite->callback = sub_8078504; } void sub_807A63C(struct Sprite *sprite) { sub_8078650(sprite); - if (GetBankSide(gBattleAnimPlayerMonIndex)) { + if (GetBankSide(gBattleAnimBankAttacker)) { sprite->pos1.x -= gBattleAnimArgs[0]; } else { sprite->pos1.x += gBattleAnimArgs[0]; } sprite->pos1.y += gBattleAnimArgs[1]; sprite->callback = sub_8078600; - oamt_set_x3A_32(sprite, move_anim_8072740); + StoreSpriteCallbackInData6(sprite, move_anim_8072740); } void sub_807A69C(u8 taskId) { u16 src; u16 dest; struct Task *task = &gTasks[taskId]; - task->data[0] = obj_id_for_side_relative_to_move(0); - task->data[1] = (GetBankSide(gBattleAnimPlayerMonIndex)) ? -8 : 8; + task->data[0] = GetAnimBankSpriteId(0); + task->data[1] = (GetBankSide(gBattleAnimBankAttacker)) ? -8 : 8; task->data[2] = 0; task->data[3] = 0; gSprites[task->data[0]].pos2.x -= task->data[0]; @@ -1951,7 +1951,7 @@ void sub_807A69C(u8 taskId) { dest = (task->data[4] + 0x10) * 0x10; src = (gSprites[task->data[0]].oam.paletteNum + 0x10) * 0x10; - task->data[6] = sub_8079E90(gBattleAnimPlayerMonIndex); + task->data[6] = sub_8079E90(gBattleAnimBankAttacker); if (task->data[6] == 20 || task->data[6] == 40) { task->data[6] = 2; } else { @@ -2012,9 +2012,9 @@ void sub_807A8D4(struct Sprite *sprite) { } void sub_807A908(struct Sprite *sprite) { - sprite->pos1.x = sub_8077ABC(gBattleAnimPlayerMonIndex, 2); - sprite->pos1.y = sub_8077ABC(gBattleAnimPlayerMonIndex, 3); - if (!GetBankSide(gBattleAnimPlayerMonIndex)) { + sprite->pos1.x = sub_8077ABC(gBattleAnimBankAttacker, 2); + sprite->pos1.y = sub_8077ABC(gBattleAnimBankAttacker, 3); + if (!GetBankSide(gBattleAnimBankAttacker)) { sprite->data0 = 5; } else { sprite->data0 = -10; @@ -2041,7 +2041,7 @@ void sub_807A9BC(struct Sprite *sprite) { sprite->data0 = gBattleAnimArgs[2]; sprite->data2 = sprite->pos1.x + gBattleAnimArgs[4]; sprite->data4 = sprite->pos1.y + gBattleAnimArgs[5]; - if (!GetBankSide(gBattleAnimEnemyMonIndex)) { + if (!GetBankSide(gBattleAnimBankTarget)) { x = (u16)gBattleAnimArgs[4] + 30; sprite->pos1.x += x; sprite->pos1.y = gBattleAnimArgs[5] - 20; @@ -2051,5 +2051,5 @@ void sub_807A9BC(struct Sprite *sprite) { sprite->pos1.y = gBattleAnimArgs[5] - 80; } sprite->callback = sub_8078B34; - oamt_set_x3A_32(sprite, move_anim_8072740); + StoreSpriteCallbackInData6(sprite, move_anim_8072740); } diff --git a/src/berry_blender.c b/src/scene/berry_blender.c index 455aabc45..7ffcc5185 100644 --- a/src/berry_blender.c +++ b/src/scene/berry_blender.c @@ -828,7 +828,7 @@ static bool8 sub_804E2EC(void) switch (gBerryBlenderData->field_1) { case 0: - sub_800D238(gUnknown_08E6C100, &ewram[0x10000]); + LZDecompressWram(gUnknown_08E6C100, &ewram[0x10000]); gBerryBlenderData->field_1++; break; case 1: @@ -862,11 +862,11 @@ static bool8 sub_804E2EC(void) } break; case 3: - sub_800D238(gUnknown_08E6C920, &ewram[0x10000]); + LZDecompressWram(gUnknown_08E6C920, &ewram[0x10000]); gBerryBlenderData->field_1++; break; case 4: - sub_800D238(gUnknown_08E6D354, &ewram[0x13000]); + LZDecompressWram(gUnknown_08E6D354, &ewram[0x13000]); gBerryBlenderData->field_1++; break; case 5: diff --git a/src/contest_painting.c b/src/scene/contest_painting.c index 391cbdfaa..3662efdec 100644 --- a/src/contest_painting.c +++ b/src/scene/contest_painting.c @@ -353,7 +353,7 @@ static void sub_8106AC4(u16 species, u8 arg1) void *pal; // Unsure what gUnknown_03005E8C->var0 is supposed to be. - pal = species_and_otid_get_pal(species, gUnknown_03005E8C->var4, gUnknown_03005E8C->var0); + pal = GetMonSpritePalFromOtIdPersonality(species, gUnknown_03005E8C->var4, gUnknown_03005E8C->var0); LZDecompressVram(pal, gUnknown_03005E90); if (arg1 == 1) @@ -402,7 +402,7 @@ static void sub_8106AC4(u16 arg0, u8 arg2) ldr r1, [r0, 0x4]\n\ ldr r2, [r0]\n\ adds r0, r6, 0\n\ - bl species_and_otid_get_pal\n\ + bl GetMonSpritePalFromOtIdPersonality\n\ ldr r1, _08106B2C @ =gUnknown_03005E90\n\ mov r8, r1\n\ ldr r1, [r1]\n\ diff --git a/src/credits.c b/src/scene/credits.c index df70674b6..cf10137c1 100644 --- a/src/credits.c +++ b/src/scene/credits.c @@ -1387,7 +1387,7 @@ static u8 sub_81456B4(u16 species, u16 x, u16 y, u16 position) 1 ); - lzPaletteData = species_and_otid_get_pal(species, 0, 0xFFFF); + lzPaletteData = GetMonSpritePalFromOtIdPersonality(species, 0, 0xFFFF); LoadCompressedPalette(lzPaletteData, 0x100 + (position * 16), 0x20); sub_8143648(position, position); @@ -1433,7 +1433,7 @@ static void sub_81458DC(void) for (dexNum = 1, seenTypesCount = 0; dexNum < 386; dexNum++) { - if (GetNationalPokedexFlag(dexNum, 1)) + if (GetSetPokedexFlag(dexNum, 1)) { unk201C000->unk90[seenTypesCount] = dexNum; seenTypesCount++; diff --git a/src/cute_sketch.c b/src/scene/cute_sketch.c index 5317bc334..5317bc334 100644 --- a/src/cute_sketch.c +++ b/src/scene/cute_sketch.c diff --git a/src/egg_hatch.c b/src/scene/egg_hatch.c index e85ca01af..032dcd284 100644 --- a/src/egg_hatch.c +++ b/src/scene/egg_hatch.c @@ -46,10 +46,10 @@ extern const struct SpriteSheet sUnknown_0820A3B0; extern const struct SpriteSheet sUnknown_0820A3B8; extern const struct SpritePalette sUnknown_0820A3C0; -bool8 GetNationalPokedexFlag(u16 nationalNum, u8 caseID); +bool8 GetSetPokedexFlag(u16 nationalNum, u8 caseID); u8* GetMonNick(struct Pokemon* mon, u8* dst); u8 sav1_map_get_name(void); -const struct CompressedSpritePalette* sub_8040990(struct Pokemon* mon); //gets pokemon palette address +const struct CompressedSpritePalette* GetMonSpritePalStruct(struct Pokemon* mon); //gets pokemon palette address void sub_8080990(void); static void Task_EggHatch(u8 taskID); @@ -287,8 +287,8 @@ static void AddHatchedMonToParty(u8 id) SetMonData(mon, MON_DATA_NICKNAME, name); pokeNum = SpeciesToNationalPokedexNum(pokeNum); - GetNationalPokedexFlag(pokeNum, 2); - GetNationalPokedexFlag(pokeNum, 3); + GetSetPokedexFlag(pokeNum, 2); + GetSetPokedexFlag(pokeNum, 3); GetMonNick(mon, gStringVar1); @@ -417,11 +417,11 @@ static u8 EggHatchCreateMonSprite(u8 a0, u8 switchID, u8 pokeID) u16 species = GetMonData(mon, MON_DATA_SPECIES); u32 pid = GetMonData(mon, MON_DATA_PERSONALITY); HandleLoadSpecialPokePic(&gMonFrontPicTable[species], gMonFrontPicCoords[species].coords, gMonFrontPicCoords[species].y_offset,(u32)(&ewram[0]), gUnknown_081FAF4C[2 * a0 + 1], species, pid); - LoadCompressedObjectPalette(sub_8040990(mon)); + LoadCompressedObjectPalette(GetMonSpritePalStruct(mon)); } break; case 1: - GetMonSpriteTemplate_803C56C(sub_8040990(mon)->tag, r5); + GetMonSpriteTemplate_803C56C(GetMonSpritePalStruct(mon)->tag, r5); spriteID = CreateSprite(&gUnknown_02024E8C, 120, 70, 6); gSprites[spriteID].invisible = 1; gSprites[spriteID].callback = SpriteCallbackDummy; diff --git a/src/evolution_graphics.c b/src/scene/evolution_graphics.c index 1fd5bf8fa..1fd5bf8fa 100644 --- a/src/evolution_graphics.c +++ b/src/scene/evolution_graphics.c diff --git a/src/evolution_scene.c b/src/scene/evolution_scene.c index 57d3152f3..24168dc56 100644 --- a/src/evolution_scene.c +++ b/src/scene/evolution_scene.c @@ -236,7 +236,7 @@ void EvolutionScene(struct Pokemon* mon, u16 speciesToEvolve, bool8 canStopEvo, gMonFrontPicCoords[currSpecies].y_offset, (void*)(0x2000000), gUnknown_081FAF4C[1], currSpecies); - pokePal = (void*) sub_80409C8(currSpecies, TiD, PiD); + pokePal = (void*) GetMonSpritePalStructFromOtIdPersonality(currSpecies, TiD, PiD); LoadCompressedPalette(*pokePal, 0x110, 0x20); GetMonSpriteTemplate_803C56C(currSpecies, 1); @@ -253,7 +253,7 @@ void EvolutionScene(struct Pokemon* mon, u16 speciesToEvolve, bool8 canStopEvo, gMonFrontPicCoords[speciesToEvolve].y_offset, (void*)(0x2000000), gUnknown_081FAF4C[3], speciesToEvolve); - pokePal = (void*) sub_80409C8(speciesToEvolve, TiD, PiD); + pokePal = (void*) GetMonSpritePalStructFromOtIdPersonality(speciesToEvolve, TiD, PiD); LoadCompressedPalette(*pokePal, 0x120, 0x20); GetMonSpriteTemplate_803C56C(speciesToEvolve, 3); @@ -333,7 +333,7 @@ static void CB2_EvolutionSceneLoadGraphics(void) gMonFrontPicCoords[postEvoSpecies].y_offset, (void*)(0x2000000), gUnknown_081FAF4C[3], postEvoSpecies); - pokePal = (void*) sub_80409C8(postEvoSpecies, TiD, PiD); + pokePal = (void*) GetMonSpritePalStructFromOtIdPersonality(postEvoSpecies, TiD, PiD); LoadCompressedPalette(*pokePal, 0x120, 0x20); GetMonSpriteTemplate_803C56C(postEvoSpecies, 3); @@ -403,7 +403,7 @@ static void CB2_TradeEvolutionSceneLoadGraphics(void) gMonFrontPicCoords[postEvoSpecies].y_offset, (void*)(0x2000000), gUnknown_081FAF4C[3], postEvoSpecies); - pokePal = (void*) sub_80409C8(postEvoSpecies, TiD, PiD); + pokePal = (void*) GetMonSpritePalStructFromOtIdPersonality(postEvoSpecies, TiD, PiD); LoadCompressedPalette(*pokePal, 0x120, 0x20); gMain.state++; } @@ -453,7 +453,7 @@ void TradeEvolutionScene(struct Pokemon* mon, u16 speciesToEvolve, u8 preEvoSpri gMonFrontPicCoords[speciesToEvolve].y_offset, (void*)(0x2000000), gUnknown_081FAF4C[1], speciesToEvolve); - pokePal = (void*) sub_80409C8(speciesToEvolve, TiD, PiD); + pokePal = (void*) GetMonSpritePalStructFromOtIdPersonality(speciesToEvolve, TiD, PiD); LoadCompressedPalette(*pokePal, 0x120, 0x20); GetMonSpriteTemplate_803C56C(speciesToEvolve, 1); @@ -527,8 +527,8 @@ static void CreateShedinja(u16 preEvoSpecies, struct Pokemon* mon) // can't match it otherwise, ehh EvoTable = gEvolutionTable; Evos = EvoTable + preEvoSpecies; - GetNationalPokedexFlag(SpeciesToNationalPokedexNum(Evos->evolutions[1].targetSpecies), 2); - GetNationalPokedexFlag(SpeciesToNationalPokedexNum(Evos->evolutions[1].targetSpecies), 3); + GetSetPokedexFlag(SpeciesToNationalPokedexNum(Evos->evolutions[1].targetSpecies), 2); + GetSetPokedexFlag(SpeciesToNationalPokedexNum(Evos->evolutions[1].targetSpecies), 3); if (GetMonData(Shedinja, MON_DATA_SPECIES) == SPECIES_SHEDINJA && GetMonData(Shedinja, MON_DATA_LANGUAGE) == LANGUAGE_JAPANESE @@ -654,8 +654,8 @@ static void Task_EvolutionScene(u8 taskID) SetMonData(mon, MON_DATA_SPECIES, (void*)(&gTasks[taskID].tPostEvoSpecies)); CalculateMonStats(mon); EvolutionRenameMon(mon, gTasks[taskID].tPreEvoSpecies, gTasks[taskID].tPostEvoSpecies); - GetNationalPokedexFlag(SpeciesToNationalPokedexNum(gTasks[taskID].tPostEvoSpecies), 2); - GetNationalPokedexFlag(SpeciesToNationalPokedexNum(gTasks[taskID].tPostEvoSpecies), 3); + GetSetPokedexFlag(SpeciesToNationalPokedexNum(gTasks[taskID].tPostEvoSpecies), 2); + GetSetPokedexFlag(SpeciesToNationalPokedexNum(gTasks[taskID].tPostEvoSpecies), 3); IncrementGameStat(14); } break; @@ -667,7 +667,7 @@ static void Task_EvolutionScene(u8 taskID) { u8 text[20]; - sub_8053E90(); + Overworld_PlaySpecialMapMusic(); gTasks[taskID].tBits |= TASK_BIT_LEARN_MOVE; gTasks[taskID].tLearnsFirstMove = FALSE; gTasks[taskID].tLearnMoveState = 0; @@ -691,7 +691,7 @@ static void Task_EvolutionScene(u8 taskID) if (!gPaletteFade.active) { if (!(gTasks[taskID].tBits & TASK_BIT_LEARN_MOVE)) - sub_8053E90(); + Overworld_PlaySpecialMapMusic(); if (!gTasks[taskID].tEvoWasStopped) CreateShedinja(gTasks[taskID].tPreEvoSpecies, mon); DestroyTask(taskID); @@ -996,8 +996,8 @@ static void Task_TradeEvolutionScene(u8 taskID) SetMonData(mon, MON_DATA_SPECIES, (void*)(&gTasks[taskID].tPostEvoSpecies)); CalculateMonStats(mon); EvolutionRenameMon(mon, gTasks[taskID].tPreEvoSpecies, gTasks[taskID].tPostEvoSpecies); - GetNationalPokedexFlag(SpeciesToNationalPokedexNum(gTasks[taskID].tPostEvoSpecies), 2); - GetNationalPokedexFlag(SpeciesToNationalPokedexNum(gTasks[taskID].tPostEvoSpecies), 3); + GetSetPokedexFlag(SpeciesToNationalPokedexNum(gTasks[taskID].tPostEvoSpecies), 2); + GetSetPokedexFlag(SpeciesToNationalPokedexNum(gTasks[taskID].tPostEvoSpecies), 3); IncrementGameStat(14); } break; diff --git a/src/hall_of_fame.c b/src/scene/hall_of_fame.c index 10c999ef3..6f7df576b 100644 --- a/src/hall_of_fame.c +++ b/src/scene/hall_of_fame.c @@ -1347,7 +1347,7 @@ static u32 HallOfFame_LoadPokemonPic(u16 species, s16 posX, s16 posY, u16 pokeID LoadSpecialPokePic(&gMonFrontPicTable[species], gMonFrontPicCoords[species].coords, gMonFrontPicCoords[species].y_offset, 0x2000000, gUnknown_0840B5A0[pokeID], species, pid, 1); - pokePal = species_and_otid_get_pal(species, tid, pid); + pokePal = GetMonSpritePalFromOtIdPersonality(species, tid, pid); LoadCompressedPalette(pokePal, 16 * pokeID + 256, 0x20); sub_8143648(pokeID, pokeID); diff --git a/src/intro.c b/src/scene/intro.c index a43e0356c..dd7cc858c 100644 --- a/src/intro.c +++ b/src/scene/intro.c @@ -1785,7 +1785,7 @@ static u16 sub_813CE88(u16 species, s16 x, s16 y, u16 d, u8 front) LoadSpecialPokePic(&gMonFrontPicTable[species], gMonFrontPicCoords[species].coords, gMonFrontPicCoords[species].y_offset, 0x2000000, gUnknown_0840B5A0[d], species, 0, 1); else LoadSpecialPokePic(&gMonBackPicTable[species], gMonBackPicCoords[species].coords, gMonBackPicCoords[species].y_offset, 0x2000000, gUnknown_0840B5A0[d], species, 0, 0); - lzPaletteData = species_and_otid_get_pal(species, 0, 0xFFFF); + lzPaletteData = GetMonSpritePalFromOtIdPersonality(species, 0, 0xFFFF); LoadCompressedPalette(lzPaletteData, 0x100 + d * 0x10, 0x20); sub_8143648(d, d); spriteId = CreateSprite(&gUnknown_02024E8C, x, y, (d + 1) * 4); diff --git a/src/intro_credits_graphics.c b/src/scene/intro_credits_graphics.c index cd0589af8..cd0589af8 100755 --- a/src/intro_credits_graphics.c +++ b/src/scene/intro_credits_graphics.c diff --git a/src/new_game.c b/src/scene/new_game.c index 3f9e9f5a1..6ab21c544 100644 --- a/src/new_game.c +++ b/src/scene/new_game.c @@ -99,7 +99,7 @@ void sub_8052DE4(void) void WarpToTruck(void) { - warp1_set(25, 40, -1, -1, -1); // inside of truck + Overworld_SetWarpDestination(25, 40, -1, -1, -1); // inside of truck warp_in(); } diff --git a/src/title_screen.c b/src/scene/title_screen.c index 2503b0654..2503b0654 100644 --- a/src/title_screen.c +++ b/src/scene/title_screen.c diff --git a/src/script_pokemon_util_80C4BF0.c b/src/script_pokemon_util_80C4BF0.c index 323df991a..f98293a90 100644 --- a/src/script_pokemon_util_80C4BF0.c +++ b/src/script_pokemon_util_80C4BF0.c @@ -433,7 +433,7 @@ void ShowContestEntryMonPic(void) gUnknown_081FAF4C[1], species, var1); - palette = sub_80409C8(species, var2, var1); + palette = GetMonSpritePalStructFromOtIdPersonality(species, var2, var1); LoadCompressedObjectPalette(palette); GetMonSpriteTemplate_803C56C(species, 1); gUnknown_02024E8C.paletteTag = palette->tag; @@ -560,8 +560,8 @@ u8 ScriptGiveMon(u16 species, u8 level, u16 item, u32 unused1, u32 unused2, u8 u { case 0: case 1: - GetNationalPokedexFlag(nationalDexNum, 2); - GetNationalPokedexFlag(nationalDexNum, 3); + GetSetPokedexFlag(nationalDexNum, 2); + GetSetPokedexFlag(nationalDexNum, 3); break; } return sentToPc; diff --git a/src/sound_check_menu.c b/src/sound_check_menu.c deleted file mode 100644 index d97ae6d86..000000000 --- a/src/sound_check_menu.c +++ /dev/null @@ -1,2199 +0,0 @@ -#include "global.h" -#include "sprite.h" -#include "palette.h" -#include "task.h" -#include "m4a.h" -#include "main.h" -#include "text.h" -#include "menu.h" -#include "songs.h" -#include "title_screen.h" -#include "sound.h" -#include "pokedex_cry_screen.h" - -// local task defines -#define WINDOW_SELECTED data[0] -#define BGM_INDEX data[1] -#define SE_INDEX data[2] -#define UNK_DATA3 data[3] -#define UNK_DATA4 data[4] -// data 5-7 are not used -// i dont have a define for data 8 yet because its used in a nonmatching and I can't be sure yet its actually used. - -// window selections -enum -{ - BGM_WINDOW, - SE_WINDOW -}; - -// driver test cry enums -enum -{ - CRY_TEST_UNK0, - CRY_TEST_VOLUME, - CRY_TEST_PANPOT, - CRY_TEST_PITCH, - CRY_TEST_LENGTH, - CRY_TEST_RELEASE, - CRY_TEST_PROGRESS, - CRY_TEST_CHORUS, - CRY_TEST_PRIORITY -}; - -// minmax range enums -enum -{ - MIN, - MAX -}; - -extern struct ToneData voicegroup_84537C0[]; -extern struct ToneData voicegroup_8452590[]; -extern struct ToneData voicegroup_8453DC0[]; -extern struct ToneData voicegroup_8452B90[]; -extern struct ToneData voicegroup_84543C0[]; -extern struct ToneData voicegroup_8453190[]; -extern struct ToneData voicegroup_84549C0[]; -extern struct ToneData voicegroup_8453790[]; - -static EWRAM_DATA u8 gUnknown_020387B0 = 0; -static EWRAM_DATA u8 gUnknown_020387B1 = 0; -static EWRAM_DATA u8 gUnknown_020387B2 = 0; -static EWRAM_DATA s8 gUnknown_020387B3 = 0; -static EWRAM_DATA int gUnknown_020387B4[9] = {0}; -static EWRAM_DATA u8 gUnknown_020387D8 = 0; -static EWRAM_DATA u8 gUnknown_020387D9 = 0; - -extern u16 gUnknown_03005D34; -extern u8 gUnknown_03005E98; - -struct MusicPlayerInfo *gUnknown_03005D30; - -extern struct MusicPlayerInfo gMPlay_BGM; - -void sub_80BA258(u8); -void sub_80BA384(u8); -void sub_80BA65C(u8); -void sub_80BA68C(u8); -void sub_80BA6B8(u8); -void sub_80BA700(u16, u16, u16); -void sub_80BA79C(const u8 *const, u16, u16); -void sub_80BA800(u8); -void sub_80BAA48(u8); -void sub_80BACDC(s8); -void sub_80BAD5C(void); -void sub_80BAE10(u8, u8); -void sub_80BAE78(int, u16, u16, u8); -void sub_80BAF84(u8); -void sub_80BB038(u8); -void sub_80BB1D4(void); -void sub_80BB25C(u8); -void sub_80BB3B4(u8); -void sub_80BB494(void); - -static const u8 gDebugText_SoundCheckJap[] = _("サウンドチェック"); -static const u8 gDebugText_BGM[] = _("BGM"); -static const u8 gDebugText_SE[] = _("SE "); -static const u8 gDebugText_ABDesc[] = _("A‥さいせい B‥おわり"); -static const u8 gDebugText_UpDown[] = _("L‥UP R‥DOWN"); -static const u8 gDebugText_DriverTest[] = _("R‥DRIVER-TEST"); - -// ideally this should be a multi Coords8 struct, but it wont match when its treated like a struct. -static const u8 gUnknown_083D0300[] = { 1, 1, 1, 3, 1, 5, 1, 7, 1, 9, 1, 11, 1, 13, 1, 15, 1, 17 }; - -static const u8 gDebugText_BBack[] = _("Bぼたんで もどる"); -static const u8 gDebugText_APlay[] = _("Aぼたんで さいせい"); -static const u8 gDebugText_Voice[] = _("VOICE‥‥‥‥"); -static const u8 gDebugText_Volume[] = _("VOLUME‥‥‥"); -static const u8 gDebugText_Panpot[] = _("PANPOT‥‥‥"); -static const u8 gDebugText_Pitch[] = _("PITCH‥‥‥‥"); -static const u8 gDebugText_Length[] = _("LENGTH‥‥‥"); -static const u8 gDebugText_Release[] = _("RELEASE‥‥"); -static const u8 gDebugText_Progress[] = _("PROGRESS‥"); -static const u8 gDebugText_Chorus[] = _("CHORUS‥‥‥"); -static const u8 gDebugText_Priority[] = _("PRIORITY‥"); -static const u8 gDebugText_Playing[] = _("さいせいちゆう‥"); // 再生中 (playing) -static const u8 gDebugText_Reverse[] = _("はんてん‥‥‥‥"); // 反転 (reverse) -static const u8 gDebugText_Stereo[] = _("すてれお‥‥‥‥"); // stereo - -// also ideally should be a MinMax struct, but any attempt to make this into a struct causes it to not match due to the weird multi dim access. -static const int gUnknown_083D039C[16] = -{ - 0, 387, - 0, 127, - -127, 127, - -128, 32639, - 0, 65535, - 0, 255, - 0, 65535, - -64, 63 -}; - -static const u8 gUnknown_083D03DC[] = _("▶"); -static const u8 gUnknown_083D03DE[] = _(" "); - -// why not just use Powers of ten from string_util? -static const int gUnknown_083D03E0[6] = -{ - 1, - 10, - 100, - 1000, - 10000, - 100000 -}; - -static const s8 gUnknown_083D03F8[5] = { 0x3F, 0x00, 0xC0, 0x7F, 0x80 }; - -static const u8 gOtherText_SE[] = _("SE"); -static const u8 gOtherText_Pan[] = _("PAN"); -static const u8 gOtherText_LR[] = _(" LR"); -static const u8 gOtherText_RL[] = _(" RL"); - -// bgm names -static const u8 BGMName_STOP[] = _("STOP"); -static const u8 BGMName_TETSUJI[] = _("TETSUJI"); -static const u8 BGMName_FIELD13[] = _("FIELD13"); -static const u8 BGMName_KACHI22[] = _("KACHI22"); -static const u8 BGMName_KACHI2[] = _("KACHI2"); -static const u8 BGMName_KACHI3[] = _("KACHI3"); -static const u8 BGMName_KACHI5[] = _("KACHI5"); -static const u8 BGMName_PCC[] = _("PCC"); -static const u8 BGMName_NIBI[] = _("NIBI"); -static const u8 BGMName_SUIKUN[] = _("SUIKUN"); -static const u8 BGMName_DOORO1[] = _("DOORO1"); -static const u8 BGMName_DOORO_X1[] = _("DOORO-X1"); -static const u8 BGMName_DOORO_X3[] = _("DOORO-X3"); -static const u8 BGMName_MACHI_S2[] = _("MACHI-S2"); -static const u8 BGMName_MACHI_S4[] = _("MACHI-S4"); -static const u8 BGMName_GIM[] = _("GIM"); -static const u8 BGMName_NAMINORI[] = _("NAMINORI"); -static const u8 BGMName_DAN01[] = _("DAN01"); -static const u8 BGMName_FANFA1[] = _("FANFA1"); -static const u8 BGMName_ME_ASA[] = _("ME-ASA"); -static const u8 BGMName_ME_BACHI[] = _("ME-BACHI"); -static const u8 BGMName_FANFA4[] = _("FANFA4"); -static const u8 BGMName_FANFA5[] = _("FANFA5"); -static const u8 BGMName_ME_WAZA[] = _("ME-WAZA"); -static const u8 BGMName_BIJYUTU[] = _("BIJYUTU"); -static const u8 BGMName_DOORO_X4[] = _("DOORO-X4"); -static const u8 BGMName_FUNE_KAN[] = _("FUNE-KAN"); -static const u8 BGMName_ME_SHINKA[] = _("ME-SHINKA"); -static const u8 BGMName_SHINKA[] = _("SHINKA"); -static const u8 BGMName_ME_WASURE[] = _("ME-WASURE"); -static const u8 BGMName_SYOUJOEYE[] = _("SYOUJOEYE"); -static const u8 BGMName_BOYEYE[] = _("BOYEYE"); -static const u8 BGMName_DAN02[] = _("DAN02"); -static const u8 BGMName_MACHI_S3[] = _("MACHI-S3"); -static const u8 BGMName_ODAMAKI[] = _("ODAMAKI"); -static const u8 BGMName_B_TOWER[] = _("B-TOWER"); -static const u8 BGMName_SWIMEYE[] = _("SWIMEYE"); -static const u8 BGMName_DAN03[] = _("DAN03"); -static const u8 BGMName_ME_KINOMI[] = _("ME-KINOMI"); -static const u8 BGMName_ME_TAMA[] = _("ME-TAMA"); -static const u8 BGMName_ME_B_BIG[] = _("ME-B-BIG"); -static const u8 BGMName_ME_B_SMALL[] = _("ME-B-SMALL"); -static const u8 BGMName_ME_ZANNEN[] = _("ME-ZANNEN"); -static const u8 BGMName_BD_TIME[] = _("BD-TIME"); -static const u8 BGMName_TEST1[] = _("TEST1"); -static const u8 BGMName_TEST2[] = _("TEST2"); -static const u8 BGMName_TEST3[] = _("TEST3"); -static const u8 BGMName_TEST4[] = _("TEST4"); -static const u8 BGMName_TEST[] = _("TEST"); -static const u8 BGMName_GOMACHI0[] = _("GOMACHI0"); -static const u8 BGMName_GOTOWN[] = _("GOTOWN"); -static const u8 BGMName_POKECEN[] = _("POKECEN"); -static const u8 BGMName_NEXTROAD[] = _("NEXTROAD"); -static const u8 BGMName_GRANROAD[] = _("GRANROAD"); -static const u8 BGMName_CYCLING[] = _("CYCLING"); -static const u8 BGMName_FRIENDLY[] = _("FRIENDLY"); -static const u8 BGMName_MISHIRO[] = _("MISHIRO"); -static const u8 BGMName_TOZAN[] = _("TOZAN"); -static const u8 BGMName_GIRLEYE[] = _("GIRLEYE"); -static const u8 BGMName_MINAMO[] = _("MINAMO"); -static const u8 BGMName_ASHROAD[] = _("ASHROAD"); -static const u8 BGMName_EVENT0[] = _("EVENT0"); -static const u8 BGMName_DEEPDEEP[] = _("DEEPDEEP"); -static const u8 BGMName_KACHI1[] = _("KACHI1"); -static const u8 BGMName_TITLE3[] = _("TITLE3"); -static const u8 BGMName_DEMO1[] = _("DEMO1"); -static const u8 BGMName_GIRL_SUP[] = _("GIRL-SUP"); -static const u8 BGMName_HAGESHII[] = _("HAGESHII"); -static const u8 BGMName_KAKKOII[] = _("KAKKOII"); -static const u8 BGMName_KAZANBAI[] = _("KAZANBAI"); -static const u8 BGMName_AQA_0[] = _("AQA-0"); -static const u8 BGMName_TSURETEK[] = _("TSURETEK"); -static const u8 BGMName_BOY_SUP[] = _("BOY-SUP"); -static const u8 BGMName_RAINBOW[] = _("RAINBOW"); -static const u8 BGMName_AYASII[] = _("AYASII"); -static const u8 BGMName_KACHI4[] = _("KACHI4"); -static const u8 BGMName_ROPEWAY[] = _("ROPEWAY"); -static const u8 BGMName_CASINO[] = _("CASINO"); -static const u8 BGMName_HIGHTOWN[] = _("HIGHTOWN"); -static const u8 BGMName_SAFARI[] = _("SAFARI"); -static const u8 BGMName_C_ROAD[] = _("C-ROAD"); -static const u8 BGMName_AJITO[] = _("AJITO"); -static const u8 BGMName_M_BOAT[] = _("M-BOAT"); -static const u8 BGMName_M_DUNGON[] = _("M-DUNGON"); -static const u8 BGMName_FINECITY[] = _("FINECITY"); -static const u8 BGMName_MACHUPI[] = _("MACHUPI"); -static const u8 BGMName_P_SCHOOL[] = _("P-SCHOOL"); -static const u8 BGMName_DENDOU[] = _("DENDOU"); -static const u8 BGMName_TONEKUSA[] = _("TONEKUSA"); -static const u8 BGMName_MABOROSI[] = _("MABOROSI"); -static const u8 BGMName_CON_FAN[] = _("CON-FAN"); -static const u8 BGMName_CONTEST0[] = _("CONTEST0"); -static const u8 BGMName_MGM0[] = _("MGM0"); -static const u8 BGMName_T_BATTLE[] = _("T-BATTLE"); -static const u8 BGMName_OOAME[] = _("OOAME"); -static const u8 BGMName_HIDERI[] = _("HIDERI"); -static const u8 BGMName_RUNECITY[] = _("RUNECITY"); -static const u8 BGMName_CON_K[] = _("CON-K"); -static const u8 BGMName_EIKOU_R[] = _("EIKOU-R"); -static const u8 BGMName_KARAKURI[] = _("KARAKURI"); -static const u8 BGMName_HUTAGO[] = _("HUTAGO"); -static const u8 BGMName_SITENNOU[] = _("SITENNOU"); -static const u8 BGMName_YAMA_EYE[] = _("YAMA-EYE"); -static const u8 BGMName_CONLOBBY[] = _("CONLOBBY"); -static const u8 BGMName_INTER_V[] = _("INTER-V"); -static const u8 BGMName_DAIGO[] = _("DAIGO"); -static const u8 BGMName_THANKFOR[] = _("THANKFOR"); -static const u8 BGMName_END[] = _("END"); -static const u8 BGMName_BATTLE27[] = _("BATTLE27"); -static const u8 BGMName_BATTLE31[] = _("BATTLE31"); -static const u8 BGMName_BATTLE20[] = _("BATTLE20"); -static const u8 BGMName_BATTLE32[] = _("BATTLE32"); -static const u8 BGMName_BATTLE33[] = _("BATTLE33"); -static const u8 BGMName_BATTLE36[] = _("BATTLE36"); -static const u8 BGMName_BATTLE34[] = _("BATTLE34"); -static const u8 BGMName_BATTLE35[] = _("BATTLE35"); -static const u8 BGMName_BATTLE38[] = _("BATTLE38"); -static const u8 BGMName_BATTLE30[] = _("BATTLE30"); - -static const u8 *const gBGMNames[] = -{ - BGMName_STOP, - BGMName_TETSUJI, - BGMName_FIELD13, - BGMName_KACHI22, - BGMName_KACHI2, - BGMName_KACHI3, - BGMName_KACHI5, - BGMName_PCC, - BGMName_NIBI, - BGMName_SUIKUN, - BGMName_DOORO1, - BGMName_DOORO_X1, - BGMName_DOORO_X3, - BGMName_MACHI_S2, - BGMName_MACHI_S4, - BGMName_GIM, - BGMName_NAMINORI, - BGMName_DAN01, - BGMName_FANFA1, - BGMName_ME_ASA, - BGMName_ME_BACHI, - BGMName_FANFA4, - BGMName_FANFA5, - BGMName_ME_WAZA, - BGMName_BIJYUTU, - BGMName_DOORO_X4, - BGMName_FUNE_KAN, - BGMName_ME_SHINKA, - BGMName_SHINKA, - BGMName_ME_WASURE, - BGMName_SYOUJOEYE, - BGMName_BOYEYE, - BGMName_DAN02, - BGMName_MACHI_S3, - BGMName_ODAMAKI, - BGMName_B_TOWER, - BGMName_SWIMEYE, - BGMName_DAN03, - BGMName_ME_KINOMI, - BGMName_ME_TAMA, - BGMName_ME_B_BIG, - BGMName_ME_B_SMALL, - BGMName_ME_ZANNEN, - BGMName_BD_TIME, - BGMName_TEST1, - BGMName_TEST2, - BGMName_TEST3, - BGMName_TEST4, - BGMName_TEST, - BGMName_GOMACHI0, - BGMName_GOTOWN, - BGMName_POKECEN, - BGMName_NEXTROAD, - BGMName_GRANROAD, - BGMName_CYCLING, - BGMName_FRIENDLY, - BGMName_MISHIRO, - BGMName_TOZAN, - BGMName_GIRLEYE, - BGMName_MINAMO, - BGMName_ASHROAD, - BGMName_EVENT0, - BGMName_DEEPDEEP, - BGMName_KACHI1, - BGMName_TITLE3, - BGMName_DEMO1, - BGMName_GIRL_SUP, - BGMName_HAGESHII, - BGMName_KAKKOII, - BGMName_KAZANBAI, - BGMName_AQA_0, - BGMName_TSURETEK, - BGMName_BOY_SUP, - BGMName_RAINBOW, - BGMName_AYASII, - BGMName_KACHI4, - BGMName_ROPEWAY, - BGMName_CASINO, - BGMName_HIGHTOWN, - BGMName_SAFARI, - BGMName_C_ROAD, - BGMName_AJITO, - BGMName_M_BOAT, - BGMName_M_DUNGON, - BGMName_FINECITY, - BGMName_MACHUPI, - BGMName_P_SCHOOL, - BGMName_DENDOU, - BGMName_TONEKUSA, - BGMName_MABOROSI, - BGMName_CON_FAN, - BGMName_CONTEST0, - BGMName_MGM0, - BGMName_T_BATTLE, - BGMName_OOAME, - BGMName_HIDERI, - BGMName_RUNECITY, - BGMName_CON_K, - BGMName_EIKOU_R, - BGMName_KARAKURI, - BGMName_HUTAGO, - BGMName_SITENNOU, - BGMName_YAMA_EYE, - BGMName_CONLOBBY, - BGMName_INTER_V, - BGMName_DAIGO, - BGMName_THANKFOR, - BGMName_END, - BGMName_BATTLE27, - BGMName_BATTLE31, - BGMName_BATTLE20, - BGMName_BATTLE32, - BGMName_BATTLE33, - BGMName_BATTLE36, - BGMName_BATTLE34, - BGMName_BATTLE35, - BGMName_BATTLE38, - BGMName_BATTLE30 -}; - -// SE names -static const u8 SEName_STOP[] = _("STOP"); -static const u8 SEName_KAIFUKU[] = _("KAIFUKU"); -static const u8 SEName_PC_LOGON[] = _("PC-LOGON"); -static const u8 SEName_PC_OFF[] = _("PC-OFF"); -static const u8 SEName_PC_ON[] = _("PC-ON"); -static const u8 SEName_SELECT[] = _("SELECT"); -static const u8 SEName_WIN_OPEN[] = _("WIN-OPEN"); -static const u8 SEName_WALL_HIT[] = _("WALL-HIT"); -static const u8 SEName_DOOR[] = _("DOOR"); -static const u8 SEName_KAIDAN[] = _("KAIDAN"); -static const u8 SEName_DANSA[] = _("DANSA"); -static const u8 SEName_JITENSYA[] = _("JITENSYA"); -static const u8 SEName_KOUKA_L[] = _("KOUKA-L"); -static const u8 SEName_KOUKA_M[] = _("KOUKA-M"); -static const u8 SEName_KOUKA_H[] = _("KOUKA-H"); -static const u8 SEName_BOWA2[] = _("BOWA2"); -static const u8 SEName_POKE_DEAD[] = _("POKE-DEAD"); -static const u8 SEName_NIGERU[] = _("NIGERU"); -static const u8 SEName_JIDO_DOA[] = _("JIDO-DOA"); -static const u8 SEName_NAMINORI[] = _("NAMINORI"); -static const u8 SEName_BAN[] = _("BAN"); -static const u8 SEName_PIN[] = _("PIN"); -static const u8 SEName_BOO[] = _("BOO"); -static const u8 SEName_BOWA[] = _("BOWA"); -static const u8 SEName_JYUNI[] = _("JYUNI"); -static const u8 SEName_A[] = _("A"); -static const u8 SEName_I[] = _("I"); -static const u8 SEName_U[] = _("U"); -static const u8 SEName_E[] = _("E"); -static const u8 SEName_O[] = _("O"); -static const u8 SEName_N[] = _("N"); -static const u8 SEName_SEIKAI[] = _("SEIKAI"); -static const u8 SEName_HAZURE[] = _("HAZURE"); -static const u8 SEName_EXP[] = _("EXP"); -static const u8 SEName_JITE_PYOKO[] = _("JITE-PYOKO"); -static const u8 SEName_MU_PACHI[] = _("MU-PACHI"); -static const u8 SEName_TK_KASYA[] = _("TK-KASYA"); -static const u8 SEName_FU_ZAKU[] = _("FU-ZAKU"); -static const u8 SEName_FU_ZAKU2[] = _("FU-ZAKU2"); -static const u8 SEName_FU_ZUZUZU[] = _("FU-ZUZUZU"); -static const u8 SEName_RU_GASHIN[] = _("RU-GASHIN"); -static const u8 SEName_RU_GASYAN[] = _("RU-GASYAN"); -static const u8 SEName_RU_BARI[] = _("RU-BARI"); -static const u8 SEName_RU_HYUU[] = _("RU-HYUU"); -static const u8 SEName_KI_GASYAN[] = _("KI-GASYAN"); -static const u8 SEName_TK_WARPIN[] = _("TK-WARPIN"); -static const u8 SEName_TK_WARPOUT[] = _("TK-WARPOUT"); -static const u8 SEName_TU_SAA[] = _("TU-SAA"); -static const u8 SEName_HI_TURUN[] = _("HI-TURUN"); -static const u8 SEName_TRACK_MOVE[] = _("TRACK-MOVE"); -static const u8 SEName_TRACK_STOP[] = _("TRACK-STOP"); -static const u8 SEName_TRACK_HAIK[] = _("TRACK-HAIK"); -static const u8 SEName_TRACK_DOOR[] = _("TRACK-DOOR"); -static const u8 SEName_MOTER[] = _("MOTER"); -static const u8 SEName_CARD[] = _("CARD"); -static const u8 SEName_SAVE[] = _("SAVE"); -static const u8 SEName_KON[] = _("KON"); -static const u8 SEName_KON2[] = _("KON2"); -static const u8 SEName_KON3[] = _("KON3"); -static const u8 SEName_KON4[] = _("KON4"); -static const u8 SEName_SUIKOMU[] = _("SUIKOMU"); -static const u8 SEName_NAGERU[] = _("NAGERU"); -static const u8 SEName_TOY_C[] = _("TOY-C"); -static const u8 SEName_TOY_D[] = _("TOY-D"); -static const u8 SEName_TOY_E[] = _("TOY-E"); -static const u8 SEName_TOY_F[] = _("TOY-F"); -static const u8 SEName_TOY_G[] = _("TOY-G"); -static const u8 SEName_TOY_A[] = _("TOY-A"); -static const u8 SEName_TOY_B[] = _("TOY-B"); -static const u8 SEName_TOY_C1[] = _("TOY-C1"); -static const u8 SEName_MIZU[] = _("MIZU"); -static const u8 SEName_HASHI[] = _("HASHI"); -static const u8 SEName_DAUGI[] = _("DAUGI"); -static const u8 SEName_PINPON[] = _("PINPON"); -static const u8 SEName_FUUSEN1[] = _("FUUSEN1"); -static const u8 SEName_FUUSEN2[] = _("FUUSEN2"); -static const u8 SEName_FUUSEN3[] = _("FUUSEN3"); -static const u8 SEName_TOY_KABE[] = _("TOY-KABE"); -static const u8 SEName_TOY_DANGO[] = _("TOY-DANGO"); -static const u8 SEName_DOKU[] = _("DOKU"); -static const u8 SEName_ESUKA[] = _("ESUKA"); -static const u8 SEName_T_AME[] = _("T-AME"); -static const u8 SEName_T_AME_E[] = _("T-AME-E"); -static const u8 SEName_T_OOAME[] = _("T-OOAME"); -static const u8 SEName_T_OOAME_E[] = _("T-OOAME-E"); -static const u8 SEName_T_KOAME[] = _("T-KOAME"); -static const u8 SEName_T_KOAME_E[] = _("T-KOAME-E"); -static const u8 SEName_T_KAMI[] = _("T-KAMI"); -static const u8 SEName_T_KAMI2[] = _("T-KAMI2"); -static const u8 SEName_ELEBETA[] = _("ELEBETA"); -static const u8 SEName_HINSI[] = _("HINSI"); -static const u8 SEName_EXPMAX[] = _("EXPMAX"); -static const u8 SEName_TAMAKORO[] = _("TAMAKORO"); -static const u8 SEName_TAMAKORO_E[] = _("TAMAKORO-E"); -static const u8 SEName_BASABASA[] = _("BASABASA"); -static const u8 SEName_REGI[] = _("REGI"); -static const u8 SEName_C_GAJI[] = _("C-GAJI"); -static const u8 SEName_C_MAKU_U[] = _("C-MAKU-U"); -static const u8 SEName_C_MAKU_D[] = _("C-MAKU-D"); -static const u8 SEName_C_PASI[] = _("C-PASI"); -static const u8 SEName_C_SYU[] = _("C-SYU"); -static const u8 SEName_C_PIKON[] = _("C-PIKON"); -static const u8 SEName_REAPOKE[] = _("REAPOKE"); -static const u8 SEName_OP_BASYU[] = _("OP-BASYU"); -static const u8 SEName_BT_START[] = _("BT-START"); -static const u8 SEName_DENDOU[] = _("DENDOU"); -static const u8 SEName_JIHANKI[] = _("JIHANKI"); -static const u8 SEName_TAMA[] = _("TAMA"); -static const u8 SEName_Z_SCROLL[] = _("Z-SCROLL"); -static const u8 SEName_Z_PAGE[] = _("Z-PAGE"); -static const u8 SEName_PN_ON[] = _("PN-ON"); -static const u8 SEName_PN_OFF[] = _("PN-OFF"); -static const u8 SEName_Z_SEARCH[] = _("Z-SEARCH"); -static const u8 SEName_TAMAGO[] = _("TAMAGO"); -static const u8 SEName_TB_START[] = _("TB-START"); -static const u8 SEName_TB_KON[] = _("TB-KON"); -static const u8 SEName_TB_KARA[] = _("TB-KARA"); -static const u8 SEName_BIDORO[] = _("BIDORO"); -static const u8 SEName_W085[] = _("W085"); -static const u8 SEName_W085B[] = _("W085B"); -static const u8 SEName_W231[] = _("W231"); -static const u8 SEName_W171[] = _("W171"); -static const u8 SEName_W233[] = _("W233"); -static const u8 SEName_W233B[] = _("W233B"); -static const u8 SEName_W145[] = _("W145"); -static const u8 SEName_W145B[] = _("W145B"); -static const u8 SEName_W145C[] = _("W145C"); -static const u8 SEName_W240[] = _("W240"); -static const u8 SEName_W015[] = _("W015"); -static const u8 SEName_W081[] = _("W081"); -static const u8 SEName_W081B[] = _("W081B"); -static const u8 SEName_W088[] = _("W088"); -static const u8 SEName_W016[] = _("W016"); -static const u8 SEName_W016B[] = _("W016B"); -static const u8 SEName_W003[] = _("W003"); -static const u8 SEName_W104[] = _("W104"); -static const u8 SEName_W013[] = _("W013"); -static const u8 SEName_W196[] = _("W196"); -static const u8 SEName_W086[] = _("W086"); -static const u8 SEName_W004[] = _("W004"); -static const u8 SEName_W025[] = _("W025"); -static const u8 SEName_W025B[] = _("W025B"); -static const u8 SEName_W152[] = _("W152"); -static const u8 SEName_W026[] = _("W026"); -static const u8 SEName_W172[] = _("W172"); -static const u8 SEName_W172B[] = _("W172B"); -static const u8 SEName_W053[] = _("W053"); -static const u8 SEName_W007[] = _("W007"); -static const u8 SEName_W092[] = _("W092"); -static const u8 SEName_W221[] = _("W221"); -static const u8 SEName_W221B[] = _("W221B"); -static const u8 SEName_W052[] = _("W052"); -static const u8 SEName_W036[] = _("W036"); -static const u8 SEName_W059[] = _("W059"); -static const u8 SEName_W059B[] = _("W059B"); -static const u8 SEName_W010[] = _("W010"); -static const u8 SEName_W011[] = _("W011"); -static const u8 SEName_W017[] = _("W017"); -static const u8 SEName_W019[] = _("W019"); -static const u8 SEName_W028[] = _("W028"); -static const u8 SEName_W013B[] = _("W013B"); -static const u8 SEName_W044[] = _("W044"); -static const u8 SEName_W029[] = _("W029"); -static const u8 SEName_W057[] = _("W057"); -static const u8 SEName_W056[] = _("W056"); -static const u8 SEName_W250[] = _("W250"); -static const u8 SEName_W030[] = _("W030"); -static const u8 SEName_W039[] = _("W039"); -static const u8 SEName_W054[] = _("W054"); -static const u8 SEName_W077[] = _("W077"); -static const u8 SEName_W020[] = _("W020"); -static const u8 SEName_W082[] = _("W082"); -static const u8 SEName_W047[] = _("W047"); -static const u8 SEName_W195[] = _("W195"); -static const u8 SEName_W006[] = _("W006"); -static const u8 SEName_W091[] = _("W091"); -static const u8 SEName_W146[] = _("W146"); -static const u8 SEName_W120[] = _("W120"); -static const u8 SEName_W153[] = _("W153"); -static const u8 SEName_W071B[] = _("W071B"); -static const u8 SEName_W071[] = _("W071"); -static const u8 SEName_W103[] = _("W103"); -static const u8 SEName_W062[] = _("W062"); -static const u8 SEName_W062B[] = _("W062B"); -static const u8 SEName_W048[] = _("W048"); -static const u8 SEName_W187[] = _("W187"); -static const u8 SEName_W118[] = _("W118"); -static const u8 SEName_W155[] = _("W155"); -static const u8 SEName_W122[] = _("W122"); -static const u8 SEName_W060[] = _("W060"); -static const u8 SEName_W185[] = _("W185"); -static const u8 SEName_W014[] = _("W014"); -static const u8 SEName_W043[] = _("W043"); -static const u8 SEName_W207[] = _("W207"); -static const u8 SEName_W207B[] = _("W207B"); -static const u8 SEName_W215[] = _("W215"); -static const u8 SEName_W109[] = _("W109"); -static const u8 SEName_W173[] = _("W173"); -static const u8 SEName_W280[] = _("W280"); -static const u8 SEName_W202[] = _("W202"); -static const u8 SEName_W060B[] = _("W060B"); -static const u8 SEName_W076[] = _("W076"); -static const u8 SEName_W080[] = _("W080"); -static const u8 SEName_W100[] = _("W100"); -static const u8 SEName_W107[] = _("W107"); -static const u8 SEName_W166[] = _("W166"); -static const u8 SEName_W129[] = _("W129"); -static const u8 SEName_W115[] = _("W115"); -static const u8 SEName_W112[] = _("W112"); -static const u8 SEName_W197[] = _("W197"); -static const u8 SEName_W199[] = _("W199"); -static const u8 SEName_W236[] = _("W236"); -static const u8 SEName_W204[] = _("W204"); -static const u8 SEName_W268[] = _("W268"); -static const u8 SEName_W070[] = _("W070"); -static const u8 SEName_W063[] = _("W063"); -static const u8 SEName_W127[] = _("W127"); -static const u8 SEName_W179[] = _("W179"); -static const u8 SEName_W151[] = _("W151"); -static const u8 SEName_W201[] = _("W201"); -static const u8 SEName_W161[] = _("W161"); -static const u8 SEName_W161B[] = _("W161B"); -static const u8 SEName_W227[] = _("W227"); -static const u8 SEName_W227B[] = _("W227B"); -static const u8 SEName_W226[] = _("W226"); -static const u8 SEName_W208[] = _("W208"); -static const u8 SEName_W213[] = _("W213"); -static const u8 SEName_W213B[] = _("W213B"); -static const u8 SEName_W234[] = _("W234"); -static const u8 SEName_W260[] = _("W260"); -static const u8 SEName_W328[] = _("W328"); -static const u8 SEName_W320[] = _("W320"); -static const u8 SEName_W255[] = _("W255"); -static const u8 SEName_W291[] = _("W291"); -static const u8 SEName_W089[] = _("W089"); -static const u8 SEName_W239[] = _("W239"); -static const u8 SEName_W230[] = _("W230"); -static const u8 SEName_W281[] = _("W281"); -static const u8 SEName_W327[] = _("W327"); -static const u8 SEName_W287[] = _("W287"); -static const u8 SEName_W257[] = _("W257"); -static const u8 SEName_W253[] = _("W253"); -static const u8 SEName_W258[] = _("W258"); -static const u8 SEName_W322[] = _("W322"); -static const u8 SEName_W298[] = _("W298"); -static const u8 SEName_W287B[] = _("W287B"); -static const u8 SEName_W114[] = _("W114"); -static const u8 SEName_W063B[] = _("W063B"); - -static const u8 *const gSENames[] = -{ - SEName_STOP, - SEName_KAIFUKU, - SEName_PC_LOGON, - SEName_PC_OFF, - SEName_PC_ON, - SEName_SELECT, - SEName_WIN_OPEN, - SEName_WALL_HIT, - SEName_DOOR, - SEName_KAIDAN, - SEName_DANSA, - SEName_JITENSYA, - SEName_KOUKA_L, - SEName_KOUKA_M, - SEName_KOUKA_H, - SEName_BOWA2, - SEName_POKE_DEAD, - SEName_NIGERU, - SEName_JIDO_DOA, - SEName_NAMINORI, - SEName_BAN, - SEName_PIN, - SEName_BOO, - SEName_BOWA, - SEName_JYUNI, - SEName_A, - SEName_I, - SEName_U, - SEName_E, - SEName_O, - SEName_N, - SEName_SEIKAI, - SEName_HAZURE, - SEName_EXP, - SEName_JITE_PYOKO, - SEName_MU_PACHI, - SEName_TK_KASYA, - SEName_FU_ZAKU, - SEName_FU_ZAKU2, - SEName_FU_ZUZUZU, - SEName_RU_GASHIN, - SEName_RU_GASYAN, - SEName_RU_BARI, - SEName_RU_HYUU, - SEName_KI_GASYAN, - SEName_TK_WARPIN, - SEName_TK_WARPOUT, - SEName_TU_SAA, - SEName_HI_TURUN, - SEName_TRACK_MOVE, - SEName_TRACK_STOP, - SEName_TRACK_HAIK, - SEName_TRACK_DOOR, - SEName_MOTER, - SEName_CARD, - SEName_SAVE, - SEName_KON, - SEName_KON2, - SEName_KON3, - SEName_KON4, - SEName_SUIKOMU, - SEName_NAGERU, - SEName_TOY_C, - SEName_TOY_D, - SEName_TOY_E, - SEName_TOY_F, - SEName_TOY_G, - SEName_TOY_A, - SEName_TOY_B, - SEName_TOY_C1, - SEName_MIZU, - SEName_HASHI, - SEName_DAUGI, - SEName_PINPON, - SEName_FUUSEN1, - SEName_FUUSEN2, - SEName_FUUSEN3, - SEName_TOY_KABE, - SEName_TOY_DANGO, - SEName_DOKU, - SEName_ESUKA, - SEName_T_AME, - SEName_T_AME_E, - SEName_T_OOAME, - SEName_T_OOAME_E, - SEName_T_KOAME, - SEName_T_KOAME_E, - SEName_T_KAMI, - SEName_T_KAMI2, - SEName_ELEBETA, - SEName_HINSI, - SEName_EXPMAX, - SEName_TAMAKORO, - SEName_TAMAKORO_E, - SEName_BASABASA, - SEName_REGI, - SEName_C_GAJI, - SEName_C_MAKU_U, - SEName_C_MAKU_D, - SEName_C_PASI, - SEName_C_SYU, - SEName_C_PIKON, - SEName_REAPOKE, - SEName_OP_BASYU, - SEName_BT_START, - SEName_DENDOU, - SEName_JIHANKI, - SEName_TAMA, - SEName_Z_SCROLL, - SEName_Z_PAGE, - SEName_PN_ON, - SEName_PN_OFF, - SEName_Z_SEARCH, - SEName_TAMAGO, - SEName_TB_START, - SEName_TB_KON, - SEName_TB_KARA, - SEName_BIDORO, - SEName_W085, - SEName_W085B, - SEName_W231, - SEName_W171, - SEName_W233, - SEName_W233B, - SEName_W145, - SEName_W145B, - SEName_W145C, - SEName_W240, - SEName_W015, - SEName_W081, - SEName_W081B, - SEName_W088, - SEName_W016, - SEName_W016B, - SEName_W003, - SEName_W104, - SEName_W013, - SEName_W196, - SEName_W086, - SEName_W004, - SEName_W025, - SEName_W025B, - SEName_W152, - SEName_W026, - SEName_W172, - SEName_W172B, - SEName_W053, - SEName_W007, - SEName_W092, - SEName_W221, - SEName_W221B, - SEName_W052, - SEName_W036, - SEName_W059, - SEName_W059B, - SEName_W010, - SEName_W011, - SEName_W017, - SEName_W019, - SEName_W028, - SEName_W013B, - SEName_W044, - SEName_W029, - SEName_W057, - SEName_W056, - SEName_W250, - SEName_W030, - SEName_W039, - SEName_W054, - SEName_W077, - SEName_W020, - SEName_W082, - SEName_W047, - SEName_W195, - SEName_W006, - SEName_W091, - SEName_W146, - SEName_W120, - SEName_W153, - SEName_W071B, - SEName_W071, - SEName_W103, - SEName_W062, - SEName_W062B, - SEName_W048, - SEName_W187, - SEName_W118, - SEName_W155, - SEName_W122, - SEName_W060, - SEName_W185, - SEName_W014, - SEName_W043, - SEName_W207, - SEName_W207B, - SEName_W215, - SEName_W109, - SEName_W173, - SEName_W280, - SEName_W202, - SEName_W060B, - SEName_W076, - SEName_W080, - SEName_W100, - SEName_W107, - SEName_W166, - SEName_W129, - SEName_W115, - SEName_W112, - SEName_W197, - SEName_W199, - SEName_W236, - SEName_W204, - SEName_W268, - SEName_W070, - SEName_W063, - SEName_W127, - SEName_W179, - SEName_W151, - SEName_W201, - SEName_W161, - SEName_W161B, - SEName_W227, - SEName_W227B, - SEName_W226, - SEName_W208, - SEName_W213, - SEName_W213B, - SEName_W234, - SEName_W260, - SEName_W328, - SEName_W320, - SEName_W255, - SEName_W291, - SEName_W089, - SEName_W239, - SEName_W230, - SEName_W281, - SEName_W327, - SEName_W287, - SEName_W257, - SEName_W253, - SEName_W258, - SEName_W322, - SEName_W298, - SEName_W287B, - SEName_W114, - SEName_W063B -}; - -void sub_80BA0A8(void) -{ - RunTasks(); - AnimateSprites(); - BuildOamBuffer(); - UpdatePaletteFade(); -} - -void sub_80BA0C0(void) -{ - LoadOam(); - ProcessSpriteCopyRequests(); - TransferPlttBuffer(); - - if(gUnknown_020387B0 != 0) - { - m4aSoundMain(); - m4aSoundMain(); - m4aSoundMain(); - } -} - -// unused -void CB2_StartSoundCheckMenu(void) -{ - u8 taskId; - - SetVBlankCallback(NULL); - REG_DISPCNT = 0; - REG_BG2CNT = 0; - REG_BG1CNT = 0; - REG_BG0CNT = 0; - REG_BG2HOFS = 0; - REG_BG2VOFS = 0; - REG_BG1HOFS = 0; - REG_BG1VOFS = 0; - REG_BG0HOFS = 0; - REG_BG0VOFS = 0; - DmaFill16(3, 0, VRAM, VRAM_SIZE); - DmaFill32(3, 0, OAM, OAM_SIZE); - DmaFill16(3, 0, PLTT, PLTT_SIZE); - ResetPaletteFade(); - ResetTasks(); - ResetSpriteData(); - SetUpWindowConfig(&gWindowConfig_81E6C3C); - InitMenuWindow(&gWindowConfig_81E6CE4); - BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, 0); - REG_WIN0H = WIN_RANGE(0, 0); - REG_WIN0V = WIN_RANGE(0, 0); - REG_WIN1H = WIN_RANGE(0, 0); - REG_WIN1V = WIN_RANGE(0, 0); - REG_WININ = 0x1111; - REG_WINOUT = 0x31; - REG_BLDCNT = 0xE1; - REG_BLDALPHA = 0; - REG_BLDY = 7; - REG_IE = 1; // could be a typo of REG_IME - REG_IE |= 1; - REG_DISPSTAT |= 8; - SetVBlankCallback(sub_80BA0C0); - SetMainCallback2(sub_80BA0A8); - REG_DISPCNT = 0x7140; - taskId = CreateTask(sub_80BA258, 0); - TASK.WINDOW_SELECTED = BGM_WINDOW; - TASK.BGM_INDEX = 0; - TASK.SE_INDEX = 0; - TASK.UNK_DATA3 = 0; - gUnknown_020387B0 = 0; - TASK.UNK_DATA3 = 0; // why? - m4aSoundInit(); -} - -// Task_InitSoundCheckMenu -void sub_80BA258(u8 taskId) -{ - u8 soundcheckStr[sizeof(gDebugText_SoundCheckJap)]; - u8 bgmStr[sizeof(gDebugText_BGM)]; - u8 seStr[sizeof(gDebugText_SE)]; - u8 abDescStr[sizeof(gDebugText_ABDesc)]; - u8 upDownStr[sizeof(gDebugText_UpDown)]; - u8 driverStr[sizeof(gDebugText_DriverTest)]; - - memcpy(soundcheckStr, gDebugText_SoundCheckJap, sizeof(gDebugText_SoundCheckJap)); - memcpy(bgmStr, gDebugText_BGM, sizeof(gDebugText_BGM)); - memcpy(seStr, gDebugText_SE, sizeof(gDebugText_SE)); - memcpy(abDescStr, gDebugText_ABDesc, sizeof(gDebugText_ABDesc)); - memcpy(upDownStr, gDebugText_UpDown, sizeof(gDebugText_UpDown)); - memcpy(driverStr, gDebugText_DriverTest, sizeof(gDebugText_DriverTest)); - - if(!gPaletteFade.active) - { - MenuDrawTextWindow(0x2, 0, 0x1B, 0x3); - MenuDrawTextWindow(0x2, 0x5, 0x1B, 0xA); - MenuDrawTextWindow(0x2, 0xC, 0x1B, 0x11); - MenuPrint(soundcheckStr, 4, 1); - MenuPrint(abDescStr, 14, 1); - MenuPrint(bgmStr, 4, 6); - MenuPrint(upDownStr, 14, 6); - MenuPrint(seStr, 4, 13); - MenuPrint(upDownStr, 14, 13); - MenuPrint(driverStr, 14, 18); - TASK.FUNC = sub_80BA384; - REG_WIN0H = WIN_RANGE(17, 223); - REG_WIN0V = WIN_RANGE(1, 31); - } -} - -void sub_80BA384(u8 taskId) // Task_HandleDrawingSoundCheckMenuText -{ - sub_80BA6B8(TASK.WINDOW_SELECTED); - sub_80BA700(TASK.BGM_INDEX + BGM_STOP, 7, 8); // print by BGM index - sub_80BA79C(gBGMNames[TASK.BGM_INDEX], 11, 8); - sub_80BA700(TASK.SE_INDEX, 7, 15); - sub_80BA79C(gSENames[TASK.SE_INDEX], 11, 15); - TASK.FUNC = sub_80BA65C; -} - -#ifdef NONMATCHING -bool8 sub_80BA400(u8 taskId) // Task_ProcessSoundCheckMenuInput -{ - if(gMain.newKeys & R_BUTTON) // driver test - { - TASK.FUNC = sub_80BA800; - return FALSE; - } - if(gMain.newKeys & L_BUTTON) - { - TASK.FUNC = sub_80BAF84; - return FALSE; - } - if(gMain.newKeys & START_BUTTON) - { - TASK.FUNC = sub_80BB25C; - return FALSE; - } - if(gMain.newKeys & A_BUTTON) // both these cases insist on non reuses of certain data variables and cause the function to not match. - { - if(TASK.WINDOW_SELECTED != 0) // is playing? - { - if(TASK.UNK_DATA4 != 0) - { - if(TASK.SE_INDEX != 0) // why are you insiting on a non signed halfword? - { - m4aSongNumStop(TASK.UNK_DATA4); - } - else - { - m4aSongNumStop(TASK.SE_INDEX); - TASK.UNK_DATA4 = TASK.SE_INDEX; - return FALSE; - } - } - else if(TASK.SE_INDEX == 0) // _080BA4BA - { - return FALSE; - } - // _080BA4C4 - m4aSongNumStart(TASK.SE_INDEX); - TASK.UNK_DATA4 = TASK.SE_INDEX; - return FALSE; - } - else // _080BA4D0 - { - if(TASK.UNK_DATA3 != 0) - { - if(TASK.BGM_INDEX != 0) - { - m4aSongNumStop(TASK.UNK_DATA3 + BGM_STOP); - } - else // _080BA500 - { - m4aSongNumStop(TASK.UNK_DATA3 + BGM_STOP); - TASK.UNK_DATA3 = TASK.BGM_INDEX; - return FALSE; - } - } - else if(TASK.BGM_INDEX == 0) // _080BA514 - return FALSE; - - m4aSongNumStart(TASK.BGM_INDEX + BGM_STOP); - TASK.UNK_DATA3 = TASK.BGM_INDEX; - } - return FALSE; - } - if(gMain.newKeys & B_BUTTON) - { - m4aSongNumStart(5); - BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, 0); - TASK.FUNC = sub_80BA68C; - return FALSE; - } - if(gMain.newAndRepeatedKeys & DPAD_UP) - { - TASK.data[8] ^= A_BUTTON; // huh? - return TRUE; - } - if(gMain.newAndRepeatedKeys & DPAD_DOWN) - { - TASK.data[8] ^= A_BUTTON; // huh? - return TRUE; - } - else - { - u16 keys = gMain.newAndRepeatedKeys & DPAD_RIGHT; - if(keys) - { - if(TASK.WINDOW_SELECTED != 0) - { - if(TASK.SE_INDEX > 0) - { - TASK.SE_INDEX--; - } - else - { - TASK.SE_INDEX = 0xF7; - } - } - else if(TASK.BGM_INDEX > 0) - { - TASK.BGM_INDEX--; - } - else - { - TASK.BGM_INDEX = 0x75; - } - return TRUE; - } - if(gMain.newAndRepeatedKeys & DPAD_LEFT) - { - if(TASK.WINDOW_SELECTED != 0) - { - if(TASK.SE_INDEX < 0xF7) - { - TASK.SE_INDEX++; - } - else - { - TASK.SE_INDEX = keys; // ?? - } - } - else if(TASK.BGM_INDEX < 0x75) - { - TASK.BGM_INDEX++; - return TRUE; - } - else - { - TASK.BGM_INDEX = TASK.SE_INDEX; - return TRUE; - } - return TRUE; - } - if(gMain.heldKeys & SELECT_BUTTON) - { - gUnknown_020387B0 = A_BUTTON; - return FALSE; - } - else - { - gUnknown_020387B0 = (gMain.heldKeys & SELECT_BUTTON); - return FALSE; - } - } -} -#else -__attribute__((naked)) -bool8 sub_80BA400(u8 taskId) -{ - asm(".syntax unified\n\ - push {r4-r6,lr}\n\ - sub sp, 0x4\n\ - lsls r0, 24\n\ - lsrs r4, r0, 24\n\ - ldr r2, _080BA428 @ =gMain\n\ - ldrh r1, [r2, 0x2E]\n\ - movs r0, 0x80\n\ - lsls r0, 1\n\ - ands r0, r1\n\ - cmp r0, 0\n\ - beq _080BA434\n\ - ldr r0, _080BA42C @ =gTasks\n\ - lsls r1, r4, 2\n\ - adds r1, r4\n\ - lsls r1, 3\n\ - adds r1, r0\n\ - ldr r0, _080BA430 @ =sub_80BA800\n\ - str r0, [r1]\n\ - b _080BA64C\n\ - .align 2, 0\n\ -_080BA428: .4byte gMain\n\ -_080BA42C: .4byte gTasks\n\ -_080BA430: .4byte sub_80BA800\n\ -_080BA434:\n\ - movs r0, 0x80\n\ - lsls r0, 2\n\ - ands r0, r1\n\ - cmp r0, 0\n\ - beq _080BA458\n\ - ldr r0, _080BA450 @ =gTasks\n\ - lsls r1, r4, 2\n\ - adds r1, r4\n\ - lsls r1, 3\n\ - adds r1, r0\n\ - ldr r0, _080BA454 @ =sub_80BAF84\n\ - str r0, [r1]\n\ - b _080BA64C\n\ - .align 2, 0\n\ -_080BA450: .4byte gTasks\n\ -_080BA454: .4byte sub_80BAF84\n\ -_080BA458:\n\ - movs r0, 0x8\n\ - ands r0, r1\n\ - cmp r0, 0\n\ - beq _080BA478\n\ - ldr r0, _080BA470 @ =gTasks\n\ - lsls r1, r4, 2\n\ - adds r1, r4\n\ - lsls r1, 3\n\ - adds r1, r0\n\ - ldr r0, _080BA474 @ =sub_80BB25C\n\ - str r0, [r1]\n\ - b _080BA64C\n\ - .align 2, 0\n\ -_080BA470: .4byte gTasks\n\ -_080BA474: .4byte sub_80BB25C\n\ -_080BA478:\n\ - movs r6, 0x1\n\ - movs r5, 0x1\n\ - ands r5, r1\n\ - cmp r5, 0\n\ - beq _080BA538\n\ - ldr r0, _080BA4AC @ =gTasks\n\ - lsls r1, r4, 2\n\ - adds r1, r4\n\ - lsls r1, 3\n\ - adds r5, r1, r0\n\ - movs r1, 0x8\n\ - ldrsh r0, [r5, r1]\n\ - cmp r0, 0\n\ - beq _080BA4D0\n\ - movs r2, 0x10\n\ - ldrsh r0, [r5, r2]\n\ - cmp r0, 0\n\ - beq _080BA4BA\n\ - movs r3, 0xC\n\ - ldrsh r4, [r5, r3]\n\ - cmp r4, 0\n\ - beq _080BA4B0\n\ - ldrh r0, [r5, 0x10]\n\ - bl m4aSongNumStop\n\ - b _080BA4C4\n\ - .align 2, 0\n\ -_080BA4AC: .4byte gTasks\n\ -_080BA4B0:\n\ - ldrh r0, [r5, 0x10]\n\ - bl m4aSongNumStop\n\ - strh r4, [r5, 0x10]\n\ - b _080BA64C\n\ -_080BA4BA:\n\ - movs r4, 0xC\n\ - ldrsh r0, [r5, r4]\n\ - cmp r0, 0\n\ - bne _080BA4C4\n\ - b _080BA64C\n\ -_080BA4C4:\n\ - ldrh r0, [r5, 0xC]\n\ - bl m4aSongNumStart\n\ - ldrh r0, [r5, 0xC]\n\ - strh r0, [r5, 0x10]\n\ - b _080BA64C\n\ -_080BA4D0:\n\ - ldrh r1, [r5, 0xE]\n\ - movs r2, 0xE\n\ - ldrsh r0, [r5, r2]\n\ - cmp r0, 0\n\ - beq _080BA514\n\ - movs r3, 0xA\n\ - ldrsh r4, [r5, r3]\n\ - cmp r4, 0\n\ - beq _080BA500\n\ - ldr r0, _080BA4FC @ =0x0000015d\n\ - adds r4, r0, 0\n\ - adds r0, r1, r4\n\ - lsls r0, 16\n\ - lsrs r0, 16\n\ - bl m4aSongNumStop\n\ - ldrh r1, [r5, 0xA]\n\ - adds r4, r1\n\ - lsls r4, 16\n\ - lsrs r4, 16\n\ - adds r0, r4, 0\n\ - b _080BA528\n\ - .align 2, 0\n\ -_080BA4FC: .4byte 0x0000015d\n\ -_080BA500:\n\ - ldr r2, _080BA510 @ =0x0000015d\n\ - adds r0, r1, r2\n\ - lsls r0, 16\n\ - lsrs r0, 16\n\ - bl m4aSongNumStop\n\ - strh r4, [r5, 0xE]\n\ - b _080BA64C\n\ - .align 2, 0\n\ -_080BA510: .4byte 0x0000015d\n\ -_080BA514:\n\ - ldrh r1, [r5, 0xA]\n\ - movs r3, 0xA\n\ - ldrsh r0, [r5, r3]\n\ - cmp r0, 0\n\ - bne _080BA520\n\ - b _080BA64C\n\ -_080BA520:\n\ - ldr r4, _080BA534 @ =0x0000015d\n\ - adds r0, r1, r4\n\ - lsls r0, 16\n\ - lsrs r0, 16\n\ -_080BA528:\n\ - bl m4aSongNumStart\n\ - ldrh r0, [r5, 0xA]\n\ - strh r0, [r5, 0xE]\n\ - b _080BA64C\n\ - .align 2, 0\n\ -_080BA534: .4byte 0x0000015d\n\ -_080BA538:\n\ - movs r0, 0x2\n\ - ands r0, r1\n\ - cmp r0, 0\n\ - beq _080BA570\n\ - movs r0, 0x5\n\ - bl m4aSongNumStart\n\ - movs r0, 0x1\n\ - negs r0, r0\n\ - str r5, [sp]\n\ - movs r1, 0\n\ - movs r2, 0\n\ - movs r3, 0x10\n\ - bl BeginNormalPaletteFade\n\ - ldr r1, _080BA568 @ =gTasks\n\ - lsls r0, r4, 2\n\ - adds r0, r4\n\ - lsls r0, 3\n\ - adds r0, r1\n\ - ldr r1, _080BA56C @ =sub_80BA68C\n\ - str r1, [r0]\n\ - b _080BA64C\n\ - .align 2, 0\n\ -_080BA568: .4byte gTasks\n\ -_080BA56C: .4byte sub_80BA68C\n\ -_080BA570:\n\ - ldrh r1, [r2, 0x30]\n\ - movs r0, 0x40\n\ - ands r0, r1\n\ - cmp r0, 0\n\ - bne _080BA582\n\ - movs r0, 0x80\n\ - ands r0, r1\n\ - cmp r0, 0\n\ - beq _080BA59C\n\ -_080BA582:\n\ - ldr r0, _080BA598 @ =gTasks\n\ - lsls r1, r4, 2\n\ - adds r1, r4\n\ - lsls r1, 3\n\ - adds r1, r0\n\ - ldrh r0, [r1, 0x8]\n\ - eors r0, r6\n\ - strh r0, [r1, 0x8]\n\ -_080BA592:\n\ - movs r0, 0x1\n\ - b _080BA64E\n\ - .align 2, 0\n\ -_080BA598: .4byte gTasks\n\ -_080BA59C:\n\ - movs r0, 0x10\n\ - ands r0, r1\n\ - lsls r0, 16\n\ - lsrs r3, r0, 16\n\ - cmp r3, 0\n\ - beq _080BA5EA\n\ - ldr r0, _080BA5CC @ =gTasks\n\ - lsls r1, r4, 2\n\ - adds r1, r4\n\ - lsls r1, 3\n\ - adds r1, r0\n\ - movs r2, 0x8\n\ - ldrsh r0, [r1, r2]\n\ - cmp r0, 0\n\ - beq _080BA5D6\n\ - ldrh r2, [r1, 0xC]\n\ - movs r3, 0xC\n\ - ldrsh r0, [r1, r3]\n\ - cmp r0, 0\n\ - ble _080BA5D0\n\ - subs r0, r2, 0x1\n\ - strh r0, [r1, 0xC]\n\ - b _080BA592\n\ - .align 2, 0\n\ -_080BA5CC: .4byte gTasks\n\ -_080BA5D0:\n\ - movs r0, 0xF7\n\ - strh r0, [r1, 0xC]\n\ - b _080BA592\n\ -_080BA5D6:\n\ - ldrh r2, [r1, 0xA]\n\ - movs r4, 0xA\n\ - ldrsh r0, [r1, r4]\n\ - cmp r0, 0\n\ - ble _080BA5E4\n\ - subs r0, r2, 0x1\n\ - b _080BA5E6\n\ -_080BA5E4:\n\ - movs r0, 0x75\n\ -_080BA5E6:\n\ - strh r0, [r1, 0xA]\n\ - b _080BA592\n\ -_080BA5EA:\n\ - movs r0, 0x20\n\ - ands r0, r1\n\ - cmp r0, 0\n\ - beq _080BA630\n\ - ldr r1, _080BA614 @ =gTasks\n\ - lsls r0, r4, 2\n\ - adds r0, r4\n\ - lsls r0, 3\n\ - adds r1, r0, r1\n\ - movs r0, 0x8\n\ - ldrsh r2, [r1, r0]\n\ - cmp r2, 0\n\ - beq _080BA61C\n\ - ldrh r2, [r1, 0xC]\n\ - movs r4, 0xC\n\ - ldrsh r0, [r1, r4]\n\ - cmp r0, 0xF6\n\ - bgt _080BA618\n\ - adds r0, r2, 0x1\n\ - strh r0, [r1, 0xC]\n\ - b _080BA592\n\ - .align 2, 0\n\ -_080BA614: .4byte gTasks\n\ -_080BA618:\n\ - strh r3, [r1, 0xC]\n\ - b _080BA592\n\ -_080BA61C:\n\ - ldrh r3, [r1, 0xA]\n\ - movs r4, 0xA\n\ - ldrsh r0, [r1, r4]\n\ - cmp r0, 0x74\n\ - bgt _080BA62C\n\ - adds r0, r3, 0x1\n\ - strh r0, [r1, 0xA]\n\ - b _080BA592\n\ -_080BA62C:\n\ - strh r2, [r1, 0xA]\n\ - b _080BA592\n\ -_080BA630:\n\ - ldrh r1, [r2, 0x2C]\n\ - movs r0, 0x4\n\ - ands r0, r1\n\ - lsls r0, 16\n\ - lsrs r1, r0, 16\n\ - cmp r1, 0\n\ - beq _080BA648\n\ - ldr r0, _080BA644 @ =gUnknown_020387B0\n\ - strb r6, [r0]\n\ - b _080BA64C\n\ - .align 2, 0\n\ -_080BA644: .4byte gUnknown_020387B0\n\ -_080BA648:\n\ - ldr r0, _080BA658 @ =gUnknown_020387B0\n\ - strb r1, [r0]\n\ -_080BA64C:\n\ - movs r0, 0\n\ -_080BA64E:\n\ - add sp, 0x4\n\ - pop {r4-r6}\n\ - pop {r1}\n\ - bx r1\n\ - .align 2, 0\n\ -_080BA658: .4byte gUnknown_020387B0\n\ - .syntax divided"); -} -#endif - -void sub_80BA65C(u8 taskId) -{ - if(sub_80BA400(taskId) != FALSE) - TASK.FUNC = sub_80BA384; -} - -void sub_80BA68C(u8 taskId) -{ - if(!gPaletteFade.active) - { - DestroyTask(taskId); - SetMainCallback2(CB2_InitTitleScreen); - } -} - -void sub_80BA6B8(u8 windowType) -{ - switch(windowType) - { - case BGM_WINDOW: - default: - REG_WIN1H = WIN_RANGE(17, 223); - REG_WIN1V = WIN_RANGE(41, 87); - break; - case SE_WINDOW: - REG_WIN1H = WIN_RANGE(17, 223); - REG_WIN1V = WIN_RANGE(97, 143); - break; - } -} - -void sub_80BA700(u16 soundIndex, u16 x, u16 y) // PrintSoundNumber ? -{ - u8 i; - u8 str[5]; - bool8 someBool; - u8 divisorValue; - - for(i = 0; i < 3; i++) - str[i] = 0; // initialize array - - str[3] = CHAR_ELLIPSIS; - str[4] = EOS; - someBool = FALSE; - - divisorValue = soundIndex / 100; - if(divisorValue) - { - str[0] = divisorValue + CHAR_0; - someBool = TRUE; - } - - divisorValue = (soundIndex % 100) / 10; - if(divisorValue || someBool != FALSE) - str[1] = divisorValue + CHAR_0; - - str[2] = ((soundIndex % 100) % 10) + CHAR_0; - MenuPrint(str, x, y); -} - -void sub_80BA79C(const u8 *const string, u16 x, u16 y) -{ - u8 i; - u8 str[11]; - - for(i = 0; i < 11; i++) - str[i] = 0; // format string. - - str[10] = EOS; // the above for loop formats the last element of the array unnecessarily. - - for(i = 0; string[i] != EOS && i < 10; i++) - str[i] = string[i]; - - MenuPrint(str, x, y); -} - -void sub_80BA800(u8 taskId) // Task_DrawDriverTestMenu -{ - u8 bbackStr[sizeof(gDebugText_BBack)]; - u8 aplayStr[sizeof(gDebugText_APlay)]; - u8 voiceStr[sizeof(gDebugText_Voice)]; - u8 volumeStr[sizeof(gDebugText_Volume)]; - u8 panpotStr[sizeof(gDebugText_Panpot)]; - u8 pitchStr[sizeof(gDebugText_Pitch)]; - u8 lengthStr[sizeof(gDebugText_Length)]; - u8 releaseStr[sizeof(gDebugText_Release)]; - u8 progressStr[sizeof(gDebugText_Progress)]; - u8 chorusStr[sizeof(gDebugText_Chorus)]; - u8 priorityStr[sizeof(gDebugText_Priority)]; - u8 playingStr[sizeof(gDebugText_Playing)]; - u8 reverseStr[sizeof(gDebugText_Reverse)]; - u8 stereoStr[sizeof(gDebugText_Stereo)]; - - memcpy(bbackStr, gDebugText_BBack, sizeof(gDebugText_BBack)); - memcpy(aplayStr, gDebugText_APlay, sizeof(gDebugText_APlay)); - memcpy(voiceStr, gDebugText_Voice, sizeof(gDebugText_Voice)); - memcpy(volumeStr, gDebugText_Volume, sizeof(gDebugText_Volume)); - memcpy(panpotStr, gDebugText_Panpot, sizeof(gDebugText_Panpot)); - memcpy(pitchStr, gDebugText_Pitch, sizeof(gDebugText_Pitch)); - memcpy(lengthStr, gDebugText_Length, sizeof(gDebugText_Length)); - memcpy(releaseStr, gDebugText_Release, sizeof(gDebugText_Release)); - memcpy(progressStr, gDebugText_Progress, sizeof(gDebugText_Progress)); - memcpy(chorusStr, gDebugText_Chorus, sizeof(gDebugText_Chorus)); - memcpy(priorityStr, gDebugText_Priority, sizeof(gDebugText_Priority)); - memcpy(playingStr, gDebugText_Playing, sizeof(gDebugText_Playing)); - memcpy(reverseStr, gDebugText_Reverse, sizeof(gDebugText_Reverse)); - memcpy(stereoStr, gDebugText_Stereo, sizeof(gDebugText_Stereo)); - - REG_DISPCNT = 0x3140; - MenuDrawTextWindow(0, 0, 0x1D, 0x13); - MenuPrint(bbackStr, 0x13, 0x4); - MenuPrint(aplayStr, 0x13, 0x2); - MenuPrint(voiceStr, 0x2, 0x1); - MenuPrint(volumeStr, 0x2, 0x3); - MenuPrint(panpotStr, 0x2, 0x5); - MenuPrint(pitchStr, 0x2, 0x7); - MenuPrint(lengthStr, 0x2, 0x9); - MenuPrint(releaseStr, 0x2, 0xB); - MenuPrint(progressStr, 0x2, 0xD); - MenuPrint(chorusStr, 0x2, 0xF); - MenuPrint(priorityStr, 0x2, 0x11); - MenuPrint(playingStr, 0x13, 0x10); - MenuPrint(reverseStr, 0x13, 0xE); - MenuPrint(stereoStr, 0x13, 0xC); - REG_WIN0H = WIN_RANGE(0, 240); - REG_WIN0V = WIN_RANGE(0, 160); - gUnknown_020387B3 = 0; - gUnknown_020387B1 = 0; - gUnknown_020387B2 = 0; - gUnknown_03005D30 = NULL; - gUnknown_020387D8 = 0; - gUnknown_020387D9 = 1; - gUnknown_020387B4[CRY_TEST_UNK0] = 0; - gUnknown_020387B4[CRY_TEST_VOLUME] = 0x78; - gUnknown_020387B4[CRY_TEST_PANPOT] = 0; - gUnknown_020387B4[CRY_TEST_PITCH] = 0x3C00; - gUnknown_020387B4[CRY_TEST_LENGTH] = 0xB4; - gUnknown_020387B4[CRY_TEST_PROGRESS] = 0; - gUnknown_020387B4[CRY_TEST_RELEASE] = 0; - gUnknown_020387B4[CRY_TEST_CHORUS] = 0; - gUnknown_020387B4[CRY_TEST_PRIORITY] = 2; - sub_80BAD5C(); - sub_80BAE10(0, 0); - TASK.FUNC = sub_80BAA48; -} - -void sub_80BAA48(u8 taskId) // Task_ProcessDriverTestInput -{ - if(gMain.newKeys & B_BUTTON) - { - REG_DISPCNT = 0x7140; - REG_WIN0H = WIN_RANGE(17, 223); - REG_WIN0V = WIN_RANGE(1, 31); - MenuZeroFillWindowRect(0, 0, 0x1D, 0x13); - TASK.FUNC = sub_80BA258; - return; - } - if(gMain.newAndRepeatedKeys & DPAD_UP) // _080BAAA8 - { - u8 backupVar = gUnknown_020387B3; - if(--gUnknown_020387B3 < 0) - gUnknown_020387B3 = 8; - - sub_80BAE10(backupVar, gUnknown_020387B3); - return; - } - if(gMain.newAndRepeatedKeys & DPAD_DOWN) // _080BAAD0 - { - u8 backupVar = gUnknown_020387B3; - if(++gUnknown_020387B3 > 8) - gUnknown_020387B3 = 0; - - sub_80BAE10(backupVar, gUnknown_020387B3); - return; - } - if(gMain.newKeys & START_BUTTON) // _080BAAF8 - { - gUnknown_020387D8 ^= 1; - sub_80BAD5C(); - return; - } - if(gMain.newKeys & SELECT_BUTTON) // _080BAB14 - { - gUnknown_020387D9 ^= 1; - sub_80BAD5C(); - SetPokemonCryStereo(gUnknown_020387D9); - return; - } - if(gMain.newAndRepeatedKeys & R_BUTTON) // _080BAB38 - { - sub_80BACDC(10); - sub_80BAD5C(); - return; - } - if(gMain.newAndRepeatedKeys & L_BUTTON) // _080BAB46 - { - sub_80BACDC(-10); - sub_80BAD5C(); - return; - } - if(gMain.newAndRepeatedKeys & DPAD_LEFT) // _080BAB56 - { - sub_80BACDC(-1); - sub_80BAD5C(); - return; - } - if(gMain.newAndRepeatedKeys & DPAD_RIGHT) // _080BAB64 - { - sub_80BACDC(1); - sub_80BAD5C(); - return; - } - if(gMain.newKeys & A_BUTTON) // _080BAB78 - { - u8 divide, remaining; - - SetPokemonCryVolume(gUnknown_020387B4[CRY_TEST_VOLUME]); - SetPokemonCryPanpot(gUnknown_020387B4[CRY_TEST_PANPOT]); - SetPokemonCryPitch(gUnknown_020387B4[CRY_TEST_PITCH]); - SetPokemonCryLength(gUnknown_020387B4[CRY_TEST_LENGTH]); - SetPokemonCryProgress(gUnknown_020387B4[CRY_TEST_PROGRESS]); - SetPokemonCryRelease(gUnknown_020387B4[CRY_TEST_RELEASE]); - SetPokemonCryChorus(gUnknown_020387B4[CRY_TEST_CHORUS]); - SetPokemonCryPriority(gUnknown_020387B4[CRY_TEST_PRIORITY]); - - remaining = gUnknown_020387B4[CRY_TEST_UNK0] % 128; - divide = gUnknown_020387B4[CRY_TEST_UNK0] / 128; - - switch(divide) - { - case 0: - if(gUnknown_020387D8) - gUnknown_03005D30 = SetPokemonCryTone(&voicegroup_84537C0[remaining]); - else - gUnknown_03005D30 = SetPokemonCryTone(&voicegroup_8452590[remaining]); - break; - case 1: - if(gUnknown_020387D8) - gUnknown_03005D30 = SetPokemonCryTone(&voicegroup_8453DC0[remaining]); - else - gUnknown_03005D30 = SetPokemonCryTone(&voicegroup_8452B90[remaining]); - break; - case 2: - if(gUnknown_020387D8) - gUnknown_03005D30 = SetPokemonCryTone(&voicegroup_84543C0[remaining]); - else - gUnknown_03005D30 = SetPokemonCryTone(&voicegroup_8453190[remaining]); - break; - case 3: - if(gUnknown_020387D8) - gUnknown_03005D30 = SetPokemonCryTone(&voicegroup_84549C0[remaining]); - else - gUnknown_03005D30 = SetPokemonCryTone(&voicegroup_8453790[remaining]); - break; - } - } - - // _080BACA2 - if(gUnknown_03005D30 != NULL) - { - gUnknown_020387B1 = IsPokemonCryPlaying(gUnknown_03005D30); - - if(gUnknown_020387B1 != gUnknown_020387B2) - sub_80BAD5C(); - - gUnknown_020387B2 = gUnknown_020387B1; - } -} - -void sub_80BACDC(s8 var) -{ - int minMaxArray[ARRAY_COUNT(gUnknown_083D039C)]; - - memcpy(minMaxArray, gUnknown_083D039C, sizeof(gUnknown_083D039C)); - gUnknown_020387B4[gUnknown_020387B3] += var; - - if(gUnknown_020387B4[gUnknown_020387B3] > minMaxArray[MULTI_DIM_ARR(gUnknown_020387B3, B_16, MAX)]) - gUnknown_020387B4[gUnknown_020387B3] = minMaxArray[MULTI_DIM_ARR(gUnknown_020387B3, B_16, MIN)]; - - if(gUnknown_020387B4[gUnknown_020387B3] < minMaxArray[MULTI_DIM_ARR(gUnknown_020387B3, B_16, MIN)]) - gUnknown_020387B4[gUnknown_020387B3] = minMaxArray[MULTI_DIM_ARR(gUnknown_020387B3, B_16, MAX)]; -} - -void sub_80BAD5C(void) -{ - sub_80BAE78(gUnknown_020387B4[CRY_TEST_UNK0] + 1, 0xB, 0x1, 0x5); - sub_80BAE78(gUnknown_020387B4[CRY_TEST_VOLUME], 0xB, 0x3, 0x5); - sub_80BAE78(gUnknown_020387B4[CRY_TEST_PANPOT], 0xB, 0x5, 0x5); - sub_80BAE78(gUnknown_020387B4[CRY_TEST_PITCH], 0xB, 0x7, 0x5); - sub_80BAE78(gUnknown_020387B4[CRY_TEST_LENGTH], 0xB, 0x9, 0x5); - sub_80BAE78(gUnknown_020387B4[CRY_TEST_RELEASE], 0xB, 0xB, 0x5); - sub_80BAE78(gUnknown_020387B4[CRY_TEST_PROGRESS], 0xB, 0xD, 0x5); - sub_80BAE78(gUnknown_020387B4[CRY_TEST_CHORUS], 0xB, 0xF, 0x5); - sub_80BAE78(gUnknown_020387B4[CRY_TEST_PRIORITY], 0xB, 0x11, 0x5); - sub_80BAE78(gUnknown_020387B1, 0x1B, 0x10, 0x1); - sub_80BAE78(gUnknown_020387D8, 0x1B, 0xE, 0x1); - sub_80BAE78(gUnknown_020387D9, 0x1B, 0xC, 0x1); -} - -void sub_80BAE10(u8 var1, u8 var2) -{ - u8 str1[sizeof(gUnknown_083D03DC)]; - u8 str2[sizeof(gUnknown_083D03DE)]; - - memcpy(str1, gUnknown_083D03DC, sizeof(gUnknown_083D03DC)); - memcpy(str2, gUnknown_083D03DE, sizeof(gUnknown_083D03DE)); - - MenuPrint(str2, gUnknown_083D0300[MULTI_DIM_ARR(var1, B_16, 0)], gUnknown_083D0300[MULTI_DIM_ARR(var1, B_16, 1)]); - MenuPrint(str1, gUnknown_083D0300[MULTI_DIM_ARR(var2, B_16, 0)], gUnknown_083D0300[MULTI_DIM_ARR(var2, B_16, 1)]); -} - -/*void sub_80BAE78(int var1, u16 var2, u16 var3, u8 var4) -{ - u32 powers[6]; - u8 str[8]; - u8 i; - u8 someVar, someVar2; - - memcpy(powers, gUnknown_083D03E0, sizeof(powers); - - for(i = 0; i < var4; i++) - str[i] = 0; - - str[var4 + 1] = CHAR_0; - someVar = 0; - - if(var1 < 0) // make absolute value? wtf - { - var1 = -var1; // just use abs? - someVar = 1; - } - - // _080BAED6 - someVar2 = 0; - if(var4 == 1) - someVar2 = 1; - - // _080BAEE2 - for(;;) - { - - } -}*/ - -// no. -__attribute__((naked)) -void sub_80BAE78(int var1, u16 var2, u16 var3, u8 var4) -{ - asm(".syntax unified\n\ - push {r4-r7,lr}\n\ - mov r7, r10\n\ - mov r6, r9\n\ - mov r5, r8\n\ - push {r5-r7}\n\ - sub sp, 0x2C\n\ - mov r8, r0\n\ - lsls r1, 16\n\ - lsrs r6, r1, 16\n\ - lsls r2, 16\n\ - lsrs r2, 16\n\ - lsls r3, 24\n\ - lsrs r7, r3, 24\n\ - mov r1, sp\n\ - ldr r0, _080BAF80 @ =gUnknown_083D03E0\n\ - ldm r0!, {r3-r5}\n\ - stm r1!, {r3-r5}\n\ - ldm r0!, {r3-r5}\n\ - stm r1!, {r3-r5}\n\ - movs r5, 0\n\ - add r0, sp, 0x18\n\ - mov r9, r0\n\ - cmp r5, r7\n\ - bgt _080BAEC0\n\ - mov r4, r9\n\ - movs r3, 0\n\ -_080BAEAC:\n\ - lsls r0, r5, 24\n\ - asrs r0, 24\n\ - adds r1, r4, r0\n\ - strb r3, [r1]\n\ - adds r0, 0x1\n\ - lsls r0, 24\n\ - lsrs r5, r0, 24\n\ - asrs r0, 24\n\ - cmp r0, r7\n\ - ble _080BAEAC\n\ -_080BAEC0:\n\ - adds r0, r7, 0x1\n\ - add r0, r9\n\ - movs r1, 0xFF\n\ - strb r1, [r0]\n\ - movs r1, 0\n\ - mov r3, r8\n\ - cmp r3, 0\n\ - bge _080BAED6\n\ - negs r3, r3\n\ - mov r8, r3\n\ - movs r1, 0x1\n\ -_080BAED6:\n\ - movs r4, 0\n\ - mov r10, r4\n\ - cmp r7, 0x1\n\ - bne _080BAEE2\n\ - movs r5, 0x1\n\ - mov r10, r5\n\ -_080BAEE2:\n\ - subs r0, r7, 0x1\n\ - lsls r0, 24\n\ - lsrs r5, r0, 24\n\ - lsls r0, r5, 24\n\ - lsls r6, 24\n\ - str r6, [sp, 0x24]\n\ - lsls r2, 24\n\ - str r2, [sp, 0x28]\n\ - cmp r0, 0\n\ - blt _080BAF62\n\ - str r1, [sp, 0x20]\n\ -_080BAEF8:\n\ - asrs r6, r0, 24\n\ - lsls r0, r6, 2\n\ - add r0, sp\n\ - ldr r1, [r0]\n\ - mov r0, r8\n\ - bl __divsi3\n\ - lsls r0, 24\n\ - lsrs r2, r0, 24\n\ - cmp r0, 0\n\ - bne _080BAF1A\n\ - mov r0, r10\n\ - cmp r0, 0\n\ - bne _080BAF1A\n\ - lsls r4, r5, 24\n\ - cmp r6, 0\n\ - bne _080BAF46\n\ -_080BAF1A:\n\ - lsls r4, r5, 24\n\ - ldr r3, [sp, 0x20]\n\ - cmp r3, 0\n\ - beq _080BAF34\n\ - mov r5, r10\n\ - cmp r5, 0\n\ - bne _080BAF34\n\ - asrs r0, r4, 24\n\ - subs r0, r7, r0\n\ - subs r0, 0x1\n\ - add r0, r9\n\ - movs r1, 0xAE\n\ - strb r1, [r0]\n\ -_080BAF34:\n\ - asrs r1, r4, 24\n\ - subs r1, r7, r1\n\ - add r1, r9\n\ - lsls r0, r2, 24\n\ - asrs r0, 24\n\ - subs r0, 0x5F\n\ - strb r0, [r1]\n\ - movs r0, 0x1\n\ - mov r10, r0\n\ -_080BAF46:\n\ - asrs r4, 24\n\ - lsls r0, r4, 2\n\ - add r0, sp\n\ - ldr r1, [r0]\n\ - mov r0, r8\n\ - bl __modsi3\n\ - mov r8, r0\n\ - subs r4, 0x1\n\ - lsls r4, 24\n\ - lsrs r5, r4, 24\n\ - lsls r0, r5, 24\n\ - cmp r0, 0\n\ - bge _080BAEF8\n\ -_080BAF62:\n\ - ldr r3, [sp, 0x24]\n\ - lsrs r1, r3, 24\n\ - ldr r4, [sp, 0x28]\n\ - lsrs r2, r4, 24\n\ - mov r0, r9\n\ - bl MenuPrint\n\ - add sp, 0x2C\n\ - pop {r3-r5}\n\ - mov r8, r3\n\ - mov r9, r4\n\ - mov r10, r5\n\ - pop {r4-r7}\n\ - pop {r0}\n\ - bx r0\n\ - .align 2, 0\n\ -_080BAF80: .4byte gUnknown_083D03E0\n\ - .syntax divided"); -} - -void sub_80BAF84(u8 taskId) -{ - u8 seStr[sizeof(gOtherText_SE)]; - u8 panStr[sizeof(gOtherText_Pan)]; - u8 playingStr[sizeof(gDebugText_Playing)]; - - memcpy(seStr, gOtherText_SE, sizeof(gOtherText_SE)); - memcpy(panStr, gOtherText_Pan, sizeof(gOtherText_Pan)); - memcpy(playingStr, gDebugText_Playing, sizeof(gDebugText_Playing)); - - REG_DISPCNT = 0x3140; - MenuDrawTextWindow(0, 0, 0x1D, 0x13); - MenuPrint(seStr, 3, 2); - MenuPrint(panStr, 3, 4); - MenuPrint(playingStr, 3, 8); - REG_WIN0H = WIN_RANGE(0, 240); - REG_WIN0V = WIN_RANGE(0, 160); - gUnknown_020387B4[CRY_TEST_UNK0] = 1; - gUnknown_020387B4[CRY_TEST_PANPOT] = 0; - gUnknown_020387B4[CRY_TEST_CHORUS] = 0; - gUnknown_020387B4[CRY_TEST_PROGRESS] = 0; - gUnknown_020387B4[CRY_TEST_RELEASE] = 0; - sub_80BB1D4(); - TASK.FUNC = sub_80BB038; -} - -void sub_80BB038(u8 taskId) -{ - sub_80BB1D4(); - if(gUnknown_020387B4[CRY_TEST_PROGRESS]) - { - if(gUnknown_020387B4[CRY_TEST_RELEASE]) - { - gUnknown_020387B4[CRY_TEST_RELEASE]--; - } - else // _080BB05C - { - s8 panpot = gUnknown_083D03F8[gUnknown_020387B4[CRY_TEST_PANPOT]]; - if(panpot != -128) - { - if(panpot == 0x7F) - { - gUnknown_020387B4[CRY_TEST_CHORUS] += 2; - if(gUnknown_020387B4[CRY_TEST_CHORUS] < 0x3F) - SE12PanpotControl(gUnknown_020387B4[CRY_TEST_CHORUS]); - } - } - else // _080BB08C - { - gUnknown_020387B4[CRY_TEST_CHORUS] -= 2; - if(gUnknown_020387B4[CRY_TEST_CHORUS] > -0x40) - SE12PanpotControl(gUnknown_020387B4[CRY_TEST_CHORUS]); - } - } - } - // _080BB0A2 - if(gMain.newKeys & B_BUTTON) - { - REG_DISPCNT = 0x7140; - REG_WIN0H = WIN_RANGE(17, 223); - REG_WIN0V = WIN_RANGE(1, 31); - MenuZeroFillWindowRect(0, 0, 0x1D, 0x13); - TASK.FUNC = sub_80BA258; - return; - } - if(gMain.newKeys & A_BUTTON) // _080BB104 - { - s8 panpot = gUnknown_083D03F8[gUnknown_020387B4[CRY_TEST_PANPOT]]; - if(panpot != -128) - { - if(panpot == 0x7F) - { - PlaySE12WithPanning(gUnknown_020387B4[CRY_TEST_UNK0], -0x40); - gUnknown_020387B4[CRY_TEST_CHORUS] = -0x40; - gUnknown_020387B4[CRY_TEST_PROGRESS] = 1; - gUnknown_020387B4[CRY_TEST_RELEASE] = 0x1E; - return; - } - } - else // _080BB140 - { - PlaySE12WithPanning(gUnknown_020387B4[CRY_TEST_UNK0], 0x3F); - gUnknown_020387B4[CRY_TEST_CHORUS] = 0x3F; - gUnknown_020387B4[CRY_TEST_PROGRESS] = 1; - gUnknown_020387B4[CRY_TEST_RELEASE] = 0x1E; - return; - } - // _080BB154 - PlaySE12WithPanning(gUnknown_020387B4[CRY_TEST_UNK0], panpot); - gUnknown_020387B4[CRY_TEST_PROGRESS] = 0; - return; - } - if(gMain.newKeys & L_BUTTON) // _080BB15E - { - gUnknown_020387B4[CRY_TEST_PANPOT]++; - if(gUnknown_020387B4[CRY_TEST_PANPOT] > 4) - gUnknown_020387B4[CRY_TEST_PANPOT] = 0; - } - if(gMain.newKeys & R_BUTTON) // _080BB176 - { - gUnknown_020387B4[CRY_TEST_PANPOT]--; - if(gUnknown_020387B4[CRY_TEST_PANPOT] < 0) - gUnknown_020387B4[CRY_TEST_PANPOT] = 4; - } - if(gMain.newAndRepeatedKeys & DPAD_RIGHT) // _080BB192 - { - gUnknown_020387B4[CRY_TEST_UNK0]++; - if(gUnknown_020387B4[CRY_TEST_UNK0] > 0xF7) - gUnknown_020387B4[CRY_TEST_UNK0] = 0; - } - else if(gMain.newAndRepeatedKeys & DPAD_LEFT) // _080BB1B0 - { - gUnknown_020387B4[CRY_TEST_UNK0]--; - if(gUnknown_020387B4[CRY_TEST_UNK0] < 0) - gUnknown_020387B4[CRY_TEST_UNK0] = 0xF7; - } -} - -void sub_80BB1D4(void) -{ - u8 lrStr[sizeof(gOtherText_LR)]; - u8 rlStr[sizeof(gOtherText_RL)]; - - memcpy(lrStr, gOtherText_LR, sizeof(lrStr)); - memcpy(rlStr, gOtherText_RL, sizeof(rlStr)); - - sub_80BAE78(gUnknown_020387B4[CRY_TEST_UNK0], 7, 2, 3); - - switch(gUnknown_083D03F8[gUnknown_020387B4[CRY_TEST_PANPOT]]) - { - case 0x7F: - MenuPrint(lrStr, 7, 4); - break; - case -0x80: - MenuPrint(rlStr, 7, 4); - break; - default: - sub_80BAE78(gUnknown_083D03F8[gUnknown_020387B4[CRY_TEST_PANPOT]], 7, 4, 3); - break; - } - sub_80BAE78(IsSEPlaying(), 12, 8, 1); -} - -void sub_80BB25C(u8 taskId) -{ - struct CryRelatedStruct cryStruct, cryStruct2; - u8 zero; - - SetUpWindowConfig(&gWindowConfig_81E6C3C); - InitMenuWindow(&gWindowConfig_81E6CE4); - gUnknown_03005D34 = 1; - ResetSpriteData(); - FreeAllSpritePalettes(); - - cryStruct.unk0 = 0x2000; - cryStruct.unk2 = 29; - cryStruct.paletteNo = 12; - cryStruct.yPos = 30; - cryStruct.xPos = 4; - - zero = 0; // wtf? - gUnknown_03005E98 = 0; - - while(sub_8119E3C(&cryStruct, 3) == FALSE); - - cryStruct2.unk0 = 0; - cryStruct2.unk2 = 15; - cryStruct2.paletteNo = 13; - cryStruct2.xPos = 12; - cryStruct2.yPos = 12; - - zero = 0; // wtf? - gUnknown_03005E98 = 0; - - while(ShowPokedexCryScreen(&cryStruct2, 2) == FALSE); - - MenuDrawTextWindow(0, 16, 5, 19); - sub_80BB494(); - BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, 0); - REG_BG2HOFS = 0; - REG_BG2VOFS = 0; - REG_BG2CNT = 0xF01; - REG_BG3CNT = 0x1D03; - REG_DISPCNT = 0x1d40; - m4aMPlayFadeOutTemporarily(&gMPlay_BGM, 2); - TASK.FUNC = sub_80BB3B4; -} - -void sub_80BB3B4(u8 taskId) -{ - sub_8119F88(3); - - if(gMain.newKeys & A_BUTTON) - { - sub_811A050(gUnknown_03005D34); - } - if(gMain.newKeys & R_BUTTON) - { - StopCryAndClearCrySongs(); - } - if(gMain.newAndRepeatedKeys & DPAD_UP) - { - if(--gUnknown_03005D34 == 0) - gUnknown_03005D34 = 384; // total species - sub_80BB494(); - } - if(gMain.newAndRepeatedKeys & DPAD_DOWN) - { - if(++gUnknown_03005D34 > 384) - gUnknown_03005D34 = 1; - sub_80BB494(); - } - if(gMain.newKeys & B_BUTTON) - { - REG_DISPCNT = 0x7140; - REG_WIN0H = WIN_RANGE(17, 223); - REG_WIN0V = WIN_RANGE(1, 31); - MenuZeroFillWindowRect(0, 0, 0x1D, 0x13); - TASK.FUNC = sub_80BA258; - DestroyCryMeterNeedleSprite(); - } -} - -void sub_80BB494(void) -{ - sub_80BAE78(gUnknown_03005D34, 1, 17, 3); -} diff --git a/src/unused_8124F94.c b/src/unused_8124F94.c index 93b569058..5f76fa92e 100644 --- a/src/unused_8124F94.c +++ b/src/unused_8124F94.c @@ -64,7 +64,7 @@ u8 unref_sub_8124FD8(struct UnknownStruct1 *a, const struct UnknownStruct2 *b) } else { - sub_800D238(b->src, a->dest + a->unk2 * 64); + LZDecompressWram(b->src, a->dest + a->unk2 * 64); } a->unk88[a->unk1].unk8 = a->unk2; temp = r6 + a->unk2; @@ -95,7 +95,7 @@ u8 unref_sub_81250A4(struct UnknownStruct1 *a, struct UnknownStruct3 *b) { u16 palette[16]; - sub_800D238(b->paletteSrc, palette); + LZDecompressWram(b->paletteSrc, palette); LoadPalette(palette, a->paletteNum * 16, 32); } a->unk8[a->paletteNum].paletteCount = a->paletteNum; @@ -111,7 +111,7 @@ u8 unref_sub_8125118(struct UnknownStruct1 *a, struct UnknownStruct3 *b) u8 r7 = b->paletteCount; u8 i; - sub_800D238(b->paletteSrc, palettes); + LZDecompressWram(b->paletteSrc, palettes); for (i = a->paletteNum; i < r7; i++) { if (a->paletteNum + i >= 16) diff --git a/sym_bss.txt b/sym_bss.txt index aa16612ed..4f6d9c95b 100644 --- a/sym_bss.txt +++ b/sym_bss.txt @@ -1,41 +1,41 @@ - .include "src/main.o" - .include "src/sprite.o" - .include "src/text.o" - .include "src/string_util.o" - .include "src/link.o" - .include "src/rtc.o" - .include "src/daycare.o" - .include "src/trade.o" - .include "src/berry_blender.o" - .include "src/play_time.o" - .include "src/overworld.o" - .include "src/field_camera.o" - .include "src/field_map_obj.o" - .include "src/field_message_box.o" - .include "src/text_window.o" - .include "src/script.o" - .include "src/start_menu.o" - .include "src/menu.o" - .include "src/tileset_anim.o" - .include "src/sound.o" - .include "src/field_weather.o" - .include "src/field_effect.o" - .include "src/item_menu.o" - .include "src/shop.o" - .include "src/record_mixing.o" - .include "src/tv.o" - .include "src/battle_anim_80CA710.o" - .include "src/easy_chat.o" - .include "src/pokenav.o" - .include "src/mauville_man.o" - .include "src/menu_helpers.o" - .include "src/contest_painting.o" - .include "src/pokeblock.o" - .include "src/field_specials.o" - .include "src/learn_move.o" - .include "src/player_pc.o" + .include "src/engine/main.o" + .include "src/engine/sprite.o" + .include "src/engine/text.o" + .include "src/engine/string_util.o" + .include "src/engine/link.o" + .include "src/engine/rtc.o" + .include "src/field/daycare.o" + .include "src/engine/trade.o" + .include "src/scene/berry_blender.o" + .include "src/engine/play_time.o" + .include "src/field/overworld.o" + .include "src/field/field_camera.o" + .include "src/field/field_map_obj.o" + .include "src/field/field_message_box.o" + .include "src/engine/text_window.o" + .include "src/engine/script.o" + .include "src/field/start_menu.o" + .include "src/engine/menu.o" + .include "src/engine/tileset_anim.o" + .include "src/engine/sound.o" + .include "src/field/field_weather.o" + .include "src/field/field_effect.o" + .include "src/field/item_menu.o" + .include "src/field/shop.o" + .include "src/engine/record_mixing.o" + .include "src/field/tv.o" + .include "src/battle/battle_anim_80CA710.o" + .include "src/field/easy_chat.o" + .include "src/field/pokenav.o" + .include "src/field/mauville_man.o" + .include "src/field/menu_helpers.o" + .include "src/scene/contest_painting.o" + .include "src/field/pokeblock.o" + .include "src/field/field_specials.o" + .include "src/pokemon/learn_move.o" + .include "src/field/player_pc.o" .include "asm/m4a_1.o" - .include "src/agb_flash.o" - .include "src/siirtc.o" + .include "src/libs/agb_flash.o" + .include "src/libs/siirtc.o" .include "tools/agbcc/lib/libgcc.a:dp-bit.o" .include "tools/agbcc/lib/libgcc.a:fp-bit.o" diff --git a/sym_common.txt b/sym_common.txt index d9da3ec3b..b1d99f58b 100644 --- a/sym_common.txt +++ b/sym_common.txt @@ -1,8 +1,8 @@ - .include "main.o" - .include "sprite.o" - .include "string_util.o" - .include "link.o" - .include "rtc.o" + .include "engine/main.o" + .include "engine/sprite.o" + .include "engine/string_util.o" + .include "engine/link.o" + .include "engine/rtc.o" .include "rom3.o" @ battle @@ -104,10 +104,10 @@ gUnknown_03004348: @ 3004348 gUnknown_0300434C: @ 300434C .space 0x4 - .include "pokemon_1.o" - .include "rng.o" - .include "egg_hatch.o" - .include "load_save.o" + .include "pokemon/pokemon_1.o" + .include "engine/rng.o" + .include "scene/egg_hatch.o" + .include "engine/load_save.o" @ trade @@ -117,12 +117,12 @@ gUnknown_03004824: @ 3004824 gUnknown_03004828: @ 3004828 .space 0x8 - .include "berry_blender.o" - .include "overworld.o" - .include "fieldmap.o" - .include "field_camera.o" - .include "field_map_obj.o" - .include "field_control_avatar.o" + .include "scene/berry_blender.o" + .include "field/overworld.o" + .include "field/fieldmap.o" + .include "field/field_camera.o" + .include "field/field_map_obj.o" + .include "field/field_control_avatar.o" @ party_menu? @@ -130,11 +130,11 @@ gUnknown_03004828: @ 3004828 gUnknown_03004AE4: @ 3004AE4 .space 0x4 - .include "start_menu.o" - .include "sound.o" - .include "battle_anim.o" - .include "task.o" - .include "mori_debug_menu.o" + .include "field/start_menu.o" + .include "engine/sound.o" + .include "battle/battle_anim.o" + .include "engine/task.o" + .include "debug/mori_debug_menu.o" @ unknown_task @@ -160,8 +160,8 @@ gUnknown_03005560: @ 3005560 gUnknown_030056A0: @ 30056A0 .space 0x640 - .include "pokemon_menu.o" - .include "pokedex.o" + .include "pokemon/pokemon_menu.o" + .include "pokemon/pokedex.o" @ pokemon_summary_screen @@ -172,7 +172,7 @@ gUnknown_03005CF0: @ 3005CF0 @ item_menu .align 4 -gUnknown_03005D00: @ 3005D00 +gFieldItemUseCallback: @ 3005D00 .space 0x10 gBagPocketScrollStates: @ 3005D10 @@ -187,14 +187,9 @@ gCurrentBagPocketItemSlots: @ 3005D24 gUnknown_03005D28: @ 3005D28 .space 0x4 - .include "record_mixing.o" - .include "sound_check_menu.o" - - .align 2 -gUnknown_03005D34: @ 3005D34 - .space 0x4 - - .include "tv.o" + .include "engine/record_mixing.o" + .include "debug/sound_check_menu.o" + .include "field/tv.o" .space 0x64 @ unused variable? @@ -236,19 +231,19 @@ gUnknown_03005E08: @ 3005E08 gUnknown_03005E0C: @ 3005E0C .space 0x4 - .include "contest_painting.o" - .include "evolution_scene.o" + .include "scene/contest_painting.o" + .include "scene/evolution_scene.o" @ pokedex_cry_screen gUnknown_03005E98: @ 3005E98 .space 0x4 - .include "save.o" + .include "engine/save.o" .space 0x10 @ unused variable? - .include "intro.o" + .include "scene/intro.o" @ battle_anim_813F0F4 @@ -262,7 +257,6 @@ gUnknown_03005F10: @ 3005F10 gUnknown_03005F14: @ 3005F14 .space 0xC - - .include "pokeblock_feed.o" - .include "m4a_2.o" - .include "agb_flash.o" + .include "pokemon/pokeblock_feed.o" + .include "libs/m4a_2.o" + .include "libs/agb_flash.o" diff --git a/sym_ewram.txt b/sym_ewram.txt index 040173cfd..8289165e9 100644 --- a/sym_ewram.txt +++ b/sym_ewram.txt @@ -1,11 +1,11 @@ - .include "src/main.o" - .include "src/sprite.o" - .include "src/text.o" - .include "src/string_util.o" + .include "src/engine/main.o" + .include "src/engine/sprite.o" + .include "src/engine/text.o" + .include "src/engine/string_util.o" .space 0x2E8 - .include "src/link.o" + .include "src/engine/link.o" .include "src/rom3.o" @ battle @@ -293,9 +293,9 @@ gMoveToLearn: @ 2024E82 gBattleMonForms: @ 2024E84 .space 0x4 - .include "src/pokemon_1.o" - .include "src/pokemon_2.o" - .include "src/load_save.o" + .include "src/pokemon/pokemon_1.o" + .include "src/pokemon/pokemon_2.o" + .include "src/engine/load_save.o" @ trade @@ -308,17 +308,17 @@ gUnknown_02029700: @ 2029700 gUnknown_020297D8: @ 20297D8 .space 0x4 - .include "src/berry_blender.o" - .include "src/new_game.o" - .include "src/overworld.o" - .include "src/fieldmap.o" - .include "src/field_camera.o" - .include "src/field_player_avatar.o" - .include "src/field_message_box.o" - .include "src/script.o" - .include "src/scrcmd.o" - .include "src/field_control_avatar.o" - .include "src/event_data.o" + .include "src/scene/berry_blender.o" + .include "src/scene/new_game.o" + .include "src/field/overworld.o" + .include "src/field/fieldmap.o" + .include "src/field/field_camera.o" + .include "src/field/field_player_avatar.o" + .include "src/field/field_message_box.o" + .include "src/engine/script.o" + .include "src/field/scrcmd.o" + .include "src/field/field_control_avatar.o" + .include "src/field/event_data.o" @ party_menu @@ -338,14 +338,14 @@ gUnknown_0202E8F8: @ 202E8F8 gUnknown_0202E8FA: @ 202E8FA .space 0x2 - .include "src/start_menu.o" - .include "src/menu.o" - .include "src/tileset_anim.o" - .include "src/palette.o" - .include "src/sound.o" - .include "src/battle_anim.o" + .include "src/field/start_menu.o" + .include "src/engine/menu.o" + .include "src/engine/tileset_anim.o" + .include "src/engine/palette.o" + .include "src/engine/sound.o" + .include "src/battle/battle_anim.o" .include "src/rom_8077ABC.o" - .include "src/title_screen.o" + .include "src/scene/title_screen.o" @ field_weather @@ -365,20 +365,19 @@ gUnknown_0202FF38: @ 202FF38 gUnknown_0202FF58: @ 202FF58 .space 0x4 - .include "src/battle_setup.o" - .include "src/wild_encounter.o" - .include "src/field_effect.o" + .include "src/battle/battle_setup.o" + .include "src/field/wild_encounter.o" + .include "src/field/field_effect.o" @ unknown_task gUnknown_0202FFA4: @ 202FFA4 .space 0x4 - - .include "src/pokemon_menu.o" - .include "src/pokedex.o" - .include "src/trainer_card.o" - .include "src/pokemon_storage_system.o" + .include "src/pokemon/pokemon_menu.o" + .include "src/pokemon/pokedex.o" + .include "src/engine/trainer_card.o" + .include "src/pokemon/pokemon_storage_system.o" @ still pokemon_storage_system @@ -442,9 +441,9 @@ gUnknown_020384F0: @ 20384F0 gUnknown_020384F4: @ 20384F4 .space 0x4 - .include "src/script_movement.o" - .include "src/map_name_popup.o" - .include "src/item_menu.o" + .include "src/field/script_movement.o" + .include "src/field/map_name_popup.o" + .include "src/field/item_menu.o" @ contest @@ -501,8 +500,8 @@ gScriptContestCategory: @ 203869C gScriptContestRank: @ 203869E .space 0x2 - .include "src/shop.o" - .include "src/money.o" + .include "src/field/shop.o" + .include "src/field/money.o" @ record_mixing @@ -510,7 +509,7 @@ gScriptContestRank: @ 203869E gUnknown_02038738: @ 2038738 .space 0x78 - .include "src/sound_check_menu.o" + .include "src/debug/sound_check_menu.o" @ secret_base @@ -520,7 +519,7 @@ gUnknown_020387DC: @ 20387DC @ tv - .include "src/tv.o" + .include "src/field/tv.o" @ fldeff_80C5CD4 @@ -528,8 +527,8 @@ gUnknown_020387DC: @ 20387DC gUnknown_020387EC: @ 20387EC .space 0x4 - .include "src/rotating_gate.o" - .include "src/safari_zone.o" + .include "src/field/rotating_gate.o" + .include "src/field/safari_zone.o" @ easy_chat @@ -544,15 +543,15 @@ gUnknown_020388B0: @ 20388B0 gUnknown_020388B4: @ 20388B4 .space 0x4 - .include "src/mon_markings.o" - .include "src/mauville_man.o" - .include "src/menu_helpers.o" - .include "src/region_map.o" - .include "src/decoration.o" - .include "src/battle_ai.o" + .include "src/pokemon/mon_markings.o" + .include "src/field/mauville_man.o" + .include "src/field/menu_helpers.o" + .include "src/field/region_map.o" + .include "src/field/decoration.o" + .include "src/battle/battle_ai.o" .include "src/rom6.o" - .include "src/pokeblock.o" - .include "src/field_specials.o" + .include "src/field/pokeblock.o" + .include "src/field/field_specials.o" @ pokedex_area_screen @@ -580,7 +579,7 @@ gUnknown_0203926A: @ 203926A gAbilitiesPerBank: @ 203926C .space 0x4 - .include "src/choose_party.o" + .include "src/field/choose_party.o" @ cable_car @@ -606,19 +605,19 @@ gUnknown_0203927C: @ 203927C gUnknown_0203927D: @ 203927D .space 0x7 - .include "src/save.o" - .include "src/mystery_event_script.o" - .include "src/roamer.o" - .include "src/use_pokeblock.o" - .include "src/player_pc.o" - .include "src/intro.o" - .include "src/hall_of_fame.o" - .include "src/credits.o" - .include "src/lottery_corner.o" - .include "src/berry_tag_screen.o" - .include "src/mystery_event_menu.o" - .include "src/save_failed_screen.o" - .include "src/pokeblock_feed.o" + .include "src/engine/save.o" + .include "src/engine/mystery_event_script.o" + .include "src/field/roamer.o" + .include "src/field/use_pokeblock.o" + .include "src/field/player_pc.o" + .include "src/scene/intro.o" + .include "src/scene/hall_of_fame.o" + .include "src/scene/credits.o" + .include "src/field/lottery_corner.o" + .include "src/field/berry_tag_screen.o" + .include "src/engine/mystery_event_menu.o" + .include "src/engine/save_failed_screen.o" + .include "src/pokemon/pokeblock_feed.o" @ intro_credits_graphics @@ -645,4 +644,4 @@ gUnknown_02039760: @ 2039760 gUnknown_0203A360: @ 203A360 .space 0x20 - .include "src/menu_cursor.o" + .include "src/engine/menu_cursor.o" |