include/field/facing.h
The constant tables of facing.c: which picture of an animation an actor shows for each way it faces, and beside them the sprite dissolve's pixel order, the fixed camera's matrix, a floating actor's bob, the actor scripts' end script and the World Map camera's lean for the direction pad.
Included by facing.c, field_internal.h, imil.c, imil_fuchin_falls.c, mercury_lighthouse.c and mercury_lighthouse_entrance.c.
Macros
| Name | Description | |
|---|---|---|
#define | FACING_MIRRORED_BIT 0x80 | A facing table entry: the picture to draw, counted from the sprite animation's base picture (bits 0-2), mirrored when bit 7 is set. |
#define | MIRRORED (picture) (FACING_MIRRORED_BIT | (picture)) | |
#define | KEY_HEADING_NONE (-1) | A scene's key-heading table entry when no direction is held, or only an opposite pair, where the others are facings. |
#define | WORLD_MAP_KEY_HEADING_NONE 65535 | WorldMapKeyHeadings' entry when no direction is held, or only an opposite pair: no heading, since every real one is a multiple of an eighth turn. |
Variables
| Name | Description | |
|---|---|---|
extern const Uint8 | AnimationFacingOnePicture [16] | Facing tables: for each ANIMATION_FACING_KIND, the picture to draw for each sector of the facing angle. |
extern const Uint8 | AnimationFacingFrontBackSwapped [8] | |
extern const Uint8 | AnimationFacingFrontBack [8] | |
extern const Uint8 | AnimationFacingThreePictures [16] | |
extern const Uint8 | AnimationFacingFivePictures [16] | |
extern const Uint8 | AnimationFacingEightPictures [8] | |
extern const Uint8 | AnimationFacingEightPicturesMirrored [8] | |
extern const Uint8 | AnimationFacingFourPictures [64] | |
extern const Uint8 | AnimationFacingSixPictures [64] | |
extern const Uint8 | SpriteDissolvePixelOrder [64] | The order in which the 64 pixels of a sprite's tile in OBJ VRAM dissolve; read by fdSpriteDissolveStep (field_actors.c). |
extern const Uint16 | SpriteDissolvePixelOrderTail | Two bytes after the dissolve order; no code in The Broken Seal names them. |
extern const FIXED | CameraFixedViewMatrix [12] | The fixed camera's view matrix (16.16): identity with a -0.8 shear of y by x. |
extern const Sint32 | ActorScriptCycleTable [32] | One period of a triangle wave, which bobs a floating actor up and down. |
extern const Sint32 | ActorScriptEndScript [1] | The idle script an actor returns to when its own one ends: a lone SC_END, which reloads it. |
extern const Sint16 | ActorScriptEndScriptTail [8] | Halfwords that follow the idle script; no code in The Broken Seal names them. |
extern const Sint32 | WorldMapKeyYaws [16] | The yaw the World Map camera leans to for each state of the direction pad, in 1/65536 turns: Right -512 and Left 512, or -384 and 384 with Up or Down but not both; 0 otherwise. |
Description
The constant tables of facing.c: which picture of an animation an actor shows
for each way it faces, and beside them the sprite dissolve's pixel order, the
fixed camera's matrix, a floating actor's bob, the actor scripts' end script
and the World Map camera's lean for the direction pad.
Macros in detail
FACING_MIRRORED_BIT
#define FACING_MIRRORED_BIT 0x80
A facing table entry: the picture to draw, counted from the sprite animation's base picture (bits 0-2), mirrored when bit 7 is set.
Referenced by fdSpriteComposePicture().
Definition at line 33 of file facing.h.
MIRRORED
#define MIRRORED(picture) (FACING_MIRRORED_BIT | (picture))
Referenced by AnimationFacingEightPicturesMirrored, AnimationFacingFivePictures, AnimationFacingFourPictures, AnimationFacingFrontBack, AnimationFacingFrontBackSwapped, AnimationFacingOnePicture, AnimationFacingSixPictures and AnimationFacingThreePictures.
Definition at line 34 of file facing.h.
KEY_HEADING_NONE
#define KEY_HEADING_NONE (-1)
A scene's key-heading table entry when no direction is held, or only an opposite pair, where the others are facings.
Referenced by IceKeyHeadings, ImilFuchinFallsSlideHeadings, ImilSlideHeadings, MercuryLighthouseMoveAngles, scActorSteerByPad() and scLeaderSlideOnIce().
Definition at line 38 of file facing.h.
WORLD_MAP_KEY_HEADING_NONE
#define WORLD_MAP_KEY_HEADING_NONE 65535
WorldMapKeyHeadings' entry when no direction is held, or only an opposite
pair: no heading, since every real one is a multiple of an eighth turn.
Referenced by fdActorMoveByKeys(), fdActorMoveOnWorldMap(), fdActorUpdatePlayerControl() and WorldMapKeyHeadings.
Definition at line 42 of file facing.h.