mirror of
https://github.com/Xeeynamo/sotn-decomp.git
synced 2024-11-22 20:49:50 +00:00
Adding Demon servant overlay (#1915)
Some checks are pending
Format code / format (push) Waiting to run
Build C code / extract-assets (push) Waiting to run
Build C code / build-linux (x86_64, Debug, clang, custom) (push) Blocked by required conditions
Build C code / build-linux (x86_64, Debug, clang, lle) (push) Blocked by required conditions
Build C code / build-linux (x86_64, Debug, gcc, custom) (push) Blocked by required conditions
Build C code / build-linux (x86_64, Debug, gcc, lle) (push) Blocked by required conditions
Build C code / build-linux (x86_64, RelWithDebInfo, clang, custom) (push) Blocked by required conditions
Build C code / build-linux (x86_64, RelWithDebInfo, clang, lle) (push) Blocked by required conditions
Build C code / build-linux (x86_64, RelWithDebInfo, gcc, custom) (push) Blocked by required conditions
Build C code / build-linux (x86_64, RelWithDebInfo, gcc, lle) (push) Blocked by required conditions
Build C code / build-macos (Debug, custom) (push) Blocked by required conditions
Build C code / build-macos (Debug, lle) (push) Blocked by required conditions
Build C code / build-macos (RelWithDebInfo, custom) (push) Blocked by required conditions
Build C code / build-macos (RelWithDebInfo, lle) (push) Blocked by required conditions
Build C code / build-windows (Debug, custom) (push) Blocked by required conditions
Build C code / build-windows (Debug, lle) (push) Blocked by required conditions
Build C code / build-windows (RelWithDebInfo, custom) (push) Blocked by required conditions
Build C code / build-windows (RelWithDebInfo, lle) (push) Blocked by required conditions
Build Saturn version / build-and-test-saturn (push) Waiting to run
Build Saturn version / function-finder-saturn (push) Waiting to run
Build Debug Module tool / build (push) Waiting to run
Build PSX and PSP version / build-and-test (pspeu, hd) (push) Waiting to run
Build PSX and PSP version / build-and-test (pspeu, pspeu) (push) Waiting to run
Build PSX and PSP version / build-and-test (us, us) (push) Waiting to run
Build PSX and PSP version / generate-progress-report (pspeu, hd) (push) Blocked by required conditions
Build PSX and PSP version / generate-progress-report (pspeu, pspeu) (push) Blocked by required conditions
Build PSX and PSP version / generate-progress-report (us, us) (push) Blocked by required conditions
Build PSX and PSP version / generate-duplicates-report (us, us) (push) Blocked by required conditions
Build PSX and PSP version / generate-duplicates-report-psp (pspeu, pspeu) (push) Blocked by required conditions
Some checks are pending
Format code / format (push) Waiting to run
Build C code / extract-assets (push) Waiting to run
Build C code / build-linux (x86_64, Debug, clang, custom) (push) Blocked by required conditions
Build C code / build-linux (x86_64, Debug, clang, lle) (push) Blocked by required conditions
Build C code / build-linux (x86_64, Debug, gcc, custom) (push) Blocked by required conditions
Build C code / build-linux (x86_64, Debug, gcc, lle) (push) Blocked by required conditions
Build C code / build-linux (x86_64, RelWithDebInfo, clang, custom) (push) Blocked by required conditions
Build C code / build-linux (x86_64, RelWithDebInfo, clang, lle) (push) Blocked by required conditions
Build C code / build-linux (x86_64, RelWithDebInfo, gcc, custom) (push) Blocked by required conditions
Build C code / build-linux (x86_64, RelWithDebInfo, gcc, lle) (push) Blocked by required conditions
Build C code / build-macos (Debug, custom) (push) Blocked by required conditions
Build C code / build-macos (Debug, lle) (push) Blocked by required conditions
Build C code / build-macos (RelWithDebInfo, custom) (push) Blocked by required conditions
Build C code / build-macos (RelWithDebInfo, lle) (push) Blocked by required conditions
Build C code / build-windows (Debug, custom) (push) Blocked by required conditions
Build C code / build-windows (Debug, lle) (push) Blocked by required conditions
Build C code / build-windows (RelWithDebInfo, custom) (push) Blocked by required conditions
Build C code / build-windows (RelWithDebInfo, lle) (push) Blocked by required conditions
Build Saturn version / build-and-test-saturn (push) Waiting to run
Build Saturn version / function-finder-saturn (push) Waiting to run
Build Debug Module tool / build (push) Waiting to run
Build PSX and PSP version / build-and-test (pspeu, hd) (push) Waiting to run
Build PSX and PSP version / build-and-test (pspeu, pspeu) (push) Waiting to run
Build PSX and PSP version / build-and-test (us, us) (push) Waiting to run
Build PSX and PSP version / generate-progress-report (pspeu, hd) (push) Blocked by required conditions
Build PSX and PSP version / generate-progress-report (pspeu, pspeu) (push) Blocked by required conditions
Build PSX and PSP version / generate-progress-report (us, us) (push) Blocked by required conditions
Build PSX and PSP version / generate-duplicates-report (us, us) (push) Blocked by required conditions
Build PSX and PSP version / generate-duplicates-report-psp (pspeu, pspeu) (push) Blocked by required conditions
This commit is contained in:
parent
ceb671f716
commit
1148580550
14
Makefile
14
Makefile
@ -144,7 +144,7 @@ extract: extract_$(VERSION)
|
||||
|
||||
build: ##@ build game files
|
||||
build: build_$(VERSION)
|
||||
build_us: main dra weapon ric cen dre mad no0 no3 np3 nz0 sel st0 wrp rwrp mar rbo3 tt_000 tt_001 tt_002
|
||||
build_us: main dra weapon ric cen dre mad no0 no3 np3 nz0 sel st0 wrp rwrp mar rbo3 tt_000 tt_001 tt_002 tt_003
|
||||
build_hd: dra cen wrp tt_000
|
||||
clean: ##@ clean extracted files, assets, and build artifacts
|
||||
git clean -fdx assets/
|
||||
@ -227,6 +227,7 @@ format-symbols:
|
||||
./tools/symbols.py remove-orphans config/splat.hd.tt_000.yaml
|
||||
./tools/symbols.py remove-orphans config/splat.us.tt_001.yaml
|
||||
./tools/symbols.py remove-orphans config/splat.us.tt_002.yaml
|
||||
./tools/symbols.py remove-orphans config/splat.us.tt_003.yaml
|
||||
./tools/symbols.py remove-orphans config/splat.us.stmad.yaml
|
||||
format-license:
|
||||
find src/ | grep -E '\.c$$|\.h$$' | grep -vE 'PsyCross|mednafen|psxsdk|3rd|saturn/lib' | python3 ./tools/lint-license.py - AGPL-3.0-or-later
|
||||
@ -378,6 +379,13 @@ $(BUILD_DIR)/TT_002.BIN: $(BUILD_DIR)/tt_002_raw.bin
|
||||
cp $< $@
|
||||
dd status=none if=/dev/zero bs=1 count=$$((40960 - $$(stat -c %s $<))) >> $@
|
||||
|
||||
tt_003: $(BUILD_DIR)/TT_003.BIN
|
||||
$(BUILD_DIR)/tt_003_raw.bin: $(BUILD_DIR)/tt_003.elf
|
||||
$(OBJCOPY) -O binary $< $@
|
||||
$(BUILD_DIR)/TT_003.BIN: $(BUILD_DIR)/tt_003_raw.bin
|
||||
cp $< $@
|
||||
dd status=none if=/dev/zero bs=1 count=$$((40960 - $$(stat -c %s $<))) >> $@
|
||||
|
||||
mad_fix: stmad_dirs $$(call list_o_files,st/mad) $$(call list_o_files,st)
|
||||
$(LD) $(LD_FLAGS) -o $(BUILD_DIR)/stmad_fix.elf \
|
||||
-Map $(BUILD_DIR)/stmad_fix.map \
|
||||
@ -489,6 +497,7 @@ force_symbols: ##@ Extract a full list of symbols from a successful build
|
||||
$(PYTHON) ./tools/symbols.py elf build/us/tt_000.elf > config/symbols.us.tt_000.txt
|
||||
$(PYTHON) ./tools/symbols.py elf build/us/tt_001.elf > config/symbols.us.tt_001.txt
|
||||
$(PYTHON) ./tools/symbols.py elf build/us/tt_002.elf > config/symbols.us.tt_002.txt
|
||||
$(PYTHON) ./tools/symbols.py elf build/us/tt_003.elf > config/symbols.us.tt_003.txt
|
||||
|
||||
context: ##@ create a context for decomp.me. Set the SOURCE variable prior to calling this target
|
||||
VERSION=$(VERSION) $(M2CTX) $(SOURCE)
|
||||
@ -530,6 +539,7 @@ disk_prepare: build $(SOTNDISK)
|
||||
cp $(BUILD_DIR)/TT_000.BIN $(DISK_DIR)/SERVANT/TT_000.BIN
|
||||
cp $(BUILD_DIR)/TT_001.BIN $(DISK_DIR)/SERVANT/TT_001.BIN
|
||||
cp $(BUILD_DIR)/TT_002.BIN $(DISK_DIR)/SERVANT/TT_002.BIN
|
||||
cp $(BUILD_DIR)/TT_003.BIN $(DISK_DIR)/SERVANT/TT_003.BIN
|
||||
disk: disk_prepare
|
||||
$(SOTNDISK) make build/sotn.$(VERSION).cue $(DISK_DIR) $(CONFIG_DIR)/disk.us.lba
|
||||
disk_debug: disk_prepare
|
||||
@ -647,7 +657,7 @@ include tools/tools.mk
|
||||
|
||||
.PHONY: all, clean, patch, check, build, expected
|
||||
.PHONY: format, ff, format-src, format-tools, format-symbols
|
||||
.PHONY: main, dra, ric, cen, dre, mad, no3, np3, nz0, st0, wrp, rwrp, bomar, borbo3, tt_000, tt_001, tt_002
|
||||
.PHONY: main, dra, ric, cen, dre, mad, no3, np3, nz0, st0, wrp, rwrp, bomar, borbo3, tt_000, tt_001, tt_002, tt_003
|
||||
.PHONY: %_dirs
|
||||
.PHONY: extract, extract_%
|
||||
.PHONY: update-dependencies python-dendencies
|
||||
|
@ -11,7 +11,7 @@ PSX_RSTAGES := rwrp
|
||||
PSX_BOSTAGES := mar
|
||||
PSX_RBOSTAGES := rbo3
|
||||
PSX_ALLSTAGES := $(addprefix st,$(PSX_KSTAGES)) $(addprefix st,$(PSX_RSTAGES)) $(addprefix bo,$(PSX_BOSTAGES)) $(addprefix bo,$(PSX_RBOSTAGES))
|
||||
PSX_SERVANTS := tt_000 tt_001 tt_002
|
||||
PSX_SERVANTS := tt_000 tt_001 tt_002 tt_003
|
||||
PSX_US_TARGETS := main $(PSX_OVLS) $(PSX_ALLSTAGES) $(PSX_SERVANTS)
|
||||
PSX_HD_TARGETS := dra ric tt_000 stcen stwrp
|
||||
|
||||
|
@ -35,6 +35,7 @@ This repo does not include any assets or assembly code necessary for compiling t
|
||||
| SERVANT/TT_000.BIN | ![code coverage TT_000.BIN](https://img.shields.io/endpoint?label=TT_000%20code&url=https%3A%2F%2Fprogress.deco.mp%2Fdata%2Fsotn%2Fus%2Fcode%2F%3Fmode%3Dshield%26measure%3Dtt_000) | ![decompiled functions](https://img.shields.io/endpoint?label=TT_000%20funcs&url=https%3A%2F%2Fprogress.deco.mp%2Fdata%2Fsotn%2Fus%2Ffunctions%2F%3Fmode%3Dshield%26measure%3Dtt_000) | Bat Familiar
|
||||
| SERVANT/TT_001.BIN | ![code coverage TT_001.BIN](https://img.shields.io/endpoint?label=TT_001%20code&url=https%3A%2F%2Fprogress.deco.mp%2Fdata%2Fsotn%2Fus%2Fcode%2F%3Fmode%3Dshield%26measure%3Dtt_001) | ![decompiled functions](https://img.shields.io/endpoint?label=TT_001%20funcs&url=https%3A%2F%2Fprogress.deco.mp%2Fdata%2Fsotn%2Fus%2Ffunctions%2F%3Fmode%3Dshield%26measure%3Dtt_001) | Ghost Familiar
|
||||
| SERVANT/TT_002.BIN | ![code coverage TT_002.BIN](https://img.shields.io/endpoint?label=TT_002%20code&url=https%3A%2F%2Fprogress.deco.mp%2Fdata%2Fsotn%2Fus%2Fcode%2F%3Fmode%3Dshield%26measure%3Dtt_002) | ![decompiled functions](https://img.shields.io/endpoint?label=TT_002%20funcs&url=https%3A%2F%2Fprogress.deco.mp%2Fdata%2Fsotn%2Fus%2Ffunctions%2F%3Fmode%3Dshield%26measure%3Dtt_002) | Faerie Familiar
|
||||
| SERVANT/TT_003.BIN | ![code coverage TT_003.BIN](https://img.shields.io/endpoint?label=TT_003%20code&url=https%3A%2F%2Fprogress.deco.mp%2Fdata%2Fsotn%2Fus%2Fcode%2F%3Fmode%3Dshield%26measure%3Dtt_003) | ![decompiled functions](https://img.shields.io/endpoint?label=TT_003%20funcs&url=https%3A%2F%2Fprogress.deco.mp%2Fdata%2Fsotn%2Fus%2Ffunctions%2F%3Fmode%3Dshield%26measure%3Dtt_003) | Demon Familiar
|
||||
|
||||
Code coverage means how many bytes of code have been successfully converted from assembly into C code, while decomp function is how many functions have been successfully decompiled.
|
||||
|
||||
|
@ -29,3 +29,4 @@ c721a1d2bc6bdd9901801e792d23b5996d940b97 build/us/F_RBO3.BIN
|
||||
82dd4ae1c4e3dc0fd483a49e5e4ab4fc5e25ada7 build/us/TT_000.BIN
|
||||
326c9d2f9b9e2af678f5d63b30b31fba99ae75d4 build/us/TT_001.BIN
|
||||
4589bb04fe475439c6d6e9b7273a8971ad859b4d build/us/TT_002.BIN
|
||||
b54466dec3923d43bd08d71bec688da252153984 build/us/TT_003.BIN
|
||||
|
45
config/splat.us.tt_003.yaml
Normal file
45
config/splat.us.tt_003.yaml
Normal file
@ -0,0 +1,45 @@
|
||||
options:
|
||||
platform: psx
|
||||
basename: tt_003
|
||||
base_path: ..
|
||||
build_path: build/us
|
||||
target_path: disks/us/SERVANT/TT_003.BIN
|
||||
asm_path: asm/us/servant/tt_003
|
||||
asset_path: assets/servant/tt_003
|
||||
src_path: src/servant/tt_003
|
||||
ld_script_path: build/us/tt_003.ld
|
||||
compiler: GCC
|
||||
symbol_addrs_path:
|
||||
- config/symbols.us.txt
|
||||
- config/symbols.us.tt_003.txt
|
||||
undefined_funcs_auto_path: config/undefined_funcs_auto.us.tt_003.txt
|
||||
undefined_syms_auto_path: config/undefined_syms_auto.us.tt_003.txt
|
||||
find_file_boundaries: true
|
||||
use_legacy_include_asm: false
|
||||
migrate_rodata_to_functions: true
|
||||
asm_jtbl_label_macro: jlabel
|
||||
symbol_name_format: us_$VRAM
|
||||
section_order:
|
||||
- .data
|
||||
- .rodata
|
||||
- .text
|
||||
- .bss
|
||||
- .sbss
|
||||
ld_bss_is_noload: false
|
||||
disasm_unknown: true
|
||||
include_macro_inc: false
|
||||
disassemble_all: true
|
||||
sha1: b54466dec3923d43bd08d71bec688da252153984
|
||||
segments:
|
||||
- name: tt_003
|
||||
type: code
|
||||
start: 0
|
||||
vram: 0x80170000
|
||||
align: 4
|
||||
subalign: 4
|
||||
subsegments:
|
||||
- [0x0, data]
|
||||
- [0x29DC, .rodata, demon]
|
||||
- [0x2DC4, c, demon]
|
||||
- [0x83C4, sbss]
|
||||
- [0xA000]
|
20
config/symbols.us.tt_003.txt
Normal file
20
config/symbols.us.tt_003.txt
Normal file
@ -0,0 +1,20 @@
|
||||
g_Events = 0x80172090;
|
||||
g_PlaySfxStep = 0x801729C0;
|
||||
g_EntityRanges = 0x801729C4;
|
||||
g_EventQueue = 0x801729CC;
|
||||
g_CurrentServant = 0x801729D0;
|
||||
g_CurrentRoomX = 0x801729D4;
|
||||
g_CurrentRoomY = 0x801729D8;
|
||||
ServantUpdateAnim = 0x80177750;
|
||||
DestroyEntity = 0x801778F8;
|
||||
AccumulateTowardZero = 0x80177964;
|
||||
SearchForEntityInRange = 0x8017799C;
|
||||
CalculateAngleToEntity = 0x80177A1C;
|
||||
GetTargetPositionWithDistanceBuffer = 0x80177A60;
|
||||
CalculateDistance = 0x80177AD4;
|
||||
ProcessSfxState = 0x80177B24;
|
||||
ProcessEvent = 0x80177CFC;
|
||||
CreateEventEntity = 0x801780D0;
|
||||
IsMovementAllowed = 0x8017818C;
|
||||
CheckAllEntitiesValid = 0x801782A4;
|
||||
ServantUnk0 = 0x80178350;
|
88
src/servant/tt_003/demon.c
Normal file
88
src/servant/tt_003/demon.c
Normal file
@ -0,0 +1,88 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
#include "common.h"
|
||||
#include "servant.h"
|
||||
#include "sfx.h"
|
||||
|
||||
INCLUDE_ASM("servant/tt_003/nonmatchings/demon", func_us_80172DC4);
|
||||
|
||||
INCLUDE_ASM("servant/tt_003/nonmatchings/demon", func_us_80172ED8);
|
||||
|
||||
INCLUDE_ASM("servant/tt_003/nonmatchings/demon", func_us_80172EF8);
|
||||
|
||||
INCLUDE_ASM("servant/tt_003/nonmatchings/demon", func_us_80173348);
|
||||
|
||||
INCLUDE_ASM("servant/tt_003/nonmatchings/demon", func_us_801737F0);
|
||||
|
||||
INCLUDE_ASM("servant/tt_003/nonmatchings/demon", func_us_80173D14);
|
||||
|
||||
INCLUDE_ASM("servant/tt_003/nonmatchings/demon", func_us_801744CC);
|
||||
|
||||
INCLUDE_ASM("servant/tt_003/nonmatchings/demon", func_us_8017472C);
|
||||
|
||||
INCLUDE_ASM("servant/tt_003/nonmatchings/demon", func_us_80174FD0);
|
||||
|
||||
INCLUDE_ASM("servant/tt_003/nonmatchings/demon", func_us_8017540C);
|
||||
|
||||
void func_us_80175800(void) {}
|
||||
|
||||
void func_us_80175808(void) {}
|
||||
|
||||
INCLUDE_ASM("servant/tt_003/nonmatchings/demon", func_us_80175810);
|
||||
|
||||
INCLUDE_ASM("servant/tt_003/nonmatchings/demon", func_us_80175C08);
|
||||
|
||||
INCLUDE_ASM("servant/tt_003/nonmatchings/demon", func_us_80175D20);
|
||||
|
||||
INCLUDE_ASM("servant/tt_003/nonmatchings/demon", func_us_80176544);
|
||||
|
||||
INCLUDE_ASM("servant/tt_003/nonmatchings/demon", func_us_80176564);
|
||||
|
||||
INCLUDE_ASM("servant/tt_003/nonmatchings/demon", func_us_801765A0);
|
||||
|
||||
INCLUDE_ASM("servant/tt_003/nonmatchings/demon", func_us_80176814);
|
||||
|
||||
INCLUDE_ASM("servant/tt_003/nonmatchings/demon", func_us_80176C1C);
|
||||
|
||||
INCLUDE_ASM("servant/tt_003/nonmatchings/demon", func_us_801771B0);
|
||||
|
||||
INCLUDE_ASM("servant/tt_003/nonmatchings/demon", func_us_80177690);
|
||||
|
||||
#ifndef VERSION_PSP
|
||||
#include "../servant_update_anim.h"
|
||||
#endif
|
||||
|
||||
#include "../../destroy_entity.h"
|
||||
|
||||
#ifndef VERSION_PSP
|
||||
#include "../accumulate_toward_zero.h"
|
||||
#include "../search_for_entity_in_range.h"
|
||||
#endif
|
||||
|
||||
#include "../calculate_angle_to_entity.h"
|
||||
|
||||
#include "../get_target_position_with_distance_buffer.h"
|
||||
|
||||
#ifndef VERSION_PSP
|
||||
#include "../calculate_distance.h"
|
||||
#include "../play_sfx.h"
|
||||
#endif
|
||||
|
||||
#include "../process_event.h"
|
||||
|
||||
#include "../create_event_entity.h"
|
||||
|
||||
#include "../is_movement_allowed.h"
|
||||
|
||||
#ifndef VERSION_PSP
|
||||
#include "../check_all_entities_valid.h"
|
||||
#endif
|
||||
|
||||
#include "../servant_unk0.h"
|
||||
|
||||
INCLUDE_RODATA("servant/tt_003/nonmatchings/demon", func_us_80172A68);
|
||||
|
||||
INCLUDE_RODATA("servant/tt_003/nonmatchings/demon", func_us_80172A9C);
|
||||
|
||||
INCLUDE_RODATA("servant/tt_003/nonmatchings/demon", func_us_80172D50);
|
||||
|
||||
INCLUDE_RODATA("servant/tt_003/nonmatchings/demon", func_us_80172DBC);
|
@ -286,6 +286,13 @@ fn do_dups_report(output_file: Option<String>, threshold: f64) {
|
||||
include_asm: get_all_include_asm("../../src/servant/tt_002"),
|
||||
path_matcher: "/tt_002/".to_string(),
|
||||
},
|
||||
SrcAsmPair {
|
||||
asm_dir: String::from("../../asm/us/servant/tt_003/matchings/"),
|
||||
src_dir: String::from("../../src/servant/tt_003"),
|
||||
overlay_name: String::from("TT_003"),
|
||||
include_asm: get_all_include_asm("../../src/servant/tt_003"),
|
||||
path_matcher: "/tt_003/".to_string(),
|
||||
},
|
||||
SrcAsmPair {
|
||||
asm_dir: String::from("../../asm/us/st/cen/matchings/"),
|
||||
src_dir: String::from("../../src/st/cen/"),
|
||||
|
@ -411,6 +411,7 @@ if __name__ == "__main__":
|
||||
progress["tt_000"] = DecompProgressStats("tt_000", "servant/tt_000")
|
||||
progress["tt_001"] = DecompProgressStats("tt_001", "servant/tt_001")
|
||||
progress["tt_002"] = DecompProgressStats("tt_002", "servant/tt_002")
|
||||
progress["tt_003"] = DecompProgressStats("tt_003", "servant/tt_003")
|
||||
|
||||
hydrate_previous_metrics(progress, args.version)
|
||||
progress = remove_not_existing_overlays(progress)
|
||||
|
Loading…
Reference in New Issue
Block a user