mirror of
https://github.com/open-goal/jak-project.git
synced 2024-11-23 06:09:57 +00:00
[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.
This commit is contained in:
parent
3856ae505a
commit
9d0009715e
@ -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)
|
||||
)
|
||||
|
@ -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:
|
||||
|
@ -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;
|
||||
|
@ -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)
|
||||
)
|
||||
|
@ -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 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
@ -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());
|
||||
}
|
||||
|
2
test/decompiler/reference/jak3/engine/entity/entity-h_REF.gc
generated
vendored
2
test/decompiler/reference/jak3/engine/entity/entity-h_REF.gc
generated
vendored
@ -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)
|
||||
)
|
||||
|
241
test/decompiler/reference/jak3/engine/entity/entity-table_REF.gc
generated
vendored
Normal file
241
test/decompiler/reference/jak3/engine/entity/entity-table_REF.gc
generated
vendored
Normal file
@ -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)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user