Files
jak-project/goal_src/jak2/engine/gfx/texture/texture-upload.gc
T
water111 4eea31c3e9 [jak 2] texture (#1866)
- Decompile and patch `texture.gc` for PC
- Improve decompiler when offset doesn't fit in immediate (for types
larger than 8k and some scratchpad accesses)
- Fix symbol->string issues in both jak 1 and 2
- Fix bug with VIF interrupt used to profile VU code (hooked up to
OpenGLRenderer BucketRenderers in PC port)
- Support `~o` in `format`.
- Uncomment stuff in `merc.gc` that now works!

![image](https://user-images.githubusercontent.com/48171810/189505469-941b4a3e-23c7-4740-aa1b-2e461ed19fa9.png)

fixes https://github.com/open-goal/jak-project/issues/1850
2022-09-11 14:17:55 -04:00

32 lines
1.0 KiB
Common Lisp

;;-*-Lisp-*-
(in-package goal)
;; name: texture-upload.gc
;; name in dgo: texture-upload
;; dgos: ART, GAME
;; this file is loaded immediately before boot textures are loaded.
;; DECOMP BEGINS
(define *generic-envmap-texture* (lookup-texture-by-id (new 'static 'texture-id :index #x2 :page #x1f)))
(define *default-envmap-shader* (new 'global 'adgif-shader))
(let ((gp-0 *default-envmap-shader*))
(let ((a1-1 *generic-envmap-texture*))
(adgif-shader<-texture! gp-0 a1-1)
)
(set! (-> gp-0 tex1) (new 'static 'gs-tex1 :mmag #x1 :mmin #x1))
(set! (-> gp-0 clamp) (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp)))
(set! (-> gp-0 alpha) (new 'static 'gs-alpha :b #x2 :c #x1 :d #x1))
(set! (-> gp-0 prims 1) (gs-reg64 tex0-1))
(set! (-> gp-0 prims 3) (gs-reg64 tex1-1))
(set! (-> gp-0 prims 5) (gs-reg64 miptbp1-1))
(set! (-> gp-0 clamp-reg) (gs-reg64 clamp-1))
(set! (-> gp-0 prims 9) (gs-reg64 alpha-1))
)
(set! (-> *texture-pool* allocate-func) texture-page-common-boot-allocate)
(kmemopen global "tpages")