From f15198bb95977aba3646da5672a28a79e6baaf5e Mon Sep 17 00:00:00 2001 From: MokhaLeee Date: Thu, 18 Jan 2024 06:49:18 +0000 Subject: [PATCH 1/3] dump world map event of prologue and ch1 --- asm/code_80BF13C.s | 206 +-- data/const_data_20688C.s | 36 +- data/data_591AB4.s | 10 +- data/data_A394DC.s | 3312 +------------------------------------- data/data_A3E4D4.s | 40 +- data/data_eventscr_wm.s | 3 + include/ea-stdlib.h | 31 + include/event.h | 18 +- include/eventinfo.h | 56 + include/eventscript.h | 113 ++ include/variables.h | 18 +- include/worldmap.h | 19 +- ldscript.txt | 2 + scripts/dump_events.py | 138 +- scripts/fe8db.py | 136 ++ src/events/ch1-wm.h | 32 + src/events/prologue-wm.h | 214 +++ src/events_wm.c | 12 + src/evtcmd_gmap.c | 136 +- src/worldmap_entry.c | 6 +- src/worldmap_face.c | 4 +- src/worldmap_main.c | 28 +- 22 files changed, 998 insertions(+), 3572 deletions(-) create mode 100644 data/data_eventscr_wm.s create mode 100644 src/events/ch1-wm.h create mode 100644 src/events/prologue-wm.h create mode 100644 src/events_wm.c diff --git a/asm/code_80BF13C.s b/asm/code_80BF13C.s index a7efb43b8..d568ecfb1 100644 --- a/asm/code_80BF13C.s +++ b/asm/code_80BF13C.s @@ -368,7 +368,7 @@ sub_80C168C: @ 0x080C168C adds r0, r4, #0 movs r1, #0 bl AP_SwitchAnimation - ldr r0, _080C16D8 @ gUnknown_08A3EA70 + ldr r0, _080C16D8 @ ProcScr_GmapSogu movs r1, #3 bl Proc_Start str r4, [r0, #0x50] @@ -383,14 +383,14 @@ sub_80C168C: @ 0x080C168C _080C16CC: .4byte gUnknown_089ADD4C _080C16D0: .4byte 0x06013000 _080C16D4: .4byte gUnknown_089A8EF8 -_080C16D8: .4byte gUnknown_08A3EA70 +_080C16D8: .4byte ProcScr_GmapSogu THUMB_FUNC_END sub_80C168C THUMB_FUNC_START sub_80C16DC sub_80C16DC: @ 0x080C16DC push {lr} - ldr r0, _080C16F0 @ gUnknown_08A3EA70 + ldr r0, _080C16F0 @ ProcScr_GmapSogu bl Proc_Find cmp r0, #0 beq _080C16EA @@ -399,7 +399,7 @@ _080C16EA: pop {r1} bx r1 .align 2, 0 -_080C16F0: .4byte gUnknown_08A3EA70 +_080C16F0: .4byte ProcScr_GmapSogu THUMB_FUNC_END sub_80C16DC @@ -883,14 +883,14 @@ sub_80C1A74: @ 0x080C1A74 adds r4, r1, #0 cmp r2, #0 bne _080C1A8C - ldr r0, _080C1A88 @ gUnknown_08A3EAA8 + ldr r0, _080C1A88 @ ProcScr_GmapTimeMons movs r1, #3 bl Proc_Start b _080C1A94 .align 2, 0 -_080C1A88: .4byte gUnknown_08A3EAA8 +_080C1A88: .4byte ProcScr_GmapTimeMons _080C1A8C: - ldr r0, _080C1AAC @ gUnknown_08A3EAA8 + ldr r0, _080C1AAC @ ProcScr_GmapTimeMons adds r1, r2, #0 bl Proc_StartBlocking _080C1A94: @@ -907,14 +907,14 @@ _080C1AA2: pop {r1} bx r1 .align 2, 0 -_080C1AAC: .4byte gUnknown_08A3EAA8 +_080C1AAC: .4byte ProcScr_GmapTimeMons THUMB_FUNC_END sub_80C1A74 THUMB_FUNC_START sub_80C1AB0 sub_80C1AB0: @ 0x080C1AB0 push {r4, lr} - ldr r0, _080C1AD4 @ gUnknown_08A3EAA8 + ldr r0, _080C1AD4 @ ProcScr_GmapTimeMons bl Proc_EndEach movs r4, #0 _080C1ABA: @@ -930,7 +930,7 @@ _080C1ABA: pop {r0} bx r0 .align 2, 0 -_080C1AD4: .4byte gUnknown_08A3EAA8 +_080C1AD4: .4byte ProcScr_GmapTimeMons _080C1AD8: .4byte gProcScr_WorldMapMain THUMB_FUNC_END sub_80C1AB0 @@ -938,7 +938,7 @@ _080C1AD8: .4byte gProcScr_WorldMapMain THUMB_FUNC_START sub_80C1ADC sub_80C1ADC: @ 0x080C1ADC push {lr} - ldr r0, _080C1AF4 @ gUnknown_08A3EAA8 + ldr r0, _080C1AF4 @ ProcScr_GmapTimeMons bl Proc_Find cmp r0, #0 beq _080C1AF0 @@ -950,7 +950,7 @@ _080C1AF0: pop {r0} bx r0 .align 2, 0 -_080C1AF4: .4byte gUnknown_08A3EAA8 +_080C1AF4: .4byte ProcScr_GmapTimeMons THUMB_FUNC_END sub_80C1ADC @@ -1074,7 +1074,7 @@ _080C1BDC: .4byte gProcScr_WorldMapMain THUMB_FUNC_START sub_80C1BE0 sub_80C1BE0: @ 0x080C1BE0 push {lr} - ldr r0, _080C1BF4 @ gUnknown_08A3EAA8 + ldr r0, _080C1BF4 @ ProcScr_GmapTimeMons bl Proc_Find cmp r0, #0 beq _080C1BEE @@ -1083,7 +1083,7 @@ _080C1BEE: pop {r1} bx r1 .align 2, 0 -_080C1BF4: .4byte gUnknown_08A3EAA8 +_080C1BF4: .4byte ProcScr_GmapTimeMons THUMB_FUNC_END sub_80C1BE0 @@ -1534,13 +1534,13 @@ sub_80C1F18: @ 0x080C1F18 ldr r1, [sp, #0x1c] cmp r1, #0 beq _080C1F34 - ldr r0, _080C1F30 @ gUnknown_08A3EB10 + ldr r0, _080C1F30 @ ProcScr_GmapRmUpdate2 bl Proc_StartBlocking b _080C1F3C .align 2, 0 -_080C1F30: .4byte gUnknown_08A3EB10 +_080C1F30: .4byte ProcScr_GmapRmUpdate2 _080C1F34: - ldr r0, _080C1F58 @ gUnknown_08A3EB10 + ldr r0, _080C1F58 @ ProcScr_GmapRmUpdate2 movs r1, #3 bl Proc_Start _080C1F3C: @@ -1558,19 +1558,19 @@ _080C1F3C: pop {r1} bx r1 .align 2, 0 -_080C1F58: .4byte gUnknown_08A3EB10 +_080C1F58: .4byte ProcScr_GmapRmUpdate2 THUMB_FUNC_END sub_80C1F18 THUMB_FUNC_START sub_80C1F5C sub_80C1F5C: @ 0x080C1F5C push {lr} - ldr r0, _080C1F68 @ gUnknown_08A3EB10 + ldr r0, _080C1F68 @ ProcScr_GmapRmUpdate2 bl Proc_EndEach pop {r0} bx r0 .align 2, 0 -_080C1F68: .4byte gUnknown_08A3EB10 +_080C1F68: .4byte ProcScr_GmapRmUpdate2 THUMB_FUNC_END sub_80C1F5C @@ -1666,7 +1666,7 @@ sub_80C1FE0: @ 0x080C1FE0 bl CallARM_FillTileRect movs r0, #2 bl BG_EnableSyncByMask - ldr r0, _080C2058 @ gUnknown_08A3EAF0 + ldr r0, _080C2058 @ ProcScr_GmapRmUpdate1 adds r1, r5, #0 bl Proc_Start pop {r4, r5} @@ -1679,7 +1679,7 @@ _080C2048: .4byte gUnknown_08A9E4C4 _080C204C: .4byte gUnknown_08A9DF74 _080C2050: .4byte gGenericBuffer _080C2054: .4byte gBG1TilemapBuffer -_080C2058: .4byte gUnknown_08A3EAF0 +_080C2058: .4byte ProcScr_GmapRmUpdate1 THUMB_FUNC_END sub_80C1FE0 @@ -2164,7 +2164,7 @@ sub_80C2398: @ 0x080C2398 negs r0, r0 ands r0, r1 strb r0, [r2] - ldr r0, _080C241C @ gUnknown_08A3EAF0 + ldr r0, _080C241C @ ProcScr_GmapRmUpdate1 bl Proc_EndEach pop {r4} pop {r0} @@ -2173,7 +2173,7 @@ sub_80C2398: @ 0x080C2398 _080C2410: .4byte gProcScr_WorldMapMain _080C2414: .4byte gLCDControlBuffer _080C2418: .4byte gGMData -_080C241C: .4byte gUnknown_08A3EAF0 +_080C241C: .4byte ProcScr_GmapRmUpdate1 THUMB_FUNC_END sub_80C2398 @@ -2186,13 +2186,13 @@ Make6C_Gmap_RM: @ 0x080C2420 adds r1, r3, #0 cmp r1, #0 beq _080C243C - ldr r0, _080C2438 @ gUnknown_08A3EB50 + ldr r0, _080C2438 @ ProcScr_GmapRM bl Proc_StartBlocking b _080C2444 .align 2, 0 -_080C2438: .4byte gUnknown_08A3EB50 +_080C2438: .4byte ProcScr_GmapRM _080C243C: - ldr r0, _080C245C @ gUnknown_08A3EB50 + ldr r0, _080C245C @ ProcScr_GmapRM movs r1, #3 bl Proc_Start _080C2444: @@ -2209,26 +2209,26 @@ _080C2444: pop {r1} bx r1 .align 2, 0 -_080C245C: .4byte gUnknown_08A3EB50 +_080C245C: .4byte ProcScr_GmapRM THUMB_FUNC_END Make6C_Gmap_RM THUMB_FUNC_START sub_80C2460 sub_80C2460: @ 0x080C2460 push {lr} - ldr r0, _080C246C @ gUnknown_08A3EB50 + ldr r0, _080C246C @ ProcScr_GmapRM bl Proc_EndEach pop {r0} bx r0 .align 2, 0 -_080C246C: .4byte gUnknown_08A3EB50 +_080C246C: .4byte ProcScr_GmapRM THUMB_FUNC_END sub_80C2460 THUMB_FUNC_START sub_80C2470 sub_80C2470: @ 0x080C2470 push {lr} - ldr r0, _080C2484 @ gUnknown_08A3EB50 + ldr r0, _080C2484 @ ProcScr_GmapRM bl Proc_Find cmp r0, #0 beq _080C247E @@ -2237,7 +2237,7 @@ _080C247E: pop {r1} bx r1 .align 2, 0 -_080C2484: .4byte gUnknown_08A3EB50 +_080C2484: .4byte ProcScr_GmapRM THUMB_FUNC_END sub_80C2470 @@ -2248,7 +2248,7 @@ sub_80C2488: @ 0x080C2488 lsrs r5, r0, #0x10 lsls r1, r1, #0x10 lsrs r4, r1, #0x10 - ldr r0, _080C24A8 @ gUnknown_08A3EB50 + ldr r0, _080C24A8 @ ProcScr_GmapRM bl Proc_Find cmp r0, #0 beq _080C24A0 @@ -2259,7 +2259,7 @@ _080C24A0: pop {r0} bx r0 .align 2, 0 -_080C24A8: .4byte gUnknown_08A3EB50 +_080C24A8: .4byte ProcScr_GmapRM THUMB_FUNC_END sub_80C2488 @@ -2268,7 +2268,7 @@ GetWMDisplayPosition: @ 0x080C24AC push {r4, r5, lr} adds r4, r0, #0 adds r5, r1, #0 - ldr r0, _080C24C4 @ gUnknown_08A3EB50 + ldr r0, _080C24C4 @ ProcScr_GmapRM bl Proc_Find adds r1, r0, #0 cmp r1, #0 @@ -2276,7 +2276,7 @@ GetWMDisplayPosition: @ 0x080C24AC movs r0, #0 b _080C24D2 .align 2, 0 -_080C24C4: .4byte gUnknown_08A3EB50 +_080C24C4: .4byte ProcScr_GmapRM _080C24C8: ldrh r0, [r1, #0x2e] strh r0, [r4] @@ -2293,7 +2293,7 @@ _080C24D2: THUMB_FUNC_START sub_80C24D8 sub_80C24D8: @ 0x080C24D8 push {lr} - ldr r0, _080C24F4 @ gUnknown_08A3EB50 + ldr r0, _080C24F4 @ ProcScr_GmapRM bl Proc_Find cmp r0, #0 beq _080C24F0 @@ -2307,14 +2307,14 @@ _080C24F0: pop {r0} bx r0 .align 2, 0 -_080C24F4: .4byte gUnknown_08A3EB50 +_080C24F4: .4byte ProcScr_GmapRM THUMB_FUNC_END sub_80C24D8 THUMB_FUNC_START sub_80C24F8 sub_80C24F8: @ 0x080C24F8 push {r4, r5, lr} - ldr r0, _080C2584 @ gUnknown_08A3EB50 + ldr r0, _080C2584 @ ProcScr_GmapRM bl Proc_Find adds r5, r0, #0 cmp r5, #0 @@ -2369,7 +2369,7 @@ sub_80C24F8: @ 0x080C24F8 subs r1, #0xc ands r0, r1 strb r0, [r2, #1] - ldr r0, _080C2594 @ gUnknown_08A3EAF0 + ldr r0, _080C2594 @ ProcScr_GmapRmUpdate1 bl Proc_EndEach adds r0, r5, #0 bl Proc_End @@ -2378,11 +2378,11 @@ _080C257E: pop {r0} bx r0 .align 2, 0 -_080C2584: .4byte gUnknown_08A3EB50 +_080C2584: .4byte ProcScr_GmapRM _080C2588: .4byte gProcScr_WorldMapMain _080C258C: .4byte gLCDControlBuffer _080C2590: .4byte gGMData -_080C2594: .4byte gUnknown_08A3EAF0 +_080C2594: .4byte ProcScr_GmapRmUpdate1 THUMB_FUNC_END sub_80C24F8 @@ -2545,39 +2545,39 @@ sub_80C26BC: @ 0x080C26BC adds r1, r0, #0 cmp r1, #0 beq _080C26D0 - ldr r0, _080C26CC @ gUnknown_08A3EBE8 + ldr r0, _080C26CC @ ProcScr_GmapRmBaPalAnim bl Proc_StartBlocking b _080C26D8 .align 2, 0 -_080C26CC: .4byte gUnknown_08A3EBE8 +_080C26CC: .4byte ProcScr_GmapRmBaPalAnim _080C26D0: - ldr r0, _080C26DC @ gUnknown_08A3EBE8 + ldr r0, _080C26DC @ ProcScr_GmapRmBaPalAnim movs r1, #3 bl Proc_Start _080C26D8: pop {r1} bx r1 .align 2, 0 -_080C26DC: .4byte gUnknown_08A3EBE8 +_080C26DC: .4byte ProcScr_GmapRmBaPalAnim THUMB_FUNC_END sub_80C26BC THUMB_FUNC_START sub_80C26E0 sub_80C26E0: @ 0x080C26E0 push {lr} - ldr r0, _080C26EC @ gUnknown_08A3EBE8 + ldr r0, _080C26EC @ ProcScr_GmapRmBaPalAnim bl Proc_EndEach pop {r0} bx r0 .align 2, 0 -_080C26EC: .4byte gUnknown_08A3EBE8 +_080C26EC: .4byte ProcScr_GmapRmBaPalAnim THUMB_FUNC_END sub_80C26E0 THUMB_FUNC_START sub_80C26F0 sub_80C26F0: @ 0x080C26F0 push {lr} - ldr r0, _080C2704 @ gUnknown_08A3EBE8 + ldr r0, _080C2704 @ ProcScr_GmapRmBaPalAnim bl Proc_Find cmp r0, #0 beq _080C26FE @@ -2586,21 +2586,21 @@ _080C26FE: pop {r1} bx r1 .align 2, 0 -_080C2704: .4byte gUnknown_08A3EBE8 +_080C2704: .4byte ProcScr_GmapRmBaPalAnim THUMB_FUNC_END sub_80C26F0 THUMB_FUNC_START sub_80C2708 sub_80C2708: @ 0x080C2708 push {lr} - ldr r0, _080C2718 @ gUnknown_08A3EBE8 + ldr r0, _080C2718 @ ProcScr_GmapRmBaPalAnim bl Proc_Find cmp r0, #0 bne _080C271C movs r0, #0 b _080C2724 .align 2, 0 -_080C2718: .4byte gUnknown_08A3EBE8 +_080C2718: .4byte ProcScr_GmapRmBaPalAnim _080C271C: adds r0, #0x29 ldrb r0, [r0] @@ -2620,7 +2620,7 @@ sub_80C2728: @ 0x080C2728 bl AP_Delete ldr r0, [r4, #0x2c] bl AP_Delete - ldr r0, _080C274C @ gUnknown_08A3EC48 + ldr r0, _080C274C @ ProcScr_GmapRmBorder bl CountProcs cmp r0, #1 bne _080C2746 @@ -2630,7 +2630,7 @@ _080C2746: pop {r0} bx r0 .align 2, 0 -_080C274C: .4byte gUnknown_08A3EC48 +_080C274C: .4byte ProcScr_GmapRmBorder THUMB_FUNC_END sub_80C2728 @@ -2658,11 +2658,11 @@ sub_80C2750: @ 0x080C2750 movs r3, #0 bl SetSpecialColorEffectsParameters strh r4, [r5, #0x30] - ldr r0, _080C27A0 @ gUnknown_08A3EC48 + ldr r0, _080C27A0 @ ProcScr_GmapRmBorder bl CountProcs cmp r0, #1 bgt _080C2798 - ldr r0, _080C27A4 @ gUnknown_08A9E688 + ldr r0, _080C27A4 @ Pal_WmHighLightNationMap movs r1, #0xc8 lsls r1, r1, #2 movs r2, #0x20 @@ -2673,8 +2673,8 @@ _080C2798: pop {r0} bx r0 .align 2, 0 -_080C27A0: .4byte gUnknown_08A3EC48 -_080C27A4: .4byte gUnknown_08A9E688 +_080C27A0: .4byte ProcScr_GmapRmBorder +_080C27A4: .4byte Pal_WmHighLightNationMap THUMB_FUNC_END sub_80C2750 @@ -2764,7 +2764,7 @@ sub_80C2804: @ 0x080C2804 lsls r1, r1, #1 adds r0, r5, #0 bl DivArm - ldr r3, _080C287C @ gUnknown_08206AF0 + ldr r3, _080C287C @ GfxSet_WmNationMap adds r1, r6, #0 adds r1, #0x2a ldrb r2, [r1] @@ -2784,7 +2784,7 @@ sub_80C2804: @ 0x080C2804 bl sub_80C27A8 b _080C28BA .align 2, 0 -_080C287C: .4byte gUnknown_08206AF0 +_080C287C: .4byte GfxSet_WmNationMap _080C2880: movs r0, #0 movs r1, #0x10 @@ -2793,7 +2793,7 @@ _080C2880: bl SetSpecialColorEffectsParameters movs r0, #0 strh r0, [r6, #0x30] - ldr r2, _080C28C0 @ gUnknown_08206AF0 + ldr r2, _080C28C0 @ GfxSet_WmNationMap adds r0, r6, #0 adds r0, #0x2a ldrb r1, [r0] @@ -2817,14 +2817,14 @@ _080C28BA: pop {r0} bx r0 .align 2, 0 -_080C28C0: .4byte gUnknown_08206AF0 +_080C28C0: .4byte GfxSet_WmNationMap THUMB_FUNC_END sub_80C2804 THUMB_FUNC_START sub_80C28C4 sub_80C28C4: @ 0x080C28C4 push {lr} - ldr r0, _080C28D8 @ gUnknown_08A3EC48 + ldr r0, _080C28D8 @ ProcScr_GmapRmBorder bl CountProcs cmp r0, #1 bne _080C28D4 @@ -2833,7 +2833,7 @@ _080C28D4: pop {r0} bx r0 .align 2, 0 -_080C28D8: .4byte gUnknown_08A3EC48 +_080C28D8: .4byte ProcScr_GmapRmBorder THUMB_FUNC_END sub_80C28C4 @@ -2874,7 +2874,7 @@ sub_80C28DC: @ 0x080C28DC lsls r1, r1, #1 adds r0, r5, #0 bl DivArm - ldr r3, _080C2950 @ gUnknown_08206AF0 + ldr r3, _080C2950 @ GfxSet_WmNationMap adds r1, r6, #0 adds r1, #0x2a ldrb r1, [r1] @@ -2892,7 +2892,7 @@ sub_80C28DC: @ 0x080C28DC bl sub_80C27A8 b _080C295E .align 2, 0 -_080C2950: .4byte gUnknown_08206AF0 +_080C2950: .4byte GfxSet_WmNationMap _080C2954: bl SetDefaultColorEffects adds r0, r6, #0 @@ -2908,7 +2908,7 @@ _080C295E: sub_80C2964: @ 0x080C2964 push {r4, lr} adds r4, r0, #0 - ldr r0, _080C2988 @ gUnknown_08A3EC48 + ldr r0, _080C2988 @ ProcScr_GmapRmBorder bl CountProcs cmp r0, #1 bgt _080C2980 @@ -2922,7 +2922,7 @@ _080C2980: pop {r0} bx r0 .align 2, 0 -_080C2988: .4byte gUnknown_08A3EC48 +_080C2988: .4byte ProcScr_GmapRmBorder THUMB_FUNC_END sub_80C2964 @@ -2936,7 +2936,7 @@ sub_80C298C: @ 0x080C298C mov r0, sp adds r1, r5, #0 bl GetWMDisplayPosition - ldr r6, _080C29F4 @ gUnknown_08206AF0 + ldr r6, _080C29F4 @ GfxSet_WmNationMap adds r7, r4, #0 adds r7, #0x2a ldrb r1, [r7] @@ -2978,7 +2978,7 @@ sub_80C298C: @ 0x080C298C pop {r0} bx r0 .align 2, 0 -_080C29F4: .4byte gUnknown_08206AF0 +_080C29F4: .4byte GfxSet_WmNationMap THUMB_FUNC_END sub_80C298C @@ -3028,7 +3028,7 @@ sub_80C2A40: @ 0x080C2A40 push {r4, r5, lr} sub sp, #0x18 movs r4, #0 - ldr r1, _080C2A68 @ gUnknown_08A3EC48 + ldr r1, _080C2A68 @ ProcScr_GmapRmBorder mov r0, sp bl Proc_FindBegin add r5, sp, #0xc @@ -3045,7 +3045,7 @@ _080C2A50: adds r4, #1 b _080C2A50 .align 2, 0 -_080C2A68: .4byte gUnknown_08A3EC48 +_080C2A68: .4byte ProcScr_GmapRmBorder _080C2A6C: cmp r4, #0 bne _080C2A78 @@ -3088,14 +3088,14 @@ _080C2AA4: THUMB_FUNC_END sub_80C2A40 - THUMB_FUNC_START sub_80C2AAC -sub_80C2AAC: @ 0x080C2AAC + THUMB_FUNC_START DrawWmNationHighLightMapGfx +DrawWmNationHighLightMapGfx: @ 0x080C2AAC push {lr} adds r2, r0, #0 lsls r2, r2, #0xc ldr r0, _080C2ACC @ 0x06010000 adds r2, r2, r0 - ldr r3, _080C2AD0 @ gUnknown_08206AF0 + ldr r3, _080C2AD0 @ GfxSet_WmNationMap lsls r0, r1, #1 adds r0, r0, r1 lsls r0, r0, #2 @@ -3107,12 +3107,12 @@ sub_80C2AAC: @ 0x080C2AAC bx r0 .align 2, 0 _080C2ACC: .4byte 0x06010000 -_080C2AD0: .4byte gUnknown_08206AF0 +_080C2AD0: .4byte GfxSet_WmNationMap - THUMB_FUNC_END sub_80C2AAC + THUMB_FUNC_END DrawWmNationHighLightMapGfx - THUMB_FUNC_START sub_80C2AD4 -sub_80C2AD4: @ 0x080C2AD4 + THUMB_FUNC_START WmShowNationHighlightedMap +WmShowNationHighlightedMap: @ 0x080C2AD4 push {r4, r5, r6, r7, lr} mov r7, r9 mov r6, r8 @@ -3123,22 +3123,22 @@ sub_80C2AD4: @ 0x080C2AD4 mov r8, r0 cmp r4, #0 beq _080C2AF8 - ldr r0, _080C2AF4 @ gUnknown_08A3EC48 + ldr r0, _080C2AF4 @ ProcScr_GmapRmBorder adds r1, r4, #0 bl Proc_StartBlocking b _080C2B00 .align 2, 0 -_080C2AF4: .4byte gUnknown_08A3EC48 +_080C2AF4: .4byte ProcScr_GmapRmBorder _080C2AF8: - ldr r0, _080C2B70 @ gUnknown_08A3EC48 + ldr r0, _080C2B70 @ ProcScr_GmapRmBorder movs r1, #3 bl Proc_Start _080C2B00: adds r7, r0, #0 mov r0, r8 adds r1, r6, #0 - bl sub_80C2AAC - ldr r1, _080C2B74 @ gUnknown_08206AF0 + bl DrawWmNationHighLightMapGfx + ldr r1, _080C2B74 @ GfxSet_WmNationMap lsls r0, r6, #1 adds r0, r0, r6 lsls r0, r0, #2 @@ -3186,11 +3186,11 @@ _080C2B00: pop {r1} bx r1 .align 2, 0 -_080C2B70: .4byte gUnknown_08A3EC48 -_080C2B74: .4byte gUnknown_08206AF0 +_080C2B70: .4byte ProcScr_GmapRmBorder +_080C2B74: .4byte GfxSet_WmNationMap _080C2B78: .4byte 0xFFFF9C00 - THUMB_FUNC_END sub_80C2AD4 + THUMB_FUNC_END WmShowNationHighlightedMap THUMB_FUNC_START sub_80C2B7C sub_80C2B7C: @ 0x080C2B7C @@ -3199,17 +3199,17 @@ sub_80C2B7C: @ 0x080C2B7C adds r4, r0, #0 cmp r4, #0 bge _080C2B9C - ldr r0, _080C2B90 @ gUnknown_08A3EC48 + ldr r0, _080C2B90 @ ProcScr_GmapRmBorder bl Proc_EndEach b _080C2BB8 .align 2, 0 -_080C2B90: .4byte gUnknown_08A3EC48 +_080C2B90: .4byte ProcScr_GmapRmBorder _080C2B94: adds r0, r1, #0 bl Proc_End b _080C2BB8 _080C2B9C: - ldr r1, _080C2BC0 @ gUnknown_08A3EC48 + ldr r1, _080C2BC0 @ ProcScr_GmapRmBorder mov r0, sp bl Proc_FindBegin _080C2BA4: @@ -3228,7 +3228,7 @@ _080C2BB8: pop {r0} bx r0 .align 2, 0 -_080C2BC0: .4byte gUnknown_08A3EC48 +_080C2BC0: .4byte ProcScr_GmapRmBorder THUMB_FUNC_END sub_80C2B7C @@ -3239,16 +3239,16 @@ sub_80C2BC4: @ 0x080C2BC4 adds r4, r0, #0 cmp r4, #0 bge _080C2BE0 - ldr r0, _080C2BDC @ gUnknown_08A3EC48 + ldr r0, _080C2BDC @ ProcScr_GmapRmBorder bl Proc_Find cmp r0, #0 beq _080C2C06 movs r0, #1 b _080C2C06 .align 2, 0 -_080C2BDC: .4byte gUnknown_08A3EC48 +_080C2BDC: .4byte ProcScr_GmapRmBorder _080C2BE0: - ldr r1, _080C2C00 @ gUnknown_08A3EC48 + ldr r1, _080C2C00 @ ProcScr_GmapRmBorder mov r0, sp bl Proc_FindBegin _080C2BE8: @@ -3264,7 +3264,7 @@ _080C2BE8: movs r0, #0 b _080C2C06 .align 2, 0 -_080C2C00: .4byte gUnknown_08A3EC48 +_080C2C00: .4byte ProcScr_GmapRmBorder _080C2C04: movs r0, #1 _080C2C06: @@ -3280,7 +3280,7 @@ sub_80C2C10: @ 0x080C2C10 push {r4, r5, lr} sub sp, #0xc adds r4, r0, #0 - ldr r1, _080C2C3C @ gUnknown_08A3EC48 + ldr r1, _080C2C3C @ ProcScr_GmapRmBorder mov r0, sp bl Proc_FindBegin movs r5, #1 @@ -3299,7 +3299,7 @@ _080C2C20: strb r5, [r0] b _080C2C4A .align 2, 0 -_080C2C3C: .4byte gUnknown_08A3EC48 +_080C2C3C: .4byte ProcScr_GmapRmBorder _080C2C40: adds r0, r1, #0 adds r0, #0x29 @@ -4692,8 +4692,8 @@ _080C3620: .4byte gUnknown_08A3EE28 THUMB_FUNC_END sub_80C35EC - THUMB_FUNC_START sub_80C3624 -sub_80C3624: @ 0x080C3624 + THUMB_FUNC_START StartWmText +StartWmText: @ 0x080C3624 push {r4, r5, lr} lsls r0, r0, #0x18 lsrs r5, r0, #0x18 @@ -4723,10 +4723,10 @@ _080C3652: _080C3658: .4byte gUnknown_08A3EE44 _080C365C: .4byte gUnknown_0201BE30 - THUMB_FUNC_END sub_80C3624 + THUMB_FUNC_END StartWmText - THUMB_FUNC_START sub_80C3660 -sub_80C3660: @ 0x080C3660 + THUMB_FUNC_START RemoveWmText +RemoveWmText: @ 0x080C3660 push {lr} ldr r0, _080C3684 @ gUnknown_08A3EE44 bl Proc_Find @@ -4749,7 +4749,7 @@ _080C3680: _080C3684: .4byte gUnknown_08A3EE44 _080C3688: .4byte gUnknown_0201BE30 - THUMB_FUNC_END sub_80C3660 + THUMB_FUNC_END RemoveWmText THUMB_FUNC_START sub_80C368C sub_80C368C: @ 0x080C368C diff --git a/data/const_data_20688C.s b/data/const_data_20688C.s index 88f86b805..ce974aba4 100644 --- a/data/const_data_20688C.s +++ b/data/const_data_20688C.s @@ -53,32 +53,32 @@ gUnknown_08206A51: @ 0x08206A51 gUnknown_08206AAB: @ 0x08206AAB .incbin "baserom.gba", 0x206AAB, 0x45 - .global gUnknown_08206AF0 -gUnknown_08206AF0: @ 0x08206AF0 + .global GfxSet_WmNationMap +GfxSet_WmNationMap: @ 0x08206AF0 @ Replacing .incbin "baserom.gba", 0x206AF0, 0x80 - .4byte gUnknown_08A9E688 + 0x40 - .4byte gUnknown_08A9E688 + 0x59c + .4byte Img_WmHightLightMapFrecia + .4byte Pal_WmHighLightNationMap + 0x59c .4byte 0x00280036 - .4byte gUnknown_08A9E688 + 0x60c - .4byte gUnknown_08A9E688 + 0xcd0 + .4byte Pal_WmHighLightNationMap + 0x60c + .4byte Pal_WmHighLightNationMap + 0xcd0 .4byte 0x00750058 - .4byte gUnknown_08A9E688 + 0xe0c - .4byte gUnknown_08A9E688 + 0x1340 + .4byte Pal_WmHighLightNationMap + 0xe0c + .4byte Pal_WmHighLightNationMap + 0x1340 .4byte 0x005700b1 - .4byte gUnknown_08A9E688 + 0x13a4 - .4byte gUnknown_08A9E688 + 0x181c + .4byte Pal_WmHighLightNationMap + 0x13a4 + .4byte Pal_WmHighLightNationMap + 0x181c .4byte 0x0039007f - .4byte gUnknown_08A9E688 + 0x1878 - .4byte gUnknown_08A9E688 + 0x1b84 + .4byte Pal_WmHighLightNationMap + 0x1878 + .4byte Pal_WmHighLightNationMap + 0x1b84 .4byte 0x002c009a - .4byte gUnknown_08A9E688 + 0x1bb8 - .4byte gUnknown_08A9E688 + 0x20d8 + .4byte Pal_WmHighLightNationMap + 0x1bb8 + .4byte Pal_WmHighLightNationMap + 0x20d8 .4byte 0x002600bc - .4byte gUnknown_08A9E688 + 0x2128 - .4byte gUnknown_08A9E688 + 0x2508 + .4byte Pal_WmHighLightNationMap + 0x2128 + .4byte Pal_WmHighLightNationMap + 0x2508 .4byte 0x00300084 - .4byte gUnknown_08A9E688 + 0x2540 - .4byte gUnknown_08A9E688 + 0x2a5c + .4byte Pal_WmHighLightNationMap + 0x2540 + .4byte Pal_WmHighLightNationMap + 0x2a5c .4byte 0x004a0065 .4byte 0x70616d47 .4byte 0x204d5220 diff --git a/data/data_591AB4.s b/data/data_591AB4.s index b65fd8d76..229ac946e 100644 --- a/data/data_591AB4.s +++ b/data/data_591AB4.s @@ -127,11 +127,11 @@ gEventHiCmdTable: @ 0x08591C98 .4byte EventAC_WmUnitMoveWait, EventAD_WmFadeToDarker, EventAE_WmFadeToDarkerWait, EventAF_WmShowTextBox .4byte EventB0_WmHideTextBox_Bugged, EventB1_WmTextBoxWait, EventB2_WmFancyFade, EventB3_WmFancyFadeWait .4byte EventB4_WmDisplayBigMap, EventB5_WmHideBigMap, EventB6_WmMoveBigMap, EventB7_WmBigMapWait - .4byte EventB8_WmShowBigMapHighlight, EventB9_, EventBA_, EventBB_ - .4byte EventBC_, EventBD_, EventBE_, EventBF_ - .4byte EventC0_, EventC1_SKIPWM, EventC2_, EventC3_ - .4byte EventC4_, EventC5_, EventC6_, EventC7_ - .4byte EventC8_, EventC9_, EventCA_, EventCB_ + .4byte EventB8_WmShowBigMapHighlight, EventB9_WmRemoveHighlightNationPart1, EventBA_WmRemoveHighlightNationPart2, EventBB_ + .4byte EventBC_MarkPoint, EventBD_, EventBE_, EventBF_ + .4byte EventC0_, EventC1_SKIPWM, EventC2_WmNoFade, EventC3_SpawnLord + .4byte EventC4_WmShowPortrait, EventC5_WmClearPortrait, EventC6_WmDisplayText, EventC7_ + .4byte EventC8_, EventC9_RemoveWmText, EventCA_, EventCB_ .4byte EventCC_, EventCD_, EventCE_, EventCF_ .global gUnknown_08591DD8 diff --git a/data/data_A394DC.s b/data/data_A394DC.s index 769dfa423..ea07b1e3b 100644 --- a/data/data_A394DC.s +++ b/data/data_A394DC.s @@ -2,3314 +2,4 @@ .global gUnknown_08A3974C gUnknown_08A3974C: @ 0x08A3974C -@ Replacing .incbin "baserom.gba", 0xA3974C, 0xA3CB04 - 0xA3974C - .4byte 0x0000ad40 - .4byte 0x0000003c - .4byte 0x0000af40 - .4byte 0x00010028 - .4byte 0x0000b120 - .4byte 0x0000ae20 - .4byte 0x00000120 - .4byte 0x00011020 - .4byte 0x0000c220 - .4byte 0x0000c360 - .4byte 0x00010000 - .4byte 0x00000000 - .4byte 0x00008540 - .4byte 0x00000000 - .4byte 0x7fff1322 - .4byte 0x00200e20 - .4byte 0x00041220 - .4byte 0x0000b460 - .4byte 0x00000000 - .4byte 0x00000010 - .4byte 0x00020e20 - .4byte 0x0000b240 - .4byte 0x00000000 - .4byte 0x0000b320 - .4byte 0x00001020 - .4byte 0x003c0e20 - .4byte 0x0000af40 - .4byte 0x00010028 - .4byte 0x0000b120 - .4byte 0x0000c720 - .4byte 0x0000c640 - .4byte 0x000008db - .4byte 0x00001d20 - .4byte 0x0000b680 - .4byte 0x00000000 - .4byte 0x00180000 - .4byte 0x0000003c - .4byte 0x003c0e20 - .4byte 0x0000c460 - .4byte 0x00510000 - .4byte 0x000002bc - .4byte 0x00060e20 - .4byte 0x001a0e20 - .4byte 0x0000b840 - .4byte 0x00000007 - .4byte 0x00001c20 - .4byte 0x00001d20 - .4byte 0x001e0e20 - .4byte 0x0000b940 - .4byte 0x00000007 - .4byte 0x0000ba40 - .4byte 0x00000007 - .4byte 0x0000c540 - .4byte 0x00000100 - .4byte 0x00200e20 - .4byte 0x0000b680 - .4byte 0x00180000 - .4byte 0xfff80000 - .4byte 0x0000003c - .4byte 0x003c0e20 - .4byte 0x0000c460 - .4byte 0x00520000 - .4byte 0x000002bc - .4byte 0x00060e20 - .4byte 0x001a0e20 - .4byte 0x0000b840 - .4byte 0x00000000 - .4byte 0x00001c20 - .4byte 0x00001d20 - .4byte 0x001e0e20 - .4byte 0x0000b940 - .4byte 0x00000000 - .4byte 0x0000ba40 - .4byte 0x00000000 - .4byte 0x0000c540 - .4byte 0x00000100 - .4byte 0x00200e20 - .4byte 0x0000b680 - .4byte 0xfff80000 - .4byte 0x001e0000 - .4byte 0x0000003c - .4byte 0x003c0e20 - .4byte 0x0000c460 - .4byte 0x00560000 - .4byte 0x00000534 - .4byte 0x00060e20 - .4byte 0x001a0e20 - .4byte 0x0000b840 - .4byte 0x00000002 - .4byte 0x00001c20 - .4byte 0x00001d20 - .4byte 0x001e0e20 - .4byte 0x0000b940 - .4byte 0x00000002 - .4byte 0x0000ba40 - .4byte 0x00000002 - .4byte 0x0000c540 - .4byte 0x00000200 - .4byte 0x00200e20 - .4byte 0x0000b680 - .4byte 0x001e0000 - .4byte 0xfff80000 - .4byte 0x0000003c - .4byte 0x003c0e20 - .4byte 0x0000c460 - .4byte 0x00530000 - .4byte 0x00000534 - .4byte 0x00060e20 - .4byte 0x001a0e20 - .4byte 0x0000b840 - .4byte 0x00000005 - .4byte 0x00001c20 - .4byte 0x00001d20 - .4byte 0x001e0e20 - .4byte 0x0000b940 - .4byte 0x00000005 - .4byte 0x0000ba40 - .4byte 0x00000005 - .4byte 0x0000c540 - .4byte 0x00000200 - .4byte 0x00200e20 - .4byte 0x0000b680 - .4byte 0xfff80000 - .4byte 0x00300000 - .4byte 0x0000003c - .4byte 0x003c0e20 - .4byte 0x0000c460 - .4byte 0x00400000 - .4byte 0x000002bc - .4byte 0x00060e20 - .4byte 0x001a0e20 - .4byte 0x0000b840 - .4byte 0x00000001 - .4byte 0x00001c20 - .4byte 0x00001d20 - .4byte 0x001e0e20 - .4byte 0x0000b940 - .4byte 0x00000001 - .4byte 0x0000ba40 - .4byte 0x00000001 - .4byte 0x0000c540 - .4byte 0x00000100 - .4byte 0x00200e20 - .4byte 0x00001c20 - .4byte 0x00001d20 - .4byte 0x001e0e20 - .4byte 0x0000b680 - .4byte 0x00300000 - .4byte 0x00000000 - .4byte 0x0000003c - .4byte 0x003c0e20 - .4byte 0x0000c460 - .4byte 0x00540000 - .4byte 0x000002bc - .4byte 0x00060e20 - .4byte 0x001a0e20 - .4byte 0x0000b840 - .4byte 0x00000003 - .4byte 0x00001c20 - .4byte 0x00001d20 - .4byte 0x001e0e20 - .4byte 0x0000b940 - .4byte 0x00000003 - .4byte 0x0000ba40 - .4byte 0x00000003 - .4byte 0x0000c540 - .4byte 0x00000100 - .4byte 0x00200e20 - .4byte 0x00001c20 - .4byte 0x00001d20 - .4byte 0x001e0e20 - .4byte 0x00001c20 - .4byte 0x00001d20 - .4byte 0x001e0e20 - .4byte 0x00001c20 - .4byte 0x00001d20 - .4byte 0x001e0e20 - .4byte 0x0000b680 - .4byte 0x00000000 - .4byte 0x00300000 - .4byte 0x0000003c - .4byte 0x003c0e20 - .4byte 0x0000c460 - .4byte 0x00400000 - .4byte 0x000002bc - .4byte 0x00060e20 - .4byte 0x001a0e20 - .4byte 0x0000b840 - .4byte 0x00000001 - .4byte 0x00001c20 - .4byte 0x00001d20 - .4byte 0x00001c20 - .4byte 0x00001d20 - .4byte 0x0000b940 - .4byte 0x00000001 - .4byte 0x0000ba40 - .4byte 0x00000001 - .4byte 0x0000c540 - .4byte 0x00000100 - .4byte 0x00200e20 - .4byte 0x0000b680 - .4byte 0x00300000 - .4byte 0x00180000 - .4byte 0x0000003c - .4byte 0x003c0e20 - .4byte 0x0000c460 - .4byte 0x00510000 - .4byte 0x000002bc - .4byte 0x00060e20 - .4byte 0x001a0e20 - .4byte 0x0000b840 - .4byte 0x00000007 - .4byte 0x00001c20 - .4byte 0x00001d20 - .4byte 0x0000b940 - .4byte 0x00000007 - .4byte 0x0000ba40 - .4byte 0x00000007 - .4byte 0x0000c540 - .4byte 0x00000100 - .4byte 0x00200e20 - .4byte 0x0000b680 - .4byte 0x00180000 - .4byte 0x00280000 - .4byte 0x00000034 - .4byte 0x003e0e20 - .4byte 0x0000bc60 - .4byte 0x00000000 - .4byte 0x00010014 - .4byte 0x0000bc60 - .4byte 0x00010000 - .4byte 0x00010012 - .4byte 0x003c0e20 - .4byte 0x00009e60 - .4byte 0x004e0002 - .4byte 0x00120001 - .4byte 0x00009e60 - .4byte 0x004e0003 - .4byte 0x00120001 - .4byte 0x00009e60 - .4byte 0x004e0004 - .4byte 0x00120001 - .4byte 0x0000a8c0 - .4byte 0x00000002 - .4byte 0x00840073 - .4byte 0x00410055 - .4byte 0x000300d2 - .4byte 0x0000000a - .4byte 0x0000a8c0 - .4byte 0x00000003 - .4byte 0x00840084 - .4byte 0x00570076 - .4byte 0x000300aa - .4byte 0x0000000a - .4byte 0x0000a8c0 - .4byte 0x00000004 - .4byte 0x00840095 - .4byte 0x00640086 - .4byte 0x00030096 - .4byte 0x0000000a - .4byte 0x00140e20 - .4byte 0x00001c20 - .4byte 0x00001d20 - .4byte 0x0000ac40 - .4byte 0xffffffff - .4byte 0x0000a040 - .4byte 0x00000002 - .4byte 0x0000a040 - .4byte 0x00000003 - .4byte 0x0000a040 - .4byte 0x00000004 - .4byte 0x001e0e20 - .4byte 0x0000c460 - .4byte 0x00140000 - .4byte 0x00000534 - .4byte 0x00060e20 - .4byte 0x003c0e20 - .4byte 0x00009e60 - .4byte 0x00010002 - .4byte 0x00060000 - .4byte 0x0000a8c0 - .4byte 0x00000002 - .4byte 0x0064005c - .4byte 0x006c005c - .4byte 0x000300b4 - .4byte 0x00000010 - .4byte 0x00001c20 - .4byte 0x00001d20 - .4byte 0x0000ac40 - .4byte 0xffffffff - .4byte 0x0000a040 - .4byte 0x00000002 - .4byte 0x0000c540 - .4byte 0x00000200 - .4byte 0x002e0e20 - .4byte 0x00009e60 - .4byte 0x00020006 - .4byte 0x00140000 - .4byte 0x00009e60 - .4byte 0x00730005 - .4byte 0x00140000 - .4byte 0x00009e60 - .4byte 0x000b0002 - .4byte 0x00120001 - .4byte 0x00009e60 - .4byte 0x002a0003 - .4byte 0x00120001 - .4byte 0x00009e60 - .4byte 0x00230004 - .4byte 0x00120001 - .4byte 0x0000a8c0 - .4byte 0x00000002 - .4byte 0x00840084 - .4byte 0x005c006c - .4byte 0x000100d2 - .4byte 0x00000000 - .4byte 0x0000a8c0 - .4byte 0x00000003 - .4byte 0x00920073 - .4byte 0x0056005b - .4byte 0x000100d2 - .4byte 0x00000000 - .4byte 0x0000a8c0 - .4byte 0x00000004 - .4byte 0x00920095 - .4byte 0x0056007d - .4byte 0x000100d2 - .4byte 0x00000000 - .4byte 0x00001c20 - .4byte 0x00001d20 - .4byte 0x0000ac40 - .4byte 0xffffffff - .4byte 0x001a0e20 - .4byte 0x0000a760 - .4byte 0x00000006 - .4byte 0x00450063 - .4byte 0x0000a760 - .4byte 0x00000005 - .4byte 0x004c006c - .4byte 0x0000a340 - .4byte 0x003c0006 - .4byte 0x0000a340 - .4byte 0x003c0005 - .4byte 0x00001c20 - .4byte 0x00001d20 - .4byte 0x0000a520 - .4byte 0x0000c920 - .4byte 0x00020e20 - .4byte 0x00101721 - .4byte 0x0000c120 - .4byte 0x0000bd40 - .4byte 0xffffffff - .4byte 0x0000be40 - .4byte 0xffffffff - .4byte 0x0000a040 - .4byte 0x00000002 - .4byte 0x0000a040 - .4byte 0x00000003 - .4byte 0x0000a040 - .4byte 0x00000004 - .4byte 0x0000a040 - .4byte 0x00000005 - .4byte 0x0000a040 - .4byte 0x00000006 - .4byte 0x00000120 - .4byte 0x00011020 - .4byte 0x00890229 - .4byte 0x00000120 - .4byte 0x00011020 - .4byte 0x0000c120 - .4byte 0x00000120 - .4byte 0x00011020 - .4byte 0x00890229 - .4byte 0x00000120 - .4byte 0x00001a25 - .4byte 0x000b0540 - .4byte 0x000c000c - .4byte 0x08dd1b20 - .4byte 0x00001d20 - .4byte 0x00001b22 - .4byte 0x00e20229 - .4byte 0x00000120 - .4byte 0x00011020 - .4byte 0x0000c360 - .4byte 0x00010000 - .4byte 0x00000001 - .4byte 0x00008540 - .4byte 0x00000000 - .4byte 0x0000b240 - .4byte 0x00000000 - .4byte 0x0000b320 - .4byte 0x00001020 - .4byte 0x00140e20 - .4byte 0x00009720 - .4byte 0x00009920 - .4byte 0x00280e20 - .4byte 0x00009040 - .4byte 0x00000001 - .4byte 0x00460e20 - .4byte 0x00041220 - .4byte 0x00020540 - .4byte gUnknown_08A3974C + 0x5d8 - .4byte 0x00000a40 - .4byte ProcScr_WorldFlush + 0x38 - .4byte 0x0000a140 - .4byte 0x00000000 - .4byte 0x00011020 - .4byte 0x00000a40 - .4byte ProcScr_EventPromoteUnit + 0x18 - .4byte 0x00000120 - .4byte 0x00060e20 - .4byte 0x00008680 - .4byte 0xffffffff - .4byte 0x00200000 - .4byte 0x0000002d - .4byte 0x00008920 - .4byte 0x00000a40 - .4byte gUnknown_08A3974C - .4byte 0x0000c720 - .4byte 0x0000c460 - .4byte 0x00520000 - .4byte 0x00000534 - .4byte 0x00060e20 - .4byte 0x0000c640 - .4byte 0x000008de - .4byte 0x00001d20 - .4byte 0x0000c540 - .4byte 0x00000634 - .4byte 0x003c0e20 - .4byte 0x0000c460 - .4byte 0x00080000 - .4byte 0x00000534 - .4byte 0x00060e20 - .4byte 0x002e0e20 - .4byte 0x0000c460 - .4byte 0x00070001 - .4byte 0x000002bc - .4byte 0x00060e20 - .4byte 0x00001c20 - .4byte 0x00001d20 - .4byte 0x0000c540 - .4byte 0x00000634 - .4byte 0x002e0e20 - .4byte 0x0001c540 - .4byte 0x000001bc - .4byte 0x003c0e20 - .4byte 0x0000c460 - .4byte 0x00020000 - .4byte 0x000002bc - .4byte 0x00060e20 - .4byte 0x00001c20 - .4byte 0x00001d20 - .4byte 0x002e0e20 - .4byte 0x0000c540 - .4byte 0x000001bc - .4byte 0x002e0e20 - .4byte 0x0000b460 - .4byte 0xfff80000 - .4byte 0x00000003 - .4byte 0x00780e20 - .4byte 0x0000b680 - .4byte 0xfff80000 - .4byte 0x00300000 - .4byte 0x00000046 - .4byte 0x00550e20 - .4byte 0x0000bc60 - .4byte 0x00000000 - .4byte 0x00010008 - .4byte 0x00001c20 - .4byte 0x00001d20 - .4byte 0x001e0e20 - .4byte 0x0000bd40 - .4byte 0xffffffff - .4byte 0x0000be40 - .4byte 0xffffffff - .4byte 0x0000b520 - .4byte 0x0000b720 - .4byte 0x00001c20 - .4byte 0x00001d20 - .4byte 0x0000a980 - .4byte 0x00020000 - .4byte 0x00020001 - .4byte 0x001e00c8 - .4byte 0x00001c20 - .4byte 0x00001d20 - .4byte 0x0000ac40 - .4byte 0xffffffff - .4byte 0x0000c920 - .4byte 0x00020e20 - .4byte 0x00140e20 - .4byte 0x00101721 - .4byte 0x00000120 - .4byte 0x00001a25 - .4byte 0x000b0540 - .4byte 0x0004000c - .4byte 0x08df1b20 - .4byte 0x00001d20 - .4byte 0x00001b22 - .4byte 0x00e30229 - .4byte 0x00e40229 - .4byte 0x00000120 - .4byte 0x00011020 - .4byte 0x0000c360 - .4byte 0x00010000 - .4byte 0x00000002 - .4byte 0x00008540 - .4byte 0x00000000 - .4byte 0x0000b240 - .4byte 0x00000000 - .4byte 0x0000b320 - .4byte 0x00001020 - .4byte 0x00140e20 - .4byte 0x00009720 - .4byte 0x00009920 - .4byte 0x00280e20 - .4byte 0x00009040 - .4byte 0x00000002 - .4byte 0x00460e20 - .4byte 0x00041220 - .4byte 0x00020540 - .4byte gUnknown_08A3974C + 0x7b0 - .4byte 0x00000a40 - .4byte ProcScr_WorldFlush + 0x38 - .4byte 0x0000a140 - .4byte 0x00000000 - .4byte 0x00011020 - .4byte 0x00000a40 - .4byte ProcScr_EventPromoteUnit + 0x18 - .4byte 0x00000120 - .4byte 0x00060e20 - .4byte 0x00008680 - .4byte 0xffffffff - .4byte 0x00480000 - .4byte 0x0000003c - .4byte 0x00008920 - .4byte 0x00000a40 - .4byte gUnknown_08A3974C - .4byte 0x0000c720 - .4byte 0x00009e60 - .4byte 0x00020003 - .4byte 0x00020000 - .4byte 0x0000a140 - .4byte 0x00000003 - .4byte 0x0000a240 - .4byte 0x00000000 - .4byte 0x00009e60 - .4byte 0x000d0002 - .4byte 0x00020002 - .4byte 0x0000a980 - .4byte 0x00030002 - .4byte 0x00030002 - .4byte 0x0000fffc - .4byte 0x0000ac40 - .4byte 0x00000002 - .4byte 0x0000a040 - .4byte 0x00000002 - .4byte 0x0000c460 - .4byte 0x00020000 - .4byte 0x00000534 - .4byte 0x00060e20 - .4byte 0x002e0e20 - .4byte 0x0000c640 - .4byte 0x000008e0 - .4byte 0x00001d20 - .4byte 0x0000a140 - .4byte 0x00000000 - .4byte 0x0000a040 - .4byte 0x00000003 - .4byte 0x0000c540 - .4byte 0x00000634 - .4byte 0x002e0e20 - .4byte 0x00009e60 - .4byte 0x00410002 - .4byte 0x00030001 - .4byte 0x0000a340 - .4byte 0x003c0002 - .4byte 0x0000c460 - .4byte 0x00330000 - .4byte 0x000002bc - .4byte 0x00060e20 - .4byte 0x002e0e20 - .4byte 0x00001c20 - .4byte 0x00001d20 - .4byte 0x0000c540 - .4byte 0x000001bc - .4byte 0x002e0e20 - .4byte 0x0000a440 - .4byte 0x003c0002 - .4byte 0x0000a980 - .4byte 0x00000000 - .4byte 0x00030002 - .4byte 0x0000fffc - .4byte 0x0000ac40 - .4byte 0xffffffff - .4byte 0x0000a520 - .4byte 0x0000a040 - .4byte 0x00000002 - .4byte 0x00001c20 - .4byte 0x00001d20 - .4byte 0x0000c920 - .4byte 0x00020e20 - .4byte 0x00140e20 - .4byte 0x00101721 - .4byte 0x00000120 - .4byte 0x00011020 - .4byte 0x0000c360 - .4byte 0x00010000 - .4byte 0x00000003 - .4byte 0x00008540 - .4byte 0x00000000 - .4byte 0x0000b240 - .4byte 0x00000000 - .4byte 0x0000b320 - .4byte 0x00001020 - .4byte 0x00140e20 - .4byte 0x00009720 - .4byte 0x00009920 - .4byte 0x00280e20 - .4byte 0x00009040 - .4byte 0x00000003 - .4byte 0x00460e20 - .4byte 0x0000a140 - .4byte 0x00000000 - .4byte 0x00011020 - .4byte 0x00000a40 - .4byte ProcScr_EventPromoteUnit + 0x18 - .4byte 0x00000120 - .4byte 0x00060e20 - .4byte 0x00008680 - .4byte 0xffffffff - .4byte 0x005e0016 - .4byte 0x0000003c - .4byte 0x00008920 - .4byte 0x00000a40 - .4byte gUnknown_08A3974C - .4byte 0x0000c720 - .4byte 0x0000c460 - .4byte 0x00020000 - .4byte 0x00000534 - .4byte 0x00060e20 - .4byte 0x002e0e20 - .4byte 0x0000c640 - .4byte 0x000008e1 - .4byte 0x00001d20 - .4byte 0x0000a980 - .4byte 0x00000000 - .4byte 0x00040003 - .4byte 0x0000fff8 - .4byte 0x00001c20 - .4byte 0x00001d20 - .4byte 0x0000ac40 - .4byte 0xffffffff - .4byte 0x00009e60 - .4byte 0x00520002 - .4byte 0x00000001 - .4byte 0x00009e60 - .4byte 0x00520003 - .4byte 0x00000001 - .4byte 0x0000a760 - .4byte 0x00000002 - .4byte 0x00a8008c - .4byte 0x0000a760 - .4byte 0x00000003 - .4byte 0x00a8009e - .4byte 0x0000a340 - .4byte 0x003c0002 - .4byte 0x0000a340 - .4byte 0x003c0003 - .4byte 0x00001c20 - .4byte 0x00001d20 - .4byte 0x0000a520 - .4byte 0x0000c920 - .4byte 0x00020e20 - .4byte 0x00140e20 - .4byte 0x00101721 - .4byte 0x0000a040 - .4byte 0x00000002 - .4byte 0x0000a040 - .4byte 0x00000003 - .4byte 0x00000120 - .4byte 0x00880321 - .4byte 0x00010c40 - .4byte 0x0000000c - .4byte 0x00000a40 - .4byte gUnknown_08A3974C + 0xb1c - .4byte 0x00020920 - .4byte 0x00010820 - .4byte 0x00011020 - .4byte 0x0000c360 - .4byte 0x00010000 - .4byte 0x00000004 - .4byte 0x00008540 - .4byte 0x00000000 - .4byte 0x0000b240 - .4byte 0x00000000 - .4byte 0x0000b320 - .4byte 0x00001020 - .4byte 0x00140e20 - .4byte 0x00009720 - .4byte 0x00009920 - .4byte 0x00280e20 - .4byte 0x00009040 - .4byte 0x00000004 - .4byte 0x00460e20 - .4byte 0x0000a140 - .4byte 0x00000000 - .4byte 0x00011020 - .4byte 0x00000a40 - .4byte ProcScr_EventPromoteUnit + 0x18 - .4byte 0x00020820 - .4byte 0x00000120 - .4byte 0x00011020 - .4byte 0x0000c360 - .4byte 0x00010000 - .4byte 0x00000008 - .4byte 0x00008440 - .4byte 0x00000006 - .4byte 0x0000b240 - .4byte 0x00000000 - .4byte 0x0000b320 - .4byte 0x00001020 - .4byte 0x0000a980 - .4byte 0x00040000 - .4byte 0x00060008 - .4byte 0x0000fffe - .4byte 0x0000ac40 - .4byte 0x00000000 - .4byte 0x0000a980 - .4byte 0x00040000 - .4byte 0x00050006 - .4byte 0x0000fffe - .4byte 0x0000ac40 - .4byte 0x00000000 - .4byte 0x0000a640 - .4byte 0x00050000 - .4byte 0x00009b40 - .4byte 0x00000005 - .4byte 0x0000c120 - .4byte 0x00000120 - .4byte 0x00880321 - .4byte 0x00010c40 - .4byte 0x0000000c - .4byte 0x00000a40 - .4byte gUnknown_08A3974C + 0xd84 - .4byte 0x00020920 - .4byte 0x00010820 - .4byte 0x00060e20 - .4byte 0x00008680 - .4byte 0xffffffff - .4byte 0x0070001a - .4byte 0x0000003c - .4byte 0x00008920 - .4byte 0x00000a40 - .4byte gUnknown_08A3974C - .4byte 0x003c0e20 - .4byte 0x0000c720 - .4byte 0x0000b460 - .4byte 0x00000000 - .4byte 0x00000003 - .4byte 0x00780e20 - .4byte 0x00009e60 - .4byte 0x00520002 - .4byte 0x00000001 - .4byte 0x00009e60 - .4byte 0x00520003 - .4byte 0x00000001 - .4byte 0x00009e60 - .4byte 0x00520004 - .4byte 0x00000001 - .4byte 0x00009e60 - .4byte 0x00520005 - .4byte 0x00000001 - .4byte 0x00009e60 - .4byte 0x00520006 - .4byte 0x00000001 - .4byte 0x0000a760 - .4byte 0x00000002 - .4byte 0x005e0028 - .4byte 0x0000a760 - .4byte 0x00000003 - .4byte 0x003d004e - .4byte 0x0000a760 - .4byte 0x00000004 - .4byte 0x004e0089 - .4byte 0x0000a760 - .4byte 0x00000005 - .4byte 0x002d00aa - .4byte 0x0000a760 - .4byte 0x00000006 - .4byte 0x005b00bf - .4byte 0x0000a340 - .4byte 0x003c0002 - .4byte 0x0000a340 - .4byte 0x003c0003 - .4byte 0x0000a340 - .4byte 0x003c0004 - .4byte 0x0000a340 - .4byte 0x003c0005 - .4byte 0x0000a340 - .4byte 0x003c0006 - .4byte 0x0000c640 - .4byte 0x000008e2 - .4byte 0x00001d20 - .4byte 0x0000a520 - .4byte 0x0000a440 - .4byte 0x003c0002 - .4byte 0x0000a440 - .4byte 0x003c0003 - .4byte 0x0000a440 - .4byte 0x003c0004 - .4byte 0x0000a440 - .4byte 0x003c0005 - .4byte 0x0000a440 - .4byte 0x003c0006 - .4byte 0x0000a520 - .4byte 0x0000a040 - .4byte 0x00000002 - .4byte 0x0000a040 - .4byte 0x00000003 - .4byte 0x0000a040 - .4byte 0x00000004 - .4byte 0x0000a040 - .4byte 0x00000005 - .4byte 0x0000a040 - .4byte 0x00000006 - .4byte 0x0000b520 - .4byte 0x0000a440 - .4byte 0x00010000 - .4byte 0x0000b720 - .4byte 0x0000c460 - .4byte 0x00020000 - .4byte 0x00000534 - .4byte 0x00060e20 - .4byte 0x002e0e20 - .4byte 0x00001c20 - .4byte 0x00001d20 - .4byte 0x00001c20 - .4byte 0x00001d20 - .4byte 0x00009e60 - .4byte 0x00090002 - .4byte 0x00050001 - .4byte 0x0000a340 - .4byte 0x003c0002 - .4byte 0x00001c20 - .4byte 0x00001d20 - .4byte 0x0000a520 - .4byte 0x000e0e20 - .4byte 0x0000a440 - .4byte 0x003c0002 - .4byte 0x0000a980 - .4byte 0x00020000 - .4byte 0x00050004 - .4byte 0x0000fffc - .4byte 0x0000a520 - .4byte 0x0000ac40 - .4byte 0xffffffff - .4byte 0x00140e20 - .4byte 0x0000c920 - .4byte 0x00020e20 - .4byte 0x00140e20 - .4byte 0x00101721 - .4byte 0x0000a040 - .4byte 0x00000002 - .4byte 0x00020820 - .4byte 0x00000120 - .4byte 0x00101721 - .4byte 0x00000120 - .4byte 0x00011020 - .4byte 0x0000c360 - .4byte 0x00010000 - .4byte 0x00000005 - .4byte 0x00008540 - .4byte 0x00000000 - .4byte 0x0000b240 - .4byte 0x00000000 - .4byte 0x0000b320 - .4byte 0x00001020 - .4byte 0x00140e20 - .4byte 0x00009720 - .4byte 0x00009920 - .4byte 0x00280e20 - .4byte 0x00009040 - .4byte 0x00000005 - .4byte 0x00460e20 - .4byte 0x0000a140 - .4byte 0x00000000 - .4byte 0x00011020 - .4byte 0x00000a40 - .4byte ProcScr_EventPromoteUnit + 0x18 - .4byte 0x00000120 - .4byte 0x00060e20 - .4byte 0x00008680 - .4byte 0xffffffff - .4byte 0x00840030 - .4byte 0x0000003c - .4byte 0x00008920 - .4byte 0x00000a40 - .4byte gUnknown_08A3974C - .4byte 0x0000c720 - .4byte 0x0000c460 - .4byte 0x00020000 - .4byte 0x00000534 - .4byte 0x00060e20 - .4byte 0x002e0e20 - .4byte 0x0000c640 - .4byte 0x000008e3 - .4byte 0x00001d20 - .4byte 0x00001c20 - .4byte 0x00001d20 - .4byte 0x0000a980 - .4byte 0x00020000 - .4byte 0x00060005 - .4byte 0x0000fffc - .4byte 0x00001c20 - .4byte 0x00001d20 - .4byte 0x00001c20 - .4byte 0x00001d20 - .4byte 0x0000ac40 - .4byte 0xffffffff - .4byte 0x00001c20 - .4byte 0x00001d20 - .4byte 0x0000c920 - .4byte 0x00020e20 - .4byte 0x00140e20 - .4byte 0x00101721 - .4byte 0x00000120 - .4byte 0x00011020 - .4byte 0x0000c360 - .4byte 0x00010000 - .4byte 0x00000006 - .4byte 0x00008540 - .4byte 0x00000000 - .4byte 0x0000b240 - .4byte 0x00000000 - .4byte 0x0000b320 - .4byte 0x00001020 - .4byte 0x00140e20 - .4byte 0x00009720 - .4byte 0x00009920 - .4byte 0x00280e20 - .4byte 0x00009040 - .4byte 0x00000006 - .4byte 0x00460e20 - .4byte 0x0000a140 - .4byte 0x00000000 - .4byte 0x00011020 - .4byte 0x00000a40 - .4byte ProcScr_EventPromoteUnit + 0x18 - .4byte 0x00000120 - .4byte 0x00060e20 - .4byte 0x00008680 - .4byte 0xffffffff - .4byte 0x00980054 - .4byte 0x0000003c - .4byte 0x00008920 - .4byte 0x00000a40 - .4byte gUnknown_08A3974C - .4byte 0x0000c720 - .4byte 0x0000c640 - .4byte 0x000008e4 - .4byte 0x00001d20 - .4byte 0x0000c460 - .4byte 0x00020000 - .4byte 0x00000534 - .4byte 0x00060e20 - .4byte 0x002e0e20 - .4byte 0x00001c20 - .4byte 0x00001d20 - .4byte 0x0000a980 - .4byte 0x00020000 - .4byte 0x00070006 - .4byte 0x0000fff8 - .4byte 0x00001c20 - .4byte 0x00001d20 - .4byte 0x00001c20 - .4byte 0x00001d20 - .4byte 0x0000ac40 - .4byte 0xffffffff - .4byte 0x0000c920 - .4byte 0x00020e20 - .4byte 0x00140e20 - .4byte 0x00101721 - .4byte 0x0000a040 - .4byte 0x00000002 - .4byte 0x00000120 - .4byte 0x00011020 - .4byte 0x0000c360 - .4byte 0x00010000 - .4byte 0x00000008 - .4byte 0x00008540 - .4byte 0x00000000 - .4byte 0x00009440 - .4byte 0x00000007 - .4byte 0x00009240 - .4byte 0x00000006 - .4byte 0x00009340 - .4byte 0x00000008 - .4byte 0x00009a40 - .4byte 0x00000008 - .4byte 0x00009140 - .4byte 0x00000007 - .4byte 0x0000a640 - .4byte 0x00080000 - .4byte 0x0000c120 - .4byte 0x00000120 - .4byte 0x00011020 - .4byte 0x00880229 - .4byte 0x00000120 - .4byte 0x00001a25 - .4byte 0x000b0540 - .4byte 0x0054000c - .4byte 0x08e51b20 - .4byte 0x00001d20 - .4byte 0x00001b22 - .4byte 0x00e50229 - .4byte 0x00eb0229 - .4byte 0x00000120 - .4byte 0x00011020 - .4byte 0x0000c360 - .4byte 0x00010000 - .4byte 0x00000001 - .4byte 0x00008540 - .4byte 0x00000000 - .4byte 0x0000b240 - .4byte 0x00000000 - .4byte 0x0000b320 - .4byte 0x00001020 - .4byte 0x001a0e20 - .4byte 0x00008680 - .4byte 0xffffffff - .4byte 0x00000020 - .4byte 0x0000005a - .4byte 0x00008920 - .4byte 0x00060e20 - .4byte 0x00140e20 - .4byte 0x00009540 - .4byte 0x0000001a - .4byte 0x00009920 - .4byte 0x00280e20 - .4byte 0x00009040 - .4byte 0x00000009 - .4byte 0x00460e20 - .4byte 0x00140e20 - .4byte 0x00009720 - .4byte 0x00009920 - .4byte 0x00280e20 - .4byte 0x00009040 - .4byte 0x00000008 - .4byte 0x00460e20 - .4byte 0x00008880 - .4byte 0xffffffff - .4byte 0x002e0000 - .4byte 0x00000000 - .4byte 0x003c0e20 - .4byte 0x00008920 - .4byte 0x00051220 - .4byte 0x00000a40 - .4byte gUnknown_08A3974C + 0xfc0 - .4byte 0x0000a140 - .4byte 0x00000000 - .4byte 0x00011020 - .4byte 0x00000a40 - .4byte ProcScr_EventPromoteUnit + 0x18 - .4byte 0x00000120 - .4byte 0x00060e20 - .4byte 0x00008680 - .4byte 0xffffffff - .4byte 0x00000040 - .4byte 0x0000003c - .4byte 0x00008920 - .4byte 0x00000a40 - .4byte gUnknown_08A3974C - .4byte 0x003c0e20 - .4byte 0x0000c720 - .4byte 0x0000b460 - .4byte 0xfff80000 - .4byte 0x00000003 - .4byte 0x00780e20 - .4byte 0x0000b840 - .4byte 0x00000005 - .4byte 0x001e0e20 - .4byte 0x0000c640 - .4byte 0x000008e6 - .4byte 0x00001d20 - .4byte 0x0000b940 - .4byte 0x00000005 - .4byte 0x0000ba40 - .4byte 0x00000005 - .4byte 0x0000b520 - .4byte 0x0000b720 - .4byte 0x0000a980 - .4byte 0x00020000 - .4byte 0x00090000 - .4byte 0x0000fffc - .4byte 0x00001c20 - .4byte 0x00001d20 - .4byte 0x0000ac40 - .4byte 0xffffffff - .4byte 0x0000a240 - .4byte 0x00000000 - .4byte 0x0000b460 - .4byte 0xfff80000 - .4byte 0x00000003 - .4byte 0x00780e20 - .4byte 0x0000b840 - .4byte 0x00000003 - .4byte 0x001e0e20 - .4byte 0x00001c20 - .4byte 0x00001d20 - .4byte 0x0000b940 - .4byte 0x00000003 - .4byte 0x0000ba40 - .4byte 0x00000003 - .4byte 0x0000c460 - .4byte 0x00540000 - .4byte 0x000002bc - .4byte 0x00060e20 - .4byte 0x002e0e20 - .4byte 0x00001c20 - .4byte 0x00001d20 - .4byte 0x0000c460 - .4byte 0x00520001 - .4byte 0x00000534 - .4byte 0x00060e20 - .4byte 0x002e0e20 - .4byte 0x00001c20 - .4byte 0x00001d20 - .4byte 0x0000c540 - .4byte 0x000001bc - .4byte 0x002e0e20 - .4byte 0x0001c540 - .4byte 0x00000634 - .4byte 0x002e0e20 - .4byte 0x0000b520 - .4byte 0x0000b720 - .4byte 0x00008680 - .4byte 0xffffffff - .4byte 0x001c0062 - .4byte 0x000a0046 - .4byte 0x001e0e20 - .4byte 0x0000c460 - .4byte 0x000f0000 - .4byte 0x000002bc - .4byte 0x00060e20 - .4byte 0x002e0e20 - .4byte 0x00009e60 - .4byte 0x001b0002 - .4byte 0x00090000 - .4byte 0x0000a980 - .4byte 0x00030002 - .4byte 0x000a0009 - .4byte 0x000000b4 - .4byte 0x00008920 - .4byte 0x00001c20 - .4byte 0x00001d20 - .4byte 0x00008920 - .4byte 0x0000ac40 - .4byte 0xffffffff - .4byte 0x0000c540 - .4byte 0x000001bc - .4byte 0x002e0e20 - .4byte 0x0000a040 - .4byte 0x00000002 - .4byte 0x005a0e20 - .4byte 0x0000c920 - .4byte 0x00020e20 - .4byte 0x00140e20 - .4byte 0x00101721 - .4byte 0x00000120 - .4byte 0x00011020 - .4byte 0x0000c360 - .4byte 0x00010000 - .4byte 0x00000009 - .4byte 0x00008540 - .4byte 0x00000000 - .4byte 0x0000b240 - .4byte 0x00000000 - .4byte 0x0000b320 - .4byte 0x00001020 - .4byte 0x00140e20 - .4byte 0x00009720 - .4byte 0x00009920 - .4byte 0x00280e20 - .4byte 0x00009040 - .4byte 0x0000000a - .4byte 0x00460e20 - .4byte 0x0000a140 - .4byte 0x00000000 - .4byte 0x00011020 - .4byte 0x00000a40 - .4byte ProcScr_EventPromoteUnit + 0x18 - .4byte 0x00000120 - .4byte 0x00060e20 - .4byte 0x00008680 - .4byte 0xffffffff - .4byte 0x00140056 - .4byte 0x0000003c - .4byte 0x00008920 - .4byte 0x00000a40 - .4byte gUnknown_08A3974C - .4byte 0x003c0e20 - .4byte 0x0000c720 - .4byte 0x0000b460 - .4byte 0xfff80000 - .4byte 0x00000003 - .4byte 0x00780e20 - .4byte 0x0000b840 - .4byte 0x00000003 - .4byte 0x001e0e20 - .4byte 0x0000c640 - .4byte 0x000008e7 - .4byte 0x00001d20 - .4byte 0x0000b940 - .4byte 0x00000003 - .4byte 0x0000ba40 - .4byte 0x00000003 - .4byte 0x0000b520 - .4byte 0x0000b720 - .4byte 0x0000c460 - .4byte 0x000f0000 - .4byte 0x00000534 - .4byte 0x00060e20 - .4byte 0x002e0e20 - .4byte 0x00009e60 - .4byte 0x001b0002 - .4byte 0x000a0000 - .4byte 0x0000a340 - .4byte 0x003c0002 - .4byte 0x0000a520 - .4byte 0x00001c20 - .4byte 0x00001d20 - .4byte 0x00009e60 - .4byte 0x000f0003 - .4byte 0x00000001 - .4byte 0x00009e60 - .4byte 0x000f0004 - .4byte 0x00000001 - .4byte 0x0000a760 - .4byte 0x00000003 - .4byte 0x005800d8 - .4byte 0x0000a760 - .4byte 0x00000004 - .4byte 0x007800d8 - .4byte 0x0000a340 - .4byte 0x003c0003 - .4byte 0x0000a340 - .4byte 0x003c0004 - .4byte 0x0000a520 - .4byte 0x00001c20 - .4byte 0x00001d20 - .4byte 0x0000c540 - .4byte 0x00000200 - .4byte 0x0000a440 - .4byte 0x003c0002 - .4byte 0x0000a520 - .4byte 0x00100e20 - .4byte 0x0000a440 - .4byte 0x003c0003 - .4byte 0x0000a440 - .4byte 0x003c0004 - .4byte 0x0000a520 - .4byte 0x0000a040 - .4byte 0x00000002 - .4byte 0x0000a040 - .4byte 0x00000003 - .4byte 0x0000a040 - .4byte 0x00000004 - .4byte 0x0000a980 - .4byte 0x00000000 - .4byte 0x000a0009 - .4byte 0x0000fffc - .4byte 0x00001c20 - .4byte 0x00001d20 - .4byte 0x0000ac40 - .4byte 0xffffffff - .4byte 0x00280e20 - .4byte 0x0000c920 - .4byte 0x00020e20 - .4byte 0x00140e20 - .4byte 0x00101721 - .4byte 0x00000120 - .4byte 0x0000a140 - .4byte 0x00000000 - .4byte 0x00011020 - .4byte 0x00000a40 - .4byte ProcScr_EventPromoteUnit + 0x18 - .4byte 0x00000120 - .4byte 0x00000120 - .4byte 0x00011020 - .4byte 0x0000c360 - .4byte 0x00010000 - .4byte 0x0000000b - .4byte 0x00008540 - .4byte 0x00000000 - .4byte 0x0000b240 - .4byte 0x00000000 - .4byte 0x0000b320 - .4byte 0x00001020 - .4byte 0x00140e20 - .4byte 0x00009720 - .4byte 0x00009920 - .4byte 0x00280e20 - .4byte 0x00009040 - .4byte 0x0000000c - .4byte 0x00460e20 - .4byte 0x0000a140 - .4byte 0x00000000 - .4byte 0x00011020 - .4byte 0x00000a40 - .4byte ProcScr_EventPromoteUnit + 0x18 - .4byte 0x00000120 - .4byte 0x00060e20 - .4byte 0x00008680 - .4byte 0xffffffff - .4byte 0x003e00a8 - .4byte 0x0000003c - .4byte 0x00008920 - .4byte 0x00000a40 - .4byte gUnknown_08A3974C - .4byte 0x003c0e20 - .4byte 0x0000c720 - .4byte 0x0000b460 - .4byte 0x001e0000 - .4byte 0x00000003 - .4byte 0x00780e20 - .4byte 0x0000b840 - .4byte 0x00000002 - .4byte 0x001e0e20 - .4byte 0x0000c640 - .4byte 0x000008e9 - .4byte 0x00001d20 - .4byte 0x0000b940 - .4byte 0x00000002 - .4byte 0x0000ba40 - .4byte 0x00000002 - .4byte 0x0000b520 - .4byte 0x0000b720 - .4byte 0x0000c460 - .4byte 0x00560000 - .4byte 0x000002bc - .4byte 0x00060e20 - .4byte 0x002e0e20 - .4byte 0x00001c20 - .4byte 0x00001d20 - .4byte 0x0000c540 - .4byte 0x00000100 - .4byte 0x002e0e20 - .4byte 0x0000c460 - .4byte 0x00020000 - .4byte 0x00000534 - .4byte 0x00060e20 - .4byte 0x002e0e20 - .4byte 0x0000a980 - .4byte 0x00000000 - .4byte 0x000c000b - .4byte 0x0000fffc - .4byte 0x00001c20 - .4byte 0x00001d20 - .4byte 0x0000c540 - .4byte 0x00000200 - .4byte 0x001e0e20 - .4byte 0x0000ac40 - .4byte 0xffffffff - .4byte 0x00140e20 - .4byte 0x0000c920 - .4byte 0x00020e20 - .4byte 0x00140e20 - .4byte 0x00101721 - .4byte 0x00000120 - .4byte 0x00011020 - .4byte 0x0000c360 - .4byte 0x00010000 - .4byte 0x0000000c - .4byte 0x00008540 - .4byte 0x00000000 - .4byte 0x0000b240 - .4byte 0x00000000 - .4byte 0x0000b320 - .4byte 0x00001020 - .4byte 0x001e0e20 - .4byte 0x00008680 - .4byte 0xffffffff - .4byte 0x0056ffff - .4byte 0x0000002d - .4byte 0x00008920 - .4byte 0x00140e20 - .4byte 0x00009720 - .4byte 0x00009920 - .4byte 0x00280e20 - .4byte 0x00009040 - .4byte 0x0000000d - .4byte 0x00460e20 - .4byte 0x001a0e20 - .4byte 0x00008880 - .4byte 0xffffffff - .4byte 0x001a0000 - .4byte 0x00000000 - .4byte 0x00008920 - .4byte 0x001a0e20 - .4byte 0x0000a140 - .4byte 0x00000000 - .4byte 0x00011020 - .4byte 0x00000a40 - .4byte ProcScr_EventPromoteUnit + 0x18 - .4byte 0x00000120 - .4byte 0x00060e20 - .4byte 0x00008680 - .4byte 0xffffffff - .4byte 0x006c00c4 - .4byte 0x0000003c - .4byte 0x00008920 - .4byte 0x00000a40 - .4byte gUnknown_08A3974C - .4byte 0x003c0e20 - .4byte 0x0000c720 - .4byte 0x0000c460 - .4byte 0x00220000 - .4byte 0x000002bc - .4byte 0x00060e20 - .4byte 0x002e0e20 - .4byte 0x0000c640 - .4byte 0x000008ea - .4byte 0x00001d20 - .4byte 0x0000c460 - .4byte 0x00020001 - .4byte 0x00000534 - .4byte 0x00060e20 - .4byte 0x002e0e20 - .4byte 0x00001c20 - .4byte 0x00001d20 - .4byte 0x00009e60 - .4byte 0x00110002 - .4byte 0x000d0001 - .4byte 0x0000a340 - .4byte 0x003c0002 - .4byte 0x0000a520 - .4byte 0x00001c20 - .4byte 0x00001d20 - .4byte 0x0000c540 - .4byte 0x00000100 - .4byte 0x002e0e20 - .4byte 0x0000a440 - .4byte 0x003c0002 - .4byte 0x0000a980 - .4byte 0x00000000 - .4byte 0x000d000c - .4byte 0x0000fffc - .4byte 0x00001c20 - .4byte 0x00001d20 - .4byte 0x0000c460 - .4byte 0x00560000 - .4byte 0x000002bc - .4byte 0x00060e20 - .4byte 0x002e0e20 - .4byte 0x0000ac40 - .4byte 0xffffffff - .4byte 0x0000a520 - .4byte 0x0000a040 - .4byte 0x00000002 - .4byte 0x00001c20 - .4byte 0x00001d20 - .4byte 0x0000a440 - .4byte 0x003c0000 - .4byte 0x0001c540 - .4byte 0x00000200 - .4byte 0x00140e20 - .4byte 0x0000c540 - .4byte 0x00000100 - .4byte 0x002e0e20 - .4byte 0x0000a520 - .4byte 0x0000c920 - .4byte 0x00020e20 - .4byte 0x00140e20 - .4byte 0x00101721 - .4byte 0x00000120 - .4byte 0x00011020 - .4byte 0x0000c360 - .4byte 0x000f0000 - .4byte 0x00000001 - .4byte 0x00008540 - .4byte 0x00000000 - .4byte 0x0000a140 - .4byte 0x00000000 - .4byte 0x0000b240 - .4byte 0x00000000 - .4byte 0x0000b320 - .4byte 0x00001020 - .4byte 0x001a0e20 - .4byte 0x00008680 - .4byte 0xffffffff - .4byte 0x00000020 - .4byte 0x0000005a - .4byte 0x00008920 - .4byte 0x00060e20 - .4byte 0x00140e20 - .4byte 0x00009540 - .4byte 0x0000001a - .4byte 0x00009920 - .4byte 0x00280e20 - .4byte 0x00009040 - .4byte 0x00000009 - .4byte 0x00460e20 - .4byte 0x00008680 - .4byte 0xffffffff - .4byte 0x00200000 - .4byte 0x0000002d - .4byte 0x00008920 - .4byte 0x00140e20 - .4byte 0x00009720 - .4byte 0x00009920 - .4byte 0x00280e20 - .4byte 0x00009040 - .4byte 0x0000000e - .4byte 0x00460e20 - .4byte 0x00008880 - .4byte 0xffffffff - .4byte 0x002e0000 - .4byte 0x00000000 - .4byte 0x003c0e20 - .4byte 0x00008920 - .4byte 0x00061220 - .4byte 0x00000a40 - .4byte gUnknown_08A3974C + 0xfc0 - .4byte 0x0000a140 - .4byte 0x00000000 - .4byte 0x00011020 - .4byte 0x00000a40 - .4byte ProcScr_EventPromoteUnit + 0x18 - .4byte 0x00000120 - .4byte 0x00060e20 - .4byte 0x00008680 - .4byte 0xffffffff - .4byte 0x00200000 - .4byte 0x0000003c - .4byte 0x00008920 - .4byte 0x00000a40 - .4byte gUnknown_08A3974C - .4byte 0x003c0e20 - .4byte 0x0000c720 - .4byte 0x0000c460 - .4byte 0x00140000 - .4byte 0x000002bc - .4byte 0x00060e20 - .4byte 0x0000a980 - .4byte 0x00000000 - .4byte 0x000e0001 - .4byte 0x0000fffc - .4byte 0x001e0e20 - .4byte 0x00008680 - .4byte 0xffffffff - .4byte 0x00400000 - .4byte 0x00000050 - .4byte 0x00008920 - .4byte 0x001e0e20 - .4byte 0x0000aa40 - .4byte 0x00000000 - .4byte 0x0000c640 - .4byte 0x000008f1 - .4byte 0x00001d20 - .4byte 0x0000c540 - .4byte 0x00000100 - .4byte 0x002e0e20 - .4byte 0x0000c460 - .4byte 0x003d0000 - .4byte 0x00000534 - .4byte 0x00060e20 - .4byte 0x00001c20 - .4byte 0x00001d20 - .4byte 0x002e0e20 - .4byte 0x0000c460 - .4byte 0x000f0001 - .4byte 0x000002bc - .4byte 0x00060e20 - .4byte 0x00001c20 - .4byte 0x00001d20 - .4byte 0x002e0e20 - .4byte 0x0000c540 - .4byte 0x00000200 - .4byte 0x00140e20 - .4byte 0x0001c540 - .4byte 0x00000100 - .4byte 0x002e0e20 - .4byte 0x00001c20 - .4byte 0x00001d20 - .4byte 0x0000c460 - .4byte 0x00140000 - .4byte 0x000002bc - .4byte 0x00060e20 - .4byte 0x00001c20 - .4byte 0x00001d20 - .4byte 0x0000a520 - .4byte 0x00009e60 - .4byte 0x00400002 - .4byte 0x000e0001 - .4byte 0x0000a340 - .4byte 0x003c0002 - .4byte 0x00001c20 - .4byte 0x00001d20 - .4byte 0x0000a520 - .4byte 0x0000a440 - .4byte 0x003c0002 - .4byte 0x0000ab40 - .4byte 0x00000000 - .4byte 0x00001c20 - .4byte 0x00001d20 - .4byte 0x0000ac40 - .4byte 0xffffffff - .4byte 0x0000a520 - .4byte 0x0000a040 - .4byte 0x00000002 - .4byte 0x00140e20 - .4byte 0x0000c920 - .4byte 0x00020e20 - .4byte 0x00140e20 - .4byte 0x00101721 - .4byte 0x00000120 - .4byte 0x00011020 - .4byte 0x0000c360 - .4byte 0x000f0000 - .4byte 0x0000000e - .4byte 0x00008540 - .4byte 0x00000000 - .4byte 0x00008340 - .4byte 0x00700000 - .4byte 0x0000b240 - .4byte 0x00000000 - .4byte 0x0000b320 - .4byte 0x00001020 - .4byte 0x00140e20 - .4byte 0x00009720 - .4byte 0x00009920 - .4byte 0x00280e20 - .4byte 0x00009040 - .4byte 0x0000000f - .4byte 0x00460e20 - .4byte 0x001a0e20 - .4byte 0x00008880 - .4byte 0xffffffff - .4byte 0x001a0000 - .4byte 0x00000000 - .4byte 0x00008920 - .4byte 0x001a0e20 - .4byte 0x0000a140 - .4byte 0x00000000 - .4byte 0x00011020 - .4byte 0x00000a40 - .4byte ProcScr_EventPromoteUnit + 0x18 - .4byte 0x00000120 - .4byte 0x00060e20 - .4byte 0x00008680 - .4byte 0xffffffff - .4byte 0x007a0000 - .4byte 0x0000003c - .4byte 0x00008920 - .4byte 0x00000a40 - .4byte gUnknown_08A3974C - .4byte 0x003c0e20 - .4byte 0x0000c720 - .4byte 0x0000c460 - .4byte 0x00250000 - .4byte 0x000002bc - .4byte 0x00060e20 - .4byte 0x0000c640 - .4byte 0x000008f2 - .4byte 0x00001d20 - .4byte 0x002e0e20 - .4byte 0x0000c460 - .4byte 0x00140001 - .4byte 0x00000534 - .4byte 0x00060e20 - .4byte 0x00001c20 - .4byte 0x00001d20 - .4byte 0x002e0e20 - .4byte 0x0000c540 - .4byte 0x00000100 - .4byte 0x002e0e20 - .4byte 0x00001c20 - .4byte 0x00001d20 - .4byte 0x0001c540 - .4byte 0x00000200 - .4byte 0x002e0e20 - .4byte 0x0000a980 - .4byte 0x00020000 - .4byte 0x000f000e - .4byte 0x0000fffc - .4byte 0x00008680 - .4byte 0xffffffff - .4byte 0x00980000 - .4byte 0x003c0050 - .4byte 0x00001c20 - .4byte 0x00001d20 - .4byte 0x00008920 - .4byte 0x0000ac40 - .4byte 0xffffffff - .4byte 0x0000c920 - .4byte 0x00020e20 - .4byte 0x00140e20 - .4byte 0x00101721 - .4byte 0x00000120 - .4byte 0x0000a140 - .4byte 0x00000000 - .4byte 0x00011020 - .4byte 0x00000a40 - .4byte ProcScr_EventPromoteUnit + 0x18 - .4byte 0x00000120 - .4byte 0x00000120 - .4byte 0x00011020 - .4byte 0x0000c360 - .4byte 0x000f0000 - .4byte 0x00000010 - .4byte 0x00008540 - .4byte 0x00000000 - .4byte 0x0000b240 - .4byte 0x00000000 - .4byte 0x0000b320 - .4byte 0x00001020 - .4byte 0x00140e20 - .4byte 0x00009720 - .4byte 0x00009920 - .4byte 0x00280e20 - .4byte 0x00009040 - .4byte 0x00000011 - .4byte 0x00460e20 - .4byte 0x0000a140 - .4byte 0x00000000 - .4byte 0x00011020 - .4byte 0x00000a40 - .4byte ProcScr_EventPromoteUnit + 0x18 - .4byte 0x00000120 - .4byte 0x00060e20 - .4byte 0x00000a40 - .4byte gUnknown_08A3974C - .4byte 0x00008680 - .4byte 0xffffffff - .4byte 0x00bc003c - .4byte 0x00000050 - .4byte 0x00008920 - .4byte 0x003c0e20 - .4byte 0x0000c720 - .4byte 0x0000c460 - .4byte 0x00260000 - .4byte 0x000002bc - .4byte 0x00060e20 - .4byte 0x0000c640 - .4byte 0x000008f4 - .4byte 0x00001d20 - .4byte 0x002e0e20 - .4byte 0x0000c540 - .4byte 0x00000100 - .4byte 0x002e0e20 - .4byte 0x0000a980 - .4byte 0x00020000 - .4byte 0x00110010 - .4byte 0x0000fffc - .4byte 0x00001c20 - .4byte 0x00001d20 - .4byte 0x0000ac40 - .4byte 0xffffffff - .4byte 0x00140e20 - .4byte 0x0000c920 - .4byte 0x00020e20 - .4byte 0x00140e20 - .4byte 0x00101721 - .4byte 0x00000120 - .4byte 0x00011020 - .4byte 0x0000c360 - .4byte 0x000f0000 - .4byte 0x00000011 - .4byte 0x00008540 - .4byte 0x00000000 - .4byte 0x0000b240 - .4byte 0x00000000 - .4byte 0x0000b320 - .4byte 0x00001020 - .4byte 0x00140e20 - .4byte 0x00009720 - .4byte 0x00009920 - .4byte 0x00280e20 - .4byte 0x00009040 - .4byte 0x00000012 - .4byte 0x00460e20 - .4byte 0x0000a140 - .4byte 0x00000000 - .4byte 0x00011020 - .4byte 0x00000a40 - .4byte ProcScr_EventPromoteUnit + 0x18 - .4byte 0x00000120 - .4byte 0x00060e20 - .4byte 0x00000a40 - .4byte gUnknown_08A3974C - .4byte 0x00008680 - .4byte 0xffffffff - .4byte 0x00c8006a - .4byte 0x00000050 - .4byte 0x00008920 - .4byte 0x003c0e20 - .4byte 0x0000c720 - .4byte 0x0000c460 - .4byte 0x00260000 - .4byte 0x00000534 - .4byte 0x00060e20 - .4byte 0x0000c640 - .4byte 0x000008f5 - .4byte 0x00001d20 - .4byte 0x002e0e20 - .4byte 0x0000c540 - .4byte 0x00000200 - .4byte 0x002e0e20 - .4byte 0x0000c460 - .4byte 0x003f0000 - .4byte 0x000002bc - .4byte 0x00060e20 - .4byte 0x00001c20 - .4byte 0x00001d20 - .4byte 0x002e0e20 - .4byte 0x0000c540 - .4byte 0x00000100 - .4byte 0x002e0e20 - .4byte 0x0000c460 - .4byte 0x00140001 - .4byte 0x00000534 - .4byte 0x00060e20 - .4byte 0x00001c20 - .4byte 0x00001d20 - .4byte 0x002e0e20 - .4byte 0x0000a980 - .4byte 0x00000000 - .4byte 0x00120011 - .4byte 0x0000fffc - .4byte 0x00640e20 - .4byte 0x0000aa40 - .4byte 0x00000000 - .4byte 0x00001c20 - .4byte 0x00001d20 - .4byte 0x00009e60 - .4byte 0x000b0002 - .4byte 0x00120001 - .4byte 0x0000a340 - .4byte 0x003c0002 - .4byte 0x00001c20 - .4byte 0x00001d20 - .4byte 0x0000a520 - .4byte 0x0000c540 - .4byte 0x00000100 - .4byte 0x0000a440 - .4byte 0x003c0002 - .4byte 0x0000ab40 - .4byte 0x00000000 - .4byte 0x002e0e20 - .4byte 0x0000a520 - .4byte 0x0000ac40 - .4byte 0xffffffff - .4byte 0x0000a040 - .4byte 0x00000002 - .4byte 0x00140e20 - .4byte 0x0000c920 - .4byte 0x00020e20 - .4byte 0x00140e20 - .4byte 0x00101721 - .4byte 0x00000120 - .4byte 0x00000120 - .4byte 0x00000120 - .4byte 0x00401720 - .4byte 0x00000120 - .4byte 0x7fff1322 - .4byte 0x00101721 - .4byte 0x00000120 - .4byte 0x00000120 - .4byte 0x00000120 - .4byte 0x00000120 - .4byte 0x00000120 - .4byte 0x00000120 - .4byte 0x00000120 - .4byte 0x00000120 - .4byte 0x00000120 - .4byte 0x00000120 - .4byte 0x00000120 - .4byte 0x00000120 - .4byte 0x00000120 - .4byte 0x00000120 - .4byte 0x00000120 - .4byte 0x00000120 - .4byte 0x00000120 - .4byte 0x00000120 - .4byte 0x00000120 - .4byte 0x00000120 - .4byte 0x7fff1322 - .4byte 0x00101721 - .4byte 0x00000120 - .4byte 0x00000120 - .4byte 0x00000120 - .4byte 0x00000120 - .4byte 0x00000120 - .4byte 0x00000120 - .4byte 0x00000120 - .4byte 0x00000120 - .4byte 0x00000120 - .4byte 0x00000120 - .4byte 0x00000120 - .4byte 0x00000120 - .4byte 0x00000120 - .4byte 0x00000120 - .4byte 0x00000120 - .4byte 0x00000120 - .4byte 0x00000120 - .4byte 0x00000120 - .4byte 0x00000120 - .4byte 0x00000120 - .4byte 0x00000120 - .4byte 0x00000120 - .4byte 0x00000120 - .4byte 0x00011020 - .4byte 0x0000c360 - .4byte 0x00010000 - .4byte 0x00000013 - .4byte 0x00008540 - .4byte 0x00000000 - .4byte 0x00009440 - .4byte 0x0000000d - .4byte 0x00009240 - .4byte 0x0000000d - .4byte 0x00009340 - .4byte 0x00000013 - .4byte 0x00009a40 - .4byte 0x00000013 - .4byte 0x00009140 - .4byte 0x00000016 - .4byte 0x0000a640 - .4byte 0x00130000 - .4byte 0x0000c120 - .4byte 0x0000a140 - .4byte 0x00000000 - .4byte 0x00011020 - .4byte 0x00000a40 - .4byte ProcScr_EventPromoteUnit + 0x18 - .4byte 0x00000120 - .4byte 0x00011020 - .4byte 0x00000120 - .4byte 0x00011020 - .4byte 0x0000c360 - .4byte 0x00010000 - .4byte 0x00000013 - .4byte 0x00008540 - .4byte 0x00000000 - .4byte 0x00009340 - .4byte 0x0000000e - .4byte 0x00009340 - .4byte 0x0000000f - .4byte 0x00009340 - .4byte 0x00000010 - .4byte 0x00009340 - .4byte 0x00000011 - .4byte 0x00009340 - .4byte 0x00000012 - .4byte 0x00009140 - .4byte 0x0000000e - .4byte 0x00009140 - .4byte 0x0000000f - .4byte 0x00009140 - .4byte 0x00000010 - .4byte 0x00009140 - .4byte 0x00000011 - .4byte 0x00009140 - .4byte 0x00000012 - .4byte 0x00009140 - .4byte 0x00000013 - .4byte 0x00009140 - .4byte 0x00000014 - .4byte 0x0000b240 - .4byte 0x00000000 - .4byte 0x0000b320 - .4byte 0x00001020 - .4byte 0x00008680 - .4byte 0xffffffff - .4byte 0x00590091 - .4byte 0x0000002d - .4byte 0x00008920 - .4byte 0x00140e20 - .4byte 0x00009720 - .4byte 0x00009920 - .4byte 0x00280e20 - .4byte 0x00009040 - .4byte 0x00000015 - .4byte 0x00460e20 - .4byte 0x00008880 - .4byte 0xffffffff - .4byte 0x001e0000 - .4byte 0x00000000 - .4byte 0x003c0e20 - .4byte 0x0000a140 - .4byte 0x00000000 - .4byte 0x00011020 - .4byte 0x00000a40 - .4byte ProcScr_EventPromoteUnit + 0x18 - .4byte 0x00000120 - .4byte 0x00060e20 - .4byte 0x00008680 - .4byte 0xffffffff - .4byte 0x006c007a - .4byte 0x0000003c - .4byte 0x00008920 - .4byte 0x00000a40 - .4byte gUnknown_08A3974C - .4byte 0x003c0e20 - .4byte 0x0000c720 - .4byte 0x0000c640 - .4byte 0x000008ec - .4byte 0x00001d20 - .4byte 0x0000c460 - .4byte 0x00440000 - .4byte 0x00000534 - .4byte 0x00060e20 - .4byte 0x00009e60 - .4byte 0x00070002 - .4byte 0x00140001 - .4byte 0x0000a340 - .4byte 0x003c0002 - .4byte 0x002e0e20 - .4byte 0x0000a520 - .4byte 0x00001c20 - .4byte 0x00001d20 - .4byte 0x0000c540 - .4byte 0x00000200 - .4byte 0x0000a440 - .4byte 0x003c0002 - .4byte 0x0000a980 - .4byte 0x00000000 - .4byte 0x00140013 - .4byte 0x0000fffc - .4byte 0x00001c20 - .4byte 0x00001d20 - .4byte 0x002e0e20 - .4byte 0x0000a520 - .4byte 0x0000ac40 - .4byte 0xffffffff - .4byte 0x00140e20 - .4byte 0x0000a040 - .4byte 0x00000002 - .4byte 0x0000c920 - .4byte 0x00020e20 - .4byte 0x00140e20 - .4byte 0x00101721 - .4byte 0x00000120 - .4byte 0x00011020 - .4byte 0x0000c360 - .4byte 0x00010000 - .4byte 0x00000014 - .4byte 0x00008540 - .4byte 0x00000000 - .4byte 0x0000b240 - .4byte 0x00000000 - .4byte 0x0000b320 - .4byte 0x00001020 - .4byte 0x001a0e20 - .4byte 0x00008680 - .4byte 0xffffffff - .4byte 0x0030006c - .4byte 0x0000001a - .4byte 0x00008920 - .4byte 0x001a0e20 - .4byte 0x00140e20 - .4byte 0x00009640 - .4byte 0x00000017 - .4byte 0x00009920 - .4byte 0x00280e20 - .4byte 0x00009040 - .4byte 0x00000017 - .4byte 0x00460e20 - .4byte 0x001a0e20 - .4byte 0x00008780 - .4byte 0xffffffff - .4byte 0x00280013 - .4byte 0x00000000 - .4byte 0x00008920 - .4byte 0x001a0e20 - .4byte 0x00140e20 - .4byte 0x00009720 - .4byte 0x00009920 - .4byte 0x00280e20 - .4byte 0x00009040 - .4byte 0x00000018 - .4byte 0x00460e20 - .4byte 0x001a0e20 - .4byte 0x00008880 - .4byte 0xffffffff - .4byte 0x001a0000 - .4byte 0x00000000 - .4byte 0x00008920 - .4byte 0x001a0e20 - .4byte 0x0000a140 - .4byte 0x00000000 - .4byte 0x00011020 - .4byte 0x00000a40 - .4byte ProcScr_EventPromoteUnit + 0x18 - .4byte 0x00000120 - .4byte 0x00060e20 - .4byte 0x00008680 - .4byte 0xffffffff - .4byte 0x008000d8 - .4byte 0x0000003c - .4byte 0x00008920 - .4byte 0x00000a40 - .4byte gUnknown_08A3974C - .4byte 0x003c0e20 - .4byte 0x0000c720 - .4byte 0x0000c460 - .4byte 0x00020000 - .4byte 0x000002bc - .4byte 0x00060e20 - .4byte 0x00140e20 - .4byte 0x0000c460 - .4byte 0x00140001 - .4byte 0x00000534 - .4byte 0x00060e20 - .4byte 0x001e0e20 - .4byte 0x0000c640 - .4byte 0x000008ed - .4byte 0x00001d20 - .4byte 0x002e0e20 - .4byte 0x0000a980 - .4byte 0x00020000 - .4byte 0x00150013 - .4byte 0x0000fffa - .4byte 0x00001c20 - .4byte 0x00001d20 - .4byte 0x002e0e20 - .4byte 0x0000ac40 - .4byte 0xffffffff - .4byte 0x0000c540 - .4byte 0x00000100 - .4byte 0x00140e20 - .4byte 0x0001c540 - .4byte 0x00000200 - .4byte 0x002e0e20 - .4byte 0x00001c20 - .4byte 0x00001d20 - .4byte 0x00009e60 - .4byte 0x004f0002 - .4byte 0x00150001 - .4byte 0x00001c20 - .4byte 0x00001d20 - .4byte 0x0000a340 - .4byte 0x003c0002 - .4byte 0x0000a520 - .4byte 0x0000c920 - .4byte 0x00020e20 - .4byte 0x003c0e20 - .4byte 0x00101721 - .4byte 0x0000a040 - .4byte 0x00000002 - .4byte 0x00000120 - .4byte 0x00011020 - .4byte 0x0000c360 - .4byte 0x00010000 - .4byte 0x00000015 - .4byte 0x00008540 - .4byte 0x00000000 - .4byte 0x0000b240 - .4byte 0x00000000 - .4byte 0x0000b320 - .4byte 0x00001020 - .4byte 0x00140e20 - .4byte 0x00009720 - .4byte 0x00009920 - .4byte 0x00280e20 - .4byte 0x00009040 - .4byte 0x00000019 - .4byte 0x00460e20 - .4byte 0x0000a140 - .4byte 0x00000000 - .4byte 0x00011020 - .4byte 0x00000a40 - .4byte ProcScr_EventPromoteUnit + 0x18 - .4byte 0x00000120 - .4byte 0x00060e20 - .4byte 0x00008680 - .4byte 0xffffffff - .4byte 0x005600f0 - .4byte 0x0000003c - .4byte 0x00008920 - .4byte 0x00000a40 - .4byte gUnknown_08A3974C - .4byte 0x003c0e20 - .4byte 0x0000c720 - .4byte 0x0000c640 - .4byte 0x000008ee - .4byte 0x00001d20 - .4byte 0x0000c460 - .4byte 0x00020000 - .4byte 0x00000534 - .4byte 0x00060e20 - .4byte 0x0000a980 - .4byte 0x00000000 - .4byte 0x00160015 - .4byte 0x0000fffc - .4byte 0x00008680 - .4byte 0xffffffff - .4byte 0x003600f0 - .4byte 0x004b006e - .4byte 0x00001c20 - .4byte 0x00001d20 - .4byte 0x00008920 - .4byte 0x0000ac40 - .4byte 0xffffffff - .4byte 0x0000c540 - .4byte 0x00000200 - .4byte 0x002e0e20 - .4byte 0x00009e60 - .4byte 0x00620002 - .4byte 0x00160001 - .4byte 0x00009e60 - .4byte 0x00620003 - .4byte 0x00160001 - .4byte 0x00009e60 - .4byte 0x00620004 - .4byte 0x00160001 - .4byte 0x0000a760 - .4byte 0x00000002 - .4byte 0x00680168 - .4byte 0x0000a760 - .4byte 0x00000003 - .4byte 0x00800158 - .4byte 0x0000a760 - .4byte 0x00000004 - .4byte 0x00800178 - .4byte 0x0000a340 - .4byte 0x003c0002 - .4byte 0x0000a340 - .4byte 0x003c0003 - .4byte 0x0000a340 - .4byte 0x003c0004 - .4byte 0x00001c20 - .4byte 0x00001d20 - .4byte 0x0000a520 - .4byte 0x00140e20 - .4byte 0x0000c920 - .4byte 0x00020e20 - .4byte 0x00140e20 - .4byte 0x00101721 - .4byte 0x0000a040 - .4byte 0x00000002 - .4byte 0x0000a040 - .4byte 0x00000003 - .4byte 0x0000a040 - .4byte 0x00000004 - .4byte 0x00000120 - .4byte 0x00011020 - .4byte 0x0000c360 - .4byte 0x00010000 - .4byte 0x00000016 - .4byte 0x00008540 - .4byte 0x00000000 - .4byte 0x0000b240 - .4byte 0x00000000 - .4byte 0x0000b320 - .4byte 0x00001020 - .4byte 0x00140e20 - .4byte 0x00009720 - .4byte 0x00009920 - .4byte 0x00280e20 - .4byte 0x00009040 - .4byte 0x0000001a - .4byte 0x00460e20 - .4byte 0x0000a140 - .4byte 0x00000000 - .4byte 0x00011020 - .4byte 0x00000a40 - .4byte ProcScr_EventPromoteUnit + 0x18 - .4byte 0x00000120 - .4byte 0x00060e20 - .4byte 0x00008680 - .4byte 0xffffffff - .4byte 0x002000f0 - .4byte 0x0000003c - .4byte 0x00008920 - .4byte 0x00000a40 - .4byte gUnknown_08A3974C - .4byte 0x003c0e20 - .4byte 0x0000c720 - .4byte 0x0000c460 - .4byte 0x00020000 - .4byte 0x000002bc - .4byte 0x00060e20 - .4byte 0x0000c640 - .4byte 0x000008ef - .4byte 0x00001d20 - .4byte 0x002e0e20 - .4byte 0x0000c540 - .4byte 0x00000100 - .4byte 0x002e0e20 - .4byte 0x0000c460 - .4byte 0x00220000 - .4byte 0x00000534 - .4byte 0x00060e20 - .4byte 0x00001c20 - .4byte 0x00001d20 - .4byte 0x002e0e20 - .4byte 0x0000a980 - .4byte 0x00000000 - .4byte 0x00170016 - .4byte 0x0000fffc - .4byte 0x00001c20 - .4byte 0x00001d20 - .4byte 0x0000ac40 - .4byte 0xffffffff - .4byte 0x0000c540 - .4byte 0x00000200 - .4byte 0x002e0e20 - .4byte 0x00140e20 - .4byte 0x0000c920 - .4byte 0x00020e20 - .4byte 0x00140e20 - .4byte 0x00101721 - .4byte 0x00000120 - .4byte 0x00011020 - .4byte 0x0000c360 - .4byte 0x00010000 - .4byte 0x00000017 - .4byte 0x00008540 - .4byte 0x00000000 - .4byte 0x0000b240 - .4byte 0x00000000 - .4byte 0x0000b320 - .4byte 0x00001020 - .4byte 0x001a0e20 - .4byte 0x00008680 - .4byte 0xffffffff - .4byte 0x003000f0 - .4byte 0x0000001a - .4byte 0x00008920 - .4byte 0x001a0e20 - .4byte 0x00140e20 - .4byte 0x00009540 - .4byte 0x0000001b - .4byte 0x00009920 - .4byte 0x00280e20 - .4byte 0x00009040 - .4byte 0x0000001c - .4byte 0x00460e20 - .4byte 0x001a0e20 - .4byte 0x00008680 - .4byte 0xffffffff - .4byte 0x000000f0 - .4byte 0x0000001a - .4byte 0x00008920 - .4byte 0x001a0e20 - .4byte 0x00140e20 - .4byte 0x00009540 - .4byte 0x0000001c - .4byte 0x00009920 - .4byte 0x00280e20 - .4byte 0x00009040 - .4byte 0x0000001d - .4byte 0x00460e20 - .4byte 0x001a0e20 - .4byte 0x00008680 - .4byte 0xffffffff - .4byte 0x000000a2 - .4byte 0x0000001a - .4byte 0x00008920 - .4byte 0x001a0e20 - .4byte 0x00009040 - .4byte 0x0000001e - .4byte 0x003c0e20 - .4byte 0x001a0e20 - .4byte 0x00008880 - .4byte 0xffffffff - .4byte 0x001a0000 - .4byte 0x00000000 - .4byte 0x00008920 - .4byte 0x001a0e20 - .4byte 0x00140e20 - .4byte 0x00009720 - .4byte 0x00009920 - .4byte 0x00280e20 - .4byte 0x00009040 - .4byte 0x0000001b - .4byte 0x00460e20 - .4byte 0x0000a140 - .4byte 0x00000000 - .4byte 0x00011020 - .4byte 0x00000a40 - .4byte ProcScr_EventPromoteUnit + 0x18 - .4byte 0x00000120 - .4byte 0x00060e20 - .4byte 0x00008680 - .4byte 0xffffffff - .4byte 0x001200f0 - .4byte 0x0000003c - .4byte 0x00008920 - .4byte 0x00000a40 - .4byte gUnknown_08A3974C - .4byte 0x003c0e20 - .4byte 0x0000c720 - .4byte 0x0000c640 - .4byte 0x000008f0 - .4byte 0x00001d20 - .4byte 0x0000c460 - .4byte 0x00020000 - .4byte 0x00000534 - .4byte 0x00060e20 - .4byte 0x002e0e20 - .4byte 0x00001c20 - .4byte 0x00001d20 - .4byte 0x0000c540 - .4byte 0x00000200 - .4byte 0x0000a980 - .4byte 0x00000000 - .4byte 0x00190017 - .4byte 0x0000fff9 - .4byte 0x00140e20 - .4byte 0x00001c20 - .4byte 0x00001d20 - .4byte 0x0000ac40 - .4byte 0xffffffff - .4byte 0x0000a440 - .4byte 0x003c0000 - .4byte 0x0000a520 - .4byte 0x002d0e20 - .4byte 0x00009e60 - .4byte 0x003b0002 - .4byte 0x00190001 - .4byte 0x0000a340 - .4byte 0x003c0002 - .4byte 0x00001c20 - .4byte 0x00001d20 - .4byte 0x0000a520 - .4byte 0x00280e20 - .4byte 0x0000c920 - .4byte 0x00020e20 - .4byte 0x00140e20 - .4byte 0x00101721 - .4byte 0x0000a040 - .4byte 0x00000002 - .4byte 0x00000120 - .4byte 0x0000a140 - .4byte 0x00000000 - .4byte 0x00011020 - .4byte 0x00000a40 - .4byte ProcScr_EventPromoteUnit + 0x18 - .4byte 0x00000120 - .4byte 0x00000120 - .4byte 0x00011020 - .4byte 0x0000c360 - .4byte 0x000f0000 - .4byte 0x00000012 - .4byte 0x00008540 - .4byte 0x00000000 - .4byte 0x0000b240 - .4byte 0x00000000 - .4byte 0x0000b320 - .4byte 0x00001020 - .4byte 0x001a0e20 - .4byte 0x00008680 - .4byte 0xffffffff - .4byte 0x00a0007e - .4byte 0x0000001a - .4byte 0x00008920 - .4byte 0x001a0e20 - .4byte 0x00009040 - .4byte 0x00000014 - .4byte 0x00460e20 - .4byte 0x00140e20 - .4byte 0x00009720 - .4byte 0x00009920 - .4byte 0x00280e20 - .4byte 0x00009040 - .4byte 0x00000013 - .4byte 0x00460e20 - .4byte 0x001a0e20 - .4byte 0x00008880 - .4byte 0xffffffff - .4byte 0x001a0000 - .4byte 0x00000000 - .4byte 0x00008920 - .4byte 0x001a0e20 - .4byte 0x0000a140 - .4byte 0x00000000 - .4byte 0x00011020 - .4byte 0x00000a40 - .4byte ProcScr_EventPromoteUnit + 0x18 - .4byte 0x00000120 - .4byte 0x00060e20 - .4byte 0x00000a40 - .4byte gUnknown_08A3974C - .4byte 0x00008680 - .4byte 0xffffffff - .4byte 0x00c80096 - .4byte 0x00000050 - .4byte 0x00008920 - .4byte 0x003c0e20 - .4byte 0x0000c720 - .4byte 0x0000c460 - .4byte 0x00020000 - .4byte 0x000002bc - .4byte 0x00060e20 - .4byte 0x0000c640 - .4byte 0x000008f6 - .4byte 0x00001d20 - .4byte 0x002e0e20 - .4byte 0x0000c540 - .4byte 0x00000100 - .4byte 0x002e0e20 - .4byte 0x0000c460 - .4byte 0x00430000 - .4byte 0x00000534 - .4byte 0x00060e20 - .4byte 0x00001c20 - .4byte 0x00001d20 - .4byte 0x002e0e20 - .4byte 0x0000c460 - .4byte 0x00020001 - .4byte 0x000002bc - .4byte 0x00060e20 - .4byte 0x00001c20 - .4byte 0x00001d20 - .4byte 0x002e0e20 - .4byte 0x0000c540 - .4byte 0x00000200 - .4byte 0x00140e20 - .4byte 0x0001c540 - .4byte 0x00000100 - .4byte 0x002e0e20 - .4byte 0x0000c460 - .4byte 0x00140000 - .4byte 0x00000534 - .4byte 0x00060e20 - .4byte 0x00001c20 - .4byte 0x00001d20 - .4byte 0x0000c540 - .4byte 0x00000200 - .4byte 0x0000a980 - .4byte 0x00000000 - .4byte 0x00130012 - .4byte 0x0000fffc - .4byte 0x00008680 - .4byte 0xffffffff - .4byte 0x009200c0 - .4byte 0x005a0050 - .4byte 0x00001c20 - .4byte 0x00001d20 - .4byte 0x002e0e20 - .4byte 0x00008920 - .4byte 0x0000ac40 - .4byte 0xffffffff - .4byte 0x00140e20 - .4byte 0x0000c920 - .4byte 0x00020e20 - .4byte 0x00140e20 - .4byte 0x00101721 - .4byte 0x00000120 - .4byte 0x00011020 - .4byte 0x0000c360 - .4byte 0x000f0000 - .4byte 0x00000013 - .4byte 0x00008540 - .4byte 0x00000000 - .4byte 0x00009340 - .4byte 0x00000009 - .4byte 0x00009340 - .4byte 0x0000000a - .4byte 0x00009340 - .4byte 0x0000000b - .4byte 0x00009340 - .4byte 0x0000000c - .4byte 0x00009140 - .4byte 0x00000008 - .4byte 0x00009140 - .4byte 0x0000000a - .4byte 0x00009140 - .4byte 0x0000000b - .4byte 0x00009140 - .4byte 0x0000000c - .4byte 0x00009140 - .4byte 0x00000016 - .4byte 0x0000b240 - .4byte 0x00000000 - .4byte 0x0000b320 - .4byte 0x00001020 - .4byte 0x00008680 - .4byte 0xffffffff - .4byte 0x00590091 - .4byte 0x0000002d - .4byte 0x00008920 - .4byte 0x00140e20 - .4byte 0x00009720 - .4byte 0x00009920 - .4byte 0x00280e20 - .4byte 0x00009040 - .4byte 0x00000015 - .4byte 0x00460e20 - .4byte 0x00008880 - .4byte 0xffffffff - .4byte 0x001e0000 - .4byte 0x00000000 - .4byte 0x003c0e20 - .4byte 0x0000a140 - .4byte 0x00000000 - .4byte 0x00011020 - .4byte 0x00000a40 - .4byte ProcScr_EventPromoteUnit + 0x18 - .4byte 0x00000120 - .4byte 0x00060e20 - .4byte 0x00008680 - .4byte 0xffffffff - .4byte 0x006c007a - .4byte 0x0000003c - .4byte 0x00008920 - .4byte 0x00000a40 - .4byte gUnknown_08A3974C - .4byte 0x003c0e20 - .4byte 0x0000c720 - .4byte 0x0000c640 - .4byte 0x000008f7 - .4byte 0x00001d20 - .4byte 0x0000c460 - .4byte 0x00440000 - .4byte 0x00000534 - .4byte 0x00060e20 - .4byte 0x00009e60 - .4byte 0x00070002 - .4byte 0x00140001 - .4byte 0x0000a340 - .4byte 0x003c0002 - .4byte 0x002e0e20 - .4byte 0x0000a520 - .4byte 0x00001c20 - .4byte 0x00001d20 - .4byte 0x0000c540 - .4byte 0x00000200 - .4byte 0x0000a440 - .4byte 0x003c0002 - .4byte 0x0000a980 - .4byte 0x00000000 - .4byte 0x00140013 - .4byte 0x0000fffc - .4byte 0x00001c20 - .4byte 0x00001d20 - .4byte 0x002e0e20 - .4byte 0x0000a520 - .4byte 0x0000ac40 - .4byte 0xffffffff - .4byte 0x00140e20 - .4byte 0x0000a040 - .4byte 0x00000002 - .4byte 0x0000c920 - .4byte 0x00020e20 - .4byte 0x00140e20 - .4byte 0x00101721 - .4byte 0x00000120 - .4byte 0x00011020 - .4byte 0x0000c360 - .4byte 0x000f0000 - .4byte 0x00000014 - .4byte 0x00008540 - .4byte 0x00000000 - .4byte 0x0000b240 - .4byte 0x00000000 - .4byte 0x0000b320 - .4byte 0x00001020 - .4byte 0x001a0e20 - .4byte 0x00008680 - .4byte 0xffffffff - .4byte 0x00380050 - .4byte 0x0000001a - .4byte 0x00008920 - .4byte 0x001a0e20 - .4byte 0x00140e20 - .4byte 0x00009640 - .4byte 0x00000017 - .4byte 0x00009920 - .4byte 0x00280e20 - .4byte 0x00009040 - .4byte 0x00000017 - .4byte 0x00460e20 - .4byte 0x001a0e20 - .4byte 0x00008780 - .4byte 0xffffffff - .4byte 0x00280013 - .4byte 0x00000000 - .4byte 0x00008920 - .4byte 0x001a0e20 - .4byte 0x00140e20 - .4byte 0x00009720 - .4byte 0x00009920 - .4byte 0x00280e20 - .4byte 0x00009040 - .4byte 0x00000018 - .4byte 0x00460e20 - .4byte 0x001a0e20 - .4byte 0x00008880 - .4byte 0xffffffff - .4byte 0x001a0000 - .4byte 0x00000000 - .4byte 0x00008920 - .4byte 0x001a0e20 - .4byte 0x0000a140 - .4byte 0x00000000 - .4byte 0x00011020 - .4byte 0x00000a40 - .4byte ProcScr_EventPromoteUnit + 0x18 - .4byte 0x00000120 - .4byte 0x00060e20 - .4byte 0x00008680 - .4byte 0xffffffff - .4byte 0x008000d8 - .4byte 0x0000003c - .4byte 0x00008920 - .4byte 0x00000a40 - .4byte gUnknown_08A3974C - .4byte 0x003c0e20 - .4byte 0x0000c720 - .4byte 0x0000c460 - .4byte 0x00140000 - .4byte 0x000002bc - .4byte 0x00060e20 - .4byte 0x00140e20 - .4byte 0x0000c460 - .4byte 0x00020001 - .4byte 0x00000534 - .4byte 0x00060e20 - .4byte 0x0000c640 - .4byte 0x000008f8 - .4byte 0x00001d20 - .4byte 0x002e0e20 - .4byte 0x0000a980 - .4byte 0x00020000 - .4byte 0x00150013 - .4byte 0x0000fffa - .4byte 0x00001c20 - .4byte 0x00001d20 - .4byte 0x002e0e20 - .4byte 0x0000ac40 - .4byte 0xffffffff - .4byte 0x0000c540 - .4byte 0x00000100 - .4byte 0x00140e20 - .4byte 0x0001c540 - .4byte 0x00000200 - .4byte 0x002e0e20 - .4byte 0x00001c20 - .4byte 0x00001d20 - .4byte 0x00009e60 - .4byte 0x004f0002 - .4byte 0x00150001 - .4byte 0x00001c20 - .4byte 0x00001d20 - .4byte 0x0000a340 - .4byte 0x003c0002 - .4byte 0x0000a520 - .4byte 0x0000c920 - .4byte 0x00020e20 - .4byte 0x003c0e20 - .4byte 0x00101721 - .4byte 0x0000a040 - .4byte 0x00000002 - .4byte 0x00000120 - .4byte 0x00011020 - .4byte 0x0000c360 - .4byte 0x000f0000 - .4byte 0x00000015 - .4byte 0x00008540 - .4byte 0x00000000 - .4byte 0x0000b240 - .4byte 0x00000000 - .4byte 0x0000b320 - .4byte 0x00001020 - .4byte 0x00140e20 - .4byte 0x00009720 - .4byte 0x00009920 - .4byte 0x00280e20 - .4byte 0x00009040 - .4byte 0x00000019 - .4byte 0x00460e20 - .4byte 0x0000a140 - .4byte 0x00000000 - .4byte 0x00011020 - .4byte 0x00000a40 - .4byte ProcScr_EventPromoteUnit + 0x18 - .4byte 0x00000120 - .4byte 0x00060e20 - .4byte 0x00008680 - .4byte 0xffffffff - .4byte 0x005600f0 - .4byte 0x0000003c - .4byte 0x00008920 - .4byte 0x00000a40 - .4byte gUnknown_08A3974C - .4byte 0x003c0e20 - .4byte 0x0000c720 - .4byte 0x0000c640 - .4byte 0x000008f9 - .4byte 0x00001d20 - .4byte 0x0000c460 - .4byte 0x00140000 - .4byte 0x00000534 - .4byte 0x00060e20 - .4byte 0x0000a980 - .4byte 0x00000000 - .4byte 0x00160015 - .4byte 0x0000fffc - .4byte 0x00008680 - .4byte 0xffffffff - .4byte 0x003600f0 - .4byte 0x004b006e - .4byte 0x00001c20 - .4byte 0x00001d20 - .4byte 0x00008920 - .4byte 0x0000ac40 - .4byte 0xffffffff - .4byte 0x0000c540 - .4byte 0x00000200 - .4byte 0x002e0e20 - .4byte 0x00009e60 - .4byte 0x00620002 - .4byte 0x00160001 - .4byte 0x00009e60 - .4byte 0x00620003 - .4byte 0x00160001 - .4byte 0x00009e60 - .4byte 0x00620004 - .4byte 0x00160001 - .4byte 0x0000a760 - .4byte 0x00000002 - .4byte 0x00680168 - .4byte 0x0000a760 - .4byte 0x00000003 - .4byte 0x00800158 - .4byte 0x0000a760 - .4byte 0x00000004 - .4byte 0x00800178 - .4byte 0x0000a340 - .4byte 0x003c0002 - .4byte 0x0000a340 - .4byte 0x003c0003 - .4byte 0x0000a340 - .4byte 0x003c0004 - .4byte 0x00001c20 - .4byte 0x00001d20 - .4byte 0x0000a520 - .4byte 0x00140e20 - .4byte 0x0000c920 - .4byte 0x00020e20 - .4byte 0x00140e20 - .4byte 0x00101721 - .4byte 0x0000a040 - .4byte 0x00000002 - .4byte 0x0000a040 - .4byte 0x00000003 - .4byte 0x0000a040 - .4byte 0x00000004 - .4byte 0x00000120 - .4byte 0x00011020 - .4byte 0x0000c360 - .4byte 0x000f0000 - .4byte 0x00000016 - .4byte 0x00008540 - .4byte 0x00000000 - .4byte 0x0000b240 - .4byte 0x00000000 - .4byte 0x0000b320 - .4byte 0x00001020 - .4byte 0x00140e20 - .4byte 0x00009720 - .4byte 0x00009920 - .4byte 0x00280e20 - .4byte 0x00009040 - .4byte 0x0000001a - .4byte 0x00460e20 - .4byte 0x0000a140 - .4byte 0x00000000 - .4byte 0x00011020 - .4byte 0x00000a40 - .4byte ProcScr_EventPromoteUnit + 0x18 - .4byte 0x00000120 - .4byte 0x00060e20 - .4byte 0x00008680 - .4byte 0xffffffff - .4byte 0x002000f0 - .4byte 0x0000003c - .4byte 0x00008920 - .4byte 0x00000a40 - .4byte gUnknown_08A3974C - .4byte 0x003c0e20 - .4byte 0x0000c720 - .4byte 0x0000c460 - .4byte 0x00140000 - .4byte 0x000002bc - .4byte 0x00060e20 - .4byte 0x0000c640 - .4byte 0x000008fa - .4byte 0x00001d20 - .4byte 0x002e0e20 - .4byte 0x0000c540 - .4byte 0x00000100 - .4byte 0x002e0e20 - .4byte 0x0000c460 - .4byte 0x00220000 - .4byte 0x00000534 - .4byte 0x00060e20 - .4byte 0x00001c20 - .4byte 0x00001d20 - .4byte 0x002e0e20 - .4byte 0x0000a980 - .4byte 0x00000000 - .4byte 0x00170016 - .4byte 0x0000fffc - .4byte 0x00001c20 - .4byte 0x00001d20 - .4byte 0x0000ac40 - .4byte 0xffffffff - .4byte 0x0000c540 - .4byte 0x00000200 - .4byte 0x002e0e20 - .4byte 0x00140e20 - .4byte 0x0000c920 - .4byte 0x00020e20 - .4byte 0x00140e20 - .4byte 0x00101721 - .4byte 0x00000120 - .4byte 0x00011020 - .4byte 0x0000c360 - .4byte 0x000f0000 - .4byte 0x00000017 - .4byte 0x00008540 - .4byte 0x00000000 - .4byte 0x0000b240 - .4byte 0x00000000 - .4byte 0x0000b320 - .4byte 0x00001020 - .4byte 0x001a0e20 - .4byte 0x00008680 - .4byte 0xffffffff - .4byte 0x003000f0 - .4byte 0x0000001a - .4byte 0x00008920 - .4byte 0x001a0e20 - .4byte 0x00140e20 - .4byte 0x00009540 - .4byte 0x0000001b - .4byte 0x00009920 - .4byte 0x00280e20 - .4byte 0x00009040 - .4byte 0x0000001c - .4byte 0x00460e20 - .4byte 0x001a0e20 - .4byte 0x00008680 - .4byte 0xffffffff - .4byte 0x000000f0 - .4byte 0x0000001a - .4byte 0x00008920 - .4byte 0x001a0e20 - .4byte 0x00140e20 - .4byte 0x00009540 - .4byte 0x0000001c - .4byte 0x00009920 - .4byte 0x00280e20 - .4byte 0x00009040 - .4byte 0x0000001d - .4byte 0x00460e20 - .4byte 0x001a0e20 - .4byte 0x00008680 - .4byte 0xffffffff - .4byte 0x000000a2 - .4byte 0x0000001a - .4byte 0x00008920 - .4byte 0x001a0e20 - .4byte 0x00009040 - .4byte 0x0000001e - .4byte 0x003c0e20 - .4byte 0x001a0e20 - .4byte 0x00008880 - .4byte 0xffffffff - .4byte 0x001a0000 - .4byte 0x00000000 - .4byte 0x00008920 - .4byte 0x001a0e20 - .4byte 0x00140e20 - .4byte 0x00009720 - .4byte 0x00009920 - .4byte 0x00280e20 - .4byte 0x00009040 - .4byte 0x0000001b - .4byte 0x00460e20 - .4byte 0x0000a140 - .4byte 0x00000000 - .4byte 0x00011020 - .4byte 0x00000a40 - .4byte ProcScr_EventPromoteUnit + 0x18 - .4byte 0x00000120 - .4byte 0x00060e20 - .4byte 0x00008680 - .4byte 0xffffffff - .4byte 0x001200f0 - .4byte 0x0000003c - .4byte 0x00008920 - .4byte 0x00000a40 - .4byte gUnknown_08A3974C - .4byte 0x003c0e20 - .4byte 0x0000c720 - .4byte 0x0000c640 - .4byte 0x000008fb - .4byte 0x00001d20 - .4byte 0x0000c460 - .4byte 0x00140000 - .4byte 0x00000534 - .4byte 0x00060e20 - .4byte 0x002e0e20 - .4byte 0x00001c20 - .4byte 0x00001d20 - .4byte 0x0000c540 - .4byte 0x00000200 - .4byte 0x0000a980 - .4byte 0x00000000 - .4byte 0x00190017 - .4byte 0x0000fff9 - .4byte 0x00140e20 - .4byte 0x00001c20 - .4byte 0x00001d20 - .4byte 0x0000ac40 - .4byte 0xffffffff - .4byte 0x0000a440 - .4byte 0x003c0000 - .4byte 0x0000a520 - .4byte 0x002d0e20 - .4byte 0x00009e60 - .4byte 0x003b0002 - .4byte 0x00190001 - .4byte 0x0000a340 - .4byte 0x003c0002 - .4byte 0x00001c20 - .4byte 0x00001d20 - .4byte 0x0000a520 - .4byte 0x00280e20 - .4byte 0x0000c920 - .4byte 0x00020e20 - .4byte 0x00140e20 - .4byte 0x00101721 - .4byte 0x0000a040 - .4byte 0x00000002 - .4byte 0x00000120 - .4byte 0x0000a140 - .4byte 0x00000000 - .4byte 0x00011020 - .4byte 0x00000a40 - .4byte ProcScr_EventPromoteUnit + 0x18 - .4byte 0x00000120 - .4byte 0x00000120 - .4byte 0x00011020 - .4byte 0x0000c360 - .4byte 0x00010000 - .4byte 0x00000000 - .4byte 0x00008540 - .4byte 0x00000000 - .4byte 0x00009340 - .4byte 0x00000000 - .4byte 0x00009d40 - .4byte 0x00000000 - .4byte 0x00008340 - .4byte 0x000c0000 - .4byte 0x0000b240 - .4byte 0x00000000 - .4byte 0x0000b320 - .4byte 0x00001020 - .4byte 0x00140e20 - .4byte 0x00009720 - .4byte 0x00009920 - .4byte 0x00280e20 - .4byte 0x00009040 - .4byte 0x00000000 - .4byte 0x00460e20 - .4byte 0x0000af40 - .4byte 0x00010028 - .4byte 0x0000b120 - .4byte 0x0000c720 - .4byte 0x0000c640 - .4byte 0x000008dc - .4byte 0x00001d20 - .4byte 0x00140e20 - .4byte 0x0000a980 - .4byte 0x00000000 - .4byte 0x00010000 - .4byte 0x002800c8 - .4byte 0x00001c20 - .4byte 0x00001d20 - .4byte 0x0000ac40 - .4byte 0xffffffff - .4byte 0x0000c920 - .4byte 0x00020e20 - .4byte 0x00140e20 - .4byte 0x0000c120 - .4byte 0x00000120 - .4byte 0x00011020 - .4byte 0x0000c360 - .4byte 0x00010000 - .4byte 0x00000005 - .4byte 0x00008540 - .4byte 0x00000000 - .4byte 0x00009d40 - .4byte 0x00000005 - .4byte 0x0000b240 - .4byte 0x00000000 - .4byte 0x0000b320 - .4byte 0x00001020 - .4byte 0x0000a640 - .4byte 0x00050000 - .4byte 0x0000a140 - .4byte 0x00000000 - .4byte 0x0000a980 - .4byte 0x00040000 - .4byte 0x00040005 - .4byte 0x0000fffe - .4byte 0x0000ac40 - .4byte 0x00000000 - .4byte 0x0000a980 - .4byte 0x00040000 - .4byte 0x00030004 - .4byte 0x0000fffe - .4byte 0x00008780 - .4byte 0xffffffff - .4byte 0x00780001 - .4byte 0x00000000 - .4byte 0x0000ac40 - .4byte 0x00000000 - .4byte 0x0000a980 - .4byte 0x00040000 - .4byte 0x00020003 - .4byte 0x0000fffe - .4byte 0x0000ac40 - .4byte 0x00000000 - .4byte 0x0000a980 - .4byte 0x00040000 - .4byte 0x00010002 - .4byte 0x0000fffe - .4byte 0x0000ac40 - .4byte 0x00000000 - .4byte 0x00008920 - .4byte 0x0000a640 - .4byte 0x00010000 - .4byte 0x0000c120 - .4byte 0x00000120 - .4byte 0x00880321 - .4byte 0x00010c41 - .4byte 0x0000000c - .4byte 0x00000a40 - .4byte gUnknown_08A3974C + 0x2fa0 - .4byte 0x00000121 - .4byte 0x00010820 - .4byte 0x00000a40 - .4byte gUnknown_08A3974C + 0x3050 - .4byte 0x00000120 - .4byte 0x00101721 - .4byte 0x00000120 - .4byte 0x00000120 - .4byte 0x00000120 - .4byte 0x00000120 - .4byte 0x00000120 - .4byte 0x00000120 - .4byte 0x00000120 - .4byte 0x00011020 - .4byte 0x0000c360 - .4byte 0x00010000 - .4byte 0x0000000a - .4byte 0x00008540 - .4byte 0x00000000 - .4byte 0x0000b240 - .4byte 0x00000000 - .4byte 0x0000b320 - .4byte 0x00001020 - .4byte 0x00140e20 - .4byte 0x00009720 - .4byte 0x00009920 - .4byte 0x00280e20 - .4byte 0x00009040 - .4byte 0x0000000b - .4byte 0x00460e20 - .4byte 0x0000a140 - .4byte 0x00000000 - .4byte 0x00011020 - .4byte 0x00000a40 - .4byte ProcScr_EventPromoteUnit + 0x18 - .4byte 0x00000120 - .4byte 0x00060e20 - .4byte 0x00008680 - .4byte 0xffffffff - .4byte 0x002e0070 - .4byte 0x0000003c - .4byte 0x00008920 - .4byte 0x00000a40 - .4byte gUnknown_08A3974C - .4byte 0x003c0e20 - .4byte 0x0000c720 - .4byte 0x0000b460 - .4byte 0xfff80000 - .4byte 0x00000003 - .4byte 0x00780e20 - .4byte 0x0000b840 - .4byte 0x00000006 - .4byte 0x001e0e20 - .4byte 0x0000c640 - .4byte 0x000008e8 - .4byte 0x00001d20 - .4byte 0x0000b940 - .4byte 0x00000006 - .4byte 0x0000ba40 - .4byte 0x00000006 - .4byte 0x0000b520 - .4byte 0x0000b720 - .4byte 0x0000c460 - .4byte 0x00020000 - .4byte 0x00000534 - .4byte 0x00060e20 - .4byte 0x002e0e20 - .4byte 0x00001c20 - .4byte 0x00001d20 - .4byte 0x0000a980 - .4byte 0x00000000 - .4byte 0x000b000a - .4byte 0x0000fffc - .4byte 0x00001c20 - .4byte 0x00001d20 - .4byte 0x00001c20 - .4byte 0x00001d20 - .4byte 0x0000ac40 - .4byte 0xffffffff - .4byte 0x0000c540 - .4byte 0x00000200 - .4byte 0x00280e20 - .4byte 0x0000c920 - .4byte 0x00020e20 - .4byte 0x00140e20 - .4byte 0x00101721 - .4byte 0x00000120 - .4byte 0x00011020 - .4byte 0x0000c360 - .4byte 0x000f0000 - .4byte 0x0000000f - .4byte 0x00008540 - .4byte 0x00000000 - .4byte 0x0000b240 - .4byte 0x00000000 - .4byte 0x0000b320 - .4byte 0x00001020 - .4byte 0x00140e20 - .4byte 0x00009720 - .4byte 0x00009920 - .4byte 0x00280e20 - .4byte 0x00009040 - .4byte 0x00000010 - .4byte 0x00460e20 - .4byte 0x0000a140 - .4byte 0x00000000 - .4byte 0x00011020 - .4byte 0x00000a40 - .4byte ProcScr_EventPromoteUnit + 0x18 - .4byte 0x00000120 - .4byte 0x00060e20 - .4byte 0x00000a40 - .4byte gUnknown_08A3974C - .4byte 0x00008680 - .4byte 0xffffffff - .4byte 0x00bc0000 - .4byte 0x00000050 - .4byte 0x00008920 - .4byte 0x003c0e20 - .4byte 0x0000c720 - .4byte 0x0000c460 - .4byte 0x00250000 - .4byte 0x000002bc - .4byte 0x00060e20 - .4byte 0x0000c640 - .4byte 0x000008f3 - .4byte 0x00001d20 - .4byte 0x002e0e20 - .4byte 0x0000c540 - .4byte 0x00000100 - .4byte 0x002e0e20 - .4byte 0x0000c460 - .4byte 0x00400000 - .4byte 0x000002bc - .4byte 0x00060e20 - .4byte 0x00001c20 - .4byte 0x00001d20 - .4byte 0x002e0e20 - .4byte 0x0000c460 - .4byte 0x00140001 - .4byte 0x00000534 - .4byte 0x00060e20 - .4byte 0x00001c20 - .4byte 0x00001d20 - .4byte 0x0001c540 - .4byte 0x00000200 - .4byte 0x001e0e20 - .4byte 0x0000c540 - .4byte 0x00000100 - .4byte 0x002e0e20 - .4byte 0x00001c20 - .4byte 0x00001d20 - .4byte 0x0000a980 - .4byte 0x00000000 - .4byte 0x0010000f - .4byte 0x0000fffc - .4byte 0x006e0e20 - .4byte 0x0000c920 - .4byte 0x00020e20 - .4byte 0x00140e20 - .4byte 0x00101721 - .4byte 0x0000ac40 - .4byte 0xffffffff - .4byte 0x00000120 + .incbin "baserom.gba", 0xA3974C, 0xA39768 - 0xA3974C diff --git a/data/data_A3E4D4.s b/data/data_A3E4D4.s index 1b19e30c4..1d887bdb7 100644 --- a/data/data_A3E4D4.s +++ b/data/data_A3E4D4.s @@ -1,10 +1,10 @@ .section .data - .global gUnknown_08A3EA70 -gUnknown_08A3EA70: @ 0x08A3EA70 + .global ProcScr_GmapSogu +ProcScr_GmapSogu: @ 0x08A3EA70 @ PROC_NAME .short 0x1, 0x0 - .word 0x820693c + .word 0x820693c @ Gmap Sogu @ PROC_MARK .short 0xf, 0x8 .word 0x0 @@ -25,8 +25,8 @@ gUnknown_08A3EA70: @ 0x08A3EA70 .word 0x0 - .global gUnknown_08A3EAA8 -gUnknown_08A3EAA8: @ 0x08A3EAA8 + .global ProcScr_GmapTimeMons +ProcScr_GmapTimeMons: @ 0x08A3EAA8 @ PROC_NAME .short 0x1, 0x0 .word 0x8206ab4 @@ -56,8 +56,8 @@ gUnknown_08A3EAA8: @ 0x08A3EAA8 .word 0x0 - .global gUnknown_08A3EAF0 -gUnknown_08A3EAF0: @ 0x08A3EAF0 + .global ProcScr_GmapRmUpdate1 +ProcScr_GmapRmUpdate1: @ 0x08A3EAF0 @ PROC_NAME .short 0x1, 0x0 .word 0x8206ac4 @@ -72,8 +72,8 @@ gUnknown_08A3EAF0: @ 0x08A3EAF0 .word 0x0 - .global gUnknown_08A3EB10 -gUnknown_08A3EB10: @ 0x08A3EB10 + .global ProcScr_GmapRmUpdate2 +ProcScr_GmapRmUpdate2: @ 0x08A3EB10 @ PROC_NAME .short 0x1, 0x0 .word 0x8206ac4 @@ -100,8 +100,8 @@ gUnknown_08A3EB10: @ 0x08A3EB10 .word 0x0 - .global gUnknown_08A3EB50 -gUnknown_08A3EB50: @ 0x08A3EB50 + .global ProcScr_GmapRM +ProcScr_GmapRM: @ 0x08A3EB50 @ PROC_NAME .short 0x1, 0x0 .word 0x8206ad4 @@ -161,8 +161,8 @@ gUnknown_08A3EB50: @ 0x08A3EB50 .word 0x0 - .global gUnknown_08A3EBE8 -gUnknown_08A3EBE8: @ 0x08A3EBE8 + .global ProcScr_GmapRmBaPalAnim +ProcScr_GmapRmBaPalAnim: @ 0x08A3EBE8 @ PROC_NAME .short 0x1, 0x0 .word 0x8206adc @@ -201,8 +201,8 @@ gUnknown_08A3EBE8: @ 0x08A3EBE8 .word 0x0 - .global gUnknown_08A3EC48 -gUnknown_08A3EC48: @ 0x08A3EC48 + .global ProcScr_GmapRmBorder +ProcScr_GmapRmBorder: @ 0x08A3EC48 @ PROC_NAME .short 0x1, 0x0 .word 0x8206b50 @@ -1504,9 +1504,13 @@ gPal_08A9E5BC: @ 0x08A9E5BC gTsa_08A9E5DC: @ 0x08A9E5DC .incbin "baserom.gba", 0xA9E5DC, 0xAC - .global gUnknown_08A9E688 -gUnknown_08A9E688: @ 0x08A9E688 - .incbin "baserom.gba", 0xA9E688, 0x2AC4 + .global Pal_WmHighLightNationMap +Pal_WmHighLightNationMap: @ 0x08A9E688 + .incbin "baserom.gba", 0xA9E688, 0x40 + + .global Img_WmHightLightMapFrecia +Img_WmHightLightMapFrecia: + .incbin "baserom.gba", 0xA9E6C8, 0x2A84 .global gUnknown_08AA114C gUnknown_08AA114C: @ 0x08AA114C diff --git a/data/data_eventscr_wm.s b/data/data_eventscr_wm.s new file mode 100644 index 000000000..ef195e31d --- /dev/null +++ b/data/data_eventscr_wm.s @@ -0,0 +1,3 @@ + .section .data + + .incbin "baserom.gba", 0xA39D44, 0xA3CB04 - 0xA39D44 diff --git a/include/ea-stdlib.h b/include/ea-stdlib.h index 64c5f5b5f..7bd02fa87 100644 --- a/include/ea-stdlib.h +++ b/include/ea-stdlib.h @@ -197,6 +197,37 @@ #define AFEV EvtListFlag #define AREA EvtListArea +/* World map events */ +#define WM_CENTERCAMONLORD WmEvtSetCameraOnto +#define WM_SHOWDRAWNMAP WmEvtShowBigMap +#define WM_SPAWNLORD WmEvtLoadUnit +#define WM_FADEOUT WmEvtFadeOut +#define WM_TEXTDECORATE WmEvtWaitFade +#define WM_SHOWTEXTWINDOW WmEvtDisplayTextWindow +#define WM_WAITFORTEXT WmEvtTextBoxWait +#define WM_TEXTSTART WmEvtTextStart +#define WM_REMOVETEXT WmEvtRemoveText +#define WM_TEXT WmEvtShowText +#define WM_MOVECAM2 WmEvtCamMov2 +#define WM_SHOWPORTRAIT WmEvtShowPortrait +#define WM_CLEARPORTRAIT WmEvtClearPortrait +#define WM_HIGHLIGHT WmEvtHighlightNation +#define WM_HIGHLIGHTCLEAR1 WmEvtHighlightNationClear1 +#define WM_HIGHLIGHTCLEAR2 WmEvtHighlightNationClear2 +#define WM_PLACEDOT WmEvtMarkPoint +#define WM_FXCLEAR1 WmEvtRemoveMarkPoint1 +#define WM_FXCLEAR2 WmEvtRemoveMarkPoint2 +#define PUTSPRITE WmEvtShowMU +#define WM_PUTMOVINGSPRITE WmEvtMoveUnit +#define WM_WAITFORSPRITES WmEvtWaitMU +#define WM_REMSPRITE WmEvtRemoveMU +#define WM_PUTSPRITE WmEvtSetPosition +#define WM_FADEINSPRITE WmEvtFadeMU +#define WM_WAITFORSPRITELOAD WmEvtWaitMuFade +#define SKIPWN WmEvtSkipWmEvents +#define WM_CREATENEXTDESTINATION WmEvtInitNextStoryNode +#define WM_WAITFORFX WmEvtWaitNodeDisplay + /* Main Code Helpers */ #define TurnEventPlayer(eid, scr, turn) TURN(eid, scr, turn, 0, FACTION_BLUE) diff --git a/include/event.h b/include/event.h index 5af519f0f..80990764b 100644 --- a/include/event.h +++ b/include/event.h @@ -321,30 +321,30 @@ void sub_800BCDC(u16); // battle related // ??? EventB6_WmMoveBigMap(???); // ??? EventB7_WmBigMapWait(???); // ??? EventB8_WmShowBigMapHighlight(???); -// ??? EventB9_(???); -// ??? EventBA_(???); +// ??? EventB9_WmRemoveHighlightNationPart1(???); +// ??? EventBA_WmRemoveHighlightNationPart2(???); // ??? EventBB_(???); -// ??? EventBC_(???); +// ??? EventBC_MarkPoint(???); // ??? EventBD_(???); // ??? EventBE_(???); // ??? EventBF_(???); // ??? EventC0_(???); // ??? EventC1_SKIPWM(???); -// ??? EventC2_(???); -// ??? EventC3_(???); +// ??? EventC2_WmNoFade(???); +// ??? EventC3_SpawnLord(???); // ??? EventCE_(???); // ??? EventCF_(???); -// ??? EventC4_(???); +// ??? EventC4_WmShowPortrait(???); // ??? sub_800CCE8(???); // ??? nullsub_32(???); -// ??? EventC5_(???); +// ??? EventC5_WmClearPortrait(???); // ??? sub_800CD38(???); // ??? nullsub_34(???); // ??? sub_800CD40(???); -// ??? EventC6_(???); +// ??? EventC6_WmDisplayText(???); // ??? EventC7_(???); // ??? EventC8_(???); -// ??? EventC9_(???); +// ??? EventC9_RemoveWmText(???); // ??? sub_800CDE8(???); // ??? sub_800CDEC(???); // ??? EventCA_(???); diff --git a/include/eventinfo.h b/include/eventinfo.h index 845c74053..482f3f74c 100644 --- a/include/eventinfo.h +++ b/include/eventinfo.h @@ -43,6 +43,62 @@ enum char_identifier_event { CHAR_EVT_SLOT2 = -3, }; +enum wm_node_idx { + WM_NODE_00 = 0x00, + WM_NODE_01 = 1, + WM_NODE_02 = 2, + WM_NODE_03 = 3, + WM_NODE_04 = 4, + WM_NODE_05 = 5, + WM_NODE_06 = 6, + WM_NODE_07 = 7, + WM_NODE_08 = 8, + WM_NODE_09 = 9, + WM_NODE_0A = 10, + WM_NODE_0B = 11, + WM_NODE_0C = 12, + WM_NODE_0D = 13, + WM_NODE_0E = 14, + WM_NODE_0F = 15, + WM_NODE_10 = 16, + WM_NODE_11 = 17, + WM_NODE_12 = 18, + WM_NODE_13 = 19, + WM_NODE_14 = 20, + WM_NODE_15 = 21, + WM_NODE_16 = 22, + WM_NODE_17 = 23, + WM_NODE_18 = 24, + WM_NODE_19 = 25, + WM_NODE_1A = 26, + WM_NODE_1B = 27, + WM_NODE_1C = 28, +}; + +enum wm_hightlighted_nation_idx { + WM_NATION_Frelia = 0, + WM_NATION_Grado = 1, + WM_NATION_Jehanna = 2, + WM_NATION_Carcino = 3, + WM_NATION_ZahaWoods = 4, + WM_NATION_Rausten = 5, + WM_NATION_Pokhara = 6, + WM_NATION_Renais = 7, +}; + +enum wm_mu_idx { + WM_MU_0 = 0, + WM_MU_1 = 1, + WM_MU_2 = 2, + WM_MU_3 = 3, + WM_MU_4 = 4, + WM_MU_5 = 5, + WM_MU_6 = 6, + + WM_MU_MAX = 7, + WM_MU_ANY = -1, +}; + struct EventInfo { /* 00 */ const EventListScr * listScript; /* 04 */ u32 script; diff --git a/include/eventscript.h b/include/eventscript.h index efde586be..772c9c7df 100644 --- a/include/eventscript.h +++ b/include/eventscript.h @@ -74,6 +74,88 @@ enum event_cmd_idx { EV_CMD_SUMMONUNIT = 0x43, EV_CMD_BREAKSTONE = 0x44, EV_CMD_GLOWING_CROSS = 0x45, + + /* WM events */ + EV_CMD_WM_80 = 0x80, + EV_CMD_WM_82 = 0x81, + EV_CMD_WM_81 = 0x82, + EV_CMD_WM_SETCAM = 0x83, + EV_CMD_WM_84 = 0x84, + EV_CMD_WM_CENTERCAMONLORD = 0x85, + EV_CMD_WM_MOVECAM = 0x86, + EV_CMD_WM_MOVECAMTO = 0x87, + EV_CMD_WM_88 = 0x88, + EV_CMD_WM_WAITFORCAM = 0x89, + EV_CMD_WM_8A = 0x8A, + EV_CMD_WM_8B = 0x8B, + EV_CMD_WM_8C = 0x8C, + EV_CMD_WM_8D = 0x8D, + EV_CMD_WM_8E = 0x8E, + EV_CMD_WM_8F = 0x8F, + EV_CMD_WM_DRAWPATH = 0x90, + EV_CMD_WM_DRAWPATH2 = 0x91, + EV_CMD_WM_REMOVEPATH = 0x92, + EV_CMD_WM_LOADLOCATION2 = 0x93, + EV_CMD_WM_REMOVELOCATION = 0x94, + EV_CMD_WM_LOADLOCATION3 = 0x95, + EV_CMD_DRAWPATH3 = 0x96, + EV_CMD_WM_CREATENEXTDESTINATION = 0x97, + EV_CMD_WM_98 = 0x98, + EV_CMD_WM_WAITFORFX = 0x99, + EV_CMD_WM_SETDESTINATION = 0x9A, + EV_CMD_WM_9B = 0x9B, + EV_CMD_WM_9C = 0x9C, + EV_CMD_WM_9D = 0x9D, + EV_CMD_PUTSPRITE = 0x9E, + EV_CMD_WM_9F = 0x9F, + EV_CMD_WM_REMSPRITE = 0xA0, + EV_CMD_WM_MAKELORDVISIBLE = 0xA1, + EV_CMD_WM_MAKELORDDISAPPEAR = 0xA2, + EV_CMD_WM_FADEINSPRITE = 0xA3, + EV_CMD_WM_FADEOUTSPRITE = 0xA4, + EV_CMD_WM_WAITFORSPRITELOAD = 0xA5, + EV_CMD_WM_A6 = 0xA6, + EV_CMD_WM_PUTSPRITE = 0xA7, + EV_CMD_WM_PUTMOVINGSPRITE = 0xA8, + EV_CMD_WM_MOVESPRITETO = 0xA9, + EV_CMD_WM_AA = 0xAA, + EV_CMD_WM_AB = 0xAB, + EV_CMD_WM_WAITFORSPRITES = 0xAC, + EV_CMD_WM_SATURATE_COLORS = 0xAD, + EV_CMD_WM_AE = 0xAE, + EV_CMD_WM_SHOWTEXTWINDOW = 0xAF, + EV_CMD_WM_B0 = 0xB0, + EV_CMD_WM_WAITFORTEXT = 0xB1, + EV_CMD_WM_FADEOUT = 0xB2, + EV_CMD_WM_TEXTDECORATE = 0xB3, /* ? no this is WaitFade */ + EV_CMD_WM_SHOWDRAWNMAP = 0xB4, + EV_CMD_WM_WAITFORFXCLEAR1 = 0xB5, + EV_CMD_WM_MOVECAM2 = 0xB6, + EV_CMD_WM_WAITFORFXCLEAR2 = 0xB7, + EV_CMD_WM_HIGHLIGHT = 0xB8, + EV_CMD_WM_HIGHLIGHTCLEAR1 = 0xB9, + EV_CMD_WM_HIGHLIGHTCLEAR2 = 0xBA, + EV_CMD_WM_BB = 0xBB, + EV_CMD_WM_PLACEDOT = 0xBC, + EV_CMD_WM_FXCLEAR1 = 0xBD, + EV_CMD_WM_FXCLEAR2 = 0xBE, + EV_CMD_WM_BF = 0xBF, + EV_CMD_WM_C0 = 0xC0, + EV_CMD_WM_SKIPWN = 0xC1, + EV_CMD_WM_C2 = 0xC2, + EV_CMD_WM_SPAWNLORD = 0xC3, + EV_CMD_WM_SHOWPORTRAIT = 0xC4, + EV_CMD_WM_CLEARPORTRAIT = 0xC5, + EV_CMD_WM_TEXT = 0xC6, + EV_CMD_WM_TEXTSTART = 0xC7, + EV_CMD_WM_C8 = 0xC8, + EV_CMD_WM_REMOVETEXT = 0xC9, + EV_CMD_WM_CA = 0xCA, + EV_CMD_WM_CB = 0xCB, + EV_CMD_WM_CC = 0xCC, + EV_CMD_WM_CD = 0xCD, + EV_CMD_WM_CE = 0xCE, + EV_CMD_WM_CF = 0xCF, }; enum event_sub_cmd_idx { @@ -518,6 +600,37 @@ enum event_sub_cmd_idx { #define EvtShowGlowingCross(pid) _EvtArg0(EV_CMD_GLOWING_CROSS, 2, EVSUBCMD_GLOWINGCROSS, (pid)), #define EvtRemoveGlowingCross _EvtArg0(EV_CMD_GLOWING_CROSS, 2, EVSUBCMD_GLOWINGCROSS_END, 0), +#define WmEvtSetCameraOnto(wm_uid) _EvtArg0(EV_CMD_WM_CENTERCAMONLORD, 4, 0, 0), (EventScr)(wm_uid), +#define WmEvtShowBigMap(x, y, map) _EvtArg0(EV_CMD_WM_SHOWDRAWNMAP, 6, 0, 0), _EvtParams2(x, y), (EventScr)(map), +#define WmEvtNoFade _EvtAutoCmdLen2(EV_CMD_WM_C2), +#define WmEvtLoadUnit(wm_uid, pid, node) _EvtArg0(EV_CMD_WM_SPAWNLORD, 6, 0, 0), _EvtParams2(wm_uid, pid), (EventListScr)node, +#define WmEvtFadeOut(speed) _EvtArg0(EV_CMD_WM_FADEOUT, 4, 0, 0), (EventScr)(speed), +#define WmEvtWaitFade _EvtAutoCmdLen2(EV_CMD_WM_TEXTDECORATE), +#define WmEvtDisplayTextWindow(speed, blend) _EvtArg0(EV_CMD_WM_SHOWTEXTWINDOW, 4, 0, 0), _EvtParams2(speed, blend), +#define WmEvtTextBoxWait _EvtAutoCmdLen2(EV_CMD_WM_WAITFORTEXT), +#define WmEvtTextStart _EvtAutoCmdLen2(EV_CMD_WM_TEXTSTART), +#define WmEvtRemoveText _EvtAutoCmdLen2(EV_CMD_WM_REMOVETEXT), +#define WmEvtShowText(text, unk) _EvtArg0(EV_CMD_WM_TEXT, 4, 0, 0), _EvtParams2(text, unk), +#define WmEvtCamMov2(x1, y1, x2, y2, speed, delay) _EvtArg0(EV_CMD_WM_MOVECAM2, 8, 0, 0), _EvtParams2(x1, y1), _EvtParams2(x2, y2), _EvtParams2(speed, delay), +#define WmEvtShowPortrait(face_slot, face, config, delay) _EvtArg0(EV_CMD_WM_SHOWPORTRAIT, 6, 0, 0), _EvtParams2(face_slot, face), _EvtParams2(config, delay), +#define WmEvtClearPortrait(face_slot, config, delay) _EvtArg0(EV_CMD_WM_CLEARPORTRAIT, 4, 0, face_slot), _EvtParams2(config, delay), +#define WmEvtHighlightNation(nation) _EvtArg0(EV_CMD_WM_HIGHLIGHT, 4, 0, 0), (EventScr)nation, +#define WmEvtHighlightNationClear1(nation) _EvtArg0(EV_CMD_WM_HIGHLIGHTCLEAR1, 4, 0, 0), (EventScr)nation, +#define WmEvtHighlightNationClear2(nation) _EvtArg0(EV_CMD_WM_HIGHLIGHTCLEAR2, 4, 0, 0), (EventScr)nation, +#define WmEvtMarkPoint(a, pal, node, eff) _EvtArg0(EV_CMD_WM_PLACEDOT, 6, 0, 0), _EvtParams2(a, pal), _EvtParams2(node, eff), +#define WmEvtRemoveMarkPoint1(a) _EvtArg0(EV_CMD_WM_FXCLEAR1, 4, 0, 0), (EventScr)(a), +#define WmEvtRemoveMarkPoint2(a) _EvtArg0(EV_CMD_WM_FXCLEAR2, 4, 0, 0), (EventScr)(a), +#define WmEvtShowMU(mu_id, jid, faction, node) _EvtArg0(EV_CMD_PUTSPRITE, 6, 0, 0), _EvtParams2(mu_id, jid), _EvtParams2(faction, node), +#define WmEvtMoveUnit(mu_id, acc, x1, y1, x2, y2, time, flag, delay) _EvtArg0(EV_CMD_WM_PUTMOVINGSPRITE, 12, 0, 0), _EvtParams2(mu_id, acc), _EvtParams2(x1, y1), _EvtParams2(x2, y2), _EvtParams2(time, flag), _EvtParams2(delay, 0), +#define WmEvtWaitMU(mu_id) _EvtArg0(EV_CMD_WM_WAITFORSPRITES, 4, 0, 0), (EventScr)(mu_id), +#define WmEvtRemoveMU(mu_id) _EvtArg0(EV_CMD_WM_REMSPRITE, 4, 0, 0), (EventScr)(mu_id), +#define WmEvtSetPosition(mu_id, x, y) _EvtArg0(EV_CMD_WM_PUTSPRITE, 6, 0, 0), _EvtParams2(mu_id, 0), _EvtParams2(x, y), +#define WmEvtFadeMU(mu_id, delay) _EvtArg0(EV_CMD_WM_FADEINSPRITE, 4, 0, 0), _EvtParams2(mu_id, delay), +#define WmEvtWaitMuFade _EvtAutoCmdLen2(EV_CMD_WM_WAITFORSPRITELOAD), +#define WmEvtSkipWmEvents _EvtAutoCmdLen2(EV_CMD_WM_SKIPWN), +#define WmEvtInitNextStoryNode _EvtAutoCmdLen2(EV_CMD_WM_CREATENEXTDESTINATION), +#define WmEvtWaitNodeDisplay _EvtAutoCmdLen2(EV_CMD_WM_WAITFORFX), + enum event_trigger_types { EVT_LIST_CMD_END, EVT_LIST_CMD_FLAG, diff --git a/include/variables.h b/include/variables.h index 4592ce957..06bbcccf7 100644 --- a/include/variables.h +++ b/include/variables.h @@ -329,7 +329,7 @@ extern const struct FaceVramEntry gFaceConfig_PrepItemUseScreen[4]; // extern ??? gUnknown_08206A48 // extern ??? gUnknown_08206A51 // extern ??? gUnknown_08206AAB -// extern ??? gUnknown_08206AF0 +// extern ??? GfxSet_WmNationMap // extern ??? gUnknown_08206B70 // extern ??? gUnknown_08206E24 // extern ??? gUnknown_08206FB4 @@ -1279,13 +1279,13 @@ extern struct ProcCmd gProcScr_WorldmapStatusUi[]; // extern ??? gUnknown_08A3E9A0 // extern ??? gProcScr_GmapEffectPal // extern ??? gProcScr_GmapEffect -// extern ??? gUnknown_08A3EA70 -// extern ??? gUnknown_08A3EAA8 -// extern ??? gUnknown_08A3EAF0 -// extern ??? gUnknown_08A3EB10 -// extern ??? gUnknown_08A3EB50 -// extern ??? gUnknown_08A3EBE8 -// extern ??? gUnknown_08A3EC48 +// extern ??? ProcScr_GmapSogu +// extern ??? ProcScr_GmapTimeMons +// extern ??? ProcScr_GmapRmUpdate1 +// extern ??? ProcScr_GmapRmUpdate2 +// extern ??? ProcScr_GmapRM +// extern ??? ProcScr_GmapRmBaPalAnim +// extern ??? ProcScr_GmapRmBorder // extern ??? gUnknown_08A3ECB0 // extern ??? gUnknown_08A3ED10 // extern ??? gUnknown_08A3ED18 @@ -1351,7 +1351,7 @@ extern u16 gPal_GMapPI_LevelNums[]; // extern ??? gImg_08A9E544 // extern ??? gPal_08A9E5BC // extern ??? gTsa_08A9E5DC -// extern ??? gUnknown_08A9E688 +// extern ??? Pal_WmHighLightNationMap // extern ??? gUnknown_08AA114C // extern ??? gUnknown_08AA1190 // extern ??? gUnknown_08AA11B0 diff --git a/include/worldmap.h b/include/worldmap.h index 29581e77c..8d75d846b 100644 --- a/include/worldmap.h +++ b/include/worldmap.h @@ -1,6 +1,7 @@ #ifndef GUARD_WORLDMAP_H #define GUARD_WORLDMAP_H +#include "proc.h" #include "hardware.h" struct GmRouteProc @@ -244,7 +245,7 @@ struct WorldMapMainProc /* 29 */ u8 unk_29_7 : 1; /* 2A */ s8 unk_2a; - /* 2C */ int unk_2c; + /* 2C */ int timer; /* 30 */ int unk_30; /* 34 */ STRUCT_PAD(0x34, 0x3a); @@ -356,8 +357,8 @@ extern struct ProcCmd gProcScr_WorldMapMain[]; ProcPtr StartWMFaceCtrl(ProcPtr parent); void EndWMFaceCtrl(void); // ??? GetWMFaceBlendAmt(???); -void sub_80B86CC(int faceSlot, int faceId, u16 config); -void sub_80B8844(int faceSlot, u16 config); +void WmDrawFace(int faceSlot, int faceId, u16 config); +void WmClearFace(int faceSlot, u16 config); void sub_80B895C(void); void WorldMap_Destruct(struct WorldMapMainProc *proc); void sub_80B8A7C(struct WorldMapMainProc *proc); @@ -427,7 +428,7 @@ void sub_80BA008(int); void EndWM(ProcPtr); s8 sub_80BA054(void); // gmap something // ??? sub_80BA06C(???); -void sub_80BA0B4(int timerMaybe, u8 b, int faceSlot, int fid, int e, int f, int config); +void WmMergeFace(int timerMaybe, u8 b, int faceSlot, int fid, int e, int f, int config); // ??? sub_80BA100(???); // ??? sub_80BA198(???); // ??? sub_80BA1F4(???); @@ -799,7 +800,7 @@ void sub_80C1F5C(void); // ??? sub_80C22FC(???); // ??? sub_80C2320(???); // ??? sub_80C2398(???); -void Make6C_Gmap_RM(s16, s16, int, int); +void Make6C_Gmap_RM(s16 x, s16 y, int mask, ProcPtr parent); void sub_80C2460(void); int sub_80C2470(void); // ??? sub_80C2488(???); @@ -825,8 +826,8 @@ void sub_80C24F8(void); // ??? sub_80C29F8(???); // ??? sub_80C2A1C(???); // ??? sub_80C2A40(???); -// ??? sub_80C2AAC(???); -void sub_80C2AD4(int, int); // FEBuilder: "Display place name of world map" +// ??? DrawWmNationHighLightMapGfx(???); +void WmShowNationHighlightedMap(int, int); // FEBuilder: "Display place name of world map" void sub_80C2B7C(int); int sub_80C2BC4(int); void sub_80C2C10(int); @@ -867,8 +868,8 @@ s8 sub_80C3484(int); // GmAutoMuActiveFor // ??? sub_80C3590(???); // ??? sub_80C35C4(???); // ??? sub_80C35EC(???); -void sub_80C3624(int); -void sub_80C3660(void); +void StartWmText(int); +void RemoveWmText(void); void sub_80C368C(ProcPtr); void sub_80C36A0(int); // ??? sub_80C36E8(???); diff --git a/ldscript.txt b/ldscript.txt index ec6d44bb6..78cdb45c1 100644 --- a/ldscript.txt +++ b/ldscript.txt @@ -878,6 +878,8 @@ SECTIONS . = ALIGN(4); src/bmshop.o(.data); . = ALIGN(4); src/uiarena.o(.data); . = ALIGN(4); data/data_A394DC.o(.data); + . = ALIGN(4); src/events_wm.o(.data); + . = ALIGN(4); data/data_eventscr_wm.o(.data); . = ALIGN(4); src/gamerankings.o(.data); . = ALIGN(4); src/cg.o(.data); . = ALIGN(4); src/ending_details.o(.data); diff --git a/scripts/dump_events.py b/scripts/dump_events.py index 05283acc0..2187ba073 100755 --- a/scripts/dump_events.py +++ b/scripts/dump_events.py @@ -4,7 +4,8 @@ import sys, ctypes import symbols from fe8db import PID_IDX, EVENT_COMMANDS, EVENT_SLOTS, DIRECTION_IDX -from fe8db import EVENT0B_TRIGGER_TYPE +from fe8db import EVENT0B_TRIGGER_TYPE, WM_NODES, WM_NATIONS, JID_IDX, FACTION_IDX +from fe8db import WM_MU_IDX # ======================================================================== elf = "fireemblem8.elf" @@ -127,7 +128,9 @@ def parse_event(rom_data, off): arg1_u32_le = int.from_bytes(rom_data[off + 4:off + 8], 'little') arg1_u32_be = int.from_bytes(rom_data[off + 4:off + 8], 'big') arg2_u32_le = int.from_bytes(rom_data[off + 8:off + 12], 'little') - arg2_u32_be = int.from_bytes(rom_data[off + 8:off + 12], 'big') + arg3_u32_le = int.from_bytes(rom_data[off + 12:off + 16], 'little') + arg4_u32_le = int.from_bytes(rom_data[off + 16:off + 20], 'little') + arg5_u32_le = int.from_bytes(rom_data[off + 20:off + 24], 'little') arg32 = arg1_u32_le @@ -820,6 +823,135 @@ def parse_event(rom_data, off): case _: parse_event_err(rom_data, off) + # ======================================== + # WM events + # ======================================== + case "EV_CMD_WM_CENTERCAMONLORD": + mu_id = arg32 + print(f"\tWM_CENTERCAMONLORD({WM_MU_IDX[mu_id]})") + + case "EV_CMD_WM_SHOWDRAWNMAP": + x = arg1 + y = arg2 + _map = arg2_u32_le + print(f"\tWM_SHOWDRAWNMAP({x}, {y}, {hex(_map)})") + + case "EV_CMD_WM_C2": + print("\tWmEvtNoFade // ENOSUPP in EA-stdlib") + + case "EV_CMD_WM_SPAWNLORD": + mu_id, pid = unpack_EvtParams2(arg1_u32_le) + pid_idx = PID_IDX(ctypes.c_int16(pid).value) + print(f"\tWM_SPAWNLORD({WM_MU_IDX[mu_id]}, {pid_idx}, {WM_NODES[arg2_u32_le]})") + + case "EV_CMD_WM_FADEOUT": + speed = arg32 + print(f"\tWM_FADEOUT({speed})") + + case "EV_CMD_WM_TEXTDECORATE": + print("\tWM_TEXTDECORATE // WaitFade") + + case "EV_CMD_WM_SHOWTEXTWINDOW": + speed = arg1 + blend = arg2 + print(f"\tWM_SHOWTEXTWINDOW({speed}, 0x{blend:04X})") + + case "EV_CMD_WM_WAITFORTEXT": + print("\tWM_WAITFORTEXT") + + case "EV_CMD_WM_TEXTSTART": + print("\tWM_TEXTSTART") + + case "EV_CMD_WM_TEXT": + text, unk = unpack_EvtParams2(arg32) + print(f"\tWM_TEXT(0x{text:04X}, {unk})") + + case "EV_CMD_WM_MOVECAM2": + x1, y1 = unpack_EvtParams2(arg32) + x2, y2 = unpack_EvtParams2(arg2_u32_le) + speed, delay = unpack_EvtParams2(arg3_u32_le) + print(f"\tWM_MOVECAM2({x1}, {y1}, {x2}, {y2}, {speed}, {delay})") + + case "EV_CMD_WM_SHOWPORTRAIT": + face_slot, face = unpack_EvtParams2(arg32) + config, delay = unpack_EvtParams2(arg2_u32_le) + print(f"\tWM_SHOWPORTRAIT({face_slot}, 0x{face:04X}, 0x{config:04X}, {delay})") + + case "EV_CMD_WM_HIGHLIGHT": + nation = WM_NATIONS[arg32] + print(f"\tWM_HIGHLIGHT({nation})") + + case "EV_CMD_WM_HIGHLIGHTCLEAR1": + nation = WM_NATIONS[arg32] + print(f"\tWM_HIGHLIGHTCLEAR1({nation})") + + case "EV_CMD_WM_HIGHLIGHTCLEAR2": + nation = WM_NATIONS[arg32] + print(f"\tWM_HIGHLIGHTCLEAR2({nation})") + + case "EV_CMD_WM_CLEARPORTRAIT": + face_slot = arg0 + config, delay = unpack_EvtParams2(arg32) + print(f"\tWM_CLEARPORTRAIT({face_slot}, 0x{config:04X}, {delay})") + + case "EV_CMD_WM_PLACEDOT": + a, pal = unpack_EvtParams2(arg1_u32_le) + node, eff = unpack_EvtParams2(arg2_u32_le) + print(f"\tWM_PLACEDOT({a}, {pal}, {WM_NODES[node]}, {eff})") + + case "EV_CMD_WM_FXCLEAR1": + a = ctypes.c_int32(arg1_u32_le).value + print(f"\tWM_FXCLEAR1({hex(a)})") + + case "EV_CMD_WM_FXCLEAR2": + a = ctypes.c_int32(arg1_u32_le).value + print(f"\tWM_FXCLEAR2({hex(a)})") + + case "EV_CMD_PUTSPRITE": + mu_id, jid = unpack_EvtParams2(arg1_u32_le) + faction, node = unpack_EvtParams2(arg2_u32_le) + print(f"\tPUTSPRITE({WM_MU_IDX[mu_id]}, {JID_IDX(jid)}, {FACTION_IDX[faction]}, {WM_NODES[node]})") + + case "EV_CMD_WM_PUTMOVINGSPRITE": + mu_id, acc = unpack_EvtParams2(arg1_u32_le) + x1, y1 = unpack_EvtParams2(arg2_u32_le) + x2, y2 = unpack_EvtParams2(arg3_u32_le) + time, flag = unpack_EvtParams2(arg4_u32_le) + delay, _0 = unpack_EvtParams2(arg5_u32_le) + print(f"\tWM_PUTMOVINGSPRITE({WM_MU_IDX[mu_id]}, {acc}, {hex(x1)}, {hex(y1)}, {hex(x2)}, {hex(y2)}, {time}, {hex(flag)}, {delay})") + + case "EV_CMD_WM_WAITFORSPRITES": + mu_id = ctypes.c_int32(arg1_u32_le).value + print(f"\tWM_WAITFORSPRITES({WM_MU_IDX[mu_id]})") + + case "EV_CMD_WM_REMSPRITE": + mu_id = ctypes.c_int32(arg1_u32_le).value + print(f"\tWM_REMSPRITE({WM_MU_IDX[mu_id]})") + + case "EV_CMD_WM_PUTSPRITE": + mu_id, _0 = unpack_EvtParams2(arg1_u32_le) + x, y = unpack_EvtParams2(arg2_u32_le) + print(f"\tWM_PUTSPRITE({WM_MU_IDX[mu_id]}, {hex(x)}, {hex(y)})") + + case "EV_CMD_WM_FADEINSPRITE": + mu_id, delay = unpack_EvtParams2(arg1_u32_le) + print(f"\tWM_FADEINSPRITE({WM_MU_IDX[mu_id]}, {delay})") + + case "EV_CMD_WM_WAITFORSPRITELOAD": + print("\tWM_WAITFORSPRITELOAD") + + case "EV_CMD_WM_REMOVETEXT": + print("\tWM_REMOVETEXT") + + case "EV_CMD_WM_SKIPWN": + print("\tSKIPWN") + + case "EV_CMD_WM_CREATENEXTDESTINATION": + print("\tWM_CREATENEXTDESTINATION") + + case "EV_CMD_WM_WAITFORFX": + print("\tWM_WAITFORFX") + case _: parse_event_todo(rom_data, off) @@ -832,7 +964,7 @@ def dump_one_event(rom_data, off): else: scr_name = _symbols[ptr] - print(f"CONST_DATA EventListScr {scr_name}[] = " + "{") + print(f"CONST_DATA EventScr {scr_name}[] = " + "{") while True: cmd, off = parse_event(rom_data, off) diff --git a/scripts/fe8db.py b/scripts/fe8db.py index 7ca0e5ffb..172e5f331 100644 --- a/scripts/fe8db.py +++ b/scripts/fe8db.py @@ -71,6 +71,87 @@ 0x43: "EV_CMD_SUMMONUNIT", 0x44: "EV_CMD_BREAKSTONE", 0x45: "EV_CMD_GLOWING_CROSS", + + 0x80: "EV_CMD_WM_80", + 0x81: "EV_CMD_WM_82", + 0x82: "EV_CMD_WM_81", + 0x83: "EV_CMD_WM_SETCAM", + 0x84: "EV_CMD_WM_84", + 0x85: "EV_CMD_WM_CENTERCAMONLORD", + 0x86: "EV_CMD_WM_MOVECAM", + 0x87: "EV_CMD_WM_MOVECAMTO", + 0x88: "EV_CMD_WM_88", + 0x89: "EV_CMD_WM_WAITFORCAM", + 0x8A: "EV_CMD_WM_8A", + 0x8B: "EV_CMD_WM_8B", + 0x8C: "EV_CMD_WM_8C", + 0x8D: "EV_CMD_WM_8D", + 0x8E: "EV_CMD_WM_8E", + 0x8F: "EV_CMD_WM_8F", + 0x90: "EV_CMD_WM_DRAWPATH", + 0x91: "EV_CMD_WM_DRAWPATH2", + 0x92: "EV_CMD_WM_REMOVEPATH", + 0x93: "EV_CMD_WM_LOADLOCATION2", + 0x94: "EV_CMD_WM_REMOVELOCATION", + 0x95: "EV_CMD_WM_LOADLOCATION3", + 0x96: "EV_CMD_DRAWPATH3", + 0x97: "EV_CMD_WM_CREATENEXTDESTINATION", + 0x98: "EV_CMD_WM_98", + 0x99: "EV_CMD_WM_WAITFORFX", + 0x9A: "EV_CMD_WM_SETDESTINATION", + 0x9B: "EV_CMD_WM_9B", + 0x9C: "EV_CMD_WM_9C", + 0x9D: "EV_CMD_WM_9D", + 0x9E: "EV_CMD_PUTSPRITE", + 0x9F: "EV_CMD_WM_9F", + 0xA0: "EV_CMD_WM_REMSPRITE", + 0xA1: "EV_CMD_WM_MAKELORDVISIBLE", + 0xA2: "EV_CMD_WM_MAKELORDDISAPPEAR", + 0xA3: "EV_CMD_WM_FADEINSPRITE", + 0xA4: "EV_CMD_WM_FADEOUTSPRITE", + 0xA5: "EV_CMD_WM_WAITFORSPRITELOAD", + 0xA6: "EV_CMD_WM_A6", + 0xA7: "EV_CMD_WM_PUTSPRITE", + 0xA8: "EV_CMD_WM_PUTMOVINGSPRITE", + 0xA9: "EV_CMD_WM_MOVESPRITETO", + 0xAA: "EV_CMD_WM_AA", + 0xAB: "EV_CMD_WM_AB", + 0xAC: "EV_CMD_WM_WAITFORSPRITES", + 0xAD: "EV_CMD_WM_SATURATE_COLORS", + 0xAE: "EV_CMD_WM_AE", + 0xAF: "EV_CMD_WM_SHOWTEXTWINDOW", + 0xB0: "EV_CMD_WM_B0", + 0xB1: "EV_CMD_WM_WAITFORTEXT", + 0xB2: "EV_CMD_WM_FADEOUT", + 0xB3: "EV_CMD_WM_TEXTDECORATE", + 0xB4: "EV_CMD_WM_SHOWDRAWNMAP", + 0xB5: "EV_CMD_WM_WAITFORFXCLEAR1", + 0xB6: "EV_CMD_WM_MOVECAM2", + 0xB7: "EV_CMD_WM_WAITFORFXCLEAR2", + 0xB8: "EV_CMD_WM_HIGHLIGHT", + 0xB9: "EV_CMD_WM_HIGHLIGHTCLEAR1", + 0xBA: "EV_CMD_WM_HIGHLIGHTCLEAR2", + 0xBB: "EV_CMD_WM_BB", + 0xBC: "EV_CMD_WM_PLACEDOT", + 0xBD: "EV_CMD_WM_FXCLEAR1", + 0xBE: "EV_CMD_WM_FXCLEAR2", + 0xBF: "EV_CMD_WM_BF", + 0xC0: "EV_CMD_WM_C0", + 0xC1: "EV_CMD_WM_SKIPWN", + 0xC2: "EV_CMD_WM_C2", + 0xC3: "EV_CMD_WM_SPAWNLORD", + 0xC4: "EV_CMD_WM_SHOWPORTRAIT", + 0xC5: "EV_CMD_WM_CLEARPORTRAIT", + 0xC6: "EV_CMD_WM_TEXT", + 0xC7: "EV_CMD_WM_TEXTSTART", + 0xC8: "EV_CMD_WM_C8", + 0xC9: "EV_CMD_WM_REMOVETEXT", + 0xCA: "EV_CMD_WM_CA", + 0xCB: "EV_CMD_WM_CB", + 0xCC: "EV_CMD_WM_CC", + 0xCD: "EV_CMD_WM_CD", + 0xCE: "EV_CMD_WM_CE", + 0xCF: "EV_CMD_WM_CF", } EVENT_SLOTS = { @@ -749,3 +830,58 @@ def TERRAIN_IDX(terrain): 3: "CHAPTER_MODE_EPHRAIM", 0xFF: "CHAPTER_MODE_ANY", } + +WM_NODES = { + 0: "WM_NODE_00", + 1: "WM_NODE_01", + 2: "WM_NODE_02", + 3: "WM_NODE_03", + 4: "WM_NODE_04", + 5: "WM_NODE_05", + 6: "WM_NODE_06", + 7: "WM_NODE_07", + 8: "WM_NODE_08", + 9: "WM_NODE_09", + 10: "WM_NODE_0A", + 11: "WM_NODE_0B", + 12: "WM_NODE_0C", + 13: "WM_NODE_0D", + 14: "WM_NODE_0E", + 15: "WM_NODE_0F", + 16: "WM_NODE_10", + 17: "WM_NODE_11", + 18: "WM_NODE_12", + 19: "WM_NODE_13", + 20: "WM_NODE_14", + 21: "WM_NODE_15", + 22: "WM_NODE_16", + 23: "WM_NODE_17", + 24: "WM_NODE_18", + 25: "WM_NODE_19", + 26: "WM_NODE_1A", + 27: "WM_NODE_1B", + 28: "WM_NODE_1C", +} + +WM_NATIONS = { + 0: "WM_NATION_Frelia", + 1: "WM_NATION_Grado", + 2: "WM_NATION_Jehanna", + 3: "WM_NATION_Carcino", + 4: "WM_NATION_ZahaWoods", + 5: "WM_NATION_Rausten", + 6: "WM_NATION_Pokhara", + 7: "WM_NATION_Renais", +} + +WM_MU_IDX = { + 0 : "WM_MU_0", + 1 : "WM_MU_1", + 2 : "WM_MU_2", + 3 : "WM_MU_3", + 4 : "WM_MU_4", + 5 : "WM_MU_5", + 6 : "WM_MU_6", + + -1: "WM_MU_ANY" +} diff --git a/src/events/ch1-wm.h b/src/events/ch1-wm.h new file mode 100644 index 000000000..7041812d4 --- /dev/null +++ b/src/events/ch1-wm.h @@ -0,0 +1,32 @@ +#pragma once + +#include "global.h" +#include "event.h" +#include "eventinfo.h" +#include "eventcall.h" +#include "eventscript.h" +#include "ea-stdlib.h" +#include "constants/characters.h" +#include "constants/classes.h" + +CONST_DATA EventScr EventScrWM_Ch1_Beginning[] = { + EVBIT_MODIFY(0x1) + SKIPWN + ENDA +}; + +CONST_DATA EventScr EventScrWM_Ch1_Ending[] = { + EVBIT_MODIFY(0x1) + ENUT(137) + ENDA +}; + +CONST_DATA EventScr EventScrWM_08A39D24[] = { + EvtTextStartType5 // ENOSUPP in EA-stdlib + SVAL(EVT_SLOT_B, 0xc000c) + TEXTSHOW(0x8dd) + TEXTEND + REMA + ENUT(226) + ENDA +}; diff --git a/src/events/prologue-wm.h b/src/events/prologue-wm.h new file mode 100644 index 000000000..8d7b79fbb --- /dev/null +++ b/src/events/prologue-wm.h @@ -0,0 +1,214 @@ +#pragma once + +#include "global.h" +#include "event.h" +#include "eventinfo.h" +#include "eventcall.h" +#include "eventscript.h" +#include "ea-stdlib.h" +#include "constants/characters.h" +#include "constants/classes.h" + +CONST_DATA EventScr EventScrWM_Prologue_Beginning[] = { + EVBIT_MODIFY(0x1) + WmEvtNoFade // ENOSUPP in EA-stdlib + WM_SPAWNLORD(WM_MU_0, CHARACTER_EIRIKA, WM_NODE_00) + WM_CENTERCAMONLORD(WM_MU_0) + MUSCFAST(0x7fff) + STAL(32) + MUSC(0x4) + WM_SHOWDRAWNMAP(0, 0, 0x10) + STAL(2) + WM_FADEOUT(0) + WM_TEXTDECORATE // WaitFade + EVBIT_MODIFY(0x0) + STAL(60) + WM_SHOWTEXTWINDOW(40, 0x0001) + WM_WAITFORTEXT + WM_TEXTSTART + WM_TEXT(0x08DB, 0) + TEXTEND + WM_MOVECAM2(0, 0, 0, 24, 60, 0) + STAL(60) + WM_SHOWPORTRAIT(0, 0x0051, 0x02BC, 0) + STAL(6) + STAL(26) + WM_HIGHLIGHT(WM_NATION_Renais) + TEXTCONT + TEXTEND + STAL(30) + WM_HIGHLIGHTCLEAR1(WM_NATION_Renais) + WM_HIGHLIGHTCLEAR2(WM_NATION_Renais) + WM_CLEARPORTRAIT(0, 0x0100, 0) + STAL(32) + WM_MOVECAM2(0, 24, 0, 65528, 60, 0) + STAL(60) + WM_SHOWPORTRAIT(0, 0x0052, 0x02BC, 0) + STAL(6) + STAL(26) + WM_HIGHLIGHT(WM_NATION_Frelia) + TEXTCONT + TEXTEND + STAL(30) + WM_HIGHLIGHTCLEAR1(WM_NATION_Frelia) + WM_HIGHLIGHTCLEAR2(WM_NATION_Frelia) + WM_CLEARPORTRAIT(0, 0x0100, 0) + STAL(32) + WM_MOVECAM2(0, 65528, 0, 30, 60, 0) + STAL(60) + WM_SHOWPORTRAIT(0, 0x0056, 0x0534, 0) + STAL(6) + STAL(26) + WM_HIGHLIGHT(WM_NATION_Jehanna) + TEXTCONT + TEXTEND + STAL(30) + WM_HIGHLIGHTCLEAR1(WM_NATION_Jehanna) + WM_HIGHLIGHTCLEAR2(WM_NATION_Jehanna) + WM_CLEARPORTRAIT(0, 0x0200, 0) + STAL(32) + WM_MOVECAM2(0, 30, 0, 65528, 60, 0) + STAL(60) + WM_SHOWPORTRAIT(0, 0x0053, 0x0534, 0) + STAL(6) + STAL(26) + WM_HIGHLIGHT(WM_NATION_Rausten) + TEXTCONT + TEXTEND + STAL(30) + WM_HIGHLIGHTCLEAR1(WM_NATION_Rausten) + WM_HIGHLIGHTCLEAR2(WM_NATION_Rausten) + WM_CLEARPORTRAIT(0, 0x0200, 0) + STAL(32) + WM_MOVECAM2(0, 65528, 0, 48, 60, 0) + STAL(60) + WM_SHOWPORTRAIT(0, 0x0040, 0x02BC, 0) + STAL(6) + STAL(26) + WM_HIGHLIGHT(WM_NATION_Grado) + TEXTCONT + TEXTEND + STAL(30) + WM_HIGHLIGHTCLEAR1(WM_NATION_Grado) + WM_HIGHLIGHTCLEAR2(WM_NATION_Grado) + WM_CLEARPORTRAIT(0, 0x0100, 0) + STAL(32) + TEXTCONT + TEXTEND + STAL(30) + WM_MOVECAM2(0, 48, 0, 0, 60, 0) + STAL(60) + WM_SHOWPORTRAIT(0, 0x0054, 0x02BC, 0) + STAL(6) + STAL(26) + WM_HIGHLIGHT(WM_NATION_Carcino) + TEXTCONT + TEXTEND + STAL(30) + WM_HIGHLIGHTCLEAR1(WM_NATION_Carcino) + WM_HIGHLIGHTCLEAR2(WM_NATION_Carcino) + WM_CLEARPORTRAIT(0, 0x0100, 0) + STAL(32) + TEXTCONT + TEXTEND + STAL(30) + TEXTCONT + TEXTEND + STAL(30) + TEXTCONT + TEXTEND + STAL(30) + WM_MOVECAM2(0, 0, 0, 48, 60, 0) + STAL(60) + WM_SHOWPORTRAIT(0, 0x0040, 0x02BC, 0) + STAL(6) + STAL(26) + WM_HIGHLIGHT(WM_NATION_Grado) + TEXTCONT + TEXTEND + TEXTCONT + TEXTEND + WM_HIGHLIGHTCLEAR1(WM_NATION_Grado) + WM_HIGHLIGHTCLEAR2(WM_NATION_Grado) + WM_CLEARPORTRAIT(0, 0x0100, 0) + STAL(32) + WM_MOVECAM2(0, 48, 0, 24, 60, 0) + STAL(60) + WM_SHOWPORTRAIT(0, 0x0051, 0x02BC, 0) + STAL(6) + STAL(26) + WM_HIGHLIGHT(WM_NATION_Renais) + TEXTCONT + TEXTEND + WM_HIGHLIGHTCLEAR1(WM_NATION_Renais) + WM_HIGHLIGHTCLEAR2(WM_NATION_Renais) + WM_CLEARPORTRAIT(0, 0x0100, 0) + STAL(32) + WM_MOVECAM2(0, 24, 0, 40, 52, 0) + STAL(62) + WM_PLACEDOT(0, 0, WM_NODE_14, 1) + WM_PLACEDOT(0, 1, WM_NODE_12, 1) + STAL(60) + PUTSPRITE(WM_MU_2, CLASS_SOLDIER, FACTION_ID_GREEN, WM_NODE_12) + PUTSPRITE(WM_MU_3, CLASS_SOLDIER, FACTION_ID_GREEN, WM_NODE_12) + PUTSPRITE(WM_MU_4, CLASS_SOLDIER, FACTION_ID_GREEN, WM_NODE_12) + WM_PUTMOVINGSPRITE(WM_MU_2, 0, 0x73, 0x84, 0x55, 0x41, 210, 0x3, 10) + WM_PUTMOVINGSPRITE(WM_MU_3, 0, 0x84, 0x84, 0x76, 0x57, 170, 0x3, 10) + WM_PUTMOVINGSPRITE(WM_MU_4, 0, 0x95, 0x84, 0x86, 0x64, 150, 0x3, 10) + STAL(20) + TEXTCONT + TEXTEND + WM_WAITFORSPRITES(WM_MU_ANY) + WM_REMSPRITE(WM_MU_2) + WM_REMSPRITE(WM_MU_3) + WM_REMSPRITE(WM_MU_4) + STAL(30) + WM_SHOWPORTRAIT(0, 0x0014, 0x0534, 0) + STAL(6) + STAL(60) + PUTSPRITE(WM_MU_2, CLASS_EPHRAIM_LORD, FACTION_ID_BLUE, WM_NODE_06) + WM_PUTMOVINGSPRITE(WM_MU_2, 0, 0x5c, 0x64, 0x5c, 0x6c, 180, 0x3, 16) + TEXTCONT + TEXTEND + WM_WAITFORSPRITES(WM_MU_ANY) + WM_REMSPRITE(WM_MU_2) + WM_CLEARPORTRAIT(0, 0x0200, 0) + STAL(46) + PUTSPRITE(WM_MU_6, CLASS_EIRIKA_LORD, FACTION_ID_BLUE, WM_NODE_14) + PUTSPRITE(WM_MU_5, CLASS_PEER, FACTION_ID_BLUE, WM_NODE_14) + PUTSPRITE(WM_MU_2, CLASS_GENERAL, FACTION_ID_GREEN, WM_NODE_12) + PUTSPRITE(WM_MU_3, CLASS_MAGE_KNIGHT_F, FACTION_ID_GREEN, WM_NODE_12) + PUTSPRITE(WM_MU_4, CLASS_WYVERN_KNIGHT, FACTION_ID_GREEN, WM_NODE_12) + WM_PUTMOVINGSPRITE(WM_MU_2, 0, 0x84, 0x84, 0x6c, 0x5c, 210, 0x1, 0) + WM_PUTMOVINGSPRITE(WM_MU_3, 0, 0x73, 0x92, 0x5b, 0x56, 210, 0x1, 0) + WM_PUTMOVINGSPRITE(WM_MU_4, 0, 0x95, 0x92, 0x7d, 0x56, 210, 0x1, 0) + TEXTCONT + TEXTEND + WM_WAITFORSPRITES(WM_MU_ANY) + STAL(26) + WM_PUTSPRITE(WM_MU_6, 0x63, 0x45) + WM_PUTSPRITE(WM_MU_5, 0x6c, 0x4c) + WM_FADEINSPRITE(WM_MU_6, 60) + WM_FADEINSPRITE(WM_MU_5, 60) + TEXTCONT + TEXTEND + WM_WAITFORSPRITELOAD + WM_REMOVETEXT + STAL(2) + FADI(16) + SKIPWN + WM_FXCLEAR1(-0x1) + WM_FXCLEAR2(-0x1) + WM_REMSPRITE(WM_MU_2) + WM_REMSPRITE(WM_MU_3) + WM_REMSPRITE(WM_MU_4) + WM_REMSPRITE(WM_MU_5) + WM_REMSPRITE(WM_MU_6) + ENDA +}; + +CONST_DATA EventScr EventScrWM_Prologue_Ending[] = { + EVBIT_MODIFY(0x1) + ENUT(137) + ENDA +}; diff --git a/src/events_wm.c b/src/events_wm.c new file mode 100644 index 000000000..604ee4543 --- /dev/null +++ b/src/events_wm.c @@ -0,0 +1,12 @@ +#include "global.h" +#include "event.h" +#include "eventinfo.h" +#include "eventcall.h" +#include "eventscript.h" +#include "ea-stdlib.h" +#include "constants/characters.h" +#include "constants/classes.h" + +#include "events/prologue-wm.h" +#include "events/ch1-wm.h" + diff --git a/src/evtcmd_gmap.c b/src/evtcmd_gmap.c index 23c68562f..627340a5e 100644 --- a/src/evtcmd_gmap.c +++ b/src/evtcmd_gmap.c @@ -982,7 +982,7 @@ u8 EventA3_WmShowUnitFaded(struct EventEngineProc * proc) struct WorldMapMainProc * worldMapProc; u16 index = EVT_CMD_ARGV(proc->pEventCurrent)[1]; - s16 b = EVT_CMD_ARGV(proc->pEventCurrent)[2]; + s16 delay = EVT_CMD_ARGV(proc->pEventCurrent)[2]; if (EVENT_IS_SKIPPING(proc)) { @@ -991,7 +991,7 @@ u8 EventA3_WmShowUnitFaded(struct EventEngineProc * proc) } worldMapProc = Proc_Find(gProcScr_WorldMapMain); - GmMu_StartFadeIn(worldMapProc->unk_54, index, b); + GmMu_StartFadeIn(worldMapProc->unk_54, index, delay); return EVC_ADVANCE_CONTINUE; } @@ -1084,27 +1084,27 @@ u8 EventA8_WmUnitMoveFree(struct EventEngineProc * proc) struct Sub80C33D4 local; // Order needed to match - u16 r4; - u16 r8; - u16 r9; + u16 flag; + u16 delay; + u16 time; s16 index = EVT_CMD_ARGV(proc->pEventCurrent)[1]; - u16 r2 = EVT_CMD_ARGV(proc->pEventCurrent)[2]; - u16 r3 = EVT_CMD_ARGV(proc->pEventCurrent)[3]; - u16 ip = EVT_CMD_ARGV(proc->pEventCurrent)[4]; - u16 x = EVT_CMD_ARGV(proc->pEventCurrent)[5]; - u16 y = EVT_CMD_ARGV(proc->pEventCurrent)[6]; + u16 acceleration = EVT_CMD_ARGV(proc->pEventCurrent)[2]; + u16 x1 = EVT_CMD_ARGV(proc->pEventCurrent)[3]; + u16 y1 = EVT_CMD_ARGV(proc->pEventCurrent)[4]; + u16 x2 = EVT_CMD_ARGV(proc->pEventCurrent)[5]; + u16 y2 = EVT_CMD_ARGV(proc->pEventCurrent)[6]; - r9 = EVT_CMD_ARGV(proc->pEventCurrent)[7]; - r4 = EVT_CMD_ARGV(proc->pEventCurrent)[8]; - r8 = EVT_CMD_ARGV(proc->pEventCurrent)[9]; + time = EVT_CMD_ARGV(proc->pEventCurrent)[7]; + flag = EVT_CMD_ARGV(proc->pEventCurrent)[8]; + delay = EVT_CMD_ARGV(proc->pEventCurrent)[9]; if (EVENT_IS_SKIPPING(proc)) { worldMapProc = Proc_Find(gProcScr_WorldMapMain); - GmMu_SetPosition(worldMapProc->unk_54, index, x, y); + GmMu_SetPosition(worldMapProc->unk_54, index, x2, y2); - if ((r4 & 2) != 0) + if ((flag & 2) != 0) { HideGmUnit(index); } @@ -1112,15 +1112,15 @@ u8 EventA8_WmUnitMoveFree(struct EventEngineProc * proc) else { local.unk_00 = index; - local.unk_01 = r2; + local.unk_01 = acceleration; local.unk_02 = 0; - local.unk_06 = r3; - local.unk_08 = ip; - local.unk_0a = x; - local.unk_0c = y; - local.unk_10 = r9; - local.unk_0e = r8; - sub_80C33D4(&local, r4, 0); + local.unk_06 = x1; + local.unk_08 = y1; + local.unk_0a = x2; + local.unk_0c = y2; + local.unk_10 = time; + local.unk_0e = delay; + sub_80C33D4(&local, flag, 0); } return EVC_ADVANCE_CONTINUE; @@ -1263,12 +1263,12 @@ u8 EventAE_WmFadeToDarkerWait(struct EventEngineProc * proc) //! FE8U = 0x0800C8B0 u8 EventAF_WmShowTextBox(struct EventEngineProc * proc) { - u16 a = EVT_CMD_ARGV(proc->pEventCurrent)[1]; - u16 b = EVT_CMD_ARGV(proc->pEventCurrent)[2]; + u16 speed = EVT_CMD_ARGV(proc->pEventCurrent)[1]; + u16 blend = EVT_CMD_ARGV(proc->pEventCurrent)[2]; if (!EVENT_IS_SKIPPING(proc)) { - GmMuEntryStartShow(a, b); + GmMuEntryStartShow(speed, blend); } return EVC_ADVANCE_CONTINUE; @@ -1329,13 +1329,13 @@ u8 EventB3_WmFancyFadeWait(struct EventEngineProc * proc) //! FE8U = 0x0800C950 u8 EventB4_WmDisplayBigMap(struct EventEngineProc * proc) { - u16 a = EVT_CMD_ARGV(proc->pEventCurrent)[1]; - u16 b = EVT_CMD_ARGV(proc->pEventCurrent)[2]; + u16 x = EVT_CMD_ARGV(proc->pEventCurrent)[1]; + u16 y = EVT_CMD_ARGV(proc->pEventCurrent)[2]; int c = EVT_CMD_ARG32_LE(proc->pEventCurrent + 2); if (!EVENT_IS_SKIPPING(proc)) { - Make6C_Gmap_RM(a, b, c, 0); + Make6C_Gmap_RM(x, y, c, NULL); } return EVC_ADVANCE_CONTINUE; @@ -1357,16 +1357,16 @@ u8 EventB5_WmHideBigMap(struct EventEngineProc * proc) //! FE8U = 0x0800C9A0 u8 EventB6_WmMoveBigMap(struct EventEngineProc * proc) { - u16 r1 = EVT_CMD_ARGV(proc->pEventCurrent)[1]; - u16 r2 = EVT_CMD_ARGV(proc->pEventCurrent)[2]; - u16 r3 = EVT_CMD_ARGV(proc->pEventCurrent)[3]; - u16 r4 = EVT_CMD_ARGV(proc->pEventCurrent)[4]; - u16 r6 = EVT_CMD_ARGV(proc->pEventCurrent)[5]; - u16 r7 = EVT_CMD_ARGV(proc->pEventCurrent)[6]; + u16 x1 = EVT_CMD_ARGV(proc->pEventCurrent)[1]; + u16 y1 = EVT_CMD_ARGV(proc->pEventCurrent)[2]; + u16 x2 = EVT_CMD_ARGV(proc->pEventCurrent)[3]; + u16 y2 = EVT_CMD_ARGV(proc->pEventCurrent)[4]; + u16 speed = EVT_CMD_ARGV(proc->pEventCurrent)[5]; + u16 delay = EVT_CMD_ARGV(proc->pEventCurrent)[6]; if (!EVENT_IS_SKIPPING(proc)) { - sub_80C1F18(r1, r2, r3, r4, r6, r7, 0); + sub_80C1F18(x1, y1, x2, y2, speed, delay, 0); } return EVC_ADVANCE_CONTINUE; @@ -1392,18 +1392,18 @@ u8 EventB7_WmBigMapWait(struct EventEngineProc * proc) //! FE8U = 0x0800CA18 u8 EventB8_WmShowBigMapHighlight(struct EventEngineProc * proc) { - int a = EVT_CMD_ARG32_LE(proc->pEventCurrent); + int nation = EVT_CMD_ARG32_LE(proc->pEventCurrent); if (!EVENT_IS_SKIPPING(proc)) { - sub_80C2AD4(a, 0); + WmShowNationHighlightedMap(nation, 0); } return EVC_ADVANCE_CONTINUE; } //! FE8U = 0x0800CA38 -u8 EventB9_(struct EventEngineProc * proc) +u8 EventB9_WmRemoveHighlightNationPart1(struct EventEngineProc * proc) { int a = EVT_CMD_ARG32_LE(proc->pEventCurrent); @@ -1420,7 +1420,7 @@ u8 EventB9_(struct EventEngineProc * proc) } //! FE8U = 0x0800CA60 -u8 EventBA_(struct EventEngineProc * proc) +u8 EventBA_WmRemoveHighlightNationPart2(struct EventEngineProc * proc) { int a = EVT_CMD_ARG32_LE(proc->pEventCurrent); @@ -1460,12 +1460,12 @@ u8 EventBB_(struct EventEngineProc * proc) } //! FE8U = 0x0800CADC -u8 EventBC_(struct EventEngineProc * proc) +u8 EventBC_MarkPoint(struct EventEngineProc * proc) { u16 a = EVT_CMD_ARGV(proc->pEventCurrent)[1]; - u16 b = EVT_CMD_ARGV(proc->pEventCurrent)[2]; + u16 pal = EVT_CMD_ARGV(proc->pEventCurrent)[2]; s16 nodeId = EVT_CMD_ARGV(proc->pEventCurrent)[3]; - s16 d = EVT_CMD_ARGV(proc->pEventCurrent)[4]; + s16 eff = EVT_CMD_ARGV(proc->pEventCurrent)[4]; if (!EVENT_IS_SKIPPING(proc)) { @@ -1473,7 +1473,7 @@ u8 EventBC_(struct EventEngineProc * proc) s16 y; *&x = nodeId[gWMNodeData].x; *&y = nodeId[gWMNodeData].y; - sub_80C2FC0(a, b, x / 2, y / 2, d, 0); + sub_80C2FC0(a, pal, x / 2, y / 2, eff, 0); } return EVC_ADVANCE_CONTINUE; @@ -1544,14 +1544,14 @@ u8 EventC1_SKIPWM(struct EventEngineProc * proc) } //! FE8U = 0x0800CC04 -u8 EventC2_(struct EventEngineProc * proc) +u8 EventC2_WmNoFade(struct EventEngineProc * proc) { gGMData.state.bits.state_7 = 1; return EVC_ADVANCE_CONTINUE; } //! FE8U = 0x0800CC18 -u8 EventC3_(struct EventEngineProc * proc) +u8 EventC3_SpawnLord(struct EventEngineProc * proc) { u16 unitId = EVT_CMD_ARGV(proc->pEventCurrent)[1]; u16 pid = EVT_CMD_ARGV(proc->pEventCurrent)[2]; @@ -1597,25 +1597,25 @@ u8 EventCF_(struct EventEngineProc * proc) } //! FE8U = 0x0800CC8C -u8 EventC4_(struct EventEngineProc * proc) +u8 EventC4_WmShowPortrait(struct EventEngineProc * proc) { - s16 a = EVT_CMD_ARGV(proc->pEventCurrent)[1]; - s16 b = EVT_CMD_ARGV(proc->pEventCurrent)[2]; - s16 c = EVT_CMD_ARGV(proc->pEventCurrent)[3]; - s16 d = EVT_CMD_ARGV(proc->pEventCurrent)[4]; + s16 face_slot = EVT_CMD_ARGV(proc->pEventCurrent)[1]; + s16 fid = EVT_CMD_ARGV(proc->pEventCurrent)[2]; + s16 config = EVT_CMD_ARGV(proc->pEventCurrent)[3]; + s16 delay = EVT_CMD_ARGV(proc->pEventCurrent)[4]; if (EVENT_IS_SKIPPING(proc)) { return EVC_ADVANCE_CONTINUE; } - if (d) + if (delay) { - sub_80BA0B4(d, 6, a, b, 0, 0, c); + WmMergeFace(delay, 6, face_slot, fid, 0, 0, config); } else { - sub_80B86CC(a, b, c); + WmDrawFace(face_slot, fid, config); } return EVC_ADVANCE_CONTINUE; @@ -1634,26 +1634,26 @@ void nullsub_32(void) } //! FE8U = 0x0800CCF0 -u8 EventC5_(struct EventEngineProc * proc) +u8 EventC5_WmClearPortrait(struct EventEngineProc * proc) { - u32 a = (u16)EVT_CMD_ARGV(proc->pEventCurrent)[0]; - u32 b = (u16)EVT_CMD_ARGV(proc->pEventCurrent)[1]; - u16 c = EVT_CMD_ARGV(proc->pEventCurrent)[2]; + u32 face_slot = (u16)EVT_CMD_ARGV(proc->pEventCurrent)[0]; + u32 config = (u16)EVT_CMD_ARGV(proc->pEventCurrent)[1]; + u16 delay = EVT_CMD_ARGV(proc->pEventCurrent)[2]; if (EVENT_IS_SKIPPING(proc)) { - EndFaceById(a); + EndFaceById(face_slot); return EVC_ADVANCE_CONTINUE; } - if (c) + if (delay) { - sub_80BA0B4(c, 7, a, 0, 0, 0, b); + WmMergeFace(delay, 7, face_slot, 0, 0, 0, config); } else { - sub_80B8844(a, b); + WmClearFace(face_slot, config); } return EVC_ADVANCE_CONTINUE; @@ -1685,7 +1685,7 @@ void sub_800CD40(struct Proc8591C68 * proc) } //! FE8U = 0x0800CD50 -u8 EventC6_(struct EventEngineProc * proc) +u8 EventC6_WmDisplayText(struct EventEngineProc * proc) { u16 a; u16 b; @@ -1716,7 +1716,7 @@ u8 EventC7_(struct EventEngineProc * proc) return EVC_ADVANCE_CONTINUE; } - sub_80C3624(1); + StartWmText(1); return EVC_ADVANCE_YIELD; } @@ -1729,21 +1729,21 @@ u8 EventC8_(struct EventEngineProc * proc) return EVC_ADVANCE_CONTINUE; } - sub_80C3624(0); + StartWmText(0); return EVC_ADVANCE_YIELD; } //! FE8U = 0x0800CDC8 -u8 EventC9_(struct EventEngineProc * proc) +u8 EventC9_RemoveWmText(struct EventEngineProc * proc) { if (EVENT_IS_SKIPPING(proc)) { - sub_80C3660(); + RemoveWmText(); return EVC_ADVANCE_CONTINUE; } - sub_80C3660(); + RemoveWmText(); return EVC_ADVANCE_YIELD; } diff --git a/src/worldmap_entry.c b/src/worldmap_entry.c index a222506e8..eb5944490 100644 --- a/src/worldmap_entry.c +++ b/src/worldmap_entry.c @@ -685,7 +685,7 @@ s8 GetGmMuEntryFlag(void) } //! FE8U = 0x080C0240 -s8 GmMuEntryStartShow(int a, int b) +s8 GmMuEntryStartShow(int speed, int blend) { struct GmapMuEntryProc * proc = Proc_Find(gProcScr_GmapMuEntry2); @@ -698,8 +698,8 @@ s8 GmMuEntryStartShow(int a, int b) proc->unk_2d = 16; proc->unk_2e = 0; proc->unk_2f = 56; - proc->unk_30 = b; - proc->unk_34 = a << 12; + proc->unk_30 = blend; + proc->unk_34 = speed << 12; proc->unk_29_0 = 1; Proc_Goto(proc, 1); diff --git a/src/worldmap_face.c b/src/worldmap_face.c index 384b9518a..01ab7b408 100644 --- a/src/worldmap_face.c +++ b/src/worldmap_face.c @@ -308,7 +308,7 @@ int GetWMFaceBlendAmt(void) { } //! FE8U = 0x080B86CC -void sub_80B86CC(int faceSlot, int faceId, u16 config) { +void WmDrawFace(int faceSlot, int faceId, u16 config) { int bg; u32 offset; @@ -383,7 +383,7 @@ void sub_80B86CC(int faceSlot, int faceId, u16 config) { } //! FE8U = 0x080B8844 -void sub_80B8844(int faceSlot, u16 config) { +void WmClearFace(int faceSlot, u16 config) { int bg; u32 offset; diff --git a/src/worldmap_main.c b/src/worldmap_main.c index ed8f68dcb..2c740dd42 100644 --- a/src/worldmap_main.c +++ b/src/worldmap_main.c @@ -1375,9 +1375,9 @@ void WorldMap_HideEverything(void) void sub_80B9A34(struct WorldMapMainProc * proc) { - if (proc->unk_2c & 4) + if (proc->timer & 4) { - proc->unk_2c &= ~0x44; + proc->timer &= ~0x44; NewFadeIn(4, 0); } @@ -1411,7 +1411,7 @@ void sub_80B9AB0(void) Sound_FadeOutBGM(4); SetDispEnable(0, 0, 0, 0, 0); sub_80B895C(); - sub_80C3660(); + RemoveWmText(); EndWMFaceCtrl(); return; } @@ -1487,7 +1487,7 @@ void sub_80B9BA4(struct WorldMapMainProc * proc) } sub_80B895C(); - sub_80C3660(); + RemoveWmText(); EndWMFaceCtrl(); EndGmMuEntry(); sub_80C2460(); @@ -1534,7 +1534,7 @@ void WorldMap_WaitForChapterIntroEvents(ProcPtr proc) SetDispEnable(0, 0, 0, 0, 0); sub_80B895C(); - sub_80C3660(); + RemoveWmText(); EndWMFaceCtrl(); EndGmMuEntry(); sub_80C2460(); @@ -1668,7 +1668,7 @@ void sub_80B9E64(void) s16 y; sub_80B895C(); - sub_80C3660(); + RemoveWmText(); EndWMFaceCtrl(); *&x = (gGMData.xCamera); @@ -1800,7 +1800,7 @@ void sub_80B9FD4(ProcPtr unused) void sub_80BA008(int unk) { struct WorldMapMainProc * proc = Proc_Find(gProcScr_WorldMapMain); - proc->unk_2c = unk; + proc->timer = unk; Proc_Goto(proc, 0); return; @@ -1835,11 +1835,11 @@ void sub_80BA06C(struct Proc8A3DD08 * proc) switch (proc->unk_30) { case 6: - sub_80B86CC(proc->unk_34, proc->unk_40, proc->unk_44); + WmDrawFace(proc->unk_34, proc->unk_40, proc->unk_44); break; case 7: - sub_80B8844(proc->unk_34, proc->unk_44); + WmClearFace(proc->unk_34, proc->unk_44); break; } @@ -1861,7 +1861,7 @@ struct ProcCmd CONST_DATA gProcScr_08A3DD08[] = // clang-format on //! FE8U = 0x080BA0B4 -void sub_80BA0B4(int timerMaybe, u8 b, int faceSlot, int fid, int e, int f, int config) +void WmMergeFace(int timerMaybe, u8 b, int faceSlot, int fid, int e, int f, int config) { struct WorldMapMainProc * parent = Proc_Find(gProcScr_WorldMapMain); @@ -2009,17 +2009,17 @@ void NewWorldMap(void) if (gPlaySt.chapterStateBits & PLAY_FLAG_POSTGAME) { - proc->unk_2c = 4; + proc->timer = 4; } else { if (gGMData.state.bits.state_1) { - proc->unk_2c = 12; + proc->timer = 12; } else { - proc->unk_2c = 16; + proc->timer = 16; } } @@ -2049,7 +2049,7 @@ void WorldMap_SetupChapterStuff(struct WorldMapMainProc * proc) if ((gGMData.state.bits.state_1) || (gPlaySt.chapterStateBits & PLAY_FLAG_POSTGAME)) { - sub_80BA008(proc->unk_2c); + sub_80BA008(proc->timer); } else { From 35f38a28fe8ac415ff3acdcb47f8edec66569629 Mon Sep 17 00:00:00 2001 From: MokhaLeee Date: Thu, 18 Jan 2024 10:55:27 +0000 Subject: [PATCH 2/3] dump all world map events --- data/data_5A92E0.s | 4 +- data/data_8B363C.s | 188 ++-- data/data_A394DC.s | 5 - data/data_events.s | 324 +++--- data/data_eventscr_wm.s | 3 - include/ea-stdlib.h | 23 +- include/eventcall.h | 134 +++ include/eventinfo.h | 93 +- include/eventscript.h | 41 +- include/variables.h | 4 +- include/worldmap.h | 2 +- ldscript.txt | 2 - scripts/dump_events.py | 133 ++- scripts/fe8db.py | 93 +- src/events/ch1-wm.h | 12 +- src/events/ch2-wm.h | 97 ++ src/events/ch3-wm.h | 88 ++ src/events/ch4-wm.h | 62 ++ src/events/ch5-wm.h | 130 +++ src/events/ch6-wm.h | 57 + src/events/ch7-wm.h | 56 + src/events/ch8-wm.h | 30 + src/events/messed-eventscr-wm.h | 1838 +++++++++++++++++++++++++++++++ src/events/prologue-wm.h | 26 +- src/events_wm.c | 17 +- src/evtcmd_gmap.c | 40 +- src/worldmap_main.c | 16 +- 27 files changed, 3154 insertions(+), 364 deletions(-) delete mode 100644 data/data_A394DC.s delete mode 100644 data/data_eventscr_wm.s create mode 100644 src/events/ch2-wm.h create mode 100644 src/events/ch3-wm.h create mode 100644 src/events/ch4-wm.h create mode 100644 src/events/ch5-wm.h create mode 100644 src/events/ch6-wm.h create mode 100644 src/events/ch7-wm.h create mode 100644 src/events/ch8-wm.h create mode 100644 src/events/messed-eventscr-wm.h diff --git a/data/data_5A92E0.s b/data/data_5A92E0.s index 6d8b5e0a1..dba505f17 100644 --- a/data/data_5A92E0.s +++ b/data/data_5A92E0.s @@ -1010,7 +1010,7 @@ gUnknown_085AA2B4: @ 0x085AA2B4 .4byte 0x10e20 .4byte 0x70228 .4byte 0x41020 - .4byte gUnknown_088B3AD8 + 0xe048 + .4byte Events_WM_ChapterIntro + 0xe048 .4byte 0x1d20 .4byte 0x1b22 .4byte 0xd40 @@ -1023,7 +1023,7 @@ gUnknown_085AA2D8: @ 0x085AA2D8 .4byte 0x10e20 .4byte 0x70228 .4byte 0x41020 - .4byte gUnknown_088B3AD8 + 0x1e048 + .4byte Events_WM_ChapterIntro + 0x1e048 .4byte 0x1d20 .4byte 0x1b22 .4byte 0xd40 diff --git a/data/data_8B363C.s b/data/data_8B363C.s index fea0cbb61..6e17aff72 100644 --- a/data/data_8B363C.s +++ b/data/data_8B363C.s @@ -240,70 +240,126 @@ gChapterDataAssetTable: @ 0x088B363C .word Ch5TownPalettePast .word Ch5TownMapPast - .global gUnknown_088B39EC -gUnknown_088B39EC: @ 0x088B39EC -@ replacing .incbin "baserom.gba", 0x008b39ec, 0xec -.4byte 0 -.4byte gUnknown_08A3974C + 0x1c -.4byte gUnknown_08A3974C + 0x5c0 -.4byte gUnknown_08A3974C + 0x5f8 -.4byte gUnknown_08A3974C + 0x7d4 -.4byte gUnknown_08A3974C + 0x970 -.4byte gUnknown_08A3974C + 0x3144 -.4byte gUnknown_08A3974C + 0xaa0 -.4byte gUnknown_08A3974C + 0xd8c -.4byte gUnknown_08A3974C + 0xe78 -.4byte gUnknown_08A3974C + 0xf64 -.4byte gUnknown_08A3974C + 0xfe4 -.4byte gUnknown_08A3974C + 0x1244 -.4byte gUnknown_08A3974C + 0x1404 -.4byte gUnknown_08A3974C + 0x1420 -.4byte gUnknown_08A3974C + 0x1564 -.4byte gUnknown_08A3974C + 0x1ddc -.4byte gUnknown_08A3974C + 0x1e48 -.4byte gUnknown_08A3974C + 0x1fec -.4byte gUnknown_08A3974C + 0x219c -.4byte gUnknown_08A3974C + 0x2318 -.4byte gUnknown_08A3974C + 0x2428 -.4byte gUnknown_08A3974C + 0x260c -.4byte gUnknown_08A3974C + 0x314c -.4byte gUnknown_08A3974C + 0x170c -.4byte gUnknown_08A3974C + 0x1940 -.4byte gUnknown_08A3974C + 0x1a8c -.4byte gUnknown_08A3974C + 0x1aa8 -.4byte gUnknown_08A3974C + 0x1b90 -.4byte gUnknown_08A3974C + 0x2628 -.4byte gUnknown_08A3974C + 0x27dc -.4byte gUnknown_08A3974C + 0x2968 -.4byte gUnknown_08A3974C + 0x2b14 -.4byte gUnknown_08A3974C + 0x2c90 -.4byte gUnknown_08A3974C + 0x2da0 -.4byte gUnknown_08A3974C + 0x2f84 -.4byte gUnknown_08A3974C + 0x3154 -.4byte gUnknown_08A3974C + 0x1d18 -.4byte gUnknown_08A3974C + 0x1d2c -.4byte gUnknown_08A3974C + 0x1d34 -.4byte gUnknown_08A3974C + 0x1d3c -.4byte gUnknown_08A3974C + 0x1d44 -.4byte gUnknown_08A3974C + 0x1d4c -.4byte gUnknown_08A3974C + 0x1d54 -.4byte gUnknown_08A3974C + 0x1d5c -.4byte gUnknown_08A3974C + 0x1d74 -.4byte gUnknown_08A3974C + 0x1d84 -.4byte gUnknown_08A3974C + 0x1d8c -.4byte gUnknown_08A3974C + 0x1d94 -.4byte gUnknown_08A3974C + 0x1d9c -.4byte gUnknown_08A3974C + 0x1da4 -.4byte gUnknown_08A3974C + 0x1dac -.4byte gUnknown_08A3974C + 0x1db4 -.4byte gUnknown_08A3974C + 0x1dbc -.4byte gUnknown_08A3974C + 0x1dc4 -.4byte gUnknown_08A3974C + 0x3114 -.4byte gUnknown_08A3974C + 0x1d10 -.4byte gUnknown_08A3974C + 0x315c -.4byte gUnknown_08A3974C + 0x3284 - - .global gUnknown_088B3AD8 -gUnknown_088B3AD8: @ 0x088B3AD8 - .incbin "baserom.gba", 0x8B3AD8, 0x8B3BC4 - 0x8B3AD8 + .global Events_WM_Beginning +Events_WM_Beginning: @ 0x088B39EC +.4byte 0x00000000 +.4byte EventScrWM_Prologue_Beginning +.4byte EventScrWM_Ch1_Beginning +.4byte EventScrWM_Ch2_Beginning +.4byte EventScrWM_Ch3_Beginning +.4byte EventScrWM_Ch4_Beginning +.4byte EventScrWM_Ch5x_Beginning +.4byte EventScrWM_Ch5_Beginning +.4byte EventScrWM_Ch6_Beginning +.4byte EventScrWM_Ch7_Beginning +.4byte EventScrWM_Ch8_Beginning +.4byte EventScrWM_Ch9a_Beginning +.4byte EventScrWM_Ch10a_Beginning +.4byte EventScrWM_Ch12a_Beginning +.4byte EventScrWM_Ch13a_Beginning +.4byte EventScrWM_Ch14a_Beginning +.4byte EventScrWM_Ch15a_Beginning +.4byte EventScrWM_Ch16a_Beginning +.4byte EventScrWM_Ch17a_Beginning +.4byte EventScrWM_Ch18a_Beginning +.4byte EventScrWM_Ch19a_Beginning +.4byte EventScrWM_Ch20a_Beginning +.4byte EventScrWM_Ch21a_Beginning +.4byte EventScrWM_Ch21ax_Beginning +.4byte EventScrWM_Ch9b_Beginning +.4byte EventScrWM_Ch10b_Beginning +.4byte EventScrWM_Ch12b_Beginning +.4byte EventScrWM_Ch13b_Beginning +.4byte EventScrWM_Ch14b_Beginning +.4byte EventScrWM_Ch15b_Beginning +.4byte EventScrWM_Ch16b_Beginning +.4byte EventScrWM_Ch17b_Beginning +.4byte EventScrWM_Ch18b_Beginning +.4byte EventScrWM_Ch19b_Beginning +.4byte EventScrWM_Ch20b_Beginning +.4byte EventScrWM_Ch21b_Beginning +.4byte EventScrWM_Ch21bx_Beginning +.4byte EventScrWM_ValniTower1_Beginning +.4byte EventScrWM_ValniTower2_Beginning +.4byte EventScrWM_ValniTower3_Beginning +.4byte EventScrWM_ValniTower4_Beginning +.4byte EventScrWM_ValniTower5_Beginning +.4byte EventScrWM_ValniTower6_Beginning +.4byte EventScrWM_ValniTower7_Beginning +.4byte EventScrWM_ValniTower8_Beginning +.4byte EventScrWM_LagdouRuins1_Beginning +.4byte EventScrWM_LagdouRuins2_Beginning +.4byte EventScrWM_LagdouRuins3_Beginning +.4byte EventScrWM_LagdouRuins4_Beginning +.4byte EventScrWM_LagdouRuins5_Beginning +.4byte EventScrWM_LagdouRuins6_Beginning +.4byte EventScrWM_LagdouRuins7_Beginning +.4byte EventScrWM_LagdouRuins8_Beginning +.4byte EventScrWM_LagdouRuins9_Beginning +.4byte EventScrWM_LagdouRuins10_Beginning +.4byte EventScrWM_CastleFrelia_Beginning +.4byte EventScrWM_MelkaenCoast_Beginning +.4byte EventScrWM_Ch11a_Beginning +.4byte EventScrWM_Ch11b_Beginning + .global Events_WM_ChapterIntro +Events_WM_ChapterIntro: @ 0x088B3AD8 +.4byte 0x00000000 +.4byte EventScrWM_Prologue_ChapterIntro +.4byte EventScrWM_Ch1_ChapterIntro +.4byte EventScrWM_Ch2_ChapterIntro +.4byte EventScrWM_Ch3_ChapterIntro +.4byte EventScrWM_Ch4_ChapterIntro +.4byte EventScrWM_Ch5x_ChapterIntro +.4byte EventScrWM_Ch5_ChapterIntro +.4byte EventScrWM_Ch6_ChapterIntro +.4byte EventScrWM_Ch7_ChapterIntro +.4byte EventScrWM_Ch8_ChapterIntro +.4byte EventScrWM_Ch9a_ChapterIntro +.4byte EventScrWM_08A3A9EC +.4byte EventScrWM_08A3AB68 +.4byte EventScrWM_08A3ABC8 +.4byte EventScrWM_08A3AD40 +.4byte EventScrWM_08A3B58C +.4byte EventScrWM_08A3B678 +.4byte EventScrWM_08A3B808 +.4byte EventScrWM_08A3B944 +.4byte EventScrWM_08A3BAC0 +.4byte EventScrWM_08A3BC8C +.4byte EventScrWM_08A3BD70 +.4byte EventScrWM_08A3C89C +.4byte EventScrWM_08A3AF30 +.4byte EventScrWM_08A3B10C +.4byte EventScrWM_08A3B1F0 +.4byte EventScrWM_08A3B250 +.4byte EventScrWM_08A3B338 +.4byte EventScrWM_08A3BE14 +.4byte EventScrWM_08A3BFF4 +.4byte EventScrWM_08A3C184 +.4byte EventScrWM_08A3C2BC +.4byte EventScrWM_08A3C438 +.4byte EventScrWM_08A3C604 +.4byte EventScrWM_08A3C6E8 +.4byte EventScrWM_08A3C8A4 +.4byte EventScrWM_08A3B46C +.4byte EventScrWM_08A3B47C +.4byte EventScrWM_08A3B484 +.4byte EventScrWM_08A3B48C +.4byte EventScrWM_08A3B494 +.4byte EventScrWM_08A3B49C +.4byte EventScrWM_08A3B4A4 +.4byte EventScrWM_08A3B4AC +.4byte EventScrWM_08A3B4C4 +.4byte EventScrWM_08A3B4D4 +.4byte EventScrWM_08A3B4DC +.4byte EventScrWM_08A3B4E4 +.4byte EventScrWM_08A3B4EC +.4byte EventScrWM_08A3B4F4 +.4byte EventScrWM_08A3B4FC +.4byte EventScrWM_08A3B504 +.4byte EventScrWM_08A3B50C +.4byte EventScrWM_08A3B514 +.4byte EventScrWM_08A3C888 +.4byte EventScrWM_08A3B460 +.4byte EventScrWM_08A3C904 +.4byte EventScrWM_08A3CA2C diff --git a/data/data_A394DC.s b/data/data_A394DC.s deleted file mode 100644 index ea07b1e3b..000000000 --- a/data/data_A394DC.s +++ /dev/null @@ -1,5 +0,0 @@ - .section .data - - .global gUnknown_08A3974C -gUnknown_08A3974C: @ 0x08A3974C - .incbin "baserom.gba", 0xA3974C, 0xA39768 - 0xA3974C diff --git a/data/data_events.s b/data/data_events.s index 603ed92a1..94b9868c5 100644 --- a/data/data_events.s +++ b/data/data_events.s @@ -234,14 +234,14 @@ Ch4Events: @0x89e8b20 .4byte gFlagBitMaskLut + 0x5a0 .4byte gUnknown_089ED6AC + 0x303 .4byte gUnknown_089ED6AC + 0x7f4 - .4byte gUnknown_088B3AD8 + 0xe2c - .4byte gUnknown_088B3AD8 + 0xe2c - .4byte gUnknown_088B3AD8 + 0x12dc - .4byte gUnknown_088B3AD8 + 0x1548 - .4byte gUnknown_088B3AD8 + 0x17b4 - .4byte gUnknown_088B3AD8 + 0x1390 - .4byte gUnknown_088B3AD8 + 0x15fc - .4byte gUnknown_088B3AD8 + 0x1868 + .4byte Events_WM_ChapterIntro + 0xe2c + .4byte Events_WM_ChapterIntro + 0xe2c + .4byte Events_WM_ChapterIntro + 0x12dc + .4byte Events_WM_ChapterIntro + 0x1548 + .4byte Events_WM_ChapterIntro + 0x17b4 + .4byte Events_WM_ChapterIntro + 0x1390 + .4byte Events_WM_ChapterIntro + 0x15fc + .4byte Events_WM_ChapterIntro + 0x1868 .4byte gUnknown_089EEA28 + 0x2d7c .4byte gUnknown_089EEA28 + 0x2fd0 .4byte 0x00000002 @@ -314,8 +314,8 @@ Ch5EventData: @0x89e8c54 .4byte gFlagBitMaskLut + 0x6d4 .4byte gUnknown_089ED6AC + 0x304 .4byte gUnknown_089ED6AC + 0x7f5 - .4byte gUnknown_088B3AD8 + 0x1b58 - .4byte gUnknown_088B3AD8 + 0x1b58 + .4byte Events_WM_ChapterIntro + 0x1b58 + .4byte Events_WM_ChapterIntro + 0x1b58 .4byte 0x00000000 .4byte 0x00000000 .4byte 0x00000000 @@ -364,8 +364,8 @@ Ch5XEvents: @0x89e8d0c .4byte gFlagBitMaskLut + 0x78c .4byte gUnknown_089ED6AC + 0x305 .4byte gUnknown_089ED6AC + 0x7f6 - .4byte gUnknown_088B3AD8 + 0x1f8c - .4byte gUnknown_088B3AD8 + 0x1f8c + .4byte Events_WM_ChapterIntro + 0x1f8c + .4byte Events_WM_ChapterIntro + 0x1f8c .4byte 0x00000000 .4byte 0x00000000 .4byte 0x00000000 @@ -413,14 +413,14 @@ Ch6Events: @0x89e8dc4 .4byte gFlagBitMaskLut + 0x844 .4byte gUnknown_089ED6AC + 0x30a .4byte gUnknown_089ED6AC + 0x7fb - .4byte gUnknown_088B3AD8 + 0x2900 - .4byte gUnknown_088B3AD8 + 0x2900 - .4byte gUnknown_088B3AD8 + 0x2a68 - .4byte gUnknown_088B3AD8 + 0x2d60 - .4byte gUnknown_088B3AD8 + 0x3058 - .4byte gUnknown_088B3AD8 + 0x2b30 - .4byte gUnknown_088B3AD8 + 0x2e28 - .4byte gUnknown_088B3AD8 + 0x3120 + .4byte Events_WM_ChapterIntro + 0x2900 + .4byte Events_WM_ChapterIntro + 0x2900 + .4byte Events_WM_ChapterIntro + 0x2a68 + .4byte Events_WM_ChapterIntro + 0x2d60 + .4byte Events_WM_ChapterIntro + 0x3058 + .4byte Events_WM_ChapterIntro + 0x2b30 + .4byte Events_WM_ChapterIntro + 0x2e28 + .4byte Events_WM_ChapterIntro + 0x3120 .4byte gUnknown_089EEA28 + 0x3cf0 .4byte gUnknown_089EEA28 + 0x3fd4 .4byte 0x00000002 @@ -459,8 +459,8 @@ Ch7EventData: @0x89e8e70 .4byte gFlagBitMaskLut + 0x8f0 .4byte gUnknown_089ED6AC + 0x30b .4byte gUnknown_089ED6AC + 0x7fc - .4byte gUnknown_088B3AD8 + 0x33a0 - .4byte gUnknown_088B3AD8 + 0x33a0 + .4byte Events_WM_ChapterIntro + 0x33a0 + .4byte Events_WM_ChapterIntro + 0x33a0 .4byte 0x00000000 .4byte 0x00000000 .4byte 0x00000000 @@ -555,8 +555,8 @@ Ch8EventData: @0x89e8fe4 .4byte gFlagBitMaskLut + 0xa64 .4byte gUnknown_089ED6AC + 0x319 .4byte gUnknown_089ED6AC + 0x7fe - .4byte gUnknown_088B3AD8 + 0x3828 - .4byte gUnknown_088B3AD8 + 0x3828 + .4byte Events_WM_ChapterIntro + 0x3828 + .4byte Events_WM_ChapterIntro + 0x3828 .4byte 0x00000000 .4byte 0x00000000 .4byte 0x00000000 @@ -645,8 +645,8 @@ Ch9EirikaEvents: @0x89e9140 .4byte gFlagBitMaskLut + 0xbc0 .4byte gUnknown_089ED6AC + 0x31c .4byte gUnknown_089ED6AC + 0x801 - .4byte gUnknown_088B3AD8 + 0x4134 - .4byte gUnknown_088B3AD8 + 0x4134 + .4byte Events_WM_ChapterIntro + 0x4134 + .4byte Events_WM_ChapterIntro + 0x4134 .4byte 0x00000000 .4byte 0x00000000 .4byte 0x00000000 @@ -740,14 +740,14 @@ Ch10EirikaEvents: @0x89e92b0 .4byte gFlagBitMaskLut + 0xd30 .4byte gUnknown_089ED6AC + 0x31f .4byte gUnknown_089ED6AC + 0x804 - .4byte gUnknown_088B3AD8 + 0x4a68 - .4byte gUnknown_088B3AD8 + 0x4a68 - .4byte gUnknown_088B3AD8 + 0x51d4 - .4byte gUnknown_088B3AD8 + 0x54f4 - .4byte gUnknown_088B3AD8 + 0x5814 - .4byte gUnknown_088B3AD8 + 0x529c - .4byte gUnknown_088B3AD8 + 0x55bc - .4byte gUnknown_088B3AD8 + 0x58dc + .4byte Events_WM_ChapterIntro + 0x4a68 + .4byte Events_WM_ChapterIntro + 0x4a68 + .4byte Events_WM_ChapterIntro + 0x51d4 + .4byte Events_WM_ChapterIntro + 0x54f4 + .4byte Events_WM_ChapterIntro + 0x5814 + .4byte Events_WM_ChapterIntro + 0x529c + .4byte Events_WM_ChapterIntro + 0x55bc + .4byte Events_WM_ChapterIntro + 0x58dc .4byte MenuDef_RouteSplit + 0xafc .4byte MenuDef_RouteSplit + 0xd58 .4byte 0x00000002 @@ -827,8 +827,8 @@ Ch11EirikaEvents: @0x89e9400 .4byte gFlagBitMaskLut + 0xe80 .4byte gUnknown_089ED6AC + 0x333 .4byte gUnknown_089ED6AC + 0x806 - .4byte gUnknown_088B3AD8 + 0x5dbc - .4byte gUnknown_088B3AD8 + 0x5dbc + .4byte Events_WM_ChapterIntro + 0x5dbc + .4byte Events_WM_ChapterIntro + 0x5dbc .4byte 0x00000000 .4byte 0x00000000 .4byte 0x00000000 @@ -888,8 +888,8 @@ Ch12EirikaEventData: @0x89e94e8 .4byte gFlagBitMaskLut + 0xf68 .4byte gUnknown_089ED6AC + 0x335 .4byte gUnknown_089ED6AC + 0x808 - .4byte gUnknown_088B3AD8 + 0x6698 - .4byte gUnknown_088B3AD8 + 0x6698 + .4byte Events_WM_ChapterIntro + 0x6698 + .4byte Events_WM_ChapterIntro + 0x6698 .4byte 0x00000000 .4byte 0x00000000 .4byte 0x00000000 @@ -955,14 +955,14 @@ Ch13EirikaEvents: @0x89e95e8 .4byte gFlagBitMaskLut + 0x1068 .4byte gUnknown_089ED6AC + 0x336 .4byte gUnknown_089ED6AC + 0x809 - .4byte gUnknown_088B3AD8 + 0x6e70 - .4byte gUnknown_088B3AD8 + 0x6e70 - .4byte gUnknown_088B3AD8 + 0x7640 - .4byte gUnknown_088B3AD8 + 0x78fc - .4byte gUnknown_088B3AD8 + 0x7bb8 - .4byte gUnknown_088B3AD8 + 0x7708 - .4byte gUnknown_088B3AD8 + 0x79c4 - .4byte gUnknown_088B3AD8 + 0x7c80 + .4byte Events_WM_ChapterIntro + 0x6e70 + .4byte Events_WM_ChapterIntro + 0x6e70 + .4byte Events_WM_ChapterIntro + 0x7640 + .4byte Events_WM_ChapterIntro + 0x78fc + .4byte Events_WM_ChapterIntro + 0x7bb8 + .4byte Events_WM_ChapterIntro + 0x7708 + .4byte Events_WM_ChapterIntro + 0x79c4 + .4byte Events_WM_ChapterIntro + 0x7c80 .4byte MenuDef_RouteSplit + 0x1e8c .4byte MenuDef_RouteSplit + 0x20f8 .4byte 0x00000002 @@ -1072,8 +1072,8 @@ Ch14EirikaEvents: @0x89e97b0 .4byte gFlagBitMaskLut + 0x1230 .4byte gUnknown_089ED6AC + 0x34c .4byte gUnknown_089ED6AC + 0x80d - .4byte gUnknown_088B3AD8 + 0x80d0 - .4byte gUnknown_088B3AD8 + 0x80d0 + .4byte Events_WM_ChapterIntro + 0x80d0 + .4byte Events_WM_ChapterIntro + 0x80d0 .4byte 0x00000000 .4byte 0x00000000 .4byte 0x00000000 @@ -1223,8 +1223,8 @@ Ch15EirikaEvents: @0x89e9a00 .4byte gFlagBitMaskLut + 0x1480 .4byte gUnknown_089ED6AC + 0x350 .4byte gUnknown_089ED6AC + 0x811 - .4byte gUnknown_088B3AD8 + 0x8b38 - .4byte gUnknown_088B3AD8 + 0x8b38 + .4byte Events_WM_ChapterIntro + 0x8b38 + .4byte Events_WM_ChapterIntro + 0x8b38 .4byte 0x00000000 .4byte 0x00000000 .4byte 0x00000000 @@ -1296,8 +1296,8 @@ Ch16EirEvents: @0x89e9b18 .4byte gFlagBitMaskLut + 0x1598 .4byte gUnknown_089ED6AC + 0x351 .4byte gUnknown_089ED6AC + 0x812 - .4byte gUnknown_088B3AD8 + 0x9380 - .4byte gUnknown_088B3AD8 + 0x9380 + .4byte Events_WM_ChapterIntro + 0x9380 + .4byte Events_WM_ChapterIntro + 0x9380 .4byte 0x00000000 .4byte 0x00000000 .4byte 0x00000000 @@ -1402,14 +1402,14 @@ Ch17EirikaEvents: @0x89e9cb4 .4byte gFlagBitMaskLut + 0x1734 .4byte gUnknown_089ED6AC + 0x357 .4byte gUnknown_089ED6AC + 0x818 - .4byte gUnknown_088B3AD8 + 0xa380 - .4byte gUnknown_088B3AD8 + 0xa380 - .4byte gUnknown_088B3AD8 + 0xaad8 - .4byte gUnknown_088B3AD8 + 0xadf8 - .4byte gUnknown_088B3AD8 + 0xb118 - .4byte gUnknown_088B3AD8 + 0xaba0 - .4byte gUnknown_088B3AD8 + 0xaec0 - .4byte gUnknown_088B3AD8 + 0xb1e0 + .4byte Events_WM_ChapterIntro + 0xa380 + .4byte Events_WM_ChapterIntro + 0xa380 + .4byte Events_WM_ChapterIntro + 0xaad8 + .4byte Events_WM_ChapterIntro + 0xadf8 + .4byte Events_WM_ChapterIntro + 0xb118 + .4byte Events_WM_ChapterIntro + 0xaba0 + .4byte Events_WM_ChapterIntro + 0xaec0 + .4byte Events_WM_ChapterIntro + 0xb1e0 .4byte MenuDef_RouteSplit + 0x3f68 .4byte MenuDef_RouteSplit + 0x4324 .4byte 0x00000002 @@ -1466,14 +1466,14 @@ Ch18EirikaEvents: @0x89e9da8 .4byte gFlagBitMaskLut + 0x1828 .4byte gUnknown_089ED6AC + 0x358 .4byte gUnknown_089ED6AC + 0x819 - .4byte gUnknown_088B3AD8 + 0xb510 - .4byte gUnknown_088B3AD8 + 0xb510 - .4byte gUnknown_088B3AD8 + 0xbbdc - .4byte gUnknown_088B3AD8 + 0xbf88 - .4byte gUnknown_088B3AD8 + 0xc334 - .4byte gUnknown_088B3AD8 + 0xbc90 - .4byte gUnknown_088B3AD8 + 0xc03c - .4byte gUnknown_088B3AD8 + 0xc3e8 + .4byte Events_WM_ChapterIntro + 0xb510 + .4byte Events_WM_ChapterIntro + 0xb510 + .4byte Events_WM_ChapterIntro + 0xbbdc + .4byte Events_WM_ChapterIntro + 0xbf88 + .4byte Events_WM_ChapterIntro + 0xc334 + .4byte Events_WM_ChapterIntro + 0xbc90 + .4byte Events_WM_ChapterIntro + 0xc03c + .4byte Events_WM_ChapterIntro + 0xc3e8 .4byte MenuDef_RouteSplit + 0x479c .4byte MenuDef_RouteSplit + 0x48e8 .4byte 0x00030002 @@ -1557,8 +1557,8 @@ Ch19EirikaEvents: @0x89e9f08 .4byte gFlagBitMaskLut + 0x1988 .4byte gUnknown_089ED6AC + 0x4bb .4byte gUnknown_089ED6AC + 0x81a - .4byte gUnknown_088B3AD8 + 0xc7b8 - .4byte gUnknown_088B3AD8 + 0xc7b8 + .4byte Events_WM_ChapterIntro + 0xc7b8 + .4byte Events_WM_ChapterIntro + 0xc7b8 .4byte 0x00000000 .4byte 0x00000000 .4byte 0x00000000 @@ -1633,8 +1633,8 @@ Ch20EirikaEvents: @0x89ea02c .4byte gFlagBitMaskLut + 0x1aac .4byte gUnknown_089ED6AC + 0x4bd .4byte gUnknown_089ED6AC + 0x81c - .4byte gUnknown_088B3AD8 + 0xd29c - .4byte gUnknown_088B3AD8 + 0xd29c + .4byte Events_WM_ChapterIntro + 0xd29c + .4byte Events_WM_ChapterIntro + 0xd29c .4byte 0x00000000 .4byte 0x00000000 .4byte 0x00000000 @@ -1703,8 +1703,8 @@ FinalEirikaEvents1: @0x89ea138 .4byte gFlagBitMaskLut + 0x1bb8 .4byte gUnknown_089ED6AC + 0x4bf .4byte gUnknown_089ED6AC + 0x81e - .4byte gUnknown_088B3AD8 + 0xdd44 - .4byte gUnknown_088B3AD8 + 0xdd44 + .4byte Events_WM_ChapterIntro + 0xdd44 + .4byte Events_WM_ChapterIntro + 0xdd44 .4byte 0x00000000 .4byte 0x00000000 .4byte 0x00000000 @@ -1740,8 +1740,8 @@ FinalEirikaEvents2: @0x89ea1c0 .4byte gFlagBitMaskLut + 0x1c40 .4byte gUnknown_089ED6AC + 0x4c0 .4byte gUnknown_089ED6AC + 0x81f - .4byte gUnknown_088B3AD8 + 0xe46c - .4byte gUnknown_088B3AD8 + 0xe46c + .4byte Events_WM_ChapterIntro + 0xe46c + .4byte Events_WM_ChapterIntro + 0xe46c .4byte 0x00000000 .4byte 0x00000000 .4byte 0x00000000 @@ -1841,8 +1841,8 @@ Ch9Events: @0x89ea348 .4byte gFlagBitMaskLut + 0x1dc8 .4byte gUnknown_089ED6AC + 0x4c1 .4byte gUnknown_089ED6AC + 0x820 - .4byte gUnknown_088B3AD8 + 0xe7f0 - .4byte gUnknown_088B3AD8 + 0xe7f0 + .4byte Events_WM_ChapterIntro + 0xe7f0 + .4byte Events_WM_ChapterIntro + 0xe7f0 .4byte 0x00000000 .4byte 0x00000000 .4byte 0x00000000 @@ -1932,14 +1932,14 @@ Ch10EphraimEvents: @0x89ea4a8 .4byte gFlagBitMaskLut + 0x1f28 .4byte gUnknown_089ED6AC + 0x4c4 .4byte gUnknown_089ED6AC + 0x823 - .4byte gUnknown_088B3AD8 + 0xf17c - .4byte gUnknown_088B3AD8 + 0xf17c - .4byte gUnknown_088B3AD8 + 0xf974 - .4byte gUnknown_088B3AD8 + 0xfc1c - .4byte gUnknown_088B3AD8 + 0xfec4 - .4byte gUnknown_088B3AD8 + 0xfa3c - .4byte gUnknown_088B3AD8 + 0xfce4 - .4byte gUnknown_088B3AD8 + 0xff8c + .4byte Events_WM_ChapterIntro + 0xf17c + .4byte Events_WM_ChapterIntro + 0xf17c + .4byte Events_WM_ChapterIntro + 0xf974 + .4byte Events_WM_ChapterIntro + 0xfc1c + .4byte Events_WM_ChapterIntro + 0xfec4 + .4byte Events_WM_ChapterIntro + 0xfa3c + .4byte Events_WM_ChapterIntro + 0xfce4 + .4byte Events_WM_ChapterIntro + 0xff8c .4byte MenuDef_RouteSplit + 0x7180 .4byte MenuDef_RouteSplit + 0x7580 .4byte 0x00000002 @@ -2004,8 +2004,8 @@ Ch11EphraimEvents: @0x89ea5bc .4byte gFlagBitMaskLut + 0x203c .4byte gUnknown_089ED6AC + 0x4c6 .4byte gUnknown_089ED6AC + 0x825 - .4byte gUnknown_088B3AD8 + 0x10378 - .4byte gUnknown_088B3AD8 + 0x10378 + .4byte Events_WM_ChapterIntro + 0x10378 + .4byte Events_WM_ChapterIntro + 0x10378 .4byte 0x00000000 .4byte 0x00000000 .4byte 0x00000000 @@ -2075,8 +2075,8 @@ Ch12EphraimEvents: @0x89ea6cc .4byte gFlagBitMaskLut + 0x214c .4byte gUnknown_089ED6AC + 0x4c8 .4byte gUnknown_089ED6AC + 0x827 - .4byte gUnknown_088B3AD8 + 0x10be0 - .4byte gUnknown_088B3AD8 + 0x10be0 + .4byte Events_WM_ChapterIntro + 0x10be0 + .4byte Events_WM_ChapterIntro + 0x10be0 .4byte 0x00000000 .4byte 0x00000000 .4byte 0x00000000 @@ -2175,14 +2175,14 @@ Ch13EphraimEventData: @0x89ea850 .4byte gFlagBitMaskLut + 0x22d0 .4byte gUnknown_089ED6AC + 0x4c9 .4byte gUnknown_089ED6AC + 0x828 - .4byte gUnknown_088B3AD8 + 0x113dc - .4byte gUnknown_088B3AD8 + 0x113dc - .4byte gUnknown_088B3AD8 + 0x11af8 - .4byte gUnknown_088B3AD8 + 0x11e04 - .4byte gUnknown_088B3AD8 + 0x12110 - .4byte gUnknown_088B3AD8 + 0x11bc0 - .4byte gUnknown_088B3AD8 + 0x11ecc - .4byte gUnknown_088B3AD8 + 0x121d8 + .4byte Events_WM_ChapterIntro + 0x113dc + .4byte Events_WM_ChapterIntro + 0x113dc + .4byte Events_WM_ChapterIntro + 0x11af8 + .4byte Events_WM_ChapterIntro + 0x11e04 + .4byte Events_WM_ChapterIntro + 0x12110 + .4byte Events_WM_ChapterIntro + 0x11bc0 + .4byte Events_WM_ChapterIntro + 0x11ecc + .4byte Events_WM_ChapterIntro + 0x121d8 .4byte MenuDef_RouteSplit + 0x8358 .4byte MenuDef_RouteSplit + 0x856c .4byte 0x00000002 @@ -2337,8 +2337,8 @@ Ch14EphraimEventData: @0x89eaacc .4byte gFlagBitMaskLut + 0x254c .4byte gUnknown_089ED6AC + 0x4ca .4byte gUnknown_089ED6AC + 0x829 - .4byte gUnknown_088B3AD8 + 0x124e4 - .4byte gUnknown_088B3AD8 + 0x124e4 + .4byte Events_WM_ChapterIntro + 0x124e4 + .4byte Events_WM_ChapterIntro + 0x124e4 .4byte 0x00000000 .4byte 0x00000000 .4byte 0x00000000 @@ -2477,8 +2477,8 @@ Ch15EphraimEventData: @0x89eacf0 .4byte gFlagBitMaskLut + 0x2770 .4byte gUnknown_089ED6AC + 0x4ce .4byte gUnknown_089ED6AC + 0x82d - .4byte gUnknown_088B3AD8 + 0x1333c - .4byte gUnknown_088B3AD8 + 0x1333c + .4byte Events_WM_ChapterIntro + 0x1333c + .4byte Events_WM_ChapterIntro + 0x1333c .4byte 0x00000000 .4byte 0x00000000 .4byte 0x00000000 @@ -2559,8 +2559,8 @@ Ch16EphraimEventData: @0x89eae2c .4byte gFlagBitMaskLut + 0x28ac .4byte gUnknown_089ED6AC + 0x4cf .4byte gUnknown_089ED6AC + 0x82e - .4byte gUnknown_088B3AD8 + 0x13b70 - .4byte gUnknown_088B3AD8 + 0x13b70 + .4byte Events_WM_ChapterIntro + 0x13b70 + .4byte Events_WM_ChapterIntro + 0x13b70 .4byte 0x00000000 .4byte 0x00000000 .4byte 0x00000000 @@ -2665,14 +2665,14 @@ Ch17EphraimEventData: @0x89eafc8 .4byte gFlagBitMaskLut + 0x2a48 .4byte gUnknown_089ED6AC + 0x4d0 .4byte gUnknown_089ED6AC + 0x82f - .4byte gUnknown_088B3AD8 + 0x141c4 - .4byte gUnknown_088B3AD8 + 0x141c4 - .4byte gUnknown_088B3AD8 + 0x14610 - .4byte gUnknown_088B3AD8 + 0x14930 - .4byte gUnknown_088B3AD8 + 0x14c50 - .4byte gUnknown_088B3AD8 + 0x146d8 - .4byte gUnknown_088B3AD8 + 0x149f8 - .4byte gUnknown_088B3AD8 + 0x14d18 + .4byte Events_WM_ChapterIntro + 0x141c4 + .4byte Events_WM_ChapterIntro + 0x141c4 + .4byte Events_WM_ChapterIntro + 0x14610 + .4byte Events_WM_ChapterIntro + 0x14930 + .4byte Events_WM_ChapterIntro + 0x14c50 + .4byte Events_WM_ChapterIntro + 0x146d8 + .4byte Events_WM_ChapterIntro + 0x149f8 + .4byte Events_WM_ChapterIntro + 0x14d18 .4byte MenuDef_RouteSplit + 0x9824 .4byte MenuDef_RouteSplit + 0x983c .4byte 0x00000002 @@ -2729,14 +2729,14 @@ Ch18EphraimEventData: @0x89eb0bc .4byte gFlagBitMaskLut + 0x2b3c .4byte gUnknown_089ED6AC + 0x4d1 .4byte gUnknown_089ED6AC + 0x830 - .4byte gUnknown_088B3AD8 + 0x15000 - .4byte gUnknown_088B3AD8 + 0x15000 - .4byte gUnknown_088B3AD8 + 0x1562c - .4byte gUnknown_088B3AD8 + 0x159d8 - .4byte gUnknown_088B3AD8 + 0x15d84 - .4byte gUnknown_088B3AD8 + 0x156e0 - .4byte gUnknown_088B3AD8 + 0x15a8c - .4byte gUnknown_088B3AD8 + 0x15e38 + .4byte Events_WM_ChapterIntro + 0x15000 + .4byte Events_WM_ChapterIntro + 0x15000 + .4byte Events_WM_ChapterIntro + 0x1562c + .4byte Events_WM_ChapterIntro + 0x159d8 + .4byte Events_WM_ChapterIntro + 0x15d84 + .4byte Events_WM_ChapterIntro + 0x156e0 + .4byte Events_WM_ChapterIntro + 0x15a8c + .4byte Events_WM_ChapterIntro + 0x15e38 .4byte MenuDef_RouteSplit + 0x9988 .4byte MenuDef_RouteSplit + 0x99c8 .4byte 0x00030002 @@ -2820,8 +2820,8 @@ Ch19EphraimEventData: @0x89eb21c .4byte gFlagBitMaskLut + 0x2c9c .4byte gUnknown_089ED6AC + 0x634 .4byte gUnknown_089ED6AC + 0x831 - .4byte gUnknown_088B3AD8 + 0x161d8 - .4byte gUnknown_088B3AD8 + 0x161d8 + .4byte Events_WM_ChapterIntro + 0x161d8 + .4byte Events_WM_ChapterIntro + 0x161d8 .4byte 0x00000000 .4byte 0x00000000 .4byte 0x00000000 @@ -2896,8 +2896,8 @@ Ch20EphraimEventData: @0x89eb340 .4byte gFlagBitMaskLut + 0x2dc0 .4byte gUnknown_089ED6AC + 0x635 .4byte gUnknown_089ED6AC + 0x832 - .4byte gUnknown_088B3AD8 + 0x16b64 - .4byte gUnknown_088B3AD8 + 0x16b64 + .4byte Events_WM_ChapterIntro + 0x16b64 + .4byte Events_WM_ChapterIntro + 0x16b64 .4byte 0x00000000 .4byte 0x00000000 .4byte 0x00000000 @@ -2966,8 +2966,8 @@ FinalEphraimEvents1: @0x89eb44c .4byte gFlagBitMaskLut + 0x2ecc .4byte gUnknown_089ED6AC + 0x636 .4byte gUnknown_089ED6AC + 0x833 - .4byte gUnknown_088B3AD8 + 0x17588 - .4byte gUnknown_088B3AD8 + 0x17588 + .4byte Events_WM_ChapterIntro + 0x17588 + .4byte Events_WM_ChapterIntro + 0x17588 .4byte 0x00000000 .4byte 0x00000000 .4byte 0x00000000 @@ -3003,8 +3003,8 @@ FinalEphraimEvents2: @0x89eb4d4 .4byte gFlagBitMaskLut + 0x2f54 .4byte gUnknown_089ED6AC + 0x637 .4byte gUnknown_089ED6AC + 0x834 - .4byte gUnknown_088B3AD8 + 0x17bc8 - .4byte gUnknown_088B3AD8 + 0x17bc8 + .4byte Events_WM_ChapterIntro + 0x17bc8 + .4byte Events_WM_ChapterIntro + 0x17bc8 .4byte 0x00000000 .4byte 0x00000000 .4byte 0x00000000 @@ -3046,8 +3046,8 @@ TowerOfValni1Events: @0x89eb574 .4byte gFlagBitMaskLut + 0x2ff4 .4byte gUnknown_089ED6AC + 0x638 .4byte gUnknown_089ED6AC + 0x835 - .4byte gUnknown_088B3AD8 + 0x17bf0 - .4byte gUnknown_088B3AD8 + 0x17bf0 + .4byte Events_WM_ChapterIntro + 0x17bf0 + .4byte Events_WM_ChapterIntro + 0x17bf0 .4byte 0x00000000 .4byte 0x00000000 .4byte 0x00000000 @@ -3089,8 +3089,8 @@ TowerOfValni2Events: @0x89eb614 .4byte gFlagBitMaskLut + 0x3094 .4byte gUnknown_089ED6AC + 0x639 .4byte gUnknown_089ED6AC + 0x836 - .4byte gUnknown_088B3AD8 + 0x17e40 - .4byte gUnknown_088B3AD8 + 0x17e40 + .4byte Events_WM_ChapterIntro + 0x17e40 + .4byte Events_WM_ChapterIntro + 0x17e40 .4byte 0x00000000 .4byte 0x00000000 .4byte 0x00000000 @@ -3129,8 +3129,8 @@ TowerOfValni3Events: @0x89eb6a8 .4byte gFlagBitMaskLut + 0x3128 .4byte gUnknown_089ED6AC + 0x63a .4byte gUnknown_089ED6AC + 0x837 - .4byte gUnknown_088B3AD8 + 0x18160 - .4byte gUnknown_088B3AD8 + 0x18160 + .4byte Events_WM_ChapterIntro + 0x18160 + .4byte Events_WM_ChapterIntro + 0x18160 .4byte 0x00000000 .4byte 0x00000000 .4byte 0x00000000 @@ -3166,8 +3166,8 @@ TowerOfValni4Events: @0x89eb730 .4byte gFlagBitMaskLut + 0x31b0 .4byte gUnknown_089ED6AC + 0x63b .4byte gUnknown_089ED6AC + 0x838 - .4byte gUnknown_088B3AD8 + 0x1844c - .4byte gUnknown_088B3AD8 + 0x1844c + .4byte Events_WM_ChapterIntro + 0x1844c + .4byte Events_WM_ChapterIntro + 0x1844c .4byte 0x00000000 .4byte 0x00000000 .4byte 0x00000000 @@ -3212,8 +3212,8 @@ TowerOfValni5Events: @0x89eb7dc .4byte gFlagBitMaskLut + 0x325c .4byte gUnknown_089ED6AC + 0x63c .4byte gUnknown_089ED6AC + 0x839 - .4byte gUnknown_088B3AD8 + 0x186b8 - .4byte gUnknown_088B3AD8 + 0x186b8 + .4byte Events_WM_ChapterIntro + 0x186b8 + .4byte Events_WM_ChapterIntro + 0x186b8 .4byte 0x00000000 .4byte 0x00000000 .4byte 0x00000000 @@ -3261,8 +3261,8 @@ TowerOfValni6Events: @0x89eb894 .4byte gFlagBitMaskLut + 0x3314 .4byte gUnknown_089ED6AC + 0x63d .4byte gUnknown_089ED6AC + 0x83a - .4byte gUnknown_088B3AD8 + 0x18af0 - .4byte gUnknown_088B3AD8 + 0x18af0 + .4byte Events_WM_ChapterIntro + 0x18af0 + .4byte Events_WM_ChapterIntro + 0x18af0 .4byte 0x00000000 .4byte 0x00000000 .4byte 0x00000000 @@ -3322,8 +3322,8 @@ TowerOfValni7Events: @0x89eb97c .4byte gFlagBitMaskLut + 0x33fc .4byte gUnknown_089ED6AC + 0x63e .4byte gUnknown_089ED6AC + 0x83b - .4byte gUnknown_088B3AD8 + 0x18ee0 - .4byte gUnknown_088B3AD8 + 0x18ee0 + .4byte Events_WM_ChapterIntro + 0x18ee0 + .4byte Events_WM_ChapterIntro + 0x18ee0 .4byte 0x00000000 .4byte 0x00000000 .4byte 0x00000000 @@ -3362,8 +3362,8 @@ TowerOfValni8Events: @0x89eba10 .4byte gFlagBitMaskLut + 0x3490 .4byte gUnknown_089ED6AC + 0x63f .4byte gUnknown_089ED6AC + 0x83c - .4byte gUnknown_088B3AD8 + 0x192dc - .4byte gUnknown_088B3AD8 + 0x192dc + .4byte Events_WM_ChapterIntro + 0x192dc + .4byte Events_WM_ChapterIntro + 0x192dc .4byte 0x00000000 .4byte 0x00000000 .4byte 0x00000000 @@ -3417,8 +3417,8 @@ LagdouRuins1Event: @0x89ebae0 .4byte gFlagBitMaskLut + 0x3560 .4byte gUnknown_089ED6AC + 0x64c .4byte gUnknown_089ED6AC + 0x83d - .4byte gUnknown_088B3AD8 + 0x195e8 - .4byte gUnknown_088B3AD8 + 0x195e8 + .4byte Events_WM_ChapterIntro + 0x195e8 + .4byte Events_WM_ChapterIntro + 0x195e8 .4byte 0x00000000 .4byte 0x00000000 .4byte 0x00000000 @@ -3460,8 +3460,8 @@ LagdouRuins2Event: @0x89ebb80 .4byte gFlagBitMaskLut + 0x3600 .4byte gUnknown_089ED6AC + 0x64d .4byte gUnknown_089ED6AC + 0x83e - .4byte gUnknown_088B3AD8 + 0x19a5c - .4byte gUnknown_088B3AD8 + 0x19a5c + .4byte Events_WM_ChapterIntro + 0x19a5c + .4byte Events_WM_ChapterIntro + 0x19a5c .4byte 0x00000000 .4byte 0x00000000 .4byte 0x00000000 @@ -3536,8 +3536,8 @@ LagdouRuins3Event: @0x89ebca4 .4byte gFlagBitMaskLut + 0x3724 .4byte gUnknown_089ED6AC + 0x64e .4byte gUnknown_089ED6AC + 0x83f - .4byte gUnknown_088B3AD8 + 0x19f20 - .4byte gUnknown_088B3AD8 + 0x19f20 + .4byte Events_WM_ChapterIntro + 0x19f20 + .4byte Events_WM_ChapterIntro + 0x19f20 .4byte 0x00000000 .4byte 0x00000000 .4byte 0x00000000 @@ -3585,8 +3585,8 @@ LagdouRuins4Event: @0x89ebd5c .4byte gFlagBitMaskLut + 0x37dc .4byte gUnknown_089ED6AC + 0x64f .4byte gUnknown_089ED6AC + 0x840 - .4byte gUnknown_088B3AD8 + 0x1a470 - .4byte gUnknown_088B3AD8 + 0x1a470 + .4byte Events_WM_ChapterIntro + 0x1a470 + .4byte Events_WM_ChapterIntro + 0x1a470 .4byte 0x00000000 .4byte 0x00000000 .4byte 0x00000000 @@ -3640,8 +3640,8 @@ LagdouRuins5Event: @0x89ebe2c .4byte gFlagBitMaskLut + 0x38ac .4byte gUnknown_089ED6AC + 0x650 .4byte gUnknown_089ED6AC + 0x841 - .4byte gUnknown_088B3AD8 + 0x1a894 - .4byte gUnknown_088B3AD8 + 0x1a894 + .4byte Events_WM_ChapterIntro + 0x1a894 + .4byte Events_WM_ChapterIntro + 0x1a894 .4byte 0x00000000 .4byte 0x00000000 .4byte 0x00000000 @@ -3701,8 +3701,8 @@ LagdouRuins6Event: @0x89ebf14 .4byte gFlagBitMaskLut + 0x3994 .4byte gUnknown_089ED6AC + 0x6cf .4byte gUnknown_089ED6AC + 0x842 - .4byte gUnknown_088B3AD8 + 0x1ac68 - .4byte gUnknown_088B3AD8 + 0x1ac68 + .4byte Events_WM_ChapterIntro + 0x1ac68 + .4byte Events_WM_ChapterIntro + 0x1ac68 .4byte 0x00000000 .4byte 0x00000000 .4byte 0x00000000 @@ -3777,8 +3777,8 @@ LagdouRuins7Event: @0x89ec038 .4byte gFlagBitMaskLut + 0x3ab8 .4byte gUnknown_089ED6AC + 0x6d0 .4byte gUnknown_089ED6AC + 0x843 - .4byte gUnknown_088B3AD8 + 0x1b1ac - .4byte gUnknown_088B3AD8 + 0x1b1ac + .4byte Events_WM_ChapterIntro + 0x1b1ac + .4byte Events_WM_ChapterIntro + 0x1b1ac .4byte 0x00000000 .4byte 0x00000000 .4byte 0x00000000 @@ -3886,8 +3886,8 @@ LagdouRuins8Event: @0x89ec1e0 .4byte gFlagBitMaskLut + 0x3c60 .4byte gUnknown_089ED6AC + 0x6d1 .4byte gUnknown_089ED6AC + 0x844 - .4byte gUnknown_088B3AD8 + 0x1b634 - .4byte gUnknown_088B3AD8 + 0x1b634 + .4byte Events_WM_ChapterIntro + 0x1b634 + .4byte Events_WM_ChapterIntro + 0x1b634 .4byte 0x00000000 .4byte 0x00000000 .4byte 0x00000000 @@ -3935,8 +3935,8 @@ LagdouRuins9Event: @0x89ec298 .4byte gFlagBitMaskLut + 0x3d18 .4byte gUnknown_089ED6AC + 0x6d2 .4byte gUnknown_089ED6AC + 0x845 - .4byte gUnknown_088B3AD8 + 0x1baf8 - .4byte gUnknown_088B3AD8 + 0x1baf8 + .4byte Events_WM_ChapterIntro + 0x1baf8 + .4byte Events_WM_ChapterIntro + 0x1baf8 .4byte 0x00000000 .4byte 0x00000000 .4byte 0x00000000 diff --git a/data/data_eventscr_wm.s b/data/data_eventscr_wm.s deleted file mode 100644 index ef195e31d..000000000 --- a/data/data_eventscr_wm.s +++ /dev/null @@ -1,3 +0,0 @@ - .section .data - - .incbin "baserom.gba", 0xA39D44, 0xA3CB04 - 0xA39D44 diff --git a/include/ea-stdlib.h b/include/ea-stdlib.h index 7bd02fa87..e2ed359bb 100644 --- a/include/ea-stdlib.h +++ b/include/ea-stdlib.h @@ -208,6 +208,8 @@ #define WM_TEXTSTART WmEvtTextStart #define WM_REMOVETEXT WmEvtRemoveText #define WM_TEXT WmEvtShowText +#define WM_MOVECAM WmEvtGmScroll +#define WM_WAITFORCAM WmEvtWaitGmScroll #define WM_MOVECAM2 WmEvtCamMov2 #define WM_SHOWPORTRAIT WmEvtShowPortrait #define WM_CLEARPORTRAIT WmEvtClearPortrait @@ -221,12 +223,29 @@ #define WM_PUTMOVINGSPRITE WmEvtMoveUnit #define WM_WAITFORSPRITES WmEvtWaitMU #define WM_REMSPRITE WmEvtRemoveMU -#define WM_PUTSPRITE WmEvtSetPosition +#define WM_PUTSPRITE WmEvtSetUnitPosition #define WM_FADEINSPRITE WmEvtFadeMU #define WM_WAITFORSPRITELOAD WmEvtWaitMuFade #define SKIPWN WmEvtSkipWmEvents -#define WM_CREATENEXTDESTINATION WmEvtInitNextStoryNode +#define WM_CREATENEXTDESTINATION WmEvtInitDrawNewNode #define WM_WAITFORFX WmEvtWaitNodeDisplay +#define WM_MAKELORDVISIBLE WmEvtShowUnit +#define WM_DRAWPATH WmEvtDrawPath +#define WM_WAITFORFXCLEAR1 WmEvtRemoveBigMap +#define WM_WAITFORFXCLEAR2 WmEvtWaitBigMapRemove +#define WM_MOVESPRITETO WmEvtMoveUnitInPath +#define WM_MAKELORDDISAPPEAR WmEvtHideUnit +#define WM_FADEOUTSPRITE WmEvtUnitFadeOut +#define WM_REMOVELOCATION WmEvtRemoveNode +#define WM_REMOVEPATH WmEvtRemovePath +#define WM_LOADLOCATION2 WmEvtEnableNode +#define WM_SETDESTINATION WmEvtSetNextStoryNodeSilent +#define WM_LOADLOCATION3 WmEvtDisplayNode +#define WM_DRAWPATH2 WmEvtAddPath +#define WM_SETCAM WmEvtSetCameraAt +#define DRAWPATH3 WmEvtDisplayPath +#define WM_MOVECAMTO WmEvtMoveCamToNode +#define WM_SATURATE_COLORS WmEvtFadeInDark /* Main Code Helpers */ diff --git a/include/eventcall.h b/include/eventcall.h index 34a87d76b..480575beb 100644 --- a/include/eventcall.h +++ b/include/eventcall.h @@ -2873,3 +2873,137 @@ extern CONST_DATA struct REDA REDA_088D1CE0[]; extern CONST_DATA struct REDA REDA_088D1CF0[]; extern CONST_DATA struct REDA REDA_088D1CF8[]; extern CONST_DATA struct REDA REDA_088D1D08[]; + +extern CONST_DATA EventScr EventScr_WM_FadeCommon[]; +extern CONST_DATA EventScr EventScrWM_Prologue_Beginning[]; +extern CONST_DATA EventScr EventScrWM_Prologue_ChapterIntro[]; +extern CONST_DATA EventScr EventScrWM_Ch1_Beginning[]; +extern CONST_DATA EventScr EventScrWM_Ch1_ChapterIntro[]; +extern CONST_DATA EventScr EventScrWM_Ch2_BeginningTutorial[]; +extern CONST_DATA EventScr EventScrWM_Ch2_Beginning[]; +extern CONST_DATA EventScr EventScrWM_Ch2_ChapterIntro[]; +extern CONST_DATA EventScr EventScrWM_Ch3_BeginningTutorial[]; +extern CONST_DATA EventScr EventScrWM_Ch3_Beginning[]; +extern CONST_DATA EventScr EventScrWM_Ch3_ChapterIntro[]; +extern CONST_DATA EventScr EventScrWM_Ch4_Beginning[]; +extern CONST_DATA EventScr EventScrWM_Ch4_ChapterIntro[]; +extern CONST_DATA EventScr EventScrWM_Ch5_Beginning[]; +extern CONST_DATA EventScr EventScrWM_08A3A268[]; +extern CONST_DATA EventScr EventScrWM_Ch5_ChapterIntro[]; +extern CONST_DATA EventScr EventScrWM_08A3A4D0[]; +extern CONST_DATA EventScr EventScrWM_Ch6_Beginning[]; +extern CONST_DATA EventScr EventScrWM_Ch6_ChapterIntro[]; +extern CONST_DATA EventScr EventScrWM_Ch7_Beginning[]; +extern CONST_DATA EventScr EventScrWM_Ch7_ChapterIntro[]; +extern CONST_DATA EventScr EventScrWM_Ch8_Beginning[]; +extern CONST_DATA EventScr EventScrWM_Ch8_ChapterIntro[]; +extern CONST_DATA EventScr EventScrWM_08A3A70C[]; +extern CONST_DATA EventScr EventScrWM_Ch9a_Beginning[]; +extern CONST_DATA EventScr EventScrWM_Ch9a_ChapterIntro[]; +extern CONST_DATA EventScr EventScrWM_Ch10a_Beginning[]; +extern CONST_DATA EventScr EventScrWM_08A3A9EC[]; +extern CONST_DATA EventScr EventScrWM_Ch12a_Beginning[]; +extern CONST_DATA EventScr EventScrWM_08A3AB68[]; +extern CONST_DATA EventScr EventScrWM_Ch13a_Beginning[]; +extern CONST_DATA EventScr EventScrWM_08A3ABC8[]; +extern CONST_DATA EventScr EventScrWM_Ch14a_Beginning[]; +extern CONST_DATA EventScr EventScrWM_08A3AD40[]; +extern CONST_DATA EventScr EventScrWM_Ch9b_Beginning[]; +extern CONST_DATA EventScr EventScrWM_08A3AF30[]; +extern CONST_DATA EventScr EventScrWM_Ch10b_Beginning[]; +extern CONST_DATA EventScr EventScrWM_08A3B10C[]; +extern CONST_DATA EventScr EventScrWM_Ch12b_Beginning[]; +extern CONST_DATA EventScr EventScrWM_08A3B1F0[]; +extern CONST_DATA EventScr EventScrWM_Ch13b_Beginning[]; +extern CONST_DATA EventScr EventScrWM_08A3B250[]; +extern CONST_DATA EventScr EventScrWM_Ch14b_Beginning[]; +extern CONST_DATA EventScr EventScrWM_08A3B338[]; +extern CONST_DATA EventScr EventScrWM_MelkaenCoast_Beginning[]; +extern CONST_DATA EventScr EventScrWM_08A3B460[]; +extern CONST_DATA EventScr EventScrWM_ValniTower1_Beginning[]; +extern CONST_DATA EventScr EventScrWM_08A3B46C[]; +extern CONST_DATA EventScr EventScrWM_ValniTower2_Beginning[]; +extern CONST_DATA EventScr EventScrWM_08A3B47C[]; +extern CONST_DATA EventScr EventScrWM_ValniTower3_Beginning[]; +extern CONST_DATA EventScr EventScrWM_08A3B484[]; +extern CONST_DATA EventScr EventScrWM_ValniTower4_Beginning[]; +extern CONST_DATA EventScr EventScrWM_08A3B48C[]; +extern CONST_DATA EventScr EventScrWM_ValniTower5_Beginning[]; +extern CONST_DATA EventScr EventScrWM_08A3B494[]; +extern CONST_DATA EventScr EventScrWM_ValniTower6_Beginning[]; +extern CONST_DATA EventScr EventScrWM_08A3B49C[]; +extern CONST_DATA EventScr EventScrWM_ValniTower7_Beginning[]; +extern CONST_DATA EventScr EventScrWM_08A3B4A4[]; +extern CONST_DATA EventScr EventScrWM_ValniTower8_Beginning[]; +extern CONST_DATA EventScr EventScrWM_08A3B4AC[]; +extern CONST_DATA EventScr EventScrWM_08A3B4B0[]; +extern CONST_DATA EventScr EventScrWM_08A3B4B4[]; +extern CONST_DATA EventScr EventScrWM_08A3B4B8[]; +extern CONST_DATA EventScr EventScrWM_08A3B4BC[]; +extern CONST_DATA EventScr EventScrWM_LagdouRuins1_Beginning[]; +extern CONST_DATA EventScr EventScrWM_08A3B4C4[]; +extern CONST_DATA EventScr EventScrWM_LagdouRuins2_Beginning[]; +extern CONST_DATA EventScr EventScrWM_08A3B4D4[]; +extern CONST_DATA EventScr EventScrWM_LagdouRuins3_Beginning[]; +extern CONST_DATA EventScr EventScrWM_08A3B4DC[]; +extern CONST_DATA EventScr EventScrWM_LagdouRuins4_Beginning[]; +extern CONST_DATA EventScr EventScrWM_08A3B4E4[]; +extern CONST_DATA EventScr EventScrWM_LagdouRuins5_Beginning[]; +extern CONST_DATA EventScr EventScrWM_08A3B4EC[]; +extern CONST_DATA EventScr EventScrWM_LagdouRuins6_Beginning[]; +extern CONST_DATA EventScr EventScrWM_08A3B4F4[]; +extern CONST_DATA EventScr EventScrWM_LagdouRuins7_Beginning[]; +extern CONST_DATA EventScr EventScrWM_08A3B4FC[]; +extern CONST_DATA EventScr EventScrWM_LagdouRuins8_Beginning[]; +extern CONST_DATA EventScr EventScrWM_08A3B504[]; +extern CONST_DATA EventScr EventScrWM_LagdouRuins9_Beginning[]; +extern CONST_DATA EventScr EventScrWM_08A3B50C[]; +extern CONST_DATA EventScr EventScrWM_LagdouRuins10_Beginning[]; +extern CONST_DATA EventScr EventScrWM_08A3B514[]; +extern CONST_DATA EventScr EventScrWM_08A3B518[]; +extern CONST_DATA EventScr EventScrWM_08A3B51C[]; +extern CONST_DATA EventScr EventScrWM_08A3B520[]; +extern CONST_DATA EventScr EventScrWM_08A3B524[]; +extern CONST_DATA EventScr EventScrWM_Ch15a_Beginning[]; +extern CONST_DATA EventScr EventScrWM_08A3B58C[]; +extern CONST_DATA EventScr EventScrWM_Ch16a_Beginning[]; +extern CONST_DATA EventScr EventScrWM_08A3B678[]; +extern CONST_DATA EventScr EventScrWM_Ch17a_Beginning[]; +extern CONST_DATA EventScr EventScrWM_08A3B808[]; +extern CONST_DATA EventScr EventScrWM_Ch18a_Beginning[]; +extern CONST_DATA EventScr EventScrWM_08A3B944[]; +extern CONST_DATA EventScr EventScrWM_Ch19a_Beginning[]; +extern CONST_DATA EventScr EventScrWM_08A3BAC0[]; +extern CONST_DATA EventScr EventScrWM_Ch20a_Beginning[]; +extern CONST_DATA EventScr EventScrWM_08A3BC8C[]; +extern CONST_DATA EventScr EventScrWM_Ch21a_Beginning[]; +extern CONST_DATA EventScr EventScrWM_08A3BD70[]; +extern CONST_DATA EventScr EventScrWM_Ch15b_Beginning[]; +extern CONST_DATA EventScr EventScrWM_08A3BE14[]; +extern CONST_DATA EventScr EventScrWM_Ch16b_Beginning[]; +extern CONST_DATA EventScr EventScrWM_08A3BFF4[]; +extern CONST_DATA EventScr EventScrWM_Ch17b_Beginning[]; +extern CONST_DATA EventScr EventScrWM_08A3C184[]; +extern CONST_DATA EventScr EventScrWM_Ch18b_Beginning[]; +extern CONST_DATA EventScr EventScrWM_08A3C2BC[]; +extern CONST_DATA EventScr EventScrWM_Ch19b_Beginning[]; +extern CONST_DATA EventScr EventScrWM_08A3C438[]; +extern CONST_DATA EventScr EventScrWM_Ch20b_Beginning[]; +extern CONST_DATA EventScr EventScrWM_08A3C604[]; +extern CONST_DATA EventScr EventScrWM_Ch21b_Beginning[]; +extern CONST_DATA EventScr EventScrWM_08A3C6E8[]; +extern CONST_DATA EventScr EventScrWM_08A3C6EC[]; +extern CONST_DATA EventScr EventScrWM_08A3C79C[]; +extern CONST_DATA EventScr EventScrWM_CastleFrelia_Beginning[]; +extern CONST_DATA EventScr EventScrWM_08A3C878[]; +extern CONST_DATA EventScr EventScrWM_08A3C888[]; +extern CONST_DATA EventScr EventScrWM_Ch5x_Beginning[]; +extern CONST_DATA EventScr EventScrWM_Ch5x_ChapterIntro[]; +extern CONST_DATA EventScr EventScrWM_Ch21ax_Beginning[]; +extern CONST_DATA EventScr EventScrWM_08A3C89C[]; +extern CONST_DATA EventScr EventScrWM_Ch21bx_Beginning[]; +extern CONST_DATA EventScr EventScrWM_08A3C8A4[]; +extern CONST_DATA EventScr EventScrWM_Ch11a_Beginning[]; +extern CONST_DATA EventScr EventScrWM_08A3C904[]; +extern CONST_DATA EventScr EventScrWM_Ch11b_Beginning[]; +extern CONST_DATA EventScr EventScrWM_08A3CA2C[]; diff --git a/include/eventinfo.h b/include/eventinfo.h index 482f3f74c..ee29361bb 100644 --- a/include/eventinfo.h +++ b/include/eventinfo.h @@ -44,35 +44,70 @@ enum char_identifier_event { }; enum wm_node_idx { - WM_NODE_00 = 0x00, - WM_NODE_01 = 1, - WM_NODE_02 = 2, - WM_NODE_03 = 3, - WM_NODE_04 = 4, - WM_NODE_05 = 5, - WM_NODE_06 = 6, - WM_NODE_07 = 7, - WM_NODE_08 = 8, - WM_NODE_09 = 9, - WM_NODE_0A = 10, - WM_NODE_0B = 11, - WM_NODE_0C = 12, - WM_NODE_0D = 13, - WM_NODE_0E = 14, - WM_NODE_0F = 15, - WM_NODE_10 = 16, - WM_NODE_11 = 17, - WM_NODE_12 = 18, - WM_NODE_13 = 19, - WM_NODE_14 = 20, - WM_NODE_15 = 21, - WM_NODE_16 = 22, - WM_NODE_17 = 23, - WM_NODE_18 = 24, - WM_NODE_19 = 25, - WM_NODE_1A = 26, - WM_NODE_1B = 27, - WM_NODE_1C = 28, + WM_NODE_BorderMulan = 0x00, + WM_NODE_CastleFrelia = 1, + WM_NODE_Ide = 2, + WM_NODE_BorgoRidge = 3, + WM_NODE_ZahaWoods = 4, + WM_NODE_Serafew = 5, + WM_NODE_AdlasPlains = 6, + WM_NODE_Renvall1 = 7, + WM_NODE_Renvall2 = 8, + WM_NODE_PortKiris = 9, + WM_NODE_TerazPlateau = 10, + WM_NODE_CaerPelyn = 11, + WM_NODE_HamillCanyon = 12, + WM_NODE_JehannaHall = 13, + WM_NODE_FortRigwald = 14, + WM_NODE_Bethroen = 15, + WM_NODE_Taizel = 16, + WM_NODE_ZaalbulMarsh = 17, + WM_NODE_GradoKeep = 18, + WM_NODE_JehannaHall2 = 19, + WM_NODE_RenaisCastle = 20, + WM_NODE_NarubeRiver = 21, + WM_NODE_NelerasPeak = 22, + WM_NODE_RaustenCourt = 23, + WM_NODE_DarklingWoods = 24, + WM_NODE_BlackTemple = 25, + WM_NODE_TowerOfValni = 26, + WM_NODE_LagdouRuins = 27, + WM_NODE_MelkaenCoast = 28, +}; + +enum wm_path_idx { + WM_PATH_00 = 0x00, + WM_PATH_01 = 0x01, + WM_PATH_02 = 0x02, + WM_PATH_03 = 0x03, + WM_PATH_04 = 0x04, + WM_PATH_05 = 0x05, + WM_PATH_06 = 0x06, + WM_PATH_07 = 0x07, + WM_PATH_08 = 0x08, + WM_PATH_09 = 0x09, + WM_PATH_0A = 0x0A, + WM_PATH_0B = 0x0B, + WM_PATH_0C = 0x0C, + WM_PATH_0D = 0x0D, + WM_PATH_0E = 0x0E, + WM_PATH_0F = 0x0F, + WM_PATH_10 = 0x10, + WM_PATH_11 = 0x11, + WM_PATH_12 = 0x12, + WM_PATH_13 = 0x13, + WM_PATH_14 = 0x14, + WM_PATH_15 = 0x15, + WM_PATH_16 = 0x16, + WM_PATH_17 = 0x17, + WM_PATH_18 = 0x18, + WM_PATH_19 = 0x19, + WM_PATH_1A = 0x1A, + WM_PATH_1B = 0x1B, + WM_PATH_1C = 0x1C, + WM_PATH_1D = 0x1D, + WM_PATH_1E = 0x1E, + WM_PATH_1F = 0x1F, }; enum wm_hightlighted_nation_idx { diff --git a/include/eventscript.h b/include/eventscript.h index 772c9c7df..76fd043b7 100644 --- a/include/eventscript.h +++ b/include/eventscript.h @@ -620,16 +620,43 @@ enum event_sub_cmd_idx { #define WmEvtMarkPoint(a, pal, node, eff) _EvtArg0(EV_CMD_WM_PLACEDOT, 6, 0, 0), _EvtParams2(a, pal), _EvtParams2(node, eff), #define WmEvtRemoveMarkPoint1(a) _EvtArg0(EV_CMD_WM_FXCLEAR1, 4, 0, 0), (EventScr)(a), #define WmEvtRemoveMarkPoint2(a) _EvtArg0(EV_CMD_WM_FXCLEAR2, 4, 0, 0), (EventScr)(a), -#define WmEvtShowMU(mu_id, jid, faction, node) _EvtArg0(EV_CMD_PUTSPRITE, 6, 0, 0), _EvtParams2(mu_id, jid), _EvtParams2(faction, node), -#define WmEvtMoveUnit(mu_id, acc, x1, y1, x2, y2, time, flag, delay) _EvtArg0(EV_CMD_WM_PUTMOVINGSPRITE, 12, 0, 0), _EvtParams2(mu_id, acc), _EvtParams2(x1, y1), _EvtParams2(x2, y2), _EvtParams2(time, flag), _EvtParams2(delay, 0), -#define WmEvtWaitMU(mu_id) _EvtArg0(EV_CMD_WM_WAITFORSPRITES, 4, 0, 0), (EventScr)(mu_id), -#define WmEvtRemoveMU(mu_id) _EvtArg0(EV_CMD_WM_REMSPRITE, 4, 0, 0), (EventScr)(mu_id), -#define WmEvtSetPosition(mu_id, x, y) _EvtArg0(EV_CMD_WM_PUTSPRITE, 6, 0, 0), _EvtParams2(mu_id, 0), _EvtParams2(x, y), -#define WmEvtFadeMU(mu_id, delay) _EvtArg0(EV_CMD_WM_FADEINSPRITE, 4, 0, 0), _EvtParams2(mu_id, delay), +#define WmEvtShowMU(wm_uid, jid, faction, node) _EvtArg0(EV_CMD_PUTSPRITE, 6, 0, 0), _EvtParams2(wm_uid, jid), _EvtParams2(faction, node), +#define WmEvtMoveUnit(wm_uid, acc, x1, y1, x2, y2, time, flag, delay) _EvtArg0(EV_CMD_WM_PUTMOVINGSPRITE, 12, 0, 0), _EvtParams2(wm_uid, acc), _EvtParams2(x1, y1), _EvtParams2(x2, y2), _EvtParams2(time, flag), _EvtParams2(delay, 0), +#define WmEvtWaitMU(wm_uid) _EvtArg0(EV_CMD_WM_WAITFORSPRITES, 4, 0, 0), (EventScr)(wm_uid), +#define WmEvtRemoveMU(wm_uid) _EvtArg0(EV_CMD_WM_REMSPRITE, 4, 0, 0), (EventScr)(wm_uid), +#define WmEvtSetUnitPosition(wm_uid, x, y) _EvtArg0(EV_CMD_WM_PUTSPRITE, 6, 0, 0), _EvtParams2(wm_uid, 0), _EvtParams2(x, y), +#define WmEvtFadeMU(wm_uid, delay) _EvtArg0(EV_CMD_WM_FADEINSPRITE, 4, 0, 0), _EvtParams2(wm_uid, delay), #define WmEvtWaitMuFade _EvtAutoCmdLen2(EV_CMD_WM_WAITFORSPRITELOAD), #define WmEvtSkipWmEvents _EvtAutoCmdLen2(EV_CMD_WM_SKIPWN), -#define WmEvtInitNextStoryNode _EvtAutoCmdLen2(EV_CMD_WM_CREATENEXTDESTINATION), +#define WmEvtInitDrawNewNode _EvtAutoCmdLen2(EV_CMD_WM_CREATENEXTDESTINATION), #define WmEvtWaitNodeDisplay _EvtAutoCmdLen2(EV_CMD_WM_WAITFORFX), +#define WmEvtShowUnit(wm_uid) _EvtArg0(EV_CMD_WM_MAKELORDVISIBLE, 4, 0, 0), (EventScr)(wm_uid), +#define WmEvtDrawPath(path) _EvtArg0(EV_CMD_WM_DRAWPATH, 4, 0, 0), (EventScr)(path), +#define WmEvtGmScroll(x1, y1, x2, y2, speed, delay) _EvtArg0(EV_CMD_WM_MOVECAM, 8, 0, 0), _EvtParams2(x1, y1), _EvtParams2(x2, y2), _EvtParams2(speed, delay), +#define WmEvtWaitGmScroll _EvtAutoCmdLen2(EV_CMD_WM_WAITFORCAM), +#define WmEvtRemoveBigMap _EvtAutoCmdLen2(EV_CMD_WM_WAITFORFXCLEAR1), +#define WmEvtWaitBigMapRemove _EvtAutoCmdLen2(EV_CMD_WM_WAITFORFXCLEAR2), +#define WmEvtMoveUnitInPath(wm_uid, conf, node1, node2, speed, delay) _EvtArg0(EV_CMD_WM_MOVESPRITETO, 8, 0, 0), _EvtParams2(wm_uid, conf), _EvtParams2(node1, node2), _EvtParams2(speed, delay), +#define WmEvtHideUnit(wm_uid) _EvtArg0(EV_CMD_WM_MAKELORDDISAPPEAR, 4, 0, 0), (EventScr)(wm_uid), +#define WmEvtUnitFadeOut(wm_uid, speed) _EvtArg0(EV_CMD_WM_FADEOUTSPRITE, 4, 0, 0), _EvtParams2(wm_uid, speed), +#define WmEvtSetCamToNode(node) _EvtArg0(EV_CMD_WM_84, 4, 0, 0), (EventScr)(node), +#define WmEvtSetUnitOnNode(wm_uid, node) _EvtArg0(EV_CMD_WM_A6, 4, 0, 0), _EvtParams2(wm_uid, node), +#define WmEvtSetNextStoryNode(node) _EvtArg0(EV_CMD_WM_9B, 4, 0, 0), (EventScr)(node), +#define WmEvtSetNextStoryNodeSilent(node) _EvtArg0(EV_CMD_WM_SETDESTINATION, 4, 0, 0), (EventScr)(node), +#define WmEvtRemoveNode(node) _EvtArg0(EV_CMD_WM_REMOVELOCATION, 4, 0, 0), (EventScr)(node), +#define WmEvtRemovePath(path) _EvtArg0(EV_CMD_WM_REMOVEPATH, 4, 0, 0), (EventScr)(path), +#define WmEvtDisplayPath(path) _EvtArg0(EV_CMD_DRAWPATH3, 4, 0, 0), (EventScr)(path), +#define WmEvtAddPath(path) _EvtArg0(EV_CMD_WM_DRAWPATH2, 4, 0, 0), (EventScr)(path), +#define WmEvtEnableNode(node) _EvtArg0(EV_CMD_WM_LOADLOCATION2, 4, 0, 0), (EventScr)(node), +#define WmEvtDisplayNode(node) _EvtArg0(EV_CMD_WM_LOADLOCATION3, 4, 0, 0), (EventScr)(node), +#define WmEvtMoveCamToUnit(x, y, wm_uid, speed, delay) _EvtArg0(EV_CMD_WM_88, 8, 0, 0), _EvtParams2(x, y), _EvtParams2(wm_uid, speed), _EvtParams2(delay, 0), +#define WmEvtPasueMove(wm_uid) _EvtArg0(EV_CMD_WM_AA, 4, 0, 0), (EventScr)(wm_uid), +#define WmEvtResumeMove(wm_uid) _EvtArg0(EV_CMD_WM_AB, 4, 0, 0), (EventScr)(wm_uid), +#define WmEvtSetCameraAt(x, y) _EvtArg0(EV_CMD_WM_SETCAM, 4, 0, 0), _EvtParams2(x, y), +#define WmEvtMoveCamToNode(x, y, node, speed, delay) _EvtArg0(EV_CMD_WM_MOVECAMTO, 8, 0, 0), _EvtParams2(x, y), _EvtParams2(node, speed), _EvtParams2(delay, 0), +#define WmEvtSetNodeStateNot2(node) _EvtArg0(EV_CMD_WM_9D, 4, 0, 0), (EventScr)(node), +#define WmEvtFadeInDark(speed) _EvtArg0(EV_CMD_WM_SATURATE_COLORS, 4, 0, 0), (EventScr)(speed), +#define WmEvtWaitFadeInDark _EvtAutoCmdLen2(EV_CMD_WM_AE), enum event_trigger_types { EVT_LIST_CMD_END, diff --git a/include/variables.h b/include/variables.h index 06bbcccf7..db674159e 100644 --- a/include/variables.h +++ b/include/variables.h @@ -858,8 +858,8 @@ extern u16 * gUnknown_088AF834[]; // extern ??? gUnknown_088AF880 // extern ??? gUnknown_088AFB5A // extern ??? gSpellAssocData -// extern ??? gUnknown_088B39EC -// extern ??? gUnknown_088B3AD8 +// extern ??? Events_WM_Beginning +// extern ??? Events_WM_ChapterIntro // extern ??? gUnknown_088D2058 extern struct CONST_DATA gfx_set gConvoBackgroundData[]; extern u8 CONST_DATA gPromoJidLut[][2]; diff --git a/include/worldmap.h b/include/worldmap.h index 8d75d846b..d20723041 100644 --- a/include/worldmap.h +++ b/include/worldmap.h @@ -415,7 +415,7 @@ void sub_80B9DC4(ProcPtr proc); void sub_80B9DE0(struct WorldMapMainProc * proc); void sub_80B9E40(ProcPtr proc); // ??? sub_80B9E64(???); -void sub_80B9EA4(void); +void ResetWorldMapScreen(void); void DoNothing(void); void sub_80B9F14(ProcPtr proc); void sub_80B9F24(ProcPtr proc); diff --git a/ldscript.txt b/ldscript.txt index 78cdb45c1..3dac63ea8 100644 --- a/ldscript.txt +++ b/ldscript.txt @@ -877,9 +877,7 @@ SECTIONS . = ALIGN(4); data/data_A2EEF0.o(.data); . = ALIGN(4); src/bmshop.o(.data); . = ALIGN(4); src/uiarena.o(.data); - . = ALIGN(4); data/data_A394DC.o(.data); . = ALIGN(4); src/events_wm.o(.data); - . = ALIGN(4); data/data_eventscr_wm.o(.data); . = ALIGN(4); src/gamerankings.o(.data); . = ALIGN(4); src/cg.o(.data); . = ALIGN(4); src/ending_details.o(.data); diff --git a/scripts/dump_events.py b/scripts/dump_events.py index 2187ba073..330474709 100755 --- a/scripts/dump_events.py +++ b/scripts/dump_events.py @@ -5,7 +5,7 @@ import symbols from fe8db import PID_IDX, EVENT_COMMANDS, EVENT_SLOTS, DIRECTION_IDX from fe8db import EVENT0B_TRIGGER_TYPE, WM_NODES, WM_NATIONS, JID_IDX, FACTION_IDX -from fe8db import WM_MU_IDX +from fe8db import WM_MU_IDX, WM_PATH_IDX # ======================================================================== elf = "fireemblem8.elf" @@ -834,6 +834,8 @@ def parse_event(rom_data, off): x = arg1 y = arg2 _map = arg2_u32_le + x = ctypes.c_int16(x).value + y = ctypes.c_int16(y).value print(f"\tWM_SHOWDRAWNMAP({x}, {y}, {hex(_map)})") case "EV_CMD_WM_C2": @@ -869,6 +871,10 @@ def parse_event(rom_data, off): case "EV_CMD_WM_MOVECAM2": x1, y1 = unpack_EvtParams2(arg32) x2, y2 = unpack_EvtParams2(arg2_u32_le) + x1 = ctypes.c_int16(x1).value + y1 = ctypes.c_int16(y1).value + x2 = ctypes.c_int16(x2).value + y2 = ctypes.c_int16(y2).value speed, delay = unpack_EvtParams2(arg3_u32_le) print(f"\tWM_MOVECAM2({x1}, {y1}, {x2}, {y2}, {speed}, {delay})") @@ -952,6 +958,131 @@ def parse_event(rom_data, off): case "EV_CMD_WM_WAITFORFX": print("\tWM_WAITFORFX") + case "EV_CMD_WM_MAKELORDVISIBLE": + mu_id = ctypes.c_int32(arg1_u32_le).value + print(f"\tWM_MAKELORDVISIBLE({WM_MU_IDX[mu_id]})") + + case "EV_CMD_WM_DRAWPATH": + path_idx = WM_PATH_IDX[arg32] + print(f"\tWM_DRAWPATH({path_idx})") + + case "EV_CMD_WM_MOVECAM": + x1, y1 = unpack_EvtParams2(arg32) + x2, y2 = unpack_EvtParams2(arg2_u32_le) + x1 = ctypes.c_int16(x1).value + y1 = ctypes.c_int16(y1).value + x2 = ctypes.c_int16(x2).value + y2 = ctypes.c_int16(y2).value + speed, delay = unpack_EvtParams2(arg3_u32_le) + print(f"\tWM_MOVECAM({x1}, {y1}, {x2}, {y2}, {speed}, {delay})") + + case "EV_CMD_WM_WAITFORCAM": + print("\tWM_WAITFORCAM") + + case "EV_CMD_WM_WAITFORFXCLEAR1": + print("\tWmEvtRemoveBigMap // WM_WAITFORFXCLEAR1") + + case "EV_CMD_WM_WAITFORFXCLEAR2": + print("\tWmEvtWaitBigMapRemove // WM_WAITFORFXCLEAR2") + + case "EV_CMD_WM_MOVESPRITETO": + wm_uid, conf = unpack_EvtParams2(arg1_u32_le) + node1, node2 = unpack_EvtParams2(arg2_u32_le) + speed, delay = unpack_EvtParams2(arg3_u32_le) + speed = ctypes.c_int16(speed).value + print(f"\tWM_MOVESPRITETO({WM_MU_IDX[wm_uid]}, 0x{conf:04X}, {WM_NODES[node1]}, {WM_NODES[node2]}, {speed}, {delay})") + + case "EV_CMD_WM_MAKELORDDISAPPEAR": + wm_uid = arg1_u32_le + print(f"\tWM_MAKELORDDISAPPEAR({WM_MU_IDX[wm_uid]})") + + case "EV_CMD_WM_FADEOUTSPRITE": + wm_uid, speed = unpack_EvtParams2(arg1_u32_le) + print(f"\tWM_FADEOUTSPRITE({WM_MU_IDX[wm_uid]}, {speed})") + + case "EV_CMD_WM_84": + node = arg1_u32_le + print(f"\tWmEvtSetCamToNode({WM_NODES[node]}) // ENOSUPP in EA-stdlib") + + case "EV_CMD_WM_A6": + wm_uid, node = unpack_EvtParams2(arg1_u32_le) + print(f"\tWmEvtSetUnitOnNode({WM_MU_IDX[wm_uid]}, {WM_NODES[node]}) // ENOSUPP in EA-stdlib") + + case "EV_CMD_WM_9B": + node = arg1_u32_le + print(f"\tWmEvtSetNextStoryNode({WM_NODES[node]}) // ENOSUPP in EA-stdlib") + + case "EV_CMD_WM_REMOVELOCATION": + node = arg1_u32_le + print(f"\tWM_REMOVELOCATION({WM_NODES[node]})") + + case "EV_CMD_WM_REMOVEPATH": + path = arg1_u32_le + print(f"\tWM_REMOVEPATH({WM_PATH_IDX[path]})") + + case "EV_CMD_WM_LOADLOCATION2": + node = arg1_u32_le + print(f"\tWM_LOADLOCATION2({WM_NODES[node]})") + + case "EV_CMD_WM_SETDESTINATION": + node = arg1_u32_le + print(f"\tWM_SETDESTINATION({WM_NODES[node]})") + + case "EV_CMD_WM_LOADLOCATION3": + node = arg1_u32_le + print(f"\tWM_LOADLOCATION3({WM_NODES[node]})") + + case "EV_CMD_WM_DRAWPATH2": + path = arg1_u32_le + print(f"\tWM_DRAWPATH2({WM_PATH_IDX[path]})") + + case "EV_CMD_WM_88": + x, y = unpack_EvtParams2(arg1_u32_le) + wm_uid, speed = unpack_EvtParams2(arg2_u32_le) + delay, _0 = unpack_EvtParams2(arg3_u32_le) + + x = ctypes.c_int16(x).value + y = ctypes.c_int16(y).value + print(f"\tWmEvtMoveCamToUnit({x}, {y}, {WM_MU_IDX[wm_uid]}, {speed}, {delay}) // ENOSUPP in EA-stdlib") + + case "EV_CMD_WM_MOVECAMTO": + x, y = unpack_EvtParams2(arg1_u32_le) + node, speed = unpack_EvtParams2(arg2_u32_le) + delay, _0 = unpack_EvtParams2(arg3_u32_le) + + x = ctypes.c_int16(x).value + y = ctypes.c_int16(y).value + print(f"\tWM_MOVECAMTO({x}, {y}, {WM_NODES[node]}, {speed}, {delay})") + + case "EV_CMD_WM_AA": + wm_uid = arg1_u32_le + print(f"\tWmEvtPasueMove({WM_MU_IDX[wm_uid]}) // ENOSUPP in EA-stdlib") + + case "EV_CMD_WM_AB": + wm_uid = arg1_u32_le + print(f"\tWmEvtResumeMove({WM_MU_IDX[wm_uid]}) // ENOSUPP in EA-stdlib") + + case "EV_CMD_WM_SETCAM": + x, y = unpack_EvtParams2(arg1_u32_le) + x = ctypes.c_int16(x).value + y = ctypes.c_int16(y).value + print(f"\tWM_SETCAM({x}, {y})") + + case "EV_CMD_DRAWPATH3": + path = arg1_u32_le + print(f"\tDRAWPATH3({WM_PATH_IDX[path]})") + + case "EV_CMD_WM_9D": + node = arg1_u32_le + print(f"\tWmEvtSetNodeStateNot2({WM_NODES[node]}) // ENOSUPP in EA-stdlib") + + case "EV_CMD_WM_SATURATE_COLORS": + speed = arg1_u32_le + print(f"\tWmEvtFadeInDark({speed}) // WM_SATURATE_COLORS") + + case "EV_CMD_WM_AE": + print("\tWmEvtWaitFadeInDark // ENOSUPP in EA-stdlib") + case _: parse_event_todo(rom_data, off) diff --git a/scripts/fe8db.py b/scripts/fe8db.py index 172e5f331..528bba06e 100644 --- a/scripts/fe8db.py +++ b/scripts/fe8db.py @@ -832,35 +832,35 @@ def TERRAIN_IDX(terrain): } WM_NODES = { - 0: "WM_NODE_00", - 1: "WM_NODE_01", - 2: "WM_NODE_02", - 3: "WM_NODE_03", - 4: "WM_NODE_04", - 5: "WM_NODE_05", - 6: "WM_NODE_06", - 7: "WM_NODE_07", - 8: "WM_NODE_08", - 9: "WM_NODE_09", - 10: "WM_NODE_0A", - 11: "WM_NODE_0B", - 12: "WM_NODE_0C", - 13: "WM_NODE_0D", - 14: "WM_NODE_0E", - 15: "WM_NODE_0F", - 16: "WM_NODE_10", - 17: "WM_NODE_11", - 18: "WM_NODE_12", - 19: "WM_NODE_13", - 20: "WM_NODE_14", - 21: "WM_NODE_15", - 22: "WM_NODE_16", - 23: "WM_NODE_17", - 24: "WM_NODE_18", - 25: "WM_NODE_19", - 26: "WM_NODE_1A", - 27: "WM_NODE_1B", - 28: "WM_NODE_1C", + 0: "WM_NODE_BorderMulan", + 1: "WM_NODE_CastleFrelia", + 2: "WM_NODE_Ide", + 3: "WM_NODE_BorgoRidge", + 4: "WM_NODE_ZahaWoods", + 5: "WM_NODE_Serafew", + 6: "WM_NODE_AdlasPlains", + 7: "WM_NODE_Renvall1", + 8: "WM_NODE_Renvall2", + 9: "WM_NODE_PortKiris", + 10: "WM_NODE_TerazPlateau", + 11: "WM_NODE_CaerPelyn", + 12: "WM_NODE_HamillCanyon", + 13: "WM_NODE_JehannaHall", + 14: "WM_NODE_FortRigwald", + 15: "WM_NODE_Bethroen", + 16: "WM_NODE_Taizel", + 17: "WM_NODE_ZaalbulMarsh", + 18: "WM_NODE_GradoKeep", + 19: "WM_NODE_JehannaHall", + 20: "WM_NODE_RenaisCastle", + 21: "WM_NODE_NarubeRiver", + 22: "WM_NODE_NelerasPeak", + 23: "WM_NODE_RaustenCourt", + 24: "WM_NODE_DarklingWoods", + 25: "WM_NODE_BlackTemple", + 26: "WM_NODE_TowerOfValni", + 27: "WM_NODE_LagdouRuins", + 28: "WM_NODE_MelkaenCoast", } WM_NATIONS = { @@ -885,3 +885,38 @@ def TERRAIN_IDX(terrain): -1: "WM_MU_ANY" } + +WM_PATH_IDX = { + 0x00: "WM_PATH_00", + 0x01: "WM_PATH_01", + 0x02: "WM_PATH_02", + 0x03: "WM_PATH_03", + 0x04: "WM_PATH_04", + 0x05: "WM_PATH_05", + 0x06: "WM_PATH_06", + 0x07: "WM_PATH_07", + 0x08: "WM_PATH_08", + 0x09: "WM_PATH_09", + 0x0A: "WM_PATH_0A", + 0x0B: "WM_PATH_0B", + 0x0C: "WM_PATH_0C", + 0x0D: "WM_PATH_0D", + 0x0E: "WM_PATH_0E", + 0x0F: "WM_PATH_0F", + 0x10: "WM_PATH_10", + 0x11: "WM_PATH_11", + 0x12: "WM_PATH_12", + 0x13: "WM_PATH_13", + 0x14: "WM_PATH_14", + 0x15: "WM_PATH_15", + 0x16: "WM_PATH_16", + 0x17: "WM_PATH_17", + 0x18: "WM_PATH_18", + 0x19: "WM_PATH_19", + 0x1A: "WM_PATH_1A", + 0x1B: "WM_PATH_1B", + 0x1C: "WM_PATH_1C", + 0x1D: "WM_PATH_1D", + 0x1E: "WM_PATH_1E", + 0x1F: "WM_PATH_1F", +} diff --git a/src/events/ch1-wm.h b/src/events/ch1-wm.h index 7041812d4..22c98f999 100644 --- a/src/events/ch1-wm.h +++ b/src/events/ch1-wm.h @@ -15,18 +15,8 @@ CONST_DATA EventScr EventScrWM_Ch1_Beginning[] = { ENDA }; -CONST_DATA EventScr EventScrWM_Ch1_Ending[] = { +CONST_DATA EventScr EventScrWM_Ch1_ChapterIntro[] = { EVBIT_MODIFY(0x1) ENUT(137) ENDA }; - -CONST_DATA EventScr EventScrWM_08A39D24[] = { - EvtTextStartType5 // ENOSUPP in EA-stdlib - SVAL(EVT_SLOT_B, 0xc000c) - TEXTSHOW(0x8dd) - TEXTEND - REMA - ENUT(226) - ENDA -}; diff --git a/src/events/ch2-wm.h b/src/events/ch2-wm.h new file mode 100644 index 000000000..0b199a6b5 --- /dev/null +++ b/src/events/ch2-wm.h @@ -0,0 +1,97 @@ +#pragma once + +#include "global.h" +#include "event.h" +#include "eventinfo.h" +#include "eventcall.h" +#include "eventscript.h" +#include "ea-stdlib.h" +#include "constants/characters.h" +#include "constants/classes.h" + +CONST_DATA EventScr EventScrWM_Ch2_BeginningTutorial[] = { + EvtTextStartType5 // ENOSUPP in EA-stdlib + SVAL(EVT_SLOT_B, 0xc000c) + TEXTSHOW(0x8dd) + TEXTEND + REMA + ENUT(226) + ENDA +}; + +CONST_DATA EventScr EventScrWM_Ch2_Beginning[] = { + EVBIT_MODIFY(0x1) + WM_SPAWNLORD(WM_MU_0, CHARACTER_EIRIKA, WM_NODE_CastleFrelia) + WM_CENTERCAMONLORD(WM_MU_0) + WM_FADEOUT(0) + WM_TEXTDECORATE // WaitFade + EVBIT_MODIFY(0x0) + STAL(20) + WM_CREATENEXTDESTINATION + WM_WAITFORFX + STAL(40) + WM_DRAWPATH(WM_PATH_01) + STAL(70) + MUSC(0x4) + SVAL(EVT_SLOT_2, EventScrWM_Ch2_BeginningTutorial) + CALL(EventScr_CallOnTutorialMode) + WM_MAKELORDVISIBLE(WM_MU_0) + EVBIT_MODIFY(0x1) + CALL(EventScr_RemoveBGIfNeeded) + ENDA +}; + +CONST_DATA EventScr EventScrWM_Ch2_ChapterIntro[] = { + STAL(6) + WM_MOVECAM(-1, -1, 0, 32, 45, 0) + WM_WAITFORCAM + CALL(EventScr_WM_FadeCommon) + WM_TEXTSTART + WM_SHOWPORTRAIT(0, 0x0052, 0x0534, 0) + STAL(6) + WM_TEXT(0x08DE, 0) + TEXTEND + WM_CLEARPORTRAIT(0, 0x0634, 0) + STAL(60) + WM_SHOWPORTRAIT(0, 0x0008, 0x0534, 0) + STAL(6) + STAL(46) + WM_SHOWPORTRAIT(1, 0x0007, 0x02BC, 0) + STAL(6) + TEXTCONT + TEXTEND + WM_CLEARPORTRAIT(0, 0x0634, 0) + STAL(46) + WM_CLEARPORTRAIT(1, 0x01BC, 0) + STAL(60) + WM_SHOWPORTRAIT(0, 0x0002, 0x02BC, 0) + STAL(6) + TEXTCONT + TEXTEND + STAL(46) + WM_CLEARPORTRAIT(0, 0x01BC, 0) + STAL(46) + WM_SHOWDRAWNMAP(0, -8, 0x3) + STAL(120) + WM_MOVECAM2(0, -8, 0, 48, 70, 0) + STAL(85) + WM_PLACEDOT(0, 0, WM_NODE_Renvall2, 1) + TEXTCONT + TEXTEND + STAL(30) + WM_FXCLEAR1(-0x1) + WM_FXCLEAR2(-0x1) + WmEvtRemoveBigMap // WM_WAITFORFXCLEAR1 + WmEvtWaitBigMapRemove // WM_WAITFORFXCLEAR2 + TEXTCONT + TEXTEND + WM_MOVESPRITETO(WM_MU_0, 0x0002, WM_NODE_CastleFrelia, WM_NODE_Ide, 200, 30) + TEXTCONT + TEXTEND + WM_WAITFORSPRITES(WM_MU_ANY) + WM_REMOVETEXT + STAL(2) + STAL(20) + FADI(16) + ENDA +}; diff --git a/src/events/ch3-wm.h b/src/events/ch3-wm.h new file mode 100644 index 000000000..d1866ed23 --- /dev/null +++ b/src/events/ch3-wm.h @@ -0,0 +1,88 @@ +#pragma once + +#include "global.h" +#include "event.h" +#include "eventinfo.h" +#include "eventcall.h" +#include "eventscript.h" +#include "ea-stdlib.h" +#include "constants/characters.h" +#include "constants/classes.h" + +CONST_DATA EventScr EventScrWM_Ch3_BeginningTutorial[] = { + EvtTextStartType5 // ENOSUPP in EA-stdlib + SVAL(EVT_SLOT_B, 0x4000c) + TEXTSHOW(0x8df) + TEXTEND + REMA + ENUT(227) + ENUT(228) + ENDA +}; + +CONST_DATA EventScr EventScrWM_Ch3_Beginning[] = { + EVBIT_MODIFY(0x1) + WM_SPAWNLORD(WM_MU_0, CHARACTER_EIRIKA, WM_NODE_Ide) + WM_CENTERCAMONLORD(WM_MU_0) + WM_FADEOUT(0) + WM_TEXTDECORATE // WaitFade + EVBIT_MODIFY(0x0) + STAL(20) + WM_CREATENEXTDESTINATION + WM_WAITFORFX + STAL(40) + WM_DRAWPATH(WM_PATH_02) + STAL(70) + MUSC(0x4) + SVAL(EVT_SLOT_2, EventScrWM_Ch3_BeginningTutorial) + CALL(EventScr_CallOnTutorialMode) + WM_MAKELORDVISIBLE(WM_MU_0) + EVBIT_MODIFY(0x1) + CALL(EventScr_RemoveBGIfNeeded) + ENDA +}; + +CONST_DATA EventScr EventScrWM_Ch3_ChapterIntro[] = { + STAL(6) + WM_MOVECAM(-1, -1, 0, 72, 60, 0) + WM_WAITFORCAM + CALL(EventScr_WM_FadeCommon) + WM_TEXTSTART + PUTSPRITE(WM_MU_3, CLASS_EIRIKA_LORD, FACTION_ID_BLUE, WM_NODE_Ide) + WM_MAKELORDVISIBLE(WM_MU_3) + WM_MAKELORDDISAPPEAR(WM_MU_0) + PUTSPRITE(WM_MU_2, CLASS_THIEF, FACTION_ID_RED, WM_NODE_Ide) + WM_MOVESPRITETO(WM_MU_2, 0x0003, WM_NODE_Ide, WM_NODE_BorgoRidge, -4, 0) + WM_WAITFORSPRITES(WM_MU_2) + WM_REMSPRITE(WM_MU_2) + WM_SHOWPORTRAIT(0, 0x0002, 0x0534, 0) + STAL(6) + STAL(46) + WM_TEXT(0x08E0, 0) + TEXTEND + WM_MAKELORDVISIBLE(WM_MU_0) + WM_REMSPRITE(WM_MU_3) + WM_CLEARPORTRAIT(0, 0x0634, 0) + STAL(46) + PUTSPRITE(WM_MU_2, CLASS_BRIGAND, FACTION_ID_GREEN, WM_NODE_BorgoRidge) + WM_FADEINSPRITE(WM_MU_2, 60) + WM_SHOWPORTRAIT(0, 0x0033, 0x02BC, 0) + STAL(6) + STAL(46) + TEXTCONT + TEXTEND + WM_CLEARPORTRAIT(0, 0x01BC, 0) + STAL(46) + WM_FADEOUTSPRITE(WM_MU_2, 60) + WM_MOVESPRITETO(WM_MU_0, 0x0000, WM_NODE_Ide, WM_NODE_BorgoRidge, -4, 0) + WM_WAITFORSPRITES(WM_MU_ANY) + WM_WAITFORSPRITELOAD + WM_REMSPRITE(WM_MU_2) + TEXTCONT + TEXTEND + WM_REMOVETEXT + STAL(2) + STAL(20) + FADI(16) + ENDA +}; diff --git a/src/events/ch4-wm.h b/src/events/ch4-wm.h new file mode 100644 index 000000000..1b7bf66c5 --- /dev/null +++ b/src/events/ch4-wm.h @@ -0,0 +1,62 @@ +#pragma once + +#include "global.h" +#include "event.h" +#include "eventinfo.h" +#include "eventcall.h" +#include "eventscript.h" +#include "ea-stdlib.h" +#include "constants/characters.h" +#include "constants/classes.h" + +CONST_DATA EventScr EventScrWM_Ch4_Beginning[] = { + EVBIT_MODIFY(0x1) + WM_SPAWNLORD(WM_MU_0, CHARACTER_EIRIKA, WM_NODE_BorgoRidge) + WM_CENTERCAMONLORD(WM_MU_0) + WM_FADEOUT(0) + WM_TEXTDECORATE // WaitFade + EVBIT_MODIFY(0x0) + STAL(20) + WM_CREATENEXTDESTINATION + WM_WAITFORFX + STAL(40) + WM_DRAWPATH(WM_PATH_03) + STAL(70) + WM_MAKELORDVISIBLE(WM_MU_0) + EVBIT_MODIFY(0x1) + CALL(EventScr_RemoveBGIfNeeded) + ENDA +}; + +CONST_DATA EventScr EventScrWM_Ch4_ChapterIntro[] = { + STAL(6) + WM_MOVECAM(-1, -1, 22, 94, 60, 0) + WM_WAITFORCAM + CALL(EventScr_WM_FadeCommon) + WM_TEXTSTART + WM_SHOWPORTRAIT(0, 0x0002, 0x0534, 0) + STAL(6) + STAL(46) + WM_TEXT(0x08E1, 0) + TEXTEND + WM_MOVESPRITETO(WM_MU_0, 0x0000, WM_NODE_BorgoRidge, WM_NODE_ZahaWoods, -8, 0) + TEXTCONT + TEXTEND + WM_WAITFORSPRITES(WM_MU_ANY) + PUTSPRITE(WM_MU_2, CLASS_REVENANT, FACTION_ID_GREEN, WM_NODE_BorderMulan) + PUTSPRITE(WM_MU_3, CLASS_REVENANT, FACTION_ID_GREEN, WM_NODE_BorderMulan) + WM_PUTSPRITE(WM_MU_2, 0x8c, 0xa8) + WM_PUTSPRITE(WM_MU_3, 0x9e, 0xa8) + WM_FADEINSPRITE(WM_MU_2, 60) + WM_FADEINSPRITE(WM_MU_3, 60) + TEXTCONT + TEXTEND + WM_WAITFORSPRITELOAD + WM_REMOVETEXT + STAL(2) + STAL(20) + FADI(16) + WM_REMSPRITE(WM_MU_2) + WM_REMSPRITE(WM_MU_3) + ENDA +}; diff --git a/src/events/ch5-wm.h b/src/events/ch5-wm.h new file mode 100644 index 000000000..c3e24100c --- /dev/null +++ b/src/events/ch5-wm.h @@ -0,0 +1,130 @@ +#pragma once + +#include "global.h" +#include "event.h" +#include "eventinfo.h" +#include "eventcall.h" +#include "eventscript.h" +#include "ea-stdlib.h" +#include "constants/characters.h" +#include "constants/classes.h" + +CONST_DATA EventScr EventScrWM_Ch5_Beginning[] = { + CHECK_EVENTID(136) + BEQ(0x1, EVT_SLOT_C, EVT_SLOT_0) + CALL(EventScrWM_08A3A268) + GOTO(0x2) +LABEL(0x1) + EVBIT_MODIFY(0x1) + WM_SPAWNLORD(WM_MU_0, CHARACTER_EIRIKA, WM_NODE_ZahaWoods) + WM_CENTERCAMONLORD(WM_MU_0) + WM_FADEOUT(0) + WM_TEXTDECORATE // WaitFade + EVBIT_MODIFY(0x0) + STAL(20) + WM_CREATENEXTDESTINATION + WM_WAITFORFX + STAL(40) + WM_DRAWPATH(WM_PATH_04) + STAL(70) + WM_MAKELORDVISIBLE(WM_MU_0) + EVBIT_MODIFY(0x1) + CALL(EventScr_RemoveBGIfNeeded) +LABEL(0x2) + ENDA +}; + +CONST_DATA EventScr EventScrWM_08A3A268[] = { + EVBIT_MODIFY(0x1) + WM_SPAWNLORD(WM_MU_0, CHARACTER_EIRIKA, WM_NODE_Renvall2) + WmEvtSetCamToNode(WM_NODE_AdlasPlains) // ENOSUPP in EA-stdlib + WM_FADEOUT(0) + WM_TEXTDECORATE // WaitFade + EVBIT_MODIFY(0x0) + WM_MOVESPRITETO(WM_MU_0, 0x0004, WM_NODE_Renvall2, WM_NODE_AdlasPlains, -2, 0) + WM_WAITFORSPRITES(WM_MU_0) + WM_MOVESPRITETO(WM_MU_0, 0x0004, WM_NODE_AdlasPlains, WM_NODE_Serafew, -2, 0) + WM_WAITFORSPRITES(WM_MU_0) + WmEvtSetUnitOnNode(WM_MU_0, WM_NODE_Serafew) // ENOSUPP in EA-stdlib + WmEvtSetNextStoryNode(WM_NODE_Serafew) // ENOSUPP in EA-stdlib + SKIPWN + ENDA +}; + +CONST_DATA EventScr EventScrWM_Ch5_ChapterIntro[] = { + CHECK_EVENTID(136) + BEQ(0x1, EVT_SLOT_C, EVT_SLOT_0) + CALL(EventScrWM_08A3A4D0) + GOTO(0x2) +LABEL(0x1) + STAL(6) + WM_MOVECAM(-1, -1, 26, 112, 60, 0) + WM_WAITFORCAM + CALL(EventScr_WM_FadeCommon) + STAL(60) + WM_TEXTSTART + WM_SHOWDRAWNMAP(0, 0, 0x3) + STAL(120) + PUTSPRITE(WM_MU_2, CLASS_REVENANT, FACTION_ID_GREEN, WM_NODE_BorderMulan) + PUTSPRITE(WM_MU_3, CLASS_REVENANT, FACTION_ID_GREEN, WM_NODE_BorderMulan) + PUTSPRITE(WM_MU_4, CLASS_REVENANT, FACTION_ID_GREEN, WM_NODE_BorderMulan) + PUTSPRITE(WM_MU_5, CLASS_REVENANT, FACTION_ID_GREEN, WM_NODE_BorderMulan) + PUTSPRITE(WM_MU_6, CLASS_REVENANT, FACTION_ID_GREEN, WM_NODE_BorderMulan) + WM_PUTSPRITE(WM_MU_2, 0x28, 0x5e) + WM_PUTSPRITE(WM_MU_3, 0x4e, 0x3d) + WM_PUTSPRITE(WM_MU_4, 0x89, 0x4e) + WM_PUTSPRITE(WM_MU_5, 0xaa, 0x2d) + WM_PUTSPRITE(WM_MU_6, 0xbf, 0x5b) + WM_FADEINSPRITE(WM_MU_2, 60) + WM_FADEINSPRITE(WM_MU_3, 60) + WM_FADEINSPRITE(WM_MU_4, 60) + WM_FADEINSPRITE(WM_MU_5, 60) + WM_FADEINSPRITE(WM_MU_6, 60) + WM_TEXT(0x08E2, 0) + TEXTEND + WM_WAITFORSPRITELOAD + WM_FADEOUTSPRITE(WM_MU_2, 60) + WM_FADEOUTSPRITE(WM_MU_3, 60) + WM_FADEOUTSPRITE(WM_MU_4, 60) + WM_FADEOUTSPRITE(WM_MU_5, 60) + WM_FADEOUTSPRITE(WM_MU_6, 60) + WM_WAITFORSPRITELOAD + WM_REMSPRITE(WM_MU_2) + WM_REMSPRITE(WM_MU_3) + WM_REMSPRITE(WM_MU_4) + WM_REMSPRITE(WM_MU_5) + WM_REMSPRITE(WM_MU_6) + WmEvtRemoveBigMap // WM_WAITFORFXCLEAR1 + WM_FADEOUTSPRITE(WM_MU_0, 1) + WmEvtWaitBigMapRemove // WM_WAITFORFXCLEAR2 + WM_SHOWPORTRAIT(0, 0x0002, 0x0534, 0) + STAL(6) + STAL(46) + TEXTCONT + TEXTEND + TEXTCONT + TEXTEND + PUTSPRITE(WM_MU_2, CLASS_ARMOR_KNIGHT, FACTION_ID_GREEN, WM_NODE_Serafew) + WM_FADEINSPRITE(WM_MU_2, 60) + TEXTCONT + TEXTEND + WM_WAITFORSPRITELOAD + STAL(14) + WM_FADEOUTSPRITE(WM_MU_2, 60) + WM_MOVESPRITETO(WM_MU_0, 0x0002, WM_NODE_ZahaWoods, WM_NODE_Serafew, -4, 0) + WM_WAITFORSPRITELOAD + WM_WAITFORSPRITES(WM_MU_ANY) + STAL(20) + WM_REMOVETEXT + STAL(2) + STAL(20) + FADI(16) + WM_REMSPRITE(WM_MU_2) +LABEL(0x2) + ENDA +}; + +CONST_DATA EventScr EventScrWM_08A3A4D0[] = { + FADI(16) + ENDA +}; diff --git a/src/events/ch6-wm.h b/src/events/ch6-wm.h new file mode 100644 index 000000000..34639b851 --- /dev/null +++ b/src/events/ch6-wm.h @@ -0,0 +1,57 @@ +#pragma once + +#include "global.h" +#include "event.h" +#include "eventinfo.h" +#include "eventcall.h" +#include "eventscript.h" +#include "ea-stdlib.h" +#include "constants/characters.h" +#include "constants/classes.h" + +CONST_DATA EventScr EventScrWM_Ch6_Beginning[] = { + EVBIT_MODIFY(0x1) + WM_SPAWNLORD(WM_MU_0, CHARACTER_EIRIKA, WM_NODE_Serafew) + WM_CENTERCAMONLORD(WM_MU_0) + WM_FADEOUT(0) + WM_TEXTDECORATE // WaitFade + EVBIT_MODIFY(0x0) + STAL(20) + WM_CREATENEXTDESTINATION + WM_WAITFORFX + STAL(40) + WM_DRAWPATH(WM_PATH_05) + STAL(70) + WM_MAKELORDVISIBLE(WM_MU_0) + EVBIT_MODIFY(0x1) + CALL(EventScr_RemoveBGIfNeeded) + ENDA +}; + +CONST_DATA EventScr EventScrWM_Ch6_ChapterIntro[] = { + STAL(6) + WM_MOVECAM(-1, -1, 48, 132, 60, 0) + WM_WAITFORCAM + CALL(EventScr_WM_FadeCommon) + WM_TEXTSTART + WM_SHOWPORTRAIT(0, 0x0002, 0x0534, 0) + STAL(6) + STAL(46) + WM_TEXT(0x08E3, 0) + TEXTEND + TEXTCONT + TEXTEND + WM_MOVESPRITETO(WM_MU_0, 0x0002, WM_NODE_Serafew, WM_NODE_AdlasPlains, -4, 0) + TEXTCONT + TEXTEND + TEXTCONT + TEXTEND + WM_WAITFORSPRITES(WM_MU_ANY) + TEXTCONT + TEXTEND + WM_REMOVETEXT + STAL(2) + STAL(20) + FADI(16) + ENDA +}; diff --git a/src/events/ch7-wm.h b/src/events/ch7-wm.h new file mode 100644 index 000000000..74e527c13 --- /dev/null +++ b/src/events/ch7-wm.h @@ -0,0 +1,56 @@ +#pragma once + +#include "global.h" +#include "event.h" +#include "eventinfo.h" +#include "eventcall.h" +#include "eventscript.h" +#include "ea-stdlib.h" +#include "constants/characters.h" +#include "constants/classes.h" + +CONST_DATA EventScr EventScrWM_Ch7_Beginning[] = { + EVBIT_MODIFY(0x1) + WM_SPAWNLORD(WM_MU_0, CHARACTER_EIRIKA, WM_NODE_AdlasPlains) + WM_CENTERCAMONLORD(WM_MU_0) + WM_FADEOUT(0) + WM_TEXTDECORATE // WaitFade + EVBIT_MODIFY(0x0) + STAL(20) + WM_CREATENEXTDESTINATION + WM_WAITFORFX + STAL(40) + WM_DRAWPATH(WM_PATH_06) + STAL(70) + WM_MAKELORDVISIBLE(WM_MU_0) + EVBIT_MODIFY(0x1) + CALL(EventScr_RemoveBGIfNeeded) + ENDA +}; + +CONST_DATA EventScr EventScrWM_Ch7_ChapterIntro[] = { + STAL(6) + WM_MOVECAM(-1, -1, 84, 152, 60, 0) + WM_WAITFORCAM + CALL(EventScr_WM_FadeCommon) + WM_TEXTSTART + WM_TEXT(0x08E4, 0) + TEXTEND + WM_SHOWPORTRAIT(0, 0x0002, 0x0534, 0) + STAL(6) + STAL(46) + TEXTCONT + TEXTEND + WM_MOVESPRITETO(WM_MU_0, 0x0002, WM_NODE_AdlasPlains, WM_NODE_Renvall1, -8, 0) + TEXTCONT + TEXTEND + TEXTCONT + TEXTEND + WM_WAITFORSPRITES(WM_MU_ANY) + WM_REMOVETEXT + STAL(2) + STAL(20) + FADI(16) + WM_REMSPRITE(WM_MU_2) + ENDA +}; diff --git a/src/events/ch8-wm.h b/src/events/ch8-wm.h new file mode 100644 index 000000000..8c32d24dd --- /dev/null +++ b/src/events/ch8-wm.h @@ -0,0 +1,30 @@ +#pragma once + +#include "global.h" +#include "event.h" +#include "eventinfo.h" +#include "eventcall.h" +#include "eventscript.h" +#include "ea-stdlib.h" +#include "constants/characters.h" +#include "constants/classes.h" + +CONST_DATA EventScr EventScrWM_Ch8_Beginning[] = { + EVBIT_MODIFY(0x1) + WM_SPAWNLORD(WM_MU_0, CHARACTER_EIRIKA, WM_NODE_Renvall2) + WM_CENTERCAMONLORD(WM_MU_0) + WM_REMOVELOCATION(WM_NODE_Renvall1) + WM_REMOVEPATH(WM_PATH_06) + WM_LOADLOCATION2(WM_NODE_Renvall2) + WM_SETDESTINATION(WM_NODE_Renvall2) + WM_DRAWPATH2(WM_PATH_07) + WmEvtSetUnitOnNode(WM_MU_0, WM_NODE_Renvall2) // ENOSUPP in EA-stdlib + SKIPWN + ENDA +}; + +CONST_DATA EventScr EventScrWM_Ch8_ChapterIntro[] = { + EVBIT_MODIFY(0x1) + ENUT(136) + ENDA +}; diff --git a/src/events/messed-eventscr-wm.h b/src/events/messed-eventscr-wm.h new file mode 100644 index 000000000..8255d40d4 --- /dev/null +++ b/src/events/messed-eventscr-wm.h @@ -0,0 +1,1838 @@ +#pragma once + +#include "global.h" +#include "event.h" +#include "eventinfo.h" +#include "eventcall.h" +#include "eventscript.h" +#include "ea-stdlib.h" +#include "constants/characters.h" +#include "constants/classes.h" + +CONST_DATA EventScr EventScrWM_08A3A70C[] = { + EvtTextStartType5 // ENOSUPP in EA-stdlib + SVAL(EVT_SLOT_B, 0x54000c) + TEXTSHOW(0x8e5) + TEXTEND + REMA + ENUT(229) + ENUT(235) + ENDA +}; + +CONST_DATA EventScr EventScrWM_Ch9a_Beginning[] = { + EVBIT_MODIFY(0x1) + WM_SPAWNLORD(WM_MU_0, CHARACTER_EIRIKA, WM_NODE_CastleFrelia) + WM_CENTERCAMONLORD(WM_MU_0) + WM_FADEOUT(0) + WM_TEXTDECORATE // WaitFade + EVBIT_MODIFY(0x0) + STAL(26) + WM_MOVECAM(-1, -1, 32, 0, 90, 0) + WM_WAITFORCAM + STAL(6) + STAL(20) + WM_LOADLOCATION3(WM_NODE_TowerOfValni) + WM_WAITFORFX + STAL(40) + WM_DRAWPATH(WM_PATH_09) + STAL(70) + STAL(20) + WM_CREATENEXTDESTINATION + WM_WAITFORFX + STAL(40) + WM_DRAWPATH(WM_PATH_08) + STAL(70) + WmEvtMoveCamToUnit(-1, -1, WM_MU_0, 46, 0) // ENOSUPP in EA-stdlib + STAL(60) + WM_WAITFORCAM + MUSC(0x5) + CALL(EventScrWM_08A3A70C) + WM_MAKELORDVISIBLE(WM_MU_0) + EVBIT_MODIFY(0x1) + CALL(EventScr_RemoveBGIfNeeded) + ENDA +}; + +CONST_DATA EventScr EventScrWM_Ch9a_ChapterIntro[] = { + STAL(6) + WM_MOVECAM(-1, -1, 64, 0, 60, 0) + WM_WAITFORCAM + CALL(EventScr_WM_FadeCommon) + STAL(60) + WM_TEXTSTART + WM_SHOWDRAWNMAP(0, -8, 0x3) + STAL(120) + WM_HIGHLIGHT(WM_NATION_Rausten) + STAL(30) + WM_TEXT(0x08E6, 0) + TEXTEND + WM_HIGHLIGHTCLEAR1(WM_NATION_Rausten) + WM_HIGHLIGHTCLEAR2(WM_NATION_Rausten) + WmEvtRemoveBigMap // WM_WAITFORFXCLEAR1 + WmEvtWaitBigMapRemove // WM_WAITFORFXCLEAR2 + WM_MOVESPRITETO(WM_MU_0, 0x0002, WM_NODE_BorderMulan, WM_NODE_PortKiris, -4, 0) + TEXTCONT + TEXTEND + WM_WAITFORSPRITES(WM_MU_ANY) + WM_MAKELORDDISAPPEAR(WM_MU_0) + WM_SHOWDRAWNMAP(0, -8, 0x3) + STAL(120) + WM_HIGHLIGHT(WM_NATION_Carcino) + STAL(30) + TEXTCONT + TEXTEND + WM_HIGHLIGHTCLEAR1(WM_NATION_Carcino) + WM_HIGHLIGHTCLEAR2(WM_NATION_Carcino) + WM_SHOWPORTRAIT(0, 0x0054, 0x02BC, 0) + STAL(6) + STAL(46) + TEXTCONT + TEXTEND + WM_SHOWPORTRAIT(1, 0x0052, 0x0534, 0) + STAL(6) + STAL(46) + TEXTCONT + TEXTEND + WM_CLEARPORTRAIT(0, 0x01BC, 0) + STAL(46) + WM_CLEARPORTRAIT(1, 0x0634, 0) + STAL(46) + WmEvtRemoveBigMap // WM_WAITFORFXCLEAR1 + WmEvtWaitBigMapRemove // WM_WAITFORFXCLEAR2 + WM_MOVECAM(-1, -1, 98, 28, 70, 10) + STAL(30) + WM_SHOWPORTRAIT(0, 0x000F, 0x02BC, 0) + STAL(6) + STAL(46) + PUTSPRITE(WM_MU_2, CLASS_SNIPER, FACTION_ID_BLUE, WM_NODE_PortKiris) + WM_MOVESPRITETO(WM_MU_2, 0x0003, WM_NODE_PortKiris, WM_NODE_TerazPlateau, 180, 0) + WM_WAITFORCAM + TEXTCONT + TEXTEND + WM_WAITFORCAM + WM_WAITFORSPRITES(WM_MU_ANY) + WM_CLEARPORTRAIT(0, 0x01BC, 0) + STAL(46) + WM_REMSPRITE(WM_MU_2) + STAL(90) + WM_REMOVETEXT + STAL(2) + STAL(20) + FADI(16) + ENDA +}; + +CONST_DATA EventScr EventScrWM_Ch10a_Beginning[] = { + EVBIT_MODIFY(0x1) + WM_SPAWNLORD(WM_MU_0, CHARACTER_EIRIKA, WM_NODE_PortKiris) + WM_CENTERCAMONLORD(WM_MU_0) + WM_FADEOUT(0) + WM_TEXTDECORATE // WaitFade + EVBIT_MODIFY(0x0) + STAL(20) + WM_CREATENEXTDESTINATION + WM_WAITFORFX + STAL(40) + WM_DRAWPATH(WM_PATH_0A) + STAL(70) + WM_MAKELORDVISIBLE(WM_MU_0) + EVBIT_MODIFY(0x1) + CALL(EventScr_RemoveBGIfNeeded) + ENDA +}; + +CONST_DATA EventScr EventScrWM_08A3A9EC[] = { + STAL(6) + WM_MOVECAM(-1, -1, 86, 20, 60, 0) + WM_WAITFORCAM + CALL(EventScr_WM_FadeCommon) + STAL(60) + WM_TEXTSTART + WM_SHOWDRAWNMAP(0, -8, 0x3) + STAL(120) + WM_HIGHLIGHT(WM_NATION_Carcino) + STAL(30) + WM_TEXT(0x08E7, 0) + TEXTEND + WM_HIGHLIGHTCLEAR1(WM_NATION_Carcino) + WM_HIGHLIGHTCLEAR2(WM_NATION_Carcino) + WmEvtRemoveBigMap // WM_WAITFORFXCLEAR1 + WmEvtWaitBigMapRemove // WM_WAITFORFXCLEAR2 + WM_SHOWPORTRAIT(0, 0x000F, 0x0534, 0) + STAL(6) + STAL(46) + PUTSPRITE(WM_MU_2, CLASS_SNIPER, FACTION_ID_BLUE, WM_NODE_TerazPlateau) + WM_FADEINSPRITE(WM_MU_2, 60) + WM_WAITFORSPRITELOAD + TEXTCONT + TEXTEND + PUTSPRITE(WM_MU_3, CLASS_MERCENARY, FACTION_ID_GREEN, WM_NODE_BorderMulan) + PUTSPRITE(WM_MU_4, CLASS_MERCENARY, FACTION_ID_GREEN, WM_NODE_BorderMulan) + WM_PUTSPRITE(WM_MU_3, 0xd8, 0x58) + WM_PUTSPRITE(WM_MU_4, 0xd8, 0x78) + WM_FADEINSPRITE(WM_MU_3, 60) + WM_FADEINSPRITE(WM_MU_4, 60) + WM_WAITFORSPRITELOAD + TEXTCONT + TEXTEND + WM_CLEARPORTRAIT(0, 0x0200, 0) + WM_FADEOUTSPRITE(WM_MU_2, 60) + WM_WAITFORSPRITELOAD + STAL(16) + WM_FADEOUTSPRITE(WM_MU_3, 60) + WM_FADEOUTSPRITE(WM_MU_4, 60) + WM_WAITFORSPRITELOAD + WM_REMSPRITE(WM_MU_2) + WM_REMSPRITE(WM_MU_3) + WM_REMSPRITE(WM_MU_4) + WM_MOVESPRITETO(WM_MU_0, 0x0000, WM_NODE_PortKiris, WM_NODE_TerazPlateau, -4, 0) + TEXTCONT + TEXTEND + WM_WAITFORSPRITES(WM_MU_ANY) + STAL(40) + WM_REMOVETEXT + STAL(2) + STAL(20) + FADI(16) + ENDA +}; + +CONST_DATA EventScr EventScrWM_Ch12a_Beginning[] = { + WM_MAKELORDVISIBLE(WM_MU_0) + EVBIT_MODIFY(0x1) + CALL(EventScr_RemoveBGIfNeeded) + ENDA +}; + +CONST_DATA EventScr EventScrWM_08A3AB68[] = { + ENDA +}; + +CONST_DATA EventScr EventScrWM_Ch13a_Beginning[] = { + EVBIT_MODIFY(0x1) + WM_SPAWNLORD(WM_MU_0, CHARACTER_EIRIKA, WM_NODE_CaerPelyn) + WM_CENTERCAMONLORD(WM_MU_0) + WM_FADEOUT(0) + WM_TEXTDECORATE // WaitFade + EVBIT_MODIFY(0x0) + STAL(20) + WM_CREATENEXTDESTINATION + WM_WAITFORFX + STAL(40) + WM_DRAWPATH(WM_PATH_0C) + STAL(70) + WM_MAKELORDVISIBLE(WM_MU_0) + EVBIT_MODIFY(0x1) + CALL(EventScr_RemoveBGIfNeeded) + ENDA +}; + +CONST_DATA EventScr EventScrWM_08A3ABC8[] = { + STAL(6) + WM_MOVECAM(-1, -1, 168, 62, 60, 0) + WM_WAITFORCAM + CALL(EventScr_WM_FadeCommon) + STAL(60) + WM_TEXTSTART + WM_SHOWDRAWNMAP(0, 30, 0x3) + STAL(120) + WM_HIGHLIGHT(WM_NATION_Jehanna) + STAL(30) + WM_TEXT(0x08E9, 0) + TEXTEND + WM_HIGHLIGHTCLEAR1(WM_NATION_Jehanna) + WM_HIGHLIGHTCLEAR2(WM_NATION_Jehanna) + WmEvtRemoveBigMap // WM_WAITFORFXCLEAR1 + WmEvtWaitBigMapRemove // WM_WAITFORFXCLEAR2 + WM_SHOWPORTRAIT(0, 0x0056, 0x02BC, 0) + STAL(6) + STAL(46) + TEXTCONT + TEXTEND + WM_CLEARPORTRAIT(0, 0x0100, 0) + STAL(46) + WM_SHOWPORTRAIT(0, 0x0002, 0x0534, 0) + STAL(6) + STAL(46) + WM_MOVESPRITETO(WM_MU_0, 0x0000, WM_NODE_CaerPelyn, WM_NODE_HamillCanyon, -4, 0) + TEXTCONT + TEXTEND + WM_CLEARPORTRAIT(0, 0x0200, 0) + STAL(30) + WM_WAITFORSPRITES(WM_MU_ANY) + STAL(20) + WM_REMOVETEXT + STAL(2) + STAL(20) + FADI(16) + ENDA +}; + +CONST_DATA EventScr EventScrWM_Ch14a_Beginning[] = { + EVBIT_MODIFY(0x1) + WM_SPAWNLORD(WM_MU_0, CHARACTER_EIRIKA, WM_NODE_HamillCanyon) + WM_CENTERCAMONLORD(WM_MU_0) + WM_FADEOUT(0) + WM_TEXTDECORATE // WaitFade + EVBIT_MODIFY(0x0) + STAL(30) + WM_MOVECAM(-1, -1, -1, 86, 45, 0) + WM_WAITFORCAM + STAL(20) + WM_CREATENEXTDESTINATION + WM_WAITFORFX + STAL(40) + WM_DRAWPATH(WM_PATH_0D) + STAL(70) + STAL(26) + WmEvtMoveCamToUnit(-1, -1, WM_MU_0, 26, 0) // ENOSUPP in EA-stdlib + WM_WAITFORCAM + STAL(26) + WM_MAKELORDVISIBLE(WM_MU_0) + EVBIT_MODIFY(0x1) + CALL(EventScr_RemoveBGIfNeeded) + ENDA +}; + +CONST_DATA EventScr EventScrWM_08A3AD40[] = { + STAL(6) + WM_MOVECAM(-1, -1, 196, 108, 60, 0) + WM_WAITFORCAM + CALL(EventScr_WM_FadeCommon) + STAL(60) + WM_TEXTSTART + WM_SHOWPORTRAIT(0, 0x0022, 0x02BC, 0) + STAL(6) + STAL(46) + WM_TEXT(0x08EA, 0) + TEXTEND + WM_SHOWPORTRAIT(1, 0x0002, 0x0534, 0) + STAL(6) + STAL(46) + TEXTCONT + TEXTEND + PUTSPRITE(WM_MU_2, CLASS_HERO, FACTION_ID_GREEN, WM_NODE_JehannaHall) + WM_FADEINSPRITE(WM_MU_2, 60) + WM_WAITFORSPRITELOAD + TEXTCONT + TEXTEND + WM_CLEARPORTRAIT(0, 0x0100, 0) + STAL(46) + WM_FADEOUTSPRITE(WM_MU_2, 60) + WM_MOVESPRITETO(WM_MU_0, 0x0000, WM_NODE_HamillCanyon, WM_NODE_JehannaHall, -4, 0) + TEXTCONT + TEXTEND + WM_SHOWPORTRAIT(0, 0x0056, 0x02BC, 0) + STAL(6) + STAL(46) + WM_WAITFORSPRITES(WM_MU_ANY) + WM_WAITFORSPRITELOAD + WM_REMSPRITE(WM_MU_2) + TEXTCONT + TEXTEND + WM_FADEOUTSPRITE(WM_MU_0, 60) + WM_CLEARPORTRAIT(1, 0x0200, 0) + STAL(20) + WM_CLEARPORTRAIT(0, 0x0100, 0) + STAL(46) + WM_WAITFORSPRITELOAD + WM_REMOVETEXT + STAL(2) + STAL(20) + FADI(16) + ENDA +}; + +CONST_DATA EventScr EventScrWM_Ch9b_Beginning[] = { + EVBIT_MODIFY(0x1) + WM_SPAWNLORD(WM_MU_0, CHARACTER_EPHRAIM, WM_NODE_CastleFrelia) + WM_CENTERCAMONLORD(WM_MU_0) + WM_MAKELORDVISIBLE(WM_MU_0) + WM_FADEOUT(0) + WM_TEXTDECORATE // WaitFade + EVBIT_MODIFY(0x0) + STAL(26) + WM_MOVECAM(-1, -1, 32, 0, 90, 0) + WM_WAITFORCAM + STAL(6) + STAL(20) + WM_LOADLOCATION3(WM_NODE_TowerOfValni) + WM_WAITFORFX + STAL(40) + WM_DRAWPATH(WM_PATH_09) + STAL(70) + WM_MOVECAM(-1, -1, 0, 32, 45, 0) + WM_WAITFORCAM + STAL(20) + WM_CREATENEXTDESTINATION + WM_WAITFORFX + STAL(40) + WM_DRAWPATH(WM_PATH_0E) + STAL(70) + WmEvtMoveCamToUnit(-1, -1, WM_MU_0, 46, 0) // ENOSUPP in EA-stdlib + STAL(60) + WM_WAITFORCAM + MUSC(0x6) + CALL(EventScrWM_08A3A70C) + WM_MAKELORDVISIBLE(WM_MU_0) + EVBIT_MODIFY(0x1) + CALL(EventScr_RemoveBGIfNeeded) + ENDA +}; + +CONST_DATA EventScr EventScrWM_08A3AF30[] = { + STAL(6) + WM_MOVECAM(-1, -1, 0, 32, 60, 0) + WM_WAITFORCAM + CALL(EventScr_WM_FadeCommon) + STAL(60) + WM_TEXTSTART + WM_SHOWPORTRAIT(0, 0x0014, 0x02BC, 0) + STAL(6) + WM_MOVESPRITETO(WM_MU_0, 0x0000, WM_NODE_CastleFrelia, WM_NODE_FortRigwald, -4, 0) + STAL(30) + WM_MOVECAM(-1, -1, 0, 64, 80, 0) + WM_WAITFORCAM + STAL(30) + WmEvtPasueMove(WM_MU_0) // ENOSUPP in EA-stdlib + WM_TEXT(0x08F1, 0) + TEXTEND + WM_CLEARPORTRAIT(0, 0x0100, 0) + STAL(46) + WM_SHOWPORTRAIT(0, 0x003D, 0x0534, 0) + STAL(6) + TEXTCONT + TEXTEND + STAL(46) + WM_SHOWPORTRAIT(1, 0x000F, 0x02BC, 0) + STAL(6) + TEXTCONT + TEXTEND + STAL(46) + WM_CLEARPORTRAIT(0, 0x0200, 0) + STAL(20) + WM_CLEARPORTRAIT(1, 0x0100, 0) + STAL(46) + TEXTCONT + TEXTEND + WM_SHOWPORTRAIT(0, 0x0014, 0x02BC, 0) + STAL(6) + TEXTCONT + TEXTEND + WM_WAITFORSPRITELOAD + PUTSPRITE(WM_MU_2, CLASS_WARRIOR, FACTION_ID_GREEN, WM_NODE_FortRigwald) + WM_FADEINSPRITE(WM_MU_2, 60) + TEXTCONT + TEXTEND + WM_WAITFORSPRITELOAD + WM_FADEOUTSPRITE(WM_MU_2, 60) + WmEvtResumeMove(WM_MU_0) // ENOSUPP in EA-stdlib + TEXTCONT + TEXTEND + WM_WAITFORSPRITES(WM_MU_ANY) + WM_WAITFORSPRITELOAD + WM_REMSPRITE(WM_MU_2) + STAL(20) + WM_REMOVETEXT + STAL(2) + STAL(20) + FADI(16) + ENDA +}; + +CONST_DATA EventScr EventScrWM_Ch10b_Beginning[] = { + EVBIT_MODIFY(0x1) + WM_SPAWNLORD(WM_MU_0, CHARACTER_EPHRAIM, WM_NODE_FortRigwald) + WM_CENTERCAMONLORD(WM_MU_0) + WM_SETCAM(0, 112) + WM_FADEOUT(0) + WM_TEXTDECORATE // WaitFade + EVBIT_MODIFY(0x0) + STAL(20) + WM_CREATENEXTDESTINATION + WM_WAITFORFX + STAL(40) + WM_DRAWPATH(WM_PATH_0F) + STAL(70) + STAL(26) + WmEvtMoveCamToUnit(-1, -1, WM_MU_0, 26, 0) // ENOSUPP in EA-stdlib + WM_WAITFORCAM + STAL(26) + WM_MAKELORDVISIBLE(WM_MU_0) + EVBIT_MODIFY(0x1) + CALL(EventScr_RemoveBGIfNeeded) + ENDA +}; + +CONST_DATA EventScr EventScrWM_08A3B10C[] = { + STAL(6) + WM_MOVECAM(-1, -1, 0, 122, 60, 0) + WM_WAITFORCAM + CALL(EventScr_WM_FadeCommon) + STAL(60) + WM_TEXTSTART + WM_SHOWPORTRAIT(0, 0x0025, 0x02BC, 0) + STAL(6) + WM_TEXT(0x08F2, 0) + TEXTEND + STAL(46) + WM_SHOWPORTRAIT(1, 0x0014, 0x0534, 0) + STAL(6) + TEXTCONT + TEXTEND + STAL(46) + WM_CLEARPORTRAIT(0, 0x0100, 0) + STAL(46) + TEXTCONT + TEXTEND + WM_CLEARPORTRAIT(1, 0x0200, 0) + STAL(46) + WM_MOVESPRITETO(WM_MU_0, 0x0002, WM_NODE_FortRigwald, WM_NODE_Bethroen, -4, 0) + WM_MOVECAM(-1, -1, 0, 152, 80, 60) + TEXTCONT + TEXTEND + WM_WAITFORCAM + WM_WAITFORSPRITES(WM_MU_ANY) + WM_REMOVETEXT + STAL(2) + STAL(20) + FADI(16) + ENDA +}; + +CONST_DATA EventScr EventScrWM_Ch12b_Beginning[] = { + WM_MAKELORDVISIBLE(WM_MU_0) + EVBIT_MODIFY(0x1) + CALL(EventScr_RemoveBGIfNeeded) + ENDA +}; + +CONST_DATA EventScr EventScrWM_08A3B1F0[] = { + ENDA +}; + +CONST_DATA EventScr EventScrWM_Ch13b_Beginning[] = { + EVBIT_MODIFY(0x1) + WM_SPAWNLORD(WM_MU_0, CHARACTER_EPHRAIM, WM_NODE_Taizel) + WM_CENTERCAMONLORD(WM_MU_0) + WM_FADEOUT(0) + WM_TEXTDECORATE // WaitFade + EVBIT_MODIFY(0x0) + STAL(20) + WM_CREATENEXTDESTINATION + WM_WAITFORFX + STAL(40) + WM_DRAWPATH(WM_PATH_11) + STAL(70) + WM_MAKELORDVISIBLE(WM_MU_0) + EVBIT_MODIFY(0x1) + CALL(EventScr_RemoveBGIfNeeded) + ENDA +}; + +CONST_DATA EventScr EventScrWM_08A3B250[] = { + STAL(6) + CALL(EventScr_WM_FadeCommon) + WM_MOVECAM(-1, -1, 60, 188, 80, 0) + WM_WAITFORCAM + STAL(60) + WM_TEXTSTART + WM_SHOWPORTRAIT(0, 0x0026, 0x02BC, 0) + STAL(6) + WM_TEXT(0x08F4, 0) + TEXTEND + STAL(46) + WM_CLEARPORTRAIT(0, 0x0100, 0) + STAL(46) + WM_MOVESPRITETO(WM_MU_0, 0x0002, WM_NODE_Taizel, WM_NODE_ZaalbulMarsh, -4, 0) + TEXTCONT + TEXTEND + WM_WAITFORSPRITES(WM_MU_ANY) + STAL(20) + WM_REMOVETEXT + STAL(2) + STAL(20) + FADI(16) + ENDA +}; + +CONST_DATA EventScr EventScrWM_Ch14b_Beginning[] = { + EVBIT_MODIFY(0x1) + WM_SPAWNLORD(WM_MU_0, CHARACTER_EPHRAIM, WM_NODE_ZaalbulMarsh) + WM_CENTERCAMONLORD(WM_MU_0) + WM_FADEOUT(0) + WM_TEXTDECORATE // WaitFade + EVBIT_MODIFY(0x0) + STAL(20) + WM_CREATENEXTDESTINATION + WM_WAITFORFX + STAL(40) + WM_DRAWPATH(WM_PATH_12) + STAL(70) + WM_MAKELORDVISIBLE(WM_MU_0) + EVBIT_MODIFY(0x1) + CALL(EventScr_RemoveBGIfNeeded) + ENDA +}; + +CONST_DATA EventScr EventScrWM_08A3B338[] = { + STAL(6) + CALL(EventScr_WM_FadeCommon) + WM_MOVECAM(-1, -1, 106, 200, 80, 0) + WM_WAITFORCAM + STAL(60) + WM_TEXTSTART + WM_SHOWPORTRAIT(0, 0x0026, 0x0534, 0) + STAL(6) + WM_TEXT(0x08F5, 0) + TEXTEND + STAL(46) + WM_CLEARPORTRAIT(0, 0x0200, 0) + STAL(46) + WM_SHOWPORTRAIT(0, 0x003F, 0x02BC, 0) + STAL(6) + TEXTCONT + TEXTEND + STAL(46) + WM_CLEARPORTRAIT(0, 0x0100, 0) + STAL(46) + WM_SHOWPORTRAIT(1, 0x0014, 0x0534, 0) + STAL(6) + TEXTCONT + TEXTEND + STAL(46) + WM_MOVESPRITETO(WM_MU_0, 0x0000, WM_NODE_ZaalbulMarsh, WM_NODE_GradoKeep, -4, 0) + STAL(100) + WmEvtPasueMove(WM_MU_0) // ENOSUPP in EA-stdlib + TEXTCONT + TEXTEND + PUTSPRITE(WM_MU_2, CLASS_GENERAL, FACTION_ID_GREEN, WM_NODE_GradoKeep) + WM_FADEINSPRITE(WM_MU_2, 60) + TEXTCONT + TEXTEND + WM_WAITFORSPRITELOAD + WM_CLEARPORTRAIT(0, 0x0100, 0) + WM_FADEOUTSPRITE(WM_MU_2, 60) + WmEvtResumeMove(WM_MU_0) // ENOSUPP in EA-stdlib + STAL(46) + WM_WAITFORSPRITELOAD + WM_WAITFORSPRITES(WM_MU_ANY) + WM_REMSPRITE(WM_MU_2) + STAL(20) + WM_REMOVETEXT + STAL(2) + STAL(20) + FADI(16) + ENDA +}; + +CONST_DATA EventScr EventScrWM_MelkaenCoast_Beginning[] = { + ENDA +}; + +CONST_DATA EventScr EventScrWM_08A3B460[] = { + ENDA +}; + +CONST_DATA EventScr EventScrWM_ValniTower1_Beginning[] = { + FADU(64) + ENDA +}; + +CONST_DATA EventScr EventScrWM_08A3B46C[] = { + MUSCFAST(0x7fff) + FADI(16) + ENDA +}; + +CONST_DATA EventScr EventScrWM_ValniTower2_Beginning[] = { + ENDA +}; + +CONST_DATA EventScr EventScrWM_08A3B47C[] = { + ENDA +}; + +CONST_DATA EventScr EventScrWM_ValniTower3_Beginning[] = { + ENDA +}; + +CONST_DATA EventScr EventScrWM_08A3B484[] = { + ENDA +}; + +CONST_DATA EventScr EventScrWM_ValniTower4_Beginning[] = { + ENDA +}; + +CONST_DATA EventScr EventScrWM_08A3B48C[] = { + ENDA +}; + +CONST_DATA EventScr EventScrWM_ValniTower5_Beginning[] = { + ENDA +}; + +CONST_DATA EventScr EventScrWM_08A3B494[] = { + ENDA +}; + +CONST_DATA EventScr EventScrWM_ValniTower6_Beginning[] = { + ENDA +}; + +CONST_DATA EventScr EventScrWM_08A3B49C[] = { + ENDA +}; + +CONST_DATA EventScr EventScrWM_ValniTower7_Beginning[] = { + ENDA +}; + +CONST_DATA EventScr EventScrWM_08A3B4A4[] = { + ENDA +}; + +CONST_DATA EventScr EventScrWM_ValniTower8_Beginning[] = { + ENDA +}; + +CONST_DATA EventScr EventScrWM_08A3B4AC[] = { + ENDA +}; + +CONST_DATA EventScr EventScrWM_08A3B4B0[] = { + ENDA +}; + +CONST_DATA EventScr EventScrWM_08A3B4B4[] = { + ENDA +}; + +CONST_DATA EventScr EventScrWM_08A3B4B8[] = { + ENDA +}; + +CONST_DATA EventScr EventScrWM_08A3B4BC[] = { + ENDA +}; + +CONST_DATA EventScr EventScrWM_LagdouRuins1_Beginning[] = { + ENDA +}; + +CONST_DATA EventScr EventScrWM_08A3B4C4[] = { + MUSCFAST(0x7fff) + FADI(16) + ENDA +}; + +CONST_DATA EventScr EventScrWM_LagdouRuins2_Beginning[] = { + ENDA +}; + +CONST_DATA EventScr EventScrWM_08A3B4D4[] = { + ENDA +}; + +CONST_DATA EventScr EventScrWM_LagdouRuins3_Beginning[] = { + ENDA +}; + +CONST_DATA EventScr EventScrWM_08A3B4DC[] = { + ENDA +}; + +CONST_DATA EventScr EventScrWM_LagdouRuins4_Beginning[] = { + ENDA +}; + +CONST_DATA EventScr EventScrWM_08A3B4E4[] = { + ENDA +}; + +CONST_DATA EventScr EventScrWM_LagdouRuins5_Beginning[] = { + ENDA +}; + +CONST_DATA EventScr EventScrWM_08A3B4EC[] = { + ENDA +}; + +CONST_DATA EventScr EventScrWM_LagdouRuins6_Beginning[] = { + ENDA +}; + +CONST_DATA EventScr EventScrWM_08A3B4F4[] = { + ENDA +}; + +CONST_DATA EventScr EventScrWM_LagdouRuins7_Beginning[] = { + ENDA +}; + +CONST_DATA EventScr EventScrWM_08A3B4FC[] = { + ENDA +}; + +CONST_DATA EventScr EventScrWM_LagdouRuins8_Beginning[] = { + ENDA +}; + +CONST_DATA EventScr EventScrWM_08A3B504[] = { + ENDA +}; + +CONST_DATA EventScr EventScrWM_LagdouRuins9_Beginning[] = { + ENDA +}; + +CONST_DATA EventScr EventScrWM_08A3B50C[] = { + ENDA +}; + +CONST_DATA EventScr EventScrWM_LagdouRuins10_Beginning[] = { + ENDA +}; + +CONST_DATA EventScr EventScrWM_08A3B514[] = { + ENDA +}; + +CONST_DATA EventScr EventScrWM_08A3B518[] = { + ENDA +}; + +CONST_DATA EventScr EventScrWM_08A3B51C[] = { + ENDA +}; + +CONST_DATA EventScr EventScrWM_08A3B520[] = { + ENDA +}; + +CONST_DATA EventScr EventScrWM_08A3B524[] = { + ENDA +}; + +CONST_DATA EventScr EventScrWM_Ch15a_Beginning[] = { + EVBIT_MODIFY(0x1) + WM_SPAWNLORD(WM_MU_0, CHARACTER_EIRIKA, WM_NODE_JehannaHall2) + WM_CENTERCAMONLORD(WM_MU_0) + WM_REMOVELOCATION(WM_NODE_JehannaHall) + WM_REMOVEPATH(WM_PATH_0D) + WM_LOADLOCATION2(WM_NODE_JehannaHall2) + WM_SETDESTINATION(WM_NODE_JehannaHall2) + WM_DRAWPATH2(WM_PATH_16) + WmEvtSetUnitOnNode(WM_MU_0, WM_NODE_JehannaHall2) // ENOSUPP in EA-stdlib + SKIPWN + WM_MAKELORDVISIBLE(WM_MU_0) + EVBIT_MODIFY(0x1) + CALL(EventScr_RemoveBGIfNeeded) + ENDA +}; + +CONST_DATA EventScr EventScrWM_08A3B58C[] = { + EVBIT_MODIFY(0x1) + ENDA +}; + +CONST_DATA EventScr EventScrWM_Ch16a_Beginning[] = { + EVBIT_MODIFY(0x1) + WM_SPAWNLORD(WM_MU_0, CHARACTER_EIRIKA, WM_NODE_JehannaHall2) + WM_CENTERCAMONLORD(WM_MU_0) + WM_LOADLOCATION2(WM_NODE_FortRigwald) + WM_LOADLOCATION2(WM_NODE_Bethroen) + WM_LOADLOCATION2(WM_NODE_Taizel) + WM_LOADLOCATION2(WM_NODE_ZaalbulMarsh) + WM_LOADLOCATION2(WM_NODE_GradoKeep) + WM_DRAWPATH2(WM_PATH_0E) + WM_DRAWPATH2(WM_PATH_0F) + WM_DRAWPATH2(WM_PATH_10) + WM_DRAWPATH2(WM_PATH_11) + WM_DRAWPATH2(WM_PATH_12) + WM_DRAWPATH2(WM_PATH_13) + WM_DRAWPATH2(WM_PATH_14) + WM_FADEOUT(0) + WM_TEXTDECORATE // WaitFade + EVBIT_MODIFY(0x0) + WM_MOVECAM(-1, -1, 145, 89, 45, 0) + WM_WAITFORCAM + STAL(20) + WM_CREATENEXTDESTINATION + WM_WAITFORFX + STAL(40) + WM_DRAWPATH(WM_PATH_15) + STAL(70) + WmEvtMoveCamToUnit(-1, -1, WM_MU_0, 30, 0) // ENOSUPP in EA-stdlib + STAL(60) + WM_MAKELORDVISIBLE(WM_MU_0) + EVBIT_MODIFY(0x1) + CALL(EventScr_RemoveBGIfNeeded) + ENDA +}; + +CONST_DATA EventScr EventScrWM_08A3B678[] = { + STAL(6) + WM_MOVECAM(-1, -1, 122, 108, 60, 0) + WM_WAITFORCAM + CALL(EventScr_WM_FadeCommon) + STAL(60) + WM_TEXTSTART + WM_TEXT(0x08EC, 0) + TEXTEND + WM_SHOWPORTRAIT(0, 0x0044, 0x0534, 0) + STAL(6) + PUTSPRITE(WM_MU_2, CLASS_PALADIN, FACTION_ID_GREEN, WM_NODE_RenaisCastle) + WM_FADEINSPRITE(WM_MU_2, 60) + STAL(46) + WM_WAITFORSPRITELOAD + TEXTCONT + TEXTEND + WM_CLEARPORTRAIT(0, 0x0200, 0) + WM_FADEOUTSPRITE(WM_MU_2, 60) + WM_MOVESPRITETO(WM_MU_0, 0x0000, WM_NODE_JehannaHall2, WM_NODE_RenaisCastle, -4, 0) + TEXTCONT + TEXTEND + STAL(46) + WM_WAITFORSPRITELOAD + WM_WAITFORSPRITES(WM_MU_ANY) + STAL(20) + WM_REMSPRITE(WM_MU_2) + WM_REMOVETEXT + STAL(2) + STAL(20) + FADI(16) + ENDA +}; + +CONST_DATA EventScr EventScrWM_Ch17a_Beginning[] = { + EVBIT_MODIFY(0x1) + WM_SPAWNLORD(WM_MU_0, CHARACTER_EIRIKA, WM_NODE_RenaisCastle) + WM_CENTERCAMONLORD(WM_MU_0) + WM_FADEOUT(0) + WM_TEXTDECORATE // WaitFade + EVBIT_MODIFY(0x0) + STAL(26) + WM_MOVECAM(-1, -1, 108, 48, 26, 0) + WM_WAITFORCAM + STAL(26) + STAL(20) + DRAWPATH3(WM_PATH_17) + WM_WAITFORFX + STAL(40) + WM_DRAWPATH(WM_PATH_17) + STAL(70) + STAL(26) + WM_MOVECAMTO(-1, -1, WM_NODE_JehannaHall2, 40, 0) + WM_WAITFORCAM + STAL(26) + STAL(20) + WM_CREATENEXTDESTINATION + WM_WAITFORFX + STAL(40) + WM_DRAWPATH(WM_PATH_18) + STAL(70) + STAL(26) + WmEvtMoveCamToUnit(-1, -1, WM_MU_0, 26, 0) // ENOSUPP in EA-stdlib + WM_WAITFORCAM + STAL(26) + WM_MAKELORDVISIBLE(WM_MU_0) + EVBIT_MODIFY(0x1) + CALL(EventScr_RemoveBGIfNeeded) + ENDA +}; + +CONST_DATA EventScr EventScrWM_08A3B808[] = { + STAL(6) + WM_MOVECAM(-1, -1, 216, 128, 60, 0) + WM_WAITFORCAM + CALL(EventScr_WM_FadeCommon) + STAL(60) + WM_TEXTSTART + WM_SHOWPORTRAIT(0, 0x0002, 0x02BC, 0) + STAL(6) + STAL(20) + WM_SHOWPORTRAIT(1, 0x0014, 0x0534, 0) + STAL(6) + STAL(30) + WM_TEXT(0x08ED, 0) + TEXTEND + STAL(46) + WM_MOVESPRITETO(WM_MU_0, 0x0002, WM_NODE_JehannaHall2, WM_NODE_NarubeRiver, -6, 0) + TEXTCONT + TEXTEND + STAL(46) + WM_WAITFORSPRITES(WM_MU_ANY) + WM_CLEARPORTRAIT(0, 0x0100, 0) + STAL(20) + WM_CLEARPORTRAIT(1, 0x0200, 0) + STAL(46) + TEXTCONT + TEXTEND + PUTSPRITE(WM_MU_2, CLASS_NECROMANCER, FACTION_ID_GREEN, WM_NODE_NarubeRiver) + TEXTCONT + TEXTEND + WM_FADEINSPRITE(WM_MU_2, 60) + WM_WAITFORSPRITELOAD + WM_REMOVETEXT + STAL(2) + STAL(60) + FADI(16) + WM_REMSPRITE(WM_MU_2) + ENDA +}; + +CONST_DATA EventScr EventScrWM_Ch18a_Beginning[] = { + EVBIT_MODIFY(0x1) + WM_SPAWNLORD(WM_MU_0, CHARACTER_EIRIKA, WM_NODE_NarubeRiver) + WM_CENTERCAMONLORD(WM_MU_0) + WM_FADEOUT(0) + WM_TEXTDECORATE // WaitFade + EVBIT_MODIFY(0x0) + STAL(20) + WM_CREATENEXTDESTINATION + WM_WAITFORFX + STAL(40) + WM_DRAWPATH(WM_PATH_19) + STAL(70) + WM_MAKELORDVISIBLE(WM_MU_0) + EVBIT_MODIFY(0x1) + CALL(EventScr_RemoveBGIfNeeded) + ENDA +}; + +CONST_DATA EventScr EventScrWM_08A3B944[] = { + STAL(6) + WM_MOVECAM(-1, -1, 240, 86, 60, 0) + WM_WAITFORCAM + CALL(EventScr_WM_FadeCommon) + STAL(60) + WM_TEXTSTART + WM_TEXT(0x08EE, 0) + TEXTEND + WM_SHOWPORTRAIT(0, 0x0002, 0x0534, 0) + STAL(6) + WM_MOVESPRITETO(WM_MU_0, 0x0000, WM_NODE_NarubeRiver, WM_NODE_NelerasPeak, -4, 0) + WM_MOVECAM(-1, -1, 240, 54, 110, 75) + TEXTCONT + TEXTEND + WM_WAITFORCAM + WM_WAITFORSPRITES(WM_MU_ANY) + WM_CLEARPORTRAIT(0, 0x0200, 0) + STAL(46) + PUTSPRITE(WM_MU_2, CLASS_GORGONEGG, FACTION_ID_GREEN, WM_NODE_NelerasPeak) + PUTSPRITE(WM_MU_3, CLASS_GORGONEGG, FACTION_ID_GREEN, WM_NODE_NelerasPeak) + PUTSPRITE(WM_MU_4, CLASS_GORGONEGG, FACTION_ID_GREEN, WM_NODE_NelerasPeak) + WM_PUTSPRITE(WM_MU_2, 0x168, 0x68) + WM_PUTSPRITE(WM_MU_3, 0x158, 0x80) + WM_PUTSPRITE(WM_MU_4, 0x178, 0x80) + WM_FADEINSPRITE(WM_MU_2, 60) + WM_FADEINSPRITE(WM_MU_3, 60) + WM_FADEINSPRITE(WM_MU_4, 60) + TEXTCONT + TEXTEND + WM_WAITFORSPRITELOAD + STAL(20) + WM_REMOVETEXT + STAL(2) + STAL(20) + FADI(16) + WM_REMSPRITE(WM_MU_2) + WM_REMSPRITE(WM_MU_3) + WM_REMSPRITE(WM_MU_4) + ENDA +}; + +CONST_DATA EventScr EventScrWM_Ch19a_Beginning[] = { + EVBIT_MODIFY(0x1) + WM_SPAWNLORD(WM_MU_0, CHARACTER_EIRIKA, WM_NODE_NelerasPeak) + WM_CENTERCAMONLORD(WM_MU_0) + WM_FADEOUT(0) + WM_TEXTDECORATE // WaitFade + EVBIT_MODIFY(0x0) + STAL(20) + WM_CREATENEXTDESTINATION + WM_WAITFORFX + STAL(40) + WM_DRAWPATH(WM_PATH_1A) + STAL(70) + WM_MAKELORDVISIBLE(WM_MU_0) + EVBIT_MODIFY(0x1) + CALL(EventScr_RemoveBGIfNeeded) + ENDA +}; + +CONST_DATA EventScr EventScrWM_08A3BAC0[] = { + STAL(6) + WM_MOVECAM(-1, -1, 240, 32, 60, 0) + WM_WAITFORCAM + CALL(EventScr_WM_FadeCommon) + STAL(60) + WM_TEXTSTART + WM_SHOWPORTRAIT(0, 0x0002, 0x02BC, 0) + STAL(6) + WM_TEXT(0x08EF, 0) + TEXTEND + STAL(46) + WM_CLEARPORTRAIT(0, 0x0100, 0) + STAL(46) + WM_SHOWPORTRAIT(0, 0x0022, 0x0534, 0) + STAL(6) + TEXTCONT + TEXTEND + STAL(46) + WM_MOVESPRITETO(WM_MU_0, 0x0000, WM_NODE_NelerasPeak, WM_NODE_RaustenCourt, -4, 0) + TEXTCONT + TEXTEND + WM_WAITFORSPRITES(WM_MU_ANY) + WM_CLEARPORTRAIT(0, 0x0200, 0) + STAL(46) + STAL(20) + WM_REMOVETEXT + STAL(2) + STAL(20) + FADI(16) + ENDA +}; + +CONST_DATA EventScr EventScrWM_Ch20a_Beginning[] = { + EVBIT_MODIFY(0x1) + WM_SPAWNLORD(WM_MU_0, CHARACTER_EIRIKA, WM_NODE_RaustenCourt) + WM_CENTERCAMONLORD(WM_MU_0) + WM_FADEOUT(0) + WM_TEXTDECORATE // WaitFade + EVBIT_MODIFY(0x0) + STAL(26) + WM_MOVECAM(-1, -1, 240, 48, 26, 0) + WM_WAITFORCAM + STAL(26) + STAL(20) + WM_LOADLOCATION3(WM_NODE_LagdouRuins) + WM_WAITFORFX + STAL(40) + WM_DRAWPATH(WM_PATH_1C) + STAL(70) + STAL(26) + WM_MOVECAM(-1, -1, 240, 0, 26, 0) + WM_WAITFORCAM + STAL(26) + STAL(20) + WM_LOADLOCATION3(WM_NODE_MelkaenCoast) + WM_WAITFORFX + STAL(40) + WM_DRAWPATH(WM_PATH_1D) + STAL(70) + STAL(26) + WM_MOVECAM(-1, -1, 162, 0, 26, 0) + WM_WAITFORCAM + STAL(26) + WM_DRAWPATH(WM_PATH_1E) + STAL(60) + STAL(26) + WmEvtMoveCamToUnit(-1, -1, WM_MU_0, 26, 0) // ENOSUPP in EA-stdlib + WM_WAITFORCAM + STAL(26) + STAL(20) + WM_CREATENEXTDESTINATION + WM_WAITFORFX + STAL(40) + WM_DRAWPATH(WM_PATH_1B) + STAL(70) + WM_MAKELORDVISIBLE(WM_MU_0) + EVBIT_MODIFY(0x1) + CALL(EventScr_RemoveBGIfNeeded) + ENDA +}; + +CONST_DATA EventScr EventScrWM_08A3BC8C[] = { + STAL(6) + WM_MOVECAM(-1, -1, 240, 18, 60, 0) + WM_WAITFORCAM + CALL(EventScr_WM_FadeCommon) + STAL(60) + WM_TEXTSTART + WM_TEXT(0x08F0, 0) + TEXTEND + WM_SHOWPORTRAIT(0, 0x0002, 0x0534, 0) + STAL(6) + STAL(46) + TEXTCONT + TEXTEND + WM_CLEARPORTRAIT(0, 0x0200, 0) + WM_MOVESPRITETO(WM_MU_0, 0x0000, WM_NODE_RaustenCourt, WM_NODE_BlackTemple, -7, 0) + STAL(20) + TEXTCONT + TEXTEND + WM_WAITFORSPRITES(WM_MU_ANY) + WM_FADEOUTSPRITE(WM_MU_0, 60) + WM_WAITFORSPRITELOAD + STAL(45) + PUTSPRITE(WM_MU_2, CLASS_MANAKETE_2, FACTION_ID_GREEN, WM_NODE_BlackTemple) + WM_FADEINSPRITE(WM_MU_2, 60) + TEXTCONT + TEXTEND + WM_WAITFORSPRITELOAD + STAL(40) + WM_REMOVETEXT + STAL(2) + STAL(20) + FADI(16) + WM_REMSPRITE(WM_MU_2) + ENDA +}; + +CONST_DATA EventScr EventScrWM_Ch21a_Beginning[] = { + WM_MAKELORDVISIBLE(WM_MU_0) + EVBIT_MODIFY(0x1) + CALL(EventScr_RemoveBGIfNeeded) + ENDA +}; + +CONST_DATA EventScr EventScrWM_08A3BD70[] = { + ENDA +}; + +CONST_DATA EventScr EventScrWM_Ch15b_Beginning[] = { + EVBIT_MODIFY(0x1) + WM_SPAWNLORD(WM_MU_0, CHARACTER_EPHRAIM, WM_NODE_GradoKeep) + WM_CENTERCAMONLORD(WM_MU_0) + WM_FADEOUT(0) + WM_TEXTDECORATE // WaitFade + EVBIT_MODIFY(0x0) + STAL(26) + WM_MOVECAM(-1, -1, 126, 160, 26, 0) + WM_WAITFORCAM + STAL(26) + WM_DRAWPATH(WM_PATH_14) + STAL(70) + STAL(20) + WM_CREATENEXTDESTINATION + WM_WAITFORFX + STAL(40) + WM_DRAWPATH(WM_PATH_13) + STAL(70) + STAL(26) + WmEvtMoveCamToUnit(-1, -1, WM_MU_0, 26, 0) // ENOSUPP in EA-stdlib + WM_WAITFORCAM + STAL(26) + WM_MAKELORDVISIBLE(WM_MU_0) + EVBIT_MODIFY(0x1) + CALL(EventScr_RemoveBGIfNeeded) + ENDA +}; + +CONST_DATA EventScr EventScrWM_08A3BE14[] = { + STAL(6) + CALL(EventScr_WM_FadeCommon) + WM_MOVECAM(-1, -1, 150, 200, 80, 0) + WM_WAITFORCAM + STAL(60) + WM_TEXTSTART + WM_SHOWPORTRAIT(0, 0x0002, 0x02BC, 0) + STAL(6) + WM_TEXT(0x08F6, 0) + TEXTEND + STAL(46) + WM_CLEARPORTRAIT(0, 0x0100, 0) + STAL(46) + WM_SHOWPORTRAIT(0, 0x0043, 0x0534, 0) + STAL(6) + TEXTCONT + TEXTEND + STAL(46) + WM_SHOWPORTRAIT(1, 0x0002, 0x02BC, 0) + STAL(6) + TEXTCONT + TEXTEND + STAL(46) + WM_CLEARPORTRAIT(0, 0x0200, 0) + STAL(20) + WM_CLEARPORTRAIT(1, 0x0100, 0) + STAL(46) + WM_SHOWPORTRAIT(0, 0x0014, 0x0534, 0) + STAL(6) + TEXTCONT + TEXTEND + WM_CLEARPORTRAIT(0, 0x0200, 0) + WM_MOVESPRITETO(WM_MU_0, 0x0000, WM_NODE_GradoKeep, WM_NODE_JehannaHall2, -4, 0) + WM_MOVECAM(-1, -1, 192, 146, 80, 90) + TEXTCONT + TEXTEND + STAL(46) + WM_WAITFORCAM + WM_WAITFORSPRITES(WM_MU_ANY) + STAL(20) + WM_REMOVETEXT + STAL(2) + STAL(20) + FADI(16) + ENDA +}; + +CONST_DATA EventScr EventScrWM_Ch16b_Beginning[] = { + EVBIT_MODIFY(0x1) + WM_SPAWNLORD(WM_MU_0, CHARACTER_EPHRAIM, WM_NODE_JehannaHall2) + WM_CENTERCAMONLORD(WM_MU_0) + WM_LOADLOCATION2(WM_NODE_PortKiris) + WM_LOADLOCATION2(WM_NODE_TerazPlateau) + WM_LOADLOCATION2(WM_NODE_CaerPelyn) + WM_LOADLOCATION2(WM_NODE_HamillCanyon) + WM_DRAWPATH2(WM_PATH_08) + WM_DRAWPATH2(WM_PATH_0A) + WM_DRAWPATH2(WM_PATH_0B) + WM_DRAWPATH2(WM_PATH_0C) + WM_DRAWPATH2(WM_PATH_16) + WM_FADEOUT(0) + WM_TEXTDECORATE // WaitFade + EVBIT_MODIFY(0x0) + WM_MOVECAM(-1, -1, 145, 89, 45, 0) + WM_WAITFORCAM + STAL(20) + WM_CREATENEXTDESTINATION + WM_WAITFORFX + STAL(40) + WM_DRAWPATH(WM_PATH_15) + STAL(70) + WmEvtMoveCamToUnit(-1, -1, WM_MU_0, 30, 0) // ENOSUPP in EA-stdlib + STAL(60) + WM_MAKELORDVISIBLE(WM_MU_0) + EVBIT_MODIFY(0x1) + CALL(EventScr_RemoveBGIfNeeded) + ENDA +}; + +CONST_DATA EventScr EventScrWM_08A3BFF4[] = { + STAL(6) + WM_MOVECAM(-1, -1, 122, 108, 60, 0) + WM_WAITFORCAM + CALL(EventScr_WM_FadeCommon) + STAL(60) + WM_TEXTSTART + WM_TEXT(0x08F7, 0) + TEXTEND + WM_SHOWPORTRAIT(0, 0x0044, 0x0534, 0) + STAL(6) + PUTSPRITE(WM_MU_2, CLASS_PALADIN, FACTION_ID_GREEN, WM_NODE_RenaisCastle) + WM_FADEINSPRITE(WM_MU_2, 60) + STAL(46) + WM_WAITFORSPRITELOAD + TEXTCONT + TEXTEND + WM_CLEARPORTRAIT(0, 0x0200, 0) + WM_FADEOUTSPRITE(WM_MU_2, 60) + WM_MOVESPRITETO(WM_MU_0, 0x0000, WM_NODE_JehannaHall2, WM_NODE_RenaisCastle, -4, 0) + TEXTCONT + TEXTEND + STAL(46) + WM_WAITFORSPRITELOAD + WM_WAITFORSPRITES(WM_MU_ANY) + STAL(20) + WM_REMSPRITE(WM_MU_2) + WM_REMOVETEXT + STAL(2) + STAL(20) + FADI(16) + ENDA +}; + +CONST_DATA EventScr EventScrWM_Ch17b_Beginning[] = { + EVBIT_MODIFY(0x1) + WM_SPAWNLORD(WM_MU_0, CHARACTER_EPHRAIM, WM_NODE_RenaisCastle) + WM_CENTERCAMONLORD(WM_MU_0) + WM_FADEOUT(0) + WM_TEXTDECORATE // WaitFade + EVBIT_MODIFY(0x0) + STAL(26) + WM_MOVECAM(-1, -1, 80, 56, 26, 0) + WM_WAITFORCAM + STAL(26) + STAL(20) + DRAWPATH3(WM_PATH_17) + WM_WAITFORFX + STAL(40) + WM_DRAWPATH(WM_PATH_17) + STAL(70) + STAL(26) + WM_MOVECAMTO(-1, -1, WM_NODE_JehannaHall2, 40, 0) + WM_WAITFORCAM + STAL(26) + STAL(20) + WM_CREATENEXTDESTINATION + WM_WAITFORFX + STAL(40) + WM_DRAWPATH(WM_PATH_18) + STAL(70) + STAL(26) + WmEvtMoveCamToUnit(-1, -1, WM_MU_0, 26, 0) // ENOSUPP in EA-stdlib + WM_WAITFORCAM + STAL(26) + WM_MAKELORDVISIBLE(WM_MU_0) + EVBIT_MODIFY(0x1) + CALL(EventScr_RemoveBGIfNeeded) + ENDA +}; + +CONST_DATA EventScr EventScrWM_08A3C184[] = { + STAL(6) + WM_MOVECAM(-1, -1, 216, 128, 60, 0) + WM_WAITFORCAM + CALL(EventScr_WM_FadeCommon) + STAL(60) + WM_TEXTSTART + WM_SHOWPORTRAIT(0, 0x0014, 0x02BC, 0) + STAL(6) + STAL(20) + WM_SHOWPORTRAIT(1, 0x0002, 0x0534, 0) + STAL(6) + WM_TEXT(0x08F8, 0) + TEXTEND + STAL(46) + WM_MOVESPRITETO(WM_MU_0, 0x0002, WM_NODE_JehannaHall2, WM_NODE_NarubeRiver, -6, 0) + TEXTCONT + TEXTEND + STAL(46) + WM_WAITFORSPRITES(WM_MU_ANY) + WM_CLEARPORTRAIT(0, 0x0100, 0) + STAL(20) + WM_CLEARPORTRAIT(1, 0x0200, 0) + STAL(46) + TEXTCONT + TEXTEND + PUTSPRITE(WM_MU_2, CLASS_NECROMANCER, FACTION_ID_GREEN, WM_NODE_NarubeRiver) + TEXTCONT + TEXTEND + WM_FADEINSPRITE(WM_MU_2, 60) + WM_WAITFORSPRITELOAD + WM_REMOVETEXT + STAL(2) + STAL(60) + FADI(16) + WM_REMSPRITE(WM_MU_2) + ENDA +}; + +CONST_DATA EventScr EventScrWM_Ch18b_Beginning[] = { + EVBIT_MODIFY(0x1) + WM_SPAWNLORD(WM_MU_0, CHARACTER_EPHRAIM, WM_NODE_NarubeRiver) + WM_CENTERCAMONLORD(WM_MU_0) + WM_FADEOUT(0) + WM_TEXTDECORATE // WaitFade + EVBIT_MODIFY(0x0) + STAL(20) + WM_CREATENEXTDESTINATION + WM_WAITFORFX + STAL(40) + WM_DRAWPATH(WM_PATH_19) + STAL(70) + WM_MAKELORDVISIBLE(WM_MU_0) + EVBIT_MODIFY(0x1) + CALL(EventScr_RemoveBGIfNeeded) + ENDA +}; + +CONST_DATA EventScr EventScrWM_08A3C2BC[] = { + STAL(6) + WM_MOVECAM(-1, -1, 240, 86, 60, 0) + WM_WAITFORCAM + CALL(EventScr_WM_FadeCommon) + STAL(60) + WM_TEXTSTART + WM_TEXT(0x08F9, 0) + TEXTEND + WM_SHOWPORTRAIT(0, 0x0014, 0x0534, 0) + STAL(6) + WM_MOVESPRITETO(WM_MU_0, 0x0000, WM_NODE_NarubeRiver, WM_NODE_NelerasPeak, -4, 0) + WM_MOVECAM(-1, -1, 240, 54, 110, 75) + TEXTCONT + TEXTEND + WM_WAITFORCAM + WM_WAITFORSPRITES(WM_MU_ANY) + WM_CLEARPORTRAIT(0, 0x0200, 0) + STAL(46) + PUTSPRITE(WM_MU_2, CLASS_GORGONEGG, FACTION_ID_GREEN, WM_NODE_NelerasPeak) + PUTSPRITE(WM_MU_3, CLASS_GORGONEGG, FACTION_ID_GREEN, WM_NODE_NelerasPeak) + PUTSPRITE(WM_MU_4, CLASS_GORGONEGG, FACTION_ID_GREEN, WM_NODE_NelerasPeak) + WM_PUTSPRITE(WM_MU_2, 0x168, 0x68) + WM_PUTSPRITE(WM_MU_3, 0x158, 0x80) + WM_PUTSPRITE(WM_MU_4, 0x178, 0x80) + WM_FADEINSPRITE(WM_MU_2, 60) + WM_FADEINSPRITE(WM_MU_3, 60) + WM_FADEINSPRITE(WM_MU_4, 60) + TEXTCONT + TEXTEND + WM_WAITFORSPRITELOAD + STAL(20) + WM_REMOVETEXT + STAL(2) + STAL(20) + FADI(16) + WM_REMSPRITE(WM_MU_2) + WM_REMSPRITE(WM_MU_3) + WM_REMSPRITE(WM_MU_4) + ENDA +}; + +CONST_DATA EventScr EventScrWM_Ch19b_Beginning[] = { + EVBIT_MODIFY(0x1) + WM_SPAWNLORD(WM_MU_0, CHARACTER_EPHRAIM, WM_NODE_NelerasPeak) + WM_CENTERCAMONLORD(WM_MU_0) + WM_FADEOUT(0) + WM_TEXTDECORATE // WaitFade + EVBIT_MODIFY(0x0) + STAL(20) + WM_CREATENEXTDESTINATION + WM_WAITFORFX + STAL(40) + WM_DRAWPATH(WM_PATH_1A) + STAL(70) + WM_MAKELORDVISIBLE(WM_MU_0) + EVBIT_MODIFY(0x1) + CALL(EventScr_RemoveBGIfNeeded) + ENDA +}; + +CONST_DATA EventScr EventScrWM_08A3C438[] = { + STAL(6) + WM_MOVECAM(-1, -1, 240, 32, 60, 0) + WM_WAITFORCAM + CALL(EventScr_WM_FadeCommon) + STAL(60) + WM_TEXTSTART + WM_SHOWPORTRAIT(0, 0x0014, 0x02BC, 0) + STAL(6) + WM_TEXT(0x08FA, 0) + TEXTEND + STAL(46) + WM_CLEARPORTRAIT(0, 0x0100, 0) + STAL(46) + WM_SHOWPORTRAIT(0, 0x0022, 0x0534, 0) + STAL(6) + TEXTCONT + TEXTEND + STAL(46) + WM_MOVESPRITETO(WM_MU_0, 0x0000, WM_NODE_NelerasPeak, WM_NODE_RaustenCourt, -4, 0) + TEXTCONT + TEXTEND + WM_WAITFORSPRITES(WM_MU_ANY) + WM_CLEARPORTRAIT(0, 0x0200, 0) + STAL(46) + STAL(20) + WM_REMOVETEXT + STAL(2) + STAL(20) + FADI(16) + ENDA +}; + +CONST_DATA EventScr EventScrWM_Ch20b_Beginning[] = { + EVBIT_MODIFY(0x1) + WM_SPAWNLORD(WM_MU_0, CHARACTER_EPHRAIM, WM_NODE_RaustenCourt) + WM_CENTERCAMONLORD(WM_MU_0) + WM_FADEOUT(0) + WM_TEXTDECORATE // WaitFade + EVBIT_MODIFY(0x0) + STAL(26) + WM_MOVECAM(-1, -1, 240, 48, 26, 0) + WM_WAITFORCAM + STAL(26) + STAL(20) + WM_LOADLOCATION3(WM_NODE_LagdouRuins) + WM_WAITFORFX + STAL(40) + WM_DRAWPATH(WM_PATH_1C) + STAL(70) + STAL(26) + WM_MOVECAM(-1, -1, 240, 0, 26, 0) + WM_WAITFORCAM + STAL(26) + STAL(20) + WM_LOADLOCATION3(WM_NODE_MelkaenCoast) + WM_WAITFORFX + STAL(40) + WM_DRAWPATH(WM_PATH_1D) + STAL(70) + STAL(26) + WM_MOVECAM(-1, -1, 162, 0, 26, 0) + WM_WAITFORCAM + STAL(26) + WM_DRAWPATH(WM_PATH_1E) + STAL(60) + STAL(26) + WmEvtMoveCamToUnit(-1, -1, WM_MU_0, 26, 0) // ENOSUPP in EA-stdlib + WM_WAITFORCAM + STAL(26) + STAL(20) + WM_CREATENEXTDESTINATION + WM_WAITFORFX + STAL(40) + WM_DRAWPATH(WM_PATH_1B) + STAL(70) + WM_MAKELORDVISIBLE(WM_MU_0) + EVBIT_MODIFY(0x1) + CALL(EventScr_RemoveBGIfNeeded) + ENDA +}; + +CONST_DATA EventScr EventScrWM_08A3C604[] = { + STAL(6) + WM_MOVECAM(-1, -1, 240, 18, 60, 0) + WM_WAITFORCAM + CALL(EventScr_WM_FadeCommon) + STAL(60) + WM_TEXTSTART + WM_TEXT(0x08FB, 0) + TEXTEND + WM_SHOWPORTRAIT(0, 0x0014, 0x0534, 0) + STAL(6) + STAL(46) + TEXTCONT + TEXTEND + WM_CLEARPORTRAIT(0, 0x0200, 0) + WM_MOVESPRITETO(WM_MU_0, 0x0000, WM_NODE_RaustenCourt, WM_NODE_BlackTemple, -7, 0) + STAL(20) + TEXTCONT + TEXTEND + WM_WAITFORSPRITES(WM_MU_ANY) + WM_FADEOUTSPRITE(WM_MU_0, 60) + WM_WAITFORSPRITELOAD + STAL(45) + PUTSPRITE(WM_MU_2, CLASS_MANAKETE_2, FACTION_ID_GREEN, WM_NODE_BlackTemple) + WM_FADEINSPRITE(WM_MU_2, 60) + TEXTCONT + TEXTEND + WM_WAITFORSPRITELOAD + STAL(40) + WM_REMOVETEXT + STAL(2) + STAL(20) + FADI(16) + WM_REMSPRITE(WM_MU_2) + ENDA +}; + +CONST_DATA EventScr EventScrWM_Ch21b_Beginning[] = { + WM_MAKELORDVISIBLE(WM_MU_0) + EVBIT_MODIFY(0x1) + CALL(EventScr_RemoveBGIfNeeded) + ENDA +}; + +CONST_DATA EventScr EventScrWM_08A3C6E8[] = { + ENDA +}; + +CONST_DATA EventScr EventScrWM_08A3C6EC[] = { + EVBIT_MODIFY(0x1) + WM_SPAWNLORD(WM_MU_0, CHARACTER_EIRIKA, WM_NODE_BorderMulan) + WM_CENTERCAMONLORD(WM_MU_0) + WM_LOADLOCATION2(WM_NODE_BorderMulan) + WmEvtSetNodeStateNot2(WM_NODE_BorderMulan) // ENOSUPP in EA-stdlib + WM_SETCAM(0, 12) + WM_FADEOUT(0) + WM_TEXTDECORATE // WaitFade + EVBIT_MODIFY(0x0) + STAL(20) + WM_CREATENEXTDESTINATION + WM_WAITFORFX + STAL(40) + WM_DRAWPATH(WM_PATH_00) + STAL(70) + WM_SHOWTEXTWINDOW(40, 0x0001) + WM_WAITFORTEXT + WM_TEXTSTART + WM_TEXT(0x08DC, 0) + TEXTEND + STAL(20) + WM_MOVESPRITETO(WM_MU_0, 0x0000, WM_NODE_BorderMulan, WM_NODE_CastleFrelia, 200, 40) + TEXTCONT + TEXTEND + WM_WAITFORSPRITES(WM_MU_ANY) + WM_REMOVETEXT + STAL(2) + STAL(20) + SKIPWN + ENDA +}; + +CONST_DATA EventScr EventScrWM_08A3C79C[] = { + EVBIT_MODIFY(0x1) + WM_SPAWNLORD(WM_MU_0, CHARACTER_EIRIKA, WM_NODE_Serafew) + WM_CENTERCAMONLORD(WM_MU_0) + WmEvtSetNodeStateNot2(WM_NODE_Serafew) // ENOSUPP in EA-stdlib + WM_FADEOUT(0) + WM_TEXTDECORATE // WaitFade + EVBIT_MODIFY(0x0) + WmEvtSetUnitOnNode(WM_MU_0, WM_NODE_Serafew) // ENOSUPP in EA-stdlib + WM_MAKELORDVISIBLE(WM_MU_0) + WM_MOVESPRITETO(WM_MU_0, 0x0004, WM_NODE_Serafew, WM_NODE_ZahaWoods, -2, 0) + WM_WAITFORSPRITES(WM_MU_0) + WM_MOVESPRITETO(WM_MU_0, 0x0004, WM_NODE_ZahaWoods, WM_NODE_BorgoRidge, -2, 0) + WM_MOVECAMTO(-1, -1, WM_NODE_CastleFrelia, 120, 0) + WM_WAITFORSPRITES(WM_MU_0) + WM_MOVESPRITETO(WM_MU_0, 0x0004, WM_NODE_BorgoRidge, WM_NODE_Ide, -2, 0) + WM_WAITFORSPRITES(WM_MU_0) + WM_MOVESPRITETO(WM_MU_0, 0x0004, WM_NODE_Ide, WM_NODE_CastleFrelia, -2, 0) + WM_WAITFORSPRITES(WM_MU_0) + WM_WAITFORCAM + WmEvtSetUnitOnNode(WM_MU_0, WM_NODE_CastleFrelia) // ENOSUPP in EA-stdlib + SKIPWN + ENDA +}; + +CONST_DATA EventScr EventScrWM_CastleFrelia_Beginning[] = { + CHECK_EVENTID(136) + BNE(0x1, EVT_SLOT_C, EVT_SLOT_0) + CALL(EventScrWM_08A3C6EC) + ENDB +}; + +CONST_DATA EventScr EventScrWM_08A3C878[] = { +LABEL(0x1) + CALL(EventScrWM_08A3C79C) + ENDA +}; + +CONST_DATA EventScr EventScrWM_08A3C888[] = { + FADI(16) + ENDA +}; + +CONST_DATA EventScr EventScrWM_Ch5x_Beginning[] = { + ENDA +}; + +CONST_DATA EventScr EventScrWM_Ch5x_ChapterIntro[] = { + ENDA +}; + +CONST_DATA EventScr EventScrWM_Ch21ax_Beginning[] = { + ENDA +}; + +CONST_DATA EventScr EventScrWM_08A3C89C[] = { + ENDA +}; + +CONST_DATA EventScr EventScrWM_Ch21bx_Beginning[] = { + ENDA +}; + +CONST_DATA EventScr EventScrWM_08A3C8A4[] = { + ENDA +}; + +CONST_DATA EventScr EventScrWM_Ch11a_Beginning[] = { + EVBIT_MODIFY(0x1) + WM_SPAWNLORD(WM_MU_0, CHARACTER_EIRIKA, WM_NODE_TerazPlateau) + WM_CENTERCAMONLORD(WM_MU_0) + WM_FADEOUT(0) + WM_TEXTDECORATE // WaitFade + EVBIT_MODIFY(0x0) + STAL(20) + WM_CREATENEXTDESTINATION + WM_WAITFORFX + STAL(40) + WM_DRAWPATH(WM_PATH_0B) + STAL(70) + WM_MAKELORDVISIBLE(WM_MU_0) + EVBIT_MODIFY(0x1) + CALL(EventScr_RemoveBGIfNeeded) + ENDA +}; + +CONST_DATA EventScr EventScrWM_08A3C904[] = { + STAL(6) + WM_MOVECAM(-1, -1, 112, 46, 60, 0) + WM_WAITFORCAM + CALL(EventScr_WM_FadeCommon) + STAL(60) + WM_TEXTSTART + WM_SHOWDRAWNMAP(0, -8, 0x3) + STAL(120) + WM_HIGHLIGHT(WM_NATION_Pokhara) + STAL(30) + WM_TEXT(0x08E8, 0) + TEXTEND + WM_HIGHLIGHTCLEAR1(WM_NATION_Pokhara) + WM_HIGHLIGHTCLEAR2(WM_NATION_Pokhara) + WmEvtRemoveBigMap // WM_WAITFORFXCLEAR1 + WmEvtWaitBigMapRemove // WM_WAITFORFXCLEAR2 + WM_SHOWPORTRAIT(0, 0x0002, 0x0534, 0) + STAL(6) + STAL(46) + TEXTCONT + TEXTEND + WM_MOVESPRITETO(WM_MU_0, 0x0000, WM_NODE_TerazPlateau, WM_NODE_CaerPelyn, -4, 0) + TEXTCONT + TEXTEND + TEXTCONT + TEXTEND + WM_WAITFORSPRITES(WM_MU_ANY) + WM_CLEARPORTRAIT(0, 0x0200, 0) + STAL(40) + WM_REMOVETEXT + STAL(2) + STAL(20) + FADI(16) + ENDA +}; + +CONST_DATA EventScr EventScrWM_Ch11b_Beginning[] = { + EVBIT_MODIFY(0x1) + WM_SPAWNLORD(WM_MU_0, CHARACTER_EPHRAIM, WM_NODE_Bethroen) + WM_CENTERCAMONLORD(WM_MU_0) + WM_FADEOUT(0) + WM_TEXTDECORATE // WaitFade + EVBIT_MODIFY(0x0) + STAL(20) + WM_CREATENEXTDESTINATION + WM_WAITFORFX + STAL(40) + WM_DRAWPATH(WM_PATH_10) + STAL(70) + WM_MAKELORDVISIBLE(WM_MU_0) + EVBIT_MODIFY(0x1) + CALL(EventScr_RemoveBGIfNeeded) + ENDA +}; + +CONST_DATA EventScr EventScrWM_08A3CA2C[] = { + STAL(6) + CALL(EventScr_WM_FadeCommon) + WM_MOVECAM(-1, -1, 0, 188, 80, 0) + WM_WAITFORCAM + STAL(60) + WM_TEXTSTART + WM_SHOWPORTRAIT(0, 0x0025, 0x02BC, 0) + STAL(6) + WM_TEXT(0x08F3, 0) + TEXTEND + STAL(46) + WM_CLEARPORTRAIT(0, 0x0100, 0) + STAL(46) + WM_SHOWPORTRAIT(0, 0x0040, 0x02BC, 0) + STAL(6) + TEXTCONT + TEXTEND + STAL(46) + WM_SHOWPORTRAIT(1, 0x0014, 0x0534, 0) + STAL(6) + TEXTCONT + TEXTEND + WM_CLEARPORTRAIT(1, 0x0200, 0) + STAL(30) + WM_CLEARPORTRAIT(0, 0x0100, 0) + STAL(46) + TEXTCONT + TEXTEND + WM_MOVESPRITETO(WM_MU_0, 0x0000, WM_NODE_Bethroen, WM_NODE_Taizel, -4, 0) + STAL(110) + WM_REMOVETEXT + STAL(2) + STAL(20) + FADI(16) + WM_WAITFORSPRITES(WM_MU_ANY) + ENDA +}; diff --git a/src/events/prologue-wm.h b/src/events/prologue-wm.h index 8d7b79fbb..30a5f5bb0 100644 --- a/src/events/prologue-wm.h +++ b/src/events/prologue-wm.h @@ -12,7 +12,7 @@ CONST_DATA EventScr EventScrWM_Prologue_Beginning[] = { EVBIT_MODIFY(0x1) WmEvtNoFade // ENOSUPP in EA-stdlib - WM_SPAWNLORD(WM_MU_0, CHARACTER_EIRIKA, WM_NODE_00) + WM_SPAWNLORD(WM_MU_0, CHARACTER_EIRIKA, WM_NODE_BorderMulan) WM_CENTERCAMONLORD(WM_MU_0) MUSCFAST(0x7fff) STAL(32) @@ -146,12 +146,12 @@ CONST_DATA EventScr EventScrWM_Prologue_Beginning[] = { STAL(32) WM_MOVECAM2(0, 24, 0, 40, 52, 0) STAL(62) - WM_PLACEDOT(0, 0, WM_NODE_14, 1) - WM_PLACEDOT(0, 1, WM_NODE_12, 1) + WM_PLACEDOT(0, 0, WM_NODE_RenaisCastle, 1) + WM_PLACEDOT(0, 1, WM_NODE_GradoKeep, 1) STAL(60) - PUTSPRITE(WM_MU_2, CLASS_SOLDIER, FACTION_ID_GREEN, WM_NODE_12) - PUTSPRITE(WM_MU_3, CLASS_SOLDIER, FACTION_ID_GREEN, WM_NODE_12) - PUTSPRITE(WM_MU_4, CLASS_SOLDIER, FACTION_ID_GREEN, WM_NODE_12) + PUTSPRITE(WM_MU_2, CLASS_SOLDIER, FACTION_ID_GREEN, WM_NODE_GradoKeep) + PUTSPRITE(WM_MU_3, CLASS_SOLDIER, FACTION_ID_GREEN, WM_NODE_GradoKeep) + PUTSPRITE(WM_MU_4, CLASS_SOLDIER, FACTION_ID_GREEN, WM_NODE_GradoKeep) WM_PUTMOVINGSPRITE(WM_MU_2, 0, 0x73, 0x84, 0x55, 0x41, 210, 0x3, 10) WM_PUTMOVINGSPRITE(WM_MU_3, 0, 0x84, 0x84, 0x76, 0x57, 170, 0x3, 10) WM_PUTMOVINGSPRITE(WM_MU_4, 0, 0x95, 0x84, 0x86, 0x64, 150, 0x3, 10) @@ -166,7 +166,7 @@ CONST_DATA EventScr EventScrWM_Prologue_Beginning[] = { WM_SHOWPORTRAIT(0, 0x0014, 0x0534, 0) STAL(6) STAL(60) - PUTSPRITE(WM_MU_2, CLASS_EPHRAIM_LORD, FACTION_ID_BLUE, WM_NODE_06) + PUTSPRITE(WM_MU_2, CLASS_EPHRAIM_LORD, FACTION_ID_BLUE, WM_NODE_AdlasPlains) WM_PUTMOVINGSPRITE(WM_MU_2, 0, 0x5c, 0x64, 0x5c, 0x6c, 180, 0x3, 16) TEXTCONT TEXTEND @@ -174,11 +174,11 @@ CONST_DATA EventScr EventScrWM_Prologue_Beginning[] = { WM_REMSPRITE(WM_MU_2) WM_CLEARPORTRAIT(0, 0x0200, 0) STAL(46) - PUTSPRITE(WM_MU_6, CLASS_EIRIKA_LORD, FACTION_ID_BLUE, WM_NODE_14) - PUTSPRITE(WM_MU_5, CLASS_PEER, FACTION_ID_BLUE, WM_NODE_14) - PUTSPRITE(WM_MU_2, CLASS_GENERAL, FACTION_ID_GREEN, WM_NODE_12) - PUTSPRITE(WM_MU_3, CLASS_MAGE_KNIGHT_F, FACTION_ID_GREEN, WM_NODE_12) - PUTSPRITE(WM_MU_4, CLASS_WYVERN_KNIGHT, FACTION_ID_GREEN, WM_NODE_12) + PUTSPRITE(WM_MU_6, CLASS_EIRIKA_LORD, FACTION_ID_BLUE, WM_NODE_RenaisCastle) + PUTSPRITE(WM_MU_5, CLASS_PEER, FACTION_ID_BLUE, WM_NODE_RenaisCastle) + PUTSPRITE(WM_MU_2, CLASS_GENERAL, FACTION_ID_GREEN, WM_NODE_GradoKeep) + PUTSPRITE(WM_MU_3, CLASS_MAGE_KNIGHT_F, FACTION_ID_GREEN, WM_NODE_GradoKeep) + PUTSPRITE(WM_MU_4, CLASS_WYVERN_KNIGHT, FACTION_ID_GREEN, WM_NODE_GradoKeep) WM_PUTMOVINGSPRITE(WM_MU_2, 0, 0x84, 0x84, 0x6c, 0x5c, 210, 0x1, 0) WM_PUTMOVINGSPRITE(WM_MU_3, 0, 0x73, 0x92, 0x5b, 0x56, 210, 0x1, 0) WM_PUTMOVINGSPRITE(WM_MU_4, 0, 0x95, 0x92, 0x7d, 0x56, 210, 0x1, 0) @@ -207,7 +207,7 @@ CONST_DATA EventScr EventScrWM_Prologue_Beginning[] = { ENDA }; -CONST_DATA EventScr EventScrWM_Prologue_Ending[] = { +CONST_DATA EventScr EventScrWM_Prologue_ChapterIntro[] = { EVBIT_MODIFY(0x1) ENUT(137) ENDA diff --git a/src/events_wm.c b/src/events_wm.c index 604ee4543..163fa8409 100644 --- a/src/events_wm.c +++ b/src/events_wm.c @@ -7,6 +7,21 @@ #include "constants/characters.h" #include "constants/classes.h" +CONST_DATA EventScr EventScr_WM_FadeCommon[] = { + WmEvtFadeInDark(60) // WM_SATURATE_COLORS + WM_SHOWTEXTWINDOW(40, 0x0001) + WM_WAITFORTEXT + WmEvtWaitFadeInDark // ENOSUPP in EA-stdlib + ENDA +}; + #include "events/prologue-wm.h" #include "events/ch1-wm.h" - +#include "events/ch2-wm.h" +#include "events/ch3-wm.h" +#include "events/ch4-wm.h" +#include "events/ch5-wm.h" +#include "events/ch6-wm.h" +#include "events/ch7-wm.h" +#include "events/ch8-wm.h" +#include "events/messed-eventscr-wm.h" diff --git a/src/evtcmd_gmap.c b/src/evtcmd_gmap.c index 627340a5e..3981841e2 100644 --- a/src/evtcmd_gmap.c +++ b/src/evtcmd_gmap.c @@ -1128,14 +1128,14 @@ u8 EventA8_WmUnitMoveFree(struct EventEngineProc * proc) struct Sub80C3378 { - /* 00 */ u8 unk_00; + /* 00 */ u8 wm_uid; /* 01 */ u8 unk_01; /* 02 */ u8 unk_02; /* 04 */ u16 unk_04; - /* 06 */ u16 unk_06; - /* 08 */ u16 unk_08; - /* 0A */ u16 unk_0a; - /* 0C */ int unk_0c; + /* 06 */ u16 node1; + /* 08 */ u16 node2; + /* 0A */ u16 delay; + /* 0C */ int speed; }; //! FE8U = 0x0800C754 @@ -1143,31 +1143,31 @@ u8 EventA9_WmUnitMovePaths(struct EventEngineProc * proc) { struct Sub80C3378 local; - s16 r3 = EVT_CMD_ARGV(proc->pEventCurrent)[1]; - u16 r2 = EVT_CMD_ARGV(proc->pEventCurrent)[2]; - u16 r5 = EVT_CMD_ARGV(proc->pEventCurrent)[3]; - u16 r4 = EVT_CMD_ARGV(proc->pEventCurrent)[4]; - u16 r6 = EVT_CMD_ARGV(proc->pEventCurrent)[5]; - u16 r7 = EVT_CMD_ARGV(proc->pEventCurrent)[6]; + s16 wm_uid = EVT_CMD_ARGV(proc->pEventCurrent)[1]; + u16 conf = EVT_CMD_ARGV(proc->pEventCurrent)[2]; + u16 node1 = EVT_CMD_ARGV(proc->pEventCurrent)[3]; + u16 node2 = EVT_CMD_ARGV(proc->pEventCurrent)[4]; + u16 speed = EVT_CMD_ARGV(proc->pEventCurrent)[5]; + u16 delay = EVT_CMD_ARGV(proc->pEventCurrent)[6]; if (EVENT_IS_SKIPPING(proc)) { - gGMData.units[r3].location = r4; + gGMData.units[wm_uid].location = node2; - if ((r2 & 2) != 0) + if ((conf & 2) != 0) { - HideGmUnit(r3); + HideGmUnit(wm_uid); } } else { - local.unk_00 = r3; + local.wm_uid = wm_uid; local.unk_01 = 0; - local.unk_06 = r5; - local.unk_08 = r4; - local.unk_0c = r6; - local.unk_0a = r7; - sub_80C3378(&local, r2, 0); + local.node1 = node1; + local.node2 = node2; + local.speed = speed; + local.delay = delay; + sub_80C3378(&local, conf, 0); } return EVC_ADVANCE_CONTINUE; diff --git a/src/worldmap_main.c b/src/worldmap_main.c index 2c740dd42..26aaec7f9 100644 --- a/src/worldmap_main.c +++ b/src/worldmap_main.c @@ -26,8 +26,8 @@ s8 FindGmScrollManage(void); // TODO: Implicit declaration? void GetWMCenteredCameraPosition(int, int, s16 *, s16 *); -extern u16 * gUnknown_088B39EC[]; -extern u16 * gUnknown_088B3AD8[]; +extern u16 * Events_WM_Beginning[]; +extern u16 * Events_WM_ChapterIntro[]; struct Proc8A3DD30 { @@ -1033,7 +1033,7 @@ PROC_LABEL(23), PROC_LABEL(25), PROC_SLEEP(16), - PROC_CALL(sub_80B9EA4), + PROC_CALL(ResetWorldMapScreen), PROC_CALL(DoNothing), @@ -1681,7 +1681,7 @@ void sub_80B9E64(void) } //! FE8U = 0x080B9EA4 -void sub_80B9EA4(void) +void ResetWorldMapScreen(void) { SetDispEnable(0, 0, 0, 0, 0); @@ -2064,14 +2064,14 @@ void WorldMap_SetupChapterStuff(struct WorldMapMainProc * proc) gPlaySt.chapterIndex = chIndex; - if (gUnknown_088B39EC[GetROMChapterStruct(chIndex)->gmapEventId] == 0) + if (Events_WM_Beginning[GetROMChapterStruct(chIndex)->gmapEventId] == 0) { return; } sub_80BCFB4(); proc->unk_48->unk_32_1 = 0; - CallEvent(gUnknown_088B39EC[GetROMChapterStruct(chIndex)->gmapEventId], 0); + CallEvent(Events_WM_Beginning[GetROMChapterStruct(chIndex)->gmapEventId], 0); } } @@ -2084,9 +2084,9 @@ void WorldMap_SetupChapterStuff(struct WorldMapMainProc * proc) //! FE8U = 0x080BA3D4 void CallChapterWMIntroEvents(ProcPtr proc) { - if (gUnknown_088B3AD8[GetROMChapterStruct(gPlaySt.chapterIndex)->gmapEventId] != 0) + if (Events_WM_ChapterIntro[GetROMChapterStruct(gPlaySt.chapterIndex)->gmapEventId] != 0) { - CallEvent(gUnknown_088B3AD8[GetROMChapterStruct(gPlaySt.chapterIndex)->gmapEventId], 0); + CallEvent(Events_WM_ChapterIntro[GetROMChapterStruct(gPlaySt.chapterIndex)->gmapEventId], 0); StartWMFaceCtrl(proc); StartGmapMuEntry(NULL); } From f060135c5d80e7877b05e1cbed7f335cdbbcf968 Mon Sep 17 00:00:00 2001 From: MokhaLeee Date: Thu, 18 Jan 2024 11:08:20 +0000 Subject: [PATCH 3/3] update formats --- src/events/prologue-wm.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/events/prologue-wm.h b/src/events/prologue-wm.h index 30a5f5bb0..10bd8bc3c 100644 --- a/src/events/prologue-wm.h +++ b/src/events/prologue-wm.h @@ -41,7 +41,7 @@ CONST_DATA EventScr EventScrWM_Prologue_Beginning[] = { WM_HIGHLIGHTCLEAR2(WM_NATION_Renais) WM_CLEARPORTRAIT(0, 0x0100, 0) STAL(32) - WM_MOVECAM2(0, 24, 0, 65528, 60, 0) + WM_MOVECAM2(0, 24, 0, -8, 60, 0) STAL(60) WM_SHOWPORTRAIT(0, 0x0052, 0x02BC, 0) STAL(6) @@ -54,7 +54,7 @@ CONST_DATA EventScr EventScrWM_Prologue_Beginning[] = { WM_HIGHLIGHTCLEAR2(WM_NATION_Frelia) WM_CLEARPORTRAIT(0, 0x0100, 0) STAL(32) - WM_MOVECAM2(0, 65528, 0, 30, 60, 0) + WM_MOVECAM2(0, -8, 0, 30, 60, 0) STAL(60) WM_SHOWPORTRAIT(0, 0x0056, 0x0534, 0) STAL(6) @@ -67,7 +67,7 @@ CONST_DATA EventScr EventScrWM_Prologue_Beginning[] = { WM_HIGHLIGHTCLEAR2(WM_NATION_Jehanna) WM_CLEARPORTRAIT(0, 0x0200, 0) STAL(32) - WM_MOVECAM2(0, 30, 0, 65528, 60, 0) + WM_MOVECAM2(0, 30, 0, -8, 60, 0) STAL(60) WM_SHOWPORTRAIT(0, 0x0053, 0x0534, 0) STAL(6) @@ -80,7 +80,7 @@ CONST_DATA EventScr EventScrWM_Prologue_Beginning[] = { WM_HIGHLIGHTCLEAR2(WM_NATION_Rausten) WM_CLEARPORTRAIT(0, 0x0200, 0) STAL(32) - WM_MOVECAM2(0, 65528, 0, 48, 60, 0) + WM_MOVECAM2(0, -8, 0, 48, 60, 0) STAL(60) WM_SHOWPORTRAIT(0, 0x0040, 0x02BC, 0) STAL(6)