Commit Graph

2830 Commits

Author SHA1 Message Date
water111 9155688711 fix alignment 2025-07-26 15:26:14 -04:00
water111 73b3930522 Merge branch 'master' of https://github.com/open-goal/jak-project into w/shadow3-wip 2025-07-26 15:19:59 -04:00
water111 0ee46b8f9d cpp format 2025-07-26 14:57:42 -04:00
water111 0126dd833d goal format 2025-07-26 14:50:17 -04:00
OpenGOAL Bot b93caabd1d CI: Periodic Controller Database Update (#3982)
Updating Controller Database

Co-authored-by: OpenGOALBot <OpenGOALBot@users.noreply.github.com>
2025-07-23 19:18:11 -04:00
Matt Dallmeyer 690cc04625 [jak1] Allow skipping credits in speedrunner mode (#3981)
Speedrunners have seen the Jak 1 credits once or twice, I think we can
let them skip
2025-07-22 14:07:36 -04:00
Tyler Wilding a34ab9aa30 game: fix refresh rate filtering comparison (#3984)
It helps to compare in the right direction -- was having the inverse
effect.
2025-07-17 01:00:51 -04:00
OpenGOAL Bot d5eebdcdfe CI: Periodic Controller Database Update (#3977)
Updating Controller Database

Co-authored-by: OpenGOALBot <OpenGOALBot@users.noreply.github.com>
2025-07-11 20:39:30 -04:00
Soggy_Pancake 7320bfc068 g/jak1: Extract ambient data to json (#3945)
I added extraction of ambients to json files when extracting the levels.
All of the ambient json files are written to the same folder as actors
are. Ambients aren't used in jak2 and 3 so it only is used on jak1.


![image](https://github.com/user-attachments/assets/26e5d655-6a31-49eb-8514-3374b41f72dd)

---------

Co-authored-by: Tyler Wilding <xtvaser@gmail.com>
v0.2.28
2025-07-02 23:19:21 -04:00
Tyler Wilding 012ff7bb16 deps: update to SDL 3.2.16 (#3975) 2025-07-02 23:07:05 -04:00
Tyler Wilding 2d64108af5 display: be more generous when filtering resolutions by refresh rate (#3974)
Some monitors are very specific about their reported refresh rates:
```
[54:37] [debug] [DISPLAY]: Skipping 640x480 as it requires 360.11hz but the monitor is currently set to 360hz
```

The current code truncated the display mode, but would compare against
the reported refresh rate. As per the log, they are obviously not equal.
- Retain the float component and only round it off when sending the
value to GOAL
- Make the comparison more generous, +/- 1.0hz
2025-07-02 22:57:57 -04:00
Tyler Wilding a0a4ec7df5 game: fix level select for untranslated languages and fix infinite recursion edge-case in lookup-text! (#3969)
The main bug this fixes is not being able to use level select when your
language isn't translated. Why? Because they use the result from
`lookup-text!` to determine if a menu item should be drawn or not. No
text found, no menu item.

However this uncovered a long-standing bug in my fallback extension to
this code. If you call this function with a text-id that doesnt even
have an english string, it will recursively keep calling itself until it
crashes. Of course the first few tasks in the game are dummies and have
no valid text-id so this had to be fixed.

Should be fixed for all 3 games.
2025-07-02 22:44:02 -04:00
tripp ac7ccd960d optional linting: only fetch master branch (#3972) 2025-07-02 22:21:17 -04:00
OpenGOAL Bot ce23af2cb2 CI: Periodic Controller Database Update (#3973)
Updating Controller Database

Co-authored-by: OpenGOALBot <OpenGOALBot@users.noreply.github.com>
2025-07-02 22:20:55 -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
OpenGOAL Bot 72c3bd3d30 CI: Periodic Controller Database Update (#3953)
Updating Controller Database

Co-authored-by: OpenGOALBot <OpenGOALBot@users.noreply.github.com>
2025-06-28 21:24:42 -04:00
MuchWhittering 1748086136 Updating UK English spelling - Cutscene (#3962)
Fixing some of the warrior's spelling for British English.
2025-06-28 21:24:36 -04:00
Aloqas 2002cd0188 Some jak 3 transcription fixes (#3893) 2025-06-28 21:23:32 -04:00
ZedB0T 8fbd85b0fc Fail building custom level if long_name is too long (#3966)
If long_name is too long, it will result in the level being invisible
but the collide loading, lets detect this and point the user in correct
direction to solve it with a clear error message.

---------

Co-authored-by: Hat Kid <6624576+Hat-Kid@users.noreply.github.com>
2025-06-22 20:07:43 -04:00
massimilianodelliubaldini d352856927 [jak2] Fix Fortress Crash by Patching Mips2C Function (#3963)
Fixes #3151 by applying the same fix as #2686 to another Mips2C
function.

Tested by mashing Jak's body into the bad collision walls for 30 minutes
without a single crash.
2025-06-20 05:33:15 +02:00
Matt Dallmeyer 5ad176507b [jak3] Subtitle typo (#3961) 2025-06-19 17:47:52 +02:00
Matt Dallmeyer 0ab252d39d [jak1] Fix speedrun mode bug where loading a save is counted as new run (#3960)
Fixes a small bug introduced in #3902. 

Without this change, whenever you load a save it is treated as if you
started a new game and resets the autosplitter back to 0s.
2025-06-19 17:47:42 +02:00
water111 a89b20eb18 jak3 support 2025-06-19 11:23:42 -04:00
water111 72d87f2867 jak2 fixes 2025-06-19 10:34:56 -04:00
water111 cee354474c shadows pretty close, something wrong with plane calc in jak2 keira, maybe flags 2025-06-18 22:10:22 -04:00
water111 ca19e25b7f jak2 support 2025-06-18 21:02:30 -04:00
water111 d1a3aa1761 working in jak1 2025-06-18 19:36:53 -04:00
water111 31e32943f5 lots of minor shadow fixes 2025-06-17 22:18:43 -04:00
water111 753d8257be single sided tris working 2025-06-16 22:28:35 -04:00
water111 a06348fa9f wip 2025-06-15 18:26:56 -04:00
water111 f5453b96e4 [gfx] Fix eye-related crash, clear color logic (#3957)
When building the eye texture, the background is first set to the top
corner of the iris texture.

A long, long time ago, I implemented this by peeking at the data in the
texture itself. This doesn't work if the iris texture is animated since
the texture will only on the GPU.

To fix this, this PR changes the eye renderer to draw a square over the
entire eye texture using iris texture's top corner, avoiding the need
for getting the texture data on the CPU. I don't remember why I didn't
do this in the first place, but this seems better in every way.

Also `input_data` in TexturePool not being initialized, which was
leading to hard-to-debug crashes when it was randomly initialized to a
sometimes invalid but non-null pointer.

Co-authored-by: water111 <awaterford1111445@gmail.com>
2025-06-12 00:51:03 -04:00
Matt Dallmeyer 56d495bc9f [jak2/3] Support yakows in custom levels (#3951)
I discovered that `yakow`s are kinda broken if you try to use them in
custom levels in jak 2/3.

It's due to the missing `yakow-lod0` texture and associated fix,
replacing it with `yak-medfur-end`. This solution works fine for the
decompiler on vanilla levels.

But for building custom levels, the requested art-groups were being
handled before the textures were, and so it was impossible to have
`yak-medfur-end` on hand to do the replacement. You'd hit an exception
here because `idx_in_level_texture` would still be `INT32_MAX`:

https://github.com/open-goal/jak-project/blob/c08118509b84feba002bd9e208f49162b4218556/decompiler/level_extractor/extract_merc.cpp#L806

My fix was just to swap the order when building custom levels, and
handle the textures first. I only made the changes for jak2/3, because I
see @Hat-Kid has a slightly different implementation for jak1.

There's one other small change relating to the `combo_id` /
`pc_combo_tex_id` short-circtuiting - I think `pc_combo_tex_id` is
always 0 for vanilla textures? So initially `yakow-lod0` actually ended
up matching the `combo_id` of the checkerboard texture from the
test-zone GLB. I just added another sanity check here that the texture
names match too.

(I also added yakows in the test-zone.jsonc files 🐄)
2025-06-09 01:35:25 +02:00
water111 6c0107f166 remove some spammy overlord prints (#3952)
removing some print statements left over from debugging.

Co-authored-by: water111 <awaterford1111445@gmail.com>
2025-06-08 11:54:45 -04:00
water111 c08118509b [jak3] Add BRANCH grain, make handler IDs unique (#3950)
Two changes that fix some Jak 3 audio bugs.

In some areas, sound effects would seem to cut off randomly. This was
caused by the sound code reusing IDs, but overlord didn't realize. It
would try to kill a sound effect by ID that had already died, and the ID
was reassigned to a new sound. To fix this, I made the handle IDs always
increment. I also tested starting the ID at large numbers and confirmed
that worked.

I also added support for the BRANCH grain. This makes the
`wastelander-shot` and possibly other sound effects work. It doesn't
support all the features, but this is probably enough.

Fun fact: the wastelander shot is supposed to have 7 variations, but you
always get the same one because they set the sound mask wrong.

I added a line you can uncomment if you want to experience the other 6
variations.

---------

Co-authored-by: water111 <awaterford1111445@gmail.com>
2025-06-07 22:34:03 -04:00
Matt Dallmeyer b7a2cdf3b6 Fix Jak II ISO hashes (#3946)
Fixes the other Jak II hashes after the fix in
https://github.com/open-goal/jak-project/pull/3937
v0.2.27
2025-06-05 00:12:10 +02:00
Tyler Wilding cdbc241259 New Crowdin updates (#3942) v0.2.26 2025-06-04 00:31:08 -04:00
Tyler Wilding 77586b7fa9 game: default MSAA to off (#3943)
There's a suspicion that MSAA might be what causes the black screen
problem for some users, additionally this can cause perf issues for
people with really bad PCs so this is probably a better default.

Needs testing before merging, i think this is all inclusive though.
2025-06-03 23:58:05 -04:00
OpenGOAL Bot 0dfa6be94c CI: Periodic Controller Database Update (#3939)
Updating Controller Database

Co-authored-by: OpenGOALBot <OpenGOALBot@users.noreply.github.com>
2025-06-02 23:09:50 -04:00
water111 fce2dad3c0 [jak3] Fix disabling nav (#3941)
This needs a parameter, otherwise it was reading some uninitialized
value. In some cases, the uninitialized value would leave the nav stuff
on, and the marauders would go crazy trying to avoid each other.
2025-06-02 21:51:22 -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
water111 653604080f default button pressure to 0 (#3938)
This should solve the issue where buttons are held down until you push
them the same time. This would cause the cars in jak 3 to not move until
you pushed square/circle and "released" the brake.

Co-authored-by: water111 <awaterford1111445@gmail.com>
2025-06-01 21:15:09 -04:00
water111 882c45f077 [jak3] Fix crash with shadow in precursor ship (#3934)
When the `dp-bipedal`s get blown up by the nuke gun, their bones go to
NaNs on the last frame. The shadow renderer doesn't handle this well and
draws all possible triangles as single tris. This overflows the vif
`unpack` field and triggered an assert when sizes inside the shadow
renderer weren't consistent.

My guess is that this works on the real game either because:
- their shadow renderer draws garbage data, but you can't tell because
the screen is white from the nuke
- no NaN on PS2 means that the shadow renderer behaved differently, not
using all single tris.

As a workaround, if the bones are NaN, the shadow renderer treats them
as 0, meaning there is no shadow drawn.

---------

Co-authored-by: water111 <awaterford1111445@gmail.com>
2025-06-01 18:58:02 -04:00
SuperSamus 5522c3d500 [high fps] fix blinking in all games (#3759)
Fixes both interval and animation speed. (jak1 previously only had a fix
for the former.)
This should close #3518, and one of the issues of #1499.

The solution is not the cleanest. The results are going to be wrong in
case the FPS doesn't reach the maximum set.
A better solution would be to make `random-time` a float, so that it can
be subtracted by `time-adjust-ratio`, but I don't know if changing a
type for this purpose is allowed here. Tell me if I should do that
instead.

Tested only on jak2.

Co-authored-by: Tyler Wilding <xtvaser@gmail.com>
2025-06-01 18:50:33 -04:00
Tyler Wilding 23262ce269 g/j2: add hack workaround to prevent atoll-sig mission getting stuck due to NaN bones (#3935)
Related to #3929 

Played through the mission, worked fine. This condition should _never_
be hit under normal circumstances
2025-06-01 18:50:11 -04:00
water111 228dfd82d1 [jak3] Small bug fixes (#3933)
Fixes the pillars being transparent (but is a bit of a hack), the desert
sand not having texture filtering, and the "No memory card" on the title
screen with debug mode off.

---------

Co-authored-by: water111 <awaterford1111445@gmail.com>
2025-06-01 13:24:28 -04:00
Tyler Wilding b6649d2433 Properly set window size when switching from borderless/fullscreen -> windowed mode (#3923)
Prior to SDL3, borderless windows were kinda a hack, they cleaned all of
that up. The side-effect of that is that the C++ code keeps track of the
current window size (it does this for framebuffer sizing, but also to
set the size of the window).

This is now an issue because SDL is properly firing events when you
change to borderless mode, so our window size gets updated to the size
of the entire monitor. When you switch to windowed mode from borderless,
it now seems like it didn't work (it did, its just still taking up the
entire screen).

This could be better cleaned up if more settings are extracted out of
GOAL and put into C++ so they can be managed and accessed where they
belong. But for now, this is a minimally invasive fix.

Fixes #3917
2025-05-31 18:47:02 -04:00
Tyler Wilding 26d6d663c9 deps: update SDL3 to version 3.2.14 (#3932) 2025-05-31 18:46:07 -04:00
OpenGOAL Bot 3736554d66 CI: Periodic Controller Database Update (#3928)
Updating Controller Database

Co-authored-by: OpenGOALBot <OpenGOALBot@users.noreply.github.com>
2025-05-27 19:11:21 -04:00
Alex a6c21a9814 Implement analog stick sensitivity setting, default it to 133% (#3919)
This is a simple multiplier to the gamepad axis input value received
from SDL events. Normally the values it provides cannot satisfy the
square range of the stick input. This is usually fine but it might play
differently with different controllers and compared to consoles,
especially considering the DualShock 1/2 have automatic calibration
which works in mysterious ways. The setting is there so any user can
adjust it for their controllers.

Saved to and loaded from the input-settings.json file.

133% matches PCSX2's default setting and is generally a good value to
map the square stick range within most modern(ish) controllers' circular
stick motion.

Progress menu option added to Jak 1 and 2. Setting can be changed from
50% all the way to 200%.

~~Renamed the analog deadzone options to stick deadzone since they don't
apply to the other analog buttons and only the (analog, yes) sticks.~~
2025-05-27 16:01:06 +01:00
OpenGOAL Bot 52df5a2d64 CI: Periodic Controller Database Update (#3918)
Updating Controller Database

Co-authored-by: OpenGOALBot <OpenGOALBot@users.noreply.github.com>
2025-05-22 16:40:24 -04:00