mirror of
https://github.com/open-goal/jak-project
synced 2026-09-03 02:14:07 -04:00
cleanup and bug fix (#1161)
* cleanup and bug fix * crashing * fix crash bug * fix tests
This commit is contained in:
@@ -8040,14 +8040,14 @@
|
||||
(defenum draw-status
|
||||
:type uint8
|
||||
:bitfield #t
|
||||
(needs-clip 0)
|
||||
(drwf01 1)
|
||||
(drwf02 2)
|
||||
(drwf03 3)
|
||||
(drwf04 4)
|
||||
(drwf05 5)
|
||||
(drwf06 6)
|
||||
(drwf07 7)
|
||||
(needs-clip 0) ;; set by engine, determines if object should be clipped
|
||||
(hidden 1) ;; set by user, can disable drawing and animation codes
|
||||
(no-anim 2) ;; set by engine, if there is no active joint animation
|
||||
(was-drawn 3) ;; set by engine, if we were drawn (passed cull checks)
|
||||
(no-skeleton-update 4) ;; set by engine, if our transforms are not valid
|
||||
(skip-bones 5) ;; set by user, skips call to draw-bones but does everything else
|
||||
(do-not-check-distance 6) ;; set by user, ignore in finding closest object for texture calcs
|
||||
(has-joint-channels 7) ;; set by engine, if the object has joint channels.
|
||||
)
|
||||
|
||||
(defenum draw-effect
|
||||
@@ -8113,7 +8113,7 @@
|
||||
:flag-assert #xc000000bc
|
||||
(:methods
|
||||
(new (symbol type process art-joint-geo) _type_ 0)
|
||||
(dummy-9 (_type_) vector 9)
|
||||
(get-skeleton-origin (_type_) vector 9)
|
||||
(lod-set! (_type_ int) none 10)
|
||||
(lods-assign! (_type_ lod-set) none 11)
|
||||
)
|
||||
@@ -10135,11 +10135,11 @@
|
||||
:bitfield #t
|
||||
:type uint64
|
||||
(vent-blocked 0)
|
||||
(fop1 1)
|
||||
(has-power-cell 1) ;; should spawn power cell on death
|
||||
(vent-valve 2)
|
||||
(fop3 3)
|
||||
(fop4 4)
|
||||
(fop5 5)
|
||||
(wrap-phase 3) ;; phase should wrap from 1 to 0 instead of mirroring.
|
||||
(fop4 4) ;; unused?
|
||||
(fop5 5) ;; wait-for-cue after death?
|
||||
(fop6 6)
|
||||
(fop7 7)
|
||||
(can-collect 8)
|
||||
@@ -10147,11 +10147,13 @@
|
||||
(large 10)
|
||||
(fop11 11)
|
||||
(powerup 12)
|
||||
(fop13 13)
|
||||
(fop14 14)
|
||||
(fop15 15)
|
||||
(fop16 16)
|
||||
(fop17 17)
|
||||
;; strengths
|
||||
(touch 13)
|
||||
(normal-attack 14)
|
||||
(strong-attack 15)
|
||||
(indestructible 16)
|
||||
|
||||
(fop17 17) ;; unused
|
||||
(eco-blocked 18)
|
||||
(respawn 19)
|
||||
)
|
||||
@@ -10324,10 +10326,10 @@
|
||||
(:methods
|
||||
(initialize-skeleton (_type_ skeleton-group pair) none 14)
|
||||
(initialize-skeleton-by-name (_type_ string object) _type_ 15)
|
||||
(dummy-16 (_type_ int (inline-array vector) vector) collide-shape 16)
|
||||
(apply-alignment (_type_ int transformq vector) collide-shape 16)
|
||||
(do-joint-math! (_type_) none 17)
|
||||
(dummy-18 (_type_) none 18)
|
||||
(dummy-19 (_type_) none 19)
|
||||
(cleanup-for-death (_type_) none 18)
|
||||
(evaluate-joint-control (_type_) none 19)
|
||||
)
|
||||
(:states
|
||||
(process-drawable-art-error string)
|
||||
@@ -10410,7 +10412,7 @@
|
||||
:flag-assert #xa00000068
|
||||
;; field handle is likely a value type
|
||||
(:methods
|
||||
(dummy-9 (_type_ attack-info) none 9)
|
||||
(combine! (_type_ attack-info) none 9)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -10476,7 +10478,7 @@
|
||||
:size-assert #xd0
|
||||
:flag-assert #x15006000d0
|
||||
(:methods
|
||||
(dummy-20 (_type_) symbol 20)
|
||||
(is-visible? (_type_) symbol 20)
|
||||
)
|
||||
(:states
|
||||
part-spawner-active)
|
||||
@@ -10532,7 +10534,7 @@
|
||||
:size-assert #xe0
|
||||
:flag-assert #xf007000e0
|
||||
(:methods
|
||||
(dummy-14 (_type_ pair) process 14)
|
||||
(eval (_type_ pair) process 14)
|
||||
)
|
||||
(:states
|
||||
camera-tracker-process)
|
||||
@@ -10630,37 +10632,43 @@
|
||||
|
||||
;; - Types
|
||||
|
||||
(defenum pov-camera-flag
|
||||
:bitfield #t
|
||||
:type int32
|
||||
(notify-of-abort 0)
|
||||
(allow-abort 1)
|
||||
(inherit-orientation 2)
|
||||
)
|
||||
|
||||
(deftype pov-camera (process-drawable)
|
||||
((cspace-array cspace-array :offset 112)
|
||||
(flags int32 :offset-assert 176)
|
||||
(debounce-start-time time-frame :offset-assert 184)
|
||||
(notify-handle handle :offset-assert 192)
|
||||
(anim-name string :offset-assert 200)
|
||||
(command-list pair :offset-assert 204) ;; not a basic atleast!
|
||||
(mask-to-clear uint32 :offset-assert 208)
|
||||
(music-volume-movie float :offset-assert 212)
|
||||
(sfx-volume-movie float :offset-assert 216)
|
||||
((cspace-array cspace-array :offset 112)
|
||||
(flags pov-camera-flag :offset-assert 176)
|
||||
(debounce-start-time time-frame :offset-assert 184)
|
||||
(notify-handle handle :offset-assert 192)
|
||||
(anim-name string :offset-assert 200)
|
||||
(command-list pair :offset-assert 204)
|
||||
(mask-to-clear uint32 :offset-assert 208)
|
||||
(music-volume-movie float :offset-assert 212)
|
||||
(sfx-volume-movie float :offset-assert 216)
|
||||
)
|
||||
:heap-base #x70
|
||||
:method-count-assert 30
|
||||
:size-assert #xdc
|
||||
:flag-assert #x1e007000dc
|
||||
;; inherited inspect of process-drawable
|
||||
(:methods
|
||||
(pov-camera-abort () _type_ :state 20)
|
||||
(pov-camera-done-playing () _type_ :state 21)
|
||||
(pov-camera-playing () _type_ :state 22) ;; state
|
||||
(pov-camera-start-playing () _type_ :state 23) ;; state
|
||||
(pov-camera-startup () _type_ :state 24) ;; state
|
||||
(TODO-RENAME-25 (_type_) symbol 25)
|
||||
(pov-camera-playing () _type_ :state 22)
|
||||
(pov-camera-start-playing () _type_ :state 23)
|
||||
(pov-camera-startup () _type_ :state 24)
|
||||
(check-for-abort (_type_) symbol 25)
|
||||
(target-grabbed? (_type_) symbol 26)
|
||||
(dummy-27 () none 27)
|
||||
(pre-startup-callback (_type_) none 27)
|
||||
(target-released? () symbol 28)
|
||||
(set-stack-size! (_type_) none 29)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
;; ----------------------
|
||||
;; File - sync-info-h
|
||||
;; Source Path - engine/util/sync-info-h.gc
|
||||
@@ -11104,8 +11112,8 @@
|
||||
(should-push-away-test (_type_ collide-mesh-cache-tri collide-tri-result vector float) float 11) ;; spat
|
||||
(sphere-on-platform-test (_type_ collide-mesh-cache-tri collide-tri-result vector float) float 12) ;; sopt
|
||||
(populate-cache! (_type_ collide-mesh-cache-tri matrix) none 13)
|
||||
(dummy-14 (_type_ object object) none 14)
|
||||
(dummy-15 (_type_ object object object) none 15)
|
||||
(collide-mesh-math-1 (_type_ object object) none 14)
|
||||
(collide-mesh-math-2 (_type_ object object object) none 15)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -19590,8 +19598,8 @@
|
||||
(deftype cam-dbg-scratch (structure)
|
||||
((linevec4w vector4w 2 :inline :offset-assert 0)
|
||||
(color vector :inline :offset-assert 32)
|
||||
(plotvec vector 2 :inline :offset-assert 48)
|
||||
(linevec vector 2 :inline :offset-assert 80)
|
||||
(plotvec vector4w 2 :inline :offset-assert 48)
|
||||
(linevec vector4w 2 :inline :offset-assert 80)
|
||||
(rel-vec vector :inline :offset-assert 112)
|
||||
(sphere-v-start vector :inline :offset-assert 128)
|
||||
(sphere-v-end vector :inline :offset-assert 144)
|
||||
@@ -19660,7 +19668,7 @@
|
||||
(define-extern camera-line-rel (function vector vector vector4w none))
|
||||
(define-extern camera-fov-draw (function int int vector float float vector4w symbol))
|
||||
(define-extern cam-line-dma (function pointer))
|
||||
(define-extern camera-line2d (function (pointer vector4w) (pointer vector4w) pointer))
|
||||
(define-extern camera-line2d (function vector4w vector4w pointer))
|
||||
(define-extern camera-plot-float-func (function float float float float (function float float) vector4w none))
|
||||
(define-extern cam-debug-add-coll-tri (function cam-debug-tri vector cam-debug-tri none))
|
||||
(define-extern debug-euler (function cam-dbg-scratch object))
|
||||
@@ -20316,7 +20324,7 @@
|
||||
|
||||
(define-extern target-death-anim (function spool-anim none :behavior target))
|
||||
(define-extern death-movie-remap (function int int int))
|
||||
(define-extern pov-camera-init-by-other (function vector skeleton-group string int process-drawable pair none :behavior pov-camera)) ;; TODO - not confirmed -- sunken-elevator
|
||||
(define-extern pov-camera-init-by-other (function vector skeleton-group string pov-camera-flag process-drawable pair none :behavior pov-camera)) ;; TODO - not confirmed -- sunken-elevator
|
||||
(define-extern target-hit-effect (function attack-info none :behavior target))
|
||||
(define-extern target-hit-setup-anim (function attack-info object :behavior target))
|
||||
(define-extern target-hit-move (function attack-info symbol (function none :behavior target) float none :behavior target))
|
||||
@@ -28406,7 +28414,7 @@
|
||||
(define-extern inc-angle (function (pointer float) float float))
|
||||
(define-extern quicksandlurker-missile-init-by-other (function quicksandlurker-missile-init-data entity none :behavior quicksandlurker-missile))
|
||||
(define-extern get-height-over-navmesh! function) ;; unused
|
||||
(define-extern intersects-nav-mesh? (function quicksandlurker int (inline-array vector) vector symbol)) ;; unused
|
||||
(define-extern intersects-nav-mesh? (function nav-control vector symbol)) ;; unused
|
||||
(define-extern quicksandlurker-default-event-handler (function process int symbol event-message-block object :behavior quicksandlurker))
|
||||
(define-extern quicksandlurker-post (function none :behavior quicksandlurker))
|
||||
|
||||
|
||||
@@ -768,13 +768,13 @@
|
||||
|
||||
"relocate": [[6, "(function sparticle-system sparticle-cpuinfo none)"]],
|
||||
|
||||
"fisher-JUN": [
|
||||
"fisher": [
|
||||
[27, "(function none :behavior process)"],
|
||||
[28, "(function none :behavior fisher)"],
|
||||
[20, "(function none :behavior fisher-fish)"],
|
||||
[1, "(function none :behavior manipy)"]
|
||||
],
|
||||
"fisher-JUNGLE-L1": [
|
||||
"fisher-OLD": [
|
||||
[27, "(function none :behavior process)"],
|
||||
[28, "(function none :behavior fisher)"],
|
||||
[20, "(function none :behavior fisher-fish)"],
|
||||
@@ -785,7 +785,7 @@
|
||||
[5, "(function sparticle-launch-control :behavior finalbosscam)"]
|
||||
],
|
||||
|
||||
"sage-finalboss-FIN": [
|
||||
"sage-finalboss": [
|
||||
[21, "(function none :behavior sage-finalboss)"],
|
||||
[22, "(function none :behavior sage-finalboss)"],
|
||||
[15, "(function final-door symbol)"],
|
||||
@@ -793,7 +793,7 @@
|
||||
[7, "(function final-door symbol)"],
|
||||
[6, "(function final-door symbol)"]
|
||||
],
|
||||
"sage-finalboss-L1": [
|
||||
"sage-finalboss-OLD": [
|
||||
[21, "(function none :behavior sage-finalboss)"],
|
||||
[22, "(function none :behavior sage-finalboss)"],
|
||||
[15, "(function final-door symbol)"],
|
||||
@@ -802,7 +802,7 @@
|
||||
[6, "(function final-door symbol)"]
|
||||
],
|
||||
|
||||
"racer-states-FIC-LAV-MIS-OGR-ROL": [
|
||||
"racer-states": [
|
||||
[17, "(function (pointer process) :behavior racer)"],
|
||||
[45, "(function joint-mod :behavior manipy)"],
|
||||
[46, "(function float :behavior manipy)"]
|
||||
|
||||
@@ -988,11 +988,11 @@
|
||||
["L670", "uint64", true]
|
||||
],
|
||||
|
||||
"fisher-JUN": [
|
||||
"fisher": [
|
||||
["L262", "vector"],
|
||||
["L463", "(array (inline-array fisher-params))"]
|
||||
],
|
||||
"fisher-JUNGLE-L1": [
|
||||
"fisher-OLD": [
|
||||
["L262", "vector"],
|
||||
["L463", "(array (inline-array fisher-params))"]
|
||||
],
|
||||
@@ -1128,13 +1128,13 @@
|
||||
["L816", "uint64", true]
|
||||
],
|
||||
|
||||
"sage-finalboss-FIN": [
|
||||
"sage-finalboss": [
|
||||
["L528", "vector"],
|
||||
["L272", "vector"],
|
||||
["L527", "quaternion"]
|
||||
],
|
||||
|
||||
"sage-finalboss-L1": [
|
||||
"sage-finalboss-OLD": [
|
||||
["L528", "vector"],
|
||||
["L272", "vector"],
|
||||
["L527", "quaternion"]
|
||||
@@ -1581,7 +1581,7 @@
|
||||
|
||||
"racer": [["L106", "vector"]],
|
||||
|
||||
"target-racer-FIC-LAV-MIS-OGR-ROL": [
|
||||
"target-racer": [
|
||||
["L237", "attack-info"],
|
||||
["L238", "attack-info"],
|
||||
["L240", "vector"]
|
||||
|
||||
@@ -3069,7 +3069,7 @@
|
||||
|
||||
"(exit target-racing-death)": [[16, "event-message-block"]],
|
||||
|
||||
"(anon-function 17 racer-states-FIC-LAV-MIS-OGR-ROL)": [
|
||||
"(anon-function 17 racer-states)": [
|
||||
[16, "joint-exploder-tuning"]
|
||||
],
|
||||
|
||||
|
||||
@@ -4019,11 +4019,11 @@
|
||||
[251, "a0", "process-drawable"]
|
||||
],
|
||||
|
||||
"(anon-function 46 racer-states-FIC-LAV-MIS-OGR-ROL)": [
|
||||
"(anon-function 46 racer-states)": [
|
||||
[[4, 32], "v1", "target"]
|
||||
],
|
||||
|
||||
"(anon-function 45 racer-states-FIC-LAV-MIS-OGR-ROL)": [
|
||||
"(anon-function 45 racer-states)": [
|
||||
[19, "a0", "target"],
|
||||
[31, "a0", "target"],
|
||||
[42, "v1", "target"]
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
;; name in dgo: aligner-h
|
||||
;; dgos: GAME, ENGINE
|
||||
|
||||
|
||||
;; The align control is responsible for aligning an animation to a moving character.
|
||||
(deftype align-control (basic)
|
||||
((flags uint32 :offset-assert 4)
|
||||
(process process-drawable :offset-assert 8)
|
||||
@@ -32,16 +32,16 @@
|
||||
|
||||
|
||||
(defmethod new align-control ((allocation symbol) (type-to-make type) (proc process))
|
||||
|
||||
"Create a new align-control."
|
||||
(let ((obj (object-new allocation type-to-make (the-as int (-> type-to-make size)))))
|
||||
(when (zero? obj)
|
||||
(go process-drawable-art-error "memory")
|
||||
(return (the align-control 0))
|
||||
)
|
||||
|
||||
(set! (-> obj process) (the-as process-drawable proc))
|
||||
obj
|
||||
(when (zero? obj)
|
||||
(go process-drawable-art-error "memory")
|
||||
(return (the align-control 0))
|
||||
)
|
||||
|
||||
(set! (-> obj process) (the-as process-drawable proc))
|
||||
obj
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -171,23 +171,20 @@
|
||||
)
|
||||
|
||||
;; definition for method 10 of type align-control
|
||||
(defmethod
|
||||
TODO-RENAME-10
|
||||
align-control
|
||||
((obj align-control) (arg0 int) (arg1 float) (arg2 float) (arg3 float))
|
||||
(defmethod TODO-RENAME-10 align-control ((obj align-control) (arg0 int) (arg1 float) (arg2 float) (arg3 float))
|
||||
(when (zero? (logand (-> obj flags) 1))
|
||||
(let* ((a0-1 (-> obj process))
|
||||
(t9-0 (method-of-object a0-1 dummy-16))
|
||||
(v1-4 (-> obj delta))
|
||||
(t1-0 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(set! (-> t1-0 x) arg1)
|
||||
(set! (-> t1-0 y) arg2)
|
||||
(set! (-> t1-0 z) arg3)
|
||||
(set! (-> t1-0 w) 1.0)
|
||||
(t9-0 a0-1 arg0 (the-as (inline-array vector) v1-4) t1-0)
|
||||
(let* ((a0-1 (-> obj process))
|
||||
(t9-0 (method-of-object a0-1 apply-alignment))
|
||||
(v1-4 (-> obj delta))
|
||||
(t1-0 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(set! (-> t1-0 x) arg1)
|
||||
(set! (-> t1-0 y) arg2)
|
||||
(set! (-> t1-0 z) arg3)
|
||||
(set! (-> t1-0 w) 1.0)
|
||||
(t9-0 a0-1 arg0 v1-4 t1-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(-> obj process root)
|
||||
)
|
||||
|
||||
|
||||
@@ -16,6 +16,8 @@
|
||||
;; These types are specific to joint control.
|
||||
;; See mspace-h.gc for the actual joint types
|
||||
|
||||
;; A single joint control channel. It can control some number of joints through a single animation.
|
||||
;; Multiple channels are blended together to create smooth transitions between animations.
|
||||
(deftype joint-control-channel (structure)
|
||||
((parent joint-control :offset-assert 0)
|
||||
(command symbol :offset-assert 4)
|
||||
@@ -38,7 +40,7 @@
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
;; A collection of joint-control-channels.
|
||||
(deftype joint-control (basic)
|
||||
((status uint16 :offset-assert 4)
|
||||
(allocated-length int16 :offset-assert 6)
|
||||
@@ -70,6 +72,11 @@
|
||||
)
|
||||
)
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; joint anim decompress
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
;; these types are used to decompress joint animations.
|
||||
|
||||
(deftype matrix-stack (structure)
|
||||
((top matrix :offset-assert 0)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -5,22 +5,32 @@
|
||||
;; name in dgo: pov-camera-h
|
||||
;; dgos: GAME, ENGINE
|
||||
|
||||
;; for target-death
|
||||
(defenum pov-camera-flag
|
||||
:bitfield #t
|
||||
:type int32
|
||||
(notify-of-abort 0)
|
||||
(allow-abort 1)
|
||||
(inherit-orientation 2)
|
||||
)
|
||||
|
||||
(declare-type pov-camera process-drawable)
|
||||
(define-extern pov-camera-init-by-other (function vector skeleton-group string int process-drawable pair none :behavior pov-camera)) ;; TODO - not confirmed -- sunken-elevator
|
||||
(define-extern pov-camera-init-by-other (function vector skeleton-group string pov-camera-flag process-drawable pair none :behavior pov-camera)) ;; TODO - not confirmed -- sunken-elevator
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
;; The pov-camera is used to move the camera around for the not-quite-cutscenes.
|
||||
;; for example, the introduction to orbs in geyser, or the camera that shows you where the steps to fire canyon
|
||||
;; are.
|
||||
(deftype pov-camera (process-drawable)
|
||||
((cspace-array cspace-array :offset 112)
|
||||
(flags int32 :offset-assert 176)
|
||||
(debounce-start-time time-frame :offset-assert 184)
|
||||
(notify-handle handle :offset-assert 192)
|
||||
(anim-name string :offset-assert 200)
|
||||
(command-list pair :offset-assert 204)
|
||||
(mask-to-clear uint32 :offset-assert 208)
|
||||
(music-volume-movie float :offset-assert 212)
|
||||
(sfx-volume-movie float :offset-assert 216)
|
||||
((cspace-array cspace-array :offset 112)
|
||||
(flags pov-camera-flag :offset-assert 176)
|
||||
(debounce-start-time time-frame :offset-assert 184)
|
||||
(notify-handle handle :offset-assert 192)
|
||||
(anim-name string :offset-assert 200)
|
||||
(command-list pair :offset-assert 204)
|
||||
(mask-to-clear uint32 :offset-assert 208)
|
||||
(music-volume-movie float :offset-assert 212)
|
||||
(sfx-volume-movie float :offset-assert 216)
|
||||
)
|
||||
:heap-base #x70
|
||||
:method-count-assert 30
|
||||
@@ -32,9 +42,9 @@
|
||||
(pov-camera-playing () _type_ :state 22)
|
||||
(pov-camera-start-playing () _type_ :state 23)
|
||||
(pov-camera-startup () _type_ :state 24)
|
||||
(TODO-RENAME-25 (_type_) symbol 25)
|
||||
(check-for-abort (_type_) symbol 25)
|
||||
(target-grabbed? (_type_) symbol 26)
|
||||
(dummy-27 () none 27)
|
||||
(pre-startup-callback (_type_) none 27)
|
||||
(target-released? () symbol 28)
|
||||
(set-stack-size! (_type_) none 29)
|
||||
)
|
||||
|
||||
@@ -7,29 +7,34 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(defmethod TODO-RENAME-25 pov-camera ((obj pov-camera))
|
||||
|
||||
;; definition for method 25 of type pov-camera
|
||||
(defmethod check-for-abort pov-camera ((obj pov-camera))
|
||||
(when (or (and (>= (- (-> *display* base-frame-counter) (-> obj debounce-start-time)) (seconds 0.2))
|
||||
(cpad-pressed? 0 triangle)
|
||||
)
|
||||
(logtest? (-> obj flags) 2)
|
||||
(logtest? (-> obj flags) (pov-camera-flag allow-abort))
|
||||
)
|
||||
(logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons triangle))
|
||||
(logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons triangle))
|
||||
(when (logtest? (-> obj flags) 1)
|
||||
(when (logtest? (-> obj flags) (pov-camera-flag notify-of-abort))
|
||||
(send-event (handle->process (-> obj notify-handle)) 'notify 'abort-request)
|
||||
#t
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 26 of type pov-camera
|
||||
(defmethod target-grabbed? pov-camera ((obj pov-camera))
|
||||
(or (not *target*) (process-grab? *target*))
|
||||
)
|
||||
|
||||
;; definition for method 28 of type pov-camera
|
||||
(defmethod target-released? pov-camera ()
|
||||
(or (not *target*) (process-release? *target*))
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate pov-camera-startup (pov-camera)
|
||||
:virtual #t
|
||||
:code
|
||||
@@ -39,6 +44,7 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate pov-camera-start-playing (pov-camera)
|
||||
:virtual #t
|
||||
:code
|
||||
@@ -71,6 +77,8 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for function pov-camera-play-and-reposition
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
(defbehavior pov-camera-play-and-reposition pov-camera ((arg0 art-joint-anim) (arg1 vector) (arg2 float))
|
||||
(let ((s4-0 #f))
|
||||
(let ((v1-2 (-> self skel root-channel 0)))
|
||||
@@ -113,14 +121,15 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate pov-camera-playing (pov-camera)
|
||||
:virtual #t
|
||||
:event
|
||||
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
(('abort)
|
||||
(when (logtest? (-> self flags) 1)
|
||||
(logior! (-> self flags) 2)
|
||||
(when (logtest? (-> self flags) (pov-camera-flag notify-of-abort))
|
||||
(logior! (-> self flags) (pov-camera-flag allow-abort))
|
||||
(if (= (-> self anim-name type) string)
|
||||
(go-virtual pov-camera-abort)
|
||||
)
|
||||
@@ -178,7 +187,7 @@
|
||||
)
|
||||
)
|
||||
(until (ja-done? 0)
|
||||
(TODO-RENAME-25 self)
|
||||
(check-for-abort self)
|
||||
(suspend)
|
||||
(let ((a0-6 (-> self skel root-channel 0)))
|
||||
(set! (-> a0-6 param 0) (the float (+ (-> a0-6 frame-group data 0 length) -1)))
|
||||
@@ -192,7 +201,7 @@
|
||||
(the-as spool-anim (-> self anim-name))
|
||||
(the-as art-joint-anim #f)
|
||||
(the-as art-joint-anim #f)
|
||||
(method-of-object self TODO-RENAME-25)
|
||||
(method-of-object self check-for-abort)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -209,11 +218,12 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate pov-camera-abort (pov-camera)
|
||||
:virtual #t
|
||||
:enter
|
||||
(behavior ()
|
||||
(logior! (-> self flags) 2)
|
||||
(logior! (-> self flags) (pov-camera-flag allow-abort))
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
@@ -226,6 +236,7 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(defstate pov-camera-done-playing (pov-camera)
|
||||
:virtual #t
|
||||
:code
|
||||
@@ -236,22 +247,29 @@
|
||||
(send-event (handle->process (-> self notify-handle)) 'notify 'die)
|
||||
(suspend)
|
||||
(suspend)
|
||||
(dummy-18 self)
|
||||
(cleanup-for-death self)
|
||||
(deactivate self)
|
||||
(none)
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod dummy-27 pov-camera ()
|
||||
;; definition for method 27 of type pov-camera
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
(defmethod pre-startup-callback pov-camera ((obj pov-camera))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 29 of type pov-camera
|
||||
;; INFO: Return type mismatch symbol vs none.
|
||||
(defmethod set-stack-size! pov-camera ((obj pov-camera))
|
||||
(none)
|
||||
)
|
||||
|
||||
(defbehavior pov-camera-init-by-other pov-camera ((arg0 vector) (arg1 skeleton-group) (arg2 string) (arg3 int) (arg4 process-drawable) (arg5 pair))
|
||||
;; definition for function pov-camera-init-by-other
|
||||
;; INFO: Return type mismatch object vs none.
|
||||
;; Used lq/sq
|
||||
(defbehavior pov-camera-init-by-other pov-camera ((arg0 vector) (arg1 skeleton-group) (arg2 string) (arg3 pov-camera-flag) (arg4 process-drawable) (arg5 pair))
|
||||
(set-stack-size! self)
|
||||
(set! (-> *game-info* pov-camera-handle) (process->handle self))
|
||||
(set! (-> self flags) arg3)
|
||||
@@ -266,7 +284,7 @@
|
||||
(logclear! (-> self mask) (process-mask actor-pause movie enemy platform projectile))
|
||||
(set! (-> self root) (new 'process 'trsqv))
|
||||
(set! (-> self root trans quad) (-> arg0 quad))
|
||||
(when (logtest? (-> self flags) 4)
|
||||
(when (logtest? (-> self flags) (pov-camera-flag inherit-orientation))
|
||||
(let ((v1-20 (if (and (nonzero? arg4) (type-type? (-> arg4 type) process-drawable))
|
||||
arg4
|
||||
)
|
||||
@@ -276,7 +294,7 @@
|
||||
)
|
||||
)
|
||||
(initialize-skeleton self arg1 '())
|
||||
(logior! (-> self draw status) (draw-status drwf05))
|
||||
(logior! (-> self draw status) (draw-status skip-bones))
|
||||
(logior! (-> self skel status) 1)
|
||||
(set! (-> self anim-name) arg2)
|
||||
(cond
|
||||
@@ -321,7 +339,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
((method-of-object self dummy-27))
|
||||
(pre-startup-callback self)
|
||||
(go-virtual pov-camera-startup)
|
||||
(none)
|
||||
)
|
||||
|
||||
@@ -113,8 +113,10 @@
|
||||
|
||||
|
||||
(set! (-> *collide-list* num-items) 0)
|
||||
;; HACK: the special case collide-probe-make-list function doesn't always work correctly.
|
||||
;; for example, on the little side thing in FJ it totally misses.
|
||||
(cond
|
||||
((= bsp-find-mesh-func (method-of-type bsp-header collide-ray))
|
||||
(#f ;; (= bsp-find-mesh-func (method-of-type bsp-header collide-ray))
|
||||
;; for collide-ray (actually line-sphere), we have a fancy version.
|
||||
(dotimes (s4-1 (-> *level* length))
|
||||
(let ((a0-2 (-> *level* level s4-1)))
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
;; The triangle involved in collision
|
||||
;; Note: this is reused for the background collision system.
|
||||
(deftype collide-tri-result (structure)
|
||||
((vertex vector 3 :inline :offset-assert 0)
|
||||
(intersect vector :inline :offset-assert 48)
|
||||
@@ -28,7 +29,7 @@
|
||||
;; static mesh data
|
||||
;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
;; A triangle, part of the collision mesh.
|
||||
;; A triangle, part of a foreground collision mesh.
|
||||
;; The vertex indices index into the collide-mesh vertex-data array.
|
||||
;; Due to using uint8's you only get 256 vertices.
|
||||
(deftype collide-mesh-tri (structure)
|
||||
@@ -61,8 +62,8 @@
|
||||
(should-push-away-test (_type_ collide-mesh-cache-tri collide-tri-result vector float) float 11) ;; spat
|
||||
(sphere-on-platform-test (_type_ collide-mesh-cache-tri collide-tri-result vector float) float 12) ;; sopt
|
||||
(populate-cache! (_type_ collide-mesh-cache-tri matrix) none 13)
|
||||
(dummy-14 (_type_ object object) none 14)
|
||||
(dummy-15 (_type_ object object object) none 15)
|
||||
(collide-mesh-math-1 (_type_ object object) none 14)
|
||||
(collide-mesh-math-2 (_type_ object object object) none 15)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -70,7 +71,9 @@
|
||||
;; cache
|
||||
;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
;; the use of the cache is currently unknown.
|
||||
;; this is not the main collide cache, but instead a smaller cache for unpacking and
|
||||
;; transforming foreground meshes. It's not useful when filling/probing the real collide-cache,
|
||||
;; but is useful for the "loop through all the things that aren't me and see if I collide"
|
||||
|
||||
(defconstant COLLIDE_MESH_CACHE_SIZE #xa000)
|
||||
|
||||
|
||||
@@ -178,7 +178,7 @@
|
||||
;; joint animation.
|
||||
(deftype art-joint-anim (art-element)
|
||||
;; figured out manually from custom inspect.
|
||||
((_unknown (pointer int16) :offset 4) ;; no clue. used in mem-usage
|
||||
((_unknown (pointer int16) :offset 4) ;; no clue. used in mem-usage (maybe merc eye data.)
|
||||
(speed float :offset 20)
|
||||
(artist-base float :offset 24)
|
||||
(artist-step float :offset 28)
|
||||
@@ -291,19 +291,22 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; the draw statuses are somewhat confusing, as some are set by the engine
|
||||
;; and some are set by the game object code.
|
||||
(defenum draw-status
|
||||
:type uint8
|
||||
:bitfield #t
|
||||
(needs-clip 0)
|
||||
(drwf01 1) ;; hide
|
||||
(drwf02 2) ;; no-anim
|
||||
(drwf03 3) ;; draw
|
||||
(drwf04 4)
|
||||
(drwf05 5) ;; no bones
|
||||
(drwf06 6) ;; don't use for closest check
|
||||
(drwf07 7)
|
||||
(needs-clip 0) ;; set by engine, determines if object should be clipped
|
||||
(hidden 1) ;; set by user, can disable drawing and animation codes
|
||||
(no-anim 2) ;; set by engine, if there is no active joint animation
|
||||
(was-drawn 3) ;; set by engine, if we were drawn (passed cull checks)
|
||||
(no-skeleton-update 4) ;; set by engine, if our transforms are not valid
|
||||
(skip-bones 5) ;; set by user, skips call to draw-bones but does everything else
|
||||
(do-not-check-distance 6) ;; set by user, ignore in finding closest object for texture calcs
|
||||
(has-joint-channels 7) ;; set by engine, if the object has joint channels.
|
||||
)
|
||||
|
||||
;; only title seems to be used?
|
||||
(defenum draw-effect
|
||||
:type uint8
|
||||
(drweff0 0)
|
||||
@@ -319,6 +322,9 @@
|
||||
(declare-type ripple-control basic)
|
||||
(declare-type shadow-geo basic)
|
||||
(declare-type shadow-control basic)
|
||||
|
||||
;; the actual draw-control - this is just a collection of references to all info
|
||||
;; needed to do drawing.
|
||||
(deftype draw-control (basic)
|
||||
((status draw-status :offset-assert 4)
|
||||
(matrix-type uint8 :offset-assert 5)
|
||||
@@ -366,13 +372,14 @@
|
||||
:flag-assert #xc000000bc
|
||||
(:methods
|
||||
(new (symbol type process art-joint-geo) _type_ 0)
|
||||
(dummy-9 (_type_) vector 9)
|
||||
(get-skeleton-origin (_type_) vector 9)
|
||||
(lod-set! (_type_ int) none 10)
|
||||
(lods-assign! (_type_ lod-set) none 11)
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod dummy-9 draw-control ((obj draw-control))
|
||||
(defmethod get-skeleton-origin draw-control ((obj draw-control))
|
||||
"Get the origin of the skeleton. Must have up-to-date bones."
|
||||
(-> obj skeleton bones 0 position)
|
||||
)
|
||||
|
||||
|
||||
@@ -7,17 +7,21 @@
|
||||
|
||||
;; res is the very generic resource storage system. See res.gc for more information.
|
||||
|
||||
;; the res-tag describes some data
|
||||
(deftype res-tag (uint128)
|
||||
((name symbol :offset 0)
|
||||
(key-frame float :offset 32)
|
||||
(elt-type type :offset 64)
|
||||
(data-offset uint16 :offset 96) ;; guess
|
||||
(elt-count uint32 :offset 112 :size 15)
|
||||
(inlined? uint8 :offset 127 :size 1) ;; guess.
|
||||
((name symbol :offset 0) ;; name used for lookups
|
||||
(key-frame float :offset 32) ;; if it has a time value associated with it
|
||||
(elt-type type :offset 64) ;; the type of the data stored
|
||||
(data-offset uint16 :offset 96) ;; offset to our data within our lump
|
||||
(elt-count uint32 :offset 112 :size 15) ;; if we're an array
|
||||
(inlined? uint8 :offset 127 :size 1) ;; if our data is an inline array or not.
|
||||
)
|
||||
:flag-assert #x900000010
|
||||
)
|
||||
|
||||
;; the indices of two res tags. If the specific key-frame time is in between two
|
||||
;; res-tags, this type is used to return the indices of the first res tag before and after
|
||||
;; the specified time.
|
||||
(deftype res-tag-pair (uint64)
|
||||
((lo int32 :offset 0)
|
||||
(hi int32 :offset 32)
|
||||
@@ -25,6 +29,8 @@
|
||||
;; made-up type
|
||||
)
|
||||
|
||||
;; a res-lump is a collection of res-tags and the associated data.
|
||||
;; it's used as the base type for entities where the res stores various parameters.
|
||||
(deftype res-lump (basic)
|
||||
((length int32 :offset-assert 4)
|
||||
(allocated-length int32 :offset-assert 8)
|
||||
|
||||
@@ -5,8 +5,6 @@
|
||||
;; name in dgo: res
|
||||
;; dgos: GAME, ENGINE
|
||||
|
||||
;; TODO! Needs a lot of 128-bit type support for res-tag
|
||||
|
||||
#|
|
||||
res is a generic storage system for not very large data, used mostly for the game entities.
|
||||
These res files store collections of data, which can be as values (int8, int16, int32, int64, uint8, uint16, uint32, uint64, float, vector), or any structure (as references), which are tagged and identified with a res-tag.
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
;; TODO - for anim-tester
|
||||
(define-extern *debug-menu-context* debug-menu-context)
|
||||
|
||||
;; circular buffer of positions to draw.
|
||||
(deftype pos-history (structure)
|
||||
((points (inline-array vector) :offset-assert 0)
|
||||
(num-points int32 :offset-assert 4)
|
||||
@@ -19,6 +20,7 @@
|
||||
:flag-assert #x900000010
|
||||
)
|
||||
|
||||
;; unused vertex type?
|
||||
(deftype debug-vertex (structure)
|
||||
((trans vector4w :inline :offset-assert 0)
|
||||
(normal vector3h :inline :offset-assert 16)
|
||||
@@ -30,6 +32,7 @@
|
||||
:flag-assert #x900000020
|
||||
)
|
||||
|
||||
;; buffer of debug vertices (unused?)
|
||||
(deftype debug-vertex-stats (basic)
|
||||
((length int32 :offset-assert 4)
|
||||
(pos-count int32 :offset-assert 8)
|
||||
|
||||
@@ -518,8 +518,8 @@
|
||||
)
|
||||
(init-vf0-vector)
|
||||
(set! sv-16 arg0)
|
||||
(logclear! (-> arg1 status) (draw-status drwf03))
|
||||
(when (zero? (logand (-> arg1 status) (draw-status drwf01 drwf02 drwf04)))
|
||||
(logclear! (-> arg1 status) (draw-status was-drawn))
|
||||
(when (zero? (logand (-> arg1 status) (draw-status hidden no-anim no-skeleton-update)))
|
||||
(let ((s4-0 (the-as vector (+ 48 (the-as int (scratchpad-object int)))))
|
||||
(s2-0 (the-as vu-lights (+ 64 (the-as int (scratchpad-object int)))))
|
||||
(s3-0 *time-of-day-context*)
|
||||
@@ -717,7 +717,7 @@
|
||||
(let ((v1-64 (-> arg1 sink-group level))
|
||||
(a0-26 (+ (-> arg1 sink-group merc-sink foreground-texture-page) 6))
|
||||
)
|
||||
(when (zero? (logand (-> arg1 status) (draw-status drwf06)))
|
||||
(when (zero? (logand (-> arg1 status) (draw-status do-not-check-distance)))
|
||||
(if (< cam-dist (-> v1-64 closest-object a0-26))
|
||||
(set! (-> v1-64 closest-object a0-26) cam-dist)
|
||||
)
|
||||
@@ -744,13 +744,13 @@
|
||||
(logior! (-> arg1 status) (draw-status needs-clip))
|
||||
(logclear! (-> arg1 status) (draw-status needs-clip))
|
||||
)
|
||||
(logior! (-> arg1 status) (draw-status drwf03))
|
||||
(if (logtest? (-> arg1 status) (draw-status drwf05))
|
||||
(logior! (-> arg1 status) (draw-status was-drawn))
|
||||
(if (logtest? (-> arg1 status) (draw-status skip-bones))
|
||||
(return #f)
|
||||
)
|
||||
(draw-bones arg1 arg3 cam-dist)
|
||||
)
|
||||
(when (and (< lod-to-use (-> arg1 cur-lod)) (logtest? (-> arg1 status) (draw-status drwf07)))
|
||||
(when (and (< lod-to-use (-> arg1 cur-lod)) (logtest? (-> arg1 status) (draw-status has-joint-channels)))
|
||||
(let ((v1-82 *matrix-engine*))
|
||||
(set! (-> v1-82 (-> v1-82 length)) (process->handle sv-16))
|
||||
(+! (-> v1-82 length) 1)
|
||||
@@ -778,8 +778,8 @@
|
||||
(set-vector! (-> *hud-lights* ambient) 0.5 0.5 0.5 1.0)
|
||||
|
||||
(defun dma-add-process-drawable-hud ((arg0 process-drawable) (arg1 draw-control) (arg2 symbol) (arg3 dma-buffer))
|
||||
(logclear! (-> arg1 status) (draw-status drwf03))
|
||||
(when (zero? (logand (-> arg1 status) (draw-status drwf01 drwf02 drwf04)))
|
||||
(logclear! (-> arg1 status) (draw-status was-drawn))
|
||||
(when (zero? (logand (-> arg1 status) (draw-status hidden no-anim no-skeleton-update)))
|
||||
(let ((v1-6 (the-as vu-lights (+ 64 (scratchpad-object int))))
|
||||
(a0-3 *hud-lights*)
|
||||
)
|
||||
@@ -792,7 +792,7 @@
|
||||
(set! (-> v1-6 ambient quad) (-> a0-3 ambient quad))
|
||||
)
|
||||
(lod-set! arg1 0)
|
||||
(logior! (-> arg1 status) (draw-status drwf03))
|
||||
(logior! (-> arg1 status) (draw-status was-drawn))
|
||||
(draw-bones-hud arg1 arg3)
|
||||
)
|
||||
0
|
||||
|
||||
@@ -290,7 +290,7 @@
|
||||
|
||||
(defmethod do-joint-math! process-drawable ((obj process-drawable))
|
||||
(cond
|
||||
((logtest? (-> obj draw status) (draw-status drwf01 drwf02))
|
||||
((logtest? (-> obj draw status) (draw-status hidden no-anim))
|
||||
)
|
||||
((zero? (-> obj skel))
|
||||
(matrix<-transformq+trans!
|
||||
@@ -369,7 +369,7 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod dummy-18 process-drawable ((obj process-drawable))
|
||||
(defmethod cleanup-for-death process-drawable ((obj process-drawable))
|
||||
(if (type-type? (-> obj root type) collide-shape)
|
||||
(clear-collide-with-as (the-as collide-shape (-> obj root)))
|
||||
)
|
||||
@@ -481,7 +481,7 @@
|
||||
(set! s3-0 v0-3)
|
||||
)
|
||||
(let ((v1-26 s3-0))
|
||||
(set! (-> v1-26 status) (draw-status drwf04))
|
||||
(set! (-> v1-26 status) (draw-status no-skeleton-update))
|
||||
(set! (-> v1-26 art-group) s4-0)
|
||||
(set! (-> v1-26 jgeo) (the-as art-joint-geo sv-16))
|
||||
(set! (-> v1-26 force-lod) -1)
|
||||
@@ -542,7 +542,7 @@
|
||||
(let ((a2-10 (res-lump-value (-> sv-16 extra) 'joint-channel int :default (the-as uint128 6))))
|
||||
(cond
|
||||
((> a2-10 0)
|
||||
(logior! (-> s3-0 status) (draw-status drwf07))
|
||||
(logior! (-> s3-0 status) (draw-status has-joint-channels))
|
||||
(let ((v0-13 (new 'process 'joint-control a2-10)))
|
||||
(set! (-> obj skel) v0-13)
|
||||
(let ((s2-1 v0-13))
|
||||
@@ -612,7 +612,7 @@
|
||||
obj
|
||||
)
|
||||
|
||||
(defmethod dummy-16 process-drawable ((obj process-drawable) (arg0 int) (arg1 (inline-array vector)) (arg2 vector))
|
||||
(defmethod apply-alignment process-drawable ((obj process-drawable) (arg0 int) (arg1 transformq) (arg2 vector))
|
||||
(when (logtest? arg0 7)
|
||||
(let* ((body-T-world (quaternion->matrix (new 'stack-no-clear 'matrix) (-> obj root quat)))
|
||||
(world-T-body (matrix-transpose! (new 'stack-no-clear 'matrix) body-T-world))
|
||||
@@ -623,7 +623,7 @@
|
||||
(set-vector! grav-rt-body 0.0 0.0 0.0 1.0)
|
||||
)
|
||||
(when (logtest? arg0 1)
|
||||
(set! (-> vel-rt-body x) (+ (* (-> arg1 0 x) (-> arg2 x) (-> *display* frames-per-second))
|
||||
(set! (-> vel-rt-body x) (+ (* (-> arg1 trans x) (-> arg2 x) (-> *display* frames-per-second))
|
||||
(* (-> grav-rt-body x) (-> *display* seconds-per-frame))
|
||||
)
|
||||
)
|
||||
@@ -631,14 +631,14 @@
|
||||
(set! (-> vel-rt-body z) 0.0)
|
||||
)
|
||||
)
|
||||
(if (and (logtest? arg0 2) (not (and (logtest? arg0 4096) (= (-> arg1 0 y) 0.0))))
|
||||
(set! (-> vel-rt-body y) (+ (* (-> arg1 0 y) (-> arg2 y) (-> *display* frames-per-second))
|
||||
(if (and (logtest? arg0 2) (not (and (logtest? arg0 4096) (= (-> arg1 trans y) 0.0))))
|
||||
(set! (-> vel-rt-body y) (+ (* (-> arg1 trans y) (-> arg2 y) (-> *display* frames-per-second))
|
||||
(* (-> grav-rt-body y) (-> *display* seconds-per-frame))
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (logtest? arg0 4)
|
||||
(set! (-> vel-rt-body z) (+ (* (-> arg1 0 z) (-> arg2 z) (-> *display* frames-per-second))
|
||||
(set! (-> vel-rt-body z) (+ (* (-> arg1 trans z) (-> arg2 z) (-> *display* frames-per-second))
|
||||
(* (-> grav-rt-body z) (-> *display* seconds-per-frame))
|
||||
)
|
||||
)
|
||||
@@ -650,7 +650,7 @@
|
||||
)
|
||||
)
|
||||
(if (logtest? arg0 16)
|
||||
(quaternion-normalize! (quaternion*! (-> obj root quat) (-> obj root quat) (the-as quaternion (-> arg1 1))))
|
||||
(quaternion-normalize! (quaternion*! (-> obj root quat) (-> obj root quat) (-> arg1 quat)))
|
||||
)
|
||||
(the-as collide-shape (-> obj root))
|
||||
)
|
||||
@@ -902,12 +902,12 @@
|
||||
)
|
||||
|
||||
;; ERROR: function was not converted to expressions. Cannot decompile.
|
||||
(defmethod dummy-19 process-drawable ((obj process-drawable))
|
||||
(defmethod evaluate-joint-control process-drawable ((obj process-drawable))
|
||||
(local-vars (s7-0 none) (ra-0 int))
|
||||
(let ((gp-0 (-> obj skel)))
|
||||
(label cfg-1)
|
||||
(let ((s4-0 (-> gp-0 active-channels)))
|
||||
(b! (logtest? (-> obj draw status) (draw-status drwf01)) cfg-27)
|
||||
(b! (logtest? (-> obj draw status) (draw-status hidden)) cfg-27)
|
||||
(let ((s3-0 0))
|
||||
(b! #t cfg-13 :delay (nop!))
|
||||
(label cfg-3)
|
||||
@@ -947,7 +947,7 @@
|
||||
(set! (-> gp-0 channel v1-26 frame-interp) (fmax 0.0 (fmin 1.0 (-> gp-0 channel v1-26 frame-interp))))
|
||||
)
|
||||
(if (or (zero? s4-0) (not (-> gp-0 root-channel 0 frame-group)))
|
||||
(logior! (-> obj draw status) (draw-status drwf02))
|
||||
(logior! (-> obj draw status) (draw-status no-anim))
|
||||
)
|
||||
)
|
||||
(if (logtest? (-> obj skel status) 72)
|
||||
@@ -969,10 +969,10 @@
|
||||
|
||||
(defbehavior ja-post process-drawable ()
|
||||
(when (nonzero? (-> self draw))
|
||||
(let ((gp-1 (logtest? (-> self draw status) (draw-status drwf04))))
|
||||
(logclear! (-> self draw status) (draw-status drwf02 drwf04))
|
||||
(let ((gp-1 (logtest? (-> self draw status) (draw-status no-skeleton-update))))
|
||||
(logclear! (-> self draw status) (draw-status no-anim no-skeleton-update))
|
||||
(when (nonzero? (-> self skel))
|
||||
(dummy-19 self)
|
||||
(evaluate-joint-control self)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -8,10 +8,18 @@
|
||||
|
||||
;; Allocate some engines.
|
||||
|
||||
;; engine for drawing level backgrounds.
|
||||
(define *background-draw-engine* (new 'global 'engine 'draw 10))
|
||||
|
||||
;; The matrix engine is not actually an engine, but instead an array of handles to processes that
|
||||
;; need to have their joint math done and bones updated.
|
||||
(define *matrix-engine* (new 'global 'boxed-array handle 1024))
|
||||
(set! (-> *matrix-engine* length) 0)
|
||||
|
||||
;; the camera engine contains all currently running camera entities.
|
||||
(define *camera-engine* (new 'global 'engine 'camera-eng 128))
|
||||
|
||||
;; the debug engine is rarely used, but it allows you to add code to the debug hook for a process.
|
||||
(if *debug-segment*
|
||||
(define *debug-engine* (new 'debug 'engine 'debug 512))
|
||||
)
|
||||
|
||||
@@ -1651,7 +1651,7 @@
|
||||
(vector-vector-distance (-> obj root trans) (math-camera-pos))
|
||||
)
|
||||
(and (nonzero? (-> obj skel)) (!= (-> obj skel root-channel 0) (-> obj skel channel)))
|
||||
(and (nonzero? (-> obj draw)) (logtest? (-> obj draw status) (draw-status drwf04)))
|
||||
(and (nonzero? (-> obj draw)) (logtest? (-> obj draw status) (draw-status no-skeleton-update)))
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -1172,13 +1172,13 @@
|
||||
(defmethod run-logic? money ((obj money))
|
||||
(or (zero? (logand (-> obj mask) (process-mask actor-pause)))
|
||||
(or (and (nonzero? (-> obj draw))
|
||||
(logtest? (-> obj draw status) (draw-status drwf03))
|
||||
(logtest? (-> obj draw status) (draw-status was-drawn))
|
||||
(>= (+ (-> *ACTOR-bank* pause-dist) (-> obj root-override pause-adjust-distance))
|
||||
(vector-vector-distance (-> obj root-override trans) (math-camera-pos))
|
||||
)
|
||||
)
|
||||
(and (nonzero? (-> obj skel)) (!= (-> obj skel root-channel 0) (-> obj skel channel)))
|
||||
(and (nonzero? (-> obj draw)) (logtest? (-> obj draw status) (draw-status drwf04)))
|
||||
(and (nonzero? (-> obj draw)) (logtest? (-> obj draw status) (draw-status no-skeleton-update)))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1466,7 +1466,7 @@
|
||||
)
|
||||
(when (nonzero? (-> self part))
|
||||
(cond
|
||||
((logtest? (-> self draw status) (draw-status drwf01 drwf02))
|
||||
((logtest? (-> self draw status) (draw-status hidden no-anim))
|
||||
(kill-and-free-particles (-> self part))
|
||||
(if (nonzero? (-> self sound))
|
||||
(kill-and-free-particles (-> self part))
|
||||
@@ -1655,7 +1655,7 @@
|
||||
(when (and (logtest? (-> self skel status) 32) (and (>= (ja-aframe-num 0) f30-0) (-> self state-object)))
|
||||
(set! (-> self state-object) #f)
|
||||
(kill-and-free-particles (-> self part))
|
||||
(logior! (-> self draw status) (draw-status drwf05))
|
||||
(logior! (-> self draw status) (draw-status skip-bones))
|
||||
(if (not
|
||||
(or (logtest? (the-as int (res-lump-value (-> self entity) 'options uint128 :time (the-as float -1000000000.0)))
|
||||
4096
|
||||
@@ -1675,7 +1675,7 @@
|
||||
(sound-play-by-name (static-sound-name "pu-powercell") (new-sound-id) 1024 0 0 1 #t)
|
||||
(clear-collide-with-as (-> self root-override))
|
||||
(logclear! (-> self mask) (process-mask actor-pause))
|
||||
(logclear! (-> self draw status) (draw-status drwf01))
|
||||
(logclear! (-> self draw status) (draw-status hidden))
|
||||
(process-entity-status! self (entity-perm-status dead) #t)
|
||||
(stop! (-> self sound))
|
||||
(while (handle->process (-> *game-info* other-camera-handle))
|
||||
@@ -2200,7 +2200,7 @@
|
||||
(let ((v1-20 (-> self skel root-channel 0)))
|
||||
(set! (-> v1-20 frame-group) (the-as art-joint-anim (-> self draw art-group data 2)))
|
||||
)
|
||||
(logclear! (-> self draw status) (draw-status drwf01))
|
||||
(logclear! (-> self draw status) (draw-status hidden))
|
||||
(vector-reset! (-> self draw origin))
|
||||
(go-virtual wait)
|
||||
)
|
||||
|
||||
@@ -578,7 +578,7 @@
|
||||
(case (-> arg3 param 1)
|
||||
(('explode 'darkeco 'eco-yellow 'bonk 'tube 'flut-bonk 'flut-attack 'racer)
|
||||
(send-event arg0 'get-attack-count 1)
|
||||
(when (logtest? (-> self draw status) (draw-status drwf03))
|
||||
(when (logtest? (-> self draw status) (draw-status was-drawn))
|
||||
(increment-success-for-hint (game-text-id sidekick-speech-hint-crate-steel))
|
||||
(level-hint-spawn
|
||||
(game-text-id sidekick-speech-crate-steel-break1)
|
||||
@@ -919,7 +919,7 @@
|
||||
(suspend)
|
||||
)
|
||||
)
|
||||
(logior! (-> self draw status) (draw-status drwf01))
|
||||
(logior! (-> self draw status) (draw-status hidden))
|
||||
(case (-> self look)
|
||||
(('iron)
|
||||
(sound-play-by-name (static-sound-name "icrate-break") (new-sound-id) 1024 0 0 1 #t)
|
||||
@@ -1097,7 +1097,7 @@
|
||||
)
|
||||
)
|
||||
(clear-collide-with-as (-> self root-override))
|
||||
(logior! (-> self draw status) (draw-status drwf01))
|
||||
(logior! (-> self draw status) (draw-status hidden))
|
||||
(drop-pickup (-> self fact) #t self (the-as fact-info #f) 0)
|
||||
(set! (-> self child-count) (+ (process-count self) -1))
|
||||
(process-entity-status! self (entity-perm-status bit-4) #t)
|
||||
@@ -1235,23 +1235,23 @@
|
||||
)
|
||||
(('none)
|
||||
(initialize-skeleton obj *crate-wood-sg* '())
|
||||
(logior! (-> obj draw status) (draw-status drwf01))
|
||||
(logior! (-> obj draw status) (draw-status hidden))
|
||||
)
|
||||
(else
|
||||
(initialize-skeleton obj *crate-wood-sg* '())
|
||||
)
|
||||
)
|
||||
(cond
|
||||
((logtest? (fact-options fop16) (-> obj fact options))
|
||||
((logtest? (fact-options indestructible) (-> obj fact options))
|
||||
(set! (-> obj root-override root-prim prim-core offense) (collide-offense indestructible))
|
||||
)
|
||||
((logtest? (-> obj fact options) (fact-options fop15))
|
||||
((logtest? (-> obj fact options) (fact-options strong-attack))
|
||||
(set! (-> obj root-override root-prim prim-core offense) (collide-offense strong-attack))
|
||||
)
|
||||
((logtest? (-> obj fact options) (fact-options fop14))
|
||||
((logtest? (-> obj fact options) (fact-options normal-attack))
|
||||
(set! (-> obj root-override root-prim prim-core offense) (collide-offense normal-attack))
|
||||
)
|
||||
((logtest? (-> obj fact options) (fact-options fop13))
|
||||
((logtest? (-> obj fact options) (fact-options touch))
|
||||
(set! (-> obj root-override root-prim prim-core offense) (collide-offense touch))
|
||||
)
|
||||
)
|
||||
|
||||
@@ -69,11 +69,11 @@
|
||||
:bitfield #t
|
||||
:type uint64
|
||||
(vent-blocked 0)
|
||||
(fop1 1)
|
||||
(has-power-cell 1) ;; should spawn power cell on death
|
||||
(vent-valve 2)
|
||||
(fop3 3)
|
||||
(fop4 4)
|
||||
(fop5 5)
|
||||
(wrap-phase 3) ;; phase should wrap from 1 to 0 instead of mirroring.
|
||||
(fop4 4) ;; unused?
|
||||
(fop5 5) ;; wait-for-cue after death?
|
||||
(fop6 6)
|
||||
(fop7 7)
|
||||
(can-collect 8)
|
||||
@@ -81,16 +81,19 @@
|
||||
(large 10)
|
||||
(fop11 11)
|
||||
(powerup 12)
|
||||
(fop13 13)
|
||||
(fop14 14)
|
||||
(fop15 15)
|
||||
(fop16 16)
|
||||
(fop17 17)
|
||||
;; strengths
|
||||
(touch 13)
|
||||
(normal-attack 14)
|
||||
(strong-attack 15)
|
||||
(indestructible 16)
|
||||
|
||||
(fop17 17) ;; unused
|
||||
(eco-blocked 18)
|
||||
(respawn 19)
|
||||
)
|
||||
|
||||
;; Each individual enemy and pickup process will allocate a fact-info on its process heap
|
||||
;; Each individual enemy and pickup process will allocate a fact-info on its process heap.
|
||||
;; The constructor will read the res-lump stored in the entity to pick reasonable defaults.
|
||||
;; The settings may be different per object - for example some eco pickups may have different
|
||||
;; amounts or timings
|
||||
;; The fact-info class stores data that is common to all fact-infos.
|
||||
@@ -206,8 +209,8 @@
|
||||
;; read the options
|
||||
(set! (-> obj options) (res-lump-value ent 'options fact-options))
|
||||
|
||||
;; TODO - some enum bitfield here.
|
||||
(if (nonzero? (logand #x80200 (the-as int (-> obj options))))
|
||||
;; read fade time, if we have fade or respawn
|
||||
(if (logtest? (fact-options fade respawn) (-> obj options))
|
||||
(set! (-> obj fade-time) (the int (* 300.0 (res-lump-float ent 'timeout))))
|
||||
)
|
||||
)
|
||||
|
||||
@@ -19,21 +19,54 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
|
||||
;; Process drawable is the parent type of most game objects.
|
||||
(deftype process-drawable (process)
|
||||
;; The "root" is the location of the process-drawable.
|
||||
;; It may be a more specific type, and often contains the collision geometry.
|
||||
((root trsqv :offset-assert 112)
|
||||
|
||||
;; The node-list is a list of all the joints and bones, and how
|
||||
;; joints update bones.
|
||||
(node-list cspace-array :offset-assert 116)
|
||||
|
||||
;; the draw-control contains references to all data required for drawing
|
||||
(draw draw-control :offset-assert 120)
|
||||
|
||||
;; The skel is a joint-control which combines animations to control joints
|
||||
(skel joint-control :offset-assert 124)
|
||||
|
||||
;; The nav-control allows enemies to navigate on a nav mesh.
|
||||
(nav nav-control :offset-assert 128)
|
||||
|
||||
;; alignment of animation to our position
|
||||
(align align-control :offset-assert 132)
|
||||
|
||||
;; our path (like if we are a platform or enemy that moves along a fixed path)
|
||||
(path path-control :offset-assert 136)
|
||||
|
||||
;; associated volumes (for water)
|
||||
(vol vol-control :offset-assert 140)
|
||||
|
||||
;; our settings
|
||||
(fact fact-info :offset-assert 144)
|
||||
|
||||
;; reference to our entity
|
||||
(link actor-link-info :offset-assert 148)
|
||||
|
||||
;; our particles
|
||||
(part sparticle-launch-control :offset-assert 152)
|
||||
|
||||
;; state related to entering and being in water
|
||||
(water water-control :offset-assert 156)
|
||||
|
||||
;; any sound that we're playing
|
||||
(sound ambient-sound :offset-assert 160)
|
||||
|
||||
;; seems to only be used in target?
|
||||
(state-flags uint32 :offset-assert 164)
|
||||
|
||||
;; the time when we last did something. Used for different things in different objects
|
||||
(state-time time-frame :offset-assert 168)
|
||||
)
|
||||
:heap-base #x40
|
||||
@@ -43,10 +76,10 @@
|
||||
(:methods
|
||||
(initialize-skeleton (_type_ skeleton-group pair) none 14)
|
||||
(initialize-skeleton-by-name (_type_ string object) _type_ 15)
|
||||
(dummy-16 (_type_ int (inline-array vector) vector) collide-shape 16)
|
||||
(apply-alignment (_type_ int transformq vector) collide-shape 16)
|
||||
(do-joint-math! (_type_) none 17)
|
||||
(dummy-18 (_type_) none 18)
|
||||
(dummy-19 (_type_) none 19)
|
||||
(cleanup-for-death (_type_) none 18)
|
||||
(evaluate-joint-control (_type_) none 19)
|
||||
)
|
||||
(:states
|
||||
(process-drawable-art-error string)
|
||||
@@ -54,7 +87,8 @@
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
;; This is unused. Maybe it was useful in development, where it might be slow to add
|
||||
;; methods to a type?
|
||||
(deftype process-drawable-reserved (process-drawable)
|
||||
()
|
||||
:heap-base #x40
|
||||
@@ -108,14 +142,14 @@
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
;; The attack-info is generated by attackers and sent to target.
|
||||
(deftype attack-info (structure)
|
||||
((trans vector :inline :offset-assert 0)
|
||||
(vector vector :inline :offset-assert 16)
|
||||
(intersection vector :inline :offset-assert 32)
|
||||
(attacker handle :offset-assert 48)
|
||||
(invinc-time time-frame :offset-assert 56)
|
||||
(mask uint32 :offset-assert 64)
|
||||
(mask uint32 :offset-assert 64) ;; todo enum here.
|
||||
(mode symbol :offset-assert 68)
|
||||
(shove-back meters :offset-assert 72)
|
||||
(shove-up meters :offset-assert 76)
|
||||
@@ -130,7 +164,7 @@
|
||||
:size-assert #x68
|
||||
:flag-assert #xa00000068
|
||||
(:methods
|
||||
(dummy-9 (_type_ attack-info) none 9)
|
||||
(combine! (_type_ attack-info) none 9)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -5,6 +5,11 @@
|
||||
; ;; name in dgo: game-info-h
|
||||
; ;; dgos: GAME, ENGINE
|
||||
|
||||
;; This file contains types for:
|
||||
;; - the full game state (game-info)
|
||||
;; - the "load state"
|
||||
;; - checkpoints
|
||||
|
||||
;; Game parameters.
|
||||
(deftype game-bank (basic)
|
||||
((life-max-default float :offset-assert 4) ;; yes this life system works, but does nothing
|
||||
|
||||
@@ -31,6 +31,10 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
;; generic-obs has general game "objects". It's not related to the generic renderer.
|
||||
|
||||
;; A manipy is a way to draw and move something. More complicated objects that want to draw multiple
|
||||
;; things may create a child manipy and then send it commands.
|
||||
(deftype manipy (process-drawable)
|
||||
((new-trans-hook (function none) :offset-assert 176)
|
||||
(cur-trans-hook (function none) :offset-assert 180)
|
||||
@@ -57,7 +61,7 @@
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
;; A part-spawner simply spawns particles.
|
||||
(deftype part-spawner (process-drawable)
|
||||
((mode (pointer sparticle-launch-group) :offset-assert 176)
|
||||
(enable symbol :offset-assert 180)
|
||||
@@ -69,14 +73,15 @@
|
||||
:size-assert #xd0
|
||||
:flag-assert #x15006000d0
|
||||
(:methods
|
||||
(dummy-20 (_type_) symbol 20)
|
||||
(is-visible? (_type_) symbol 20)
|
||||
)
|
||||
(:states
|
||||
part-spawner-active
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
;; a part-tracker will spawn particles, then linger for a bit, and then finally die.
|
||||
;; a more complicated object can use this to manage particles that do something interesting (like follow you)
|
||||
(deftype part-tracker (process)
|
||||
((root trsqv :offset-assert 112)
|
||||
(part sparticle-launch-control :offset-assert 116)
|
||||
@@ -101,7 +106,7 @@
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
;; a camera-tracker can control the camera.
|
||||
(deftype camera-tracker (process)
|
||||
((entity-override entity-actor :offset 52)
|
||||
(grab-target handle :offset 120)
|
||||
@@ -129,14 +134,14 @@
|
||||
:size-assert #xe0
|
||||
:flag-assert #xf007000e0
|
||||
(:methods
|
||||
(dummy-14 (_type_ pair) process 14)
|
||||
(eval (_type_ pair) process 14)
|
||||
)
|
||||
(:states
|
||||
camera-tracker-process
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
;; a touch tracker waits to be touched, then calls some callback function.
|
||||
(deftype touch-tracker (process-drawable)
|
||||
((root-override collide-shape-moving :offset 112)
|
||||
(duration time-frame :offset-assert 176)
|
||||
@@ -155,7 +160,7 @@
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
;; the classic pole
|
||||
(deftype swingpole (process)
|
||||
((root trsq :offset-assert 112)
|
||||
(dir vector :inline :offset-assert 128)
|
||||
@@ -172,7 +177,7 @@
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
;; do you want to fish?
|
||||
(deftype gui-query (structure)
|
||||
((x-position int32 :offset-assert 0)
|
||||
(y-position int32 :offset-assert 4)
|
||||
@@ -192,7 +197,7 @@
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
;; control the camera from something else (an animation)
|
||||
(deftype othercam (process)
|
||||
((hand handle :offset-assert 112)
|
||||
(old-global-mask uint32 :offset-assert 120)
|
||||
@@ -216,6 +221,7 @@
|
||||
)
|
||||
|
||||
|
||||
;; don't draw it! I guess used to disable things during development.
|
||||
(deftype process-hidden (process)
|
||||
()
|
||||
:method-count-assert 15
|
||||
|
||||
@@ -50,9 +50,9 @@
|
||||
(if (logtest? (-> (the-as process-drawable s5-0) skel status) 32)
|
||||
(logior! (-> self skel status) 32)
|
||||
)
|
||||
(logclear! (-> self draw status) (draw-status drwf01 drwf02))
|
||||
(logclear! (-> self draw status) (draw-status hidden no-anim))
|
||||
(if (not (-> self skel root-channel 0 frame-group))
|
||||
(logior! (-> self draw status) (draw-status drwf02))
|
||||
(logior! (-> self draw status) (draw-status no-anim))
|
||||
)
|
||||
(let* ((s5-1 self)
|
||||
(v1-37 (if (and (nonzero? s5-1) (type-type? (-> s5-1 type) manipy))
|
||||
@@ -61,7 +61,7 @@
|
||||
)
|
||||
)
|
||||
(if (and manipy (not (-> (the-as manipy v1-37) draw?)))
|
||||
(logior! (-> self draw status) (draw-status drwf02))
|
||||
(logior! (-> self draw status) (draw-status no-anim))
|
||||
)
|
||||
)
|
||||
(do-joint-math! self)
|
||||
@@ -78,7 +78,7 @@
|
||||
)
|
||||
)
|
||||
(else
|
||||
(logior! (-> self draw status) (draw-status drwf01))
|
||||
(logior! (-> self draw status) (draw-status hidden))
|
||||
(ja-post)
|
||||
)
|
||||
)
|
||||
@@ -335,8 +335,8 @@
|
||||
(set! (-> self draw?) (the-as symbol (-> arg3 param 0)))
|
||||
(cond
|
||||
((-> arg3 param 0)
|
||||
(let ((v1-47 (logtest? (-> self draw status) (draw-status drwf01))))
|
||||
(logclear! (-> self draw status) (draw-status drwf01))
|
||||
(let ((v1-47 (logtest? (-> self draw status) (draw-status hidden))))
|
||||
(logclear! (-> self draw status) (draw-status hidden))
|
||||
(when v1-47
|
||||
(cond
|
||||
((nonzero? (-> self skel))
|
||||
@@ -355,7 +355,7 @@
|
||||
)
|
||||
)
|
||||
(else
|
||||
(set! v0-0 (the-as none (logior (-> self draw status) (draw-status drwf01))))
|
||||
(set! v0-0 (the-as none (logior (-> self draw status) (draw-status hidden))))
|
||||
(set! (-> self draw status) (the-as draw-status v0-0))
|
||||
v0-0
|
||||
)
|
||||
@@ -959,7 +959,7 @@
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod dummy-14 camera-tracker ((obj camera-tracker) (arg0 pair))
|
||||
(defmethod eval camera-tracker ((obj camera-tracker) (arg0 pair))
|
||||
(with-pp
|
||||
(let ((gp-0 (the-as object #f)))
|
||||
(cond
|
||||
@@ -973,15 +973,15 @@
|
||||
(('print)
|
||||
(set! gp-0 (car s4-0))
|
||||
(if (pair? gp-0)
|
||||
(set! gp-0 (dummy-14 obj (the-as pair gp-0)))
|
||||
(set! gp-0 (eval obj (the-as pair gp-0)))
|
||||
)
|
||||
(format #t "~A MESSAGE (~D): ~A~%" obj (-> *display* base-frame-counter) gp-0)
|
||||
)
|
||||
(('while)
|
||||
(let ((s3-0 (car s4-0)))
|
||||
(while (dummy-14 obj (the-as pair s3-0))
|
||||
(while (eval obj (the-as pair s3-0))
|
||||
(let* ((s2-0 (cdr s4-0)) (a1-3 (car s2-0))) (while (not (null? s2-0))
|
||||
(set! gp-0 (dummy-14 obj (the-as pair a1-3)))
|
||||
(set! gp-0 (eval obj (the-as pair a1-3)))
|
||||
(set! s2-0 (cdr s2-0))
|
||||
(set! a1-3 (car s2-0))
|
||||
)
|
||||
@@ -991,9 +991,9 @@
|
||||
)
|
||||
(('until)
|
||||
(let ((s3-1 (car s4-0)))
|
||||
(while (not (dummy-14 obj (the-as pair s3-1)))
|
||||
(while (not (eval obj (the-as pair s3-1)))
|
||||
(let* ((s2-1 (cdr s4-0)) (a1-5 (car s2-1))) (while (not (null? s2-1))
|
||||
(set! gp-0 (dummy-14 obj (the-as pair a1-5)))
|
||||
(set! gp-0 (eval obj (the-as pair a1-5)))
|
||||
(set! s2-1 (cdr s2-1))
|
||||
(set! a1-5 (car s2-1))
|
||||
)
|
||||
@@ -1002,7 +1002,7 @@
|
||||
)
|
||||
)
|
||||
(('not)
|
||||
(set! gp-0 (not (dummy-14 obj (the-as pair (car s4-0)))))
|
||||
(set! gp-0 (not (eval obj (the-as pair (car s4-0)))))
|
||||
)
|
||||
(('wait-for 'wait 'suspend)
|
||||
(let ((s5-1 (command-get-time (car s4-0) 1))
|
||||
@@ -1047,7 +1047,7 @@
|
||||
)
|
||||
)
|
||||
(('work-set!)
|
||||
(set! gp-0 (process->handle (dummy-14 obj (the-as pair (car s4-0)))))
|
||||
(set! gp-0 (process->handle (eval obj (the-as pair (car s4-0)))))
|
||||
(set! (-> obj work-process) (the-as handle gp-0))
|
||||
)
|
||||
(('grab)
|
||||
@@ -1183,7 +1183,7 @@
|
||||
)
|
||||
(else
|
||||
(while (not (null? (-> self script-line)))
|
||||
(dummy-14 self (the-as pair (-> self script-line car)))
|
||||
(eval self (the-as pair (-> self script-line car)))
|
||||
(set! (-> self script-line) (the-as pair (-> self script-line cdr)))
|
||||
)
|
||||
)
|
||||
@@ -1271,7 +1271,7 @@
|
||||
)
|
||||
(cond
|
||||
((and a0-1 (or (= (-> a0-1 display?) 'special) (= (-> a0-1 display?) 'special-vis)))
|
||||
(logclear! (-> self draw status) (draw-status drwf01))
|
||||
(logclear! (-> self draw status) (draw-status hidden))
|
||||
(when (nonzero? (-> self skel))
|
||||
(let ((a0-5 (-> self skel root-channel 0)))
|
||||
(set! (-> a0-5 param 0) 1.0)
|
||||
@@ -1280,13 +1280,13 @@
|
||||
)
|
||||
)
|
||||
((or (and a0-1 (= (-> a0-1 status) 'active)) (= v1-3 'firecanyon))
|
||||
(logior! (-> self draw status) (draw-status drwf01))
|
||||
(logior! (-> self draw status) (draw-status hidden))
|
||||
)
|
||||
((and (= (-> self level) 'firecanyon) (< (-> (camera-pos) y) 327680.0))
|
||||
(logior! (-> self draw status) (draw-status drwf01))
|
||||
(logior! (-> self draw status) (draw-status hidden))
|
||||
)
|
||||
(else
|
||||
(logclear! (-> self draw status) (draw-status drwf01))
|
||||
(logclear! (-> self draw status) (draw-status hidden))
|
||||
(if (nonzero? (-> self part))
|
||||
(spawn (-> self part) (-> self root trans))
|
||||
)
|
||||
@@ -1299,7 +1299,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (zero? (logand (-> self draw status) (draw-status drwf01)))
|
||||
(when (zero? (logand (-> self draw status) (draw-status hidden)))
|
||||
(let ((v1-36 (-> self draw))
|
||||
(a0-18 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
@@ -1377,7 +1377,7 @@
|
||||
)
|
||||
)
|
||||
(initialize-skeleton-by-name obj *lev-string* '())
|
||||
(logior! (-> obj draw status) (draw-status drwf06))
|
||||
(logior! (-> obj draw status) (draw-status do-not-check-distance))
|
||||
(if (nonzero? (-> obj draw))
|
||||
(go med-res-level-idle)
|
||||
)
|
||||
@@ -1386,7 +1386,7 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod dummy-20 part-spawner ((obj part-spawner))
|
||||
(defmethod is-visible? part-spawner ((obj part-spawner))
|
||||
(sphere<-vector+r! (-> obj world-sphere) (-> obj root trans) (-> obj radius))
|
||||
(sphere-in-view-frustum? (-> obj world-sphere))
|
||||
)
|
||||
|
||||
@@ -673,7 +673,7 @@
|
||||
)
|
||||
(when (and (< 0.0 (-> self fact-info-target eco-level))
|
||||
(zero? (logand (-> self state-flags) 512))
|
||||
(zero? (logand (-> self draw status) (draw-status drwf01 drwf02)))
|
||||
(zero? (logand (-> self draw status) (draw-status hidden no-anim)))
|
||||
(not (movie?))
|
||||
(rand-vu-percent?
|
||||
(lerp-scale
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
(if (logtest? (process-mask enemy) (-> s5-0 mask))
|
||||
(set! s4-2 (logior s4-2 1))
|
||||
)
|
||||
(if (and (nonzero? (-> s5-0 draw)) (logtest? (-> s5-0 draw status) (draw-status drwf03)))
|
||||
(if (and (nonzero? (-> s5-0 draw)) (logtest? (-> s5-0 draw status) (draw-status was-drawn)))
|
||||
(set! s4-2 (logior s4-2 2))
|
||||
)
|
||||
(let ((a0-16 (logand s4-2 (-> gp-0 mask))))
|
||||
@@ -885,7 +885,7 @@
|
||||
(send-event (-> v1-0 process 0) 'notify 'die)
|
||||
)
|
||||
)
|
||||
(dummy-18 self)
|
||||
(cleanup-for-death self)
|
||||
(none)
|
||||
)
|
||||
)
|
||||
@@ -1292,7 +1292,7 @@
|
||||
:virtual #t
|
||||
:code
|
||||
(behavior ()
|
||||
(dummy-18 self)
|
||||
(cleanup-for-death self)
|
||||
(none)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -733,7 +733,7 @@
|
||||
)
|
||||
|
||||
(defbehavior process-taskable-clean-up-after-talking process-taskable ()
|
||||
(logclear! (-> self draw status) (draw-status drwf01))
|
||||
(logclear! (-> self draw status) (draw-status hidden))
|
||||
(set! (-> self skel status) (logand -2 (-> self skel status)))
|
||||
(clear-pending-settings-from-process *setting-control* self 'border-mode)
|
||||
(clear-pending-settings-from-process *setting-control* self 'talking)
|
||||
@@ -1431,7 +1431,7 @@
|
||||
(defmethod draw-npc-shadow process-taskable ((obj process-taskable))
|
||||
(let ((gp-0 (-> obj draw shadow-ctrl)))
|
||||
(cond
|
||||
((and (-> obj draw shadow) (zero? (-> obj draw cur-lod)) (logtest? (-> obj draw status) (draw-status drwf03)))
|
||||
((and (-> obj draw shadow) (zero? (-> obj draw cur-lod)) (logtest? (-> obj draw status) (draw-status was-drawn)))
|
||||
;(dummy-15 gp-0 (-> obj draw origin) -4096.0 4096.0 32768.0)
|
||||
(dummy-14 gp-0)
|
||||
)
|
||||
|
||||
+110
-110
@@ -818,7 +818,7 @@
|
||||
)
|
||||
(when (and v1-40
|
||||
(logtest? (-> (the-as process-drawable v1-40) skel status) 256)
|
||||
(logtest? (-> (the-as process-drawable v1-40) draw status) (draw-status drwf03))
|
||||
(logtest? (-> (the-as process-drawable v1-40) draw status) (draw-status was-drawn))
|
||||
)
|
||||
(when (-> s5-3 shaders)
|
||||
(when (not (paused?))
|
||||
@@ -1116,115 +1116,115 @@
|
||||
)
|
||||
|
||||
(defun merc-eye-anim ((arg0 manipy))
|
||||
(let* ((s5-0 (-> arg0 draw mgeo header eye-ctrl))
|
||||
(a0-1 (-> arg0 skel root-channel 0))
|
||||
(s4-0 (-> a0-1 frame-group))
|
||||
)
|
||||
(when (and (logtest? (-> arg0 skel status) 256)
|
||||
(nonzero? s5-0)
|
||||
(> (-> arg0 skel active-channels) 0)
|
||||
s4-0
|
||||
(nonzero? (-> s4-0 _unknown))
|
||||
)
|
||||
(let* ((v1-15 (-> *eye-control-array* data (-> s5-0 eye-slot)))
|
||||
(s3-1 (min (the int (-> a0-1 frame-num)) (-> s4-0 _unknown 0)))
|
||||
(s2-1 (min (+ (the int (-> a0-1 frame-num)) 1) (-> s4-0 _unknown 0)))
|
||||
(f0-4 (-> a0-1 frame-num))
|
||||
(f30-0 (- f0-4 (* (the float (the int (/ f0-4 1.0))) 1.0)))
|
||||
)
|
||||
(set! (-> v1-15 process) (process->handle arg0))
|
||||
(set! (-> v1-15 shaders) (the-as (inline-array adgif-shader) (-> s5-0 iris-shader)))
|
||||
(set! (-> v1-15 level) (the-as uint (-> (if (-> arg0 entity)
|
||||
(-> arg0 entity extra level)
|
||||
(-> *level* level-default)
|
||||
)
|
||||
index
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((s1-0 (new 'stack-no-clear 'box8s))
|
||||
(s0-0 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(cond
|
||||
((-> s4-0 _unknown)
|
||||
(convert-eye-data
|
||||
s1-0
|
||||
(the-as
|
||||
uint128
|
||||
(-> (the-as (pointer int64) (&+ (the-as (pointer int64) (-> s4-0 _unknown)) (* (* s3-1 2) 8))) 1)
|
||||
)
|
||||
)
|
||||
(convert-eye-data
|
||||
(the-as box8s s0-0)
|
||||
(the-as
|
||||
uint128
|
||||
(-> (the-as (pointer int64) (&+ (the-as (pointer int64) (-> s4-0 _unknown)) (* (* s2-1 2) 8))) 1)
|
||||
)
|
||||
)
|
||||
(vector4-lerp!
|
||||
(the-as vector (+ (the-as uint (-> *eye-control-array* data 0 left)) (* 96 (-> s5-0 eye-slot))))
|
||||
(the-as vector (-> s1-0 data))
|
||||
(the-as vector (&-> s0-0 x))
|
||||
f30-0
|
||||
)
|
||||
(vector4-lerp!
|
||||
(the-as vector (&+ (&-> *eye-control-array* data 0 left iris-scale) (* 96 (-> s5-0 eye-slot))))
|
||||
(-> s1-0 max)
|
||||
(&+ s0-0 16)
|
||||
f30-0
|
||||
)
|
||||
(convert-eye-data
|
||||
s1-0
|
||||
(the-as
|
||||
uint128
|
||||
(-> (the-as (pointer int64) (&+ (the-as (pointer int64) (-> s4-0 _unknown)) (* (+ (* s3-1 2) 1) 8))) 1)
|
||||
)
|
||||
)
|
||||
(convert-eye-data
|
||||
(the-as box8s s0-0)
|
||||
(the-as
|
||||
uint128
|
||||
(-> (the-as (pointer int64) (&+ (the-as (pointer int64) (-> s4-0 _unknown)) (* (+ (* s2-1 2) 1) 8))) 1)
|
||||
)
|
||||
)
|
||||
(vector4-lerp!
|
||||
(the-as vector (+ (the-as uint (-> *eye-control-array* data 0 right)) (* 96 (-> s5-0 eye-slot))))
|
||||
(the-as vector (-> s1-0 data))
|
||||
(the-as vector (&-> s0-0 x))
|
||||
f30-0
|
||||
)
|
||||
(vector4-lerp!
|
||||
(the-as vector (&+ (&-> *eye-control-array* data 0 right iris-scale) (* 96 (-> s5-0 eye-slot))))
|
||||
(-> s1-0 max)
|
||||
(&+ s0-0 16)
|
||||
f30-0
|
||||
)
|
||||
)
|
||||
(else
|
||||
(let ((v1-37 (-> *eye-control-array* data (-> s5-0 eye-slot))))
|
||||
(set! (-> v1-37 left x) 0.0)
|
||||
(set! (-> v1-37 left y) 0.0)
|
||||
(set! (-> v1-37 left lid) -1.0)
|
||||
(set! (-> v1-37 left iris-scale) 1.0)
|
||||
(set! (-> v1-37 left pupil-scale) 1.0)
|
||||
(set! (-> v1-37 left lid-scale) 1.0)
|
||||
(set! (-> v1-37 right x) 0.0)
|
||||
(set! (-> v1-37 right y) 0.0)
|
||||
(set! (-> v1-37 right lid) -1.0)
|
||||
(set! (-> v1-37 right iris-scale) 1.0)
|
||||
(set! (-> v1-37 right pupil-scale) 1.0)
|
||||
(set! (-> v1-37 right lid-scale) 1.0)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(logior! (-> arg0 skel status) 128)
|
||||
)
|
||||
)
|
||||
(if (logtest? (-> arg0 skel status) 128)
|
||||
(set! (-> arg0 skel status) (logand -129 (-> arg0 skel status)))
|
||||
)
|
||||
; (let* ((s5-0 (-> arg0 draw mgeo header eye-ctrl))
|
||||
; (a0-1 (-> arg0 skel root-channel 0))
|
||||
; (s4-0 (-> a0-1 frame-group))
|
||||
; )
|
||||
; (when (and (logtest? (-> arg0 skel status) 256)
|
||||
; (nonzero? s5-0)
|
||||
; (> (-> arg0 skel active-channels) 0)
|
||||
; s4-0
|
||||
; (nonzero? (-> s4-0 _unknown))
|
||||
; )
|
||||
; (let* ((v1-15 (-> *eye-control-array* data (-> s5-0 eye-slot)))
|
||||
; (s3-1 (min (the int (-> a0-1 frame-num)) (-> s4-0 _unknown 0)))
|
||||
; (s2-1 (min (+ (the int (-> a0-1 frame-num)) 1) (-> s4-0 _unknown 0)))
|
||||
; (f0-4 (-> a0-1 frame-num))
|
||||
; (f30-0 (- f0-4 (* (the float (the int (/ f0-4 1.0))) 1.0)))
|
||||
; )
|
||||
; (set! (-> v1-15 process) (process->handle arg0))
|
||||
; (set! (-> v1-15 shaders) (the-as (inline-array adgif-shader) (-> s5-0 iris-shader)))
|
||||
; (set! (-> v1-15 level) (the-as uint (-> (if (-> arg0 entity)
|
||||
; (-> arg0 entity extra level)
|
||||
; (-> *level* level-default)
|
||||
; )
|
||||
; index
|
||||
; )
|
||||
; )
|
||||
; )
|
||||
; (let ((s1-0 (new 'stack-no-clear 'box8s))
|
||||
; (s0-0 (new 'stack-no-clear 'vector))
|
||||
; )
|
||||
; (cond
|
||||
; ((-> s4-0 _unknown)
|
||||
; (convert-eye-data
|
||||
; s1-0
|
||||
; (the-as
|
||||
; uint128
|
||||
; (-> (the-as (pointer int64) (&+ (the-as (pointer int64) (-> s4-0 _unknown)) (* (* s3-1 2) 8))) 1)
|
||||
; )
|
||||
; )
|
||||
; (convert-eye-data
|
||||
; (the-as box8s s0-0)
|
||||
; (the-as
|
||||
; uint128
|
||||
; (-> (the-as (pointer int64) (&+ (the-as (pointer int64) (-> s4-0 _unknown)) (* (* s2-1 2) 8))) 1)
|
||||
; )
|
||||
; )
|
||||
; (vector4-lerp!
|
||||
; (the-as vector (+ (the-as uint (-> *eye-control-array* data 0 left)) (* 96 (-> s5-0 eye-slot))))
|
||||
; (the-as vector (-> s1-0 data))
|
||||
; (the-as vector (&-> s0-0 x))
|
||||
; f30-0
|
||||
; )
|
||||
; (vector4-lerp!
|
||||
; (the-as vector (&+ (&-> *eye-control-array* data 0 left iris-scale) (* 96 (-> s5-0 eye-slot))))
|
||||
; (-> s1-0 max)
|
||||
; (&+ s0-0 16)
|
||||
; f30-0
|
||||
; )
|
||||
; (convert-eye-data
|
||||
; s1-0
|
||||
; (the-as
|
||||
; uint128
|
||||
; (-> (the-as (pointer int64) (&+ (the-as (pointer int64) (-> s4-0 _unknown)) (* (+ (* s3-1 2) 1) 8))) 1)
|
||||
; )
|
||||
; )
|
||||
; (convert-eye-data
|
||||
; (the-as box8s s0-0)
|
||||
; (the-as
|
||||
; uint128
|
||||
; (-> (the-as (pointer int64) (&+ (the-as (pointer int64) (-> s4-0 _unknown)) (* (+ (* s2-1 2) 1) 8))) 1)
|
||||
; )
|
||||
; )
|
||||
; (vector4-lerp!
|
||||
; (the-as vector (+ (the-as uint (-> *eye-control-array* data 0 right)) (* 96 (-> s5-0 eye-slot))))
|
||||
; (the-as vector (-> s1-0 data))
|
||||
; (the-as vector (&-> s0-0 x))
|
||||
; f30-0
|
||||
; )
|
||||
; (vector4-lerp!
|
||||
; (the-as vector (&+ (&-> *eye-control-array* data 0 right iris-scale) (* 96 (-> s5-0 eye-slot))))
|
||||
; (-> s1-0 max)
|
||||
; (&+ s0-0 16)
|
||||
; f30-0
|
||||
; )
|
||||
; )
|
||||
; (else
|
||||
; (let ((v1-37 (-> *eye-control-array* data (-> s5-0 eye-slot))))
|
||||
; (set! (-> v1-37 left x) 0.0)
|
||||
; (set! (-> v1-37 left y) 0.0)
|
||||
; (set! (-> v1-37 left lid) -1.0)
|
||||
; (set! (-> v1-37 left iris-scale) 1.0)
|
||||
; (set! (-> v1-37 left pupil-scale) 1.0)
|
||||
; (set! (-> v1-37 left lid-scale) 1.0)
|
||||
; (set! (-> v1-37 right x) 0.0)
|
||||
; (set! (-> v1-37 right y) 0.0)
|
||||
; (set! (-> v1-37 right lid) -1.0)
|
||||
; (set! (-> v1-37 right iris-scale) 1.0)
|
||||
; (set! (-> v1-37 right pupil-scale) 1.0)
|
||||
; (set! (-> v1-37 right lid-scale) 1.0)
|
||||
; )
|
||||
; )
|
||||
; )
|
||||
; )
|
||||
; )
|
||||
; (logior! (-> arg0 skel status) 128)
|
||||
; )
|
||||
; )
|
||||
; (if (logtest? (-> arg0 skel status) 128)
|
||||
; (set! (-> arg0 skel status) (logand -129 (-> arg0 skel status)))
|
||||
; )
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
)
|
||||
|
||||
(defun light-group-process! ((arg0 vu-lights) (arg1 light-group) (arg2 vector) (arg3 vector))
|
||||
"unused."
|
||||
(rotate-y<-vector+vector arg3 arg2)
|
||||
(vu-lights<-light-group! arg0 arg1)
|
||||
(none)
|
||||
|
||||
@@ -141,7 +141,7 @@
|
||||
(!= (-> self control unknown-surface00 mode) 'swim)
|
||||
(!= (-> self control unknown-surface00 mode) 'dive)
|
||||
(!= (-> self next-state name) 'target-flop)
|
||||
(zero? (logand (-> self draw status) (draw-status drwf01 drwf02 drwf05)))
|
||||
(zero? (logand (-> self draw status) (draw-status hidden no-anim skip-bones)))
|
||||
)
|
||||
(set! (-> self control shadow-pos quad) (-> self control trans quad))
|
||||
(find-ground-and-draw-shadow
|
||||
|
||||
@@ -5,16 +5,25 @@
|
||||
;; name in dgo: prototype-h
|
||||
;; dgos: GAME, ENGINE
|
||||
|
||||
;; The "prototype" system is used for instanced background rendering (shrub and tie).
|
||||
|
||||
;; The first type is the bucket. There's one bucket per prototype. Each prototype can have up to
|
||||
;; 4 geometries (level of details). Lower numbers are higher detail.
|
||||
;; During drawing, the engine will build linked lists of instance data. Each instance will pick
|
||||
;; a geom, based on distance from the camera (or other settings) and will add itself to the list
|
||||
;; for that geom.
|
||||
(deftype prototype-bucket (basic)
|
||||
((name basic :offset-assert 4)
|
||||
(flags uint32 :offset-assert 8)
|
||||
(in-level uint16 :offset-assert 12)
|
||||
(utextures uint16 :offset-assert 14)
|
||||
(geometry drawable 4 :offset-assert 16)
|
||||
(dists vector :inline :offset-assert 32)
|
||||
(rdists vector :inline :offset-assert 48)
|
||||
(next uint32 4 :offset-assert 64)
|
||||
(count uint16 4 :offset-assert 80)
|
||||
(geometry drawable 4 :offset-assert 16) ;; the 4 levels of detail
|
||||
(dists vector :inline :offset-assert 32) ;; lod settings
|
||||
(rdists vector :inline :offset-assert 48) ;; lod settings
|
||||
(next uint32 4 :offset-assert 64) ;; linked list of instances of each geom.
|
||||
(count uint16 4 :offset-assert 80) ;; number of each instance with each geom.
|
||||
|
||||
;; overlays
|
||||
(near-plane meters :offset 32)
|
||||
(near-stiff meters :offset 36)
|
||||
(mid-plane meters :offset 40)
|
||||
@@ -31,6 +40,11 @@
|
||||
:flag-assert #x900000058
|
||||
)
|
||||
|
||||
;;;;;;;;;;;;;;;
|
||||
;; shrub
|
||||
;;;;;;;;;;;;;;;
|
||||
|
||||
;; specialization for shrub. We keep the end of the linked list too.
|
||||
(deftype prototype-bucket-shrub (prototype-bucket)
|
||||
((mod-count uint16 4 :offset-assert 88)
|
||||
(last uint32 4 :offset-assert 96)
|
||||
@@ -41,6 +55,7 @@
|
||||
:flag-assert #x900000070
|
||||
)
|
||||
|
||||
;; array of all the prototypes in a shrub tree.
|
||||
(deftype prototype-inline-array-shrub (drawable)
|
||||
((length int16 :offset 6)
|
||||
(data prototype-bucket-shrub 1 :inline :offset 32)
|
||||
@@ -51,18 +66,7 @@
|
||||
:flag-assert #x1200000094
|
||||
)
|
||||
|
||||
(defmethod
|
||||
inspect
|
||||
prototype-inline-array-shrub
|
||||
((obj prototype-inline-array-shrub))
|
||||
(format #t "[~8x] ~A~%" obj (-> obj type))
|
||||
(format #t "~Tid: ~D~%" (-> obj id))
|
||||
(format #t "~Tbsphere: ~`vector`P~%" (-> obj bsphere))
|
||||
(format #t "~Tlength: ~D~%" (-> obj length))
|
||||
(format #t "~Tdata[1] @ #x~X~%" (-> obj data))
|
||||
obj
|
||||
)
|
||||
|
||||
;; shrub prototypes, plus a pointer to the level's wind data.
|
||||
(deftype prototype-array-shrub-info (basic)
|
||||
((prototype-inline-array-shrub prototype-inline-array-shrub :offset-assert 4)
|
||||
(wind-vectors uint32 :offset-assert 8)
|
||||
@@ -72,8 +76,18 @@
|
||||
:flag-assert #x90000000c
|
||||
)
|
||||
|
||||
;;;;;;;;;;;;;;;
|
||||
;; tie
|
||||
;;;;;;;;;;;;;;;
|
||||
|
||||
;; tie has a few special features:
|
||||
;; - ability to output to generic (and env map)
|
||||
;; - per-proto colors
|
||||
;; - instanced collision
|
||||
|
||||
(declare-type drawable-inline-array-collide-fragment drawable-inline-array)
|
||||
(declare-type prototype-tie drawable)
|
||||
;; prototype for a TIE
|
||||
(deftype prototype-bucket-tie (prototype-bucket)
|
||||
((generic-count uint16 4 :offset-assert 88)
|
||||
(generic-next uint32 4 :offset-assert 96)
|
||||
@@ -96,6 +110,7 @@
|
||||
:flag-assert #x900000094
|
||||
)
|
||||
|
||||
;; all tie prototypes in a tie tree. (note, not inline like shrub)
|
||||
(deftype prototype-array-tie (array)
|
||||
((array-data prototype-bucket-tie :dynamic :offset 16)
|
||||
)
|
||||
@@ -107,6 +122,8 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; all tie prototypes and pointer to level's wind data.
|
||||
;; in practice, they are shared with all tie/shrub trees in the level
|
||||
(deftype proxy-prototype-array-tie (basic)
|
||||
((prototype-array-tie prototype-array-tie :offset-assert 4)
|
||||
(wind-vectors uint32 :offset-assert 8)
|
||||
@@ -116,12 +133,18 @@
|
||||
:flag-assert #x90000000c
|
||||
)
|
||||
|
||||
;;;;;;;;;;;;
|
||||
;; instance
|
||||
;;;;;;;;;;;;
|
||||
|
||||
;; note: more specific instances are available in tie/shrub files.
|
||||
|
||||
(deftype instance (drawable)
|
||||
((bucket-index uint16 :offset 6)
|
||||
(error (pointer drawable-error) :offset 8) ;; - from default-menu::build-instance-list
|
||||
(origin matrix4h :inline :offset-assert 32) ; TODO - this can also be a float, default-menu::lambda_62
|
||||
(unknown-vector vector :inline :offset 32) ;; todo, this might not be right.
|
||||
(wind-index uint16 :offset 62)
|
||||
((bucket-index uint16 :offset 6) ;; which bucket (index in arrays)
|
||||
(error (pointer drawable-error) :offset 8) ;; if we have an error.
|
||||
(origin matrix4h :inline :offset-assert 32) ;; our location (packed format)
|
||||
(unknown-vector vector :inline :offset 32) ;; todo, this might not be right.
|
||||
(wind-index uint16 :offset 62) ;; used by wind calculation.
|
||||
)
|
||||
:method-count-assert 18
|
||||
:size-assert #x40
|
||||
|
||||
@@ -572,8 +572,8 @@
|
||||
(set! (-> *math-camera* fog-max) (-> arg0 current-fog fog-dists z))
|
||||
(set! (-> *math-camera* fog-min) (-> arg0 current-fog fog-dists w))
|
||||
|
||||
;; interp target lights.
|
||||
(let* ((v1-195 0 (-> *target* draw light-index)) ;; TODO
|
||||
;; interp target lights. (note: added check here.)
|
||||
(let* ((v1-195 (if *target* (-> *target* draw light-index) 0))
|
||||
(f30-1 (-> arg0 target-interp))
|
||||
(s4-6 (-> arg0 light-group))
|
||||
(s5-2 (-> arg0 light-group v1-195))
|
||||
|
||||
@@ -754,7 +754,7 @@
|
||||
(set! (-> s4-0 quad) (-> obj bottom 0 quad))
|
||||
(vector-xz-length (-> obj process root transv))
|
||||
(set! (-> s4-0 y) (-> obj surface-height))
|
||||
(when (and (logtest? (-> obj process draw status) (draw-status drwf03))
|
||||
(when (and (logtest? (-> obj process draw status) (draw-status was-drawn))
|
||||
(zero? (-> obj process draw cur-lod))
|
||||
(logtest? #x400000 (-> obj flags))
|
||||
(logtest? #x800000 (-> obj flags))
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
;; name in dgo: wind-h
|
||||
;; dgos: GAME, ENGINE
|
||||
|
||||
;; These "wind" types are used in the tie/shrub renderers.
|
||||
|
||||
(deftype wind-vector (structure)
|
||||
((wind-pos vector2w :inline :offset-assert 0)
|
||||
(wind-vel vector2w :inline :offset-assert 8)
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
;; name in dgo: dynamics-h
|
||||
;; dgos: GAME, ENGINE
|
||||
|
||||
;; dyanamics contain gravity properties
|
||||
(deftype dynamics (basic)
|
||||
((name basic :offset-assert 4)
|
||||
(gravity-max meters :offset-assert 8)
|
||||
@@ -20,13 +21,16 @@
|
||||
)
|
||||
|
||||
(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))))
|
||||
)
|
||||
|
||||
(defun time-to-ground ((arg0 float) (arg1 float) (arg2 float))
|
||||
"How many ticks it takes to reach the ground for a ballistic trajectory."
|
||||
(let ((f0-0 0.0)
|
||||
(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))
|
||||
@@ -36,6 +40,7 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; the default dynamics of the world.
|
||||
(define *standard-dynamics*
|
||||
(new 'static 'dynamics
|
||||
:name 'standard
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
:flag-assert #x900000004
|
||||
)
|
||||
|
||||
;; Information sent from the C kernel about a file on a memory card
|
||||
(deftype mc-file-info (structure)
|
||||
((present int32 :offset-assert 0)
|
||||
(blind-data float 16 :offset-assert 4)
|
||||
@@ -32,6 +33,9 @@
|
||||
:flag-assert #x900000044
|
||||
)
|
||||
|
||||
;; Information sent from the C kernel about all the files on a memory card.
|
||||
;; Note that the C kernel takes care of cleaning up all this, so in GOAL
|
||||
;; we should assume that all this data is valid.
|
||||
(deftype mc-slot-info (structure)
|
||||
((handle int32 :offset-assert 0)
|
||||
(known int32 :offset-assert 4)
|
||||
|
||||
@@ -1141,8 +1141,8 @@
|
||||
)
|
||||
(when (logtest? (-> self state-flags) 32)
|
||||
(if (< (logand (- (-> *display* base-frame-counter) (-> self control unknown-dword80)) 3) 1)
|
||||
(logior! (-> self draw status) (draw-status drwf01))
|
||||
(logclear! (-> self draw status) (draw-status drwf01))
|
||||
(logior! (-> self draw status) (draw-status hidden))
|
||||
(logclear! (-> self draw status) (draw-status hidden))
|
||||
)
|
||||
(if (>= (- (-> *display* base-frame-counter) (-> self control unknown-dword80)) (-> self control unknown-dword81))
|
||||
(target-timed-invulnerable-off self)
|
||||
@@ -1406,7 +1406,7 @@
|
||||
(let ((gp-0 (new 'stack-no-clear 'vector)))
|
||||
(cond
|
||||
((and (= (-> self next-state name) 'target-clone-anim)
|
||||
(zero? (logand (-> self draw status) (draw-status drwf01)))
|
||||
(zero? (logand (-> self draw status) (draw-status hidden)))
|
||||
(begin
|
||||
(vector<-cspace! gp-0 (-> self node-list data 3))
|
||||
(set! (-> gp-0 y) (+ -5896.192 (-> gp-0 y)))
|
||||
@@ -1441,7 +1441,7 @@
|
||||
((logtest? (-> self control root-prim prim-core action) (collide-action ca-13))
|
||||
(set! (-> (&-> (-> self control) unknown-qword00) 0) (-> self control shadow-pos quad))
|
||||
)
|
||||
((logtest? (-> self draw status) (draw-status drwf01 drwf02))
|
||||
((logtest? (-> self draw status) (draw-status hidden no-anim))
|
||||
(set! (-> (&-> (-> self control) unknown-qword00) 0) (-> self control trans quad))
|
||||
)
|
||||
(else
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
;; name in dgo: pat-h
|
||||
;; dgos: GAME, ENGINE
|
||||
|
||||
;; The "pat" system is used to classify terrain.
|
||||
;; These are likely stored as part of the level data, so they are quite compact.
|
||||
;; The "pat" system is used to store some data per triangle in collision meshes.
|
||||
;; It packs all data into a 32-bit pat-surface type.
|
||||
|
||||
(defenum pat-material
|
||||
:type uint8
|
||||
|
||||
@@ -5,6 +5,9 @@
|
||||
;; name in dgo: surface-h
|
||||
;; dgos: GAME, ENGINE
|
||||
|
||||
;; The "surface" defines how jak moves on the ground. It includes things like how fast he can go,
|
||||
;; how slippery it is, and what functions should run when he hits it.
|
||||
;; Note that "surface" can apply to weird things, like riding the zoomer or swimming as well.
|
||||
(deftype surface (basic)
|
||||
((name symbol :offset-assert 4)
|
||||
;; data went here
|
||||
|
||||
@@ -975,7 +975,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(dummy-9 gp-0 arg1)
|
||||
(combine! gp-0 arg1)
|
||||
(when (zero? (logand (-> gp-0 mask) 2))
|
||||
(vector-z-quaternion! (-> gp-0 vector) (-> self control unknown-quaternion00))
|
||||
(vector-xz-normalize! (-> gp-0 vector) (- (fabs (-> gp-0 shove-back))))
|
||||
|
||||
@@ -267,8 +267,8 @@
|
||||
)
|
||||
((= v1-0 'draw)
|
||||
(if (-> arg3 param 0)
|
||||
(logclear! (-> self draw status) (draw-status drwf05))
|
||||
(logior! (-> self draw status) (draw-status drwf05))
|
||||
(logclear! (-> self draw status) (draw-status skip-bones))
|
||||
(logior! (-> self draw status) (draw-status skip-bones))
|
||||
)
|
||||
(let ((v1-132 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> v1-132 from) arg0)
|
||||
@@ -1079,7 +1079,7 @@ target-standard-event-handler
|
||||
(set! (-> self water drip-mult) 1.0)
|
||||
(set! (-> self neck flex-blend) 1.0)
|
||||
(set! (-> self control unknown-float91) 0.0)
|
||||
(logclear! (-> self draw status) (draw-status drwf01))
|
||||
(logclear! (-> self draw status) (draw-status hidden))
|
||||
(set! (-> self skel status) (logand -33 (-> self skel status)))
|
||||
(set! (-> self control status) (logand -16385 (-> self control status)))
|
||||
0
|
||||
|
||||
@@ -663,7 +663,7 @@
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod dummy-16 target ((obj target) (arg0 int) (arg1 (inline-array vector)) (arg2 vector))
|
||||
(defmethod apply-alignment target ((obj target) (arg0 int) (arg1 transformq) (arg2 vector))
|
||||
(let ((s2-0 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> s2-0 quad) (-> arg2 quad))
|
||||
(set! (-> s2-0 z) (target-align-vel-z-adjust (-> s2-0 z)))
|
||||
@@ -677,7 +677,7 @@
|
||||
(set-vector! s1-0 0.0 0.0 0.0 1.0)
|
||||
)
|
||||
(when (logtest? arg0 1)
|
||||
(set! (-> a1-3 x) (+ (* (-> arg1 0 x) (-> s2-0 x) (-> *display* frames-per-second))
|
||||
(set! (-> a1-3 x) (+ (* (-> arg1 trans x) (-> s2-0 x) (-> *display* frames-per-second))
|
||||
(* (-> s1-0 x) (-> *display* seconds-per-frame))
|
||||
)
|
||||
)
|
||||
@@ -685,14 +685,14 @@
|
||||
(set! (-> a1-3 z) 0.0)
|
||||
)
|
||||
)
|
||||
(if (and (logtest? arg0 2) (not (and (logtest? arg0 4096) (= (-> arg1 0 y) 0.0))))
|
||||
(set! (-> a1-3 y) (+ (* (-> arg1 0 y) (-> s2-0 y) (-> *display* frames-per-second))
|
||||
(if (and (logtest? arg0 2) (not (and (logtest? arg0 4096) (= (-> arg1 trans y) 0.0))))
|
||||
(set! (-> a1-3 y) (+ (* (-> arg1 trans y) (-> s2-0 y) (-> *display* frames-per-second))
|
||||
(* (-> s1-0 y) (-> *display* seconds-per-frame))
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (logtest? arg0 4)
|
||||
(set! (-> a1-3 z) (+ (* (-> arg1 0 z) (-> s2-0 z) (-> *display* frames-per-second))
|
||||
(set! (-> a1-3 z) (+ (* (-> arg1 trans z) (-> s2-0 z) (-> *display* frames-per-second))
|
||||
(* (-> s1-0 z) (-> *display* seconds-per-frame))
|
||||
)
|
||||
)
|
||||
@@ -705,16 +705,14 @@
|
||||
)
|
||||
)
|
||||
(if (logtest? arg0 16)
|
||||
(quaternion-normalize! (quaternion*!
|
||||
(-> obj control unknown-quaternion00)
|
||||
(-> obj control unknown-quaternion00)
|
||||
(the-as quaternion (-> arg1 1))
|
||||
)
|
||||
)
|
||||
(quaternion-normalize!
|
||||
(quaternion*! (-> obj control unknown-quaternion00) (-> obj control unknown-quaternion00) (-> arg1 quat))
|
||||
)
|
||||
)
|
||||
(the-as collide-shape (-> obj control))
|
||||
)
|
||||
|
||||
|
||||
(defun average-turn-angle ((arg0 target))
|
||||
(let ((f30-0 0.0))
|
||||
(dotimes (s5-0 8)
|
||||
@@ -991,14 +989,14 @@
|
||||
)
|
||||
|
||||
(defun target-timed-invulnerable-off ((arg0 target))
|
||||
(logclear! (-> arg0 draw status) (draw-status drwf01))
|
||||
(logclear! (-> arg0 draw status) (draw-status hidden))
|
||||
(set! (-> arg0 state-flags) (logand -33 (-> arg0 state-flags)))
|
||||
(set-collide-kinds (-> arg0 control) 2 (collide-kind) (collide-kind target-attack))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod dummy-9 attack-info ((obj attack-info) (arg0 attack-info))
|
||||
(defmethod combine! attack-info ((obj attack-info) (arg0 attack-info))
|
||||
(with-pp
|
||||
(let ((s4-0 (-> arg0 mask)))
|
||||
(set! (-> obj mask) (-> arg0 mask))
|
||||
|
||||
@@ -3704,7 +3704,7 @@
|
||||
(cond
|
||||
((not (-> self control unknown-spoolanim00))
|
||||
)
|
||||
((zero? (logand (-> self draw status) (draw-status drwf01)))
|
||||
((zero? (logand (-> self draw status) (draw-status hidden)))
|
||||
(move-to-point! (-> self control) (the-as vector a1-2))
|
||||
(matrix->quaternion (-> self control unknown-quaternion00) (-> gp-0 bone transform))
|
||||
(quaternion-copy! (-> self control quat) (-> self control unknown-quaternion00))
|
||||
|
||||
@@ -79,6 +79,7 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; second order oscillating float.
|
||||
(deftype oscillating-float (structure)
|
||||
((value float :offset-assert 0)
|
||||
(target float :offset-assert 4)
|
||||
@@ -97,6 +98,7 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; float that "bounces".
|
||||
(deftype bouncing-float (structure)
|
||||
((osc oscillating-float :inline :offset-assert 0)
|
||||
(max-value float :offset-assert 24)
|
||||
@@ -116,6 +118,7 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; like delayed-rand-float, but does 4 at a time.
|
||||
(deftype delayed-rand-vector (structure)
|
||||
((min-time int32 :offset-assert 0)
|
||||
(max-time int32 :offset-assert 4)
|
||||
@@ -136,6 +139,7 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; like oscillating-float, but does 4 at a time.
|
||||
(deftype oscillating-vector (structure)
|
||||
((value vector :inline :offset-assert 0)
|
||||
(target vector :inline :offset-assert 16)
|
||||
|
||||
@@ -897,7 +897,7 @@
|
||||
:code
|
||||
(behavior ()
|
||||
(clear-collide-with-as (-> self root-override))
|
||||
(while (or (logtest? (-> self draw status) (draw-status drwf03))
|
||||
(while (or (logtest? (-> self draw status) (draw-status was-drawn))
|
||||
(and *target*
|
||||
(>= 204800.0 (vector-vector-distance (-> self root-override trans) (-> *target* control trans)))
|
||||
)
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
:code
|
||||
(behavior ()
|
||||
(while #t
|
||||
(when (dummy-20 self)
|
||||
(when (is-visible? self)
|
||||
(let* ((gp-0 (camera-pos))
|
||||
(f0-0 (vector-vector-distance (-> self root trans) gp-0))
|
||||
)
|
||||
|
||||
@@ -366,7 +366,7 @@
|
||||
(suspend)
|
||||
(set! v1-3 (or (not *target*) (process-grab? *target*)))
|
||||
)
|
||||
(logclear! (-> self draw status) (draw-status drwf01))
|
||||
(logclear! (-> self draw status) (draw-status hidden))
|
||||
(ja-channel-set! 1)
|
||||
(let ((gp-0 (-> self skel root-channel 0)))
|
||||
(joint-control-channel-group-eval!
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
(defmethod draw-npc-shadow bird-lady ((obj bird-lady))
|
||||
(-> obj draw shadow-ctrl)
|
||||
(cond
|
||||
((and (-> obj draw shadow) (zero? (-> obj draw cur-lod)) (logtest? (-> obj draw status) (draw-status drwf03)))
|
||||
((and (-> obj draw shadow) (zero? (-> obj draw cur-lod)) (logtest? (-> obj draw status) (draw-status was-drawn)))
|
||||
(let ((v1-9 (-> obj draw shadow-ctrl)))
|
||||
(set! (-> v1-9 settings flags) (logand -33 (-> v1-9 settings flags)))
|
||||
)
|
||||
@@ -164,7 +164,7 @@
|
||||
(set! (-> obj sound-flava) (music-flava birdlady))
|
||||
(set! (-> obj draw light-index) (the-as uint 4))
|
||||
(if (closed? (-> obj tasks) (game-task beach-flutflut) (task-status need-reminder))
|
||||
(dummy-18 obj)
|
||||
(cleanup-for-death obj)
|
||||
(go (method-of-object obj idle))
|
||||
)
|
||||
(none)
|
||||
|
||||
@@ -607,7 +607,7 @@ lurkerworm-default-post-behavior
|
||||
(joint-control-channel-group-eval! a0-2 (the-as art-joint-anim #f) num-func-seek!)
|
||||
)
|
||||
)
|
||||
(dummy-18 self)
|
||||
(cleanup-for-death self)
|
||||
(none)
|
||||
)
|
||||
:post
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
(defmethod draw-npc-shadow mayor ((obj mayor))
|
||||
(-> obj draw shadow-ctrl)
|
||||
(cond
|
||||
((and (-> obj draw shadow) (zero? (-> obj draw cur-lod)) (logtest? (-> obj draw status) (draw-status drwf03)))
|
||||
((and (-> obj draw shadow) (zero? (-> obj draw cur-lod)) (logtest? (-> obj draw status) (draw-status was-drawn)))
|
||||
(let ((v1-9 (-> obj draw shadow-ctrl)))
|
||||
(set! (-> v1-9 settings flags) (logand -33 (-> v1-9 settings flags)))
|
||||
)
|
||||
|
||||
@@ -1011,7 +1011,7 @@
|
||||
(defstate pelican-wait-at-end (pelican)
|
||||
:code
|
||||
(behavior ((arg0 symbol))
|
||||
(dummy-18 self)
|
||||
(cleanup-for-death self)
|
||||
(none)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
(defmethod draw-npc-shadow sculptor ((obj sculptor))
|
||||
(-> obj draw shadow-ctrl)
|
||||
(cond
|
||||
((and (-> obj draw shadow) (zero? (-> obj draw cur-lod)) (logtest? (-> obj draw status) (draw-status drwf03)))
|
||||
((and (-> obj draw shadow) (zero? (-> obj draw cur-lod)) (logtest? (-> obj draw status) (draw-status was-drawn)))
|
||||
(let ((v1-9 (-> obj draw shadow-ctrl)))
|
||||
(set! (-> v1-9 settings flags) (logand -33 (-> v1-9 settings flags)))
|
||||
)
|
||||
|
||||
@@ -100,8 +100,8 @@
|
||||
(vector-normalize! gp-0 1.0)
|
||||
(vector-normalize! s5-0 1.0)
|
||||
(if (>= (vector-dot gp-0 s5-0) (-> self cull-dot))
|
||||
(logior! (-> self draw status) (draw-status drwf01))
|
||||
(logclear! (-> self draw status) (draw-status drwf01))
|
||||
(logior! (-> self draw status) (draw-status hidden))
|
||||
(logclear! (-> self draw status) (draw-status hidden))
|
||||
)
|
||||
(suspend)
|
||||
)
|
||||
@@ -163,7 +163,7 @@
|
||||
(the-as (function none :behavior citb-arm) rider-trans)
|
||||
:post
|
||||
(behavior ()
|
||||
(if (logtest? (-> self draw status) (draw-status drwf01))
|
||||
(if (logtest? (-> self draw status) (draw-status hidden))
|
||||
(clear-collide-with-as (-> self root-override))
|
||||
(restore-collide-with-as (-> self root-override))
|
||||
)
|
||||
@@ -822,7 +822,7 @@
|
||||
)
|
||||
)
|
||||
((= arg2 'die)
|
||||
(dummy-18 self)
|
||||
(cleanup-for-death self)
|
||||
(the-as symbol (deactivate self))
|
||||
)
|
||||
((or (= arg2 'touch) (= arg2 'attack))
|
||||
@@ -1042,7 +1042,7 @@
|
||||
(defstate citb-robotboss-die (citb-robotboss)
|
||||
:code
|
||||
(behavior ()
|
||||
(dummy-18 self)
|
||||
(cleanup-for-death self)
|
||||
(deactivate self)
|
||||
(none)
|
||||
)
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
|
||||
|
||||
(defbehavior citb-sagecage-draw-bars citb-sagecage ()
|
||||
(when (logtest? (-> self draw status) (draw-status drwf03))
|
||||
(when (logtest? (-> self draw status) (draw-status was-drawn))
|
||||
(let ((gp-0 (-> self node-list data 3 bone transform))
|
||||
(s5-0 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
@@ -534,7 +534,7 @@
|
||||
(defmethod draw-npc-shadow red-sagecage ((obj red-sagecage))
|
||||
(-> obj draw shadow-ctrl)
|
||||
(cond
|
||||
((and (-> obj draw shadow) (zero? (-> obj draw cur-lod)) (logtest? (-> obj draw status) (draw-status drwf03)))
|
||||
((and (-> obj draw shadow) (zero? (-> obj draw cur-lod)) (logtest? (-> obj draw status) (draw-status was-drawn)))
|
||||
(let ((v1-9 (-> obj draw shadow-ctrl)))
|
||||
(set! (-> v1-9 settings flags) (logand -33 (-> v1-9 settings flags)))
|
||||
)
|
||||
@@ -648,7 +648,7 @@
|
||||
(defmethod draw-npc-shadow blue-sagecage ((obj blue-sagecage))
|
||||
(-> obj draw shadow-ctrl)
|
||||
(cond
|
||||
((and (-> obj draw shadow) (zero? (-> obj draw cur-lod)) (logtest? (-> obj draw status) (draw-status drwf03)))
|
||||
((and (-> obj draw shadow) (zero? (-> obj draw cur-lod)) (logtest? (-> obj draw status) (draw-status was-drawn)))
|
||||
(let ((v1-9 (-> obj draw shadow-ctrl)))
|
||||
(set! (-> v1-9 settings flags) (logand -33 (-> v1-9 settings flags)))
|
||||
)
|
||||
@@ -767,7 +767,7 @@
|
||||
(defmethod draw-npc-shadow yellow-sagecage ((obj yellow-sagecage))
|
||||
(-> obj draw shadow-ctrl)
|
||||
(cond
|
||||
((and (-> obj draw shadow) (zero? (-> obj draw cur-lod)) (logtest? (-> obj draw status) (draw-status drwf03)))
|
||||
((and (-> obj draw shadow) (zero? (-> obj draw cur-lod)) (logtest? (-> obj draw status) (draw-status was-drawn)))
|
||||
(let ((v1-9 (-> obj draw shadow-ctrl)))
|
||||
(set! (-> v1-9 settings flags) (logand -33 (-> v1-9 settings flags)))
|
||||
)
|
||||
|
||||
@@ -137,12 +137,12 @@
|
||||
(set! (-> self root-override trans y)
|
||||
(+ -204800.0 (-> (the-as process-drawable (-> self parent 0)) root trans y))
|
||||
)
|
||||
(logior! (-> self draw status) (draw-status drwf01))
|
||||
(logior! (-> self draw status) (draw-status hidden))
|
||||
(ja-post)
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
(while #t
|
||||
(when (>= (- (-> *display* base-frame-counter) (-> self state-time)) (-> self delay))
|
||||
(let ((v1-14 (logclear (-> self draw status) (draw-status drwf01)))
|
||||
(let ((v1-14 (logclear (-> self draw status) (draw-status hidden)))
|
||||
(a0-5 (-> self draw))
|
||||
)
|
||||
(set! (-> a0-5 status) v1-14)
|
||||
@@ -259,7 +259,7 @@
|
||||
(defstate drop-plat-die (drop-plat)
|
||||
:code
|
||||
(behavior ()
|
||||
(dummy-18 self)
|
||||
(cleanup-for-death self)
|
||||
(none)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -219,7 +219,7 @@
|
||||
:virtual #t
|
||||
:trans
|
||||
(behavior ()
|
||||
(set! (-> self path-pos) (if (logtest? (-> self fact options) (fact-options fop3))
|
||||
(set! (-> self path-pos) (if (logtest? (-> self fact options) (fact-options wrap-phase))
|
||||
(get-current-phase (-> self sync))
|
||||
(get-current-phase-with-mirror (-> self sync))
|
||||
)
|
||||
@@ -329,11 +329,11 @@
|
||||
(the-as (function none :behavior citb-stair-plat) #f)
|
||||
:code
|
||||
(behavior ()
|
||||
(logior! (-> self draw status) (draw-status drwf01))
|
||||
(logior! (-> self draw status) (draw-status hidden))
|
||||
(while (not (-> self rise))
|
||||
(suspend)
|
||||
)
|
||||
(logclear! (-> self draw status) (draw-status drwf01))
|
||||
(logclear! (-> self draw status) (draw-status hidden))
|
||||
(set-vector! (-> self draw color-mult) 0.0 0.0 0.0 1.0)
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
(while (< (- (-> *display* base-frame-counter) (-> self state-time)) (-> self delay))
|
||||
@@ -928,7 +928,7 @@
|
||||
)
|
||||
|
||||
(defmethod dummy-26 citb-stopbox ((obj citb-stopbox))
|
||||
(logior! (-> obj fact options) (fact-options fop3))
|
||||
(logior! (-> obj fact options) (fact-options wrap-phase))
|
||||
(logclear! (-> obj mask) (process-mask actor-pause))
|
||||
0
|
||||
(none)
|
||||
@@ -1214,7 +1214,7 @@
|
||||
)
|
||||
:code
|
||||
(behavior ()
|
||||
(logior! (-> self draw status) (draw-status drwf01))
|
||||
(logior! (-> self draw status) (draw-status hidden))
|
||||
(clear-collide-with-as (-> self root-override))
|
||||
(while #t
|
||||
(suspend)
|
||||
@@ -1228,7 +1228,7 @@
|
||||
(the-as (function none :behavior citb-exit-plat) rider-trans)
|
||||
:code
|
||||
(behavior ()
|
||||
(logclear! (-> self draw status) (draw-status drwf01))
|
||||
(logclear! (-> self draw status) (draw-status hidden))
|
||||
(restore-collide-with-as (-> self root-override))
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
(while #t
|
||||
|
||||
@@ -449,7 +449,7 @@
|
||||
(defmethod TODO-RENAME-59 babak ((obj babak))
|
||||
(cond
|
||||
((and (and (-> obj entity) (logtest? (-> obj entity extra perm status) (entity-perm-status complete)))
|
||||
(logtest? (-> obj enemy-info options) (fact-options fop1))
|
||||
(logtest? (-> obj enemy-info options) (fact-options has-power-cell))
|
||||
)
|
||||
(go (method-of-object obj nav-enemy-fuel-cell))
|
||||
)
|
||||
|
||||
@@ -543,7 +543,7 @@
|
||||
)
|
||||
(case (-> self level)
|
||||
(('citadel 'lavatube)
|
||||
(while (and *target* (zero? (logand (-> *target* draw status) (draw-status drwf01))))
|
||||
(while (and *target* (zero? (logand (-> *target* draw status) (draw-status hidden))))
|
||||
(suspend)
|
||||
)
|
||||
)
|
||||
@@ -594,7 +594,7 @@
|
||||
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
(('death-end)
|
||||
(let ((v0-0 (the-as object (logior (-> self draw status) (draw-status drwf01)))))
|
||||
(let ((v0-0 (the-as object (logior (-> self draw status) (draw-status hidden)))))
|
||||
(set! (-> self draw status) (the-as draw-status v0-0))
|
||||
v0-0
|
||||
)
|
||||
|
||||
@@ -261,7 +261,7 @@ eco-door-event-handler
|
||||
(set! (-> v1-6 num-func) num-func-identity)
|
||||
(set! (-> v1-6 frame-num) (the float (+ (-> v1-6 frame-group data 0 length) -1)))
|
||||
)
|
||||
(logior! (-> self draw status) (draw-status drwf01))
|
||||
(logior! (-> self draw status) (draw-status hidden))
|
||||
(suspend)
|
||||
(update-transforms! (-> self root-override))
|
||||
(ja-post)
|
||||
@@ -293,7 +293,7 @@ eco-door-event-handler
|
||||
:code
|
||||
(behavior ()
|
||||
(restore-collide-with-as (-> self root-override))
|
||||
(logclear! (-> self draw status) (draw-status drwf01))
|
||||
(logclear! (-> self draw status) (draw-status hidden))
|
||||
(let ((gp-0 (new 'stack 'overlaps-others-params)))
|
||||
(set! (-> gp-0 options) (the-as uint 1))
|
||||
(set! (-> gp-0 tlist) #f)
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
)
|
||||
)
|
||||
(initialize-skeleton self *ef-plane-sg* '())
|
||||
(logior! (-> self draw status) (draw-status drwf05))
|
||||
(logior! (-> self draw status) (draw-status skip-bones))
|
||||
(go blocking-plane-idle)
|
||||
(none)
|
||||
)
|
||||
|
||||
@@ -237,7 +237,7 @@
|
||||
(drop-pickup (-> self fact) #t *entity-pool* (-> self fact) 0)
|
||||
)
|
||||
(('death-end)
|
||||
(logior! (-> self draw status) (draw-status drwf01))
|
||||
(logior! (-> self draw status) (draw-status hidden))
|
||||
)
|
||||
)
|
||||
(none)
|
||||
@@ -729,11 +729,11 @@ nav-enemy-default-event-handler
|
||||
(and (>= (+ (-> *ACTOR-bank* pause-dist) (-> obj collide-info pause-adjust-distance))
|
||||
(vector-vector-distance (-> obj collide-info trans) (camera-pos))
|
||||
)
|
||||
(or (logtest? (-> obj draw status) (draw-status drwf03)) (!= (-> obj next-state name) 'nav-enemy-idle))
|
||||
(or (logtest? (-> obj draw status) (draw-status was-drawn)) (!= (-> obj next-state name) 'nav-enemy-idle))
|
||||
)
|
||||
)
|
||||
(and (nonzero? (-> obj skel)) (!= (-> obj skel root-channel 0) (-> obj skel channel)))
|
||||
(and (nonzero? (-> obj draw)) (logtest? (-> obj draw status) (draw-status drwf04)))
|
||||
(and (nonzero? (-> obj draw)) (logtest? (-> obj draw status) (draw-status no-skeleton-update)))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -770,7 +770,7 @@ nav-enemy-default-event-handler
|
||||
)
|
||||
(>= (- (-> *display* base-frame-counter) (-> self state-time)) (-> self state-timeout))
|
||||
(nonzero? (-> self draw))
|
||||
(logtest? (-> self draw status) (draw-status drwf03))
|
||||
(logtest? (-> self draw status) (draw-status was-drawn))
|
||||
)
|
||||
(go-virtual nav-enemy-patrol)
|
||||
)
|
||||
@@ -834,7 +834,7 @@ nav-enemy-default-event-handler
|
||||
(behavior ()
|
||||
(when (>= (- (-> *display* base-frame-counter) (-> self state-time)) (seconds 0.1))
|
||||
(when (>= (- (-> *display* base-frame-counter) (-> self state-time)) (-> self state-timeout))
|
||||
(if (and (nonzero? (-> self draw)) (logtest? (-> self draw status) (draw-status drwf03)))
|
||||
(if (and (nonzero? (-> self draw)) (logtest? (-> self draw status) (draw-status was-drawn)))
|
||||
(set! (-> self free-time) (-> *display* base-frame-counter))
|
||||
)
|
||||
(if (or (or (not *target*) (< (-> self enemy-info idle-distance)
|
||||
@@ -1555,13 +1555,13 @@ nav-enemy-default-event-handler
|
||||
600
|
||||
)
|
||||
(send-event self 'death-end)
|
||||
(if (logtest? (-> self enemy-info options) (fact-options fop1))
|
||||
(if (logtest? (-> self enemy-info options) (fact-options has-power-cell))
|
||||
(go-virtual nav-enemy-fuel-cell)
|
||||
)
|
||||
(while (-> self child)
|
||||
(suspend)
|
||||
)
|
||||
(dummy-18 self)
|
||||
(cleanup-for-death self)
|
||||
(none)
|
||||
)
|
||||
:post
|
||||
@@ -1599,7 +1599,7 @@ nav-enemy-default-event-handler
|
||||
(suspend)
|
||||
)
|
||||
)
|
||||
(dummy-18 self)
|
||||
(cleanup-for-death self)
|
||||
(none)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -247,7 +247,7 @@
|
||||
)
|
||||
:trans
|
||||
(behavior ()
|
||||
(set! (-> self path-pos) (if (logtest? (-> self fact options) (fact-options fop3))
|
||||
(set! (-> self path-pos) (if (logtest? (-> self fact options) (fact-options wrap-phase))
|
||||
(get-current-phase (-> self sync))
|
||||
(get-current-phase-with-mirror (-> self sync))
|
||||
)
|
||||
@@ -298,7 +298,7 @@
|
||||
)
|
||||
)
|
||||
((> (-> obj sync period) 0)
|
||||
(set! (-> obj path-pos) (if (logtest? (-> obj fact options) (fact-options fop3))
|
||||
(set! (-> obj path-pos) (if (logtest? (-> obj fact options) (fact-options wrap-phase))
|
||||
(get-current-phase (-> obj sync))
|
||||
(get-current-phase-with-mirror (-> obj sync))
|
||||
)
|
||||
|
||||
@@ -826,7 +826,7 @@
|
||||
(< (- (-> *display* base-frame-counter) (-> obj agitated-time-stamp)) (seconds 5))
|
||||
(or (>= (-> obj sleep-dist) (vector-vector-distance (-> obj root-override trans) (math-camera-pos)))
|
||||
(and (nonzero? (-> obj skel)) (!= (-> obj skel root-channel 0) (-> obj skel channel)))
|
||||
(and (nonzero? (-> obj draw)) (logtest? (-> obj draw status) (draw-status drwf04)))
|
||||
(and (nonzero? (-> obj draw)) (logtest? (-> obj draw status) (draw-status no-skeleton-update)))
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -81,7 +81,7 @@ nav-enemy-default-event-handler
|
||||
(vector-vector-distance (-> obj collide-info trans) (math-camera-pos))
|
||||
)
|
||||
(and (nonzero? (-> obj skel)) (!= (-> obj skel root-channel 0) (-> obj skel channel)))
|
||||
(and (nonzero? (-> obj draw)) (logtest? (-> obj draw status) (draw-status drwf04)))
|
||||
(and (nonzero? (-> obj draw)) (logtest? (-> obj draw status) (draw-status no-skeleton-update)))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -234,7 +234,7 @@ nav-enemy-default-event-handler
|
||||
)
|
||||
:exit
|
||||
(behavior ()
|
||||
(logclear! (-> self draw status) (draw-status drwf01))
|
||||
(logclear! (-> self draw status) (draw-status hidden))
|
||||
(none)
|
||||
)
|
||||
:trans
|
||||
@@ -257,7 +257,7 @@ nav-enemy-default-event-handler
|
||||
)
|
||||
(let ((a0-4 (dummy-16 (-> self nav) (-> *target* control trans))))
|
||||
(when (or (and a0-4 (logtest? (-> a0-4 pat) 2))
|
||||
(and (logtest? (-> self draw status) (draw-status drwf01))
|
||||
(and (logtest? (-> self draw status) (draw-status hidden))
|
||||
(>= (- (-> *display* base-frame-counter) (-> self notice-time)) (-> self reaction-time))
|
||||
)
|
||||
)
|
||||
@@ -300,7 +300,7 @@ nav-enemy-default-event-handler
|
||||
(ja-post)
|
||||
(suspend)
|
||||
)
|
||||
(logior! (-> self draw status) (draw-status drwf01))
|
||||
(logior! (-> self draw status) (draw-status hidden))
|
||||
(anim-loop)
|
||||
(none)
|
||||
)
|
||||
@@ -501,7 +501,7 @@ nav-enemy-default-event-handler
|
||||
)
|
||||
)
|
||||
(sharkey-reset-position)
|
||||
(logior! (-> self draw status) (draw-status drwf01))
|
||||
(logior! (-> self draw status) (draw-status hidden))
|
||||
(go-virtual nav-enemy-idle)
|
||||
(none)
|
||||
)
|
||||
|
||||
@@ -881,8 +881,8 @@
|
||||
)
|
||||
)
|
||||
(if (< (-> (math-camera-pos) y) (+ -8192.0 (-> self root trans y)))
|
||||
(logior! (-> self draw status) (draw-status drwf01))
|
||||
(logclear! (-> self draw status) (draw-status drwf01))
|
||||
(logior! (-> self draw status) (draw-status hidden))
|
||||
(logclear! (-> self draw status) (draw-status hidden))
|
||||
)
|
||||
(if (and (-> self play-ambient-sound?) (nonzero? (-> self sound)))
|
||||
(update! (-> self sound))
|
||||
|
||||
@@ -412,13 +412,13 @@
|
||||
(defstate green-eco-lurker-wait-to-appear (green-eco-lurker)
|
||||
:enter
|
||||
(behavior ()
|
||||
(logior! (-> self draw status) (draw-status drwf01))
|
||||
(logior! (-> self draw status) (draw-status hidden))
|
||||
(clear-collide-with-as (-> self collide-info))
|
||||
(none)
|
||||
)
|
||||
:exit
|
||||
(behavior ()
|
||||
(logclear! (-> self draw status) (draw-status drwf01))
|
||||
(logclear! (-> self draw status) (draw-status hidden))
|
||||
(restore-collide-with-as (-> self collide-info))
|
||||
(none)
|
||||
)
|
||||
@@ -443,7 +443,7 @@
|
||||
(the-as
|
||||
symbol
|
||||
(cond
|
||||
((and (-> obj draw shadow) (zero? (-> obj draw cur-lod)) (logtest? (-> obj draw status) (draw-status drwf03)))
|
||||
((and (-> obj draw shadow) (zero? (-> obj draw cur-lod)) (logtest? (-> obj draw status) (draw-status was-drawn)))
|
||||
(let ((f0-0 (-> obj appear-dest y))
|
||||
(v1-7 (-> obj draw shadow-ctrl))
|
||||
)
|
||||
|
||||
@@ -560,7 +560,7 @@
|
||||
(behavior ()
|
||||
(send-event (ppointer->process (-> self parent)) 'untrigger (-> self angle-bit))
|
||||
(clear-collide-with-as (-> self root-override))
|
||||
(logior! (-> self draw status) (draw-status drwf01))
|
||||
(logior! (-> self draw status) (draw-status hidden))
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
(until (>= (- (-> *display* base-frame-counter) (-> self state-time)) (seconds 0.1))
|
||||
(suspend)
|
||||
@@ -819,7 +819,7 @@
|
||||
(joint-control-channel-group-eval! a0-1 (the-as art-joint-anim #f) num-func-loop!)
|
||||
)
|
||||
)
|
||||
(logior! (-> self draw status) (draw-status drwf01))
|
||||
(logior! (-> self draw status) (draw-status hidden))
|
||||
(until (not (-> self child))
|
||||
(suspend)
|
||||
)
|
||||
|
||||
@@ -428,12 +428,12 @@
|
||||
(if (nonzero? (-> self sound))
|
||||
(stop! (-> self sound))
|
||||
)
|
||||
(logior! (-> self draw status) (draw-status drwf01))
|
||||
(logior! (-> self draw status) (draw-status hidden))
|
||||
(ja-post)
|
||||
(while (not (task-closed? (game-task finalboss-movies) (task-status need-reminder-a)))
|
||||
(suspend)
|
||||
)
|
||||
(logclear! (-> self draw status) (draw-status drwf01))
|
||||
(logclear! (-> self draw status) (draw-status hidden))
|
||||
(let ((v1-12 (-> self skel root-channel 0)))
|
||||
(set! (-> v1-12 num-func) num-func-identity)
|
||||
(set! (-> v1-12 frame-num) 0.0)
|
||||
|
||||
@@ -277,7 +277,7 @@
|
||||
(-> s5-1 ppointer)
|
||||
)
|
||||
)
|
||||
(logior! (-> self draw status) (draw-status drwf01))
|
||||
(logior! (-> self draw status) (draw-status hidden))
|
||||
(cond
|
||||
((or arg0 (and *target* (< (-> (target-pos 0) y) (+ 40960.0 (-> self entity extra trans y)))))
|
||||
(if *target*
|
||||
@@ -712,7 +712,7 @@
|
||||
(arcing-shot-setup arg0 arg1 arg2)
|
||||
(set! (-> self flight-time) arg3)
|
||||
(set! (-> self part) (create-launch-control (-> *part-group-id-table* 664) self))
|
||||
(logior! (-> self draw status) (draw-status drwf01))
|
||||
(logior! (-> self draw status) (draw-status hidden))
|
||||
(go greenshot-idle)
|
||||
(none)
|
||||
)
|
||||
@@ -798,7 +798,7 @@
|
||||
(behavior ()
|
||||
(set! (-> self state-time) (-> *display* game-frame-counter))
|
||||
(sound-play-by-name (static-sound-name "red-explode") (new-sound-id) 1024 0 0 1 #t)
|
||||
(logclear! (-> self draw status) (draw-status drwf01))
|
||||
(logclear! (-> self draw status) (draw-status hidden))
|
||||
(quaternion-identity! (-> self root-override quat))
|
||||
(set! (-> self ring radius-secondary) 3072.0)
|
||||
(set! (-> self ring origin quad) (-> self root-override trans quad))
|
||||
@@ -983,7 +983,7 @@
|
||||
(set! (-> self part) (create-launch-control (-> *part-group-id-table* 647) self))
|
||||
(set! (-> self shot-particle) (create-launch-control (-> *part-group-id-table* 665) self))
|
||||
(set! (-> self test-particle) (create-launch-control (-> *part-group-id-table* 679) self))
|
||||
(logior! (-> self draw status) (draw-status drwf01))
|
||||
(logior! (-> self draw status) (draw-status hidden))
|
||||
(set! (-> self sound) (new
|
||||
'process
|
||||
'ambient-sound
|
||||
@@ -1087,7 +1087,7 @@
|
||||
)
|
||||
(set! (-> self root-override trans quad) (-> arg0 quad))
|
||||
(initialize-skeleton self *redring-sg* '())
|
||||
(logior! (-> self draw status) (draw-status drwf01))
|
||||
(logior! (-> self draw status) (draw-status hidden))
|
||||
(arcing-shot-setup arg0 arg1 arg2)
|
||||
(set! (-> self flight-time) arg3)
|
||||
(set! (-> self part) (create-launch-control (-> *part-group-id-table* 652) self))
|
||||
|
||||
@@ -518,7 +518,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(dummy-18 self)
|
||||
(cleanup-for-death self)
|
||||
(deactivate self)
|
||||
)
|
||||
(else
|
||||
@@ -872,7 +872,7 @@
|
||||
(defstate robotboss-white-eco-movie (robotboss)
|
||||
:enter
|
||||
(behavior ()
|
||||
(logior! (-> self draw status) (draw-status drwf01))
|
||||
(logior! (-> self draw status) (draw-status hidden))
|
||||
(set! (-> self children-spawned) 0)
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
(ja-post)
|
||||
@@ -880,7 +880,7 @@
|
||||
)
|
||||
:exit
|
||||
(behavior ()
|
||||
(logclear! (-> self draw status) (draw-status drwf01))
|
||||
(logclear! (-> self draw status) (draw-status hidden))
|
||||
(none)
|
||||
)
|
||||
:trans
|
||||
|
||||
@@ -1024,7 +1024,7 @@
|
||||
(set-setting! *setting-control* self 'allow-progress #f 0.0 0)
|
||||
(set-setting! *setting-control* self 'music 'ogreboss 0.0 0)
|
||||
(set! (-> self state-time) (-> *display* game-frame-counter))
|
||||
(logior! (-> self draw status) (draw-status drwf01))
|
||||
(logior! (-> self draw status) (draw-status hidden))
|
||||
(let ((gp-0 (-> self mask)))
|
||||
(load-state-want-display-level 'finalboss 'special)
|
||||
(logclear! (-> self mask) (process-mask pause progress))
|
||||
|
||||
@@ -126,7 +126,7 @@
|
||||
)
|
||||
)
|
||||
(suspend)
|
||||
(dummy-18 self)
|
||||
(cleanup-for-death self)
|
||||
(deactivate self)
|
||||
(none)
|
||||
)
|
||||
@@ -722,7 +722,7 @@
|
||||
)
|
||||
)
|
||||
(suspend)
|
||||
(dummy-18 self)
|
||||
(cleanup-for-death self)
|
||||
(deactivate self)
|
||||
(none)
|
||||
)
|
||||
|
||||
@@ -205,7 +205,7 @@
|
||||
(if (and *target* (logtest? (-> *target* control root-prim prim-core action) (collide-action ca-14)))
|
||||
(go-virtual wait-for-return)
|
||||
)
|
||||
(when (logtest? (-> self draw status) (draw-status drwf03))
|
||||
(when (logtest? (-> self draw status) (draw-status was-drawn))
|
||||
(if (and *target* (>= 40960.0 (vector-vector-distance (-> self root-override trans) (-> *target* control trans))))
|
||||
(level-hint-spawn
|
||||
(game-text-id flutflut-reminder)
|
||||
|
||||
@@ -2158,7 +2158,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(dummy-9 gp-0 arg1)
|
||||
(combine! gp-0 arg1)
|
||||
(when (zero? (logand (-> gp-0 mask) 2))
|
||||
(vector-z-quaternion! (-> gp-0 vector) (-> self control unknown-quaternion00))
|
||||
(vector-xz-normalize! (-> gp-0 vector) (- (fabs (-> gp-0 shove-back))))
|
||||
|
||||
@@ -37,13 +37,13 @@
|
||||
(defmethod run-logic? darkvine ((obj darkvine))
|
||||
(or (zero? (logand (-> obj mask) (process-mask actor-pause)))
|
||||
(or (and (nonzero? (-> obj draw))
|
||||
(logtest? (-> obj draw status) (draw-status drwf03))
|
||||
(logtest? (-> obj draw status) (draw-status was-drawn))
|
||||
(>= (+ (-> *ACTOR-bank* pause-dist) (-> obj root-override pause-adjust-distance))
|
||||
(vector-vector-distance (-> obj root-override trans) (math-camera-pos))
|
||||
)
|
||||
)
|
||||
(and (nonzero? (-> obj skel)) (!= (-> obj skel root-channel 0) (-> obj skel channel)))
|
||||
(and (nonzero? (-> obj draw)) (logtest? (-> obj draw status) (draw-status drwf04)))
|
||||
(and (nonzero? (-> obj draw)) (logtest? (-> obj draw status) (draw-status no-skeleton-update)))
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -847,7 +847,7 @@
|
||||
(defmethod draw-npc-shadow fisher ((obj fisher))
|
||||
(-> obj draw shadow-ctrl)
|
||||
(cond
|
||||
((and (-> obj draw shadow) (zero? (-> obj draw cur-lod)) (logtest? (-> obj draw status) (draw-status drwf03)))
|
||||
((and (-> obj draw shadow) (zero? (-> obj draw cur-lod)) (logtest? (-> obj draw status) (draw-status was-drawn)))
|
||||
(let ((v1-9 (-> obj draw shadow-ctrl)))
|
||||
(set! (-> v1-9 settings flags) (logand -33 (-> v1-9 settings flags)))
|
||||
)
|
||||
|
||||
@@ -1044,7 +1044,7 @@
|
||||
(defbehavior periscope-draw-beam-impact periscope ()
|
||||
(when (periscope-has-power-input?)
|
||||
(update! (-> self sound))
|
||||
(if (logtest? (-> self draw status) (draw-status drwf03))
|
||||
(if (logtest? (-> self draw status) (draw-status was-drawn))
|
||||
(sp-launch-particles-var
|
||||
*sp-particle-system-2d*
|
||||
(-> *part-id-table* 825)
|
||||
@@ -1278,7 +1278,7 @@
|
||||
:exit
|
||||
(behavior ()
|
||||
(restore-collide-with-as (-> self root-override))
|
||||
(logclear! (-> self draw status) (draw-status drwf01))
|
||||
(logclear! (-> self draw status) (draw-status hidden))
|
||||
(none)
|
||||
)
|
||||
:trans
|
||||
@@ -1295,7 +1295,7 @@
|
||||
(ja-post)
|
||||
(suspend)
|
||||
(update-transforms! (-> self root-override))
|
||||
(logior! (-> self draw status) (draw-status drwf01))
|
||||
(logior! (-> self draw status) (draw-status hidden))
|
||||
(while #t
|
||||
(suspend)
|
||||
)
|
||||
@@ -1560,7 +1560,7 @@
|
||||
(defstate periscope-player-control (periscope)
|
||||
:exit
|
||||
(behavior ()
|
||||
(logclear! (-> self reflector 0 draw status) (draw-status drwf01))
|
||||
(logclear! (-> self reflector 0 draw status) (draw-status hidden))
|
||||
(periscope-find-reflection-angles)
|
||||
(set! (-> self turn) (-> self target-turn))
|
||||
(set! (-> self tilt) (-> self target-tilt))
|
||||
@@ -1677,7 +1677,7 @@
|
||||
(set! (-> gp-0 vector 3 quad) a2-2)
|
||||
)
|
||||
(send-event *camera* 'change-state cam-periscope 0)
|
||||
(logior! (-> self reflector 0 draw status) (draw-status drwf01))
|
||||
(logior! (-> self reflector 0 draw status) (draw-status hidden))
|
||||
(suspend)
|
||||
(while #t
|
||||
(if (not (-> self aligned?))
|
||||
@@ -1705,7 +1705,7 @@
|
||||
(periscope-crosshair)
|
||||
(suspend)
|
||||
)
|
||||
(logclear! (-> self reflector 0 draw status) (draw-status drwf01))
|
||||
(logclear! (-> self reflector 0 draw status) (draw-status hidden))
|
||||
(periscope-find-reflection-angles)
|
||||
(set! (-> self turn) (-> self target-turn))
|
||||
(set! (-> self tilt) (-> self target-tilt))
|
||||
@@ -2037,7 +2037,7 @@
|
||||
(while #t
|
||||
(draw-power-beam gp-0 (-> self beam-end))
|
||||
(update! (-> self sound))
|
||||
(when (logtest? (-> self draw status) (draw-status drwf03))
|
||||
(when (logtest? (-> self draw status) (draw-status was-drawn))
|
||||
(sp-launch-particles-var
|
||||
*sp-particle-system-2d*
|
||||
(-> *part-id-table* 825)
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
(joint-control-channel-group! a0-0 (the-as art-joint-anim (-> self draw art-group data 4)) num-func-seek!)
|
||||
)
|
||||
(until (ja-done? 0)
|
||||
(when (logtest? (-> self draw status) (draw-status drwf03))
|
||||
(when (logtest? (-> self draw status) (draw-status was-drawn))
|
||||
(cond
|
||||
((> (-> self draw cur-lod) 0)
|
||||
(ja-post)
|
||||
@@ -633,7 +633,7 @@
|
||||
(ja-post)
|
||||
(while #t
|
||||
(suspend)
|
||||
(when (logtest? (-> self draw status) (draw-status drwf03))
|
||||
(when (logtest? (-> self draw status) (draw-status was-drawn))
|
||||
(let ((a0-1 (-> self skel root-channel 0)))
|
||||
(set! (-> a0-1 param 0) (-> self speed))
|
||||
(joint-control-channel-group-eval! a0-1 (the-as art-joint-anim #f) num-func-loop!)
|
||||
@@ -1196,7 +1196,7 @@
|
||||
:code
|
||||
(behavior ((arg0 symbol))
|
||||
(set! (-> self draw force-lod) 1)
|
||||
(logclear! (-> self draw status) (draw-status drwf01))
|
||||
(logclear! (-> self draw status) (draw-status hidden))
|
||||
(when arg0
|
||||
(let ((v1-6 (-> self skel root-channel 0)))
|
||||
(set! (-> v1-6 num-func) num-func-identity)
|
||||
@@ -1255,7 +1255,7 @@
|
||||
:code
|
||||
(behavior ((arg0 symbol))
|
||||
(set! (-> self draw force-lod) 0)
|
||||
(logclear! (-> self draw status) (draw-status drwf01))
|
||||
(logclear! (-> self draw status) (draw-status hidden))
|
||||
(process-entity-status! self (entity-perm-status complete) #t)
|
||||
(when arg0
|
||||
(let ((v1-6 (-> self skel root-channel 0)))
|
||||
@@ -1276,7 +1276,7 @@
|
||||
)
|
||||
(suspend)
|
||||
)
|
||||
(logior! (-> self draw status) (draw-status drwf01))
|
||||
(logior! (-> self draw status) (draw-status hidden))
|
||||
(while #t
|
||||
(suspend)
|
||||
)
|
||||
|
||||
@@ -345,7 +345,7 @@ junglesnake-default-event-handler
|
||||
(set! (-> self track-player-tilt) #f)
|
||||
(set! (-> self des-ry) (-> self ry))
|
||||
(set! (-> self des-tilt) (-> self tilt))
|
||||
(logior! (-> self draw status) (draw-status drwf01))
|
||||
(logior! (-> self draw status) (draw-status hidden))
|
||||
(none)
|
||||
)
|
||||
:trans
|
||||
@@ -375,7 +375,7 @@ junglesnake-default-event-handler
|
||||
junglesnake-default-event-handler
|
||||
:enter
|
||||
(behavior ()
|
||||
(logclear! (-> self draw status) (draw-status drwf01))
|
||||
(logclear! (-> self draw status) (draw-status hidden))
|
||||
(set! (-> self track-player-ry) #f)
|
||||
(set! (-> self track-player-tilt) #f)
|
||||
(set! (-> self skel postbind-function) junglesnake-joint-callback)
|
||||
@@ -701,7 +701,7 @@ junglesnake-default-event-handler
|
||||
(joint-control-channel-group-eval! a0-4 (the-as art-joint-anim #f) num-func-seek!)
|
||||
)
|
||||
)
|
||||
(dummy-18 self)
|
||||
(cleanup-for-death self)
|
||||
(none)
|
||||
)
|
||||
:post
|
||||
|
||||
@@ -970,7 +970,7 @@
|
||||
(-> gp-1 ppointer)
|
||||
)
|
||||
)
|
||||
(dummy-18 self)
|
||||
(cleanup-for-death self)
|
||||
(deactivate self)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -589,8 +589,8 @@
|
||||
)
|
||||
)
|
||||
(if (< (vector-vector-xz-distance-squared (-> self root-override trans) (camera-pos)) 1073741800.0)
|
||||
(logior! (-> self draw status) (draw-status drwf05))
|
||||
(set! (-> self draw status) (the-as draw-status (logclear (-> self draw status) (draw-status drwf05))))
|
||||
(logior! (-> self draw status) (draw-status skip-bones))
|
||||
(set! (-> self draw status) (the-as draw-status (logclear (-> self draw status) (draw-status skip-bones))))
|
||||
)
|
||||
(none)
|
||||
)
|
||||
@@ -620,7 +620,7 @@
|
||||
(until (>= (- (-> *display* base-frame-counter) (-> self state-time)) (seconds 1))
|
||||
(suspend)
|
||||
)
|
||||
(dummy-18 self)
|
||||
(cleanup-for-death self)
|
||||
(deactivate self)
|
||||
(none)
|
||||
)
|
||||
@@ -902,7 +902,7 @@
|
||||
(-> obj root-override trans)
|
||||
)
|
||||
)
|
||||
(logior! (-> obj draw status) (draw-status drwf01))
|
||||
(logior! (-> obj draw status) (draw-status hidden))
|
||||
(set! (-> obj speed) (/ 300.0 (res-lump-float (-> obj entity) 'speed :default 61440.0)))
|
||||
(set! sv-16 (new 'static 'res-tag))
|
||||
(let ((s5-1 (res-lump-data arg0 'delay pointer :tag-ptr (& sv-16))))
|
||||
@@ -1301,7 +1301,7 @@
|
||||
(until (>= (- (-> *display* base-frame-counter) (-> self state-time)) (seconds 1))
|
||||
(suspend)
|
||||
)
|
||||
(dummy-18 self)
|
||||
(cleanup-for-death self)
|
||||
(deactivate self)
|
||||
(none)
|
||||
)
|
||||
@@ -1537,7 +1537,7 @@
|
||||
)
|
||||
)
|
||||
(suspend)
|
||||
(dummy-18 self)
|
||||
(cleanup-for-death self)
|
||||
(deactivate self)
|
||||
(none)
|
||||
)
|
||||
|
||||
@@ -285,7 +285,7 @@ baby-spider-default-event-handler
|
||||
|
||||
(defmethod dummy-53 baby-spider ((obj baby-spider))
|
||||
(cond
|
||||
((logtest? (-> obj draw status) (draw-status drwf03))
|
||||
((logtest? (-> obj draw status) (draw-status was-drawn))
|
||||
(set! (-> obj last-visible-time) (-> *display* base-frame-counter))
|
||||
(return #f)
|
||||
)
|
||||
@@ -352,7 +352,7 @@ baby-spider-default-event-handler
|
||||
)
|
||||
(>= (- (-> *display* base-frame-counter) (-> self state-time)) (-> self state-timeout))
|
||||
(nonzero? (-> self draw))
|
||||
(logtest? (-> self draw status) (draw-status drwf03))
|
||||
(logtest? (-> self draw status) (draw-status was-drawn))
|
||||
)
|
||||
(go-virtual nav-enemy-patrol)
|
||||
)
|
||||
@@ -799,7 +799,7 @@ baby-spider-default-event-handler
|
||||
baby-spider-default-event-handler
|
||||
:code
|
||||
(behavior ()
|
||||
(dummy-18 self)
|
||||
(cleanup-for-death self)
|
||||
(let ((v1-2 (-> self event-death)))
|
||||
(if v1-2
|
||||
(send-event (ppointer->process (-> self parent)) v1-2)
|
||||
|
||||
@@ -540,7 +540,7 @@
|
||||
(suspend)
|
||||
(ja-channel-set! 0)
|
||||
(ja-post)
|
||||
(logior! (-> self draw status) (draw-status drwf01))
|
||||
(logior! (-> self draw status) (draw-status hidden))
|
||||
(dummy-20 self)
|
||||
(if (-> self underwater?)
|
||||
(sound-play-by-name (static-sound-name "water-explosion") (new-sound-id) 1024 0 0 1 #t)
|
||||
@@ -576,7 +576,7 @@
|
||||
(go dark-crystal-spawn-fuel-cell)
|
||||
)
|
||||
)
|
||||
(dummy-18 self)
|
||||
(cleanup-for-death self)
|
||||
(until (not (-> self child))
|
||||
(suspend)
|
||||
)
|
||||
@@ -603,7 +603,7 @@
|
||||
)
|
||||
(ja-channel-set! 0)
|
||||
(ja-post)
|
||||
(logior! (-> self draw status) (draw-status drwf01))
|
||||
(logior! (-> self draw status) (draw-status hidden))
|
||||
(if (not (task-complete? *game-info* (-> self entity extra perm task)))
|
||||
(birth-pickup-at-point
|
||||
(-> self root-override trans)
|
||||
@@ -619,7 +619,7 @@
|
||||
(suspend)
|
||||
)
|
||||
(aybabtu 2)
|
||||
(dummy-18 self)
|
||||
(cleanup-for-death self)
|
||||
(none)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -1189,7 +1189,7 @@
|
||||
(while (-> self child)
|
||||
(suspend)
|
||||
)
|
||||
(dummy-18 self)
|
||||
(cleanup-for-death self)
|
||||
(none)
|
||||
)
|
||||
:post
|
||||
|
||||
@@ -464,7 +464,7 @@
|
||||
(defmethod dummy-23 gnawer ((obj gnawer))
|
||||
(when (not (-> obj hidden?))
|
||||
(set! (-> obj hidden?) #t)
|
||||
(logior! (-> obj draw status) (draw-status drwf01))
|
||||
(logior! (-> obj draw status) (draw-status hidden))
|
||||
(logclear! (-> obj mask) (process-mask attackable))
|
||||
(set! (-> obj skel postbind-function) #f)
|
||||
(set! (-> obj root-override trans quad) (-> obj post-trans quad))
|
||||
@@ -482,7 +482,7 @@
|
||||
(set! (-> obj hidden?) #f)
|
||||
(restore-collide-with-as (-> obj root-override))
|
||||
(set! (-> obj skel postbind-function) gnawer-joint-callback)
|
||||
(logclear! (-> obj draw status) (draw-status drwf01))
|
||||
(logclear! (-> obj draw status) (draw-status hidden))
|
||||
)
|
||||
(none)
|
||||
)
|
||||
@@ -1404,7 +1404,7 @@
|
||||
(set! (-> self skel postbind-function) #f)
|
||||
(ja-channel-set! 0)
|
||||
(ja-post)
|
||||
(logior! (-> self draw status) (draw-status drwf01))
|
||||
(logior! (-> self draw status) (draw-status hidden))
|
||||
(process-entity-status! self (entity-perm-status complete) #t)
|
||||
(dummy-27 self)
|
||||
(let ((v1-10 (-> self entity extra perm)))
|
||||
@@ -1449,7 +1449,7 @@
|
||||
(until (not (-> self child))
|
||||
(suspend)
|
||||
)
|
||||
(dummy-18 self)
|
||||
(cleanup-for-death self)
|
||||
(none)
|
||||
)
|
||||
)
|
||||
@@ -1519,7 +1519,7 @@
|
||||
)
|
||||
(process-entity-status! self (entity-perm-status bit-3) #f)
|
||||
(logior! (-> self mask) (process-mask actor-pause))
|
||||
(dummy-18 self)
|
||||
(cleanup-for-death self)
|
||||
(none)
|
||||
)
|
||||
)
|
||||
@@ -1543,7 +1543,7 @@
|
||||
(set! (-> self skel postbind-function) #f)
|
||||
(ja-channel-set! 0)
|
||||
(ja-post)
|
||||
(logior! (-> self draw status) (draw-status drwf01))
|
||||
(logior! (-> self draw status) (draw-status hidden))
|
||||
(case (get-reminder (get-task-control (game-task cave-gnawers)) 3)
|
||||
(((-> self gnawer-id))
|
||||
(when (not (task-complete? *game-info* (-> self entity extra perm task)))
|
||||
@@ -1580,7 +1580,7 @@
|
||||
(until (not (-> self child))
|
||||
(suspend)
|
||||
)
|
||||
(dummy-18 self)
|
||||
(cleanup-for-death self)
|
||||
(none)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -173,7 +173,7 @@
|
||||
|
||||
(defmethod draw-egg-shadow mother-spider-egg ((obj mother-spider-egg) (arg0 vector) (arg1 symbol))
|
||||
(cond
|
||||
((and (-> obj draw shadow) (zero? (-> obj draw cur-lod)) (logtest? (-> obj draw status) (draw-status drwf03)))
|
||||
((and (-> obj draw shadow) (zero? (-> obj draw cur-lod)) (logtest? (-> obj draw status) (draw-status was-drawn)))
|
||||
(let ((s5-0 (new 'stack-no-clear 'collide-tri-result))
|
||||
(a1-1 (new 'stack-no-clear 'vector))
|
||||
(a2-1 (new 'stack-no-clear 'vector))
|
||||
@@ -389,7 +389,7 @@
|
||||
(defstate mother-spider-egg-hatch (mother-spider-egg)
|
||||
:trans
|
||||
(behavior ()
|
||||
(when (and (zero? (-> self draw cur-lod)) (logtest? (-> self draw status) (draw-status drwf03)))
|
||||
(when (and (zero? (-> self draw cur-lod)) (logtest? (-> self draw status) (draw-status was-drawn)))
|
||||
(let ((a1-0 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> a1-0 quad) (-> self fall-dest quad))
|
||||
(compute-and-draw-shadow
|
||||
@@ -576,7 +576,7 @@
|
||||
:code
|
||||
(behavior ()
|
||||
(send-event (ppointer->process (-> self parent-override)) 'untrigger)
|
||||
(logior! (-> self draw status) (draw-status drwf01))
|
||||
(logior! (-> self draw status) (draw-status hidden))
|
||||
(let ((v1-8 (-> self draw shadow-ctrl)))
|
||||
(logior! (-> v1-8 settings flags) 32)
|
||||
)
|
||||
|
||||
@@ -200,7 +200,7 @@
|
||||
(defstate wait-for-children (mother-spider)
|
||||
:code
|
||||
(behavior ()
|
||||
(logior! (-> self draw status) (draw-status drwf01))
|
||||
(logior! (-> self draw status) (draw-status hidden))
|
||||
(until (not (-> self child))
|
||||
(suspend)
|
||||
)
|
||||
@@ -381,7 +381,7 @@
|
||||
(drop-pickup (-> self fact) #t *entity-pool* (-> self fact) 0)
|
||||
)
|
||||
(('death-end)
|
||||
(let ((v0-0 (the-as object (logior (-> self draw status) (draw-status drwf01)))))
|
||||
(let ((v0-0 (the-as object (logior (-> self draw status) (draw-status hidden)))))
|
||||
(set! (-> self draw status) (the-as draw-status v0-0))
|
||||
v0-0
|
||||
)
|
||||
@@ -439,7 +439,7 @@
|
||||
|
||||
(defmethod TODO-RENAME-24 mother-spider ((obj mother-spider))
|
||||
(cond
|
||||
((and (-> obj draw shadow) (zero? (-> obj draw cur-lod)) (logtest? (-> obj draw status) (draw-status drwf03)))
|
||||
((and (-> obj draw shadow) (zero? (-> obj draw cur-lod)) (logtest? (-> obj draw status) (draw-status was-drawn)))
|
||||
(let ((s5-0 (new 'stack-no-clear 'collide-tri-result))
|
||||
(a1-0 (new 'stack-no-clear 'vector))
|
||||
(a2-0 (new 'stack-no-clear 'vector))
|
||||
@@ -859,7 +859,7 @@
|
||||
(clear-collide-with-as (-> self root-override))
|
||||
(shut-down! (-> self neck))
|
||||
(logior! (-> self mask) (process-mask actor-pause))
|
||||
(logior! (-> self draw status) (draw-status drwf01))
|
||||
(logior! (-> self draw status) (draw-status hidden))
|
||||
(none)
|
||||
)
|
||||
:exit
|
||||
@@ -867,7 +867,7 @@
|
||||
(restore-collide-with-as (-> self root-override))
|
||||
(set! (-> self skel postbind-function) mother-spider-full-joint-callback)
|
||||
(logclear! (-> self mask) (process-mask actor-pause))
|
||||
(logclear! (-> self draw status) (draw-status drwf01))
|
||||
(logclear! (-> self draw status) (draw-status hidden))
|
||||
(none)
|
||||
)
|
||||
:trans
|
||||
@@ -1884,11 +1884,11 @@
|
||||
(logclear! (-> self mask) (process-mask actor-pause))
|
||||
(clear-collide-with-as (-> self root-override))
|
||||
(set! (-> self skel postbind-function) #f)
|
||||
(logior! (-> self draw status) (draw-status drwf01))
|
||||
(logior! (-> self draw status) (draw-status hidden))
|
||||
(while (-> self child)
|
||||
(suspend)
|
||||
)
|
||||
(dummy-18 self)
|
||||
(cleanup-for-death self)
|
||||
(none)
|
||||
)
|
||||
)
|
||||
@@ -1973,7 +1973,7 @@
|
||||
(or (zero? (logand (-> obj mask) (process-mask actor-pause)))
|
||||
(or (< (vector-vector-xz-distance (-> obj root-override trans) (math-camera-pos)) (-> obj deactivate-xz-dist))
|
||||
(and (nonzero? (-> obj skel)) (!= (-> obj skel root-channel 0) (-> obj skel channel)))
|
||||
(and (nonzero? (-> obj draw)) (logtest? (-> obj draw status) (draw-status drwf04)))
|
||||
(and (nonzero? (-> obj draw)) (logtest? (-> obj draw status) (draw-status no-skeleton-update)))
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -473,7 +473,7 @@ nav-enemy-default-event-handler
|
||||
(suspend)
|
||||
)
|
||||
)
|
||||
(dummy-18 self)
|
||||
(cleanup-for-death self)
|
||||
(none)
|
||||
)
|
||||
)
|
||||
@@ -499,7 +499,7 @@ nav-enemy-default-event-handler
|
||||
(set! (-> obj cannon-ent) (entity-actor-lookup (-> obj entity) 'alt-actor 0))
|
||||
(logclear! (-> obj mask) (process-mask actor-pause))
|
||||
(if (or (not (and (-> obj entity) (logtest? (-> obj entity extra perm status) (entity-perm-status complete))))
|
||||
(zero? (logand (-> obj enemy-info options) (fact-options fop1)))
|
||||
(zero? (logand (-> obj enemy-info options) (fact-options has-power-cell)))
|
||||
)
|
||||
(go (method-of-object obj nav-enemy-idle))
|
||||
)
|
||||
|
||||
@@ -712,16 +712,16 @@
|
||||
(balloonlurker-play-sounds)
|
||||
(when (nonzero? (-> self draw))
|
||||
(cond
|
||||
((or (logtest? (-> self draw status) (draw-status drwf04))
|
||||
(logtest? (-> self draw status) (draw-status drwf03))
|
||||
((or (logtest? (-> self draw status) (draw-status no-skeleton-update))
|
||||
(logtest? (-> self draw status) (draw-status was-drawn))
|
||||
)
|
||||
(logclear! (-> self draw status) (draw-status drwf05))
|
||||
(logclear! (-> self draw status) (draw-status skip-bones))
|
||||
(update-transforms! (-> self root-overlay))
|
||||
(ja-post)
|
||||
)
|
||||
(else
|
||||
(set! (-> self draw origin quad) (-> self root-overlay trans quad))
|
||||
(logior! (-> self draw status) (draw-status drwf05))
|
||||
(logior! (-> self draw status) (draw-status skip-bones))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -877,7 +877,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(dummy-18 self)
|
||||
(cleanup-for-death self)
|
||||
(while (-> self child)
|
||||
(suspend)
|
||||
)
|
||||
@@ -995,7 +995,7 @@
|
||||
(joint-control-channel-group-eval! a0-7 (the-as art-joint-anim #f) num-func-seek!)
|
||||
)
|
||||
)
|
||||
(dummy-18 self)
|
||||
(cleanup-for-death self)
|
||||
(none)
|
||||
)
|
||||
:post
|
||||
|
||||
@@ -455,7 +455,7 @@
|
||||
:code
|
||||
(behavior ()
|
||||
(sound-stop (-> self sound-id))
|
||||
(dummy-18 self)
|
||||
(cleanup-for-death self)
|
||||
(none)
|
||||
)
|
||||
:post
|
||||
|
||||
@@ -1625,7 +1625,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(dummy-18 self)
|
||||
(cleanup-for-death self)
|
||||
(none)
|
||||
)
|
||||
:post
|
||||
@@ -2156,7 +2156,7 @@
|
||||
(defstate boat-fuelcell-die (boat-fuelcell)
|
||||
:code
|
||||
(behavior ()
|
||||
(dummy-18 self)
|
||||
(cleanup-for-death self)
|
||||
(none)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -847,7 +847,7 @@
|
||||
)
|
||||
(set! (-> self root-override root-prim prim-core offense) (collide-offense indestructible))
|
||||
(spawn-part self)
|
||||
(when (and (zero? (-> self draw cur-lod)) (logtest? (-> self draw status) (draw-status drwf03)))
|
||||
(when (and (zero? (-> self draw cur-lod)) (logtest? (-> self draw status) (draw-status was-drawn)))
|
||||
(if (logtest? (-> self root-override status) 1)
|
||||
(draw-shadow
|
||||
(-> self root-override shadow-pos)
|
||||
|
||||
@@ -386,7 +386,7 @@
|
||||
)
|
||||
(suspend)
|
||||
)
|
||||
(dummy-18 self)
|
||||
(cleanup-for-death self)
|
||||
(none)
|
||||
)
|
||||
:post
|
||||
@@ -430,7 +430,7 @@
|
||||
(until (>= (- (-> *display* base-frame-counter) (-> self state-time)) (seconds 1))
|
||||
(suspend)
|
||||
)
|
||||
(dummy-18 self)
|
||||
(cleanup-for-death self)
|
||||
(none)
|
||||
)
|
||||
)
|
||||
@@ -540,9 +540,10 @@
|
||||
)
|
||||
|
||||
;; ERROR: function has no type analysis. Cannot decompile.
|
||||
;; get-height-over-navmesh, unused.
|
||||
|
||||
(defun intersects-nav-mesh? ((arg0 quicksandlurker) (arg1 int) (arg2 (inline-array vector)) (arg3 vector))
|
||||
(if (dummy-16 arg0 arg1 arg2 arg3)
|
||||
(defun intersects-nav-mesh? ((arg0 nav-control) (arg1 vector))
|
||||
(if (dummy-16 arg0 arg1)
|
||||
#t
|
||||
)
|
||||
)
|
||||
@@ -625,12 +626,12 @@
|
||||
(the-as (function process int symbol event-message-block object :behavior quicksandlurker) #f)
|
||||
:enter
|
||||
(behavior ()
|
||||
(logior! (-> self draw status) (draw-status drwf01))
|
||||
(logior! (-> self draw status) (draw-status hidden))
|
||||
(none)
|
||||
)
|
||||
:exit
|
||||
(behavior ()
|
||||
(logclear! (-> self draw status) (draw-status drwf01))
|
||||
(logclear! (-> self draw status) (draw-status hidden))
|
||||
(none)
|
||||
)
|
||||
:trans
|
||||
@@ -815,7 +816,7 @@
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
(+! s4-0 1)
|
||||
(when (>= s4-0 s5-0)
|
||||
(if (logtest? (-> self draw status) (draw-status drwf03))
|
||||
(if (logtest? (-> self draw status) (draw-status was-drawn))
|
||||
(go quicksandlurker-attack)
|
||||
)
|
||||
)
|
||||
@@ -1117,7 +1118,7 @@
|
||||
(joint-control-channel-group-eval! a0-3 (the-as art-joint-anim #f) num-func-seek!)
|
||||
)
|
||||
)
|
||||
(dummy-18 self)
|
||||
(cleanup-for-death self)
|
||||
(none)
|
||||
)
|
||||
:post
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
(send-event
|
||||
(handle->process gp-1)
|
||||
'eval
|
||||
(lambda :behavior manipy () (let ((v0-0 (logior (-> self draw status) (draw-status drwf05))))
|
||||
(lambda :behavior manipy () (let ((v0-0 (logior (-> self draw status) (draw-status skip-bones))))
|
||||
(set! (-> self draw status) v0-0)
|
||||
(the-as uint v0-0)
|
||||
)
|
||||
@@ -204,7 +204,7 @@
|
||||
)
|
||||
(send-event-function *target* a1-15)
|
||||
)
|
||||
(dummy-18 self)
|
||||
(cleanup-for-death self)
|
||||
(deactivate self)
|
||||
(while #t
|
||||
(suspend)
|
||||
@@ -249,7 +249,7 @@
|
||||
(-> gp-0 ppointer)
|
||||
)
|
||||
)
|
||||
(dummy-18 self)
|
||||
(cleanup-for-death self)
|
||||
(deactivate self)
|
||||
)
|
||||
(none)
|
||||
@@ -348,7 +348,7 @@
|
||||
(defstate plunger-lurker-die (plunger-lurker)
|
||||
:code
|
||||
(behavior ()
|
||||
(dummy-18 self)
|
||||
(cleanup-for-death self)
|
||||
(deactivate self)
|
||||
(suspend)
|
||||
0
|
||||
@@ -438,7 +438,7 @@
|
||||
(s4-0 #f)
|
||||
)
|
||||
(when (-> obj draw shadow)
|
||||
(when (or (logtest? (-> obj draw status) (draw-status drwf03))
|
||||
(when (or (logtest? (-> obj draw status) (draw-status was-drawn))
|
||||
(< (vector-vector-xz-distance-squared (-> obj root trans) (camera-pos)) 10485760000.0)
|
||||
)
|
||||
(let ((s3-1 (new 'stack-no-clear 'collide-tri-result))
|
||||
@@ -525,7 +525,7 @@
|
||||
(defstate flying-lurker-die (flying-lurker)
|
||||
:code
|
||||
(behavior ()
|
||||
(dummy-18 self)
|
||||
(cleanup-for-death self)
|
||||
(deactivate self)
|
||||
(none)
|
||||
)
|
||||
@@ -535,7 +535,7 @@
|
||||
:code
|
||||
(behavior ()
|
||||
(process-entity-status! self (entity-perm-status bit-3) #f)
|
||||
(logior! (-> self draw status) (draw-status drwf01))
|
||||
(logior! (-> self draw status) (draw-status hidden))
|
||||
(while #t
|
||||
(suspend)
|
||||
)
|
||||
@@ -716,7 +716,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(dummy-18 self)
|
||||
(cleanup-for-death self)
|
||||
(deactivate self)
|
||||
)
|
||||
((= v1-0 'sleep)
|
||||
@@ -776,7 +776,7 @@
|
||||
:enter
|
||||
(behavior ()
|
||||
(process-entity-status! self (entity-perm-status bit-3) #t)
|
||||
(logclear! (-> self draw status) (draw-status drwf01))
|
||||
(logclear! (-> self draw status) (draw-status hidden))
|
||||
(none)
|
||||
)
|
||||
:trans
|
||||
@@ -1002,7 +1002,7 @@
|
||||
(send-event
|
||||
(handle->process gp-1)
|
||||
'eval
|
||||
(lambda :behavior manipy () (let ((v0-0 (logior (-> self draw status) (draw-status drwf05))))
|
||||
(lambda :behavior manipy () (let ((v0-0 (logior (-> self draw status) (draw-status skip-bones))))
|
||||
(set! (-> self draw status) v0-0)
|
||||
(the-as uint v0-0)
|
||||
)
|
||||
@@ -1144,7 +1144,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(dummy-18 self)
|
||||
(cleanup-for-death self)
|
||||
(deactivate self)
|
||||
)
|
||||
((= v1-0 'sleep)
|
||||
@@ -1285,7 +1285,7 @@
|
||||
)
|
||||
:exit
|
||||
(behavior ()
|
||||
(logclear! (-> self draw status) (draw-status drwf01))
|
||||
(logclear! (-> self draw status) (draw-status hidden))
|
||||
(none)
|
||||
)
|
||||
:trans
|
||||
|
||||
@@ -400,7 +400,7 @@
|
||||
)
|
||||
)
|
||||
(suspend)
|
||||
(dummy-18 self)
|
||||
(cleanup-for-death self)
|
||||
(deactivate self)
|
||||
(none)
|
||||
)
|
||||
@@ -583,7 +583,7 @@
|
||||
)
|
||||
:code
|
||||
(behavior ()
|
||||
(logior! (-> self draw status) (draw-status drwf01))
|
||||
(logior! (-> self draw status) (draw-status hidden))
|
||||
(while #t
|
||||
(suspend)
|
||||
)
|
||||
@@ -626,7 +626,7 @@
|
||||
)
|
||||
:code
|
||||
(behavior ()
|
||||
(logclear! (-> self draw status) (draw-status drwf01))
|
||||
(logclear! (-> self draw status) (draw-status hidden))
|
||||
(while #t
|
||||
(suspend)
|
||||
)
|
||||
@@ -1692,7 +1692,7 @@
|
||||
(joint-control-channel-group-eval! a0-6 (the-as art-joint-anim #f) num-func-seek!)
|
||||
)
|
||||
)
|
||||
(dummy-18 self)
|
||||
(cleanup-for-death self)
|
||||
(deactivate self)
|
||||
(none)
|
||||
)
|
||||
|
||||
@@ -166,7 +166,7 @@
|
||||
(suspend)
|
||||
)
|
||||
)
|
||||
(dummy-18 self)
|
||||
(cleanup-for-death self)
|
||||
(none)
|
||||
)
|
||||
:post
|
||||
@@ -216,7 +216,7 @@
|
||||
(suspend)
|
||||
)
|
||||
)
|
||||
(dummy-18 self)
|
||||
(cleanup-for-death self)
|
||||
(none)
|
||||
)
|
||||
:post
|
||||
@@ -430,7 +430,7 @@
|
||||
(while (-> self child)
|
||||
(suspend)
|
||||
)
|
||||
(dummy-18 self)
|
||||
(cleanup-for-death self)
|
||||
(none)
|
||||
)
|
||||
:post
|
||||
@@ -819,7 +819,7 @@
|
||||
(while (-> self child)
|
||||
(suspend)
|
||||
)
|
||||
(dummy-18 self)
|
||||
(cleanup-for-death self)
|
||||
(none)
|
||||
)
|
||||
:post
|
||||
@@ -947,7 +947,7 @@
|
||||
(joint-control-channel-group-eval! a0-12 (the-as art-joint-anim #f) num-func-seek!)
|
||||
)
|
||||
)
|
||||
(dummy-18 self)
|
||||
(cleanup-for-death self)
|
||||
(none)
|
||||
)
|
||||
:post
|
||||
@@ -1123,7 +1123,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(dummy-18 self)
|
||||
(cleanup-for-death self)
|
||||
(none)
|
||||
)
|
||||
:post
|
||||
@@ -1718,7 +1718,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(logior! (-> self draw status) (draw-status drwf01))
|
||||
(logior! (-> self draw status) (draw-status hidden))
|
||||
(set! (-> self submerged) #t)
|
||||
(let ((s5-1 (-> *display* base-frame-counter)))
|
||||
(until (>= (- (-> *display* base-frame-counter) s5-1) arg0)
|
||||
@@ -1733,7 +1733,7 @@
|
||||
(defbehavior ogreboss-emerge ogreboss ((arg0 float))
|
||||
(when (-> self submerged)
|
||||
(set! (-> self submerged) #f)
|
||||
(logclear! (-> self draw status) (draw-status drwf01))
|
||||
(logclear! (-> self draw status) (draw-status hidden))
|
||||
(cond
|
||||
((-> self at-near-spot)
|
||||
(let ((a1-0 (new 'stack-no-clear 'event-message-block)))
|
||||
@@ -2751,7 +2751,7 @@
|
||||
(suspend)
|
||||
)
|
||||
)
|
||||
(dummy-18 self)
|
||||
(cleanup-for-death self)
|
||||
(none)
|
||||
)
|
||||
)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user