mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-30 16:00:55 +00:00
- fixed some uses of postincre,ment/decrements on narrow types.
THe VM has no opcode for this, all these places produced code with undefined behavior.
This commit is contained in:
parent
a94f5dd1b3
commit
668f8f2cf6
5 changed files with 13 additions and 7 deletions
|
@ -239,8 +239,13 @@ void VkRenderBuffers::CreateShadowmap()
|
|||
|
||||
ImageBuilder builder;
|
||||
builder.setSize(gl_shadowmap_quality, 1024);
|
||||
builder.setFormat(VK_FORMAT_R32_SFLOAT);
|
||||
builder.setFormat(SceneNormalFormat);
|
||||
builder.setUsage(VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT | VK_IMAGE_USAGE_SAMPLED_BIT);
|
||||
if (!builder.isFormatSupported(fb->device, VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT | VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT))
|
||||
{
|
||||
SceneNormalFormat = VK_FORMAT_R8G8B8A8_UNORM;
|
||||
builder.setFormat(SceneNormalFormat);
|
||||
}
|
||||
Shadowmap.Image = builder.create(fb->device);
|
||||
Shadowmap.Image->SetDebugName("VkRenderBuffers.Shadowmap");
|
||||
|
||||
|
|
|
@ -318,8 +318,8 @@ public:
|
|||
// This avoids anomalies with such things as Boom ice and conveyors.
|
||||
DVector2 Vel = { 0,0 };
|
||||
|
||||
int turnticks = 0;
|
||||
bool centering = false;
|
||||
uint8_t turnticks = 0;
|
||||
|
||||
|
||||
bool attackdown = false;
|
||||
|
@ -344,7 +344,7 @@ public:
|
|||
|
||||
int cheats = 0; // bit flags
|
||||
int timefreezer = 0; // Player has an active time freezer
|
||||
short refire = 0; // refired shots are less accurate
|
||||
int refire = 0; // refired shots are less accurate
|
||||
short inconsistant = 0;
|
||||
bool waiting = 0;
|
||||
int killcount = 0, itemcount = 0, secretcount = 0; // for intermission
|
||||
|
|
|
@ -218,7 +218,8 @@ class FireDemon : Actor
|
|||
// Normal movement
|
||||
if (!fdstrafecount)
|
||||
{
|
||||
if (--movecount<0 || !MonsterMove ())
|
||||
movecount = movecount - 1;
|
||||
if (movecount < 0 || !MonsterMove ())
|
||||
{
|
||||
NewChaseDir ();
|
||||
}
|
||||
|
|
|
@ -406,7 +406,7 @@ class StateProvider : Inventory
|
|||
if ((player.cmd.buttons & BT_ATTACK)
|
||||
&& !player.ReadyWeapon.bAltFire && !pending && player.health > 0)
|
||||
{
|
||||
player.refire = player.refire + 1;
|
||||
player.refire++;
|
||||
player.mo.FireWeapon(ResolveState(flash));
|
||||
}
|
||||
else if ((player.cmd.buttons & BT_ALTATTACK)
|
||||
|
|
|
@ -2652,7 +2652,7 @@ struct PlayerInfo native play // self is what internally is known as player_t
|
|||
native double bob;
|
||||
native vector2 vel;
|
||||
native bool centering;
|
||||
native uint8 turnticks;
|
||||
native int turnticks;
|
||||
native bool attackdown;
|
||||
native bool usedown;
|
||||
native uint oldbuttons;
|
||||
|
@ -2670,7 +2670,7 @@ struct PlayerInfo native play // self is what internally is known as player_t
|
|||
native PSprite psprites;
|
||||
native int cheats;
|
||||
native int timefreezer;
|
||||
native int16 refire;
|
||||
native int refire;
|
||||
native int16 inconsistent;
|
||||
native bool waiting;
|
||||
native int killcount;
|
||||
|
|
Loading…
Reference in a new issue