Commit graph

186 commits

Author SHA1 Message Date
Tyler Wilding 74d1074eef
d/jak2: add missing ref tests for files that can be added to ref tests (#2061) 2022-12-15 01:27:07 -05:00
ManDude b0e8cba6f1
[decomp2] game-save (#1988)
memory card code was not done!
2022-10-29 16:08:04 -04:00
Tyler Wilding 41c3423767
d/jak2: finish viewer, texture-finish, process-taskable, main-collide, prototype and los-control (#1975) 2022-10-22 13:26:28 -04:00
Tyler Wilding 9c390e1461
scripts: add a script to generate game.gp code, comment out generated code for now (#1966)
Generates the `game.gp` code for all DGOs, code added to the project
file has been commented out for now.

In my opinion, this is way too much in a single file -- it would be nice
if this code would live directly inside the `.gd` files themselves, then
everything is nicely organized. But this approach might have issues I'm
not aware of.
2022-10-14 19:10:05 -04:00
Tyler Wilding e3473c1902
d/jak2: finish cty-guard-turret-button | race-h | height-map-h and a lot of rigid-body (#1957)
Also cleaned up `data_decompiler.cpp` to make it a lot less verbose to
add a special case for an array field.
2022-10-11 23:20:36 -04:00
Tyler Wilding f6bdc07990
d/jak2: finish progress menu code and initialize the camera (#1945)
This PR does a few main things:
- finish decompiling the progress related code
- implemented changes necessary to load the text files end-to-end
   - japanese/korean character encodings were not added
- finish more camera code, which is required to spawn the progress menu
/ init the default language settings needed for text
  - initialized the camera as well

Still havn't opened the menu as there are a lot of checks around
`*target*` which I havn't yet gone through and attempted to comment out.
2022-10-11 18:30:26 -04:00
Tyler Wilding 1d1ea907c9
scripts: prevent infinite loop when preserved block can't be found (#1946) 2022-10-08 21:53:23 -04:00
water111 3d4dfb2077
[decomp] Decompile some time-of-day stuff, support new style Jak 2 time of day (#1943)
- Add "tfrag-water" tfrag tree support (may just be the same as Jak 1's
'dirt' for the settings)
- Add "tfrag-trans" tfrag tree support, reusing "trans-tfrag" from jak
1.
- Add a hack to `LinkedObjectFileCreation` to handle `oracle`, which is
accidentally multiply defined as a type leftover from jak 1 (an entity
in village1), and level info for jak 2.
- Add `VI1.DGO`
- add `time-of-day.gc`, and a few other stub functions so it works
- Set up some time of day stuff in GOAL for jak 2/PC renderers
- Clean up time of day in c++ renderers, support the more complicated
weight system used by jak 2 (backward compatible with jak 1, thankfully)

The mood functions now run, so this could cause problems if they rely on
stuff we don't have yet. But it seems fine for ctysluma and prison for
now.


![image](https://user-images.githubusercontent.com/48171810/194719441-d185f59c-19dc-4cd3-a5c4-00b0cfe1d6c3.png)


![image](https://user-images.githubusercontent.com/48171810/194719449-6e051bf3-0750-42e5-a654-901313dbe479.png)


![image](https://user-images.githubusercontent.com/48171810/194719455-3ca6793e-873a-449a-8e85-9c20ffeb4da3.png)


![image](https://user-images.githubusercontent.com/48171810/194719461-8f27af17-4434-4492-96cd-8c5eec6eafdf.png)


![image](https://user-images.githubusercontent.com/48171810/194719468-720715b9-985a-4acf-928c-eab948cfcb03.png)


![image](https://user-images.githubusercontent.com/48171810/194719486-bfb91e83-f6ca-4585-80ad-3b2c0cbbd5af.png)


![image](https://user-images.githubusercontent.com/48171810/194719492-df065d2f-cb5a-47e3-a248-f5317c42082f.png)


![image](https://user-images.githubusercontent.com/48171810/194719507-91e1f477-ecfe-4d6c-b744-5f24646255ca.png)
2022-10-08 13:33:03 -04:00
Tyler Wilding be1e40a041
d/jak2: decompile conveyor | elevator | plat | bouncer | basebutton | base-plat | most of sampler | simple-nav-sphere | simple-focus | elec-gate and blocking-plane (#1942)
Most of these have been atleast partially documented / named / cleaned
up as well.

Co-authored-by: water <awaterford111445@gmail.com>
2022-10-08 12:42:52 -04:00
Tyler Wilding 2d1b5fa57c
d/jak2: finish region as well as some typedef files - ctywide-obs-h | vehicle-h | rigid-body-h (#1935) 2022-10-08 11:45:41 -04:00
ManDude 9351bf782e
[decomp2] game-info, game-task and task-control (#1884)
And everything else needed for them!

A couple functions are bad currently.

- fixes #1929 - untested on linux
- fixes #1924 - now you need to type `,` before a lambda you want to put
in a pair.
- fix debugger symbol table in jak 2
- made the decompiler output `(meters 2)` instead of `(meters 2.0)`
- fixed a bug with the bitfield enum special -1 case
- made bad game text decomp not exit the decompiler
- added `editable-player` and `script`
2022-09-27 19:44:20 -04:00
Tyler Wilding 332f0b2f2b
tools: add a tool to search for types based on size / type chain / fields (#1906)
Just a small simple tool that can search through `all-types` for a type
based on a bunch of criteria.

For example:

![image](https://user-images.githubusercontent.com/13153231/192043561-181e5c5d-d5b1-41a9-8891-5cc3ed1a0efa.png)

The results are printed to stdout, as well as output to a json file so
they can be consumed by another tool (in my plans, the VSCode extension)
2022-09-24 16:04:52 -04:00
Tyler Wilding e64414d9d0
d/jak2: finish drawable-group | drawable-inline-array | drawable-tree and path (#1899) 2022-09-24 12:27:02 -04:00
water111 6a1bde4168
[decomp] fix up debug menu rendering, add a few others (#1892)
![image](https://user-images.githubusercontent.com/48171810/190832869-e609d346-9c4a-43fb-ad94-2a9690521adc.png)
actor vis boxes for PRI.DGO
2022-09-16 20:42:33 -04:00
Tyler Wilding 8117ed3bc7
scripts: make update_decomp_ref.py respect the game we are operating on (#1880) 2022-09-13 20:03:00 -04:00
Tyler Wilding 4620f96574
d/jak2: mostly finish mysql-nav-graph and fix docstring handling around with-pp/local-vars (#1869) 2022-09-13 18:15:02 -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
Tyler Wilding 81b6d5fe08
d/jak2: finish find-nearest | trajectory | editable-h and most of editable and editable-player (#1847)
Also made a first-pass of their SQL schema in preparation for getting
that working.
2022-09-10 18:03:17 -04:00
ManDude cfb6abb24d
[decompiler] rewrite set lets as just sets (#1858)
Rewrites specific kinds of lets where the return value of the `set!`
itself is meant to be used to just be `set!`s. Implemented at the let
rewrite level. Seems to work for Jak 2 so far.

Fixes #1854 .
2022-09-07 18:28:01 -04:00
Tyler Wilding 44d59e6b33
d/jak2: finish mood-funcs | mood-funcs2 | almost all of mood and airlock (#1842) 2022-09-06 20:35:00 -04:00
Tyler Wilding 80d0137dba
d/jak2: finish the majority of sparticle and sparticle-launcher (#1840)
* sparticle-launcher

* d/jak2: large amount of `sparticle-launcher` done

* d/jak2: finish the majority of `sparticle`

* decomp: improve format code ignoring

* d/jak2: make bits unique in `sp-cpuinfo-flag`

* d/jak1: revert config change
2022-09-05 18:03:46 -04:00
ManDude f1f18e7e05
[decomp2] joint-mod, chain-physics, loader (#1816)
* prep

* Update repo-settings-mark.bat

* Update repo-settings-unmark.bat

* decomp `joint-mod`

* add `joint-mod-ik-callback` to ref exceptions

* `chain-physics`

* Update jak2_ntsc_v1.jsonc

* update bat scripts

* `loader`

* pretty

* refs

* support `process->handle` (and `ppointer->handle`?)

* refs

* source and fixes

* fix `ja` detect

* `ja` macro implement

* fix a method

* update source

* merge fixes

* annoying fixes

* format

* arg

* hack

* fix test
2022-09-02 18:13:38 -04:00
Tyler Wilding d264779173
d/jak2: finish glist | glist-h | camera | cam-interface | cam-states-dbg | cam-combiner | cam-debug | cam-start (#1829)
* d/jak2: finish `glist` and `glist-h` partially done `time-of-day`

* d/jak2: finish `camera` and `cam-interface`

* d/jak2: partially finish `cam-master` `cam-states`, and `cam-update` finish `cam-states-dbg` `cam-combiner` `cam-debug` and `cam-start`

* tests: update ref tests

* scripts: add scripts to automatically update gsrc files

* d/jak2: update gsrc
2022-08-31 19:22:47 -04:00
Tyler Wilding d176b294b9
d/jak2: finish entity-table | sky-data | relocate | and the majority of default-menu (#1812)
* d/jak2: finish `entity-table`

* d/jak2: finish `sky-data`

* d/jak2: finish `relocate`

* d/jak2: halfway through `default-menu`

* d/jak2: 75% done `default-menu`....

* d/jak2: add `default-menu` to ref tests (partially)

* d/jak2: finish updating related code

* scripts: add tooling to automatically keep code from `all-types` up to date

* d/jak2: fixed vector types
2022-08-29 18:49:57 -04:00
Tyler Wilding 01abde35d8
d/jak2: First few files, mood-tables and vol-h (#1796)
* decomp: format jak1 cast files

* decomp: finish `mood-tables` and `mood-tables2`

* jak2: stop disasm'ing

* jak2: format jak2 cast files, start working on the rest of the `mood` files

* scripts: fix running pcsx2 watcher

* d/jak2: finish `vol-h`

* d/jak2: address feedback
2022-08-24 19:34:09 -04:00
water111 f7bd0752f8
[decomp] Decompile first batch of files in engine (#1787)
* wip

* getting stuff set up so we can actually run test cases

* better handle block entry stuff

* types2 working on gstring

* comments

* math ref working

* up to first stack stuff

* stack fixes

* bounding box

* math stuff is working

* float fixes

* temp debug for (method 9 profile-array)

* stupid stupid bug

* debugging

* everything is broken

* some amount of type stuff works

* bitfield

* texture bitfields not working

* temp

* types

* more stuff

* type check

* temp

* float related fixes for light and res problems

* revisit broken files, fix bugs

* more types

* vector debug

* bug fixes for decompiler crashes in harder functions

* update goal_src
2022-08-24 00:29:51 -04:00
Tyler Wilding b3c58d2247
scripts: Add a (hopefully) better goal_src updating script (#1769)
* scripts: cleanup scripts directory some more

* stash, getting there

* stash again

* closer!

* it works! decently....cleanup time and add some extra features

* minor cleanup
2022-08-19 11:30:07 -04:00
Tyler Wilding a66ec7c601
all-types: Improve Jak 2's all-types (#1728)
* all-types: improve all-types generation

* all-types: re-generate all-types

* tests: remove the test reporting feature

the format indeed doesn't work, and all current actions require too many permissions for forked PRs.

I'll make my own eventually that works properly (use the new markdown feature)

* all-types: put the states in the method table instead

* all-types: replace all `*time*...uint64` fields with `time-frame` type

* all-types: address feedback
2022-08-05 17:39:32 -04:00
Tyler Wilding c269374e24
gsrc: add decomp begins placeholder to all gsrc files (#1731) 2022-08-05 16:12:54 -04:00
ManDude 3e538dabe6
more random cleanup (#1716)
* correct some comments

* change `pc-cheats?` macro to be more generic

* more generic custom fps stuff

* better subtitle timings

* oopsie!

* fix burn effect stacking

* fix some windows scripts

* fix project

* cleanup this func

* more fix

* oops

* ???
2022-08-02 18:48:10 -04:00
Tyler Wilding eaac247074
Decompiler: Cleanup CLI and make overriding the config much easier (#1711)
* decomp: cleaned up CLI for decompiler

* decomp: much more flexible and clean decomp override mechanism

* decomp: cleanup scripts
2022-07-29 20:10:11 -04:00
ManDude 163e86130f
separate language settings into 3 settings/options (#1636)
* only show subtitle notices during a subtitle context

* move language & subtitles (back) to game options

* remove "accessibility" menu and put its option in "misc"

* new subtitle language selection

* properly split audio & text language

* Update game_text_en.gs

* misc setting size fixes

* better fix for subtitle notice

* final touches

* subtitle fixes & uk-english subtitles

* more english fixes
2022-07-12 18:00:52 -04:00
ManDude 8caa5bfa70
disable goal networking when not in debug mode (#1602) 2022-07-04 13:52:05 -04:00
Tyler Wilding 728d234976
scripts: update scripts and docs to support multiple games (#1584)
scripts: update scripts and docs to support multi-games disable broken scripts for now
2022-06-30 20:17:06 -04:00
ManDude 4ebb961246
fix windows scripts for jak 2 (#1580)
* fix scripts for jak 2

* delete duplicates

* disable game text for now (unsupported)
2022-06-30 01:22:58 -04:00
Tyler Wilding 345793af41
jak2: Generate goal_src skeleton (#1581)
* jak2: merge identical art files

* jak2: a skeleton is born
2022-06-30 01:22:51 -04:00
Tyler Wilding 36dc015d62
jak2: Create goal_src skeleton (#1576) 2022-06-29 22:20:09 -04:00
water111 91fa0122d8
[decompiler] Jak 2 modifications, new all-types code (#1553)
* temp

* look at old game types

* clean up
2022-06-25 21:26:15 -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
ManDude 7d5045ab3f
PAL & NTSC-J support + updates (#1490)
* PAL dumps files

* alrighty then

* make PAL warning slightly more specific

* PAL patches for `title-obs`

* Update all-types.gc

* PAL patch `beach-obs`

* `process-taskable` PAL patch

* `ambient` PAL patch

* `yakow` PAL patch

* `village-obs` PAL patch

* `sparticle-launcher` patch

* `swamp-obs` PAL patch

* `sequence-a-village1` PAL patch

* typo

* errors

* `powerups` PAL patch

* `ogreboss` PAL patch

* jak 1 v2 encoding

* `load-boundary` PAL patch

* `flying-lurker` PAL patch

* `mayor` PAL patch

* update game encoding to PAL (v2) encoding

* `cam-debug` and `cam-update` PAL patch

* `fisher` PAL patch

* `target` PAL patch

* `target2` PAL patch and fix text compiling

* `target-death` PAL patch

* `target-racer-h` PAL patch

* `logic-target` PAL patch

* `main` PAL patch

* `snow-flutflut-obs` PAL patch

* `rolling-obs` PAL patch

* `gsound` PAL patch

* update refs

* `progress` and `progress-draw` PAL patches

* clang

* wrong.

* complain

* clang

* fix test

* fix blurry jp text

* fix weird interrupt lag from setting window size

* patch more text lines, special handling for credits

* Update FontUtils.cpp

* Add xdelta3 and file patching interface

* add window lock toggle and update settings ver

* better particle hacks

* add PAL support to extractor

* Fix credits

* also NTSC-J support

* make xdelta3 a separate library

* address feedback

Co-authored-by: water <awaterford111445@gmail.com>
2022-06-22 05:16:34 +01:00
ManDude 8ba89dd95e
fix IOP getting stuck on music load (#1437)
* fix IOP getting stuck on music load

* fix regression? and clang

* fix a decomp

* fix another regression

* another

* fix "all actors"

* another regression!
2022-06-10 19:04:16 -04:00
ManDude 7ce58f709f
process-spawn + pretty printer improvements (#1428)
* some jp support to fix some errors in the original game

* music fade toggle

* recognize `process-new` macros!!

* strip casts in this macro

* rename macro

* fix cast typecheck

* update source 1

* detect kernel stack case

* less boilerplate

* `manipy-spawn` special case

* pretty printer improvements

* revert dumb thing from earlier

* use shell detection on `send-event`

* fix some events

* remove unused argument

* detect `static-attack-info` and add `CondNoElse` to shell detect

* better `attack-info` detect

* support `process-spawn` in multi-lets

* detect `rand-float-gen` pt 1

* detect as return value

* detect in `countdown` and  `dotimes`

* oops this wasnt working

* fancier `send-event`s

* clang

* update source!!

* fix tests

* fine jeez

* uh okay

* fix some accidental regressions

* fix more regressions

* regression fixes

* fix big bug...

* extra safety!
2022-06-10 02:18:08 +01:00
water111 148f52876a
[decomp] add import statements for art groups (#1372)
* new code

* update goal_src and remove all_imports

* update reference

* add decompiler list of imports

* deduplicate and move below decomp begins
2022-05-23 18:53:02 -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
Tyler Wilding dba95660ea
release: fix windows artifacts and stop building asan when releasing on linux (#1283)
* release: fix windows artifacts and stop building asan when releasing on linux

* release: use valid paths in the container's context
2022-04-04 20:50:08 -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 b21f0d3397
Add PC Port settings to legit start menu (#1217)
* decompiler: support adding new strings to the game_text.txt file

* gsrc: expand the pckernel type and functions to work better with the menu

* gsrc: add new text-ids

* gsrc: add new macros to help with menu code

* gsrc: make a new type to generalize their list menu options

* gsrc: add new menu options and enums

* gsrc: cleanup and refactor the list menu option drawing code

this allows us to easily add a new list menu option...well as easy as the rest is atleast (setting up static lists properly, etc)

* gsrc: add and cleanup handling of new menu options

* scripts: add checks with nice error messages for user facing taskfile recipes

* lint: formatting

* address simple feedback

* gsrc: move modified files to `pc/` folder

* gsrc: revert changes to originally decompiled files

* gsrc: move modified and new files to `goal_src/pc` folder

* gsrc: update paths in `all_files.gc`
2022-03-10 19:25:01 -05:00
Tyler Wilding 70fcb05a99
docs: fix Arch installation steps, and some typos (#1165)
* docs: fix Arch installation steps, and some typos

* task: fix linux binary paths

* docs: specify that we support the latest Visual Studio community edition
2022-02-13 22:09:34 -05:00
ManDude e91c581c2a
fix the filenames for the code files + minor fixes (#1159)
* some changes to make the `anim-tester` kinda work

* types for `lava` (who cares)

* fix divide by zero macros

* cleanup filenames

* fix tests + minor bug
2022-02-13 00:12:05 -05:00
Tyler Wilding ffb04ddd10
Documentation cleanup and some feature improvements (#1155)
* 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
2022-02-12 17:48:50 -05:00
ManDude 5b44aece75
random fixes + support clang-cl on visual studio (#1129)
* delete unused shaders

* hide some options in debug menu

* change fullscreen logic a bit

* add "all actors" toggle

* borderless fix and fix alpha in direct renderer untextured (do we need a separate shader for that?)

* fix fuel cell orbit icons in widescreen

* fix `curve` types

* refs

* fix levitator task...

* fix some task stuff

* update font code a bit (temp)

* cmake, third-party and visual studio overhaul

* Update .gitmodules

* update modules

* clone repos

* fix encoding in zydis

* where did these come from

* try again

* add submodule

* Update 11zip

* Update 11zip

* Update 11zip

* delete

* try again

* clang

* update compiler flags

* delete 11zip. go away.

* Create memory-dump-p2s.py

* properly

* fix minimum architecture c++ compiler flags

* fix zydis

* oops

* Update all-types.gc

* fix clang-cl tests

* make "all actors" work better, entity debug qol

* update game-text conversion code to be more modularized

* Create vendor.txt

* fix typos and minor things

* update refs

* clang

* Attempt to add clang-cl support to vs2019 and CI

* vs2022 + clang-cl

* srsly? fix clang build

* Update launch.vs.json

* extend windows CI timer
2022-02-07 19:15:37 -05:00
ManDude 32d8ae9b6e
streamline newbie decomp/run process, update readme and gallery with new/updated information and pictures (#1132)
* streamline newbie decomp/run process, update readme and gallery with new/updated information and pictures

* and of course

* Fix errors

* fix gallery
2022-02-04 18:37:48 -05:00
ManDude bd1718dc9c
A lot of fixes (game is 100%'able!) (#1118)
* a crapton of fixes

* Update cavecrystal-light.gc

* damn you

* fix bunnies

* change codegen for int -> float cast (just add sign extension now)

* fix test

* this file is tagged anyway

* fix some stack types

* remove bad camera debug funcs

* add more heap bars and entity pick menu

* finish entity menu and make `music-flava` enum

* fix some `process-taskable` fields

* citadel sage crash fix

* fix citadel drop plats

* fix tests

* fix some casts

* update refs

* finish `village3-obs` and `snow-ball`

* Update README.md

* fix sidekick too

* fix issue?

* more entity inspect hardcoded checks

* more

* use `*display-actor-anim*` for something!

* CRAP

* also clear actor anim when deselecting entity

* *display-actor-anim* already renders this!

* do not display `path` tag info

* entity debug inspect tool

* one more

* make debug string even larger

* missing res tag types

* more polish and more known tags

* last few
2022-01-31 20:44:54 -05:00
ManDude eb53f410e5
test game actors and fix up/disable broken ones (#1103)
* test village1, beach, jungle actors

* fix jungle actors

* more anims and fixes

* Update launch.vs.json

* fix bad `robotboss` decomp

* fix `robotboss`

* Update robotboss.gc

* fix `mother-spider-proj`

* fix detach (windows)

* update refs

* village2 spools

* type fixes + a few more spols + add append/not-append to goos

* fix beach, misty, village1, village3, lavatube

* fix snow entities

* fix `target-flut`

* update refs

* forgot one

* fail

* sound fixes

* fix test

* complain if `heap-base` is bad

* correct `add-spheres!` decomp errors

* fix citadel

* fix target `change-state` handler

* fix `final-door` state

* fix `target-flut-falling`

* fix deftypes

* oopsie

* move heap memory display behind a toggle and make it fancy

* Update gstate.gc
2022-01-27 19:33:34 -05:00
Tyler Wilding 142961a747
decomp: the majority of navigate and rolling-lightning-mole (#741)
* decomp: Add texture-upload to ref tests

* maybe 50% done?

* 5 functions to go!

* decomp: stuck in `navigate`

* work-around fp issue

* some cleanup and label casts

* working on supporting asm instructions -- this is currently WRONG

* support ASM operations

* fixes for asm op support

* decomp: finish the vast majority of `navigate`

* format

* update test though i think this suggests a regression!

* decomp: cleanup some more of navigate

* decomp: finish `rolling-lightning-mole`

* revert `r0` handling for `pcpyud` and `pextuw`

* update ref tests

* lint

* fix a failing test

* help

* navigate mostly works now, with some potential bugs

* remove my debugging logs

* update ref tests

* review feedback cleanup

* these are all likely fine

* can't get the crab to chase me anymore

* the crab is back
2022-01-18 01:14:47 -05:00
Tyler Wilding e65c61f3e2
tests: add a bunch of missing ref tests (#1082)
* scripts: add a script to point out missing ref test files

* tests: add a bunch of files to ref tests we were missing
2022-01-17 11:51:26 -05:00
Tyler Wilding b95be06fef
decomp: mostly finish ogreboss (#1024)
* decomp: partially done `ogreboss`

* decomp: finish `ogreboss`

* update

* fix `ogreboss` and `viewer`

* update ref tests

* update ogreboss
2022-01-15 20:33:11 -05:00
ManDude 27bb6c6384
[decompiler] decompile particle defs using specialized macros (#1077)
* [decompiler] `defpart` and `defpartgroup`

* support sounds in part defs natively

* make `meters_to_string`

* update refs

* clang

* make macros in pair only work inside `(unquote ...`

* update source

* update finish

* fix
2022-01-15 20:01:38 -05:00
ManDude 701108a1b6
[runtime] Fix progress menu aspect ratios (#1055)
* update progress code and fix our frame "scissoring"

* aspect ratio hacks

* expand progress tint for widescreen

* give up and comment things properly

* properly undo hacks
2022-01-08 13:39:17 -05:00
Tyler Wilding a75ecf176e
decomp: finish orbit-plat and sage-finalboss (#1039)
* decomp: finish `orbit-plat` and waiting on `sage-finalboss` inconsistency for gsrc

* decomp: finish `sage-finalboss` except the relocate method

* decomp: add fix to finish `sage-finalboss`

* update formatting in unrelated files
2022-01-04 23:10:53 -05:00
Tyler Wilding 7117a512c7
docs: Refresh the homepage and add some basic gallery support (#1051)
* 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
2022-01-04 21:05:27 -05:00
Tyler Wilding da0e9a3930
decomp: finish rolling-obs | hud | title-obs | maincave-obs | lavatube-energy (#1023)
* decomp: `(code caveelevator-one-way-idle-end)` problematic

* decomp: finish `rolling-obs`

* decomp: `snow-obs` finished, but needs s6-1 fix

* stuck: `(code target-title)`

* decomp: finish `hud`

* re-decompile

* decomp: finish `title-obs`

* decomp: finish `maincave-obs`

* decomp: finish `lavatube-energy`

* fixes
2021-12-30 21:27:35 -05:00
ManDude 9ff71412e5
[runtime] pckernel implementation (#1032)
* toggle for ripping level models

* Create pckernel.gc

* builds and works

* fix defs

* resolution info works

* native letterboxing

* menu

* Fullscreen buttons

* Update glfw

* fix fullscreen taking over everything for some reason

* fix screenshots and add more menu options

* Cleanup DMA mess in load boundary render code (first try!!)

* Update default-menu.gc

* clang

* fix accidental macros in pairs

* refs

* fix null reference bugs

* add lavatube

* custom aspect ratios work (3D only)

* custom aspect ratios work (3D only)

* fix aspect ratio and non-4x3 debug text

* change `sceOpen`

* deadzone setting

* merge fixes

* check out `debug-pad-display`

* update readme imgs

* settings save works

* oops

* settings read/load (incomplete)

* add `:stop` to debugger and fix detach on Windows

* settings load works

* fullscreen and aspect ratio setting fixes

* swap menu options for convenience

* settings loads automatically properly

* fix panic and font hack edge case

* add rolling, ogre, snow, swamp, sunken b, jungle b

* Fixed borderless on windows please work

* Update fake_iso.txt

* remove error from opengl debug filter

* update refs

* minor tfrag tod palette lookup change

* accidentally nuked all opengl errors
2021-12-30 18:48:37 -05:00
Tyler Wilding 99db6bb371
decomp: finish sunken-pipegame | sun-exit-chamber | beach-obs (#1021)
* decomp: finish `sunken-pipegame`

* decomp: finish `sun-exit-chamber`

* decomp: finish `beach-obs`

* fix mistakes

* make `collide-func` work in offline tests
2021-12-28 18:52:52 -05:00
ManDude c245f37feb
[decomp] joint and related (#1003)
* update jak 2 config and hack to make game text dumpable

* update stuff

* update src

* do `cspace<-parented-transformq-joint!`

* progress.... kind of...

* more drawable stuff

* clagng

* bones begin

* more bones

* even more bones

* everything builds

* touches

* errors

* ?

* fix `quicksandlurker`

* updates

* update refs

* more fixes

* update refs
2021-12-26 11:43:16 -05:00
Tyler Wilding 547e37d8f1
decomp: finish vol | helix-water | minecart (#1016)
* some fixes, but no file unblocked completely yet - `balloonlurker` is close

* decomp: finish `vol` - i did it!...i think

* decomp: finish `helix-water`

* decomp: finish `minecart`

* fix `define-perm`s
2021-12-18 17:15:11 -05:00
Tyler Wilding e6d17eb78f
decomp: finish plant-boss and crates (#1012)
* stuck: `crates` has issues setting bitfield with `r0`

* decomp: finish `plant-boss` except for 1 function

* decomp: finish `crates`

* address feedback
2021-12-18 01:31:14 -05:00
Tyler Wilding 39f6575661
decomp: finish kermit (#1007)
* decomp: finish `kermit`

* fix function split
2021-12-14 23:49:20 -05:00
Tyler Wilding 7edfc8bcec
decomp: Re-attempting previously blocked state decomp files (#907)
* blocked: `part-tester` - `code` handler thinks it returns nothing

* blocked: `crates` finished but `go` is returning none causing issues

* blocked: `(event ram-boss-idle)::snow-ram-boss` expression building fails due to delay slot issue

* decomp: finish `snow-ram` | `seagull` blocked, new static data issue

* decomp: finish `snow-bumper`

* stuck: `snow-ball` close, can't figure out a type made on the stack

* decomp: finish `spider-egg`

* decomp: finish `puffer`

* decomp: finish `driller-lurker`

* decomp: finish `dark-crystal`

* stuck: `kermit` - mostly done but stuck on a joint related callback arg

* decomp: finish `gnawer`

* decomp: finish `mother-spider-egg`

* decomp: finish `swamp-blimp`

* stuck: `mistycannon` prebind function signature

* decomp: finish `citb-plat`

* decomp: finish `darkvine`

* blocked: `jungle-mirrors` - issues with `link` macro

* decomp: finish `launcherdoor`

* decomp: finish `quicksandlurker` except for 1 unused function

* stuck: `balloonlurker` - `(code balloonlurker-mine-explode)` has some weird joint related code

* stuck: need to decompile an asm func in `orbit-plat`

* decomp: finish `voicebox`

* blocked: `mother-spider` has issues where `go` returns none

* decomp: finish `bully`

* decomp: finish `seagull`

* fixed up after merge conflicts

* decomp: finish `jungle-mirrors`

* update gsrc

* double checked files, fixed issues

* decomp: revert change to projectile methods

* decomp: some more fixes

* address feedback

* fix up remaining method calls in `cam-states`

* fix jungle-mirrors
2021-12-11 13:27:24 -05:00
ManDude 86bb217a8c
update bats (#990) 2021-12-04 13:32:57 -05:00
ManDude 59d071eccb
[goos/goal] user profiles (#977)
* implement user profiles

* example usage!

* typo

* use a cond

* fix errors

* fixes

* fix potential commandline args disaster
2021-11-24 00:44:04 -05:00
Tyler Wilding 111af1ec19
decomp: finish the remainder of untouched gameplay code (#893)
* decomp: finish `sidekick`

* decomp: got a lot of `target` done

* decompiler: Add support for non power of 2 offsets for inline arr access

* decomp: finish `target` mostly

* decomp: finish `water`

* decomp: finished `robotboss-weapon`

* decomp: finish `robotboss-misc`

* decomp: finish the majority of `robotboss`

* blocked: `racer` has an issue around entering a state

* blocked: `target-racer` done mostly, but NYI case in one function

* blocked: `racer-states` mostly finished, but bitfield issue

* blocked: `billy` on state decomping

* blocked: `bully` on state decomping

* waiting: `rolling-lightning-mole` waiting on navigate for 2 funcs

* blocked: `rolling-robber` finished but `s6-1` issue

* blocked: `ogreboss` uint64's for types cant label load em!

* blocked: `mother-spider` state decompilation

* half-done `target-flut`

* blocked: `target-flut` some sort of new bitfield state

* some improvements in `racer-states` with my new-found knowledge

* progress: started on `target-death`

* blocked: `target-death` handle casts

* decomp: finish `collide-reaction-racer`

* blocked: `target-handler` handler forced to return `none`

* decomp: 99% of `target2` finished

* decomp: finish `target2`

* gsrc: update

* update post merge

* address feedback

* scripts: add script to detect decomp issues

* fix wide-spread `collide-shape` method missing arg

* some small things i changed from master

* address feedback

* fix typeconsistency issue
2021-11-24 00:33:10 -05:00
ManDude 80a002f8c0
[decomp] entity birth (#964)
* make birthing work

* fix float representation on defskelgroup

* test

* update

* debugger improvements & dont upload aux sprites

* ?

* fix progress

* fixes

* fixes

* Create bea.gd

* fix test

* fix xmm reg clobbering in kernel (water)

* cleanup cam-start

* clear gamepad state every frame

* allow controller connects and disconnects while running
2021-11-15 19:05:28 -05:00
Tyler Wilding f605b0ee38
decomp: generic-obs (#894)
* stash

* more

* and more

* like 80% done

* trying to update things

* refreshed work on generic-obs

* blocked: down to only decompiler issues!

* decomp: finish `generic-obs` skip over the failing functions for now

* `pair` -> `object`s and fix 2/4 of the functions i had skipped

* address feedback
2021-11-13 23:31:29 -05:00
Tyler Wilding 44c43610ce
game: Get camera code working (#965)
* cmake: disable edit&continue flags

* goos: make the build system work for alternate file paths nicely

* vs: update vs config

* vscode: extend terminal buffer!

* vs: fix presets

* debugger: fix exception handler

* game: add logo to application

* decomp: get `cam-master` to "work" -- manually changed return type

* debugger: fix printing issue

* game: get the camera actually working

* game: neutralize the analog sticks

* game: support analog sticks

* tests: update ref tests

* temp commit - inprogress stuff

* fix `send-macro`

* turn camera stuff back on, seems to work.  Still kernel-dispatch problem though

* address feedback

* formatting
2021-11-13 22:41:15 -05:00
Tyler Wilding 5f1ed7ab60
decomp: decompile *-obs files (#856)
* decomp: mostly finish `cam-master`

* decomp/scripts: lots of work in cam-states

* stash

* Merge remote-tracking branch 'water111/master' into decomp/camera-master

Updated submodule third-party/googletest

* decompiler: Add support for non power of 2 offsets for inline arr access

* decomp: mostly finish `cam-states` need to fix a macro issue

* blocked: `cam-master` decompiler crash when adding casts

* decomp: finish `cam-states-dbg`

* decomp: mostly finish `pov-camera` with the exception of joint-related code

* decomp: `cam-debug` finished decompiling, no way does this compile yet though

* decomp: considerable work done in `cam-layout`

* decomp: `cam-layout` almost done!

* decomp: `pov-camera` finished, TC tests will fail for now

* decomp: working on resolving issues

* decomp: cam-layout decompiling

* fixing more issues in cam-master...one event handler remains

* skip problematic function in `cam-master` for now

* gsrc: update res macros

* decomp: finish `cam-states`

* decomp: giving up on `cam-debug`

* tests: allow skipping state handlers in ref tests

* decomp: working through cam-layout bugs

* decomp: allow for shifting non-integers

* decomp: finalize `cam-layout` and `cam-master`

* decomp: finalize `cam-states`

* cleanup: bi-annual formatting of the casting files

* formatting

* decomp: start working on beach-obs

* blocked: `beach-obs` mostly finished, but handle cast issues and unknown `prebind` func signature

* blocked: `villagep-obs` done, `s6` not being referred to as `self`

* decomp: finish `citadel-obs`

* decomp: finish `darkcave-obs`

* blocked: need to allow `hud-h` to decompile properly (#f as static pointer)

* decomp: finish `jungle-obs`

* decomp: finish `village-obs`

* blocked: `misty-obs` handle cast issues

* decomp: finish `village2-obs`

* decomp: 1 function left in `swamp-obs`, particle related -- maybe we know now?

* decomp: finish `swamp-obs`

* blocked: `maincave-obs` handle casts

* decomp: finish `sunken-obs`

* blocked: `rolling-obs` handle casts and hud-parts

* decomp: finish `firecanyon-obs`

* decomp: finish `ogre-obs`

* blocked: `village3-obs` gives up type analysis!

* blocked: `snow-obs` has hud-parts and handle casts code

* decomp: finish `snow-flutflut-obs`

* blocked: `lavatube-obs` has s6-1 issue

* blocked: `title-obs` handle cast issues

* fixed post merge problems

* decomp: finish `jungleb-obs`

* blocked: `training-obs` has `s6-1` issue

* fix type consistency

* scripts: Extend update script to handle the game-text-id enum as well

* git: Update git attributes to effectively halve PR burden

* fixed `sound-play-by-name` signature

* fix particle definitions in firecanyon-obs

* fix func signature in racer-states

* update ref tests

* tests: update current ref tests

* tests: add `joint` to ref-tests

* tests: add `process-drawable` to ref-tests

* updated gsrc

* add back manual fix

* address most feedback, update source files

* get rid of forward declarations in `darkcave-obs`

Co-authored-by: ManDude <7569514+ManDude@users.noreply.github.com>
2021-11-05 21:29:32 -04:00
water111 8846968963
[Debugger] windows debugger and process drawable (#953)
* Update assert.h

* stuff for `process-drawable` to work

* add windows code for debugger

* debugger attaches

* something works

* remove bad ideas

* `(:break)` works

* connection fixes

* fixes + update docs

* crates & `defskelgroup` macro

* clang

* update tests and a few types

* temp

* temp

* fix files

* game builds

* reverse TypeConsistency operation

* add eye stuff for merc art login

* add `(:sym-name)`

* oops

* add `--auto-dbg` option to gc args

* codacy

* improve robustness of dgo unpacker and objectfiledb reading

* `cavegeyserrock`

* hopefully fix linux

* windows FormatMessage weirdness?

* mutex fixes

* fix merge conflicts

Co-authored-by: ManDude <7569514+ManDude@users.noreply.github.com>
2021-10-31 11:01:15 -04:00
Tyler Wilding 5f040792e9
decomp: finish merc-death and some progress on ocean / powerups (#940)
* blocked: `powerups` finicky handle casts

* stuck: decompiled `ocean-texture` but `ocean-verts` is a mystery to me

* decomp: finish `merc-death`

* fix some issues, add a way to remind us for files we've manually touched

* tests: add `ambient` to ref tests, uncover compiler error

* tests: add `main` and `font` to ref tests
2021-10-26 19:16:16 -04:00
ManDude 20e5f671b1
[decompiler] jak 1 PAL demo support + couple fixes (#934)
* add configs

* final fixes

* Update main.gc

* fix "NO-XGO" gen bug

* oops grr
2021-10-23 19:03:19 -04:00
water111 18714ba536
[decomp] load boundaries (#922)
* mostly working

* fixes

* very small fixes

* fix tests

* clang
2021-10-20 19:49:32 -04:00
Tyler Wilding 45318be063
decomp: finish _almost all of_ the remaining camera code (#845)
* decomp: mostly finish `cam-master`

* decomp/scripts: lots of work in cam-states

* stash

* Merge remote-tracking branch 'water111/master' into decomp/camera-master

Updated submodule third-party/googletest

* decompiler: Add support for non power of 2 offsets for inline arr access

* decomp: mostly finish `cam-states` need to fix a macro issue

* blocked: `cam-master` decompiler crash when adding casts

* decomp: finish `cam-states-dbg`

* decomp: mostly finish `pov-camera` with the exception of joint-related code

* decomp: `cam-debug` finished decompiling, no way does this compile yet though

* decomp: considerable work done in `cam-layout`

* decomp: `cam-layout` almost done!

* decomp: `pov-camera` finished, TC tests will fail for now

* decomp: working on resolving issues

* decomp: cam-layout decompiling

* fixing more issues in cam-master...one event handler remains

* skip problematic function in `cam-master` for now

* gsrc: update res macros

* decomp: finish `cam-states`

* decomp: giving up on `cam-debug`

* tests: allow skipping state handlers in ref tests

* decomp: working through cam-layout bugs

* decomp: allow for shifting non-integers

* decomp: finalize `cam-layout` and `cam-master`

* decomp: finalize `cam-states`

* cleanup: bi-annual formatting of the casting files

* formatting

* address feedback - leave the float labels alone for now

* address feedback

* linting/formatting

* update gsrc and ref tests

Co-authored-by: ManDude <7569514+ManDude@users.noreply.github.com>
2021-10-16 21:01:23 -04:00
ManDude caac740aff
[decomp] fisher and FIN.DGO (finalboss) level (#899)
* decomp `fisher`, `robotboss`, `light-eco`, `green-eco-lurker`, `sage-finalboss`, `robotboss-weapon`, `robotboss-misc`

* fixes

* add files

* add `:states` list to `deftype` and fix files

* test state forward decl's on a few more types

* also the refs

* add light-eco

* whatever
2021-10-16 14:06:33 -04:00
ManDude bacf9fd130
PAL jak 1 decompiler profile (#891)
* [decompiler] pal "support"

* inoffensively add some PAL-updated types

* fixes!

* clarify some things for windows

* Update README.md

* dummy

* config fixes

* dummy
2021-10-15 18:17:51 -04:00
Tyler Wilding df92a55749
tooling: breaking off my tooling changes in the big batch PR so they can be used (#850) 2021-09-19 21:45:14 -04:00
Tyler Wilding 4ff2130d55
decomp: decompile almost all the platform related files (#812)
* deocmp: `plat` finished, `baseplat` started

* decomp: finish `baseplat`

* decomp: finish `plat-button`

* decomp: finish `plat-eco`

* decomp: finish `citb-drop-plat-CIT`

* decomp: finish `cit-drop-plat-L1`

* decomp: finish `plat-flip`

* decomp: added a bunch of label defs

* decomp: `plat-button` ref test added

* stash

* decomp: finish `baseplat`

* decomp: finish `plat`

* decomp: finish `plat-button`

* tests: fix offline-test to handle multi-DGO files better

* decomp: finish `citb-drop-plat-CIT`

* decomp: finish `plat-flip`

* decomp: finish `wedge-plats`

* tools: fix memory analyzer, skip invalid type

* decomp: finish `wall-plat`

* fix ordering

* fix some casting issues

* cleanup after conflict resolution

* address reviews
2021-09-06 21:10:19 -04:00
ManDude 89ccb8cbc7
[decomp] progress (#780)
* 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>
2021-09-06 20:35:03 -04:00
Tyler Wilding 05648e0a96
decomp: finish basebutton (#762)
* decomp: finish `basebutton`

* decomp: finalize `basebutton` and fix `evilbro`

* fix some methods / args
2021-08-22 23:16:55 -04:00
Tyler Wilding 991a438927
decomp: decompile target-util | logic-target (#662)
* add IR syntax highlighting

* set the filterFileRegex properly!

* stash

* decompiler: Add print if conditional fails

* decomp: Mostly finish `target-util`

* decomp: figured out a bit more with `target-util`, a bit stuck now

* decomp: *deep breath* `logic-target` mostly complete

* decompiler: More robust arg_count checking for `format` calls

* decomp: some more work in `target-util`

* fix sllv usage

* decomp: `logic-target` is compiling

* decomp: `target-util` very close - blocked by decomp issue!

* decomp: finish `target-util` except for one issue

#772

* demp: update goal_src

* linting

* add back the one remaining method

* address feedback, update source files
2021-08-22 20:46:37 -04:00
Tyler Wilding 253d7996e8
decomp: almost all of the NPCs! (#748)
* all-types: add all missing `:heap-base`s

* decomp: error encountered when compiling `mayor`

`IR_StoreConstOffset::do_codegen can't handle this` for method `play-anim!`

* decomp: finalize `mayor`

* decomp: finish `bird-lady`

* decomp: finish `bird-lady-beach`

* decomp: finish `sculptor`

* decomp: finish `geologist`

* decomp: finish `oracle`

* decomp: finish `farmer` | `explorer` | almost `assistant`

blocked on sparticle-launch-group

* decomp: finish `sage`

* decomp: finish `gambler`

* decomp: finish `warrior`

* decomp: mostly finish `miners`, blocked by sp-launch-group

* fix issue in `sage`

* fix all the reference tests to use the new state stuff

* fix all of goal_src

* address feedback

* re-gen with `until` fixes
2021-08-18 21:33:31 -04:00
water 51dd1bdae8 Merge branch 'master' of github.com:water111/jak-project into w/sprite-distort-stub 2021-08-14 13:07:17 -04:00
water 097ae07bb8 clean up font color 2021-08-14 13:06:43 -04:00
water fbf2a646a3 add sublime text config 2021-08-14 11:28:02 -04:00
Tyler Wilding dda8756a35
Merge remote-tracking branch 'water111/master' into decomp/nav-enemy 2021-08-13 22:00:18 -04:00
Tyler Wilding eaee7e1451
finalizing 2021-08-13 21:14:05 -04:00
water d5f05f723e Merge branch 'master' of https://github.com/water111/jak-project into w/dma-for-font 2021-08-12 20:31:51 -04:00
Tyler Wilding 47391e7a7d
Merge remote-tracking branch 'water111/master' into all-types/heap-base 2021-08-12 19:21:06 -04:00
ManDude c87b818d82 stuff 2021-08-11 04:48:56 +01:00
Tyler Wilding 0007a890cf
docs: Switch to tracking on a file-basis instead of LoC (#743)
* docs: Switch to tracking on a file-basis instead of LoC

* docs: re-gen the app
2021-08-09 19:41:25 -04:00
Tyler Wilding 887152a5cd
all-types: add all missing :heap-bases 2021-08-08 15:15:51 -04:00
water111 ef011f4fe8
[goalc] add a build system (#704)
* add first attempt at build system

* fix stupid bug

* try again
2021-07-15 21:37:15 -04:00