Alchemy
Loading...
Searching...
No Matches

colorfx.h

Go to the documentation of this file.
1#ifndef ALCHEMY_UNIT_OBJECT_COLORFX_H
2#define ALCHEMY_UNIT_OBJECT_COLORFX_H
3
4#include "types.h"
5
7s32 Graphics_ScaleRgb555(u16 *src, u16 *dst, s32 scale, s32 count);
10void Palette_StepTowardResource(s32 resource);
11void ReelGame_DrawCanvasLine(s32 x0, s32 y0, s32 x1, s32 y1, s32 color);
12extern const u16 gReelGame_SparkCellOffsets[];
13extern const u8 gReelGame_SymbolPrizes[];
14extern const u8 gReelGame_FrameSpriteX[];
15extern const u8 gReelGame_FrameSpriteY[];
16void ReelGame_RunFrame(void);
17void ReelGame_InitTitle(void);
18void ReelGame_Run(void);
20void LzPack_InsertSlotNode(s32 index);
21void LzPack_RemoveSlotNode(s32 slot);
22void LzPack_ConsumeSlotBytes(s32 start, s32 count, const u8 *input);
23void LzPack_CopyBufferedBytes(u8 *destination);
24s32 LzPack_PackStream(const u8 *input, u8 *dst, s32 size);
25
26#endif
void ReelGame_DrawCanvasLine(s32 x0, s32 y0, s32 x1, s32 y1, s32 color)
Draws a line from (x0, y0) to (x1, y1) on the 256 x 128 8bpp canvas (32 tiles across),...
Definition colorfx.c:217
s32 ReelGame_Start(void)
Plays the slot machine: blanks the screen, seeds the random numbers with the play time and runs the g...
Definition colorfx.c:58
void ReelGame_TransferCanvas(void)
A scheduler callback: on a frame whose canvas is ready (transferPending), sends the canvas to its til...
Definition colorfx.c:106
void Palette_StepTowardResource(s32 resource)
Moves the first 64 BG colours one step toward the palette of resource; the backdrop colour is not wri...
Definition colorfx.c:183
s32 Graphics_ScaleRgb555(u16 *src, u16 *dst, s32 scale, s32 count)
Writes count RGB555 colours from src to dst scaled by scale (16.16, 0x10000 keeps them).
Definition colorfx.c:68
void LzPack_CopyBufferedBytes(u8 *destination)
Appends the finished group (a flag byte and up to eight items) to the output.
Definition colorfx.c:1386
void LzPack_ResetSlotBuckets(void)
The LZ packer below: empties its 256 hash chains (one per byte value) and numbers its 1024 window nod...
Definition colorfx.c:1293
UNUSED s32 LzPack_PackStream(const u8 *input, u8 *dst, s32 size)
Packs size bytes of input into dst with a small LZ scheme and returns the packed size.
Definition colorfx.c:1460
void LzPack_RemoveSlotNode(s32 slot)
Removes window position slot from its chain.
Definition colorfx.c:1320
void LzPack_InsertSlotNode(s32 index)
Adds window position index to the chain of the byte it holds.
Definition colorfx.c:1308
void ReelGame_Run(void)
The slot machine: loads its backgrounds, sprites and palettes, fills each of the five reels with 21 r...
Definition colorfx.c:958
void ReelGame_InitTitle(void)
Sets up the bouncing title letters of a win, the brightness wave of the screen's lines and the bettin...
Definition colorfx.c:897
void Palette_DarkenSceneStep(void)
Darkens the screen one step: lowers each channel of the 16 colours of BG palette 10 and of OBJ colour...
Definition colorfx.c:139
void LzPack_ConsumeSlotBytes(s32 start, s32 count, const u8 *input)
Reads count more input bytes into the window from position start, dropping the bytes they replace fro...
Definition colorfx.c:1332
void ReelGame_RunFrame(void)
The slot machine's frame callback: reads the keys, runs the game's state (betting,...
Definition colorfx.c:351
const u8 gReelGame_FrameSpriteX[]
The positions of the frame's sprites.
Definition reel_tables.h:27
const u8 gReelGame_SymbolPrizes[]
The prize of each reel symbol.
Definition reel_tables.h:10
const u8 gReelGame_FrameSpriteY[]
Definition reel_tables.h:29
const u16 gReelGame_SparkCellOffsets[]
Where each spark cell (a square 2 to 20 pixels on a side) starts.
Definition reel_tables.h:6
The integer types, TRUE, UNUSED and the fixed-address macros.
signed int s32
Definition types.h:14
unsigned short u16
Definition types.h:13
unsigned char u8
Definition types.h:11