* Assemble through `gcc` instead of `as` directly, so source files are
preprocessed (i.e., `#include`)
* `gcc` does not pass `-I` include directories to `as`. This can
supposedly be fixed by recompiling `gcc` with `--with-gnu-as`. Popular
N64 toolchain binary distributions don't do this, and to lower the
barrier to entry I don't want to force users to have to compile their
own. Work around it by passing `-Wa,-I`.
* CMake only finds assembly dependencies when preprocessing, not when
assembling. Use `#include` instead of `.include` to work around this.
The `.incbin`s used by `sound_data.s` are covered by the
sound_data_tables target dependency.
* Refactor entry point
* Remove unused code
* Reformat level header to be more clear, and add more comments
Looks like assembling with CMake will require some changes to the
assembler flags, and possibly some manual dependency specification.
* Less hard-coding when searching for libultra
* Proper compiler, assembler, and linker flags
* Multiple build types
* Support for multi-config generators
Previously, grav_flare was used (likely due to a copy/paste error),
resulting in a warning during build and unnecessary texture data
being included in the fleck_ash2 generated model.
* When building with CMake, dynamic model lists are now generated
* Factored common code out of generate_*_list.js files to deduplicate
* Better separated generated model lists from main game code
`dynamic_asset_data.c` and `dynamic_animated_asset_data.c`
previously #included the corresponding generated headers, and
`dynamic_asset_loader.c` declared externs for the contents.
This messiness was likely done so the generated code would be built
automatically (the Makefile globs all C files under `src/`).
Now, model list data is output to C source files which are built
explicitly. This, with some refactoring, allows the previously
mentioned source files and externs to be removed.
This is a bit hacky in the Makefile but will be automatic under
CMake by using target properties.
* Reorganized some files under `tools/`
This value is set when compiling anyway, but this change makes the value
match for consistency.
Now that the default is the actual intended value, it doesn't need to be
overridden in the Makefile, but since scene scale needs to be passed to
skeletool regardless I'm going to keep the preprocessor define too so
they don't get out of sync.
Libultra include directory and library path are now found dynamically and
saved in a CMake cache variable so they can be overridden by users.
The game now links to libultra. Most linker errors are now due to lack of
integration with generated code dependencies.
With CMake, the game version is stored in a generated header file so
dependencies on it are kept track of automatically.
The game now compiles when using CMake but does not link.
Generated code dependencies are not hooked up yet and corresponding
targets need to be built manually.
Incidental changes along the way:
* Move `export_level.lua` to `tools/level_scripts/`
* Small reorganizations/fixes to existing `CMakeLists.txt` files
* Support passing absolute paths to level export
Some parts need to be cleaned up/removed/streamlined after the CMake
build can build the game on its own and compatibility with what the
old makefile does is no longer needed.
It is still necessary to special case extracting the raw WAV from the
video, but now conversion is handled using a .sox file just like the
other sounds.
This simplifies sound processing for the CMake transition.
To better organize generated files, portal_pak_modified/ will be used
for files generated by modifying portal_pak_dir/ contents.
Build/ will be for conversion to a final form needed for compilation,
without content modification.
Useful for room shapes which cannot be handled by standard visibility
checks.
Normally this can be addressed with additional rooms and doorways, but
sometimes a room is required to be a complex shape (for example, to
accomodate animated static geometry).
These instances should be few and far between, so leaving this as an
opt-in feature that can be used during level authoring.