mirror of
https://github.com/open-goal/jak-project
synced 2026-05-25 07:23:19 -04:00
5300a7fc2b
* make flags! * finish flags * refs * Update game.gp * fix target decomp * Update target.gc
3118 lines
124 KiB
Common Lisp
Vendored
Generated
3118 lines
124 KiB
Common Lisp
Vendored
Generated
;;-*-Lisp-*-
|
|
(in-package goal)
|
|
|
|
;; this file is debug only
|
|
(declare-file (debug))
|
|
(when *debug-segment*
|
|
;; definition of type list-control
|
|
(deftype list-control (structure)
|
|
((listfunc (function int list-control symbol) :offset-assert 0)
|
|
(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)
|
|
(user-info-u uint32 :offset 72)
|
|
(return-int int32 :offset-assert 76)
|
|
)
|
|
:allow-misaligned
|
|
:method-count-assert 9
|
|
:size-assert #x50
|
|
:flag-assert #x900000050
|
|
)
|
|
|
|
;; definition for method 3 of type list-control
|
|
(defmethod inspect list-control ((obj list-control))
|
|
(format #t "[~8x] ~A~%" obj 'list-control)
|
|
(format #t "~Tlistfunc: ~A~%" (-> obj listfunc))
|
|
(format #t "~Tlist-owner: #x~X~%" (-> obj list-owner))
|
|
(format #t "~Ttop: ~D~%" (-> obj top))
|
|
(format #t "~Tleft: ~D~%" (-> obj left))
|
|
(format #t "~Tlist: #<glst-list @ #x~X>~%" (-> obj list))
|
|
(format #t "~Tthe-node: #<glst-node @ #x~X>~%" (-> obj the-node))
|
|
(format #t "~Ttop-index: ~D~%" (-> obj top-index))
|
|
(format #t "~Tthe-index: ~D~%" (-> obj the-index))
|
|
(format #t "~Tthe-disp-line: ~D~%" (-> obj the-disp-line))
|
|
(format #t "~Thighlight-index: ~D~%" (-> obj highlight-index))
|
|
(format #t "~Tcurrent-index: ~D~%" (-> obj current-index))
|
|
(format #t "~Tnumlines: ~D~%" (-> obj numlines))
|
|
(format #t "~Tlines-to-disp: ~D~%" (-> obj lines-to-disp))
|
|
(format #t "~Tcharswide: ~D~%" (-> obj charswide))
|
|
(format #t "~Thighlight-disp-line: ~D~%" (-> obj highlight-disp-line))
|
|
(format #t "~Tfield-id: ~D~%" (-> obj field-id))
|
|
(format #t "~Txpos: ~D~%" (-> obj xpos))
|
|
(format #t "~Typos: ~D~%" (-> obj ypos))
|
|
(format #t "~Tuser-info: ~D~%" (-> obj user-info))
|
|
(format #t "~Treturn-int: ~D~%" (-> obj return-int))
|
|
obj
|
|
)
|
|
|
|
;; definition of type list-field
|
|
(deftype list-field (structure)
|
|
((left int32 :offset-assert 0)
|
|
(width int32 :offset-assert 4)
|
|
)
|
|
:method-count-assert 9
|
|
:size-assert #x8
|
|
:flag-assert #x900000008
|
|
)
|
|
|
|
;; definition for method 3 of type list-field
|
|
(defmethod inspect list-field ((obj list-field))
|
|
(format #t "[~8x] ~A~%" obj 'list-field)
|
|
(format #t "~Tleft: ~D~%" (-> obj left))
|
|
(format #t "~Twidth: ~D~%" (-> obj width))
|
|
obj
|
|
)
|
|
|
|
;; definition of type DISP_LIST-bank
|
|
(deftype DISP_LIST-bank (basic)
|
|
((TV_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
|
|
)
|
|
|
|
;; definition for method 3 of type DISP_LIST-bank
|
|
(defmethod inspect DISP_LIST-bank ((obj DISP_LIST-bank))
|
|
(format #t "[~8x] ~A~%" obj (-> obj type))
|
|
(format #t "~TV_SPACING: ~D~%" (-> obj TV_SPACING))
|
|
(format #t "~TBORDER_WIDTH: ~D~%" (-> obj BORDER_WIDTH))
|
|
(format #t "~TBORDER_HEIGHT: ~D~%" (-> obj BORDER_HEIGHT))
|
|
(format #t "~TMAX_LINES: ~D~%" (-> obj MAX_LINES))
|
|
(format #t "~TCHAR_WIDTH: ~D~%" (-> obj CHAR_WIDTH))
|
|
(format #t "~TINC_DELAY: ~D~%" (-> obj INC_DELAY))
|
|
(format #t "~TBORDER_LINES: ~D~%" (-> obj BORDER_LINES))
|
|
(format #t "~TCXOFF: ~D~%" (-> obj CXOFF))
|
|
(format #t "~TCYOFF: ~D~%" (-> obj CYOFF))
|
|
(format #t "~TBXOFF: ~D~%" (-> obj BXOFF))
|
|
(format #t "~TBYOFF: ~D~%" (-> obj BYOFF))
|
|
obj
|
|
)
|
|
|
|
;; definition for symbol *DISP_LIST-bank*, type DISP_LIST-bank
|
|
(define *DISP_LIST-bank* (new 'static 'DISP_LIST-bank
|
|
:TV_SPACING 8
|
|
:BORDER_WIDTH 4
|
|
:BORDER_HEIGHT 4
|
|
:MAX_LINES 12
|
|
:CHAR_WIDTH 10
|
|
:INC_DELAY 20
|
|
:BORDER_LINES 3
|
|
)
|
|
)
|
|
|
|
;; definition for function display-list-control
|
|
;; INFO: Return type mismatch pointer vs none.
|
|
(defun display-list-control ((arg0 list-control))
|
|
(when (< (-> arg0 current-index) 0)
|
|
(set! (-> arg0 current-index) 0)
|
|
0
|
|
)
|
|
(if (>= (-> arg0 current-index) (glst-num-elements (-> arg0 list)))
|
|
(set! (-> arg0 current-index) -1)
|
|
)
|
|
(when (< (-> arg0 highlight-index) 0)
|
|
(set! (-> arg0 highlight-index) 0)
|
|
0
|
|
)
|
|
(if (>= (-> arg0 highlight-index) (glst-num-elements (-> arg0 list)))
|
|
(set! (-> arg0 highlight-index) (+ (glst-num-elements (-> arg0 list)) -1))
|
|
)
|
|
(set! (-> arg0 the-index) (-> arg0 highlight-index))
|
|
(set! (-> arg0 the-node) (glst-get-node-by-index (-> arg0 list) (-> arg0 highlight-index)))
|
|
(when (not ((-> arg0 listfunc) 1 arg0))
|
|
(set! (-> arg0 the-index) 0)
|
|
(let ((v1-12 (-> arg0 list)))
|
|
"return the start of the list"
|
|
(set! (-> arg0 the-node) (-> v1-12 head))
|
|
)
|
|
(while (let ((v1-22 (-> arg0 the-node)))
|
|
"is this node the end of the list. #t = end"
|
|
(not (not (-> v1-22 next)))
|
|
)
|
|
(when ((-> arg0 listfunc) 1 arg0)
|
|
(set! (-> arg0 highlight-index) (-> arg0 the-index))
|
|
(goto cfg-18)
|
|
)
|
|
(+! (-> arg0 the-index) 1)
|
|
(let ((v1-20 (-> arg0 the-node)))
|
|
"return the next node in the list"
|
|
(set! (-> arg0 the-node) (-> v1-20 next))
|
|
)
|
|
)
|
|
(set! (-> arg0 highlight-index) 0)
|
|
0
|
|
)
|
|
(label cfg-18)
|
|
(set! (-> arg0 the-index) (-> arg0 highlight-index))
|
|
(set! (-> arg0 the-node) (glst-get-node-by-index (-> arg0 list) (-> arg0 the-index)))
|
|
((-> arg0 listfunc) 4 arg0)
|
|
(let ((s5-2 #f)
|
|
(s4-0 #f)
|
|
)
|
|
(set! (-> arg0 numlines) 0)
|
|
(set! (-> arg0 charswide) 0)
|
|
(set! (-> arg0 the-index) 0)
|
|
(set! (-> arg0 the-disp-line) 0)
|
|
(let ((v1-29 (-> arg0 list)))
|
|
"return the start of the list"
|
|
(set! (-> arg0 the-node) (-> v1-29 head))
|
|
)
|
|
(while (let ((v1-52 (-> arg0 the-node)))
|
|
"is this node the end of the list. #t = end"
|
|
(not (not (-> v1-52 next)))
|
|
)
|
|
(when ((-> arg0 listfunc) 1 arg0)
|
|
(if (and (not s5-2) (>= (-> arg0 the-index) (-> arg0 top-index)))
|
|
(set! s5-2 #t)
|
|
)
|
|
(when (and (not s4-0) (>= (-> arg0 the-index) (-> arg0 highlight-index)))
|
|
(set! s4-0 #t)
|
|
(set! (-> arg0 highlight-disp-line) (-> arg0 the-disp-line))
|
|
)
|
|
((-> arg0 listfunc) 2 arg0)
|
|
(if (< (-> arg0 charswide) (-> arg0 return-int))
|
|
(set! (-> arg0 charswide) (-> arg0 return-int))
|
|
)
|
|
(if s5-2
|
|
(+! (-> arg0 the-disp-line) 1)
|
|
)
|
|
(+! (-> arg0 numlines) 1)
|
|
)
|
|
(+! (-> arg0 the-index) 1)
|
|
(let ((v1-50 (-> arg0 the-node)))
|
|
"return the next node in the list"
|
|
(set! (-> arg0 the-node) (-> v1-50 next))
|
|
)
|
|
)
|
|
)
|
|
(set! (-> arg0 lines-to-disp) (if (< (-> *DISP_LIST-bank* MAX_LINES) (-> arg0 numlines))
|
|
(-> *DISP_LIST-bank* MAX_LINES)
|
|
(-> arg0 numlines)
|
|
)
|
|
)
|
|
(if (> (-> arg0 lines-to-disp) 0)
|
|
(-> arg0 lines-to-disp)
|
|
1
|
|
)
|
|
(let* ((s4-1 (-> *display* frames (-> *display* on-screen) frame debug-buf))
|
|
(s5-3 (-> s4-1 base))
|
|
)
|
|
(draw-sprite2d-xy
|
|
s4-1
|
|
(-> arg0 left)
|
|
(-> arg0 top)
|
|
(+ (* (-> arg0 charswide) (-> *DISP_LIST-bank* CHAR_WIDTH)) (* (-> *DISP_LIST-bank* BORDER_WIDTH) 2))
|
|
(+ (* (+ (-> arg0 lines-to-disp) 1) (-> *DISP_LIST-bank* TV_SPACING))
|
|
(* (-> *DISP_LIST-bank* BORDER_WIDTH) 2)
|
|
)
|
|
(new 'static 'rgba :a #x40)
|
|
)
|
|
(let ((a3-6 (-> s4-1 base)))
|
|
(let ((v1-72 (the-as object (-> s4-1 base))))
|
|
(set! (-> (the-as dma-packet v1-72) dma) (new 'static 'dma-tag :id (dma-tag-id next)))
|
|
(set! (-> (the-as dma-packet v1-72) vif0) (new 'static 'vif-tag))
|
|
(set! (-> (the-as dma-packet v1-72) vif1) (new 'static 'vif-tag))
|
|
(set! (-> s4-1 base) (&+ (the-as pointer v1-72) 16))
|
|
)
|
|
(dma-bucket-insert-tag
|
|
(-> *display* frames (-> *display* on-screen) frame bucket-group)
|
|
(bucket-id debug-draw0)
|
|
s5-3
|
|
(the-as (pointer dma-tag) a3-6)
|
|
)
|
|
)
|
|
)
|
|
(set! (-> arg0 xpos) (+ (-> arg0 left) (-> *DISP_LIST-bank* BORDER_WIDTH)))
|
|
(set! (-> arg0 ypos) (+ (-> arg0 top) (-> *DISP_LIST-bank* BORDER_HEIGHT)))
|
|
((-> arg0 listfunc) 3 arg0)
|
|
(cond
|
|
((> (-> arg0 lines-to-disp) 0)
|
|
(cond
|
|
((< (-> arg0 highlight-disp-line) (-> *DISP_LIST-bank* BORDER_LINES))
|
|
(let ((s5-4 (- (-> *DISP_LIST-bank* BORDER_LINES) (-> arg0 highlight-disp-line))))
|
|
(set! (-> arg0 the-node) (glst-get-node-by-index (-> arg0 list) (-> arg0 top-index)))
|
|
(set! (-> arg0 the-index) (-> arg0 top-index))
|
|
(let ((v1-88 (-> arg0 the-node)))
|
|
"is this node the start of the list. #t = start"
|
|
(when (not (not (-> v1-88 prev)))
|
|
(while #t
|
|
(let ((v1-92 (-> arg0 the-node)))
|
|
"return the previous node in the list"
|
|
(let ((v1-93 (-> v1-92 prev)))
|
|
(let ((a0-41 v1-93))
|
|
"is this node the start of the list. #t = start"
|
|
(if (not (-> a0-41 prev))
|
|
(goto cfg-61)
|
|
)
|
|
)
|
|
(set! (-> arg0 the-node) v1-93)
|
|
)
|
|
)
|
|
(+! (-> arg0 the-index) -1)
|
|
(when ((-> arg0 listfunc) 1 arg0)
|
|
(set! (-> arg0 top-index) (-> arg0 the-index))
|
|
(+! s5-4 -1)
|
|
(if (<= s5-4 0)
|
|
(goto cfg-61)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(label cfg-61)
|
|
)
|
|
((>= (-> arg0 highlight-disp-line) (- (-> *DISP_LIST-bank* MAX_LINES) (-> *DISP_LIST-bank* BORDER_LINES)))
|
|
(let ((s5-5
|
|
(- (-> arg0 highlight-disp-line) (- (-> *DISP_LIST-bank* MAX_LINES) (-> *DISP_LIST-bank* BORDER_LINES)))
|
|
)
|
|
)
|
|
(set! (-> arg0 the-node) (glst-get-node-by-index (-> arg0 list) (-> arg0 top-index)))
|
|
(set! (-> arg0 the-index) (-> arg0 top-index))
|
|
(let ((v1-107 (-> arg0 the-node)))
|
|
"is this node the end of the list. #t = end"
|
|
(when (not (not (-> v1-107 next)))
|
|
(while #t
|
|
(let ((v1-111 (-> arg0 the-node)))
|
|
"return the next node in the list"
|
|
(let ((v1-112 (-> v1-111 next)))
|
|
(let ((a0-55 v1-112))
|
|
"is this node the end of the list. #t = end"
|
|
(if (not (-> a0-55 next))
|
|
(goto cfg-77)
|
|
)
|
|
)
|
|
(set! (-> arg0 the-node) v1-112)
|
|
)
|
|
)
|
|
(+! (-> arg0 the-index) 1)
|
|
(when ((-> arg0 listfunc) 1 arg0)
|
|
(set! (-> arg0 top-index) (-> arg0 the-index))
|
|
(+! s5-5 -1)
|
|
(if (<= s5-5 0)
|
|
(goto cfg-77)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(label cfg-77)
|
|
(set! (-> arg0 the-disp-line) 0)
|
|
(set! (-> arg0 the-index) (-> arg0 top-index))
|
|
(set! (-> arg0 the-node) (glst-get-node-by-index (-> arg0 list) (-> arg0 top-index)))
|
|
(while (let ((v1-135 (-> arg0 the-node)))
|
|
"is this node the end of the list. #t = end"
|
|
(not (or (not (-> v1-135 next)) (>= (-> arg0 the-disp-line) (-> *DISP_LIST-bank* MAX_LINES))))
|
|
)
|
|
(when ((-> arg0 listfunc) 1 arg0)
|
|
(set! (-> arg0 xpos) (+ (-> arg0 left) (-> *DISP_LIST-bank* BORDER_WIDTH)))
|
|
(set! (-> arg0 ypos) (+ (-> arg0 top)
|
|
(-> *DISP_LIST-bank* BORDER_HEIGHT)
|
|
(* (+ (-> arg0 the-disp-line) 1) (-> *DISP_LIST-bank* TV_SPACING))
|
|
)
|
|
)
|
|
((-> arg0 listfunc) 0 arg0)
|
|
(+! (-> arg0 the-disp-line) 1)
|
|
)
|
|
(+! (-> arg0 the-index) 1)
|
|
(let ((v1-133 (-> arg0 the-node)))
|
|
"return the next node in the list"
|
|
(set! (-> arg0 the-node) (-> v1-133 next))
|
|
)
|
|
)
|
|
)
|
|
(else
|
|
(let* ((s4-2 (-> *display* frames (-> *display* on-screen) frame debug-buf))
|
|
(s5-6 (-> s4-2 base))
|
|
)
|
|
(draw-string-xy
|
|
"**NONE**"
|
|
s4-2
|
|
(+ (-> arg0 left) (-> *DISP_LIST-bank* BORDER_WIDTH))
|
|
(+ (-> arg0 top) (-> *DISP_LIST-bank* BORDER_HEIGHT) (-> *DISP_LIST-bank* TV_SPACING))
|
|
(font-color dim-white)
|
|
(font-flags shadow kerning)
|
|
)
|
|
(let ((a3-12 (-> s4-2 base)))
|
|
(let ((v1-147 (the-as object (-> s4-2 base))))
|
|
(set! (-> (the-as dma-packet v1-147) dma) (new 'static 'dma-tag :id (dma-tag-id next)))
|
|
(set! (-> (the-as dma-packet v1-147) vif0) (new 'static 'vif-tag))
|
|
(set! (-> (the-as dma-packet v1-147) vif1) (new 'static 'vif-tag))
|
|
(set! (-> s4-2 base) (&+ (the-as pointer v1-147) 16))
|
|
)
|
|
(dma-bucket-insert-tag
|
|
(-> *display* frames (-> *display* on-screen) frame bucket-group)
|
|
(bucket-id debug-draw0)
|
|
s5-6
|
|
(the-as (pointer dma-tag) a3-12)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(none)
|
|
)
|
|
|
|
;; definition of type anim-tester-bank
|
|
(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
|
|
)
|
|
|
|
;; definition for method 3 of type anim-tester-bank
|
|
(defmethod inspect anim-tester-bank ((obj anim-tester-bank))
|
|
(format #t "[~8x] ~A~%" obj (-> obj type))
|
|
(format #t "~TANIM_SPEED: ~f~%" (-> obj ANIM_SPEED))
|
|
(format #t "~TBLEND: ~f~%" (-> obj BLEND))
|
|
(format #t "~TOBJECT_LIST_X: ~D~%" (-> obj OBJECT_LIST_X))
|
|
(format #t "~TOBJECT_LIST_Y: ~D~%" (-> obj OBJECT_LIST_Y))
|
|
(format #t "~TOBJECT_LIST_MIN_WIDTH: ~D~%" (-> obj OBJECT_LIST_MIN_WIDTH))
|
|
(format #t "~TANIM_LIST_X: ~D~%" (-> obj ANIM_LIST_X))
|
|
(format #t "~TANIM_LIST_Y: ~D~%" (-> obj ANIM_LIST_Y))
|
|
(format #t "~TANIM_LIST_MIN_WIDTH: ~D~%" (-> obj ANIM_LIST_MIN_WIDTH))
|
|
(format #t "~TPICK_LIST_X: ~D~%" (-> obj PICK_LIST_X))
|
|
(format #t "~TPICK_LIST_Y: ~D~%" (-> obj PICK_LIST_Y))
|
|
(format #t "~TPICK_LIST_MIN_WIDTH: ~D~%" (-> obj PICK_LIST_MIN_WIDTH))
|
|
(format #t "~TEDIT_LIST_X: ~D~%" (-> obj EDIT_LIST_X))
|
|
(format #t "~TEDIT_LIST_Y: ~D~%" (-> obj EDIT_LIST_Y))
|
|
(format #t "~TEDIT_STATS_X: ~D~%" (-> obj EDIT_STATS_X))
|
|
(format #t "~TEDIT_LIST_MIN_WIDTH: ~D~%" (-> obj EDIT_LIST_MIN_WIDTH))
|
|
(format #t "~TEDIT_PICK_X: ~D~%" (-> obj EDIT_PICK_X))
|
|
obj
|
|
)
|
|
|
|
;; definition for symbol *ANIM_TESTER-bank*, type anim-tester-bank
|
|
(define *ANIM_TESTER-bank* (new 'static 'anim-tester-bank
|
|
:ANIM_SPEED 1.0
|
|
:BLEND 1.0
|
|
:OBJECT_LIST_X 10
|
|
:OBJECT_LIST_Y 50
|
|
:OBJECT_LIST_MIN_WIDTH 18
|
|
:ANIM_LIST_X 10
|
|
:ANIM_LIST_Y 50
|
|
:ANIM_LIST_MIN_WIDTH 17
|
|
:PICK_LIST_X 10
|
|
:PICK_LIST_Y 50
|
|
:PICK_LIST_MIN_WIDTH 21
|
|
:EDIT_LIST_X 10
|
|
:EDIT_LIST_Y 50
|
|
:EDIT_STATS_X 30
|
|
:EDIT_LIST_MIN_WIDTH 64
|
|
:EDIT_PICK_X 30
|
|
)
|
|
)
|
|
|
|
;; definition of type anim-tester
|
|
(deftype anim-tester (process-drawable)
|
|
((flags anim-tester-flags :offset-assert 176)
|
|
(obj-list glst-list :inline :offset-assert 180)
|
|
(current-obj string :offset-assert 196)
|
|
(speed int32 :offset-assert 200)
|
|
(list-con list-control :inline :offset-assert 204)
|
|
(pick-con list-control :inline :offset-assert 284)
|
|
(item-field int64 :offset-assert 368)
|
|
(inc-delay int32 :offset-assert 376)
|
|
(inc-timer int32 :offset-assert 380)
|
|
(edit-mode int32 :offset-assert 384)
|
|
(old-mode int32 :offset-assert 388)
|
|
(anim-speed float :offset-assert 392)
|
|
(anim-gspeed float :offset-assert 396)
|
|
(anim-first float :offset-assert 400)
|
|
(anim-last float :offset-assert 404)
|
|
)
|
|
:heap-base #x130
|
|
:method-count-assert 20
|
|
:size-assert #x198
|
|
:flag-assert #x1401300198
|
|
(:states
|
|
anim-tester-process
|
|
)
|
|
)
|
|
|
|
;; definition for method 3 of type anim-tester
|
|
;; INFO: this function exists in multiple non-identical object files
|
|
(defmethod inspect anim-tester ((obj anim-tester))
|
|
(let ((t9-0 (method-of-type process-drawable inspect)))
|
|
(t9-0 obj)
|
|
)
|
|
(format #t "~T~Tflags: ~D~%" (-> obj flags))
|
|
(format #t "~T~Tobj-list: #<glst-list @ #x~X>~%" (-> obj obj-list))
|
|
(format #t "~T~Tcurrent-obj: ~A~%" (-> obj current-obj))
|
|
(format #t "~T~Tspeed: ~D~%" (-> obj speed))
|
|
(format #t "~T~Tlist-con: #<list-control @ #x~X>~%" (-> obj list-con))
|
|
(format #t "~T~Tpick-con: #<list-control @ #x~X>~%" (-> obj pick-con))
|
|
(format #t "~T~Titem-field: ~D~%" (-> obj item-field))
|
|
(format #t "~T~Tinc-delay: ~D~%" (-> obj inc-delay))
|
|
(format #t "~T~Tinc-timer: ~D~%" (-> obj inc-timer))
|
|
(format #t "~T~Tedit-mode: ~D~%" (-> obj edit-mode))
|
|
(format #t "~T~Told-mode: ~D~%" (-> obj old-mode))
|
|
(format #t "~T~Tanim-speed: ~f~%" (-> obj anim-speed))
|
|
(format #t "~T~Tanim-gspeed: ~f~%" (-> obj anim-gspeed))
|
|
(format #t "~T~Tanim-first: ~f~%" (-> obj anim-first))
|
|
(format #t "~T~Tanim-last: ~f~%" (-> obj anim-last))
|
|
obj
|
|
)
|
|
|
|
;; definition for function anim-tester-num-print
|
|
;; INFO: Return type mismatch object vs none.
|
|
(defun anim-tester-num-print ((arg0 basic) (arg1 float))
|
|
(cond
|
|
((= arg1 -2.0)
|
|
(format arg0 "max")
|
|
)
|
|
((= arg1 -1.0)
|
|
(format arg0 "min")
|
|
)
|
|
(else
|
|
(format arg0 "~f" arg1)
|
|
)
|
|
)
|
|
(none)
|
|
)
|
|
|
|
;; definition (perm) for symbol *anim-tester*, type (pointer anim-tester)
|
|
(define-perm *anim-tester* (pointer anim-tester) #f)
|
|
|
|
;; definition of type anim-test-obj
|
|
(deftype anim-test-obj (glst-named-node)
|
|
((obj-art-group art-group :offset-assert 12)
|
|
(seq-list glst-list :inline :offset-assert 16)
|
|
(flags int32 :offset-assert 32)
|
|
(mesh-geo merc-ctrl :offset-assert 36)
|
|
(joint-geo art-joint-geo :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
|
|
(:methods
|
|
(new (symbol type int string basic) _type_ 0)
|
|
)
|
|
)
|
|
|
|
;; definition for method 3 of type anim-test-obj
|
|
(defmethod inspect anim-test-obj ((obj anim-test-obj))
|
|
(format #t "[~8x] ~A~%" obj 'anim-test-obj)
|
|
(format #t "~Tnext: #<glst-node @ #x~X>~%" (-> obj next))
|
|
(format #t "~Tprev: #<glst-node @ #x~X>~%" (-> obj prev))
|
|
(format #t "~Tprivname: ~A~%" (-> obj privname))
|
|
(format #t "~Tobj-art-group: ~A~%" (-> obj obj-art-group))
|
|
(format #t "~Tseq-list: #<glst-list @ #x~X>~%" (-> obj seq-list))
|
|
(format #t "~Tflags: ~D~%" (-> obj flags))
|
|
(format #t "~Tmesh-geo: ~A~%" (-> obj mesh-geo))
|
|
(format #t "~Tjoint-geo: ~A~%" (-> obj joint-geo))
|
|
(format #t "~Tlist-con: #<list-control @ #x~X>~%" (-> obj list-con))
|
|
(format #t "~Tparent: #x~X~%" (-> obj parent))
|
|
(format #t "~Tanim-index: ~D~%" (-> obj anim-index))
|
|
(format #t "~Tanim-hindex: ~D~%" (-> obj anim-hindex))
|
|
(format #t "~Tseq-index: ~D~%" (-> obj seq-index))
|
|
(format #t "~Tseq-hindex: ~D~%" (-> obj seq-hindex))
|
|
obj
|
|
)
|
|
|
|
;; definition for function anim-test-obj-init
|
|
;; INFO: Return type mismatch glst-node vs none.
|
|
(defun anim-test-obj-init ((arg0 anim-test-obj) (arg1 list-control))
|
|
(set! (-> arg0 mesh-geo) #f)
|
|
(set! (-> arg0 joint-geo) #f)
|
|
(set! (-> arg0 list-con listfunc) anim-test-anim-list-handler)
|
|
(set! (-> arg0 list-con left) (-> *ANIM_TESTER-bank* ANIM_LIST_X))
|
|
(set! (-> arg0 list-con top) (-> *ANIM_TESTER-bank* ANIM_LIST_Y))
|
|
(set! (-> arg0 list-con list) (-> arg0 seq-list))
|
|
(set! (-> arg0 list-con list-owner) (the-as uint arg0))
|
|
(let ((v1-6 arg1))
|
|
(set! (-> arg0 parent) (the-as uint (if v1-6
|
|
(-> v1-6 the-node)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(none)
|
|
)
|
|
|
|
;; definition for method 0 of type anim-test-obj
|
|
(defmethod new anim-test-obj ((allocation symbol) (type-to-make type) (arg0 int) (arg1 string) (arg2 basic))
|
|
(let ((t9-0 (method-of-type structure new))
|
|
(v1-1 type-to-make)
|
|
)
|
|
(-> type-to-make size)
|
|
(let ((s4-0 (the-as anim-test-obj (t9-0 allocation v1-1))))
|
|
(set! (-> s4-0 obj-art-group) (the-as art-group arg2))
|
|
(set! (-> s4-0 privname) arg1)
|
|
(glst-init-list! (-> s4-0 seq-list))
|
|
s4-0
|
|
)
|
|
)
|
|
)
|
|
|
|
;; definition of type anim-test-sequence
|
|
(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
|
|
(:methods
|
|
(new (symbol type int string) _type_ 0)
|
|
)
|
|
)
|
|
|
|
;; definition for method 3 of type anim-test-sequence
|
|
(defmethod inspect anim-test-sequence ((obj anim-test-sequence))
|
|
(format #t "[~8x] ~A~%" obj 'anim-test-sequence)
|
|
(format #t "~Tnext: #<glst-node @ #x~X>~%" (-> obj next))
|
|
(format #t "~Tprev: #<glst-node @ #x~X>~%" (-> obj prev))
|
|
(format #t "~Tprivname: ~A~%" (-> obj privname))
|
|
(format #t "~Titem-list: #<glst-list @ #x~X>~%" (-> obj item-list))
|
|
(format #t "~Tplaying-item: ~D~%" (-> obj playing-item))
|
|
(format #t "~Tflags: ~D~%" (-> obj flags))
|
|
(format #t "~Tlist-con: #<list-control @ #x~X>~%" (-> obj list-con))
|
|
(format #t "~Tparent: #<anim-test-obj @ #x~X>~%" (-> obj parent))
|
|
obj
|
|
)
|
|
|
|
;; definition for function anim-test-sequence-init
|
|
;; INFO: Return type mismatch anim-test-obj vs none.
|
|
(defun anim-test-sequence-init ((arg0 anim-test-sequence) (arg1 anim-test-obj))
|
|
(set! (-> arg0 list-con listfunc) anim-test-edit-sequence-list-handler)
|
|
(set! (-> arg0 list-con left) (-> *ANIM_TESTER-bank* EDIT_LIST_X))
|
|
(set! (-> arg0 list-con top) (-> *ANIM_TESTER-bank* EDIT_LIST_Y))
|
|
(set! (-> arg0 list-con list) (-> arg0 item-list))
|
|
(set! (-> arg0 list-con list-owner) (the-as uint arg0))
|
|
(set! (-> arg0 parent) arg1)
|
|
(none)
|
|
)
|
|
|
|
;; definition for method 0 of type anim-test-sequence
|
|
(defmethod new anim-test-sequence ((allocation symbol) (type-to-make type) (arg0 int) (arg1 string))
|
|
(let ((t9-0 (method-of-type structure new))
|
|
(v1-1 type-to-make)
|
|
)
|
|
(-> type-to-make size)
|
|
(let ((s5-0 (the-as anim-test-sequence (t9-0 allocation v1-1))))
|
|
(set! (-> s5-0 privname) arg1)
|
|
(glst-init-list! (-> s5-0 item-list))
|
|
s5-0
|
|
)
|
|
)
|
|
)
|
|
|
|
;; definition of type anim-test-seq-item
|
|
(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
|
|
(:methods
|
|
(new (symbol type int string) _type_ 0)
|
|
)
|
|
)
|
|
|
|
;; definition for method 3 of type anim-test-seq-item
|
|
(defmethod inspect anim-test-seq-item ((obj anim-test-seq-item))
|
|
(format #t "[~8x] ~A~%" obj 'anim-test-seq-item)
|
|
(format #t "~Tnext: #<glst-node @ #x~X>~%" (-> obj next))
|
|
(format #t "~Tprev: #<glst-node @ #x~X>~%" (-> obj prev))
|
|
(format #t "~Tprivname: ~A~%" (-> obj privname))
|
|
(format #t "~Tspeed: ~D~%" (-> obj speed))
|
|
(format #t "~Tblend: ~D~%" (-> obj blend))
|
|
(format #t "~Tfirst-frame: ~f~%" (-> obj first-frame))
|
|
(format #t "~Tlast-frame: ~f~%" (-> obj last-frame))
|
|
(format #t "~Tnum-frames: ~f~%" (-> obj num-frames))
|
|
(format #t "~Tartist-base: ~f~%" (-> obj artist-base))
|
|
(format #t "~Tflags: ~D~%" (-> obj flags))
|
|
(format #t "~Tparent: #<anim-test-sequence @ #x~X>~%" (-> obj parent))
|
|
obj
|
|
)
|
|
|
|
;; definition for method 0 of type anim-test-seq-item
|
|
;; INFO: Return type mismatch structure vs anim-test-seq-item.
|
|
(defmethod new anim-test-seq-item ((allocation symbol) (type-to-make type) (arg0 int) (arg1 string))
|
|
(let ((t9-0 (method-of-type structure new))
|
|
(v1-1 type-to-make)
|
|
)
|
|
(-> type-to-make size)
|
|
(let ((v0-0 (t9-0 allocation v1-1)))
|
|
(set! (-> (the-as anim-test-seq-item v0-0) privname) arg1)
|
|
(set! (-> (the-as anim-test-seq-item v0-0) speed) 100)
|
|
(set! (-> (the-as anim-test-seq-item v0-0) blend) 0)
|
|
(set! (-> (the-as anim-test-seq-item v0-0) first-frame) -1.0)
|
|
(set! (-> (the-as anim-test-seq-item v0-0) last-frame) -2.0)
|
|
(the-as anim-test-seq-item v0-0)
|
|
)
|
|
)
|
|
)
|
|
|
|
;; definition for function anim-test-seq-item-copy!
|
|
(defun anim-test-seq-item-copy! ((arg0 anim-test-seq-item) (arg1 anim-test-seq-item))
|
|
(let ((v1-0 arg0))
|
|
(set! (-> v1-0 privname) (-> arg1 privname))
|
|
)
|
|
(set! (-> arg0 speed) (-> arg1 speed))
|
|
(set! (-> arg0 blend) (-> arg1 blend))
|
|
(set! (-> arg0 first-frame) (-> arg1 first-frame))
|
|
(set! (-> arg0 last-frame) (-> arg1 last-frame))
|
|
(set! (-> arg0 num-frames) (-> arg1 num-frames))
|
|
(set! (-> arg0 artist-base) (-> arg1 artist-base))
|
|
(set! (-> arg0 flags) (-> arg1 flags))
|
|
(let ((v0-0 (-> arg1 parent)))
|
|
(set! (-> arg0 parent) v0-0)
|
|
v0-0
|
|
)
|
|
)
|
|
|
|
;; definition for method 3 of type anim-tester
|
|
;; INFO: this function exists in multiple non-identical object files
|
|
;; INFO: Return type mismatch object vs anim-tester.
|
|
(defmethod inspect anim-tester ((obj anim-tester))
|
|
(format #t "--anim-tester--~%")
|
|
(let ((v1-0 (-> obj obj-list)))
|
|
"return the start of the list"
|
|
(let ((s5-0 (the-as anim-test-obj (-> v1-0 head))))
|
|
(while (let ((v1-36 s5-0))
|
|
"is this node the end of the list. #t = end"
|
|
(not (not (-> v1-36 next)))
|
|
)
|
|
(format #t "object ~A~%" (-> s5-0 privname))
|
|
(let ((v1-2 (-> s5-0 seq-list)))
|
|
"return the start of the list"
|
|
(let ((s4-0 (the-as anim-test-sequence (-> v1-2 head))))
|
|
(while (let ((v1-29 s4-0))
|
|
"is this node the end of the list. #t = end"
|
|
(not (not (-> v1-29 next)))
|
|
)
|
|
(format #t " seq ~A" (-> s4-0 privname))
|
|
(format #t " ~S" (if (logtest? (-> s4-0 flags) 2)
|
|
"VALID"
|
|
"-"
|
|
)
|
|
)
|
|
(format #t " ~S" (if (logtest? (-> s4-0 flags) 4)
|
|
"EDITED"
|
|
"-"
|
|
)
|
|
)
|
|
(format #t " ~S" (if (logtest? (-> s4-0 flags) 1)
|
|
"USER_GENERATED"
|
|
"-"
|
|
)
|
|
)
|
|
(format #t "~%")
|
|
(let ((v1-10 (-> s4-0 item-list)))
|
|
"return the start of the list"
|
|
(let ((s3-0 (the-as anim-test-seq-item (-> v1-10 head))))
|
|
(while (let ((v1-22 s3-0))
|
|
"is this node the end of the list. #t = end"
|
|
(not (not (-> v1-22 next)))
|
|
)
|
|
(format
|
|
#t
|
|
" item ~A SP=~f BL=~d FIRST="
|
|
(-> s3-0 privname)
|
|
(* 0.01 (the float (-> s3-0 speed)))
|
|
(-> s3-0 blend)
|
|
)
|
|
(anim-tester-num-print #t (-> s3-0 first-frame))
|
|
(format #t " LAST=")
|
|
(anim-tester-num-print #t (-> s3-0 last-frame))
|
|
(format #t " ~S" (if (logtest? (-> s3-0 flags) 1)
|
|
"END_MARKER"
|
|
"-"
|
|
)
|
|
)
|
|
(format #t " ~S" (if (logtest? (-> s3-0 flags) 2)
|
|
"WAIT_FOR_BLEND"
|
|
"-"
|
|
)
|
|
)
|
|
(format #t " ~S" (if (logtest? (-> s3-0 flags) 4)
|
|
"BLANK"
|
|
"-"
|
|
)
|
|
)
|
|
(format #t "~%")
|
|
"return the next node in the list"
|
|
(set! s3-0 (the-as anim-test-seq-item (-> s3-0 next)))
|
|
)
|
|
)
|
|
)
|
|
"return the next node in the list"
|
|
(set! s4-0 (the-as anim-test-sequence (-> s4-0 next)))
|
|
)
|
|
)
|
|
)
|
|
"return the next node in the list"
|
|
(set! s5-0 (the-as anim-test-obj (-> s5-0 next)))
|
|
)
|
|
)
|
|
)
|
|
(format #t "-------------~%")
|
|
(format #t "current-obj=~A~%" (-> obj current-obj))
|
|
(format #t "speed=~f~%" (* 0.01 (the float (-> obj speed))))
|
|
(format #t "--flags:--~%")
|
|
(the-as anim-tester (format #t " CONNECTED: ~A~%" (if (logtest? (-> obj flags) (anim-tester-flags fanimt0))
|
|
"TRUE"
|
|
"f"
|
|
)
|
|
)
|
|
)
|
|
)
|
|
|
|
;; definition for function anim-test-obj-item-valid?
|
|
(defun anim-test-obj-item-valid? ((arg0 anim-test-obj) (arg1 anim-test-seq-item))
|
|
(let ((v1-0 (-> arg0 seq-list)))
|
|
"return the start of the list"
|
|
(let ((s5-0 (the-as anim-test-sequence (-> v1-0 head))))
|
|
(while (let ((v1-13 s5-0))
|
|
"is this node the end of the list. #t = end"
|
|
(not (not (-> v1-13 next)))
|
|
)
|
|
(when (and (logtest? (-> s5-0 flags) 2) (name= (-> arg1 privname) (-> s5-0 privname)))
|
|
(let ((v1-7 (-> s5-0 item-list)))
|
|
"return the start of the list"
|
|
(let* ((v1-8 (the-as anim-test-seq-item (-> v1-7 head)))
|
|
(a0-4 v1-8)
|
|
)
|
|
"is this node the end of the list. #t = end"
|
|
(when (not (not (-> a0-4 next)))
|
|
(set! (-> arg1 num-frames) (-> v1-8 num-frames))
|
|
(set! (-> arg1 artist-base) (-> v1-8 artist-base))
|
|
)
|
|
)
|
|
)
|
|
(return #t)
|
|
)
|
|
"return the next node in the list"
|
|
(set! s5-0 (the-as anim-test-sequence (-> s5-0 next)))
|
|
)
|
|
)
|
|
)
|
|
#f
|
|
)
|
|
|
|
;; definition for function anim-test-obj-remove-invalid
|
|
(defun anim-test-obj-remove-invalid ((arg0 anim-test-obj))
|
|
(local-vars (v1-19 symbol))
|
|
(let ((v1-0 (-> arg0 seq-list)))
|
|
"return the start of the list"
|
|
(let ((s5-0 (-> v1-0 head)))
|
|
(while (let ((v1-25 (the-as anim-test-sequence s5-0)))
|
|
"is this node the end of the list. #t = end"
|
|
(not (not (-> v1-25 next)))
|
|
)
|
|
(let ((v1-1 (the-as anim-test-sequence s5-0)))
|
|
"return the next node in the list"
|
|
(let ((s4-0 (-> v1-1 next)))
|
|
(when (zero? (logand (-> (the-as anim-test-sequence s5-0) flags) 2))
|
|
(let ((v1-5 (-> (the-as anim-test-sequence s5-0) item-list)))
|
|
"return the start of the list"
|
|
(let ((s3-0 (the-as anim-test-seq-item (-> v1-5 head))))
|
|
(while (let ((v1-13 s3-0))
|
|
"is this node the end of the list. #t = end"
|
|
(not (not (-> v1-13 next)))
|
|
)
|
|
(let ((v1-6 s3-0))
|
|
"return the next node in the list"
|
|
(let ((s2-0 (the-as anim-test-seq-item (-> v1-6 next))))
|
|
(if (and (zero? (logand (-> s3-0 flags) 1)) (not (anim-test-obj-item-valid? arg0 s3-0)))
|
|
(glst-remove (-> (the-as anim-test-sequence s5-0) item-list) s3-0)
|
|
)
|
|
(set! s3-0 s2-0)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(let ((v1-18 (-> (the-as anim-test-sequence s5-0) item-list)))
|
|
"is the list empty, #t = empty"
|
|
(if (or (= (-> v1-18 tailpred) v1-18)
|
|
(and (= (glst-num-elements (-> (the-as anim-test-sequence s5-0) item-list)) 1)
|
|
(begin
|
|
(let ((v1-21 #t)
|
|
(a0-13 (-> (the-as anim-test-sequence s5-0) item-list))
|
|
)
|
|
"return the start of the list"
|
|
(let ((a0-16 (the-as int (logand (-> (the-as anim-test-seq-item (-> a0-13 head)) flags) 1))))
|
|
(cmove-#f-zero v1-19 a0-16 v1-21)
|
|
)
|
|
)
|
|
v1-19
|
|
)
|
|
)
|
|
)
|
|
(glst-remove (-> arg0 seq-list) (the-as anim-test-sequence s5-0))
|
|
)
|
|
)
|
|
(set! s5-0 (the-as anim-test-sequence s4-0))
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(let ((v1-30 (-> arg0 seq-list)))
|
|
"return the start of the list"
|
|
(let ((v1-31 (the-as anim-test-sequence (-> v1-30 head))))
|
|
(while (let ((a0-23 v1-31))
|
|
"is this node the end of the list. #t = end"
|
|
(not (not (-> a0-23 next)))
|
|
)
|
|
(let ((a0-20 v1-31))
|
|
"return the next node in the list"
|
|
(let ((a0-21 (-> a0-20 next)))
|
|
(set! (-> v1-31 flags) (logand -3 (-> v1-31 flags)))
|
|
(set! v1-31 (the-as anim-test-sequence a0-21))
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
#f
|
|
)
|
|
|
|
;; definition for function anim-tester-real-post
|
|
;; INFO: Return type mismatch int vs none.
|
|
(defbehavior anim-tester-real-post anim-tester ()
|
|
(when (logtest? (-> self flags) (anim-tester-flags fanimt0))
|
|
(if (logtest? (-> self flags) (anim-tester-flags fanimt5))
|
|
(vector-v+! (-> self root trans) (-> self root trans) (-> self root transv))
|
|
)
|
|
(ja-post)
|
|
(when (logtest? (-> self flags) (anim-tester-flags fanimt4))
|
|
(draw-joint-spheres self)
|
|
(debug-print-channels (-> self skel) (the-as symbol *stdcon*))
|
|
)
|
|
)
|
|
(none)
|
|
)
|
|
|
|
;; definition for function anim-tester-post
|
|
(defbehavior anim-tester-post anim-tester ()
|
|
(anim-tester-real-post)
|
|
(none)
|
|
)
|
|
|
|
;; definition for function anim-tester-update-anim-info
|
|
(defbehavior anim-tester-update-anim-info anim-tester ((arg0 anim-test-seq-item))
|
|
(set! (-> self anim-first) (-> arg0 first-frame))
|
|
(set! (-> self anim-last) (-> arg0 last-frame))
|
|
(set! (-> self anim-gspeed) (* 0.01 (the float (-> self speed))))
|
|
(set! (-> self anim-speed) (* 0.01 (-> self anim-gspeed) (the float (-> arg0 speed))))
|
|
(when (< (-> self anim-speed) 0.0)
|
|
(set! (-> self anim-first) (-> arg0 last-frame))
|
|
(set! (-> self anim-last) (-> arg0 first-frame))
|
|
)
|
|
(set! (-> self anim-gspeed) (fabs (-> self anim-gspeed)))
|
|
(let ((f0-13 (fabs (-> self anim-speed))))
|
|
(set! (-> self anim-speed) f0-13)
|
|
f0-13
|
|
)
|
|
)
|
|
|
|
;; definition for function anim-tester-reset
|
|
;; Used lq/sq
|
|
(defbehavior anim-tester-reset anim-tester ()
|
|
(let ((v1-0 (-> self obj-list)))
|
|
"is the list empty, #t = empty"
|
|
(cond
|
|
((= (-> v1-0 tailpred) v1-0)
|
|
(set! (-> self list-con current-index) 0)
|
|
(set! (-> self current-obj) "")
|
|
)
|
|
(else
|
|
(let ((v1-1 (the-as anim-test-obj (glst-find-node-by-name (-> self obj-list) (-> self current-obj)))))
|
|
(when (not v1-1)
|
|
(if (>= (-> self list-con current-index) (glst-num-elements (-> self obj-list)))
|
|
(set! (-> self list-con current-index) (+ (glst-num-elements (-> self obj-list)) -1))
|
|
)
|
|
(set! v1-1
|
|
(the-as anim-test-obj (glst-get-node-by-index (-> self obj-list) (-> self list-con current-index)))
|
|
)
|
|
(set! (-> self current-obj) (-> v1-1 privname))
|
|
)
|
|
(cond
|
|
((or (not (-> v1-1 joint-geo)) (not (-> v1-1 mesh-geo)))
|
|
(format #t "what's this? ~A~%" (-> v1-1 privname))
|
|
(format #t "it's missing a joint-geo, or a mesh-geo or a mesh-anim~%")
|
|
)
|
|
(else
|
|
(let ((a0-15 (-> v1-1 joint-geo)))
|
|
(let ((a1-4 (-> v1-1 mesh-geo)))
|
|
(set! (-> self draw art-group) (-> v1-1 obj-art-group))
|
|
(set! (-> self draw cur-lod) -1)
|
|
(set! (-> self draw jgeo) a0-15)
|
|
(set! (-> self draw sink-group) (-> *level* level-default foreground-sink-group 1))
|
|
(set! (-> self draw lod-set lod 0 geo) a1-4)
|
|
)
|
|
(set! (-> self draw lod-set lod 0 dist) 4095996000.0)
|
|
(set! (-> self draw bounds w) 40960.0)
|
|
(set! (-> self draw data-format) (the-as uint 1))
|
|
(let ((v1-16 (-> (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) quad)))
|
|
(set! (-> self draw color-mult quad) v1-16)
|
|
)
|
|
(let ((v1-18 (-> (new 'static 'vector) quad)))
|
|
(set! (-> self draw color-emissive quad) v1-18)
|
|
)
|
|
(set! (-> self draw secondary-interp) 0.0)
|
|
(set! (-> self draw shadow) #f)
|
|
(set! (-> self draw shadow-ctrl) #f)
|
|
(set! (-> self draw ripple) #f)
|
|
(set! (-> self draw level-index) (the-as uint 2))
|
|
(set! (-> self node-list) (make-nodes-from-jg a0-15 *default-skel-template* 'debug))
|
|
)
|
|
(set! (-> self skel effect) (new 'process 'effect-control self))
|
|
(fill-skeleton-cache self)
|
|
(lod-set! (-> self draw) 0)
|
|
(ja-channel-set! 0)
|
|
(ja-post)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(none)
|
|
)
|
|
|
|
;; definition for function anim-tester-disp-frame-num
|
|
;; Used lq/sq
|
|
(defun anim-tester-disp-frame-num ((arg0 string) (arg1 float) (arg2 float) (arg3 font-context))
|
|
(local-vars (sv-16 (function _varargs_ object)))
|
|
(let* ((s3-0 (-> *display* frames (-> *display* on-screen) frame debug-buf))
|
|
(gp-0 (-> s3-0 base))
|
|
)
|
|
(cond
|
|
((= arg1 -1.0)
|
|
(let ((s2-1 draw-string-adv))
|
|
(format (clear *temp-string*) "~Smin" arg0)
|
|
(s2-1 *temp-string* s3-0 arg3)
|
|
)
|
|
)
|
|
((= arg1 -2.0)
|
|
(let ((s2-2 draw-string-adv))
|
|
(format (clear *temp-string*) "~Smax" arg0)
|
|
(s2-2 *temp-string* s3-0 arg3)
|
|
)
|
|
)
|
|
(else
|
|
(let ((s0-0 draw-string-adv))
|
|
(set! sv-16 format)
|
|
(let ((a0-11 (clear *temp-string*))
|
|
(a1-5 "~S~3,,0f")
|
|
(a2-5 arg0)
|
|
(a3-1 (+ arg1 arg2))
|
|
)
|
|
(sv-16 a0-11 a1-5 a2-5 a3-1)
|
|
)
|
|
(s0-0 *temp-string* s3-0 arg3)
|
|
)
|
|
)
|
|
)
|
|
(let ((a3-2 (-> s3-0 base)))
|
|
(let ((v1-6 (the-as object (-> s3-0 base))))
|
|
(set! (-> (the-as dma-packet v1-6) dma) (new 'static 'dma-tag :id (dma-tag-id next)))
|
|
(set! (-> (the-as dma-packet v1-6) vif0) (new 'static 'vif-tag))
|
|
(set! (-> (the-as dma-packet v1-6) vif1) (new 'static 'vif-tag))
|
|
(set! (-> s3-0 base) (&+ (the-as pointer v1-6) 16))
|
|
)
|
|
(dma-bucket-insert-tag
|
|
(-> *display* frames (-> *display* on-screen) frame bucket-group)
|
|
(bucket-id debug-draw0)
|
|
gp-0
|
|
(the-as (pointer dma-tag) a3-2)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
|
|
;; definition for function anim-tester-standard-event-handler
|
|
(defbehavior anim-tester-standard-event-handler anim-tester ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
|
(case arg2
|
|
(('reset)
|
|
(process-disconnect self)
|
|
(logclear! (-> self flags) (anim-tester-flags fanimt0))
|
|
(when (!= (-> *anim-tester* 0 edit-mode) 1)
|
|
(set! (-> *debug-menu-context* is-hidden) #f)
|
|
(set! (-> *anim-tester* 0 edit-mode) 0)
|
|
(set! *camera-read-buttons* #t)
|
|
)
|
|
(anim-tester-reset)
|
|
(go anim-tester-process)
|
|
)
|
|
(('change-anim)
|
|
(go anim-tester-process)
|
|
)
|
|
(('pick-object)
|
|
(set! (-> self edit-mode) 1)
|
|
(set! *camera-read-buttons* #f)
|
|
#f
|
|
)
|
|
(('pick-joint-anim)
|
|
(set! (-> self edit-mode) 2)
|
|
(set! *camera-read-buttons* #f)
|
|
#f
|
|
)
|
|
(('pick-sequence)
|
|
(set! (-> self edit-mode) 3)
|
|
(set! *camera-read-buttons* #f)
|
|
#f
|
|
)
|
|
(('edit-sequence)
|
|
(set! (-> self edit-mode) 4)
|
|
(set! *camera-read-buttons* #f)
|
|
#f
|
|
)
|
|
(('save-sequences)
|
|
(anim-tester-save-all-objects self)
|
|
)
|
|
)
|
|
)
|
|
|
|
;; definition for function anim-test-obj-list-handler
|
|
(defun anim-test-obj-list-handler ((arg0 int) (arg1 list-control))
|
|
(let ((s5-0 (-> arg1 the-node))
|
|
(v1-0 arg0)
|
|
)
|
|
(cond
|
|
((zero? v1-0)
|
|
(let* ((s3-0 (-> *display* frames (-> *display* on-screen) frame debug-buf))
|
|
(s4-0 (-> s3-0 base))
|
|
)
|
|
(let ((s2-0 draw-string-xy))
|
|
(format
|
|
(clear *temp-string*)
|
|
"~S~S~S"
|
|
(if (= (-> arg1 the-index) (-> arg1 highlight-index))
|
|
">"
|
|
" "
|
|
)
|
|
(if (logtest? (-> (the-as anim-test-obj s5-0) flags) 1)
|
|
"*"
|
|
" "
|
|
)
|
|
(-> (the-as anim-test-obj s5-0) privname)
|
|
)
|
|
(s2-0
|
|
*temp-string*
|
|
s3-0
|
|
(-> arg1 xpos)
|
|
(-> arg1 ypos)
|
|
(the-as font-color (if (= (-> arg1 the-index) (-> arg1 current-index))
|
|
15
|
|
12
|
|
)
|
|
)
|
|
(font-flags shadow kerning)
|
|
)
|
|
)
|
|
(let ((a3-2 (-> s3-0 base)))
|
|
(let ((v1-8 (the-as object (-> s3-0 base))))
|
|
(set! (-> (the-as dma-packet v1-8) dma) (new 'static 'dma-tag :id (dma-tag-id next)))
|
|
(set! (-> (the-as dma-packet v1-8) vif0) (new 'static 'vif-tag))
|
|
(set! (-> (the-as dma-packet v1-8) vif1) (new 'static 'vif-tag))
|
|
(set! (-> s3-0 base) (&+ (the-as pointer v1-8) 16))
|
|
)
|
|
(dma-bucket-insert-tag
|
|
(-> *display* frames (-> *display* on-screen) frame bucket-group)
|
|
(bucket-id debug-draw0)
|
|
s4-0
|
|
(the-as (pointer dma-tag) a3-2)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
((= v1-0 1)
|
|
(return #t)
|
|
)
|
|
((= v1-0 4)
|
|
(cond
|
|
((cpad-pressed? 0 up)
|
|
(if (> (-> arg1 highlight-index) 0)
|
|
(+! (-> arg1 highlight-index) -1)
|
|
)
|
|
)
|
|
((cpad-pressed? 0 down)
|
|
(if (< (-> arg1 highlight-index) (glst-num-elements (-> arg1 list)))
|
|
(+! (-> arg1 highlight-index) 1)
|
|
)
|
|
)
|
|
((cpad-pressed? 0 x)
|
|
(let ((v1-38 (the-as object (-> arg1 list-owner))))
|
|
(set! (-> arg1 current-index) (-> arg1 the-index))
|
|
(set! (-> (the-as anim-tester v1-38) current-obj) (-> (the-as anim-test-obj s5-0) privname))
|
|
)
|
|
(send-event (ppointer->process *anim-tester*) 'reset #f)
|
|
)
|
|
((cpad-pressed? 0 square)
|
|
(logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons square))
|
|
(logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons square))
|
|
(set! (-> *debug-menu-context* is-hidden) #f)
|
|
(set! (-> *anim-tester* 0 edit-mode) 0)
|
|
(set! *camera-read-buttons* #t)
|
|
(logior! (-> *anim-tester* 0 flags) (anim-tester-flags fanimt2))
|
|
)
|
|
)
|
|
)
|
|
((= v1-0 2)
|
|
(let ((v1-64 (+ (length (-> (the-as anim-test-obj s5-0) privname)) 2)))
|
|
(set! v1-64 (cond
|
|
((< (-> *ANIM_TESTER-bank* OBJECT_LIST_MIN_WIDTH) v1-64)
|
|
(empty)
|
|
v1-64
|
|
)
|
|
(else
|
|
(-> *ANIM_TESTER-bank* OBJECT_LIST_MIN_WIDTH)
|
|
)
|
|
)
|
|
)
|
|
(set! (-> arg1 return-int) v1-64)
|
|
)
|
|
)
|
|
((= v1-0 3)
|
|
(let* ((s4-1 (-> *display* frames (-> *display* on-screen) frame debug-buf))
|
|
(s5-2 (-> s4-1 base))
|
|
)
|
|
(draw-string-xy
|
|
"----pick-object---"
|
|
s4-1
|
|
(-> arg1 xpos)
|
|
(-> arg1 ypos)
|
|
(font-color dim-white)
|
|
(font-flags shadow kerning)
|
|
)
|
|
(let ((a3-4 (-> s4-1 base)))
|
|
(let ((v1-70 (the-as object (-> s4-1 base))))
|
|
(set! (-> (the-as dma-packet v1-70) dma) (new 'static 'dma-tag :id (dma-tag-id next)))
|
|
(set! (-> (the-as dma-packet v1-70) vif0) (new 'static 'vif-tag))
|
|
(set! (-> (the-as dma-packet v1-70) vif1) (new 'static 'vif-tag))
|
|
(set! (-> s4-1 base) (&+ (the-as pointer v1-70) 16))
|
|
)
|
|
(dma-bucket-insert-tag
|
|
(-> *display* frames (-> *display* on-screen) frame bucket-group)
|
|
(bucket-id debug-draw0)
|
|
s5-2
|
|
(the-as (pointer dma-tag) a3-4)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
#f
|
|
)
|
|
|
|
;; definition for function anim-test-anim-list-handler
|
|
(defun anim-test-anim-list-handler ((arg0 int) (arg1 list-control))
|
|
(let* ((s5-0 (the-as anim-test-obj (-> arg1 the-node)))
|
|
(v1-0 (the-as object (-> s5-0 list-con user-info-u)))
|
|
)
|
|
(cond
|
|
((zero? arg0)
|
|
(let* ((s3-0 (-> *display* frames (-> *display* on-screen) frame debug-buf))
|
|
(s4-0 (-> s3-0 base))
|
|
)
|
|
(let ((s2-0 draw-string-xy))
|
|
(format
|
|
(clear *temp-string*)
|
|
"~S~S"
|
|
(if (= (-> arg1 the-index) (-> arg1 highlight-index))
|
|
"> "
|
|
" "
|
|
)
|
|
(-> s5-0 privname)
|
|
)
|
|
(s2-0
|
|
*temp-string*
|
|
s3-0
|
|
(-> arg1 xpos)
|
|
(-> arg1 ypos)
|
|
(the-as font-color (if (= (-> arg1 the-index) (-> arg1 current-index))
|
|
15
|
|
12
|
|
)
|
|
)
|
|
(font-flags shadow kerning)
|
|
)
|
|
)
|
|
(let ((a3-2 (-> s3-0 base)))
|
|
(let ((v1-6 (the-as object (-> s3-0 base))))
|
|
(set! (-> (the-as dma-packet v1-6) dma) (new 'static 'dma-tag :id (dma-tag-id next)))
|
|
(set! (-> (the-as dma-packet v1-6) vif0) (new 'static 'vif-tag))
|
|
(set! (-> (the-as dma-packet v1-6) vif1) (new 'static 'vif-tag))
|
|
(set! (-> s3-0 base) (&+ (the-as pointer v1-6) 16))
|
|
)
|
|
(dma-bucket-insert-tag
|
|
(-> *display* frames (-> *display* on-screen) frame bucket-group)
|
|
(bucket-id debug-draw0)
|
|
s4-0
|
|
(the-as (pointer dma-tag) a3-2)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
((= arg0 1)
|
|
(return (zero? (logand (-> s5-0 flags) 1)))
|
|
)
|
|
((= arg0 4)
|
|
(cond
|
|
((cpad-pressed? 0 up)
|
|
(let ((v1-15 (-> arg1 list)))
|
|
"is the list empty, #t = empty"
|
|
(when (not (= (-> v1-15 tailpred) v1-15))
|
|
(let ((v1-17 (glst-get-node-by-index (-> arg1 list) (-> arg1 highlight-index))))
|
|
(while #t
|
|
"return the previous node in the list"
|
|
(set! v1-17 (-> (the-as anim-test-obj v1-17) prev))
|
|
(let ((a0-23 (the-as anim-test-obj v1-17)))
|
|
"is this node the start of the list. #t = start"
|
|
(if (not (-> a0-23 prev))
|
|
(goto cfg-25)
|
|
)
|
|
)
|
|
(when (zero? (logand (-> (the-as anim-test-obj v1-17) flags) 1))
|
|
(set! (-> arg1 highlight-index) (glst-get-node-index (-> arg1 list) (the-as anim-test-obj v1-17)))
|
|
(goto cfg-25)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(label cfg-25)
|
|
)
|
|
((cpad-pressed? 0 down)
|
|
(let ((v1-21 (-> arg1 list)))
|
|
"is the list empty, #t = empty"
|
|
(when (not (= (-> v1-21 tailpred) v1-21))
|
|
(let ((v1-23 (glst-get-node-by-index (-> arg1 list) (-> arg1 highlight-index))))
|
|
(while #t
|
|
"return the next node in the list"
|
|
(set! v1-23 (-> (the-as anim-test-obj v1-23) next))
|
|
(let ((a0-40 (the-as anim-test-obj v1-23)))
|
|
"is this node the end of the list. #t = end"
|
|
(if (not (-> a0-40 next))
|
|
(goto cfg-39)
|
|
)
|
|
)
|
|
(when (zero? (logand (-> (the-as anim-test-obj v1-23) flags) 1))
|
|
(set! (-> arg1 highlight-index) (glst-get-node-index (-> arg1 list) (the-as anim-test-obj v1-23)))
|
|
(goto cfg-39)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(label cfg-39)
|
|
)
|
|
((= (-> arg1 user-info) 1)
|
|
)
|
|
(else
|
|
(cond
|
|
((cpad-pressed? 0 x)
|
|
(set! (-> arg1 current-index) (-> arg1 the-index))
|
|
(set! (-> (the-as anim-test-obj v1-0) anim-index) (-> arg1 current-index))
|
|
(set! (-> (the-as anim-test-obj v1-0) anim-hindex) (-> arg1 highlight-index))
|
|
(set! (-> (the-as anim-test-obj v1-0) flags) (logand -3 (-> (the-as anim-test-obj v1-0) flags)))
|
|
(send-event (ppointer->process *anim-tester*) 'change-anim #f)
|
|
)
|
|
((cpad-pressed? 0 square)
|
|
(logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons square))
|
|
(logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons square))
|
|
(set! (-> *debug-menu-context* is-hidden) #f)
|
|
(set! (-> *anim-tester* 0 edit-mode) 0)
|
|
(set! *camera-read-buttons* #t)
|
|
(logior! (-> *anim-tester* 0 flags) (anim-tester-flags fanimt2))
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
((= arg0 2)
|
|
(let ((v1-55 (+ (length (-> s5-0 privname)) 2)))
|
|
(set! v1-55 (cond
|
|
((< (-> *ANIM_TESTER-bank* ANIM_LIST_MIN_WIDTH) v1-55)
|
|
(empty)
|
|
v1-55
|
|
)
|
|
(else
|
|
(-> *ANIM_TESTER-bank* ANIM_LIST_MIN_WIDTH)
|
|
)
|
|
)
|
|
)
|
|
(set! (-> arg1 return-int) v1-55)
|
|
)
|
|
)
|
|
((= arg0 3)
|
|
(let* ((s4-1 (-> *display* frames (-> *display* on-screen) frame debug-buf))
|
|
(s5-1 (-> s4-1 base))
|
|
)
|
|
(draw-string-xy
|
|
"----pick-joint-anim----"
|
|
s4-1
|
|
(-> arg1 xpos)
|
|
(-> arg1 ypos)
|
|
(font-color dim-white)
|
|
(font-flags shadow kerning)
|
|
)
|
|
(let ((a3-4 (-> s4-1 base)))
|
|
(let ((v1-62 (the-as object (-> s4-1 base))))
|
|
(set! (-> (the-as dma-packet v1-62) dma) (new 'static 'dma-tag :id (dma-tag-id next)))
|
|
(set! (-> (the-as dma-packet v1-62) vif0) (new 'static 'vif-tag))
|
|
(set! (-> (the-as dma-packet v1-62) vif1) (new 'static 'vif-tag))
|
|
(set! (-> s4-1 base) (&+ (the-as pointer v1-62) 16))
|
|
)
|
|
(dma-bucket-insert-tag
|
|
(-> *display* frames (-> *display* on-screen) frame bucket-group)
|
|
(bucket-id debug-draw0)
|
|
s5-1
|
|
(the-as (pointer dma-tag) a3-4)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
#f
|
|
)
|
|
|
|
;; definition for function anim-test-sequence-list-handler
|
|
(defun anim-test-sequence-list-handler ((arg0 int) (arg1 list-control))
|
|
(let* ((s5-0 (the-as anim-test-sequence (-> arg1 the-node)))
|
|
(v1-0 (-> s5-0 parent))
|
|
)
|
|
(cond
|
|
((zero? arg0)
|
|
(let* ((s3-0 (-> *display* frames (-> *display* on-screen) frame debug-buf))
|
|
(s4-0 (-> s3-0 base))
|
|
)
|
|
(let ((s2-0 draw-string-xy))
|
|
(format
|
|
(clear *temp-string*)
|
|
"~S~S~S"
|
|
(if (= (-> arg1 the-index) (-> arg1 highlight-index))
|
|
">"
|
|
" "
|
|
)
|
|
(if (logtest? (-> s5-0 flags) 4)
|
|
"*"
|
|
" "
|
|
)
|
|
(-> s5-0 privname)
|
|
)
|
|
(s2-0
|
|
*temp-string*
|
|
s3-0
|
|
(-> arg1 xpos)
|
|
(-> arg1 ypos)
|
|
(the-as font-color (if (= (-> arg1 the-index) (-> arg1 current-index))
|
|
15
|
|
12
|
|
)
|
|
)
|
|
(font-flags shadow kerning)
|
|
)
|
|
)
|
|
(let ((a3-2 (-> s3-0 base)))
|
|
(let ((v1-8 (the-as object (-> s3-0 base))))
|
|
(set! (-> (the-as dma-packet v1-8) dma) (new 'static 'dma-tag :id (dma-tag-id next)))
|
|
(set! (-> (the-as dma-packet v1-8) vif0) (new 'static 'vif-tag))
|
|
(set! (-> (the-as dma-packet v1-8) vif1) (new 'static 'vif-tag))
|
|
(set! (-> s3-0 base) (&+ (the-as pointer v1-8) 16))
|
|
)
|
|
(dma-bucket-insert-tag
|
|
(-> *display* frames (-> *display* on-screen) frame bucket-group)
|
|
(bucket-id debug-draw0)
|
|
s4-0
|
|
(the-as (pointer dma-tag) a3-2)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
((= arg0 1)
|
|
(return (logtest? (-> s5-0 flags) 1))
|
|
)
|
|
((= arg0 4)
|
|
(cond
|
|
((cpad-pressed? 0 up)
|
|
(let ((v1-17 (-> arg1 list)))
|
|
"is the list empty, #t = empty"
|
|
(when (not (= (-> v1-17 tailpred) v1-17))
|
|
(let ((v1-19 (glst-get-node-by-index (-> arg1 list) (-> arg1 highlight-index))))
|
|
(while #t
|
|
"return the previous node in the list"
|
|
(set! v1-19 (-> (the-as anim-test-sequence v1-19) prev))
|
|
(let ((a0-24 (the-as anim-test-sequence v1-19)))
|
|
"is this node the start of the list. #t = start"
|
|
(if (not (-> a0-24 prev))
|
|
(goto cfg-28)
|
|
)
|
|
)
|
|
(when (logtest? (-> (the-as anim-test-sequence v1-19) flags) 1)
|
|
(set! (-> arg1 highlight-index) (glst-get-node-index (-> arg1 list) (the-as anim-test-sequence v1-19)))
|
|
(goto cfg-28)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(label cfg-28)
|
|
)
|
|
((cpad-pressed? 0 down)
|
|
(let ((v1-23 (-> arg1 list)))
|
|
"is the list empty, #t = empty"
|
|
(when (not (= (-> v1-23 tailpred) v1-23))
|
|
(let ((v1-25 (glst-get-node-by-index (-> arg1 list) (-> arg1 highlight-index))))
|
|
(while #t
|
|
"return the next node in the list"
|
|
(set! v1-25 (-> (the-as anim-test-sequence v1-25) next))
|
|
(let ((a0-42 (the-as anim-test-sequence v1-25)))
|
|
"is this node the end of the list. #t = end"
|
|
(if (not (-> a0-42 next))
|
|
(goto cfg-42)
|
|
)
|
|
)
|
|
(when (logtest? (-> (the-as anim-test-sequence v1-25) flags) 1)
|
|
(set! (-> arg1 highlight-index) (glst-get-node-index (-> arg1 list) (the-as anim-test-sequence v1-25)))
|
|
(goto cfg-42)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(label cfg-42)
|
|
)
|
|
((cpad-pressed? 0 x)
|
|
(set! (-> arg1 current-index) (-> arg1 the-index))
|
|
(set! (-> v1-0 seq-index) (-> arg1 current-index))
|
|
(set! (-> v1-0 seq-hindex) (-> arg1 highlight-index))
|
|
(logior! (-> v1-0 flags) 2)
|
|
(set! (-> *anim-tester* 0 edit-mode) 4)
|
|
(send-event (ppointer->process *anim-tester*) 'change-anim #f)
|
|
)
|
|
((cpad-pressed? 0 square)
|
|
(logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons square))
|
|
(logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons square))
|
|
(set! (-> *debug-menu-context* is-hidden) #f)
|
|
(set! (-> *anim-tester* 0 edit-mode) 0)
|
|
(set! *camera-read-buttons* #t)
|
|
(logior! (-> *anim-tester* 0 flags) (anim-tester-flags fanimt2))
|
|
)
|
|
)
|
|
)
|
|
((= arg0 2)
|
|
(let ((v1-57 (+ (length (-> s5-0 privname)) 2)))
|
|
(set! v1-57 (cond
|
|
((< (-> *ANIM_TESTER-bank* PICK_LIST_MIN_WIDTH) v1-57)
|
|
(empty)
|
|
v1-57
|
|
)
|
|
(else
|
|
(-> *ANIM_TESTER-bank* PICK_LIST_MIN_WIDTH)
|
|
)
|
|
)
|
|
)
|
|
(set! (-> arg1 return-int) v1-57)
|
|
)
|
|
)
|
|
((= arg0 3)
|
|
(let* ((s4-1 (-> *display* frames (-> *display* on-screen) frame debug-buf))
|
|
(s5-1 (-> s4-1 base))
|
|
)
|
|
(draw-string-xy
|
|
"----pick-sequence---"
|
|
s4-1
|
|
(-> arg1 xpos)
|
|
(-> arg1 ypos)
|
|
(font-color dim-white)
|
|
(font-flags shadow kerning)
|
|
)
|
|
(let ((a3-4 (-> s4-1 base)))
|
|
(let ((v1-64 (the-as object (-> s4-1 base))))
|
|
(set! (-> (the-as dma-packet v1-64) dma) (new 'static 'dma-tag :id (dma-tag-id next)))
|
|
(set! (-> (the-as dma-packet v1-64) vif0) (new 'static 'vif-tag))
|
|
(set! (-> (the-as dma-packet v1-64) vif1) (new 'static 'vif-tag))
|
|
(set! (-> s4-1 base) (&+ (the-as pointer v1-64) 16))
|
|
)
|
|
(dma-bucket-insert-tag
|
|
(-> *display* frames (-> *display* on-screen) frame bucket-group)
|
|
(bucket-id debug-draw0)
|
|
s5-1
|
|
(the-as (pointer dma-tag) a3-4)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
#f
|
|
)
|
|
|
|
;; definition for symbol anim-test-field-highlight-lw, type (inline-array list-field)
|
|
(define anim-test-field-highlight-lw (new 'static 'inline-array list-field 12
|
|
(new 'static 'list-field :left 2 :width 20)
|
|
(new 'static 'list-field :left 30 :width 4)
|
|
(new 'static 'list-field :left 35 :width 4)
|
|
(new 'static 'list-field :left 40 :width 3)
|
|
(new 'static 'list-field :left 44 :width 3)
|
|
(new 'static 'list-field :left 48 :width 1)
|
|
(new 'static 'list-field :left 49 :width 1)
|
|
(new 'static 'list-field :left 50 :width 1)
|
|
(new 'static 'list-field :left 51 :width 1)
|
|
(new 'static 'list-field :left 53 :width 1)
|
|
(new 'static 'list-field :left 54 :width 1)
|
|
(new 'static 'list-field :left 55 :width 1)
|
|
)
|
|
)
|
|
|
|
;; definition for function anim-tester-adjust-frame
|
|
;; INFO: Return type mismatch number vs float.
|
|
(defun anim-tester-adjust-frame ((arg0 float) (arg1 float))
|
|
(cond
|
|
((cpad-hold? 0 down)
|
|
(cond
|
|
((= arg0 -2.0)
|
|
(set! arg0 (+ -1.0 arg1))
|
|
)
|
|
((!= arg0 -1.0)
|
|
(set! arg0 (+ -1.0 arg0))
|
|
(if (< arg0 0.0)
|
|
(set! arg0 (the-as float -1.0))
|
|
)
|
|
)
|
|
)
|
|
)
|
|
((cpad-hold? 0 up)
|
|
(cond
|
|
((= arg0 -1.0)
|
|
(set! arg0 (the-as float 0.0))
|
|
)
|
|
((!= arg0 -2.0)
|
|
(set! arg0 (+ 1.0 arg0))
|
|
(if (>= arg0 arg1)
|
|
(set! arg0 (the-as float -2.0))
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(the-as float arg0)
|
|
)
|
|
|
|
;; definition for function anim-tester-pick-item-setup
|
|
;; INFO: Return type mismatch anim-tester-flags vs none.
|
|
(defun anim-tester-pick-item-setup ((arg0 anim-test-seq-item) (arg1 anim-test-sequence))
|
|
(let ((gp-0 (-> arg1 parent)))
|
|
(set! (-> *anim-tester* 0 pick-con listfunc) anim-test-anim-list-handler)
|
|
(set! (-> *anim-tester* 0 pick-con left)
|
|
(+ (-> *ANIM_TESTER-bank* EDIT_LIST_X)
|
|
(* (-> *ANIM_TESTER-bank* EDIT_PICK_X) (-> *DISP_LIST-bank* CHAR_WIDTH))
|
|
)
|
|
)
|
|
(set! (-> *anim-tester* 0 pick-con top) (-> *ANIM_TESTER-bank* EDIT_LIST_Y))
|
|
(set! (-> *anim-tester* 0 pick-con list) (-> gp-0 seq-list))
|
|
(set! (-> *anim-tester* 0 pick-con list-owner) (the-as uint gp-0))
|
|
(set! (-> *anim-tester* 0 pick-con user-info) 1)
|
|
(let ((v1-10 (-> gp-0 seq-list)))
|
|
"return the start of the list"
|
|
(let ((v1-11 (-> v1-10 head)))
|
|
(while (let ((a1-16 v1-11))
|
|
"is this node the end of the list. #t = end"
|
|
(not (not (-> a1-16 next)))
|
|
)
|
|
"return the next node in the list"
|
|
(set! v1-11 (-> v1-11 next))
|
|
)
|
|
)
|
|
)
|
|
(let ((a1-20 (glst-find-node-by-name (-> gp-0 seq-list) (-> arg0 privname))))
|
|
(when a1-20
|
|
(set! (-> *anim-tester* 0 pick-con highlight-index) (glst-get-node-index (-> gp-0 seq-list) a1-20))
|
|
(set! (-> *anim-tester* 0 pick-con current-index) (-> *anim-tester* 0 pick-con highlight-index))
|
|
)
|
|
)
|
|
)
|
|
(logior! (-> *anim-tester* 0 flags) (anim-tester-flags fanimt3))
|
|
(none)
|
|
)
|
|
|
|
;; definition for function anim-test-seq-mark-as-edited
|
|
;; INFO: Return type mismatch int vs none.
|
|
(defun anim-test-seq-mark-as-edited ((arg0 anim-test-sequence))
|
|
(logior! (-> arg0 parent flags) 1)
|
|
(logior! (-> arg0 flags) 1)
|
|
(none)
|
|
)
|
|
|
|
;; definition for function anim-test-edit-seq-insert-item
|
|
;; INFO: Return type mismatch object vs none.
|
|
(defun anim-test-edit-seq-insert-item ((arg0 anim-test-seq-item) (arg1 anim-test-sequence))
|
|
(let ((s4-0 (new 'debug 'anim-test-seq-item 1 "")))
|
|
(anim-test-seq-item-copy! s4-0 arg0)
|
|
(when (logtest? (-> s4-0 flags) 1)
|
|
(set! (-> s4-0 flags) (logand -2 (-> s4-0 flags)))
|
|
(logior! (-> s4-0 flags) 4)
|
|
(let ((v1-8 s4-0))
|
|
(set! (-> v1-8 privname) "--blank--")
|
|
)
|
|
)
|
|
(glst-insert-before (-> arg1 item-list) arg0 s4-0)
|
|
)
|
|
(anim-test-seq-mark-as-edited arg1)
|
|
(send-event (ppointer->process *anim-tester*) 'change-anim)
|
|
(none)
|
|
)
|
|
|
|
;; definition for function anim-test-edit-sequence-list-handler
|
|
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 893]
|
|
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 938]
|
|
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 1045]
|
|
;; Used lq/sq
|
|
(defun anim-test-edit-sequence-list-handler ((arg0 int) (arg1 list-control))
|
|
(local-vars
|
|
(sv-192 (function string dma-buffer int int font-color font-flags none))
|
|
(sv-208 (function _varargs_ object))
|
|
)
|
|
(let ((gp-0 (-> arg1 the-node))
|
|
(s4-0 (the-as object (-> arg1 list-owner)))
|
|
(s2-0 (and (logtest? (-> *anim-tester* 0 flags) (anim-tester-flags fanimt3))
|
|
(zero? (-> *anim-tester* 0 item-field))
|
|
)
|
|
)
|
|
)
|
|
(cond
|
|
((zero? arg0)
|
|
(let ((s3-0 (new
|
|
'stack
|
|
'font-context
|
|
*font-default-matrix*
|
|
(-> arg1 xpos)
|
|
(-> arg1 ypos)
|
|
(the-as float 0.0)
|
|
(the-as font-color (if (= (-> arg1 the-index) (-> arg1 current-index))
|
|
15
|
|
12
|
|
)
|
|
)
|
|
(font-flags shadow kerning)
|
|
)
|
|
)
|
|
)
|
|
(when (not s2-0)
|
|
(when (= (-> arg1 the-index) (-> arg1 highlight-index))
|
|
(let* ((a1-2 (-> anim-test-field-highlight-lw (-> *anim-tester* 0 item-field) left))
|
|
(v1-24 (-> anim-test-field-highlight-lw (-> *anim-tester* 0 item-field) width))
|
|
(s0-0 (-> *display* frames (-> *display* on-screen) frame debug-buf))
|
|
(s1-0 (-> s0-0 base))
|
|
)
|
|
(draw-sprite2d-xy
|
|
s0-0
|
|
(+ (* a1-2 (-> *DISP_LIST-bank* CHAR_WIDTH)) 2 (-> arg1 xpos))
|
|
(+ (-> arg1 ypos) -1)
|
|
(+ (* v1-24 (-> *DISP_LIST-bank* CHAR_WIDTH)) 4)
|
|
(+ (-> *DISP_LIST-bank* TV_SPACING) 1)
|
|
(new 'static 'rgba :r #xc0 :g #xc0 :a #xff)
|
|
)
|
|
(let ((a3-4 (-> s0-0 base)))
|
|
(let ((v1-29 (the-as object (-> s0-0 base))))
|
|
(set! (-> (the-as dma-packet v1-29) dma) (new 'static 'dma-tag :id (dma-tag-id next)))
|
|
(set! (-> (the-as dma-packet v1-29) vif0) (new 'static 'vif-tag))
|
|
(set! (-> (the-as dma-packet v1-29) vif1) (new 'static 'vif-tag))
|
|
(set! (-> s0-0 base) (&+ (the-as pointer v1-29) 16))
|
|
)
|
|
(dma-bucket-insert-tag
|
|
(-> *display* frames (-> *display* on-screen) frame bucket-group)
|
|
(bucket-id debug-draw0)
|
|
s1-0
|
|
(the-as (pointer dma-tag) a3-4)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(let* ((s0-1 (-> *display* frames (-> *display* on-screen) frame debug-buf))
|
|
(s1-1 (-> s0-1 base))
|
|
)
|
|
(set! sv-192 draw-string-xy)
|
|
(set! sv-208 format)
|
|
(let ((a0-18 (clear *temp-string*))
|
|
(a1-7 "~S~S~-27S")
|
|
(a2-11 (if (= (-> arg1 the-index) (-> arg1 highlight-index))
|
|
">"
|
|
" "
|
|
)
|
|
)
|
|
(a3-6 (if (= (-> arg1 the-index) (-> (the-as anim-test-sequence s4-0) playing-item))
|
|
"*"
|
|
" "
|
|
)
|
|
)
|
|
(t0-2 (-> (the-as anim-test-seq-item gp-0) privname))
|
|
)
|
|
(sv-208 a0-18 a1-7 a2-11 a3-6 t0-2)
|
|
)
|
|
(let ((a0-19 *temp-string*)
|
|
(a1-8 s0-1)
|
|
(a2-12 (-> arg1 xpos))
|
|
(a3-7 (-> arg1 ypos))
|
|
(t0-4 (if (= (-> arg1 the-index) (-> arg1 current-index))
|
|
15
|
|
12
|
|
)
|
|
)
|
|
(t1-2 3)
|
|
)
|
|
(sv-192 a0-19 a1-8 a2-12 a3-7 (the-as font-color t0-4) (the-as font-flags t1-2))
|
|
)
|
|
(let ((a3-8 (-> s0-1 base)))
|
|
(let ((v1-44 (the-as object (-> s0-1 base))))
|
|
(set! (-> (the-as dma-packet v1-44) dma) (new 'static 'dma-tag :id (dma-tag-id next)))
|
|
(set! (-> (the-as dma-packet v1-44) vif0) (new 'static 'vif-tag))
|
|
(set! (-> (the-as dma-packet v1-44) vif1) (new 'static 'vif-tag))
|
|
(set! (-> s0-1 base) (&+ (the-as pointer v1-44) 16))
|
|
)
|
|
(dma-bucket-insert-tag
|
|
(-> *display* frames (-> *display* on-screen) frame bucket-group)
|
|
(bucket-id debug-draw0)
|
|
s1-1
|
|
(the-as (pointer dma-tag) a3-8)
|
|
)
|
|
)
|
|
)
|
|
(when (not s2-0)
|
|
(let* ((s2-2 (-> *display* frames (-> *display* on-screen) frame debug-buf))
|
|
(s4-1 (the-as anim-test-sequence (-> s2-2 base)))
|
|
)
|
|
(when (zero? (logand (-> (the-as anim-test-seq-item gp-0) flags) 1))
|
|
(let ((v1-57 s3-0)
|
|
(a1-13 (+ (-> arg1 xpos) (* (-> *ANIM_TESTER-bank* EDIT_STATS_X) (-> *DISP_LIST-bank* CHAR_WIDTH))))
|
|
(a0-29 (-> arg1 ypos))
|
|
)
|
|
(set! (-> v1-57 origin x) (the float a1-13))
|
|
(set! (-> v1-57 origin y) (the float a0-29))
|
|
)
|
|
(cond
|
|
((and (< (-> (the-as anim-test-seq-item gp-0) speed) 0) (< -100 (-> (the-as anim-test-seq-item gp-0) speed)))
|
|
(let ((s1-2 draw-string-adv))
|
|
(let ((s0-2 format)
|
|
(a0-33 (clear *temp-string*))
|
|
(a1-14 "-0.~1d")
|
|
(v1-61 (abs (-> (the-as anim-test-seq-item gp-0) speed)))
|
|
)
|
|
(s0-2 a0-33 a1-14 (/ (mod v1-61 100) 10))
|
|
)
|
|
(s1-2 *temp-string* s2-2 s3-0)
|
|
)
|
|
)
|
|
(else
|
|
(let ((s1-3 draw-string-adv))
|
|
(let ((s0-3 format)
|
|
(a0-36 (clear *temp-string*))
|
|
(a1-16 "~2d.~1d")
|
|
(a2-21 (/ (-> (the-as anim-test-seq-item gp-0) speed) 100))
|
|
(v1-64 (abs (-> (the-as anim-test-seq-item gp-0) speed)))
|
|
)
|
|
(s0-3 a0-36 a1-16 a2-21 (/ (mod v1-64 100) 10))
|
|
)
|
|
(s1-3 *temp-string* s2-2 s3-0)
|
|
)
|
|
)
|
|
)
|
|
(let ((s1-4 draw-string-adv))
|
|
(format (clear *temp-string*) " ~4d" (-> (the-as anim-test-seq-item gp-0) blend))
|
|
(s1-4 *temp-string* s2-2 s3-0)
|
|
)
|
|
(anim-tester-disp-frame-num
|
|
" "
|
|
(-> (the-as anim-test-seq-item gp-0) first-frame)
|
|
(-> (the-as anim-test-seq-item gp-0) artist-base)
|
|
s3-0
|
|
)
|
|
(anim-tester-disp-frame-num
|
|
" "
|
|
(-> (the-as anim-test-seq-item gp-0) last-frame)
|
|
(-> (the-as anim-test-seq-item gp-0) artist-base)
|
|
s3-0
|
|
)
|
|
(let ((s1-5 draw-string-adv))
|
|
(format
|
|
(clear *temp-string*)
|
|
" ~S~S~S~S"
|
|
(if (logtest? (-> (the-as anim-test-seq-item gp-0) flags) 2)
|
|
"B"
|
|
"-"
|
|
)
|
|
"-"
|
|
"-"
|
|
"-"
|
|
)
|
|
(s1-5 *temp-string* s2-2 s3-0)
|
|
)
|
|
)
|
|
(let* ((a1-24 (-> anim-test-field-highlight-lw 9 left))
|
|
(v1-69 s3-0)
|
|
(a1-26 (+ (-> arg1 xpos) (* a1-24 (-> *DISP_LIST-bank* CHAR_WIDTH))))
|
|
(a0-47 (-> arg1 ypos))
|
|
)
|
|
(set! (-> v1-69 origin x) (the float a1-26))
|
|
(set! (-> v1-69 origin y) (the float a0-47))
|
|
)
|
|
(draw-string-adv "MID" s2-2 s3-0)
|
|
(let ((a3-15 (-> s2-2 base)))
|
|
(let ((v1-70 (the-as object (-> s2-2 base))))
|
|
(set! (-> (the-as dma-packet v1-70) dma) (new 'static 'dma-tag :id (dma-tag-id next)))
|
|
(set! (-> (the-as dma-packet v1-70) vif0) (new 'static 'vif-tag))
|
|
(set! (-> (the-as dma-packet v1-70) vif1) (new 'static 'vif-tag))
|
|
(set! (-> s2-2 base) (&+ (the-as pointer v1-70) 16))
|
|
)
|
|
(dma-bucket-insert-tag
|
|
(-> *display* frames (-> *display* on-screen) frame bucket-group)
|
|
(bucket-id debug-draw0)
|
|
(the-as pointer s4-1)
|
|
(the-as (pointer dma-tag) a3-15)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
((= arg0 1)
|
|
(return #t)
|
|
)
|
|
((= arg0 4)
|
|
(cond
|
|
((logtest? (-> *anim-tester* 0 flags) (anim-tester-flags fanimt3))
|
|
(let ((v1-88 (-> *anim-tester* 0 item-field)))
|
|
(cond
|
|
((zero? v1-88)
|
|
(cond
|
|
((cpad-pressed? 0 x)
|
|
(logclear! (-> *anim-tester* 0 flags) (anim-tester-flags fanimt3))
|
|
(let ((v0-24
|
|
(the-as
|
|
anim-test-obj
|
|
(glst-get-node-by-index (-> *anim-tester* 0 pick-con list) (-> *anim-tester* 0 pick-con highlight-index))
|
|
)
|
|
)
|
|
)
|
|
(when (and v0-24 (let ((v1-101 (&-> v0-24 obj-art-group)))
|
|
"is the list empty, #t = empty"
|
|
(not (= (-> v1-101 2) v1-101))
|
|
)
|
|
)
|
|
(let ((v1-103 (&-> v0-24 obj-art-group)))
|
|
"return the start of the list"
|
|
(let ((a1-30 (-> v1-103 0)))
|
|
(anim-test-seq-item-copy! (the-as anim-test-seq-item gp-0) (the-as anim-test-seq-item a1-30))
|
|
)
|
|
)
|
|
(anim-test-seq-mark-as-edited (the-as anim-test-sequence s4-0))
|
|
)
|
|
)
|
|
)
|
|
((cpad-pressed? 0 square)
|
|
(logclear! (-> *anim-tester* 0 flags) (anim-tester-flags fanimt3))
|
|
)
|
|
)
|
|
)
|
|
((= v1-88 9)
|
|
(cond
|
|
((zero? (logand (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons x)))
|
|
(logclear! (-> *anim-tester* 0 flags) (anim-tester-flags fanimt3))
|
|
)
|
|
((cpad-pressed? 0 up)
|
|
(let ((v1-124 (the-as anim-test-seq-item gp-0)))
|
|
"return the previous node in the list"
|
|
(let* ((s3-1 (-> v1-124 prev))
|
|
(v1-125 s3-1)
|
|
)
|
|
"is this node the start of the list. #t = start"
|
|
(when (not (not (-> v1-125 prev)))
|
|
(glst-remove (-> (the-as anim-test-sequence s4-0) item-list) (the-as anim-test-seq-item gp-0))
|
|
(glst-insert-before (-> (the-as anim-test-sequence s4-0) item-list) s3-1 (the-as anim-test-seq-item gp-0))
|
|
(+! (-> arg1 current-index) -1)
|
|
(+! (-> arg1 highlight-index) -1)
|
|
(anim-test-seq-mark-as-edited (the-as anim-test-sequence s4-0))
|
|
(send-event (ppointer->process *anim-tester*) 'change-anim)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
((cpad-pressed? 0 down)
|
|
(let ((v1-142 (the-as anim-test-seq-item gp-0)))
|
|
"return the next node in the list"
|
|
(let* ((s3-2 (the-as anim-test-seq-item (-> v1-142 next)))
|
|
(v1-143 s3-2)
|
|
)
|
|
"is this node the end of the list. #t = end"
|
|
(when (and (not (not (-> v1-143 next))) (zero? (logand (-> s3-2 flags) 1)))
|
|
(glst-remove (-> (the-as anim-test-sequence s4-0) item-list) (the-as anim-test-seq-item gp-0))
|
|
(glst-insert-after (-> (the-as anim-test-sequence s4-0) item-list) s3-2 (the-as anim-test-seq-item gp-0))
|
|
(+! (-> arg1 current-index) 1)
|
|
(+! (-> arg1 highlight-index) 1)
|
|
(anim-test-seq-mark-as-edited (the-as anim-test-sequence s4-0))
|
|
(send-event (ppointer->process *anim-tester*) 'change-anim)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
((or (= v1-88 1) (= v1-88 2) (= v1-88 3) (= v1-88 4))
|
|
(cond
|
|
((zero? (logand (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons x)))
|
|
(logclear! (-> *anim-tester* 0 flags) (anim-tester-flags fanimt3))
|
|
)
|
|
((begin (set! (-> arg1 current-index) (-> arg1 the-index)) (<= (-> *anim-tester* 0 inc-timer) 0))
|
|
(if (> (-> *anim-tester* 0 inc-delay) 0)
|
|
(+! (-> *anim-tester* 0 inc-delay) -1)
|
|
)
|
|
(set! (-> *anim-tester* 0 inc-timer) (-> *anim-tester* 0 inc-delay))
|
|
(case (-> *anim-tester* 0 item-field)
|
|
((1)
|
|
(cond
|
|
((cpad-hold? 0 down)
|
|
(+! (-> (the-as anim-test-seq-item gp-0) speed) -10)
|
|
(anim-test-seq-mark-as-edited (the-as anim-test-sequence s4-0))
|
|
(if (< (-> (the-as anim-test-seq-item gp-0) speed) -300)
|
|
(set! (-> (the-as anim-test-seq-item gp-0) speed) -300)
|
|
)
|
|
)
|
|
((cpad-hold? 0 up)
|
|
(+! (-> (the-as anim-test-seq-item gp-0) speed) 10)
|
|
(anim-test-seq-mark-as-edited (the-as anim-test-sequence s4-0))
|
|
(if (< 1000 (-> (the-as anim-test-seq-item gp-0) speed))
|
|
(set! (-> (the-as anim-test-seq-item gp-0) speed) 1000)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
((2)
|
|
(cond
|
|
((cpad-hold? 0 down)
|
|
(+! (-> (the-as anim-test-seq-item gp-0) blend) -1)
|
|
(anim-test-seq-mark-as-edited (the-as anim-test-sequence s4-0))
|
|
(when (< (-> (the-as anim-test-seq-item gp-0) blend) 0)
|
|
(set! (-> (the-as anim-test-seq-item gp-0) blend) 0)
|
|
0
|
|
)
|
|
)
|
|
((cpad-hold? 0 up)
|
|
(+! (-> (the-as anim-test-seq-item gp-0) blend) 1)
|
|
(anim-test-seq-mark-as-edited (the-as anim-test-sequence s4-0))
|
|
(if (< 9999 (-> (the-as anim-test-seq-item gp-0) blend))
|
|
(set! (-> (the-as anim-test-seq-item gp-0) blend) 9999)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
((3)
|
|
(let ((f30-0 (-> (the-as anim-test-seq-item gp-0) first-frame)))
|
|
(set! (-> (the-as anim-test-seq-item gp-0) first-frame) (anim-tester-adjust-frame
|
|
(-> (the-as anim-test-seq-item gp-0) first-frame)
|
|
(-> (the-as anim-test-seq-item gp-0) num-frames)
|
|
)
|
|
)
|
|
(if (!= f30-0 (-> (the-as anim-test-seq-item gp-0) first-frame))
|
|
(anim-test-seq-mark-as-edited (the-as anim-test-sequence s4-0))
|
|
)
|
|
)
|
|
)
|
|
((4)
|
|
(let ((f30-1 (-> (the-as anim-test-seq-item gp-0) last-frame)))
|
|
(set! (-> (the-as anim-test-seq-item gp-0) last-frame) (anim-tester-adjust-frame
|
|
(-> (the-as anim-test-seq-item gp-0) last-frame)
|
|
(-> (the-as anim-test-seq-item gp-0) num-frames)
|
|
)
|
|
)
|
|
(if (!= f30-1 (-> (the-as anim-test-seq-item gp-0) last-frame))
|
|
(anim-test-seq-mark-as-edited (the-as anim-test-sequence s4-0))
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(else
|
|
(+! (-> *anim-tester* 0 inc-timer) -1)
|
|
)
|
|
)
|
|
(when (or (cpad-pressed? 0 down) (cpad-pressed? 0 up))
|
|
(set! (-> *anim-tester* 0 inc-delay) (-> *DISP_LIST-bank* INC_DELAY))
|
|
(set! (-> *anim-tester* 0 inc-timer) 0)
|
|
0
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(else
|
|
(cond
|
|
((cpad-pressed? 0 up)
|
|
(if (> (-> arg1 highlight-index) 0)
|
|
(+! (-> arg1 highlight-index) -1)
|
|
)
|
|
)
|
|
((cpad-pressed? 0 down)
|
|
(if (< (the-as int (the-as anim-test-seq-item (-> arg1 highlight-index))) (glst-num-elements (-> arg1 list)))
|
|
(+! (-> arg1 highlight-index) 1)
|
|
)
|
|
)
|
|
((cpad-pressed? 0 left)
|
|
(+! (-> *anim-tester* 0 item-field) -1)
|
|
(if (< (-> *anim-tester* 0 item-field) 0)
|
|
(set! (-> *anim-tester* 0 item-field) 11)
|
|
)
|
|
(if (= (-> *anim-tester* 0 item-field) 8)
|
|
(set! (-> *anim-tester* 0 item-field) 5)
|
|
)
|
|
)
|
|
((cpad-pressed? 0 right)
|
|
(+! (-> *anim-tester* 0 item-field) 1)
|
|
(when (>= (-> *anim-tester* 0 item-field) 12)
|
|
(set! (-> *anim-tester* 0 item-field) 0)
|
|
0
|
|
)
|
|
(if (= (-> *anim-tester* 0 item-field) 6)
|
|
(set! (-> *anim-tester* 0 item-field) 9)
|
|
)
|
|
)
|
|
((cpad-pressed? 0 square)
|
|
(logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons square))
|
|
(logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons square))
|
|
(set! (-> *anim-tester* 0 edit-mode) 3)
|
|
(logior! (-> *anim-tester* 0 flags) (anim-tester-flags fanimt2))
|
|
)
|
|
((cpad-pressed? 0 x)
|
|
(cond
|
|
((logtest? (-> (the-as anim-test-seq-item gp-0) flags) 1)
|
|
(let ((v1-318 (-> *anim-tester* 0 item-field)))
|
|
(if (= v1-318 10)
|
|
(anim-test-edit-seq-insert-item (the-as anim-test-seq-item gp-0) (the-as anim-test-sequence s4-0))
|
|
)
|
|
)
|
|
)
|
|
(else
|
|
(let ((v1-322 (-> *anim-tester* 0 item-field)))
|
|
(cond
|
|
((zero? v1-322)
|
|
(anim-tester-pick-item-setup (the-as anim-test-seq-item gp-0) (the-as anim-test-sequence s4-0))
|
|
)
|
|
((= v1-322 10)
|
|
(anim-test-edit-seq-insert-item (the-as anim-test-seq-item gp-0) (the-as anim-test-sequence s4-0))
|
|
)
|
|
((= v1-322 11)
|
|
(when (zero? (logand (-> (the-as anim-test-seq-item gp-0) flags) 1))
|
|
(anim-test-seq-mark-as-edited (the-as anim-test-sequence s4-0))
|
|
(glst-remove (-> (the-as anim-test-sequence s4-0) item-list) (the-as anim-test-seq-item gp-0))
|
|
)
|
|
(send-event (ppointer->process *anim-tester*) 'change-anim)
|
|
)
|
|
(else
|
|
(when (zero? (logand (-> (the-as anim-test-seq-item gp-0) flags) 4))
|
|
(case (-> *anim-tester* 0 item-field)
|
|
((5)
|
|
(anim-test-seq-mark-as-edited (the-as anim-test-sequence s4-0))
|
|
(let ((v1-331 (logxor (-> (the-as anim-test-seq-item gp-0) flags) 2)))
|
|
(set! (-> (the-as anim-test-seq-item gp-0) flags) v1-331)
|
|
v1-331
|
|
)
|
|
)
|
|
((6)
|
|
(the-as int #f)
|
|
)
|
|
((7)
|
|
(the-as int #f)
|
|
)
|
|
((8)
|
|
(the-as int #f)
|
|
)
|
|
(else
|
|
(logior! (-> *anim-tester* 0 flags) (anim-tester-flags fanimt3))
|
|
(set! (-> *anim-tester* 0 inc-delay) (-> *DISP_LIST-bank* INC_DELAY))
|
|
(set! (-> *anim-tester* 0 inc-timer) 0)
|
|
0
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
((= arg0 2)
|
|
(set! (-> arg1 return-int) (-> *ANIM_TESTER-bank* EDIT_LIST_MIN_WIDTH))
|
|
)
|
|
((= arg0 3)
|
|
(let* ((s3-3 (-> *display* frames (-> *display* on-screen) frame debug-buf))
|
|
(gp-2 (-> s3-3 base))
|
|
)
|
|
(let ((s1-6 draw-string-xy))
|
|
(format (clear *temp-string*) "--Seq--(~-17S)--" (-> (the-as anim-test-sequence s4-0) privname))
|
|
(s1-6 *temp-string* s3-3 (-> arg1 xpos) (-> arg1 ypos) (font-color dim-white) (font-flags shadow kerning))
|
|
)
|
|
(let ((a3-17 (-> s3-3 base)))
|
|
(let ((v1-355 (the-as object (-> s3-3 base))))
|
|
(set! (-> (the-as dma-packet v1-355) dma) (new 'static 'dma-tag :id (dma-tag-id next)))
|
|
(set! (-> (the-as dma-packet v1-355) vif0) (new 'static 'vif-tag))
|
|
(set! (-> (the-as dma-packet v1-355) vif1) (new 'static 'vif-tag))
|
|
(set! (-> s3-3 base) (&+ (the-as pointer v1-355) 16))
|
|
)
|
|
(dma-bucket-insert-tag
|
|
(-> *display* frames (-> *display* on-screen) frame bucket-group)
|
|
(bucket-id debug-draw0)
|
|
gp-2
|
|
(the-as (pointer dma-tag) a3-17)
|
|
)
|
|
)
|
|
)
|
|
(cond
|
|
(s2-0
|
|
(display-list-control (-> *anim-tester* 0 pick-con))
|
|
)
|
|
(else
|
|
(let* ((s4-2 (-> *display* frames (-> *display* on-screen) frame debug-buf))
|
|
(gp-3 (-> s4-2 base))
|
|
)
|
|
(draw-string-xy
|
|
"-spd-blnd-1st-lst-flgs-mov-"
|
|
s4-2
|
|
(+ (-> arg1 xpos) (* (-> *ANIM_TESTER-bank* EDIT_STATS_X) (-> *DISP_LIST-bank* CHAR_WIDTH)))
|
|
(-> arg1 ypos)
|
|
(font-color dim-white)
|
|
(font-flags shadow kerning)
|
|
)
|
|
(let ((a3-21 (-> s4-2 base)))
|
|
(let ((v1-367 (the-as object (-> s4-2 base))))
|
|
(set! (-> (the-as dma-packet v1-367) dma) (new 'static 'dma-tag :id (dma-tag-id next)))
|
|
(set! (-> (the-as dma-packet v1-367) vif0) (new 'static 'vif-tag))
|
|
(set! (-> (the-as dma-packet v1-367) vif1) (new 'static 'vif-tag))
|
|
(set! (-> s4-2 base) (&+ (the-as pointer v1-367) 16))
|
|
)
|
|
(dma-bucket-insert-tag
|
|
(-> *display* frames (-> *display* on-screen) frame bucket-group)
|
|
(bucket-id debug-draw0)
|
|
gp-3
|
|
(the-as (pointer dma-tag) a3-21)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
#f
|
|
)
|
|
|
|
;; definition for function anim-tester-interface
|
|
;; INFO: Return type mismatch int vs none.
|
|
(defbehavior anim-tester-interface anim-tester ()
|
|
(let ((v1-0 (-> self edit-mode)))
|
|
(cond
|
|
((zero? v1-0)
|
|
(when (logtest? (-> *anim-tester* 0 flags) (anim-tester-flags fanimt2))
|
|
(logclear! (-> *anim-tester* 0 flags) (anim-tester-flags fanimt2))
|
|
(set-master-mode 'menu)
|
|
)
|
|
)
|
|
((= v1-0 1)
|
|
(display-list-control (-> self list-con))
|
|
)
|
|
((= v1-0 2)
|
|
(let ((gp-0 (the-as anim-test-obj (glst-find-node-by-name (-> self obj-list) (-> self current-obj)))))
|
|
(cond
|
|
(gp-0
|
|
(set! (-> gp-0 list-con listfunc) anim-test-anim-list-handler)
|
|
(set! (-> gp-0 list-con current-index) (-> gp-0 anim-index))
|
|
(set! (-> gp-0 list-con highlight-index) (-> gp-0 anim-hindex))
|
|
(display-list-control (-> gp-0 list-con))
|
|
(set! (-> gp-0 anim-index) (-> gp-0 list-con current-index))
|
|
(set! (-> gp-0 anim-hindex) (-> gp-0 list-con highlight-index))
|
|
)
|
|
(else
|
|
(let* ((s5-0 (-> *display* frames (-> *display* on-screen) frame debug-buf))
|
|
(gp-1 (-> s5-0 base))
|
|
)
|
|
(draw-string-xy
|
|
"ERROR: current object not found"
|
|
s5-0
|
|
(-> *ANIM_TESTER-bank* ANIM_LIST_X)
|
|
(-> *ANIM_TESTER-bank* ANIM_LIST_Y)
|
|
(font-color orange-red-2)
|
|
(font-flags shadow kerning)
|
|
)
|
|
(let ((a3-1 (-> s5-0 base)))
|
|
(let ((v1-20 (the-as object (-> s5-0 base))))
|
|
(set! (-> (the-as dma-packet v1-20) dma) (new 'static 'dma-tag :id (dma-tag-id next)))
|
|
(set! (-> (the-as dma-packet v1-20) vif0) (new 'static 'vif-tag))
|
|
(set! (-> (the-as dma-packet v1-20) vif1) (new 'static 'vif-tag))
|
|
(set! (-> s5-0 base) (&+ (the-as pointer v1-20) 16))
|
|
)
|
|
(dma-bucket-insert-tag
|
|
(-> *display* frames (-> *display* on-screen) frame bucket-group)
|
|
(bucket-id debug-draw0)
|
|
gp-1
|
|
(the-as (pointer dma-tag) a3-1)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
((= v1-0 3)
|
|
(let ((gp-2 (the-as anim-test-obj (glst-find-node-by-name (-> self obj-list) (-> self current-obj)))))
|
|
(cond
|
|
(gp-2
|
|
(set! (-> gp-2 list-con listfunc) anim-test-sequence-list-handler)
|
|
(set! (-> gp-2 list-con current-index) (-> gp-2 seq-index))
|
|
(set! (-> gp-2 list-con highlight-index) (-> gp-2 seq-hindex))
|
|
(display-list-control (-> gp-2 list-con))
|
|
(set! (-> gp-2 seq-index) (-> gp-2 list-con current-index))
|
|
(set! (-> gp-2 seq-hindex) (-> gp-2 list-con highlight-index))
|
|
)
|
|
(else
|
|
(let* ((s5-1 (-> *display* frames (-> *display* on-screen) frame debug-buf))
|
|
(gp-3 (-> s5-1 base))
|
|
)
|
|
(draw-string-xy
|
|
"ERROR: current object not found"
|
|
s5-1
|
|
(-> *ANIM_TESTER-bank* ANIM_LIST_X)
|
|
(-> *ANIM_TESTER-bank* ANIM_LIST_Y)
|
|
(font-color orange-red-2)
|
|
(font-flags shadow kerning)
|
|
)
|
|
(let ((a3-3 (-> s5-1 base)))
|
|
(let ((v1-36 (the-as object (-> s5-1 base))))
|
|
(set! (-> (the-as dma-packet v1-36) dma) (new 'static 'dma-tag :id (dma-tag-id next)))
|
|
(set! (-> (the-as dma-packet v1-36) vif0) (new 'static 'vif-tag))
|
|
(set! (-> (the-as dma-packet v1-36) vif1) (new 'static 'vif-tag))
|
|
(set! (-> s5-1 base) (&+ (the-as pointer v1-36) 16))
|
|
)
|
|
(dma-bucket-insert-tag
|
|
(-> *display* frames (-> *display* on-screen) frame bucket-group)
|
|
(bucket-id debug-draw0)
|
|
gp-3
|
|
(the-as (pointer dma-tag) a3-3)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
((= v1-0 4)
|
|
(let ((v1-43 (the-as anim-test-obj (glst-find-node-by-name (-> self obj-list) (-> self current-obj)))))
|
|
(cond
|
|
(v1-43
|
|
(let ((v1-44
|
|
(the-as anim-test-sequence (glst-get-node-by-index (-> v1-43 seq-list) (-> v1-43 list-con current-index)))
|
|
)
|
|
)
|
|
(cond
|
|
(v1-44
|
|
(display-list-control (-> v1-44 list-con))
|
|
)
|
|
(else
|
|
(let* ((s5-2 (-> *display* frames (-> *display* on-screen) frame debug-buf))
|
|
(gp-4 (-> s5-2 base))
|
|
)
|
|
(draw-string-xy
|
|
"ERROR: current sequence not found"
|
|
s5-2
|
|
(-> *ANIM_TESTER-bank* EDIT_LIST_X)
|
|
(-> *ANIM_TESTER-bank* EDIT_LIST_Y)
|
|
(font-color orange-red-2)
|
|
(font-flags shadow kerning)
|
|
)
|
|
(let ((a3-5 (-> s5-2 base)))
|
|
(let ((v1-51 (the-as object (-> s5-2 base))))
|
|
(set! (-> (the-as dma-packet v1-51) dma) (new 'static 'dma-tag :id (dma-tag-id next)))
|
|
(set! (-> (the-as dma-packet v1-51) vif0) (new 'static 'vif-tag))
|
|
(set! (-> (the-as dma-packet v1-51) vif1) (new 'static 'vif-tag))
|
|
(set! (-> s5-2 base) (&+ (the-as pointer v1-51) 16))
|
|
)
|
|
(dma-bucket-insert-tag
|
|
(-> *display* frames (-> *display* on-screen) frame bucket-group)
|
|
(bucket-id debug-draw0)
|
|
gp-4
|
|
(the-as (pointer dma-tag) a3-5)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(else
|
|
(let* ((s5-3 (-> *display* frames (-> *display* on-screen) frame debug-buf))
|
|
(gp-5 (-> s5-3 base))
|
|
)
|
|
(draw-string-xy
|
|
"ERROR: current object not found"
|
|
s5-3
|
|
(-> *ANIM_TESTER-bank* EDIT_LIST_X)
|
|
(-> *ANIM_TESTER-bank* EDIT_LIST_Y)
|
|
(font-color orange-red-2)
|
|
(font-flags shadow kerning)
|
|
)
|
|
(let ((a3-7 (-> s5-3 base)))
|
|
(let ((v1-62 (the-as object (-> s5-3 base))))
|
|
(set! (-> (the-as dma-packet v1-62) dma) (new 'static 'dma-tag :id (dma-tag-id next)))
|
|
(set! (-> (the-as dma-packet v1-62) vif0) (new 'static 'vif-tag))
|
|
(set! (-> (the-as dma-packet v1-62) vif1) (new 'static 'vif-tag))
|
|
(set! (-> s5-3 base) (&+ (the-as pointer v1-62) 16))
|
|
)
|
|
(dma-bucket-insert-tag
|
|
(-> *display* frames (-> *display* on-screen) frame bucket-group)
|
|
(bucket-id debug-draw0)
|
|
gp-5
|
|
(the-as (pointer dma-tag) a3-7)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(set! (-> self old-mode) (-> self edit-mode))
|
|
(none)
|
|
)
|
|
|
|
;; definition for function anim-tester-get-playing-item
|
|
(defun anim-tester-get-playing-item ((arg0 anim-test-sequence))
|
|
(let ((v0-0 ((the-as (function glst-list int anim-test-seq-item) glst-get-node-by-index)
|
|
(-> arg0 item-list)
|
|
(-> arg0 playing-item)
|
|
)
|
|
)
|
|
)
|
|
(let ((s5-0 v0-0)
|
|
(s4-0 (-> arg0 playing-item))
|
|
)
|
|
(when (logtest? (-> v0-0 flags) 5)
|
|
(while #t
|
|
(+! s4-0 1)
|
|
(if (>= s4-0 (glst-num-elements (-> arg0 item-list)))
|
|
(set! s4-0 0)
|
|
)
|
|
(set! v0-0
|
|
((the-as (function glst-list int anim-test-seq-item) glst-get-node-by-index) (-> arg0 item-list) s4-0)
|
|
)
|
|
(when (or (= v0-0 s5-0) (zero? (logand (-> v0-0 flags) 5)))
|
|
(set! (-> arg0 playing-item) s4-0)
|
|
(return v0-0)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
v0-0
|
|
)
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defstate anim-tester-process (anim-tester)
|
|
:event
|
|
anim-tester-standard-event-handler
|
|
:enter
|
|
(behavior ()
|
|
(logior! (-> self flags) (anim-tester-flags fanimt1))
|
|
(none)
|
|
)
|
|
:trans
|
|
(behavior ()
|
|
(if (and (zero? (logand (-> self flags) (anim-tester-flags fanimt1))) (= *master-mode* 'menu))
|
|
(anim-tester-interface)
|
|
)
|
|
(logclear! (-> self flags) (anim-tester-flags fanimt1))
|
|
(when (!= *master-mode* 'menu)
|
|
(debug-print-channels (-> self skel) (the-as symbol *stdcon*))
|
|
(add-debug-x
|
|
#t
|
|
(bucket-id debug-draw1)
|
|
(-> self root trans)
|
|
(new 'static 'rgba :r #xff :g #xff :b #xff :a #x80)
|
|
)
|
|
)
|
|
(none)
|
|
)
|
|
:code
|
|
(behavior ()
|
|
(local-vars (s4-0 glst-node) (s5-1 anim-test-seq-item) (gp-2 anim-test-sequence))
|
|
(while #t
|
|
(logclear! (-> self flags) (anim-tester-flags fanimt0))
|
|
(let ((v1-2 (-> self obj-list)))
|
|
"is the list empty, #t = empty"
|
|
(cond
|
|
((= (-> v1-2 tailpred) v1-2)
|
|
(format *stdcon* "anim-tester:no objects loaded~%")
|
|
(set! (-> self list-con current-index) 0)
|
|
(set! (-> self current-obj) "")
|
|
(suspend)
|
|
0
|
|
)
|
|
((begin
|
|
(set! s4-0 (glst-find-node-by-name (-> self obj-list) (-> self current-obj)))
|
|
(when (not s4-0)
|
|
(if (>= (-> self list-con current-index) (glst-num-elements (-> self obj-list)))
|
|
(set! (-> self list-con current-index) (+ (glst-num-elements (-> self obj-list)) -1))
|
|
)
|
|
(set! s4-0 (glst-get-node-by-index (-> self obj-list) (-> self list-con current-index)))
|
|
(set! (-> self current-obj) (-> (the-as anim-test-obj s4-0) privname))
|
|
)
|
|
(let ((v1-10 (the-as structure (-> (the-as anim-test-obj s4-0) seq-list))))
|
|
"is the list empty, #t = empty"
|
|
(= (-> (the-as anim-test-obj v1-10) privname) (the-as glst-list v1-10))
|
|
)
|
|
)
|
|
(format *stdcon* "anim-tester:no anims loaded~%")
|
|
(format *stdcon* "displaying without anim not yet implement~%")
|
|
(logclear! (-> self flags) (anim-tester-flags fanimt0))
|
|
(suspend)
|
|
0
|
|
)
|
|
((begin
|
|
(if (>= (-> (the-as anim-test-obj s4-0) list-con current-index)
|
|
(glst-num-elements (-> (the-as anim-test-obj s4-0) seq-list))
|
|
)
|
|
(set! (-> (the-as anim-test-obj s4-0) list-con current-index)
|
|
(+ (glst-num-elements (-> (the-as anim-test-obj s4-0) seq-list)) -1)
|
|
)
|
|
)
|
|
(set! gp-2 (the-as anim-test-sequence (glst-get-node-by-index
|
|
(-> (the-as anim-test-obj s4-0) seq-list)
|
|
(if (logtest? (-> (the-as anim-test-obj s4-0) flags) 2)
|
|
(-> (the-as anim-test-obj s4-0) seq-index)
|
|
(-> (the-as anim-test-obj s4-0) anim-index)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(let ((v1-18 (-> gp-2 item-list)))
|
|
"is the list empty, #t = empty"
|
|
(= (-> v1-18 tailpred) v1-18)
|
|
)
|
|
)
|
|
(format *stdcon* "anim-tester:no items in sequence ~A~%" (-> gp-2 privname))
|
|
(format *stdcon* "displaying without anim not yet implement~%")
|
|
(suspend)
|
|
0
|
|
)
|
|
((begin
|
|
(when (>= (-> gp-2 playing-item) (glst-num-elements (-> gp-2 item-list)))
|
|
(set! (-> gp-2 playing-item) 0)
|
|
0
|
|
)
|
|
(set! s5-1 (anim-tester-get-playing-item gp-2))
|
|
s5-1
|
|
)
|
|
(let ((s4-1 (the-as
|
|
art-joint-anim
|
|
(lookup-art (-> (the-as anim-test-obj s4-0) obj-art-group) (-> s5-1 privname) art-joint-anim)
|
|
)
|
|
)
|
|
)
|
|
(anim-tester-update-anim-info s5-1)
|
|
(cond
|
|
(s4-1
|
|
(logior! (-> self flags) (anim-tester-flags fanimt0))
|
|
(if (nonzero? (-> s5-1 blend))
|
|
(ja-channel-push! 1 (the int (* (the float (-> s5-1 blend)) (-> self anim-gspeed))))
|
|
(ja-channel-set! 1)
|
|
)
|
|
(cond
|
|
((= (-> self anim-first) -1.0)
|
|
(let ((s3-0 (-> self skel root-channel 0)))
|
|
(joint-control-channel-group-eval! s3-0 s4-1 num-func-identity)
|
|
(set! (-> s3-0 frame-num) 0.0)
|
|
)
|
|
)
|
|
((= (-> self anim-first) -2.0)
|
|
(let ((s3-1 (-> self skel root-channel 0)))
|
|
(joint-control-channel-group-eval! s3-1 s4-1 num-func-identity)
|
|
(set! (-> s3-1 frame-num) (the float (+ (-> s4-1 data 0 length) -1)))
|
|
)
|
|
)
|
|
(else
|
|
(let ((s3-2 (-> self skel root-channel 0)))
|
|
(joint-control-channel-group-eval! s3-2 s4-1 num-func-identity)
|
|
(set! (-> s3-2 frame-num) (-> self anim-first))
|
|
)
|
|
)
|
|
)
|
|
(when (nonzero? (-> s5-1 blend))
|
|
(while (and (!= (-> self skel root-channel 0) (-> self skel channel)) (logtest? (-> s5-1 flags) 2))
|
|
(when (logtest? (-> self flags) (anim-tester-flags fanimt5))
|
|
(TODO-RENAME-9 (-> self align))
|
|
(TODO-RENAME-10 (-> self align) 31 (the-as float 1.0) (the-as float 1.0) (the-as float 1.0))
|
|
)
|
|
(suspend)
|
|
)
|
|
)
|
|
(until (ja-done? 0)
|
|
(when (logtest? (-> self flags) (anim-tester-flags fanimt5))
|
|
(TODO-RENAME-9 (-> self align))
|
|
(TODO-RENAME-10 (-> self align) 31 (the-as float 1.0) (the-as float 1.0) (the-as float 1.0))
|
|
)
|
|
(suspend)
|
|
(anim-tester-update-anim-info s5-1)
|
|
(let ((v1-73 (= (-> self anim-last) -2.0)))
|
|
(cond
|
|
((or v1-73 (>= (-> self anim-last) (-> self anim-first)))
|
|
(cond
|
|
((= (-> self anim-last) -2.0)
|
|
(let ((a0-42 (-> self skel root-channel 0)))
|
|
(set! (-> a0-42 param 0) (the float (+ (-> a0-42 frame-group data 0 length) -1)))
|
|
(set! (-> a0-42 param 1) (-> self anim-speed))
|
|
(joint-control-channel-group-eval! a0-42 (the-as art-joint-anim #f) num-func-seek!)
|
|
)
|
|
)
|
|
(else
|
|
(let ((a0-43 (-> self skel root-channel 0)))
|
|
(set! (-> a0-43 param 0) (-> self anim-last))
|
|
(set! (-> a0-43 param 1) (-> self anim-speed))
|
|
(joint-control-channel-group-eval! a0-43 (the-as art-joint-anim #f) num-func-seek!)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
((= (-> self anim-last) -1.0)
|
|
(let ((a0-44 (-> self skel root-channel 0)))
|
|
(set! (-> a0-44 param 0) 0.0)
|
|
(set! (-> a0-44 param 1) (-> self anim-speed))
|
|
(joint-control-channel-group-eval! a0-44 (the-as art-joint-anim #f) num-func-seek!)
|
|
)
|
|
)
|
|
(else
|
|
(let ((a0-45 (-> self skel root-channel 0)))
|
|
(set! (-> a0-45 param 0) (-> self anim-last))
|
|
(set! (-> a0-45 param 1) (-> self anim-speed))
|
|
(joint-control-channel-group-eval! a0-45 (the-as art-joint-anim #f) num-func-seek!)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(+! (-> gp-2 playing-item) 1)
|
|
)
|
|
(else
|
|
(format *stdcon* "anim ~A not found~%" (-> s5-1 privname))
|
|
(suspend)
|
|
0
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(else
|
|
(format *stdcon* "no anims~%")
|
|
(suspend)
|
|
0
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(none)
|
|
)
|
|
:post
|
|
anim-tester-post
|
|
)
|
|
|
|
;; definition for function initialize-anim-tester
|
|
;; INFO: Return type mismatch object vs none.
|
|
(defbehavior initialize-anim-tester anim-tester ()
|
|
(glst-init-list! (-> self obj-list))
|
|
(logclear! (-> self mask) (process-mask menu))
|
|
(set! (-> self speed) 100)
|
|
(set! (-> self current-obj) "")
|
|
(set! (-> self root) (new 'process 'trsqv))
|
|
(set! (-> self draw) (new 'process 'draw-control self (the-as art-joint-geo #f)))
|
|
(set! (-> self draw dma-add-func) dma-add-process-drawable)
|
|
(set! (-> self skel) (new 'process 'joint-control 24))
|
|
(set! (-> self align) (new 'process 'align-control self))
|
|
(set! (-> self list-con listfunc) anim-test-obj-list-handler)
|
|
(set! (-> self list-con left) (-> *ANIM_TESTER-bank* OBJECT_LIST_X))
|
|
(set! (-> self list-con top) (-> *ANIM_TESTER-bank* OBJECT_LIST_Y))
|
|
(set! (-> self list-con list) (-> self obj-list))
|
|
(set! (-> self list-con list-owner) (the-as uint self))
|
|
(quaternion-identity! (-> self root quat))
|
|
(vector-identity! (-> self root scale))
|
|
(position-in-front-of-camera! (-> self root trans) (the-as float 40960.0) (the-as float 4096.0))
|
|
(set! (-> self event-hook) anim-tester-standard-event-handler)
|
|
(anim-tester-reset)
|
|
(go anim-tester-process)
|
|
(none)
|
|
)
|
|
|
|
;; definition for function anim-tester-string-get-frame!!
|
|
(defun anim-tester-string-get-frame!! ((arg0 list-field) (arg1 string))
|
|
(cond
|
|
((string-get-arg!! *temp-string* arg1)
|
|
(cond
|
|
((or (string= *temp-string* "max") (string= *temp-string* "MAX"))
|
|
(set! (-> arg0 left) -2)
|
|
)
|
|
((or (string= *temp-string* "min") (string= *temp-string* "MIN"))
|
|
(set! (-> arg0 left) -1)
|
|
)
|
|
(else
|
|
(set! (-> arg0 left) (string->int *temp-string*))
|
|
)
|
|
)
|
|
#t
|
|
)
|
|
(else
|
|
#f
|
|
)
|
|
)
|
|
)
|
|
|
|
;; definition for function anim-tester-load-object-seqs
|
|
(defun anim-tester-load-object-seqs ((arg0 anim-tester) (arg1 string))
|
|
#f
|
|
)
|
|
|
|
;; definition for function anim-tester-save-object-seqs
|
|
(defun anim-tester-save-object-seqs ((arg0 anim-test-obj))
|
|
(let ((gp-0 format)
|
|
(s4-0 0)
|
|
(s3-0 "saving object ~s to ~s~%")
|
|
(s2-0 (-> arg0 privname))
|
|
)
|
|
(format (clear *temp-string*) "data/~s.obinf" (-> arg0 privname))
|
|
(gp-0 s4-0 s3-0 s2-0 *temp-string*)
|
|
)
|
|
(let ((gp-1 (method-of-type file-stream new))
|
|
(s4-1 (new 'stack-no-clear 'file-stream))
|
|
(s3-1 file-stream)
|
|
)
|
|
(format (clear *temp-string*) "data/~s.obinf" (-> arg0 privname))
|
|
(let ((gp-2 (gp-1 (the-as symbol s4-1) s3-1 *temp-string* 'write)))
|
|
(format gp-2 "major-version 0~%")
|
|
(format gp-2 "minor-version 0~%")
|
|
(format gp-2 "Object \"~S\" ~d~%" (-> arg0 privname) 0)
|
|
(let ((v1-5 (-> arg0 seq-list)))
|
|
"return the start of the list"
|
|
(let ((s5-1 (-> v1-5 head)))
|
|
(while (let ((v1-30 (the-as anim-test-sequence s5-1)))
|
|
"is this node the end of the list. #t = end"
|
|
(not (not (-> v1-30 next)))
|
|
)
|
|
(set! (-> (the-as anim-test-sequence s5-1) flags) (logand -5 (-> (the-as anim-test-sequence s5-1) flags)))
|
|
(format
|
|
gp-2
|
|
" ~S \"~S\" ~d~%"
|
|
(if (logtest? (-> (the-as anim-test-sequence s5-1) flags) 1)
|
|
"Sequence"
|
|
"Anim"
|
|
)
|
|
(-> (the-as anim-test-sequence s5-1) privname)
|
|
0
|
|
)
|
|
(let ((v1-11 (-> (the-as anim-test-sequence s5-1) item-list)))
|
|
"return the start of the list"
|
|
(let ((s4-2 (the-as anim-test-seq-item (-> v1-11 head))))
|
|
(while (let ((v1-21 s4-2))
|
|
"is this node the end of the list. #t = end"
|
|
(not (not (-> v1-21 next)))
|
|
)
|
|
(when (zero? (logand (-> s4-2 flags) 5))
|
|
(format gp-2 " Item \"~S\" ~d ~d " (-> s4-2 privname) (-> s4-2 speed) (-> s4-2 blend))
|
|
(anim-tester-num-print gp-2 (-> s4-2 first-frame))
|
|
(format gp-2 " ")
|
|
(anim-tester-num-print gp-2 (-> s4-2 last-frame))
|
|
(format gp-2 " ~S~%" (if (logtest? (-> s4-2 flags) 2)
|
|
"B"
|
|
"-"
|
|
)
|
|
)
|
|
)
|
|
"return the next node in the list"
|
|
(set! s4-2 (the-as anim-test-seq-item (-> s4-2 next)))
|
|
)
|
|
)
|
|
)
|
|
(format gp-2 " ~S~%" (if (logtest? (-> (the-as anim-test-sequence s5-1) flags) 1)
|
|
"EndSequence"
|
|
"EndAnim"
|
|
)
|
|
)
|
|
"return the next node in the list"
|
|
(set! s5-1 (-> (the-as anim-test-sequence s5-1) next))
|
|
)
|
|
)
|
|
)
|
|
(format gp-2 "EndObject~%")
|
|
(file-stream-close gp-2)
|
|
)
|
|
)
|
|
)
|
|
|
|
;; definition for function anim-tester-save-all-objects
|
|
(defun anim-tester-save-all-objects ((arg0 anim-tester))
|
|
(let ((v1-0 (-> arg0 obj-list)))
|
|
"return the start of the list"
|
|
(let ((gp-0 (-> v1-0 head)))
|
|
(while (let ((v1-9 (the-as anim-test-obj gp-0)))
|
|
"is this node the end of the list. #t = end"
|
|
(not (not (-> v1-9 next)))
|
|
)
|
|
(when (logtest? (-> (the-as anim-test-obj gp-0) flags) 1)
|
|
(set! (-> (the-as anim-test-obj gp-0) flags) (logand -2 (-> (the-as anim-test-obj gp-0) flags)))
|
|
(anim-tester-save-object-seqs (the-as anim-test-obj gp-0))
|
|
)
|
|
"return the next node in the list"
|
|
(set! gp-0 (-> (the-as anim-test-obj gp-0) next))
|
|
)
|
|
)
|
|
)
|
|
#f
|
|
)
|
|
|
|
;; definition for function anim-tester-add-newobj
|
|
;; Used lq/sq
|
|
(defun anim-tester-add-newobj ((arg0 anim-tester) (arg1 string) (arg2 art-group))
|
|
(local-vars (sv-96 art-element) (sv-112 art-element) (sv-128 anim-test-obj))
|
|
(let ((s2-0 (the-as anim-test-obj #f))
|
|
(s5-0 (the-as anim-test-obj #f))
|
|
)
|
|
(let ((s1-0 (the-as art-element #f))
|
|
(s0-0 (the-as structure #f))
|
|
)
|
|
(dotimes (s3-0 (-> arg2 length))
|
|
(cond
|
|
((and (= (-> arg2 data s3-0 type) merc-ctrl) (not s2-0))
|
|
(set! sv-96 (-> arg2 data s3-0))
|
|
(set! s0-0 (and s2-0 s0-0))
|
|
(if s0-0
|
|
(anim-test-obj-remove-invalid s2-0)
|
|
)
|
|
(anim-tester-load-object-seqs arg0 (-> sv-96 name))
|
|
(set! s2-0 (the-as anim-test-obj (glst-find-node-by-name (-> arg0 obj-list) (-> sv-96 name))))
|
|
(set! s0-0 (if s2-0
|
|
#t
|
|
#f
|
|
)
|
|
)
|
|
(cond
|
|
((the-as symbol s0-0)
|
|
)
|
|
(else
|
|
(set! s2-0 (new 'global 'anim-test-obj 1 (-> sv-96 name) arg2))
|
|
(glst-add-tail (-> arg0 obj-list) s2-0)
|
|
)
|
|
)
|
|
(anim-test-obj-init s2-0 (the-as list-control arg0))
|
|
(set! (-> s2-0 obj-art-group) arg2)
|
|
(set! (-> s2-0 mesh-geo) (the-as merc-ctrl sv-96))
|
|
(set! (-> s2-0 joint-geo) (the-as art-joint-geo s1-0))
|
|
(if (not s5-0)
|
|
(set! s5-0 s2-0)
|
|
)
|
|
)
|
|
((= (-> arg2 data s3-0 type) art-joint-geo)
|
|
(if (and s2-0 (not (-> s2-0 joint-geo)))
|
|
(set! (-> s2-0 joint-geo) (the-as art-joint-geo (-> arg2 data s3-0)))
|
|
)
|
|
(if (not s1-0)
|
|
(set! s1-0 (-> arg2 data s3-0))
|
|
)
|
|
)
|
|
((= (-> arg2 data s3-0 type) art-joint-anim)
|
|
(when s2-0
|
|
(set! sv-112 (-> arg2 data s3-0))
|
|
(set! sv-128 (the-as anim-test-obj (glst-find-node-by-name (-> s2-0 seq-list) (-> sv-112 name))))
|
|
(when (not sv-128)
|
|
(set! sv-128 (the-as anim-test-obj (new 'debug 'anim-test-sequence 1 (-> sv-112 name))))
|
|
(glst-add-tail (-> s2-0 seq-list) sv-128)
|
|
(anim-test-sequence-init (the-as anim-test-sequence sv-128) s2-0)
|
|
(let ((a1-11 (new 'debug 'anim-test-seq-item 1 (-> sv-112 name))))
|
|
(glst-add-tail (the-as glst-list (&-> sv-128 obj-art-group)) a1-11)
|
|
)
|
|
)
|
|
(set! (-> sv-128 list-con user-info) (the-as int s2-0))
|
|
(set! (-> sv-128 flags) (logior (-> (the-as anim-test-sequence sv-128) flags) 2))
|
|
(let ((v1-48 (-> (the-as anim-test-sequence sv-128) item-list)))
|
|
"is the list empty, #t = empty"
|
|
(when (not (= (-> v1-48 tailpred) v1-48))
|
|
(let ((v1-51 (-> (the-as anim-test-sequence sv-128) item-list)))
|
|
"return the start of the list"
|
|
(let ((v1-52 (-> v1-51 head)))
|
|
(set! (-> (the-as anim-test-seq-item v1-52) num-frames)
|
|
(the float (-> (the-as art-joint-anim sv-112) data 0 length))
|
|
)
|
|
(set! (-> (the-as anim-test-seq-item v1-52) artist-base) (-> (the-as art-joint-anim sv-112) artist-base))
|
|
(set! (-> (the-as anim-test-seq-item v1-52) parent) (the-as anim-test-sequence sv-128))
|
|
)
|
|
)
|
|
sv-128
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(else
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(if s2-0
|
|
(anim-test-obj-remove-invalid s2-0)
|
|
)
|
|
(when s5-0
|
|
(set! (-> arg0 current-obj) (-> s5-0 privname))
|
|
(set! (-> arg0 list-con current-index) (glst-get-node-index (-> arg0 obj-list) s5-0))
|
|
)
|
|
)
|
|
(send-event arg0 'reset #f)
|
|
)
|
|
|
|
;; definition for function anim-tester-stop
|
|
(defun anim-tester-stop ()
|
|
(when *anim-tester*
|
|
(kill-by-name 'anim-tester *active-pool*)
|
|
(set! *anim-tester* (the-as (pointer anim-tester) #f))
|
|
#f
|
|
)
|
|
)
|
|
|
|
;; definition for function anim-tester-start
|
|
(defun anim-tester-start ()
|
|
(anim-tester-stop)
|
|
(let ((gp-0 (get-process *16k-dead-pool* anim-tester #x4000)))
|
|
(set! *anim-tester*
|
|
(the-as (pointer anim-tester)
|
|
(when gp-0
|
|
(let ((t9-2 (method-of-type anim-tester activate)))
|
|
(t9-2 (the-as anim-tester gp-0) *default-pool* 'anim-tester (the-as pointer #x70004000))
|
|
)
|
|
((the-as (function process function none) run-function-in-process) gp-0 initialize-anim-tester)
|
|
(-> gp-0 ppointer)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(set! *camera-orbit-target* *anim-tester*)
|
|
(send-event *camera* 'change-state cam-orbit 0)
|
|
#f
|
|
)
|
|
|
|
;; definition for function anim-tester-add-object
|
|
;; INFO: Return type mismatch object vs none.
|
|
(defun anim-tester-add-object ((arg0 string))
|
|
(let ((s5-0 (load-to-heap-by-name (-> *level* level-default art-group) arg0 #t global 0)))
|
|
(cond
|
|
(s5-0
|
|
(if (not *anim-tester*)
|
|
(anim-tester-start)
|
|
)
|
|
(if *anim-tester*
|
|
(anim-tester-add-newobj (the-as anim-tester (ppointer->process *anim-tester*)) arg0 s5-0)
|
|
)
|
|
)
|
|
(else
|
|
(format 0 "ERROR:no object (~A)n" arg0)
|
|
)
|
|
)
|
|
)
|
|
(none)
|
|
)
|
|
|
|
;; definition for function anim-tester-set-name
|
|
(defun anim-tester-set-name ((arg0 string))
|
|
(cond
|
|
((zero? (length arg0))
|
|
(format #t "ERROR: no name~%")
|
|
)
|
|
((and *anim-tester* (let ((v1-6 (-> *anim-tester* 0 obj-list)))
|
|
"is the list empty, #t = empty"
|
|
(not (= (-> v1-6 tailpred) v1-6))
|
|
)
|
|
)
|
|
(let ((s3-0
|
|
(the-as anim-test-obj (glst-find-node-by-name (-> *anim-tester* 0 obj-list) (-> *anim-tester* 0 current-obj)))
|
|
)
|
|
)
|
|
(cond
|
|
(s3-0
|
|
(let ((s5-0
|
|
(the-as anim-test-sequence (glst-get-node-by-index (-> s3-0 seq-list) (-> s3-0 list-con current-index)))
|
|
)
|
|
)
|
|
(cond
|
|
(s5-0
|
|
(cond
|
|
((logtest? (-> s5-0 flags) 1)
|
|
(let ((s4-0 (the-as object (-> s5-0 privname))))
|
|
(let ((v1-14 s5-0))
|
|
(set! (-> v1-14 privname) "")
|
|
)
|
|
(cond
|
|
((glst-find-node-by-name (-> s3-0 seq-list) arg0)
|
|
(format #t "ERROR: another sequence is already using that name (~S)~%" arg0)
|
|
(set! (-> s5-0 privname) (the-as string s4-0))
|
|
)
|
|
(else
|
|
(set! s4-0 arg0)
|
|
(set! (-> s5-0 privname) (the-as string s4-0))
|
|
)
|
|
)
|
|
s4-0
|
|
)
|
|
)
|
|
(else
|
|
(format #t "ERROR: no sequence selected~%")
|
|
)
|
|
)
|
|
)
|
|
(else
|
|
(format #t "ERROR: no sequence selected~%")
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(else
|
|
(format #t "ERROR:no object selected~%")
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(else
|
|
(format #t "ERROR:no object loaded~%")
|
|
)
|
|
)
|
|
)
|
|
|
|
;; definition for function anim-tester-add-sequence
|
|
;; INFO: Return type mismatch object vs none.
|
|
(defun anim-tester-add-sequence ((arg0 string))
|
|
(cond
|
|
((zero? (length arg0))
|
|
(format #t "ERROR: no name~%")
|
|
)
|
|
((and *anim-tester* (let ((v1-6 (-> *anim-tester* 0 obj-list)))
|
|
"is the list empty, #t = empty"
|
|
(not (= (-> v1-6 tailpred) v1-6))
|
|
)
|
|
)
|
|
(let ((s5-0
|
|
(the-as anim-test-obj (glst-find-node-by-name (-> *anim-tester* 0 obj-list) (-> *anim-tester* 0 current-obj)))
|
|
)
|
|
)
|
|
(cond
|
|
(s5-0
|
|
(let ((s4-0 (glst-find-node-by-name (-> s5-0 seq-list) arg0)))
|
|
(cond
|
|
(s4-0
|
|
(format #t "ERROR: there is already a sequence with the name ~S~%" arg0)
|
|
(set! (-> s5-0 list-con current-index) (glst-get-node-index (-> s5-0 seq-list) s4-0))
|
|
(send-event (ppointer->process *anim-tester*) 'edit-sequence)
|
|
)
|
|
(else
|
|
(let ((gp-1 (new 'global 'anim-test-sequence 1 arg0)))
|
|
(glst-add-tail (-> s5-0 seq-list) gp-1)
|
|
(set! (-> gp-1 list-con listfunc) anim-test-edit-sequence-list-handler)
|
|
(set! (-> gp-1 list-con left) (-> *ANIM_TESTER-bank* EDIT_LIST_X))
|
|
(set! (-> gp-1 list-con top) (-> *ANIM_TESTER-bank* EDIT_LIST_Y))
|
|
(set! (-> gp-1 list-con list) (-> gp-1 item-list))
|
|
(set! (-> gp-1 list-con list-owner) (the-as uint gp-1))
|
|
(set! (-> gp-1 parent) s5-0)
|
|
(anim-test-seq-mark-as-edited gp-1)
|
|
(logior! (-> gp-1 flags) 1)
|
|
(set! (-> s5-0 list-con current-index) (glst-get-node-index (-> s5-0 seq-list) gp-1))
|
|
(set! (-> s5-0 seq-index) (-> s5-0 list-con current-index))
|
|
(set! (-> s5-0 seq-hindex) (-> s5-0 list-con current-index))
|
|
(let ((s5-1 (new 'debug 'anim-test-seq-item 1 "**END**")))
|
|
(logior! (-> s5-1 flags) 1)
|
|
(glst-add-tail (-> gp-1 item-list) s5-1)
|
|
(set! (-> s5-1 parent) gp-1)
|
|
)
|
|
)
|
|
(send-event (ppointer->process *anim-tester*) 'edit-sequence)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(else
|
|
(format #t "ERROR:no object selected~%")
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(else
|
|
(format #t "ERROR:no object loaded~%")
|
|
)
|
|
)
|
|
(none)
|
|
)
|
|
|
|
)
|