Skip to content
This repository has been archived by the owner on Sep 26, 2024. It is now read-only.

Commit

Permalink
chapter 4 event
Browse files Browse the repository at this point in the history
Signed-off-by: laqieer <[email protected]>
  • Loading branch information
laqieer committed Feb 21, 2020
1 parent aab1821 commit c8724d2
Show file tree
Hide file tree
Showing 5 changed files with 130 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion res/map/event/event_chap_3.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ ENDA

EndingScene:
TEX1 TEXT_CHAP_3_ED
MNCH 0
MNCH 4
ENDA

AllyUnitsENM:
Expand Down
65 changes: 65 additions & 0 deletions res/map/event/event_chap_4.txt
Original file line number Diff line number Diff line change
@@ -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
2 changes: 2 additions & 0 deletions src/chapter_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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;
61 changes: 61 additions & 0 deletions src/res/map/event/event_chap_4.s
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit c8724d2

Please sign in to comment.