mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2025-07-03 06:24:32 +00:00
Revert ~0 to -1
This commit is contained in:
parent
c988858cd2
commit
2374c1a86b
8 changed files with 30 additions and 30 deletions
|
@ -216,7 +216,7 @@ void ParticleManager::prevFree(int jump)
|
|||
|
||||
void ParticleManager::setFree(size_t free)
|
||||
{
|
||||
if (free != ~0UL)
|
||||
if (free != -1)
|
||||
{
|
||||
this->free = free;
|
||||
}
|
||||
|
|
|
@ -101,7 +101,7 @@ void RenderObjectLayer::remove(RenderObject* r)
|
|||
objectCount--;
|
||||
if (idx < firstFreeIdx)
|
||||
firstFreeIdx = idx;
|
||||
r->setIdx(~0UL);
|
||||
r->setIdx(-1);
|
||||
|
||||
clearDisplayList();
|
||||
}
|
||||
|
|
|
@ -487,7 +487,7 @@ void AnimationLayer::setSkeletalSprite(SkeletalSprite *s)
|
|||
|
||||
Animation* AnimationLayer::getCurrentAnimation()
|
||||
{
|
||||
if (currentAnimation == ~0UL)
|
||||
if (currentAnimation == -1)
|
||||
return &blendAnimation;
|
||||
if (currentAnimation >= s->animations.size())
|
||||
{
|
||||
|
@ -652,7 +652,7 @@ size_t Animation::getSkeletalKeyframeIndex(SkeletalKeyframe *skey)
|
|||
if (&keyframes[i] == skey)
|
||||
return i;
|
||||
}
|
||||
return ~0UL;
|
||||
return -1;
|
||||
}
|
||||
|
||||
BoneKeyframe *SkeletalKeyframe::getBoneKeyframe(size_t idx)
|
||||
|
@ -669,7 +669,7 @@ BoneKeyframe *SkeletalKeyframe::getBoneKeyframe(size_t idx)
|
|||
|
||||
SkeletalKeyframe *Animation::getPrevKeyframe(float t)
|
||||
{
|
||||
size_t kf = ~0UL;
|
||||
size_t kf = -1;
|
||||
for (size_t i = keyframes.size(); i-- > 0; )
|
||||
{
|
||||
if (t >= keyframes[i].t)
|
||||
|
@ -678,7 +678,7 @@ SkeletalKeyframe *Animation::getPrevKeyframe(float t)
|
|||
break;
|
||||
}
|
||||
}
|
||||
if (kf == ~0UL)
|
||||
if (kf == -1)
|
||||
return 0;
|
||||
if (kf >= keyframes.size())
|
||||
kf = keyframes.size()-1;
|
||||
|
@ -687,7 +687,7 @@ SkeletalKeyframe *Animation::getPrevKeyframe(float t)
|
|||
|
||||
SkeletalKeyframe *Animation::getNextKeyframe(float t)
|
||||
{
|
||||
size_t kf = ~0UL;
|
||||
size_t kf = -1;
|
||||
for (size_t i = 0; i < keyframes.size(); i++)
|
||||
{
|
||||
if (t <= keyframes[i].t)
|
||||
|
@ -697,7 +697,7 @@ SkeletalKeyframe *Animation::getNextKeyframe(float t)
|
|||
}
|
||||
}
|
||||
|
||||
if (kf == ~0UL)
|
||||
if (kf == -1)
|
||||
return 0;
|
||||
if (kf >= keyframes.size())
|
||||
kf = keyframes.size()-1;
|
||||
|
@ -1011,7 +1011,7 @@ size_t SkeletalSprite::getBoneIdx(Bone *b)
|
|||
if (bones[i] == b)
|
||||
return i;
|
||||
}
|
||||
return ~0UL;
|
||||
return -1;
|
||||
}
|
||||
|
||||
void SkeletalSprite::toggleBone(size_t idx, int v)
|
||||
|
|
|
@ -156,7 +156,7 @@ int Texture::getPixelWidth()
|
|||
if (!data)
|
||||
return 0;
|
||||
|
||||
size_t smallestx = ~0UL, largestx = 0;
|
||||
size_t smallestx = -1, largestx = 0;
|
||||
for (unsigned int x = 0; x < unsigned(w); x++)
|
||||
{
|
||||
for (unsigned int y = 0; y < unsigned(h); y++)
|
||||
|
@ -183,7 +183,7 @@ int Texture::getPixelHeight()
|
|||
if (!data)
|
||||
return 0;
|
||||
|
||||
size_t smallesty = ~0UL, largesty = 0;
|
||||
size_t smallesty = -1, largesty = 0;
|
||||
for (unsigned int x = 0; x < unsigned(w); x++)
|
||||
{
|
||||
for (unsigned int y = 0; y < unsigned(h); y++)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue