diff options
author | Matthew Hoops | 2011-05-18 18:23:37 -0400 |
---|---|---|
committer | Matthew Hoops | 2011-05-18 18:23:37 -0400 |
commit | d4c92983920cfe3b25a22d91e12c750e591b917e (patch) | |
tree | c0b63318b9ba0e67528337cfaa21515def1c3962 /engines/drascula | |
parent | 7e2edf16b3e2bf1d2b31999979a60802514df6cb (diff) | |
parent | cf107e24be28c7e6db65b5c7ffed120af4a7994b (diff) | |
download | scummvm-rg350-d4c92983920cfe3b25a22d91e12c750e591b917e.tar.gz scummvm-rg350-d4c92983920cfe3b25a22d91e12c750e591b917e.tar.bz2 scummvm-rg350-d4c92983920cfe3b25a22d91e12c750e591b917e.zip |
Merge remote branch 'upstream/master' into pegasus
Diffstat (limited to 'engines/drascula')
-rw-r--r-- | engines/drascula/actors.cpp | 3 | ||||
-rw-r--r-- | engines/drascula/animation.cpp | 3 | ||||
-rw-r--r-- | engines/drascula/console.cpp | 3 | ||||
-rw-r--r-- | engines/drascula/console.h | 3 | ||||
-rw-r--r-- | engines/drascula/converse.cpp | 3 | ||||
-rw-r--r-- | engines/drascula/detection.cpp | 5 | ||||
-rw-r--r-- | engines/drascula/drascula.cpp | 7 | ||||
-rw-r--r-- | engines/drascula/drascula.h | 7 | ||||
-rw-r--r-- | engines/drascula/graphics.cpp | 64 | ||||
-rw-r--r-- | engines/drascula/interface.cpp | 3 | ||||
-rw-r--r-- | engines/drascula/objects.cpp | 3 | ||||
-rw-r--r-- | engines/drascula/palette.cpp | 3 | ||||
-rw-r--r-- | engines/drascula/resource.cpp | 3 | ||||
-rw-r--r-- | engines/drascula/rooms.cpp | 3 | ||||
-rw-r--r-- | engines/drascula/saveload.cpp | 3 | ||||
-rw-r--r-- | engines/drascula/sound.cpp | 3 | ||||
-rw-r--r-- | engines/drascula/talk.cpp | 3 |
17 files changed, 45 insertions, 77 deletions
diff --git a/engines/drascula/actors.cpp b/engines/drascula/actors.cpp index c0b0b7c98b..9d5d6550fa 100644 --- a/engines/drascula/actors.cpp +++ b/engines/drascula/actors.cpp @@ -18,9 +18,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * $URL$ - * $Id$ - * */ #include "drascula/drascula.h" diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp index f939a033d3..c4a8d3eb01 100644 --- a/engines/drascula/animation.cpp +++ b/engines/drascula/animation.cpp @@ -18,9 +18,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * $URL$ - * $Id$ - * */ #include "drascula/drascula.h" diff --git a/engines/drascula/console.cpp b/engines/drascula/console.cpp index aa9fcc0960..d2fd32f2e5 100644 --- a/engines/drascula/console.cpp +++ b/engines/drascula/console.cpp @@ -18,9 +18,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * $URL$ - * $Id$ - * */ #include "drascula/console.h" diff --git a/engines/drascula/console.h b/engines/drascula/console.h index d8d1918a60..894c85ff42 100644 --- a/engines/drascula/console.h +++ b/engines/drascula/console.h @@ -18,9 +18,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * $URL$ - * $Id$ - * */ #ifndef DRASCULA_CONSOLE_H diff --git a/engines/drascula/converse.cpp b/engines/drascula/converse.cpp index dcd93d84d7..6f028e6e12 100644 --- a/engines/drascula/converse.cpp +++ b/engines/drascula/converse.cpp @@ -18,9 +18,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * $URL$ - * $Id$ - * */ #include "common/textconsole.h" diff --git a/engines/drascula/detection.cpp b/engines/drascula/detection.cpp index 8729290d52..5a8903db9d 100644 --- a/engines/drascula/detection.cpp +++ b/engines/drascula/detection.cpp @@ -18,9 +18,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * $URL$ - * $Id$ - * */ #include "base/plugins.h" @@ -299,7 +296,7 @@ public: DrasculaMetaEngine() : AdvancedMetaEngine(detectionParams) {} virtual const char *getName() const { - return "Drascula Engine"; + return "Drascula"; } virtual const char *getOriginalCopyright() const { diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index 470f28ccff..cac7f93f12 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -18,13 +18,9 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * $URL$ - * $Id$ - * */ #include "common/events.h" -#include "common/EventRecorder.h" #include "common/keyboard.h" #include "common/file.h" #include "common/savefile.h" @@ -100,8 +96,7 @@ DrasculaEngine::DrasculaEngine(OSystem *syst, const DrasculaGameDescription *gam rightMouseButton = 0; *textName = 0; - _rnd = new Common::RandomSource(); - g_eventRec.registerRandomSource(*_rnd, "drascula"); + _rnd = new Common::RandomSource("drascula"); _console = 0; diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index ac3f86b9ba..f9dcbe2810 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -18,9 +18,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * $URL$ - * $Id$ - * */ #ifndef DRASCULA_H @@ -573,8 +570,8 @@ public: void enterName(); bool soundIsActive(); void waitFrameSSN(); - void mixVideo(byte *OldScreen, byte *NewScreen); - void decodeRLE(byte *BufferRLE, byte *MiVideoRLE); + void mixVideo(byte *OldScreen, byte *NewScreen, uint16 oldPitch); + void decodeRLE(byte *BufferRLE, byte *MiVideoRLE, uint16 pitch = 320); void decodeOffset(byte *BufferOFF, byte *MiVideoOFF, int length); int playFrameSSN(Common::SeekableReadStream *stream); diff --git a/engines/drascula/graphics.cpp b/engines/drascula/graphics.cpp index 4cd91e48a0..d133b3609d 100644 --- a/engines/drascula/graphics.cpp +++ b/engines/drascula/graphics.cpp @@ -18,9 +18,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * $URL$ - * $Id$ - * */ #include "drascula/drascula.h" @@ -134,14 +131,18 @@ void DrasculaEngine::showFrame(Common::SeekableReadStream *stream, bool firstFra } byte *prevFrame = (byte *)malloc(64000); - byte *screenBuffer = (byte *)_system->lockScreen()->pixels; - memcpy(prevFrame, screenBuffer, 64000); + Graphics::Surface *screenSurf = _system->lockScreen(); + byte *screenBuffer = (byte *)screenSurf->pixels; + uint16 screenPitch = screenSurf->pitch; + for (int y = 0; y < 200; y++) { + memcpy(prevFrame+y*320, screenBuffer+y*screenPitch, 320); + } - decodeRLE(pcxData, screenBuffer); + decodeRLE(pcxData, screenBuffer, screenPitch); free(pcxData); if (!firstFrame) - mixVideo(screenBuffer, prevFrame); + mixVideo(screenBuffer, prevFrame, screenPitch); _system->unlockScreen(); _system->updateScreen(); @@ -446,7 +447,9 @@ void DrasculaEngine::screenSaver() { int x1_, y1_, off1, off2; - byte *screenBuffer = (byte *)_system->lockScreen()->pixels; + Graphics::Surface *screenSurf = _system->lockScreen(); + byte *screenBuffer = (byte *)screenSurf->pixels; + uint16 screenPitch = screenSurf->pitch; for (int i = 0; i < 200; i++) { for (int j = 0; j < 320; j++) { x1_ = j + tempRow[i]; @@ -464,7 +467,7 @@ void DrasculaEngine::screenSaver() { y1_ = checkWrapY(y1_); off2 = 320 * y1_ + x1_; - screenBuffer[320 * i + j] = ghost[bgSurface[off2] + (copia[off1] << 8)]; + screenBuffer[screenPitch * i + j] = ghost[bgSurface[off2] + (copia[off1] << 8)]; } } @@ -533,11 +536,14 @@ int DrasculaEngine::playFrameSSN(Common::SeekableReadStream *stream) { free(BufferSSN); waitFrameSSN(); - byte *screenBuffer = (byte *)_system->lockScreen()->pixels; + Graphics::Surface *screenSurf = _system->lockScreen(); + byte *screenBuffer = (byte *)screenSurf->pixels; + uint16 screenPitch = screenSurf->pitch; if (FrameSSN) - mixVideo(screenBuffer, screenSurface); + mixVideo(screenBuffer, screenSurface, screenPitch); else - memcpy(screenBuffer, screenSurface, 64000); + for (int y = 0; y < 200; y++) + memcpy(screenBuffer+y*screenPitch, screenSurface+y*320, 320); _system->unlockScreen(); _system->updateScreen(); @@ -549,11 +555,14 @@ int DrasculaEngine::playFrameSSN(Common::SeekableReadStream *stream) { decodeOffset(BufferSSN, screenSurface, length); free(BufferSSN); waitFrameSSN(); - byte *screenBuffer = (byte *)_system->lockScreen()->pixels; + Graphics::Surface *screenSurf = _system->lockScreen(); + byte *screenBuffer = (byte *)screenSurf->pixels; + uint16 screenPitch = screenSurf->pitch; if (FrameSSN) - mixVideo(screenBuffer, screenSurface); + mixVideo(screenBuffer, screenSurface, screenPitch); else - memcpy(screenBuffer, screenSurface, 64000); + for (int y = 0; y < 200; y++) + memcpy(screenBuffer+y*screenPitch, screenSurface+y*320, 320); _system->unlockScreen(); _system->updateScreen(); @@ -589,11 +598,12 @@ void DrasculaEngine::decodeOffset(byte *BufferOFF, byte *MiVideoOFF, int length) } } -void DrasculaEngine::decodeRLE(byte* srcPtr, byte* dstPtr) { + void DrasculaEngine::decodeRLE(byte* srcPtr, byte* dstPtr, uint16 pitch) { bool stopProcessing = false; byte pixel; uint repeat; - int curByte = 0; + int curByte = 0, curLine = 0; + pitch -= 320; while (!stopProcessing) { pixel = *srcPtr++; @@ -604,17 +614,25 @@ void DrasculaEngine::decodeRLE(byte* srcPtr, byte* dstPtr) { } for (uint j = 0; j < repeat; j++) { *dstPtr++ = pixel; - if (++curByte >= 64000) { - stopProcessing = true; - break; + if (++curByte >= 320) { + curByte = 0; + dstPtr += pitch; + if (++curLine >= 200) { + stopProcessing = true; + break; + } } } } } -void DrasculaEngine::mixVideo(byte *OldScreen, byte *NewScreen) { - for (int x = 0; x < 64000; x++) - OldScreen[x] ^= NewScreen[x]; +void DrasculaEngine::mixVideo(byte *OldScreen, byte *NewScreen, uint16 oldPitch) { + for (int y = 0; y < 200; y++) { + for (int x = 0; x < 320; x++) + OldScreen[x] ^= NewScreen[x]; + OldScreen += oldPitch; + NewScreen += 320; + } } void DrasculaEngine::waitFrameSSN() { diff --git a/engines/drascula/interface.cpp b/engines/drascula/interface.cpp index 7bb94c2542..eb36baed18 100644 --- a/engines/drascula/interface.cpp +++ b/engines/drascula/interface.cpp @@ -18,9 +18,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * $URL$ - * $Id$ - * */ #include "drascula/drascula.h" diff --git a/engines/drascula/objects.cpp b/engines/drascula/objects.cpp index 630eb08d3c..07b8464de4 100644 --- a/engines/drascula/objects.cpp +++ b/engines/drascula/objects.cpp @@ -18,9 +18,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * $URL$ - * $Id$ - * */ #include "common/textconsole.h" diff --git a/engines/drascula/palette.cpp b/engines/drascula/palette.cpp index a75e72e249..500333badf 100644 --- a/engines/drascula/palette.cpp +++ b/engines/drascula/palette.cpp @@ -18,9 +18,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * $URL$ - * $Id$ - * */ #include "graphics/palette.h" diff --git a/engines/drascula/resource.cpp b/engines/drascula/resource.cpp index cca1e47586..bda25113b7 100644 --- a/engines/drascula/resource.cpp +++ b/engines/drascula/resource.cpp @@ -18,9 +18,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * $URL$ - * $Id$ - * */ #include "drascula/drascula.h" diff --git a/engines/drascula/rooms.cpp b/engines/drascula/rooms.cpp index 35d4eedb5d..50d44bab79 100644 --- a/engines/drascula/rooms.cpp +++ b/engines/drascula/rooms.cpp @@ -18,9 +18,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * $URL$ - * $Id$ - * */ #include "common/array.h" diff --git a/engines/drascula/saveload.cpp b/engines/drascula/saveload.cpp index eacbe6756d..15f5855bdc 100644 --- a/engines/drascula/saveload.cpp +++ b/engines/drascula/saveload.cpp @@ -18,9 +18,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * $URL$ - * $Id$ - * */ #include "common/textconsole.h" diff --git a/engines/drascula/sound.cpp b/engines/drascula/sound.cpp index 5cb1c4486a..4721d2d369 100644 --- a/engines/drascula/sound.cpp +++ b/engines/drascula/sound.cpp @@ -18,9 +18,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * $URL$ - * $Id$ - * */ #include "audio/audiostream.h" diff --git a/engines/drascula/talk.cpp b/engines/drascula/talk.cpp index 8cefe0385c..6d1509fe3c 100644 --- a/engines/drascula/talk.cpp +++ b/engines/drascula/talk.cpp @@ -18,9 +18,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * $URL$ - * $Id$ - * */ #include "drascula/drascula.h" |