Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions config/assets.pspeu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -503,3 +503,27 @@ files:
- [0x80, skip]
- [0xF5F8, layers, layers]
- [0xF6E8, skip]
- target: disks/pspeu/PSP_GAME/USRDIR/res/ps/PSPBIN/w0_000.bin
asset_path: assets/weapon
src_path: src/weapon
splat_config_path: config/splat.pspeu.w0_000.yaml
segments:
- start: 0x80
vram: 0x092F2E80
assets:
- [0x80, skip]
- [0x700, spriteset, w0/w_000_1] # should be namespaced
- [0x1248, spriteset, w0/w_000_2] # should be namespaced
- [0x1248, skip]
- target: disks/pspeu/PSP_GAME/USRDIR/res/ps/PSPBIN/w1_000.bin
asset_path: assets/weapon
src_path: src/weapon
splat_config_path: config/splat.pspeu.w1_000.yaml
segments:
- start: 0x80
vram: 0x092F6C80
assets:
- [0x80, skip]
- [0x708, spriteset, w1/w_000_1] # should be namespaced
- [0x1250, spriteset, w1/w_000_2] # should be namespaced
- [0x1250, skip]
3 changes: 3 additions & 0 deletions config/check.pspeu.sha
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@ f40689641eda2ab9de69b6aed15a200717827628 build/pspeu/st0.bin
0584ddb3ba1afce61592d43497212fcb8ebf797b build/pspeu/wrp.bin
c8c34ac1d46b31e2e5336df271aa2409f44c9d01 build/pspeu/tt_000.bin
38fdfe8c3e0e3260e8462aaaf2261d7d6a4b8961 build/pspeu/sel.bin
bc20b2683492352905317f0634b4db6b84f9985d build/pspeu/w0_000.bin
ae247d10da2a0c34ace1b73208b918e170883deb build/pspeu/w1_000.bin
eab66ff03cd2ff3c5c011e84f06b2b2943ca06d9 build/pspeu/w1_012.bin
49 changes: 49 additions & 0 deletions config/splat.pspeu.w0_000.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
options:
platform: psp
basename: w0_000
base_path: ..
build_path: build/pspeu/weapon0
target_path: disks/pspeu/PSP_GAME/USRDIR/res/ps/PSPBIN/w0_000.bin
asm_path: asm/pspeu/weapon/w0_000
asset_path: assets/weapon
src_path: src/weapon
ld_script_path: build/pspeu/w0_000.ld
compiler: GCC
symbol_addrs_path:
- config/symbols.pspeu.txt
- config/symbols.pspeu.weapon.txt
- config/symbols.pspeu.w0_000.txt
undefined_funcs_auto_path: config/undefined_funcs_auto.pspeu.w0_000.txt
undefined_syms_auto_path: config/undefined_syms_auto.pspeu.w0_000.txt
find_file_boundaries: true
use_legacy_include_asm: false
migrate_rodata_to_functions: true
asm_jtbl_label_macro: jlabel
symbol_name_format: pspeu_$VRAM
section_order:
- .text
- .data
- .rodata
- .bss
ld_bss_is_noload: true
disasm_unknown: true
disassemble_all: true
global_vram_start: 0x8000000
asm_inc_header: |
.set noat /* allow manual use of $at */
.set noreorder /* don't insert nops after branches */
sha1: bc20b2683492352905317f0634b4db6b84f9985d
segments:
- [0x0, bin, w0_000_mwo_header]
- name: w0_000
type: code
start: 0x80
vram: 0x092F2E80
bss_size: 0x80
align: 128
subalign: 8
subsegments:
- [0x80, c, w_000]
- [0x6CC, .data, w_000]
- {start: 0x1980, type: bss, vram: 0x92F4780}
- [0x1980]
49 changes: 49 additions & 0 deletions config/splat.pspeu.w1_000.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
options:
platform: psp
basename: w1_000
base_path: ..
build_path: build/pspeu/weapon1
target_path: disks/pspeu/PSP_GAME/USRDIR/res/ps/PSPBIN/w1_000.bin
asm_path: asm/pspeu/weapon/w1_000
asset_path: assets/weapon1
src_path: src/weapon
ld_script_path: build/pspeu/w1_000.ld
compiler: GCC
symbol_addrs_path:
- config/symbols.pspeu.txt
- config/symbols.pspeu.weapon.txt
- config/symbols.pspeu.w1_000.txt
undefined_funcs_auto_path: config/undefined_funcs_auto.pspeu.w1_000.txt
undefined_syms_auto_path: config/undefined_syms_auto.pspeu.w1_000.txt
find_file_boundaries: true
use_legacy_include_asm: false
migrate_rodata_to_functions: true
asm_jtbl_label_macro: jlabel
symbol_name_format: pspeu_$VRAM
section_order:
- .text
- .data
- .rodata
- .bss
ld_bss_is_noload: true
disasm_unknown: true
disassemble_all: true
global_vram_start: 0x8000000
asm_inc_header: |
.set noat /* allow manual use of $at */
.set noreorder /* don't insert nops after branches */
sha1: ae247d10da2a0c34ace1b73208b918e170883deb
segments:
- [0x0, bin, w1_000_mwo_header]
- name: w1_000
type: code
start: 0x80
vram: 0x092F6C80
bss_size: 0
align: 128
subalign: 8
subsegments:
- [0x80, c, w_000]
- [0x700, .data, w_000]
- {start: 0x1980, type: bss, vram: 0x92F8580}
- [0x1980]
49 changes: 49 additions & 0 deletions config/splat.pspeu.w1_012.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
options:
platform: psp
basename: w1_012
base_path: ..
build_path: build/pspeu/weapon1
target_path: disks/pspeu/PSP_GAME/USRDIR/res/ps/PSPBIN/w1_012.bin
asm_path: asm/pspeu/weapon/w1_012_psp
asset_path: assets/weapon1
src_path: src/weapon
ld_script_path: build/pspeu/w1_012.ld
compiler: GCC
symbol_addrs_path:
- config/symbols.pspeu.txt
- config/symbols.pspeu.w1_012.txt
undefined_funcs_auto_path: config/undefined_funcs_auto.pspeu.w1_012.txt
undefined_syms_auto_path: config/undefined_syms_auto.pspeu.w1_012.txt
find_file_boundaries: true
use_legacy_include_asm: false
migrate_rodata_to_functions: true
asm_jtbl_label_macro: jlabel
symbol_name_format: pspeu_$VRAM
section_order:
- .text
- .data
- .rodata
- .bss
ld_bss_is_noload: true
disasm_unknown: true
disassemble_all: true
global_vram_start: 0x8000000
asm_inc_header: |
.set noat /* allow manual use of $at */
.set noreorder /* don't insert nops after branches */
sha1: eab66ff03cd2ff3c5c011e84f06b2b2943ca06d9
segments:
- [0x0, bin, w1_012_mwo_header]
- name: w1_012
type: code
start: 0x80
vram: 0x092F6C80
bss_size: 0x80
align: 128
subalign: 8
subsegments:
- [0x80, c, w1_012]
- [0x1900, data]
# - [0x23D8, .rodata, w1_012]
- {start: 0x2480, type: bss, vram: 0x92F9080}
- [0x2480]
Empty file added config/symbols.pspeu.w0_000.txt
Empty file.
Empty file added config/symbols.pspeu.w1_000.txt
Empty file.
1 change: 1 addition & 0 deletions config/symbols.pspeu.w1_012.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
w1_012_Load = 0x092F8450;
Empty file added config/symbols.pspeu.weapon.txt
Empty file.
2 changes: 2 additions & 0 deletions config/symexport.pspeu.w0_000.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
EXTERN(_binary_assets_weapon_w0_000_mwo_header_bin_start)
EXTERN(w0_000_Load)
2 changes: 2 additions & 0 deletions config/symexport.pspeu.w1_000.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
EXTERN(_binary_assets_weapon1_w1_000_mwo_header_bin_start)
EXTERN(w0_000_Load)
2 changes: 2 additions & 0 deletions config/symexport.pspeu.w1_012.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
EXTERN(_binary_assets_weapon1_w1_012_mwo_header_bin_start)
EXTERN(w1_012_Load)
13 changes: 0 additions & 13 deletions player.ld

This file was deleted.

27 changes: 10 additions & 17 deletions src/weapon/shared.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,9 @@ static void LoadWeaponPalette(s32 clutIndex) {
u16* dst;
s32 i;

#if !defined(W_029)
dst = src = g_WeaponCluts[clutIndex];
dst = D_8006EDCC[g_HandId];
#else
dst = D_8006EDCC[g_HandId];
dst = (u16*)&((u16*)g_Clut)[(((g_HandId * 0x18) + 0x110) * 0x10)];
src = g_WeaponCluts[clutIndex];
#endif

if (src == NULL) {
return;
}
Expand All @@ -24,22 +20,17 @@ static void LoadWeaponPalette(s32 clutIndex) {
*dst++ = *src++;
}

#if !defined(W_029)
dstRect.w = 0x100;
dstRect.h = 3;
dstRect.x = 0;
dstRect.y = 0xF1;
#else
dstRect.x = 0;
dstRect.w = 0x100;
dstRect.h = 3;
dstRect.y = 0xF1;
#endif
LoadImage(&dstRect, &D_8006EDCC);

dst = (u16*)&((u16*)g_Clut)[0x1100];
LoadImage(&dstRect, (u_long*)dst);
}

static void SetSpriteBank1(SpriteParts* animset) {
SpritePart** spriteBankDst = g_api.o.spriteBanks;
SpriteParts** spriteBankDst = (SpriteParts**)g_api.o.spriteBanks;

spriteBankDst += 0x10;
if (g_HandId != 0) {
Expand All @@ -49,7 +40,7 @@ static void SetSpriteBank1(SpriteParts* animset) {
}

static void SetSpriteBank2(SpriteParts* animset) {
SpritePart** spriteBankDst = g_api.o.spriteBanks;
SpriteParts** spriteBankDst = (SpriteParts**)g_api.o.spriteBanks;

spriteBankDst += 0x11;
if (g_HandId != 0) {
Expand Down Expand Up @@ -88,8 +79,10 @@ static void DestroyEntityWeapon(bool arg0) {

static void SetWeaponProperties(Entity* self, s32 kind) {
Equipment equip;
s32 equipId;

g_api.GetEquipProperties(g_HandId, &equip, self->ext.weapon.equipId);
equipId = self->ext.weapon.equipId;
g_api.GetEquipProperties(g_HandId, &equip, equipId);
switch (kind) {
case 0:
case 1:
Expand Down
58 changes: 58 additions & 0 deletions src/weapon/w1_012.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
#include "common.h"

INCLUDE_ASM("weapon/w1_012_psp/nonmatchings/w1_012", func_pspeu_092F6C80);

INCLUDE_ASM("weapon/w1_012_psp/nonmatchings/w1_012", func_pspeu_092F6D18);

INCLUDE_ASM("weapon/w1_012_psp/nonmatchings/w1_012", func_pspeu_092F6E00);

INCLUDE_ASM("weapon/w1_012_psp/nonmatchings/w1_012", func_pspeu_092F6E48);

INCLUDE_ASM("weapon/w1_012_psp/nonmatchings/w1_012", func_pspeu_092F6EE8);

INCLUDE_ASM("weapon/w1_012_psp/nonmatchings/w1_012", func_pspeu_092F6F38);

INCLUDE_ASM("weapon/w1_012_psp/nonmatchings/w1_012", func_pspeu_092F6FA8);

INCLUDE_ASM("weapon/w1_012_psp/nonmatchings/w1_012", func_pspeu_092F70C8);

INCLUDE_ASM("weapon/w1_012_psp/nonmatchings/w1_012", func_pspeu_092F7A70);

INCLUDE_ASM("weapon/w1_012_psp/nonmatchings/w1_012", func_pspeu_092F8270);

void func_pspeu_092F83E8(void) {
}

void func_pspeu_092F83F0(void) {
}

void func_pspeu_092F83F8(void) {
}

INCLUDE_ASM("weapon/w1_012_psp/nonmatchings/w1_012", func_pspeu_092F8400);

void func_pspeu_092F8410(void) {
}

void func_pspeu_092F8418(void) {
}

void func_pspeu_092F8420(void) {
}

void func_pspeu_092F8428(void) {
}

void func_pspeu_092F8430(void) {
}

void func_pspeu_092F8438(void) {
}

void func_pspeu_092F8440(void) {
}

void func_pspeu_092F8448(void) {
}

INCLUDE_ASM("weapon/w1_012_psp/nonmatchings/w1_012", w1_012_Load);
Loading
Loading