Alchemy
Loading...
Searching...
No Matches

goma_cave_entrance.c File Reference

Goma Cave's entrance: the stump caught in ivy, the two pillars, and Ivan, who rejoins the party and blows the ivy away with Whirlwind. More...

Go to the source code of this file.

Macros

#define STUMP   8
#define WEST_PILLAR   9
#define EAST_PILLAR   10
#define STUMP_IVY   15
 the ivy holding the stump
#define IVY   16

Functions

static void GomaCaveEntrance_WhirlwindOnStumpIvy (void)
 Ivan casts Whirlwind on the stump's ivy, and the scene waits for it.
static void GomaCaveEntrance_LeapStump (s32 id)
 The stump spins in place, leaps and lands with a shake and a ring of dust, then comes to rest a little further on.
static void GomaCaveEntrance_GiveShamansRod (void)
 Gives Ivan the Shaman's Rod and equips it.
static void GomaCaveEntrance_SayThenWait (s32 actorId, s32 frames)
 Shows the next message over the speaker, then pauses.
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)
static void Event_MoveWestPillar (void)
 Move on the west pillar, and after each push: the pillar stands on one of three columns, and the map cells and flags follow it.
static void Event_MoveEastPillar (void)
 Move on the east pillar: once it reaches column 23 it settles into the floor and can be walked over.
static void Event_PushWestPillar (void)
 Walking into the west pillar from the west (trigger 5) or the east (trigger 6): the leader leans on it and pushes it one step.
static UNUSED void GomaCaveEntrance_NoOpA (void)
 Reserved overlay hook; no current scene calls it.
static UNUSED void GomaCaveEntrance_NoOpB (void)
 A second reserved hook, also unused by the scene.
static void Event_BlowAwayIvy (void)
 Whirlwind on the other ivy: it is blown away for good.
const struct SceneEvent * Scene_GetEvents (void)
s32 Scene_Initialize (void)
 Puts the stump and pillars where the party left them, and the stump's ivy away once Ivan has blown it off.
static void Event_IvanRejoins (void)
 Move on the stump while the ivy holds it: Garet says their Psynergy is not strong enough.
static void Event_MoveStump (void)
 Move on the freed stump: from column 11 it spins, leaps away and lies where it lands.
static void GomaCaveEntrance_SpinStump (union FieldObject *fieldObject)
 The leaping stump's update hook turns its sprite a fixed amount per frame.

Variables

s32 gEffectScript0 []
s32 gEffectScript1 []
s32 gEffectScript2 []
const s32 * gEffectScripts []
s32 gGomaCaveEntranceTallIvyScript []
struct SceneEntrance gGomaCaveEntranceEntrances []
u32 gGomaCaveEntranceExits []
struct ScenePlacement gGomaCaveEntrancePlacements []
struct SceneEvent gGomaCaveEntranceEvents []

Detailed Description

Goma Cave's entrance: the stump caught in ivy, the two pillars, and Ivan, who rejoins the party and blows the ivy away with Whirlwind.

Definition in file goma_cave_entrance.c.

Macro Definition Documentation

◆ STUMP

◆ WEST_PILLAR

#define WEST_PILLAR   9

◆ EAST_PILLAR

#define EAST_PILLAR   10

◆ STUMP_IVY

#define STUMP_IVY   15

the ivy holding the stump

Definition at line 46 of file goma_cave_entrance.c.

Referenced by GomaCaveEntrance_WhirlwindOnStumpIvy(), and Scene_Initialize().

◆ IVY

#define IVY   16

Definition at line 47 of file goma_cave_entrance.c.

Function Documentation

◆ GomaCaveEntrance_WhirlwindOnStumpIvy()

void GomaCaveEntrance_WhirlwindOnStumpIvy ( void )
static

Ivan casts Whirlwind on the stump's ivy, and the scene waits for it.

Definition at line 441 of file goma_cave_entrance.c.

Referenced by Event_IvanRejoins(), and GomaCaveEntrance_WhirlwindOnStumpIvy().

◆ GomaCaveEntrance_LeapStump()

void GomaCaveEntrance_LeapStump ( s32 id)
static

The stump spins in place, leaps and lands with a shake and a ring of dust, then comes to rest a little further on.

Definition at line 473 of file goma_cave_entrance.c.

Referenced by Event_MoveStump(), and GomaCaveEntrance_LeapStump().

◆ GomaCaveEntrance_GiveShamansRod()

void GomaCaveEntrance_GiveShamansRod ( void )
static

Gives Ivan the Shaman's Rod and equips it.

With his items full, he drops another to make room; later patches skip items marked only indispensable.

Definition at line 540 of file goma_cave_entrance.c.

Referenced by Event_IvanRejoins(), and GomaCaveEntrance_GiveShamansRod().

◆ GomaCaveEntrance_SayThenWait()

void GomaCaveEntrance_SayThenWait ( s32 actorId,
s32 frames )
static

Shows the next message over the speaker, then pauses.

Definition at line 59 of file goma_cave_entrance.c.

Referenced by Event_IvanRejoins(), and GomaCaveEntrance_SayThenWait().

◆ Scene_GetEntrances()

const struct SceneEntrance * Scene_GetEntrances ( void )

Definition at line 64 of file goma_cave_entrance.c.

◆ Scene_GetRegions()

const struct SceneRegion * Scene_GetRegions ( void )

Definition at line 68 of file goma_cave_entrance.c.

◆ Scene_GetExits()

const u32 * Scene_GetExits ( void )

Both scenes share one exit table.

Definition at line 70 of file goma_cave_entrance.c.

◆ Scene_GetPlacements()

const struct ScenePlacement * Scene_GetPlacements ( void )

Definition at line 72 of file goma_cave_entrance.c.

◆ Event_MoveWestPillar()

void Event_MoveWestPillar ( void )
static

Move on the west pillar, and after each push: the pillar stands on one of three columns, and the map cells and flags follow it.

Definition at line 78 of file goma_cave_entrance.c.

Referenced by Event_MoveWestPillar(), Event_MoveWestPillar(), and Event_PushWestPillar().

◆ Event_MoveEastPillar()

void Event_MoveEastPillar ( void )
static

Move on the east pillar: once it reaches column 23 it settles into the floor and can be walked over.

Definition at line 99 of file goma_cave_entrance.c.

Referenced by Event_MoveEastPillar(), Event_MoveEastPillar(), Event_MoveEastPillar(), and Event_PushEastPillar().

◆ Event_PushWestPillar()

void Event_PushWestPillar ( void )
static

Walking into the west pillar from the west (trigger 5) or the east (trigger 6): the leader leans on it and pushes it one step.

Definition at line 117 of file goma_cave_entrance.c.

Referenced by Event_PushWestPillar().

◆ GomaCaveEntrance_NoOpA()

UNUSED void GomaCaveEntrance_NoOpA ( void )
static

Reserved overlay hook; no current scene calls it.

Definition at line 142 of file goma_cave_entrance.c.

Referenced by GomaCaveEntrance_NoOpA().

◆ GomaCaveEntrance_NoOpB()

UNUSED void GomaCaveEntrance_NoOpB ( void )
static

A second reserved hook, also unused by the scene.

Definition at line 145 of file goma_cave_entrance.c.

Referenced by GomaCaveEntrance_NoOpB().

◆ Event_BlowAwayIvy()

void Event_BlowAwayIvy ( void )
static

Whirlwind on the other ivy: it is blown away for good.

Definition at line 148 of file goma_cave_entrance.c.

Referenced by Event_BlowAwayIvy().

◆ Scene_GetEvents()

const struct SceneEvent * Scene_GetEvents ( void )

Definition at line 154 of file goma_cave_entrance.c.

◆ Scene_Initialize()

s32 Scene_Initialize ( void )

Puts the stump and pillars where the party left them, and the stump's ivy away once Ivan has blown it off.

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

Definition at line 160 of file goma_cave_entrance.c.

◆ Event_IvanRejoins()

void Event_IvanRejoins ( void )
static

Move on the stump while the ivy holds it: Garet says their Psynergy is not strong enough.

Once the thieves in Vault are jailed, Ivan turns up, blows the ivy away with Whirlwind and asks to join the party, and gets back the Shaman's Rod.

Definition at line 216 of file goma_cave_entrance.c.

Referenced by Event_IvanRejoins().

◆ Event_MoveStump()

void Event_MoveStump ( void )
static

Move on the freed stump: from column 11 it spins, leaps away and lies where it lands.

Definition at line 423 of file goma_cave_entrance.c.

Referenced by Event_MoveStump(), and Event_MoveStump().

◆ GomaCaveEntrance_SpinStump()

void GomaCaveEntrance_SpinStump ( union FieldObject * fieldObject)
static

The leaping stump's update hook turns its sprite a fixed amount per frame.

Definition at line 460 of file goma_cave_entrance.c.

Referenced by GomaCaveEntrance_LeapStump(), and GomaCaveEntrance_SpinStump().

Variable Documentation

◆ gEffectScript0

s32 gEffectScript0[]
Initial value:
= {
SC_WAIT(1), SC_LOOP(22, SC_TOP), SC_WAIT(1),
SC_POS(0, 0, 0), SC_WAIT(1), SC_FREE,
}
#define SC_LOOP(n, to)
Repeat up to n times.
Definition objcmd.h:28
#define SC_POS(x, y, z)
Set position.
Definition objcmd.h:18
#define SC_FREE
Release.
Definition objcmd.h:43
#define SC_WAIT(n)
Wait n frames.
Definition objcmd.h:16
#define SC_TOP
Script start.
Definition objcmd.h:13

Definition at line 589 of file goma_cave_entrance.c.

◆ gEffectScript1

s32 gEffectScript1[]
Initial value:
= {
SC_WAIT(1), SC_LOOP(44, SC_TOP), SC_WAIT(1),
SC_POS(0, 0, 0), SC_WAIT(1), SC_FREE,
}

Definition at line 594 of file goma_cave_entrance.c.

◆ gEffectScript2

s32 gEffectScript2[]
Initial value:
= {
SC_WAIT(1), SC_LOOP(126, SC_TOP), SC_WAIT(1),
SC_POS(0, 0, 0), SC_WAIT(1), SC_FREE,
}

Definition at line 599 of file goma_cave_entrance.c.

◆ gEffectScripts

const s32* gEffectScripts[]
Initial value:
= {
}
s32 gEffectScript0[]
s32 gEffectScript1[]
s32 gEffectScript2[]

Definition at line 604 of file goma_cave_entrance.c.

◆ gGomaCaveEntranceTallIvyScript

s32 gGomaCaveEntranceTallIvyScript[]
Initial value:
= {
SC_SET(SW_SCALE_Y, 0x19999),
}
#define SC_SET(w, v)
Write a work value.
Definition objcmd.h:37
#define SC_END
Return to the main script.
Definition objcmd.h:32
@ SW_SCALE_Y
Definition objcmd.h:63

Definition at line 610 of file goma_cave_entrance.c.

◆ gGomaCaveEntranceEntrances

struct SceneEntrance gGomaCaveEntranceEntrances[]
Initial value:
= {
{0, CONDITION_ALWAYS, 192, 0, 197, FACING_SOUTH, 0, -1, -1, -1, -1, 0},
{1, CONDITION_ALWAYS, 96, 0, 440, FACING_NORTH, 0, -1, -1, -1, -1, 0},
{2, CONDITION_ALWAYS, 200, 0, 184, FACING_SOUTH, 0, -1, -1, -1, -1, 0},
}
@ SCENE_TABLE_END
Definition field_scene.h:43
@ CONDITION_ALWAYS
Definition field_scene.h:44
@ FACING_NORTH
Definition field_scene.h:32
@ FACING_SOUTH
Definition field_scene.h:28

Definition at line 615 of file goma_cave_entrance.c.

Referenced by Scene_GetEntrances().

◆ gGomaCaveEntranceExits

u32 gGomaCaveEntranceExits[]
Initial value:
= {
SCENE_EXIT(1, 28, 1),
SCENE_EXIT(2, 2, 4),
}
#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 622 of file goma_cave_entrance.c.

Referenced by Scene_GetExits().

◆ gGomaCaveEntrancePlacements

struct ScenePlacement gGomaCaveEntrancePlacements[]
Initial value:
= {
{ 0xd4, CONDITION_ALWAYS, 7,
{ 0xd7, CONDITION_ALWAYS, 7,
0, 0, 0, FACING_WEST, TALK_KEEP_FACING, 0 },
{ 0xd7, CONDITION_ALWAYS, 7,
PIXELS(191), 0, PIXELS(194), FACING_NORTH, TALK_FACE_PARTY, 0 },
PIXELS(200), 0, PIXELS(168), FACING_NORTH, TALK_FACE_PARTY, 0 },
}
#define GARET
Jerald.
#define IVAN
Ivan.
@ TALK_KEEP_FACING
@ TALK_FACE_PARTY
@ ACTOR_STAND
#define PLACEMENT_SHARE_PREVIOUS_SPRITE
@ FACING_WEST
Definition field_scene.h:30
#define PIXELS(value)
#define FLAG_GOMA_CAVE_ENTRANCE_IVY_BLOWN_AWAY
Definition flags.h:600
#define FLAG_GOMA_CAVE_IVAN_REJOINED
Ivan has blown the ivy off the stump and rejoined the party.
Definition flags.h:599
s32 gGomaCaveEntranceTallIvyScript[]
signed int s32
Definition types.h:14

Definition at line 630 of file goma_cave_entrance.c.

Referenced by Scene_GetPlacements().

◆ gGomaCaveEntranceEvents

struct SceneEvent gGomaCaveEntranceEvents[]
Initial value:
= {
}
@ ABILITY_MOVE
Definition ability_ids.h:15
@ ABILITY_WHIRLWIND
Definition ability_ids.h:13
#define SCENE_EVENTS_END
@ EVENT_EXIT
#define PSYNERGY_ON_ACTOR(ability)
#define EVENT_SCRIPT(script)
#define TOUCH_WALKING_INTO(facing)
@ FACING_EAST
Definition field_scene.h:26
#define FLAG_GOMA_CAVE_ENTRANCE_EAST_PILLAR_IN_PLACE
Definition flags.h:596
#define FLAG_GOMA_CAVE_ENTRANCE_STUMP_MOVED
Definition flags.h:593
static void Event_MoveStump(void)
Move on the freed stump: from column 11 it spins, leaps away and lies where it lands.
static void Event_BlowAwayIvy(void)
Whirlwind on the other ivy: it is blown away for good.
#define STUMP
static void Event_PushWestPillar(void)
Walking into the west pillar from the west (trigger 5) or the east (trigger 6): the leader leans on i...
#define IVY
#define WEST_PILLAR
static void Event_MoveWestPillar(void)
Move on the west pillar, and after each push: the pillar stands on one of three columns,...
#define EAST_PILLAR
static void Event_MoveEastPillar(void)
Move on the east pillar: once it reaches column 23 it settles into the floor and can be walked over.
static void Event_IvanRejoins(void)
Move on the stump while the ivy holds it: Garet says their Psynergy is not strong enough.

Definition at line 656 of file goma_cave_entrance.c.

Referenced by Scene_GetEvents().