Commit graph

213 commits

Author SHA1 Message Date
Matt Penny e61142b902 Build skeletool with CMake 2024-10-19 21:18:15 -04:00
Matt Penny 3b9fba522b Get Skeletool dependencies from system
Do not install while building
2024-10-19 21:18:14 -04:00
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 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 9546c509a8 CMake: generate and link localized strings 2024-10-10 01:14:17 -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 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 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 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 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
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 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
Matt Penny bf5b8e0d28
Merge pull request #47 from GiacomoGarbin/replace_libnustd_with_glibc
Use newlib instead of libnustd.
2024-04-12 19:01:12 -04:00
GiacomoGarbin 8bed9b6238 Address GH-47 issues raised in the comments.
Specifically:
* append all include search paths to LCINCS
* add LDDIRS to group all library search paths
* avoid link libm as math funtions are actually inside libultra
* use the shorthand -lc instead of -l:libc.a to link libc
2024-04-02 23:02:25 +02:00
GiacomoGarbin f15aa17f42 Valve intro video: try to load a MOV file if the BIK file doesn't exist.
The macOS Portal version uses a .mov file, so if the .bik file doesn't exist, let's try that.
2024-03-28 18:43:00 +01:00
Giacomo Garbin 70193f33c4 Also link libm for the C Standard Library math functions.
Remove isnan as it conflicts with the one defined in <math.h>.

TODO: Replace math functions defined in Mathf.c with those from the standard library.
2024-03-27 23:45:12 +01:00
Giacomo Garbin 62be2a497a Use glibc instead of libnustd.
TODO: Remove libnustd from setups as well.
2024-03-27 03:16:02 +01:00
Matt Penny bd3dc02c56 Get all textures from VPK
Some textures cannot be used in their current form, and so they are
transformed at build time by Imagemagick commands (e.g., add shapes,
crop and merge different portions, etc.).

For a very small number of textures, making them usable takes more than
a few simple commands. For example, Chell's eyes and ears are detached
from her face in the texture image, and there are not enough polygons in
her model or pixels in an N64 texture to make a good UV map.

For these few complex textures, James worked around the problem by
checking in pre-edited images. This commit removes those images and
instead performs the necessary transformations at build time. As a result,
some textures are now slightly different (ball launcher/catcher, cube,
Chell). Chell's UV map is redone to accomodate this - for the better.
2024-01-21 00:42:52 -05:00
Matt Penny 77a17ab022 Rename boot obejct file to have a more generic name
We use the 6102 boot code by default, but this can be changed (for
example, if flashing to a cartridge with a different CIC).

As with the microcode, the path cannot be easily passed to the
linker script and so the hard-coded name should not be specific to
particular boot code.
2024-01-08 23:08:18 -05:00
Matt Penny 8aa8e0f331 Allow changing base location of N64 toolchain
Environment variable N64_ROOT optionally sets the root directory of
the N64 toolchain.

To enable this to work with the linker script, the microcode object
files are now copied to the build directory before linking (since
there is no easy way to pass the path to the script dynamically).
An added benefit to this approach is that different microcode can
now be used easily if desired.
2024-01-08 23:08:17 -05:00
James Lambert 95ca05b846 Build out much of test chamber 09 2024-01-02 21:36:53 -07:00
James Lambert ee42238411 Work on test chamber 08 2023-12-29 21:48:16 -07:00
Joseph 8105ddedc9
Merge branch 'master' into readme-reformat 2023-12-20 01:21:22 -05:00
Joseph 227a76229b
Update Makefile
Removed:
chmod +x tools/romfix64.sh
chmod +x skelatool64/setup_dependencies.sh
because they are no longer needed.
2023-12-19 20:38:48 -05:00
Joseph d9bcadb551
Update Makefile
Forgot to remove:
fix:
	wine tools/romfix64.exe $(BASE_TARGET_NAME).z64

fix-nowine:
	chmod +x tools/romfix64.sh
	sh tools/romfix64.sh $(BASE_TARGET_NAME).z64
2023-12-19 20:34:03 -05:00
Joseph f79569bfe6
Update Makefile
Added Chmod so the scripts can run.
2023-12-18 23:28:52 -05:00
Joseph 8f128d5136
Update Makefile
Added auto run
sh tools/romfix64.sh $(BASE_TARGET_NAME).z64
2023-12-18 21:53:52 -05:00
Matt Penny ce239440f3 Sort CODEFILES in Makefile
Link order matters when generating codesegment*.o. The old sort
order of CODEFILES was OS/file system dependent. Sort the file
paths to ensure consistent linking across environments.
2023-12-18 14:06:33 -05:00
carsongoodwin32 f06ccae78d Add makefile changes and move romfix.sh 2023-12-17 17:51:50 -06:00
hackgrid f536179e59
make sure Makefile always setups skelatool64 dependencies first 2023-12-13 15:06:30 +01:00
James Lambert 39a1ec576d Fix some profiler issues 2023-12-12 20:35:00 -07:00
hackgrid e798a34203
use skelatool64 Makefile for clean 2023-12-12 16:15:54 +01:00
hackgrid f56a53aed0
fix rm -f 2023-12-11 22:12:56 +01:00
hackgrid d210ca693c
always build skelatool64 2023-12-11 20:28:14 +01:00
hackgrid d51b800588 skelatool64: fix "pessimizing-move" warnings + clean build with main Makefile. Fix typo. 2023-12-11 19:19:50 +01:00
James Lambert 7214c7c845 Add wide ledge for vertical portals to be able to stand hanging out of portal 2023-12-01 20:27:54 -07:00
lambertjamesd 897abb9e4e
Merge pull request #508 from hackgrid/fix-make-6
allow dynamic generation of subtitles
2023-11-29 19:44:52 -07:00
James Lambert f117026287 fix portal gun flicker between levels 2023-11-28 20:50:23 -07:00
hackgrid efb81034c2
don't require all supported subtitle language files 2023-11-28 21:31:26 +01:00
James Lambert 20e9beaa0f Implement triple sign state 2023-11-24 21:54:27 -07:00
James Lambert b275813dcd Use liberation mono for credits font 2023-11-22 09:48:09 -07:00
James Lambert 456efb37fa Start work on credits menu 2023-11-21 21:09:48 -07:00
James Lambert 67d99e1bd3 Start work for animating portal gun 2023-11-20 21:55:09 -07:00
James Lambert 58f851d3d4 Add bad google translate placeholder translations 2023-11-12 21:35:02 -07:00
James Lambert dd05a3897e build out video options tab 2023-11-11 14:08:19 -07:00
hackgrid 2377ac55b7
Update Makefile for new valve_* files 2023-11-10 10:41:25 +01:00
James Lambert 9d07965582 translate controls menu 2023-11-09 21:42:50 -07:00