[decomp] game-info (#779)

* support more process stuff

* more of game info

* add ref file

* progress on save
This commit is contained in:
water111
2021-08-22 20:12:47 -04:00
committed by GitHub
parent 30d1e1d6c9
commit 403bb5f4de
117 changed files with 6234 additions and 2243 deletions
+19 -16
View File
@@ -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
)
+2 -2
View File
@@ -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)
File diff suppressed because it is too large Load Diff
+5 -50
View File
@@ -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
View File
@@ -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
@@ -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)
)