Commit graph

942 commits

Author SHA1 Message Date
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
water111 01cb9efccc
[jak2] fge=0 at the start of warp (#2740)
The warp giftags don't set PRE and seem to rely on fogging being
disabled at the start.
2023-06-17 18:29:55 -04:00
water111 6e779d1f1c
[jak2] faster startup (#2738)
Trying to make up for some of the startup speed lost in the SDL
transition. This saves about 1s from start (from ~3s), and about 500 MB
of RAM.

- Faster TIE unpack by merging matrix groups, more efficient vertex
transforms, and skipping normal transforms on groups with no normals.
- Refactor generic merc and merc to use a single renderer with multiple
interfaces, rather than many renderers. Removed "LightningRenderer" as a
special thing, but Warp is still special
- Add more profiling stuff to startup and the loader.
- Remove `SDL_INIT_HAPTIC` - this turned out to be needed for
force-feedback steering wheels, and not needed for controller vibration
- Switched `vag-player` to use quicksort instead of the default GOAL
sort (very slow)
2023-06-17 17:23:25 -04:00
BreakPoints 1512c6bd9c
sdl: Directly use Windows DPI scaling hint, not SDL (#2730)
Co-authored-by: ManDude <7569514+ManDude@users.noreply.github.com>
2023-06-17 12:40:25 -04:00
Hat Kid d8cca2bf83
game: refactor discord code and improve jak 2 support (#2714)
The Discord RPC code has been cleaned up and split up between game
versions.

For Jak 2, the Discord integration now shows large images for all levels
(with corresponding day and nighttime variants if required) and small
images for time of day and various states like being on the jetboard,
driving a zoomer, playing as Daxter, etc.

TODO:
- [x] mission specific images and detection
- [x] detect side missions properly
- [x] `onin-game` detection


![image](https://github.com/open-goal/jak-project/assets/6624576/35ec273f-404c-4475-a7c7-06121a17b1a5)

![image](https://github.com/open-goal/jak-project/assets/6624576/8456f5e2-4f96-4c72-ae9e-d930d76c93af)

![image](https://github.com/open-goal/jak-project/assets/6624576/9a17a0ec-c9bd-40fa-8556-f139712d8f07)

---------

Co-authored-by: ManDude <7569514+ManDude@users.noreply.github.com>
2023-06-17 05:16:40 +01:00
OpenGOAL Bot 45bbefafde
CI: Periodic Controller Database Update (#2718)
Co-authored-by: OpenGOALBot <OpenGOALBot@users.noreply.github.com>
2023-06-13 21:46:23 -04:00
BreakPoints 756fcc3e4d
SDL: Hint to Windows that we handle DPI scaling (#2729) 2023-06-13 21:45:57 -04:00
ManDude e2c84d7635
revamp controller LED in jak 1 + reorganize some pc-settings things + fix some jak 2 decomp (#2719) 2023-06-13 19:26:44 +01:00
Ziemas 1eec021593
989snd: properly update children with new state (#2720) 2023-06-13 00:48:09 +01:00
water111 ad5cec1bb4
[jak2] Floating point blerc (#2715)
This moves the blerc math from mips2c to the Merc2 renderer, and uses
floats instead.

We could potentially do this on the GPU, which would be even faster, but
this isn't that slow in the first place.
2023-06-11 12:35:08 -04:00
ManDude a17c78cdd1
don't use gender for citizen names + small minor stuff (#2708)
It's ultimately not useful information and kind of clutters the text.
2023-06-09 05:56:46 +01:00
ManDude 18ddd1613c
Jak 2 pc subtitle support (#2672)
Adds support for adding custom subtitles to Jak 2 audio. Comes with a
new editor for the new system and format. Compared to the Jak 1 system,
this is much simpler to make an editor for.

Comes with a few subtitles already made as an example.
Cutscenes are not officially supported but you can technically subtitle
those with editor, so please don't right now.

This new system supports multiple subtitles playing at once (even from a
single source!) and will smartly push the subtitles up if there's a
message already playing:

![image](https://github.com/open-goal/jak-project/assets/7569514/033e6374-a05a-4c31-b029-51868153a932)

![image](https://github.com/open-goal/jak-project/assets/7569514/5298aa6d-a183-446e-bdb6-61c4682df917)

Unlike in Jak 1, it will not hide the bottom HUD when subtitles are
active:

![image](https://github.com/open-goal/jak-project/assets/7569514/d466bfc0-55d0-4689-a6e1-b7784b9fff59)

Sadly this leaves us with not much space for the subtitle region (and
the subtitles are shrunk when the minimap is enabled) but when you have
guards and citizens talking all the time, hiding the HUD every time
anyone spoke would get really frustrating.

The subtitle speaker is also color-coded now, because I thought that
would be fun to do.

TODO:
- [x] proper cutscene support.
- [x] merge mode for cutscenes so we don't have to rewrite the script?

---------

Co-authored-by: Hat Kid <6624576+Hat-Kid@users.noreply.github.com>
2023-06-08 01:04:16 +01:00
water111 b1e753740c
[jak2] joint to bone nan fix (#2698)
Fixes https://github.com/open-goal/jak-project/issues/2477
(and any other case of bad bones/cspaces when a bone's scale is very
small/negative)
2023-06-05 22:02:17 -04:00
water111 3bb6bd0e3a
[jak2] fix missing drill crane center part (#2692)
We were forcing the drill crane to draw at lod 0, but we should have
listened to the game and drawn it at lod 1.
2023-06-05 18:56:26 -04:00
Tyler Wilding e9f9869849
input: fix some mistakes in the default keyboard binds (#2697) 2023-06-05 18:26:29 -04:00
Tyler Wilding bdaf088d4b
game: Migrate from GLFW to SDL2 & attempt to rewrite / simplify display and input code (#2397)
Co-authored-by: Hat Kid <6624576+Hat-Kid@users.noreply.github.com>
2023-06-04 15:34:37 -04:00
water111 08741f0a42
[jak2] float patch for bogus collide frags (#2686)
Should fix https://github.com/open-goal/jak-project/issues/2679

Here's a test program that will trigger the bug when near these guards:
```lisp
(define *cquery* (new 'global 'collide-query))

(defun test-bad-collide ()
  (let ((lower (new 'static 'vector  :x 1681893.8750  :y 61314.2031 :z 345208.6562 :w 1.))
        (upper (new 'static 'vector :x 1701603.8750 :y  67624.0625 :z 357881.0312 :w 1.))
        ;(cquery (new 'stack-no-clear 'collide-query))
        )
    (set! (-> *cquery* collide-with) (the-as collide-spec 1))
    (set! (-> *cquery* ignore-process0) #f)
    (set! (-> *cquery* ignore-process1) #f)
    (set! (-> *cquery* ignore-pat) (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1))
    (set! (-> *cquery* action-mask) (collide-action solid))
    (set! (-> *cquery* bbox min quad) (-> lower quad))
    (set! (-> *cquery* bbox max quad) (-> upper quad))
    (format 0 "doing collide...~%")
    (fill-using-bounding-box *collide-cache* *cquery*)
    (format 0 "have ~d and ~d~%" (-> *collide-cache* num-tris) (-> *collide-cache* num-prims))
    )
  (none)
  )
```

As far as I can tell, there's a totally invalid collide-hash with an
inside `axis-scale.z`. On the PS2, it gets ignore because of how
float->int works for floats that are too big. On PC, it ends up using a
negative value and loop forever.
2023-06-04 15:19:08 -04:00
water111 fee91d2240
[IOP] revert change that ran the iop way too much (#2681)
This caused the IOP thread to use a full core always, just spinning on
this. I didn't mean to leave this in.
2023-06-04 10:57:34 -04:00
Ziemas 691af17bbd
overlord: Some cleanup (#2669)
Started cleaning up some of the lower hanging fruit.
2023-05-26 17:55:10 -04:00
water111 d5951c2b11
[jak 2] Fix possible stereo desync in overlord (#2663)
Normally, when they allocate a VagCmd, they do a bunch of stuff to clear
all the status bits and reset things
in particular the InitVAGCmd function does a lot


![image](https://github.com/open-goal/jak-project/assets/48171810/9b355020-ad37-496c-9438-2f8d34f24e0a)

but for the stereo command, they do a lot less:

![image](https://github.com/open-goal/jak-project/assets/48171810/12a36712-0e68-4377-a6be-3bde82c2aa15)

Which means that the new_stereo_command can just have random status bits
left over from whatever the last user had.
we seem to end up in a state where byte21 is set, and this causes
everything else to be wrong and off-by-one dma transfer. My guess is
that the original game avoided this bug due to lucky timing that I don't
understand.

I think the fix of just clearing byte21 is ok because there's no way
that the old value of the byte is useful after the command is
repurposed.
2023-05-19 21:17:11 -04:00
Tyler Wilding a033119f1d
i18n: add MysticGamer23's swedish subtitles (#2667) 2023-05-19 21:06:24 -04:00
Tyler Wilding 18f162fcdf
New Crowdin updates (#2666) 2023-05-18 21:43:00 -04:00
Tyler Wilding 288c093913
i18n: Create a JSON subtitle format for translating via Crowdin (#2644) 2023-05-18 20:54:59 -04:00
Luminar Light 70cb7e3171
Hungarian Custom Text JSON Disappearance fix, and translating new speedrun text (#2665) 2023-05-18 19:36:19 -04:00
ManDude 7c9c956808
vag player + skill tracker debug tools and fix some decomp (#2664)
Also fixed an original game bug in `loader.gc` on a method that's called
quite often, though I have no clue what erroneous behavior it could have
even caused.
2023-05-18 23:12:23 +01:00
OpenGOAL Bot 263f4caaf9
CI: Periodic Controller Database Update (#2651)
Co-authored-by: OpenGOALBot <OpenGOALBot@users.noreply.github.com>
2023-05-16 01:03:43 -04:00
ManDude cf048a9e37
small cleanup to progress-draw.gc and set-font-color (#2653) 2023-05-15 20:45:28 +01:00
ManDude 01aa67798f
fix racer hud regression (#2648)
Fixes #2643
2023-05-15 03:18:02 +01:00
ManDude ecf590f30e
fix shadow colors in jak 1 and jak 2 shadow crash (#2647)
Fixes Jak 1 shadow color. Old behavior is subtractive blend with a
hardcoded value, which often times look way too dark, but it looks like
the actual game uses some sort of multiplicative blend and a
customizable shadow color (for all shadows at once).

Before vs after:

![image](https://github.com/open-goal/jak-project/assets/7569514/a409a403-9ddf-40dd-a74f-a29bd9b98323)

![20230514234953763_gk_HxercNamqn](https://github.com/open-goal/jak-project/assets/7569514/211565ae-405f-4056-96e5-ec188d2c0a30)


![image](https://github.com/open-goal/jak-project/assets/7569514/f84244a6-153c-4f7d-84d0-dae57147e4ae)

![20230514235005037_gk_jGjwKFhnLE](https://github.com/open-goal/jak-project/assets/7569514/4262d136-3130-4791-ae70-14d4369ba8d4)


Also fixes #2646
2023-05-15 01:01:49 +01:00
Tyler Wilding 08b9a631dc
New Crowdin updates (#2645) 2023-05-14 01:28:13 -04:00
OpenGOAL Bot 4f19f79e99
CI: Periodic Controller Database Update (#2639)
Co-authored-by: OpenGOALBot <OpenGOALBot@users.noreply.github.com>
2023-05-08 21:32:53 -04:00
Tyler Wilding 0e0d7ba833
cmake: sort game/CMakeLists.txt files (#2633)
I sorted the list of sources on my SDL PR to reduce future merge
conflicts, but in the meantime everytime something gets added to it I
have a pretty rough set of conflicts to resolve. Committing this early
to preserve my sanity
2023-05-07 18:54:33 +01:00
water111 b79f28fe07
[jak2] combined shadow work PR (#2632)
This PR is a combination of
https://github.com/open-goal/jak-project/pull/2507 and some additional
changes to port Shadow VU1 to OpenGL. As far as I can tell, it's
working.

---------

Co-authored-by: Hat Kid <6624576+Hat-Kid@users.noreply.github.com>
2023-05-07 12:12:21 -04:00
ManDude 40b2e93be7
pack tfrag normals into 10 bits (#2625)
Saves 16 bits and lets us align the `color_index` field properly.

This shouldn't improve or decrease performance by any noticeable amount
except maybe in really low end systems.
2023-05-06 02:08:33 +01:00
ManDude 6884b0f73e
start blit-displays decomp & renderer + improve decompilation of some DMA macros (#2616)
Adds sprite distort, fixes buggy sprite rendering in progress, adds
scissoring support (used in various scrolling menus) and a very basic
implementation of `blit-displays`. This is enough to make the fade
effect in the progress menu work, along with all the menus working
properly without needing to use the REPL. This does not make screen
flipping and the filter when failing a mission work.

Added support in the decompiler for detecting `dma-buffer-add-gs-set`
and `dma-buffer-add-gs-set-flusha` and updated all of the Jak 2 code to
use it. Readability improved!

Fixes decompiler issue with `with-dma-buffer-add-bucket` not inlining
forms which broke syntax. Fixes store error warnings showing up for
non-existent stores, there is now a dedicated pass for this at the end.

I started work on making `BITBLTBUF` stuff work in the DirectRenderer,
but stopped for now because it wasn't strictly necessary. It will still
assert like before.
2023-05-04 18:34:09 -04:00
Tyler Wilding ae3b76e465
New Crowdin updates (#2614) 2023-05-03 21:04:36 -04:00
Tyler Wilding e0cba064b2
i18n: allow for multiple file sources per language (#2613) 2023-05-03 20:04:52 -04:00
OpenGOAL Bot 8a59adffd5
CI: Periodic Controller Database Update (#2610)
Co-authored-by: OpenGOALBot <OpenGOALBot@users.noreply.github.com>
2023-05-01 19:08:50 -04:00
Tyler Wilding 28a5a417bc
game: don't exit prematurely when rebooting in debug (#2608)
I'm not sure what has changed here...but rebooting in debug mode now
hangs.

- It seems to exit the GFX loop prematurely because `MasterExit` is
still set to `RESTART_IN_DEBUG`
https://github.com/open-goal/jak-project/blob/master/game/runtime.cpp#L431
- And then it gets stuck waiting for the DECI thread to close

This works, but im not sure if it's the right fix / what has changed to
require this.
2023-04-30 23:06:11 -04:00
ZedB0T 9bed693533
Initial Jak 2 Autosplit Support (#2239)
Co-authored-by: Tyler Wilding <xtvaser@gmail.com>
Co-authored-by: Tyler Wilding <xTVaser@users.noreply.github.com>
2023-04-30 17:38:05 -04:00
Tyler Wilding 6d52e002b9
i18n: init translation files that can be used by crowdin (#1760) 2023-04-30 17:22:56 -04:00
Tyler Wilding cc878c1055
settings: handle corrupted json settings files (#2600)
Fixes #2597
2023-04-30 14:14:40 -04:00
water111 5c9aa3facd
[jak2] try to speed up compile a bit (#2596) 2023-04-30 14:13:52 -04:00
Tyler Wilding 5e987cc0e2
jak2: overlord rework (#2544)
Fixes #2545
Fixes #2546
Fixes #2547
Fixes #2548
Fixes #2549
Fixes #2550
Fixes #2551
Fixes #2552
Fixes #2553
Fixes #2554
Fixes #2555
Fixes #2556
Fixes #2557
Fixes #2558
Fixes #2559
Fixes #2560
Fixes #2561
Fixes #2562
Fixes #2563
Fixes #2564
Fixes #2565
Fixes #2567
Fixes #2566
Fixes #2568
Fixes #2569
Fixes #2570
Fixes #2522
Fixes #2571

---------

Co-authored-by: water <awaterford111445@gmail.com>
Co-authored-by: Hat Kid <6624576+Hat-Kid@users.noreply.github.com>
Co-authored-by: ManDude <7569514+ManDude@users.noreply.github.com>
2023-04-29 16:13:57 -04:00
Tyler Wilding 8260920c2d
subtitles-editor: Allow removing lines and fix some issues (#2573)
Allows for removing a line in the subtitle editor finally, also fixed
the following:

- The path the editor used didn't include the game name
- Loading the subtitle project is too slow to do on startup now
(4-5seconds in a debug build), do it on demand now
2023-04-29 11:02:18 -04:00
ManDude 0ce5835818
Create a new format for particle definitions (defpart) (#2572)
Updates the decompiler for the new format and there's new macros. This
new format should be easier to read/parse.

Also rewrote `sp-init-fields!` (both jak 1 and 2) from assembly to GOAL.

Hopefully I did not miss any regressions in Jak 1/2 while updating the
files, it's a lot.
2023-04-29 11:01:47 -04:00
Hat Kid 77123652b9
jak2: fix 3d hud elements not drawing (#2527)
The skull gem is not moving, but I'm assuming that's a texture
animation.

![image](https://user-images.githubusercontent.com/6624576/232855762-6c296419-a8b3-47b6-a02f-ab7079f145c6.png)
2023-04-25 18:57:38 -04:00
Tyler Wilding 0ffb912a04
formatter: add tree-sitter dependency and commit early draft work on a proper code formatter (#2536) 2023-04-24 23:46:55 -04:00
OpenGOAL Bot 4ca697b81a
CI: Periodic Controller Database Update (#2542)
Co-authored-by: OpenGOALBot <OpenGOALBot@users.noreply.github.com>
2023-04-24 17:12:48 -04:00
ManDude 4cc3430073
fix some decomp types and get rid of in-game frame time perception (#2535) 2023-04-24 00:21:12 +01:00
ManDude c44256144e
[jak2] bring other version fixes to source (#2528)
- [x] compare NTSC-K
- [x] compare NTSC-J
- [x] compare PAL
- [x] figure out version order
- [x] ~~write delta patch for spanish text~~ no need for now

Fixes #2530
2023-04-23 20:11:08 +01:00
Tyler Wilding a264b6539b
game: Remove temporary CLI arg shim in gk (#2532) 2023-04-22 14:13:57 -04:00
water111 9ba86c8b6a
more generic fixes (#2515)
Fixes issue where warp effect looks wrong near the edge of the screen -
there was an unhandled `REGION_CLAMP` texture setting.

Fixes a potential bug where "warp page" things wouldn't be drawn at all
because there is no PC warp bucket. Unclear if anything actually fits
this category, but it doesn't hurt.

Turn on PC-format texture uploads for the water page so the precursor
guy uses the right texture. It has to use generic because it abuses the
generic death query thing to spawn particles.

Workaround for some issues with rebuilding level files after changing
engine files. Not a perfect solution, but probably good enough.
2023-04-17 13:53:38 -04:00
OpenGOAL Bot 633b5cd53c
CI: Periodic Controller Database Update (#2514)
Updating Controller Database

Co-authored-by: OpenGOALBot <OpenGOALBot@users.noreply.github.com>
2023-04-17 13:53:08 -04:00
ManDude 50d93a3f79
update collision renderer for jak 2 (#2508)
Doesn't actually do anything in Jak 2 because the collide mesh isn't
extracted, but the functionality is all there. Also updated the renderer
a bit to keep the colors more readable.
2023-04-16 22:56:19 -04:00
water111 40c30cc0ab
[jak2] fix generic crashes (#2505)
Fixes crashes when killing the big spider, killing predator metal heads,
and watching the end cutscene. The presursor guy is the wrong color, but
I don't have time to look into this today.
2023-04-16 22:55:18 -04:00
water111 a27083f4ee
[jak 2] Add generic and warp (#2495) 2023-04-16 18:05:35 -04:00
ManDude 99fe918a1a
fix viewport not being set for probe draw (#2489) 2023-04-15 03:09:39 +01:00
water111 c7f2a23abf
[jak2] misc fixes to renderers (#2488)
Fixes decal on tfrag:

![image](https://user-images.githubusercontent.com/48171810/232174352-11153941-e1f9-4472-becb-f266c2a309e5.png)

Sets up jak 2 alpha shrub test settings. They are still too dark, but
there's no longer incorrect alpha test:

![image](https://user-images.githubusercontent.com/48171810/232174590-f9caa6c5-f190-4c78-b720-5f4055490d47.png)

Fix decal on shrub, a feature used in exactly one place in jak 1:

![image](https://user-images.githubusercontent.com/48171810/232174614-8ea65ca5-a183-45f7-ae79-6bf06a937007.png)

Fixed issue with u16 overflow in castle on the alpha channel, causing
flickering. It barely overflowed, which made me suspicious that we had
some error somewhere. But I think that there code is robust against
overflows.
2023-04-14 21:13:45 -04:00
ManDude ba12d804f7
jak 2 memcard support (#2482) 2023-04-14 20:39:58 +01:00
ManDude 7d11c6e100
fix jak 2 text encoding/decoding + minor decomp type fixes (#2476)
Now all text in all non-Korean languages is built correctly.
2023-04-14 02:09:12 +01:00
Tyler Wilding 909190b9a7
gk: fix "reboot in debug" option not working properly when gk has no args (#2469) 2023-04-11 17:58:19 -04:00
OpenGOAL Bot 86dfd92f00
CI: Periodic Controller Database Update (#2466)
Updating Controller Database

Co-authored-by: OpenGOALBot <OpenGOALBot@users.noreply.github.com>
2023-04-11 17:58:00 -04:00
ManDude 59e0c5e264
decomp bigmap (#2460)
Probably the last major missing file.

The bigmap fetches the correct level and map info, but doesn't actually
render anything right now.


![image](https://user-images.githubusercontent.com/7569514/230701921-e3fde09e-9faa-4725-b7e6-5a02a77346bd.png)

![image](https://user-images.githubusercontent.com/7569514/230701928-fbe0847b-b79a-4275-83ec-b9c1d847d17d.png)
2023-04-08 20:30:27 +01:00
ManDude 332326268a
make directrenderer in sprite work + rename game-text-id to text-id + move pc debug settings (#2459) 2023-04-08 04:32:35 +01:00
Luminar Light c0fdd12626
Translate new Jak 1 speedrunning text to Hungarian, plus some minor adjustments (#2242)
I saw that some new speedrunning-related text was added to the English
language, so I decided to translate them. Meanwhile I also made some
minor adjustments/fixes to existing translations.

BUT I have a question...
Do we really need all this text?

![image](https://user-images.githubusercontent.com/18116946/221017680-cae74597-6627-4be3-a548-44f6c005b6a2.png)
They are displayed in a menu that is called 'NEW INDIVIDUAL LEVEL RUN'.
So adding IL after the level names is kind of redundant in my opinion -
the existing level name text entries could be used instead. And the
reason why I care so much is because it is hard to come up with a
"translation" for IL. But if I am forced to, I will come up with
something.

I will keep this PR a draft until I know what the main jak-project
people think about this "IL" issue. And I will adjust my branch
accordingly.
2023-04-05 18:23:22 -04:00
OpenGOAL Bot d686638a6e
CI: Periodic Controller Database Update (#2452)
Co-authored-by: OpenGOALBot <OpenGOALBot@users.noreply.github.com>
2023-04-03 22:45:00 -04:00
ManDude 6f1cb2a0a9
fix repl buffer overrun + use a different port for each game version (#2449)
Fixes #2313
2023-04-02 05:57:21 +01:00
ManDude b141871bd1
Fix typo (#2447) 2023-03-31 20:27:25 -04:00
manuelx98 2c98c5a6e0
Italian subtitles (WIP) (#1568)
Draft until all the english subtitles are finished.
Many things still in WIP and everything is subject to change.

TODO:

* [x]  intro
* [x]  sidekick
* [x]  oracle
* [x]  training
* [x]  village1
* [x]  beach
* [x]  jungle
* [x]  misty
* [x]  firecanyon
* [x]  village2
* [x]  swamp
* [x]  rolling
* [x]  sunken
* [x]  ogre
* [x]  village3
* [x]  snowy
* [x]  spidercave
* [x]  lavatube
* [x]  citadel
* [x]  finalboss
_____________
* [x]  default
_____________
* [x]  timings
* [x]  game_text_it.gs

---------

Co-authored-by: pex93 <44973506+pex93@users.noreply.github.com>
Co-authored-by: OngakuGH <107898664+OngakuGH@users.noreply.github.com>
Co-authored-by: Vas0sky <13967613+Vas0sky@users.noreply.github.com>
Co-authored-by: XedoIT <107510301+XedoIT@users.noreply.github.com>
Co-authored-by: XedoIT <ciccio0152@gmail.com>
Co-authored-by: ManDude <7569514+ManDude@users.noreply.github.com>
2023-03-31 18:34:19 -04:00
Xavier Siguero Mora 1b27257e8a
Updated Spanish translation (#2322) 2023-03-31 16:43:48 -04:00
ManDude 577382ad34
minor cleanup + update fmt + fix some jak 2 visual anomalies (#2442)
Disables the fog hack for Jak 2, where it's not useful and kind of
breaks in most levels which rely on dark vertices that aren't underwater
(e.g. city windows).
2023-03-30 17:49:07 -04:00
water111 976e08fe97
[jak2] add vortex renderer (#2441)
Add the vortex renderer. The vortex texture isn't there yet (it uses the
same texture as clouds), so it uses a checkerboard. But the
colors/vertices seem right.
2023-03-29 20:28:48 -04:00
OpenGOAL Bot 651003dcf2
CI: Periodic Controller Database Update (#2436)
Updating Controller Database

Co-authored-by: OpenGOALBot <OpenGOALBot@users.noreply.github.com>
2023-03-29 18:24:48 -04:00
ZedB0T f04083d997
Dont overwrite profile data (#2440)
This way a user can take multiple data samples from one/multiple play
sessions quickly. Creates a directory called profile_data that is added
to gitignore to place the data in, and checks to see if a file is there
and if so it creates prof1.json prof2.json prof3.json and so on...
2023-03-29 18:24:28 -04:00
water111 0b021d1be1
[jak2] fix nav typo (#2430)
add -> multiply.

Fixes https://github.com/open-goal/jak-project/issues/2429
2023-03-26 18:41:59 -04:00
water111 d208ceddce
[jak2] fix enter-state and sprite crash (#2428)
Fixes https://github.com/open-goal/jak-project/issues/2426 and other
sprite crashes with the `HUD` address assert.
Doesn't fix the other sprite issues.

Fixes https://github.com/open-goal/jak-project/issues/2427

Also removes the old sprite renderer, which doesn't work.
2023-03-26 15:41:10 -04:00
water111 9e087cbfcb
[jak2] a few small graphics fixes (#2424)
- better handling of the `disable-fog` settings for merc, should fix the
spotlights. There's a setting in the merc effect, and also a runtime
flag for the draw-control. I'm not actually sure what reads these, but
the draw-control one is definitely used to disable fog on the
spotlights.
- increase merc draw limit to try to fix the issue about partially drawn
citizens in the city
- remove useless debug prints (it's okay to die in init, and the medium
load buffer size mode is understood now)
2023-03-26 12:30:35 -04:00
water111 d82ce11e9b
[jak2] update sprite to check matrix == -1 (#2415)
Fixes an issue where glow sprites are drawn twice, sometimes causing the
weird black outlines
2023-03-25 19:46:07 -04:00
water111 58654ce60b
[jak2] Fix degrees conversion for particle rotation (#2413)
Hopefully this will fix all the rotated particles
2023-03-25 18:01:43 -04:00
water111 cbb07fb287
[jak2] Fix texture page dir offset for jak 2 (#2412)
Accidentally used Jak 1's tpage dir size...
2023-03-25 16:34:03 -04:00
water111 0a511da2ce
[jak2] fix flickering and depth writes (#2406)
Fixes some mistakes with merc draw modes. The glass in the palace level
no longer writes to the depth buffer (it's "water"):

![image](https://user-images.githubusercontent.com/48171810/227727825-d6726621-88a8-45a8-9cf3-8d6e9edc3d54.png)

Also fixes the one-frame flickers when level draw orders change. We
might be able to make this more efficient in the future, but this will
at least fix the frame with nothing drawn.
2023-03-25 14:00:54 -04:00
ManDude 2e34514ee5
[jak2] increase size of DMA buffers + potentially fix print buffer bug (#2398)
The actor heap size was increased but not the DMA buffer because I
forgot.
2023-03-23 01:15:07 +00:00
ManDude 217a979048
[decompiler] jak 2 cutscene file support (#2390)
fixes #2332 

also fills out the japanese character set
2023-03-22 21:31:13 +00:00
water111 df646282ab
[jak 2] fix texture lookup problem (#2373)
This should fix a bunch of texture-related issues by generating a table
of overlapping textures and just... adjusting them slightly so they
don't overlap. It's not the most elegant solution in the world, but I
think it's no worse than the existing hard-coded tpage dir stuff.
2023-03-21 19:41:14 -04:00
water111 f276251a3a
[jak1] use etie (#2329)
Use Jak 2's etie to render shiny background things.

To switch back to the old one:
```
(set! *use-etie* #f)
```
and also uncheck this box

![image](https://user-images.githubusercontent.com/48171810/226119270-8d1b8233-bc5f-4bc1-a09b-a6d3183ba2a4.png)
(same for `l1`)
2023-03-20 19:12:33 -04:00
ManDude d1260a0c0b
[jak2] double load dgo workaround (#2331)
fixes #2282
2023-03-19 20:30:23 +00:00
ManDude d46f790973
[jak2] un-hardcode level-related code a bit (#2330)
Makes it less of a headache to change level amounts.
2023-03-19 05:33:04 +00:00
ManDude 198c8e1946
[jak2] improve debugging tools for entity lights and regions (#2327)
also fixes some other random bugs
2023-03-18 06:29:40 +00:00
water111 2fa4a23ea1
[jak 2] ETIE (#2326)
Definitely needs a clean up pass, but I think the functionality is very
close.

There's a few "hacks" still:
- I am using the emerc logic for environment mapping, which doesn't care
about the length of the normals. I can't figure out how the normal
scaling worked in etie. I want to do a little bit more experimentation
with this before merging.
- There is some part about adgifs for TIE and ETIE that I don't
understand. The clearly correct behavior of TIE/ETIE is that the alpha
settings from the adgif shader are overwritten by the settings from the
renderer. But I can't figure out how this happens in all cases.
- Fade out is completely disabled. I think this is fine because the
performance difference isn't bad. But if you are comparing screenshots
with PCSX2, it will make things look a tiny bit different.
2023-03-17 20:35:26 -04:00
ManDude 6670124296
[jak2] use loop to make bucket renderers (less error-prone) (#2324) 2023-03-17 20:10:06 +00:00
OpenGOAL Bot 5b8644ea20
CI: Periodic Controller Database Update (#2323)
Co-authored-by: OpenGOALBot <OpenGOALBot@users.noreply.github.com>
2023-03-13 18:51:49 -04:00
Hat Kid a1dee19d0d
decomp: finish stadium-obs (#2294)
Co-authored-by: water <awaterford111445@gmail.com>
2023-03-11 15:55:39 -05:00
Tyler Wilding 630388229e
cleanup gk CLI and fix issue that caused revert (#2310)
My mistake -- testing focused too much on preserving the existing
behaviour I clearly forgot to make sure the new stuff worked properly.

Just had to early out and not modify the args if they were in the new
format.
2023-03-09 23:13:01 -05:00
water111 15bf281377
Revert "game: cleanup gk's CLI documentation" (#2306)
Reverts open-goal/jak-project#2189

can't figure out how to use the new options yet
2023-03-09 20:24:43 -05:00
Tyler Wilding 2f6bfd2e64
game: cleanup gk's CLI documentation (#2189)
An attempt to cleanup the last CLI interface we have left to cleanup. 
- `gk` args now follow the typical convention ie. `--proj-path` instead
of `-proj-path`.
- args that are passed through to the rest of the application / the
game's runtime use the typical convention of following a `--`
- I'm thinking some args shouldn't be handled at this level ie
(`-nodisplay`, `-vm`, `-novm` or `-jak2`) These could be better
documented as legitimate flags and passed in via a nice struct. They
don't seem to be used in `InitParams` but I'll triple check.

There's a temporary shim here so there is no coupled release with the
launcher (right now it executes `gk` with a few args). So I just change
the old args into the new format. After one release cycle, I can change
it in the launcher and delete it here.

I am unsure if this will break the bash shellscript usages -- not sure
which args were usually passed into `$@`


![image](https://user-images.githubusercontent.com/13153231/222035309-b6601719-cdc9-40ee-b36e-e4b135d3f128.png)
2023-03-09 20:02:25 -05:00
water111 0db9b288e4
[merc2] Support texscroll, use in jak 1 in more places, fix envmap bug (#2303)
Three main changes:

- Adds support for the texture scrolling effect used on conveyor belts,
and turn it on for jak 2.
- Use merc instead of generic in jak 1 for ripple/water/texscroll stuff
(non-ocean water, lava, dark eco, etc). This is a pretty big speedup in
a lot of places.
- Fix a really old bug with blending mode used to draw environment maps.
The effect is that envmaps were half as bright as they should have been.

As usual, there's a flag to go back to the old behavior on jak 1. Set
these to `#t` to use generic like we used to.
```
*texscroll-force-generic*
*ripple-force-generic*
```

The format has changed, and everything must be rebuilt (C++, FR3's, GOAL
code)
2023-03-09 20:01:22 -05:00
water111 0b8b927315
[merc] support eyes through merc (#2300)
Support rendering eyes with merc for both jak 1 and jak 2.

For jak 1, everything should look the same, but merc will be used to
draw eyes. This means that jak is now fully drawn with merc!

For jak 2, eyes should draw, but there are still a few issues:
- the tbp/clut ptr trick is used a lot for these eye textures, so
there's a lot that use the wrong texture
- I had to enable a bunch more "texture uploads" (basically emulating
the ps2 texture system) in order to get the eyes to upload. It would be
much better if the eye renderer could somehow grab the texture from the
merc model info, skipping the vram addressing stuff entirely. I plan to
return to this.
- I disabled some sky draws in `sky-tng`. After turning on pris2
uploads, the sky flashed in a really annoying way.
2023-03-08 18:18:35 -05:00
OpenGOAL Bot 0424cd1f7f
CI: Periodic Controller Database Update (#2302)
Co-authored-by: OpenGOALBot <OpenGOALBot@users.noreply.github.com>
2023-03-06 16:55:37 -05:00
Tyler Wilding bc40fc5d2f
util/file: cleanup log initialization and some file-util functions (#2299)
Fixes both issues mentioned in #2297
2023-03-01 17:52:33 -05:00
water111 d6bd437ea1
[merc] support up to 64 effects (#2292) 2023-02-27 21:02:47 -05:00
water111 2c12a4e00b
[jak2] WIP minimap (#2280)
Work in progress minimap. Known issues:
- "path finding" doesn't appear to work - it gets stuck forever in many
cases
- some nasty patches around timer-based code
- jak arrow blending issues
- would be nice to make it higher resolution

if the search is forced to terminate due to iteration/time limits, the
icon is not in the right place

![image](https://user-images.githubusercontent.com/48171810/221432792-678d6124-a6a6-4875-a91f-7eceedbfec98.png)
2023-02-27 19:51:14 -05:00
ManDude 1d0a5ade8d
[jak2] minor decomp cleanup + add force actors and sprite pc hacks (#2291)
I didn't actually visually notice much of a difference with these hacks
unlike in Jak 1, but I also avoided checking the missions thoroughly
since the game crashes very often right now.
2023-02-28 00:35:57 +00:00
ManDude e1e6695e92
[jak2] merc lod hacks + region debugger + make level heap less massive (#2285) 2023-02-27 18:45:32 +00:00
OpenGOAL Bot 3c6446f641
CI: Periodic Controller Database Update (#2287)
Co-authored-by: OpenGOALBot <OpenGOALBot@users.noreply.github.com>
2023-02-27 13:08:25 -05:00
ManDude 63ff337169
[jak2] fix crash with *print-column* loading the wrong memory (#2281)
`inspect` also prints with the correct indent now as a result.
2023-02-26 21:04:05 +00:00
Matt Dallmeyer 9b80bca589
Add Speedrun Category Extensions (#2195) 2023-02-26 13:42:24 -05:00
water111 e48ae247c4
[jak2] fix palace rotation and sprite glow depth test (#2269)
- Disable depth test for sprite glow (VU1 programs only `sq.xy` and
leaves `z` alone, which has Z_MAX from the template)
- Fix tfrag/tie/shrub issues when `use-camera-other` is set.
2023-02-26 09:52:04 -05:00
ManDude 190fa4bbe8
[windows] make the games start up in the user's preferred system UI language (#2267)
Where applicable, of course.

My system language is set to English so I actually can't test this. If
anyone has their Windows language (NOT LOCALE) set to Spanish, German,
French, Italian or Japanese please test this.

Fixes #1734 

Also fixes the opengoal debugger on Windows and fixes the decomp for
`menu` which was causing some crashes related to input handling.
2023-02-26 09:46:57 -05:00
water111 41fabd43f7
[sprite glow] fix crashes (#2256)
Co-authored-by: ManDude <7569514+ManDude@users.noreply.github.com>
2023-02-25 20:21:42 -05:00
ManDude 618455500d
Fix Jak 2 scissoring (#2257)
fixes #2255 and hopefully didn't break Jak 1
2023-02-26 00:09:35 +00:00
water111 8a363c2fc9
[jak2] fix foreground light calculation (#2254)
Fixes the abrupt change in lighting when walking around here

![image](https://user-images.githubusercontent.com/48171810/221382856-17f0ec18-1ce8-40f9-b65c-a59cf2d7d93f.png)
2023-02-25 17:55:55 -05:00
water111 3f1f443d58
[jak 2] fix boot, increase level heap sizes (#2252)
Increase level heaps and borrow heaps. The level heap increase was
likely not needed, but better safe than sorry. We allocate the 128 MB
main heap anyway so there's no harm.

Also fix the crash when using `-boot`. As I thought it was just a
one-line typo in the kernel.
2023-02-25 15:20:17 -05:00
ManDude ad9a532ff9
[jak2] text aspect ratio fixes (#2251)
Fixes the aspect ratio of the font renderer (Jak 2 does not need the
same hacks as Jak 1), the custom letterbox/pillarbox sizes and fixes the
heap display.

---------

Co-authored-by: water <awaterford111445@gmail.com>
2023-02-25 19:27:58 +00:00
water111 909da024fc
[decomp] ctywide-obs (#2250)
finish this up
2023-02-25 14:00:16 -05:00
ManDude 4b8b2abbed
port pckernel to Jak 2 (#2248)
Adds the `pckernel` system to Jak 2, allowing you to do the PC-specific
things that Jak 1 lets you do like change game resolution, etc.

In other to reduce the amount of code duplication for something that
we're gonna be changing a lot over time, I split it into a few more code
files. In this new system, `pckernel-h.gc`, `pckernel-common.gc`
(previously `pckernel.gc`) and `pc-debug-common.gc` are the files that
should be shared across all games (I hacked the Jak 2 project to pull
these files from the Jak 1 folder), while `pckernel-impl.gc`,
`pckernel.gc` and `pc-debug-methods.gc` are their respective
game-specific counterparts that should be loaded after. I'm not fully
happy with this, I think it's slightly messy, but it cleanly separates
code that should be game-specific and not accidentally copied around and
code that should be the same for all games anyway.
2023-02-25 10:19:32 -05:00
water111 08ce65fd9b
[jak2] add sprite glow renderer (#2232)
Adds the "sprite glow" renderer, which is responsible for the glowing
lights.
2023-02-20 20:25:45 -05:00
OpenGOAL Bot 65f2146d73
CI: Periodic Controller Database Update (#2231)
Co-authored-by: OpenGOALBot <OpenGOALBot@users.noreply.github.com>
2023-02-20 16:39:41 -05:00
water111 b7cfd80b14
set up fog for jak 2 (#2223)
![image](https://user-images.githubusercontent.com/48171810/219878142-8ad7c154-9f52-4ad8-a315-1c932e24cd4b.png)
2023-02-18 15:45:13 -05:00
Hat Kid f452a504e6
decomp: race-* files (#2224) 2023-02-18 15:45:00 -05:00
OpenGOAL Bot 466ef6af3d
CI: Periodic Controller Database Update (#2217)
Updating Controller Database

Co-authored-by: OpenGOALBot <OpenGOALBot@users.noreply.github.com>
2023-02-18 11:01:47 -05:00
ManDude ee3bc182e1
[jak1] force credits to use audio language instead of text language (#2220) 2023-02-14 20:12:45 +00:00
water111 ed38adc2a7
[tie] support per-proto visibility flags (#2212)
Jak 2 adds a feature to disable protos in TIE. It's used to hide things
like steps for a future mission in ruins, and also to hide the static
version of the tower when it switches to the merc version for the
cutscene:


![image](https://user-images.githubusercontent.com/48171810/218270077-d8c52235-ddbf-4194-80f6-b8aa1eeeb7ec.png)
2023-02-11 12:00:05 -05:00
water111 c249dbc437
[jak2] improve loader for jak 2 levels (#2206)
Add a debug window for the loader to show levels and fix an issue with
jak 2 level unloading. I never really thought about how this works for >
2 levels, and there is a chance that you could unload the wrong level in
some cases.

The problem is some combination of merc-only levels not counting toward
the "in use" detection, and the unloader ignoring what the game wants to
load.

I don't remember why using merc models doesn't contribute to "in use"
but I'm afraid to change this for jak 1. Instead, we can have the
unloader avoid unloading levels that the game is telling us are loaded.
This is what we should have done originally, but there was a time when
Jak 1 didn't tell the loader anything, and we had this stupid detection
thing.

I think this is the first step toward just getting rid of the "in use"
detection and trusting the game for everything.
2023-02-09 20:44:33 -05:00
water111 e41ca8903e
[jak2] fix alpha test in lightning (#2204)
fixes the lightning fade out effect seen when jak touches the electric
gate.
2023-02-09 19:51:28 -05:00
Tyler Wilding a02a75525d
CI: Periodic Controller Database Update (#2202)
Co-authored-by: OpenGOALBot <OpenGOALBot@users.noreply.github.com>
2023-02-09 19:50:07 -05:00
water111 e26efcc4f3
[jak 2] add lightning renderer (#2203)
Implements the jak 2 lightning renderer as an alternate path through
Generic2. Also set up some generic stuff in the goal code.

There is a problem with the texture pool, which doesn't support the case
where two textures have the same tbp, but different cluts. So lightning
is often the wrong color (usually red).
2023-02-09 19:11:13 -05:00
Tyler Wilding 65812f722c
d/jak2: seal-at-waterslums working, and do a pass through all missions (#2199)
I did a pass through all missions, fixing issues as they came up. Also
got `seal-at-waterslums` working -- the best mission in the game 🥳

Co-authored-by: water <awaterford111445@gmail.com>
2023-02-09 18:40:01 -05:00
Luminar Light 89feb5d0f1
Create Hungarian translation of game text for Jak 1 (#2141)
This will probably take a while, since we also have to translate all the
text of the base game - Naughty Dog never translated this game to
Hungarian. This PR will stay a draft until it is complete.

We realized that every letter in our alphabet was already working, apart
from two: Ő and Ű (they are unique sounds, so leaving their marks
wouldn't be okay).
Since I did not find that double accent thing in the jak font, I decided
to use ~ (see my change in FontUtils.cpp). It is good enough, and my
memory tells me that I already saw this exact same "solution"
(workaround) somewhere in the past. If anyone knows a better solution,
please let us know.

We chose ID 14 for the Hungarian language, as it was the lowest free ID.

**Progress tracker**
A tick here means that everything was translated. It does not mean that
everything is perfect yet. We will review everything multiple times, to
have the best translations possible.

Game text:
- [x] base game text
- [x] pc port text
- [ ] credits text ?

[Sziloyoo](https://github.com/Sziloyoo) helped with reviewing my
changes, and gave advice/suggestions for some complicated translations.

Subtitles will be done in the future, not in this PR.
2023-02-04 20:01:22 -05:00
Tyler Wilding b72383964f
d/jak2: cleaning up the remainder of unblocked / unclaimed files (#2171)
Co-authored-by: water <awaterford111445@gmail.com>
2023-01-31 18:32:50 -05:00
water111 71cb1aef6f
[merc2] support vertex updates, use this for blerc in jak 1 and jak 2 (#2179)
This PR adds a feature to merc2 to update vertices. This will be needed
to efficient do effects like blerc/ripple/texture scroll. It's enabled
for blerc in jak 1 and jak 2, but with a few disclaimers:
- currently we still use the mips2c blerc implementation, which is slow
and has some "jittering" because of integer precision. When porting to
PC, there was an additional synchronization problem because blerc
overwrites the merc data as its being read by the renderers. I _think_
this wasn't an issue on PS2 because the blerc dma is higher priority
than the VIF1 DMA, but I'm not certain. Either way, I had to add a mutex
for this on PC to avoid very slight flickering/gaps. This isn't ideal
for performance, but still beats generic by a significant amount in
every place I tested. If you see merc taking 2ms to draw, it is likely
because it is stuck waiting on blerc to finish. This will go away once
blerc itself is ported to C++.
- in jak 1, we end up using generic in some cases where we could use
merc. In particular maia in village3 hut. This will be fixed later once
we can use merc in more places. I don't want to mess with the
merc/generic selection logic when we're hopefully going to get rid of it
soon.
- There is no support for ripple or texture scroll. These use generic on
jak 1, and remain broken on jak 2.
- Like with `emerc`, jak 1 has a toggle to go back to the old behavior
`*blerc-hack*`.
- In most cases, toggling this causes no visual differences. One
exception is Gol's teeth. I believe this is caused by texture coordinate
rounding issues, where generic has an additional float -> int -> float
compared to PC merc. It is very hard to notice so I'm not going to worry
about it.
2023-01-31 18:23:39 -05:00
Tyler Wilding 22bae7fbe0
g/jak2: Add missing DGO files to game.gp lost in the shuffle (#2178)
When I cleaned up the `game.gp` some DGOs were no longer referenced
because my first dependency script omitted them -- thinking they weren't
required. From the perspective of the source files they indeed weren't
required but we still have to produce the DGO file.

also works around #2177
2023-01-30 20:45:45 -05:00
Matt Dallmeyer 2645fed47a
Jak 1 Checkpoint Select / IL Speedrun support (#2162) 2023-01-30 19:11:57 -05:00
Tyler Wilding 18507bc78e
d/jak2: get portrun working and decompile a bunch of miscellaneous files (#2169) 2023-01-28 19:36:57 -05:00
Hat Kid be035181f0
decomp: squid-* files (#2170)
Co-authored-by: Tyler Wilding <xtvaser@gmail.com>
2023-01-28 18:44:10 -05:00
Hat Kid 8b21a55906
decomp: blerc, ripple, under-* files (#2163)
Co-authored-by: Tyler Wilding <xtvaser@gmail.com>
2023-01-28 16:02:58 -05:00
ZedB0T 3b1e99cd3f
Hook Jak 1 into ImGUI actor filter (#2157) 2023-01-28 14:17:43 -05:00
ManDude 213f3bad20
Add extended environment mapping option to progress and enable it by default + other bug fixes (#2161)
![image](https://user-images.githubusercontent.com/7569514/214192592-d584e955-9d54-4092-94ee-1cbe12b071e8.png)

Note: if you had the option disabled, it will be enabled when you first
start the game again. You will have to turn it off again if you want it
disabled.

Also fixes #2150 and fixes #1738 and fixes #2145
2023-01-24 20:22:47 +00:00
ManDude fdcd67b095
Fix F2 screenshots (#2160)
Fixes #2155
2023-01-24 00:38:21 +00:00
water111 0fcc7eb8e9
[merc2] Support emerc (#2147)
This adds environment mapping support to `Merc2`, and turns it on for
Jak 1 and Jak 2.

- The performance is much better
- Jak 1 can be toggled back to the old behavior with `(set! *emerc-hack*
#f)`. The new environment mapping is identical to the old one everywhere
I checked.
- Jak 1 still falls back to generic for ripple/texscroll/blerc/eyes -
there's still no dynamic texture or vertex updating support. The eye
detection stuff will sometimes flag stuff as eyes which is not eyes,
which is fine, but means that generic will be used in some places where
emerc could be used. For example, the shiny plates on jak's arm will be
drawn with generic because jak has eyes.
- Jak 2 hasn't been checked super carefully against PCSX2 yet.
- Jak 2 still isn't technically using emerc, but instead putting emerc
models in the merc bucket.
- The interface to merc is a lot different now and totally custom
OpenGOAL DMA code. The original merc drawing asm doesn't run anymore.
- The FR3 format changed
- Something funky going on with foreground lighting in escape, but
doesn't seem to be related to this change?

Performance comparison, jak 1, in likely the most generic-merc heavy
spot:

![image](https://user-images.githubusercontent.com/48171810/213882718-feb2ab59-95a9-44a2-b0e5-95fba860c7b0.png)

![image](https://user-images.githubusercontent.com/48171810/213882736-8dbbf4c9-6bbf-4d0b-96ce-78d63274660c.png)
2023-01-22 18:30:31 -05:00
Hat Kid 3d08d079c9
jak2: ocean renderer (#2142)
Initial implementation of the `ocean-mid`, `ocean-far` and `ocean-near`
renderers for Jak 2.

There's still a few things to sort out, mainly:

- [x] ~Backwards compatibility with Jak 1. The only thing that currently
stands in the way of that is figuring out a clean way to "un-hardcode"
the texture base pointer in C++ without creating a completely separate
`OceanTexture` class for Jak 2. One thing I thought of would be
modifying `BucketRenderer`'s virtual `init_textures` method to also pass
the `GameVersion`, but I'm not sure if there's a better way.~
- [x] ~The sudden transition from `ocean-near` to `ocean-mid`. Not sure
why it's happening or how to fix it.~
- [x] The ocean has two new methods in Jak 2, `ocean::89` and
`ocean::79`, one of which seems to be related to time of day sky colors.
~Even without them implemented, the end result looks quite close, so we
may be able to skip them?~ `ocean::89` generates `ocean-mid` envmap
textures, so it will likely be required, but will not be handled right
now.

Reverted the VU prologue removals because it made the tests fail.
2023-01-22 18:07:46 -05:00
Tyler Wilding 2ba07eb058
d/jak2: finish consite-obs and get almost all side-missions working (#2143)
Some side missions require cars, they don't work yet. Also the
ring-races and collection ones do not grant orbs. The hoaming beacon
collection one causes a `hud` crash
2023-01-22 09:31:39 -05:00
water111 7d7625f4f8
[jak2] workaround for cutscene playing (#2131) 2023-01-16 13:37:29 -05:00
water111 a0d2bce27b
Minor bug fixes (#2128)
- make sure bsp is processed on `l` levels in extraction (caused missing
remaps)
- clean up a few prints in extraction
- handle the <15 byte differences in art group files automatically (no
more errors about file naming)
- fix potential exception thrown by merc2 in a few ways: fixed bad data
in FR3's, check texture index just in case, and handle exceptions a
little bit better (still a crash, but at least you get a print)
- fix mips2 ocean stuff causing ocean far crashes
2023-01-14 16:26:17 -05:00
Hat Kid 459d83f755
decomp: tomb-* files, target-indax, grunt-mech, breakable-wall, pillar-collapse, mechtest-obs, ruins-obs (#2114)
Manual patches in:

- `tomb-boulder`: a few `ppointer->handle`s (I think) were not being
decompiled properly (all used in combination with `clone-anim-once`)
- `ruins-obs`, `pillar-collapse`: `art-joint-anim` casts
- `tomb-beetle`: commented out a call to `shadow-control-method-14` that
was crashing the game when spawning the beetles
- `grunt-mech`: commented out `(.mula.s)` instruction

Notes:
- `enemy-info`'s `idle-anim-script` is most likely a `(pointer
idle-control-frame)`, however, some `nav-enemy-info` labels set it to
`#f` (first encountered in `tomb-beetle`, but also present in `hal`,
`roboguard` and `metalkor-setup`), which crashes the decompiler. This
may become a problem in the future when we eventually get to these
files. For this PR, I made `tomb-beetle` decompile with
`idle-anim-script` set to `#f` and have not noticed any issues/crashes
with that.
- `tomb-boulder` compiles and doesn't crash, but when trying to play the
Daxter chase sequence, the boulder sometimes either spawns at the origin
or spawns in the correct place, but doesn't move.

Co-authored-by: water <awaterford111445@gmail.com>
2023-01-14 13:53:31 -05:00
Tyler Wilding b072126764
d/jak2: some minor fixes and workarounds to make debugging easier (#2116)
- worked around audio code for gungame, the tutorials now function
- auto-exit cutscenes upon entry. This doesn't always work nicely (i
didnt want to cause any side-effects due to messing with load states)
but it atleast stops jak from being stuck forever waiting for the
cutscene to load
2023-01-14 12:36:41 -05:00
Tyler Wilding d6f9af7a20
d/jak2: finish strip mine files (#2111)
The level crashes similarly to drill-platform though, unclear what is
the root cause of it.

Co-authored-by: water <awaterford111445@gmail.com>
2023-01-14 11:30:58 -05:00
water111 d65a1c365a
some bug fixes (#2125) 2023-01-14 11:04:15 -05:00
water111 bd209bf460
More vmodes (#2120) 2023-01-11 20:44:45 -05:00
animalstyletaco fd5191bb9a
Fixed bug where mouse position offset(s) would always return a 0 (#2109)
Co-authored-by: animalstyletaco <animalstyletaco95@gmail.com>
2023-01-11 19:21:07 -05:00
Tyler Wilding e0d31a33bd
d/jak2 - initial crimson-guard-level decomp and also the dig missions (#2092)
Finishes a bunch of files related to crimson guards / early missions:
- `crimson-guard-level`
- `dig-digger`
- `fordumpa-obs`
- `fort-robotank`
- `fort-robotank-turret`
- `fort-turret`
- `transport-level`
- `fordumpb-obs`
- `fort-floor-spike`
- `fordumpc-obs`
2023-01-11 19:07:35 -05:00
Ziemas 416950a166
Fix sound bank allocation (#2107)
And correctly initialize the volume group for sfx
2023-01-08 11:23:59 -05:00
Hat Kid bdee98323d
decomp: add a bunch of enemy files (#2101)
Adds the following files:

- `amphibian`
- `centurion`
- `ginsu`
- `grenadier`
- `hopper`
- `metalmonk`
- `monster-frog`
- `predator-graph`
- `predator-h`
- `predator`
- `rapid-gunner`
- `rhino`
- `rhino-wall`
- `tomb-baby-spider`

Also adds the DGOs for the following levels:

- Mar's Tomb
- Mountain Temple
- Drill Platform
- Sacred Site (Sage Hut)

Manual patches:

- The decompiler emits `(b! #t cfg-17)` in `(trans hostile hopper)`
without putting a `(label cfg-17)` anywhere
- Added cast to `art-joint-anim` in `(code broken rhino-wall)` and
`(code hit rhino-wall)`

Other notes:

- `amphibian` seems to occasionally crash when using its tongue attack.
Haven't investigated this yet
- `ginsu` crashes after being killed somewhere in the `deactivate`
method, possibly because of its `part-spawner`
- Predators aren't spawning in the forest hunt mission, not sure if
`forest-obs` might be needed for that or if it's something else
- The `rhino-wall` STR animation seems to load (albeit a bit broken due
to missing VAG stream playback), but causes the viewport to shrink as
soon as it's played
- I added `pegasus::74` to the `event_handler_hack` bool in
`variable_naming.cpp` because I got a `none` cast after changing the
return value of `enemy::74`
2023-01-07 17:14:12 -05:00
Tyler Wilding 00ac12094e
goalc/repl: cleanup of goalc/REPL code and some QoL improvements (#2104)
- lets you split up your `startup.gc` file into two sections
  - one that runs on initial startup / reloads
  - the other that runs when you listen to a target
- allows for customization of the keybinds added a month or so ago
- removes a useless flag (--startup-cmd) and marks others for
deprecation.
- added another help prompt that lists all the keybinds and what they do

Co-authored-by: water <awaterford111445@gmail.com>
2023-01-07 11:24:02 -05:00
Tyler Wilding 2f4146d469
tests: make the offline tests aware of the current terminals row count (#2105)
This fixes the hideous output when your terminal would be too small to
hold all the threads.
2023-01-07 10:35:12 -05:00
Tyler Wilding f699675ede
g/jak2: initial Discord RPC implementation (#2100)
Notable things:
- This assert is hit when trying to save the pc-settings file, NYI
e630b50690/game/kernel/common/Symbol4.h (L14)
so right now settings aren't persisted. But RPC defaults to on
- The existing functions can probably be made generic based off the game
version, but I didn't spend time refactoring them yet as they aren't
really ready to be used in jak 2 yet (we have no screenshots for the
levels for example)
2023-01-07 10:34:01 -05:00
Tyler Wilding 5095b867b0
d/jak2: finish jetboard training mission (mostly) and scouts mission (#2090)
The things that aren't working right now:
- returning the board (maybe cutscene related?)
  - draft until i see if this can be sorted out
- seems to need streaming audio as well, the `scene-player` gets
properly initialized from what i can tell
- had to hack around the streaming audio parts.
2023-01-04 20:43:34 -05:00
Ziemas dfcd203aad
Overlord: Jak2 stream loading (#2096)
Untested lazy copy-paste job from jak1

Pretty confident it's the same logic with a new StrFileHeader struct.
2023-01-04 18:29:50 -05:00
Ziemas f0ca0cbe6a
Overlord: mirror sound RPC command (#2094)
And replace the previous mechanism for mirroring the sound.
2023-01-04 18:22:18 -05:00
water111 77a3e4125c
[jak2] don't ignore disable-draw bits (#2089)
Same idea as what I did for jak 1, but now there's a mask that can be
set by the user. It's used on the gun course dummies, for example.
2023-01-02 13:09:30 -05:00
water111 20a6839e07
[jak2] fix hud and some particles (#2088)
Fixes:
- a very old bug in depth in DirectRenderer, probably from the original
tfrag stuff. Looked at PCSX2 source code to see how 32/24 bit depths are
handled. This fixes hud sprites being drawn behind level geometry.
- saturate `vftoi4` like the ps2 does when the float is too large,
fixing hidden text in `hud`. For now it's only using this in the font
code because this saturation is actually kinda slow and hasn't been a
problem in other places.
- fix crazy particle spawning issue with blue gun and dripping stuff.
This would happen if particles kill themselves while being processed
(through a callback)
2023-01-02 12:13:19 -05:00
water111 0e43c96e52
[decomp] hud, hud-classes, add some new basic alignment options, fix type bug (#2084) 2023-01-02 10:05:22 -05:00
Tyler Wilding 9f53edae7a
game/debugging: Add a new imgui menu to filter debug text and adjust imgui config settings (#2085)
This adds a new ImGUI menu to help filter out the clutter on screen.


https://user-images.githubusercontent.com/13153231/210192912-b1c28319-bacb-449c-ad7f-e7308fb75f50.mp4

This also:
- moves the imgui display bool into a game specific config file (you can
hide it in jak1, and not in jak2)
- the config file also persists the settings from this menu (except the
filters for now, future TODO)
- there is a new `ignore_imgui_hide_keybind` in this file to ignore
hiding it when you press Alt
2023-01-02 09:45:38 -05:00
Ziemas bb94c84d4b
Ame fixes (#2087) 2023-01-02 09:40:30 -05:00
Tyler Wilding 284fb09997
d/jak2: decompile fodder and nav-enemy (#2080)
fixes #1983 

First functioning enemy!


https://user-images.githubusercontent.com/13153231/210184845-f1d93491-11f5-4a64-b69c-41e535992ebc.mp4
2023-01-01 21:03:07 -05:00
Ziemas a77d9fac01
Sound fixes (#2083) 2023-01-01 21:02:38 -05:00
Tyler Wilding 73d38bd9ff
game/debugger: handle uncaught loader thread exceptions and better handle that situation on the windows debugger (#2075) 2023-01-01 12:31:12 -05:00
water111 0cddf6b6a5
W/nav debugging (#2077)
Co-authored-by: Tyler Wilding <xtvaser@gmail.com>
2023-01-01 12:11:18 -05:00
Ziemas 749611d47c
Prevent putting nullptr into child sound list (#2072)
CreateChildSound did not check for nullptr return from
soundbank::make_handler, which would happen for sounds with no grains.

Prevent further problems with this by switching to optional instead of
passing nullptr.
2022-12-30 23:15:43 -05:00
water111 e49e6548e0
[jak2] split up big dgos, some minor cleanup (#2066)
- Split up DGOs between threads in the multithreaded offline test
- fix some random warnings
- make the sig paths decompile a bit nicer to make some files smaller
2022-12-30 13:33:29 -05:00
Tyler Wilding 216e73b61f
CI: Add a macOS Github runner (#2064) 2022-12-22 18:12:59 -05:00
water111 73561f10a3
support c++ tools on macos (#2063)
Running reference tests/decompiler should now be possible on macos
(arm). Most of the changes were just cleaning up places where we were
sloppy with ifdefs, but there were two interesting ones:
- `Printer.cpp` was updated to not use a recursive function for printing
lists, to avoid stack overflow
- I replaced xxhash with another version of the same library that
supports arm (the one that comes in zstd). The interface is C instead of
C++ but it's not bad to use. I confirmed that the extractor succeeds on
jak 1 iso so it looks like this gives us the same results as the old
library.
2022-12-22 17:12:05 -05:00
Ziemas 4edec2730f
Fix EarTrans assignment (#2057)
and some slight cleaning
2022-12-22 13:58:37 -05:00
Tyler Wilding 9c631e11fe
offline-test: Partition by DGO and colorize/condense output (#2045)
This solves two main problems:
- the looming threat of running out of memory since every thread would
consume duplicate (and probably not needed) resources
- though I will point out, jak 2's offline tests seem to hardly use any
memory even with 400+ files, duplicated across many threads. Where as
jak 1 does indeed use tons more memory. So I think there is something
going on besides just the source files
- condense the output so it's much easier to see what is happening / how
close the test is to completing.
- one annoying thing about the multiple thread change was errors were
typically buried far in the middle of the output, this fixes that
- refactors the offline test code in general to be a lot more modular

The pretty printing is not enabled by default, run with `-p` or
`--pretty-print` if you want to use it


https://user-images.githubusercontent.com/13153231/205513212-a65c20d4-ce36-44f6-826a-cd475505dbf9.mp4
2022-12-22 13:41:33 -05:00
Ziemas 2bf663dccf
Assorted sound fixes (#2049)
fixes https://github.com/open-goal/jak-project/issues/2046
2022-12-05 23:43:14 -05:00