housekeeping
This commit is contained in:
@@ -206,7 +206,7 @@ AncillaAdd_Hookshot:
|
|||||||
- **Logical Grouping**: Organize code into logical sections, with related routines and macros grouped together.
|
- **Logical Grouping**: Organize code into logical sections, with related routines and macros grouped together.
|
||||||
- **Separation of Concerns**: Ensure that each section of code is responsible for a specific task or set of related tasks, avoiding tightly coupled code.
|
- **Separation of Concerns**: Ensure that each section of code is responsible for a specific task or set of related tasks, avoiding tightly coupled code.
|
||||||
- **Modularity**: Write code in a modular way, making it easier to reuse and maintain.
|
- **Modularity**: Write code in a modular way, making it easier to reuse and maintain.
|
||||||
- **Status Registers**: Indent code blocks when using status register operations (PHX, PLX, etc.) to improve readability.
|
- **Status Registers and Stack Operations**: Indent code blocks when using status register operations (REP, SEP, PHX, PLX, etc.) to improve readability.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
@@ -221,6 +221,10 @@ Sprite_Minecart_Main:
|
|||||||
PHX
|
PHX
|
||||||
JSR HandleMinecartMovement
|
JSR HandleMinecartMovement
|
||||||
PLX
|
PLX
|
||||||
|
|
||||||
|
REP #$20
|
||||||
|
LDA !SpriteDirection : STA $00
|
||||||
|
SEP #$20
|
||||||
RTS
|
RTS
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -6,10 +6,11 @@
|
|||||||
#include "app/zelda3/overworld/overworld.h"
|
#include "app/zelda3/overworld/overworld.h"
|
||||||
|
|
||||||
void yaze_check_version(const char* version) {
|
void yaze_check_version(const char* version) {
|
||||||
|
printf("Yaze version: %s\n", version);
|
||||||
auto version_check = yaze::app::core::CheckVersion(version);
|
auto version_check = yaze::app::core::CheckVersion(version);
|
||||||
if (!version_check.ok()) {
|
if (!version_check.ok()) {
|
||||||
// Print the error message to the console for a pure C interface.
|
// Print the error message to the console for a pure C interface.
|
||||||
printf("%s\n", version_check.status().message().c_str());
|
printf("%s\n", version_check.status().message().data());
|
||||||
// Exit the program if the version check fails.
|
// Exit the program if the version check fails.
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user