17#include "text/msg_ids.h"
27#define COLOSSO_CHEER_COLUMN 0x370
28#define COLOSSO_CHEER_ROW 0x378
29#define COLOSSO_CHEER_SLOT(character) ((character) << 4)
34#define COLOSSO_STAGE_CHEERED 0x200
35#define COLOSSO_STAGE_DESCRIBED 0x208
96 v = (unit->
hp << 14) / unit->
maxHp;
104 if ((
u16)t == 0 && unit->
hp != 0) {
107 v = (unit->
pp << 14) / unit->
maxPp;
115 if ((
u16)t == 0 && unit->
pp != 0) {
145 s32 nearestDistance = 0x100000;
154 for (actorId = 8; actorId <= 66; actorId++) {
158 actor->sprite->entries[0]->animId == 165) {
162 if (distanceZ <= 0) {
163 s32 horizontalDistance = distanceX;
166 if (horizontalDistance < 0)
167 horizontalDistance = -horizontalDistance;
169 distanceZ = -distanceZ;
170 distance = horizontalDistance + distanceZ;
171 if (distance < nearestDistance) {
173 nearestDistance = distance;
180 transition = &
work->startTransition;
182 work->transitionFrames = 15;
189 supporter->
x.
fixed >> 20);
196 if (supporterId >
MIA) {
227 msg = MsgColossoCheering;
237 work->transitionFrames = 15;
252 work->startTransition = 0;
279 InitializeActorZero();
280 InitializeSelectedActor(actorId);
324 message = MsgColossoStageFirstFinalsMatch;
326 message = MsgColossoStageSecondFinalsMatch;
328 message = MsgColossoStageThirdFinalsMatch;
340 if (choice == 2 || choice == -1) {
361 message = MsgColossoStageFirstFinalsMatch;
363 message = MsgColossoStageSecondFinalsMatch;
365 message = MsgColossoStageThirdFinalsMatch;
396 guideX = actor->
x.
part.pixel;
397 guideZ = actor->
z.
part.pixel;
400 for (i = 0; i < memberCount; i++) {
403 if (memberCount <= 1) {
422 if (answer < memberCount) {
423 for (i = 0; i < memberCount; i++) {
427 for (i = 0; i < memberCount; i++) {
428 if ((
s8)members[i] != 0) {
433 for (i = 0; i < memberCount; i++) {
436 for (i = 0; i < memberCount; i++) {
439 if (friendId != -1) {
458 frontZ = guideZ + 16;
460 besideX = guideX + 16;
464 behindZ = frontZ - 32;
478 column = actor->
x.
fixed >> 20;
481 row = actor->
z.
fixed >> 20;
485#undef COLOSSO_CHEER_COLUMN
486#undef COLOSSO_CHEER_ROW
487#undef COLOSSO_CHEER_SLOT
488#undef COLOSSO_STAGE_CHEERED
489#undef COLOSSO_STAGE_DESCRIBED
void Object_LinkObjectAndSetCallback(u32 objectId, u32 linkedObjectId)
Makes an actor follow another (the linked action script): writes its linkedObject.
struct FieldActor * Object_GetById(s32 actor)
Returns an actor, or NULL if it does not exist.
Animated sprites: their layers, frames and colour modes, and the resource slots they draw from.
BattleUnit, a party member's or enemy's battle state, with the elements, abilities and actions it use...
The engine calls the debug menus import, and their palette swatch tiles.
The engine call layer: one typed inline for each of the thirteen main-image routines below that the s...
static s32 FieldGameFlag_GetByte(s32 flag)
static void FieldGameFlag_SetByte(s32 flag, s32 value)
void Engine_EventClearInvalidPackedValues(void)
The scene script layer: the engine services a scene's events call, declared once (Engine_EventBegin,...
static s32 Event_OpenMessage(s32 speaker, s32 flags)
static void Actor_FaceDirection(s32 actor, s32 facing, s32 frames)
void Engine_ActorSetAnimationAndWait(s32 actor, s32 animation)
s32 Engine_EventChooseYesNo(s32 actor, s32 flags)
static void Actor_WalkToAndWait(s32 actor, s32 x, s32 z)
void Engine_EventCloseScreen(void)
void Engine_ActorWalkToAndWait(s32 actor, s32 x, s32 z)
void Engine_EventWaitForScreen(void)
s32 Engine_EventAskYesNo(s32 speaker, s32 flags)
void Engine_EventOpenScreen(void)
s32 Engine_EventOpenMessage(s32 speaker, s32 flags)
void Engine_GameFlagSet(s32 flag)
void Engine_CameraFollowActor(s32 actor, s32 keep_position)
void Engine_ActorWalkTo(s32 actor, s32 x, s32 z)
static void Event_ShowMessage(s32 speaker, s32 flags)
s32 Engine_GameFlagIsSet(s32 flag)
static void Actor_SetSpeed(s32 actor, s32 speed, s32 acceleration)
static void Actor_SetPosition(s32 actor, s32 fixed_x, s32 fixed_z)
void Engine_ActorFaceEachOther(s32 actor, s32 other, s32 frames)
void Engine_EventWait(s32 frames)
Field objects and actors, and the scene transition styles.
#define SCENE_TRANSITION(style, variant)
#define FLAG_KEEP_MUSIC
The next scene keeps the music that is playing; scene.c clears FLAG_KEEP_MUSIC as it does,...
GameState, the game's state: play time, coins, the scene and the leader's position,...
struct GameState gGameState
The screen blend's globals and the graphics routines.
s32 GetPartyMemberCount(void)
s32 PartyTalkMenu_Choose(s32 unused)
The Colosso choice of what to do: "Descriptions", "Cheer" or "Nothing", chosen with a pointing hand.
The reel game's title lettering.
void Battle_ResetEffectCounter(void)
Clears the field's busy flag and, while Reveal is active, ends it: Reveal used with ACT_PACKED runs i...
s32 Party_RemoveActiveOwner(s32 owner)
Takes character owner out of the party: clears its game flag and closes the gap it leaves in gGameSta...
s32 Party_AddActiveOwner(s32 owner)
Adds character owner to the end of the party: sets its game flag and appends it to gGameState....
char SceneId_ColossoRiver
void Engine_ActorSetAnimation()
struct EventWork * gEventWork
void Engine_EventRequestExit()
void Engine_ActorSetPosition(u32 actor, s32 x, s32 z)
void Engine_EventEnd(void)
void Engine_EventBegin(void)
void Engine_EventSetMessage()
void Engine_EventShowMessage()
#define COLOSSO_CHEER_COLUMN
#define COLOSSO_CHEER_ROW
void Colosso_OfferCheeringSpot(s32 mode, s32 guide, s32 stage)
The guide at a stage, with the mode Colosso_GreetAtStage returned: offer a friend's cheering at the s...
#define COLOSSO_STAGE_DESCRIBED
#define COLOSSO_CHEER_SLOT(character)
void Colosso_RepeatStageNumber(s32 speaker, s32 competitor)
A stage's guide, after describing the stage, names it again: the copy of that line after it in the te...
void Colosso_AskDoneCheering(s32 id)
A stage's guide, talking to a friend who looks around alone, asks whether they are done cheering.
static void Colosso_TakePlaceForMatch(void)
Raised event 99: the nearest actor with animation 165 level with or below the friend on the map calls...
void Colosso_PlaceFriendsAtCheeringSpots(void)
Puts Garet, Ivan and Mia back at the cells where they chose to cheer, at the centre of each cell.
void Colosso_ClearCheeringSpots(void)
Forgets where Garet, Ivan and Mia cheer from.
s32 Colosso_GreetAtStage(s32 speaker, s32 competitor)
A stage's guide names the stage and decides what to do next.
void Colosso_ControlCharacterAlone(s32 id)
Makes the character the party's only member, the one the player moves and the camera follows,...
void Colosso_RaiseTakePlaceOnPsynergy(void)
A scene callback while a friend looks around the course alone (entrance 2): when the Psynergy request...
#define COLOSSO_STAGE_CHEERED
Scene flags, by stage number: a friend cheers at the stage, and its description was heard.
static void Colosso_AskReadyToRace(s32 actorId)
The guide at the course's start.
A unit in battle: a party member's or an enemy's stats, Psynergy, items, Djinn and ailments.
s16 maxPp
0 to 1999 for a character, 9999 for an enemy (UnitCalc)
s16 hpGauge
hp / maxHp in 0..0x4000; 1 while any HP remains
s8 poison
1 poisoned, 2 deadly poison
s16 hp
current HP, 0 when downed
s16 ppGauge
pp / maxPp in 0..0x4000; 1 while any PP remains
s16 maxHp
0 to 1999 for a character, 9999 for an enemy (UnitCalc)
The running scene's event work: its placement and event tables, its actors, the triggers and exit it ...
s16 raisedTrigger
a raised event for Scene_RunRaisedEvent
u16 unkcc4
FieldWork's nameWidth; Colosso sets it to 4.
u16 choiceMessage
Message containing the choices.
s16 psynergyRequest
a field Psynergy to use, as owner << 10 | Psynergy
A field actor: a person or thing on the field with a position, motion toward a target,...
union FieldCoordinate x
16.16 fixed-point pixels
u8 spriteStorageKind
Zero hides sprites; one draws a single sprite, two draws a group.
union FieldCoordinate z
16.16 fixed-point pixels
u16 work
The side of the player's next footprint (2 after a stop), or scene scratch.
u8 activeOwners[8]
the party in order
s32 selectedActor
the leader: its unit and its actor
The system's routines and globals: interrupts, BIOS sound bias, random numbers and sleep.
The integer types, TRUE, UNUSED and the fixed-address macros.
struct FieldCoordinate::@024321007066302143002254325121164243234242211074 part
s32 fixed
16.16 fixed-point pixels
struct BattleUnit * UnitGet(u32 owner)
Returns the unit record of owner: 0 to 7 are the playable characters in the game state,...
void UiWork_PushValueSlot(u32 value, u32 kind)
Adds a message argument of kind (MSG_ARG_) with value to the first free place of the argument table; ...