mirror of
https://github.com/open-goal/jak-project
synced 2026-08-17 21:43:27 -04:00
a8342aef31
* temp * temp * wip * more progress on the instance asm * first half of tie extraction, up to dma lists * more tie extraction * first part figured out maybe * bp1 loop seems to work, bp2 loop does not * bp1 and bp2 appear working. sadly ip is needed * ip1 outline, not working ip2 * just kidding, ip2 seems to work * extraction seems to work * basic rendering working * tie fixes * performance optimization of tie renderer * hook up tie to engine * fix more bugs * cleanup and perf improvements * fix tests * ref tests * mm256i for gcc * CLANG * windows * more compile fixes * fix fast time of day * small fixes * fix after merge * clang
129 lines
7.2 KiB
Common Lisp
129 lines
7.2 KiB
Common Lisp
;;-*-Lisp-*-
|
|
(in-package goal)
|
|
|
|
;; name: tie-work.gc
|
|
;; name in dgo: tie-work
|
|
;; dgos: GAME, ENGINE
|
|
|
|
;; definition for symbol *instance-tie-work*, type instance-tie-work
|
|
|
|
;; helpful constants for the instance drawing EE asm.
|
|
(define *instance-tie-work*
|
|
(new 'static 'instance-tie-work
|
|
:wind-const (new 'static 'vector :x 0.5 :y 100.0 :z 0.0166 :w -1.0)
|
|
:constant (new 'static 'vector :x 4096.0 :y 128.0)
|
|
:far-morph (new 'static 'vector :x 1.0 :w 256.0)
|
|
:upload-color-0 (new 'static 'dma-packet
|
|
:dma (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id ref))
|
|
:vif1 (new 'static 'vif-tag :imm #x80c6 :num #x6 :cmd (vif-cmd unpack-v4-32))
|
|
)
|
|
:upload-color-1 (new 'static 'dma-packet
|
|
:dma (new 'static 'dma-tag :id (dma-tag-id ref))
|
|
:vif0 (new 'static 'vif-tag :cmd (vif-cmd stmod))
|
|
:vif1 (new 'static 'vif-tag :imm #xc0cc :cmd (vif-cmd unpack-v4-8))
|
|
)
|
|
:upload-color-2 (new 'static 'dma-packet
|
|
:dma (new 'static 'dma-tag :id (dma-tag-id next))
|
|
:vif0 (new 'static 'vif-tag :cmd (vif-cmd stmod))
|
|
)
|
|
:upload-color-ret (new 'static 'dma-packet
|
|
:dma (new 'static 'dma-tag :id (dma-tag-id ret))
|
|
:vif0 (new 'static 'vif-tag :cmd (vif-cmd stmod))
|
|
)
|
|
:generic-color-0 (new 'static 'dma-packet
|
|
:dma (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id ref))
|
|
:vif0 (new 'static 'vif-tag :imm #x3)
|
|
)
|
|
:generic-color-1 (new 'static 'dma-packet :dma (new 'static 'dma-tag :id (dma-tag-id ref)))
|
|
:generic-color-end (new 'static 'dma-packet :dma (new 'static 'dma-tag :id (dma-tag-id end)))
|
|
:refl-fade-fac -0.000625
|
|
:refl-fade-end 409600.0
|
|
)
|
|
)
|
|
|
|
(set! (-> *instance-tie-work* upload-color-2 vif1) (new 'static 'vif-tag :cmd (vif-cmd mscal) :msk #x1))
|
|
(set! (-> *instance-tie-work* upload-color-ret vif1) (new 'static 'vif-tag :cmd (vif-cmd mscal) :msk #x1))
|
|
|
|
;; helpful constants for the prototype drawing EE asm
|
|
(define *prototype-tie-work*
|
|
(new 'static 'prototype-tie-work
|
|
:upload-palette-0 (new 'static 'dma-packet
|
|
:dma (new 'static 'dma-tag :id (dma-tag-id cnt))
|
|
:vif0 (new 'static 'vif-tag :cmd (vif-cmd flusha) :msk #x1)
|
|
)
|
|
:upload-palette-1 (new 'static 'dma-packet
|
|
:dma (new 'static 'dma-tag :qwc #x20 :id (dma-tag-id cnt))
|
|
:vif0 (new 'static 'vif-tag :imm #x1 :cmd (vif-cmd stmod))
|
|
:vif1 (new 'static 'vif-tag :imm #x4346 :num #x80 :cmd (vif-cmd unpack-v4-8))
|
|
)
|
|
:upload-model-0 (new 'static 'dma-packet
|
|
:dma (new 'static 'dma-tag :id (dma-tag-id ref))
|
|
:vif0 (new 'static 'vif-tag :cmd (vif-cmd stmod))
|
|
:vif1 (new 'static 'vif-tag :cmd (vif-cmd unpack-v4-32))
|
|
)
|
|
:upload-model-1 (new 'static 'dma-packet
|
|
:dma (new 'static 'dma-tag :id (dma-tag-id ref))
|
|
:vif1 (new 'static 'vif-tag :imm #x4000 :cmd (vif-cmd unpack-v4-8))
|
|
)
|
|
:upload-model-2 (new 'static 'dma-packet
|
|
:dma (new 'static 'dma-tag :id (dma-tag-id ref))
|
|
:vif1 (new 'static 'vif-tag :imm #x32 :cmd (vif-cmd unpack-v4-16))
|
|
)
|
|
:upload-model-3 (new 'static 'dma-packet :dma (new 'static 'dma-tag :id (dma-tag-id call)))
|
|
:upload-model-near-0 (new 'static 'dma-packet
|
|
:dma (new 'static 'dma-tag :id (dma-tag-id ref))
|
|
:vif0 (new 'static 'vif-tag :cmd (vif-cmd stmod))
|
|
:vif1 (new 'static 'vif-tag :cmd (vif-cmd unpack-v4-32))
|
|
)
|
|
:upload-model-near-1 (new 'static 'dma-packet
|
|
:dma (new 'static 'dma-tag :id (dma-tag-id ref))
|
|
:vif1 (new 'static 'vif-tag :imm #x4000 :cmd (vif-cmd unpack-v4-8))
|
|
)
|
|
:upload-model-near-2 (new 'static 'dma-packet
|
|
:dma (new 'static 'dma-tag :id (dma-tag-id ref))
|
|
:vif1 (new 'static 'vif-tag :imm #x1e :cmd (vif-cmd unpack-v4-8))
|
|
)
|
|
:upload-model-near-3 (new 'static 'dma-packet
|
|
:dma (new 'static 'dma-tag :id (dma-tag-id ref))
|
|
:vif1 (new 'static 'vif-tag :imm #x32 :cmd (vif-cmd unpack-v4-16))
|
|
)
|
|
:upload-model-near-4 (new 'static 'dma-packet :dma (new 'static 'dma-tag :id (dma-tag-id call)))
|
|
:generic-envmap-shader (new 'static 'dma-packet
|
|
:dma (new 'static 'dma-tag :qwc #x5 :id (dma-tag-id ref))
|
|
:vif0 (new 'static 'vif-tag :imm #x1)
|
|
)
|
|
:generic-palette (new 'static 'dma-packet
|
|
:dma (new 'static 'dma-tag :qwc #x20 :id (dma-tag-id cnt))
|
|
:vif0 (new 'static 'vif-tag :imm #x1)
|
|
)
|
|
:generic-model-0 (new 'static 'dma-packet
|
|
:dma (new 'static 'dma-tag :id (dma-tag-id ref))
|
|
:vif0 (new 'static 'vif-tag :imm #x2)
|
|
)
|
|
:generic-model-1 (new 'static 'dma-packet :dma (new 'static 'dma-tag :id (dma-tag-id ref)))
|
|
:generic-model-2 (new 'static 'dma-packet :dma (new 'static 'dma-tag :id (dma-tag-id ref)))
|
|
:generic-model-next (new 'static 'dma-packet :dma (new 'static 'dma-tag :id (dma-tag-id next)))
|
|
:clamp #x8000ff00ff00ff
|
|
)
|
|
)
|
|
|
|
(set! (-> *prototype-tie-work* upload-model-1 vif0)
|
|
(new 'static 'vif-tag :imm #x4 :cmd (vif-cmd mscal) :msk #x1)
|
|
)
|
|
|
|
(set! (-> *prototype-tie-work* upload-model-3 vif0)
|
|
(new 'static 'vif-tag :imm #x6 :cmd (vif-cmd mscal) :msk #x1)
|
|
)
|
|
|
|
(set! (-> *prototype-tie-work* upload-model-near-1 vif0)
|
|
(new 'static 'vif-tag :imm #x4 :cmd (vif-cmd mscal) :msk #x1)
|
|
)
|
|
|
|
(set! (-> *prototype-tie-work* upload-model-near-4 vif0)
|
|
(new 'static 'vif-tag :imm #x6 :cmd (vif-cmd mscal) :msk #x1)
|
|
)
|
|
|
|
|
|
|
|
|