Alchemy
Loading...
Searching...
No Matches

tolbi_spring.c File Reference

Tolbi's spring and the game rooms beside it: Lucky Medals or coins tossed into the spring win prizes, and the attendants run Lucky Dice and Lucky Wheels. More...

Go to the source code of this file.

Data Structures

struct  SpringTossMotion
 The tossed coin or medal: its last four positions for the trail, its velocity and the frames the prize rings still pull it. More...
struct  SpringObstacle
 One of the four obstacles moving in the spring during a toss. More...
struct  Half
 A halfword holding the zero the gauge's slide and phase are cleared with. More...

Macros

#define SPRING_CENTER_X   PIXELS(120)
#define SPRING_CENTER_Z   PIXELS(71)
#define ASK_WIDTH   17
#define NUMBER_X   72
#define TOSS_X   20
#define TOSS_WIDTH   9

Enumerations

enum  SpringTossKind { SPRING_TOSS_COIN , SPRING_TOSS_MEDAL }
enum  TolbiSpringGameRoomActor {
  TOLBI_SPRING_WHEELS_ATTENDANT = 8 , TOLBI_SPRING_DICE_ATTENDANT = 9 , TOLBI_SPRING_WHEELS_PRIZE_SIGN = 14 , TOLBI_SPRING_WHEELS_RULES_SIGN = 15 ,
  TOLBI_SPRING_SOLDIER = 17
}
 The game room's actors, numbered in the order of its placement table from 8. More...
enum  TolbiSpringActor { TOLBI_SPRING_MEDAL_SEEKER = 27 , TOLBI_SPRING_SPRING = 80 }
 The spring's own actors, numbered the same way. More...

Functions

static void TolbiSpring_RiseAndFadeIn (void)
 Raises the spring's displayed layer and blends it into view.
static void TolbiSpring_OfferLuckyWheels (s32 spoken)
 Checks tickets and inventory space before sending the party to Lucky Wheels.
static s32 TolbiSpring_RunSpringGame (void)
 Chooses a coin or medal, runs its toss, and awards the resulting prize.
static s32 TolbiSpring_SelectLuckyWheelsPrize (s32 category)
 Chooses an item variant in the prize category, avoiding its last variant.
static void TolbiSpring_InitializeTossSimulation (void)
 Resets four obstacles and schedules the spring simulation.
static s32 TolbiSpring_RunToss (s32 tossKind)
 Launches the chosen coin or medal and waits for its final prize ring.
static __inline__ void Io_SetBlendControl (s32 value)
static __inline__ void Io_SetBlendAlpha (s32 value)
const struct SceneEntrance * TolbiSpring_GetEntrances (void)
const struct SceneRegion * TolbiSpring_GetRegions (void)
const u32 * TolbiSpring_GetExits (void)
const struct ScenePlacement * TolbiSpring_GetPlacements (void)
 Selects the actors for the spring or its nearby games.
static void TolbiSpring_AskAboutLuckyMedal (s32 actorId)
 Asks whether the party has a Lucky Medal.
static void TolbiSpring_AskAboutFirstDiceGame (s32 actorId)
 Asks whether this is the party's first Lucky Dice game.
static void TolbiSpring_TossCoinOrMedal (void)
 Reveals the spring once, then positions the leader to toss into it.
static void TolbiSpring_ReadLuckyWheelsRules (void)
 Reads the Lucky Wheels rules sign.
static void TolbiSpring_ReadLuckyWheelsPrizes (void)
 Reads the Lucky Wheels prize sign.
static void TolbiSpring_TalkToWheelsAttendant (void)
const struct SceneEvent * TolbiSpring_GetEvents (void)
 Selects interactions for the spring or the game attendants.
s32 TolbiSpring_Initialize (void)
 Prepares the spring or settles rewards from the nearby games.
static void TolbiSpring_ShowPrizeFrame (s32 sourceColumn, s32 sourceRow)
 Displays one frame of the spring's opening or closing prize animation.
static void TolbiSpring_RevealPrize (s32 item)
 Animates the spring's prize reveal, gives the item, and closes it.
static void TolbiSpring_OfferLuckyDice (void)
 Offers Lucky Dice and saves the coin total for the return visit.
static void TolbiSpring_SetActorAppearance (s32 actorId, const s32 *coordinate, s32 facing, s32 colorVariant, s32 childValue)
 Copies three coordinates and sets the actor's facing, child value and colors.
static void TolbiSpring_SetSpriteStorageKind (s32 actorId, s32 storageKind)
 Sets whether the specified actor draws its sprite.
static void TolbiSpring_UpdateTossSimulation (void)
 Advances the toss, obstacles, collisions and displayed trail each frame.

Variables

static struct SpringTossMotion sToss
static s32 sTossKind
static s32 sTossUnknown[3] UNUSED
 Unreferenced toss storage; removing it shifts the obstacle state.
static struct SpringObstacle sObstacles [4]
static s32 sTossFrame
static s32 sTossEnded
static s32 sTossResult
const struct SceneEntrance gTolbiSpring_Entrances []
const u32 gTolbiSpring_Exits []
const struct ScenePlacement gTolbiSpringPlacements2 []
const struct ScenePlacement gTolbiSpringPlacementsOther []
const struct SceneEvent gTolbiSpringEventsOther []
const struct SceneEvent gTolbiSpringEvents2 []
const u16 gTolbiSpring_AlphaSteps []
 BLDALPHA steps.
const u32 gTolbiSpring_PrizeItems []
const u16 gTolbiSpring_CoinPrizes []
const u32 gTolbiSpring_LuckyWheelsPrizeItems []
const u8 gTolbiSpring_SliderFrames []
const u8 gTolbiSpring_CircleFrames []
const u8 gTolbiSpring_ActorPixelX []
const u8 gTolbiSpring_ActorPixelZ []
const u16 gTolbiSpring_ActorHeadings []

Detailed Description

Tolbi's spring and the game rooms beside it: Lucky Medals or coins tossed into the spring win prizes, and the attendants run Lucky Dice and Lucky Wheels.

Definition in file tolbi_spring.c.

Macro Definition Documentation

◆ SPRING_CENTER_X

#define SPRING_CENTER_X   PIXELS(120)

Definition at line 76 of file tolbi_spring.c.

Referenced by TolbiSpring_UpdateTossSimulation().

◆ SPRING_CENTER_Z

#define SPRING_CENTER_Z   PIXELS(71)

Definition at line 77 of file tolbi_spring.c.

Referenced by TolbiSpring_UpdateTossSimulation().

◆ ASK_WIDTH

#define ASK_WIDTH   17

Definition at line 467 of file tolbi_spring.c.

Referenced by TolbiSpring_RunSpringGame().

◆ NUMBER_X

#define NUMBER_X   72

Definition at line 476 of file tolbi_spring.c.

Referenced by TolbiSpring_RunSpringGame().

◆ TOSS_X

#define TOSS_X   20

Definition at line 477 of file tolbi_spring.c.

Referenced by TolbiSpring_RunSpringGame().

◆ TOSS_WIDTH

#define TOSS_WIDTH   9

Definition at line 478 of file tolbi_spring.c.

Referenced by TolbiSpring_RunSpringGame().

Enumeration Type Documentation

◆ SpringTossKind

Enumerator
SPRING_TOSS_COIN 
SPRING_TOSS_MEDAL 

Definition at line 55 of file tolbi_spring.c.

◆ TolbiSpringGameRoomActor

The game room's actors, numbered in the order of its placement table from 8.

Enumerator
TOLBI_SPRING_WHEELS_ATTENDANT 
TOLBI_SPRING_DICE_ATTENDANT 
TOLBI_SPRING_WHEELS_PRIZE_SIGN 
TOLBI_SPRING_WHEELS_RULES_SIGN 
TOLBI_SPRING_SOLDIER 

A soldier, gone after Colosso. "poor soldiers like us".

Definition at line 58 of file tolbi_spring.c.

◆ TolbiSpringActor

The spring's own actors, numbered the same way.

Enumerator
TOLBI_SPRING_MEDAL_SEEKER 

Asks for a medal. "Do you have a Lucky Medal?".

TOLBI_SPRING_SPRING 

searched to toss a coin or medal

Definition at line 68 of file tolbi_spring.c.

Function Documentation

◆ TolbiSpring_RiseAndFadeIn()

void TolbiSpring_RiseAndFadeIn ( void )
static

Raises the spring's displayed layer and blends it into view.

Definition at line 358 of file tolbi_spring.c.

Referenced by TolbiSpring_RiseAndFadeIn(), and TolbiSpring_TossCoinOrMedal().

◆ TolbiSpring_OfferLuckyWheels()

void TolbiSpring_OfferLuckyWheels ( s32 spoken)
static

Checks tickets and inventory space before sending the party to Lucky Wheels.

Definition at line 379 of file tolbi_spring.c.

Referenced by TolbiSpring_Initialize(), TolbiSpring_OfferLuckyWheels(), and TolbiSpring_TalkToWheelsAttendant().

◆ TolbiSpring_RunSpringGame()

s32 TolbiSpring_RunSpringGame ( void )
static

Chooses a coin or medal, runs its toss, and awards the resulting prize.

Definition at line 486 of file tolbi_spring.c.

Referenced by TolbiSpring_RunSpringGame(), and TolbiSpring_TossCoinOrMedal().

◆ TolbiSpring_SelectLuckyWheelsPrize()

s32 TolbiSpring_SelectLuckyWheelsPrize ( s32 category)
static

Chooses an item variant in the prize category, avoiding its last variant.

Definition at line 754 of file tolbi_spring.c.

Referenced by TolbiSpring_Initialize(), and TolbiSpring_SelectLuckyWheelsPrize().

◆ TolbiSpring_InitializeTossSimulation()

void TolbiSpring_InitializeTossSimulation ( void )
static

Resets four obstacles and schedules the spring simulation.

Definition at line 1252 of file tolbi_spring.c.

Referenced by TolbiSpring_Initialize(), and TolbiSpring_InitializeTossSimulation().

◆ TolbiSpring_RunToss()

s32 TolbiSpring_RunToss ( s32 tossKind)
static

Launches the chosen coin or medal and waits for its final prize ring.

Definition at line 1302 of file tolbi_spring.c.

Referenced by TolbiSpring_RunSpringGame(), and TolbiSpring_RunToss().

◆ Io_SetBlendControl()

__inline__ void Io_SetBlendControl ( s32 value)
static

Definition at line 101 of file tolbi_spring.c.

Referenced by Io_SetBlendControl(), and TolbiSpring_Initialize().

◆ Io_SetBlendAlpha()

__inline__ void Io_SetBlendAlpha ( s32 value)
static

Definition at line 103 of file tolbi_spring.c.

Referenced by Io_SetBlendAlpha(), and TolbiSpring_Initialize().

◆ TolbiSpring_GetEntrances()

const struct SceneEntrance * TolbiSpring_GetEntrances ( void )

Definition at line 105 of file tolbi_spring.c.

Referenced by TolbiSpring_GetEntrances().

◆ TolbiSpring_GetRegions()

const struct SceneRegion * TolbiSpring_GetRegions ( void )

Definition at line 109 of file tolbi_spring.c.

Referenced by TolbiSpring_GetRegions().

◆ TolbiSpring_GetExits()

const u32 * TolbiSpring_GetExits ( void )

Definition at line 111 of file tolbi_spring.c.

Referenced by TolbiSpring_GetExits().

◆ TolbiSpring_GetPlacements()

const struct ScenePlacement * TolbiSpring_GetPlacements ( void )

Selects the actors for the spring or its nearby games.

Definition at line 114 of file tolbi_spring.c.

Referenced by TolbiSpring_GetPlacements().

◆ TolbiSpring_AskAboutLuckyMedal()

void TolbiSpring_AskAboutLuckyMedal ( s32 actorId)
static

Asks whether the party has a Lucky Medal.

Definition at line 122 of file tolbi_spring.c.

Referenced by TolbiSpring_AskAboutLuckyMedal().

◆ TolbiSpring_AskAboutFirstDiceGame()

void TolbiSpring_AskAboutFirstDiceGame ( s32 actorId)
static

Asks whether this is the party's first Lucky Dice game.

Definition at line 136 of file tolbi_spring.c.

Referenced by TolbiSpring_AskAboutFirstDiceGame().

◆ TolbiSpring_TossCoinOrMedal()

void TolbiSpring_TossCoinOrMedal ( void )
static

Reveals the spring once, then positions the leader to toss into it.

Definition at line 150 of file tolbi_spring.c.

Referenced by TolbiSpring_TossCoinOrMedal().

◆ TolbiSpring_ReadLuckyWheelsRules()

void TolbiSpring_ReadLuckyWheelsRules ( void )
static

Reads the Lucky Wheels rules sign.

Definition at line 165 of file tolbi_spring.c.

Referenced by TolbiSpring_ReadLuckyWheelsRules().

◆ TolbiSpring_ReadLuckyWheelsPrizes()

void TolbiSpring_ReadLuckyWheelsPrizes ( void )
static

Reads the Lucky Wheels prize sign.

Definition at line 173 of file tolbi_spring.c.

Referenced by TolbiSpring_ReadLuckyWheelsPrizes().

◆ TolbiSpring_TalkToWheelsAttendant()

void TolbiSpring_TalkToWheelsAttendant ( void )
static

Definition at line 180 of file tolbi_spring.c.

Referenced by TolbiSpring_TalkToWheelsAttendant().

◆ TolbiSpring_GetEvents()

const struct SceneEvent * TolbiSpring_GetEvents ( void )

Selects interactions for the spring or the game attendants.

Definition at line 185 of file tolbi_spring.c.

Referenced by TolbiSpring_GetEvents().

◆ TolbiSpring_Initialize()

s32 TolbiSpring_Initialize ( void )

Prepares the spring or settles rewards from the nearby games.

Definition at line 193 of file tolbi_spring.c.

Referenced by TolbiSpring_Initialize().

◆ TolbiSpring_ShowPrizeFrame()

void TolbiSpring_ShowPrizeFrame ( s32 sourceColumn,
s32 sourceRow )
inlinestatic

Displays one frame of the spring's opening or closing prize animation.

Definition at line 300 of file tolbi_spring.c.

Referenced by TolbiSpring_RevealPrize(), and TolbiSpring_ShowPrizeFrame().

◆ TolbiSpring_RevealPrize()

void TolbiSpring_RevealPrize ( s32 item)
static

Animates the spring's prize reveal, gives the item, and closes it.

Definition at line 307 of file tolbi_spring.c.

Referenced by TolbiSpring_RevealPrize(), and TolbiSpring_RunSpringGame().

◆ TolbiSpring_OfferLuckyDice()

void TolbiSpring_OfferLuckyDice ( void )
static

Offers Lucky Dice and saves the coin total for the return visit.

Definition at line 434 of file tolbi_spring.c.

Referenced by TolbiSpring_OfferLuckyDice().

◆ TolbiSpring_SetActorAppearance()

void TolbiSpring_SetActorAppearance ( s32 actorId,
const s32 * coordinate,
s32 facing,
s32 colorVariant,
s32 childValue )
static

Copies three coordinates and sets the actor's facing, child value and colors.

Definition at line 779 of file tolbi_spring.c.

Referenced by TolbiSpring_SetActorAppearance(), and TolbiSpring_UpdateTossSimulation().

◆ TolbiSpring_SetSpriteStorageKind()

void TolbiSpring_SetSpriteStorageKind ( s32 actorId,
s32 storageKind )
static

Sets whether the specified actor draws its sprite.

Definition at line 825 of file tolbi_spring.c.

Referenced by TolbiSpring_RunToss(), TolbiSpring_SetSpriteStorageKind(), and TolbiSpring_UpdateTossSimulation().

◆ TolbiSpring_UpdateTossSimulation()

void TolbiSpring_UpdateTossSimulation ( void )
static

Advances the toss, obstacles, collisions and displayed trail each frame.

Definition at line 849 of file tolbi_spring.c.

Referenced by TolbiSpring_InitializeTossSimulation(), and TolbiSpring_UpdateTossSimulation().

Variable Documentation

◆ sToss

◆ sTossKind

s32 sTossKind
static

Definition at line 837 of file tolbi_spring.c.

Referenced by TolbiSpring_RunToss(), and TolbiSpring_UpdateTossSimulation().

◆ UNUSED

s32 sTossUnknown [3] UNUSED
static

Unreferenced toss storage; removing it shifts the obstacle state.

Definition at line 840 of file tolbi_spring.c.

◆ sObstacles

struct SpringObstacle sObstacles[4]
static

◆ sTossFrame

s32 sTossFrame
static

Definition at line 844 of file tolbi_spring.c.

Referenced by TolbiSpring_RunToss().

◆ sTossEnded

s32 sTossEnded
static

Definition at line 845 of file tolbi_spring.c.

Referenced by TolbiSpring_RunToss(), and TolbiSpring_UpdateTossSimulation().

◆ sTossResult

s32 sTossResult
static

Definition at line 846 of file tolbi_spring.c.

Referenced by TolbiSpring_RunToss(), and TolbiSpring_UpdateTossSimulation().

◆ gTolbiSpring_Entrances

const struct SceneEntrance gTolbiSpring_Entrances[]
Initial value:
= {
{0, CONDITION_ALWAYS, 120, 0, 152, FACING_SOUTH, 0, -1, -1, -1, -1, 0},
{1, CONDITION_ALWAYS, 120, 0, 168, FACING_NORTH, 0, -1, -1, -1, -1, 0},
{2, CONDITION_ALWAYS, 120, 0, 152, FACING_SOUTH, 0, -1, -1, -1, -1, 0},
{10, CONDITION_ALWAYS, 128, 0, 176, FACING_NORTH, 0, 8, 8, 248, 200, 0},
{11, CONDITION_ALWAYS, 96, 0, 440, FACING_NORTH, 0, 8, 288, 248, 456, 0},
{12, CONDITION_ALWAYS, 144, 0, 390, FACING_NORTH, 0, 8, 288, 248, 456, 0},
{13, CONDITION_ALWAYS, 120, 0, 152, FACING_WEST, 0, 8, 8, 248, 200, 0},
}
@ SCENE_TABLE_END
Definition field_scene.h:43
@ CONDITION_ALWAYS
Definition field_scene.h:44
@ FACING_NORTH
Definition field_scene.h:32
@ FACING_SOUTH
Definition field_scene.h:28
@ FACING_WEST
Definition field_scene.h:30

Definition at line 1350 of file tolbi_spring.c.

Referenced by TolbiSpring_GetEntrances().

◆ gTolbiSpring_Exits

const u32 gTolbiSpring_Exits[]
Initial value:
= {
SCENE_EXIT_IF(1, 135, 20, 0xffffffff),
SCENE_EXIT(0, 137, 0),
SCENE_EXIT_IF(1, 135, 13, 0xffffffff),
SCENE_EXIT_IF(2, 135, 5, 0xffffffff),
}
#define SCENE_EXITS(scene)
Definition field_scene.h:72
#define SCENE_EXIT(exit, scene, entrance)
Definition field_scene.h:73
#define SCENE_EXITS_END
Definition field_scene.h:77
#define SCENE_EXIT_IF(exit, scene, entrance, flag)
Definition field_scene.h:75

Definition at line 1361 of file tolbi_spring.c.

Referenced by TolbiSpring_GetExits().

◆ gTolbiSpringPlacements2

const struct ScenePlacement gTolbiSpringPlacements2[]

Definition at line 1371 of file tolbi_spring.c.

Referenced by TolbiSpring_GetPlacements().

◆ gTolbiSpringPlacementsOther

const struct ScenePlacement gTolbiSpringPlacementsOther[]
Initial value:
= {
{ 0x16, CONDITION_ALWAYS, 7,
{ 0x16, CONDITION_ALWAYS, 7,
{ 0x16, CONDITION_ALWAYS, 7,
{ 0x16, CONDITION_ALWAYS, 7,
}
@ FACING_STEP
Definition field_scene.h:36
@ TALK_FACE_PARTY_AND_BACK
@ ACTOR_STAND
@ FACING_EAST
Definition field_scene.h:26
@ FACING_SOUTHWEST
Definition field_scene.h:29
@ FACING_NORTHWEST
Definition field_scene.h:31
#define PIXELS(value)

Definition at line 1417 of file tolbi_spring.c.

Referenced by TolbiSpring_GetPlacements().

◆ gTolbiSpringEventsOther

const struct SceneEvent gTolbiSpringEventsOther[]
Initial value:
= {
{ PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), TOLBI_SPRING_WHEELS_ATTENDANT, CONDITION_ALWAYS, MSGNO(MsgTolbiSpringHmmIWonderIfTheseKids) },
{ EVENT_TALK, 10, CONDITION_ALWAYS, MSGNO(MsgTolbiSpringReadTheSignIfYaDont) },
{ EVENT_TALK, 12, CONDITION_ALWAYS, MSGNO(MsgTolbiSpringWhoaGettingTripleDigitsIsReal) },
{ EVENT_TALK, 13, CONDITION_ALWAYS, MSGNO(MsgTolbiSpringIDontWantToStopPlaying) },
{ PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), TOLBI_SPRING_DICE_ATTENDANT, CONDITION_ALWAYS, MSGNO(MsgTolbiSpringWinningOrLosingIsPureLuck) },
{ PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 10, CONDITION_ALWAYS, MSGNO(MsgTolbiSpringTheRulesForLuckyDiceAint) },
{ PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 11, CONDITION_ALWAYS, MSGNO(MsgTolbiSpringSometimesPeopleWhoHaveNeverPlayed) },
{ PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 12, CONDITION_ALWAYS, MSGNO(MsgTolbiSpringThinkingWontHelpYouWinThis) },
{ PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 13, CONDITION_ALWAYS, MSGNO(MsgTolbiSpringMyLuckHasRunOutFor) },
{ EVENT_TALK, 16, CONDITION_ALWAYS, MSGNO(MsgTolbiSpringLuckyDiceThrowTheDiceOn) },
{ EVENT_TALK, 18, CONDITION_ALWAYS, MSGNO(MsgTolbiSpringLuckyDiceIfTwoNumbersMatch) },
{ EVENT_TALK, TOLBI_SPRING_SOLDIER, FLAG_BABI_SAVED, MSGNO(MsgTolbiSpringYeahThatDiceGameLooksKinda) },
{ PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), TOLBI_SPRING_SOLDIER, FLAG_BABI_SAVED, MSGNO(MsgTolbiSpringILikePlayingLuckyDiceBut) },
{ EVENT_TALK, TOLBI_SPRING_SOLDIER, CONDITION_ALWAYS, MSGNO(MsgTolbiSpringOhThereAreAlwaysScalpersAt) },
{ PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), TOLBI_SPRING_SOLDIER, CONDITION_ALWAYS, MSGNO(MsgTolbiSpringTheresNoWayPoorSoldiersLike) },
}
@ ABILITY_MIND_READ
Definition ability_ids.h:16
#define SCENE_EVENTS_END
@ EVENT_EXIT
@ EVENT_TALK
#define PSYNERGY_ON_ACTOR(ability)
#define EVENT_SCRIPT(script)
#define FLAG_BABI_SAVED
The party has saved Babi in Altmiller Cave with his Mystic Draught; Tolbi then holds the Colosso fina...
Definition flags.h:170
@ TOLBI_SPRING_SOLDIER
A soldier, gone after Colosso. "poor soldiers like us".
@ TOLBI_SPRING_DICE_ATTENDANT
@ TOLBI_SPRING_WHEELS_PRIZE_SIGN
@ TOLBI_SPRING_WHEELS_RULES_SIGN
@ TOLBI_SPRING_WHEELS_ATTENDANT
static void TolbiSpring_ReadLuckyWheelsPrizes(void)
Reads the Lucky Wheels prize sign.
static void TolbiSpring_AskAboutFirstDiceGame(s32 actorId)
Asks whether this is the party's first Lucky Dice game.
static void TolbiSpring_TalkToWheelsAttendant(void)
static void TolbiSpring_ReadLuckyWheelsRules(void)
Reads the Lucky Wheels rules sign.
static void TolbiSpring_OfferLuckyDice(void)
Offers Lucky Dice and saves the coin total for the return visit.

Definition at line 1443 of file tolbi_spring.c.

Referenced by TolbiSpring_GetEvents().

◆ gTolbiSpringEvents2

const struct SceneEvent gTolbiSpringEvents2[]
Initial value:
= {
{ EVENT_TALK, 22, CONDITION_ALWAYS, MSGNO(MsgTolbiTossLuckyMedal) },
{ EVENT_TALK, 23, CONDITION_ALWAYS, MSGNO(MsgTolbiFaceAwayTolbi) },
{ EVENT_TALK, 26, CONDITION_ALWAYS, MSGNO(MsgTolbiSpringTolbiSpringHasMysteriousPowersStand) },
{ EVENT_TALK, 28, CONDITION_ALWAYS, MSGNO(MsgTolbiSpringTooBadIOnlyHaveOne) },
{ PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 26, CONDITION_ALWAYS, MSGNO(MsgTolbiSpringIGetNervousWhenIToss) },
{ PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), TOLBI_SPRING_MEDAL_SEEKER, CONDITION_ALWAYS, MSGNO(MsgTolbiSpringWhyWontAnyoneGiveMeA) },
{ PSYNERGY_ON_ACTOR(ABILITY_MIND_READ), 28, CONDITION_ALWAYS, MSGNO(MsgTolbiSpringThisIsALuckyMedalSo) },
}
#define SEARCH(target)
@ SEARCH_UNNAMED
@ TOLBI_SPRING_MEDAL_SEEKER
Asks for a medal. "Do you have a Lucky Medal?".
@ TOLBI_SPRING_SPRING
searched to toss a coin or medal
static void TolbiSpring_AskAboutLuckyMedal(s32 actorId)
Asks whether the party has a Lucky Medal.
static void TolbiSpring_TossCoinOrMedal(void)
Reveals the spring once, then positions the leader to toss into it.

Definition at line 1469 of file tolbi_spring.c.

Referenced by TolbiSpring_GetEvents().

◆ gTolbiSpring_AlphaSteps

const u16 gTolbiSpring_AlphaSteps[]
Initial value:
= {
0x90a, 0xa08, 0xb06, 0xc04, 0xd03, 0xe02, 0xf01, 0x1000,
}

BLDALPHA steps.

Definition at line 1485 of file tolbi_spring.c.

Referenced by TolbiSpring_RiseAndFadeIn().

◆ gTolbiSpring_PrizeItems

const u32 gTolbiSpring_PrizeItems[]
Initial value:
= {
23, 124, 81, 152, 37, 108, 171, 142,
48, 160, 133, 97, 183, 186, 189,
}

Definition at line 1489 of file tolbi_spring.c.

Referenced by TolbiSpring_RunSpringGame().

◆ gTolbiSpring_CoinPrizes

const u16 gTolbiSpring_CoinPrizes[]
Initial value:
= {
20, 10, 2, 1, 0, 0,
}

Definition at line 1494 of file tolbi_spring.c.

Referenced by TolbiSpring_RunSpringGame().

◆ gTolbiSpring_LuckyWheelsPrizeItems

const u32 gTolbiSpring_LuckyWheelsPrizeItems[]
Initial value:
= {
250, 251, 252, 256, 257, 258, 262, 263,
264, 183, 182, 181, 189, 186, 188,
}

Definition at line 1498 of file tolbi_spring.c.

Referenced by TolbiSpring_SelectLuckyWheelsPrize().

◆ gTolbiSpring_SliderFrames

const u8 gTolbiSpring_SliderFrames[]
Initial value:
= {
0, 1, 9,
}

Definition at line 1503 of file tolbi_spring.c.

Referenced by TolbiSpring_UpdateTossSimulation().

◆ gTolbiSpring_CircleFrames

const u8 gTolbiSpring_CircleFrames[]
Initial value:
= {
0, 3, 4,
}

Definition at line 1507 of file tolbi_spring.c.

Referenced by TolbiSpring_UpdateTossSimulation().

◆ gTolbiSpring_ActorPixelX

const u8 gTolbiSpring_ActorPixelX[]
Initial value:
= {
80, 160, 80, 72,
}

Definition at line 1511 of file tolbi_spring.c.

Referenced by TolbiSpring_InitializeTossSimulation().

◆ gTolbiSpring_ActorPixelZ

const u8 gTolbiSpring_ActorPixelZ[]
Initial value:
= {
32, 104, 68, 72,
}

Definition at line 1515 of file tolbi_spring.c.

Referenced by TolbiSpring_InitializeTossSimulation().

◆ gTolbiSpring_ActorHeadings

const u16 gTolbiSpring_ActorHeadings[]
Initial value:

Definition at line 1519 of file tolbi_spring.c.

Referenced by TolbiSpring_InitializeTossSimulation().