This commit integrates the MaxMod sound engine into PTGB.
Some test code already existed, but now it's done for real.
I added a thin API wrapper in sound.c/sound.h to abstract the sound engine.
One of AquaticAlloy's test songs was added to the main menu as a proof of concept.
We may want to disable it before the actual merge though.
The problem was that our custom_malloc was not marking these functions as extern "C".
Therefore libc's malloc function and everything linked to it was still getting pulled into our
rom.
Fix: mark these functions as extern "C". This ensures that these functions aren't getting pulled in
from libc. This reduces our rom size by 3KB
This avoids forgetting about it when doing a release.
I also modified the documentation to reflect this new name.
BONUS change: I also documented the cartridge swap reset problem in the README.md
Split up data-generator into payload-generator (PTGB) and table-generator (PCCS)
The reason for this is because we don't want the dependencies to the payload stuff in PCCS.
And the tables are embedded inside libPCCS now.
Because we want to use libPCCS as a proper static lib, we now use its new Makefile to build it
before we build Poke_Transporter_GB.
This eliminates duplicate code. - Only maintain the code in one place!
To make sure the submodule is getting cloned too after cloning Poke_Transporter_GB, execute:
git submodule update --init --recursive
To update the submodule to a newer commit/different branch:
cd PCCS
git pull
git checkout <commit_or_branchname>
cd ..
git add PCCS
git commit
git push
The way it works is that a specific commit is tied to your Poke_Transporter_GB repository's PCCS folder.
- Fix make clean by adding -f flag when removing output.json
- Fix broken compress_lz10.sh script: it had a check to avoid compressing when the
input bin file hasn't changed. But the -nt operator also returns false if the output
file doesn't exist.
- Fix compilation error on conflicting u32 typedef: libtonc defines one and so does data-generator.
We shouldn't redefine it if the one from libtonc exists. The one in data-generator exists for compiling
the tool for pc.
- Fix Dockerfile. For some reason the Dockerfile was now failing because Ubuntu manages the python pip
packages. I fixed it with the --break-system-packages shortcut. It should be fine.