Skip to content

Commit

Permalink
undo some things
Browse files Browse the repository at this point in the history
  • Loading branch information
Zedb0T committed Jan 16, 2024
1 parent aa3b756 commit 54b4924
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 37 deletions.
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"comments": true,
"strings": true
},
"editor.wordBasedSuggestions": true,
"editor.wordBasedSuggestions": "matchingDocuments",
"editor.snippetSuggestions": "top"
},
"python.formatting.provider": "black",
Expand Down
68 changes: 32 additions & 36 deletions goal_src/jak2/levels/tomb/tomb-boulder.gc
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
)

(deftype tomb-spider (process-drawable)
((root collide-shape-moving :override)
((root collide-shape-moving :override)
)
(:state-methods
idle
Expand Down Expand Up @@ -181,8 +181,8 @@
)

(deftype tomb-boulder-stop (process-drawable)
((root collide-shape-moving :override)
(prefix string)
((root collide-shape-moving :override)
(prefix string)
)
(:state-methods
idle
Expand Down Expand Up @@ -455,15 +455,11 @@
(let ((gp-2 (ppointer->handle (process-spawn scene-player :init scene-player-init "tomb-boulder-start" #t #f))))
(while (handle->process (the-as handle gp-2))
(suspend)
(reset-actors 'game)
)
(reset-actors 'game)
)
(sleep-code)
(reset-actors 'game)
)
(suspend)
(reset-actors 'game)
)
#f
)
Expand Down Expand Up @@ -525,7 +521,9 @@
(set! (-> self sub-mode) (the-as uint 0))
(set! (-> self current-speed) 0.0)
(set! (-> self previous-y-vel) 0.0)
(set! (-> self previous-y) (-> (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data 4)) y))
(set! (-> self previous-y)
(-> (vector<-cspace! (new 'stack-no-clear 'vector) (joint-node tomb-boulder-lod0-jg boulderrot)) y)
)
(set! (-> self spider) (process-spawn tomb-spider :init tomb-spider-init :to self))
(set! (-> self explode)
(process-spawn
Expand Down Expand Up @@ -764,7 +762,7 @@
((or (zero? v1-0) (= v1-0 1))
(when (and (not (-> self target-pause)) (not (-> self current-pause)))
(let ((gp-0 (new 'stack-no-clear 'collide-query)))
(vector<-cspace! (-> gp-0 start-pos) (-> self node-list data 4))
(vector<-cspace! (-> gp-0 start-pos) (joint-node tomb-boulder-lod0-jg boulderrot))
(set-vector! (-> gp-0 move-dist) 0.0 -24576.0 0.0 1.0)
(let ((v1-7 gp-0))
(set! (-> v1-7 radius) 409.6)
Expand Down Expand Up @@ -972,11 +970,9 @@
(seek! (-> self target-speed) f30-3 (* 20.0 (seconds-per-frame)))
)
(seek! (-> self target-speed) f30-3 (seconds-per-frame))
(when (or (!= (-> self target-speed) (-> self current-speed))
(>= (- (current-time) (-> self speed-time)) (seconds 0.2))
)
(when (or (!= (-> self target-speed) (-> self current-speed)) (time-elapsed? (-> self speed-time) (seconds 0.2)))
(set! (-> self current-speed) (-> self target-speed))
(set! (-> self speed-time) (current-time))
(set-time! (-> self speed-time))
(when *sound-player-enable*
(let ((v1-151 (the-as sound-rpc-set-param (get-sound-buffer-entry))))
(set! (-> v1-151 command) (sound-command set-param))
Expand All @@ -1002,15 +998,15 @@
)

;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! ((obj tomb-boulder) (arg0 entity-actor))
(defmethod init-from-entity! ((this tomb-boulder) (arg0 entity-actor))
"Typically the method that does the initial setup on the process, potentially using the [[entity-actor]] provided as part of that.
This commonly includes things such as:
- stack size
- collision information
- loading the skeleton group / bones
- sounds"
(stack-size-set! (-> obj main-thread) 512)
(let ((s4-0 (new 'process 'collide-shape-moving obj (collide-list-enum hit-by-player))))
(stack-size-set! (-> this main-thread) 512)
(let ((s4-0 (new 'process 'collide-shape-moving this (collide-list-enum hit-by-player))))
(set! (-> s4-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s4-0 reaction) cshape-reaction-default)
(set! (-> s4-0 no-reaction)
Expand All @@ -1032,24 +1028,24 @@ This commonly includes things such as:
(set! (-> s4-0 backup-collide-as) (-> v1-18 prim-core collide-as))
(set! (-> s4-0 backup-collide-with) (-> v1-18 prim-core collide-with))
)
(set! (-> obj root) s4-0)
(set! (-> this root) s4-0)
)
(process-drawable-from-entity! obj arg0)
(logclear! (-> obj mask) (process-mask actor-pause))
(process-drawable-from-entity! this arg0)
(logclear! (-> this mask) (process-mask actor-pause))
(initialize-skeleton
obj
this
(the-as skeleton-group (art-group-get-by-name *level* "skel-tomb-boulder" (the-as (pointer uint32) #f)))
(the-as pair 0)
)
(logior! (-> obj skel status) (joint-control-status sync-math))
(set! (-> obj art-name) "tomb-boulder")
(set! (-> obj loop-id) (new-sound-id))
(set! (-> obj target-pause) #f)
(set! (-> obj current-pause) #f)
(set-vector! (-> obj dir) 1.0 0.0 0.0 1.0)
(set! (-> obj part) (create-launch-control (-> *part-group-id-table* 739) obj))
(set! (-> obj draw light-index) (the-as uint 11))
(go (method-of-object obj idle))
(logior! (-> this skel status) (joint-control-status sync-math))
(set! (-> this art-name) "tomb-boulder")
(set! (-> this loop-id) (new-sound-id))
(set! (-> this target-pause) #f)
(set! (-> this current-pause) #f)
(set-vector! (-> this dir) 1.0 0.0 0.0 1.0)
(set! (-> this part) (create-launch-control (-> *part-group-id-table* 739) this))
(set! (-> this draw light-index) (the-as uint 11))
(go (method-of-object this idle))
(none)
)

Expand Down Expand Up @@ -1163,8 +1159,8 @@ This commonly includes things such as:
)

(deftype spider-eyes (process-drawable)
((root collide-shape-moving :override)
(node-index uint32)
((root collide-shape-moving :override)
(node-index uint32)
)
(:state-methods
idle
Expand All @@ -1175,7 +1171,7 @@ This commonly includes things such as:
)


(defmethod spider-eyes-method-21 ((obj spider-eyes))
(defmethod spider-eyes-method-21 ((this spider-eyes))
(rlet ((acc :class vf)
(vf0 :class vf)
(vf4 :class vf)
Expand All @@ -1189,12 +1185,12 @@ This commonly includes things such as:
(gp-0 (new 'stack-no-clear 'vector))
)
(let ((f0-3 (* 0.25 (sin (* 0.5 (-> *camera-other-fov* data))))))
(set-vector! (-> obj root scale) f0-3 f0-3 f0-3 1.0)
(set-vector! (-> this root scale) f0-3 f0-3 f0-3 1.0)
)
(set! (-> gp-0 quad) (-> *camera-other-trans* quad))
(vector-normalize-copy! s5-0 (-> s3-0 vector 2) 1.0)
(matrix->quaternion (-> obj root quat) s3-0)
(let ((v1-8 (-> obj root trans)))
(matrix->quaternion (-> this root quat) s3-0)
(let ((v1-8 (-> this root trans)))
(let ((a0-8 2048.0))
(.mov vf7 a0-8)
)
Expand Down Expand Up @@ -1326,4 +1322,4 @@ This commonly includes things such as:
:peaceful #t
:save #f
)
)
)

0 comments on commit 54b4924

Please sign in to comment.