src/field/lucky_dice.c
Lucky Dice, the dice game in Tolbi, drawn with the battles' 3D camera.
#include "field/lucky_dice.h"#include "macros.h"#include "resource_ids.h"#include "battle/battle.h"#include "battle/battle_camera.h"#include "battle/battle_effect_state.h"#include "field/map_grid.h"#include "game/main_routine_state.h"#include "game/stubs.h"#include "game/system_call.h"#include "sound/stubs.h"#include "window/stubs.h"#include "text/msg_ids.h"#include "palette_scale.c"
Structures
| Name | Description | |
|---|---|---|
struct | LUCKY_DICE_SCREEN | Lucky Dice's state block (HEAP_SLOT_LUCKY_GAME): its sprites and windows, between two runs of bytes it allocates and never touches. |
Macros
| Name | Description | |
|---|---|---|
#define | Q8_ONE (1 << 8) | One in 8.8 fixed point: in the unused helpers below, and in a sprite's affine scale, which draws it full size at Q8_ONE (a die's half size below). |
#define | DICE_COINS_WINDOW_X 17 | |
#define | DICE_COINS_WINDOW_WIDTH 13 | |
#define | DICE_WINNINGS_WINDOW_WIDTH 13 | |
#define | DICE_COINS_LABEL_X BY_LANGUAGE(48, 48, 48, 56, 53, 48) | The x of the coins window's label, in pixels. |
#define | DICE_HELP_WINDOW_X BY_LANGUAGE(23, 22, 20, 20, 21, 22) | The help window (Throw / Quit), in tiles. |
#define | DICE_HELP_WINDOW_WIDTH BY_LANGUAGE(7, 8, 10, 10, 9, 8) | |
#define | DICE_WINNINGS_WINDOW_X JAPANESE_OR(10, 9) | The winnings window, in tiles, its number and coins label in pixels, and the centre of the result lettering in sprite x. |
#define | DICE_WINNINGS_NUMBER_X JAPANESE_OR(40, 48) | |
#define | DICE_WINNINGS_COINS_X JAPANESE_OR(40, DICE_COINS_LABEL_X) | |
#define | DICE_RESULT_LABEL_CENTER_X JAPANESE_OR(640, 632) | |
#define | DICE_SPRITE_TILES 496 | sprites.tsv's seven sheets, from the rolling die to the lucky numbers: 496 256-colour tiles, nearly all of sprite VRAM. |
#define | DICE_COUNT 2 | Two dice of six faces; a throw reads four numbers, the faces the two dice show and the rows they stop in. |
#define | DICE_FACE_COUNT 6 | |
#define | DICE_NUMBER_COUNT 4 | |
#define | DICE_LABEL_SPRITE_WIDTH 32 | The result's lettering is a row of 32 by 32 sprites centred on DICE_RESULT_LABEL_CENTER_X. |
#define | DICE_BET_PER_LEVEL 10 | |
#define | DICE_NUMBER_REVEAL_TICKS 5 | The result: one number every 5 ticks, then 20 ticks in the lettering, the winnings, and A to go on; the payout closes 15 ticks after it starts. |
#define | DICE_RESULT_TICKS 20 | |
#define | DICE_PAYOUT_TICKS 15 | |
#define | DICE_COIN_DIGITS 6 | The coins are drawn with six digits. |
#define | DICE_FADE_TICKS 16 | The board fades in and out over 16 ticks, a sixteenth of full brightness a tick. |
#define | DICE_NEAREST_DEPTH 350 | The depths from the camera a die is drawn between: nearer or further is drawn as at the limit, and the nearer, the larger. |
#define | DICE_FARTHEST_DEPTH 650 | |
#define | DICE_TOUCH_DISTANCE 50 | Two dice whose centres come closer than this push each other apart. |
#define | DICE_SHADOW_TILE 144 | Where each picture's sprite tiles start, in OAM's 32-byte steps (two to a 256-colour tile): the rolling die's views from 0, its shadow, the big numbers (the result's lettering counted on from them), the aiming hand, the Perfect Bonus sign, its 3, 5 and times sign, and the lucky numbers' small faces. |
#define | DICE_NUMBER_TILES 152 | |
#define | DICE_AIM_MARKER_TILE 344 | |
#define | DICE_BONUS_SIGN_TILE 856 | |
#define | DICE_THREE_TILE 920 | |
#define | DICE_FIVE_TILE 928 | |
#define | DICE_TIMES_TILE 936 | |
#define | DICE_LUCKY_NUMBER_TILES 944 | |
#define | DICE_PERFECT_PAYOUT 5 | Four alike pays five times the bet; four of a lucky number pays three or five times that, the multipliers drawn beside the two lucky numbers. |
#define | DICE_FIRST_LUCKY_MULTIPLIER 3 | |
#define | DICE_SECOND_LUCKY_MULTIPLIER 5 | |
#define | DICE_FLASH_TICKS 60 | A win flashes a die (both for four alike) for this many ticks. |
#define | DICE_PERFECT_FLASH_TICKS 120 | |
#define | DICE_THROW_SPIN 300 | A thrown die starts spinning at this rate, its roll angle a tick; each bounce takes 20 off it. |
#define | DICE_BOUNCE_SPIN_LOSS 20 | |
#define | DICE_TILES_PER_FACE 3 | A die's roll angle (its particle's variant) crosses a face in DICE_TILES_PER_FACE tiles, and fdLuckyDiceRun reads the tile as angle / DICE_ROLL_PER_TILE and the face as angle / DICE_ROLL_PER_FACE. |
#define | DICE_ROLL_PER_TILE 1024 | |
#define | DICE_ROLL_PER_FACE (DICE_TILES_PER_FACE * DICE_ROLL_PER_TILE) | |
#define | DICE_ROLL_TURN (DICE_FACE_COUNT * DICE_ROLL_PER_FACE) | six faces |
#define | DICE_BOARD_PALETTE_COLORS 224 | The board's picture begins with its 224 colours, the sprites' with all 256, each before its tiles. |
#define | DICE_SPRITES_PALETTE_COLORS 256 | |
#define | DICE_NEAREST_SCALE (Q8_ONE / 2) | A die's or a shadow's affine scale at DICE_NEAREST_DEPTH, in 256ths: drawn at twice its size, and smaller by half of its depth past it. |
Enumerations
| Name | Description | |
|---|---|---|
enum | anonymous enum { DICE_LABEL_THROW, DICE_LABEL_QUIT } | The help window's labels, counted in messages from MsgLuckyDiceCoins: ":Throw" (MsgLuckyDiceThrow) and ":Quit" (MsgLuckyDiceQuit). |
enum | DICE_RESULT { DICE_RESULT_NONE, DICE_RESULT_PERFECT, DICE_RESULT_TRIPLE, D … } | What a throw's four numbers make, in the rules' words: "If two numbers match on either the dice or the table... it's called a pair, and you don't win or lose anything. |
enum | LUCKY_DICE_STATE { LUCKY_DICE_AIM, LUCKY_DICE_ROLL, LUCKY_DICE_RESULT, LUCKY_DI … } | What the Lucky Dice screen is doing. |
Functions
| Name | Description | |
|---|---|---|
Sint32 | fdLuckyDiceStart (void) | Starts the Lucky Dice minigame: leaves only the backdrop on screen, starts its music and plays until the player quits. |
void | fdCameraResetViewDefaults (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. |
Sint32 | fdFixedPointMultiplyQ8 (Sint16 left, Sint16 right) | Unused: multiplies two 8.8 fixed-point values, rounding toward zero. |
Sint16 | fdFixedPointDivQ8 (Sint16 numerator, Sint16 denominator) | Unused: divides two 8.8 fixed-point values. |
Sint16 | fdFixedPointReciprocal (Sint16 value) | Unused: the reciprocal of an 8.8 fixed-point value. |
void | fdLuckyDiceRun (void) | Runs the Lucky Dice minigame until the player quits or cannot afford a throw. |
Variables
| Name | Description | |
|---|---|---|
const Sint32 | LuckyDiceUnusedSigns [] | Unused: a table of signs. |
const Uint8 | LuckyDiceLabelCounts [] | How many sprites each result's lettering takes, DICE_LABEL_SPRITE_WIDTH pixels each. |
const Uint8 | LuckyDiceLabelTiles [] | The first tile of each result's lettering, in 16-pixel steps from DICE_NUMBER_TILES. |
const Uint8 | LuckyDiceFaceTiles [] | 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. |
const Sint16 | LuckyDiceRowDepths [] | The board's six numbered rows, from the far end: a die at rest is in the first row whose depth its z (in pixels) exceeds, the last taking the rest. |
Description
Lucky Dice, the dice game in Tolbi, drawn with the battles' 3D camera.
Macros in detail
Q8_ONE
#define Q8_ONE (1 << 8)
One in 8.8 fixed point: in the unused helpers below, and in a sprite's affine
scale, which draws it full size at Q8_ONE (a die's half size below).
Referenced by fdFixedPointDivQ8(), fdFixedPointMultiplyQ8() and fdLuckyDiceRun().
Definition at line 59 of file lucky_dice.c.
DICE_COINS_WINDOW_X
#define DICE_COINS_WINDOW_X 17
#define DICE_COINS_WINDOW_X 18
Referenced by fdLuckyDiceRun().
Definition at lines 95, 99 and 103 of file lucky_dice.c.
DICE_COINS_WINDOW_WIDTH
#define DICE_COINS_WINDOW_WIDTH 13
#define DICE_COINS_WINDOW_WIDTH 12
#define DICE_COINS_WINDOW_WIDTH 11
Referenced by fdLuckyDiceRun().
Definition at lines 96, 100 and 104 of file lucky_dice.c.
DICE_WINNINGS_WINDOW_WIDTH
#define DICE_WINNINGS_WINDOW_WIDTH 13
#define DICE_WINNINGS_WINDOW_WIDTH 12
#define DICE_WINNINGS_WINDOW_WIDTH 10
Referenced by fdLuckyDiceRun().
Definition at lines 97, 101 and 105 of file lucky_dice.c.
DICE_COINS_LABEL_X
#define DICE_COINS_LABEL_X BY_LANGUAGE(48, 48, 48, 56, 53, 48)
The x of the coins window's label, in pixels.
Referenced by fdLuckyDiceRun().
Definition at line 109 of file lucky_dice.c.
DICE_HELP_WINDOW_X
#define DICE_HELP_WINDOW_X BY_LANGUAGE(23, 22, 20, 20, 21, 22)
The help window (Throw / Quit), in tiles.
Referenced by fdLuckyDiceRun().
Definition at line 112 of file lucky_dice.c.
DICE_HELP_WINDOW_WIDTH
#define DICE_HELP_WINDOW_WIDTH BY_LANGUAGE(7, 8, 10, 10, 9, 8)
Referenced by fdLuckyDiceRun().
Definition at line 113 of file lucky_dice.c.
DICE_WINNINGS_WINDOW_X
#define DICE_WINNINGS_WINDOW_X JAPANESE_OR(10, 9)
The winnings window, in tiles, its number and coins label in pixels, and the centre of the result lettering in sprite x.
Referenced by fdLuckyDiceRun().
Definition at line 117 of file lucky_dice.c.
DICE_WINNINGS_NUMBER_X
#define DICE_WINNINGS_NUMBER_X JAPANESE_OR(40, 48)
Referenced by fdLuckyDiceRun().
Definition at line 118 of file lucky_dice.c.
DICE_WINNINGS_COINS_X
#define DICE_WINNINGS_COINS_X JAPANESE_OR(40, DICE_COINS_LABEL_X)
Referenced by fdLuckyDiceRun().
Definition at line 119 of file lucky_dice.c.
DICE_RESULT_LABEL_CENTER_X
#define DICE_RESULT_LABEL_CENTER_X JAPANESE_OR(640, 632)
Referenced by fdLuckyDiceRun().
Definition at line 120 of file lucky_dice.c.
DICE_SPRITE_TILES
#define DICE_SPRITE_TILES 496
sprites.tsv's seven sheets, from the rolling die to the lucky numbers: 496
256-colour tiles, nearly all of sprite VRAM.
Referenced by fdLuckyDiceRun().
Definition at line 144 of file lucky_dice.c.
DICE_COUNT
#define DICE_COUNT 2
Two dice of six faces; a throw reads four numbers, the faces the two dice show and the rows they stop in.
Referenced by fdLuckyDiceRun().
Definition at line 200 of file lucky_dice.c.
DICE_FACE_COUNT
#define DICE_FACE_COUNT 6
Referenced by fdLuckyDiceRun().
Definition at line 201 of file lucky_dice.c.
DICE_NUMBER_COUNT
#define DICE_NUMBER_COUNT 4
Referenced by fdLuckyDiceRun().
Definition at line 202 of file lucky_dice.c.
DICE_LABEL_SPRITE_WIDTH
#define DICE_LABEL_SPRITE_WIDTH 32
The result's lettering is a row of 32 by 32 sprites centred on
DICE_RESULT_LABEL_CENTER_X.
Referenced by fdLuckyDiceRun().
Definition at line 205 of file lucky_dice.c.
DICE_BET_PER_LEVEL
#define DICE_BET_PER_LEVEL 10
Referenced by fdLuckyDiceRun().
Definition at line 206 of file lucky_dice.c.
DICE_NUMBER_REVEAL_TICKS
#define DICE_NUMBER_REVEAL_TICKS 5
The result: one number every 5 ticks, then 20 ticks in the lettering, the winnings, and A to go on; the payout closes 15 ticks after it starts.
Referenced by fdLuckyDiceRun().
Definition at line 209 of file lucky_dice.c.
DICE_RESULT_TICKS
#define DICE_RESULT_TICKS 20
Referenced by fdLuckyDiceRun().
Definition at line 210 of file lucky_dice.c.
DICE_PAYOUT_TICKS
#define DICE_PAYOUT_TICKS 15
Referenced by fdLuckyDiceRun().
Definition at line 211 of file lucky_dice.c.
DICE_COIN_DIGITS
#define DICE_COIN_DIGITS 6
The coins are drawn with six digits.
Referenced by fdLuckyDiceRun().
Definition at line 213 of file lucky_dice.c.
DICE_FADE_TICKS
#define DICE_FADE_TICKS 16
The board fades in and out over 16 ticks, a sixteenth of full brightness a tick.
Referenced by fdLuckyDiceRun().
Definition at line 217 of file lucky_dice.c.
DICE_NEAREST_DEPTH
#define DICE_NEAREST_DEPTH 350
The depths from the camera a die is drawn between: nearer or further is drawn as at the limit, and the nearer, the larger.
Referenced by fdLuckyDiceRun().
Definition at line 221 of file lucky_dice.c.
DICE_FARTHEST_DEPTH
#define DICE_FARTHEST_DEPTH 650
Referenced by fdLuckyDiceRun().
Definition at line 222 of file lucky_dice.c.
DICE_TOUCH_DISTANCE
#define DICE_TOUCH_DISTANCE 50
Two dice whose centres come closer than this push each other apart.
Referenced by fdLuckyDiceRun().
Definition at line 225 of file lucky_dice.c.
DICE_SHADOW_TILE
#define DICE_SHADOW_TILE 144
Where each picture's sprite tiles start, in OAM's 32-byte steps (two to a 256-colour tile): the rolling die's views from 0, its shadow, the big numbers (the result's lettering counted on from them), the aiming hand, the Perfect Bonus sign, its 3, 5 and times sign, and the lucky numbers' small faces.
Referenced by fdLuckyDiceRun().
Definition at line 230 of file lucky_dice.c.
DICE_NUMBER_TILES
#define DICE_NUMBER_TILES 152
Referenced by fdLuckyDiceRun().
Definition at line 231 of file lucky_dice.c.
DICE_AIM_MARKER_TILE
#define DICE_AIM_MARKER_TILE 344
Referenced by fdLuckyDiceRun().
Definition at line 232 of file lucky_dice.c.
DICE_BONUS_SIGN_TILE
#define DICE_BONUS_SIGN_TILE 856
Referenced by fdLuckyDiceRun().
Definition at line 233 of file lucky_dice.c.
DICE_THREE_TILE
#define DICE_THREE_TILE 920
Referenced by fdLuckyDiceRun().
Definition at line 234 of file lucky_dice.c.
DICE_FIVE_TILE
#define DICE_FIVE_TILE 928
Referenced by fdLuckyDiceRun().
Definition at line 235 of file lucky_dice.c.
DICE_TIMES_TILE
#define DICE_TIMES_TILE 936
Referenced by fdLuckyDiceRun().
Definition at line 236 of file lucky_dice.c.
DICE_LUCKY_NUMBER_TILES
#define DICE_LUCKY_NUMBER_TILES 944
Referenced by fdLuckyDiceRun().
Definition at line 237 of file lucky_dice.c.
DICE_PERFECT_PAYOUT
#define DICE_PERFECT_PAYOUT 5
Four alike pays five times the bet; four of a lucky number pays three or five times that, the multipliers drawn beside the two lucky numbers.
Referenced by fdLuckyDiceRun().
Definition at line 240 of file lucky_dice.c.
DICE_FIRST_LUCKY_MULTIPLIER
#define DICE_FIRST_LUCKY_MULTIPLIER 3
Referenced by fdLuckyDiceRun().
Definition at line 241 of file lucky_dice.c.
DICE_SECOND_LUCKY_MULTIPLIER
#define DICE_SECOND_LUCKY_MULTIPLIER 5
Referenced by fdLuckyDiceRun().
Definition at line 242 of file lucky_dice.c.
DICE_FLASH_TICKS
#define DICE_FLASH_TICKS 60
A win flashes a die (both for four alike) for this many ticks.
Referenced by fdLuckyDiceRun().
Definition at line 244 of file lucky_dice.c.
DICE_PERFECT_FLASH_TICKS
#define DICE_PERFECT_FLASH_TICKS 120
Referenced by fdLuckyDiceRun().
Definition at line 245 of file lucky_dice.c.
DICE_THROW_SPIN
#define DICE_THROW_SPIN 300
A thrown die starts spinning at this rate, its roll angle a tick; each bounce takes 20 off it.
Referenced by fdLuckyDiceRun().
Definition at line 248 of file lucky_dice.c.
DICE_BOUNCE_SPIN_LOSS
#define DICE_BOUNCE_SPIN_LOSS 20
Referenced by fdLuckyDiceRun().
Definition at line 249 of file lucky_dice.c.
DICE_TILES_PER_FACE
#define DICE_TILES_PER_FACE 3
A die's roll angle (its particle's variant) crosses a face in
DICE_TILES_PER_FACE tiles, and fdLuckyDiceRun reads the tile as angle /
DICE_ROLL_PER_TILE and the face as angle / DICE_ROLL_PER_FACE.
Referenced by fdLuckyDiceRun().
Definition at line 254 of file lucky_dice.c.
DICE_ROLL_PER_TILE
#define DICE_ROLL_PER_TILE 1024
Referenced by fdLuckyDiceRun().
Definition at line 255 of file lucky_dice.c.
DICE_ROLL_PER_FACE
#define DICE_ROLL_PER_FACE (DICE_TILES_PER_FACE * DICE_ROLL_PER_TILE)
Referenced by fdLuckyDiceRun().
Definition at line 256 of file lucky_dice.c.
DICE_ROLL_TURN
#define DICE_ROLL_TURN (DICE_FACE_COUNT * DICE_ROLL_PER_FACE)
six faces
Referenced by fdLuckyDiceRun().
Definition at line 257 of file lucky_dice.c.
DICE_BOARD_PALETTE_COLORS
#define DICE_BOARD_PALETTE_COLORS 224
The board's picture begins with its 224 colours, the sprites' with all 256, each before its tiles.
Referenced by fdLuckyDiceRun().
Definition at line 261 of file lucky_dice.c.
DICE_SPRITES_PALETTE_COLORS
#define DICE_SPRITES_PALETTE_COLORS 256
Referenced by fdLuckyDiceRun().
Definition at line 262 of file lucky_dice.c.
DICE_NEAREST_SCALE
#define DICE_NEAREST_SCALE (Q8_ONE / 2)
A die's or a shadow's affine scale at DICE_NEAREST_DEPTH, in 256ths: drawn at
twice its size, and smaller by half of its depth past it.
Referenced by fdLuckyDiceRun().
Definition at line 266 of file lucky_dice.c.
Enumerations in detail
anonymous enum
enum { DICE_LABEL_THROW, DICE_LABEL_QUIT }
The help window's labels, counted in messages from MsgLuckyDiceCoins:
":Throw" (MsgLuckyDiceThrow) and ":Quit" (MsgLuckyDiceQuit).
| Enumerator | Value | Description |
|---|---|---|
DICE_LABEL_THROW | 10 | |
DICE_LABEL_QUIT | 11 |
Definition at line 124 of file lucky_dice.c.
DICE_RESULT
enum DICE_RESULT
What a throw's four numbers make, in the rules' words: "If two numbers match
on either the dice or the table... it's called a pair, and you don't win or
lose anything. Two pair doubles your money. Triple matches triple your money.
Four of a kind is perfect, and you win five times your bet." Every result has
its lettering (aim_hand_and_results.png: "Perfect!!!", "Triple!", "Two Pair!"
and "One Pair!"), numbered from 0.
| Enumerator | Value | Description |
|---|---|---|
DICE_RESULT_NONE | -1 | no two numbers alike: the bet is lost |
DICE_RESULT_PERFECT | all four alike: DICE_PERFECT_PAYOUT times the bet | |
DICE_RESULT_TRIPLE | three alike: three times the bet | |
DICE_RESULT_TWO_PAIR | two pairs: twice the bet | |
DICE_RESULT_ONE_PAIR | one pair: the bet back |
Definition at line 152 of file lucky_dice.c.
LUCKY_DICE_STATE
enum LUCKY_DICE_STATE
What the Lucky Dice screen is doing.
| Enumerator | Value | Description |
|---|---|---|
LUCKY_DICE_AIM | the dice wait to be thrown; Up and Down raise them | |
LUCKY_DICE_ROLL | the dice fly, bounce and settle | |
LUCKY_DICE_RESULT | the four numbers and the result are shown | |
LUCKY_DICE_PAYOUT | the winnings move into the coins |
Definition at line 269 of file lucky_dice.c.
Functions in detail
fdLuckyDiceStart
Sint32 fdLuckyDiceStart(void)
Starts the Lucky Dice minigame: leaves only the backdrop on screen, starts its music and plays until the player quits. Returns 0.
References fdLuckyDiceRun(), Sint32 and sySoundPlayStub().
Definition at line 19 of file lucky_dice.c.
fdCameraResetViewDefaults
void fdCameraResetViewDefaults(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.
References ProjectionWork, Sint32, syCalcPoint(), syDivFX(), syInitMatrix(), syMatrixTranslateVector(), syRotX(), syRotY() and sySetScreenDist().
Referenced by fdLuckyDiceRun().
Definition at line 29 of file lucky_dice.c.
fdFixedPointMultiplyQ8
Sint32 fdFixedPointMultiplyQ8(Sint16 left, Sint16 right)
Unused: multiplies two 8.8 fixed-point values, rounding toward zero.
References Sint32.
Definition at line 62 of file lucky_dice.c.
fdFixedPointDivQ8
Sint16 fdFixedPointDivQ8(Sint16 numerator, Sint16 denominator)
Unused: divides two 8.8 fixed-point values.
Definition at line 78 of file lucky_dice.c.
fdFixedPointReciprocal
Sint16 fdFixedPointReciprocal(Sint16 value)
Unused: the reciprocal of an 8.8 fixed-point value.
Definition at line 84 of file lucky_dice.c.
fdLuckyDiceRun
void fdLuckyDiceRun(void)
Runs the Lucky Dice minigame until the player quits or cannot afford a throw. Each throw costs ten coins per level of the party's average.
References BgScrollWork, fdCameraResetViewDefaults(), fdPaletteScaleRGB555(), gmPartyAdjustCoinsStub(), gmPartyGetAverageLevelStub(), LuckyDiceFaceTiles, LuckyDiceLabelCounts, LuckyDiceLabelTiles, LuckyDiceRowDepths, MainRoutineStateWork, mnTextDrawMessageAsTilesStub(), mnTextDrawNumberInWindowStub(), mnWindowCloseStub(), mnWindowCreateStub(), mnWindowSystemInitFieldStub(), OamCopyEnabled, PerData, PerRepeat, scFieldDecompressTaggedLZ(), Sint32, state, syConvert3Dto2D(), syCos(), syDMAXCopy(), syHeapSlotAllocate(), syHeapSlotAllocateEWRAM(), syHeapSlotRelease(), syInitEvent(), syInitMatrix(), syLookAtLoad(), syRandom(), syResourceGetTableEntry(), syResourceReservedNoOperation(), sySin(), sySoundPlayStub(), sySquartIWRAM() and sySynch().
Referenced by fdLuckyDiceStart().
Definition at line 281 of file lucky_dice.c.
Variables in detail
LuckyDiceUnusedSigns
const Sint32 LuckyDiceUnusedSigns[]
Unused: a table of signs.
References Sint32.
Definition at line 162 of file lucky_dice.c.
LuckyDiceLabelCounts
const Uint8 LuckyDiceLabelCounts[]
How many sprites each result's lettering takes, DICE_LABEL_SPRITE_WIDTH
pixels each.
Referenced by fdLuckyDiceRun().
Definition at line 166 of file lucky_dice.c.
LuckyDiceLabelTiles
const Uint8 LuckyDiceLabelTiles[]
The first tile of each result's lettering, in 16-pixel steps from
DICE_NUMBER_TILES.
Referenced by fdLuckyDiceRun().
Definition at line 175 of file lucky_dice.c.
LuckyDiceFaceTiles
const Uint8 LuckyDiceFaceTiles[]
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.
Referenced by fdLuckyDiceRun().
Definition at line 191 of file lucky_dice.c.
LuckyDiceRowDepths
const Sint16 LuckyDiceRowDepths[]
The board's six numbered rows, from the far end: a die at rest is in the first row whose depth its z (in pixels) exceeds, the last taking the rest.
Referenced by fdLuckyDiceRun().
Definition at line 196 of file lucky_dice.c.