Set Game State
To do: Touch up the wording of the article to match it up with that of the rest of the Wiki |
The 0x33 opcode is a multipurpose opcode that is used several times in the game with different effects depending on the arguments. It has 4 arguments that are as follows:
- Argument 1: Mode
- Argument 2: Unknown
- Argument 3: Optional Reset Counter (for arg4 values above 255)
- Argument 4: Variable
The article itself will be split into sections based on argument 1, since argument 1 is what determines the effect 0x33 has on the game. Argument 4 is typically the variable of a mode, where changing this will affect the game based on what the code is.
0 : Time of Day
When argument 1 is 0, the mode is time of day. The only value that seems to result in a change is argument 4, and only causes changes with a few values.
Argument 4 | Effect |
---|---|
0 | Daytime |
1 | Nighttime |
2 | Morning |
3 | Midnight |
4 | Time Unknown |
5 | Blue slash replaces the time; Normal nighttime theme |
6 and onward | White block covers the time; Normal daytime theme |
5/6 : Wait
When argument 1 is 5 or 6, the mode is a wait function of sorts. Put simply, the game will wait at a designated point in the code for this amount of frames:
Arg4 + (Arg3 * 255)
8 : Room Placement
Mode 8 is used to determine where the player will appear in the next room. The meaning of argument 4 depends on the map being loaded. For instance, when exiting classroom 1-A, this code is run:
0x33|8, 0, 0, 2
This tells the game that when the next room loads, the player should be positioned outside room 1-A. The "position IDs" for each room are currently unknown.