Commit Graph

1649 Commits

Author SHA1 Message Date
Matt Penny
08dc063227 Use proper default material for fleck_ash2
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.
2024-10-09 22:55:53 -04:00
Matt Penny
ddac6daeff CMake: prevent double work when using parallel make 2024-10-09 22:49:02 -04:00
Matt Penny
87f931a8e4 CMake: link level and model animation data 2024-10-09 21:57:39 -04:00
Matt Penny
6c625e39e6 CMake: link generated code 2024-10-08 00:25:30 -04:00
Matt Penny
1d0b22df61 Generate dynamic model lists with CMake, + refactor
* 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/`
2024-10-05 21:11:49 -04:00
Matt Penny
9643719a31 Fix incorrect variable name for Python executable in CMake build 2024-10-05 02:04:39 -04:00
Matt Penny
e1e6a53aa6 Convert models during CMake build
No generation of dynamic model lists yet
2024-10-05 01:54:55 -04:00
Matt Penny
1e8a4f5458 Remove empty linked list files 2024-10-05 01:24:56 -04:00
Matt Penny
2e6f8ac86b Reflect proper default scene scale in defs.h
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.
2024-10-05 01:24:56 -04:00
Matt Penny
6607838b8d Rename skeletool loadScene() isLevel argument to shouldSimplify and invert logic
This is more accurate to what the code is actually used for, making it
easier to understand.
2024-10-05 00:07:13 -04:00
Matt Penny
a652558a4c Remove unused material door_frame_01 2024-10-04 23:47:41 -04:00
Matt Penny
7d5caf5912 Remove unnecessary model flags 2024-10-04 22:42:21 -04:00
Matt Penny
6a14db3a16 Start to hook up code generation with CMake builds
Automatically generate material, sound, and level data.

Generated code is not currently linked.
2024-09-26 23:06:10 -04:00
Matt Penny
51e7e001a5 Link to libultra for CMake builds
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.
2024-09-26 00:36:44 -04:00
Matt Penny
bc2052527c Generate game version for CMake builds and fix generated level names
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.
2024-09-25 22:24:16 -04:00
Matt Penny
9e633b868b Work on CMake compilation
About half of the source files compile.
Need to hook up generated code, compiler definitions, and dependencies.
2024-09-24 01:27:18 -04:00
Matt Penny
a67288f62e Add barebones N64 CMake toolchain files
Just focus on compilation for now
2024-09-24 01:02:03 -04:00
Matt Penny
fa0940fe90 Work on CMake conversion: test chambers
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
2024-09-13 00:53:55 -04:00
Matt Penny
dea0c3591d Work on CMake conversion: sound transformation, conversion, and table generation
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.
2024-09-12 02:17:28 -04:00
Matt Penny
8845a96667 Don't special case valve.aifc generation
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.
2024-09-12 02:17:26 -04:00
Matt Penny
ad66fb116c Store generated Valve image in portal_pak_modified/, not build/
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.
2024-09-11 20:13:57 -04:00
Matt Penny
0d2cd6efe0 Work on CMake conversion: sound transformation 2024-09-09 23:34:16 -04:00
Matt Penny
e2d4631ad1 Use .sox, not .jsox for elevator_move_loop1
Effects aren't used for this sound, so .jsox is unnecessary
2024-09-09 22:07:49 -04:00
Matt Penny
2fcea7f9d2 Work on CMake conversion: material generation 2024-09-07 20:00:45 -04:00
Matt Penny
ad38717b04 Update clock digit image name in Blend file so it previews properly 2024-09-06 01:37:47 -04:00
Matt Penny
b999e139fa Work on CMake conversion: VPK extract and texture conversion 2024-09-06 01:26:08 -04:00
Matt Penny
2f1171fccf Stitch together clock digits in .ims file, not makefile
Simplifies asset conversion for CMake transition
2024-09-06 01:26:08 -04:00
Matt Penny
12f1332d9d Copy awe_total via .ims file, not makefile
Simplifies asset conversion for CMake transition
2024-09-06 01:26:08 -04:00
Matt Penny
dfe9a39d7a Use latest Ubuntu LTS (24.04) for docker build and fix git permission issues 2024-08-28 19:48:50 -04:00
Matt Penny
bf6a5a643f Support building from source code archive (#85)
Save git describe output on `git archive` and fall back to saved
output for version number if building outside of a git repo.
2024-08-26 16:36:12 -04:00
Petteri Valkonen
d757d8645a
Add missing hyphen to Docker image make command argument (#86) 2024-08-25 19:09:39 -04:00
Matt Penny
9e1dfa338b Fix stair lighting in chamber 14 2024-08-22 20:12:46 -04:00
Matt Penny
769f3aa4f1 Fix chamber 13 end room doorway bounds
Prevents seeing out of bounds.
2024-08-22 20:03:33 -04:00
Matt Penny
34a9a93997 Fix mesh gap in chamber 15 hazard hallway ceiling 2024-08-22 17:15:55 -04:00
Matt Penny
1e05c88d43 Check in missing QR code image 2024-08-20 22:52:51 -04:00
Matt Penny
429dc0bd91 Add version text to landing menus
If the current commit has a tag, the tag name is used as the version.
Otherwise, the short hash of the current commit is used.
2024-08-20 21:05:29 -04:00
Matt Penny
da028cd405 Update credits with link to current repo 2024-08-20 19:59:36 -04:00
Matt Penny
0016834245 Constrain visible rooms in chamber 15 problem areas 2024-08-20 19:57:42 -04:00
Matt Penny
ab56ffb380 Add can_see argument to whitelist visible rooms
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.
2024-08-20 19:52:50 -04:00
Matt Penny
d5a1c302b1 Fix portal indicator HUD not working through multiple doorways
* Doorway normals now always point toward room A. This was intended
  and code was written for it, but typos prevented it from working.
* Consistent doorway directions allowed resurrection of previous
  collisionSceneRaycastDoorways() implementation
2024-08-20 17:37:29 -04:00
Matt Penny
e85ac2fdf1 Fix side room door visibility issue in chamber 15, and enforce one doorway per room pair
More doorways can be supported but it complicates the culling logic. It's
easy to work around so leaving unsupported for simplicity until needed.
2024-08-19 17:19:59 -04:00
Matt Penny
c3f3e5e191 Update development_progress.md with chapter 15 progress
This document is for general progress, not 100% completion, so checking
off chamber 15.

All chambers still need some bugfixes/polish.
2024-08-13 00:08:13 -04:00
Matt Penny
21a120846a Clarify vpk directory structure in add_vpk_here.md 2024-08-13 00:07:48 -04:00
Matt Penny
d6af2ebb46 Clarify @doorway example in docs 2024-08-04 10:49:21 -04:00
Matt Penny
c9f1ed96fe Use proper window/doorframe material in chamber 14 (plasticwall003a) 2024-08-04 10:41:27 -04:00
Matt Penny
7c213b7199 Basic chamber 15 lighting 2024-08-04 10:41:16 -04:00
Matt Penny
906afdd792 Enable vertex colors for metal_modular_floor_001 and plasticwall003a 2024-08-04 09:28:16 -04:00
Matt Penny
23464eea7c Moving platforms in chamber 15 hallway 2024-07-29 22:26:51 -04:00
Matt Penny
56c14389a9 Fix graphical issues with chamber 15 rotated portals and ball trap (#73) 2024-07-26 18:48:03 -04:00
Matt Penny
9822ffeac9 Support precise (i.e., rotated) culling of static geometry (#73)
Standard culling is quite coarse, for performance reasons:
* Only uses axis-aligned bounding boxes
* One visible object in a BVH node will make all others in the same node visible

These properties allow the bounding boxes of rotated objects to clip through
the back of portals to be considered visible, causing improper rendering.

This commit introduces a new optional argument for `@static` level
objects: `precise_culling`. Static geometry marked for precise culling
will be culled based on its exact (i.e., rotated) bounding box, in the
same way dynamic/animated geometry is.

Precise culling is more expensive than standard culling so it is opt-in.
It is intended only for the few situations that can hit the edge cases
described above.
2024-07-26 18:47:58 -04:00