mirror of
https://github.com/open-goal/jak-project
synced 2026-07-30 07:55:01 -04:00
[decomp] game-info (#779)
* support more process stuff * more of game info * add ref file * progress on save
This commit is contained in:
+36
-6
@@ -94,15 +94,45 @@
|
||||
(defmacro handle->process (handle)
|
||||
;; the actual implementation is more clever than this.
|
||||
;; Checks PID.
|
||||
`(if (-> ,handle process)
|
||||
(let ((proc (-> (-> ,handle process))))
|
||||
(if (= (-> ,handle pid) (-> proc pid))
|
||||
proc
|
||||
)
|
||||
`(let ((the-handle ,handle))
|
||||
(if (-> the-handle process)
|
||||
(let ((proc (-> (-> the-handle process))))
|
||||
(if (= (-> the-handle pid) (-> proc pid))
|
||||
proc
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defmacro ppointer->process (ppointer)
|
||||
;; convert a (pointer process) to a process.
|
||||
;; this uses the self field, which seems to always just get set to the object.
|
||||
;; perhaps when deleting a process you could have it set self to #f?
|
||||
;; I don't see this happen anywhere though, so it's not clear.
|
||||
`(let ((the-pp ,ppointer))
|
||||
(the process (if the-pp (-> the-pp 0 self)))
|
||||
)
|
||||
)
|
||||
|
||||
(defmacro process->ppointer (proc)
|
||||
;"safely get a (pointer process) from a process, returning #f if invalid."
|
||||
`(let ((the-proc ,proc))
|
||||
(if the-proc (-> the-proc ppointer))
|
||||
)
|
||||
)
|
||||
|
||||
(defmacro ppointer->handle (pproc)
|
||||
`(let ((the-process ,pproc))
|
||||
(new 'static 'handle :process the-process :pid (-> the-process 0 pid))
|
||||
)
|
||||
)
|
||||
|
||||
(defmacro process->handle (proc)
|
||||
`(ppointer->handle (process->ppointer ,proc))
|
||||
)
|
||||
|
||||
|
||||
(defmacro defbehavior (name process-type bindings &rest body)
|
||||
(if (and
|
||||
(> (length body) 1) ;; more than one thing in function
|
||||
|
||||
+10
-27
@@ -1953,10 +1953,7 @@
|
||||
(*
|
||||
0.0625
|
||||
(cos
|
||||
(the
|
||||
float
|
||||
(* 4000 (the-as int (-> *display* integral-frame-counter)))
|
||||
)
|
||||
(the float (* 4000 (-> *display* integral-frame-counter)))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1967,12 +1964,7 @@
|
||||
)
|
||||
(*
|
||||
0.125
|
||||
(cos
|
||||
(the
|
||||
float
|
||||
(* 1500 (the-as int (-> *display* integral-frame-counter)))
|
||||
)
|
||||
)
|
||||
(cos (the float (* 1500 (-> *display* integral-frame-counter))))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -3298,11 +3290,11 @@
|
||||
(when (and *target* (= (-> *target* next-state name) 'target-continue))
|
||||
(set!
|
||||
(-> (the-as (pointer int64) s4-0) 0)
|
||||
(the-as int (+ (-> *display* base-frame-counter) -10000))
|
||||
(+ (-> *display* base-frame-counter) -10000)
|
||||
)
|
||||
(set!
|
||||
(-> (the-as (pointer int64) s4-0) 1)
|
||||
(the-as int (+ (-> *display* base-frame-counter) -10000))
|
||||
(+ (-> *display* base-frame-counter) -10000)
|
||||
)
|
||||
)
|
||||
(update-mood-fog arg0 arg1)
|
||||
@@ -3376,7 +3368,7 @@
|
||||
float
|
||||
(-
|
||||
(-> *display* base-frame-counter)
|
||||
(the-as uint (-> (the-as (pointer int64) s4-0) 1))
|
||||
(-> (the-as (pointer int64) s4-0) 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -3419,7 +3411,7 @@
|
||||
(else
|
||||
(set!
|
||||
(-> (the-as (pointer int64) s4-0) 1)
|
||||
(the-as int (-> *display* base-frame-counter))
|
||||
(-> *display* base-frame-counter)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -3431,7 +3423,7 @@
|
||||
float
|
||||
(-
|
||||
(-> *display* base-frame-counter)
|
||||
(the-as uint (-> (the-as (pointer int64) s4-0) 0))
|
||||
(-> (the-as (pointer int64) s4-0) 0)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -3465,7 +3457,7 @@
|
||||
(set! (-> *time-of-day-proc* 0 frame) 0)
|
||||
(set!
|
||||
(-> (the-as (pointer int64) s4-0) 0)
|
||||
(the-as int (-> *display* base-frame-counter))
|
||||
(-> *display* base-frame-counter)
|
||||
)
|
||||
(dotimes (v1-72 8)
|
||||
(set! (-> arg0 sky-times v1-72) 0.0)
|
||||
@@ -3665,13 +3657,7 @@
|
||||
(*
|
||||
0.125
|
||||
(cos
|
||||
(the
|
||||
float
|
||||
(*
|
||||
4000
|
||||
(the-as int (-> *display* integral-frame-counter))
|
||||
)
|
||||
)
|
||||
(the float (* 4000 (-> *display* integral-frame-counter)))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -3685,10 +3671,7 @@
|
||||
(*
|
||||
0.25
|
||||
(cos
|
||||
(the
|
||||
float
|
||||
(* 1500 (the-as int (-> *display* integral-frame-counter)))
|
||||
)
|
||||
(the float (* 1500 (-> *display* integral-frame-counter)))
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
+38
-24
@@ -35,26 +35,44 @@
|
||||
(-> s5-0 ppointer)
|
||||
)
|
||||
)
|
||||
(let* ((s5-1 (get-process *camera-master-dead-pool* camera-master #x4000))
|
||||
(v1-5 (when s5-1
|
||||
(let ((t9-5 (method-of-type camera-master activate)))
|
||||
(t9-5
|
||||
(the-as camera-master s5-1)
|
||||
*camera-pool*
|
||||
'camera-master
|
||||
(the-as pointer #x70004000)
|
||||
)
|
||||
)
|
||||
((the-as (function process object function) set-to-run)
|
||||
(the-as process (-> s5-1 main-thread))
|
||||
cam-master-init
|
||||
)
|
||||
(-> s5-1 ppointer)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! *camera* (the-as camera-master (if v1-5
|
||||
(-> v1-5 0 self)
|
||||
(let ((s5-1 (get-process *camera-master-dead-pool* camera-master #x4000)))
|
||||
(set! *camera* (the-as camera-master (ppointer->process (when s5-1
|
||||
(let
|
||||
((t9-5
|
||||
(method-of-type
|
||||
camera-master
|
||||
activate
|
||||
)
|
||||
)
|
||||
)
|
||||
(t9-5
|
||||
(the-as
|
||||
camera-master
|
||||
s5-1
|
||||
)
|
||||
*camera-pool*
|
||||
'camera-master
|
||||
(the-as
|
||||
pointer
|
||||
#x70004000
|
||||
)
|
||||
)
|
||||
)
|
||||
((the-as
|
||||
(function process object function)
|
||||
set-to-run
|
||||
)
|
||||
(the-as
|
||||
process
|
||||
(->
|
||||
s5-1
|
||||
main-thread
|
||||
)
|
||||
)
|
||||
cam-master-init
|
||||
)
|
||||
(-> s5-1 ppointer)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -68,7 +86,3 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(cam-start #f)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
(transv-out vector :inline :offset-assert 48)
|
||||
(local-normal vector :inline :offset-assert 64)
|
||||
(surface-normal vector :inline :offset-assert 80)
|
||||
(time uint64 :offset-assert 96)
|
||||
(time int64 :offset-assert 96)
|
||||
(status uint64 :offset-assert 104)
|
||||
(pat pat-surface :offset-assert 112)
|
||||
(reaction-flag uint32 :offset-assert 116)
|
||||
|
||||
+1
-1
@@ -63,7 +63,7 @@
|
||||
((name basic :offset-assert 4)
|
||||
(length int16 :offset-assert 8)
|
||||
(allocated-length int16 :offset-assert 10)
|
||||
(engine-time uint64 :offset-assert 16)
|
||||
(engine-time int64 :offset-assert 16)
|
||||
(alive-list connectable :inline :offset-assert 32)
|
||||
(alive-list-end connectable :inline :offset-assert 48)
|
||||
(dead-list connectable :inline :offset-assert 64)
|
||||
|
||||
+19
-16
@@ -107,21 +107,21 @@
|
||||
|
||||
;; definition of type fact-info
|
||||
(deftype fact-info (basic)
|
||||
((process process :offset-assert 4)
|
||||
(pickup-type pickup-type :offset-assert 8)
|
||||
(pickup-amount float :offset-assert 12)
|
||||
(pickup-spawn-amount float :offset-assert 16)
|
||||
(options uint64 :offset-assert 24)
|
||||
(fade-time uint64 :offset-assert 32)
|
||||
((process process-drawable :offset-assert 4)
|
||||
(pickup-type pickup-type :offset-assert 8)
|
||||
(pickup-amount float :offset-assert 12)
|
||||
(pickup-spawn-amount float :offset-assert 16)
|
||||
(options uint64 :offset-assert 24)
|
||||
(fade-time uint64 :offset-assert 32)
|
||||
)
|
||||
:method-count-assert 12
|
||||
:size-assert #x28
|
||||
:flag-assert #xc00000028
|
||||
(:methods
|
||||
(new (symbol type process pickup-type float) _type_ 0)
|
||||
(new (symbol type process-drawable pickup-type float) _type_ 0)
|
||||
(TODO-RENAME-9 (_type_ symbol process-tree fact-info int) uint 9)
|
||||
(reset! (_type_ symbol) none 10)
|
||||
(dummy-11 (_type_) float 11)
|
||||
(pickup-collectable! (_type_ pickup-type float handle) float 11)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -150,7 +150,7 @@
|
||||
(eco-pill float :offset-assert 80)
|
||||
(eco-pill-max float :offset-assert 84)
|
||||
(health-pickup-time uint64 :offset-assert 88)
|
||||
(eco-source uint64 :offset-assert 96)
|
||||
(eco-source handle :offset-assert 96)
|
||||
(eco-source-time uint64 :offset-assert 104)
|
||||
(money-pickup-time uint64 :offset-assert 112)
|
||||
(buzzer-pickup-time uint64 :offset-assert 120)
|
||||
@@ -161,7 +161,7 @@
|
||||
:size-assert #x90
|
||||
:flag-assert #xc00000090
|
||||
(:methods
|
||||
(new (symbol type process pickup-type float) _type_ 0)
|
||||
(new (symbol type process-drawable pickup-type float) _type_ 0)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -208,7 +208,7 @@
|
||||
:size-assert #x44
|
||||
:flag-assert #xc00000044
|
||||
(:methods
|
||||
(new (symbol type process pickup-type float) _type_ 0)
|
||||
(new (symbol type process-drawable pickup-type float) _type_ 0)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -238,7 +238,7 @@
|
||||
fact-info
|
||||
((allocation symbol)
|
||||
(type-to-make type)
|
||||
(proc process)
|
||||
(proc process-drawable)
|
||||
(pkup-type pickup-type)
|
||||
(pkup-amount float)
|
||||
)
|
||||
@@ -343,7 +343,10 @@
|
||||
)
|
||||
|
||||
;; definition for method 11 of type fact-info
|
||||
(defmethod dummy-11 fact-info ((obj fact-info))
|
||||
(defmethod
|
||||
pickup-collectable!
|
||||
fact-info
|
||||
((obj fact-info) (arg0 pickup-type) (arg1 float) (arg2 handle))
|
||||
0.0
|
||||
)
|
||||
|
||||
@@ -353,7 +356,7 @@
|
||||
fact-info-enemy
|
||||
((allocation symbol)
|
||||
(type-to-make type)
|
||||
(arg0 process)
|
||||
(arg0 process-drawable)
|
||||
(arg1 pickup-type)
|
||||
(arg2 float)
|
||||
)
|
||||
@@ -482,7 +485,7 @@
|
||||
fact-info-target
|
||||
((allocation symbol)
|
||||
(type-to-make type)
|
||||
(arg0 process)
|
||||
(arg0 process-drawable)
|
||||
(arg1 pickup-type)
|
||||
(arg2 float)
|
||||
)
|
||||
@@ -494,7 +497,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> obj eco-source) (the-as uint #f))
|
||||
(set! (-> obj eco-source) (the-as handle #f))
|
||||
(reset! obj #f)
|
||||
obj
|
||||
)
|
||||
|
||||
@@ -197,7 +197,7 @@
|
||||
(death-movie-tick int32 :offset-assert 264)
|
||||
(want-auto-save symbol :offset-assert 268)
|
||||
(auto-save-proc handle :offset-assert 272)
|
||||
(auto-save-status uint32 :offset-assert 280)
|
||||
(auto-save-status mc-status-code :offset-assert 280)
|
||||
(auto-save-card int32 :offset-assert 284)
|
||||
(auto-save-which int32 :offset-assert 288)
|
||||
(pov-camera-handle handle :offset-assert 296)
|
||||
@@ -225,7 +225,7 @@
|
||||
(seen-text? (_type_ game-text-id) symbol 21)
|
||||
(mark-text-as-seen (_type_ game-text-id) none 22)
|
||||
(got-buzzer? (_type_ game-task int) symbol 23)
|
||||
(dummy-24 () none 24)
|
||||
(save-game! (_type_ game-save string) none 24)
|
||||
(load-game! (_type_ game-save) game-save 25)
|
||||
(clear-text-seen! (_type_ game-text-id) none 26)
|
||||
(get-death-count (_type_ symbol) int 27)
|
||||
|
||||
+1718
File diff suppressed because it is too large
Load Diff
+5
-50
@@ -64,56 +64,11 @@
|
||||
(format #t "~Tscreeny: ~D~%" (-> obj screeny))
|
||||
(format #t "~Tvibration: ~A~%" (-> obj vibration))
|
||||
(format #t "~Tplay-hints: ~A~%" (-> obj play-hints))
|
||||
(let ((t9-12 format)
|
||||
(a0-13 #t)
|
||||
(a1-12 "~Tmovie: ~A~%")
|
||||
(v1-0 (-> obj movie))
|
||||
)
|
||||
(t9-12 a0-13 a1-12 (if v1-0
|
||||
(-> v1-0 0 self)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((t9-13 format)
|
||||
(a0-14 #t)
|
||||
(a1-13 "~Ttalking: ~A~%")
|
||||
(v1-2 (-> obj talking))
|
||||
)
|
||||
(t9-13 a0-14 a1-13 (if v1-2
|
||||
(-> v1-2 0 self)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((t9-14 format)
|
||||
(a0-15 #t)
|
||||
(a1-14 "~Tspooling: ~A~%")
|
||||
(v1-4 (-> obj spooling))
|
||||
)
|
||||
(t9-14 a0-15 a1-14 (if v1-4
|
||||
(-> v1-4 0 self)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((t9-15 format)
|
||||
(a0-16 #t)
|
||||
(a1-15 "~Thint: ~A~%")
|
||||
(v1-6 (-> obj hint))
|
||||
)
|
||||
(t9-15 a0-16 a1-15 (if v1-6
|
||||
(-> v1-6 0 self)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((t9-16 format)
|
||||
(a0-17 #t)
|
||||
(a1-16 "~Tambient: ~A~%")
|
||||
(v1-8 (-> obj ambient))
|
||||
)
|
||||
(t9-16 a0-17 a1-16 (if v1-8
|
||||
(-> v1-8 0 self)
|
||||
)
|
||||
)
|
||||
)
|
||||
(format #t "~Tmovie: ~A~%" (ppointer->process (-> obj movie)))
|
||||
(format #t "~Ttalking: ~A~%" (ppointer->process (-> obj talking)))
|
||||
(format #t "~Tspooling: ~A~%" (ppointer->process (-> obj spooling)))
|
||||
(format #t "~Thint: ~A~%" (ppointer->process (-> obj hint)))
|
||||
(format #t "~Tambient: ~A~%" (ppointer->process (-> obj ambient)))
|
||||
(format #t "~Tvideo-mode: ~A~%" (-> obj video-mode))
|
||||
(format #t "~Taspect-ratio: ~A~%" (-> obj aspect-ratio))
|
||||
(format #t "~Tsound-flava: ~D~%" (-> obj sound-flava))
|
||||
|
||||
+1
-8
@@ -42,14 +42,7 @@
|
||||
(zero?
|
||||
(logand (-> *kernel-context* prevent-from-run) (process-mask progress))
|
||||
)
|
||||
(let ((v1-18 (get-process conn))
|
||||
(a0-22 *progress-process*)
|
||||
)
|
||||
(= v1-18 (if a0-22
|
||||
(-> a0-22 0 self)
|
||||
)
|
||||
)
|
||||
)
|
||||
(= (get-process conn) (ppointer->process *progress-process*))
|
||||
)
|
||||
(case (the-as symbol (-> conn param1))
|
||||
(('rel)
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
(num-success-before-killing int8 :offset-assert 13)
|
||||
(num-attempts int8 :offset-assert 14)
|
||||
(num-success int8 :offset-assert 15)
|
||||
(start-time uint64 :offset-assert 16)
|
||||
(last-time-called uint64 :offset-assert 24)
|
||||
(start-time int64 :offset-assert 16)
|
||||
(last-time-called int64 :offset-assert 24)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x20
|
||||
|
||||
+12
-23
@@ -344,13 +344,9 @@
|
||||
)
|
||||
(when v1-0
|
||||
(when *hint-semaphore*
|
||||
(let ((v1-3 *hint-semaphore*))
|
||||
(set! v1-0 (dummy-15 (the-as level-hint (if v1-3
|
||||
(-> v1-3 0 self)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set!
|
||||
v1-0
|
||||
(dummy-15 (the-as level-hint (ppointer->process *hint-semaphore*)))
|
||||
)
|
||||
0
|
||||
)
|
||||
@@ -358,9 +354,9 @@
|
||||
(and
|
||||
v1-0
|
||||
(<
|
||||
(the-as
|
||||
int
|
||||
(- (-> *display* base-frame-counter) (-> *game-info* hint-play-time))
|
||||
(-
|
||||
(-> *display* base-frame-counter)
|
||||
(the-as int (-> *game-info* hint-play-time))
|
||||
)
|
||||
30
|
||||
)
|
||||
@@ -377,7 +373,7 @@
|
||||
(not (-> *setting-control* current hint))
|
||||
(not (-> *setting-control* current ambient))
|
||||
(>=
|
||||
(the-as int (-> *display* base-frame-counter))
|
||||
(-> *display* base-frame-counter)
|
||||
(the-as int (-> *game-info* blackout-time))
|
||||
)
|
||||
)
|
||||
@@ -401,11 +397,7 @@
|
||||
)
|
||||
(v1-21 #t)
|
||||
)
|
||||
(if
|
||||
(and
|
||||
(= (-> gp-1 num-attempts-before-playing) 1)
|
||||
(< (the-as int a0-24) 30)
|
||||
)
|
||||
(if (and (= (-> gp-1 num-attempts-before-playing) 1) (< a0-24 30))
|
||||
(+! (-> gp-1 start-time) a0-24)
|
||||
)
|
||||
(cond
|
||||
@@ -413,10 +405,7 @@
|
||||
(!= (-> gp-1 num-attempts-before-playing) 1)
|
||||
(nonzero? (-> gp-1 last-time-called))
|
||||
(<
|
||||
(the-as
|
||||
int
|
||||
(- (-> *display* base-frame-counter) (-> gp-1 last-time-called))
|
||||
)
|
||||
(- (-> *display* base-frame-counter) (-> gp-1 last-time-called))
|
||||
150
|
||||
)
|
||||
)
|
||||
@@ -428,7 +417,7 @@
|
||||
(when (nonzero? (-> gp-1 delay-before-playing))
|
||||
(if
|
||||
(<
|
||||
(the-as int (-> gp-1 start-time))
|
||||
(-> gp-1 start-time)
|
||||
(the-as int (-> gp-1 delay-before-playing))
|
||||
)
|
||||
(set! v1-21 #f)
|
||||
@@ -470,8 +459,8 @@
|
||||
(let ((v1-2 (length (-> *game-info* hint-control))))
|
||||
(dotimes (a0-1 v1-2)
|
||||
(let ((a1-2 (-> *game-info* hint-control a0-1)))
|
||||
(set! (-> a1-2 start-time) (the-as uint 0))
|
||||
(set! (-> a1-2 last-time-called) (the-as uint 0))
|
||||
(set! (-> a1-2 start-time) 0)
|
||||
(set! (-> a1-2 last-time-called) 0)
|
||||
(set! (-> a1-2 num-attempts) 0)
|
||||
(set! (-> a1-2 num-success) 0)
|
||||
)
|
||||
|
||||
+16
-16
@@ -173,22 +173,22 @@
|
||||
(last-screen int32 :offset-assert 564)
|
||||
(frames virtual-frame 6 :inline :offset-assert 568)
|
||||
(bg-clear-color rgba 4 :offset-assert 760)
|
||||
(real-frame-counter uint64 :offset-assert 776)
|
||||
(base-frame-counter uint64 :offset-assert 784)
|
||||
(game-frame-counter uint64 :offset-assert 792)
|
||||
(integral-frame-counter uint64 :offset-assert 800)
|
||||
(real-integral-frame-counter uint64 :offset-assert 808)
|
||||
(actual-frame-counter uint64 :offset-assert 816)
|
||||
(real-actual-frame-counter uint64 :offset-assert 824)
|
||||
(part-frame-counter uint64 :offset-assert 832)
|
||||
(old-real-frame-counter uint64 :offset-assert 840)
|
||||
(old-base-frame-counter uint64 :offset-assert 848)
|
||||
(old-game-frame-counter uint64 :offset-assert 856)
|
||||
(old-integral-frame-counter uint64 :offset-assert 864)
|
||||
(old-real-integral-frame-counter uint64 :offset-assert 872)
|
||||
(old-actual-frame-counter uint64 :offset-assert 880)
|
||||
(old-real-actual-frame-counter uint64 :offset-assert 888)
|
||||
(old-part-frame-counter uint64 :offset-assert 896)
|
||||
(real-frame-counter int64 :offset-assert 776)
|
||||
(base-frame-counter int64 :offset-assert 784)
|
||||
(game-frame-counter int64 :offset-assert 792)
|
||||
(integral-frame-counter int64 :offset-assert 800)
|
||||
(real-integral-frame-counter int64 :offset-assert 808)
|
||||
(actual-frame-counter int64 :offset-assert 816)
|
||||
(real-actual-frame-counter int64 :offset-assert 824)
|
||||
(part-frame-counter int64 :offset-assert 832)
|
||||
(old-real-frame-counter int64 :offset-assert 840)
|
||||
(old-base-frame-counter int64 :offset-assert 848)
|
||||
(old-game-frame-counter int64 :offset-assert 856)
|
||||
(old-integral-frame-counter int64 :offset-assert 864)
|
||||
(old-real-integral-frame-counter int64 :offset-assert 872)
|
||||
(old-actual-frame-counter int64 :offset-assert 880)
|
||||
(old-real-actual-frame-counter int64 :offset-assert 888)
|
||||
(old-part-frame-counter int64 :offset-assert 896)
|
||||
(time-ratio float :offset-assert 904)
|
||||
(seconds-per-frame float :offset-assert 908)
|
||||
(frames-per-second float :offset-assert 912)
|
||||
|
||||
+8
-8
@@ -185,12 +185,12 @@
|
||||
)
|
||||
(set-draw-env (-> disp draw0) psm w h ztest zpsm 384)
|
||||
(set-draw-env (-> disp draw1) psm w h ztest zpsm 320)
|
||||
(set! (-> disp base-frame-counter) (the-as uint #x493e0))
|
||||
(set! (-> disp game-frame-counter) (the-as uint #x493e0))
|
||||
(set! (-> disp real-frame-counter) (the-as uint #x493e0))
|
||||
(set! (-> disp part-frame-counter) (the-as uint #x493e0))
|
||||
(set! (-> disp integral-frame-counter) (the-as uint #x493e0))
|
||||
(set! (-> disp real-integral-frame-counter) (the-as uint #x493e0))
|
||||
(set! (-> disp base-frame-counter) #x493e0)
|
||||
(set! (-> disp game-frame-counter) #x493e0)
|
||||
(set! (-> disp real-frame-counter) #x493e0)
|
||||
(set! (-> disp part-frame-counter) #x493e0)
|
||||
(set! (-> disp integral-frame-counter) #x493e0)
|
||||
(set! (-> disp real-integral-frame-counter) #x493e0)
|
||||
(set! (-> disp old-base-frame-counter) (+ (-> disp base-frame-counter) -1))
|
||||
(set! (-> disp old-game-frame-counter) (+ (-> disp game-frame-counter) -1))
|
||||
(set! (-> disp old-real-frame-counter) (+ (-> disp real-frame-counter) -1))
|
||||
@@ -455,12 +455,12 @@
|
||||
(or
|
||||
(<
|
||||
75
|
||||
(the-as int (- (-> *display* real-frame-counter) (-> obj cache-time)))
|
||||
(- (-> *display* real-frame-counter) (the-as int (-> obj cache-time)))
|
||||
)
|
||||
(>= end-time (the-as int (-> worst-time-cache (/ bar-pos 10))))
|
||||
)
|
||||
(set! (-> worst-time-cache (/ bar-pos 10)) (the-as uint end-time))
|
||||
(set! (-> obj cache-time) (-> *display* real-frame-counter))
|
||||
(set! (-> obj cache-time) (the-as uint (-> *display* real-frame-counter)))
|
||||
)
|
||||
(cond
|
||||
(*profile-ticks*
|
||||
|
||||
+11
-2
@@ -70,7 +70,13 @@
|
||||
(defun ripple-update-waveform-offs ((arg0 ripple-wave-set))
|
||||
(let
|
||||
((f0-1
|
||||
(the float (- (-> *display* integral-frame-counter) (-> arg0 frame-save)))
|
||||
(the
|
||||
float
|
||||
(-
|
||||
(-> *display* integral-frame-counter)
|
||||
(the-as int (-> arg0 frame-save))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (!= f0-1 0.0)
|
||||
@@ -80,7 +86,10 @@
|
||||
(set! (-> a1-4 offs) (the float (logand (the int (-> a1-4 offs)) #xffff)))
|
||||
)
|
||||
)
|
||||
(set! (-> arg0 frame-save) (-> *display* integral-frame-counter))
|
||||
(set!
|
||||
(-> arg0 frame-save)
|
||||
(the-as uint (-> *display* integral-frame-counter))
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
|
||||
+10
-10
@@ -141,19 +141,19 @@
|
||||
|
||||
;; definition of type sparticle-launch-group
|
||||
(deftype sparticle-launch-group (basic)
|
||||
((length int16 :offset-assert 4)
|
||||
(duration uint16 :offset-assert 6)
|
||||
(linger-duration uint16 :offset-assert 8)
|
||||
(flags uint16 :offset-assert 10)
|
||||
(name basic :offset-assert 12)
|
||||
(launcher uint32 :offset-assert 16)
|
||||
(bounds sphere :inline :offset-assert 32)
|
||||
((length int16 :offset-assert 4)
|
||||
(duration uint16 :offset-assert 6)
|
||||
(linger-duration uint16 :offset-assert 8)
|
||||
(flags uint16 :offset-assert 10)
|
||||
(name basic :offset-assert 12)
|
||||
(launcher sparticle-group-item :offset-assert 16)
|
||||
(bounds sphere :inline :offset-assert 32)
|
||||
)
|
||||
:method-count-assert 10
|
||||
:size-assert #x30
|
||||
:flag-assert #xa00000030
|
||||
(:methods
|
||||
(dummy-9 (_type_ process) _type_ 9)
|
||||
(create-launch-control (_type_ process) sparticle-launch-control 9)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -188,8 +188,8 @@
|
||||
(:methods
|
||||
(dummy-9 () none 9)
|
||||
(dummy-10 () none 10)
|
||||
(dummy-11 () none 11)
|
||||
(dummy-12 () none 12)
|
||||
(dummy-11 (_type_ vector) none 11)
|
||||
(deactivate (_type_) none 12)
|
||||
(dummy-13 () none 13)
|
||||
)
|
||||
)
|
||||
|
||||
+2
-2
@@ -226,8 +226,8 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for symbol *dgo-time*, type uint
|
||||
(define *dgo-time* (the-as uint 0))
|
||||
;; definition for symbol *dgo-time*, type int
|
||||
(define *dgo-time* 0)
|
||||
|
||||
;; definition for function dgo-load-begin
|
||||
;; Used lq/sq
|
||||
|
||||
+17
-44
@@ -939,11 +939,7 @@
|
||||
(set! (-> obj preload-stream name) arg0)
|
||||
(set! (-> obj preload-stream parts) arg1)
|
||||
(set! (-> obj preload-stream priority) arg3)
|
||||
(let ((v1-8 (if arg2
|
||||
(-> arg2 ppointer)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-8 (process->ppointer arg2)))
|
||||
(set!
|
||||
(-> obj preload-stream owner)
|
||||
(new 'static 'handle
|
||||
@@ -1010,11 +1006,7 @@
|
||||
(set! (-> obj rec 0 name) arg0)
|
||||
(set! (-> obj rec 0 parts) arg1)
|
||||
(set! (-> obj rec 0 priority) arg3)
|
||||
(let ((v1-34 (if arg2
|
||||
(-> arg2 ppointer)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-34 (process->ppointer arg2)))
|
||||
(set!
|
||||
(-> obj rec 0 owner)
|
||||
(new 'static 'handle
|
||||
@@ -1029,12 +1021,7 @@
|
||||
(set! (-> obj rec 1 name) arg0)
|
||||
(set! (-> obj rec 1 parts) arg1)
|
||||
(set! (-> obj rec 1 priority) arg3)
|
||||
(let* ((a0-18 arg2)
|
||||
(v1-40 (if a0-18
|
||||
(-> a0-18 ppointer)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-40 (process->ppointer arg2)))
|
||||
(set!
|
||||
(-> obj rec 1 owner)
|
||||
(new 'static 'handle
|
||||
@@ -1048,12 +1035,7 @@
|
||||
(set! (-> obj rec 2 name) arg0)
|
||||
(set! (-> obj rec 2 parts) arg1)
|
||||
(set! (-> obj rec 2 priority) arg3)
|
||||
(let* ((a0-22 arg2)
|
||||
(v1-44 (if a0-22
|
||||
(-> a0-22 ppointer)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-44 (process->ppointer arg2)))
|
||||
(set!
|
||||
(-> obj rec 2 owner)
|
||||
(new 'static 'handle
|
||||
@@ -1101,18 +1083,13 @@
|
||||
(set! sv-56 0)
|
||||
(set! spool-sound (new-sound-id))
|
||||
(dummy-17 *load-state* (-> arg0 command-list))
|
||||
(let* ((a0-2 *setting-control*)
|
||||
(t9-2 (method-of-object a0-2 set-setting!))
|
||||
(a1-2 self)
|
||||
(a2-1 'spooling)
|
||||
(v1-6 self)
|
||||
)
|
||||
(t9-2 a0-2 a1-2 a2-1 (the-as symbol (if v1-6
|
||||
(-> v1-6 ppointer)
|
||||
)
|
||||
)
|
||||
0.0 0
|
||||
)
|
||||
(set-setting!
|
||||
*setting-control*
|
||||
self
|
||||
'spooling
|
||||
(the-as symbol (process->ppointer self))
|
||||
0.0
|
||||
0
|
||||
)
|
||||
(logior! (-> self skel status) 7)
|
||||
(kill-current-level-hint '() '() 'die)
|
||||
@@ -1168,11 +1145,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-46 (if self
|
||||
(-> self ppointer)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-46 (process->ppointer self)))
|
||||
(set!
|
||||
(-> *art-control* spool-lock)
|
||||
(new 'static 'handle
|
||||
@@ -1181,7 +1154,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! sv-48 (the-as int (-> *display* base-frame-counter)))
|
||||
(set! sv-48 (-> *display* base-frame-counter))
|
||||
(while (< spool-part (-> arg0 parts))
|
||||
(let* ((a0-27 *art-control*)
|
||||
(t9-13 (method-of-object a0-27 spool-push))
|
||||
@@ -1286,7 +1259,7 @@
|
||||
)
|
||||
)
|
||||
(set! sv-72 (current-str-pos spool-sound))
|
||||
(set! sv-40 (the-as int (-> *display* base-frame-counter)))
|
||||
(set! sv-40 (-> *display* base-frame-counter))
|
||||
(until (>= (the float v0-39) f28-0)
|
||||
(if (= (-> self skel root-channel 0) (-> self skel channel))
|
||||
(logior! (-> self skel status) 32)
|
||||
@@ -1296,7 +1269,7 @@
|
||||
(arg3 self)
|
||||
(and
|
||||
(<= sv-72 0)
|
||||
(>= (the-as int (- (-> *display* base-frame-counter) sv-40)) 1200)
|
||||
(>= (- (-> *display* base-frame-counter) sv-40) 1200)
|
||||
)
|
||||
(and (< 300 sv-56) (<= sv-72 0))
|
||||
)
|
||||
@@ -1338,14 +1311,14 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! sv-40 (the-as int (-> *display* base-frame-counter)))
|
||||
(set! sv-40 (-> *display* base-frame-counter))
|
||||
)
|
||||
(else
|
||||
0
|
||||
)
|
||||
)
|
||||
(set! sv-32 sv-72)
|
||||
(set! sv-48 (the-as int (-> *display* base-frame-counter)))
|
||||
(set! sv-48 (-> *display* base-frame-counter))
|
||||
(suspend)
|
||||
(let
|
||||
((f0-14 (* (- (the float (current-str-pos spool-sound)) sv-24) f30-0))
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
(rotv vector :inline :offset-assert 80)
|
||||
(scalev vector :inline :offset-assert 96)
|
||||
(dir-targ quaternion :inline :offset-assert 112)
|
||||
(angle-change-time uint64 :offset-assert 128)
|
||||
(angle-change-time int64 :offset-assert 128)
|
||||
(old-y-angle-diff float :offset-assert 136)
|
||||
)
|
||||
:method-count-assert 28
|
||||
|
||||
+3
-6
@@ -76,12 +76,9 @@
|
||||
(or
|
||||
(and (< saturated-yaw 0.0) (< old-diff 0.0))
|
||||
(>=
|
||||
(the-as
|
||||
int
|
||||
(-
|
||||
(-> *display* base-frame-counter)
|
||||
(-> obj angle-change-time)
|
||||
)
|
||||
(-
|
||||
(-> *display* base-frame-counter)
|
||||
(-> obj angle-change-time)
|
||||
)
|
||||
60
|
||||
)
|
||||
|
||||
+1
-1
@@ -93,7 +93,7 @@
|
||||
(defun show-mc-info ((dma-buf dma-buffer))
|
||||
(let ((info (new 'stack-no-clear 'mc-slot-info)))
|
||||
(dotimes (slot-idx 2)
|
||||
(mc-get-slot-info slot-idx)
|
||||
(mc-get-slot-info slot-idx info)
|
||||
(cond
|
||||
((zero? (-> info known))
|
||||
(format (clear *temp-string*) "SLOT ~D: EXAMINING SLOT~%" slot-idx)
|
||||
|
||||
+6
-12
@@ -50,10 +50,10 @@
|
||||
(align uint8 6 :offset-assert 88)
|
||||
(direct uint8 6 :offset-assert 94)
|
||||
(buzz-val uint8 2 :offset-assert 100)
|
||||
(buzz-time uint64 2 :offset-assert 104)
|
||||
(buzz-time int64 2 :offset-assert 104)
|
||||
(buzz basic :offset-assert 120)
|
||||
(buzz-act int32 :offset-assert 124)
|
||||
(change-time uint64 :offset-assert 128)
|
||||
(change-time int64 :offset-assert 128)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x88
|
||||
@@ -122,7 +122,7 @@
|
||||
)
|
||||
(dotimes (v1-17 2)
|
||||
(set! (-> pad buzz-val 0) (the-as uint 0))
|
||||
(set! (-> pad buzz-time 0) (the-as uint 0))
|
||||
(set! (-> pad buzz-time 0) 0)
|
||||
)
|
||||
pad
|
||||
)
|
||||
@@ -214,10 +214,7 @@
|
||||
((= buzz-amount (-> pad buzz-val buzz-idx))
|
||||
(set!
|
||||
(-> pad buzz-time buzz-idx)
|
||||
(max
|
||||
(the-as int (-> pad buzz-time buzz-idx))
|
||||
(the-as int (+ (get-current-time) duration))
|
||||
)
|
||||
(max (-> pad buzz-time buzz-idx) (+ (get-current-time) duration))
|
||||
)
|
||||
)
|
||||
((< (-> pad buzz-val buzz-idx) (the-as uint buzz-amount))
|
||||
@@ -247,10 +244,7 @@
|
||||
(cond
|
||||
((and
|
||||
(-> pad buzz)
|
||||
(<
|
||||
(the-as int (get-current-time))
|
||||
(the-as int (-> pad buzz-time buzz-idx))
|
||||
)
|
||||
(< (get-current-time) (-> pad buzz-time buzz-idx))
|
||||
(= *master-mode* 'game)
|
||||
)
|
||||
(let ((v1-10 buzz-idx))
|
||||
@@ -261,7 +255,7 @@
|
||||
(logand
|
||||
(ash
|
||||
(-> pad buzz-val buzz-idx)
|
||||
(- (the-as int (logand (get-integral-current-time) 7)))
|
||||
(- (logand (get-integral-current-time) 7))
|
||||
)
|
||||
1
|
||||
)
|
||||
|
||||
+3
-3
@@ -764,9 +764,9 @@
|
||||
(playing-id sound-id :offset-assert 8)
|
||||
(trans vector :inline :offset-assert 16)
|
||||
(name sound-name :offset-assert 32)
|
||||
(play-time uint64 :offset-assert 48)
|
||||
(time-base uint64 :offset-assert 56)
|
||||
(time-random uint64 :offset-assert 64)
|
||||
(play-time int64 :offset-assert 48)
|
||||
(time-base int64 :offset-assert 56)
|
||||
(time-random int64 :offset-assert 64)
|
||||
(volume int32 :offset-assert 72)
|
||||
(pitch int32 :offset-assert 76)
|
||||
(falloff-near int32 :offset-assert 80)
|
||||
|
||||
+11
-18
@@ -797,15 +797,15 @@
|
||||
(sv-48
|
||||
(set!
|
||||
(-> obj time-base)
|
||||
(the-as uint (the int (* 300.0 (-> sv-48 0))))
|
||||
(the int (* 300.0 (-> sv-48 0)))
|
||||
)
|
||||
(set!
|
||||
(-> obj time-random)
|
||||
(the-as uint (the int (* 300.0 (-> sv-48 1))))
|
||||
(the int (* 300.0 (-> sv-48 1)))
|
||||
)
|
||||
)
|
||||
(else
|
||||
(set! (-> obj time-base) (the-as uint -1))
|
||||
(set! (-> obj time-base) -1)
|
||||
)
|
||||
)
|
||||
(set! (-> obj trans quad) (-> arg1 quad))
|
||||
@@ -830,19 +830,16 @@
|
||||
((-> obj spec)
|
||||
(when
|
||||
(or
|
||||
(< (the-as int (-> obj time-base)) 0)
|
||||
(>=
|
||||
(the-as int (-> *display* base-frame-counter))
|
||||
(the-as int (-> obj play-time))
|
||||
)
|
||||
(< (-> obj time-base) 0)
|
||||
(>= (-> *display* base-frame-counter) (-> obj play-time))
|
||||
)
|
||||
(when (>= (the-as int (-> obj time-base)) 0)
|
||||
(when (>= (-> obj time-base) 0)
|
||||
(set!
|
||||
(-> obj play-time)
|
||||
(+
|
||||
(-> *display* base-frame-counter)
|
||||
(-> obj time-base)
|
||||
(rand-vu-int-count (the-as int (-> obj time-random)))
|
||||
(rand-vu-int-count (-> obj time-random))
|
||||
)
|
||||
)
|
||||
(set! (-> obj playing-id) (new-sound-id))
|
||||
@@ -869,7 +866,7 @@
|
||||
)
|
||||
(return 0)
|
||||
)
|
||||
(when (and *debug-effect-control* (>= (the-as int (-> obj time-base)) 0))
|
||||
(when (and *debug-effect-control* (>= (-> obj time-base) 0))
|
||||
(format
|
||||
#t
|
||||
"(~5D) effect sound ~A ~G "
|
||||
@@ -895,7 +892,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
((< (the-as int (-> obj time-base)) 0)
|
||||
((< (-> obj time-base) 0)
|
||||
(set!
|
||||
(-> obj playing-id)
|
||||
(sound-play-by-name
|
||||
@@ -910,11 +907,7 @@
|
||||
)
|
||||
)
|
||||
(else
|
||||
(when
|
||||
(>=
|
||||
(the-as int (-> *display* base-frame-counter))
|
||||
(the-as int (-> obj play-time))
|
||||
)
|
||||
(when (>= (-> *display* base-frame-counter) (-> obj play-time))
|
||||
(set!
|
||||
(-> obj playing-id)
|
||||
(sound-play-by-name
|
||||
@@ -932,7 +925,7 @@
|
||||
(+
|
||||
(-> *display* base-frame-counter)
|
||||
(-> obj time-base)
|
||||
(rand-vu-int-count (the-as int (-> obj time-random)))
|
||||
(rand-vu-int-count (-> obj time-random))
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
+2
-11
@@ -12,7 +12,7 @@
|
||||
(trans vector :inline :offset-assert 64)
|
||||
(quat quaternion :inline :offset-assert 80)
|
||||
(scale vector :inline :offset-assert 96)
|
||||
(notice-time uint64 :offset-assert 112)
|
||||
(notice-time int64 :offset-assert 112)
|
||||
(flex-blend float :offset-assert 120)
|
||||
(blend float :offset-assert 124)
|
||||
(max-dist meters :offset-assert 128)
|
||||
@@ -295,16 +295,7 @@
|
||||
)
|
||||
)
|
||||
(set! (-> obj notice-time) (-> *display* base-frame-counter))
|
||||
(let ((v1-12 (if proc
|
||||
(-> proc ppointer)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set!
|
||||
(-> last-try-to-look-at-data who)
|
||||
(new 'static 'handle :process v1-12 :pid (-> v1-12 0 pid))
|
||||
)
|
||||
)
|
||||
(set! (-> last-try-to-look-at-data who) (process->handle proc))
|
||||
(if (< (-> last-try-to-look-at-data vert) (-> enemy-facts cam-vert))
|
||||
(set! (-> last-try-to-look-at-data vert) (-> enemy-facts cam-vert))
|
||||
)
|
||||
|
||||
@@ -3,13 +3,13 @@
|
||||
|
||||
;; definition of type smush-control
|
||||
(deftype smush-control (structure)
|
||||
((start-time uint64 :offset-assert 0)
|
||||
(period float :offset-assert 8)
|
||||
(duration float :offset-assert 12)
|
||||
(amp float :offset-assert 16)
|
||||
(damp-amp float :offset-assert 20)
|
||||
(damp-period float :offset-assert 24)
|
||||
(ticks float :offset-assert 28)
|
||||
((start-time int64 :offset-assert 0)
|
||||
(period float :offset-assert 8)
|
||||
(duration float :offset-assert 12)
|
||||
(amp float :offset-assert 16)
|
||||
(damp-amp float :offset-assert 20)
|
||||
(damp-period float :offset-assert 24)
|
||||
(ticks float :offset-assert 28)
|
||||
)
|
||||
:method-count-assert 15
|
||||
:size-assert #x20
|
||||
|
||||
+7
-11
@@ -78,12 +78,12 @@
|
||||
|
||||
;; definition of type delayed-rand-float
|
||||
(deftype delayed-rand-float (structure)
|
||||
((min-time int32 :offset-assert 0)
|
||||
(max-time int32 :offset-assert 4)
|
||||
(max-val float :offset-assert 8)
|
||||
(timer int32 :offset-assert 12)
|
||||
(start-time uint64 :offset-assert 16)
|
||||
(value float :offset-assert 24)
|
||||
((min-time int32 :offset-assert 0)
|
||||
(max-time int32 :offset-assert 4)
|
||||
(max-val float :offset-assert 8)
|
||||
(timer int32 :offset-assert 12)
|
||||
(start-time int64 :offset-assert 16)
|
||||
(value float :offset-assert 24)
|
||||
)
|
||||
:method-count-assert 11
|
||||
:size-assert #x1c
|
||||
@@ -173,7 +173,7 @@
|
||||
(xz-max float :offset-assert 8)
|
||||
(y-max float :offset-assert 12)
|
||||
(timer int32 :offset-assert 16)
|
||||
(start-time uint64 :offset-assert 24)
|
||||
(start-time int64 :offset-assert 24)
|
||||
(value vector :inline :offset-assert 32)
|
||||
)
|
||||
:method-count-assert 13
|
||||
@@ -232,7 +232,3 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
0
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+41
-27
@@ -277,7 +277,10 @@
|
||||
(period-float (the float period))
|
||||
(current-time
|
||||
(+
|
||||
(the float (mod (-> *display* base-frame-counter) period))
|
||||
(the
|
||||
float
|
||||
(mod (the-as uint (-> *display* base-frame-counter)) period)
|
||||
)
|
||||
(-> obj offset)
|
||||
)
|
||||
)
|
||||
@@ -312,7 +315,10 @@
|
||||
)
|
||||
(current-time
|
||||
(+
|
||||
(the float (mod (-> *display* base-frame-counter) period))
|
||||
(the
|
||||
float
|
||||
(mod (the-as uint (-> *display* base-frame-counter)) period)
|
||||
)
|
||||
(-> obj offset)
|
||||
)
|
||||
)
|
||||
@@ -355,7 +361,10 @@
|
||||
(period-float (the float period))
|
||||
(current-time
|
||||
(+
|
||||
(the float (mod (-> *display* base-frame-counter) period))
|
||||
(the
|
||||
float
|
||||
(mod (the-as uint (-> *display* base-frame-counter)) period)
|
||||
)
|
||||
(-> obj offset)
|
||||
)
|
||||
)
|
||||
@@ -377,7 +386,10 @@
|
||||
(max-phase 1.0)
|
||||
(current-time
|
||||
(+
|
||||
(the float (mod (-> *display* base-frame-counter) period))
|
||||
(the
|
||||
float
|
||||
(mod (the-as uint (-> *display* base-frame-counter)) period)
|
||||
)
|
||||
(-> obj offset)
|
||||
)
|
||||
)
|
||||
@@ -401,7 +413,10 @@
|
||||
(period-float (the float period))
|
||||
(current-time
|
||||
(+
|
||||
(the float (mod (-> *display* base-frame-counter) period))
|
||||
(the
|
||||
float
|
||||
(mod (the-as uint (-> *display* base-frame-counter)) period)
|
||||
)
|
||||
(-> obj offset)
|
||||
)
|
||||
)
|
||||
@@ -434,7 +449,10 @@
|
||||
(max-val 2.0)
|
||||
(current-time
|
||||
(+
|
||||
(the float (mod (-> *display* base-frame-counter) period))
|
||||
(the
|
||||
float
|
||||
(mod (the-as uint (-> *display* base-frame-counter)) period)
|
||||
)
|
||||
(-> obj offset)
|
||||
)
|
||||
)
|
||||
@@ -468,7 +486,10 @@
|
||||
(max-val 2.0)
|
||||
(current-time
|
||||
(+
|
||||
(the float (mod (-> *display* base-frame-counter) period))
|
||||
(the
|
||||
float
|
||||
(mod (the-as uint (-> *display* base-frame-counter)) period)
|
||||
)
|
||||
(-> obj offset)
|
||||
)
|
||||
)
|
||||
@@ -529,7 +550,10 @@
|
||||
(f0-1 2.0)
|
||||
(f2-2
|
||||
(+
|
||||
(the float (mod (-> *display* base-frame-counter) v1-0))
|
||||
(the
|
||||
float
|
||||
(mod (the-as uint (-> *display* base-frame-counter)) v1-0)
|
||||
)
|
||||
(-> obj offset)
|
||||
)
|
||||
)
|
||||
@@ -569,7 +593,10 @@
|
||||
(max-val 2.0)
|
||||
(current-time
|
||||
(+
|
||||
(the float (mod (-> *display* base-frame-counter) period))
|
||||
(the
|
||||
float
|
||||
(mod (the-as uint (-> *display* base-frame-counter)) period)
|
||||
)
|
||||
(-> obj offset)
|
||||
)
|
||||
)
|
||||
@@ -620,7 +647,7 @@
|
||||
(set! (-> obj min-time) min-tim)
|
||||
(set! (-> obj max-time) max-time)
|
||||
(set! (-> obj max-val) (* 0.5 max-times-two))
|
||||
(set! (-> obj start-time) (the-as uint 0))
|
||||
(set! (-> obj start-time) 0)
|
||||
(set! (-> obj timer) 0)
|
||||
(set! (-> obj value) 0.0)
|
||||
(-> obj value)
|
||||
@@ -629,10 +656,7 @@
|
||||
;; definition for method 10 of type delayed-rand-float
|
||||
(defmethod update! delayed-rand-float ((obj delayed-rand-float))
|
||||
(when
|
||||
(>=
|
||||
(the-as int (- (-> *display* base-frame-counter) (-> obj start-time)))
|
||||
(-> obj timer)
|
||||
)
|
||||
(>= (- (-> *display* base-frame-counter) (-> obj start-time)) (-> obj timer))
|
||||
(set! (-> obj start-time) (-> *display* base-frame-counter))
|
||||
(set! (-> obj timer) (rand-vu-int-range (-> obj min-time) (-> obj max-time)))
|
||||
(set!
|
||||
@@ -752,7 +776,7 @@
|
||||
(set! (-> obj max-time) max-time)
|
||||
(set! (-> obj xz-max) (* 0.5 xz-range))
|
||||
(set! (-> obj y-max) (* 0.5 y-range))
|
||||
(set! (-> obj start-time) (the-as uint 0))
|
||||
(set! (-> obj start-time) 0)
|
||||
(set! (-> obj timer) 0)
|
||||
(vector-reset! (-> obj value))
|
||||
(-> obj value)
|
||||
@@ -780,10 +804,7 @@
|
||||
;; definition for method 11 of type delayed-rand-vector
|
||||
(defmethod update-with-delay! delayed-rand-vector ((obj delayed-rand-vector))
|
||||
(if
|
||||
(>=
|
||||
(the-as int (- (-> *display* base-frame-counter) (-> obj start-time)))
|
||||
(-> obj timer)
|
||||
)
|
||||
(>= (- (-> *display* base-frame-counter) (-> obj start-time)) (-> obj timer))
|
||||
(update-now! obj)
|
||||
)
|
||||
(-> obj value)
|
||||
@@ -795,10 +816,7 @@
|
||||
delayed-rand-vector
|
||||
((obj delayed-rand-vector))
|
||||
(if
|
||||
(>=
|
||||
(the-as int (- (-> *display* base-frame-counter) (-> obj start-time)))
|
||||
(-> obj timer)
|
||||
)
|
||||
(>= (- (-> *display* base-frame-counter) (-> obj start-time)) (-> obj timer))
|
||||
(update-now! obj)
|
||||
(vector-reset! (-> obj value))
|
||||
)
|
||||
@@ -865,7 +883,3 @@
|
||||
)
|
||||
(-> obj value)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+27
-140
@@ -315,36 +315,9 @@
|
||||
(format #t "[~8x] ~A~%" obj (-> obj type))
|
||||
(format #t "~Tname: ~S~%" (-> obj name))
|
||||
(format #t "~Tmask: #x~X~%" (-> obj mask))
|
||||
(let ((t9-3 format)
|
||||
(a0-4 #t)
|
||||
(a1-3 "~Tparent: ~A~%")
|
||||
(v1-0 (-> obj parent))
|
||||
)
|
||||
(t9-3 a0-4 a1-3 (if v1-0
|
||||
(-> v1-0 0 self)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((t9-4 format)
|
||||
(a0-5 #t)
|
||||
(a1-4 "~Tbrother: ~A~%")
|
||||
(v1-2 (-> obj brother))
|
||||
)
|
||||
(t9-4 a0-5 a1-4 (if v1-2
|
||||
(-> v1-2 0 self)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((t9-5 format)
|
||||
(a0-6 #t)
|
||||
(a1-5 "~Tchild: ~A~%")
|
||||
(v1-4 (-> obj child))
|
||||
)
|
||||
(t9-5 a0-6 a1-5 (if v1-4
|
||||
(-> v1-4 0 self)
|
||||
)
|
||||
)
|
||||
)
|
||||
(format #t "~Tparent: ~A~%" (ppointer->process (-> obj parent)))
|
||||
(format #t "~Tbrother: ~A~%" (ppointer->process (-> obj brother)))
|
||||
(format #t "~Tchild: ~A~%" (ppointer->process (-> obj child)))
|
||||
obj
|
||||
)
|
||||
|
||||
@@ -431,36 +404,9 @@
|
||||
(format #t "~Ttrans-hook: ~A~%" (-> obj trans-hook))
|
||||
(format #t "~Tpost-hook: ~A~%" (-> obj post-hook))
|
||||
(format #t "~Tevent-hook: ~A~%" (-> obj event-hook))
|
||||
(let ((t9-12 format)
|
||||
(a0-13 #t)
|
||||
(a1-12 "~Tparent: ~A~%")
|
||||
(v1-0 (-> obj parent))
|
||||
)
|
||||
(t9-12 a0-13 a1-12 (if v1-0
|
||||
(-> v1-0 0 self)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((t9-13 format)
|
||||
(a0-14 #t)
|
||||
(a1-13 "~Tbrother: ~A~%")
|
||||
(v1-2 (-> obj brother))
|
||||
)
|
||||
(t9-13 a0-14 a1-13 (if v1-2
|
||||
(-> v1-2 0 self)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((t9-14 format)
|
||||
(a0-15 #t)
|
||||
(a1-14 "~Tchild: ~A~%")
|
||||
(v1-4 (-> obj child))
|
||||
)
|
||||
(t9-14 a0-15 a1-14 (if v1-4
|
||||
(-> v1-4 0 self)
|
||||
)
|
||||
)
|
||||
)
|
||||
(format #t "~Tparent: ~A~%" (ppointer->process (-> obj parent)))
|
||||
(format #t "~Tbrother: ~A~%" (ppointer->process (-> obj brother)))
|
||||
(format #t "~Tchild: ~A~%" (ppointer->process (-> obj child)))
|
||||
(format #t "~Tconnection-list: ~`connectable`P~%" (-> obj connection-list))
|
||||
(format #t "~Tstack-frame-top: ~A~%" (-> obj stack-frame-top))
|
||||
(format #t "~Theap-base: #x~X~%" (-> obj heap-base))
|
||||
@@ -547,18 +493,8 @@
|
||||
(let ((s1-0 (-> s3-0 child))
|
||||
(v1-5 ((method-of-type process new) allocation process 'dead arg1))
|
||||
)
|
||||
(let ((a0-3 v1-5))
|
||||
(set! (-> s3-0 child) (if a0-3
|
||||
(-> a0-3 ppointer)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((a0-4 s3-0))
|
||||
(set! (-> v1-5 parent) (if a0-4
|
||||
(-> a0-4 ppointer)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> s3-0 child) (process->ppointer v1-5))
|
||||
(set! (-> v1-5 parent) (process->ppointer s3-0))
|
||||
(set! (-> v1-5 pool) s3-0)
|
||||
(set! (-> v1-5 brother) s1-0)
|
||||
)
|
||||
@@ -577,20 +513,13 @@
|
||||
(!= obj *debug-dead-pool*)
|
||||
)
|
||||
(set! s4-0 (get-process *debug-dead-pool* arg0 arg1))
|
||||
(when (the-as process s4-0)
|
||||
(let ((t9-1 format)
|
||||
(a0-2 0)
|
||||
(a1-2
|
||||
"WARNING: ~A ~A had to be allocated from the debug pool, because ~A was empty.~%"
|
||||
)
|
||||
(a2-1 arg0)
|
||||
(v1-6 (the-as object s4-0))
|
||||
)
|
||||
(t9-1 a0-2 a1-2 a2-1 (if (the-as process v1-6)
|
||||
(-> (the-as (pointer process) v1-6) 0 self)
|
||||
)
|
||||
(-> obj name)
|
||||
)
|
||||
(if (the-as process s4-0)
|
||||
(format
|
||||
0
|
||||
"WARNING: ~A ~A had to be allocated from the debug pool, because ~A was empty.~%"
|
||||
arg0
|
||||
(ppointer->process (the-as process s4-0))
|
||||
(-> obj name)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -604,9 +533,7 @@
|
||||
0
|
||||
"WARNING: ~A ~A could not be allocated, because ~A was empty.~%"
|
||||
arg0
|
||||
(if (the-as (pointer process) s4-0)
|
||||
(-> (the-as (pointer process) s4-0) 0 self)
|
||||
)
|
||||
(ppointer->process (the-as (pointer process) s4-0))
|
||||
(-> obj name)
|
||||
)
|
||||
(the-as process #f)
|
||||
@@ -1526,25 +1453,13 @@
|
||||
(defun change-parent ((arg0 process-tree) (arg1 process-tree))
|
||||
(let ((a2-0 (-> arg0 parent)))
|
||||
(when a2-0
|
||||
(let* ((v1-2 (-> a2-0 0 child))
|
||||
(a3-0 v1-2)
|
||||
)
|
||||
(let ((v1-2 (-> a2-0 0 child)))
|
||||
(cond
|
||||
((= (if a3-0
|
||||
(-> a3-0 0 self)
|
||||
)
|
||||
arg0
|
||||
)
|
||||
((= (ppointer->process v1-2) arg0)
|
||||
(set! (-> a2-0 0 child) (-> arg0 brother))
|
||||
)
|
||||
(else
|
||||
(while (let ((a2-2 (-> v1-2 0 brother)))
|
||||
(!= (if a2-2
|
||||
(-> a2-2 0 self)
|
||||
)
|
||||
arg0
|
||||
)
|
||||
)
|
||||
(while (!= (ppointer->process (-> v1-2 0 brother)) arg0)
|
||||
(nop!)
|
||||
(nop!)
|
||||
(nop!)
|
||||
@@ -1571,46 +1486,18 @@
|
||||
(a3-1 (the-as (pointer process-tree) #f))
|
||||
(v1-4 (the-as (pointer process-tree) #f))
|
||||
)
|
||||
(let ((t1-0 t0-0))
|
||||
(if (= (if t1-0
|
||||
(-> t1-0 0 self)
|
||||
)
|
||||
arg0
|
||||
)
|
||||
(set! a3-1 a2-1)
|
||||
)
|
||||
(if (= (ppointer->process t0-0) arg0)
|
||||
(set! a3-1 a2-1)
|
||||
)
|
||||
(let ((t1-4 t0-0))
|
||||
(if (= (if t1-4
|
||||
(-> t1-4 0 self)
|
||||
)
|
||||
arg1
|
||||
)
|
||||
(set! v1-4 a2-1)
|
||||
)
|
||||
(if (= (ppointer->process t0-0) arg1)
|
||||
(set! v1-4 a2-1)
|
||||
)
|
||||
(while (and (-> t0-0 0 brother) (or (not a3-1) (not v1-4)))
|
||||
(let ((t1-8 t0-0))
|
||||
(if (= (-> (if t1-8
|
||||
(-> t1-8 0 self)
|
||||
)
|
||||
brother
|
||||
)
|
||||
arg1
|
||||
)
|
||||
(set! v1-4 t0-0)
|
||||
)
|
||||
(if (= (-> (ppointer->process t0-0) brother) arg1)
|
||||
(set! v1-4 t0-0)
|
||||
)
|
||||
(let ((t1-13 t0-0))
|
||||
(if (= (-> (if t1-13
|
||||
(-> t1-13 0 self)
|
||||
)
|
||||
brother
|
||||
)
|
||||
arg0
|
||||
)
|
||||
(set! a3-1 t0-0)
|
||||
)
|
||||
(if (= (-> (ppointer->process t0-0) brother) arg0)
|
||||
(set! a3-1 t0-0)
|
||||
)
|
||||
(set! t0-0 (-> t0-0 0 brother))
|
||||
)
|
||||
|
||||
+62
-56
@@ -74,34 +74,37 @@
|
||||
(the-as game-task (current-task (-> obj tasks)))
|
||||
)
|
||||
(close-current! (-> obj tasks))
|
||||
(let* ((s5-1 (get-process *default-dead-pool* manipy #x4000))
|
||||
(v1-8 (when s5-1
|
||||
(let ((t9-4 (method-of-type manipy activate)))
|
||||
(t9-4
|
||||
(the-as manipy s5-1)
|
||||
obj
|
||||
'manipy
|
||||
(the-as pointer #x70004000)
|
||||
)
|
||||
)
|
||||
((the-as
|
||||
(function process function object object object object object)
|
||||
run-function-in-process
|
||||
)
|
||||
s5-1
|
||||
manipy-init
|
||||
(-> obj root trans)
|
||||
(-> obj entity)
|
||||
*flutflut-naked-sg*
|
||||
#f
|
||||
)
|
||||
(-> s5-1 ppointer)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set!
|
||||
(-> obj flutflut)
|
||||
(new 'static 'handle :process v1-8 :pid (-> v1-8 0 pid))
|
||||
(let ((s5-1 (get-process *default-dead-pool* manipy #x4000)))
|
||||
(set! (-> obj flutflut) (ppointer->handle (when s5-1
|
||||
(let
|
||||
((t9-4
|
||||
(method-of-type
|
||||
manipy
|
||||
activate
|
||||
)
|
||||
)
|
||||
)
|
||||
(t9-4
|
||||
(the-as manipy s5-1)
|
||||
obj
|
||||
'manipy
|
||||
(the-as pointer #x70004000)
|
||||
)
|
||||
)
|
||||
((the-as
|
||||
(function process function object object object object object)
|
||||
run-function-in-process
|
||||
)
|
||||
s5-1
|
||||
manipy-init
|
||||
(-> obj root trans)
|
||||
(-> obj entity)
|
||||
*flutflut-naked-sg*
|
||||
#f
|
||||
)
|
||||
(-> s5-1 ppointer)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((a1-4 (new 'stack-no-clear 'event-message-block)))
|
||||
@@ -118,34 +121,37 @@
|
||||
(set! (-> a1-5 param 0) (the-as uint #t))
|
||||
(send-event-function (handle->process (-> obj flutflut)) a1-5)
|
||||
)
|
||||
(let* ((s5-2 (get-process *default-dead-pool* manipy #x4000))
|
||||
(v1-28 (when s5-2
|
||||
(let ((t9-9 (method-of-type manipy activate)))
|
||||
(t9-9
|
||||
(the-as manipy s5-2)
|
||||
obj
|
||||
'manipy
|
||||
(the-as pointer #x70004000)
|
||||
)
|
||||
)
|
||||
((the-as
|
||||
(function process function object object object object object)
|
||||
run-function-in-process
|
||||
)
|
||||
s5-2
|
||||
manipy-init
|
||||
(-> obj root trans)
|
||||
(-> obj entity)
|
||||
*flutflutegg-sg*
|
||||
#f
|
||||
)
|
||||
(-> s5-2 ppointer)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set!
|
||||
(-> obj egg)
|
||||
(new 'static 'handle :process v1-28 :pid (-> v1-28 0 pid))
|
||||
(let ((s5-2 (get-process *default-dead-pool* manipy #x4000)))
|
||||
(set! (-> obj egg) (ppointer->handle (when s5-2
|
||||
(let
|
||||
((t9-9
|
||||
(method-of-type
|
||||
manipy
|
||||
activate
|
||||
)
|
||||
)
|
||||
)
|
||||
(t9-9
|
||||
(the-as manipy s5-2)
|
||||
obj
|
||||
'manipy
|
||||
(the-as pointer #x70004000)
|
||||
)
|
||||
)
|
||||
((the-as
|
||||
(function process function object object object object object)
|
||||
run-function-in-process
|
||||
)
|
||||
s5-2
|
||||
manipy-init
|
||||
(-> obj root trans)
|
||||
(-> obj entity)
|
||||
*flutflutegg-sg*
|
||||
#f
|
||||
)
|
||||
(-> s5-2 ppointer)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((a1-9 (new 'stack-no-clear 'event-message-block)))
|
||||
|
||||
+72
-56
@@ -101,34 +101,47 @@
|
||||
;; definition for function muse-to-idle
|
||||
(defbehavior muse-to-idle sculptor ((arg0 muse))
|
||||
(when (not (handle->process (-> arg0 incomming-attack-id)))
|
||||
(let* ((s5-0 (get-process *default-dead-pool* manipy #x4000))
|
||||
(v1-5 (when s5-0
|
||||
(let ((t9-1 (method-of-type manipy activate)))
|
||||
(t9-1
|
||||
(the-as manipy s5-0)
|
||||
arg0
|
||||
'manipy
|
||||
(the-as pointer #x70004000)
|
||||
)
|
||||
)
|
||||
((the-as
|
||||
(function process function object object object object object)
|
||||
run-function-in-process
|
||||
)
|
||||
s5-0
|
||||
manipy-init
|
||||
(-> arg0 collide-info trans)
|
||||
(-> arg0 entity)
|
||||
*sculptor-muse-sg*
|
||||
#f
|
||||
)
|
||||
(-> s5-0 ppointer)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set!
|
||||
(-> arg0 incomming-attack-id)
|
||||
(new 'static 'handle :process v1-5 :pid (-> v1-5 0 pid))
|
||||
(let ((s5-0 (get-process *default-dead-pool* manipy #x4000)))
|
||||
(set! (-> arg0 incomming-attack-id) (ppointer->handle (when s5-0
|
||||
(let
|
||||
((t9-1
|
||||
(method-of-type
|
||||
manipy
|
||||
activate
|
||||
)
|
||||
)
|
||||
)
|
||||
(t9-1
|
||||
(the-as
|
||||
manipy
|
||||
s5-0
|
||||
)
|
||||
arg0
|
||||
'manipy
|
||||
(the-as
|
||||
pointer
|
||||
#x70004000
|
||||
)
|
||||
)
|
||||
)
|
||||
((the-as
|
||||
(function process function object object object object object)
|
||||
run-function-in-process
|
||||
)
|
||||
s5-0
|
||||
manipy-init
|
||||
(->
|
||||
arg0
|
||||
collide-info
|
||||
trans
|
||||
)
|
||||
(-> arg0 entity)
|
||||
*sculptor-muse-sg*
|
||||
#f
|
||||
)
|
||||
(-> s5-0 ppointer)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -277,34 +290,37 @@
|
||||
(the-as game-task (current-task (-> obj tasks)))
|
||||
)
|
||||
(close-current! (-> obj tasks))
|
||||
(let* ((s5-1 (get-process *default-dead-pool* manipy #x4000))
|
||||
(v1-12 (when s5-1
|
||||
(let ((t9-5 (method-of-type manipy activate)))
|
||||
(t9-5
|
||||
(the-as manipy s5-1)
|
||||
obj
|
||||
'manipy
|
||||
(the-as pointer #x70004000)
|
||||
)
|
||||
)
|
||||
((the-as
|
||||
(function process function object object object object object)
|
||||
run-function-in-process
|
||||
)
|
||||
s5-1
|
||||
manipy-init
|
||||
(-> obj root trans)
|
||||
(-> obj entity)
|
||||
*sculptor-muse-sg*
|
||||
#f
|
||||
)
|
||||
(-> s5-1 ppointer)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set!
|
||||
(-> obj muse)
|
||||
(new 'static 'handle :process v1-12 :pid (-> v1-12 0 pid))
|
||||
(let ((s5-1 (get-process *default-dead-pool* manipy #x4000)))
|
||||
(set! (-> obj muse) (ppointer->handle (when s5-1
|
||||
(let
|
||||
((t9-5
|
||||
(method-of-type
|
||||
manipy
|
||||
activate
|
||||
)
|
||||
)
|
||||
)
|
||||
(t9-5
|
||||
(the-as manipy s5-1)
|
||||
obj
|
||||
'manipy
|
||||
(the-as pointer #x70004000)
|
||||
)
|
||||
)
|
||||
((the-as
|
||||
(function process function object object object object object)
|
||||
run-function-in-process
|
||||
)
|
||||
s5-1
|
||||
manipy-init
|
||||
(-> obj root trans)
|
||||
(-> obj entity)
|
||||
*sculptor-muse-sg*
|
||||
#f
|
||||
)
|
||||
(-> s5-1 ppointer)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((v1-18 (handle->process (-> obj muse))))
|
||||
|
||||
@@ -152,15 +152,15 @@
|
||||
(momentum-speed float :offset-assert 296)
|
||||
(acceleration float :offset-assert 300)
|
||||
(rotate-speed float :offset-assert 304)
|
||||
(turn-time uint64 :offset-assert 312)
|
||||
(frustration-time uint64 :offset-assert 320)
|
||||
(turn-time int64 :offset-assert 312)
|
||||
(frustration-time int64 :offset-assert 320)
|
||||
(speed-scale float :offset-assert 328)
|
||||
(neck joint-mod :offset-assert 332)
|
||||
(reaction-time uint64 :offset-assert 336)
|
||||
(notice-time uint64 :offset-assert 344)
|
||||
(state-timeout uint64 :offset-assert 352)
|
||||
(free-time uint64 :offset-assert 360)
|
||||
(touch-time uint64 :offset-assert 368)
|
||||
(reaction-time int64 :offset-assert 336)
|
||||
(notice-time int64 :offset-assert 344)
|
||||
(state-timeout int64 :offset-assert 352)
|
||||
(free-time int64 :offset-assert 360)
|
||||
(touch-time int64 :offset-assert 368)
|
||||
(nav-enemy-flags uint32 :offset-assert 376)
|
||||
(incomming-attack-id handle :offset-assert 384)
|
||||
(jump-return-state (state process) :offset-assert 392)
|
||||
|
||||
+114
-136
@@ -109,10 +109,7 @@
|
||||
(not *target*)
|
||||
(and
|
||||
(zero? (logand (-> *target* state-flags) #x80f8))
|
||||
(>=
|
||||
(the-as int (- (-> *display* base-frame-counter) (-> obj touch-time)))
|
||||
15
|
||||
)
|
||||
(>= (- (-> *display* base-frame-counter) (-> obj touch-time)) 15)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -459,13 +456,13 @@ nav-enemy-default-event-handler
|
||||
(-> obj collide-info)
|
||||
(-> obj nav target-pos)
|
||||
(-> obj rotate-speed)
|
||||
(the-as int (-> obj turn-time))
|
||||
(-> obj turn-time)
|
||||
)
|
||||
(seek-toward-heading-vec!
|
||||
(-> obj collide-info)
|
||||
(-> obj nav travel)
|
||||
(-> obj rotate-speed)
|
||||
(the-as int (-> obj turn-time))
|
||||
(-> obj turn-time)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -602,7 +599,7 @@ nav-enemy-default-event-handler
|
||||
(-> self collide-info)
|
||||
(target-pos 0)
|
||||
(-> self rotate-speed)
|
||||
(the-as int (-> self turn-time))
|
||||
(-> self turn-time)
|
||||
)
|
||||
)
|
||||
(nav-enemy-simple-post)
|
||||
@@ -699,8 +696,8 @@ nav-enemy-default-event-handler
|
||||
((logtest? (-> self nav-enemy-flags) 1)
|
||||
(when
|
||||
(>=
|
||||
(the-as int (- (-> *display* base-frame-counter) (-> self notice-time)))
|
||||
(the-as int (-> self reaction-time))
|
||||
(- (-> *display* base-frame-counter) (-> self notice-time))
|
||||
(-> self reaction-time)
|
||||
)
|
||||
(set! gp-0 #t)
|
||||
(set! (-> self nav-enemy-flags) (logand -2 (-> self nav-enemy-flags)))
|
||||
@@ -931,7 +928,10 @@ nav-enemy-default-event-handler
|
||||
(set! (-> v1-14 num-func) num-func-identity)
|
||||
(set! (-> v1-14 frame-num) 0.0)
|
||||
)
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
(set!
|
||||
(-> self state-time)
|
||||
(the-as seconds (-> *display* base-frame-counter))
|
||||
)
|
||||
(set!
|
||||
(-> self collide-info status)
|
||||
(logand -8 (-> self collide-info status))
|
||||
@@ -1013,7 +1013,7 @@ nav-enemy-default-event-handler
|
||||
(-> self collide-info)
|
||||
arg0
|
||||
(-> self rotate-speed)
|
||||
(the-as int (-> self turn-time))
|
||||
(-> self turn-time)
|
||||
)
|
||||
(suspend)
|
||||
(let ((a0-8 (-> self skel root-channel 0)))
|
||||
@@ -1027,7 +1027,7 @@ nav-enemy-default-event-handler
|
||||
(set!
|
||||
v1-16
|
||||
(or
|
||||
(>= (the-as int (- (-> *display* base-frame-counter) s4-0)) 3000)
|
||||
(>= (- (-> *display* base-frame-counter) s4-0) 3000)
|
||||
(nav-enemy-facing-direction? arg0 arg1)
|
||||
)
|
||||
)
|
||||
@@ -1097,7 +1097,10 @@ nav-enemy-default-event-handler
|
||||
:enter
|
||||
(behavior ()
|
||||
(nav-enemy-neck-control-inactive)
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
(set!
|
||||
(-> self state-time)
|
||||
(the-as seconds (-> *display* base-frame-counter))
|
||||
)
|
||||
(if (-> self nav-info move-to-ground)
|
||||
(dummy-60
|
||||
(-> self collide-info)
|
||||
@@ -1108,7 +1111,7 @@ nav-enemy-default-event-handler
|
||||
)
|
||||
)
|
||||
(set! (-> self nav-enemy-flags) (logand -7 (-> self nav-enemy-flags)))
|
||||
(set! (-> self state-timeout) (the-as uint 300))
|
||||
(set! (-> self state-timeout) 300)
|
||||
(none)
|
||||
)
|
||||
:trans
|
||||
@@ -1126,11 +1129,8 @@ nav-enemy-default-event-handler
|
||||
)
|
||||
)
|
||||
(>=
|
||||
(the-as
|
||||
int
|
||||
(- (-> *display* base-frame-counter) (the-as uint (-> self state-time)))
|
||||
)
|
||||
(the-as int (-> self state-timeout))
|
||||
(- (-> *display* base-frame-counter) (the-as int (-> self state-time)))
|
||||
(-> self state-timeout)
|
||||
)
|
||||
(nonzero? (-> self draw))
|
||||
(logtest? (-> self draw status) 8)
|
||||
@@ -1184,18 +1184,21 @@ nav-enemy-default-event-handler
|
||||
)
|
||||
:enter
|
||||
(behavior ()
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
(set!
|
||||
(-> self state-time)
|
||||
(the-as seconds (-> *display* base-frame-counter))
|
||||
)
|
||||
(set!
|
||||
(-> self nav flags)
|
||||
(the-as nav-control-flags (the-as int (logior #x80000 (-> self nav flags))))
|
||||
)
|
||||
(set! (-> self nav-enemy-flags) (logand -5 (-> self nav-enemy-flags)))
|
||||
(logior! (-> self nav-enemy-flags) 8)
|
||||
(set! (-> self state-timeout) (the-as uint 300))
|
||||
(set! (-> self state-timeout) 300)
|
||||
(set! (-> self target-speed) (-> self nav-info walk-travel-speed))
|
||||
(set! (-> self acceleration) (-> self nav-info walk-acceleration))
|
||||
(set! (-> self rotate-speed) (-> self nav-info walk-rotate-speed))
|
||||
(set! (-> self turn-time) (the-as uint (-> self nav-info walk-turn-time)))
|
||||
(set! (-> self turn-time) (the-as int (-> self nav-info walk-turn-time)))
|
||||
(none)
|
||||
)
|
||||
:exit
|
||||
@@ -1207,19 +1210,13 @@ nav-enemy-default-event-handler
|
||||
(behavior ()
|
||||
(when
|
||||
(>=
|
||||
(the-as
|
||||
int
|
||||
(- (-> *display* base-frame-counter) (the-as uint (-> self state-time)))
|
||||
)
|
||||
(- (-> *display* base-frame-counter) (the-as int (-> self state-time)))
|
||||
30
|
||||
)
|
||||
(when
|
||||
(>=
|
||||
(the-as
|
||||
int
|
||||
(- (-> *display* base-frame-counter) (the-as uint (-> self state-time)))
|
||||
)
|
||||
(the-as int (-> self state-timeout))
|
||||
(- (-> *display* base-frame-counter) (the-as int (-> self state-time)))
|
||||
(-> self state-timeout)
|
||||
)
|
||||
(if (and (nonzero? (-> self draw)) (logtest? (-> self draw status) 8))
|
||||
(set! (-> self free-time) (-> *display* base-frame-counter))
|
||||
@@ -1236,10 +1233,7 @@ nav-enemy-default-event-handler
|
||||
)
|
||||
)
|
||||
)
|
||||
(>=
|
||||
(the-as int (- (-> *display* base-frame-counter) (-> self free-time)))
|
||||
600
|
||||
)
|
||||
(>= (- (-> *display* base-frame-counter) (-> self free-time)) 600)
|
||||
)
|
||||
(go-virtual nav-enemy-idle)
|
||||
)
|
||||
@@ -1546,7 +1540,7 @@ nav-enemy-default-event-handler
|
||||
)
|
||||
(dummy-11 (-> self nav) (-> self nav target-pos))
|
||||
(set! (-> self rotate-speed) (-> self nav-info run-rotate-speed))
|
||||
(set! (-> self turn-time) (the-as uint (-> self nav-info run-turn-time)))
|
||||
(set! (-> self turn-time) (the-as int (-> self nav-info run-turn-time)))
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
@@ -1595,7 +1589,7 @@ nav-enemy-default-event-handler
|
||||
(-> self collide-info)
|
||||
(-> self nav travel)
|
||||
(-> self rotate-speed)
|
||||
(the-as int (-> self turn-time))
|
||||
(-> self turn-time)
|
||||
)
|
||||
(suspend)
|
||||
(let ((a0-4 (-> self skel root-channel 0)))
|
||||
@@ -1638,18 +1632,18 @@ nav-enemy-default-event-handler
|
||||
)
|
||||
:enter
|
||||
(behavior ()
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
(set!
|
||||
(-> self state-time)
|
||||
(the-as seconds (-> *display* base-frame-counter))
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:trans
|
||||
(behavior ()
|
||||
(when
|
||||
(>=
|
||||
(the-as
|
||||
int
|
||||
(- (-> *display* base-frame-counter) (the-as uint (-> self state-time)))
|
||||
)
|
||||
(the-as int (-> self reaction-time))
|
||||
(- (-> *display* base-frame-counter) (the-as int (-> self state-time)))
|
||||
(-> self reaction-time)
|
||||
)
|
||||
(if
|
||||
(or
|
||||
@@ -1841,13 +1835,16 @@ nav-enemy-default-event-handler
|
||||
:enter
|
||||
(behavior ()
|
||||
(nav-enemy-neck-control-look-at)
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
(set!
|
||||
(-> self state-time)
|
||||
(the-as seconds (-> *display* base-frame-counter))
|
||||
)
|
||||
(set! (-> self free-time) (-> *display* base-frame-counter))
|
||||
(logior! (-> self nav-enemy-flags) 4)
|
||||
(set! (-> self target-speed) (-> self nav-info run-travel-speed))
|
||||
(set! (-> self acceleration) (-> self nav-info run-acceleration))
|
||||
(set! (-> self rotate-speed) (-> self nav-info run-rotate-speed))
|
||||
(set! (-> self turn-time) (the-as uint (-> self nav-info run-turn-time)))
|
||||
(set! (-> self turn-time) (the-as int (-> self nav-info run-turn-time)))
|
||||
(nav-enemy-reset-frustration)
|
||||
(none)
|
||||
)
|
||||
@@ -1871,22 +1868,13 @@ nav-enemy-default-event-handler
|
||||
)
|
||||
(when
|
||||
(>=
|
||||
(the-as
|
||||
int
|
||||
(- (-> *display* base-frame-counter) (the-as uint (-> self state-time)))
|
||||
)
|
||||
(the-as int (-> self reaction-time))
|
||||
(- (-> *display* base-frame-counter) (the-as int (-> self state-time)))
|
||||
(-> self reaction-time)
|
||||
)
|
||||
(if
|
||||
(>=
|
||||
(the-as
|
||||
int
|
||||
(- (-> *display* base-frame-counter) (-> self frustration-time))
|
||||
)
|
||||
(the-as
|
||||
int
|
||||
(+ (-> self reaction-time) (-> self nav-info frustration-time))
|
||||
)
|
||||
(- (-> *display* base-frame-counter) (-> self frustration-time))
|
||||
(+ (-> self reaction-time) (-> self nav-info frustration-time))
|
||||
)
|
||||
(logior! (-> self nav-enemy-flags) 8192)
|
||||
)
|
||||
@@ -1899,11 +1887,7 @@ nav-enemy-default-event-handler
|
||||
)
|
||||
(cond
|
||||
((logtest? #x20000 (-> self nav flags))
|
||||
(if
|
||||
(>=
|
||||
(the-as int (- (-> *display* base-frame-counter) (-> self free-time)))
|
||||
300
|
||||
)
|
||||
(if (>= (- (-> *display* base-frame-counter) (-> self free-time)) 300)
|
||||
(go-virtual nav-enemy-patrol)
|
||||
)
|
||||
)
|
||||
@@ -1959,7 +1943,10 @@ nav-enemy-default-event-handler
|
||||
)
|
||||
:enter
|
||||
(behavior ()
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
(set!
|
||||
(-> self state-time)
|
||||
(the-as seconds (-> *display* base-frame-counter))
|
||||
)
|
||||
(let*
|
||||
((f30-0
|
||||
(vector-vector-distance (-> self collide-info trans) (target-pos 0))
|
||||
@@ -1977,22 +1964,19 @@ nav-enemy-default-event-handler
|
||||
(if (< f30-0 40960.0)
|
||||
(go-virtual nav-enemy-stare)
|
||||
)
|
||||
(set! (-> self state-timeout) (the-as uint gp-1))
|
||||
(set! (-> self state-timeout) gp-1)
|
||||
)
|
||||
(set! (-> self target-speed) (-> self nav-info walk-travel-speed))
|
||||
(set! (-> self acceleration) (-> self nav-info walk-acceleration))
|
||||
(set! (-> self rotate-speed) (-> self nav-info walk-rotate-speed))
|
||||
(set! (-> self turn-time) (the-as uint (-> self nav-info walk-turn-time)))
|
||||
(set! (-> self turn-time) (the-as int (-> self nav-info walk-turn-time)))
|
||||
(none)
|
||||
)
|
||||
:trans
|
||||
(behavior ()
|
||||
(when
|
||||
(>=
|
||||
(the-as
|
||||
int
|
||||
(- (-> *display* base-frame-counter) (the-as uint (-> self state-time)))
|
||||
)
|
||||
(- (-> *display* base-frame-counter) (the-as int (-> self state-time)))
|
||||
30
|
||||
)
|
||||
(if (logtest? (-> *target* state-flags) 128)
|
||||
@@ -2019,11 +2003,8 @@ nav-enemy-default-event-handler
|
||||
)
|
||||
(logtest? #x20000 (-> self nav flags))
|
||||
(>=
|
||||
(the-as
|
||||
int
|
||||
(- (-> *display* base-frame-counter) (the-as uint (-> self state-time)))
|
||||
)
|
||||
(the-as int (-> self state-timeout))
|
||||
(- (-> *display* base-frame-counter) (the-as int (-> self state-time)))
|
||||
(-> self state-timeout)
|
||||
)
|
||||
)
|
||||
(go-virtual nav-enemy-stare)
|
||||
@@ -2076,27 +2057,27 @@ nav-enemy-default-event-handler
|
||||
)
|
||||
:enter
|
||||
(behavior ()
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
(set!
|
||||
(-> self state-time)
|
||||
(the-as seconds (-> *display* base-frame-counter))
|
||||
)
|
||||
(set! (-> self nav-enemy-flags) (logand -17 (-> self nav-enemy-flags)))
|
||||
(let
|
||||
((f0-0 (vector-vector-distance (-> self collide-info trans) (target-pos 0)))
|
||||
)
|
||||
(set!
|
||||
(-> self state-timeout)
|
||||
(the-as
|
||||
uint
|
||||
(the
|
||||
int
|
||||
(+
|
||||
(lerp-scale 3000.0 0.0 f0-0 12288.0 122880.0)
|
||||
(nav-enemy-rnd-float-range 0.0 900.0)
|
||||
)
|
||||
(the
|
||||
int
|
||||
(+
|
||||
(lerp-scale 3000.0 0.0 f0-0 12288.0 122880.0)
|
||||
(nav-enemy-rnd-float-range 0.0 900.0)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> self rotate-speed) (-> self nav-info run-rotate-speed))
|
||||
(set! (-> self turn-time) (the-as uint (-> self nav-info run-turn-time)))
|
||||
(set! (-> self turn-time) (the-as int (-> self nav-info run-turn-time)))
|
||||
(set! (-> self collide-info transv quad) (-> *null-vector* quad))
|
||||
(none)
|
||||
)
|
||||
@@ -2109,10 +2090,7 @@ nav-enemy-default-event-handler
|
||||
(behavior ()
|
||||
(when
|
||||
(>=
|
||||
(the-as
|
||||
int
|
||||
(- (-> *display* base-frame-counter) (the-as uint (-> self state-time)))
|
||||
)
|
||||
(- (-> *display* base-frame-counter) (the-as int (-> self state-time)))
|
||||
30
|
||||
)
|
||||
(if (logtest? (-> *target* state-flags) 128)
|
||||
@@ -2123,11 +2101,8 @@ nav-enemy-default-event-handler
|
||||
(if
|
||||
(and
|
||||
(>=
|
||||
(the-as
|
||||
int
|
||||
(- (-> *display* base-frame-counter) (-> self notice-time))
|
||||
)
|
||||
(the-as int (-> self reaction-time))
|
||||
(- (-> *display* base-frame-counter) (-> self notice-time))
|
||||
(-> self reaction-time)
|
||||
)
|
||||
(not (nav-enemy-frustrated?))
|
||||
)
|
||||
@@ -2167,11 +2142,8 @@ nav-enemy-default-event-handler
|
||||
(set! (-> self nav-enemy-flags) (logand -5 (-> self nav-enemy-flags)))
|
||||
(if
|
||||
(>=
|
||||
(the-as
|
||||
int
|
||||
(- (-> *display* base-frame-counter) (the-as uint (-> self state-time)))
|
||||
)
|
||||
(the-as int (-> self state-timeout))
|
||||
(- (-> *display* base-frame-counter) (the-as int (-> self state-time)))
|
||||
(-> self state-timeout)
|
||||
)
|
||||
(go-virtual nav-enemy-give-up)
|
||||
)
|
||||
@@ -2214,7 +2186,10 @@ nav-enemy-default-event-handler
|
||||
)
|
||||
:enter
|
||||
(behavior ()
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
(set!
|
||||
(-> self state-time)
|
||||
(the-as seconds (-> *display* base-frame-counter))
|
||||
)
|
||||
(nav-enemy-neck-control-inactive)
|
||||
(set! (-> self nav-enemy-flags) (logand -5 (-> self nav-enemy-flags)))
|
||||
(none)
|
||||
@@ -2223,10 +2198,7 @@ nav-enemy-default-event-handler
|
||||
(behavior ()
|
||||
(when
|
||||
(>=
|
||||
(the-as
|
||||
int
|
||||
(- (-> *display* base-frame-counter) (the-as uint (-> self state-time)))
|
||||
)
|
||||
(- (-> *display* base-frame-counter) (the-as int (-> self state-time)))
|
||||
30
|
||||
)
|
||||
(if (TODO-RENAME-46 self (-> self nav-info notice-distance))
|
||||
@@ -2352,16 +2324,7 @@ nav-enemy-default-event-handler
|
||||
(set! (-> a1-0 from) self)
|
||||
(set! (-> a1-0 num-params) 0)
|
||||
(set! (-> a1-0 message) 'child-die)
|
||||
(let ((t9-0 send-event-function)
|
||||
(v1-1 (-> self parent))
|
||||
)
|
||||
(t9-0 (the-as process (if v1-1
|
||||
(-> v1-1 0 self)
|
||||
)
|
||||
)
|
||||
a1-0
|
||||
)
|
||||
)
|
||||
(send-event-function (ppointer->process (-> self parent)) a1-0)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
@@ -2445,13 +2408,16 @@ nav-enemy-default-event-handler
|
||||
(-> self collide-info)
|
||||
(-> self jump-dest)
|
||||
(-> self rotate-speed)
|
||||
(the-as int (-> self turn-time))
|
||||
(-> self turn-time)
|
||||
)
|
||||
)
|
||||
(when (logtest? (-> self nav-enemy-flags) 8)
|
||||
(let
|
||||
((f30-0
|
||||
(the float (- (-> *display* base-frame-counter) (-> self jump-time)))
|
||||
(the
|
||||
float
|
||||
(- (-> *display* base-frame-counter) (the-as int (-> self jump-time)))
|
||||
)
|
||||
)
|
||||
)
|
||||
(let
|
||||
@@ -2598,7 +2564,7 @@ nav-enemy-default-event-handler
|
||||
)
|
||||
)
|
||||
(set! (-> self collide-info status) (logand -8 (-> self collide-info status)))
|
||||
(set! (-> self jump-time) (-> *display* base-frame-counter))
|
||||
(set! (-> self jump-time) (the-as uint (-> *display* base-frame-counter)))
|
||||
(logior! (-> self nav-enemy-flags) 8)
|
||||
(cond
|
||||
((logtest? (-> self nav-enemy-flags) 1024)
|
||||
@@ -2659,7 +2625,10 @@ nav-enemy-default-event-handler
|
||||
)
|
||||
(while
|
||||
(<
|
||||
(the float (- (-> *display* base-frame-counter) (-> self jump-time)))
|
||||
(the
|
||||
float
|
||||
(- (-> *display* base-frame-counter) (the-as int (-> self jump-time)))
|
||||
)
|
||||
(-> self jump-trajectory time)
|
||||
)
|
||||
(suspend)
|
||||
@@ -2775,7 +2744,10 @@ nav-enemy-default-event-handler
|
||||
nav-enemy-jump-event-handler
|
||||
:enter
|
||||
(behavior ()
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
(set!
|
||||
(-> self state-time)
|
||||
(the-as seconds (-> *display* base-frame-counter))
|
||||
)
|
||||
(if
|
||||
(and
|
||||
(-> self nav-info use-jump-blocked)
|
||||
@@ -2846,13 +2818,13 @@ nav-enemy-default-event-handler
|
||||
(-> self collide-info)
|
||||
(-> self nav target-pos)
|
||||
(-> self rotate-speed)
|
||||
(the-as int (-> self turn-time))
|
||||
(-> self turn-time)
|
||||
)
|
||||
(seek-toward-heading-vec!
|
||||
(-> self collide-info)
|
||||
(-> self nav travel)
|
||||
(-> self rotate-speed)
|
||||
(the-as int (-> self turn-time))
|
||||
(-> self turn-time)
|
||||
)
|
||||
)
|
||||
(vector-v++!
|
||||
@@ -2882,7 +2854,10 @@ nav-enemy-default-event-handler
|
||||
)
|
||||
:enter
|
||||
(behavior ()
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
(set!
|
||||
(-> self state-time)
|
||||
(the-as seconds (-> *display* base-frame-counter))
|
||||
)
|
||||
(logclear! (-> self nav flags) (nav-control-flags bit19))
|
||||
(let ((gp-0 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> gp-0 quad) (-> self collide-info transv quad))
|
||||
@@ -2899,10 +2874,7 @@ nav-enemy-default-event-handler
|
||||
(if
|
||||
(or
|
||||
(>=
|
||||
(the-as
|
||||
int
|
||||
(- (-> *display* base-frame-counter) (the-as uint (-> self state-time)))
|
||||
)
|
||||
(- (-> *display* base-frame-counter) (the-as int (-> self state-time)))
|
||||
150
|
||||
)
|
||||
(logtest? #x80000 (-> self nav flags))
|
||||
@@ -2931,17 +2903,17 @@ nav-enemy-default-event-handler
|
||||
)
|
||||
:enter
|
||||
(behavior ()
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
(set!
|
||||
(-> self state-time)
|
||||
(the-as seconds (-> *display* base-frame-counter))
|
||||
)
|
||||
(none)
|
||||
)
|
||||
:trans
|
||||
(behavior ()
|
||||
(if
|
||||
(>=
|
||||
(the-as
|
||||
int
|
||||
(- (-> *display* base-frame-counter) (the-as uint (-> self state-time)))
|
||||
)
|
||||
(- (-> *display* base-frame-counter) (the-as int (-> self state-time)))
|
||||
150
|
||||
)
|
||||
(go (-> self jump-return-state))
|
||||
@@ -3013,7 +2985,10 @@ nav-enemy-default-event-handler
|
||||
)
|
||||
:code
|
||||
(behavior ()
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
(set!
|
||||
(-> self state-time)
|
||||
(the-as seconds (-> *display* base-frame-counter))
|
||||
)
|
||||
(logior! (-> self nav-enemy-flags) 2048)
|
||||
(ja-channel-push! 1 30)
|
||||
(let ((f30-0 (nav-enemy-rnd-float-range 0.8 1.2)))
|
||||
@@ -3046,7 +3021,7 @@ nav-enemy-default-event-handler
|
||||
(let ((gp-0 (nav-enemy-rnd-int-range 0 150))
|
||||
(s5-0 (-> *display* base-frame-counter))
|
||||
)
|
||||
(until (>= (the-as int (- (-> *display* base-frame-counter) s5-0)) gp-0)
|
||||
(until (>= (- (-> *display* base-frame-counter) s5-0) gp-0)
|
||||
(let ((a0-12 (-> self skel root-channel 0)))
|
||||
(set! (-> a0-12 param 0) f30-0)
|
||||
(joint-control-channel-group-eval!
|
||||
@@ -3083,7 +3058,10 @@ nav-enemy-default-event-handler
|
||||
)
|
||||
:code
|
||||
(behavior ()
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
(set!
|
||||
(-> self state-time)
|
||||
(the-as seconds (-> *display* base-frame-counter))
|
||||
)
|
||||
(nav-enemy-initialize-jump (-> self event-param-point))
|
||||
(nav-enemy-neck-control-look-at)
|
||||
(logior! (-> self nav-enemy-flags) 16)
|
||||
@@ -3173,7 +3151,7 @@ nav-enemy-default-event-handler
|
||||
(-> *FACT-bank* default-pill-inc)
|
||||
)
|
||||
)
|
||||
(set! (-> obj reaction-time) (the-as uint (nav-enemy-rnd-int-range 30 240)))
|
||||
(set! (-> obj reaction-time) (nav-enemy-rnd-int-range 30 240))
|
||||
(set! (-> obj speed-scale) 1.0)
|
||||
(logior! (-> obj nav-enemy-flags) 4216)
|
||||
0
|
||||
@@ -3184,7 +3162,7 @@ nav-enemy-default-event-handler
|
||||
(defmethod TODO-RENAME-49 nav-enemy ((obj nav-enemy) (arg0 nav-enemy-info))
|
||||
(set! (-> obj nav-info) arg0)
|
||||
(set! (-> obj rotate-speed) (-> obj nav-info walk-rotate-speed))
|
||||
(set! (-> obj turn-time) (the-as uint (-> obj nav-info walk-turn-time)))
|
||||
(set! (-> obj turn-time) (the-as int (-> obj nav-info walk-turn-time)))
|
||||
(when (and (!= (-> obj nav-info neck-joint) -1) (zero? (-> obj neck)))
|
||||
(set!
|
||||
(-> obj neck)
|
||||
|
||||
+5
-11
@@ -450,7 +450,7 @@
|
||||
(sim-time-remaining float :offset-assert 688)
|
||||
(float-height-offset float :offset-assert 692)
|
||||
(player-attack-id int32 :offset-assert 696)
|
||||
(player-bonk-timeout uint64 :offset-assert 704)
|
||||
(player-bonk-timeout int64 :offset-assert 704)
|
||||
(water-anim water-anim :offset-assert 712)
|
||||
(player-contact basic :offset-assert 716)
|
||||
(player-impulse collide-shape-prim-mesh :offset-assert 720)
|
||||
@@ -735,10 +735,7 @@
|
||||
(('bonk)
|
||||
(when
|
||||
(>=
|
||||
(the-as
|
||||
int
|
||||
(- (-> *display* base-frame-counter) (-> self player-bonk-timeout))
|
||||
)
|
||||
(- (-> *display* base-frame-counter) (-> self player-bonk-timeout))
|
||||
(the-as int (-> self info player-force-timeout))
|
||||
)
|
||||
(set! (-> self player-bonk-timeout) (-> *display* base-frame-counter))
|
||||
@@ -787,12 +784,9 @@
|
||||
((= (-> arg3 param 1) 'flop)
|
||||
(when
|
||||
(>=
|
||||
(the-as
|
||||
int
|
||||
(-
|
||||
(-> *display* base-frame-counter)
|
||||
(-> self player-bonk-timeout)
|
||||
)
|
||||
(-
|
||||
(-> *display* base-frame-counter)
|
||||
(-> self player-bonk-timeout)
|
||||
)
|
||||
(the-as int (-> self info player-force-timeout))
|
||||
)
|
||||
|
||||
+14
-21
@@ -3,10 +3,10 @@
|
||||
|
||||
;; definition of type ticky
|
||||
(deftype ticky (structure)
|
||||
((delay-til-ramp uint64 :offset-assert 0)
|
||||
(delay-til-timeout uint64 :offset-assert 8)
|
||||
(starting-time uint64 :offset-assert 16)
|
||||
(last-tick-time uint64 :offset-assert 24)
|
||||
((delay-til-ramp int64 :offset-assert 0)
|
||||
(delay-til-timeout int64 :offset-assert 8)
|
||||
(starting-time int64 :offset-assert 16)
|
||||
(last-tick-time int64 :offset-assert 24)
|
||||
)
|
||||
:method-count-assert 12
|
||||
:size-assert #x20
|
||||
@@ -32,9 +32,12 @@
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
(defmethod sleep ticky ((obj ticky) (arg0 uint))
|
||||
(set! (-> obj starting-time) (-> *display* base-frame-counter))
|
||||
(set! (-> obj delay-til-timeout) arg0)
|
||||
(set! (-> obj delay-til-ramp) (max 0 (the-as int (+ arg0 -1200))))
|
||||
(set! (-> obj last-tick-time) (the-as uint 0))
|
||||
(set! (-> obj delay-til-timeout) (the-as int arg0))
|
||||
(set!
|
||||
(-> obj delay-til-ramp)
|
||||
(the-as int (max 0 (the-as int (+ arg0 -1200))))
|
||||
)
|
||||
(set! (-> obj last-tick-time) 0)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
@@ -44,7 +47,7 @@
|
||||
(let ((gp-0 #f))
|
||||
(let ((v1-2 (- (-> *display* base-frame-counter) (-> obj starting-time))))
|
||||
(cond
|
||||
((>= (the-as int v1-2) (the-as int (-> obj delay-til-timeout)))
|
||||
((>= v1-2 (-> obj delay-til-timeout))
|
||||
(set! gp-0 #t)
|
||||
)
|
||||
(else
|
||||
@@ -53,7 +56,7 @@
|
||||
(fmin
|
||||
1.0
|
||||
(/
|
||||
(the float (max 0 (the-as int (- v1-2 (-> obj delay-til-ramp)))))
|
||||
(the float (max 0 (- v1-2 (-> obj delay-til-ramp))))
|
||||
(the float (- (-> obj delay-til-timeout) (-> obj delay-til-ramp)))
|
||||
)
|
||||
)
|
||||
@@ -61,13 +64,7 @@
|
||||
(v1-7 (the int (lerp 105.0 41.0 f0-1)))
|
||||
)
|
||||
(when
|
||||
(>=
|
||||
(the-as
|
||||
int
|
||||
(- (-> *display* base-frame-counter) (-> obj last-tick-time))
|
||||
)
|
||||
v1-7
|
||||
)
|
||||
(>= (- (-> *display* base-frame-counter) (-> obj last-tick-time)) v1-7)
|
||||
(set! (-> obj last-tick-time) (-> *display* base-frame-counter))
|
||||
(sound-play-by-name
|
||||
(static-sound-name "stopwatch")
|
||||
@@ -90,11 +87,7 @@
|
||||
;; definition for method 10 of type ticky
|
||||
(defmethod reached-delay? ticky ((obj ticky) (arg0 uint))
|
||||
(>=
|
||||
(the-as int (- (-> *display* base-frame-counter) (-> obj starting-time)))
|
||||
(- (-> *display* base-frame-counter) (-> obj starting-time))
|
||||
(the-as int arg0)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -101,11 +101,7 @@
|
||||
)
|
||||
(camera-change-to "camera-160" 150 #f)
|
||||
(let ((gp-0 (-> *display* base-frame-counter)))
|
||||
(until
|
||||
(>=
|
||||
(the-as int (- (-> *display* base-frame-counter) gp-0))
|
||||
900
|
||||
)
|
||||
(until (>= (- (-> *display* base-frame-counter) gp-0) 900)
|
||||
(suspend)
|
||||
)
|
||||
)
|
||||
@@ -141,9 +137,12 @@
|
||||
)
|
||||
(save-reminder gp-0 (logior v1-1 2) 0)
|
||||
)
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
(set!
|
||||
(-> self state-time)
|
||||
(the-as seconds (-> *display* base-frame-counter))
|
||||
)
|
||||
(let ((gp-1 (-> *display* base-frame-counter)))
|
||||
(until (>= (the-as int (- (-> *display* base-frame-counter) gp-1)) 300)
|
||||
(until (>= (- (-> *display* base-frame-counter) gp-1) 300)
|
||||
(suspend)
|
||||
)
|
||||
)
|
||||
|
||||
+40
-85
@@ -434,20 +434,14 @@
|
||||
(v1-69 (the-as number (logior #x3f800000 v1-68)))
|
||||
)
|
||||
(<
|
||||
(the-as
|
||||
int
|
||||
(-
|
||||
s5-0
|
||||
(the-as
|
||||
uint
|
||||
(the
|
||||
int
|
||||
(* f30-1 (+ f28-0 (* f26-0 (+ -1.0 (the-as float v1-69)))))
|
||||
)
|
||||
)
|
||||
(-
|
||||
s5-0
|
||||
(the
|
||||
int
|
||||
(* f30-1 (+ f28-0 (* f26-0 (+ -1.0 (the-as float v1-69)))))
|
||||
)
|
||||
)
|
||||
(the-as int gp-1)
|
||||
gp-1
|
||||
)
|
||||
)
|
||||
(suspend)
|
||||
@@ -514,23 +508,17 @@
|
||||
(v1-105 (the-as number (logior #x3f800000 v1-104)))
|
||||
)
|
||||
(<
|
||||
(the-as
|
||||
int
|
||||
(-
|
||||
s5-1
|
||||
(the-as
|
||||
uint
|
||||
(the
|
||||
int
|
||||
(*
|
||||
f30-2
|
||||
(+ f28-1 (* f26-1 (+ -1.0 (the-as float v1-105))))
|
||||
)
|
||||
)
|
||||
(-
|
||||
s5-1
|
||||
(the
|
||||
int
|
||||
(*
|
||||
f30-2
|
||||
(+ f28-1 (* f26-1 (+ -1.0 (the-as float v1-105))))
|
||||
)
|
||||
)
|
||||
)
|
||||
(the-as int gp-2)
|
||||
gp-2
|
||||
)
|
||||
)
|
||||
(suspend)
|
||||
@@ -644,23 +632,17 @@
|
||||
(v1-165 (the-as number (logior #x3f800000 v1-164)))
|
||||
)
|
||||
(<
|
||||
(the-as
|
||||
int
|
||||
(-
|
||||
s5-2
|
||||
(the-as
|
||||
uint
|
||||
(the
|
||||
int
|
||||
(*
|
||||
f30-3
|
||||
(+ f28-2 (* f26-2 (+ -1.0 (the-as float v1-165))))
|
||||
)
|
||||
)
|
||||
(-
|
||||
s5-2
|
||||
(the
|
||||
int
|
||||
(*
|
||||
f30-3
|
||||
(+ f28-2 (* f26-2 (+ -1.0 (the-as float v1-165))))
|
||||
)
|
||||
)
|
||||
)
|
||||
(the-as int gp-3)
|
||||
gp-3
|
||||
)
|
||||
)
|
||||
(suspend)
|
||||
@@ -808,23 +790,14 @@
|
||||
(v1-238 (the-as number (logior #x3f800000 v1-237)))
|
||||
)
|
||||
(<
|
||||
(the-as
|
||||
int
|
||||
(-
|
||||
s5-3
|
||||
(the-as
|
||||
uint
|
||||
(the
|
||||
int
|
||||
(*
|
||||
f30-4
|
||||
(+ f28-3 (* f26-3 (+ -1.0 (the-as float v1-238))))
|
||||
)
|
||||
)
|
||||
)
|
||||
(-
|
||||
s5-3
|
||||
(the
|
||||
int
|
||||
(* f30-4 (+ f28-3 (* f26-3 (+ -1.0 (the-as float v1-238)))))
|
||||
)
|
||||
)
|
||||
(the-as int gp-4)
|
||||
gp-4
|
||||
)
|
||||
)
|
||||
(suspend)
|
||||
@@ -884,23 +857,14 @@
|
||||
(v1-269 (the-as number (logior #x3f800000 v1-268)))
|
||||
)
|
||||
(<
|
||||
(the-as
|
||||
int
|
||||
(-
|
||||
s5-4
|
||||
(the-as
|
||||
uint
|
||||
(the
|
||||
int
|
||||
(*
|
||||
f30-5
|
||||
(+ f28-4 (* f26-4 (+ -1.0 (the-as float v1-269))))
|
||||
)
|
||||
)
|
||||
)
|
||||
(-
|
||||
s5-4
|
||||
(the
|
||||
int
|
||||
(* f30-5 (+ f28-4 (* f26-4 (+ -1.0 (the-as float v1-269)))))
|
||||
)
|
||||
)
|
||||
(the-as int gp-5)
|
||||
gp-5
|
||||
)
|
||||
)
|
||||
(suspend)
|
||||
@@ -957,23 +921,14 @@
|
||||
(v1-302 (the-as number (logior #x3f800000 v1-301)))
|
||||
)
|
||||
(<
|
||||
(the-as
|
||||
int
|
||||
(-
|
||||
s5-5
|
||||
(the-as
|
||||
uint
|
||||
(the
|
||||
int
|
||||
(*
|
||||
f30-6
|
||||
(+ f28-5 (* f26-5 (+ -1.0 (the-as float v1-302))))
|
||||
)
|
||||
)
|
||||
)
|
||||
(-
|
||||
s5-5
|
||||
(the
|
||||
int
|
||||
(* f30-6 (+ f28-5 (* f26-5 (+ -1.0 (the-as float v1-302)))))
|
||||
)
|
||||
)
|
||||
(the-as int gp-6)
|
||||
gp-6
|
||||
)
|
||||
)
|
||||
(suspend)
|
||||
|
||||
+31
-28
@@ -630,34 +630,37 @@
|
||||
(set-setting! *setting-control* pp 'music-volume-movie 'abs 0.0 0)
|
||||
(copy-settings-from-target! *setting-control*)
|
||||
(close-status! (-> obj tasks) (task-status need-reward-speech))
|
||||
(let* ((s5-2 (get-process *default-dead-pool* manipy #x4000))
|
||||
(v1-41 (when s5-2
|
||||
(let ((t9-15 (method-of-type manipy activate)))
|
||||
(t9-15
|
||||
(the-as manipy s5-2)
|
||||
obj
|
||||
'manipy
|
||||
(the-as pointer #x70004000)
|
||||
)
|
||||
)
|
||||
((the-as
|
||||
(function process function object object object object object)
|
||||
run-function-in-process
|
||||
)
|
||||
s5-2
|
||||
manipy-init
|
||||
(-> obj root trans)
|
||||
(-> obj entity)
|
||||
*assistant-sg*
|
||||
#f
|
||||
)
|
||||
(-> s5-2 ppointer)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set!
|
||||
(-> obj assistant)
|
||||
(new 'static 'handle :process v1-41 :pid (-> v1-41 0 pid))
|
||||
(let ((s5-2 (get-process *default-dead-pool* manipy #x4000)))
|
||||
(set! (-> obj assistant) (ppointer->handle (when s5-2
|
||||
(let
|
||||
((t9-15
|
||||
(method-of-type
|
||||
manipy
|
||||
activate
|
||||
)
|
||||
)
|
||||
)
|
||||
(t9-15
|
||||
(the-as manipy s5-2)
|
||||
obj
|
||||
'manipy
|
||||
(the-as pointer #x70004000)
|
||||
)
|
||||
)
|
||||
((the-as
|
||||
(function process function object object object object object)
|
||||
run-function-in-process
|
||||
)
|
||||
s5-2
|
||||
manipy-init
|
||||
(-> obj root trans)
|
||||
(-> obj entity)
|
||||
*assistant-sg*
|
||||
#f
|
||||
)
|
||||
(-> s5-2 ppointer)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((a1-16 (new 'stack-no-clear 'event-message-block)))
|
||||
|
||||
+1
-17
@@ -177,23 +177,7 @@
|
||||
(set! (-> s5-1 from) pp)
|
||||
(set! (-> s5-1 num-params) 1)
|
||||
(set! (-> s5-1 message) 'clone)
|
||||
(let* ((a0-10 obj)
|
||||
(v1-19 (if a0-10
|
||||
(-> a0-10 ppointer)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set!
|
||||
(-> s5-1 param 0)
|
||||
(the-as
|
||||
uint
|
||||
(logior
|
||||
(shl (-> v1-19 0 pid) 32)
|
||||
(new 'static 'handle :process v1-19)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> s5-1 param 0) (the-as uint (process->handle obj)))
|
||||
(send-event-function
|
||||
(-> (entity-by-type allpontoons) extra process)
|
||||
s5-1
|
||||
|
||||
+95
-70
@@ -665,17 +665,24 @@
|
||||
gp-0
|
||||
)
|
||||
)
|
||||
(a1-1 (if v1-1
|
||||
(->
|
||||
(the-as
|
||||
collide-shape
|
||||
v1-1
|
||||
)
|
||||
root-prim
|
||||
prim-core
|
||||
)
|
||||
(-> self root trans)
|
||||
)
|
||||
)
|
||||
)
|
||||
(if v1-1
|
||||
(->
|
||||
(the-as collide-shape v1-1)
|
||||
root-prim
|
||||
prim-core
|
||||
)
|
||||
(-> self root trans)
|
||||
(dummy-11
|
||||
(-> self part)
|
||||
(the-as vector a1-1)
|
||||
)
|
||||
)
|
||||
((method-of-object (-> self part) dummy-11))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
@@ -690,34 +697,42 @@
|
||||
)
|
||||
)
|
||||
(vector<-cspace! s4-0 (-> obj node-list data 5))
|
||||
(let* ((s3-0 (get-process *default-dead-pool* manipy #x4000))
|
||||
(v1-13 (when s3-0
|
||||
(let ((t9-8 (method-of-type manipy activate)))
|
||||
(t9-8
|
||||
(the-as manipy s3-0)
|
||||
obj
|
||||
'manipy
|
||||
(the-as pointer #x70004000)
|
||||
)
|
||||
)
|
||||
((the-as
|
||||
(function process function object object object object object)
|
||||
run-function-in-process
|
||||
)
|
||||
s3-0
|
||||
manipy-init
|
||||
s4-0
|
||||
(-> obj entity)
|
||||
*fuel-cell-sg*
|
||||
(new 'static 'vector :w 4915.2)
|
||||
)
|
||||
(-> s3-0 ppointer)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set!
|
||||
(-> obj right-eye-cell)
|
||||
(new 'static 'handle :process v1-13 :pid (-> v1-13 0 pid))
|
||||
(let ((s3-0 (get-process *default-dead-pool* manipy #x4000)))
|
||||
(set! (-> obj right-eye-cell) (ppointer->handle (when s3-0
|
||||
(let
|
||||
((t9-8
|
||||
(method-of-type
|
||||
manipy
|
||||
activate
|
||||
)
|
||||
)
|
||||
)
|
||||
(t9-8
|
||||
(the-as manipy s3-0)
|
||||
obj
|
||||
'manipy
|
||||
(the-as
|
||||
pointer
|
||||
#x70004000
|
||||
)
|
||||
)
|
||||
)
|
||||
((the-as
|
||||
(function process function object object object object object)
|
||||
run-function-in-process
|
||||
)
|
||||
s3-0
|
||||
manipy-init
|
||||
s4-0
|
||||
(-> obj entity)
|
||||
*fuel-cell-sg*
|
||||
(new 'static 'vector
|
||||
:w 4915.2
|
||||
)
|
||||
)
|
||||
(-> s3-0 ppointer)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((a1-9 (new 'stack-no-clear 'event-message-block)))
|
||||
@@ -730,9 +745,10 @@
|
||||
uint
|
||||
(lambda :behavior oracle
|
||||
()
|
||||
(let ((v0-0 (dummy-9 (-> *part-group-id-table* 63) self)))
|
||||
(set! (-> self part) (the-as sparticle-launch-control v0-0))
|
||||
v0-0
|
||||
(let
|
||||
((v0-0 (create-launch-control (-> *part-group-id-table* 63) self)))
|
||||
(set! (-> self part) v0-0)
|
||||
(the-as sparticle-launch-group v0-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -755,34 +771,42 @@
|
||||
)
|
||||
)
|
||||
(vector<-cspace! s4-0 (-> obj node-list data 6))
|
||||
(let* ((s3-1 (get-process *default-dead-pool* manipy #x4000))
|
||||
(v1-33 (when s3-1
|
||||
(let ((t9-15 (method-of-type manipy activate)))
|
||||
(t9-15
|
||||
(the-as manipy s3-1)
|
||||
obj
|
||||
'manipy
|
||||
(the-as pointer #x70004000)
|
||||
)
|
||||
)
|
||||
((the-as
|
||||
(function process function object object object object object)
|
||||
run-function-in-process
|
||||
)
|
||||
s3-1
|
||||
manipy-init
|
||||
s4-0
|
||||
(-> obj entity)
|
||||
*fuel-cell-sg*
|
||||
(new 'static 'vector :w 4915.2)
|
||||
)
|
||||
(-> s3-1 ppointer)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set!
|
||||
(-> obj left-eye-cell)
|
||||
(new 'static 'handle :process v1-33 :pid (-> v1-33 0 pid))
|
||||
(let ((s3-1 (get-process *default-dead-pool* manipy #x4000)))
|
||||
(set! (-> obj left-eye-cell) (ppointer->handle (when s3-1
|
||||
(let
|
||||
((t9-15
|
||||
(method-of-type
|
||||
manipy
|
||||
activate
|
||||
)
|
||||
)
|
||||
)
|
||||
(t9-15
|
||||
(the-as manipy s3-1)
|
||||
obj
|
||||
'manipy
|
||||
(the-as
|
||||
pointer
|
||||
#x70004000
|
||||
)
|
||||
)
|
||||
)
|
||||
((the-as
|
||||
(function process function object object object object object)
|
||||
run-function-in-process
|
||||
)
|
||||
s3-1
|
||||
manipy-init
|
||||
s4-0
|
||||
(-> obj entity)
|
||||
*fuel-cell-sg*
|
||||
(new 'static 'vector
|
||||
:w 4915.2
|
||||
)
|
||||
)
|
||||
(-> s3-1 ppointer)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((a1-16 (new 'stack-no-clear 'event-message-block)))
|
||||
@@ -795,9 +819,10 @@
|
||||
uint
|
||||
(lambda :behavior oracle
|
||||
()
|
||||
(let ((v0-0 (dummy-9 (-> *part-group-id-table* 63) self)))
|
||||
(set! (-> self part) (the-as sparticle-launch-control v0-0))
|
||||
v0-0
|
||||
(let
|
||||
((v0-0 (create-launch-control (-> *part-group-id-table* 63) self)))
|
||||
(set! (-> self part) v0-0)
|
||||
(the-as sparticle-launch-group v0-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -201,7 +201,7 @@ TEST_F(FormRegressionTest, EliminateFloatDeadSet) {
|
||||
" (f0-1 0.0)\n"
|
||||
" (f2-2\n"
|
||||
" (+\n"
|
||||
" (the float (mod (-> *display* base-frame-counter) v1-0))\n"
|
||||
" (the float (mod (the-as uint (-> *display* base-frame-counter)) v1-0))\n"
|
||||
" (-> arg0 offset)\n"
|
||||
" )\n"
|
||||
" )\n"
|
||||
|
||||
@@ -540,18 +540,9 @@ TEST_F(FormRegressionTest, RemoveMethod3ProcessTree) {
|
||||
" (format #t \"[~8x] ~A~%\" arg0 (-> arg0 type))\n"
|
||||
" (format #t \"~Tname: ~S~%\" (-> arg0 name))\n"
|
||||
" (format #t \"~Tmask: #x~X~%\" (-> arg0 mask))\n"
|
||||
" (let\n"
|
||||
" ((t9-3 format) (a0-4 #t) (a1-3 \"~Tparent: ~A~%\") (v1-0 (-> arg0 parent)))\n"
|
||||
" (t9-3 a0-4 a1-3 (if v1-0 (-> v1-0 0 self)))\n"
|
||||
" )\n"
|
||||
" (let\n"
|
||||
" ((t9-4 format) (a0-5 #t) (a1-4 \"~Tbrother: ~A~%\") (v1-2 (-> arg0 brother)))\n"
|
||||
" (t9-4 a0-5 a1-4 (if v1-2 (-> v1-2 0 self)))\n"
|
||||
" )\n"
|
||||
" (let\n"
|
||||
" ((t9-5 format) (a0-6 #t) (a1-5 \"~Tchild: ~A~%\") (v1-4 (-> arg0 child)))\n"
|
||||
" (t9-5 a0-6 a1-5 (if v1-4 (-> v1-4 0 self)))\n"
|
||||
" )\n"
|
||||
" (format #t \"~Tparent: ~A~%\" (ppointer->process (-> arg0 parent)))\n"
|
||||
" (format #t \"~Tbrother: ~A~%\" (ppointer->process (-> arg0 brother)))\n"
|
||||
" (format #t \"~Tchild: ~A~%\" (ppointer->process (-> arg0 child)))\n"
|
||||
" arg0\n"
|
||||
" )";
|
||||
test_with_expr(func, type, expected, false, "process-tree",
|
||||
@@ -932,8 +923,7 @@ TEST_F(FormRegressionTest, ExprMethod0DeadPool) {
|
||||
" daddiu sp, sp, 112";
|
||||
std::string type = "(function symbol type int int basic dead-pool)";
|
||||
std::string expected =
|
||||
"(let\n"
|
||||
" ((s3-0 (object-new arg0 arg1 (the-as int (-> arg1 size)))))\n"
|
||||
"(let ((s3-0 (object-new arg0 arg1 (the-as int (-> arg1 size)))))\n"
|
||||
" (set! (-> s3-0 name) arg4)\n"
|
||||
" (set! (-> s3-0 mask) (process-mask process-tree))\n"
|
||||
" (set! (-> s3-0 parent) (the-as (pointer process-tree) #f))\n"
|
||||
@@ -941,14 +931,12 @@ TEST_F(FormRegressionTest, ExprMethod0DeadPool) {
|
||||
" (set! (-> s3-0 child) (the-as (pointer process-tree) #f))\n"
|
||||
" (set! (-> s3-0 self) s3-0)\n"
|
||||
" (set! (-> s3-0 ppointer) (the-as (pointer process) (&-> s3-0 self)))\n"
|
||||
" (dotimes\n"
|
||||
" (s2-1 arg2)\n"
|
||||
" (let\n"
|
||||
" ((s1-0 (-> s3-0 child))\n"
|
||||
" (v1-5 ((method-of-type process new) arg0 process (quote dead) arg3))\n"
|
||||
" )\n"
|
||||
" (let ((a0-3 v1-5)) (set! (-> s3-0 child) (if a0-3 (-> a0-3 ppointer))))\n"
|
||||
" (let ((a0-4 s3-0)) (set! (-> v1-5 parent) (if a0-4 (-> a0-4 ppointer))))\n"
|
||||
" (dotimes (s2-1 arg2)\n"
|
||||
" (let ((s1-0 (-> s3-0 child))\n"
|
||||
" (v1-5 ((method-of-type process new) arg0 process 'dead arg3))\n"
|
||||
" )\n"
|
||||
" (set! (-> s3-0 child) (process->ppointer v1-5))\n"
|
||||
" (set! (-> v1-5 parent) (process->ppointer s3-0))\n"
|
||||
" (set! (-> v1-5 pool) s3-0)\n"
|
||||
" (set! (-> v1-5 brother) s1-0)\n"
|
||||
" )\n"
|
||||
@@ -1066,21 +1054,13 @@ TEST_F(FormRegressionTest, ExprMethod14DeadPool) {
|
||||
" (!= arg0 *debug-dead-pool*)\n"
|
||||
" )\n"
|
||||
" (set! s4-0 (get-process *debug-dead-pool* arg1 arg2))\n"
|
||||
" (when (the-as process s4-0)\n"
|
||||
" (let ((t9-1 format)\n"
|
||||
" (a0-2 0)\n"
|
||||
" (a1-2\n"
|
||||
" \"WARNING: ~A ~A had to be allocated from the debug pool, because ~A was "
|
||||
"empty.~%\"\n"
|
||||
" )\n"
|
||||
" (a2-1 arg1)\n"
|
||||
" (v1-6 (the-as object s4-0))\n"
|
||||
" )\n"
|
||||
" (t9-1 a0-2 a1-2 a2-1 (if (the-as process v1-6)\n"
|
||||
" (-> (the-as (pointer process) v1-6) 0 self)\n"
|
||||
" )\n"
|
||||
" (-> arg0 name)\n"
|
||||
" )\n"
|
||||
" (if (the-as process s4-0)\n"
|
||||
" (format\n"
|
||||
" 0\n"
|
||||
" \"WARNING: ~A ~A had to be allocated from the debug pool, because ~A was empty.~%\"\n"
|
||||
" arg1\n"
|
||||
" (ppointer->process (the-as process s4-0))\n"
|
||||
" (-> arg0 name)\n"
|
||||
" )\n"
|
||||
" )\n"
|
||||
" )\n"
|
||||
@@ -1094,9 +1074,7 @@ TEST_F(FormRegressionTest, ExprMethod14DeadPool) {
|
||||
" 0\n"
|
||||
" \"WARNING: ~A ~A could not be allocated, because ~A was empty.~%\"\n"
|
||||
" arg1\n"
|
||||
" (if (the-as (pointer process) s4-0)\n"
|
||||
" (-> (the-as (pointer process) s4-0) 0 self)\n"
|
||||
" )\n"
|
||||
" (ppointer->process (the-as (pointer process) s4-0))\n"
|
||||
" (-> arg0 name)\n"
|
||||
" )\n"
|
||||
" (the-as process #f)\n"
|
||||
|
||||
@@ -99,7 +99,7 @@ const std::unordered_set<std::string> g_functions_to_skip_compiling = {
|
||||
|
||||
/// GKERNEL
|
||||
// asm
|
||||
"(method 10 process)",
|
||||
"(method 10 process)", "(method 14 dead-pool)",
|
||||
|
||||
/// GSTATE
|
||||
"enter-state", // stack pointer asm
|
||||
|
||||
Reference in New Issue
Block a user