mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2025-10-17 11:59:28 +00:00
Fix some more warnings
This commit is contained in:
parent
b9d402199c
commit
4c7c4c240e
11 changed files with 24 additions and 29 deletions
|
@ -281,12 +281,9 @@ void BitmapText::onUpdate(float dt)
|
|||
Vector BitmapText::getColorIndex(size_t i, size_t j)
|
||||
{
|
||||
Vector c(1,1,1);
|
||||
if (!(i < 0 || j < 0))
|
||||
if ( i < colorIndices.size() && j < colorIndices[i].size())
|
||||
{
|
||||
if ( i < colorIndices.size() && j < colorIndices[i].size())
|
||||
{
|
||||
c = colorIndices[i][j];
|
||||
}
|
||||
c = colorIndices[i][j];
|
||||
}
|
||||
return c;
|
||||
}
|
||||
|
|
|
@ -207,14 +207,16 @@ void ParticleManager::nextFree(int jump)
|
|||
|
||||
void ParticleManager::prevFree(int jump)
|
||||
{
|
||||
free -= jump;
|
||||
if (free < 0)
|
||||
free += size;
|
||||
if(free < jump) {
|
||||
free = free + size - jump;
|
||||
} else {
|
||||
free -= jump;
|
||||
}
|
||||
}
|
||||
|
||||
void ParticleManager::setFree(int free)
|
||||
void ParticleManager::setFree(size_t free)
|
||||
{
|
||||
if (free != -1)
|
||||
if (free != ~0UL)
|
||||
{
|
||||
this->free = free;
|
||||
}
|
||||
|
|
|
@ -217,7 +217,7 @@ public:
|
|||
|
||||
void endParticle(Particle *p);
|
||||
|
||||
void setFree(int free);
|
||||
void setFree(size_t free);
|
||||
|
||||
int getFree() { return free; }
|
||||
int getNumActive() { return numActive; }
|
||||
|
|
|
@ -106,7 +106,7 @@ void Quad::createGrid(int xd, int yd)
|
|||
|
||||
void Quad::setDrawGridAlpha(size_t x, size_t y, float alpha)
|
||||
{
|
||||
if (x < xDivs && x >= 0 && y < yDivs && y >= 0)
|
||||
if (x < xDivs && y < yDivs)
|
||||
{
|
||||
drawGrid[x][y].z = alpha;
|
||||
}
|
||||
|
|
|
@ -1093,7 +1093,7 @@ void SkeletalSprite::prevAnimation()
|
|||
{
|
||||
stopAnimation();
|
||||
animLayers[0].currentAnimation--;
|
||||
if (animLayers[0].currentAnimation < 0)
|
||||
if (animLayers[0].currentAnimation >= animations.size())
|
||||
animLayers[0].currentAnimation = animations.size()-1;
|
||||
}
|
||||
|
||||
|
@ -1878,7 +1878,7 @@ void SkeletalSprite::selectNextBone()
|
|||
selectedBone--;
|
||||
if(selectedBone == oldsel)
|
||||
break;
|
||||
if (selectedBone < 0)
|
||||
if (selectedBone >= bones.size())
|
||||
selectedBone = bones.size()-1;
|
||||
}
|
||||
while (!bones[selectedBone]->selectable);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue