From c8724d21db80fb5ead330201aff22a68457ab95a Mon Sep 17 00:00:00 2001 From: laqieer Date: Fri, 21 Feb 2020 08:38:40 +0800 Subject: [PATCH] chapter 4 event Signed-off-by: laqieer --- CMakeLists.txt | 2 +- res/map/event/event_chap_3.txt | 2 +- res/map/event/event_chap_4.txt | 65 ++++++++++++++++++++++++++++++++ src/chapter_event.c | 2 + src/res/map/event/event_chap_4.s | 61 ++++++++++++++++++++++++++++++ 5 files changed, 130 insertions(+), 2 deletions(-) create mode 100644 res/map/event/event_chap_4.txt create mode 100644 src/res/map/event/event_chap_4.s diff --git a/CMakeLists.txt b/CMakeLists.txt index d058184a..b0dfd380 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,7 +28,7 @@ process_gfx_portrait(GFX_SRCS_PORTRAIT portrait_alfonse.grit portrait_Anna_comma add_executable(${PROJECT_NAME} ${DIR_SRCS} ${GFX_SRCS} ${GFX_SRCS_PORTRAIT} src/res/chapter_title/chapter_title_pre.s src/res/chapter_title/chapter_title_1.s src/res/chapter_title/chapter_title_2.s src/res/chapter_title/chapter_title_3.s src/res/chapter_title/chapter_title_4.s src/res/map/map/map_chap_pre.s src/res/map/map/map_chap_1.s src/res/map/map/map_chap_2.s src/res/map/map/map_chap_3.s src/res/map/map/map_chap_4.s - src/res/map/event/event_chap_template.s src/res/map/event/event_chap_pre.s src/res/map/event/event_chap_1.s src/res/map/event/event_chap_2.s src/res/map/event/event_chap_3.s + src/res/map/event/event_chap_template.s src/res/map/event/event_chap_pre.s src/res/map/event/event_chap_1.s src/res/map/event/event_chap_2.s src/res/map/event/event_chap_3.s src/res/map/event/event_chap_4.s src/res/character_palette/character_palette_Alfonse.s src/res/character_palette/character_palette_Anna.s src/res/character_palette/character_palette_Sharena.s src/res/character_palette/character_palette_Xander.s src/res/music/native_instrument_map.s src/res/music/music_event_plain_1.s src/res/music/music_event_serious_1.s src/res/music/music_event_serious_3.s src/res/music/music_map_fe3.s src/res/animation/character/animation_Sharena.s src/res/animation/character/animation_Sharena_disarmed.s diff --git a/res/map/event/event_chap_3.txt b/res/map/event/event_chap_3.txt index fa9f692a..4cbd40f8 100644 --- a/res/map/event/event_chap_3.txt +++ b/res/map/event/event_chap_3.txt @@ -46,7 +46,7 @@ ENDA EndingScene: TEX1 TEXT_CHAP_3_ED -MNCH 0 +MNCH 4 ENDA AllyUnitsENM: diff --git a/res/map/event/event_chap_4.txt b/res/map/event/event_chap_4.txt new file mode 100644 index 00000000..3ed9edcd --- /dev/null +++ b/res/map/event/event_chap_4.txt @@ -0,0 +1,65 @@ +#include EAStdlib.event +#include "Project Definition.txt" + +PointerList: +POIN TurnBasedEvents +POIN CharacterBasedEvents +POIN LocationBasedEvents +POIN MiscBasedEvents +POIN TrapsEliwoodMode +POIN TrapsHectorMode +POIN EnemyUnitsENM +POIN EnemyUnitsENM +POIN EnemyUnitsENM +POIN EnemyUnitsENM +POIN AllyUnitsENM +POIN AllyUnitsENM +POIN AllyUnitsENM +POIN AllyUnitsENM +POIN BeginningScene +POIN EndingScene + +TurnBasedEvents: +TURN 0x0 BeginningScene [1,0] 0x0 0x0 +END_MAIN + +CharacterBasedEvents: +END_MAIN + +LocationBasedEvents: +END_MAIN + +MiscBasedEvents: +CauseGameOverIfLordDies +DefeatAll(EndingScene) +POIN 0x7AA5D // a bug of EA Core's C mode +END_MAIN + +BeginningScene: +LOU1 AllyUnitsENM +ENUN +LOU1 EnemyUnitsENM +ENUN +ENDA + +EndingScene: +MNCH 0 +ENDA + +AllyUnitsENM: +UNIT Alfonse AlfonseLord Anna 0x8 [14,6] [14,6] NoItems NoAI +UNIT Sharena SharenaLord Anna 0x8 [14,17] [14,17] NoItems NoAI +UNIT Anna AnnaLord 0x0 0x8 [14,14] [12,14] NoItems NoAI +UNIT + +EnemyUnitsENM: +UNIT GenericSoldierSummonedWeak Mercenary 0x0 Level(5,Enemy,1) [0,17] [3,17] [IronSword,0x0,0x0,0x0] [AttackInRange,DelayedPursue,NoRecovery,DefaultAI4] +UNIT GenericSoldierEmblianWeak Archer 0x0 Level(5,Enemy,1) [0,13] [2,13] [IronBow,0x0,0x0,0x0] [AttackInRange,Pursue,NoRecovery,DefaultAI4] +UNIT GenericSoldierEmblianWeak Fighter 0x0 Level(5,Enemy,1) [9,0] [10,2] [IronAxe,0x0,0x0,0x0] [AttackInRange,Pursue,NoRecovery,DefaultAI4] +UNIT + +TrapsEliwoodMode: +ENDTRAP + +TrapsHectorMode: +ENDTRAP \ No newline at end of file diff --git a/src/chapter_event.c b/src/chapter_event.c index 08fc1a22..850965e7 100644 --- a/src/chapter_event.c +++ b/src/chapter_event.c @@ -10,6 +10,7 @@ extern const u8 * const event_chap_pre[]; extern const u8 * const event_chap_1[]; extern const u8 * const event_chap_2[]; extern const u8 * const event_chap_3[]; +extern const u8 * const event_chap_4[]; const u8 ** const events[] = { NULL, @@ -18,6 +19,7 @@ const u8 ** const events[] = { event_chap_1, event_chap_2, event_chap_3, + event_chap_4, }; const u8 *** const pEvents = events; \ No newline at end of file diff --git a/src/res/map/event/event_chap_4.s b/src/res/map/event/event_chap_4.s new file mode 100644 index 00000000..6e9b269e --- /dev/null +++ b/src/res/map/event/event_chap_4.s @@ -0,0 +1,61 @@ + .section .rodata + .align 2 + .global event_chap_4 +event_chap_4: +PointerList: + .word TurnBasedEvents + .word CharacterBasedEvents + .word LocationBasedEvents + .word MiscBasedEvents + .word TrapsEliwoodMode + .word TrapsHectorMode + .word EnemyUnitsENM + .word EnemyUnitsENM + .word EnemyUnitsENM + .word EnemyUnitsENM + .word AllyUnitsENM + .word AllyUnitsENM + .word AllyUnitsENM + .word AllyUnitsENM + .word BeginningScene + .word EndingScene +TurnBasedEvents: + .byte 0x02, 0x00, 0x00, 0x00 + .word BeginningScene + .byte 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + .byte 0x00, 0x00, 0x00, 0x00 +CharacterBasedEvents: + .byte 0x00, 0x00, 0x00, 0x00 +LocationBasedEvents: + .byte 0x00, 0x00, 0x00, 0x00 +MiscBasedEvents: + .byte 0x01, 0x00, 0x00, 0x00, 0x1C, 0xF7, 0xD6, 0x08, 0x65, 0x00, 0x00, 0x00 + .byte 0x0E, 0x00, 0x00, 0x00 + .word EndingScene + .byte 0x5D, 0xAA, 0x07, 0x08 + .byte 0x00, 0x00, 0x00, 0x00 +BeginningScene: + .byte 0x30, 0x00, 0x00, 0x00 + .word AllyUnitsENM + .byte 0x39, 0x00, 0x00, 0x00 + .byte 0x30, 0x00, 0x00, 0x00 + .word EnemyUnitsENM + .byte 0x39, 0x00, 0x00, 0x00 + .byte 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +EndingScene: + .byte 0x7F, 0x00, 0x00, 0x00 + .byte 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +AllyUnitsENM: + .byte 0x01, 0x01, 0x02, 0x08, 0x0E, 0x06, 0x0E, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + .byte 0x03, 0x02, 0x02, 0x08, 0x0E, 0x11, 0x0E, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + .byte 0x02, 0x03, 0x00, 0x08, 0x0E, 0x0E, 0x0C, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +EnemyUnitsENM: + .byte 0x73, 0x0A, 0x00, 0x2D, 0x00, 0x11, 0x03, 0x11, 0x01, 0x00, 0x00, 0x00, 0x00, 0x20, 0x04, 0x00 + .byte 0x68, 0x18, 0x00, 0x2D, 0x00, 0x0D, 0x02, 0x0D, 0x2C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00 + .byte 0x68, 0x12, 0x00, 0x2D, 0x09, 0x00, 0x0A, 0x02, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00 + .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +TrapsEliwoodMode: + .byte 0x00 +TrapsHectorMode: + .byte 0x00