Commit Graph

602 Commits

Author SHA1 Message Date
Aloqas 0e6c93efd8 jak2/jak3: Flags for custom languages (#4209)
<img width="224" height="39" alt="Näyttökuva 2026-04-12 013017"
src="https://github.com/user-attachments/assets/fbfc8e6d-83f7-496c-bbfd-d1d1df955359"
/>
<img width="185" height="39" alt="Näyttökuva 2026-04-12 013027"
src="https://github.com/user-attachments/assets/8ba826e3-8268-4e37-bef5-4404acef1f53"
/>
<img width="181" height="35" alt="Näyttökuva 2026-04-12 143327"
src="https://github.com/user-attachments/assets/bbd4da10-2ead-4f7f-a5ca-9bdf4f5f2c1a"
/>
<img width="286" height="35" alt="Näyttökuva 2026-04-12 143339"
src="https://github.com/user-attachments/assets/60fc2581-b92e-42a4-9a13-6f51587112a1"
/>
<img width="405" height="38" alt="Näyttökuva 2026-04-12 013059"
src="https://github.com/user-attachments/assets/a641f6c3-ba8f-473f-a680-0828a9fd1bcf"
/>
<img width="210" height="37" alt="Näyttökuva 2026-04-12 143351"
src="https://github.com/user-attachments/assets/d0ce1da8-2fe6-4fdb-b943-01b595606dbb"
/>
<img width="203" height="37" alt="Näyttökuva 2026-04-12 143400"
src="https://github.com/user-attachments/assets/a8f81b2d-2a96-46a5-bebb-6839ef8fc18e"
/>
<img width="220" height="37" alt="Näyttökuva 2026-04-12 143410"
src="https://github.com/user-attachments/assets/fe9a12b9-ea23-48bb-ba0a-e310eb5e13e2"
/>
<img width="179" height="38" alt="Näyttökuva 2026-04-12 143418"
src="https://github.com/user-attachments/assets/d10926e2-81f9-479f-8df5-078f823db8f0"
/>
<img width="338" height="38" alt="Näyttökuva 2026-04-12 143427"
src="https://github.com/user-attachments/assets/4bc9edc0-d914-4e2d-9b9d-c662e2a6bd80"
/>
<img width="220" height="39" alt="Näyttökuva 2026-04-12 143439"
src="https://github.com/user-attachments/assets/ca8134e2-aa37-4e51-b23e-87a816514b5f"
/>
<img width="231" height="37" alt="Näyttökuva 2026-04-12 013158"
src="https://github.com/user-attachments/assets/69af6c29-699c-41c8-a93d-033497c1ba18"
/>
<img width="210" height="37" alt="Näyttökuva 2026-04-12 013205"
src="https://github.com/user-attachments/assets/1cd8cf1c-2ff0-4b3a-becc-902302466180"
/>

Needs testing, I was having issues with Visual Studio so I couldn't
fully test

---------

Co-authored-by: Tyler Wilding <xtvaser@gmail.com>
2026-04-14 01:15:18 -04:00
Tyler Wilding 005c6e1665 common: improve logging around ISO fread errors (#4155)
Related to https://github.com/open-goal/jak-project/issues/3979

Ideally this helps figure out why it's failing for some people (EOF, or
some other error, which file, etc)

Closes #3979
2026-04-02 22:46:32 -04:00
Tyler Wilding c4d34e3d0e jak3: Finish font DB implementation (support Cyrillic) (#4147)
Also add in all the other language stubs / copy over the custom text to
the correct enum ids.

Closes #4001
2026-04-02 01:10:39 -04:00
Tyler Wilding 64bcd8c030 goalc: Get CodeTester tests passing on Arm64 (only targetting macOS atm) (#3290)
This PR does the following:
- Designs a mechanism by which arm64 instructions can be encoded and
emitted
- Dispatch our higher-level instruction emitting calls to either x86 or
arm64 instructions depending on what the compiler is set to (defaults to
x86)
- Bare minimum scaffolding to get the arm64 instructions successfully
executing atleast on apple silicon
- Implement enough instructions to get the codetester test suite passing
on arm
2026-03-30 20:20:47 -04:00
Tyler Wilding d3cc739e43 jakx: Commit existing work from other PRs (#4112)
This attempts to get into master whatever work was done in this PR /
it's earlier PR https://github.com/open-goal/jak-project/pull/3965

I don't want this work to be lost / floating around in massive PRs.

However the changes are:
- switch to ntsc_v1 instead of PAL as the development target, as we have
done for all other games
- remove most of the copied-from-jak2/3 changes as they need to be
confirmed during the decompilation process not just assumed
- avoids committing any changes to `game/kernel/common` as it was not
clear to me if these were changes made in jak x's kernel that were not
properly broken out into it's own functions. We don't want to
accidentally introduce bugs into jak1-3's kernel code.
- in other words, if the change in the kernel only happens in jak x...it
should likely be specific to jak x's kernel, not common.

---------

Co-authored-by: VodBox <dillon@vodbox.io>
Co-authored-by: yodah <greenboyyodah@gmail.com>
2025-12-31 21:08:44 -05:00
Aloqas f4512a41dd Jak 3 Finnish translation + Update Jak 1 & 2 translations (#4028)
Massive overhaul of Finnish translations

I guess it's time to finally push this out

I'll go insane if I have to proofread one more time :P
Every time I just realize my translations sucked and I keep tweaking
everything

---------

Co-authored-by: Tyler Wilding <xtvaser@gmail.com>
2025-12-28 15:12:26 -05:00
Tyler Wilding 9e8470e398 New Crowdin updates (#4027) 2025-09-26 20:36:15 -04:00
tripp 4bf4f1b580 Rename WATER_AN.CGO to WATER-AN.CGO if found during extraction (#3890)
During the iso creation process it's possible that this file in will be
internally renamed to `WATER_AN.CGO`, despite the external file name
displaying `WATER-AN.CGO`. We expect the file to be named
`WATER-AN.CGO`.

We can't control how our users create their iso files. We can alleviate
future friction regarding this matter by adopting this simple change.

---------

Co-authored-by: Tyler Wilding <xtvaser@gmail.com>
2025-08-30 10:59:29 -04:00
Tyler Wilding 006d24b29a game: Support korean in Jak 2 and Jak 3 (#3988)
Resolves #3075 

TODO before merge:
- [x] Properly draw non-korean strings while in korean mode (language
selection)
- [x] Check jak 3
- [x] Translation scaffolding (allow korean characters, add to Crowdin,
fix japanese locale, etc)
- [x] Check translation of text lines
- [x] Check translation of subtitle lines
- [x] Cleanup PR / some performance optimization (it's take a bit too
long to build the text and it shouldn't since the information is in a
giant lookup table)
- [x] Wait until release is cut

I confirmed the font textures are identical between Jak 2 and Jak 3, so
thank god for that.

Some examples of converting the korean encoding to utf-8. These show off
all scenarios, pure korean / korean with ascii and japanese / korean
with replacements (flags):
<img width="316" height="611" alt="Screenshot 2025-07-26 191511"
src="https://github.com/user-attachments/assets/614383ba-8049-4bf4-937e-24ad3e605d41"
/>
<img width="254" height="220" alt="Screenshot 2025-07-26 191529"
src="https://github.com/user-attachments/assets/1f6e5a6c-8527-4f98-a988-925ec66e437d"
/>

And it working in game. `Input Options` is a custom not-yet-translated
string. It now shows up properly instead of a disgusting block of
glyphs, and all the original strings are hopefully the same
semantically!:
<img width="550" height="493" alt="Screenshot 2025-07-26 202838"
src="https://github.com/user-attachments/assets/9ebdf6c0-f5a3-4a30-84a1-e5840809a1a2"
/>

Quite the challenge. The crux of the problem is -- Naughty Dog came up
with their own encoding for representing korean syllable blocks, and
that source information is lost so it has to be reverse engineered.
Instead of trying to figure out their encoding from the text -- I went
at it from the angle of just "how do i draw every single korean
character using their glyph set".

One might think this is way too time consuming but it's important to
remember:
- Korean letters are designed to be composable from a relatively small
number of glyphs (more on this later)
- Someone at naughty dog did basically this exact process
- There is no other way! While there are loose patterns, there isn't an
overarching rhyme or reason, they just picked the right glyph for the
writing context (more on this later). And there are even situations
where there IS NO good looking glyph, or the one ND chose looks awful
and unreadable (we could technically fix this by adjusting the
positioning of the glyphs but....no more)!

Information on their encoding that gets passed to `convert-korean-text`:
- It's a raw stream of bytes
- It can contain normal font letters
- Every syllable block begins with: `0x04 <num_glyphs> <...the glyph
bytes...>`
- DO NOT confuse `num_glyphs` with num jamo, because some glyphs can
have multiple jamo!
- Every section of normal text starts with `0x03`. For example a space
would be `0x03 0x20`
- There are a very select few number of jamo glyphs on a secondary
texture page, these glyph bytes are preceeded with a `0x05`. These jamo
are a variant of some of the final vowels, moving them as low down as
possible.

Crash course on korean writing:
- Nice resource as this is basically what we are doing -
https://glyphsapp.com/learn/creating-a-hangeul-font
- Korean syllable blocks have either 2 or 3 jamo. Jamo are basically
letters and are the individual pieces that make up the syllable blocks.
- The jamo are split up into "initial", "medial" and "final" categories.
Within the "medial" category there are obvious visual variants:
  - Horizontal
  - Vertical
  - Combination (horizontal + a vertical)
- These jamo are laid out in 6 main pre-defined "orientations":
  - initial + vertical medial
  - initial + horizontal medial
  - initial + combination
  - initial + vertical medial + final
  - initial + horizontal medial + final
  - initial + combination + final
- Sometimes, for stylistic reasons, jamo will be written in different
ways (ie. if there is nothing below a vertical vowel will be extended).
  - Annoying, and ND's glyph set supports this stylistic choice!
- There are some combination of jamo that are never used, and some that
are only used for a single word in the entire language!

With all that in mind, my basic process was:
- Scan the game's entire corpus of korean text, that includes subtitles.
It's very easy to look at the font texture's glyphs and assign them to
their respective jamo
- This let me construct a mapping and see which glyphs were used under
which context
- I then shoved this information into a 2-D matrix in excel, and created
an in-game tool to check every single jamo permutation to fill in the
gaps / change them if naughty dogs was bad. Most of the time, ND's
encoding was fine.
-
https://docs.google.com/spreadsheets/d/e/2PACX-1vTtyMeb5-mL5rXseS9YllVj32BGCISOGZFic6nkRV5Er5aLZ9CLq1Hj_rTY7pRCn-wrQDH1rvTqUHwB/pubhtml?gid=886895534&single=true
anything in red is an addition / modification on my part.
- This was the most lengthy part but not as long as you may think, you
can do a lot of pruning. For example if you are checking a 3-jamo
variant (the ones with the most permutations) and you've verified that
the medial jamo is as far up vertically as it can be, and you are using
the lowest final jamo that are available -- there is nothing to check or
improve -- for better or worse! So those end up being the permutations
between the initial and medial instead of a three-way permutation
nightmare.
- Also, while it is a 2d matrix, there's a lot of pruning even within
that. For example, for the first 3 orientations, you dont have to care
about final vowels at all.
- At the end, I'm left with a lookup table that I can use the encode the
best looking korean syllable blocks possible given the context of the
jamo combination.
2025-08-16 19:35:47 -04:00
cla.grisenti 560f769c03 Assert - added missing macros (#3968)
Compilation with the NO_ASSERT flag set results in errors.
This happens because some the macros are not defined in the else branch
of #ifndef NO_ASSERT.
2025-06-29 16:39:05 -04:00
Tyler Wilding cdbc241259 New Crowdin updates (#3942) 2025-06-04 00:31:08 -04:00
water111 c87469cf97 [extractor] Fix ISO extraction bug. (#3937)
Fix bug where files starting past 2^32 bytes were not extracted
correctly.

---------

Co-authored-by: water111 <awaterford1111445@gmail.com>
2025-06-01 21:15:48 -04:00
Tyler Wilding 85e3203188 g/jak2: don't try to print subtitles that don't exist (non-base language) (#3910)
Fixes #3909 

Long standing issue in Jak 2's subtitles, it's actually kinda incredible
that finnish didn't run into this problem. Later in this code it
accesses the subtitle based on the language-id, and finnish is always
out of bounds -- but it never caused a catastrophic issue.

Polish on the otherhand is much more out of bounds and always causes an
access violation / crash.

Jak 2's subtitle code has no fallback (ie. use english if not
translated) for cutscenes, since they are not defined in the base file
like in Jak 1. This means that an untranslated language will render no
subtitles during cutscenes. Translations are welcome!.

Tested a cutscene in:
- english 
- italian (base game with subtitles)
- finnish (new language, actually is translated)
- polish (new language, not translated)
2025-05-12 22:41:48 -04:00
Tyler Wilding 647282d896 deps: update fmt to 11.1.4 (#3880)
Fixes #3886
2025-04-12 15:59:13 -04: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 9759841e3b New Crowdin updates - February 2024 (#3857) 2025-02-28 19:31:50 -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 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
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
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
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) 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
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
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
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
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.
2024-11-29 09:27:46 +01: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 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
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
water111 321a113dd7 [jak3] Fix overlord soundbank unload, fix warnings (#3762)
Fix compiler warnings, and a bug where the `snd_handle` of
`SoundBankInfo` was never set, leading to sound banks never unloading.

The game relies on unloading soundbanks to make sure certain sounds
don't play, like the blue gun 1 fire noise when using blue gun 2.

---------

Co-authored-by: water111 <awaterford1111445@gmail.com>
2024-11-16 15:04:56 -05:00
water111 7553877e57 Fix crash in ocean-far with invalid DMA size (#3746)
DMA sizes are 16-bits, not 12-bits. This would cause rare crashes when
the ocean far renderer uses more than this.

I'm not really sure what the ocean far rendering is doing at this time,
but it happens as stuff is loading in.

There's a chance this fixes crashes in jak 2 as well, since we used to
see errors that would be explained by this.

Co-authored-by: water111 <awaterford1111445@gmail.com>
2024-11-12 19:38:51 +01:00
Hat Kid af5cb9b1cb jak3: subtitle3, vag-player (#3758) 2024-11-12 02:45:16 +01:00
Tyler Wilding f8058f2138 Support Apple Silicon via Rosetta2 on MacOS Sequoia and Above (#3754) 2024-11-10 11:06:56 -05:00
Hat Kid 10d7dabfd7 game: move pc-encode-utf8-string to common kmachine code (#3742)
Also adds formatter rules for a couple of macros.
2024-11-03 01:28:48 +01:00
water111 dff9ac163a [custom levels] A few bug fixes (#3736)
- Bug fix to KD tree splitting, should fix cases with bad vertex
colors/alphas.
- Normalize normals instead of asserting if they are the wrong length.
**the fact that blender exports normals incorrectly is a bug and I doubt
their implementation is correct if you've scaled things on only on
axis.**
- Automatically resize metallic texture (envmap strength) if it doesn't
match the size of the rgb texture instead of asserting

Co-authored-by: water111 <awaterford1111445@gmail.com>
2024-10-27 12:31:41 -04:00
water111 5bc61c5854 [jak3] Support texture anim in TIE (#3734)
Support animated textures in TIE. Apparently this is also used in jak 2
for robotank and we never noticed??


https://github.com/user-attachments/assets/bfa45a1a-4a96-4b25-817a-4327afcc7c98

Co-authored-by: water111 <awaterford1111445@gmail.com>
2024-10-26 15:47:34 -04:00
massimilianodelliubaldini 7dbacc72d3 Parameterize the iso_data folder for goalc (#3692)
I hope this is everything I needed, and nothing I didn't.

## What's Changed

This update adds a command-line parameter to goalc, `--iso-path`.
Providing a path to a directory like
`D:\Files\Repositories\ArchipelaGOAL\iso_data\jak1` will inform the
compiler to use that directory instead.

## Why is this useful?

When combined with `--proj-path`, the compiler can be pointed to a
completely different project folder, given the `(mi)` command, and
immediately begin building from that directory, with everything it
needs. This eliminates the need to copy `iso_data` to multiple `data`
directories.

If a subsequent change to the Launcher is made, each mod could be passed
an --iso-path pointing to a single shared folder, allowing mods to each
run their own REPL _without_ requiring a copy of `iso_data` in a
subfolder.

## Independent testing required!

My local repositories are a little suspect, with a mod, a fork of
mod-base, and a fork of jak-project, all on the same drive. My
decompiler_out and iso_data folders are in the mod repo, not mod-base
nor jak-project. So what I did was make the change in the mod-base fork,
point `--proj-path and --iso-path` to the mod folders, and then ran
`(mi)`. The output showed a build starting with no errors.

Then I had to create this PR, which my fork of mod-base is unable to do,
so I created a patch file, forked jak-project, then applied the patch
there.

All this is to say that it would be preferable if someone could apply
this code to their own installation and see if it works. Even I wouldn't
take my own word for this.

---------

Co-authored-by: Tyler Wilding <xtvaser@gmail.com>
2024-10-18 00:03:14 -04:00
water111 fe29eae395 Background improvements for custom levels (#3672)
This only applies to the background for now:

- support for alpha for vertex colors in custom levels
- switch time of day palette generation from octree to k-d tree
- support for alpha masking in custom levels
- support for transparent textures
- support for envmap in custom levels

---------

Co-authored-by: water111 <awaterford1111445@gmail.com>
2024-09-21 11:39:50 -04:00
Tyler Wilding 431508aab1 cmake: handle the scenario of a commit having more than 1 tag (#3662) 2024-09-09 23:49:03 -04:00
Hat Kid bc66d416b4 decompiler: call-parent-state-handler and suspend-for macros (#3625)
Also fix `hud-draw-pris2` bucket in Jak 3 to make subtitles work and
foreground HUD envmap.
2024-09-04 19:35:54 +02:00
water111 f2e7606f1b [build_actor] Add skeleton and animation support (#3638)
This adds a feature to `build_actor` to support importing skeletons and
animations from .glb files.

Multiple animations are handled and will use the name in the GLB. The
default `viewer` process will end up playing back the first animation.

There are a few limitations:
- You can only have around 100 bones. It is technically possibly to have
slightly more, but certain animations may fail to compress when there
are more than ~100 bones.
- Currently, all animations have 60 keyframes per second. This is a
higher quality than what is normally used. If animation size becomes
problematic, we could make this customizable somehow.
- There is no support for the `align` bone.

---------

Co-authored-by: water111 <awaterford1111445@gmail.com>
2024-08-16 11:25:53 -04:00
Aloqas 9d2a23effe Jak 2: Finnish translations (#3533)
Finnish translations for Jak 2. These include cutscenes and all game
text.

All subtitle timings for cutscenes as well as non-cutscenes have been
edited for a better flow and to fit the 4x3 ratio.
I've been working on these solo for the most part so any input from
other finns would be appreciated.

A few issues in the progress menu I mentioned in #3504 still persist

I couldn't figure out how to add Finnish to the options menu, so I'm
gonna need someone else to do that part. 💀
But I was able to add them to the debug menu.

I also increased subtitle heap so hopefully that doesn't break anything.

Fixes #3620

---------

Co-authored-by: Tyler Wilding <xtvaser@gmail.com>
2024-08-11 13:01:06 -04:00
Tyler Wilding a13b0dce45 ci: Add workflow that compares the compiled output between the PR and master (#3626)
Fixes #3063
2024-08-03 02:42:34 -04:00
Tyler Wilding d819d6da05 game: cleanup some display settings related code, forbid invalid game-size resolutions (#3601)
Fixes https://github.com/open-goal/jak-project/issues/3563

These users have the following spamming in logs:
> OpenGL error 0x502 S8246 T824C: GL_INVALID_OPERATION error generated.
Source and destination dimensions must be identical with the current
filtering modes.

And the solution is to correctly set their game-size. The way this
change accomplishes that is by confirming whether or not the set
`game-size` is a valid resolution informed by SDL, if not, it defaults
to the monitor's currently set display mode's resolution.

This also moves the selected display id, and the display mode into the
C++ settings -- closer to where it's actually managed and used. I'm
tempted to do this eventually for the resolutions as well but that stuff
is much more burdensome. This hopefully simplifies debugging, reduces
startup flickering, and removes back-and-forth complexity. Hopefully
this makes debugging display related problems easier. It also adds a
bunch more logging to the related code.
2024-07-27 22:29:14 -04:00
Hat Kid ce978638fe jak3: add darkjak highres texture anim (#3611)
Eyes don't work yet
2024-07-28 02:45:00 +02:00
water111 82a23c747e [jak3] prim rendering for cloth (#3607) 2024-07-26 20:31:32 -04:00
water111 9d80ada016 [jak3] Fix eye slot assignment and textures (#3603)
I found two issues with Jak 3 eyes. The first was simple - we were
missing a `-pc` texture upload in `texture.gc` for `pris2` textures,
which has eye textures for a few characters, like torn or damas.

The second was a little more annoying. Unlike jak 2 and jak 1, jak 3 can
dynamically assign eye slots when merc models are loaded. This involves
modifying eye data to tell the eye renderer where to render, and
modifying the merc model's adgif shaders to point to the correct eye
texture. The modification to the merc adgif shader is problematic since
our PC port of merc assumes this slot is constant.

My solution here was to bypass this whole slot system entirely for jak
3. I modified the GOAL eye renderer to tell the c++ eye renderer the
name of the merc-ctrl containing the eye. Then, the PC C++ Merc renderer
can just look up the merc-ctrl by name. To make this fit nicely in the
existing memory layout, I used a 64-bit fnv hash of the name. (which
honestly is how we should have handled a lot of other texture/model
names stuff...)

Unrelated fix to Overlord2 so it handles the case where file size
changes after the game starts, I had this in jak2/jak1 and forgot it for
jak 3.
2024-07-26 11:42:52 -04:00
water111 e81431bd21 [wip] Jak 3 Overlord (#3567) 2024-07-26 09:42:28 -04:00