aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authoruruk2013-07-24 17:02:08 +0200
committeruruk2013-07-24 17:02:08 +0200
commitbc5b3fbb65cc902d9ac2b44f3038f9543342ee96 (patch)
tree35c3f86b100b7cd2837fcde8e462e58ae5ebb6dc /engines
parent0d6a327f98b1c4d02d78927f78f2865c000bf816 (diff)
downloadscummvm-rg350-bc5b3fbb65cc902d9ac2b44f3038f9543342ee96.tar.gz
scummvm-rg350-bc5b3fbb65cc902d9ac2b44f3038f9543342ee96.tar.bz2
scummvm-rg350-bc5b3fbb65cc902d9ac2b44f3038f9543342ee96.zip
AVALANCHE: Rename Graph to Graphics. Update everything accordingly.
Diffstat (limited to 'engines')
-rw-r--r--engines/avalanche/avalanche.h4
-rw-r--r--engines/avalanche/avalot.cpp2
-rw-r--r--engines/avalanche/graphics.cpp (renamed from engines/avalanche/graph.cpp)28
-rw-r--r--engines/avalanche/graphics.h (renamed from engines/avalanche/graph.h)6
-rw-r--r--engines/avalanche/lucerna2.cpp4
-rw-r--r--engines/avalanche/module.mk2
-rw-r--r--engines/avalanche/trip6.h2
7 files changed, 24 insertions, 24 deletions
diff --git a/engines/avalanche/avalanche.h b/engines/avalanche/avalanche.h
index fac36b4217..122959ee27 100644
--- a/engines/avalanche/avalanche.h
+++ b/engines/avalanche/avalanche.h
@@ -30,7 +30,7 @@
#include "avalanche/console.h"
-#include "avalanche/graph.h"
+#include "avalanche/graphics.h"
#include "avalanche/avalot.h"
#include "avalanche/gyro2.h"
@@ -65,7 +65,7 @@ static const int kSavegameVersion = 1;
class AvalancheEngine : public Engine {
public:
- Graph _graph;
+ Graphics _graph;
Avalot _avalot;
Gyro _gyro;
diff --git a/engines/avalanche/avalot.cpp b/engines/avalanche/avalot.cpp
index f9b6a1fcf5..2f62dc1712 100644
--- a/engines/avalanche/avalot.cpp
+++ b/engines/avalanche/avalot.cpp
@@ -29,7 +29,7 @@
#include "avalanche/avalanche.h"
-#include "avalanche/graph.h"
+#include "avalanche/graphics.h"
#include "avalanche/avalot.h"
#include "avalanche/gyro2.h"
#include "avalanche/trip6.h"
diff --git a/engines/avalanche/graph.cpp b/engines/avalanche/graphics.cpp
index b3d5012353..aefaa49054 100644
--- a/engines/avalanche/graph.cpp
+++ b/engines/avalanche/graphics.cpp
@@ -28,7 +28,7 @@
/* Replacement class for the Graph unit from Pascal. */
#include "avalanche/avalanche.h"
-#include "avalanche/graph.h"
+#include "avalanche/graphics.h"
#include "common/system.h"
@@ -39,15 +39,15 @@
namespace Avalanche {
-const byte Graph::_egaPaletteIndex[16] = {0, 1, 2, 3, 4, 5, 20, 7, 56, 57, 58, 59, 60, 61, 62, 63};
+const byte Graphics::_egaPaletteIndex[16] = {0, 1, 2, 3, 4, 5, 20, 7, 56, 57, 58, 59, 60, 61, 62, 63};
-void Graph::setParent(AvalancheEngine *vm) {
+void Graphics::setParent(AvalancheEngine *vm) {
_vm = vm;
}
-void Graph::init() {
+void Graphics::init() {
initGraphics(kScreenWidth, kScreenHeight, true);
for (int i = 0; i < 64; ++i) {
@@ -59,30 +59,30 @@ void Graph::init() {
for (byte i = 0; i < 16; i++)
g_system->getPaletteManager()->setPalette(_egaPalette[_egaPaletteIndex[i]], i, 1);
- _surface.create(kScreenWidth, kScreenHeight, Graphics::PixelFormat::createFormatCLUT8());
+ _surface.create(kScreenWidth, kScreenHeight, ::Graphics::PixelFormat::createFormatCLUT8());
}
-Graph::~Graph() {
+Graphics::~Graphics() {
_surface.free();
}
-void Graph::flesh_colours()
+void Graphics::flesh_colours()
{
g_system->getPaletteManager()->setPalette(_egaPalette[39], 13, 1);
g_system->getPaletteManager()->setPalette(_egaPalette[28], 5, 1);
}
-byte *Graph::getPixel(int16 x, int16 y) {
+byte *Graphics::getPixel(int16 x, int16 y) {
return (byte *)_surface.getBasePtr(x, y);
}
-void Graph::drawBar(int16 x1, int16 y1, int16 x2, int16 y2, int16 color) {
+void Graphics::drawBar(int16 x1, int16 y1, int16 x2, int16 y2, int16 color) {
_surface.fillRect(Common::Rect(x1, y1, x2, y2), color);
}
-void Graph::drawSprite(const SpriteInfo &sprite, byte picnum, int16 x, int16 y) {
+void Graphics::drawSprite(const SpriteInfo &sprite, byte picnum, int16 x, int16 y) {
/* First we make the pixels of the spirte blank. */
for (byte qay = 0; qay < sprite.yl; qay++) {
@@ -112,16 +112,16 @@ void Graph::drawSprite(const SpriteInfo &sprite, byte picnum, int16 x, int16 y)
}
}
-void Graph::drawPicture(const byte *source, uint16 destX, uint16 destY) {
+void Graphics::drawPicture(const byte *source, uint16 destX, uint16 destY) {
// The height and the width are stored in 2-2 bytes. We have to add 1 to each because Pascal stores the value of them -1.
uint16 pictureWidth = READ_LE_UINT16(source) + 1;
uint16 pictureHeight = READ_LE_UINT16(source + 2) + 1;
uint32 i = 4;
- Graphics::Surface picture; // We make a Surface object for the picture itself.
+ ::Graphics::Surface picture; // We make a Surface object for the picture itself.
- picture.create(pictureWidth, pictureHeight, Graphics::PixelFormat::createFormatCLUT8());
+ picture.create(pictureWidth, pictureHeight, ::Graphics::PixelFormat::createFormatCLUT8());
// Produce the picture.
for (byte y = 0; y < pictureHeight; y++)
@@ -140,7 +140,7 @@ void Graph::drawPicture(const byte *source, uint16 destX, uint16 destY) {
*(byte *)_surface.getBasePtr(x + destX, y + destY) = *(byte *)picture.getBasePtr(x, y);
}
-void Graph::refreshScreen() {
+void Graphics::refreshScreen() {
g_system->copyRectToScreen(_surface.pixels, _surface.pitch , 0, 0, kScreenWidth, kScreenHeight);
g_system->updateScreen();
}
diff --git a/engines/avalanche/graph.h b/engines/avalanche/graphics.h
index e24e042abd..333cbddfca 100644
--- a/engines/avalanche/graph.h
+++ b/engines/avalanche/graphics.h
@@ -54,7 +54,7 @@ public:
};
-class Graph {
+class Graphics {
public:
static const int16 kScreenWidth = 640;
static const int16 kScreenHeight = 200;
@@ -65,7 +65,7 @@ public:
void init();
- ~Graph();
+ ~Graphics();
void flesh_colours();
@@ -82,7 +82,7 @@ public:
private:
AvalancheEngine *_vm;
- Graphics::Surface _surface;
+ ::Graphics::Surface _surface;
static const byte _egaPaletteIndex[16];
diff --git a/engines/avalanche/lucerna2.cpp b/engines/avalanche/lucerna2.cpp
index d75468d99c..3b30451bed 100644
--- a/engines/avalanche/lucerna2.cpp
+++ b/engines/avalanche/lucerna2.cpp
@@ -243,13 +243,13 @@ void Lucerna::load(byte n) { /* Load2, actually */
move(a0, a1, 12080);
}*/
- Graphics::Surface background;
+ ::Graphics::Surface background;
uint16 backgroundWidht = _vm->_graph.kScreenWidth;
byte backgroundHeight = 8 * 12080 / _vm->_graph.kScreenWidth; // With 640 width it's 151
// The 8 = number of bits in a byte, and 12080 comes from the original code (see above)
- background.create(backgroundWidht, backgroundHeight, Graphics::PixelFormat::createFormatCLUT8());
+ background.create(backgroundWidht, backgroundHeight, ::Graphics::PixelFormat::createFormatCLUT8());
for (byte plane = 0; plane < 4; plane++)
for (uint16 y = 0; y < backgroundHeight; y++)
diff --git a/engines/avalanche/module.mk b/engines/avalanche/module.mk
index 222482e406..306df15513 100644
--- a/engines/avalanche/module.mk
+++ b/engines/avalanche/module.mk
@@ -2,7 +2,7 @@ MODULE := engines/avalanche
MODULE_OBJS = \
avalanche.o \
- graph.o \
+ graphics.o \
avalot.o \
console.o \
detection.o \
diff --git a/engines/avalanche/trip6.h b/engines/avalanche/trip6.h
index bd9b00a608..4b84221e11 100644
--- a/engines/avalanche/trip6.h
+++ b/engines/avalanche/trip6.h
@@ -31,7 +31,7 @@
#ifndef TRIP6_H
#define TRIP6_H
-#include "avalanche/graph.h"
+#include "avalanche/graphics.h"
#include "common/scummsys.h"
#include "common/str.h"