src/scene/tolbi_games.c
Tolbi's three games of chance, which the party can play whenever it is in town: Lucky Dice, Lucky Wheels and Tolbi Spring. More…
#include "ability_ids.h"#include "flags.h"#include "item_ids.h"#include "macros.h"#include "battle/battle.h"#include "debug/debug.h"#include "field/script_inline.h"#include "field/lucky_wheels.h"#include "field/map_grid.h"#include "graphics/graphics.h"#include "text/msg_ids.h"
Structures
| Name | Description | |
|---|---|---|
struct | SPRING_TOSS_MOTION | The tossed coin or medal, as its last four positions for the trail, its velocity and the ticks the prize rings still pull it. |
struct | SPRING_OBSTACLE | One of the four obstacles moving in the spring during a toss. |
Macros
| Name | Description | |
|---|---|---|
#define | FLAG_TOLBI_SPRING_DRAINED FLAG_SCENE_TEMP(0x00) | The spring's water has sunk and faded away this visit. |
#define | sLuckyDiceCoinsBefore (*(Sint32 *)SceneLocalState) | The party's coins as Lucky Dice starts, kept in SceneLocalState so the attendant can tell the change when the party comes back. |
#define | TOLBI_SPRING_COIN_PRIZE (ring) TolbiSpringCoinPrizes[ring] | |
#define | TOLBI_SPRING_COIN_TRAIL (n) (ACTOR_TOLBI_SPRING_COIN_SHADOW - (n)) | The actor that draws toss->trail[n] of a tossed coin or medal, n from 1 to 3. |
#define | TOLBI_SPRING_MEDAL_TRAIL (n) (ACTOR_TOLBI_SPRING_MEDAL_SHADOW - (n)) | |
#define | TOLBI_SPRING_CENTER_X toFIXED(120) | The spring's centre, which the prize rings pull the tossed token toward. |
#define | TOLBI_SPRING_CENTER_Z toFIXED(71) | |
#define | TOLBI_SPRING_COUNT_WIDTH BY_LANGUAGE(17, 17, 19, 19, 19, 19) | The window of the party's coins and Lucky Medals, and the menu of what to toss, in window metatiles, with the counts' x in pixels: the European editions' longer words widen both and move the counts right. |
#define | TOLBI_SPRING_COUNT_NUMBER_X BY_LANGUAGE(56, 72, 88, 88, 88, 88) | |
#define | TOLBI_SPRING_TOSS_MENU_X BY_LANGUAGE(22, 20, 19, 19, 19, 19) | |
#define | TOLBI_SPRING_TOSS_MENU_WIDTH BY_LANGUAGE(7, 9, 10, 10, 10, 10) |
Enumerations
| Name | Description | |
|---|---|---|
enum | SPRING_TOSS_KIND { SPRING_TOSS_COIN, SPRING_TOSS_MEDAL } | What the player throws into the spring, chosen by mnSelectCoinsOrMedals. |
enum | STUCCO_ROOMS_C_ACTOR_ID { ACTOR_LUCKY_WHEELS_ATTENDANT, ACTOR_LUCKY_DICE_ATTENDANT, AC … } | The people and boards of the Lucky Dice tent and the Lucky Wheels room, numbered in the order of StuccoRoomsCActorPlacements from ACTOR_FIRST_PLACED. |
enum | TOLBI_SPRING_ACTOR_ID { ACTOR_TOLBI_SPRING_COIN_SHADOW, ACTOR_TOLBI_SPRING_COIN, ACT … } | Tolbi Spring's own actors (TolbiSpring), numbered in the order of TolbiSpringActorPlacements from ACTOR_FIRST_PLACED. |
enum | TOLBI_SPRING_ANIMATION { ANIM_TOKEN_TUMBLE, ANIM_TOKEN_FLOAT, ANIM_TOKEN_REST, ANIM_T … } | Animations of the spring's sprites, numbered as in their tables under graphics/sprite (spring_coin.tsv, crab.tsv, turtle.tsv, signpost.tsv). |
enum | TOLBI_SPRING_METATILE_BEHAVIOR { METATILE_BEHAVIOR_TOLBI_SPRING_WATER } | The two metatiles searched to toss into Tolbi Spring from the white step at metatile (7, 9): the spring's rim north of it, metatile (7, 8), and the ground south of it, metatile (7, 10), in front of Isaac when he stands with his back to the spring. |
enum | anonymous enum { LUCKY_DICE_COINS_PER_LEVEL, LUCKY_DICE_MEDIUM_WIN, LUCKY_DIC … } | Lucky Dice costs this many coins for each level of the party's average level; a win of LUCKY_DICE_MEDIUM_WIN coins or more, or of LUCKY_DICE_LARGE_WIN, is greeted with a bigger jingle. |
enum | anonymous enum { LUCKY_WHEELS_KINDS, LUCKY_WHEELS_ITEMS_PER_KIND } | The kinds of prize a line of Lucky Wheels wins, three items each in StuccoRoomsCLuckyWheelsPrizeItems: those before LUCKY_WHEELS_PRIZE_ANYTHING, which wins any of them. |
enum | anonymous enum { LUCKY_WHEELS_LAST_GIVEN } | The slot machine's report in the holdings' wonPrizes: the kinds won, ended by LUCKY_WHEELS_PRIZE_LIST_END, or LUCKY_WHEELS_PRIZE_LIST_DONE once the attendant has handed them over; from LUCKY_WHEELS_LAST_GIVEN on, the item of each kind she gave last. |
enum | anonymous enum { SPRING_WATER_SINK_PIXELS } | The pixels the spring's water sinks before it fades, one every fourth tick. |
enum | anonymous enum { SPRING_MEDAL_PRIZES, SPRING_MEDAL_PRIZES_PER_RING } | A medal's prizes (MAIN_ROUTINE_STATE's prizeWeights): its ring allows three more for each ring out from the centre. |
enum | anonymous enum { SPRING_RING_OUTSIDE } | The ring a tossed token settles in: 0 the innermost to 3, or outside them all. |
enum | anonymous enum { SPRING_CENTER_RING_RADIUS, SPRING_SECOND_RING_RADIUS, SPRING … } | How far out from TOLBI_SPRING_CENTER_X and _Z, in pixels, a token resting short of each ring's outer edge counts as in that ring. |
enum | anonymous enum { SPRING_BASIN_WEST, SPRING_BASIN_EAST, SPRING_BASIN_NORTH, SP … } | The basin's floor, where a token rolls and bounces, in the spring game's pixels (x as on screen): an octagon whose straight sides lie at these x and z, each corner cut off by a slope SPRING_BASIN_CORNER_WIDTH across and SPRING_BASIN_CORNER_DEPTH deep, as the drained basin shows. |
enum | anonymous enum { CRAB_HEADING_EAST, CRAB_HEADING_WEST } | Which way a crab scuttles, in its obstacle's heading; a turtle's heading is an angle round its ellipse. |
enum | anonymous enum { SPRING_CRAB_REST_TICKS } | The second crab rests this many ticks at each end of its run. |
enum | anonymous enum { SPRING_TOKEN_PULLED_DAMPING, SPRING_TOKEN_SETTLING_DAMPING, … } | The token's velocity keeps SPRING_TOKEN_PULLED_DAMPING / SPRING_TOKEN_DAMPING_SCALE of itself each tick while the rings pull it, and SPRING_TOKEN_SETTLING_DAMPING / SPRING_TOKEN_DAMPING_SCALE once they let go. |
Functions
| Name | Description | |
|---|---|---|
Sint32 | scInit (void) | The setup of both scenes, and what the attendants say when a game ends. |
static void | scTolbiSpringDrainSpring (void) | Tolbi Spring's water sinks 16 pixels in the basin and fades away, uncovering the target of rings on its floor. |
static void | scStuccoRoomsCOfferLuckyWheels (Sint32 afterLosing) | The Lucky Wheels attendant asks whether Isaac will use his Game Tickets, warns him when the bag is full or nearly so, and sends him to the slot machine. |
static Sint32 | scTolbiSpringRunSpringGame (void) | The party chooses whether to toss a coin or a Lucky Medal, presses A to toss it, and wins coins or an item by the ring it settles in. |
static Sint32 | scStuccoRoomsCSelectLuckyWheelsPrize (Sint32 category) | Chooses which of the three items of a kind the Lucky Wheels attendant hands over, never the one she gave last time. |
static void | scTolbiSpringInitTossSimulation (void) | Puts the crabs and turtles at their starting places, the token out of sight, and starts the spring game's ticks. |
static Sint32 | scTolbiSpringRunToss (Sint32 tossKind) | Isaac tosses the chosen coin or medal over his shoulder; returns the ring it settles in. |
static inline void | scIOSetBlendControl (Sint32 value) | |
static inline void | scIOSetBlendAlpha (Sint32 value) | |
const SCENE_ENTRANCE * | scGetEntrances (void) | The six rooms share one entrance table. |
const SCENE_EXIT_REGION * | scGetExitRegions (void) | The scene has no exit regions: its regions entry returns none. |
const Uint32 * | scGetExits (void) | Both scenes share one exit table. |
const ACTOR_PLACE * | scGetActorPlacements (void) | Selects the actors of Tolbi Spring or of the Lucky Dice and Lucky Wheels rooms. |
static void | scTolbiSpringAskAboutLuckyMedal (Sint32 actorId) | The man with a pack by Tolbi Spring's north-west corner asks whether Isaac has a Lucky Medal. |
static void | scStuccoRoomsCAskAboutFirstDiceGame (Sint32 actorId) | The burly grey-haired man at the west end of the yellow rug in the Lucky Dice tent asks whether this is Isaac's first time to play. |
static void | scTolbiSpringTossCoinOrMedal (void) | Isaac searches Tolbi Spring from the white step between its signs, facing the spring or with his back to it (metatile (7, 8) or (7, 10)), to toss a coin or a Lucky Medal. |
static void | scStuccoRoomsCReadLuckyWheelsRules (void) | Isaac reads the green board east of the Lucky Wheels counter: pull the lever up to five times to line up matching icons, press the star to hold a wheel, and play 1, 3, 5 or 7 lines for 1 to 4 Game Tickets. |
static void | scStuccoRoomsCReadLuckyWheelsPrizes (void) | Isaac reads the green board north-west of the Lucky Wheels counter: shirts win undershirts, rings win rings, boots win boots, stars and hearts win items, and moons can win anything. |
static void | scStuccoRoomsCTalkToWheelsAttendant (void) | The young woman behind the Lucky Wheels counter invites Isaac to play, and if he has Game Tickets and agrees, sends him to the slot machine. |
const CUE * | scGetCues (void) | Selects the cues of Tolbi Spring or of the Lucky Dice and Lucky Wheels rooms. |
static inline void | scTolbiSpringShowPrizePicture (Sint32 srcColumn, Sint32 srcRow) | Draws one picture of the prize being shown in the middle of Tolbi Spring, with SE_CAST, and holds it 8 ticks. |
static void | scTolbiSpringRevealPrize (Sint32 item) | Tolbi Spring gives a Lucky Medal's prize: a roar, Isaac turns to face the spring, and a sea dragon of green-blue scales rises from its north edge, its long neck stretching south over the rings until its head reaches the rim before him, the prize held up over his head as he raises his arms; "Isaac got an Adept's Helm." (or whatever the medal won), and the dragon draws back north the way it came. |
static void | scStuccoRoomsCOfferLuckyDice (void) | The fair-haired young man on the left behind the Lucky Dice counter offers a game for ten coins a level of the party's average level. |
static void | scTolbiSpringSetActorAppearance (Sint32 actorId, const Sint32 *coordinate, Sint32 facing, Sint32 colorVariant, Sint32 animationSpeed) | Places the actor at the three coordinates and sets its facing, animation speed and colours. |
static void | scTolbiSpringSetSpriteStorageKind (Sint32 actorId, Sint32 storageKind) | Shows (ACTOR_SPRITE_ONE) or hides (ACTOR_SPRITE_NONE) an actor's sprite: the glints trailing a token are shown as it is tossed and hidden once it comes to rest. |
static void | scTolbiSpringUpdateTossSimulation (void) | Each tick of the spring game: the tossed token flies, lands, is drawn toward the centre by the rings and bounces off the basin's sloping sides; the crabs and turtles move and knock it away when it comes near; and the token, its shadow and its trail are drawn. |
Variables
| Name | Description | |
|---|---|---|
extern const SCENE_ENTRANCE | TolbiSpringEntrances [] | |
extern const Uint32 | TolbiSpringExits [] | |
extern const ACTOR_PLACE | TolbiSpringActorPlacements [] | |
extern const ACTOR_PLACE | StuccoRoomsCActorPlacements [] | |
extern const CUE | StuccoRoomsCCues [] | |
extern const CUE | TolbiSpringCues [] | |
extern const Uint16 | TolbiSpringAlphaSteps [] | The water's fade as the spring drains, from mostly water to none, one step every eighth tick. |
extern const Uint32 | TolbiSpringPrizeItems [] | The prizes a Lucky Medal can win, SPRING_MEDAL_PRIZES_PER_RING to a ring, one drawn by its weight. |
extern const Uint16 | TolbiSpringCoinPrizes [] | The coins a tossed coin wins, by the ring it rests in. |
extern const Uint32 | StuccoRoomsCLuckyWheelsPrizeItems [] | What Lucky Wheels wins, three items to each of its LUCKY_WHEELS_KINDS kinds. |
extern const Uint8 | TolbiSpringCrabColors [] | The crabs' colours at each speed, and the turtles'. |
extern const Uint8 | TolbiSpringTurtleColors [] | |
extern const Uint8 | TolbiSpringObstacleStartX [] | Where each obstacle starts, in pixels, and its heading. |
extern const Uint8 | TolbiSpringObstacleStartZ [] | |
extern const Uint16 | TolbiSpringObstacleStartHeadings [] | |
static SPRING_TOSS_MOTION | Toss | The coin or Lucky Medal in flight. |
static Sint32 | TossKind | What is tossed: a coin, or SPRING_TOSS_MEDAL for a Lucky Medal. |
static Sint32 | TossUnused [3] UNUSED | Unused: three words nothing reads or writes. |
static SPRING_OBSTACLE | Obstacles [4] | The two crabs and two turtles moving in the spring. |
static Sint32 | TossTick | The ticks since the toss, whether it has come to rest, and the ring it rests in. |
static Sint32 | TossEnded | |
static Sint32 | TossResult |
Description
Tolbi's three games of chance, which the party can play whenever it is in town: Lucky Dice, Lucky Wheels and Tolbi Spring. None of them is part of the story.
Lucky Dice and Lucky Wheels are two rooms of one map (SceneIdStuccoRoomsC,
whose area name is Tolbi), each with its own camera box.
- Lucky Dice is played in the small tent with a die on its front. Two
fair-haired young men stand behind the counter at the back. The one on the
left asks ten coins for each level of the party's average level and, once
paid, sends Isaac to the green table to throw. When the game ends he says
how many coins were won or lost, with a fanfare that grows with the win.
Boards on the wall give the rules, and three players, an old man with a
cane, a burly grey-haired man and a woman in green, talk of their luck. A
soldier talks of the game until Babi is saved (
FLAG_BABI_SAVED, the finals day), then of the scalpers at the Colosso finals, and is gone once Colosso is over (FLAG_COLOSSO_OVER). - Lucky Wheels, the slot machine, is played in the room up the stairs beside the inn. The young woman in green behind its curved counter takes Game Tickets, and warns when the bag has six free slots or fewer. When the game ends she hands over an item for each line won, one of the three of its kind (shirts, boots, rings, or stars and hearts for items; a moon wins any kind), never the one she gave last time; or, when nothing was won, offers another game. Green boards by the counter give the rules and the prizes.
Tolbi Spring (SceneIdTolbiSpring) is the fountain in the middle of Tolbi's
square, reached through the gate in its railing. Isaac stands on the white
step between its two signs and searches the spring. The first time each visit
its water sinks and fades away, uncovering a target of rings on the basin's
floor with two crabs and two turtles moving about on it. He turns his back to
the spring and tosses a coin or a Lucky Medal into it. A crab or turtle the
token lands beside knocks it away, and the rings pull it toward the centre
until it settles in one of five. A coin wins 20, 10, 2 or 1 coins, from the
centre out, or nothing in the fifth. A medal always wins an item, drawn by
weight from fifteen prizes, the nearer the centre the fewer and better
(Assassin Blade first, Water of Life last), and the item won has its weight
halved for later tosses. Where the token settles is measured from
TOLBI_SPRING_CENTER_X and _Z, against the rings painted on the basin's floor
(scTolbiSpringUpdateTossSimulation). In the Japanese edition the coin and
medal counts show an = after each number.
Macros in detail
FLAG_TOLBI_SPRING_DRAINED
#define FLAG_TOLBI_SPRING_DRAINED FLAG_SCENE_TEMP(0x00)
The spring's water has sunk and faded away this visit.
Referenced by scInit() and scTolbiSpringTossCoinOrMedal().
Definition at line 72 of file tolbi_games.c.
sLuckyDiceCoinsBefore
#define sLuckyDiceCoinsBefore (*(Sint32 *)SceneLocalState)
The party's coins as Lucky Dice starts, kept in SceneLocalState so the
attendant can tell the change when the party comes back.
Referenced by scInit() and scStuccoRoomsCOfferLuckyDice().
Definition at line 76 of file tolbi_games.c.
TOLBI_SPRING_COIN_PRIZE
#define TOLBI_SPRING_COIN_PRIZE(ring) TolbiSpringCoinPrizes[ring]
#define TOLBI_SPRING_COIN_PRIZE(ring)
Referenced by scTolbiSpringRunSpringGame().
Definition at lines 81 and 83 of file tolbi_games.c.
TOLBI_SPRING_COIN_TRAIL
#define TOLBI_SPRING_COIN_TRAIL(n) (ACTOR_TOLBI_SPRING_COIN_SHADOW - (n))
The actor that draws toss->trail[n] of a tossed coin or medal, n from 1 to 3.
They are the rows before each shadow, the oldest copy first.
Referenced by scTolbiSpringRunToss() and scTolbiSpringUpdateTossSimulation().
Definition at line 214 of file tolbi_games.c.
TOLBI_SPRING_MEDAL_TRAIL
#define TOLBI_SPRING_MEDAL_TRAIL(n) (ACTOR_TOLBI_SPRING_MEDAL_SHADOW - (n))
Referenced by scTolbiSpringRunToss() and scTolbiSpringUpdateTossSimulation().
Definition at line 215 of file tolbi_games.c.
TOLBI_SPRING_CENTER_X
#define TOLBI_SPRING_CENTER_X toFIXED(120)
The spring's centre, which the prize rings pull the tossed token toward.
Referenced by scTolbiSpringUpdateTossSimulation().
Definition at line 325 of file tolbi_games.c.
TOLBI_SPRING_CENTER_Z
#define TOLBI_SPRING_CENTER_Z toFIXED(71)
Referenced by scTolbiSpringUpdateTossSimulation().
Definition at line 326 of file tolbi_games.c.
TOLBI_SPRING_COUNT_WIDTH
#define TOLBI_SPRING_COUNT_WIDTH BY_LANGUAGE(17, 17, 19, 19, 19, 19)
The window of the party's coins and Lucky Medals, and the menu of what to toss, in window metatiles, with the counts' x in pixels: the European editions' longer words widen both and move the counts right.
Referenced by scTolbiSpringRunSpringGame().
Definition at line 331 of file tolbi_games.c.
TOLBI_SPRING_COUNT_NUMBER_X
#define TOLBI_SPRING_COUNT_NUMBER_X BY_LANGUAGE(56, 72, 88, 88, 88, 88)
Referenced by scTolbiSpringRunSpringGame().
Definition at line 332 of file tolbi_games.c.
TOLBI_SPRING_TOSS_MENU_X
#define TOLBI_SPRING_TOSS_MENU_X BY_LANGUAGE(22, 20, 19, 19, 19, 19)
Referenced by scTolbiSpringRunSpringGame().
Definition at line 333 of file tolbi_games.c.
TOLBI_SPRING_TOSS_MENU_WIDTH
#define TOLBI_SPRING_TOSS_MENU_WIDTH BY_LANGUAGE(7, 9, 10, 10, 10, 10)
Referenced by scTolbiSpringRunSpringGame().
Definition at line 334 of file tolbi_games.c.
Enumerations in detail
SPRING_TOSS_KIND
enum SPRING_TOSS_KIND
What the player throws into the spring, chosen by mnSelectCoinsOrMedals.
| Enumerator | Value | Description |
|---|---|---|
SPRING_TOSS_COIN | ||
SPRING_TOSS_MEDAL |
Definition at line 95 of file tolbi_games.c.
STUCCO_ROOMS_C_ACTOR_ID
enum STUCCO_ROOMS_C_ACTOR_ID
The people and boards of the Lucky Dice tent and the Lucky Wheels room,
numbered in the order of StuccoRoomsCActorPlacements from ACTOR_FIRST_PLACED.
| Enumerator | Value | Description |
|---|---|---|
ACTOR_LUCKY_WHEELS_ATTENDANT | ACTOR_FIRST_PLACED | A young woman in green (SPRITE_YOUNG_WOMAN_IN_GREEN) behind the curved counter of the Lucky Wheels room, who runs the slot machine (scStuccoRoomsCTalkToWheelsAttendant). |
ACTOR_LUCKY_DICE_ATTENDANT | A young man with fair hair (SPRITE_YOUNG_MAN_WITH_FAIR_HAIR), the left of the two behind the Lucky Dice counter, who runs the game (scStuccoRoomsCOfferLuckyDice). | |
ACTOR_LUCKY_DICE_RULES_ATTENDANT | The other young man behind the Lucky Dice counter, on the right, who points the party to the rules: Read the sign if ya don't know the rules. | |
ACTOR_LUCKY_DICE_PLAYER_FIRST_TIME | A Lucky Dice player, a burly grey-haired man (SPRITE_BURLY_MAN_WITH_GREY_HAIR) at the west end of the yellow rug. | |
ACTOR_LUCKY_DICE_PLAYER_TRIPLE_DIGITS | An old man with a cane (SPRITE_OLD_MAN_WITH_CANE) by the green table. | |
ACTOR_LUCKY_DICE_PLAYER_OUT_OF_COINS | A woman in a green dress (SPRITE_WOMAN_IN_GREEN_DRESS) by the east wall. | |
ACTOR_LUCKY_WHEELS_PRIZE_SIGN | The green board of Lucky Wheels prizes north-west of the counter. The map draws it; an unseen actor (SPRITE_BLANK) stands on it to be read (scStuccoRoomsCReadLuckyWheelsPrizes). | |
ACTOR_LUCKY_WHEELS_RULES_SIGN | The green board of Lucky Wheels rules east of the counter, read the same way (scStuccoRoomsCReadLuckyWheelsRules). | |
ACTOR_LUCKY_DICE_RULES_SIGN | The Lucky Dice rules, on a green board east of the counter, read the same way. | |
ACTOR_LUCKY_DICE_SOLDIER | A soldier by the red rug in the Lucky Dice tent, gone after Colosso, drawn with the long-haired fighter's sprite (SPRITE_PERSON_WITH_SWORD). | |
ACTOR_LUCKY_DICE_PAIRS_SIGN | The Lucky Dice rules for pairs, on a green board west of the counter. |
Definition at line 103 of file tolbi_games.c.
TOLBI_SPRING_ACTOR_ID
enum TOLBI_SPRING_ACTOR_ID
Tolbi Spring's own actors (TolbiSpring), numbered in the order of
TolbiSpringActorPlacements from ACTOR_FIRST_PLACED.
The toss draws the coin or the medal with its shadow and three trailing
copies, which TOLBI_SPRING_COIN_TRAIL and TOLBI_SPRING_MEDAL_TRAIL number.
| Enumerator | Value | Description |
|---|---|---|
ACTOR_TOLBI_SPRING_COIN_SHADOW | ACTOR_FIRST_PLACED + 3 | |
ACTOR_TOLBI_SPRING_COIN | The coin the party tosses (SPRITE_SPRING_COIN). | |
ACTOR_TOLBI_SPRING_MEDAL_SHADOW | ACTOR_TOLBI_SPRING_COIN + 4 | |
ACTOR_TOLBI_SPRING_MEDAL | The Lucky Medal the party tosses (SPRITE_SPRING_LUCKY_MEDAL). | |
ACTOR_TOLBI_SPRING_FIRST_OBSTACLE | The four obstacles that move in the spring during a toss, in the order of Obstacles. They are two crabs (SPRITE_CRAB), then | |
ACTOR_TOLBI_SPRING_MEDAL_SIGN | ACTOR_TOLBI_SPRING_FIRST_OBSTACLE + 4 | two turtles (SPRITE_TURTLE). The sign east of the white step, on Lucky Medals (SPRITE_SIGNPOST). |
ACTOR_TOLBI_SPRING_COIN_SIGN | The sign west of the white step, on tossing a coin. | |
ACTOR_TOLBI_SPRING_EAST_SIGN_GRASS | The tufts of grass at the | |
ACTOR_TOLBI_SPRING_WEST_SIGN_GRASS | foot of each sign: the signpost sheet's second picture (ANIM_SIGN_GRASS), mirrored and drawn underfoot (scInit). | |
ACTOR_TOLBI_SPRING_VISITOR_MYSTERIOUS_POWERS | A visitor carrying a pack (SPRITE_MAN_CARRYING_A_PACK) west of the signs, who explains the game. | |
ACTOR_TOLBI_SPRING_MEDAL_SEEKER | A man carrying a pack (SPRITE_MAN_CARRYING_A_PACK) by the spring's north-west corner, who wishes he had a Lucky Medal. | |
ACTOR_TOLBI_SPRING_VISITOR_ONE_MEDAL | A visitor, a woman with fair hair (SPRITE_WOMAN_WITH_FAIR_HAIR) east of the spring, who has only one Lucky Medal. |
Definition at line 153 of file tolbi_games.c.
TOLBI_SPRING_ANIMATION
enum TOLBI_SPRING_ANIMATION
Animations of the spring's sprites, numbered as in their tables under
graphics/sprite (spring_coin.tsv, crab.tsv, turtle.tsv, signpost.tsv). The
Lucky Medal's sheet (spring_lucky_medal.png) is drawn and numbered like the
coin's.
| Enumerator | Value | Description |
|---|---|---|
ANIM_TOKEN_TUMBLE | 0 | turning over once as it is tossed |
ANIM_TOKEN_FLOAT | 1 | turning as it drifts toward the rings |
ANIM_TOKEN_REST | 2 | lying still |
ANIM_TOKEN_SHADOW | 3 | a grey spot on the ground below it |
ANIM_TOKEN_GLINT | 4 | a twinkle, as each of the three marks trailing a flying token |
ANIM_CRAB_SCUTTLE | 1 | stepping sideways (crab.png) |
ANIM_CRAB_RAISE_CLAWS | 3 | snapping its raised claws (crab.png) |
ANIM_TURTLE_SWIM | 2 | paddling (turtle.png) |
ANIM_TURTLE_HIDE | 3 | head and flippers drawn in (turtle.png) |
ANIM_SIGN_GRASS | 2 | signpost sheet's second picture, a tuft of grass (signpost.png) |
Definition at line 195 of file tolbi_games.c.
TOLBI_SPRING_METATILE_BEHAVIOR
enum TOLBI_SPRING_METATILE_BEHAVIOR
The two metatiles searched to toss into Tolbi Spring from the white step at metatile (7, 9): the spring's rim north of it, metatile (7, 8), and the ground south of it, metatile (7, 10), in front of Isaac when he stands with his back to the spring.
| Enumerator | Value | Description |
|---|---|---|
METATILE_BEHAVIOR_TOLBI_SPRING_WATER | 80 |
Definition at line 221 of file tolbi_games.c.
anonymous enum
enum { LUCKY_DICE_COINS_PER_LEVEL, LUCKY_DICE_MEDIUM_WIN, LUCKY_DICE_LARGE_WIN }
Lucky Dice costs this many coins for each level of the party's average level;
a win of LUCKY_DICE_MEDIUM_WIN coins or more, or of LUCKY_DICE_LARGE_WIN, is
greeted with a bigger jingle.
| Enumerator | Value | Description |
|---|---|---|
LUCKY_DICE_COINS_PER_LEVEL | 10 | |
LUCKY_DICE_MEDIUM_WIN | 5000 | |
LUCKY_DICE_LARGE_WIN | 20000 |
Definition at line 229 of file tolbi_games.c.
anonymous enum
enum { LUCKY_WHEELS_KINDS, LUCKY_WHEELS_ITEMS_PER_KIND }
The kinds of prize a line of Lucky Wheels wins, three items each in
StuccoRoomsCLuckyWheelsPrizeItems: those before LUCKY_WHEELS_PRIZE_ANYTHING,
which wins any of them.
| Enumerator | Value | Description |
|---|---|---|
LUCKY_WHEELS_KINDS | LUCKY_WHEELS_PRIZE_ANYTHING | |
LUCKY_WHEELS_ITEMS_PER_KIND | 3 |
Definition at line 239 of file tolbi_games.c.
anonymous enum
enum { LUCKY_WHEELS_LAST_GIVEN }
The slot machine's report in the holdings' wonPrizes: the kinds won, ended by
LUCKY_WHEELS_PRIZE_LIST_END, or LUCKY_WHEELS_PRIZE_LIST_DONE once the
attendant has handed them over; from LUCKY_WHEELS_LAST_GIVEN on, the item of
each kind she gave last.
| Enumerator | Value | Description |
|---|---|---|
LUCKY_WHEELS_LAST_GIVEN | 8 |
Definition at line 249 of file tolbi_games.c.
anonymous enum
enum { SPRING_WATER_SINK_PIXELS }
The pixels the spring's water sinks before it fades, one every fourth tick.
| Enumerator | Value | Description |
|---|---|---|
SPRING_WATER_SINK_PIXELS | 16 |
Definition at line 255 of file tolbi_games.c.
anonymous enum
enum { SPRING_MEDAL_PRIZES, SPRING_MEDAL_PRIZES_PER_RING }
A medal's prizes (MAIN_ROUTINE_STATE's prizeWeights): its ring allows three
more for each ring out from the centre.
| Enumerator | Value | Description |
|---|---|---|
SPRING_MEDAL_PRIZES | 15 | |
SPRING_MEDAL_PRIZES_PER_RING | 3 |
Definition at line 262 of file tolbi_games.c.
anonymous enum
enum { SPRING_RING_OUTSIDE }
The ring a tossed token settles in: 0 the innermost to 3, or outside them all.
| Enumerator | Value | Description |
|---|---|---|
SPRING_RING_OUTSIDE | 4 |
Definition at line 270 of file tolbi_games.c.
anonymous enum
enum { SPRING_CENTER_RING_RADIUS, SPRING_SECOND_RING_RADIUS, SPRING_THIRD_RING_RADIUS, SPRING_OUTER_RING_RADIUS }
How far out from TOLBI_SPRING_CENTER_X and _Z, in pixels, a token resting
short of each ring's outer edge counts as in that ring. The rings painted on
the basin's floor have their edges about 16, 24, 32 and 40 pixels out.
| Enumerator | Value | Description |
|---|---|---|
SPRING_CENTER_RING_RADIUS | 15 | |
SPRING_SECOND_RING_RADIUS | 25 | |
SPRING_THIRD_RING_RADIUS | 33 | |
SPRING_OUTER_RING_RADIUS | 41 |
Definition at line 278 of file tolbi_games.c.
anonymous enum
enum { SPRING_BASIN_WEST, SPRING_BASIN_EAST, SPRING_BASIN_NORTH, SPRING_BASIN_SOUTH, … }
The basin's floor, where a token rolls and bounces, in the spring game's
pixels (x as on screen): an octagon whose straight sides lie at these x and
z, each corner cut off by a slope SPRING_BASIN_CORNER_WIDTH across and
SPRING_BASIN_CORNER_DEPTH deep, as the drained basin shows.
| Enumerator | Value | Description |
|---|---|---|
SPRING_BASIN_WEST | 48 | |
SPRING_BASIN_EAST | 192 | |
SPRING_BASIN_NORTH | 24 | |
SPRING_BASIN_SOUTH | 120 | |
SPRING_BASIN_CORNER_WIDTH | 42 | |
SPRING_BASIN_CORNER_DEPTH | 18 |
Definition at line 290 of file tolbi_games.c.
anonymous enum
enum { CRAB_HEADING_EAST, CRAB_HEADING_WEST }
Which way a crab scuttles, in its obstacle's heading; a turtle's heading is an angle round its ellipse.
| Enumerator | Value | Description |
|---|---|---|
CRAB_HEADING_EAST | 0 | |
CRAB_HEADING_WEST | 1 |
Definition at line 302 of file tolbi_games.c.
anonymous enum
enum { SPRING_CRAB_REST_TICKS }
The second crab rests this many ticks at each end of its run.
| Enumerator | Value | Description |
|---|---|---|
SPRING_CRAB_REST_TICKS | 30 |
Definition at line 309 of file tolbi_games.c.
anonymous enum
enum { SPRING_TOKEN_PULLED_DAMPING, SPRING_TOKEN_SETTLING_DAMPING, SPRING_TOKEN_DAMPING_SCALE }
The token's velocity keeps SPRING_TOKEN_PULLED_DAMPING /
SPRING_TOKEN_DAMPING_SCALE of itself each tick while the rings pull it, and
SPRING_TOKEN_SETTLING_DAMPING / SPRING_TOKEN_DAMPING_SCALE once they let go.
| Enumerator | Value | Description |
|---|---|---|
SPRING_TOKEN_PULLED_DAMPING | 253 | |
SPRING_TOKEN_SETTLING_DAMPING | 220 | |
SPRING_TOKEN_DAMPING_SCALE | 256 |
Definition at line 317 of file tolbi_games.c.
Functions in detail
scInit
Sint32 scInit(void)
The setup of both scenes, and what the attendants say when a game ends.
Entering Tolbi Spring readies the crabs and turtles, and keeps the water
hidden if it was drained earlier this visit. Back in the Lucky Dice tent
after a game, Isaac steps up to the counter and the attendant says how many
coins were won or lost, to a fanfare that grows with the win. Back from the
slot machine, the Lucky Wheels attendant says Congratulations! and hands
over an item for each line won, or offers another game when nothing was won.
References fdActorFaceDirection(), fdActorGet(), fdActorSetAnimation(), fdActorSetSpriteColorById(), fdActorWalkToAndWait(), fdScriptEnd(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptStart(), fdScriptStartScreenTransition(), fdScriptWait(), fdScriptWaitTransitionTicks(), gmFlagGet(), gmItemShowFound(), gmPartyGiveItem(), MainRoutineStateWork, mnMessageArgumentPush(), mnSoundWaitForJingle(), OamCopyEnabled, scIOSetBlendAlpha(), scIOSetBlendControl(), scStuccoRoomsCOfferLuckyWheels(), scStuccoRoomsCSelectLuckyWheelsPrize(), scTolbiSpringInitTossSimulation(), Sint32 and sySoundPlay().
Definition at lines 54 and 527 of file tolbi_games.c.
scTolbiSpringDrainSpring
static void scTolbiSpringDrainSpring(void)
Tolbi Spring's water sinks 16 pixels in the basin and fades away, uncovering the target of rings on its floor.
It starts with SE_BURST. The water is the overhead layer, scrolled down a
pixel every fourth tick and then faded out through TolbiSpringAlphaSteps.
References Sint32, sySoundPlay(), sySynch() and TolbiSpringAlphaSteps.
Referenced by scTolbiSpringTossCoinOrMedal().
Definition at lines 87 and 762 of file tolbi_games.c.
scStuccoRoomsCOfferLuckyWheels
static void scStuccoRoomsCOfferLuckyWheels(Sint32 afterLosing)
The Lucky Wheels attendant asks whether Isaac will use his Game Tickets, warns him when the bag is full or nearly so, and sends him to the slot machine.
afterLosing is 1 when the game has just ended with nothing won: she says Too bad... and offers another game, or says to come back with tickets.
References fdActorSnapshot(), fdScriptAskYesNoWithActorAnimation(), fdScriptLeaveFor(), fdScriptOpenMessage(), fdScriptSetAfterBattleDestination(), fdScriptSetMessageId(), fdScriptShowMessage(), gmPartyInventoryCountFreeSlots(), gmPartyInventoryCountItem(), mnMessageArgumentPush() and Sint32.
Referenced by scInit() and scStuccoRoomsCTalkToWheelsAttendant().
Definition at lines 88 and 792 of file tolbi_games.c.
scTolbiSpringRunSpringGame
static Sint32 scTolbiSpringRunSpringGame(void)
The party chooses whether to toss a coin or a Lucky Medal, presses A to toss it, and wins coins or an item by the ring it settles in.
A coin that settles outside the four inner rings wins nothing. A medal's prize is drawn by weight from the prizes its ring allows, and its weight is halved for later tosses.
References fdEndBusyAndReveal(), fdScriptAskYesNoWithActorAnimation(), fdScriptEnd(), fdScriptOpenMessage(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptStart(), fdScriptWait(), gmPartyAdjustCoins(), gmPartyInventoryCountFreeSlots(), gmPartyInventoryCountItem(), gmPartyInventoryRemove(), MainRoutineStateWork, mnMessageArgumentPush(), mnMessageCloseFinishedWindows(), mnSelectCoinsOrMedals(), mnTextDrawMessageAsTiles(), mnTextDrawNumberInWindow(), mnWindowClose(), mnWindowCreate(), PerPush, scTolbiSpringRevealPrize(), scTolbiSpringRunToss(), Sint32, sySoundPlay(), sySynch() and TolbiSpringPrizeItems.
Referenced by scTolbiSpringTossCoinOrMedal().
Definition at lines 89 and 924 of file tolbi_games.c.
scStuccoRoomsCSelectLuckyWheelsPrize
static Sint32 scStuccoRoomsCSelectLuckyWheelsPrize(Sint32 category)
Chooses which of the three items of a kind the Lucky Wheels attendant hands over, never the one she gave last time. A moon wins a kind at random.
References MainRoutineStateWork, Sint32 and StuccoRoomsCLuckyWheelsPrizeItems.
Referenced by scInit().
Definition at lines 90 and 1203 of file tolbi_games.c.
scTolbiSpringInitTossSimulation
static void scTolbiSpringInitTossSimulation(void)
Puts the crabs and turtles at their starting places, the token out of sight, and starts the spring game's ticks.
References fdActorGet(), fdActorSelectAnimation(), Obstacles, scTolbiSpringUpdateTossSimulation(), Sint32, sySetTickEvent(), TolbiSpringObstacleStartHeadings, TolbiSpringObstacleStartX, TolbiSpringObstacleStartZ and Toss.
Referenced by scInit().
Definition at lines 91 and 1944 of file tolbi_games.c.
scTolbiSpringRunToss
static Sint32 scTolbiSpringRunToss(Sint32 tossKind)
Isaac tosses the chosen coin or medal over his shoulder; returns the ring it settles in.
References fdActorGet(), fdActorSelectAnimation(), fdActorSetAnimation(), MainRoutineStateWork, scTolbiSpringSetSpriteStorageKind(), Sint32, sySoundPlay(), sySynch(), Toss, TossEnded, TossKind, TossResult and TossTick.
Referenced by scTolbiSpringRunSpringGame().
Definition at lines 92 and 1993 of file tolbi_games.c.
scIOSetBlendControl
static inline void scIOSetBlendControl(Sint32 value)
References Sint32.
Referenced by scInit().
Definition at line 364 of file tolbi_games.c.
scIOSetBlendAlpha
static inline void scIOSetBlendAlpha(Sint32 value)
References Sint32.
Referenced by scInit().
Definition at line 369 of file tolbi_games.c.
scGetEntrances
const SCENE_ENTRANCE *scGetEntrances(void)
References TolbiSpringEntrances.
Definition at line 374 of file tolbi_games.c.
scGetExitRegions
const SCENE_EXIT_REGION *scGetExitRegions(void)
Definition at line 379 of file tolbi_games.c.
scGetExits
const Uint32 *scGetExits(void)
References TolbiSpringExits.
Definition at line 384 of file tolbi_games.c.
scGetActorPlacements
const ACTOR_PLACE *scGetActorPlacements(void)
Selects the actors of Tolbi Spring or of the Lucky Dice and Lucky Wheels rooms.
References MainRoutineStateWork, StuccoRoomsCActorPlacements and TolbiSpringActorPlacements.
Definition at line 391 of file tolbi_games.c.
scTolbiSpringAskAboutLuckyMedal
static void scTolbiSpringAskAboutLuckyMedal(Sint32 actorId)
The man with a pack by Tolbi Spring's north-west corner asks whether Isaac has a Lucky Medal.
If he has, the man says it will be extra lucky tossed in the spring; if not, that he would want one himself to try his luck.
References fdScriptAskYesNoWithActorAnimation(), fdScriptOpenMessage(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptWait() and Sint32.
Referenced by TolbiSpringCues.
Definition at line 405 of file tolbi_games.c.
scStuccoRoomsCAskAboutFirstDiceGame
static void scStuccoRoomsCAskAboutFirstDiceGame(Sint32 actorId)
The burly grey-haired man at the west end of the yellow rug in the Lucky Dice tent asks whether this is Isaac's first time to play.
Yes, and he warns that once you start you won't want to stop; no, and he says Lucky Dice is all the rage in Tolbi.
References fdScriptAskYesNoWithActorAnimation(), fdScriptOpenMessage(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptWait() and Sint32.
Referenced by StuccoRoomsCCues.
Definition at line 430 of file tolbi_games.c.
scTolbiSpringTossCoinOrMedal
static void scTolbiSpringTossCoinOrMedal(void)
Isaac searches Tolbi Spring from the white step between its signs, facing the spring or with his back to it (metatile (7, 8) or (7, 10)), to toss a coin or a Lucky Medal.
The first time each visit, the water sinks and fades away to uncover the
target of rings on the basin's floor (scTolbiSpringDrainSpring). He then
stands on the step with his back to the spring, and the party chooses what to
toss (scTolbiSpringRunSpringGame).
References fdActorFaceDirection(), fdActorWalkToAndWait(), fdScriptEnd(), fdScriptGetFlag(), fdScriptStart(), gmFlagSet(), MainRoutineStateWork, scTolbiSpringDrainSpring(), scTolbiSpringRunSpringGame() and Sint32.
Referenced by TolbiSpringCues.
Definition at line 459 of file tolbi_games.c.
scStuccoRoomsCReadLuckyWheelsRules
static void scStuccoRoomsCReadLuckyWheelsRules(void)
Isaac reads the green board east of the Lucky Wheels counter: pull the lever up to five times to line up matching icons, press the star to hold a wheel, and play 1, 3, 5 or 7 lines for 1 to 4 Game Tickets.
References fdScriptEnd(), fdScriptOpenMessage(), fdScriptSetMessageId() and fdScriptStart().
Referenced by StuccoRoomsCCues.
Definition at line 478 of file tolbi_games.c.
scStuccoRoomsCReadLuckyWheelsPrizes
static void scStuccoRoomsCReadLuckyWheelsPrizes(void)
Isaac reads the green board north-west of the Lucky Wheels counter: shirts win undershirts, rings win rings, boots win boots, stars and hearts win items, and moons can win anything.
References fdScriptEnd(), fdScriptOpenMessage(), fdScriptSetMessageId() and fdScriptStart().
Referenced by StuccoRoomsCCues.
Definition at line 490 of file tolbi_games.c.
scStuccoRoomsCTalkToWheelsAttendant
static void scStuccoRoomsCTalkToWheelsAttendant(void)
The young woman behind the Lucky Wheels counter invites Isaac to play, and if he has Game Tickets and agrees, sends him to the slot machine.
Without tickets she tells him he needs them to play. See
scStuccoRoomsCOfferLuckyWheels.
References scStuccoRoomsCOfferLuckyWheels().
Referenced by StuccoRoomsCCues.
Definition at line 504 of file tolbi_games.c.
scGetCues
const CUE *scGetCues(void)
Selects the cues of Tolbi Spring or of the Lucky Dice and Lucky Wheels rooms.
References MainRoutineStateWork, StuccoRoomsCCues and TolbiSpringCues.
Definition at line 510 of file tolbi_games.c.
scTolbiSpringShowPrizePicture
static inline void scTolbiSpringShowPrizePicture(Sint32 srcColumn, Sint32 srcRow)
Draws one picture of the prize being shown in the middle of Tolbi Spring,
with SE_CAST, and holds it 8 ticks.
References fdMapGridCopyMetatilesTo(), fdScriptWait(), Sint32 and sySoundPlay().
Referenced by scTolbiSpringRevealPrize().
Definition at line 688 of file tolbi_games.c.
scTolbiSpringRevealPrize
static void scTolbiSpringRevealPrize(Sint32 item)
Tolbi Spring gives a Lucky Medal's prize: a roar, Isaac turns to face the spring, and a sea dragon of green-blue scales rises from its north edge, its long neck stretching south over the rings until its head reaches the rim before him, the prize held up over his head as he raises his arms; "Isaac got an Adept's Helm." (or whatever the medal won), and the dragon draws back north the way it came.
The dragon is the pictures: each is 3 by 8 metatiles copied over the spring's middle from spare metatiles of the map, one every 8 ticks, the head a step further south in each as it comes and a step back north in each as it goes.
References fdActorFaceDirection(), fdMapGridCopyMetatilesTo(), fdScriptEnd(), fdScriptStart(), fdScriptWait(), gmItemShowFound(), gmPartyGiveItem(), scTolbiSpringShowPrizePicture(), Sint32 and sySoundPlay().
Referenced by scTolbiSpringRunSpringGame().
Definition at line 706 of file tolbi_games.c.
scStuccoRoomsCOfferLuckyDice
static void scStuccoRoomsCOfferLuckyDice(void)
The fair-haired young man on the left behind the Lucky Dice counter offers a game for ten coins a level of the party's average level. If Isaac agrees, he walks down to the green table and the game of Lucky Dice begins.
Without enough coins he is told Ya gotta pay to play.
References fdActorFaceDirection(), fdActorSnapshot(), fdActorWalkToAndWait(), fdScriptAskYesNoWithActorAnimation(), fdScriptEnd(), fdScriptLeaveFor(), fdScriptOpenMessage(), fdScriptSetAfterBattleDestination(), fdScriptSetMessageId(), fdScriptShowMessage(), fdScriptStart(), fdScriptWait(), gmPartyGetAverageLevel(), MainRoutineStateWork and mnMessageArgumentPush().
Referenced by StuccoRoomsCCues.
Definition at line 876 of file tolbi_games.c.
scTolbiSpringSetActorAppearance
static void scTolbiSpringSetActorAppearance(Sint32 actorId, const Sint32 *coordinate, Sint32 facing, Sint32 colorVariant, Sint32 animationSpeed)
Places the actor at the three coordinates and sets its facing, animation speed and colours.
References fdActorGet(), fdActorSetAnimationSpeed() and Sint32.
Referenced by scTolbiSpringUpdateTossSimulation().
Definition at line 1235 of file tolbi_games.c.
scTolbiSpringSetSpriteStorageKind
static void scTolbiSpringSetSpriteStorageKind(Sint32 actorId, Sint32 storageKind)
Shows (ACTOR_SPRITE_ONE) or hides (ACTOR_SPRITE_NONE) an actor's sprite: the
glints trailing a token are shown as it is tossed and hidden once it comes to
rest.
References fdActorGet() and Sint32.
Referenced by scTolbiSpringRunToss() and scTolbiSpringUpdateTossSimulation().
Definition at line 1284 of file tolbi_games.c.
scTolbiSpringUpdateTossSimulation
static void scTolbiSpringUpdateTossSimulation(void)
Each tick of the spring game: the tossed token flies, lands, is drawn toward the centre by the rings and bounces off the basin's sloping sides; the crabs and turtles move and knock it away when it comes near; and the token, its shadow and its trail are drawn.
References fdActorGet(), fdActorSelectAnimation(), Obstacles, scTolbiSpringSetActorAppearance(), scTolbiSpringSetSpriteStorageKind(), Sint32, syCos(), sySin(), sySoundPlay(), sySquartIWRAM(), syVector3Coordinates(), TolbiSpringCrabColors, TolbiSpringTurtleColors, Toss, TossEnded, TossKind and TossResult.
Referenced by scTolbiSpringInitTossSimulation().
Definition at line 1317 of file tolbi_games.c.
Variables in detail
TolbiSpringEntrances
extern const SCENE_ENTRANCE TolbiSpringEntrances[]
const SCENE_ENTRANCE TolbiSpringEntrances[]
Referenced by scGetEntrances().
Definition at lines 55 and 2061 of file tolbi_games.c.
TolbiSpringExits
extern const Uint32 TolbiSpringExits[]
const Uint32 TolbiSpringExits[]
Referenced by scGetExits().
Definition at lines 56 and 2113 of file tolbi_games.c.
TolbiSpringActorPlacements
extern const ACTOR_PLACE TolbiSpringActorPlacements[]
const ACTOR_PLACE TolbiSpringActorPlacements[]
Referenced by scGetActorPlacements().
Definition at lines 57 and 2130 of file tolbi_games.c.
StuccoRoomsCActorPlacements
extern const ACTOR_PLACE StuccoRoomsCActorPlacements[]
const ACTOR_PLACE StuccoRoomsCActorPlacements[]
Referenced by scGetActorPlacements().
Definition at lines 58 and 2176 of file tolbi_games.c.
StuccoRoomsCCues
extern const CUE StuccoRoomsCCues[]
const CUE StuccoRoomsCCues[]
References scStuccoRoomsCAskAboutFirstDiceGame(), scStuccoRoomsCOfferLuckyDice(), scStuccoRoomsCReadLuckyWheelsPrizes(), scStuccoRoomsCReadLuckyWheelsRules() and scStuccoRoomsCTalkToWheelsAttendant().
Referenced by scGetCues().
Definition at lines 59 and 2202 of file tolbi_games.c.
TolbiSpringCues
extern const CUE TolbiSpringCues[]
const CUE TolbiSpringCues[]
References scTolbiSpringAskAboutLuckyMedal() and scTolbiSpringTossCoinOrMedal().
Referenced by scGetCues().
Definition at lines 60 and 2250 of file tolbi_games.c.
TolbiSpringAlphaSteps
extern const Uint16 TolbiSpringAlphaSteps[]
const Uint16 TolbiSpringAlphaSteps[]
The water's fade as the spring drains, from mostly water to none, one step every eighth tick.
Referenced by scTolbiSpringDrainSpring().
Definition at lines 61 and 2275 of file tolbi_games.c.
TolbiSpringPrizeItems
extern const Uint32 TolbiSpringPrizeItems[]
const Uint32 TolbiSpringPrizeItems[]
The prizes a Lucky Medal can win, SPRING_MEDAL_PRIZES_PER_RING to a ring, one drawn by its
weight.
Referenced by scTolbiSpringRunSpringGame().
Definition at lines 62 and 2282 of file tolbi_games.c.
TolbiSpringCoinPrizes
extern const Uint16 TolbiSpringCoinPrizes[]
const Uint16 TolbiSpringCoinPrizes[]
The coins a tossed coin wins, by the ring it rests in.
Definition at lines 63 and 2290 of file tolbi_games.c.
StuccoRoomsCLuckyWheelsPrizeItems
extern const Uint32 StuccoRoomsCLuckyWheelsPrizeItems[]
const Uint32 StuccoRoomsCLuckyWheelsPrizeItems[]
What Lucky Wheels wins, three items to each of its LUCKY_WHEELS_KINDS kinds.
Referenced by scStuccoRoomsCSelectLuckyWheelsPrize().
Definition at lines 64 and 2295 of file tolbi_games.c.
TolbiSpringCrabColors
extern const Uint8 TolbiSpringCrabColors[]
const Uint8 TolbiSpringCrabColors[]
The crabs' colours at each speed, and the turtles'.
Referenced by scTolbiSpringUpdateTossSimulation().
Definition at lines 65 and 2304 of file tolbi_games.c.
TolbiSpringTurtleColors
extern const Uint8 TolbiSpringTurtleColors[]
const Uint8 TolbiSpringTurtleColors[]
Referenced by scTolbiSpringUpdateTossSimulation().
Definition at lines 66 and 2307 of file tolbi_games.c.
TolbiSpringObstacleStartX
extern const Uint8 TolbiSpringObstacleStartX[]
const Uint8 TolbiSpringObstacleStartX[]
Where each obstacle starts, in pixels, and its heading.
Referenced by scTolbiSpringInitTossSimulation().
Definition at lines 67 and 2312 of file tolbi_games.c.
TolbiSpringObstacleStartZ
extern const Uint8 TolbiSpringObstacleStartZ[]
const Uint8 TolbiSpringObstacleStartZ[]
Referenced by scTolbiSpringInitTossSimulation().
Definition at lines 68 and 2315 of file tolbi_games.c.
TolbiSpringObstacleStartHeadings
extern const Uint16 TolbiSpringObstacleStartHeadings[]
const Uint16 TolbiSpringObstacleStartHeadings[]
Referenced by scTolbiSpringInitTossSimulation().
Definition at lines 69 and 2318 of file tolbi_games.c.
Toss
static SPRING_TOSS_MOTION Toss
The coin or Lucky Medal in flight.
Referenced by scTolbiSpringInitTossSimulation(), scTolbiSpringRunToss() and scTolbiSpringUpdateTossSimulation().
Definition at line 1296 of file tolbi_games.c.
TossKind
static Sint32 TossKind
What is tossed: a coin, or SPRING_TOSS_MEDAL for a Lucky Medal.
References Sint32.
Referenced by scTolbiSpringRunToss() and scTolbiSpringUpdateTossSimulation().
Definition at line 1299 of file tolbi_games.c.
TossUnused
static Sint32 TossUnused[3] UNUSED
Unused: three words nothing reads or writes.
References Sint32.
Definition at line 1302 of file tolbi_games.c.
Obstacles
static SPRING_OBSTACLE Obstacles[4]
The two crabs and two turtles moving in the spring.
Referenced by scTolbiSpringInitTossSimulation() and scTolbiSpringUpdateTossSimulation().
Definition at line 1305 of file tolbi_games.c.
TossTick
static Sint32 TossTick
The ticks since the toss, whether it has come to rest, and the ring it rests in.
References Sint32.
Referenced by scTolbiSpringRunToss().
Definition at line 1309 of file tolbi_games.c.
TossEnded
static Sint32 TossEnded
References Sint32.
Referenced by scTolbiSpringRunToss() and scTolbiSpringUpdateTossSimulation().
Definition at line 1310 of file tolbi_games.c.
TossResult
static Sint32 TossResult
References Sint32.
Referenced by scTolbiSpringRunToss() and scTolbiSpringUpdateTossSimulation().
Definition at line 1311 of file tolbi_games.c.