- eliminated all uses of tile index constants in Blood.

The literal numbers still remain, though.
This commit is contained in:
Christoph Oelckers 2023-05-20 18:28:29 +02:00
parent 9bf028b7f0
commit c707167c94
3 changed files with 22 additions and 20 deletions

View file

@ -86,23 +86,23 @@ static const int effectDetail[kViewEffectMax] = {
struct WEAPONICON {
int16_t nTile;
uint8_t zOffset;
FTextureID textureID() const { return tileGetTextureID(nTile); }
FTextureID textureID() const { return aTexIds[nTile]; }
};
static const WEAPONICON gWeaponIcon[] = {
{ -1, 0 },
{ -1, 0 }, // 1: pitchfork
{ kICONFLAREGUN, 6 }, // 2: flare gun
{ kICONSHOTGUN, 6 }, // 3: shotgun
{ kICONTOMMY, 8 }, // 4: tommy gun
{ kICONNAPALM, 6 }, // 5: napalm launcher
{ kAmmoIcon5, 11 }, // 6: dynamite
{ kAmmoIcon6, 11 }, // 7: spray can
{ kICONTESLA, 6 }, // 8: tesla gun
{ kICONLEECH, 0 }, // 9: life leech
{ kAmmoIcon9, 11 }, // 10: voodoo doll
{ kAmmoIcon10, 11 }, // 11: proxy bomb
{ kAmmoIcon11, 11 }, // 12: remote bomb
{ kTexICONFLAREGUN, 6 }, // 2: flare gun
{ kTexICONSHOTGUN, 6 }, // 3: shotgun
{ kTexICONTOMMY, 8 }, // 4: tommy gun
{ kTexICONNAPALM, 6 }, // 5: napalm launcher
{ kTexAmmoIcon5, 11 }, // 6: dynamite
{ kTexAmmoIcon6, 11 }, // 7: spray can
{ kTexICONTESLA, 6 }, // 8: tesla gun
{ kTexICONLEECH, 0 }, // 9: life leech
{ kTexAmmoIcon9, 11 }, // 10: voodoo doll
{ kTexAmmoIcon10, 11 }, // 11: proxy bomb
{ kTexAmmoIcon11, 11 }, // 12: remote bomb
{ -1, 0 },
};

View file

@ -20,6 +20,16 @@ x(BULLETCASE)
x(SHELLCASE)
x(FLAGHAVE)
x(ICONLEECH)
x(ICONFLAREGUN)
x(ICONSHOTGUN)
x(ICONTOMMY)
x(ICONNAPALM)
x(AmmoIcon5)
x(AmmoIcon6)
x(ICONTESLA)
x(AmmoIcon9)
x(AmmoIcon10)
x(AmmoIcon11)
x(WATERDRIP)
x(BLOODDRIP)
x(SPOTPROGRESS)

View file

@ -61,14 +61,6 @@ enum VIEWPOS {
VIEWPOS_1
};
#define x(a, b) k##a = b,
enum
{
#include "namelist.h"
};
#undef x
enum { kFontNum = 5 };
extern FFont* gFont[kFontNum];