[Scummvm-git-logs] scummvm master -> a503af495988a0a65d770758d697475f5b1ac414
yinsimei
roseline.yin at gmail.com
Thu Aug 3 09:38:31 CEST 2017
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:
7eade8b031 SLUDGE: Quit game built-in function
3a7e5f1647 SLUDGE: Fix backdrop loading error
a503af4959 IMAGE: Correct 4-byte image writting pixel format
Commit: 7eade8b0318bd969afce4958e27813956fcd5baa
https://github.com/scummvm/scummvm/commit/7eade8b0318bd969afce4958e27813956fcd5baa
Author: Simei Yin (roseline.yin at gmail.com)
Date: 2017-08-03T04:14:35+02:00
Commit Message:
SLUDGE: Quit game built-in function
Changed paths:
engines/sludge/builtin.cpp
engines/sludge/event.cpp
engines/sludge/event.h
diff --git a/engines/sludge/builtin.cpp b/engines/sludge/builtin.cpp
index 01d58a0..6d7d571 100644
--- a/engines/sludge/builtin.cpp
+++ b/engines/sludge/builtin.cpp
@@ -977,11 +977,9 @@ builtIn(callEvent) {
return BR_CONTINUE;
}
-bool reallyWantToQuit = false;
-
builtIn(quitGame) {
UNUSEDALL
- reallyWantToQuit = true;
+ g_sludge->_evtMan->quitGame();
return BR_CONTINUE;
}
diff --git a/engines/sludge/event.cpp b/engines/sludge/event.cpp
index 2211400..c2997be 100644
--- a/engines/sludge/event.cpp
+++ b/engines/sludge/event.cpp
@@ -43,6 +43,7 @@ EventManager::EventManager(SludgeEngine *vm) {
_vm = vm;
_weAreDoneSoQuit = 0;
+ _reallyWantToQuit = false;
_input.leftClick = _input.rightClick = _input.justMoved = _input.leftRelease = _input.rightRelease = false;
_input.keyPressed = 0;
@@ -129,7 +130,7 @@ void EventManager::checkInput() {
case Common::EVENT_QUIT:
_weAreDoneSoQuit = 1;
- // TODO: if reallyWantToQuit, popup a message box to confirm
+ // TODO: if _reallyWantToQuit, popup a message box to confirm
break;
default:
diff --git a/engines/sludge/event.h b/engines/sludge/event.h
index ddb973f..691a0da 100644
--- a/engines/sludge/event.h
+++ b/engines/sludge/event.h
@@ -73,6 +73,7 @@ public:
void restore(FrozenStuffStruct *frozenStuff);
// Quit
+ void quitGame() { _weAreDoneSoQuit = true; /* _reallyWantToQuit = true; */ }
bool quit() { return _weAreDoneSoQuit; }
private:
@@ -80,6 +81,7 @@ private:
InputType _input;
int _weAreDoneSoQuit;
+ bool _reallyWantToQuit;
EventHandlers *_currentEvents;
};
Commit: 3a7e5f16479cb34509cf5c05b345a9f8154a3842
https://github.com/scummvm/scummvm/commit/3a7e5f16479cb34509cf5c05b345a9f8154a3842
Author: Simei Yin (roseline.yin at gmail.com)
Date: 2017-08-03T09:36:30+02:00
Commit Message:
SLUDGE: Fix backdrop loading error
Changed paths:
engines/sludge/backdrop.cpp
diff --git a/engines/sludge/backdrop.cpp b/engines/sludge/backdrop.cpp
index 62eef91..23ddfe6 100644
--- a/engines/sludge/backdrop.cpp
+++ b/engines/sludge/backdrop.cpp
@@ -224,6 +224,8 @@ bool GraphicsManager::reserveBackdrop() {
_vm->_evtMan->mouseX() = (int)((float)_vm->_evtMan->mouseX() / _cameraZoom);
_vm->_evtMan->mouseY() = (int)((float)_vm->_evtMan->mouseY() / _cameraZoom);
+ _backdropSurface.create(_sceneWidth, _sceneHeight, *_vm->getScreenPixelFormat());
+
return true;
}
Commit: a503af495988a0a65d770758d697475f5b1ac414
https://github.com/scummvm/scummvm/commit/a503af495988a0a65d770758d697475f5b1ac414
Author: Simei Yin (roseline.yin at gmail.com)
Date: 2017-08-03T09:36:30+02:00
Commit Message:
IMAGE: Correct 4-byte image writting pixel format
Changed paths:
image/png.cpp
diff --git a/image/png.cpp b/image/png.cpp
index fc0daf9..cfbcba5 100644
--- a/image/png.cpp
+++ b/image/png.cpp
@@ -250,7 +250,7 @@ bool PNGDecoder::loadStream(Common::SeekableReadStream &stream) {
bool writePNG(Common::WriteStream &out, const Graphics::Surface &input, const bool bottomUp) {
#ifdef USE_PNG
const Graphics::PixelFormat requiredFormat_3byte(3, 8, 8, 8, 0, 16, 8, 0, 0);
- const Graphics::PixelFormat requiredFormat_4byte(4, 8, 8, 8, 8, 16, 8, 0, 24);
+ const Graphics::PixelFormat requiredFormat_4byte(4, 8, 8, 8, 8, 0, 8, 16, 24);
if (input.format.bytesPerPixel == 3) {
if (input.format != requiredFormat_3byte) {
More information about the Scummvm-git-logs
mailing list