include/field/lucky_wheels.h
Lucky Wheels, Tolbi's game of chance (lucky_wheels.c), and the unused LZ packer kept beside it.
Included by lucky_wheels.c and tolbi_games.c.
Enumerations
| Name | Description | |
|---|---|---|
enum | LUCKY_WHEELS_PRIZE { LUCKY_WHEELS_PRIZE_UNDERSHIRT, LUCKY_WHEELS_PRIZE_BOOTS, LUC … } | What a line of each Lucky Wheels symbol wins, as the prize sign reads it: "Shirts win undershirts, Rings win rings, Boots win boots, Stars and Hearts win items, and Moons can win you anything." Tolbi's attendant gives one of three items of the kind. |
Functions
| Name | Description | |
|---|---|---|
Sint32 | fdLuckyWheelsStart (void) | The Lucky Wheels module's function in its stub table (src/field/lucky_wheels_stubs.s). |
void | fdLuckyWheelsTransferCanvas (void) | A VBlank-pass event: on a VBlank after the canvas is ready (transferPending), sends the canvas to its tiles in VRAM (LUCKY_WHEELS_CANVAS_TILES), then clears it or fades it into trails as transferMode says. |
void | fdLuckyWheelsDarkenStep (void) | Darkens the screen one step: lowers each channel of the machine's 16 colours and of the icons' by 1. |
void | fdLuckyWheelsStepSparkColors (Sint32 resource) | Moves the sparks' colours one step toward the palette of resource; the backdrop colour is not written back. |
void | fdLuckyWheelsDrawCanvasLine ( Sint32 x0, Sint32 y0, Sint32 x1, Sint32 y1, Sint32 color) | Draws a line from (x0, y0) to (x1, y1) on the 256 x 128 8bpp canvas (32 tiles across), writing only over lower colour numbers. |
void | fdLuckyWheelsUpdate (void) | Lucky Wheels' VBlank event: reads the keys, runs the game's phase (betting, spinning and stopping the wheels, scoring the paylines, choosing wheels to hold, showing a win) and builds all 128 sprites: the cursor, the title letters of a win, the frame, the hold lamps, the spin counter, the paylines, the wheel symbols, the lever and the bottom bar. |
void | fdLuckyWheelsSetUpBetting (void) | Sets up the bouncing title letters of a win, the brightness wave of the screen's lines and the betting window, and starts at betting. |
void | fdLuckyWheelsRun (void) | Lucky Wheels: loads its backgrounds, sprites and palettes, fills each of the five wheels with 21 random symbols, among them each plain symbol and three moons, then runs until the player leaves: fading in, drawing the paylines on the canvas while betting or winning, and the jackpot's sparks and colour cycle while showing a win. |
void | fdLZPackResetChains (void) | Empties the LZ packer's hash chains and numbers its window nodes. |
void | fdLZPackInsertSlotNode (Sint32 index) | Adds window position index to the chain of the byte it holds. |
void | fdLZPackRemoveSlotNode (Sint32 slot) | Removes window position slot from its chain. |
void | fdLZPackReadInput (Sint32 start, Sint32 count, const Uint8 *input) | Reads count more input bytes into the window from position start, dropping the bytes they replace from their chains; past the end of the input the positions are marked empty (-1). |
void | fdLZPackCopyBufferedBytes (Uint8 *dest) | Appends the finished group (a flag byte and up to eight items) to the output. |
Sint32 | fdLZPackPackData (const Uint8 *input, Uint8 *dest, Sint32 size) | Unused: packs size bytes of input into dest with a small LZ scheme and returns the packed size. |
Variables
| Name | Description | |
|---|---|---|
extern const Uint16 | LuckyWheelsSparkPictures [] | Where each spark picture (a square 2 to 20 pixels on a side) starts: size s (1 to 10) is a square 2s pixels a side, after the smaller squares' pixels. |
extern const Uint8 | LuckyWheelsSymbolPrizes [] | The prize of each wheel symbol (LUCKY_WHEELS_PRIZE), kept in MainRoutineStateWork.holdings.wonPrizes for each winning line. |
extern const Uint8 | LuckyWheelsMachineSpriteX [] | The positions of the machine's lights, in screen pixels: its four corners first, then the lights along its frame. |
extern const Uint8 | LuckyWheelsMachineSpriteY [] |
Description
Lucky Wheels, Tolbi's game of chance (lucky_wheels.c), and the unused LZ
packer kept beside it.
Enumerations in detail
LUCKY_WHEELS_PRIZE
enum LUCKY_WHEELS_PRIZE
What a line of each Lucky Wheels symbol wins, as the prize sign reads it: "Shirts win undershirts, Rings win rings, Boots win boots, Stars and Hearts win items, and Moons can win you anything." Tolbi's attendant gives one of three items of the kind.
| Enumerator | Value | Description |
|---|---|---|
LUCKY_WHEELS_PRIZE_UNDERSHIRT | a Mythril, Silk or Running Shirt | |
LUCKY_WHEELS_PRIZE_BOOTS | Hyper, Quick or Fur Boots | |
LUCKY_WHEELS_PRIZE_RING | an Adept, War or Sleep Ring | |
LUCKY_WHEELS_PRIZE_HEART_ITEM | a Potion, Vial or Nut | |
LUCKY_WHEELS_PRIZE_STAR_ITEM | a Water of Life, Psy Crystal or Elixir | |
LUCKY_WHEELS_PRIZE_ANYTHING | one of the five kinds above | |
LUCKY_WHEELS_PRIZE_LIST_END | -1 | ends prize list; if first, last pull won nothing |
LUCKY_WHEELS_PRIZE_LIST_DONE | -2 | if first: left at bet, or attendant has given prizes |
Definition at line 14 of file lucky_wheels.h.