GUI: ThemeEngine.cpp/.h formatting fixes.

This commit is contained in:
Johannes Schickel 2011-04-03 15:04:20 +02:00
parent 407b9c9b2e
commit 28e6859a69
2 changed files with 205 additions and 203 deletions

View file

@ -719,7 +719,7 @@ bool ThemeEngine::loadDefaultXML() {
#include "themes/default.inc"
;
if (!_parser->loadBuffer((const byte*)defaultXML, strlen(defaultXML)))
if (!_parser->loadBuffer((const byte *)defaultXML, strlen(defaultXML)))
return false;
_themeName = "ScummVM Classic Theme (Builtin Version)";
@ -1197,19 +1197,19 @@ void ThemeEngine::updateScreen(bool render) {
if (!_bufferQueue.empty()) {
_vectorRenderer->setSurface(&_backBuffer);
for (Common::List<ThemeItem*>::iterator q = _bufferQueue.begin(); q != _bufferQueue.end(); ++q) {
for (Common::List<ThemeItem *>::iterator q = _bufferQueue.begin(); q != _bufferQueue.end(); ++q) {
(*q)->drawSelf(true, false);
delete *q;
}
_vectorRenderer->setSurface(&_screen);
memcpy(_screen.getBasePtr(0,0), _backBuffer.getBasePtr(0,0), _screen.pitch * _screen.h);
memcpy(_screen.getBasePtr(0, 0), _backBuffer.getBasePtr(0, 0), _screen.pitch * _screen.h);
_bufferQueue.clear();
}
if (!_screenQueue.empty()) {
_vectorRenderer->disableShadows();
for (Common::List<ThemeItem*>::iterator q = _screenQueue.begin(); q != _screenQueue.end(); ++q) {
for (Common::List<ThemeItem *>::iterator q = _screenQueue.begin(); q != _screenQueue.end(); ++q) {
(*q)->drawSelf(true, false);
delete *q;
}
@ -1232,7 +1232,7 @@ void ThemeEngine::addDirtyRect(Common::Rect r) {
// Check if the new rectangle is contained within another in the list
Common::List<Common::Rect>::iterator it;
for (it = _dirtyScreen.begin(); it != _dirtyScreen.end(); ) {
for (it = _dirtyScreen.begin(); it != _dirtyScreen.end();) {
// If we find a rectangle which fully contains the new one,
// we can abort the search.
if (it->contains(r))
@ -1271,7 +1271,7 @@ void ThemeEngine::openDialog(bool doBuffer, ShadingStyle style) {
addDirtyRect(Common::Rect(0, 0, _screen.w, _screen.h));
}
memcpy(_backBuffer.getBasePtr(0,0), _screen.getBasePtr(0,0), _screen.pitch * _screen.h);
memcpy(_backBuffer.getBasePtr(0, 0), _screen.getBasePtr(0, 0), _screen.pitch * _screen.h);
_vectorRenderer->setSurface(&_screen);
}
@ -1311,7 +1311,7 @@ bool ThemeEngine::createCursor(const Common::String &filename, int hotspotX, int
// to 8 bit mode, and have to create a suitable palette on the fly.
uint colorsFound = 0;
Common::HashMap<int, int> colorToIndex;
const OverlayColor *src = (const OverlayColor*)cursor->pixels;
const OverlayColor *src = (const OverlayColor *)cursor->pixels;
for (uint y = 0; y < _cursorHeight; ++y) {
for (uint x = 0; x < _cursorWidth; ++x) {
byte r, g, b;
@ -1584,7 +1584,9 @@ struct TDComparator {
const Common::String _id;
TDComparator(const Common::String &id) : _id(id) {}
bool operator()(const ThemeEngine::ThemeDescriptor &r) { return _id == r.id; }
bool operator()(const ThemeEngine::ThemeDescriptor &r) {
return _id == r.id;
}
};
} // end of anonymous namespace

View file

@ -35,8 +35,8 @@
#define SCUMMVM_THEME_VERSION_STR "SCUMMVM_STX0.8.3"
namespace Graphics {
struct DrawStep;
class VectorRenderer;
struct DrawStep;
class VectorRenderer;
}
namespace GUI {
@ -134,7 +134,7 @@ enum TextColor {
class ThemeEngine {
protected:
typedef Common::HashMap<Common::String, Graphics::Surface*> ImagesMap;
typedef Common::HashMap<Common::String, Graphics::Surface *> ImagesMap;
friend class GUI::Dialog;
friend class GUI::GuiObject;
@ -218,9 +218,9 @@ public:
};
// Special image ids for images used in the GUI
static const char * const kImageLogo; ///< ScummVM logo used in the launcher
static const char * const kImageLogoSmall; ///< ScummVM logo used in the GMM
static const char * const kImageSearch; ///< Search tool image used in the launcher
static const char *const kImageLogo; ///< ScummVM logo used in the launcher
static const char *const kImageLogoSmall; ///< ScummVM logo used in the GMM
static const char *const kImageSearch; ///< Search tool image used in the launcher
/**
* Graphics mode enumeration.
@ -661,7 +661,7 @@ protected:
byte *_cursor;
bool _needPaletteUpdates;
uint _cursorWidth, _cursorHeight;
byte _cursorPal[3*MAX_CURS_COLORS];
byte _cursorPal[3 * MAX_CURS_COLORS];
byte _cursorPalSize;
};