Sly 1:WS

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

Structure
The WS struct is declared as follows:

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

Level states
Each WS stores an array of 9 LS 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 states are blank and ignored.

The level states are always arranged in the  array so the indices are as follows:
 * 0: Intro level
 * 1: Hub level
 * 2-8: Generic levels
 * 9: Boss fight

Because World 5 has no hub level and fewer than 6 generic levels, it is the only World with gaps between levels in the  array.