Commit Graph

2743 Commits

Author SHA1 Message Date
water111 48cb9bb787 [decompiler] as-type and font method support (#3855)
Add support for `as-type` macro, and detecting inline font methods. This
works in all three games but I've only updated jak 3's goal_src for now.
Eventually I will go back and work through the others, but I want to get
more decompiler features in first.


![image](https://github.com/user-attachments/assets/5c31bf85-97b4-437c-bc4b-dc054e60551e)

---------

Co-authored-by: water111 <awaterford1111445@gmail.com>
v0.2.22
2025-02-01 21:23:11 -05:00
dependabot[bot] d5590ab638 build(deps): bump hendrikmuhs/ccache-action from 1.2.14 to 1.2.16 (#3854)
Bumps
[hendrikmuhs/ccache-action](https://github.com/hendrikmuhs/ccache-action)
from 1.2.14 to 1.2.16.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/hendrikmuhs/ccache-action/releases">hendrikmuhs/ccache-action's
releases</a>.</em></p>
<blockquote>
<h2>v1.2.16</h2>
<h2>What's Changed</h2>
<ul>
<li>Change Bash to Shell everywhere by <a
href="https://github.com/hansfn"><code>@​hansfn</code></a> in <a
href="https://redirect.github.com/hendrikmuhs/ccache-action/pull/223">hendrikmuhs/ccache-action#223</a></li>
<li>Add option to add stats to Job Summary page by <a
href="https://github.com/planetmarshall"><code>@​planetmarshall</code></a>
in <a
href="https://redirect.github.com/hendrikmuhs/ccache-action/pull/263">hendrikmuhs/ccache-action#263</a></li>
<li>Evict old files from the cache prior to saving by <a
href="https://github.com/planetmarshall"><code>@​planetmarshall</code></a>
in <a
href="https://redirect.github.com/hendrikmuhs/ccache-action/pull/270">hendrikmuhs/ccache-action#270</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/planetmarshall"><code>@​planetmarshall</code></a>
made their first contribution in <a
href="https://redirect.github.com/hendrikmuhs/ccache-action/pull/263">hendrikmuhs/ccache-action#263</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/hendrikmuhs/ccache-action/compare/v1...v1.2.16">https://github.com/hendrikmuhs/ccache-action/compare/v1...v1.2.16</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/hendrikmuhs/ccache-action/commit/53911442209d5c18de8a31615e0923161e435875"><code>5391144</code></a>
Revert <a
href="https://redirect.github.com/hendrikmuhs/ccache-action/issues/273">#273</a>
(<a
href="https://redirect.github.com/hendrikmuhs/ccache-action/issues/276">#276</a>)</li>
<li><a
href="https://github.com/hendrikmuhs/ccache-action/commit/10832139bf774c2772bd272b9965661f650cc03d"><code>1083213</code></a>
update code</li>
<li><a
href="https://github.com/hendrikmuhs/ccache-action/commit/f2e06a04a5f6407f80d5b08979a45824a2c95674"><code>f2e06a0</code></a>
Bump <code>@​actions/cache</code> from 3.3.0 to 4.0.0 (<a
href="https://redirect.github.com/hendrikmuhs/ccache-action/issues/268">#268</a>)</li>
<li><a
href="https://github.com/hendrikmuhs/ccache-action/commit/d10405245044a4399effebdfc1ae28cbaa1231f9"><code>d104052</code></a>
Bump typescript from 5.7.2 to 5.7.3 (<a
href="https://redirect.github.com/hendrikmuhs/ccache-action/issues/275">#275</a>)</li>
<li><a
href="https://github.com/hendrikmuhs/ccache-action/commit/f5df2923b5a63919a669a730a8795f719f700bdc"><code>f5df292</code></a>
Use sudo (if available) when installing sccache (<a
href="https://redirect.github.com/hendrikmuhs/ccache-action/issues/273">#273</a>)</li>
<li><a
href="https://github.com/hendrikmuhs/ccache-action/commit/d535f91810e6ff57acce500c7992765d9bc05a33"><code>d535f91</code></a>
Bump <code>@​types/node</code> from 22.10.2 to 22.10.5 (<a
href="https://redirect.github.com/hendrikmuhs/ccache-action/issues/272">#272</a>)</li>
<li><a
href="https://github.com/hendrikmuhs/ccache-action/commit/e7a0524ab2c2f3d668e20aced36205fa717e29b9"><code>e7a0524</code></a>
Evict old files from the cache prior to saving (<a
href="https://redirect.github.com/hendrikmuhs/ccache-action/issues/270">#270</a>)</li>
<li><a
href="https://github.com/hendrikmuhs/ccache-action/commit/c7704b4bd5fc9171d8e26073444d7779d90cde3c"><code>c7704b4</code></a>
Bump <code>@​types/node</code> from 22.10.1 to 22.10.2 (<a
href="https://redirect.github.com/hendrikmuhs/ccache-action/issues/269">#269</a>)</li>
<li><a
href="https://github.com/hendrikmuhs/ccache-action/commit/6f387851dc686da4ddc9833a1d7085535bd4d02f"><code>6f38785</code></a>
Add option to add stats to Job Summary page (<a
href="https://redirect.github.com/hendrikmuhs/ccache-action/issues/263">#263</a>)</li>
<li><a
href="https://github.com/hendrikmuhs/ccache-action/commit/5f65b4d9dc6aafa5e9aedece06f7c06f2974af86"><code>5f65b4d</code></a>
Bump <code>@​types/node</code> from 22.10.0 to 22.10.1 (<a
href="https://redirect.github.com/hendrikmuhs/ccache-action/issues/267">#267</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/hendrikmuhs/ccache-action/compare/v1.2.14...v1.2.16">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=hendrikmuhs/ccache-action&package-manager=github_actions&previous-version=1.2.14&new-version=1.2.16)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-01 15:22:08 -05:00
Hat Kid 710f3ac117 custom levels: etie and build actor support for jak2/3 (#3851)
Custom levels for Jak 2/3 now support envmapped TIE geometry. The TIE
extract was also changed to ignore materials that have the specular flag
set, but are missing a roughness texture.

Jak 2/3 now also support the `build-actor` tool.

The `build-custom-level` and `build-actor` macros now have a few new
options:

- Both now have a `force-run` option (`#f` by default) that, when set to
`#t`, will always run level/art group generation even if the output
files are up to date.
- `build-custom-level` has a `gen-fr3` option (`#t` by default) that,
when set to `#f`, will skip generating the FR3 file for the custom level
and only generate the GOAL level file to skip the potentially slow
process of finding and adding art groups and textures. Useful for when
you want to temporarily edit only the GOAL side of the level (such as
entity placement, etc.).
- `build-actor` has a `texture-bucket` option (default 0) which will
determine what DMA sink group the model will be placed in, which is
useful to determine the draw order of the model. Previously, this was
omitted, resulting in shadows not drawing over custom actors because the
actors were put in a bucket that is drawn after shadows (this behavior
can be restored with `:texture-bucket #f`).
2025-02-01 18:04:26 +01:00
OpenGOAL Bot 23b86d95c3 CI: Periodic Controller Database Update (#3847)
Updating Controller Database

Co-authored-by: OpenGOALBot <OpenGOALBot@users.noreply.github.com>
2025-01-28 09:19:17 -05:00
water111 7348e6a4ff [decompiler] Update vector ops, reduce casts (#3849)
Update the decompiler to use the new vf macros.

Also, fix a bunch of silly casting issues where accessing inline fields
with an offset of 0 would be better than a cast:

![image](https://github.com/user-attachments/assets/885bbb07-634f-47b8-99f5-5a947941cdde)

---------

Co-authored-by: water111 <awaterford1111445@gmail.com>
2025-01-20 16:32:58 -05:00
water111 98d6618a8b [decompiler] Detect vector*! (#3846)
Detect use of `vector*!`, which is inlined in jak 2 and jak 3.

---------

Co-authored-by: water111 <awaterford1111445@gmail.com>
2025-01-20 12:21:28 -05:00
water111 3ee2b4423c [decompiler] Cleanup for Jak 3 (#3845)
This PR does a few cleanups:
- improve method names/comments/flags for `enemy.gc` and a few other
files
- fix `new-stack-matrix0` not working for jak 3
- add `matrix-copy!` detection for jak 3
- add `vector-copy!` detection

---------

Co-authored-by: water111 <awaterford1111445@gmail.com>
2025-01-20 10:31:29 -05:00
water111 341f6117d5 Fix camera-other (#3843)
There's a feature to draw levels with a different camera matrix. This
uses `camera-temp-other`, `camera-rot-other`, etc instead of
`camera-temp`, `camera-rot`... I assumed that `trans-other` was the
"other" version of `trans`, but it turns out this isn't true -
`trans-other` is combined with `quat-other` and the original camera
matrix.

This fixes the issue by using the translation part of
`inv-camera-rot-other` for othercam levels only. (it works in all cases,
but I didn't want to use it for normal levels since I think it will be
less accurate)

Co-authored-by: water111 <awaterford1111445@gmail.com>
2025-01-18 17:44:38 -05:00
water111 ee0600cdbf [jak3] Improve overlord file size handling (#3828)
Try to avoid crashes/corruption if a file changes size after you've
started the game.

Co-authored-by: water111 <awaterford1111445@gmail.com>
2025-01-18 16:07:14 -05:00
water111 a29fca982b [jak1] Fix wind (#3837)
I accidentally broke this with the camera matrix improvements, but it's
fixed now.


![image](https://github.com/user-attachments/assets/144ac770-d7bf-414a-8814-062bbe51c39e)

---------

Co-authored-by: water111 <awaterford1111445@gmail.com>
2025-01-18 16:07:01 -05:00
OpenGOAL Bot 9c9af5b488 CI: Periodic Controller Database Update (#3839)
Updating Controller Database

Co-authored-by: OpenGOALBot <OpenGOALBot@users.noreply.github.com>
2025-01-14 00:49:12 -05:00
Tyler Wilding f6fad0630f macos: don't assume that all macOS major versions are simple numeric values (#3836)
Related to https://github.com/open-goal/launcher/pull/664
Likely Fixes https://github.com/open-goal/launcher/issues/663
2025-01-11 15:50:13 -05:00
OpenGOAL Bot 434484e5b5 CI: Periodic Controller Database Update (#3831)
Updating Controller Database

Co-authored-by: OpenGOALBot <OpenGOALBot@users.noreply.github.com>
2025-01-11 12:16:14 -05:00
Tyler Wilding 6f093f98ff gsrc: Add convenience macros for masking VF operations (#3824)
Migrates all code, there should be no change in the compilation output
(linter should check this)

At first i was considering making these builtins, which short of a bunch
of code generation, would require some sort of dynamic definition in
`Atoms.cpp`. This isn't hard but, i figured it would be better to keep
it simple and just generate the OG macros.

Fixes https://github.com/open-goal/jak-project/issues/233
2025-01-11 12:16:05 -05:00
Hat Kid e836f09212 jak3: fix error with subtitle speaker names (#3832) 2025-01-07 11:33:05 +01:00
Hat Kid f883b075fd jak3: port anim-tester-x (#3830) v0.2.21 2025-01-05 20:36:26 +01:00
Aloqas fe648ac7c5 jak3 pc subtitles (#3812)
transcribed subtitles for gameplay and model viewer dialogue

---------

Co-authored-by: blahpy <68830177+blahpy@users.noreply.github.com>
2025-01-05 20:27:48 +01:00
water111 b2c163999d [jak3] Fix cloth nans (#3827)
Kind of silly fix.

The cloth update function sometimes runs before the "setup" is done
(`need-setup` is set), which divides by zero in a bunch of places. This
fix prevents NaNs from spreading during this time.

Co-authored-by: water111 <awaterford1111445@gmail.com>
2025-01-05 13:00:01 -05:00
water111 79e4e36878 [gk] Increase print buffer, add size check (#3826)
This should fix the crash when entering the freedom HQ elevator. It was
caused by a large number of prints, one for each process in the city
being killed by `check-for-rougue-process`, which would overflow the
print buffer. So I increased the print buffer.

Detecting buffer overflow here is hard because lots of things are
allowed to write to it, including the user's GOAL print methods. I added
a basic check that will assert when there's 1k or less space in the
buffer. It won't catch every overflow, but it would have caught this
one.

Co-authored-by: water111 <awaterford1111445@gmail.com>
2025-01-05 11:05:09 -05:00
water111 e30dc9ecc7 [graphics] Improve some camera math (#3825)
I finally went through and worked out the math for the camera matrix,
and improved how it works for PC rendering. I was able to finally avoid
the double perspective divide issue, which I always thought would cause
accuracy issues.

This will help tfrag, tie (no envmap), shrub, and hfrag have less
z-fighting in cases where the camera and the thing you're looking at are
pretty close, but the entire level is far from the origin - like jak 3
temple. I was able to modify the camera matrix so we don't have to do
all the weird scaling/addition in the shader.

Here's a screenshot from the temple oracle checkpoint, cropped from 4k.
This used to have a lot of fighting issues.


![image](https://github.com/user-attachments/assets/4e11157f-ccf5-4f14-98a9-4a0b34da0cd2)

It doesn't help issues where the thing you're looking at is very far
away (jak 1 mountains, some jak 2 city stuff). It also doesn't help with
jak's skirt/scarf, since those use a different renderer.

There's definitely more to do here, but this is a good starting point
and proof that I can at least figure out the math.

Co-authored-by: water111 <awaterford1111445@gmail.com>
2025-01-05 09:57:48 -05:00
water111 e0acc2d15f [jak2, jak3] Unstretch moon and sun (#3822)
Fix the issue where the moon gets wide when using PC aspect ratios


![image](https://github.com/user-attachments/assets/db0ad274-5ee4-4ec3-92b6-650d295f8622)

Co-authored-by: water111 <awaterford1111445@gmail.com>
2025-01-04 12:39:23 -05:00
water111 2b226fedea [jak3] Update texture remap table (#3821)
Fix for https://github.com/open-goal/jak-project/issues/3820

Jak 2 and 3 use this annoying trick where they store multiple images in
the same texture by just changing the CLUT. This breaks some PC code
because those two textures will have the same TBP address. so there's a
table of remaps to fix this, generated by the decompiler. Unfortunately,
I generated that table before the decompiler loaded the .STR file with
these textures, so it was missing the remaps. This is automatically
generated in the texture folder when you run the decompiler - I just
copied it to the C++ file.


![image](https://github.com/user-attachments/assets/d3ca98d9-5d02-4055-bcb0-7e027a0a49b9)


![image](https://github.com/user-attachments/assets/9514bcbc-0523-466e-83cc-dd9cca7632ec)

Co-authored-by: water111 <awaterford1111445@gmail.com>
2025-01-04 12:24:57 -05:00
water111 266b423efa [jak3] Avoid language 255 issue (#3818)
In Jak 3, the default PC settings file would have a language of 255
because it runs before the first settings update. This would cause the
game to crash the second time it is started.

I also added this simple imgui window to see the names of streams in the
"SPU" memory, which has been useful for debugging

![image](https://github.com/user-attachments/assets/0a9d6af7-c423-4d8a-a461-faf45e350f33)

---------

Co-authored-by: water111 <awaterford1111445@gmail.com>
2025-01-04 11:39:28 -05:00
OpenGOAL Bot ea61985e21 CI: Periodic Controller Database Update (#3809)
Updating Controller Database

Co-authored-by: OpenGOALBot <OpenGOALBot@users.noreply.github.com>
2024-12-30 20:10:22 -05:00
Tyler Wilding e5a35f6ba0 fonts: add support for the rest of the czech alphabet (#3816)
Missed a few characters in the caron PR, but also adds support for the
rest of the czech alphabet that uses other diacritics.

![Screenshot 2024-12-30
174943](https://github.com/user-attachments/assets/10291b98-1232-47af-8391-95dca44adc07)
![Screenshot 2024-12-30
180032](https://github.com/user-attachments/assets/42f8d7a2-a798-425e-86ac-238bd589efa9)
2024-12-30 20:10:08 -05:00
Tyler Wilding d81b60736a fonts: support caron diacritics (#3815)
![Screenshot 2024-12-30
152831](https://github.com/user-attachments/assets/9b006764-00b8-4490-aeb5-02af39fa1724)
![Screenshot 2024-12-30
154346](https://github.com/user-attachments/assets/f27c9600-2d25-460d-afd6-2666d22a8ff7)
2024-12-30 17:34:26 -05:00
water111 0e55ff6108 [jak3] Fix issue where some vag streams never queue (#3805)
Accidentally incrementing `s` twice in the loop, so queued streams in
slot 1, and 3 were skipped by the overlord.
This would usually cause the audio to never start playing because the
game would wait for the audio to successfully get queued.

Co-authored-by: water111 <awaterford1111445@gmail.com>
2024-12-14 13:33:38 -05:00
Hat Kid 0e5aed329e jak3: fix missing shadow for wings (#3803) 2024-12-14 18:36:53 +01:00
water111 a3e8f0f91a [Jak3] Adjust overlord SPU dma to avoid audio hangs (#3804)
Change jak 3 SPU DMA to run the interrupt handler "immediately" (or at
least before `DMA_SendToSPUAndSync` returns).

This fixes an issue where audio can hang during fast cutscene playback.
I'm hoping it fixes more issues with looping/stuck audio as well, but
this needs more testing.

I originally wanted to do it this way, but thought that it didn't work -
from Jak 2 it seemed like things broke if the DMA was too fast. But, at
least for Jak 3, everything seems to work like this. This will remove a
huge source of non-deterministic timing in audio stuff and hopefully
make things easier to debug. It also means that a large portion of
streaming audio code will never have to run - from the game's point of
view there's always the next SPU buffer available.

If this works well, I might revisit jak 2 as well.

Co-authored-by: water111 <awaterford1111445@gmail.com>
2024-12-14 12:36:24 -05:00
water111 b3cdcf3a67 custom actor, fix animation compression (#3802)
Fix a missing scale factor when using the large mode in the animation
compressor. This would make some joints have a translation of near 0 if
the original animation had stuff moving a large distance

Co-authored-by: water111 <awaterford1111445@gmail.com>
2024-12-14 11:14:55 -05:00
OpenGOAL Bot 0edb88dc69 CI: Periodic Controller Database Update (#3779)
Updating Controller Database

Co-authored-by: OpenGOALBot <OpenGOALBot@users.noreply.github.com>
2024-12-10 16:53:36 -05:00
Hat Kid c476b84182 custom models: option to copy mod/eye draws from original model (#3800)
Two new flags were added to the Blender plugin to allow reusing the mod
and/or eye draws of the original model that is being replaced. Works
pretty well for eyes, but the blerc draws can cause some Z-fighting with
the non-moving parts of the model.

Also a small refactor to the merc replacement code to de-duplicate some
code by moving stuff to `gltf_util.cpp`.
2024-12-09 20:49:56 +01:00
water111 5458d865d4 [Custom Levels] Improve color palette generation (#3797)
A few improvements to color palette selection. These were made by
tracing some particularly bad colors through and seeing where it made
obviously bad decisions for splitting. I tested on crystal cave, and a
test GLBs from Kuitar that previously had issues with alpha.

- The previous approach to splitting was based on trying to keep a tree
of deduplicated colors balanced (same count in each leaf). This is not
really a good idea for generating color palettes. A better approach is
to try to minimize the volume of the child node, limiting how inaccurate
a color can be. Splitting is now chosen based on the average of the
_deduplicated channel values_, which in practice seems to work pretty
well for Kuitar's levels. Other approaches could work here too.
- The previous approach of alternating through dimensions to split on
was kept.
- The depth of the KD tree during the initial split was increased,
allowing it to use up to 8192 colors, instead of just 1024.
- In most cases, not all child nodes of the tree have colors in them,
meaning that a tree of depth 13 would have less than 8192 colors. If
this happens, child nodes are split until the color count reaches 8192.
The selection of which nodes to split is somewhat arbitrary, but is
breadth-first. The axis for splitting is the one with the largest range.
(which might be a better idea in general?)

On crystal-cave, the worst case color error was reduced from 221 to 9.

---------

Co-authored-by: water111 <awaterford1111445@gmail.com>
2024-12-08 12:31:48 -05:00
Hat Kid 51d008f9ab decompiler: detect and turn inverse mult to div (#3795)
Co-authored-by: ManDude <7569514+ManDude@users.noreply.github.com>
2024-12-07 23:10:49 +01:00
water111 a2f9d36332 Fix animation processing interpolation bug, crash on no merc material (#3794)
Fixes the issue with animations doing a full 180 degree rotation and
disappearing. The quaternions in the GLB export "flip", and when
interpolating animation frames in between a flip, we got bogus
quaternions.

Fixes https://github.com/open-goal/jak-project/issues/3786

Also fix a crash in `goalc` when using merc models without any
materials.

Co-authored-by: water111 <awaterford1111445@gmail.com>
2024-12-07 13:42:48 -05:00
ZedB0T 6e4e5d2bf7 Add option to hide the imgui bar with a click event (#3791)
Should cover edge cases where the bar is displayed and a keyboard type
device is not connected to the system (Steam deck/touch input based
device instead).

While it should probably be impossible to display the bar in the first
place on such devices it apparently isnt ->
https://www.reddit.com/r/jakanddaxter/comments/1h4mht1/how_to_remove_grey_bar_at_top_on_steamdeck/

And even ignoring the whole steamdeck/no keyboard thing adding another
way to hide it that is visible on the bar should help reduce people
asking about how to hide it. (And hopefully help people who dont
ask/dont know where to ask!)



https://github.com/user-attachments/assets/7f132781-675c-451e-8b39-2a78fa098b9e
2024-12-07 13:42:39 -05:00
water111 1029516f6d [sound] Add instance limits (#3769)
Add instance limits to the sound library, and a `dump-info` command to
`sndplay` to print out all the sounds/flags in an SBK file.

This is based on the decompiled 989snd library @Ziemas is working on
(https://github.com/Ziemas/dec989snd/blob/main/src/sndhand.c#L77)

Co-authored-by: water111 <awaterford1111445@gmail.com>
2024-12-07 13:41:45 -05:00
Hat Kid 8690104ba0 jak1: add merc version of draw-bones-hud (#3793)
Add a version of `draw-bones-hud` that uses merc to support drawing
foreground HUD elements that use custom models.
2024-12-06 20:25:20 +01:00
Hat Kid e18dbb6256 jak3: fix cloth disappearing after 600 orbs (#3790)
After collecting 600 orbs, cloth systems that didn't have any
`alt-tex-name`s defined would vanish because the `static-cloth-params`
macro doesn't default them to `#f`.
2024-12-02 17:43:41 +01:00
Hat Kid 477cefb6a5 model replacements: prevent duplicate processing (#3789)
Store a small database of which models have already been swapped out in
a level to prevent duplicate processing.

Also a small fix for cases where using a model replacement that has no
armature would cause merc nightmares due to only having a `max_bones` of
3.
2024-12-01 22:01:50 +01:00
Tyler Wilding 8feb46dc45 ci: hopefully fix MacOS CI in preparation for release (#3788)
Folder names were in common with the normal intel x86 build, the release
wasn't going to work. Hopefully with these changes it will but, still
technically untested. Don't have time to do so tonight.
v0.2.20
2024-11-30 22:27:52 -05:00
Hat Kid 620168c45a custom models: ignore invalid envmap material (#3785)
If a model has a material with specular properties, but is missing a
roughness texture, warn and treat it as a normal draw instead of
erroring out.
v0.2.19
2024-11-29 09:27:46 +01:00
massimilianodelliubaldini 4c2e1a8a90 Remove 128 character buffer causing long filenames to crash gk (#3771)
Several users have reported that ArchipelaGOAL is not launching
properly, even when using the OpenGOAL Launcher. The window pops up with
a black screen, and then quits. The only way they can run it is if they
double click gk.exe.

This comes down to the Launcher providing gk.exe with the `config_path`
parameter, which leads the program to find `archipelagoal-settings.gc`.
Here is an example from me:

```
D:\Applications\Games\OpenGOAL\features\jak1\mods\JakMods\_settings\archipelagoal\OpenGOAL\jak1\settings/Mods/archipelagoal-settings.gc
```

If a user's base OpenGOAL install directory is long enough, this path
becomes longer than 128 characters. This overflows the character buffer
in `kopen` which is used to open file streams. If you're only slightly
over the limit like myself, at 135 characters, you may not have noticed
a problem. But some users have paths a little longer, like 168
characters, and they report the issue is consistent.

Water111 suggested we remove the 128 character buffer and use the
filename data directly. This fix requires no changes to the Launcher,
just to the kernel, and every mod could stand to benefit from this fix.
2024-11-28 17:14:09 -05:00
Hat Kid ef719d2ab7 custom models: better error for invalid envmap material (#3784)
When a material in Blender has its IOR level changed to anything other
than the default value of 0.5, the `KHR_materials_specular` extension is
applied during the glTF export, which is what we use to check for
envmaps in custom models. If an envmap is undesired, but the IOR value
was accidentally changed, the program would assert during model
processing if there is no metallic roughness texture attached to the
material.

Since this is an easy mistake to make and is hard to spot, this adds a
better error message for such cases.
2024-11-27 19:14:23 +01:00
Hat Kid 7848ba05b8 jak3: fix music not pausing (#3783) 2024-11-27 15:46:41 +01:00
Hat Kid f6c55eba9f custom models: increase default joint count (#3782) 2024-11-27 04:21:33 +01:00
Hat Kid 6a06291e6e jak1, jak2: add get-texture macro (#3778)
Ports the `get-texture` macro added in Jak 3 to Jak 1 and 2.
2024-11-26 11:29:34 +01:00
Tyler Wilding 9b393e2ddb ci: update minimum macOS supported version to Ventura (13) (#3780)
macOS 12 has been end of life for 2 months, GitHub is removing support
for the images very soon (within a week or so).

https://endoflife.date/macos
2024-11-25 14:43:48 -05:00
Brendan Shanks 3f7aca3c72 Taskfile: Call 'python3' on non-Windows platforms (#3752) 2024-11-25 13:40:56 -05:00
Hat Kid c263bc2114 custom models: envmap support (#3777)
Custom models and model replacements now support environment mapping.

Also fixed some cases in Jak 3 where tfrags had missing textures
(defaulting to texture 0 from tpage 0, which in Jak 3 is the default eye
texture) and replaced them with more suitable alternatives.

Fixes #3776 


https://github.com/user-attachments/assets/7c11b0de-b254-40cb-9719-11238dfb3d43


![image](https://github.com/user-attachments/assets/4cc60b55-4965-4cb8-b29d-096560e7b3aa)


![image](https://github.com/user-attachments/assets/cb46d0d1-57d7-482c-b235-15d0e633f62c)
2024-11-23 14:32:55 +01:00