mirror of
https://github.com/open-goal/jak-project.git
synced 2024-10-20 21:27:52 -04:00
f7bd0752f8
* wip * getting stuff set up so we can actually run test cases * better handle block entry stuff * types2 working on gstring * comments * math ref working * up to first stack stuff * stack fixes * bounding box * math stuff is working * float fixes * temp debug for (method 9 profile-array) * stupid stupid bug * debugging * everything is broken * some amount of type stuff works * bitfield * texture bitfields not working * temp * types * more stuff * type check * temp * float related fixes for light and res problems * revisit broken files, fix bugs * more types * vector debug * bug fixes for decompiler crashes in harder functions * update goal_src
65 lines
2.1 KiB
Common Lisp
65 lines
2.1 KiB
Common Lisp
;;-*-Lisp-*-
|
|
(in-package goal)
|
|
|
|
;; name: capture.gc
|
|
;; name in dgo: capture
|
|
;; dgos: ENGINE, GAME
|
|
|
|
;; DECOMP BEGINS
|
|
|
|
(declare-file (debug))
|
|
(when *debug-segment*
|
|
|
|
|
|
(defun gs-set-default-store-image ((arg0 gs-store-image-packet) (arg1 int) (arg2 int) (arg3 int) (arg4 int) (arg5 int) (arg6 int) (arg7 int))
|
|
(set! (-> arg0 vifcode 0) (new 'static 'vif-tag))
|
|
(set! (-> arg0 vifcode 1) (new 'static 'vif-tag :imm #x8000 :cmd (vif-cmd mskpath3)))
|
|
(set! (-> arg0 vifcode 2) (new 'static 'vif-tag :cmd (vif-cmd flusha) :msk #x1))
|
|
(set! (-> arg0 vifcode 3) (new 'static 'vif-tag :imm #x6 :cmd (vif-cmd direct) :msk #x1))
|
|
(set! (-> arg0 giftag) (new 'static 'gif-tag :nloop #x5 :eop #x1 :nreg #x1 :regs0 (gif-reg-id a+d)))
|
|
(set! (-> arg0 bitbltbuf) (new 'static 'gs-bitbltbuf :sbp arg1 :sbw arg2 :spsm arg3))
|
|
(set! (-> arg0 bitbltbuf-addr) (gs-reg64 bitbltbuf))
|
|
(set! (-> arg0 trxpos) (new 'static 'gs-trxpos :ssax arg4 :ssay arg5))
|
|
(set! (-> arg0 trxpos-addr) (gs-reg64 trxpos))
|
|
(set! (-> arg0 trxreg) (new 'static 'gs-trxreg :rrw arg6 :rrh arg7))
|
|
(set! (-> arg0 trxreg-addr) (gs-reg64 trxreg))
|
|
(set! (-> arg0 finish) 0)
|
|
(set! (-> arg0 finish-addr) (gs-reg64 finish))
|
|
(set! (-> arg0 trxdir) (new 'static 'gs-trxdir :xdir #x1))
|
|
(set! (-> arg0 trxdir-addr) (gs-reg64 trxdir))
|
|
;; (.sync.l)
|
|
7
|
|
)
|
|
|
|
(defun store-image ((arg0 screen-shot-work))
|
|
(let ((gp-0 512)
|
|
(s5-0 416)
|
|
)
|
|
(let ((a3-0 (-> arg0 count))
|
|
(a2-0 (-> arg0 name))
|
|
)
|
|
(set! (-> *image-name* data 0) (the-as uint 0))
|
|
(format *image-name* "final/rawshots/~s-~d.raw" a2-0 a3-0)
|
|
)
|
|
(format 0 "writing ~s~%" *image-name*)
|
|
(let ((s4-0 (new 'stack 'file-stream *image-name* 'write)))
|
|
(let ((s3-0 (-> *display* frames (-> *display* on-screen) global-buf data)))
|
|
(let ((s2-0 (new 'static 'gs-store-image-packet)))
|
|
(gs-set-default-store-image s2-0 #x3300 (/ gp-0 64) 0 0 0 gp-0 s5-0)
|
|
(flush-cache 0)
|
|
(gs-store-image s2-0 s3-0)
|
|
)
|
|
(sync-path 0 0)
|
|
(file-stream-write s4-0 s3-0 (the-as uint (* (* s5-0 gp-0) 4)))
|
|
)
|
|
(file-stream-close s4-0)
|
|
)
|
|
)
|
|
0
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|