Commit graph

321 commits

Author SHA1 Message Date
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
ManDude 0cdeed9be7
minor windows fixes (#1311)
* [pp2] put `define` dest on a single line

* update source!

* Update type_analysis.cpp

* update old credits & racer code

* change clang-cl args (REALLY force avx)

* Update credits_REF.gc

* comment small unused code

* add timer to decompiler

* fix unnecessary copy-constructors (no speed increase)

* fixes

* Update expression_build.cpp

* wtf is this thing anyway

* im bored.

* clang

* fix!

* Revert "fix!"

This reverts commit 5b1ce6c718.

* Revert "clang"

This reverts commit 5e67d9ccd1.

* Revert "im bored."

This reverts commit 070e957ce8.

* Revert "Update expression_build.cpp"

This reverts commit b94d092fc5.

* Revert "fixes"

This reverts commit f3d871f60a.

* Revert "fix unnecessary copy-constructors (no speed increase)"

This reverts commit 9100725802.

* Keep the random inoffensive changes

* Revert "Update type_analysis.cpp"

This reverts commit d2456a5c75.

* Update type_analysis.cpp
2022-04-17 21:11:09 -04:00
Tyler Wilding ab063bf7b0
extractor: split up extraction process and allow overriding data dir path (#1302)
* extractor: split up extraction process and allow overriding `data` dir path

* lint: formatting

* deps: add CLI11 dependency

* extractor: refactor CLI arg handling
2022-04-15 18:01:47 -04:00
Tyler Wilding c4a92571b2
Improve ASSERT macro, fix linux file paths in Taskfile and hopefully fix the windows release (#1295)
* ci: fix windows releases (hopefully)

* scripts: fix Taskfile file references for linux

* asserts: add `ASSERT_MSG` macro and ensure `stdout` is flushed before `abort`ing

* asserts: refactor all `assert(false);` with a preceeding message instances

* lint: format

* temp...

* fix compiler errors

* assert: allow for string literals in `ASSERT_MSG`

* lint: formatting

* revert temp change for testing
2022-04-12 18:48:27 -04:00
water111 b263e33e94
[goalc] fix mod bug and add div tests (#1296)
* fix mod bug and add div tests

* update changelog
2022-04-11 20:53:24 -04:00
ManDude a7eee4fdc9
[game] pc port progress menu (#1281)
* fix typo

* more typo

* shorten discord rpc text

* allow expanding enums after the fact (untested)

* make `game_text` work similar to subtitles

* update progress decomp

* update some types + `do-not-decompile` in bitfield

* fixes and fall back to original progress code

* update `progress` decomp with new enums

* update config files

* fix enums and debug menu

* always allocate (but not use) a lot of particles

* small rework to display mode options

* revert resolution/aspect-ratio symbol mess

* begin the override stuff

* make `progress-draw` more readable

* more fixes

* codacy good boy points

* first step overriding code

* finish progress overrides, game options menu fully functional!

* minor fixes

* Update game.gp

* Update sparticle-launcher.gc

* clang

* change camera controls text

* oops

* some cleanup

* derp

* nice job

* implement menu scrolling lol

* make scrollable menus less cramped, fix arrows

* make some carousell things i guess

* add msaa carousell to test

* oops

* Update progress-pc.gc

* make `pc-get-screen-size` (untested)

* resolution menu

* input fixes

* return when selecting resolution

* scroll fixes

* Update progress-pc.gc

* add "fit to screen" button

* bug

* complete resolutions menu

* aspect ratio menu

* subtitles language

* subtitle speaker

* final adjustments

* ref test

* fix tests

* fix ref!

* reduce redundancy a bit

* fix mem leaks?

* save settings on progress exit

* fix init reorder

* remove unused code

* rename goal project-like files to the project extension

* sha display toggle

* aspect ratio settings fixes

* dont store text db's in compiler

* properly save+load native aspect stuff
2022-04-11 18:38:54 -04:00
water111 1db96c72ab
[goalc] macro expansion in integer constants (#1282)
* [goalc] macro expansion in integer constants

* working

* didn't break it yet

* support conditional compilation

* fix up some more small bugs

* fix duplicate evaluation of bitfield definitions

* paranoid
2022-04-07 19:13:22 -04:00
water111 5bd0b735a5
Add extractor tool (#1276)
* first attempt

* fix

* zip to tar

* windows

* try again, std::filesystem sucks

* std::filesystem is still garbage

* std::filesystem is terrible

* std::filesystem continues to waste my time

* again

* neadsflaldksal;df
2022-04-03 19:17:03 -04:00
Tyler Wilding e74bd3b32b
ci: Add an automated release process (#1262)
* ci: bring over some of my code to enable the process

* ci: cleanup builds a bit and add release stuff

* ci: fix paths and such after debugging

* ci: fix flowchart

* cmake: easily toggle between building everything dyn or statically linked

* ci: build release artifacts statically linked

* ci: fix some issues after testing once again, linux binaries are still too big
2022-03-29 22:47:08 -04:00
Tyler Wilding 014da6f59d
game: auto-save pc-settings to user's home directory as well as memcard files (#1233)
* cmake: reduce warning spam especially from libs

* runtime: add FS helper functions

* game: save/restore pc-settings | add original aspect option

* game: overwrite unloadable settings with defaults

* temp: unable to set the games aspect-ratio in the boot else crash?

* runtime: save memcard files to user directory as well

* runtime: fix `pckernel` load order which resolves setting the orig aspect ratio

* lint: format

* cmake: revert warning suppression, it's just causing problems it seems

* fix the order of the rest of `pckernel` and creation of obj file paths

* lint: formatting

* game: don't save settings on startup even if they are corrupted
2022-03-20 20:29:44 -04:00
Tyler Wilding 8574e10653
Mark OpenGOAL regions in IR2 output and cleanup some now irrelevant settings (#1237)
* remove redundant vscode settings and duplicate goalc atoms

* decompiler: add some region markers for OpenGOAL blocks
2022-03-17 21:39:11 -04:00
ManDude 3a54a521e3
[runtime] bug & crash fixes (#1211)
* bug & crash fixes

* relax fog hack slightly

* buff particles more

* borderless hack

* tone down sprite hack

* int consts in `deftype` + increase sparticle queue

* move a menu button around

* clang + test fixes

* less confusing image

* add test for new deftype feature
2022-03-01 20:15:15 -05:00
ManDude 8adac544cf
Allow symbol table expansion. (#1191)
* Allow symbol table expansion.

* fix debugger

* fix bits_for_sym

* use a `static_assert` over `throw`
2022-02-24 22:43:00 -05:00
water111 9c00b0c135
[graphics] generic merc (#1192)
* begin generic merc

* more generic stuff

* generic dma generation not crashing, at least until high-speed-reject

* c

* unpacker for generic

* starting to work

* small fixes

* more fixes

* more progress

* cleanup

* fix tests

* no custom imgui assert on windows
2022-02-24 22:33:10 -05:00
water111 ff6362d181
compiler startup speed, decomp options, add some shrub docs (#1187) 2022-02-19 21:31:24 -05:00
ManDude af447aeab7
[game] subtitles support (tools + goal + text file). (#1174)
* add subtitles support (tools + goal + text file).

* add to build system proper

* better handling of line speakers

* billy test subtitles

* adjust timings

* better handling of subtitle timing + citadel subs

* press square to toggle cutscene subtitles

* improve DirectRenderer performance

* clang

* dont error out if there's no user files

* make system supports multiple inputs for subtitles

* clang

* oh no typo!!

* avoid future issues

* fix warp gate crash

* remove no longer necessary code in DirectRenderer

* remove temp prints

* delete triplicate code

* i found a better way

* fix make issues with subtitles

* force avx compilation
2022-02-19 13:10:10 -05:00
water111 c9fc4f0bf9
[graphics] eyes (#1169)
* first draft eye renderer

* working

* working
2022-02-15 19:37:51 -05:00
ManDude 24578b64b9
proper support for hardcoded "time" types (#1141)
* hardcode `time-frame`things

* Update cam-states_REF.gc

* Update level-info_REF.gc

* update refs 1

* update refs 2

* update refs 3

* update refs 4

* update refs 5

* update detection and casting

* Update FormExpressionAnalysis.cpp

* update refs 6

* update mood decomp

* update refs 7

* update refs 8

* remove temp entity birth code

* update time-frame casts

* fix compiler

* hardcode stuff and fix some types

* fix some bitfield detection being wrong

* bug fixes

* detect seconds on adds with immediate

* update refs 9

* fix casts and rand-vu-int-range bugs (update refs 10)

* update refs 11

* update 12

* update 13

* update 14

* Update game-info_REF.gc

* improve cpad macros detection

* remove unused code

* update refs

* clang

* update source code

* Update cam-states.gc

* `lavatube-energy` finish

* update refs

* fix actor bank stuff

* Update navigate.gc

* reduce entity default stack size

* Update transformq-h.gc

* oops forgot these

* fix code and tests

* fix mood sound stuff

* Update load-dgo.gc

* Update README.md
2022-02-12 12:26:19 -05:00