diff --git a/decompiler/config/all-types.gc b/decompiler/config/all-types.gc index 04e8670202..3356df5339 100644 --- a/decompiler/config/all-types.gc +++ b/decompiler/config/all-types.gc @@ -26689,6 +26689,11 @@ (plant-boss-arm-hit basic) plant-boss-back-arms-idle plant-boss-arm-idle + (plant-boss-root-die symbol) + (plant-boss-vine-die symbol) + (plant-boss-vine-hit basic) + plant-boss-vine-idle + plant-boss-root-idle ) ) @@ -26739,12 +26744,7 @@ :size-assert #x124 :flag-assert #x1400c00124 (:states - (plant-boss-root-die symbol) - (plant-boss-vine-die symbol) - (plant-boss-vine-hit basic) plant-boss-eat - plant-boss-vine-idle - plant-boss-root-idle (plant-boss-dead symbol) plant-boss-far-idle plant-boss-dead-idle diff --git a/goal_src/levels/jungleb/plant-boss.gc b/goal_src/levels/jungleb/plant-boss.gc index 1964fbeb19..70f095054c 100644 --- a/goal_src/levels/jungleb/plant-boss.gc +++ b/goal_src/levels/jungleb/plant-boss.gc @@ -8,6 +8,7 @@ (declare-type plant-boss-leaf process-drawable) ;; DECOMP BEGINS + (import "goal_src/import/plant-boss-ag.gc") (deftype plant-boss (process-drawable) @@ -47,12 +48,7 @@ plant-boss-idle plant-boss-intro (plant-boss-reset int) - (plant-boss-root-die symbol) - plant-boss-root-idle plant-boss-spawn - (plant-boss-vine-die symbol) - (plant-boss-vine-hit basic) - plant-boss-vine-idle plant-boss-vulnerable ) ) @@ -95,6 +91,11 @@ (plant-boss-back-arms-die symbol) (plant-boss-back-arms-hit symbol) plant-boss-back-arms-idle + (plant-boss-root-die symbol) + plant-boss-root-idle + (plant-boss-vine-die symbol) + (plant-boss-vine-hit basic) + plant-boss-vine-idle ) ) @@ -459,7 +460,7 @@ (the-as (function none :behavior plant-boss-arm) ja-post) ) -(defstate plant-boss-vine-idle (plant-boss) +(defstate plant-boss-vine-idle (plant-boss-arm) :event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) (case arg2 @@ -485,10 +486,10 @@ (none) ) :post - (the-as (function none :behavior plant-boss) ja-post) + (the-as (function none :behavior plant-boss-arm) ja-post) ) -(defstate plant-boss-vine-hit (plant-boss) +(defstate plant-boss-vine-hit (plant-boss-arm) :event (-> plant-boss-vine-idle event) :code @@ -510,10 +511,10 @@ (none) ) :post - (the-as (function none :behavior plant-boss) ja-post) + (the-as (function none :behavior plant-boss-arm) ja-post) ) -(defstate plant-boss-vine-die (plant-boss) +(defstate plant-boss-vine-die (plant-boss-arm) :code (behavior ((arg0 symbol)) (when (not arg0) @@ -536,10 +537,10 @@ (none) ) :post - (the-as (function none :behavior plant-boss) ja-post) + (the-as (function none :behavior plant-boss-arm) ja-post) ) -(defstate plant-boss-root-idle (plant-boss) +(defstate plant-boss-root-idle (plant-boss-arm) :event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) (case arg2 @@ -562,10 +563,10 @@ (none) ) :post - (the-as (function none :behavior plant-boss) ja-post) + (the-as (function none :behavior plant-boss-arm) ja-post) ) -(defstate plant-boss-root-die (plant-boss) +(defstate plant-boss-root-die (plant-boss-arm) :code (behavior ((arg0 symbol)) (when (not arg0) @@ -579,7 +580,7 @@ (none) ) :post - (the-as (function none :behavior plant-boss) ja-post) + (the-as (function none :behavior plant-boss-arm) ja-post) ) (defbehavior plant-boss-arm-init plant-boss-arm ((arg0 vector) (arg1 float) (arg2 int)) diff --git a/test/decompiler/reference/levels/jungleb/plant-boss_REF.gc b/test/decompiler/reference/levels/jungleb/plant-boss_REF.gc index f7ab2783ae..86764f9aff 100644 --- a/test/decompiler/reference/levels/jungleb/plant-boss_REF.gc +++ b/test/decompiler/reference/levels/jungleb/plant-boss_REF.gc @@ -41,12 +41,7 @@ plant-boss-idle plant-boss-intro (plant-boss-reset int) - (plant-boss-root-die symbol) - plant-boss-root-idle plant-boss-spawn - (plant-boss-vine-die symbol) - (plant-boss-vine-hit basic) - plant-boss-vine-idle plant-boss-vulnerable ) ) @@ -118,6 +113,11 @@ (plant-boss-back-arms-die symbol) (plant-boss-back-arms-hit symbol) plant-boss-back-arms-idle + (plant-boss-root-die symbol) + plant-boss-root-idle + (plant-boss-vine-die symbol) + (plant-boss-vine-hit basic) + plant-boss-vine-idle ) ) @@ -519,7 +519,7 @@ ) ;; failed to figure out what this is: -(defstate plant-boss-vine-idle (plant-boss) +(defstate plant-boss-vine-idle (plant-boss-arm) :event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) (case arg2 @@ -545,11 +545,11 @@ (none) ) :post - (the-as (function none :behavior plant-boss) ja-post) + (the-as (function none :behavior plant-boss-arm) ja-post) ) ;; failed to figure out what this is: -(defstate plant-boss-vine-hit (plant-boss) +(defstate plant-boss-vine-hit (plant-boss-arm) :event (-> plant-boss-vine-idle event) :code @@ -571,11 +571,11 @@ (none) ) :post - (the-as (function none :behavior plant-boss) ja-post) + (the-as (function none :behavior plant-boss-arm) ja-post) ) ;; failed to figure out what this is: -(defstate plant-boss-vine-die (plant-boss) +(defstate plant-boss-vine-die (plant-boss-arm) :code (behavior ((arg0 symbol)) (when (not arg0) @@ -598,11 +598,11 @@ (none) ) :post - (the-as (function none :behavior plant-boss) ja-post) + (the-as (function none :behavior plant-boss-arm) ja-post) ) ;; failed to figure out what this is: -(defstate plant-boss-root-idle (plant-boss) +(defstate plant-boss-root-idle (plant-boss-arm) :event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) (case arg2 @@ -625,11 +625,11 @@ (none) ) :post - (the-as (function none :behavior plant-boss) ja-post) + (the-as (function none :behavior plant-boss-arm) ja-post) ) ;; failed to figure out what this is: -(defstate plant-boss-root-die (plant-boss) +(defstate plant-boss-root-die (plant-boss-arm) :code (behavior ((arg0 symbol)) (when (not arg0) @@ -643,7 +643,7 @@ (none) ) :post - (the-as (function none :behavior plant-boss) ja-post) + (the-as (function none :behavior plant-boss-arm) ja-post) ) ;; definition for function plant-boss-arm-init