CHGame 0.3.0
Libraries for the CHGame handheld
Loading...
Searching...
No Matches
CHGame.h
Go to the documentation of this file.
1/// @file CHGame.h
2/// @brief The one include for a CHGame sketch.
3///
4/// @code
5/// #include <CHGame.h>
6/// @endcode
7///
8/// brings, on top of CHGfx (the framebuffer, the panel and its DMA):
9///
10/// | Header | What it gives |
11/// |---|---|
12/// | chgame/Input.h | CHGame `chgame`: buttons, frame pacing, START held 3 s goes back to the SD game menu |
13/// | chgame/Palette.h | the house colours (INK, WHITE, FELT ... FX_A, FX_B) and pal:: (themes, fades, flashes, colour cycling) |
14/// | chgame/Draw.h | rounded panels, span sprites, dithering, the 3x5 font |
15/// | chgame/Mask.h | outlined, shadowed and gradient lettering and logos |
16/// | chgame/Fx.h | fx:: easing, integer sine, randomness, screen shake |
17/// | chgame/Audio.h | audio:: effects, music and the status LED (the piezo) |
18/// | chgame/Save.h | save:: a record in flash that survives power cycles |
19/// | chgame/Fmt.h | number formatting without printf |
20/// | chgame/RamFunc.h | RAMFUNC: code that runs from SRAM |
21/// | chgame/Debug.h | dbg:: the serial debug protocol the simulator and the tools drive a game through (CHGAME_DEBUG builds) |
22/// | chgame/Config.h | the library's build switches (CHGAME_DEBUG ...) |
23///
24/// The casino games in this library's examples are built from these. Only
25/// what a sketch calls is linked: CHGfx's framebuffer and DMA handler come
26/// with the first drawing call, not with the include, so a sketch that uses
27/// this library for its sound, buttons or saves alone pays nothing for them.
28/// chgame/Sizzle.h (particles, banners, floating texts) is not included
29/// here: a game configures and compiles it itself.
30#pragma once
31#include <CHGfx.h>
32#include "chgame/Config.h"
33#include "chgame/Input.h"
34#include "chgame/RamFunc.h"
35#include "chgame/Palette.h"
36#include "chgame/Draw.h"
37#include "chgame/Mask.h"
38#include "chgame/Fx.h"
39#include "chgame/Audio.h"
40#include "chgame/Fmt.h"
41#include "chgame/Save.h"
42#include "chgame/Debug.h"
Sound and the status LED: a small sequencer for the piezo.
CHGfx: a maximum-throughput ST7735 driver for the CHGame board (CH32X035G8U6 @ 48 MHz,...
The CHGame library's build switches.
The serial debug protocol (CHGAME_DEBUG builds only; see chgame/Config.h).
The house drawing: rounded rects and panels, span sprites (plain, scaled, flipped,...
Number formatting without printf.
Motion maths and the screen shake: easing, integer sine, randomness.
Buttons and frame pacing: the Arduboy-flavoured front of the CHGame board.
1 bpp scratch masks for outlined, shadowed and gradient lettering and logos.
The house palette: sixteen named colours, and the tricks a palette allows.
RAMFUNC(name): run a function from SRAM.
Saving: a record in flash that survives power cycles and re-uploads.