Extract ast_warp_zone (#136)

* try

* progress

* hasta la vista, baby

* ast_warp_zone matching

* remove symbols from linker

* new version of Torch

* ast_warp_zone
This commit is contained in:
Alejandro Asenjo Nitti 2024-02-18 22:34:56 -03:00 committed by GitHub
parent e3b26ca666
commit 41698a131a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
14 changed files with 67 additions and 38 deletions

2
.gitignore vendored
View File

@ -14,6 +14,8 @@ ctx.c.m2c
*.bin *.bin
src/assets/* src/assets/*
!src/assets/ast_radio.c !src/assets/ast_radio.c
include/assets/*
!include/assets/ast_radio.h
/build /build
tools/mio0 tools/mio0
tools/ido-recomp tools/ido-recomp

View File

@ -63,6 +63,7 @@
"fox_option_assets.h": "c", "fox_option_assets.h": "c",
"mods.h": "c", "mods.h": "c",
"i5.h": "c", "i5.h": "c",
"ast_warp_zone.h": "c"
"sf64audio_provisional.h": "c" "sf64audio_provisional.h": "c"
}, },
"C_Cpp_Runner.msvcBatchPath": "" "C_Cpp_Runner.msvcBatchPath": ""

View File

@ -435,6 +435,7 @@ extract:
assets: assets:
@echo "Extracting assets..." @echo "Extracting assets..."
@$(TORCH) code $(BASEROM_UNCOMPRESSED) @$(TORCH) code $(BASEROM_UNCOMPRESSED)
@$(TORCH) header $(BASEROM_UNCOMPRESSED)
clean: clean:
@git clean -fdx asm/ @git clean -fdx asm/

View File

@ -2,7 +2,12 @@
segments: segments:
seg15: 0xD25100 seg15: 0xD25100
header: header:
code:
- '#include "assets/ast_logo.h"' - '#include "assets/ast_logo.h"'
header:
- '#include "gfx.h"'
- '#include "sf64object.h"'
- '#include "structs.h"'
nintendo_logo: nintendo_logo:
type: TEXTURE type: TEXTURE

View File

@ -0,0 +1,43 @@
:config:
segments:
seg7: 0xBFA740
header:
code:
- '#include "assets/ast_warp_zone.h"'
header:
- '#include "gfx.h"'
- '#include "sf64object.h"'
- '#include "structs.h"'
D_7000000:
{ type: GFX, offset: 0x7000000, symbol: D_7000000 }
D_7000280:
{ type: GFX, offset: 0x7000280, symbol: D_7000280 }
D_70008F0:
{ type: GFX, offset: 0x70008F0, symbol: D_70008F0 }
D_7000260:
{ type: TEXTURE, ctype: u8, format: RGBA16, width: 4, height: 4, offset: 0x7000260, symbol: D_7000260 }
D_7000A30:
{ type: TEXTURE, ctype: u8, format: CI4, width: 32, height: 32, offset: 0x7000A30, symbol: D_7000A30, tlut: 0x7000C30 }
D_7000C30:
{ type: TEXTURE, ctype: u8, format: TLUT, colors: 8, offset: 0x7000C30, symbol: D_7000C30 }
D_7000C40:
{ type: GFX, offset: 0x7000C40, symbol: D_7000C40 }
D_7000E80:
{ type: GFX, offset: 0x7000E80, symbol: D_7000E80 }
D_70010E0:
{ type: GFX, offset: 0x70010E0, symbol: D_70010E0 }
D_7001540:
{ type: GFX, offset: 0x7001540, symbol: D_7001540 }
D_70015D0:
{ type: TEXTURE, ctype: u8, format: RGBA16, width: 32, height: 32, offset: 0x70015D0, symbol: D_70015D0 }

View File

@ -9,3 +9,4 @@ f7475fb11e7e6830f82883412638e8390791ab87:
output: output:
binary: lylat.otr binary: lylat.otr
code: src/assets code: src/assets
headers: include/assets

View File

@ -946,10 +946,10 @@ extern Gfx D_60185E0[];
extern Gfx D_6017550[]; extern Gfx D_6017550[];
// ast_7_ti_2, ast_7_ti_1, ast_warp_zone, ast_versus, ast_ending // ast_7_ti_2, ast_7_ti_1, ast_warp_zone, ast_versus, ast_ending
extern u8 D_7000F10[]; extern u8 D_7000F10[]; // fox_option
extern u8 D_7001030[]; extern u8 D_7001030[]; // fox_option
extern u8 D_7001270[]; extern u8 D_7001270[]; // fox_option
extern Gfx D_7001540[]; extern Gfx D_7001540[]; // fox_bg
extern u8 D_7001DF0[]; extern u8 D_7001DF0[];
extern u8 D_7002110[]; extern u8 D_7002110[];
extern u8 D_7003650[]; extern u8 D_7003650[];

View File

@ -1,10 +0,0 @@
#ifndef AST_LOGO_H
#define AST_LOGO_H
#include "gfx.h"
#include "sf64object.h"
#include "structs.h"
extern u8 gNintendoLogo[];
#endif

View File

@ -1,8 +0,0 @@
#ifndef AST_WARP_ZONE_H
#define AST_WARP_ZONE_H
#include "gfx.h"
#include "sf64object.h"
#include "structs.h"
#endif

View File

@ -65,12 +65,6 @@ extern Gfx D_9012180[];
extern Gfx D_900EFC0[]; extern Gfx D_900EFC0[];
extern Gfx D_601C520[]; extern Gfx D_601C520[];
extern Gfx D_600AF40[]; extern Gfx D_600AF40[];
extern Gfx D_7000000[];
extern Gfx D_7000C40[];
extern Gfx D_70010E0[];
extern Gfx D_7000E80[];
extern Gfx D_70008F0[];
extern Gfx D_7000280[];
extern Gfx D_600AC70[]; extern Gfx D_600AC70[];
extern Gfx D_601A2B0[]; extern Gfx D_601A2B0[];
extern Gfx D_6002500[]; extern Gfx D_6002500[];

View File

@ -1071,11 +1071,6 @@ D_60205D0 = 0x060205D0;
D_9012180 = 0x09012180; D_9012180 = 0x09012180;
D_900EFC0 = 0x0900EFC0; D_900EFC0 = 0x0900EFC0;
D_601C520 = 0x0601C520; D_601C520 = 0x0601C520;
D_7000C40 = 0x07000C40;
D_70010E0 = 0x070010E0;
D_7000E80 = 0x07000E80;
D_70008F0 = 0x070008F0;
D_7000280 = 0x07000280;
D_600AC70 = 0x0600AC70; D_600AC70 = 0x0600AC70;
D_6002500 = 0x06002500; D_6002500 = 0x06002500;
D_60043F0 = 0x060043F0; D_60043F0 = 0x060043F0;

View File

@ -5,6 +5,7 @@ s32 D_800CFF90 = 0;
s32 D_80161690; s32 D_80161690;
#include "fox_enmy2_assets.h" #include "fox_enmy2_assets.h"
#include "assets/ast_warp_zone.h"
void func_8006A7B0(u16* msg, s32 character) { void func_8006A7B0(u16* msg, s32 character) {
PRINTF("Enm->obj.pos.y + tmp_xyz.y=<%10.3f>\n"); PRINTF("Enm->obj.pos.y + tmp_xyz.y=<%10.3f>\n");

@ -1 +1 @@
Subproject commit 5b1e5d632b44cd13282ce98d8dd3c11a5c86d598 Subproject commit 56ade56c1236adcefddf1e97fffee0b1555c0877

View File

@ -147,8 +147,12 @@
start: 0xBC23D0 start: 0xBC23D0
- name: ast_warp_zone #7 - name: ast_warp_zone #7
type: bin type: code
dir: assets
start: 0xBFA740 start: 0xBFA740
vram: 0x07000000
subsegments:
- [0xBFA740, .data, ast_warp_zone/ast_warp_zone]
- name: ast_title #6 - name: ast_title #6
type: bin type: bin
@ -184,7 +188,7 @@
start: 0xD25100 start: 0xD25100
vram: 0x0F000000 vram: 0x0F000000
subsegments: subsegments:
- [0xD25100, .data, ast_logo/bin] - [0xD25100, .data, ast_logo/ast_logo]
- name: ast_ending #7 - name: ast_ending #7
type: bin type: bin