aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorEugene Sandulenko2019-07-02 00:49:56 +0200
committerEugene Sandulenko2019-09-03 17:17:07 +0200
commitd55370ac82768b2f733aab4e723bda08cb36bb44 (patch)
tree54099200ad04edd938807a8efd6ed00ffd120fa9 /engines
parent362cb060f3a70bf21218c17c148a84abbd685989 (diff)
downloadscummvm-rg350-d55370ac82768b2f733aab4e723bda08cb36bb44.tar.gz
scummvm-rg350-d55370ac82768b2f733aab4e723bda08cb36bb44.tar.bz2
scummvm-rg350-d55370ac82768b2f733aab4e723bda08cb36bb44.zip
HDB: Rename class DrawMan -> Gfx
Diffstat (limited to 'engines')
-rw-r--r--engines/hdb/gfx.cpp76
-rw-r--r--engines/hdb/gfx.h6
-rw-r--r--engines/hdb/hdb.cpp6
-rw-r--r--engines/hdb/hdb.h2
4 files changed, 45 insertions, 45 deletions
diff --git a/engines/hdb/gfx.cpp b/engines/hdb/gfx.cpp
index 0f6de884be..c347d64ef1 100644
--- a/engines/hdb/gfx.cpp
+++ b/engines/hdb/gfx.cpp
@@ -24,7 +24,7 @@
namespace HDB {
-DrawMan::DrawMan() {
+Gfx::Gfx() {
_tLookupArray = NULL;
_gfxCache = new Common::Array<GfxCache *>;
_globalSurface.create(kScreenWidth, kScreenHeight, g_hdb->_format);
@@ -32,12 +32,12 @@ DrawMan::DrawMan() {
_systemInit = false;
}
-DrawMan::~DrawMan() {
+Gfx::~Gfx() {
delete _gfxCache;
_globalSurface.free();
}
-bool DrawMan::init() {
+bool Gfx::init() {
// Set the default cursor pos & char clipping
setCursor(0, 0);
@@ -136,17 +136,17 @@ bool DrawMan::init() {
return true;
}
-void DrawMan::fillScreen(uint32 color) {
+void Gfx::fillScreen(uint32 color) {
_globalSurface.fillRect(Common::Rect(kScreenWidth, kScreenHeight), color);
g_system->fillScreen(color);
}
-void DrawMan::updateVideo() {
+void Gfx::updateVideo() {
updateFade();
- debug(9, "STUB: DrawMan::updateVideo incomplete");
+ debug(9, "STUB: Gfx::updateVideo incomplete");
}
-void DrawMan::drawPointer() {
+void Gfx::drawPointer() {
static int anim = 0;
static uint32 animTime = 0;
@@ -164,11 +164,11 @@ void DrawMan::drawPointer() {
_mousePointer[anim]->drawMasked(g_hdb->_input->getMouseX() - 16, g_hdb->_input->getMouseY() - 16);
}
-void DrawMan::setPointerState(int value) {
+void Gfx::setPointerState(int value) {
_pointerDisplayable = value;
}
-void DrawMan::setFade(bool fadeIn, bool black, int steps) {
+void Gfx::setFade(bool fadeIn, bool black, int steps) {
_fadeInfo.isFadeIn = fadeIn;
_fadeInfo.isBlack = black;
@@ -186,12 +186,12 @@ void DrawMan::setFade(bool fadeIn, bool black, int steps) {
_fadeInfo.active = true;
}
-void DrawMan::updateFade() {
+void Gfx::updateFade() {
_fadeInfo.active = false;
- debug(9, "STUB: DrawMan::updateFade incomplete");
+ debug(9, "STUB: Gfx::updateFade incomplete");
}
-Picture *DrawMan::loadPic(const char *picName) {
+Picture *Gfx::loadPic(const char *picName) {
Picture *pic = new Picture;
Common::SeekableReadStream *stream = g_hdb->_fileMan->findFirstData(picName, TYPE_PIC);
if (!stream)
@@ -200,7 +200,7 @@ Picture *DrawMan::loadPic(const char *picName) {
return pic;
}
-Tile *DrawMan::loadTile(const char *tileName) {
+Tile *Gfx::loadTile(const char *tileName) {
Tile *tile = new Tile;
Common::SeekableReadStream *stream = g_hdb->_fileMan->findFirstData(tileName, TYPE_TILE32);
if (!stream)
@@ -209,7 +209,7 @@ Tile *DrawMan::loadTile(const char *tileName) {
return tile;
}
-Tile *DrawMan::getTile(int index) {
+Tile *Gfx::getTile(int index) {
if (index < 0 || index > _numTiles) {
if (index != 0xFFFF)
@@ -232,12 +232,12 @@ Tile *DrawMan::getTile(int index) {
return _tLookupArray[index].tData;
}
-void DrawMan::cacheTileSequence(int tileIndex, int count) {
+void Gfx::cacheTileSequence(int tileIndex, int count) {
for (int i = tileIndex; i < tileIndex + count; i++)
getTile(i);
}
-int DrawMan::getTileIndex(const char *name) {
+int Gfx::getTileIndex(const char *name) {
if (!name) {
return -1;
}
@@ -249,7 +249,7 @@ int DrawMan::getTileIndex(const char *name) {
return -1;
}
-Picture *DrawMan::getPicture(const char *name) {
+Picture *Gfx::getPicture(const char *name) {
Common::SeekableReadStream *stream = g_hdb->_fileMan->findFirstData(name, TYPE_PIC);
Picture *picture = new Picture;
picture->load(stream);
@@ -257,7 +257,7 @@ Picture *DrawMan::getPicture(const char *name) {
}
// Returns: true->Tile, false->Pic
-bool DrawMan::selectGfxType(const char *name) {
+bool Gfx::selectGfxType(const char *name) {
// Check for Pic types
if (Common::matchString(name, "clubup1"))
return false;
@@ -303,7 +303,7 @@ bool DrawMan::selectGfxType(const char *name) {
return true;
}
-Tile *DrawMan::getTileGfx(const char *name, uint32 size) {
+Tile *Gfx::getTileGfx(const char *name, uint32 size) {
// Try to find graphic
for (Common::Array<GfxCache *>::iterator it = _gfxCache->begin(); it != _gfxCache->end(); it++) {
if (Common::matchString((*it)->name, name)) {
@@ -331,7 +331,7 @@ Tile *DrawMan::getTileGfx(const char *name, uint32 size) {
return gc->tileGfx;
}
-Picture *DrawMan::getPicGfx(const char *name, uint32 size) {
+Picture *Gfx::getPicGfx(const char *name, uint32 size) {
// Try to find graphic
for (Common::Array<GfxCache *>::iterator it = _gfxCache->begin(); it != _gfxCache->end(); it++) {
if (Common::matchString((*it)->name, name)) {
@@ -359,7 +359,7 @@ Picture *DrawMan::getPicGfx(const char *name, uint32 size) {
return gc->picGfx;
}
-int DrawMan::isSky(int index) {
+int Gfx::isSky(int index) {
if (!index) {
return 0;
}
@@ -373,7 +373,7 @@ int DrawMan::isSky(int index) {
return 0;
}
-void DrawMan::setSky(int skyIndex) {
+void Gfx::setSky(int skyIndex) {
int tileIndex = _skyTiles[skyIndex - 1];
_currentSky = skyIndex;
@@ -396,7 +396,7 @@ void DrawMan::setSky(int skyIndex) {
}
}
-void DrawMan::setup3DStars() {
+void Gfx::setup3DStars() {
for (int i = 0; i < kNum3DStars; i++) {
_stars3D[i].x = g_hdb->_rnd->getRandomNumber(kScreenWidth);
_stars3D[i].y = g_hdb->_rnd->getRandomNumber(kScreenHeight);
@@ -406,7 +406,7 @@ void DrawMan::setup3DStars() {
}
}
-void DrawMan::setup3DStarsLeft() {
+void Gfx::setup3DStarsLeft() {
for (int i = 0; i < kNum3DStars; i++) {
_stars3DSlow[i].x = g_hdb->_rnd->getRandomNumber(kScreenWidth);
_stars3DSlow[i].y = g_hdb->_rnd->getRandomNumber(kScreenHeight);
@@ -415,7 +415,7 @@ void DrawMan::setup3DStarsLeft() {
}
}
-void DrawMan::draw3DStars() {
+void Gfx::draw3DStars() {
fillScreen(0);
for (int i = 0; i < kNum3DStars; i++) {
_starField[_stars3D[i].color]->drawMasked((int)_stars3D[i].x, (int)_stars3D[i].y);
@@ -426,7 +426,7 @@ void DrawMan::draw3DStars() {
}
}
-void DrawMan::draw3DStarsLeft() {
+void Gfx::draw3DStarsLeft() {
fillScreen(0);
for (int i = 0; i < kNum3DStars; i++) {
_starField[_stars3DSlow[i].color]->drawMasked((int)_stars3DSlow[i].x, (int)_stars3DSlow[i].y);
@@ -437,7 +437,7 @@ void DrawMan::draw3DStarsLeft() {
}
}
-void DrawMan::drawSky() {
+void Gfx::drawSky() {
int tile = _skyTiles[_currentSky - 1];
if (tile == _tileSkyStars) {
@@ -461,11 +461,11 @@ void DrawMan::drawSky() {
}
}
-int DrawMan::animateTile(int tileIndex) {
+int Gfx::animateTile(int tileIndex) {
return _tLookupArray[tileIndex].animIndex;
}
-bool DrawMan::loadFont(const char *string) {
+bool Gfx::loadFont(const char *string) {
Common::SeekableReadStream *stream = g_hdb->_fileMan->findFirstData(string, TYPE_FONT);
if (!stream)
return false;
@@ -522,7 +522,7 @@ bool DrawMan::loadFont(const char *string) {
return true;
}
-void DrawMan::drawText(const char *string) {
+void Gfx::drawText(const char *string) {
if (!_systemInit)
return;
@@ -592,7 +592,7 @@ void DrawMan::drawText(const char *string) {
}
// Calculates pixel width of a string
-void DrawMan::getDimensions(const char *string, int *pixelsWide, int *lines) {
+void Gfx::getDimensions(const char *string, int *pixelsWide, int *lines) {
if (!string) {
*pixelsWide = kFontSpace;
*lines = 1;
@@ -646,42 +646,42 @@ void DrawMan::getDimensions(const char *string, int *pixelsWide, int *lines) {
*lines = height;
}
-int DrawMan::stringLength(const char *string) {
+int Gfx::stringLength(const char *string) {
int w, h;
getDimensions(string, &w, &h);
return w;
}
-void DrawMan::setTextEdges(int left, int right, int top, int bottom) {
+void Gfx::setTextEdges(int left, int right, int top, int bottom) {
_eLeft = left;
_eRight = right;
_eTop = top;
_eBottom = bottom;
}
-void DrawMan::getTextEdges(int *left, int *right, int *top, int *bottom) {
+void Gfx::getTextEdges(int *left, int *right, int *top, int *bottom) {
*left = _eLeft;
*right = _eRight;
*top = _eTop;
*bottom = _eBottom;
}
-void DrawMan::setKernLead(int kern, int lead) {
+void Gfx::setKernLead(int kern, int lead) {
_fontHeader.kerning = kern;
_fontHeader.leading = lead;
}
-void DrawMan::getKernLead(int *kern, int *lead) {
+void Gfx::getKernLead(int *kern, int *lead) {
*kern = _fontHeader.kerning;
*lead = _fontHeader.leading;
}
-void DrawMan::setCursor(int x, int y) {
+void Gfx::setCursor(int x, int y) {
_cursorX = x;
_cursorY = y;
}
-void DrawMan::getCursor(int *x, int *y) {
+void Gfx::getCursor(int *x, int *y) {
*x = _cursorX;
*y = _cursorY;
}
diff --git a/engines/hdb/gfx.h b/engines/hdb/gfx.h
index 1ace112993..964af02841 100644
--- a/engines/hdb/gfx.h
+++ b/engines/hdb/gfx.h
@@ -82,11 +82,11 @@ struct CharInfo {
int32 offset; // From the start of the font charInfo chunk
};
-class DrawMan {
+class Gfx {
public:
- DrawMan();
- ~DrawMan();
+ Gfx();
+ ~Gfx();
Graphics::ManagedSurface _globalSurface;
diff --git a/engines/hdb/hdb.cpp b/engines/hdb/hdb.cpp
index 0eb1da5c2d..63b12c07eb 100644
--- a/engines/hdb/hdb.cpp
+++ b/engines/hdb/hdb.cpp
@@ -43,7 +43,7 @@ HDBGame::HDBGame(OSystem *syst, const ADGameDescription *gameDesc) : Engine(syst
_systemInit = false;
g_hdb = this;
_fileMan = new FileMan;
- _gfx = new DrawMan;
+ _gfx = new Gfx;
_lua = new LuaScript;
_map = new Map;
_ai = new AI;
@@ -80,7 +80,7 @@ bool HDBGame::init() {
error("FileMan::openMPC: Cannot find the hyperspace.mpc data file.");
}
if (!_gfx->init()) {
- error("DrawMan::init: Couldn't initialize DrawMan");
+ error("Gfx::init: Couldn't initialize Gfx");
}
if (!_input->init()) {
error("Input::init: Couldn't initialize Input");
@@ -150,7 +150,7 @@ void HDBGame::paint() {
_gfx->drawPointer();
break;
case GAME_LOADING:
- warning("STUB: DrawMan::DrawLoadingScreen required");
+ warning("STUB: Gfx::DrawLoadingScreen required");
break;
}
diff --git a/engines/hdb/hdb.h b/engines/hdb/hdb.h
index 09ddedee73..6628848f22 100644
--- a/engines/hdb/hdb.h
+++ b/engines/hdb/hdb.h
@@ -130,7 +130,7 @@ public:
*/
FileMan *_fileMan;
- DrawMan *_gfx;
+ Gfx *_gfx;
LuaScript *_lua;
Map *_map;
AI *_ai;