decomp: weather-part (#798)

* stash

* decomp: finish what is currently possible in `time-of-day`

* need to know how sp-field-init-spec's functions are called

* solved some issues, but going to be blocked by the sparticle-group-item

* decompiler: Add support for `sparticle-launch-group` from static data

* decomp: finish `weather-part`
This commit is contained in:
Tyler Wilding
2021-08-31 21:36:19 -04:00
committed by GitHub
parent 091731f1ca
commit 1c7c2132eb
19 changed files with 5440 additions and 230 deletions
File diff suppressed because it is too large Load Diff
+53 -57
View File
@@ -609,59 +609,59 @@
;; definition of type camera-master
(deftype camera-master (process)
((master-options uint32 :offset-assert 112)
(num-slaves int32 :offset-assert 116)
(slave (pointer camera-slave) 2 :offset-assert 120)
(slave-options uint32 :offset-assert 128)
(view-off-param-save float :offset-assert 132)
(changer uint32 :offset-assert 136)
(cam-entity entity :offset-assert 140)
(stringMinLength float :offset-assert 144)
(stringMaxLength float :offset-assert 148)
(stringMinHeight float :offset-assert 152)
(stringMaxHeight float :offset-assert 156)
(string-min cam-vector-seeker :inline :offset-assert 160)
(string-max cam-vector-seeker :inline :offset-assert 224)
(string-push-z float :offset-assert 284)
(stringCliffHeight float :offset-assert 288)
(no-intro uint32 :offset-assert 292)
(force-blend uint32 :offset-assert 296)
(force-blend-time uint32 :offset-assert 300)
(local-down vector :inline :offset-assert 304)
(drawable-target uint64 :offset-assert 320)
(which-bone int32 :offset-assert 328)
(pov-handle uint64 :offset-assert 336)
(pov-bone int32 :offset-assert 344)
(being-attacked basic :offset-assert 348)
(attack-start uint64 :offset-assert 352)
(on-ground basic :offset-assert 360)
(under-water int32 :offset-assert 364)
(on-pole basic :offset-assert 368)
(tgt-rot-mat matrix :inline :offset-assert 384)
(tgt-face-mat matrix :inline :offset-assert 448)
(tpos-old vector :inline :offset-assert 512)
(tpos-curr vector :inline :offset-assert 528)
(target-height float :offset-assert 544)
(tpos-old-adj vector :inline :offset-assert 560)
(tpos-curr-adj vector :inline :offset-assert 576)
(tpos-tgt vector :inline :offset-assert 592)
(upspeed float :offset-assert 608)
(pitch-off vector :inline :offset-assert 624)
(foot-offset float :offset-assert 640)
(head-offset float :offset-assert 644)
(target-spline tracking-spline :inline :offset-assert 656)
(ease-from vector :inline :offset-assert 2304)
(ease-t float :offset-assert 2320)
(ease-step float :offset-assert 2324)
(ease-to vector :inline :offset-assert 2336)
(outro-curve curve :inline :offset-assert 2352)
(outro-t float :offset-assert 2372)
(outro-t-step float :offset-assert 2376)
(outro-exit-value float :offset-assert 2380)
(water-drip-time uint64 :offset-assert 2384)
(water-drip basic :offset-assert 2392)
(water-drip-mult float :offset-assert 2396)
(water-drip-speed float :offset-assert 2400)
((master-options uint32 :offset-assert 112)
(num-slaves int32 :offset-assert 116)
(slave (pointer camera-slave) 2 :offset-assert 120)
(slave-options uint32 :offset-assert 128)
(view-off-param-save float :offset-assert 132)
(changer uint32 :offset-assert 136)
(cam-entity entity :offset-assert 140)
(stringMinLength float :offset-assert 144)
(stringMaxLength float :offset-assert 148)
(stringMinHeight float :offset-assert 152)
(stringMaxHeight float :offset-assert 156)
(string-min cam-vector-seeker :inline :offset-assert 160)
(string-max cam-vector-seeker :inline :offset-assert 224)
(string-push-z float :offset-assert 284)
(stringCliffHeight float :offset-assert 288)
(no-intro uint32 :offset-assert 292)
(force-blend uint32 :offset-assert 296)
(force-blend-time uint32 :offset-assert 300)
(local-down vector :inline :offset-assert 304)
(drawable-target uint64 :offset-assert 320)
(which-bone int32 :offset-assert 328)
(pov-handle uint64 :offset-assert 336)
(pov-bone int32 :offset-assert 344)
(being-attacked basic :offset-assert 348)
(attack-start uint64 :offset-assert 352)
(on-ground basic :offset-assert 360)
(under-water int32 :offset-assert 364)
(on-pole basic :offset-assert 368)
(tgt-rot-mat matrix :inline :offset-assert 384)
(tgt-face-mat matrix :inline :offset-assert 448)
(tpos-old vector :inline :offset-assert 512)
(tpos-curr vector :inline :offset-assert 528)
(target-height float :offset-assert 544)
(tpos-old-adj vector :inline :offset-assert 560)
(tpos-curr-adj vector :inline :offset-assert 576)
(tpos-tgt vector :inline :offset-assert 592)
(upspeed float :offset-assert 608)
(pitch-off vector :inline :offset-assert 624)
(foot-offset float :offset-assert 640)
(head-offset float :offset-assert 644)
(target-spline tracking-spline :inline :offset-assert 656)
(ease-from vector :inline :offset-assert 2304)
(ease-t float :offset-assert 2320)
(ease-step float :offset-assert 2324)
(ease-to vector :inline :offset-assert 2336)
(outro-curve curve :inline :offset-assert 2352)
(outro-t float :offset-assert 2372)
(outro-t-step float :offset-assert 2376)
(outro-exit-value float :offset-assert 2380)
(water-drip-time uint64 :offset-assert 2384)
(water-drip sparticle-launch-control :offset-assert 2392)
(water-drip-mult float :offset-assert 2396)
(water-drip-speed float :offset-assert 2400)
)
:heap-base #x900
:method-count-assert 14
@@ -744,7 +744,3 @@
;; failed to figure out what this is:
0
@@ -74,14 +74,14 @@
(format #t "~Tfriction: ~f~%" (-> obj friction))
(format #t "~Ttimer: ~D~%" (-> obj timer))
(format #t "~Tflags: ~D~%" (-> obj flags))
(format #t "~Tuser-int32: ~D~%" (-> obj user-int32))
(format #t "~Tuser-uint32: ~D~%" (-> obj user-uint32))
(format #t "~Tuser-float: ~f~%" (the-as float (-> obj user-uint32)))
(format #t "~Tuser-pntr: #x~X~%" (-> obj user-uint32))
(format #t "~Tuser-int32: ~D~%" (-> obj user-float))
(format #t "~Tuser-uint32: ~D~%" (-> obj user-float))
(format #t "~Tuser-float: ~f~%" (the-as float (-> obj user-float)))
(format #t "~Tuser-pntr: #x~X~%" (-> obj user-float))
(format
#t
"~Tuser-sprite: #<sprite-vec-data-2d @ #x~X>~%"
(-> obj user-uint32)
(-> obj user-float)
)
(format #t "~Tfunc: ~A~%" (-> obj func))
(format #t "~Tnext-time: ~D~%" (-> obj next-time))
@@ -122,15 +122,15 @@
;; definition of type sparticle-system
(deftype sparticle-system (basic)
((blocks uint32 2 :offset-assert 4)
(length uint32 2 :offset-assert 12)
(num-alloc uint32 2 :offset-assert 20)
(is-3d basic :offset-assert 28)
(flags uint32 :offset-assert 32)
(alloc-table uint32 :offset-assert 36)
(cpuinfo-table uint32 :offset-assert 40)
(vecdata-table uint32 :offset-assert 44)
(adgifdata-table uint32 :offset-assert 48)
((blocks int32 2 :offset-assert 4)
(length uint32 2 :offset-assert 12)
(num-alloc uint32 2 :offset-assert 20)
(is-3d basic :offset-assert 28)
(flags uint32 :offset-assert 32)
(alloc-table uint32 :offset-assert 36)
(cpuinfo-table sparticle-cpuinfo :offset-assert 40)
(vecdata-table uint32 :offset-assert 44)
(adgifdata-table uint32 :offset-assert 48)
)
:method-count-assert 9
:size-assert #x34
@@ -11,7 +11,7 @@
(initial-valuef float :offset 4)
(random-rangef float :offset 8)
(random-multf float :offset 12)
(func basic :offset 4)
(func symbol :offset 4)
(tex uint32 :offset 4)
(pntr uint32 :offset 4)
(sym basic :offset 4)
@@ -141,13 +141,13 @@
;; definition of type sparticle-launch-group
(deftype sparticle-launch-group (basic)
((length int16 :offset-assert 4)
(duration uint16 :offset-assert 6)
(linger-duration uint16 :offset-assert 8)
(flags uint16 :offset-assert 10)
(name basic :offset-assert 12)
(launcher sparticle-group-item :offset-assert 16)
(bounds sphere :inline :offset-assert 32)
((length int16 :offset-assert 4)
(duration uint16 :offset-assert 6)
(linger-duration uint16 :offset-assert 8)
(flags uint16 :offset-assert 10)
(name basic :offset-assert 12)
(launcher (inline-array sparticle-group-item) :offset-assert 16)
(bounds sphere :inline :offset-assert 32)
)
:method-count-assert 10
:size-assert #x30
+21 -21
View File
@@ -29,8 +29,8 @@
:size-assert #x110
:flag-assert #xb00000110
(:methods
(dummy-9 () none 9)
(dummy-10 () none 10)
(reset! (_type_) symbol 9)
(TODO-RENAME-10 (_type_ int float float vector) object 10)
)
)
@@ -48,24 +48,24 @@
;; definition of type time-of-day-proc
(deftype time-of-day-proc (process)
((year int32 :offset-assert 112)
(month int32 :offset-assert 116)
(week int32 :offset-assert 120)
(day int32 :offset-assert 124)
(hour int32 :offset-assert 128)
(minute int32 :offset-assert 132)
(second int32 :offset-assert 136)
(frame int32 :offset-assert 140)
(time-of-day float :offset-assert 144)
(time-ratio float :offset-assert 148)
(star-count int32 :offset-assert 152)
(stars basic :offset-assert 156)
(sun-count int32 :offset-assert 160)
(sun basic :offset-assert 164)
(green-sun-count int32 :offset-assert 168)
(green-sun basic :offset-assert 172)
(moon-count int32 :offset-assert 176)
(moon basic :offset-assert 180)
((year int32 :offset-assert 112)
(month int32 :offset-assert 116)
(week int32 :offset-assert 120)
(day int32 :offset-assert 124)
(hour int32 :offset-assert 128)
(minute int32 :offset-assert 132)
(second int32 :offset-assert 136)
(frame int32 :offset-assert 140)
(time-of-day float :offset-assert 144)
(time-ratio float :offset-assert 148)
(star-count int32 :offset-assert 152)
(stars sparticle-launch-control :offset-assert 156)
(sun-count int32 :offset-assert 160)
(sun sparticle-launch-control :offset-assert 164)
(green-sun-count int32 :offset-assert 168)
(green-sun sparticle-launch-control :offset-assert 172)
(moon-count int32 :offset-assert 176)
(moon sparticle-launch-control :offset-assert 180)
)
:heap-base #x50
:method-count-assert 14
@@ -141,7 +141,7 @@
(light-masks-0 uint8 2 :offset-assert 2096)
(light-masks-1 uint8 2 :offset-assert 2098)
(light-interp uint32 2 :offset-assert 2100)
(sky basic :offset-assert 2108)
(sky symbol :offset-assert 2108)
(sun-fade float :offset-assert 2112)
(title-updated symbol :offset-assert 2116)
)