Files
jak-project/test/decompiler/reference/jak2/engine/entity/res-h_REF.gc
T
water111 f7bd0752f8 [decomp] Decompile first batch of files in engine (#1787)
* wip

* getting stuff set up so we can actually run test cases

* better handle block entry stuff

* types2 working on gstring

* comments

* math ref working

* up to first stack stuff

* stack fixes

* bounding box

* math stuff is working

* float fixes

* temp debug for (method 9 profile-array)

* stupid stupid bug

* debugging

* everything is broken

* some amount of type stuff works

* bitfield

* texture bitfields not working

* temp

* types

* more stuff

* type check

* temp

* float related fixes for light and res problems

* revisit broken files, fix bugs

* more types

* vector debug

* bug fixes for decompiler crashes in harder functions

* update goal_src
2022-08-24 00:29:51 -04:00

73 lines
2.8 KiB
Common Lisp
Vendored
Generated

;;-*-Lisp-*-
(in-package goal)
;; definition of type res-tag
(deftype res-tag (uint128)
((name symbol :offset 0 :size 32)
(key-frame float :offset 32 :size 32)
(elt-type type :offset 64 :size 32)
(data-offset uint16 :offset 96 :size 16)
(elt-count uint32 :offset 112 :size 15)
(inlined? uint8 :offset 127 :size 1)
)
:method-count-assert 9
:size-assert #x10
:flag-assert #x900000010
)
;; definition of type res-lump
(deftype res-lump (basic)
((length int32 :offset-assert 4)
(allocated-length int32 :offset-assert 8)
(data-base pointer :offset-assert 12)
(data-top pointer :offset-assert 16)
(data-size int32 :offset-assert 20)
(extra entity-links :offset-assert 24)
(tag (pointer res-tag) :offset-assert 28)
)
:method-count-assert 22
:size-assert #x20
:flag-assert #x1600000020
(:methods
(new (symbol type int int) _type_ 0)
(get-property-data (_type_ symbol symbol float pointer (pointer res-tag) pointer) pointer :no-virtual 9)
(get-property-struct (_type_ symbol symbol float structure (pointer res-tag) pointer) structure :no-virtual 10)
(get-property-value (_type_ symbol symbol float uint128 (pointer res-tag) pointer) uint128 :no-virtual 11)
(get-property-value-float (_type_ symbol symbol float float (pointer res-tag) pointer) float :no-virtual 12)
(get-tag-index-data (_type_ int) pointer 13)
(get-tag-data (_type_ res-tag) pointer 14)
(allocate-data-memory-for-tag! (_type_ res-tag) res-tag 15)
(sort! (_type_) _type_ 16)
(add-data! (_type_ res-tag pointer) res-lump 17)
(add-32bit-data! (_type_ res-tag object) res-lump 18)
(lookup-tag-idx (_type_ symbol symbol float) res-tag-pair :no-virtual 19)
(make-property-data (_type_ float res-tag-pair pointer) pointer 20)
(get-curve-data! (_type_ curve symbol symbol float) symbol 21)
)
)
;; definition for method 3 of type res-lump
;; INFO: this function exists in multiple non-identical object files
(defmethod inspect res-lump ((obj res-lump))
(when (not obj)
(set! obj obj)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" obj (-> obj type))
(format #t "~1Tlength: ~D~%" (-> obj length))
(format #t "~1Tallocated-length: ~D~%" (-> obj allocated-length))
(format #t "~1Tdata-base: #x~X~%" (-> obj data-base))
(format #t "~1Tdata-top: #x~X~%" (-> obj data-top))
(format #t "~1Tdata-size: ~D~%" (-> obj data-size))
(format #t "~1Textra: ~A~%" (-> obj extra))
(format #t "~1Ttag: #x~X~%" (-> obj tag))
(label cfg-4)
obj
)
;; definition for symbol *res-key-string*, type string
(define *res-key-string* (new 'global 'string 64 (the-as string #f)))
;; failed to figure out what this is:
0