Commit Graph

2771 Commits

Author SHA1 Message Date
Tyler Wilding 3ca280a033 Merge remote-tracking branch 'origin/master' into v/update-fmt 2025-04-12 13:34:49 -04:00
Tyler Wilding bff75fccce lint: formatting 2025-04-09 23:38:01 -04:00
Tyler Wilding ddef95e2db deps/fmt: code compiles now (untested) 2025-04-09 23:35:32 -04:00
OpenGOAL Bot 5415c83def CI: Periodic Controller Database Update (#3894)
Updating Controller Database

Co-authored-by: OpenGOALBot <OpenGOALBot@users.noreply.github.com>
2025-04-09 23:10:20 -04:00
Matt Dallmeyer e122941ede Fix pagination for non-dynamic popup menus (speedrun menu) (#3883)
Was testing out adding ILs to the speedrun menu and noticed this wasn't
working properly

(video before the changes)

https://github.com/user-attachments/assets/e1e7f443-60d2-4b15-bc27-a20cbe4442d6

Co-authored-by: Tyler Wilding <xtvaser@gmail.com>
2025-03-31 15:40:40 -04:00
Tyler Wilding 6871a3a067 goalc: don't assume DGO/CGOs are within the ObjectDB when building levels (#3888)
Follow-up later on improving the validation of the extractor (that may
require testing with all iso versions), but this is just some simple
safe-guarding code that will improve the error messaging, instead of
just a vague invalid map error.

![Screenshot 2025-03-30
165334](https://github.com/user-attachments/assets/a195d248-4ed5-4c02-80f4-4170d3ff1e48)
2025-03-31 15:40:25 -04:00
Tyler Wilding 853f136c4c temp stash - fixing interpreter impl 2025-03-30 21:57:45 -04:00
Tyler Wilding a47723ed12 deps/fmt: update include statements 2025-03-30 21:57:36 -04:00
Tyler Wilding 46b91e5ee5 Merge pull request #3884 from open-goal/bot/update-controller-db
CI: Periodic Controller Database Update
2025-03-30 13:20:37 -04:00
OpenGOALBot 1fa9363414 ci: updated controller database 2025-03-24 16:23:09 +00:00
Matt Dallmeyer 61ad9f08cd Extract levels+collision to decompiler_out (adjacent to textures+audio) (#3882)
should make it nice and easy to jump to the `decompiler_out/<game>`
folder in the launcher and show the user all their exported things.

![image](https://github.com/user-attachments/assets/15ff9d0b-2c83-4f1a-a013-6ab3835e974b)

also adds a taskfile command for ripping audio.

and fixes jak1 collision extract scaling. I [previously fixed this for
jak2/3](https://github.com/open-goal/jak-project/pull/3292#discussion_r1442595308)
but never fixed for jak1 apparently

before:

![image](https://github.com/user-attachments/assets/ce3e3c59-e3d7-4fc2-b83b-c938fdb3bb02)

after:

![image](https://github.com/user-attachments/assets/bcc65ffb-b5ff-484e-8f60-d1913e239294)
2025-03-24 14:26:58 +01:00
Tyler Wilding 7a24658b49 deps: update fmt to 11.1.4 2025-03-10 16:42:03 -04:00
Tyler Wilding ea3d2308f8 Merge pull request #3877 from open-goal/bot/update-controller-db
CI: Periodic Controller Database Update
2025-03-10 16:36:55 -04:00
OpenGOALBot 6696346f77 ci: updated controller database 2025-03-10 16:19:20 +00:00
Matt Dallmeyer 3e6ba273f7 Dedupe custom level textures by height/width/data, not just name (#3874)
I fixed this for the only up mod awhile back and forgot to PR it here. 

Some related discussion
[here](https://discord.com/channels/756287461377703987/995787558816595968/1320482071583522878)
where we realized Blender automatically "renames" the textures, but then
the GLB export doesn't reflect those renames
2025-03-08 23:21:16 +01:00
Tyler Wilding 1f6438e517 deps: update to SDL3 (#3852)
This PR updates to SDL3, and with it, adds a handful of new features.
Everything seems to work but I'm going to look over the code once last
time before merging, some of the API changes are hard to spot.

Fixes #2773

### Pressure sensitivity support for DS3 Controllers

SDL3 adds pressure sensitivity support for DS3 controllers on windows. I
have not tested on linux. The option is disabled by default.

On windows you will need https://docs.nefarius.at/projects/DsHidMini/
and to be using SXS mode.

### DualSense and Xbox One Trigger Effects

If enabled, Jak 2 will have certain trigger effects.  They are:
   - xbox1:
     - small vibrate when collecting dark eco
     - big vibrate when changing to dark jak
     - vibrate when shooting gun, proportional to gun type
   - ps5:
     - resistance when changing to dark jak
     - different gun shooting effects
       - red (resistance)
       - yellow (weapon trigger)
       - blue (vibrates)
       - purple (less resistance)
> **Gun Shooting effects are only enabled if the new "Swap R1 and R2"
option is enabled**

There are more effects that could be used in `dualsense_effects.cpp`,
but I only exposed the ones I needed to OpenGOAL. If a modder wants to
use some of the others and wires them up end-to-end, please consider
contributing that upstream.

### New ImGUI Menu

Added new imgui options for selecting the active controller, for those
people that struggle to select the initial controller.


![image](https://github.com/user-attachments/assets/48ff2985-d9ef-417a-b1f2-a25c74595935)

### Testing

The highlights of what I tested successfully:
   - display
     - [x] all mode switch permutations
     - [x] launch with all modes saved
- [x] switch monitors / unplug monitor that was active, how does it
handle it
     - [x] load with alternate monitor saved and all modes
     - [x] allowing hidpi doesnt break macos
   - controls
     - [x] keyboard and mouse still work
     - [x] pressure sensitivity on linux
2025-03-02 16:36:22 -05:00
Hat Kid 651b5b2a93 build-actor: fix merc transparency (#3875)
Because merc effects for custom models would always have the
`envmap-usage` flag set, this would also set the `ignore-alpha` flag,
making transparency effects not work. Now the envmap flag is only set
when the effect actually has an envmap.
2025-03-02 22:06:22 +01: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