[decomp] improve types around enter-state (#923)

* clean up

* restore hack
This commit is contained in:
water111
2021-10-20 20:55:25 -04:00
committed by GitHub
parent 29d15f7fbc
commit b7fe8447e2
104 changed files with 5493 additions and 2733 deletions
@@ -5301,6 +5301,7 @@
)
;; definition for function cam-layout-init
;; INFO: Return type mismatch object vs none.
(defbehavior cam-layout-init cam-layout ()
(set! (-> self res-key) (-> (new 'static 'array float 1 -1000000000.0) 0))
(set! (-> self num-entities) 0)
+10 -10
View File
@@ -157,16 +157,15 @@
:virtual #t
:event
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(let ((v1-0 arg2))
(the-as object (when (= v1-0 'abort)
(when (logtest? (-> self flags) 1)
(logior! (-> self flags) 2)
(if (= (-> self anim-name type) string)
(go-virtual pov-camera-abort)
)
)
)
)
(case arg2
(('abort)
(when (logtest? (-> self flags) 1)
(logior! (-> self flags) 2)
(if (= (-> self anim-name type) string)
(go-virtual pov-camera-abort)
)
)
)
)
)
:enter
@@ -328,6 +327,7 @@
)
;; definition for function pov-camera-init-by-other
;; INFO: Return type mismatch object vs none.
;; Used lq/sq
(defbehavior
pov-camera-init-by-other pov-camera
+38 -46
View File
@@ -1249,55 +1249,46 @@
)
;; definition for function anim-tester-standard-event-handler
;; INFO: Return type mismatch none vs object.
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code?
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code?
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code?
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code?
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code?
(defbehavior
anim-tester-standard-event-handler anim-tester
((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(let ((v1-0 arg2))
(the-as object (cond
((= v1-0 'reset)
(process-disconnect self)
(set! (-> self flags) (logand -2 (-> self flags)))
(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)
)
((= v1-0 'change-anim)
(go anim-tester-process)
)
((= v1-0 'pick-object)
(set! (-> self edit-mode) 1)
(set! *camera-read-buttons* #f)
#f
)
((= v1-0 'pick-joint-anim)
(set! (-> self edit-mode) 2)
(set! *camera-read-buttons* #f)
#f
)
((= v1-0 'pick-sequence)
(set! (-> self edit-mode) 3)
(set! *camera-read-buttons* #f)
#f
)
((= v1-0 'edit-sequence)
(set! (-> self edit-mode) 4)
(set! *camera-read-buttons* #f)
#f
)
((= v1-0 'save-sequences)
(anim-tester-save-all-objects self)
)
)
(case arg2
(('reset)
(process-disconnect self)
(set! (-> self flags) (logand -2 (-> self flags)))
(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)
)
)
)
@@ -3259,6 +3250,7 @@
)
;; 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))
+47 -62
View File
@@ -927,68 +927,53 @@
:virtual #t
:event
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(let ((v1-0 arg2))
(the-as object (cond
((= v1-0 'touched)
(when (-> self attack-mode)
(when (cond
((= (-> arg0 type) target)
(let
((a1-1
(new 'stack-no-clear 'event-message-block)
)
)
(set! (-> a1-1 from) self)
(set! (-> a1-1 num-params) 2)
(set! (-> a1-1 message) 'attack)
(set! (-> a1-1 param 0) (-> arg3 param 0))
(let
((a0-4 (new 'static 'attack-info :mask #x20)))
(set! (-> a0-4 mode) (-> self attack-mode))
(set! (-> a1-1 param 1) (the-as uint a0-4))
)
(send-event-function arg0 a1-1)
)
)
(else
(let
((a1-2
(new 'stack-no-clear 'event-message-block)
)
)
(set! (-> a1-2 from) self)
(set! (-> a1-2 num-params) 4)
(set! (-> a1-2 message) 'attack)
(set! (-> a1-2 param 0) (-> arg3 param 0))
(set!
(-> a1-2 param 1)
(the-as uint (-> self attack-mode))
)
(let ((v1-13 (+ *global-attack-id* 1)))
(set! *global-attack-id* v1-13)
(set! (-> a1-2 param 2) (the-as uint v1-13))
)
(set! (-> a1-2 param 3) (the-as uint 0))
(send-event-function arg0 a1-2)
)
)
)
(let ((v1-14 (-> self notify-handle)))
(if (handle->process v1-14)
(send-event (-> v1-14 process 0) 'notify 'attack arg0)
)
)
(+! (-> self hits) 1)
(if (>= (-> self hits) (-> self max-hits))
(go-virtual projectile-impact)
)
)
)
)
((= v1-0 'die)
(go-virtual projectile-impact)
)
)
(case arg2
(('touched)
(when (-> self attack-mode)
(when (cond
((= (-> arg0 type) target)
(let ((a1-1 (new 'stack-no-clear 'event-message-block)))
(set! (-> a1-1 from) self)
(set! (-> a1-1 num-params) 2)
(set! (-> a1-1 message) 'attack)
(set! (-> a1-1 param 0) (-> arg3 param 0))
(let ((a0-4 (new 'static 'attack-info :mask #x20)))
(set! (-> a0-4 mode) (-> self attack-mode))
(set! (-> a1-1 param 1) (the-as uint a0-4))
)
(send-event-function arg0 a1-1)
)
)
(else
(let ((a1-2 (new 'stack-no-clear 'event-message-block)))
(set! (-> a1-2 from) self)
(set! (-> a1-2 num-params) 4)
(set! (-> a1-2 message) 'attack)
(set! (-> a1-2 param 0) (-> arg3 param 0))
(set! (-> a1-2 param 1) (the-as uint (-> self attack-mode)))
(let ((v1-13 (+ *global-attack-id* 1)))
(set! *global-attack-id* v1-13)
(set! (-> a1-2 param 2) (the-as uint v1-13))
)
(set! (-> a1-2 param 3) (the-as uint 0))
(send-event-function arg0 a1-2)
)
)
)
(let ((v1-14 (-> self notify-handle)))
(if (handle->process v1-14)
(send-event (-> v1-14 process 0) 'notify 'attack arg0)
)
)
(+! (-> self hits) 1)
(if (>= (-> self hits) (-> self max-hits))
(go-virtual projectile-impact)
)
)
)
)
(('die)
(go-virtual projectile-impact)
)
)
)
@@ -332,6 +332,7 @@
)
;; definition for method 38 of type process-taskable
;; INFO: Return type mismatch object vs none.
(defmethod dummy-38 process-taskable ((obj process-taskable))
(if (nonzero? (-> obj cell-for-task))
(go (method-of-object obj give-cell))
@@ -945,6 +946,7 @@
)
;; definition for function process-taskable-hide-handler
;; INFO: Return type mismatch object vs none.
(defbehavior
process-taskable-hide-handler process-taskable
((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
@@ -1103,46 +1105,53 @@
:event
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(let ((v1-0 arg2))
(the-as object (cond
((= v1-0 'shadow)
(the-as shadow-geo (cond
((-> arg3 param 0)
(let ((v0-0 (-> self shadow-backup)))
(set! (-> self draw shadow) v0-0)
v0-0
)
)
(else
(set! (-> self draw shadow) #f)
(the-as shadow-geo #f)
)
)
)
)
((= v1-0 'shadow-min-max)
(let ((v1-5 (-> self draw shadow-ctrl)))
(let ((a0-5 v1-5))
(set!
(-> a0-5 settings bot-plane w)
(- (the-as float (-> arg3 param 0)))
(the-as shadow-geo (cond
((= v1-0 'shadow)
(the-as shadow-geo (cond
((-> arg3 param 0)
(let
((v0-0 (-> self shadow-backup)))
(set! (-> self draw shadow) v0-0)
v0-0
)
)
(else
(set! (-> self draw shadow) #f)
(the-as shadow-geo #f)
)
)
)
)
((= v1-0 'shadow-min-max)
(let ((v1-5 (-> self draw shadow-ctrl)))
(let ((a0-5 v1-5))
(set!
(-> a0-5 settings bot-plane w)
(- (the-as float (-> arg3 param 0)))
)
)
0
(set!
(-> v1-5 settings top-plane w)
(- (the-as float (-> arg3 param 1)))
)
)
(the-as shadow-geo 0)
)
((= v1-0 'end-mode)
(the-as shadow-geo (if (should-display? self)
(the-as
shadow-geo
(go-virtual idle)
)
(the-as
shadow-geo
(go-virtual hidden)
)
)
)
)
)
)
0
(set!
(-> v1-5 settings top-plane w)
(- (the-as float (-> arg3 param 1)))
)
)
(the-as shadow-geo 0)
)
((= v1-0 'end-mode)
(the-as shadow-geo (if (should-display? self)
(the-as shadow-geo (go-virtual idle))
(the-as shadow-geo (go-virtual hidden))
)
)
)
)
)
)
)
@@ -1559,6 +1568,7 @@
)
;; definition for method 42 of type process-taskable
;; INFO: Return type mismatch object vs none.
(defmethod dummy-42 process-taskable ((obj process-taskable))
(cond
((not (should-display? obj))
@@ -2722,6 +2722,7 @@
)
;; definition for function init-target
;; INFO: Return type mismatch object vs none.
;; Used lq/sq
(defbehavior init-target target ((arg0 continue-point))
(set-setting! *setting-control* self 'allow-pause #f 0.0 0)
+49 -57
View File
@@ -1103,77 +1103,69 @@
)
;; definition for function fall-test
;; INFO: Return type mismatch none vs object.
(defbehavior fall-test target ((arg0 symbol) (arg1 symbol))
(the-as
object
(when
(and
(zero? (logand (-> self control status) 1))
(>=
(- (-> *display* base-frame-counter) (-> self control unknown-dword10))
(the-as int (-> *TARGET-bank* ground-timeout))
)
(>=
0.0
(vector-dot
(-> self control dynam gravity-normal)
(-> self control transv)
)
)
(let ((v1-15 (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
)
)
(or
(not
(or
(= v1-15 (-> self draw art-group data 59))
(= v1-15 (-> self draw art-group data 60))
(= v1-15 (-> self draw art-group data 61))
)
)
(< 4096.0 (target-height-above-ground))
)
)
)
(when
(and
(zero? (logand (-> self control status) 1))
(>=
(- (-> *display* base-frame-counter) (-> self control unknown-dword10))
(<
(-
(-> *display* base-frame-counter)
(the-as int (-> self control rider-time))
)
(the-as int (-> *TARGET-bank* ground-timeout))
)
(>=
0.0
(vector-dot
(-> self control dynam gravity-normal)
(-> self control transv)
)
)
(let ((v1-15 (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
)
)
(or
(not
(or
(= v1-15 (-> self draw art-group data 59))
(= v1-15 (-> self draw art-group data 60))
(= v1-15 (-> self draw art-group data 61))
)
)
(< 4096.0 (target-height-above-ground))
)
)
(logtest? (-> self control unknown-surface01 flags) #x4000)
)
(when
(and
(<
(-
(-> *display* base-frame-counter)
(the-as int (-> self control rider-time))
)
(the-as int (-> *TARGET-bank* ground-timeout))
)
(logtest? (-> self control unknown-surface01 flags) #x4000)
)
(+! (-> self control transv x) (-> self control rider-last-move x))
(+! (-> self control transv z) (-> self control rider-last-move z))
)
(go target-falling #f)
(+! (-> self control transv x) (-> self control rider-last-move x))
(+! (-> self control transv z) (-> self control rider-last-move z))
)
(go target-falling #f)
)
)
;; definition for function slide-down-test
;; INFO: Return type mismatch none vs object.
(defbehavior slide-down-test target ((arg0 symbol) (arg1 symbol))
(the-as
object
(if
(and
(zero? (logand (-> self control status) 129))
(>=
(- (-> *display* base-frame-counter) (-> self control unknown-dword10))
(the-as int (-> *TARGET-bank* ground-timeout))
)
(logtest? (-> self control status) 4)
(< 0.5 (-> self control surface-angle))
(if
(and
(zero? (logand (-> self control status) 129))
(>=
(- (-> *display* base-frame-counter) (-> self control unknown-dword10))
(the-as int (-> *TARGET-bank* ground-timeout))
)
(go target-slide-down)
(logtest? (-> self control status) 4)
(< 0.5 (-> self control surface-angle))
)
(go target-slide-down)
)
)
+8 -10
View File
@@ -394,16 +394,13 @@
:virtual #t
:event
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(let ((v1-0 arg2))
(the-as object (cond
((= v1-0 'trigger)
(set! (-> self trigger) #t)
(go-virtual falling)
)
((= v1-0 'loading)
(go-virtual loading)
)
)
(case arg2
(('trigger)
(set! (-> self trigger) #t)
(go-virtual falling)
)
(('loading)
(go-virtual loading)
)
)
)
@@ -635,6 +632,7 @@
)
;; definition for method 11 of type beach-rock
;; INFO: Return type mismatch object vs none.
(defmethod copy-defaults! beach-rock ((obj beach-rock) (arg0 res-lump))
(set! (-> obj link) (new 'process 'actor-link-info obj))
(set! (-> obj align) (new 'process 'align-control obj))
@@ -263,6 +263,7 @@
)
;; definition for method 11 of type bird-lady
;; INFO: Return type mismatch object vs none.
(defmethod copy-defaults! bird-lady ((obj bird-lady) (arg0 res-lump))
(dummy-40
obj
+55 -64
View File
@@ -146,11 +146,6 @@
)
;; definition for method 43 of type lurkercrab
;; INFO: Return type mismatch none vs object.
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code?
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code?
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code?
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code?
;; Used lq/sq
(defmethod
dummy-43
@@ -159,65 +154,60 @@
(let ((s5-0 (-> obj incomming-attack-id)))
(set! (-> obj incomming-attack-id) (the-as handle (-> arg1 param 2)))
(let ((v1-1 (-> arg1 param 1)))
(the-as object (cond
((or (= v1-1 'flop) (= v1-1 'explode) (= v1-1 'darkeco))
(logclear! (-> obj mask) (process-mask actor-pause))
(go (method-of-object obj nav-enemy-die))
)
((= v1-1 'punch)
(cond
((logtest? (-> obj nav-enemy-flags) 32)
(logclear! (-> obj mask) (process-mask actor-pause))
(go (method-of-object obj nav-enemy-die))
)
((begin
(let ((s4-0 (new 'stack-no-clear 'vector)))
(let ((f30-0 (quaternion-xz-angle (target-rot))))
(set-vector!
s4-0
(* 24576.0 (sin f30-0))
0.0
(* 24576.0 (cos f30-0))
1.0
)
)
(vector+! s4-0 (-> obj collide-info trans) s4-0)
(set! (-> obj nav target-pos quad) (-> s4-0 quad))
)
(go lurkercrab-pushed)
(= s5-0 (-> obj incomming-attack-id))
)
'push
)
(else
#t
)
)
)
((logtest? (-> obj nav-enemy-flags) 32)
(logclear! (-> obj mask) (process-mask actor-pause))
(go (method-of-object obj nav-enemy-die))
)
((begin
(let ((s4-1 (new 'stack-no-clear 'vector)))
(vector-!
s4-1
(-> obj collide-info trans)
(target-pos 0)
)
(vector-normalize! s4-1 24576.0)
(vector+! s4-1 (-> obj collide-info trans) s4-1)
(set! (-> obj nav target-pos quad) (-> s4-1 quad))
)
(go lurkercrab-pushed)
(= s5-0 (-> obj incomming-attack-id))
)
'push
)
(else
#t
)
)
(cond
((or (= v1-1 'flop) (= v1-1 'explode) (= v1-1 'darkeco))
(logclear! (-> obj mask) (process-mask actor-pause))
(go (method-of-object obj nav-enemy-die))
)
((= v1-1 'punch)
(cond
((logtest? (-> obj nav-enemy-flags) 32)
(logclear! (-> obj mask) (process-mask actor-pause))
(go (method-of-object obj nav-enemy-die))
)
((begin
(let ((s4-0 (new 'stack-no-clear 'vector)))
(let ((f30-0 (quaternion-xz-angle (target-rot))))
(set-vector!
s4-0
(* 24576.0 (sin f30-0))
0.0
(* 24576.0 (cos f30-0))
1.0
)
)
(vector+! s4-0 (-> obj collide-info trans) s4-0)
(set! (-> obj nav target-pos quad) (-> s4-0 quad))
)
(go lurkercrab-pushed)
(= s5-0 (-> obj incomming-attack-id))
)
'push
)
(else
#t
)
)
)
((logtest? (-> obj nav-enemy-flags) 32)
(logclear! (-> obj mask) (process-mask actor-pause))
(go (method-of-object obj nav-enemy-die))
)
((begin
(let ((s4-1 (new 'stack-no-clear 'vector)))
(vector-! s4-1 (-> obj collide-info trans) (target-pos 0))
(vector-normalize! s4-1 24576.0)
(vector+! s4-1 (-> obj collide-info trans) s4-1)
(set! (-> obj nav target-pos quad) (-> s4-1 quad))
)
(go lurkercrab-pushed)
(= s5-0 (-> obj incomming-attack-id))
)
'push
)
(else
#t
)
)
)
)
@@ -1170,6 +1160,7 @@ nav-enemy-default-event-handler
)
;; definition for method 11 of type lurkercrab
;; INFO: Return type mismatch object vs none.
(defmethod copy-defaults! lurkercrab ((obj lurkercrab) (arg0 res-lump))
(let
((s4-0
@@ -141,22 +141,19 @@
(defstate drop-plat-idle (drop-plat)
:event
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(let ((v1-0 arg2))
(the-as object (cond
((= v1-0 'drop)
(logclear! (-> self mask) (process-mask actor-pause))
(go drop-plat-drop)
)
((or (= v1-0 'touch) (= v1-0 'attack))
(send-event *target* 'no-look-around 300)
(send-event
(ppointer->process (-> self parent))
'player-stepped
(-> self color)
)
#f
)
)
(case arg2
(('drop)
(logclear! (-> self mask) (process-mask actor-pause))
(go drop-plat-drop)
)
(('touch 'attack)
(send-event *target* 'no-look-around 300)
(send-event
(ppointer->process (-> self parent))
'player-stepped
(-> self color)
)
#f
)
)
)
@@ -212,11 +209,10 @@
(defstate drop-plat-spawn (drop-plat)
:event
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(let ((v1-0 arg2))
(the-as object (if (= v1-0 'drop)
(go drop-plat-die)
)
)
(case arg2
(('drop)
(go drop-plat-die)
)
)
)
:code
@@ -251,11 +247,10 @@
(defstate drop-plat-rise (drop-plat)
:event
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(let ((v1-0 arg2))
(the-as object (if (= v1-0 'drop)
(go drop-plat-drop)
)
)
(case arg2
(('drop)
(go drop-plat-drop)
)
)
)
:code
@@ -511,6 +506,7 @@
)
;; definition for function drop-plat-init-by-other
;; INFO: Return type mismatch object vs none.
;; Used lq/sq
(defbehavior
drop-plat-init-by-other drop-plat
@@ -770,11 +766,10 @@
(defstate citb-drop-plat-idle (citb-drop-plat)
:event
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(let ((v1-0 arg2))
(the-as object (if (= v1-0 'trigger)
(go citb-drop-plat-active)
)
)
(case arg2
(('trigger)
(go citb-drop-plat-active)
)
)
)
:code
@@ -847,6 +842,7 @@
)
;; definition for method 11 of type citb-drop-plat
;; INFO: Return type mismatch object vs none.
;; Used lq/sq
(defmethod copy-defaults! citb-drop-plat ((obj citb-drop-plat) (arg0 res-lump))
(set! (-> obj root) (new 'process 'trsqv))
@@ -683,6 +683,7 @@ nav-enemy-default-event-handler
)
;; definition for method 11 of type babak-with-cannon
;; INFO: Return type mismatch object vs none.
(defmethod
copy-defaults!
babak-with-cannon
+95 -109
View File
@@ -111,49 +111,42 @@
:virtual #t
:event
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(let ((v1-0 arg2))
(the-as object (cond
((= v1-0 'attack)
(case (-> arg3 param 1)
(('flop)
(TODO-RENAME-29
self
(-> self event-going-down)
(-> self notify-actor)
)
(sound-play-by-name
(static-sound-name "silo-button")
(new-sound-id)
1024
0
0
(the-as uint 1)
(the-as vector #t)
)
(go-virtual basebutton-going-down)
)
)
)
((= v1-0 'trigger)
(sound-play-by-name
(static-sound-name "silo-button")
(new-sound-id)
1024
0
0
(the-as uint 1)
(the-as vector #t)
)
(go-virtual basebutton-going-down)
)
((= v1-0 'move-to)
(move-to-vec-or-quat!
self
(the-as vector (-> arg3 param 0))
(the-as quaternion (-> arg3 param 1))
)
)
)
(case arg2
(('attack)
(case (-> arg3 param 1)
(('flop)
(TODO-RENAME-29 self (-> self event-going-down) (-> self notify-actor))
(sound-play-by-name
(static-sound-name "silo-button")
(new-sound-id)
1024
0
0
(the-as uint 1)
(the-as vector #t)
)
(go-virtual basebutton-going-down)
)
)
)
(('trigger)
(sound-play-by-name
(static-sound-name "silo-button")
(new-sound-id)
1024
0
0
(the-as uint 1)
(the-as vector #t)
)
(go-virtual basebutton-going-down)
)
(('move-to)
(move-to-vec-or-quat!
self
(the-as vector (-> arg3 param 0))
(the-as quaternion (-> arg3 param 1))
)
)
)
)
@@ -188,28 +181,25 @@
:virtual #t
:event
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(let ((v1-0 arg2))
(the-as object (cond
((= v1-0 'untrigger)
(sound-play-by-name
(static-sound-name "silo-button")
(new-sound-id)
1024
0
0
(the-as uint 1)
(the-as vector #t)
)
(go-virtual basebutton-going-up)
)
((= v1-0 'move-to)
(move-to-vec-or-quat!
self
(the-as vector (-> arg3 param 0))
(the-as quaternion (-> arg3 param 1))
)
)
)
(case arg2
(('untrigger)
(sound-play-by-name
(static-sound-name "silo-button")
(new-sound-id)
1024
0
0
(the-as uint 1)
(the-as vector #t)
)
(go-virtual basebutton-going-up)
)
(('move-to)
(move-to-vec-or-quat!
self
(the-as vector (-> arg3 param 0))
(the-as quaternion (-> arg3 param 1))
)
)
)
)
@@ -270,28 +260,25 @@
:virtual #t
:event
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(let ((v1-0 arg2))
(the-as object (cond
((= v1-0 'untrigger)
(sound-play-by-name
(static-sound-name "silo-button")
(new-sound-id)
1024
0
0
(the-as uint 1)
(the-as vector #t)
)
(go-virtual basebutton-going-up)
)
((= v1-0 'move-to)
(move-to-vec-or-quat!
self
(the-as vector (-> arg3 param 0))
(the-as quaternion (-> arg3 param 1))
)
)
)
(case arg2
(('untrigger)
(sound-play-by-name
(static-sound-name "silo-button")
(new-sound-id)
1024
0
0
(the-as uint 1)
(the-as vector #t)
)
(go-virtual basebutton-going-up)
)
(('move-to)
(move-to-vec-or-quat!
self
(the-as vector (-> arg3 param 0))
(the-as quaternion (-> arg3 param 1))
)
)
)
)
@@ -354,28 +341,25 @@
:virtual #t
:event
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(let ((v1-0 arg2))
(the-as object (cond
((= v1-0 'move-to)
(move-to-vec-or-quat!
self
(the-as vector (-> arg3 param 0))
(the-as quaternion (-> arg3 param 1))
)
)
((= v1-0 'trigger)
(sound-play-by-name
(static-sound-name "silo-button")
(new-sound-id)
1024
0
0
(the-as uint 1)
(the-as vector #t)
)
(go-virtual basebutton-going-down)
)
)
(case arg2
(('move-to)
(move-to-vec-or-quat!
self
(the-as vector (-> arg3 param 0))
(the-as quaternion (-> arg3 param 1))
)
)
(('trigger)
(sound-play-by-name
(static-sound-name "silo-button")
(new-sound-id)
1024
0
0
(the-as uint 1)
(the-as vector #t)
)
(go-virtual basebutton-going-down)
)
)
)
@@ -611,6 +595,7 @@
)
;; definition for method 11 of type basebutton
;; INFO: Return type mismatch object vs none.
(defmethod copy-defaults! basebutton ((obj basebutton) (arg0 res-lump))
(reset! obj)
(set! (-> obj spawned-by-other?) #f)
@@ -664,6 +649,7 @@
)
;; definition for function basebutton-init-by-other
;; INFO: Return type mismatch object vs none.
;; Used lq/sq
(defbehavior
basebutton-init-by-other basebutton
@@ -526,6 +526,7 @@ eco-door-event-handler
)
;; definition for method 11 of type eco-door
;; INFO: Return type mismatch object vs none.
(defmethod copy-defaults! eco-door ((obj eco-door) (arg0 res-lump))
(TODO-RENAME-24 obj)
(process-drawable-from-entity! obj arg0)
@@ -143,48 +143,36 @@
)
;; definition for function battlecontroller-default-event-handler
;; INFO: Return type mismatch none vs object.
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code?
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code?
;; Used lq/sq
(defbehavior
battlecontroller-default-event-handler battlecontroller
((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(let ((v1-0 arg2))
(the-as object (cond
((= v1-0 'child-die)
(+! (-> self die-count) 1)
(when (= (-> self die-count) (-> self max-spawn-count))
(let ((v1-4 (the-as process-drawable arg0)))
(when v1-4
(set!
(-> self final-pickup-spawn-point quad)
(-> v1-4 root trans quad)
)
(case (-> self final-pickup-type)
(((pickup-type fuel-cell))
#f
)
(else
(set!
(-> v1-4 fact pickup-type)
(-> self final-pickup-type)
)
(set! (-> v1-4 fact pickup-amount) 1.0)
(let ((f0-1 0.0))
(set! (-> v1-4 fact pickup-spawn-amount) f0-1)
f0-1
)
)
)
)
)
)
)
((= v1-0 'trigger)
(go-virtual battlecontroller-die)
)
)
(case arg2
(('child-die)
(+! (-> self die-count) 1)
(when (= (-> self die-count) (-> self max-spawn-count))
(let ((v1-4 (the-as process-drawable arg0)))
(when v1-4
(set! (-> self final-pickup-spawn-point quad) (-> v1-4 root trans quad))
(case (-> self final-pickup-type)
(((pickup-type fuel-cell))
#f
)
(else
(set! (-> v1-4 fact pickup-type) (-> self final-pickup-type))
(set! (-> v1-4 fact pickup-amount) 1.0)
(let ((f0-1 0.0))
(set! (-> v1-4 fact pickup-spawn-amount) f0-1)
f0-1
)
)
)
)
)
)
)
(('trigger)
(go-virtual battlecontroller-die)
)
)
)
@@ -49,6 +49,7 @@
)
;; definition for function blocking-plane-init-by-other
;; INFO: Return type mismatch object vs none.
;; Used lq/sq
(defbehavior
blocking-plane-init-by-other blocking-plane
@@ -179,7 +180,3 @@
(none)
)
)
+11 -15
View File
@@ -202,25 +202,19 @@
)
;; definition for method 43 of type nav-enemy
;; INFO: Return type mismatch none vs object.
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code?
(defmethod
dummy-43
nav-enemy
((obj nav-enemy) (arg0 process) (arg1 event-message-block))
(the-as object (cond
((logtest? (-> obj nav-enemy-flags) 32)
(send-event arg0 'get-attack-count 1)
(logclear!
(-> obj mask)
(process-mask actor-pause attackable)
)
(go (method-of-object obj nav-enemy-die))
)
(else
(dummy-44 obj arg0 arg1)
)
)
(cond
((logtest? (-> obj nav-enemy-flags) 32)
(send-event arg0 'get-attack-count 1)
(logclear! (-> obj mask) (process-mask actor-pause attackable))
(go (method-of-object obj nav-enemy-die))
)
(else
(dummy-44 obj arg0 arg1)
)
)
)
@@ -250,6 +244,7 @@
)
;; definition for function nav-enemy-default-event-handler
;; INFO: Return type mismatch object vs none.
;; Used lq/sq
(defbehavior
nav-enemy-default-event-handler nav-enemy
@@ -3110,6 +3105,7 @@ nav-enemy-default-event-handler
)
;; definition for function nav-enemy-init-by-other
;; INFO: Return type mismatch object vs none.
;; Used lq/sq
(defbehavior
nav-enemy-init-by-other nav-enemy
+22 -23
View File
@@ -92,29 +92,28 @@
:virtual #t
:event
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(let ((v1-0 arg2))
(the-as object (when (= v1-0 'touch)
(when (can-activate? self)
(if
(and
((method-of-type touching-shapes-entry prims-touching?)
(the-as touching-shapes-entry (-> arg3 param 0))
(-> self root-override)
(the-as uint 1)
)
(or
(not (-> self should-grab-player?))
(let ((v0-3 (process-grab? *target*)))
(set! (-> self grab-player?) v0-3)
v0-3
)
)
)
(go-virtual plat-button-pressed)
)
)
)
)
(case arg2
(('touch)
(when (can-activate? self)
(if
(and
((method-of-type touching-shapes-entry prims-touching?)
(the-as touching-shapes-entry (-> arg3 param 0))
(-> self root-override)
(the-as uint 1)
)
(or
(not (-> self should-grab-player?))
(let ((v0-3 (process-grab? *target*)))
(set! (-> self grab-player?) v0-3)
v0-3
)
)
)
(go-virtual plat-button-pressed)
)
)
)
)
)
:code
+1
View File
@@ -379,6 +379,7 @@
)
;; definition for method 11 of type plat
;; INFO: Return type mismatch object vs none.
(defmethod copy-defaults! plat ((obj plat) (arg0 res-lump))
(set! (-> obj mask) (logior (process-mask platform) (-> obj mask)))
(dummy-24 obj)
@@ -1219,6 +1219,7 @@ nav-enemy-default-event-handler
)
;; definition for method 11 of type sharkey
;; INFO: Return type mismatch object vs none.
;; Used lq/sq
(defmethod copy-defaults! sharkey ((obj sharkey) (arg0 res-lump))
(set! (-> obj scale) (res-lump-float arg0 'scale :default 1.0))
@@ -121,12 +121,11 @@
:virtual #t
:event
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(let ((v1-0 arg2))
(the-as object (when (= v1-0 'open)
enter-state
(go-virtual open)
)
)
(case arg2
(('open)
enter-state
(go-virtual open)
)
)
)
:code
@@ -267,6 +266,7 @@
)
;; definition for method 11 of type final-door
;; INFO: Return type mismatch object vs none.
(defmethod copy-defaults! final-door ((obj final-door) (arg0 res-lump))
(let
((s4-0
@@ -557,6 +557,7 @@
)
;; definition for function powercellalt-init-by-other
;; INFO: Return type mismatch object vs none.
;; Used lq/sq
(defbehavior
powercellalt-init-by-other powercellalt
@@ -1261,6 +1261,7 @@
)
;; definition for function green-eco-lurker-init-by-other
;; INFO: Return type mismatch object vs none.
;; Used lq/sq
(defbehavior
green-eco-lurker-init-by-other green-eco-lurker
@@ -1343,6 +1344,7 @@
)
;; definition for function green-eco-lurker-gen-init-by-other
;; INFO: Return type mismatch object vs none.
;; Used lq/sq
(defbehavior
green-eco-lurker-gen-init-by-other green-eco-lurker-gen
+52 -55
View File
@@ -574,22 +574,20 @@
)
;; definition for function light-eco-child-default-event-handler
;; INFO: Return type mismatch none vs object.
(defbehavior
light-eco-child-default-event-handler light-eco-child
((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(let ((v1-0 arg2))
(the-as object (when (or (= v1-0 'touch) (= v1-0 'attack))
(when (= (-> arg0 type) target)
(send-event
(ppointer->process (-> self parent))
'trigger
(-> self angle-bit)
)
(go light-eco-child-grabbed)
)
)
)
(case arg2
(('touch 'attack)
(when (= (-> arg0 type) target)
(send-event
(ppointer->process (-> self parent))
'trigger
(-> self angle-bit)
)
(go light-eco-child-grabbed)
)
)
)
)
@@ -826,6 +824,7 @@
)
;; definition for function light-eco-child-init-by-other
;; INFO: Return type mismatch object vs none.
;; Used lq/sq
(defbehavior
light-eco-child-init-by-other light-eco-child
@@ -1010,54 +1009,51 @@
)
;; definition for function light-eco-mother-default-event-handler
;; INFO: Return type mismatch none vs object.
;; INFO: Return type mismatch object vs int.
(defbehavior
light-eco-mother-default-event-handler light-eco-mother
((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(let ((v1-0 arg2))
(the-as object (cond
((= v1-0 'untrigger)
(the-as int (when (= (-> arg0 type) light-eco-child)
(let* ((a1-3 (-> arg3 param 0))
(v0-0
(logxor
(-> self angle-mask)
(ash 1 a1-3)
)
)
)
(set! (-> self angle-mask) v0-0)
v0-0
)
(the-as int (cond
((= v1-0 'untrigger)
(the-as int (when (= (-> arg0 type) light-eco-child)
(let* ((a1-3 (-> arg3 param 0))
(v0-0
(logxor (-> self angle-mask) (ash 1 a1-3))
)
)
(set! (-> self angle-mask) v0-0)
v0-0
)
)
)
)
((= v1-0 'trigger)
(the-as int (when (not (-> self player-got-eco?))
(set! (-> self player-got-eco?) #t)
(let
((a1-5
(new 'stack-no-clear 'event-message-block)
)
)
)
((= v1-0 'trigger)
(the-as int (when (not (-> self player-got-eco?))
(set! (-> self player-got-eco?) #t)
(let
((a1-5
(new 'stack-no-clear 'event-message-block)
)
)
(set! (-> a1-5 from) self)
(set! (-> a1-5 num-params) 0)
(set! (-> a1-5 message) 'white-eco-picked-up)
(the-as
int
(send-event-function
(ppointer->process (-> self parent))
a1-5
)
)
)
)
(set! (-> a1-5 from) self)
(set! (-> a1-5 num-params) 0)
(set! (-> a1-5 message) 'white-eco-picked-up)
(the-as
int
(send-event-function
(ppointer->process (-> self parent))
a1-5
)
)
)
((= v1-0 'beam-off)
(the-as int (go light-eco-mother-discipate))
)
)
)
)
)
)
)
((= v1-0 'beam-off)
(the-as int (go light-eco-mother-discipate))
)
)
)
)
)
@@ -1202,6 +1198,7 @@
)
;; definition for function light-eco-mother-init-by-other
;; INFO: Return type mismatch object vs none.
;; Used lq/sq
(defbehavior
light-eco-mother-init-by-other light-eco-mother
@@ -469,6 +469,7 @@
)
;; definition for method 11 of type ecoclaw
;; INFO: Return type mismatch object vs none.
(defmethod copy-defaults! ecoclaw ((obj ecoclaw) (arg0 res-lump))
(set! (-> obj root) (new 'process 'trsqv))
(process-drawable-from-entity! obj arg0)
@@ -527,18 +528,15 @@
:virtual #t
:event
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(let ((v1-0 arg2))
(the-as object (cond
((= v1-0 'open)
(let ((f0-0 (the-as float (-> arg3 param 0))))
(set! (-> self part-opened) f0-0)
f0-0
)
)
((= v1-0 'hide)
(go-virtual hidden)
)
)
(case arg2
(('open)
(let ((f0-0 (the-as float (-> arg3 param 0))))
(set! (-> self part-opened) f0-0)
f0-0
)
)
(('hide)
(go-virtual hidden)
)
)
)
@@ -625,6 +623,7 @@
)
;; definition for method 11 of type silodoor
;; INFO: Return type mismatch object vs none.
(defmethod copy-defaults! silodoor ((obj silodoor) (arg0 res-lump))
(let
((s4-0
@@ -897,6 +896,7 @@
)
;; definition for function finalbosscam-init-by-other
;; INFO: Return type mismatch object vs none.
(defbehavior finalbosscam-init-by-other finalbosscam ((arg0 entity))
(set! (-> self entity) arg0)
(dummy-40 self arg0 *finalbosscam-sg* 4 4 (new 'static 'vector :w 4096.0) 4)
@@ -406,19 +406,18 @@
)
;; definition for function darkecobomb-handler
;; INFO: Return type mismatch none vs object.
(defbehavior
darkecobomb-handler darkecobomb
((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(let ((v1-0 arg2))
(the-as object (if (or (= v1-0 'touch) (= v1-0 'attack))
(go darkecobomb-explode #t)
)
)
(case arg2
(('touch 'attack)
(go darkecobomb-explode #t)
)
)
)
;; definition for function darkecobomb-explode-if-player-high-enough
;; INFO: Return type mismatch object vs none.
(defbehavior darkecobomb-explode-if-player-high-enough darkecobomb ()
(if
(and
@@ -836,6 +835,7 @@
)
;; definition for function darkecobomb-init-by-other
;; INFO: Return type mismatch object vs none.
;; Used lq/sq
(defbehavior
darkecobomb-init-by-other darkecobomb
@@ -1016,6 +1016,7 @@
)
;; definition for function greenshot-init-by-other
;; INFO: Return type mismatch object vs none.
;; Used lq/sq
(defbehavior
greenshot-init-by-other greenshot
@@ -1292,15 +1293,13 @@
)
;; definition for function redshot-handler
;; INFO: Return type mismatch none vs object.
(defbehavior
redshot-handler redshot
((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(let ((v1-0 arg2))
(the-as object (if (or (= v1-0 'attack) (= v1-0 'touch))
(go redshot-explode)
)
)
(case arg2
(('attack 'touch)
(go redshot-explode)
)
)
)
@@ -1383,6 +1382,7 @@
)
;; definition for function redshot-init-by-other
;; INFO: Return type mismatch object vs none.
;; Used lq/sq
(defbehavior
redshot-init-by-other redshot
@@ -1537,6 +1537,7 @@
)
;; definition for function yellowshot-init-by-other
;; INFO: Return type mismatch object vs none.
;; Used lq/sq
(defbehavior
yellowshot-init-by-other yellowshot
@@ -5706,6 +5706,7 @@
)
;; definition for method 11 of type robotboss
;; INFO: Return type mismatch object vs none.
;; Used lq/sq
(defmethod copy-defaults! robotboss ((obj robotboss) (arg0 res-lump))
(stack-size-set! (-> obj main-thread) 512)
@@ -509,6 +509,7 @@
)
;; definition for method 11 of type flutflut
;; INFO: Return type mismatch object vs none.
(defmethod copy-defaults! flutflut ((obj flutflut) (arg0 res-lump))
(let
((s4-0
+50 -58
View File
@@ -46,64 +46,55 @@
(defstate bouncer-wait (springbox)
:event
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(let ((v1-0 arg2))
(the-as object (cond
((= v1-0 'bonk)
(let ((a1-3 (new 'stack-no-clear 'event-message-block)))
(set! (-> a1-3 from) self)
(set! (-> a1-3 num-params) 3)
(set! (-> a1-3 message) 'jump)
(set!
(-> a1-3 param 0)
(the-as uint (-> self spring-height))
)
(set!
(-> a1-3 param 1)
(the-as uint (-> self spring-height))
)
(set! (-> a1-3 param 2) (the-as uint #f))
(when (send-event-function arg0 a1-3)
(sound-play-by-name
(static-sound-name "trampoline")
(new-sound-id)
1024
0
0
(the-as uint 1)
(the-as vector #t)
)
(go bouncer-fire)
)
)
)
((= v1-0 'touch)
(if
(not
(or
(= (-> self next-state name) 'bouncer-smush)
(= (-> self next-state name) 'bouncer-fire)
)
)
(go bouncer-smush)
)
)
((= v1-0 'attack)
(when
(and
(= (-> arg3 param 1) 'flop)
(send-event
arg0
'jump
(-> self spring-height)
(-> self spring-height)
#f
)
)
(go bouncer-fire)
#f
)
)
)
(case arg2
(('bonk)
(let ((a1-3 (new 'stack-no-clear 'event-message-block)))
(set! (-> a1-3 from) self)
(set! (-> a1-3 num-params) 3)
(set! (-> a1-3 message) 'jump)
(set! (-> a1-3 param 0) (the-as uint (-> self spring-height)))
(set! (-> a1-3 param 1) (the-as uint (-> self spring-height)))
(set! (-> a1-3 param 2) (the-as uint #f))
(when (send-event-function arg0 a1-3)
(sound-play-by-name
(static-sound-name "trampoline")
(new-sound-id)
1024
0
0
(the-as uint 1)
(the-as vector #t)
)
(go bouncer-fire)
)
)
)
(('touch)
(if
(not
(or
(= (-> self next-state name) 'bouncer-smush)
(= (-> self next-state name) 'bouncer-fire)
)
)
(go bouncer-smush)
)
)
(('attack)
(when
(and
(= (-> arg3 param 1) 'flop)
(send-event
arg0
'jump
(-> self spring-height)
(-> self spring-height)
#f
)
)
(go bouncer-fire)
#f
)
)
)
)
@@ -245,6 +236,7 @@
)
;; definition for method 11 of type springbox
;; INFO: Return type mismatch object vs none.
(defmethod copy-defaults! springbox ((obj springbox) (arg0 res-lump))
(let
((s4-0
+30 -38
View File
@@ -1447,6 +1447,7 @@
)
;; definition for function fisher-fish-init-by-other
;; INFO: Return type mismatch object vs none.
(defbehavior
fisher-fish-init-by-other fisher-fish
((arg0 symbol) (arg1 float) (arg2 float))
@@ -2255,44 +2256,35 @@
(defstate fisher-playing (fisher)
:event
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(local-vars (v0-2 none))
(let ((v1-0 arg2))
(the-as object (cond
((= v1-0 'fisher-fish-die)
(sound-play-by-name
(static-sound-name "fish-miss")
(new-sound-id)
1024
0
0
(the-as uint 1)
(the-as vector #t)
)
(set!
v0-2
(the-as none (+ (-> self missed) (-> arg3 param 0)))
)
(set! (-> self missed) (the-as int v0-2))
v0-2
)
((= v1-0 'fisher-fish-caught)
(send-event *target* 'bounce)
(set!
v0-2
(the-as none (+ (-> self caught) (-> arg3 param 0)))
)
(set! (-> self caught) (the-as int v0-2))
v0-2
)
((= v1-0 'deadly)
(go fisher-done)
)
((= v1-0 'bad)
(set! v0-2 (the-as none (seekl (-> self caught) 0 10)))
(set! (-> self caught) (the-as int v0-2))
v0-2
)
)
(local-vars (v0-2 object))
(case arg2
(('fisher-fish-die)
(sound-play-by-name
(static-sound-name "fish-miss")
(new-sound-id)
1024
0
0
(the-as uint 1)
(the-as vector #t)
)
(set! v0-2 (+ (-> self missed) (-> arg3 param 0)))
(set! (-> self missed) (the-as int v0-2))
v0-2
)
(('fisher-fish-caught)
(send-event *target* 'bounce)
(set! v0-2 (+ (-> self caught) (-> arg3 param 0)))
(set! (-> self caught) (the-as int v0-2))
v0-2
)
(('deadly)
(go fisher-done)
)
(('bad)
(set! v0-2 (seekl (-> self caught) 0 10))
(set! (-> self caught) (the-as int v0-2))
v0-2
)
)
)
@@ -619,6 +619,7 @@ nav-enemy-default-event-handler
)
;; definition for method 11 of type junglefish
;; INFO: Return type mismatch object vs none.
(defmethod copy-defaults! junglefish ((obj junglefish) (arg0 res-lump))
(let
((s4-0
+13 -18
View File
@@ -54,25 +54,19 @@
)
;; definition for method 43 of type aphid
;; INFO: Return type mismatch none vs object.
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code?
(defmethod dummy-43 aphid ((obj aphid) (arg0 process) (arg1 event-message-block))
(the-as object (cond
((or
(logtest? (-> obj nav-enemy-flags) 32)
(= arg0 (ppointer->process (-> obj parent)))
)
(send-event arg0 'get-attack-count 1)
(logclear!
(-> obj mask)
(process-mask actor-pause attackable)
)
(go (method-of-object obj nav-enemy-die))
)
(else
(dummy-44 obj arg0 arg1)
)
)
(cond
((or
(logtest? (-> obj nav-enemy-flags) 32)
(= arg0 (ppointer->process (-> obj parent)))
)
(send-event arg0 'get-attack-count 1)
(logclear! (-> obj mask) (process-mask actor-pause attackable))
(go (method-of-object obj nav-enemy-die))
)
(else
(dummy-44 obj arg0 arg1)
)
)
)
@@ -647,6 +641,7 @@
)
;; definition for function aphid-init-by-other
;; INFO: Return type mismatch object vs none.
;; Used lq/sq
(defbehavior
aphid-init-by-other aphid
@@ -225,6 +225,7 @@
)
;; definition for method 11 of type plat-flip
;; INFO: Return type mismatch object vs none.
;; Used lq/sq
(defmethod copy-defaults! plat-flip ((obj plat-flip) (arg0 res-lump))
(local-vars (sv-16 res-tag) (sv-32 res-tag) (sv-48 res-tag))
+14 -15
View File
@@ -272,33 +272,30 @@
)
;; definition for method 44 of type baby-spider
;; INFO: Return type mismatch none vs object.
(defmethod
dummy-44
baby-spider
((obj baby-spider) (arg0 process) (arg1 event-message-block))
(the-as
object
(when
((method-of-type touching-shapes-entry prims-touching?)
(when
((method-of-type touching-shapes-entry prims-touching?)
(the-as touching-shapes-entry (-> arg1 param 0))
(-> obj collide-info)
(the-as uint 1)
)
(if
(nav-enemy-send-attack
arg0
(the-as touching-shapes-entry (-> arg1 param 0))
(-> obj collide-info)
(the-as uint 1)
)
(if
(nav-enemy-send-attack
arg0
(the-as touching-shapes-entry (-> arg1 param 0))
'generic
)
(go (method-of-object obj nav-enemy-victory))
'generic
)
(go (method-of-object obj nav-enemy-victory))
)
)
)
;; definition for function baby-spider-default-event-handler
;; INFO: Return type mismatch none vs object.
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code?
(defbehavior
baby-spider-default-event-handler baby-spider
((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
@@ -1213,6 +1210,7 @@ baby-spider-default-event-handler
)
;; definition for function baby-spider-init-by-other
;; INFO: Return type mismatch object vs none.
;; Used lq/sq
(defbehavior
baby-spider-init-by-other baby-spider
@@ -1264,6 +1262,7 @@ baby-spider-default-event-handler
)
;; definition for method 11 of type baby-spider
;; INFO: Return type mismatch object vs none.
(defmethod copy-defaults! baby-spider ((obj baby-spider) (arg0 res-lump))
(set! (-> obj die-if-not-visible?) #f)
(set! (-> obj delay-before-dying-if-not-visible) 600)
+54 -67
View File
@@ -74,76 +74,62 @@
)
;; definition for function spiderwebs-default-event-handler
;; INFO: Return type mismatch none vs object.
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code?
(defbehavior
spiderwebs-default-event-handler spiderwebs
((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(let ((v1-0 arg2))
(the-as object (cond
((= v1-0 'bonk)
(let ((a1-1 (new 'stack-no-clear 'event-message-block)))
(set! (-> a1-1 from) self)
(set! (-> a1-1 num-params) 3)
(set! (-> a1-1 message) 'jump)
(set!
(-> a1-1 param 0)
(the-as uint (-> self spring-height))
)
(set!
(-> a1-1 param 1)
(the-as uint (-> self spring-height))
)
(set! (-> a1-1 param 2) (the-as uint *spider-jump-mods*))
(if (send-event-function arg0 a1-1)
(go spiderwebs-bounce)
)
)
)
((= v1-0 'touch)
(when (= (-> arg0 type) target)
(let* ((a0-8 (target-pos 0))
(f1-1 (- (-> a0-8 y) (-> self root trans y)))
)
(if
(and
(>= 2048.0 (fabs f1-1))
(and
(>=
13516.8
(vector-vector-distance a0-8 (-> self root trans))
)
(send-event
arg0
'jump
(-> self spring-height)
(-> self spring-height)
*spider-jump-mods*
)
)
)
(go spiderwebs-bounce)
)
)
)
)
((= v1-0 'attack)
(if
(and
(= (-> arg3 param 1) 'flop)
(send-event
arg0
'jump
(-> self spring-height)
(-> self spring-height)
*spider-jump-mods*
)
)
(go spiderwebs-bounce)
)
#f
)
)
(case arg2
(('bonk)
(let ((a1-1 (new 'stack-no-clear 'event-message-block)))
(set! (-> a1-1 from) self)
(set! (-> a1-1 num-params) 3)
(set! (-> a1-1 message) 'jump)
(set! (-> a1-1 param 0) (the-as uint (-> self spring-height)))
(set! (-> a1-1 param 1) (the-as uint (-> self spring-height)))
(set! (-> a1-1 param 2) (the-as uint *spider-jump-mods*))
(if (send-event-function arg0 a1-1)
(go spiderwebs-bounce)
)
)
)
(('touch)
(when (= (-> arg0 type) target)
(let* ((a0-8 (target-pos 0))
(f1-1 (- (-> a0-8 y) (-> self root trans y)))
)
(if
(and
(>= 2048.0 (fabs f1-1))
(and
(>= 13516.8 (vector-vector-distance a0-8 (-> self root trans)))
(send-event
arg0
'jump
(-> self spring-height)
(-> self spring-height)
*spider-jump-mods*
)
)
)
(go spiderwebs-bounce)
)
)
)
)
(('attack)
(if
(and
(= (-> arg3 param 1) 'flop)
(send-event
arg0
'jump
(-> self spring-height)
(-> self spring-height)
*spider-jump-mods*
)
)
(go spiderwebs-bounce)
)
#f
)
)
)
@@ -264,6 +250,7 @@
)
;; definition for method 11 of type spiderwebs
;; INFO: Return type mismatch object vs none.
(defmethod copy-defaults! spiderwebs ((obj spiderwebs) (arg0 res-lump))
(set! (-> obj mask) (logior (process-mask platform) (-> obj mask)))
(let
@@ -301,11 +301,10 @@
(defstate keg-on-paddle (keg)
:event
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(let ((v1-0 arg2))
(the-as object (if (= v1-0 'detach)
(go keg-paddle-to-path)
)
)
(case arg2
(('detach)
(go keg-paddle-to-path)
)
)
)
:code
@@ -690,6 +689,7 @@
)
;; definition for function keg-init-by-other
;; INFO: Return type mismatch object vs none.
;; Used lq/sq
(defbehavior keg-init-by-other keg ((arg0 keg) (arg1 int))
(stack-size-set! (-> self main-thread) 512)
@@ -944,6 +944,7 @@
)
;; definition for function keg-conveyor-paddle-init-by-other
;; INFO: Return type mismatch object vs none.
;; Used lq/sq
(defbehavior
keg-conveyor-paddle-init-by-other keg-conveyor-paddle
@@ -1017,6 +1018,7 @@
)
;; definition for method 11 of type keg-conveyor
;; INFO: Return type mismatch object vs none.
;; WARN: Expression building failed: Function (method 11 keg-conveyor) has a return type of none, but the expression builder found a return statement.
;; Used lq/sq
(defmethod copy-defaults! keg-conveyor ((obj keg-conveyor) (arg0 res-lump))
@@ -75,34 +75,29 @@
(defstate teetertotter-idle (teetertotter)
:event
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(let ((v1-0 arg2))
(the-as object (cond
((= v1-0 'attack)
(case (-> arg3 param 1)
(('flop)
(when (target-on-end-of-teetertotter? self)
(set! (-> self in-launch-window) #f)
(increment-success-for-hint
(the-as level-hint-control 676)
)
(go teetertotter-launch)
)
)
)
)
((= v1-0 'bonk)
(when (target-on-end-of-teetertotter? self)
(level-hint-spawn
(game-text-id misty-teetertotter-bonk-dax-tutorial)
"sksp0070"
(the-as entity #f)
*entity-pool*
(game-task none)
)
(go teetertotter-bend)
)
)
)
(case arg2
(('attack)
(case (-> arg3 param 1)
(('flop)
(when (target-on-end-of-teetertotter? self)
(set! (-> self in-launch-window) #f)
(increment-success-for-hint (the-as level-hint-control 676))
(go teetertotter-launch)
)
)
)
)
(('bonk)
(when (target-on-end-of-teetertotter? self)
(level-hint-spawn
(game-text-id misty-teetertotter-bonk-dax-tutorial)
"sksp0070"
(the-as entity #f)
*entity-pool*
(game-task none)
)
(go teetertotter-bend)
)
)
)
)
@@ -299,6 +294,7 @@
)
;; definition for method 11 of type teetertotter
;; INFO: Return type mismatch object vs none.
(defmethod copy-defaults! teetertotter ((obj teetertotter) (arg0 res-lump))
(let
((s4-0
@@ -44,15 +44,12 @@
(defstate silostep-idle (silostep)
:event
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(let ((v1-0 arg2))
(the-as object (cond
((= v1-0 'trigger)
(go silostep-camera)
)
((= v1-0 'trigger-rise)
(go silostep-rise #f)
)
)
(case arg2
(('trigger)
(go silostep-camera)
)
(('trigger-rise)
(go silostep-rise #f)
)
)
)
@@ -216,6 +213,7 @@
)
;; definition for method 11 of type silostep
;; INFO: Return type mismatch object vs none.
(defmethod copy-defaults! silostep ((obj silostep) (arg0 res-lump))
(logior! (-> obj mask) (process-mask movie-subject))
(let
+3 -4
View File
@@ -258,15 +258,13 @@
)
;; definition for method 44 of type muse
;; INFO: Return type mismatch none vs object.
(defmethod dummy-44 muse ((obj muse) (arg0 process) (arg1 event-message-block))
(the-as object (go muse-caught))
(go muse-caught)
)
;; definition for method 43 of type muse
;; INFO: Return type mismatch none vs object.
(defmethod dummy-43 muse ((obj muse) (arg0 process) (arg1 event-message-block))
(the-as object (go muse-caught))
(go muse-caught)
)
;; failed to figure out what this is:
@@ -917,6 +915,7 @@ nav-enemy-default-event-handler
)
;; definition for method 11 of type muse
;; INFO: Return type mismatch object vs none.
;; Used lq/sq
(defmethod copy-defaults! muse ((obj muse) (arg0 res-lump))
(stack-size-set! (-> obj main-thread) 512)
+158 -165
View File
@@ -506,12 +506,11 @@
(defstate plunger-lurker-idle (plunger-lurker)
:event
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(let ((v1-0 arg2))
(the-as object (when (= v1-0 'plunge)
(logclear! (-> self mask) (process-mask actor-pause))
(go plunger-lurker-plunge)
)
)
(case arg2
(('plunge)
(logclear! (-> self mask) (process-mask actor-pause))
(go plunger-lurker-plunge)
)
)
)
:trans
@@ -596,6 +595,7 @@
)
;; definition for method 11 of type plunger-lurker
;; INFO: Return type mismatch object vs none.
(defmethod copy-defaults! plunger-lurker ((obj plunger-lurker) (arg0 res-lump))
(stack-size-set! (-> obj main-thread) 512)
(let
@@ -1287,98 +1287,93 @@
)
;; definition for function flying-lurker-handler
;; INFO: Return type mismatch none vs object.
(defbehavior
flying-lurker-handler flying-lurker
((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(let ((v1-0 arg2))
(the-as object (when (= v1-0 'fly-away)
(when (-> self link next)
(entity-birth-no-kill (-> self link next))
(let ((a1-1 (new 'stack-no-clear 'event-message-block)))
(set! (-> a1-1 from) self)
(set! (-> a1-1 num-params) 2)
(set! (-> a1-1 message) 'fly-away)
(set!
(-> a1-1 param 0)
(the-as uint (/ (the-as int (-> arg3 param 0)) 16))
)
(set! (-> a1-1 param 1) (-> arg3 param 1))
(let ((t9-1 send-event-function)
(v1-11 (-> self link next))
)
(t9-1 (if v1-11
(-> v1-11 extra process)
)
a1-1
)
)
)
)
(let* ((v1-14 (-> arg3 param 0))
(a0-4 (-> arg3 param 1))
(v1-15 (logand v1-14 3))
)
(set! (-> self rank) (the-as int v1-15))
(cond
((< 15 (the-as int a0-4))
(cond
((zero? v1-15)
(set! (-> self race-seconds) 33000.0)
)
((= v1-15 1)
(set! (-> self race-seconds) 34500.0)
)
(else
(set! (-> self race-seconds) 36000.0)
)
)
)
((< 10 (the-as int a0-4))
(cond
((zero? v1-15)
(set! (-> self race-seconds) 31800.0)
)
((= v1-15 1)
(set! (-> self race-seconds) 33300.0)
)
(else
(set! (-> self race-seconds) 34800.0)
)
)
)
((< 5 (the-as int a0-4))
(cond
((zero? v1-15)
(set! (-> self race-seconds) 30600.0)
)
((= v1-15 1)
(set! (-> self race-seconds) 32100.0)
)
(else
(set! (-> self race-seconds) 33600.0)
)
)
)
((zero? v1-15)
(set! (-> self race-seconds) 30000.0)
)
((= v1-15 1)
(set! (-> self race-seconds) 31500.0)
)
(else
(set! (-> self race-seconds) 33000.0)
)
)
)
(logclear! (-> self mask) (process-mask actor-pause))
(set!
(-> self race-start-time)
(-> *display* game-frame-counter)
)
(go flying-lurker-fly)
)
)
(case arg2
(('fly-away)
(when (-> self link next)
(entity-birth-no-kill (-> self link next))
(let ((a1-1 (new 'stack-no-clear 'event-message-block)))
(set! (-> a1-1 from) self)
(set! (-> a1-1 num-params) 2)
(set! (-> a1-1 message) 'fly-away)
(set!
(-> a1-1 param 0)
(the-as uint (/ (the-as int (-> arg3 param 0)) 16))
)
(set! (-> a1-1 param 1) (-> arg3 param 1))
(let ((t9-1 send-event-function)
(v1-11 (-> self link next))
)
(t9-1 (if v1-11
(-> v1-11 extra process)
)
a1-1
)
)
)
)
(let* ((v1-14 (-> arg3 param 0))
(a0-4 (-> arg3 param 1))
(v1-15 (logand v1-14 3))
)
(set! (-> self rank) (the-as int v1-15))
(cond
((< 15 (the-as int a0-4))
(cond
((zero? v1-15)
(set! (-> self race-seconds) 33000.0)
)
((= v1-15 1)
(set! (-> self race-seconds) 34500.0)
)
(else
(set! (-> self race-seconds) 36000.0)
)
)
)
((< 10 (the-as int a0-4))
(cond
((zero? v1-15)
(set! (-> self race-seconds) 31800.0)
)
((= v1-15 1)
(set! (-> self race-seconds) 33300.0)
)
(else
(set! (-> self race-seconds) 34800.0)
)
)
)
((< 5 (the-as int a0-4))
(cond
((zero? v1-15)
(set! (-> self race-seconds) 30600.0)
)
((= v1-15 1)
(set! (-> self race-seconds) 32100.0)
)
(else
(set! (-> self race-seconds) 33600.0)
)
)
)
((zero? v1-15)
(set! (-> self race-seconds) 30000.0)
)
((= v1-15 1)
(set! (-> self race-seconds) 31500.0)
)
(else
(set! (-> self race-seconds) 33000.0)
)
)
)
(logclear! (-> self mask) (process-mask actor-pause))
(set! (-> self race-start-time) (-> *display* game-frame-counter))
(go flying-lurker-fly)
)
)
)
@@ -1686,76 +1681,73 @@
(defstate flying-lurker-idle (flying-lurker)
:event
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(let ((v1-0 arg2))
(the-as object (cond
((= v1-0 'saw-player)
(set! (-> self take-off) #t)
(when (-> self link prev)
(entity-birth-no-kill (-> self link prev))
(let ((a1-1 (new 'stack-no-clear 'event-message-block)))
(set! (-> a1-1 from) arg0)
(set! (-> a1-1 num-params) arg1)
(set! (-> a1-1 message) arg2)
(set! (-> a1-1 param 0) (-> arg3 param 0))
(set! (-> a1-1 param 1) (-> arg3 param 1))
(set! (-> a1-1 param 2) (-> arg3 param 2))
(set! (-> a1-1 param 3) (-> arg3 param 3))
(set! (-> a1-1 param 4) (-> arg3 param 4))
(set! (-> a1-1 param 5) (-> arg3 param 5))
(set! (-> a1-1 param 6) (-> arg3 param 6))
(let ((t9-1 send-event-function)
(v1-13 (-> self link prev))
)
(t9-1 (if v1-13
(-> v1-13 extra process)
)
a1-1
)
)
)
)
)
((= v1-0 'clone)
(when (-> self link next)
(entity-birth-no-kill (-> self link next))
(let ((a1-2 (new 'stack-no-clear 'event-message-block)))
(set! (-> a1-2 from) self)
(set! (-> a1-2 num-params) 2)
(set! (-> a1-2 message) 'clone)
(set! (-> a1-2 param 0) (-> arg3 param 0))
(set! (-> a1-2 param 1) (+ (-> arg3 param 1) -1))
(let ((t9-3 send-event-function)
(v1-25 (-> self link next))
)
(t9-3 (if v1-25
(-> v1-25 extra process)
)
a1-2
)
)
)
)
(case (-> arg3 param 1)
((2)
(go
flying-lurker-clone
(the-as handle (-> arg3 param 0))
"flying-lurker-b-"
)
)
((1)
(go
flying-lurker-clone
(the-as handle (-> arg3 param 0))
"flying-lurker-c-"
)
)
)
)
(else
(flying-lurker-handler arg0 arg1 arg2 arg3)
)
)
(case arg2
(('saw-player)
(set! (-> self take-off) #t)
(when (-> self link prev)
(entity-birth-no-kill (-> self link prev))
(let ((a1-1 (new 'stack-no-clear 'event-message-block)))
(set! (-> a1-1 from) arg0)
(set! (-> a1-1 num-params) arg1)
(set! (-> a1-1 message) arg2)
(set! (-> a1-1 param 0) (-> arg3 param 0))
(set! (-> a1-1 param 1) (-> arg3 param 1))
(set! (-> a1-1 param 2) (-> arg3 param 2))
(set! (-> a1-1 param 3) (-> arg3 param 3))
(set! (-> a1-1 param 4) (-> arg3 param 4))
(set! (-> a1-1 param 5) (-> arg3 param 5))
(set! (-> a1-1 param 6) (-> arg3 param 6))
(let ((t9-1 send-event-function)
(v1-13 (-> self link prev))
)
(t9-1 (if v1-13
(-> v1-13 extra process)
)
a1-1
)
)
)
)
)
(('clone)
(when (-> self link next)
(entity-birth-no-kill (-> self link next))
(let ((a1-2 (new 'stack-no-clear 'event-message-block)))
(set! (-> a1-2 from) self)
(set! (-> a1-2 num-params) 2)
(set! (-> a1-2 message) 'clone)
(set! (-> a1-2 param 0) (-> arg3 param 0))
(set! (-> a1-2 param 1) (+ (-> arg3 param 1) -1))
(let ((t9-3 send-event-function)
(v1-25 (-> self link next))
)
(t9-3 (if v1-25
(-> v1-25 extra process)
)
a1-2
)
)
)
)
(case (-> arg3 param 1)
((2)
(go
flying-lurker-clone
(the-as handle (-> arg3 param 0))
"flying-lurker-b-"
)
)
((1)
(go
flying-lurker-clone
(the-as handle (-> arg3 param 0))
"flying-lurker-c-"
)
)
)
)
(else
(flying-lurker-handler arg0 arg1 arg2 arg3)
)
)
)
@@ -1899,6 +1891,7 @@
)
;; definition for method 11 of type flying-lurker
;; INFO: Return type mismatch object vs none.
;; Used lq/sq
(defmethod copy-defaults! flying-lurker ((obj flying-lurker) (arg0 res-lump))
(stack-size-set! (-> obj main-thread) 512)
+17 -16
View File
@@ -61,22 +61,23 @@
(defstate target-snowball-start (target)
:event
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(the-as object (cond
((and (= arg2 'query) (= (-> arg3 param 0) 'mode))
'snowball
)
((let ((v1-3 arg2))
(= v1-3 'end-mode)
)
enter-state
(-> *TARGET-bank* duck-jump-height-min)
(-> *TARGET-bank* duck-jump-height-max)
(go target-jump)
)
(else
(target-generic-event-handler arg0 arg1 arg2 arg3)
)
)
(cond
((and (= arg2 'query) (= (-> arg3 param 0) 'mode))
'snowball
)
((let ((v1-3 arg2))
(= v1-3 'end-mode)
)
(go
target-jump
(-> *TARGET-bank* duck-jump-height-min)
(-> *TARGET-bank* duck-jump-height-max)
#f
)
)
(else
(target-generic-event-handler arg0 arg1 arg2 arg3)
)
)
)
:exit
+13 -16
View File
@@ -260,25 +260,20 @@
)
;; definition for function yeti-slave-default-event-handler
;; INFO: Return type mismatch none vs object.
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code?
(defbehavior
yeti-slave-default-event-handler yeti-slave
((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(let ((v1-0 arg2))
(the-as object (cond
((= v1-0 'attack)
(nav-enemy-set-hit-from-direction arg0)
(go-virtual nav-enemy-die)
)
((= v1-0 'touch)
(nav-enemy-send-attack
arg0
(the-as touching-shapes-entry (-> arg3 param 0))
'generic
)
)
)
(case arg2
(('attack)
(nav-enemy-set-hit-from-direction arg0)
(go-virtual nav-enemy-die)
)
(('touch)
(nav-enemy-send-attack
arg0
(the-as touching-shapes-entry (-> arg3 param 0))
'generic
)
)
)
)
@@ -1234,6 +1229,7 @@
)
;; definition for function yeti-slave-init-by-other
;; INFO: Return type mismatch object vs none.
;; Used lq/sq
(defbehavior
yeti-slave-init-by-other yeti-slave
@@ -1463,6 +1459,7 @@
)
;; definition for method 11 of type yeti
;; INFO: Return type mismatch object vs none.
(defmethod copy-defaults! yeti ((obj yeti) (arg0 res-lump))
(set! (-> obj spawn-delay) 0)
(set! (-> obj root) (new 'process 'trsqv))
+53 -58
View File
@@ -160,11 +160,10 @@
(defstate qbert-plat-on-mimic (qbert-plat)
:event
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(let ((v1-0 arg2))
(the-as object (if (= v1-0 'die)
(go qbert-plat-on-die)
)
)
(case arg2
(('die)
(go qbert-plat-on-die)
)
)
)
:code
@@ -203,6 +202,7 @@
)
;; definition for function qbert-plat-on-init-by-other
;; INFO: Return type mismatch object vs none.
;; Used lq/sq
(defbehavior
qbert-plat-on-init-by-other qbert-plat
@@ -529,6 +529,7 @@
)
;; definition for method 11 of type qbert-plat
;; INFO: Return type mismatch object vs none.
(defmethod copy-defaults! qbert-plat ((obj qbert-plat) (arg0 res-lump))
(set! (-> obj mask) (logior (process-mask platform) (-> obj mask)))
(TODO-RENAME-30 obj)
@@ -550,59 +551,52 @@
(defstate qbert-plat-master-idle (qbert-plat-master)
:event
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(let ((v1-0 arg2))
(the-as object (when (= v1-0 'trigger)
(start-hint-timer (the-as level-hint-control 842))
(close-specific-task!
(game-task sunken-platforms)
(task-status need-hint)
)
(when (not (-> self puzzle-beaten?))
(let ((v1-2 (-> arg3 param 0)))
(when (!= v1-2 (-> self last-plat-triggered))
(set! (-> self last-plat-triggered) (the-as int v1-2))
(let
((s5-1
(=
(-> self plat-states-needed-to-open-door)
(-> self plat-states)
)
)
)
(let ((v1-3 (ash 1 v1-2)))
(set!
(-> self plat-states)
(logxor (-> self plat-states) (the-as uint v1-3))
)
(if (zero? (logand v1-3 (-> self plat-states)))
(level-hint-spawn
(game-text-id sunken-qbert-hint)
"sksp0130"
(the-as entity #f)
*entity-pool*
(game-task none)
)
)
)
(send-event arg0 'notify)
(let
((a0-13
(=
(-> self plat-states-needed-to-open-door)
(-> self plat-states)
)
)
)
(if (!= s5-1 a0-13)
(go qbert-plat-master-do-door a0-13)
)
)
)
)
)
)
)
)
(case arg2
(('trigger)
(start-hint-timer (the-as level-hint-control 842))
(close-specific-task!
(game-task sunken-platforms)
(task-status need-hint)
)
(when (not (-> self puzzle-beaten?))
(let ((v1-2 (-> arg3 param 0)))
(when (!= v1-2 (-> self last-plat-triggered))
(set! (-> self last-plat-triggered) (the-as int v1-2))
(let
((s5-1
(= (-> self plat-states-needed-to-open-door) (-> self plat-states))
)
)
(let ((v1-3 (ash 1 v1-2)))
(set!
(-> self plat-states)
(logxor (-> self plat-states) (the-as uint v1-3))
)
(if (zero? (logand v1-3 (-> self plat-states)))
(level-hint-spawn
(game-text-id sunken-qbert-hint)
"sksp0130"
(the-as entity #f)
*entity-pool*
(game-task none)
)
)
)
(send-event arg0 'notify)
(let
((a0-13
(= (-> self plat-states-needed-to-open-door) (-> self plat-states))
)
)
(if (!= s5-1 a0-13)
(go qbert-plat-master-do-door a0-13)
)
)
)
)
)
)
)
)
)
:code
@@ -958,6 +952,7 @@
)
;; definition for method 11 of type qbert-plat-master
;; INFO: Return type mismatch object vs none.
(defmethod
copy-defaults!
qbert-plat-master
@@ -403,20 +403,16 @@
(defstate square-platform-lowered (square-platform)
:event
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(let ((v1-0 arg2))
(the-as object (when (= v1-0 'trigger)
(if
(and
(= (-> arg0 type) square-platform-master)
(=
(-> (the-as square-platform-master arg0) plat-id)
(-> self plat-id)
)
)
(go square-platform-rising)
)
)
)
(case arg2
(('trigger)
(if
(and
(= (-> arg0 type) square-platform-master)
(= (-> (the-as square-platform-master arg0) plat-id) (-> self plat-id))
)
(go square-platform-rising)
)
)
)
)
:code
@@ -627,6 +623,7 @@
)
;; definition for method 11 of type square-platform
;; INFO: Return type mismatch object vs none.
;; Used lq/sq
(defmethod copy-defaults! square-platform ((obj square-platform) (arg0 res-lump))
(local-vars (sv-16 res-tag) (sv-32 res-tag))
@@ -728,19 +725,18 @@
(defstate square-platform-master-idle (square-platform-master)
:event
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(let ((v1-0 arg2))
(the-as object (when (= v1-0 'trigger)
(when (= (-> arg0 type) square-platform-button)
(set!
(-> self button-id)
(-> (the-as square-platform-button arg0) button-id)
)
(logclear! (-> self mask) (process-mask actor-pause))
(process-entity-status! self (entity-perm-status bit-3) #t)
(go square-platform-master-activate)
)
)
)
(case arg2
(('trigger)
(when (= (-> arg0 type) square-platform-button)
(set!
(-> self button-id)
(-> (the-as square-platform-button arg0) button-id)
)
(logclear! (-> self mask) (process-mask actor-pause))
(process-entity-status! self (entity-perm-status bit-3) #t)
(go square-platform-master-activate)
)
)
)
)
:code
@@ -956,6 +952,7 @@
)
;; definition for method 11 of type square-platform-master
;; INFO: Return type mismatch object vs none.
(defmethod
copy-defaults!
square-platform-master
+2 -4
View File
@@ -587,6 +587,7 @@
)
;; definition for function sunkenfisha-init-by-other
;; INFO: Return type mismatch object vs none.
(defbehavior sunkenfisha-init-by-other sunkenfisha ((arg0 entity))
(set! (-> self entity) arg0)
(TODO-RENAME-26 self)
@@ -596,6 +597,7 @@
)
;; definition for method 11 of type sunkenfisha
;; INFO: Return type mismatch object vs none.
(defmethod copy-defaults! sunkenfisha ((obj sunkenfisha) (arg0 res-lump))
(TODO-RENAME-26 obj)
(TODO-RENAME-27 obj)
@@ -634,7 +636,3 @@
(go sunkenfisha-idle)
(none)
)
+9 -10
View File
@@ -51,11 +51,10 @@
(defstate wall-plat-retracted (wall-plat)
:event
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(let ((v1-0 arg2))
(the-as object (if (= v1-0 'trigger)
(go wall-plat-extending)
)
)
(case arg2
(('trigger)
(go wall-plat-extending)
)
)
)
:code
@@ -136,11 +135,10 @@
(defstate wall-plat-extended (wall-plat)
:event
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(let ((v1-0 arg2))
(the-as object (if (= v1-0 'untrigger)
(go wall-plat-retracting)
)
)
(case arg2
(('untrigger)
(go wall-plat-retracting)
)
)
)
:code
@@ -284,6 +282,7 @@
)
;; definition for method 11 of type wall-plat
;; INFO: Return type mismatch object vs none.
(defmethod copy-defaults! wall-plat ((obj wall-plat) (arg0 res-lump))
(set! (-> obj extended-amount) 0.0)
(set! (-> obj mask) (logior (process-mask platform) (-> obj mask)))
@@ -76,6 +76,7 @@
)
;; definition for method 11 of type wedge-plat-master
;; INFO: Return type mismatch object vs none.
;; Used lq/sq
(defmethod
copy-defaults!
@@ -334,6 +335,7 @@
)
;; definition for method 11 of type wedge-plat
;; INFO: Return type mismatch object vs none.
(defmethod copy-defaults! wedge-plat ((obj wedge-plat) (arg0 res-lump))
(set! (-> obj mask) (logior (process-mask platform) (-> obj mask)))
(let
@@ -616,6 +618,7 @@
)
;; definition for method 11 of type wedge-plat-outer
;; INFO: Return type mismatch object vs none.
(defmethod
copy-defaults!
wedge-plat-outer
+21 -29
View File
@@ -139,38 +139,28 @@
)
;; definition for function swamp-bat-slave-event-handler
;; INFO: Return type mismatch none vs object.
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code?
(defbehavior
swamp-bat-slave-event-handler swamp-bat-slave
((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(let ((v1-0 arg2))
(the-as object (cond
((= v1-0 'attack)
(logclear! (-> self mask) (process-mask actor-pause))
(go swamp-bat-slave-die (process->handle arg0))
)
((= v1-0 'touch)
(level-hint-spawn
(game-text-id swamp-bats-hint)
"sksp0156"
(the-as entity #f)
*entity-pool*
(game-task none)
)
(send-event
arg0
'attack
(-> arg3 param 0)
(new 'static 'attack-info)
)
)
((= v1-0 'launch)
(if (-> self launch-ready)
(go swamp-bat-slave-launch)
)
)
)
(case arg2
(('attack)
(logclear! (-> self mask) (process-mask actor-pause))
(go swamp-bat-slave-die (process->handle arg0))
)
(('touch)
(level-hint-spawn
(game-text-id swamp-bats-hint)
"sksp0156"
(the-as entity #f)
*entity-pool*
(game-task none)
)
(send-event arg0 'attack (-> arg3 param 0) (new 'static 'attack-info))
)
(('launch)
(if (-> self launch-ready)
(go swamp-bat-slave-launch)
)
)
)
)
@@ -697,6 +687,7 @@ swamp-bat-slave-event-handler
)
;; definition for function swamp-bat-slave-init-by-other
;; INFO: Return type mismatch object vs none.
;; Used lq/sq
(defbehavior
swamp-bat-slave-init-by-other swamp-bat-slave
@@ -968,6 +959,7 @@ swamp-bat-slave-event-handler
)
;; definition for method 11 of type swamp-bat
;; INFO: Return type mismatch object vs none.
(defmethod copy-defaults! swamp-bat ((obj swamp-bat) (arg0 res-lump))
(let
((s4-0 (new 'process 'collide-shape obj (collide-list-enum hit-by-player))))
+47 -61
View File
@@ -941,59 +941,46 @@
)
;; definition for function swamp-rat-nest-dummy-event-handler
;; INFO: Return type mismatch none vs object.
(defbehavior
swamp-rat-nest-dummy-event-handler swamp-rat-nest-dummy
((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(let ((v1-0 arg2))
(the-as object (cond
((= v1-0 'shake)
(if (= (-> self next-state name) 'swamp-rat-nest-dummy-idle)
(go swamp-rat-nest-dummy-shake)
)
)
((= v1-0 'attack)
(send-event
(ppointer->process (-> self parent-process))
'hit
)
(let ((v1-7 (-> arg3 param 2)))
(when (!= v1-7 (-> self parent-process 0 player-attack-id))
(set!
(-> self parent-process 0 player-attack-id)
(the-as int v1-7)
)
(cond
((and (>= arg1 2) (= (-> arg3 param 1) 'eco-yellow))
(swamp-rat-nest-dummy-take-damage 3)
(if
(<
(vector-vector-distance
(target-pos 0)
(-> self top-sphere)
)
(-> self top-sphere w)
)
(send-event *target* 'no-look-around 75)
)
(go swamp-rat-nest-dummy-hit)
)
(else
(level-hint-spawn
(game-text-id swamp-rats-nest-hint)
"sksp0144"
(the-as entity #f)
*entity-pool*
(game-task none)
)
(swamp-rat-nest-dummy-take-damage 0)
(go swamp-rat-nest-dummy-hit)
)
)
)
)
)
)
(case arg2
(('shake)
(if (= (-> self next-state name) 'swamp-rat-nest-dummy-idle)
(go swamp-rat-nest-dummy-shake)
)
)
(('attack)
(send-event (ppointer->process (-> self parent-process)) 'hit)
(let ((v1-7 (-> arg3 param 2)))
(when (!= v1-7 (-> self parent-process 0 player-attack-id))
(set! (-> self parent-process 0 player-attack-id) (the-as int v1-7))
(cond
((and (>= arg1 2) (= (-> arg3 param 1) 'eco-yellow))
(swamp-rat-nest-dummy-take-damage 3)
(if
(<
(vector-vector-distance (target-pos 0) (-> self top-sphere))
(-> self top-sphere w)
)
(send-event *target* 'no-look-around 75)
)
(go swamp-rat-nest-dummy-hit)
)
(else
(level-hint-spawn
(game-text-id swamp-rats-nest-hint)
"sksp0144"
(the-as entity #f)
*entity-pool*
(game-task none)
)
(swamp-rat-nest-dummy-take-damage 0)
(go swamp-rat-nest-dummy-hit)
)
)
)
)
)
)
)
@@ -1222,6 +1209,7 @@
)
;; definition for function swamp-rat-nest-dummy-init-by-other
;; INFO: Return type mismatch object vs none.
;; Used lq/sq
(defbehavior
swamp-rat-nest-dummy-init-by-other swamp-rat-nest-dummy
@@ -1261,15 +1249,13 @@
)
;; definition for function swamp-rat-nest-default-event-handler
;; INFO: Return type mismatch none vs object.
(defbehavior
swamp-rat-nest-default-event-handler swamp-rat-nest
((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(let ((v1-0 arg2))
(the-as object (if (= v1-0 'victory)
(go swamp-rat-nest-victory)
)
)
(case arg2
(('victory)
(go swamp-rat-nest-victory)
)
)
)
@@ -1511,11 +1497,10 @@ swamp-rat-nest-default-event-handler
(defstate swamp-rat-nest-idle (swamp-rat-nest)
:event
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(let ((v1-0 arg2))
(the-as object (if (= v1-0 'hit)
(go swamp-rat-nest-active)
)
)
(case arg2
(('hit)
(go swamp-rat-nest-active)
)
)
)
:enter
@@ -1686,6 +1671,7 @@ swamp-rat-nest-default-event-handler
)
;; definition for method 11 of type swamp-rat-nest
;; INFO: Return type mismatch object vs none.
(defmethod copy-defaults! swamp-rat-nest ((obj swamp-rat-nest) (arg0 res-lump))
(set! (-> obj mask) (logior (process-mask enemy) (-> obj mask)))
(set! (-> obj root) (new 'process 'trsqv))
+19 -23
View File
@@ -65,37 +65,31 @@
)
;; definition for method 44 of type swamp-rat
;; INFO: Return type mismatch none vs object.
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code?
(defmethod
dummy-44
swamp-rat
((obj swamp-rat) (arg0 process) (arg1 event-message-block))
(the-as
object
(when
((method-of-type touching-shapes-entry prims-touching?)
(the-as touching-shapes-entry (-> arg1 param 0))
(-> obj collide-info)
(the-as uint 1)
)
(when
((method-of-type touching-shapes-entry prims-touching?)
(nav-enemy-send-attack
arg0
(the-as touching-shapes-entry (-> arg1 param 0))
(-> obj collide-info)
(the-as uint 1)
'generic
)
(when
(nav-enemy-send-attack
arg0
(the-as touching-shapes-entry (-> arg1 param 0))
'generic
)
(let* ((s5-1 (-> obj parent))
(a0-4
(if (and (nonzero? s5-1) (type-type? pointer process-drawable))
s5-1
)
)
(let* ((s5-1 (-> obj parent))
(a0-4 (if (and (nonzero? s5-1) (type-type? pointer process-drawable))
s5-1
)
)
(if a0-4
(send-event (the-as process a0-4) 'victory)
(go (method-of-object obj nav-enemy-victory))
)
)
(if a0-4
(send-event (the-as process a0-4) 'victory)
(go (method-of-object obj nav-enemy-victory))
)
)
)
@@ -104,6 +98,7 @@
;; definition for function swamp-rat-default-event-handler
;; INFO: Return type mismatch none vs object.
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code?
(defbehavior
swamp-rat-default-event-handler swamp-rat
((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
@@ -917,6 +912,7 @@ swamp-rat-default-event-handler
)
;; definition for function swamp-rat-init-by-other
;; INFO: Return type mismatch object vs none.
;; Used lq/sq
(defbehavior
swamp-rat-init-by-other swamp-rat
@@ -2188,6 +2188,7 @@
)
;; definition for method 11 of type fishermans-boat
;; INFO: Return type mismatch object vs none.
(defmethod copy-defaults! fishermans-boat ((obj fishermans-boat) (arg0 res-lump))
(stack-size-set! (-> obj main-thread) 512)
(set! (-> obj mask) (logior (process-mask platform) (-> obj mask)))
@@ -236,6 +236,7 @@
;; definition for function yakow-default-event-handler
;; INFO: Return type mismatch none vs object.
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code?
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code?
(defbehavior
yakow-default-event-handler yakow
((arg0 process-drawable) (arg1 int) (arg2 symbol) (arg3 event-message-block))
@@ -1467,6 +1468,7 @@ yakow-default-event-handler
)
;; definition for method 11 of type yakow
;; INFO: Return type mismatch object vs none.
;; Used lq/sq
(defmethod copy-defaults! yakow ((obj yakow) (arg0 res-lump))
(stack-size-set! (-> obj main-thread) 512)
@@ -999,6 +999,7 @@
)
;; definition for method 11 of type cavegem
;; INFO: Return type mismatch object vs none.
(defmethod copy-defaults! cavegem ((obj cavegem) (arg0 res-lump))
(set! (-> obj root) (new 'process 'trsqv))
(process-drawable-from-entity! obj arg0)