[Scummvm-git-logs] scummvm master -> 0143b17ca180a4a584d6fc48c7384b1b55a997dc
Strangerke
noreply at scummvm.org
Sun Jun 16 22:30:01 UTC 2024
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
0143b17ca1 BAGEL: Remove some unused includes, pass some parameters by reference
Commit: 0143b17ca180a4a584d6fc48c7384b1b55a997dc
https://github.com/scummvm/scummvm/commit/0143b17ca180a4a584d6fc48c7384b1b55a997dc
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2024-06-16T23:29:40+01:00
Commit Message:
BAGEL: Remove some unused includes, pass some parameters by reference
Changed paths:
engines/bagel/baglib/command_object.cpp
engines/bagel/baglib/cursor.cpp
engines/bagel/baglib/cursor.h
engines/bagel/baglib/fmovie.cpp
engines/bagel/baglib/log_msg.cpp
engines/bagel/baglib/log_msg.h
engines/bagel/baglib/pan_window.cpp
engines/bagel/baglib/pan_window.h
engines/bagel/baglib/sprite_object.cpp
engines/bagel/baglib/storage_dev_win.cpp
engines/bagel/baglib/storage_dev_win.h
engines/bagel/baglib/time_object.h
engines/bagel/baglib/variable_object.h
engines/bagel/boflib/dat_file.h
engines/bagel/boflib/file_functions.h
engines/bagel/spacebar/bibble_window.h
engines/bagel/spacebar/main_link_object.cpp
engines/bagel/spacebar/main_window.h
engines/bagel/spacebar/nav_window.cpp
diff --git a/engines/bagel/baglib/command_object.cpp b/engines/bagel/baglib/command_object.cpp
index a4b852273c3..a019ccfdc47 100644
--- a/engines/bagel/baglib/command_object.cpp
+++ b/engines/bagel/baglib/command_object.cpp
@@ -203,7 +203,8 @@ bool CBagCommandObject::runObject() {
CBagStorageDev *currSDev = CBagel::getBagApp()->getMasterWnd()->getCurrentStorageDev();
if ((currSDev != nullptr) && (currSDev->getDeviceType() == SDEV_GAMEWIN)) {
CBagPanWindow *currWin = (CBagPanWindow *)currSDev;
- currWin->rotateTo(getPosition());
+ CBofPoint loc = getPosition();
+ currWin->rotateTo(loc);
}
}
@@ -212,7 +213,8 @@ bool CBagCommandObject::runObject() {
CBagStorageDev *currSDev = CBagel::getBagApp()->getMasterWnd()->getCurrentStorageDev();
if ((currSDev != nullptr) && (currSDev->getDeviceType() == SDEV_GAMEWIN)) {
CBagPanWindow *currWin = (CBagPanWindow *)currSDev;
- currWin->rotateTo(getPosition());
+ CBofPoint loc = getPosition();
+ currWin->rotateTo(loc);
}
} else if (getFileName() == "SETQVOL") {
diff --git a/engines/bagel/baglib/cursor.cpp b/engines/bagel/baglib/cursor.cpp
index e929d3ebf85..c50da6cad0f 100644
--- a/engines/bagel/baglib/cursor.cpp
+++ b/engines/bagel/baglib/cursor.cpp
@@ -19,6 +19,7 @@
*
*/
+#include "graphics/cursorman.h"
#include "bagel/baglib/cursor.h"
namespace Bagel {
diff --git a/engines/bagel/baglib/cursor.h b/engines/bagel/baglib/cursor.h
index c1e2cbfc9c1..7851e0fff97 100644
--- a/engines/bagel/baglib/cursor.h
+++ b/engines/bagel/baglib/cursor.h
@@ -23,7 +23,6 @@
#ifndef BAGEL_BAGLIB_CURSOR_H
#define BAGEL_BAGLIB_CURSOR_H
-#include "graphics/cursorman.h"
#include "bagel/boflib/gfx/bitmap.h"
#include "bagel/boflib/error.h"
diff --git a/engines/bagel/baglib/fmovie.cpp b/engines/bagel/baglib/fmovie.cpp
index f17f80effe6..e6be29c768b 100644
--- a/engines/bagel/baglib/fmovie.cpp
+++ b/engines/bagel/baglib/fmovie.cpp
@@ -19,6 +19,8 @@
*
*/
+#include "graphics/cursorman.h"
+
#include "bagel/baglib/fmovie.h"
#include "bagel/boflib/string.h"
#include "bagel/boflib/gfx/palette.h"
diff --git a/engines/bagel/baglib/log_msg.cpp b/engines/bagel/baglib/log_msg.cpp
index da740dc9a70..3a96f16faf5 100644
--- a/engines/bagel/baglib/log_msg.cpp
+++ b/engines/bagel/baglib/log_msg.cpp
@@ -52,7 +52,7 @@ CBagLog::~CBagLog() {
}
}
-CBofPoint CBagLog::arrangeFloater(CBofPoint pos, CBagObject *bagObj) {
+CBofPoint CBagLog::arrangeFloater(CBofPoint &pos, CBagObject *bagObj) {
CBofPoint nextPos = pos;
// Things are so convoluted now, it is entirely possible that this method
diff --git a/engines/bagel/baglib/log_msg.h b/engines/bagel/baglib/log_msg.h
index bd0c3c62663..0e4a9105989 100644
--- a/engines/bagel/baglib/log_msg.h
+++ b/engines/bagel/baglib/log_msg.h
@@ -192,7 +192,7 @@ public:
* @return Returns the next available location in the sdev,
* at this level the objects will go out of range of the sdev.
*/
- CBofPoint arrangeFloater(CBofPoint pos, CBagObject *bagObj) override;
+ CBofPoint arrangeFloater(CBofPoint &pos, CBagObject *bagObj) override;
int getCurFltPage();
void setCurFltPage(int fltPage);
diff --git a/engines/bagel/baglib/pan_window.cpp b/engines/bagel/baglib/pan_window.cpp
index 3e8db2605d6..1bd70ad4c93 100644
--- a/engines/bagel/baglib/pan_window.cpp
+++ b/engines/bagel/baglib/pan_window.cpp
@@ -722,7 +722,7 @@ void CBagPanWindow::flushInputEvents() {
#define HALF_PAN_WIDTH (PAN_WIDTH/2)
-uint32 CBagPanWindow::rotateTo(CBofPoint xPoint, int nRate) {
+uint32 CBagPanWindow::rotateTo(CBofPoint &xPoint, int nRate) {
assert(nRate > 0);
if (_pSlideBitmap && (xPoint.x != -1) && (xPoint.y != -1)) {
diff --git a/engines/bagel/baglib/pan_window.h b/engines/bagel/baglib/pan_window.h
index d8aef621584..02ca9a56911 100644
--- a/engines/bagel/baglib/pan_window.h
+++ b/engines/bagel/baglib/pan_window.h
@@ -104,7 +104,7 @@ public:
*/
CBofRect unSetSlideBitmap();
- uint32 rotateTo(CPoint xPoint, int nRate = 8);
+ uint32 rotateTo(CPoint &xPoint, int nRate = 8);
void activateView();
void deActivateView();
diff --git a/engines/bagel/baglib/sprite_object.cpp b/engines/bagel/baglib/sprite_object.cpp
index fcd164f5571..d4fcab5030b 100644
--- a/engines/bagel/baglib/sprite_object.cpp
+++ b/engines/bagel/baglib/sprite_object.cpp
@@ -249,11 +249,7 @@ bool CBagSpriteObject::isInside(const CBofPoint &xPoint) {
}
void CBagSpriteObject::setProperty(const CBofString &sProp, int nVal) {
- if (!sProp.find("STATE")) {
- setState(nVal);
- if (_xSprite)
- _xSprite->setCel(nVal);
- } else if (!sProp.find("CURR_CEL")) {
+ if (!sProp.find("STATE") || !sProp.find("CURR_CEL")) {
setState(nVal);
if (_xSprite)
_xSprite->setCel(nVal);
diff --git a/engines/bagel/baglib/storage_dev_win.cpp b/engines/bagel/baglib/storage_dev_win.cpp
index 8dc373451cc..b46d9ae730b 100644
--- a/engines/bagel/baglib/storage_dev_win.cpp
+++ b/engines/bagel/baglib/storage_dev_win.cpp
@@ -271,7 +271,7 @@ ErrorCode CBagStorageDev::deactivateLocalObject(const CBofString &sName) {
}
-CBofPoint CBagStorageDev::arrangeFloater(CBofPoint nPos, CBagObject *pObj) {
+CBofPoint CBagStorageDev::arrangeFloater(CBofPoint &nPos, CBagObject *pObj) {
CBofPoint NextPos = nPos;
if (getBackground() != nullptr) {
diff --git a/engines/bagel/baglib/storage_dev_win.h b/engines/bagel/baglib/storage_dev_win.h
index a6d92b483b3..683cef4821d 100644
--- a/engines/bagel/baglib/storage_dev_win.h
+++ b/engines/bagel/baglib/storage_dev_win.h
@@ -346,7 +346,7 @@ public:
virtual CBagObject *onNewThingObject(const CBofString &sInit);
// Call to arrange floating object, override to customize layout
- virtual CBofPoint arrangeFloater(CBofPoint nPos, CBagObject *pObj);
+ virtual CBofPoint arrangeFloater(CBofPoint &nPos, CBagObject *pObj);
// Set and Get the number of pages required to display all floating objects
int getNumFloatPages() const {
diff --git a/engines/bagel/baglib/time_object.h b/engines/bagel/baglib/time_object.h
index 028aef8d2df..4be61d6f1da 100644
--- a/engines/bagel/baglib/time_object.h
+++ b/engines/bagel/baglib/time_object.h
@@ -25,7 +25,6 @@
#include "bagel/baglib/object.h"
#include "bagel/boflib/gfx/bitmap.h"
-#include "bagel/boflib/gui/window.h"
#include "bagel/boflib/gfx/sprite.h"
namespace Bagel {
diff --git a/engines/bagel/baglib/variable_object.h b/engines/bagel/baglib/variable_object.h
index e5755e5b245..69a7dba1a87 100644
--- a/engines/bagel/baglib/variable_object.h
+++ b/engines/bagel/baglib/variable_object.h
@@ -23,7 +23,6 @@
#ifndef BAGEL_BAGLIB_VARIABLE_OBJECT_H
#define BAGEL_BAGLIB_VARIABLE_OBJECT_H
-#include "bagel/baglib/text_object.h"
#include "bagel/baglib/object.h"
namespace Bagel {
diff --git a/engines/bagel/boflib/dat_file.h b/engines/bagel/boflib/dat_file.h
index 70d1062bb6f..77a24028787 100644
--- a/engines/bagel/boflib/dat_file.h
+++ b/engines/bagel/boflib/dat_file.h
@@ -24,7 +24,6 @@
#define BAGEL_BOFLIB_DAT_FILE_H
#include "common/serializer.h"
-#include "bagel/boflib/stdinc.h"
#include "bagel/boflib/file.h"
namespace Bagel {
diff --git a/engines/bagel/boflib/file_functions.h b/engines/bagel/boflib/file_functions.h
index 436e7f7c5c1..c0a293855c5 100644
--- a/engines/bagel/boflib/file_functions.h
+++ b/engines/bagel/boflib/file_functions.h
@@ -23,8 +23,6 @@
#ifndef BAGEL_BOFLIB_FILE_FUNCTIONS_H
#define BAGEL_BOFLIB_FILE_FUNCTIONS_H
-#include "bagel/boflib/stdinc.h"
-
namespace Bagel {
/**
diff --git a/engines/bagel/spacebar/bibble_window.h b/engines/bagel/spacebar/bibble_window.h
index 1ead873d710..25e451c2ace 100644
--- a/engines/bagel/spacebar/bibble_window.h
+++ b/engines/bagel/spacebar/bibble_window.h
@@ -25,7 +25,6 @@
#include "bagel/baglib/storage_dev_win.h"
#include "bagel/boflib/gui/text_box.h"
-#include "bagel/boflib/app.h"
#include "bagel/boflib/gui/button.h"
#include "bagel/boflib/gfx/sprite.h"
#include "bagel/boflib/sound.h"
diff --git a/engines/bagel/spacebar/main_link_object.cpp b/engines/bagel/spacebar/main_link_object.cpp
index b934da3ae7c..29a33f81f02 100644
--- a/engines/bagel/spacebar/main_link_object.cpp
+++ b/engines/bagel/spacebar/main_link_object.cpp
@@ -38,7 +38,8 @@ void CMainLinkObject::onLButtonUp(uint32 nFlags, CBofPoint *xPoint, void *info)
if (pWnd && pWnd->gameMode() == CMainWindow::VRPLAYMODE) {
if (CBagMasterWin::getFlyThru()) {
- pWnd->rotateTo(getSrcLoc(), 12);
+ CBofPoint loc = getSrcLoc();
+ pWnd->rotateTo(loc, 12);
}
// Set the link position for the storage device we are about to jump to
diff --git a/engines/bagel/spacebar/main_window.h b/engines/bagel/spacebar/main_window.h
index 10b9bffa858..86b6cc47cc7 100644
--- a/engines/bagel/spacebar/main_window.h
+++ b/engines/bagel/spacebar/main_window.h
@@ -26,7 +26,6 @@
#include "bagel/boflib/gfx/palette.h"
#include "bagel/baglib/pan_window.h"
#include "bagel/baglib/menu_dlg.h"
-#include "bagel/baglib/pda.h"
#include "bagel/spacebar/thud.h"
namespace Bagel {
diff --git a/engines/bagel/spacebar/nav_window.cpp b/engines/bagel/spacebar/nav_window.cpp
index d541df35a3f..65a1de9e792 100644
--- a/engines/bagel/spacebar/nav_window.cpp
+++ b/engines/bagel/spacebar/nav_window.cpp
@@ -19,6 +19,8 @@
*
*/
+#include "graphics/cursorman.h"
+
#include "bagel/spacebar/nav_window.h"
#include "bagel/spacebar/master_win.h"
#include "bagel/boflib/event_loop.h"
More information about the Scummvm-git-logs
mailing list