jak-project/goal_src/jak3/engine/debug/anim-tester.gc
Hat Kid 93afb02cf4
decomp3: spawn target, add merc and particle buckets and some temporary hacks (#3445)
This includes all the collision stuff needed to spawn `target`,
decompiles the sparticle code and adds some of the PC hacks needed for
merc to run (it doesn't work quite right and looks bad, likely due to a
combination of code copied from Jak 2 and the time of day hacks).

There are a bunch of temporary hacks (see commits) in place to prevent
the game from crashing quite as much, but it is still extremely prone to
doing so due to lots of missing functions/potentially bad decomp.

---------

Co-authored-by: water <awaterford111445@gmail.com>
2024-04-05 00:07:39 -04:00

172 lines
6.6 KiB
Common Lisp

;;-*-Lisp-*-
(in-package goal)
;; name: anim-tester.gc
;; name in dgo: anim-tester
;; dgos: GAME
(define-extern anim-tester-start (function symbol))
;; DECOMP BEGINS
(deftype list-control (structure)
((listfunc (function int list-control symbol) :offset-assert 0) ;; guessed by decompiler
(list-owner uint32 :offset-assert 4)
(top int32 :offset-assert 8)
(left int32 :offset-assert 12)
(list glst-list :offset-assert 16)
(the-node glst-node :offset-assert 20)
(top-index int32 :offset-assert 24)
(the-index int32 :offset-assert 28)
(the-disp-line int32 :offset-assert 32)
(highlight-index int32 :offset-assert 36)
(current-index int32 :offset-assert 40)
(numlines int32 :offset-assert 44)
(lines-to-disp int32 :offset-assert 48)
(charswide int32 :offset-assert 52)
(highlight-disp-line int32 :offset-assert 56)
(field-id int32 :offset-assert 60)
(xpos int32 :offset-assert 64)
(ypos int32 :offset-assert 68)
(user-info int32 :offset-assert 72)
(return-int int32 :offset-assert 76)
)
:allow-misaligned
:method-count-assert 9
:size-assert #x50
:flag-assert #x900000050
)
(deftype list-field (structure)
((left int32 :offset-assert 0)
(width int32 :offset-assert 4)
)
:method-count-assert 9
:size-assert #x8
:flag-assert #x900000008
)
(deftype DISP_LIST-bank (basic)
((V_SPACING int32 :offset-assert 4)
(BORDER_WIDTH int32 :offset-assert 8)
(BORDER_HEIGHT int32 :offset-assert 12)
(MAX_LINES int32 :offset-assert 16)
(CHAR_WIDTH int32 :offset-assert 20)
(INC_DELAY int32 :offset-assert 24)
(BORDER_LINES int32 :offset-assert 28)
(CXOFF int32 :offset-assert 32)
(CYOFF int32 :offset-assert 36)
(BXOFF int32 :offset-assert 40)
(BYOFF int32 :offset-assert 44)
)
:method-count-assert 9
:size-assert #x30
:flag-assert #x900000030
)
(deftype anim-tester-bank (basic)
((ANIM_SPEED float :offset-assert 4)
(BLEND float :offset-assert 8)
(OBJECT_LIST_X int32 :offset-assert 12)
(OBJECT_LIST_Y int32 :offset-assert 16)
(OBJECT_LIST_MIN_WIDTH int32 :offset-assert 20)
(ANIM_LIST_X int32 :offset-assert 24)
(ANIM_LIST_Y int32 :offset-assert 28)
(ANIM_LIST_MIN_WIDTH int32 :offset-assert 32)
(PICK_LIST_X int32 :offset-assert 36)
(PICK_LIST_Y int32 :offset-assert 40)
(PICK_LIST_MIN_WIDTH int32 :offset-assert 44)
(EDIT_LIST_X int32 :offset-assert 48)
(EDIT_LIST_Y int32 :offset-assert 52)
(EDIT_STATS_X int32 :offset-assert 56)
(EDIT_LIST_MIN_WIDTH int32 :offset-assert 60)
(EDIT_PICK_X int32 :offset-assert 64)
)
:method-count-assert 9
:size-assert #x44
:flag-assert #x900000044
)
(defenum anim-tester-flags
:bitfield #t
:type int32
(fanimt0)
(fanimt1)
(fanimt2)
(fanimt3)
(fanimt4)
(fanimt5)
)
(deftype anim-tester (process-focusable)
((flags anim-tester-flags :offset-assert 208)
(obj-list glst-list :inline :offset-assert 212)
(current-obj string :offset-assert 228)
(speed int32 :offset-assert 232)
(list-con list-control :inline :offset-assert 236)
(pick-con list-control :inline :offset-assert 316)
(item-field int64 :offset-assert 400)
(inc-delay int32 :offset-assert 408)
(inc-timer int32 :offset-assert 412)
(edit-mode int32 :offset-assert 416)
(old-mode int32 :offset-assert 420)
(anim-speed float :offset-assert 424)
(anim-gspeed float :offset-assert 428)
(anim-first float :offset-assert 432)
(anim-last float :offset-assert 436)
)
:method-count-assert 28
:size-assert #x1b8
:heap-base #x140
:flag-assert #x1c014001b8
(:states
anim-tester-process
)
)
(deftype anim-test-obj (glst-named-node)
((obj-art-group basic :offset-assert 12)
(seq-list glst-list :inline :offset-assert 16)
(flags int32 :offset-assert 32)
(mesh-geo basic :offset-assert 36)
(joint-geo basic :offset-assert 40)
(list-con list-control :inline :offset-assert 44)
(parent uint32 :offset-assert 124)
(anim-index int32 :offset-assert 128)
(anim-hindex int32 :offset-assert 132)
(seq-index int32 :offset-assert 136)
(seq-hindex int32 :offset-assert 140)
)
:method-count-assert 9
:size-assert #x90
:flag-assert #x900000090
)
(deftype anim-test-sequence (glst-named-node)
((item-list glst-list :inline :offset-assert 12)
(playing-item int32 :offset-assert 28)
(flags int32 :offset-assert 32)
(list-con list-control :inline :offset-assert 36)
(parent anim-test-obj :offset-assert 116)
)
:method-count-assert 9
:size-assert #x78
:flag-assert #x900000078
)
(deftype anim-test-seq-item (glst-named-node)
((speed int32 :offset-assert 12)
(blend int32 :offset-assert 16)
(first-frame float :offset-assert 20)
(last-frame float :offset-assert 24)
(num-frames float :offset-assert 28)
(artist-base float :offset-assert 32)
(flags int32 :offset-assert 36)
(parent anim-test-sequence :offset-assert 40)
)
:method-count-assert 9
:size-assert #x2c
:flag-assert #x90000002c
)
(define-extern *anim-tester* (pointer anim-tester))