Alchemy
Loading...
Searching...
No Matches

vault_scene_cells.h

Go to the documentation of this file.
1/// @file
2/// Vault, before and after the thieves are caught: the doorway of exit 11,
3/// which opens in two frames as the leader walks into it facing north.
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 "field_event.h"
14#include "field_scene.h"
15#include "songs.h"
16
17enum {
21};
22
23/// The two square halves are stacked in the source map and drawn side by side.
24static inline void Vault_DrawDoorwayFrame(s32 sourceColumn) {
25 Map_CopyCellsTo(sourceColumn, 33, 34, 16, VAULT_DOOR_HALF_SIZE,
27 Map_CopyCellsTo(sourceColumn, 35, 36, 16, VAULT_DOOR_HALF_SIZE,
29}
30
31/// Walking north into cell code 11 opens the doorway to the Sanctum.
32/// The leader passes behind the doorframe through exit 11.
33static void Vault_OpenDoorwayAndEnter(void) {
35 struct AnimationObject *sprite = actor->sprite;
36
42 Map_CopyCellAttributes(33, 21, 2, 2, 3, 16);
44 sprite->image.priority = 3;
45 Vault_WalkThroughExit(64, 272, 11);
46}
struct FieldActor * Object_GetById(s32 actor)
Returns an actor, or NULL if it does not exist.
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,...
static void Map_CopyCellsTo(s32 srcX, s32 srcY, s32 destX, s32 destY, s32 width, s32 height)
static void Map_CopyCellAttributes(s32 srcX, s32 srcY, s32 width, s32 height, s32 destX, s32 destY)
void Engine_EventWait(s32 frames)
@ ACTOR_PRIORITY_AUTOMATIC
The sprite takes its priority from the map cell under it.
Definition field_obj.h:153
The scene table formats: entrances, exits, placements and events, and the macros that write them.
@ ACTOR_PARTY_LEADER
The screen blend's globals and the graphics routines.
The reel game's title lettering.
Song and sound effect ids, indices into gSound_SongTable.
#define SE_188
Definition songs.h:183
void Engine_AudioPlayCue()
An animated sprite: its image and shadow, scale, rotation, size and up to four animation layers.
Definition animspr.h:108
struct AnimationSpritePart image
Definition animspr.h:109
u16 priority
2 when created
Definition animspr.h:100
A field actor: a person or thing on the field with a position, motion toward a target,...
Definition field_obj.h:30
u8 priorityFlags
ActorPriorityFlag bits, read by the scrolling camera.
Definition field_obj.h:51
The system's routines and globals: interrupts, BIOS sound bias, random numbers and sleep.
signed int s32
Definition types.h:14
@ VAULT_DOOR_OPENING_FRAME_COLUMN
@ VAULT_DOOR_OPEN_FRAME_COLUMN
@ VAULT_DOOR_HALF_SIZE
static void Vault_OpenDoorwayAndEnter(void)
Walking north into cell code 11 opens the doorway to the Sanctum.
static void Vault_DrawDoorwayFrame(s32 sourceColumn)
The two square halves are stacked in the source map and drawn side by side.