Files
jak-project/goal_src/jak3/engine/ui/bigmap-h.gc
T
Hat Kid 7053090541 jak3: decomp bigmap, blit-displays, fix progress crash (#3657)
`bigmap` and `blit-displays` mostly work. `blit-displays` is still
missing all of the special effects that were added in Jak 3 (brightness
and contrast settings, screen blur effect, etc.).

`bigmap` is missing the player marker texture (`hud-target-marker`) for
some reason, it's part of `tpage-17` which is coming from
`progress-minimap` and should already be included. The icons also
currently stretch when using aspect ratios other than 4:3.

The progress menu now also works for the most part. The draw order is a
bit messed up because some code was initially drawing things with the
ocean bucket, which was changed to use `hud-draw-hud-alpha` instead for
now. The texture for the volume and brightness/contrast sliders still
looks wrong.

Fixes #3653
Fixes #3656
2024-09-07 14:18:30 +02:00

122 lines
2.8 KiB
Common Lisp

;;-*-Lisp-*-
(in-package goal)
;; name: bigmap-h.gc
;; name in dgo: bigmap-h
;; dgos: GAME
;; +++bigmap-flag
(defenum bigmap-flag
:type uint32
:bitfield #t
(bf00 0)
(bf01 1)
(bf02 2)
(bf03 3)
(bf04 4)
(bf05 5)
(bf06 6)
(bf07 7)
(bf08 8)
(bf09 9)
(bf10 10)
(bf11 11)
(bf12 12)
(bf13 13)
(bf14 14)
(bf15 15)
(bf16 16)
(bf17 17)
(ctywide 18)
(waswide 19)
(wasall 20)
(desert 21)
(bf22 22)
(bf23 23)
(bf24 24)
(bf25 25)
(bf26 26)
(bf27 27)
(bf28 28)
(bf29 29)
(bf30 30)
(bf31 31)
)
;; ---bigmap-flag
;; DECOMP BEGINS
(deftype bigmap-image (structure)
((clut-offset uint32)
(image-offset uint32)
(width uint32)
(height uint32)
(data uint8 1)
)
)
(deftype bigmap-info (vector)
((scale float :overlay-at (-> data 2))
(inv-scale float :overlay-at (-> data 3))
)
)
(deftype bigmap-info-array (structure)
((data bigmap-info 24 :inline)
)
)
(deftype bigmap (basic)
((drawing-flag symbol)
(loading-flag symbol)
(bigmap-index bigmap-id)
(bigmap-image external-art-buffer)
(tpage external-art-buffer)
(tpage2 external-art-buffer)
(progress-minimap texture-page)
(progress-minimap2 texture-page)
(load-index bigmap-id)
(x0 int32)
(y0 int32)
(x1 int32)
(y1 int32)
(goal-time float)
(sprite-tmpl dma-gif-packet :inline)
(draw-tmpl dma-gif-packet :inline)
(adgif-tmpl dma-gif-packet :inline)
(offset vector :inline)
(size float :overlay-at (-> offset data 2))
(scale float :overlay-at (-> offset data 3))
(scroll vector :inline)
(pos vector4w :inline)
(color vector4w :inline)
(corner vector 4 :inline)
(auto-save-icon-flag symbol)
(global-flags bigmap-flag)
)
(:methods
(new (symbol type) _type_)
(initialize (_type_) none)
(update (_type_) none)
(loaded? (_type_) symbol)
(draw! (_type_ int int int int) none)
(handle-cpad-input (_type_) none)
(enable-drawing (_type_) none)
(disable-drawing (_type_) int)
(set-map-indices! (_type_) none)
(set-pos! (_type_ vector) none)
(bigmap-method-18 (_type_ (pointer int32)) none)
(texture-upload-dma (_type_ dma-buffer (pointer uint32) int int int gs-psm) none)
(bigmap-method-20 (_type_ dma-buffer) symbol)
(sprite-dma (_type_ dma-buffer int int int int int int) object)
(draw-from-minimap (_type_ dma-buffer connection-minimap) none)
)
)
;; DECOMP ENDS
(define-extern *bigmap* bigmap)