[Scummvm-git-logs] scummvm master -> c7d1bed42771e8c2580be2b26ef4bd30018aa74d
somaen
noreply at scummvm.org
Wed Dec 2 23:40:34 UTC 2026
This automated email contains information about 6 new commits which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
35641bf097 WATCHMAKER: Drop some noisy warning()-calls
c530eabf5c WATCHMAKER: Unstub rGetScreenInfos
df0d4d9f66 WATCHMAKER: Fix OOB read in SilbRecon
dc99c841d9 WATCHMAKER: Implement rReleaseBitmap
92641d2fe2 WATCHMAKER: Add screenshot support.
c7d1bed427 WATCHMAKER: Use bilinear filtering like in the original
Commit: 35641bf0977307a57f9dabca158714a9a6454d9c
https://github.com/scummvm/scummvm/commit/35641bf0977307a57f9dabca158714a9a6454d9c
Author: Einar Johan Trøan SømaÌen (somaen at scummvm.org)
Date: 2026-12-03T00:40:19+01:00
Commit Message:
WATCHMAKER: Drop some noisy warning()-calls
Changed paths:
engines/watchmaker/3d/material.cpp
engines/watchmaker/3d/movie.cpp
engines/watchmaker/3d/render/opengl_2d.cpp
diff --git a/engines/watchmaker/3d/material.cpp b/engines/watchmaker/3d/material.cpp
index e3c64fecd2b..df41fabc01f 100644
--- a/engines/watchmaker/3d/material.cpp
+++ b/engines/watchmaker/3d/material.cpp
@@ -235,7 +235,6 @@ void rAddToMaterialList(gMaterial &mat, signed short int ViewMatrixNum) {
gBatchBlock *bb = nullptr;
if ((mat.Flags & T3D_MATERIAL_MOVIE) && !(mat.Flags & T3D_MATERIAL_MOVIEPAUSED) && mat.Movie) {
- warning("Movie: %s %d", mat.Movie->_name.c_str(), mat.Texture->ID);
mat.Movie->updateMovie();
}
diff --git a/engines/watchmaker/3d/movie.cpp b/engines/watchmaker/3d/movie.cpp
index f542e840ebd..f49cdffeb24 100644
--- a/engines/watchmaker/3d/movie.cpp
+++ b/engines/watchmaker/3d/movie.cpp
@@ -123,7 +123,6 @@ void gMovie::buildNewFrame(byte *surf, uint16 frame) {
}
bool gMovie::setFrame(uint16 newFrame) {
- warning("Set Frame: %d\t%s", newFrame, _name.c_str());
if (_curFrame == newFrame)
return true;
@@ -183,8 +182,6 @@ bool gMovie::updateMovie() {
if (_paused)
return TRUE;
- warning("Update Movie: %s", _name.c_str());
-
if ((_curFrame == 0xFFFF) || (!_startTime)) {
_startTime = timeGetTime();
newFrame = 0;
diff --git a/engines/watchmaker/3d/render/opengl_2d.cpp b/engines/watchmaker/3d/render/opengl_2d.cpp
index 460e32391b1..94ade3e8bbd 100644
--- a/engines/watchmaker/3d/render/opengl_2d.cpp
+++ b/engines/watchmaker/3d/render/opengl_2d.cpp
@@ -217,8 +217,6 @@ void Renderer::clearBitmap(int dst, int dposx, int dposy, int sdimx, int sdimy,
void rBlitter(WGame &game, int dst, int src, int dposx, int dposy,
int sposx, int sposy, int sdimx, int sdimy) {
auto &bitmapList = game._renderer->_bitmapList.bitmaps;
- // TODO: This currently gets called a bit too much.
- warning("TODO: Stubbed rBlitter(%s, %d, %d, %d, %d, %d, %d, %d, %d)", bitmapList[src].name.c_str(), dst, src, dposx, dposy, sposx, sposy, sdimx, sdimy);
auto &bitmap = bitmapList[src];
Commit: c530eabf5ca44bd986c41b75449875ed4956daea
https://github.com/scummvm/scummvm/commit/c530eabf5ca44bd986c41b75449875ed4956daea
Author: Einar Johan Trøan SømaÌen (somaen at scummvm.org)
Date: 2026-12-03T00:40:20+01:00
Commit Message:
WATCHMAKER: Unstub rGetScreenInfos
It was a bit noisy, with this fix it should work correctly when
we add multiple resolutions later.
Assisted-by: Claude:claude-opus-5-5
Changed paths:
engines/watchmaker/render.cpp
diff --git a/engines/watchmaker/render.cpp b/engines/watchmaker/render.cpp
index 5ca0d3ee8f6..d2c0182e71d 100644
--- a/engines/watchmaker/render.cpp
+++ b/engines/watchmaker/render.cpp
@@ -33,6 +33,7 @@
#include "graphics/opengl/system_headers.h"
#include "math/glmath.h"
+#include "common/system.h"
#define MAXTEXTURES 2000
#define MAX_BITMAP_LIST 1024
@@ -163,9 +164,8 @@ bool rDeleteVertexBuffer(VertexBuffer &vb) {
}
void rGetScreenInfos(unsigned int *width, unsigned int *height, unsigned int *bpp) {
- warning("STUBBED: rGetScreenInfos");
- *width = 800;
- *height = 600;
+ *width = g_system->getWidth();
+ *height = g_system->getHeight();
*bpp = 32;
}
Commit: df0d4d9f66959d1f95e44182e35a60b826cb2353
https://github.com/scummvm/scummvm/commit/df0d4d9f66959d1f95e44182e35a60b826cb2353
Author: Einar Johan Trøan SømaÌen (somaen at scummvm.org)
Date: 2026-12-03T00:40:20+01:00
Commit Message:
WATCHMAKER: Fix OOB read in SilbRecon
SilbRecon() looks at the previous character, even when
none exists. The other special characters had a tp > 0 check,
so we added that to % as well.
Found with asan.
Assisted-by: Claude:claude-opus-5-5
Changed paths:
engines/watchmaker/t2d/expr.cpp
diff --git a/engines/watchmaker/t2d/expr.cpp b/engines/watchmaker/t2d/expr.cpp
index bf858cbd266..83ce9edab81 100644
--- a/engines/watchmaker/t2d/expr.cpp
+++ b/engines/watchmaker/t2d/expr.cpp
@@ -293,7 +293,7 @@ bool SilbRecon(char *Text, int tp, int LastVis, int NewSilb, int *CurrentSilb) {
break;
case '%':
- if ((i == 0) && (tolower(Text[tp - 1]) >= 'a') && (tolower(Text[tp - 1]) <= 'z')) Equal = TRUE;
+ if ((i == 0) && (tp > 0) && (tolower(Text[tp - 1]) >= 'a') && (tolower(Text[tp - 1]) <= 'z')) Equal = TRUE;
if ((i != 0) && (tolower(Text[tp]) >= 'a') && (tolower(Text[tp]) <= 'z')) {
Equal = TRUE;
tp++;
Commit: dc99c841d9fe53ddbc5ff95068f82ec128b5de14
https://github.com/scummvm/scummvm/commit/dc99c841d9fe53ddbc5ff95068f82ec128b5de14
Author: Einar Johan Trøan SømaÌen (somaen at scummvm.org)
Date: 2026-12-03T00:40:20+01:00
Commit Message:
WATCHMAKER: Implement rReleaseBitmap
rReleaseBitmap was stubbed, which would cause an error() on the
first deleted subtitle. We actively avoid releasing index 0,
since surface creation is stubbed to 0 currently.
Assisted-by: Claude:claude-opus-5-5
Changed paths:
engines/watchmaker/3d/render/opengl_texture.cpp
engines/watchmaker/3d/texture.h
engines/watchmaker/render.cpp
diff --git a/engines/watchmaker/3d/render/opengl_texture.cpp b/engines/watchmaker/3d/render/opengl_texture.cpp
index 5b73fb63277..2e75fbdf7e6 100644
--- a/engines/watchmaker/3d/render/opengl_texture.cpp
+++ b/engines/watchmaker/3d/render/opengl_texture.cpp
@@ -54,6 +54,9 @@ public:
OpenGLTexture() {
glGenTextures(1, &_texId);
}
+ ~OpenGLTexture() override {
+ glDeleteTextures(1, &_texId);
+ }
OpenGLTexture(unsigned int texId) : _texId(texId) {}
void applyWrapMode() {
GLint glWrapMode = (_wrapMode == TextureWrapMode::CLAMP) ? GL_CLAMP_TO_EDGE : GL_REPEAT;
diff --git a/engines/watchmaker/3d/texture.h b/engines/watchmaker/3d/texture.h
index b428565675a..403892b88ce 100644
--- a/engines/watchmaker/3d/texture.h
+++ b/engines/watchmaker/3d/texture.h
@@ -46,6 +46,11 @@ struct gTexture {
bool isEmpty() {
return _texture == nullptr;
}
+ // This is only safe to run if the instance owns the texture.
+ void release() {
+ delete _texture;
+ *this = gTexture();
+ }
void clear() {
// TODO: This will only work for the back-surface
warning("Clearing %d", _blitsOnTop.size());
diff --git a/engines/watchmaker/render.cpp b/engines/watchmaker/render.cpp
index d2c0182e71d..fad2842f8d5 100644
--- a/engines/watchmaker/render.cpp
+++ b/engines/watchmaker/render.cpp
@@ -185,8 +185,11 @@ void rReleaseAllBitmaps(unsigned int NotFlags) {
}
void rReleaseBitmap(int i) {
- error("STUBBED: rReleaseBitmap");
- return;
+ // Slot 0 is the back buffer, which rCreateSurface() (still a stub) hands
+ // out for rendered text; it must never be released.
+ if (!_vm || !_vm->_renderer || i <= 0 || i >= MAX_BITMAP_LIST)
+ return;
+ _vm->_renderer->_bitmapList.bitmaps[i].release();
}
void rReleaseAllTextures(unsigned int NotFlags) {
Commit: 92641d2fe2e24f4fa2dd9e3c2ee7dbbd800cc29d
https://github.com/scummvm/scummvm/commit/92641d2fe2e24f4fa2dd9e3c2ee7dbbd800cc29d
Author: Einar Johan Trøan SømaÌen (somaen at scummvm.org)
Date: 2026-12-03T00:40:20+01:00
Commit Message:
WATCHMAKER: Add screenshot support.
Unstubbing this avoids the game erroring when the user presses G.
Assisted-by: Claude:claude-opus-5-5
Changed paths:
engines/watchmaker/classes/do_keyboard.cpp
diff --git a/engines/watchmaker/classes/do_keyboard.cpp b/engines/watchmaker/classes/do_keyboard.cpp
index 2baffcc8255..708b5b89428 100644
--- a/engines/watchmaker/classes/do_keyboard.cpp
+++ b/engines/watchmaker/classes/do_keyboard.cpp
@@ -21,6 +21,7 @@
#include "watchmaker/classes/do_keyboard.h"
#include "common/keyboard.h"
+#include "common/system.h"
#include "watchmaker/3d/animation.h"
#include "watchmaker/3d/geometry.h"
#include "watchmaker/3d/math/llmath.h"
@@ -289,20 +290,7 @@ void ProcessKeyboard(WGame &game) {
bShowInfo ^= 1;
if (KeyUp(Common::KEYCODE_g)) {
- error("TODO: Screenshot support");
-#if 0
- FILE *fh;
- char str[32];
- int i;
- for (i = 1; i < 1000; i++) {
- sprintf(str, "Wm%#04d.tga", i);
- if ((fh = fopen(str, "rb")) == NULL)
- break;
- else
- fclose(fh);
- }
- rGrabVideo(str, 0);
-#endif
+ g_system->saveScreenshot(); // The original grabbed the screen to WmNNN.tga
}
if (KeyUp(Common::KEYCODE_END)) {
Commit: c7d1bed42771e8c2580be2b26ef4bd30018aa74d
https://github.com/scummvm/scummvm/commit/c7d1bed42771e8c2580be2b26ef4bd30018aa74d
Author: Einar Johan Trøan SømaÌen (somaen at scummvm.org)
Date: 2026-12-03T00:40:21+01:00
Commit Message:
WATCHMAKER: Use bilinear filtering like in the original
Changed paths:
engines/watchmaker/3d/render/opengl_texture.cpp
diff --git a/engines/watchmaker/3d/render/opengl_texture.cpp b/engines/watchmaker/3d/render/opengl_texture.cpp
index 2e75fbdf7e6..7d1548718e9 100644
--- a/engines/watchmaker/3d/render/opengl_texture.cpp
+++ b/engines/watchmaker/3d/render/opengl_texture.cpp
@@ -71,8 +71,8 @@ public:
}
void assignData(const TextureData &data) override {
glBindTexture(GL_TEXTURE_2D, _texId);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
applyWrapMode();
// TODO: Check both compiletime and runtime for the existence of EXT_texture_compression_s3tc
More information about the Scummvm-git-logs
mailing list