mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-24 04:51:19 +00:00
Fixed: Compiling with mingw once again works, although savegame loading problems are not yet fixed.
SVN r31 (trunk)
This commit is contained in:
parent
e815474cbe
commit
ec4b8719aa
17 changed files with 76 additions and 66 deletions
|
@ -94,12 +94,12 @@ OBJECTS += \
|
|||
$(OBJDIR)/doomstat.o \
|
||||
$(OBJDIR)/dsectoreffect.o \
|
||||
$(OBJDIR)/dthinker.o \
|
||||
$(OBJDIR)/empty.o \
|
||||
$(OBJDIR)/f_finale.o \
|
||||
$(OBJDIR)/f_wipe.o \
|
||||
$(OBJDIR)/farchive.o \
|
||||
$(OBJDIR)/files.o \
|
||||
$(OBJDIR)/g_game.o \
|
||||
$(OBJDIR)/g_hub.o \
|
||||
$(OBJDIR)/g_level.o \
|
||||
$(OBJDIR)/gameconfigfile.o \
|
||||
$(OBJDIR)/gi.o \
|
||||
|
@ -284,6 +284,7 @@ OBJECTS += \
|
|||
$(OBJDIR)/a_summon.o \
|
||||
$(OBJDIR)/a_teleportother.o \
|
||||
$(OBJDIR)/a_weaponpiece.o \
|
||||
$(OBJDIR)/a_weaponpieces.o \
|
||||
$(OBJDIR)/a_wraith.o \
|
||||
$(OBJDIR)/hexen_sbar.o \
|
||||
$(OBJDIR)/a_artiegg.o \
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
April 11, 2006
|
||||
- Fixed: Compiling with mingw once again works, although savegame loading
|
||||
problems are not yet fixed.
|
||||
- Fixed: ACS improperly calculated the address of local variables when
|
||||
returning from one function to another function when the function that
|
||||
was called was used as part of an expression.
|
||||
|
|
|
@ -247,7 +247,7 @@ const char *KeyNames[NUM_KEYS] =
|
|||
static char *Bindings[NUM_KEYS];
|
||||
|
||||
static char *DoubleBindings[NUM_KEYS];
|
||||
static int DClickTime[NUM_KEYS];
|
||||
static unsigned int DClickTime[NUM_KEYS];
|
||||
static byte DClicked[(NUM_KEYS+7)/8];
|
||||
|
||||
static int GetKeyFromName (const char *name)
|
||||
|
|
|
@ -327,7 +327,8 @@ void FDecalLib::DelTree (FDecalBase *root)
|
|||
|
||||
void FDecalLib::ReadAllDecals ()
|
||||
{
|
||||
int i, lump, lastlump = 0;
|
||||
int lump, lastlump = 0;
|
||||
size_t i;
|
||||
|
||||
while ((lump = Wads.FindLump ("DECALDEF", &lastlump)) != -1)
|
||||
{
|
||||
|
@ -341,7 +342,7 @@ void FDecalLib::ReadAllDecals ()
|
|||
AActor *def = (AActor*)GetDefaultByType (TypeInfo::m_RuntimeActors[i]);
|
||||
|
||||
intptr_t v = (intptr_t)def->DecalGenerator;
|
||||
if (v > 0 && v <= DecalNames.Size())
|
||||
if (v > 0 && v <= (intptr_t)DecalNames.Size())
|
||||
{
|
||||
def->DecalGenerator = ScanTreeForName (DecalNames[v-1], Root);
|
||||
}
|
||||
|
|
|
@ -173,7 +173,7 @@ void DBaseDecal::FixForSide (side_t *wall)
|
|||
{
|
||||
DBaseDecal *decal = wall->AttachedDecals;
|
||||
line_t *line = &lines[wall->linenum];
|
||||
int wallnum = int(wall - sides);
|
||||
DWORD wallnum = DWORD(wall - sides);
|
||||
vertex_t *v1, *v2;
|
||||
|
||||
if (line->sidenum[0] == wallnum)
|
||||
|
@ -237,7 +237,7 @@ int DBaseDecal::StickToWall (side_t *wall)
|
|||
int tex;
|
||||
|
||||
line = &lines[wall->linenum];
|
||||
if (line->sidenum[0] == wall - sides)
|
||||
if (line->sidenum[0] == DWORD(wall - sides))
|
||||
{
|
||||
front = line->frontsector;
|
||||
back = line->backsector;
|
||||
|
@ -285,7 +285,7 @@ fixed_t DBaseDecal::GetRealZ (const side_t *wall) const
|
|||
const line_t *line = &lines[wall->linenum];
|
||||
const sector_t *front, *back;
|
||||
|
||||
if (line->sidenum[0] == wall - sides)
|
||||
if (line->sidenum[0] == DWORD(wall - sides))
|
||||
{
|
||||
front = line->frontsector;
|
||||
back = line->backsector;
|
||||
|
@ -337,7 +337,7 @@ fixed_t DBaseDecal::GetRealZ (const side_t *wall) const
|
|||
void DBaseDecal::CalcFracPos (side_t *wall)
|
||||
{
|
||||
line_t *line = &lines[wall->linenum];
|
||||
int wallnum = int(wall - sides);
|
||||
DWORD wallnum = DWORD(wall - sides);
|
||||
vertex_t *v1, *v2;
|
||||
|
||||
if (line->sidenum[0] == wallnum)
|
||||
|
@ -371,7 +371,7 @@ void DBaseDecal::CalcFracPos (side_t *wall)
|
|||
static void GetWallStuff (side_t *wall, vertex_t *&v1, fixed_t &ldx, fixed_t &ldy)
|
||||
{
|
||||
line_t *line = &lines[wall->linenum];
|
||||
if (line->sidenum[0] == wall - sides)
|
||||
if (line->sidenum[0] == DWORD(wall - sides))
|
||||
{
|
||||
v1 = line->v1;
|
||||
ldx = line->dx;
|
||||
|
@ -393,7 +393,7 @@ static fixed_t Length (fixed_t dx, fixed_t dy)
|
|||
static side_t *NextWall (const side_t *wall)
|
||||
{
|
||||
line_t *line = &lines[wall->linenum];
|
||||
int wallnum = int(wall - sides);
|
||||
DWORD wallnum = DWORD(wall - sides);
|
||||
|
||||
if (line->sidenum[0] == wallnum)
|
||||
{
|
||||
|
|
|
@ -28,7 +28,7 @@ struct Keygroup
|
|||
|
||||
bool check(AActor * owner)
|
||||
{
|
||||
for(int i=0;i<anykeylist.Size();i++)
|
||||
for(size_t i=0;i<anykeylist.Size();i++)
|
||||
{
|
||||
if (anykeylist[i].check(owner)) return true;
|
||||
}
|
||||
|
@ -52,7 +52,7 @@ struct Lock
|
|||
|
||||
~Lock()
|
||||
{
|
||||
for(int i=0;i<keylist.Size();i++) delete keylist[i];
|
||||
for(size_t i=0;i<keylist.Size();i++) delete keylist[i];
|
||||
keylist.Clear();
|
||||
if (message) delete [] message;
|
||||
if (remotemsg) delete [] remotemsg;
|
||||
|
@ -71,7 +71,7 @@ struct Lock
|
|||
}
|
||||
}
|
||||
}
|
||||
else for(int i=0;i<keylist.Size();i++)
|
||||
else for(size_t i=0;i<keylist.Size();i++)
|
||||
{
|
||||
if (!keylist[i]->check(owner)) return false;
|
||||
}
|
||||
|
@ -379,7 +379,7 @@ bool P_CheckKeys (AActor *owner, int keynum, bool remote)
|
|||
int failsound = 0;
|
||||
|
||||
failtext = NULL;
|
||||
failsound = NULL;
|
||||
failsound = 0;
|
||||
|
||||
if (keynum<=0 || keynum>255) return true;
|
||||
// Just a safety precaution. The messages should have been initialized upon game start.
|
||||
|
|
|
@ -66,8 +66,10 @@
|
|||
#define __INFO_H__
|
||||
|
||||
#include <stddef.h>
|
||||
#ifndef _WIN32
|
||||
#if !defined(_WIN32)
|
||||
#include <inttypes.h> // for intptr_t
|
||||
#elif !defined(_MSC_VER)
|
||||
#include <stdint.h> // for mingw
|
||||
#endif
|
||||
|
||||
#include "dobject.h"
|
||||
|
|
|
@ -587,12 +587,12 @@ static void LoadWalls (walltype *walls, int numwalls, sectortype *bsec)
|
|||
if (bsec->floorstat & 64)
|
||||
{ // floor is aligned to first wall
|
||||
R_AlignFlat (sides[bsec->wallptr].linenum,
|
||||
lines[sides[bsec->wallptr].linenum].sidenum[1] == bsec->wallptr, 0);
|
||||
lines[sides[bsec->wallptr].linenum].sidenum[1] == (DWORD)bsec->wallptr, 0);
|
||||
}
|
||||
if (bsec->ceilingstat & 64)
|
||||
{ // ceiling is aligned to first wall
|
||||
R_AlignFlat (sides[bsec->wallptr].linenum,
|
||||
lines[sides[bsec->wallptr].linenum].sidenum[1] == bsec->wallptr, 0);
|
||||
lines[sides[bsec->wallptr].linenum].sidenum[1] == (DWORD)bsec->wallptr, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1684,7 +1684,7 @@ static void SetWallScroller (int id, int sidechoice, fixed_t dx, fixed_t dy)
|
|||
int wallnum = scroller->GetWallNum ();
|
||||
|
||||
if (wallnum >= 0 && lines[sides[wallnum].linenum].id == id &&
|
||||
lines[sides[wallnum].linenum].sidenum[sidechoice] == wallnum)
|
||||
lines[sides[wallnum].linenum].sidenum[sidechoice] == (DWORD)wallnum)
|
||||
{
|
||||
scroller->Destroy ();
|
||||
}
|
||||
|
@ -1702,7 +1702,7 @@ static void SetWallScroller (int id, int sidechoice, fixed_t dx, fixed_t dy)
|
|||
{
|
||||
if ((collect.RefNum = ((DScroller *)collect.Obj)->GetWallNum ()) != -1 &&
|
||||
lines[sides[collect.RefNum].linenum].id == id &&
|
||||
lines[sides[collect.RefNum].linenum].sidenum[sidechoice] == collect.RefNum)
|
||||
lines[sides[collect.RefNum].linenum].sidenum[sidechoice] == (DWORD)collect.RefNum)
|
||||
{
|
||||
((DScroller *)collect.Obj)->SetRate (dx, dy);
|
||||
Collection.Push (collect);
|
||||
|
@ -1719,7 +1719,7 @@ static void SetWallScroller (int id, int sidechoice, fixed_t dx, fixed_t dy)
|
|||
unsigned int i;
|
||||
for (i = 0; i < numcollected; i++)
|
||||
{
|
||||
if (Collection[i].RefNum == lines[linenum].sidenum[sidechoice])
|
||||
if ((DWORD)Collection[i].RefNum == lines[linenum].sidenum[sidechoice])
|
||||
break;
|
||||
}
|
||||
if (i == numcollected)
|
||||
|
|
|
@ -1053,7 +1053,7 @@ static void P_SlopeLineToPoint (int lineid, fixed_t x, fixed_t y, fixed_t z, BOO
|
|||
CrossProduct (v1, v2, cross);
|
||||
if (VectorLength (cross) == 0)
|
||||
{
|
||||
Printf ("Slope thing at (%d,%d) lies directly on its target line.\n", x>>16, y>>16);
|
||||
Printf ("Slope thing at (%d,%d) lies directly on its target line.\n", int(x>>16), int(y>>16));
|
||||
return;
|
||||
}
|
||||
VectorNormalize (cross);
|
||||
|
@ -1620,7 +1620,7 @@ static void P_LoopSidedefs ()
|
|||
// For each vertex, build a list of sidedefs that use that vertex
|
||||
// as their left edge.
|
||||
line_t *line = &lines[sides[i].linenum];
|
||||
int lineside = (line->sidenum[0] != i);
|
||||
int lineside = (line->sidenum[0] != (DWORD)i);
|
||||
int vert = (lineside ? line->v2 : line->v1) - vertexes;
|
||||
|
||||
sidetemp[i].b.lineside = lineside;
|
||||
|
|
|
@ -177,7 +177,7 @@ static int WriteSEGS (FILE *file)
|
|||
ms.v1 = LittleShort(short(segs[i].v1 - vertexes));
|
||||
ms.v2 = LittleShort(short(segs[i].v2 - vertexes));
|
||||
ms.linedef = LittleShort(short(segs[i].linedef - lines));
|
||||
ms.side = LittleShort(segs[i].sidedef - sides == segs[i].linedef->sidenum[0] ? 0 : 1);
|
||||
ms.side = LittleShort(DWORD(segs[i].sidedef - sides) == segs[i].linedef->sidenum[0] ? 0 : 1);
|
||||
ms.angle = LittleShort(short(R_PointToAngle2 (segs[i].v1->x, segs[i].v1->y, segs[i].v2->x, segs[i].v2->y)>>16));
|
||||
fwrite (&ms, sizeof(ms), 1, file);
|
||||
}
|
||||
|
|
|
@ -674,7 +674,7 @@ void R_AddLine (seg_t *line)
|
|||
}
|
||||
else
|
||||
{ // The seg is only part of the wall.
|
||||
if (line->linedef->sidenum[0] != line->sidedef - sides)
|
||||
if (line->linedef->sidenum[0] != DWORD(line->sidedef - sides))
|
||||
{
|
||||
swap (v1, v2);
|
||||
}
|
||||
|
|
|
@ -531,7 +531,7 @@ int S_DupPlayerSound (const char *pclass, int gender, int refid, int aliasref)
|
|||
|
||||
static void S_ClearSoundData()
|
||||
{
|
||||
int i;
|
||||
size_t i;
|
||||
|
||||
S_sfx.Clear();
|
||||
|
||||
|
|
|
@ -90,8 +90,9 @@ inline char * MS_Strdup(const char * s)
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
#define DEFINE_FLAG(prefix, name, type, variable) { prefix##_##name, #name, offsetof(type, variable) }
|
||||
#define DEFINE_FLAG2(symbol, name, type, variable) { symbol, #name, offsetof(type, variable) }
|
||||
// [RH] Keep GCC quiet by not using offsetof on Actor types.
|
||||
#define DEFINE_FLAG(prefix, name, type, variable) { prefix##_##name, #name, (int)&((type*)1)->variable - 1 }
|
||||
#define DEFINE_FLAG2(symbol, name, type, variable) { symbol, #name, (int)&((type*)1)->variable - 1 }
|
||||
|
||||
struct flagdef
|
||||
{
|
||||
|
@ -1618,7 +1619,7 @@ static int ProcessStates(FActorInfo * actor, AActor * defaults, Baggage &bag)
|
|||
case 'A':
|
||||
case 'a': // Angle
|
||||
SC_MustGetFloat();
|
||||
v=sc_Float*ANGLE_1;
|
||||
v=angle_t(sc_Float*ANGLE_1);
|
||||
break;
|
||||
|
||||
case 'B':
|
||||
|
@ -1641,7 +1642,7 @@ static int ProcessStates(FActorInfo * actor, AActor * defaults, Baggage &bag)
|
|||
case 'F':
|
||||
case 'f': // Fixed point
|
||||
SC_MustGetFloat();
|
||||
v=sc_Float*FRACUNIT;
|
||||
v=fixed_t(sc_Float*FRACUNIT);
|
||||
break;
|
||||
|
||||
case 'S':
|
||||
|
@ -2673,7 +2674,7 @@ static void ActorBloodColor (AActor *defaults, Baggage &bag)
|
|||
static void ActorBounceFactor (AActor *defaults, Baggage &bag)
|
||||
{
|
||||
SC_MustGetFloat ();
|
||||
defaults->bouncefactor = sc_Float * FRACUNIT;
|
||||
defaults->bouncefactor = fixed_t(sc_Float * FRACUNIT);
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
|
@ -2875,11 +2876,11 @@ static void ArmorSavePercent (AActor *defaults, Baggage &bag)
|
|||
// Special case here because this property has to work for 2 unrelated classes
|
||||
if (bag.Info->Class->IsDescendantOf(RUNTIME_CLASS(ABasicArmorPickup)))
|
||||
{
|
||||
((ABasicArmorPickup*)defaults)->SavePercent=sc_Float*FRACUNIT/100.0f;
|
||||
((ABasicArmorPickup*)defaults)->SavePercent=fixed_t(sc_Float*FRACUNIT/100.0f);
|
||||
}
|
||||
else if (bag.Info->Class->IsDescendantOf(RUNTIME_CLASS(ABasicArmorBonus)))
|
||||
{
|
||||
((ABasicArmorBonus*)defaults)->SavePercent=sc_Float*FRACUNIT/100.0f;
|
||||
((ABasicArmorBonus*)defaults)->SavePercent=fixed_t(sc_Float*FRACUNIT/100.0f);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -3106,7 +3107,7 @@ static void WeaponUpSound (AWeapon *defaults, Baggage &bag)
|
|||
static void WeaponYAdjust (AWeapon *defaults, Baggage &bag)
|
||||
{
|
||||
SC_MustGetFloat();
|
||||
defaults->YAdjust=sc_Float * FRACUNIT;
|
||||
defaults->YAdjust=fixed_t(sc_Float * FRACUNIT);
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
|
@ -3154,7 +3155,7 @@ static void PowerupColor (APowerupGiver *defaults, Baggage &bag)
|
|||
b=BPART(c);
|
||||
}
|
||||
SC_MustGetFloat();
|
||||
alpha=sc_Float*255;
|
||||
alpha=int(sc_Float*255);
|
||||
alpha=clamp<int>(alpha, 0, 255);
|
||||
defaults->BlendColor = MAKEARGB(alpha, r, g, b);
|
||||
}
|
||||
|
@ -3343,7 +3344,7 @@ static const ActorProps *is_actorprop (const char *str)
|
|||
//==========================================================================
|
||||
void FinishThingdef()
|
||||
{
|
||||
int i;
|
||||
size_t i;
|
||||
|
||||
for (i = 0;i < TypeInfo::m_RuntimeActors.Size(); i++)
|
||||
{
|
||||
|
|
|
@ -399,7 +399,7 @@ void A_JumpIfCloser(AActor * self)
|
|||
// No target - no jump
|
||||
if (target==NULL) return;
|
||||
|
||||
fixed_t dist = EvalExpressionF (StateParameters[index], self) * FRACUNIT;
|
||||
fixed_t dist = fixed_t(EvalExpressionF (StateParameters[index], self) * FRACUNIT);
|
||||
if (index > 0 && P_AproxDistance(self->x-target->x, self->y-target->y) < dist)
|
||||
DoJump(self, CallingState, StateParameters[index+1]);
|
||||
}
|
||||
|
@ -517,11 +517,11 @@ void A_CustomMissile(AActor * self)
|
|||
if (index<0) return;
|
||||
|
||||
const char * MissileName=(const char*)StateParameters[index];
|
||||
fixed_t SpawnHeight=EvalExpressionF (StateParameters[index+1], self) * FRACUNIT;
|
||||
fixed_t SpawnHeight=fixed_t(EvalExpressionF (StateParameters[index+1], self) * FRACUNIT);
|
||||
int Spawnofs_XY=EvalExpressionI (StateParameters[index+2], self);
|
||||
angle_t Angle=EvalExpressionF (StateParameters[index+3], self) * ANGLE_1;
|
||||
angle_t Angle=angle_t(EvalExpressionF (StateParameters[index+3], self) * ANGLE_1);
|
||||
int aimmode=EvalExpressionI (StateParameters[index+4], self);
|
||||
angle_t pitch=EvalExpressionF (StateParameters[index+5], self) * ANGLE_1;
|
||||
angle_t pitch=angle_t(EvalExpressionF (StateParameters[index+5], self) * ANGLE_1);
|
||||
|
||||
AActor * targ;
|
||||
AActor * missile;
|
||||
|
@ -539,6 +539,7 @@ void A_CustomMissile(AActor * self)
|
|||
switch (aimmode&3)
|
||||
{
|
||||
case 0:
|
||||
default:
|
||||
// same adjustment as above (in all 3 directions this time) - for better aiming!
|
||||
self->x+=x;
|
||||
self->y+=y;
|
||||
|
@ -626,12 +627,12 @@ void A_CustomBulletAttack (AActor *self)
|
|||
int index=CheckIndex(6);
|
||||
if (index<0) return;
|
||||
|
||||
angle_t Spread_XY=EvalExpressionF (StateParameters[index], self) * ANGLE_1;
|
||||
angle_t Spread_Z=EvalExpressionF (StateParameters[index+1], self) * ANGLE_1;
|
||||
angle_t Spread_XY=angle_t(EvalExpressionF (StateParameters[index], self) * ANGLE_1);
|
||||
angle_t Spread_Z=angle_t(EvalExpressionF (StateParameters[index+1], self) * ANGLE_1);
|
||||
int NumBullets=EvalExpressionI (StateParameters[index+2], self);
|
||||
int DamagePerBullet=EvalExpressionI (StateParameters[index+3], self);
|
||||
const char * PuffType=(const char *)StateParameters[index+4];
|
||||
fixed_t Range = EvalExpressionF (StateParameters[index+5], self) * FRACUNIT;
|
||||
fixed_t Range = fixed_t(EvalExpressionF (StateParameters[index+5], self) * FRACUNIT);
|
||||
|
||||
if(Range==0) Range=MISSILERANGE;
|
||||
|
||||
|
@ -688,13 +689,13 @@ void A_FireBullets (AActor *self)
|
|||
int index=CheckIndex(7);
|
||||
if (index<0 || !self->player) return;
|
||||
|
||||
angle_t Spread_XY=EvalExpressionF (StateParameters[index], self) * ANGLE_1;
|
||||
angle_t Spread_Z=EvalExpressionF (StateParameters[index+1], self) * ANGLE_1;
|
||||
angle_t Spread_XY=angle_t(EvalExpressionF (StateParameters[index], self) * ANGLE_1);
|
||||
angle_t Spread_Z=angle_t(EvalExpressionF (StateParameters[index+1], self) * ANGLE_1);
|
||||
int NumberOfBullets=EvalExpressionI (StateParameters[index+2], self);
|
||||
int DamagePerBullet=EvalExpressionI (StateParameters[index+3], self);
|
||||
const char * PuffTypeName=(const char *)StateParameters[index+4];
|
||||
bool UseNoAmmo=!EvalExpressionI (StateParameters[index+5], self);
|
||||
fixed_t Range=EvalExpressionF (StateParameters[index+6], self) * FRACUNIT;
|
||||
fixed_t Range=fixed_t(EvalExpressionF (StateParameters[index+6], self) * FRACUNIT);
|
||||
|
||||
const TypeInfo * PuffType;
|
||||
|
||||
|
@ -753,10 +754,10 @@ void A_FireCustomMissile (AActor * self)
|
|||
if (index<0 || !self->player) return;
|
||||
|
||||
const char * MissileName=(const char *)StateParameters[index];
|
||||
angle_t Angle=EvalExpressionF (StateParameters[index+1], self) * ANGLE_1;
|
||||
angle_t Angle=angle_t(EvalExpressionF (StateParameters[index+1], self) * ANGLE_1);
|
||||
bool UseNoAmmo=!EvalExpressionI (StateParameters[index+2], self);
|
||||
int SpawnOfs_XY=EvalExpressionI (StateParameters[index+3], self);
|
||||
fixed_t SpawnHeight=EvalExpressionF (StateParameters[index+4], self) * FRACUNIT;
|
||||
fixed_t SpawnHeight=fixed_t(EvalExpressionF (StateParameters[index+4], self) * FRACUNIT);
|
||||
|
||||
player_t *player=self->player;
|
||||
AWeapon * weapon=player->ReadyWeapon;
|
||||
|
@ -808,7 +809,7 @@ void A_CustomPunch (AActor *self)
|
|||
bool norandom=!!EvalExpressionI (StateParameters[index+1], self);
|
||||
bool UseNoAmmo=!EvalExpressionI (StateParameters[index+2], self);
|
||||
const char * PuffTypeName=(const char *)StateParameters[index+3];
|
||||
fixed_t Range=EvalExpressionF (StateParameters[index+4], self) * FRACUNIT;
|
||||
fixed_t Range=fixed_t(EvalExpressionF (StateParameters[index+4], self) * FRACUNIT);
|
||||
|
||||
const TypeInfo * PuffType;
|
||||
|
||||
|
@ -1062,7 +1063,7 @@ void A_SpawnItem(AActor * self)
|
|||
|
||||
const TypeInfo * missile= TypeInfo::FindType((const char *)StateParameters[index]);
|
||||
int distance = EvalExpressionI (StateParameters[index+1], self);
|
||||
fixed_t zheight = EvalExpressionF (StateParameters[index+2], self) * FRACUNIT;
|
||||
fixed_t zheight = fixed_t(EvalExpressionF (StateParameters[index+2], self) * FRACUNIT);
|
||||
bool useammo = !EvalExpressionI (StateParameters[index+3], self);
|
||||
|
||||
if (!missile)
|
||||
|
@ -1158,9 +1159,9 @@ void A_ThrowGrenade(AActor * self)
|
|||
if (index<0) return;
|
||||
|
||||
const TypeInfo * missile= TypeInfo::FindType((const char *)StateParameters[index]);
|
||||
fixed_t zheight = EvalExpressionF (StateParameters[index+1], self) * FRACUNIT;
|
||||
fixed_t xymom = EvalExpressionF (StateParameters[index+2], self) * FRACUNIT;
|
||||
fixed_t zmom = EvalExpressionF (StateParameters[index+3], self) * FRACUNIT;
|
||||
fixed_t zheight = fixed_t(EvalExpressionF (StateParameters[index+1], self) * FRACUNIT);
|
||||
fixed_t xymom = fixed_t(EvalExpressionF (StateParameters[index+2], self) * FRACUNIT);
|
||||
fixed_t zmom = fixed_t(EvalExpressionF (StateParameters[index+3], self) * FRACUNIT);
|
||||
bool useammo = !EvalExpressionI (StateParameters[index+4], self);
|
||||
|
||||
if (self->player && CallingState != self->state && CallingState != StateCall.State)
|
||||
|
@ -1209,7 +1210,7 @@ void A_Recoil(AActor * actor)
|
|||
{
|
||||
int index=CheckIndex(1, NULL);
|
||||
if (index<0) return;
|
||||
fixed_t xymom = EvalExpressionF (StateParameters[index], actor) * FRACUNIT;
|
||||
fixed_t xymom = fixed_t(EvalExpressionF (StateParameters[index], actor) * FRACUNIT);
|
||||
|
||||
angle_t angle = actor->angle + ANG180;
|
||||
angle >>= ANGLETOFINESHIFT;
|
||||
|
@ -1270,7 +1271,7 @@ void A_SetTranslucent(AActor * self)
|
|||
int index=CheckIndex(2, NULL);
|
||||
if (index<0) return;
|
||||
|
||||
fixed_t alpha = EvalExpressionF (StateParameters[index], self) * FRACUNIT;
|
||||
fixed_t alpha = fixed_t(EvalExpressionF (StateParameters[index], self) * FRACUNIT);
|
||||
int mode = EvalExpressionI (StateParameters[index+1], self);
|
||||
mode = mode == 0 ? STYLE_Translucent : mode == 2 ? STYLE_Fuzzy : STYLE_Add;
|
||||
|
||||
|
@ -1297,7 +1298,7 @@ void A_FadeIn(AActor * self)
|
|||
int index=CheckIndex(1, NULL);
|
||||
if (index<0) return;
|
||||
|
||||
fixed_t reduce = EvalExpressionF (StateParameters[index], self) * FRACUNIT;
|
||||
fixed_t reduce = fixed_t(EvalExpressionF (StateParameters[index], self) * FRACUNIT);
|
||||
if (reduce == 0) reduce = FRACUNIT/10;
|
||||
|
||||
if (self->RenderStyle==STYLE_Normal) self->RenderStyle=STYLE_Translucent;
|
||||
|
@ -1317,7 +1318,7 @@ void A_FadeOut(AActor * self)
|
|||
int index=CheckIndex(1, NULL);
|
||||
if (index<0) return;
|
||||
|
||||
fixed_t reduce = EvalExpressionF (StateParameters[index], self) * FRACUNIT;
|
||||
fixed_t reduce = fixed_t(EvalExpressionF (StateParameters[index], self) * FRACUNIT);
|
||||
if (reduce == 0) reduce = FRACUNIT/10;
|
||||
|
||||
if (self->RenderStyle==STYLE_Normal) self->RenderStyle=STYLE_Translucent;
|
||||
|
@ -1507,5 +1508,3 @@ void A_KillChildren(AActor * self)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -288,7 +288,7 @@ void WI_LoadBackground(bool isenterpic)
|
|||
char buffer[10];
|
||||
in_anim_t an;
|
||||
lnode_t pt;
|
||||
int texture;
|
||||
int texture = -1;
|
||||
|
||||
bcnt=0;
|
||||
|
||||
|
@ -558,7 +558,7 @@ void WI_LoadBackground(bool isenterpic)
|
|||
|
||||
void WI_updateAnimatedBack()
|
||||
{
|
||||
int i;
|
||||
size_t i;
|
||||
|
||||
for(i=0;i<anims.Size();i++)
|
||||
{
|
||||
|
@ -593,7 +593,7 @@ void WI_updateAnimatedBack()
|
|||
|
||||
void WI_drawBackground()
|
||||
{
|
||||
int i;
|
||||
size_t i;
|
||||
int animwidth=320; // For a flat fill or clear background scale animations to 320x200
|
||||
int animheight=200;
|
||||
|
||||
|
@ -841,7 +841,7 @@ void WI_drawEL ()
|
|||
|
||||
int WI_MapToIndex (char *map)
|
||||
{
|
||||
int i;
|
||||
size_t i;
|
||||
|
||||
for (i = 0; i < lnodes.Size(); i++)
|
||||
{
|
||||
|
@ -1089,7 +1089,7 @@ void WI_updateShowNextLoc ()
|
|||
|
||||
void WI_drawShowNextLoc(void)
|
||||
{
|
||||
int i;
|
||||
size_t i;
|
||||
|
||||
WI_drawBackground();
|
||||
|
||||
|
@ -1937,6 +1937,10 @@ void WI_Ticker(void)
|
|||
case NoState:
|
||||
WI_updateNoState();
|
||||
break;
|
||||
|
||||
case LeavingIntermission:
|
||||
// Hush, GCC.
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -181,7 +181,7 @@ bool FCDThread::Init ()
|
|||
return false;
|
||||
|
||||
CD_Window = CreateWindow (
|
||||
(LPCTSTR)CD_WindowAtom,
|
||||
(LPCTSTR)(int)CD_WindowAtom,
|
||||
"ZDoom CD Player",
|
||||
0,
|
||||
0, 0, 10, 10,
|
||||
|
@ -192,7 +192,7 @@ bool FCDThread::Init ()
|
|||
|
||||
if (CD_Window == NULL)
|
||||
{
|
||||
UnregisterClass ((LPCTSTR)CD_WindowAtom, g_hInst);
|
||||
UnregisterClass ((LPCTSTR)(int)CD_WindowAtom, g_hInst);
|
||||
CD_WindowAtom = 0;
|
||||
return false;
|
||||
}
|
||||
|
@ -217,7 +217,7 @@ void FCDThread::Deinit ()
|
|||
}
|
||||
if (CD_WindowAtom)
|
||||
{
|
||||
UnregisterClass ((LPCTSTR)CD_WindowAtom, g_hInst);
|
||||
UnregisterClass ((LPCTSTR)(int)CD_WindowAtom, g_hInst);
|
||||
CD_WindowAtom = 0;
|
||||
}
|
||||
if (DeviceID)
|
||||
|
|
Loading…
Reference in a new issue