Commit Graph

2755 Commits

Author SHA1 Message Date
Tyler Wilding 1a9012cca7 debug: build linux static binaries 2025-05-25 14:53:54 -04:00
Tyler Wilding b2289e844c g/j2: persist subtitle language properly, eliminates a crash (#3872)
Fixes #3870
v0.2.24
2025-03-01 13:17:38 -05:00
dependabot[bot] ccbd6008d2 build(deps): bump hendrikmuhs/ccache-action from 1.2.16 to 1.2.17 (#3868)
Bumps
[hendrikmuhs/ccache-action](https://github.com/hendrikmuhs/ccache-action)
from 1.2.16 to 1.2.17.
<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.17</h2>
<h2>What's Changed</h2>
<ul>
<li>support Ubuntu arm64 runners with sccache variant by <a
href="https://github.com/andrurogerz"><code>@​andrurogerz</code></a> in
<a
href="https://redirect.github.com/hendrikmuhs/ccache-action/pull/280">hendrikmuhs/ccache-action#280</a></li>
<li>Bump <code>@​types/node</code> from 22.10.5 to 22.10.10 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/hendrikmuhs/ccache-action/pull/282">hendrikmuhs/ccache-action#282</a></li>
<li>Bump <code>@​types/node</code> from 22.10.10 to 22.13.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/hendrikmuhs/ccache-action/pull/285">hendrikmuhs/ccache-action#285</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/andrurogerz"><code>@​andrurogerz</code></a>
made their first contribution in <a
href="https://redirect.github.com/hendrikmuhs/ccache-action/pull/280">hendrikmuhs/ccache-action#280</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/hendrikmuhs/ccache-action/compare/v1.2.16...v1.2.17">https://github.com/hendrikmuhs/ccache-action/compare/v1.2.16...v1.2.17</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/hendrikmuhs/ccache-action/commit/a1209f81afb8c005c13b4296c32e363431bffea5"><code>a1209f8</code></a>
Bump <code>@​types/node</code> from 22.10.10 to 22.13.0 (<a
href="https://redirect.github.com/hendrikmuhs/ccache-action/issues/285">#285</a>)</li>
<li><a
href="https://github.com/hendrikmuhs/ccache-action/commit/a6067e2292150bdcfe1a16a5d8ddcc403109ea40"><code>a6067e2</code></a>
Bump <code>@​types/node</code> from 22.10.5 to 22.10.10 (<a
href="https://redirect.github.com/hendrikmuhs/ccache-action/issues/282">#282</a>)</li>
<li><a
href="https://github.com/hendrikmuhs/ccache-action/commit/433beb5b585c67c13415f39d5ba7e485b1920710"><code>433beb5</code></a>
support Ubuntu arm64 runners with sccache variant (<a
href="https://redirect.github.com/hendrikmuhs/ccache-action/issues/280">#280</a>)</li>
<li>See full diff in <a
href="https://github.com/hendrikmuhs/ccache-action/compare/v1.2.16...v1.2.17">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.16&new-version=1.2.17)](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>
v0.2.23
2025-02-28 21:56:35 -05:00
Tyler Wilding 3c5b1fbfba New Crowdin updates - February 2024 (#3867) 2025-02-28 21:41:36 -05:00
Tyler Wilding 9759841e3b New Crowdin updates - February 2024 (#3857) 2025-02-28 19:31:50 -05:00
OpenGOAL Bot 04a10b27cd CI: Periodic Controller Database Update (#3865)
Updating Controller Database

Co-authored-by: OpenGOALBot <OpenGOALBot@users.noreply.github.com>
2025-02-27 21:16:11 -05:00
manuelx98 e656ef943b Jak 2: Italian translation (Hints) (#3590)
Used a PR since many things can't be changed using Crowdin, such as
timings.
Same team as the italian Jak 1 translation.
This PR won't include subtitles, which will be included later on in a
separate PR, once things will be worked on.
Still needs to be revised by the team.

---------

Co-authored-by: pex93 <44973506+pex93@users.noreply.github.com>
Co-authored-by: Francesco <107510301+XedoIT@users.noreply.github.com>
Co-authored-by: Tyler Wilding <xtvaser@gmail.com>
2025-02-17 00:56:00 -05:00
Tyler Wilding 41ed4b1d7e ci: update to ubuntu 22.04 (#3860)
Ubuntu 20.04 is hitting it's next EOL stage in april
https://endoflife.date/ubuntu
And it's being removed from github actions in april to go along with
that
https://github.blog/changelog/2025-01-15-github-actions-ubuntu-20-runner-image-brownout-dates-and-other-breaking-changes/

Getting ahead of this before we have random failures, I'll update the
launcher along with this change for this month.

On the bright side, we can finally update clang-format!
2025-02-16 17:40:52 -05:00
water111 23118be428 [jak3] Fix crash in subrails (#3863)
After the change to vector ops, subrails was crashing. This fixes the
crash by fixing a stack type and also marks those new vector op
functions as inline.

Co-authored-by: water111 <awaterford1111445@gmail.com>
2025-02-16 17:40:23 -05:00
water111 af9a8dd7f1 [graphics] Fix issue with envmap math (#3862)
A few people in the discord noticed that the shiny part of the subrails
looks different between PS2 and OpenGOAL. I looked into this and found a
bug where the length of the normals was half what they should have been.
Earlier this didn't matter because I normalized them in the shader, but
at some point I removed that when refactoring other parts.

I'm not completely convinced we have the intensity/tint multiplier
working correctly, but this is at least a step in the right direction.


https://github.com/user-attachments/assets/ee754011-08ac-4bee-94b2-d0e114b952ec



https://github.com/user-attachments/assets/1079635a-0b92-4965-a991-972ef6048ddf

For fun, here's this fix, plus a random doubling of the envmap effect
strength:


https://github.com/user-attachments/assets/726e7b8d-c020-42cf-a594-cad590c0ef7d

---------

Co-authored-by: water111 <awaterford1111445@gmail.com>
2025-02-16 16:58:11 -05:00
water111 2a4d3d7a4a [decompiler] More inline vector functions (#3861)
This adds more recognition for inlined vector functions to the
decompiler, which can clean up a bunch of ugly looking code/`rlet`s.


![image](https://github.com/user-attachments/assets/1f7b4627-81bd-481b-b828-76b9f7ba13b3)

Unfortunately, this changes the numbering of ops in the decomp, since
all the vector instructions get combined in a single "operation" by the
decompiler. I really tried to avoid having this ever happen in the
decompiler and this is one of the few cases where it has. So I had to
update a bunch of type casts.

For that reason I haven't turned this on in Jak 2 yet, although I am
planning to do that at some point. (probably at the same time as porting
back a bunch of jak 3 improvements to jak 2)

---------

Co-authored-by: water111 <awaterford1111445@gmail.com>
2025-02-16 15:59:17 -05:00
OpenGOAL Bot b07d0d9ced CI: Periodic Controller Database Update (#3856)
Updating Controller Database

Co-authored-by: OpenGOALBot <OpenGOALBot@users.noreply.github.com>
2025-02-15 22:39:29 -05:00
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