- the fourth.

This commit is contained in:
Christoph Oelckers 2017-03-08 18:47:52 +01:00
commit 8ab562ef13
107 changed files with 1041 additions and 1041 deletions

View file

@ -57,7 +57,7 @@
TAutoGrowArray<FRemapTablePtr, FRemapTable *> translationtables[NUM_TRANSLATION_TABLES];
const BYTE IcePalette[16][3] =
const uint8_t IcePalette[16][3] =
{
{ 10, 8, 18 },
{ 15, 15, 26 },
@ -109,7 +109,7 @@ FRemapTable::~FRemapTable()
void FRemapTable::Alloc(int count)
{
Remap = (BYTE *)M_Malloc(count*sizeof(*Remap) + count*sizeof(*Palette));
Remap = (uint8_t *)M_Malloc(count*sizeof(*Remap) + count*sizeof(*Palette));
assert (Remap != NULL);
Palette = (PalEntry *)(Remap + count*(sizeof(*Remap)));
Native = NULL;
@ -934,7 +934,7 @@ void R_InitTranslationTables ()
// Doom palette has no good substitutes for these bluish-tinted grays, so
// they will just look gray unless you use a different PLAYPAL with Doom.
BYTE IcePaletteRemap[16];
uint8_t IcePaletteRemap[16];
for (i = 0; i < 16; ++i)
{
IcePaletteRemap[i] = ColorMatcher.Pick (IcePalette[i][0], IcePalette[i][1], IcePalette[i][2]);
@ -1060,8 +1060,8 @@ static void R_CreatePlayerTranslation (float h, float s, float v, const FPlayerC
FPlayerSkin *skin, FRemapTable *table, FRemapTable *alttable, FRemapTable *pillartable)
{
int i;
BYTE start = skin->range0start;
BYTE end = skin->range0end;
uint8_t start = skin->range0start;
uint8_t end = skin->range0end;
float r, g, b;
float bases, basev;
float sdelta, vdelta;
@ -1125,7 +1125,7 @@ static void R_CreatePlayerTranslation (float h, float s, float v, const FPlayerC
else
{
FMemLump translump = Wads.ReadLump(colorset->Lump);
const BYTE *trans = (const BYTE *)translump.GetMem();
const uint8_t *trans = (const uint8_t *)translump.GetMem();
for (i = start; i <= end; ++i)
{
table->Remap[i] = GPalette.Remap[trans[i]];

View file

@ -47,7 +47,7 @@ struct FRemapTable
void AddToTranslation(const char * range);
int StoreTranslation(int slot);
BYTE *Remap; // For the software renderer
uint8_t *Remap; // For the software renderer
PalEntry *Palette; // The ideal palette this maps to
FNativePalette *Native; // The Palette stored in a HW texture
int NumEntries; // # of elements in this table (usually 256)
@ -81,7 +81,7 @@ extern TAutoGrowArray<FRemapTablePtr, FRemapTable *> translationtables[NUM_TRANS
#define TRANSLATION_MASK ((1<<TRANSLATION_SHIFT)-1)
#define TRANSLATIONTYPE_MASK (255<<TRANSLATION_SHIFT)
inline DWORD TRANSLATION(BYTE a, DWORD b)
inline DWORD TRANSLATION(uint8_t a, DWORD b)
{
return (a<<TRANSLATION_SHIFT) | b;
}
@ -106,7 +106,7 @@ void R_DeinitTranslationTables();
void R_BuildPlayerTranslation (int player); // [RH] Actually create a player's translation table.
void R_GetPlayerTranslation (int color, const struct FPlayerColorSet *colorset, class FPlayerSkin *skin, struct FRemapTable *table);
extern const BYTE IcePalette[16][3];
extern const uint8_t IcePalette[16][3];
extern TArray<PalEntry> BloodTranslationColors;

View file

@ -64,7 +64,7 @@ FRenderStyle LegacyRenderStyles[STYLE_Count] =
#else
FRenderStyle LegacyRenderStyles[STYLE_Count];
static const BYTE Styles[STYLE_Count * 4] =
static const uint8_t Styles[STYLE_Count * 4] =
{
STYLEOP_None, STYLEALPHA_Zero, STYLEALPHA_Zero, 0,
STYLEOP_Add, STYLEALPHA_Src, STYLEALPHA_InvSrc, STYLEF_Alpha1,

View file

@ -31,7 +31,7 @@ struct spriteframewithrotate : public spriteframe_t
// [RH] skin globals
TArray<FPlayerSkin> Skins;
BYTE OtherGameSkinRemap[256];
uint8_t OtherGameSkinRemap[256];
PalEntry OtherGameSkinPalette[256];
@ -893,7 +893,7 @@ CCMD (skins)
static void R_CreateSkinTranslation (const char *palname)
{
FMemLump lump = Wads.ReadLump (palname);
const BYTE *otherPal = (BYTE *)lump.GetMem();
const uint8_t *otherPal = (uint8_t *)lump.GetMem();
for (int i = 0; i < 256; ++i)
{

View file

@ -34,7 +34,7 @@ struct spritedef_t
char name[5];
DWORD dwName;
};
BYTE numframes;
uint8_t numframes;
WORD spriteframes;
};
@ -49,9 +49,9 @@ class FPlayerSkin
public:
FString Name;
FString Face;
BYTE gender = 0; // This skin's gender (not really used)
BYTE range0start = 0;
BYTE range0end = 0;
uint8_t gender = 0; // This skin's gender (not really used)
uint8_t range0start = 0;
uint8_t range0end = 0;
bool othergame = 0; // [GRB]
DVector2 Scale = { 1, 1 };
int sprite = 0;
@ -61,7 +61,7 @@ public:
extern TArray<FPlayerSkin> Skins;
extern BYTE OtherGameSkinRemap[256];
extern uint8_t OtherGameSkinRemap[256];
extern PalEntry OtherGameSkinPalette[256];
void R_InitSprites ();