Commit graph

2599 commits

Author SHA1 Message Date
Tyler Wilding de710e86ad
format/j1: reformat recently modified files 2024-06-05 21:36:02 -04:00
Tyler Wilding 209a997717
Merge branch 'master' into v/format-jak1 2024-06-05 21:01:53 -04:00
ManDude 37762c5fb7
wrap sprite rgba to 0-255 (#3549) 2024-06-04 07:57:52 +01:00
OpenGOAL Bot a18d9dd4d0
CI: Periodic Controller Database Update (#3548)
Updating Controller Database

Co-authored-by: OpenGOALBot <OpenGOALBot@users.noreply.github.com>
2024-06-03 23:00:48 -04:00
Tyler Wilding a9bdb0136e
New Crowdin updates (#3547)
People seem to be translating lines that aren't in the base english one,
such as `mtn-plat-buried-rocks-a`

This is fine, but Crowdin will continue to remove these every sync PR
because they aren't in the base english file. So some kind of
segregation needs to happen.

If we didn't want these scenes translated, then they should be banned
from being translated via the editor / etc in the first place (shouldn't
have been included in the metadata).
2024-06-03 01:01:58 -04:00
Tyler Wilding eb703ee96e
REPL related improvements and fixes (#3545)
Motivated by - https://github.com/open-goal/opengoal-vscode/pull/358

This addresses the following:
- Fixes #2939 spam edge-case
- Stop picking a different nREPL port based on the game mode by default,
this causes friction for tools in the average usecase (having a REPL
open for a single game, and wanting to connect to it). `goalc` spins up
fine even if the port is already bound to.
- For people that need/want this behaviour, adding per-game
configuration to the `repl-config.json` is on my todo list.
- Allows `goalc` to permit redefining symbols, including functions. This
is defaulted to off via the `repl-config.json` but it allows you to for
example, change the definition of a function without having to restart
and rebuild the entire game.
![Screenshot 2024-06-02
124558](https://github.com/open-goal/jak-project/assets/13153231/28f81f6e-b7b8-4172-9787-f96e4ab1305b)
- Updates the welcome message to include a bunch of useful metadata
up-front. Cleaned up all the startup logs that appear when starting
goalc, many of whom's information is now included in the welcome
message.
  - Before:

![image](https://github.com/open-goal/jak-project/assets/13153231/814c2374-4808-408e-9ed6-67114902a1d9)

  - After:
![Screenshot 2024-06-01
235954](https://github.com/open-goal/jak-project/assets/13153231/f3f459fb-2cbb-46ba-a90f-318243d4b3b3)
2024-06-03 00:14:52 -04:00
ManDude 39786482a1
jak3: airlock speed hacks + make cutscenes skip properly (#3543) 2024-06-02 15:03:58 +01:00
ManDude f586cb9af2
fix nav mesh debugging crash (#3542) 2024-06-01 00:50:14 +01:00
ManDude ea1271cfd0
[jak3] implement autocollect and city turbo board cheats, fix actor heap and level flags (#3541) 2024-05-31 16:41:35 +01:00
Aloqas cefb371681
[jak2] new subtitle speakers (#3536)
for specific cutscene scenarios

---------

Co-authored-by: Tyler Wilding <xtvaser@gmail.com>
2024-05-30 22:02:44 -04:00
Matt Dallmeyer 70ea2a1f67
jak3 - fill out some text-id entries (#3494)
Slam Dozer > Ram Rod
2024-05-30 21:49:10 -04:00
Hat Kid c64eea6337
[buildactor] support generating collide-meshes for custom models (#3540)
This adds support for generating collide meshes when importing custom
models. A couple of things to keep in mind:

- A single `collide-mesh` may only have up to 255 vertices.
- When exporting a GLTF file in Blender, a `collide-mesh` will be
generated for every mesh object that has collision properties applied
(ideally, you would set all visual meshes to `ignore` and your collision
meshes to `invisible` in the OpenGOAL plugin's custom properties).
- Ensure that your actor using the model properly allocates enough
`collide-shape-prim-mesh`es for each `collide-mesh` ([example from the
original game that uses multiple
meshes](f6688659f2/goal_src/jak1/levels/finalboss/robotboss.gc (L2628-L2806))).

~One annoying problem that I haven't fully figured out yet (unrelated to
the actual functionality):
`collide-mesh`es are stored in art groups as an `(array collide-mesh)`
in the `art-joint-geo`'s `extra`, so I had to add a new `Res` type to
support this. The way that `array`s are stored in `res-lump`s is a bit
of a hack right now. The lump only stores a pointer to the array, so the
size of that is 4 bytes, but because we have to generate all the actual
array data too, the current `ResLump` code in C++ doesn't handle this
case well and would assert, so I decided to omit the asserts if an
`array` tag is present and "fake" the size so the object file is
generated more closely to how the game expects it until we figure out
something better.~
This was fixed by generating the array data beforehand and creating a
`ResRef` class that takes the pointer to the array data and adds it to
the lump.
2024-05-29 06:09:20 +02:00
Tyler Wilding f1de2c9bc5
g/j2: add some debug menu options to unlock things and give orbs/gems/ammo (#3539)
Adds some debug options that make it easier to quickly complete the
game, get orbs, unlock cheats, etc.


![image](https://github.com/open-goal/jak-project/assets/13153231/8854dc42-084a-457e-ae9b-e9ba2dd7917c)
2024-05-27 22:58:52 -04:00
Tyler Wilding f6688659f2
game: fix the path the--portable flag determines (#3537)
`--portable` was using the path to the executable's file, instead of the
directory that contains the executable
2024-05-26 00:40:33 -04:00
Tyler Wilding c528cf9ec3
decomp: automatically format the outputs for jak 1 if future updates occur 2024-05-25 13:48:21 -04:00
Tyler Wilding 4a746655a2
format: remove now redundant top-level comments
`;; (?:name|name in dgo|dgos):.*\n`
2024-05-25 13:32:26 -04:00
Tyler Wilding 005fd46a96
formatter: handle multi-quoted expressions 2024-05-25 13:29:25 -04:00
OpenGOAL Bot 12ce274226
CI: Periodic Controller Database Update (#3528)
Updating Controller Database

Co-authored-by: OpenGOALBot <OpenGOALBot@users.noreply.github.com>
2024-05-25 10:51:09 -04:00
Matthew Wells bd2db7b15a
Add periods to lines in code_status.md for consistency (#3521) 2024-05-25 10:51:01 -04:00
Tyler Wilding e67a3ea4c3
scripts: add a script to compare compilation outputs 2024-05-24 22:57:22 -04:00
Tyler Wilding 0e4b6f2c11
format/j1: fix empty list handling 2024-05-24 22:46:55 -04:00
Tyler Wilding eadfcca261
Merge remote-tracking branch 'origin/master' into v/format-jak1 2024-05-24 21:51:52 -04:00
Tyler Wilding f00dbf15fe
format/j1: fix loop mistake 2024-05-24 21:51:38 -04:00
Tyler Wilding ba88a54902
format/j1: re-format all files to catch any improvements made along the way 2024-05-24 01:45:27 -04:00
Tyler Wilding 59194f78a0
format/j1: all files in goal_src/jak1 are formatted 2024-05-24 01:16:16 -04:00
ManDude 645e649a9c
jak3: shadow culling hack + finish region debugging tools + fix bigmap crashes (#3532) 2024-05-23 23:43:38 +01:00
ManDude dd765b41cb
jak 3 shadows (#3530)
![image](https://github.com/open-goal/jak-project/assets/7569514/e48dbbb8-82d9-4b9d-8ae4-3f48f7c35ced)
2024-05-23 18:29:42 +01:00
Tyler Wilding 6d183980db
format/j1: 75% done 2024-05-23 01:12:44 -04:00
ManDude 0db7be55e6
jak3: sprite limit increase + add bsphere toggle for region faces (#3529) 2024-05-22 16:27:00 +01:00
Tyler Wilding eadd3e877c
format/j1: halfway done 2024-05-21 00:40:31 -04:00
Tyler Wilding d637daf3f1
format/j1: another 15% of the codebase done 2024-05-20 15:04:15 -04:00
Tyler Wilding 434ff62d3d
formatter: more core formatter improvements and tweaks 2024-05-20 15:04:06 -04:00
Tyler Wilding 6eaeb31930
formatter: better support for function calls from functions but it's still not great, requires more research 2024-05-19 00:13:22 -04:00
Tyler Wilding 32ec1c0100
format/j1: made it through about 10% of files 2024-05-18 21:50:46 -04:00
Tyler Wilding 0f40f33dfd
formatter: more improvements and support for things like lambdas 2024-05-18 21:50:34 -04:00
Tyler Wilding 588b27cbcf
g/j1: remove redundant type name in defmethods that were missed
`defmethod\s(?!new\b)[^\s]+\s[^(]`
2024-05-18 15:23:45 -04:00
Tyler Wilding 44c08d23a5
format/j1: first 25ish files 2024-05-18 15:08:39 -04:00
Tyler Wilding 9f2bcf6519
formatter: more changes to constant pairs 2024-05-18 15:04:43 -04:00
Tyler Wilding 59d25e41a7
scripts: script to help keep track of formatting progress of goal_src 2024-05-18 13:50:36 -04:00
Tyler Wilding 42a8df39ef
formatter: bunch of updates to the formatter 2024-05-18 13:50:24 -04:00
Hat Kid 62ef9fe49d
[wip] build actor tool (#3266)
This does a couple of things:

- The `custom_levels` folder was renamed to `custom_assets` and contains
`levels`, `models` and `texture_replacements` folders for Jak 1, 2 and 3
in order to keep everything regarding custom stuff in one place.
- With this, texture replacements now use separate folders for all games
- A build actor tool was added that generates art groups for custom
actors
- Custom levels can now specify what custom models from the `models`
folder they want to import, this will add them to the level's FR3.
- A `test-zone-obs.gc` file was added, containing a `test-actor` process
that uses a custom model as an example.

The build actor tool is still very WIP, the joints and the default
animation are hardcoded, but it allows for importing any GLB file as a
merc model.
2024-05-18 18:18:25 +02:00
water111 271007e552
Start setting up texture animation for jak 3. (#3524)
For now, this just adds sky (clouds and fog), darkjak, and skull gem.

There are some unknown issues with drawing the skull gems still, but I
think it's unrelated to texture animations.

Also fixes https://github.com/open-goal/jak-project/issues/3523
2024-05-18 11:23:48 -04:00
Hat Kid a61f24a168
jak3: custom level support (#3522) 2024-05-16 21:15:54 +02:00
Hat Kid c12a5d777c
decomp3: decompile remaining mission code (#3515)
This should make all missions playable with the exception of the end of
`precursor-destroy-ship` because `precurd` asserts on level extraction.

- `trail`
- `trail-graph`
- `wastrail-graph`
- `cty-protect`
- `protect-gunship`
- `protect-path`
- `protect-script`
- `assault-cams`
- `assault-enemies`
- `assault-path`
- `assault-script`
- `assault-shared`
- `assault-task`
- `hover-nav-precura`
- `precura-mood`
- `precura-obs`
- `precura-obs2`
- `precura-part`
- `precurc-mood`
- `precurc-obs`
- `precurc-part`
- `precurd-obs`
- `precurd-part`
- `precurd-scenes`
2024-05-16 16:21:44 +02:00
Tyler Wilding 456d1ba536
goalc: add a performance report feature (#3519)
Adds a quick perf report feature to `goalc` that lets you compare how
much faster / slower it takes to compile the projects, with some simple
features like filtering the files, adjusting for how large of a margin
of error in the speeds you care about, and which test iteration you want
to compare against.

This is something I plan to use as I work more in `goalc` as an easy way
to track / show the results.


![image](https://github.com/open-goal/jak-project/assets/13153231/26f140c7-66d7-4162-994a-a71061e22857)
2024-05-15 22:52:16 -04:00
OpenGOAL Bot 4aafab2fc9
CI: Periodic Controller Database Update (#3517)
Updating Controller Database

Co-authored-by: OpenGOALBot <OpenGOALBot@users.noreply.github.com>
2024-05-13 20:37:21 -04:00
ManDude ebbbedabc5
jak3: fix hud sprite crash + add entity debugger (#3516) 2024-05-13 04:09:25 +01:00
Tyler Wilding d1ece445d4
Dependency graph work - Part 1 - Preliminary work (#3505)
Relates to #1353 

This adds no new functionality or overhead to the compiler, yet. This is
the preliminary work that has:
- added code to the compiler in several spots to flag when something is
used without being properly required/imported/whatever (disabled by
default)
- that was used to generate project wide file dependencies (some
circulars were manually fixed)
- then that graph underwent a transitive reduction and the result was
written to all `jak1` source files.

The next step will be making this actually produce and use a dependency
graph. Some of the reasons why I'm working on this:
- eliminates more `game.gp` boilerplate. This includes the `.gd` files
to some extent (`*-ag` files and `tpage` files will still need to be
handled) this is the point of the new `bundles` form. This should make
it even easier to add a new file into the source tree.
- a build order that is actually informed from something real and
compiler warnings that tell you when you are using something that won't
be available at build time.
- narrows the search space for doing LSP actions -- like searching for
references. Since it would be way too much work to store in the compiler
every location where every symbol/function/etc is used, I have to do
ad-hoc searches. By having a dependency graph i can significantly reduce
that search space.
- opens the doors for common shared code with a legitimate pattern.
Right now jak 2 shares code from the jak 1 folder. This is basically a
hack -- but by having an explicit require syntax, it would be possible
to reference arbitrary file paths, such as a `common` folder.

Some stats:
- Jak 1 has about 2500 edges between files, including transitives
- With transitives reduced at the source code level, each file seems to
have a modest amount of explicit requirements.

Known issues:
- Tracking the location for where `defmacro`s and virtual state
definitions were defined (and therefore the file) is still problematic.
Because those forms are in a macro environment, the reader does not
track them. I'm wondering if a workaround could be to search the
reader's text_db by not just the `goos::Object` but by the text
position. But for the purposes of finishing this work, I just statically
analyzed and searched the code with throwaway python code.
2024-05-12 12:37:59 -04:00
water111 e0b1d8c21e
Jak3 sky (#3514) 2024-05-12 09:36:50 -04:00
Hat Kid 6b3844bf99
decomp3: more misc files (#3513)
4 missions to go!

- `ctygenb-part`
- `power-game`
- `vinroom-part`
- `vinroom-scenes`
- `gungame-part`
- `gungame-scenes`
- `hiphog-obs`
- `hiphog-part`
- `hiphog-scenes`
- `hover-nav-lpattack`
- `king-rider`
- `rubble-attack`
- `rubble-obs`
- `rubble-part`
- `rubblea-init`
- `rublcst-scenes`
- `mood-funcs2`
- `gun-dummy-art`
- `gun-dummy-part`
- `gun-dummy`
- `gungame-data`
- `gungame-manager`
- `gungame-obs`
- `blow-tower-data`
- `blow-tower-extra`
- `blow-tower-obs2`
- `blow-tower-obs`
- `blow-tower-part`
- `blow-tower-script`
- `blow-tower-shared`
- `blow-tower-speech`
- `cty-blow-tower`
2024-05-11 17:57:26 -04:00