Alchemy

lucky_dice

games/tbs/src/graphics/lucky_dice on GitHub

tables.h

games/tbs/src/graphics/lucky_dice/tables.h

The Lucky Dice minigame's tables, after LuckyDice_Run in both games.

Globals

gLuckyDice_LabelCounts

const u8 gLuckyDice_LabelCounts[]

How many sprites each kind of result's lettering takes: 32 pixels each, for the kinds of lucky_dice.c's resultKind, 0 all four numbers alike, 1 three alike, 2 two pairs and 3 one pair.

Used by LuckyDice_Run.

Line 11

gLuckyDice_LabelTiles

const u8 gLuckyDice_LabelTiles[]

The first tile of each kind of result's lettering. A sprite's tile is the value * 8 + 152, then 32 more for each sprite across, so the four letterings lie one after another. Outside Japanese four more bytes follow, none of which ☀️ reads, resultKind being 0 to 3.

Used by LuckyDice_Run.

Line 17

gLuckyDice_FaceTiles

const u8 gLuckyDice_FaceTiles[]

The die face tile at each step of its roll: one for each 0x400 of the roll angle (variant), three to a face. A face's first step shows the face itself (tile n for face n), the next two pictures between faces.

Used by LuckyDice_Run.

Line 28

gLuckyDice_FaceHeights

const s16 gLuckyDice_FaceHeights[]

The board's rows by depth: a die at rest is in the first row whose value its z (16.16 pixels) exceeds, -32767 taking the rest. The row, not the face, is what they decide: the die's second number (numbers[2] and [3] in lucky_dice.c).

Used by LuckyDice_Run.

Line 35

Also, globals without a comment: gLuckyDice_UnusedSigns.

On this page