move some data to C file

This commit is contained in:
camthesaxman 2018-03-07 22:15:39 -06:00
parent 8dd4208108
commit 4a34bc0193
7 changed files with 41 additions and 42 deletions

View File

@ -225821,7 +225821,7 @@ sub_808C964: @ 0x0808C964
movs r0, #0x85
lsls r0, r0, #1
add r0, r8
ldr r4, _0808CA64 @ gUnknown_02028E4B
ldr r4, _0808CA64 @ gUnknown_02028E44+7
ldr r5, _0808CA68 @ 0x00002128
adds r1, r4, #0
adds r2, r5, #0
@ -225856,7 +225856,7 @@ _0808CA54: .4byte gUnknown_020044AC
_0808CA58: .4byte gUnknown_08A1768C
_0808CA5C: .4byte gUnknown_0880B90C
_0808CA60: .4byte gUnknown_0880C4BA
_0808CA64: .4byte gUnknown_02028E4B
_0808CA64: .4byte gUnknown_02028E44+7
_0808CA68: .4byte 0x00002128
_0808CA6C: .4byte gUnknown_0880C479
_0808CA70:
@ -225895,13 +225895,13 @@ _0808CAB8:
bl StoreNumberStringToSmallBuffer
adds r0, r4, #0
adds r0, #0x48
ldr r1, _0808CAD0 @ gUnknown_02028E4B
ldr r1, _0808CAD0 @ gUnknown_02028E44+7
ldr r2, _0808CAD4 @ 0x00002128
movs r3, #2
bl sub_8013138
b _0808CB06
.align 2, 0
_0808CAD0: .4byte gUnknown_02028E4B
_0808CAD0: .4byte gUnknown_02028E44+7
_0808CAD4: .4byte 0x00002128
_0808CAD8:
ldr r1, _0808CB20 @ gUnknown_08A1769C
@ -225919,7 +225919,7 @@ _0808CAD8:
movs r0, #0x85
lsls r0, r0, #1
add r0, r8
ldr r1, _0808CB24 @ gUnknown_02028E4B
ldr r1, _0808CB24 @ gUnknown_02028E44+7
ldr r2, _0808CB28 @ 0x00002128
movs r3, #2
bl sub_8013138
@ -225937,7 +225937,7 @@ _0808CB06:
bx r0
.align 2, 0
_0808CB20: .4byte gUnknown_08A1769C
_0808CB24: .4byte gUnknown_02028E4B
_0808CB24: .4byte gUnknown_02028E44+7
_0808CB28: .4byte 0x00002128
_0808CB2C: .4byte gUnknown_020044EC
_0808CB30: .4byte gUnknown_08A1742C

View File

@ -1,22 +1,10 @@
.section .rodata
.align 2
.align 2, 0
.global gSinLookup
gSinLookup: @ 0x080D751C
.incbin "baserom.gba", 0xD751C, 0x80
.global gCosLookup
gCosLookup: @ 0x080D759C
.incbin "baserom.gba", 0xD759C, 0x200
.global gUnknown_080D779C
gUnknown_080D779C: @ 0x080D779C
.incbin "baserom.gba", 0xD779C, 0x14
.global gUnknown_080D77B0
gUnknown_080D77B0: @ 0x080D77B0
.incbin "baserom.gba", 0xD77B0, 0xC
.global gUnknown_080D77B4
gUnknown_080D77B4: @ 0x080D77B4
.incbin "baserom.gba", 0xD77B4, 0x8
.global gUnknown_080D77BC
gUnknown_080D77BC: @ 0x080D77BC

11
data/trig_rodata.s Normal file
View File

@ -0,0 +1,11 @@
.section .rodata
.align 2
.global gSinLookup
gSinLookup: @ 0x080D751C
.incbin "baserom.gba", 0xD751C, 0x80
.global gCosLookup
gCosLookup: @ 0x080D759C
.incbin "baserom.gba", 0xD759C, 0x200

View File

@ -504,10 +504,10 @@ extern struct Struct02024E5C gUnknown_02024E5C;
// extern ??? gRootProcesses
// extern ??? gUnknown_02026A90
// extern ??? gUnknown_02026E10
// fontgrp
// extern ??? gUnknown_02026E30
extern char gUnknown_02028E44[9];
// extern ??? gUnknown_02028E4B
// extern ??? gUnknown_02028E4C
extern int gUnknown_02028E50;
extern int gUnknown_02028E54;
extern struct Font gDefaultFont;
@ -904,8 +904,6 @@ extern const char gYearProjectCreated[]; // "_2003..."
extern const u16 gUnknown_080D7504[];
extern const s16 gSinLookup[]; // gSinTable
extern const s16 gCosLookup[]; // gCosTable
extern const char gUnknown_080D779C[];
extern const char gUnknown_080D77B0[];
// extern ??? gUnknown_080D77BC
// extern ??? gUnknown_080D77DC
// extern ??? gUnknown_080D77FC

View File

@ -123,7 +123,9 @@ SECTIONS
. = ALIGN(4); src/main.o(.rodata);
. = ALIGN(4); src/rng.o(.rodata);
. = ALIGN(4); src/hardware.o(.rodata);
. = ALIGN(4); data/const_data_D74C8.o(.rodata);
. = ALIGN(4); data/trig_rodata.o(.rodata);
. = ALIGN(4); src/fontgrp.o(.rodata);
. = ALIGN(4); data/face_rodata.o(.rodata);
. = ALIGN(4); src/messdecode.o(.rodata);
. = ALIGN(4); data/const_data_D792C.o(.rodata);
. = ALIGN(4); data/text.o(.rodata);

View File

@ -17,7 +17,14 @@ struct Struct02026E30
char unk14[256][32];
};
extern struct Struct02026E30 gUnknown_02026E30;
EWRAM_DATA struct Struct02026E30 gUnknown_02026E30 = {0};
EWRAM_DATA char gUnknown_02028E44[9] = {0};
EWRAM_DATA int gUnknown_02028E50 = 0;
EWRAM_DATA int gUnknown_02028E54 = 0;
EWRAM_DATA struct Font gDefaultFont = {0};
EWRAM_DATA struct Font *gCurrentFont = 0;
EWRAM_DATA u8 gUnknown_02028E74 = 0;
EWRAM_DATA struct Struct02028E78 gUnknown_02028E78[64] = {0};
void SetupDebugFontForBG(int bg, int tileDataOffset)
{
@ -142,12 +149,13 @@ void sub_800394C(int n, int length)
void StoreNumberHexStringToSmallBuffer(int n)
{
static const char hexDigits[] = "0123456789ABCDEF";
int i;
ClearSmallStringBuffer();
for (i = 7; i >= 0; i--)
{
gUnknown_02028E44[i] = gUnknown_080D779C[(n & 0xF)];
gUnknown_02028E44[i] = hexDigits[(n & 0xF)];
n >>= 4;
if (n == 0)
break;
@ -601,7 +609,7 @@ void Text_AppendDecNumber(struct Text *a, int n)
{
if (n == 0)
{
Text_AppendChar(a, gUnknown_080D77B0);
Text_AppendChar(a, "0");
return;
}
@ -623,7 +631,7 @@ void sub_80040C0(struct Text *a, int n)
if (n == 0)
{
Text_AppendChar(a, gUnknown_080D77B0);
Text_AppendChar(a, "0");
a->x += 8;
return;
}

View File

@ -495,19 +495,11 @@
. = ALIGN(4); src/main.o(ewram_data);
. = ALIGN(4); src/hardware.o(ewram_data);
. = ALIGN(4); src/soundwrapper.o(ewram_data);
. = 0x024E68; src/proc.o(ewram_data);
. = ALIGN(4); src/proc.o(ewram_data);
. = 0x026A90; gUnknown_02026A90 = .;
. = 0x026E10; gUnknown_02026E10 = .;
. = 0x026E30; gUnknown_02026E30 = .;
. = 0x028E44; gUnknown_02028E44 = .;
. = 0x028E4B; gUnknown_02028E4B = .;
. = 0x028E4C; gUnknown_02028E4C = .;
. = 0x028E50; gUnknown_02028E50 = .;
. = 0x028E54; gUnknown_02028E54 = .;
. = 0x028E58; gDefaultFont = .;
. = 0x028E70; gCurrentFont = .;
. = 0x028E74; gUnknown_02028E74 = .;
. = 0x028E78; gUnknown_02028E78 = .;
. = 0x026E30;
. = ALIGN(4); src/fontgrp.o(ewram_data);
. = 0x028F78; gUnknown_02028F78 = .;
. = 0x029D88; gUnknown_02029D88 = .;
. = 0x029D8C; gUnknown_02029D8C = .;