From 2e095e25f2435f0d066d2826176e394bda5c4a9c Mon Sep 17 00:00:00 2001 From: Max Horn Date: Thu, 14 Apr 2011 14:34:28 +0200 Subject: ALL: centre -> center --- engines/agos/agos.h | 4 ++-- engines/agos/debug.h | 2 +- engines/agos/script_dp.cpp | 2 +- engines/agos/script_ff.cpp | 6 +++--- engines/agos/vga_ff.cpp | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) (limited to 'engines/agos') diff --git a/engines/agos/agos.h b/engines/agos/agos.h index bf51b31c43..1d9602f639 100644 --- a/engines/agos/agos.h +++ b/engines/agos/agos.h @@ -1140,7 +1140,7 @@ protected: int getScale(int16 y, int16 x); void checkScrollX(int16 x, int16 xpos); void checkScrollY(int16 y, int16 ypos); - void centreScroll(); + void centerScroll(); virtual void clearVideoWindow(uint16 windowNum, uint16 color); void clearVideoBackGround(uint16 windowNum, uint16 color); @@ -1921,7 +1921,7 @@ public: void off_mouseOff(); void off_loadVideo(); void off_playVideo(); - void off_centreScroll(); + void off_centerScroll(); void off_resetPVCount(); void off_setPathValues(); void off_stopClock(); diff --git a/engines/agos/debug.h b/engines/agos/debug.h index 38674de765..5865065ac3 100644 --- a/engines/agos/debug.h +++ b/engines/agos/debug.h @@ -2058,7 +2058,7 @@ static const char *const feeblefiles_opcodeNameTable[256] = { "W|UNLOAD_ZONE", NULL, "|UNFREEZE_ZONES", - "|CENTRE_SCROLL", + "|CENTER_SCROLL", /* 188 */ "BSJ|STRING2_IS", "|CLEAR_MARKS", diff --git a/engines/agos/script_dp.cpp b/engines/agos/script_dp.cpp index 57610017a1..6eb3ca4779 100644 --- a/engines/agos/script_dp.cpp +++ b/engines/agos/script_dp.cpp @@ -271,7 +271,7 @@ void AGOSEngine_DIMP::setupOpcodes() { OPCODE(os1_unloadZone), OPCODE(o_invalid), OPCODE(os1_unfreezeZones), - OPCODE(off_centreScroll), + OPCODE(off_centerScroll), /* 188 */ OPCODE(os2_isShortText), OPCODE(os2_clearMarks), diff --git a/engines/agos/script_ff.cpp b/engines/agos/script_ff.cpp index dbd89cebf5..8dfee7f7c7 100644 --- a/engines/agos/script_ff.cpp +++ b/engines/agos/script_ff.cpp @@ -272,7 +272,7 @@ void AGOSEngine_Feeble::setupOpcodes() { OPCODE(os1_unloadZone), OPCODE(o_invalid), OPCODE(os1_unfreezeZones), - OPCODE(off_centreScroll), + OPCODE(off_centerScroll), /* 188 */ OPCODE(os2_isShortText), OPCODE(os2_clearMarks), @@ -590,9 +590,9 @@ void AGOSEngine_Feeble::off_playVideo() { } } -void AGOSEngine_Feeble::off_centreScroll() { +void AGOSEngine_Feeble::off_centerScroll() { // 187 - centreScroll(); + centerScroll(); } void AGOSEngine_Feeble::off_resetPVCount() { diff --git a/engines/agos/vga_ff.cpp b/engines/agos/vga_ff.cpp index 38a3479292..14a1c60ae5 100644 --- a/engines/agos/vga_ff.cpp +++ b/engines/agos/vga_ff.cpp @@ -201,7 +201,7 @@ void AGOSEngine::vc78_computeXY() { if (getGameType() == GType_FF) { setBitFlag(85, false); if (getBitFlag(74)) { - centreScroll(); + centerScroll(); } } } @@ -348,7 +348,7 @@ void AGOSEngine::checkScrollY(int16 y, int16 ypos) { } } -void AGOSEngine::centreScroll() { +void AGOSEngine::centerScroll() { int16 x, y, tmp; if (_scrollXMax != 0) { -- cgit v1.2.3 From 2e0db94f0444f6523183e53463b83ec506a00f8b Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sun, 17 Apr 2011 16:25:10 +0200 Subject: AGOS: Prefer Surface::create taking a PixelFormat over the one taking a byte depth. --- engines/agos/agos.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'engines/agos') diff --git a/engines/agos/agos.cpp b/engines/agos/agos.cpp index 498c7e4961..30c67093ba 100644 --- a/engines/agos/agos.cpp +++ b/engines/agos/agos.cpp @@ -568,33 +568,33 @@ Common::Error AGOSEngine::init() { // allocate buffers _backGroundBuf = new Graphics::Surface(); - _backGroundBuf->create(_screenWidth, _screenHeight, 1); + _backGroundBuf->create(_screenWidth, _screenHeight, Graphics::PixelFormat::createFormatCLUT8()); if (getGameType() == GType_FF || getGameType() == GType_PP) { _backBuf = new Graphics::Surface(); - _backBuf->create(_screenWidth, _screenHeight, 1); + _backBuf->create(_screenWidth, _screenHeight, Graphics::PixelFormat::createFormatCLUT8()); _scaleBuf = new Graphics::Surface(); - _scaleBuf->create(_screenWidth, _screenHeight, 1); + _scaleBuf->create(_screenWidth, _screenHeight, Graphics::PixelFormat::createFormatCLUT8()); } if (getGameType() == GType_SIMON2) { _window4BackScn = new Graphics::Surface(); - _window4BackScn->create(_screenWidth, _screenHeight, 1); + _window4BackScn->create(_screenWidth, _screenHeight, Graphics::PixelFormat::createFormatCLUT8()); } else if (getGameType() == GType_SIMON1) { _window4BackScn = new Graphics::Surface(); - _window4BackScn->create(_screenWidth, 134, 1); + _window4BackScn->create(_screenWidth, 134, Graphics::PixelFormat::createFormatCLUT8()); } else if (getGameType() == GType_WW || getGameType() == GType_ELVIRA2) { _window4BackScn = new Graphics::Surface(); - _window4BackScn->create(224, 127, 1); + _window4BackScn->create(224, 127, Graphics::PixelFormat::createFormatCLUT8()); } else if (getGameType() == GType_ELVIRA1) { _window4BackScn = new Graphics::Surface(); if (getPlatform() == Common::kPlatformAmiga && (getFeatures() & GF_DEMO)) { - _window4BackScn->create(224, 196, 1); + _window4BackScn->create(224, 196, Graphics::PixelFormat::createFormatCLUT8()); } else { - _window4BackScn->create(224, 144, 1); + _window4BackScn->create(224, 144, Graphics::PixelFormat::createFormatCLUT8()); } _window6BackScn = new Graphics::Surface(); - _window6BackScn->create(48, 80, 1); + _window6BackScn->create(48, 80, Graphics::PixelFormat::createFormatCLUT8()); } setupGame(); -- cgit v1.2.3 From 73f04118f3d03e25fa1139cfea2b1330f0098bd4 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Mon, 18 Apr 2011 17:39:31 +0200 Subject: COMMON: Rename Error to ErrorCode, introduce new Error class --- engines/agos/agos.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/agos') diff --git a/engines/agos/agos.h b/engines/agos/agos.h index 1d9602f639..735920e427 100644 --- a/engines/agos/agos.h +++ b/engines/agos/agos.h @@ -186,7 +186,7 @@ class AGOSEngine : public Engine { virtual Common::Error run() { Common::Error err; err = init(); - if (err != Common::kNoError) + if (err.getCode() != Common::kNoError) return err; return go(); } -- cgit v1.2.3 From cd6ee0589d0556d3d9e81d835c8b900636083de5 Mon Sep 17 00:00:00 2001 From: Ori Avtalion Date: Mon, 25 Apr 2011 22:29:26 +0300 Subject: JANITORIAL: Format forward declarations to follow convention --- engines/agos/midi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/agos') diff --git a/engines/agos/midi.h b/engines/agos/midi.h index ad69a3ddde..40f54dbaf0 100644 --- a/engines/agos/midi.h +++ b/engines/agos/midi.h @@ -31,7 +31,7 @@ #include "common/mutex.h" namespace Common { - class File; +class File; } namespace AGOS { -- cgit v1.2.3 From 9414d7a6e287ff8abfb5746b564e92c8f0e6de58 Mon Sep 17 00:00:00 2001 From: Ori Avtalion Date: Sun, 24 Apr 2011 11:34:27 +0300 Subject: JANITORIAL: Reduce header dependencies in shared code Some backends may break as I only compiled SDL --- engines/agos/agos.cpp | 4 +--- engines/agos/agos.h | 1 + engines/agos/animation.cpp | 2 ++ engines/agos/charset-fontdata.cpp | 1 + engines/agos/debug.cpp | 1 + engines/agos/detection.cpp | 1 + engines/agos/draw.cpp | 1 + engines/agos/event.cpp | 1 + engines/agos/gfx.cpp | 1 + engines/agos/icons.cpp | 4 ++-- engines/agos/items.cpp | 1 + engines/agos/menus.cpp | 1 + engines/agos/midi.cpp | 1 + engines/agos/midiparser_s1d.cpp | 1 + engines/agos/res.cpp | 1 + engines/agos/res_snd.cpp | 1 + engines/agos/rooms.cpp | 1 + engines/agos/saveload.cpp | 1 + engines/agos/script.cpp | 1 + engines/agos/script_pn.cpp | 2 ++ engines/agos/script_s1.cpp | 2 ++ engines/agos/script_s2.cpp | 2 ++ engines/agos/sound.cpp | 1 + engines/agos/string.cpp | 1 + engines/agos/string_pn.cpp | 2 ++ engines/agos/subroutine.cpp | 1 + engines/agos/vga.cpp | 1 + engines/agos/vga_e2.cpp | 1 + engines/agos/vga_ww.cpp | 1 + engines/agos/window.cpp | 1 + 30 files changed, 36 insertions(+), 5 deletions(-) (limited to 'engines/agos') diff --git a/engines/agos/agos.cpp b/engines/agos/agos.cpp index 498c7e4961..94346e2f90 100644 --- a/engines/agos/agos.cpp +++ b/engines/agos/agos.cpp @@ -25,9 +25,9 @@ #include "common/config-manager.h" #include "common/EventRecorder.h" -#include "common/events.h" #include "common/file.h" #include "common/fs.h" +#include "common/textconsole.h" #include "common/system.h" #include "engines/util.h" @@ -35,14 +35,12 @@ #include "agos/debugger.h" #include "agos/intern.h" #include "agos/agos.h" -#include "agos/vga.h" #include "backends/audiocd/audiocd.h" #include "graphics/surface.h" #include "audio/mididrv.h" -#include "audio/mods/protracker.h" namespace AGOS { diff --git a/engines/agos/agos.h b/engines/agos/agos.h index 735920e427..aecf2437a7 100644 --- a/engines/agos/agos.h +++ b/engines/agos/agos.h @@ -29,6 +29,7 @@ #include "engines/engine.h" #include "common/array.h" +#include "common/error.h" #include "common/keyboard.h" #include "common/random.h" #include "common/rect.h" diff --git a/engines/agos/animation.cpp b/engines/agos/animation.cpp index acdc0084c4..ee47f62a58 100644 --- a/engines/agos/animation.cpp +++ b/engines/agos/animation.cpp @@ -31,8 +31,10 @@ #include "common/events.h" #include "common/file.h" #include "common/system.h" +#include "common/textconsole.h" #include "graphics/cursorman.h" +#include "graphics/palette.h" #include "graphics/surface.h" #include "agos/animation.h" diff --git a/engines/agos/charset-fontdata.cpp b/engines/agos/charset-fontdata.cpp index a477b3dedc..a131bb841b 100644 --- a/engines/agos/charset-fontdata.cpp +++ b/engines/agos/charset-fontdata.cpp @@ -26,6 +26,7 @@ #include "common/system.h" +#include "common/textconsole.h" #include "agos/agos.h" #include "agos/intern.h" diff --git a/engines/agos/debug.cpp b/engines/agos/debug.cpp index d0dc8cc42e..bb27557a6b 100644 --- a/engines/agos/debug.cpp +++ b/engines/agos/debug.cpp @@ -27,6 +27,7 @@ #include "common/file.h" +#include "common/textconsole.h" #include "agos/debug.h" #include "agos/agos.h" diff --git a/engines/agos/detection.cpp b/engines/agos/detection.cpp index 646e63dacf..c8c70c0ecc 100644 --- a/engines/agos/detection.cpp +++ b/engines/agos/detection.cpp @@ -29,6 +29,7 @@ #include "common/config-manager.h" #include "common/savefile.h" #include "common/system.h" +#include "common/textconsole.h" #include "agos/intern.h" #include "agos/agos.h" diff --git a/engines/agos/draw.cpp b/engines/agos/draw.cpp index 317c68d31a..6b9f65ee2b 100644 --- a/engines/agos/draw.cpp +++ b/engines/agos/draw.cpp @@ -28,6 +28,7 @@ #include "common/system.h" #include "graphics/surface.h" +#include "graphics/palette.h" #include "agos/agos.h" #include "agos/intern.h" diff --git a/engines/agos/event.cpp b/engines/agos/event.cpp index fc0b4f96cd..8799dbaa28 100644 --- a/engines/agos/event.cpp +++ b/engines/agos/event.cpp @@ -32,6 +32,7 @@ #include "common/events.h" #include "common/system.h" +#include "common/textconsole.h" #include "backends/audiocd/audiocd.h" diff --git a/engines/agos/gfx.cpp b/engines/agos/gfx.cpp index 710c9ddd7e..4c998dfa5f 100644 --- a/engines/agos/gfx.cpp +++ b/engines/agos/gfx.cpp @@ -26,6 +26,7 @@ #include "common/system.h" +#include "common/textconsole.h" #include "graphics/surface.h" diff --git a/engines/agos/icons.cpp b/engines/agos/icons.cpp index ca603db1fa..39a7705c54 100644 --- a/engines/agos/icons.cpp +++ b/engines/agos/icons.cpp @@ -25,9 +25,9 @@ -#include "common/system.h" - #include "common/file.h" +#include "common/system.h" +#include "common/textconsole.h" #include "graphics/surface.h" diff --git a/engines/agos/items.cpp b/engines/agos/items.cpp index 81da5264ba..5d1523bbd5 100644 --- a/engines/agos/items.cpp +++ b/engines/agos/items.cpp @@ -26,6 +26,7 @@ #include "common/file.h" +#include "common/textconsole.h" #include "agos/intern.h" #include "agos/agos.h" diff --git a/engines/agos/menus.cpp b/engines/agos/menus.cpp index 5629a1dca6..2b103a75cb 100644 --- a/engines/agos/menus.cpp +++ b/engines/agos/menus.cpp @@ -27,6 +27,7 @@ #include "common/file.h" #include "common/system.h" +#include "common/textconsole.h" #include "graphics/surface.h" diff --git a/engines/agos/midi.cpp b/engines/agos/midi.cpp index a37c96a787..26e2f2c736 100644 --- a/engines/agos/midi.cpp +++ b/engines/agos/midi.cpp @@ -28,6 +28,7 @@ #include "common/config-manager.h" #include "common/file.h" #include "common/system.h" +#include "common/textconsole.h" #include "agos/agos.h" diff --git a/engines/agos/midiparser_s1d.cpp b/engines/agos/midiparser_s1d.cpp index 156dc6ecaa..f96518b5e9 100644 --- a/engines/agos/midiparser_s1d.cpp +++ b/engines/agos/midiparser_s1d.cpp @@ -25,6 +25,7 @@ #include "common/debug.h" #include "common/util.h" +#include "common/textconsole.h" #include "audio/mididrv.h" #include "audio/midiparser.h" diff --git a/engines/agos/res.cpp b/engines/agos/res.cpp index b8409669ee..0e818963e2 100644 --- a/engines/agos/res.cpp +++ b/engines/agos/res.cpp @@ -28,6 +28,7 @@ #include "common/file.h" #include "common/memstream.h" +#include "common/textconsole.h" #include "common/util.h" #include "agos/agos.h" diff --git a/engines/agos/res_snd.cpp b/engines/agos/res_snd.cpp index fe09e746ff..34deff37ab 100644 --- a/engines/agos/res_snd.cpp +++ b/engines/agos/res_snd.cpp @@ -26,6 +26,7 @@ #include "common/config-manager.h" #include "common/file.h" #include "common/memstream.h" +#include "common/textconsole.h" #include "agos/intern.h" #include "agos/agos.h" diff --git a/engines/agos/rooms.cpp b/engines/agos/rooms.cpp index a2eff06fcc..0993197594 100644 --- a/engines/agos/rooms.cpp +++ b/engines/agos/rooms.cpp @@ -26,6 +26,7 @@ #include "common/file.h" +#include "common/textconsole.h" #include "agos/agos.h" #include "agos/intern.h" diff --git a/engines/agos/saveload.cpp b/engines/agos/saveload.cpp index eefa2460ec..d6f25814bb 100644 --- a/engines/agos/saveload.cpp +++ b/engines/agos/saveload.cpp @@ -26,6 +26,7 @@ #include "common/file.h" #include "common/savefile.h" #include "common/system.h" +#include "common/textconsole.h" #include "common/translation.h" #include "gui/about.h" diff --git a/engines/agos/script.cpp b/engines/agos/script.cpp index 90992b52fe..94a3f371cc 100644 --- a/engines/agos/script.cpp +++ b/engines/agos/script.cpp @@ -28,6 +28,7 @@ #include "common/system.h" +#include "common/textconsole.h" #include "agos/animation.h" #include "agos/agos.h" diff --git a/engines/agos/script_pn.cpp b/engines/agos/script_pn.cpp index 909c051362..b8ba7fb015 100644 --- a/engines/agos/script_pn.cpp +++ b/engines/agos/script_pn.cpp @@ -26,6 +26,8 @@ #include "agos/agos.h" #include "agos/vga.h" +#include "common/textconsole.h" + namespace AGOS { enum { diff --git a/engines/agos/script_s1.cpp b/engines/agos/script_s1.cpp index 05a725cb50..dab0302631 100644 --- a/engines/agos/script_s1.cpp +++ b/engines/agos/script_s1.cpp @@ -26,6 +26,8 @@ #include "common/system.h" +#include "graphics/palette.h" + #include "agos/agos.h" #ifdef _WIN32_WCE diff --git a/engines/agos/script_s2.cpp b/engines/agos/script_s2.cpp index dd525163c7..a0b14525f2 100644 --- a/engines/agos/script_s2.cpp +++ b/engines/agos/script_s2.cpp @@ -27,6 +27,8 @@ #include "agos/agos.h" +#include "common/textconsole.h" + namespace AGOS { #define OPCODE(x) _OPCODE(AGOSEngine_Simon2, x) diff --git a/engines/agos/sound.cpp b/engines/agos/sound.cpp index 35301793bf..25d861acb5 100644 --- a/engines/agos/sound.cpp +++ b/engines/agos/sound.cpp @@ -25,6 +25,7 @@ #include "common/file.h" #include "common/memstream.h" +#include "common/textconsole.h" #include "common/util.h" #include "agos/agos.h" diff --git a/engines/agos/string.cpp b/engines/agos/string.cpp index bda605a84a..1152d6ed04 100644 --- a/engines/agos/string.cpp +++ b/engines/agos/string.cpp @@ -26,6 +26,7 @@ #include "common/file.h" +#include "common/textconsole.h" #include "gui/about.h" #include "gui/message.h" diff --git a/engines/agos/string_pn.cpp b/engines/agos/string_pn.cpp index a4e40d8306..92d85ab96c 100644 --- a/engines/agos/string_pn.cpp +++ b/engines/agos/string_pn.cpp @@ -26,6 +26,8 @@ #include "agos/agos.h" #include "agos/intern.h" +#include "common/textconsole.h" + namespace AGOS { uint32 AGOSEngine_PN::ftext(uint32 base, int n) { diff --git a/engines/agos/subroutine.cpp b/engines/agos/subroutine.cpp index 733d40e52d..bd07596a46 100644 --- a/engines/agos/subroutine.cpp +++ b/engines/agos/subroutine.cpp @@ -26,6 +26,7 @@ #include "common/file.h" +#include "common/textconsole.h" #include "agos/agos.h" #include "agos/intern.h" diff --git a/engines/agos/vga.cpp b/engines/agos/vga.cpp index 83ee05036c..6c07db13c1 100644 --- a/engines/agos/vga.cpp +++ b/engines/agos/vga.cpp @@ -31,6 +31,7 @@ #include "agos/vga.h" #include "common/system.h" +#include "common/textconsole.h" #include "graphics/surface.h" diff --git a/engines/agos/vga_e2.cpp b/engines/agos/vga_e2.cpp index b0431db801..9e163ba91f 100644 --- a/engines/agos/vga_e2.cpp +++ b/engines/agos/vga_e2.cpp @@ -32,6 +32,7 @@ #include "common/system.h" #include "graphics/surface.h" +#include "graphics/palette.h" namespace AGOS { diff --git a/engines/agos/vga_ww.cpp b/engines/agos/vga_ww.cpp index 8aecd3448a..08b2cee303 100644 --- a/engines/agos/vga_ww.cpp +++ b/engines/agos/vga_ww.cpp @@ -32,6 +32,7 @@ #include "common/system.h" #include "graphics/surface.h" +#include "graphics/palette.h" namespace AGOS { diff --git a/engines/agos/window.cpp b/engines/agos/window.cpp index a03c7e178a..08680c9e45 100644 --- a/engines/agos/window.cpp +++ b/engines/agos/window.cpp @@ -26,6 +26,7 @@ #include "common/system.h" +#include "common/textconsole.h" #include "graphics/surface.h" -- cgit v1.2.3