aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/wage/design.cpp28
-rw-r--r--engines/wage/design.h25
-rw-r--r--engines/wage/gui.cpp4
-rw-r--r--engines/wage/gui.h45
-rw-r--r--engines/wage/world.cpp2
-rw-r--r--engines/wage/world.h4
6 files changed, 71 insertions, 37 deletions
diff --git a/engines/wage/design.cpp b/engines/wage/design.cpp
index a578a84f79..6255932f37 100644
--- a/engines/wage/design.cpp
+++ b/engines/wage/design.cpp
@@ -55,12 +55,12 @@ namespace Wage {
struct PlotData {
Graphics::ManagedSurface *surface;
- Graphics::Patterns *patterns;
+ Graphics::MacPatterns *patterns;
uint fillType;
int thickness;
Design *design;
- PlotData(Graphics::ManagedSurface *s, Patterns *p, int f, int t, Design *d) :
+ PlotData(Graphics::ManagedSurface *s, Graphics::MacPatterns *p, int f, int t, Design *d) :
surface(s), patterns(p), fillType(f), thickness(t), design(d) {}
};
@@ -85,7 +85,7 @@ Design::~Design() {
delete _surface;
}
-void Design::paint(Graphics::ManagedSurface *surface, Patterns &patterns, int x, int y) {
+void Design::paint(Graphics::ManagedSurface *surface, Graphics::MacPatterns &patterns, int x, int y) {
bool needRender = false;
if (_surface == NULL) {
@@ -141,7 +141,7 @@ void Design::paint(Graphics::ManagedSurface *surface, Patterns &patterns, int x,
}
}
-void Design::render(Patterns &patterns) {
+void Design::render(Graphics::MacPatterns &patterns) {
Common::MemoryReadStream in(_data, _len);
bool needRender = true;
@@ -265,7 +265,7 @@ void drawPixelPlain(int x, int y, int color, void *data) {
}
void Design::drawRect(Graphics::ManagedSurface *surface, Common::ReadStream &in,
- Patterns &patterns, byte fillType, byte borderThickness, byte borderFillType) {
+ Graphics::MacPatterns &patterns, byte fillType, byte borderThickness, byte borderFillType) {
int16 y1 = in.readSint16BE();
int16 x1 = in.readSint16BE();
int16 y2 = in.readSint16BE();
@@ -294,7 +294,7 @@ void Design::drawRect(Graphics::ManagedSurface *surface, Common::ReadStream &in,
}
void Design::drawRoundRect(Graphics::ManagedSurface *surface, Common::ReadStream &in,
- Patterns &patterns, byte fillType, byte borderThickness, byte borderFillType) {
+ Graphics::MacPatterns &patterns, byte fillType, byte borderThickness, byte borderFillType) {
int16 y1 = in.readSint16BE();
int16 x1 = in.readSint16BE();
int16 y2 = in.readSint16BE();
@@ -320,7 +320,7 @@ void Design::drawRoundRect(Graphics::ManagedSurface *surface, Common::ReadStream
}
void Design::drawPolygon(Graphics::ManagedSurface *surface, Common::ReadStream &in,
- Patterns &patterns, byte fillType, byte borderThickness, byte borderFillType) {
+ Graphics::MacPatterns &patterns, byte fillType, byte borderThickness, byte borderFillType) {
byte ignored = in.readSint16BE(); // ignored
@@ -397,7 +397,7 @@ void Design::drawPolygon(Graphics::ManagedSurface *surface, Common::ReadStream &
}
void Design::drawOval(Graphics::ManagedSurface *surface, Common::ReadStream &in,
- Patterns &patterns, byte fillType, byte borderThickness, byte borderFillType) {
+ Graphics::MacPatterns &patterns, byte fillType, byte borderThickness, byte borderFillType) {
int16 y1 = in.readSint16BE();
int16 x1 = in.readSint16BE();
int16 y2 = in.readSint16BE();
@@ -501,11 +501,11 @@ void Design::drawBitmap(Graphics::ManagedSurface *surface, Common::SeekableReadS
tmp.free();
}
-void Design::drawRect(Graphics::ManagedSurface *surface, Common::Rect &rect, int thickness, int color, Patterns &patterns, byte fillType) {
+void Design::drawRect(Graphics::ManagedSurface *surface, Common::Rect &rect, int thickness, int color, Graphics::MacPatterns &patterns, byte fillType) {
drawRect(surface, rect.left, rect.top, rect.right, rect.bottom, thickness, color, patterns, fillType);
}
-void Design::drawRect(Graphics::ManagedSurface *surface, int x1, int y1, int x2, int y2, int thickness, int color, Patterns &patterns, byte fillType) {
+void Design::drawRect(Graphics::ManagedSurface *surface, int x1, int y1, int x2, int y2, int thickness, int color, Graphics::MacPatterns &patterns, byte fillType) {
PlotData pd(surface, &patterns, fillType, thickness, nullptr);
Graphics::drawLine(x1, y1, x2, y1, kColorBlack, drawPixel, &pd);
@@ -515,26 +515,26 @@ void Design::drawRect(Graphics::ManagedSurface *surface, int x1, int y1, int x2,
}
-void Design::drawFilledRect(Graphics::ManagedSurface *surface, Common::Rect &rect, int color, Patterns &patterns, byte fillType) {
+void Design::drawFilledRect(Graphics::ManagedSurface *surface, Common::Rect &rect, int color, Graphics::MacPatterns &patterns, byte fillType) {
PlotData pd(surface, &patterns, fillType, 1, nullptr);
for (int y = rect.top; y <= rect.bottom; y++)
Graphics::drawHLine(rect.left, rect.right, y, color, drawPixel, &pd);
}
-void Design::drawFilledRoundRect(Graphics::ManagedSurface *surface, Common::Rect &rect, int arc, int color, Patterns &patterns, byte fillType) {
+void Design::drawFilledRoundRect(Graphics::ManagedSurface *surface, Common::Rect &rect, int arc, int color, Graphics::MacPatterns &patterns, byte fillType) {
PlotData pd(surface, &patterns, fillType, 1, nullptr);
Graphics::drawRoundRect(rect, arc, color, true, drawPixel, &pd);
}
-void Design::drawHLine(Graphics::ManagedSurface *surface, int x1, int x2, int y, int thickness, int color, Patterns &patterns, byte fillType) {
+void Design::drawHLine(Graphics::ManagedSurface *surface, int x1, int x2, int y, int thickness, int color, Graphics::MacPatterns &patterns, byte fillType) {
PlotData pd(surface, &patterns, fillType, thickness, nullptr);
Graphics::drawHLine(x1, x2, y, color, drawPixel, &pd);
}
-void Design::drawVLine(Graphics::ManagedSurface *surface, int x, int y1, int y2, int thickness, int color, Patterns &patterns, byte fillType) {
+void Design::drawVLine(Graphics::ManagedSurface *surface, int x, int y1, int y2, int thickness, int color, Graphics::MacPatterns &patterns, byte fillType) {
PlotData pd(surface, &patterns, fillType, thickness, nullptr);
Graphics::drawVLine(x, y1, y2, color, drawPixel, &pd);
diff --git a/engines/wage/design.h b/engines/wage/design.h
index 7a422a48f0..948476b43c 100644
--- a/engines/wage/design.h
+++ b/engines/wage/design.h
@@ -56,7 +56,6 @@
namespace Wage {
using namespace Graphics::MacGUIConstants;
-using Graphics::Patterns;
class Design {
public:
@@ -71,14 +70,14 @@ public:
return _bounds;
}
- void paint(Graphics::ManagedSurface *canvas, Graphics::Patterns &patterns, int x, int y);
+ void paint(Graphics::ManagedSurface *canvas, Graphics::MacPatterns &patterns, int x, int y);
bool isPointOpaque(int x, int y);
- static void drawRect(Graphics::ManagedSurface *surface, Common::Rect &rect, int thickness, int color, Graphics::Patterns &patterns, byte fillType);
- static void drawRect(Graphics::ManagedSurface *surface, int x1, int y1, int x2, int y2, int thickness, int color, Graphics::Patterns &patterns, byte fillType);
- static void drawFilledRect(Graphics::ManagedSurface *surface, Common::Rect &rect, int color, Graphics::Patterns &patterns, byte fillType);
- static void drawFilledRoundRect(Graphics::ManagedSurface *surface, Common::Rect &rect, int arc, int color, Graphics::Patterns &patterns, byte fillType);
- static void drawHLine(Graphics::ManagedSurface *surface, int x1, int x2, int y, int thickness, int color, Graphics::Patterns &patterns, byte fillType);
- static void drawVLine(Graphics::ManagedSurface *surface, int x, int y1, int y2, int thickness, int color, Graphics::Patterns &patterns, byte fillType);
+ static void drawRect(Graphics::ManagedSurface *surface, Common::Rect &rect, int thickness, int color, Graphics::MacPatterns &patterns, byte fillType);
+ static void drawRect(Graphics::ManagedSurface *surface, int x1, int y1, int x2, int y2, int thickness, int color, Graphics::MacPatterns &patterns, byte fillType);
+ static void drawFilledRect(Graphics::ManagedSurface *surface, Common::Rect &rect, int color, Graphics::MacPatterns &patterns, byte fillType);
+ static void drawFilledRoundRect(Graphics::ManagedSurface *surface, Common::Rect &rect, int arc, int color, Graphics::MacPatterns &patterns, byte fillType);
+ static void drawHLine(Graphics::ManagedSurface *surface, int x1, int x2, int y, int thickness, int color, Graphics::MacPatterns &patterns, byte fillType);
+ static void drawVLine(Graphics::ManagedSurface *surface, int x, int y1, int y2, int thickness, int color, Graphics::MacPatterns &patterns, byte fillType);
bool isBoundsCalculation() { return _boundsCalculationMode; }
void adjustBounds(int16 x, int16 y);
@@ -91,15 +90,15 @@ private:
bool _boundsCalculationMode;
private:
- void render(Patterns &patterns);
+ void render(Graphics::MacPatterns &patterns);
void drawRect(Graphics::ManagedSurface *surface, Common::ReadStream &in,
- Patterns &patterns, byte fillType, byte borderThickness, byte borderFillType);
+ Graphics::MacPatterns &patterns, byte fillType, byte borderThickness, byte borderFillType);
void drawRoundRect(Graphics::ManagedSurface *surface, Common::ReadStream &in,
- Patterns &patterns, byte fillType, byte borderThickness, byte borderFillType);
+ Graphics::MacPatterns &patterns, byte fillType, byte borderThickness, byte borderFillType);
void drawPolygon(Graphics::ManagedSurface *surface, Common::ReadStream &in,
- Patterns &patterns, byte fillType, byte borderThickness, byte borderFillType);
+ Graphics::MacPatterns &patterns, byte fillType, byte borderThickness, byte borderFillType);
void drawOval(Graphics::ManagedSurface *surface, Common::ReadStream &in,
- Patterns &patterns, byte fillType, byte borderThickness, byte borderFillType);
+ Graphics::MacPatterns &patterns, byte fillType, byte borderThickness, byte borderFillType);
void drawBitmap(Graphics::ManagedSurface *surface, Common::SeekableReadStream &in);
};
diff --git a/engines/wage/gui.cpp b/engines/wage/gui.cpp
index 49f56f3669..a8d22840d9 100644
--- a/engines/wage/gui.cpp
+++ b/engines/wage/gui.cpp
@@ -73,8 +73,8 @@ static const Graphics::MenuData menuSubItems[] = {
{ kMenuFile, "Quit", kMenuActionQuit, 0, true },
{ kMenuEdit, "Undo", kMenuActionUndo, 'Z', false },
- { kMenuEdit, NULL, 0, 0, false },
- { kMenuEdit, "Cut", kMenuActionCut, 'K', false },
+ { kMenuEdit, NULL, 0, 0, false },
+ { kMenuEdit, "Cut", kMenuActionCut, 'K', false },
{ kMenuEdit, "Copy", kMenuActionCopy, 'C', false },
{ kMenuEdit, "Paste", kMenuActionPaste, 'V', false },
{ kMenuEdit, "Clear", kMenuActionClear, 'B', false },
diff --git a/engines/wage/gui.h b/engines/wage/gui.h
index 8536a76fe1..cf30c577c1 100644
--- a/engines/wage/gui.h
+++ b/engines/wage/gui.h
@@ -59,12 +59,9 @@
#include "common/rect.h"
namespace Wage {
-
-// Import the enum definitions
-using namespace Graphics::MacMenuConstants;
-using namespace Graphics::MacWindowConstants;
-using namespace Graphics::MacGUIConstants;
+using namespace Graphics::MacWindowConstants;
+
class Scene;
class WageEngine;
@@ -72,6 +69,44 @@ enum {
kCursorHeight = 12
};
+enum {
+ kFontStyleBold = 1,
+ kFontStyleItalic = 2,
+ kFontStyleUnderline = 4,
+ kFontStyleOutline = 8,
+ kFontStyleShadow = 16,
+ kFontStyleCondensed = 32,
+ kFontStyleExtended = 64
+};
+
+enum {
+ kMenuHighLevel = -1,
+ kMenuAbout = 0,
+ kMenuFile = 1,
+ kMenuEdit = 2,
+ kMenuCommands = 3,
+ kMenuWeapons = 4
+};
+
+enum {
+ kMenuActionAbout,
+ kMenuActionNew,
+ kMenuActionOpen,
+ kMenuActionClose,
+ kMenuActionSave,
+ kMenuActionSaveAs,
+ kMenuActionRevert,
+ kMenuActionQuit,
+
+ kMenuActionUndo,
+ kMenuActionCut,
+ kMenuActionCopy,
+ kMenuActionPaste,
+ kMenuActionClear,
+
+ kMenuActionCommand
+};
+
class Gui {
public:
Gui(WageEngine *engine);
diff --git a/engines/wage/world.cpp b/engines/wage/world.cpp
index 286ecddf4d..acc2a83d97 100644
--- a/engines/wage/world.cpp
+++ b/engines/wage/world.cpp
@@ -75,7 +75,7 @@ World::World(WageEngine *engine) {
_engine = engine;
- _patterns = new Patterns;
+ _patterns = new Graphics::MacPatterns;
}
World::~World() {
diff --git a/engines/wage/world.h b/engines/wage/world.h
index e0e044822c..5c1aaf319e 100644
--- a/engines/wage/world.h
+++ b/engines/wage/world.h
@@ -54,7 +54,7 @@
namespace Wage {
// Import the enum definitions
-using Graphics::Patterns;
+using Graphics::MacPatterns;
class Script;
class Sound;
@@ -92,7 +92,7 @@ public:
ObjArray _orderedObjs;
ChrArray _orderedChrs;
Common::Array<Sound *> _orderedSounds;
- Graphics::Patterns *_patterns;
+ Graphics::MacPatterns *_patterns;
Scene *_storageScene;
Chr *_player;
int _signature;