Skip to content

Commit

Permalink
fix the slide (#1188)
Browse files Browse the repository at this point in the history
  • Loading branch information
water111 authored Feb 20, 2022
1 parent ff6362d commit a1480b5
Show file tree
Hide file tree
Showing 22 changed files with 63 additions and 92 deletions.
16 changes: 8 additions & 8 deletions decompiler/config/all-types.gc
Original file line number Diff line number Diff line change
Expand Up @@ -11516,7 +11516,7 @@
(old-status uint64 :offset-assert 280)
(prev-status uint64 :offset-assert 288)
(reaction-flag uint32 :offset-assert 296)
(reaction (function collide-shape-moving collide-shape-intersect vector vector none) :offset-assert 300)
(reaction (function collide-shape-moving collide-shape-intersect vector vector uint) :offset-assert 300)
(no-reaction (function collide-shape-moving collide-shape-intersect vector vector none) :offset-assert 304)
(local-normal vector :inline :offset-assert 320)
(surface-normal vector :inline :offset-assert 336)
Expand Down Expand Up @@ -18755,8 +18755,8 @@

(define-extern target-attack-up (function target symbol symbol none))
(define-extern find-ground-point (function control-info vector float float vector))
(define-extern default-collision-reaction (function collide-shape-moving collide-shape-intersect vector vector none)) ;; TODO - not completely confirmed
(define-extern simple-collision-reaction (function collide-shape-moving collide-shape-intersect none))
(define-extern default-collision-reaction (function collide-shape-moving collide-shape-intersect vector vector uint)) ;; TODO - not completely confirmed
(define-extern simple-collision-reaction (function collide-shape-moving collide-shape-intersect vector vector uint))
(define-extern collide-shape-draw-debug-marks (function none))
(define-extern debug-report-col-stats (function int))

Expand Down Expand Up @@ -20100,7 +20100,7 @@
(define-extern collide-shape-moving-angle-set! (function collide-shape-moving vector vector none))
(define-extern target-collision-low-coverage (function control-info collide-shape-intersect vector (pointer uint32) (pointer uint64) (pointer symbol) uint)) ;; i think the pointers are lies - TODO
(define-extern poly-find-nearest-edge (function vector (inline-array vector) vector vector vector))
(define-extern target-collision-reaction (function control-info collide-shape-intersect vector vector none))
(define-extern target-collision-reaction (function control-info collide-shape-intersect vector vector uint))
(define-extern target-collision-no-reaction (function control-info collide-shape-intersect vector vector none))


Expand Down Expand Up @@ -21667,7 +21667,7 @@

;; - Functions

(define-extern projectile-collision-reaction (function collide-shape-moving collide-shape-intersect vector vector none))
(define-extern projectile-collision-reaction (function collide-shape-moving collide-shape-intersect vector vector uint))
(define-extern projectile-update-velocity-space-wars (function projectile none))
(define-extern find-nearest-attackable (function vector float uint uint vector float projectile)) ;; Whatever te search returns (match from search-info)
(define-extern find-ground-and-draw-shadow (function vector vector float collide-kind process float float none))
Expand Down Expand Up @@ -23574,7 +23574,7 @@
(define-extern spawn-mistycannon-missile (function process-tree vector vector float float float float entity none))
(define-extern angle-tracker-apply-move! (function angle-tracker float float))
(define-extern mistycannon-missile-init-by-other (function mistycannon-init-data entity none :behavior mistycannon-missile))
(define-extern mistycannon-collision-reaction (function collide-shape-moving collide-shape-intersect none))
(define-extern mistycannon-collision-reaction (function collide-shape-moving collide-shape-intersect vector vector uint))
(define-extern angle-tracker-get-value (function angle-tracker float))
(define-extern angle-tracker-set-value (function angle-tracker float float))
(define-extern solve-missile-tilt (function quadratic-solution float float float float symbol))
Expand Down Expand Up @@ -24280,7 +24280,7 @@
;; - Functions

(define-extern seagull-init-by-other (function vector int seagullflock none :behavior seagull))
(define-extern seagull-reaction (function collide-shape-moving collide-shape-intersect none))
(define-extern seagull-reaction (function collide-shape-moving collide-shape-intersect vector vector uint))
(define-extern seagull-post (function none :behavior seagull))
(define-extern beach-rock-trigger (function int))

Expand Down Expand Up @@ -27097,7 +27097,7 @@

;; - Functions

(define-extern racer-collision-reaction (function control-info collide-shape-intersect vector vector none))
(define-extern racer-collision-reaction (function control-info collide-shape-intersect vector vector uint))
(define-extern racer-service-slide (function none :behavior target))
(define-extern racer-xz (function float float none :behavior target))
(define-extern racer-thrust (function basic float none :behavior target))
Expand Down
10 changes: 1 addition & 9 deletions goal_src/engine/collide/collide-reaction-target.gc
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,6 @@
;; name in dgo: collide-reaction-target
;; dgos: GAME, ENGINE

;; TODO - for logic-target
(define-extern target-collision-reaction (function control-info collide-shape-intersect vector vector none))
(define-extern target-collision-no-reaction (function control-info collide-shape-intersect vector vector none))

;; TODO - for collide-reaction-racer
(define-extern collide-shape-moving-angle-set! (function collide-shape-moving vector vector none)) ;; not confirmed

(defun collide-shape-moving-angle-set! ((arg0 collide-shape-moving) (arg1 vector) (arg2 vector))
(set! (-> arg0 surface-normal quad) (-> arg1 quad))
(set! (-> arg0 surface-angle) (vector-dot arg1 (-> arg0 dynam gravity-normal)))
Expand Down Expand Up @@ -379,8 +372,7 @@
arg2
)
(set! (-> arg0 unknown-halfword00) (logand (+ (-> arg0 unknown-halfword00) 1) 127))
sv-96
(none)
(the-as uint sv-96)
)

;; definition for function target-collision-no-reaction
Expand Down
4 changes: 2 additions & 2 deletions goal_src/engine/collide/collide-shape-h.gc
Original file line number Diff line number Diff line change
Expand Up @@ -538,8 +538,8 @@
(old-status uint64 :offset-assert 280)
(prev-status uint64 :offset-assert 288)
(reaction-flag uint32 :offset-assert 296)
(reaction (function collide-shape-moving collide-shape-intersect vector vector none) :offset-assert 300)
(no-reaction (function collide-shape-moving collide-shape-intersect vector vector none) :offset-assert 304)
(reaction (function collide-shape-moving collide-shape-intersect vector vector uint) :offset-assert 300)
(no-reaction (function collide-shape-moving collide-shape-intersect vector vector none) :offset-assert 304)
(local-normal vector :inline :offset-assert 320)
(surface-normal vector :inline :offset-assert 336)
(poly-normal vector :inline :offset-assert 352)
Expand Down
7 changes: 3 additions & 4 deletions goal_src/engine/collide/collide-shape.gc
Original file line number Diff line number Diff line change
Expand Up @@ -1103,11 +1103,10 @@
)
)
(logior! (-> arg0 status) sv-80)
sv-80
(none)
(the-as uint sv-80)
)

(defun simple-collision-reaction ((arg0 collide-shape-moving) (arg1 collide-shape-intersect))
(defun simple-collision-reaction ((arg0 collide-shape-moving) (arg1 collide-shape-intersect) (arg2 vector) (arg3 vector))
"A much simpler collide reaction."
(let ((s5-0 0))
(let ((a1-1 (new 'stack-no-clear 'vector)))
Expand All @@ -1124,9 +1123,9 @@
)
(let ((v0-1 (logior s5-0 7)))
(logior! (-> arg0 status) v0-1)
(the-as uint v0-1)
)
)
(none)
)

(defmethod step-collison! collide-shape-moving ((obj collide-shape-moving) (arg0 vector) (arg1 vector) (arg2 float))
Expand Down
3 changes: 1 addition & 2 deletions goal_src/engine/game/projectiles.gc
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,7 @@
)
)
(logior! (-> arg0 status) sv-80)
sv-80
(none)
(the-as uint sv-80)
)

(defpartgroup group-yellow-eco-fireball
Expand Down
2 changes: 1 addition & 1 deletion goal_src/engine/target/target-h.gc
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
;; TODO - for target-tube
(define-extern target-attacked (function symbol attack-info process process (state handle attack-info target) object :behavior target)) ;; unconfirmed, target-tube::(event target-tube-start)
;; TODO - for racer-states
(define-extern racer-collision-reaction (function control-info collide-shape-intersect vector vector none))
(define-extern racer-collision-reaction (function control-info collide-shape-intersect vector vector uint))
;; TODO -for target2
(define-extern target-falling-anim-trans (function none :behavior target)) ;; unconfirmed

Expand Down
4 changes: 1 addition & 3 deletions goal_src/levels/beach/beach-obs.gc
Original file line number Diff line number Diff line change
Expand Up @@ -915,9 +915,7 @@
(set! (-> self entity) arg3)
(let ((s3-0 (new 'process 'collide-shape-moving self (collide-list-enum hit-by-player))))
(set! (-> s3-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s3-0 reaction)
(the-as (function collide-shape-moving collide-shape-intersect vector vector none) simple-collision-reaction)
)
(set! (-> s3-0 reaction) simple-collision-reaction)
(set! (-> s3-0 no-reaction)
(the-as (function collide-shape-moving collide-shape-intersect vector vector none) nothing)
)
Expand Down
12 changes: 6 additions & 6 deletions goal_src/levels/beach/seagull.gc
Original file line number Diff line number Diff line change
Expand Up @@ -1276,7 +1276,7 @@
seagull-post
)

(defun seagull-reaction ((arg0 collide-shape-moving) (arg1 collide-shape-intersect))
(defun seagull-reaction ((arg0 collide-shape-moving) (arg1 collide-shape-intersect) (arg2 vector) (arg3 vector))
(let ((s5-0 0))
(let ((a1-1 (new 'stack-no-clear 'vector)))
(vector-float*! a1-1 (-> arg1 move-vec) (-> arg1 best-u))
Expand All @@ -1295,17 +1295,17 @@
(set! (-> (the-as seagull s4-1) temp-heading) (atan (-> v1-7 x) (-> v1-7 z)))
(set! (-> (the-as seagull s4-1) temp-heading-time) 300)
)
(set! (-> arg0 status) (the-as uint (logior s5-0 3)))
(let ((v0-2 (logior s5-0 3)))
(set! (-> arg0 status) (the-as uint v0-2))
(the-as uint v0-2)
)
)
(none)
)

(defbehavior seagull-init-by-other seagull ((arg0 vector) (arg1 int) (arg2 seagullflock))
(let ((s3-0 (new 'process 'collide-shape-moving self (collide-list-enum hit-by-player))))
(set! (-> s3-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s3-0 reaction)
(the-as (function collide-shape-moving collide-shape-intersect vector vector none) seagull-reaction)
)
(set! (-> s3-0 reaction) seagull-reaction)
(set! (-> s3-0 no-reaction)
(the-as (function collide-shape-moving collide-shape-intersect vector vector none) nothing)
)
Expand Down
11 changes: 3 additions & 8 deletions goal_src/levels/misty/mistycannon.gc
Original file line number Diff line number Diff line change
Expand Up @@ -1041,7 +1041,7 @@
(the-as (function none :behavior mistycannon-missile) ja-post)
)

(defun mistycannon-collision-reaction ((arg0 collide-shape-moving) (arg1 collide-shape-intersect))
(defun mistycannon-collision-reaction ((arg0 collide-shape-moving) (arg1 collide-shape-intersect) (arg2 vector) (arg3 vector))
(let ((s5-0 0))
(let ((a1-1 (new 'stack-no-clear 'vector)))
(vector-float*! a1-1 (-> arg1 move-vec) (-> arg1 best-u))
Expand All @@ -1056,9 +1056,9 @@
(vector-float*! (-> arg0 transv) (-> arg0 transv) 0.15)
(let ((v0-1 (logior s5-0 7)))
(logior! (-> arg0 status) v0-1)
(the-as uint v0-1)
)
)
(none)
)

(deftype mistycannon-init-data (structure)
Expand All @@ -1081,12 +1081,7 @@
(set! (-> self entity) arg1)
(let ((s5-0 (new 'process 'collide-shape-moving self (collide-list-enum hit-by-player))))
(set! (-> s5-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s5-0 reaction)
(the-as
(function collide-shape-moving collide-shape-intersect vector vector none)
mistycannon-collision-reaction
)
)
(set! (-> s5-0 reaction) mistycannon-collision-reaction)
(set! (-> s5-0 no-reaction)
(the-as (function collide-shape-moving collide-shape-intersect vector vector none) nothing)
)
Expand Down
3 changes: 1 addition & 2 deletions goal_src/levels/racer_common/collide-reaction-racer.gc
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,7 @@
arg2
)
(set! (-> arg0 unknown-halfword00) (logand (+ (-> arg0 unknown-halfword00) 1) 127))
sv-96
(none)
(the-as uint sv-96)
)


Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test/decompiler/reference/engine/draw/drawable_REF.gc

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions test/decompiler/reference/engine/game/projectiles_REF.gc

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 4 additions & 8 deletions test/decompiler/reference/engine/gfx/generic/generic-vu1_REF.gc

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions test/decompiler/reference/engine/gfx/hw/gs_REF.gc

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions test/decompiler/reference/engine/ui/text-h_REF.gc

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions test/decompiler/reference/engine/ui/text_REF.gc

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions test/decompiler/reference/levels/beach/beach-obs_REF.gc

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit a1480b5

Please sign in to comment.