Sly 1:WS

WS (World State) is a data structure in. It stores an array of Level States, one for each level in the world.

Structure
The WS struct is declared as follows:

Level states array
Each  stores an array of 9   structs, called , even if the world has fewer than 9 levels (such as Worlds 0 and 5). In the case of an unused level, the corresponding level state is blank and ignored.

The level states are always aligned in the  array so the indices are as follows:
 * : Intro level
 * : Hub level
 * - : Generic levels
 * : 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  array.

World state flags
The current state of the world is defined by the FWS enum, which has the following possible values: