[Scummvm-git-logs] scummvm master -> 9f9f71c03d3cd3aa942dbb735cc912c5fdee97fa
sev-
noreply at scummvm.org
Thu Oct 24 13:15:51 UTC 2024
This automated email contains information about 23 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
3ef17b9643 GUI: Fix shadowing of overloaded method
4b7782448c GUI: Fix usage of deprecated ManagedSurface methods
c191ea24fa GRAPHICS: MACGUI: Fix usage of deprecated ManagedSurface methods
1e3c046861 TSAGE: Reduce header dependency
ac0340369c TSAGE: Remove usage of deprecated ManagedSurface methods
19bd29cde7 AGS: Fixed usage of deprecated ManagedSurface methods
05f9fef37d AGS: Get rid of global constructors
c08c2af410 BLADERUNNER: Fix warning about unused variable
96a3dbaef8 CRAB: Fix usage of deprecated ManagedSurface methods
6586015901 CRYO: Fix warning
99fd16664a JANITORIAL: Remove trailing whitespaces
54f145cc60 DGDS: Comment out unused variables and methods
d01189b27c STARTREK: Sort files in module.mk alphabetically
1a1ac058f8 FREESCAPE: Fix warnings on print format
265afcf998 FREESCAPE: Fix usage of deprecated ManagedSurface methods
6f13985f5b M4: RIDDLE: Fix printf format specifiers
8bd8388e35 MTROPOLIS: Fix warnings about unused variables
aae5703d4c SLUDGE: Fix usage of deprecated ManagedSurface methods
af1eca20ff STARK: Rename clashing enum members
2a0ba8954c SWORD1: Silence warning on potential typo
1b11072358 TWINE: Comment out unused class variables
11ae6a973c ULTIMA: Fixed usage of obsolete ManagedSurface methods
9f9f71c03d WATCHMAKER: sprintf() -> snprintf()
Commit: 3ef17b9643a61bbb9518b455963f99cf646f5ea6
https://github.com/scummvm/scummvm/commit/3ef17b9643a61bbb9518b455963f99cf646f5ea6
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2024-10-24T15:07:01+02:00
Commit Message:
GUI: Fix shadowing of overloaded method
Changed paths:
gui/about.cpp
diff --git a/gui/about.cpp b/gui/about.cpp
index d2ad3dfa9dc..73d52dff076 100644
--- a/gui/about.cpp
+++ b/gui/about.cpp
@@ -506,7 +506,7 @@ private:
void computer0();
void computer1();
void init();
- void draw(int sn, int x, int y);
+ void drawEE(int sn, int x, int y);
bool doMenu(Common::KeyState state);
void putshapes();
void game();
@@ -1155,7 +1155,7 @@ void EEWidget::init() {
_inited = true;
}
-void EEWidget::draw(int sn, int x1, int y1) {
+void EEWidget::drawEE(int sn, int x1, int y1) {
int x = x1 * _scale;
int y = y1 * _scale;
@@ -1168,7 +1168,7 @@ void EEWidget::putshapes() {
clear(_colorBlack);
sprite = kSpB1 + (_tbx / 16) % 4;
- draw(sprite, _tbx, _tby);
+ drawEE(sprite, _tbx, _tby);
_obx = _tbx;
_oby = _tby;
@@ -1180,7 +1180,7 @@ void EEWidget::putshapes() {
else
sprite = kSpL2;
}
- draw(sprite, _xx[0], _yy[0]);
+ drawEE(sprite, _xx[0], _yy[0]);
_olx = _xx[0];
_oly = _yy[0];
@@ -1192,7 +1192,7 @@ void EEWidget::putshapes() {
else
sprite = kSpR2;
}
- draw(sprite, _xx[1], _yy[1]);
+ drawEE(sprite, _xx[1], _yy[1]);
_orx = _xx[1];
_ory = _yy[1];
@@ -1220,11 +1220,11 @@ void EEWidget::putshapes() {
for (int i = 0; i < 2; i++) {
int startx = i ? 264 : 32;
- draw(kSpNum0 + _score[i] / 10, startx, 1);
+ drawEE(kSpNum0 + _score[i] / 10, startx, 1);
startx += 8;
- draw(kSpNum0 + _score[i] % 10, startx, 1);
+ drawEE(kSpNum0 + _score[i] % 10, startx, 1);
startx += 8;
- draw(_server == i ? kSpStar : kSpSpace, startx, 1);
+ drawEE(_server == i ? kSpStar : kSpSpace, startx, 1);
}
for (int i = 0; i < 6; i++) {
@@ -1232,7 +1232,7 @@ void EEWidget::putshapes() {
int sy = i == 0 ? 2 : 20;
int code = i == 0 ? kSpCode1 : i - 1 == _opt ? kSpCode1h + i : kSpCode1 + i;
- draw(code, sx, sy + i * 10);
+ drawEE(code, sx, sy + i * 10);
if (_mode != kModeMenu)
break;
Commit: 4b7782448c7f551ead944be9a296a33505b26bee
https://github.com/scummvm/scummvm/commit/4b7782448c7f551ead944be9a296a33505b26bee
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2024-10-24T15:07:01+02:00
Commit Message:
GUI: Fix usage of deprecated ManagedSurface methods
Changed paths:
gui/widgets/grid.cpp
diff --git a/gui/widgets/grid.cpp b/gui/widgets/grid.cpp
index 5da87c5b6e9..b3d20b6119e 100644
--- a/gui/widgets/grid.cpp
+++ b/gui/widgets/grid.cpp
@@ -714,7 +714,7 @@ void GridWidget::reloadThumbnails() {
surf = loadSurfaceFromFile(path);
} else {
const Graphics::ManagedSurface *scSurf = _loadedSurfaces[path];
- _loadedSurfaces[entry->thumbPath] = new Graphics::ManagedSurface(*scSurf);
+ _loadedSurfaces[entry->thumbPath] = scSurf;
}
}
@@ -723,7 +723,7 @@ void GridWidget::reloadThumbnails() {
_loadedSurfaces[entry->thumbPath] = scSurf;
if (path != entry->thumbPath) {
- _loadedSurfaces[path] = new Graphics::ManagedSurface(*scSurf);
+ _loadedSurfaces[path] = scSurf;
}
if (surf != scSurf) {
Commit: c191ea24fa611df052ec883275aa5c3408e1475d
https://github.com/scummvm/scummvm/commit/c191ea24fa611df052ec883275aa5c3408e1475d
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2024-10-24T15:07:01+02:00
Commit Message:
GRAPHICS: MACGUI: Fix usage of deprecated ManagedSurface methods
Changed paths:
graphics/macgui/macmenu.cpp
diff --git a/graphics/macgui/macmenu.cpp b/graphics/macgui/macmenu.cpp
index b9281ce655e..7263589017b 100644
--- a/graphics/macgui/macmenu.cpp
+++ b/graphics/macgui/macmenu.cpp
@@ -1249,7 +1249,7 @@ void MacMenu::renderSubmenu(MacMenuSubMenu *menu, bool recursive) {
if (r->top + h >= _screen.h)
h = _screen.h - 1 - r->top;
- Graphics::ManagedSurface g = *_wm->_screenCopy;
+ Graphics::ManagedSurface g(*_wm->_screenCopy, _wm->_screenCopy->getBounds());
g.transBlitFrom(_screen, _wm->_colorGreen);
g_system->copyRectToScreen(g.getBasePtr(r->left, r->top), g.pitch, r->left, r->top, w, h);
}
Commit: 1e3c04686153e7f3bd7f10547ba3c3232980141b
https://github.com/scummvm/scummvm/commit/1e3c04686153e7f3bd7f10547ba3c3232980141b
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2024-10-24T15:07:01+02:00
Commit Message:
TSAGE: Reduce header dependency
Changed paths:
engines/tsage/tsage.h
diff --git a/engines/tsage/tsage.h b/engines/tsage/tsage.h
index c02cfaf3211..6e4d811ee54 100644
--- a/engines/tsage/tsage.h
+++ b/engines/tsage/tsage.h
@@ -25,11 +25,9 @@
#include "engines/engine.h"
#include "gui/debugger.h"
-#include "tsage/core.h"
#include "tsage/resources.h"
#include "tsage/debugger.h"
#include "tsage/events.h"
-#include "tsage/graphics.h"
#include "tsage/resources.h"
#include "tsage/detection.h"
Commit: ac0340369c4fdd707b8040944ed10393f701a3c9
https://github.com/scummvm/scummvm/commit/ac0340369c4fdd707b8040944ed10393f701a3c9
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2024-10-24T15:07:01+02:00
Commit Message:
TSAGE: Remove usage of deprecated ManagedSurface methods
Changed paths:
engines/tsage/graphics.h
engines/tsage/scenes.cpp
diff --git a/engines/tsage/graphics.h b/engines/tsage/graphics.h
index e29858099ae..2211bbbc7a1 100644
--- a/engines/tsage/graphics.h
+++ b/engines/tsage/graphics.h
@@ -278,7 +278,7 @@ public:
void getStringBounds(const char *s, Rect &bounds, int maxWidth);
void setDialogPalette();
- Graphics::ManagedSurface lockSurface() {
+ Graphics::ManagedSurface &lockSurface() {
_surface.setBounds(_bounds);
return _surface.lockSurface();
}
diff --git a/engines/tsage/scenes.cpp b/engines/tsage/scenes.cpp
index d8c2e334374..e9151cddd79 100644
--- a/engines/tsage/scenes.cpp
+++ b/engines/tsage/scenes.cpp
@@ -463,7 +463,8 @@ void Scene::refreshBackground(int xAmount, int yAmount) {
// Check if the section is already loaded
if ((_enabledSections[xp * 16 + yp] == 0xffff) || ((xAmount == 0) && (yAmount == 0))) {
// Chunk isn't loaded, so load it in
- Graphics::ManagedSurface s = _backSurface.lockSurface();
+ Graphics::ManagedSurface s;
+ s.copyFrom(_backSurface.lockSurface());
GfxSurface::loadScreenSection(s, xp - xHalfOffset, yp - yHalfOffset, xp, yp);
_backSurface.unlockSurface();
changedFlag = true;
Commit: 19bd29cde791dc96c6c52e5cfb64b74b0b88839b
https://github.com/scummvm/scummvm/commit/19bd29cde791dc96c6c52e5cfb64b74b0b88839b
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2024-10-24T15:07:01+02:00
Commit Message:
AGS: Fixed usage of deprecated ManagedSurface methods
Changed paths:
engines/ags/shared/gfx/image.cpp
diff --git a/engines/ags/shared/gfx/image.cpp b/engines/ags/shared/gfx/image.cpp
index 69f703f92c1..b8f41c01a49 100644
--- a/engines/ags/shared/gfx/image.cpp
+++ b/engines/ags/shared/gfx/image.cpp
@@ -144,7 +144,7 @@ int save_bitmap(Common::WriteStream &out, BITMAP *bmp, const RGB *pal) {
Graphics::ManagedSurface &src = bmp->getSurface();
if (bmp->format.bytesPerPixel == 1) {
- Graphics::ManagedSurface temp = src;
+ Graphics::ManagedSurface temp(src, src.getBounds());
if (pal) {
byte palette[256 * 3];
for (int c = 0, i = 0; c < 256; ++c, i += 3) {
@@ -159,7 +159,7 @@ int save_bitmap(Common::WriteStream &out, BITMAP *bmp, const RGB *pal) {
Common::Point(0, 0));
} else {
// Copy from the source surface without alpha transparency
- Graphics::ManagedSurface temp = src;
+ Graphics::ManagedSurface temp(src, src.getBounds());
temp.format.aLoss = 8;
surface.rawBlitFrom(temp, Common::Rect(0, 0, src.w, src.h),
Commit: 05f9fef37daf5dc63b01f935fa9c3acd602d4ab2
https://github.com/scummvm/scummvm/commit/05f9fef37daf5dc63b01f935fa9c3acd602d4ab2
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2024-10-24T15:07:01+02:00
Commit Message:
AGS: Get rid of global constructors
Changed paths:
engines/ags/plugins/ags_controller/ags_controller.cpp
engines/ags/plugins/ags_controller/ags_controller.h
diff --git a/engines/ags/plugins/ags_controller/ags_controller.cpp b/engines/ags/plugins/ags_controller/ags_controller.cpp
index 9e03f17327c..2109607d2a7 100644
--- a/engines/ags/plugins/ags_controller/ags_controller.cpp
+++ b/engines/ags/plugins/ags_controller/ags_controller.cpp
@@ -44,8 +44,27 @@ public:
}
};
-Controller ctrlInterface;
-ConReader ctrlReader;
+Controller *ctrlInterface = nullptr;
+ConReader *ctrlReader = nullptr;
+
+Controller *getController() {
+ if (!ctrlInterface)
+ ctrlInterface = new Controller;
+
+ return ctrlInterface;
+}
+
+ConReader *getConReader() {
+ if (!ctrlReader)
+ ctrlReader = new ConReader;
+
+ return ctrlReader;
+}
+
+AGSController::~AGSController() {
+ delete ctrlInterface;
+ delete ctrlReader;
+}
const char *AGSController::AGS_GetPluginName() {
return "AGSController";
@@ -69,7 +88,7 @@ void AGSController::AGS_EngineStartup(IAGSEngine *engine) {
SCRIPT_METHOD(ClickMouse, AGSController::ClickMouse);
_engine->RequestEventHook(AGSE_PREGUIDRAW);
- _engine->AddManagedObjectReader("Controller", &ctrlReader);
+ _engine->AddManagedObjectReader("Controller", getConReader());
}
int64 AGSController::AGS_EngineOnEvent(int event, NumberPtr data) {
@@ -104,7 +123,7 @@ void AGSController::ControllerCount(ScriptMethodParams ¶ms) {
void AGSController::Controller_Open(ScriptMethodParams ¶ms) {
Controller *newCtrl = new Controller();
- _engine->RegisterManagedObject(newCtrl, &ctrlInterface);
+ _engine->RegisterManagedObject(newCtrl, getController());
params._result = newCtrl;
}
diff --git a/engines/ags/plugins/ags_controller/ags_controller.h b/engines/ags/plugins/ags_controller/ags_controller.h
index 689ff8c8889..395f8ce35d0 100644
--- a/engines/ags/plugins/ags_controller/ags_controller.h
+++ b/engines/ags/plugins/ags_controller/ags_controller.h
@@ -53,7 +53,7 @@ protected:
void ClickMouse(ScriptMethodParams ¶ms);
public:
AGSController() : PluginBase() {}
- virtual ~AGSController() {}
+ virtual ~AGSController();
const char *AGS_GetPluginName() override;
void AGS_EngineStartup(IAGSEngine *engine) override;
Commit: c08c2af410956665d523e5b2e88ece98d7931fc3
https://github.com/scummvm/scummvm/commit/c08c2af410956665d523e5b2e88ece98d7931fc3
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2024-10-24T15:07:01+02:00
Commit Message:
BLADERUNNER: Fix warning about unused variable
Changed paths:
engines/bladerunner/debugger.cpp
diff --git a/engines/bladerunner/debugger.cpp b/engines/bladerunner/debugger.cpp
index 426bdda0d2c..d6b535e8b79 100644
--- a/engines/bladerunner/debugger.cpp
+++ b/engines/bladerunner/debugger.cpp
@@ -264,6 +264,8 @@ bool Debugger::cmdAnimation(int argc, const char **argv) {
int animationNext = -1;
actor->queryAnimationState(&animationState, &animationFrame, &animationStateNext, &animationNext);
+ (void)animationsList;
+
debugPrintf("actorAnimationMode(%s) = %i, model: %i, goal: %i, state:%i, frame:%i, stateNext: %i, nextModelId: %i, showDamageWhenMoving = %i, inCombat = %i\n",
_vm->_textActorNames->getText(actorId),
actor->getAnimationMode(),
Commit: 96a3dbaef8de71e9dbd613d86214cfbeffc44a50
https://github.com/scummvm/scummvm/commit/96a3dbaef8de71e9dbd613d86214cfbeffc44a50
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2024-10-24T15:07:01+02:00
Commit Message:
CRAB: Fix usage of deprecated ManagedSurface methods
Changed paths:
engines/crab/image/Image.cpp
diff --git a/engines/crab/image/Image.cpp b/engines/crab/image/Image.cpp
index 9aa515d2f49..562b7f5dbeb 100644
--- a/engines/crab/image/Image.cpp
+++ b/engines/crab/image/Image.cpp
@@ -59,7 +59,7 @@ bool Image::load(Graphics::Surface *surface) {
bool Image::load(Graphics::ManagedSurface *surface) {
deleteImage();
- _texture = new Graphics::ManagedSurface(*surface);
+ _texture->copyFrom(*surface);
_w = surface->w;
_h = surface->h;
Commit: 6586015901c20c9d71f9862f419989a0bafe2890
https://github.com/scummvm/scummvm/commit/6586015901c20c9d71f9862f419989a0bafe2890
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2024-10-24T15:07:02+02:00
Commit Message:
CRYO: Fix warning
Changed paths:
engines/cryo/eden_graphics.cpp
diff --git a/engines/cryo/eden_graphics.cpp b/engines/cryo/eden_graphics.cpp
index 6aee4e6265a..c088734f1dc 100644
--- a/engines/cryo/eden_graphics.cpp
+++ b/engines/cryo/eden_graphics.cpp
@@ -1027,7 +1027,7 @@ void EdenGraphics::clearScreen() {
CLBlitter_UpdateScreen();
}
-void EdenGraphics::colimacon(const int16 pattern[16]) {
+void EdenGraphics::colimacon(const int16 pattern[]) {
int16 p, r27, r25;
int16 ww = _game->_vm->_screenView->_pitch;
Commit: 99fd16664af3f8a0f922990c057bb91770eef6ba
https://github.com/scummvm/scummvm/commit/99fd16664af3f8a0f922990c057bb91770eef6ba
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2024-10-24T15:07:02+02:00
Commit Message:
JANITORIAL: Remove trailing whitespaces
Changed paths:
engines/cryo/eden_graphics.cpp
diff --git a/engines/cryo/eden_graphics.cpp b/engines/cryo/eden_graphics.cpp
index c088734f1dc..abf6468d621 100644
--- a/engines/cryo/eden_graphics.cpp
+++ b/engines/cryo/eden_graphics.cpp
@@ -46,7 +46,7 @@ EdenGraphics::EdenGraphics(EdenGame *game) : _game(game) {
_underBarsView = nullptr;
_needToFade = false;
_eff2pat = 0;
-
+
_savedUnderSubtitles = false;
_underSubtitlesViewBuf = nullptr;
_hnmViewBuf = nullptr;
@@ -56,7 +56,7 @@ EdenGraphics::EdenGraphics(EdenGame *game) : _game(game) {
for (int i = 0; i < 256; ++i) {
_globalPalette[i].a = _globalPalette[i].r = _globalPalette[i].g = _globalPalette[i].b = 0;
_oldPalette[i].a = _oldPalette[i].r = _oldPalette[i].g = _oldPalette[i].b = 0;
- _newPalette[i].a = _newPalette[i].r = _newPalette[i].g = _newPalette[i].b = 0;
+ _newPalette[i].a = _newPalette[i].r = _newPalette[i].g = _newPalette[i].b = 0;
}
_newColor.r = _newColor.g = _newColor.b = 0;
Commit: 54f145cc603a9b86680eac67cf10e2e0d156100f
https://github.com/scummvm/scummvm/commit/54f145cc603a9b86680eac67cf10e2e0d156100f
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2024-10-24T15:07:02+02:00
Commit Message:
DGDS: Comment out unused variables and methods
Changed paths:
engines/dgds/sound/midiparser_sci.cpp
engines/dgds/sound/music.cpp
diff --git a/engines/dgds/sound/midiparser_sci.cpp b/engines/dgds/sound/midiparser_sci.cpp
index 523e4791080..a422ea501ec 100644
--- a/engines/dgds/sound/midiparser_sci.cpp
+++ b/engines/dgds/sound/midiparser_sci.cpp
@@ -235,6 +235,7 @@ void MidiParser_SCI::midiMixChannels() {
*outData++ = 0x00;
}
+#if 0
static inline bool validateNextRead(const SciSpan<const byte> &channelData, const SciSpan<const byte>::size_type size = 1) {
if (channelData.size() < size) {
warning("Unexpected end of %s. Music may sound wrong due to game resource corruption", channelData.name().c_str());
@@ -242,7 +243,7 @@ static inline bool validateNextRead(const SciSpan<const byte> &channelData, cons
}
return true;
}
-
+#endif
void MidiParser_SCI::resetStateTracking() {
for (int i = 0; i < 16; ++i) {
diff --git a/engines/dgds/sound/music.cpp b/engines/dgds/sound/music.cpp
index 48caf0b76e0..27f63d33048 100644
--- a/engines/dgds/sound/music.cpp
+++ b/engines/dgds/sound/music.cpp
@@ -510,14 +510,14 @@ void SciMusic::soundPlay(MusicEntry *pSnd, bool restoring) {
uint playListCount = _playList.size();
uint playListNo = playListCount;
- MusicEntry *alreadyPlaying = nullptr;
+ //MusicEntry *alreadyPlaying = nullptr;
// searching if sound is already in _playList
for (uint i = 0; i < playListCount; i++) {
if (_playList[i] == pSnd)
playListNo = i;
- if ((_playList[i]->status == kSoundPlaying) && (_playList[i]->pMidiParser))
- alreadyPlaying = _playList[i];
+ //if ((_playList[i]->status == kSoundPlaying) && (_playList[i]->pMidiParser))
+ // alreadyPlaying = _playList[i];
}
if (playListNo == playListCount) { // not found
_playList.push_back(pSnd);
Commit: d01189b27c7b88fb7e6824ff37cb50ee9e7fd796
https://github.com/scummvm/scummvm/commit/d01189b27c7b88fb7e6824ff37cb50ee9e7fd796
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2024-10-24T15:07:02+02:00
Commit Message:
STARTREK: Sort files in module.mk alphabetically
Changed paths:
engines/startrek/module.mk
diff --git a/engines/startrek/module.mk b/engines/startrek/module.mk
index 7b5b497188e..a92cdfa1fb4 100644
--- a/engines/startrek/module.mk
+++ b/engines/startrek/module.mk
@@ -31,10 +31,14 @@ MODULE_OBJS = \
rooms/demon4.o \
rooms/demon5.o \
rooms/demon6.o \
- rooms/tug0.o \
- rooms/tug1.o \
- rooms/tug2.o \
- rooms/tug3.o \
+ rooms/feather0.o \
+ rooms/feather1.o \
+ rooms/feather2.o \
+ rooms/feather3.o \
+ rooms/feather4.o \
+ rooms/feather5.o \
+ rooms/feather6.o \
+ rooms/feather7.o \
rooms/love0.o \
rooms/love1.o \
rooms/love2.o \
@@ -49,20 +53,16 @@ MODULE_OBJS = \
rooms/mudd4.o \
rooms/mudd5.o \
rooms/mudda.o \
- rooms/feather0.o \
- rooms/feather1.o \
- rooms/feather2.o \
- rooms/feather3.o \
- rooms/feather4.o \
- rooms/feather5.o \
- rooms/feather6.o \
- rooms/feather7.o \
rooms/trial0.o \
rooms/trial1.o \
rooms/trial2.o \
rooms/trial3.o \
rooms/trial4.o \
rooms/trial5.o \
+ rooms/tug0.o \
+ rooms/tug1.o \
+ rooms/tug2.o \
+ rooms/tug3.o \
rooms/sins0.o \
rooms/sins1.o \
rooms/sins2.o \
Commit: 1a1ac058f80281d4455366b4107791cdfbbd1e43
https://github.com/scummvm/scummvm/commit/1a1ac058f80281d4455366b4107791cdfbbd1e43
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2024-10-24T15:07:02+02:00
Commit Message:
FREESCAPE: Fix warnings on print format
Since we know that the files in the engine are tiny, we better clip
it to int32 rather than use barely portable format options
Changed paths:
engines/freescape/games/castle/dos.cpp
diff --git a/engines/freescape/games/castle/dos.cpp b/engines/freescape/games/castle/dos.cpp
index 6e5cc75057e..d333dd8832a 100644
--- a/engines/freescape/games/castle/dos.cpp
+++ b/engines/freescape/games/castle/dos.cpp
@@ -138,7 +138,7 @@ Graphics::ManagedSurface *CastleEngine::loadFrameWithHeaderDOS(Common::SeekableR
frame->convertToInPlace(_gfx->_texturePixelFormat, (byte *)&kEGADefaultPalette, 16);
debug("header: %x %x, height: %d, mask: %x, widthBytes: %d, size: %d", header1, header2, height, mask, widthBytes, size);
- debug("pos: %lx", file->pos());
+ debug("pos: %x", (int32)file->pos());
return frame;
}
@@ -160,13 +160,13 @@ void CastleEngine::loadAssetsDOSFullGame() {
_background = loadFrameFromPlanes(stream, 504, 18);
_background->convertToInPlace(_gfx->_texturePixelFormat, (byte *)&kEGADefaultPalette, 16);
- debug("%lx", stream->pos());
+ debug("%x", (int32)stream->pos());
// Eye widget is next to 0x1f058
stream->seek(0x1f4e3);
for (int i = 0; i < 6; i++)
debug("i: %d -> %x", i, stream->readByte());
- debug("%lx", stream->pos());
+ debug("%x", (int32)stream->pos());
debug("extra: %x", stream->readByte());
for (int i = 0; i < 10; i++) {
@@ -334,7 +334,7 @@ void CastleEngine::loadAssetsDOSDemo() {
stream->seek(0x1f4e3 - 0x2a0);
for (int i = 0; i < 6; i++)
debug("i: %d -> %x", i, stream->readByte());
- debug("%lx", stream->pos());
+ debug("%x", (int32)stream->pos());
debug("extra: %x", stream->readByte());
for (int i = 0; i < 9; i++) {
Commit: 265afcf998b42214b9c62a5f01e7271439a598cf
https://github.com/scummvm/scummvm/commit/265afcf998b42214b9c62a5f01e7271439a598cf
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2024-10-24T15:07:02+02:00
Commit Message:
FREESCAPE: Fix usage of deprecated ManagedSurface methods
Changed paths:
engines/freescape/games/castle/zx.cpp
diff --git a/engines/freescape/games/castle/zx.cpp b/engines/freescape/games/castle/zx.cpp
index 7a265d63ea5..6ebc2cdd6f6 100644
--- a/engines/freescape/games/castle/zx.cpp
+++ b/engines/freescape/games/castle/zx.cpp
@@ -196,13 +196,27 @@ void CastleEngine::loadAssetsZXFullGame() {
_thunderFrame->fillRect(Common::Rect(0, 0, thunderWidth * 8, thunderHeight), 0);
_thunderFrame = loadFrame(&file, _thunderFrame, thunderWidth, thunderHeight, front);
- _riddleTopFrame = new Graphics::ManagedSurface(loadBundledImage("castle_riddle_top_frame"));
+ Graphics::Surface *tmp;
+
+ tmp = loadBundledImage("castle_riddle_top_frame");
+ _riddleTopFrame = new Graphics::ManagedSurface;
+ _riddleTopFrame->copyFrom(*tmp);
+ tmp->free();
+ delete tmp;
_riddleTopFrame->convertToInPlace(_gfx->_texturePixelFormat);
- _riddleBackgroundFrame = new Graphics::ManagedSurface(loadBundledImage("castle_riddle_background_frame"));
+ tmp = loadBundledImage("castle_riddle_background_frame");
+ _riddleBackgroundFrame = new Graphics::ManagedSurface();
+ _riddleBackgroundFrame->copyFrom(*tmp);
+ tmp->free();
+ delete tmp;
_riddleBackgroundFrame->convertToInPlace(_gfx->_texturePixelFormat);
- _riddleBottomFrame = new Graphics::ManagedSurface(loadBundledImage("castle_riddle_bottom_frame"));
+ tmp = loadBundledImage("castle_riddle_bottom_frame");
+ _riddleBottomFrame = new Graphics::ManagedSurface();
+ _riddleBackgroundFrame->copyFrom(*tmp);
+ tmp->free();
+ delete tmp;
_riddleBottomFrame->convertToInPlace(_gfx->_texturePixelFormat);
for (auto &it : _areaMap) {
Commit: 6f13985f5bada89d3a00ae9ec1ed6f2a2c11542b
https://github.com/scummvm/scummvm/commit/6f13985f5bada89d3a00ae9ec1ed6f2a2c11542b
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2024-10-24T15:07:02+02:00
Commit Message:
M4: RIDDLE: Fix printf format specifiers
While the assembly might show it as %ld, on 32-bit systems that is %d
Changed paths:
engines/m4/riddle/rooms/section8/section8_room.cpp
diff --git a/engines/m4/riddle/rooms/section8/section8_room.cpp b/engines/m4/riddle/rooms/section8/section8_room.cpp
index 49d9f85db0c..d0b048281d1 100644
--- a/engines/m4/riddle/rooms/section8/section8_room.cpp
+++ b/engines/m4/riddle/rooms/section8/section8_room.cpp
@@ -80,11 +80,11 @@ void Section8Room::moveScreen(int32 dx, int32 dy) {
void Section8Room::getSeriesName(int32 val1, bool true_or_False) {
if (subCE498(val1) < 0)
- _currentSeriesName = Common::String::format("%ldsldf%ld", _currentRoom, val1);
+ _currentSeriesName = Common::String::format("%dsldf%d", _currentRoom, val1);
else if (true_or_False)
- _currentSeriesName = Common::String::format("%ldsldr%ld", _currentRoom, val1);
+ _currentSeriesName = Common::String::format("%dsldr%d", _currentRoom, val1);
else
- _currentSeriesName = Common::String::format("%ldslds%ld", _currentRoom, val1);
+ _currentSeriesName = Common::String::format("%dslds%d", _currentRoom, val1);
}
int32 Section8Room::daemonSub1(int32 dx, bool ascendingFl) {
@@ -364,14 +364,14 @@ void Section8Room::parser() {
switch (_currentRoom) {
case 804:
case 814:
- _currentSeriesName = Common::String::format("%ldr%02ld", _currentRoom, _G(player).noun[0] - 0x2B);
+ _currentSeriesName = Common::String::format("%dr%02d", _currentRoom, _G(player).noun[0] - 0x2B);
break;
case 824:
case 834:
- _currentSeriesName = Common::String::format("%ldr%02ld", _currentRoom, _G(player).noun[0] - 0x2F);
+ _currentSeriesName = Common::String::format("%dr%02d", _currentRoom, _G(player).noun[0] - 0x2F);
break;
case 844:
- _currentSeriesName = Common::String::format("%ldr%02ld", _currentRoom, _G(player).noun[0] - 0x2E);
+ _currentSeriesName = Common::String::format("%dr%02d", _currentRoom, _G(player).noun[0] - 0x2E);
break;
default:
break;
Commit: 8bd8388e35915f0bbddeaad66e5616ffc5bb754a
https://github.com/scummvm/scummvm/commit/8bd8388e35915f0bbddeaad66e5616ffc5bb754a
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2024-10-24T15:07:02+02:00
Commit Message:
MTROPOLIS: Fix warnings about unused variables
Instead of commenting it out, I put it on a deep debug level since
they're obviously useful for debugging
Changed paths:
engines/mtropolis/boot.cpp
engines/mtropolis/runtime.cpp
diff --git a/engines/mtropolis/boot.cpp b/engines/mtropolis/boot.cpp
index 262f4463f65..41fd3e959da 100644
--- a/engines/mtropolis/boot.cpp
+++ b/engines/mtropolis/boot.cpp
@@ -254,6 +254,8 @@ static void loadCursorsMac(Common::Archive &archive, const Common::Path &path, C
numCursorsLoaded++;
}
}
+
+ debug(9, "Loaded %d Mac cursors", numCursorsLoaded);
}
static bool loadCursorsWin(Common::Archive &archive, const Common::Path &path, CursorGraphicCollection &cursorGraphics) {
@@ -286,6 +288,8 @@ static bool loadCursorsWin(Common::Archive &archive, const Common::Path &path, C
numCursorGroupsLoaded++;
}
+ debug(9, "Loaded %d Win cursors", numCursorGroupsLoaded);
+
return true;
}
@@ -2640,7 +2644,7 @@ void findWindowsMainSegment(Common::Archive &fs, const BootScriptContext &bootSc
filteredFiles.push_back(mainSegmentFile);
bool hasRecognizedSuffix = false;
-
+
for (const char *suffix : mainSegmentSuffixes) {
if (pathStr.hasSuffixIgnoreCase(suffix)) {
hasRecognizedSuffix = true;
@@ -3230,7 +3234,7 @@ BootConfiguration bootProject(const MTropolisGameDescription &gameDesc) {
vfs->listMatchingMembers(pluginFiles, pluginsLocation.appendComponent("*"));
-
+
debug(4, "Looking for plug-in files in %s", pluginsLocation.toString(vfs->getPathSeparator()).c_str());
for (const Common::ArchiveMemberPtr &pluginFile : pluginFiles) {
Common::String fileName = pluginFile->getFileName();
diff --git a/engines/mtropolis/runtime.cpp b/engines/mtropolis/runtime.cpp
index 934068f5b30..f17388d4eb8 100644
--- a/engines/mtropolis/runtime.cpp
+++ b/engines/mtropolis/runtime.cpp
@@ -3886,7 +3886,7 @@ CORO_BEGIN_DEFINITION(Structural::StructuralConsumeCommandCoroutine)
#endif
CORO_ERROR;
CORO_END_IF
-
+
locals->miniscriptThread.reset(new MiniscriptThread(params->runtime, params->msg, nullptr, nullptr, nullptr));
CORO_IF(!params->self->readAttribute(locals->miniscriptThread.get(), locals->attribGetResult, *locals->attribName))
@@ -3918,7 +3918,7 @@ CORO_BEGIN_DEFINITION(Structural::StructuralConsumeCommandCoroutine)
if (!locals->quietlyDiscard)
warning("Command type %i was ignored", params->msg->getEvent().eventType);
CORO_END_FUNCTION
-
+
CORO_END_DEFINITION
VThreadState Structural::asyncConsumeCommand(Runtime *runtime, const Common::SharedPtr<MessageProperties> &msg) {
@@ -7899,7 +7899,7 @@ void Project::loadSceneFromStream(const Common::SharedPtr<Structural> &scene, ui
loaderStack.contexts.push_back(loaderContext);
}
- size_t numObjectsLoaded = 0;
+ int numObjectsLoaded = 0;
while (stream.pos() != streamDesc.size) {
Common::SharedPtr<Data::DataObject> dataObject;
Data::loadDataObject(plugInDataLoaderRegistry, reader, dataObject);
@@ -7924,6 +7924,7 @@ void Project::loadSceneFromStream(const Common::SharedPtr<Structural> &scene, ui
numObjectsLoaded++;
}
+ debug(9, "Loaded %d scene objects", numObjectsLoaded);
if ((loaderStack.contexts.size() == 1 && loaderStack.contexts[0].type != ChildLoaderContext::kTypeFilteredElements) || loaderStack.contexts.size() > 1) {
error("Scene stream loader finished in an expected state, something didn't finish loading");
@@ -8195,7 +8196,7 @@ void Project::loadBootStream(size_t streamIndex, const Hacks &hacks) {
const Data::PlugInModifierRegistry &plugInDataLoaderRegistry = _plugInRegistry.getDataLoaderRegistry();
- size_t numObjectsLoaded = 0;
+ int numObjectsLoaded = 0;
while (stream.pos() != streamDesc.size) {
Common::SharedPtr<Data::DataObject> dataObject;
Data::loadDataObject(plugInDataLoaderRegistry, reader, dataObject);
@@ -8261,6 +8262,8 @@ void Project::loadBootStream(size_t streamIndex, const Hacks &hacks) {
numObjectsLoaded++;
}
+ debug(9, "Loaded %d boot objects", numObjectsLoaded);
+
if (loaderStack.contexts.size() != 1 || loaderStack.contexts[0].type != ChildLoaderContext::kTypeProject) {
error("Boot stream loader finished in an expected state, something didn't finish loading");
}
@@ -9043,7 +9046,7 @@ CORO_BEGIN_DEFINITION(VisualElement::VisualElementConsumeCommandCoroutine)
Common::SharedPtr<MessageDispatch> dispatch(new MessageDispatch(msgProps, params->self, false, true, false));
CORO_CALL(Runtime::SendMessageOnVThreadCoroutine, params->runtime, dispatch);
-
+
CORO_RETURN;
CORO_ELSE_IF(Event(EventIDs::kElementHide, 0).respondsTo(params->msg->getEvent()))
if (params->self->_visible) {
Commit: aae5703d4c446cfac9cf90627c4e56ac0a5925a7
https://github.com/scummvm/scummvm/commit/aae5703d4c446cfac9cf90627c4e56ac0a5925a7
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2024-10-24T15:07:02+02:00
Commit Message:
SLUDGE: Fix usage of deprecated ManagedSurface methods
Changed paths:
engines/sludge/backdrop.cpp
engines/sludge/sprites.cpp
engines/sludge/transition.cpp
diff --git a/engines/sludge/backdrop.cpp b/engines/sludge/backdrop.cpp
index 4bf665476ad..02f0749ebd4 100644
--- a/engines/sludge/backdrop.cpp
+++ b/engines/sludge/backdrop.cpp
@@ -113,7 +113,8 @@ void GraphicsManager::drawParallax() {
debugC(1, kSludgeDebugGraphics, "drawParallax(): camX: %d camY: %d dims: %d x %d sceneDims: %d x %d winDims: %d x %d surf: %d x %d", p->cameraX, p->cameraY, w, h, _sceneWidth, _sceneHeight, _winWidth, _winHeight, p->surface.w, p->surface.h);
- Graphics::ManagedSurface tmp(&(p->surface), DisposeAfterUse::NO);
+ Graphics::ManagedSurface tmp;
+ tmp.copyFrom(p->surface);
for (uint y = 0; y < _sceneHeight; y += p->surface.h) {
for (uint x = 0; x < _sceneWidth; x += p->surface.w) {
@@ -323,7 +324,8 @@ void GraphicsManager::drawHorizontalLine(uint x1, uint y, uint x2) {
}
void GraphicsManager::darkScreen() {
- Graphics::ManagedSurface tmp(&_backdropSurface, DisposeAfterUse::NO);
+ Graphics::ManagedSurface tmp;
+ tmp.copyFrom(_backdropSurface);
tmp.blendBlitTo(_backdropSurface, 0, 0, Graphics::FLIP_NONE, nullptr, MS_ARGB(255 >> 1, 0, 0, 0));
// reset zBuffer
@@ -339,7 +341,8 @@ void GraphicsManager::drawBackDrop() {
if (!_backdropExists)
return;
// draw backdrop
- Graphics::ManagedSurface tmp(&_backdropSurface, DisposeAfterUse::NO);
+ Graphics::ManagedSurface tmp;
+ tmp.copyFrom(_backdropSurface);
tmp.blendBlitTo(_renderSurface, -_cameraX, -_cameraY);
}
@@ -435,7 +438,8 @@ bool GraphicsManager::loadHSI(int num, Common::SeekableReadStream *stream, int x
_backdropSurface.fillRect(Common::Rect(x, y, x + tmp.w, y + tmp.h), _renderSurface.format.ARGBToColor(0, 0, 0, 0));
// copy surface loaded to backdrop
- Graphics::ManagedSurface tmp_trans(&tmp, DisposeAfterUse::NO);
+ Graphics::ManagedSurface tmp_trans;
+ tmp_trans.copyFrom(tmp);
tmp_trans.blendBlitTo(_backdropSurface, x, y);
tmp.free();
@@ -461,7 +465,8 @@ bool GraphicsManager::mixHSI(int num, Common::SeekableReadStream *stream, int x,
if (x < 0 || x + realPicWidth > _sceneWidth || y < 0 || y + realPicHeight > _sceneHeight)
return false;
- Graphics::ManagedSurface tmp(&mixSurface, DisposeAfterUse::NO);
+ Graphics::ManagedSurface tmp;
+ tmp.copyFrom(mixSurface);
tmp.blendBlitTo(_backdropSurface, x, y, Graphics::FLIP_NONE, nullptr, MS_ARGB(255 >> 1, 255, 255, 255));
mixSurface.free();
diff --git a/engines/sludge/sprites.cpp b/engines/sludge/sprites.cpp
index 79d112fcbda..0d72ff90e48 100644
--- a/engines/sludge/sprites.cpp
+++ b/engines/sludge/sprites.cpp
@@ -280,7 +280,8 @@ void GraphicsManager::pasteSpriteToBackDrop(int x1, int y1, Sprite &single, cons
x1 -= single.xhot;
y1 -= single.yhot;
- Graphics::ManagedSurface tmp(&single.surface, DisposeAfterUse::NO);
+ Graphics::ManagedSurface tmp;
+ tmp.copyFrom(single.surface);
tmp.blendBlitTo(_backdropSurface, x1, y1, Graphics::FLIP_NONE, nullptr, MS_RGB(fontPal.originalRed, fontPal.originalGreen, fontPal.originalBlue));
}
@@ -303,7 +304,8 @@ void GraphicsManager::burnSpriteToBackDrop(int x1, int y1, Sprite &single, const
x1 -= single.xhot;
y1 -= single.yhot - 1;
- Graphics::ManagedSurface tmp(&single.burnSurface, DisposeAfterUse::NO);
+ Graphics::ManagedSurface tmp;
+ tmp.copyFrom(single.burnSurface);
tmp.blendBlitTo(_backdropSurface, x1, y1, Graphics::FLIP_NONE, nullptr,
MS_RGB(_currentBurnR, _currentBurnG, _currentBurnB));
}
@@ -318,11 +320,13 @@ void GraphicsManager::fontSprite(bool flip, int x, int y, Sprite &single, const
float y1 = (float)y - (float)single.yhot / _cameraZoom;
// Use Managed surface to scale and blit
- Graphics::ManagedSurface tmp(&single.surface, DisposeAfterUse::NO);
+ Graphics::ManagedSurface tmp;
+ tmp.copyFrom(single.surface);
tmp.blendBlitTo(_renderSurface, x1, y1, (flip ? Graphics::FLIP_H : Graphics::FLIP_NONE), 0, MS_RGB(fontPal.originalRed, fontPal.originalGreen, fontPal.originalBlue));
if (single.burnSurface.getPixels() != nullptr) {
- Graphics::ManagedSurface tmp2(&single.burnSurface, DisposeAfterUse::NO);
+ Graphics::ManagedSurface tmp2;
+ tmp2.copyFrom(single.burnSurface);
tmp2.blendBlitTo(_renderSurface, x1, y1, (flip ? Graphics::FLIP_H : Graphics::FLIP_NONE), 0, MS_RGB(fontPal.originalRed, fontPal.originalGreen, fontPal.originalBlue));
}
@@ -375,7 +379,8 @@ Graphics::Surface *GraphicsManager::applyLightmapToSprite(Graphics::Surface *&bl
toDetele = blitted = duplicateSurface(blitted);
// apply light map texture
- Graphics::ManagedSurface tmp(&_lightMap, DisposeAfterUse::NO);
+ Graphics::ManagedSurface tmp;
+ tmp.copyFrom(_lightMap);
Common::Rect rect_h(_sceneWidth - x1 - diffX, y1, _sceneWidth - x1, y1 + diffY);
Common::Rect rect_none(x1, y1, x1 + diffX, y1 + diffY);
tmp.blendBlitTo(*blitted, 0, 0,
@@ -482,7 +487,8 @@ bool GraphicsManager::scaleSprite(Sprite &single, const SpritePalette &fontPal,
// Use Managed surface to scale and blit
if (!_zBuffer->numPanels) {
- Graphics::ManagedSurface tmp(blitted, DisposeAfterUse::NO);
+ Graphics::ManagedSurface tmp;
+ tmp.copyFrom(*blitted);
tmp.blendBlitTo(_renderSurface, x1, y1, (mirror ? Graphics::FLIP_H : Graphics::FLIP_NONE), nullptr, MS_ARGB(255 - thisPerson->transparency, 255, 255, 255), diffX, diffY);
if (ptr) {
@@ -493,9 +499,11 @@ bool GraphicsManager::scaleSprite(Sprite &single, const SpritePalette &fontPal,
} else {
// TODO: you dont need to copy the whole render surface, just the part to which the sprite may be drawn
- Graphics::ManagedSurface scaled(&_renderSurface, DisposeAfterUse::NO);
+ Graphics::ManagedSurface scaled;
+ scaled.copyFrom(_renderSurface);
- Graphics::ManagedSurface tmp(blitted, DisposeAfterUse::NO);
+ Graphics::ManagedSurface tmp;
+ tmp.copyFrom(*blitted);
tmp.blendBlitTo(scaled, x1, y1, (mirror ? Graphics::FLIP_H : Graphics::FLIP_NONE), nullptr, MS_ARGB(255 - thisPerson->transparency, 255, 255, 255), diffX, diffY);
drawSpriteToZBuffer(0, 0, z, scaled.rawSurface());
@@ -565,7 +573,8 @@ void GraphicsManager::fixScaleSprite(int x, int y, Sprite &single, const SpriteP
// draw sprite
if (!_zBuffer->numPanels) {
- Graphics::ManagedSurface tmp(&single.surface, DisposeAfterUse::NO);
+ Graphics::ManagedSurface tmp;
+ tmp.copyFrom(single.surface);
tmp.blendBlitTo(_renderSurface, x1, y1, (mirror ? Graphics::FLIP_H : Graphics::FLIP_NONE), nullptr, MS_ARGB((uint)255, (uint)255, (uint)255, (uint)255), diffX, diffY);
if (ptr) {
@@ -574,9 +583,11 @@ void GraphicsManager::fixScaleSprite(int x, int y, Sprite &single, const SpriteP
ptr = nullptr;
}
} else {
- Graphics::ManagedSurface scaled(&_renderSurface, DisposeAfterUse::NO);
+ Graphics::ManagedSurface scaled;
+ scaled.copyFrom(_renderSurface);
- Graphics::ManagedSurface tmp(blitted, DisposeAfterUse::NO);
+ Graphics::ManagedSurface tmp;
+ tmp.copyFrom(*blitted);
tmp.blendBlitTo(scaled, x1, y1, (mirror ? Graphics::FLIP_H : Graphics::FLIP_NONE), nullptr, MS_ARGB(255 - thisPerson->transparency, 255, 255, 255), diffX, diffY);
drawSpriteToZBuffer(0, 0, z, scaled.rawSurface());
diff --git a/engines/sludge/transition.cpp b/engines/sludge/transition.cpp
index c4a1d6e5298..e6f0dbcc5ee 100644
--- a/engines/sludge/transition.cpp
+++ b/engines/sludge/transition.cpp
@@ -47,7 +47,8 @@ void GraphicsManager::transitionCrossFader() {
if (_brightnessLevel == 255)
return;
- Graphics::ManagedSurface tmp(&_snapshotSurface, DisposeAfterUse::NO);
+ Graphics::ManagedSurface tmp;
+ tmp.copyFrom(_snapshotSurface);
tmp.blendBlitTo(_renderSurface, 0, 0, Graphics::FLIP_NONE, nullptr, MS_ARGB(255 - _brightnessLevel, 0xff, 0xff, 0xff));
}
Commit: af1eca20ff1b2a301dd125198fcd719a57471e9a
https://github.com/scummvm/scummvm/commit/af1eca20ff1b2a301dd125198fcd719a57471e9a
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2024-10-24T15:07:02+02:00
Commit Message:
STARK: Rename clashing enum members
Changed paths:
engines/stark/ui/world/actionmenu.cpp
engines/stark/ui/world/actionmenu.h
diff --git a/engines/stark/ui/world/actionmenu.cpp b/engines/stark/ui/world/actionmenu.cpp
index 66c8fbd0877..c095dfefcd6 100644
--- a/engines/stark/ui/world/actionmenu.cpp
+++ b/engines/stark/ui/world/actionmenu.cpp
@@ -51,7 +51,7 @@ ActionMenu::ActionMenu(Gfx::Driver *gfx, Cursor *cursor) :
_itemDescription(nullptr),
_item(nullptr),
_inventory(nullptr),
- _activeMenuType(kActionNone),
+ _activeMenuType(kActionNoneM),
_autoCloseTimeRemaining(kAutoCloseDisabled) {
_background = StarkStaticProvider->getUIElement(StaticProvider::kActionMenuBg);
@@ -121,7 +121,7 @@ void ActionMenu::open(Resources::ItemVisual *item, const Common::Point &itemRela
void ActionMenu::close() {
_visible = false;
_item = nullptr;
- _activeMenuType = kActionNone;
+ _activeMenuType = kActionNoneM;
_actionHoverSound->stop();
}
@@ -172,7 +172,7 @@ void ActionMenu::enableAction(uint32 action) {
}
void ActionMenu::updateActionSound() {
- if (_activeMenuType == kActionNone) {
+ if (_activeMenuType == kActionNoneM) {
_actionHoverSound->stop();
return;
}
@@ -184,7 +184,7 @@ void ActionMenu::updateActionSound() {
void ActionMenu::onMouseMove(const Common::Point &pos) {
int32 prevActive = _activeMenuType;
- int32 newActive = kActionNone;
+ int32 newActive = kActionNoneM;
for (uint i = 0; i < ARRAYSIZE(_buttons); i++) {
if (_buttons[i].enabled && _buttons[i].rect.contains(pos)) {
newActive = i;
@@ -193,7 +193,7 @@ void ActionMenu::onMouseMove(const Common::Point &pos) {
if (newActive != prevActive) {
_activeMenuType = newActive;
- if (_activeMenuType == kActionNone) {
+ if (_activeMenuType == kActionNoneM) {
_cursor->setCursorType(Cursor::kDefault);
} else {
_cursor->setCursorType(Cursor::kActive);
diff --git a/engines/stark/ui/world/actionmenu.h b/engines/stark/ui/world/actionmenu.h
index 22d2e32df20..158c6afac89 100644
--- a/engines/stark/ui/world/actionmenu.h
+++ b/engines/stark/ui/world/actionmenu.h
@@ -63,7 +63,7 @@ private:
void updateActionSound();
enum ActionMenuType {
- kActionNone = -1,
+ kActionNoneM = -1,
kActionHand = 0,
kActionEye = 1,
kActionMouth = 2
Commit: 2a0ba8954c04661aeb799bdfa5e5f75fee415aca
https://github.com/scummvm/scummvm/commit/2a0ba8954c04661aeb799bdfa5e5f75fee415aca
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2024-10-24T15:07:02+02:00
Commit Message:
SWORD1: Silence warning on potential typo
warning:
suspicious concatenation of string literals in an array initialization;
did you mean to separate the elements with a comma?
Changed paths:
engines/sword1/control.cpp
diff --git a/engines/sword1/control.cpp b/engines/sword1/control.cpp
index 69d038c5582..923eb133808 100644
--- a/engines/sword1/control.cpp
+++ b/engines/sword1/control.cpp
@@ -3353,7 +3353,7 @@ const uint8 Control::_polishTranslationLanguageStrings[20][43] = {
"Nowa gra", // "Restart",
"Start", // "Start",
"Wyjd\xBC", // "Quit",
- "Pr\xEA""dko\xB6\xE6", // "Speed", the double pair of "" is to avoid escaping the d after \xEA
+ ("Pr\xEA""dko\xB6\xE6"), // "Speed", the double pair of "" is to avoid escaping the d after \xEA
"G\xB3o\xB6no\xB6\xE6", // "Volume",
"Napisy", // "Text",
"Gotowe", // "Done",
Commit: 1b110723581b0a23a00465b317949d4f16f27de1
https://github.com/scummvm/scummvm/commit/1b110723581b0a23a00465b317949d4f16f27de1
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2024-10-24T15:07:03+02:00
Commit Message:
TWINE: Comment out unused class variables
Changed paths:
engines/twine/scene/rain.h
engines/twine/scene/wagon.h
diff --git a/engines/twine/scene/rain.h b/engines/twine/scene/rain.h
index 9db243d3df9..f5b22878b8b 100644
--- a/engines/twine/scene/rain.h
+++ b/engines/twine/scene/rain.h
@@ -29,7 +29,7 @@ namespace TwinE {
class Rain {
private:
- TwinEEngine *_engine;
+ //TwinEEngine *_engine;
public:
struct T_RAIN {
@@ -39,7 +39,7 @@ public:
int32 Timer;
};
- Rain(TwinEEngine *engine) : _engine(engine) {}
+ Rain(TwinEEngine *engine) /*: _engine(engine) */ {}
void InitOneRain(T_RAIN *pt);
void InitRain();
diff --git a/engines/twine/scene/wagon.h b/engines/twine/scene/wagon.h
index f95ce9b0807..a0948a16ab6 100644
--- a/engines/twine/scene/wagon.h
+++ b/engines/twine/scene/wagon.h
@@ -29,10 +29,10 @@ namespace TwinE {
class Wagon {
private:
- TwinEEngine *_engine;
+ //TwinEEngine *_engine;
public:
- Wagon(TwinEEngine *engine) : _engine(engine) {}
+ Wagon(TwinEEngine *engine) /* : _engine(engine) */ {}
void DoAnimWagon();
void DoDirWagon(ActorStruct *ptrobj);
Commit: 11ae6a973c647d3ae0e03b69d6ab620510167c96
https://github.com/scummvm/scummvm/commit/11ae6a973c647d3ae0e03b69d6ab620510167c96
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2024-10-24T15:07:03+02:00
Commit Message:
ULTIMA: Fixed usage of obsolete ManagedSurface methods
Changed paths:
engines/ultima/shared/gfx/visual_surface.cpp
engines/ultima/ultima1/u1gfx/drawing_support.cpp
diff --git a/engines/ultima/shared/gfx/visual_surface.cpp b/engines/ultima/shared/gfx/visual_surface.cpp
index b4558a621de..a61a7c96ce5 100644
--- a/engines/ultima/shared/gfx/visual_surface.cpp
+++ b/engines/ultima/shared/gfx/visual_surface.cpp
@@ -29,7 +29,8 @@ namespace Shared {
namespace Gfx {
VisualSurface::VisualSurface(const Graphics::ManagedSurface &src, const Rect &bounds, GameBase *game) :
- Graphics::ManagedSurface(src), _bounds(bounds), _textColor(255), _bgColor(0) {
+ _bounds(bounds), _textColor(255), _bgColor(0) {
+ copyFrom(src);
Shared::Game *sharedGame = dynamic_cast<Shared::Game *>(game);
if (sharedGame) {
_textColor = sharedGame->_textColor;
diff --git a/engines/ultima/ultima1/u1gfx/drawing_support.cpp b/engines/ultima/ultima1/u1gfx/drawing_support.cpp
index 317d2847069..84d92e04ca7 100644
--- a/engines/ultima/ultima1/u1gfx/drawing_support.cpp
+++ b/engines/ultima/ultima1/u1gfx/drawing_support.cpp
@@ -27,7 +27,7 @@ namespace Ultima {
namespace Ultima1 {
namespace U1Gfx {
-DrawingSupport::DrawingSupport(const Shared::Gfx::VisualSurface &s) : _surface(s) {
+DrawingSupport::DrawingSupport(const Shared::Gfx::VisualSurface &s) : _surface(s, s.getBounds()) {
_game = static_cast<Ultima1Game *>(g_vm->_game);
}
Commit: 9f9f71c03d3cd3aa942dbb735cc912c5fdee97fa
https://github.com/scummvm/scummvm/commit/9f9f71c03d3cd3aa942dbb735cc912c5fdee97fa
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2024-10-24T15:15:19+02:00
Commit Message:
WATCHMAKER: sprintf() -> snprintf()
Changed paths:
engines/watchmaker/t2d/t2d.cpp
diff --git a/engines/watchmaker/t2d/t2d.cpp b/engines/watchmaker/t2d/t2d.cpp
index 89c10e0d758..24367078316 100644
--- a/engines/watchmaker/t2d/t2d.cpp
+++ b/engines/watchmaker/t2d/t2d.cpp
@@ -756,7 +756,7 @@ void FormattaLogs(WGame &game) {
init.PDALog[PDALogSorted[i].PDALogInd].dy = 15 * init.PDALog[PDALogSorted[i].PDALogInd].lines;
if (((init.PDALog[PDALogSorted[i].PDALogInd].flags & PDA_MENU) == FALSE) && (init.PDALog[PDALogSorted[i].PDALogInd].time >= 0)) {
- sprintf(init.PDALog[PDALogSorted[i].PDALogInd].info.c_str(), "%04d", init.PDALog[PDALogSorted[i].PDALogInd].time);
+ snprintf(init.PDALog[PDALogSorted[i].PDALogInd].info.c_str(), 6, "%04d", init.PDALog[PDALogSorted[i].PDALogInd].time);
init.PDALog[PDALogSorted[i].PDALogInd].info.c_str()[5] = 0;
init.PDALog[PDALogSorted[i].PDALogInd].info.c_str()[4] = init.PDALog[PDALogSorted[i].PDALogInd].info.c_str()[3];
init.PDALog[PDALogSorted[i].PDALogInd].info.c_str()[3] = init.PDALog[PDALogSorted[i].PDALogInd].info.c_str()[2];
More information about the Scummvm-git-logs
mailing list