From 6eda7d930e8ab119925f0a53b80e5c001273d43a Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 3 Oct 2023 22:45:53 +0200 Subject: [PATCH] read packslot from the actor metadata so that gItemData can be removed. --- source/games/blood/src/actor.cpp | 444 ------------------------------ source/games/blood/src/actor.h | 13 - source/games/blood/src/player.cpp | 2 +- 3 files changed, 1 insertion(+), 458 deletions(-) diff --git a/source/games/blood/src/actor.cpp b/source/games/blood/src/actor.cpp index a4a3a69be..fcd8c4da2 100644 --- a/source/games/blood/src/actor.cpp +++ b/source/games/blood/src/actor.cpp @@ -658,450 +658,6 @@ const VECTORDATA gVectorData[] = { }, }; -const ITEMDATA gItemData[] = { - { - 0, - 2552, - -8, - 0, - 32, - 32, - -1, - }, - { - 0, - 2553, - -8, - 0, - 32, - 32, - -1, - }, - { - 0, - 2554, - -8, - 0, - 32, - 32, - -1, - }, - { - 0, - 2555, - -8, - 0, - 32, - 32, - -1, - }, - { - 0, - 2556, - -8, - 0, - 32, - 32, - -1, - }, - { - 0, - 2557, - -8, - 0, - 32, - 32, - -1, - }, - { - 0, - 2558, - -8, - 0, - 32, - 32, - -1, - }, - { - 0, - 519, - -8, - 0, - 48, - 48, - 0, - }, - { - 0, - 822, - -8, - 0, - 40, - 40, - -1, - }, - { - 0, - 2169, - -8, - 0, - 40, - 40, - -1, - }, - { - 0, - 2433, - -8, - 0, - 40, - 40, - -1, - }, - { - 0, - 517, - -8, - 0, - 40, - 40, - -1, - }, - { - 0, - 783, - -8, - 0, - 40, - 40, - -1, - }, - { - 0, - 896, - -8, - 0, - 40, - 40, - -1, - }, - { - 0, - 825, - -8, - 0, - 40, - 40, - -1, - }, - { - 0, - 827, - -8, - 0, - 40, - 40, - 4, - }, - { - 0, - 828, - -8, - 0, - 40, - 40, - -1, - }, - { - 0, - 829, - -8, - 0, - 40, - 40, - -1, - }, - { - 0, - 830, - -8, - 0, - 80, - 64, - 1, - }, - { - 0, - 831, - -8, - 0, - 40, - 40, - -1, - }, - { - 0, - 863, - -8, - 0, - 40, - 40, - -1, - }, - { - 0, - 760, - -8, - 0, - 40, - 40, - 2, - }, - { - 0, - 836, - -8, - 0, - 40, - 40, - -1, - }, - { - 0, - 851, - -8, - 0, - 40, - 40, - -1, - }, - { - 0, - 2428, - -8, - 0, - 40, - 40, - -1, - }, - { - 0, - 839, - -8, - 0, - 40, - 40, - 3, - }, - { - 0, - 768, - -8, - 0, - 64, - 64, - -1, - }, - { - 0, - 840, - -8, - 0, - 48, - 48, - -1, - }, - { - 0, - 841, - -8, - 0, - 48, - 48, - -1, - }, - { - 0, - 842, - -8, - 0, - 48, - 48, - -1, - }, - { - 0, - 843, - -8, - 0, - 48, - 48, - -1, - }, - { - 0, - 683, - -8, - 0, - 40, - 40, - -1, - }, - { - 0, - 521, - -8, - 0, - 40, - 40, - -1, - }, - { - 0, - 604, - -8, - 0, - 40, - 40, - -1, - }, - { - 0, - 520, - -8, - 0, - 40, - 40, - -1, - }, - { - 0, - 803, - -8, - 0, - 40, - 40, - -1, - }, - { - 0, - 518, - -8, - 0, - 40, - 40, - -1, - }, - { - 0, - 522, - -8, - 0, - 40, - 40, - -1, - }, - { - 0, - 523, - -8, - 0, - 40, - 40, - -1, - }, - { - 0, - 837, - -8, - 0, - 80, - 64, - -1, - }, - { - 0, - 2628, - -8, - 0, - 64, - 64, - -1, - }, - { - 0, - 2586, - -8, - 0, - 64, - 64, - -1, - }, - { - 0, - 2578, - -8, - 0, - 64, - 64, - -1, - }, - { - 0, - 2602, - -8, - 0, - 64, - 64, - -1, - }, - { - 0, - 2594, - -8, - 0, - 64, - 64, - -1, - }, - { - 0, - 753, - -8, - 0, - 64, - 64, - -1, - }, - { - 0, - 753, - -8, - 7, - 64, - 64, - -1, - }, - { - 0, - 3558, - -128, - 0, - 64, - 64, - -1, - }, - { - 0, - 3558, - -128, - 7, - 64, - 64, - -1, - } -}; - const AMMOITEMDATA gAmmoItemData[] = { { 0, diff --git a/source/games/blood/src/actor.h b/source/games/blood/src/actor.h index 9057a05cd..2147c00c5 100644 --- a/source/games/blood/src/actor.h +++ b/source/games/blood/src/actor.h @@ -112,18 +112,6 @@ struct WEAPONITEMDATA FTextureID textureID() const { return tileGetTextureID(picno); } }; -struct ITEMDATA -{ - int16_t __cstat_; - int16_t picno; - int8_t __shade_; - uint8_t __pal_; - uint8_t __xrepeat_; - uint8_t __yrepeat_; - int16_t packSlot; - FTextureID __textureID_() const { return tileGetTextureID(picno); } -}; - struct MissileType { int16_t picno; @@ -181,7 +169,6 @@ struct VECTORDATA { extern const AMMOITEMDATA gAmmoItemData[]; extern const WEAPONITEMDATA gWeaponItemData[]; -extern const ITEMDATA gItemData[]; extern const MissileType missileInfo[]; extern const EXPLOSION explodeInfo[]; extern const THINGINFO thingInfo[]; diff --git a/source/games/blood/src/player.cpp b/source/games/blood/src/player.cpp index 123f224db..c777eae62 100644 --- a/source/games/blood/src/player.cpp +++ b/source/games/blood/src/player.cpp @@ -1236,7 +1236,7 @@ bool PickupItem(DBloodPlayer* pPlayer, DBloodActor* itemactor) case kItemJumpBoots: case kItemDivingSuit: case kItemBeastVision: - if (!packAddItem(pPlayer, gItemData[nType].packSlot)) return 0; + if (!packAddItem(pPlayer, itemactor->IntVar("packslot"))) return 0; break; default: if (!powerupActivate(pPlayer, nType)) return 0;