summaryrefslogtreecommitdiff
path: root/src/code
diff options
context:
space:
mode:
authorcadmic <cadmic24@gmail.com>2024-09-03 12:30:14 -0700
committerGitHub <noreply@github.com>2024-09-03 15:30:14 -0400
commit2152d1df2d38f71f3693d73a764c981e54031924 (patch)
tree9834f567e6b1622c056b09f1b57fa7b20c2d03e9 /src/code
parent6f396e7cc8796b8a7f05661e2924f75257520457 (diff)
[ntsc-1.2] Import libleo from Decompollaborate/n64dd (#2104)
* Create stack.h for STACK/STACK_TOP * Import libleo from Decompollaborate/n64dd Co-authored-by: Anghelo Carvajal <angheloalf95@gmail.com> Co-authored-by: Elliptic Ellipsis <elliptic.ellipsis@gmail.com> * Use (unsigned) int when in mdebug * Apply suggestions from code review Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com> * Use && in leocmdex.c * Use proper names for character tables, revert sNonKanjiIndices * Fix incorrect OSMesg casts * Use LEO_ERROR_GOOD even where docs say 0 Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com> * Remove "Presumably" comment * Whitespace * Remove redundant (debug-only) returns --------- Co-authored-by: Anghelo Carvajal <angheloalf95@gmail.com> Co-authored-by: Elliptic Ellipsis <elliptic.ellipsis@gmail.com> Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com>
Diffstat (limited to 'src/code')
-rw-r--r--src/code/fault_gc.c8
-rw-r--r--src/code/fault_n64.c1
-rw-r--r--src/code/kanread.s2
-rw-r--r--src/code/main.c1
4 files changed, 7 insertions, 5 deletions
diff --git a/src/code/fault_gc.c b/src/code/fault_gc.c
index f78bc152d..b7907e61a 100644
--- a/src/code/fault_gc.c
+++ b/src/code/fault_gc.c
@@ -40,6 +40,8 @@
* DPad-Up may be pressed to enable sending fault pages over osSyncPrintf as well as displaying them on-screen.
* DPad-Down disables sending fault pages over osSyncPrintf.
*/
+#pragma increment_block_number "gc-eu:240 gc-eu-mq:240 gc-eu-mq-dbg:224 gc-jp:240 gc-jp-ce:240 gc-jp-mq:240 gc-us:240" \
+ "gc-us-mq:240"
// Include versions.h first and redefine FAULT_VERSION
// This allows this file to compile even when versions.h uses FAULT_N64
@@ -48,12 +50,10 @@
#define FAULT_VERSION FAULT_GC
#include "global.h"
+#include "alloca.h"
#include "fault.h"
+#include "stack.h"
#include "terminal.h"
-#include "alloca.h"
-
-#pragma increment_block_number "gc-eu:64 gc-eu-mq:64 gc-eu-mq-dbg:222 gc-jp:64 gc-jp-ce:64 gc-jp-mq:64 gc-us:64" \
- "gc-us-mq:64"
void FaultDrawer_Init(void);
void FaultDrawer_SetOsSyncPrintfEnabled(u32 enabled);
diff --git a/src/code/fault_n64.c b/src/code/fault_n64.c
index 69ead6441..da9d7bf6f 100644
--- a/src/code/fault_n64.c
+++ b/src/code/fault_n64.c
@@ -6,6 +6,7 @@
#include "global.h"
#include "fault.h"
+#include "stack.h"
#include "terminal.h"
typedef struct FaultMgr {
diff --git a/src/code/kanread.s b/src/code/kanread.s
index 8f35b713b..a163f9ead 100644
--- a/src/code/kanread.s
+++ b/src/code/kanread.s
@@ -23,7 +23,7 @@
* @param sjis Shift-JIS Codepoint of glyph.
* @return s32 offset into `kanji` file.
*
- * @remark Original name: "LeoGetKadr"
+ * @remark Almost identical to "LeoGetKadr" from libleo.
*/
LEAF(Kanji_OffsetFromShiftJIS)
// Characters with codepoints >= 0x8800 are kanji. Arrangement is regular,
diff --git a/src/code/main.c b/src/code/main.c
index fa6b5f672..ce1739a5c 100644
--- a/src/code/main.c
+++ b/src/code/main.c
@@ -1,5 +1,6 @@
#include "global.h"
#include "fault.h"
+#include "stack.h"
#include "terminal.h"
#include "versions.h"
#if PLATFORM_N64