d/jak2: some work in memory-usage | nav-graph-h and finish pov-camera and aligner (#1901)

This commit is contained in:
Tyler Wilding
2022-09-24 14:47:03 -04:00
committed by GitHub
parent 80cefb9575
commit 123e7fd87b
35 changed files with 1670 additions and 292 deletions
+163 -94
View File
@@ -1582,7 +1582,9 @@
(global-y-angle-to-point (_type_ vector) float 23)
(relative-y-angle-to-point (_type_ vector) float 24)
(roll-relative-to-gravity (_type_) float 25)
(set-and-limit-velocity (_type_ int vector float) trsqv 26)
(set-and-limit-velocity
"TODO - arg1 is an bitfield of some sort"
(_type_ int vector float) trsqv :behavior process 26)
(get-quaternion (_type_) quaternion 27)
)
)
@@ -1766,8 +1768,8 @@
(define-extern *cos-poly-vec* vector)
(define-extern vector-cos-rad! (function vector vector vector))
(define-extern vector-sincos-rad! (function vector vector vector int))
(define-extern sincos-rad! (function (pointer float) float int))
(define-extern sincos! (function (pointer float) float int))
(define-extern sincos-rad! (function vector float int))
(define-extern sincos! (function vector float int))
(define-extern vector-rad<-vector-deg! (function vector vector none))
(define-extern vector-rad<-vector-deg/2! (function vector vector int))
(define-extern vector-sincos! (function vector vector vector int))
@@ -3684,10 +3686,10 @@
:flag-assert #x900000008
)
;; the GS's DISPLAY registers make settings for the display position on the screen regarding
;; information on Rectangular Area Read Output Circuit n for the PCRTC.
;; write-only
(deftype gs-display (uint64)
"the GS's DISPLAY registers make settings for the display position on the screen regarding
information on Rectangular Area Read Output Circuit n for the PCRTC.
write-only"
((dx uint16 :offset 0 :size 12)
(dy uint16 :offset 12 :size 11)
(magh uint8 :offset 23 :size 4)
@@ -3698,9 +3700,9 @@
:flag-assert #x900000008
)
;; the GS's BGCOLOR register sets the background color of the PCRTC with RGB value.
;; write-only
(deftype gs-bgcolor (uint64)
"the GS's BGCOLOR register sets the background color of the PCRTC with RGB value.
write-only"
((r uint8 :offset 0)
(g uint8 :offset 8)
(b uint8 :offset 16)
@@ -3708,11 +3710,12 @@
:flag-assert #x900000008
)
;; the GS's CSR register sets and obtains various GS statuses.
;; read-write. the fields have different effects depending on whether they're being read from
;; or written to.
;; bits 5 and 6 (0x20 and 0x40) should be zero
(deftype gs-csr (uint64)
"the GS's CSR register sets and obtains various GS statuses.
read-write. the fields have different effects depending on whether they're being read from
or written to.
bits 5 and 6 (0x20 and 0x40) should be zero"
((signal uint8 :offset 0 :size 1)
(finish uint8 :offset 1 :size 1)
(hsint uint8 :offset 2 :size 1)
@@ -5924,7 +5927,14 @@
(level-method-11 () none 11) ;; (add-irq-to-tex-buckets! (_type_) none 11)
(unload! (_type_) _type_ 12)
(bsp-name (_type_) symbol 13)
(compute-memory-usage (_type_ object) memory-usage-block 14)
(compute-memory-usage!
"Calculates the memory usage of the level, returns and stores the [[memory-usage-block]]
in `mem-usage-block` as well as the total size in `mem-usage`
@param force? - Will re-compute the usage if set to [[#t]], even if `mem-usage` has been set to a non-zero value
@returns The [[memory-usage-block]] representing the footprint of the level
@see [[memory-usage-block::10]]"
(_type_ symbol) memory-usage-block 14)
(inside-boxes-check (_type_ vector) symbol 15)
(level-method-16 () none 16) ;; (update-vis! (_type_ level-vis-info uint uint) symbol 16)
(load-continue (_type_) _type_ 17)
@@ -7545,9 +7555,13 @@
:size-assert #x710
:flag-assert #xc00000710
(:methods
(reset! (_type_) _type_ 9)
(memory-usage-block-method-10 () none 10) ;; (calculate-total (_type_) int 10)
(print-mem-usage (_type_ level object) none 11)
(reset!
"Sets `length` to 0 as well as resets all fields except `name` in the associated [[memory-usage-info]]"
(_type_) _type_ 9)
(calculate-total
"@returns The total sum of all [[memory-usage-info]] `total`s"
(_type_) int 10)
(print-mem-usage (_type_ level object) _type_ 11)
)
)
@@ -13714,11 +13728,21 @@
:flag-assert #xe00000134
(:methods
(new (symbol type process) _type_ 0)
(align-control-method-9 () none 9) ;; (compute-alignment! (_type_) transformq 9)
(align-control-method-10 () none 10) ;; (align! (_type_ align-opts float float float) trsqv 10)
(align-control-method-11 () none 11) ;; (align-vel-and-quat-only! (_type_ align-opts vector int float float) trsqv 11)
(align-control-method-12 () none 12) ;; (first-transform (_type_) transform 12)
(align-control-method-13 () none 13) ;; (snd-transform (_type_) transform 13)
(compute-alignment! (_type_) transformq 9)
(align!
"As long as [[align-flags::0]] is not set call [[process-drawable::16]] on the process being controlled
using the arguments passed to construct a [[vector]] - <`x`, `y`, `z`, 1.0>
@returns the `root` of the [[process-drawable]] after the method returns
@see [[process-drawable::16]]"
(_type_ align-opts float float float) trsqv 10)
(align-vel-and-quat-only! (_type_ align-opts vector int float float) trsqv :behavior process 11)
(first-transform
"@returns The first of the two [[transforms]] held by the object"
(_type_) transform 12)
(second-transform
"@returns The second of the two [[transforms]] held by the object"
(_type_) transform 13)
)
)
@@ -13840,7 +13864,7 @@
(:methods
(initialize-skeleton (_type_ skeleton-group pair) none 14)
(initialize-skeleton-by-name (_type_ string object) draw-control 15)
(process-drawable-method-16 () none 16) ;; (apply-alignment (_type_ align-opts transformq vector) collide-shape 16)
(apply-alignment (_type_ align-opts transformq vector) object 16)
(process-drawable-method-17 () none 17) ;; (do-joint-math! (_type_) none 17)
(process-drawable-method-18 () none 18) ;; (cleanup-for-death (_type_) none 18)
(process-drawable-method-19 () none 19) ;; (evaluate-joint-control (_type_) none 19)
@@ -14437,7 +14461,7 @@
(deftype pov-camera (process-drawable)
((flags pov-camera-flag :offset-assert 200) ;; pov-camera-flag
(debounce-start-time time-frame :offset-assert 208) ;; time-frame
(notify-handle uint64 :offset-assert 216) ;; handle
(notify-handle handle :offset-assert 216) ;; handle
(anim-name string :offset-assert 224) ;; guessed by decompiler
(command-list pair :offset-assert 228) ;; guessed by decompiler
(mask-to-clear process-mask :offset-assert 232) ;; guessed by decompiler
@@ -14448,16 +14472,16 @@
:size-assert #xf4
:flag-assert #x1e008000f4
(:methods
(pov-camera-method-20 () none 20) ;; (pov-camera-abort () _type_ :state 20)
(pov-camera-method-21 () none 21) ;; (pov-camera-done-playing () _type_ :state 21)
(pov-camera-method-22 () none 22) ;; (pov-camera-playing () _type_ :state 22)
(pov-camera-method-23 () none 23) ;; (pov-camera-start-playing () _type_ :state 23)
(pov-camera-method-24 () none 24) ;; (pov-camera-startup () _type_ :state 24)
(pov-camera-method-25 () none 25) ;; (check-for-abort (_type_) symbol 25)
(pov-camera-method-26 () none 26) ;; (target-grabbed? (_type_) symbol 26)
(pov-camera-abort () _type_ :state 20) ;; (pov-camera-abort () _type_ :state 20)
(pov-camera-done-playing () _type_ :state 21) ;; (pov-camera-done-playing () _type_ :state 21)
(pov-camera-playing () _type_ :state 22) ;; (pov-camera-playing () _type_ :state 22)
(pov-camera-start-playing () _type_ :state 23) ;; (pov-camera-start-playing () _type_ :state 23)
(pov-camera-startup () _type_ :state 24) ;; (pov-camera-startup () _type_ :state 24)
(abort? (_type_) symbol :behavior pov-camera 25)
(target-grabbed? (_type_) symbol 26)
(pov-camera-method-27 () none 27) ;; (pre-startup-callback (_type_) none 27)
(pov-camera-method-28 () none 28) ;; (target-released? () symbol 28)
(pov-camera-method-29 () none 29) ;; (set-stack-size! (_type_) none 29)
(target-released? (_type_) symbol 29) ;; (set-stack-size! (_type_) none 29)
)
)
@@ -23751,8 +23775,6 @@
;; settings ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(define-extern set-aspect-ratio (function symbol none))
(define-extern set-video-mode (function symbol none))
(define-extern scf-get-volume "Defined in the kernel" (function int))
(define-extern scf-get-language "Defined in the kernel" (function language-enum))
(define-extern scf-get-aspect "Defined in the kernel" (function uint))
@@ -26362,10 +26384,10 @@
;; (define-extern part-tracker-move-to-target function) ;; (function part-tracker vector)
;; (define-extern part-tracker-track-target function) ;; (function part-tracker vector)
(define-extern lightning-tracker-init (function lightning-spec time-frame symbol process-drawable vector vector none))
;; (define-extern process-grab? function) ;; (function process symbol :behavior camera-tracker)
;; (define-extern process-release? function) ;; (function process symbol :behavior process)
(define-extern process-grab? (function process symbol symbol :behavior process))
(define-extern process-release? (function process symbol :behavior process))
;; (define-extern camera-look-at function) ;; (function pair uint process :behavior camera-tracker)
;; (define-extern ja-anim-done? function) ;; (function process symbol)
(define-extern ja-anim-done? (function process symbol)) ;;
;; (define-extern camera-pov-from function) ;; (function pair uint process :behavior camera-tracker)
;; (define-extern cam-launcher-joystick function) ;; (function vector :behavior camera-slave)
;; (define-extern cam-launcher-shortfall state) ;; (state camera-slave)
@@ -28110,14 +28132,32 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(define-extern *video-mode* int)
;; (define-extern set-video-mode function) ;; (function symbol none)
(define-extern get-video-mode (function symbol))
(define-extern set-aspect-ratio (function symbol none))
(define-extern get-aspect-ratio (function symbol))
(define-extern set-progressive-scan (function symbol none))
(define-extern get-progressive-scan (function symbol))
(define-extern set-video-mode
"Set related settings to the video mode in the settings, [[*video-params*]] and the [[*video-mode*]]
`ntsc` has a [[*video-mode*]] value of `0`, where as `pal` has a value of `1`
Will also set a bunch of common settings related to profiling and the camera to finalize the switch
@param tv-format Recognizes `ntsc` and `pal`"
(function symbol none))
(define-extern get-video-mode
"@returns the current video mode, for example `ntsc` or `pal`"
(function symbol))
(define-extern set-aspect-ratio
"Set [[*video-params*]] aspect-ratio related settings based on the mode provided.
@param aspect Recognizes `aspect4x3` and `aspect16x9`"
(function symbol none))
(define-extern get-aspect-ratio
"@returns The current aspect ratio mode setting" (function symbol))
(define-extern set-progressive-scan
"Flip the progressive scan setting flag depending on the value provided
@param val The value to set the progressive scan flag to"
(function symbol none))
(define-extern get-progressive-scan
"@returns If using progressive scan is currently set in the settings"
(function symbol))
(define-extern *smode2* int)
(define-extern set-graphics-mode (function none))
(define-extern set-graphics-mode "TODO" (function none))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; main ;;
@@ -28204,24 +28244,13 @@
;; memory-usage ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
#|
(deftype memory-usage-block (basic)
()
:method-count-assert 12
:size-assert #x710
:flag-assert #xc00000710
;; Failed to read fields.
(:methods
(memory-usage-block-method-9 () none 9) ;; (reset! (_type_) _type_ 9)
(memory-usage-block-method-10 () none 10) ;; (calculate-total (_type_) int 10)
(memory-usage-block-method-11 () none 11) ;; (print-mem-usage (_type_ level object) none 11)
)
)
|#
(define-extern mem-size (function basic symbol int int))
;; (define-extern *max-dma* object) ;; int
(define-extern mem-size
"@param data The [[basic]] to call `mem-usage` on
@param inspect-usage? Set to [[#t]] if `inspect` should be called on the resulting [[memory-usage-block]]
@param arg2 TODO - unsure, some sort of bitfield
@returns The total memory footprint of the provided [[basic]]"
(function basic symbol int int))
(define-extern *max-dma* int)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; entity ;;
@@ -28803,11 +28832,11 @@
;; pov-camera ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; (define-extern pov-camera-play-and-reposition function) ;; (function art-joint-anim vector float none :behavior pov-camera)
;; (define-extern pov-camera-init-by-other function) ;; (function vector skeleton-group string pov-camera-flag process-drawable pair none :behavior pov-camera)
;; (define-extern othercam-calc function) ;; (function float none)
;; (define-extern othercam-running state) ;; (state othercam)
;; (define-extern othercam-init-by-other function) ;; (function process-taskable symbol symbol symbol none :behavior othercam)
(define-extern pov-camera-play-and-reposition (function art-joint-anim vector float none :behavior pov-camera))
(define-extern pov-camera-init-by-other (function vector skeleton-group string pov-camera-flag process-drawable pair none :behavior pov-camera)) ;;
(define-extern othercam-calc (function float float)) ;;
(define-extern othercam-running (state othercam))
(define-extern othercam-init-by-other (function pov-camera int symbol symbol none :behavior othercam)) ;; (function process-taskable symbol symbol symbol none :behavior othercam)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; powerups ;;
@@ -28920,8 +28949,8 @@
;; (define-extern hud-init-by-other function) ;; (function int none :behavior hud)
;; (define-extern hide-hud function) ;; (function none)
;; (define-extern enable-hud function) ;; (function none)
;; (define-extern hide-hud-quick function) ;; (function none)
(define-extern show-hud (function object none)) ;;
(define-extern hide-hud-quick (function symbol none))
(define-extern show-hud (function object none))
;; (define-extern hud-hidden? function) ;; (function symbol)
;; (define-extern set-hud-piece-position! function)
;; (define-extern set-as-offset-from! function)
@@ -47489,12 +47518,12 @@
;; nav-graph-h ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
#|
(declare-type nav-node structure)
(deftype nav-branch (structure)
((node UNKNOWN 2 :offset-assert 0)
(src-node basic :offset-assert 0)
(dest-node basic :offset-assert 4)
(temp-dest-node-id int32 :offset-assert 4)
((node nav-node 2 :offset-assert 0)
(src-node nav-node :offset 0)
(dest-node nav-node :offset 4)
(temp-dest-node-id int32 :offset 4)
(speed-limit uint8 :offset-assert 8)
(density uint8 :offset-assert 9)
(clock-type uint8 :offset-assert 10)
@@ -47510,11 +47539,20 @@
(:methods
(nav-branch-method-9 () none 9)
(nav-branch-method-10 () none 10)
(nav-branch-method-11 () none 11)
(nav-branch-method-12 () none 12)
(nav-branch-method-13 () none 13)
(nav-branch-method-14 () none 14)
(nav-branch-method-15 () none 15)
(nav-branch-method-11
"TODO
@returns `density * 0.0078125` - is this some kind of trick?"
(_type_) float 11)
(nav-branch-method-12
"TODO
@returns `speed-limit * 1024.0`"
(_type_) float 12)
(nav-branch-method-13
"TODO
@returns `width * 256.0`"
(_type_) float 13)
(user-limit-reached? (_type_) symbol 14)
(nav-branch-method-15 "TODO - checks that `dest-node`'s `id` isn't #FFFF" (_type_) symbol 15)
(nav-branch-method-16 () none 16)
(nav-branch-method-17 () none 17)
(nav-branch-method-18 () none 18)
@@ -47522,15 +47560,37 @@
(nav-branch-method-20 () none 20)
)
)
|#
#|
(defenum nav-node-flag-byte
"The same as [[nav-node-flag]] but more compact"
:type uint8
:bitfield #t
(visited 0)
(blocked 1)
(pedestrian 2)
(selected 3)
(hidden 4))
(deftype nav-node (structure)
()
(
(data uint32 8 :offset-assert 0 :score -999)
(position vector :inline :offset 0)
(pos-x float :offset 0)
(pos-y float :offset 4)
(pos-z float :offset 8)
(angle uint16 :offset 12)
(id uint16 :offset 14)
(radius uint8 :offset 16)
(branch-count int8 :offset 17)
(flags nav-node-flag-byte :offset 18)
(pad0 int8 1 :offset 19)
(branch-array uint32 :offset 20)
(nav-mesh-id uint32 :offset 24)
(level level :offset 28)
)
:method-count-assert 22
:size-assert #x20
:flag-assert #x1600000020
;; Failed to read fields.
(:methods
(nav-node-method-9 () none 9)
(nav-node-method-10 () none 10)
@@ -47541,15 +47601,23 @@
(nav-node-method-15 () none 15)
(nav-node-method-16 () none 16)
(nav-node-method-17 () none 17)
(nav-node-method-18 () none 18)
(nav-node-method-19 () none 19)
(nav-node-method-20 () none 20)
(nav-node-method-21 () none 21)
(get-position
"@param! ret The [[vector]] that is modified to hold the result
@returns the `position` [[vector]] with a `w` component of `1.0`"
(_type_ vector) vector 18)
(calc-sine-and-cosine!
"Computes the sine and cosine of the `angle`.
@param! ret The result <cosine, 0.0, -(sine), 1.0>
@returns Nothing, the result will be in `ret`"
(_type_ vector) vector 19)
(get-angle (_type_) float 20)
(nav-node-method-21
"TODO
@returns `radius * 1024.0"
(_type_) float 21)
)
)
|#
#|
(deftype nav-graph-link (structure)
((id uint32 :offset-assert 0)
(dest-graph-id uint32 :offset-assert 4)
@@ -47562,13 +47630,11 @@
:size-assert #x30
:flag-assert #x900000030
)
|#
#|
(deftype nav-graph (basic)
((node-count int16 :offset-assert 4)
(branch-count int16 :offset-assert 6)
(node-array uint32 :offset-assert 8)
(node-array (inline-array nav-node) :offset-assert 8)
(branch-array uint32 :offset-assert 12)
(link-count int16 :offset-assert 16)
(pad2 uint16 :offset-assert 18)
@@ -47577,7 +47643,7 @@
(pad0 uint16 :offset-assert 26)
(patched basic :offset-assert 28)
(id uint32 :offset-assert 32)
(pad1 UNKNOWN 6 :offset-assert 36)
(pad1 uint32 6 :offset-assert 36)
)
:method-count-assert 45
:size-assert #x3c
@@ -47615,13 +47681,16 @@
(nav-graph-method-38 () none 38)
(nav-graph-method-39 () none 39)
(nav-graph-method-40 () none 40)
(nav-graph-method-41 () none 41)
(node-at-idx
"Get the `nav-node` at a given position.
@param idx The position in the `node-array` to return
@returns the [[nav-node]] if it can be found, otherwise return [[#f]]"
(_type_ int) nav-node 41)
(nav-graph-method-42 () none 42)
(nav-graph-method-43 () none 43)
(nav-graph-method-44 () none 44)
)
)
|#
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -331,5 +331,15 @@
[11, "(function process none)"],
[59, "(function process none)"],
[56, "(function process-drawable none)"]
],
"memory-usage": [
// [2, "(function process symbol)"], // TODO - crash / assertion hit
[3, "(function basic symbol)"]
],
"pov-camera": [
[
7,
"(function process int symbol event-message-block object :behavior pov-camera)"
]
]
}
+15 -2
View File
@@ -222,7 +222,8 @@
"(method 12 level)",
"bg",
"update-sound-banks",
"entity-remap-names"
"entity-remap-names",
"(method 8 process-tree)"
],
// If format is used with the wrong number of arguments,
@@ -234,7 +235,19 @@
"~338h~5d~388h~5d~448h~5,,2f": 3,
"~30Htf: ~8D~134Hpr: ~8D~252Hsh: ~8D~370Hhd: ~8D~%": 4,
"~30Hal: ~8D~131Hwa: ~8D~252Hsp: ~8D~370Hwp: ~8D~%": 4,
"ERROR: <asg> ~A in spool anim loop for ~A ~D, but not loaded.~": 3
"ERROR: <asg> ~A in spool anim loop for ~A ~D, but not loaded.~": 3,
// TODO - these should be automatic
" tfrag ~192H~5DK ~280Htfragment~456H~5DK~%": 2,
" tie-proto ~192H~5DK ~280Hsky~456H~5DK~%": 2,
" tie-instance ~192H~5DK ~280Htie-fragment~456H~5DK~%": 2,
" shrub-proto ~192H~5DK ~280Htie-scissor~456H~5DK~%": 2,
" shrub-instance ~192H~5DK ~280Hshrubbery~456H~5DK~%": 2,
" collision ~192H~5DK ~280Htie-generic~456H~5DK~%": 2,
" pris-anim ~192H~5DK ~280Hpris-generic~456H~5DK~%": 2,
" textures ~192H~5DK ~280Htextures~456H~5DK~%": 2,
" misc ~192H~5DK ~280Hsprite~456H~5DK~%": 2,
" entity ~192H~5DK~%": 1,
" pris-geo ~192H~5DK ~280Hpris-fragment~456H~5DK~%": 2
},
"blocks_ending_in_asm_branch": {
@@ -781,7 +781,5 @@
"(method 26 level-group)": [
[64, "vector"],
[80, "vector"]
],
// placeholder
"placeholder-do-not-add-below": []
]
}
+18 -8
View File
@@ -2309,12 +2309,6 @@
[123, "a1", "drawable-tree-instance-shrub"],
[[129, 133], "a2", "(inline-array prototype-bucket-shrub)"]
],
"(method 10 bsp-header)": [
[43, "a1", "terrain-context"],
[31, "a0", "terrain-context"]
],
"history-draw": [
[151, "a0", "uint"],
["_stack_", 24, "pat-surface"]
@@ -2398,6 +2392,22 @@
[[61, 66], "v1", "dma-packet"],
[69, "v1", "(pointer int32)"]
],
// placeholder
"placeholder-do-not-add-below": []
"(method 8 process-tree)": [
[31, "v1", "symbol"],
[6, "a3", "symbol"]
],
"(method 11 memory-usage-block)": [[43, "a0", "int"]],
"process-release?": [[9, "gp", "process-focusable"]],
"(code pov-camera-start-playing pov-camera)": [[21, "v0", "joint"]],
"(anon-function 7 pov-camera)": [
[9, "v1", "float"],
[16, "v1", "float"]
],
"(event othercam-running)": [
[17, "v1", "process-drawable"],
[24, "v0", "joint"],
[41, "a0", "process"]
],
"(enter othercam-running)": [[[50, 60], "gp", "process-drawable"]],
"(code othercam-running)": [[[2, 65], "s2", "process-drawable"]]
}
+68
View File
@@ -1223,5 +1223,73 @@
},
"(method 23 path-control)": {
"args": ["obj", "point"]
},
"(method 11 memory-usage-block)": {
"args": ["obj", "level", "fmt-dest"]
},
"(method 14 level)": {
"args": ["obj", "force?"]
},
"mem-size": {
"args": ["data", "inspect-usage?", "arg2"],
"vars": {
"gp-0": "block"
}
},
"(method 9 memory-usage-block)": {
"vars": {
"v1-0": "idx"
}
},
"(method 10 memory-usage-block)": {
"vars": {
"v0-0": "sum",
"v1-0": "idx"
}
},
"set-graphics-mode": {
"vars": {
"v1-0": "settings",
"s4-0": "display",
"s5-0": "video-settings",
"gp-0": "gs-bank"
}
},
"set-progressive-scan": {
"args": ["val"]
},
"set-aspect-ratio": {
"args": ["aspect"]
},
"set-video-mode": {
"args": ["tv-format"]
},
"(method 41 nav-graph)": {
"args": ["obj", "idx"]
},
"(method 18 nav-node)": {
"args": ["obj", "ret"]
},
"(method 10 align-control)": {
"args": ["obj", "options", "x", "y", "z"],
"vars": {
"a0-1": "process",
"t9-0": "method-call",
"v1-4": "transform",
"t1-0": "data"
}
},
"(method 26 trsqv)": {
"args": ["obj", "unkBitfield", "limit"],
"vars": {
"a0-1": "transv"
}
},
"(method 19 nav-node)": {
"args": ["obj", "ret"],
"vars": {
"f0-1": "angle",
"s5-0": "sin-cos-result"
}
}
}
+7 -5
View File
@@ -47,14 +47,16 @@
:flag-assert #xe00000134
(:methods
(new (symbol type process) _type_ 0)
(align-control-method-9 () none 9)
(align-control-method-10 () none 10)
(align-control-method-11 () none 11)
(align-control-method-12 () none 12)
(align-control-method-13 () none 13)
(compute-alignment! (_type_) transformq 9)
(align! (_type_ align-opts float float float) trsqv 10)
(align-vel-and-quat-only! (_type_ align-opts vector int float float) trsqv :behavior process 11)
(first-transform (_type_) transform 12)
(second-transform (_type_) transform 13)
)
)
;; WARN: Return type mismatch object vs align-control.
(defmethod new align-control ((allocation symbol) (type-to-make type) (arg0 process))
(let ((obj (object-new allocation type-to-make (the-as int (-> type-to-make size)))))
(when (zero? obj)
+221
View File
@@ -5,5 +5,226 @@
;; name in dgo: aligner
;; dgos: ENGINE, GAME
;; og:manually-modified:defmethod compute-alignment! align-control
;; DECOMP BEGINS
;; ERROR: Unsupported inline assembly instruction kind - [lw ra, return-from-thread(s7)]
;; ERROR: Unsupported inline assembly instruction kind - [jr ra]
(defmethod compute-alignment! align-control ((obj align-control))
(local-vars (a0-10 symbol) (s7-0 none) (ra-0 int))
(rlet ((vf0 :class vf)
(vf4 :class vf)
(vf5 :class vf)
(vf6 :class vf)
)
(init-vf0-vector)
(joint-control-method-10 (-> obj process skel))
(let ((s5-0 (-> obj process skel active-channels)))
(dotimes (s4-0 (the-as int s5-0))
(let* ((a0-4 (-> obj process skel channel s4-0))
(v1-7 (-> a0-4 frame-group))
)
(case (-> a0-4 command)
(((joint-control-command stack) (joint-control-command stack1))
)
(else
; TODO - support decompiling the return-from-thread
; TODO - properly decompile the `go`to
; (when (!= (-> v1-5 type) art-joint-anim)
; (let
; ((t9-0 (the-as (function object object object object) enter-state))
; (a0-7 "align joint-anim")
; )
; (set! (-> pp next-state) process-drawable-art-error)
; (t9-0 a0-7 (the-as none a1-0) a2-0)
; )
; (.lw ra-0 return-from-thread s7-0)
; (.jr ra-0)
; (nop!)
; 0
; )
0
)
)
)
)
)
(let* ((a0-9 (-> obj process skel root-channel 0))
(v1-18 (-> a0-9 frame-group))
(f0-0 (-> a0-9 frame-num))
)
(= (-> a0-9 num-func) num-func-loop!)
(cond
((or (not v1-18) (!= (-> obj frame-group) v1-18))
(set! a0-10 #t)
)
((= (-> a0-9 num-func) num-func-loop!)
(set! a0-10 (< (* (-> a0-9 param 0) (- f0-0 (-> obj frame-num))) 0.0))
)
(else
(set! a0-10 (= f0-0 0.0))
)
)
(if a0-10
(logior! (-> obj flags) (align-flags disabled))
(logclear! (-> obj flags) (align-flags disabled))
)
(set! (-> obj frame-group) v1-18)
(set! (-> obj frame-num) f0-0)
)
(mem-copy! (the-as pointer (-> obj transform 1)) (the-as pointer (-> obj transform)) 48)
(quaternion-copy! (the-as quaternion (-> obj transform 1 rot)) (-> obj align quat))
(set! (-> obj transform 1 scale quad) (-> obj align scale quad))
(let* ((a2-5 (-> obj matrix 1))
(a3-0 (-> obj matrix))
(v1-21 (-> a3-0 0 vector 0 quad))
(a0-19 (-> a3-0 0 vector 1 quad))
(a1-13 (-> a3-0 0 vector 2 quad))
(a3-1 (-> a3-0 0 trans quad))
)
(set! (-> a2-5 vector 0 quad) v1-21)
(set! (-> a2-5 vector 1 quad) a0-19)
(set! (-> a2-5 vector 2 quad) a1-13)
(set! (-> a2-5 trans quad) a3-1)
)
(let ((s5-1 (-> obj process node-list data 1)))
(cspace<-matrix-no-push-joint! s5-1 (-> obj process skel))
(let* ((v1-25 (-> obj matrix))
(a3-2 (-> s5-1 bone transform))
(a0-22 (-> a3-2 vector 0 quad))
(a1-15 (-> a3-2 vector 1 quad))
(a2-6 (-> a3-2 vector 2 quad))
(a3-3 (-> a3-2 trans quad))
)
(set! (-> v1-25 0 vector 0 quad) a0-22)
(set! (-> v1-25 0 vector 1 quad) a1-15)
(set! (-> v1-25 0 vector 2 quad) a2-6)
(set! (-> v1-25 0 trans quad) a3-3)
)
(let ((v1-26 (-> obj transform)))
(let ((a0-24 (-> s5-1 bone transform trans))
(a1-18 (-> obj process root scale))
)
(.lvf vf4 (&-> a0-24 quad))
(.lvf vf5 (&-> a1-18 quad))
)
(.add.x.vf vf6 vf0 vf0 :mask #b1000)
(.mul.vf vf6 vf4 vf5 :mask #b111)
(.svf (&-> v1-26 0 trans quad) vf6)
)
)
(vector-!
(the-as vector (-> obj delta))
(the-as vector (-> obj transform))
(the-as vector (-> obj transform 1))
)
(set-vector!
(-> obj align scale)
(vector-length (the-as vector (-> obj matrix)))
(vector-length (-> obj matrix 0 vector 1))
(vector-length (-> obj matrix 0 vector 2))
1.0
)
(vector-! (-> obj delta scale) (-> obj align scale) (-> obj transform 1 scale))
(let ((a2-7 (matrix-inv-scale! (new 'stack-no-clear 'matrix) (-> obj align scale))))
(quaternion-normalize!
(matrix->quaternion (-> obj align quat) (matrix*! a2-7 (the-as matrix (-> obj matrix)) a2-7))
)
)
(let ((a1-27 (quaternion-inverse! (new 'stack-no-clear 'quaternion) (the-as quaternion (-> obj transform 1 rot)))))
(quaternion-normalize! (quaternion*! (-> obj delta quat) a1-27 (-> obj align quat)))
)
(-> obj delta)
)
)
;; WARN: Return type mismatch (inline-array transform) vs transform.
(defmethod first-transform align-control ((obj align-control))
"@returns The first of the two [[transforms]] held by the object"
(the-as transform (-> obj transform))
)
(defmethod second-transform align-control ((obj align-control))
"@returns The second of the two [[transforms]] held by the object"
(-> obj transform 1)
)
(defmethod align! align-control ((obj align-control) (options align-opts) (x float) (y float) (z float))
"As long as [[align-flags::0]] is not set call [[process-drawable::16]] on the process being controlled
using the arguments passed to construct a [[vector]] - <`x`, `y`, `z`, 1.0>
@returns the `root` of the [[process-drawable]] after the method returns
@see [[process-drawable::16]]"
(when (zero? (logand (-> obj flags) (align-flags disabled)))
(let* ((process (-> obj process))
(method-call (method-of-object process apply-alignment))
(transform (-> obj delta))
(data (new 'stack-no-clear 'vector))
)
(set! (-> data x) x)
(set! (-> data y) y)
(set! (-> data z) z)
(set! (-> data w) 1.0)
(method-call process options transform data)
)
)
(-> obj process root)
)
(defmethod set-and-limit-velocity trsqv ((obj trsqv) (unkBitfield int) (limit vector) (arg2 float))
"TODO - arg1 is an bitfield of some sort"
(let ((transv (-> obj transv)))
(when (logtest? unkBitfield 4)
(set! (-> transv x) (-> limit x))
(set! (-> transv z) (-> limit z))
(let* ((v1-2 limit)
(f0-8
(fmin
(* (sqrtf (+ (* (-> v1-2 x) (-> v1-2 x)) (* (-> v1-2 z) (-> v1-2 z)))) (-> self clock frames-per-second))
arg2
)
)
)
(vector-xz-normalize! transv f0-8)
)
)
)
obj
)
(defmethod align-vel-and-quat-only! align-control ((obj align-control) (arg0 align-opts) (arg1 vector) (arg2 int) (arg3 float) (arg4 float))
(when (zero? (logand (-> obj flags) (align-flags disabled)))
(let ((s5-0 (-> obj delta)))
(let ((a0-1 (-> obj process root transv)))
(if (logtest? arg0 (align-opts adjust-y-vel))
(set! (-> a0-1 y) (* (-> s5-0 trans y) arg3 (-> self clock frames-per-second)))
)
(when (logtest? arg0 (align-opts adjust-xz-vel))
(set! (-> a0-1 x) (-> arg1 x))
(set! (-> a0-1 z) (-> arg1 z))
(let* ((v1-11 arg1)
(f0-9 (sqrtf (+ (* (-> v1-11 x) (-> v1-11 x)) (* (-> v1-11 z) (-> v1-11 z)))))
(v1-13 (-> s5-0 trans))
(f0-11 (* (fmin f0-9 (* (sqrtf (+ (* (-> v1-13 x) (-> v1-13 x)) (* (-> v1-13 z) (-> v1-13 z)))) arg4))
(-> self clock frames-per-second)
)
)
(t9-0 vector-xz-normalize!)
)
(set! (-> obj last-speed) f0-11)
(t9-0 a0-1 f0-11)
)
)
)
(if (logtest? arg0 (align-opts adjust-quat))
(quaternion-normalize! (quaternion*! (-> obj process root quat) (-> obj process root quat) (-> s5-0 quat)))
)
)
)
(-> obj process root)
)
+16 -10
View File
@@ -13,12 +13,12 @@
(inherit-orientation 2)
)
;; DECOMP BEGINS
(deftype pov-camera (process-drawable)
((flags pov-camera-flag :offset-assert 200)
(debounce-start-time time-frame :offset-assert 208)
(notify-handle uint64 :offset-assert 216)
(notify-handle handle :offset-assert 216)
(anim-name string :offset-assert 224)
(command-list pair :offset-assert 228)
(mask-to-clear process-mask :offset-assert 232)
@@ -30,16 +30,22 @@
:size-assert #xf4
:flag-assert #x1e008000f4
(:methods
(pov-camera-method-20 () none 20)
(pov-camera-method-21 () none 21)
(pov-camera-method-22 () none 22)
(pov-camera-method-23 () none 23)
(pov-camera-method-24 () none 24)
(pov-camera-method-25 () none 25)
(pov-camera-method-26 () none 26)
(pov-camera-abort () _type_ :state 20)
(pov-camera-done-playing () _type_ :state 21)
(pov-camera-playing () _type_ :state 22)
(pov-camera-start-playing () _type_ :state 23)
(pov-camera-startup () _type_ :state 24)
(abort? (_type_) symbol :behavior pov-camera 25)
(target-grabbed? (_type_) symbol 26)
(pov-camera-method-27 () none 27)
(pov-camera-method-28 () none 28)
(pov-camera-method-29 () none 29)
(target-released? (_type_) symbol 29)
)
)
0
+1 -1
View File
@@ -1252,7 +1252,7 @@
)
(t9-32 a0-32 a1-32 (- (-> a2-29 data 0 end-time) (-> a2-29 data 0 start-time)))
)
(compute-memory-usage (-> *level* level0) #f)
(compute-memory-usage! (-> *level* level0) #f)
(format #t " (set! *camera-old-tfrag-bytes* ~D)~%" (+ (-> *level* level0 mem-usage-block data 1 total)
(-> *level* level0 mem-usage-block data 2 total)
(-> *level* level0 mem-usage-block data 3 total)
+9 -4
View File
@@ -52,8 +52,12 @@
(eye-anim 111)
)
(define-extern mem-size (function basic symbol int int))
;; DECOMP BEGINS
;; this file is debug only
(declare-file (debug))
(when *debug-segment*
(deftype memory-usage-info (structure)
@@ -67,6 +71,7 @@
:flag-assert #x900000010
)
(deftype memory-usage-block (basic)
((work-bsp basic :offset-assert 4)
(length int32 :offset-assert 8)
@@ -77,19 +82,19 @@
:flag-assert #xc00000710
(:methods
(reset! (_type_) _type_ 9)
(memory-usage-block-method-10 () none 10)
(print-mem-usage (_type_ level object) none 11)
(calculate-total (_type_) int 10)
(print-mem-usage (_type_ level object) _type_ 11)
)
)
(define *mem-usage* (new 'debug 'memory-usage-block))
(define *dma-mem-usage* (new 'debug 'memory-usage-block))
(define *temp-mem-usage* (the-as memory-usage-block #f))
)
(define-extern mem-size (function basic symbol int int))
+2 -1
View File
@@ -72,7 +72,7 @@
:heap-size #x10000
)
(new 'static 'entity-info
:ptype (type-ref nav-graph :method-count 47)
:ptype (type-ref nav-graph :method-count 45)
:package "game"
:art-group '()
:pool '*16k-dead-pool*
@@ -193,6 +193,7 @@
)
)
;; WARN: Return type mismatch basic vs entity-info.
(defun entity-info-lookup ((arg0 type))
"Given a type, return the [[entity-info]] from [[*entity-info*]] whos type
matches the `ptype` field. Set's `method 13` on said type that returns the `length`
+9 -2
View File
@@ -107,7 +107,7 @@
(:methods
(initialize-skeleton (_type_ skeleton-group pair) none 14)
(initialize-skeleton-by-name (_type_ string object) draw-control 15)
(process-drawable-method-16 () none 16)
(apply-alignment (_type_ align-opts transformq vector) object 16)
(process-drawable-method-17 () none 17)
(process-drawable-method-18 () none 18)
(process-drawable-method-19 () none 19)
@@ -283,6 +283,7 @@
)
)
(deftype attack-dir-info (structure)
((dir vector :inline :offset-assert 0)
(xz-dir vector :inline :offset-assert 16)
@@ -294,6 +295,7 @@
:flag-assert #x900000040
)
(deftype attack-info (structure)
((trans vector :inline :offset-assert 0)
(vector vector :inline :offset-assert 16)
@@ -342,4 +344,9 @@
:flag-assert #x900000024
)
(define-extern process-drawable-art-error (state string process-drawable))
0
@@ -47,7 +47,7 @@
(dotimes (gp-0 (-> *level* length))
(let ((s5-0 (-> *level* level gp-0)))
(when (= (-> s5-0 status) 'active)
(compute-memory-usage s5-0 #f)
(compute-memory-usage! s5-0 #f)
(format
*stdcon*
"~0k~D ~A ~,,2fK + textures~%"
+49 -29
View File
@@ -6,10 +6,18 @@
;; dgos: ENGINE, GAME
(define-extern *video-mode* int)
;; DECOMP BEGINS
(defun set-video-mode ((arg0 symbol))
(case arg0
;; WARN: Return type mismatch int vs none.
(defun set-video-mode ((tv-format symbol))
"Set related settings to the video mode in the settings, [[*video-params*]] and the [[*video-mode*]]
`ntsc` has a [[*video-mode*]] value of `0`, where as `pal` has a value of `1`
Will also set a bunch of common settings related to profiling and the camera to finalize the switch
@param tv-format Recognizes `ntsc` and `pal`"
(case tv-format
(('ntsc)
(set! (-> *setting-control* user-default display-dx) 0)
(set! (-> *setting-control* user-default display-dy) 8)
@@ -37,12 +45,17 @@
0
(none)
)
(defun get-video-mode ()
"@returns the current video mode, for example `ntsc` or `pal`"
(-> *setting-control* user-current video-mode)
)
(defun set-aspect-ratio ((arg0 symbol))
(case arg0
;; WARN: Return type mismatch int vs none.
(defun set-aspect-ratio ((aspect symbol))
"Set [[*video-params*]] aspect-ratio related settings based on the mode provided.
@param aspect Recognizes `aspect4x3` and `aspect16x9`"
(case aspect
(('aspect4x3)
(set! (-> *video-params* relative-x-scale) 1.0)
(set! (-> *video-params* relative-x-scale-reciprical) 1.0)
@@ -57,41 +70,48 @@
)
(defun get-aspect-ratio ()
"@returns The current aspect ratio mode setting"
(-> *setting-control* user-current aspect-ratio)
)
(defun set-progressive-scan ((arg0 symbol))
(set! (-> *setting-control* user-default use-progressive-scan) arg0)
;; WARN: Return type mismatch int vs none.
(defun set-progressive-scan ((val symbol))
"Flip the progressive scan setting flag depending on the value provided
@param val The value to set the progressive scan flag to"
(set! (-> *setting-control* user-default use-progressive-scan) val)
0
(none)
)
(defun get-progressive-scan ()
"@returns If using progressive scan is currently set in the settings"
(-> *setting-control* user-current use-progressive-scan)
)
(define *smode2* 0)
;; WARN: Return type mismatch int vs none.
(defun set-graphics-mode ()
(let ((v1-0 *setting-control*)
(gp-0 (the-as gs-bank #x12000000))
(s5-0 *video-params*)
"TODO"
(let ((settings *setting-control*)
(gs-bank (the-as gs-bank #x12000000))
(video-settings *video-params*)
)
(let ((s4-0 *display*))
(let ((display *display*))
(cond
((-> v1-0 user-current use-progressive-scan)
((-> settings user-current use-progressive-scan)
(when (nonzero? *smode2*)
(reset-graph 0 0 80 0)
(set! *smode2* 0)
0
)
(set! (-> gp-0 display1) (new 'static 'gs-display
:magh #x1
:dw #x4ff
:dy (+ (-> s5-0 display-dy) 50)
:dx (+ (* (-> s5-0 display-dx) 2) 326)
:dh (+ (* (-> s5-0 display-sy) 2) -1)
)
(set! (-> gs-bank display1) (new 'static 'gs-display
:magh #x1
:dw #x4ff
:dy (+ (-> video-settings display-dy) 50)
:dx (+ (* (-> video-settings display-dx) 2) 326)
:dh (+ (* (-> video-settings display-sy) 2) -1)
)
)
)
(else
@@ -103,20 +123,20 @@
(set! *smode2* 1)
(set! (-> *video-params* set-video-mode) #f)
)
(set! (-> gp-0 display1) (new 'static 'gs-display
:magh #x3
:dw #x9ff
:dy (+ (-> s5-0 display-dy) 50)
:dx (+ (* (-> s5-0 display-dx) 4) 652)
:dh (+ (* (-> s5-0 display-sy) 2) -1)
)
(set! (-> gs-bank display1) (new 'static 'gs-display
:magh #x3
:dw #x9ff
:dy (+ (-> video-settings display-dy) 50)
:dx (+ (* (-> video-settings display-dx) 4) 652)
:dh (+ (* (-> video-settings display-sy) 2) -1)
)
)
)
)
(set! (-> gp-0 pmode) (-> s4-0 pmode))
(set! (-> gp-0 bgcolor) (the-as gs-bgcolor (-> s4-0 bgcolor)))
(set! (-> gs-bank pmode) (-> display pmode))
(set! (-> gs-bank bgcolor) (the-as gs-bgcolor (-> display bgcolor)))
)
(set! (-> gp-0 dspfb1) (new 'static 'gs-display-fb :fbw #xa :fbp (-> s5-0 display-fbp)))
(set! (-> gs-bank dspfb1) (new 'static 'gs-display-fb :fbw #xa :fbp (-> video-settings display-fbp)))
)
0
(none)
+76 -73
View File
@@ -138,74 +138,75 @@
)
;; WARN: Return type mismatch uint vs int.
(defmethod asize-of level-vis-info ((obj level-vis-info))
(the-as int (+ (-> level-vis-info size) (-> obj dictionary-length)))
)
(deftype level-load-info (basic)
((name-list symbol 6 :offset-assert 4)
(index int16 :offset-assert 28)
(task-level uint8 :offset-assert 30)
(name symbol :offset 4)
(visname symbol :offset 8)
(nickname symbol :offset 12)
(dbname symbol :offset 16)
(taskname symbol :offset 20)
(other-name-1 symbol :offset 24)
(packages pair :offset-assert 32)
(memory-mode load-buffer-mode :offset-assert 36)
(music-bank symbol :offset-assert 40)
(ambient-sounds symbol :offset-assert 44)
(sound-reverb float :offset-assert 48)
(mood-func symbol :offset-assert 52)
(mood-init symbol :offset-assert 56)
(ocean symbol :offset-assert 60)
(sky symbol :offset-assert 64)
(use-camera-other symbol :offset-assert 68)
(part-engine-max int32 :offset-assert 72)
(city-map-bits uint64 :offset-assert 80)
(continues pair :offset-assert 88)
(tasks pair :offset-assert 92)
(priority int32 :offset-assert 96)
(load-commands pair :offset-assert 100)
(alt-load-commands pair :offset-assert 104)
(bsp-mask uint64 :offset-assert 112)
(buzzer int32 :offset-assert 120)
(buttom-height meters :offset-assert 124)
(run-packages pair :offset-assert 128)
(prev-level symbol :offset-assert 132)
(next-level symbol :offset-assert 136)
(wait-for-load symbol :offset-assert 140)
(login-func symbol :offset-assert 144)
(activate-func symbol :offset-assert 148)
(deactivate-func symbol :offset-assert 152)
(kill-func symbol :offset-assert 156)
(borrow-size uint16 2 :offset-assert 160)
(borrow-level symbol 2 :offset-assert 164)
(borrow-display? symbol 2 :offset-assert 172)
(base-task-mask task-mask :offset-assert 180)
(texture-anim symbol 10 :offset-assert 184)
(texture-anim-tfrag symbol :offset 184)
(texture-anim-pris symbol :offset 188)
(texture-anim-shrub symbol :offset 192)
(texture-anim-alpha symbol :offset 196)
(texture-anim-water symbol :offset 200)
(texture-anim-twarp symbol :offset 204)
(texture-anim-pris2 symbol :offset 208)
(texture-anim-sprite symbol :offset 212)
(texture-anim-map symbol :offset 216)
(texture-anim-sky symbol :offset 220)
(draw-priority float :offset-assert 224)
(level-flags uint32 :offset-assert 228)
(fog-height float :offset-assert 232)
(bigmap-id uint32 :offset-assert 236)
(ocean-near-translucent? symbol :offset-assert 240)
(ocean-far? symbol :offset-assert 244)
(mood-range mood-range :inline :offset-assert 256)
(max-rain float :offset-assert 272)
(fog-mult float :offset-assert 276)
(ocean-alpha float :offset-assert 280)
(extra-sound-bank pair :offset-assert 284)
((name-list symbol 6 :offset-assert 4)
(index int16 :offset-assert 28)
(task-level uint8 :offset-assert 30)
(name symbol :offset 4)
(visname symbol :offset 8)
(nickname symbol :offset 12)
(dbname symbol :offset 16)
(taskname symbol :offset 20)
(other-name-1 symbol :offset 24)
(packages pair :offset-assert 32)
(memory-mode load-buffer-mode :offset-assert 36)
(music-bank symbol :offset-assert 40)
(ambient-sounds symbol :offset-assert 44)
(sound-reverb float :offset-assert 48)
(mood-func symbol :offset-assert 52)
(mood-init symbol :offset-assert 56)
(ocean symbol :offset-assert 60)
(sky symbol :offset-assert 64)
(use-camera-other symbol :offset-assert 68)
(part-engine-max int32 :offset-assert 72)
(city-map-bits uint64 :offset-assert 80)
(continues pair :offset-assert 88)
(tasks pair :offset-assert 92)
(priority int32 :offset-assert 96)
(load-commands pair :offset-assert 100)
(alt-load-commands pair :offset-assert 104)
(bsp-mask uint64 :offset-assert 112)
(buzzer int32 :offset-assert 120)
(buttom-height meters :offset-assert 124)
(run-packages pair :offset-assert 128)
(prev-level symbol :offset-assert 132)
(next-level symbol :offset-assert 136)
(wait-for-load symbol :offset-assert 140)
(login-func symbol :offset-assert 144)
(activate-func symbol :offset-assert 148)
(deactivate-func symbol :offset-assert 152)
(kill-func symbol :offset-assert 156)
(borrow-size uint16 2 :offset-assert 160)
(borrow-level symbol 2 :offset-assert 164)
(borrow-display? symbol 2 :offset-assert 172)
(base-task-mask task-mask :offset-assert 180)
(texture-anim symbol 10 :offset-assert 184)
(texture-anim-tfrag symbol :offset 184)
(texture-anim-pris symbol :offset 188)
(texture-anim-shrub symbol :offset 192)
(texture-anim-alpha symbol :offset 196)
(texture-anim-water symbol :offset 200)
(texture-anim-twarp symbol :offset 204)
(texture-anim-pris2 symbol :offset 208)
(texture-anim-sprite symbol :offset 212)
(texture-anim-map symbol :offset 216)
(texture-anim-sky symbol :offset 220)
(draw-priority float :offset-assert 224)
(level-flags uint32 :offset-assert 228)
(fog-height float :offset-assert 232)
(bigmap-id uint32 :offset-assert 236)
(ocean-near-translucent? symbol :offset-assert 240)
(ocean-far? symbol :offset-assert 244)
(mood-range mood-range :inline :offset-assert 256)
(max-rain float :offset-assert 272)
(fog-mult float :offset-assert 276)
(ocean-alpha float :offset-assert 280)
(extra-sound-bank pair :offset-assert 284)
)
:pack-me
:method-count-assert 9
@@ -310,7 +311,7 @@
(level-method-11 () none 11)
(unload! (_type_) _type_ 12)
(bsp-name (_type_) symbol 13)
(compute-memory-usage (_type_ object) memory-usage-block 14)
(compute-memory-usage! (_type_ symbol) memory-usage-block 14)
(inside-boxes-check (_type_ vector) symbol 15)
(level-method-16 () none 16)
(load-continue (_type_) _type_ 17)
@@ -329,6 +330,7 @@
)
)
(deftype level-group (basic)
((length int32 :offset-assert 4)
(log-in-level-bsp bsp-header :offset-assert 8)
@@ -372,21 +374,21 @@
(:methods
(level-get (_type_ symbol) level 9)
(level-get-with-status (_type_ symbol) level 10)
(get-level-by-heap-ptr-and-status (_type_ pointer symbol) level 11) ;;
(get-level-by-heap-ptr-and-status (_type_ pointer symbol) level 11)
(level-get-for-use (_type_ symbol symbol) level 12)
(activate-levels! (_type_) int 13)
(debug-print-entities (_type_ symbol type) none 14)
(debug-draw-actors (_type_ symbol) none 15)
(assign-draw-indices (_type_) none 16) ;; (level-update (_type_) int 16)
(actors-update (_type_) none 17) ;; (level-get-target-inside (_type_) level 17)
(level-group-method-18 (_type_) none 18) ;; (alloc-levels! (_type_ symbol) int 18)
(level-update (_type_) none 19) ;;
(level-get-target-inside (_type_) level 20) ;; (art-group-get-by-name (_type_ string) art-group 20)
(assign-draw-indices (_type_) none 16)
(actors-update (_type_) none 17)
(level-group-method-18 (_type_) none 18)
(level-update (_type_) none 19)
(level-get-target-inside (_type_) level 20)
(alloc-levels-if-needed (_type_ symbol) none 21)
(load-commands-set! (_type_ pair) none 22)
(art-group-get-by-name (_type_ string (pointer uint32)) art-group 23) ;; (update-vis-volumes-from-nav-mesh (_type_) none 23)
(alt-load-command-get-index (_type_ symbol int) pair 24) ;; (print-volume-sizes (_type_) none 24)
(update-vis-volumes (_type_) none 25) ;; (level-status (_type_ symbol) symbol 25)
(art-group-get-by-name (_type_ string (pointer uint32)) art-group 23)
(alt-load-command-get-index (_type_ symbol int) pair 24)
(update-vis-volumes (_type_) none 25)
(update-vis-volumes-from-nav-mesh (_type_) none 26)
(print-volume-sizes (_type_) none 27)
(level-status (_type_ symbol) symbol 28)
@@ -395,6 +397,7 @@
)
)
(when (zero? *level*)
(set! *level* (new 'static 'level-group
:length 6
+3 -3
View File
@@ -23,7 +23,7 @@
(defun quaternion-axis-angle! ((arg0 quaternion) (arg1 float) (arg2 float) (arg3 float) (arg4 float))
"Construct a quaternion from an axis and angle. The axis should be normalized."
(let ((s5-0 (new 'stack-no-clear 'vector)))
(sincos! (the-as (pointer float) s5-0) (* 0.5 arg4))
(sincos! s5-0 (* 0.5 arg4))
(let ((f0-2 (-> s5-0 x)))
(set! (-> arg0 x) (* arg1 f0-2))
(set! (-> arg0 y) (* arg2 f0-2))
@@ -37,7 +37,7 @@
(defun quaternion-vector-angle! ((arg0 quaternion) (arg1 vector) (arg2 float))
"Construct a quaternion from an axis and angle. The axis should be normalized."
(let ((s5-0 (new 'stack-no-clear 'vector)))
(sincos! (the-as (pointer float) s5-0) (* 0.5 arg2))
(sincos! s5-0 (* 0.5 arg2))
(let ((f0-2 (-> s5-0 x)))
(set! (-> arg0 x) (* (-> arg1 x) f0-2))
(set! (-> arg0 y) (* (-> arg1 y) f0-2))
@@ -660,7 +660,7 @@
)
(else
(let ((s5-0 (new 'stack-no-clear 'vector)))
(sincos-rad! (the-as (pointer float) s5-0) f30-0)
(sincos-rad! s5-0 f30-0)
(let ((f0-6 (/ (-> s5-0 x) f30-0)))
(set! (-> arg0 x) (* (-> arg1 x) f0-6))
(set! (-> arg0 y) (* (-> arg1 y) f0-6))
+1 -1
View File
@@ -73,7 +73,7 @@
(global-y-angle-to-point (_type_ vector) float 23)
(relative-y-angle-to-point (_type_ vector) float 24)
(roll-relative-to-gravity (_type_) float 25)
(set-and-limit-velocity (_type_ int vector float) trsqv 26)
(set-and-limit-velocity (_type_ int vector float) trsqv :behavior process 26)
(get-quaternion (_type_) quaternion 27)
)
)
+2 -2
View File
@@ -10,11 +10,11 @@
;; no code!
(define-extern deg-diff (function float float float))
(define-extern sin (function float float))
(define-extern sincos! (function (pointer float) float int))
(define-extern sincos! (function vector float int))
(define-extern vector-sin-rad! (function vector vector vector))
(define-extern vector-sincos! (function vector vector vector int))
(define-extern vector-sincos-rad! (function vector vector vector int))
(define-extern sincos-rad! (function (pointer float) float int))
(define-extern sincos-rad! (function vector float int))
(define-extern vector-rad<-vector-deg/2! (function vector vector int))
(define-extern cos (function float float))
(define-extern atan-series-rad (function float float))
+4 -4
View File
@@ -546,22 +546,22 @@
(set! f22 (+ acc (* f8 f20)))
;; sll r0, r0, 0
;; swc1 f21, 0(a0)
(set! (-> ,out 0) f21)
(set! (-> ,out x) f21)
;; sll r0, r0, 0
;; swc1 f22, 4(a0)
(set! (-> ,out 1) f22)
(set! (-> ,out y) f22)
;; or v0, r0, r0
0
)
)
(defun sincos-rad! ((out (pointer float)) (x float))
(defun sincos-rad! ((out vector) (x float))
"Compute the sine and cosine of x, store it in the output array.
Has the cosine bug."
(sincos-rad-asm out x)
)
(defun sincos! ((out (pointer float)) (x float))
(defun sincos! ((out vector) (x float))
"Compute the sine and cosine of x, store it in the output array.
The input is in rotation units, and is unwrapped properly.
Also has the cosine bug"
@@ -7,3 +7,224 @@
;; DECOMP BEGINS
(deftype nav-branch (structure)
((node nav-node 2 :offset-assert 0)
(src-node nav-node :offset 0)
(dest-node nav-node :offset 4)
(temp-dest-node-id int32 :offset 4)
(speed-limit uint8 :offset-assert 8)
(density uint8 :offset-assert 9)
(clock-type uint8 :offset-assert 10)
(clock-mask uint8 :offset-assert 11)
(max-user-count uint8 :offset-assert 12)
(user-count uint8 :offset-assert 13)
(width uint8 :offset-assert 14)
(flags uint8 :offset-assert 15)
)
:method-count-assert 21
:size-assert #x10
:flag-assert #x1500000010
(:methods
(nav-branch-method-9 () none 9)
(nav-branch-method-10 () none 10)
(nav-branch-method-11 (_type_) float 11)
(nav-branch-method-12 (_type_) float 12)
(nav-branch-method-13 (_type_) float 13)
(user-limit-reached? (_type_) symbol 14)
(nav-branch-method-15 (_type_) symbol 15)
(nav-branch-method-16 () none 16)
(nav-branch-method-17 () none 17)
(nav-branch-method-18 () none 18)
(nav-branch-method-19 () none 19)
(nav-branch-method-20 () none 20)
)
)
(deftype nav-node (structure)
((data uint32 8 :offset-assert 0)
(position vector :inline :offset 0)
(pos-x float :offset 0)
(pos-y float :offset 4)
(pos-z float :offset 8)
(angle uint16 :offset 12)
(id uint16 :offset 14)
(radius uint8 :offset 16)
(branch-count int8 :offset 17)
(flags nav-node-flag-byte :offset 18)
(pad0 int8 1 :offset 19)
(branch-array uint32 :offset 20)
(nav-mesh-id uint32 :offset 24)
(level level :offset 28)
)
:method-count-assert 22
:size-assert #x20
:flag-assert #x1600000020
(:methods
(nav-node-method-9 () none 9)
(nav-node-method-10 () none 10)
(nav-node-method-11 () none 11)
(nav-node-method-12 () none 12)
(nav-node-method-13 () none 13)
(nav-node-method-14 () none 14)
(nav-node-method-15 () none 15)
(nav-node-method-16 () none 16)
(nav-node-method-17 () none 17)
(get-position (_type_ vector) vector 18)
(calc-sine-and-cosine! (_type_ vector) vector 19)
(get-angle (_type_) float 20)
(nav-node-method-21 (_type_) float 21)
)
)
(defmethod nav-branch-method-11 nav-branch ((obj nav-branch))
"TODO
@returns `density * 0.0078125` - is this some kind of trick?"
(* 0.0078125 (the float (-> obj density)))
)
(defmethod nav-branch-method-12 nav-branch ((obj nav-branch))
"TODO
@returns `speed-limit * 1024.0`"
(* 1024.0 (the float (-> obj speed-limit)))
)
(defmethod nav-branch-method-13 nav-branch ((obj nav-branch))
"TODO
@returns `width * 256.0`"
(* 256.0 (the float (-> obj width)))
)
(defmethod user-limit-reached? nav-branch ((obj nav-branch))
(>= (-> obj user-count) (-> obj max-user-count))
)
(defmethod nav-branch-method-15 nav-branch ((obj nav-branch))
"TODO - checks that `dest-node`'s `id` isn't #FFFF"
(!= (-> obj dest-node id) #xffff)
)
(defmethod nav-node-method-21 nav-node ((obj nav-node))
"TODO
@returns `radius * 1024.0"
(* 1024.0 (the float (-> obj radius)))
)
(defmethod get-angle nav-node ((obj nav-node))
(the float (-> obj angle))
)
(defmethod calc-sine-and-cosine! nav-node ((obj nav-node) (ret vector))
"Computes the sine and cosine of the `angle`.
@param! ret The result <cosine, 0.0, -(sine), 1.0>
@returns Nothing, the result will be in `ret`"
(let ((angle (the float (-> obj angle)))
(sin-cos-result (new 'stack-no-clear 'vector))
)
(sincos! sin-cos-result angle)
(set! (-> ret x) (-> sin-cos-result y))
(set! (-> ret y) 0.0)
(set! (-> ret z) (- (-> sin-cos-result x)))
)
(set! (-> ret w) 1.0)
ret
)
(defmethod get-position nav-node ((obj nav-node) (ret vector))
"@param! ret The [[vector]] that is modified to hold the result
@returns the `position` [[vector]] with a `w` component of `1.0`"
(set! (-> ret quad) (-> obj position quad))
(set! (-> ret w) 1.0)
ret
)
(deftype nav-graph-link (structure)
((id uint32 :offset-assert 0)
(dest-graph-id uint32 :offset-assert 4)
(src-branch-id uint16 :offset-assert 8)
(dest-node-id uint16 :offset-assert 10)
(dest-graph basic :offset-assert 12)
(dummy-node nav-node :inline :offset-assert 16)
)
:method-count-assert 9
:size-assert #x30
:flag-assert #x900000030
)
(deftype nav-graph (basic)
((node-count int16 :offset-assert 4)
(branch-count int16 :offset-assert 6)
(node-array (inline-array nav-node) :offset-assert 8)
(branch-array uint32 :offset-assert 12)
(link-count int16 :offset-assert 16)
(pad2 uint16 :offset-assert 18)
(link-array uint32 :offset-assert 20)
(first-node int16 :offset-assert 24)
(pad0 uint16 :offset-assert 26)
(patched basic :offset-assert 28)
(id uint32 :offset-assert 32)
(pad1 uint32 6 :offset-assert 36)
)
:method-count-assert 45
:size-assert #x3c
:flag-assert #x2d0000003c
(:methods
(nav-graph-method-9 () none 9)
(nav-graph-method-10 () none 10)
(nav-graph-method-11 () none 11)
(nav-graph-method-12 () none 12)
(nav-graph-method-13 () none 13)
(nav-graph-method-14 () none 14)
(nav-graph-method-15 () none 15)
(nav-graph-method-16 () none 16)
(nav-graph-method-17 () none 17)
(nav-graph-method-18 () none 18)
(nav-graph-method-19 () none 19)
(nav-graph-method-20 () none 20)
(nav-graph-method-21 () none 21)
(nav-graph-method-22 () none 22)
(nav-graph-method-23 () none 23)
(nav-graph-method-24 () none 24)
(nav-graph-method-25 () none 25)
(nav-graph-method-26 () none 26)
(nav-graph-method-27 () none 27)
(nav-graph-method-28 () none 28)
(nav-graph-method-29 () none 29)
(nav-graph-method-30 () none 30)
(nav-graph-method-31 () none 31)
(nav-graph-method-32 () none 32)
(nav-graph-method-33 () none 33)
(nav-graph-method-34 () none 34)
(nav-graph-method-35 () none 35)
(nav-graph-method-36 () none 36)
(nav-graph-method-37 () none 37)
(nav-graph-method-38 () none 38)
(nav-graph-method-39 () none 39)
(nav-graph-method-40 () none 40)
(node-at-idx (_type_ int) nav-node 41)
(nav-graph-method-42 () none 42)
(nav-graph-method-43 () none 43)
(nav-graph-method-44 () none 44)
)
)
(defmethod node-at-idx nav-graph ((obj nav-graph) (idx int))
"Get the `nav-node` at a given position.
@param idx The position in the `node-array` to return
@returns the [[nav-node]] if it can be found, otherwise return [[#f]]"
(let ((v0-0 (the-as nav-node #f)))
(if (and (>= idx 0) (< idx (-> obj node-count)))
(set! v0-0 (-> obj node-array idx))
)
v0-0
)
)
0
+5 -5
View File
@@ -18,11 +18,11 @@
:flag-assert #xe00000134
(:methods
(new (symbol type process) _type_ 0)
(align-control-method-9 () none 9)
(align-control-method-10 () none 10)
(align-control-method-11 () none 11)
(align-control-method-12 () none 12)
(align-control-method-13 () none 13)
(compute-alignment! (_type_) transformq 9)
(align! (_type_ align-opts float float float) trsqv 10)
(align-vel-and-quat-only! (_type_ align-opts vector int float float) trsqv :behavior process 11)
(first-transform (_type_) transform 12)
(second-transform (_type_) transform 13)
)
)
+220
View File
@@ -0,0 +1,220 @@
;;-*-Lisp-*-
(in-package goal)
;; definition for method 9 of type align-control
;; INFO: Used lq/sq
;; ERROR: Unsupported inline assembly instruction kind - [lw ra, return-from-thread(s7)]
;; ERROR: Unsupported inline assembly instruction kind - [jr ra]
(defmethod compute-alignment! align-control ((obj align-control))
(local-vars (a0-10 symbol) (s7-0 none) (ra-0 int))
(rlet ((vf0 :class vf)
(vf4 :class vf)
(vf5 :class vf)
(vf6 :class vf)
)
(init-vf0-vector)
(joint-control-method-10 (-> obj process skel))
(let ((s5-0 (-> obj process skel active-channels)))
(dotimes (s4-0 (the-as int s5-0))
(let* ((a0-4 (-> obj process skel channel s4-0))
(v1-7 (-> a0-4 frame-group))
)
(case (-> a0-4 command)
(((joint-control-command stack) (joint-control-command stack1))
)
(else
(when (!= (-> v1-7 type) art-joint-anim)
(go process-drawable-art-error "align joint-anim")
(.lw ra-0 return-from-thread s7-0)
(.jr ra-0)
(nop!)
0
)
)
)
)
)
)
(let* ((a0-9 (-> obj process skel root-channel 0))
(v1-18 (-> a0-9 frame-group))
(f0-0 (-> a0-9 frame-num))
)
(= (-> a0-9 num-func) num-func-loop!)
(cond
((or (not v1-18) (!= (-> obj frame-group) v1-18))
(set! a0-10 #t)
)
((= (-> a0-9 num-func) num-func-loop!)
(set! a0-10 (< (* (-> a0-9 param 0) (- f0-0 (-> obj frame-num))) 0.0))
)
(else
(set! a0-10 (= f0-0 0.0))
)
)
(if a0-10
(logior! (-> obj flags) (align-flags disabled))
(logclear! (-> obj flags) (align-flags disabled))
)
(set! (-> obj frame-group) v1-18)
(set! (-> obj frame-num) f0-0)
)
(mem-copy! (the-as pointer (-> obj transform 1)) (the-as pointer (-> obj transform)) 48)
(quaternion-copy! (the-as quaternion (-> obj transform 1 rot)) (-> obj align quat))
(set! (-> obj transform 1 scale quad) (-> obj align scale quad))
(let* ((a2-5 (-> obj matrix 1))
(a3-0 (-> obj matrix))
(v1-21 (-> a3-0 0 vector 0 quad))
(a0-19 (-> a3-0 0 vector 1 quad))
(a1-13 (-> a3-0 0 vector 2 quad))
(a3-1 (-> a3-0 0 trans quad))
)
(set! (-> a2-5 vector 0 quad) v1-21)
(set! (-> a2-5 vector 1 quad) a0-19)
(set! (-> a2-5 vector 2 quad) a1-13)
(set! (-> a2-5 trans quad) a3-1)
)
(let ((s5-1 (-> obj process node-list data 1)))
(cspace<-matrix-no-push-joint! s5-1 (-> obj process skel))
(let* ((v1-25 (-> obj matrix))
(a3-2 (-> s5-1 bone transform))
(a0-22 (-> a3-2 vector 0 quad))
(a1-15 (-> a3-2 vector 1 quad))
(a2-6 (-> a3-2 vector 2 quad))
(a3-3 (-> a3-2 trans quad))
)
(set! (-> v1-25 0 vector 0 quad) a0-22)
(set! (-> v1-25 0 vector 1 quad) a1-15)
(set! (-> v1-25 0 vector 2 quad) a2-6)
(set! (-> v1-25 0 trans quad) a3-3)
)
(let ((v1-26 (-> obj transform)))
(let ((a0-24 (-> s5-1 bone transform trans))
(a1-18 (-> obj process root scale))
)
(.lvf vf4 (&-> a0-24 quad))
(.lvf vf5 (&-> a1-18 quad))
)
(.add.x.vf vf6 vf0 vf0 :mask #b1000)
(.mul.vf vf6 vf4 vf5 :mask #b111)
(.svf (&-> v1-26 0 trans quad) vf6)
)
)
(vector-!
(the-as vector (-> obj delta))
(the-as vector (-> obj transform))
(the-as vector (-> obj transform 1))
)
(set-vector!
(-> obj align scale)
(vector-length (the-as vector (-> obj matrix)))
(vector-length (-> obj matrix 0 vector 1))
(vector-length (-> obj matrix 0 vector 2))
1.0
)
(vector-! (-> obj delta scale) (-> obj align scale) (-> obj transform 1 scale))
(let ((a2-7 (matrix-inv-scale! (new 'stack-no-clear 'matrix) (-> obj align scale))))
(quaternion-normalize!
(matrix->quaternion (-> obj align quat) (matrix*! a2-7 (the-as matrix (-> obj matrix)) a2-7))
)
)
(let ((a1-27 (quaternion-inverse! (new 'stack-no-clear 'quaternion) (the-as quaternion (-> obj transform 1 rot)))))
(quaternion-normalize! (quaternion*! (-> obj delta quat) a1-27 (-> obj align quat)))
)
(-> obj delta)
)
)
;; definition for method 12 of type align-control
;; WARN: Return type mismatch (inline-array transform) vs transform.
(defmethod first-transform align-control ((obj align-control))
"@returns The first of the two [[transforms]] held by the object"
(the-as transform (-> obj transform))
)
;; definition for method 13 of type align-control
(defmethod second-transform align-control ((obj align-control))
"@returns The second of the two [[transforms]] held by the object"
(-> obj transform 1)
)
;; definition for method 10 of type align-control
(defmethod align! align-control ((obj align-control) (options align-opts) (x float) (y float) (z float))
"As long as [[align-flags::0]] is not set call [[process-drawable::16]] on the process being controlled
using the arguments passed to construct a [[vector]] - <`x`, `y`, `z`, 1.0>
@returns the `root` of the [[process-drawable]] after the method returns
@see [[process-drawable::16]]"
(when (zero? (logand (-> obj flags) (align-flags disabled)))
(let* ((process (-> obj process))
(method-call (method-of-object process apply-alignment))
(transform (-> obj delta))
(data (new 'stack-no-clear 'vector))
)
(set! (-> data x) x)
(set! (-> data y) y)
(set! (-> data z) z)
(set! (-> data w) 1.0)
(method-call process options transform data)
)
)
(-> obj process root)
)
;; definition for method 26 of type trsqv
(defmethod set-and-limit-velocity trsqv ((obj trsqv) (unkBitfield int) (limit vector) (arg2 float))
"TODO - arg1 is an bitfield of some sort"
(let ((transv (-> obj transv)))
(when (logtest? unkBitfield 4)
(set! (-> transv x) (-> limit x))
(set! (-> transv z) (-> limit z))
(let* ((v1-2 limit)
(f0-8
(fmin
(* (sqrtf (+ (* (-> v1-2 x) (-> v1-2 x)) (* (-> v1-2 z) (-> v1-2 z)))) (-> self clock frames-per-second))
arg2
)
)
)
(vector-xz-normalize! transv f0-8)
)
)
)
obj
)
;; definition for method 11 of type align-control
(defmethod align-vel-and-quat-only! align-control ((obj align-control) (arg0 align-opts) (arg1 vector) (arg2 int) (arg3 float) (arg4 float))
(when (zero? (logand (-> obj flags) (align-flags disabled)))
(let ((s5-0 (-> obj delta)))
(let ((a0-1 (-> obj process root transv)))
(if (logtest? arg0 (align-opts adjust-y-vel))
(set! (-> a0-1 y) (* (-> s5-0 trans y) arg3 (-> self clock frames-per-second)))
)
(when (logtest? arg0 (align-opts adjust-xz-vel))
(set! (-> a0-1 x) (-> arg1 x))
(set! (-> a0-1 z) (-> arg1 z))
(let* ((v1-11 arg1)
(f0-9 (sqrtf (+ (* (-> v1-11 x) (-> v1-11 x)) (* (-> v1-11 z) (-> v1-11 z)))))
(v1-13 (-> s5-0 trans))
(f0-11 (* (fmin f0-9 (* (sqrtf (+ (* (-> v1-13 x) (-> v1-13 x)) (* (-> v1-13 z) (-> v1-13 z)))) arg4))
(-> self clock frames-per-second)
)
)
(t9-0 vector-xz-normalize!)
)
(set! (-> obj last-speed) f0-11)
(t9-0 a0-1 f0-11)
)
)
)
(if (logtest? arg0 (align-opts adjust-quat))
(quaternion-normalize! (quaternion*! (-> obj process root quat) (-> obj process root quat) (-> s5-0 quat)))
)
)
)
(-> obj process root)
)
+9 -13
View File
@@ -5,7 +5,7 @@
(deftype pov-camera (process-drawable)
((flags pov-camera-flag :offset-assert 200)
(debounce-start-time time-frame :offset-assert 208)
(notify-handle uint64 :offset-assert 216)
(notify-handle handle :offset-assert 216)
(anim-name string :offset-assert 224)
(command-list pair :offset-assert 228)
(mask-to-clear process-mask :offset-assert 232)
@@ -17,16 +17,16 @@
:size-assert #xf4
:flag-assert #x1e008000f4
(:methods
(pov-camera-method-20 () none 20)
(pov-camera-method-21 () none 21)
(pov-camera-method-22 () none 22)
(pov-camera-method-23 () none 23)
(pov-camera-method-24 () none 24)
(pov-camera-method-25 () none 25)
(pov-camera-method-26 () none 26)
(pov-camera-abort () _type_ :state 20)
(pov-camera-done-playing () _type_ :state 21)
(pov-camera-playing () _type_ :state 22)
(pov-camera-start-playing () _type_ :state 23)
(pov-camera-startup () _type_ :state 24)
(abort? (_type_) symbol :behavior pov-camera 25)
(target-grabbed? (_type_) symbol 26)
(pov-camera-method-27 () none 27)
(pov-camera-method-28 () none 28)
(pov-camera-method-29 () none 29)
(target-released? (_type_) symbol 29)
)
)
@@ -53,7 +53,3 @@
;; failed to figure out what this is:
0
+1 -1
View File
@@ -1318,7 +1318,7 @@
)
(t9-32 a0-32 a1-32 (- (-> a2-29 data 0 end-time) (-> a2-29 data 0 start-time)))
)
(compute-memory-usage (-> *level* level0) #f)
(compute-memory-usage! (-> *level* level0) #f)
(format #t " (set! *camera-old-tfrag-bytes* ~D)~%" (+ (-> *level* level0 mem-usage-block data 1 total)
(-> *level* level0 mem-usage-block data 2 total)
(-> *level* level0 mem-usage-block data 3 total)
+2 -2
View File
@@ -42,8 +42,8 @@
:flag-assert #xc00000710
(:methods
(reset! (_type_) _type_ 9)
(memory-usage-block-method-10 () none 10)
(print-mem-usage (_type_ level object) none 11)
(calculate-total (_type_) int 10)
(print-mem-usage (_type_ level object) _type_ 11)
)
)
+1 -1
View File
@@ -67,7 +67,7 @@
:heap-size #x10000
)
(new 'static 'entity-info
:ptype (type-ref nav-graph :method-count 47)
:ptype (type-ref nav-graph :method-count 45)
:package "game"
:art-group '()
:pool '*16k-dead-pool*
+1 -1
View File
@@ -28,7 +28,7 @@
(:methods
(initialize-skeleton (_type_ skeleton-group pair) none 14)
(initialize-skeleton-by-name (_type_ string object) draw-control 15)
(process-drawable-method-16 () none 16)
(apply-alignment (_type_ align-opts transformq vector) object 16)
(process-drawable-method-17 () none 17)
(process-drawable-method-18 () none 18)
(process-drawable-method-19 () none 19)
+10
View File
@@ -126,6 +126,9 @@
;; definition of type gs-display
(deftype gs-display (uint64)
"the GS's DISPLAY registers make settings for the display position on the screen regarding
information on Rectangular Area Read Output Circuit n for the PCRTC.
write-only"
((dx uint16 :offset 0 :size 12)
(dy uint16 :offset 12 :size 11)
(magh uint8 :offset 23 :size 4)
@@ -140,6 +143,8 @@
;; definition of type gs-bgcolor
(deftype gs-bgcolor (uint64)
"the GS's BGCOLOR register sets the background color of the PCRTC with RGB value.
write-only"
((r uint8 :offset 0 :size 8)
(g uint8 :offset 8 :size 8)
(b uint8 :offset 16 :size 8)
@@ -151,6 +156,11 @@
;; definition of type gs-csr
(deftype gs-csr (uint64)
"the GS's CSR register sets and obtains various GS statuses.
read-write. the fields have different effects depending on whether they're being read from
or written to.
bits 5 and 6 (0x20 and 0x40) should be zero"
((signal uint8 :offset 0 :size 1)
(finish uint8 :offset 1 :size 1)
(hsint uint8 :offset 2 :size 1)
+147
View File
@@ -0,0 +1,147 @@
;;-*-Lisp-*-
(in-package goal)
;; definition for function set-video-mode
;; WARN: Return type mismatch int vs none.
(defun set-video-mode ((tv-format symbol))
"Set related settings to the video mode in the settings, [[*video-params*]] and the [[*video-mode*]]
`ntsc` has a [[*video-mode*]] value of `0`, where as `pal` has a value of `1`
Will also set a bunch of common settings related to profiling and the camera to finalize the switch
@param tv-format Recognizes `ntsc` and `pal`"
(case tv-format
(('ntsc)
(set! (-> *setting-control* user-default display-dx) 0)
(set! (-> *setting-control* user-default display-dy) 8)
(set! (-> *video-params* display-fbp) 164)
(set! (-> *video-params* display-sy) 224)
(set! *video-mode* 0)
(sound-set-fps 60)
)
(('pal)
(set! (-> *setting-control* user-default display-dx) 0)
(set! (-> *setting-control* user-default display-dy) 24)
(set! (-> *video-params* display-fbp) 144)
(set! (-> *video-params* display-sy) 256)
(set! *video-mode* 1)
(sound-set-fps 50)
)
)
(set-time-ratios *display* (-> *display* dog-ratio))
(set! (-> *video-params* reset-video-mode) #t)
(set! (-> *math-camera* isometric vector 1 y) 0.5)
(set! (-> *math-camera* y-clip) 416.0)
(set! (-> *math-camera* y-pix) (* 0.5 (-> *math-camera* y-clip)))
(set! *profile-y* 1848)
(set! (-> *video-params* set-video-mode) #t)
0
(none)
)
;; definition for function get-video-mode
(defun get-video-mode ()
"@returns the current video mode, for example `ntsc` or `pal`"
(-> *setting-control* user-current video-mode)
)
;; definition for function set-aspect-ratio
;; WARN: Return type mismatch int vs none.
(defun set-aspect-ratio ((aspect symbol))
"Set [[*video-params*]] aspect-ratio related settings based on the mode provided.
@param aspect Recognizes `aspect4x3` and `aspect16x9`"
(case aspect
(('aspect4x3)
(set! (-> *video-params* relative-x-scale) 1.0)
(set! (-> *video-params* relative-x-scale-reciprical) 1.0)
)
(('aspect16x9)
(set! (-> *video-params* relative-x-scale) 0.75)
(set! (-> *video-params* relative-x-scale-reciprical) 1.3333334)
)
)
0
(none)
)
;; definition for function get-aspect-ratio
(defun get-aspect-ratio ()
"@returns The current aspect ratio mode setting"
(-> *setting-control* user-current aspect-ratio)
)
;; definition for function set-progressive-scan
;; WARN: Return type mismatch int vs none.
(defun set-progressive-scan ((val symbol))
"Flip the progressive scan setting flag depending on the value provided
@param val The value to set the progressive scan flag to"
(set! (-> *setting-control* user-default use-progressive-scan) val)
0
(none)
)
;; definition for function get-progressive-scan
(defun get-progressive-scan ()
"@returns If using progressive scan is currently set in the settings"
(-> *setting-control* user-current use-progressive-scan)
)
;; definition for symbol *smode2*, type int
(define *smode2* 0)
;; definition for function set-graphics-mode
;; WARN: Return type mismatch int vs none.
(defun set-graphics-mode ()
"TODO"
(let ((settings *setting-control*)
(gs-bank (the-as gs-bank #x12000000))
(video-settings *video-params*)
)
(let ((display *display*))
(cond
((-> settings user-current use-progressive-scan)
(when (nonzero? *smode2*)
(reset-graph 0 0 80 0)
(set! *smode2* 0)
0
)
(set! (-> gs-bank display1) (new 'static 'gs-display
:magh #x1
:dw #x4ff
:dy (+ (-> video-settings display-dy) 50)
:dx (+ (* (-> video-settings display-dx) 2) 326)
:dh (+ (* (-> video-settings display-sy) 2) -1)
)
)
)
(else
(when (or (!= *smode2* 1) (-> *video-params* set-video-mode))
(if (= (-> *setting-control* user-current video-mode) 'ntsc)
(reset-graph 0 1 2 0)
(reset-graph 0 1 3 0)
)
(set! *smode2* 1)
(set! (-> *video-params* set-video-mode) #f)
)
(set! (-> gs-bank display1) (new 'static 'gs-display
:magh #x3
:dw #x9ff
:dy (+ (-> video-settings display-dy) 50)
:dx (+ (* (-> video-settings display-dx) 4) 652)
:dh (+ (* (-> video-settings display-sy) 2) -1)
)
)
)
)
(set! (-> gs-bank pmode) (-> display pmode))
(set! (-> gs-bank bgcolor) (the-as gs-bgcolor (-> display bgcolor)))
)
(set! (-> gs-bank dspfb1) (new 'static 'gs-display-fb :fbw #xa :fbp (-> video-settings display-fbp)))
)
0
(none)
)
+1 -1
View File
@@ -477,7 +477,7 @@
(level-method-11 () none 11)
(unload! (_type_) _type_ 12)
(bsp-name (_type_) symbol 13)
(compute-memory-usage (_type_ object) memory-usage-block 14)
(compute-memory-usage! (_type_ symbol) memory-usage-block 14)
(inside-boxes-check (_type_ vector) symbol 15)
(level-method-16 () none 16)
(load-continue (_type_) _type_ 17)
+3 -3
View File
@@ -18,7 +18,7 @@
;; definition for function quaternion-axis-angle!
(defun quaternion-axis-angle! ((arg0 quaternion) (arg1 float) (arg2 float) (arg3 float) (arg4 float))
(let ((s5-0 (new 'stack-no-clear 'vector)))
(sincos! (the-as (pointer float) s5-0) (* 0.5 arg4))
(sincos! s5-0 (* 0.5 arg4))
(let ((f0-2 (-> s5-0 x)))
(set! (-> arg0 x) (* arg1 f0-2))
(set! (-> arg0 y) (* arg2 f0-2))
@@ -32,7 +32,7 @@
;; definition for function quaternion-vector-angle!
(defun quaternion-vector-angle! ((arg0 quaternion) (arg1 vector) (arg2 float))
(let ((s5-0 (new 'stack-no-clear 'vector)))
(sincos! (the-as (pointer float) s5-0) (* 0.5 arg2))
(sincos! s5-0 (* 0.5 arg2))
(let ((f0-2 (-> s5-0 x)))
(set! (-> arg0 x) (* (-> arg1 x) f0-2))
(set! (-> arg0 y) (* (-> arg1 y) f0-2))
@@ -604,7 +604,7 @@
)
(else
(let ((s5-0 (new 'stack-no-clear 'vector)))
(sincos-rad! (the-as (pointer float) s5-0) f30-0)
(sincos-rad! s5-0 f30-0)
(let ((f0-6 (/ (-> s5-0 x) f30-0)))
(set! (-> arg0 x) (* (-> arg1 x) f0-6))
(set! (-> arg0 y) (* (-> arg1 y) f0-6))
+1 -5
View File
@@ -81,7 +81,7 @@
(global-y-angle-to-point (_type_ vector) float 23)
(relative-y-angle-to-point (_type_ vector) float 24)
(roll-relative-to-gravity (_type_) float 25)
(set-and-limit-velocity (_type_ int vector float) trsqv 26)
(set-and-limit-velocity (_type_ int vector float) trsqv :behavior process 26)
(get-quaternion (_type_) quaternion 27)
)
)
@@ -121,7 +121,3 @@
;; failed to figure out what this is:
0
+338
View File
@@ -0,0 +1,338 @@
;;-*-Lisp-*-
(in-package goal)
;; definition of type nav-branch
(deftype nav-branch (structure)
((node nav-node 2 :offset-assert 0)
(src-node nav-node :offset 0)
(dest-node nav-node :offset 4)
(temp-dest-node-id int32 :offset 4)
(speed-limit uint8 :offset-assert 8)
(density uint8 :offset-assert 9)
(clock-type uint8 :offset-assert 10)
(clock-mask uint8 :offset-assert 11)
(max-user-count uint8 :offset-assert 12)
(user-count uint8 :offset-assert 13)
(width uint8 :offset-assert 14)
(flags uint8 :offset-assert 15)
)
:method-count-assert 21
:size-assert #x10
:flag-assert #x1500000010
(:methods
(nav-branch-method-9 () none 9)
(nav-branch-method-10 () none 10)
(nav-branch-method-11 (_type_) float 11)
(nav-branch-method-12 (_type_) float 12)
(nav-branch-method-13 (_type_) float 13)
(user-limit-reached? (_type_) symbol 14)
(nav-branch-method-15 (_type_) symbol 15)
(nav-branch-method-16 () none 16)
(nav-branch-method-17 () none 17)
(nav-branch-method-18 () none 18)
(nav-branch-method-19 () none 19)
(nav-branch-method-20 () none 20)
)
)
;; definition for method 3 of type nav-branch
(defmethod inspect nav-branch ((obj nav-branch))
(when (not obj)
(set! obj obj)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" obj 'nav-branch)
(format #t "~1Tnode[2] @ #x~X~%" (-> obj node))
(format #t "~1Tsrc-node: ~A~%" (-> obj src-node))
(format #t "~1Tdest-node: ~A~%" (-> obj dest-node))
(format #t "~1Ttemp-dest-node-id: ~D~%" (-> obj dest-node))
(format #t "~1Tspeed-limit: ~D~%" (-> obj speed-limit))
(format #t "~1Tdensity: ~D~%" (-> obj density))
(format #t "~1Tclock-type: ~D~%" (-> obj clock-type))
(format #t "~1Tclock-mask: ~D~%" (-> obj clock-mask))
(format #t "~1Tmax-user-count: ~D~%" (-> obj max-user-count))
(format #t "~1Tuser-count: ~D~%" (-> obj user-count))
(format #t "~1Twidth: ~D~%" (-> obj width))
(format #t "~1Tflags: ~D~%" (-> obj flags))
(label cfg-4)
obj
)
;; definition of type nav-node
(deftype nav-node (structure)
((data uint32 8 :offset-assert 0)
(position vector :inline :offset 0)
(pos-x float :offset 0)
(pos-y float :offset 4)
(pos-z float :offset 8)
(angle uint16 :offset 12)
(id uint16 :offset 14)
(radius uint8 :offset 16)
(branch-count int8 :offset 17)
(flags nav-node-flag-byte :offset 18)
(pad0 int8 1 :offset 19)
(branch-array uint32 :offset 20)
(nav-mesh-id uint32 :offset 24)
(level level :offset 28)
)
:method-count-assert 22
:size-assert #x20
:flag-assert #x1600000020
(:methods
(nav-node-method-9 () none 9)
(nav-node-method-10 () none 10)
(nav-node-method-11 () none 11)
(nav-node-method-12 () none 12)
(nav-node-method-13 () none 13)
(nav-node-method-14 () none 14)
(nav-node-method-15 () none 15)
(nav-node-method-16 () none 16)
(nav-node-method-17 () none 17)
(get-position (_type_ vector) vector 18)
(calc-sine-and-cosine! (_type_ vector) vector 19)
(get-angle (_type_) float 20)
(nav-node-method-21 (_type_) float 21)
)
)
;; definition for method 3 of type nav-node
(defmethod inspect nav-node ((obj nav-node))
(when (not obj)
(set! obj obj)
(goto cfg-14)
)
(format #t "[~8x] ~A~%" obj 'nav-node)
(format #t "~1Tdata[32] @ #x~X~%" (-> obj position))
(format #t "~1Tposition: ~`vector`P~%" (-> obj position))
(format #t "~1Tpos-x: ~f~%" (-> obj position x))
(format #t "~1Tpos-y: ~f~%" (-> obj position y))
(format #t "~1Tpos-z: ~f~%" (-> obj position z))
(format #t "~1Tangle: ~D~%" (-> obj angle))
(format #t "~1Tid: ~D~%" (-> obj id))
(format #t "~1Tradius: ~D~%" (-> obj radius))
(format #t "~1Tbranch-count: ~D~%" (-> obj branch-count))
(format #t "~1Tflags: #x~X : (nav-node-flag " (-> obj flags))
(let ((s5-0 (-> obj flags)))
(if (= (logand s5-0 (nav-node-flag-byte blocked)) (nav-node-flag-byte blocked))
(format #t "blocked ")
)
(if (= (logand s5-0 (nav-node-flag-byte selected)) (nav-node-flag-byte selected))
(format #t "selected ")
)
(if (= (logand s5-0 (nav-node-flag-byte pedestrian)) (nav-node-flag-byte pedestrian))
(format #t "pedestrian ")
)
(if (= (logand s5-0 (nav-node-flag-byte visited)) (nav-node-flag-byte visited))
(format #t "visited ")
)
(if (= (logand s5-0 (nav-node-flag-byte hidden)) (nav-node-flag-byte hidden))
(format #t "hidden ")
)
)
(format #t ")~%")
(format #t "~1Tpad0[1] @ #x~X~%" (-> obj pad0))
(format #t "~1Tbranch-array: #x~X~%" (-> obj branch-array))
(format #t "~1Tnav-mesh-id: ~D~%" (-> obj nav-mesh-id))
(format #t "~1Tlevel: ~A~%" (-> obj level))
(label cfg-14)
obj
)
;; definition for method 11 of type nav-branch
(defmethod nav-branch-method-11 nav-branch ((obj nav-branch))
"TODO
@returns `density * 0.0078125` - is this some kind of trick?"
(* 0.0078125 (the float (-> obj density)))
)
;; definition for method 12 of type nav-branch
(defmethod nav-branch-method-12 nav-branch ((obj nav-branch))
"TODO
@returns `speed-limit * 1024.0`"
(* 1024.0 (the float (-> obj speed-limit)))
)
;; definition for method 13 of type nav-branch
(defmethod nav-branch-method-13 nav-branch ((obj nav-branch))
"TODO
@returns `width * 256.0`"
(* 256.0 (the float (-> obj width)))
)
;; definition for method 14 of type nav-branch
(defmethod user-limit-reached? nav-branch ((obj nav-branch))
(>= (-> obj user-count) (-> obj max-user-count))
)
;; definition for method 15 of type nav-branch
(defmethod nav-branch-method-15 nav-branch ((obj nav-branch))
"TODO - checks that `dest-node`'s `id` isn't #FFFF"
(!= (-> obj dest-node id) #xffff)
)
;; definition for method 21 of type nav-node
(defmethod nav-node-method-21 nav-node ((obj nav-node))
"TODO
@returns `radius * 1024.0"
(* 1024.0 (the float (-> obj radius)))
)
;; definition for method 20 of type nav-node
(defmethod get-angle nav-node ((obj nav-node))
(the float (-> obj angle))
)
;; definition for method 19 of type nav-node
(defmethod calc-sine-and-cosine! nav-node ((obj nav-node) (ret vector))
"Computes the sine and cosine of the `angle`.
@param! ret The result <cosine, 0.0, -(sine), 1.0>
@returns Nothing, the result will be in `ret`"
(let ((angle (the float (-> obj angle)))
(sin-cos-result (new 'stack-no-clear 'vector))
)
(sincos! sin-cos-result angle)
(set! (-> ret x) (-> sin-cos-result y))
(set! (-> ret y) 0.0)
(set! (-> ret z) (- (-> sin-cos-result x)))
)
(set! (-> ret w) 1.0)
ret
)
;; definition for method 18 of type nav-node
;; INFO: Used lq/sq
(defmethod get-position nav-node ((obj nav-node) (ret vector))
"@param! ret The [[vector]] that is modified to hold the result
@returns the `position` [[vector]] with a `w` component of `1.0`"
(set! (-> ret quad) (-> obj position quad))
(set! (-> ret w) 1.0)
ret
)
;; definition of type nav-graph-link
(deftype nav-graph-link (structure)
((id uint32 :offset-assert 0)
(dest-graph-id uint32 :offset-assert 4)
(src-branch-id uint16 :offset-assert 8)
(dest-node-id uint16 :offset-assert 10)
(dest-graph basic :offset-assert 12)
(dummy-node nav-node :inline :offset-assert 16)
)
:method-count-assert 9
:size-assert #x30
:flag-assert #x900000030
)
;; definition for method 3 of type nav-graph-link
(defmethod inspect nav-graph-link ((obj nav-graph-link))
(when (not obj)
(set! obj obj)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" obj 'nav-graph-link)
(format #t "~1Tid: ~D~%" (-> obj id))
(format #t "~1Tdest-graph-id: ~D~%" (-> obj dest-graph-id))
(format #t "~1Tsrc-branch-id: ~D~%" (-> obj src-branch-id))
(format #t "~1Tdest-node-id: ~D~%" (-> obj dest-node-id))
(format #t "~1Tdest-graph: ~A~%" (-> obj dest-graph))
(format #t "~1Tdummy-node: #<nav-node @ #x~X>~%" (-> obj dummy-node))
(label cfg-4)
obj
)
;; definition of type nav-graph
(deftype nav-graph (basic)
((node-count int16 :offset-assert 4)
(branch-count int16 :offset-assert 6)
(node-array (inline-array nav-node) :offset-assert 8)
(branch-array uint32 :offset-assert 12)
(link-count int16 :offset-assert 16)
(pad2 uint16 :offset-assert 18)
(link-array uint32 :offset-assert 20)
(first-node int16 :offset-assert 24)
(pad0 uint16 :offset-assert 26)
(patched basic :offset-assert 28)
(id uint32 :offset-assert 32)
(pad1 uint32 6 :offset-assert 36)
)
:method-count-assert 45
:size-assert #x3c
:flag-assert #x2d0000003c
(:methods
(nav-graph-method-9 () none 9)
(nav-graph-method-10 () none 10)
(nav-graph-method-11 () none 11)
(nav-graph-method-12 () none 12)
(nav-graph-method-13 () none 13)
(nav-graph-method-14 () none 14)
(nav-graph-method-15 () none 15)
(nav-graph-method-16 () none 16)
(nav-graph-method-17 () none 17)
(nav-graph-method-18 () none 18)
(nav-graph-method-19 () none 19)
(nav-graph-method-20 () none 20)
(nav-graph-method-21 () none 21)
(nav-graph-method-22 () none 22)
(nav-graph-method-23 () none 23)
(nav-graph-method-24 () none 24)
(nav-graph-method-25 () none 25)
(nav-graph-method-26 () none 26)
(nav-graph-method-27 () none 27)
(nav-graph-method-28 () none 28)
(nav-graph-method-29 () none 29)
(nav-graph-method-30 () none 30)
(nav-graph-method-31 () none 31)
(nav-graph-method-32 () none 32)
(nav-graph-method-33 () none 33)
(nav-graph-method-34 () none 34)
(nav-graph-method-35 () none 35)
(nav-graph-method-36 () none 36)
(nav-graph-method-37 () none 37)
(nav-graph-method-38 () none 38)
(nav-graph-method-39 () none 39)
(nav-graph-method-40 () none 40)
(node-at-idx (_type_ int) nav-node 41)
(nav-graph-method-42 () none 42)
(nav-graph-method-43 () none 43)
(nav-graph-method-44 () none 44)
)
)
;; definition for method 3 of type nav-graph
(defmethod inspect nav-graph ((obj nav-graph))
(when (not obj)
(set! obj obj)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" obj (-> obj type))
(format #t "~1Tnode-count: ~D~%" (-> obj node-count))
(format #t "~1Tbranch-count: ~D~%" (-> obj branch-count))
(format #t "~1Tnode-array: #x~X~%" (-> obj node-array))
(format #t "~1Tbranch-array: #x~X~%" (-> obj branch-array))
(format #t "~1Tlink-count: ~D~%" (-> obj link-count))
(format #t "~1Tpad2: ~D~%" (-> obj pad2))
(format #t "~1Tlink-array: #x~X~%" (-> obj link-array))
(format #t "~1Tfirst-node: ~D~%" (-> obj first-node))
(format #t "~1Tpad0: ~D~%" (-> obj pad0))
(format #t "~1Tpatched: ~A~%" (-> obj patched))
(format #t "~1Tid: ~D~%" (-> obj id))
(format #t "~1Tpad1[6] @ #x~X~%" (-> obj pad1))
(label cfg-4)
obj
)
;; definition for method 41 of type nav-graph
(defmethod node-at-idx nav-graph ((obj nav-graph) (idx int))
"Get the `nav-node` at a given position.
@param idx The position in the `node-array` to return
@returns the [[nav-node]] if it can be found, otherwise return [[#f]]"
(let ((v0-0 (the-as nav-node #f)))
(if (and (>= idx 0) (< idx (-> obj node-count)))
(set! v0-0 (-> obj node-array idx))
)
v0-0
)
)
;; failed to figure out what this is:
0
+34 -17
View File
@@ -1,9 +1,10 @@
{
"dgos": [
"CGO/KERNEL.CGO",
"CGO/ENGINE.CGO",
"CGO/COMMON.CGO",
"CGO/GAME.CGO"
"CGO/KERNEL.CGO",
"CGO/ENGINE.CGO",
"CGO/COMMON.CGO",
"CGO/GAME.CGO",
"DGO/CWI.DGO"
],
"skip_compile_files": [],
@@ -19,19 +20,33 @@
/// GSTATE
"enter-state", // stack pointer asm
// MATH
"logf", "log2f", "cube-root", "lerp-scale", "rand-vu-init", "rand-vu", "rand-vu-nostep",
"logf",
"log2f",
"cube-root",
"lerp-scale",
"rand-vu-init",
"rand-vu",
"rand-vu-nostep",
// MATRIX
"matrix-axis-sin-cos-vu!", "matrix-axis-sin-cos!", "matrix-3x3-normalize!",
"matrix-axis-sin-cos-vu!",
"matrix-axis-sin-cos!",
"matrix-3x3-normalize!",
// DMA
"disasm-dma-list",
// PAD (bug)
"service-cpads",
// GEOMETRY asm
"closest-pt-in-triangle", "circle-circle-xz-intersect", "calculate-basis-functions-vector!", "curve-evaluate!",
"closest-pt-in-triangle",
"circle-circle-xz-intersect",
"calculate-basis-functions-vector!",
"curve-evaluate!",
// TIMER asm
"(method 9 clock)",
// math camera stupid broken gif crap and CLIP
"update-math-camera", "transform-point-vector!", "transform-point-qword!", "transform-point-vector-scale!",
"update-math-camera",
"transform-point-vector!",
"transform-point-qword!",
"transform-point-vector-scale!",
// quad thing
"(method 3 connection-minimap)",
"(method 3 sky-vertex)",
@@ -53,7 +68,10 @@
// - never fixed this one in jak 1, assumed there was an original bug?
"print-game-text",
// joint asm
"cspace<-parented-transformq-joint!", "(method 11 art-joint-anim-manager)", "make-joint-jump-tables", "joint-channel-copy!",
"cspace<-parented-transformq-joint!",
"(method 11 art-joint-anim-manager)",
"make-joint-jump-tables",
"joint-channel-copy!",
// vector-dot in stack vars
"joint-mod-ik-callback",
"joint-mod-look-at-handler",
@@ -118,7 +136,8 @@
"add-debug-bound",
// gun-util
"draw-beam", "(method 9 gun-info)",
"draw-beam",
"(method 9 gun-info)",
// mood
"update-mood-direction", // power of two case
// texture
@@ -128,6 +147,9 @@
"(method 18 mysql-nav-graph)", // asm / dead-code
"(method 10 mysql-nav-graph)",
// aligner - never fixed in jak 1
"(method 9 align-control)",
"bsp-camera-asm",
"build-masks",
@@ -138,12 +160,7 @@
"cam-bike": [
"code" // hang
],
"cam-stick": [
"code"
],
"cam-circular": [
"enter",
"event"
]
"cam-stick": ["code"],
"cam-circular": ["enter", "event"]
}
}