Skip to content

Commit

Permalink
decomp: close to finishing projectile
Browse files Browse the repository at this point in the history
blocked by open-goal#754
  • Loading branch information
xTVaser committed Aug 20, 2021
1 parent 69d0840 commit 2029994
Show file tree
Hide file tree
Showing 6 changed files with 1,974 additions and 128 deletions.
257 changes: 129 additions & 128 deletions decompiler/config/all-types.gc
Original file line number Diff line number Diff line change
Expand Up @@ -10934,7 +10934,7 @@
(dummy-37 () none 37)
(dummy-38 () none 38)
(dummy-39 () none 39)
(dummy-40 () none 40)
(dummy-40 (_type_ collide-sticky-rider-group) none 40) ;; WHAT ARE YOU
(dummy-41 () none 41)
(dummy-42 () none 42)
(dummy-43 () none 43)
Expand Down Expand Up @@ -11413,25 +11413,26 @@
;; - Types

(deftype projectile (process-drawable)
((base-trans vector :inline :offset-assert 176)
((root-override collide-shape-moving :score 100 :offset 112)
(base-trans vector :inline :offset-assert 176)
(target vector :inline :offset-assert 192)
(target-base vector :inline :offset-assert 208)
(parent-base vector :inline :offset-assert 224)
(parent-quat vector :inline :offset-assert 240)
(base-vector vector :inline :offset-assert 256)
(timeout uint64 :offset-assert 272)
(options uint64 :offset-assert 280)
(last-target uint64 :offset-assert 288)
(notify-handle uint64 :offset-assert 296)
(last-target handle :offset-assert 288)
(notify-handle handle :offset-assert 296)
(max-speed float :offset-assert 304)
(max-turn float :offset-assert 308)
(old-dist float 16 :offset-assert 312)
(old-dist-count int32 :offset-assert 376)
(hits int32 :offset-assert 380)
(max-hits int32 :offset-assert 384)
(tween float :offset-assert 388)
(attack-mode basic :offset-assert 392)
(update-velocity basic :offset-assert 396)
(attack-mode symbol :offset-assert 392)
(update-velocity (function projectile none) :offset-assert 396)
(counter int32 :offset-assert 400)
(target-count int32 :offset-assert 404)
(sound-id sound-id :offset-assert 408)
Expand All @@ -11442,15 +11443,15 @@
:flag-assert #x1d0130019c
;; inherited inspect of process-drawable
(:methods
(dummy-20 () none 20)
(projectile-dissipate () none 21) ;; state
(projectile-impact () none 22) ;; state
(dummy-23 () none 23)
(dummy-24 (_type_ ) none 24)
(dummy-25 () none 25)
(dummy-26 () none 26)
(dummy-27 () none 27)
(dummy-28 () none 28)
(unknown-state00 () _type_ :state 20) ;; state - sound related?
(projectile-dissipate () _type_ :state 21) ;; state
(projectile-impact () _type_ :state 22) ;; state
(unknown-state01 () _type_ :state 23) ;; state
(dummy-24 (_type_) none 24)
(dummy-25 (_type_) none 25)
(dummy-26 (_type_) none 26)
(dummy-27 (_type_) none 27)
(dummy-28 (_type_) none 28)
)
)

Expand Down Expand Up @@ -18829,94 +18830,94 @@

;; - Types

; (deftype target-bank (basic)
; ((jump-collide-offset meters :offset-assert 4)
; (jump-height-min meters :offset-assert 8)
; (jump-height-max meters :offset-assert 12)
; (double-jump-height-min meters :offset-assert 16)
; (double-jump-height-max meters :offset-assert 20)
; (flip-jump-height-min meters :offset-assert 24)
; (flip-jump-height-max meters :offset-assert 28)
; (duck-jump-height-min meters :offset-assert 32)
; (duck-jump-height-max meters :offset-assert 36)
; (flop-jump-height-min meters :offset-assert 40)
; (flop-jump-height-max meters :offset-assert 44)
; (attack-jump-height-min meters :offset-assert 48)
; (attack-jump-height-max meters :offset-assert 52)
; (edge-grab-jump-height-min meters :offset-assert 56)
; (edge-grab-jump-height-max meters :offset-assert 60)
; (swim-jump-height-min meters :offset-assert 64)
; (swim-jump-height-max meters :offset-assert 68)
; (tube-jump-height-min meters :offset-assert 72)
; (tube-jump-height-max meters :offset-assert 76)
; (wheel-duration uint64 :offset-assert 80)
; (wheel-jump-pre-window uint64 :offset-assert 88)
; (wheel-jump-post-window uint64 :offset-assert 96)
; (wheel-timeout uint64 :offset-assert 104)
; (wheel-speed-min meters :offset-assert 112)
; (wheel-speed-inc meters :offset-assert 116)
; (wheel-flip-duration uint64 :offset-assert 120)
; (wheel-flip-height meters :offset-assert 128)
; (wheel-flip-dist meters :offset-assert 132)
; (wheel-flip-art-height meters :offset-assert 136)
; (wheel-flip-art-dist meters :offset-assert 140)
; (duck-slide-distance meters :offset-assert 144)
; (fall-far meters :offset-assert 148)
; (fall-far-inc meters :offset-assert 152)
; (attack-timeout uint64 :offset-assert 160)
; (ground-timeout uint64 :offset-assert 168)
; (slide-down-timeout uint64 :offset-assert 176)
; (fall-timeout uint64 :offset-assert 184)
; (fall-stumble-threshold meters :offset-assert 192)
; (yellow-projectile-speed meters :offset-assert 196)
; (hit-invulnerable-timeout uint64 :offset-assert 200)
; (run-cycle-length float :offset-assert 208)
; (walk-cycle-dist meters :offset-assert 212)
; (walk-up-cycle-dist meters :offset-assert 216)
; (walk-down-cycle-dist meters :offset-assert 220)
; (walk-side-cycle-dist meters :offset-assert 224)
; (run-cycle-dist meters :offset-assert 228)
; (run-up-cycle-dist meters :offset-assert 232)
; (run-down-cycle-dist meters :offset-assert 236)
; (run-side-cycle-dist meters :offset-assert 240)
; (run-wall-cycle-dist meters :offset-assert 244)
; (duck-walk-cycle-dist meters :offset-assert 248)
; (wade-shallow-walk-cycle-dist meters :offset-assert 252)
; (wade-deep-walk-cycle-dist meters :offset-assert 256)
; (smack-surface-dist meters :offset-assert 260)
; (smack-surface-height meters :offset-assert 264)
; (min-dive-depth meters :offset-assert 268)
; (root-radius meters :offset-assert 272)
; (root-offset vector :inline :offset-assert 288)
; (body-radius meters :offset-assert 304)
; (edge-radius meters :offset-assert 308)
; (edge-offset vector :inline :offset-assert 320)
; (head-radius meters :offset-assert 336)
; (head-height meters :offset-assert 340)
; (head-offset vector :inline :offset-assert 352)
; (spin-radius meters :offset-assert 368)
; (spin-offset vector :inline :offset-assert 384)
; (duck-spin-radius meters :offset-assert 400)
; (duck-spin-offset vector :inline :offset-assert 416)
; (punch-radius meters :offset-assert 432)
; (punch-offset vector :inline :offset-assert 448)
; (uppercut-radius meters :offset-assert 464)
; (uppercut0-offset vector :inline :offset-assert 480)
; (uppercut1-offset vector :inline :offset-assert 496)
; (flop-radius meters :offset-assert 512)
; (flop0-offset vector :inline :offset-assert 528)
; (flop1-offset vector :inline :offset-assert 544)
; (stuck-time seconds :offset-assert 560)
; (stuck-timeout seconds :offset-assert 568)
; (stuck-distance meters :offset-assert 576)
; (tongue-pull-speed-min float :offset-assert 580)
; (tongue-pull-speed-max float :offset-assert 584)
; (yellow-attack-timeout uint64 :offset-assert 592)
; )
; :method-count-assert 9
; :size-assert #x258
; :flag-assert #x900000258
; )
(deftype target-bank (basic)
((jump-collide-offset meters :offset-assert 4)
(jump-height-min meters :offset-assert 8)
(jump-height-max meters :offset-assert 12)
(double-jump-height-min meters :offset-assert 16)
(double-jump-height-max meters :offset-assert 20)
(flip-jump-height-min meters :offset-assert 24)
(flip-jump-height-max meters :offset-assert 28)
(duck-jump-height-min meters :offset-assert 32)
(duck-jump-height-max meters :offset-assert 36)
(flop-jump-height-min meters :offset-assert 40)
(flop-jump-height-max meters :offset-assert 44)
(attack-jump-height-min meters :offset-assert 48)
(attack-jump-height-max meters :offset-assert 52)
(edge-grab-jump-height-min meters :offset-assert 56)
(edge-grab-jump-height-max meters :offset-assert 60)
(swim-jump-height-min meters :offset-assert 64)
(swim-jump-height-max meters :offset-assert 68)
(tube-jump-height-min meters :offset-assert 72)
(tube-jump-height-max meters :offset-assert 76)
(wheel-duration uint64 :offset-assert 80)
(wheel-jump-pre-window uint64 :offset-assert 88)
(wheel-jump-post-window uint64 :offset-assert 96)
(wheel-timeout uint64 :offset-assert 104)
(wheel-speed-min meters :offset-assert 112)
(wheel-speed-inc meters :offset-assert 116)
(wheel-flip-duration uint64 :offset-assert 120)
(wheel-flip-height meters :offset-assert 128)
(wheel-flip-dist meters :offset-assert 132)
(wheel-flip-art-height meters :offset-assert 136)
(wheel-flip-art-dist meters :offset-assert 140)
(duck-slide-distance meters :offset-assert 144)
(fall-far meters :offset-assert 148)
(fall-far-inc meters :offset-assert 152)
(attack-timeout uint64 :offset-assert 160)
(ground-timeout uint64 :offset-assert 168)
(slide-down-timeout uint64 :offset-assert 176)
(fall-timeout uint64 :offset-assert 184)
(fall-stumble-threshold meters :offset-assert 192)
(yellow-projectile-speed meters :offset-assert 196)
(hit-invulnerable-timeout uint64 :offset-assert 200)
(run-cycle-length float :offset-assert 208)
(walk-cycle-dist meters :offset-assert 212)
(walk-up-cycle-dist meters :offset-assert 216)
(walk-down-cycle-dist meters :offset-assert 220)
(walk-side-cycle-dist meters :offset-assert 224)
(run-cycle-dist meters :offset-assert 228)
(run-up-cycle-dist meters :offset-assert 232)
(run-down-cycle-dist meters :offset-assert 236)
(run-side-cycle-dist meters :offset-assert 240)
(run-wall-cycle-dist meters :offset-assert 244)
(duck-walk-cycle-dist meters :offset-assert 248)
(wade-shallow-walk-cycle-dist meters :offset-assert 252)
(wade-deep-walk-cycle-dist meters :offset-assert 256)
(smack-surface-dist meters :offset-assert 260)
(smack-surface-height meters :offset-assert 264)
(min-dive-depth meters :offset-assert 268)
(root-radius meters :offset-assert 272)
(root-offset vector :inline :offset-assert 288)
(body-radius meters :offset-assert 304)
(edge-radius meters :offset-assert 308)
(edge-offset vector :inline :offset-assert 320)
(head-radius meters :offset-assert 336)
(head-height meters :offset-assert 340)
(head-offset vector :inline :offset-assert 352)
(spin-radius meters :offset-assert 368)
(spin-offset vector :inline :offset-assert 384)
(duck-spin-radius meters :offset-assert 400)
(duck-spin-offset vector :inline :offset-assert 416)
(punch-radius meters :offset-assert 432)
(punch-offset vector :inline :offset-assert 448)
(uppercut-radius meters :offset-assert 464)
(uppercut0-offset vector :inline :offset-assert 480)
(uppercut1-offset vector :inline :offset-assert 496)
(flop-radius meters :offset-assert 512)
(flop0-offset vector :inline :offset-assert 528)
(flop1-offset vector :inline :offset-assert 544)
(stuck-time seconds :offset-assert 560)
(stuck-timeout seconds :offset-assert 568)
(stuck-distance meters :offset-assert 576)
(tongue-pull-speed-min float :offset-assert 580)
(tongue-pull-speed-max float :offset-assert 584)
(yellow-attack-timeout uint64 :offset-assert 592)
)
:method-count-assert 9
:size-assert #x258
:flag-assert #x900000258
)

;; - Functions

Expand Down Expand Up @@ -18950,7 +18951,7 @@

;; - Unknowns

;;(define-extern *TARGET-bank* object) ;; unknown type
(define-extern *TARGET-bank* target-bank) ;; unknown type
;;(define-extern target-slide-down object) ;; unknown type
;;(define-extern target-falling object) ;; unknown type
(define-extern *jchar-sg* skeleton-group)
Expand Down Expand Up @@ -19243,7 +19244,7 @@
;; - Functions

(define-extern target-swim-tilt function)
(define-extern projectile-init-by-other function)
(define-extern projectile-init-by-other (function projectile vector vector uint handle none :behavior projectile)) ;; 4th arg is `options`, 5th is `last-target`
(define-extern first-person-hud-init-by-other function)
(define-extern disable-hud function)
(define-extern enable-hud function)
Expand Down Expand Up @@ -20260,7 +20261,7 @@

;; - Functions

(define-extern eco-blue-glow function)
(define-extern eco-blue-glow (function collide-shape-prim none))
(define-extern cloud-track (function none))


Expand Down Expand Up @@ -20775,35 +20776,35 @@

;; - Types

; (deftype search-info (structure)
; ((point vector :inline :offset-assert 0)
; (best-point vector :inline :offset-assert 16)
; (match-handle uint64 :offset-assert 32)
; (match basic :offset-assert 40)
; (best float :offset-assert 44)
; (radius float :offset-assert 48)
; (rating uint32 :offset-assert 52)
; (require uint32 :offset-assert 56)
; (mask uint32 :offset-assert 60)
; (rot-base vector :inline :offset-assert 64)
; (rot-range float :offset-assert 80)
; )
; :method-count-assert 9
; :size-assert #x54
; :flag-assert #x900000054
; )
(deftype search-info (structure)
((point vector :inline :offset-assert 0)
(best-point vector :inline :offset-assert 16)
(match-handle uint64 :offset-assert 32)
(match projectile :offset-assert 40)
(best float :offset-assert 44)
(radius float :offset-assert 48)
(rating uint32 :offset-assert 52)
(require uint32 :offset-assert 56)
(mask uint32 :offset-assert 60)
(rot-base vector :inline :offset-assert 64)
(rot-range float :offset-assert 80)
)
:method-count-assert 9
:size-assert #x54
:flag-assert #x900000054
)

;; - Functions

(define-extern projectile-collision-reaction function)
(define-extern projectile-update-velocity-space-wars function)
(define-extern find-nearest-attackable function)
(define-extern projectile-collision-reaction (function collide-shape-moving collide-shape-intersect vector vector none))
(define-extern projectile-update-velocity-space-wars (function projectile none))
(define-extern find-nearest-attackable (function vector float uint32 uint32 vector float projectile)) ;; Whatever te search returns (match from search-info)
(define-extern find-ground-and-draw-shadow (function vector vector float uint process float float none))
(define-extern spawn-projectile-blue function)
(define-extern spawn-projectile-blue (function target none))

;; - Unknowns

;;(define-extern *search-info* object) ;; unknown type
(define-extern *search-info* search-info) ;; unknown type


;; ----------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -671,5 +671,17 @@
[1, "(function none :behavior minershort)"]
],

"projectiles": [
[0, "(function none :behavior projectile)"],
[1, "(function symbol :behavior projectile)"],
[13, "(function symbol :behavior projectile)"],
[17, "(function none :behavior projectile)"],
[18, "(function none :behavior projectile)"],
[20, "(function none :behavior projectile)"],
[21, "(function process int symbol event-message-block object :behavior projectile)"],
[22, "(function uint :behavior projectile)"],
[27, "(function projectile int)"]
],

"placeholder-do-not-add-below": []
}
Loading

0 comments on commit 2029994

Please sign in to comment.