Commit graph

2055 commits

Author SHA1 Message Date
Tyler Wilding e9f9869849
input: fix some mistakes in the default keyboard binds (#2697) 2023-06-05 18:26:29 -04:00
Hat Kid c677b716b9
readme: add mesa-libGL-devel dependency for fedora users (#2696) 2023-06-05 12:43:23 +02:00
ZedB0T 4bb5491d38
sdl: Fix target-fps add debug toggle for speedrun mode (#2694) 2023-06-04 20:42:09 -04:00
Tyler Wilding 2dead49019
sdl2: add back x11 window code fix (#2691) 2023-06-04 20:29:16 -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
water111 08741f0a42
[jak2] float patch for bogus collide frags (#2686)
Should fix https://github.com/open-goal/jak-project/issues/2679

Here's a test program that will trigger the bug when near these guards:
```lisp
(define *cquery* (new 'global 'collide-query))

(defun test-bad-collide ()
  (let ((lower (new 'static 'vector  :x 1681893.8750  :y 61314.2031 :z 345208.6562 :w 1.))
        (upper (new 'static 'vector :x 1701603.8750 :y  67624.0625 :z 357881.0312 :w 1.))
        ;(cquery (new 'stack-no-clear 'collide-query))
        )
    (set! (-> *cquery* collide-with) (the-as collide-spec 1))
    (set! (-> *cquery* ignore-process0) #f)
    (set! (-> *cquery* ignore-process1) #f)
    (set! (-> *cquery* ignore-pat) (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1))
    (set! (-> *cquery* action-mask) (collide-action solid))
    (set! (-> *cquery* bbox min quad) (-> lower quad))
    (set! (-> *cquery* bbox max quad) (-> upper quad))
    (format 0 "doing collide...~%")
    (fill-using-bounding-box *collide-cache* *cquery*)
    (format 0 "have ~d and ~d~%" (-> *collide-cache* num-tris) (-> *collide-cache* num-prims))
    )
  (none)
  )
```

As far as I can tell, there's a totally invalid collide-hash with an
inside `axis-scale.z`. On the PS2, it gets ignore because of how
float->int works for floats that are too big. On PC, it ends up using a
negative value and loop forever.
2023-06-04 15:19:08 -04:00
Tyler Wilding 6eaa95608e
ci: bump timeouts on builds, mostly for cache misses (#2690) 2023-06-04 14:08:35 -04:00
Tyler Wilding 6d620a9289
formatter: extract formatting into a rules abstraction, add inner formatting (body vs argument functions) (#2684) 2023-06-04 13:19:29 -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
water111 fee91d2240
[IOP] revert change that ran the iop way too much (#2681)
This caused the IOP thread to use a full core always, just spinning on
this. I didn't mean to leave this in.
2023-06-04 10:57:34 -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
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