aboutsummaryrefslogtreecommitdiff
path: root/engines/made
diff options
context:
space:
mode:
Diffstat (limited to 'engines/made')
-rw-r--r--engines/made/configure.engine3
-rw-r--r--engines/made/detection.cpp114
-rw-r--r--engines/made/graphics.cpp4
-rw-r--r--engines/made/made.cpp6
-rw-r--r--engines/made/pmvplayer.cpp2
-rw-r--r--engines/made/screen.cpp8
-rw-r--r--engines/made/screenfx.cpp6
-rw-r--r--engines/made/scriptfuncs.cpp2
-rw-r--r--engines/made/sound.cpp2
9 files changed, 75 insertions, 72 deletions
diff --git a/engines/made/configure.engine b/engines/made/configure.engine
new file mode 100644
index 0000000000..2266712338
--- /dev/null
+++ b/engines/made/configure.engine
@@ -0,0 +1,3 @@
+# This file is included from the main "configure" script
+# add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
+add_engine made "MADE" yes
diff --git a/engines/made/detection.cpp b/engines/made/detection.cpp
index e8b755cb40..c2c866ff34 100644
--- a/engines/made/detection.cpp
+++ b/engines/made/detection.cpp
@@ -211,77 +211,77 @@ static const MadeGameDescription gameDescriptions[] = {
3,
},
- {
- // Return to Zork - Italian CD version 1.2 3/31/95 (installed)
+ {
+ // Return to Zork - Italian CD version 1.2 3/31/95 (installed)
// Patch #2685032 submitted by goodoldgeorg
- {
- "rtz",
- "V1.2, 3/31/95, installed, CD",
- AD_ENTRY1s("rtzcd.dat", "5b86035aed0277f96e3d173542b5364a", 523776),
- Common::IT_ITA,
- Common::kPlatformDOS,
+ {
+ "rtz",
+ "V1.2, 3/31/95, installed, CD",
+ AD_ENTRY1s("rtzcd.dat", "5b86035aed0277f96e3d173542b5364a", 523776),
+ Common::IT_ITA,
+ Common::kPlatformDOS,
ADGF_CD,
GUIO0()
- },
- GID_RTZ,
- 0,
- GF_CD,
- 3,
- },
+ },
+ GID_RTZ,
+ 0,
+ GF_CD,
+ 3,
+ },
{
- // Return to Zork - Italian CD version 1.2 3/31/95
+ // Return to Zork - Italian CD version 1.2 3/31/95
// Patch #2685032 submitted by goodoldgeorg
- {
- "rtz",
- "V1.2, 3/31/95, CD",
- AD_ENTRY1s("rtzcd.red", "946997d8b0aa6cb4e848bad02a1fc3d2", 354971),
- Common::IT_ITA,
- Common::kPlatformDOS,
+ {
+ "rtz",
+ "V1.2, 3/31/95, CD",
+ AD_ENTRY1s("rtzcd.red", "946997d8b0aa6cb4e848bad02a1fc3d2", 354971),
+ Common::IT_ITA,
+ Common::kPlatformDOS,
ADGF_CD,
GUIO0()
- },
- GID_RTZ,
- 0,
- GF_CD_COMPRESSED,
- 3,
- },
-
- {
- // Return to Zork - French CD version 1.2 5/13/95 (installed)
+ },
+ GID_RTZ,
+ 0,
+ GF_CD_COMPRESSED,
+ 3,
+ },
+
+ {
+ // Return to Zork - French CD version 1.2 5/13/95 (installed)
// Patch #2685032 submitted by goodoldgeorg
- {
- "rtz",
- "V1.2, 5/13/95, installed, CD",
- AD_ENTRY1s("rtzcd.dat", "bde8251a8e34e87c54e3f93147d56c9e", 523776),
- Common::FR_FRA,
- Common::kPlatformDOS,
+ {
+ "rtz",
+ "V1.2, 5/13/95, installed, CD",
+ AD_ENTRY1s("rtzcd.dat", "bde8251a8e34e87c54e3f93147d56c9e", 523776),
+ Common::FR_FRA,
+ Common::kPlatformDOS,
ADGF_CD,
GUIO0()
- },
- GID_RTZ,
- 0,
- GF_CD,
- 3,
- },
-
- {
- // Return to Zork - French CD version 1.2 5/13/95
+ },
+ GID_RTZ,
+ 0,
+ GF_CD,
+ 3,
+ },
+
+ {
+ // Return to Zork - French CD version 1.2 5/13/95
// Patch #2685032 submitted by goodoldgeorg
- {
- "rtz",
- "V1.2, 3/31/95, CD",
- AD_ENTRY1s("rtzcd.red", "946997d8b0aa6cb4e848bad02a1fc3d2", 354614),
- Common::FR_FRA,
- Common::kPlatformDOS,
+ {
+ "rtz",
+ "V1.2, 3/31/95, CD",
+ AD_ENTRY1s("rtzcd.red", "946997d8b0aa6cb4e848bad02a1fc3d2", 354614),
+ Common::FR_FRA,
+ Common::kPlatformDOS,
ADGF_CD,
GUIO0()
- },
- GID_RTZ,
- 0,
- GF_CD_COMPRESSED,
- 3,
- },
+ },
+ GID_RTZ,
+ 0,
+ GF_CD_COMPRESSED,
+ 3,
+ },
{
// Return to Zork - English floppy version
diff --git a/engines/made/graphics.cpp b/engines/made/graphics.cpp
index 4d3fc7116a..a8e33774f6 100644
--- a/engines/made/graphics.cpp
+++ b/engines/made/graphics.cpp
@@ -83,7 +83,7 @@ void decompressImage(byte *source, Graphics::Surface &surface, uint16 cmdOffs, u
if ((maskFlags != 0) && (maskFlags != 2) && (pixelFlags != 0) && (pixelFlags != 2) && (cmdFlags != 0))
error("decompressImage() Unsupported flags: cmdFlags = %02X; maskFlags = %02X, pixelFlags = %02X", cmdFlags, maskFlags, pixelFlags);
- byte *destPtr = (byte *)surface.getBasePtr(0, 0);
+ byte *destPtr = (byte *)surface.getPixels();
byte lineBuf[640 * 4];
byte bitBuf[40];
@@ -196,7 +196,7 @@ void decompressMovieImage(byte *source, Graphics::Surface &surface, uint16 cmdOf
byte *maskBuffer = source + maskOffs;
byte *pixelBuffer = source + pixelOffs;
- byte *destPtr = (byte *)surface.getBasePtr(0, 0);
+ byte *destPtr = (byte *)surface.getPixels();
byte bitBuf[40];
diff --git a/engines/made/made.cpp b/engines/made/made.cpp
index 3843040961..3e192cb04c 100644
--- a/engines/made/made.cpp
+++ b/engines/made/made.cpp
@@ -85,7 +85,7 @@ MadeEngine::MadeEngine(OSystem *syst, const MadeGameDescription *gameDesc) : Eng
_script = new ScriptInterpreter(this);
- _music = new MusicPlayer();
+ _music = nullptr;
// Set default sound frequency
switch (getGameID()) {
@@ -102,8 +102,6 @@ MadeEngine::MadeEngine(OSystem *syst, const MadeGameDescription *gameDesc) : Eng
// Return to Zork sets it itself via a script funtion
break;
}
-
- syncSoundSettings();
}
MadeEngine::~MadeEngine() {
@@ -277,6 +275,8 @@ void MadeEngine::handleEvents() {
}
Common::Error MadeEngine::run() {
+ _music = new MusicPlayer();
+ syncSoundSettings();
// Initialize backend
initGraphics(320, 200, false);
diff --git a/engines/made/pmvplayer.cpp b/engines/made/pmvplayer.cpp
index cf450f7e25..573ff7faf1 100644
--- a/engines/made/pmvplayer.cpp
+++ b/engines/made/pmvplayer.cpp
@@ -248,7 +248,7 @@ void PmvPlayer::handleEvents() {
}
void PmvPlayer::updateScreen() {
- _vm->_system->copyRectToScreen(_surface->pixels, _surface->pitch,
+ _vm->_system->copyRectToScreen(_surface->getPixels(), _surface->pitch,
(320 - _surface->w) / 2, (200 - _surface->h) / 2, _surface->w, _surface->h);
_vm->_system->updateScreen();
}
diff --git a/engines/made/screen.cpp b/engines/made/screen.cpp
index ea7d57f82d..30848e8ec1 100644
--- a/engines/made/screen.cpp
+++ b/engines/made/screen.cpp
@@ -344,12 +344,12 @@ void Screen::drawSpriteChannels(const ClipInfo &clipInfo, int16 includeStateMask
void Screen::updateSprites() {
// TODO: This needs some more work, dirty rectangles are currently not used
- memcpy(_workScreen->pixels, _backgroundScreen->pixels, 64000);
+ memcpy(_workScreen->getPixels(), _backgroundScreen->getPixels(), 64000);
drawSpriteChannels(_backgroundScreenDrawCtx, 3, 0);
drawSpriteChannels(_workScreenDrawCtx, 1, 2);
- _vm->_system->copyRectToScreen(_workScreen->pixels, _workScreen->pitch, 0, 0, _workScreen->w, _workScreen->h);
+ _vm->_system->copyRectToScreen(_workScreen->getPixels(), _workScreen->pitch, 0, 0, _workScreen->w, _workScreen->h);
_vm->_screen->updateScreenAndWait(10);
}
@@ -593,7 +593,7 @@ void Screen::show() {
return;
drawSpriteChannels(_backgroundScreenDrawCtx, 3, 0);
- memcpy(_workScreen->pixels, _backgroundScreen->pixels, 64000);
+ memcpy(_workScreen->getPixels(), _backgroundScreen->getPixels(), 64000);
drawSpriteChannels(_workScreenDrawCtx, 1, 2);
_fx->run(_visualEffectNum, _workScreen, _palette, _newPalette, _paletteColorCount);
@@ -775,7 +775,7 @@ void Screen::unlockScreen() {
}
void Screen::showWorkScreen() {
- _vm->_system->copyRectToScreen(_workScreen->pixels, _workScreen->pitch, 0, 0, _workScreen->w, _workScreen->h);
+ _vm->_system->copyRectToScreen(_workScreen->getPixels(), _workScreen->pitch, 0, 0, _workScreen->w, _workScreen->h);
}
void Screen::copyRectToScreen(const void *buf, int pitch, int x, int y, int w, int h) {
diff --git a/engines/made/screenfx.cpp b/engines/made/screenfx.cpp
index ad71f1fb49..b89b3af802 100644
--- a/engines/made/screenfx.cpp
+++ b/engines/made/screenfx.cpp
@@ -165,7 +165,7 @@ void ScreenEffects::flash(int flashCount, byte *palette, int colorCount) {
_screen->setRGBPalette(_fxPalette, 0, colorCount);
_screen->updateScreenAndWait(20);
_screen->setRGBPalette(palette, 0, colorCount);
- _screen->updateScreenAndWait(20);
+ _screen->updateScreenAndWait(20);
}
}
@@ -368,7 +368,7 @@ void ScreenEffects::vfx07(Graphics::Surface *surface, byte *palette, byte *newPa
// "Screen slide in" right to left
void ScreenEffects::vfx08(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount) {
for (int x = 8; x <= 320; x += 8) {
- _screen->copyRectToScreen(surface->getBasePtr(0, 0), surface->pitch, 320 - x, 0, x, 200);
+ _screen->copyRectToScreen(surface->getPixels(), surface->pitch, 320 - x, 0, x, 200);
_screen->updateScreenAndWait(25);
}
setPalette(palette);
@@ -529,7 +529,7 @@ void ScreenEffects::vfx19(Graphics::Surface *surface, byte *palette, byte *newPa
// "Screen slide in" bottom to top
void ScreenEffects::vfx20(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount) {
for (int y = 4; y <= 200; y += 4) {
- _screen->copyRectToScreen(surface->getBasePtr(0, 0), surface->pitch, 0, 200 - y, 320, y);
+ _screen->copyRectToScreen(surface->getPixels(), surface->pitch, 0, 200 - y, 320, y);
_screen->updateScreenAndWait(25);
}
diff --git a/engines/made/scriptfuncs.cpp b/engines/made/scriptfuncs.cpp
index c57778fb71..0e3b50aa98 100644
--- a/engines/made/scriptfuncs.cpp
+++ b/engines/made/scriptfuncs.cpp
@@ -574,7 +574,7 @@ int16 ScriptFunctions::sfLoadMouseCursor(int16 argc, int16 *argv) {
PictureResource *flex = _vm->_res->getPicture(argv[2]);
if (flex) {
Graphics::Surface *surf = flex->getPicture();
- CursorMan.replaceCursor(surf->pixels, surf->w, surf->h, argv[1], argv[0], 0);
+ CursorMan.replaceCursor(surf->getPixels(), surf->w, surf->h, argv[1], argv[0], 0);
_vm->_res->freeResource(flex);
}
return 0;
diff --git a/engines/made/sound.cpp b/engines/made/sound.cpp
index f73c580560..176f8688bd 100644
--- a/engines/made/sound.cpp
+++ b/engines/made/sound.cpp
@@ -228,7 +228,7 @@ void decompressSound(byte *source, byte *dest, uint16 chunkSize, uint16 chunkCou
break;
default:
- return;
+ return;
}