summaryrefslogtreecommitdiff
path: root/arm9/lib/src/GX_load3d.c
diff options
context:
space:
mode:
authorRevo <projectrevotpp@hotmail.com>2020-05-24 07:00:57 -0400
committerGitHub <noreply@github.com>2020-05-24 07:00:57 -0400
commit94af15fab8e80f61326fc0427c5412e60b0d67ea (patch)
tree9542fdb55f9b183b54ec043aa9f8b2c685bbd7d1 /arm9/lib/src/GX_load3d.c
parent0b01c7d1c57c4e21fdb0069b3ac4f9c7276b3cc1 (diff)
parentb4743f04e30937b19aca974bf2222de8fe3eb36e (diff)
Merge pull request #107 from PikalaxALT/pikalax_work
Split rodata and bss
Diffstat (limited to 'arm9/lib/src/GX_load3d.c')
-rw-r--r--arm9/lib/src/GX_load3d.c49
1 files changed, 37 insertions, 12 deletions
diff --git a/arm9/lib/src/GX_load3d.c b/arm9/lib/src/GX_load3d.c
index 5aa15581..efab53ae 100644
--- a/arm9/lib/src/GX_load3d.c
+++ b/arm9/lib/src/GX_load3d.c
@@ -4,26 +4,51 @@
extern u32 GXi_DmaId;
-extern u32 sTex;
-extern u32 sTexLCDCBlk1;
-extern u32 sTexLCDCBlk2;
-extern u32 sSzTexBlk1;
+static u32 sTexLCDCBlk1 = 0;
+static u32 sSzTexBlk1 = 0;
+static u32 sTexLCDCBlk2 = 0;
+static s32 sTex = 0;
-static const struct _TexStartAddrTable
+static const struct
{
u16 blk1; // 12 bit shift
u16 blk2; // 12 bit shift
u16 szBlk1; // 12 bit shift
+} sTexStartAddrTable[16] = {
+ {0, 0, 0},
+ {0x06800000 >> 12, 0, 0},
+ {0x06820000 >> 12, 0, 0},
+ {0x06800000 >> 12, 0, 0},
+ {0x06840000 >> 12, 0, 0},
+ {0x06800000 >> 12, 0x06840000 >> 12, 0x00020000 >> 12},
+ {0x06820000 >> 12, 0, 0},
+ {0x06800000 >> 12, 0, 0},
+ {0x06860000 >> 12, 0, 0},
+ {0x06800000 >> 12, 0x06860000 >> 12, 0x00020000 >> 12},
+ {0x06820000 >> 12, 0x06860000 >> 12, 0x00020000 >> 12},
+ {0x06800000 >> 12, 0x06860000 >> 12, 0x00040000 >> 12},
+ {0x06840000 >> 12, 0, 0},
+ {0x06800000 >> 12, 0x06840000 >> 12, 0x00020000 >> 12},
+ {0x06820000 >> 12, 0, 0},
+ {0x06800000 >> 12, 0, 0},
};
-extern struct _TexStartAddrTable sTexStartAddrTable[16];
+static s32 sTexPltt = 0;
+static u32 sTexPlttLCDCBlk = 0;
+
+static const u16 sTexPlttStartAddrTable[8] = {
+ 0,
+ 0x06880000 >> 12,
+ 0x06890000 >> 12,
+ 0x06880000 >> 12,
+ 0x06894000 >> 12,
+ 0,
+ 0x06890000 >> 12,
+ 0x06880000 >> 12
+};
-extern u32 sTexPltt;
-extern u32 sTexPlttLCDCBlk;
-extern u16 sTexPlttStartAddrTable[8];
-
-extern s32 sClrImg;
-extern u32 sClrImgLCDCBlk;
+static s32 sClrImg = 0;
+static u32 sClrImgLCDCBlk = 0;
ARM_FUNC void GX_BeginLoadTex(){
u32 temp = GX_ResetBankForTex();