diff --git a/decompiler/config/jak2/ntsc_v1/stack_structures.jsonc b/decompiler/config/jak2/ntsc_v1/stack_structures.jsonc index ca8d6b41ff..7afdfd631d 100644 --- a/decompiler/config/jak2/ntsc_v1/stack_structures.jsonc +++ b/decompiler/config/jak2/ntsc_v1/stack_structures.jsonc @@ -1887,7 +1887,7 @@ ], "(method 181 bombbot)": [[16, ["array", "collide-shape", 64]]], "test-gen-perms": [[16, "gen-perms-context"]], - "gen-perms": [[16, "gen-perms-context"]], + "gen-perms": [[16, ["array", "int32", 32]]], "(method 11 hover-formation-control)": [[16, ["inline-array", "vector", 16]]], "(method 11 hover-formation)": [[16, "vector"]], "birth-func-onin-bubble-birth-pop": [[16, "vector"]], diff --git a/goal_src/jak2/levels/common/enemy/hover/hover-formation.gc b/goal_src/jak2/levels/common/enemy/hover/hover-formation.gc index a4f1589e2b..aa794046b8 100644 --- a/goal_src/jak2/levels/common/enemy/hover/hover-formation.gc +++ b/goal_src/jak2/levels/common/enemy/hover/hover-formation.gc @@ -214,23 +214,23 @@ (arg3 form-search-info) ) (local-vars (sv-80 int)) - (let ((s2-0 (new 'stack-no-clear 'gen-perms-context))) + (let ((s2-0 (new 'stack-no-clear 'array 'int32 32))) (dotimes (v1-0 arg0) - (set! (-> (the-as (pointer int32) (+ (the-as uint s2-0) (* v1-0 4)))) 0) + (set! (-> s2-0 v1-0) 0) ) (arg2 arg3) (let ((s1-0 1)) (while (< s1-0 arg0) (cond - ((>= (-> (the-as (pointer int32) (+ (the-as uint s2-0) (* s1-0 4)))) s1-0) - (set! (-> (the-as (pointer int32) (+ (the-as uint s2-0) (* s1-0 4)))) 0) + ((>= (-> s2-0 s1-0) s1-0) + (set! (-> s2-0 s1-0) 0) 0 ) (else (let ((s0-0 arg1)) (set! sv-80 s1-0) (let ((a1-1 (if (odd? s1-0) - (-> (the-as (pointer int32) (+ (the-as uint s2-0) (* s1-0 4)))) + (-> s2-0 s1-0) 0 ) ) @@ -239,7 +239,7 @@ (s0-0 sv-80 a1-1 a2-1) ) ) - (+! (-> (the-as (pointer int32) (+ (the-as uint s2-0) (* s1-0 4)))) 1) + (+! (-> s2-0 s1-0) 1) (arg2 arg3) (set! s1-0 0) ) diff --git a/test/decompiler/reference/jak2/levels/common/enemy/hover/hover-formation_REF.gc b/test/decompiler/reference/jak2/levels/common/enemy/hover/hover-formation_REF.gc index a2feb5fcc3..cd136e0504 100644 --- a/test/decompiler/reference/jak2/levels/common/enemy/hover/hover-formation_REF.gc +++ b/test/decompiler/reference/jak2/levels/common/enemy/hover/hover-formation_REF.gc @@ -235,23 +235,23 @@ (arg3 form-search-info) ) (local-vars (sv-80 int)) - (let ((s2-0 (new 'stack-no-clear 'gen-perms-context))) + (let ((s2-0 (new 'stack-no-clear 'array 'int32 32))) (dotimes (v1-0 arg0) - (set! (-> (the-as (pointer int32) (+ (the-as uint s2-0) (* v1-0 4)))) 0) + (set! (-> s2-0 v1-0) 0) ) (arg2 arg3) (let ((s1-0 1)) (while (< s1-0 arg0) (cond - ((>= (-> (the-as (pointer int32) (+ (the-as uint s2-0) (* s1-0 4)))) s1-0) - (set! (-> (the-as (pointer int32) (+ (the-as uint s2-0) (* s1-0 4)))) 0) + ((>= (-> s2-0 s1-0) s1-0) + (set! (-> s2-0 s1-0) 0) 0 ) (else (let ((s0-0 arg1)) (set! sv-80 s1-0) (let ((a1-1 (if (odd? s1-0) - (-> (the-as (pointer int32) (+ (the-as uint s2-0) (* s1-0 4)))) + (-> s2-0 s1-0) 0 ) ) @@ -260,7 +260,7 @@ (s0-0 sv-80 a1-1 a2-1) ) ) - (+! (-> (the-as (pointer int32) (+ (the-as uint s2-0) (* s1-0 4)))) 1) + (+! (-> s2-0 s1-0) 1) (arg2 arg3) (set! s1-0 0) )