- Changed FImageCollection to return translated texture indices so
that animated icons can be done with it. - Changed FImageCollection to use a TArray to hold its data. - Fixed: SetChanHeadSettings did an assignment instead of comparing the channel ID witg CHAN_CEILING. - Changed sound sequence names for animated doors to FNames. - Automatically fixed: DCeiling didn't properly serialize its texture id. - Replaced integers as texture ID representation with a specific new type to track down all potentially incorrect uses and remaining WORDs used for texture IDs so that more than 32767 or 65535 textures can be defined. SVN r1036 (trunk)
This commit is contained in:
parent
7c40cf9ce0
commit
8ca7c05e9d
82 changed files with 1145 additions and 1061 deletions
|
|
@ -61,6 +61,7 @@
|
|||
#include "p_setup.h"
|
||||
#include "r_translate.h"
|
||||
#include "r_interpolate.h"
|
||||
#include "r_sky.h"
|
||||
|
||||
void P_SpawnSlopeMakers (FMapThing *firstmt, FMapThing *lastmt);
|
||||
void P_SetSlopes ();
|
||||
|
|
@ -519,19 +520,19 @@ static void SetTexture (side_t *side, int position, DWORD *blend, char *name8)
|
|||
char name[9];
|
||||
strncpy (name, name8, 8);
|
||||
name[8] = 0;
|
||||
int texture;
|
||||
FTextureID texture;
|
||||
if ((*blend = R_ColormapNumForName (name)) == 0)
|
||||
{
|
||||
if ((texture = TexMan.CheckForTexture (name, FTexture::TEX_Wall,
|
||||
FTextureManager::TEXMAN_Overridable|FTextureManager::TEXMAN_TryAny)
|
||||
) == -1)
|
||||
texture = TexMan.CheckForTexture (name, FTexture::TEX_Wall,
|
||||
FTextureManager::TEXMAN_Overridable|FTextureManager::TEXMAN_TryAny);
|
||||
if (!texture.Exists())
|
||||
{
|
||||
char name2[9];
|
||||
char *stop;
|
||||
strncpy (name2, name, 8);
|
||||
name2[8] = 0;
|
||||
*blend = strtoul (name2, &stop, 16);
|
||||
texture = 0;
|
||||
texture = FNullTextureID();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -540,7 +541,7 @@ static void SetTexture (side_t *side, int position, DWORD *blend, char *name8)
|
|||
}
|
||||
else
|
||||
{
|
||||
texture = 0;
|
||||
texture = FNullTextureID();
|
||||
}
|
||||
side->SetTexture(position, texture);
|
||||
}
|
||||
|
|
@ -548,19 +549,20 @@ static void SetTexture (side_t *side, int position, DWORD *blend, char *name8)
|
|||
static void SetTextureNoErr (side_t *side, int position, DWORD *color, char *name8, bool *validcolor)
|
||||
{
|
||||
char name[9];
|
||||
int texture;
|
||||
FTextureID texture;
|
||||
strncpy (name, name8, 8);
|
||||
name[8] = 0;
|
||||
if ((texture = TexMan.CheckForTexture (name, FTexture::TEX_Wall,
|
||||
FTextureManager::TEXMAN_Overridable|FTextureManager::TEXMAN_TryAny)
|
||||
) == -1)
|
||||
|
||||
texture = TexMan.CheckForTexture (name, FTexture::TEX_Wall,
|
||||
FTextureManager::TEXMAN_Overridable|FTextureManager::TEXMAN_TryAny);
|
||||
if (!texture.Exists())
|
||||
{
|
||||
char name2[9];
|
||||
char *stop;
|
||||
strncpy (name2, name, 8);
|
||||
name2[8] = 0;
|
||||
*color = strtoul (name2, &stop, 16);
|
||||
texture = 0;
|
||||
texture = FNullTextureID();
|
||||
*validcolor = (*stop == 0) && (stop >= name2 + 2) && (stop <= name2 + 6);
|
||||
}
|
||||
else
|
||||
|
|
@ -2101,13 +2103,13 @@ void P_ProcessSideTextures(bool checktranmap, side_t *sd, sector_t *sec, mapside
|
|||
if (strnicmp ("TRANMAP", msd->midtexture, 8) == 0)
|
||||
{
|
||||
// The translator set the alpha argument already; no reason to do it again.
|
||||
sd->SetTexture(side_t::mid, 0);
|
||||
sd->SetTexture(side_t::mid, FNullTextureID());
|
||||
}
|
||||
else if ((lumpnum = Wads.CheckNumForName (msd->midtexture)) > 0 &&
|
||||
Wads.LumpLength (lumpnum) == 65536)
|
||||
{
|
||||
*alpha = (short)P_DetermineTranslucency (lumpnum);
|
||||
sd->SetTexture(side_t::mid, 0);
|
||||
sd->SetTexture(side_t::mid, FNullTextureID());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue