This is so I can get rid of wgpu from the launcher, where it's only
purpose is to figure out the GPU name for the support package.
The problem with it is that on some environments, it errors, but the
function cannot have it's errors gracefully handled (it panics and
crashes instead).
So I'm tired of it, do it ourselves.
![image](https://github.com/user-attachments/assets/fa8ae365-b3f7-4794-81ed-fde0c2ffc651)
This adds support for replacing existing merc models in FR3 files with
custom GLB model files. The replacements go in
`custom_assets/<GAME>/merc_replacements`, similar to texture
replacements. When a `.glb` file with a file name that matches any model
present in an FR3 is detected (e.g. `eichar-lod0` for Jak), all merc
model data is replaced with the given model.
Additionally, models for custom actors can now also be added to vanilla
FR3s. The models for this go in
`custom_assets/<GAME>/models/<LEVEL_NAME>` (e.g.
`custom_assets/jak1/models/jungleb/test-actor-lod0.glb`) and will be
added to the FR3 that has a matching name (exception: to add things to
the common level file, the folder should be named `common` instead of
`GAME`).
For custom levels, these now go in
`custom_assets/<GAME>/models/custom_levels` (previously
`custom_assets/<GAME>/models`).
Another small change: When level ripping is enabled, the resulting model
files will now be stored in game name subfolders inside of `glb_out`.
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.
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)
Adds support for adding custom subtitles to Jak 2 audio. Comes with a
new editor for the new system and format. Compared to the Jak 1 system,
this is much simpler to make an editor for.
Comes with a few subtitles already made as an example.
Cutscenes are not officially supported but you can technically subtitle
those with editor, so please don't right now.
This new system supports multiple subtitles playing at once (even from a
single source!) and will smartly push the subtitles up if there's a
message already playing:
![image](https://github.com/open-goal/jak-project/assets/7569514/033e6374-a05a-4c31-b029-51868153a932)
![image](https://github.com/open-goal/jak-project/assets/7569514/5298aa6d-a183-446e-bdb6-61c4682df917)
Unlike in Jak 1, it will not hide the bottom HUD when subtitles are
active:
![image](https://github.com/open-goal/jak-project/assets/7569514/d466bfc0-55d0-4689-a6e1-b7784b9fff59)
Sadly this leaves us with not much space for the subtitle region (and
the subtitles are shrunk when the minimap is enabled) but when you have
guards and citizens talking all the time, hiding the HUD every time
anyone spoke would get really frustrating.
The subtitle speaker is also color-coded now, because I thought that
would be fun to do.
TODO:
- [x] proper cutscene support.
- [x] merge mode for cutscenes so we don't have to rewrite the script?
---------
Co-authored-by: Hat Kid <6624576+Hat-Kid@users.noreply.github.com>
This way a user can take multiple data samples from one/multiple play
sessions quickly. Creates a directory called profile_data that is added
to gitignore to place the data in, and checks to see if a file is there
and if so it creates prof1.json prof2.json prof3.json and so on...
This gets rid of the `auto-lt` and `auto-dbg` CLI args to `goalc` that
have been marked deprecated for a month or so at this point. The
behaviour can be replicated via the `startup.gc` file.
I also removed `decompiler_out/` and `log/` from the repo, as our C++
code is smart enough to create these directories if they are missing now
so they are superfluous
This automatically generates documentation from goal_src docstrings,
think doxygen/java-docs/rust docs/etc. It mostly supports everything
already, but here are the following things that aren't yet complete:
- file descriptions
- high-level documentation to go along with this (think pure markdown
docs describing overall systems that would be co-located in goal_src for
organizational purposes)
- enums
- states
- std-lib functions (all have empty strings right now for docs anyway)
The job of the new `gen-docs` function is solely to generate a bunch of
JSON data which should give you everything you need to generate some
decent documentation (outputting markdown/html/pdf/etc). It is not it's
responsibility to do that nice formatting -- this is by design to
intentionally delegate that responsibility elsewhere. Side-note, this is
about 12-15MB of minified json for jak 2 so far :)
In our normal "goal_src has changed" action -- we will generate this
data, and the website can download it -- use the information to generate
the documentation at build time -- and it will be included in the site.
Likewise, if we wanted to include docs along with releases for offline
viewing, we could do so in a similar fashion (just write a formatting
script to generate said documentation).
Lastly this work somewhat paves the way for doing more interesting
things in the LSP like:
- whats the docstring for this symbol?
- autocompleting function arguments
- type checking function arguments
- where is this symbol defined?
- etc
Fixes#2215
Effects the following files:
- [x] vehicle-rider
- [x] vehicle-control
- [x] vehicle-effects
- [x] vehicle
~~- [ ] vehicle-util~~
- [x] vehicle-physics
- [x] vehicle-states
~~- [ ] vehicle-guard~~
~~- [ ] traffic-engine~~
~~- [ ] traffic-manager~~
With the exception of traffic-engine, most of these files are either
done or have 1-3 stubborn functions remaining. Draft while I try to
resolve as many as possible / cleanup names and such.
Co-authored-by: water <awaterford111445@gmail.com>
Running reference tests/decompiler should now be possible on macos
(arm). Most of the changes were just cleaning up places where we were
sloppy with ifdefs, but there were two interesting ones:
- `Printer.cpp` was updated to not use a recursive function for printing
lists, to avoid stack overflow
- I replaced xxhash with another version of the same library that
supports arm (the one that comes in zstd). The interface is C instead of
C++ but it's not bad to use. I confirmed that the extractor succeeds on
jak 1 iso so it looks like this gives us the same results as the old
library.
Almost done:
- `target-handler` (`(none)` event handler casts and CFG error)
- `target2` (`(none)` event handler casts)
- `powerups` (`cloud-track` does some weird stuff with `handle`s)
- `gun-states` (CFG error)
Some progress in:
- `water-flow`
Additionally:
- Clean up the two year old Jak 3 config file and add a config skeleton
(disassembling seems to not have worked, but I was able to dump obj
files and the `all_scripts` file)
- Fix automatic skelgroup detection and `defskelgroup` macro for Jak 2
(closes#1950)
- When a function decompiles without any major errors, a warning is
generated with the op id for each unresolved load and store that will
likely fail to compile (closes#1933)
For the level builder, I use .bak files whenever I modify a core file in
the project. These let you undo changes, but they don't need to be
pushed. I also couldn't find a nice way to do this, but we should also
ignore all contents of custom_levels besides test-zone.
* Added screenshot hotkey and added a toggle to debug GUI to disable screenshot hotkey (#1765)
* Renamed gfx_dumps folder to screenshots and screenshots taken with hotkey now use game render options not debug gui screenshot render options (#1765)
* Updated get current timestamp to use strftime
* fixed clang formating errors for screenshot hotkey
Co-authored-by: sardap <sardap@users.noreply.github.com>
* scripts: cleanup scripts directory some more
* stash, getting there
* stash again
* closer!
* it works! decently....cleanup time and add some extra features
* minor cleanup
* put some duplicated code in a func
* make jak 2 text "work"
* group up all subtitles c++ code into one folder
* compact single-line subtitles
* fix a couple compiler crashes
* Update game_subtitle_en.gd
* `rolling` and `sunken`
* `swamp`
* `ogre`
* `village3`
* `maincave`
* `snow`
* `lavatube`
* `citadel`
* Update .gitignore
* clang
* fix encoding and decoding for quote
* properly fix quotes
* subtitle deserialize: sort by kind, ID and name
* sub editor: fix line speaker not being converted
* cleanup game text ids 1
* update text ids 2
* update source
* update refs
* fix repl-history saving
* subtitles: fix `\"` edge-case
* subtitles: add almost every remaining (current) cutscene
* merge: master
* subtitles: fix some crashes and disable `Remove Line` as it is broken
* ci: switch to codacy for coverage
* docs: update badges
* decomp: allow overriding config flags via CLI
* cleanup: top level file cleanup
* docs: big README overhaul
Attempt to close#1128 and #1086
* decomp: attempt to detect if `iso_data` is missing or wrongly extracted
* game: switch to `fpng` for screenshots, allow for compression
closes#1035
* game: switch vsync control to a checkbox
* lint: format cpp files
* lint: format json files
* docs/scripts: organize taskfile
* docs: refresh the homepage
* docs: basic gallery support added
* homepage background image back to jpg
* docs: remove data file tracker, as it's soon to be removed
* wip, taking a break to work on asm stuff first
* the goal code for sparticle
* mips2c the first sparticle asm function
* temp
* particle processing no longer crashing
* temp
* working texture cache for vi1 and hud textures
* sprites
* cleanup 1
* temp
* temp
* add zstd library
* temp
* working
* tests
* include fix
* uncomment
* better decomp of sparticle stuff, part 1
* update references
* cleanup `main`
* whitespace
* start `progress` decomp pt1
* fill in more stuff
* Update label_types.jsonc
* run cheats
* clang
* make most of `progress` decompile
* `progress` pt 2
* [decompiler] support dynamic format strings
* Make `progress-draw` decompile and almost all `progress`
* make clang shut up
* fix unhandled format string
* fix `progress-draw`
* Update DecompilerTypeSystem.cpp
* fix?
* fixes
* fix a few functions
* make `language-enum`
* warn on weird floats
* fix minor pad bug
* dump stuff in `progress`
* make `progress-screen` enum
* progress progress
* update refs and fix stupid bug
* trying to get it to work
* it works!?
* disable sound functions
* fixes
* final touches
* tests
* tests
* add process allocations
* use the right register for windows
* another try for windows, counting is hard
* one more try
* use process allocations
Co-authored-by: water <awaterford111445@gmail.com>
* add elzip library (doesn't require zlib)
* Can analyze directly from a PCSX2 save-state now
* Add scaffolding to auto-watch for new save-states
* .gitattributes fix
* ObjectFileDB: Fix crash if obj list text has no objects
* rename "decomp.bat" to "decomp-jak1.bat"
* config: enable expression analysis
* decompile timer-h
* Tab to space.
* add a note to deftype profile-name for the future
* timer-mode: use register name instead of full name
looking at the other types, it looks like NDI seemed to have preferred it this way
* [timer-h] set -> timer-bank mode type to timer-mode
* [timer-h] use register-friendly return value for method
* [timer-h] comment out unsupported feature
* [main-h] remove redundant quote
* Update .gitignore
* Update main-h.gc
* Add a Release build configuration.
* Batch file alternatives for decomp/gc/gk
For the shell-less, or people with a different Windows configuration.
* all-types.gc: Fix typo.
* gcommon.gc: Typo.
* debugger: use enum class for InstructionInfo::Kind
* decompilerIR: use enum class for IR_Store::Kind
* Update all-types.gc
* decompiler: tab to spaces
* root batch files: update directories
* Use a gitignore inside "log" folder to fix windows crashes
* Revert "Update all-types.gc"
This reverts commit 5ef179bb4e.
* Begin spdlog integration for decompiler
* Replace old prints with spdlog equivalents
* clang-format
* Fixes
* Log output to /logs/decompiler.log.
The console now prints that the disassembly has begun and it may take a few minutes to complete. This will reduce the amount of verbose logging output directly to a console stream.
* Update .gitignore
Ignore decompiler output for now
* Resolve more issues
Fixed percentage printing and various other issues
* Fixed stuff I broke (sorry)
* Fix more broke stuff