mirror of
https://github.com/mkxp-z/mkxp-z.git
synced 2025-08-04 22:15:33 +02:00
make the terrifying sign-compare warnings go away
This commit is contained in:
parent
ac9f56c41c
commit
5855266dab
2 changed files with 6 additions and 6 deletions
|
@ -169,12 +169,12 @@ struct BitmapPrivate
|
||||||
unsigned long long startTime;
|
unsigned long long startTime;
|
||||||
unsigned long long playTime;
|
unsigned long long playTime;
|
||||||
|
|
||||||
inline int currentFrameIRaw() {
|
inline unsigned int currentFrameIRaw() {
|
||||||
if (fps <= 0) return lastFrame;
|
if (fps <= 0) return lastFrame;
|
||||||
return floor(lastFrame + (playTime / ((1 / fps) * 1000000)));
|
return floor(lastFrame + (playTime / ((1 / fps) * 1000000)));
|
||||||
}
|
}
|
||||||
|
|
||||||
int currentFrameI() {
|
unsigned int currentFrameI() {
|
||||||
if (!playing || needsReset) return lastFrame;
|
if (!playing || needsReset) return lastFrame;
|
||||||
int i = currentFrameIRaw();
|
int i = currentFrameIRaw();
|
||||||
return (loop) ? fmod(i, frames.size()) : (i > (int)frames.size() - 1) ? (int)frames.size() - 1 : i;
|
return (loop) ? fmod(i, frames.size()) : (i > (int)frames.size() - 1) ? (int)frames.size() - 1 : i;
|
||||||
|
@ -480,7 +480,7 @@ Bitmap::Bitmap(const char *filename)
|
||||||
if (handler.gif) {
|
if (handler.gif) {
|
||||||
p = new BitmapPrivate(this);
|
p = new BitmapPrivate(this);
|
||||||
|
|
||||||
if (handler.gif->width >= glState.caps.maxTexSize || handler.gif->height > glState.caps.maxTexSize)
|
if ((uint32_t)handler.gif->width >= glState.caps.maxTexSize || (uint32_t)handler.gif->height > glState.caps.maxTexSize)
|
||||||
{
|
{
|
||||||
throw new Exception(Exception::MKXPError, "Animation too large (%ix%i, max %ix%i)",
|
throw new Exception(Exception::MKXPError, "Animation too large (%ix%i, max %ix%i)",
|
||||||
handler.gif->width, handler.gif->height, glState.caps.maxTexSize, glState.caps.maxTexSize);
|
handler.gif->width, handler.gif->height, glState.caps.maxTexSize, glState.caps.maxTexSize);
|
||||||
|
|
|
@ -1256,7 +1256,7 @@ void Graphics::playMovie(const char *filename, int volume, bool skippable) {
|
||||||
letterbox.fillRect(0, 0, width(), height(), Vec4(0,0,0,255));
|
letterbox.fillRect(0, 0, width(), height(), Vec4(0,0,0,255));
|
||||||
letterboxSprite.setBitmap(&letterbox);
|
letterboxSprite.setBitmap(&letterbox);
|
||||||
|
|
||||||
letterboxSprite.setZ(-999);
|
letterboxSprite.setZ(-1000);
|
||||||
movieSprite.setZ(-998);
|
movieSprite.setZ(-998);
|
||||||
|
|
||||||
movie->play();
|
movie->play();
|
||||||
|
@ -1366,10 +1366,10 @@ void Graphics::repaintWait(const AtomicFlag &exitCond, bool checkReset) {
|
||||||
GLMeta::blitSource(lastFrame);
|
GLMeta::blitSource(lastFrame);
|
||||||
|
|
||||||
while (!exitCond) {
|
while (!exitCond) {
|
||||||
0;//shState->checkShutdown();
|
shState->checkShutdown();
|
||||||
|
|
||||||
if (checkReset)
|
if (checkReset)
|
||||||
0;//shState->checkReset();
|
shState->checkReset();
|
||||||
|
|
||||||
FBO::clear();
|
FBO::clear();
|
||||||
p->metaBlitBufferFlippedScaled();
|
p->metaBlitBufferFlippedScaled();
|
||||||
|
|
Loading…
Add table
Reference in a new issue