mirror of
https://github.com/open-goal/jak-project
synced 2026-08-17 21:43:27 -04:00
jak2 ref
This commit is contained in:
+9
-9
@@ -6,9 +6,9 @@
|
||||
;; WARN: Return type mismatch entity vs entity-actor.
|
||||
(defun entity-actor-lookup ((arg0 res-lump) (arg1 symbol) (arg2 int))
|
||||
"Given an entity (the res-lump), look up a reference to another entity and return that entity."
|
||||
(local-vars (sv-16 res-tag))
|
||||
(set! sv-16 (new 'static 'res-tag))
|
||||
(let ((v1-1 (res-lump-data arg0 arg1 pointer :tag-ptr (& sv-16))))
|
||||
(let* ((sv-16 (new 'static 'res-tag))
|
||||
(v1-1 (res-lump-data arg0 arg1 pointer :tag-ptr (& sv-16)))
|
||||
)
|
||||
(the-as
|
||||
entity-actor
|
||||
(when (and v1-1 (< arg2 (the-as int (-> sv-16 elt-count))))
|
||||
@@ -27,12 +27,12 @@
|
||||
(defun entity-actor-count ((arg0 res-lump) (arg1 symbol))
|
||||
"Get the number of entities that this res references under the name.
|
||||
This works on more than just next/prev."
|
||||
(local-vars (sv-16 res-tag))
|
||||
(set! sv-16 (new 'static 'res-tag))
|
||||
(if (res-lump-data arg0 arg1 pointer :tag-ptr (& sv-16))
|
||||
(the-as int (-> sv-16 elt-count))
|
||||
0
|
||||
)
|
||||
(let ((sv-16 (new 'static 'res-tag)))
|
||||
(if (res-lump-data arg0 arg1 pointer :tag-ptr (& sv-16))
|
||||
(the-as int (-> sv-16 elt-count))
|
||||
0
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition of type actor-link-info
|
||||
|
||||
+396
-447
File diff suppressed because it is too large
Load Diff
+30
-32
@@ -774,9 +774,8 @@
|
||||
;; definition for method 18 of type res-lump
|
||||
(defmethod add-32bit-data! ((this res-lump) (arg0 res-tag) (arg1 object))
|
||||
"Add a single 32-bit value using [[add-data!]]."
|
||||
(local-vars (sv-16 object))
|
||||
(set! sv-16 arg1)
|
||||
(let* ((v1-0 arg0)
|
||||
(let* ((sv-16 arg1)
|
||||
(v1-0 arg0)
|
||||
(a1-4 (copy-and-set-field v1-0 inlined? 1))
|
||||
)
|
||||
(add-data! this a1-4 (& sv-16))
|
||||
@@ -788,20 +787,19 @@
|
||||
(defmethod get-curve-data! ((this res-lump) (arg0 curve) (arg1 symbol) (arg2 symbol) (arg3 float))
|
||||
"Read curve data and write it to curve-target. Return #t if both
|
||||
control points and knots data was succesfully read, #f otherwise."
|
||||
(local-vars (sv-16 res-tag) (sv-32 res-tag))
|
||||
(let ((s5-0 #f))
|
||||
(set! sv-16 (new 'static 'res-tag))
|
||||
(let ((a0-2 ((method-of-object this get-property-data)
|
||||
this
|
||||
arg1
|
||||
'exact
|
||||
arg3
|
||||
(the-as pointer #f)
|
||||
(& sv-16)
|
||||
*res-static-buf*
|
||||
(let* ((sv-16 (new 'static 'res-tag))
|
||||
(a0-2 ((method-of-object this get-property-data)
|
||||
this
|
||||
arg1
|
||||
'exact
|
||||
arg3
|
||||
(the-as pointer #f)
|
||||
(& sv-16)
|
||||
*res-static-buf*
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(when a0-2
|
||||
(set! (-> arg0 cverts) (the-as (inline-array vector) a0-2))
|
||||
(set! (-> arg0 num-cverts) (the-as int (-> sv-16 elt-count)))
|
||||
@@ -814,18 +812,18 @@
|
||||
)
|
||||
(set! (-> arg0 num-cverts) 256)
|
||||
)
|
||||
(set! sv-32 (new 'static 'res-tag))
|
||||
(let ((a0-6 ((method-of-object this get-property-data)
|
||||
this
|
||||
arg2
|
||||
'exact
|
||||
arg3
|
||||
(the-as pointer #f)
|
||||
(& sv-32)
|
||||
*res-static-buf*
|
||||
(let* ((sv-32 (new 'static 'res-tag))
|
||||
(a0-6 ((method-of-object this get-property-data)
|
||||
this
|
||||
arg2
|
||||
'exact
|
||||
arg3
|
||||
(the-as pointer #f)
|
||||
(& sv-32)
|
||||
*res-static-buf*
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(when a0-6
|
||||
(set! (-> arg0 knots) (the-as (pointer float) a0-6))
|
||||
(set! (-> arg0 num-knots) (the-as int (-> sv-32 elt-count)))
|
||||
@@ -848,7 +846,6 @@
|
||||
;; WARN: Using new Jak 2 rtype-of
|
||||
;; WARN: Using new Jak 2 rtype-of
|
||||
(defmethod mem-usage ((this res-lump) (usage memory-usage-block) (flags int))
|
||||
(local-vars (sv-16 int))
|
||||
(let ((s3-0 48)
|
||||
(s2-0 "res")
|
||||
)
|
||||
@@ -908,12 +905,13 @@
|
||||
(+! (-> usage data s3-0 used) v1-68)
|
||||
(+! (-> usage data s3-0 total) (logand -16 (+ v1-68 15)))
|
||||
)
|
||||
(set! sv-16 0)
|
||||
(while (< sv-16 (-> (the-as array s0-0) length))
|
||||
(let ((a0-63 (-> (the-as (array object) s0-0) sv-16)))
|
||||
((method-of-type (rtype-of a0-63) mem-usage) a0-63 usage flags)
|
||||
(let ((sv-16 0))
|
||||
(while (< sv-16 (-> (the-as array s0-0) length))
|
||||
(let ((a0-63 (-> (the-as (array object) s0-0) sv-16)))
|
||||
((method-of-type (rtype-of a0-63) mem-usage) a0-63 usage flags)
|
||||
)
|
||||
(+! sv-16 1)
|
||||
)
|
||||
(set! sv-16 (+ sv-16 1))
|
||||
)
|
||||
)
|
||||
(else
|
||||
|
||||
Reference in New Issue
Block a user