mirror of
https://github.com/open-goal/jak-project.git
synced 2024-10-20 11:26:18 -04:00
fix actor compaction (#973)
This commit is contained in:
parent
7292cb5765
commit
232e71ad5b
|
@ -5,7 +5,7 @@
|
|||
;; name in dgo: relocate
|
||||
;; dgos: GAME, ENGINE
|
||||
|
||||
;; DECOMP BEGINS
|
||||
;; note: the while loop in this is changed to include a cast to basic.
|
||||
|
||||
(defmethod relocate process ((obj process) (arg0 int))
|
||||
(let ((v1-0 *kernel-context*))
|
||||
|
@ -85,7 +85,7 @@
|
|||
(&+! (-> obj ppointer) arg0)
|
||||
)
|
||||
)
|
||||
(let ((s4-0 (&+ (-> obj heap-base) 4)))
|
||||
(let ((s4-0 (the basic (&+ (-> obj heap-base) 4))))
|
||||
(while (< (the-as int s4-0) (the-as int (-> obj heap-cur)))
|
||||
(relocate s4-0 arg0)
|
||||
(&+! s4-0 (logand -16 (+ (asize-of s4-0) 15)))
|
||||
|
|
|
@ -2120,7 +2120,6 @@
|
|||
;; before calling play, the C Kernel would set this.
|
||||
(define *kernel-boot-message* 'play)
|
||||
(load-package "game" global)
|
||||
(set! *compact-actors* #f)
|
||||
(play #t #t)
|
||||
)
|
||||
)
|
||||
|
|
|
@ -550,15 +550,11 @@
|
|||
(defmacro suspend ()
|
||||
;; suspend the current process.
|
||||
`(rlet ((pp :reg r13 :reset-here #t))
|
||||
;; we pass the current thread to the kernel with the pp register.
|
||||
;; so it should be backed up on the stack here.
|
||||
(.push pp)
|
||||
;; set to the current thread
|
||||
(set! pp (-> (the process pp) top-thread))
|
||||
;; call the suspend hook (put nothing as the argument)
|
||||
((-> (the cpu-thread pp) suspend-hook) (the cpu-thread 0))
|
||||
;; now we've been resumed, restore pp.
|
||||
(.pop pp)
|
||||
;; the kernel will set pp (possibly to a new value) on resume.
|
||||
)
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in a new issue