AVALANCHE: rename constants to follow our code formatting conventions.

This commit is contained in:
uruk 2013-07-24 16:42:23 +02:00
parent aed0c42f15
commit aa0603cf42
3 changed files with 7 additions and 7 deletions

View File

@ -48,7 +48,7 @@ void Graph::setParent(AvalancheEngine *vm) {
}
void Graph::init() {
initGraphics(_screenWidth, _screenHeight, true);
initGraphics(kScreenWidth, kScreenHeight, true);
for (int i = 0; i < 64; ++i) {
_egaPalette[i][0] = (i >> 2 & 1) * 0xaa + (i >> 5 & 1) * 0x55;
@ -59,7 +59,7 @@ void Graph::init() {
for (byte i = 0; i < 16; i++)
g_system->getPaletteManager()->setPalette(_egaPalette[_egaPaletteIndex[i]], i, 1);
_surface.create(_screenWidth, _screenHeight, Graphics::PixelFormat::createFormatCLUT8());
_surface.create(kScreenWidth, kScreenHeight, Graphics::PixelFormat::createFormatCLUT8());
}
Graph::~Graph() {
@ -141,7 +141,7 @@ void Graph::drawPicture(const byte *source, uint16 destX, uint16 destY) {
}
void Graph::refreshScreen() {
g_system->copyRectToScreen(_surface.pixels, _surface.pitch , 0, 0, _screenWidth, _screenHeight);
g_system->copyRectToScreen(_surface.pixels, _surface.pitch , 0, 0, kScreenWidth, kScreenHeight);
g_system->updateScreen();
}

View File

@ -56,8 +56,8 @@ public:
class Graph {
public:
static const int16 _screenWidth = 640;
static const int16 _screenHeight = 200;
static const int16 kScreenWidth = 640;
static const int16 kScreenHeight = 200;

View File

@ -245,8 +245,8 @@ void Lucerna::load(byte n) { /* Load2, actually */
Graphics::Surface background;
uint16 backgroundWidht = _vm->_graph._screenWidth;
byte backgroundHeight = 8 * 12080 / _vm->_graph._screenWidth; // With 640 width it's 151
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());