Sly 1:WS
Data Structure | |
---|---|
Game | Sly Cooper and the Thievius Raccoonus |
Size | 0x44c |
Official Name | Yes |
WS (world state) is a data structure in Sly Cooper and the Thievius Raccoonus. It is responsible for tracking the state of each gameworld.
Fields
The WS struct has the following fields:
Offset | Size | Type | Name | Notes |
---|---|---|---|---|
0x0 | 0x438 | LS[9]
|
als
|
Level states array |
8 | dword
|
ckey
|
Count of keys collected on world | |
8 | dword
|
cvault
|
Count of vaults opened on world | |
8 | dword
|
ctimed
|
Count of MTSs completed on world | |
4 | float
|
dt
|
Time spent in world | |
4 | enum FWS
|
fws
|
World state flags |
Level states array
Each WS
has an array of 9 LS
structs, even if the world has fewer than 9 levels. In the case of an unused level, the corresponding level state in the array is blank.
The level states are always aligned in the als
array so the indices are as follows:
als[0]
: Intro levelals[1]
: Hub levelals[2]
-als[7]
: Generic levelsals[8]
: Boss fight
Because World 5 has no hub level and fewer than 6 generic levels, it is the only gameworld with gaps between levels in the als
array.
World state flags
The current state of the world is defined by the FWS enum, which has the following possible values:
Name | Value | Description |
---|---|---|
FWS_Visited | 0x1 | |
FWS_Lock_0 | 0x2 | |
FWS_Lock_1 | 0x4 | |
FWS_Lock_2 | 0x8 | |
FWS_Lock_3 | 0x10 | |
GRFWS_Lock_All | 0x1e |