Alchemy
Loading...
Searching...
No Matches

goma_cave_pond.c

Go to the documentation of this file.
1/// @file
2/// Goma Cave: the room the stump in the room above falls into.
6#include "battle.h"
7#include "debug.h"
8#include "field.h"
9#include "game.h"
10#include "graphics.h"
11#include "menu.h"
12#include "minigame.h"
13#include "sound.h"
14#include "system.h"
15#include "types.h"
16#include "scene.h"
17
19#include "field_scene.h"
20#include "field_obj.h"
21
22#include "field_event.h"
23#include "flags.h"
24#include "event.h"
25
26// Place flags: Scene_ResetFlagsOnEnter clears 0x300 to 0x3ff when the party
27// enters another place group, and other places use the numbers for their own.
28
29/// The stump has been pushed over into the room below (goma_cave_pillar.c).
30#define FLAG_GOMA_CAVE_STUMP_FELL 0x300
31
32/// The stump the party pushes over in the room above, lying in this room.
33#define FALLEN_STUMP 8
34
35const struct SceneEntrance *Scene_GetEntrances(void) {
37}
38
39const struct SceneRegion *Scene_GetRegions(void) { return NULL; }
40
41const u32 *Scene_GetExits(void) { return gGomaCavePondExits; }
42
45}
46
47const struct SceneEvent *Scene_GetEvents(void) { return gGomaCavePondEvents; }
48
49/// Once the stump in the room above has been pushed over, it lies fallen
50/// here: put it in place and copy the map cells it covers.
52 struct EventWork *work;
53
54 work = gEventWork;
56 work->transitionFrames = 24;
58 OBJ_POS_SET(FALLEN_STUMP, 216, 136);
63 Map_CopyCellAttributes(11, 36, 5, 5, 11, 6);
64 }
65 return 0;
66}
67
69 {0, CONDITION_ALWAYS, 172, 0, 149, FACING_SOUTH, 0, -1, -1, -1, -1, 0},
70 {1, CONDITION_ALWAYS, 120, 0, 88, FACING_SOUTH, 0, 24, 8, 504, 424, 0},
71 {2, CONDITION_ALWAYS, 424, 0, 344, FACING_SOUTH, 0, 24, 8, 504, 424, 0},
72 {3, CONDITION_ALWAYS, 408, 0, 136, FACING_SOUTH, 0, 24, 8, 504, 424, 0},
74};
75
77 SCENE_EXITS(26), SCENE_EXIT(1, 27, 4), SCENE_EXIT(2, 27, 5),
78 SCENE_EXIT(3, 27, 3), SCENE_EXITS_END,
79};
80
81// clang-format off
86};
87// clang-format on
88
90 {0x21, 5, CONDITION_ALWAYS, 1},
91 {0x21, 6, CONDITION_ALWAYS, 2},
92 {0x21, 7, CONDITION_ALWAYS, 3},
94};
struct FieldActor * Object_GetById(s32 actor)
Returns an actor, or NULL if it does not exist.
const struct ScenePlacement * Scene_GetPlacements(void)
const struct SceneEntrance * Scene_GetEntrances(void)
const struct SceneEvent * Scene_GetEvents(void)
const u32 * Scene_GetExits(void)
Both scenes share one exit table.
const struct SceneRegion * Scene_GetRegions(void)
s32 Scene_Initialize(void)
Sets up whichever scene is being entered and runs its arrival events.
void Engine_ActorSetSpriteFlags(struct FieldActor *, s32)
The engine calls the debug menus import, and their palette swatch tiles.
Scene commands: the all-caps macros the scene scripts are written in.
#define OBJ_POS_SET(no, x, z)
Definition event.h:13
#define OBJ_MODE(no, m)
Definition event.h:18
The scene script layer: the engine services a scene's events call, declared once (Engine_EventBegin,...
static void Map_CopyCellAttributes(s32 srcX, s32 srcY, s32 width, s32 height, s32 destX, s32 destY)
s32 Engine_GameFlagIsSet(s32 flag)
Field objects and actors, and the scene transition styles.
@ TRANSITION_WINDOW
Definition field_obj.h:17
@ ACTOR_PRIORITY_UNDERFOOT
The depth sort treats it as 320 pixels higher on the screen.
Definition field_obj.h:155
#define SCENE_TRANSITION(style, variant)
Definition field_obj.h:20
The scene table formats: entrances, exits, placements and events, and the macros that write them.
#define SCENE_EVENTS_END
#define SCENE_EXITS(scene)
Definition field_scene.h:72
#define SCENE_EXIT(exit, scene, entrance)
Definition field_scene.h:73
@ SCENE_TABLE_END
Definition field_scene.h:43
@ CONDITION_ALWAYS
Definition field_scene.h:44
@ TALK_KEEP_FACING
@ ACTOR_STAND
#define SCENE_EXITS_END
Definition field_scene.h:77
@ FACING_SOUTH
Definition field_scene.h:28
#define PIXELS(value)
Game flags, named where their meaning is shown.
#define FLAG_GOMA_CAVE_STUMP_FELL
pushed over into the room below
#define FALLEN_STUMP
The stump the party pushes over in the room above, lying in this room.
u32 gGomaCavePondExits[]
struct SceneEvent gGomaCavePondEvents[]
struct ScenePlacement gGomaCavePondPlacements[]
struct SceneEntrance gGomaCavePondEntrances[]
The screen blend's globals and the graphics routines.
The reel game's title lettering.
The views a scene overlay takes of its runtime work and slots; most fields are still unnamed.
FIELD_AT_OFFSET and the entity and camera views older scene code reads.
struct EventWork * gEventWork
#define NULL
Definition bilibin.h:6
The running scene's event work: its placement and event tables, its actors, the triggers and exit it ...
Definition event_work.h:20
s32 startTransition
SCENE_TRANSITION(style, variant).
Definition event_work.h:43
s32 transitionFrames
frames
Definition event_work.h:45
u8 priorityFlags
ActorPriorityFlag bits, read by the scrolling camera.
Definition field_obj.h:51
u8 collisionFlags
bits: 7 refuses to move into a solid object | 4 nearer for Psynergy targets | 3 never a talk or Psyne...
Definition field_obj.h:91
A scene entrance: where and facing which way the party arrives, and the camera's bounds there (-1 for...
Definition field_scene.h:54
A scene event: its kind and detail, the trigger it answers, its condition and its value (a message or...
An actor a scene places: its sprite, the condition for placing it, how it behaves,...
Definition field_scene.h:81
A scene's exit region: the box that, while its condition holds, takes the party leader out through it...
The system's routines and globals: interrupts, BIOS sound bias, random numbers and sleep.
The integer types, TRUE, UNUSED and the fixed-address macros.
signed int s32
Definition types.h:14
unsigned int u32
Definition types.h:15