Commit graph

490 commits

Author SHA1 Message Date
Matt Penny 42a9189c95 CMake: get assembly working
* 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.
2024-10-19 16:30:58 -04:00
Matt Penny 1cb12690b8 Fix UV mapping on elevator bottom edge 2024-10-17 21:20:01 -04:00
Matt Penny 22ea93d19f CMake: automatically find programs used in build
Blender 3.6 and ImageMagick 6 versions are also enforced
2024-10-17 21:04:48 -04:00
Matt Penny 08368ffa25 Remove mpg123 dependency
It was used to convert MP3 -> WAV, which ffmpeg can do.
2024-10-17 18:44:24 -04:00
Matt Penny 86aaad1b3b CMake: suppress sox warnings 2024-10-17 18:20:55 -04:00
Matt Penny 9546c509a8 CMake: generate and link localized strings 2024-10-10 01:14:17 -04:00
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 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 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 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 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 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 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 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 4d95d53ad3 Fix floor extending under divider in chamber 15 2024-07-25 20:40:27 -04:00
Matt Penny bc13a1cc6c Fix activated ball catcher being obscured in chamber 14 2024-07-23 21:34:52 -04:00
Matt Penny 3bbb62b1c8 Fix UV map on floor in chamber 15 room 5 2024-07-13 02:17:26 -04:00
Matt Penny 71f92e21c2 Enable room 3 fizzler in chamber 15 (final fizzler)
Fling is now much easier to perform after movement physics changes.
2024-07-03 22:07:50 -04:00
Matt Penny 8276c3876b Fix chamber 15 switch room 2 wall length 2024-06-11 22:13:42 -04:00
Matt Penny 72cbe59e1b Fix chamber 15 angled wall UV rotation 2024-06-08 23:50:30 -04:00
Matt Penny 473fa00efe Enable room 7 fizzler in chamber 15
Keep last fizzler disabled until movement physics are fixed, otherwise
getting past it is quite difficult.
2024-06-08 23:23:25 -04:00
Matt Penny ae3c70750e Enable room 2 and 9 fizzlers in chamber 15
At 42/48 dynamic collision objects without portals or energy balls.
2024-06-07 00:02:03 -04:00
Matt Penny f35bf3d2a2 Enable fizzlers in first room of chamber 15
Very close to dynamic object limit
2024-05-30 00:25:19 -04:00
Matt Penny 1e8275eec3
Chamber 15 - first pass (#39) (#69)
* started on chamber 15

* fizzler width can now be scaled via blender object's scale.x

* fix fizzler rendering radius (remember, fizzlers are per default 2x2, still their internal width height was 1x1?)

* chamber 15 first room functionally complete

* chamber 15: first room decor

* finished first room of chamber 15

* test chamber 15 second room WIP

* chamber15 hallway from room 2 to room 3 (WIP) and more progress on room 2

* test chamber 15: added observation room to room2, added voice lines add the beginning

* test chamber 15: finishing room 2

* enable "new game" menu entry for chamber 15 & boot into the intro menu again instead of straight into chamber 15

* Start on shamber 15 hazard hallway

Hallway is modeled with collision. No platforms.

* Decals and platform + light cutouts for chamber 15 hazard hallway

* Animate one moving platform in chamber 15 hazard hallway

This one animation is ~19 KB. Look at optimizing.

* Add material for water hazard wall

* Use water hazard wall material in chamber 15

* Start modelling final room of chamber 15

* Chamber 15 final room - side rooms

* Chamber 15 final room - pistons and exit

* Chamber 15 final room - observation room

* Chamber 15 final room - ball launcher and catcher

* Chamber 15 final room - ball trap and indicator lights

* Chamber 15 final room - ball trap doors

* Chamber 15 final room - collision

* Chamber 15 final room - animations and triggers

* Chamber 15 - escape hatch

* Chamber 15 - finish final room

* Chamber 15 - start on room 3

* Chamber 15 - main room 3 layout and collision

* Fix UV translation

Do not translate minimum coordinates, otherwise the translation will be
cancelled out.

* Chamber 15 - room 3 stair room

* Chamber 15 - room 3 dividers and ball launcher/catcher

* Chamber 15 - room 3 finishing touches

* Observation room decor
* Triggers
* Indicator lights
* Decals

* Chamber 15 - merge beginning and end

* Chamber 15 - fix room boundaries

---------

Co-authored-by: Deconimus <pascal.sielski@gmx.de>
Co-authored-by: Deconimus <Deconimus@users.noreply.github.com>
2024-05-28 01:53:02 -04:00