[Scummvm-cvs-logs] scummvm master -> 8b45875e245f8eba2403987cdb4ba128720048a9
bluegr
bluegr at gmail.com
Thu Dec 24 12:01:07 CET 2015
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
28b5105f56 LAB: Move enums to the top of processroom.h
8b45875e24 LAB: Get rid of _screenImage
Commit: 28b5105f56201d37921521afcfa222c7b593004c
https://github.com/scummvm/scummvm/commit/28b5105f56201d37921521afcfa222c7b593004c
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2015-12-24T12:38:26+02:00
Commit Message:
LAB: Move enums to the top of processroom.h
Changed paths:
engines/lab/processroom.h
diff --git a/engines/lab/processroom.h b/engines/lab/processroom.h
index 37585bc..f5201b1 100644
--- a/engines/lab/processroom.h
+++ b/engines/lab/processroom.h
@@ -102,6 +102,37 @@ enum Condition {
kCondUsedHelmet = 184
};
+enum MapDoors {
+ kDoorLeftNorth = 1,
+ kDoorLeftEast = 2,
+ kDoorLeftSouth = 4,
+ kDoorLeftWest = 8,
+
+ kDoorMiddleNorth = 16,
+ kDoorRightNorth = 32,
+ kDoorMiddleSouth = 64,
+ kDoorRightSouth = 128,
+
+ kDoorMiddleEast = 16,
+ kDoorBottomEast = 32,
+ kDoorMiddleWest = 64,
+ kDoorBottomWest = 128
+};
+
+// Special Map ID's
+#define NORMAL 0
+#define UPARROWROOM 1
+#define DOWNARROWROOM 2
+#define BRIDGEROOM 3
+#define VCORRIDOR 4
+#define HCORRIDOR 5
+#define MEDMAZE 6
+#define HEDGEMAZE 7
+#define SURMAZE 8
+#define MULTIMAZEF1 9
+#define MULTIMAZEF2 10
+#define MULTIMAZEF3 11
+
#if defined(WIN32)
#pragma pack(push, 1)
#endif
@@ -154,39 +185,6 @@ struct InventoryData {
Common::String _bitmapName;
};
-// Map Flags
-
-enum MapDoors {
- kDoorLeftNorth = 1,
- kDoorLeftEast = 2,
- kDoorLeftSouth = 4,
- kDoorLeftWest = 8,
-
- kDoorMiddleNorth = 16,
- kDoorRightNorth = 32,
- kDoorMiddleSouth = 64,
- kDoorRightSouth = 128,
-
- kDoorMiddleEast = 16,
- kDoorBottomEast = 32,
- kDoorMiddleWest = 64,
- kDoorBottomWest = 128
-};
-
-// Special Map ID's
-#define NORMAL 0
-#define UPARROWROOM 1
-#define DOWNARROWROOM 2
-#define BRIDGEROOM 3
-#define VCORRIDOR 4
-#define HCORRIDOR 5
-#define MEDMAZE 6
-#define HEDGEMAZE 7
-#define SURMAZE 8
-#define MULTIMAZEF1 9
-#define MULTIMAZEF2 10
-#define MULTIMAZEF3 11
-
struct MapData {
uint16 _x, _y, _pageNumber, _specialID;
uint32 _mapFlags;
Commit: 8b45875e245f8eba2403987cdb4ba128720048a9
https://github.com/scummvm/scummvm/commit/8b45875e245f8eba2403987cdb4ba128720048a9
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2015-12-24T13:00:10+02:00
Commit Message:
LAB: Get rid of _screenImage
Thanks to wjp for finding this
Changed paths:
engines/lab/lab.cpp
engines/lab/lab.h
engines/lab/special.cpp
diff --git a/engines/lab/lab.cpp b/engines/lab/lab.cpp
index b36bb13..d21dc66 100644
--- a/engines/lab/lab.cpp
+++ b/engines/lab/lab.cpp
@@ -89,7 +89,6 @@ LabEngine::LabEngine(OSystem *syst, const ADGameDescription *gameDesc)
_utils = nullptr;
_console = nullptr;
_journalBackImage = nullptr;
- _screenImage = nullptr;
_lastTooLong = false;
_interfaceOff = false;
@@ -158,10 +157,6 @@ LabEngine::~LabEngine() {
delete _utils;
delete _console;
delete _journalBackImage;
- // _screenImage->_imageData is always pointing to the current drawing buffer.
- // It shouldn't be deleted there.
- _screenImage->_imageData = nullptr;
- delete _screenImage;
}
Common::Error LabEngine::run() {
@@ -179,7 +174,6 @@ Common::Error LabEngine::run() {
_utils = new Utils(this);
_console = new Console(this);
_journalBackImage = new Image(this);
- _screenImage = new Image(this);
if (getPlatform() == Common::kPlatformWindows) {
// Check if this is the Wyrmkeep trial
diff --git a/engines/lab/lab.h b/engines/lab/lab.h
index 752cbab..3741505 100644
--- a/engines/lab/lab.h
+++ b/engines/lab/lab.h
@@ -136,7 +136,6 @@ private:
MapData *_maps;
Image *_monitorButton;
Image *_journalBackImage;
- Image *_screenImage;
TextFont *_journalFont;
public:
diff --git a/engines/lab/special.cpp b/engines/lab/special.cpp
index de9f1d9..9a631e4 100644
--- a/engines/lab/special.cpp
+++ b/engines/lab/special.cpp
@@ -141,8 +141,6 @@ void LabEngine::loadJournalData() {
// Keep a copy of the blank journal
_blankJournal = new byte[_graphics->_screenBytesPerPage];
memcpy(_blankJournal, _journalBackImage->_imageData, _graphics->_screenBytesPerPage);
-
- _screenImage->_imageData = _graphics->getCurrentDrawingBuffer();
}
void LabEngine::drawJournalText() {
@@ -182,15 +180,13 @@ void LabEngine::turnPage(bool fromLeft) {
for (int i = 0; i < _graphics->_screenWidth; i += 8) {
updateMusicAndEvents();
waitTOF();
- _screenImage->_imageData = _graphics->getCurrentDrawingBuffer();
- _journalBackImage->blitBitmap(i, 0, _screenImage, i, 0, 8, _graphics->_screenHeight, false);
+ _journalBackImage->blitBitmap(i, 0, nullptr, i, 0, 8, _graphics->_screenHeight, false);
}
} else {
for (int i = (_graphics->_screenWidth - 8); i > 0; i -= 8) {
updateMusicAndEvents();
waitTOF();
- _screenImage->_imageData = _graphics->getCurrentDrawingBuffer();
- _journalBackImage->blitBitmap(i, 0, _screenImage, i, 0, 8, _graphics->_screenHeight, false);
+ _journalBackImage->blitBitmap(i, 0, nullptr, i, 0, 8, _graphics->_screenHeight, false);
}
}
}
@@ -202,7 +198,7 @@ void LabEngine::drawJournal(uint16 wipenum, bool needFade) {
_graphics->loadBackPict("P:Journal.pic", _highPalette);
if (wipenum == 0)
- _journalBackImage->blitBitmap(0, 0, _screenImage, 0, 0, _graphics->_screenWidth, _graphics->_screenHeight, false);
+ _journalBackImage->blitBitmap(0, 0, nullptr, 0, 0, _graphics->_screenWidth, _graphics->_screenHeight, false);
else
turnPage((wipenum == 1));
@@ -261,10 +257,9 @@ void LabEngine::doJournal() {
_graphics->blackAllScreen();
_lastPage = false;
- _screenImage->_width = _journalBackImage->_width = _graphics->_screenWidth;
- _screenImage->_height = _journalBackImage->_height = _graphics->_screenHeight;
+ _journalBackImage->_width = _graphics->_screenWidth;
+ _journalBackImage->_height = _graphics->_screenHeight;
_journalBackImage->_imageData = nullptr;
- _screenImage->_imageData = _graphics->getCurrentDrawingBuffer();
updateMusicAndEvents();
loadJournalData();
@@ -283,8 +278,6 @@ void LabEngine::doJournal() {
_event->freeButtonList(&_journalButtonList);
_graphics->closeFont(&_journalFont);
- _screenImage->_imageData = _graphics->getCurrentDrawingBuffer();
-
_graphics->rectFill(0, 0, _graphics->_screenWidth - 1, _graphics->_screenHeight - 1, 0);
_graphics->blackScreen();
}
More information about the Scummvm-git-logs
mailing list