Set Game State

From Spiral Framework
Revision as of 23:35, 23 March 2018 by UnknownGlaze (talk | contribs) (Made the page; Apologies for any awkward sentences, not very good at writing for a Wiki)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Hmmm...
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

When argument 1 is 8, the mode is a room placement function. This determines in what part of the room the player will spawn in upon entering it. More testing is required.