mirror of
https://github.com/mkxp-z/mkxp-z.git
synced 2025-08-04 22:15:33 +02:00
Edit warning visibility
This commit is contained in:
parent
4cd35cc3b6
commit
2b316a933d
2 changed files with 14 additions and 16 deletions
|
@ -3318,10 +3318,7 @@
|
||||||
);
|
);
|
||||||
MACOSX_DEPLOYMENT_TARGET = 10.12;
|
MACOSX_DEPLOYMENT_TARGET = 10.12;
|
||||||
ONLY_ACTIVE_ARCH = YES;
|
ONLY_ACTIVE_ARCH = YES;
|
||||||
OTHER_CFLAGS = (
|
OTHER_CFLAGS = "-fdeclspec";
|
||||||
"-fdeclspec",
|
|
||||||
"-w",
|
|
||||||
);
|
|
||||||
OTHER_CODE_SIGN_FLAGS = "--ignore-resources";
|
OTHER_CODE_SIGN_FLAGS = "--ignore-resources";
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = "org.zoro.mkxp-z";
|
PRODUCT_BUNDLE_IDENTIFIER = "org.zoro.mkxp-z";
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
|
|
@ -179,7 +179,7 @@ struct BitmapPrivate
|
||||||
inline int currentFrameI() {
|
inline int currentFrameI() {
|
||||||
if (!playing || fps <= 0) return lastFrame;
|
if (!playing || fps <= 0) return lastFrame;
|
||||||
int i = currentFrameIRaw();
|
int i = currentFrameIRaw();
|
||||||
return (loop) ? fmod(i, frames.size()) : (i > frames.size() - 1) ? frames.size() - 1 : i;
|
return (loop) ? fmod(i, frames.size()) : (i > (int)frames.size() - 1) ? (int)frames.size() - 1 : i;
|
||||||
}
|
}
|
||||||
|
|
||||||
TEXFBO ¤tFrame() {
|
TEXFBO ¤tFrame() {
|
||||||
|
@ -664,7 +664,7 @@ Bitmap::Bitmap(const Bitmap &other, bool copyAllFrames)
|
||||||
} catch(const Exception &e) {
|
} catch(const Exception &e) {
|
||||||
for (TEXFBO &f : p->animation.frames)
|
for (TEXFBO &f : p->animation.frames)
|
||||||
shState->texPool().release(f);
|
shState->texPool().release(f);
|
||||||
delete tmp;
|
delete[] tmp;
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -677,7 +677,7 @@ Bitmap::Bitmap(const Bitmap &other, bool copyAllFrames)
|
||||||
|
|
||||||
p->animation.frames.push_back(copyframe);
|
p->animation.frames.push_back(copyframe);
|
||||||
}
|
}
|
||||||
delete tmp;
|
delete[] tmp;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -690,11 +690,13 @@ int Bitmap::width() const
|
||||||
{
|
{
|
||||||
guardDisposed();
|
guardDisposed();
|
||||||
|
|
||||||
if (p->megaSurface)
|
if (p->megaSurface) {
|
||||||
return p->megaSurface->w;
|
return p->megaSurface->w;
|
||||||
|
}
|
||||||
|
|
||||||
if (p->animation.enabled)
|
if (p->animation.enabled) {
|
||||||
return p->animation.width;
|
return p->animation.width;
|
||||||
|
}
|
||||||
|
|
||||||
return p->gl.width;
|
return p->gl.width;
|
||||||
}
|
}
|
||||||
|
@ -1852,7 +1854,7 @@ void Bitmap::gotoAndPlay(int frame)
|
||||||
int Bitmap::numFrames() const
|
int Bitmap::numFrames() const
|
||||||
{
|
{
|
||||||
if (!p->animation.enabled) return 1;
|
if (!p->animation.enabled) return 1;
|
||||||
return p->animation.frames.size();
|
return (int)p->animation.frames.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
int Bitmap::currentFrameI() const
|
int Bitmap::currentFrameI() const
|
||||||
|
@ -1904,14 +1906,14 @@ int Bitmap::addFrame(Bitmap &source, int position)
|
||||||
gl.ReadPixels(0,0,source.width(),source.height(),GL_RGBA,GL_UNSIGNED_BYTE,pixels);
|
gl.ReadPixels(0,0,source.width(),source.height(),GL_RGBA,GL_UNSIGNED_BYTE,pixels);
|
||||||
TEX::bind(newframe.tex);
|
TEX::bind(newframe.tex);
|
||||||
TEX::uploadImage(newframe.width, newframe.height, pixels, GL_RGBA);
|
TEX::uploadImage(newframe.width, newframe.height, pixels, GL_RGBA);
|
||||||
delete pixels;
|
delete[] pixels;
|
||||||
}
|
}
|
||||||
|
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (position < 0) {
|
if (position < 0) {
|
||||||
p->animation.frames.push_back(newframe);
|
p->animation.frames.push_back(newframe);
|
||||||
ret = p->animation.frames.size();
|
ret = (int)p->animation.frames.size();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
p->animation.frames.insert(p->animation.frames.begin() + clamp(position, 0, (int)p->animation.frames.size()), newframe);
|
p->animation.frames.insert(p->animation.frames.begin() + clamp(position, 0, (int)p->animation.frames.size()), newframe);
|
||||||
|
@ -1924,8 +1926,7 @@ int Bitmap::addFrame(Bitmap &source, int position)
|
||||||
void Bitmap::removeFrame(int position) {
|
void Bitmap::removeFrame(int position) {
|
||||||
GUARD_UNANIMATED;
|
GUARD_UNANIMATED;
|
||||||
|
|
||||||
int pos = (position < 0) ? p->animation.frames.size() - 1 : clamp(position, 0, (int)(p->animation.frames.size() - 1));
|
int pos = (position < 0) ? (int)p->animation.frames.size() - 1 : clamp(position, 0, (int)(p->animation.frames.size() - 1));
|
||||||
TEXFBO frame = p->animation.frames[pos];
|
|
||||||
shState->texPool().release(p->animation.frames[pos]);
|
shState->texPool().release(p->animation.frames[pos]);
|
||||||
p->animation.frames.erase(p->animation.frames.begin() + pos);
|
p->animation.frames.erase(p->animation.frames.begin() + pos);
|
||||||
|
|
||||||
|
@ -1972,7 +1973,7 @@ void Bitmap::previousFrame()
|
||||||
p->animation.lastFrame = 0;
|
p->animation.lastFrame = 0;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
p->animation.lastFrame = p->animation.frames.size() - 1;
|
p->animation.lastFrame = (int)p->animation.frames.size() - 1;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue