From 9d0009715e3e5b09245b0fa847804ff83f0e91e6 Mon Sep 17 00:00:00 2001 From: water111 <48171810+water111@users.noreply.github.com> Date: Sat, 27 Jul 2024 12:46:33 -0400 Subject: [PATCH] [jak3] Fix alpha for prims, entity-table (#3609) Fix issue where light-trail is invisible and some actors not spawning due to out of memory. --- decompiler/config/jak3/all-types.gc | 27 +- .../opengl_renderer/foreground/Generic2.cpp | 2 +- .../foreground/Generic2_Build.cpp | 10 + goal_src/jak3/engine/entity/entity-h.gc | 2 +- goal_src/jak3/engine/entity/entity-table.gc | 502 ++++++++---------- goalc/compiler/compilation/Static.cpp | 2 +- .../jak3/engine/entity/entity-h_REF.gc | 2 +- .../jak3/engine/entity/entity-table_REF.gc | 241 +++++++++ 8 files changed, 513 insertions(+), 275 deletions(-) create mode 100644 test/decompiler/reference/jak3/engine/entity/entity-table_REF.gc diff --git a/decompiler/config/jak3/all-types.gc b/decompiler/config/jak3/all-types.gc index b846b47fb..3c168afed 100644 --- a/decompiler/config/jak3/all-types.gc +++ b/decompiler/config/jak3/all-types.gc @@ -25908,8 +25908,33 @@ :flag-assert #xe00000010 ) +;; doesn't exist, but referenced by type ref in the entity table. +(deftype sail-boat-a (process-drawable-reserved) + () + ) + +(deftype cty-window-a (process-drawable-reserved) + () + ) + +(deftype city-window-a (process-drawable-reserved) + () + ) + +(deftype cty-guard-turret (process-drawable-reserved) + () + ) + +(deftype cty-fruit-stand (process-drawable-reserved) + () + ) + +(deftype torn (process-drawable-reserved) + () + ) + (deftype entity-info (basic) - ((ptype type :offset-assert 4) ;; guessed by decompiler + ((ptype object :offset-assert 4) ;; guessed by decompiler (pool symbol :offset-assert 8) ;; guessed by decompiler (heap-size int32 :offset-assert 12) ) diff --git a/game/graphics/opengl_renderer/foreground/Generic2.cpp b/game/graphics/opengl_renderer/foreground/Generic2.cpp index 3301d77ba..6f0a67412 100644 --- a/game/graphics/opengl_renderer/foreground/Generic2.cpp +++ b/game/graphics/opengl_renderer/foreground/Generic2.cpp @@ -86,10 +86,10 @@ void Generic2::render_in_mode(DmaFollower& dma, auto p = prof.make_scoped_child("setup"); switch (mode) { case Mode::NORMAL: - case Mode::PRIM: setup_draws(true, true); break; case Mode::LIGHTNING: + case Mode::PRIM: setup_draws(false, true); break; case Mode::WARP: diff --git a/game/graphics/opengl_renderer/foreground/Generic2_Build.cpp b/game/graphics/opengl_renderer/foreground/Generic2_Build.cpp index 25b2963fd..b4ae86df2 100644 --- a/game/graphics/opengl_renderer/foreground/Generic2_Build.cpp +++ b/game/graphics/opengl_renderer/foreground/Generic2_Build.cpp @@ -190,6 +190,16 @@ void Generic2::determine_draw_modes(bool enable_at, bool default_fog) { current_mode.set_alpha_fail(reg.afail()); current_mode.set_zt(reg.zte()); current_mode.set_depth_test(reg.ztest()); + + // detect a strange way of disabling z writes by light-trail. + // we don't actually handle alpha_fail later on in Direct - it doesn't map well to modern + // graphics and would require a draw call per primitive. + if (current_mode.get_alpha_fail() == GsTest::AlphaFail::FB_ONLY && + current_mode.get_aref() == 0x80 && + current_mode.get_alpha_test() == DrawMode::AlphaTest::GEQUAL) { + current_mode.set_alpha_test(DrawMode::AlphaTest::ALWAYS); + current_mode.disable_depth_write(); + } } m_adgifs[i].mode = current_mode; diff --git a/goal_src/jak3/engine/entity/entity-h.gc b/goal_src/jak3/engine/entity/entity-h.gc index 47318cab2..1256f196e 100644 --- a/goal_src/jak3/engine/entity/entity-h.gc +++ b/goal_src/jak3/engine/entity/entity-h.gc @@ -192,7 +192,7 @@ that gets accessed by the accompanying process." (set! (-> actor-group heap-base) (the-as uint 8)) (deftype entity-info (basic) - ((ptype type) + ((ptype object) (pool symbol) (heap-size int32) ) diff --git a/goal_src/jak3/engine/entity/entity-table.gc b/goal_src/jak3/engine/entity/entity-table.gc index 9cdeb3277..935455957 100644 --- a/goal_src/jak3/engine/entity/entity-table.gc +++ b/goal_src/jak3/engine/entity/entity-table.gc @@ -5,278 +5,240 @@ ;; name in dgo: entity-table ;; dgos: GAME +;; these types don't exist, but are referenced in the entity table +(deftype sail-boat-a (process-drawable-reserved) + () + ) + +(deftype cty-window-a (process-drawable-reserved) + () + ) + +(deftype city-window-a (process-drawable-reserved) + () + ) + +(deftype cty-guard-turret (process-drawable-reserved) + () + ) + +(deftype cty-fruit-stand (process-drawable-reserved) + () + ) + +(deftype torn (process-drawable-reserved) + () + ) + ;; DECOMP BEGINS -;; TODO stub -(define *entity-info* (new 'static 'boxed-array :type entity-info - (new 'static 'entity-info - :ptype (type-ref factory-boss :method-count 31) - :pool '*16k-dead-pool* - :heap-size #x8000 - ) - (new 'static 'entity-info - :ptype (type-ref flitter-spawner :method-count 22) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - (new 'static 'entity-info - :ptype (type-ref bubbles-path :method-count 22) - :pool '*16k-dead-pool* - :heap-size #x8000 - ) - (new 'static 'entity-info - :ptype (type-ref desert-chase-ring :method-count 24) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - (new 'static 'entity-info - :ptype (type-ref bt-grunt :method-count 55) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - (new 'static 'entity-info - :ptype (type-ref bt-roboguard :method-count 47) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - (new 'static 'entity-info - :ptype (type-ref w-parking-spot :method-count 27) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - (new 'static 'entity-info - :ptype (type-ref min-elevator :method-count 52) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - (new 'static 'entity-info - :ptype (type-ref tpl-bouncer :method-count 28) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - (new 'static 'entity-info - :ptype (type-ref veger-npc :method-count 40) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - (new 'static 'entity-info - :ptype (type-ref seem-npc :method-count 40) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - (new 'static 'entity-info - :ptype (type-ref krimson-wall :method-count 31) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - (new 'static 'entity-info - :ptype (type-ref kleever-catch-lizards :method-count 21) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - (new 'static 'entity-info - :ptype (type-ref kleever-npc :method-count 40) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - (new 'static 'entity-info - :ptype (type-ref damus-npc :method-count 40) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - (new 'static 'entity-info - :ptype (type-ref nav-graph :method-count 45) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - (new 'static 'entity-info - :ptype (type-ref tizard :method-count 36) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - (new 'static 'entity-info - :ptype (type-ref ladder :method-count 27) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - (new 'static 'entity-info - :ptype (type-ref mh-centipede :method-count 43) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - (new 'static 'entity-info - :ptype (type-ref dark-tower :method-count 0) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - (new 'static 'entity-info - :ptype (type-ref curve-bubbles-Shape :method-count 15) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - (new 'static 'entity-info - :ptype (type-ref mhcity-tower-door :method-count 21) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - (new 'static 'entity-info - :ptype (type-ref mhcity-grunt-egg-d :method-count 32) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - (new 'static 'entity-info - :ptype (type-ref mhcity-grunt-egg-c :method-count 32) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - (new 'static 'entity-info - :ptype (type-ref mhcity-grunt-egg-b :method-count 32) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - (new 'static 'entity-info - :ptype (type-ref mhcity-grund-egg-a :method-count 32) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - (new 'static 'entity-info - :ptype (type-ref mhcity-de-tower-undervines :method-count 32) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - (new 'static 'entity-info - :ptype (type-ref mhcity-vine-wriggler-big :method-count 32) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - (new 'static 'entity-info - :ptype (type-ref mhcity-vine-wriggler :method-count 32) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - (new 'static 'entity-info - :ptype (type-ref mhcity-twitch-blade :method-count 21) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - (new 'static 'entity-info - :ptype (type-ref mhcity-claw-finger-small :method-count 32) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - (new 'static 'entity-info - :ptype (type-ref mhcity-vein-writhing-small :method-count 32) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - (new 'static 'entity-info - :ptype (type-ref mhcity-vein-writhing-large :method-count 32) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - (new 'static 'entity-info - :ptype (type-ref mhcity-dark-eco-nodule :method-count 22) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - (new 'static 'entity-info - :ptype (type-ref mhcity-dark-eco-door :method-count 33) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - (new 'static 'entity-info - :ptype (type-ref mhcity-puffer-large :method-count 35) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - (new 'static 'entity-info - :ptype (type-ref mhcity-puffer :method-count 35) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - (new 'static 'entity-info - :ptype (type-ref searchlight :method-count 21) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - (new 'static 'entity-info - :ptype (type-ref ctyn-lamp :method-count 32) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - (new 'static 'entity-info - :ptype (type-ref burning-bush :method-count 35) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - (new 'static 'entity-info - :ptype (type-ref sail-boat-a :method-count 0) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - (new 'static 'entity-info - :ptype (type-ref barge :method-count 152) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - (new 'static 'entity-info - :ptype (type-ref boat-manager :method-count 17) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - (new 'static 'entity-info - :ptype (type-ref propa :method-count 33) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - (new 'static 'entity-info - :ptype (type-ref city-window-a :method-count 0) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - (new 'static 'entity-info - :ptype (type-ref cty-window-a :method-count 0) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - (new 'static 'entity-info - :ptype (type-ref parking-spot :method-count 27) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - (new 'static 'entity-info - :ptype (type-ref security-wall :method-count 25) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - (new 'static 'entity-info - :ptype (type-ref cty-guard-turret :method-count 0) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - (new 'static 'entity-info - :ptype (type-ref cty-fruit-stand :method-count 0) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - (new 'static 'entity-info - :ptype (type-ref fruit-stand :method-count 31) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - (new 'static 'entity-info - :ptype (type-ref torn :method-count 0) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - (new 'static 'entity-info - :ptype (type-ref neon-baron :method-count 17) - :pool '*16k-dead-pool* - :heap-size #x4000 - ) - ) - ) +(define *entity-info* + (new 'static 'boxed-array :type entity-info + (new 'static 'entity-info :ptype 'factory-boss :pool '*16k-dead-pool* :heap-size #x8000) + (new 'static 'entity-info + :ptype (type-ref flitter-spawner :method-count 22) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref bubbles-path :method-count 22) + :pool '*16k-dead-pool* + :heap-size #x8000 + ) + (new 'static 'entity-info :ptype 'desert-chase-ring :pool '*16k-dead-pool* :heap-size #x8000) + (new 'static 'entity-info :ptype 'bt-grunt :pool '*16k-dead-pool* :heap-size #x8000) + (new 'static 'entity-info :ptype 'bt-roboguard :pool '*16k-dead-pool* :heap-size #x8000) + (new 'static 'entity-info + :ptype (type-ref w-parking-spot :method-count 27) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref min-elevator :method-count 52) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref tpl-bouncer :method-count 28) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info :ptype 'veger-npc :pool '*16k-dead-pool* :heap-size #x10000) + (new 'static 'entity-info :ptype 'seem-npc :pool '*16k-dead-pool* :heap-size #x20000) + (new 'static 'entity-info + :ptype (type-ref krimson-wall :method-count 31) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info :ptype 'kleever-catch-lizards :pool '*16k-dead-pool* :heap-size #x18000) + (new 'static 'entity-info :ptype 'kleever-npc :pool '*16k-dead-pool* :heap-size #x18000) + (new 'static 'entity-info :ptype 'damus-npc :pool '*16k-dead-pool* :heap-size #x10000) + (new 'static 'entity-info + :ptype (type-ref nav-graph :method-count 45) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info :ptype (type-ref tizard :method-count 36) :pool '*16k-dead-pool* :heap-size #x4000) + (new 'static 'entity-info :ptype (type-ref ladder :method-count 27) :pool '*16k-dead-pool* :heap-size #x4000) + (new 'static 'entity-info :ptype 'mh-centipede :pool '*16k-dead-pool* :heap-size #x6000) + (new 'static 'entity-info :ptype 'dark-tower :pool '*16k-dead-pool* :heap-size #x5800) + (new 'static 'entity-info + :ptype (type-ref curve-bubbles-Shape :method-count 15) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref mhcity-tower-door :method-count 21) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref mhcity-grunt-egg-d :method-count 32) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref mhcity-grunt-egg-c :method-count 32) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref mhcity-grunt-egg-b :method-count 32) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref mhcity-grunt-egg-a :method-count 32) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref mhcity-de-tower-undervines :method-count 32) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref mhcity-vine-wriggler-big :method-count 32) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref mhcity-vine-wriggler :method-count 32) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref mhcity-twitch-blade :method-count 21) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref mhcity-claw-finger-small :method-count 32) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref mhcity-vein-writhing-small :method-count 32) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref mhcity-vein-writhing-large :method-count 32) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref mhcity-dark-eco-nodule :method-count 22) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref mhcity-dark-eco-door :method-count 33) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref mhcity-puffer-large :method-count 35) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref mhcity-puffer :method-count 35) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref searchlight :method-count 21) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref ctyn-lamp :method-count 32) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref burning-bush :method-count 35) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref sail-boat-a :method-count 218) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info :ptype (type-ref barge :method-count 152) :pool '*16k-dead-pool* :heap-size #x4000) + (new 'static 'entity-info + :ptype (type-ref boat-manager :method-count 17) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info :ptype (type-ref propa :method-count 33) :pool '*16k-dead-pool* :heap-size #x4000) + (new 'static 'entity-info + :ptype (type-ref city-window-a :method-count 218) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref cty-window-a :method-count 218) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref parking-spot :method-count 27) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref security-wall :method-count 25) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref cty-guard-turret :method-count 218) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref cty-fruit-stand :method-count 218) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref fruit-stand :method-count 31) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info :ptype (type-ref torn :method-count 218) :pool '*16k-dead-pool* :heap-size #x4000) + (new 'static 'entity-info + :ptype (type-ref neon-baron :method-count 17) + :pool '*16k-dead-pool* + :heap-size #x10000 + ) + ) + ) +;; WARN: Return type mismatch basic vs entity-info. (defun entity-info-lookup ((arg0 type)) (the-as entity-info (cond ((nonzero? (-> arg0 method-table 13)) @@ -301,4 +263,4 @@ ) ) ) - ) \ No newline at end of file + ) diff --git a/goalc/compiler/compilation/Static.cpp b/goalc/compiler/compilation/Static.cpp index d20c8b75c..5d9dfe87a 100644 --- a/goalc/compiler/compilation/Static.cpp +++ b/goalc/compiler/compilation/Static.cpp @@ -216,7 +216,7 @@ void Compiler::compile_static_structure_inline(const goos::Object& form, structure->add_pointer_record(field_offset, sr.reference(), sr.reference()->get_addr_offset()); } else if (sr.is_type()) { - if (field_info.type != TypeSpec("type")) { + if (field_info.type != TypeSpec("type") && field_info.type != TypeSpec("object")) { throw_compiler_error(form, "Cannot put a type reference in a field with type {}", field_info.type.print()); } diff --git a/test/decompiler/reference/jak3/engine/entity/entity-h_REF.gc b/test/decompiler/reference/jak3/engine/entity/entity-h_REF.gc index 67e01b3d5..4e9056613 100644 --- a/test/decompiler/reference/jak3/engine/entity/entity-h_REF.gc +++ b/test/decompiler/reference/jak3/engine/entity/entity-h_REF.gc @@ -323,7 +323,7 @@ that gets accessed by the accompanying process." ;; definition of type entity-info (deftype entity-info (basic) - ((ptype type) + ((ptype object) (pool symbol) (heap-size int32) ) diff --git a/test/decompiler/reference/jak3/engine/entity/entity-table_REF.gc b/test/decompiler/reference/jak3/engine/entity/entity-table_REF.gc new file mode 100644 index 000000000..85901d28c --- /dev/null +++ b/test/decompiler/reference/jak3/engine/entity/entity-table_REF.gc @@ -0,0 +1,241 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for symbol *entity-info*, type (array entity-info) +(define *entity-info* + (new 'static 'boxed-array :type entity-info + (new 'static 'entity-info :ptype 'factory-boss :pool '*16k-dead-pool* :heap-size #x8000) + (new 'static 'entity-info + :ptype (type-ref flitter-spawner :method-count 22) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref bubbles-path :method-count 22) + :pool '*16k-dead-pool* + :heap-size #x8000 + ) + (new 'static 'entity-info :ptype 'desert-chase-ring :pool '*16k-dead-pool* :heap-size #x8000) + (new 'static 'entity-info :ptype 'bt-grunt :pool '*16k-dead-pool* :heap-size #x8000) + (new 'static 'entity-info :ptype 'bt-roboguard :pool '*16k-dead-pool* :heap-size #x8000) + (new 'static 'entity-info + :ptype (type-ref w-parking-spot :method-count 27) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref min-elevator :method-count 52) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref tpl-bouncer :method-count 28) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info :ptype 'veger-npc :pool '*16k-dead-pool* :heap-size #x10000) + (new 'static 'entity-info :ptype 'seem-npc :pool '*16k-dead-pool* :heap-size #x20000) + (new 'static 'entity-info + :ptype (type-ref krimson-wall :method-count 31) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info :ptype 'kleever-catch-lizards :pool '*16k-dead-pool* :heap-size #x18000) + (new 'static 'entity-info :ptype 'kleever-npc :pool '*16k-dead-pool* :heap-size #x18000) + (new 'static 'entity-info :ptype 'damus-npc :pool '*16k-dead-pool* :heap-size #x10000) + (new 'static 'entity-info + :ptype (type-ref nav-graph :method-count 45) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info :ptype (type-ref tizard :method-count 36) :pool '*16k-dead-pool* :heap-size #x4000) + (new 'static 'entity-info :ptype (type-ref ladder :method-count 27) :pool '*16k-dead-pool* :heap-size #x4000) + (new 'static 'entity-info :ptype 'mh-centipede :pool '*16k-dead-pool* :heap-size #x6000) + (new 'static 'entity-info :ptype 'dark-tower :pool '*16k-dead-pool* :heap-size #x5800) + (new 'static 'entity-info + :ptype (type-ref curve-bubbles-Shape :method-count 15) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref mhcity-tower-door :method-count 21) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref mhcity-grunt-egg-d :method-count 32) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref mhcity-grunt-egg-c :method-count 32) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref mhcity-grunt-egg-b :method-count 32) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref mhcity-grunt-egg-a :method-count 32) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref mhcity-de-tower-undervines :method-count 32) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref mhcity-vine-wriggler-big :method-count 32) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref mhcity-vine-wriggler :method-count 32) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref mhcity-twitch-blade :method-count 21) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref mhcity-claw-finger-small :method-count 32) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref mhcity-vein-writhing-small :method-count 32) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref mhcity-vein-writhing-large :method-count 32) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref mhcity-dark-eco-nodule :method-count 22) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref mhcity-dark-eco-door :method-count 33) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref mhcity-puffer-large :method-count 35) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref mhcity-puffer :method-count 35) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref searchlight :method-count 21) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref ctyn-lamp :method-count 32) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref burning-bush :method-count 35) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref sail-boat-a :method-count 218) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info :ptype (type-ref barge :method-count 152) :pool '*16k-dead-pool* :heap-size #x4000) + (new 'static 'entity-info + :ptype (type-ref boat-manager :method-count 17) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info :ptype (type-ref propa :method-count 33) :pool '*16k-dead-pool* :heap-size #x4000) + (new 'static 'entity-info + :ptype (type-ref city-window-a :method-count 218) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref cty-window-a :method-count 218) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref parking-spot :method-count 27) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref security-wall :method-count 25) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref cty-guard-turret :method-count 218) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref cty-fruit-stand :method-count 218) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info + :ptype (type-ref fruit-stand :method-count 31) + :pool '*16k-dead-pool* + :heap-size #x4000 + ) + (new 'static 'entity-info :ptype (type-ref torn :method-count 218) :pool '*16k-dead-pool* :heap-size #x4000) + (new 'static 'entity-info + :ptype (type-ref neon-baron :method-count 17) + :pool '*16k-dead-pool* + :heap-size #x10000 + ) + ) + ) + +;; definition for function entity-info-lookup +;; WARN: Return type mismatch basic vs entity-info. +(defun entity-info-lookup ((arg0 type)) + (the-as entity-info (cond + ((nonzero? (-> arg0 method-table 13)) + (-> arg0 method-table 13) + ) + (else + (let ((v1-1 *entity-info*)) + (dotimes (a1-0 (-> v1-1 length)) + (let ((a2-3 (-> v1-1 a1-0 ptype))) + (when (if (logtest? (the-as int a2-3) 1) + (= (-> arg0 symbol) a2-3) + (= arg0 a2-3) + ) + (set! (-> arg0 method-table 13) (the-as function (-> v1-1 a1-0))) + (return (the-as entity-info (-> v1-1 a1-0))) + ) + ) + ) + ) + (set! (-> arg0 method-table 13) #f) + (the-as basic #f) + ) + ) + ) + ) + + + +