src/field/facing.c
Which picture a sprite shows for the way it faces, and the small tables the actors read as they move: the direction pad's headings, the World Map camera's lean, a floating actor's bob, how long a footprint lasts and the order a sprite dissolves in.
Variables
| Name | Description | |
|---|---|---|
const Uint8 | AnimationFacingOnePicture [16] | Facing tables: for each ANIMATION_FACING_KIND, the picture to draw for each sector of the facing angle. |
const Uint8 | AnimationFacingFrontBackSwapped [8] | |
const Uint8 | AnimationFacingFrontBack [8] | |
const Uint8 | AnimationFacingThreePictures [16] | |
const Uint8 | AnimationFacingFivePictures [16] | |
const Uint8 | AnimationFacingEightPictures [8] | |
const Uint8 | AnimationFacingEightPicturesMirrored [8] | |
const Uint8 | AnimationFacingFourPictures [64] | |
const Uint8 | AnimationFacingSixPictures [64] | |
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). |
const Uint16 | SpriteDissolvePixelOrderTail | Two bytes after the dissolve order; no code in The Broken Seal names them. |
const FIXED | CameraFixedViewMatrix [12] | The fixed camera's view matrix (16.16): identity with a -0.8 shear of y by x. |
const Sint32 | ActorScriptCycleTable [32] | One period of a triangle wave, which bobs a floating actor up and down. |
const Sint32 | ActorScriptEndScript [1] | The idle script an actor returns to when its own one ends: a lone SC_END, which reloads it. |
const Sint16 | ActorScriptEndScriptTail [8] | Halfwords that follow the idle script; no code in The Broken Seal names them. |
const Uint16 | WorldMapKeyHeadings [16] | The heading for each state of the direction pad (bits 4-7 of the keys: Right, Left, Up, Down), in 1/65536 turns: Right is 0, Down DEGtoANG(90), Left DEGtoANG(180) and Up TRIG_TURN * 3 / 4; WORLD_MAP_KEY_HEADING_NONE means no direction is held, or only an opposite pair. |
const Sint32 | WorldMapFootprintActions [6] | Two scripts for the World Map's footprint and dust effects: wait 120 or 30 ticks, then release the actor. |
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
Which picture a sprite shows for the way it faces, and the small tables the actors read as they move: the direction pad's headings, the World Map camera's lean, a floating actor's bob, how long a footprint lasts and the order a sprite dissolves in.
Variables in detail
AnimationFacingOnePicture
const Uint8 AnimationFacingOnePicture[16]
Facing tables: for each ANIMATION_FACING_KIND, the picture to draw for each sector of the facing
angle.
Referenced by fdSpriteComposePicture().
Definition at line 12 of file facing.c.
AnimationFacingFrontBackSwapped
const Uint8 AnimationFacingFrontBackSwapped[8]
Referenced by fdSpriteComposePicture().
Definition at line 16 of file facing.c.
AnimationFacingFrontBack
const Uint8 AnimationFacingFrontBack[8]
Referenced by fdSpriteComposePicture().
Definition at line 19 of file facing.c.
AnimationFacingThreePictures
const Uint8 AnimationFacingThreePictures[16]
Referenced by fdSpriteComposePicture().
Definition at line 22 of file facing.c.
AnimationFacingFivePictures
const Uint8 AnimationFacingFivePictures[16]
Referenced by fdSpriteComposePicture().
Definition at line 26 of file facing.c.
AnimationFacingEightPictures
const Uint8 AnimationFacingEightPictures[8]
Referenced by fdSpriteComposePicture().
Definition at line 30 of file facing.c.
AnimationFacingEightPicturesMirrored
const Uint8 AnimationFacingEightPicturesMirrored[8]
Referenced by fdSpriteComposePicture().
Definition at line 33 of file facing.c.
AnimationFacingFourPictures
const Uint8 AnimationFacingFourPictures[64]
Referenced by fdSpriteComposePicture().
Definition at line 36 of file facing.c.
AnimationFacingSixPictures
const Uint8 AnimationFacingSixPictures[64]
Referenced by fdSpriteComposePicture().
Definition at line 61 of file facing.c.
SpriteDissolvePixelOrder
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).
Referenced by fdSpriteDissolveStep().
Definition at line 89 of file facing.c.
SpriteDissolvePixelOrderTail
const Uint16 SpriteDissolvePixelOrderTail
Two bytes after the dissolve order; no code in The Broken Seal names them.
Definition at line 97 of file facing.c.
CameraFixedViewMatrix
const FIXED CameraFixedViewMatrix[12]
The fixed camera's view matrix (16.16): identity with a -0.8 shear of y by x.
fdActorSystemProjectSprites applies it while battle commands are chosen.
Referenced by fdActorSystemProjectSprites().
Definition at line 101 of file facing.c.
ActorScriptCycleTable
const Sint32 ActorScriptCycleTable[32]
One period of a triangle wave, which bobs a floating actor up and down.
References Sint32.
Referenced by fdActorUpdateAllOnField().
Definition at line 109 of file facing.c.
ActorScriptEndScript
const Sint32 ActorScriptEndScript[1]
The idle script an actor returns to when its own one ends: a lone SC_END, which reloads it.
fdActorScriptEnd (SC_END) points an actor here.
References Sint32.
Referenced by fdActorScriptEnd().
Definition at line 118 of file facing.c.
ActorScriptEndScriptTail
const Sint16 ActorScriptEndScriptTail[8]
Halfwords that follow the idle script; no code in The Broken Seal names them.
Definition at line 123 of file facing.c.
WorldMapKeyHeadings
const Uint16 WorldMapKeyHeadings[16]
The heading for each state of the direction pad (bits 4-7 of the keys: Right, Left, Up, Down), in
1/65536 turns: Right is 0, Down DEGtoANG(90), Left DEGtoANG(180) and Up TRIG_TURN * 3 / 4;
WORLD_MAP_KEY_HEADING_NONE means no direction is held, or only an opposite pair.
Referenced by fdActorMoveByKeys(), fdActorMoveOnWorldMap() and fdActorUpdatePlayerControl().
Definition at line 130 of file facing.c.
WorldMapFootprintActions
const Sint32 WorldMapFootprintActions[6]
Two scripts for the World Map's footprint and dust effects: wait 120 or 30 ticks, then release the actor.
References Sint32.
Referenced by fdActorMoveOnWorldMap() and fdActorUpdatePlayerControl().
Definition at line 139 of file facing.c.
WorldMapKeyYaws
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.
References Sint32.
Referenced by fdActorMoveOnWorldMap().
Definition at line 146 of file facing.c.