|Game||Sly Cooper and the Thievius Raccoonus|
WS (world state) is a data structure in Sly Cooper and the Thievius Raccoonus. It is responsible for tracking the state of a particular gameworld.
Fields[edit | edit source]
The WS struct has the following fields:
||Level states array|
||Count of keys collected on world|
||Count of vaults opened on world|
||Count of MTSs completed on world|
||Time spent in world|
||World state flags|
Level states array[edit | edit source]
WS has an array of 9
LS structs, even if the world has fewer than 9 levels. The LS structs are always aligned in the
als array so the indices are as follows:
World 1 and World 5 have fewer than 9 levels, so some some of the entries levels in their
als arrays are blank/unused.
World state flags (FWS)[edit | edit source]
The current state of the world is defined by the FWS enum, which has the following possible values:
|FWS_Visited||0x1||World is unlocked and can be selected in The Hideout|
|FWS_Lock_0||0x2||Corresponds to a particular LOCKG in the world being unlocked|
|GRFWS_Lock_All||0x1e||All of the locks in the world have been unlocked|
The fws acts as a bitfield and the game ORs the its value with the FWS enum values to check if a particular condition is met.
Note that the the order of locks is not the same for every world because each LOCKG independently decides which bit on the
fws gets set when it gets unlocked.