Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
wstag785.c File Reference

WSTAG785: Online Center, Kusanagi City (the Real World). More...

#include "common.h"
#include "field/stage.h"
#include "common/step_animation.inc.c"
#include "common/start_stage.inc.c"
Include dependency graph for wstag785.c:

Go to the source code of this file.

Macros

#define MARKS   0x1C7
 The file of the marks, which the versions number differently.
 
#define STAGE_CHILDREN_SIZE   0x8
 
#define STAGE_TEXT   TEXT_FILE(TEXT_TALKS_07)
 
#define EVENT_TEXT_FILE   (TEXT_EVENTS_700 - 1)
 
#define STAGE_FILE   0x1C7
 
#define STAGE_ARCHIVE   0x3E2
 

Functions

void updateTileSet (StageTileSet *task)
 Plays the animations of map objects 4/3 then 2 (with 1 looping); starts at 2 when done is set.
 
StageTileSet * createTileSet (void)
 Creates the task of updateTileSet already done.
 
void * createCommand835 (s32 arg)
 Command 835 of the event scripts: the map objects of event 1, where the Account Clerk sets up the accounts (updateTileSet)
 
void drawActorMark (StageActorMark *task, s32 frame)
 Draws frame FRAME of file MARKS over the character.
 
void updateActorMark (StageActorMark *task)
 Shows the mark over the character: opens (0x32-0x34), stays by kind, closes (0x36-0x37)
 
void * createCommand807 (s32 arg)
 Command 807 of the event scripts: the mark over a character in event 1 (updateActorMark)
 
void handleCommand807 (void *arg, s32 id, s32 key)
 Map objects 0x328/0x329 set the kind and the character (actor of key KEY), 0x32A ends it.
 
void updateStage (StageTask *task, void **children)
 Creates the event object of story progress 0 or 1 (with an object for 1)
 
void endEvent1 (void)
 After event 1, with Junior, Teddy, Account Clerk and Ivy: moves the story on to STORY_ACCOUNT_REGISTERED.
 
void setupStage (void)
 Sets the stage up: its map, actors and events, playing ON_CNBGM.
 

Variables

AnimFrame updateTileSetFrames1 []
 Defined below, after the code that uses them.
 
AnimFrame updateTileSetFrames2 []
 
AnimFrame updateTileSetFrames3 []
 
AnimFrame updateTileSetFrames0 []
 
const CVECTOR stageColor = { 0x80, 0x80, 0x80, 0x00 }
 the color the setup copies to FIELDSTG_state.spriteColor
 
s16 script1 []
 
s16 script3 []
 
ActorImage stageImages []
 
u16 actor0Conditions [] = { (0x6000 | ( STORY_START )) , 1, 0xFFFF }
 
u16 actor1Conditions [] = { (0x6000 | ( STORY_ACCOUNT_REGISTERED )) , 1, 0xFFFF }
 
u16 actor2Conditions [] = { (0x6000 | ( STORY_START )) , 1, 0xFFFF }
 
u16 actor3Conditions [] = { (0x6000 | ( STORY_ACCOUNT_REGISTERED )) , 1, 0xFFFF }
 
u16 actor4Conditions [] = { (0x6000 | ( STORY_START )) , 1, 0xFFFF }
 
u16 actor5Conditions [] = { (0x6000 | ( STORY_ACCOUNT_REGISTERED )) , 1, 0xFFFF }
 
u16 actor6Conditions [] = { (0x6000 | ( STORY_ACCOUNT_REGISTERED )) , 1, 0xFFFF }
 
u16 actor7Conditions [] = { (0x6000 | ( STORY_START )) , 1, 0xFFFF }
 
u16 actor8Conditions [] = { (0x6000 | ( STORY_START )) , 1, 0xFFFF }
 
u16 actor9Conditions [] = { (0x6000 | ( STORY_ACCOUNT_REGISTERED )) , 1, 0xFFFF }
 
u16 actor10Conditions [] = { (0x6000 | ( STORY_START )) , 1, 0xFFFF }
 
u16 actor11Conditions [] = { (0x6000 | ( STORY_ACCOUNT_REGISTERED )) , 1, 0xFFFF }
 
FieldActorEntry actor0 = { actor0Conditions, ((void *)0) , 1, 4, 0, 0, 1 }
 
FieldActorEntry actor1 = { actor1Conditions, ((void *)0) , 1, 4, 0, 0, 1 }
 
FieldActorEntry actor2 = { actor2Conditions, ((void *)0) , 0xB, 5, 0, 0, 1 }
 
FieldActorEntry actor3 = { actor3Conditions, ((void *)0) , 0xB, 5, 0, 0, 1 }
 
FieldActorEntry actor4 = { actor4Conditions, ((void *)0) , 0xC, 6, 0, 0, 1 }
 
FieldActorEntry actor5 = { actor5Conditions, ((void *)0) , 0xC, 6, 0, 0, 1 }
 
FieldActorEntry actor6 = { actor6Conditions, ((void *)0) , 0xD, 7, 0, 0, 1 }
 
FieldActorEntry actor7 = { actor7Conditions, ((void *)0) , 0xD, 7, 0, 0, 1 }
 
FieldActorEntry actor8 = { actor8Conditions, ((void *)0) , 0xE, 8, 0, 0, 1 }
 
FieldActorEntry actor9 = { actor9Conditions, ((void *)0) , 0xE, 8, 0, 0, 1 }
 
FieldActorEntry actor10 = { actor10Conditions, ((void *)0) , 0xF, 9, 0, 0, 1 }
 
FieldActorEntry actor11 = { actor11Conditions, ((void *)0) , 0xF, 9, 0, 0, 1 }
 
FieldActorEntry * stageActors []
 
StageTile stageObjects []
 The tables and color setupStage gives FIELDSTG_state (FieldState)
 
void(* stageFuncs [])(void)
 The stage's functions (common/start_stage.inc.c calls the first): a StageFuncs in the stages with a tween, which define STAGE_TWEEN before they include this file, and in the others an array of just setupStage.
 
FieldEvent stageEvents []
 

Detailed Description

WSTAG785: Online Center, Kusanagi City (the Real World).

MAGAMI's Online Center, where Junior registers before the Chamber Room.

Definition in file wstag785.c.

Macro Definition Documentation

◆ MARKS

#define MARKS   0x1C7

The file of the marks, which the versions number differently.

Definition at line 18 of file wstag785.c.

◆ STAGE_CHILDREN_SIZE

#define STAGE_CHILDREN_SIZE   0x8

Definition at line 271 of file wstag785.c.

◆ STAGE_TEXT

#define STAGE_TEXT   TEXT_FILE(TEXT_TALKS_07)

Definition at line 286 of file wstag785.c.

◆ EVENT_TEXT_FILE

#define EVENT_TEXT_FILE   (TEXT_EVENTS_700 - 1)

Definition at line 287 of file wstag785.c.

◆ STAGE_FILE

#define STAGE_FILE   0x1C7

Definition at line 288 of file wstag785.c.

◆ STAGE_ARCHIVE

#define STAGE_ARCHIVE   0x3E2

Definition at line 289 of file wstag785.c.

Function Documentation

◆ updateTileSet()

void updateTileSet ( StageTileSet *  task)

Plays the animations of map objects 4/3 then 2 (with 1 looping); starts at 2 when done is set.

Definition at line 24 of file wstag785.c.

Referenced by createCommand835(), and createTileSet().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ createTileSet()

StageTileSet * createTileSet ( void  )

Creates the task of updateTileSet already done.

Definition at line 107 of file wstag785.c.

Referenced by updateStage().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ createCommand835()

void * createCommand835 ( s32  arg)

Command 835 of the event scripts: the map objects of event 1, where the Account Clerk sets up the accounts (updateTileSet)

Definition at line 118 of file wstag785.c.

Here is the call graph for this function:

◆ drawActorMark()

void drawActorMark ( StageActorMark *  task,
s32  frame 
)

Draws frame FRAME of file MARKS over the character.

< the map, its objects and characters, and the menus

Definition at line 123 of file wstag785.c.

Referenced by updateActorMark().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateActorMark()

void updateActorMark ( StageActorMark *  task)

Shows the mark over the character: opens (0x32-0x34), stays by kind, closes (0x36-0x37)

Definition at line 136 of file wstag785.c.

Referenced by createCommand807().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ createCommand807()

void * createCommand807 ( s32  arg)

Command 807 of the event scripts: the mark over a character in event 1 (updateActorMark)

Definition at line 220 of file wstag785.c.

Here is the call graph for this function:

◆ handleCommand807()

void handleCommand807 ( void *  arg,
s32  id,
s32  key 
)

Map objects 0x328/0x329 set the kind and the character (actor of key KEY), 0x32A ends it.

< every character (FIELDSTG_createActor)

Definition at line 225 of file wstag785.c.

◆ updateStage()

void updateStage ( StageTask *  task,
void **  children 
)

Creates the event object of story progress 0 or 1 (with an object for 1)

Definition at line 248 of file wstag785.c.

Here is the call graph for this function:

◆ endEvent1()

void endEvent1 ( void  )

After event 1, with Junior, Teddy, Account Clerk and Ivy: moves the story on to STORY_ACCOUNT_REGISTERED.

Definition at line 275 of file wstag785.c.

◆ setupStage()

void setupStage ( void  )

Sets the stage up: its map, actors and events, playing ON_CNBGM.

Sets the stage up: its map, actors, battles and events, playing KANRIBGM; BGM_0029 instead except at STORY_PRESIDENT_ARRESTED once flag 0x1A0A is set.

< ON_CNBGM: MAGAMI's Online Center

< ON_CNBGM: MAGAMI's Online Center

Definition at line 292 of file wstag785.c.

Variable Documentation

◆ updateTileSetFrames1

AnimFrame updateTileSetFrames1
Initial value:
= {
{ 0, 4 }, { 1, 4 }, { 2, 4 }, { 3, 4 },
{ 4, 4 }, { 5, 4 }, { 6, 4 }, { 7, 4 },
{ 8, 4 }, { 9, 4 }, { 10, 4 }, { 11, 4 },
{ 12, 4 }, { 13, 4 }, { 255, 0x3E7 },
}

Defined below, after the code that uses them.

Definition at line 649 of file wstag785.c.

Referenced by updateTileSet().

◆ updateTileSetFrames2

AnimFrame updateTileSetFrames2
Initial value:
= {
{ 0, 4 }, { 1, 4 }, { 2, 4 }, { 3, 4 },
{ 4, 4 }, { 5, 4 }, { 6, 4 }, { 7, 4 },
{ 8, 4 }, { 9, 4 }, { 10, 4 }, { 11, 4 },
{ 255, 0 },
}

Definition at line 655 of file wstag785.c.

Referenced by updateTileSet().

◆ updateTileSetFrames3

AnimFrame updateTileSetFrames3
Initial value:
= {
{ 0, 8 }, { 1, 8 }, { 2, 8 }, { 3, 8 },
{ 4, 8 }, { 5, 8 }, { 255, 0 },
}

Definition at line 661 of file wstag785.c.

Referenced by updateTileSet().

◆ updateTileSetFrames0

AnimFrame updateTileSetFrames0
Initial value:
= {
{ 0, 8 }, { 1, 8 }, { 2, 8 }, { 3, 8 },
{ 4, 8 }, { 5, 8 }, { 255, 0 },
}

Definition at line 665 of file wstag785.c.

Referenced by updateTileSet().

◆ stageColor

const CVECTOR stageColor = { 0x80, 0x80, 0x80, 0x00 }

the color the setup copies to FIELDSTG_state.spriteColor

the color the setup copies to FIELDSTG_state.spriteColor

It starts the stage, before its jump tables: in wstag924.c GCC would align them to 8 bytes after it, so it is a file of its own, linked first

Definition at line 279 of file wstag785.c.

Referenced by setupStage().

◆ script1

s16 script1[]

Definition at line 310 of file wstag785.c.

◆ script3

s16 script3[]

Definition at line 608 of file wstag785.c.

◆ stageImages

ActorImage stageImages[]
Initial value:
= {
{ 0x200, 0x100, 0x21C, 0x1A6, 0x70, 0xA6, 0x230, 0x1FE },
{ 0x200, 0x100, 0x200, 0x100, 0, 0, 0x220, 0x1FE },
{ 0x200, 0x100, 0x216, 0x138, 0x58, 0x38, 0x200, 0x1FD },
{ 0x200, 0x100, 0x208, 0x1BC, 0x20, 0xBC, 0x210, 0x1FD },
{ 0x200, 0x100, 0x210, 0x1BC, 0x40, 0xBC, 0x220, 0x1FD },
{ 0x200, 0x100, 0x200, 0x1BC, 0, 0xBC, 0x230, 0x1FD },
{ 0x180, 0x100, 0x19C, 0x11F, 0x170, 0x1F, 0x140, 0x1F1 },
{ 0x180, 0x100, 0x1A4, 0x129, 0x190, 0x29, 0x160, 0x1F1 },
{ 0x180, 0x100, 0x1AC, 0x129, 0x1B0, 0x29, 0x170, 0x1F1 },
{ 0x140, 0x100, 0x176, 0x138, 0xD8, 0x38, 0x140, 0x1F0 },
{ 0x180, 0x100, 0x1B6, 0x110, 0x1D8, 0x10, 0x160, 0x1F0 },
{ 0x180, 0x100, 0x194, 0x11F, 0x150, 0x1F, 0x170, 0x1F0 },
}

Definition at line 669 of file wstag785.c.

Referenced by setupStage().

◆ actor0Conditions

u16 actor0Conditions[] = { (0x6000 | ( STORY_START )) , 1, 0xFFFF }

Definition at line 683 of file wstag785.c.

◆ actor1Conditions

u16 actor1Conditions[] = { (0x6000 | ( STORY_ACCOUNT_REGISTERED )) , 1, 0xFFFF }

Definition at line 684 of file wstag785.c.

◆ actor2Conditions

u16 actor2Conditions[] = { (0x6000 | ( STORY_START )) , 1, 0xFFFF }

Definition at line 685 of file wstag785.c.

◆ actor3Conditions

u16 actor3Conditions[] = { (0x6000 | ( STORY_ACCOUNT_REGISTERED )) , 1, 0xFFFF }

Definition at line 686 of file wstag785.c.

◆ actor4Conditions

u16 actor4Conditions[] = { (0x6000 | ( STORY_START )) , 1, 0xFFFF }

Definition at line 687 of file wstag785.c.

◆ actor5Conditions

u16 actor5Conditions[] = { (0x6000 | ( STORY_ACCOUNT_REGISTERED )) , 1, 0xFFFF }

Definition at line 688 of file wstag785.c.

◆ actor6Conditions

u16 actor6Conditions[] = { (0x6000 | ( STORY_ACCOUNT_REGISTERED )) , 1, 0xFFFF }

Definition at line 689 of file wstag785.c.

◆ actor7Conditions

u16 actor7Conditions[] = { (0x6000 | ( STORY_START )) , 1, 0xFFFF }

Definition at line 690 of file wstag785.c.

◆ actor8Conditions

u16 actor8Conditions[] = { (0x6000 | ( STORY_START )) , 1, 0xFFFF }

Definition at line 691 of file wstag785.c.

◆ actor9Conditions

u16 actor9Conditions[] = { (0x6000 | ( STORY_ACCOUNT_REGISTERED )) , 1, 0xFFFF }

Definition at line 692 of file wstag785.c.

◆ actor10Conditions

u16 actor10Conditions[] = { (0x6000 | ( STORY_START )) , 1, 0xFFFF }

Definition at line 693 of file wstag785.c.

◆ actor11Conditions

u16 actor11Conditions[] = { (0x6000 | ( STORY_ACCOUNT_REGISTERED )) , 1, 0xFFFF }

Definition at line 694 of file wstag785.c.

◆ actor0

FieldActorEntry actor0 = { actor0Conditions, ((void *)0) , 1, 4, 0, 0, 1 }

Definition at line 695 of file wstag785.c.

◆ actor1

FieldActorEntry actor1 = { actor1Conditions, ((void *)0) , 1, 4, 0, 0, 1 }

Definition at line 696 of file wstag785.c.

◆ actor2

FieldActorEntry actor2 = { actor2Conditions, ((void *)0) , 0xB, 5, 0, 0, 1 }

Definition at line 697 of file wstag785.c.

◆ actor3

FieldActorEntry actor3 = { actor3Conditions, ((void *)0) , 0xB, 5, 0, 0, 1 }

Definition at line 698 of file wstag785.c.

◆ actor4

FieldActorEntry actor4 = { actor4Conditions, ((void *)0) , 0xC, 6, 0, 0, 1 }

Definition at line 699 of file wstag785.c.

◆ actor5

FieldActorEntry actor5 = { actor5Conditions, ((void *)0) , 0xC, 6, 0, 0, 1 }

Definition at line 700 of file wstag785.c.

◆ actor6

FieldActorEntry actor6 = { actor6Conditions, ((void *)0) , 0xD, 7, 0, 0, 1 }

Definition at line 701 of file wstag785.c.

◆ actor7

FieldActorEntry actor7 = { actor7Conditions, ((void *)0) , 0xD, 7, 0, 0, 1 }

Definition at line 702 of file wstag785.c.

◆ actor8

FieldActorEntry actor8 = { actor8Conditions, ((void *)0) , 0xE, 8, 0, 0, 1 }

Definition at line 703 of file wstag785.c.

◆ actor9

FieldActorEntry actor9 = { actor9Conditions, ((void *)0) , 0xE, 8, 0, 0, 1 }

Definition at line 704 of file wstag785.c.

◆ actor10

FieldActorEntry actor10 = { actor10Conditions, ((void *)0) , 0xF, 9, 0, 0, 1 }

Definition at line 705 of file wstag785.c.

◆ actor11

FieldActorEntry actor11 = { actor11Conditions, ((void *)0) , 0xF, 9, 0, 0, 1 }

Definition at line 706 of file wstag785.c.

◆ stageActors

FieldActorEntry* stageActors[]
Initial value:
= {
((void *)0) ,
}
FieldActorEntry actor0
Definition wstag785.c:695
FieldActorEntry actor6
Definition wstag785.c:701
FieldActorEntry actor5
Definition wstag785.c:700
FieldActorEntry actor2
Definition wstag785.c:697
FieldActorEntry actor10
Definition wstag785.c:705
FieldActorEntry actor4
Definition wstag785.c:699
FieldActorEntry actor8
Definition wstag785.c:703
FieldActorEntry actor9
Definition wstag785.c:704
FieldActorEntry actor7
Definition wstag785.c:702
FieldActorEntry actor11
Definition wstag785.c:706
FieldActorEntry actor1
Definition wstag785.c:696
FieldActorEntry actor3
Definition wstag785.c:698

Definition at line 707 of file wstag785.c.

Referenced by setupStage().

◆ stageObjects

StageTile stageObjects[]
Initial value:
= {
{ 0, 1, 0x64, 2, 0x4A, 2, 0, 5, 8, 0, 299, 232, 0, 0 },
{ 1, 0, 0x40, 2, 0x51, 2, 0, 0xB, 0xA, 0, 156, 254, 0, 0 },
{ 1, 0, 0x40, 2, 0x51, 2, 0, 0xB, 0xA, 0, 236, 358, 0, 0 },
{ 1, 0, 0x40, 2, 0x51, 2, 0, 0xB, 0xA, 0, 398, 358, 0, 0 },
{ 1, 0, 0x64, 2, 0x4B, 2, 0, 5, 8, 0, 369, 246, 0, 0 },
{ 0, 4, 0x64, 2, 0x46, 2, 0, 0xD, 4, 0, 299, 232, 0, 0 },
{ 0, 3, 0x64, 2, 0x47, 2, 0, 0xB, 8, 0, 299, 232, 0, 0 },
{ 0, 2, 0x64, 2, 0x48, 2, 0, 5, 8, 0, 299, 232, 0, 0 },
{ 1, 0, 0x64, 2, 0x49, 2, 0, 5, 8, 0, 369, 246, 0, 0 },
{ 1, 0, 0x40, 2, 0x50, 0, 0, 0, 0, 0, 156, 254, 0, 0 },
{ 1, 0, 0x40, 2, 0x50, 0, 0, 0, 0, 0, 236, 358, 0, 0 },
{ 1, 0, 0x40, 2, 0x50, 0, 0, 0, 0, 0, 398, 358, 0, 0 },
{ 1, 0, 0x64, 2, 0x52, 2, 0, 3, 8, 0, 404, 239, 0, 0 },
{ 1, 0, 0x40, 4, 0, 0, 0, 0, 0, 0, 402, 400, 408, 0 },
{ 1, 0, 0x40, 4, 0xC, 0, 0, 0, 0, 0, 241, 400, 407, 0 },
{ 1, 0, 0x40, 4, 0xD, 0, 0, 0, 0, 0, 160, 295, 303, 0 },
{ 1, 0, 0x40, 4, 0xE, 0, 0, 0, 0, 0, 289, 244, 265, 0 },
{ 1, 0, 0x40, 4, 0xF, 0, 0, 0, 0, 0, 289, 262, 292, 0 },
{ 1, 0, 0x40, 4, 0x10, 0, 0, 0, 0, 0, 305, 272, 300, 0 },
{ 1, 0, 0x40, 4, 0x11, 0, 0, 0, 0, 0, 321, 279, 308, 0 },
{ 1, 0, 0x40, 4, 0x12, 0, 0, 0, 0, 0, 337, 286, 316, 0 },
{ 1, 0, 0x40, 4, 0x13, 0, 0, 0, 0, 0, 353, 298, 324, 0 },
{ 1, 0, 0x40, 4, 0x14, 0, 0, 0, 0, 0, 369, 289, 316, 0 },
{ 1, 0, 0x40, 4, 0x15, 0, 0, 0, 0, 0, 385, 281, 308, 0 },
{ 1, 0, 0x40, 4, 0x16, 0, 0, 0, 0, 0, 399, 273, 300, 0 },
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
}

The tables and color setupStage gives FIELDSTG_state (FieldState)

Definition at line 722 of file wstag785.c.

Referenced by setupStage().

◆ stageFuncs

void(* stageFuncs[])(void) ( void  )
Initial value:
= {
}
void setupStage(void)
Sets the stage up: its map, actors and events, playing ON_CNBGM.
Definition wstag785.c:292

The stage's functions (common/start_stage.inc.c calls the first): a StageFuncs in the stages with a tween, which define STAGE_TWEEN before they include this file, and in the others an array of just setupStage.

Definition at line 750 of file wstag785.c.

◆ stageEvents

FieldEvent stageEvents[]
Initial value:
= {
{ 1, script1, ( ( 0x14B - 1) << 16 | ( 1 )), ((void *)0) , endEvent1 },
{ 3, script3, ( ( 0x14B - 1) << 16 | ( 2 )), ((void *)0) , ((void *)0) },
{ -1, ((void *)0) , 0, ((void *)0) , ((void *)0) },
}
void endEvent1(void)
After event 1, with Junior, Teddy, Account Clerk and Ivy: moves the story on to STORY_ACCOUNT_REGISTE...
Definition wstag785.c:275
s16 script1[]
Definition wstag785.c:310
s16 script3[]
Definition wstag785.c:608

Definition at line 753 of file wstag785.c.

Referenced by setupStage().