[Scummvm-git-logs] scummvm master -> 28a906b4d6faaf7074b15b02c0621abd7893363b
a-yyg
76591232+a-yyg at users.noreply.github.com
Thu Jul 1 19:07:41 UTC 2021
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:
28a906b4d6 SAGA2: Fix more global constructor warnings
Commit: 28a906b4d6faaf7074b15b02c0621abd7893363b
https://github.com/scummvm/scummvm/commit/28a906b4d6faaf7074b15b02c0621abd7893363b
Author: a/ (yuri.kgpps at gmail.com)
Date: 2021-07-02T04:06:46+09:00
Commit Message:
SAGA2: Fix more global constructor warnings
Changed paths:
engines/saga2/saga2.h
engines/saga2/tile.cpp
engines/saga2/vpage.h
engines/saga2/vwdraw.cpp
diff --git a/engines/saga2/saga2.h b/engines/saga2/saga2.h
index 0b2b38cb59..d45ebacf4e 100644
--- a/engines/saga2/saga2.h
+++ b/engines/saga2/saga2.h
@@ -107,6 +107,7 @@ public:
Common::List<SensorList *> _sensorListList;
Common::List<Sensor *> _sensorList;
Common::List<MotionTask *>::iterator _nextMT;
+ Common::List<int> _platformLRU;
BandList *_bandList;
CImageCache *_imageCache;
GrabInfo *_mouseInfo;
diff --git a/engines/saga2/tile.cpp b/engines/saga2/tile.cpp
index 7c234da5a0..667804298a 100644
--- a/engines/saga2/tile.cpp
+++ b/engines/saga2/tile.cpp
@@ -172,7 +172,7 @@ extern ObjectID viewCenterObject; // ID of object that view tracks
Exports
* ===================================================================== */
-Rect16 tileRect(tileRectX, tileRectY, tileRectWidth, tileRectHeight);
+StaticRect tileRect{tileRectX, tileRectY, tileRectWidth, tileRectHeight};
gPixelMap tileDrawMap;
/* ===================================================================== *
@@ -183,7 +183,7 @@ int16 cycleCount;
uint16 rippedRoofID;
-TilePoint ripTableCoords = Nowhere;
+static StaticTilePoint ripTableCoords = Nowhere;
static RipTable ripTableList[25];
@@ -197,7 +197,6 @@ CyclePtr cycleList; // list of tile cycling info
// Platform caching management
const int platformCacheSize = 256;
-Common::List<int> platformLRU; // least recently used
PlatformCacheEntry platformCache[platformCacheSize];
/* ===================================================================== *
@@ -1813,7 +1812,7 @@ void initPlatformCache(void) {
// Fill up the LRU with empty platforms
pce->metaID = NoMetaTile;
- platformLRU.push_back(i);
+ g_vm->_platformLRU.push_back(i);
}
}
@@ -2282,8 +2281,8 @@ Platform *MetaTile::fetchPlatform(int16 mapNum, int16 layer) {
assert(pce->metaID == thisID(mapNum));
// Move to the end of the LRU
- platformLRU.remove(plIndex);
- platformLRU.push_back(plIndex);
+ g_vm->_platformLRU.remove(plIndex);
+ g_vm->_platformLRU.push_back(plIndex);
// return the address of the platform
return &pce->pl;
@@ -2294,9 +2293,9 @@ Platform *MetaTile::fetchPlatform(int16 mapNum, int16 layer) {
// dump something from the cache. Dump the one that
// was least recently used.
// Get head of LRU chain.
- int cacheIndex = platformLRU.front();
- platformLRU.pop_front();
- platformLRU.push_back(cacheIndex);
+ int cacheIndex = g_vm->_platformLRU.front();
+ g_vm->_platformLRU.pop_front();
+ g_vm->_platformLRU.push_back(cacheIndex);
pce = &platformCache[cacheIndex];
diff --git a/engines/saga2/vpage.h b/engines/saga2/vpage.h
index ba669e9662..0adfec9977 100644
--- a/engines/saga2/vpage.h
+++ b/engines/saga2/vpage.h
@@ -56,8 +56,8 @@ public:
// pixMod is the line modulus of the buffer.)
virtual void readPixels(Rect16 &dispRect, uint8 *pixPtr, uint16 pixMod);
- virtual void writePixels(Rect16 &dispRect, uint8 *pixPtr, uint16 pixMod);
- virtual void writeTransPixels(Rect16 &dispRect, uint8 *pixPtr, uint16 pixMod);
+ virtual void writePixels(Rect16 dispRect, uint8 *pixPtr, uint16 pixMod);
+ virtual void writeTransPixels(Rect16 dispRect, uint8 *pixPtr, uint16 pixMod);
virtual void writeColorPixels(Rect16 dispRect, uint8 *pixPtr, uint16 pixMod, uint8 color);
virtual void writeComplementPixels(Rect16 dispRect, uint8 *pixPtr, uint16 pixMod, uint8 color);
};
diff --git a/engines/saga2/vwdraw.cpp b/engines/saga2/vwdraw.cpp
index 609eca7082..f93219e16b 100644
--- a/engines/saga2/vwdraw.cpp
+++ b/engines/saga2/vwdraw.cpp
@@ -407,11 +407,11 @@ void vDisplayPage::fillRect(Rect16 r, uint8 color) {
void vDisplayPage::invertRect(Rect16 r, uint8 color) {
}
-void vDisplayPage::writePixels(Rect16 &r, uint8 *pixPtr, uint16 pixMod) {
+void vDisplayPage::writePixels(Rect16 r, uint8 *pixPtr, uint16 pixMod) {
g_system->copyRectToScreen(pixPtr, pixMod, r.x, r.y, r.width, r.height);
}
-void vDisplayPage::writeTransPixels(Rect16 &r, uint8 *pixPtr, uint16 pixMod) {
+void vDisplayPage::writeTransPixels(Rect16 r, uint8 *pixPtr, uint16 pixMod) {
Graphics::Surface *surf = g_system->lockScreen();
_BltPixelsT(pixPtr, pixMod, (byte *)surf->getBasePtr(r.x, r.y), surf->pitch, r.width, r.height );
More information about the Scummvm-git-logs
mailing list