mirror of
https://github.com/open-goal/jak-project
synced 2026-07-29 15:44:03 -04:00
jak1 gsrc
This commit is contained in:
@@ -21,13 +21,16 @@
|
||||
(:methods
|
||||
(new (symbol type int) _type_)))
|
||||
|
||||
|
||||
(deftype joint-exploder-static-joint-params (structure)
|
||||
((joint-index int16)
|
||||
(parent-joint-index int16)))
|
||||
|
||||
|
||||
(deftype joint-exploder-static-params (basic)
|
||||
((joints (array joint-exploder-static-joint-params))))
|
||||
|
||||
|
||||
(deftype joint-exploder-joint (structure)
|
||||
((next int16)
|
||||
(prev int16)
|
||||
@@ -38,18 +41,21 @@
|
||||
(transv vector :inline)
|
||||
(prev-pos vector :inline)))
|
||||
|
||||
|
||||
(deftype joint-exploder-joints (basic)
|
||||
((num-joints int32)
|
||||
(joint joint-exploder-joint :inline :dynamic :offset 16))
|
||||
(:methods
|
||||
(new (symbol type joint-exploder-static-params) _type_)))
|
||||
|
||||
|
||||
(deftype joint-exploder-list (structure)
|
||||
((head int32)
|
||||
(pre-moved? symbol)
|
||||
(bbox-valid? symbol)
|
||||
(bbox bounding-box :inline)))
|
||||
|
||||
|
||||
(deftype joint-exploder (process-drawable)
|
||||
((parent-override (pointer process-drawable) :overlay-at parent)
|
||||
(die-if-below-y float)
|
||||
@@ -73,6 +79,7 @@
|
||||
(:states
|
||||
joint-exploder-shatter))
|
||||
|
||||
|
||||
(defmethod asize-of ((this joint-exploder-joints))
|
||||
(the-as int (+ (-> this type size) (* 176 (-> this num-joints)))))
|
||||
|
||||
@@ -270,7 +277,7 @@
|
||||
(set! (-> s5-1 transv y) (* 0.7 f30-0))))
|
||||
(+! (-> s4-0 y) (* 40.96 (-> s3-0 normal y)))
|
||||
(set! (-> s4-0 w) 1.0)
|
||||
(set! (-> s5-1 rspeed) (* 0.5 (-> s5-1 rspeed)))))
|
||||
(set! (-> s5-1 rspeed) (/ (-> s5-1 rspeed) 2))))
|
||||
(set! v1-2 (-> s5-1 next)))))
|
||||
#f)
|
||||
|
||||
@@ -381,9 +388,9 @@
|
||||
(add-point! s5-1 (the-as vector3s (+ (the-as uint (-> gp-0 joint 0 mat vector 3)) (* 176 s4-1)))))))
|
||||
#f)))
|
||||
|
||||
(defmethod relocate ((this joint-exploder) (arg0 int))
|
||||
(if (nonzero? (-> this joints)) (&+! (-> this joints) arg0))
|
||||
(the-as joint-exploder ((method-of-type process-drawable relocate) this arg0)))
|
||||
(defmethod relocate ((this joint-exploder) (offset int))
|
||||
(if (nonzero? (-> this joints)) (&+! (-> this joints) offset))
|
||||
(the-as joint-exploder ((method-of-type process-drawable relocate) this offset)))
|
||||
|
||||
(defbehavior joint-exploder-init-by-other joint-exploder ((arg0 skeleton-group) (arg1 int) (arg2 joint-exploder-static-params) (arg3 joint-exploder-static-params))
|
||||
(set! (-> self static-params) arg3)
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
(debug-t float)
|
||||
(debug-step float)))
|
||||
|
||||
|
||||
(define *CAM_LAYOUT-bank*
|
||||
(new 'static
|
||||
'cam-layout-bank
|
||||
@@ -34,6 +35,7 @@
|
||||
|
||||
(deftype clm-basic (basic) ())
|
||||
|
||||
|
||||
(deftype clm-item-action (structure)
|
||||
((button uint64)
|
||||
(options uint64)
|
||||
@@ -43,11 +45,13 @@
|
||||
(parm1-basic basic :offset 24)
|
||||
(parm1 symbol :overlay-at parm1-basic)))
|
||||
|
||||
|
||||
(deftype clm-item (clm-basic)
|
||||
((description string)
|
||||
(button-symbol symbol)
|
||||
(action clm-item-action :inline)))
|
||||
|
||||
|
||||
(deftype clm-list-item (basic)
|
||||
((description string)
|
||||
(track-val symbol)
|
||||
@@ -58,15 +62,18 @@
|
||||
(val-parm1 symbol :overlay-at val-parm1-basic)
|
||||
(actions (array clm-item-action))))
|
||||
|
||||
|
||||
(deftype clm-list (clm-basic)
|
||||
((tracker symbol)
|
||||
(cur-list-item int32)
|
||||
(items (array clm-list-item))))
|
||||
|
||||
|
||||
(deftype clm (basic)
|
||||
((title string)
|
||||
(items (array clm-basic))))
|
||||
|
||||
|
||||
(define *volume-point-current* 0)
|
||||
|
||||
(define *volume-point* (new 'debug 'vector-array 1000))
|
||||
@@ -78,6 +85,7 @@
|
||||
(deftype volume-descriptor-array (inline-array-class)
|
||||
((data plane-volume :inline :dynamic :offset 16)))
|
||||
|
||||
|
||||
(set! (-> volume-descriptor-array heap-base) (the-as uint 24))
|
||||
|
||||
(define *volume-descriptor-current* 0)
|
||||
@@ -97,6 +105,7 @@
|
||||
(:states
|
||||
cam-layout-active))
|
||||
|
||||
|
||||
(defun cam-layout-print ((arg0 int) (arg1 int) (arg2 string))
|
||||
(let* ((s5-0 (-> *display* frames (-> *display* on-screen) frame debug-buf))
|
||||
(gp-0 (-> s5-0 base)))
|
||||
@@ -290,6 +299,7 @@
|
||||
(axis vector)
|
||||
(disp string)))
|
||||
|
||||
|
||||
(defun interp-test ((arg0 (function vector vector vector float vector float none)) (arg1 interp-test-info))
|
||||
(let ((s3-0 (new-stack-vector0))
|
||||
(gp-0 (new-stack-vector0)))
|
||||
@@ -756,7 +766,7 @@
|
||||
#f)
|
||||
|
||||
(defun fov->maya ((arg0 float))
|
||||
(the-as float (if (= arg0 0.0) 0.0 (/ 12.700255 (tan (* 0.5 arg0))))))
|
||||
(the-as float (if (= arg0 0.0) 0.0 (/ 12.700255 (tan (/ arg0 2))))))
|
||||
|
||||
(defun cam-layout-save-cam-rot ((arg0 symbol) (arg1 string) (arg2 entity-actor))
|
||||
(let ((s3-0 (-> arg2 quat))
|
||||
@@ -1436,6 +1446,7 @@
|
||||
(force-on int32)
|
||||
(force-off int32)))
|
||||
|
||||
|
||||
(defbehavior clmf-cam-flag-toggle cam-layout ((arg0 int) (arg1 int))
|
||||
(let ((s4-0 (/ arg0 8))
|
||||
(gp-0 (new 'stack 'clmf-cam-flag-toggle-info)))
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
(down-move-to-pitch-on-ground float)
|
||||
(pitch-off-blend float)))
|
||||
|
||||
|
||||
(define *CAMERA_MASTER-bank*
|
||||
(new 'static
|
||||
'camera-master-bank
|
||||
@@ -286,9 +287,9 @@
|
||||
(vector-! gp-6 (-> self tpos-curr) (-> self tpos-tgt))
|
||||
(let ((f30-0 (vector-dot gp-6 (-> self local-down))))
|
||||
(vector--float*! gp-6 gp-6 (-> self local-down) f30-0)
|
||||
(if (< 0.0 f30-0) (set! (-> self upspeed) (* 0.5 (-> self upspeed))))
|
||||
(if (< 0.0 f30-0) (set! (-> self upspeed) (/ (-> self upspeed) 2)))
|
||||
(vector+! (-> self tpos-tgt) (-> self tpos-tgt) gp-6)
|
||||
(let ((f0-30 (* 0.05 f30-0))) (vector+float*! (-> self tpos-tgt) (-> self tpos-tgt) (-> self local-down) f0-30)))
|
||||
(let ((f0-30 (/ f30-0 20))) (vector+float*! (-> self tpos-tgt) (-> self tpos-tgt) (-> self local-down) f0-30)))
|
||||
(vector-! gp-6 (-> self tpos-curr-adj) (-> self tpos-tgt))
|
||||
(let* ((f0-32 (vector-dot gp-6 (-> self local-down)))
|
||||
(f0-33 (if (< 0.0 f0-32)
|
||||
@@ -957,6 +958,7 @@
|
||||
(deftype list-keeper (process)
|
||||
((dummy float)))
|
||||
|
||||
|
||||
(defstate list-keeper-active (camera-master)
|
||||
:code
|
||||
(behavior ()
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
((speed float)
|
||||
(rot-speed degrees)))
|
||||
|
||||
|
||||
(define *CAM_POINT_WATCH-bank* (new 'static 'cam-point-watch-bank :speed 1600.0 :rot-speed (degrees 0.6)))
|
||||
|
||||
(defstate cam-point-watch (camera-slave)
|
||||
@@ -36,10 +37,10 @@
|
||||
(f0-0 (analog-input (the-as int (-> *cpad-list* cpads 0 righty)) 128.0 48.0 110.0 -1.0)))
|
||||
(cond
|
||||
((cpad-hold? (-> *CAMERA-bank* joypad) r2)
|
||||
(set! (-> s5-0 y) (- (-> s5-0 y) (* 0.2 (-> *CAM_POINT_WATCH-bank* rot-speed) (- f26-0))))
|
||||
(set! (-> s5-0 x) (- (-> s5-0 x) (* 0.2 (-> *CAM_POINT_WATCH-bank* rot-speed) (- f0-0))))
|
||||
(+! (-> gp-0 x) (* 0.2 (-> *CAM_POINT_WATCH-bank* speed) f28-0))
|
||||
(+! (-> gp-0 z) (* 0.2 (-> *CAM_POINT_WATCH-bank* speed) f30-0)))
|
||||
(set! (-> s5-0 y) (- (-> s5-0 y) (* (/ (-> *CAM_POINT_WATCH-bank* rot-speed) 5) (- f26-0))))
|
||||
(set! (-> s5-0 x) (- (-> s5-0 x) (* (/ (-> *CAM_POINT_WATCH-bank* rot-speed) 5) (- f0-0))))
|
||||
(+! (-> gp-0 x) (* (/ (-> *CAM_POINT_WATCH-bank* speed) 5) f28-0))
|
||||
(+! (-> gp-0 z) (* (/ (-> *CAM_POINT_WATCH-bank* speed) 5) f30-0)))
|
||||
(else
|
||||
(set! (-> s5-0 y) (- (-> s5-0 y) (* 2.0 (-> *CAM_POINT_WATCH-bank* rot-speed) (- f26-0))))
|
||||
(set! (-> s5-0 x) (- (-> s5-0 x) (* 2.0 (-> *CAM_POINT_WATCH-bank* rot-speed) (- f0-0))))
|
||||
@@ -63,6 +64,7 @@
|
||||
((speed float)
|
||||
(rot-speed degrees)))
|
||||
|
||||
|
||||
(define *CAM_FREE-bank* (new 'static 'cam-free-bank :speed 1600.0 :rot-speed (degrees 0.6)))
|
||||
|
||||
(defun cam-free-floating-input ((arg0 vector) (arg1 vector) (arg2 symbol) (arg3 int))
|
||||
@@ -226,13 +228,13 @@
|
||||
((cpad-hold? arg3 r2)
|
||||
(cond
|
||||
((cpad-hold? arg3 l2)
|
||||
(set! (-> arg0 y) (- (-> arg0 y) (* 0.5 (-> *CAM_FREE-bank* rot-speed) (- f24-0))))
|
||||
(set! (-> arg0 x) (- (-> arg0 x) (* 0.5 (-> *CAM_FREE-bank* rot-speed) (- f26-0)))))
|
||||
(set! (-> arg0 y) (- (-> arg0 y) (* (/ (-> *CAM_FREE-bank* rot-speed) 2) (- f24-0))))
|
||||
(set! (-> arg0 x) (- (-> arg0 x) (* (/ (-> *CAM_FREE-bank* rot-speed) 2) (- f26-0)))))
|
||||
(else
|
||||
(set! (-> arg0 y) (- (-> arg0 y) (* (- f24-0) (-> *CAM_FREE-bank* rot-speed))))
|
||||
(set! (-> arg0 x) (- (-> arg0 x) (* (- f26-0) (-> *CAM_FREE-bank* rot-speed))))))
|
||||
(+! (-> arg1 x) (* 0.2 (-> *CAM_FREE-bank* speed) f28-14))
|
||||
(+! (-> arg1 z) (* 0.2 (-> *CAM_FREE-bank* speed) f30-14)))
|
||||
(+! (-> arg1 x) (* (/ (-> *CAM_FREE-bank* speed) 5) f28-14))
|
||||
(+! (-> arg1 z) (* (/ (-> *CAM_FREE-bank* speed) 5) f30-14)))
|
||||
((cpad-hold? arg3 l2)
|
||||
(+! (-> arg1 x) (* f28-14 (-> *CAM_FREE-bank* speed)))
|
||||
(+! (-> arg1 y) (* f26-0 (-> *CAM_FREE-bank* speed)))
|
||||
@@ -251,6 +253,7 @@
|
||||
(up vector :inline)
|
||||
(tm matrix :inline)))
|
||||
|
||||
|
||||
(defun cam-free-floating-move ((arg0 matrix) (arg1 vector) (arg2 vector) (arg3 int))
|
||||
(if (logtest? (-> *cpad-list* cpads arg3 valid) 128) (return (the-as vector #f)))
|
||||
(if (= *master-mode* 'menu) (return (the-as vector #f)))
|
||||
@@ -298,12 +301,14 @@
|
||||
(orbit-off vector :inline)
|
||||
(radius-lerp float)))
|
||||
|
||||
|
||||
(deftype CAM_ORBIT-bank (basic)
|
||||
((RADIUS_MAX float)
|
||||
(RADIUS_MIN float)
|
||||
(TARGET_OFF_ADJUST float)
|
||||
(ORBIT_OFF_ADJUST float)))
|
||||
|
||||
|
||||
(define *CAM_ORBIT-bank*
|
||||
(new 'static 'CAM_ORBIT-bank :RADIUS_MAX 61440.0 :RADIUS_MIN 409.6 :TARGET_OFF_ADJUST 81.92 :ORBIT_OFF_ADJUST 81.92))
|
||||
|
||||
|
||||
@@ -245,6 +245,7 @@
|
||||
(max-fov float)
|
||||
(min-fov float)))
|
||||
|
||||
|
||||
(define *CAM_EYE-bank*
|
||||
(new 'static 'cam-eye-bank :rot-speed 364.0889 :max-degrees 12743.111 :max-fov 11650.845 :min-fov 6189.511))
|
||||
|
||||
@@ -353,6 +354,7 @@
|
||||
((rot-speed float)
|
||||
(tilt-degrees float)))
|
||||
|
||||
|
||||
(define *CAM_BILLY-bank* (new 'static 'cam-billy-bank :rot-speed 364.0889 :tilt-degrees -1820.4445))
|
||||
|
||||
(defstate cam-billy (camera-slave)
|
||||
@@ -748,6 +750,7 @@
|
||||
((los-coll-rad meters)
|
||||
(los-coll-rad2 meters)))
|
||||
|
||||
|
||||
(define *CAM_STRING-bank* (new 'static 'cam-string-bank :los-coll-rad (meters 1) :los-coll-rad2 (meters 0.5)))
|
||||
|
||||
(defun cam-string-find-position-rel! ((arg0 vector))
|
||||
@@ -817,6 +820,7 @@
|
||||
(lat-dist float)
|
||||
(vert-dist float)))
|
||||
|
||||
|
||||
(deftype collide-los-dist-info (structure)
|
||||
((min-par float)
|
||||
(max-par float)
|
||||
@@ -828,6 +832,7 @@
|
||||
(max-vn float)
|
||||
(count int32)))
|
||||
|
||||
|
||||
(defun dist-info-init ((arg0 collide-los-dist-info))
|
||||
(set! (-> arg0 min-par) 1.0)
|
||||
(set! (-> arg0 max-par) 0.0)
|
||||
@@ -893,6 +898,7 @@
|
||||
(straddle collide-los-dist-info :inline)
|
||||
(lateral-valid symbol)))
|
||||
|
||||
|
||||
(defun los-cw-ccw ((arg0 (inline-array collide-cache-tri))
|
||||
(arg1 vector)
|
||||
(arg2 vector)
|
||||
@@ -1364,13 +1370,13 @@
|
||||
(f0-2 (/ (- (vector-length (-> self view-flat)) (-> self string-min-val z))
|
||||
(- (-> self string-max-val z) (-> self string-min-val z))))
|
||||
(f30-0 (-> self view-off-param)))
|
||||
(if (-> self have-phony-joystick) (set! f28-0 (* 0.05 (-> self phony-joystick-y))))
|
||||
(if (-> self have-phony-joystick) (set! f28-0 (/ (-> self phony-joystick-y) 20)))
|
||||
(if (and (-> *camera* being-attacked) (not (time-elapsed? (-> *camera* attack-start) (seconds 0.25)))) (set! f28-0 0.05))
|
||||
(if (!= f28-0 0.0) (logior! (-> self options) 256))
|
||||
(let ((f26-0 (fmin 1.0 f0-2)))
|
||||
(let ((f0-3 f26-0))
|
||||
(when (< f26-0 0.0)
|
||||
(let ((f0-6 (/ (- (-> self string-min-val z) (vector-length (-> self view-flat))) (* 0.5 (-> self string-min-val z)))))
|
||||
(let ((f0-6 (/ (- (-> self string-min-val z) (vector-length (-> self view-flat))) (/ (-> self string-min-val z) 2))))
|
||||
(set! f0-3 (fmin 0.75 f0-6))))
|
||||
(let ((f1-10 (-> self string-min-val y))
|
||||
(f2-3 (-> self string-max-val y)))
|
||||
@@ -1729,6 +1735,7 @@
|
||||
(max-y meters)
|
||||
(min-y meters)))
|
||||
|
||||
|
||||
(define *CAM_STICK-bank*
|
||||
(new 'static 'cam-stick-bank :max-z (meters 30) :min-z (meters 5) :max-y (meters 15) :min-y (meters 2)))
|
||||
|
||||
@@ -1866,6 +1873,7 @@
|
||||
(max-y meters)
|
||||
(min-y meters)))
|
||||
|
||||
|
||||
(define *CAM_BIKE-bank*
|
||||
(new 'static 'cam-bike-bank :max-z (meters 6) :min-z (meters 10) :max-y (meters 3) :min-y (meters 5)))
|
||||
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
;; Once the camera's position and orientation has been calculated,
|
||||
;; the camera and visibility outputs are updated in this file.
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(defun plane-from-points ((arg0 (inline-array plane)) (arg1 vector) (arg2 vector) (arg3 vector) (arg4 int))
|
||||
"Get a plane that contains the 3 given points."
|
||||
(let ((s4-0 (new 'stack-no-clear 'vector)))
|
||||
@@ -127,7 +129,7 @@
|
||||
(if (< (-> s4-0 length) (-> s4-0 from-bsp current-leaf-idx)) (set! v1-32 #f)))
|
||||
;; see if we want adj vis.
|
||||
(when s3-0
|
||||
(set! a0-16 (nonzero? (logand (shl #x8000 16) (-> s3-0 flags))))
|
||||
(set! a0-16 (logtest? (shl #x8000 16) (-> s3-0 flags)))
|
||||
(if (< (-> s3-0 length) (-> s3-0 from-bsp current-leaf-idx)) (set! a0-16 #f)))
|
||||
v1-32 ;; this is the cond condition, and is if we want the self vis.
|
||||
))
|
||||
@@ -252,10 +254,10 @@
|
||||
(new 'static 'rgba :r #xff :a #x80))
|
||||
(format *stdcon*
|
||||
"~f ~f ~f ~f~%"
|
||||
(* 0.00024414062 (-> s5-1 info bsphere x))
|
||||
(* 0.00024414062 (-> s5-1 info bsphere y))
|
||||
(* 0.00024414062 (-> s5-1 info bsphere z))
|
||||
(* 0.00024414062 (-> s5-1 info bsphere w)))))))
|
||||
(/ (-> s5-1 info bsphere x) METER_LENGTH)
|
||||
(/ (-> s5-1 info bsphere y) METER_LENGTH)
|
||||
(/ (-> s5-1 info bsphere z) METER_LENGTH)
|
||||
(/ (-> s5-1 info bsphere w) METER_LENGTH))))))
|
||||
(update-math-camera *math-camera* (-> *setting-control* current video-mode) (-> *setting-control* current aspect-ratio))
|
||||
(update! *camera-smush-control*)
|
||||
(cond
|
||||
|
||||
@@ -122,7 +122,7 @@
|
||||
(cond
|
||||
((>= arg0 1.0) 1.0)
|
||||
((>= 0.0 arg0) 0.0)
|
||||
((>= 0.25 arg0) (* 0.5 arg0))
|
||||
((>= 0.25 arg0) (/ arg0 2))
|
||||
((>= arg0 0.75) (- 1.0 (* 0.5 (- 1.0 arg0))))
|
||||
(else (+ 0.125 (* 1.5 (+ -0.25 arg0))))))
|
||||
|
||||
@@ -404,7 +404,7 @@
|
||||
(let ((s3-0 (new 'stack-no-clear 'vector)))
|
||||
(vector-! s3-0 (the-as vector (-> this point (-> this used-point))) (the-as vector (-> this point (-> this end-point))))
|
||||
(let* ((f0-0 (vector-length s3-0))
|
||||
(f1-1 (* 0.33333334 (- 1.5 (* 0.00024414062 f0-0)))))
|
||||
(f1-1 (* 0.33333334 (- 1.5 (/ f0-0 METER_LENGTH)))))
|
||||
0.0
|
||||
(let* ((f1-2 (fmax 0.0 f1-1))
|
||||
(f30-0 (+ 0.3 f1-2))
|
||||
@@ -424,7 +424,7 @@
|
||||
(the-as vector (+ (the-as uint (-> this point 0 direction)) (* 48 s1-0)))
|
||||
(the-as vector (+ (the-as uint (-> this point 0 direction)) (* 48 v1-8))))
|
||||
(let* ((f0-4 (vector-normalize-ret-len! s2-0 1.0))
|
||||
(f0-5 (* 0.5 f0-4))
|
||||
(f0-5 (/ f0-4 2))
|
||||
(f26-0 (* (fmin 1.0 f0-5) f30-0 (vector-dot arg0 s2-0))))
|
||||
(let ((f2-7 (vector-dot s2-0 s3-0)))
|
||||
(cond
|
||||
@@ -456,7 +456,7 @@
|
||||
0.0
|
||||
0.0
|
||||
(let* ((f1-1 (- f1-0 (* f0-0 (-> this point v1-0 tp-length))))
|
||||
(f2-5 (* 0.1 f1-1))
|
||||
(f2-5 (/ f1-1 10))
|
||||
(f2-8 (* (fmin arg1 (- f2-5 (-> this max-move))) (-> *display* time-adjust-ratio))))
|
||||
(set! (-> this max-move) (fmin arg2 (+ (-> this max-move) f2-8)))))
|
||||
(set! (-> this max-move) (fmax 0.4096 (-> this max-move)))
|
||||
@@ -471,7 +471,7 @@
|
||||
(tracking-spline-method-19 this (* (-> this max-move) (-> *display* time-adjust-ratio)) arg0 s4-0)
|
||||
(tracking-spline-method-14 this s4-0)
|
||||
(dotimes (s3-0 63)
|
||||
(tracking-spline-method-18 this (* 0.015625 (-> this sample-len)) arg0 s4-0))
|
||||
(tracking-spline-method-18 this (/ (-> this sample-len) 64) arg0 s4-0))
|
||||
(vector-float*! arg0 arg0 0.015625)
|
||||
(let ((a2-3 (-> s4-0 cur-pt)))
|
||||
(set! (-> this debug-last-point) a2-3)
|
||||
@@ -737,7 +737,7 @@
|
||||
(f0-20 (* f0-19 f0-19)))
|
||||
(vector-! s5-1 s5-1 (-> arg0 follow-off))
|
||||
(vector-float*! s5-1 s5-1 f0-20))
|
||||
(+! (-> arg0 follow-blend) (* 0.016666668 (-> *display* time-adjust-ratio)))
|
||||
(+! (-> arg0 follow-blend) (/ (-> *display* time-adjust-ratio) 60))
|
||||
(vector+! (-> arg0 follow-off) (-> arg0 follow-off) s5-1))
|
||||
(else (set! (-> arg0 follow-off quad) (-> s5-1 quad)))))
|
||||
(vector+! (-> arg0 follow-pt) (-> *camera* tpos-curr-adj) (-> arg0 follow-off))
|
||||
@@ -812,7 +812,8 @@
|
||||
(quaternion-normalize! gp-0)
|
||||
(if (< (-> gp-0 w) 0.0) (quaternion-negate! gp-0 gp-0))
|
||||
(let ((f28-0 (acos (-> gp-0 w))))
|
||||
(if (< (* 0.25 (-> *display* time-adjust-ratio) f28-0) f30-0) (set! f30-0 (* 0.25 (-> *display* time-adjust-ratio) f28-0)))
|
||||
(if (< (* (/ (-> *display* time-adjust-ratio) 4) f28-0) f30-0)
|
||||
(set! f30-0 (* (/ (-> *display* time-adjust-ratio) 4) f28-0)))
|
||||
(cond
|
||||
((< (-> gp-0 w) 0.9999999) (quaternion-float*! gp-0 gp-0 (/ (sin f30-0) (sin f28-0))) (set! (-> gp-0 w) (cos f30-0)))
|
||||
(else (quaternion-identity! gp-0))))))
|
||||
@@ -839,7 +840,7 @@
|
||||
(let ((f28-0 (vector-dot s3-0 (the-as vector (-> arg0 vector)))))
|
||||
(set! sv-128 s2-0)
|
||||
(set! sv-112 (-> arg0 vector))
|
||||
(let ((f0-6 (* 0.8 (tan (* 0.5 arg2))))) (.lvf vf1 (&-> sv-112 0 quad)) (let ((v1-6 f0-6)) (.mov vf2 v1-6)))
|
||||
(let ((f0-6 (* 0.8 (tan (/ arg2 2))))) (.lvf vf1 (&-> sv-112 0 quad)) (let ((v1-6 f0-6)) (.mov vf2 v1-6)))
|
||||
(.add.x.vf vf1 vf0 vf0 :mask #b1000)
|
||||
(.mul.x.vf vf1 vf1 vf2 :mask #b111)
|
||||
(.svf (&-> sv-128 quad) vf1)
|
||||
@@ -859,7 +860,7 @@
|
||||
(let ((f28-1 (vector-dot s3-0 (-> arg0 vector 1))))
|
||||
(set! sv-160 s2-0)
|
||||
(set! sv-144 (-> arg0 vector 1))
|
||||
(let ((f0-15 (* 0.525 (tan (* 0.5 arg2))))) (.lvf vf1 (&-> sv-144 quad)) (let ((v1-23 f0-15)) (.mov vf2 v1-23)))
|
||||
(let ((f0-15 (* 0.525 (tan (/ arg2 2))))) (.lvf vf1 (&-> sv-144 quad)) (let ((v1-23 f0-15)) (.mov vf2 v1-23)))
|
||||
(.add.x.vf vf1 vf0 vf0 :mask #b1000)
|
||||
(.mul.x.vf vf1 vf1 vf2 :mask #b111)
|
||||
(.svf (&-> sv-160 quad) vf1)
|
||||
@@ -877,7 +878,7 @@
|
||||
(let ((f28-2 (vector-dot s3-0 (-> arg0 vector 1))))
|
||||
(let ((s0-1 s2-0))
|
||||
(set! sv-176 (-> arg0 vector 1))
|
||||
(let ((f0-25 (* 0.525 (tan (* 0.5 arg2))))) (vector-float*! s0-1 sv-176 f0-25)))
|
||||
(let ((f0-25 (* 0.525 (tan (/ arg2 2))))) (vector-float*! s0-1 sv-176 f0-25)))
|
||||
(vector+! s2-0 s2-0 (-> arg0 vector 2))
|
||||
(vector-normalize! s2-0 1.0)
|
||||
(let ((f0-27 (vector-dot s2-0 (-> arg0 vector 1))))
|
||||
@@ -962,7 +963,7 @@
|
||||
(set! (-> arg0 underwater-blend target) 0.0))
|
||||
(set! sv-240 vector-into-frustum-nosmooth!)
|
||||
(set! sv-256 s5-0)
|
||||
(let ((a2-5 (lerp-clamp arg3 (* 0.25 arg3) (-> arg0 underwater-blend value)))) (sv-240 sv-256 arg1 a2-5))
|
||||
(let ((a2-5 (lerp-clamp arg3 (/ arg3 4) (-> arg0 underwater-blend value)))) (sv-240 sv-256 arg1 a2-5))
|
||||
(cond
|
||||
(arg4 (slave-matrix-blend-2 (-> arg0 inv-mat) arg2 s1-0 s5-0))
|
||||
(else
|
||||
|
||||
@@ -262,7 +262,7 @@
|
||||
(let ((f0-0 (misty-ambush-height arg0)))
|
||||
(cond
|
||||
((< f0-0 (-> arg0 y)) (/ (- (-> arg0 y) f0-0) arg1))
|
||||
(else (format 0 "WARNING: ~%height = ~f, pos.y = ~f" (* 0.00024414062 f0-0) (* 0.00024414062 (-> arg0 y))) -1.0))))
|
||||
(else (format 0 "WARNING: ~%height = ~f, pos.y = ~f" (/ f0-0 METER_LENGTH) (/ (-> arg0 y) METER_LENGTH)) -1.0))))
|
||||
|
||||
(defun pke-collide-test ()
|
||||
0
|
||||
|
||||
@@ -389,7 +389,7 @@
|
||||
;; subtract off the two radius. this is now the offset between the "closest" points (and is negative)
|
||||
(let ((f1-2 (- (- (vector-length gp-1) (-> s3-0 prim-core world-sphere w)) (-> s4-0 prim-core world-sphere w))))
|
||||
;; this offset is the radius, minus half the overlap distance
|
||||
(vector-normalize! gp-1 (+ (-> s4-0 prim-core world-sphere w) (* 0.5 f1-2))))
|
||||
(vector-normalize! gp-1 (+ (-> s4-0 prim-core world-sphere w) (/ f1-2 2))))
|
||||
;; so add it to s4's origin to get to the halfway point
|
||||
(vector+! arg0 gp-1 (the-as vector (-> s4-0 prim-core))))
|
||||
arg0)
|
||||
|
||||
@@ -80,13 +80,13 @@
|
||||
|
||||
;; these calc-terminal functions are unused.
|
||||
(defun calc-terminal-vel ((arg0 float) (arg1 float) (arg2 float))
|
||||
(- (* (/ (- (* 0.016666668 arg0) arg1) arg2) (- 1.0 arg2)) arg1))
|
||||
(- (* (/ (- (/ arg0 60) arg1) arg2) (- 1.0 arg2)) arg1))
|
||||
|
||||
(defun calc-terminal2-vel ((arg0 float) (arg1 float) (arg2 float) (arg3 float))
|
||||
(let ((f0-4 (sqrtf (/ (- (* 0.016666668 arg0) arg1) arg2)))) (- f0-4 (+ arg1 (* arg2 (* f0-4 f0-4))))))
|
||||
(let ((f0-4 (sqrtf (/ (- (/ arg0 60) arg1) arg2)))) (- f0-4 (+ arg1 (* arg2 (* f0-4 f0-4))))))
|
||||
|
||||
(defun calc-terminal4-vel ((arg0 float) (arg1 float) (arg2 float))
|
||||
(let ((f0-5 (sqrtf (sqrtf (/ (- (* 0.016666668 arg0) arg1) arg2))))) (- f0-5 (+ arg1 (* arg2 (* f0-5 f0-5 f0-5 f0-5))))))
|
||||
(let ((f0-5 (sqrtf (sqrtf (/ (- (/ arg0 60) arg1) arg2))))) (- f0-5 (+ arg1 (* arg2 (* f0-5 f0-5 f0-5 f0-5))))))
|
||||
|
||||
(defmethod print ((this surface))
|
||||
;; seems this format string is wrong.
|
||||
@@ -930,6 +930,7 @@
|
||||
:alignv 1.0
|
||||
:slope-up-traction 1.0
|
||||
:align-speed 1.0)))
|
||||
;; og:preserve-this
|
||||
(define *stone-surface* v1-41)
|
||||
(set! (-> v1-41 mult-hook) (the-as (function surface surface surface int none) nothing))
|
||||
(set! (-> v1-41 touch-hook) nothing)
|
||||
|
||||
@@ -47,6 +47,7 @@
|
||||
(initialize (_type_) _type_)
|
||||
(initialize-params (_type_ time-frame float) none)))
|
||||
|
||||
|
||||
(defmethod initialize-params ((this collectable) (arg0 time-frame) (arg1 float))
|
||||
(logclear! (-> this mask) (process-mask crate enemy platform ambient))
|
||||
(logior! (-> this mask) (process-mask collectable))
|
||||
@@ -101,6 +102,7 @@
|
||||
(animate (_type_) none)
|
||||
(blocked () _type_ :state)))
|
||||
|
||||
|
||||
(defmethod initialize ((this eco-collectable))
|
||||
(stack-size-set! (-> this main-thread) 192) ;; og:preserve-this hack increased from 128
|
||||
(logior! (-> this mask) (process-mask actor-pause))
|
||||
@@ -360,7 +362,7 @@
|
||||
(when (and (>= 0.0 (-> self root transv y)) (>= (-> self base y) (-> self root trans y)))
|
||||
(set! (-> self root trans y) (-> self base y))
|
||||
(cond
|
||||
((< (-> self root transv y) -8192.0) (set! (-> self root transv y) (* -0.5 (-> self root transv y))))
|
||||
((< (-> self root transv y) -8192.0) (set! (-> self root transv y) (/ (-> self root transv y) -2)))
|
||||
(else
|
||||
(vector-reset! (-> self root transv))
|
||||
(logclear! (-> self flags) (collectable-flags trans))
|
||||
@@ -535,6 +537,7 @@
|
||||
|
||||
(deftype eco (eco-collectable) ())
|
||||
|
||||
|
||||
(defmethod animate ((this eco))
|
||||
(let ((a0-1 (-> this part))
|
||||
(a1-0 (-> this root root-prim prim-core)))
|
||||
@@ -573,24 +576,28 @@
|
||||
|
||||
(deftype eco-yellow (eco) ())
|
||||
|
||||
|
||||
(defmethod init-from-entity! ((this eco-yellow) (arg0 entity-actor))
|
||||
(initialize-eco this arg0 (pickup-type eco-yellow) (-> *FACT-bank* eco-single-inc))
|
||||
(none))
|
||||
|
||||
(deftype eco-red (eco) ())
|
||||
|
||||
|
||||
(defmethod init-from-entity! ((this eco-red) (arg0 entity-actor))
|
||||
(initialize-eco this arg0 (pickup-type eco-red) (-> *FACT-bank* eco-single-inc))
|
||||
(none))
|
||||
|
||||
(deftype eco-blue (eco) ())
|
||||
|
||||
|
||||
(defmethod init-from-entity! ((this eco-blue) (arg0 entity-actor))
|
||||
(initialize-eco this arg0 (pickup-type eco-blue) (-> *FACT-bank* eco-single-inc))
|
||||
(none))
|
||||
|
||||
(deftype health (eco-collectable) ())
|
||||
|
||||
|
||||
(defmethod animate ((this health))
|
||||
(let ((a0-1 (-> this part))
|
||||
(a1-0 (-> this root root-prim prim-core)))
|
||||
@@ -605,6 +612,7 @@
|
||||
|
||||
(deftype eco-pill (eco-collectable) ())
|
||||
|
||||
|
||||
(defmethod animate ((this eco-pill))
|
||||
(let ((a0-1 (-> this part))
|
||||
(a1-0 (-> this root root-prim prim-core)))
|
||||
@@ -661,6 +669,7 @@
|
||||
|
||||
(deftype money (eco-collectable) ())
|
||||
|
||||
|
||||
(defmethod run-logic? ((this money))
|
||||
(or (not (logtest? (-> this mask) (process-mask actor-pause)))
|
||||
(or (and (nonzero? (-> this draw))
|
||||
@@ -814,11 +823,12 @@
|
||||
(:states (fuel-cell-clone-anim handle)
|
||||
(fuel-cell-spline-slider handle float float)))
|
||||
|
||||
|
||||
(defun fuel-cell-pick-anim ((arg0 process-drawable))
|
||||
(let* ((gp-0 (-> arg0 entity extra trans))
|
||||
(a0-2 (res-lump-value (-> arg0 entity) 'movie-mask uint128 :time (the-as float -1000000000.0)))
|
||||
(a1-1 8)
|
||||
(v1-6 (abs (the int (+ (* 0.00024414062 (-> gp-0 x)) (* 0.00024414062 (-> gp-0 z))))))
|
||||
(v1-6 (abs (the int (+ (/ (-> gp-0 x) METER_LENGTH) (/ (-> gp-0 z) METER_LENGTH)))))
|
||||
(v1-7 (mod v1-6 a1-1)))
|
||||
(while (logtest? a0-2 (ash 1 v1-7))
|
||||
(set! v1-7 (mod (+ v1-7 1) a1-1)))
|
||||
@@ -1220,6 +1230,7 @@
|
||||
(deftype buzzer (eco-collectable)
|
||||
((victory-anim spool-anim)))
|
||||
|
||||
|
||||
(defmethod animate ((this buzzer))
|
||||
(quaternion-rotate-y! (-> this root quat) (-> this root quat) (* 40049.777 (seconds-per-frame)))
|
||||
(let ((a0-2 (-> this skel root-channel 0)))
|
||||
@@ -1565,6 +1576,7 @@
|
||||
(:states
|
||||
ecovalve-idle))
|
||||
|
||||
|
||||
(defskelgroup *ecovalve-sg*
|
||||
ecovalve
|
||||
ecovalve-geo-jg
|
||||
@@ -1636,6 +1648,7 @@
|
||||
(vent-pickup handle)
|
||||
vent-wait-for-touch))
|
||||
|
||||
|
||||
(defmethod initialize ((this vent) (arg0 entity-actor) (arg1 pickup-type))
|
||||
(stack-size-set! (-> this main-thread) 128)
|
||||
(logior! (-> this mask) (process-mask actor-pause))
|
||||
@@ -1777,24 +1790,28 @@
|
||||
|
||||
(deftype ventyellow (vent) ())
|
||||
|
||||
|
||||
(defmethod init-from-entity! ((this ventyellow) (arg0 entity-actor))
|
||||
(initialize this arg0 (pickup-type eco-yellow))
|
||||
(none))
|
||||
|
||||
(deftype ventred (vent) ())
|
||||
|
||||
|
||||
(defmethod init-from-entity! ((this ventred) (arg0 entity-actor))
|
||||
(initialize this arg0 (pickup-type eco-red))
|
||||
(none))
|
||||
|
||||
(deftype ventblue (vent) ())
|
||||
|
||||
|
||||
(defmethod init-from-entity! ((this ventblue) (arg0 entity-actor))
|
||||
(initialize this arg0 (pickup-type eco-blue))
|
||||
(none))
|
||||
|
||||
(deftype ecovent (vent) ())
|
||||
|
||||
|
||||
(defmethod init-from-entity! ((this ecovent) (arg0 entity-actor))
|
||||
(initialize this arg0 (pickup-type eco-blue))
|
||||
(none))
|
||||
|
||||
@@ -862,9 +862,9 @@
|
||||
|
||||
(defmethod smush-update! ((this crate))
|
||||
(let ((f0-0 (update! (-> this smush))))
|
||||
(set! (-> this root scale x) (+ 1.0 (* -0.5 f0-0)))
|
||||
(set! (-> this root scale x) (+ 1.0 (/ f0-0 -2)))
|
||||
(set! (-> this root scale y) (+ 1.0 f0-0))
|
||||
(set! (-> this root scale z) (+ 1.0 (* -0.5 f0-0))))
|
||||
(set! (-> this root scale z) (+ 1.0 (/ f0-0 -2))))
|
||||
0
|
||||
(none))
|
||||
|
||||
@@ -954,7 +954,7 @@
|
||||
(+! (-> self root trans y) (* f30-0 (seconds-per-frame)))
|
||||
(when (< (-> self root trans y) (-> self base y))
|
||||
(set! (-> self root trans y) (-> self base y))
|
||||
(set! f30-0 (* -0.5 f30-0))
|
||||
(set! f30-0 (/ f30-0 -2))
|
||||
(if (< (fabs f30-0) 16384.0) (set! f30-0 0.0)))
|
||||
(crate-post)
|
||||
(ja-post)
|
||||
|
||||
@@ -337,7 +337,7 @@
|
||||
(case (-> self look)
|
||||
((32)
|
||||
(set! (-> gp-0 global-scale) (* 4096.0 (* 1.5 (+ 1.0 f30-0))))
|
||||
(set! (-> gp-0 individual-normal-scale) (+ 0.5 (* 0.5 f30-0))))
|
||||
(set! (-> gp-0 individual-normal-scale) (+ 0.5 (/ f30-0 2))))
|
||||
(else
|
||||
(set! (-> gp-0 global-scale) (* 4096.0 (* 3.0 (+ 1.0 f30-0))))
|
||||
(set! (-> gp-0 individual-normal-scale) (+ 0.5 (* 0.5 f30-0))))))))
|
||||
(set! (-> gp-0 individual-normal-scale) (+ 0.5 (/ f30-0 2))))))))
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
(when (and *target*
|
||||
(< (vector-vector-distance (-> self root trans) (-> *target* control unknown-vector90)) (-> self range))
|
||||
(logtest? (-> *target* control root-prim prim-core action) (collide-action edgegrab-possible))
|
||||
(< (-> *target* control unknown-vector90 y) (+ (-> self root trans y) (* 0.5 (-> self range)))))
|
||||
(< (-> *target* control unknown-vector90 y) (+ (-> self root trans y) (/ (-> self range) 2))))
|
||||
(if (send-event *target* 'pole-grab self) (go swingpole-active)))
|
||||
(suspend))))
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
(defmethod eval-position! ((this trajectory) (time float) (result vector))
|
||||
(vector+float*! result (-> this initial-position) (-> this initial-velocity) time)
|
||||
(+! (-> result y) (* 0.5 time time (-> this gravity)))
|
||||
(+! (-> result y) (* (/ time 2) time (-> this gravity)))
|
||||
result)
|
||||
|
||||
(defmethod relocate ((this nav-enemy) (offset int))
|
||||
@@ -876,14 +876,14 @@ nav-enemy-default-event-handler
|
||||
(vector-xz-normalize! s1-1 1.0)
|
||||
(vector-xz-normalize! s2-2 1.0)
|
||||
(logclear! (-> self nav-enemy-flags) (nav-enemy-flags standing-jump drop-jump))
|
||||
(if (or (>= (* 0.5 (-> self nav-info run-travel-speed)) f24-0) (>= (cos 3640.889) (vector-dot s1-1 s2-2)))
|
||||
(if (or (>= (/ (-> self nav-info run-travel-speed) 2) f24-0) (>= (cos 3640.889) (vector-dot s1-1 s2-2)))
|
||||
(logior! (-> self nav-enemy-flags) (nav-enemy-flags standing-jump))))
|
||||
(if (or (and (< f26-0 0.0) (< f28-0 (fabs f26-0))) (and (< (fabs f26-0) 12288.0) (< f28-0 20480.0)))
|
||||
(logior! (-> self nav-enemy-flags) (nav-enemy-flags drop-jump))))
|
||||
(when (and arg1 (logtest? (-> self nav-enemy-flags) (nav-enemy-flags drop-jump)))
|
||||
(logclear! (-> self nav-enemy-flags) (nav-enemy-flags standing-jump))
|
||||
(set! f30-0 2048.0))
|
||||
(setup-from-to-height! (-> self jump-trajectory) s4-0 arg0 f30-0 (* 0.000011111111 arg4)))
|
||||
(setup-from-to-height! (-> self jump-trajectory) s4-0 arg0 f30-0 (/ arg4 90000)))
|
||||
(set! (-> self nav extra-nav-sphere quad) (-> arg0 quad))
|
||||
(set! (-> self nav extra-nav-sphere w) (-> self collide-info nav-radius))
|
||||
(logior! (-> self collide-info nav-flags) (nav-flags navf1))
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
(:methods
|
||||
(notice-blue (handle) _type_ :state :overlay-at wad)))
|
||||
|
||||
|
||||
(defskelgroup *plat-eco-unlit-sg*
|
||||
plat-eco
|
||||
plat-eco-lod0-jg
|
||||
@@ -130,7 +131,7 @@
|
||||
(sync-now! (-> self sync) (-> self sync-linear-val))
|
||||
(set! (-> self sync-offset-faux) (-> self sync offset))
|
||||
(let* ((f0-3 (the float (-> self sync period)))
|
||||
(f1-1 (* 0.5 f0-3)))
|
||||
(f1-1 (/ f0-3 2)))
|
||||
(if (< f1-1 (- (-> self sync-offset-dest) (-> self sync-offset-faux))) (+! (-> self sync-offset-faux) f0-3))
|
||||
(if (< f1-1 (- (-> self sync-offset-faux) (-> self sync-offset-dest)))
|
||||
(set! (-> self sync-offset-faux) (- (-> self sync-offset-faux) f0-3))))
|
||||
|
||||
@@ -201,9 +201,11 @@
|
||||
(platform symbol)
|
||||
(sound-name string)))
|
||||
|
||||
|
||||
(deftype rigid-body-control-point-inline-array (inline-array-class)
|
||||
((data rigid-body-control-point :inline :dynamic :offset 16)))
|
||||
|
||||
|
||||
(set! (-> rigid-body-control-point-inline-array heap-base) (the-as uint 48))
|
||||
|
||||
(deftype rigid-body-platform (process-drawable)
|
||||
@@ -240,11 +242,12 @@
|
||||
(rigid-body-platform-method-33 (_type_) object)
|
||||
(rigid-body-platform-method-34 (_type_) none)))
|
||||
|
||||
(defmethod relocate ((this rigid-body-platform) (arg0 int))
|
||||
|
||||
(defmethod relocate ((this rigid-body-platform) (offset int))
|
||||
(if (nonzero? (-> this control-point-array))
|
||||
(set! (-> this control-point-array)
|
||||
(the-as rigid-body-control-point-inline-array (+ (the-as int (-> this control-point-array)) arg0))))
|
||||
(call-parent-method this arg0))
|
||||
(the-as rigid-body-control-point-inline-array (+ (the-as int (-> this control-point-array)) offset))))
|
||||
(call-parent-method this offset))
|
||||
|
||||
(defmethod rigid-body-platform-method-22 ((this rigid-body-platform) (arg0 vector) (arg1 float))
|
||||
(let ((v1-0 (-> this water-anim)))
|
||||
@@ -328,7 +331,7 @@
|
||||
(+! (-> this sim-time-remaining) (* 0.0033333334 (the float (- (current-time) (-> *display* old-base-frame-counter)))))
|
||||
(let ((f30-0 (* DISPLAY_FPS_RATIO 0.016666668)) ;; og:preserve-this changed for high fps
|
||||
(f28-0 (* 0.0033333334 (the float (logand #xffffff (current-time))))))
|
||||
(while (>= (-> this sim-time-remaining) (* 0.5 f30-0))
|
||||
(while (>= (-> this sim-time-remaining) (/ f30-0 2))
|
||||
(clear-force-torque! (-> this rbody))
|
||||
(rigid-body-platform-method-23 this f28-0)
|
||||
(rigid-body-method-10 (-> this rbody) f30-0)
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
(bridge-end-to-end-len float)
|
||||
(rest-state symbol)))
|
||||
|
||||
|
||||
(define *ropebridge-70-rest-state*
|
||||
(new 'static
|
||||
'inline-array
|
||||
@@ -480,6 +481,7 @@
|
||||
(extra-force vector :inline))
|
||||
:pack-me)
|
||||
|
||||
|
||||
(deftype ropebridge (process-drawable)
|
||||
((root collide-shape :override)
|
||||
(subtype uint64)
|
||||
@@ -508,6 +510,7 @@
|
||||
(:states
|
||||
ropebridge-idle))
|
||||
|
||||
|
||||
(defskelgroup *ropebridge-32-sg*
|
||||
ropebridge-32
|
||||
ropebridge-32-lod0-jg
|
||||
@@ -889,7 +892,7 @@
|
||||
(set-time! (-> this agitated-time-stamp))
|
||||
(set-time! (-> this bonk-time-stamp))
|
||||
(set-time! (-> this attack-flop-time-stamp))
|
||||
(set-vector! (-> this extra-trans) 0.0 0.0 (- (* 0.5 (-> this tuning bridge-end-to-end-len))) 1.0)
|
||||
(set-vector! (-> this extra-trans) 0.0 0.0 (- (/ (-> this tuning bridge-end-to-end-len) 2)) 1.0)
|
||||
(set! (-> this do-physics?) #t)
|
||||
(let ((a0-13 (new 'process 'collide-shape this (collide-list-enum hit-by-player))))
|
||||
(set! (-> this root) a0-13)
|
||||
@@ -900,7 +903,7 @@
|
||||
(logior! (-> this skel status) (janim-status inited))
|
||||
(let ((v1-29 (-> this tuning)))
|
||||
(set! (-> this draw bounds w) (-> v1-29 view-frustum-radius))
|
||||
(set! (-> this sleep-dist) (+ 40960.0 (* 0.5 (-> v1-29 bridge-end-to-end-len))))
|
||||
(set! (-> this sleep-dist) (+ 40960.0 (/ (-> v1-29 bridge-end-to-end-len) 2)))
|
||||
(if (or (< 35 (-> v1-29 num-springs)) (< 36 (-> v1-29 num-spring-points)))
|
||||
(format 0 "ERROR: ##########~%Exceeded max # of springs in ropebridge! Stomping memory!~%##########~%")))
|
||||
(set! (-> this skel postbind-function) ropebridge-joint-callback)
|
||||
|
||||
@@ -47,6 +47,7 @@
|
||||
(sound-id sound-id)
|
||||
(enable-patrol basic)))
|
||||
|
||||
|
||||
(defskelgroup *sharkey-sg*
|
||||
sharkey
|
||||
sharkey-lod0-jg
|
||||
@@ -101,7 +102,7 @@ nav-enemy-default-event-handler
|
||||
(let ((f30-0 (-> this water height))
|
||||
(s5-0 (new 'stack-no-clear 'vector)))
|
||||
(let* ((f3-0 (- -36864.0 (-> this collide-info trans y)))
|
||||
(f0-2 (fmax 0.0 (fmin 1.0 (- 1.0 (* 0.00008138021 f3-0))))))
|
||||
(f0-2 (fmax 0.0 (fmin 1.0 (- 1.0 (/ f3-0 (meters 3)))))))
|
||||
(set-vector! (-> this draw color-mult) f0-2 f0-2 f0-2 1.0))
|
||||
(water-control-method-10 (-> this water))
|
||||
(let ((f28-0 (-> this collide-info trans y)))
|
||||
|
||||
@@ -626,7 +626,7 @@
|
||||
(set! (-> *part-id-table* 118 init-specs 4 initial-valuef) (+ 24576.0 f30-1))
|
||||
(set! (-> *part-id-table* 118 init-specs 19 initial-valuef) (+ 49152.0 f30-1))
|
||||
(set! (-> *part-id-table* 118 init-specs 1 initial-valuef) (* 0.0000036621095 f28-0))
|
||||
(set! (-> *part-id-table* 118 init-specs 2 initial-valuef) (* 0.1 f28-0))
|
||||
(set! (-> *part-id-table* 118 init-specs 2 initial-valuef) (/ f28-0 10))
|
||||
(set! (-> *part-id-table* 118 init-specs 13 initial-valuef) 0.7111111)
|
||||
(launch-particles :system *sp-particle-system-3d* (-> *part-id-table* 118) s4-0)
|
||||
(set! (-> *part-id-table* 121 init-specs 1 initial-valuef) (* 0.000004150391 f28-0))
|
||||
@@ -754,7 +754,7 @@
|
||||
(launch-particles (-> *part-id-table* 145) a2-15))
|
||||
(set-time! (-> this drip-time))
|
||||
(logclear! (-> this flags) (water-flags wt15))
|
||||
(seek! (-> this drip-wetness) 0.0 (* 0.001 (-> this drip-speed)))
|
||||
(seek! (-> this drip-wetness) 0.0 (/ (-> this drip-speed) 1000))
|
||||
(set! (-> this drip-speed) (* 1.05 (-> this drip-speed)))
|
||||
(if (= (-> this drip-wetness) 0.0) (set! (-> this drip-height) 0.0)))
|
||||
((time-elapsed? (the-as time-frame (the int (/ (the float (-> this drip-time)) (-> this drip-mult))))
|
||||
@@ -785,9 +785,9 @@
|
||||
(set! (-> *part-id-table* 129 init-specs 12 random-rangef) (* 13.653334 (* -0.075 f0-0)))
|
||||
(set! (-> *part-id-table* 133 init-specs 12 initial-valuef) (* 13.653334 (* -0.15 f0-0)))
|
||||
(set! (-> *part-id-table* 133 init-specs 12 random-rangef) (* 13.653334 (* -0.075 f0-0)))
|
||||
(set! (-> *part-id-table* 131 init-specs 2 initial-valuef) (* 4096.0 (* 0.1 f0-0)))
|
||||
(set! (-> *part-id-table* 131 init-specs 2 initial-valuef) (* 4096.0 (/ f0-0 10)))
|
||||
(set! (-> *part-id-table* 131 init-specs 2 random-rangef) (* 4096.0 (* 0.4 f0-0)))
|
||||
(set! (-> *part-id-table* 131 init-specs 4 initial-valuef) (* 4096.0 (* 0.1 f0-0)))
|
||||
(set! (-> *part-id-table* 131 init-specs 4 initial-valuef) (* 4096.0 (/ f0-0 10)))
|
||||
(set! (-> *part-id-table* 131 init-specs 4 random-rangef) (* 4096.0 (* 0.4 f0-0)))
|
||||
(set! (-> *part-id-table* 131 init-specs 9 initial-valuef) (* 13.653334 (* 1.5 f0-0)))
|
||||
(set! (-> *part-id-table* 131 init-specs 9 random-rangef) (* 13.653334 (* 3.4 f0-0)))
|
||||
@@ -801,23 +801,23 @@
|
||||
(set! (-> *part-id-table* 126 init-specs 9 random-rangef) (* 13.653334 (* 1.4 f0-0)))
|
||||
(set! (-> *part-id-table* 126 init-specs 10 initial-valuef) (* 13.653334 (* 1.5 f0-0)))
|
||||
(set! (-> *part-id-table* 126 init-specs 10 random-rangef) (* 13.653334 (* 1.4 f0-0)))
|
||||
(set! (-> *part-id-table* 127 init-specs 2 initial-valuef) (* 4096.0 (* -0.5 f0-0)))
|
||||
(set! (-> *part-id-table* 127 init-specs 2 initial-valuef) (* 4096.0 (/ f0-0 -2)))
|
||||
(set! (-> *part-id-table* 127 init-specs 2 random-rangef) (* 4096.0 f0-0))
|
||||
(set! (-> *part-id-table* 127 init-specs 3 initial-valuef) (* 4096.0 (* -0.5 f0-0)))
|
||||
(set! (-> *part-id-table* 127 init-specs 3 initial-valuef) (* 4096.0 (/ f0-0 -2)))
|
||||
(set! (-> *part-id-table* 127 init-specs 3 random-rangef) (* 4096.0 f0-0))
|
||||
(set! (-> *part-id-table* 127 init-specs 4 initial-valuef) (* 4096.0 (* 0.5 f0-0)))
|
||||
(set! (-> *part-id-table* 127 init-specs 4 initial-valuef) (* 4096.0 (/ f0-0 2)))
|
||||
(set! (-> *part-id-table* 127 init-specs 4 random-rangef) (* 4096.0 f0-0))
|
||||
(set! (-> *part-id-table* 127 init-specs 6 initial-valuef) (* 4096.0 (* 0.5 f0-0)))
|
||||
(set! (-> *part-id-table* 127 init-specs 6 initial-valuef) (* 4096.0 (/ f0-0 2)))
|
||||
(set! (-> *part-id-table* 127 init-specs 6 random-rangef) (* 4096.0 f0-0))
|
||||
(set! (-> *part-id-table* 127 init-specs 11 initial-valuef) (* 13.653334 (* 1.5 f0-0)))
|
||||
(set! (-> *part-id-table* 127 init-specs 11 random-rangef) (* 13.653334 f0-0))
|
||||
(set! (-> *part-id-table* 127 init-specs 12 initial-valuef) (* 13.653334 (* 1.5 f0-0)))
|
||||
(set! (-> *part-id-table* 127 init-specs 12 random-rangef) (* 13.653334 f0-0))
|
||||
(set! (-> *part-id-table* 132 init-specs 1 initial-valuef) (* 4.0 f0-0))
|
||||
(set! (-> *part-id-table* 132 init-specs 2 initial-valuef) (* 4096.0 (* -0.25 f0-0)))
|
||||
(set! (-> *part-id-table* 132 init-specs 2 random-rangef) (* 4096.0 (* 0.5 f0-0)))
|
||||
(set! (-> *part-id-table* 132 init-specs 3 initial-valuef) (* 4096.0 (* -0.25 f0-0)))
|
||||
(set! (-> *part-id-table* 132 init-specs 3 random-rangef) (* 4096.0 (* 0.5 f0-0)))
|
||||
(set! (-> *part-id-table* 132 init-specs 2 initial-valuef) (* 4096.0 (/ f0-0 -4)))
|
||||
(set! (-> *part-id-table* 132 init-specs 2 random-rangef) (* 4096.0 (/ f0-0 2)))
|
||||
(set! (-> *part-id-table* 132 init-specs 3 initial-valuef) (* 4096.0 (/ f0-0 -4)))
|
||||
(set! (-> *part-id-table* 132 init-specs 3 random-rangef) (* 4096.0 (/ f0-0 2)))
|
||||
(set! (-> *part-id-table* 132 init-specs 10 initial-valuef) (* 13.653334 (* -0.75 f0-0)))
|
||||
(set! (-> *part-id-table* 132 init-specs 10 random-rangef) (* 13.653334 (* 1.5 f0-0)))
|
||||
(set! (-> *part-id-table* 132 init-specs 12 initial-valuef) (* 13.653334 (* -0.75 f0-0)))
|
||||
@@ -849,10 +849,10 @@
|
||||
(set! (-> *part-id-table* 125 init-specs 13 initial-valuef) (* 13.653334 (* -0.3 f0-0)))
|
||||
(set! (-> *part-id-table* 125 init-specs 13 random-rangef) (* 13.653334 (* -0.075 f0-0)))
|
||||
(set! (-> *part-id-table* 124 init-specs 2 initial-valuef) (* 4096.0 (* 1.2 f0-0)))
|
||||
(set! (-> *part-id-table* 124 init-specs 2 random-rangef) (* 4096.0 (* 0.2 f0-0)))
|
||||
(set! (-> *part-id-table* 124 init-specs 2 random-rangef) (* 4096.0 (/ f0-0 5)))
|
||||
(set! (-> *part-id-table* 124 init-specs 3 initial-valuef) (* 4096.0 (* 0.4 f0-0)))
|
||||
(set! (-> *part-id-table* 124 init-specs 3 random-rangef) (* 4096.0 (* 1.2 f0-0)))
|
||||
(set! (-> *part-id-table* 124 init-specs 7 initial-valuef) (* 4096.0 (* 0.2 f0-0)))
|
||||
(set! (-> *part-id-table* 124 init-specs 7 initial-valuef) (* 4096.0 (/ f0-0 5)))
|
||||
(set! (-> *part-id-table* 124 init-specs 7 random-rangef) (* 4096.0 (* 2.2 f0-0)))
|
||||
(set! (-> *part-id-table* 130 init-specs 2 initial-valuef) (* 4096.0 (* 0.3 f0-0)))
|
||||
(set! (-> *part-id-table* 130 init-specs 2 random-rangef) (* 4096.0 (* 0.9 f0-0)))
|
||||
|
||||
@@ -56,10 +56,12 @@
|
||||
(return-int int32))
|
||||
:allow-misaligned)
|
||||
|
||||
|
||||
(deftype list-field (structure)
|
||||
((left int32)
|
||||
(width int32)))
|
||||
|
||||
|
||||
(deftype DISP_LIST-bank (basic)
|
||||
((TV_SPACING int32)
|
||||
(BORDER_WIDTH int32)
|
||||
@@ -73,6 +75,7 @@
|
||||
(BXOFF int32)
|
||||
(BYOFF int32)))
|
||||
|
||||
|
||||
(define *DISP_LIST-bank*
|
||||
(new 'static
|
||||
'DISP_LIST-bank
|
||||
@@ -248,6 +251,7 @@
|
||||
(EDIT_LIST_MIN_WIDTH int32)
|
||||
(EDIT_PICK_X int32)))
|
||||
|
||||
|
||||
(define *ANIM_TESTER-bank*
|
||||
(new 'static
|
||||
'anim-tester-bank
|
||||
@@ -287,6 +291,7 @@
|
||||
(:states
|
||||
anim-tester-process))
|
||||
|
||||
|
||||
(defun anim-tester-num-print ((arg0 basic) (arg1 float))
|
||||
(cond
|
||||
((= arg1 -2.0) (format arg0 "max"))
|
||||
@@ -311,6 +316,7 @@
|
||||
(:methods
|
||||
(new (symbol type int string basic) _type_)))
|
||||
|
||||
|
||||
(defun anim-test-obj-init ((arg0 anim-test-obj) (arg1 list-control))
|
||||
(set! (-> arg0 mesh-geo) #f)
|
||||
(set! (-> arg0 joint-geo) #f)
|
||||
@@ -341,6 +347,7 @@
|
||||
(:methods
|
||||
(new (symbol type int string) _type_)))
|
||||
|
||||
|
||||
(defun anim-test-sequence-init ((arg0 anim-test-sequence) (arg1 anim-test-obj))
|
||||
(set! (-> arg0 list-con listfunc) anim-test-edit-sequence-list-handler)
|
||||
(set! (-> arg0 list-con left) (-> *ANIM_TESTER-bank* EDIT_LIST_X))
|
||||
@@ -371,6 +378,7 @@
|
||||
(:methods
|
||||
(new (symbol type int string) _type_)))
|
||||
|
||||
|
||||
(defmethod new anim-test-seq-item ((allocation symbol) (type-to-make type) (arg0 int) (arg1 string))
|
||||
(let ((t9-0 (method-of-type structure new))
|
||||
(v1-1 type-to-make))
|
||||
@@ -394,6 +402,7 @@
|
||||
(set! (-> arg0 flags) (-> arg1 flags))
|
||||
(let ((v0-0 (-> arg1 parent))) (set! (-> arg0 parent) v0-0) v0-0))
|
||||
|
||||
|
||||
(defun anim-test-obj-item-valid? ((arg0 anim-test-obj) (arg1 anim-test-seq-item))
|
||||
(let ((v1-0 (-> arg0 seq-list)))
|
||||
"return the start of the list"
|
||||
@@ -475,7 +484,7 @@
|
||||
(set! (-> self anim-first) (-> arg0 first-frame))
|
||||
(set! (-> self anim-last) (-> arg0 last-frame))
|
||||
(set! (-> self anim-gspeed) (* 0.01 (the float (-> self speed))))
|
||||
(set! (-> self anim-speed) (* 0.01 (-> self anim-gspeed) (the float (-> arg0 speed))))
|
||||
(set! (-> self anim-speed) (* (/ (-> self anim-gspeed) 100) (the float (-> arg0 speed))))
|
||||
(when (< (-> self anim-speed) 0.0)
|
||||
(set! (-> self anim-first) (-> arg0 last-frame))
|
||||
(set! (-> self anim-last) (-> arg0 first-frame)))
|
||||
|
||||
@@ -106,8 +106,8 @@
|
||||
(('close) (if (and *math-camera* *subdivide-settings*) (set! (-> *subdivide-settings* close 3) (* 4096.0 arg2))))
|
||||
(('far) (if (and *math-camera* *subdivide-settings*) (set! (-> *subdivide-settings* far 3) (* 4096.0 arg2))))))
|
||||
(case arg0
|
||||
(('close) (if (and *math-camera* *subdivide-settings*) (* 0.00024414062 (-> *subdivide-settings* close 3)) arg3))
|
||||
(('far) (if (and *math-camera* *subdivide-settings*) (* 0.00024414062 (-> *subdivide-settings* far 3)) arg3))
|
||||
(('close) (if (and *math-camera* *subdivide-settings*) (/ (-> *subdivide-settings* close 3) METER_LENGTH) arg3))
|
||||
(('far) (if (and *math-camera* *subdivide-settings*) (/ (-> *subdivide-settings* far 3) METER_LENGTH) arg3))
|
||||
(else arg3)))
|
||||
|
||||
(defun dm-subdiv-int ((arg0 symbol) (arg1 debug-menu-msg) (arg2 int) (arg3 int))
|
||||
@@ -301,6 +301,7 @@
|
||||
((drawable-tree-instance-shrub)
|
||||
(let ((s3-0 (-> (the-as drawable-tree-instance-shrub v1-7) info prototype-inline-array-shrub)))
|
||||
(dotimes (s2-0 (-> s3-0 length))
|
||||
;; og:preserve-this
|
||||
(let ((a1-4 (new 'debug 'debug-menu-item-flag (-> s3-0 data s2-0 name) (-> s3-0 data s2-0 name) dm-instance-pick-func)))
|
||||
(debug-menu-append-item *instance-shrub-menu* a1-4)))))
|
||||
((drawable-tree-instance-tie)
|
||||
@@ -1034,7 +1035,7 @@
|
||||
(when (= arg1 (debug-menu-msg press))
|
||||
(set! (-> gp-0 dists x) (* 4096.0 arg2))
|
||||
(prototype-bucket-recalc-fields gp-0))
|
||||
(* 0.00024414062 (-> gp-0 dists x)))
|
||||
(/ (-> gp-0 dists x) METER_LENGTH))
|
||||
(else (empty) arg3)))))
|
||||
(the-as float 1.0)
|
||||
#t
|
||||
@@ -1052,7 +1053,7 @@
|
||||
(when (= arg1 (debug-menu-msg press))
|
||||
(set! (-> gp-0 dists w) (* 4096.0 arg2))
|
||||
(prototype-bucket-recalc-fields gp-0))
|
||||
(* 0.00024414062 (-> gp-0 dists w)))
|
||||
(/ (-> gp-0 dists w) METER_LENGTH))
|
||||
(else (empty) arg3)))))
|
||||
(the-as float 1.0)
|
||||
#t
|
||||
|
||||
@@ -502,7 +502,7 @@
|
||||
((logtest? (-> self control root-prim prim-core action) (collide-action racer))
|
||||
(sound-play-by-name (sound-name-with-material 'zoom-land (-> self control ground-pat) "")
|
||||
(new-sound-id)
|
||||
(the int (* 10.24 (* 100.0 (the float (the int (* 10.24 (* 0.000016276043 (-> self control ground-impact-vel))))))))
|
||||
(the int (* 10.24 (* 100.0 (the float (the int (* 10.24 (/ (-> self control ground-impact-vel) (meters 15))))))))
|
||||
0
|
||||
0
|
||||
(sound-group sfx)
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
(deftype cylinder-verts (structure)
|
||||
((vert vector 24 :inline)))
|
||||
|
||||
|
||||
(defmethod debug-draw ((this cylinder) (arg0 vector4w))
|
||||
"Debug draw a cylinder. This is slow and ugly"
|
||||
(local-vars
|
||||
@@ -63,7 +64,7 @@
|
||||
(vector-cross! s1-0 (-> this axis) (new 'static 'vector :z 1.0))
|
||||
(vector-cross! s1-0 (-> this axis) (new 'static 'vector :y 1.0)))
|
||||
(vector-normalize! s1-0 (-> this radius))
|
||||
(vector-float*! s0-0 (-> this axis) (* 0.125 (-> this length)))
|
||||
(vector-float*! s0-0 (-> this axis) (/ (-> this length) 8))
|
||||
(let ((s5-0 (new 'stack-no-clear 'cylinder-verts))
|
||||
(s4-0 (new 'stack-no-clear 'cylinder-verts))
|
||||
(s3-0 (new 'stack-no-clear 'matrix)))
|
||||
@@ -150,6 +151,7 @@
|
||||
(deftype cylinder-flat-verts (structure)
|
||||
((vert vector 10 :inline)))
|
||||
|
||||
|
||||
(defmethod debug-draw ((this cylinder-flat) (arg0 vector4w))
|
||||
(local-vars (sv-448 vector) (sv-464 int))
|
||||
(rlet ((vf0 :class vf)
|
||||
@@ -163,7 +165,7 @@
|
||||
(vector-cross! s1-0 (-> this axis) (new 'static 'vector :z 1.0))
|
||||
(vector-cross! s1-0 (-> this axis) (new 'static 'vector :y 1.0)))
|
||||
(vector-normalize! s1-0 (-> this radius))
|
||||
(vector-float*! s0-0 (-> this axis) (* 0.14285715 (-> this length)))
|
||||
(vector-float*! s0-0 (-> this axis) (/ (-> this length) 7))
|
||||
(let ((s5-0 (new 'stack-no-clear 'cylinder-flat-verts))
|
||||
(s4-0 (new 'stack-no-clear 'cylinder-flat-verts))
|
||||
(s3-0 (new 'stack-no-clear 'matrix)))
|
||||
|
||||
@@ -17,10 +17,12 @@
|
||||
(effect merc-effect))
|
||||
:pack-me)
|
||||
|
||||
|
||||
(deftype ripple-globals (structure)
|
||||
((count int32)
|
||||
(requests ripple-request 16 :inline)))
|
||||
|
||||
|
||||
(define *ripple-globals* (new 'global 'ripple-globals))
|
||||
|
||||
(defun ripple-make-request ((arg0 ripple-wave) (arg1 merc-effect))
|
||||
@@ -132,4 +134,4 @@
|
||||
(f1-12 (+ f0-22 (* (- f26-1 f24-1) (- f1-9 f0-22))))
|
||||
(f0-23 (-> gp-0 faded-scale)))
|
||||
(if (< f0-23 0.0) (set! f0-23 (-> gp-0 global-scale)))
|
||||
(+ f30-0 (* 0.0078125 f1-12 f0-23))))))))
|
||||
(+ f30-0 (* (/ f1-12 128) f0-23))))))))
|
||||
|
||||
@@ -351,6 +351,7 @@
|
||||
(length uint8)
|
||||
(height uint8)))
|
||||
|
||||
|
||||
(defun update-mood-flames ((arg0 mood-context) (arg1 int) (arg2 int) (arg3 int) (arg4 float) (arg5 float) (arg6 float))
|
||||
(let* ((s5-0 (the-as flames-state (&-> arg0 state arg3)))
|
||||
(s4-0 (+ (-> s5-0 index) arg1))
|
||||
@@ -448,6 +449,7 @@
|
||||
((val uint8))
|
||||
:pack-me)
|
||||
|
||||
|
||||
(defun update-mood-lightning ((arg0 mood-context) (arg1 int) (arg2 int) (arg3 int) (arg4 int) (arg5 float) (arg6 symbol))
|
||||
(local-vars (a3-2 (array float)))
|
||||
(with-pp
|
||||
@@ -546,10 +548,12 @@
|
||||
((time uint8))
|
||||
:pack-me)
|
||||
|
||||
|
||||
(deftype light-state (structure)
|
||||
((fade uint8))
|
||||
:pack-me)
|
||||
|
||||
|
||||
(defun update-mood-light ((arg0 mood-context) (arg1 int) (arg2 int) (arg3 int) (arg4 float) (arg5 float) (arg6 float) (arg7 int))
|
||||
(let* ((gp-0 (&-> arg0 state arg2))
|
||||
(f0-1 (the float (* (logand (+ (-> arg0 state arg3) arg7) 255) 512)))
|
||||
@@ -577,6 +581,7 @@
|
||||
(last-index uint8))
|
||||
:pack-me)
|
||||
|
||||
|
||||
(define *lava-time* (the-as float 0))
|
||||
|
||||
(defun update-mood-lava ((arg0 mood-context) (arg1 int) (arg2 int) (arg3 symbol))
|
||||
@@ -598,8 +603,8 @@
|
||||
(set! (-> s4-0 last-index) s0-1))
|
||||
(when arg3
|
||||
(let* ((v1-14 (logand (+ s0-1 -1) 3))
|
||||
(f1-11 (* 0.0078125 (-> s4-0 scale s0-1)))
|
||||
(f0-11 (* 0.0078125 (-> s4-0 scale v1-14))))
|
||||
(f1-11 (/ (-> s4-0 scale s0-1) 128))
|
||||
(f0-11 (/ (-> s4-0 scale v1-14) 128)))
|
||||
(set! (-> arg0 times (+ arg1 s0-1) w) (* f30-2 f1-11))
|
||||
(set! (-> arg0 times (+ arg1 v1-14) w) (* (- 1.0 f30-2) f0-11))))))
|
||||
(none))
|
||||
@@ -628,6 +633,7 @@
|
||||
(time0 light-time-state :inline)
|
||||
(time1 light-time-state :inline)))
|
||||
|
||||
|
||||
(defun update-mood-misty ((arg0 mood-context) (arg1 float) (arg2 int))
|
||||
(update-mood-fog arg0 arg1)
|
||||
(update-mood-sky-texture arg0 arg1)
|
||||
@@ -665,6 +671,7 @@
|
||||
((flames flames-state :inline)
|
||||
(lightning lightning-state :inline)))
|
||||
|
||||
|
||||
(defun update-mood-village2 ((arg0 mood-context) (arg1 float) (arg2 int))
|
||||
(update-mood-fog arg0 arg1)
|
||||
(update-mood-sky-texture arg0 arg1)
|
||||
@@ -710,7 +717,7 @@
|
||||
(let ((f0-26 (vector-vector-distance s4-1 s3-0)))
|
||||
(when (< f0-26 61440.0)
|
||||
(let ((a2-10 (new 'stack-no-clear 'vector))
|
||||
(f0-27 (* 0.000016276043 f0-26)))
|
||||
(f0-27 (/ f0-26 (meters 15))))
|
||||
(set-vector! a2-10 1.0 0.5 0.0 1.0)
|
||||
(let ((f0-31 (* 0.5 (- 1.0 (fmax 0.0 (fmin 1.0 f0-27))))))
|
||||
(vector+float*! (-> s5-5 ambi color) (-> s5-5 ambi color) a2-10 f0-31))))))
|
||||
@@ -746,7 +753,7 @@
|
||||
(let ((f30-0 (fmax 0.0 (-> *math-camera* camera-rot vector 1 z))))
|
||||
(let ((a2-4 (new 'stack-no-clear 'vector)))
|
||||
(set-vector! a2-4 0.0 32.0 48.0 128.0)
|
||||
(vector4-lerp! (the-as vector (-> arg0 current-fog)) (the-as vector (-> arg0 current-fog)) a2-4 (* 0.5 f30-0)))
|
||||
(vector4-lerp! (the-as vector (-> arg0 current-fog)) (the-as vector (-> arg0 current-fog)) a2-4 (/ f30-0 2)))
|
||||
(let ((f0-7 (-> arg0 current-fog fog-dists w))
|
||||
(f1-1 255.0))
|
||||
(set! (-> arg0 current-fog fog-dists w) (+ f0-7 (* 0.666 f30-0 (- f1-1 f0-7))))))
|
||||
@@ -757,6 +764,7 @@
|
||||
(deftype village1-states (structure)
|
||||
((flames flames-state :inline)))
|
||||
|
||||
|
||||
(defun update-mood-village1 ((arg0 mood-context) (arg1 float) (arg2 int))
|
||||
(update-mood-fog arg0 arg1)
|
||||
(update-mood-sky-texture arg0 arg1)
|
||||
@@ -829,6 +837,7 @@
|
||||
(time light-time-state :inline)
|
||||
(one-shot uint8)))
|
||||
|
||||
|
||||
(defun update-mood-jungle ((arg0 mood-context) (arg1 float) (arg2 int))
|
||||
(update-mood-fog arg0 arg1)
|
||||
(update-mood-sky-texture arg0 arg1)
|
||||
@@ -994,6 +1003,7 @@
|
||||
((light light-state :inline)
|
||||
(time light-time-state :inline)))
|
||||
|
||||
|
||||
(set! (-> *sunken-mood* state 0) (the-as uint 255))
|
||||
|
||||
(defun update-mood-sunken ((arg0 mood-context) (arg1 float) (arg2 int))
|
||||
@@ -1003,7 +1013,7 @@
|
||||
(update-mood-sky-texture arg0 arg1)
|
||||
(if (not (paused?)) (+! (-> arg0 state 1) 1))
|
||||
(let ((f30-0 (update-mood-palette arg0 arg1 arg2))
|
||||
(f28-0 (* -0.00000055486504 (-> *math-camera* trans y)))
|
||||
(f28-0 (/ (-> *math-camera* trans y) (meters -440)))
|
||||
(s5-1 (-> arg0 light-group)))
|
||||
(when *time-of-day-effects*
|
||||
(update-mood-light arg0 2 0 1 0.875 0.25 20.0 32)
|
||||
@@ -1070,6 +1080,7 @@
|
||||
(time light-time-state :inline)
|
||||
(lightning lightning-state :inline)))
|
||||
|
||||
|
||||
(define *rolling-spheres-on*
|
||||
(new 'static
|
||||
'inline-array
|
||||
@@ -1147,43 +1158,43 @@
|
||||
(let ((s5-2 (-> arg0 light-group 6)))
|
||||
(update-light-kit s5-2 (-> arg0 light-group 0 ambi) 1.0)
|
||||
(set! (-> s5-2 dir0 levels x)
|
||||
(+ (* 0.25 (-> arg0 times 4 w)) (* 0.25 (-> arg0 times 5 w)) (* 0.25 (-> arg0 times 6 w)) (* 0.25 (-> arg0 times 7 w)))))
|
||||
(+ (/ (-> arg0 times 4 w) 4) (/ (-> arg0 times 5 w) 4) (/ (-> arg0 times 6 w) 4) (/ (-> arg0 times 7 w) 4))))
|
||||
(new 'stack-no-clear 'vector)
|
||||
(let ((s5-3 (target-joint-pos)))
|
||||
0.0
|
||||
(dotimes (s4-2 11)
|
||||
(let ((f0-7 (vector-vector-distance (-> *rolling-spheres-on* s4-2) s5-3)))
|
||||
(when (< f0-7 (-> *rolling-spheres-on* s4-2 w))
|
||||
(let ((f30-0 (/ (- f0-7 (* 0.5 (-> *rolling-spheres-on* s4-2 w))) (* 0.5 (-> *rolling-spheres-on* s4-2 w)))))
|
||||
(let ((f30-0 (/ (- f0-7 (/ (-> *rolling-spheres-on* s4-2 w) 2)) (/ (-> *rolling-spheres-on* s4-2 w) 2))))
|
||||
(set-target-light-index 1)
|
||||
(set! (-> *time-of-day-context* target-interp) (- 1.0 (fmax 0.0 (fmin 1.0 f30-0))))))))
|
||||
(let ((f0-11 (vector-vector-distance (the-as vector (&-> *rolling-spheres-light0* x)) s5-3)))
|
||||
(when (< f0-11 (-> *rolling-spheres-light0* w))
|
||||
(let ((f30-1 (/ (- f0-11 (* 0.5 (-> *rolling-spheres-light0* w))) (* 0.5 (-> *rolling-spheres-light0* w)))))
|
||||
(let ((f30-1 (/ (- f0-11 (/ (-> *rolling-spheres-light0* w) 2)) (/ (-> *rolling-spheres-light0* w) 2))))
|
||||
(set-target-light-index 2)
|
||||
(set! (-> *time-of-day-context* target-interp) (- 1.0 (fmax 0.0 (fmin 1.0 f30-1)))))))
|
||||
(dotimes (s4-3 4)
|
||||
(let ((f0-15 (vector-vector-distance (-> *rolling-spheres-light1* s4-3) s5-3)))
|
||||
(when (< f0-15 (-> *rolling-spheres-light1* s4-3 w))
|
||||
(let ((f30-2 (/ (- f0-15 (* 0.5 (-> *rolling-spheres-light1* s4-3 w))) (* 0.5 (-> *rolling-spheres-light1* s4-3 w)))))
|
||||
(let ((f30-2 (/ (- f0-15 (/ (-> *rolling-spheres-light1* s4-3 w) 2)) (/ (-> *rolling-spheres-light1* s4-3 w) 2))))
|
||||
(set-target-light-index 3)
|
||||
(set! (-> *time-of-day-context* target-interp) (- 1.0 (fmax 0.0 (fmin 1.0 f30-2))))))))
|
||||
(dotimes (s4-4 5)
|
||||
(let ((f0-19 (vector-vector-distance (the-as vector (+ (the-as uint *rolling-spheres-light2*) (* s4-4 16))) s5-3)))
|
||||
(when (< f0-19 (-> *rolling-spheres-light2* matrix vector s4-4 w))
|
||||
(let ((f30-3 (/ (- f0-19 (* 0.5 (-> *rolling-spheres-light2* matrix vector s4-4 w)))
|
||||
(* 0.5 (-> *rolling-spheres-light2* matrix vector s4-4 w)))))
|
||||
(let ((f30-3 (/ (- f0-19 (/ (-> *rolling-spheres-light2* matrix vector s4-4 w) 2))
|
||||
(/ (-> *rolling-spheres-light2* matrix vector s4-4 w) 2))))
|
||||
(set-target-light-index 4)
|
||||
(set! (-> *time-of-day-context* target-interp) (- 1.0 (fmax 0.0 (fmin 1.0 f30-3))))))))
|
||||
(dotimes (s4-5 2)
|
||||
(let ((f0-23 (vector-vector-distance (-> *rolling-spheres-light3* s4-5) s5-3)))
|
||||
(when (< f0-23 (-> *rolling-spheres-light3* s4-5 w))
|
||||
(let ((f30-4 (/ (- f0-23 (* 0.5 (-> *rolling-spheres-light3* s4-5 w))) (* 0.5 (-> *rolling-spheres-light3* s4-5 w)))))
|
||||
(let ((f30-4 (/ (- f0-23 (/ (-> *rolling-spheres-light3* s4-5 w) 2)) (/ (-> *rolling-spheres-light3* s4-5 w) 2))))
|
||||
(set-target-light-index 5)
|
||||
(set! (-> *time-of-day-context* target-interp) (- 1.0 (fmax 0.0 (fmin 1.0 f30-4))))))))
|
||||
(let ((f0-27 (vector-vector-distance (the-as vector (&-> *rolling-spheres-light4* x)) s5-3)))
|
||||
(when (< f0-27 (-> *rolling-spheres-light4* w))
|
||||
(let ((f30-5 (/ (- f0-27 (* 0.5 (-> *rolling-spheres-light4* w))) (* 0.5 (-> *rolling-spheres-light4* w)))))
|
||||
(let ((f30-5 (/ (- f0-27 (/ (-> *rolling-spheres-light4* w) 2)) (/ (-> *rolling-spheres-light4* w) 2))))
|
||||
(set-target-light-index 6)
|
||||
(set! (-> *time-of-day-context* target-interp) (- 1.0 (fmax 0.0 (fmin 1.0 f30-5))))))))
|
||||
(update-mood-itimes arg0)
|
||||
@@ -1193,6 +1204,7 @@
|
||||
(deftype firecanyon-states (structure)
|
||||
((lava lava-state :inline)))
|
||||
|
||||
|
||||
(defun update-mood-firecanyon ((arg0 mood-context) (arg1 float) (arg2 int))
|
||||
(update-mood-fog arg0 arg1)
|
||||
(update-mood-sky-texture arg0 arg1)
|
||||
@@ -1207,6 +1219,7 @@
|
||||
((light light-state :inline)
|
||||
(time light-time-state :inline)))
|
||||
|
||||
|
||||
(defun update-mood-training ((arg0 mood-context) (arg1 float) (arg2 int))
|
||||
(update-mood-fog arg0 arg1)
|
||||
(update-mood-sky-texture arg0 arg1)
|
||||
@@ -1222,6 +1235,7 @@
|
||||
(deftype maincave-states (structure)
|
||||
((flames flames-state :inline)))
|
||||
|
||||
|
||||
(defun update-mood-maincave ((arg0 mood-context) (arg1 float) (arg2 int))
|
||||
(when (not (paused?))
|
||||
(clear-mood-times arg0)
|
||||
@@ -1261,7 +1275,7 @@
|
||||
(set! (-> arg0 times s2-0 w) f28-0)
|
||||
(vector-! s3-0 (the-as vector (-> *palette-fade-controls* control s2-0)) (-> *target* control trans))
|
||||
(let* ((f3-0 (vector-length s3-0))
|
||||
(f28-1 (* f28-0 (fmax 0.0 (fmin 1.0 (- 1.0 (* 0.000012207031 f3-0)))))))
|
||||
(f28-1 (* f28-0 (fmax 0.0 (fmin 1.0 (- 1.0 (/ f3-0 (meters 20))))))))
|
||||
(vector-normalize! s3-0 f28-1)
|
||||
(if (< f30-0 f28-1) (set! f30-0 f28-1))))
|
||||
(vector+! s4-0 s4-0 s3-0)
|
||||
@@ -1295,6 +1309,7 @@
|
||||
(deftype robocave-states (structure)
|
||||
((flames flames-state :inline)))
|
||||
|
||||
|
||||
(defun update-mood-robocave ((arg0 mood-context) (arg1 float) (arg2 int))
|
||||
(clear-mood-times arg0)
|
||||
(set! (-> arg0 times 0 w) 1.0)
|
||||
@@ -1311,6 +1326,7 @@
|
||||
(one-shot uint8)
|
||||
(interp float)))
|
||||
|
||||
|
||||
(defun update-mood-snow ((arg0 mood-context) (arg1 float) (arg2 int))
|
||||
(update-mood-fog arg0 arg1)
|
||||
(update-mood-sky-texture arg0 arg1)
|
||||
@@ -1352,6 +1368,7 @@
|
||||
(lava-time float)
|
||||
(time uint8)))
|
||||
|
||||
|
||||
(defun update-mood-village3 ((arg0 mood-context) (arg1 float) (arg2 int))
|
||||
(update-mood-fog arg0 arg1)
|
||||
(update-mood-sky-texture arg0 arg1)
|
||||
@@ -1476,6 +1493,7 @@
|
||||
(light light-state :inline)
|
||||
(time light-time-state :inline)))
|
||||
|
||||
|
||||
(set! (-> *lavatube-mood* state 18) (the-as uint 255))
|
||||
|
||||
(defun update-mood-lavatube ((arg0 mood-context) (arg1 float) (arg2 int))
|
||||
@@ -1497,6 +1515,7 @@
|
||||
(lava-time float)
|
||||
(lava-fade float)))
|
||||
|
||||
|
||||
(defun update-mood-ogre ((arg0 mood-context) (arg1 float) (arg2 int))
|
||||
(update-mood-fog arg0 arg1)
|
||||
(update-mood-sky-texture arg0 arg1)
|
||||
@@ -1614,6 +1633,7 @@
|
||||
((start-time time-frame)
|
||||
(secret-time time-frame)))
|
||||
|
||||
|
||||
(defun update-mood-finalboss ((arg0 mood-context) (arg1 float) (arg2 int))
|
||||
(clear-mood-times arg0)
|
||||
(set! (-> arg0 light-group 0 dir2 levels x) 0.0)
|
||||
@@ -1743,6 +1763,7 @@
|
||||
(flicker-on uint8)
|
||||
(shield-fade float)))
|
||||
|
||||
|
||||
(set! (-> *citadel-mood* state 4) (the-as uint 255))
|
||||
|
||||
(defun update-mood-citadel ((arg0 mood-context) (arg1 float) (arg2 int))
|
||||
@@ -1816,7 +1837,7 @@
|
||||
(set-vector! s3-1 0.1 0.1 0.1 1.0)
|
||||
(let ((f30-3 (* (-> (the-as (pointer float) s5-1) 2) f30-2)))
|
||||
(vector4-lerp! s3-1 s3-1 s2-0 f30-3)
|
||||
(set! (-> arg0 times 7 w) (* (+ 0.8 (* 0.1 f28-4)) f30-3))))
|
||||
(set! (-> arg0 times 7 w) (* (+ 0.8 (/ f28-4 10)) f30-3))))
|
||||
(let ((v1-49 (-> s4-2 0 dir1)))
|
||||
(set! (-> v1-49 direction x) 0.0)
|
||||
(set! (-> v1-49 direction y) -1.0)
|
||||
|
||||
@@ -473,9 +473,9 @@
|
||||
(set! (-> arg2 vector 2 y) (-> *time-of-day-context* current-sun sun-color y))
|
||||
(set! (-> arg2 vector 2 z) (-> *time-of-day-context* current-sun sun-color z)))
|
||||
((or (= s5-0 1) (= s5-0 2))
|
||||
(set! (-> arg2 vector 2 x) (* 0.25 (-> *time-of-day-context* current-sun sun-color x)))
|
||||
(set! (-> arg2 vector 2 y) (* 0.25 (-> *time-of-day-context* current-sun sun-color y)))
|
||||
(set! (-> arg2 vector 2 z) (* 0.25 (-> *time-of-day-context* current-sun sun-color z))))))
|
||||
(set! (-> arg2 vector 2 x) (/ (-> *time-of-day-context* current-sun sun-color x) 4))
|
||||
(set! (-> arg2 vector 2 y) (/ (-> *time-of-day-context* current-sun sun-color y) 4))
|
||||
(set! (-> arg2 vector 2 z) (/ (-> *time-of-day-context* current-sun sun-color z) 4)))))
|
||||
0
|
||||
(none))
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
(walk-distance meters)
|
||||
(run-distance meters)))
|
||||
|
||||
|
||||
(defun time-to-apex ((arg0 float) (arg1 float))
|
||||
"How many ticks it takes to reach the apex of a ballistic trajectory."
|
||||
(the int (/ arg0 (- (vel-tick arg1)))))
|
||||
@@ -25,8 +26,8 @@
|
||||
(v0-0 0))
|
||||
;; actually integrate forward, just like the game will do so we're exact.
|
||||
(while (< (- arg2) f0-0)
|
||||
(set! arg0 (- arg0 (* 0.0033333334 arg1)))
|
||||
(+! f0-0 (* 0.0033333334 arg0))
|
||||
(set! arg0 (- arg0 (/ arg1 300)))
|
||||
(+! f0-0 (/ arg0 300))
|
||||
(+! v0-0 1))
|
||||
v0-0))
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
(+! (-> result x) (* time (-> this initial-velocity x)))
|
||||
(+! (-> result y) (* time (-> this initial-velocity y)))
|
||||
(+! (-> result z) (* time (-> this initial-velocity z)))
|
||||
(+! (-> result y) (* 0.5 time time (-> this gravity)))
|
||||
(+! (-> result y) (* (/ time 2) time (-> this gravity)))
|
||||
result)
|
||||
|
||||
(defmethod eval-velocity! ((this trajectory) (time float) (result vector))
|
||||
@@ -34,7 +34,7 @@
|
||||
;; but have magnitude that we calculated above.
|
||||
(vector-xz-normalize! (-> this initial-velocity) xz-vel))
|
||||
;; solve for the y velocity that makes us land at the right height.
|
||||
(set! (-> this initial-velocity y) (- (/ (- (-> to y) (-> from y)) duration) (* 0.5 duration (-> this gravity))))
|
||||
(set! (-> this initial-velocity y) (- (/ (- (-> to y) (-> from y)) duration) (* (/ duration 2) (-> this gravity))))
|
||||
0
|
||||
(none))
|
||||
|
||||
|
||||
@@ -106,7 +106,7 @@
|
||||
(if (or (not (logtest? sv-32 32)) (< 0.5 f0-21)) (set! sv-48 (the-as symbol #f)))
|
||||
(when (and (or (and (< f0-21 0.95) (>= f30-0 0.0))
|
||||
(and (logtest? sv-32 32) (< f0-21 0.3))
|
||||
(< f1-11 (* -0.25 (-> arg1 best-from-prim local-sphere w))))
|
||||
(< f1-11 (/ (-> arg1 best-from-prim local-sphere w) -4)))
|
||||
(>= (vector-dot sv-52 sv-16) -0.000001))
|
||||
(set! (-> arg0 surf) *edge-surface*)
|
||||
(set! sv-32 (logior sv-32 1024))
|
||||
|
||||
@@ -331,7 +331,7 @@
|
||||
(when (< f2-0 (-> a1-3 a2-6 w))
|
||||
(set! a0-3 a2-6)
|
||||
(set! f2-0 (-> a1-3 a2-6 w))))
|
||||
(let ((f1-1 (* 0.0625 f1-0)))
|
||||
(let ((f1-1 (/ f1-0 16)))
|
||||
(set! (-> self control unknown-int10) a0-3)
|
||||
(set! (-> self control unknown-float100) f1-1)
|
||||
(if (logtest? (-> self control unknown-surface01 flags) (surface-flags no-turn-around))
|
||||
|
||||
@@ -118,6 +118,7 @@
|
||||
(tongue-pull-speed-max float)
|
||||
(yellow-attack-timeout time-frame)))
|
||||
|
||||
|
||||
(define *TARGET-bank*
|
||||
(new 'static
|
||||
'target-bank
|
||||
@@ -547,7 +548,7 @@
|
||||
(dotimes (s5-0 8)
|
||||
(+! f30-0
|
||||
(fabs (deg-diff (atan (-> arg0 control unknown-vector-array00 s5-0 x) (-> arg0 control unknown-vector-array00 s5-0 z)) 0.0))))
|
||||
(* 0.125 f30-0)))
|
||||
(/ f30-0 8)))
|
||||
|
||||
(defbehavior can-play-stance-amibent? target ()
|
||||
(and (time-elapsed? (-> self state-time) (seconds 30))
|
||||
@@ -769,9 +770,9 @@
|
||||
(let ((f0-1 (fmax -1.0 (fmin 1.0 (* 2.0 arg1))))
|
||||
(f30-0 (fmax -1.0 (fmin 1.0 (* 1.6 arg2)))))
|
||||
(let ((f1-5 (fabs (- f0-1 (the-as float (-> arg0 blend 1))))))
|
||||
(set! (-> arg0 blend 1) (seek (the-as float (-> arg0 blend 1)) f0-1 (fmax 0.05 (fmin 0.2 (* 0.25 f1-5))))))
|
||||
(set! (-> arg0 blend 1) (seek (the-as float (-> arg0 blend 1)) f0-1 (fmax 0.05 (fmin 0.2 (/ f1-5 4))))))
|
||||
(let ((f0-7 (fabs (- f30-0 (the-as float (-> arg0 blend 2))))))
|
||||
(set! (-> arg0 blend 2) (seek (the-as float (-> arg0 blend 2)) f30-0 (fmax 0.05 (fmin 0.2 (* 0.25 f0-7)))))))
|
||||
(set! (-> arg0 blend 2) (seek (the-as float (-> arg0 blend 2)) f30-0 (fmax 0.05 (fmin 0.2 (/ f0-7 4)))))))
|
||||
(if (>= (-> arg0 blend 1) 0.0)
|
||||
(ja :chan (-> arg0 chan 1) :group! (-> arg0 group 1) :frame-interp (fabs (-> arg0 blend 1)))
|
||||
(ja :chan (-> arg0 chan 1) :group! (-> arg0 group 2) :frame-interp (fabs (-> arg0 blend 1))))
|
||||
|
||||
@@ -422,7 +422,7 @@
|
||||
((ja-group? eichar-turn-around-ja) (set! f30-0 1.0) (ja-channel-push! 7 (seconds 0.05)))
|
||||
((ja-group? eichar-duck-roll-ja) (ja-channel-push! 7 (seconds 0.075)) (set! f30-0 1.0))
|
||||
((ja-group? eichar-attack-from-stance-ja)
|
||||
(let ((f30-1 (fmax 0.8 (fmin 1.0 (* 0.000048828126 (-> self control unknown-float01))))))
|
||||
(let ((f30-1 (fmax 0.8 (fmin 1.0 (/ (-> self control unknown-float01) (meters 5))))))
|
||||
(cond
|
||||
((and (rand-vu-percent? (the-as float 0.3)) (< 20480.0 (-> self control unknown-float01)))
|
||||
(ja-no-eval :group!
|
||||
@@ -559,8 +559,8 @@
|
||||
(* 2.0 (seconds-per-frame))))
|
||||
(let ((v1-317 (-> self skel effect))) (set! (-> v1-317 channel-offset) (if (< 0.5 f30-0) 3 0)))
|
||||
0
|
||||
(let ((f0-64 (fabs (- f22-0 f28-2)))) (set! f28-2 (seek f28-2 f22-0 (fmax 0.05 (fmin 0.2 (* 0.25 f0-64))))))
|
||||
(let ((f0-69 (fabs (- f24-0 f26-1)))) (set! f26-1 (seek f26-1 f24-0 (fmax 0.05 (fmin 0.2 (* 0.25 f0-69)))))))
|
||||
(let ((f0-64 (fabs (- f22-0 f28-2)))) (set! f28-2 (seek f28-2 f22-0 (fmax 0.05 (fmin 0.2 (/ f0-64 4))))))
|
||||
(let ((f0-69 (fabs (- f24-0 f26-1)))) (set! f26-1 (seek f26-1 f24-0 (fmax 0.05 (fmin 0.2 (/ f0-69 4)))))))
|
||||
(cond
|
||||
((>= f28-2 0.0)
|
||||
(ja :chan 1 :group! eichar-walk-up-ja :frame-interp (fabs f28-2) :dist (-> *TARGET-bank* walk-up-cycle-dist))
|
||||
@@ -1413,7 +1413,7 @@
|
||||
(vector-float*! gp-1 gp-1 (/ f0-4 f1-2))))))
|
||||
(else
|
||||
(let* ((f1-5 (/ f0-1 (* (-> self control dynam gravity-length) (seconds-per-frame))))
|
||||
(f30-0 (* 0.5 f1-5 (seconds-per-frame) f0-1)))
|
||||
(f30-0 (* (/ f1-5 2) (seconds-per-frame) f0-1)))
|
||||
(if (ja-group? eichar-attack-uppercut-ja)
|
||||
(set! f30-0
|
||||
(fmax 0.0
|
||||
@@ -1468,8 +1468,7 @@
|
||||
(let ((f30-0 393216.0))
|
||||
(let ((f0-8 (target-height-above-ground))
|
||||
(f1-1 (vector-dot (-> self control dynam gravity-normal) (-> self control transv))))
|
||||
(while (not (or (and (< (fabs (/ f0-8 (* 0.0033333334 f1-1))) 150.0) (< f1-1 0.0))
|
||||
(time-elapsed? (-> self state-time) (seconds 1.7))))
|
||||
(while (not (or (and (< (fabs (/ f0-8 (/ f1-1 300))) 150.0) (< f1-1 0.0)) (time-elapsed? (-> self state-time) (seconds 1.7))))
|
||||
(quaternion-rotate-y! (-> self control unknown-quaternion00)
|
||||
(-> self control unknown-quaternion00)
|
||||
(* f30-0 (seconds-per-frame)))
|
||||
|
||||
@@ -28,7 +28,9 @@
|
||||
(send-event *camera* 'joystick 0.0 0.0)
|
||||
(suspend)
|
||||
(ja :num! (seek!)))
|
||||
(suspend-for (seconds 0.3) (suspend) (ja :num! (seek! (ja-aframe (the-as float 19.0) 0) 0.05)))
|
||||
(suspend-for (seconds 0.3)
|
||||
(suspend)
|
||||
(ja :num! (seek! (ja-aframe (the-as float 19.0) 0) 0.05)))
|
||||
(ja-channel-push! 1 (seconds 0.3))
|
||||
(ja-no-eval :group! eichar-painful-land-ja :num! (seek!) :frame-num (ja-aframe (the-as float 40.0) 0))
|
||||
(until (ja-done? 0)
|
||||
@@ -112,6 +114,7 @@
|
||||
hud-normal
|
||||
hud-waiting))
|
||||
|
||||
|
||||
(define *fp-hud-stack* (malloc 'global #x3800))
|
||||
|
||||
(defmethod deactivate ((this first-person-hud))
|
||||
@@ -669,7 +672,7 @@
|
||||
(ja :group! eichar-pole-jump-loop-ja :num! min)
|
||||
(let ((f0-1 (target-height-above-ground))
|
||||
(f1-1 (vector-dot (-> self control dynam gravity-normal) (-> self control transv))))
|
||||
(while (not (and (< (fabs (/ f0-1 (* 0.0033333334 f1-1))) 40.0) (and (< f1-1 0.0) (ja-min? 0))))
|
||||
(while (not (and (< (fabs (/ f0-1 (/ f1-1 300))) 40.0) (and (< f1-1 0.0) (ja-min? 0))))
|
||||
(suspend)
|
||||
(ja :num! (loop!))
|
||||
(set! f0-1 (target-height-above-ground))
|
||||
@@ -1150,8 +1153,8 @@
|
||||
(loop
|
||||
(let ((f0-10 (fmax -1.0 (fmin 1.0 (* 2.0 (-> self control unknown-float61)))))
|
||||
(f24-0 (fmax -1.0 (fmin 1.0 (* 1.6 (-> self control unknown-float62))))))
|
||||
(let ((f1-4 (fabs (- f0-10 f30-1)))) (set! f30-1 (seek f30-1 f0-10 (fmax 0.05 (fmin 0.2 (* 0.25 f1-4))))))
|
||||
(let ((f0-14 (fabs (- f24-0 f28-0)))) (set! f28-0 (seek f28-0 f24-0 (fmax 0.05 (fmin 0.2 (* 0.25 f0-14)))))))
|
||||
(let ((f1-4 (fabs (- f0-10 f30-1)))) (set! f30-1 (seek f30-1 f0-10 (fmax 0.05 (fmin 0.2 (/ f1-4 4))))))
|
||||
(let ((f0-14 (fabs (- f24-0 f28-0)))) (set! f28-0 (seek f28-0 f24-0 (fmax 0.05 (fmin 0.2 (/ f0-14 4)))))))
|
||||
(ja :chan 3 :group! eichar-walk-down-ja :dist (-> *TARGET-bank* walk-down-cycle-dist))
|
||||
(if (>= f30-1 0.0)
|
||||
(ja :chan 3 :group! eichar-walk-up-ja :frame-interp (fabs f30-1) :dist (-> *TARGET-bank* walk-up-cycle-dist))
|
||||
|
||||
@@ -118,7 +118,6 @@
|
||||
|
||||
(deftype hud-pickups (hud) ())
|
||||
|
||||
|
||||
(defmethod draw-hud ((this hud-pickups))
|
||||
(let ((t9-0 (method-of-type hud draw-hud))) (t9-0 this))
|
||||
(let* ((s5-0 (-> *display* frames (-> *display* on-screen) frame global-buf))
|
||||
@@ -234,7 +233,6 @@
|
||||
(deftype hud-health (hud)
|
||||
((scale float)))
|
||||
|
||||
|
||||
(defun part-hud-health-01-func ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 matrix))
|
||||
(let ((f0-0 (-> *hud-parts* health 0 scale))) (set! (-> arg2 vector 0 w) f0-0) (set! (-> arg2 vector 1 w) f0-0))
|
||||
(cond
|
||||
@@ -371,7 +369,6 @@
|
||||
(level-index int32)
|
||||
(start-time time-frame)))
|
||||
|
||||
|
||||
(defmethod draw-hud ((this hud-money-all))
|
||||
(let ((t9-0 (method-of-type hud draw-hud))) (t9-0 this))
|
||||
0
|
||||
@@ -533,6 +530,7 @@
|
||||
(y-scale float)
|
||||
(y-pos int32)))
|
||||
|
||||
;; og:preserve-this
|
||||
(define-extern *game-counts* game-count-info)
|
||||
|
||||
(defmethod draw-hud ((this hud-money))
|
||||
@@ -855,7 +853,6 @@
|
||||
(scale-center float)
|
||||
(icon-pos-y int32)))
|
||||
|
||||
|
||||
(defmethod draw-hud ((this hud-fuel-cell))
|
||||
(let ((t9-0 (method-of-type hud draw-hud))) (t9-0 this))
|
||||
(with-dma-buffer-add-bucket ((buf (-> (current-frame) global-buf)) (bucket-id debug))
|
||||
@@ -941,13 +938,13 @@
|
||||
(when *target*
|
||||
(when (!= *master-mode* 'pause)
|
||||
(let ((a0-2 (-> this icons 0 icon 0 root)))
|
||||
(set-yaw-angle-clear-roll-pitch! a0-2 (+ (y-angle a0-2) (* 182.04445 (* 0.5 (-> *display* time-adjust-ratio)))))))
|
||||
(set-yaw-angle-clear-roll-pitch! a0-2 (+ (y-angle a0-2) (* 182.04445 (/ (-> *display* time-adjust-ratio) 2))))))
|
||||
(set! (-> this icons 0 icon-y) (-> this icon-pos-y))
|
||||
(tally-value this (the int (+ 0.5 (-> *target* game fuel))) 0)
|
||||
(let ((s5-1 (new 'stack-no-clear 'vector)))
|
||||
(vector<-cspace! s5-1 (-> this icons 0 icon 0 node-list data 3))
|
||||
(set! (-> this particles 0 pos x) (-> s5-1 x))
|
||||
(set! (-> this particles 0 pos y) (* 0.5 (-> s5-1 y)))
|
||||
(set! (-> this particles 0 pos y) (/ (-> s5-1 y) 2))
|
||||
(set! (-> this particles 0 pos z) (+ 2.0 (* 0.05 (+ -2048.0 (-> s5-1 z)))))))
|
||||
0
|
||||
(none))
|
||||
@@ -1062,7 +1059,6 @@
|
||||
((scale float)
|
||||
(text-y-offset int32)))
|
||||
|
||||
|
||||
(defun part-hud-buzzer-func ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 matrix))
|
||||
(let ((f0-0 (-> *hud-parts* buzzers 0 scale))) (set! (-> arg2 vector 0 w) f0-0) (set! (-> arg2 vector 1 w) f0-0))
|
||||
(none))
|
||||
@@ -1252,7 +1248,6 @@
|
||||
(scale-backing float)
|
||||
(scale-blue float)))
|
||||
|
||||
|
||||
(defun calculate-rotation-and-color-for-slice ((arg0 int) (arg1 float) (arg2 int) (arg3 int) (arg4 int) (arg5 matrix))
|
||||
(cond
|
||||
((>= 0.0 arg1) (set! (-> arg5 vector 1 z) -16566.045))
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
(let ((a0-18 (-> this icons sv-144 icon 0 root)))
|
||||
(set! sv-176 a0-18)
|
||||
(set! sv-160 (method-of-object sv-176 set-yaw-angle-clear-roll-pitch!))
|
||||
(let ((a1-2 (+ (y-angle a0-18) (* 182.04445 (* 0.5 (-> *display* time-adjust-ratio)))))) (sv-160 sv-176 a1-2)))
|
||||
(let ((a1-2 (+ (y-angle a0-18) (* 182.04445 (/ (-> *display* time-adjust-ratio) 2))))) (sv-160 sv-176 a1-2)))
|
||||
(set! sv-144 (+ sv-144 1)))
|
||||
(set! sv-192 (+ sv-112 (/ (- (* 47 (-> s5-0 nb-of-tasks)) (* sv-128 (-> s5-0 nb-of-tasks))) 2)))
|
||||
(set! sv-208 0)
|
||||
@@ -1042,7 +1042,7 @@
|
||||
(s2-0 *temp-string*
|
||||
s3-0
|
||||
(the int (+ 428.0 (the float s5-0) f30-0))
|
||||
(- 12 (the int (* 0.16666667 f30-0)))
|
||||
(- 12 (the int (/ f30-0 6)))
|
||||
(font-color default)
|
||||
(font-flags shadow kerning large)))
|
||||
(let ((s2-1 draw-string-xy))
|
||||
@@ -1050,7 +1050,7 @@
|
||||
(s2-1 *temp-string*
|
||||
s3-0
|
||||
(the int (+ 456.0 (the float (adjust-pos s5-0 50)) f30-0))
|
||||
(- 48 (the int (* 0.125 f30-0)))
|
||||
(- 48 (the int (/ f30-0 8)))
|
||||
(font-color default)
|
||||
(font-flags shadow kerning large)))
|
||||
(let ((s2-2 draw-string-xy))
|
||||
|
||||
@@ -520,7 +520,7 @@
|
||||
(set-vector! s4-0 (+ (-> s5-1 x) (-> s3-0 x)) (-> s5-1 y) (+ (-> s5-1 z) (-> s3-0 z)) 1.0)
|
||||
(vector-float*! s3-0 s3-0 10.0)
|
||||
(spawn-flying-rock s4-0 s3-0 1.0 (-> self entity))
|
||||
(set-vector! s3-0 (+ (* -0.866 f26-0) (* 0.5 f28-0)) (* 0.5 f30-0) (+ (* 0.866 f28-0) (* 0.5 f26-0)) 1.0)
|
||||
(set-vector! s3-0 (+ (* -0.866 f26-0) (/ f28-0 2)) (/ f30-0 2) (+ (* 0.866 f28-0) (/ f26-0 2)) 1.0)
|
||||
(set-vector! s4-0 (-> s5-1 x) (+ 3276.8 (-> s5-1 y)) (-> s5-1 z) 1.0)
|
||||
(vector-float*! s3-0 s3-0 10.0)
|
||||
(spawn-flying-rock s4-0 s3-0 1.0 (-> self entity))))
|
||||
|
||||
@@ -314,7 +314,7 @@ lurkerworm-default-post-behavior
|
||||
(let* ((f0-13 (- 1.0
|
||||
(* 0.00009765625
|
||||
(+ -16384.0 (if *target* (vector-vector-distance (-> self root trans) (-> *target* control trans)) 4096000.0)))))
|
||||
(f30-2 (* 0.2 f0-13)))
|
||||
(f30-2 (/ f0-13 5)))
|
||||
(if (< (rand-float-gen) f30-2) (go lurkerworm-strike))))
|
||||
(+! s5-0 -1)
|
||||
(when (zero? s5-0)
|
||||
|
||||
@@ -48,6 +48,7 @@
|
||||
(citb-base-plat-active () _type_ :state)
|
||||
(citb-base-plat-method-24 (_type_) none)))
|
||||
|
||||
|
||||
(defstate citb-base-plat-idle (citb-base-plat)
|
||||
:virtual #t
|
||||
:trans
|
||||
@@ -109,6 +110,7 @@
|
||||
|
||||
(deftype citb-plat-eco (plat-eco) ())
|
||||
|
||||
|
||||
(defmethod baseplat-method-24 ((this citb-plat-eco))
|
||||
(let ((s5-0 (new 'process 'collide-shape-moving this (collide-list-enum hit-by-others))))
|
||||
(set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
|
||||
@@ -143,6 +145,7 @@
|
||||
(deftype citb-plat (plat)
|
||||
((trans-offset vector :inline)))
|
||||
|
||||
|
||||
(defstate plat-path-active (citb-plat)
|
||||
:virtual #t
|
||||
:trans
|
||||
@@ -206,6 +209,7 @@
|
||||
(delay time-frame)
|
||||
(rise symbol)))
|
||||
|
||||
|
||||
(defstate citb-base-plat-idle (citb-stair-plat)
|
||||
:virtual #t
|
||||
:event
|
||||
@@ -309,10 +313,11 @@
|
||||
(:states
|
||||
citb-chain-plat-settle))
|
||||
|
||||
|
||||
(defmethod rigid-body-platform-method-22 ((this citb-chain-plat) (arg0 vector) (arg1 float))
|
||||
(+ 12288.0
|
||||
(* 2048.0
|
||||
(fmax 0.0 (fmin 1.0 (* 0.000024414063 (-> this float-height-offset))))
|
||||
(fmax 0.0 (fmin 1.0 (/ (-> this float-height-offset) (meters 10))))
|
||||
(cos (* 109.22667 (+ (* 60.0 arg1) (* 0.03 (-> arg0 x)) (* 0.03 (-> arg0 z))))))
|
||||
(-> this float-height-offset)
|
||||
(-> this orig-trans y)))
|
||||
@@ -457,6 +462,7 @@
|
||||
|
||||
(deftype citb-rotatebox (citb-base-plat) ())
|
||||
|
||||
|
||||
(defstate citb-base-plat-active (citb-rotatebox)
|
||||
:virtual #t
|
||||
:trans rider-trans
|
||||
@@ -506,6 +512,7 @@
|
||||
(deftype citb-donut (citb-base-plat)
|
||||
((sync sync-info :inline)))
|
||||
|
||||
|
||||
(defstate citb-base-plat-active (citb-donut)
|
||||
:virtual #t
|
||||
:post
|
||||
@@ -551,6 +558,7 @@
|
||||
|
||||
(deftype citb-stopbox (plat) ())
|
||||
|
||||
|
||||
(defstate plat-path-active (citb-stopbox)
|
||||
:virtual #t
|
||||
:trans
|
||||
@@ -601,6 +609,7 @@
|
||||
citb-firehose-blast
|
||||
citb-firehose-idle))
|
||||
|
||||
|
||||
(defskelgroup *citb-firehose-sg*
|
||||
citb-firehose
|
||||
citb-firehose-lod0-jg
|
||||
@@ -732,6 +741,7 @@
|
||||
citb-exit-plat-idle
|
||||
citb-exit-plat-rise))
|
||||
|
||||
|
||||
(defstate citb-exit-plat-idle (citb-exit-plat)
|
||||
:event
|
||||
(behavior ((proc process) (argc int) (message symbol) (block event-message-block))
|
||||
|
||||
@@ -597,7 +597,7 @@
|
||||
(ja-post)
|
||||
(let ((f0-4 0.0))
|
||||
(countdown (v1-33 4)
|
||||
(let ((a2-4 (the int (* 0.00048828125 f0-4)))) (logior! (-> self angle-mask) (ash 1 a2-4)))
|
||||
(let ((a2-4 (the int (/ f0-4 (meters 0.5))))) (logior! (-> self angle-mask) (ash 1 a2-4)))
|
||||
(set! f0-4 (+ 16384.0 f0-4))))
|
||||
(go light-eco-mother-appear)
|
||||
(none))
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
(torus-method-11 (_type_ vector) symbol)
|
||||
(torus-method-12 (_type_ vector) vector)))
|
||||
|
||||
|
||||
(defmethod torus-method-10 ((this torus) (arg0 collide-prim-core) (arg1 vector))
|
||||
(let ((gp-0 (new 'stack-no-clear 'vector))
|
||||
(s5-0 (new 'stack-no-clear 'vector))
|
||||
@@ -40,6 +41,7 @@
|
||||
(deftype torus-verts (structure)
|
||||
((vert vector 8 :inline)))
|
||||
|
||||
|
||||
(defmethod torus-method-9 ((this torus) (arg0 vector))
|
||||
(local-vars (sv-256 int) (sv-272 int) (sv-288 int))
|
||||
(let ((s0-0 (new 'stack-no-clear 'vector))
|
||||
@@ -112,6 +114,7 @@
|
||||
(:states
|
||||
arcing-shot-debug-trajectory))
|
||||
|
||||
|
||||
(defbehavior arcing-shot-setup arcing-shot ((arg0 vector) (arg1 vector) (arg2 float))
|
||||
(set! (-> self from quad) (-> arg0 quad))
|
||||
(set! (-> self to quad) (-> arg1 quad))
|
||||
@@ -127,7 +130,7 @@
|
||||
(vector-lerp! arg0 (-> self from) (-> self to) s5-0)
|
||||
(set! (-> arg0 y) (-> self from y))
|
||||
(+! (-> arg0 y) (* (-> self y-vel) s5-0))
|
||||
(set! (-> arg0 y) (+ (-> arg0 y) (* 0.5 s5-0 s5-0 (-> self grav))))))
|
||||
(set! (-> arg0 y) (+ (-> arg0 y) (* (/ s5-0 2) s5-0 (-> self grav))))))
|
||||
|
||||
(defbehavior arcing-shot-draw arcing-shot ()
|
||||
(let ((gp-0 (new 'stack-no-clear 'vector))
|
||||
@@ -161,6 +164,7 @@
|
||||
darkecobomb-idle
|
||||
darkecobomb-land))
|
||||
|
||||
|
||||
(defskelgroup *darkecobomb-sg*
|
||||
darkecobomb
|
||||
darkecobomb-lod0-jg
|
||||
@@ -341,6 +345,7 @@
|
||||
(:states
|
||||
greenshot-idle))
|
||||
|
||||
|
||||
(defskelgroup *greenshot-sg*
|
||||
greenshot
|
||||
greenshot-lod0-jg
|
||||
@@ -404,10 +409,11 @@
|
||||
redshot-idle
|
||||
redshot-wait))
|
||||
|
||||
(defmethod relocate ((this redshot) (arg0 int))
|
||||
(if (nonzero? (-> this shot-particle)) (&+! (-> this shot-particle) arg0))
|
||||
(if (nonzero? (-> this test-particle)) (&+! (-> this test-particle) arg0))
|
||||
(the-as redshot ((method-of-type arcing-shot relocate) this arg0)))
|
||||
|
||||
(defmethod relocate ((this redshot) (offset int))
|
||||
(if (nonzero? (-> this shot-particle)) (&+! (-> this shot-particle) offset))
|
||||
(if (nonzero? (-> this test-particle)) (&+! (-> this test-particle) offset))
|
||||
(the-as redshot ((method-of-type arcing-shot relocate) this offset)))
|
||||
|
||||
(defmethod deactivate ((this redshot))
|
||||
(if (nonzero? (-> this shot-particle)) (kill-and-free-particles (-> this shot-particle)))
|
||||
@@ -480,7 +486,7 @@
|
||||
:code
|
||||
(behavior ()
|
||||
(loop
|
||||
(ja :num-func num-func-identity :frame-num (* 0.000016276043 (-> self ring radius-primary)))
|
||||
(ja :num-func num-func-identity :frame-num (/ (-> self ring radius-primary) (meters 15)))
|
||||
(suspend)))
|
||||
:post transform-post)
|
||||
|
||||
@@ -559,6 +565,7 @@
|
||||
(:states
|
||||
yellowshot-idle))
|
||||
|
||||
|
||||
(defstate yellowshot-idle (yellowshot)
|
||||
:event
|
||||
(behavior ((proc process) (argc int) (message symbol) (block event-message-block))
|
||||
|
||||
@@ -483,7 +483,7 @@
|
||||
((ja-group? eichar-flut-walk-ja) (set! f28-0 (ja-frame-num 0)) (-> self skel root-channel 1 frame-interp))
|
||||
(else (ja-channel-push! 2 (the-as time-frame gp-0)) f30-0))))
|
||||
(ja-no-eval :group! eichar-flut-walk-ja :num! (loop!) :dist 49152.0 :frame-num f28-0)
|
||||
(ja-no-eval :chan 1 :group! eichar-flut-run-ja :num! (identity (* 0.5 f28-0)) :frame-interp f30-0 :dist 40960.0)
|
||||
(ja-no-eval :chan 1 :group! eichar-flut-run-ja :num! (identity (/ f28-0 2)) :frame-interp f30-0 :dist 40960.0)
|
||||
(loop
|
||||
(suspend)
|
||||
(let ((f0-13 (lerp-scale (the-as float 0.0)
|
||||
@@ -1162,21 +1162,21 @@
|
||||
(vector-float*! (-> self control transv) (-> self control dynam gravity-normal) f30-0)
|
||||
(vector-float*! gp-3 gp-3 (/ f0-4 f1-3))))))
|
||||
(suspend-for (seconds 1)
|
||||
(target-flut-falling-anim-trans)
|
||||
(vector-seek! (-> self draw color-mult) *zero-vector* (seconds-per-frame))
|
||||
(let ((s5-2 (new-stack-vector0))
|
||||
(f30-1 (the-as number (vector-dot (-> self control dynam gravity-normal) (-> self control transv)))))
|
||||
0.0
|
||||
(vector-! s5-2
|
||||
(-> self control transv)
|
||||
(vector-float*! s5-2 (-> self control dynam gravity-normal) (the-as float f30-1)))
|
||||
(let* ((f0-10 (vector-length s5-2))
|
||||
(f1-4 f0-10))
|
||||
(if (< (the-as float (-> self control unknown-uint20)) (the-as float f30-1)) (set! f30-1 (-> self control unknown-uint20)))
|
||||
(vector+! (-> self control transv)
|
||||
(vector-float*! (-> self control transv) (-> self control dynam gravity-normal) (the-as float f30-1))
|
||||
(vector-float*! s5-2 s5-2 (/ f0-10 f1-4)))))
|
||||
(target-flut-post-post))
|
||||
(target-flut-falling-anim-trans)
|
||||
(vector-seek! (-> self draw color-mult) *zero-vector* (seconds-per-frame))
|
||||
(let ((s5-2 (new-stack-vector0))
|
||||
(f30-1 (the-as number (vector-dot (-> self control dynam gravity-normal) (-> self control transv)))))
|
||||
0.0
|
||||
(vector-! s5-2
|
||||
(-> self control transv)
|
||||
(vector-float*! s5-2 (-> self control dynam gravity-normal) (the-as float f30-1)))
|
||||
(let* ((f0-10 (vector-length s5-2))
|
||||
(f1-4 f0-10))
|
||||
(if (< (the-as float (-> self control unknown-uint20)) (the-as float f30-1)) (set! f30-1 (-> self control unknown-uint20)))
|
||||
(vector+! (-> self control transv)
|
||||
(vector-float*! (-> self control transv) (-> self control dynam gravity-normal) (the-as float f30-1))
|
||||
(vector-float*! s5-2 s5-2 (/ f0-10 f1-4)))))
|
||||
(target-flut-post-post))
|
||||
(camera-change-to (the-as string 'base) 0 #f))
|
||||
(else
|
||||
(set! (-> self control unknown-surface00) *neutral-mods*)
|
||||
|
||||
@@ -855,7 +855,7 @@
|
||||
*entity-pool*)
|
||||
(sound-play "get-small-fish")
|
||||
(send-event (ppointer->process (-> self parent)) 'fisher-fish-caught 1)))
|
||||
(set! (-> self vel) (* 0.25 (-> self vel)))
|
||||
(set! (-> self vel) (/ (-> self vel) 4))
|
||||
(while (< 0.1 (-> self root scale x))
|
||||
(set! (-> self offset) (-> (the-as fisher (-> self parent 0)) paddle))
|
||||
(fisher-fish-move)
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
(:state-methods
|
||||
idle))
|
||||
|
||||
|
||||
(defskelgroup *logtrap-sg*
|
||||
logtrap
|
||||
logtrap-lod0-jg
|
||||
@@ -87,6 +88,7 @@
|
||||
(:states
|
||||
towertop-idle))
|
||||
|
||||
|
||||
(defskelgroup *towertop-sg*
|
||||
towertop
|
||||
towertop-lod0-jg
|
||||
@@ -120,6 +122,7 @@
|
||||
(:states
|
||||
lurkerm-tall-sail-idle))
|
||||
|
||||
|
||||
(defskelgroup *lurkerm-tall-sail-sg*
|
||||
lurkerm-tall-sail
|
||||
lurkerm-tall-sail-lod0-jg
|
||||
@@ -139,11 +142,11 @@
|
||||
:code
|
||||
(behavior ()
|
||||
(loop
|
||||
(ja-no-eval :group! lurkerm-tall-sail-idle-ja :num! (seek! max (* 0.5 (-> self speed))) :frame-num 0.0)
|
||||
(ja-no-eval :group! lurkerm-tall-sail-idle-ja :num! (seek! max (/ (-> self speed) 2)) :frame-num 0.0)
|
||||
(until (ja-done? 0)
|
||||
(quaternion-rotate-local-y! (-> self root quat) (-> self root quat) (* 12743.111 (seconds-per-frame) (-> self speed)))
|
||||
(suspend)
|
||||
(ja :num! (seek! max (* 0.5 (-> self speed)))))))
|
||||
(ja :num! (seek! max (/ (-> self speed) 2))))))
|
||||
:post rider-post)
|
||||
|
||||
(defmethod init-from-entity! ((this lurkerm-tall-sail) (arg0 entity-actor))
|
||||
@@ -189,6 +192,7 @@
|
||||
(:states
|
||||
lurkerm-short-sail-idle))
|
||||
|
||||
|
||||
(defskelgroup *lurkerm-short-sail-sg*
|
||||
lurkerm-short-sail
|
||||
0
|
||||
@@ -205,11 +209,11 @@
|
||||
:code
|
||||
(behavior ()
|
||||
(loop
|
||||
(ja-no-eval :group! (-> self draw art-group data 4) :num! (seek! max (* 0.5 (-> self speed))) :frame-num 0.0)
|
||||
(ja-no-eval :group! (-> self draw art-group data 4) :num! (seek! max (/ (-> self speed) 2)) :frame-num 0.0)
|
||||
(until (ja-done? 0)
|
||||
(quaternion-rotate-local-y! (-> self root quat) (-> self root quat) (* -12743.111 (seconds-per-frame) (-> self speed)))
|
||||
(suspend)
|
||||
(ja :num! (seek! max (* 0.5 (-> self speed)))))))
|
||||
(ja :num! (seek! max (/ (-> self speed) 2))))))
|
||||
:post rider-post)
|
||||
|
||||
(defmethod init-from-entity! ((this lurkerm-short-sail) (arg0 entity-actor))
|
||||
@@ -273,6 +277,7 @@
|
||||
(:states
|
||||
lurkerm-piston-idle))
|
||||
|
||||
|
||||
(defskelgroup *lurkerm-piston-sg*
|
||||
lurkerm-piston
|
||||
lurkerm-piston-geo-jg
|
||||
@@ -350,6 +355,7 @@
|
||||
(:states
|
||||
accordian-idle))
|
||||
|
||||
|
||||
(defskelgroup *accordian-sg*
|
||||
accordian
|
||||
accordian-lod0-jg
|
||||
@@ -394,8 +400,10 @@
|
||||
|
||||
(deftype junglecam (process-hidden) ())
|
||||
|
||||
|
||||
(deftype precurbridgecam (pov-camera) ())
|
||||
|
||||
|
||||
(defstate pov-camera-playing (precurbridgecam)
|
||||
:virtual #t
|
||||
:code
|
||||
@@ -415,6 +423,7 @@
|
||||
|
||||
(deftype precurbridge-span (structure) ())
|
||||
|
||||
|
||||
(deftype precurbridge (process-drawable)
|
||||
((root collide-shape-moving :override)
|
||||
(smush smush-control :inline)
|
||||
@@ -426,6 +435,7 @@
|
||||
(precurbridge-active symbol)
|
||||
precurbridge-idle))
|
||||
|
||||
|
||||
(defskelgroup *precurbridge-sg*
|
||||
precurbridge
|
||||
precurbridge-geo-jg
|
||||
@@ -694,6 +704,7 @@
|
||||
(:states (maindoor-closed symbol)
|
||||
(maindoor-open symbol)))
|
||||
|
||||
|
||||
(defskelgroup *maindoor-sg*
|
||||
maindoor
|
||||
maindoor-lod0-jg
|
||||
@@ -768,6 +779,7 @@
|
||||
|
||||
(deftype sidedoor (eco-door) ())
|
||||
|
||||
|
||||
(defskelgroup *sidedoor-sg*
|
||||
sidedoor
|
||||
sidedoor-geo-jg
|
||||
@@ -807,9 +819,10 @@
|
||||
(:states
|
||||
jngpusher-idle))
|
||||
|
||||
(defmethod relocate ((this jngpusher) (arg0 int))
|
||||
(if (nonzero? (-> this back-prim)) (&+! (-> this back-prim) arg0))
|
||||
(call-parent-method this arg0))
|
||||
|
||||
(defmethod relocate ((this jngpusher) (offset int))
|
||||
(if (nonzero? (-> this back-prim)) (&+! (-> this back-prim) offset))
|
||||
(call-parent-method this offset))
|
||||
|
||||
(defskelgroup *jngpusher-sg*
|
||||
jngpusher
|
||||
@@ -876,6 +889,7 @@
|
||||
|
||||
(deftype jungle-water (water-anim) ())
|
||||
|
||||
|
||||
(define ripple-for-jungle-water
|
||||
(new 'static
|
||||
'ripple-wave-set
|
||||
|
||||
@@ -513,7 +513,7 @@
|
||||
(loop
|
||||
(ja-no-eval :group! (ja-group) :num! (seek! max f30-0) :frame-num 0.0)
|
||||
(until (ja-done? 0)
|
||||
(set! f30-0 (- f30-0 (* 0.002 (-> *display* time-adjust-ratio))))
|
||||
(set! f30-0 (- f30-0 (/ (-> *display* time-adjust-ratio) 500)))
|
||||
(if (< f30-0 0.0) (go energybase-stopped))
|
||||
(suspend)
|
||||
(ja :num! (seek! max f30-0))))))
|
||||
|
||||
@@ -216,7 +216,7 @@ baby-spider-default-event-handler
|
||||
(f1-1 (+ 1.0 (* 2.0 f0-0)))
|
||||
(f2-2 f1-1)
|
||||
(f2-4 (/ 1.0 f2-2))
|
||||
(f0-2 (+ 1.0 (* 0.2 f0-0))))
|
||||
(f0-2 (+ 1.0 (/ f0-0 5))))
|
||||
(set! (-> this delta-wiggle-angle) (* 910.2222 f1-1))
|
||||
(set! (-> this wiggle-factor) (* 1.5 f2-4))
|
||||
(set! (-> this target-speed) (* 28672.0 f0-2)))
|
||||
@@ -383,7 +383,10 @@ baby-spider-default-event-handler
|
||||
(ja-no-eval :num! (loop!))
|
||||
(logclear! (-> self nav-enemy-flags) (nav-enemy-flags enable-travel))
|
||||
(let ((gp-0 (rand-vu-int-range 300 600)))
|
||||
(suspend-for gp-0 (ja :num-func num-func-identity :frame-num 0.0) (ja-blend-eval) (suspend)))))))
|
||||
(suspend-for gp-0
|
||||
(ja :num-func num-func-identity :frame-num 0.0)
|
||||
(ja-blend-eval)
|
||||
(suspend)))))))
|
||||
|
||||
(defstate nav-enemy-give-up (baby-spider)
|
||||
:virtual #t
|
||||
|
||||
@@ -254,7 +254,7 @@
|
||||
(let* ((f0-5 (-> this path-u))
|
||||
(f30-0 (* (-> this path-dir) f1-1 (seconds-per-frame)))
|
||||
(s4-0 #t)
|
||||
(f0-6 (+ f0-5 (* 0.00024414062 (-> this path-units-per-meter) f30-0))))
|
||||
(f0-6 (+ f0-5 (* (/ (-> this path-units-per-meter) METER_LENGTH) f30-0))))
|
||||
(cond
|
||||
((< f0-6 0.0)
|
||||
(set! s4-0 #f)
|
||||
@@ -406,7 +406,7 @@
|
||||
((< f0-2 143360.0)
|
||||
(let ((f0-3 (driller-lurker-method-23 this))
|
||||
(f1-5 (-> this path-u)))
|
||||
(if (>= (* 0.1 (-> this path-units-per-meter)) (fabs (- f0-3 f1-5))) (return #t)))))))))
|
||||
(if (>= (/ (-> this path-units-per-meter) 10) (fabs (- f0-3 f1-5))) (return #t)))))))))
|
||||
#f)
|
||||
|
||||
(defmethod driller-lurker-method-27 ((this driller-lurker))
|
||||
@@ -547,7 +547,7 @@
|
||||
(s5-0 (method-of-object gp-0 path-control-method-20)))
|
||||
(target-pos 0)
|
||||
(let ((f0-1 (- (s5-0 gp-0) (-> self path-u))))
|
||||
(when (>= (fabs f0-1) (* 0.1 (-> self path-units-per-meter)))
|
||||
(when (>= (fabs f0-1) (/ (-> self path-units-per-meter) 10))
|
||||
(cond
|
||||
((< 0.0 f0-1) (when (< (-> self path-dir) 0.0) (set! (-> self path-dir) 1.0) (set! (-> self path-speed) 0.0)))
|
||||
(else (when (>= (-> self path-dir) 0.0) (set! (-> self path-dir) -1.0) (set! (-> self path-speed) 0.0)))))))
|
||||
|
||||
@@ -415,7 +415,7 @@
|
||||
(set! (-> this route surface-dist) f0-25)
|
||||
(set! (-> this route total-dist) (+ 20480.0 f0-25))))
|
||||
(set! (-> this route total-travel-time)
|
||||
(the-as time-frame (the int (/ (-> this route total-dist) (* 0.016666668 (-> this speed))))))
|
||||
(the-as time-frame (the int (/ (-> this route total-dist) (/ (-> this speed) 60)))))
|
||||
(none))
|
||||
|
||||
(defmethod gnawer-method-22 ((this gnawer) (arg0 float))
|
||||
@@ -459,7 +459,7 @@
|
||||
(let ((f0-1 (+ 10240.0 (-> this route surface-dist))))
|
||||
(cond
|
||||
((< arg3 10240.0)
|
||||
(let ((f0-3 (* 0.00009765625 arg3))) (vector-float*! (-> gp-0 world-pos) (-> this route src-pt-offset) f0-3))
|
||||
(let ((f0-3 (/ arg3 (meters 2.5)))) (vector-float*! (-> gp-0 world-pos) (-> this route src-pt-offset) f0-3))
|
||||
(set! (-> gp-0 world-pos y) (-> this route src-pt-offset y))
|
||||
(vector+! (-> gp-0 world-pos) (-> gp-0 world-pos) (-> this post-trans)))
|
||||
((< arg3 f0-1)
|
||||
|
||||
@@ -399,7 +399,7 @@
|
||||
(let ((f0-1 (fmax 0.0 (- (-> this dist-from-anchor) (-> this idle-dist-from-anchor)))))
|
||||
(cond
|
||||
((>= f0-1 20480.0) (vector-identity! (-> this root scale)))
|
||||
(else (let ((f0-2 (* 0.000048828126 f0-1))) (set-vector! (-> this root scale) f0-2 f0-2 f0-2 1.0)))))
|
||||
(else (let ((f0-2 (/ f0-1 (meters 5)))) (set-vector! (-> this root scale) f0-2 f0-2 f0-2 1.0)))))
|
||||
(if arg0 (shadow-handler this))
|
||||
(let ((s4-1 (-> this leg-socket-part-mask)))
|
||||
(when (nonzero? s4-1)
|
||||
@@ -503,7 +503,7 @@
|
||||
(vector+! v1-51 (-> this root trans) (-> this anchor-trans))
|
||||
(vector-float*! v1-51 v1-51 0.5)
|
||||
(vector-! v1-51 v1-51 (-> this root trans))
|
||||
(set! (-> v1-51 w) (+ 28672.0 (* 0.5 (-> this dist-from-anchor)))))
|
||||
(set! (-> v1-51 w) (+ 28672.0 (/ (-> this dist-from-anchor) 2))))
|
||||
(cond
|
||||
((!= (-> this spin-vel) 0.0)
|
||||
(let ((f0-44 (+ (-> this orient-rot y) (* (-> this spin-vel) (seconds-per-frame)))))
|
||||
|
||||
@@ -399,8 +399,7 @@
|
||||
(-> this info max-buoyancy-depth))))
|
||||
(vector-float*! s5-0
|
||||
*y-vector*
|
||||
(* 0.25
|
||||
(-> this buoyancy-factor)
|
||||
(* (/ (-> this buoyancy-factor) 4)
|
||||
(-> this info gravity-factor)
|
||||
(fmax 0.3 (fmin 1.0 f0-6))
|
||||
(-> this info gravity)
|
||||
@@ -498,7 +497,7 @@
|
||||
(seek! (-> self throttle-control) 0.0 (* 0.25 (seconds-per-frame))))))
|
||||
(seek! (-> self engine-thrust)
|
||||
(* (-> self throttle-control) (-> *BALLOONLURKER-bank* max-engine-thrust))
|
||||
(* 0.005 (-> *BALLOONLURKER-bank* max-engine-thrust)))
|
||||
(/ (-> *BALLOONLURKER-bank* max-engine-thrust) 200))
|
||||
(let ((f0-31 60.0)
|
||||
(f1-14 1820.4445)
|
||||
(f2-6 6735.6445)
|
||||
|
||||
@@ -1066,7 +1066,7 @@
|
||||
(let ((f0-3 (vector-dot gp-0 v1-4))
|
||||
(f1-1 (vector-dot a0-4 v1-4)))
|
||||
(cond
|
||||
((and (< 0.0 f1-1) (< (fabs (* 0.5 f0-3)) f1-1))
|
||||
((and (< 0.0 f1-1) (< (fabs (/ f0-3 2)) f1-1))
|
||||
(if (send-event *target* 'query 'powerup (pickup-type eco-red)) (go mis-bone-bridge-fall #f) (go mis-bone-bridge-hit)))
|
||||
(else (go mis-bone-bridge-bump) #f))))))))
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
(set! (-> arg0 min) arg1)
|
||||
(set! (-> arg0 range) (the float (sar (shl (the int (- arg2 arg1)) 48) 48)))
|
||||
(if (< (-> arg0 range) 0.0) (+! (-> arg0 range) 65536.0))
|
||||
(set! (-> arg0 value) (* 0.5 (-> arg0 range)))
|
||||
(set! (-> arg0 value) (/ (-> arg0 range) 2))
|
||||
(set! (-> arg0 speed) arg3)
|
||||
0
|
||||
(none))
|
||||
@@ -658,9 +658,9 @@
|
||||
(vector-float*! (-> self root transv) (-> self root transv) 0.5)
|
||||
(update-transforms! (-> self root))
|
||||
(fill-cache-integrate-and-collide! (-> self root) (-> self root transv) (-> self root root-prim collide-with))
|
||||
(seek! (-> self root scale x) 0.0 (* 0.01 (-> *display* time-adjust-ratio)))
|
||||
(seek! (-> self root scale y) 0.0 (* 0.01 (-> *display* time-adjust-ratio)))
|
||||
(seek! (-> self root scale z) 0.0 (* 0.01 (-> *display* time-adjust-ratio)))
|
||||
(seek! (-> self root scale x) 0.0 (/ (-> *display* time-adjust-ratio) 100))
|
||||
(seek! (-> self root scale y) 0.0 (/ (-> *display* time-adjust-ratio) 100))
|
||||
(seek! (-> self root scale z) 0.0 (/ (-> *display* time-adjust-ratio) 100))
|
||||
(when (< 0.05 (-> self root scale x))
|
||||
(suspend)
|
||||
(goto cfg-3))
|
||||
@@ -969,7 +969,7 @@
|
||||
|
||||
|
||||
(defun solve-missile-tilt ((arg0 quadratic-solution) (arg1 float) (arg2 float) (arg3 float) (arg4 float))
|
||||
(let* ((f1-3 (* 0.5 arg2 arg2 arg4))
|
||||
(let* ((f1-3 (* (/ arg2 2) arg2 arg4))
|
||||
(f0-3 f1-3)
|
||||
(f30-0 (- (* arg2 arg1 arg1)))
|
||||
(f2-6 (+ f1-3 (* arg1 arg1 arg3)))
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
muse-caught
|
||||
muse-idle))
|
||||
|
||||
|
||||
(deftype point-on-path-segment-info (structure)
|
||||
((point vector :inline)
|
||||
(segment vector 2 :inline)
|
||||
@@ -30,6 +31,7 @@
|
||||
(distance-to-segment float)
|
||||
(parametric-index float)))
|
||||
|
||||
|
||||
(defun analyze-point-on-path-segment ((arg0 point-on-path-segment-info))
|
||||
(vector-! (-> arg0 dir) (-> arg0 segment 1) (the-as vector (-> arg0 segment)))
|
||||
(vector-normalize! (-> arg0 dir) 1.0)
|
||||
@@ -81,8 +83,8 @@
|
||||
(set! f30-0 (+ f22-0 (-> gp-0 parametric-index)))))
|
||||
0))
|
||||
(let ((f0-6 (- f30-0 f28-0)))
|
||||
(if (< f0-6 (* -0.5 (-> self max-path-index))) (+! f0-6 (-> self max-path-index)))
|
||||
(if (< (* 0.5 (-> self max-path-index)) f0-6) (set! f0-6 (- f0-6 (-> self max-path-index))))
|
||||
(if (< f0-6 (/ (-> self max-path-index) -2)) (+! f0-6 (-> self max-path-index)))
|
||||
(if (< (/ (-> self max-path-index) 2) f0-6) (set! f0-6 (- f0-6 (-> self max-path-index))))
|
||||
(cond
|
||||
((>= f0-6 0.0)
|
||||
(set! (-> self dest-path-index) (the float (the int (+ 2.5 f30-0))))
|
||||
@@ -186,7 +188,7 @@ nav-enemy-default-event-handler
|
||||
(ja :group! muse-run-ja :num! min)
|
||||
(loop
|
||||
(suspend)
|
||||
(ja :num! (loop! (* 0.000016276043 (-> self momentum-speed))))))
|
||||
(ja :num! (loop! (/ (-> self momentum-speed) (meters 15))))))
|
||||
:post
|
||||
(behavior ()
|
||||
(set! (-> self nav destination-pos quad) (-> self dest-point quad))
|
||||
|
||||
@@ -557,7 +557,7 @@
|
||||
(set! (-> gp-0 quad)
|
||||
(-> (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node quicksandlurker-lod0-jg jawEND)) quad))
|
||||
(vector-! s5-0 (target-pos 5) gp-0)
|
||||
(let ((f1-0 (vector-xz-length s5-0))) (set! (-> s5-0 y) (fmin (-> s5-0 y) (* 0.5 f1-0))))
|
||||
(let ((f1-0 (vector-xz-length s5-0))) (set! (-> s5-0 y) (fmin (-> s5-0 y) (/ f1-0 2))))
|
||||
(vector-normalize! s5-0 49152.0)
|
||||
(spawn-quicksandlurker-missile self gp-0 s5-0 (-> self entity)))
|
||||
(process-spawn part-tracker :init part-tracker-init (-> *part-group-id-table* 199) -1 #f #f #f gp-0 :to *entity-pool*)))
|
||||
|
||||
@@ -346,7 +346,7 @@
|
||||
0.0
|
||||
(let* ((f1-6 (* -81920.0 (the float (-> self rank))))
|
||||
(f0-10 (+ (if (< f26-0 f0-6) (fmax (+ -81920.0 f1-6) (- f26-0 f0-6)) (fmin (+ 245760.0 f1-6) (- f26-0 f0-6))) f28-0))
|
||||
(f1-10 (* 0.000012207031 f0-10))
|
||||
(f1-10 (/ f0-10 (meters 20)))
|
||||
(f0-12 (fmax -0.5 (fmin 0.5 f1-10))))
|
||||
(set! (-> self speed) (+ (* (+ 0.5 f0-12) (- arg2 arg3)) arg3))))
|
||||
;; og:preserve-this PAL patch here
|
||||
|
||||
@@ -886,7 +886,7 @@
|
||||
;; og:preserve-this
|
||||
(set! (-> gp-0 src) (-> self node-list data (#if *jak1-full-game* 50 52) bone transform vector 3))
|
||||
(set! (-> gp-0 duration)
|
||||
(the-as time-frame (the int (* 300.0 (+ 1.25 (* -0.25 (-> self level)) (/ 0.5 (-> self difficulty)))))))
|
||||
(the-as time-frame (the int (* 300.0 (+ 1.25 (/ (-> self level) -4) (/ 0.5 (-> self difficulty)))))))
|
||||
(set! (-> gp-0 pickup-type) arg0)
|
||||
(set! (-> gp-0 blast-radius) 32768.0)
|
||||
(cond
|
||||
@@ -1057,7 +1057,7 @@
|
||||
(set! f28-0
|
||||
(cond
|
||||
((< (-> self try-count) (the-as uint 5)) (* 0.0 f28-0))
|
||||
((< (-> self try-count) (the-as uint 10)) (* 0.5 f28-0))
|
||||
((< (-> self try-count) (the-as uint 10)) (/ f28-0 2))
|
||||
(else (empty) f28-0)))
|
||||
(if (and *target* (< (rand-vu) f28-0)) (set! boulder-pickup (pickup-type eco-green))))
|
||||
(ogreboss-shoot-boulder (the-as pickup-type boulder-pickup)))
|
||||
@@ -1099,7 +1099,7 @@
|
||||
(when (and (> (-> self hit-count) 0) (>= 45.0 f30-0))
|
||||
(set! f0-0
|
||||
(+ (ja-aframe (the-as float 0.0) 1)
|
||||
(* 0.022222223 f30-0 (- (ja-aframe (the-as float 8.0) 1) (ja-aframe (the-as float 0.0) 1)))))
|
||||
(* (/ f30-0 45) (- (ja-aframe (the-as float 8.0) 1) (ja-aframe (the-as float 0.0) 1)))))
|
||||
(set! f1-0
|
||||
(cond
|
||||
((< f30-0 7.5) (* 0.120000005 f30-0))
|
||||
@@ -1210,7 +1210,7 @@
|
||||
:code
|
||||
(behavior ()
|
||||
(set! (-> self shuffle-pos) 0.0)
|
||||
(let ((f30-0 (+ 1.0 (* 0.25 (-> self difficulty) (-> self level))))
|
||||
(let ((f30-0 (+ 1.0 (* (/ (-> self difficulty) 4) (-> self level))))
|
||||
(gp-0 (if (rand-vu-percent? (the-as float 0.5)) 0 1)))
|
||||
(ja-channel-push! 1 (seconds 0.2))
|
||||
(ja-no-eval :group! ogreboss-shuffle-prepare-ja :num! (seek! max f30-0) :frame-num 0.0)
|
||||
|
||||
@@ -642,7 +642,7 @@
|
||||
(let ((s5-0 (-> self parent-override))
|
||||
(gp-0 (new 'stack 'joint-exploder-tuning 1)))
|
||||
(let* ((f0-0 (vector-length (-> s5-0 0 control transv)))
|
||||
(f30-0 (fmin 1.0 (* 0.000008138021 f0-0))))
|
||||
(f30-0 (fmin 1.0 (/ f0-0 (meters 30)))))
|
||||
(set! (-> gp-0 duration) (seconds 5))
|
||||
(set! (-> gp-0 fountain-rand-transv-hi x) (fmax 24576.0 f0-0))
|
||||
(set! (-> gp-0 fountain-rand-transv-hi y) (+ 81920.0 f0-0))
|
||||
@@ -698,7 +698,7 @@
|
||||
(set! (-> self racer stick-lock) #t)
|
||||
(send-event *camera* 'joystick 0.0 1.0)
|
||||
(seek! (-> self control unknown-vector11 y) 6144.0 (* 12288.0 (seconds-per-frame)))
|
||||
(if (>= (ja-aframe-num 0) 245.0) (set-forward-vel (* 0.5 (-> self control unknown-float01))))
|
||||
(if (>= (ja-aframe-num 0) 245.0) (set-forward-vel (/ (-> self control unknown-float01) 2)))
|
||||
(suspend)
|
||||
(ja :num! (seek!))))))
|
||||
(('melt)
|
||||
@@ -735,18 +735,18 @@
|
||||
(vector-float*! (-> self control transv) (-> self control dynam gravity-normal) f2-2)
|
||||
(vector-float*! gp-8 gp-8 (/ f0-29 f1-9)))))
|
||||
(suspend-for (seconds 0.75)
|
||||
(vector-seek! (-> self draw color-mult) *zero-vector* (* 1.5 (seconds-per-frame)))
|
||||
(set-forward-vel (* 0.96 (-> self control unknown-float01)))
|
||||
(let ((s5-3 (new-stack-vector0))
|
||||
(f28-0 (vector-dot (-> self control dynam gravity-normal) (-> self control transv))))
|
||||
0.0
|
||||
(vector-! s5-3 (-> self control transv) (vector-float*! s5-3 (-> self control dynam gravity-normal) f28-0))
|
||||
(let* ((f0-38 (vector-length s5-3))
|
||||
(f1-12 f0-38))
|
||||
(if (< f30-0 f28-0) (set! f28-0 f30-0))
|
||||
(vector+! (-> self control transv)
|
||||
(vector-float*! (-> self control transv) (-> self control dynam gravity-normal) f28-0)
|
||||
(vector-float*! s5-3 s5-3 (/ f0-38 f1-12)))))))
|
||||
(vector-seek! (-> self draw color-mult) *zero-vector* (* 1.5 (seconds-per-frame)))
|
||||
(set-forward-vel (* 0.96 (-> self control unknown-float01)))
|
||||
(let ((s5-3 (new-stack-vector0))
|
||||
(f28-0 (vector-dot (-> self control dynam gravity-normal) (-> self control transv))))
|
||||
0.0
|
||||
(vector-! s5-3 (-> self control transv) (vector-float*! s5-3 (-> self control dynam gravity-normal) f28-0))
|
||||
(let* ((f0-38 (vector-length s5-3))
|
||||
(f1-12 f0-38))
|
||||
(if (< f30-0 f28-0) (set! f28-0 f30-0))
|
||||
(vector+! (-> self control transv)
|
||||
(vector-float*! (-> self control transv) (-> self control dynam gravity-normal) f28-0)
|
||||
(vector-float*! s5-3 s5-3 (/ f0-38 f1-12)))))))
|
||||
(camera-change-to (the-as string 'base) 0 #f)))
|
||||
(set! (-> self control transv quad) (the-as uint128 0))
|
||||
(set! (-> self control unknown-float01) 0.0)
|
||||
@@ -870,12 +870,12 @@
|
||||
(ja :chan 2 :group! eichar-racer-dig-ja :num! (chan 0))
|
||||
(ja :chan 3 :group! eichar-racer-dig2-ja :num! (chan 0)))
|
||||
(suspend-for (seconds 0.5)
|
||||
(set! (-> self racer stick-lock) #t)
|
||||
(set-forward-vel (* 0.9 (-> self control unknown-float01)))
|
||||
(set! (-> self racer turn-anim-targ) 0.0)
|
||||
(set! (-> self racer turn-anim-targ) 0.0)
|
||||
(target-racing-turn-anim)
|
||||
(seek! (-> self control unknown-vector11 y) 6144.0 (* 3.0 (seconds-per-frame))))
|
||||
(set! (-> self racer stick-lock) #t)
|
||||
(set-forward-vel (* 0.9 (-> self control unknown-float01)))
|
||||
(set! (-> self racer turn-anim-targ) 0.0)
|
||||
(set! (-> self racer turn-anim-targ) 0.0)
|
||||
(target-racing-turn-anim)
|
||||
(seek! (-> self control unknown-vector11 y) 6144.0 (* 3.0 (seconds-per-frame))))
|
||||
(go target-racing-get-off-jump arg0))
|
||||
:post target-racing-post)
|
||||
|
||||
|
||||
@@ -133,8 +133,8 @@
|
||||
(let ((f30-1 (if (or (< (* arg1 arg0) 0.0) (not (racer-on-ground?)))
|
||||
1.0
|
||||
(+ 1.0 (* (fabs arg1) (lerp-scale 0.0 3.0 (-> self control unknown-float01) 0.0 (-> self racer transv-max))))))
|
||||
(f28-1 (lerp-scale 32768.0 20024.889 (-> self control unknown-float01) 0.0 (* 0.5 (-> self racer transv-max))))
|
||||
(f0-18 (lerp-scale 91022.22 236657.78 (-> self control unknown-float01) 0.0 (* 0.125 (-> self racer transv-max)))))
|
||||
(f28-1 (lerp-scale 32768.0 20024.889 (-> self control unknown-float01) 0.0 (/ (-> self racer transv-max) 2)))
|
||||
(f0-18 (lerp-scale 91022.22 236657.78 (-> self control unknown-float01) 0.0 (/ (-> self racer transv-max) 8))))
|
||||
(seek! (-> self racer rotv y) (* arg0 f30-1 (- f28-1)) (* f0-18 (seconds-per-frame))))
|
||||
(set! (-> self racer rotv y)
|
||||
(* (-> self racer rotv y) (lerp-scale 0.99 0.9 (-> self control unknown-float01) 0.0 (-> self racer transv-max))))
|
||||
@@ -192,7 +192,7 @@
|
||||
(when (< 0.0 f0-0)
|
||||
(let ((f1-4 (* f0-0 (+ (-> self control unknown-surface01 target-speed) (-> self racer boost-output) (-> self racer hill-boost)))))
|
||||
(+! (-> self control unknown-vector00 z) (* f1-4 (seconds-per-frame)))))
|
||||
(seek! (-> self racer front-rotv) (+ 65536.0 (* 364088.88 (+ f0-0 (* 0.1 arg1)))) (* 364088.88 (seconds-per-frame))))
|
||||
(seek! (-> self racer front-rotv) (+ 65536.0 (* 364088.88 (+ f0-0 (/ arg1 10)))) (* 364088.88 (seconds-per-frame))))
|
||||
(set! (-> self racer front-rot)
|
||||
(the float (sar (shl (the int (+ (-> self racer front-rot) (* (-> self racer front-rotv) (seconds-per-frame)))) 48) 48)))
|
||||
(let* ((f1-12 (-> self control unknown-surface01 fric))
|
||||
@@ -438,7 +438,7 @@
|
||||
(set! (-> *part-id-table* 2275 init-specs 4 initial-valuef) (+ 24576.0 f1-3))
|
||||
(set! (-> *part-id-table* 2275 init-specs 19 initial-valuef) (+ 49152.0 f1-3))
|
||||
(set! (-> *part-id-table* 2275 init-specs 1 initial-valuef) (* 0.0000036621095 f0-17))
|
||||
(set! (-> *part-id-table* 2275 init-specs 2 initial-valuef) (* 0.1 f0-17))
|
||||
(set! (-> *part-id-table* 2275 init-specs 2 initial-valuef) (/ f0-17 10))
|
||||
(launch-particles :system *sp-particle-system-3d* (-> *part-id-table* 2275) s4-2)
|
||||
(launch-particles :system *sp-particle-system-3d* (-> *part-id-table* 2276) s4-2)))
|
||||
(-> *part-id-table* 2208))
|
||||
@@ -508,8 +508,8 @@
|
||||
(set! f26-0 (-> *RACER-bank* lavatube-surface-heat-inc))
|
||||
(set! f30-2 (-> *RACER-bank* lavatube-jump-heat-inc))))
|
||||
(let* ((f20-0 (get-health-percent-lost *game-info* #f))
|
||||
(f22-1 (lerp-scale f22-0 (* 0.5 f22-0) f20-0 0.0 1.0))
|
||||
(f24-1 (lerp-scale f24-0 (* 0.33333334 f24-0) f20-0 0.0 1.0)))
|
||||
(f22-1 (lerp-scale f22-0 (/ f22-0 2) f20-0 0.0 1.0))
|
||||
(f24-1 (lerp-scale f24-0 (/ f24-0 3) f20-0 0.0 1.0)))
|
||||
(case (-> self control poly-pat material)
|
||||
(((pat-material hotcoals)) (seek! (-> self racer heat) (-> *RACER-bank* heat-max) (* f22-1 (seconds-per-frame))))
|
||||
(((pat-material lava))
|
||||
@@ -659,7 +659,7 @@
|
||||
(set-twist! (-> self racer tail) (the-as float #f) (the-as float #f) (* -273.06668 (-> self racer tail-anim-frame)))
|
||||
(let ((f30-2 (fmin 1.0 (* 2.0 (fabs (-> self racer slide-shift-x))))))
|
||||
(ja :num-func num-func-identity :frame-num (ja-aframe (-> self racer turn-anim-frame) 0))
|
||||
(ja :chan 1 :num! (chan 0) :frame-interp (+ 0.5 (* 0.025 (-> self racer tail-anim-frame))))
|
||||
(ja :chan 1 :num! (chan 0) :frame-interp (+ 0.5 (/ (-> self racer tail-anim-frame) 40)))
|
||||
(let ((gp-2 (-> self skel root-channel 2)))
|
||||
;; og:preserve-this changed for high fps
|
||||
(let ((f0-82 (lerp (-> self racer slide-interp) f30-2 (* DISPLAY_FPS_RATIO 0.125))))
|
||||
@@ -671,7 +671,7 @@
|
||||
:num!
|
||||
(chan 0)
|
||||
:frame-interp
|
||||
(* (-> self racer slide-interp) (+ 0.5 (* 0.025 (-> self racer tail-anim-frame)))))
|
||||
(* (-> self racer slide-interp) (+ 0.5 (/ (-> self racer tail-anim-frame) 40))))
|
||||
0
|
||||
(none))
|
||||
|
||||
@@ -687,7 +687,7 @@
|
||||
(set! s4-0 s5-0)))
|
||||
(suspend)
|
||||
(let ((f0-4 (lerp-scale 2.0 1.0 (ja-aframe-num 0) 0.0 22.0)))
|
||||
(if (= (-> self next-state name) 'target-racing-falling) (set! f0-4 (* 0.5 f0-4)))
|
||||
(if (= (-> self next-state name) 'target-racing-falling) (set! f0-4 (/ f0-4 2)))
|
||||
(ja :num! (seek! max f0-4)))
|
||||
(set! f30-0 (ja-aframe-num 0))
|
||||
(ja-blend-eval)))
|
||||
@@ -803,8 +803,8 @@
|
||||
(let ((f1-16 (+ (-> self racer bob-timer) (* (-> self racer bob-meta-timer) (-> *display* time-adjust-ratio))))
|
||||
(f2-12 (-> self racer bob-period)))
|
||||
(set! (-> self racer bob-timer) (- f1-16 (* (the float (the int (/ f1-16 f2-12))) f2-12))))
|
||||
(when (!= (the int (/ f0-52 (* 0.5 (-> self racer bob-period))))
|
||||
(the int (/ (-> self racer bob-timer) (* 0.5 (-> self racer bob-period)))))
|
||||
(when (!= (the int (/ f0-52 (/ (-> self racer bob-period) 2)))
|
||||
(the int (/ (-> self racer bob-timer) (/ (-> self racer bob-period) 2))))
|
||||
(seek! (-> self racer bob-mult-trans) 1.0 0.75)
|
||||
(if (< 1.5 (-> self racer bob-meta-meta-timer)) (seek! (-> self racer bob-meta-meta-timer) 1.0 0.5))
|
||||
(when (time-elapsed? (-> self racer bob-meta-time) (seconds 2.2))
|
||||
@@ -825,7 +825,7 @@
|
||||
((= v1-128 2) (* -0.035555556 f0-77))
|
||||
((= v1-128 3) (* -0.017777778 f0-77))
|
||||
(else (* -0.13333334 f0-77)))))
|
||||
(if (-> self racer hop?) (set! f1-36 (* 0.5 f1-36)))
|
||||
(if (-> self racer hop?) (set! f1-36 (/ f1-36 2)))
|
||||
(if (= (-> self control unknown-surface00 mode) 'air)
|
||||
(set! (-> self racer targ-rotx) (fmax -2730.6667 (fmin 5461.3335 f1-36)))))
|
||||
(cond
|
||||
|
||||
@@ -478,9 +478,9 @@
|
||||
(defun seconds->race-time ((arg0 race-time) (arg1 time-frame))
|
||||
(let* ((v1-1 (max 0 (min #x2bf1d arg1)))
|
||||
(f0-1 (* 0.0033333334 (the float v1-1))))
|
||||
(set! (-> arg0 digit 0) (the int (* 0.016666668 f0-1)))
|
||||
(set! (-> arg0 digit 0) (the int (/ f0-1 60)))
|
||||
(let ((f0-2 (- f0-1 (* 60.0 (the float (-> arg0 digit 0))))))
|
||||
(set! (-> arg0 digit 1) (the int (* 0.1 f0-2)))
|
||||
(set! (-> arg0 digit 1) (the int (/ f0-2 10)))
|
||||
(let ((f0-3 (- f0-2 (* 10.0 (the float (-> arg0 digit 1))))))
|
||||
(set! (-> arg0 digit 2) (the int f0-3))
|
||||
(let ((f0-4 (- f0-3 (the float (-> arg0 digit 2)))))
|
||||
|
||||
@@ -21,7 +21,8 @@
|
||||
(set! (-> *camera-other-root* quad) (-> *math-camera* trans quad))
|
||||
(set-time! (-> self state-time))
|
||||
(loop
|
||||
(*! arg2 (- 1.0 (* 0.05 (-> *display* time-adjust-ratio)))) ;; og:preserve-this changed for high fps
|
||||
(dotimes (v1-14 (the int (-> *display* time-adjust-ratio)))
|
||||
(set! arg2 (* 0.95 arg2)))
|
||||
(when (and (< (fabs arg2) 13.653334) (time-elapsed? (-> self state-time) (seconds 1.5)))
|
||||
(if *target* (process-release? *target*))
|
||||
(go-virtual wait))
|
||||
@@ -84,6 +85,7 @@
|
||||
robber-initial-notice
|
||||
robber-tired))
|
||||
|
||||
|
||||
(defskelgroup *robber-sg*
|
||||
robber
|
||||
robber-lod0-jg
|
||||
@@ -181,7 +183,7 @@
|
||||
(let* ((f2-1 (/ (- (vector-length gp-1) arg0) (- arg1 arg0)))
|
||||
(f0-4 (- 1.0 (fmax 0.0 (fmin 1.0 f2-1))))
|
||||
(f0-5 (lerp arg3 arg2 f0-4))
|
||||
(f30-0 (* 0.0033333334 f0-5)))
|
||||
(f30-0 (/ f0-5 300)))
|
||||
(cond
|
||||
((or (not arg4) (< arg0 (vector-length gp-1))) (if (< (-> self speed) 0.0) (set! f30-0 (- f30-0))))
|
||||
((< (vector-dot gp-1 (-> self tangent)) 0.0) (set! f30-0 (- f30-0))))
|
||||
|
||||
@@ -947,7 +947,7 @@
|
||||
(if (< f30-1 13107.2) (go ice-cube-mean-charge-done))
|
||||
(set! (-> self collide-info transv quad) (-> self nav travel quad))
|
||||
(if (< (-> self speed) f30-1) (set! f30-1 (-> self speed)))
|
||||
(set! (-> self anim-blend) (fmin 1.0 (* 0.000016276043 f30-1)))
|
||||
(set! (-> self anim-blend) (fmin 1.0 (/ f30-1 (meters 15))))
|
||||
(vector-normalize! (-> self collide-info transv) f30-1))
|
||||
(+! (-> self collide-info transv y) -36864.0)
|
||||
(quaternion-rotate-y-to-vector! (-> self collide-info quat)
|
||||
|
||||
@@ -11,14 +11,17 @@
|
||||
(:states
|
||||
snow-ball-shadow-idle))
|
||||
|
||||
|
||||
(deftype snow-ball-junction (structure)
|
||||
((enter-time time-frame)
|
||||
(exit-time time-frame)))
|
||||
|
||||
|
||||
(deftype snow-ball-path-info (structure)
|
||||
((hug-path? symbol)
|
||||
(path-pos vector :inline)))
|
||||
|
||||
|
||||
(deftype snow-ball-roller (process-drawable)
|
||||
((root collide-shape-moving :override)
|
||||
(which-path int32)
|
||||
@@ -42,6 +45,7 @@
|
||||
(:states
|
||||
snow-ball-roller-idle))
|
||||
|
||||
|
||||
(deftype snow-ball (process)
|
||||
((child-override (pointer snow-ball-roller) :overlay-at child)
|
||||
(state-time time-frame)
|
||||
@@ -55,6 +59,7 @@
|
||||
(:states
|
||||
snow-ball-idle))
|
||||
|
||||
|
||||
(defskelgroup *snow-ball-sg*
|
||||
snow-ball
|
||||
snow-ball-lod0-jg
|
||||
@@ -189,7 +194,7 @@
|
||||
(cond
|
||||
((>= f0-23 245760.0) (deactivate self))
|
||||
(else
|
||||
(let ((f0-25 (- 1.0 (* 0.0000040690106 f0-23))))
|
||||
(let ((f0-25 (- 1.0 (/ f0-23 (meters 60)))))
|
||||
(set! (-> self root scale x) f0-25)
|
||||
(set! (-> self root scale y) f0-25)
|
||||
(set! (-> self root scale z) f0-25))))))
|
||||
@@ -367,10 +372,10 @@
|
||||
(suspend)
|
||||
(b! #t cfg-1 :delay (nop!))))
|
||||
|
||||
(defmethod relocate ((this snow-ball) (arg0 int))
|
||||
(defmethod relocate ((this snow-ball) (offset int))
|
||||
(dotimes (v1-0 2)
|
||||
(if (nonzero? (-> this path v1-0)) (&+! (-> this path v1-0) arg0)))
|
||||
(call-parent-method this arg0))
|
||||
(if (nonzero? (-> this path v1-0)) (&+! (-> this path v1-0) offset)))
|
||||
(call-parent-method this offset))
|
||||
|
||||
(defmethod init-from-entity! ((this snow-ball) (arg0 entity-actor))
|
||||
(set! (-> this last-path-picked) 1)
|
||||
|
||||
@@ -319,7 +319,9 @@
|
||||
:num!
|
||||
(identity (rand-vu-float-range 0.0 (the float (+ (-> (ja-group) data 0 length) -1)))))
|
||||
(loop
|
||||
(let ((s5-1 (current-time))) (until (time-elapsed? s5-1 (seconds 2.52)) (suspend) (ja :num! (loop!))))
|
||||
(suspend-for (seconds 2.52)
|
||||
(suspend)
|
||||
(ja :num! (loop!)))
|
||||
(cond
|
||||
((zero? gp-2) (if (nav-enemy-method-53 self) (go-virtual snow-bunny-patrol-hop)))
|
||||
(else (+! gp-2 -1)))))))
|
||||
@@ -355,7 +357,7 @@
|
||||
(when (>= f30-0 6144.0)
|
||||
(when (nav-enemy-method-51 this s5-0 s5-0)
|
||||
(set! (-> this final-dest quad) (-> s5-0 quad))
|
||||
(set! (-> this halfway-dist) (* 0.5 f30-0))
|
||||
(set! (-> this halfway-dist) (/ f30-0 2))
|
||||
(set! (-> this base-hop-dist) (rand-vu-float-range 6144.0 22118.4))
|
||||
(return #t))))
|
||||
(set! s2-0 (mod (+ s2-0 1) s4-0))))
|
||||
@@ -585,6 +587,7 @@
|
||||
(best-dest vector :inline)
|
||||
(away-vec vector :inline)))
|
||||
|
||||
|
||||
(defmethod nav-enemy-method-55 ((this snow-bunny))
|
||||
(set! (-> this using-jump-event?) #f)
|
||||
(if (not *target*) (return #f))
|
||||
@@ -615,7 +618,7 @@
|
||||
(vector+! (-> this final-dest) s4-1 s1-1))))
|
||||
(let* ((s1-3 (vector-! (new 'stack-no-clear 'vector) (-> this final-dest) (-> this collide-info trans)))
|
||||
(f0-12 (vector-length s1-3)))
|
||||
(let ((f1-4 (* 0.000011625744 f0-12)))
|
||||
(let ((f1-4 (/ f0-12 (meters 21))))
|
||||
(cond
|
||||
((< 1.0 f1-4) (set! f1-4 1.0))
|
||||
((< f1-4 0.4) (set! f1-4 0.4)))
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
helix-slide-door-idle-closed
|
||||
helix-slide-door-idle-open))
|
||||
|
||||
|
||||
(defskelgroup *helix-slide-door-sg*
|
||||
helix-slide-door
|
||||
helix-slide-door-lod0-jg
|
||||
@@ -47,6 +48,7 @@
|
||||
helix-button-quick-activate
|
||||
helix-button-startup))
|
||||
|
||||
|
||||
(defskelgroup *helix-button-sg*
|
||||
helix-button
|
||||
helix-button-lod0-jg
|
||||
@@ -56,6 +58,7 @@
|
||||
|
||||
(deftype helix-dark-eco (dark-eco-pool) ())
|
||||
|
||||
|
||||
(deftype helix-water (process-drawable)
|
||||
((last-alt-actor-consumed int32)
|
||||
(alt-actors (array entity-actor))
|
||||
@@ -70,6 +73,7 @@
|
||||
helix-water-activated
|
||||
helix-water-idle))
|
||||
|
||||
|
||||
(defstate water-vol-idle (helix-dark-eco)
|
||||
:virtual #t
|
||||
:event
|
||||
@@ -407,7 +411,7 @@
|
||||
(when (not (logtest? (-> *target* state-flags) (state-flags grabbed)))
|
||||
(let* ((f0-5 (- f0-4 (-> self root trans y)))
|
||||
(f0-6 (+ -40960.0 f0-5))
|
||||
(f0-7 (* 0.000024414063 f0-6)))
|
||||
(f0-7 (/ f0-6 (meters 10))))
|
||||
(cond
|
||||
((< f0-7 0.0) (set! f0-7 0.0))
|
||||
((< 1.0 f0-7) (set! f0-7 1.0)))
|
||||
@@ -424,9 +428,9 @@
|
||||
(suspend)))
|
||||
:post ja-post)
|
||||
|
||||
(defmethod relocate ((this helix-water) (arg0 int))
|
||||
(if (nonzero? (-> this alt-actors)) (&+! (-> this alt-actors) arg0))
|
||||
(call-parent-method this arg0))
|
||||
(defmethod relocate ((this helix-water) (offset int))
|
||||
(if (nonzero? (-> this alt-actors)) (&+! (-> this alt-actors) offset))
|
||||
(call-parent-method this offset))
|
||||
|
||||
(defmethod init-from-entity! ((this helix-water) (arg0 entity-actor))
|
||||
(set! (-> this last-alt-actor-consumed) -1)
|
||||
|
||||
@@ -58,6 +58,7 @@
|
||||
puffer-idle
|
||||
puffer-patrol))
|
||||
|
||||
|
||||
(defskelgroup *puffer-sg*
|
||||
puffer
|
||||
puffer-main-lod0-jg
|
||||
@@ -170,6 +171,7 @@
|
||||
(buddy-dir vector :inline)
|
||||
(dest vector :inline)))
|
||||
|
||||
|
||||
(defmethod puffer-method-23 ((this puffer) (arg0 symbol))
|
||||
(local-vars (v1-0 process))
|
||||
(set! v1-0
|
||||
@@ -264,13 +266,13 @@
|
||||
(let ((f30-1 (-> this attack-bottom-y)))
|
||||
(set! (-> this targ-trans-y) (fmax (fmin (+ 4096.0 (-> (target-pos 0) y)) (-> this top-y)) f30-1)))
|
||||
(set! (-> this root transv y)
|
||||
(* 0.125 (-> *display* frames-per-second) (- (-> this targ-trans-y) (-> this root trans y))))
|
||||
(* (/ (-> *display* frames-per-second) 8) (- (-> this targ-trans-y) (-> this root trans y))))
|
||||
(when (< 6144.0 (fabs (-> this root transv y)))
|
||||
(if (>= (-> this root transv y) 0.0) (set! (-> this root transv y) 6144.0) (set! (-> this root transv y) -6144.0))))
|
||||
((< (-> this root trans y) f30-0)
|
||||
(set! (-> this targ-trans-y) (* 0.5 (+ (-> this top-y) (-> this patrol-bottom-y))))
|
||||
(set! (-> this root transv y)
|
||||
(* 0.125 (-> *display* frames-per-second) (- (-> this targ-trans-y) (-> this root trans y))))
|
||||
(* (/ (-> *display* frames-per-second) 8) (- (-> this targ-trans-y) (-> this root trans y))))
|
||||
(when (< 2048.0 (fabs (-> this root transv y)))
|
||||
(if (>= (-> this root transv y) 0.0) (set! (-> this root transv y) 2048.0) (set! (-> this root transv y) -2048.0))))
|
||||
(else
|
||||
@@ -649,9 +651,9 @@
|
||||
(else (puffer-method-30 this)))
|
||||
(none))
|
||||
|
||||
(defmethod relocate ((this puffer) (arg0 int))
|
||||
(if (nonzero? (-> this neck)) (&+! (-> this neck) arg0))
|
||||
(call-parent-method this arg0))
|
||||
(defmethod relocate ((this puffer) (offset int))
|
||||
(if (nonzero? (-> this neck)) (&+! (-> this neck) offset))
|
||||
(call-parent-method this offset))
|
||||
|
||||
(defmethod init-from-entity! ((this puffer) (arg0 entity-actor))
|
||||
(local-vars (sv-16 res-tag))
|
||||
|
||||
@@ -507,7 +507,7 @@
|
||||
(let ((f0-31 0.0))
|
||||
(dotimes (v1-71 3)
|
||||
(+! f0-31 (-> this control-pt v1-71 trans y)))
|
||||
(let ((f0-32 (* 0.33333334 f0-31))
|
||||
(let ((f0-32 (/ f0-31 3))
|
||||
(a1-16 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> a1-16 quad) (-> this root trans quad))
|
||||
(set! (-> a1-16 y) f0-32)
|
||||
|
||||
@@ -133,8 +133,10 @@
|
||||
(tube-sound-id sound-id)
|
||||
(tube-sound-vol float)))
|
||||
|
||||
|
||||
(deftype tube-bank (basic) ())
|
||||
|
||||
|
||||
(define *TUBE-bank* (new 'static 'tube-bank))
|
||||
|
||||
(defbehavior tube-sounds target ()
|
||||
@@ -534,7 +536,7 @@
|
||||
(vector-! s3-2 (-> arg1 vector) (vector-float*! s3-2 (-> self control unknown-vector71) f30-0))
|
||||
(let* ((f0-3 (vector-length s3-2))
|
||||
(f1-0 f0-3))
|
||||
(if (< f30-0 0.0) (set! f30-0 (* 0.5 f30-0)))
|
||||
(if (< f30-0 0.0) (set! f30-0 (/ f30-0 2)))
|
||||
(vector+! (-> arg1 vector)
|
||||
(vector-float*! (-> arg1 vector) (-> self control unknown-vector71) f30-0)
|
||||
(vector-float*! s3-2 s3-2 (/ f0-3 f1-0)))))
|
||||
@@ -629,6 +631,7 @@
|
||||
slide-control-watch
|
||||
slide-control-ride))
|
||||
|
||||
|
||||
(defun distance-from-tangent ((arg0 path-control) (arg1 float) (arg2 vector) (arg3 vector) (arg4 vector) (arg5 vector))
|
||||
(eval-path-curve-div! arg0 arg2 arg1 'interp)
|
||||
(path-control-method-12 arg0 arg3 arg1)
|
||||
|
||||
@@ -279,7 +279,7 @@
|
||||
(let* ((f0-2 (* 0.000024414063 (- 40960.0 f28-0)))
|
||||
(f26-0 (* f0-2 f0-2))
|
||||
(f0-7 (atan (- (-> gp-0 x) (-> this root trans x)) (- (-> gp-0 z) (-> this root trans z))))
|
||||
(f30-0 (* 0.5 f26-0 arg0 (seconds-per-frame)))
|
||||
(f30-0 (* (/ f26-0 2) arg0 (seconds-per-frame)))
|
||||
(f24-0 (+ f0-7 f30-0))
|
||||
(f28-1 (- f28-0 (fmin f28-0 (* 0.16874999 f26-0 (fabs arg0) (seconds-per-frame)))))
|
||||
(s4-1 (new 'stack-no-clear 'vector)))
|
||||
|
||||
@@ -658,8 +658,8 @@
|
||||
(set! (-> self rotate-speed) 1820444.5)
|
||||
(let ((f0-2 (fmin arg0 (vector-vector-distance (-> self collide-info trans) (-> self nav target-pos)))))
|
||||
(cond
|
||||
((< 16384.0 f0-2) (set! (-> self target-speed) (* 0.045454547 (-> *display* frames-per-second) f0-2)) (kermit-long-hop))
|
||||
(else (set! (-> self target-speed) (* 0.1 (-> *display* frames-per-second) f0-2)) (kermit-short-hop))))
|
||||
((< 16384.0 f0-2) (set! (-> self target-speed) (* (/ (-> *display* frames-per-second) 22) f0-2)) (kermit-long-hop))
|
||||
(else (set! (-> self target-speed) (* (/ (-> *display* frames-per-second) 10) f0-2)) (kermit-short-hop))))
|
||||
(set! (-> self airborne) #f)
|
||||
#f)
|
||||
|
||||
|
||||
@@ -117,7 +117,7 @@ swamp-rat-default-event-handler
|
||||
(f1-1 (+ 1.0 (* 2.0 f0-0)))
|
||||
(f2-2 f1-1)
|
||||
(f2-4 (/ 1.0 f2-2))
|
||||
(f0-2 (+ 1.0 (* 0.2 f0-0))))
|
||||
(f0-2 (+ 1.0 (/ f0-0 5))))
|
||||
(set! (-> self delta-wiggle-angle) (* 910.2222 f1-1))
|
||||
(set! (-> self wiggle-factor) (* 1.5 f2-4))
|
||||
(set! (-> self target-speed) (* 28672.0 f0-2))))
|
||||
@@ -185,7 +185,10 @@ swamp-rat-default-event-handler
|
||||
(ja-no-eval :num! (loop!))
|
||||
(logclear! (-> self nav-enemy-flags) (nav-enemy-flags enable-travel))
|
||||
(let ((gp-0 (rand-vu-int-range 300 600)))
|
||||
(suspend-for gp-0 (ja :num-func num-func-identity :frame-num 0.0) (ja-blend-eval) (suspend)))))))
|
||||
(suspend-for gp-0
|
||||
(ja :num-func num-func-identity :frame-num 0.0)
|
||||
(ja-blend-eval)
|
||||
(suspend)))))))
|
||||
|
||||
(defstate nav-enemy-give-up (swamp-rat)
|
||||
:virtual #t
|
||||
|
||||
@@ -541,7 +541,7 @@
|
||||
(set! (-> *part-id-table* 2896 init-specs 4 initial-valuef) (+ 24576.0 arg1))
|
||||
(set! (-> *part-id-table* 2896 init-specs 19 initial-valuef) (+ 49152.0 arg1))
|
||||
(set! (-> *part-id-table* 2896 init-specs 1 initial-valuef) (* 0.0000036621095 arg2))
|
||||
(set! (-> *part-id-table* 2896 init-specs 2 initial-valuef) (* 0.1 arg2))
|
||||
(set! (-> *part-id-table* 2896 init-specs 2 initial-valuef) (/ arg2 10))
|
||||
(launch-particles :system *sp-particle-system-3d* (-> *part-id-table* 2896) gp-0))
|
||||
0
|
||||
(none))
|
||||
@@ -566,7 +566,7 @@
|
||||
(cond
|
||||
((< 0.0 (-> self engine-sound-envelope))
|
||||
(if (zero? (-> self engine-sound-id)) (set! (-> self engine-sound-id) (new-sound-id)))
|
||||
(* 0.0000008138021 (-> self engine-thrust))
|
||||
(/ (-> self engine-thrust) (meters 300))
|
||||
(let ((f30-0 (* 100.0 (-> self engine-sound-envelope)))
|
||||
(f28-0 (+ -1.0 (* 2.0 (-> self engine-sound-envelope))))
|
||||
(gp-0 (new 'stack-no-clear 'vector)))
|
||||
@@ -897,7 +897,7 @@
|
||||
(defbehavior fishermans-boat-set-throttle-by-speed fishermans-boat ((arg0 float))
|
||||
(let* ((f0-0 (vector-xz-length (-> self rbody lin-velocity)))
|
||||
(f1-2 (/ (- arg0 f0-0) arg0))
|
||||
(f30-0 (* 0.005 f1-2)))
|
||||
(f30-0 (/ f1-2 200)))
|
||||
(format *stdcon* "current ~M target ~M throttle ~f~%" f0-0 arg0 (-> self controller throttle))
|
||||
(set! (-> self controller throttle) (fmax 0.0 (fmin 1.0 (+ (-> self controller throttle) f30-0)))))
|
||||
0
|
||||
|
||||
@@ -267,7 +267,7 @@
|
||||
(defmethod init! ((this swamp-rope-rand-float) (arg0 int) (arg1 int) (arg2 float))
|
||||
(set! (-> this min-time) arg0)
|
||||
(set! (-> this max-time) arg1)
|
||||
(set! (-> this max-val) (* 0.5 arg2))
|
||||
(set! (-> this max-val) (/ arg2 2))
|
||||
(set! (-> this timer) 0)
|
||||
(set! (-> this value) 0.0)
|
||||
0
|
||||
@@ -328,8 +328,8 @@
|
||||
(defmethod init! ((this swamp-blimp-rand-vector) (arg0 int) (arg1 int) (arg2 float) (arg3 float))
|
||||
(set! (-> this min-time) arg0)
|
||||
(set! (-> this max-time) arg1)
|
||||
(set! (-> this xz-max) (* 0.5 arg2))
|
||||
(set! (-> this y-max) (* 0.5 arg3))
|
||||
(set! (-> this xz-max) (/ arg2 2))
|
||||
(set! (-> this y-max) (/ arg3 2))
|
||||
(set! (-> this timer) 0)
|
||||
(vector-reset! (-> this value))
|
||||
0
|
||||
@@ -822,14 +822,14 @@
|
||||
|
||||
(defbehavior swamp-rope-break-code swamp-rope ()
|
||||
(when (or (< 0.001 (fabs (-> self base-vec x))) (< 0.001 (fabs (-> self base-vec z))))
|
||||
(set! (-> self base-vec x) (- (-> self base-vec x) (* 0.02 (-> *display* time-adjust-ratio) (-> self base-vec x))))
|
||||
(set! (-> self base-vec z) (- (-> self base-vec z) (* 0.02 (-> *display* time-adjust-ratio) (-> self base-vec z))))
|
||||
(set! (-> self base-vec x) (- (-> self base-vec x) (* (/ (-> *display* time-adjust-ratio) 50) (-> self base-vec x))))
|
||||
(set! (-> self base-vec z) (- (-> self base-vec z) (* (/ (-> *display* time-adjust-ratio) 50) (-> self base-vec z))))
|
||||
(vector-normalize! (-> self base-vec) 1.0))
|
||||
(when (< 0.4 (-> self scale-base))
|
||||
(let ((f1-13 (fmax 0.002 (* 0.05 (+ -0.4 (-> self scale-base))))))
|
||||
(set! (-> self scale-base) (- (-> self scale-base) (* f1-13 (-> *display* time-adjust-ratio))))))
|
||||
(+! (-> self scale-t) (* 0.005 (-> *display* time-adjust-ratio)))
|
||||
(+! (-> self x-t) (* 0.004 (-> *display* time-adjust-ratio)))
|
||||
(+! (-> self scale-t) (/ (-> *display* time-adjust-ratio) 200))
|
||||
(+! (-> self x-t) (/ (-> *display* time-adjust-ratio) 250))
|
||||
(+! (-> self z-t) (* 0.003 (-> *display* time-adjust-ratio)))
|
||||
(let ((f0-19 (* (sin (+ 32768.0 (* 65536.0 (-> self scale-t)))) (fmax 0.003 (fmin 0.1 (* 0.1 (- 3.0 (-> self scale-t))))))))
|
||||
(set! (-> self root scale y) (+ (-> self scale-base) f0-19)))
|
||||
|
||||
Reference in New Issue
Block a user