[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
@@ -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)
)