use ld_addrs.h in load_world_script_api

Renamed from load_map_script_lib
This commit is contained in:
Alex Bates 2020-10-30 15:51:17 +00:00
parent db1ee14d8f
commit debc0016fd
No known key found for this signature in database
GPG Key ID: 5E11C2DB78877706
12 changed files with 130 additions and 134 deletions

View File

@ -99,7 +99,7 @@ glabel load_map_by_IDs
/* 35C60 8005A860 0C01BB50 */ jal strcpy
/* 35C64 8005A864 00000000 */ nop
.L8005A868:
/* 35C68 8005A868 0C0169B0 */ jal load_map_script_lib
/* 35C68 8005A868 0C0169B0 */ jal load_world_script_api
/* 35C6C 8005A86C 00000000 */ nop
/* 35C70 8005A870 8E440008 */ lw $a0, 8($s2)
/* 35C74 8005A874 10800004 */ beqz $a0, .L8005A888

View File

@ -106,7 +106,7 @@ glabel func_80033BC0
/* F150 80033D50 2442F290 */ addiu $v0, $v0, %lo(gPlayerData)
/* F154 80033D54 0C03AC80 */ jal func_800EB200
/* F158 80033D58 80440012 */ lb $a0, 0x12($v0)
/* F15C 80033D5C 0C0169B0 */ jal load_map_script_lib
/* F15C 80033D5C 0C0169B0 */ jal load_world_script_api
/* F160 80033D60 00000000 */ nop
/* F164 80033D64 3C04800E */ lui $a0, 0x800e
/* F168 80033D68 24849230 */ addiu $a0, $a0, -0x6dd0

View File

@ -119,7 +119,7 @@ glabel func_80034C3C
/* 101F8 80034DF8 00000000 */ nop
/* 101FC 80034DFC 0C052B1C */ jal func_8014AC70
/* 10200 80034E00 00000000 */ nop
/* 10204 80034E04 0C0169B0 */ jal load_map_script_lib
/* 10204 80034E04 0C0169B0 */ jal load_world_script_api
/* 10208 80034E08 00000000 */ nop
/* 1020C 80034E0C 3C04800E */ lui $a0, 0x800e
/* 10210 80034E10 24849230 */ addiu $a0, $a0, -0x6dd0

View File

@ -9,6 +9,7 @@ void osCleanupThread(void);
s32 heap_malloc(s32 size);
HeapNode* _heap_create(void* addr, s32 size);
void dma_copy(void* romStart, void* romEnd, void* vramDest);
s32 get_global_byte(s32 index);
s32 get_global_flag(s32 index);

View File

@ -154,10 +154,6 @@ extern s32 D_8009A5D8;
extern u8 D_800779B0;
extern u8 D_800A0963;
extern s32 mapScriptLibStart;
extern s32 mapScriptLibEnd;
extern s32 mapScriptLibVram;
// Scripts
extern Bytecode* SCRIPT_NpcDefeat;
extern Bytecode* ShakeCam1;

View File

@ -1,4 +1,5 @@
#include "common.h"
#include "ld_addrs.h"
INCLUDE_ASM(s32, "code_341d0_len_20d0", func_80058DD0);
@ -42,8 +43,8 @@ INCLUDE_ASM(s32, "code_341d0_len_20d0", remove_all_effects);
INCLUDE_ASM(s32, "code_341d0_len_20d0", play_effect);
void load_map_script_lib(void) {
dma_copy(&mapScriptLibStart, &mapScriptLibEnd, &mapScriptLibVram);
void load_world_script_api(void) {
dma_copy(&world_script_api_ROM_START, &world_script_api_ROM_END, &world_script_api_VRAM);
}
INCLUDE_ASM(s32, "code_341d0_len_20d0", load_map_by_IDs);

@ -1 +1 @@
Subproject commit 037d80e00cb3aeae37bdad77bfac871036982456
Subproject commit fdb44704e6da70d5d2bab3bfc2e307745600fe0d

View File

@ -820,11 +820,13 @@ segments:
files:
- [0x415D90, "c"]
- [0x4200C0, "bin"] # todo split this further
- type: code
- name: world/script_api/
ld_name: world_script_api
type: code
start: 0x7E0E80
vram: 0x80280000
files:
- [0x7e0e80, "c", "code_7e0e80"]
- [0x7e0e80, "c"]
- [0x7E2AA0, "c"]
- [0x7E3700, "c"]
- [0x7e4d00, "bin"]

View File

@ -68,10 +68,6 @@ gBattleState = 0x800DC068;
gBattleStatus = 0x800DC070;
gPauseMenuStrings = 0x8026F778;
mapScriptLibStart = 0x7E0E80;
mapScriptLibEnd = 0x7E73A0;
mapScriptLibVram = 0x80280000;
D_000759B0 = 0x000759B0;
D_000759B0_end = 0x000A5DD0;
D_000A5DD0 = 0x000A5DD0;