mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-24 04:51:19 +00:00
- Fixed: The HIRESTEX parser didn't check if a graphic specified in a remap
command actually existed. - Fixed: My $Limit fix from yesterday didn't work because NearLimit was an unsigned byte and the comparisons with -1 didn't work. Made it a signed word instead. - Made sfxinfo_t::Link an unsigned int because it limited the amount of usable sounds to 65535. SVN r869 (trunk)
This commit is contained in:
parent
f23e9df084
commit
868782a843
5 changed files with 25 additions and 8 deletions
|
@ -1,3 +1,12 @@
|
|||
March 30, 2008 (Changes by Graf Zahl)
|
||||
- Fixed: The HIRESTEX parser didn't check if a graphic specified in a remap
|
||||
command actually existed.
|
||||
- Fixed: My $Limit fix from yesterday didn't work because NearLimit was
|
||||
an unsigned byte and the comparisons with -1 didn't work. Made it a
|
||||
signed word instead.
|
||||
- Made sfxinfo_t::Link an unsigned int because it limited the amount of
|
||||
usable sounds to 65535.
|
||||
|
||||
March 29, 2008
|
||||
- Fixed: OPLMIDIDevice sent the wrong pitch wheel value to the player code.
|
||||
Missimp.mid sounds a lot better now, though still a little off.
|
||||
|
|
|
@ -535,7 +535,7 @@ static int S_AddSound (const char *logicalname, int lumpnum, FScanner *sc)
|
|||
sfx->bRandomHeader = false;
|
||||
sfx->link = sfxinfo_t::NO_LINK;
|
||||
sfx->bTentative = false;
|
||||
if (sfx->NearLimit == (BYTE)-1) sfx->NearLimit = 2;
|
||||
if (sfx->NearLimit == -1) sfx->NearLimit = 2;
|
||||
//sfx->PitchMask = CurrentPitchMask;
|
||||
}
|
||||
else
|
||||
|
@ -1579,7 +1579,7 @@ static int S_LookupPlayerSound (int classidx, int gender, int refid)
|
|||
// If we're not done parsing SNDINFO yet, assume that the target sound is valid
|
||||
if (PlayerClassesIsSorted &&
|
||||
(sndnum == 0 ||
|
||||
((S_sfx[sndnum].lumpnum == -1 || S_sfx[sndnum].lumpnum == sfx_empty) && S_sfx[sndnum].link == 0xffff)))
|
||||
((S_sfx[sndnum].lumpnum == -1 || S_sfx[sndnum].lumpnum == sfx_empty) && S_sfx[sndnum].link == sfxinfo_t::NO_LINK)))
|
||||
{ // This sound is unavailable.
|
||||
if (ingender != 0)
|
||||
{ // Try "male"
|
||||
|
|
|
@ -44,7 +44,7 @@ struct sfxinfo_t
|
|||
float Volume;
|
||||
|
||||
BYTE PitchMask;
|
||||
BYTE NearLimit; // 0 means unlimited
|
||||
SWORD NearLimit; // 0 means unlimited
|
||||
|
||||
WORD bRandomHeader:1;
|
||||
WORD bPlayerReserve:1;
|
||||
|
@ -58,8 +58,8 @@ struct sfxinfo_t
|
|||
WORD bTentative:1;
|
||||
WORD RolloffType:2;
|
||||
|
||||
WORD link;
|
||||
enum { NO_LINK = 0xffff };
|
||||
unsigned int link;
|
||||
enum { NO_LINK = 0xffffffff };
|
||||
|
||||
float MinDistance;
|
||||
union { float MaxDistance, RolloffFactor; };
|
||||
|
|
|
@ -79,6 +79,7 @@ FTexture * FTexture::CreateTexture (int lumpnum, int usetype)
|
|||
{ FAutomapTexture::Check, FAutomapTexture::Create, TEX_Autopage },
|
||||
};
|
||||
|
||||
if (lumpnum == -1) return NULL;
|
||||
|
||||
FWadLump data = Wads.OpenLumpNum (lumpnum);
|
||||
|
||||
|
|
|
@ -455,8 +455,11 @@ void FTextureManager::AddHiresTextures (int wadnum)
|
|||
{
|
||||
// A texture with this name does not yet exist
|
||||
FTexture * newtex = FTexture::CreateTexture (firsttx, FTexture::TEX_Any);
|
||||
newtex->UseType=FTexture::TEX_Override;
|
||||
AddTexture(newtex);
|
||||
if (newtex != NULL)
|
||||
{
|
||||
newtex->UseType=FTexture::TEX_Override;
|
||||
AddTexture(newtex);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -537,6 +540,11 @@ void FTextureManager::LoadHiresTex(int wadnum)
|
|||
Printf("Attempting to remap non-existent texture %s to %s\n",
|
||||
texname.GetChars(), sc.String);
|
||||
}
|
||||
else if (lumpnum == -1)
|
||||
{
|
||||
Printf("Attempting to remap texture %s to non-existent lump %s\n",
|
||||
texname.GetChars(), sc.String);
|
||||
}
|
||||
else
|
||||
{
|
||||
for(unsigned int i = 0; i < tlist.Size(); i++)
|
||||
|
@ -572,7 +580,6 @@ void FTextureManager::LoadHiresTex(int wadnum)
|
|||
memcpy(src, sc.String, 8);
|
||||
|
||||
int lumpnum = Wads.CheckNumForFullName(sc.String, true, ns_graphics);
|
||||
if (lumpnum < 0) lumpnum = Wads.CheckNumForName(sc.String, ns_graphics);
|
||||
|
||||
sc.GetString();
|
||||
is32bit = !!sc.Compare("force32bit");
|
||||
|
|
Loading…
Reference in a new issue