DCDecomp
A decompilation of Dark Cloud for the PlayStation 2
Loading...
Searching...
No Matches
CScript Class Reference

#include <script.hpp>

Public Member Functions

void Load (const char *name)
 
void Step ()
 
int CheckScript (char *buffer, int position, CSCRIPT_COMMAND *command, int command_no)
 
int CheckArg (char *buffer, int position, CSCRIPT_COMMAND *command)
 
int SkipSpace (char *buffer, int position)
 

Public Attributes

int camera_start
 
int camera_no
 
int fade
 
float fade_speed
 
u8 end
 
u8 unk_11 [3]
 
int sprite
 
int scene
 
int load_no
 
int init_no
 
int mes_wait
 
float wait
 
u8 reset_flag
 
u8 unk_2D [3]
 
SCRIPT_OBJ obj [23]
 
int motion_start
 
int motion_end
 
float motion_step
 
u8 motion_req
 
u8 unk_4E1 [3]
 
int mes_no
 
float mes_timer
 
int mes_x
 
int mes_y
 
int mes_talker
 
int mes_tail_x
 
int mes_tail_y
 
int mes_page_wait
 
int unk_504
 
int bom_no
 
u8 bom_req
 
u8 unk_50D [11]
 
sceVu0FVECTOR bom_pos [3]
 
float bom_size [4]
 
int beem_no
 
u8 beem_req
 
u8 beem_end
 
u8 unk_566 [10]
 
sceVu0FVECTOR beem_from [3]
 
sceVu0FVECTOR beem_to [3]
 
int se_kind
 
int se_no
 
int se_voice
 
int se_fade_time
 
int se_stop
 
int bgm_fade
 
int size
 
u8 unk_5E4 [20]
 
char data [56000]
 
char * p
 
int pos
 
float arg [128]
 
u8 unk_E2C0 [56]
 

Detailed Description

Parses and stores the state of the title overlay's text script.

Definition at line 133 of file script.hpp.

Member Function Documentation

◆ Load()

void CScript::Load ( const char *  name)
     Loads a title script and resets its execution state.
Mangled name:
Load__7CScriptFPCc
Address:
0x1DABD80
Size:
0x158

Definition at line 51 of file script.cpp.

◆ Step()

void CScript::Step ( )
     Advances the title script until a command yields execution.
Mangled name:
Step__7CScriptFv
Address:
0x1DABEE0
Size:
0x228

Definition at line 103 of file script.cpp.

◆ CheckScript()

int CScript::CheckScript ( char *  buffer,
int  position,
CSCRIPT_COMMAND *  command,
int  command_no 
)
     Applies one parsed command to the title scene state.
Mangled name:
CheckScript__7CScriptFPciP15CSCRIPT_COMMANDi
Address:
0x1DAC110
Size:
0xB40

Definition at line 151 of file script.cpp.

◆ CheckArg()

int CScript::CheckArg ( char *  buffer,
int  position,
CSCRIPT_COMMAND *  command 
)
     Parses the arguments required by one title script command.
Mangled name:
CheckArg__7CScriptFPciP15CSCRIPT_COMMAND
Address:
0x1DACC50
Size:
0x43C

Definition at line 356 of file script.cpp.

◆ SkipSpace()

int CScript::SkipSpace ( char *  buffer,
int  position 
)
     Skips whitespace and comments before the next script token.
Mangled name:
SkipSpace__7CScriptFPci
Address:
0x1DAD090
Size:
0x14C

Definition at line 491 of file script.cpp.

Member Data Documentation

◆ camera_start

int CScript::camera_start

Camera selected by the current command.

Definition at line 135 of file script.hpp.

◆ camera_no

int CScript::camera_no

Camera that was selected before the current command.

Definition at line 136 of file script.hpp.

◆ fade

int CScript::fade

Fade request consumed by the title movie.

See also
TitleScriptFade.

Definition at line 137 of file script.hpp.

◆ fade_speed

float CScript::fade_speed

Rate of the pending fade.

Definition at line 138 of file script.hpp.

◆ end

u8 CScript::end

Whether the script reached its end command.

Definition at line 139 of file script.hpp.

◆ unk_11

u8 CScript::unk_11[3]

Definition at line 140 of file script.hpp.

◆ sprite

int CScript::sprite

Sprite request consumed by the scene.

Definition at line 141 of file script.hpp.

◆ scene

int CScript::scene

Scene selected by the script, as an OpeningScene or a RushScene.

Definition at line 142 of file script.hpp.

◆ load_no

int CScript::load_no

Scene data requested for loading, as an OpeningScene or a RushScene.

Definition at line 143 of file script.hpp.

◆ init_no

int CScript::init_no

Scene selected for initialization, as an OpeningScene or a RushScene.

Definition at line 144 of file script.hpp.

◆ mes_wait

int CScript::mes_wait

Whether message completion blocks execution.

Definition at line 145 of file script.hpp.

◆ wait

float CScript::wait

Remaining scripted wait time.

Definition at line 146 of file script.hpp.

◆ reset_flag

u8 CScript::reset_flag

Flag cleared when a script loads; nothing else reads or writes it.

Definition at line 147 of file script.hpp.

◆ unk_2D

u8 CScript::unk_2D[3]

Definition at line 148 of file script.hpp.

◆ obj

SCRIPT_OBJ CScript::obj[23]

Pending state for each scripted object.

Definition at line 149 of file script.hpp.

◆ motion_start

int CScript::motion_start

First frame of the requested camera motion.

Definition at line 150 of file script.hpp.

◆ motion_end

int CScript::motion_end

Last frame of the requested camera motion.

Definition at line 151 of file script.hpp.

◆ motion_step

float CScript::motion_step

Step applied to the requested camera motion.

Definition at line 152 of file script.hpp.

◆ motion_req

u8 CScript::motion_req

Whether a camera motion request is pending.

Definition at line 153 of file script.hpp.

◆ unk_4E1

u8 CScript::unk_4E1[3]

Definition at line 154 of file script.hpp.

◆ mes_no

int CScript::mes_no

Message selected for display.

Definition at line 155 of file script.hpp.

◆ mes_timer

float CScript::mes_timer

Duration assigned to the message.

Definition at line 156 of file script.hpp.

◆ mes_x

int CScript::mes_x

Horizontal message position.

Definition at line 157 of file script.hpp.

◆ mes_y

int CScript::mes_y

Vertical message position.

Definition at line 158 of file script.hpp.

◆ mes_talker

int CScript::mes_talker

Object speaking the message.

Definition at line 159 of file script.hpp.

◆ mes_tail_x

int CScript::mes_tail_x

Horizontal position of the message tail.

Definition at line 160 of file script.hpp.

◆ mes_tail_y

int CScript::mes_tail_y

Vertical position of the message tail.

Definition at line 161 of file script.hpp.

◆ mes_page_wait

int CScript::mes_page_wait

Frames a message page waits before turning on its own.

Definition at line 162 of file script.hpp.

◆ unk_504

int CScript::unk_504

Definition at line 163 of file script.hpp.

◆ bom_no

int CScript::bom_no

Circular slot used by the next bomb request.

Definition at line 164 of file script.hpp.

◆ bom_req

u8 CScript::bom_req

Whether a bomb request is pending.

Definition at line 165 of file script.hpp.

◆ unk_50D

u8 CScript::unk_50D[11]

Definition at line 166 of file script.hpp.

◆ bom_pos

sceVu0FVECTOR CScript::bom_pos[3]

Positions of pending bomb effects.

Definition at line 167 of file script.hpp.

◆ bom_size

float CScript::bom_size[4]

Sizes assigned to the bomb slots.

Definition at line 168 of file script.hpp.

◆ beem_no

int CScript::beem_no

Circular slot used by the next beam request.

Definition at line 169 of file script.hpp.

◆ beem_req

u8 CScript::beem_req

Whether a beam request is pending.

Definition at line 170 of file script.hpp.

◆ beem_end

u8 CScript::beem_end

Whether the beam should finish.

Definition at line 171 of file script.hpp.

◆ unk_566

u8 CScript::unk_566[10]

Definition at line 172 of file script.hpp.

◆ beem_from

sceVu0FVECTOR CScript::beem_from[3]

Starting points of beam requests.

Definition at line 173 of file script.hpp.

◆ beem_to

sceVu0FVECTOR CScript::beem_to[3]

Ending points of beam requests.

Definition at line 174 of file script.hpp.

◆ se_kind

int CScript::se_kind

Sound group the sound request targets.

See also
TitleScriptSeKind.

Definition at line 175 of file script.hpp.

◆ se_no

int CScript::se_no

Sound selected by the script.

Definition at line 176 of file script.hpp.

◆ se_voice

int CScript::se_voice

Voice selected for the sound.

Definition at line 177 of file script.hpp.

◆ se_fade_time

int CScript::se_fade_time

Fade duration assigned to the sound.

Definition at line 178 of file script.hpp.

◆ se_stop

int CScript::se_stop

Whether the selected sound should stop.

Definition at line 179 of file script.hpp.

◆ bgm_fade

int CScript::bgm_fade

Volume a requested sound fade heads to; zero when no fade is pending.

Definition at line 180 of file script.hpp.

◆ size

int CScript::size

Size in bytes of the loaded script.

Definition at line 181 of file script.hpp.

◆ unk_5E4

u8 CScript::unk_5E4[20]

Definition at line 182 of file script.hpp.

◆ data

char CScript::data[56000]

Storage containing the loaded script text.

Definition at line 183 of file script.hpp.

◆ p

char* CScript::p

Script buffer currently being parsed.

Definition at line 184 of file script.hpp.

◆ pos

int CScript::pos

Current byte position in the script.

Definition at line 185 of file script.hpp.

◆ arg

float CScript::arg[128]

Arguments parsed for the current command.

Definition at line 186 of file script.hpp.

◆ unk_E2C0

u8 CScript::unk_E2C0[56]

Definition at line 187 of file script.hpp.