[Scummvm-git-logs] scummvm master -> 0a42f638b1dda58a686d8e4bd88a87c47c497c2d
mduggan
noreply at scummvm.org
Tue Sep 5 08:31:09 UTC 2023
This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
78762a2a46 TETRAEDGE: Improve deletion order of game sounds
e01f0a1ce9 TETRAEDGE: Clean right side of textures if they are non-power-2 size
0a42f638b1 TETRAEDGE: Disable workaround for texture edges
Commit: 78762a2a46f3d702b062102c3f081eea7f3dde7c
https://github.com/scummvm/scummvm/commit/78762a2a46f3d702b062102c3f081eea7f3dde7c
Author: Matthew Duggan (mgithub at guarana.org)
Date: 2023-09-05T17:01:51+09:00
Commit Message:
TETRAEDGE: Improve deletion order of game sounds
Changed paths:
engines/tetraedge/game/syberia_game.cpp
diff --git a/engines/tetraedge/game/syberia_game.cpp b/engines/tetraedge/game/syberia_game.cpp
index 79bf868853d..3978ff56a98 100644
--- a/engines/tetraedge/game/syberia_game.cpp
+++ b/engines/tetraedge/game/syberia_game.cpp
@@ -713,10 +713,12 @@ void SyberiaGame::leave(bool flag) {
_scene.unloadCharacter(_scene._character->_model->name());
}
- for (auto &sound : _gameSounds) {
+ // Deleting these sounds can cause events which can modify the list.
+ Common::Array<GameSound *> sounds = _gameSounds;
+ _gameSounds.clear();
+ for (auto &sound : sounds) {
delete sound;
}
- _gameSounds.clear();
for (auto &randsoundlist : _randomSounds) {
for (auto *randsound : randsoundlist._value) {
Commit: e01f0a1ce943a88c51b8db0d39ff3a3dfdc8508f
https://github.com/scummvm/scummvm/commit/e01f0a1ce943a88c51b8db0d39ff3a3dfdc8508f
Author: Matthew Duggan (mgithub at guarana.org)
Date: 2023-09-05T17:17:22+09:00
Commit Message:
TETRAEDGE: Clean right side of textures if they are non-power-2 size
Speculative fix for bug #14539.
Changed paths:
engines/tetraedge/te/te_3d_texture_opengl.cpp
diff --git a/engines/tetraedge/te/te_3d_texture_opengl.cpp b/engines/tetraedge/te/te_3d_texture_opengl.cpp
index 890a603e876..65cb594629d 100644
--- a/engines/tetraedge/te/te_3d_texture_opengl.cpp
+++ b/engines/tetraedge/te/te_3d_texture_opengl.cpp
@@ -118,7 +118,7 @@ bool Te3DTextureOpenGL::load(const TeImage &img) {
_format = img.teFormat();
// TODO? set some other fields from the image here.
- // for now just set some good defaults.
+ // For now just set defaults as these never get used in games.
_flipY = true; //img._flipY;
_leftBorder = 0; //img._leftBorder;
_btmBorder = 0; //img._btmBorder;
@@ -162,6 +162,7 @@ bool Te3DTextureOpenGL::load(const TeImage &img) {
}
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, _texWidth, _texHeight, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL);
glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, img.w, img.h, GL_RGBA, GL_UNSIGNED_BYTE, imgdata);
+
// FIXME: Slight hack.. sometimes artifacts appear because we draw
// a (half?)pixel outside the original texture. Clear one more row
// of the new texture with 0s to avoid artifacts.
@@ -171,6 +172,14 @@ bool Te3DTextureOpenGL::load(const TeImage &img) {
glTexSubImage2D(GL_TEXTURE_2D, 0, 0, img.h, img.w, 1, GL_RGBA, GL_UNSIGNED_BYTE, buf);
delete [] buf;
}
+ // And the same for the right-hand-side
+ if ((int)_texWidth > img.w) {
+ byte *buf = new byte[img.h * 4];
+ memset(buf, 0, img.h * 4);
+ glTexSubImage2D(GL_TEXTURE_2D, 0, img.w, 0, 1, img.h, GL_RGBA, GL_UNSIGNED_BYTE, buf);
+ delete [] buf;
+ }
+
if (_alphaOnly)
surf.free();
} else {
Commit: 0a42f638b1dda58a686d8e4bd88a87c47c497c2d
https://github.com/scummvm/scummvm/commit/0a42f638b1dda58a686d8e4bd88a87c47c497c2d
Author: Matthew Duggan (mgithub at guarana.org)
Date: 2023-09-05T17:20:38+09:00
Commit Message:
TETRAEDGE: Disable workaround for texture edges
Speculative fix for non-power-2 textures which might be causing bug #14418.
Changed paths:
engines/tetraedge/te/te_3d_texture.cpp
diff --git a/engines/tetraedge/te/te_3d_texture.cpp b/engines/tetraedge/te/te_3d_texture.cpp
index cedcfbdb6e0..9a2f95d8c3a 100644
--- a/engines/tetraedge/te/te_3d_texture.cpp
+++ b/engines/tetraedge/te/te_3d_texture.cpp
@@ -78,14 +78,12 @@ bool Te3DTexture::load(const Common::FSNode &node) {
/*static*/
TeVector2s32 Te3DTexture::optimisedSize(const TeVector2s32 &size) {
//
- // Note: When we enabled optimized sizes it leaves artifacts around movies
- // etc unless the render size is exactly 800x600.
+ // Note: When we enable optimized sizes it can leave artifacts around
+ // movies etc unless the render size is exactly 800x600.
//
- // This probably means there is a rounding error somewhere else, just leave
- // off for now.
+ // There is a workaround to clear some of the texture data in
+ // Te3DTextureOpenGL::load to fix this.
//
- if (g_engine->getDefaultScreenWidth() != 800)
- return size;
// The maths here is a bit funky but it just picks the nearest power of 2 (up)
int xsize = size._x - 1;
More information about the Scummvm-git-logs
mailing list