mirror of
https://github.com/open-goal/jak-project
synced 2026-08-20 14:24:45 -04:00
Merge remote-tracking branch 'origin/master' into j2/progress
This commit is contained in:
+5
-5
@@ -231,7 +231,7 @@
|
||||
)
|
||||
(and *target*
|
||||
(!= (-> *target* next-state name) 'target-look-around)
|
||||
(zero? (logand (-> *target* state-flags) (state-flags being-attacked dying)))
|
||||
(not (logtest? (-> *target* state-flags) (state-flags being-attacked dying)))
|
||||
(= *master-mode* 'game)
|
||||
)
|
||||
)
|
||||
@@ -408,8 +408,8 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate level-hint-normal (level-hint)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (cond
|
||||
((= v1-0 'exit)
|
||||
(go level-hint-exit)
|
||||
@@ -468,8 +468,8 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate level-hint-sidekick (level-hint)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (cond
|
||||
((= v1-0 'exit)
|
||||
(when (nonzero? (-> self sound-id))
|
||||
|
||||
+2
-2
@@ -129,7 +129,7 @@
|
||||
|
||||
;; definition for method 10 of type align-control
|
||||
(defmethod align! align-control ((obj align-control) (arg0 align-opts) (arg1 float) (arg2 float) (arg3 float))
|
||||
(when (zero? (logand (-> obj flags) (align-flags disabled)))
|
||||
(when (not (logtest? (-> obj flags) (align-flags disabled)))
|
||||
(let* ((a0-1 (-> obj process))
|
||||
(t9-0 (method-of-object a0-1 apply-alignment))
|
||||
(v1-4 (-> obj delta))
|
||||
@@ -161,7 +161,7 @@
|
||||
|
||||
;; definition for method 11 of type align-control
|
||||
(defmethod align-vel-and-quat-only! align-control ((obj align-control) (arg0 align-opts) (arg1 vector) (arg2 int) (arg3 float) (arg4 float))
|
||||
(when (zero? (logand (-> obj flags) (align-flags disabled)))
|
||||
(when (not (logtest? (-> obj flags) (align-flags disabled)))
|
||||
(let ((s5-0 (-> obj delta)))
|
||||
(let ((s3-0 (-> obj process root transv)))
|
||||
(if (logtest? arg0 (align-opts adjust-y-vel))
|
||||
|
||||
+2
-2
@@ -976,7 +976,7 @@
|
||||
(v0-0 (the-as object (-> arg0 data arg2 data)))
|
||||
)
|
||||
(cond
|
||||
((zero? (logand (-> arg0 fixed hdr matrix-bits) 1))
|
||||
((not (logtest? (-> arg0 fixed hdr matrix-bits) 1))
|
||||
(set! v1-1 (cond
|
||||
((zero? arg1)
|
||||
(return (the-as matrix v1-1))
|
||||
@@ -995,7 +995,7 @@
|
||||
(set! v0-0 (-> (the-as (inline-array vector) v0-0) 4))
|
||||
)
|
||||
)
|
||||
(if (zero? (logand (-> arg0 fixed hdr matrix-bits) 2))
|
||||
(if (not (logtest? (-> arg0 fixed hdr matrix-bits) 2))
|
||||
(return (the-as matrix v1-1))
|
||||
)
|
||||
(the-as matrix v0-0)
|
||||
|
||||
+14
-14
@@ -3,16 +3,16 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate cam-combiner-active (camera-combiner)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as
|
||||
object
|
||||
(cond
|
||||
((= v1-0 'point-of-interest)
|
||||
(cond
|
||||
((-> arg3 param 0)
|
||||
((-> event param 0)
|
||||
(set! (-> self tracking use-point-of-interest) #t)
|
||||
(set! (-> self tracking point-of-interest quad) (-> (the-as vector (-> arg3 param 0)) quad))
|
||||
(set! (-> self tracking point-of-interest quad) (-> (the-as vector (-> event param 0)) quad))
|
||||
(set! (-> self tracking point-of-interest-blend target) 1.0)
|
||||
)
|
||||
(else
|
||||
@@ -23,7 +23,7 @@
|
||||
)
|
||||
((= v1-0 'set-interpolation)
|
||||
(set! (-> self interp-val) 0.0)
|
||||
(set! (-> self interp-step) (/ 5.0 (the float (-> arg3 param 0))))
|
||||
(set! (-> self interp-step) (/ 5.0 (the float (-> event param 0))))
|
||||
)
|
||||
((= v1-0 'teleport)
|
||||
(when (nonzero? (-> self tracking-status))
|
||||
@@ -48,28 +48,28 @@
|
||||
(a0-15 0)
|
||||
(a1-3 "ERROR <GMJ>: missing camera-slave parameter to *camera-combiner* start-tracking~%")
|
||||
)
|
||||
(let ((v1-7 (-> arg3 param 0)))
|
||||
(let ((v1-7 (-> event param 0)))
|
||||
(rtype-of v1-7)
|
||||
)
|
||||
(t9-2 a0-15 a1-3)
|
||||
)
|
||||
)
|
||||
((let ((t9-3 type-type?)
|
||||
(v1-8 (-> arg3 param 0))
|
||||
(v1-8 (-> event param 0))
|
||||
)
|
||||
(not (t9-3 (rtype-of v1-8) camera-slave))
|
||||
)
|
||||
(let ((t9-4 format)
|
||||
(a0-18 0)
|
||||
(a1-5 "ERROR <GMJ>: invalid type '~A' to *camera-combiner* start-tracking~%")
|
||||
(v1-10 (-> arg3 param 0))
|
||||
(v1-10 (-> event param 0))
|
||||
)
|
||||
(t9-4 a0-18 a1-5 (rtype-of v1-10))
|
||||
)
|
||||
)
|
||||
((zero? (-> self tracking-status))
|
||||
(set! (-> self tracking-status) (the-as uint 1))
|
||||
(let ((gp-1 (the-as object (-> arg3 param 0))))
|
||||
(let ((gp-1 (the-as object (-> event param 0))))
|
||||
(set! (-> self tracking-options) (the-as int (-> (the-as camera-slave gp-1) options)))
|
||||
(set! (-> self tracking no-follow) (-> (the-as camera-slave gp-1) tracking no-follow))
|
||||
(copy-cam-float-seeker (-> self tracking tilt-adjust) (-> (the-as camera-slave gp-1) tracking tilt-adjust))
|
||||
@@ -106,21 +106,21 @@
|
||||
(a0-27 0)
|
||||
(a1-11 "ERROR <GMJ>: missing camera-slave parameter to *camera-combiner* copy-tracking~%")
|
||||
)
|
||||
(let ((v1-23 (-> arg3 param 0)))
|
||||
(let ((v1-23 (-> event param 0)))
|
||||
(rtype-of v1-23)
|
||||
)
|
||||
(t9-10 a0-27 a1-11)
|
||||
)
|
||||
)
|
||||
((let ((t9-11 type-type?)
|
||||
(v1-24 (-> arg3 param 0))
|
||||
(v1-24 (-> event param 0))
|
||||
)
|
||||
(not (t9-11 (rtype-of v1-24) camera-slave))
|
||||
)
|
||||
(let ((t9-12 format)
|
||||
(a0-30 0)
|
||||
(a1-13 "ERROR <GMJ>: invalid type '~A' to *camera-combiner* copy-tracking~%")
|
||||
(v1-25 (-> arg3 param 0))
|
||||
(v1-25 (-> event param 0))
|
||||
)
|
||||
(t9-12 a0-30 a1-13 (rtype-of v1-25))
|
||||
)
|
||||
@@ -130,7 +130,7 @@
|
||||
)
|
||||
(else
|
||||
(set! (-> self tracking-status) (the-as uint 1))
|
||||
(let ((gp-3 (the-as camera-slave (-> arg3 param 0))))
|
||||
(let ((gp-3 (the-as camera-slave (-> event param 0))))
|
||||
(set! (-> self tracking-options) (the-as int (-> gp-3 options)))
|
||||
(set! (-> self tracking no-follow) (-> gp-3 tracking no-follow))
|
||||
(copy-cam-float-seeker (-> self tracking tilt-adjust) (-> gp-3 tracking tilt-adjust))
|
||||
@@ -163,7 +163,7 @@
|
||||
:code (behavior ()
|
||||
(local-vars (sv-160 cam-rotation-tracker))
|
||||
(loop
|
||||
(when (and (zero? (logand (-> *camera* master-options) 2)) (!= (-> self tracking-status) 0))
|
||||
(when (and (not (logtest? (-> *camera* master-options) 2)) (!= (-> self tracking-status) 0))
|
||||
(set! (-> self tracking-status) (the-as uint 0))
|
||||
0
|
||||
)
|
||||
|
||||
+4
-4
@@ -2609,7 +2609,7 @@
|
||||
)
|
||||
(format arg0 ": on")
|
||||
)
|
||||
((zero? (logand ((method-of-type res-lump get-property-value)
|
||||
((not (logtest? ((method-of-type res-lump get-property-value)
|
||||
(-> self cam-entity)
|
||||
(the-as symbol arg2)
|
||||
'exact
|
||||
@@ -2620,7 +2620,7 @@
|
||||
)
|
||||
s5-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(format arg0 ": off(maya)")
|
||||
)
|
||||
(else
|
||||
@@ -3558,13 +3558,13 @@
|
||||
((and (logtest? (-> arg0 options) 8) (logtest? (-> *cpad-list* cpads 0 button0-abs 0) (-> arg0 button)))
|
||||
#f
|
||||
)
|
||||
((and (zero? (logand (-> arg0 options) 12))
|
||||
((and (not (logtest? (-> arg0 options) 12))
|
||||
(logtest? (-> arg0 options) 1)
|
||||
(zero? (logand (-> *cpad-list* cpads 0 button0-rel 0) (-> arg0 button)))
|
||||
)
|
||||
#f
|
||||
)
|
||||
((and (zero? (logand (-> arg0 options) 13))
|
||||
((and (not (logtest? (-> arg0 options) 13))
|
||||
(zero? (logand (-> *cpad-list* cpads 0 button0-abs 0) (-> arg0 button)))
|
||||
)
|
||||
#f
|
||||
|
||||
+3
-3
@@ -96,7 +96,7 @@
|
||||
(else
|
||||
(set! (-> self attack-start) (-> *display* base-frame-counter))
|
||||
(set! (-> self being-attacked) #t)
|
||||
(when (and (zero? (logand (-> self master-options) 64))
|
||||
(when (and (not (logtest? (-> self master-options) 64))
|
||||
(or (!= (-> last-try-to-look-at-data horz) 0.0) (!= (-> last-try-to-look-at-data vert) 0.0))
|
||||
)
|
||||
(set! (-> self string-max target y) (fmax (-> self string-max target y) (-> last-try-to-look-at-data vert)))
|
||||
@@ -326,7 +326,7 @@
|
||||
(set! (-> self attack-start) (-> *display* base-frame-counter))
|
||||
)
|
||||
(set! (-> self being-attacked) #t)
|
||||
(when (and (zero? (logand (-> self master-options) 64))
|
||||
(when (and (not (logtest? (-> self master-options) 64))
|
||||
(or (!= (-> last-try-to-look-at-data horz) 0.0) (!= (-> last-try-to-look-at-data vert) 0.0))
|
||||
)
|
||||
(set! (-> self string-max target y) (fmax (-> self string-max target y) (-> last-try-to-look-at-data vert)))
|
||||
@@ -488,7 +488,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (zero? (logand (-> self slave-options) 16))
|
||||
(if (not (logtest? (-> self slave-options) 16))
|
||||
(reset-follow)
|
||||
)
|
||||
(let ((v1-196 (-> *target* water flags)))
|
||||
|
||||
+11
-11
@@ -24,13 +24,13 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate cam-point-watch (camera-slave)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('teleport)
|
||||
#f
|
||||
)
|
||||
(else
|
||||
(cam-standard-event-handler arg0 arg1 arg2 arg3)
|
||||
(cam-standard-event-handler proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -311,8 +311,8 @@
|
||||
)
|
||||
(when *display-load-boundaries*
|
||||
(when (and (!= arg3 1)
|
||||
(zero? (logand (-> *cpad-list* cpads 1 button0-abs 0) (pad-buttons x)))
|
||||
(zero? (logand (-> *cpad-list* cpads 1 button0-abs 0) (pad-buttons r1)))
|
||||
(not (cpad-hold? 1 x))
|
||||
(not (cpad-hold? 1 r1))
|
||||
(zero? (logand (-> *cpad-list* cpads 1 button0-abs 0) (pad-buttons r2)))
|
||||
)
|
||||
(+! f28-14 (analog-input (the-as int (-> *cpad-list* cpads 1 leftx)) 128.0 48.0 110.0 -1.0))
|
||||
@@ -416,13 +416,13 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate cam-free-floating (camera-slave)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('teleport)
|
||||
#f
|
||||
)
|
||||
(else
|
||||
(cam-standard-event-handler arg0 arg1 arg2 arg3)
|
||||
(cam-standard-event-handler proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -522,13 +522,13 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate cam-orbit (camera-slave)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('teleport)
|
||||
#f
|
||||
)
|
||||
(else
|
||||
(cam-standard-event-handler arg0 arg1 arg2 arg3)
|
||||
(cam-standard-event-handler proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
+53
-53
@@ -3,13 +3,13 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate cam-fixed (camera-slave)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('teleport)
|
||||
#f
|
||||
)
|
||||
(else
|
||||
(cam-standard-event-handler arg0 arg1 arg2 arg3)
|
||||
(cam-standard-event-handler proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -42,13 +42,13 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate cam-fixed-read-entity (camera-slave)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('teleport)
|
||||
#f
|
||||
)
|
||||
(else
|
||||
(cam-standard-event-handler arg0 arg1 arg2 arg3)
|
||||
(cam-standard-event-handler proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -86,13 +86,13 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate cam-pov (camera-slave)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('teleport)
|
||||
#f
|
||||
)
|
||||
(else
|
||||
(cam-standard-event-handler arg0 arg1 arg2 arg3)
|
||||
(cam-standard-event-handler proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -146,13 +146,13 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate cam-pov180 (camera-slave)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('teleport)
|
||||
#f
|
||||
)
|
||||
(else
|
||||
(cam-standard-event-handler arg0 arg1 arg2 arg3)
|
||||
(cam-standard-event-handler proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -289,10 +289,10 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate cam-standoff (camera-slave)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('set-standoff-dist)
|
||||
(vector-normalize! (-> self pivot-pt) (the-as float (-> arg3 param 0)))
|
||||
(vector-normalize! (-> self pivot-pt) (the-as float (-> event param 0)))
|
||||
(cam-standoff-calc-trans)
|
||||
)
|
||||
(('set-standoff-height)
|
||||
@@ -301,12 +301,12 @@
|
||||
(-> self pivot-pt)
|
||||
(-> self pivot-pt)
|
||||
(-> *camera* local-down)
|
||||
(the-as float (-> arg3 param 0))
|
||||
(the-as float (-> event param 0))
|
||||
)
|
||||
(cam-standoff-calc-trans)
|
||||
)
|
||||
(else
|
||||
(cam-standard-event-handler arg0 arg1 arg2 arg3)
|
||||
(cam-standard-event-handler proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -329,7 +329,7 @@
|
||||
(none)
|
||||
)
|
||||
:trans (behavior ()
|
||||
(if (zero? (logand (-> *camera* master-options) 2))
|
||||
(if (not (logtest? (-> *camera* master-options) 2))
|
||||
(cam-slave-go cam-free-floating)
|
||||
)
|
||||
(none)
|
||||
@@ -422,13 +422,13 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate cam-eye (camera-slave)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('teleport)
|
||||
#f
|
||||
)
|
||||
(else
|
||||
(cam-standard-event-handler arg0 arg1 arg2 arg3)
|
||||
(cam-standard-event-handler proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -454,7 +454,7 @@
|
||||
(none)
|
||||
)
|
||||
:trans (behavior ()
|
||||
(if (zero? (logand (-> *camera* master-options) 2))
|
||||
(if (not (logtest? (-> *camera* master-options) 2))
|
||||
(go cam-free-floating)
|
||||
)
|
||||
(none)
|
||||
@@ -516,7 +516,7 @@
|
||||
)
|
||||
(matrix-axis-angle! s5-0 (-> *camera* local-down) (-> s4-0 y))
|
||||
(matrix*! (the-as matrix (-> self tracking)) (the-as matrix (-> self tracking)) s5-0)
|
||||
(when (zero? (logand (-> self options) 8))
|
||||
(when (not (logtest? (-> self options) 8))
|
||||
(if (< (vector-dot (-> self tracking inv-mat vector 1) (-> *camera* local-down)) 0.0)
|
||||
(forward-down->inv-matrix
|
||||
(the-as matrix (-> self tracking))
|
||||
@@ -533,7 +533,7 @@
|
||||
(matrix-axis-angle! s5-0 (the-as vector (-> self tracking)) (- (-> s4-0 x)))
|
||||
(matrix*! (the-as matrix (-> self tracking)) (the-as matrix (-> self tracking)) s5-0)
|
||||
)
|
||||
(when (zero? (logand (-> self options) 8))
|
||||
(when (not (logtest? (-> self options) 8))
|
||||
(let ((f30-1 (vector-dot (-> *camera* local-down) (-> self tracking inv-mat vector 2))))
|
||||
(set! (-> (new 'stack-no-clear 'vector) quad) (the-as uint128 0))
|
||||
(when (< (sin (-> *CAM_EYE-bank* max-degrees)) (fabs f30-1))
|
||||
@@ -601,13 +601,13 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate cam-billy (camera-slave)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('teleport)
|
||||
#f
|
||||
)
|
||||
(else
|
||||
(cam-standard-event-handler arg0 arg1 arg2 arg3)
|
||||
(cam-standard-event-handler proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -629,7 +629,7 @@
|
||||
(none)
|
||||
)
|
||||
:trans (behavior ()
|
||||
(if (zero? (logand (-> *camera* master-options) 2))
|
||||
(if (not (logtest? (-> *camera* master-options) 2))
|
||||
(go cam-free-floating)
|
||||
)
|
||||
(none)
|
||||
@@ -799,7 +799,7 @@
|
||||
(none)
|
||||
)
|
||||
:trans (behavior ()
|
||||
(if (zero? (logand (-> *camera* master-options) 2))
|
||||
(if (not (logtest? (-> *camera* master-options) 2))
|
||||
(cam-slave-go cam-free-floating)
|
||||
)
|
||||
(none)
|
||||
@@ -820,13 +820,13 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate cam-decel (camera-slave)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('teleport)
|
||||
#f
|
||||
)
|
||||
(else
|
||||
(cam-standard-event-handler arg0 arg1 arg2 arg3)
|
||||
(cam-standard-event-handler proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -873,13 +873,13 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate cam-endlessfall (camera-slave)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('teleport)
|
||||
#f
|
||||
)
|
||||
(else
|
||||
(cam-standard-event-handler arg0 arg1 arg2 arg3)
|
||||
(cam-standard-event-handler proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1043,7 +1043,7 @@
|
||||
(vector-! gp-0 (-> self pivot-pt) (-> self circular-follow))
|
||||
)
|
||||
(vector-! s5-0 (-> self trans) (-> self pivot-pt))
|
||||
(when (zero? (logand (-> self options) 4))
|
||||
(when (not (logtest? (-> self options) 4))
|
||||
(vector-flatten! gp-0 gp-0 (-> *camera* local-down))
|
||||
(vector-flatten! s5-0 s5-0 (-> *camera* local-down))
|
||||
)
|
||||
@@ -1108,8 +1108,8 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate cam-circular (camera-slave)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('teleport)
|
||||
#f
|
||||
)
|
||||
@@ -1118,7 +1118,7 @@
|
||||
(cam-circular-position #f)
|
||||
)
|
||||
(else
|
||||
(cam-standard-event-handler arg0 arg1 arg2 arg3)
|
||||
(cam-standard-event-handler proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1194,7 +1194,7 @@
|
||||
(none)
|
||||
)
|
||||
:trans (behavior ()
|
||||
(if (zero? (logand (-> *camera* master-options) 2))
|
||||
(if (not (logtest? (-> *camera* master-options) 2))
|
||||
(cam-slave-go cam-free-floating)
|
||||
)
|
||||
(none)
|
||||
@@ -1221,7 +1221,7 @@
|
||||
(none)
|
||||
)
|
||||
:trans (behavior ()
|
||||
(if (zero? (logand (-> *camera* master-options) 2))
|
||||
(if (not (logtest? (-> *camera* master-options) 2))
|
||||
(cam-slave-go cam-free-floating)
|
||||
)
|
||||
(none)
|
||||
@@ -2190,7 +2190,7 @@
|
||||
(cam-los-setup-lateral arg2 s4-1 arg1)
|
||||
)
|
||||
(cond
|
||||
((zero? (logand (-> self options) 1024))
|
||||
((not (logtest? (-> self options) 1024))
|
||||
)
|
||||
((= (-> self string-vel-dir) 5)
|
||||
)
|
||||
@@ -2824,8 +2824,8 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate cam-string (camera-slave)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('teleport)
|
||||
(let ((gp-0 (new-stack-vector0)))
|
||||
(cam-string-find-position-rel! gp-0)
|
||||
@@ -2833,8 +2833,8 @@
|
||||
)
|
||||
)
|
||||
(('joystick)
|
||||
(set! (-> self phony-joystick-x) (the-as float (-> arg3 param 0)))
|
||||
(set! (-> self phony-joystick-y) (the-as float (-> arg3 param 1)))
|
||||
(set! (-> self phony-joystick-x) (the-as float (-> event param 0)))
|
||||
(set! (-> self phony-joystick-y) (the-as float (-> event param 1)))
|
||||
(let ((v0-1 (the-as object #t)))
|
||||
(set! (-> self have-phony-joystick) (the-as symbol v0-1))
|
||||
v0-1
|
||||
@@ -2842,10 +2842,10 @@
|
||||
)
|
||||
(('set-dist)
|
||||
(cond
|
||||
((-> arg3 param 0)
|
||||
((-> event param 0)
|
||||
(set! (-> self string-val-locked) #t)
|
||||
(set! (-> self string-min-val quad) (-> (the-as vector (-> arg3 param 0)) quad))
|
||||
(set! (-> self string-max-val quad) (-> (the-as vector (-> arg3 param 1)) quad))
|
||||
(set! (-> self string-min-val quad) (-> (the-as vector (-> event param 0)) quad))
|
||||
(set! (-> self string-max-val quad) (-> (the-as vector (-> event param 1)) quad))
|
||||
(set! (-> self string-max-val x) (fmax (-> self string-max-val x) (-> self string-min-val x)))
|
||||
(set! (-> self string-max-val y) (fmax (-> self string-max-val y) (-> self string-min-val y)))
|
||||
(set! (-> self string-max-val z) (fmax (-> self string-max-val z) (-> self string-min-val z)))
|
||||
@@ -2860,7 +2860,7 @@
|
||||
(-> self los-state)
|
||||
)
|
||||
(else
|
||||
(cam-standard-event-handler arg0 arg1 arg2 arg3)
|
||||
(cam-standard-event-handler proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -3014,7 +3014,7 @@
|
||||
(none)
|
||||
)
|
||||
:trans (behavior ()
|
||||
(if (zero? (logand (-> *camera* master-options) 2))
|
||||
(if (not (logtest? (-> *camera* master-options) 2))
|
||||
(cam-slave-go cam-free-floating)
|
||||
)
|
||||
(none)
|
||||
@@ -3188,7 +3188,7 @@
|
||||
(none)
|
||||
)
|
||||
:trans (behavior ()
|
||||
(if (zero? (logand (-> *camera* master-options) 2))
|
||||
(if (not (logtest? (-> *camera* master-options) 2))
|
||||
(cam-slave-go cam-free-floating)
|
||||
)
|
||||
(when (not (paused?))
|
||||
@@ -3437,7 +3437,7 @@
|
||||
(none)
|
||||
)
|
||||
:trans (behavior ()
|
||||
(if (zero? (logand (-> *camera* master-options) 2))
|
||||
(if (not (logtest? (-> *camera* master-options) 2))
|
||||
(cam-slave-go cam-free-floating)
|
||||
)
|
||||
(none)
|
||||
|
||||
+1
-1
@@ -924,7 +924,7 @@
|
||||
)
|
||||
(set! (-> obj free-point) -134250495)
|
||||
(dotimes (v1-21 32)
|
||||
(when (zero? (logand s5-0 1))
|
||||
(when (not (logtest? s5-0 1))
|
||||
(set! (-> obj point v1-21 next) (-> obj free-point))
|
||||
(set! (-> obj free-point) v1-21)
|
||||
)
|
||||
|
||||
+2
-2
@@ -82,8 +82,8 @@
|
||||
;; failed to figure out what this is:
|
||||
(defstate pov-camera-playing (pov-camera)
|
||||
:virtual #t
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('abort)
|
||||
(when (logtest? (-> self flags) (pov-camera-flag notify-of-abort))
|
||||
(logior! (-> self flags) (pov-camera-flag allow-abort))
|
||||
|
||||
+3
-3
@@ -162,7 +162,7 @@
|
||||
(set! (-> arg0 unknown-vector-coverage-1 quad) (-> sv-164 normal quad))
|
||||
0
|
||||
)
|
||||
(when (and (zero? (logand sv-32 512))
|
||||
(when (and (not (logtest? sv-32 512))
|
||||
(and (or (< (* 1.25 (-> arg1 best-from-prim local-sphere w)) (-> arg0 unknown-float-coverage-0))
|
||||
(= (shr (shl (the-as int (-> arg0 unknown-float-coverage-1)) 58) 61) 1)
|
||||
)
|
||||
@@ -187,7 +187,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (or (zero? (logand sv-32 32)) (< 0.5 f0-21))
|
||||
(if (or (not (logtest? sv-32 32)) (< 0.5 f0-21))
|
||||
(set! sv-48 (the-as symbol #f))
|
||||
)
|
||||
(when (and (or (and (< f0-21 0.95) (>= f30-0 0.0))
|
||||
@@ -311,7 +311,7 @@
|
||||
(& sv-160)
|
||||
)
|
||||
)
|
||||
(when (zero? (logand (-> arg0 prev-status) (cshape-moving-flags onsurf)))
|
||||
(when (not (logtest? (-> arg0 prev-status) (cshape-moving-flags onsurf)))
|
||||
(set! (-> arg0 ground-impact-vel) (- (vector-dot (-> arg0 transv) (-> arg0 dynam gravity-normal))))
|
||||
(set! sv-96 (logior sv-96 2048))
|
||||
(when (not sv-160)
|
||||
|
||||
+11
-11
@@ -867,7 +867,7 @@
|
||||
(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))
|
||||
(when (not (logtest? (-> (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))))
|
||||
@@ -878,7 +878,7 @@
|
||||
(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)))
|
||||
(if (and (not (logtest? (-> 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)
|
||||
@@ -1328,7 +1328,7 @@
|
||||
(goto cfg-25)
|
||||
)
|
||||
)
|
||||
(when (zero? (logand (-> (the-as anim-test-obj v1-17) flags) 1))
|
||||
(when (not (logtest? (-> (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)
|
||||
)
|
||||
@@ -1352,7 +1352,7 @@
|
||||
(goto cfg-39)
|
||||
)
|
||||
)
|
||||
(when (zero? (logand (-> (the-as anim-test-obj v1-23) flags) 1))
|
||||
(when (not (logtest? (-> (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)
|
||||
)
|
||||
@@ -1838,7 +1838,7 @@
|
||||
(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))
|
||||
(when (not (logtest? (-> (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))
|
||||
@@ -1972,7 +1972,7 @@
|
||||
)
|
||||
((= v1-88 9)
|
||||
(cond
|
||||
((zero? (logand (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons x)))
|
||||
((not (cpad-hold? 0 x))
|
||||
(logclear! (-> *anim-tester* 0 flags) (anim-tester-flags fanimt3))
|
||||
)
|
||||
((cpad-pressed? 0 up)
|
||||
@@ -2015,7 +2015,7 @@
|
||||
)
|
||||
((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)))
|
||||
((not (cpad-hold? 0 x))
|
||||
(logclear! (-> *anim-tester* 0 flags) (anim-tester-flags fanimt3))
|
||||
)
|
||||
((begin (set! (-> arg1 current-index) (-> arg1 the-index)) (<= (-> *anim-tester* 0 inc-timer) 0))
|
||||
@@ -2156,14 +2156,14 @@
|
||||
(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))
|
||||
(when (not (logtest? (-> (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))
|
||||
(when (not (logtest? (-> (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))
|
||||
@@ -2481,7 +2481,7 @@
|
||||
(none)
|
||||
)
|
||||
:trans (behavior ()
|
||||
(if (and (zero? (logand (-> self flags) (anim-tester-flags fanimt1))) (= *master-mode* 'menu))
|
||||
(if (and (not (logtest? (-> self flags) (anim-tester-flags fanimt1))) (= *master-mode* 'menu))
|
||||
(anim-tester-interface)
|
||||
)
|
||||
(logclear! (-> self flags) (anim-tester-flags fanimt1))
|
||||
@@ -2756,7 +2756,7 @@
|
||||
"is this node the end of the list. #t = end"
|
||||
(not (not (-> v1-21 next)))
|
||||
)
|
||||
(when (zero? (logand (-> s4-2 flags) 5))
|
||||
(when (not (logtest? (-> 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 " ")
|
||||
|
||||
+1
-1
@@ -1372,7 +1372,7 @@
|
||||
;; definition for function debug-menu-item-var-joypad-handler
|
||||
(defun debug-menu-item-var-joypad-handler ((arg0 debug-menu-item-var))
|
||||
(cond
|
||||
((zero? (logand (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons x)))
|
||||
((not (cpad-hold? 0 x))
|
||||
(let ((a0-1 (-> arg0 parent context)))
|
||||
(debug-menu-context-release-joypad a0-1)
|
||||
)
|
||||
|
||||
+1
-1
@@ -72,7 +72,7 @@
|
||||
(set! t1-6 (&-> t1-6 1))
|
||||
(let ((t4-0 128))
|
||||
(label cfg-7)
|
||||
(b! (zero? (logand t3-0 t4-0)) cfg-9 :delay (set! t5-1 (-> arg1 0)))
|
||||
(b! (not (logtest? t3-0 t4-0)) cfg-9 :delay (set! t5-1 (-> arg1 0)))
|
||||
(set! arg1 (&-> arg1 1))
|
||||
(set! (-> t2-3 0) t5-1)
|
||||
(label cfg-9)
|
||||
|
||||
+5
-5
@@ -128,7 +128,7 @@
|
||||
(.mov a0-1 vf10)
|
||||
(.pcgtw a0-2 0 a0-1)
|
||||
(.ppach a0-3 (the-as uint128 0) a0-2)
|
||||
(zero? (logand (the-as int v1-3) (the-as int a0-3)))
|
||||
(not (logtest? (the-as int v1-3) (the-as int a0-3)))
|
||||
)
|
||||
)
|
||||
|
||||
@@ -577,7 +577,7 @@
|
||||
(init-vf0-vector)
|
||||
(set! sv-16 arg0)
|
||||
(logclear! (-> arg1 status) (draw-status was-drawn))
|
||||
(when (zero? (logand (-> arg1 status) (draw-status hidden no-anim no-skeleton-update)))
|
||||
(when (not (logtest? (-> arg1 status) (draw-status hidden no-anim no-skeleton-update)))
|
||||
(let ((s4-0 (-> (the-as terrain-context #x70000000) work foreground joint-work temp-mtx vector 2))
|
||||
(vu-lgt
|
||||
(the-as vu-lights (-> (the-as terrain-context #x70000000) work foreground joint-work temp-mtx vector 3))
|
||||
@@ -772,7 +772,7 @@
|
||||
(let ((v1-64 (-> arg1 sink-group level))
|
||||
(a0-26 (+ (-> arg1 sink-group merc-sink foreground-texture-page) 6))
|
||||
)
|
||||
(when (zero? (logand (-> arg1 status) (draw-status do-not-check-distance)))
|
||||
(when (not (logtest? (-> arg1 status) (draw-status do-not-check-distance)))
|
||||
(if (< cam-dist (-> v1-64 closest-object a0-26))
|
||||
(set! (-> v1-64 closest-object a0-26) cam-dist)
|
||||
)
|
||||
@@ -852,7 +852,7 @@
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
(defun dma-add-process-drawable-hud ((arg0 process-drawable) (arg1 draw-control) (arg2 symbol) (arg3 dma-buffer))
|
||||
(logclear! (-> arg1 status) (draw-status was-drawn))
|
||||
(when (zero? (logand (-> arg1 status) (draw-status hidden no-anim no-skeleton-update)))
|
||||
(when (not (logtest? (-> arg1 status) (draw-status hidden no-anim no-skeleton-update)))
|
||||
(let ((v1-6 (the-as vu-lights (+ 64 #x70000000)))
|
||||
(a0-3 *hud-lights*)
|
||||
)
|
||||
@@ -1077,7 +1077,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (zero? (logand *vu1-enable-user* (vu1-renderer-mask sky)))
|
||||
(when (not (logtest? *vu1-enable-user* (vu1-renderer-mask sky)))
|
||||
(let* ((s5-2 (-> *display* frames (-> *display* on-screen) frame global-buf))
|
||||
(gp-6 (-> s5-2 base))
|
||||
)
|
||||
|
||||
+3
-3
@@ -498,7 +498,7 @@
|
||||
(let ((s0-0 (-> s4-0 data v1-28))
|
||||
(v1-32 (res-lump-value (-> obj entity) 'options uint128))
|
||||
)
|
||||
(if (and (zero? (logand #x20000 v1-32)) (= (-> s0-0 type) shadow-geo))
|
||||
(if (and (not (logtest? #x20000 v1-32)) (= (-> s0-0 type) shadow-geo))
|
||||
(set! (-> s3-0 shadow) (the-as shadow-geo s0-0))
|
||||
)
|
||||
)
|
||||
@@ -620,7 +620,7 @@
|
||||
(* (-> grav-rt-body x) (-> *display* seconds-per-frame))
|
||||
)
|
||||
)
|
||||
(if (zero? (logand arg0 (align-opts adjust-xz-vel keep-other-velocities)))
|
||||
(if (not (logtest? arg0 (align-opts adjust-xz-vel keep-other-velocities)))
|
||||
(set! (-> vel-rt-body z) 0.0)
|
||||
)
|
||||
)
|
||||
@@ -637,7 +637,7 @@
|
||||
(* (-> grav-rt-body z) (-> *display* seconds-per-frame))
|
||||
)
|
||||
)
|
||||
(if (zero? (logand arg0 (align-opts adjust-x-vel keep-other-velocities)))
|
||||
(if (not (logtest? arg0 (align-opts adjust-x-vel keep-other-velocities)))
|
||||
(set! (-> vel-rt-body x) 0.0)
|
||||
)
|
||||
)
|
||||
|
||||
+4
-4
@@ -327,7 +327,7 @@
|
||||
)
|
||||
(let ((s5-1 format)
|
||||
(s4-0 "~C~C~C")
|
||||
(a2-0 (if (and arg0 (zero? (logand (-> *kernel-context* prevent-from-run) (-> arg0 mask))) (run-logic? arg0))
|
||||
(a2-0 (if (and arg0 (not (logtest? (-> *kernel-context* prevent-from-run) (-> arg0 mask))) (run-logic? arg0))
|
||||
114
|
||||
32
|
||||
)
|
||||
@@ -1498,7 +1498,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (zero? (logand (-> obj status) (entity-perm-status user-set-from-cstage)))
|
||||
(when (not (logtest? (-> obj status) (entity-perm-status user-set-from-cstage)))
|
||||
(set! (-> obj user-uint64) (the-as uint 0))
|
||||
0
|
||||
)
|
||||
@@ -1589,7 +1589,7 @@
|
||||
|
||||
;; definition for method 12 of type process-drawable
|
||||
(defmethod run-logic? process-drawable ((obj process-drawable))
|
||||
(or (zero? (logand (-> obj mask) (process-mask actor-pause)))
|
||||
(or (not (logtest? (-> obj mask) (process-mask actor-pause)))
|
||||
(or (>= (+ (-> *ACTOR-bank* pause-dist) (-> obj root pause-adjust-distance))
|
||||
(vector-vector-distance (-> obj root trans) (math-camera-pos))
|
||||
)
|
||||
@@ -1601,7 +1601,7 @@
|
||||
|
||||
;; definition for method 9 of type entity-links
|
||||
(defmethod birth? entity-links ((obj entity-links) (arg0 vector))
|
||||
(and (zero? (logand (-> obj perm status) (entity-perm-status bit-0 dead)))
|
||||
(and (not (logtest? (-> obj perm status) (entity-perm-status bit-0 dead)))
|
||||
(< (vector-vector-distance (-> obj trans) arg0) (-> *ACTOR-bank* birth-dist))
|
||||
)
|
||||
)
|
||||
|
||||
+3
-3
@@ -4,8 +4,8 @@
|
||||
;; definition for function eco-fadeout
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
(defun eco-fadeout ((arg0 sparticle-system) (arg1 sparticle-cpuinfo))
|
||||
(if (zero? (logand (-> (the-as process-drawable (-> arg1 key proc)) state-flags) (state-flags fade-out-particles))
|
||||
)
|
||||
(if (not (logtest? (-> (the-as process-drawable (-> arg1 key proc)) state-flags) (state-flags fade-out-particles))
|
||||
)
|
||||
(set! (-> arg1 next-time) (the-as uint (* (-> *sp-frame-time* x) 2)))
|
||||
)
|
||||
0
|
||||
@@ -21,7 +21,7 @@
|
||||
(set! (-> arg2 y) (-> a0-3 world-sphere y))
|
||||
(set! (-> arg2 z) (-> a0-3 world-sphere z))
|
||||
)
|
||||
(if (zero? (logand (-> v1-1 state-flags) (state-flags fade-out-particles)))
|
||||
(if (not (logtest? (-> v1-1 state-flags) (state-flags fade-out-particles)))
|
||||
(set! (-> arg1 next-time) (the-as uint (* (-> *sp-frame-time* x) 2)))
|
||||
)
|
||||
)
|
||||
|
||||
+63
-63
@@ -487,63 +487,63 @@
|
||||
;; failed to figure out what this is:
|
||||
(defstate wait (eco-collectable)
|
||||
:virtual #t
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(local-vars (v0-3 none))
|
||||
(when (and (or (= arg2 'touch) (= arg2 'attack))
|
||||
(when (and (or (= event-type 'touch) (= event-type 'attack))
|
||||
(and (logtest? (-> self flags) (collectable-flags can-collect))
|
||||
(>= (- (-> *display* base-frame-counter) (-> self birth-time)) (-> self collect-timeout))
|
||||
(!= (-> self next-state name) 'pickup)
|
||||
(send-event arg0 'get-pickup (-> self fact pickup-type) (-> self fact pickup-amount))
|
||||
(send-event proc 'get-pickup (-> self fact pickup-type) (-> self fact pickup-amount))
|
||||
)
|
||||
)
|
||||
(logclear! (-> self mask) (process-mask actor-pause))
|
||||
(go-virtual pickup #f (process->handle arg0))
|
||||
(go-virtual pickup #f (process->handle proc))
|
||||
)
|
||||
(the-as
|
||||
object
|
||||
(cond
|
||||
((= arg2 'eco-blue)
|
||||
(when (and (zero? (logand (-> self flags) (collectable-flags fading ignore-blue)))
|
||||
((= event-type 'eco-blue)
|
||||
(when (and (not (logtest? (-> self flags) (collectable-flags fading ignore-blue)))
|
||||
(!= (-> self next-state name) 'pickup)
|
||||
(begin (check-blue-suck (the-as process-drawable arg0)) #t)
|
||||
(begin (check-blue-suck (the-as process-drawable proc)) #t)
|
||||
(logtest? (-> self flags) (collectable-flags can-collect))
|
||||
(>= (- (-> *display* base-frame-counter) (-> self birth-time)) (-> self collect-timeout))
|
||||
)
|
||||
(logclear! (-> self mask) (process-mask actor-pause))
|
||||
(go-virtual notice-blue (process->handle arg0))
|
||||
(go-virtual notice-blue (process->handle proc))
|
||||
)
|
||||
)
|
||||
((= arg2 'trans)
|
||||
(set! (-> self root-override trans quad) (-> (the-as vector (-> arg3 param 0)) quad))
|
||||
((= event-type 'trans)
|
||||
(set! (-> self root-override trans quad) (-> (the-as vector (-> event param 0)) quad))
|
||||
(update-transforms! (-> self root-override))
|
||||
(ja-post)
|
||||
)
|
||||
((= arg2 'jump)
|
||||
((= event-type 'jump)
|
||||
(logclear! (-> self mask) (process-mask actor-pause))
|
||||
(set! (-> self jump-pos quad) (-> (the-as vector (-> arg3 param 0)) quad))
|
||||
(set! (-> self jump-pos quad) (-> (the-as vector (-> event param 0)) quad))
|
||||
(go-virtual jump)
|
||||
)
|
||||
((= arg2 'pickup)
|
||||
((= event-type 'pickup)
|
||||
(when (!= (-> self next-state name) 'pickup)
|
||||
(if (and (> arg1 0) (-> arg3 param 0))
|
||||
(move-to-point! (-> self root-override) (the-as vector (-> arg3 param 0)))
|
||||
(if (and (> arg1 0) (-> event param 0))
|
||||
(move-to-point! (-> self root-override) (the-as vector (-> event param 0)))
|
||||
)
|
||||
(logclear! (-> self mask) (process-mask actor-pause))
|
||||
(go-virtual pickup #f (the-as handle #f))
|
||||
)
|
||||
)
|
||||
((= arg2 'die)
|
||||
((= event-type 'die)
|
||||
(logclear! (-> self mask) (process-mask actor-pause))
|
||||
(go-virtual die)
|
||||
)
|
||||
((= arg2 'movie-pos)
|
||||
(set! v0-3 (the-as none (-> arg3 param 0)))
|
||||
((= event-type 'movie-pos)
|
||||
(set! v0-3 (the-as none (-> event param 0)))
|
||||
(set! (-> self movie-pos-index) (the-as int v0-3))
|
||||
v0-3
|
||||
)
|
||||
((= arg2 'actor-pause)
|
||||
((= event-type 'actor-pause)
|
||||
(cond
|
||||
((-> arg3 param 0)
|
||||
((-> event param 0)
|
||||
(logior! (-> self mask) (process-mask actor-pause))
|
||||
(set! v0-3 (the-as none #t))
|
||||
(set! (-> self actor-pause) (the-as symbol v0-3))
|
||||
@@ -556,7 +556,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
((= arg2 'fade)
|
||||
((= event-type 'fade)
|
||||
(logior! (-> self flags) (collectable-flags fade))
|
||||
(set! (-> self fadeout-timeout) (seconds 0.1))
|
||||
(set! v0-3 (the-as none (-> *display* base-frame-counter)))
|
||||
@@ -661,16 +661,16 @@
|
||||
;; failed to figure out what this is:
|
||||
(defstate notice-blue (eco-collectable)
|
||||
:virtual #t
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(when (and (or (= arg2 'touch) (= arg2 'attack))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(when (and (or (= event-type 'touch) (= event-type 'attack))
|
||||
(and (logtest? (-> self flags) (collectable-flags can-collect))
|
||||
(>= (- (-> *display* base-frame-counter) (-> self birth-time)) (-> self collect-timeout))
|
||||
(!= (-> self next-state name) 'pickup)
|
||||
(send-event arg0 'get-pickup (-> self fact pickup-type) (-> self fact pickup-amount))
|
||||
(send-event proc 'get-pickup (-> self fact pickup-type) (-> self fact pickup-amount))
|
||||
)
|
||||
)
|
||||
(logclear! (-> self mask) (process-mask actor-pause))
|
||||
(go-virtual pickup #f (process->handle arg0))
|
||||
(go-virtual pickup #f (process->handle proc))
|
||||
)
|
||||
)
|
||||
:enter (behavior ((arg0 handle))
|
||||
@@ -732,15 +732,15 @@
|
||||
;; failed to figure out what this is:
|
||||
(defstate pickup (eco-collectable)
|
||||
:virtual #t
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as
|
||||
object
|
||||
(cond
|
||||
((= v1-0 'set-movie-pos)
|
||||
(let ((v1-3 (res-lump-struct (-> self entity) 'movie-pos vector :time (the-as float -1000000000.0))))
|
||||
(the-as symbol (when v1-3
|
||||
(set! (-> v1-3 quad) (-> (the-as vector (-> arg3 param 0)) quad))
|
||||
(set! (-> v1-3 quad) (-> (the-as vector (-> event param 0)) quad))
|
||||
(the-as symbol v1-3)
|
||||
)
|
||||
)
|
||||
@@ -748,7 +748,7 @@
|
||||
)
|
||||
((= v1-0 'actor-pause)
|
||||
(the-as symbol (cond
|
||||
((-> arg3 param 0)
|
||||
((-> event param 0)
|
||||
(logior! (-> self mask) (process-mask actor-pause))
|
||||
(let ((v0-1 #t))
|
||||
(set! (-> self actor-pause) v0-1)
|
||||
@@ -944,8 +944,8 @@
|
||||
;; failed to figure out what this is:
|
||||
(defstate die (eco)
|
||||
:virtual #t
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (cond
|
||||
((= v1-0 'fade)
|
||||
(process-entity-status! self (entity-perm-status dead) #t)
|
||||
@@ -1213,7 +1213,7 @@
|
||||
|
||||
;; definition for method 12 of type money
|
||||
(defmethod run-logic? money ((obj money))
|
||||
(or (zero? (logand (-> obj mask) (process-mask actor-pause)))
|
||||
(or (not (logtest? (-> obj mask) (process-mask actor-pause)))
|
||||
(or (and (nonzero? (-> obj draw))
|
||||
(logtest? (-> obj draw status) (draw-status was-drawn))
|
||||
(>= (+ (-> *ACTOR-bank* pause-dist) (-> obj root-override pause-adjust-distance))
|
||||
@@ -1572,9 +1572,9 @@
|
||||
;; failed to figure out what this is:
|
||||
(defstate wait (fuel-cell)
|
||||
:virtual #t
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(local-vars (v0-3 none))
|
||||
(when (and (or (= arg2 'touch) (= arg2 'attack))
|
||||
(when (and (or (= event-type 'touch) (= event-type 'attack))
|
||||
(and (logtest? (-> self flags) (collectable-flags can-collect))
|
||||
(>= (- (-> *display* base-frame-counter) (-> self birth-time)) (-> self collect-timeout))
|
||||
(and (not (handle->process (-> *game-info* other-camera-handle)))
|
||||
@@ -1588,37 +1588,37 @@
|
||||
(add-setting! 'allow-progress #f 0.0 0)
|
||||
(apply-settings *setting-control*)
|
||||
(logclear! (-> self mask) (process-mask actor-pause))
|
||||
(go-virtual pickup #f (process->handle arg0))
|
||||
(go-virtual pickup #f (process->handle proc))
|
||||
)
|
||||
(the-as object (cond
|
||||
((= arg2 'trans)
|
||||
(set! (-> self root-override trans quad) (-> (the-as vector (-> arg3 param 0)) quad))
|
||||
((= event-type 'trans)
|
||||
(set! (-> self root-override trans quad) (-> (the-as vector (-> event param 0)) quad))
|
||||
(set! (-> self base quad) (-> self root-override trans quad))
|
||||
(update-transforms! (-> self root-override))
|
||||
)
|
||||
((= arg2 'pickup)
|
||||
((= event-type 'pickup)
|
||||
(when (!= (-> self next-state name) 'pickup)
|
||||
(if (and (> arg1 0) (-> arg3 param 0))
|
||||
(move-to-point! (-> self root-override) (the-as vector (-> arg3 param 0)))
|
||||
(if (and (> arg1 0) (-> event param 0))
|
||||
(move-to-point! (-> self root-override) (the-as vector (-> event param 0)))
|
||||
)
|
||||
(logclear! (-> self mask) (process-mask actor-pause))
|
||||
(go-virtual pickup #f (process->handle *target*))
|
||||
)
|
||||
)
|
||||
((= arg2 'collide-shape)
|
||||
(if (-> arg3 param 0)
|
||||
((= event-type 'collide-shape)
|
||||
(if (-> event param 0)
|
||||
(restore-collide-with-as (-> self root-override))
|
||||
(clear-collide-with-as (-> self root-override))
|
||||
)
|
||||
)
|
||||
((= arg2 'movie-pos)
|
||||
(set! v0-3 (the-as none (-> arg3 param 0)))
|
||||
((= event-type 'movie-pos)
|
||||
(set! v0-3 (the-as none (-> event param 0)))
|
||||
(set! (-> self movie-pos-index) (the-as int v0-3))
|
||||
v0-3
|
||||
)
|
||||
((= arg2 'anim)
|
||||
((= event-type 'anim)
|
||||
(cond
|
||||
((-> arg3 param 0)
|
||||
((-> event param 0)
|
||||
(set! v0-3 (the-as none (logclear (-> self flags) (collectable-flags anim))))
|
||||
(set! (-> self flags) (the-as collectable-flags v0-3))
|
||||
)
|
||||
@@ -2183,10 +2183,10 @@
|
||||
(go-virtual jump)
|
||||
)
|
||||
((and gp-1
|
||||
(zero? (logand (res-lump-value (-> self entity) 'options fact-options :time (the-as float -1000000000.0))
|
||||
(not (logtest? (res-lump-value (-> self entity) 'options fact-options :time (the-as float -1000000000.0))
|
||||
(fact-options skip-jump-anim)
|
||||
)
|
||||
)
|
||||
)
|
||||
(zero? (logand (-> self fact options) (fact-options skip-jump-anim)))
|
||||
)
|
||||
(set! (-> self jump-pos quad) (-> (the-as vector gp-1) quad))
|
||||
@@ -2202,19 +2202,19 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate fuel-cell-clone-anim (fuel-cell)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('pickup)
|
||||
(when (!= (-> self next-state name) 'pickup)
|
||||
(if (and (> arg1 0) (-> arg3 param 0))
|
||||
(move-to-point! (-> self root-override) (the-as vector (-> arg3 param 0)))
|
||||
(if (and (> arg1 0) (-> event param 0))
|
||||
(move-to-point! (-> self root-override) (the-as vector (-> event param 0)))
|
||||
)
|
||||
(logclear! (-> self mask) (process-mask actor-pause))
|
||||
(go-virtual pickup #f (the-as handle #f))
|
||||
)
|
||||
)
|
||||
(('trans)
|
||||
(set! (-> self root-override trans quad) (-> (the-as vector (-> arg3 param 0)) quad))
|
||||
(set! (-> self root-override trans quad) (-> (the-as vector (-> event param 0)) quad))
|
||||
(set! (-> self base quad) (-> self root-override trans quad))
|
||||
(update-transforms! (-> self root-override))
|
||||
)
|
||||
@@ -2338,8 +2338,8 @@
|
||||
;; failed to figure out what this is:
|
||||
(defstate pickup (buzzer)
|
||||
:virtual #t
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (if (= v1-0 'notify)
|
||||
(process-entity-status! self (entity-perm-status dead) #t)
|
||||
)
|
||||
@@ -3100,22 +3100,22 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate vent-wait-for-touch (vent)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(if (and (or (= arg2 'touch) (= arg2 'attack))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(if (and (or (= event-type 'touch) (= event-type 'attack))
|
||||
(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) 'get-pickup)
|
||||
(set! (-> a1-1 param 0) (the-as uint (-> self fact pickup-type)))
|
||||
(set! (-> a1-1 param 1) (the-as uint (-> self fact pickup-amount)))
|
||||
(and (= (send-event-function arg0 a1-1) #t)
|
||||
(or (logtest? (-> self fact options) (fact-options powerup)) (send-event arg0 'powerup))
|
||||
(and (= (send-event-function proc a1-1) #t)
|
||||
(or (logtest? (-> self fact options) (fact-options powerup)) (send-event proc 'powerup))
|
||||
)
|
||||
)
|
||||
)
|
||||
(go vent-pickup (process->handle arg0))
|
||||
(go vent-pickup (process->handle proc))
|
||||
)
|
||||
(vent-standard-event-handler arg0 arg1 arg2 arg3)
|
||||
(vent-standard-event-handler proc arg1 event-type event)
|
||||
)
|
||||
:code (behavior ()
|
||||
(loop
|
||||
@@ -3138,8 +3138,8 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate vent-blocked (vent)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('show)
|
||||
(go vent-wait-for-touch)
|
||||
)
|
||||
|
||||
+9
-9
@@ -825,28 +825,28 @@
|
||||
;; failed to figure out what this is:
|
||||
(defstate die (crate)
|
||||
:virtual #t
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('touched)
|
||||
(case (-> self defense)
|
||||
(('darkeco)
|
||||
(cond
|
||||
((= (-> arg0 type) target)
|
||||
(send-event arg0 'attack (-> arg3 param 0) (static-attack-info ((mode 'darkeco))))
|
||||
((= (-> proc type) target)
|
||||
(send-event proc 'attack (-> event param 0) (static-attack-info ((mode 'darkeco))))
|
||||
)
|
||||
(else
|
||||
(let ((a1-5 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> a1-5 from) self)
|
||||
(set! (-> a1-5 num-params) 4)
|
||||
(set! (-> a1-5 message) 'attack)
|
||||
(set! (-> a1-5 param 0) (-> arg3 param 0))
|
||||
(set! (-> a1-5 param 0) (-> event param 0))
|
||||
(set! (-> a1-5 param 1) (the-as uint 'darkeco))
|
||||
(let ((v1-12 (+ *global-attack-id* 1)))
|
||||
(set! *global-attack-id* v1-12)
|
||||
(set! (-> a1-5 param 2) (the-as uint v1-12))
|
||||
)
|
||||
(set! (-> a1-5 param 3) (the-as uint 0))
|
||||
(send-event-function arg0 a1-5)
|
||||
(send-event-function proc a1-5)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -985,10 +985,10 @@
|
||||
;; failed to figure out what this is:
|
||||
(defstate special-contents-die (crate)
|
||||
:virtual #t
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (when (= v1-0 'notify)
|
||||
(case (-> arg3 param 0)
|
||||
(case (-> event param 0)
|
||||
(('pickup)
|
||||
(let ((gp-0 (-> self entity extra perm)))
|
||||
(logior! (-> gp-0 status) (entity-perm-status user-set-from-cstage))
|
||||
|
||||
+1
-1
@@ -350,7 +350,7 @@
|
||||
(buzz-bits (get-reminder ctrl 0))
|
||||
)
|
||||
(when (and (>= buzz-index 0) (< buzz-index (the int (-> *FACT-bank* buzzer-max-default))))
|
||||
(if (zero? (logand buzz-bits (ash 1 buzz-index)))
|
||||
(if (not (logtest? buzz-bits (ash 1 buzz-index)))
|
||||
(set! (-> obj buzzer-total) (+ 1.0 (-> obj buzzer-total)))
|
||||
)
|
||||
(let ((t9-10 (method-of-object ctrl save-reminder)))
|
||||
|
||||
+2
-2
@@ -1728,8 +1728,8 @@ auto-save-post
|
||||
;; failed to figure out what this is:
|
||||
(defstate error (auto-save)
|
||||
:virtual #t
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (cond
|
||||
((= v1-0 'progress-allowed?)
|
||||
#t
|
||||
|
||||
+80
-77
@@ -243,15 +243,15 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate manipy-idle (manipy)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(local-vars (v0-0 none))
|
||||
(let ((v1-0 arg2))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as
|
||||
object
|
||||
(cond
|
||||
((= v1-0 'attackable)
|
||||
(cond
|
||||
((-> arg3 param 0)
|
||||
((-> event param 0)
|
||||
(set! v0-0 (the-as none (logior (process-mask attackable) (-> self mask))))
|
||||
(set! (-> self mask) (the-as process-mask v0-0))
|
||||
)
|
||||
@@ -264,7 +264,7 @@
|
||||
)
|
||||
((= v1-0 'blend-shape)
|
||||
(cond
|
||||
((-> arg3 param 0)
|
||||
((-> event param 0)
|
||||
(set! v0-0 (the-as none (logior (-> self skel status) (janim-status blerc eye))))
|
||||
(set! (-> self skel status) (the-as janim-status v0-0))
|
||||
)
|
||||
@@ -277,7 +277,7 @@
|
||||
)
|
||||
((= v1-0 'shadow)
|
||||
(cond
|
||||
((-> arg3 param 0)
|
||||
((-> event param 0)
|
||||
(set! v0-0 (the-as none (-> self shadow-backup)))
|
||||
(set! (-> self draw shadow) (the-as shadow-geo v0-0))
|
||||
v0-0
|
||||
@@ -289,37 +289,40 @@
|
||||
)
|
||||
)
|
||||
((= v1-0 'trans-hook)
|
||||
(set! v0-0 (the-as none (-> arg3 param 0)))
|
||||
(set! v0-0 (the-as none (-> event param 0)))
|
||||
(set! (-> self new-trans-hook) (the-as (function none) v0-0))
|
||||
v0-0
|
||||
)
|
||||
((= v1-0 'post-hook)
|
||||
(set! v0-0 (the-as none (-> arg3 param 0)))
|
||||
(set! v0-0 (the-as none (-> event param 0)))
|
||||
(set! (-> self new-post-hook) (the-as (function none) v0-0))
|
||||
v0-0
|
||||
)
|
||||
((= v1-0 'eval)
|
||||
((the-as (function manipy none) (-> arg3 param 0)) self)
|
||||
((the-as (function manipy none) (-> event param 0)) self)
|
||||
)
|
||||
((= v1-0 'become-hud-object)
|
||||
(convert-to-hud-object self (the-as hud (-> arg3 param 0)))
|
||||
(convert-to-hud-object self (the-as hud (-> event param 0)))
|
||||
)
|
||||
((= v1-0 'event-hook)
|
||||
(set! v0-0 (the-as none (-> arg3 param 0)))
|
||||
(set! v0-0 (the-as none (-> event param 0)))
|
||||
(set! (-> self cur-event-hook) (the-as (function none) v0-0))
|
||||
v0-0
|
||||
)
|
||||
((= v1-0 'art-joint-anim)
|
||||
(set! (-> self new-joint-anim)
|
||||
(the-as art-joint-anim (lookup-art (-> self draw art-group) (the-as string (-> arg3 param 0)) art-joint-anim))
|
||||
(the-as
|
||||
art-joint-anim
|
||||
(lookup-art (-> self draw art-group) (the-as string (-> event param 0)) art-joint-anim)
|
||||
)
|
||||
)
|
||||
(set! v0-0 (the-as none (-> arg3 param 1)))
|
||||
(set! v0-0 (the-as none (-> event param 1)))
|
||||
(set! (-> self new-joint-anim-blend) (the-as uint v0-0))
|
||||
v0-0
|
||||
)
|
||||
((= v1-0 'anim-mode)
|
||||
(when (nonzero? (-> self skel))
|
||||
(set! (-> self anim-mode) (the-as symbol (-> arg3 param 0)))
|
||||
(set! (-> self anim-mode) (the-as symbol (-> event param 0)))
|
||||
(if (= (-> self anim-mode) 'clone-anim)
|
||||
(ja-post)
|
||||
)
|
||||
@@ -327,16 +330,16 @@
|
||||
)
|
||||
)
|
||||
((or (= v1-0 'origin-joint-index) (= v1-0 'center-joint))
|
||||
(set! (-> self draw origin-joint-index) (-> arg3 param 0))
|
||||
(set! v0-0 (the-as none (-> arg3 param 0)))
|
||||
(set! (-> self draw origin-joint-index) (-> event param 0))
|
||||
(set! v0-0 (the-as none (-> event param 0)))
|
||||
(set! (-> self draw shadow-joint-index) (the-as uint v0-0))
|
||||
v0-0
|
||||
)
|
||||
((= v1-0 'max-vis-dist)
|
||||
(set! (-> self draw lod-set lod (-> self draw lod-set max-lod) dist) (the-as float (-> arg3 param 0)))
|
||||
(set! (-> self draw lod-set lod (-> self draw lod-set max-lod) dist) (the-as float (-> event param 0)))
|
||||
)
|
||||
((= v1-0 'grab)
|
||||
(set! (-> self cur-grab-handle) (process->handle (the-as process (-> arg3 param 0))))
|
||||
(set! (-> self cur-grab-handle) (process->handle (the-as process (-> event param 0))))
|
||||
(let ((v1-30 (handle->process (-> self cur-grab-handle))))
|
||||
(when v1-30
|
||||
(set! v0-0 (the-as none (-> self old-grab-pos)))
|
||||
@@ -346,33 +349,33 @@
|
||||
)
|
||||
)
|
||||
((= v1-0 'target)
|
||||
(set! v0-0 (the-as none (process->handle (the-as process (-> arg3 param 0)))))
|
||||
(set! v0-0 (the-as none (process->handle (the-as process (-> event param 0)))))
|
||||
(set! (-> self cur-target-handle) (the-as handle v0-0))
|
||||
v0-0
|
||||
)
|
||||
((= v1-0 'trans)
|
||||
(cond
|
||||
((type-type? (-> self root type) collide-shape)
|
||||
(move-to-point! (the-as collide-shape (-> self root)) (the-as vector (-> arg3 param 0)))
|
||||
(move-to-point! (the-as collide-shape (-> self root)) (the-as vector (-> event param 0)))
|
||||
)
|
||||
(else
|
||||
(set! v0-0 (the-as none (-> self root trans)))
|
||||
(set! (-> (the-as vector v0-0) quad) (-> (the-as vector (-> arg3 param 0)) quad))
|
||||
(set! (-> (the-as vector v0-0) quad) (-> (the-as vector (-> event param 0)) quad))
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
)
|
||||
((= v1-0 'rot)
|
||||
(let ((s5-0 (new 'stack-no-clear 'matrix)))
|
||||
(matrix-rotate-y! s5-0 (the-as float (-> arg3 param 0)))
|
||||
(matrix-rotate-y! s5-0 (the-as float (-> event param 0)))
|
||||
(matrix->quaternion (-> self root quat) s5-0)
|
||||
)
|
||||
)
|
||||
((= v1-0 'rot-quat)
|
||||
(quaternion-copy! (-> self root quat) (the-as quaternion (-> arg3 param 0)))
|
||||
(quaternion-copy! (-> self root quat) (the-as quaternion (-> event param 0)))
|
||||
)
|
||||
((= v1-0 'clone-copy-trans)
|
||||
(set! v0-0 (the-as none (-> arg3 param 0)))
|
||||
(set! v0-0 (the-as none (-> event param 0)))
|
||||
(set! (-> self clone-copy-trans) (the-as symbol v0-0))
|
||||
v0-0
|
||||
)
|
||||
@@ -381,9 +384,9 @@
|
||||
#f
|
||||
)
|
||||
((= v1-0 'draw)
|
||||
(set! (-> self draw?) (the-as symbol (-> arg3 param 0)))
|
||||
(set! (-> self draw?) (the-as symbol (-> event param 0)))
|
||||
(cond
|
||||
((-> arg3 param 0)
|
||||
((-> event param 0)
|
||||
(let ((v1-47 (logtest? (-> self draw status) (draw-status hidden))))
|
||||
(logclear! (-> self draw status) (draw-status hidden))
|
||||
(when v1-47
|
||||
@@ -411,7 +414,7 @@
|
||||
)
|
||||
)
|
||||
((= v1-0 'query)
|
||||
(case (-> arg3 param 0)
|
||||
(case (-> event param 0)
|
||||
(('grab)
|
||||
(handle->process (-> self cur-grab-handle))
|
||||
)
|
||||
@@ -427,7 +430,7 @@
|
||||
((= v1-0 'set-frame-num)
|
||||
(let ((v1-73 (-> self skel root-channel 0)))
|
||||
(set! (-> v1-73 num-func) num-func-identity)
|
||||
(set! (-> v1-73 frame-num) (the-as float (-> arg3 param 0)))
|
||||
(set! (-> v1-73 frame-num) (the-as float (-> event param 0)))
|
||||
)
|
||||
)
|
||||
(else
|
||||
@@ -903,7 +906,7 @@
|
||||
(send-event gp-0 'query 'done)
|
||||
)
|
||||
((type-type? (-> gp-0 type) process-drawable)
|
||||
(when (zero? (logand (-> (the-as process-drawable gp-0) skel status) (janim-status done)))
|
||||
(when (not (logtest? (-> (the-as process-drawable gp-0) skel status) (janim-status done)))
|
||||
(let ((s5-0 pp))
|
||||
(set! pp gp-0)
|
||||
(let ((v0-1 (the-as object (ja-done? 0))))
|
||||
@@ -1152,22 +1155,22 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate camera-tracker-process (camera-tracker)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(local-vars (v0-0 uint))
|
||||
(let ((v1-0 arg2))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (cond
|
||||
((= v1-0 'message)
|
||||
(set! v0-0 (-> arg3 param 0))
|
||||
(set! v0-0 (-> event param 0))
|
||||
(set! (-> self message) (the-as basic v0-0))
|
||||
v0-0
|
||||
)
|
||||
((= v1-0 'mask)
|
||||
(set! v0-0 (-> arg3 param 0))
|
||||
(set! v0-0 (-> event param 0))
|
||||
(set! (-> self mask-to-clear) (the-as process-mask v0-0))
|
||||
v0-0
|
||||
)
|
||||
((= v1-0 'border)
|
||||
(set! v0-0 (-> arg3 param 0))
|
||||
(set! v0-0 (-> event param 0))
|
||||
(set! (-> self border-value) (the-as basic v0-0))
|
||||
v0-0
|
||||
)
|
||||
@@ -1323,7 +1326,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (zero? (logand (-> self draw status) (draw-status hidden)))
|
||||
(when (not (logtest? (-> self draw status) (draw-status hidden)))
|
||||
(let ((v1-36 (-> self draw))
|
||||
(a0-18 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
@@ -1421,8 +1424,8 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate part-spawner-active (part-spawner)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('stop)
|
||||
(process-entity-status! self (entity-perm-status complete) #t)
|
||||
(set! (-> self enable) #f)
|
||||
@@ -1434,7 +1437,7 @@
|
||||
#t
|
||||
)
|
||||
(('trans)
|
||||
(let ((v0-1 (the-as object (-> (the-as vector (-> arg3 param 0)) quad))))
|
||||
(let ((v0-1 (the-as object (-> (the-as vector (-> event param 0)) quad))))
|
||||
(set! (-> self root trans quad) (the-as uint128 v0-1))
|
||||
v0-1
|
||||
)
|
||||
@@ -1827,13 +1830,13 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate cam-launcher-shortfall (camera-slave)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('teleport)
|
||||
#f
|
||||
)
|
||||
(else
|
||||
(cam-standard-event-handler arg0 arg1 arg2 arg3)
|
||||
(cam-standard-event-handler proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1859,7 +1862,7 @@
|
||||
(none)
|
||||
)
|
||||
:trans (behavior ()
|
||||
(if (zero? (logand (-> *camera* master-options) 2))
|
||||
(if (not (logtest? (-> *camera* master-options) 2))
|
||||
(cam-slave-go cam-free-floating)
|
||||
)
|
||||
(none)
|
||||
@@ -1900,13 +1903,13 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate cam-launcher-longfall (camera-slave)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('teleport)
|
||||
#f
|
||||
)
|
||||
(else
|
||||
(cam-standard-event-handler arg0 arg1 arg2 arg3)
|
||||
(cam-standard-event-handler proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1925,7 +1928,7 @@
|
||||
(none)
|
||||
)
|
||||
:trans (behavior ()
|
||||
(if (zero? (logand (-> *camera* master-options) 2))
|
||||
(if (not (logtest? (-> *camera* master-options) 2))
|
||||
(cam-slave-go cam-free-floating)
|
||||
)
|
||||
(cam-launcher-long-joystick)
|
||||
@@ -1996,13 +1999,13 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate launcher-idle (launcher)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('instant-death)
|
||||
(go launcher-deactivated)
|
||||
)
|
||||
(('trans)
|
||||
(move-to-point! (-> self root-override) (the-as vector (-> arg3 param 0)))
|
||||
(move-to-point! (-> self root-override) (the-as vector (-> event param 0)))
|
||||
(update-transforms! (-> self root-override))
|
||||
)
|
||||
)
|
||||
@@ -2043,17 +2046,17 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate launcher-active (launcher)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(when (or (= arg2 'touch) (= arg2 'attack))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(when (or (= event-type 'touch) (= event-type 'attack))
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
(send-event arg0 'launch (-> self spring-height) (-> self camera) (-> self dest) (-> self seek-time))
|
||||
(send-event proc 'launch (-> self spring-height) (-> self camera) (-> self dest) (-> self seek-time))
|
||||
)
|
||||
(cond
|
||||
((= arg2 'instant-death)
|
||||
((= event-type 'instant-death)
|
||||
(go launcher-deactivated)
|
||||
)
|
||||
((= arg2 'trans)
|
||||
(move-to-point! (-> self root-override) (the-as vector (-> arg3 param 0)))
|
||||
((= event-type 'trans)
|
||||
(move-to-point! (-> self root-override) (the-as vector (-> event param 0)))
|
||||
(update-transforms! (-> self root-override))
|
||||
)
|
||||
)
|
||||
@@ -2229,19 +2232,19 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate touch-tracker-idle (touch-tracker)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(local-vars (v0-0 none))
|
||||
(let ((v1-0 arg2))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (cond
|
||||
((= v1-0 'touched)
|
||||
(let ((v1-1 (ppointer->process (-> self parent))))
|
||||
(when (!= v1-1 arg0)
|
||||
(when (!= v1-1 proc)
|
||||
(cond
|
||||
((= (-> self event) 'attack)
|
||||
(cond
|
||||
((= (-> arg0 type) target)
|
||||
((= (-> proc type) target)
|
||||
(send-event
|
||||
arg0
|
||||
proc
|
||||
(-> self event)
|
||||
:from (the-as process v1-1)
|
||||
#f
|
||||
@@ -2250,7 +2253,7 @@
|
||||
)
|
||||
((= (-> v1-1 type) target)
|
||||
(send-event
|
||||
arg0
|
||||
proc
|
||||
(-> self event)
|
||||
:from (the-as process v1-1)
|
||||
#f
|
||||
@@ -2271,26 +2274,26 @@
|
||||
(set! (-> a1-5 param 2) (the-as uint v1-19))
|
||||
)
|
||||
(set! (-> a1-5 param 3) (the-as uint 0))
|
||||
(send-event-function arg0 a1-5)
|
||||
(send-event-function proc a1-5)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
((-> self event)
|
||||
(send-event arg0 (-> self event) :from (the-as process v1-1))
|
||||
(send-event proc (-> self event) :from (the-as process v1-1))
|
||||
)
|
||||
(else
|
||||
(let ((t0-5 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> t0-5 from) arg0)
|
||||
(set! (-> t0-5 from) proc)
|
||||
(set! (-> t0-5 num-params) arg1)
|
||||
(set! (-> t0-5 message) arg2)
|
||||
(set! (-> t0-5 param 0) (-> arg3 param 0))
|
||||
(set! (-> t0-5 param 1) (-> arg3 param 1))
|
||||
(set! (-> t0-5 param 2) (-> arg3 param 2))
|
||||
(set! (-> t0-5 param 3) (-> arg3 param 3))
|
||||
(set! (-> t0-5 param 4) (-> arg3 param 4))
|
||||
(set! (-> t0-5 param 5) (-> arg3 param 5))
|
||||
(set! (-> t0-5 param 6) (-> arg3 param 6))
|
||||
(set! (-> t0-5 message) event-type)
|
||||
(set! (-> t0-5 param 0) (-> event param 0))
|
||||
(set! (-> t0-5 param 1) (-> event param 1))
|
||||
(set! (-> t0-5 param 2) (-> event param 2))
|
||||
(set! (-> t0-5 param 3) (-> event param 3))
|
||||
(set! (-> t0-5 param 4) (-> event param 4))
|
||||
(set! (-> t0-5 param 5) (-> event param 5))
|
||||
(set! (-> t0-5 param 6) (-> event param 6))
|
||||
(send-event-function v1-1 t0-5)
|
||||
)
|
||||
)
|
||||
@@ -2299,26 +2302,26 @@
|
||||
)
|
||||
)
|
||||
((= v1-0 'target)
|
||||
(set! v0-0 (the-as none (process->handle (the-as process (-> arg3 param 0)))))
|
||||
(set! v0-0 (the-as none (process->handle (the-as process (-> event param 0)))))
|
||||
(set! (-> self target) (the-as handle v0-0))
|
||||
v0-0
|
||||
)
|
||||
((= v1-0 'event)
|
||||
(set! (-> self event) (the-as symbol (-> arg3 param 0)))
|
||||
(set! v0-0 (the-as none (-> arg3 param 1)))
|
||||
(set! (-> self event) (the-as symbol (-> event param 0)))
|
||||
(set! v0-0 (the-as none (-> event param 1)))
|
||||
(set! (-> self event-mode) (the-as basic v0-0))
|
||||
v0-0
|
||||
)
|
||||
((= v1-0 'exit)
|
||||
(set! v0-0 (the-as none (-> arg3 param 0)))
|
||||
(set! v0-0 (the-as none (-> event param 0)))
|
||||
(set! (-> self run-function) (the-as (function object) v0-0))
|
||||
v0-0
|
||||
)
|
||||
((= v1-0 'eval)
|
||||
((the-as (function touch-tracker none) (-> arg3 param 0)) self)
|
||||
((the-as (function touch-tracker none) (-> event param 0)) self)
|
||||
)
|
||||
((= v1-0 'function)
|
||||
(set! v0-0 (the-as none (-> arg3 param 0)))
|
||||
(set! v0-0 (the-as none (-> event param 0)))
|
||||
(set! (-> self callback) (the-as (function touch-tracker none) v0-0))
|
||||
v0-0
|
||||
)
|
||||
|
||||
+2
-2
@@ -664,8 +664,8 @@
|
||||
(stop! (-> self sound))
|
||||
)
|
||||
(when (and (< 0.0 (-> self fact-info-target eco-level))
|
||||
(zero? (logand (-> self state-flags) (state-flags first-person-mode)))
|
||||
(zero? (logand (-> self draw status) (draw-status hidden no-anim)))
|
||||
(not (logtest? (-> self state-flags) (state-flags first-person-mode)))
|
||||
(not (logtest? (-> self draw status) (draw-status hidden no-anim)))
|
||||
(not (movie?))
|
||||
(rand-vu-percent?
|
||||
(lerp-scale
|
||||
|
||||
+10
-10
@@ -159,7 +159,7 @@
|
||||
(set! sv-80 (logior sv-80 16))
|
||||
)
|
||||
(set! sv-224 (< (fabs (-> arg0 surface-angle)) (-> *pat-mode-info* (-> arg0 cur-pat mode) wall-angle)))
|
||||
(if (zero? (logand (-> arg0 prev-status) (cshape-moving-flags onsurf)))
|
||||
(if (not (logtest? (-> arg0 prev-status) (cshape-moving-flags onsurf)))
|
||||
(set! (-> arg0 ground-impact-vel) (- (vector-dot (-> arg0 transv) (-> arg0 dynam gravity-normal))))
|
||||
)
|
||||
(set! sv-80 (logior sv-80 4))
|
||||
@@ -647,33 +647,33 @@
|
||||
;; failed to figure out what this is:
|
||||
(defstate projectile-moving (projectile)
|
||||
:virtual #t
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('touched)
|
||||
(when (-> self attack-mode)
|
||||
(when (cond
|
||||
((= (-> arg0 type) target)
|
||||
(send-event arg0 'attack (-> arg3 param 0) (static-attack-info ((mode (-> self attack-mode)))))
|
||||
((= (-> proc type) target)
|
||||
(send-event proc 'attack (-> event param 0) (static-attack-info ((mode (-> self attack-mode)))))
|
||||
)
|
||||
(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 0) (-> event 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)
|
||||
(send-event-function proc a1-2)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-14 (-> self notify-handle)))
|
||||
(if (handle->process v1-14)
|
||||
(send-event (-> v1-14 process 0) 'notify 'attack arg0)
|
||||
(send-event (-> v1-14 process 0) 'notify 'attack proc)
|
||||
)
|
||||
)
|
||||
(+! (-> self hits) 1)
|
||||
@@ -982,7 +982,7 @@
|
||||
)
|
||||
(sound-play "yellow-fire")
|
||||
(set! (-> obj sound-id) (sound-play "yellow-buzz"))
|
||||
(if (zero? (logand (-> obj options) 416))
|
||||
(if (not (logtest? (-> obj options) 416))
|
||||
(process-spawn part-tracker :init part-tracker-init (-> *part-group-id-table* 103) -1 #f #f #f s5-0 :to obj)
|
||||
)
|
||||
(set! (-> *part-id-table* 350 init-specs 2 initial-valuef) f30-0)
|
||||
@@ -1002,7 +1002,7 @@
|
||||
(logior! (-> obj root-override root-prim collide-with) (collide-kind water))
|
||||
)
|
||||
(('ogre)
|
||||
(when (zero? (logand (-> obj options) 128))
|
||||
(when (not (logtest? (-> obj options) 128))
|
||||
(set! (-> obj water) (new 'process 'water-control obj 0 0.0 8192.0 2048.0))
|
||||
(set! (-> obj water flags) (water-flags wt01 wt04 wt07))
|
||||
(set! (-> obj water height) 129024.0)
|
||||
|
||||
+1
-1
@@ -34,7 +34,7 @@
|
||||
)
|
||||
)
|
||||
(('sfx-volume)
|
||||
(when (or (zero? (logand (-> *kernel-context* prevent-from-run) (process-mask progress)))
|
||||
(when (or (not (logtest? (-> *kernel-context* prevent-from-run) (process-mask progress)))
|
||||
(= (get-process conn) (ppointer->process *progress-process*))
|
||||
)
|
||||
(case (the-as symbol (-> conn param1))
|
||||
|
||||
+23
-23
@@ -605,11 +605,11 @@
|
||||
;; failed to figure out what this is:
|
||||
(defstate play-anim (process-taskable)
|
||||
:virtual #t
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('shadow)
|
||||
(cond
|
||||
((-> arg3 param 0)
|
||||
((-> event param 0)
|
||||
(let ((v0-0 (the-as object (-> self shadow-backup))))
|
||||
(set! (-> self draw shadow) (the-as shadow-geo v0-0))
|
||||
v0-0
|
||||
@@ -624,10 +624,10 @@
|
||||
(('shadow-min-max)
|
||||
(let ((v1-5 (-> self draw shadow-ctrl)))
|
||||
(let ((a0-4 v1-5))
|
||||
(set! (-> a0-4 settings bot-plane w) (- (the-as float (-> arg3 param 0))))
|
||||
(set! (-> a0-4 settings bot-plane w) (- (the-as float (-> event param 0))))
|
||||
)
|
||||
0
|
||||
(set! (-> v1-5 settings top-plane w) (- (the-as float (-> arg3 param 1))))
|
||||
(set! (-> v1-5 settings top-plane w) (- (the-as float (-> event param 1))))
|
||||
)
|
||||
0
|
||||
)
|
||||
@@ -793,12 +793,12 @@
|
||||
;; failed to figure out what this is:
|
||||
(defstate be-clone (process-taskable)
|
||||
:virtual #t
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as shadow-geo (cond
|
||||
((= v1-0 'shadow)
|
||||
(the-as shadow-geo (cond
|
||||
((-> arg3 param 0)
|
||||
((-> event param 0)
|
||||
(let ((v0-0 (-> self shadow-backup)))
|
||||
(set! (-> self draw shadow) v0-0)
|
||||
v0-0
|
||||
@@ -814,10 +814,10 @@
|
||||
((= 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))))
|
||||
(set! (-> a0-5 settings bot-plane w) (- (the-as float (-> event param 0))))
|
||||
)
|
||||
0
|
||||
(set! (-> v1-5 settings top-plane w) (- (the-as float (-> arg3 param 1))))
|
||||
(set! (-> v1-5 settings top-plane w) (- (the-as float (-> event param 1))))
|
||||
)
|
||||
(the-as shadow-geo 0)
|
||||
)
|
||||
@@ -870,8 +870,8 @@
|
||||
;; failed to figure out what this is:
|
||||
(defstate idle (process-taskable)
|
||||
:virtual #t
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as
|
||||
object
|
||||
(cond
|
||||
@@ -881,7 +881,7 @@
|
||||
(if (-> self bounce-away)
|
||||
(the-as
|
||||
symbol
|
||||
(send-event arg0 'shove #f (static-attack-info ((shove-back (meters 3)) (shove-up (meters 1)))))
|
||||
(send-event proc 'shove #f (static-attack-info ((shove-back (meters 3)) (shove-up (meters 1)))))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -889,8 +889,8 @@
|
||||
((= v1-0 'touch)
|
||||
(the-as symbol (send-shove-back
|
||||
(-> self root-override)
|
||||
arg0
|
||||
(the-as touching-shapes-entry (-> arg3 param 0))
|
||||
proc
|
||||
(the-as touching-shapes-entry (-> event param 0))
|
||||
0.7
|
||||
6144.0
|
||||
16384.0
|
||||
@@ -898,7 +898,7 @@
|
||||
)
|
||||
)
|
||||
((= v1-0 'clone)
|
||||
(the-as symbol (go-virtual be-clone (the-as handle (-> arg3 param 0))))
|
||||
(the-as symbol (go-virtual be-clone (the-as handle (-> event param 0))))
|
||||
)
|
||||
((= v1-0 'play-anim)
|
||||
(logclear! (-> self mask) (process-mask actor-pause))
|
||||
@@ -1177,9 +1177,9 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate othercam-running (othercam)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(local-vars (v0-0 object))
|
||||
(case arg2
|
||||
(case event-type
|
||||
(('die)
|
||||
(set! v0-0 #t)
|
||||
(set! (-> self die?) (the-as symbol v0-0))
|
||||
@@ -1187,13 +1187,13 @@
|
||||
)
|
||||
(('joint)
|
||||
(let ((t9-0 type-type?)
|
||||
(v1-1 (-> arg3 param 0))
|
||||
(v1-1 (-> event param 0))
|
||||
)
|
||||
(cond
|
||||
((t9-0 (rtype-of v1-1) string)
|
||||
(let ((v1-8 (lookup-art
|
||||
(-> (the-as process-taskable (-> self hand process 0)) draw jgeo)
|
||||
(the-as string (-> arg3 param 0))
|
||||
(the-as string (-> event param 0))
|
||||
(the-as type #f)
|
||||
)
|
||||
)
|
||||
@@ -1205,8 +1205,8 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
((zero? (logand (-> arg3 param 0) 7))
|
||||
(set! v0-0 (-> arg3 param 0))
|
||||
((not (logtest? (-> event param 0) 7))
|
||||
(set! v0-0 (-> event param 0))
|
||||
(set! (-> self cam-joint-index) (the-as int v0-0))
|
||||
v0-0
|
||||
)
|
||||
@@ -1214,7 +1214,7 @@
|
||||
)
|
||||
)
|
||||
(('mask)
|
||||
(set! v0-0 (-> arg3 param 0))
|
||||
(set! v0-0 (-> event param 0))
|
||||
(set! (-> self mask-to-clear) (the-as process-mask v0-0))
|
||||
v0-0
|
||||
)
|
||||
|
||||
+3
-3
@@ -134,8 +134,8 @@
|
||||
;; failed to figure out what this is:
|
||||
(defstate enter (voicebox)
|
||||
:virtual #t
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('die)
|
||||
(go-virtual exit)
|
||||
)
|
||||
@@ -240,7 +240,7 @@
|
||||
:event (-> cam-string event)
|
||||
:enter (-> cam-string enter)
|
||||
:trans (behavior ()
|
||||
(if (zero? (logand (-> *camera* master-options) 2))
|
||||
(if (not (logtest? (-> *camera* master-options) 2))
|
||||
(deactivate self)
|
||||
)
|
||||
(none)
|
||||
|
||||
+1
-1
@@ -152,7 +152,7 @@
|
||||
(let ((v1-36 (the-as object #x1000d000))
|
||||
(a0-19 (the-as object #x7000006c))
|
||||
)
|
||||
(b! (zero? (logand (-> (the-as terrain-context v1-36) bsp lev-index) 256)) cfg-9 :delay (nop!))
|
||||
(b! (not (logtest? (-> (the-as terrain-context v1-36) bsp lev-index) 256)) cfg-9 :delay (nop!))
|
||||
(let ((a1-6 (-> (the-as generic-envmap-saves a0-19) index-mask x)))
|
||||
(nop!)
|
||||
(let ((a2-1 (-> (the-as (pointer int32) v1-36) 0)))
|
||||
|
||||
+1
-1
@@ -56,7 +56,7 @@
|
||||
(set! (-> env frame1) (new 'static 'gs-frame :fbw (/ width 64) :psm (logand psm 15) :fbp fbp))
|
||||
(set! (-> env dtheaddr) (gs-reg64 dthe))
|
||||
(cond
|
||||
((zero? (logand psm 2))
|
||||
((not (logtest? psm 2))
|
||||
(set! (-> env dthe) (new 'static 'gs-dthe))
|
||||
0
|
||||
)
|
||||
|
||||
+1
-1
@@ -236,7 +236,7 @@
|
||||
)
|
||||
)
|
||||
(cond
|
||||
((zero? (logand -65536 (the-as int (-> obj header eye-ctrl))))
|
||||
((not (logtest? -65536 (the-as int (-> obj header eye-ctrl))))
|
||||
(set! (-> obj header eye-ctrl) (the-as merc-eye-ctrl 0))
|
||||
0
|
||||
)
|
||||
|
||||
+1
-1
@@ -170,7 +170,7 @@
|
||||
(v1-1 (-> arg0 draw))
|
||||
(a1-5 (-> v1-1 lod-set lod (-> v1-1 cur-lod) geo effect))
|
||||
)
|
||||
(if (or (zero? (logand (-> a1-5 0 effect-bits) 4)) (not (-> v1-1 ripple)))
|
||||
(if (or (not (logtest? (-> a1-5 0 effect-bits) 4)) (not (-> v1-1 ripple)))
|
||||
(return f30-0)
|
||||
)
|
||||
(let* ((a1-6 (-> a1-5 0 extra-info))
|
||||
|
||||
+14
-14
@@ -686,7 +686,7 @@
|
||||
(with-pp
|
||||
(let ((s5-0 (-> obj flags)))
|
||||
(cond
|
||||
((zero? (logand (-> obj flags) (water-flags wt01)))
|
||||
((not (logtest? (-> obj flags) (water-flags wt01)))
|
||||
(logclear! (-> obj flags) (water-flags wt09 wt10 wt11 wt12 wt13 wt14 wt16))
|
||||
)
|
||||
((and (logtest? (water-flags wt21) (-> obj flags))
|
||||
@@ -710,7 +710,7 @@
|
||||
)
|
||||
)
|
||||
(set! (-> obj real-ocean-offset) (- (ocean-get-height (the-as vector (-> obj bottom))) (-> obj base-height)))
|
||||
(if (zero? (logand (-> obj flags) (water-flags wt09)))
|
||||
(if (not (logtest? (-> obj flags) (water-flags wt09)))
|
||||
(set! (-> obj ocean-offset) (-> obj real-ocean-offset))
|
||||
(set! (-> obj ocean-offset) (lerp (-> obj ocean-offset) (-> obj real-ocean-offset) 0.2))
|
||||
)
|
||||
@@ -720,7 +720,7 @@
|
||||
(f30-0 (ripple-find-height (the-as process-drawable a0-26) 0 (the-as vector (-> obj bottom))))
|
||||
)
|
||||
(set! (-> obj real-ocean-offset) (- f30-0 (-> obj base-height)))
|
||||
(if (zero? (logand (-> obj flags) (water-flags wt09)))
|
||||
(if (not (logtest? (-> obj flags) (water-flags wt09)))
|
||||
(set! (-> obj ocean-offset) (-> obj real-ocean-offset))
|
||||
(set! (-> obj ocean-offset) (lerp (-> obj ocean-offset) (-> obj real-ocean-offset) 0.2))
|
||||
)
|
||||
@@ -753,7 +753,7 @@
|
||||
(set! (-> obj drip-wetness) 1.0)
|
||||
(set! (-> obj drip-height) (fmax (- (-> obj surface-height) (-> obj bottom 0 y)) (-> obj drip-height)))
|
||||
(set! (-> obj drip-speed) 15.0)
|
||||
(if (zero? (logand (-> obj flags) (water-flags wt09)))
|
||||
(if (not (logtest? (-> obj flags) (water-flags wt09)))
|
||||
(TODO-RENAME-15 obj)
|
||||
)
|
||||
(cond
|
||||
@@ -882,7 +882,7 @@
|
||||
(>= f30-3 (-> obj bottom 0 y))
|
||||
(and (logtest? s5-0 (water-flags wt11))
|
||||
(logtest? (-> (the-as collide-shape-moving (-> obj process root)) status) (cshape-moving-flags tsurf))
|
||||
(zero? (logand (-> (the-as collide-shape-moving (-> obj process root)) status) (cshape-moving-flags onsurf)))
|
||||
(not (logtest? (-> (the-as collide-shape-moving (-> obj process root)) status) (cshape-moving-flags onsurf)))
|
||||
(>= (+ 204.8 f30-3) (-> obj bottom 0 y))
|
||||
)
|
||||
)
|
||||
@@ -897,7 +897,7 @@
|
||||
(set! (-> obj swim-time) (-> *display* base-frame-counter))
|
||||
(send-event (-> obj process) 'swim)
|
||||
(logior! (-> obj flags) (water-flags wt11))
|
||||
(if (zero? (logand s5-0 (water-flags wt11)))
|
||||
(if (not (logtest? s5-0 (water-flags wt11)))
|
||||
(set! (-> obj enter-swim-time) (-> *display* base-frame-counter))
|
||||
)
|
||||
(cond
|
||||
@@ -909,7 +909,7 @@
|
||||
(set! (-> v1-200 quad) (-> obj bottom 0 quad))
|
||||
(set! (-> v1-200 y) (- (-> obj height) (-> obj swim-height)))
|
||||
(let ((s4-4 (-> obj process root)))
|
||||
(when (and (zero? (logand (-> (the-as collide-shape-moving s4-4) status) (cshape-moving-flags csmf12)))
|
||||
(when (and (not (logtest? (-> (the-as collide-shape-moving s4-4) status) (cshape-moving-flags csmf12)))
|
||||
(logtest? (-> obj flags) (water-flags wt11))
|
||||
(zero? (logand (-> (the-as collide-shape-moving s4-4) root-prim prim-core action) (collide-action ca-9)))
|
||||
)
|
||||
@@ -952,7 +952,7 @@
|
||||
(set! (-> a1-30 quad) (-> obj bottom 0 quad))
|
||||
(let ((s5-1 (-> obj process root)))
|
||||
(set! (-> a1-30 y) f30-3)
|
||||
(when (zero? (logand (-> (the-as collide-shape-moving s5-1) root-prim prim-core action) (collide-action ca-9)))
|
||||
(when (not (logtest? (-> (the-as collide-shape-moving s5-1) root-prim prim-core action) (collide-action ca-9)))
|
||||
(let ((f30-4 (-> (the-as collide-shape-moving s5-1) ground-impact-vel)))
|
||||
(move-to-ground-point! (the-as collide-shape-moving s5-1) a1-30 (-> s5-1 transv) *up-vector*)
|
||||
(logior! (-> (the-as collide-shape-moving s5-1) status) (cshape-moving-flags on-water))
|
||||
@@ -974,10 +974,10 @@
|
||||
)
|
||||
(when (< (-> obj process root trans y) -409.6)
|
||||
(send-event (-> obj process) 'no-look-around (seconds 1.5))
|
||||
(when (zero? (logand (-> (the-as collide-shape-moving (-> obj process root)) root-prim prim-core action)
|
||||
(when (not (logtest? (-> (the-as collide-shape-moving (-> obj process root)) root-prim prim-core action)
|
||||
(collide-action ca-14)
|
||||
)
|
||||
)
|
||||
)
|
||||
(cond
|
||||
((= (-> obj process type) target)
|
||||
(send-event
|
||||
@@ -1020,8 +1020,8 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (not (or (zero? (logand (-> obj flags) (water-flags wt06)))
|
||||
(zero? (logand (water-flags wt23) (-> obj flags)))
|
||||
(when (not (or (not (logtest? (-> obj flags) (water-flags wt06)))
|
||||
(not (logtest? (water-flags wt23) (-> obj flags)))
|
||||
(= (-> obj drip-wetness) 0.0)
|
||||
)
|
||||
)
|
||||
@@ -1361,8 +1361,8 @@
|
||||
;; failed to figure out what this is:
|
||||
(defstate water-vol-idle (water-vol)
|
||||
:virtual #t
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (if (= v1-0 'update)
|
||||
(TODO-RENAME-26 self)
|
||||
)
|
||||
|
||||
+2
-2
@@ -477,7 +477,7 @@
|
||||
(set! (-> s2-0 quad) (-> s5-0 data (-> gp-0 vertex) quad))
|
||||
(set! (-> s2-0 y) (-> s5-0 top-plane))
|
||||
(add-debug-sphere #t (bucket-id debug-no-zbuf) s2-0 8192.0 (new 'static 'rgba :a #x80))
|
||||
(when (zero? (logand (-> s5-0 flags) (load-boundary-flags closed)))
|
||||
(when (not (logtest? (-> s5-0 flags) (load-boundary-flags closed)))
|
||||
(set! (-> s2-0 y) (-> s5-0 bot-plane))
|
||||
(add-debug-sphere #t (bucket-id debug-no-zbuf) s2-0 8192.0 (new 'static 'rgba :a #x80))
|
||||
)
|
||||
@@ -1099,7 +1099,7 @@
|
||||
;; INFO: Used lq/sq
|
||||
;; INFO: Return type mismatch int vs object.
|
||||
(defun triangulate-boundary ((arg0 load-boundary))
|
||||
(when (zero? (logand (-> arg0 flags) (load-boundary-flags closed)))
|
||||
(when (not (logtest? (-> arg0 flags) (load-boundary-flags closed)))
|
||||
(set! (-> arg0 tri-cnt) 1)
|
||||
(return (the-as object 0))
|
||||
)
|
||||
|
||||
+1
-1
@@ -118,7 +118,7 @@
|
||||
(+ 16 #x70000000)
|
||||
(+ 2064 #x70000000)
|
||||
(when (= curr-vis-str desired-vis-str)
|
||||
(b! (zero? (logand #x40000000 (-> vis-info flags))) cfg-6 :delay (empty-form))
|
||||
(b! (not (logtest? #x40000000 (-> vis-info flags))) cfg-6 :delay (empty-form))
|
||||
(if (check-busy *ramdisk-rpc*)
|
||||
(return #f)
|
||||
)
|
||||
|
||||
+1
-1
@@ -960,7 +960,7 @@
|
||||
(str-play-stop (-> arg0 name))
|
||||
(set! (-> *art-control* active-stream) #f)
|
||||
(logclear! (-> self skel status) (janim-status drawn done))
|
||||
(if (zero? (logand (-> self skel status) (janim-status inited)))
|
||||
(if (not (logtest? (-> self skel status) (janim-status inited)))
|
||||
(logclear! (-> self skel status) (janim-status inited))
|
||||
)
|
||||
(remove-setting! 'spooling)
|
||||
|
||||
+7
-7
@@ -438,7 +438,7 @@
|
||||
(vf9 :class vf)
|
||||
)
|
||||
(let ((t0-0 (-> arg0 poly arg1)))
|
||||
(when (zero? (logand (-> t0-0 pat) 1))
|
||||
(when (not (logtest? (-> t0-0 pat) 1))
|
||||
(let ((v1-5 (-> arg0 vertex (-> t0-0 vertex 0)))
|
||||
(a1-5 (-> arg0 vertex (-> t0-0 vertex 1)))
|
||||
(a0-2 (-> arg0 vertex (-> t0-0 vertex 2)))
|
||||
@@ -821,7 +821,7 @@
|
||||
(countdown (s1-0 (-> obj poly-count))
|
||||
(set! *debug-traverse* (+ *debug-traverse* 1))
|
||||
(let ((a0-3 (-> obj poly s1-0)))
|
||||
(when (zero? (logand (-> a0-3 pat) 1))
|
||||
(when (not (logtest? (-> a0-3 pat) 1))
|
||||
(nop!)
|
||||
(let ((v1-8 (the-as object (-> obj vertex))))
|
||||
(nop!)
|
||||
@@ -1080,7 +1080,7 @@
|
||||
(set! sv-48 (-> (the-as nav-poly (+ sv-32 (the-as int s1-1))) adj-poly 0))
|
||||
(when (and (!= sv-48 255) (!= 1 (-> (the-as (pointer uint8) (&+ arg3 sv-48)))))
|
||||
(set! (-> arg3 sv-48) 1)
|
||||
(when (zero? (logand (-> obj poly sv-48 pat) 1))
|
||||
(when (not (logtest? (-> obj poly sv-48 pat) 1))
|
||||
(let ((v0-3 (= (nav-mesh-lookup-route obj arg0 (the-as int sv-48)) 3)))
|
||||
(when (not v0-3)
|
||||
(tri-centroid-local obj s1-1 s0-0)
|
||||
@@ -1122,14 +1122,14 @@
|
||||
(set! *nav-update-route-table-route-count* 0)
|
||||
(countdown (s3-0 (-> obj poly-count))
|
||||
(let ((s2-0 (-> obj poly s3-0)))
|
||||
(when (zero? (logand (-> s2-0 pat) 1))
|
||||
(when (not (logtest? (-> s2-0 pat) 1))
|
||||
(tri-centroid-local obj s2-0 s5-0)
|
||||
(mem-set32! s4-0 64 0)
|
||||
(set! (-> s4-0 s3-0) 1)
|
||||
(dotimes (s1-0 3)
|
||||
(let ((a3-0 (-> s2-0 adj-poly s1-0)))
|
||||
(when (!= a3-0 255)
|
||||
(if (zero? (logand (-> obj poly a3-0 pat) 1))
|
||||
(if (not (logtest? (-> obj poly a3-0 pat) 1))
|
||||
(dummy-18 obj s3-0 s5-0 (the-as int a3-0) s4-0 0)
|
||||
)
|
||||
)
|
||||
@@ -1267,7 +1267,7 @@
|
||||
(let ((f30-0 10000000000000000000000000000000000000.0))
|
||||
(countdown (s1-0 (-> obj poly-count))
|
||||
(let ((s0-0 (-> obj poly s1-0)))
|
||||
(when (zero? (logand (-> s0-0 pat) 1))
|
||||
(when (not (logtest? (-> s0-0 pat) 1))
|
||||
(set! (-> s2-0 0 quad) (-> obj vertex (-> s0-0 vertex 0) quad))
|
||||
(set! (-> s2-0 1 quad) (-> obj vertex (-> s0-0 vertex 1) quad))
|
||||
(set! (-> s2-0 2 quad) (-> obj vertex (-> s0-0 vertex 2) quad))
|
||||
@@ -2402,7 +2402,7 @@
|
||||
(let ((s1-0 (new 'stack-no-clear 'vector)))
|
||||
(vector-float*! s1-0 arg1 arg2)
|
||||
(dotimes (s0-0 arg3)
|
||||
(when (zero? (logand arg5 (ash 1 s0-0)))
|
||||
(when (not (logtest? arg5 (ash 1 s0-0)))
|
||||
(let* ((v1-7 (-> arg4 s0-0))
|
||||
(f0-2 (ray-circle-intersect arg0 s1-0 v1-7 (-> v1-7 w)))
|
||||
)
|
||||
|
||||
+2
-2
@@ -171,7 +171,7 @@
|
||||
|
||||
;; definition for method 12 of type path-control
|
||||
(defmethod TODO-RENAME-12 path-control ((obj path-control) (arg0 vector) (arg1 float))
|
||||
(when (zero? (logand (-> obj flags) (path-control-flag not-found)))
|
||||
(when (not (logtest? (-> obj flags) (path-control-flag not-found)))
|
||||
(let ((v1-3 (-> obj curve num-cverts))
|
||||
(f0-3 (the float (the int arg1)))
|
||||
)
|
||||
@@ -199,7 +199,7 @@
|
||||
|
||||
;; definition for method 14 of type curve-control
|
||||
(defmethod TODO-RENAME-14 curve-control ((obj curve-control) (arg0 vector) (arg1 float))
|
||||
(when (zero? (logand (-> obj flags) (path-control-flag not-found)))
|
||||
(when (not (logtest? (-> obj flags) (path-control-flag not-found)))
|
||||
(let ((s4-0 (new 'stack-no-clear 'vector)))
|
||||
(curve-evaluate!
|
||||
arg0
|
||||
|
||||
+1
-1
@@ -224,7 +224,7 @@
|
||||
(let ((pad (-> *cpad-list* cpads pad-idx)))
|
||||
(cpad-get-data pad)
|
||||
(cond
|
||||
((zero? (logand (-> pad valid) 128))
|
||||
((not (logtest? (-> pad valid) 128))
|
||||
(dotimes (buzz-idx 2)
|
||||
(cond
|
||||
((and (-> pad buzz) (< (get-current-time) (-> pad buzz-time buzz-idx)) (= *master-mode* 'game))
|
||||
|
||||
+5
-5
@@ -494,7 +494,7 @@
|
||||
(matrix-rotate-y! s3-1 (-> s5-0 rotate-y))
|
||||
(vector3s-rotate*! (the-as vector3s (-> arg0 launchrot)) (the-as vector3s (-> arg0 launchrot)) s3-1)
|
||||
(vector3s-rotate*! (the-as vector3s (-> arg1 vel-sxvel)) (the-as vector3s (-> arg1 vel-sxvel)) s3-1)
|
||||
(if (zero? (logand (sp-cpuinfo-flag use-global-acc) (-> arg1 flags)))
|
||||
(if (not (logtest? (sp-cpuinfo-flag use-global-acc) (-> arg1 flags)))
|
||||
(vector3s-rotate*! (the-as vector3s (-> arg1 acc)) (the-as vector3s (-> arg1 acc)) s3-1)
|
||||
)
|
||||
)
|
||||
@@ -576,7 +576,7 @@
|
||||
)
|
||||
(vector3s-rotate*! (the-as vector3s (-> arg0 launchrot)) (the-as vector3s (-> arg0 launchrot)) s5-0)
|
||||
(vector3s-rotate*! (the-as vector3s (-> arg1 vel-sxvel)) (the-as vector3s (-> arg1 vel-sxvel)) s5-0)
|
||||
(if (zero? (logand (sp-cpuinfo-flag use-global-acc) (-> arg1 flags)))
|
||||
(if (not (logtest? (sp-cpuinfo-flag use-global-acc) (-> arg1 flags)))
|
||||
(vector3s-rotate*! (the-as vector3s (-> arg1 acc)) (the-as vector3s (-> arg1 acc)) s5-0)
|
||||
)
|
||||
)
|
||||
@@ -1077,8 +1077,8 @@
|
||||
(let ((a0-26 sparticle-launcher))
|
||||
(b! (!= (-> a1-4 type) a0-26) cfg-78 :delay (nop!))
|
||||
)
|
||||
(b! (zero? (logand (-> v1-29 flags) (sp-group-item-flag launch-asap))) cfg-36 :delay (nop!))
|
||||
(when (zero? (logand (-> a3-0 flags) (sp-launch-state-flags particles-active)))
|
||||
(b! (not (logtest? (-> v1-29 flags) (sp-group-item-flag launch-asap))) cfg-36 :delay (nop!))
|
||||
(when (not (logtest? (-> a3-0 flags) (sp-launch-state-flags particles-active)))
|
||||
(set! (-> a3-0 spawn-time) (the-as uint s4-0))
|
||||
(logior! (-> a3-0 flags) (sp-launch-state-flags particles-active))
|
||||
(if (< 0.0 f0-2)
|
||||
@@ -1125,7 +1125,7 @@
|
||||
(* 0.2 (the float a0-56) f0-2)
|
||||
)
|
||||
(else
|
||||
(when (zero? (logand (-> v1-29 flags) (sp-group-item-flag bit1)))
|
||||
(when (not (logtest? (-> v1-29 flags) (sp-group-item-flag bit1)))
|
||||
0
|
||||
(goto cfg-77)
|
||||
)
|
||||
|
||||
+16
-16
@@ -107,7 +107,7 @@
|
||||
(meters 0.000024414063)
|
||||
(the-as rgba (+ #x408040 (shl s4-0 24)))
|
||||
)
|
||||
(when (zero? (logand (-> s2-0 status) (cshape-moving-flags csmf08)))
|
||||
(when (not (logtest? (-> s2-0 status) (cshape-moving-flags csmf08)))
|
||||
(add-debug-line
|
||||
(logtest? s5-0 1)
|
||||
(bucket-id debug-no-zbuf)
|
||||
@@ -176,11 +176,11 @@
|
||||
(format
|
||||
#t
|
||||
"~C~C~C~C~C~C"
|
||||
(if (zero? (logand s3-0 (cshape-reaction-flags csrf00)))
|
||||
(if (not (logtest? s3-0 (cshape-reaction-flags csrf00)))
|
||||
103
|
||||
87
|
||||
)
|
||||
(if (zero? (logand s3-0 (cshape-reaction-flags csrf01)))
|
||||
(if (not (logtest? s3-0 (cshape-reaction-flags csrf01)))
|
||||
103
|
||||
87
|
||||
)
|
||||
@@ -188,7 +188,7 @@
|
||||
((logtest? s3-0 (cshape-reaction-flags csrf11))
|
||||
71
|
||||
)
|
||||
((zero? (logand s3-0 (cshape-reaction-flags csrf02)))
|
||||
((not (logtest? s3-0 (cshape-reaction-flags csrf02)))
|
||||
103
|
||||
)
|
||||
(else
|
||||
@@ -206,11 +206,11 @@
|
||||
99
|
||||
)
|
||||
)
|
||||
(if (zero? (logand s3-0 (cshape-reaction-flags csrf04)))
|
||||
(if (not (logtest? s3-0 (cshape-reaction-flags csrf04)))
|
||||
110
|
||||
66
|
||||
)
|
||||
(if (zero? (logand s3-0 (cshape-reaction-flags csrf05)))
|
||||
(if (not (logtest? s3-0 (cshape-reaction-flags csrf05)))
|
||||
103
|
||||
65
|
||||
)
|
||||
@@ -769,7 +769,7 @@
|
||||
)
|
||||
(vector-matrix*! s2-3 s3-3 (-> self control unknown-matrix01))
|
||||
(let ((f28-2 (vector-vector-xz-distance s3-3 s4-0)))
|
||||
(when (and (zero? (logand (-> self control status) (cshape-moving-flags tsurf)))
|
||||
(when (and (not (logtest? (-> self control status) (cshape-moving-flags tsurf)))
|
||||
(< (vector-xz-length gp-0) (vector-xz-length s3-3))
|
||||
)
|
||||
(let ((f0-50 (lerp-scale 163840.0 0.0 f28-2 0.0 20480.0)))
|
||||
@@ -781,7 +781,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (and (zero? (logand (-> self control status) (cshape-moving-flags twall)))
|
||||
(if (and (not (logtest? (-> self control status) (cshape-moving-flags twall)))
|
||||
(logtest? (-> self control old-status) (cshape-moving-flags twall))
|
||||
(logtest? (-> self control unknown-surface00 flags) (surface-flags jump))
|
||||
(< 0.0 (-> gp-0 y))
|
||||
@@ -800,7 +800,7 @@
|
||||
(if (< (- (-> *display* base-frame-counter) (-> self control unknown-dword70)) (seconds 0.2))
|
||||
(set! f30-4 (+ 204800.0 f30-4))
|
||||
)
|
||||
(if (and (zero? (logand (-> self control status) (cshape-moving-flags twall)))
|
||||
(if (and (not (logtest? (-> self control status) (cshape-moving-flags twall)))
|
||||
(and (logtest? (-> self control old-status) (cshape-moving-flags twall))
|
||||
(logtest? (-> self control unknown-surface00 flags) (surface-flags jump))
|
||||
(< 0.0 (-> gp-0 y))
|
||||
@@ -926,8 +926,8 @@
|
||||
(defbehavior do-rotations2 target ()
|
||||
(let ((gp-0 (vector-z-quaternion! (new-stack-vector0) (-> self control dir-targ)))
|
||||
(s5-0
|
||||
(if (and (or (zero? (logand (logior (-> self control status) (-> self control old-status)) (cshape-moving-flags onsurf tsurf))
|
||||
)
|
||||
(if (and (or (not (logtest? (logior (-> self control status) (-> self control old-status)) (cshape-moving-flags onsurf tsurf))
|
||||
)
|
||||
(< (- (-> *display* base-frame-counter) (-> self control unknown-dword20)) (seconds 0.5))
|
||||
(!= (-> self next-state name) 'target-walk)
|
||||
(< (- (-> *display* base-frame-counter) (-> self state-time)) (seconds 0.5))
|
||||
@@ -1031,7 +1031,7 @@
|
||||
(set! (-> self control unknown-dword11) (-> *display* base-frame-counter))
|
||||
(set! (-> self control unknown-vector52 quad) (-> self control trans quad))
|
||||
(if (and (>= (-> self control coverage) 1.0)
|
||||
(zero? (logand (-> self control status) (cshape-moving-flags t-act on-water)))
|
||||
(not (logtest? (-> self control status) (cshape-moving-flags t-act on-water)))
|
||||
(logtest? (-> self control status) (cshape-moving-flags onground))
|
||||
)
|
||||
(set! (-> self control last-known-safe-ground quad) (-> self control trans quad))
|
||||
@@ -1063,8 +1063,8 @@
|
||||
)
|
||||
(if (and (= (-> self cam-user-mode) 'normal)
|
||||
(logtest? (-> self control unknown-surface00 flags) (surface-flags allow-look-around))
|
||||
(zero? (logand (-> self control root-prim prim-core action) (collide-action ca-7 ca-8 ca-9 ca-12 ca-13 ca-14))
|
||||
)
|
||||
(not (logtest? (-> self control root-prim prim-core action) (collide-action ca-7 ca-8 ca-9 ca-12 ca-13 ca-14))
|
||||
)
|
||||
(-> *setting-control* current allow-look-around)
|
||||
(>= (- (-> *display* base-frame-counter) (-> self no-look-around-wait)) (seconds 0.05))
|
||||
(not (and (= (-> self control ground-pat material) (pat-material ice))
|
||||
@@ -1138,7 +1138,7 @@
|
||||
)
|
||||
9420.8
|
||||
)
|
||||
(zero? (logand (-> self control root-prim prim-core action) (collide-action ca-9 ca-14)))
|
||||
(not (logtest? (-> self control root-prim prim-core action) (collide-action ca-9 ca-14)))
|
||||
#t
|
||||
)
|
||||
)
|
||||
@@ -1446,7 +1446,7 @@
|
||||
(let ((gp-0 (new 'stack-no-clear 'vector)))
|
||||
(cond
|
||||
((and (= (-> self next-state name) 'target-clone-anim)
|
||||
(zero? (logand (-> self draw status) (draw-status hidden)))
|
||||
(not (logtest? (-> self draw status) (draw-status hidden)))
|
||||
(begin
|
||||
(vector<-cspace! gp-0 (-> self node-list data 3))
|
||||
(set! (-> gp-0 y) (+ -5896.192 (-> gp-0 y)))
|
||||
|
||||
+5
-5
@@ -61,11 +61,11 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate sidekick-clone (sidekick)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(local-vars (v0-0 object))
|
||||
(case arg2
|
||||
(case event-type
|
||||
(('matrix)
|
||||
(case (-> arg3 param 0)
|
||||
(case (-> event param 0)
|
||||
(('play-anim)
|
||||
(set! v0-0 (-> self node-list data))
|
||||
(set! (-> (the-as (inline-array cspace) v0-0) 0 param0) cspace<-cspace+quaternion!)
|
||||
@@ -98,13 +98,13 @@
|
||||
v0-0
|
||||
)
|
||||
(('shadow)
|
||||
(set! v0-0 (-> arg3 param 0))
|
||||
(set! v0-0 (-> event param 0))
|
||||
(set! (-> self shadow-in-movie?) (the-as symbol v0-0))
|
||||
v0-0
|
||||
)
|
||||
(('blend-shape)
|
||||
(cond
|
||||
((-> arg3 param 0)
|
||||
((-> event param 0)
|
||||
(set! v0-0 (logior (-> self skel status) (janim-status blerc)))
|
||||
(set! (-> self skel status) (the-as janim-status v0-0))
|
||||
)
|
||||
|
||||
+8
-8
@@ -45,7 +45,7 @@
|
||||
(set! (-> *load-boundary-target* 1 quad) (-> (target-pos 0) quad))
|
||||
(set! (-> *load-boundary-target* 2 quad) (-> *load-boundary-target* 0 quad))
|
||||
(set! (-> *load-boundary-target* 3 quad) (-> *load-boundary-target* 1 quad))
|
||||
(when (zero? (logand (-> *game-info* current-continue flags) (continue-flags intro sage-intro title)))
|
||||
(when (not (logtest? (-> *game-info* current-continue flags) (continue-flags intro sage-intro title)))
|
||||
(set! (-> *level* border?) (-> *level* play?))
|
||||
(set! (-> *setting-control* default border-mode) (-> *level* play?))
|
||||
)
|
||||
@@ -615,7 +615,7 @@
|
||||
(defbehavior target-hit-push target ((arg0 vector) (arg1 matrix) (arg2 float) (arg3 float) (arg4 attack-info))
|
||||
(case (-> arg4 angle)
|
||||
(('jump 'up 'up-forward)
|
||||
(when (and (zero? (logand (-> self control root-prim prim-core action) (collide-action ca-9 ca-14)))
|
||||
(when (and (not (logtest? (-> self control root-prim prim-core action) (collide-action ca-9 ca-14)))
|
||||
(not (and (= (-> self game mode) 'play) (>= 0.0 (-> self fact-info-target health))))
|
||||
)
|
||||
(if (and (cpad-pressed? (-> self control unknown-cpad-info00 number) circle) (can-feet?))
|
||||
@@ -627,7 +627,7 @@
|
||||
(>= (- (-> *display* base-frame-counter) (-> self control unknown-dword36))
|
||||
(the-as time-frame (-> *TARGET-bank* stuck-timeout))
|
||||
)
|
||||
(zero? (logand (-> self state-flags) (state-flags prevent-attack)))
|
||||
(not (logtest? (-> self state-flags) (state-flags prevent-attack)))
|
||||
(zero? (logand (-> self control unknown-surface01 flags) (surface-flags prevent-attacks-during-launch-jump surf08))
|
||||
)
|
||||
)
|
||||
@@ -789,7 +789,7 @@
|
||||
(ja :num! (seek!))
|
||||
(set! v1-40 (or (ja-done? 0) (and arg1 (logtest? (-> self control status) (cshape-moving-flags onsurf)))))
|
||||
)
|
||||
(while (and (or (zero? (logand (-> self control status) (cshape-moving-flags onsurf))) s2-1) (!= s2-1 'stuck))
|
||||
(while (and (or (not (logtest? (-> self control status) (cshape-moving-flags onsurf))) s2-1) (!= s2-1 'stuck))
|
||||
(arg2)
|
||||
(+! f30-1 (* (-> arg0 shove-back) f28-1 (-> *display* seconds-per-frame)))
|
||||
(set! s2-1 (target-hit-push s3-1 s1-1 f30-1 (* (-> arg0 shove-back) f28-1) arg0))
|
||||
@@ -867,7 +867,7 @@
|
||||
)
|
||||
)
|
||||
(combine! gp-0 arg1)
|
||||
(when (zero? (logand (-> gp-0 mask) (attack-mask vector)))
|
||||
(when (not (logtest? (-> gp-0 mask) (attack-mask vector)))
|
||||
(vector-z-quaternion! (-> gp-0 vector) (-> self control unknown-quaternion00))
|
||||
(vector-xz-normalize! (-> gp-0 vector) (- (fabs (-> gp-0 shove-back))))
|
||||
(set! (-> gp-0 vector y) (-> gp-0 shove-up))
|
||||
@@ -1000,7 +1000,7 @@
|
||||
(defun death-movie-remap ((arg0 int) (arg1 int))
|
||||
(let ((v1-0 (/ arg0 arg1)))
|
||||
(mod
|
||||
(if (zero? (logand v1-0 1))
|
||||
(if (not (logtest? v1-0 1))
|
||||
(logxor v1-0 arg0)
|
||||
(logand #xfffffff (- (logxor v1-0 arg0)))
|
||||
)
|
||||
@@ -1022,7 +1022,7 @@
|
||||
(send-event *camera* 'joystick 0.0 -1.0)
|
||||
(compute-alignment! (-> self align))
|
||||
(let ((s5-0 (new 'stack-no-clear 'vector)))
|
||||
(when (zero? (logand (-> self align flags) (align-flags disabled)))
|
||||
(when (not (logtest? (-> self align flags) (align-flags disabled)))
|
||||
(vector-matrix*! s5-0 (the-as vector (-> self align delta)) (-> self control unknown-matrix01))
|
||||
(vector-float*! (-> self control transv) s5-0 (-> *display* frames-per-second))
|
||||
)
|
||||
@@ -1305,7 +1305,7 @@
|
||||
(set-setting! 'allow-progress #f 0.0 0)
|
||||
(target-death-anim gp-18)
|
||||
(when (and (< (rand-vu-int-count (-> *game-info* death-movie-tick)) (* (-> *death-spool-array* length) 2))
|
||||
(zero? (logand (-> self water flags) (water-flags wt09)))
|
||||
(not (logtest? (-> self water flags) (water-flags wt09)))
|
||||
(!= (-> self control ground-pat material) 9)
|
||||
(!= (-> self control ground-pat material) 10)
|
||||
)
|
||||
|
||||
+7
-7
@@ -35,7 +35,7 @@
|
||||
object
|
||||
(cond
|
||||
((= v1-0 'get-pickup)
|
||||
(when (zero? (logand (-> self state-flags) (state-flags dying)))
|
||||
(when (not (logtest? (-> self state-flags) (state-flags dying)))
|
||||
(let ((s4-0 (-> arg3 param 0))
|
||||
(f28-0 (the-as float (-> arg3 param 1)))
|
||||
)
|
||||
@@ -310,7 +310,7 @@
|
||||
(set! (-> s5-0 shove-back) arg0)
|
||||
(set! (-> s5-0 shove-up) arg1)
|
||||
(set! (-> s5-0 angle)
|
||||
(if (zero? (logand (logior (-> self control status) (-> self control old-status)) (cshape-moving-flags onsurf)))
|
||||
(if (not (logtest? (logior (-> self control status) (-> self control old-status)) (cshape-moving-flags onsurf)))
|
||||
'air
|
||||
'shove
|
||||
)
|
||||
@@ -340,7 +340,7 @@
|
||||
(arg3 touching-shapes-entry)
|
||||
(arg4 (state symbol attack-info target))
|
||||
)
|
||||
(when (zero? (logand (-> self state-flags) (state-flags being-attacked)))
|
||||
(when (not (logtest? (-> self state-flags) (state-flags being-attacked)))
|
||||
(cond
|
||||
((or (logtest? (-> self state-flags) (state-flags invulnerable timed-invulnerable invuln-powerup))
|
||||
(and (logtest? (-> arg1 mask) (attack-mask mode))
|
||||
@@ -382,7 +382,7 @@
|
||||
)
|
||||
(set! (-> self attack-info-rec prev-state) (-> self state))
|
||||
(logior! (-> self attack-info-rec mask) (attack-mask atki13))
|
||||
(when (zero? (logand (-> self attack-info-rec mask) (attack-mask attacker)))
|
||||
(when (not (logtest? (-> self attack-info-rec mask) (attack-mask attacker)))
|
||||
(set! (-> self attack-info-rec attacker) (process->handle arg2))
|
||||
(logior! (-> self attack-info-rec mask) (attack-mask attacker))
|
||||
)
|
||||
@@ -732,7 +732,7 @@
|
||||
|
||||
;; definition for function target-apply-tongue
|
||||
(defbehavior target-apply-tongue target ((arg0 vector))
|
||||
(when (zero? (logand (-> self state-flags) (state-flags being-attacked)))
|
||||
(when (not (logtest? (-> self state-flags) (state-flags being-attacked)))
|
||||
(logior! (-> self state-flags) (state-flags prevent-attack prevent-duck remove-prevents))
|
||||
(let ((gp-1 (vector-! (new 'stack-no-clear 'vector) arg0 (-> self control trans))))
|
||||
(set! (-> self control unknown-float41) (lerp-scale
|
||||
@@ -771,7 +771,7 @@
|
||||
(('shove)
|
||||
(when (!= (-> self next-state name) 'target-hit)
|
||||
(mem-copy! (the-as pointer (-> self attack-info-rec)) (the-as pointer (-> arg3 param 1)) 104)
|
||||
(when (zero? (logand (-> self attack-info-rec mask) (attack-mask attacker)))
|
||||
(when (not (logtest? (-> self attack-info-rec mask) (attack-mask attacker)))
|
||||
(set! (-> self attack-info-rec attacker) (process->handle arg0))
|
||||
(logior! (-> self attack-info-rec mask) (attack-mask attacker))
|
||||
)
|
||||
@@ -861,7 +861,7 @@
|
||||
(go target-edge-grab)
|
||||
)
|
||||
(('pole-grab)
|
||||
(if (zero? (logand (-> self control root-prim prim-core action) (collide-action ca-8)))
|
||||
(if (not (logtest? (-> self control root-prim prim-core action) (collide-action ca-8)))
|
||||
(go target-pole-cycle (process->handle (the-as process (-> arg3 param 0))))
|
||||
)
|
||||
)
|
||||
|
||||
+17
-20
@@ -763,7 +763,7 @@
|
||||
(* (-> s1-0 x) (-> *display* seconds-per-frame))
|
||||
)
|
||||
)
|
||||
(if (zero? (logand arg0 (align-opts adjust-xz-vel keep-other-velocities)))
|
||||
(if (not (logtest? arg0 (align-opts adjust-xz-vel keep-other-velocities)))
|
||||
(set! (-> a1-3 z) 0.0)
|
||||
)
|
||||
)
|
||||
@@ -780,7 +780,7 @@
|
||||
(* (-> s1-0 z) (-> *display* seconds-per-frame))
|
||||
)
|
||||
)
|
||||
(if (zero? (logand arg0 (align-opts adjust-x-vel keep-other-velocities)))
|
||||
(if (not (logtest? arg0 (align-opts adjust-x-vel keep-other-velocities)))
|
||||
(set! (-> a1-3 x) 0.0)
|
||||
)
|
||||
)
|
||||
@@ -820,7 +820,7 @@
|
||||
(not (-> *setting-control* current spooling))
|
||||
(not (-> *setting-control* current movie))
|
||||
(not (-> *setting-control* current hint))
|
||||
(zero? (logand (-> self control status) (cshape-moving-flags t-act)))
|
||||
(not (logtest? (-> self control status) (cshape-moving-flags t-act)))
|
||||
(zero? (logand (-> self water flags) (water-flags wt09)))
|
||||
)
|
||||
)
|
||||
@@ -833,8 +833,8 @@
|
||||
(< 0.866 (-> self control surface-angle))
|
||||
)
|
||||
)
|
||||
(and (zero? (logand (-> self control unknown-surface01 flags) (surface-flags prevent-jump)))
|
||||
(zero? (logand (-> self state-flags) (state-flags prevent-jump)))
|
||||
(and (not (logtest? (-> self control unknown-surface01 flags) (surface-flags prevent-jump)))
|
||||
(not (logtest? (-> self state-flags) (state-flags prevent-jump)))
|
||||
(case arg0
|
||||
(('target-wheel-flip)
|
||||
(>= 0.5 (-> self control unknown-float61))
|
||||
@@ -860,7 +860,7 @@
|
||||
;; definition for function fall-test
|
||||
;; INFO: Return type mismatch object vs none.
|
||||
(defbehavior fall-test target ()
|
||||
(when (and (zero? (logand (-> self control status) (cshape-moving-flags onsurf)))
|
||||
(when (and (not (logtest? (-> self control status) (cshape-moving-flags onsurf)))
|
||||
(>= (- (-> *display* base-frame-counter) (-> self control unknown-dword11)) (-> *TARGET-bank* ground-timeout))
|
||||
(>= 0.0 (vector-dot (-> self control dynam gravity-normal) (-> self control transv)))
|
||||
(let ((v1-15 (ja-group)))
|
||||
@@ -887,7 +887,7 @@
|
||||
;; definition for function slide-down-test
|
||||
;; INFO: Return type mismatch object vs none.
|
||||
(defbehavior slide-down-test target ()
|
||||
(if (and (zero? (logand (-> self control status) (cshape-moving-flags onsurf csmf07)))
|
||||
(if (and (not (logtest? (-> self control status) (cshape-moving-flags onsurf csmf07)))
|
||||
(>= (- (-> *display* base-frame-counter) (-> self control unknown-dword11)) (-> *TARGET-bank* ground-timeout))
|
||||
(logtest? (-> self control status) (cshape-moving-flags tsurf))
|
||||
(< 0.5 (-> self control surface-angle))
|
||||
@@ -910,7 +910,7 @@
|
||||
;; definition for function can-wheel?
|
||||
(defbehavior can-wheel? target ()
|
||||
(and (logtest? (-> self control status) (cshape-moving-flags onsurf))
|
||||
(or (zero? (logand (-> self control status) (cshape-moving-flags twall)))
|
||||
(or (not (logtest? (-> self control status) (cshape-moving-flags twall)))
|
||||
(>= 0.7 (-> self control touch-angle))
|
||||
)
|
||||
(and (< (-> self control unknown-float61) 0.7)
|
||||
@@ -923,9 +923,9 @@
|
||||
(defbehavior can-duck? target ()
|
||||
(and (logtest? (-> self control status) (cshape-moving-flags onsurf))
|
||||
(>= (-> self control unknown-float60) 0.7)
|
||||
(zero? (logand (-> self water flags) (water-flags wt11 wt12)))
|
||||
(zero? (logand (-> self state-flags) (state-flags prevent-duck)))
|
||||
(or (zero? (logand (-> self water flags) (water-flags wt10)))
|
||||
(not (logtest? (-> self water flags) (water-flags wt11 wt12)))
|
||||
(not (logtest? (-> self state-flags) (state-flags prevent-duck)))
|
||||
(or (not (logtest? (-> self water flags) (water-flags wt10)))
|
||||
(< (- (- (-> self control trans y) (- (-> self water base-height) (-> self water wade-height)))) 2457.6)
|
||||
)
|
||||
)
|
||||
@@ -962,12 +962,9 @@
|
||||
;; definition for function can-hands?
|
||||
(defbehavior can-hands? target ((arg0 symbol))
|
||||
(cond
|
||||
((or (zero? (logand (-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) button0-rel 0)
|
||||
(pad-buttons square)
|
||||
)
|
||||
)
|
||||
((or (not (cpad-pressed? (-> self control unknown-cpad-info00 number) square))
|
||||
(or (and (logtest? (-> self state-flags) (state-flags prevent-attack))
|
||||
(or (zero? (logand (-> self state-flags) (state-flags remove-prevents)))
|
||||
(or (not (logtest? (-> self state-flags) (state-flags remove-prevents)))
|
||||
(not (and (= (-> self fact-info-target eco-type) (pickup-type eco-yellow))
|
||||
(>= (-> self fact-info-target eco-level) 1.0)
|
||||
)
|
||||
@@ -1156,7 +1153,7 @@
|
||||
(set! (-> obj intersection quad) (-> arg0 intersection quad))
|
||||
)
|
||||
(cond
|
||||
((zero? (logand s4-0 (attack-mask vector)))
|
||||
((not (logtest? s4-0 (attack-mask vector)))
|
||||
(let* ((s3-0 pp)
|
||||
(s2-0 (handle->process (-> obj attacker)))
|
||||
(v1-39 (if (and (nonzero? s2-0) (type-type? (-> s2-0 type) process-drawable))
|
||||
@@ -1187,15 +1184,15 @@
|
||||
)
|
||||
)
|
||||
(set! (-> obj vector quad) (-> arg0 vector quad))
|
||||
(if (zero? (logand s4-0 (attack-mask shove-back)))
|
||||
(if (not (logtest? s4-0 (attack-mask shove-back)))
|
||||
(set! (-> obj shove-back) (vector-xz-length (-> obj vector)))
|
||||
)
|
||||
(if (zero? (logand s4-0 (attack-mask shove-up)))
|
||||
(if (not (logtest? s4-0 (attack-mask shove-up)))
|
||||
(set! (-> obj shove-up) (-> obj vector y))
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (zero? (logand (-> obj mask) (attack-mask dist)))
|
||||
(if (not (logtest? (-> obj mask) (attack-mask dist)))
|
||||
(set! (-> obj dist) (fabs (-> obj shove-back)))
|
||||
)
|
||||
(if (logtest? s4-0 (attack-mask trans))
|
||||
|
||||
+68
-71
@@ -3,14 +3,14 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate target-load-wait (target)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('loading)
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
#f
|
||||
)
|
||||
(else
|
||||
(target-standard-event-handler arg0 arg1 arg2 arg3)
|
||||
(target-standard-event-handler proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -55,13 +55,13 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate target-stance-ambient (target)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('movie)
|
||||
(go target-stance)
|
||||
)
|
||||
(else
|
||||
(target-standard-event-handler arg0 arg1 arg2 arg3)
|
||||
(target-standard-event-handler proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -293,8 +293,8 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate hud-waiting (first-person-hud)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('go-away)
|
||||
(go hud-going-out)
|
||||
)
|
||||
@@ -479,21 +479,21 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate target-look-around (target)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(cond
|
||||
((and (= arg2 'query) (= (-> arg3 param 0) 'mode))
|
||||
((and (= event-type 'query) (= (-> event param 0) 'mode))
|
||||
(-> self state name)
|
||||
)
|
||||
((let ((v1-4 arg2))
|
||||
((let ((v1-4 event-type))
|
||||
(= v1-4 'end-mode)
|
||||
)
|
||||
(go target-stance-look-around)
|
||||
)
|
||||
((-> self control unknown-symbol30)
|
||||
(target-dangerous-event-handler arg0 arg1 arg2 arg3)
|
||||
(target-dangerous-event-handler proc arg1 event-type event)
|
||||
)
|
||||
(else
|
||||
(target-standard-event-handler arg0 arg1 arg2 arg3)
|
||||
(target-standard-event-handler proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -640,18 +640,18 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate target-billy-game (target)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(cond
|
||||
((and (= arg2 'query) (= (-> arg3 param 0) 'mode))
|
||||
((and (= event-type 'query) (= (-> event param 0) 'mode))
|
||||
(-> self state name)
|
||||
)
|
||||
((let ((v1-4 arg2))
|
||||
((let ((v1-4 event-type))
|
||||
(= v1-4 'end-mode)
|
||||
)
|
||||
(go target-stance)
|
||||
)
|
||||
(else
|
||||
(target-standard-event-handler arg0 arg1 arg2 arg3)
|
||||
(target-standard-event-handler proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -773,38 +773,38 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate target-grab (target)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(cond
|
||||
((and (= arg2 'query) (= (-> arg3 param 0) 'mode))
|
||||
((and (= event-type 'query) (= (-> event param 0) 'mode))
|
||||
(-> self state name)
|
||||
)
|
||||
(else
|
||||
(case arg2
|
||||
(case event-type
|
||||
(('end-mode)
|
||||
(go target-stance)
|
||||
)
|
||||
(('play-anim)
|
||||
(let ((v0-0 (the-as object (-> arg3 param 0))))
|
||||
(let ((v0-0 (the-as object (-> event param 0))))
|
||||
(set! (-> self control unknown-uint20) (the-as uint v0-0))
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
(('clone-anim)
|
||||
(go target-clone-anim (process->handle (the-as process (-> arg3 param 0))))
|
||||
(go target-clone-anim (process->handle (the-as process (-> event param 0))))
|
||||
)
|
||||
(('change-mode)
|
||||
(case (-> arg3 param 0)
|
||||
(case (-> event param 0)
|
||||
(('final-door)
|
||||
(go
|
||||
target-final-door
|
||||
(the-as basic (process->handle (the-as process (-> arg3 param 1))))
|
||||
(process->handle (the-as process (-> arg3 param 2)))
|
||||
(the-as basic (process->handle (the-as process (-> event param 1))))
|
||||
(process->handle (the-as process (-> event param 2)))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(target-generic-event-handler arg0 arg1 arg2 arg3)
|
||||
(target-generic-event-handler proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -825,7 +825,7 @@
|
||||
:code (behavior ()
|
||||
(set-forward-vel (the-as float 0.0))
|
||||
(let ((gp-0 0))
|
||||
(while (zero? (logand (-> self control status) (cshape-moving-flags onsurf)))
|
||||
(while (not (logtest? (-> self control status) (cshape-moving-flags onsurf)))
|
||||
(target-falling-anim-trans)
|
||||
(+! gp-0 (- (-> *display* base-frame-counter) (-> *display* old-base-frame-counter)))
|
||||
(suspend)
|
||||
@@ -943,10 +943,10 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate target-pole-cycle (target)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(if (and (= arg2 'query) (= (-> arg3 param 0) 'mode))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(if (and (= event-type 'query) (= (-> event param 0) 'mode))
|
||||
(-> self state name)
|
||||
(target-standard-event-handler arg0 arg1 arg2 arg3)
|
||||
(target-standard-event-handler proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
:enter (behavior ((arg0 handle))
|
||||
@@ -975,7 +975,7 @@
|
||||
)
|
||||
(pad-buttons x)
|
||||
)
|
||||
(zero? (logand (-> self state-flags) (state-flags prevent-jump)))
|
||||
(not (logtest? (-> self state-flags) (state-flags prevent-jump)))
|
||||
(>= (- (-> *display* base-frame-counter) (-> self state-time)) (seconds 0.1))
|
||||
)
|
||||
(set! (-> self control transv quad) (the-as uint128 0))
|
||||
@@ -1164,13 +1164,13 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate target-edge-grab (target)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('end-mode)
|
||||
(go target-falling 'target-edge-grab)
|
||||
)
|
||||
(else
|
||||
(target-standard-event-handler arg0 arg1 arg2 arg3)
|
||||
(target-standard-event-handler proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1284,13 +1284,13 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate target-edge-grab-jump (target)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('end-mode)
|
||||
(go target-falling 'target-edge-grab)
|
||||
)
|
||||
(else
|
||||
(target-standard-event-handler arg0 arg1 arg2 arg3)
|
||||
(target-standard-event-handler proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1305,7 +1305,7 @@
|
||||
(until (ja-done? 0)
|
||||
(target-compute-edge-rider)
|
||||
(compute-alignment! (-> self align))
|
||||
(when (zero? (logand (-> self align flags) (align-flags disabled)))
|
||||
(when (not (logtest? (-> self align flags) (align-flags disabled)))
|
||||
(vector-matrix*! s4-0 (the-as vector (-> self align delta)) (-> self control unknown-matrix01))
|
||||
(move-by-vector! (-> self control) s4-0)
|
||||
)
|
||||
@@ -1335,7 +1335,7 @@
|
||||
(ja-no-eval :group! eichar-edge-grab-off-ja :num! (seek! (ja-aframe (the-as float 191.0) 0)) :frame-num 0.0)
|
||||
(until (ja-done? 0)
|
||||
(compute-alignment! (-> self align))
|
||||
(when (zero? (logand (-> self align flags) (align-flags disabled)))
|
||||
(when (not (logtest? (-> self align flags) (align-flags disabled)))
|
||||
(vector-matrix*! gp-0 (the-as vector (-> self align delta)) (-> self control unknown-matrix01))
|
||||
(move-by-vector! (-> self control) gp-0)
|
||||
)
|
||||
@@ -1645,7 +1645,7 @@
|
||||
)
|
||||
(pad-buttons x)
|
||||
)
|
||||
(zero? (logand (-> self water flags) (water-flags wt09)))
|
||||
(not (logtest? (-> self water flags) (water-flags wt09)))
|
||||
(zero? (logand (-> self state-flags) (state-flags prevent-jump)))
|
||||
)
|
||||
(go target-jump (-> *TARGET-bank* jump-height-min) (-> *TARGET-bank* jump-height-max) (the-as surface #f))
|
||||
@@ -1708,7 +1708,7 @@
|
||||
)
|
||||
:trans (behavior ()
|
||||
((-> self state-hook))
|
||||
(when (and (zero? (logand (-> self water flags) (water-flags wt10)))
|
||||
(when (and (not (logtest? (-> self water flags) (water-flags wt10)))
|
||||
(>= (- (-> *display* base-frame-counter) (-> self water wade-time)) (seconds 0.05))
|
||||
)
|
||||
(if (logtest? (-> self water flags) (water-flags wt11))
|
||||
@@ -1754,7 +1754,7 @@
|
||||
:exit (-> target-wade-stance exit)
|
||||
:trans (behavior ()
|
||||
((-> self state-hook))
|
||||
(when (and (zero? (logand (-> self water flags) (water-flags wt10)))
|
||||
(when (and (not (logtest? (-> self water flags) (water-flags wt10)))
|
||||
(>= (- (-> *display* base-frame-counter) (-> self water wade-time)) (seconds 0.1))
|
||||
)
|
||||
(if (logtest? (-> self water flags) (water-flags wt11))
|
||||
@@ -2032,7 +2032,7 @@
|
||||
)
|
||||
(set-zero! (-> self water bob))
|
||||
)
|
||||
(when (and (zero? (logand (-> self water flags) (water-flags wt11)))
|
||||
(when (and (not (logtest? (-> self water flags) (water-flags wt11)))
|
||||
(>= (- (-> *display* base-frame-counter) (-> self state-time)) (seconds 0.1))
|
||||
)
|
||||
(if (logtest? (-> self water flags) (water-flags wt10))
|
||||
@@ -2148,7 +2148,7 @@
|
||||
)
|
||||
(set-zero! (-> self water bob))
|
||||
)
|
||||
(when (and (zero? (logand (-> self water flags) (water-flags wt11)))
|
||||
(when (and (not (logtest? (-> self water flags) (water-flags wt11)))
|
||||
(>= (- (-> *display* base-frame-counter) (-> self water swim-time)) (seconds 0.1))
|
||||
)
|
||||
(if (logtest? (-> self water flags) (water-flags wt10))
|
||||
@@ -2205,7 +2205,7 @@
|
||||
(ja-no-eval :group! eichar-swim-walk-ja :num! (seek!) :frame-num (ja-aframe (the-as float 19.0) 0))
|
||||
(until (ja-done? 0)
|
||||
(compute-alignment! (-> self align))
|
||||
(if (zero? (logand (-> self align flags) (align-flags disabled)))
|
||||
(if (not (logtest? (-> self align flags) (align-flags disabled)))
|
||||
(set! (-> self control unknown-surface00 target-speed)
|
||||
(* (-> self align delta trans z) (-> self control unknown-surface01 alignv) (-> *display* frames-per-second))
|
||||
)
|
||||
@@ -2223,7 +2223,7 @@
|
||||
(ja-no-eval :group! eichar-swim-walk-ja :num! (seek!) :frame-num 0.0)
|
||||
(until (ja-done? 0)
|
||||
(compute-alignment! (-> self align))
|
||||
(if (zero? (logand (-> self align flags) (align-flags disabled)))
|
||||
(if (not (logtest? (-> self align flags) (align-flags disabled)))
|
||||
(set! (-> self control unknown-surface00 target-speed)
|
||||
(* (-> self align delta trans z) (-> self control unknown-surface01 alignv) (-> *display* frames-per-second))
|
||||
)
|
||||
@@ -2239,11 +2239,11 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate target-swim-down (target)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('attack 'attack-invinc)
|
||||
(let ((v1-2 (the-as attack-info (-> arg3 param 1))))
|
||||
(when (or (zero? (logand (-> v1-2 mask) (attack-mask mode))) (= (-> v1-2 mode) 'generic) (= (-> v1-2 mode) 'drown))
|
||||
(let ((v1-2 (the-as attack-info (-> event param 1))))
|
||||
(when (or (not (logtest? (-> v1-2 mask) (attack-mask mode))) (= (-> v1-2 mode) 'generic) (= (-> v1-2 mode) 'drown))
|
||||
(set! (-> v1-2 mode) 'damage)
|
||||
(if (and (= (-> self game mode) 'play) (>= 1.0 (-> self fact-info-target health)))
|
||||
(set! (-> v1-2 mode) 'drown-death)
|
||||
@@ -2254,7 +2254,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(target-standard-event-handler arg0 arg1 arg2 arg3)
|
||||
(target-standard-event-handler proc arg1 event-type event)
|
||||
)
|
||||
:enter (behavior ()
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
@@ -2357,10 +2357,7 @@
|
||||
)
|
||||
)
|
||||
(loop
|
||||
(if (and (or (zero? (logand (-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) button0-abs 0)
|
||||
(pad-buttons square)
|
||||
)
|
||||
)
|
||||
(if (and (or (not (cpad-hold? (-> self control unknown-cpad-info00 number) square))
|
||||
(-> self control unknown-spoolanim00)
|
||||
)
|
||||
(>= (- (-> *display* base-frame-counter) (-> self state-time)) gp-0)
|
||||
@@ -2417,7 +2414,7 @@
|
||||
:exit (-> target-swim-down exit)
|
||||
:trans (behavior ()
|
||||
(if (and (cpad-pressed? (-> self control unknown-cpad-info00 number) x)
|
||||
(zero? (logand (-> self state-flags) (state-flags prevent-jump)))
|
||||
(not (logtest? (-> self state-flags) (state-flags prevent-jump)))
|
||||
(zero? (logand (-> self water flags) (water-flags wt13 wt14)))
|
||||
)
|
||||
(go
|
||||
@@ -2451,7 +2448,7 @@
|
||||
(the-as float 0.0)
|
||||
(the-as float 0.1)
|
||||
)
|
||||
(if (and (zero? (logand (-> self water flags) (water-flags wt12)))
|
||||
(if (and (not (logtest? (-> self water flags) (water-flags wt12)))
|
||||
(or (>= (ja-aframe-num 0) 222.0)
|
||||
(and (!= (-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) stick0-speed) 0.0)
|
||||
(>= (ja-aframe-num 0) 200.0)
|
||||
@@ -2461,7 +2458,7 @@
|
||||
(goto cfg-37)
|
||||
)
|
||||
(compute-alignment! (-> self align))
|
||||
(when (zero? (logand (-> self water flags) (water-flags wt12)))
|
||||
(when (not (logtest? (-> self water flags) (water-flags wt12)))
|
||||
(logior! (-> self water flags) (water-flags wt04))
|
||||
(set! gp-0 #f)
|
||||
)
|
||||
@@ -2484,7 +2481,7 @@
|
||||
(the-as float 0.0)
|
||||
(the-as float 0.1)
|
||||
)
|
||||
(if (zero? (logand (-> self water flags) (water-flags wt12)))
|
||||
(if (not (logtest? (-> self water flags) (water-flags wt12)))
|
||||
(goto cfg-37)
|
||||
)
|
||||
(if (cpad-pressed? (-> self control unknown-cpad-info00 number) x)
|
||||
@@ -2550,7 +2547,7 @@
|
||||
(ja :group! eichar-swim-jump-ja :num! min)
|
||||
(until (and (ja-done? 0) (= (-> self skel root-channel 0) (-> self skel channel)))
|
||||
(compute-alignment! (-> self align))
|
||||
(if (zero? (logand (-> self align flags) (align-flags disabled)))
|
||||
(if (not (logtest? (-> self align flags) (align-flags disabled)))
|
||||
(+! (-> self water align-offset) (* 0.6 (-> self align delta trans y)))
|
||||
)
|
||||
(suspend)
|
||||
@@ -2603,7 +2600,7 @@
|
||||
(the-as handle #f)
|
||||
)
|
||||
)
|
||||
(if (zero? (logand (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons l3)))
|
||||
(if (not (cpad-hold? 0 l3))
|
||||
(target-timed-invulnerable (-> *TARGET-bank* hit-invulnerable-timeout) self)
|
||||
)
|
||||
)
|
||||
@@ -2639,10 +2636,10 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate target-launch (target)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(if (and (= arg2 'query) (= (-> arg3 param 0) 'mode))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(if (and (= event-type 'query) (= (-> event param 0) 'mode))
|
||||
'target-launch
|
||||
(target-standard-event-handler arg0 arg1 arg2 arg3)
|
||||
(target-standard-event-handler proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
:code (behavior ((arg0 float) (arg1 symbol) (arg2 vector) (arg3 int))
|
||||
@@ -2736,8 +2733,8 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate target-periscope (target)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('change-mode)
|
||||
#f
|
||||
)
|
||||
@@ -2748,7 +2745,7 @@
|
||||
)
|
||||
)
|
||||
(else
|
||||
(target-generic-event-handler arg0 arg1 arg2 arg3)
|
||||
(target-generic-event-handler proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -2837,11 +2834,11 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate target-clone-anim (target)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(if (and (= arg2 'trans) (= (-> arg3 param 0) 'restore))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(if (and (= event-type 'trans) (= (-> event param 0) 'restore))
|
||||
(set! (-> self control unknown-uint20) (the-as uint #f))
|
||||
)
|
||||
((-> target-grab event) arg0 arg1 arg2 arg3)
|
||||
((-> target-grab event) proc arg1 event-type event)
|
||||
)
|
||||
:enter (behavior ((arg0 handle))
|
||||
(set! (-> self control unknown-handle10) arg0)
|
||||
@@ -2863,7 +2860,7 @@
|
||||
(cond
|
||||
((not (-> self control unknown-spoolanim00))
|
||||
)
|
||||
((zero? (logand (-> self draw status) (draw-status hidden)))
|
||||
((not (logtest? (-> self draw status) (draw-status hidden)))
|
||||
(move-to-point! (-> self control) (the-as vector a1-2))
|
||||
(matrix->quaternion (-> self control unknown-quaternion00) (-> gp-0 bone transform))
|
||||
(quaternion-copy! (-> self control quat) (-> self control unknown-quaternion00))
|
||||
|
||||
+38
-43
@@ -92,7 +92,7 @@
|
||||
)
|
||||
(pad-buttons x)
|
||||
)
|
||||
(zero? (logand (-> self water flags) (water-flags wt09)))
|
||||
(not (logtest? (-> self water flags) (water-flags wt09)))
|
||||
(< (- (-> *display* base-frame-counter) (-> self state-time)) (seconds 3))
|
||||
(zero? (logand (-> self state-flags) (state-flags prevent-jump)))
|
||||
)
|
||||
@@ -989,7 +989,7 @@
|
||||
(if (can-hands? #t)
|
||||
(go target-running-attack)
|
||||
)
|
||||
(if (and (zero? (logand (-> self control status) (cshape-moving-flags onsurf)))
|
||||
(if (and (not (logtest? (-> self control status) (cshape-moving-flags onsurf)))
|
||||
(>= (- (-> *display* base-frame-counter) (-> self control unknown-dword11)) (seconds 0.08))
|
||||
)
|
||||
(go target-falling #f)
|
||||
@@ -1217,8 +1217,7 @@
|
||||
)
|
||||
:trans (behavior ()
|
||||
((-> self state-hook))
|
||||
(if (and (or (zero? (logand (-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) button0-abs 0) (pad-buttons l1 r1))
|
||||
)
|
||||
(if (and (or (not (cpad-hold? (-> self control unknown-cpad-info00 number) l1 r1))
|
||||
(logtest? (-> self state-flags) (state-flags prevent-duck))
|
||||
)
|
||||
(let ((v1-13 (ja-group)))
|
||||
@@ -1304,8 +1303,7 @@
|
||||
:exit (-> target-duck-stance exit)
|
||||
:trans (behavior ()
|
||||
((-> self state-hook))
|
||||
(if (and (or (zero? (logand (-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) button0-abs 0) (pad-buttons l1 r1))
|
||||
)
|
||||
(if (and (or (not (cpad-hold? (-> self control unknown-cpad-info00 number) l1 r1))
|
||||
(logtest? (-> self state-flags) (state-flags prevent-duck))
|
||||
(and (logtest? (-> self water flags) (water-flags wt10))
|
||||
(>= (- (- (-> self control trans y) (- (-> self water base-height) (-> self water wade-height)))) 2457.6)
|
||||
@@ -1459,7 +1457,7 @@
|
||||
(if (and (cpad-pressed? (-> self control unknown-cpad-info00 number) x)
|
||||
(< (vector-dot (-> self control dynam gravity-normal) (-> self control transv)) 12288.0)
|
||||
(and (< -61440.0 (vector-dot (-> self control dynam gravity-normal) (-> self control transv)))
|
||||
(zero? (logand (-> self water flags) (water-flags wt09)))
|
||||
(not (logtest? (-> self water flags) (water-flags wt09)))
|
||||
(zero? (logand (-> self state-flags) (state-flags prevent-jump)))
|
||||
)
|
||||
)
|
||||
@@ -1471,7 +1469,7 @@
|
||||
(>= (- (-> *display* base-frame-counter) (-> self control unknown-dword36))
|
||||
(the-as time-frame (-> *TARGET-bank* stuck-timeout))
|
||||
)
|
||||
(zero? (logand (-> self state-flags) (state-flags prevent-attack)))
|
||||
(not (logtest? (-> self state-flags) (state-flags prevent-attack)))
|
||||
(zero? (logand (-> self control unknown-surface01 flags) (surface-flags prevent-attacks-during-launch-jump surf08))
|
||||
)
|
||||
)
|
||||
@@ -1594,7 +1592,7 @@
|
||||
(>= (- (-> *display* base-frame-counter) (-> self control unknown-dword36))
|
||||
(the-as time-frame (-> *TARGET-bank* stuck-timeout))
|
||||
)
|
||||
(zero? (logand (-> self state-flags) (state-flags prevent-attack)))
|
||||
(not (logtest? (-> self state-flags) (state-flags prevent-attack)))
|
||||
(zero? (logand (-> self control unknown-surface01 flags) (surface-flags prevent-attacks-during-launch-jump surf08))
|
||||
)
|
||||
)
|
||||
@@ -1695,7 +1693,7 @@
|
||||
(>= (- (-> *display* base-frame-counter) (-> self control unknown-dword36))
|
||||
(the-as time-frame (-> *TARGET-bank* stuck-timeout))
|
||||
)
|
||||
(zero? (logand (-> self state-flags) (state-flags prevent-attack)))
|
||||
(not (logtest? (-> self state-flags) (state-flags prevent-attack)))
|
||||
(zero? (logand (-> self control unknown-surface01 flags) (surface-flags prevent-attacks-during-launch-jump surf08))
|
||||
)
|
||||
)
|
||||
@@ -2024,19 +2022,19 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate target-running-attack (target)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('touched)
|
||||
(cond
|
||||
(((method-of-type touching-shapes-entry prims-touching?)
|
||||
(the-as touching-shapes-entry (-> arg3 param 0))
|
||||
(the-as touching-shapes-entry (-> event param 0))
|
||||
(-> self control)
|
||||
(the-as uint 224)
|
||||
)
|
||||
(let ((gp-1 (target-send-attack
|
||||
arg0
|
||||
proc
|
||||
(the-as uint (-> self control unknown-symbol30))
|
||||
(the-as touching-shapes-entry (-> arg3 param 0))
|
||||
(the-as touching-shapes-entry (-> event param 0))
|
||||
(-> self control unknown-dword50)
|
||||
(-> self control unknown-dword51)
|
||||
)
|
||||
@@ -2044,8 +2042,8 @@
|
||||
)
|
||||
(when gp-1
|
||||
(set! (-> self control unknown-uint20) (the-as uint (-> *display* base-frame-counter)))
|
||||
(let ((v1-9 (if (and (nonzero? arg0) (type-type? (-> arg0 type) process-drawable))
|
||||
arg0
|
||||
(let ((v1-9 (if (and (nonzero? proc) (type-type? (-> proc type) process-drawable))
|
||||
proc
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -2075,12 +2073,12 @@
|
||||
)
|
||||
)
|
||||
(else
|
||||
(target-dangerous-event-handler arg0 arg1 arg2 arg3)
|
||||
(target-dangerous-event-handler proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(target-dangerous-event-handler arg0 arg1 arg2 arg3)
|
||||
(target-dangerous-event-handler proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -2165,7 +2163,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(zero? (logand (-> self state-flags) (state-flags prevent-jump prevent-attack)))
|
||||
(not (logtest? (-> self state-flags) (state-flags prevent-jump prevent-attack)))
|
||||
(zero? (logand (-> self control unknown-surface01 flags) (surface-flags prevent-attacks-during-launch-jump)))
|
||||
)
|
||||
)
|
||||
@@ -2219,7 +2217,7 @@
|
||||
(when (not (ja-min? 0))
|
||||
(cond
|
||||
((and (>= (ja-aframe-num 0) 20.0)
|
||||
(and (and (zero? (logand (-> self control status) (cshape-moving-flags onsurf)))
|
||||
(and (and (not (logtest? (-> self control status) (cshape-moving-flags onsurf)))
|
||||
(>= (- (-> *display* base-frame-counter) (-> self control unknown-dword11)) (-> *TARGET-bank* ground-timeout))
|
||||
(>= 0.0 (vector-dot (-> self control dynam gravity-normal) (-> self control transv)))
|
||||
(let ((v1-39 (ja-group)))
|
||||
@@ -2246,10 +2244,7 @@
|
||||
)
|
||||
(set-forward-vel (the-as float 0.0))
|
||||
)
|
||||
((and (zero? (logand (-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) button0-abs 0)
|
||||
(pad-buttons square)
|
||||
)
|
||||
)
|
||||
((and (not (cpad-hold? (-> self control unknown-cpad-info00 number) square))
|
||||
(>= (- (-> *display* base-frame-counter) (-> self state-time)) (seconds 0.05))
|
||||
)
|
||||
(if (= (-> self control ground-pat material) (pat-material ice))
|
||||
@@ -2284,7 +2279,7 @@
|
||||
(+! gp-2 1)
|
||||
)
|
||||
)
|
||||
(if (and (zero? (logand (-> self control status) (cshape-moving-flags onsurf)))
|
||||
(if (and (not (logtest? (-> self control status) (cshape-moving-flags onsurf)))
|
||||
(>= (- (-> *display* base-frame-counter) (-> self control unknown-dword11)) (-> *TARGET-bank* ground-timeout))
|
||||
(>= 0.0 (vector-dot (-> self control dynam gravity-normal) (-> self control transv)))
|
||||
(let ((v1-121 (ja-group)))
|
||||
@@ -2307,15 +2302,15 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate target-attack-air (target)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v0-0 (target-bonk-event-handler arg0 arg1 arg2 arg3)))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v0-0 (target-bonk-event-handler proc arg1 event-type event)))
|
||||
(cond
|
||||
(v0-0
|
||||
(empty)
|
||||
v0-0
|
||||
)
|
||||
(else
|
||||
(target-dangerous-event-handler arg0 arg1 arg2 arg3)
|
||||
(target-dangerous-event-handler proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -2553,7 +2548,7 @@
|
||||
(>= (- (-> *display* base-frame-counter) (-> self control unknown-dword36))
|
||||
(the-as time-frame (-> *TARGET-bank* stuck-timeout))
|
||||
)
|
||||
(zero? (logand (-> self state-flags) (state-flags prevent-attack)))
|
||||
(not (logtest? (-> self state-flags) (state-flags prevent-attack)))
|
||||
(zero? (logand (-> self control unknown-surface01 flags) (surface-flags prevent-attacks-during-launch-jump surf08))
|
||||
)
|
||||
)
|
||||
@@ -2626,14 +2621,14 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate target-flop (target)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v0-0 (target-bonk-event-handler arg0 arg1 arg2 arg3)))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v0-0 (target-bonk-event-handler proc arg1 event-type event)))
|
||||
(cond
|
||||
(v0-0
|
||||
(empty)
|
||||
v0-0
|
||||
)
|
||||
((let ((v1-0 arg2))
|
||||
((let ((v1-0 event-type))
|
||||
(= v1-0 'swim)
|
||||
)
|
||||
(cond
|
||||
@@ -2655,7 +2650,7 @@
|
||||
)
|
||||
)
|
||||
(else
|
||||
(target-dangerous-event-handler arg0 arg1 arg2 arg3)
|
||||
(target-dangerous-event-handler proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -2711,7 +2706,7 @@
|
||||
(when (and (or (< (target-move-dist (seconds 0.1)) 1638.4)
|
||||
(and (logtest? (-> self control status) (cshape-moving-flags twall)) (< 0.7 (-> self control poly-angle)))
|
||||
)
|
||||
(zero? (logand (-> self control status) (cshape-moving-flags t-act)))
|
||||
(not (logtest? (-> self control status) (cshape-moving-flags t-act)))
|
||||
(>= (-> self control unknown-uint20) (the-as uint 2))
|
||||
)
|
||||
(set! (-> self control unknown-dword36) (-> *display* base-frame-counter))
|
||||
@@ -2869,13 +2864,13 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate target-flop-hit-ground (target)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('swim)
|
||||
#f
|
||||
)
|
||||
(else
|
||||
(target-standard-event-handler arg0 arg1 arg2 arg3)
|
||||
(target-standard-event-handler proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -2943,11 +2938,11 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate target-wheel (target)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(if (= arg2 'touched)
|
||||
(send-event arg0 'roll)
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(if (= event-type 'touched)
|
||||
(send-event proc 'roll)
|
||||
)
|
||||
(target-standard-event-handler arg0 arg1 arg2 arg3)
|
||||
(target-standard-event-handler proc arg1 event-type event)
|
||||
)
|
||||
:enter (behavior ()
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
@@ -3133,7 +3128,7 @@
|
||||
)
|
||||
)
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
(while (zero? (logand (-> self control status) (cshape-moving-flags onsurf)))
|
||||
(while (not (logtest? (-> self control status) (cshape-moving-flags onsurf)))
|
||||
(when (>= (- (-> *display* base-frame-counter) (-> self state-time)) (seconds 0.01))
|
||||
(when (not (ja-group? eichar-jump-loop-ja))
|
||||
(ja-channel-push! 1 (seconds 0.1))
|
||||
|
||||
+1
-1
@@ -330,7 +330,7 @@
|
||||
(let ((f0-3 128.0))
|
||||
(when (and *target* (= (-> *target* fact-info-target health) 1.0))
|
||||
(let ((v1-16 (logand (-> *display* integral-frame-counter) 7)))
|
||||
(set! f0-3 (if (zero? (logand (-> *display* integral-frame-counter) 8))
|
||||
(set! f0-3 (if (not (logtest? (-> *display* integral-frame-counter) 8))
|
||||
(+ 128.0 (* 18.142857 (the float v1-16)))
|
||||
(- 255.0 (* 18.142857 (the float v1-16)))
|
||||
)
|
||||
|
||||
+4
-4
@@ -219,9 +219,9 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate hud-hidden (hud)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(local-vars (v0-0 object))
|
||||
(case arg2
|
||||
(case event-type
|
||||
(('show)
|
||||
(if (and (not *progress-process*) (!= (-> self last-hide-time) (-> *display* base-frame-counter)))
|
||||
(go hud-arriving)
|
||||
@@ -296,9 +296,9 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate hud-arriving (hud)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(local-vars (v0-3 object))
|
||||
(case arg2
|
||||
(case event-type
|
||||
(('hide-quick)
|
||||
(set! (-> self last-hide-time) (-> *display* base-frame-counter))
|
||||
(set! (-> self force-on-screen) #f)
|
||||
|
||||
+10
-10
@@ -1088,8 +1088,8 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate progress-waiting (progress)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('go-away)
|
||||
(go progress-gone)
|
||||
)
|
||||
@@ -1939,16 +1939,16 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate progress-normal (progress)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(local-vars (v0-0 none))
|
||||
(let ((v1-0 arg2))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (cond
|
||||
((= v1-0 'go-away)
|
||||
(go progress-going-out)
|
||||
)
|
||||
((= v1-0 'notify)
|
||||
(cond
|
||||
((= (-> arg3 param 0) 'done)
|
||||
((= (-> event param 0) 'done)
|
||||
(case (-> self display-state)
|
||||
(((progress-screen memcard-saving))
|
||||
(cond
|
||||
@@ -1989,11 +1989,11 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
((= (-> arg3 param 0) 'error)
|
||||
((= (-> event param 0) 'error)
|
||||
(let ((t9-4 format)
|
||||
(a0-17 #t)
|
||||
(a1-2 "ERROR NOTIFY: ~S ~D~%")
|
||||
(v1-13 (-> arg3 param 1))
|
||||
(v1-13 (-> event param 1))
|
||||
)
|
||||
(t9-4
|
||||
a0-17
|
||||
@@ -2060,7 +2060,7 @@
|
||||
(-> self display-state)
|
||||
)
|
||||
)
|
||||
(case (-> arg3 param 1)
|
||||
(case (-> event param 1)
|
||||
((14)
|
||||
(set! v0-0 (the-as none 7))
|
||||
(set! (-> self next-display-state) (the-as progress-screen v0-0))
|
||||
@@ -2482,8 +2482,8 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate progress-debug (progress)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('go-away)
|
||||
(go progress-going-out)
|
||||
)
|
||||
|
||||
+2
-2
@@ -870,7 +870,7 @@
|
||||
;; definition for function print-tree-bitmask
|
||||
(defun print-tree-bitmask ((bits int) (count int))
|
||||
(dotimes (i count)
|
||||
(if (zero? (logand bits 1))
|
||||
(if (not (logtest? bits 1))
|
||||
(format #t " ")
|
||||
(format #t "| ")
|
||||
)
|
||||
@@ -993,7 +993,7 @@
|
||||
)
|
||||
((= expected-type binteger)
|
||||
(cond
|
||||
((zero? (logand (the-as int obj) 7))
|
||||
((not (logtest? (the-as int obj) 7))
|
||||
#t
|
||||
)
|
||||
(else
|
||||
|
||||
+2
-2
@@ -959,7 +959,7 @@
|
||||
;; definition for function execute-process-tree
|
||||
(defun execute-process-tree ((arg0 process-tree) (arg1 (function object object)) (arg2 kernel-context))
|
||||
(let ((s3-0 (or (logtest? (-> arg0 mask) (process-mask process-tree))
|
||||
(not (and (zero? (logand (-> arg2 prevent-from-run) (-> arg0 mask))) (run-logic? arg0)))
|
||||
(not (and (not (logtest? (-> arg2 prevent-from-run) (-> arg0 mask))) (run-logic? arg0)))
|
||||
(arg1 arg0)
|
||||
)
|
||||
)
|
||||
@@ -984,7 +984,7 @@
|
||||
|
||||
;; definition for function search-process-tree
|
||||
(defun search-process-tree ((arg0 process-tree) (arg1 (function process-tree object)))
|
||||
(when (zero? (logand (-> arg0 mask) (process-mask process-tree)))
|
||||
(when (not (logtest? (-> arg0 mask) (process-mask process-tree)))
|
||||
(if (arg1 arg0)
|
||||
(return arg0)
|
||||
)
|
||||
|
||||
+29
-29
@@ -242,19 +242,19 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate grottopole-idle (grottopole)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(when (= (-> arg0 type) target)
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(when (= (-> proc type) target)
|
||||
(case event-type
|
||||
(('attack)
|
||||
(let ((v1-2 (-> arg3 param 2)))
|
||||
(let ((v1-2 (-> event param 2)))
|
||||
(when (!= v1-2 (-> self incomming-attack-id))
|
||||
(set! (-> self incomming-attack-id) v1-2)
|
||||
(case (-> arg3 param 1)
|
||||
(case (-> event param 1)
|
||||
(('uppercut)
|
||||
(when (and (< (-> *target* control trans y) (+ -40960.0 (-> self root-override trans y)))
|
||||
(< (-> self position) (-> self max-position))
|
||||
((method-of-type touching-shapes-entry prims-touching?)
|
||||
(the-as touching-shapes-entry (-> arg3 param 0))
|
||||
(the-as touching-shapes-entry (-> event param 0))
|
||||
(the-as collide-shape-moving (-> self root-override))
|
||||
(the-as uint 2)
|
||||
)
|
||||
@@ -269,7 +269,7 @@
|
||||
(when (and (< (+ -40960.0 (-> self root-override trans y)) (-> *target* control trans y))
|
||||
(> (-> self position) 0)
|
||||
((method-of-type touching-shapes-entry prims-touching?)
|
||||
(the-as touching-shapes-entry (-> arg3 param 0))
|
||||
(the-as touching-shapes-entry (-> event param 0))
|
||||
(the-as collide-shape-moving (-> self root-override))
|
||||
(the-as uint 1)
|
||||
)
|
||||
@@ -598,8 +598,8 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate ecoventrock-idle (ecoventrock)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('attack)
|
||||
(sound-play "cannon-shot")
|
||||
(increment-success-for-hint (game-text-id sidekick-hint-ecorocks))
|
||||
@@ -1129,12 +1129,12 @@
|
||||
(cond
|
||||
((not (task-closed? (game-task beach-flutflut) (task-status need-introduction)))
|
||||
)
|
||||
((zero? (logand (-> self ambients-played) 8))
|
||||
((not (logtest? (-> self ambients-played) 8))
|
||||
(if (play-ambient (-> self ambient) "BIR-AM04" #f (the-as vector #f))
|
||||
(logior! (-> self ambients-played) 8)
|
||||
)
|
||||
)
|
||||
((zero? (logand (-> self ambients-played) 512))
|
||||
((not (logtest? (-> self ambients-played) 512))
|
||||
(if (play-ambient (-> self ambient) "BIR-AM10" #f (the-as vector #f))
|
||||
(logior! (-> self ambients-played) 512)
|
||||
)
|
||||
@@ -1145,15 +1145,15 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate flutflutegg-idle (flutflutegg)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(when (and (= arg2 'attack)
|
||||
(or (= (-> arg3 param 1) 'punch) (= (-> arg3 param 1) 'spin) (= (-> arg3 param 1) 'spin-air))
|
||||
(!= (-> self incomming-attack-id) (-> arg3 param 2))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(when (and (= event-type 'attack)
|
||||
(or (= (-> event param 1) 'punch) (= (-> event param 1) 'spin) (= (-> event param 1) 'spin-air))
|
||||
(!= (-> self incomming-attack-id) (-> event param 2))
|
||||
)
|
||||
(set! (-> self incomming-attack-id) (-> arg3 param 2))
|
||||
(set! (-> self incomming-attack-id) (-> event param 2))
|
||||
(flutflutegg-hit-sounds)
|
||||
(let ((s5-1
|
||||
(vector-! (new-stack-vector0) (-> (the-as process-drawable arg0) root trans) (-> self root-override trans))
|
||||
(vector-! (new-stack-vector0) (-> (the-as process-drawable proc) root trans) (-> self root-override trans))
|
||||
)
|
||||
)
|
||||
(set! (-> s5-1 y) 0.0)
|
||||
@@ -1185,22 +1185,22 @@
|
||||
(set! (-> self ambients-played) 0)
|
||||
0
|
||||
)
|
||||
((and (zero? (logand (-> self ambients-played) 1)) (< (vector-length gp-0) 327680.0) (< -61440.0 (-> gp-0 y)))
|
||||
((and (not (logtest? (-> self ambients-played) 1)) (< (vector-length gp-0) 327680.0) (< -61440.0 (-> gp-0 y)))
|
||||
(if (play-ambient (-> self ambient) "BIR-AM01" #f (the-as vector #f))
|
||||
(logior! (-> self ambients-played) 1)
|
||||
)
|
||||
)
|
||||
((and (zero? (logand (-> self ambients-played) 2)) (< (vector-length gp-0) 163840.0) (< -40960.0 (-> gp-0 y)))
|
||||
((and (not (logtest? (-> self ambients-played) 2)) (< (vector-length gp-0) 163840.0) (< -40960.0 (-> gp-0 y)))
|
||||
(if (play-ambient (-> self ambient) "BIR-AM02" #f (the-as vector #f))
|
||||
(logior! (-> self ambients-played) 2)
|
||||
)
|
||||
)
|
||||
((and (zero? (logand (-> self ambients-played) 16)) (< (vector-length gp-0) 81920.0) (< -24576.0 (-> gp-0 y)))
|
||||
((and (not (logtest? (-> self ambients-played) 16)) (< (vector-length gp-0) 81920.0) (< -24576.0 (-> gp-0 y)))
|
||||
(if (play-ambient (-> self ambient) "BIR-AM05" #f (the-as vector #f))
|
||||
(logior! (-> self ambients-played) 16)
|
||||
)
|
||||
)
|
||||
((and (zero? (logand (-> self ambients-played) 4)) (< (vector-length gp-0) 40960.0) (< -24576.0 (-> gp-0 y)))
|
||||
((and (not (logtest? (-> self ambients-played) 4)) (< (vector-length gp-0) 40960.0) (< -24576.0 (-> gp-0 y)))
|
||||
(if (play-ambient (-> self ambient) "BIR-AM03" #f (the-as vector #f))
|
||||
(logior! (-> self ambients-played) 4)
|
||||
)
|
||||
@@ -1239,18 +1239,18 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate flutflutegg-physics (flutflutegg)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(the-as
|
||||
object
|
||||
(when (and (>= (- (-> *display* base-frame-counter) (-> self state-time)) (seconds 0.5))
|
||||
(= arg2 'attack)
|
||||
(or (= (-> arg3 param 1) 'punch) (= (-> arg3 param 1) 'spin) (= (-> arg3 param 1) 'spin-air))
|
||||
(!= (-> self incomming-attack-id) (-> arg3 param 2))
|
||||
(= event-type 'attack)
|
||||
(or (= (-> event param 1) 'punch) (= (-> event param 1) 'spin) (= (-> event param 1) 'spin-air))
|
||||
(!= (-> self incomming-attack-id) (-> event param 2))
|
||||
)
|
||||
(set! (-> self incomming-attack-id) (-> arg3 param 2))
|
||||
(set! (-> self incomming-attack-id) (-> event param 2))
|
||||
(flutflutegg-hit-sounds)
|
||||
(let ((s5-1
|
||||
(vector-! (new-stack-vector0) (-> (the-as process-drawable arg0) root trans) (-> self root-override trans))
|
||||
(vector-! (new-stack-vector0) (-> (the-as process-drawable proc) root trans) (-> self root-override trans))
|
||||
)
|
||||
)
|
||||
(set! (-> s5-1 y) 0.0)
|
||||
@@ -1508,8 +1508,8 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate harvester-idle (harvester)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('update)
|
||||
(if (and (-> self alt-actor) (logtest? (-> self alt-actor extra perm status) (entity-perm-status complete)))
|
||||
(go harvester-inflate #f)
|
||||
|
||||
+2
-2
@@ -295,8 +295,8 @@
|
||||
;; failed to figure out what this is:
|
||||
(defstate idle (beach-rock)
|
||||
:virtual #t
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('trigger)
|
||||
(set! (-> self trigger) #t)
|
||||
(go-virtual falling)
|
||||
|
||||
+1
-1
@@ -102,7 +102,7 @@
|
||||
6144.0
|
||||
16384.0
|
||||
)
|
||||
(the-as object (if (zero? (logand (-> obj nav-enemy-flags) (nav-enemy-flags navenmf8)))
|
||||
(the-as object (if (not (logtest? (-> obj nav-enemy-flags) (nav-enemy-flags navenmf8)))
|
||||
(do-push-aways! (-> obj collide-info))
|
||||
)
|
||||
)
|
||||
|
||||
+11
-11
@@ -231,8 +231,8 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate pelican-circle (pelican)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as
|
||||
object
|
||||
(cond
|
||||
@@ -246,7 +246,7 @@
|
||||
(handle->process (-> self fuel-cell))
|
||||
)
|
||||
((= v1-0 'position)
|
||||
(set! (-> self path-pos) (the-as float (-> arg3 param 0)))
|
||||
(set! (-> self path-pos) (the-as float (-> event param 0)))
|
||||
(let ((a1-3 (TODO-RENAME-12 (-> self path) (new 'stack-no-clear 'vector) (-> self path-pos))))
|
||||
(set-heading-vec! (-> self root-override) a1-3)
|
||||
)
|
||||
@@ -370,8 +370,8 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate pelican-dive (pelican)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (cond
|
||||
((= v1-0 'got-cell?)
|
||||
(-> self state-object)
|
||||
@@ -489,13 +489,13 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate pelican-wait-at-nest (pelican)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as
|
||||
object
|
||||
(cond
|
||||
((= v1-0 'attack)
|
||||
(case (-> arg3 param 1)
|
||||
(case (-> event param 1)
|
||||
(('explode)
|
||||
(let ((a0-2 (handle->process (-> self fuel-cell))))
|
||||
(if a0-2
|
||||
@@ -506,7 +506,7 @@
|
||||
#f
|
||||
)
|
||||
(else
|
||||
(let* ((gp-0 arg0)
|
||||
(let* ((gp-0 proc)
|
||||
(v1-13 (if (and (nonzero? gp-0) (type-type? (-> gp-0 type) process-drawable))
|
||||
gp-0
|
||||
)
|
||||
@@ -529,8 +529,8 @@
|
||||
((= v1-0 'touch)
|
||||
(send-shove-back
|
||||
(-> self root-override)
|
||||
arg0
|
||||
(the-as touching-shapes-entry (-> arg3 param 0))
|
||||
proc
|
||||
(the-as touching-shapes-entry (-> event param 0))
|
||||
0.7
|
||||
6144.0
|
||||
16384.0
|
||||
|
||||
+4
-4
@@ -276,7 +276,7 @@
|
||||
(vector-! s5-0 (-> obj flock 0 target) (-> obj root-override trans))
|
||||
(when (< (vector-dot s5-0 s5-0) 6710886400.0)
|
||||
(let ((v1-5 (ash 1 (-> obj index))))
|
||||
(when (zero? (logand v1-5 (-> obj flock 0 bird-at-waterfall)))
|
||||
(when (not (logtest? v1-5 (-> obj flock 0 bird-at-waterfall)))
|
||||
(logior! (-> obj flock 0 bird-at-waterfall) v1-5)
|
||||
(+! (-> obj flock 0 birds-at-waterfall) 1)
|
||||
)
|
||||
@@ -703,7 +703,7 @@
|
||||
(vector-! s4-0 (-> s5-0 flock 0 target) (-> s5-0 root-override trans))
|
||||
(when (< (vector-dot s4-0 s4-0) 6710886400.0)
|
||||
(let ((v1-24 (ash 1 (-> s5-0 index))))
|
||||
(when (zero? (logand v1-24 (-> s5-0 flock 0 bird-at-waterfall)))
|
||||
(when (not (logtest? v1-24 (-> s5-0 flock 0 bird-at-waterfall)))
|
||||
(logior! (-> s5-0 flock 0 bird-at-waterfall) v1-24)
|
||||
(+! (-> s5-0 flock 0 birds-at-waterfall) 1)
|
||||
)
|
||||
@@ -896,7 +896,7 @@
|
||||
(vector-! s5-0 (-> gp-0 flock 0 target) (-> gp-0 root-override trans))
|
||||
(when (< (vector-dot s5-0 s5-0) 6710886400.0)
|
||||
(let ((v1-26 (ash 1 (-> gp-0 index))))
|
||||
(when (zero? (logand v1-26 (-> gp-0 flock 0 bird-at-waterfall)))
|
||||
(when (not (logtest? v1-26 (-> gp-0 flock 0 bird-at-waterfall)))
|
||||
(logior! (-> gp-0 flock 0 bird-at-waterfall) v1-26)
|
||||
(+! (-> gp-0 flock 0 birds-at-waterfall) 1)
|
||||
)
|
||||
@@ -1394,7 +1394,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(while (zero? (logand (-> gp-0 extra perm status) (entity-perm-status complete)))
|
||||
(while (not (logtest? (-> gp-0 extra perm status) (entity-perm-status complete)))
|
||||
(suspend)
|
||||
)
|
||||
)
|
||||
|
||||
+16
-16
@@ -482,10 +482,10 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate citb-disc-idle (citb-disc)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (when (= v1-0 'touch)
|
||||
(send-event arg0 'no-look-around (seconds 0.25))
|
||||
(send-event proc 'no-look-around (seconds 0.25))
|
||||
#f
|
||||
)
|
||||
)
|
||||
@@ -957,12 +957,12 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate citb-robotboss-idle (citb-robotboss)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(local-vars (sv-96 int) (sv-112 int))
|
||||
(the-as
|
||||
object
|
||||
(cond
|
||||
((= arg2 'shield-off)
|
||||
((= event-type 'shield-off)
|
||||
(stop! (-> self sound))
|
||||
(if (-> self shield-on)
|
||||
(sound-play "robotcage-off")
|
||||
@@ -970,17 +970,17 @@
|
||||
(set! (-> self shield-on) #f)
|
||||
#f
|
||||
)
|
||||
((= arg2 'shield-on)
|
||||
((= event-type 'shield-on)
|
||||
(let ((v0-3 #t))
|
||||
(set! (-> self shield-on) v0-3)
|
||||
v0-3
|
||||
)
|
||||
)
|
||||
((= arg2 'die)
|
||||
((= event-type 'die)
|
||||
(cleanup-for-death self)
|
||||
(the-as symbol (deactivate self))
|
||||
)
|
||||
((or (= arg2 'touch) (= arg2 'attack))
|
||||
((or (= event-type 'touch) (= event-type 'attack))
|
||||
(let ((s4-0 sound-play-by-name)
|
||||
(s3-0 (make-u128 #x7061 (the-as uint #x7a2d646c65696873)))
|
||||
(s2-0 (new-sound-id))
|
||||
@@ -994,9 +994,9 @@
|
||||
)
|
||||
)
|
||||
(the-as symbol (send-event
|
||||
arg0
|
||||
proc
|
||||
'shove
|
||||
(-> arg3 param 0)
|
||||
(-> event param 0)
|
||||
(static-attack-info ((shove-up (meters 2)) (shove-back (meters 3))))
|
||||
)
|
||||
)
|
||||
@@ -1157,8 +1157,8 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate citb-coil-idle (citb-coil)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('trigger)
|
||||
(go citb-coil-break)
|
||||
)
|
||||
@@ -1539,8 +1539,8 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate citb-generator-idle (citb-generator)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('attack)
|
||||
(if (-> self mushroom)
|
||||
(increment-success-for-hint (game-text-id citadel-generator))
|
||||
@@ -1791,8 +1791,8 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate citadelcam-idle (citadelcam)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('trigger)
|
||||
(when (and (task-complete? *game-info* (game-task citadel-sage-blue))
|
||||
(task-complete? *game-info* (game-task citadel-sage-red))
|
||||
|
||||
+11
-11
@@ -105,9 +105,9 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate citb-sagecage-idle (citb-sagecage)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(local-vars (v0-3 none))
|
||||
(let ((v1-0 arg2))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (cond
|
||||
((= v1-0 'disable-bars)
|
||||
(stop! (-> self sound))
|
||||
@@ -474,13 +474,13 @@
|
||||
;; failed to figure out what this is:
|
||||
(defstate play-anim (citb-sage)
|
||||
:virtual #t
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('disable-bars)
|
||||
(send-event (handle->process (-> self cage)) 'disable-bars)
|
||||
)
|
||||
(else
|
||||
((-> (method-of-type process-taskable play-anim) event) arg0 arg1 arg2 arg3)
|
||||
((-> (method-of-type process-taskable play-anim) event) proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -489,13 +489,13 @@
|
||||
;; failed to figure out what this is:
|
||||
(defstate idle (citb-sage)
|
||||
:virtual #t
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('open)
|
||||
(send-event (handle->process (-> self cage)) 'disable-bars)
|
||||
)
|
||||
(else
|
||||
((-> (method-of-type process-taskable idle) event) arg0 arg1 arg2 arg3)
|
||||
((-> (method-of-type process-taskable idle) event) proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1132,8 +1132,8 @@
|
||||
;; failed to figure out what this is:
|
||||
(defstate play-anim (green-sagecage)
|
||||
:virtual #t
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('spawn-robot)
|
||||
(let ((gp-0 (entity-by-name "robotboss-3")))
|
||||
(format 0 "robotboss ent ~A~%" gp-0)
|
||||
@@ -1154,7 +1154,7 @@
|
||||
)
|
||||
)
|
||||
(else
|
||||
((-> (method-of-type citb-sage play-anim) event) arg0 arg1 arg2 arg3)
|
||||
((-> (method-of-type citb-sage play-anim) event) proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
+11
-11
@@ -78,8 +78,8 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate drop-plat-idle (drop-plat)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('drop)
|
||||
(logclear! (-> self mask) (process-mask actor-pause))
|
||||
(go drop-plat-drop)
|
||||
@@ -126,8 +126,8 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate drop-plat-spawn (drop-plat)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('drop)
|
||||
(go drop-plat-die)
|
||||
)
|
||||
@@ -157,8 +157,8 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate drop-plat-rise (drop-plat)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('drop)
|
||||
(go drop-plat-drop)
|
||||
)
|
||||
@@ -527,8 +527,8 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate citb-drop-plat-idle (citb-drop-plat)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('trigger)
|
||||
(go citb-drop-plat-active)
|
||||
)
|
||||
@@ -545,13 +545,13 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate citb-drop-plat-active (citb-drop-plat)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (cond
|
||||
((= v1-0 'player-stepped)
|
||||
(when (>= (- (-> *display* base-frame-counter) (-> self drop-time)) (seconds 0.2))
|
||||
(set! (-> self drop-time) (-> *display* base-frame-counter))
|
||||
(citb-drop-plat-drop-children (the-as int (-> arg3 param 0)))
|
||||
(citb-drop-plat-drop-children (the-as int (-> event param 0)))
|
||||
)
|
||||
)
|
||||
((= v1-0 'trigger)
|
||||
|
||||
+8
-8
@@ -343,8 +343,8 @@
|
||||
;; failed to figure out what this is:
|
||||
(defstate citb-base-plat-idle (citb-stair-plat)
|
||||
:virtual #t
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (when (= v1-0 'trigger)
|
||||
(logclear! (-> self mask) (process-mask actor-pause))
|
||||
(let ((v0-0 #t))
|
||||
@@ -1053,13 +1053,13 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate citb-firehose-blast (citb-firehose)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('touch)
|
||||
(send-event
|
||||
arg0
|
||||
proc
|
||||
'attack
|
||||
(-> arg3 param 0)
|
||||
(-> event param 0)
|
||||
(static-attack-info ((mode 'damage) (shove-back (meters 6)) (shove-up (meters 3))))
|
||||
)
|
||||
)
|
||||
@@ -1177,8 +1177,8 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate citb-exit-plat-idle (citb-exit-plat)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('trigger)
|
||||
(let ((v1-3 (-> self entity extra perm)))
|
||||
(logior! (-> v1-3 status) (entity-perm-status user-set-from-cstage))
|
||||
|
||||
+16
-16
@@ -96,10 +96,10 @@
|
||||
;; failed to figure out what this is:
|
||||
(defstate basebutton-up-idle (basebutton)
|
||||
:virtual #t
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('attack)
|
||||
(case (-> arg3 param 1)
|
||||
(case (-> event param 1)
|
||||
(('flop)
|
||||
(TODO-RENAME-29 self (-> self event-going-down) (-> self notify-actor))
|
||||
(sound-play "silo-button")
|
||||
@@ -112,7 +112,7 @@
|
||||
(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)))
|
||||
(move-to-vec-or-quat! self (the-as vector (-> event param 0)) (the-as quaternion (-> event param 1)))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -141,14 +141,14 @@
|
||||
;; failed to figure out what this is:
|
||||
(defstate basebutton-going-down (basebutton)
|
||||
:virtual #t
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('untrigger)
|
||||
(sound-play "silo-button")
|
||||
(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)))
|
||||
(move-to-vec-or-quat! self (the-as vector (-> event param 0)) (the-as quaternion (-> event param 1)))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -181,14 +181,14 @@
|
||||
;; failed to figure out what this is:
|
||||
(defstate basebutton-down-idle (basebutton)
|
||||
:virtual #t
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('untrigger)
|
||||
(sound-play "silo-button")
|
||||
(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)))
|
||||
(move-to-vec-or-quat! self (the-as vector (-> event param 0)) (the-as quaternion (-> event param 1)))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -233,10 +233,10 @@
|
||||
;; failed to figure out what this is:
|
||||
(defstate basebutton-going-up (basebutton)
|
||||
:virtual #t
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('move-to)
|
||||
(move-to-vec-or-quat! self (the-as vector (-> arg3 param 0)) (the-as quaternion (-> arg3 param 1)))
|
||||
(move-to-vec-or-quat! self (the-as vector (-> event param 0)) (the-as quaternion (-> event param 1)))
|
||||
)
|
||||
(('trigger)
|
||||
(sound-play "silo-button")
|
||||
@@ -592,8 +592,8 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate target-warp-out (target)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('death-end)
|
||||
(let ((v0-0 (the-as object (logior (-> self draw status) (draw-status hidden)))))
|
||||
(set! (-> self draw status) (the-as draw-status v0-0))
|
||||
@@ -601,7 +601,7 @@
|
||||
)
|
||||
)
|
||||
(else
|
||||
(target-generic-event-handler arg0 arg1 arg2 arg3)
|
||||
(target-generic-event-handler proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
+1
-1
@@ -213,7 +213,7 @@ battlecontroller-default-event-handler
|
||||
(eval-path-curve-div! (-> s5-0 path) s3-0 (the float (-> s5-0 state)) 'interp)
|
||||
(send-event s4-0 'cue-jump-to-point s3-0)
|
||||
)
|
||||
(if (zero? (logand (-> (the-as nav-enemy s4-0) nav-enemy-flags) (nav-enemy-flags navenmf11)))
|
||||
(if (not (logtest? (-> (the-as nav-enemy s4-0) nav-enemy-flags) (nav-enemy-flags navenmf11)))
|
||||
(+! (-> s5-0 state) 1)
|
||||
)
|
||||
)
|
||||
|
||||
+7
-7
@@ -81,10 +81,10 @@
|
||||
(defmethod common-post nav-enemy ((obj nav-enemy))
|
||||
(when (and (logtest? (-> obj nav-enemy-flags) (nav-enemy-flags navenmf8))
|
||||
(or (not *target*)
|
||||
(and (zero? (logand (-> *target* state-flags)
|
||||
(and (not (logtest? (-> *target* state-flags)
|
||||
(state-flags being-attacked invulnerable timed-invulnerable invuln-powerup do-not-notice dying)
|
||||
)
|
||||
)
|
||||
)
|
||||
(>= (- (-> *display* base-frame-counter) (-> obj touch-time)) (seconds 0.05))
|
||||
)
|
||||
)
|
||||
@@ -551,11 +551,11 @@ nav-enemy-default-event-handler
|
||||
;; definition for method 46 of type nav-enemy
|
||||
(defmethod TODO-RENAME-46 nav-enemy ((obj nav-enemy) (arg0 float))
|
||||
(and *target*
|
||||
(zero? (logand (-> *target* state-flags)
|
||||
(not (logtest? (-> *target* state-flags)
|
||||
(state-flags being-attacked invulnerable timed-invulnerable invuln-powerup do-not-notice dying)
|
||||
)
|
||||
)
|
||||
(and (or (zero? (logand (-> obj nav-enemy-flags) (nav-enemy-flags navenmf12)))
|
||||
)
|
||||
(and (or (not (logtest? (-> obj nav-enemy-flags) (nav-enemy-flags navenmf12)))
|
||||
(< (vector-vector-distance (target-pos 0) (-> obj collide-info trans)) arg0)
|
||||
)
|
||||
(nav-enemy-test-point-near-nav-mesh? (-> *target* control shadow-pos))
|
||||
@@ -741,7 +741,7 @@ nav-enemy-default-event-handler
|
||||
(when (not s4-1)
|
||||
(compute-alignment! (-> self align))
|
||||
(align! (-> self align) (align-opts adjust-y-vel ignore-y-if-zero) 1.0 arg1 1.0)
|
||||
(when (zero? (logand (-> self align flags) (align-flags disabled)))
|
||||
(when (not (logtest? (-> self align flags) (align-flags disabled)))
|
||||
(let ((f0-6 (* (- (-> self align delta trans z)) (-> *display* frames-per-second))))
|
||||
(set! (-> self collide-info transv x) (* (-> self hit-from-dir x) f0-6))
|
||||
(set! (-> self collide-info transv z) (* (-> self hit-from-dir z) f0-6))
|
||||
@@ -802,7 +802,7 @@ nav-enemy-default-event-handler
|
||||
|
||||
;; definition for method 12 of type nav-enemy
|
||||
(defmethod run-logic? nav-enemy ((obj nav-enemy))
|
||||
(or (zero? (logand (-> obj mask) (process-mask actor-pause)))
|
||||
(or (not (logtest? (-> obj mask) (process-mask actor-pause)))
|
||||
(or (and (nonzero? (-> obj draw))
|
||||
(and (>= (+ (-> *ACTOR-bank* pause-dist) (-> obj collide-info pause-adjust-distance))
|
||||
(vector-vector-distance (-> obj collide-info trans) (camera-pos))
|
||||
|
||||
+3
-3
@@ -55,8 +55,8 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate orb-cache-top-idle (orb-cache-top)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('eco-blue)
|
||||
(process-entity-status! self (entity-perm-status complete) #t)
|
||||
(dotimes (gp-0 5)
|
||||
@@ -66,7 +66,7 @@
|
||||
(go orb-cache-top-activate #f)
|
||||
)
|
||||
(else
|
||||
(plat-event arg0 arg1 arg2 arg3)
|
||||
(plat-event proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
+7
-7
@@ -73,12 +73,12 @@
|
||||
;; failed to figure out what this is:
|
||||
(defstate plat-button-idle (plat-button)
|
||||
:virtual #t
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('touch)
|
||||
(when (can-activate? self)
|
||||
(if (and ((method-of-type touching-shapes-entry prims-touching?)
|
||||
(the-as touching-shapes-entry (-> arg3 param 0))
|
||||
(the-as touching-shapes-entry (-> event param 0))
|
||||
(-> self root-override)
|
||||
(the-as uint 1)
|
||||
)
|
||||
@@ -189,8 +189,8 @@
|
||||
;; failed to figure out what this is:
|
||||
(defstate plat-button-move-downward (plat-button)
|
||||
:virtual #t
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(the-as object (when (or (= arg2 'touch) (= arg2 'attack))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(the-as object (when (or (= event-type 'touch) (= event-type 'attack))
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
#f
|
||||
)
|
||||
@@ -264,8 +264,8 @@
|
||||
;; failed to figure out what this is:
|
||||
(defstate plat-button-move-upward (plat-button)
|
||||
:virtual #t
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(the-as object (when (or (= arg2 'touch) (= arg2 'attack))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(the-as object (when (or (= event-type 'touch) (= event-type 'attack))
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
#f
|
||||
)
|
||||
|
||||
+5
-5
@@ -52,13 +52,13 @@
|
||||
;; failed to figure out what this is:
|
||||
(defstate plat-idle (plat-eco)
|
||||
:virtual #t
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('wake)
|
||||
(go-virtual plat-path-active (the-as plat #f))
|
||||
)
|
||||
(('eco-blue)
|
||||
(go-virtual notice-blue (process->handle arg0))
|
||||
(go-virtual notice-blue (process->handle proc))
|
||||
)
|
||||
(('ridden 'edge-grabbed)
|
||||
(when (send-event *target* 'query 'powerup (pickup-type eco-blue))
|
||||
@@ -100,8 +100,8 @@
|
||||
;; failed to figure out what this is:
|
||||
(defstate notice-blue (plat-eco)
|
||||
:virtual override
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('wake)
|
||||
(sound-play "blue-eco-on" :position (the-as symbol (-> self root-override trans)))
|
||||
(go-virtual plat-path-active (the-as plat #f))
|
||||
|
||||
+8
-8
@@ -611,20 +611,20 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate ropebridge-idle (ropebridge)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((f0-0 -1.0))
|
||||
(cond
|
||||
((= arg2 'bonk)
|
||||
((= event-type 'bonk)
|
||||
(when (>= (- (-> *display* base-frame-counter) (-> self bonk-time-stamp)) (seconds 0.2))
|
||||
(set! (-> self bonk-time-stamp) (-> *display* base-frame-counter))
|
||||
(set! f0-0 (the-as float (-> arg3 param 1)))
|
||||
(set! f0-0 (the-as float (-> event param 1)))
|
||||
(if (>= f0-0 (-> self tuning rider-bonk-max))
|
||||
(set! f0-0 (-> self tuning rider-bonk-max))
|
||||
)
|
||||
)
|
||||
)
|
||||
((and (= arg2 'attack) (= (-> arg3 param 1) 'flop))
|
||||
(let ((v1-17 (-> arg3 param 2)))
|
||||
((and (= event-type 'attack) (= (-> event param 1) 'flop))
|
||||
(let ((v1-17 (-> event param 2)))
|
||||
(when (!= v1-17 (-> self player-attack-id))
|
||||
(set! (-> self player-attack-id) v1-17)
|
||||
(set! (-> self attack-flop-time-stamp) (-> *display* base-frame-counter))
|
||||
@@ -635,13 +635,13 @@
|
||||
)
|
||||
(the-as
|
||||
object
|
||||
(when (and (>= f0-0 (-> self tuning rider-bonk-min)) (-> arg3 param 0))
|
||||
(when (and (>= f0-0 (-> self tuning rider-bonk-min)) (-> event param 0))
|
||||
(set! (-> self agitated-time-stamp) (-> *display* base-frame-counter))
|
||||
(let* ((f30-0 (/ (* (- f0-0 (-> self tuning rider-bonk-min)) (-> self tuning rider-bonk-force))
|
||||
(- (-> self tuning rider-bonk-max) (-> self tuning rider-bonk-min))
|
||||
)
|
||||
)
|
||||
(gp-0 (the-as object (-> arg3 param 0)))
|
||||
(gp-0 (the-as object (-> event param 0)))
|
||||
(a0-7 (-> (the-as touching-shapes-entry gp-0) head))
|
||||
(s4-0 (-> self root-override))
|
||||
(s5-0 (get-touched-prim a0-7 s4-0 (the-as touching-shapes-entry gp-0)))
|
||||
@@ -1051,7 +1051,7 @@
|
||||
|
||||
;; definition for method 12 of type ropebridge
|
||||
(defmethod run-logic? ropebridge ((obj ropebridge))
|
||||
(or (zero? (logand (-> obj mask) (process-mask actor-pause)))
|
||||
(or (not (logtest? (-> obj mask) (process-mask actor-pause)))
|
||||
(< (- (-> *display* base-frame-counter) (-> obj agitated-time-stamp)) (seconds 5))
|
||||
(or (>= (-> obj sleep-dist) (vector-vector-distance (-> obj root-override trans) (math-camera-pos)))
|
||||
(and (nonzero? (-> obj skel)) (!= (-> obj skel root-channel 0) (-> obj skel channel)))
|
||||
|
||||
+2
-2
@@ -99,7 +99,7 @@ nav-enemy-default-event-handler
|
||||
|
||||
;; definition for method 12 of type sharkey
|
||||
(defmethod run-logic? sharkey ((obj sharkey))
|
||||
(or (zero? (logand (-> obj mask) (process-mask actor-pause)))
|
||||
(or (not (logtest? (-> obj mask) (process-mask actor-pause)))
|
||||
(or (>= (+ (-> *ACTOR-bank* pause-dist) (-> obj collide-info pause-adjust-distance))
|
||||
(vector-vector-distance (-> obj collide-info trans) (math-camera-pos))
|
||||
)
|
||||
@@ -280,7 +280,7 @@ nav-enemy-default-event-handler
|
||||
)
|
||||
)
|
||||
((sharkey-notice-player?)
|
||||
(when (zero? (logand (-> self nav-enemy-flags) (nav-enemy-flags navenmf0)))
|
||||
(when (not (logtest? (-> self nav-enemy-flags) (nav-enemy-flags navenmf0)))
|
||||
(logior! (-> self nav-enemy-flags) (nav-enemy-flags navenmf0))
|
||||
(set! (-> self notice-time) (-> *display* base-frame-counter))
|
||||
)
|
||||
|
||||
+3
-3
@@ -553,10 +553,10 @@
|
||||
;; failed to figure out what this is:
|
||||
(defstate water-vol-idle (water-anim)
|
||||
:virtual #t
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (when (= v1-0 'move-to)
|
||||
(set! (-> self root trans quad) (-> (the-as vector (-> arg3 param 0)) quad))
|
||||
(set! (-> self root trans quad) (-> (the-as vector (-> event param 0)) quad))
|
||||
(set! (-> self water-height) (-> self root trans y))
|
||||
(if (nonzero? (-> self sound))
|
||||
(update-trans! (-> self sound) (-> self root trans))
|
||||
|
||||
+5
-5
@@ -115,8 +115,8 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate cavecrystal-idle (cavecrystal)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('attack)
|
||||
(go cavecrystal-active)
|
||||
)
|
||||
@@ -145,10 +145,10 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate cavecrystal-active (cavecrystal)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (when (= v1-0 'attack)
|
||||
(let ((v1-1 (-> arg3 param 2)))
|
||||
(let ((v1-1 (-> event param 2)))
|
||||
(cond
|
||||
((!= v1-1 (-> self player-attack-id))
|
||||
(set! (-> self player-attack-id) v1-1)
|
||||
|
||||
+9
-9
@@ -88,8 +88,8 @@
|
||||
;; failed to figure out what this is:
|
||||
(defstate idle (final-door)
|
||||
:virtual #t
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('open)
|
||||
(go-virtual open #f)
|
||||
)
|
||||
@@ -107,11 +107,11 @@
|
||||
;; failed to figure out what this is:
|
||||
(defstate open (final-door)
|
||||
:virtual #t
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (when (= v1-0 'brightness)
|
||||
(let ((f0-0 (the-as float (-> arg3 param 0)))
|
||||
(f1-0 (the-as float (-> arg3 param 1)))
|
||||
(let ((f0-0 (the-as float (-> event param 0)))
|
||||
(f1-0 (the-as float (-> event param 1)))
|
||||
)
|
||||
(set-vector! (-> self draw color-mult) f0-0 f0-0 f0-0 f0-0)
|
||||
(let ((v0-0 (-> self draw color-emissive)))
|
||||
@@ -222,7 +222,7 @@
|
||||
(ja-post)
|
||||
(loop
|
||||
(if (and (and *target* (>= 61440.0 (vector-vector-distance (-> self root trans) (-> *target* control trans))))
|
||||
(and (zero? (logand (-> *target* state-flags) (state-flags grabbed)))
|
||||
(and (not (logtest? (-> *target* state-flags) (state-flags grabbed)))
|
||||
(and (>= (-> *game-info* fuel) 100.0)
|
||||
(not (and (-> self entity) (logtest? (-> self entity extra perm status) (entity-perm-status complete))))
|
||||
(= (get-task-status (game-task finalboss-movies)) (task-status need-reward-speech))
|
||||
@@ -382,8 +382,8 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate target-final-door (target)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
((-> target-grab event) arg0 arg1 arg2 arg3)
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
((-> target-grab event) proc arg1 event-type event)
|
||||
)
|
||||
:enter (behavior ((arg0 basic) (arg1 handle))
|
||||
(send-event *camera* 'change-to-entity-by-name "camera-403")
|
||||
|
||||
+2
-2
@@ -828,8 +828,8 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate spawn-minions (green-eco-lurker-gen)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('blob-died)
|
||||
(set! (-> self num-alive) (max 0 (+ (-> self num-alive) -1)))
|
||||
(send-event (ppointer->process (-> self parent)) 'blob-died)
|
||||
|
||||
+1
-1
@@ -684,7 +684,7 @@
|
||||
(defmethod spawn-child-eco light-eco-mother ((obj light-eco-mother))
|
||||
(countdown (s3-0 4)
|
||||
(let ((gp-0 (rand-vu-int-count 32)))
|
||||
(when (zero? (logand (-> obj angle-mask) (ash 1 gp-0)))
|
||||
(when (not (logtest? (-> obj angle-mask) (ash 1 gp-0)))
|
||||
(let ((f28-0 (* 2048.0 (the float gp-0)))
|
||||
(f30-0 (rand-vu-float-range 61440.0 88514.56))
|
||||
(s4-0 (new 'stack-no-clear 'vector))
|
||||
|
||||
+8
-8
@@ -14,11 +14,11 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate cam-robotboss (camera-slave)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('set-pivot)
|
||||
(let ((v0-0 (the-as object (-> self pivot-pt))))
|
||||
(set! (-> (the-as vector v0-0) quad) (-> (the-as vector (-> arg3 param 0)) quad))
|
||||
(set! (-> (the-as vector v0-0) quad) (-> (the-as vector (-> event param 0)) quad))
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
@@ -26,7 +26,7 @@
|
||||
#f
|
||||
)
|
||||
(else
|
||||
(cam-standard-event-handler arg0 arg1 arg2 arg3)
|
||||
(cam-standard-event-handler proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -45,7 +45,7 @@
|
||||
(none)
|
||||
)
|
||||
:trans (behavior ()
|
||||
(when (zero? (logand (-> *camera* master-options) 2))
|
||||
(when (not (logtest? (-> *camera* master-options) 2))
|
||||
(set! *camera-base-mode* cam-string)
|
||||
(cam-slave-go cam-free-floating)
|
||||
)
|
||||
@@ -344,10 +344,10 @@
|
||||
;; failed to figure out what this is:
|
||||
(defstate idle (silodoor)
|
||||
:virtual #t
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('open)
|
||||
(set! (-> self part-opened) (the-as float (-> arg3 param 0)))
|
||||
(set! (-> self part-opened) (the-as float (-> event param 0)))
|
||||
)
|
||||
(('hide)
|
||||
(go-virtual hidden)
|
||||
|
||||
+4
-4
@@ -914,11 +914,11 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate yellowshot-idle (yellowshot)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('touch 'attack)
|
||||
(when (= (-> arg0 type) target)
|
||||
(send-event *target* 'attack (-> arg3 param 0) (static-attack-info ((mode 'generic))))
|
||||
(when (= (-> proc type) target)
|
||||
(send-event *target* 'attack (-> event param 0) (static-attack-info ((mode 'generic))))
|
||||
(send-event (ppointer->process (-> self parent)) 'hit-jak)
|
||||
)
|
||||
)
|
||||
|
||||
+14
-14
@@ -439,8 +439,8 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate robotboss-yellow-dark-bomb-wait (robotboss)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (cond
|
||||
((= v1-0 'white-eco-picked-up)
|
||||
(close-specific-task! (game-task finalboss-movies) (task-status unknown))
|
||||
@@ -464,7 +464,7 @@
|
||||
(deactivate self)
|
||||
)
|
||||
(else
|
||||
(robotboss-bomb-handler arg0 arg1 arg2 arg3)
|
||||
(robotboss-bomb-handler proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -923,8 +923,8 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate robotboss-yellow-wait (robotboss)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('hit-jak)
|
||||
(let ((f0-2 (rand-float-gen)))
|
||||
(cond
|
||||
@@ -952,7 +952,7 @@
|
||||
)
|
||||
)
|
||||
(else
|
||||
(robotboss-handler arg0 arg1 arg2 arg3)
|
||||
(robotboss-handler proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1523,8 +1523,8 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate robotboss-red-wait (robotboss)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('hit-jak)
|
||||
(let ((f0-2 (rand-float-gen)))
|
||||
(cond
|
||||
@@ -1552,7 +1552,7 @@
|
||||
)
|
||||
)
|
||||
(else
|
||||
(robotboss-handler arg0 arg1 arg2 arg3)
|
||||
(robotboss-handler proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1981,8 +1981,8 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate robotboss-green-wait (robotboss)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('trigger)
|
||||
(ja-channel-push! 1 (seconds 0.2))
|
||||
(ja :group! robotboss-green-roar-ja)
|
||||
@@ -2040,7 +2040,7 @@
|
||||
)
|
||||
)
|
||||
(else
|
||||
(robotboss-handler arg0 arg1 arg2 arg3)
|
||||
(robotboss-handler proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -2439,10 +2439,10 @@
|
||||
(when (and arg1 (nonzero? (-> self looping-sound 1)))
|
||||
(update! (-> self looping-sound 1))
|
||||
(if (and *target*
|
||||
(zero? (logand (-> *target* state-flags)
|
||||
(not (logtest? (-> *target* state-flags)
|
||||
(state-flags being-attacked invulnerable timed-invulnerable invuln-powerup do-not-notice dying)
|
||||
)
|
||||
)
|
||||
)
|
||||
(>= 8192.0 (vector-vector-distance gp-0 (target-pos 0)))
|
||||
)
|
||||
(send-event *target* 'attack #f (static-attack-info ((shove-up (meters 2.5)) (shove-back (meters 7.5)))))
|
||||
|
||||
+8
-8
@@ -88,11 +88,11 @@
|
||||
;; failed to figure out what this is:
|
||||
(defstate plat-path-active (plat-eco-finalboss)
|
||||
:virtual #t
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('target)
|
||||
(process-entity-status! self (entity-perm-status complete) #t)
|
||||
(set! (-> self force-dest) (the-as float (-> arg3 param 0)))
|
||||
(set! (-> self force-dest) (the-as float (-> event param 0)))
|
||||
)
|
||||
(('ridden 'edge-grabbed)
|
||||
(if (>= (- (-> *display* base-frame-counter) (-> self touch-time)) (seconds 2))
|
||||
@@ -114,7 +114,7 @@
|
||||
#f
|
||||
)
|
||||
(else
|
||||
(plat-event arg0 arg1 arg2 arg3)
|
||||
(plat-event proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -629,8 +629,8 @@
|
||||
;; failed to figure out what this is:
|
||||
(defstate play-anim (sage-finalboss)
|
||||
:virtual #t
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('fade)
|
||||
(set! (-> self credit-fade) 1.0)
|
||||
)
|
||||
@@ -639,12 +639,12 @@
|
||||
)
|
||||
(('activate-particle)
|
||||
(let ((v0-0 (the-as object #t)))
|
||||
(set! (-> self particle (-> arg3 param 0) active) (the-as symbol v0-0))
|
||||
(set! (-> self particle (-> event param 0) active) (the-as symbol v0-0))
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
(('deactivate-particle)
|
||||
(set! (-> self particle (-> arg3 param 0) active) #f)
|
||||
(set! (-> self particle (-> event param 0) active) #f)
|
||||
#f
|
||||
)
|
||||
)
|
||||
|
||||
+10
-10
@@ -124,10 +124,10 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate balloon-idle (balloon)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('attack)
|
||||
(send-event arg0 'heat -10.0)
|
||||
(send-event proc 'heat -10.0)
|
||||
(go balloon-popping)
|
||||
)
|
||||
)
|
||||
@@ -202,8 +202,8 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate spike-up (spike)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (if (= v1-0 'go-spike-up)
|
||||
#t
|
||||
)
|
||||
@@ -254,8 +254,8 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate spike-down (spike)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (when (= v1-0 'go-spike-up)
|
||||
(go spike-up)
|
||||
#t
|
||||
@@ -647,10 +647,10 @@
|
||||
;; failed to figure out what this is:
|
||||
(defstate idle (crate-darkeco-cluster)
|
||||
:virtual #t
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('attack 'touch)
|
||||
(send-event arg0 'attack (-> arg3 param 0) (static-attack-info ((mode 'darkeco))))
|
||||
(send-event proc 'attack (-> event param 0) (static-attack-info ((mode 'darkeco))))
|
||||
(go-virtual die)
|
||||
)
|
||||
)
|
||||
|
||||
+10
-10
@@ -92,13 +92,13 @@
|
||||
;; failed to figure out what this is:
|
||||
(defstate wait-for-start (flutflut)
|
||||
:virtual #t
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as
|
||||
object
|
||||
(cond
|
||||
((= v1-0 'trans)
|
||||
(vector+! (the-as vector (-> arg3 param 0)) (-> self root-override trans) (-> self extra-trans))
|
||||
(vector+! (the-as vector (-> event param 0)) (-> self root-override trans) (-> self extra-trans))
|
||||
)
|
||||
((= v1-0 'notify)
|
||||
(let ((v0-1 (the-as structure #t)))
|
||||
@@ -261,8 +261,8 @@
|
||||
;; failed to figure out what this is:
|
||||
(defstate pickup (flutflut)
|
||||
:virtual #t
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('draw)
|
||||
(ja-channel-set! 1)
|
||||
(ja :group! (-> self draw art-group data 3))
|
||||
@@ -271,7 +271,7 @@
|
||||
(transform-post)
|
||||
)
|
||||
(('trans)
|
||||
(vector+! (the-as vector (-> arg3 param 0)) (-> self root-override trans) (-> self extra-trans))
|
||||
(vector+! (the-as vector (-> event param 0)) (-> self root-override trans) (-> self extra-trans))
|
||||
)
|
||||
(('touch 'attack)
|
||||
#f
|
||||
@@ -312,14 +312,14 @@
|
||||
;; failed to figure out what this is:
|
||||
(defstate wait-for-return (flutflut)
|
||||
:virtual #t
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(if (and (or (= arg2 'touch) (= arg2 'attack)) (send-event *target* 'end-mode))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(if (and (or (= event-type 'touch) (= event-type 'attack)) (send-event *target* 'end-mode))
|
||||
(go-virtual pickup (method-of-object self idle))
|
||||
)
|
||||
(the-as
|
||||
object
|
||||
(if (= arg2 'trans)
|
||||
(vector+! (the-as vector (-> arg3 param 0)) (-> self root-override trans) (-> self extra-trans))
|
||||
(if (= event-type 'trans)
|
||||
(vector+! (the-as vector (-> event param 0)) (-> self root-override trans) (-> self extra-trans))
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
+48
-48
@@ -331,7 +331,7 @@
|
||||
(('shove)
|
||||
(when (!= (-> self next-state name) 'target-hit)
|
||||
(mem-copy! (the-as pointer (-> self attack-info-rec)) (the-as pointer (-> arg3 param 1)) 104)
|
||||
(when (zero? (logand (-> self attack-info-rec mask) (attack-mask attacker)))
|
||||
(when (not (logtest? (-> self attack-info-rec mask) (attack-mask attacker)))
|
||||
(set! (-> self attack-info-rec attacker) (process->handle arg0))
|
||||
(logior! (-> self attack-info-rec mask) (attack-mask attacker))
|
||||
)
|
||||
@@ -567,7 +567,7 @@
|
||||
(if (can-hands? #t)
|
||||
(go target-flut-running-attack)
|
||||
)
|
||||
(if (and (zero? (logand (-> self control status) (cshape-moving-flags onsurf)))
|
||||
(if (and (not (logtest? (-> self control status) (cshape-moving-flags onsurf)))
|
||||
(and (>= (- (-> *display* base-frame-counter) (-> self control unknown-dword11)) (-> *FLUT-bank* ground-timeout))
|
||||
(>= 0.0 (vector-dot (-> self control dynam gravity-normal) (-> self control transv)))
|
||||
(let ((v1-37 (ja-group)))
|
||||
@@ -663,7 +663,7 @@
|
||||
(if (can-hands? #t)
|
||||
(go target-flut-running-attack)
|
||||
)
|
||||
(if (and (zero? (logand (-> self control status) (cshape-moving-flags onsurf)))
|
||||
(if (and (not (logtest? (-> self control status) (cshape-moving-flags onsurf)))
|
||||
(and (>= (- (-> *display* base-frame-counter) (-> self control unknown-dword11)) (-> *FLUT-bank* ground-timeout))
|
||||
(>= 0.0 (vector-dot (-> self control dynam gravity-normal) (-> self control transv)))
|
||||
(let ((v1-37 (ja-group)))
|
||||
@@ -792,10 +792,10 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate target-flut-jump (target)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(when (and (= arg2 'touched)
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(when (and (= event-type 'touched)
|
||||
((method-of-type touching-shapes-entry prims-touching?)
|
||||
(the-as touching-shapes-entry (-> arg3 param 0))
|
||||
(the-as touching-shapes-entry (-> event param 0))
|
||||
(-> self control)
|
||||
(the-as uint 6)
|
||||
)
|
||||
@@ -806,22 +806,22 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(send-event arg0 'bonk (-> arg3 param 0) (-> self control ground-impact-vel))
|
||||
(send-event proc 'bonk (-> event param 0) (-> self control ground-impact-vel))
|
||||
(when (target-send-attack
|
||||
arg0
|
||||
proc
|
||||
(the-as uint 'flut-bonk)
|
||||
(the-as touching-shapes-entry (-> arg3 param 0))
|
||||
(the-as touching-shapes-entry (-> event param 0))
|
||||
(-> self control unknown-dword50)
|
||||
(-> self control unknown-dword51)
|
||||
)
|
||||
)
|
||||
)
|
||||
(case arg2
|
||||
(case event-type
|
||||
(('jump)
|
||||
(go target-flut-jump (the-as float (-> arg3 param 0)) (the-as float (-> arg3 param 0)))
|
||||
(go target-flut-jump (the-as float (-> event param 0)) (the-as float (-> event param 0)))
|
||||
)
|
||||
(else
|
||||
(target-flut-standard-event-handler arg0 arg1 arg2 arg3)
|
||||
(target-flut-standard-event-handler proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -856,8 +856,8 @@
|
||||
)
|
||||
(if (and (cpad-pressed? (-> self control unknown-cpad-info00 number) x)
|
||||
(< (vector-dot (-> self control dynam gravity-normal) (-> self control transv)) 40960.0)
|
||||
(and (zero? (logand (-> self water flags) (water-flags wt09)))
|
||||
(zero? (logand (-> self state-flags) (state-flags prevent-jump)))
|
||||
(and (not (logtest? (-> self water flags) (water-flags wt09)))
|
||||
(not (logtest? (-> self state-flags) (state-flags prevent-jump)))
|
||||
(< 4096.0 (target-height-above-ground))
|
||||
)
|
||||
)
|
||||
@@ -869,7 +869,7 @@
|
||||
(>= (- (-> *display* base-frame-counter) (-> self control unknown-dword36))
|
||||
(the-as time-frame (-> *TARGET-bank* stuck-timeout))
|
||||
)
|
||||
(zero? (logand (-> self state-flags) (state-flags prevent-attack)))
|
||||
(not (logtest? (-> self state-flags) (state-flags prevent-attack)))
|
||||
(zero? (logand (-> self control unknown-surface01 flags) (surface-flags prevent-attacks-during-launch-jump surf08))
|
||||
)
|
||||
)
|
||||
@@ -984,9 +984,9 @@
|
||||
)
|
||||
(pad-buttons square)
|
||||
)
|
||||
(and (zero? (logand (-> self state-flags) (state-flags prevent-attack)))
|
||||
(zero? (logand (-> self control unknown-surface01 flags) (surface-flags prevent-attacks-during-launch-jump surf08))
|
||||
)
|
||||
(and (not (logtest? (-> self state-flags) (state-flags prevent-attack)))
|
||||
(not (logtest? (-> self control unknown-surface01 flags) (surface-flags prevent-attacks-during-launch-jump surf08))
|
||||
)
|
||||
(>= (- (-> *display* base-frame-counter) (-> self control unknown-dword36))
|
||||
(the-as time-frame (-> *TARGET-bank* stuck-timeout))
|
||||
)
|
||||
@@ -1103,7 +1103,7 @@
|
||||
(if (move-legs?)
|
||||
(go target-flut-walk)
|
||||
)
|
||||
(if (and (zero? (logand (-> self control status) (cshape-moving-flags onsurf)))
|
||||
(if (and (not (logtest? (-> self control status) (cshape-moving-flags onsurf)))
|
||||
(and (>= (- (-> *display* base-frame-counter) (-> self control unknown-dword11)) (-> *FLUT-bank* ground-timeout))
|
||||
(>= 0.0 (vector-dot (-> self control dynam gravity-normal) (-> self control transv)))
|
||||
(let ((v1-34 (ja-group)))
|
||||
@@ -1191,19 +1191,19 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate target-flut-running-attack (target)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('touched)
|
||||
(cond
|
||||
(((method-of-type touching-shapes-entry prims-touching?)
|
||||
(the-as touching-shapes-entry (-> arg3 param 0))
|
||||
(the-as touching-shapes-entry (-> event param 0))
|
||||
(-> self control)
|
||||
(the-as uint 224)
|
||||
)
|
||||
(let ((gp-1 (target-send-attack
|
||||
arg0
|
||||
proc
|
||||
(the-as uint (-> self control unknown-symbol30))
|
||||
(the-as touching-shapes-entry (-> arg3 param 0))
|
||||
(the-as touching-shapes-entry (-> event param 0))
|
||||
(-> self control unknown-dword50)
|
||||
(-> self control unknown-dword51)
|
||||
)
|
||||
@@ -1211,8 +1211,8 @@
|
||||
)
|
||||
(when gp-1
|
||||
(set! (-> self control unknown-uint20) (the-as uint (-> *display* base-frame-counter)))
|
||||
(let ((v1-9 (if (and (nonzero? arg0) (type-type? (-> arg0 type) process-drawable))
|
||||
arg0
|
||||
(let ((v1-9 (if (and (nonzero? proc) (type-type? (-> proc type) process-drawable))
|
||||
proc
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1243,12 +1243,12 @@
|
||||
)
|
||||
)
|
||||
(else
|
||||
(target-flut-dangerous-event-handler arg0 arg1 arg2 arg3)
|
||||
(target-flut-dangerous-event-handler proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(target-flut-dangerous-event-handler arg0 arg1 arg2 arg3)
|
||||
(target-flut-dangerous-event-handler proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1370,7 +1370,7 @@
|
||||
(when (not (ja-min? 0))
|
||||
(cond
|
||||
((and (>= (ja-aframe-num 0) 20.0)
|
||||
(and (and (zero? (logand (-> self control status) (cshape-moving-flags onsurf)))
|
||||
(and (and (not (logtest? (-> self control status) (cshape-moving-flags onsurf)))
|
||||
(>= (- (-> *display* base-frame-counter) (-> self control unknown-dword11)) (-> *FLUT-bank* ground-timeout))
|
||||
(>= 0.0 (vector-dot (-> self control dynam gravity-normal) (-> self control transv)))
|
||||
(let ((v1-39 (ja-group)))
|
||||
@@ -1423,7 +1423,7 @@
|
||||
(set! f30-0 (* f30-0 (the-as float (fmin 1.0 (the-as float (-> self control unknown-float140))))))
|
||||
)
|
||||
)
|
||||
(if (and (zero? (logand (-> self control status) (cshape-moving-flags onsurf)))
|
||||
(if (and (not (logtest? (-> self control status) (cshape-moving-flags onsurf)))
|
||||
(>= (- (-> *display* base-frame-counter) (-> self control unknown-dword11)) (-> *FLUT-bank* ground-timeout))
|
||||
(>= 0.0 (vector-dot (-> self control dynam gravity-normal) (-> self control transv)))
|
||||
(let ((v1-105 (ja-group)))
|
||||
@@ -1460,10 +1460,10 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate target-flut-air-attack (target)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(if (and (= arg2 'touched)
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(if (and (= event-type 'touched)
|
||||
((method-of-type touching-shapes-entry prims-touching?)
|
||||
(the-as touching-shapes-entry (-> arg3 param 0))
|
||||
(the-as touching-shapes-entry (-> event param 0))
|
||||
(-> self control)
|
||||
(the-as uint 6)
|
||||
)
|
||||
@@ -1474,14 +1474,14 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(send-event arg0 'bonk (-> arg3 param 0) (-> self control ground-impact-vel))
|
||||
(send-event proc 'bonk (-> event param 0) (-> self control ground-impact-vel))
|
||||
)
|
||||
(case arg2
|
||||
(case event-type
|
||||
(('jump)
|
||||
(go target-flut-jump (the-as float (-> arg3 param 0)) (the-as float (-> arg3 param 0)))
|
||||
(go target-flut-jump (the-as float (-> event param 0)) (the-as float (-> event param 0)))
|
||||
)
|
||||
(else
|
||||
(target-flut-dangerous-event-handler arg0 arg1 arg2 arg3)
|
||||
(target-flut-dangerous-event-handler proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1702,7 +1702,7 @@
|
||||
)
|
||||
)
|
||||
(combine! gp-0 arg1)
|
||||
(when (zero? (logand (-> gp-0 mask) (attack-mask vector)))
|
||||
(when (not (logtest? (-> gp-0 mask) (attack-mask vector)))
|
||||
(vector-z-quaternion! (-> gp-0 vector) (-> self control unknown-quaternion00))
|
||||
(vector-xz-normalize! (-> gp-0 vector) (- (fabs (-> gp-0 shove-back))))
|
||||
(set! (-> gp-0 vector y) (-> gp-0 shove-up))
|
||||
@@ -1901,7 +1901,7 @@
|
||||
(until (ja-done? 0)
|
||||
(compute-alignment! (-> self align))
|
||||
(let ((gp-5 (new 'stack-no-clear 'vector)))
|
||||
(when (zero? (logand (-> self align flags) (align-flags disabled)))
|
||||
(when (not (logtest? (-> self align flags) (align-flags disabled)))
|
||||
(vector-matrix*! gp-5 (the-as vector (-> self align delta)) (-> self control unknown-matrix01))
|
||||
(vector-float*! (-> self control transv) gp-5 (-> *display* frames-per-second))
|
||||
)
|
||||
@@ -2022,7 +2022,7 @@
|
||||
:code (behavior ((arg0 handle))
|
||||
(set-forward-vel (the-as float 0.0))
|
||||
(let ((s5-0 0))
|
||||
(while (zero? (logand (-> self control status) (cshape-moving-flags onsurf)))
|
||||
(while (not (logtest? (-> self control status) (cshape-moving-flags onsurf)))
|
||||
(target-flut-falling-anim-trans)
|
||||
(+! s5-0 (- (-> *display* base-frame-counter) (-> *display* old-base-frame-counter)))
|
||||
(suspend)
|
||||
@@ -2161,21 +2161,21 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate target-flut-grab (target)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(cond
|
||||
((and (= arg2 'query) (= (-> arg3 param 0) 'mode))
|
||||
((and (= event-type 'query) (= (-> event param 0) 'mode))
|
||||
(-> self state name)
|
||||
)
|
||||
(else
|
||||
(case arg2
|
||||
(case event-type
|
||||
(('end-mode)
|
||||
(go target-flut-stance)
|
||||
)
|
||||
(('clone-anim)
|
||||
(go target-flut-clone-anim (process->handle (the-as process (-> arg3 param 0))))
|
||||
(go target-flut-clone-anim (process->handle (the-as process (-> event param 0))))
|
||||
)
|
||||
(else
|
||||
(target-generic-event-handler arg0 arg1 arg2 arg3)
|
||||
(target-generic-event-handler proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -2203,11 +2203,11 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate target-flut-clone-anim (target)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(if (and (= arg2 'trans) (= (-> arg3 param 0) 'restore))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(if (and (= event-type 'trans) (= (-> event param 0) 'restore))
|
||||
(set! (-> self control unknown-uint20) (the-as uint #f))
|
||||
)
|
||||
((-> target-flut-grab event) arg0 arg1 arg2 arg3)
|
||||
((-> target-flut-grab event) proc arg1 event-type event)
|
||||
)
|
||||
:enter (-> target-clone-anim enter)
|
||||
:exit (behavior ()
|
||||
|
||||
+7
-7
@@ -40,10 +40,10 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate bouncer-wait (springbox)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('bonk)
|
||||
(when (send-event arg0 'jump (-> self spring-height) (-> self spring-height) #f)
|
||||
(when (send-event proc 'jump (-> self spring-height) (-> self spring-height) #f)
|
||||
(sound-play "trampoline")
|
||||
(go bouncer-fire)
|
||||
)
|
||||
@@ -54,7 +54,7 @@
|
||||
)
|
||||
)
|
||||
(('attack)
|
||||
(when (and (= (-> arg3 param 1) 'flop) (send-event arg0 'jump (-> self spring-height) (-> self spring-height) #f))
|
||||
(when (and (= (-> event param 1) 'flop) (send-event proc 'jump (-> self spring-height) (-> self spring-height) #f))
|
||||
(go bouncer-fire)
|
||||
#f
|
||||
)
|
||||
@@ -74,14 +74,14 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate bouncer-smush (springbox)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('touch)
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
#f
|
||||
)
|
||||
(else
|
||||
((-> bouncer-wait event) arg0 arg1 arg2 arg3)
|
||||
((-> bouncer-wait event) proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
+1
-1
@@ -42,7 +42,7 @@
|
||||
|
||||
;; definition for method 12 of type darkvine
|
||||
(defmethod run-logic? darkvine ((obj darkvine))
|
||||
(or (zero? (logand (-> obj mask) (process-mask actor-pause)))
|
||||
(or (not (logtest? (-> obj mask) (process-mask actor-pause)))
|
||||
(or (and (nonzero? (-> obj draw))
|
||||
(logtest? (-> obj draw status) (draw-status was-drawn))
|
||||
(>= (+ (-> *ACTOR-bank* pause-dist) (-> obj root-override pause-adjust-distance))
|
||||
|
||||
+12
-12
@@ -1625,18 +1625,18 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate fisher-playing (fisher)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(local-vars (v0-2 object))
|
||||
(case arg2
|
||||
(case event-type
|
||||
(('fisher-fish-die)
|
||||
(sound-play "fish-miss")
|
||||
(set! v0-2 (+ (-> self missed) (-> arg3 param 0)))
|
||||
(set! v0-2 (+ (-> self missed) (-> event 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! v0-2 (+ (-> self caught) (-> event param 0)))
|
||||
(set! (-> self caught) (the-as int v0-2))
|
||||
v0-2
|
||||
)
|
||||
@@ -1822,9 +1822,9 @@
|
||||
;; failed to figure out what this is:
|
||||
(defstate play-accept (fisher)
|
||||
:virtual #t
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(local-vars (v0-0 rgbaf))
|
||||
(let ((v1-0 arg2))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (cond
|
||||
((= v1-0 'emissive-on)
|
||||
(set-vector! (-> self draw color-mult) 0.6 0.6 0.6 1.0)
|
||||
@@ -2124,18 +2124,18 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate target-fishing (target)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(cond
|
||||
((= arg2 'bounce)
|
||||
((= event-type 'bounce)
|
||||
(set-zero! (-> self control unknown-smush00))
|
||||
(activate! (-> self control unknown-smush00) 1.0 120 210 0.3 1.0)
|
||||
)
|
||||
((= arg2 'lose)
|
||||
(set! (-> self control unknown-uint20) (the-as uint arg2))
|
||||
arg2
|
||||
((= event-type 'lose)
|
||||
(set! (-> self control unknown-uint20) (the-as uint event-type))
|
||||
event-type
|
||||
)
|
||||
(else
|
||||
((-> target-grab event) arg0 arg1 arg2 arg3)
|
||||
((-> target-grab event) proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
+2
-2
@@ -160,7 +160,7 @@ nav-enemy-default-event-handler
|
||||
nav-enemy-jump-event-handler
|
||||
)
|
||||
:trans (behavior ()
|
||||
(if (zero? (logand (-> self nav-enemy-flags) (nav-enemy-flags enable-rotate)))
|
||||
(if (not (logtest? (-> self nav-enemy-flags) (nav-enemy-flags enable-rotate)))
|
||||
((-> (method-of-type nav-enemy nav-enemy-patrol) trans))
|
||||
)
|
||||
(none)
|
||||
@@ -233,7 +233,7 @@ nav-enemy-default-event-handler
|
||||
nav-enemy-jump-event-handler
|
||||
)
|
||||
:trans (behavior ()
|
||||
(if (zero? (logand (-> self nav-enemy-flags) (nav-enemy-flags enable-rotate)))
|
||||
(if (not (logtest? (-> self nav-enemy-flags) (nav-enemy-flags enable-rotate)))
|
||||
((-> (method-of-type nav-enemy nav-enemy-chase) trans))
|
||||
)
|
||||
(none)
|
||||
|
||||
+9
-9
@@ -727,7 +727,7 @@
|
||||
(none)
|
||||
)
|
||||
:trans (behavior ()
|
||||
(if (zero? (logand (-> *camera* master-options) 2))
|
||||
(if (not (logtest? (-> *camera* master-options) 2))
|
||||
(cam-slave-go cam-free-floating)
|
||||
)
|
||||
(none)
|
||||
@@ -1286,8 +1286,8 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate periscope-idle (periscope)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('activate)
|
||||
(logclear! (-> self mask) (process-mask actor-pause))
|
||||
(go periscope-activate)
|
||||
@@ -1392,8 +1392,8 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate periscope-wait-for-player (periscope)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('touch)
|
||||
(when (and *target* (not (and (logtest? (-> *target* control unknown-surface00 flags) (surface-flags jump))
|
||||
(zero? (logand (-> *target* control status) (cshape-moving-flags onsurf)))
|
||||
@@ -1401,7 +1401,7 @@
|
||||
)
|
||||
)
|
||||
(when ((method-of-type touching-shapes-entry prims-touching?)
|
||||
(the-as touching-shapes-entry (-> arg3 param 0))
|
||||
(the-as touching-shapes-entry (-> event param 0))
|
||||
(the-as collide-shape-moving (-> self root-override))
|
||||
(the-as uint 1)
|
||||
)
|
||||
@@ -1882,7 +1882,7 @@
|
||||
(defstate reflector-origin-idle (reflector-origin)
|
||||
:code (behavior ()
|
||||
(reflector-origin-update (-> self blocker))
|
||||
(while (zero? (logand (-> self blocker extra perm status) (entity-perm-status complete)))
|
||||
(while (not (logtest? (-> self blocker extra perm status) (entity-perm-status complete)))
|
||||
(suspend)
|
||||
)
|
||||
(let ((a1-0 (new 'stack-no-clear 'event-message-block)))
|
||||
@@ -1946,8 +1946,8 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate reflector-mirror-idle (reflector-mirror)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('attack)
|
||||
(sound-play "mirror-smash")
|
||||
(go reflector-mirror-broken #f)
|
||||
|
||||
+16
-16
@@ -58,9 +58,9 @@
|
||||
;; failed to figure out what this is:
|
||||
(defstate idle (logtrap)
|
||||
:virtual #t
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(if (or (= arg2 'touch) (= arg2 'attack))
|
||||
(send-event arg0 'attack (-> arg3 param 0) (new 'static 'attack-info))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(if (or (= event-type 'touch) (= event-type 'attack))
|
||||
(send-event proc 'attack (-> event param 0) (new 'static 'attack-info))
|
||||
)
|
||||
)
|
||||
:code (behavior ()
|
||||
@@ -210,8 +210,8 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate lurkerm-tall-sail-idle (lurkerm-tall-sail)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (when (= v1-0 'stop)
|
||||
(process-entity-status! self (entity-perm-status complete) #t)
|
||||
(set! (-> self speed) 0.0)
|
||||
@@ -316,8 +316,8 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate lurkerm-short-sail-idle (lurkerm-short-sail)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (when (= v1-0 'stop)
|
||||
(process-entity-status! self (entity-perm-status complete) #t)
|
||||
(set! (-> self speed) 0.0)
|
||||
@@ -445,8 +445,8 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate lurkerm-piston-idle (lurkerm-piston)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (when (= v1-0 'stop)
|
||||
(process-entity-status! self (entity-perm-status complete) #t)
|
||||
(set! (-> self speed) 0.0)
|
||||
@@ -572,8 +572,8 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate accordian-idle (accordian)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (when (= v1-0 'stop)
|
||||
(process-entity-status! self (entity-perm-status complete) #t)
|
||||
(set! (-> self speed) 0.0)
|
||||
@@ -750,8 +750,8 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate precurbridge-idle (precurbridge)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('go)
|
||||
(go precurbridge-activate)
|
||||
)
|
||||
@@ -837,12 +837,12 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate precurbridge-active (precurbridge)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as
|
||||
object
|
||||
(when (= v1-0 'bonk)
|
||||
(let* ((gp-0 (the-as object (-> arg3 param 0)))
|
||||
(let* ((gp-0 (the-as object (-> event param 0)))
|
||||
(a0-2 (-> (the-as touching-shapes-entry gp-0) head))
|
||||
(s5-0 (-> self root-override))
|
||||
)
|
||||
|
||||
+4
-4
@@ -198,12 +198,12 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate eggtop-idle (eggtop)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (when (= v1-0 'notify)
|
||||
(case (-> arg3 param 0)
|
||||
(case (-> event param 0)
|
||||
(('pickup)
|
||||
(if (type-type? (-> arg0 type) fuel-cell)
|
||||
(if (type-type? (-> proc type) fuel-cell)
|
||||
(save-reminder (get-task-control (-> self entity extra perm task)) 1 0)
|
||||
)
|
||||
)
|
||||
|
||||
+52
-52
@@ -289,13 +289,13 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate plant-boss-arm-idle (plant-boss-arm)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('hide 'die)
|
||||
(go plant-boss-arm-die (the-as symbol (-> arg3 param 0)))
|
||||
(go plant-boss-arm-die (the-as symbol (-> event param 0)))
|
||||
)
|
||||
(('hit)
|
||||
(go plant-boss-arm-hit (the-as basic (-> arg3 param 0)))
|
||||
(go plant-boss-arm-hit (the-as basic (-> event param 0)))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -407,16 +407,16 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate plant-boss-back-arms-idle (plant-boss-arm)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(if (or (= arg2 'touch) (= arg2 'attack))
|
||||
(send-event arg0 'attack (-> arg3 param 0) (new 'static 'attack-info))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(if (or (= event-type 'touch) (= event-type 'attack))
|
||||
(send-event proc 'attack (-> event param 0) (new 'static 'attack-info))
|
||||
)
|
||||
(cond
|
||||
((= arg2 'hit)
|
||||
(go plant-boss-back-arms-hit (the-as symbol (-> arg3 param 0)))
|
||||
((= event-type 'hit)
|
||||
(go plant-boss-back-arms-hit (the-as symbol (-> event param 0)))
|
||||
)
|
||||
((= arg2 'die)
|
||||
(go plant-boss-back-arms-die (the-as symbol (-> arg3 param 0)))
|
||||
((= event-type 'die)
|
||||
(go plant-boss-back-arms-die (the-as symbol (-> event param 0)))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -502,13 +502,13 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate plant-boss-vine-idle (plant-boss-arm)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('hide 'die)
|
||||
(go plant-boss-vine-die (the-as symbol (-> arg3 param 0)))
|
||||
(go plant-boss-vine-die (the-as symbol (-> event param 0)))
|
||||
)
|
||||
(('hit)
|
||||
(go plant-boss-vine-hit (the-as basic (-> arg3 param 0)))
|
||||
(go plant-boss-vine-hit (the-as basic (-> event param 0)))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -577,10 +577,10 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate plant-boss-root-idle (plant-boss-arm)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('hide 'die)
|
||||
(go plant-boss-root-die (the-as symbol (-> arg3 param 0)))
|
||||
(go plant-boss-root-die (the-as symbol (-> event param 0)))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -742,13 +742,13 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate plant-boss-leaf-idle (plant-boss-leaf)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('trigger)
|
||||
(go plant-boss-leaf-open (the-as symbol (-> arg3 param 0)))
|
||||
(go plant-boss-leaf-open (the-as symbol (-> event param 0)))
|
||||
)
|
||||
(('die)
|
||||
(go plant-boss-leaf-die (the-as basic (-> arg3 param 0)))
|
||||
(go plant-boss-leaf-die (the-as basic (-> event param 0)))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -782,13 +782,13 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate plant-boss-leaf-open (plant-boss-leaf)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('kill)
|
||||
(go plant-boss-leaf-close)
|
||||
)
|
||||
(('die)
|
||||
(go plant-boss-leaf-die (the-as basic (-> arg3 param 0)))
|
||||
(go plant-boss-leaf-die (the-as basic (-> event param 0)))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -840,11 +840,11 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate plant-boss-leaf-open-idle (plant-boss-leaf)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('kill)
|
||||
(set! (-> self state-object) #t)
|
||||
(let ((v0-0 (the-as object (+ (-> *display* base-frame-counter) (the-as time-frame (-> arg3 param 0))))))
|
||||
(let ((v0-0 (the-as object (+ (-> *display* base-frame-counter) (the-as time-frame (-> event param 0))))))
|
||||
(set! (-> self state-time-frame) (the-as time-frame v0-0))
|
||||
v0-0
|
||||
)
|
||||
@@ -855,7 +855,7 @@
|
||||
)
|
||||
)
|
||||
(('die)
|
||||
(go plant-boss-leaf-die (the-as basic (-> arg3 param 0)))
|
||||
(go plant-boss-leaf-die (the-as basic (-> event param 0)))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -889,17 +889,17 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate plant-boss-leaf-bounce (plant-boss-leaf)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('kill)
|
||||
(set! (-> self state-object) #t)
|
||||
(let ((v0-0 (the-as object (+ (-> *display* base-frame-counter) (the-as time-frame (-> arg3 param 0))))))
|
||||
(let ((v0-0 (the-as object (+ (-> *display* base-frame-counter) (the-as time-frame (-> event param 0))))))
|
||||
(set! (-> self state-time-frame) (the-as time-frame v0-0))
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
(('die)
|
||||
(go plant-boss-leaf-die (the-as basic (-> arg3 param 0)))
|
||||
(go plant-boss-leaf-die (the-as basic (-> event param 0)))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -932,10 +932,10 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate plant-boss-leaf-close (plant-boss-leaf)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('die)
|
||||
(go plant-boss-leaf-die (the-as basic (-> arg3 param 0)))
|
||||
(go plant-boss-leaf-die (the-as basic (-> event param 0)))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1325,25 +1325,25 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate plant-boss-vulnerable (plant-boss)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('attack)
|
||||
(when ((method-of-type touching-shapes-entry prims-touching?)
|
||||
(the-as touching-shapes-entry (-> arg3 param 0))
|
||||
(the-as touching-shapes-entry (-> event param 0))
|
||||
(the-as collide-shape-moving (-> self root-override))
|
||||
(the-as uint 1)
|
||||
)
|
||||
(send-event
|
||||
arg0
|
||||
proc
|
||||
'shove
|
||||
(-> arg3 param 0)
|
||||
(-> event param 0)
|
||||
(static-attack-info ((shove-up (meters 2)) (shove-back (meters 6))))
|
||||
)
|
||||
(go plant-boss-hit (the-as symbol (-> arg3 param 1)))
|
||||
(go plant-boss-hit (the-as symbol (-> event param 1)))
|
||||
)
|
||||
)
|
||||
(else
|
||||
(plant-boss-generic-event-handler arg0 arg1 arg2 arg3)
|
||||
(plant-boss-generic-event-handler proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1425,17 +1425,17 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate plant-boss-attack (plant-boss)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('touch 'attack)
|
||||
(when (and ((method-of-type touching-shapes-entry prims-touching?)
|
||||
(the-as touching-shapes-entry (-> arg3 param 0))
|
||||
(the-as touching-shapes-entry (-> event param 0))
|
||||
(the-as collide-shape-moving (-> self root-override))
|
||||
(the-as uint 1)
|
||||
)
|
||||
(not (ja-group? plant-boss-main-vulnerable2idle-ja))
|
||||
)
|
||||
(when (send-event arg0 'attack-or-shove (-> arg3 param 0) (static-attack-info ((mode 'plant-boss))))
|
||||
(when (send-event proc 'attack-or-shove (-> event param 0) (static-attack-info ((mode 'plant-boss))))
|
||||
(let ((v0-1 (the-as object #t)))
|
||||
(set! (-> self ate) (the-as symbol v0-1))
|
||||
v0-1
|
||||
@@ -1444,7 +1444,7 @@
|
||||
)
|
||||
)
|
||||
(else
|
||||
(plant-boss-default-event-handler arg0 arg1 arg2 arg3)
|
||||
(plant-boss-default-event-handler proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1778,20 +1778,20 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate plant-boss-dead-idle (plant-boss)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('bonk)
|
||||
(go plant-boss-dead-bounce (lerp-scale
|
||||
(the-as float 0.1)
|
||||
(the-as float 1.0)
|
||||
(the-as float (-> arg3 param 1))
|
||||
(the-as float (-> event param 1))
|
||||
(the-as float 40960.0)
|
||||
(the-as float 81920.0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(plant-boss-generic-event-handler arg0 arg1 arg2 arg3)
|
||||
(plant-boss-generic-event-handler proc arg1 event-type event)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
+3
-3
@@ -50,14 +50,14 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate plat-flip-idle (plat-flip)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (cond
|
||||
((= v1-0 'bonk)
|
||||
(activate! (-> self smush) -1.0 90 300 1.0 1.0)
|
||||
)
|
||||
((= v1-0 'touch)
|
||||
(send-event arg0 'no-look-around (seconds 1.5))
|
||||
(send-event proc 'no-look-around (seconds 1.5))
|
||||
(the-as smush-control #f)
|
||||
)
|
||||
)
|
||||
|
||||
+13
-13
@@ -710,8 +710,8 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate energybase-idle (energybase)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('stop)
|
||||
(go energybase-stopping)
|
||||
)
|
||||
@@ -861,10 +861,10 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate energyball-idle (energyball)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (when (= v1-0 'attack)
|
||||
(when (and (>= arg1 2) (= (-> arg3 param 1) 'eco-yellow))
|
||||
(when (and (>= arg1 2) (= (-> event param 1) 'eco-yellow))
|
||||
(increment-success-for-hint (game-text-id lavatube-balls))
|
||||
(sound-play "dcrate-break")
|
||||
(process-spawn
|
||||
@@ -1034,8 +1034,8 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate energyarm-no-ball (energyarm)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('stop)
|
||||
(go energyarm-stop)
|
||||
)
|
||||
@@ -1118,8 +1118,8 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate energyarm-idle (energyarm)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('stop)
|
||||
(go energyarm-stop)
|
||||
)
|
||||
@@ -1350,8 +1350,8 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate energyhub-stop (energyhub)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (if (= v1-0 'flash)
|
||||
(set! (-> self palette-val) 1.9921875)
|
||||
)
|
||||
@@ -1432,8 +1432,8 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate energyhub-idle (energyhub)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (if (= v1-0 'flash)
|
||||
(set! (-> self palette-val) 1.9921875)
|
||||
)
|
||||
|
||||
+16
-16
@@ -622,26 +622,26 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate darkecobarrel-mover-move (darkecobarrel-mover)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('touch 'attack)
|
||||
(cond
|
||||
((= arg0 *target*)
|
||||
(let ((s5-0 (-> arg3 param 0)))
|
||||
((= proc *target*)
|
||||
(let ((s5-0 (-> event param 0)))
|
||||
(if (and s5-0
|
||||
((method-of-type touching-shapes-entry prims-touching?)
|
||||
(the-as touching-shapes-entry s5-0)
|
||||
(-> self root-override)
|
||||
(the-as uint 1)
|
||||
)
|
||||
(send-event arg0 'attack-invinc s5-0 (static-attack-info ((mode 'death))))
|
||||
(send-event proc 'attack-invinc s5-0 (static-attack-info ((mode 'death))))
|
||||
)
|
||||
(go darkecobarrel-mover-die)
|
||||
)
|
||||
)
|
||||
)
|
||||
((>= arg1 2)
|
||||
(case (-> arg3 param 1)
|
||||
(case (-> event param 1)
|
||||
(('eco-yellow)
|
||||
(+! (-> self hits) 1)
|
||||
(cond
|
||||
@@ -649,8 +649,8 @@
|
||||
(go darkecobarrel-mover-die)
|
||||
)
|
||||
(else
|
||||
(let ((v1-17 (if (and (nonzero? arg0) (type-type? (-> arg0 type) process-drawable))
|
||||
arg0
|
||||
(let ((v1-17 (if (and (nonzero? proc) (type-type? (-> proc type) process-drawable))
|
||||
proc
|
||||
)
|
||||
)
|
||||
(gp-1 (new 'stack-no-clear 'vector))
|
||||
@@ -1194,10 +1194,10 @@
|
||||
;; failed to figure out what this is:
|
||||
(defstate idle (chainmine)
|
||||
:virtual #t
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('attack 'touch)
|
||||
(send-event arg0 'attack (-> arg3 param 0) (static-attack-info ((mode 'deadly))))
|
||||
(send-event proc 'attack (-> event param 0) (static-attack-info ((mode 'deadly))))
|
||||
(go-virtual die)
|
||||
)
|
||||
)
|
||||
@@ -1380,16 +1380,16 @@
|
||||
;; failed to figure out what this is:
|
||||
(defstate idle (lavaballoon)
|
||||
:virtual #t
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('attack)
|
||||
(send-event arg0 'heat -10.0)
|
||||
(send-event proc 'heat -10.0)
|
||||
(go-virtual die)
|
||||
)
|
||||
)
|
||||
)
|
||||
:trans (behavior ()
|
||||
(when (zero? (logand (-> self path flags) (path-control-flag not-found)))
|
||||
(when (not (logtest? (-> self path flags) (path-control-flag not-found)))
|
||||
(let ((f0-4 (* 0.5 (+ 1.0 (sin (* (-> self move-per-tick) (the float (-> *display* base-frame-counter))))))))
|
||||
(eval-path-curve! (-> self path) (-> self root-override trans) f0-4 'interp)
|
||||
)
|
||||
@@ -1430,7 +1430,7 @@
|
||||
(set! (-> obj root-override pause-adjust-distance) 122880.0)
|
||||
(set! (-> obj path) (new 'process 'path-control obj 'path 0.0))
|
||||
(logior! (-> obj path flags) (path-control-flag display draw-line draw-point draw-text))
|
||||
(when (zero? (logand (-> obj path flags) (path-control-flag not-found)))
|
||||
(when (not (logtest? (-> obj path flags) (path-control-flag not-found)))
|
||||
(let ((f30-0 (res-lump-float (-> obj entity) 'speed :default 12288.0)))
|
||||
(set! (-> obj move-per-tick) (* 32768.0 (/ 1.0 (* 300.0 (path-distance (-> obj path)))) f30-0))
|
||||
)
|
||||
|
||||
+3
-3
@@ -444,10 +444,10 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate dark-crystal-idle (dark-crystal)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('touch 'attack)
|
||||
(if (= (-> arg0 type) target)
|
||||
(if (= (-> proc type) target)
|
||||
(level-hint-spawn
|
||||
(game-text-id cave-dark-crystals-flee)
|
||||
"sksp0334"
|
||||
|
||||
+2
-2
@@ -538,10 +538,10 @@
|
||||
)
|
||||
(when (and (-> obj hit-player?)
|
||||
(or (not *target*)
|
||||
(and (zero? (logand (-> *target* state-flags)
|
||||
(and (not (logtest? (-> *target* state-flags)
|
||||
(state-flags being-attacked invulnerable timed-invulnerable invuln-powerup do-not-notice dying)
|
||||
)
|
||||
)
|
||||
)
|
||||
(>= (- (-> *display* base-frame-counter) (-> obj hit-player-time)) (seconds 0.05))
|
||||
)
|
||||
)
|
||||
|
||||
+28
-28
@@ -816,7 +816,7 @@
|
||||
)
|
||||
(until (= a0-2 v1-1)
|
||||
(let ((a1-2 (ash 1 a0-2)))
|
||||
(if (zero? (logand a1-2 arg1))
|
||||
(if (not (logtest? a1-2 arg1))
|
||||
(return (the-as symbol a1-2))
|
||||
)
|
||||
)
|
||||
@@ -919,14 +919,14 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate gnawer-chewing-on-post (gnawer)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('touch)
|
||||
(if (= (-> arg0 type) target)
|
||||
(if (= (-> proc type) target)
|
||||
(send-event
|
||||
arg0
|
||||
proc
|
||||
'shove
|
||||
(-> arg3 param 0)
|
||||
(-> event param 0)
|
||||
(static-attack-info ((shove-up (meters 1.5)) (shove-back (meters 2.5))))
|
||||
)
|
||||
)
|
||||
@@ -1074,26 +1074,26 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate gnawer-run (gnawer)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(local-vars (v0-0 object))
|
||||
(case arg2
|
||||
(case event-type
|
||||
(('touch)
|
||||
(if (= (-> arg0 type) target)
|
||||
(if (= (-> proc type) target)
|
||||
(send-event
|
||||
arg0
|
||||
proc
|
||||
'shove
|
||||
(-> arg3 param 0)
|
||||
(-> event param 0)
|
||||
(static-attack-info ((shove-up (meters 1.5)) (shove-back (meters 2.5))))
|
||||
)
|
||||
)
|
||||
)
|
||||
(('attack)
|
||||
(cond
|
||||
((= (-> arg0 type) target)
|
||||
((= (-> proc type) target)
|
||||
(send-event
|
||||
arg0
|
||||
proc
|
||||
'attack
|
||||
(-> arg3 param 0)
|
||||
(-> event param 0)
|
||||
(static-attack-info ((shove-up (meters 1.5)) (shove-back (meters 2.5))))
|
||||
)
|
||||
)
|
||||
@@ -1101,7 +1101,7 @@
|
||||
(if (< (- (-> *display* base-frame-counter) (-> self last-hit-time)) (seconds 0.5))
|
||||
(return #f)
|
||||
)
|
||||
(let* ((a2-1 (the-as object (-> arg3 param 0)))
|
||||
(let* ((a2-1 (the-as object (-> event param 0)))
|
||||
(v1-19 (-> (get-touched-prim
|
||||
(-> (the-as touching-shapes-entry a2-1) head)
|
||||
(-> self root-override)
|
||||
@@ -1223,11 +1223,11 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate gnawer-dying-give-pickups (gnawer)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (when (= v1-0 'notify)
|
||||
(if (and (= (-> arg0 type) money) (= (-> arg3 param 0) 'pickup))
|
||||
(dummy-30 self (the-as process-drawable arg0))
|
||||
(if (and (= (-> proc type) money) (= (-> event param 0) 'pickup))
|
||||
(dummy-30 self (the-as process-drawable proc))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1295,19 +1295,19 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate gnawer-give-fuel-cell (gnawer)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (when (= v1-0 'notify)
|
||||
(cond
|
||||
((and (= (-> arg0 type) maincavecam) (= (-> arg3 param 0) 'die))
|
||||
((and (= (-> proc type) maincavecam) (= (-> event param 0) 'die))
|
||||
(process-entity-status! self (entity-perm-status bit-3) #f)
|
||||
(let ((v0-0 (the-as uint (logior (-> self mask) (process-mask actor-pause)))))
|
||||
(set! (-> self mask) (the-as process-mask v0-0))
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
((and (= (-> arg0 type) money) (= (-> arg3 param 0) 'pickup))
|
||||
(dummy-30 self (the-as process-drawable arg0))
|
||||
((and (= (-> proc type) money) (= (-> event param 0) 'pickup))
|
||||
(dummy-30 self (the-as process-drawable proc))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1364,11 +1364,11 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate gnawer-put-items-at-dest (gnawer)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (when (= v1-0 'notify)
|
||||
(if (and (= (-> arg0 type) money) (= (-> arg3 param 0) 'pickup))
|
||||
(dummy-30 self (the-as process-drawable arg0))
|
||||
(if (and (= (-> proc type) money) (= (-> event param 0) 'pickup))
|
||||
(dummy-30 self (the-as process-drawable proc))
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
+27
-27
@@ -161,12 +161,12 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate cavecrusher-idle (cavecrusher)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (when (or (= v1-0 'touch) (= v1-0 'attack))
|
||||
(when (= (-> arg0 type) target)
|
||||
(when (= (-> proc type) target)
|
||||
(if ((method-of-type touching-shapes-entry prims-touching-action?)
|
||||
(the-as touching-shapes-entry (-> arg3 param 0))
|
||||
(the-as touching-shapes-entry (-> event param 0))
|
||||
(-> *target* control)
|
||||
(collide-action solid)
|
||||
(collide-action)
|
||||
@@ -263,12 +263,12 @@
|
||||
;; failed to figure out what this is:
|
||||
(defstate idle (cavetrapdoor)
|
||||
:virtual #t
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('touch)
|
||||
(when (= (-> arg0 type) target)
|
||||
(when (= (-> proc type) target)
|
||||
(when (>= (- (-> (target-pos 0) y) (-> self root-override trans y)) 409.6)
|
||||
(send-event arg0 'no-look-around (seconds 1.5))
|
||||
(send-event proc 'no-look-around (seconds 1.5))
|
||||
(go-virtual trigger)
|
||||
)
|
||||
)
|
||||
@@ -495,12 +495,12 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate caveflamepots-active (caveflamepots)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('touch 'attack)
|
||||
(when (= (-> arg0 type) target)
|
||||
(when (= (-> proc type) target)
|
||||
(when ((method-of-type touching-shapes-entry prims-touching-action?)
|
||||
(the-as touching-shapes-entry (-> arg3 param 0))
|
||||
(the-as touching-shapes-entry (-> event param 0))
|
||||
(-> *target* control)
|
||||
(collide-action solid)
|
||||
(collide-action)
|
||||
@@ -512,15 +512,15 @@
|
||||
(< 0.75 (-> *target* control poly-normal y))
|
||||
)
|
||||
(send-event
|
||||
arg0
|
||||
proc
|
||||
'attack-or-shove
|
||||
(-> arg3 param 0)
|
||||
(-> event param 0)
|
||||
(static-attack-info ((mode 'burn) (vector (-> s4-0 vector)) (shove-up (-> s4-0 shove-up))))
|
||||
)
|
||||
(send-event
|
||||
arg0
|
||||
proc
|
||||
'attack-or-shove
|
||||
(-> arg3 param 0)
|
||||
(-> event param 0)
|
||||
(static-attack-info ((mode 'burn)
|
||||
(shove-up (meters 0))
|
||||
(shove-back (meters 2))
|
||||
@@ -1065,8 +1065,8 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate caveelevator-cycle-active (caveelevator)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (if (= v1-0 'bonk)
|
||||
(activate! (-> self smush) -1.0 60 150 1.0 1.0)
|
||||
)
|
||||
@@ -1108,14 +1108,14 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate caveelevator-one-way-idle-start (caveelevator)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('bonk)
|
||||
(activate! (-> self smush) -1.0 60 150 1.0 1.0)
|
||||
(go caveelevator-one-way-travel-to-end)
|
||||
)
|
||||
(('attack 'touch)
|
||||
(if (and (= (-> arg0 type) target)
|
||||
(if (and (= (-> proc type) target)
|
||||
(>= 8192.0 (vector-vector-xz-distance (target-pos 0) (-> self root-override trans)))
|
||||
)
|
||||
(go caveelevator-one-way-travel-to-end)
|
||||
@@ -1148,8 +1148,8 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate caveelevator-one-way-travel-to-end (caveelevator)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (if (= v1-0 'bonk)
|
||||
(activate! (-> self smush) -1.0 60 150 1.0 1.0)
|
||||
)
|
||||
@@ -1188,8 +1188,8 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate caveelevator-one-way-idle-end (caveelevator)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (if (= v1-0 'bonk)
|
||||
(activate! (-> self smush) -1.0 60 150 1.0 1.0)
|
||||
)
|
||||
@@ -1231,8 +1231,8 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate caveelevator-one-way-travel-to-start (caveelevator)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (if (= v1-0 'bonk)
|
||||
(activate! (-> self smush) -1.0 60 150 1.0 1.0)
|
||||
)
|
||||
|
||||
+6
-6
@@ -242,8 +242,8 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate mother-spider-egg-falling (mother-spider-egg)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('touch 'attack)
|
||||
(go mother-spider-egg-die-while-falling)
|
||||
)
|
||||
@@ -288,14 +288,14 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate mother-spider-egg-on-ground (mother-spider-egg)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(let ((v1-0 arg2))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as object (cond
|
||||
((= v1-0 'touch)
|
||||
(send-shove-back
|
||||
(-> self root-override)
|
||||
arg0
|
||||
(the-as touching-shapes-entry (-> arg3 param 0))
|
||||
proc
|
||||
(the-as touching-shapes-entry (-> event param 0))
|
||||
0.7
|
||||
6144.0
|
||||
16384.0
|
||||
|
||||
+3
-3
@@ -1273,10 +1273,10 @@
|
||||
(if (and (>= (- (-> *display* base-frame-counter) (-> self state-time)) (seconds 0.25))
|
||||
(> (-> self birthing-counter) 0)
|
||||
(and (>= 49152.0 (- (-> self max-dist-from-anchor) (-> self dist-from-anchor)))
|
||||
(zero? (logand (-> *target* state-flags)
|
||||
(not (logtest? (-> *target* state-flags)
|
||||
(state-flags being-attacked invulnerable timed-invulnerable invuln-powerup do-not-notice dying)
|
||||
)
|
||||
)
|
||||
)
|
||||
(TODO-RENAME-21 (-> self nav) (-> self root-override trans))
|
||||
)
|
||||
)
|
||||
@@ -1658,7 +1658,7 @@
|
||||
|
||||
;; definition for method 12 of type mother-spider
|
||||
(defmethod run-logic? mother-spider ((obj mother-spider))
|
||||
(or (zero? (logand (-> obj mask) (process-mask actor-pause)))
|
||||
(or (not (logtest? (-> obj mask) (process-mask actor-pause)))
|
||||
(or (< (vector-vector-xz-distance (-> obj root-override trans) (math-camera-pos)) (-> obj deactivate-xz-dist))
|
||||
(and (nonzero? (-> obj skel)) (!= (-> obj skel root-channel 0) (-> obj skel channel)))
|
||||
(and (nonzero? (-> obj draw)) (logtest? (-> obj draw status) (draw-status no-skeleton-update)))
|
||||
|
||||
+2
-2
@@ -922,8 +922,8 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate balloonlurker-pilot-idle (balloonlurker-pilot)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(case event-type
|
||||
(('attack)
|
||||
(send-event (ppointer->process (-> self parent-override)) 'die)
|
||||
(go balloonlurker-pilot-die)
|
||||
|
||||
+1
-1
@@ -225,7 +225,7 @@ nav-enemy-default-event-handler
|
||||
)
|
||||
:trans (behavior ()
|
||||
((-> (method-of-type nav-enemy nav-enemy-chase) trans))
|
||||
(if (and (zero? (logand (-> self nav-enemy-flags) (nav-enemy-flags navenmf6)))
|
||||
(if (and (not (logtest? (-> self nav-enemy-flags) (nav-enemy-flags navenmf6)))
|
||||
(>= (- (-> *display* base-frame-counter) (-> self bump-player-time)) (seconds 0.5))
|
||||
)
|
||||
(logior! (-> self nav-enemy-flags) (nav-enemy-flags navenmf6))
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user