Commit graph

916 commits

Author SHA1 Message Date
Matt Dallmeyer 2071c98b55
Fix cases of string formatting with non string literals (#3304)
The logger used in `goalc` tries to print an already-formatted string
`message` using `fmt::print(message);` Usually this doesn't cause
problems, but if you try to print, for example, an exception that has
special characters (notably `{`) it will try to do another round of
formatting/replacements, despite not having any args to replace with,
which ends up throwing another exception. This is why errors when
parsing custom level JSON cause the REPL to exit.

I've hopefully identified all the various instances of this across the
codebase
2024-01-14 12:02:08 +00:00
ManDude 7a8aa71204
[jak2] implement statistics tracker (#3288)
Currently only tracks enemy kills, and how they were killed. There is
currently no menu for this, but I've already added most of the text for
it. Also did a bunch of misc decompilation fixes and renamed some
methods.

Fixes #3277 
Fixes #3278
2024-01-11 22:49:41 +00:00
Tyler Wilding a80cff9a4c
game: Fix issues related to remapping with SDL axii's (ie. triggers) (#3294)
This was just not implemented end to end. There are still two notable
issues, one that I can live with, one I need to narrow down eventually:
1. Rebinding confirm buttons with trigger (ie. X) behaviour is not 100%
as it should be. I fixed it enough that I can live with it but it's
still not proper. The difficulty is that unlike a button it will
re-trigger the pressed state on the journey back to neutral (aka
unpressed).
2. If you change the bind for the confirm button, then reset your
bindings, the next confirm input is eaten. This is unrelated to these
changes but I briefly looked into it and was unable to find the root
cause.
2024-01-09 16:50:58 -05:00
Ziemas 6901e80e7f
j2-overlord: Clean up some VAG functions (#3287)
Some cleanup of vag related functions in overlord.
2024-01-02 16:30:56 +00:00
ManDude 349919f788
[jak2] implement pc cheats in menu (#3275)
Adds the opengoal cheats to the secrets menu. Only cheats that are fully
functional and unlockable are there right now, which is eight cheats.

This update will reset most Jak 2 settings.

Also fixes #3274 .
2023-12-28 11:14:10 +00:00
Tyler Wilding 708c15788b
g/j2: switch to OpenGOAL speedrun.com leaderboards (#3265)
Boards that have no runs yet look kinda awkward but i'd rather just wait
until those fill out (won't take long) rather than add another string to
be translated.
2023-12-19 19:06:55 -05:00
Tyler Wilding 6cfb89a78a
g/j2: fix interleaving of local and external highscores (#3264)
Local scores weren't going above external scores even if they were
higher, a few test cases:

![Screenshot 2023-12-19
182412](https://github.com/open-goal/jak-project/assets/13153231/bf3c700d-0f23-441e-b537-88794532523b)
![Screenshot 2023-12-19
182446](https://github.com/open-goal/jak-project/assets/13153231/18d5d6eb-54b1-466e-8302-ca629677344f)
![Screenshot 2023-12-19
182442](https://github.com/open-goal/jak-project/assets/13153231/7de763a5-3587-416f-8755-1868049b92ed)
![Screenshot 2023-12-19
182421](https://github.com/open-goal/jak-project/assets/13153231/d44c1b5b-5f4f-4151-a1f0-e28d7612ed9d)
2023-12-19 18:58:25 -05:00
RoyalForgotten c7af284c6b
French subtitle_lines_fr-FR.json (#3259)
French subtitles complete + fixed some wrong texts

---------

Co-authored-by: Tyler Wilding <xtvaser@gmail.com>
2023-12-19 18:55:51 -05:00
tripp 4b9c1dde70
add ms to loader output (#3261) 2023-12-18 18:17:27 -05:00
OpenGOAL Bot 35daebcce7
CI: Periodic Controller Database Update (#3255)
Updating Controller Database

Co-authored-by: OpenGOALBot <OpenGOALBot@users.noreply.github.com>
2023-12-18 18:17:10 -05:00
water111 f17427bc26
[jak2] Fix unicode issue with GAME.CGO load (#3254)
Fix for https://github.com/open-goal/jak-project/issues/3244
2023-12-09 18:11:24 -05:00
Ziemas 168afa0e2e
989snd: sound bank loading overhaul (#3185) 2023-12-07 20:22:54 -05:00
ManDude 1808596679
save & load game territory setting (#3243) 2023-12-03 18:19:38 +00:00
ManDude 974f5931de
[jak2] add resolutions menu (#3238) 2023-12-03 08:11:18 +00:00
SuperSamus 37069e2f8e
[jak2] Fix "Select controller" (#3191)
Co-authored-by: Martino Fontana <tinozzo123@gmail.com>
2023-12-02 15:20:26 -05:00
Hat Kid dfa6622544
jak2: add vehicle hijack lines PC cheat (#3205)
Co-authored-by: Tyler Wilding <xtvaser@gmail.com>
2023-12-02 15:17:54 -05:00
water111 a01182315b
[jak2] Support per-proto shrub visibility (#3228)
Fixes the issue reported in
https://github.com/open-goal/jak-project/issues/3168,
https://github.com/open-goal/jak-project/issues/3189,
https://github.com/open-goal/jak-project/issues/3166,
https://github.com/open-goal/jak-project/issues/3152,
https://github.com/open-goal/jak-project/issues/3224 where a small part
of the pipes in the `strip-grenade` mission appear, but shouldn't.
2023-12-02 12:16:14 -05:00
water111 72ee35ada2
[Loader] Unload less stuff per frame (#3227)
This should avoid the stuttering due to slow unloading on some drivers.

I also turned up the amount of stuff we load per frame since nobody has
been complaining about stutters there, but there has been a few cases of
levels loading in too slowly.

(this only changes graphics, not actual GOAL level load times).
2023-11-27 19:22:34 -05:00
OpenGOAL Bot 1400fef13e
CI: Periodic Controller Database Update (#3226)
Updating Controller Database

Co-authored-by: OpenGOALBot <OpenGOALBot@users.noreply.github.com>
2023-11-27 18:00:08 -05:00
OpenGOAL Bot 1bbf616e3b
CI: Periodic Controller Database Update (#3215)
Co-authored-by: OpenGOALBot <OpenGOALBot@users.noreply.github.com>
2023-11-22 18:45:43 -05:00
Tyler Wilding b43a5d45d7
New Crowdin updates (#3218) 2023-11-22 18:45:08 -05:00
ManDude 7f1bf1f892
[jak2] extended shadows hack + add/fix progress options (#3213) 2023-11-19 10:57:56 +00:00
Tyler Wilding 8258c409d5
New Crowdin updates (#3211) 2023-11-18 14:52:49 -05:00
Radu13 74e90a84d5
Update subtitle_lines_it-IT.json (#3208) 2023-11-18 14:06:29 -05:00
Tyler Wilding 014cbb04da
i18n: transcribe missing english subtitles (#3199)
Co-authored-by: Hat Kid <6624576+Hat-Kid@users.noreply.github.com>
Co-authored-by: ManDude <7569514+ManDude@users.noreply.github.com>
Co-authored-by: blahpy <68830177+blahpy@users.noreply.github.com>
2023-11-18 14:06:01 -05:00
RoyalForgotten 6abfc9d129
Update subtitle_lines_fr-FR.json (#3201) 2023-11-13 20:01:09 -05:00
OpenGOAL Bot 22bb01205e
CI: Periodic Controller Database Update (#3200)
Co-authored-by: OpenGOALBot <OpenGOALBot@users.noreply.github.com>
2023-11-13 15:59:26 -05:00
ManDude 42f995b059
reduce glow renderer vram usage + raise glow sprite limit (#3194)
Makes the glow sprite renderer flush when full capacity is reached,
instead of at the end. Also allows us to reduce the textures used for it
(finally). Worst case scenario there's 4-5 flushes per frame.

Fixes incessant flickering in the dig.
2023-11-12 00:11:50 +00:00
Hat Kid b2453fe23b
jak2: add missing pc options to progress menu (#3167) 2023-11-09 17:24:50 +01:00
ManDude 299a25b997
[jak2] better handling of invalid formats (#3171)
see #3143
2023-11-06 22:05:51 +00:00
ManDude 8179d0aee3
[jak2] Localize board trick names (#3161)
It also looks like this now which I think is a bit cleaner:


![image](https://github.com/open-goal/jak-project/assets/7569514/0bed1d82-3407-4ca5-be1f-712ca8f96bcc)
2023-11-06 04:14:28 +00:00
water111 6067c25f67
[jak2] Pass 0x01 through format (#3143) 2023-11-04 20:02:28 -04:00
Tyler Wilding de4b3d272d
New Crowdin updates (#3146) 2023-11-04 13:58:38 -04:00
water111 ae4ee9c0c6
[jak2] Try to fix glow again (#3144)
Maybe fix https://github.com/open-goal/jak-project/issues/3065?
2023-11-04 13:30:22 -04:00
Tyler Wilding 959921e988
i18n: Add jak 2 custom text to Crowdin (#3141) 2023-11-04 13:14:14 -04:00
water111 85725401d2
[jak2] Hopefully improve sky performance (#3130)
Switches the slime look up table to be a texture, since I guess intel
drivers are terrible and putting the array in the shader makes it
extremely slow.

Also, a few minor changes:
- removed art-groups from the test-zone levels since this causes the
compiler to re-decompile the game, and makes the launcher slower. (left
it in commented out)
- Switched `decompile_code` to false by default in jak 2, in case people
run the decompiler and don't want to wait forever
- Fixed build warnings
2023-11-04 09:33:16 -04:00
Blqnc d96f0524ea
Jak 2 French Game Text (#3138)
Co-authored-by: Tyler Wilding <xtvaser@gmail.com>
2023-11-03 22:20:16 -04:00
Xavier Siguero Mora 43e0f11be5
Translated Jak 2 Game Texts to Spanish (#3139) 2023-11-03 22:02:29 -04:00
Tyler Wilding ae35b546e4
New Crowdin updates (#3113) 2023-11-02 01:03:15 -04:00
ManDude 99cb51ff57
[jak2] simplify fps disclaimer (#3108) 2023-10-30 18:17:11 +00:00
OpenGOAL Bot 2ce7b36568
CI: Periodic Controller Database Update (#3101)
Co-authored-by: OpenGOALBot <OpenGOALBot@users.noreply.github.com>
2023-10-24 18:43:00 -04:00
OpenGOAL Bot fcebf977f8
CI: Periodic Controller Database Update (#3091)
Co-authored-by: OpenGOALBot <OpenGOALBot@users.noreply.github.com>
2023-10-20 01:29:29 -04:00
Hat Kid 2c825ab7bf
jak2: add warning text when changing frame rate for the first time (#3092) 2023-10-17 18:29:02 +02:00
Hat Kid 598ba1aaa3
jak3: add missing files and implement pexcw (#3084)
Some files were in the `banned_objects` list and were thus excluded from
the `all_objs` file.

Also implements the `pexcw` instruction which is only used in `hfrag`
code.
2023-10-12 18:07:37 -04:00
Aloqas ce1c2eb7c2
[jak1] Finnish base game strings (#3058)
Finnish translations for the remaining UI texts

---------

Co-authored-by: Tyler Wilding <xtvaser@gmail.com>
2023-10-12 18:05:40 -04:00
Tyler Wilding 8b3b96761d
g/j2: Integrate highscores with Speedrun.com/JakSpeedruns.com when speedrunner mode is enabled (#3037) 2023-10-11 20:43:55 -04:00
Hat Kid 5be46c9852
decompiler: allow jak 3 texture and model extraction (#3080)
Added some hacks and stubs to allow extracting textures and models.
2023-10-11 19:32:12 -04:00
ManDude 884f0ef6e3
[glow] potentially fix bad glow texture (#3071)
Might fix #3065 

fixes #3070
2023-10-09 14:16:13 +01:00
water111 5f8415320b
[jak2] new glow fix (#3067)
Fix a typo in the shader. (fixes
https://github.com/open-goal/jak-project/issues/3045, and fixes fadeout
when glows move offscreen on the bottom).

Also, try a different format for the depth blit, in an attempt to fix
this issue https://github.com/open-goal/jak-project/issues/3065.
2023-10-07 12:37:06 -04:00
OpenGOAL Bot 2d480a6df6
CI: Periodic Controller Database Update (#3060)
Co-authored-by: OpenGOALBot <OpenGOALBot@users.noreply.github.com>
2023-10-03 13:55:31 -04:00
ManDude dfeb88b35d
[jak2] fully implement *user* (#3046)
Fixes #1918
2023-10-01 04:28:30 +01:00
ManDude e130244271
[jak2] scalable debug font + fix debug menu widescreen bugs (#3044)
also hides empty (no commands) regions from the viewers by default now.
2023-09-30 21:19:47 +01:00
water111 0e31a9c407
[decompiler] Handle find-parent-method (#3018)
This change adds a few new features:
- Decompiler automatically knows the type of `find-parent-method` use in
jak 1 and jak2 when used in a method or virtual state handler.
- Decompiler inserts a call to `call-parent-method` or
`find-parent-state`
- Removed most casts related to these functions

There are still a few minor issues around this:
- There are still some casts needed when using `post` methods, as `post`
is just a `function`, and needs a cast to `(function none)` or similar.
It didn't seem easy to change the type of `post`, so I'm not going to
worry about it for this PR. It only shows up in like 3 places in jak 2.
(and 0 in jak 1)
- If "call the handler if it's not #f" logic should probably be another
macro.

Fixes #805
2023-09-30 11:06:09 -04:00
ManDude 15fb677f5f
[jak2] un-mips2c draw-string (#3040)
It's not an asm function.
2023-09-30 00:07:55 +01:00
ManDude 1f4044b9ff
Jak 2 controller LED implementation (#3035)
Adds controller LED features to Jak 2:
- progressive flickering denoting health
- copies tomb simon says puzzle colors
- unique colors for each gun
- orange color for being indax
- yellow color for being in mech
- purple color for being darkjak
- blue color for being in board
- red flash when wanted.

May add more features later?

Also did some minor clean-up on some types.
2023-09-28 02:47:09 +01:00
ManDude 170cbd7e6c
misc low hanging fruit fixes (#3034)
Fixes #2235 
Fixes #2236 
Fixes #2963 
Fixes #3027
2023-09-27 00:59:07 +01:00
OpenGOAL Bot c695ef1393
CI: Periodic Controller Database Update (#3028)
Co-authored-by: OpenGOALBot <OpenGOALBot@users.noreply.github.com>
2023-09-25 17:44:21 -04:00
Tyler Wilding 592c5f88f3
New Crowdin updates (#3025) 2023-09-23 21:47:59 -04:00
Tyler Wilding 10910400fa
g/j2: Fill out game options menu (#3003) 2023-09-23 15:08:13 -04:00
ManDude ff924f6b00
improve decomp of state handlers and art groups (#3014)
- state handlers that are not inlined lambdas have smarter type
checking, getting rid of 99.9% of the casts emitted (they were not
useful)
- art groups were not being properly linked to their "master" groups.
- `max` in `ja` in Jak 2 was not being detected.

Another huge PR...
2023-09-23 09:53:50 -04:00
OpenGOAL Bot f86be3df62
CI: Periodic Controller Database Update (#3006)
Co-authored-by: OpenGOALBot <OpenGOALBot@users.noreply.github.com>
2023-09-22 23:06:59 -04:00
ManDude 61c4fc4b91
[jak2] fully implement collide mesh renderer (#3010)
Fixes #2983
2023-09-22 15:50:16 +01:00
Hat Kid cbbbd661d9
[jak2] ckernel: implement loado and load_and_link (#3005) 2023-09-18 12:21:18 +02:00
rafalekkB a7056c2704
Update game_base_text_pl-PL.json (#2997) 2023-09-16 23:23:54 -04:00
Tyler Wilding d701a54c43
g/j2: Implement speedrunner mode in jak 2 (#2976) 2023-09-16 23:23:29 -04:00
ManDude a03413d4ca
[jak2] placeholder subtitle files (#2986)
fixes #2985
2023-09-14 14:27:46 +01:00
rafalekkB ed6782d11b
Polish translation for Jak 1 (#2961) 2023-09-11 22:05:42 -04:00
OpenGOAL Bot 6ed2bda933
CI: Periodic Controller Database Update (#2980)
Co-authored-by: OpenGOALBot <OpenGOALBot@users.noreply.github.com>
2023-09-11 21:59:33 -04:00
Tyler Wilding 0a45f50522
g/j1: resolve memory leak around display/input dynamic strings from C++ (#2979) 2023-09-11 23:09:42 +01:00
water111 9b9fe7a7af
[jak 2] Export the collision mesh (#2977)
![image](https://github.com/open-goal/jak-project/assets/48171810/266d014b-f6c5-440f-9c3e-ab7c5eafe771)
2023-09-10 17:32:18 -04:00
Tyler Wilding 8154c4659d
g/j2: Start adding game options to jak 2's menu (#2968) 2023-09-09 15:58:57 -04:00
Hat Kid 572efbf9cb
jak2: add frame rate option to graphics menu (#2962)
This PR adds a frame rate option to the graphics menu for some of the
most common refresh rates.

Jak 2 has much better support for variable frame rates than Jak 1 out of
the box, but there are still some edge cases, most prominently the fact
that sprites are still limited to the 300 tick system, which is most
noticeable on glow sprites. For this, I abused the glow boost debug
setting to scale the glow based on the frame rate.

While testing, I noticed two other cases that I have also patched,
there's likely to be many more that are yet to be found, but aside from
that, the game is playable as normal.



https://github.com/open-goal/jak-project/assets/6624576/ad4db24f-cd27-4237-a155-0db7008160f3
2023-09-09 10:59:00 -04:00
Tyler Wilding d048f420a0
g/j2: Some more work on the SQL editor - dump and seed light data (#2954) 2023-09-08 21:21:02 -04:00
atylmo 6b4600355b
Update subtitle_en-US.json (#2763)
Co-authored-by: ManDude <7569514+ManDude@users.noreply.github.com>
Co-authored-by: Tyler Wilding <xtvaser@gmail.com>
2023-09-08 20:54:55 -04:00
OpenGOAL Bot 37e2343a1c
CI: Periodic Controller Database Update (#2926)
Co-authored-by: OpenGOALBot <OpenGOALBot@users.noreply.github.com>
2023-09-06 00:41:07 -04:00
ZedB0T bb530a5162
Make cloud_lookup return float (#2958) 2023-09-03 17:55:29 +01:00
ManDude 7475e356b5
[jak2] higher resolution cloud textures (#2951)
Adds a new "hires" sky texture animation that makes the sky use 512x512
textures instead of 128x128. The clouds have higher detail, are slightly
more noisy, and are considerably less blocky. There is also a less
noticeable "dot crawl" effect.


![image](https://cdn.discordapp.com/attachments/995787558816595968/1146960820320878643/image.png)

![image](https://cdn.discordapp.com/attachments/995787558816595968/1146960819750449264/image.png)
2023-09-02 09:26:36 -04:00
ManDude 970af8d100
[sprite3] fix max sprite number being wrong (#2949)
I don't think this fixes anything, but the number was wrong so might as
well fix it.
2023-08-31 02:38:19 +01:00
ManDude 6e8b0e57c7
[extractor] fix territory being set to wrong value (#2946)
Also fixes a minor issue where the JP sound bank wouldn't work (Jak 1).

Fixes #2793
2023-08-30 18:36:10 +01:00
ManDude f85ed7457d
Placeholder strings for future Jak 2 features + minor subtitle editor fixes (#2943) 2023-08-30 16:58:06 +01:00
Tyler Wilding 34ed88376c
New Crowdin updates (#2945) 2023-08-29 22:28:25 -04:00
ManDude 8bb5fa7f04
various subtitle editor fixes (#2941)
- fix speaker names and time frames being uneditable in Jak 1
- added toggle to auto-selected a newly created scene as current
- changed the subtitle summary format slightly.
- current scene's name now appears in the UI
2023-08-28 17:51:09 +01:00
Hat Kid 74b9ad5a05
ckernel: fix file paths for art groups and tpages (#2932) 2023-08-25 18:33:26 +02:00
ManDude 16af1837d1
[jak2] a few more subtitles + L1/R1 to move *much* faster through debug menu (#2925) 2023-08-21 00:19:54 +01:00
water111 1e6fdbee6f
[jak2] Fix depth testing issues on glow sprites (#2923)
https://github.com/open-goal/jak-project/assets/48171810/0d3064f9-3f27-4be1-b6a4-55fdfb681313

Fixes https://github.com/open-goal/jak-project/issues/2328
2023-08-20 11:51:49 -04:00
water111 5de738aacb
[jak2] Toxic Slime texture animations (#2922)
https://github.com/open-goal/jak-project/assets/48171810/85e68808-09bf-4f74-a16a-6310e2b81cd3
2023-08-19 14:22:30 -04:00
water111 3b29da919b
[jak 2] Clouds V2, Clean up texture animator (#2921)
Some general improvements for the texture animator:
- Clouds are special cased, saving about 1 ms per frame
- Adjusting the amount of clouds now actually works.
- Fixed an issue with the brightness of clouds, and the way that they
fade out around the edges.
2023-08-19 12:50:59 -04:00
water111 959dffa427
[jak2] fix a few silly texture bugs (#2917)
Fix an issue where the commit sha would not use the right blending mode
if `draw-raw-image` is running at the same time.
Fix an issue where japanese subtitles would accidentally overwrite other
textures, leading to random textures missing. (in particular, glows
would disappear after watching a cutscene with the subtitles on)
2023-08-18 11:04:31 -04:00
water111 eeb3292ff0
[jak2] Support draw-raw-image (#2915)
![image](https://github.com/open-goal/jak-project/assets/48171810/9a94ea6e-99b8-4589-8210-86e63df31dd6)


![image](https://github.com/open-goal/jak-project/assets/48171810/e441225b-214c-46b9-ad01-0160590d30ba)
2023-08-17 20:23:17 -04:00
water111 b16daae310
[jak2] Support Japanese Subtitles (#2914)
![image](https://github.com/open-goal/jak-project/assets/48171810/7b5edd00-4193-47ab-92f6-8f270edbcafe)
2023-08-17 19:40:02 -04:00
water111 f3f8ccc9ff
Fix alpha test > vs >= (minimap arrow fix) (#2913)
Fixes https://github.com/open-goal/jak-project/issues/2814

Previously we didn't handle `GREATER` vs `GEQUAL` correctly. I just left
this as a TODO by accident.


![image](https://github.com/open-goal/jak-project/assets/48171810/bfa7bd98-e40e-4850-af9c-ed6954c00958)
2023-08-17 19:13:15 -04:00
water111 5c00f1abe1
[jak2] fix glow sprite flickering (#2912)
oops, forgot to set `glDepthMask`, so sometimes it was enabled, and the
drawing for the clear was writing into the depth buffer.
Fixes https://github.com/open-goal/jak-project/issues/2735
2023-08-16 20:42:52 -04:00
water111 22c12c54ca
[jak2] fix bug in direct in texture handler (#2910) 2023-08-16 18:31:40 -04:00
ManDude f5b771174e
[jak2] small minor fixes (#2909)
- fix deci2 hang when closing the game in retail mode.
- change bigmap to always filter because the pixels look really ugly.
- don't start the game in fullscreen by default if we're debugging.
2023-08-16 18:31:27 -04:00
ManDude e7f2f2ad49
[jak2] music player cheat menu (#2900) 2023-08-16 17:53:38 +01:00
water111 0c5e01643e
[jak 2] bigmap, fix texture filtering on map icons (#2906)
![image](https://github.com/open-goal/jak-project/assets/48171810/4c285f31-c874-424a-8510-d181ba0f88d5)


![image](https://github.com/open-goal/jak-project/assets/48171810/6baa29ef-df92-435e-ad2f-9a42d56e6f17)

and the minimap has filtering now:

![image](https://github.com/open-goal/jak-project/assets/48171810/7cb2b0c9-5c86-426e-b028-dddcc3d649f7)

It's mostly implemented in C++ using the texture animator.
2023-08-15 21:53:06 -04:00
Ziemas 5343b5172e
989snd: implement SetVolPan for midi sounds (#2905)
Fixes #2820
2023-08-15 20:26:11 -04:00
water111 a0da98a367
[glow] fix clipping bug (#2902)
Now you can be blinded by the sun:

![image](https://github.com/open-goal/jak-project/assets/48171810/caf3903c-8333-4daa-89ba-ff83ca7d6b2f)
2023-08-14 18:52:25 -04:00
Tyler Wilding 8ce31e5a4c
input: fix double press issue when assigning a bind (#2895) 2023-08-09 22:50:02 -04:00
Tyler Wilding a06a6c6416
cleanup our cmake and build warnings (#2876) 2023-08-08 20:53:16 -04:00
Tyler Wilding 5d7aa7cea1
log: rotate log files with timestamps and add flag to disable ANSI colors (#2886)
Rotates the log files with a timestamp instead of copying all files and
incrementing an integer. Increases the amount of info you have when
looking at user's log files (ie. when looking at all the files, the file
creation dates are accurate).


![image](https://github.com/open-goal/jak-project/assets/13153231/61bcdf51-f0f6-4eee-b1e5-140aede5d19e)

Also simplifies the API for setting the log file, and `gk` logs are now
game specific with `jak1` or `jak2`. Which should be useful going
forward.

Lastly, added a flag to all CLIs to disable ansi colors for people that
want to do so. Though at the same time, there is finally a workaround in
jenkins to fix ANSI colors in the truncated log view -- so I'm not sure
why anyone would want to get rid of the color information. You can even
setup text editors to display the color info making log parsing much
easier. Fixes #1917

---------

Co-authored-by: ManDude <7569514+ManDude@users.noreply.github.com>
2023-08-08 17:59:37 +01:00
ManDude 39d989cfcc
[jak2] prepare scf-get-territory usage (#2890) 2023-08-08 17:21:29 +01:00
OpenGOAL Bot 988fdfb5b0
CI: Periodic Controller Database Update (#2889)
Updating Controller Database

Co-authored-by: OpenGOALBot <OpenGOALBot@users.noreply.github.com>
2023-08-07 19:21:40 +01:00
ManDude 7757483f01
[jak2] progress: make custom aspect ratio menu (#2888)
New menu for setting a custom aspect ratio.


![image](https://github.com/open-goal/jak-project/assets/7569514/33f81bc4-0219-4aba-b4ed-81394e4e4ceb)

![image](https://github.com/open-goal/jak-project/assets/7569514/9ddc3059-3ddf-4b35-afa5-11b9005e087c)

![image](https://github.com/open-goal/jak-project/assets/7569514/f3a16342-b38d-4082-ac18-1f82db349191)

![image](https://github.com/open-goal/jak-project/assets/7569514/69963cfe-2963-44f8-bde9-c0205c467d6c)
2023-08-07 16:32:28 +01:00
ManDude 9aa9b9d8e0
[jak2] get new cheats working (#2885) 2023-08-07 00:15:53 +01:00
ManDude 0adbe42995
fix collision renderer filters not working (#2872)
fixes #2867
2023-07-31 11:13:44 +01:00
water111 426851720f
fix texture anim shader on macOS (#2870) 2023-07-30 19:59:44 -04:00
Tyler Wilding 0ee20a255e
New Crowdin updates (#2869) 2023-07-30 19:14:04 -04:00
water111 a918e2d9de
[gfx] Clean up background renderer matrices, fix "hole covers" (#2866)
The way we got/stored background matrices is a bit weird and full of
leftovers from the first attempts at porting renderers. This doesn't
work well with the Jak 2 "other camera" system where some stuff is
rendered with a different camera matrix.

This cleans most of it up. The exception is that the collide mesh
renderer and the additional sprite culling I added still need to peek at
some cached camera matrices.

This fixes the problem where etie uses the wrong matrices for "other
camera" levels. Now the "hole covers" go in the holes in the background
of the throne room.

![image](https://github.com/open-goal/jak-project/assets/48171810/73a88f7b-05d4-4e9c-bb34-5b45efffcb69)
2023-07-29 20:34:42 -04:00
water111 50c15f1a47
[jak2] disable envmap when it should be (#2864)
In jak 2, there's an option to disable envmap. It's used on krew
holograms, hiphog trophies, and baron bosses in palace/tomb.
2023-07-29 19:01:55 -04:00
water111 9662cd0228
[jak2] use current buffer for blit-displays (#2855)
This changes how `BlitDisplays.cpp` works so it looks at the current
render buffer, rather than the back buffer.

This approach is a bit faster because we avoid copying the back buffer
on every single frame.
It also removes the black frames when the transition starts/stops.

The remaining issues are:
- there's still a single frame of weirdness with the sprite glow
renderer.
- when changing resolutions, it doesn't work super well.
2023-07-29 18:14:31 -04:00
water111 f477127bf7
[jak2] fix transparent shrub blending (#2853)
![image](https://github.com/open-goal/jak-project/assets/48171810/ae4d40bf-b061-45af-ba20-c546fc935f11)

Should probably wait until the release just in case. But I'm 99% sure
this line was just a mistake in the original implementation.
2023-07-29 15:57:49 -04:00
ManDude a626b6b60d
[jak2] graphic options menu proof of concept (#2849)
![imagem](https://github.com/open-goal/jak-project/assets/7569514/b8eaa0b6-7c51-4bd8-96ac-5fb2e0d08c4a)

![imagem](https://github.com/open-goal/jak-project/assets/7569514/d2742cef-98d4-43e4-a48d-cc1996e41612)

(The "Custom" option does not do anything right now.)
2023-07-29 18:08:44 +01:00
water111 608dd4ab57
Fix possible crash when loading files (#2850)
There was a single static path buffer being shared between multiple file
i/o threads. So sometimes you would end up using the wrong path for the
file, and getting size/data for the wrong file.

I think the original reason to have this buffer was just me being lazy
when we changed how project paths works a long time ago. It was a bad
idea in the first place.
2023-07-29 11:38:23 -04:00
water111 7220f5680e
[jak2] More texture animations, and fixes (#2847) 2023-07-29 11:10:26 -04:00
ManDude a9e0e36e64
fix stad-samos regression from refactor (#2796) + change imgui toggle to left-alt and make it customizable (#2848) 2023-07-29 02:26:42 +01:00
ManDude 6599eb1c91
Fix small buzz motor not vibrating correctly (#2846) 2023-07-27 10:46:40 +01:00
water111 f327e67182
[jak2] Fix dark jak anim and low res skull gems (#2842)
Fixes skull gems using a low resolution texture.

Fixes issue where jak in cutscenes is dark after watching oracle-level-1
(and likely other bugs with texture animations getting stuck)

---------

Co-authored-by: ManDude <7569514+ManDude@users.noreply.github.com>
2023-07-25 01:29:20 +01:00
Tyler Wilding 9376557834
game: add a clear text label for how to hide the top bar (#2845) 2023-07-24 20:06:09 -04:00
water111 50230e05fa
[jak2] Add static textures for the progress menu (#2838)
The progress menu loads its icon textures from a .STR file that we were
previously ignoring.

This change:
- updates the decompiler so it can process a .STR file containing a
texture
- adds a feature to force an entire page to always be loaded in the PC
renderer by putting all textures in the GAME.FR3 file.
- regenerates the texture offset map file for jak 2 with these new
textures

For now, I've just put the icon textures in GAME.FR3. The downside is
that these will always stay on the GPU, using up VRAM even when they
aren't needed. But the entire GAME.FR3 file is under 3 MB so I think
it's ok.


![image](https://github.com/open-goal/jak-project/assets/48171810/39f075b5-7cc5-4168-872a-33026342afab)
2023-07-23 12:35:59 -04:00
water111 673d2a13ae
[jak2] More progress on texture animations (#2835)
- Add security wall animation
- Add waterfall animations
- Add lava animations
- Update layer values from the game to fix the security wall
- Remove leftover debug in `level.gc` that would break level-specific
animations on the second time you visited the level
- Optionally load animated slot textures to the pool so generic can use
them (fixes skull gems in UI)
2023-07-21 15:04:28 -04:00
water111 5165a828a5
[jak2] Fix overlord related crash (#2834)
This fixes the crash reported in
https://github.com/open-goal/jak-project/issues/2833

There was a memory bug here for a long time where our array of `VagCmd`
in `iso_queue.cpp` was too small. This caused GetVagCommand to return
bogus pointers, and sound code would write over other parts of memory.
2023-07-21 11:25:08 -04:00
OpenGOAL Bot ec6b191334
CI: Periodic Controller Database Update (#2832)
Co-authored-by: OpenGOALBot <OpenGOALBot@users.noreply.github.com>
2023-07-17 20:27:46 -04:00
water111 72c27a6eaa
[jak2] More texture animations (#2831)
Added framework to do texture animations entirely in C++. Currently only
works on relatively simple ones, and doesn't handle updating all
parameters - only the speeds.

Connected texture animations to merc and tfrag for skull gems, dark
bomb, and scrolling conveyors.

Cleaned up Tfragment/Tfrag3, which used to be two classes. This was one
of the first C++ renderers, so it had a weird design.
2023-07-16 13:02:53 -04:00
Tyler Wilding e0bc7ce732
Get the project compiling on Apple Silicon macOS natively (arm64) (#2827)
I havn't tested it yet, but I can almost guarantee that atleast `goalc`
will not work in the slightest!

But the project is atleast fully compiling. My hope is to start
translating some AVX to NEON next / get `goalc` working...eventually.
2023-07-16 11:13:48 -04:00
water111 d80b1b8119
[jak2] speed up the sky texture animation (#2829)
This saved about 1.6 ms per frame in the city for me (~1.3 saved from
not doing sky twice, 0.3 saved in format lookup tables).

The big texture animator is about 1.0 ms.

![image](https://github.com/open-goal/jak-project/assets/48171810/c7bc7743-308c-4425-ad14-118e2d483fad)
2023-07-15 11:06:32 -04:00
water111 6f244b11ef
[jak2] Work-in-progress texture animations (#2819) 2023-07-14 18:17:54 -04:00
ManDude 95d706e339
fix subtitle console spam + font shadow offseting (#2822) 2023-07-10 07:32:35 +01:00
Tyler Wilding c87db7e670
i18n: subtitle code cleanup and update new subtitle JSON files to be compatible with Crowdin (#2802)
The main thing that was done here was to slightly modify the new
subtitle-v2 JSON schema to be more similar to the existing one so that
it can properly be used in Crowdin.

Draft while I double-check the diff myself

Along the way the following was also done (among other things):
- got rid of as much duplication as was feasible in the serialization
and editor code
- separated the text serialization code from the subtitle code for
better organization
- simplified "base language" in the editor. The new subtitle format has
built-in support for defining a base language so the editor doesn't have
to be used as a crutch. Also, cutscenes only defined in the base come
first in the list now as that is generally the order you'd work from
(what you havn't done first)
- got rid of the GOAL subtitle format code completely
- switched jak 2 text translations to the JSON format as well
- found a few mistakes in the jak 1 subtitle metadata files
- added a couple minor features to the editor
- consolidate and removed complexity, ie. recently all jak 1 hints were
forced to the `named` type, so I got rid of the two types as there isn't
a need anymore.
- removed subtitle editor groups for jak 1, the only reason they existed
was so when the GOAL file was manually written out they were somewhat
organized, the editor has a decent filter control, there's no need for
them.
- removed the GOAL -> JSON python script helper, it's been a month or so
and no one has come forward with existing translations that they need
help with migrating. If they do need it, the script will be in the git
history.

I did some reasonably through testing in Jak1/Jak 2 and everything
seemed to work. But more testing is always a good idea.

---------

Co-authored-by: ManDude <7569514+ManDude@users.noreply.github.com>
2023-07-09 02:53:39 +01:00
ManDude 4185123bd8
fix mouse mispositioning when letterboxed (#2818)
Not sure if this is the best way to go about it.

Fixes #2259
2023-07-08 23:05:03 +01:00
Fabian Bergström 40e2f113e6
Make Jak1 playable on macOS (intel) (#2811)
## Problem

OpenGOAL uses OpenGL 4.3.

Apple stopped upgrading OpenGL after 4.1, so the way OpenGOAL currently
works will never be playable on Macs using OpenGL.

## Solution

Luckily, downgrading to OpenGL 4.1 is not a huge change (at least it
doesn't seem like it to my untrained eyes).

## Changes

* set hints for OpenGL 4.1 instead of 4.3 for __APPLE__
* skip the OpenGL debugging callback setup for macOS (requires 4.3)
* bump down the version string for all shaders
* stop using the `binding` layout qualifier in shader code
* move the `flat` qualifier first (not sure if this is a 4.1 thing or
just Macs being more strict)
* don't mix signed and unsigned ints in shaders (not sure if this is a
4.1 thing or just Macs being more strict)
* add some hacky CPP to the Shader constructor for binding texture units
and bones buffers based on variable names in the shader code

## Results


![image](https://github.com/open-goal/jak-project/assets/33322/dd487c2a-61ac-4e36-a595-976204302977)
![Skärmavbild 2023-07-07 kl 13 10
30](https://github.com/open-goal/jak-project/assets/33322/7976d411-0604-4046-9e8a-123106cedf57)
![Skärmavbild 2023-07-07 kl 13 13
48](https://github.com/open-goal/jak-project/assets/33322/78db4f0c-da31-4889-995c-8f54e56deb5c)
2023-07-08 11:53:43 -04:00
Tyler Wilding 6faa7530f9
input: Hopefully make keyboard/mouse handling more consistent (#2807)
The current event-based approach is very difficult to get right, and it
depends on no events ever being missed. This changes the keyboard/mouse
handling code to a polling-based approach.

Other fixes:
- an issue where modifier keys were not able to be successfully bound
(like Left Shift to `X`)
- improves cursor hiding (except when you use the start menu, this seems
like an SDL issue, see comment)
- Better discarding of kb/mouse inputs when imgui intercepts input
- properly swap bindings when an already set key is assigned, even if it
crosses the distinction of an analog vs normal button

Fixes #2800
2023-07-08 10:45:56 -04:00
ManDude 71b4ab5122
change imgui toggle key from leftalt to f12 (#2794) 2023-07-03 17:49:27 +01:00
Fabian Bergström cf295952b6
Make all project targets compile on Intel MacOS (#2780) 2023-07-01 13:30:11 -04:00
Tyler Wilding 436bac83ec
game: Improve OpenGL version detection and make requirement errors more obvious to the user (#2787) 2023-06-30 21:05:58 -04:00
Tyler Wilding bafa8f6b34
New Crowdin updates (#2786) 2023-06-30 00:00:37 -04:00
Fabian Bergström 7300678c46
[jak1] Improve the Swedish translations (#2770) 2023-06-29 23:07:24 -04:00
Himham e3fb7c9467
Typo fix LTT_MSG_INSEPCT (#2778)
Co-authored-by: ManDude <7569514+ManDude@users.noreply.github.com>
2023-06-29 16:45:53 -04:00
OpenGOAL Bot 7570978c4b
CI: Periodic Controller Database Update (#2777)
Co-authored-by: OpenGOALBot <OpenGOALBot@users.noreply.github.com>
2023-06-29 16:33:58 -04:00
Tyler Wilding 10934f6746
d/j2: Some work on the SQL editors (#2771) 2023-06-25 16:51:46 -04:00
Tyler Wilding 25e7c9bc5d
New Crowdin updates (#2775) 2023-06-25 16:17:18 -04:00
Tyler Wilding 4018d15fde
ci/translations: Add a linter to check for invalid characters, fix current issues (#2774) 2023-06-25 15:13:32 -04:00
Ziemas cb895d4ba0
overlord: perform file operations on a thread pool (#2749)
Avoids blocking other IOP threads on IO. 

Idk if it'll really help anything, but at least theoretically it might
stop some pathologically slow IO case from blocking the VAG buffer
switching.
2023-06-24 10:19:35 -04:00
water111 2fc943977f
[jak2] GOAL side texture animation stuff (#2766)
It turns out we didn't decompile any of this stuff yet.
2023-06-24 10:11:47 -04:00
Tyler Wilding 679986e79f
sdl: safer code to resolve intermittent controller crashes related to disconnections (#2755) 2023-06-23 15:35:32 -04:00
OpenGOAL Bot 0c729437bb
CI: Periodic Controller Database Update (#2751)
Co-authored-by: OpenGOALBot <OpenGOALBot@users.noreply.github.com>
2023-06-19 16:33:24 -04:00
Tyler Wilding 95904903a6
sdl: only call SDL video functions from the gfx thread (#2748)
Co-authored-by: ManDude <7569514+ManDude@users.noreply.github.com>
2023-06-19 16:32:39 -04:00
ManDude 910681bde8
fix windowed screenshots capturing the last window buffer instead of current one (#2750) 2023-06-19 15:33:51 +01:00
ManDude 572e63f4a9
opengl: better handling of the draw region setting (#2746)
This fixes screenshots and a bunch of weird scissoring bugs. Fixes #2630
and fixes #2631
2023-06-19 04:15:33 +01:00
ManDude c41a66829f
Make screenshots copy to clipboard (#2739)
Fixes #2728
2023-06-17 23:42:52 +01:00