[decomp] fisher and FIN.DGO (finalboss) level (#899)

* decomp `fisher`, `robotboss`, `light-eco`, `green-eco-lurker`, `sage-finalboss`, `robotboss-weapon`, `robotboss-misc`

* fixes

* add files

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

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

* also the refs

* add light-eco

* whatever
This commit is contained in:
ManDude
2021-10-16 19:06:33 +01:00
committed by GitHub
parent 9225d28444
commit caac740aff
185 changed files with 30529 additions and 4422 deletions
@@ -23,12 +23,12 @@
init!
gui-query
((obj gui-query)
(arg0 symbol)
(arg0 string)
(arg1 int)
(arg2 int)
(arg3 int)
(arg4 symbol)
(arg5 symbol)
(arg5 string)
)
(set! (-> obj x-position) arg1)
(set! (-> obj y-position) arg2)
@@ -42,7 +42,7 @@
)
;; definition for method 10 of type gui-query
(defmethod dummy-10 gui-query ((obj gui-query))
(defmethod get-response gui-query ((obj gui-query))
(kill-current-level-hint '() '(sidekick voicebox stinger) 'exit)
(level-hint-surpress!)
(hide-hud)
@@ -72,7 +72,7 @@
(set! (-> v1-6 scale) 0.9)
)
(set! (-> a1-2 flags) (font-flags shadow kerning left large))
(print-game-text (the-as string (-> obj message)) a1-2 #f 128 22)
(print-game-text (-> obj message) a1-2 #f 128 22)
)
)
(cond
@@ -290,16 +290,20 @@
)
;; definition for method 34 of type process-taskable
(defmethod TODO-RENAME-34 process-taskable ((obj process-taskable) (arg0 symbol))
#f
;; INFO: Return type mismatch symbol vs spool-anim.
(defmethod
get-accept-anim
process-taskable
((obj process-taskable) (arg0 symbol))
(the-as spool-anim #f)
)
;; definition for method 35 of type process-taskable
;; INFO: Return type mismatch int vs none.
(defmethod dummy-35 process-taskable ((obj process-taskable))
(let ((s5-0 (the-as basic (TODO-RENAME-34 obj #f))))
(if (type-type? (-> (the-as symbol s5-0) type) spool-anim)
(spool-push *art-control* (-> (the-as spool-anim s5-0) name) 0 obj -99.0)
(defmethod push-accept-anim process-taskable ((obj process-taskable))
(let ((s5-0 (get-accept-anim obj #f)))
(if (type-type? (-> s5-0 type) spool-anim)
(spool-push *art-control* (-> s5-0 name) 0 obj -99.0)
)
)
0
@@ -307,20 +311,20 @@
)
;; definition for method 36 of type process-taskable
;; INFO: Return type mismatch symbol vs basic.
;; INFO: Return type mismatch symbol vs spool-anim.
(defmethod
get-spool-anim-or-??
get-reject-anim
process-taskable
((obj process-taskable) (arg0 symbol))
(the-as basic #f)
(the-as spool-anim #f)
)
;; definition for method 37 of type process-taskable
;; INFO: Return type mismatch int vs none.
(defmethod spool-push-anim process-taskable ((obj process-taskable))
(let ((s5-0 (get-spool-anim-or-?? obj #f)))
(defmethod push-reject-anim process-taskable ((obj process-taskable))
(let ((s5-0 (get-reject-anim obj #f)))
(if (type-type? (-> s5-0 type) spool-anim)
(spool-push *art-control* (-> (the-as spool-anim s5-0) name) 0 obj -99.0)
(spool-push *art-control* (-> s5-0 name) 0 obj -99.0)
)
)
0
@@ -436,7 +440,7 @@
#t
"ERROR<GMJ>: ~S got into give-cell with give-cell == #f task = ~S~%"
(-> self name)
(game-task->string (the-as game-task (current-task (-> self tasks))))
(game-task->string (current-task (-> self tasks)))
)
)
)
@@ -463,10 +467,7 @@
(behavior ()
(if
(and
(>=
(- (-> *display* base-frame-counter) (the-as int (-> self state-time)))
1500
)
(>= (- (-> *display* base-frame-counter) (-> self state-time)) 1500)
(or
(not *target*)
(<
@@ -500,7 +501,7 @@
;; definition for function process-taskable-play-anim-enter
(defbehavior process-taskable-play-anim-enter process-taskable ()
(init! (-> self query) #f 40 150 25 #t #f)
(init! (-> self query) (the-as string #f) 40 150 25 #t (the-as string #f))
(logior! (-> self skel status) 8)
(let ((gp-0 (get-process *default-dead-pool* othercam #x4000)))
(set! (-> self camera) (ppointer->handle (when gp-0
@@ -670,7 +671,7 @@
arg0
(the-as art-joint-anim (-> self blend-on-exit))
(lambda ((arg0 process-taskable))
(= (dummy-10 (-> arg0 query)) 'no)
(= (get-response (-> arg0 query)) 'no)
)
)
(ja-play-spooled-anim
@@ -762,7 +763,7 @@
)
)
(until (ja-done? 0)
(when (and *debug-segment* (= (dummy-10 (-> self query)) 'no))
(when (and *debug-segment* (= (get-response (-> self query)) 'no))
(let ((v1-106 (-> self skel root-channel 0)))
(set! (-> v1-106 num-func) num-func-identity)
(set!
@@ -810,7 +811,7 @@
(behavior ()
(process-taskable-play-anim-code
(the-as art-joint-anim (get-art-elem self))
(TODO-RENAME-34 self #t)
(get-accept-anim self #t)
)
(while (not (process-release? *target*))
(suspend)
@@ -842,7 +843,7 @@
(behavior ()
(process-taskable-play-anim-code
(the-as art-joint-anim (get-art-elem self))
(get-spool-anim-or-?? self #t)
(get-reject-anim self #t)
)
(go-virtual release)
(none)
@@ -858,12 +859,12 @@
(behavior ()
(init!
(-> self query)
(the-as symbol (lookup-text! *common-text* (game-text-id confirm-play) #f))
(lookup-text! *common-text* (game-text-id confirm-play) #f)
40
150
25
#f
(the-as symbol (lookup-text! *common-text* (game-text-id quit) #f))
(lookup-text! *common-text* (game-text-id quit) #f)
)
(none)
)
@@ -872,8 +873,8 @@
:trans
(behavior ()
(case (current-status (-> self tasks))
((4)
(case (dummy-10 (-> self query))
(((task-status need-reminder-a))
(case (get-response (-> self query))
(('yes)
(go-virtual play-accept)
)
@@ -881,10 +882,10 @@
(go-virtual play-reject)
)
)
(dummy-35 self)
(push-accept-anim self)
)
(else
(let ((gp-0 (dummy-10 (-> self query))))
(let ((gp-0 (get-response (-> self query))))
(cond
((and (= gp-0 'yes) (process-release? *target*))
(go-virtual enter-playing)
@@ -896,7 +897,7 @@
)
)
)
(spool-push-anim self)
(push-reject-anim self)
(set! *camera-look-through-other* 2)
((-> self cur-trans-hook))
(none)
@@ -1064,11 +1065,7 @@
)
:trans
(behavior ()
(if
(>=
(- (-> *display* base-frame-counter) (the-as int (-> self state-time)))
300
)
(if (>= (- (-> *display* base-frame-counter) (-> self state-time)) 300)
(process-entity-status! self (entity-perm-status bit-3) #f)
)
(if (or (-> self been-kicked) (should-display? self))
@@ -1124,11 +1121,7 @@
)
:trans
(behavior ()
(if
(>=
(- (-> *display* base-frame-counter) (the-as int (-> self state-time)))
300
)
(if (>= (- (-> *display* base-frame-counter) (-> self state-time)) 300)
(process-entity-status! self (entity-perm-status bit-3) #f)
)
(cond
@@ -1350,11 +1343,7 @@
)
:trans
(behavior ()
(when
(>=
(- (-> *display* base-frame-counter) (the-as int (-> self state-time)))
60
)
(when (>= (- (-> *display* base-frame-counter) (-> self state-time)) 60)
(logior! (-> self mask) (process-mask actor-pause))
(process-entity-status! self (entity-perm-status bit-3) #f)
)
@@ -1404,7 +1393,12 @@
(first-any (-> self tasks) #t)
(when (target-above-threshold? self)
(case (current-status (-> self tasks))
((2 3 5 4 6)
(((task-status need-hint)
(task-status need-introduction)
(task-status need-reminder)
(task-status need-reminder-a)
(task-status need-reward-speech)
)
(kill-current-level-hint '() '(sidekick voicebox ambient) 'exit)
(level-hint-surpress!)
(hide-hud)
@@ -1628,7 +1622,7 @@
((not (should-display? obj))
(go (method-of-object obj hidden))
)
((= (current-status (-> obj tasks)) 7)
((= (current-status (-> obj tasks)) (task-status need-resolution))
(go (method-of-object obj give-cell))
)
(else
@@ -1655,10 +1649,7 @@
(arg2 float)
(arg3 process-drawable)
)
(set!
(-> obj last-ambient-time)
(the-as uint (-> *display* game-frame-counter))
)
(set! (-> obj last-ambient-time) (-> *display* game-frame-counter))
0
(none)
)
@@ -1674,13 +1665,7 @@
(arg3 process-drawable)
)
(when
(<
(-
(-> *display* game-frame-counter)
(the-as int (-> obj last-ambient-time))
)
arg1
)
(< (- (-> *display* game-frame-counter) (-> obj last-ambient-time)) arg1)
(set! arg0 (the-as vector #f))
(goto cfg-6)
)
@@ -1695,20 +1680,17 @@
;; definition for method 11 of type ambient-control
(defmethod
dummy-11
play-ambient
ambient-control
((obj ambient-control) (arg0 string) (arg1 symbol) (arg2 vector))
(when
(and
(not (string= arg0 (the-as string (-> obj last-ambient))))
(not (string= arg0 (-> obj last-ambient)))
(or arg1 (can-hint-be-played? 1 (the-as entity #f) (the-as string #f)))
(= (-> *level* loading-level) (-> *level* level-default))
(ambient-hint-spawn arg0 arg2 *entity-pool* 'ambient)
)
(set!
(-> obj last-ambient-time)
(the-as uint (-> *display* game-frame-counter))
)
(set! (-> obj last-ambient-time) (-> *display* game-frame-counter))
(set! (-> obj last-ambient) arg0)
(return #t)
)