Alchemy
Loading...
Searching...
No Matches

rooms.c

Go to the documentation of this file.
1#include "unit/debug/rooms.h"
4#include "battle.h"
5#include "debug.h"
6#include "field.h"
7#include "game.h"
8#include "graphics.h"
9#include "menu.h"
10#include "minigame.h"
11#include "sound.h"
12#include "system.h"
13#include "types.h"
14#include "scene.h"
15#include "field_event.h"
16#include "field_scene.h"
17#include "battle_unit.h"
18#include "flags.h"
19
21
22s32 SceneData_ReturnZero(void) { return 0; }
23
25
26/// Places one Djinni of each element in the test room.
28
29/// Grants the first Djinni of an element, then clears its found flag for
30/// testing.
31static __inline__ void TestRooms_GiveDjinniForTesting(s32 actorId,
32 s32 element) {
33 Djinn_JoinParty(actorId, element, 0);
34 Engine_GameFlagClear(FLAG_DJINNI_0 + element * 20);
35}
36
37static void TestRooms_ReceiveFlint(void) {
39}
40
41static void TestRooms_ReceiveFizz(void) {
43}
44
45static void TestRooms_ReceiveForge(void) {
47}
48
49static void TestRooms_ReceiveGust(void) {
51}
52
53/// Bind each Djinni actor to its test grant callback.
55
56s32 Scene_RunEmptyScene(void) { return 0; }
57
59 0x500050, 0, 80, 0x500000, 0x10003, 2, 0,
60 0x780078, 0, 120, 0x780000, 0x10003, 2, 0,
61 0x28003c, 0, 128, 0x800000, 0x10002, 1, 0,
62 0x28003c, 0, 128, 0x800000, 0x10002, 3, 0,
63 0x800080, 0, 128, 0x800000, 0x20003, 1, 0,
64 0x800080, 0, 128, 0x800000, 0x20003, 1, 0,
65 0x200020, 0, 0, 0, 0, 0, 0,
66 0x800080, 0, 128, 0x800000, 0x20003, 1, 0,
67};
68
70 {0, CONDITION_ALWAYS, 192, 0, 192, FACING_WEST, 0, -1, -1, -1, -1, 0},
72};
73
75 SCENE_EXITS(191), SCENE_EXIT(0, 192, 0), SCENE_EXIT(0, 193, 0),
76 SCENE_EXIT(0, 194, 0), SCENE_EXITS_END,
77};
78
80 {0x5a, 0x30, ACTOR_STAND, PIXELS(496), 0, PIXELS(176), FACING_EAST,
82 {0x5b, 0x44, ACTOR_STAND, PIXELS(496), 0, PIXELS(200), FACING_EAST,
84 {0x5c, 0x58, ACTOR_STAND, PIXELS(528), 0, PIXELS(176), FACING_WEST,
86 {0x5d, 0x6c, ACTOR_STAND, PIXELS(528), 0, PIXELS(200), FACING_WEST,
89};
90
97};
BattleUnit, a party member's or enemy's battle state, with the elements, abilities and actions it use...
@ ELEMENT_MARS
Definition battle_unit.h:38
@ ELEMENT_MERCURY
Definition battle_unit.h:37
@ ELEMENT_VENUS
Definition battle_unit.h:36
@ ELEMENT_JUPITER
Definition battle_unit.h:39
The engine calls the debug menus import, and their palette swatch tiles.
void Djinn_JoinParty(s32 slot, s32 element, s32 djinn)
A Djinni joins the party: djinn (0 to 19) of element goes to the member with the fewest Djinn,...
Definition djinni.c:124
The scene script layer: the engine services a scene's events call, declared once (Engine_EventBegin,...
void Engine_GameFlagClear(s32 flag)
The scene table formats: entrances, exits, placements and events, and the macros that write them.
#define SCENE_EVENTS_END
@ EVENT_TALK
#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_FACE_PARTY
#define EVENT_SCRIPT(script)
@ ACTOR_STAND
#define SCENE_EXITS_END
Definition field_scene.h:77
@ FACING_EAST
Definition field_scene.h:26
@ FACING_WEST
Definition field_scene.h:30
#define PIXELS(value)
Game flags, named where their meaning is shown.
#define FLAG_DJINNI_0
the flag of Djinni 0, set once it is caught
Definition flags.h:15
The screen blend's globals and the graphics routines.
s32 SceneData_ReturnZero(void)
Definition level.c:51
The reel game's title lettering.
s32 Scene_RunEmptyScene(void)
Definition rooms.c:56
u8 * TestRooms_GetEvents(void)
Bind each Djinni actor to its test grant callback.
Definition rooms.c:54
u8 * TestRooms_GetPlacements(void)
Places one Djinni of each element in the test room.
Definition rooms.c:27
static void TestRooms_ReceiveForge(void)
Definition rooms.c:45
struct SceneEntrance gTestRooms_Entrances[]
Definition rooms.c:69
static void TestRooms_ReceiveFlint(void)
Definition rooms.c:37
u32 gTestRooms_Exits[]
Definition rooms.c:74
struct SceneEvent gTestRooms_Events[]
Definition rooms.c:91
u8 * TestRooms_GetExits(void)
Definition rooms.c:24
u32 gTestRooms_EntrancesHead[]
Definition rooms.c:58
u8 * TestRooms_GetEntrances(void)
Definition rooms.c:20
static __inline__ void TestRooms_GiveDjinniForTesting(s32 actorId, s32 element)
Grants the first Djinni of an element, then clears its found flag for testing.
Definition rooms.c:31
static void TestRooms_ReceiveFizz(void)
Definition rooms.c:41
struct ScenePlacement gTestRooms_Placements[]
Definition rooms.c:79
static void TestRooms_ReceiveGust(void)
Definition rooms.c:49
FIELD_AT_OFFSET and the entity and camera views older scene code reads.
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
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
unsigned char u8
Definition types.h:11