Commit graph

2274 commits

Author SHA1 Message Date
water111 af6f489657
[jak2] Set up extractor (#3042)
This sets up the extractor for jak 2. I was expecting that I'd have to
make some more significant changes to the decompiler/compiler path
stuff, but this was not the case!

The only real change is that you can now provide multiple ISO hashes for
an entry in `ISOMetadata`. This is needed for the two different NTSC
versions, which have the same configs, serials, and ELF hashes, but
slightly different contents.

I also didn't add the korean version because I don't have the info for
it.

---------

Co-authored-by: ManDude <7569514+ManDude@users.noreply.github.com>
2023-10-06 23:09:09 -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
OpenGOAL Bot 2d480a6df6
CI: Periodic Controller Database Update (#3060)
Co-authored-by: OpenGOALBot <OpenGOALBot@users.noreply.github.com>
2023-10-03 13:55:31 -04:00
ManDude 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
dependabot[bot] 4731ae6e22
Bump actions/checkout from 3 to 4 (#3047)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-30 23:36:22 -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
Matt Dallmeyer 0f3782128f
Remove dupe line in discord-rpc .clang-format (#3039) 2023-09-30 00:10:51 +01: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 9b60afe6e6
[compiler] fix compile_condition not attempting macro expansion (#3030)
Ancient bug! Resulted in a 1%-2% decrease in code object file size (and
more importantly the asm is more readable).

Fixes #3029
2023-09-25 23:49:12 +01:00
OpenGOAL Bot c695ef1393
CI: Periodic Controller Database Update (#3028)
Co-authored-by: OpenGOALBot <OpenGOALBot@users.noreply.github.com>
2023-09-25 17:44:21 -04:00
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 592c5f88f3
New Crowdin updates (#3025) 2023-09-23 21:47:59 -04:00
Tyler Wilding 35c0ca235d
scripts: remove unused code_retention script code (#3019) 2023-09-23 16:05:29 -04: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
OpenGOAL Bot f86be3df62
CI: Periodic Controller Database Update (#3006)
Co-authored-by: OpenGOALBot <OpenGOALBot@users.noreply.github.com>
2023-09-22 23:06:59 -04:00
ManDude 61c4fc4b91
[jak2] fully implement collide mesh renderer (#3010)
Fixes #2983
2023-09-22 15:50:16 +01:00
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
Tyler Wilding 049a8057a8
ci: separate lint checks into a required and optional workflow (#3002) 2023-09-17 21:47:26 -04:00
Hat Kid bfb03d4934
goalc: add macro-expand form (#3000) 2023-09-17 22:55:25 +02:00
Hat Kid 36213aaedb
jak2: fix metalkor regression (#2999) 2023-09-17 07:57:25 +02:00
rafalekkB a7056c2704
Update game_base_text_pl-PL.json (#2997) 2023-09-16 23:23:54 -04:00
Tyler Wilding d701a54c43
g/j2: Implement speedrunner mode in jak 2 (#2976) 2023-09-16 23:23:29 -04:00
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
ManDude a03413d4ca
[jak2] placeholder subtitle files (#2986)
fixes #2985
2023-09-14 14:27:46 +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
OpenGOAL Bot 6ed2bda933
CI: Periodic Controller Database Update (#2980)
Co-authored-by: OpenGOALBot <OpenGOALBot@users.noreply.github.com>
2023-09-11 21:59:33 -04:00
Tyler Wilding 0a45f50522
g/j1: resolve memory leak around display/input dynamic strings from C++ (#2979) 2023-09-11 23:09:42 +01:00
water111 9b9fe7a7af
[jak 2] Export the collision mesh (#2977)
![image](https://github.com/open-goal/jak-project/assets/48171810/266d014b-f6c5-440f-9c3e-ab7c5eafe771)
2023-09-10 17:32:18 -04:00
Tyler Wilding 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
water111 74250a22f7
Save entities to JSON, and make custom level building a little faster (#2973)
This will create a folder like `decompiler_out/jak1/entities` and save a
JSON file per level with all the actors.

Also, it should hopefully make custom level building a little faster.
2023-09-09 17:06:39 -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 ec058221b5
[jak1] Fix duplicated tie extract (#2972)
Fix a bug where meshes are extracted too many times.
2023-09-09 11:56:18 -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