Commit graph

2133 commits

Author SHA1 Message Date
Tyler Wilding 83f43b7153
scripts: support new jak 2 decompiler config versions via task (#2543) 2023-04-24 20:14:59 -04:00
OpenGOAL Bot 4ca697b81a
CI: Periodic Controller Database Update (#2542)
Co-authored-by: OpenGOALBot <OpenGOALBot@users.noreply.github.com>
2023-04-24 17:12:48 -04:00
ManDude 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 a264b6539b
game: Remove temporary CLI arg shim in gk (#2532) 2023-04-22 14:13:57 -04: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
OpenGOAL Bot 633b5cd53c
CI: Periodic Controller Database Update (#2514)
Updating Controller Database

Co-authored-by: OpenGOALBot <OpenGOALBot@users.noreply.github.com>
2023-04-17 13:53:08 -04:00
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 40c30cc0ab
[jak2] fix generic crashes (#2505)
Fixes crashes when killing the big spider, killing predator metal heads,
and watching the end cutscene. The presursor guy is the wrong color, but
I don't have time to look into this today.
2023-04-16 22:55:18 -04:00
water111 a27083f4ee
[jak 2] Add generic and warp (#2495) 2023-04-16 18:05:35 -04:00
ManDude 99fe918a1a
fix viewport not being set for probe draw (#2489) 2023-04-15 03:09:39 +01:00
water111 c7f2a23abf
[jak2] misc fixes to renderers (#2488)
Fixes decal on tfrag:

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

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

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

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

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

Fixed issue with u16 overflow in castle on the alpha channel, causing
flickering. It barely overflowed, which made me suspicious that we had
some error somewhere. But I think that there code is robust against
overflows.
2023-04-14 21:13:45 -04:00
ManDude ba12d804f7
jak 2 memcard support (#2482) 2023-04-14 20:39:58 +01:00
ManDude 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 909190b9a7
gk: fix "reboot in debug" option not working properly when gk has no args (#2469) 2023-04-11 17:58:19 -04:00
OpenGOAL Bot 86dfd92f00
CI: Periodic Controller Database Update (#2466)
Updating Controller Database

Co-authored-by: OpenGOALBot <OpenGOALBot@users.noreply.github.com>
2023-04-11 17:58:00 -04:00
Tyler Wilding 2a227699fe
cli: ensure an overridden project path is absolute (#2464)
Fixes #1771

Probably want to do some testing with the launcher to ensure no breaking
changes

before/after:

![image](https://user-images.githubusercontent.com/13153231/230793111-f3217ef7-5932-4dcd-83ee-d5f2c8d245fd.png)
2023-04-11 17:57:47 -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 fb62a1fb87
Update README.md (#2468) 2023-04-11 18:37:18 +01:00
Tyler Wilding c8f0f7a8b2
docs/issues: attempt to clarify what version is for the game/OpenGOAL (#2467) 2023-04-10 13:03:53 -04:00
Tyler Wilding 028153d48e
d/jak2: cleaning up some old decomp issues (#2462) 2023-04-08 23:29:33 -04:00
Tyler Wilding 3dbbbd37d4
ci: check for incorrect assert usage in C++ files (#2461) 2023-04-08 16:19:37 -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
Luminar Light c0fdd12626
Translate new Jak 1 speedrunning text to Hungarian, plus some minor adjustments (#2242)
I saw that some new speedrunning-related text was added to the English
language, so I decided to translate them. Meanwhile I also made some
minor adjustments/fixes to existing translations.

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

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

I will keep this PR a draft until I know what the main jak-project
people think about this "IL" issue. And I will adjust my branch
accordingly.
2023-04-05 18:23:22 -04:00
OpenGOAL Bot d686638a6e
CI: Periodic Controller Database Update (#2452)
Co-authored-by: OpenGOALBot <OpenGOALBot@users.noreply.github.com>
2023-04-03 22:45:00 -04:00
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 57a3254668
lsp: fix route handling json error (#2448) 2023-04-01 19:40:21 -04:00
ManDude b141871bd1
Fix typo (#2447) 2023-03-31 20:27:25 -04: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
Xavier Siguero Mora 1b27257e8a
Updated Spanish translation (#2322) 2023-03-31 16:43:48 -04:00
ManDude 577382ad34
minor cleanup + update fmt + fix some jak 2 visual anomalies (#2442)
Disables the fog hack for Jak 2, where it's not useful and kind of
breaks in most levels which rely on dark vertices that aren't underwater
(e.g. city windows).
2023-03-30 17:49:07 -04:00