From 09eb26569c0c5e9b733a3c4f33bcf876e48dc0be Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Fri, 22 May 2020 16:25:42 -0400 Subject: Distribute bss_2 to code files --- arm9/lib/src/GX_load3d.c | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) (limited to 'arm9/lib/src/GX_load3d.c') 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(); -- cgit v1.2.3 From d1063c084aeac60c98b40c3ef1ea36c9bfbd273a Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sat, 23 May 2020 16:42:42 -0400 Subject: Finish distributing rom2_2.s --- arm9/lib/src/GX_load3d.c | 45 ++++++++++++++++++++++++++++++++++++--------- 1 file changed, 36 insertions(+), 9 deletions(-) (limited to 'arm9/lib/src/GX_load3d.c') diff --git a/arm9/lib/src/GX_load3d.c b/arm9/lib/src/GX_load3d.c index a407eb59..efab53ae 100644 --- a/arm9/lib/src/GX_load3d.c +++ b/arm9/lib/src/GX_load3d.c @@ -4,24 +4,51 @@ extern u32 GXi_DmaId; -struct _TexStartAddrTable +static u32 sTexLCDCBlk1 = 0; +static u32 sSzTexBlk1 = 0; +static u32 sTexLCDCBlk2 = 0; +static s32 sTex = 0; + +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 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 const u16 sTexPlttStartAddrTable[8] = { + 0, + 0x06880000 >> 12, + 0x06890000 >> 12, + 0x06880000 >> 12, + 0x06894000 >> 12, + 0, + 0x06890000 >> 12, + 0x06880000 >> 12 +}; + static s32 sClrImg = 0; -static u32 sSzTexBlk1 = 0; +static u32 sClrImgLCDCBlk = 0; ARM_FUNC void GX_BeginLoadTex(){ u32 temp = GX_ResetBankForTex(); -- cgit v1.2.3