From ee3e60581ca4d056f991857c44c1284f3effa3f3 Mon Sep 17 00:00:00 2001 From: whitecum1488 Date: Mon, 29 Jun 2026 01:49:43 +0400 Subject: [PATCH] =?UTF-8?q?=D0=93=D0=BB=D1=83=D0=BF=D0=B5=D0=BD=D1=8C?= =?UTF-8?q?=D0=BA=D0=B8=D0=B5=20=D0=B8=D0=B7=D0=BC=D0=B5=D0=BD=D0=B5=D0=BD?= =?UTF-8?q?=D0=B8=D1=8F=20=D0=B3=D0=BE=D1=8F=D1=8C=D1=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/bitmap.cpp | 4 ++-- src/etc.cpp | 3 --- src/filesystem.cpp | 5 ----- src/gl-debug.cpp | 2 +- src/plane.cpp | 8 +++----- src/sprite.cpp | 3 +-- 6 files changed, 7 insertions(+), 18 deletions(-) diff --git a/src/bitmap.cpp b/src/bitmap.cpp index 9dcf18c..a6ae5e2 100644 --- a/src/bitmap.cpp +++ b/src/bitmap.cpp @@ -227,7 +227,7 @@ Bitmap::Bitmap(const char *filename){ if (!imgSurf) crash(Exception::SDLError, "Error loading image '%s': %s", filename, SDL_GetError()); - + p->ensureFormat(imgSurf, SDL_PIXELFORMAT_ABGR8888); if (imgSurf->w > glState.caps.maxTexSize || imgSurf->h > glState.caps.maxTexSize){ @@ -1072,6 +1072,7 @@ void Bitmap::drawText(const IntRect &rect, const char *str, int align){ shState->bindTex(); TEX::uploadSubImage(0, 0, txtSurf->w, txtSurf->h, txtSurf->pixels, GL_RGBA); + //TODO: настройка в зависимости от oneshot.conf TEX::setSmooth(true); Quad &quad = shState->gpQuad(); @@ -1142,7 +1143,6 @@ IntRect Bitmap::textSize(const char *str){ // i don't know if its right migration, i didn't find any other way TTF_Text* text = TTF_CreateText(NULL, font, str, strlen(str)); - int w, h; TTF_GetTextSize(text, &w, &h); diff --git a/src/etc.cpp b/src/etc.cpp index d1156f5..28d837d 100644 --- a/src/etc.cpp +++ b/src/etc.cpp @@ -24,9 +24,6 @@ #include "serial-util.h" #include "exception.h" #include "meow.h" - -// this file doesn't exist, idk what to do if it, so i'll comment it. -// #include #include Color::Color(double red, double green, double blue, double alpha) diff --git a/src/filesystem.cpp b/src/filesystem.cpp index a2526c2..a3a8fd2 100644 --- a/src/filesystem.cpp +++ b/src/filesystem.cpp @@ -247,11 +247,6 @@ static void initReadOps(PHYSFS_File *handle, SDL_IOStream* &ops){ iface.read = SDL_RWopsRead; iface.write = SDL_RWopsWrite; - /* useless now :P - if (freeOnClose) - ops.close = SDL_RWopsCloseFree; - else */ - iface.flush = SDL_RWopsFlush; iface.close = SDL_RWopsClose; diff --git a/src/gl-debug.cpp b/src/gl-debug.cpp index a19d7c5..aa1dfe3 100644 --- a/src/gl-debug.cpp +++ b/src/gl-debug.cpp @@ -39,7 +39,7 @@ struct GLDebugLoggerPrivate{ void writeTimestamp(){ time(×tamp); - *stream << "[GLDEBUG " << ctime(×tamp) << "]"; + *stream << "[GLDEBUG] [" << ctime(×tamp) << "]"; } void writeLine(const char *line){ diff --git a/src/plane.cpp b/src/plane.cpp index da6118a..2086618 100644 --- a/src/plane.cpp +++ b/src/plane.cpp @@ -82,8 +82,7 @@ struct PlanePrivate{ shader(ShaderType::SHADER_plane) { updateSrcRectCon(); - prepareCon = shState->prepareDraw.connect - (sigc::mem_fun(this, &PlanePrivate::prepare)); + prepareCon = shState->prepareDraw.connect(sigc::mem_fun(this, &PlanePrivate::prepare)); qArray.resize(1); } @@ -101,8 +100,7 @@ struct PlanePrivate{ /* Cut old connection */ srcRectCon.disconnect(); /* Create new one */ - srcRectCon = srcRect->valueChanged.connect - (sigc::mem_fun(this, &PlanePrivate::onSrcRectChange)); + srcRectCon = srcRect->valueChanged.connect(sigc::mem_fun(this, &PlanePrivate::onSrcRectChange)); } void updateQuadSource(){ @@ -399,4 +397,4 @@ void Plane::defaultSpriteShaderInit(SpriteShaderBase &shader){ shader.setColor(p->color->norm); shader.setModulate(Vec4(1.0f, 1.0f, 1.0f, 1.0f)); -} \ No newline at end of file +} diff --git a/src/sprite.cpp b/src/sprite.cpp index 9a0c426..d43370b 100644 --- a/src/sprite.cpp +++ b/src/sprite.cpp @@ -114,8 +114,7 @@ struct SpritePrivate{ updateSrcRectCon(); - prepareCon = shState->prepareDraw.connect - (sigc::mem_fun(this, &SpritePrivate::prepare)); + prepareCon = shState->prepareDraw.connect(sigc::mem_fun(this, &SpritePrivate::prepare)); wave.amp = 0; wave.length = 180;