From ac6e8a0717e36e7be5b1273983605f575c7a834d Mon Sep 17 00:00:00 2001 From: ManDude <7569514+ManDude@users.noreply.github.com> Date: Sat, 18 Jun 2022 18:58:29 +0100 Subject: [PATCH] `village-obs` PAL patch --- decompiler/config/all-types.gc | 12 +++++++ decompiler/config/jak1_pal.jsonc | 4 +-- goal_src/levels/village1/village-obs.gc | 47 +++++++++++++++++++++++++ 3 files changed, 61 insertions(+), 2 deletions(-) diff --git a/decompiler/config/all-types.gc b/decompiler/config/all-types.gc index b2c6fd3099..b8b67ba9eb 100644 --- a/decompiler/config/all-types.gc +++ b/decompiler/config/all-types.gc @@ -28259,6 +28259,17 @@ :flag-assert #x1e007000dc ) +(deftype evilplant (process-drawable) + () + :method-count-assert 21 + :size-assert #xb0 + :heap-base #x40 + :flag-assert #x15004000b0 + (:methods + (idle () _type_ :state 20) + ) + ) + ;; - Functions (define-extern set-period (function cyclegen int float)) @@ -28292,6 +28303,7 @@ (define-extern *med-res-village12-sg* skeleton-group) (define-extern *med-res-village13-sg* skeleton-group) (define-extern *med-res-training-sg* skeleton-group) +(define-extern *evilplant-sg* skeleton-group) ;; ---------------------- diff --git a/decompiler/config/jak1_pal.jsonc b/decompiler/config/jak1_pal.jsonc index 29e05429d8..3a08fed2ae 100644 --- a/decompiler/config/jak1_pal.jsonc +++ b/decompiler/config/jak1_pal.jsonc @@ -6,7 +6,7 @@ // if you want to filter to only some object names. // it will make the decompiler much faster. - "allowed_objects": ["yakow", "village1cam-ag", "yakow-ag"], + "allowed_objects": ["village-obs", "windmill-sail-ag", "medres-beach3-ag", "mayorgears-ag", "medres-village11-ag", "revcycleprop-ag", "medres-jungle2-ag", "revcycle-ag", "medres-misty-ag", "sagesail-ag", "windspinner-ag", "medres-jungle1-ag", "medres-village12-ag", "hutlamp-ag", "medres-jungle-ag", "medres-village13-ag", "medres-beach2-ag", "villa-starfish-ag", "medres-training-ag", "medres-beach-ag", "reflector-middle-ag", "medres-beach1-ag", "evilplant-ag"], "banned_objects": [], //////////////////////////// @@ -39,7 +39,7 @@ // unpack game count to assets folder "process_game_count": false, // write goal imports for art groups - "process_art_groups": false, + "process_art_groups": true, /////////////////////////// // WEIRD OPTIONS diff --git a/goal_src/levels/village1/village-obs.gc b/goal_src/levels/village1/village-obs.gc index 5eb209921b..1f1f8e095c 100644 --- a/goal_src/levels/village1/village-obs.gc +++ b/goal_src/levels/village1/village-obs.gc @@ -520,6 +520,53 @@ (none) ) +;; PAL patch here +(deftype evilplant (process-drawable) + () + :heap-base #x40 + :method-count-assert 21 + :size-assert #xb0 + :flag-assert #x15004000b0 + (:methods + (idle () _type_ :state 20) + ) + ) + +(defmethod inspect evilplant ((obj evilplant)) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 obj) + ) + obj + ) + +(defskelgroup *evilplant-sg* evilplant evilplant-lod0-jg evilplant-idle-ja + ((evilplant-lod0-mg (meters 999999))) + :bounds (static-spherem 0 1 0 3.8) + ) + +(defstate idle (evilplant) + :virtual #t + :code (behavior () + (loop + (ja-no-eval :group! (ja-group) :num! (seek!) :frame-num 0.0) + (until (ja-done? 0) + (suspend) + (ja :num! (seek!)) + ) + ) + (none) + ) + :post (the-as (function none :behavior evilplant) ja-post) + ) + +(defmethod init-from-entity! evilplant ((obj evilplant) (arg0 entity-actor)) + (set! (-> obj root) (new 'process 'trsqv)) + (process-drawable-from-entity! obj arg0) + (initialize-skeleton obj *evilplant-sg* '()) + (go (method-of-object obj idle)) + (none) + ) + (deftype reflector-middle (process-drawable) ((reflector-trans vector :inline :offset-assert 176) (next-reflector-trans vector :inline :offset-assert 192)