Commit graph

382 commits

Author SHA1 Message Date
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 25b0e1be7d
[decomp] collectables + works ingame! (#971)
* decomp: `collectables`

* fix types

* `powerups` and fixes

* fixes

* Merge branch 'pr/929' into d/temp/collectables

* fix collide stuff

* update things...

* update

* update

* temp bump global heap mem

* fix `defstate` hooks wrong/unnecessary sets & collide stuff for collectables

* dumb mistakes :)

* stub out broken process-drawable stuff

* update refs

* add `:no-inspect` key and save some memory & remove birth logs

* Update kmachine.h

* clang

* add citadel

* fix no-inspect key

* fix tests!!

* fix stupid mistake in `collide-shape-prim-sphere` alloc

* comment annoying print

* feedback

* fix edge-case probably

* remove `:no-inspect`s
2021-11-23 18:25:57 -05:00
water111 232e71ad5b
fix actor compaction (#973) 2021-11-15 22:55:43 -05:00
water111 7292cb5765
tfrag improvements (#970)
* tfrag improvements

* cleanup

* one last fix

* clang
2021-11-15 20:07: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
water111 380e7b3580
clean up a few small things (#968) 2021-11-14 12:45:47 -05:00
Tyler Wilding c8a31d4d1b
decomp: Pass of the final remaining gameplay related files (#921)
* blocked: `plant-boss` has `go` returning none issues

* blocked: `ice-cube` return value getting forced to none

* blocked: `ropebridge` has static data isue

* blocked: `double-lurker` handle cast issues

* decomp: finish `billy`

* decomp: finish `lurkerworm`

* blocked: `pelican` handle casts

* decomp: finish `citb-bunny`

* blocked: inherited states in `snow-bunny`

* blocked: CFG resolution in `lavatube-energy`

* decomp: finish `citadel-sages`

* progress: working through `collectables`

* blocked: finished as much as currently possible in `collectables`

- process-tree's 10 method pparently has a 3rd arg -- im doubtful
- set-to-run function
- branch delay unimplemented case
- weird method 21 eco-collectable

* pre-merge

* decomp: update source files / ref tests

* decomp: finish `floating-launcher`, `shover`, `steam-cap`, `sun-iris-door`, `whirlpool`

* decomp: address feedback

* update ref tests and gsrc
2021-11-14 11:14:43 -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
water111 3afd99a8e3
[graphics] partial tfrag implementation (#958)
* temp

* some decomp

* tfrag dma setup

* fix negative label bug

* tfrag dma setup

* tfrag, with pipeline tricks

* kinda works

* cleanup before trying some color stuff

* time of day works

* clean up

* temp before render changes

* a few more fixes

* fix up tests

* clean up

* fix

* fix alignment

* one more cleanup
2021-11-13 20:44:17 -05:00
ManDude ae22ba42d0
[decomp] orb-cache (#956)
* begin

* tests

* missing stuff
2021-11-09 23:22:31 -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
ManDude 2ea2d6a58a
[decompiler] implement defskelgroup (#955)
* implement `defskelgroup` in decompiler

0 lines removed!

* clang

* fix matcher code

* it was fine actually

* update all files (pt 1)

* update all files

* remaining fixes!

* null deref

* use METER_LENGTH

* move max lod warning

* clang

* math error

* fix macros too

* fix bug in a print
2021-11-04 19:10:39 -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 6299335625
decomp: finish junglesnake and viewer (#951)
* decomp: finish `junglesnake`

* decomp: finish `viewer`
2021-10-29 19:19:51 -04:00
water111 66bd7cb464
[decomp] memory usage (#945)
* fix type bug for memory-usage

* avoid name conflict in link method and function
2021-10-26 21:14:50 -04:00
water111 05d892e4ed
fix one line (#944) 2021-10-26 19:23:37 -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
Tyler Wilding 236f298138
decomp: add default-menu to ref tests, cleanup irrelevant gsrc forward decls (#941)
* decomp: add `default-menu` to ref tests, cleanup gsrc

* re-disable function

* decomp: add `drawable-group` to ref-tests
2021-10-25 19:22:52 -04:00
water111 d6e82eedb0
[decomp] fix and decomp part tester (#935)
* temp

* update tests
2021-10-23 20:15:31 -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 d6f631383e
decomp more level stuff (#932)
* more level stuff

* vi1 to jun load working, with multiple skies

* small fixes

* add level ref test

* clang
2021-10-23 16:00:49 -04:00
ManDude 8ca67a5c21
[decomp] add (most) PAL changes to main (#925)
* add (most) PAL changes to `main`

* fix examplecam movement

* fix up camera code

* Use `score` system when decompiling structures

* typo

* restore asserts
2021-10-23 15:38:06 -04:00
water111 49e3fa2963
fix decomp bugs and add ref tests (#930) 2021-10-23 10:41:11 -04:00
water111 44626cfedd
fix issues and decompile racer-states (#924)
* fix issues and decompile racer-states

* type fix
2021-10-21 22:38:39 -04:00
water111 b7fe8447e2
[decomp] improve types around enter-state (#923)
* clean up

* restore hack
2021-10-20 20:55:25 -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
ManDude 0e96cdb6c5
[de/compiler] New text tool (#918)
* fix `citb-drop-plat` a bit and PAL `fisher`

* Clean up `pc-pad-utils`. Looks so clean!

* Increase process stacks by ~2x

* Convert `game_text` custom encoding to and from a readable one (UTF-8)

* clang

* add missing characters

* support all diacritic variants

* fix a character

* remaining cases

* fix tests

* fix memory leak?

* clang

* add custom characters w/ diacritics

* Update all-types.gc

* robustness

* minor bug

* move custom font decoding function to `FontUtils.cpp`

* Move valid source chars patching to Reader constructor
2021-10-19 00:02:18 -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
water111 993f348c93
[decomp] recognize most cases send-event macro (#906)
* recognize send-event macro

* missing forward def

* resolve merge conflicts
2021-10-16 15:12:01 -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
water111 9225d28444
clean up casts around conds with elses (#904) 2021-10-16 12:02:49 -04:00
water111 08e98b49c6
[goalc] improve reliability of debugger tests (#898)
* try fixing debugger test

* poke first

* debug print

* another try on debug prints

* start watcher after we did a break

* cleanup print statements, use sleep_for instead of usleep
2021-10-15 19:24:52 -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
water111 b2052016e2
[decomp] sky/time of day (#883)
* time of day

* goal code seems to work

* stars at wrong spot

* stars and sun work

* debugging clouds

* fix texture correction

* sky works

* cleanup, add profiler

* clean up

* final clean up

* offline tests

* missing include
2021-10-10 20:07:03 -04:00
Tyler Wilding 2cb00f4a02
decomp: anim-tester and a bunch of progress on files that are blocked (#884)
* blocked: `puffer` has state decomp issues

* blocked: decomp crash when adding process-drawble cast in `helix-water`

* blocked: `green-eco-lurker` no nice way to cast value out of EMB

* decomp: started on `citadel-sages`

* decomp: `seagull` blocked state decomp

* blocked: `sunken-pipegame` runs into handle related issues

* blocked: `snow-ram` and `snow-ram-boss` state decomp

* decomp: `rolling-race-ring` blocked, handle casts

* blocked: state decomp in `part-tester`

* decomp: started `joint-exploder`

* blocked: `anim-tester` has rare cmove-#f-zero usage

* decomp: I lied! `anim-tester` finished

* config: update banned list
2021-10-10 19:53:19 -04:00
Tyler Wilding 28e3ba4863
decomp: finish effect-control -- fixed ambient-sound type def (#876) 2021-10-10 18:44:47 -04:00
ManDude 4665b5a246
change type of seconds and clean up opengl includes (#887)
* change type of `seconds`

* fixes to pc pad input (visual only)

* strip down openGL to the version we're actually using for now (4.3 no extensions)

* turn on this opengl message

* really minor inconsequential change
2021-10-06 19:32:58 -04:00
Tyler Wilding f703d625a5
decomp: finish misty-conveyor (#878)
* decomp: finish `misty-conveyor`

* address feedback
2021-10-05 23:21:19 -04:00
Tyler Wilding 2b28d9b5f6
decomp: finish battlecontroller (#877)
* decomp: finish `battlecontroller`

* address feedback
2021-10-05 23:06:20 -04:00
water111 184720b7ca
finish up some functions in mood (#875) 2021-10-02 12:47:39 -04:00
water111 911a8e32a4
[decomp] minor type cleanup (#874)
* clean up some types

* clean up settings
2021-10-02 11:50:12 -04:00
Tyler Wilding fdd8615204
decomp: hud-classes (#819)
* maybe fix symbol decompile issue

* try again on a label

* stash

* very close on `hud-classes`

* 1 function remaining, whats `key` off the cpuinfo?

* some more work on hud-classes, 1 function to go...

* start updating `collectables` to new state handling

* decomp: finish `hud-classes`

* blocked: `hud` crashes in `(code hud-collecting)` around states

* fix tests

* address feedback

* damn submodules

Co-authored-by: water <awaterford111445@gmail.com>
2021-10-02 09:28:06 -04:00
water111 845802ca45
memory cards (in progress) (#868)
* c++ memory card stuff

* saving kinda works

* load working

* more progress

* clean up
2021-10-01 23:12:34 -04:00
Tyler Wilding e891b01c0b
decomp: relocate and collide (#867)
* decomp: finish `relocate`

* decomp: finish `collide`
2021-09-29 21:00:36 -04:00
Tyler Wilding fbcc1542f3
decomp: decompile remaining particle files (#865)
* decomp: finish `beach-part`

* decomp: finish `citadel-part`

* decomp: finish `robotboss-part`

* decomp: finish `sage-finalboss-part`

* decomp: finish `jungle-part`

* decomp: finish `flut-part`

* decomp: finish `firecanyon-part`

* decomp: finish `village2-part2`

* decomp: finish `swamp-part`

* decomp: finish `maincave-part`

* decomp: finish `sunken-part0-5`

* decomp: finish `ogre-part`

* decomp: finish `robocave-part` and `snow-part`

* decomp: finish `collectables-part`

* decomp: finish `village1-part`

* decomp: finish `village1-part2

* decomp: finish `training-part`

* decomp: finish `misty-part`

* decomp: finish `village2-part`

* decomp: finish `village3-part`

* decomp: finish `lavatube-part`

* decomp: finish `hud-h`, `target-racer-h`, `racer-part`

* address feedback
2021-09-29 20:33:40 -04:00
water111 b1e987c42f
fix pointer set to #f in static (#864) 2021-09-28 22:20:45 -04:00
water111 7ebbe812b1
Cleanup sparticle, add ref tests, name a few methods (#863)
* temp

* add reference tests
2021-09-28 21:17:38 -04:00
Tyler Wilding dd959d0d0d
decomp: Continuing full pass of gameplay code (#839)
* decomp: finish `babak` - :code is called in `(code nav-enemy-patrol babak)`

* decomp: almost finish `process-taskable`

* blocked: mistycannon / pelican

* decomp: finish `babak-with-cannon` write a script to fix gsrc

* decomp: finish `process-taskable`

* decomp: finish `flutflut` and `yakow`

* decomp: finish `fishermans-boat`

* blocked: state decomp `training-obs`

* decomp: finish `muse`

* decomp: finish `bonelurker`

* blocked: state decomp in `quicksandlurker`| `balloonlurker`

* decomp: finish `assistant-village2`

* scripts: script to help updating goal_src

* starting to update goal_src

* tests: update ref tests

* src: more src updating

* src: waiting on `process-taskable` and `muse`

* blocked: `citb-plat` state decomp

* decomp: finish `square-platform`

* blocked: `orbit-plat` due to overlays + static data

* decomp: finish `qbert-plat`

* blocked: almost finish `misty-conveyor`, sparticle-callback

* blocked: jungle-mirrors

* blocked: state decomp in `swamp-blimp`

* decomp: finish `swamp-bat`

* decomp: finish `swamp-rat`

* decomp: finish `swamp-rat-nest`

* blocked: state decomp `kermit`

* decomp: finish `cavecrystal-light`

* decomp: finish `spiderwebs`

* blocked: state decomp `dark-crystal`

* decomp: finish `baby-spider`

* decomp: finish `mother-spider-h`

* decomp: finish `mother-spider-proj`

* blocked: state decomp in `gnawer`

* blocked: state decomp in `driller-lurker`

* blocked: `sun-exit-chamber` breaks when adding handle cast

* decomp: finish `sunken-water`

* blocked: `target-tube` ShortCircuitElement::push_to_stack

* decomp: finish `sunken-fish`

* blocked: `minecart` decomp crash when adding stack cast

* decomp: finish `assistant-village3`

* decomp: finish `sage-village3`

* blocked: `cave-trap` done but ran into `go` issue

* blocked: `spider-egg` state decomp

* decomp: finish `target-snowball`

* blocked/stuck: `target-ice` decomp issue around cpad

* pausing: ice-cube has some weird collide-shape-prim handling

* blocked: `snow-ball` state decomp

* blocked: `snow-bumper` state decomp

* decomp: finish `snow-ram-h`

* decomp: finish `yeti`

* decomp: finish `assistant-lavatube`

* re-enable the float cast log

* decomp: updating to new sparticle definitions

* decomp: address feedback up to `swamp-rat-nest`

* address remaining feedback

* all-types: move the `pointer` def

* add back temporary `hud-hidden?`
2021-09-28 20:42:00 -04:00