summaryrefslogtreecommitdiff
path: root/arm9/lib/src
diff options
context:
space:
mode:
Diffstat (limited to 'arm9/lib/src')
-rw-r--r--arm9/lib/src/GX.c9
-rw-r--r--arm9/lib/src/GX_load2d.c14
-rw-r--r--arm9/lib/src/GX_load3d.c28
-rw-r--r--arm9/lib/src/GX_state.c2
-rw-r--r--arm9/lib/src/OS_arena.c5
-rw-r--r--arm9/lib/src/OS_emulator.c2
6 files changed, 30 insertions, 30 deletions
diff --git a/arm9/lib/src/GX.c b/arm9/lib/src/GX.c
index 28c3cc01..b1d62145 100644
--- a/arm9/lib/src/GX.c
+++ b/arm9/lib/src/GX.c
@@ -2,10 +2,11 @@
#include "main.h"
#include "GX.h"
-extern u16 GXi_VRamLockId;
-extern u16 sDispMode;
-extern u32 GXi_DmaId;
-extern u16 sIsDispOn;
+u32 GXi_DmaId = 3;
+vu16 GXi_VRamLockId = 0;
+
+static u16 sDispMode = 0;
+static u16 sIsDispOn = TRUE;
ARM_FUNC void GX_Init(){
reg_GX_POWCNT |= 0x8000;
diff --git a/arm9/lib/src/GX_load2d.c b/arm9/lib/src/GX_load2d.c
index d4def461..2f7c0242 100644
--- a/arm9/lib/src/GX_load2d.c
+++ b/arm9/lib/src/GX_load2d.c
@@ -4,13 +4,13 @@
extern u32 GXi_DmaId;
-extern s32 sSubOBJExtPltt;
-extern s32 sBGExtPltt;
-extern u32 sBGExtPlttLCDCBlk;
-extern u32 sBGExtPlttLCDCOffset;
-extern s32 sOBJExtPltt;
-extern u32 sOBJExtPlttLCDCBlk;
-extern s32 sSubBGExtPltt;
+static s32 sBGExtPltt = 0;
+static u32 sBGExtPlttLCDCBlk = 0;
+static u32 sBGExtPlttLCDCOffset = 0;
+static s32 sOBJExtPltt = 0;
+static u32 sOBJExtPlttLCDCBlk = 0;
+static s32 sSubBGExtPltt = 0;
+static s32 sSubOBJExtPltt = 0;
static inline void *_GX_OBJ_PTR(){
diff --git a/arm9/lib/src/GX_load3d.c b/arm9/lib/src/GX_load3d.c
index 5aa15581..a407eb59 100644
--- a/arm9/lib/src/GX_load3d.c
+++ b/arm9/lib/src/GX_load3d.c
@@ -4,26 +4,24 @@
extern u32 GXi_DmaId;
-extern u32 sTex;
-extern u32 sTexLCDCBlk1;
-extern u32 sTexLCDCBlk2;
-extern u32 sSzTexBlk1;
-
-static const struct _TexStartAddrTable
+struct _TexStartAddrTable
{
u16 blk1; // 12 bit shift
u16 blk2; // 12 bit shift
u16 szBlk1; // 12 bit shift
};
-extern struct _TexStartAddrTable sTexStartAddrTable[16];
-
-
-extern u32 sTexPltt;
-extern u32 sTexPlttLCDCBlk;
-extern u16 sTexPlttStartAddrTable[8];
-
-extern s32 sClrImg;
-extern u32 sClrImgLCDCBlk;
+extern const struct _TexStartAddrTable sTexStartAddrTable[16];
+
+extern const u16 sTexPlttStartAddrTable[8];
+
+static u32 sTexLCDCBlk2 = 0;
+static s32 sTex = 0;
+static u32 sClrImgLCDCBlk = 0;
+static s32 sTexPltt = 0;
+static u32 sTexPlttLCDCBlk = 0;
+static u32 sTexLCDCBlk1 = 0;
+static s32 sClrImg = 0;
+static u32 sSzTexBlk1 = 0;
ARM_FUNC void GX_BeginLoadTex(){
u32 temp = GX_ResetBankForTex();
diff --git a/arm9/lib/src/GX_state.c b/arm9/lib/src/GX_state.c
index 3ca3b266..6b216f39 100644
--- a/arm9/lib/src/GX_state.c
+++ b/arm9/lib/src/GX_state.c
@@ -2,7 +2,7 @@
#include "main.h"
#include "GX.h"
-extern struct GX_State gGXState;
+struct GX_State gGXState;
ARM_FUNC void GX_InitGXState(){
gGXState.lcdc = 0x0;
diff --git a/arm9/lib/src/OS_arena.c b/arm9/lib/src/OS_arena.c
index ae05b49c..31796771 100644
--- a/arm9/lib/src/OS_arena.c
+++ b/arm9/lib/src/OS_arena.c
@@ -7,8 +7,9 @@
#include "OS_protectionRegion.h"
#include "OS_emulator.h"
-extern BOOL OSi_MainExArenaEnabled;
-extern BOOL OSi_Initialized; // TODO: located at 0x021d36f0
+static BOOL OSi_Initialized = FALSE;
+static BOOL OSi_MainExArenaEnabled = FALSE;
+
void SDK_MAIN_ARENA_LO(); // TODO: technically this should be defined in the lcf
extern void SDK_SECTION_ARENA_EX_START(); // TODO: technically this should be defined in the lcf
extern void SDK_SECTION_ARENA_ITCM_START(); // TODO: technically this should be defined in the lcf
diff --git a/arm9/lib/src/OS_emulator.c b/arm9/lib/src/OS_emulator.c
index 1be0e163..c138b2bc 100644
--- a/arm9/lib/src/OS_emulator.c
+++ b/arm9/lib/src/OS_emulator.c
@@ -5,7 +5,7 @@
#include "OS_emulator.h"
#include "function_target.h"
-extern u32 OSi_ConsoleTypeCache; //todo fix bss
+u32 OSi_ConsoleTypeCache = -1u; //todo fix bss
ARM_FUNC BOOL OS_IsRunOnEmulator() {
return FALSE;