Commit Graph

2630 Commits

Author SHA1 Message Date
Josh Schreuder
771594c552
Dedupe no0 and nz0 EntityAxeKnight shared code (#1780)
* Moved `entity_axe_knight` code from `nz0` into shared header
* Dedupe `no0` with shared header
* Split and extract `no0` axe knight data
2024-10-12 23:29:52 -07:00
Luciano Ciccariello
0842c47baa
Add cmdline arguments (#1778)
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 (Debug, clang, custom) (push) Blocked by required conditions
Build C code / build-linux (Debug, clang, lle) (push) Blocked by required conditions
Build C code / build-linux (Debug, gcc, custom) (push) Blocked by required conditions
Build C code / build-linux (Debug, gcc, lle) (push) Blocked by required conditions
Build C code / build-linux (RelWithDebInfo, clang, custom) (push) Blocked by required conditions
Build C code / build-linux (RelWithDebInfo, clang, lle) (push) Blocked by required conditions
Build C code / build-linux (RelWithDebInfo, gcc, custom) (push) Blocked by required conditions
Build C code / build-linux (RelWithDebInfo, gcc, lle) (push) Blocked by required conditions
Build C code / build-macos (Debug) (push) Blocked by required conditions
Build C code / build-macos (RelWithDebInfo) (push) Blocked by required conditions
Build C code / build-windows (Debug) (push) Blocked by required conditions
Build C code / build-windows (RelWithDebInfo) (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
To easily bypass the SEL screen or change settings without having to
recompile the code or keep code changes locally just for testing. I also
hope this will be expanded in the future to perform automated tests,
like simulating the input in a determined stage+player and catch
regressions.

As there are breaking changes on the command line, I decided to also
rename the executable name. Having arguments like `--disk <path>` or
`--test <name>` will also allow us to be independent from positional
arguments, which can be complicated to maintain as they will
consistently introduce breaking changes.

Demos:
```
./sotn --stage wrp --player ric --disk disks/sotn.track2.bin --scale 6
```
```
./sotn --test sndlib
```
2024-10-12 22:03:13 +01:00
H.M. Burger
73030b2b5b
Refactor/Naming for tt_000 (#1775)
Refactoring tt_000 for naming functions and variables.
May have to touch tt_001 for some bits as I come across similar
patterns.

This is about the half way point of refactoring tt_000. A lot of the
pseudo-shared logic and variables between this and tt_001 are done. Most
of what is left is bat entity specific behavior.
2024-10-12 21:48:13 +01:00
Josh Schreuder
f96efe067f
Fix issues with running under MSVC (#1779)
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 (Debug, clang, custom) (push) Blocked by required conditions
Build C code / build-linux (Debug, clang, lle) (push) Blocked by required conditions
Build C code / build-linux (Debug, gcc, custom) (push) Blocked by required conditions
Build C code / build-linux (Debug, gcc, lle) (push) Blocked by required conditions
Build C code / build-linux (RelWithDebInfo, clang, custom) (push) Blocked by required conditions
Build C code / build-linux (RelWithDebInfo, clang, lle) (push) Blocked by required conditions
Build C code / build-linux (RelWithDebInfo, gcc, custom) (push) Blocked by required conditions
Build C code / build-linux (RelWithDebInfo, gcc, lle) (push) Blocked by required conditions
Build C code / build-macos (Debug) (push) Blocked by required conditions
Build C code / build-macos (RelWithDebInfo) (push) Blocked by required conditions
Build C code / build-windows (Debug) (push) Blocked by required conditions
Build C code / build-windows (RelWithDebInfo) (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 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
Fixed some uninitialised pointers / return types which affected a few
things at runtime - pressing down button on main menu and leaving
through door.

Fixed some build errors with WANT_LIBSND_LLE due to unnamed parameters
in implemented functions.

Fixed some externs for WANT_LIBSND_LLE support with MSVC - should be
compiling and running now.
2024-10-12 11:34:06 +01:00
Luciano Ciccariello
f015a76577
Import w_037 data and normalize weapon palette (#1777)
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 (Debug, clang, custom) (push) Blocked by required conditions
Build C code / build-linux (Debug, clang, lle) (push) Blocked by required conditions
Build C code / build-linux (Debug, gcc, custom) (push) Blocked by required conditions
Build C code / build-linux (Debug, gcc, lle) (push) Blocked by required conditions
Build C code / build-linux (RelWithDebInfo, clang, custom) (push) Blocked by required conditions
Build C code / build-linux (RelWithDebInfo, clang, lle) (push) Blocked by required conditions
Build C code / build-linux (RelWithDebInfo, gcc, custom) (push) Blocked by required conditions
Build C code / build-linux (RelWithDebInfo, gcc, lle) (push) Blocked by required conditions
Build C code / build-macos (Debug) (push) Blocked by required conditions
Build C code / build-macos (RelWithDebInfo) (push) Blocked by required conditions
Build C code / build-windows (Debug) (push) Blocked by required conditions
Build C code / build-windows (RelWithDebInfo) (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 PR also allows to being able to import the BSS section by tweaking
the linker script
2024-10-11 18:36:59 +01:00
Josh Schreuder
67a6f1cf72
Decompile no0 EntityBreakable and extract data (#1776)
PSX: https://decomp.me/scratch/ouTpd
PSP: https://decomp.me/scratch/pZMLg

Code is super similar to
af89c6247c/src/st/e_breakable.h (L15)
and other implementations like
af89c6247c/src/st/mad/D8C8.c (L169)

But sound effects seem to differ amongst most - not sure if there's a
really clean way to de-duplicate this with a shared header so I'm just
copying into a new function for now.
2024-10-11 17:41:06 +01:00
Luciano Ciccariello
d36616f401
Add multi-configuration builds (#1774)
This PR does:
* Do not fail the `extract-assets` job on forks
* Fix warnings and certain warnings as errors
* Build with a combination of gcc and clang with debug and release
2024-10-11 17:16:55 +01:00
H.M. Burger
af89c6247c
Refactor/Naming for tt_001 (#1770)
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 (push) Blocked by required conditions
Build C code / build-macos (push) Blocked by required conditions
Build C code / build-windows (push) Blocked by required conditions
Build C code / build-linux-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
Cleaning up variable names and function names.
Cleaning up ET_Ghost ext names.

A lot of changes in here, but it's all just renaming mostly inside
tt_001. I also changed out hard coded hex values for decimal values
where it made sense to do so (such as frame counts for some of the
animation).
2024-10-10 14:41:32 -07:00
Luciano Ciccariello
a915ff0fbd
Modernize headers (#1743)
Extract some commits out of #1701 and avoid the part that will lead to a
build failure (fixed in #1738).

Now every header uses `OVL_EXPORT`.
2024-10-10 21:37:25 +01:00
Josh Schreuder
0e90600680
Dedupe remaining no0 e_misc functions and split data (#1773)
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 (push) Blocked by required conditions
Build C code / build-macos (push) Blocked by required conditions
Build C code / build-windows (push) Blocked by required conditions
Build C code / build-linux-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 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
Notes for `no0`:

* `unk_collision_func4.h` is not used here
* `unk_recursive_primfunc_1` and `unk_recursive_primfunc_2` and their
associated data are not used here

I've stage def'd these out of the shared `e_misc.h`... not sure if this
is going to lead to messy shared headers going forwards if we have to
keep doing this for other stages
2024-10-10 19:16:07 +01:00
Luciano Ciccariello
6301e7d7ce
Make separate struct for 30030 g_Dialogue (#1772)
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 (push) Blocked by required conditions
Build C code / build-macos (push) Blocked by required conditions
Build C code / build-windows (push) Blocked by required conditions
Build C code / build-linux-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
Follow-up to #1769
2024-10-09 22:57:08 +01:00
Luciano Ciccariello
d9621da4d0
Stub fixes and minor RIC touch-ups (#1771)
A few changes I had stashed locally for a long time
2024-10-09 22:47:58 +01:00
bismurphy
d84431ba43
Decompile ST0 func_801B1298 (#1769)
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 (push) Blocked by required conditions
Build C code / build-macos (push) Blocked by required conditions
Build C code / build-windows (push) Blocked by required conditions
Build C code / build-linux-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 one is so dang weird.

It needs to access fields in g_Dialogue which do not match up at all
with the g_Dialogue struct. And it accesses some other elements
normally, but they show up at the wrong offsets. It's like this one
function uses a different g_Dialogue struct. I really don't know what to
make of it. Other files in ST0 use normal g_Dialogue, but this one is
bizarre.

I went ahead and created an ifdef variable to use to handle this, and
that's baked into g_Dialogue, but man. Very weird and yet another thing
I haven't seen before in SOTN. ST0 is such a weird beast. Feels like
it's from a beta build of the game.
2024-10-09 20:46:26 +01:00
Aleksandr Shabelnikov
6f8ec4db8a
NO0 e_misc deduplication (#1767)
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 (push) Blocked by required conditions
Build C code / build-macos (push) Blocked by required conditions
Build C code / build-windows (push) Blocked by required conditions
Build C code / build-linux-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
I've stuck with EntityRelicOrb and D_us_801C141C, but all other
functions is factored out
#define HEART_DROP_CASTLE_FLAG 0 set to dummy value, I don't know how to
get right value yet
2024-10-08 23:21:50 -07:00
H.M. Burger
3ea1f826d6
Reorganizing tt_000 to be more in line with tt_001 (#1768)
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 (push) Blocked by required conditions
Build C code / build-macos (push) Blocked by required conditions
Build C code / build-windows (push) Blocked by required conditions
Build C code / build-linux-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 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
Reorganizing tt_000 to be in line with organization of tt_001

Files that start servant_ are shared data.
Files that start bat_ (or ghost_ in the case of tt_001) are specific to
that familiar.
2024-10-08 23:33:14 +01:00
Josh Schreuder
9357324ccc
Decompile no0 func_us_801C2044 (#1766)
PSX: https://decomp.me/scratch/jb4U2

PSP: https://decomp.me/scratch/wCOug
2024-10-08 12:24:36 -07:00
H.M. Burger
03ae469187
Adding ghost to buildlist (#1764)
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 (push) Blocked by required conditions
Build C code / build-macos (push) Blocked by required conditions
Build C code / build-windows (push) Blocked by required conditions
Build C code / build-linux-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
Adding ghost to build list

In order to get the build to work, I needed to mark all of the shared
functions between tt_000 and tt_001 as static as it was causing linking
issues. Because of this, I needed to combine the two C files for tt_000.
Probably want to look at splitting those up into servant specific and
shared, but for now, I just wanted to get this working.

The issue was msvc didn't like that we were declaring a static function
that was not being implemented because part of the shared functions were
being implemented in another file. There may be something we can do with
function declarations to clean that up if/when we split it again, but I
don't know enough about C static functions to figure it out.
2024-10-08 10:56:45 -07:00
bismurphy
8421a2d38a
Name EntityExplosionVariants and cleanup around it (#1763)
As named in Discord conversation.

Gives a name to this function, renames its variables, renames its files,
etc.

PR looks kind of big but most of it is pretty minor find and replace.
2024-10-08 18:24:34 +01:00
Luciano Ciccariello
f457671764
Fix some fake symbols and matches in NZ0, NP3 and DRE (#1762)
Some checks failed
Format code / format (push) Has been cancelled
Build C code / extract-assets (push) Has been cancelled
Build Saturn version / build-and-test-saturn (push) Has been cancelled
Build Saturn version / function-finder-saturn (push) Has been cancelled
Build Debug Module tool / build (push) Has been cancelled
Build PSX and PSP version / build-and-test (pspeu, hd) (push) Has been cancelled
Build PSX and PSP version / build-and-test (pspeu, pspeu) (push) Has been cancelled
Build PSX and PSP version / build-and-test (us, us) (push) Has been cancelled
Build C code / build-linux (push) Has been cancelled
Build C code / build-macos (push) Has been cancelled
Build C code / build-windows (push) Has been cancelled
Build C code / build-linux-lle (push) Has been cancelled
Build PSX and PSP version / generate-progress-report (pspeu, hd) (push) Has been cancelled
Build PSX and PSP version / generate-progress-report (pspeu, pspeu) (push) Has been cancelled
Build PSX and PSP version / generate-progress-report (us, us) (push) Has been cancelled
Build PSX and PSP version / generate-duplicates-report (us, us) (push) Has been cancelled
Build PSX and PSP version / generate-duplicates-report-psp (pspeu, pspeu) (push) Has been cancelled
I finally solved the mystery behind the `hitbox--; hitbox++` fake match
2024-10-07 19:04:24 +01:00
bismurphy
ed753ac56b
Decompile NO3 func_801BB548 (#1761)
Tricky one! But got it matching by relying heavily on the similar
UnkRecursivePrimFunc1 and with some heavy PSP assistance :)
2024-10-07 18:11:01 +01:00
bismurphy
d8b0e75a56
Decompile NO3 EntityBackgroundPineTrees (#1752)
Bit of a tricky function, but as usual, PSP saves the day.

I noticed it setting a value to entity->unk68, which is an entity field
I don't usually see used. I did a tiny bit of research into what other
entities used it, and I quickly noticed that many of them relate to
parallax, so I added a comment there for someone to be able to give it a
proper name.
2024-10-07 17:48:36 +01:00
Luciano Ciccariello
4a1fd51b42
NZ0 import all data (#1760)
This comes with a few fake symbols fixed on a few functions, types being
corrected when needed and `LEN` being used where I could spot a pattern.

Data in `bossfight` is used in a mix between `bossfight.c`, `slogra.c`
and `gaibon.c`, which I believe they were originally one file.

`0x3CB8` is not extracted as an asset. It is an unused blob of data.
Using Tile Molester doesn't suggest it is a clear 4bpp image and the
decompression tool doesn't work on it. I left it as it is until we know
more.

I had to make a few file splits to get a match. I am yet to understand
the pattern on how files were originally organised. In some instances it
suggests files were split with a C file for every entity. But in other
instances it does not seem to be the case. I hope NZ0 will come with a
different function order so we will get more hints.

I will probably make a short tool to import the GFX part into a
`header.c` for the remaining overlays as it is quite tome consuming to
do it manually.
2024-10-07 17:22:43 +01:00
H.M. Burger
f84192c446
Importing TT_001 sbss data (#1756)
Importing TT_001 sbss data
Reorganizing the data declaration into ghost.h

Co-authored-by: Onenutmcgee <Onenutmcgee@users.noreply.github.com>
2024-10-07 16:38:42 +01:00
Josh Schreuder
5ed8892653
Dedupe no0 e_collect (#1759) 2024-10-07 16:18:28 +01:00
Josh Schreuder
511125dac7
Dedupe no0 blit_char (#1758) 2024-10-07 16:00:19 +01:00
Josh Schreuder
5e03efff03
Dedupe no0 e_stage_name (#1757) 2024-10-07 15:59:46 +01:00
Aleksandr Shabelnikov
5fab2ecb0e
PlayerIsWithinHitbox deduplication for no0, st0, nz0 (#1755)
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 (push) Blocked by required conditions
Build C code / build-macos (push) Blocked by required conditions
Build C code / build-windows (push) Blocked by required conditions
Build C code / build-linux-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
1. func_801B0AA4 decompilation
2. PlayerIsWithinHitbox deduplication for no0, st0, nz0
2024-10-06 10:56:04 -07:00
Josh Schreuder
fffde1f095
Dedupe no0 create_entity functions (#1753) 2024-10-06 10:48:57 -07:00
Luciano Ciccariello
30652db2dd
Asset cutscene two stages (#1738)
I completely rewrote the cutscene asset handler. Now instead of parsing
the data from the original overlay into a C-like header file, it instead
follows a two-stage process. This works by extracting it in `asset/`
with `make extract_assets`, to then allow modders to modify the file and
build it as a C-like header with `make build_assets`. This also aims to
fix #1701 as the build process takes account of the two-stage process.

I created a framework where each asset type should only make available
the two methods `Extract` and `Build`. The entire transformation process
should be isolated to not create cognitive overload like what we can
find in `build.go`. I would need to migrate all the existing asset types
to properly use this new framework. The old code served well enough to
understand how to build the entire infrastructure, but it needs to be
migrated using the new pattern.

Last, but not least, I renamed `config/assets.us.weapon.yaml` to
`config/assets.us.yaml` as it is now used by all the overlays
2024-10-06 13:10:06 +01:00
bismurphy
02e4c62f6a
Add display_animations.py tool for viewing entity animation frames (#1746)
This extends upon my work in display_texture.py. I have used this for
identifying a few entities already. display_texture is suited for
viewing prims, while this one is better for entities that are rendered
by RenderEntities.

I think there's enough documentation at the top of the function for
others to use it. Hopefully it can be helpful, especially as it evolves
over time.

At some point this could be converted to an editor in addition to a
viewer, but for now the viewing capability is the core focus.

Also rewrote some of DRA's sprite data (this should probably be in
sotn-assets though) to fit the standard format so that this tool could
parse the data.
2024-10-06 13:09:33 +01:00
Josh Schreuder
50b8135531
Decompile no0 func_us_801D51EC (#1751)
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 (push) Blocked by required conditions
Build C code / build-macos (push) Blocked by required conditions
Build C code / build-windows (push) Blocked by required conditions
Build C code / build-linux-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
PSX: https://decomp.me/scratch/7iP9H
PSP: https://decomp.me/scratch/yL9PD
2024-10-05 19:51:17 -07:00
Josh Schreuder
f4bd5ae19e
Decompile no0 func_us_801D4E30 (#1750) 2024-10-05 19:37:13 -07:00
Josh Schreuder
ed7cd94db8
Decompile no0 func_us_801D2318 (#1749) 2024-10-05 19:20:27 -07:00
Josh Schreuder
19750ae8fc
Dedupe no0 EntityRoomForeground (#1748) 2024-10-05 19:10:35 -07:00
H.M. Burger
5b717b4ec4
Importing remainder of ghost data (#1747)
Imported the remainder of the data.
2024-10-05 19:05:22 -07:00
Josh Schreuder
bc71a8940a
Decompile no0 func_us_801C3308 (#1733) 2024-10-05 18:57:35 -07:00
bismurphy
077578210e
Document some stuff with Entrance lightning (#1745)
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 (push) Blocked by required conditions
Build C code / build-macos (push) Blocked by required conditions
Build C code / build-windows (push) Blocked by required conditions
Build C code / build-linux-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
Mostly just some light renaming.

I used my new entity animation viewer to figure out what this function
was, it's a very subtle cloud effect that would have been hard to
identify otherwise.

The driving factor for this was removing ext.generic from this entity,
which is also complete.

This applies to both NO3 and NP3.
2024-10-05 22:51:28 +01:00
bismurphy
9ce2a3fbf6
Rework sotn-assets animation pointers (#1742)
I was reviewing some of the animations pulled out by sotn-assets.
Speicfically, I found that in `src/st/no3/sprite_banks.h` (a file
created by sotn-assets locally, which does not exist directly in this
repo), we have:

```
extern s16* sprites_no3_0;
extern s16* sprites_no3_1;
extern s16* sprites_no3_2;
extern s16* sprites_no3_3;
extern s16* sprites_no3_4;
extern s16* sprites_no3_5;
extern s16* sprites_no3_6;
extern s16* sprites_no3_7;
extern s16* sprites_no3_8;
static s16* spriteBanks[] = {
    0,
    &sprites_no3_0,
    &sprites_no3_3,
    &sprites_no3_1,
    &sprites_no3_2,
    &sprites_no3_4,
    &sprites_no3_5,
    &sprites_no3_6,
    &sprites_no3_7,
    &sprites_no3_8,
```

However, those are not the right pointer types. `sprites_no3_#` should
have a type of `s16* []`, so I reworked the sotn-assets tool to use the
right pointers for each of these things. Now the sprite_banks.h file
looks like:
```
extern s16* sprites_no3_0[];
extern s16* sprites_no3_1[];
extern s16* sprites_no3_2[];
extern s16* sprites_no3_3[];
extern s16* sprites_no3_4[];
extern s16* sprites_no3_5[];
extern s16* sprites_no3_6[];
extern s16* sprites_no3_7[];
extern s16* sprites_no3_8[];
static s16** spriteBanks[] = {
    0,
    sprites_no3_0,
    sprites_no3_3,
    sprites_no3_1,
    sprites_no3_2,
    sprites_no3_4,
    sprites_no3_5,
    sprites_no3_6,
    sprites_no3_7,
    sprites_no3_8,
```

Which more accurately represents the data within.

Naturally, since this PR mostly just changes the tool, the real changes
are in the tool's output, so feel free to clone this branch and
investigate the sprite_banks.h file if you want to see anything further
about it.

DRA's equivalent of the SpriteBanks array is `D_800A3B70`, and is
currently in the repo as extracted data, without using `sotn-assets`;
this PR makes it so the types in the overlays (which do use
`sotn-assets`) will match the types in DRA.
2024-10-05 21:28:16 +01:00
Aleksandr Shabelnikov
a979d90d9a
NO0: Some deduplications (#1741) 2024-10-05 19:24:11 +01:00
bismurphy
4ec4a04c38
Migrate sotn-assets to use u16/s16 types (#1740)
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 (push) Blocked by required conditions
Build C code / build-macos (push) Blocked by required conditions
Build C code / build-windows (push) Blocked by required conditions
Build C code / build-linux-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
I did a find and replace for "unsigned short" to "u16" in the
sotn-assets `build.go` file and the same for "signed short" to "s16".
Then I went through and added common.h imports to fix each of the build
errors until it worked.

Using the numerical types is preferred due to being shorter (reducing
line wrapping), and to be future-proof for any systems where the "short"
type might not be 16 bits.
2024-10-05 18:22:03 +01:00
bismurphy
1c1e838d92
Decompile NO3 EntityBackgroundLightning (#1739)
Nice to get more progress in our "old" stages on those last few
difficult functions.

At the end of this function there is a little switch block which
switches around some SFX; this informed me that D_80097910 holds SFX, so
I went back through the repo for other uses of this variable and made it
use SFX enums. This variable appears to hold the SFX ID for the current
background music. Maybe it deserves a name, but I don't want to turn
this PR into too much of a mess of doing different things.
2024-10-05 15:44:42 +01:00
Aleksandr Shabelnikov
57e8245a2e
NO0: decompile func_us_801CC8F8 (#1728) 2024-10-05 14:53:41 +01:00
Josh Schreuder
755675bf5f
Dedupe no0 e_particles (#1736) 2024-10-05 14:09:48 +01:00
Josh Schreuder
f2e3902b5b
Dedupe no0 UpdateStatueTiles (#1735) 2024-10-05 13:44:13 +01:00
Josh Schreuder
6cb2e58fc1
Decompile no0 func_us_801DC754 (#1734) 2024-10-05 13:43:14 +01:00
bismurphy
88134dba3c
More entity cleanup: ET_Generic, renaming, and some Animset improvements (#1723)
This is doing a few different things; I'm sort of finding issues and
fixing them one by one. I've found more, but don't want this PR to get
too bloated.

1) Removal of more uses of ET_Generic, and eliminating a few of its
members

2) Renaming EntityUnk15 to EntityGreyPuff

3) Reworking Animset data. It's s16, not u32, so the data in d_2F324.c
has been adjusted to match that.
2024-10-05 12:37:48 +01:00
Josh Schreuder
b696848c5a
Dedupe some functions in no0 e_collect (#1732)
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 (push) Blocked by required conditions
Build C code / build-macos (push) Blocked by required conditions
Build C code / build-windows (push) Blocked by required conditions
Build C code / build-linux-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
2024-10-04 22:27:18 -07:00
H.M. Burger
7752094c15
Importing tt_001 animation data (#1731)
Adding animation frame data to tt_001
Renaming file to animationdata for tt_000
2024-10-04 22:20:07 -07:00
H.M. Burger
4d2ccaac2b
Importing tt_001 clut data (#1730)
Again, data is shared with tt_000, so I merged that into a shared
header.
2024-10-04 21:11:15 -07:00
H.M. Burger
4282ac221e
Importing tt_001 data spriteparts (#1729)
Spriteparts data is the same between bat and ghost, so I moved them to a
shared header.
If they are different than other familiars, we'll have to rename the
shared header.
2024-10-04 20:57:04 -07:00