src/scene/shared/cracked_tile_mask.c
The hole mask over the cracked tile the leader stands on, shared by the Jupiter and Mars Lighthouse rooms and the Anemos Inner Sanctum, each of which lists the metatiles its map watches in its own CrackedTiles. More…
#include "field/field_engine_functions.h"#include "field/actor.h"#include "field/map_grid.h"#include "field/metatile_target.h"#include "field/field_sprite.h"
Included by anemos_inner_sanctum.c, jupiter_lighthouse_aerie.c, jupiter_lighthouse_aerie_beacon.c, jupiter_lighthouse_basement.c, jupiter_lighthouse_central_room.c, jupiter_lighthouse_cracked_floor.c, jupiter_lighthouse_entrance.c, jupiter_lighthouse_ground_floor.c, jupiter_lighthouse_left_tower_lower.c, jupiter_lighthouse_locked_doors.c, jupiter_lighthouse_right_tower_lower.c, jupiter_lighthouse_right_tower_upper.c, jupiter_lighthouse_side_halls.c, jupiter_lighthouse_terraces.c, jupiter_lighthouse_upper_hall.c, mars_lighthouse_entrance.c, mars_lighthouse_star_room.c and mars_lighthouse_towers.c.
Macros
| Name | Description | |
|---|---|---|
#define | HOLE_MASK_WIDTH 16 | The mask, HOLE_MASK_WIDTH by 32, hangs from HOLE_MASK_TOP pixels down its metatile. |
#define | HOLE_MASK_TOP 14 |
Functions
| Name | Description | |
|---|---|---|
Sint32 | fdMapGetTerrainHeight (Sint32 layer, Sint32 x, Sint32 z) | The ground height of a layer at (x, z), 16.16 pixels (fdMapGridGetTerrainHeight, through the overlay's own import row). |
void | METATILE_PUSH_SLOT_ENTRY (void *entry, Sint32 priority) | |
void | scCrackedTileUpdate (void) | Clears the current entry once the leader has left its metatile; while the leader stays on it and the mask is shown, draws the mask over the metatile at the height of the ground there, unless it is off screen. |
Variables
| Name | Description | |
|---|---|---|
extern METATILE_TARGET | CrackedTiles | The cracked tiles the including map watches, in its own table. |
Description
The hole mask over the cracked tile the leader stands on, shared by the
Jupiter and Mars Lighthouse rooms and the Anemos Inner Sanctum, each of which
lists the metatiles its map watches in its own CrackedTiles. While he drops
through the tile (scCrackedTileFall), the mask is drawn into the OBJ window,
where no sprite shows, so that he sinks out of sight through the hole. The
including file names its overlay's import of syOAMAddSpriteAtDepth
(METATILE_PUSH_SLOT_ENTRY).
Macros in detail
HOLE_MASK_WIDTH
#define HOLE_MASK_WIDTH 16
The mask, HOLE_MASK_WIDTH by 32, hangs from HOLE_MASK_TOP pixels down its
metatile.
Referenced by scCrackedTileUpdate().
Definition at line 17 of file cracked_tile_mask.c.
HOLE_MASK_TOP
#define HOLE_MASK_TOP 14
Referenced by scCrackedTileUpdate().
Definition at line 18 of file cracked_tile_mask.c.
Functions in detail
scCrackedTileUpdate
void scCrackedTileUpdate(void)
Clears the current entry once the leader has left its metatile; while the leader stays on it and the mask is shown, draws the mask over the metatile at the height of the ground there, unless it is off screen.
References CrackedTiles, fdActorGetById(), fdMapGetTerrainHeight(), fdMapStateView(), MainRoutineStateWork, Sint32 and VramCacheEntries.
Referenced by scCrackedTileFind().
Definition at line 29 of file cracked_tile_mask.c.