Alchemy
Loading...
Searching...
No Matches

sol_sanctum_psynergy_stone.c

Go to the documentation of this file.
1/// @file
2/// The Sol Sanctum room that holds a Psynergy Stone, scene 13.
3
5#include "battle.h"
6#include "debug.h"
7#include "field.h"
8#include "game.h"
9#include "graphics.h"
10#include "menu.h"
11#include "minigame.h"
12#include "sound.h"
13#include "system.h"
14#include "types.h"
15#include "scene.h"
16
18#include "field_scene.h"
19
20#include "field_event.h"
21#include "flags.h"
22#include "songs.h"
23#include "fixed_math.h"
24
25// Place flags: Scene_ResetFlagsOnEnter clears 0x300 to 0x3ff when the party
26// enters another place group, and other places use the numbers for their own.
27#define FLAG_SOL_SANCTUM_PSYNERGY_STONE_TAKEN 0x350
28
29const struct SceneEntrance *Scene_GetEntrances(void) {
31}
32
33const struct SceneRegion *Scene_GetRegions(void) { return NULL; }
34
36
39}
40
41/// The exit and the Psynergy Stone.
42const struct SceneEvent *Scene_GetEvents(void) {
44}
45
46/// The room opens through a window. After the eruption it rumbles and shakes
47/// gently, as the rest of the sanctum does.
49 s32 shakeX = PIXELS(1);
50 s32 shakeY = PIXELS(1);
51 s32 decay = Q16_ONE;
52
54 // Retreat does not work here (flag 0x144).
58 Engine_WorkSetValuesIfNonNegative(shakeX, shakeY, decay);
60 }
61 return 0;
62}
63
65 {0, CONDITION_ALWAYS, 87, 0, 142, FACING_NORTH, 0, -1, -1, -1, -1, 0},
66 {1, CONDITION_ALWAYS, 87, 0, 142, FACING_NORTH, 0, -1, -1, -1, -1, 0},
68};
69
71 SCENE_EXITS(13),
72 SCENE_EXIT(1, 12, 2),
74};
75
78};
79
85};
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.
The engine calls the debug menus import, and their palette swatch tiles.
The scene script layer: the engine services a scene's events call, declared once (Engine_EventBegin,...
void Engine_WorkSetValuesIfNonNegative(s32 first, s32 second, s32 third)
void Engine_GameFlagSet(s32 flag)
s32 Engine_GameFlagIsSet(s32 flag)
@ TRANSITION_WINDOW
Definition field_obj.h:17
#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
@ EVENT_EXIT
#define SCENE_EXITS(scene)
Definition field_scene.h:72
#define FIND_PSYNERGY_STONE
#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
#define SEARCH(target)
#define SCENE_EXITS_END
Definition field_scene.h:77
@ FACING_NORTH
Definition field_scene.h:32
#define PIXELS(value)
@ SEARCH_UNNAMED
16.16 fixed-point constants, sine and cosine, and the library division.
#define Q16_ONE
One in the engine's signed 16.16 fixed-point format.
Definition fixed_math.h:10
Game flags, named where their meaning is shown.
#define FLAG_RETREAT_BLOCKED
Retreat is blocked, from Psynergy or an item.
Definition flags.h:55
#define FLAG_SOL_SANCTUM_ERUPTED
The volcano has erupted and the sanctum's rooms rumble and shake.
Definition flags.h:660
The screen blend's globals and the graphics routines.
The reel game's title lettering.
The Sol Sanctum Psynergy Stone room's imports, under their overlay.inc names: BattleFx_SetQueuedSound...
void Resource37c_FinalizeSetup(void)
void Resource37c_QueueSoundCue(s32)
FIELD_AT_OFFSET and the entity and camera views older scene code reads.
struct SceneEntrance gSolSanctumPsynergyStoneEntrances[]
#define FLAG_SOL_SANCTUM_PSYNERGY_STONE_TAKEN
struct SceneEvent gSolSanctumPsynergyStoneEvents[]
struct ScenePlacement gSolSanctumPsynergyStonePlacements[]
u32 gSolSanctumPsynergyStoneExits[]
Song and sound effect ids, indices into gSound_SongTable.
#define SE_141
Definition songs.h:134
struct EventWork * gEventWork
#define NULL
Definition bilibin.h:6
s32 startTransition
SCENE_TRANSITION(style, variant).
Definition event_work.h:43
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