summaryrefslogtreecommitdiff
path: root/arm9/lib/src/GX_load3d.c
diff options
context:
space:
mode:
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();