From 2c5ad24c3faa207472dae1c75ebfd9da83b1602c Mon Sep 17 00:00:00 2001 From: Roman971 <32455037+Roman971@users.noreply.github.com> Date: Tue, 26 May 2020 14:50:51 +0200 Subject: [PATCH] Migrate z_common_data.c's .bss to C (#157) --- data/z_common_data.bss.s | 19 ------------------- include/variables.h | 2 -- spec | 1 - src/code/z_common_data.c | 4 ++++ 4 files changed, 4 insertions(+), 22 deletions(-) delete mode 100644 data/z_common_data.bss.s diff --git a/data/z_common_data.bss.s b/data/z_common_data.bss.s deleted file mode 100644 index 1cc8194f6e..0000000000 --- a/data/z_common_data.bss.s +++ /dev/null @@ -1,19 +0,0 @@ -.include "macro.inc" - -# assembler directives -.set noat # allow manual use of $at -.set noreorder # don't insert nops after branches -.set gp=64 # allow use of 64-bit general purposee registers - -.section .bss - -# Starts at # 0x8015E660 and has a confirmed size of 0x1428 -# Any address in that range should be an offset to gSaveContext -glabel gSaveContext - .space 0x1428 - -glabel D_8015FA88 - .space 0x4 - -glabel D_8015FA8C - .space 0x4 diff --git a/include/variables.h b/include/variables.h index e6142d0a37..017e7f1d2d 100644 --- a/include/variables.h +++ b/include/variables.h @@ -3386,8 +3386,6 @@ extern u8 D_80157D30[]; //extern ? D_8015E638; //extern ? D_8015E648; extern SaveContext gSaveContext; // 0x8015E660 -extern u32 D_8015FA88; -extern u32 D_8015FA8C; extern GameInfo* gGameInfo; // 0x8015FA90 //extern ? D_8015FA98; //extern ? D_8015FA9B; diff --git a/spec b/spec index 1e40479a87..a78a173cbb 100644 --- a/spec +++ b/spec @@ -303,7 +303,6 @@ beginseg include "build/src/code/z_collision_check.o" include "build/data/z_collision_check.bss.o" include "build/src/code/z_common_data.o" - include "build/data/z_common_data.bss.o" include "build/src/code/z_debug.o" include "build/src/code/z_debug_display.o" include "build/src/code/z_demo.o" diff --git a/src/code/z_common_data.c b/src/code/z_common_data.c index 798f95d8ee..53a2fa82d0 100644 --- a/src/code/z_common_data.c +++ b/src/code/z_common_data.c @@ -1,6 +1,10 @@ #include #include +SaveContext gSaveContext; +u32 D_8015FA88; +u32 D_8015FA8C; + void SaveContext_Init(void) { bzero(&gSaveContext, sizeof(gSaveContext)); D_8015FA88 = 0;