mirror of
https://github.com/open-goal/jak-project
synced 2026-09-07 19:40:48 -04:00
[decompiler] Make addition nicer (#733)
* temp * update refs * update reference * fix tests
This commit is contained in:
@@ -44,9 +44,7 @@
|
||||
(tag-start pointer)
|
||||
(tag-end (pointer dma-tag))
|
||||
)
|
||||
(let
|
||||
((bucket (the-as dma-bucket (+ (the-as uint base) (the-as uint (* idx 16)))))
|
||||
)
|
||||
(let ((bucket (the-as dma-bucket (+ (the-as uint base) (* idx 16)))))
|
||||
(set! (-> (the-as dma-bucket (-> bucket last)) next) (the-as uint tag-start))
|
||||
(set! (-> bucket last) tag-end)
|
||||
)
|
||||
|
||||
@@ -94,11 +94,7 @@
|
||||
(defmethod new dma-buffer ((allocation symbol) (type-to-make type) (arg0 int))
|
||||
(let
|
||||
((v0-0
|
||||
(object-new
|
||||
allocation
|
||||
type-to-make
|
||||
(+ (+ arg0 -4) (the-as int (-> type-to-make size)))
|
||||
)
|
||||
(object-new allocation type-to-make (+ arg0 -4 (-> type-to-make size)))
|
||||
)
|
||||
)
|
||||
(set! (-> v0-0 base) (-> v0-0 data))
|
||||
@@ -121,7 +117,7 @@
|
||||
|
||||
;; definition for method 5 of type dma-buffer
|
||||
(defmethod asize-of dma-buffer ((obj dma-buffer))
|
||||
(+ (+ (-> obj allocated-length) -4) (the-as int (-> dma-buffer size)))
|
||||
(+ (-> obj allocated-length) -4 (-> dma-buffer size))
|
||||
)
|
||||
|
||||
;; definition for function dma-buffer-length
|
||||
|
||||
@@ -715,7 +715,7 @@
|
||||
)
|
||||
)
|
||||
(disasm-vif-tag
|
||||
(the-as (pointer vif-tag) (+ addr (the-as uint v0-10)))
|
||||
(the-as (pointer vif-tag) (+ addr v0-10))
|
||||
(the-as int (- (* qwc 4) (the-as uint (/ v0-10 4))))
|
||||
stream-2
|
||||
(= mode-2 'details)
|
||||
@@ -743,10 +743,7 @@
|
||||
)
|
||||
(set!
|
||||
data-2
|
||||
(the-as
|
||||
dma-packet
|
||||
(+ (the-as uint data-2) (the-as uint (* (+ qwc 1) 16)))
|
||||
)
|
||||
(the-as dma-packet (+ (the-as uint data-2) (* (+ qwc 1) 16)))
|
||||
)
|
||||
data-2
|
||||
)
|
||||
|
||||
@@ -291,7 +291,7 @@
|
||||
(defun dump-vu1-range ((start uint) (total-count uint))
|
||||
(let ((s4-0 (the-as (pointer uint32) #x1100c000)))
|
||||
(dotimes (s3-0 (the-as int total-count))
|
||||
(let ((s2-0 (+ s3-0 (the-as int start))))
|
||||
(let ((s2-0 (+ s3-0 start)))
|
||||
(format
|
||||
0
|
||||
"~4,'0X: ~8x ~8x ~8x ~8x"
|
||||
|
||||
Reference in New Issue
Block a user