Skip to Content
The Alchemy Project

include/field/lucky_dice.h

Lucky Dice, the dice game in Tolbi (lucky_dice.c), and the small fixed-point helpers it keeps for its 3D camera.

Included by lucky_dice.c.

Functions

NameDescription
Sint32fdLuckyDiceStart (void)The Lucky Dice module's function in its stub table (src/field/lucky_dice_stubs.s).
voidfdCameraResetViewDefaults (void)Puts the 3D camera back at its starting view: at the origin, unturned, pitched to 152/256 of a turn and 510 pixels away, following nothing.
Sint32fdFixedPointMultiplyQ8 (Sint16 left, Sint16 right)Unused: multiplies two 8.8 fixed-point values, rounding toward zero.
Sint16fdFixedPointDivQ8 (Sint16 numerator, Sint16 denominator)Unused: divides two 8.8 fixed-point values.
Sint16fdFixedPointReciprocal (Sint16 value)Unused: the reciprocal of an 8.8 fixed-point value.
voidfdLuckyDiceRun (void)Runs the Lucky Dice minigame until the player quits or cannot afford a throw.

Variables

NameDescription
extern const Sint32LuckyDiceUnusedSigns []Unused: a table of signs.
extern const Uint8LuckyDiceLabelCounts []How many sprites each result's lettering takes, DICE_LABEL_SPRITE_WIDTH pixels each.
extern const Uint8LuckyDiceLabelTiles []The first tile of each result's lettering, in 16-pixel steps from DICE_NUMBER_TILES.
extern const Uint8LuckyDiceFaceTiles []The die face tile at each step of its roll: one for each DICE_ROLL_PER_TILE of the roll angle (variant), three to a face.
extern const Sint16LuckyDiceFaceHeights []

Description

Lucky Dice, the dice game in Tolbi (lucky_dice.c), and the small fixed-point helpers it keeps for its 3D camera.

Variables in detail

LuckyDiceFaceHeights

extern const Sint16 LuckyDiceFaceHeights[]

Definition at line 22 of file lucky_dice.h.