jak2: focus-test? macro, fix (zero? (logand ...)) -> (not (logtest? ...)) detection (#2321)

There are *a lot* of file changes and while I have carefully gone
through every gsrc change to fix up manual patches, there might still be
spots that I missed.
This commit is contained in:
Hat Kid
2023-03-15 03:57:31 +01:00
committed by GitHub
parent 9a28cc5a79
commit a857061e96
451 changed files with 4094 additions and 5017 deletions
+3 -3
View File
@@ -480,7 +480,7 @@
(cond
((and (= gp-0 (-> self cur-volume))
(= *camera-layout-blink* 'volume)
(zero? (logand (-> *display* real-actual-frame-counter) 8))
(not (logtest? (-> *display* real-actual-frame-counter) 8))
)
)
(else
@@ -3560,12 +3560,12 @@
)
((and (not (logtest? (-> arg0 options) 12))
(logtest? (-> arg0 options) 1)
(zero? (logand (-> *cpad-list* cpads 0 button0-rel 0) (-> arg0 button)))
(not (logtest? (-> *cpad-list* cpads 0 button0-rel 0) (-> arg0 button)))
)
#f
)
((and (not (logtest? (-> arg0 options) 13))
(zero? (logand (-> *cpad-list* cpads 0 button0-abs 0) (-> arg0 button)))
(not (logtest? (-> *cpad-list* cpads 0 button0-abs 0) (-> arg0 button)))
)
#f
)
+6 -6
View File
@@ -73,7 +73,7 @@
(set! (-> self target-height) (-> *CAMERA_MASTER-bank* target-height))
(set! (-> self on-ground)
(not (and (logtest? (-> *target* control unknown-surface00 flags) (surface-flags jump))
(zero? (logand (-> *target* control status) (cshape-moving-flags onsurf)))
(not (logtest? (-> *target* control status) (cshape-moving-flags onsurf)))
)
)
)
@@ -107,7 +107,7 @@
)
(cond
((and (logtest? (-> *target* water flags) (water-flags wt12))
(zero? (logand (-> *target* water flags) (water-flags wt04)))
(not (logtest? (-> *target* water flags) (water-flags wt04)))
)
(set! (-> self under-water) 2)
)
@@ -337,7 +337,7 @@
)
(cond
((and (logtest? (-> *target* water flags) (water-flags wt12))
(zero? (logand (-> *target* water flags) (water-flags wt04)))
(not (logtest? (-> *target* water flags) (water-flags wt04)))
)
(set! (-> self under-water) 2)
)
@@ -409,7 +409,7 @@
)
(set! (-> self on-ground)
(not (and (logtest? (-> *target* control unknown-surface00 flags) (surface-flags jump))
(zero? (logand (-> *target* control status) (cshape-moving-flags onsurf)))
(not (logtest? (-> *target* control status) (cshape-moving-flags onsurf)))
)
)
)
@@ -417,7 +417,7 @@
0.0
(cond
((and (and (logtest? (-> *target* control unknown-surface00 flags) (surface-flags jump))
(zero? (logand (-> *target* control status) (cshape-moving-flags onsurf)))
(not (logtest? (-> *target* control status) (cshape-moving-flags onsurf)))
)
(!= (-> *target* control unknown-surface00 name) 'launch-jump)
)
@@ -797,7 +797,7 @@
)
((and (logtest? (-> self master-options) 4)
(not (-> self on-ground))
(or (not (-> self cam-entity)) (zero? (logand #x20000 (cam-slave-get-flags (-> self cam-entity) 'flags))))
(or (not (-> self cam-entity)) (not (logtest? #x20000 (cam-slave-get-flags (-> self cam-entity) 'flags))))
)
#f
)
+1 -1
View File
@@ -313,7 +313,7 @@
(when (and (!= arg3 1)
(not (cpad-hold? 1 x))
(not (cpad-hold? 1 r1))
(zero? (logand (-> *cpad-list* cpads 1 button0-abs 0) (pad-buttons r2)))
(not (logtest? (-> *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))
(+! f30-14 (analog-input (the-as int (-> *cpad-list* cpads 1 lefty)) 128.0 48.0 110.0 -1.0))
+1 -1
View File
@@ -260,7 +260,7 @@
(none)
)
:trans (behavior ()
(if (or (not (handle->process (-> *camera* pov-handle))) (zero? (logand (-> *camera* master-options) 2)))
(if (or (not (handle->process (-> *camera* pov-handle))) (not (logtest? (-> *camera* master-options) 2)))
(cam-slave-go cam-free-floating)
)
(none)
+3 -3
View File
@@ -349,7 +349,7 @@
(.add.vf vf28 vf28 vf30)
(.max.x.vf vf28 vf28 vf0 :mask #b1000)
(.svf (&-> arg0 quad) vf28)
(zero? (logand v1-7 63))
(not (logtest? v1-7 63))
)
)
@@ -396,7 +396,7 @@
(.max.x.vf vf28 vf28 vf0 :mask #b1000)
(vftoi4.xyzw vf28 vf28)
(.svf (&-> arg0 quad) vf28)
(zero? (logand v1-7 63))
(not (logtest? v1-7 63))
)
)
@@ -442,7 +442,7 @@
(.add.vf vf28 vf28 vf30)
(.max.x.vf vf28 vf28 vf0 :mask #b1000)
(.svf (&-> arg0 quad) vf28)
(zero? (logand v1-7 63))
(not (logtest? v1-7 63))
(.mov v0-0 vf23)
v0-0
)
@@ -26,7 +26,7 @@
;; WARN: Stack slot offset 36 signed mismatch
;; WARN: Stack slot offset 36 signed mismatch
;; WARN: Stack slot offset 48 signed mismatch
;; WARN: Failed store: (s.q! v1-20 a0-7) at op 72
;; ERROR: Failed store: (s.q! v1-20 a0-7) at op 72
(defun poly-find-nearest-edge ((arg0 vector) (arg1 (inline-array vector)) (arg2 vector) (arg3 vector))
(local-vars (sv-32 vector) (sv-36 float) (sv-40 int) (sv-48 float) (sv-80 vector))
(set! sv-32 (new 'stack-no-clear 'vector))
@@ -219,7 +219,7 @@
(< 0.3 (fabs (-> arg0 surface-angle)))
)
)
(zero? (logand sv-32 128))
(not (logtest? sv-32 128))
)
(set! sv-32 (logior sv-32 64))
(set! sv-40 (logior sv-40 128))
@@ -383,7 +383,7 @@
)
(and (< 0.0 (vector-dot (-> arg0 ground-poly-normal) arg2))
(< (- (-> *display* base-frame-counter) (-> arg0 unknown-dword10)) (seconds 0.3))
(zero? (logand sv-104 32))
(not (logtest? sv-104 32))
)
)
)
+2 -2
View File
@@ -407,7 +407,7 @@
(let ((v1-1 (-> obj head)))
(while v1-1
(let ((a0-1 (-> v1-1 prim1 cprim)))
(if (and (logtest? arg1 (-> a0-1 prim-core action)) (zero? (logand arg2 (-> a0-1 prim-core action))))
(if (and (logtest? arg1 (-> a0-1 prim-core action)) (not (logtest? arg2 (-> a0-1 prim-core action))))
(return v1-1)
)
)
@@ -419,7 +419,7 @@
(let ((v1-4 (-> obj head)))
(while v1-4
(let ((a0-5 (-> v1-4 prim2 cprim)))
(if (and (logtest? arg1 (-> a0-5 prim-core action)) (zero? (logand arg2 (-> a0-5 prim-core action))))
(if (and (logtest? arg1 (-> a0-5 prim-core action)) (not (logtest? arg2 (-> a0-5 prim-core action))))
(return v1-4)
)
)
+3 -3
View File
@@ -1310,7 +1310,7 @@
)
)
((= arg0 1)
(return (zero? (logand (-> s5-0 flags) 1)))
(return (not (logtest? (-> s5-0 flags) 1)))
)
((= arg0 4)
(cond
@@ -2000,7 +2000,7 @@
(v1-143 s3-2)
)
"is this node the end of the list. #t = end"
(when (and (not (not (-> v1-143 next))) (zero? (logand (-> s3-2 flags) 1)))
(when (and (not (not (-> v1-143 next))) (not (logtest? (-> s3-2 flags) 1)))
(glst-remove (-> (the-as anim-test-sequence s4-0) item-list) (the-as anim-test-seq-item gp-0))
(glst-insert-after (-> (the-as anim-test-sequence s4-0) item-list) s3-2 (the-as anim-test-seq-item gp-0))
(+! (-> arg1 current-index) 1)
@@ -2462,7 +2462,7 @@
(set! v0-0
((the-as (function glst-list int anim-test-seq-item) glst-get-node-by-index) (-> arg0 item-list) s4-0)
)
(when (or (= v0-0 s5-0) (zero? (logand (-> v0-0 flags) 5)))
(when (or (= v0-0 s5-0) (not (logtest? (-> v0-0 flags) 5)))
(set! (-> arg0 playing-item) s4-0)
(return v0-0)
)
+1 -1
View File
@@ -592,7 +592,7 @@
(if (= arg1 (debug-menu-msg press))
(logxor! (-> v1-0 flags) 1)
)
(zero? (logand (-> v1-0 flags) 1))
(not (logtest? (-> v1-0 flags) 1))
)
(else
#f
+112 -1
View File
@@ -1,5 +1,11 @@
;;-*-Lisp-*-
(in-package goal)
;; definition for function sphere-cull
;; ERROR: Bad vector register dependency: vf16
;; ERROR: Bad vector register dependency: vf17
;; ERROR: Bad vector register dependency: vf18
;; ERROR: Bad vector register dependency: vf19
(defun sphere-cull ((arg0 vector))
(local-vars (v1-0 uint128) (v1-1 uint128) (v1-2 uint128))
(rlet ((acc :class vf)
@@ -25,6 +31,11 @@
)
)
;; definition for function guard-band-cull
;; ERROR: Bad vector register dependency: vf20
;; ERROR: Bad vector register dependency: vf21
;; ERROR: Bad vector register dependency: vf22
;; ERROR: Bad vector register dependency: vf23
(defun guard-band-cull ((arg0 vector))
(local-vars (v1-0 uint128) (v1-1 uint128) (v1-2 uint128))
(rlet ((acc :class vf)
@@ -50,6 +61,7 @@
)
)
;; definition for function sphere-in-view-frustum?
(defun sphere-in-view-frustum? ((arg0 sphere))
(local-vars (v1-1 uint128) (v1-2 uint128) (v1-3 uint128))
(rlet ((acc :class vf)
@@ -81,6 +93,7 @@
)
)
;; definition for function line-in-view-frustum?
(defun line-in-view-frustum? ((arg0 vector) (arg1 vector))
(local-vars (v1-1 uint128) (v1-2 uint128) (v1-3 uint128) (a0-1 uint128) (a0-2 uint128) (a0-3 uint128))
(rlet ((acc :class vf)
@@ -119,6 +132,10 @@
)
)
;; definition for function vis-cull
;; ERROR: Type Propagation failed: Failed type prop at op 3 ((set! v1 (l.b (+ v1 #x38b0)))): Could not get type of load: (set! v1 (l.b (+ v1 #x38b0))).
;; ERROR: Type analysis failed
;; ERROR: Unsupported inline assembly instruction kind - [addiu a0, a0, 56]
(defun vis-cull ((a0-0 int))
(local-vars (v0-0 none) (v1-0 int) (v1-1 int) (v1-2 none) (v1-3 none) (a0-1 none) (a0-2 none) (a1-0 int))
(set! v1-0 #x70000000)
@@ -132,6 +149,8 @@
(ret-value v0-0)
)
;; definition for function error-sphere
;; INFO: Return type mismatch int vs none.
(defun error-sphere ((arg0 drawable-error) (arg1 string))
(when *artist-error-spheres*
(when (vis-cull (-> arg0 id))
@@ -158,60 +177,82 @@
(none)
)
;; definition for method 9 of type drawable
(defmethod login drawable ((obj drawable))
obj
)
;; definition for method 10 of type drawable
;; INFO: Return type mismatch int vs none.
(defmethod draw drawable ((obj drawable) (arg0 drawable) (arg1 display-frame))
0
(none)
)
;; definition for method 11 of type drawable
;; INFO: Return type mismatch int vs none.
(defmethod collide-with-box drawable ((obj drawable) (arg0 int) (arg1 collide-list))
0
(none)
)
;; definition for method 12 of type drawable
;; INFO: Return type mismatch int vs none.
(defmethod collide-y-probe drawable ((obj drawable) (arg0 int) (arg1 collide-list))
0
(none)
)
;; definition for method 13 of type drawable
;; INFO: Return type mismatch int vs none.
(defmethod collide-ray drawable ((obj drawable) (arg0 int) (arg1 collide-list))
0
(none)
)
;; definition for method 17 of type drawable
;; INFO: Return type mismatch int vs none.
(defmethod collect-ambients drawable ((obj drawable) (arg0 sphere) (arg1 int) (arg2 ambient-list))
0
(none)
)
;; definition for method 14 of type drawable
;; INFO: Return type mismatch int vs none.
(defmethod collect-stats drawable ((obj drawable))
0
(none)
)
;; definition for method 15 of type drawable
;; INFO: Return type mismatch int vs none.
(defmethod debug-draw drawable ((obj drawable) (arg0 drawable) (arg1 display-frame))
0
(none)
)
;; definition for method 10 of type drawable-error
;; INFO: Return type mismatch drawable-error vs none.
(defmethod draw drawable-error ((obj drawable-error) (arg0 drawable-error) (arg1 display-frame))
(error-sphere arg0 (-> arg0 name))
(none)
)
;; definition for method 16 of type drawable
(defmethod unpack-vis drawable ((obj drawable) (arg0 (pointer int8)) (arg1 (pointer int8)))
arg1
)
;; definition for symbol *edit-instance*, type string
(define *edit-instance* (the-as string #f))
;; this part is debug only
(when *debug-segment*
;; definition for symbol *instance-mem-usage*, type memory-usage-block
(define *instance-mem-usage* (new 'debug 'memory-usage-block))
)
;; definition (debug) for function find-instance-by-name
(defun-debug find-instance-by-name ((arg0 string))
(dotimes (s5-0 (-> *level* length))
(let ((v1-3 (-> *level* level s5-0)))
@@ -248,6 +289,7 @@
(the-as prototype-bucket #f)
)
;; definition (debug) for function find-instance-by-index
(defun-debug find-instance-by-index ((arg0 type) (arg1 int) (arg2 bsp-header))
(dotimes (v1-0 (-> *level* length))
(let ((a3-3 (-> *level* level v1-0)))
@@ -284,6 +326,7 @@
(the-as prototype-bucket #f)
)
;; definition (debug) for function prototype-bucket-type
(defun-debug prototype-bucket-type ((arg0 prototype-bucket))
(case (-> arg0 geometry 1 type)
((prototype-shrubbery shrubbery)
@@ -295,6 +338,7 @@
)
)
;; definition (debug) for function prototype-bucket-recalc-fields
(defun-debug prototype-bucket-recalc-fields ((arg0 prototype-bucket))
(case (prototype-bucket-type arg0)
((instance-shrubbery)
@@ -311,6 +355,10 @@
arg0
)
;; definition (debug) for function draw-instance-info
;; INFO: Used lq/sq
;; INFO: Return type mismatch object vs none.
;; ERROR: Failed load: (set! a2-12 (l.hu (+ a2-11 68))) at op 283
(defun-debug draw-instance-info ((arg0 string))
(local-vars
(sv-16 uint)
@@ -499,6 +547,9 @@
(none)
)
;; definition for function dma-add-process-drawable
;; INFO: Return type mismatch int vs none.
;; WARN: Function dma-add-process-drawable has a return type of none, but the expression builder found a return statement.
(defun dma-add-process-drawable ((arg0 process-drawable) (arg1 draw-control) (arg2 symbol) (arg3 dma-buffer))
(local-vars (v1-37 float) (sv-16 process-drawable))
(rlet ((acc :class vf)
@@ -773,22 +824,33 @@
)
)
;; definition for symbol *hud-lights*, type vu-lights
(define *hud-lights* (new 'global 'vu-lights))
;; failed to figure out what this is:
(set-vector! (-> *hud-lights* direction 0) 1.0 0.0 0.0 1.0)
;; failed to figure out what this is:
(set-vector! (-> *hud-lights* direction 1) 0.0 1.0 0.0 1.0)
;; failed to figure out what this is:
(set-vector! (-> *hud-lights* direction 2) 0.0 0.0 1.0 1.0)
;; failed to figure out what this is:
(set-vector! (-> *hud-lights* color 0) 0.0 0.0 0.0 1.0)
;; failed to figure out what this is:
(set-vector! (-> *hud-lights* color 1) 0.0 0.0 0.0 1.0)
;; failed to figure out what this is:
(set-vector! (-> *hud-lights* color 2) 0.5 0.5 0.5 1.0)
;; failed to figure out what this is:
(set-vector! (-> *hud-lights* ambient) 0.5 0.5 0.5 1.0)
;; definition for function dma-add-process-drawable-hud
;; INFO: Used lq/sq
;; 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 (not (logtest? (-> arg1 status) (draw-status hidden no-anim no-skeleton-update)))
@@ -811,11 +873,17 @@
(none)
)
;; definition for function add-process-drawable
;; INFO: Return type mismatch symbol vs none.
(defun add-process-drawable ((arg0 process-drawable) (arg1 draw-control) (arg2 symbol) (arg3 dma-buffer))
((-> arg1 dma-add-func) arg0 arg1 arg2 arg3)
(none)
)
;; definition for function foreground-engine-execute
;; INFO: Return type mismatch int vs none.
;; ERROR: Unsupported inline assembly instruction kind - [cache dxwbin v1, 0]
;; ERROR: Unsupported inline assembly instruction kind - [cache dxwbin v1, 1]
(defun foreground-engine-execute ((arg0 engine) (arg1 display-frame) (arg2 int) (arg3 int))
(let ((s4-0 (-> *display* frames (-> *display* on-screen) frame global-buf base)))
(if *debug-segment*
@@ -888,6 +956,7 @@
(none)
)
;; definition (debug) for function main-debug-hook
(defun-debug main-debug-hook ()
(when (not (or (= *master-mode* 'menu) (= *master-mode* 'progress)))
(execute-connections *debug-engine* #f)
@@ -896,12 +965,18 @@
(none)
)
;; definition for symbol *debug-hook*, type (function none)
(define *debug-hook* main-debug-hook)
;; definition for symbol *add-sphere*, type symbol
(define *add-sphere* #f)
;; definition for symbol *generic-effect-mode*, type int
(define *generic-effect-mode* 0)
;; definition for function real-main-draw-hook
;; INFO: Return type mismatch int vs none.
;; ERROR: Failed store: (s.d! (+ (the-as (pointer gs-reg) a0-47) 8) a1-28) at op 332
(defun real-main-draw-hook ()
(local-vars (a0-74 int) (a0-76 int))
(when *slow-frame-rate*
@@ -1246,13 +1321,17 @@
(none)
)
;; definition for function main-draw-hook
(defun main-draw-hook ()
(real-main-draw-hook)
(none)
)
;; definition for symbol *draw-hook*, type (function none)
(define *draw-hook* main-draw-hook)
;; definition for function debug-init-buffer
;; INFO: Return type mismatch symbol vs none.
(defun debug-init-buffer ((arg0 bucket-id) (arg1 gs-zbuf) (arg2 gs-test))
(let* ((t0-0 (-> *display* frames (-> *display* on-screen) frame global-buf))
(v1-3 (-> t0-0 base))
@@ -1299,8 +1378,11 @@
(none)
)
;; definition for symbol *screen-shot*, type symbol
(define *screen-shot* #f)
;; definition for function display-frame-start
;; INFO: Return type mismatch display vs none.
(defun display-frame-start ((disp display) (new-frame-idx int) (odd-even int))
(set! (-> (the-as vif-bank #x10003c00) err me0) 1)
(let ((time-ratio
@@ -1391,6 +1473,7 @@
(none)
)
;; definition for function display-frame-finish
(defun display-frame-finish ((disp display))
(let* ((this-frame (-> disp frames (-> disp on-screen) frame))
(this-calc-buf (-> this-frame calc-buf))
@@ -1466,11 +1549,12 @@
disp
)
;; definition for function determine-pause-mode
(defun determine-pause-mode ()
(when (and *debug-pause* (= *master-mode* 'pause))
(logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons start r2))
(logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons start r2))
(while (and (= *master-mode* 'pause) (zero? (logand (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons start r2))))
(while (and (= *master-mode* 'pause) (not (logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons start r2))))
(sync-path 0 0)
(service-cpads)
)
@@ -1495,8 +1579,10 @@
0
)
;; definition for symbol *surrogate-dma-buffer*, type dma-buffer
(define *surrogate-dma-buffer* (the-as dma-buffer #f))
;; definition for function display-sync
(defun display-sync ((disp display))
(sync-path 0 0)
(set! (-> disp frames (-> disp on-screen) frame run-time)
@@ -1547,12 +1633,16 @@
(none)
)
;; definition for function swap-display
(defun swap-display ((arg0 display))
(display-frame-finish arg0)
(display-sync arg0)
(none)
)
;; definition (debug) for function marks-cam-restore
;; INFO: Used lq/sq
;; INFO: Return type mismatch symbol vs none.
(defun-debug marks-cam-restore ()
(let ((a0-0 (new-stack-vector0))
(a1-0 (new-stack-matrix0))
@@ -1592,6 +1682,9 @@
(none)
)
;; definition (debug) for function eddie-cam-restore
;; INFO: Used lq/sq
;; INFO: Return type mismatch vector vs none.
(defun-debug eddie-cam-restore ()
(let ((a0-0 (new-stack-vector0))
(a1-0 (new-stack-matrix0))
@@ -1621,6 +1714,9 @@
(none)
)
;; definition (debug) for function gregs-jungle-cam-restore
;; INFO: Used lq/sq
;; INFO: Return type mismatch string vs none.
(defun-debug gregs-jungle-cam-restore ()
(let ((a0-0 (new-stack-vector0))
(a1-0 (new-stack-matrix0))
@@ -1659,6 +1755,9 @@
(none)
)
;; definition (debug) for function gregs-village1-cam-restore
;; INFO: Used lq/sq
;; INFO: Return type mismatch string vs none.
(defun-debug gregs-village1-cam-restore ()
(let ((a0-0 (new-stack-vector0))
(a1-0 (new-stack-matrix0))
@@ -1697,6 +1796,9 @@
(none)
)
;; definition (debug) for function gregs-texture-cam-restore
;; INFO: Used lq/sq
;; INFO: Return type mismatch string vs none.
(defun-debug gregs-texture-cam-restore ()
(let ((a0-0 (new-stack-vector0))
(a1-0 (new-stack-matrix0))
@@ -1735,6 +1837,9 @@
(none)
)
;; definition (debug) for function gregs-texture2-cam-restore
;; INFO: Used lq/sq
;; INFO: Return type mismatch string vs none.
(defun-debug gregs-texture2-cam-restore ()
(let ((a0-0 (new-stack-vector0))
(a1-0 (new-stack-matrix0))
@@ -1773,6 +1878,9 @@
(none)
)
;; definition (debug) for function cave-cam-restore
;; INFO: Used lq/sq
;; INFO: Return type mismatch vector vs none.
(defun-debug cave-cam-restore ()
(let ((a0-0 (new-stack-vector0))
(a1-0 (new-stack-matrix0))
@@ -1802,6 +1910,9 @@
(none)
)
;; definition (debug) for function paals-cam-restore
;; INFO: Used lq/sq
;; INFO: Return type mismatch vector vs none.
(defun-debug paals-cam-restore ()
(let ((a0-0 (new-stack-vector0))
(a1-0 (new-stack-matrix0))
+1 -1
View File
@@ -1085,7 +1085,7 @@
(defbehavior process-drawable-delay-player process-drawable ((arg0 time-frame))
(while (and *target*
(logtest? (-> *target* control unknown-surface00 flags) (surface-flags jump))
(zero? (logand (-> *target* control status) (cshape-moving-flags onsurf)))
(not (logtest? (-> *target* control status) (cshape-moving-flags onsurf)))
)
(suspend)
)
+1 -1
View File
@@ -372,7 +372,7 @@
(dotimes (alt-actor-idx alt-actor-count)
(let ((a0-3 (entity-actor-lookup (-> arg0 entity) 'alt-actor alt-actor-idx)))
(if (or (not a0-3)
(zero? (logand (-> (the-as entity-links (-> a0-3 extra)) perm status) (entity-perm-status complete)))
(not (logtest? (-> (the-as entity-links (-> a0-3 extra)) perm status) (entity-perm-status complete)))
)
(+! incomplete-count 1)
)
+7 -8
View File
@@ -373,7 +373,6 @@
)
;; definition for method 2 of type process
;; INFO: this function exists in multiple non-identical object files
(defmethod print process ((obj process))
(format #t "#<~A ~S ~A :state ~S :flags " (-> obj type) (-> obj name) (-> obj status) (if (-> obj state)
(-> obj state name)
@@ -1660,7 +1659,7 @@
)
)
(else
(if (and (-> v1-44 process) (zero? (logand (-> v1-44 perm status) (entity-perm-status bit-3))))
(if (and (-> v1-44 process) (not (logtest? (-> v1-44 perm status) (entity-perm-status bit-3))))
(kill! (-> v1-44 entity))
)
)
@@ -1683,7 +1682,7 @@
)
)
(else
(when (and (-> s0-0 process) (zero? (logand (-> s0-0 perm status) (entity-perm-status bit-3))))
(when (and (-> s0-0 process) (not (logtest? (-> s0-0 perm status) (entity-perm-status bit-3))))
(kill! (-> s0-0 entity))
(set! sv-24 (+ sv-24 1))
)
@@ -1713,7 +1712,7 @@
)
)
(else
(if (and (-> v1-84 process) (zero? (logand (-> v1-84 perm status) (entity-perm-status bit-3))))
(if (and (-> v1-84 process) (not (logtest? (-> v1-84 perm status) (entity-perm-status bit-3))))
(kill! (-> v1-84 entity))
)
)
@@ -1730,7 +1729,7 @@
(let ((s1-1 (-> s4-5 data s2-3)))
(cond
((and (< (vector-vector-distance (-> s1-1 trans) sv-16) (-> *ACTOR-bank* birth-dist))
(zero? (logand (-> s1-1 perm status) (entity-perm-status bit-9 bit-10)))
(not (logtest? (-> s1-1 perm status) (entity-perm-status bit-9 bit-10)))
)
(when (not (or (-> s1-1 process) (logtest? (-> s1-1 perm status) (entity-perm-status bit-0 dead))))
(birth! (-> s1-1 entity))
@@ -1741,7 +1740,7 @@
)
)
(else
(if (and (-> s1-1 process) (zero? (logand (-> s1-1 perm status) (entity-perm-status bit-3))))
(if (and (-> s1-1 process) (not (logtest? (-> s1-1 perm status) (entity-perm-status bit-3))))
(kill! (-> s1-1 entity))
)
)
@@ -1760,7 +1759,7 @@
(set! sv-32 (-> s3-5 data s1-2))
(cond
((and (is-object-visible? s4-2 (-> sv-32 vis-id))
(zero? (logand (-> sv-32 perm status) (entity-perm-status bit-9 bit-10)))
(not (logtest? (-> sv-32 perm status) (entity-perm-status bit-9 bit-10)))
)
(when (not (or (-> sv-32 process) (logtest? (-> sv-32 perm status) (entity-perm-status bit-0 dead)) s0-1))
(birth! (-> sv-32 entity))
@@ -1779,7 +1778,7 @@
)
)
(else
(when (and (-> sv-32 process) (zero? (logand (-> sv-32 perm status) (entity-perm-status bit-3))))
(when (and (-> sv-32 process) (not (logtest? (-> sv-32 perm status) (entity-perm-status bit-3))))
(kill! (-> sv-32 entity))
(set! sv-24 (+ sv-24 1))
)
+7 -7
View File
@@ -410,7 +410,7 @@
)
)
((and arg2 (and (< (+ 4096.0 (-> *FACT-bank* suck-bounce-dist)) f0-0)
(zero? (logand (-> self flags) (collectable-flags suck)))
(not (logtest? (-> self flags) (collectable-flags suck)))
)
)
(go-virtual wait)
@@ -599,7 +599,7 @@
)
(set! (-> self base quad) (-> self root-override trans quad))
(if (and (logtest? (-> self fact options) (fact-options can-collect))
(zero? (logand (-> self flags) (collectable-flags ignore-blue)))
(not (logtest? (-> self flags) (collectable-flags ignore-blue)))
)
(go-virtual notice-blue (process->handle *target*))
)
@@ -699,7 +699,7 @@
(set! (-> a1-0 message) 'query)
(set! (-> a1-0 param 0) (the-as uint 'powerup))
(set! (-> a1-0 param 1) (the-as uint 3))
(if (and (not (send-event-function *target* a1-0)) (zero? (logand (-> self flags) (collectable-flags suck))))
(if (and (not (send-event-function *target* a1-0)) (not (logtest? (-> self flags) (collectable-flags suck))))
(go-virtual wait)
)
)
@@ -1577,7 +1577,7 @@
(not *progress-process*)
(!= (-> self next-state name) 'pickup)
*target*
(zero? (logand (-> *target* state-flags) (state-flags grabbed dying)))
(not (logtest? (-> *target* state-flags) (state-flags grabbed dying)))
)
)
)
@@ -1635,7 +1635,7 @@
(loop
(let ((f30-0 (vector-vector-distance (-> self base) (target-pos 0))))
(set! f28-0
(if (and (< f30-0 (-> *FACT-bank* suck-suck-dist)) (zero? (logand (-> self flags) (collectable-flags anim))))
(if (and (< f30-0 (-> *FACT-bank* suck-suck-dist)) (not (logtest? (-> self flags) (collectable-flags anim))))
(seek f28-0 (the-as float 16384.0) (* 3072.0 (-> *display* seconds-per-frame)))
(seek f28-0 (the-as float 0.0) (* 3072.0 (-> *display* seconds-per-frame)))
)
@@ -2183,7 +2183,7 @@
(fact-options skip-jump-anim)
)
)
(zero? (logand (-> self fact options) (fact-options skip-jump-anim)))
(not (logtest? (-> self fact options) (fact-options skip-jump-anim)))
)
(set! (-> self jump-pos quad) (-> (the-as vector gp-1) quad))
(set! (-> self jump-pos y) (+ 4096.0 (-> self jump-pos y)))
@@ -3045,7 +3045,7 @@
(when (-> obj blocker)
(logior! (-> obj fact options) (fact-options vent-blocked))
(set! (-> obj block-func)
(lambda ((arg0 vent)) (zero? (logand (-> arg0 blocker extra perm status) (entity-perm-status complete))))
(lambda ((arg0 vent)) (not (logtest? (-> arg0 blocker extra perm status) (entity-perm-status complete))))
)
)
(set! (-> obj show-particles) #t)
+1 -1
View File
@@ -539,7 +539,7 @@
(('flop 'uppercut 'explode 'darkeco 'eco-yellow 'bonk 'racer 'tube 'flut-bonk 'flut-attack)
(if (and (logtest? (-> self fact options) (fact-options require-zoomer))
*target*
(zero? (logand (-> *target* control root-prim prim-core action) (collide-action ca-9)))
(not (logtest? (-> *target* control root-prim prim-core action) (collide-action ca-9)))
)
(return #f)
)
+28 -1
View File
@@ -1,10 +1,15 @@
;;-*-Lisp-*-
(in-package goal)
;; definition for function set-letterbox-frames
;; INFO: Return type mismatch time-frame vs none.
(defun set-letterbox-frames ((arg0 time-frame))
(set! (-> *game-info* letterbox-time) (+ (-> *display* base-frame-counter) arg0))
(none)
)
;; definition for function letterbox
;; INFO: Return type mismatch pointer vs none.
(defun letterbox ()
(let* ((dma-buf (-> *display* frames (-> *display* on-screen) frame global-buf))
(gp-0 (-> dma-buf base))
@@ -29,6 +34,8 @@
(none)
)
;; definition for function set-blackout-frames
;; INFO: Return type mismatch time-frame vs none.
(defun set-blackout-frames ((arg0 time-frame))
(if (zero? arg0)
(set! (-> *game-info* blackout-time) (-> *display* base-frame-counter))
@@ -39,6 +46,8 @@
(none)
)
;; definition for function blackout
;; INFO: Return type mismatch pointer vs none.
(defun blackout ()
(let* ((dma-buf (-> *display* frames (-> *display* on-screen) frame global-buf))
(sprite-dma-data (-> dma-buf base))
@@ -62,6 +71,8 @@
(none)
)
;; definition for function paused?
;; INFO: Return type mismatch object vs symbol.
(defun paused? ()
(the-as
symbol
@@ -71,10 +82,13 @@
)
)
;; definition for function movie?
(defun movie? ()
(logtest? (-> *kernel-context* prevent-from-run) (process-mask movie))
)
;; definition for function set-master-mode
;; INFO: Return type mismatch int vs none.
(defun set-master-mode ((new-mode symbol))
(set! *master-mode* new-mode)
(if *debug-segment*
@@ -116,8 +130,10 @@
(none)
)
;; definition for symbol *last-master-mode*, type symbol
(define *last-master-mode* 'game)
;; definition for function toggle-pause
(defun toggle-pause ()
(case *master-mode*
(('game)
@@ -139,7 +155,7 @@
((and (or (cpad-hold? 0 select) (cpad-hold? 0 r2)) *debug-segment*)
'pause
)
((and (not *debug-segment*) (zero? (logand (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons start))))
((and (not *debug-segment*) (not (logtest? (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons start))))
*master-mode*
)
((not (progress-allowed?))
@@ -228,10 +244,13 @@
0
)
;; definition for symbol *screen-filter*, type screen-filter
(define *screen-filter*
(new 'static 'screen-filter :draw? #f :color (new 'static 'rgba :g #x20 :b #x40 :a #x50))
)
;; definition for method 9 of type screen-filter
;; INFO: Return type mismatch pointer vs none.
(defmethod draw screen-filter ((obj screen-filter))
(let* ((buf (-> *display* frames (-> *display* on-screen) frame global-buf))
(gp-0 (-> buf base))
@@ -255,12 +274,16 @@
(none)
)
;; definition for symbol *cheat-temp*, type (pointer int32)
(define *cheat-temp* (the-as (pointer int32) (malloc 'global 16)))
;; definition for symbol *master-exit*, type symbol
(define *master-exit* #f)
;; definition for symbol *progress-cheat*, type symbol
(define *progress-cheat* #f)
;; definition for function main-cheats
(defun main-cheats ()
(when (and (cpad-hold? 0 l3) (or *cheat-mode* (= *kernel-boot-message* 'play)))
(when (nonzero? (-> *cpad-list* cpads 0 button0-rel 0))
@@ -910,6 +933,8 @@
0
)
;; definition for function display-loop
;; ERROR: Failed store: (s.w! (+ v1-28 16) 0) at op 124
(defbehavior display-loop process ()
(local-vars (a0-54 int) (a0-56 int) (a0-73 int) (a0-75 int))
(stack-size-set! (-> self main-thread) 512)
@@ -1307,6 +1332,7 @@
0
)
;; definition for function on
(defun on ((arg0 symbol))
(when (not *dproc*)
(when (not arg0)
@@ -1351,6 +1377,7 @@
)
)
;; definition for function off
(defun off ()
(stop 'debug)
(dotimes (gp-0 (-> *level* length))
+1 -1
View File
@@ -753,7 +753,7 @@
(let ((v1-150 (rand-vu-int-range 3 (+ (-> self node-list length) -1))))
(cond
((and (logtest? (-> self control unknown-surface00 flags) (surface-flags jump))
(zero? (logand (-> self control status) (cshape-moving-flags onsurf)))
(not (logtest? (-> self control status) (cshape-moving-flags onsurf)))
)
(set! (-> *part-id-table* 259 init-specs 4 initial-valuef) 0.0)
(set! (-> *part-id-table* 259 init-specs 4 random-rangef) 65536.0)
+1 -1
View File
@@ -948,7 +948,7 @@
((begin
(dummy-46 self)
(and (not (and (logtest? (-> *target* control unknown-surface00 flags) (surface-flags jump))
(zero? (logand (-> *target* control status) (cshape-moving-flags onsurf)))
(not (logtest? (-> *target* control status) (cshape-moving-flags onsurf)))
)
)
(< (-> (target-pos 0) y) (+ 8192.0 (-> self root-override root-prim prim-core world-sphere y)))
+1 -1
View File
@@ -167,7 +167,7 @@
(!= (-> self control unknown-surface00 mode) 'swim)
(!= (-> self control unknown-surface00 mode) 'dive)
(!= (-> self next-state name) 'target-flop)
(zero? (logand (-> self draw status) (draw-status hidden no-anim skip-bones)))
(not (logtest? (-> self draw status) (draw-status hidden no-anim skip-bones)))
)
(set! (-> self control shadow-pos quad) (-> self control trans quad))
(find-ground-and-draw-shadow
+9 -9
View File
@@ -704,10 +704,10 @@
(set! (-> obj bob-offset) (update! (-> obj bob)))
(cond
((and (logtest? (-> obj flags) (water-flags wt08))
(zero? (logand (-> (the-as collide-shape-moving (-> obj process root)) root-prim prim-core action)
(not (logtest? (-> (the-as collide-shape-moving (-> obj process root)) root-prim prim-core action)
(collide-action ca-9)
)
)
)
)
(set! (-> obj real-ocean-offset) (- (ocean-get-height (the-as vector (-> obj bottom))) (-> obj base-height)))
(if (not (logtest? (-> obj flags) (water-flags wt09)))
@@ -870,8 +870,8 @@
)
(if (and (logtest? (-> obj flags) (water-flags wt04))
(and s4-3
(zero? (logand (-> (the-as collide-shape-moving (-> obj process root)) status) (cshape-moving-flags on-water))
)
(not (logtest? (-> (the-as collide-shape-moving (-> obj process root)) status) (cshape-moving-flags on-water))
)
)
)
(set! (-> obj bob amp) (* 0.8 (-> obj bob amp)))
@@ -903,7 +903,7 @@
(cond
((and (logtest? (-> obj flags) (water-flags wt04))
(logtest? (-> (the-as collide-shape-moving (-> obj process root)) status) (cshape-moving-flags tsurf))
(zero? (logand (water-flags wt16) (-> obj flags)))
(not (logtest? (water-flags wt16) (-> obj flags)))
)
(let ((v1-200 (new 'stack-no-clear 'vector)))
(set! (-> v1-200 quad) (-> obj bottom 0 quad))
@@ -911,7 +911,7 @@
(let ((s4-4 (-> obj process root)))
(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)))
(not (logtest? (-> (the-as collide-shape-moving s4-4) root-prim prim-core action) (collide-action ca-9)))
)
(let ((a1-27 (vector-! (new 'stack-no-clear 'vector) v1-200 (-> s4-4 trans))))
(vector-float*! a1-27 a1-27 (-> *display* frames-per-second))
@@ -922,7 +922,7 @@
)
)
)
((and (< (-> obj bottom 0 y) f30-3) (zero? (logand (water-flags wt16) (-> obj flags))))
((and (< (-> obj bottom 0 y) f30-3) (not (logtest? (water-flags wt16) (-> obj flags))))
(logior! (-> obj flags) (water-flags wt12))
)
)
@@ -967,10 +967,10 @@
(when (and (logtest? (-> (the-as collide-shape-moving (-> obj process root)) status)
(cshape-moving-flags onsurf on-water)
)
(zero? (logand (-> (the-as collide-shape-moving (-> obj process root)) root-prim prim-core action)
(not (logtest? (-> (the-as collide-shape-moving (-> obj process root)) root-prim prim-core action)
(collide-action ca-9)
)
)
)
)
(when (< (-> obj process root trans y) -409.6)
(send-event (-> obj process) 'no-look-around (seconds 1.5))
+6 -8
View File
@@ -803,9 +803,7 @@
)
;; definition for method 29 of type nav-mesh
;; WARN: Failed load: (set! vf3 (l.vf a0-4)) at op 42
;; WARN: Failed load: (set! vf4 (l.vf a1-3)) at op 45
;; WARN: Failed load: (set! vf5 (l.vf v1-9)) at op 46
;; ERROR: Failed load: (set! vf3 (l.vf a0-4)) at op 42
(defmethod is-in-mesh? nav-mesh ((obj nav-mesh) (arg0 vector) (arg1 float) (arg2 meters))
(local-vars (v1-10 float))
(rlet ((vf1 :class vf)
@@ -940,7 +938,7 @@
)
)
(cond
((and (-> arg0 next-poly) (zero? (logand (-> arg0 next-poly pat) 1)))
((and (-> arg0 next-poly) (not (logtest? (-> arg0 next-poly pat) 1)))
(set! (-> arg0 current-poly) (-> arg0 next-poly))
)
(else
@@ -2185,7 +2183,7 @@
)
(while (!= v1-71 (-> s4-0 alive-list-end))
(let ((s0-3 (the-as collide-shape (-> (the-as connection v1-71) param3))))
(when (not (or (= s0-3 (-> obj shape)) (zero? (logand arg0 (-> s0-3 root-prim prim-core collide-as)))))
(when (not (or (= s0-3 (-> obj shape)) (not (logtest? arg0 (-> s0-3 root-prim prim-core collide-as)))))
(let ((s1-3 obj))
(set! sv-112 s3-0)
(when (logtest? (-> s0-3 nav-flags) (nav-flags navf0))
@@ -2706,7 +2704,7 @@
)
(when (or (not (dummy-16 obj arg0))
(logtest? (nav-control-flags navcf17) (-> obj flags))
(zero? (logand (-> obj flags) (nav-control-flags navcf10)))
(not (logtest? (-> obj flags) (nav-control-flags navcf10)))
)
(set! (-> obj flags) (logior (nav-control-flags navcf21) (-> obj flags)))
(vector-! (-> obj travel) arg2 (-> arg1 trans))
@@ -2923,7 +2921,7 @@
v1-0
(-> obj current-poly)
(-> obj travel)
(zero? (logand (-> obj flags) (nav-control-flags navcf12)))
(not (logtest? (-> obj flags) (nav-control-flags navcf12)))
arg0
arg1
)
@@ -3134,7 +3132,7 @@
sv-84
sv-88
(-> obj travel)
(zero? (logand (-> obj flags) (nav-control-flags navcf12)))
(not (logtest? (-> obj flags) (nav-control-flags navcf12)))
204.8
s5-1
)
+1 -2
View File
@@ -37,7 +37,6 @@
)
;; definition for method 3 of type sparticle-launcher
;; INFO: this function exists in multiple non-identical object files
;; INFO: Return type mismatch int vs sparticle-launcher.
(defmethod inspect sparticle-launcher ((obj sparticle-launcher))
(format #t "~X: sparticle-launcher~%" obj)
@@ -729,7 +728,7 @@
(set! (-> arg2 next-launcher) (the-as basic 0))
(cond
((and (logtest? (-> arg2 flags) (sp-cpuinfo-flag bit12))
(zero? (logand (-> arg2 flags) (sp-cpuinfo-flag aux-list)))
(not (logtest? (-> arg2 flags) (sp-cpuinfo-flag aux-list)))
)
(let ((f20-0 (-> arg3 r-g-b-a x))
(f22-0 (-> arg3 r-g-b-a y))
+6 -6
View File
@@ -935,7 +935,7 @@
(logtest? (-> self control unknown-surface01 flags) (surface-flags no-rotate-toward-transv))
(!= (-> self control unknown-float41) 0.0)
)
(zero? (logand (-> self control unknown-surface01 flags) (surface-flags always-rotate-toward-transv)))
(not (logtest? (-> self control unknown-surface01 flags) (surface-flags always-rotate-toward-transv)))
)
(-> self control unknown-vector20)
(-> self control transv)
@@ -1059,7 +1059,7 @@
)
(when (and (cpad-pressed? (-> self control unknown-cpad-info00 number) triangle)
(zero? (-> self control unknown-int40))
(zero? (logand (-> *kernel-context* prevent-from-run) (process-mask movie)))
(not (logtest? (-> *kernel-context* prevent-from-run) (process-mask movie)))
)
(if (and (= (-> self cam-user-mode) 'normal)
(logtest? (-> self control unknown-surface00 flags) (surface-flags allow-look-around))
@@ -1078,7 +1078,7 @@
(when (and (= *cheat-mode* 'debug)
(cpad-hold? (-> self control unknown-cpad-info00 number) r2)
(not *pause-lock*)
(zero? (logand (-> self state-flags) (state-flags grabbed first-person-mode)))
(not (logtest? (-> self state-flags) (state-flags grabbed first-person-mode)))
)
(if (!= (-> self next-state name) 'target-falling)
(send-event self 'change-mode 'falling)
@@ -1125,7 +1125,7 @@
(let ((f0-17 (vector-dot (-> self control dynam gravity-normal) (-> self control transv))))
(if (and (or (logtest? (-> self control unknown-surface01 flags) (surface-flags allow-edge-grab))
(and (= (-> self next-state name) 'target-walk)
(zero? (logand (-> self control status) (cshape-moving-flags onsurf)))
(not (logtest? (-> self control status) (cshape-moving-flags onsurf)))
)
)
(< f0-17 0.0)
@@ -1190,7 +1190,7 @@
)
(let ((f0-2
(if (and (logtest? (-> self control status) (cshape-moving-flags twall))
(zero? (logand (-> self control status) (cshape-moving-flags onsurf)))
(not (logtest? (-> self control status) (cshape-moving-flags onsurf)))
)
0.0
(-> self control unknown-float81)
@@ -1464,7 +1464,7 @@
(the-as cspace (-> self node-list data))
)
(if (not (and (logtest? (-> self water flags) (water-flags wt12))
(zero? (logand (-> self water flags) (water-flags wt04)))
(not (logtest? (-> self water flags) (water-flags wt04)))
)
)
(set! (-> self control unknown-float30) (- (-> self water base-height) (-> self water swim-height)))
+3 -3
View File
@@ -113,7 +113,7 @@
(let ((v1-52 (lookup-level-info (-> arg0 level))))
(if (and v1-52
(= (-> *setting-control* current music) (-> v1-52 music-bank))
(zero? (logand (-> arg0 flags) (continue-flags sage-intro title)))
(not (logtest? (-> arg0 flags) (continue-flags sage-intro title)))
)
(remove-setting! 'music-volume)
)
@@ -628,8 +628,8 @@
(the-as time-frame (-> *TARGET-bank* stuck-timeout))
)
(not (logtest? (-> self state-flags) (state-flags prevent-attack)))
(zero? (logand (-> self control unknown-surface01 flags) (surface-flags prevent-attacks-during-launch-jump surf08))
)
(not (logtest? (-> self control unknown-surface01 flags) (surface-flags prevent-attacks-during-launch-jump surf08))
)
)
)
(go
+3 -3
View File
@@ -790,7 +790,7 @@
)
(('loading)
(if (not (or (and (logtest? (-> self control unknown-surface00 flags) (surface-flags jump))
(zero? (logand (-> self control status) (cshape-moving-flags onsurf)))
(not (logtest? (-> self control status) (cshape-moving-flags onsurf)))
)
(or (logtest? (-> self water flags) (water-flags wt09))
(logtest? (-> self state-flags) (state-flags dangerous sf02 being-attacked grabbed first-person-mode dying))
@@ -827,7 +827,7 @@
)
(('tube)
(if (and (logtest? (-> self control status) (cshape-moving-flags onsurf))
(zero? (logand (-> self water flags) (water-flags wt09)))
(not (logtest? (-> self water flags) (water-flags wt09)))
)
(go target-tube-start (process->handle (the-as process (-> arg3 param 1))))
)
@@ -980,7 +980,7 @@
(-> self control unknown-dword50)
(-> self control unknown-dword51)
)
(zero? (logand (-> self state-flags) (state-flags being-attacked dying)))
(not (logtest? (-> self state-flags) (state-flags being-attacked dying)))
)
(set! (-> self control unknown-vector52 quad) (-> self control trans quad))
(target-timed-invulnerable (seconds 0.1) self)
+3 -3
View File
@@ -821,7 +821,7 @@
(not (-> *setting-control* current movie))
(not (-> *setting-control* current hint))
(not (logtest? (-> self control status) (cshape-moving-flags t-act)))
(zero? (logand (-> self water flags) (water-flags wt09)))
(not (logtest? (-> self water flags) (water-flags wt09)))
)
)
@@ -902,7 +902,7 @@
(and (< 0.7 (-> self control touch-angle))
(and (< (-> self control surface-angle) 0.3)
(logtest? (-> self control status) (cshape-moving-flags twall))
(or arg0 (zero? (logand (-> self control status) (cshape-moving-flags t-act))))
(or arg0 (not (logtest? (-> self control status) (cshape-moving-flags t-act))))
)
)
)
@@ -914,7 +914,7 @@
(>= 0.7 (-> self control touch-angle))
)
(and (< (-> self control unknown-float61) 0.7)
(zero? (logand (-> self state-flags) (state-flags prevent-duck)))
(not (logtest? (-> self state-flags) (state-flags prevent-duck)))
)
)
)
+5 -5
View File
@@ -1200,7 +1200,7 @@
)
(pad-buttons x)
)
(zero? (logand (-> self state-flags) (state-flags prevent-jump)))
(not (logtest? (-> self state-flags) (state-flags prevent-jump)))
)
(cond
((or (< -0.2 (local-pad-angle))
@@ -1646,7 +1646,7 @@
(pad-buttons x)
)
(not (logtest? (-> self water flags) (water-flags wt09)))
(zero? (logand (-> self state-flags) (state-flags prevent-jump)))
(not (logtest? (-> self state-flags) (state-flags prevent-jump)))
)
(go target-jump (-> *TARGET-bank* jump-height-min) (-> *TARGET-bank* jump-height-max) (the-as surface #f))
)
@@ -2028,7 +2028,7 @@
:trans (behavior ()
((-> self state-hook))
(if (and (logtest? (-> self control status) (cshape-moving-flags onsurf))
(zero? (logand (-> self control status) (cshape-moving-flags on-water)))
(not (logtest? (-> self control status) (cshape-moving-flags on-water)))
)
(set-zero! (-> self water bob))
)
@@ -2144,7 +2144,7 @@
:trans (behavior ()
((-> self state-hook))
(if (and (logtest? (-> self control status) (cshape-moving-flags onsurf))
(zero? (logand (-> self control status) (cshape-moving-flags on-water)))
(not (logtest? (-> self control status) (cshape-moving-flags on-water)))
)
(set-zero! (-> self water bob))
)
@@ -2415,7 +2415,7 @@
:trans (behavior ()
(if (and (cpad-pressed? (-> self control unknown-cpad-info00 number) x)
(not (logtest? (-> self state-flags) (state-flags prevent-jump)))
(zero? (logand (-> self water flags) (water-flags wt13 wt14)))
(not (logtest? (-> self water flags) (water-flags wt13 wt14)))
)
(go
target-swim-jump-jump
+15 -15
View File
@@ -94,7 +94,7 @@
)
(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)))
(not (logtest? (-> self state-flags) (state-flags prevent-jump)))
)
(go target-jump (-> *TARGET-bank* jump-height-min) (-> *TARGET-bank* jump-height-max) (the-as surface #f))
)
@@ -1458,7 +1458,7 @@
(< (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)))
(not (logtest? (-> self water flags) (water-flags wt09)))
(zero? (logand (-> self state-flags) (state-flags prevent-jump)))
(not (logtest? (-> self state-flags) (state-flags prevent-jump)))
)
)
(go target-double-jump (-> *TARGET-bank* double-jump-height-min) (-> *TARGET-bank* double-jump-height-max))
@@ -1470,8 +1470,8 @@
(the-as time-frame (-> *TARGET-bank* stuck-timeout))
)
(not (logtest? (-> self state-flags) (state-flags prevent-attack)))
(zero? (logand (-> self control unknown-surface01 flags) (surface-flags prevent-attacks-during-launch-jump surf08))
)
(not (logtest? (-> self control unknown-surface01 flags) (surface-flags prevent-attacks-during-launch-jump surf08))
)
)
)
(go
@@ -1593,8 +1593,8 @@
(the-as time-frame (-> *TARGET-bank* stuck-timeout))
)
(not (logtest? (-> self state-flags) (state-flags prevent-attack)))
(zero? (logand (-> self control unknown-surface01 flags) (surface-flags prevent-attacks-during-launch-jump surf08))
)
(not (logtest? (-> self control unknown-surface01 flags) (surface-flags prevent-attacks-during-launch-jump surf08))
)
)
)
(go
@@ -1694,8 +1694,8 @@
(the-as time-frame (-> *TARGET-bank* stuck-timeout))
)
(not (logtest? (-> self state-flags) (state-flags prevent-attack)))
(zero? (logand (-> self control unknown-surface01 flags) (surface-flags prevent-attacks-during-launch-jump surf08))
)
(not (logtest? (-> self control unknown-surface01 flags) (surface-flags prevent-attacks-during-launch-jump surf08))
)
)
)
(go
@@ -1884,7 +1884,7 @@
)
)
(if (and (< (-> *TARGET-bank* fall-far) f0-1)
(zero? (logand (-> self control status) (cshape-moving-flags on-water)))
(not (logtest? (-> self control status) (cshape-moving-flags on-water)))
)
(go target-hit-ground-hard f0-1)
)
@@ -2117,7 +2117,7 @@
(when (!= (-> self state-time) (-> *display* base-frame-counter))
(if (and (or (smack-surface? #t)
(and (>= (-> self control unknown-float63) 0.7)
(zero? (logand (-> self control status) (cshape-moving-flags t-act)))
(not (logtest? (-> self control status) (cshape-moving-flags t-act)))
)
)
(begin
@@ -2158,13 +2158,13 @@
(if (and (cpad-pressed? (-> self control unknown-cpad-info00 number) x)
(and (< 4096.0 (-> self control unknown-float01))
(or (>= (- (-> *display* base-frame-counter) (-> self state-time)) (seconds 0.1))
(zero? (logand (-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) button0-abs 0)
(not (logtest? (-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) button0-abs 0)
(pad-buttons square)
)
)
)
)
(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)))
(not (logtest? (-> self control unknown-surface01 flags) (surface-flags prevent-attacks-during-launch-jump)))
)
)
(go
@@ -2549,8 +2549,8 @@
(the-as time-frame (-> *TARGET-bank* stuck-timeout))
)
(not (logtest? (-> self state-flags) (state-flags prevent-attack)))
(zero? (logand (-> self control unknown-surface01 flags) (surface-flags prevent-attacks-during-launch-jump surf08))
)
(not (logtest? (-> self control unknown-surface01 flags) (surface-flags prevent-attacks-during-launch-jump surf08))
)
)
)
(set-quaternion! (-> self control) (-> self control dir-targ))
+1 -1
View File
@@ -1811,7 +1811,7 @@
)
)
)
(if (and (< 0.0 arg1) (and (< arg1 0.2) (zero? (logand (-> *display* integral-frame-counter) 4))))
(if (and (< 0.0 arg1) (and (< arg1 0.2) (not (logtest? (-> *display* integral-frame-counter) 4))))
(set! arg3 (* arg3 2))
)
(set! (-> arg5 pos y) (the float arg2))
+1 -1
View File
@@ -1381,7 +1381,7 @@
)
(ja :group! (-> self draw art-group data 5) :num! max)
(while (and (not (task-closed? (game-task beach-flutflut) (task-status need-reward-speech)))
(zero? (logand (-> self ambients-played) 1024))
(not (logtest? (-> self ambients-played) 1024))
)
(if (play-ambient (-> self ambient) "BIR-AM11" #f (the-as vector #f))
(logior! (-> self ambients-played) 1024)
+1 -1
View File
@@ -543,7 +543,7 @@
)
(case (-> self level)
(('citadel 'lavatube)
(while (and *target* (zero? (logand (-> *target* draw status) (draw-status hidden))))
(while (and *target* (not (logtest? (-> *target* draw status) (draw-status hidden))))
(suspend)
)
)
+2 -3
View File
@@ -36,7 +36,6 @@
)
;; definition for method 9 of type trajectory
;; INFO: this function exists in multiple non-identical object files
(defmethod eval-position! trajectory ((obj trajectory) (time float) (result vector))
(vector+float*! result (-> obj initial-position) (-> obj initial-velocity) time)
(+! (-> result y) (* 0.5 time time (-> obj gravity)))
@@ -540,10 +539,10 @@ nav-enemy-default-event-handler
(the-as
symbol
(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)
)
)
)
)
)
)
+2 -2
View File
@@ -217,7 +217,7 @@
(when (or (not *target*)
(and (>= (- (-> *display* base-frame-counter) (-> self state-time)) (seconds 4))
(not (and (logtest? (-> *target* control unknown-surface00 flags) (surface-flags jump))
(zero? (logand (-> *target* control status) (cshape-moving-flags onsurf)))
(not (logtest? (-> *target* control status) (cshape-moving-flags onsurf)))
)
)
)
@@ -292,7 +292,7 @@
(when (or (not *target*)
(and (>= (- (-> *display* base-frame-counter) (-> self state-time)) (seconds 4))
(not (and (logtest? (-> *target* control unknown-surface00 flags) (surface-flags jump))
(zero? (logand (-> *target* control status) (cshape-moving-flags onsurf)))
(not (logtest? (-> *target* control status) (cshape-moving-flags onsurf)))
)
)
)
+3 -3
View File
@@ -49,7 +49,7 @@
(robotboss-cut-cam-exit)
)
((or (and (logtest? (-> *target* control unknown-surface00 flags) (surface-flags jump))
(zero? (logand (-> *target* control status) (cshape-moving-flags onsurf)))
(not (logtest? (-> *target* control status) (cshape-moving-flags onsurf)))
)
(-> self skip-cut)
)
@@ -2398,10 +2398,10 @@
(when (and arg1 (nonzero? (-> self looping-sound 0)))
(update! (-> self looping-sound 0))
(when (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)
)
)
)
)
(let ((t2-0 (new 'stack-no-clear 'collide-tri-result))
(a2-0 (new 'stack-no-clear 'vector))
+3 -3
View File
@@ -870,8 +870,8 @@
(the-as time-frame (-> *TARGET-bank* stuck-timeout))
)
(not (logtest? (-> self state-flags) (state-flags prevent-attack)))
(zero? (logand (-> self control unknown-surface01 flags) (surface-flags prevent-attacks-during-launch-jump surf08))
)
(not (logtest? (-> self control unknown-surface01 flags) (surface-flags prevent-attacks-during-launch-jump surf08))
)
)
)
(go target-flut-air-attack (-> *FLUT-bank* air-attack-speed))
@@ -1304,7 +1304,7 @@
(when (!= (-> self state-time) (-> *display* base-frame-counter))
(if (and (or (smack-surface? #t)
(and (>= (-> self control unknown-float63) 0.7)
(zero? (logand (-> self control status) (cshape-moving-flags t-act)))
(not (logtest? (-> self control status) (cshape-moving-flags t-act)))
)
)
(begin
+2 -2
View File
@@ -1168,7 +1168,7 @@
(lambda ((arg0 entity-actor) (arg1 (pointer symbol)))
(the-as
object
(when (and (= (-> arg0 etype) periscope) (zero? (logand (-> arg0 extra perm status) (entity-perm-status complete))))
(when (and (= (-> arg0 etype) periscope) (not (logtest? (-> arg0 extra perm status) (entity-perm-status complete))))
(set! (-> arg1 0) #f)
#t
)
@@ -1396,7 +1396,7 @@
(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)))
(not (logtest? (-> *target* control status) (cshape-moving-flags onsurf)))
)
)
)
+4 -4
View File
@@ -152,10 +152,10 @@
)
(cond
((and (-> self is-lethal?)
(zero? (logand (-> *target* state-flags)
(not (logtest? (-> *target* state-flags)
(state-flags being-attacked invulnerable timed-invulnerable invuln-powerup do-not-notice dying)
)
)
)
)
(when (send-event arg0 'attack (-> arg3 param 0) (new 'static 'attack-info))
(let ((v0-1 (the-as object #t)))
@@ -447,10 +447,10 @@ junglesnake-default-event-handler
:trans (behavior ()
(if (and (and *target* (>= 24576.0 (vector-vector-distance (-> self root-override trans) (-> *target* control trans))))
(>= (- (-> *display* base-frame-counter) (-> self state-time)) (-> self refractory-delay))
(zero? (logand (-> *target* state-flags)
(not (logtest? (-> *target* state-flags)
(state-flags being-attacked invulnerable timed-invulnerable invuln-powerup do-not-notice dying)
)
)
)
)
(go junglesnake-attack)
)
+2 -2
View File
@@ -1179,10 +1179,10 @@
)
)
*target*
(zero? (logand (-> *target* state-flags)
(not (logtest? (-> *target* state-flags)
(state-flags being-attacked invulnerable timed-invulnerable invuln-powerup do-not-notice dying)
)
)
)
)
(go plant-boss-attack 1)
)
+3 -3
View File
@@ -318,10 +318,10 @@
(< 28672.0 (vector-vector-distance (-> self root-override trans) (-> *target* control trans)))
)
(and (not (and (logtest? (-> *target* control unknown-surface00 flags) (surface-flags jump))
(zero? (logand (-> *target* control status) (cshape-moving-flags onsurf)))
(not (logtest? (-> *target* control status) (cshape-moving-flags onsurf)))
)
)
(zero? (logand (-> *target* control root-prim prim-core action) (collide-action ca-7)))
(not (logtest? (-> *target* control root-prim prim-core action) (collide-action ca-7)))
)
)
(ja-no-eval :group! (-> self draw art-group data 7) :num! (seek!) :frame-num 0.0)
@@ -335,7 +335,7 @@
(until (ja-done? 0)
(when (and (and *target* (>= 28672.0 (vector-vector-distance (-> self root-override trans) (-> *target* control trans))))
(or (and (logtest? (-> *target* control unknown-surface00 flags) (surface-flags jump))
(zero? (logand (-> *target* control status) (cshape-moving-flags onsurf)))
(not (logtest? (-> *target* control status) (cshape-moving-flags onsurf)))
)
(logtest? (-> *target* control root-prim prim-core action) (collide-action ca-7))
)
+2 -2
View File
@@ -363,10 +363,10 @@
;; INFO: Return type mismatch vector vs none.
(defmethod dummy-28 mother-spider-proj ((obj mother-spider-proj))
(when (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)
)
)
)
)
(let ((gp-0 (-> obj target)))
(set! (-> gp-0 quad) (-> (target-pos 0) quad))
+4 -4
View File
@@ -369,7 +369,7 @@
;; definition for method 31 of type mother-spider
(defmethod is-player-stuck? mother-spider ((obj mother-spider))
(when (and *target* (not (and (logtest? (-> *target* control unknown-surface00 flags) (surface-flags jump))
(zero? (logand (-> *target* control status) (cshape-moving-flags onsurf)))
(not (logtest? (-> *target* control status) (cshape-moving-flags onsurf)))
)
)
)
@@ -1071,7 +1071,7 @@
)
)
(if (or (not *target*) (and (logtest? (-> *target* control unknown-surface00 flags) (surface-flags jump))
(zero? (logand (-> *target* control status) (cshape-moving-flags onsurf)))
(not (logtest? (-> *target* control status) (cshape-moving-flags onsurf)))
)
)
(set! (-> self last-player-in-air-time) (-> *display* base-frame-counter))
@@ -1263,10 +1263,10 @@
(go mother-spider-traveling (the-as uint 0))
)
(if (and (>= (- (-> *display* base-frame-counter) (-> self started-birthing-time)) (seconds 6))
(zero? (logand (-> *target* state-flags)
(not (logtest? (-> *target* state-flags)
(state-flags being-attacked invulnerable timed-invulnerable invuln-powerup do-not-notice dying)
)
)
)
)
(go mother-spider-traveling (the-as uint 1))
)
+1 -1
View File
@@ -433,7 +433,7 @@ nav-enemy-default-event-handler
(set! (-> obj cannon-ent) (entity-actor-lookup (-> obj entity) 'alt-actor 0))
(logclear! (-> obj mask) (process-mask actor-pause))
(if (or (not (and (-> obj entity) (logtest? (-> obj entity extra perm status) (entity-perm-status complete))))
(zero? (logand (-> obj enemy-info options) (fact-options has-power-cell)))
(not (logtest? (-> obj enemy-info options) (fact-options has-power-cell)))
)
(go (method-of-object obj nav-enemy-idle))
)
+1 -1
View File
@@ -902,7 +902,7 @@
(close-specific-task! (game-task plunger-lurker-hit) (task-status unknown))
(while (and *target*
(logtest? (-> *target* control unknown-surface00 flags) (surface-flags jump))
(zero? (logand (-> *target* control status) (cshape-moving-flags onsurf)))
(not (logtest? (-> *target* control status) (cshape-moving-flags onsurf)))
)
(suspend)
)
@@ -121,7 +121,7 @@
)
(and (< 0.0 (vector-dot (-> arg0 ground-poly-normal) arg2))
(< (- (-> *display* base-frame-counter) (-> arg0 unknown-dword10)) (seconds 0.3))
(zero? (logand sv-104 32))
(not (logtest? sv-104 32))
)
)
)
@@ -153,7 +153,7 @@
(else
(set! sv-96 (logior sv-96 1))
(set! (-> arg0 cur-pat mode) 0)
(if (and (= (-> arg1 best-from-prim prim-id) 6) (zero? (logand sv-104 7)))
(if (and (= (-> arg1 best-from-prim prim-id) 6) (not (logtest? sv-104 7)))
(set! (-> arg0 local-normal quad) (-> sv-84 quad))
)
(vector-reflect-flat! arg2 (-> sv-88 0) sv-84)
+1 -1
View File
@@ -125,7 +125,7 @@
(let ((f0-1 (/ (-> *target* racer heat) (-> *RACER-bank* heat-max))))
(set! (-> arg2 vector 1 z) (* 182.04445 (+ -45.0 (* 215.0 f0-1))))
(cond
((and (< 0.8 f0-1) (zero? (logand (-> *display* integral-frame-counter) 8)))
((and (< 0.8 f0-1) (not (logtest? (-> *display* integral-frame-counter) 8)))
(set! (-> arg2 vector 2 x) 128.0)
(set! (-> arg2 vector 2 y) 0.0)
(set! (-> arg2 vector 2 z) 0.0)
+1 -1
View File
@@ -1073,7 +1073,7 @@
(until v1-154
(suspend)
(set! v1-154 (and (>= (- (-> *display* base-frame-counter) (-> self state-time)) (seconds 1))
(zero? (logand (-> *kernel-context* prevent-from-run) (process-mask movie)))
(not (logtest? (-> *kernel-context* prevent-from-run) (process-mask movie)))
)
)
)
+1 -1
View File
@@ -202,7 +202,7 @@
)
)
((4)
(if (and *target* (zero? (logand (-> *target* control root-prim prim-core action) (collide-action ca-9))))
(if (and *target* (not (logtest? (-> *target* control root-prim prim-core action) (collide-action ca-9))))
(goto cfg-77)
)
)
+2 -2
View File
@@ -546,7 +546,7 @@
)
(let ((f0-2
(if (or (and (logtest? (-> self control status) (cshape-moving-flags twall))
(zero? (logand (-> self control status) (cshape-moving-flags onsurf)))
(not (logtest? (-> self control status) (cshape-moving-flags onsurf)))
)
(logtest? (-> self state-flags) (state-flags dying))
)
@@ -830,7 +830,7 @@
)
(cpad-pressed? (-> self control unknown-cpad-info00 number) circle square)
(>= (- (-> *display* base-frame-counter) (-> self control unknown-dword82)) (seconds 0.25))
(zero? (logand (-> self state-flags) (state-flags being-attacked dying)))
(not (logtest? (-> self state-flags) (state-flags being-attacked dying)))
)
(let ((gp-6 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self control quat)))
(s5-4 (vector<-cspace! (new 'stack-no-clear 'vector) (-> self manipy 0 node-list data 4)))
+1 -1
View File
@@ -328,7 +328,7 @@
;; definition for method 57 of type snow-bunny
(defmethod dummy-57 snow-bunny ((obj snow-bunny))
(if (or (not *target*) (zero? (logand (-> *target* state-flags) (state-flags dangerous))))
(if (or (not *target*) (not (logtest? (-> *target* state-flags) (state-flags dangerous))))
(return #f)
)
(let ((f0-0 (vector-vector-xz-distance (target-pos 0) (-> obj collide-info trans))))
+2 -2
View File
@@ -839,7 +839,7 @@
)
)
(('ridden)
(if (or (not *target*) (zero? (logand (-> *target* control root-prim prim-core action) (collide-action ca-14))))
(if (or (not *target*) (not (logtest? (-> *target* control root-prim prim-core action) (collide-action ca-14))))
(go elevator-travel-to-fort)
)
)
@@ -904,7 +904,7 @@
(when *target*
(if (and (>= 798720.0 (-> (target-pos 0) y))
(not (and (logtest? (-> *target* control unknown-surface00 flags) (surface-flags jump))
(zero? (logand (-> *target* control status) (cshape-moving-flags onsurf)))
(not (logtest? (-> *target* control status) (cshape-moving-flags onsurf)))
)
)
)
+1 -1
View File
@@ -1503,7 +1503,7 @@
(local-vars (v1-1 symbol))
(until v1-1
(suspend)
(set! v1-1 (or (not *target*) (zero? (logand (-> *target* state-flags) (state-flags grabbed)))))
(set! v1-1 (or (not *target*) (not (logtest? (-> *target* state-flags) (state-flags grabbed)))))
)
(sound-play "prec-button1" :pitch -1)
(let ((gp-1 (get-process *default-dead-pool* snowcam #x4000)))
+2 -2
View File
@@ -666,10 +666,10 @@
;; INFO: Return type mismatch vector vs none.
(defmethod dummy-28 ram-boss-proj ((obj ram-boss-proj))
(when (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)
)
)
)
)
(let ((gp-0 (-> obj target)))
(set! (-> gp-0 quad) (-> (target-pos 0) quad))
+1 -1
View File
@@ -326,7 +326,7 @@
(send-event a0-1 'pickup)
(until v1-7
(suspend)
(set! v1-7 (or (not *target*) (zero? (logand (-> *target* state-flags) (state-flags grabbed)))))
(set! v1-7 (or (not *target*) (not (logtest? (-> *target* state-flags) (state-flags grabbed)))))
)
)
)
+3 -3
View File
@@ -617,7 +617,7 @@
(set! (-> self abort-audio-if-beaten?) #f)
(dotimes (gp-0 3)
(let ((v1-4 (-> self button gp-0)))
(if (and (!= gp-0 (-> self challenge)) (zero? (logand (ash 1 gp-0) (-> self challenges-mask))))
(if (and (!= gp-0 (-> self challenge)) (not (logtest? (ash 1 gp-0) (-> self challenges-mask))))
(send-event (ppointer->process v1-4) 'trigger)
)
)
@@ -747,7 +747,7 @@
)
(until v1-112
(suspend)
(set! v1-112 (or (not *target*) (zero? (logand (-> *target* state-flags) (state-flags grabbed)))))
(set! v1-112 (or (not *target*) (not (logtest? (-> *target* state-flags) (state-flags grabbed)))))
)
(set! (-> self state-time) (-> *display* base-frame-counter))
(sleep (-> self ticker) (-> self prize (-> self challenge) puzzle-delay))
@@ -900,7 +900,7 @@
(set! (-> self abort-audio-if-beaten?) #f)
(until v1-3
(suspend)
(set! v1-3 (or (not *target*) (zero? (logand (-> *target* state-flags) (state-flags grabbed)))))
(set! v1-3 (or (not *target*) (not (logtest? (-> *target* state-flags) (state-flags grabbed)))))
)
(if (not (handle->process (-> self prize (-> self challenge) actor-handle)))
(logior! (-> self challenges-mask) (ash 1 (-> self challenge)))
+1 -1
View File
@@ -789,7 +789,7 @@
)
(when (and (logtest? (-> arg1 mask) (attack-mask mode))
(= (-> arg1 mode) 'darkeco)
(zero? (logand (-> arg1 mask) (attack-mask shove-up)))
(not (logtest? (-> arg1 mask) (attack-mask shove-up)))
)
(set! (-> arg1 shove-up) 12288.0)
(logior! (-> arg1 mask) (attack-mask shove-up))
+1 -1
View File
@@ -1166,7 +1166,7 @@
(defmethod target-above-threshold? billy ((obj billy))
(the-as
symbol
(and *target* (zero? (logand (-> *target* control root-prim prim-core action) (collide-action ca-14))))
(and *target* (not (logtest? (-> *target* control root-prim prim-core action) (collide-action ca-14))))
)
)
+3 -3
View File
@@ -108,14 +108,14 @@
(-> *setting-control* current play-hints)
(and (< 0.0 (-> *setting-control* current dialog-volume))
(let ((a0-3 (entity-actor-lookup (-> self entity) 'alt-actor 0)))
(or (not a0-3) (zero? (logand (-> a0-3 extra perm status) (entity-perm-status dead))))
(or (not a0-3) (not (logtest? (-> a0-3 extra perm status) (entity-perm-status dead))))
)
)
)
(when (!= (-> self index) 6)
(while (and *target*
(logtest? (-> *target* control unknown-surface00 flags) (surface-flags jump))
(zero? (logand (-> *target* control status) (cshape-moving-flags onsurf)))
(not (logtest? (-> *target* control status) (cshape-moving-flags onsurf)))
)
(suspend)
)
@@ -780,7 +780,7 @@
(or (= (-> self type) scarecrow-a)
(and (= (-> proc type) target)
(logtest? (-> (the-as target proc) control unknown-surface00 flags) (surface-flags jump))
(zero? (logand (-> (the-as target proc) control status) (cshape-moving-flags onsurf)))
(not (logtest? (-> (the-as target proc) control status) (cshape-moving-flags onsurf)))
)
)
)
+1 -1
View File
@@ -232,7 +232,7 @@
)
(when (and (< (vector-vector-xz-distance s5-1 (-> *target* control trans)) 18432.0)
(and (not (and (logtest? (-> *target* control unknown-surface00 flags) (surface-flags jump))
(zero? (logand (-> *target* control status) (cshape-moving-flags onsurf)))
(not (logtest? (-> *target* control status) (cshape-moving-flags onsurf)))
)
)
(and (< (+ -40960.0 (-> s5-1 y)) (-> *target* control trans y))
+1 -1
View File
@@ -1016,7 +1016,7 @@
)
(while (and *target*
(logtest? (-> *target* control unknown-surface00 flags) (surface-flags jump))
(zero? (logand (-> *target* control status) (cshape-moving-flags onsurf)))
(not (logtest? (-> *target* control status) (cshape-moving-flags onsurf)))
)
(suspend)
)
+2 -2
View File
@@ -23,7 +23,7 @@
)
:trans (behavior ()
(bot-method-223 self #f)
(when (not (logtest? (-> self focus-status) (focus-status grabbed)))
(when (not (focus-test? self grabbed))
(cond
((bot-method-214 self)
(go-hostile self)
@@ -366,7 +366,7 @@
(none)
)
:trans (behavior ()
(if (logtest? (-> self focus-status) (focus-status grabbed))
(if (focus-test? self grabbed)
(go-virtual waiting-idle)
)
(bot-method-223 self #f)
+4 -4
View File
@@ -1206,7 +1206,7 @@
(let ((f0-4 (ja-aframe-num 0)))
(cond
((>= f0-4 22.0)
(when (logtest? (-> obj focus-status) (focus-status dangerous))
(when (focus-test? obj dangerous)
(if (logtest? (-> obj enemy-flags) (enemy-flag check-water))
(logior! (-> obj focus-status) (focus-status dangerous))
(logclear! (-> obj focus-status) (focus-status dangerous))
@@ -1214,7 +1214,7 @@
)
)
((>= f0-4 16.0)
(when (not (logtest? (-> obj focus-status) (focus-status dangerous)))
(when (not (focus-test? obj dangerous))
(logior! (-> obj focus-status) (focus-status dangerous))
(let* ((v1-42 *game-info*)
(a0-34 (+ (-> v1-42 attack-id) 1))
@@ -1237,7 +1237,7 @@
(let ((f0-5 (ja-aframe-num 0)))
(cond
((>= f0-5 32.0)
(when (logtest? (-> obj focus-status) (focus-status dangerous))
(when (focus-test? obj dangerous)
(if (logtest? (-> obj enemy-flags) (enemy-flag check-water))
(logior! (-> obj focus-status) (focus-status dangerous))
(logclear! (-> obj focus-status) (focus-status dangerous))
@@ -1245,7 +1245,7 @@
)
)
((>= f0-5 25.0)
(when (not (logtest? (-> obj focus-status) (focus-status dangerous)))
(when (not (focus-test? obj dangerous))
(logior! (-> obj focus-status) (focus-status dangerous))
(let* ((v1-62 *game-info*)
(a0-47 (+ (-> v1-62 attack-id) 1))
+14 -14
View File
@@ -37,7 +37,7 @@
(none)
)
:trans (behavior ()
(if (and (not (logtest? (-> self focus-status) (focus-status grabbed)))
(if (and (not (focus-test? self grabbed))
(not (outside-spot-radius? self (the-as bot-spot #f) (the-as vector #f) #f))
)
(go-virtual traveling)
@@ -85,7 +85,7 @@
)
:trans (behavior ()
(bot-method-223 self #f)
(when (not (logtest? (-> self focus-status) (focus-status grabbed)))
(when (not (focus-test? self grabbed))
(cond
((bot-method-214 self)
(go-hostile self)
@@ -189,7 +189,7 @@
)
:trans (behavior ()
(bot-method-223 self #f)
(when (not (logtest? (-> self focus-status) (focus-status grabbed)))
(when (not (focus-test? self grabbed))
(cond
((bot-method-214 self)
(go-hostile self)
@@ -321,7 +321,7 @@
)
:trans (behavior ()
(bot-method-223 self #f)
(when (not (logtest? (-> self focus-status) (focus-status grabbed)))
(when (not (focus-test? self grabbed))
(cond
((bot-method-214 self)
(go-hostile self)
@@ -520,7 +520,7 @@
)
:trans (behavior ()
(bot-method-223 self #f)
(when (not (logtest? (-> self focus-status) (focus-status grabbed)))
(when (not (focus-test? self grabbed))
(cond
((bot-method-214 self)
(go-hostile self)
@@ -675,7 +675,7 @@
)
:trans (behavior ()
(bot-method-223 self #f)
(when (not (logtest? (-> self focus-status) (focus-status grabbed)))
(when (not (focus-test? self grabbed))
(if (bot-method-214 self)
(go-hostile self)
)
@@ -859,7 +859,7 @@
)
:trans (behavior ()
(bot-method-223 self #f)
(when (not (logtest? (-> self focus-status) (focus-status grabbed)))
(when (not (focus-test? self grabbed))
(cond
((bot-method-214 self)
(go-hostile self)
@@ -1250,7 +1250,7 @@
:frame-num 0.0
)
(until (ja-done? 0)
(when (and (logtest? (-> self focus-status) (focus-status dangerous)) (< f30-0 (ja-aframe-num 0)))
(when (and (focus-test? self dangerous) (< f30-0 (ja-aframe-num 0)))
(if (logtest? (-> self enemy-flags) (enemy-flag check-water))
(logior! (-> self focus-status) (focus-status dangerous))
(logclear! (-> self focus-status) (focus-status dangerous))
@@ -1743,13 +1743,13 @@
(if (not (logtest? s5-0 1))
(logclear! (-> self bot-flags) (bot-flags bf24))
)
(if (and (logtest? s5-0 1) (zero? (logand (bot-flags bf24) (-> self bot-flags))))
(if (and (logtest? s5-0 1) (not (logtest? (bot-flags bf24) (-> self bot-flags))))
(go-virtual sig-path-jump)
)
(if (logtest? s5-0 2)
(go-virtual sig-path-shoot-jump)
)
(if (and (>= (- (-> self clock frame-counter) (-> self state-time)) (seconds 0.05)) (zero? (logand s5-0 4)))
(if (and (>= (- (-> self clock frame-counter) (-> self state-time)) (seconds 0.05)) (not (logtest? s5-0 4)))
(go-virtual sig-path-jump-land)
)
)
@@ -1815,7 +1815,7 @@
(if (not (logtest? s5-0 1))
(logclear! (-> self bot-flags) (bot-flags bf24))
)
(if (and (logtest? s5-0 1) (zero? (logand (bot-flags bf24) (-> self bot-flags))))
(if (and (logtest? s5-0 1) (not (logtest? (bot-flags bf24) (-> self bot-flags))))
(go-virtual sig-path-jump)
)
(if (logtest? s5-0 2)
@@ -1887,13 +1887,13 @@
(if (not (logtest? s5-0 2))
(logclear! (-> self bot-flags) (bot-flags bf24))
)
(if (and (logtest? s5-0 2) (zero? (logand (bot-flags bf24) (-> self bot-flags))))
(if (and (logtest? s5-0 2) (not (logtest? (bot-flags bf24) (-> self bot-flags))))
(go-virtual sig-path-shoot-jump)
)
(if (and (logtest? s5-0 1) (logtest? (bot-flags bf25) (-> self bot-flags)))
(go-virtual sig-path-jump)
)
(if (and (>= (- (-> self clock frame-counter) (-> self state-time)) (seconds 0.05)) (zero? (logand s5-0 4)))
(if (and (>= (- (-> self clock frame-counter) (-> self state-time)) (seconds 0.05)) (not (logtest? s5-0 4)))
(go-virtual sig-path-shoot-jump-land)
)
)
@@ -1964,7 +1964,7 @@
(if (not (logtest? s5-0 2))
(logclear! (-> self bot-flags) (bot-flags bf24))
)
(if (and (logtest? s5-0 2) (zero? (logand (bot-flags bf24) (-> self bot-flags))))
(if (and (logtest? s5-0 2) (not (logtest? (bot-flags bf24) (-> self bot-flags))))
(go-virtual sig-path-shoot-jump)
)
(if (logtest? s5-0 1)
+5 -5
View File
@@ -44,7 +44,7 @@
(cond
((and a1-10
(attacked-by-player? arg0 (the-as process-focusable a1-10))
(zero? (logand (-> arg0 focus-status) (focus-status grabbed)))
(not (logtest? (-> arg0 focus-status) (focus-status grabbed)))
)
(get-task-by-type (-> arg0 ai-ctrl) sigt-fight-focus arg0)
(ai-task-control-method-10 (-> arg0 ai-ctrl) arg0)
@@ -64,7 +64,7 @@
(let ((a1-1 (handle->process (-> arg0 focus handle))))
(if (and a1-1
(attacked-by-player? arg0 (the-as process-focusable a1-1))
(zero? (logand (-> arg0 focus-status) (focus-status grabbed)))
(not (logtest? (-> arg0 focus-status) (focus-status grabbed)))
)
(logior! (-> arg0 bot-flags) (bot-flags bf00))
(ai-task-control-method-14 (-> arg0 ai-ctrl) obj arg0)
@@ -90,7 +90,7 @@
(let ((a1-4 (handle->process (-> arg0 focus handle))))
(when (and a1-4
(attacked-by-player? arg0 (the-as process-focusable a1-4))
(zero? (logand (-> arg0 focus-status) (focus-status grabbed)))
(not (logtest? (-> arg0 focus-status) (focus-status grabbed)))
)
(get-task-by-type (-> arg0 ai-ctrl) sigt-fight-focus arg0)
(ai-task-control-method-10 (-> arg0 ai-ctrl) arg0)
@@ -245,7 +245,7 @@
(let ((a1-6 (handle->process (-> arg0 focus handle))))
(when (and a1-6
(attacked-by-player? arg0 (the-as process-focusable a1-6))
(zero? (logand (-> arg0 focus-status) (focus-status grabbed)))
(not (logtest? (-> arg0 focus-status) (focus-status grabbed)))
)
(get-task-by-type (-> arg0 ai-ctrl) sigt-fight-focus arg0)
(ai-task-control-method-10 (-> arg0 ai-ctrl) arg0)
@@ -424,7 +424,7 @@
(let ((a1-14 (handle->process (-> (the-as sig arg0) focus handle))))
(when (and a1-14
(attacked-by-player? (the-as sig arg0) (the-as process-focusable a1-14))
(zero? (logand (-> (the-as sig arg0) focus-status) (focus-status grabbed)))
(not (logtest? (-> (the-as sig arg0) focus-status) (focus-status grabbed)))
)
(get-task-by-type (-> (the-as sig arg0) ai-ctrl) sigt-fight-focus (the-as sig arg0))
(ai-task-control-method-10 (-> (the-as sig arg0) ai-ctrl) (the-as sig arg0))
+22 -23
View File
@@ -388,26 +388,25 @@
"Handles various events for the enemy
@TODO - unsure if there is a pattern for the events and this should have a more specific name"
(let ((v1-0 arg2))
(the-as object (cond
((= v1-0 'untrigger)
(sig-plasma-method-11 (-> obj plasma) #t)
)
((= v1-0 'sig-path)
(when (and (not (logtest? (-> obj focus-status) (focus-status dead)))
(nonzero? (-> obj hit-points))
(zero? (-> obj fated-time))
)
(let ((a1-2 (-> arg3 param 0)))
(sig-method-249 obj (the-as sig-path a1-2))
)
(go (method-of-object obj sig-path-run))
)
)
(else
((method-of-type bot general-event-handler) obj arg0 arg1 arg2 arg3)
)
)
)
(the-as
object
(cond
((= v1-0 'untrigger)
(sig-plasma-method-11 (-> obj plasma) #t)
)
((= v1-0 'sig-path)
(when (and (not (focus-test? obj dead)) (nonzero? (-> obj hit-points)) (zero? (-> obj fated-time)))
(let ((a1-2 (-> arg3 param 0)))
(sig-method-249 obj (the-as sig-path a1-2))
)
(go (method-of-object obj sig-path-run))
)
)
(else
((method-of-type bot general-event-handler) obj arg0 arg1 arg2 arg3)
)
)
)
)
)
@@ -747,7 +746,7 @@
(and (or (and (logtest? (-> obj bot-flags) (bot-flags attacked)) (= (-> obj focus-info fproc type) target))
(and (>= 40960.0 (-> obj focus-info bullseye-xz-dist)) (= (-> obj focus-info los) 1))
)
(zero? (logand (bot-flags bf19) (-> obj bot-flags)))
(not (logtest? (bot-flags bf19) (-> obj bot-flags)))
)
)
@@ -1203,7 +1202,7 @@
((and (-> obj next-state) (= (-> obj next-state name) 'failed))
(set-vector! arg0 0.0 4096.0 28672.0 1.0)
)
((logtest? (-> obj focus-status) (focus-status under-water))
((focus-test? obj under-water)
(set-vector! arg0 0.0 12288.0 28672.0 1.0)
)
(else
@@ -1213,7 +1212,7 @@
(vector<-cspace+vector! arg0 (-> obj node-list data 2) arg0)
(the-as
meters
(if (logtest? (-> obj focus-status) (focus-status under-water))
(if (focus-test? obj under-water)
(set! (-> arg0 y) (+ (get-water-height obj) (-> *setting-control* cam-current target-height)))
)
)
+2
View File
@@ -1300,3 +1300,5 @@
(defmacro script-eval (script &key (key (process->ppointer PP)) &key (proc PP) &key (vector (the-as vector #f)))
`(eval! (new 'stack 'script-context ,key ,proc ,vector) ,script))
(defmacro focus-test? (pfoc &rest status)
`(logtest? (-> (the process-focusable ,pfoc) focus-status) (focus-status ,@status)))
+26 -26
View File
@@ -226,7 +226,7 @@
(when (logtest? (water-flags touch-water) s3-0)
(set! (-> obj enemy-flags) (logior (enemy-flag directed-ready) (-> obj enemy-flags)))
(set! (-> obj water-surface-height) (-> s5-0 trans y))
(when (not (logtest? (-> obj focus-status) (focus-status touch-water under-water)))
(when (not (focus-test? obj touch-water under-water))
(let ((s2-0 (new 'stack-no-clear 'vector)))
(set! (-> s2-0 quad) (-> obj root-override2 trans quad))
(set! (-> s2-0 y) (+ 409.6 (-> s5-0 trans y)))
@@ -280,7 +280,7 @@
(let* ((v1-32 (-> s4-0 root-prim prim-core))
(f0-5 (+ (-> v1-32 world-sphere y) (-> v1-32 world-sphere w)))
)
(if (logtest? (-> obj focus-status) (focus-status under-water))
(if (focus-test? obj under-water)
(set! f0-5 (+ -819.2 f0-5))
)
(if (< f0-5 (-> s5-0 trans y))
@@ -371,10 +371,10 @@
(with-pp
(when (or (>= (- (-> pp clock frame-counter) (-> obj hit-focus-time)) (seconds 2))
(and (handle->process (-> obj focus handle))
(zero? (logand (-> (the-as process-focusable (handle->process (-> obj focus handle))) focus-status)
(not (logtest? (-> (the-as process-focusable (handle->process (-> obj focus handle))) focus-status)
(focus-status disable dead ignore grabbed)
)
)
)
)
)
(let ((v0-0 (logclear (-> obj enemy-flags) (enemy-flag look-at-focus))))
@@ -422,7 +422,7 @@
(let ((v0-0 (handle->process (-> obj focus handle))))
(if (and v0-0
(not (and v0-0
(zero? (logand (-> (the-as process-focusable v0-0) focus-status) (focus-status disable dead ignore grabbed)))
(not (logtest? (-> (the-as process-focusable v0-0) focus-status) (focus-status disable dead ignore grabbed)))
)
)
)
@@ -464,7 +464,7 @@
(defmethod enemy-method-108 enemy ((obj enemy) (arg0 enemy) (arg1 event-message-block))
(let ((s4-0 (the-as touching-shapes-entry (-> arg1 param 0))))
(when (and s4-0
(and (logtest? (-> obj incoming penetrate-using) 4096) (zero? (logand (-> obj incoming penetrate-using) 32)))
(and (logtest? (-> obj incoming penetrate-using) 4096) (not (logtest? (-> obj incoming penetrate-using) 32)))
(begin
(let ((s3-0 (-> s4-0 head)))
(while s3-0
@@ -716,7 +716,7 @@
(when (enemy-method-53 obj (the-as process-focusable s5-0))
(let ((v1-10 (handle->process (-> obj focus handle))))
(when (or (= s5-0 v1-10) (and (not (logtest? (enemy-flag actor-pause-backup) (-> obj enemy-flags)))
(or (not v1-10) (zero? (logand (-> obj focus flags) (enemy-flag lock-focus))))
(or (not v1-10) (not (logtest? (-> obj focus flags) (enemy-flag lock-focus))))
)
)
(enemy-method-63 obj (the-as process-focusable s5-0) (the-as enemy-aware #f))
@@ -1241,7 +1241,7 @@
(set! (-> obj mask) (logior (process-mask collectable) (-> obj mask)))
(if (and (-> obj enemy-info move-to-ground)
(not (logtest? (enemy-flag vulnerable-backup) (-> obj enemy-flags)))
(zero? (logand (enemy-option ambush) (-> obj fact-info-override enemy-options)))
(not (logtest? (enemy-option ambush) (-> obj fact-info-override enemy-options)))
)
(enemy-method-127 obj 40960.0 40960.0 #t (the-as collide-spec (-> obj gnd-collide)))
)
@@ -1417,10 +1417,10 @@ This commonly includes things such as:
(when a1-0
(let ((v1-4 (-> obj enemy-flags)))
(cond
((and a1-0 (zero? (logand (-> (the-as process-focusable a1-0) focus-status) (focus-status disable dead))))
((and a1-0 (not (logtest? (-> (the-as process-focusable a1-0) focus-status) (focus-status disable dead))))
(when (and (logtest? (enemy-flag trackable) v1-4)
(not (logtest? (enemy-flag actor-pause-backup) v1-4))
(zero? (logand (-> gp-0 flags) (enemy-flag lock-focus)))
(not (logtest? (-> gp-0 flags) (enemy-flag lock-focus)))
)
(enemy-method-97 obj)
(return #f)
@@ -1477,7 +1477,7 @@ This commonly includes things such as:
)
)
)
(if (and a1-1 (and a1-1 (zero? (logand (-> a1-1 focus-status) (focus-status disable dead)))) (!= obj a1-1))
(if (and a1-1 (and a1-1 (not (logtest? (-> a1-1 focus-status) (focus-status disable dead)))) (!= obj a1-1))
(update-target-awareness! obj a1-1 gp-0)
)
)
@@ -1504,7 +1504,7 @@ This commonly includes things such as:
)
)
)
(if (and a1-3 (and a1-3 (zero? (logand (-> a1-3 focus-status) (focus-status disable dead)))) (!= obj a1-3))
(if (and a1-3 (and a1-3 (not (logtest? (-> a1-3 focus-status) (focus-status disable dead)))) (!= obj a1-3))
(update-target-awareness! obj a1-3 gp-0)
)
)
@@ -1530,7 +1530,7 @@ This commonly includes things such as:
)
)
)
(if (and a1-5 (and a1-5 (zero? (logand (-> a1-5 focus-status) (focus-status disable dead)))) (!= obj a1-5))
(if (and a1-5 (and a1-5 (not (logtest? (-> a1-5 focus-status) (focus-status disable dead)))) (!= obj a1-5))
(update-target-awareness! obj a1-5 gp-0)
)
)
@@ -1577,7 +1577,7 @@ This commonly includes things such as:
(if (< 1 (the-as int (-> obj focus aware)))
(set! f0-1 (+ (the-as meters f0-1) (-> obj enemy-info notice-distance-delta)))
)
(when (or (< f30-0 f0-1) (zero? (logand (-> obj enemy-flags) (enemy-flag enable-on-notice))))
(when (or (< f30-0 f0-1) (not (logtest? (-> obj enemy-flags) (enemy-flag enable-on-notice))))
(set! s2-0 (in-aggro-range? obj arg0 (the-as vector #f)))
(if s2-0
(set! s3-1 #t)
@@ -1802,7 +1802,7 @@ This commonly includes things such as:
(when (!= (-> (the-as attack-info s2-0) id) (-> obj incoming attack-id))
(cond
((and (logtest? (-> obj enemy-flags) (enemy-flag enable-on-active))
(zero? (logand (-> obj focus-status) (focus-status grabbed)))
(not (logtest? (-> obj focus-status) (focus-status grabbed)))
)
(let* ((s1-0 obj)
(s0-0 (method-of-object s1-0 enemy-method-106))
@@ -1910,7 +1910,7 @@ This commonly includes things such as:
((= arg2 'cue-chase)
(when (and (> (-> obj hit-points) 0)
(zero? (-> obj fated-time))
(zero? (logand (-> obj focus-status) (focus-status grabbed)))
(not (logtest? (-> obj focus-status) (focus-status grabbed)))
)
(let ((v1-162 (logtest? (enemy-flag alert) (-> obj enemy-flags))))
(logclear! (-> obj enemy-flags) (enemy-flag enable-on-notice alert victory called-dying))
@@ -1940,7 +1940,7 @@ This commonly includes things such as:
((= arg2 'cue-wake)
(when (and (> (-> obj hit-points) 0)
(zero? (-> obj fated-time))
(zero? (logand (-> obj focus-status) (focus-status grabbed)))
(not (logtest? (-> obj focus-status) (focus-status grabbed)))
)
(logclear! (-> obj enemy-flags) (enemy-flag alert victory called-dying))
(if (logtest? (enemy-option ambush) (-> obj fact-info-override enemy-options))
@@ -1953,7 +1953,7 @@ This commonly includes things such as:
((= arg2 'jump)
(when (and (> (-> obj hit-points) 0)
(zero? (-> obj fated-time))
(zero? (logand (-> obj focus-status) (focus-status grabbed)))
(not (logtest? (-> obj focus-status) (focus-status grabbed)))
)
(logclear! (-> obj mask) (process-mask actor-pause))
(set! (-> obj jump-why) (-> arg3 param 0))
@@ -2020,7 +2020,7 @@ This commonly includes things such as:
(not (and (-> obj next-state) (= (-> obj next-state name) 'victory)))
(> (-> obj hit-points) 0)
(zero? (-> obj fated-time))
(zero? (logand (-> obj focus-status) (focus-status grabbed)))
(not (logtest? (-> obj focus-status) (focus-status grabbed)))
)
(go (method-of-object obj victory))
)
@@ -2152,8 +2152,8 @@ This commonly includes things such as:
)
(when (and s4-0 s3-0)
(cond
((and (logtest? (-> obj focus-status) (focus-status dangerous))
(and s3-0 (zero? (logand (-> s3-0 focus-status) (focus-status disable dead ignore grabbed))))
((and (focus-test? obj dangerous)
(and s3-0 (not (logtest? (-> s3-0 focus-status) (focus-status disable dead ignore grabbed))))
((method-of-type touching-shapes-entry prims-touching-action?)
(the-as touching-shapes-entry s4-0)
(-> obj root-override2)
@@ -2181,7 +2181,7 @@ This commonly includes things such as:
(collide-action no-standon)
(collide-action)
)
(zero? (logand (-> obj root-override2 penetrated-by) (-> s3-0 root-override penetrate-using)))
(not (logtest? (-> obj root-override2 penetrated-by) (-> s3-0 root-override penetrate-using)))
)
(if (send-shoves (-> obj root-override2) arg0 (the-as touching-shapes-entry s4-0) 0.7 6144.0 16384.0)
(send-event obj 'bouncing-off arg0)
@@ -2249,7 +2249,7 @@ This commonly includes things such as:
(set! (-> self enemy-flags) (logior (enemy-flag directed) (-> self enemy-flags)))
(let ((gp-0 (-> self root-override2)))
(cond
((logtest? (-> self focus-status) (focus-status under-water))
((focus-test? self under-water)
(enemy-method-47 self (-> gp-0 transv))
)
(else
@@ -2290,7 +2290,7 @@ This commonly includes things such as:
(defbehavior enemy-die-falling-post enemy ()
(set! (-> self enemy-flags) (logior (enemy-flag directed) (-> self enemy-flags)))
(let ((gp-0 (-> self root-override2)))
(if (logtest? (-> self focus-status) (focus-status under-water))
(if (focus-test? self under-water)
(enemy-method-47 self (-> gp-0 transv))
(vector-v++! (-> gp-0 transv) (compute-acc-due-to-gravity gp-0 (new-stack-vector0) 0.0))
)
@@ -3180,7 +3180,7 @@ This commonly includes things such as:
)
(when (not (logtest? (enemy-flag directed) (-> obj enemy-flags)))
(let ((s5-0 (-> obj root-override2)))
(if (logtest? (-> obj focus-status) (focus-status under-water))
(if (focus-test? obj under-water)
(enemy-method-47 obj (-> s5-0 transv))
(+! (-> s5-0 transv y) (* (-> obj enemy-info movement-gravity) (-> pp clock seconds-per-frame)))
)
@@ -3200,7 +3200,7 @@ This commonly includes things such as:
)
)
(logclear! (-> obj enemy-flags) (enemy-flag directed))
(if (and (enemy-method-102 obj) (zero? (logand (-> obj focus-status) (focus-status dead))))
(if (and (enemy-method-102 obj) (not (logtest? (-> obj focus-status) (focus-status dead))))
(kill-prefer-falling obj)
)
(let ((s5-1 (-> obj root-override2))
+1 -1
View File
@@ -471,7 +471,7 @@
)
:code (behavior ()
(local-vars (v1-43 symbol))
(let ((gp-1 (zero? (logand (-> self message flags) 2))))
(let ((gp-1 (not (logtest? (-> self message flags) 2))))
(while (or (and (nonzero? (-> self voice-id))
(let ((v1-34 (get-status *gui-control* (-> self voice-id))))
(or (= v1-34 (gui-status ready)) (= v1-34 (gui-status active)))
+3 -3
View File
@@ -537,7 +537,7 @@
(cond
((and (= gp-0 (-> self cur-volume))
(= *camera-layout-blink* 'volume)
(zero? (logand (-> *display* real-frame-clock integral-frame-counter) 8))
(not (logtest? (-> *display* real-frame-clock integral-frame-counter) 8))
)
)
(else
@@ -3379,12 +3379,12 @@
)
((and (not (logtest? (-> arg0 options) 28))
(logtest? (-> arg0 options) 1)
(zero? (logand (-> *cpad-list* cpads 0 button0-rel 0) (-> arg0 button)))
(not (logtest? (-> *cpad-list* cpads 0 button0-rel 0) (-> arg0 button)))
)
#f
)
((and (not (logtest? (-> arg0 options) 29))
(zero? (logand (-> *cpad-list* cpads 0 button0-abs 0) (-> arg0 button)))
(not (logtest? (-> *cpad-list* cpads 0 button0-abs 0) (-> arg0 button)))
)
#f
)
+11 -11
View File
@@ -51,7 +51,7 @@
(vector-reset! (-> self pitch-off))
(set! (-> self upspeed) 0.0)
(set! (-> self on-ground)
(zero? (logand (-> (the-as process-focusable gp-0) focus-status) (focus-status in-air)))
(not (logtest? (-> (the-as process-focusable gp-0) focus-status) (focus-status in-air)))
)
(set! (-> self on-pole) #f)
(set! (-> self ease-t) 1.0)
@@ -75,7 +75,7 @@
)
)
(cond
((logtest? (-> (the-as process-focusable gp-0) focus-status) (focus-status under-water))
((focus-test? (the-as process-focusable gp-0) under-water)
(set! (-> self under-water) 2)
)
(else
@@ -135,7 +135,7 @@
)
)
(cond
((logtest? (-> (the-as target gp-0) focus-status) (focus-status under-water))
((focus-test? (the-as target gp-0) under-water)
(set! (-> self under-water) 2)
)
((> (-> self under-water) 0)
@@ -174,7 +174,7 @@
(set! (-> self tpos-curr quad) (-> (get-trans (the-as target gp-0) 4) quad))
)
)
(when (logtest? (-> (the-as target gp-0) focus-status) (focus-status edge-grab))
(when (focus-test? (the-as target gp-0) edge-grab)
(if *display-cam-los-debug*
(format *stdcon* "ride edge~%")
)
@@ -202,12 +202,12 @@
)
)
)
(set! (-> self on-ground) (zero? (logand (-> (the-as target gp-0) focus-status) (focus-status in-air))))
(set! (-> self on-ground) (not (logtest? (-> (the-as target gp-0) focus-status) (focus-status in-air))))
(let ((s5-7 (new-stack-vector0)))
0.0
(cond
((and (logtest? (-> (the-as target gp-0) focus-status) (focus-status in-air))
(zero? (logand (focus-status halfpipe super) (-> (the-as target gp-0) focus-status)))
((and (focus-test? (the-as target gp-0) in-air)
(not (logtest? (focus-status halfpipe super) (-> (the-as target gp-0) focus-status)))
)
(if *display-cam-los-debug*
(format *stdcon* "air tracking~%")
@@ -251,8 +251,8 @@
(vector-! s5-7 (-> self tpos-curr) (-> self tpos-old))
(let ((f0-34 (vector-dot s5-7 (-> self local-down))))
(cond
((and (logtest? (-> (the-as target gp-0) focus-status) (focus-status touch-water))
(zero? (logand (focus-status mech) (-> (the-as target gp-0) focus-status)))
((and (focus-test? (the-as target gp-0) touch-water)
(not (logtest? (focus-status mech) (-> (the-as target gp-0) focus-status)))
)
(set! (-> self upspeed) 0.0)
)
@@ -288,8 +288,8 @@
(if (not (logtest? (-> self settings slave-options) (cam-slave-options JUMP_PITCHES)))
(reset-follow)
)
(when (and (logtest? (-> (the-as target gp-0) focus-status) (focus-status on-water under-water))
(zero? (logand (focus-status mech) (-> (the-as target gp-0) focus-status)))
(when (and (focus-test? (the-as target gp-0) on-water under-water)
(not (logtest? (focus-status mech) (-> (the-as target gp-0) focus-status)))
)
(let ((f0-41 (- (get-water-height (the-as target gp-0)) (-> self settings target-height))))
(if (< (-> self tpos-curr-adj y) f0-41)
+2 -2
View File
@@ -299,7 +299,7 @@
)
:trans (behavior ()
(if (or (not (handle->process (-> *camera* settings pov-handle)))
(zero? (logand (-> *camera* master-options) (cam-master-options-u32 HAVE_TARGET)))
(not (logtest? (-> *camera* master-options) (cam-master-options-u32 HAVE_TARGET)))
)
(cam-slave-go cam-free-floating)
)
@@ -527,7 +527,7 @@
:exit (behavior ()
(if (and *target*
(logtest? (-> *camera* master-options) (cam-master-options-u32 HAVE_TARGET))
(logtest? (-> *target* focus-status) (focus-status in-head))
(focus-test? *target* in-head)
)
(send-event *target* 'end-mode)
)
+2 -2
View File
@@ -171,7 +171,7 @@
(when (= (-> s5-2 status) 'active)
(cond
((or *artist-fix-visible* *stats-bsp*)
(set! (-> s5-2 render?) (zero? (logand *fix-visible-level-mask* (ash 1 (-> s5-2 index)))))
(set! (-> s5-2 render?) (not (logtest? *fix-visible-level-mask* (ash 1 (-> s5-2 index)))))
(format
*stdcon*
"~0kleaf-index ~8S ~C = ~d node ~d ~S ~S~%"
@@ -196,7 +196,7 @@
(set! (-> s5-2 render?) #t)
)
)
(when (and *artist-fix-visible* (zero? (logand *fix-visible-level-mask* (ash 1 (-> s5-2 index)))))
(when (and *artist-fix-visible* (not (logtest? *fix-visible-level-mask* (ash 1 (-> s5-2 index)))))
(let ((s4-1 (-> s5-2 bsp current-leaf-idx))
(s3-0 (-> s5-2 bsp vis-spheres))
)
+1 -5
View File
@@ -90,7 +90,7 @@
(logtest? (-> arg0 flags) (water-flags can-ground))
(logtest? (-> arg0 flags) (water-flags swim-ground under-water))
(logtest? (water-flags over-water) (-> arg0 flags))
(zero? (logand (water-flags jump-out) (-> arg0 flags)))
(not (logtest? (water-flags jump-out) (-> arg0 flags)))
)
)
(return #f)
@@ -1019,7 +1019,3 @@
(set! v0-4 #f)
(ret-value v0-4)
)
+2 -2
View File
@@ -93,7 +93,7 @@
(let ((v1-9 (-> s3-1 pat)))
(cond
((and (or (zero? (-> arg1 show-pat-set)) (logtest? v1-9 (-> arg1 show-pat-set)))
(or (zero? (-> arg1 show-pat-clear)) (zero? (logand v1-9 (-> arg1 show-pat-clear))))
(or (zero? (-> arg1 show-pat-clear)) (not (logtest? v1-9 (-> arg1 show-pat-clear))))
(or (zero? (-> arg1 event-mask)) (logtest? (-> arg1 event-mask) (ash 1 (-> v1-9 event))))
)
(let ((t1-0 (copy-and-set-field (-> *pat-mode-info* (-> v1-9 mode) color) a 64)))
@@ -162,7 +162,7 @@
(when (= (-> (the-as collide-cache-prim s5-1) prim-core prim-type) (prim-type sphere))
(let ((v1-37 (-> (the-as collide-shape-prim-sphere (-> (the-as collide-cache-prim s5-1) prim)) pat)))
(when (and (or (zero? (-> arg1 show-pat-set)) (logtest? v1-37 (-> arg1 show-pat-set)))
(or (zero? (-> arg1 show-pat-clear)) (zero? (logand v1-37 (-> arg1 show-pat-clear))))
(or (zero? (-> arg1 show-pat-clear)) (not (logtest? v1-37 (-> arg1 show-pat-clear))))
(or (zero? (-> arg1 event-mask)) (logtest? (-> arg1 event-mask) (ash 1 (-> v1-37 event))))
)
(let ((t0-5 (copy-and-set-field (-> *pat-mode-info* (-> v1-37 mode) color) a 64)))
+6 -7
View File
@@ -828,7 +828,7 @@
)
)
)
(if (and a0-14 (zero? (logand (focus-status rail) (-> (the-as process-focusable a0-14) focus-status))))
(if (and a0-14 (not (logtest? (focus-status rail) (-> (the-as process-focusable a0-14) focus-status))))
(set! (-> obj surf) *rail-surface*)
)
)
@@ -874,7 +874,7 @@
(target-attack-up (the-as target (-> obj process)) 'attack-or-shove 'shockup)
)
(((pat-event burnup))
(when (not (logtest? (focus-status pilot) (-> (the-as process-focusable (-> obj process)) focus-status)))
(when (not (focus-test? (the-as process-focusable (-> obj process)) pilot))
(set! s5-0 (logior s5-0 #x4000))
(target-attack-up (the-as target (-> obj process)) 'attack-or-shove 'burnup)
)
@@ -1036,7 +1036,7 @@
(let ((a1-1 (new 'stack-no-clear 'vector)))
(set! (-> a1-1 quad) (-> arg3 quad))
(when (and (not (logtest? (-> arg0 prev-status) (collide-status on-surface)))
(zero? (logand (-> arg0 status) (collide-status touch-wall)))
(not (logtest? (-> arg0 status) (collide-status touch-wall)))
)
(let ((f0-1 (- 1.0 (-> arg0 surf impact-fric))))
(when (< f0-1 1.0)
@@ -3054,10 +3054,9 @@
(.sub.vf vf6 vf4 vf5 :mask #b111)
(.svf (&-> sv-176 quad) vf6)
(vector-normalize! sv-176 1.0)
(when (and (< arg2 (-> sv-176 y))
(and (not (logtest? (focus-status dead hit board mech) (-> (the-as process-focusable gp-0) focus-status)))
(< (-> (the-as process-focusable gp-0) root-override transv y) 4.096)
)
(when (and (< arg2 (-> sv-176 y)) (and (not (focus-test? (the-as process-focusable gp-0) dead hit board mech))
(< (-> (the-as process-focusable gp-0) root-override transv y) 4.096)
)
)
(let ((s2-1 (new 'stack-no-clear 'vector)))
(set! (-> s2-1 quad) (-> (the-as process-focusable gp-0) root-override transv quad))
+2 -6
View File
@@ -427,7 +427,7 @@
(let ((v1-1 (-> obj head)))
(while v1-1
(let ((a0-1 (-> v1-1 prim1 cprim)))
(if (and (logtest? arg1 (-> a0-1 prim-core action)) (zero? (logand arg2 (-> a0-1 prim-core action))))
(if (and (logtest? arg1 (-> a0-1 prim-core action)) (not (logtest? arg2 (-> a0-1 prim-core action))))
(return (the-as basic v1-1))
)
)
@@ -439,7 +439,7 @@
(let ((v1-4 (-> obj head)))
(while v1-4
(let ((a0-5 (-> v1-4 prim2 cprim)))
(if (and (logtest? arg1 (-> a0-5 prim-core action)) (zero? (logand arg2 (-> a0-5 prim-core action))))
(if (and (logtest? arg1 (-> a0-5 prim-core action)) (not (logtest? arg2 (-> a0-5 prim-core action))))
(return (the-as basic v1-4))
)
)
@@ -537,7 +537,3 @@
)
arg0
)
+4 -4
View File
@@ -208,7 +208,7 @@
(lambda ((arg0 process-drawable))
(with-pp
(when (and (logtest? (process-mask crate enemy collectable guard) (-> arg0 mask))
(zero? (logand (process-mask no-track) (-> arg0 mask)))
(not (logtest? (process-mask no-track) (-> arg0 mask)))
)
(let* ((gp-0 *search-info*)
(s4-0 arg0)
@@ -240,7 +240,7 @@
(if (and (type? s2-0 process-focusable)
s2-0
s2-0
(zero? (logand (-> (the-as process-focusable s2-0) focus-status) (focus-status disable dead)))
(not (logtest? (-> (the-as process-focusable s2-0) focus-status) (focus-status disable dead)))
)
(set! s4-2 (get-trans (the-as process-focusable s2-0) 3))
)
@@ -416,9 +416,9 @@
)
)
)
(when (and (and s3-0 (zero? (logand (-> (the-as process-focusable s3-0) focus-status) (focus-status disable dead))))
(when (and (and s3-0 (not (logtest? (-> (the-as process-focusable s3-0) focus-status) (focus-status disable dead))))
(and (logtest? (process-mask crate enemy collectable guard) (-> s3-0 mask))
(zero? (logand (process-mask no-track) (-> s3-0 mask)))
(not (logtest? (process-mask no-track) (-> s3-0 mask)))
)
)
(let* ((s2-1 (get-trans (the-as process-focusable s3-0) 3))
+2 -2
View File
@@ -271,7 +271,7 @@ eco-door-event-handler
(when (and *target* (and (>= (-> self open-distance)
(vector-vector-distance (-> self root-override trans) (-> *target* control trans))
)
(zero? (logand (focus-status teleporting) (-> *target* focus-status)))
(not (logtest? (focus-status teleporting) (-> *target* focus-status)))
)
)
(lock-according-to-task! self)
@@ -343,7 +343,7 @@ eco-door-event-handler
(or (not *target*) (or (< (-> self close-distance)
(vector-vector-distance (-> self root-override trans) (-> *target* control trans))
)
(logtest? (focus-status teleporting) (-> *target* focus-status))
(focus-test? *target* teleporting)
)
)
)
+7 -7
View File
@@ -709,7 +709,7 @@
)
)
((and arg2 (and (< (+ 4096.0 (-> *FACT-bank* suck-bounce-dist)) f0-0)
(zero? (logand (-> self flags) (collectable-flag suck-in)))
(not (logtest? (-> self flags) (collectable-flag suck-in)))
)
)
(go-virtual wait)
@@ -951,7 +951,7 @@
(if (and (logtest? (-> self fact options) (actor-option suck-in))
(not (and (-> self next-state) (= (-> self next-state name) 'pickup)))
*target*
(zero? (logand (-> *target* focus-status) (focus-status dead)))
(not (logtest? (-> *target* focus-status) (focus-status dead)))
)
(go-virtual suck (process->handle *target*))
)
@@ -986,7 +986,7 @@
)
(else
(if (and (logtest? (-> self fact options) (actor-option suck-in))
(zero? (logand (-> self flags) (collectable-flag no-eco-blue)))
(not (logtest? (-> self flags) (collectable-flag no-eco-blue)))
)
(go-virtual notice-blue (process->handle *target*))
)
@@ -1094,7 +1094,7 @@
)
(or (or (not *target*)
(or (< 204800.0 (vector-vector-distance (-> self root-override2 trans) (-> *target* control trans)))
(logtest? (focus-status teleporting) (-> *target* focus-status))
(focus-test? *target* teleporting)
)
)
(logtest? (-> self flags) (collectable-flag no-distance-check-fadeout))
@@ -1190,7 +1190,7 @@
(set! (-> a1-0 message) 'query)
(set! (-> a1-0 param 0) (the-as uint 'powerup))
(set! (-> a1-0 param 1) (the-as uint 3))
(if (and (not (send-event-function *target* a1-0)) (zero? (logand (-> self flags) (collectable-flag suck-in))))
(if (and (not (send-event-function *target* a1-0)) (not (logtest? (-> self flags) (collectable-flag suck-in))))
(go-virtual wait)
)
)
@@ -1587,10 +1587,10 @@ This commonly includes things such as:
:trans (behavior ()
(if (and (and *target*
(and (>= 32768.0 (vector-vector-distance (-> self root-override2 trans) (-> *target* control trans)))
(zero? (logand (focus-status teleporting) (-> *target* focus-status)))
(not (logtest? (focus-status teleporting) (-> *target* focus-status)))
)
)
(and (not (logtest? (-> *target* focus-status) (focus-status dead hit)))
(and (not (focus-test? *target* dead hit))
(case (-> self fact pickup-type)
(((pickup-type eco-pill-dark))
(< (-> *game-info* eco-pill-dark) (-> *FACT-bank* eco-pill-dark-max-default))
+4 -7
View File
@@ -512,7 +512,7 @@
(defbehavior crate-standard-event-handler crate ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(case arg2
(('track)
(zero? (logand (actor-option no-track) (-> self fact options)))
(not (logtest? (actor-option no-track) (-> self fact options)))
)
(('attack)
(let* ((v1-3 (the-as attack-info (-> arg3 param 1)))
@@ -525,7 +525,7 @@
(('flop 'uppercut 'explode 'eco-yellow 'racer 'board 'tube 'flut-bonk 'flut-attack 'darkjak 'mech-punch)
(if (and (logtest? (-> self fact options) (actor-option racer-only))
(= (-> arg0 type) target)
(zero? (logand (focus-status pilot) (-> (the-as target arg0) focus-status)))
(not (logtest? (focus-status pilot) (-> (the-as target arg0) focus-status)))
)
(return #f)
)
@@ -696,7 +696,7 @@
)
(and *target*
(and (>= 40960.0 (vector-vector-distance (-> self root-override2 trans) (-> *target* control trans)))
(zero? (logand (focus-status teleporting) (-> *target* focus-status)))
(not (logtest? (focus-status teleporting) (-> *target* focus-status)))
)
)
)
@@ -978,10 +978,7 @@
(stop! (-> self sound))
)
(let ((v1-10 (handle->process (-> self target))))
(if (and (and v1-10
(= (-> v1-10 type) target)
(logtest? (focus-status flut tube board pilot) (-> (the-as process-focusable v1-10) focus-status))
)
(if (and (and v1-10 (= (-> v1-10 type) target) (focus-test? (the-as process-focusable v1-10) flut tube board pilot))
(and (!= (-> self fact pickup-type) 10) (not arg0))
)
(logior! (-> self fact options) (actor-option suck-in))
+4 -4
View File
@@ -531,10 +531,10 @@ do so.
(local-vars (zero float))
(let ((target *target*))
(when (and target
(zero? (logand (focus-status dead inactive in-air grabbed edge-grab pole pilot-riding pilot teleporting)
(not (logtest? (focus-status dead inactive in-air grabbed edge-grab pole pilot-riding pilot teleporting)
(-> target focus-status)
)
)
)
)
(set! zero (the-as float 0.0))
(when (and (find-closest-point-in-path! obj (get-trans target 0) (& zero) #t #t) (!= (-> obj move-pos 1) zero))
@@ -614,7 +614,7 @@ do so.
(set! (-> self ride-timer) (-> self clock frame-counter))
(-> self params)
(if (and (logtest? (-> self params flags) (elevator-flags elevator-flags-0))
(zero? (logand (-> self params flags) (elevator-flags elevator-flags-3)))
(not (logtest? (-> self params flags) (elevator-flags elevator-flags-3)))
)
(move-to-next-point! self)
)
@@ -776,7 +776,7 @@ do so.
:trans (behavior ()
(if (and (< (- (-> self ride-timer) (-> self sticky-player-last-ride-time)) (seconds 2))
(begin *target* *target*)
(logtest? (-> *target* focus-status) (focus-status in-air))
(focus-test? *target* in-air)
)
(set! (-> self ride-timer) (-> self clock frame-counter))
)
+6 -6
View File
@@ -226,7 +226,7 @@
)
)
)
(and a0-7 (logtest? (-> (the-as process-focusable a0-7) focus-status) (focus-status pole)))
(and a0-7 (focus-test? (the-as process-focusable a0-7) pole))
)
(move-along-path self)
(suspend)
@@ -1944,7 +1944,7 @@ This commonly includes things such as:
)
)
)
(the-as symbol (if (and a0-2 (logtest? (-> a0-2 focus-status) (focus-status grabbed)))
(the-as symbol (if (and a0-2 (focus-test? a0-2 grabbed))
(send-event a0-2 'end-mode)
#t
)
@@ -2729,7 +2729,7 @@ This commonly includes things such as:
(when (and *target* (and (>= (-> self active-distance)
(vector-vector-distance (-> self root-override trans) (-> *target* control trans))
)
(zero? (logand (focus-status teleporting) (-> *target* focus-status)))
(not (logtest? (focus-status teleporting) (-> *target* focus-status)))
)
)
(cond
@@ -2746,7 +2746,7 @@ This commonly includes things such as:
)
(if (and (and *target*
(and (>= 32768.0 (vector-vector-distance (-> self root-override trans) (-> *target* control trans)))
(zero? (logand (focus-status teleporting) (-> *target* focus-status)))
(not (logtest? (focus-status teleporting) (-> *target* focus-status)))
)
)
(not (send-event *target* 'query 'powerup (pickup-type eco-blue)))
@@ -2794,7 +2794,7 @@ This commonly includes things such as:
(if (or (or (not *target*) (or (< (-> self active-distance)
(vector-vector-distance (-> self root-override trans) (-> *target* control trans))
)
(logtest? (focus-status teleporting) (-> *target* focus-status))
(focus-test? *target* teleporting)
)
)
(not (send-event *target* 'query 'powerup (pickup-type eco-blue)))
@@ -2806,7 +2806,7 @@ This commonly includes things such as:
(if (and (and *target* (and (>= (+ 2867.2 (-> self root-override root-prim prim-core world-sphere w))
(vector-vector-distance (-> self root-override trans) (-> *target* control trans))
)
(zero? (logand (focus-status teleporting) (-> *target* focus-status)))
(not (logtest? (focus-status teleporting) (-> *target* focus-status)))
)
)
(< (- (-> self clock frame-counter) (-> self state-time)) (seconds 0.5))
+1 -1
View File
@@ -298,7 +298,7 @@ This commonly includes things such as:
)
)
(cond
((and proc-focus (logtest? (-> proc-focus focus-status) (focus-status edge-grab)))
((and proc-focus (focus-test? proc-focus edge-grab))
(set! (-> self safe-time) (+ (-> self clock frame-counter) (seconds 0.2)))
(return (the-as object #f))
)
+9 -13
View File
@@ -576,7 +576,7 @@
(set! (-> self game eco-pill-dark) (-> *FACT-bank* eco-pill-dark-max-default))
)
(when (and (< 0.0 (-> (the-as fact-info-target (-> self fact-override)) eco-level))
(not (logtest? (-> self focus-status) (focus-status in-head)))
(not (focus-test? self in-head))
(not (logtest? (-> self draw status) (draw-control-status no-draw no-draw-temp)))
(not (movie?))
(rand-vu-percent? (lerp-scale
@@ -673,7 +673,7 @@
(let ((v1-99 (rand-vu-int-range 3 (+ (-> self node-list length) -1))))
(cond
((and (logtest? (-> self control mod-surface flags) (surface-flag air))
(zero? (logand (-> self control status) (collide-status on-surface)))
(not (logtest? (-> self control status) (collide-status on-surface)))
)
(set! (-> *part-id-table* 543 init-specs 4 initial-valuef) 0.0)
(set! (-> *part-id-table* 543 init-specs 4 random-rangef) 65536.0)
@@ -888,7 +888,7 @@
;; WARN: Return type mismatch int vs none.
(defbehavior target-powerup-process target ()
(let ((f30-0 (-> self control collision-spheres 0 prim-core world-sphere w)))
(if (logtest? (focus-status board) (-> self focus-status))
(if (focus-test? self board)
(set! (-> self control collision-spheres 0 prim-core world-sphere w)
(+ 4096.0 (-> self control collision-spheres 0 prim-core world-sphere w))
)
@@ -897,7 +897,7 @@
(set! (-> self control collision-spheres 0 prim-core world-sphere w) f30-0)
)
(if (and (logtest? (-> self water flags) (water-flags under-water))
(zero? (logand (-> self water flags) (water-flags swim-ground)))
(not (logtest? (-> self water flags) (water-flags swim-ground)))
)
(set! (-> self control unknown-time-frame26) (-> self clock frame-counter))
(set! (-> self control unknown-time-frame27) (-> self clock frame-counter))
@@ -1099,7 +1099,7 @@
(('sewer 'forest)
(let ((f30-2 (-> self board camera-interp)))
(cond
((logtest? (focus-status board) (-> self focus-status))
((focus-test? self board)
(seek! (-> self board camera-interp) 1.0 (* 0.1 (-> self clock seconds-per-frame)))
)
((< (-> self control ctrl-xz-vel) 2048.0)
@@ -1129,7 +1129,7 @@
)
)
(logclear! (-> self focus-status) (focus-status super))
(if (or (logtest? (-> self focus-status) (focus-status dead hit))
(if (or (focus-test? self dead hit)
(logtest? (state-flags sf2 tinvul1 sf5 tinvul2) (-> self state-flags))
(-> *setting-control* user-current ignore-target)
)
@@ -1138,9 +1138,9 @@
)
(cond
((or (and (logtest? (-> self control mod-surface flags) (surface-flag air))
(zero? (logand (-> self control status) (collide-status on-surface)))
(not (logtest? (-> self control status) (collide-status on-surface)))
)
(and (logtest? (focus-status board) (-> self focus-status))
(and (focus-test? self board)
(< (- (-> self clock frame-counter) (-> self board unknown-time-frame00)) (seconds 0.1))
)
)
@@ -1168,7 +1168,7 @@
(logclear! (-> self focus-status) (focus-status on-water))
)
(if (and (logtest? (-> self water flags) (water-flags under-water))
(zero? (logand (-> self water flags) (water-flags swim-ground)))
(not (logtest? (-> self water flags) (water-flags swim-ground)))
)
(logior! (-> self focus-status) (focus-status under-water))
(logclear! (-> self focus-status) (focus-status under-water))
@@ -1211,7 +1211,3 @@
0
(none)
)
+1 -1
View File
@@ -368,7 +368,7 @@
)
(when (and v1-11
(logtest? (-> v1-11 mask) (process-mask target))
(zero? (logand (-> v1-11 focus-status) (focus-status on-water under-water)))
(not (logtest? (-> v1-11 focus-status) (focus-status on-water under-water)))
)
(when (not (logtest? (-> obj flags) (rigid-body-object-flag player-impulse-force)))
(logior! (-> obj flags) (rigid-body-object-flag player-contact-force))
+2 -4
View File
@@ -299,7 +299,7 @@
)
)
)
(if (and a0-1 (logtest? (focus-status pilot) (-> a0-1 focus-status)))
(if (and a0-1 (focus-test? a0-1 pilot))
(send-event
(ppointer->process (-> self parent-override))
'set-dist
@@ -552,9 +552,7 @@
)
)
)
(when (and s4-0
(begin (send-event s5-2 'change-mode 'board #f) (logtest? (focus-status board) (-> s5-2 focus-status)))
)
(when (and s4-0 (begin (send-event s5-2 'change-mode 'board #f) (focus-test? s5-2 board)))
(change-parent self (ppointer->process s4-0))
(try-update-focus (-> self focus) s5-2)
(go-virtual enter)
+2 -2
View File
@@ -422,7 +422,7 @@
(send-event (the-as process-tree gp-0) 'heat (* 10.0 (-> self clock seconds-per-frame)))
)
(('drown-death 'lava 'dark-eco-pool)
(if (and (not (logtest? (focus-status board) (-> (the-as process-focusable gp-0) focus-status)))
(if (and (not (focus-test? (the-as process-focusable gp-0) board))
(let ((a1-10 (new 'stack-no-clear 'event-message-block)))
(set! (-> a1-10 from) (process->ppointer self))
(set! (-> a1-10 num-params) 2)
@@ -440,7 +440,7 @@
)
)
(else
(if (and (not (logtest? (focus-status board) (-> (the-as process-focusable gp-0) focus-status)))
(if (and (not (focus-test? (the-as process-focusable gp-0) board))
(let ((a1-13 (new 'stack-no-clear 'event-message-block)))
(set! (-> a1-13 from) (process->ppointer self))
(set! (-> a1-13 num-params) 2)
+9 -9
View File
@@ -832,7 +832,7 @@
(set! (-> obj drip-speed) 15.0)
)
(if (and (not (logtest? (water-flags touch-water) (-> obj flags)))
(zero? (logand (-> obj process focus-status) (focus-status touch-water)))
(not (logtest? (-> obj process focus-status) (focus-status touch-water)))
)
(enter-water obj)
)
@@ -1021,7 +1021,7 @@
)
(if (and (logtest? (-> obj flags) (water-flags swim-ground))
(and v1-237
(zero? (logand (-> (the-as collide-shape-moving (-> obj process control)) status) (collide-status on-water)))
(not (logtest? (-> (the-as collide-shape-moving (-> obj process control)) status) (collide-status on-water)))
)
)
(set! (-> obj bob amp) (* 0.8 (-> obj bob amp)))
@@ -1060,7 +1060,7 @@
(cond
((and (logtest? (-> obj flags) (water-flags swim-ground))
(logtest? (-> (the-as collide-shape-moving (-> obj process control)) status) (collide-status touch-surface))
(zero? (logand (water-flags jump-out) (-> obj flags)))
(not (logtest? (water-flags jump-out) (-> obj flags)))
)
(let ((v1-260 (new 'stack-no-clear 'vector)))
(set! (-> v1-260 quad) (-> obj bottom 0 quad))
@@ -1068,7 +1068,7 @@
(let ((s3-3 (the-as collide-shape-moving (-> obj process control))))
(when (and (not (logtest? (-> s3-3 status) (collide-status touch-background)))
(logtest? (water-flags swimming) (-> obj flags))
(zero? (logand (focus-status board pilot) (-> obj process focus-status)))
(not (logtest? (focus-status board pilot) (-> obj process focus-status)))
)
(let ((a1-42 (vector-! (new 'stack-no-clear 'vector) v1-260 (-> (the-as control-info s3-3) trans))))
(vector-float*! a1-42 a1-42 (-> pp clock frames-per-second))
@@ -1081,7 +1081,7 @@
)
)
)
((and (< (-> obj bottom 0 y) f30-1) (zero? (logand (water-flags jump-out) (-> obj flags))))
((and (< (-> obj bottom 0 y) f30-1) (not (logtest? (water-flags jump-out) (-> obj flags))))
(logior! (-> obj flags) (water-flags under-water))
)
)
@@ -1099,7 +1099,7 @@
(send-event (-> obj process) 'wade)
(set! (-> obj flags) (logior (water-flags wading) (-> obj flags)))
)
((and (< (-> obj bottom 0 y) f30-1) (zero? (logand (water-flags jump-out) (-> obj flags))))
((and (< (-> obj bottom 0 y) f30-1) (not (logtest? (water-flags jump-out) (-> obj flags))))
(logior! (-> obj flags) (water-flags under-water))
)
)
@@ -1130,7 +1130,7 @@
(when (and (logtest? (-> (the-as collide-shape-moving (-> obj process control)) status)
(collide-status on-surface on-water)
)
(zero? (logand (focus-status board pilot) (-> obj process focus-status)))
(not (logtest? (focus-status board pilot) (-> obj process focus-status)))
)
(when (< (-> obj process control trans y) (+ -1228.8 (-> obj base-height)))
(send-event (-> obj process) 'no-look-around (seconds 1.5))
@@ -1632,7 +1632,7 @@
)
)
)
(when (and a0-39 (zero? (logand (focus-status mech) (-> (the-as process-focusable a0-39) focus-status))))
(when (and a0-39 (not (logtest? (focus-status mech) (-> (the-as process-focusable a0-39) focus-status))))
(set! (-> arg0 flags) (water-flags))
0
)
@@ -1718,7 +1718,7 @@
(water-info<-region s3-0 (-> (the-as region-prim-area #x70000000) region-prim-list items s2-1) obj arg1)
(when (and (logtest? (-> s3-0 flags) (water-flags active))
(logtest? (water-flags touch-water) (-> s3-0 flags))
(zero? (logand (-> s3-0 extra-flags) 1))
(not (logtest? (-> s3-0 extra-flags) 1))
)
(mem-copy! (the-as pointer arg0) (the-as pointer s3-0) 60)
(set! arg0 arg0)
+1 -1
View File
@@ -1162,7 +1162,7 @@
(if (= arg1 (debug-menu-msg press))
(logxor! (-> v1-0 flags) (prototype-flags disable))
)
(zero? (logand (-> v1-0 flags) (prototype-flags disable)))
(not (logtest? (-> v1-0 flags) (prototype-flags disable)))
)
(else
#f
+1 -1
View File
@@ -973,7 +973,7 @@
(when (and (nonzero? (-> dc shadow-ctrl))
(-> dc shadow-ctrl)
(not (logtest? (-> dc shadow-ctrl settings flags) (shadow-flags disable-draw)))
(zero? (logand (-> dc shadow-ctrl settings flags) (shadow-flags shdf07)))
(not (logtest? (-> dc shadow-ctrl settings flags) (shadow-flags shdf07)))
)
(let ((target-shadow-dir (new 'stack-no-clear 'vector))
(current-shadow-dir (-> dc shadow-ctrl settings shadow-dir))
+1 -1
View File
@@ -392,7 +392,7 @@
)
(dotimes (s3-0 s4-0)
(let ((a0-3 (entity-actor-lookup (-> arg0 entity) 'alt-actor s3-0)))
(if (or (not a0-3) (zero? (logand (-> a0-3 extra perm status) (entity-perm-status subtask-complete))))
(if (or (not a0-3) (not (logtest? (-> a0-3 extra perm status) (entity-perm-status subtask-complete))))
(+! gp-0 1)
)
)
+7 -9
View File
@@ -71,7 +71,6 @@
)
;; definition for method 3 of type actor-group
;; INFO: this function exists in multiple non-identical object files
(defmethod inspect actor-group ((obj actor-group))
(format #t "[~8x] ~A~%" obj (-> obj type))
(format #t "~Tlength: ~D~%" (-> obj length))
@@ -531,7 +530,6 @@
)
;; definition for method 2 of type process
;; INFO: this function exists in multiple non-identical object files
(defmethod print process ((obj process))
(cond
((and (-> obj top-thread) (!= (-> obj status) 'dead))
@@ -865,7 +863,7 @@
;; definition for function update-actor-vis-box
;; WARN: Return type mismatch int vs none.
(defun update-actor-vis-box ((arg0 process-drawable) (arg1 vector) (arg2 vector))
(when (and arg0 (nonzero? (-> arg0 draw)) (zero? (logand (-> arg0 draw status) (draw-control-status no-draw))))
(when (and arg0 (nonzero? (-> arg0 draw)) (not (logtest? (-> arg0 draw status) (draw-control-status no-draw))))
(let ((v1-5 (-> arg0 draw origin))
(f0-0 (-> arg0 draw bounds w))
)
@@ -2376,7 +2374,7 @@
(dotimes (s2-0 s3-1)
(let ((v1-54 (-> s4-2 data s2-0)))
(cond
((and (logtest? (-> v1-54 kill-mask) (task-mask special)) (zero? (logand (-> v1-54 kill-mask) sv-32)))
((and (logtest? (-> v1-54 kill-mask) (task-mask special)) (not (logtest? (-> v1-54 kill-mask) sv-32)))
(when (not (or (-> v1-54 process) (logtest? (-> v1-54 perm status) (entity-perm-status bit-0 dead))))
(birth! (-> v1-54 entity))
(set! sv-24 (+ sv-24 1))
@@ -2388,7 +2386,7 @@
(else
(if (and (-> v1-54 process)
(not (logtest? (-> v1-54 perm status) (entity-perm-status no-kill)))
(zero? (logand (-> v1-54 process mask) (process-mask no-kill)))
(not (logtest? (-> v1-54 process mask) (process-mask no-kill)))
)
(kill! (-> v1-54 entity))
)
@@ -2417,7 +2415,7 @@
(else
(if (and (-> v1-67 process)
(not (logtest? (-> v1-67 perm status) (entity-perm-status no-kill)))
(zero? (logand (-> v1-67 process mask) (process-mask no-kill)))
(not (logtest? (-> v1-67 process mask) (process-mask no-kill)))
)
(kill! (-> v1-67 entity))
)
@@ -2436,7 +2434,7 @@
(cond
((and (< (vector-vector-distance (-> s1-0 trans) sv-16) (-> *ACTOR-bank* birth-dist))
(not (logtest? (-> s1-0 perm status) (entity-perm-status bit-9 bit-10)))
(zero? (logand (-> s1-0 kill-mask) sv-32))
(not (logtest? (-> s1-0 kill-mask) sv-32))
)
(when (not (or (-> s1-0 process) (logtest? (-> s1-0 perm status) (entity-perm-status bit-0 dead))))
(birth! (-> s1-0 entity))
@@ -2449,7 +2447,7 @@
(else
(if (and (-> s1-0 process)
(not (logtest? (-> s1-0 perm status) (entity-perm-status no-kill)))
(zero? (logand (-> s1-0 process mask) (process-mask no-kill)))
(not (logtest? (-> s1-0 process mask) (process-mask no-kill)))
)
(kill! (-> s1-0 entity))
)
@@ -2494,7 +2492,7 @@
(else
(when (and (-> sv-48 process)
(not (logtest? (-> sv-48 perm status) (entity-perm-status no-kill)))
(zero? (logand (-> sv-48 process mask) (process-mask no-kill)))
(not (logtest? (-> sv-48 process mask) (process-mask no-kill)))
)
(kill! (-> sv-48 entity))
(set! sv-24 (+ sv-24 1))
+4 -4
View File
@@ -105,10 +105,10 @@
)
(when v1-33
(cond
((logtest? (-> v1-33 focus-status) (focus-status in-air))
((focus-test? v1-33 in-air)
(set! (-> arg0 reg 0) (the-as uint 126))
)
((logtest? (-> v1-33 focus-status) (focus-status touch-water))
((focus-test? v1-33 touch-water)
(set! (-> arg0 reg 0) (the-as uint 127))
)
(else
@@ -1158,11 +1158,11 @@
;; WARN: Return type mismatch int vs none.
(defbehavior target-land-effect target ()
(cond
((logtest? (-> self focus-status) (focus-status flut))
((focus-test? self flut)
(do-effect (-> self skel effect) 'effect-land-poof -1.0 -1)
(do-effect (-> self skel effect) 'effect-flut-land -1.0 -1)
)
((logtest? (focus-status pilot) (-> self focus-status))
((focus-test? self pilot)
(sound-play-by-name
(sound-name-with-material "zoom-land" (-> self control ground-pat) "")
(new-sound-id)
+2 -2
View File
@@ -173,7 +173,7 @@
((and (or (cpad-hold? 0 select) (cpad-hold? 0 r2)) *debug-segment*)
'pause
)
((and (not *debug-segment*) (zero? (logand (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons start))))
((and (not *debug-segment*) (not (logtest? (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons start))))
(if (pause-allowed?)
'pause
*master-mode*
@@ -1172,7 +1172,7 @@
(cond
((and (= *kernel-boot-message* 'demo) (not *master-exit*))
(let ((v1-109 (level-get-target-inside *level*)))
(when (and v1-109 (!= (-> v1-109 name) 'demo) (zero? (logand (-> v1-109 info level-flags) 1)))
(when (and v1-109 (!= (-> v1-109 name) 'demo) (not (logtest? (-> v1-109 info level-flags) 1)))
(persist-with-delay *setting-control* 'sfx-volume (seconds 0.5) 'sfx-volume 'abs 0.0 0)
(persist-with-delay *setting-control* 'music-volume (seconds 0.5) 'music-volume 'abs 0.0 0)
(persist-with-delay *setting-control* 'dialog-volume (seconds 0.5) 'dialog-volume 'abs 0.0 0)
+1 -1
View File
@@ -1283,7 +1283,7 @@
(let ((s4-1 (-> obj cam-target)))
(set! (-> s5-1 entity-or-mode-changed) #f)
(if (and (not (name= (-> s5-1 entity-name) (-> s4-1 entity-name)))
(or (not *target*) (zero? (logand (-> *target* focus-status) (-> s4-1 entity-mask))))
(or (not *target*) (not (logtest? (-> *target* focus-status) (-> s4-1 entity-mask))))
)
(set! (-> s4-1 entity-or-mode-changed) #t)
)
+14 -17
View File
@@ -539,14 +539,14 @@
)
)
)
(if (or (and *target* (logtest? (-> *target* focus-status) (focus-status dead)) mgr-status) (= mgr-status 'busy))
(if (or (and *target* (focus-test? *target* dead) mgr-status) (= mgr-status 'busy))
(return (the-as int #f))
)
)
(when restart?
(let ((gp-1 0))
(let ((cur-lev (level-get-target-inside *level*)))
(when (and cur-lev (zero? (logand (-> cur-lev info level-flags) 1)))
(when (and cur-lev (not (logtest? (-> cur-lev info level-flags) 1)))
(let ((game-nodes (-> *game-info* sub-task-list)))
(dotimes (i (-> game-nodes length))
(when (nonzero? i)
@@ -628,7 +628,7 @@
(when (nonzero? i)
(let ((node (-> game-nodes i)))
(when (string= arg0 (-> node name))
(let ((gp-2 (zero? (logand (-> node flags) (game-task-node-flag closed)))))
(let ((gp-2 (not (logtest? (-> node flags) (game-task-node-flag closed)))))
(close! node 'event)
(return gp-2)
)
@@ -670,7 +670,7 @@
(begin
(dotimes (a3-3 4)
(when (and (nonzero? (-> node parent-node a3-3))
(zero? (logand (-> game-nodes (-> node parent-node a3-3) flags) (game-task-node-flag closed)))
(not (logtest? (-> game-nodes (-> node parent-node a3-3) flags) (game-task-node-flag closed)))
)
(set! a3-4 #f)
(goto cfg-14)
@@ -836,7 +836,7 @@
(begin
(dotimes (ii 4)
(when (and (nonzero? (-> node parent-node ii))
(zero? (logand (-> game-nodes (-> node parent-node ii) flags) (game-task-node-flag closed)))
(not (logtest? (-> game-nodes (-> node parent-node ii) flags) (game-task-node-flag closed)))
)
(set! v1-19 #t)
(goto cfg-17)
@@ -876,7 +876,7 @@
(begin
(dotimes (pi 4)
(let ((t0-0 (-> node-info parent-node pi)))
(when (and (nonzero? t0-0) (zero? (logand (-> game-nodes t0-0 flags) (game-task-node-flag closed))))
(when (and (nonzero? t0-0) (not (logtest? (-> game-nodes t0-0 flags) (game-task-node-flag closed))))
(set! a1-1 #f)
(goto cfg-12)
)
@@ -996,7 +996,7 @@
)
(('life)
(if (and (not (task-complete? *game-info* (-> node task)))
(zero? (logand (-> node flags) (game-task-node-flag save-on-life)))
(not (logtest? (-> node flags) (game-task-node-flag save-on-life)))
)
(logclear! (-> node flags) (game-task-node-flag closed))
)
@@ -1549,7 +1549,7 @@
(none)
)
:code (behavior ()
(when (and *target* (logtest? (-> *target* focus-status) (focus-status dead)))
(when (and *target* (focus-test? *target* dead))
(if (and (logtest? (-> self flags) (fail-mission-flags famflags-3)) (zero? (-> self message)))
(deactivate self)
)
@@ -1560,7 +1560,7 @@
(case (-> self message)
(((fail-mission-message fammsg-0))
(while (begin
(if (and *target* (logtest? (-> *target* focus-status) (focus-status grabbed)))
(if (and *target* (focus-test? *target* grabbed))
(process-release? *target*)
)
(let ((a1-0 (new 'stack-no-clear 'event-message-block)))
@@ -1578,10 +1578,7 @@
(set! (-> v1-24 mode) 'bot)
(set! (-> a1-0 param 1) (the-as uint v1-24))
)
(not (or (send-event-function *target* a1-0)
(and *target* (logtest? (-> *target* focus-status) (focus-status dead)))
)
)
(not (or (send-event-function *target* a1-0) (and *target* (focus-test? *target* dead))))
)
)
(suspend)
@@ -1767,7 +1764,7 @@
(else
(task-node-reset 'life)
(update-task-masks 'life)
(if (and *target* (logtest? (-> *target* focus-status) (focus-status dead grabbed)))
(if (and *target* (focus-test? *target* dead grabbed))
(send-event *target* 'end-mode)
)
)
@@ -1814,7 +1811,7 @@
(the-as process #f)
)
(when (not (logtest? (-> arg0 flags) (fail-mission-flags famflags-4)))
(if (not (and *target* (logtest? (-> *target* focus-status) (focus-status dead)) (zero? (-> self message))))
(if (not (and *target* (focus-test? *target* dead) (zero? (-> self message))))
(set! (-> self stinger)
(the-as uint (add-process *gui-control* *target* (gui-channel background) (gui-action play) "lose1" -99.0 0))
)
@@ -1893,7 +1890,7 @@
(add-setting! 'task arg0 0 0)
(add-setting! 'task-manager (process->ppointer self) 0 0)
(set! (-> self intro-time) (-> self clock frame-counter))
(set! (-> self fail-on-death?) (zero? (logand (-> arg0 flags) (game-task-node-flag no-fail-on-death))))
(set! (-> self fail-on-death?) (not (logtest? (-> arg0 flags) (game-task-node-flag no-fail-on-death))))
(when arg1
(let* ((v1-15 (level-get *level* arg1))
(a1-6 (if (and (nonzero? (-> v1-15 entity)) (> (-> v1-15 entity length) 0))
@@ -2124,7 +2121,7 @@
(or (zero? (-> obj info intro-delay))
(>= (- (-> pp clock frame-counter) (-> obj intro-time)) (the-as time-frame (-> obj info intro-delay)))
)
(and *target* (zero? (logand (focus-status dead teleporting) (-> *target* focus-status))))
(and *target* (not (logtest? (focus-status dead teleporting) (-> *target* focus-status))))
)
)
)
+4 -7
View File
@@ -41,10 +41,7 @@
;; WARN: Stack slot offset 16 signed mismatch
;; WARN: Stack slot offset 16 signed mismatch
;; WARN: Stack slot offset 16 signed mismatch
;; WARN: Failed store: (s.w! a0-43 v1-54) at op 457
;; WARN: Failed store: (s.w! (+ a0-43 4) a1-9) at op 461
;; WARN: Failed store: (s.w! (+ a0-43 8) a1-10) at op 463
;; WARN: Failed store: (s.w! (+ a0-43 12) a1-11) at op 465
;; ERROR: Failed store: (s.w! a0-43 v1-54) at op 457
(defun update-math-camera ((arg0 math-camera) (arg1 symbol) (arg2 symbol) (arg3 float))
(local-vars (sv-16 float))
(set! (-> arg0 x-ratio) (tan (* 0.5 arg3)))
@@ -377,7 +374,7 @@
(.add.vf vf28 vf28 vf30)
(.max.x.vf vf28 vf28 vf0 :mask #b1000)
(.svf (&-> arg0 quad) vf28)
(zero? (logand v1-2 63))
(not (logtest? v1-2 63))
)
)
@@ -426,7 +423,7 @@
(.max.x.vf vf28 vf28 vf0 :mask #b1000)
(vftoi4.xyzw vf28 vf28)
(.svf (&-> arg0 quad) vf28)
(zero? (logand v1-2 63))
(not (logtest? v1-2 63))
)
)
@@ -474,7 +471,7 @@
(.add.vf vf28 vf28 vf30)
(.max.x.vf vf28 vf28 vf0 :mask #b1000)
(.svf (&-> arg0 quad) vf28)
(zero? (logand v1-2 63))
(not (logtest? v1-2 63))
(.mov v0-0 vf23)
v0-0
)
+1 -1
View File
@@ -802,7 +802,7 @@
(set! (-> s5-0 clock-sun) (the-as uint (the int (rand-vu-float-range 64.0 192.0))))
(set! (-> s5-0 clock-moon) (the-as uint (the int (rand-vu-float-range 64.0 192.0))))
)
(if (and (-> s5-0 door) (zero? (logand (-> s5-0 door extra perm status) (entity-perm-status subtask-complete))))
(if (and (-> s5-0 door) (not (logtest? (-> s5-0 door extra perm status) (entity-perm-status subtask-complete))))
(set! (-> arg0 times 0 quad) (-> *level* default-level mood-context times 0 quad))
)
)
@@ -868,7 +868,7 @@
(cond
((and (logtest? (-> arg2 flags) (sp-cpuinfo-flag sp-cpuinfo-flag-12))
(not (logtest? (-> arg2 flags) (sp-cpuinfo-flag distort)))
(zero? (logand (-> arg2 flags) (sp-cpuinfo-flag glow)))
(not (logtest? (-> arg2 flags) (sp-cpuinfo-flag glow)))
)
(let ((f20-0 (-> arg3 r-g-b-a x))
(f22-0 (-> arg3 r-g-b-a y))
@@ -1574,7 +1574,7 @@
(when (and (or (zero? (-> s0-1 param3))
(< (vector-vector-distance s5-1 (the-as vector (&-> s0-1 param0))) (the-as float (gpr->fpr (-> s0-1 param3))))
)
(zero? (logand s4-1 (the-as int (-> s0-1 prev1))))
(not (logtest? s4-1 (the-as int (-> s0-1 prev1))))
)
(let ((a1-14 (-> s0-1 next1))
(t9-5 sp-launch-particles-var)
+2 -2
View File
@@ -2273,7 +2273,7 @@
)
(string= (-> *game-info* current-continue name) (-> (the-as continue-point s1-0) name))
)
(zero? (logand (-> (the-as continue-point s1-0) flags) (continue-flags cf2 cf3)))
(not (logtest? (-> (the-as continue-point s1-0) flags) (continue-flags cf2 cf3)))
)
(set! s3-0 (the-as continue-point s1-0))
(if (string= (-> *game-info* current-continue name) (-> (the-as continue-point s1-0) name))
@@ -2286,7 +2286,7 @@
)
(label cfg-59)
(if (and (the-as continue-point s3-0)
(zero? (logand (-> (the-as continue-point s3-0) flags) (continue-flags cf2 cf3)))
(not (logtest? (-> (the-as continue-point s3-0) flags) (continue-flags cf2 cf3)))
)
(set-continue! *game-info* (the-as basic s3-0) #f)
)
+1 -1
View File
@@ -1563,7 +1563,7 @@
)
((= v1-0 (gui-channel query))
(and (not (or (logtest? (-> *art-control* frame-mask) 28) (!= *master-mode* 'game)))
(and *target* (zero? (logand (-> *target* focus-status) (focus-status dead hit))))
(and *target* (not (logtest? (-> *target* focus-status) (focus-status dead hit))))
)
)
(else

Some files were not shown because too many files have changed in this diff Show More