Alchemy
Loading...
Searching...
No Matches

suhalla_gate.c File Reference

Suhalla Gate in three scenes: the gate with the house beside it, a second scene where a Djinni waits, and a third. More...

Go to the source code of this file.

Macros

#define SUHALLA_GATE_RETREAT_SCENE(currentScene)

Enumerations

enum  {
  GUARD_WEST = 8 , GUARD_EAST = 9 , VANISHING_SOLDIER = 10 , IODEM = 11 ,
  DJINNI = 13
}
 The actors this scene's code names, by their place in the placement tables. More...
enum  { ENTRANCE_SOUTH = 1 , ENTRANCE_FROM_HOUSE = 3 , ENTRANCE_EAST = 5 }
 Arrivals in the first scene: from the world map south of the gate, out of the house beside it, and from the world map to the east. More...
enum  { LUNPA_SUHALLA_GATE_HOUSE = 10 }
 The house beside the gate is Lunpa Suhalla's entrance 10. More...

Functions

static void Event_FightDjinni (void)
 Talking to the Djinni starts its battle.
const struct SceneEntrance * Scene_GetEntrances (void)
const struct SceneRegion * Scene_GetRegions (void)
const u32 * Scene_GetExits (void)
 Both scenes share one exit table.
const struct ScenePlacement * Scene_GetPlacements (void)
 The guards, wounded after Babi's audience, and the Djinni.
const struct SceneEvent * Scene_GetEvents (void)
 The events of the gate, the Djinni's scene or the third scene.
s32 Scene_Initialize (void)
 Sets the gate up as the party enters.
static void Event_EnterHouse (void)
 The leader walks north into the house's door: it opens in two frames and the leader steps inside.
static void Event_LeaveForWorldMap (void)
 The party leaves for the world map by trigger 1 or 5, forgetting the side it came in by.
static void Event_GuardsBlockPassage (void)
 Before Babi's audience, as the party nears the passage: the two guards step together in front of it, and the map cells around them change.
static void Event_IodemQuestionsGuards (void)
 After Babi's audience, on reaching the gate: Iodem steps out of the party and asks what happened.
static void Event_TalkToEastGuard (void)
 Before the attack the east guard asks whether the party is bound for Babi Lighthouse.
static void Event_SoldierVanishes (void)
 The soldier east of the gate gasps that Venus Lighthouse was attacked by strange wanderers, then flickers, slowly and then fast, and vanishes.

Variables

s32 gSuhallaGateWounded []
s32 gSuhallaGateWoundedFlipped []
struct SceneEntrance gSuhallaGateEntrancesOther []
struct SceneEntrance gSuhallaGateEntrances2 []
struct SceneEntrance gSuhallaGateEntrances3 []
u32 gSuhallaGateExits []
struct ScenePlacement gSuhallaGatePlacementsOther []
struct ScenePlacement gSuhallaGatePlacements2 []
struct ScenePlacement gSuhallaGatePlacements1 []
struct ScenePlacement gSuhallaGatePlacements1AfterAudience []
struct SceneEvent gSuhallaGateEventsOther []
struct SceneEvent gSuhallaGateEvents2 []
struct SceneEvent gSuhallaGateEvents3 []

Detailed Description

Suhalla Gate in three scenes: the gate with the house beside it, a second scene where a Djinni waits, and a third.

Before Babi's audience after Colosso two guards keep the gate and step together to block the passage. After it, the party arrives with Iodem to find the guards beaten by strange wanderers: Iodem questions them and sets out after the attackers.

Definition in file suhalla_gate.c.

Macro Definition Documentation

◆ SUHALLA_GATE_RETREAT_SCENE

#define SUHALLA_GATE_RETREAT_SCENE ( currentScene)
Value:
(currentScene)

Definition at line 38 of file suhalla_gate.c.

Referenced by Scene_Initialize().

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

The actors this scene's code names, by their place in the placement tables.

Enumerator
GUARD_WEST 

At the gate itself.

GUARD_EAST 
VANISHING_SOLDIER 

After Babi's audience: the soldier east of the gate who tells of the attack on Venus Lighthouse and vanishes, and Iodem.

IODEM 
DJINNI 

In the second scene.

Definition at line 42 of file suhalla_gate.c.

◆ anonymous enum

anonymous enum

Arrivals in the first scene: from the world map south of the gate, out of the house beside it, and from the world map to the east.

Enumerator
ENTRANCE_SOUTH 
ENTRANCE_FROM_HOUSE 
ENTRANCE_EAST 

Definition at line 56 of file suhalla_gate.c.

◆ anonymous enum

anonymous enum

The house beside the gate is Lunpa Suhalla's entrance 10.

Enumerator
LUNPA_SUHALLA_GATE_HOUSE 

Definition at line 59 of file suhalla_gate.c.

Function Documentation

◆ Event_FightDjinni()

void Event_FightDjinni ( void )
static

Talking to the Djinni starts its battle.

Definition at line 62 of file suhalla_gate.c.

◆ Scene_GetEntrances()

const struct SceneEntrance * Scene_GetEntrances ( void )

Definition at line 66 of file suhalla_gate.c.

◆ Scene_GetRegions()

const struct SceneRegion * Scene_GetRegions ( void )

Definition at line 78 of file suhalla_gate.c.

◆ Scene_GetExits()

const u32 * Scene_GetExits ( void )

Both scenes share one exit table.

Definition at line 80 of file suhalla_gate.c.

◆ Scene_GetPlacements()

const struct ScenePlacement * Scene_GetPlacements ( void )

The guards, wounded after Babi's audience, and the Djinni.

Definition at line 83 of file suhalla_gate.c.

◆ Scene_GetEvents()

const struct SceneEvent * Scene_GetEvents ( void )

The events of the gate, the Djinni's scene or the third scene.

Definition at line 99 of file suhalla_gate.c.

◆ Scene_Initialize()

s32 Scene_Initialize ( void )

Sets the gate up as the party enters.

Sets up whichever scene is being entered and runs its arrival events.

Once the attack has been seen, the house beside the gate is the saved place. In the first scene the vanished soldier stays hidden, the side the party came in by is remembered for Retreat, and arriving from the south before Babi's audience changes cells by the passage. The Spanish, French and Italian editions also change cells around the wounded guards.

Definition at line 117 of file suhalla_gate.c.

◆ Event_EnterHouse()

void Event_EnterHouse ( void )
static

The leader walks north into the house's door: it opens in two frames and the leader steps inside.

Definition at line 170 of file suhalla_gate.c.

Referenced by Event_EnterHouse().

◆ Event_LeaveForWorldMap()

void Event_LeaveForWorldMap ( void )
static

The party leaves for the world map by trigger 1 or 5, forgetting the side it came in by.

Definition at line 188 of file suhalla_gate.c.

Referenced by Event_LeaveForWorldMap().

◆ Event_GuardsBlockPassage()

void Event_GuardsBlockPassage ( void )
static

Before Babi's audience, as the party nears the passage: the two guards step together in front of it, and the map cells around them change.

Definition at line 199 of file suhalla_gate.c.

Referenced by Event_GuardsBlockPassage().

◆ Event_IodemQuestionsGuards()

void Event_IodemQuestionsGuards ( void )
static

After Babi's audience, on reaching the gate: Iodem steps out of the party and asks what happened.

The wounded guards tell of a strange group without papers whose powers beat them; Iodem asks whether it was the party's foe, and the guards send the party on after the attackers. Iodem rejoins the party.

Definition at line 223 of file suhalla_gate.c.

Referenced by Event_IodemQuestionsGuards().

◆ Event_TalkToEastGuard()

void Event_TalkToEastGuard ( void )
static

Before the attack the east guard asks whether the party is bound for Babi Lighthouse.

"Do you want to go to Babi Lighthouse?" Yes, and the party must show travel papers it does not have; no, and the guard calls them strange. Afterwards the guard vows to settle the score.

Definition at line 336 of file suhalla_gate.c.

◆ Event_SoldierVanishes()

void Event_SoldierVanishes ( void )
static

The soldier east of the gate gasps that Venus Lighthouse was attacked by strange wanderers, then flickers, slowly and then fast, and vanishes.

Definition at line 366 of file suhalla_gate.c.

Referenced by Event_SoldierVanishes().

Variable Documentation

◆ gSuhallaGateWounded

s32 gSuhallaGateWounded[]
Initial value:
= {
SC_ARG(5),
}
#define SC_ARG(v)
Definition objcmd.h:44
#define SC_END
Return to the main script.
Definition objcmd.h:32

Definition at line 418 of file suhalla_gate.c.

◆ gSuhallaGateWoundedFlipped

s32 gSuhallaGateWoundedFlipped[]
Initial value:
= {
SC_SET(SW_SCALE_X, -0x10000),
SC_ARG(5),
}
#define SC_SET(w, v)
Write a work value.
Definition objcmd.h:37
@ SW_SCALE_X
Definition objcmd.h:62

Definition at line 429 of file suhalla_gate.c.

◆ gSuhallaGateEntrancesOther

struct SceneEntrance gSuhallaGateEntrancesOther[]
Initial value:
= {
{0, CONDITION_ALWAYS, 152, 0, 504, FACING_SOUTH, 0, 32, 32, 272, 544, 0},
{1, CONDITION_ALWAYS, 152, 0, 520, FACING_NORTH, 0, 32, 32, 272, 544, 0},
{2, CONDITION_ALWAYS, 248, 0, 280, FACING_WEST, 0, 32, 32, 272, 544, 0},
{3, CONDITION_ALWAYS, 136, 0, 304, FACING_SOUTH, 0, 32, 32, 272, 544, 0},
{4, CONDITION_ALWAYS, 360, 0, 296, FACING_EAST, 0, 336, 32, 736, 496, 0},
{5, CONDITION_ALWAYS, 664, 0, 424, FACING_WEST, 0, 336, 32, 736, 496, 0},
}
@ SCENE_TABLE_END
Definition field_scene.h:43
@ CONDITION_ALWAYS
Definition field_scene.h:44
@ FACING_EAST
Definition field_scene.h:26
@ FACING_NORTH
Definition field_scene.h:32
@ FACING_SOUTH
Definition field_scene.h:28
@ FACING_WEST
Definition field_scene.h:30

Definition at line 435 of file suhalla_gate.c.

Referenced by Scene_GetEntrances().

◆ gSuhallaGateEntrances2

struct SceneEntrance gSuhallaGateEntrances2[]
Initial value:
= {
{1, CONDITION_ALWAYS, 40, 0, 304, FACING_EAST, 0, 16, 32, 416, 480, 0},
{2, CONDITION_ALWAYS, 392, 0, 368, FACING_WEST, 0, 16, 32, 416, 480, 0},
{3, CONDITION_ALWAYS, 40, 0, 912, FACING_EAST, 0, 16, 608, 720, 1008, 0},
{4, CONDITION_ALWAYS, 680, 0, 904, FACING_WEST, 0, 16, 608, 720, 1008, 0},
{5, CONDITION_ALWAYS, 616, 0, 920, FACING_SOUTH, 0, 16, 608, 720, 1008, 0},
}

Definition at line 445 of file suhalla_gate.c.

Referenced by Scene_GetEntrances().

◆ gSuhallaGateEntrances3

struct SceneEntrance gSuhallaGateEntrances3[]
Initial value:
= {
{1, CONDITION_ALWAYS, 72, 0, 264, FACING_NORTH, 0, 24, 24, 280, 256, 0},
{2, CONDITION_ALWAYS, 184, 0, 168, FACING_SOUTH, 0, 24, 24, 280, 256, 0},
{3, CONDITION_ALWAYS, 280, 0, 344, FACING_SOUTH, 0, 208, 288, 704, 640, 0},
{4, CONDITION_ALWAYS, 664, 0, 616, FACING_NORTH, 0, 208, 288, 704, 640, 0},
}

Definition at line 454 of file suhalla_gate.c.

Referenced by Scene_GetEntrances().

◆ gSuhallaGateExits

u32 gSuhallaGateExits[]
Initial value:
= {
SCENE_EXITS(169), SCENE_EXIT(1, 2, 29), SCENE_EXIT(2, 170, 1),
SCENE_EXIT(3, 105, 10), SCENE_EXIT(4, 170, 4), SCENE_EXIT(5, 2, 42),
SCENE_EXIT(0, 170, 0), SCENE_EXIT(1, 169, 2), SCENE_EXIT(2, 170, 3),
SCENE_EXIT(3, 170, 2), SCENE_EXIT(4, 169, 4), SCENE_EXIT(5, 171, 1),
SCENE_EXIT(0, 171, 0), SCENE_EXIT(1, 170, 5), SCENE_EXIT(2, 171, 3),
SCENE_EXIT(3, 171, 2), SCENE_EXIT(4, 2, 33), SCENE_EXITS_END,
}
#define SCENE_EXITS(scene)
Definition field_scene.h:72
#define SCENE_EXIT(exit, scene, entrance)
Definition field_scene.h:73
#define SCENE_EXITS_END
Definition field_scene.h:77

Definition at line 462 of file suhalla_gate.c.

Referenced by Scene_GetExits().

◆ gSuhallaGatePlacementsOther

struct ScenePlacement gSuhallaGatePlacementsOther[]
Initial value:
= {
}

Definition at line 471 of file suhalla_gate.c.

Referenced by Scene_GetPlacements().

◆ gSuhallaGatePlacements2

struct ScenePlacement gSuhallaGatePlacements2[]
Initial value:
= {
{ 0xee, CONDITION_ALWAYS, 7,
{ 0xee, CONDITION_ALWAYS, 7,
{ 0xee, CONDITION_ALWAYS, 7,
{ 0xee, CONDITION_ALWAYS, 7,
{ 0xee, CONDITION_ALWAYS, 7,
{ 0x5b, 0x4a, ACTOR_STAND,
}
@ FACING_STEP
Definition field_scene.h:36
@ TALK_KEEP_FACING
@ TALK_FACE_PARTY
@ ACTOR_STAND
@ FACING_SOUTHEAST
Definition field_scene.h:27
#define PIXELS(value)

Definition at line 476 of file suhalla_gate.c.

Referenced by Scene_GetPlacements().

◆ gSuhallaGatePlacements1

struct ScenePlacement gSuhallaGatePlacements1[]
Initial value:

Definition at line 492 of file suhalla_gate.c.

Referenced by Scene_GetPlacements().

◆ gSuhallaGatePlacements1AfterAudience

struct ScenePlacement gSuhallaGatePlacements1AfterAudience[]
Initial value:
= {
PIXELS(136), 0, PIXELS(408), FACING_SOUTH, TALK_FACE_PARTY, 0 },
PIXELS(168), 0, PIXELS(424), FACING_SOUTH, TALK_FACE_PARTY, 0 },
PIXELS(472), 0, PIXELS(304), FACING_SOUTH, TALK_FACE_PARTY, 0 },
0, 0, 0, FACING_EAST, TALK_KEEP_FACING, 0 },
}
s32 gSuhallaGateWoundedFlipped[]
s32 gSuhallaGateWounded[]
signed int s32
Definition types.h:14

Definition at line 500 of file suhalla_gate.c.

Referenced by Scene_GetPlacements().

◆ gSuhallaGateEventsOther

struct SceneEvent gSuhallaGateEventsOther[]
Initial value:
= {
{ EVENT_TALK, 8, FLAG_SUHALLA_GATE_ATTACK_SEEN, MSGNO(MsgSuhallaTravelPapersRequired) },
{ EVENT_TALK, 8, CONDITION_ALWAYS, MSGNO(MsgSuhallaSendHelpFromTower) },
{ PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 8, FLAG_SUHALLA_GATE_ATTACK_SEEN, MSGNO(MsgSuhallaObeyBabiOrders) },
{ PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 8, CONDITION_ALWAYS, MSGNO(MsgSuhallaAshamedBeforeIodem) },
{ PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 9, FLAG_SUHALLA_GATE_ATTACK_SEEN, MSGNO(MsgSuhallaSeeColossoNextYear) },
{ PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 9, CONDITION_ALWAYS, MSGNO(MsgSuhallaSurvivedAttack) },
}
@ ABILITY_MIND_READ
Definition ability_ids.h:16
#define SCENE_EVENTS_END
@ EVENT_TOUCH
@ EVENT_EXIT
@ EVENT_TALK
#define PSYNERGY_ON_ACTOR(ability)
#define EVENT_SCRIPT(script)
#define TOUCH_WALKING_INTO(facing)
#define FLAG_SUHALLA_GATE_SOLDIER_VANISHED
after his last words
Definition flags.h:373
#define FLAG_BABI_SPOKE_AFTER_COLOSSO
Babi and Iodem have spoken with the party after Colosso.
Definition flags.h:209
#define FLAG_SUHALLA_GATE_ATTACK_SEEN
Iodem has questioned the guards.
Definition flags.h:374
static void Event_IodemQuestionsGuards(void)
After Babi's audience, on reaching the gate: Iodem steps out of the party and asks what happened.
static void Event_EnterHouse(void)
The leader walks north into the house's door: it opens in two frames and the leader steps inside.
static void Event_LeaveForWorldMap(void)
The party leaves for the world map by trigger 1 or 5, forgetting the side it came in by.
static void Event_GuardsBlockPassage(void)
Before Babi's audience, as the party nears the passage: the two guards step together in front of it,...
static void Event_TalkToEastGuard(void)
Before the attack the east guard asks whether the party is bound for Babi Lighthouse.
static void Event_SoldierVanishes(void)
The soldier east of the gate gasps that Venus Lighthouse was attacked by strange wanderers,...

Definition at line 521 of file suhalla_gate.c.

Referenced by Scene_GetEvents().

◆ gSuhallaGateEvents2

struct SceneEvent gSuhallaGateEvents2[]
Initial value:
= {
{0xc413, 100, 0xfb4, FIND_ITEM(ITEM_MINT)},
{0x413, 100, 0xfb4, FIND_ITEM(ITEM_MINT)},
{0x8413, 100, 0xfb4, FIND_ITEM(ITEM_MINT)},
}
#define FIND_ITEM(item)
@ ITEM_MINT
Definition item_ids.h:54
static void Event_FightDjinni(void)
Talking to the Djinni starts its battle.

Definition at line 542 of file suhalla_gate.c.

Referenced by Scene_GetEvents().

◆ gSuhallaGateEvents3

struct SceneEvent gSuhallaGateEvents3[]
Initial value:
= {
{0x31, 2, CONDITION_ALWAYS, 2},
{0x21, 3, CONDITION_ALWAYS, 3},
}
#define FIND_PSYNERGY_STONE
#define SEARCH(target)
@ SEARCH_UNNAMED

Definition at line 555 of file suhalla_gate.c.

Referenced by Scene_GetEvents().