diff --git a/assets/yaml/us/ast_arwing.yaml b/assets/yaml/us/ast_arwing.yaml new file mode 100644 index 00000000..73846644 --- /dev/null +++ b/assets/yaml/us/ast_arwing.yaml @@ -0,0 +1,220 @@ +:config: + segments: + - [0x3, 0x8BFC00] + header: + code: + - '#include "assets/ast_arwing.h"' + header: + - '#include "gfx.h"' + - '#include "sf64object.h"' + - '#include "structs.h"' + +D_arwing_3000000: + { type: TEXTURE, format: CI4, offset: 0x3000000, width: 16, height: 16, ctype: u8, tlut: 0x3000080, symbol: D_arwing_3000000 } + +D_arwing_3000080: + { type: TEXTURE, format: TLUT, offset: 0x3000080, colors: 8, ctype: u16, symbol: D_arwing_3000080 } + +D_arwing_3000090: + { type: GFX, offset: 0x3000090, symbol: D_arwing_3000090 } + +PAD_3001C88: + { type: BLOB, offset: 0x3001C88, size: 0x8, symbol: PAD_3001C88 } + +D_3001C90: + { type: GFX, offset: 0x3001C90, symbol: D_3001C90 } + +D_3003960: + { type: TEXTURE, format: RGBA16, offset: 0x3003960, width: 8, height: 8, ctype: u16, symbol: D_3003960 } + +D_30039E0: + { type: TEXTURE, format: RGBA16, offset: 0x30039E0, width: 8, height: 8, ctype: u16, symbol: D_30039E0 } + +D_3003A60: + { type: TEXTURE, format: RGBA16, offset: 0x3003A60, width: 8, height: 8, ctype: u16, symbol: D_3003A60 } + +D_3003AE0: + { type: TEXTURE, format: RGBA16, offset: 0x3003AE0, width: 8, height: 8, ctype: u16, symbol: D_3003AE0 } + +D_3003B60: + { type: TEXTURE, format: RGBA16, offset: 0x3003B60, width: 8, height: 8, ctype: u16, symbol: D_3003B60 } + +D_3003BE0: + { type: TEXTURE, format: RGBA16, offset: 0x3003BE0, width: 8, height: 8, ctype: u16, symbol: D_3003BE0 } + +D_3003C60: + { type: TEXTURE, format: RGBA16, offset: 0x3003C60, width: 8, height: 8, ctype: u16, symbol: D_3003C60 } + +D_3003CE0: + { type: GFX, offset: 0x3003CE0, symbol: D_3003CE0 } + +D_3005AB0: + { type: GFX, offset: 0x3005AB0, symbol: D_3005AB0 } + +D_30074D0: + { type: TEXTURE, format: RGBA16, offset: 0x30074D0, width: 8, height: 8, ctype: u16, symbol: D_30074D0 } + +D_3007550: + { type: TEXTURE, format: RGBA16, offset: 0x3007550, width: 8, height: 8, ctype: u16, symbol: D_3007550 } + +D_30075D0: + { type: TEXTURE, format: RGBA16, offset: 0x30075D0, width: 8, height: 8, ctype: u16, symbol: D_30075D0 } + +D_3007650: + { type: GFX, offset: 0x3007650, symbol: D_3007650 } + +ast_arwing_seg3_vtx_7A20: + { type: VTX, offset: 0x3007A20, count: 244, symbol: ast_arwing_seg3_vtx_7A20 } + +D_3008960: + { type: TEXTURE, format: RGBA16, offset: 0x3008960, width: 64, height: 32, ctype: u16, symbol: D_3008960 } + +D_3009960: + { type: TEXTURE, format: RGBA16, offset: 0x3009960, width: 16, height: 16, ctype: u16, symbol: D_3009960 } + +D_3009B60: + { type: GFX, offset: 0x3009B60, symbol: D_3009B60 } + +D_300AC48: + { type: TEXTURE, format: RGBA16, offset: 0x300AC48, width: 32, height: 32, ctype: u16, symbol: D_300AC48 } + +D_300B448: + { type: TEXTURE, format: RGBA16, offset: 0x300B448, width: 32, height: 32, ctype: u16, symbol: D_300B448 } + +D_300BC48: + { type: TEXTURE, format: RGBA16, offset: 0x300BC48, width: 32, height: 32, ctype: u16, symbol: D_300BC48 } + +D_300C448: + { type: TEXTURE, format: RGBA16, offset: 0x300C448, width: 32, height: 32, ctype: u16, symbol: D_300C448 } + +D_300CC48: + { type: TEXTURE, format: RGBA16, offset: 0x300CC48, width: 32, height: 32, ctype: u16, symbol: D_300CC48 } + +D_300D448: + { type: TEXTURE, format: RGBA16, offset: 0x300D448, width: 32, height: 32, ctype: u16, symbol: D_300D448 } + +D_300DC48: + { type: TEXTURE, format: RGBA16, offset: 0x300DC48, width: 32, height: 32, ctype: u16, symbol: D_300DC48 } + +D_300E448: + { type: TEXTURE, format: RGBA16, offset: 0x300E448, width: 32, height: 32, ctype: u16, symbol: D_300E448 } + +D_300EC48: + { type: TEXTURE, format: RGBA16, offset: 0x300EC48, width: 32, height: 32, ctype: u16, symbol: D_300EC48 } + +D_300F448: + { type: TEXTURE, format: RGBA16, offset: 0x300F448, width: 64, height: 32, ctype: u16, symbol: D_300F448 } + +D_3010448: + { type: TEXTURE, format: RGBA16, offset: 0x3010448, width: 64, height: 32, ctype: u16, symbol: D_3010448, pad: 0x8 } + +# D_3011448: +# { type: GFX, offset: 0x3011448, symbol: D_3011448 } + +D_3011720: + { type: GFX, offset: 0x3011720, symbol: D_3011720 } + +D_30119F0: + { type: TEXTURE, format: RGBA16, offset: 0x30119F0, width: 32, height: 32, ctype: u16, symbol: D_30119F0 } + +D_30121F0: + { type: TEXTURE, format: RGBA16, offset: 0x30121F0, width: 32, height: 32, ctype: u16, symbol: D_30121F0 } + +D_30129F0: + { type: TEXTURE, format: RGBA16, offset: 0x30129F0, width: 32, height: 32, ctype: u16, symbol: D_30129F0 } + +D_30131F0: + { type: GFX, offset: 0x30131F0, symbol: D_30131F0 } + +D_30137E8: + { type: TEXTURE, format: RGBA16, offset: 0x30137E8, width: 32, height: 32, ctype: u16, symbol: D_30137E8 } + +D_3013FE8: + { type: TEXTURE, format: RGBA16, offset: 0x3013FE8, width: 32, height: 32, ctype: u16, symbol: D_3013FE8 } + +D_30147E8: + { type: TEXTURE, format: RGBA16, offset: 0x30147E8, width: 16, height: 32, ctype: u16, symbol: D_30147E8 } + +D_3014BE8: + { type: GFX, offset: 0x3014BE8, symbol: D_3014BE8 } + +D_3014F20: + { type: TEXTURE, format: RGBA16, offset: 0x3014F20, width: 16, height: 16, ctype: u16, symbol: D_3014F20 } + +D_3015120: + { type: GFX, offset: 0x3015120, symbol: D_3015120 } + +PAD_30155D8: + { type: BLOB, offset: 0x30155D8, size: 0x8, symbol: PAD_30155D8 } + +PAD_3015728: + { type: BLOB, offset: 0x3015728, size: 0x8, symbol: PAD_3015728 } + +PAD_3015878: + { type: BLOB, offset: 0x3015878, size: 0x8, symbol: PAD_3015878 } + +PAD_30159C8: + { type: BLOB, offset: 0x30159C8, size: 0x8, symbol: PAD_30159C8 } + +D_3015AF4: + { type: SF64:ANIM, offset: 0x3015AF4, symbol: D_3015AF4 } + +D_3015C28: + { type: SF64:ANIM, offset: 0x3015C28, symbol: D_3015C28 } + +PAD_3015C34: + { type: BLOB, offset: 0x3015C34, size: 0xC, symbol: PAD_3015C34 } + +D_3015D68: + { type: SF64:ANIM, offset: 0x3015D68, symbol: D_3015D68 } + +PAD_3015D74: + { type: BLOB, offset: 0x3015D74, size: 0xC, symbol: PAD_3015D74 } + +D_3015D80: + { type: GFX, offset: 0x3015D80, symbol: D_3015D80 } + +PAD_3016298: + { type: BLOB, offset: 0x3016298, size: 0x8, symbol: PAD_3016298 } + +D_30163C4: + { type: SF64:ANIM, offset: 0x30163C4, symbol: D_30163C4 } + +D_3016610: + { type: SF64:SKELETON, offset: 0x3016610, symbol: D_3016610 } + +PAD_301665C: + { type: BLOB, offset: 0x301665C, size: 0x4, symbol: PAD_301665C } + +D_3016B28: + { type: GFX, offset: 0x3016B28, symbol: D_3016B28 } + +D_3016BB8: + { type: TEXTURE, format: IA8, offset: 0x3016BB8, width: 16, height: 16, ctype: u8, symbol: D_3016BB8 } + +D_3016CB8: + { type: GFX, offset: 0x3016CB8, symbol: D_3016CB8 } + +D_30182C8: + { type: TEXTURE, format: RGBA16, offset: 0x30182C8, width: 8, height: 8, ctype: u16, symbol: D_30182C8 } + +D_3018348: + { type: TEXTURE, format: RGBA16, offset: 0x3018348, width: 8, height: 8, ctype: u16, symbol: D_3018348 } + +D_30183C8: + { type: GFX, offset: 0x30183C8, symbol: D_30183C8 } + +D_30184D8: + { type: TEXTURE, format: RGBA16, offset: 0x30184D8, width: 32, height: 32, ctype: u16, symbol: D_30184D8 } + +D_3018CD8: + { type: TEXTURE, format: RGBA16, offset: 0x3018CD8, width: 64, height: 16, ctype: u16, symbol: D_3018CD8 } + +D_30194D8: + { type: GFX, offset: 0x30194D8, symbol: D_30194D8 } + +D_30195E8: + { type: TEXTURE, format: RGBA16, offset: 0x30195E8, width: 32, height: 32, ctype: u16, symbol: D_30195E8 } + +PAD_3019DE8: + { type: BLOB, offset: 0x3019DE8, size: 0x8, symbol: PAD_3019DE8 } \ No newline at end of file diff --git a/assets/yaml/us/ast_blue_marine.yaml b/assets/yaml/us/ast_blue_marine.yaml index b445660f..195a8a65 100644 --- a/assets/yaml/us/ast_blue_marine.yaml +++ b/assets/yaml/us/ast_blue_marine.yaml @@ -9,16 +9,16 @@ - '#include "sf64object.h"' - '#include "structs.h"' -D_3000000: - { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 16, offset: 0x3000000, symbol: D_3000000, tlut: 0x3000080 } +D_blue_marine_3000000: + { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 16, offset: 0x3000000, symbol: D_blue_marine_3000000, tlut: 0x3000080 } -D_3000080: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 8, offset: 0x3000080, symbol: D_3000080 } +D_blue_marine_3000080: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 8, offset: 0x3000080, symbol: D_blue_marine_3000080 } -D_3000090: +D_3000090: { type: TEXTURE, ctype: u8, format: CI4, width: 32, height: 9, offset: 0x3000090, symbol: D_3000090, tlut: 0x3000120 } -D_3000120: +D_3000120: { type: TEXTURE, ctype: u16, format: TLUT, colors: 8, offset: 0x3000120, symbol: D_3000120 } D_3000130: @@ -30,7 +30,7 @@ ast_blue_marine_seg3_vtx_00000418: D_3000470: { type: GFX, offset: 0x3000470, symbol: D_3000470 } -D_30005E8: +D_30005E8: { type: BLOB, size: 24, offset: 0x30005E8, symbol: D_30005E8 } D_3000600: @@ -42,7 +42,7 @@ D_3000640: D_3000660: { type: GFX, offset: 0x3000660, symbol: D_3000660 } -D_30006E8: +D_30006E8: { type: TEXTURE, ctype: u8, format: IA8, width: 32, height: 32, offset: 0x30006E8, symbol: D_30006E8, pad: 2 } D_3000AF0: diff --git a/config.yml b/config.yml index 6874efd0..451b1cab 100644 --- a/config.yml +++ b/config.yml @@ -6,8 +6,11 @@ f7475fb11e7e6830f82883412638e8390791ab87: config: gbi: F3DEX sort: OFFSET + logging: ERROR output: binary: lylat.otr code: src/assets headers: include/assets - modding: src/assets \ No newline at end of file + modding: src/assets + enums: + - include/sf64object.h \ No newline at end of file diff --git a/include/assets.h b/include/assets.h index 8455bb80..162a864e 100644 --- a/include/assets.h +++ b/include/assets.h @@ -89,32 +89,31 @@ extern Gfx D_1031EC0[]; extern Gfx D_1032780[]; // ast_arwing, ast_landmaster, ast_blue_marine, ast_vs_player +extern u8 D_3000000[]; +extern u16 D_3000080[]; +extern u8 D_30001E0[]; +extern u16 D_3000380[]; +extern u8 D_30003A0[]; +extern u16 D_30004E0[]; +extern u8 D_3000510[]; +extern Gfx D_3000660[]; +extern u8 D_30006D0[]; +extern u16 D_30006A0[]; +extern u16 D_3000810[]; +extern u8 D_30013E0[]; +extern u8 D_3001420[]; +extern u16 D_3000BC0[]; extern Gfx D_3006940[]; +extern u8 D_3004010[]; +extern u16 D_3003E20[]; +extern u16 D_3004D58[]; extern Gfx D_301AD60[]; extern Gfx D_301AEF0[]; extern Gfx D_302D120[]; -extern u8 D_3000000[]; -extern u16 D_3000080[]; -extern Gfx D_3000090[]; -extern u8 D_30001E0[]; -extern u16 D_3000380[]; -extern u8 D_30003A0[]; -extern u16 D_30004E0[]; -extern u8 D_3000510[]; -extern Gfx D_3000660[]; -extern u16 D_30006A0[]; -extern u8 D_30006D0[]; -extern u16 D_3000810[]; -extern u16 D_3000BC0[]; -extern u8 D_30013E0[]; -extern u8 D_3001420[]; -extern u16 D_3003E20[]; -extern u8 D_3004010[]; -extern u16 D_3004D58[]; -extern u8 D_3006C60[]; extern u16 D_3007500[]; -extern u8 D_300A470[]; +extern u8 D_3006C60[]; extern u16 D_300B218[]; +extern u8 D_300A470[]; diff --git a/include/assets/ast_arwing.h b/include/assets/ast_arwing.h deleted file mode 100644 index 2cfeeef6..00000000 --- a/include/assets/ast_arwing.h +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef AST_ARWING_H -#define AST_ARWING_H - -#include "gfx.h" -#include "sf64object.h" -#include "structs.h" - -#endif diff --git a/linker_scripts/us/undefined_syms.ld b/linker_scripts/us/undefined_syms.ld index c3f2b322..be944d17 100644 --- a/linker_scripts/us/undefined_syms.ld +++ b/linker_scripts/us/undefined_syms.ld @@ -87,6 +87,8 @@ D_200F080 = 0x0200F080; D_200F910 = 0x0200F910; D_20101A0 = 0x020101A0; +D_3000000 = 0x03000000; +D_3000080 = 0x03000080; D_3001C90 = 0x03001C90; D_3003CE0 = 0x03003CE0; D_3007650 = 0x03007650; diff --git a/src/main/fox_display.c b/src/main/fox_display.c index e6686032..56e6ddb0 100644 --- a/src/main/fox_display.c +++ b/src/main/fox_display.c @@ -12,6 +12,7 @@ Vec3f D_80161578[4]; f32 D_801615A8[4]; f32 D_801615B8[4]; +#include "assets/ast_arwing.h" #include "assets/ast_allies.h" s32 D_800CA220 = 0; @@ -276,7 +277,7 @@ void func_80052884(Player* player) { Matrix_Push(&gGfxMatrix); if (!gVersusMode) { - gSPDisplayList(gMasterDisp++, D_3000090); + gSPDisplayList(gMasterDisp++, D_arwing_3000090); } else { gSPDisplayList(gMasterDisp++, D_300FB80); } @@ -310,7 +311,7 @@ void func_80052884(Player* player) { Matrix_Pop(&gGfxMatrix); } -Gfx* D_800CA26C[] = { D_3000090, D_3016CC0, D_3005AB0, D_3003CE0 }; +Gfx* D_800CA26C[] = { D_arwing_3000090, D_3016CC0, D_3005AB0, D_3003CE0 }; Gfx* D_800CA27C[] = { D_3001C90, D_3016CC0, D_3005AB0, D_3003CE0 }; f32 D_800CA28C = 2.0f; f32 D_800CA290 = 13.0f; diff --git a/src/main/fox_hud.c b/src/main/fox_hud.c index 959d4a6c..108ca73b 100644 --- a/src/main/fox_hud.c +++ b/src/main/fox_hud.c @@ -1,6 +1,7 @@ #include "prevent_bss_reordering.h" #include "sf64math.h" +#include "assets/ast_blue_marine.h" // BSS section range: // D_801616A0 <==> D_80161910 @@ -118,6 +119,7 @@ extern u8 D_6002890[]; extern Gfx D_6003090[]; extern u8 D_C000A80[]; +#include "assets/ast_arwing.h" #include "assets/ast_bg_space.h" #include "assets/ast_bg_planet.h" #include "assets/ast_allies.h" @@ -161,13 +163,13 @@ Gfx D_800D1A40[] = { void func_80084930(f32 arg0, f32 arg1, s32 arg2) { u8* D_800D1A58[] = { - D_3000000, - D_3000000, + D_arwing_3000000, + D_blue_marine_3000000, D_3000000, }; u16* D_800D1A64[] = { - D_3000080, - D_3000080, + D_arwing_3000080, + D_blue_marine_3000080, D_3000080, }; Player* player; @@ -946,8 +948,8 @@ void func_80086DCC(void) { } void func_80087530(f32 x, f32 y, s32 number) { - u8* D_800D1D00[] = { D_3000000, D_3000000, D_3000000 }; - u16* D_800D1D0C[] = { D_3000080, D_3000080, D_3000080 }; + u8* D_800D1D00[] = { D_arwing_3000000, D_blue_marine_3000000, D_3000000 }; + u16* D_800D1D0C[] = { D_arwing_3000080, D_blue_marine_3000080, D_3000080 }; Player* player = &gPlayer[0]; f32 x0; f32 x1; diff --git a/yamls/us/assets.yaml b/yamls/us/assets.yaml index 99ceca27..d52ee991 100644 --- a/yamls/us/assets.yaml +++ b/yamls/us/assets.yaml @@ -35,8 +35,12 @@ - name: ast_arwing exclusive_ram_id: segment_03 - type: bin + type: code + dir: assets start: 0x8BFC00 + vram: 0x03000000 + subsegments: + - [0x8BFC00, .data, ast_arwing/ast_arwing] - name: ast_landmaster exclusive_ram_id: segment_03