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

#include <weaponlevelup.hpp>

Public Member Functions

void CMenuEffectDataLoad (CWeaponLevelUp *load_buffer, int kind)
 
void Initialize ()
 
void SetLevelUpValue (WEAPON_HAVE *have, CCharacter *character, CWeaponLevelUp *load_buffer, int tex_block)
 
void SetLevelUpWeaponData ()
 
void SetStatusBreak (WEAPON_HAVE *have, CCharacter *character, CWeaponLevelUp *load_buffer, int tex_block)
 
void SetBuildUp (WEAPON_HAVE *have, CCharacter *character, CWeaponLevelUp *load_buffer, int tex_block)
 
void WepRecover (WEAPON_HAVE *have, CCharacter *character, CWeaponLevelUp *load_buffer, int tex_block)
 
void CureEffect (int x, int y, CWeaponLevelUp *load_buffer, int tex_block, int kind)
 
void InitSnd ()
 
void SetSnd (int from, int to, int step)
 
void StepSnd ()
 
void CheckSnd ()
 
void Step ()
 
void Draw ()
 
void DrawMes ()
 

Public Attributes

WEAPON_HAVE preview
 
s16 status_item_no
 
s16 status_weapon_no
 
s16 status_flags
 
s8 status_weapon_level
 
u8 unk_ff
 
s16 status_stats [4]
 
s8 status_elements [5]
 
s8 status_monster [10]
 
u8 unk_117 [9]
 
CCharacter effect
 
s32 reserved_word
 
WEAPON_HAVE * weapon
 
CCharacter * chara
 
s16 effect_motion
 
s16 buildup_weapon_no
 
s8 buildup_complete
 
s8 lost_default_weapon
 
s16 message_no
 
s32 message_value
 
s16 synthesis_count
 
s16 reserved_half
 
s16 attachment_icons [5]
 
s16 attachment_values [5]
 
s16 effect_active
 
s16 operation_kind
 
s16 texture_block
 
u8 unk_1306 [2]
 
float effect_x
 
float effect_y
 
float effect_timer
 
s16 effect_state
 
s16 snd_volume
 
s16 snd_from
 
s16 snd_to
 
s16 snd_step
 
u8 unk_131e [0xA]
 
u_long128 * effect_buffer
 
u8 unk_132c [4]
 

Detailed Description

Stores the state used by the weapon enhancement effect menu.

The first attachment-shaped record is also used as the temporary status break item written into the dungeon consumable inventory.

Definition at line 82 of file weaponlevelup.hpp.

Member Function Documentation

◆ CMenuEffectDataLoad()

void CWeaponLevelUp::CMenuEffectDataLoad ( CWeaponLevelUp *  load_buffer,
int  kind 
)

Loads the package and sound data for one menu effect.

Mangled name:
CMenuEffectDataLoad__14CWeaponLevelUpFP1i
Address:
0x00236000
Size:
0x1E4

Definition at line 200 of file weaponlevelup.cpp.

◆ Initialize()

void CWeaponLevelUp::Initialize ( )

Clears the menu's tables and runtime state.

Mangled name:
Initialize__14CWeaponLevelUpFv
Address:
0x002361F0
Size:
0x90

Definition at line 237 of file weaponlevelup.cpp.

◆ SetLevelUpValue()

void CWeaponLevelUp::SetLevelUpValue ( WEAPON_HAVE *  have,
CCharacter *  character,
CWeaponLevelUp *  load_buffer,
int  tex_block 
)

Calculates and starts the weapon level-up effect.

Mangled name:
SetLevelUpValue__14CWeaponLevelUpFP11WEAPON_HAVEP10CCharacterP1i
Address:
0x00236280
Size:
0x4E8

Definition at line 258 of file weaponlevelup.cpp.

◆ SetLevelUpWeaponData()

void CWeaponLevelUp::SetLevelUpWeaponData ( )

Applies the completed level-up values to the weapon.

Mangled name:
SetLevelUpWeaponData__14CWeaponLevelUpFv
Address:
0x00236770
Size:
0x158

Definition at line 412 of file weaponlevelup.cpp.

◆ SetStatusBreak()

void CWeaponLevelUp::SetStatusBreak ( WEAPON_HAVE *  have,
CCharacter *  character,
CWeaponLevelUp *  load_buffer,
int  tex_block 
)

Calculates and starts the status-break effect.

Mangled name:
SetStatusBreak__14CWeaponLevelUpFP11WEAPON_HAVEP10CCharacterP1i
Address:
0x002368D0
Size:
0x358

Definition at line 448 of file weaponlevelup.cpp.

◆ SetBuildUp()

void CWeaponLevelUp::SetBuildUp ( WEAPON_HAVE *  have,
CCharacter *  character,
CWeaponLevelUp *  load_buffer,
int  tex_block 
)

Calculates and starts the weapon build-up effect.

Mangled name:
SetBuildUp__14CWeaponLevelUpFP11WEAPON_HAVEP10CCharacterP1i
Address:
0x00236C30
Size:
0xCC

Definition at line 532 of file weaponlevelup.cpp.

◆ WepRecover()

void CWeaponLevelUp::WepRecover ( WEAPON_HAVE *  have,
CCharacter *  character,
CWeaponLevelUp *  load_buffer,
int  tex_block 
)

Starts the weapon recovery effect.

Mangled name:
WepRecover__14CWeaponLevelUpFP11WEAPON_HAVEP10CCharacterP1i
Address:
0x00236D00
Size:
0x8C

Definition at line 553 of file weaponlevelup.cpp.

◆ CureEffect()

void CWeaponLevelUp::CureEffect ( int  x,
int  y,
CWeaponLevelUp *  load_buffer,
int  tex_block,
int  kind 
)

Starts an effect for curing a weapon-related status.

Mangled name:
CureEffect__14CWeaponLevelUpFiiP1ii
Address:
0x00236D90
Size:
0x100

Definition at line 567 of file weaponlevelup.cpp.

◆ InitSnd()

void CWeaponLevelUp::InitSnd ( )

Resets the background-music fade state.

Mangled name:
InitSnd__14CWeaponLevelUpFv
Address:
0x00236E90
Size:
0x1C

Definition at line 590 of file weaponlevelup.cpp.

◆ SetSnd()

void CWeaponLevelUp::SetSnd ( int  from,
int  to,
int  step 
)

Starts a background-music fade from one volume to another.

Mangled name:
SetSnd__14CWeaponLevelUpFiii
Address:
0x00236EB0
Size:
0x3C

Definition at line 597 of file weaponlevelup.cpp.

◆ StepSnd()

void CWeaponLevelUp::StepSnd ( )

Advances the active background-music fade by one step.

Mangled name:
StepSnd__14CWeaponLevelUpFv
Address:
0x00236EF0
Size:
0x98

Definition at line 621 of file weaponlevelup.cpp.

◆ CheckSnd()

void CWeaponLevelUp::CheckSnd ( )

Restores the current background-music volume and clears the fade.

Mangled name:
CheckSnd__14CWeaponLevelUpFv
Address:
0x00236F90
Size:
0x78

Definition at line 642 of file weaponlevelup.cpp.

◆ Step()

void CWeaponLevelUp::Step ( )

Advances the active weapon effect state machine.

Mangled name:
Step__14CWeaponLevelUpFv
Address:
0x00237010
Size:
0x91C

Definition at line 658 of file weaponlevelup.cpp.

◆ Draw()

void CWeaponLevelUp::Draw ( )

Draws the active weapon effect and its attachment icons.

Mangled name:
Draw__14CWeaponLevelUpFv
Address:
0x00237930
Size:
0x36C

Definition at line 977 of file weaponlevelup.cpp.

◆ DrawMes()

void CWeaponLevelUp::DrawMes ( )

Draws the result message for the active weapon effect.

Mangled name:
DrawMes__14CWeaponLevelUpFv
Address:
0x00237CA0
Size:
0x404

Definition at line 1078 of file weaponlevelup.cpp.

Member Data Documentation

◆ preview

WEAPON_HAVE CWeaponLevelUp::preview

Working copy of the weapon holding the level-up or build-up result the menu shows.

Definition at line 84 of file weaponlevelup.hpp.

◆ status_item_no

s16 CWeaponLevelUp::status_item_no

Item id of the synthesis item a status break produces.

Definition at line 85 of file weaponlevelup.hpp.

◆ status_weapon_no

s16 CWeaponLevelUp::status_weapon_no

Item id of the weapon broken down into the synthesis item.

Definition at line 86 of file weaponlevelup.hpp.

◆ status_flags

s16 CWeaponLevelUp::status_flags

Special-behaviour flags carried by the synthesis item.

Definition at line 87 of file weaponlevelup.hpp.

◆ status_weapon_level

s8 CWeaponLevelUp::status_weapon_level

Level of the weapon broken down, shown in the break message.

Definition at line 88 of file weaponlevelup.hpp.

◆ unk_ff

u8 CWeaponLevelUp::unk_ff

Definition at line 89 of file weaponlevelup.hpp.

◆ status_stats

s16 CWeaponLevelUp::status_stats[4]

Attack, endurance, speed and magic carried over, at 60% of the weapon's.

Definition at line 90 of file weaponlevelup.hpp.

◆ status_elements

s8 CWeaponLevelUp::status_elements[5]

Fire, ice, thunder, wind and holy values carried over, at 60% of the weapon's.

Definition at line 91 of file weaponlevelup.hpp.

◆ status_monster

s8 CWeaponLevelUp::status_monster[10]

Monster-effectiveness values carried over, at 60% of the weapon's.

Definition at line 92 of file weaponlevelup.hpp.

◆ unk_117

u8 CWeaponLevelUp::unk_117[9]

Definition at line 93 of file weaponlevelup.hpp.

◆ effect

CCharacter CWeaponLevelUp::effect

Model whose motions play the menu effect.

Definition at line 94 of file weaponlevelup.hpp.

◆ reserved_word

s32 CWeaponLevelUp::reserved_word

Cleared on initialisation and never read.

Definition at line 95 of file weaponlevelup.hpp.

◆ weapon

WEAPON_HAVE* CWeaponLevelUp::weapon

Weapon the active effect changes.

Definition at line 96 of file weaponlevelup.hpp.

◆ chara

CCharacter* CWeaponLevelUp::chara

Character whose weapon the active effect changes.

Definition at line 97 of file weaponlevelup.hpp.

◆ effect_motion

s16 CWeaponLevelUp::effect_motion

Motion number the effect model plays.

Definition at line 98 of file weaponlevelup.hpp.

◆ buildup_weapon_no

s16 CWeaponLevelUp::buildup_weapon_no

Item id of the weapon a build-up turns the weapon into.

Definition at line 99 of file weaponlevelup.hpp.

◆ buildup_complete

s8 CWeaponLevelUp::buildup_complete

Set once the build-up has rewritten the weapon.

Definition at line 100 of file weaponlevelup.hpp.

◆ lost_default_weapon

s8 CWeaponLevelUp::lost_default_weapon

Set when a status break reset a character's default weapon instead of removing it.

Definition at line 101 of file weaponlevelup.hpp.

◆ message_no

s16 CWeaponLevelUp::message_no

Character named in a cure message, or a message id of 0x190 and above shown on its own.

Definition at line 102 of file weaponlevelup.hpp.

◆ message_value

s32 CWeaponLevelUp::message_value

Number shown in a cure message.

Definition at line 103 of file weaponlevelup.hpp.

◆ synthesis_count

s16 CWeaponLevelUp::synthesis_count

Number of synthesis items the level-up absorbed.

Definition at line 104 of file weaponlevelup.hpp.

◆ reserved_half

s16 CWeaponLevelUp::reserved_half

Cleared on initialisation and never read.

Definition at line 105 of file weaponlevelup.hpp.

◆ attachment_icons

s16 CWeaponLevelUp::attachment_icons[5]

Item ids of the attachments orbiting the level-up effect.

Definition at line 106 of file weaponlevelup.hpp.

◆ attachment_values

s16 CWeaponLevelUp::attachment_values[5]

Values drawn beside the orbiting attachment icons.

Definition at line 107 of file weaponlevelup.hpp.

◆ effect_active

s16 CWeaponLevelUp::effect_active

Nonzero while the effect plays, which holds back the result message.

Definition at line 108 of file weaponlevelup.hpp.

◆ operation_kind

s16 CWeaponLevelUp::operation_kind

Active effect.

See also
WepEffectKind.

Definition at line 109 of file weaponlevelup.hpp.

◆ texture_block

s16 CWeaponLevelUp::texture_block

Texture block the effect's textures load into.

Definition at line 110 of file weaponlevelup.hpp.

◆ unk_1306

u8 CWeaponLevelUp::unk_1306[2]

Definition at line 111 of file weaponlevelup.hpp.

◆ effect_x

float CWeaponLevelUp::effect_x

Horizontal position a cure effect plays at.

Definition at line 112 of file weaponlevelup.hpp.

◆ effect_y

float CWeaponLevelUp::effect_y

Vertical position a cure effect plays at.

Definition at line 113 of file weaponlevelup.hpp.

◆ effect_timer

float CWeaponLevelUp::effect_timer

Frames since the effect started, negative before it has.

Definition at line 114 of file weaponlevelup.hpp.

◆ effect_state

s16 CWeaponLevelUp::effect_state

Step of the effect state machine, starting at a per-operation base.

See also
WepEffectState.

Definition at line 115 of file weaponlevelup.hpp.

◆ snd_volume

s16 CWeaponLevelUp::snd_volume

Background-music volume the fade has reached.

Definition at line 116 of file weaponlevelup.hpp.

◆ snd_from

s16 CWeaponLevelUp::snd_from

Background-music volume the fade started from, restored afterwards.

Definition at line 117 of file weaponlevelup.hpp.

◆ snd_to

s16 CWeaponLevelUp::snd_to

Background-music volume the fade ends at.

Definition at line 118 of file weaponlevelup.hpp.

◆ snd_step

s16 CWeaponLevelUp::snd_step

Signed volume change per frame, zero once the fade ends.

Definition at line 119 of file weaponlevelup.hpp.

◆ unk_131e

u8 CWeaponLevelUp::unk_131e[0xA]

Definition at line 120 of file weaponlevelup.hpp.

◆ effect_buffer

u_long128* CWeaponLevelUp::effect_buffer

Next free position in the buffer the effect package and sound load into.

Definition at line 121 of file weaponlevelup.hpp.

◆ unk_132c

u8 CWeaponLevelUp::unk_132c[4]

Definition at line 122 of file weaponlevelup.hpp.