Commit graph

1295 commits

Author SHA1 Message Date
ManDude a7f2776782
fix dark jak punch sound and some samos sounds (#3214) 2023-11-19 11:35:07 +00:00
ManDude 7f1bf1f892
[jak2] extended shadows hack + add/fix progress options (#3213) 2023-11-19 10:57:56 +00:00
Tyler Wilding 8258c409d5
New Crowdin updates (#3211) 2023-11-18 14:52:49 -05:00
Tyler Wilding 014cbb04da
i18n: transcribe missing english subtitles (#3199)
Co-authored-by: Hat Kid <6624576+Hat-Kid@users.noreply.github.com>
Co-authored-by: ManDude <7569514+ManDude@users.noreply.github.com>
Co-authored-by: blahpy <68830177+blahpy@users.noreply.github.com>
2023-11-18 14:06:01 -05:00
Ziemas cca829aecd
j2: fix enemy-method-135 (#3206)
Co-authored-by: Hat Kid <6624576+Hat-Kid@users.noreply.github.com>
2023-11-15 22:29:51 +01:00
ManDude 0b1639c8c0
fix forest youngsamos crash when he runs out of health (#3197)
Thought this may have been a regression but apparently we never patched
this one.

Fixes #3196
2023-11-12 18:35:58 +00:00
ManDude 42f995b059
reduce glow renderer vram usage + raise glow sprite limit (#3194)
Makes the glow sprite renderer flush when full capacity is reached,
instead of at the end. Also allows us to reduce the textures used for it
(finally). Worst case scenario there's 4-5 flushes per frame.

Fixes incessant flickering in the dig.
2023-11-12 00:11:50 +00:00
Tyler Wilding 2b1876f862
formatter: Add support for a few common functions and fix an LSP startup issue (#3190) 2023-11-11 17:51:55 -05:00
ManDude 288624b90f
fix mistakes in projectiles.gc (#3187)
Fixes #3184
2023-11-11 11:40:29 +00:00
Tyler Wilding 55611169ee
g/j2: Speedrunner mode improvements for Jak 2 (#3182) 2023-11-10 18:25:55 -05:00
ManDude a150e59e38
automatically re-enable autosave safely when starting a speedrun (#3181) 2023-11-09 17:48:47 +00:00
Hat Kid b2453fe23b
jak2: add missing pc options to progress menu (#3167) 2023-11-09 17:24:50 +01:00
Hat Kid a80b4f1b97
jak2: some high fps fixes (#3177) 2023-11-08 23:34:58 +01:00
Hat Kid 4e3d35e97c
jak2: fix discord rpc mission images in retail (#3176) 2023-11-07 00:39:58 +01:00
ManDude 8179d0aee3
[jak2] Localize board trick names (#3161)
It also looks like this now which I think is a bit cleaner:


![image](https://github.com/open-goal/jak-project/assets/7569514/0bed1d82-3407-4ca5-be1f-712ca8f96bcc)
2023-11-06 04:14:28 +00:00
Tyler Wilding f44f4dbe49
g/j2: use the large font for the jetboard trick combo display (#3157) 2023-11-05 01:32:01 -04:00
Tyler Wilding 595bc83105
g/j2: Add ending condition checks to the autosplitter struct (#3155) 2023-11-04 22:16:48 -04:00
water111 2a7016be6a
[jak2] Fix palace rotation at high fps (#3147) 2023-11-04 20:02:13 -04:00
ManDude 8d1fec34b4
allow per-file override of type-to-artgroup map + use correct divide by zero handler in civilian.gc (#3148) 2023-11-04 18:25:13 +00:00
Tyler Wilding 959921e988
i18n: Add jak 2 custom text to Crowdin (#3141) 2023-11-04 13:14:14 -04:00
ManDude adada4751d
[jak2]do not force UK english on PAL (#3142) 2023-11-04 11:17:40 +00:00
ZedB0T c1e81e1b4b
Add fallback text functionality to Jak 2 (#3128) 2023-11-03 21:45:10 -04:00
Tyler Wilding cca2897e3e
g/jak2: disable speech volume when starting a new speedrun (#3132) 2023-11-02 23:35:52 -04:00
Tyler Wilding fff3a85531
g/jak2: allow L1 + R1 + Start to open speedrun menu as well (#3131) 2023-11-02 20:42:51 -04:00
ManDude a949dada93
rename joint node and art element macros (#3111) 2023-11-01 23:16:00 +00:00
ManDude 5587593204
fps selection fixes i missed (#3109) 2023-10-30 19:55:16 +00:00
ManDude 99cb51ff57
[jak2] simplify fps disclaimer (#3108) 2023-10-30 18:17:11 +00:00
ManDude cd68cb671e
deftype and defmethod syntax major changes (#3094)
Major change to how `deftype` shows up in our code:
- the decompiler will no longer emit the `offset-assert`,
`method-count-assert`, `size-assert` and `flag-assert` parameters. There
are extremely few cases where having this in the decompiled code is
helpful, as the types there come from `all-types` which already has
those parameters. This also doesn't break type consistency because:
  - the asserts aren't compared.
- the first step of the test uses `all-types`, which has the asserts,
which will throw an error if they're bad.
- the decompiler won't emit the `heap-base` parameter unless necessary
now.
- the decompiler will try its hardest to turn a fixed-offset field into
an `overlay-at` field. It falls back to the old offset if all else
fails.
- `overlay-at` now supports field "dereferencing" to specify the offset
that's within a field that's a structure, e.g.:
```lisp
(deftype foobar (structure)
  ((vec    vector  :inline)
   (flags  int32   :overlay-at (-> vec w))
   )
  )
```
in this structure, the offset of `flags` will be 12 because that is the
final offset of `vec`'s `w` field within this structure.
- **removed ID from all method declarations.** IDs are only ever
automatically assigned now. Fixes #3068.
- added an `:overlay` parameter to method declarations, in order to
declare a new method that goes on top of a previously-defined method.
Syntax is `:overlay <method-name>`. Please do not ever use this.
- added `state-methods` list parameter. This lets you quickly specify a
list of states to be put in the method table. Same syntax as the
`states` list parameter. The decompiler will try to put as many states
in this as it can without messing with the method ID order.

Also changes `defmethod` to make the first type definition (before the
arguments) optional. The type can now be inferred from the first
argument. Fixes #3093.

---------

Co-authored-by: Hat Kid <6624576+Hat-Kid@users.noreply.github.com>
2023-10-30 03:20:02 +00:00
ManDude 09536c68ac
[compiler] asm-only disasm output + fix spacing bug (#3104) 2023-10-29 10:16:14 +00:00
Matt Dallmeyer 7c74b0c999
Fix starting continue point for Hub 2/3 category extensions (#3103) 2023-10-29 02:17:32 +01:00
Hat Kid c7c615a043
custom levels: refactor level building code and jak 2 support (#3090)
Co-authored-by: water <awaterford111445@gmail.com>
2023-10-21 06:07:43 +02:00
Hat Kid 2c825ab7bf
jak2: add warning text when changing frame rate for the first time (#3092) 2023-10-17 18:29:02 +02:00
Hat Kid 598ba1aaa3
jak3: add missing files and implement pexcw (#3084)
Some files were in the `banned_objects` list and were thus excluded from
the `all_objs` file.

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

---------

Co-authored-by: Tyler Wilding <xtvaser@gmail.com>
2023-10-12 18:05:40 -04:00
Tyler Wilding 8b3b96761d
g/j2: Integrate highscores with Speedrun.com/JakSpeedruns.com when speedrunner mode is enabled (#3037) 2023-10-11 20:43:55 -04:00
Hat Kid 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