Commit graph

2599 commits

Author SHA1 Message Date
Tyler Wilding 0a15ac1669
goalc: Fix new symbol trie's performance inefficiencies (#3443)
I believe this brings things back in line to where it was before:
Here are the first handful of files before the changes:
```
0.014 | gcommon.gc
0.006 | gkernel-h.gc
0.025 | gkernel.gc
0.002 | pskernel.gc
0.01 | gstring.gc
0.004 | gstate.gc
0.001 | kernel.gd
0.001 | types-h.gc
0.002 | vu1-macros.gc
0.003 | math.gc
0.01 | vector-h.gc
0.001 | gravity-h.gc
0.001 | bounding-box-h.gc
0.001 | matrix-h.gc
0.001 | quaternion-h.gc
0.001 | euler-h.gc
```
> first compile
```
0.161 | gcommon.gc
0.126 | gkernel-h.gc
0.174 | gkernel.gc
0.046 | pskernel.gc
0.08 | gstring.gc
0.048 | gstate.gc
0.001 | kernel.gd
0.052 | types-h.gc
0.009 | vu1-macros.gc
0.059 | math.gc
0.228 | vector-h.gc
0.026 | gravity-h.gc
0.006 | bounding-box-h.gc
0.002 | matrix-h.gc
0.028 | quaternion-h.gc
0.026 | euler-h.gc
```
> make a change in gcommon and recompile

With the changes:
```
0.015 | gcommon.gc
0.018 | gkernel-h.gc
0.039 | gkernel.gc
0.006 | pskernel.gc
0.015 | gstring.gc
0.009 | gstate.gc
0.005 | kernel.gd
0.006 | types-h.gc
0.006 | vu1-macros.gc
0.008 | math.gc
0.017 | vector-h.gc
0.004 | gravity-h.gc
0.004 | bounding-box-h.gc
0.005 | matrix-h.gc
0.005 | quaternion-h.gc
0.003 | euler-h.gc
```
> First compile, no difference expected

```
0.016 | gcommon.gc
0.008 | gkernel-h.gc
0.023 | gkernel.gc
0.002 | pskernel.gc
0.01 | gstring.gc
0.043 | gstate.gc
0.001 | kernel.gd
0.002 | types-h.gc
0.002 | vu1-macros.gc
0.003 | math.gc
0.013 | vector-h.gc
0.001 | gravity-h.gc
0.002 | bounding-box-h.gc
0.002 | matrix-h.gc
0.001 | quaternion-h.gc
0.001 | euler-h.gc
```
> Compile times seem to be back within margin of error -- some are
faster than the first compilation time.
2024-04-01 18:56:55 -04:00
Hat Kid c96e44ab30
decomp3: support for virtual states inheriting from their own type's virtual states, gun-yellow-shot, gun-red-shot, gun-dark-shot (#3438) 2024-03-31 11:14:14 -04:00
Tyler Wilding afea4f7694
g/j1: remove the redundant graphics menu (#3421)
This was hiding options for people that only had 60hz monitors since the
two menus drifted -- it is not necessary for an entire separate menu,
just disable the option if applicable.

Don't merge this without testing it throughly
2024-03-30 20:00:53 -04:00
Tyler Wilding 53277a65ad
LSP: A bunch of new OpenGOAL language features (#3437)
- Integrate the AST into the LSP, this makes parsing and tokenizing the
files much easier
- Consolidate most of the symbol info tracking in `goalc` to a single
map. Fixed some issues where the old map would never evict symbols when
re-compiling files. There is still some more to cleanup, but this now
can be used as an incrementally updated source-of-truth for the LSP
- re-compile files when they are saved. Ideally this would be done
everytime they are changed but that:
  - may be too aggressive
- goalc doesn't compile incrementally yet so it likely would be a worse
UX

Features added, see
https://github.com/open-goal/opengoal-vscode/issues/256
- Hover

![image](https://github.com/open-goal/jak-project/assets/13153231/58dadb5d-582c-4c1f-9ffe-eaa4c85a0255)

![image](https://github.com/open-goal/jak-project/assets/13153231/b383adde-57fc-462c-a256-b2de5c30ca9a)
- LSP Status fixed
- Type Hierarchy

![image](https://github.com/open-goal/jak-project/assets/13153231/8e681377-1d4e-4336-ad70-1695a4607340)
- Document Color

![image](https://github.com/open-goal/jak-project/assets/13153231/4e48ccd8-0ed1-4459-a133-5277561e4201)
- Document Symbols
![Screenshot 2024-03-27
004105](https://github.com/open-goal/jak-project/assets/13153231/8e655034-43c4-4261-b6e0-85de00cbfc7f)
- Completions
![Screenshot 2024-03-30
004504](https://github.com/open-goal/jak-project/assets/13153231/d123a187-af90-466b-9eb7-561b2ee97cd1)

---------

Co-authored-by: Hat Kid <6624576+Hat-Kid@users.noreply.github.com>
2024-03-30 19:49:07 -04:00
Hat Kid dacb704ef6
decomp3: more engine stuff, fix ja macro detection for jak 2/3, unmerged let matcher, part-tracker-spawn macro (#3436)
- `aligner`
- `effect-control`
- `pov-camera`
- `powerups`
- `los-control-h`
- `airlock`
- `water-anim`
- `blocking-plane`
- `proc-focusable-spawner`
- `idle-control`
- `enemy-h`
- `nav-enemy-h`
- `enemy`
- `enemy-states`
- `particle-curves`
- `base-plat`
- `plat`
- `bouncer`
- `elevator`
- `rigid-body`
- `rigid-body-queue`
- `process-taskable`
- `scene-actor`
- `warp-gate`
- `guard-projectile`
- `metalhead-projectile`
- `los-control`
- `joint-exploder`
- `ragdoll-test`
- `debris`
- `shield-sphere`
- `text`
- `target-launch`
2024-03-30 10:28:02 -04:00
water111 ee015e3b22
[jak3] A bunch of small fixes to get game.cgo to load (#3435)
The `test-play` macro is back, though it doesn't call `play` yet. We can
at least load all of `game.cgo`, which involves loading a lot of the
code we've decompiled, loading/linking objects files compiled by
OpenGOAL (like dir-tpages), and loading/linking Jak's art-groups (for
jak 3 they are stored v5 format that I added to the linker).

There were no major issues - just a few forgotten mips2c entries and
minor bugs/functions that needed stubs. Most of the work was updating
the linker. Hopefully I'll never have to touch that code again - I think
it supports everything we need for jak 3!
2024-03-24 16:30:28 -04:00
water111 9b4b54978a
decomp drawable, main (#3434) 2024-03-24 12:27:04 -04:00
water111 ffe01a352d
Decompile level (#3433) 2024-03-23 13:03:01 -04:00
Hat Kid 99866cec88
decomp3: more engine files, get-texture macro, use print method in autogenerated inspect, fix bitfield float print (#3432)
- `fma-sphere`
- `prim-beam-h`
- `cam-start`
- `ragdoll`
- `light-trails-h`
- `light-trails`
- `menu`
- `water`
- `water-flow`
- `hud`
- `hud-classes`
- `progress`
- `progress-draw`

---

The `get-texture` macro replaces calls to `lookup-texture-by-id` and
`lookup-texture-by-id-fast`. The `defpart` macro detection was modified
to print a pair like `(texture-name tpage-name)` for the texture field
that gets turned into a `texture-id` constant. Only used in Jak 3 at the
moment, I'll probably go through the other games at a later point.
2024-03-23 09:25:11 -04:00
OpenGOAL Bot 9a9f203d8b
CI: Periodic Controller Database Update (#3430)
Updating Controller Database

Co-authored-by: OpenGOALBot <OpenGOALBot@users.noreply.github.com>
2024-03-23 09:10:55 -04:00
water111 ea4820356c
Decompile tfrag, tie, prim (#3429)
These still need to be ported to PC.
2024-03-17 13:32:05 -04:00
water111 f7bfc8cab1
Decompile font, decomp, background, shrubbery (#3428) 2024-03-16 20:25:30 -04:00
water111 13def9a8b2
Decompile foreground and bones (#3427)
Small fix to decompiler when the original compiler uses `ra` register.
This seems to happen in "normal" code very rarely - perhaps they
manually specified this in an `rlet`.

Start figuring out buckets/textures for Jak 3.

The foreground code is not yet modified for PC - I want to wait until
the game is running, since it is too hard to do it now.
2024-03-16 14:50:41 -04:00
Brent Hickey df2f3da321
[goal] Add labels, break, and continue to loops (#3426)
Uses (block) and (return-from) to support (break) and (continue) with
labeling

Supports `(while) (until) (dotimes) (countdown) (loop) (doarray)`

Test cases:
``` lisp
(dotimes (i 5)
    (when (= i 2)
        (break)
    )
    (format #t "i: ~D~%" i)
)
;; Output:
;; i: 0
;; i: 1

(dotimes (i 5)
    (when (= i 2)
        (continue)
    )
    (format #t "i: ~D~%" i)
)
;; Output:
;; i: 0
;; i: 1
;; i: 3
;; i: 4

(dotimes (i 3)
    (when (= i 2)
        (continue)
    )
    (format #t "outer: ~D~%" i)
    (dotimes (i 3)
        (when (= i 0)
            (continue)
        )
        (format #t "inner: ~D~%" i)
    )
)
;; Output:
;; outer: 0
;; inner: 1
;; inner: 2
;; outer: 1
;; inner: 1
;; inner: 2

(dotimes (i 5) :label outer
    (when (= i 2)
        (continue :from outer)
    )
    (format #t "outer: ~D~%" i)
    (dotimes (i 3)
        (when (= i 1)
            (continue :from outer)
        )
        (format #t "inner: ~D~%" i)
    )
)
;; Output:
;; outer: 0
;; inner: 0
;; outer: 1
;; inner: 0
;; outer: 3
;; inner: 0
;; outer: 4
;; inner: 0

(dotimes (i 5) :label outer
    (when (= i 2)
        (continue :from outer)
    )
    (format #t "outer: ~D~%" i)
    (dotimes (i 3)
        (when (= i 0)
            (break :from outer)
        )
        (format #t "inner: ~D~%" i)
    )
)
;; Output:
;; outer: 0

(dotimes (i 5) :label outer
    (when (= i 2)
        (continue :from outer)
    )
    (format #t "outer2: ~D~%" i)
    (dotimes (i 3)
        (when (= i 1)
            (break)
        )
        (format #t "inner2: ~D~%" i)
    )
)
;; Output:
;; outer2: 0
;; inner2: 0
;; outer2: 1
;; inner2: 0
;; outer2: 3
;; inner2: 0
;; outer2: 4
;; inner2: 0

(countdown (i 5)
    (when (= i 2)
        (continue)
    )
    (format #t "i: ~D~%" i)
)
;; Output: 
;; i: 4
;; i: 3
;; i: 1
;; i: 0

(let ((i 0))
    (while (< i 5)
        (when (= i 1)
            (break)
        )
        (format #t "i: ~D~%" i)
        (1+! i)
    )
)
;; Output: 
;; i: 0

(let ((i 0))
    (until (> i 5) :label outer
        (loop
            (break :from outer)
        )
        (format #t "i: ~D~%" i)
        (1+! i)
    )
)
;; Output:
;; nothing

(define *array* (new 'global 'boxed-array uint32 3))
(doarray (i *array*)
   (break)
   (format #t "doarray")
)
;; Output:
;; nothing

(doarray (i *array*) :label arrayloop
    (dotimes (i 5)
        (when (= i 2)
            (continue :from arrayloop)
        )
        (format #t "i: ~D~%" i)
    )
    (format #t "doarray~%")
)
;; Output:
;; i: 0
;; i: 1
;; i: 0
;; i: 1
;; i: 0
;; i: 1
```
2024-03-16 14:47:36 -04:00
water111 82fb2cc26a
Port bones.gc math to GOAL (#3425)
Reverse engineer the skinning matrix calculation and port to GOAL. This
is about 3x faster than the MIPS2c version.

As usual, there is a `*use-new-bones*` flag to go back to the old
version.

Fix for a bug in the compiler's `.div.vf` implementation (only happens
if src/dst are the same), and fix for a typo in the register allocator
that would sometimes cause it not to consider xmm8-xmm15.
2024-03-15 20:31:11 -04:00
Hat Kid 5a8b4e81f9
decomp3: more engine stuff, support boxed stack arrays in compiler (#3424)
- `sync-info`
- `trajectory`
- `camera`
- `cam-update`
- `cam-states`
- `cam-states-dbg`
- `cam-master`
- `cam-layout`
- `cam-interface`
- `cam-combiner`

Closes #2016
2024-03-15 20:28:26 -04:00
OpenGOAL Bot f30b6927b7
CI: Periodic Controller Database Update (#3423)
Updating Controller Database

Co-authored-by: OpenGOALBot <OpenGOALBot@users.noreply.github.com>
2024-03-11 23:39:01 -04:00
water111 fae20a19fc
[jak3] Decompile sprite and debug files (#3420) 2024-03-10 21:11:41 -04:00
Tyler Wilding 937af7984f
g/j2: workaround intermittent lifeseed DMA crash (#3418)
This is not a fix, but it temporarily works around the potential crash
discussed here https://github.com/open-goal/jak-project/issues/2988

As long as this doesn't impact other things, this feels like a good
interim fix, as having a broken cutscene is better than a fatal crash
and it might be some time before this is properly identified and fixed.
2024-03-09 19:31:00 -05:00
Tyler Wilding d9d09a8bc2
g/j2: Update some vehicle related naming (#3419)
While looking into https://github.com/open-goal/jak-project/issues/3289
I renamed a few things
2024-03-09 19:30:44 -05:00
Tyler Wilding 4ca84f9a97
d/j3: ensure type-tests pass (#3414)
Make this test run in CI as the game is not done yet, CI in master is
failing because something was missed (forward declaration)
2024-03-09 14:45:57 -05:00
Tyler Wilding 62fa9d80e1
Fix minor issues related to the speedrunner mode menu, also stop saving the pc-settings every frame when sr mode is on (#3413)
Fixes #3209
2024-03-09 14:45:49 -05:00
water111 390a511055
[jak3] Decompile sprite (#3412)
Decompile `sprite.gc`. Also update the DMA macro for a small change in
Jak 3: a check to see if nothing was added to the bucket.
2024-03-09 12:14:12 -05:00
Tyler Wilding 0626862a8c
Fix issues with camera movement with controller when mouse tracking is also enabled (#3409)
Fixes #3408
2024-03-07 23:35:38 -05:00
Tyler Wilding a80f4e7cca
ci: move to macos-12 (#3407)
macos-11 is end of life, it has been for 5 months
https://endoflife.date/macos, it will be removed as a runner on github
in Q2 2024. Next release will require atleast macOS 12.


![300882082-ac6ef1f1-8e18-4af1-a97f-d38cf82885df](https://github.com/open-goal/jak-project/assets/13153231/88bed2ae-8059-4d01-b4a6-8994af131c89)
2024-03-06 23:40:00 -05:00
Tyler Wilding 5b9106302d
ci: move to sccache (#3404)
The original buildcache action has been archived, and buildcache itself
has also moved to github.

I forked the action and was updating it to work, but then the latest
buildcache release once again breaks support for older runners (in our
case, macos-12 is the lowest, which is acceptable as 11 is EOL).

Either way, switching to sccache is not only a way cleaner solution but
it is also well maintained (and works!)
2024-03-06 22:21:36 -05:00
Tyler Wilding ecd6091d7f
deps: SDL update to 2.30.0 (#3384)
In the hopes that some things have been fixed in the last year
(GAME_CONTROLLER init time, etc)

Make sure this does not regress #2691
2024-03-05 22:12:13 -05:00
Tyler Wilding 60db0e5ef9
deps: update fmt to latest version (#3403)
This updates `fmt` to the latest version and moves to just being a copy
of their repo to make updating easier (no editing their cmake / figuring
out which files to minimally include).

The motivation for this is now that we switched to C++ 20, there were a
ton of deprecated function usages that is going away in future compiler
versions. This gets rid of all those warnings.
2024-03-05 22:11:52 -05:00
OpenGOAL Bot b819f852b6
CI: Periodic Controller Database Update (#3397)
Updating Controller Database

Co-authored-by: OpenGOALBot <OpenGOALBot@users.noreply.github.com>
2024-03-04 20:06:14 -08:00
ManDude 7b926b5283
jak2 pckernel: save pc-settings on cheat progress and regular auto-saves (#3396)
Fixes #3392
2024-03-04 02:10:03 +00:00
Tyler Wilding 258fd75cd6
decomp: update naming across jak2/3 (#3395) 2024-03-03 20:49:40 -05:00
water111 9f55e41146
[joint] fix missing matrix interpolation (#3394)
I was missing one of the ways that the joint animation was interpolated.
In particular - the `matrix` that defines the root position of the
object.
2024-03-03 15:15:37 -05:00
Hat Kid 2969833b2d
decomp3: more engine stuff, detect non-virtual state inheritance (#3377)
- `speech`
- `ambient`
- `water-h`
- `vol-h`
- `generic-obs`
- `carry-h`
- `pilot-h`
- `board-h`
- `gun-h`
- `flut-h`
- `indax-h`
- `lightjak-h`
- `darkjak-h`
- `target-util`
- `history`
- `collide-reaction-target`
- `logic-target`
- `sidekick`
- `projectile`
- `voicebox`
- `ragdoll-edit`
- most of `ragdoll` (not added to gsrc yet)
- `curves`
- `find-nearest`
- `lightjak-wings`
- `target-handler`
- `target-anim`
- `target`
- `target2`
- `target-swim`
- `target-lightjak`
- `target-invisible`
- `target-death`
- `target-gun`
- `gun-util`
- `board-util`
- `target-board`
- `board-states`
- `mech-h`
- `vol`
- `vent`
- `viewer`
- `gem-pool`
- `collectables`
- `crates`
- `secrets-menu`

Additionally:

- Detection of non-virtual state inheritance
- Added a config file that allows overriding the process stack size set
by `stack-size-set!` calls
- Fix for integer multiplication with `r0`
- Fixed detection for the following macros:
	- `static-attack-info`
- `defpart` and `defpartgroup` (probably still needs adjustments, uses
Jak 2 implementation at the moment)
- `sound-play` (Jak 3 seems to always call `sound-play-by-name` with a
`sound-group` of 0, so the macro has been temporarily defaulted to use
that)

One somewhat significant change made here that should be noted is that
the return type of `process::init-from-entity!` was changed to `object`.
I've been thinking about this for a while, since it looks a bit nicer
without the `(none)` at the end and I have recently encountered init
methods that early return `0`.
2024-03-03 15:15:27 -05:00
ZedB0T 6822e5cc71
Fix (-> *autosplit-info-jak1* training-num-orbs) when blacked out (#3297)
When loading a save, these values are temporarily 0, and it messes with
the autosplitter so we want to ignore them then.
2024-02-28 19:14:50 -05:00
Tyler Wilding ccd47f8465
formatter: Format deftype correctly (#3391)
New configuration options to format column widths in deftype field
definitions. Also force each field/method/state to be inlined.
2024-02-27 20:12:44 -05:00
OpenGOAL Bot 8f1aba639c
CI: Periodic Controller Database Update (#3389)
Updating Controller Database

Co-authored-by: OpenGOALBot <OpenGOALBot@users.noreply.github.com>
2024-02-26 13:32:08 -05:00
Tyler Wilding 5eeaffcde0
scripts: new linter script to detect goal_src files with trailing whitespace (#3387)
Removes trailing whitespace from goal_src files, eventually the
formatter will do this as well but it's not ready yet so this is a
decent interim solution.

A competent text editor will also do this / flag it for you.
2024-02-24 14:27:56 -05:00
Luminar Light 0ae0938965
Only remove -vis from name if it is part of the name. (#3257)
During level extraction, the last 4 characters of the level name are
always removed, because it is assumed that '-vis' is there. But it isn't
always there. This is especially true in post-TPL games.

This causes multiple problems:
- There can be levels in the extraction that will miss their last 4
characters from their name, which is sad, and may make it harder to
identify them.
- If there are '-vis'-less levels whose names are identical apart from
the last 4 characters, the extractor will only get the last one (it
probably extracts all but overwrites everything but the last one). For
example 'ctyasha' and 'ctykora'.

This issue affects the glb extraction and the entities json extraction.

I personally think that just keeping the -vis in the name would be the
best solution, but I guess there was a reason why it was decided that it
should be removed from the name. So to adapt to this, my implementation
will still remove '-vis' from the name, but only if it is actually in
the name - otherwise it won't remove anything.

I hope my changes didn't break anything. Extraction seemed to run fine
after my changes, and I was able to see both ctyasha and ctykora json
files. And didn't see any '-vis', so it is still properly removed.

---------

Co-authored-by: Tyler Wilding <xtvaser@gmail.com>
2024-02-24 14:13:48 -05:00
Tyler Wilding db66ae4627
g/j2: Dynamic speedrun mode categories and implement a significant amount of a practice mode (#3378)
For example, `AppData/OpenGOAL/jak2/features/speedrun-categories.json`
is defined as such:
```json
[
  {
    "cheats": 0,
    "completed_task": 0,
    "continue_point_name": "",
    "features": 0,
    "forbidden_features": 992,
    "name": "Gunless",
    "secrets": 0
  },
  {
    "cheats": 1,
    "completed_task": 29,
    "continue_point_name": "ctypal-shaft",
    "features": 1024,
    "forbidden_features": 0,
    "name": "Turbo Jetboard - After Praxis 1",
    "secrets": 0
  }
]
```
> These entries can be created using the in-game menu as well.


https://github.com/open-goal/jak-project/assets/13153231/9b17a116-4aa9-40ad-b9f5-02b04e0ad4f3

---------

Co-authored-by: dallmeyer <2515356+dallmeyer@users.noreply.github.com>
2024-02-23 19:04:44 -05:00
Brent Hickey 685ff2cf1c
[high fps] Increase input buffer size and fix cloud scroll speed (#3178)
The game stores the last 3 frames of input (50ms of time at 60fps) and
often checks if a button was pressed within those 3 saved frames as a
condition.

When transitioning states, it often checks if some input was received
during the previous state (within those 3 frames) in order to quickly
transition out. A good example of this is when transitioning to
standing, it checks if you can jump this frame and if you had pressed X
recently, and if so, transition immediately to jump. This allows
transitions between states to feel more smooth/forgiving by letting you
jump at a later time when you are transitioning from falling->standing
than if you were only falling.

At 165fps the last 3 frames is only 18ms of time so the input windows
for these smooth transitions are almost 3x shorter.

This PR saves 15 input frames (enough to cover 50ms of time at 300fps)
for each controller and adds a (recently-pressed?) macro that checks all
15 frames. However, it only updates the necessary frames in history
based on the current frame rate. This way, 60fps continues to only check
against 3 input frames, 165fps checks against 9, 240fps checks against
12, and 300fps checks all 15.

---------

Co-authored-by: Tyler Wilding <xtvaser@gmail.com>
2024-02-23 18:58:45 -05:00
Tyler Wilding d1a6c60eb8
game: disable keyboard input by default, give users a way to enable it via the imgui menu (#3295)
It was narrowed down recently that a lot of people have issues with the
controller input because of Steam Input working as intended. Steam Input
can be configured to replicate controller inputs as keyboard inputs (for
example, pressing X on your controller presses Enter on the keyboard).

This results in the problem of "jumping pauses the game" and similar
issues. This is a consequence of the intended behaviour of the game
listening to all input sources at the same time.

Since the vast majority of players are using controllers over keyboards,
it makes sense to disable the keyboard input by default to solve this
problem. However that makes things awkward for users that want to use
the keyboard (how do they enable the setting). The solution is a new
imgui option in the settings menu:
![Screenshot 2024-01-07
141224](https://github.com/open-goal/jak-project/assets/13153231/6f9ffa2d-be7a-433d-b698-15b70210e97e)

**Known issue that I don't care about** -- in Jak 1's menu code, since
the flags are controlled by pointers to values instead of a lambda like
in jak 2, the menu won't update live with the imgui option. This has no
functional impact and I don't care enough to fix it.

I also made the pc-settings.gc file persist on first load if the file
wasn't found. Hopefully this helps diagnose the support issues related
to the black screen.

# Why not just ignore the keyboard inputs for a period of time?

This won't work, the keyboard is polled every frame. Therefore if you
hold down the X button on your controller, steam is continuously
signaling that `Enter` is held down on the keyboard.

Yes it would be possible to completely disable the keyboard while the
controller is being used, but this defeats the purpose of creating an
input system that allows multiple input sources at the same time.

With an explicit option, not only can the user decide the behaviour they
want (do they want the keyboard ignored or simultaneously listened to)
but we avoid breaking strange edge-cases in usage leading to never
ending complexity:
- ie. imagine steam input sends events to the mouse, well you can't
disable the mouse while using the keyboard because most times people are
using mouse and keyboard
- ie. a user that wants to hold a direction with the keyboard and press
buttons on the controller in tandem (something i frequently do while
TAS'ing, to move in a perfect straight line)
2024-02-23 18:19:07 -05:00
Matt Dallmeyer d5f92efcda
Rename bigmap-id enum entries (#3380)
also fixed some docstrings that were swapped
2024-02-23 14:46:57 -05:00
Tyler Wilding 7c223b1873
g/j2: allow customizing the speedrunner menu bind (#3386)
The bind carried forward from Jak 1 is annoying -- R1 shoots the gun.
Allow the user to use whatever button combination they want by modifying
it in the `pc-settings` file.

```clj
  (controller-led-status? 1360729)
  (speedrunner-mode-custom-bind 4098)
```
2024-02-23 14:45:25 -05:00
Tyler Wilding 7ae1b4bf1c
g/j2: properly wireup mouse settings, properly detect when the mouse has stopped moving (#3383)
- Wired up the menu settings to change the settings in game, not just on
boot
- Removed all the duplication in the game options menu code
- Fixed the mouse code so that it properly brings the virtual analog
stick back to neutral when the mouse stops
- Extended the sensitivity min/max for those that want to ensure the
slightest movement maxes out virtual analog stick.
2024-02-23 14:44:40 -05:00
Tyler Wilding 1cc20508e9
tracing: add some more startup related events and a new --profile-until-event flag (#3385)
While trying to narrow down why sometimes SDL takes 20-40seconds to
initialize I built up some more profiling features.

TLDR - I still don't know why SDL is taking a long time but I've
narrowed it down to it initializing the `GAME_CONTROLLER` subsystem.
This isn't unprecedented, I found numerous github issues and articles
suggesting this is the problem:

![image](https://github.com/open-goal/jak-project/assets/13153231/1853326b-7a40-458e-87a0-f7a9f44781e3)

I imagine it is hardware/OS related on some level, there are even some
recent commits in SDL that have made it worse on certain platforms. I've
had this problem myself so I will hope to get it again soon so i can
debug where in the SDL code the delay occurs and make a proper bug
report. Hopefully this helps but it's not yet confirmed -
https://github.com/open-goal/jak-project/pull/3384
2024-02-23 14:44:17 -05:00
Tyler Wilding 1af6503784
New Crowdin updates (#3382) 2024-02-19 23:17:29 -05:00
Tyler Wilding ee2880b985
lsp: revert unnamed variable labelling (#3381)
This didn't really pan out as I hoped since files can have thousands of
these and there is a limit to how many diagnostics are shown (starting
from the top of the file). This also may have caused the recent
instability in the LSP, disabling this i wasn't able to reproduce an LSP
crash cycling through 50-100 files.
2024-02-19 21:17:20 -05:00
OpenGOAL Bot c4d3027d04
CI: Periodic Controller Database Update (#3379)
Updating Controller Database

Co-authored-by: OpenGOALBot <OpenGOALBot@users.noreply.github.com>
2024-02-19 14:01:34 -05:00
Ziemas 4e569f0115
Switch to std::span (#3376)
Now that we have cpp20 we can ditch nonstd::span.

Depends on #3375
2024-02-18 13:23:19 -05:00
Ziemas 0011fb4b2b
Fix remaining cpp20 issues (#3375) 2024-02-17 20:16:46 -05:00