mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-13 19:40:43 +00:00
- fixed the remaining warnings.
This commit is contained in:
parent
cf22a70d82
commit
cb2bc7967a
13 changed files with 47 additions and 47 deletions
|
@ -192,8 +192,8 @@ void FNotifyBuffer::Draw()
|
|||
double nfscale = (generic_ui? 0.7 : NotifyFontScale);
|
||||
double scale = 1 / ( * con_notifyscale);
|
||||
|
||||
int line = Top + font->GetDisplacement() / nfscale;
|
||||
int lineadv = font->GetHeight () / nfscale;
|
||||
double line = Top + font->GetDisplacement() / nfscale;
|
||||
double lineadv = font->GetHeight () / nfscale;
|
||||
|
||||
for (unsigned i = 0; i < Text.Size(); ++ i)
|
||||
{
|
||||
|
|
|
@ -481,7 +481,7 @@ int HWLinePortal::ClipSeg(walltype *seg, const DVector3 &viewpos)
|
|||
int HWLinePortal::ClipSector(sectortype *sub)
|
||||
{
|
||||
// this seg is completely behind the mirror
|
||||
for (unsigned int i = 0; i<sub->wallnum; i++)
|
||||
for (int i = 0; i<sub->wallnum; i++)
|
||||
{
|
||||
if (PointOnLineSide(WallStart(&wall[sub->wallptr]), line) == 0) return PClip_Inside;
|
||||
}
|
||||
|
|
|
@ -274,7 +274,7 @@ void BuildTiles::MakeCanvas(int tilenum, int width, int height)
|
|||
{
|
||||
auto canvas = ValidateCustomTile(tilenum, ReplacementType::Canvas);
|
||||
canvas->SetSize(width*4, height*4);
|
||||
canvas->SetDisplaySize(width, height);
|
||||
canvas->SetDisplaySize((float)width, (float)height);
|
||||
canvas->GetTexture()->SetSize(width * 4, height * 4);
|
||||
static_cast<FCanvasTexture*>(canvas->GetTexture())->aspectRatio = (float)width / height;
|
||||
}
|
||||
|
@ -291,7 +291,7 @@ void BuildTiles::MakeCanvas(int tilenum, int width, int height)
|
|||
|
||||
int BuildTiles::LoadArtFile(const char *fn, const char *mapname, int firsttile)
|
||||
{
|
||||
auto old = FindFile(fn);
|
||||
unsigned old = FindFile(fn);
|
||||
if (old >= ArtFiles.Size()) // Do not process if already loaded.
|
||||
{
|
||||
FileReader fr = fileSystem.OpenFileReader(fn);
|
||||
|
|
|
@ -440,7 +440,7 @@ bool PreBindTexture(FRenderState* state, FGameTexture*& tex, EUpscaleFlags& flag
|
|||
flags |= (((pick.tintFlags & TINTF_BLENDMASK) >> 6) + 1) & TextureManipulation::BlendMask;
|
||||
}
|
||||
}
|
||||
addcol.W = flags;
|
||||
addcol.W = (float)flags;
|
||||
if ((pick.translation & 0x80000000) && hw_shadeinterpolate) addcol.W += 16384; // hijack a free bit in here.
|
||||
state->SetTextureColors(&modcol.X, &addcol.X, &blendcol.X);
|
||||
}
|
||||
|
|
|
@ -4461,7 +4461,7 @@ void handle_se27(DDukeActor* actor)
|
|||
{
|
||||
if (cansee(s->x, s->y, s->z, s->sectnum, ps[p].posx, ps[p].posy, ps[p].posz, ps[p].cursectnum))
|
||||
{
|
||||
if (x < (unsigned)sh)
|
||||
if (x < sh)
|
||||
{
|
||||
ud.cameraactor = actor;
|
||||
t[0] = 999;
|
||||
|
|
|
@ -232,7 +232,7 @@ void drawoverlays(double smoothratio)
|
|||
// loogies courtesy of being snotted on
|
||||
if (pp->loogcnt > 0 && !isRR())
|
||||
{
|
||||
V_AddBlend(0, 63, 0, (pp->loogcnt >> 1), blend);
|
||||
V_AddBlend(0, 63, 0, float(pp->loogcnt >> 1), blend);
|
||||
}
|
||||
if (blend[3])
|
||||
{
|
||||
|
|
|
@ -300,7 +300,7 @@ int ConCompiler::getkeyword(const char* text)
|
|||
|
||||
while (min <= max)
|
||||
{
|
||||
int mid = (min + max) >> 1;
|
||||
auto mid = (min + max) >> 1;
|
||||
const int comp = strcmp(text, cmdList[mid].cmd);
|
||||
|
||||
if (comp == 0)
|
||||
|
|
|
@ -633,7 +633,7 @@ void DoPlayer(bool bSet, int lVar1, int lLabelID, int lVar2, DDukeActor* sActor,
|
|||
|
||||
case PLAYER_ONE_EIGHTY_COUNT:
|
||||
if (bSet) ps[iPlayer].angle.spin = lValue;
|
||||
else SetGameVarID(lVar2, ps[iPlayer].angle.spin, sActor, sPlayer);
|
||||
else SetGameVarID(lVar2, int(ps[iPlayer].angle.spin), sActor, sPlayer);
|
||||
break;
|
||||
|
||||
case PLAYER_CHEAT_PHASE:
|
||||
|
@ -987,11 +987,11 @@ void DoWall(char bSet, int lVar1, int lLabelID, int lVar2, DDukeActor* sActor, s
|
|||
else SetGameVarID(lVar2, wall[iWall].yrepeat, sActor, sPlayer);
|
||||
break;
|
||||
case WALL_XPANNING:
|
||||
if (bSet) wall[iWall].xpan_ = lValue;
|
||||
if (bSet) wall[iWall].xpan_ = (float)(lValue & 255);
|
||||
else SetGameVarID(lVar2, wall[iWall].xpan(), sActor, sPlayer);
|
||||
break;
|
||||
case WALL_YPANNING:
|
||||
if (bSet) wall[iWall].ypan_ = lValue;
|
||||
if (bSet) wall[iWall].ypan_ = (float)(lValue & 255);
|
||||
else SetGameVarID(lVar2, wall[iWall].ypan(), sActor, sPlayer);
|
||||
break;
|
||||
case WALL_LOTAG:
|
||||
|
@ -1077,11 +1077,11 @@ void DoSector(char bSet, int lVar1, int lLabelID, int lVar2, DDukeActor* sActor,
|
|||
else SetGameVarID(lVar2, sector[iSector].ceilingpal, sActor, sPlayer);
|
||||
break;
|
||||
case SECTOR_CEILINGXPANNING:
|
||||
if (bSet) sector[iSector].ceilingxpan_ = lValue;
|
||||
if (bSet) sector[iSector].ceilingxpan_ = (float)(lValue & 255);
|
||||
else SetGameVarID(lVar2, sector[iSector].ceilingxpan(), sActor, sPlayer);
|
||||
break;
|
||||
case SECTOR_CEILINGYPANNING:
|
||||
if (bSet) sector[iSector].ceilingypan_ = lValue;
|
||||
if (bSet) sector[iSector].ceilingypan_ = (float)(lValue & 255);
|
||||
else SetGameVarID(lVar2, sector[iSector].ceilingypan(), sActor, sPlayer);
|
||||
break;
|
||||
case SECTOR_FLOORPICNUM:
|
||||
|
@ -1101,11 +1101,11 @@ void DoSector(char bSet, int lVar1, int lLabelID, int lVar2, DDukeActor* sActor,
|
|||
else SetGameVarID(lVar2, sector[iSector].floorpal, sActor, sPlayer);
|
||||
break;
|
||||
case SECTOR_FLOORXPANNING:
|
||||
if (bSet) sector[iSector].floorxpan_ = lValue;
|
||||
if (bSet) sector[iSector].floorxpan_ = (float)(lValue & 255);
|
||||
else SetGameVarID(lVar2, sector[iSector].floorxpan(), sActor, sPlayer);
|
||||
break;
|
||||
case SECTOR_FLOORYPANNING:
|
||||
if (bSet) sector[iSector].floorypan_ = lValue;
|
||||
if (bSet) sector[iSector].floorypan_ = (float)(lValue & 255);
|
||||
else SetGameVarID(lVar2, sector[iSector].floorypan(), sActor, sPlayer);
|
||||
break;
|
||||
case SECTOR_VISIBILITY:
|
||||
|
@ -1698,7 +1698,7 @@ int ParseState::parse(void)
|
|||
ps[connecthead].max_actors_killed++; //revive the egg
|
||||
g_ac->temp_data[5] = 0;
|
||||
}
|
||||
g_sp->pal = g_ac->tempang;
|
||||
g_sp->pal = (uint8_t)g_ac->tempang;
|
||||
}
|
||||
g_ac->tempang = 0;
|
||||
break;
|
||||
|
@ -2194,7 +2194,7 @@ int ParseState::parse(void)
|
|||
break;
|
||||
case concmd_clipdist:
|
||||
insptr++;
|
||||
g_sp->clipdist = (short) *insptr;
|
||||
g_sp->clipdist = (uint8_t) *insptr;
|
||||
insptr++;
|
||||
break;
|
||||
case concmd_cstat:
|
||||
|
|
|
@ -369,7 +369,7 @@ void hud_input(int plnum)
|
|||
{
|
||||
int j = gs.max_player_health - p->GetActor()->s->extra;
|
||||
|
||||
if ((unsigned int)p->firstaid_amount > j)
|
||||
if (p->firstaid_amount > j)
|
||||
{
|
||||
p->firstaid_amount -= j;
|
||||
p->GetActor()->s->extra = gs.max_player_health;
|
||||
|
@ -568,13 +568,13 @@ static double motoApplyTurn(player_struct* p, ControlInfo* const hidInput, bool
|
|||
|
||||
if (kbdLeft || hidInput->mouseturnx < 0 || hidInput->dyaw < 0)
|
||||
{
|
||||
p->TiltStatus -= factor;
|
||||
p->TiltStatus -= (float)factor;
|
||||
if (p->TiltStatus < -10)
|
||||
p->TiltStatus = -10;
|
||||
}
|
||||
else if (kbdRight || hidInput->mouseturnx > 0 || hidInput->dyaw > 0)
|
||||
{
|
||||
p->TiltStatus += factor;
|
||||
p->TiltStatus += (float)factor;
|
||||
if (p->TiltStatus > 10)
|
||||
p->TiltStatus = 10;
|
||||
}
|
||||
|
@ -589,7 +589,7 @@ static double motoApplyTurn(player_struct* p, ControlInfo* const hidInput, bool
|
|||
if (kbdLeft || p->moto_drink < 0 || hidInput->mouseturnx < 0 || hidInput->dyaw < 0)
|
||||
{
|
||||
updateTurnHeldAmt(factor);
|
||||
p->TiltStatus -= factor;
|
||||
p->TiltStatus -= (float)factor;
|
||||
|
||||
if (p->TiltStatus < -10)
|
||||
p->TiltStatus = -10;
|
||||
|
@ -607,7 +607,7 @@ static double motoApplyTurn(player_struct* p, ControlInfo* const hidInput, bool
|
|||
if (kbdRight || p->moto_drink > 0 || hidInput->mouseturnx > 0 || hidInput->dyaw > 0)
|
||||
{
|
||||
updateTurnHeldAmt(factor);
|
||||
p->TiltStatus += factor;
|
||||
p->TiltStatus += (float)factor;
|
||||
|
||||
if (p->TiltStatus > 10)
|
||||
p->TiltStatus = 10;
|
||||
|
@ -627,9 +627,9 @@ static double motoApplyTurn(player_struct* p, ControlInfo* const hidInput, bool
|
|||
resetTurnHeldAmt();
|
||||
|
||||
if (p->TiltStatus > 0)
|
||||
p->TiltStatus -= factor;
|
||||
p->TiltStatus -= (float)factor;
|
||||
else if (p->TiltStatus < 0)
|
||||
p->TiltStatus += factor;
|
||||
p->TiltStatus += (float)factor;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -663,7 +663,7 @@ static double boatApplyTurn(player_struct *p, ControlInfo* const hidInput, bool
|
|||
|
||||
if (!p->NotOnWater)
|
||||
{
|
||||
p->TiltStatus -= factor;
|
||||
p->TiltStatus -= (float)factor;
|
||||
if (p->TiltStatus < -10)
|
||||
p->TiltStatus = -10;
|
||||
}
|
||||
|
@ -684,7 +684,7 @@ static double boatApplyTurn(player_struct *p, ControlInfo* const hidInput, bool
|
|||
|
||||
if (!p->NotOnWater)
|
||||
{
|
||||
p->TiltStatus += factor;
|
||||
p->TiltStatus += (float)factor;
|
||||
if (p->TiltStatus > 10)
|
||||
p->TiltStatus = 10;
|
||||
}
|
||||
|
@ -704,9 +704,9 @@ static double boatApplyTurn(player_struct *p, ControlInfo* const hidInput, bool
|
|||
resetTurnHeldAmt();
|
||||
|
||||
if (p->TiltStatus > 0)
|
||||
p->TiltStatus -= factor;
|
||||
p->TiltStatus -= (float)factor;
|
||||
else if (p->TiltStatus < 0)
|
||||
p->TiltStatus += factor;
|
||||
p->TiltStatus += (float)factor;
|
||||
}
|
||||
}
|
||||
else if (!p->NotOnWater)
|
||||
|
@ -714,9 +714,9 @@ static double boatApplyTurn(player_struct *p, ControlInfo* const hidInput, bool
|
|||
resetTurnHeldAmt();
|
||||
|
||||
if (p->TiltStatus > 0)
|
||||
p->TiltStatus -= factor;
|
||||
p->TiltStatus -= (float)factor;
|
||||
else if (p->TiltStatus < 0)
|
||||
p->TiltStatus += factor;
|
||||
p->TiltStatus += (float)factor;
|
||||
}
|
||||
|
||||
if (fabs(p->TiltStatus) < factor)
|
||||
|
@ -747,12 +747,12 @@ static void processVehicleInput(player_struct *p, ControlInfo* const hidInput, I
|
|||
|
||||
if (p->OnMotorcycle)
|
||||
{
|
||||
input.avel = motoApplyTurn(p, hidInput, kbdLeft, kbdRight, scaleAdjust);
|
||||
input.avel = (float)motoApplyTurn(p, hidInput, kbdLeft, kbdRight, scaleAdjust);
|
||||
if (p->moto_underwater) p->MotoSpeed = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
input.avel = boatApplyTurn(p, hidInput, kbdLeft, kbdRight, scaleAdjust);
|
||||
input.avel = (float)boatApplyTurn(p, hidInput, kbdLeft, kbdRight, scaleAdjust);
|
||||
}
|
||||
|
||||
loc.fvel = clamp(xs_CRoundToInt(p->MotoSpeed), -(MAXVELMOTO >> 3), MAXVELMOTO);
|
||||
|
|
|
@ -521,7 +521,7 @@ void footprints(int snum)
|
|||
default: fprint = spawn(actor, TILE_FOOTPRINTS4); break;
|
||||
}
|
||||
fprint->s->pal = p->footprintpal;
|
||||
fprint->s->shade = p->footprintshade;
|
||||
fprint->s->shade = (int8_t)p->footprintshade;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -73,7 +73,7 @@ void renderView(spritetype* playersprite, int sectnum, int x, int y, int z, bina
|
|||
if (!testnewrenderer)
|
||||
{
|
||||
// do screen rotation.
|
||||
renderSetRollAngle(rotscrnang.asbuildf());
|
||||
renderSetRollAngle((float)rotscrnang.asbuildf());
|
||||
|
||||
se40code(x, y, z, a, h, smoothratio);
|
||||
renderMirror(x, y, z, a, h, smoothratio);
|
||||
|
@ -108,7 +108,7 @@ void GameInterface::UpdateCameras(double smoothratio)
|
|||
if (camsprite->GetOwner() && dist(p->GetActor(), camsprite) < VIEWSCREEN_ACTIVE_DISTANCE)
|
||||
{
|
||||
auto tex = tileGetTexture(sp->picnum);
|
||||
TileFiles.MakeCanvas(TILE_VIEWSCR, tex->GetDisplayWidth(), tex->GetDisplayHeight());
|
||||
TileFiles.MakeCanvas(TILE_VIEWSCR, (int)tex->GetDisplayWidth(), (int)tex->GetDisplayHeight());
|
||||
|
||||
auto canvas = renderSetTarget(TILE_VIEWSCR);
|
||||
if (!canvas) return;
|
||||
|
@ -122,7 +122,7 @@ void GameInterface::UpdateCameras(double smoothratio)
|
|||
{
|
||||
// Note: no ROR or camera here - Polymost has no means to detect these things before rendering the scene itself.
|
||||
renderDrawRoomsQ16(camera->x, camera->y, camera->z, ang.asq16(), IntToFixed(camera->shade), camera->sectnum); // why 'shade'...?
|
||||
fi.animatesprites(pm_tsprite, pm_spritesortcnt, camera->x, camera->y, ang.asbuild(), smoothratio);
|
||||
fi.animatesprites(pm_tsprite, pm_spritesortcnt, camera->x, camera->y, ang.asbuild(), (int)smoothratio);
|
||||
renderDrawMasks();
|
||||
}
|
||||
else
|
||||
|
@ -299,7 +299,7 @@ void displayrooms(int snum, double smoothratio)
|
|||
cang = buildang(interpolatedangle(ud.cameraactor->tempang, s->ang, smoothratio));
|
||||
|
||||
auto bh = buildhoriz(s->yvel);
|
||||
renderView(s, s->sectnum, s->x, s->y, s->z - (4 << 8), cang, bh, buildang(0), smoothratio);
|
||||
renderView(s, s->sectnum, s->x, s->y, s->z - (4 << 8), cang, bh, buildang(0), (int)smoothratio);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -410,12 +410,12 @@ void displayrooms(int snum, double smoothratio)
|
|||
|
||||
if (isRR() && sector[sect].lotag == 848 && !testnewrenderer)
|
||||
{
|
||||
renderSetRollAngle(rotscrnang.asbuildf());
|
||||
geometryEffect(cposx, cposy, cposz, cang, choriz, sect, smoothratio);
|
||||
renderSetRollAngle((float)rotscrnang.asbuildf());
|
||||
geometryEffect(cposx, cposy, cposz, cang, choriz, sect, (int)smoothratio);
|
||||
}
|
||||
else
|
||||
{
|
||||
renderView(viewer, sect, cposx, cposy, cposz, cang, choriz, rotscrnang, smoothratio);
|
||||
renderView(viewer, sect, cposx, cposy, cposz, cang, choriz, rotscrnang, (int)smoothratio);
|
||||
}
|
||||
}
|
||||
//GLInterface.SetMapFog(false);
|
||||
|
|
|
@ -1090,10 +1090,10 @@ void operateactivators(int low, int plnum)
|
|||
{
|
||||
p[5] = !p[5];
|
||||
|
||||
sector[p[0]].floorshade = sector[p[0]].ceilingshade = p[3];
|
||||
sector[p[0]].floorshade = sector[p[0]].ceilingshade = (int8_t)p[3];
|
||||
wal = &wall[sector[p[0]].wallptr];
|
||||
for (j = sector[p[0]].wallnum; j > 0; j--, wal++)
|
||||
wal->shade = p[3];
|
||||
wal->shade = (int8_t)p[3];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1267,8 +1267,8 @@ void moveclouds(double smoothratio)
|
|||
cloudclock = myclock + 6;
|
||||
|
||||
// cloudx/y were an array, but all entries were always having the same value so a single pair is enough.
|
||||
cloudx += ps[screenpeek].angle.ang.fcos() * 0.5f;
|
||||
cloudy += ps[screenpeek].angle.ang.fsin() * 0.5f;
|
||||
cloudx += (float)ps[screenpeek].angle.ang.fcos() * 0.5f;
|
||||
cloudy += (float)ps[screenpeek].angle.ang.fsin() * 0.5f;
|
||||
for (int i = 0; i < numclouds; i++)
|
||||
{
|
||||
if (!testnewrenderer)
|
||||
|
|
|
@ -84,8 +84,8 @@ void GLInstance::Draw(EDrawType type, size_t start, size_t count)
|
|||
{
|
||||
assert (BufferLock > 0);
|
||||
applyMapFog();
|
||||
renderState.vindex = start;
|
||||
renderState.vcount = count;
|
||||
renderState.vindex = (int)start;
|
||||
renderState.vcount = (int)count;
|
||||
renderState.primtype = type;
|
||||
rendercommands.Push(renderState);
|
||||
clearMapFog();
|
||||
|
|
Loading…
Reference in a new issue