Alchemy
Loading...
Searching...
No Matches

lucky_dice.h

Go to the documentation of this file.
1#ifndef ALCHEMY_UNIT_FIELD_LUCKY_DICE_H
2#define ALCHEMY_UNIT_FIELD_LUCKY_DICE_H
3
4#include "types.h"
5
8s32 FixedPoint_Multiply8_8(s32 leftValue, s32 rightValue);
9s16 Math_ScaleByRatio(s16 numerator, s16 denominator);
11extern const s32 gLuckyDice_UnusedSigns[];
12extern const u8 gLuckyDice_LabelCounts[];
13extern const u8 gLuckyDice_LabelTiles[];
14extern const u8 gLuckyDice_FaceTiles[];
15extern const s16 gLuckyDice_FaceHeights[];
16s32 Graphics_ScaleRgb555Buffer(u16 *source, u16 *destination, s32 scale,
17 s32 count);
18void LuckyDice_Run(void);
19
20#endif
UNUSED s32 FixedPoint_Multiply8_8(s32 leftValue, s32 rightValue)
Multiplies two 8.8 fixed-point values, rounding toward zero.
Definition lucky_dice.c:77
UNUSED s16 Math_ScaleByRatio(s16 numerator, s16 denominator)
Divides two 8.8 fixed-point values.
Definition lucky_dice.c:99
void LuckyDice_Run(void)
Runs the Lucky Dice minigame until the player quits or cannot afford a throw.
Definition lucky_dice.c:252
s32 Runtime_BlankDisplayAndRun(void)
Starts the Lucky Dice minigame: leaves only the backdrop on screen, starts song MUS_009 and plays unt...
Definition lucky_dice.c:31
UNUSED s16 FixedPoint_Reciprocal(s16 value)
The reciprocal of an 8.8 fixed-point value.
Definition lucky_dice.c:109
void Camera_ResetSceneDefaults(void)
Puts the 3D camera back at its scene defaults: at the origin, unturned, pitched to 152 and 510 units ...
Definition lucky_dice.c:43
s32 Graphics_ScaleRgb555Buffer(u16 *source, u16 *destination, s32 scale, s32 count)
Copies count RGB555 colours from source to destination with each channel multiplied by scale (16....
Definition lucky_dice.c:208
const s32 gLuckyDice_UnusedSigns[]
Definition tables.h:6
const u8 gLuckyDice_LabelTiles[]
The first tile of each kind of result's lettering.
Definition tables.h:12
const s16 gLuckyDice_FaceHeights[]
The heights that decide the face (z > value << 16).
Definition tables.h:25
const u8 gLuckyDice_LabelCounts[]
How many sprites each kind of result's lettering takes.
Definition tables.h:9
const u8 gLuckyDice_FaceTiles[]
The die face tile at each step of its roll.
Definition tables.h:21
The integer types, TRUE, UNUSED and the fixed-address macros.
signed int s32
Definition types.h:14
signed short s16
Definition types.h:12
unsigned short u16
Definition types.h:13
unsigned char u8
Definition types.h:11