Commit graph

338 commits

Author SHA1 Message Date
Hat Kid a53c06fe2b
decomp: target, target-board, board-states (#1915)
Just missing `target-board-handler` because it errored with `Bad delay
slot in clean_up_cond_no_else_final` and I wasn't able to figure out
where the asm branch was.

Commented out `target-board-clone-anim` because it crashes even after
adding `clone-anim` and `clone-anim-once`.
2022-09-25 12:07:37 -04:00
water111 edecac9f09
[decomp] add shrubbery renderer (#1914)
as with last time, fog and time of day are still garbage, but it still
works:


![image](https://user-images.githubusercontent.com/48171810/192119423-91b80500-a161-42ce-b734-0c528cc721cf.png)

The shrub near render is just falling back to generic again.
2022-09-24 17:46:13 -04:00
water111 6227c6d6a8
More array special cases (#1913)
also make jak 1 and jak 2 behave the same way, to reduce confusion. It
wasn't too bad to update jak 1.
2022-09-24 16:10:13 -04:00
tripp 66b19296ef
add project path option to the compiler (#1826) 2022-09-24 12:06:26 -04:00
water111 1b45aab3cc
[decompile] subdivide, wind-work, tie-work, bsp, focus (#1897)
- decompile `subdivide`, `wind-work`, `tie-work`, `bsp`, `focus`
- support `ppacb` in compiler
- don't assert when bitfield stuff fails due to constant propgataion
weirdness
- finish up history
- div/mod unsigned assert fix in decompiler
- empty assert fix in decompiler for failed `add` type prop
- make jak 1 performance counters "work" (just measure time)
- fix cast/typos on pcgtb/vftoi15
2022-09-17 14:58:25 -04:00
Tyler Wilding 82e0517275
d/jak2: get script decompiling, no ref tests yet (#1877)
Has boxed array accessing that prevents me from adding anything to ref
tests (the entire file is lambdas so the access pattern that i would
like to ignore happens at the top-level, can't ignore it.

This code actually already has quite a bit of original docstrings so
it's not too bad in that regard considering a `script-context` can have
16 arbitrary objects. It seems they rarely put more than a single object
in the context and the types are usually obvious / are actually type
checked!
2022-09-14 19:37:12 -04:00
water111 4eea31c3e9
[jak 2] texture (#1866)
- Decompile and patch `texture.gc` for PC
- Improve decompiler when offset doesn't fit in immediate (for types
larger than 8k and some scratchpad accesses)
- Fix symbol->string issues in both jak 1 and 2
- Fix bug with VIF interrupt used to profile VU code (hooked up to
OpenGLRenderer BucketRenderers in PC port)
- Support `~o` in `format`.
- Uncomment stuff in `merc.gc` that now works!

![image](https://user-images.githubusercontent.com/48171810/189505469-941b4a3e-23c7-4740-aa1b-2e461ed19fa9.png)

fixes https://github.com/open-goal/jak-project/issues/1850
2022-09-11 14:17:55 -04:00
water111 b5d21be9c5
W/misc fixes (#1838)
* temp

* temp

* before cleaning up

* cleanup merge

* fix warnings

* merge fix

* clang format
2022-09-05 20:29:12 -04:00
Tyler Wilding 0896bef2bf
jak1/speedruns: Some final touches for speedrunning in jak 1 (#1830)
* jak1: put common speedrunning code into it's own file

* jak1: enforce `60` fps while in speedrunning mode

* jak1: when speedrunning, display the version until you get the first powercell

* jak1: add an explicit option for skipping cutscenes

* jak1: extend `game-option` to allow any menu option to be disabled

* tests/jak1: allow whitelisting types to be redefined to satisfy typeconsistency checks

* jak1: add file headers

* jak1: cleanup bool checking

* test: delete the es substitle file

* test: add it back

* jak1: missed one cleanup spot related to bool comparisons
2022-09-02 18:15:42 -04:00
water111 bc3cd2cf72
[goalc] Fix error when putting #f in an array of symbols (#1804) 2022-08-26 15:54:29 -04:00
Tyler Wilding 090b2984a2
decomp: add docstring support to relevant places in all-types (#1753)
* decomp: add `docstring` support to relevant places in `all-types`

* decomp: output method docstring into the `defmethod` instead

* goalc: handle docstrings in `define[-extern]` (gracefully ignore for now)

* decomp: output docstrings for bitfield deftypes too

* goalc: fix `defenum` parsing when coming from the compiler (no symbol metadata to store to)

* lsp/tests: fix ups

* lint: formatting

* goalc: handle edge-case of defining a string constant

* cleanup leftovers, fix codacy issues, rename struct
2022-08-23 00:32:07 -04:00
water111 06ef52cd25
[decompiler] support for jak 2 (#1781)
* [decompiler] suppport jak 2

* cleanpu

* remove brief from gtest options

* fix test
2022-08-22 18:53:51 -04:00
ManDude dee8feb003
fix a game bug and add a new compiler feature (#1758)
* dont crash on inline static value array

* [goalc] add support for non-static inline arrays of values

* add a kernel group to jak1

* move and cleanup pc debug code

* random cleanup in `hud-classes`

* pc port fix for gondola spools

* format

* address feedback (wow it was actually just changing 1 line all along...)

* minor decomp cleanup

* ref test
2022-08-15 18:46:29 -04:00
Hat Kid ead7f3415f
custom levels: add support for more res types in actor lumps (#1754)
* add support for more res types in actor lumps

* floatm -> meters
2022-08-14 17:21:53 -04:00
water111 f1e2cee91d
fix crash when importing glb (#1732) 2022-08-05 17:40:43 -04:00
water111 1ba349b563
[custom levels] add collide mode option (#1730)
add collide mode option
2022-08-05 14:11:18 -04:00
water111 e52a88656f
[custom levels] add invisible option (#1729) 2022-08-05 13:00:10 -04:00
water111 da4ec008c3
Add a gltf level exporter (#1719)
* Add a gltf level exporter

* more fixes

* disable by default

* compile fixes for windows

* improve collide packer

* bug fix

* clang format

* fix texture bug
2022-08-05 12:25:35 -04:00
water111 e9567a6e4b
Cleanup goalc tests, fix jak2 kernel bugs (#1669)
* Cleanup goalc tests, fix jak2 kernel bugs

* fix warnings on linux

* spelling is hard
2022-07-17 14:12:11 -04:00
water111 04f440b7cc
improvements to custom level blender import (#1649) 2022-07-14 23:38:29 -04:00
water111 dc652d10c5
[jak2] decomp gkernel, setup offline tests (#1638)
* add comments

* oops

* format'

* spelling is hard
2022-07-12 18:50:18 -04:00
water111 5e23057ed1
[goalc] compile/run code for jak2 ckernel, set up dummy KERNEL.CGO (#1625)
[goalc] start can compile and run code for jak2 ckernel, set up dummy KERNEL.CGO
2022-07-08 19:23:49 -04:00
water111 28a2ecdfd3
[jak2] goalc supports multiple projects (#1619)
* [jak2] goalc supports multiple projects

* disable deci2 server if not debugging
2022-07-06 21:18:08 -04:00
Tyler Wilding 6446389263
extractor: cleanup, support unicode properly, and add multi-game support (#1609)
* extractor: refactor and cleanup for multi-game support

* deps: switch to `ghc::filesystem` as it is utf-8 everywhere by default

* extractor: finally working with unicode

* unicode: fix unicode cli args on windows in all `main` functions
2022-07-05 20:38:13 -04:00
ManDude 9676100039
finish out english subtitles (#1586)
* 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
2022-07-03 17:25:28 -04:00
water111 f763eb6bf0
[jak2] support for multiple out/ directories (#1585)
* [jak2] support for multiple out/ directories

* windows
2022-06-30 21:11:58 -04:00
water111 1e33dcda4b
Remove assets folder, use more std::filesystem (#1575)
* Remove assets folder, use more std::filesystem

* windows fix

* another one for windows

* another one

* better system for different folders

* rm debugging stuff

* let extractor override everything

* dont revert jak1 change
2022-06-29 23:32:46 -04:00
Tyler Wilding 36dc015d62
jak2: Create goal_src skeleton (#1576) 2022-06-29 22:20:09 -04:00
ManDude 2649fd17ec
subtitle editor fixes + other smaller fixes (#1572)
* [extractor] validate files when extracted as folder

* jp text fixes

* move game text version to the text file and fix subtitle editor escape chars

* make bad subtitles not crash the game

* fix texscroll in lag

* fix mood, fix decomp of other versions, fix text decomp

* clang

* fix tests

* oops dammit

* new fixes

* shut up codacy

* fix nonexistant subtitles crashing the game

* fix text hacks and extractor re-use on folders
2022-06-29 19:43:23 -04:00
water111 54937a95b1
[build_level] basic support for entity/res-lump (#1563)
* [build_level] drawable actor stuff

* clean up

* improved bsphere

* windows include nonsense

* final tuning

* m_pi

* what

* going insane

* merge conflict fix

* windows
2022-06-27 20:37:51 -04:00
water111 e630b50690
[ckernel] split by game version (#1559)
* temp

* split up kprint, other than format

* start kmachine

* split kmachine

* split kscheme

* split klink

* split klisten

* split remaining

* jak2 ckernel gets to nokernel loop
2022-06-26 18:17:11 -04:00
Hat Kid 3b177d47c0
goalc: add launch option for executing cmd on startup that keeps repl open (#1561)
goalc: add launch option for executing cmd on startup
2022-06-26 17:32:02 -04:00
water111 628ce47b2e
compiler speed improvement (#1547) 2022-06-24 18:21:24 -04:00
ManDude 85bef15364
full ntsc-j mode + greatest hits support (#1525)
* remove str files from inputs

* removed unused verbose flag

* allow some kind of conditional game building for JP extras

* make `PrintBankInfo` do nothing

* clang

* Update gltf_mesh_extract.cpp

* fix `*jak1-full-game*` in extractor

* use json library to build json file

* screw it red label support as well
2022-06-23 18:44:02 -04:00
Tyler Wilding 17c9861f3c
github: improve bug report issue template (#1527)
* github: improve bug report issue template

* github: add refresh rate question
2022-06-23 16:34:05 -04:00
Tyler Wilding 2d595c1ac0
lint: add include sorting config to clang-format (#1517) 2022-06-22 23:37:46 -04:00
water111 b3f2b81481
[custom levels] fix various collision bugs (#1522)
* [custom levels] fix various collision bugs

* include
2022-06-22 22:43:42 -04:00
water111 90a049dcc5
[cleanup] memory bugs, memory usage reduction, delete merc1 (#1515)
* [cleanup] remove merc1, fix memory bugs, reduce memory usage

* change compiler log to see actual info from build_level

* save file

* editing text is hard
2022-06-21 21:26:11 -04:00
water111 c13934708a
Initial implementation of custom level tool (#1482)
* wip

* learning about colors

* gltf node stuff working

* cleanup

* support textures

* bvh generation seems reasonable

* tree layout

* frag packer, untested and doesnt do real stripping yet

* temp

* working collide frags

* handle bad inputs better

* clean up

* format

* include

* another include

* reorganize for release build use
2022-06-19 20:44:07 -04:00
Tyler Wilding 9fdf0bbc2f
tools: Add cutscene player / subtitle editor window (#1429)
* stash

* temp

* tools: subtitle tool works! just gotta fill out the db / polish UX

* tools: added configuration for every subtitle we have so far

* tools: add some colors to the editor, time for repl controls and make it run the code!

* tools: continuing polish of tool, getting very close

* tools: finished UX polish, just need to write deserializers

* tools: added deserializer for subtitle data

* tools: exported subtitle files, all data appears intact

* tools: more UX polish and test all the cutscenes, majority work

* assets: update subtitle files

* lint: formatting and cleanup

* lint: codacy lints
2022-06-11 16:32:27 +01:00
water111 ecb2781a89
[decompiler] cleanup to get atomic ops working on jak2 inputs (#1426)
* [decompiler] cleanup to get atomic ops working on jak2 inputs

* clang format
2022-06-08 18:34:52 -04:00
ManDude d01c16f451
[game] music player (#1416)
* music flava hack toggle

* fix hint subtitles not being considered offscreen

* music player works

* fixes + citadel, maincave, lavatube music

* add remaining tracks

* fix test

* fixes

* fix lib
2022-06-04 14:53:49 -04:00
ManDude c1faeac042
fix float->int cast suppression + minor cleanup of a couple files (#1375)
* fix float->int cast suppression + minor cleanup of a couple files

* add missing cutscenes
2022-05-28 15:23:39 -04:00
ManDude 19944ebe10
anim-tester-x + cam flip fixes + logxor! decomp (#1359)
* `anim-tester-x` + cam flip fixes + `logxor!` decomp

* Update anim-tester-x.gc
2022-05-21 15:47:41 -04:00
ManDude 0212aa10c9
[decomp] better handling of animation code and art files (#1352)
* update refs

* [decompiler] read and process art groups

* finish decompiler art group selection & detect in `ja-group?`

* make art stuff work on offline tests!

* [decompiler] detect `ja-group!` (primitive)

* corrections.

* more

* use new feature on skel groups!

* find `loop!` as well

* fully fledged `ja` macro & decomp + `loop` detect

* fancy fixed point printing!

* update source

* `:num! max` (i knew i should've done this)

* Update jak1_ntsc_black_label.jsonc

* hi imports

* make compiling the game work

* fix `defskelgroup`

* clang

* update refs

* fix chan

* fix seek and finalboss

* fix tests

* delete unused function

* track let rewrite stats

* reorder `rewrite_let`

* Update .gitattributes

* fix bug with `:num! max`

* Update robotboss-part.gc

* Update goal-lib.gc

* document `ja`

* get rid of pc fixes thing

* use std::abs
2022-05-20 02:30:14 +01:00
water111 05857c42f7
remove some duplicate build files (#1357)
* remove some duplicate build files

* use ENGINE dgo for tests
2022-05-19 22:08:01 +01:00
water111 be976d2e69
[merc] Add merc extraction (#1356)
* docs for ee merc code

* wip

* more extraction stuff

* partial mat1 working

* mat1

* cleanup

* partial mat2 and mat3 support

* merc extraction seems to work
2022-05-11 22:53:53 -04:00
Tyler Wilding 7b6d732a77
goalc: Add TCP server socket in REPL process (#1335)
* goalc: cleanup goalc's main method and add nrepl listener socket

* deps: add standalone ASIO for sockets

* lint: formatting

* common: make a common interface for creating a server socket

* goalc: setup new repl server

* deps: remove asio

* goalc: debug issues, nrepl is working again

* git: rename files

* attempt to fix linux function call

* test

* scripts: make the error message even more obvious....

* goalc: make suggested changes, still can't reconnect properly

* game: pull out single-client logic from XSocketServer

* nrepl: supports multiple clients and disconnection/reconnects

* goalc: some minor fixes for tests

* goalc: save repl history when the compiler reloads

* common: add include for linux networking

* a few small changes to fix tests

* is it the assert?

* change thread start order and add a print to an assert

Co-authored-by: water <awaterford111445@gmail.com>
2022-05-06 18:19:37 -04:00
ManDude 1bede6954d
ambient & hint subtitles and subtitles for citadel + training (#1337)
* hint & ambient subtitle support + `training` & `village1` subs

* update refs

* Update game_subtitle_en.gs

* Update game_subtitle_en.gs

* update source

* more subtitles

* Update game_subtitle_en.gs

* Update game_subtitle_en.gs

* tests

* typo.
2022-04-25 20:01:39 -04:00
ManDude 8eb0796f8e
subtitle editing and text project compiler rework (#1331)
* add a `subtitle` bucket and rename buckets 67 and 68

* automatic `heap-base`

* subtitles editor

* adjust default params

* bug

* Update subtitle.gc

* fix blue color inconsistency in progress

* void.

* Update subtitle.gc

* Update subtitle.gc

* Extend `heap-base` detection to check for errors

* sometimes it's actually manually set!

* remove broken error check

* rework how compiling text files works

* try out subtitles source v2

* bugfix

* oops

* Update game_text_common.cpp
2022-04-24 15:15:16 -04:00