confirmed_editors
16
edits
No edit summary |
AgentMuffin (talk | contribs) mNo edit summary |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 4: | Line 4: | ||
This debug menu was one of the first found in-game with the use of a [[GameShark]]. It displays information on Mario's angle, speed, and action, as well as memory info. | This debug menu was one of the first found in-game with the use of a [[GameShark]]. It displays information on Mario's angle, speed, and action, as well as memory info. | ||
===Access=== | ===Access=== | ||
To enable the classic debug display, enter the appropriate Gameshark code for your version of the game. | To enable the classic debug display, enter the appropriate Gameshark code for your version of the game. | ||
Line 37: | Line 34: | ||
{{clear}} | {{clear}} | ||
==Complex Debug Display== | ==Complex Debug Display== | ||
Line 438: | Line 436: | ||
While the ‘classic display’ shows some variable on a fixed position, there is also a whole system for automatically laying out debug text. The state is stored in a struct: | While the ‘classic display’ shows some variable on a fixed position, there is also a whole system for automatically laying out debug text. The state is stored in a struct: | ||
<syntaxhighlight lang="c"> | |||
typedef struct | typedef struct | ||
{ | { | ||
Line 447: | Line 446: | ||
short line_y_offset, //0x0A equals -15 (top aligned) or +15 (bottom aligned) | short line_y_offset, //0x0A equals -15 (top aligned) or +15 (bottom aligned) | ||
} DprintState; | } DprintState; | ||
</syntaxhighlight> | |||
There are two of these states, one in the top left corner growing down, and one in the bottom right corner growing up. Note that (0, 0) is the bottom left corner and (320, 240) is the top right corner. Now whenever the developers wanted to show a certain variable, they would call a function that automatically ensures it doesn’t overlap with other variables. | There are two of these states, one in the top left corner growing down, and one in the bottom right corner growing up. Note that (0, 0) is the bottom left corner and (320, 240) is the top right corner. Now whenever the developers wanted to show a certain variable, they would call a function that automatically ensures it doesn’t overlap with other variables. |