Sly 2:Executable: Difference between revisions
→Main loop: Added skeleton of main loop
TheOnlyZac (talk | contribs) (Removed displaytitle) |
TheOnlyZac (talk | contribs) (→Main loop: Added skeleton of main loop) |
||
Line 5:
== Main loop ==
{{Investigate|There's a lot of gaps as many of the core functions haven't been researched yet.}}
The main game loop can be broken down as follows.
* Call an unknown function that takes a pointer to a global struct as an argument.
* <code>UpdateJoy(&g_joy)</code> – Handles [[Sly 2:Input|controller input]]
* <tt>...</tt>
* <code>MarkClockTick(&g_clock)</code> – Updates the global [[Sly 2:Clock|clock]] values
* <tt>...</tt>
* <code>if (DAT_002dd644 == 0)</code> – If the global variable at <tt>0x002dd644</tt> is zero...
** <tt>...</tt>
* Otherwise...
** <tt>...</tt>
* <code>if (DAT_002dd644 != 0)</code> – If the global variable at <tt>002dd644</tt> is not zero..
** <tt>...</tt>
* <code>CloseFrame()</code> – Finishes rendering the frame
* Increment the global frame counter, <code>g_cframe</code>.
This routine continues in an infinite loop unless <code>Exit</code> is called or a handled exception causes execution to halt, in which case you are immediately booted back to the PS2 BIOS.
== Build Strings ==
|