Commit graph

2042 commits

Author SHA1 Message Date
Tyler Wilding 4c6982b0ec
formatter: initial and basic indentation/alignment and expose the formatting via the LSP (#2673) 2023-05-28 13:22:00 -04:00
Dimitri (__) ad0b3297ca
fix: add unicode tree-sitter include directory (#2674) 2023-05-28 13:21:25 -04:00
Ziemas 691af17bbd
overlord: Some cleanup (#2669)
Started cleaning up some of the lower hanging fruit.
2023-05-26 17:55:10 -04:00
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
water111 d5951c2b11
[jak 2] Fix possible stereo desync in overlord (#2663)
Normally, when they allocate a VagCmd, they do a bunch of stuff to clear
all the status bits and reset things
in particular the InitVAGCmd function does a lot


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

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

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

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

I think the fix of just clearing byte21 is ok because there's no way
that the old value of the byte is useful after the command is
repurposed.
2023-05-19 21:17:11 -04:00
Tyler Wilding a033119f1d
i18n: add MysticGamer23's swedish subtitles (#2667) 2023-05-19 21:06:24 -04:00
Tyler Wilding 18f162fcdf
New Crowdin updates (#2666) 2023-05-18 21:43:00 -04:00
Tyler Wilding 288c093913
i18n: Create a JSON subtitle format for translating via Crowdin (#2644) 2023-05-18 20:54:59 -04:00
Luminar Light 70cb7e3171
Hungarian Custom Text JSON Disappearance fix, and translating new speedrun text (#2665) 2023-05-18 19:36:19 -04:00
ManDude 7c9c956808
vag player + skill tracker debug tools and fix some decomp (#2664)
Also fixed an original game bug in `loader.gc` on a method that's called
quite often, though I have no clue what erroneous behavior it could have
even caused.
2023-05-18 23:12:23 +01:00
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
Ziemas 0fcd9da639
Fix GCC13 build (#2641) 2023-05-17 19:08:25 -04: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
OpenGOAL Bot 263f4caaf9
CI: Periodic Controller Database Update (#2651)
Co-authored-by: OpenGOALBot <OpenGOALBot@users.noreply.github.com>
2023-05-16 01:03:43 -04:00
Matt Dallmeyer 6478fdb97c
Support multiline text (e.g. credits) override with JSON format (#2629)
Ported over the logic from parsing credits in GOAL game text file over
to the JSON parser.

minor notes:
- didn't bother replicating the logic for skipping empty lines
- didn't need to handle multiple languages in one file


40b2e93be7/common/serialization/subtitles/subtitles_ser.cpp (L92-L142)

Using the sample multiline credits override from my comment in the code:

![image](https://user-images.githubusercontent.com/2515356/236648360-b12951dc-20aa-4435-8349-08e2c254187a.png)

---------

Co-authored-by: ManDude <7569514+ManDude@users.noreply.github.com>
2023-05-15 21:19:07 +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
ManDude ecf590f30e
fix shadow colors in jak 1 and jak 2 shadow crash (#2647)
Fixes Jak 1 shadow color. Old behavior is subtractive blend with a
hardcoded value, which often times look way too dark, but it looks like
the actual game uses some sort of multiplicative blend and a
customizable shadow color (for all shadows at once).

Before vs after:

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

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


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

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


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

---------

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

This shouldn't improve or decrease performance by any noticeable amount
except maybe in really low end systems.
2023-05-06 02:08:33 +01:00
ManDude 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
Tyler Wilding ae3b76e465
New Crowdin updates (#2614) 2023-05-03 21:04:36 -04:00
Tyler Wilding e0cba064b2
i18n: allow for multiple file sources per language (#2613) 2023-05-03 20:04:52 -04:00
Hat Kid 3ce2edf4b6
decomp: ctywide-speech (#2612) 2023-05-03 09:09:39 +02:00
OpenGOAL Bot 8a59adffd5
CI: Periodic Controller Database Update (#2610)
Co-authored-by: OpenGOALBot <OpenGOALBot@users.noreply.github.com>
2023-05-01 19:08:50 -04:00
dependabot[bot] 63e9e6724b
Bump peter-evans/create-pull-request from 4 to 5 (#2609)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-30 23:13:52 -04:00
Tyler Wilding 28a5a417bc
game: don't exit prematurely when rebooting in debug (#2608)
I'm not sure what has changed here...but rebooting in debug mode now
hangs.

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

This works, but im not sure if it's the right fix / what has changed to
require this.
2023-04-30 23:06:11 -04:00
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
Tyler Wilding 6d52e002b9
i18n: init translation files that can be used by crowdin (#1760) 2023-04-30 17:22:56 -04:00
Tyler Wilding 728ef59477
ci: speed up unit-test execution (#2586)
Co-authored-by: water111 <48171810+water111@users.noreply.github.com>
2023-04-30 14:27:08 -04:00
Tyler Wilding cc878c1055
settings: handle corrupted json settings files (#2600)
Fixes #2597
2023-04-30 14:14:40 -04:00
water111 5c9aa3facd
[jak2] try to speed up compile a bit (#2596) 2023-04-30 14:13:52 -04:00
Tyler Wilding 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