Commit graph

1313 commits

Author SHA1 Message Date
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 6285c61662
decompiler: fix for v5 art group info dump, update taskfile for jak 3 (#3077) 2023-10-11 10:17:46 +02:00
Hat Kid 5a6aab4fab
jak3: add goal_src skeleton (#3069) 2023-10-10 15:41:05 +02:00
ManDude 27980218aa
[jak2] fix minor original game visual bugs (#3072)
Fixes #2994 the underport and consite icons being green (same color as
the goal, likely copy-pasta).

Fixes the hundredths timer in the race timer actually being a 60ths
timer.
2023-10-09 22:39:35 +01:00
Hat Kid bf961a36f4
decompiler: some hacks to allow running decompiler on jak 3 v5 code files, improve all-types generation (#2526)
Co-authored-by: water <awaterford111445@gmail.com>
2023-10-07 22:14:12 +02:00
water111 395c98db19
[goalc] Cleaned up speedups (#3066)
Started at 349,880,038 allocations and 42s

- Switched to making `Symbol` in GOOS be a "fixed type", just a wrapper
around a `const char*` pointing to the string in the symbol table. This
is a step toward making a lot of things better, but by itself not a huge
improvement. Some things may be worse due to more temp `std::string`
allocations, but one day all these can be removed. On linux it saved
allocations (347,685,429), and saved a second or two (41 s).
- cache `#t` and `#f` in interpreter, better lookup for special
forms/builtins (hashtable of pointers instead of strings, vector for the
small special form list). Dropped time to 38s.
- special-case in quasiquote when splicing is the last thing in a list.
Allocation dropped to 340,603,082
- custom hash table for environment lookups (lexical vars). Dropped to
36s and 314,637,194
- less allocation in `read_list` 311,613,616. Time about the same.
- `let` and `let*` in Interpreter.cpp 191,988,083, time down to 28s.
2023-10-07 10:48:17 -04:00
Hat Kid 3c27b3942b
decompiler: better automatic detection of art groups and joint-node-index macro detection (#3061) 2023-10-06 16:42:16 +02:00
ManDude 1338fed9c9
fix eco pickup time bug (#3056) 2023-10-02 01:22:05 +01:00
Tyler Wilding 42e3b7f89c
g/j2: don't force auto-save on in jak 2 when starting a speedrun (#3048) 2023-09-30 23:40:00 -04:00
ManDude dfeb88b35d
[jak2] fully implement *user* (#3046)
Fixes #1918
2023-10-01 04:28:30 +01:00
Matt Dallmeyer d149838485
fix draw-string-xy-scaled cropping (#3041)
fixes #3038 


https://github.com/open-goal/jak-project/assets/2515356/5b7a490f-e1fb-4a12-a3d9-b576a2c1d574
2023-10-01 00:17:50 +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
ManDude a662150327
[decompiler] do not use time-elapsed? on unsigned comps (#3031) 2023-09-26 18:48:13 +01:00
Hat Kid fc43870d85
decompiler: obj -> this, set-time! and time-elapsed? macros (#3026)
This renames the method object in `defmethod`s to `this` and adds
detection for the `set-time!` and `time-elapsed?` macros.

Definitely my biggest PR yet...
2023-09-26 15:17:00 +01:00
ManDude 1ff55d5015
fix (font-flags left) name + fix right flag not reflecting in debug text box (#3020)
Fixes #3016 
Fixes #3017
2023-09-24 03:00:09 +01:00
Tyler Wilding 10910400fa
g/j2: Fill out game options menu (#3003) 2023-09-23 15:08:13 -04:00
ManDude 4871f5dfc7
[jak2] also allow analog for play select fast scroll (#3015) 2023-09-23 16:46:21 +01:00
Tyler Wilding 2e43e18e1d
g/j2: speed up level-select menu scrolling (#3013) 2023-09-23 09:54:18 -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
ManDude 61c4fc4b91
[jak2] fully implement collide mesh renderer (#3010)
Fixes #2983
2023-09-22 15:50:16 +01:00
ManDude fe491c2b5e
[opengoal] make none a child of object (#3001)
Previously, `object` and `none` were both top-level types. This made
decompilation rather messy as they have no LCA and resulted in a lot of
variables coming out as type `none` which is very very wrong and
additionally there were plenty of casts to `object`. This changes it so
`none` becomes a child of `object` (it is still represented by
`NullType` which remains unusable in compilation).

This change makes `object` the sole top-level type, and the type that
can represent *any* GOAL object. I believe this matches the original
GOAL built-in type structure. A function that has a return type of
`object` can now return an integer or a `none` at the same time.
However, keep in mind that the return value of `(none)` is still
undefined, just as before. This also makes a cast to `object`
meaningless in 90% of the situations it showed up in (as every single
thing is already an `object`) and the decompiler will no longer emit
them. Casts to `none` are also reduced. Yay!

Additionally, state handlers also don't get the final `(none)` printed
out anymore. The return type of a state handler is completely
meaningless outside the event handler (which is return type `object`
anyway) so there are no limitations on what the last form needs to be. I
did this instead of making them return `object` to trick the decompiler
into not trying to output a variable to be used as a return value
(internally, in the decompiler they still have return type `none`, but
they have `object` elsewhere).

Fixes #1703 
Fixes #830 
Fixes #928
2023-09-22 10:54:49 +01:00
Hat Kid 697b07abd5
decomp: fix some enemy decomp (#3008) 2023-09-20 11:46:48 +02:00
Hat Kid cbbbd661d9
[jak2] ckernel: implement loado and load_and_link (#3005) 2023-09-18 12:21:18 +02:00
Hat Kid 36213aaedb
jak2: fix metalkor regression (#2999) 2023-09-17 07:57:25 +02:00
Tyler Wilding d701a54c43
g/j2: Implement speedrunner mode in jak 2 (#2976) 2023-09-16 23:23:29 -04:00
Hat Kid d784561d43
gsrc: add more og:preserve-this comments (#2996) 2023-09-16 13:39:51 +02:00
ManDude 6352ef2a4d
[jak2] fix task-arrow-spawn decomp (#2995) 2023-09-15 23:09:38 +01:00
ManDude 87be9ebd14
[decompiler] decomp jak2 static-attack-info (#2992)
Fixes #2993
2023-09-15 19:32:57 +01:00
Tyler Wilding 3252136c1f
CI: check for removed goal_src code that we want or need to perserve (#2987) 2023-09-14 01:31:08 -04:00
rafalekkB ed6782d11b
Polish translation for Jak 1 (#2961) 2023-09-11 22:05:42 -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
Tyler Wilding 1bd30bce84
g/j2: revert signature changes to cam-setting-data, fix camera regressions (#2975)
Co-authored-by: Hat Kid <6624576+Hat-Kid@users.noreply.github.com>
2023-09-10 16:15:22 -04:00
Hat Kid 49e798f88c
jak2: macro detection for launch-particles and seconds-per-frame, add og:preserve-this comments for manual patches (#2974)
This PR adds detection of the `launch-particles` and `seconds-per-frame`
macros to the decompiler, removing a lot of bloat and hiding many
process register uses.

I also added `og:preserve-this` comments to as many manual patches and
comments as I could, which will soon be used in conjunction with CI to
hopefully catch any regressions in future big decomp update PRs.

I have some concerns about the `launch-particles` macro (more details in
`sparticle-launcher.gc`) , but thus far, I have not seen anything break
yet.

---------

Co-authored-by: water <awaterford111445@gmail.com>
2023-09-10 11:48:56 -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
water111 6d46a22d21
[jak2] Fix hover-formation decomp (#2971)
I think this is very likely to fix
https://github.com/open-goal/jak-project/issues/2970

We had somebody report a stacktrace from the debugger, and it was
immediately after calling `gen-perms`.
I found that `gen-perms` writes past the end of a stack array during
this mission, and at the same time as the reported freezes.

I was unable to recreate the original freeze after making this change.
2023-09-09 11:18:21 -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
Luminar Light 2d8b65accf
entity-debug: Show path and volume data. (#2942) 2023-09-08 20:44:58 -04:00
ManDude 46bdd109dd
rewrite sp-get-particle and fix some jak 2 region decomp (#2955) 2023-09-03 22:25:59 +01:00
water111 5a80be213c
[sprite] Adjust allocation randomization (#2953)
This tries to match the original behavior of the sprite allocation
"randomness", which should reduce the number of very empty sprite blocks
sent to C++.
2023-09-02 09:39:19 -04: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 d96dce2714
[jak2] fix bug in outro-port script (#2952) 2023-09-01 17:10:59 +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
ManDude de086ff64b
[jak2] fix bugs with incorrect music playing sometimes (#2938)
- fixes flava and mode not being correct after a new music starts
playback by setting them every frame (there is at most 1 frame where
it's wrong).
- fixes city pursuit theme not playing if the city alarm was triggered
while the music wasn't playing yet.
2023-08-28 00:23:17 +01:00
ManDude 329f13b610
[jak2] minimap improvements (#2929)
Smoothens minimap icon motion and fixes the target icon being squished
depending on the angle it's facing.
2023-08-22 18:14:03 +01:00
ManDude 04269ffa86
[jak2] fill in a lot of flags for decomp + mouse macros (#2927)
Also changed the default type of enums to `int64` (same as `int`).
2023-08-22 16:39:52 +01: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 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
Tyler Wilding 66e48195cb
jak1: Consolidate art-elts into a single file as is done in jak 2 (#2887)
Fixes #2167

Reduces test flakiness if ran on multiple threads and gets rid of a few
hundred files from the source tree

I believe this also makes #1434 irrelevant and it can be closed.

---------

Co-authored-by: ManDude <7569514+ManDude@users.noreply.github.com>
2023-08-18 11:07:24 -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
ManDude d6e08df094
[jak2] widescreen fix for splash/jp subtitles (#2916) 2023-08-18 03:25:21 +01: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
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 bf7a2161b3
[jak2] fix bad blerc on objects with warp (#2907)
fixes the weird mirror offset stuff

![image](https://github.com/open-goal/jak-project/assets/48171810/9a36c0bd-7350-46d7-b14f-d2f876582b03)
2023-08-15 22:10:33 -04: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
water111 7abfeb4aa7
[jak1] Fix texture-related custom level crash (#2898)
Force FR3 file name for custom levels to be uppercase, fixes the crash
described in
https://github.com/open-goal/jak-project/issues/2534
and 
https://github.com/open-goal/jak-project/issues/2897
2023-08-13 15:22:40 -04:00
ManDude 39d989cfcc
[jak2] prepare scf-get-territory usage (#2890) 2023-08-08 17:21:29 +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
Tyler Wilding bb8b39a5e8
jak1: start a new game correctly when speedrunner mode is enabled (#2873) 2023-08-02 19:44:54 -04:00
Brent Hickey b88552a35d
Basic hash table and jump table (#1837)
Co-authored-by: Tyler Wilding <xtvaser@gmail.com>
2023-08-01 17:09:14 -04:00
Luminar Light a8ae15139b
Anim Tester X - Quality of Life improvements (#2682)
Co-authored-by: Tyler Wilding <xTVaser@users.noreply.github.com>
Co-authored-by: ManDude <7569514+ManDude@users.noreply.github.com>
2023-08-01 17:06:20 -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 a48df0683f
[jak2] fix compile error (#2862)
not sure how this passed tests....
2023-07-29 17:41:11 -04:00
water111 89e52e3114
[jak2] Fix ocean culling when using camera-other (#2858)
When drawing the spinning palace, there's a terrible hack that lets some
stuff be drawn with different camera matrices.

The ocean is drawn with camera-other (which spins), but was being culled
with camera (doesn't spin). This changes ocean to use the right camera
matrix.

Note that the ocean is special when it comes to camera-other - it always
uses camera-other if there is one. Other uses are set per-level and
should already be handled correctly.
2023-07-29 17:02:57 -04:00
ManDude 6161acdf83
force-actors? -> ps2-actor-vis? (#2852)
supersedes #2839
2023-07-29 18:30:37 +01: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 748a9f3b41
[jak1] Fix ice walking animation bug and crash (#2851)
This should fix a crash and animation bug in snowy. The way to trigger
the bug:
- go on ice
- move forward slowly
- stop moving forward. Reach zero speed when the frame number isn't
between 30 and 35 of the ice walking animation
- Due to this bug, the animation gets stuck at frame 60
- Take damage (due to normal lurker or ice lurker)
- Sidekick eye animation crashes because a frame number is NaN.
2023-07-29 12:20:09 -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
ManDude 05b7b571c8
[jak2] make progress menu work for widescreen + various other fixes (#2843)
Lots of manual fixes to make the text and other UI elements in the
progress fit within the small 4x3 view.


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

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

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

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

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

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

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

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

I've also changed the select start menus to not have that giant space in
each option. It's behind a toggle in the code right now.

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

Additionally:
- fixed city billboard particles
- fix stadium crash from original game
- fix an accidental regression
2023-07-26 17:20:22 +01: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 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
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 e546fce370
improve send-event for jak 2 (#2828)
Fixes #2825
2023-07-14 18:01:09 -04:00
ManDude 33858cbae6
increase max minimap icons 64 -> 256 (#2826)
Some missions add way too many icons so the limit is reached. It seems
safe to increase by a large amount.

Fixes #2779
2023-07-11 22:14:42 +01: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
Hat Kid c9330a6951
jak2: fix race crash (#2816) 2023-07-08 10:55:43 +02:00
ManDude da3caf7b28
[decompiler] fix in-place ops not getting detected sometimes (#2810) 2023-07-08 07:34:38 +01:00
ManDude 31cc69d7f6
fix some rare enum detection bugs (#2808) 2023-07-06 18:32:42 +01:00
ManDude ebd8643d28
rework jak 2 goal file structure (#2806)
Changes the DGO build order so that the city gets compiled first, and a
random guess at an "order" of which levels people might edit more often.
Most of the data-only borrow files are moved to the end as well.

Also moves around files in the `goal_src` tree to a structure that makes
a bit more sense, some files were either in the completely wrong place,
their folders had strange names, were too deep for no reason or were
just too far away from other relevant files. This structure should make
it easier to guess a file's location.
2023-07-06 15:23:25 +01:00
Hat Kid d24fb965d4
repl: separate history by game version (#2805) 2023-07-05 20:15:46 +02:00
water111 8806a0006e
[jak1] Merc for title - fixes blerc (#2801)
Removes a leftover case for falling to back to generic-merc in jak 1.
This should fix the bug where daxter's face wasn't animated in the intro
after floating-point blerc was added.
2023-07-04 19:28:40 -04:00
water111 6c77f51653
[jak2] add some missing lambdas (#2799)
Should fix the eye problem in
https://github.com/open-goal/jak-project/issues/2797
2023-07-04 18:19:51 -04:00
ManDude b50b9eadb2
[decompiler] new features + fixes, + other jak2 fixes (#2796)
Fixes empty boxed arrays of strings breaking some decomp
(`ctywide-speech` and `race-info`).

Adds `decomp-as` tag to decompiler types so that the static data
decompiler can use macros like `meters` and `seconds` on fields that
aren't of type `meters` or `time-frame`.

Adds `override` tag to decompiler types which overrides the type of
field with that name. The type must be a child type of the original
field's type (or the same type, but why would you do this?).

Fixes the camera being offset for `drillmtn` after loading `palout`
once.

This is a huge refactor sadly.
2023-07-04 17:23:24 -04:00
ManDude 5f8c21b1de
fix vag player not really working (#2788)
There was a regression recently that caused this.
2023-06-30 21:01:47 +01:00
ManDude f25f26362d
faster progress toggle (off by default) (#2785)
I set it to 150% speed, going much higher made it feel very strange.
2023-06-30 06:34:29 +01:00
Tyler Wilding bafa8f6b34
New Crowdin updates (#2786) 2023-06-30 00:00:37 -04:00
ManDude 4643129948
fix stadium particles + save game after winning a race (#2783) 2023-06-28 20:14:24 +01:00
ManDude b3e3f9379e
fix some jak 1 hint subtitles not showing up (#2782)
There is one instance of the same hint being played for different IDs
which was breaking things.
2023-06-28 14:13:47 +01:00
ManDude 1351cb6c9c
fix more orb softlocks i forgot (#2781)
I forgot these.
2023-06-28 04:08:38 +01:00
Hat Kid 76aaa2fb10
jak2: add .gd files and level info for some ps3 test levels (#2776) 2023-06-27 23:52:19 +02:00
ManDude f8d4489361
fix more orb softlocks (#2767)
Fixes orb softlocks during races and other side missions.

The side mission tasks will now not count as completed until the
precursor orb has been picked up.

Races will not let you advance (or even pause the game) until the
precursor orb has been picked up.
2023-06-27 22:02:21 +01:00
Tyler Wilding 10934f6746
d/j2: Some work on the SQL editors (#2771) 2023-06-25 16:51:46 -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
ManDude 97fd6a6e8d
fix subtitle mispositioning when unpausing and other situations (#2769) 2023-06-24 05:47:24 +01:00
Tyler Wilding 679986e79f
sdl: safer code to resolve intermittent controller crashes related to disconnections (#2755) 2023-06-23 15:35:32 -04:00
ManDude d3e7a48639
jak2: fix rigid-body-object-event-handler type (#2761)
Fixes #2760
2023-06-21 02:06:28 +01:00
ManDude b350525294
increase airlock open and post-close speed (#2758)
open: 150% -> 175%
post-close: 100% -> 175%
2023-06-20 19:31:20 +01:00
ManDude 15ef95e036
fix orb in sewers being unobtainable after starting sewer escort (+ some more type fixes) (#2757)
Total hack but it does seem to work correctly.

Fixes #2756
2023-06-20 04:25:03 +01:00
ManDude 53050fabc1
[jak2] allow going to metal head nest after winning game (#2753)
This is a major deviation from the original game, which did not have any
way to access the nest after beating Metal Kor as the air train gets
hidden when he is beaten. This was mostly annoying because there are
precursor orbs in that level that you might miss.

This makes it so the air train can once again be used to enter the nest
even after beating Metal Kor. The rest of the level remains mostly the
same, except the Rift Ring does not spawn and an invisible wall is added
to the Metal Kor arena to prevent you from entering it as you are
normally unable to leave it anyway.
2023-06-19 19:58:01 +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
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
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
Matt Dallmeyer 2624934e72
Camera debug menu - reuse enum instead of strange indexing/magic numbers (#2717) 2023-06-15 20:28:54 +01:00
Matt Dallmeyer ccaa1f41e5
Rename collide-action enum values for readability (#2712)
```lisp
(defenum collide-action
  :type uint32
  :bitfield #t
  (solid 0)              ;; used for solid things
  (rider-plat-sticky 1)  ;; used for platforms in rider/platform interactions
  (rider-target 2)       ;; used for target in rider/platform interactions
  (edgegrab-active 3)    ;; set/cleared when entering/exiting edgegrab states
  (rider-plat 4)         ;; used for platforms in rider/platform interactions
  (unused 5)             ;; totally unused?
  (edgegrab-possible 6)  ;; used when edge grab checks should be done
  (edgegrab-cam 7)       ;; set/cleared when entering/exiting edgegrab states
  (swingpole-active 8)   ;; set/cleared when entering/exiting swingpole states
  (racer 9)              ;; set/cleared when entering/exiting racer states
  (attackable 10)        ;; used for something to do with attacking/damaging
  (attackable-unused 11) ;; seems to relate to attacking - set in several places but never tested for?
  (snowball 12)          ;; set/cleared when entering/exiting snowball states
  (tube 13)              ;; set/cleared when entering/exiting tube states
  (flut 14)              ;; set/cleared when entering/exiting flutflut states
  (racer-grounded 15)    ;; set/cleared when entering/exiting certain racer states w/ extra conditions
  (racer-unused 16)      ;; seems to relate to racer - never set, only cleared in one place?
  )
```
2023-06-15 19:59:54 +01:00
ManDude f0fb6f422d
fix some enter-states and sound-id fields (#2727)
Supersedes #2525
2023-06-14 22:04:00 +01: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
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
Matt Dallmeyer a88c2d2460
Replace hardcoded pickup-type ints with enum name (#2704)
For reference:
jak1
```lisp
(defenum pickup-type
  (none) ;; 0
  (eco-yellow) ;; 1
  (eco-red) ;; 2
  (eco-blue) ;; 3
  (eco-green) ;; 4
  (money) ;; 5
  (fuel-cell) ;; 6
  (eco-pill) ;; 7
  (buzzer) ;; 8
  (eco-pill-random) ;; 9
  )
```

jak2
```lisp
(defenum pickup-type
  :bitfield #f
  :type int32
  (none            0)
  (eco-yellow      1)
  (eco-red         2)
  (eco-blue        3)
  (eco-dark        4)
  (eco-green       5)
  (eco-pill-green  6)
  (eco-pill-dark   7)
  (eco-pill-random 8)
  (money           9)
  (fuel-cell      10)
  (buzzer         11)
  (darkjak        12)
  (ammo-yellow    13)
  (ammo-red       14)
  (ammo-blue      15)
  (ammo-dark      16)
  (shield         17)
  (health         18)
  (trick-point    19)
  (trick-judge    20)
  (gem            21)
  (skill          22)
  (karma          23)
  (gun-red        24)
  (gun-yellow     25)
  (gun-blue       26)
  (gun-dark       27)
  (board          28)
  (pass-red       29)
  (pass-green     30)
  (pass-yellow    31)
  (pass-blue      32)
  (ammo-random    33)
  )
```

Co-authored-by: Tyler Wilding <xTVaser@users.noreply.github.com>
2023-06-10 01:39:13 +01: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 f5ad85b4cd
workaround for spyder warp hack and fix battle bugs (#2707)
Fixes #2705 
Fixes #2706
2023-06-08 06:47:44 +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 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
ZedB0T 4bb5491d38
sdl: Fix target-fps add debug toggle for speedrun mode (#2694) 2023-06-04 20:42:09 -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
ZedB0T d41858c61c
Show the git commit version in screenshots/videos [Jak 2] (#2677)
With issues/screenshots becoming more common its probably time to turn
this on for debugging reasons.
2023-06-04 11:02:51 -04:00
Matt Dallmeyer 45b83ad5d5
Add race-bike-d/e debug options, some comments (#2683) 2023-06-04 10:57:53 -04:00
Hat Kid c23bef45bb
jak2: fix race crash (#2680) 2023-05-31 19:49:23 +02:00
Hat Kid 48141bee6f
jak2: fix pegasus crash (#2676) 2023-05-30 01:31:07 +02:00
ManDude 25fd007233
Update font-color enum (#2670)
Gives proper names to almost every color. It is very apparent that some
colors are context-sensitive/made for a specific purpose, so those
colors were named after that purpose instead of a generic color name.
2023-05-24 06:57:05 +01:00
Tyler Wilding 057ae361bf
LSP: OpenGOAL Feature Support - Part 1 (#2668) 2023-05-21 17:24:23 -04:00
Tyler Wilding a033119f1d
i18n: add MysticGamer23's swedish subtitles (#2667) 2023-05-19 21:06:24 -04:00
Tyler Wilding 288c093913
i18n: Create a JSON subtitle format for translating via Crowdin (#2644) 2023-05-18 20:54:59 -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
Hat Kid 8d28bb3480
jak2: add current-time macro for process clocks (#2662)
Closes #1872

---------

Co-authored-by: ManDude <7569514+ManDude@users.noreply.github.com>
2023-05-18 21:33:46 +01:00
ManDude 79b6e12d68
fix stadium-obs regression (#2661) 2023-05-17 01:03:18 +01:00
Hat Kid ebc90d57ed
jak2: fill out names for text-id enum (#2640) 2023-05-17 00:48:44 +01:00
ManDude 0dccd048ef
better decomp of set-subtask-hook!, sub-task-list array and *-setting! macros (#2654)
Improves code readability considerably.
2023-05-16 23:08:35 +01:00
ManDude cf048a9e37
small cleanup to progress-draw.gc and set-font-color (#2653) 2023-05-15 20:45:28 +01:00
ManDude e30ecb361f
small jak 2 bug fixes (#2649)
- elec gates now always render at max quality if you have PS2 lods
disabled. the original render distances are so low that the one in
caspad is impossible to see in normal gameplay.
- `fort-entry-gate-11` and `com-airlock-outer-13` are specifically
banned from the all actors hack because they are placed in a bad spot
and Naughty Dog did not program the airlocks very well.
- fixed NPC talk distance being bad for 1 frame.
- fix `sew-scare-grunt` erroneously keeping its spool anim active if you
killed the enemy.
2023-05-15 17:26:25 +01:00
Hat Kid 2e9aa1f962
jak1: add back money starburst (#2650) 2023-05-15 13:06:49 +02:00
ManDude 01aa67798f
fix racer hud regression (#2648)
Fixes #2643
2023-05-15 03:18:02 +01:00
Tyler Wilding 08b9a631dc
New Crowdin updates (#2645) 2023-05-14 01:28:13 -04:00
Tyler Wilding 88517ef0c3
i18n: Lookup untranslated strings from a fallback language (english) instead of displaying Unknown... (#2637) 2023-05-14 00:53:27 -04:00
Hat Kid 8f742471a6
jak1: fix regression with npc NaNs (#2642) 2023-05-11 19:17:26 +02: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 acae62c919
fix blit size being wrong most of the time (#2620) 2023-05-05 02:31:27 +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
Hat Kid 3ce2edf4b6
decomp: ctywide-speech (#2612) 2023-05-03 09:09:39 +02:00
water111 ef23fecd90
[goalc] default to non-immediate lambdas if not requested (#2604)
This fixes a long time issue with `lambda`. The `lambda` is a bit
overloaded in OpenGOAL: it's used in the implementation of `let`, and
also to define local anonymous functions.

```
(defmacro let (bindings &rest body)
  `((lambda :inline #t ,(apply first bindings) ,@body)
    ,@(apply second bindings)))
```

```
(defmacro defun (name bindings &rest body)
  (let ((docstring ""))
    (when (and (> (length body) 1) (string? (first body)))
      (set! docstring (first body))
      (set! body (cdr body)))
    `(define ,name ,docstring (lambda :name ,name ,bindings ,@body))))
```

In the first case of a `let`, a `return` from inside the `let` should
return from the functioning containing the `let`, not the scope of the
`lambda`. In the second case, we should return from the lambda. The way
we told the different between these cases was if the `lambda` was used
"immeidately", in the head of an expression (like it would be for the
`let` macro). But, this falsely triggers when an anonymous function is
used immediately: eg
```
((lambda () (return #f)))
```
should generate and call a real x86 function that returns immediately.

This should fix some death/mission failed stuff in jak 2.
2023-04-30 19:00:27 -04:00
ManDude 34b4020569
alternate method for scaling screen warp effects with aspect ratio (#2603)
Changes the scaling method used for the fort turret cam and under cam
effects. It should be more "accurate" now while not getting nauseating.
2023-04-30 23:12:20 +01: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
water111 5c9aa3facd
[jak2] try to speed up compile a bit (#2596) 2023-04-30 14:13:52 -04:00
Tyler Wilding cb1daa032c
g/j2: remove temporary hack to allow the avalanche to play (#2599)
No longer needed after the latest changes in the overlord PR that
recently merged.

Fixes #2509
2023-04-30 18:58:45 +01:00
ManDude 19899f6e5a
[jak2] Fix temp stacks being created outside process stack (#2595)
Somehow this was only causing issues (afaik) with
`draw-decoration-load-save` getting corrupted, perhaps because other
processes either use the shared dram stack or the gigantic spr stack.
2023-04-30 12:17:42 -04:00
ManDude b37f255066
fix minimap stretch (#2593) 2023-04-30 04:23:56 +01:00
ManDude d67b95c68f
allow quoting :key symbols + further optimize defpart (#2592)
This should hopefully improve build times in general, especially for
files with `defpart`.
2023-04-30 02:46:14 +01:00
ManDude 44193caef0
[jak2] more specific cutscene detection (#2590)
Fixes some instances of the camera entering cutscene mode when we don't
want that.
2023-04-30 01:23:53 +01:00
ManDude bc30e00b2f
attempting to slightly optimize defpart (#2587) 2023-04-29 22:28:07 +01: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
ManDude 0d3e272876
fix many instances of bad bone data being used (#2580)
Fixes cutscenes starting way too early and various cutscene softlocks.

Fixes #2579
Fixes #2577 

Supersedes #2578
2023-04-29 11:13:56 -04:00
Hat Kid aff67d6bb7
jak2: fix warp effect for robotank and underb on other aspect ratios (#2574) 2023-04-29 11:03:13 -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
ManDude d84859e431
Fix bad lsack level borrow (#2540)
Fixes crash when completing city side missions with
`city-krew-collection-introduction` open.

Fixes #2539
2023-04-24 15:49:30 +01:00
ManDude 21b902cddf
Do not swap between clocks for airlocks speed (#2537)
Fixes crash at the end of various missions.

Fixes #2456
2023-04-24 01:53:40 +01: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 47d85f896e
d/jak2: temp fix for rewarding orbs from talker speeches (#2523) 2023-04-17 23:04:16 -04:00
Tyler Wilding 57508009df
d/jak2: decompile missing function in whack (#2521) 2023-04-17 22:26:46 -04:00
Tyler Wilding 138b1729ad
d/jak2: fix dig-sinking-plats in dig3 (#2519) 2023-04-17 21:20:54 -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
Tyler Wilding bacacc0f99
g/j2: temporarily disable some gui-control code to fix rock avalanche (#2510)
Related to https://github.com/open-goal/jak-project/issues/2509
2023-04-17 13:52:49 -04:00
ManDude 7a0048872a
[jak2] Disable envmap hack if warp effect is enabled (#2511) 2023-04-17 06:10:51 +01: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 a27083f4ee
[jak 2] Add generic and warp (#2495) 2023-04-16 18:05:35 -04:00
ManDude ba12d804f7
jak 2 memcard support (#2482) 2023-04-14 20:39:58 +01:00
ManDude e004780f73
add a toggle for faster airlocks and elevators and enable by default (#2478) 2023-04-14 07:53:14 +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
water111 1f4872b25d
[jak2] fix hitting enemies after they die (#2475)
Closes #2473 

The return type of a method was wrong.
2023-04-12 20:43:04 -04:00
water111 6b6a565d1a
[jak2] more nav-related nan fixes (#2472)
Fixes citizens that disappear (permanently) when being pushed into a
"wall" which is the border of a nav mesh that is exactly aligned with
coordinate axes.
2023-04-12 19:43:31 -04:00
water111 7b2322777a
[jak2] fix disappearing guard (#2470)
This bug feels very similar to punch glitch, where code worked on PS2
only because some value didn't reach exactly 1.0 or 0.0 with ps2-style
floating rounding. It might be better to track down the source of the
"only 1.0 on PC" value, rather than patching downstream code to handle
it, but I can't easily find it in this case - there's a lot of code that
touches this heading value. (it's also possible this bug happens on ps2,
but the result is the guard appears to face the wrong direction, rather
than disappearing).

Detailed debug notes:
Ran a process that just calls this function:
```
(defun print-guard-info ()
  (let ((proc (process-by-name "crimson-guard-level-42" *active-pool*)))
    (when proc
      (format *stdcon* "PROC: ~A~%" (-> proc state))
      (let* ((pd (the process-drawable proc))
             (css (-> pd node-list))
             (cs (-> css data 15))
             )
        (format *stdcon* "joint: ~A~%" (-> cs joint))
        (format *stdcon* "pos: ~`vector`P~%" (-> cs bone position))
        )
      )
    )
  )
```
it prints out the state, and the bone position for some bone that
happens to be on the upper body. It goes to NaN when the upper half
disappears, in the state `tazer-hostile`.

Modified the code in this state to call this function in a bunch of
places:
```
(defun guard-nan-debug ((guard process-drawable) (info string))
  (when (string= (-> guard name) "crimson-guard-level-42")
    (format 0 "[guard-nan] ~S : ~`vector`P~%" info (-> guard node-list data 15 bone position))
    )
  )
```
which prints the bone position to stdout.

This shows that the problem happens after `post`, but before `trans`:
```
[guard-nan] post-end : #<vector 2723306.0000  269921.0312  388825.2187       1.0000 @ #x1f1350>
[guard-nan] trans-start : #<vector          NaN          NaN          NaN          NaN @ #x1f1350>
```
this is probably as part of the bone math.

To check, I added some prints to `execute-math-engine`, before and after
the call to `do-joint-math`:
```
[guard-nan-math] pre-math : #<vector 2722236.5000  268609.5312  385339.9062       1.0000 @ #x1f1350>
[guard-nan-math] post-math : #<vector          NaN          NaN          NaN          NaN @ #x1f1350>
```

The first part of `do-joint-math` is calling the
`generate-frame-function`, which does animation blending to compute a
bunch of joint transforms. I dumped these:
```
              (let ((jaf (the-as joint-anim-frame (+ 2400 (scratchpad-object int)))))
                (format 0 "generate frame:~%")
                (format 0 "~`matrix`I~%" (-> jaf matrices 0))
                (format 0 "~`matrix`I~%" (-> jaf matrices 1))
                (dotimes (i (-> obj mgeo num-joints))
                  (format 0 "~`transformq`P~%" (-> jaf data i))
                  )
                )
```
and confirmed that they always look good.

The next part is "prebind", which allows something to modify the
`joint-anim-frame`. Nothing does this on the guard.

The next part is what I've named the "root bind", which computes the
transform of the root bone based on the process-drawable root's
position.

```
                (when (the-as (function cspace transformq none) t9-3)
                    (when *djm-debug* (format 0 "djm: first bind func ptrs #x~X #x~X~%" cspace<-transformq! t9-3))
                    (when *djm-debug* (format 0 "djm: first bind func input: ~`transformq`P~%" (-> v1-20 param1)))

                    ((the-as (function object object object none) t9-3) v1-20 (-> v1-20 param1) (-> v1-20 param2))
                    (when *djm-debug* (format 0 "djm: first bind func result:~%~`matrix`I~%" (-> v1-20 bone transform)))

                    )
```
in this case, the first print confirms that we're using
`cspace<-transformq!` as the root binding function.

When the guard entirely disappears, it is caused by the root of the
process drawable having NaNs as its `quat`:
```
djm: first bind func input: #<transformq @ #x1f04f0
		trans:2724817.7500  262144.0000  388891.1875       1.0000 
		quat:           NaN          NaN          NaN          NaN 
		scale:      1.0000       1.0000       1.0000       1.0000>
djm: first bind func result:
[001f0e70] matrix
	[         NaN] [         NaN] [         NaN] [         NaN]
	[         NaN] [         NaN] [         NaN] [         NaN]
	[         NaN] [         NaN] [         NaN] [         NaN]
	[2724817.7500] [ 262144.0000] [ 388891.1875] [      1.0000]
```

After this, it's possible to get the lower half of the guard to return,
but I believe the real problem is this first `quat` being NaN. Then the
nans probably spread everywhere.

So now we now to look for the `(-> guard root quat)` becoming NaN:
```
(defun guard-nan-debug ((guard process-drawable) (info string))
  (when (string= (-> guard name) "crimson-guard-level-42")
    (format 0 "[guard-nan] ~S : ~`vector`P~%" info (-> guard root quat))
    )
  )
```

and we see this happens in post somewhere
```
[guard-nan] post-start : #<vector       0.0000      -1.0000       0.0000       0.0000 @ #x1f0500>
[guard-nan] post-end : #<vector          NaN          NaN          NaN          NaN @ #x1f0500>
```

Looking at individual methods
```
[guard-nan] before-142 : #<vector       0.0000      -1.0000       0.0000       0.0000 @ #x1f0500>
            heading: #<vector       0.0000       0.0000      -1.0000       0.0000 @ #x3432670>
[guard-nan] before-143 : #<vector          NaN          NaN          NaN          NaN @ #x1f0500>
            heading: #<vector       0.0000       0.0000      -1.0000       0.0000 @ #x3432670>
```
It looks like the problem is converting this heading to a quaternion.
2023-04-11 20:03:40 -04:00
Tyler Wilding 10ac78200b
repl: add gameVersionFolder to repl-config for running the non-default version (#2463)
Adds a decent way to customize the folders the project file expects the
iso data and decompiler data to be in. When you run any version other
than the default, for example Jak 1 PAL, it uses the `gameName`
decompiler config to consume and output it's results.

However the project file will assume `jak1` unless you hard-code it
differently -- basically, it needs to be explicitly told just the
decompiler is told what version to use.

We now have a per-user REPL Config json file, so that can be used to
override the default `jak1` behaviour.

Fixes #1993
2023-04-11 17:57:20 -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
water111 15ab5d704d
fix alpha blend bit for jak 1 merc (#2458)
This fixes the sculptor's face shield and red rings on final boss.
2023-04-05 18:56:48 -04:00
Hat Kid f4085a4362
jak1: clean up all dummy methods (#2457)
Cleans up every `dummy-*` and `TODO-RENAME-*` method up with either
proper names or by renaming them to `[type-name]-method-[method-id]`
similar to Jak 2's `all-types`.

Also fixes the bad format string in `collide-cache` and adds the event
handler hack to Jak 1.

The game boots and runs fine, but I might have missed a PAL patch or
other manual patches here and there, please double-check if possible.
2023-04-05 18:41:05 -04:00
ZedB0T 366808d2f9
add a temporary gui-control hack to make boulder chase mission completable (#2455)
add a temporary gui-control hack to make boulder chase mission
completable
2023-04-05 18:23:55 -04:00
Hat Kid 37af812785
jak2: add some temporary gui-control hacks to make missions completable (#2454) 2023-04-03 23:02:38 +02: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
Tyler Wilding 3c22eb061f
d/jak2: helldog (#2445)
The last of the missions that had a missing file.

I manually fixed some casting related to a `handle->process`, since this
is the last file...whatever not worth stressing about. But probably an
issue that will crop up in the future.

Co-authored-by: water <awaterford111445@gmail.com>
2023-03-31 18:38:34 -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
Hat Kid 318c76775c
decomp: shuttle (#2444) 2023-03-31 18:17:47 -04:00
water111 57b5117cae
[jak2] decomp neon-baron-part, fix merc fog disable (#2443)
- decompile `neon-baron-part`, which also has the hideout door for some
reason
- improve a few error messages in static data decompilation
- fix bug with disabling fog in merc
2023-03-31 17:47:38 -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
ManDude 013a4f4612
[jak2] entity debug improvements and add a hack to make airlocks faster because we can + fix defend stadium (#2432) 2023-03-27 02:55:16 +01: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
ManDude 7170db51ea
fix bad defpartgroup decomp and improve entity debug display a bit (#2423)
- Makes very nasty bugs fixed in #2402 print onscreen when detected
instead of to the console.

![image](https://user-images.githubusercontent.com/7569514/227754516-d508376e-8b23-4af6-bc44-e4d33d586e17.png)
- Fixes `valid?` decomp
- Moves `entity-debug.gc` to the end of `COMMON.CGO` so we can check for
keys in a few more commonly-used actor types.
- Entity debug display (jak 2) now properly parses the `art-name` tag of
part spawners, which gets overwritten at runtime.
- Fixes #2422 . Decompiler was writing out part group rotation for the
scale part, so all of those part groups had a zero in one (or all) of
the axes. This "only" affected 38 groups, including all of the flame
pots in tomb, jetpack guard, wasp, onin tent seal of mar, dark eco pill
and a few other things.

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

![image](https://cdn.discordapp.com/attachments/995787558816595968/1089395777253671013/image.png)
2023-03-26 05:13:54 +01: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
ManDude cc16f62428
[jak2] fix bad actors using unloaded types (#2402)
Actors that use types from a level that got unloaded should now get
killed immediately instead of continuing to exist and eventually crash
the game.

NOTE: Will spam the console whenever a bad actor tries to spawn. I would
like to document all instances of where this happens!
2023-03-24 07:18:43 +00:00
ManDude f56e807d75
[jak2] fix speed for spool anim hack (#2401)
Recent subtraction compiler bug fix exposed this.
2023-03-23 20:01:13 +00: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 3b666beae2
[jak2] implement abandon-thread (#2396)
implements `abandon-thread` for when we want to return from a thread,
but are in a `post` thread which normally disallows this.
2023-03-23 00:41:51 +00:00
water111 b7fc7383b7
[jak2] fix dark things (#2393) 2023-03-22 20:09:50 -04: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
Hat Kid a857061e96
jak2: focus-test? macro, fix (zero? (logand ...)) -> (not (logtest? ...)) detection (#2321)
There are *a lot* of file changes and while I have carefully gone
through every gsrc change to fix up manual patches, there might still be
spots that I missed.
2023-03-14 22:57:31 -04:00
ZedB0T 9a28cc5a79
Add a autosplit-flag-task-complete! macro (#2317)
Cuts out a little bit of repetition in the autosplit code. Also adds
some labels to the VS configurations.


090c497799/goal_src/jak1/pc/features/autosplit-h.gc (L167-L169)
2023-03-14 17:56:58 -04:00
ManDude 0cf285ef99
[jak2] decomp cleanup of traffic things + fix stadium crash (#2319) 2023-03-11 22:45:14 +00:00
ManDude 0c64d48b0d
[jak2] force-envmap? hack (#2316)
Also affects texscroll and ripple, but I'm not sure what would be good
places to test those.
2023-03-11 22:13:55 +00:00
Hat Kid a1dee19d0d
decomp: finish stadium-obs (#2294)
Co-authored-by: water <awaterford111445@gmail.com>
2023-03-11 15:55:39 -05:00
ManDude 77242bd12e
[jak2] script-eval macro (#2315)
turns
```lisp
      (eval! (new 'stack 'script-context (process->ppointer self) self (the-as vector #f)) '(teleport))
      (eval! (new 'stack 'script-context (process->ppointer self) self (the-as vector #f)) (-> arg0 on-goto))
```
into
```lisp
      (script-eval '(teleport))
      (script-eval (-> arg0 on-goto))
```
2023-03-11 10:45:16 -05:00
ManDude 70452a753f
[jak1] fix game-save debug printing (#2314) 2023-03-10 22:02:04 +00:00
ManDude 93992795f9
[jak1] disable auto-save-check (#2312)
Fixes unnecessary performance degradation when auto-save is enabled.
2023-03-10 05:22:50 +00:00
ManDude 3ce7f59989
[jak1] fix concerning game-save bug (#2311)
Not really sure if this actually caused any issues in-game, but better
safe thatn sorry.
2023-03-10 03:47:35 +00:00
ManDude 9cb2963cde
add debug joint renderer (#2309) 2023-03-10 03:12:44 +00:00
water111 9c7b86c595
[jak2] fix blerc profile bar issue (#2307)
Fix so the profile bar doesn't do something silly when
`merc-blend-shape` returns early, skipping the part where `end-time` is
set.
2023-03-10 02:10:43 +00:00
Tyler Wilding 021bae08ec
d/jak2: fix elevator issues and cleanup script-context new method (#2304)
This fixes the issue where elevators leave you behind (stack structure
related)

At the same time I cleaned up some things I found along the way, most
notably changing `script-context`'s `basic` field to `object` as
non-basics use this method as well.

Fixes #2305
2023-03-09 20:03:43 -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
Tyler Wilding 6d99f1bfc1
d/config: re-organize decompiler/config and eliminate most of the duplication (#2185)
Reasons for doing so include:
1. This should stop the confusion around editing the wrong config file's
flags -- when for example, extracting a level. Common settings can be in
one central place, with bespoke overrides being provided for each
version
2. Less verbose way of supporting multiple game versions. You don't have
to duplicate the entire `type_casts` file for example, just add or
override the json objects required.
3. Makes the folder structure consistent, Jak 1's `all-types` is now in
a `jak1` folder, etc.
2023-03-08 20:07:26 -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
ZedB0T 43da4088e6
Fix Bombbot crash (#2296) 2023-02-28 20:39:57 +01: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
Tyler Wilding c3310e1833
docs: fix method docstrings and grab @file comment blocks to use as a file description (#2289) 2023-02-27 18:58:01 -05:00
Hat Kid adf929d18d
decomp: ruf-*, jinx-*, mog-*, grim-*, hosehead-* files, gun-buoy (#2279) 2023-02-27 18:53:57 -05:00
ManDude e1e6695e92
[jak2] merc lod hacks + region debugger + make level heap less massive (#2285) 2023-02-27 18:45:32 +00:00
Hat Kid 736a3a8b7c
jak2: fix jellyfish crash and temporarily disable underwater warp (#2270)
Fix crash when the game tries to spawn `jellyfish` in Underport and
temporarily disable the rendering of the warp effect until it's properly
implemented.
2023-02-26 17:24:05 -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
Tyler Wilding 90d5e83d9e
d/jak2: finish forest-obs (#2266) 2023-02-26 09:49:16 -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 928dbebee4
[jak2] fix highly aggressive guard zoomer ambush (#2264)
`*alert-level-settings*` was actually an inline array and we were
indexing past the end of it.
I think this will fix some of the strange on-foot guard behavior too.
2023-02-26 01:31:21 -05:00