aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEinar Johan Trøan Sømåen2012-07-26 20:49:59 +0200
committerEinar Johan Trøan Sømåen2012-07-26 20:49:59 +0200
commit2c530bc6edc9ffd95fa86488a663e67d2735041f (patch)
tree52386c21252db1ec6333b89e12a84dbb5d5d11bd
parent4eda234611bd77f053defe9e61d592b308270eaa (diff)
downloadscummvm-rg350-2c530bc6edc9ffd95fa86488a663e67d2735041f.tar.gz
scummvm-rg350-2c530bc6edc9ffd95fa86488a663e67d2735041f.tar.bz2
scummvm-rg350-2c530bc6edc9ffd95fa86488a663e67d2735041f.zip
WINTERMUTE: var_name -> varName
-rw-r--r--engines/wintermute/ad/ad_game.cpp18
-rw-r--r--engines/wintermute/ad/ad_inventory_box.cpp6
-rw-r--r--engines/wintermute/ad/ad_response_box.cpp14
-rw-r--r--engines/wintermute/base/font/base_font_bitmap.cpp6
-rw-r--r--engines/wintermute/base/scriptables/script.cpp24
-rw-r--r--engines/wintermute/base/scriptables/script.h12
-rw-r--r--engines/wintermute/graphics/transparent_surface.cpp100
-rw-r--r--engines/wintermute/system/sys_class.cpp4
-rw-r--r--engines/wintermute/system/sys_class.h2
-rw-r--r--engines/wintermute/utils/utils.cpp14
10 files changed, 100 insertions, 100 deletions
diff --git a/engines/wintermute/ad/ad_game.cpp b/engines/wintermute/ad/ad_game.cpp
index 4533496199..e7bc4483e6 100644
--- a/engines/wintermute/ad/ad_game.cpp
+++ b/engines/wintermute/ad/ad_game.cpp
@@ -715,13 +715,13 @@ bool AdGame::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack,
ScValue *val = stack->pop();
if (!val->isNULL()) {
for (int i = 0; i < _inventories.getSize(); i++) {
- AdInventory *Inv = _inventories[i];
+ AdInventory *inv = _inventories[i];
- for (int j = 0; j < Inv->_takenItems.getSize(); j++) {
- if (val->getNative() == Inv->_takenItems[j]) {
+ for (int j = 0; j < inv->_takenItems.getSize(); j++) {
+ if (val->getNative() == inv->_takenItems[j]) {
stack->pushBool(true);
return STATUS_OK;
- } else if (scumm_stricmp(val->getString(), Inv->_takenItems[j]->getName()) == 0) {
+ } else if (scumm_stricmp(val->getString(), inv->_takenItems[j]->getName()) == 0) {
stack->pushBool(true);
return STATUS_OK;
}
@@ -1176,16 +1176,16 @@ bool AdGame::scSetProperty(const char *name, ScValue *value) {
//////////////////////////////////////////////////////////////////////////
bool AdGame::ExternalCall(ScScript *script, ScStack *stack, ScStack *thisStack, char *name) {
- ScValue *this_obj;
+ ScValue *thisObj;
//////////////////////////////////////////////////////////////////////////
// Actor
//////////////////////////////////////////////////////////////////////////
if (strcmp(name, "Actor") == 0) {
stack->correctParams(0);
- this_obj = thisStack->getTop();
+ thisObj = thisStack->getTop();
- this_obj->setNative(new AdActor(_gameRef));
+ thisObj->setNative(new AdActor(_gameRef));
stack->pushNULL();
}
@@ -1194,9 +1194,9 @@ bool AdGame::ExternalCall(ScScript *script, ScStack *stack, ScStack *thisStack,
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Entity") == 0) {
stack->correctParams(0);
- this_obj = thisStack->getTop();
+ thisObj = thisStack->getTop();
- this_obj->setNative(new AdEntity(_gameRef));
+ thisObj->setNative(new AdEntity(_gameRef));
stack->pushNULL();
}
diff --git a/engines/wintermute/ad/ad_inventory_box.cpp b/engines/wintermute/ad/ad_inventory_box.cpp
index b8a3f1da22..80929bcb7b 100644
--- a/engines/wintermute/ad/ad_inventory_box.cpp
+++ b/engines/wintermute/ad/ad_inventory_box.cpp
@@ -223,7 +223,7 @@ bool AdInventoryBox::loadBuffer(byte *buffer, bool complete) {
byte *params;
int cmd = 2;
BaseParser parser(_gameRef);
- bool always_visible = false;
+ bool alwaysVisible = false;
_exclusive = false;
if (complete) {
@@ -275,7 +275,7 @@ bool AdInventoryBox::loadBuffer(byte *buffer, bool complete) {
break;
case TOKEN_ALWAYS_VISIBLE:
- parser.scanStr((char *)params, "%b", &always_visible);
+ parser.scanStr((char *)params, "%b", &alwaysVisible);
break;
case TOKEN_SPACING:
@@ -318,7 +318,7 @@ bool AdInventoryBox::loadBuffer(byte *buffer, bool complete) {
}
}
- _visible = always_visible;
+ _visible = alwaysVisible;
if (_window) {
for (int i = 0; i < _window->_widgets.getSize(); i++) {
diff --git a/engines/wintermute/ad/ad_response_box.cpp b/engines/wintermute/ad/ad_response_box.cpp
index c566120405..07df0a88ee 100644
--- a/engines/wintermute/ad/ad_response_box.cpp
+++ b/engines/wintermute/ad/ad_response_box.cpp
@@ -453,22 +453,22 @@ bool AdResponseBox::display() {
// shift down if needed
if (!_horizontal) {
- int total_height = 0;
+ int totalHeight = 0;
for (i = 0; i < _respButtons.getSize(); i++) {
- total_height += (_respButtons[i]->_height + _spacing);
+ totalHeight += (_respButtons[i]->_height + _spacing);
}
- total_height -= _spacing;
+ totalHeight -= _spacing;
switch (_verticalAlign) {
case VAL_BOTTOM:
- if (yyy + total_height < rect.bottom) {
- yyy = rect.bottom - total_height;
+ if (yyy + totalHeight < rect.bottom) {
+ yyy = rect.bottom - totalHeight;
}
break;
case VAL_CENTER:
- if (yyy + total_height < rect.bottom) {
- yyy += ((rect.bottom - rect.top) - total_height) / 2;
+ if (yyy + totalHeight < rect.bottom) {
+ yyy += ((rect.bottom - rect.top) - totalHeight) / 2;
}
break;
diff --git a/engines/wintermute/base/font/base_font_bitmap.cpp b/engines/wintermute/base/font/base_font_bitmap.cpp
index 9cce8ca9ee..ee876f2503 100644
--- a/engines/wintermute/base/font/base_font_bitmap.cpp
+++ b/engines/wintermute/base/font/base_font_bitmap.cpp
@@ -341,7 +341,7 @@ bool BaseFontBitmap::loadBuffer(byte *buffer) {
buffer = (byte *)params;
int widths[300];
- int num = 0, default_width = 8;
+ int num = 0, defaultWidth = 8;
int lastWidth = 0;
int i;
int r = 255, g = 255, b = 255;
@@ -377,7 +377,7 @@ bool BaseFontBitmap::loadBuffer(byte *buffer) {
break;
case TOKEN_DEFAULT_WIDTH:
- parser.scanStr(params, "%d", &default_width);
+ parser.scanStr(params, "%d", &defaultWidth);
break;
case TOKEN_WIDTHS_FRAME:
@@ -482,7 +482,7 @@ bool BaseFontBitmap::loadBuffer(byte *buffer) {
}
} else {
for (i = lastWidth; i < NUM_CHARACTERS; i++) {
- _widths[i] = default_width;
+ _widths[i] = defaultWidth;
}
}
diff --git a/engines/wintermute/base/scriptables/script.cpp b/engines/wintermute/base/scriptables/script.cpp
index 4deeb0bf39..54a04c454f 100644
--- a/engines/wintermute/base/scriptables/script.cpp
+++ b/engines/wintermute/base/scriptables/script.cpp
@@ -106,12 +106,12 @@ void ScScript::readHeader() {
_scriptStream->seek(0);
_header.magic = _scriptStream->readUint32LE();
_header.version = _scriptStream->readUint32LE();
- _header.code_start = _scriptStream->readUint32LE();
- _header.func_table = _scriptStream->readUint32LE();
- _header.symbol_table = _scriptStream->readUint32LE();
- _header.event_table = _scriptStream->readUint32LE();
- _header.externals_table = _scriptStream->readUint32LE();
- _header.method_table = _scriptStream->readUint32LE();
+ _header.codeStart = _scriptStream->readUint32LE();
+ _header.funcTable = _scriptStream->readUint32LE();
+ _header.symbolTable = _scriptStream->readUint32LE();
+ _header.eventTable = _scriptStream->readUint32LE();
+ _header.externalsTable = _scriptStream->readUint32LE();
+ _header.methodTable = _scriptStream->readUint32LE();
_scriptStream->seek(oldPos);
}
@@ -148,7 +148,7 @@ bool ScScript::initScript() {
// skip to the beginning
- _iP = _header.code_start;
+ _iP = _header.codeStart;
_scriptStream->seek(_iP);
_currentLine = 0;
@@ -169,7 +169,7 @@ bool ScScript::initTables() {
readHeader();
// load symbol table
- _iP = _header.symbol_table;
+ _iP = _header.symbolTable;
_numSymbols = getDWORD();
_symbols = new char*[_numSymbols];
@@ -179,7 +179,7 @@ bool ScScript::initTables() {
}
// load functions table
- _iP = _header.func_table;
+ _iP = _header.funcTable;
_numFunctions = getDWORD();
_functions = new TFunctionPos[_numFunctions];
@@ -190,7 +190,7 @@ bool ScScript::initTables() {
// load events table
- _iP = _header.event_table;
+ _iP = _header.eventTable;
_numEvents = getDWORD();
_events = new TEventPos[_numEvents];
@@ -202,7 +202,7 @@ bool ScScript::initTables() {
// load externals
if (_header.version >= 0x0101) {
- _iP = _header.externals_table;
+ _iP = _header.externalsTable;
_numExternals = getDWORD();
_externals = new TExternalFunction[_numExternals];
@@ -222,7 +222,7 @@ bool ScScript::initTables() {
}
// load method table
- _iP = _header.method_table;
+ _iP = _header.methodTable;
_numMethods = getDWORD();
_methods = new TMethodPos[_numMethods];
diff --git a/engines/wintermute/base/scriptables/script.h b/engines/wintermute/base/scriptables/script.h
index c343ad24ad..2ee1319acb 100644
--- a/engines/wintermute/base/scriptables/script.h
+++ b/engines/wintermute/base/scriptables/script.h
@@ -88,12 +88,12 @@ public:
typedef struct {
uint32 magic;
uint32 version;
- uint32 code_start;
- uint32 func_table;
- uint32 symbol_table;
- uint32 event_table;
- uint32 externals_table;
- uint32 method_table;
+ uint32 codeStart;
+ uint32 funcTable;
+ uint32 symbolTable;
+ uint32 eventTable;
+ uint32 externalsTable;
+ uint32 methodTable;
} TScriptHeader;
TScriptHeader _header;
diff --git a/engines/wintermute/graphics/transparent_surface.cpp b/engines/wintermute/graphics/transparent_surface.cpp
index 6ab9c621d0..65bdbcf5a1 100644
--- a/engines/wintermute/graphics/transparent_surface.cpp
+++ b/engines/wintermute/graphics/transparent_surface.cpp
@@ -72,12 +72,12 @@ void doBlit(byte *ino, byte* outo, uint32 width, uint32 height, uint32 pitch, in
in = ino;
for (uint32 j = 0; j < width; j++) {
uint32 pix = *(uint32 *)in;
- uint32 o_pix = *(uint32 *) out;
+ uint32 oPix = *(uint32 *) out;
int b = (pix >> bShift) & 0xff;
int g = (pix >> gShift) & 0xff;
int r = (pix >> rShift) & 0xff;
int a = (pix >> aShift) & 0xff;
- int o_b, o_g, o_r, o_a;
+ int outb, outg, outr, outa;
in += inStep;
/* if (ca != 255) {
@@ -89,31 +89,31 @@ void doBlit(byte *ino, byte* outo, uint32 width, uint32 height, uint32 pitch, in
out += 4;
break;
case 255: // Full opacity
- o_b = b;
- o_g = g;
- o_r = r;
- o_a = a;
+ outb = b;
+ outg = g;
+ outr = r;
+ outa = a;
//*(uint32 *)out = target.format.ARGBToColor(o_a, o_r, o_g, o_b);
- out[aIndex] = o_a;
- out[bIndex] = o_b;
- out[gIndex] = o_g;
- out[rIndex] = o_r;
+ out[aIndex] = outa;
+ out[bIndex] = outb;
+ out[gIndex] = outg;
+ out[rIndex] = outr;
out += 4;
break;
default: // alpha blending
- o_a = 255;
- o_b = (o_pix >> bShiftTarget) & 0xff;
- o_g = (o_pix >> gShiftTarget) & 0xff;
- o_r = (o_pix >> rShiftTarget) & 0xff;
- o_b += ((b - o_b) * a) >> 8;
- o_g += ((g - o_g) * a) >> 8;
- o_r += ((r - o_r) * a) >> 8;
+ outa = 255;
+ outb = (oPix >> bShiftTarget) & 0xff;
+ outg = (oPix >> gShiftTarget) & 0xff;
+ outr = (oPix >> rShiftTarget) & 0xff;
+ outb += ((b - outb) * a) >> 8;
+ outg += ((g - outg) * a) >> 8;
+ outr += ((r - outr) * a) >> 8;
//*(uint32 *)out = target.format.ARGBToColor(o_a, o_r, o_g, o_b);
- out[aIndex] = o_a;
- out[bIndex] = o_b;
- out[gIndex] = o_g;
- out[rIndex] = o_r;
+ out[aIndex] = outa;
+ out[bIndex] = outb;
+ out[gIndex] = outg;
+ out[rIndex] = outr;
out += 4;
}
}
@@ -259,7 +259,7 @@ Common::Rect TransparentSurface::blit(Graphics::Surface &target, int posX, int p
int g = (pix >> gShift) & 0xff;
int r = (pix >> rShift) & 0xff;
int a = (pix >> aShift) & 0xff;
- int o_b, o_g, o_r, o_a;
+ int outb, outg, outr, outa;
in += inStep;
if (ca != 255) {
@@ -272,56 +272,56 @@ Common::Rect TransparentSurface::blit(Graphics::Surface &target, int posX, int p
break;
case 255: // Full opacity
if (cb != 255)
- o_b = (b * cb) >> 8;
+ outb = (b * cb) >> 8;
else
- o_b = b;
+ outb = b;
if (cg != 255)
- o_g = (g * cg) >> 8;
+ outg = (g * cg) >> 8;
else
- o_g = g;
+ outg = g;
if (cr != 255)
- o_r = (r * cr) >> 8;
+ outr = (r * cr) >> 8;
else
- o_r = r;
- o_a = a;
+ outr = r;
+ outa = a;
//*(uint32 *)out = target.format.ARGBToColor(o_a, o_r, o_g, o_b);
- out[aIndex] = o_a;
- out[bIndex] = o_b;
- out[gIndex] = o_g;
- out[rIndex] = o_r;
+ out[aIndex] = outa;
+ out[bIndex] = outb;
+ out[gIndex] = outg;
+ out[rIndex] = outr;
out += 4;
break;
default: // alpha blending
- o_a = 255;
- o_b = (o_pix >> bShiftTarget) & 0xff;
- o_g = (o_pix >> gShiftTarget) & 0xff;
- o_r = (o_pix >> rShiftTarget) & 0xff;
+ outa = 255;
+ outb = (o_pix >> bShiftTarget) & 0xff;
+ outg = (o_pix >> gShiftTarget) & 0xff;
+ outr = (o_pix >> rShiftTarget) & 0xff;
if (cb == 0)
- o_b = 0;
+ outb = 0;
else if (cb != 255)
- o_b += ((b - o_b) * a * cb) >> 16;
+ outb += ((b - outb) * a * cb) >> 16;
else
- o_b += ((b - o_b) * a) >> 8;
+ outb += ((b - outb) * a) >> 8;
if (cg == 0)
- o_g = 0;
+ outg = 0;
else if (cg != 255)
- o_g += ((g - o_g) * a * cg) >> 16;
+ outg += ((g - outg) * a * cg) >> 16;
else
- o_g += ((g - o_g) * a) >> 8;
+ outg += ((g - outg) * a) >> 8;
if (cr == 0)
- o_r = 0;
+ outr = 0;
else if (cr != 255)
- o_r += ((r - o_r) * a * cr) >> 16;
+ outr += ((r - outr) * a * cr) >> 16;
else
- o_r += ((r - o_r) * a) >> 8;
+ outr += ((r - outr) * a) >> 8;
//*(uint32 *)out = target.format.ARGBToColor(o_a, o_r, o_g, o_b);
- out[aIndex] = o_a;
- out[bIndex] = o_b;
- out[gIndex] = o_g;
- out[rIndex] = o_r;
+ out[aIndex] = outa;
+ out[bIndex] = outb;
+ out[gIndex] = outg;
+ out[rIndex] = outr;
out += 4;
}
}
diff --git a/engines/wintermute/system/sys_class.cpp b/engines/wintermute/system/sys_class.cpp
index 21578320c7..ce06e8980e 100644
--- a/engines/wintermute/system/sys_class.cpp
+++ b/engines/wintermute/system/sys_class.cpp
@@ -36,14 +36,14 @@
namespace WinterMute {
//////////////////////////////////////////////////////////////////////////
-SystemClass::SystemClass(const AnsiString &name, PERSISTBUILD build, PERSISTLOAD load, bool persistent_class) {
+SystemClass::SystemClass(const AnsiString &name, PERSISTBUILD build, PERSISTLOAD load, bool persistentClass) {
_name = name;
_build = build;
_load = load;
_next = NULL;
_savedID = -1;
- _persistent = persistent_class;
+ _persistent = persistentClass;
_numInst = 0;
SystemClassRegistry::getInstance()->registerClass(this);
diff --git a/engines/wintermute/system/sys_class.h b/engines/wintermute/system/sys_class.h
index bd534f8bb0..36968e1cc2 100644
--- a/engines/wintermute/system/sys_class.h
+++ b/engines/wintermute/system/sys_class.h
@@ -65,7 +65,7 @@ namespace WinterMute {
class SystemClass {
public:
- SystemClass(const AnsiString &name, PERSISTBUILD build, PERSISTLOAD load, bool persistent_class);
+ SystemClass(const AnsiString &name, PERSISTBUILD build, PERSISTLOAD load, bool persistentClass);
~SystemClass();
int getNumInstances();
diff --git a/engines/wintermute/utils/utils.cpp b/engines/wintermute/utils/utils.cpp
index 39bb1d7137..3336cf63e2 100644
--- a/engines/wintermute/utils/utils.cpp
+++ b/engines/wintermute/utils/utils.cpp
@@ -290,19 +290,19 @@ uint32 BaseUtils::HSLtoRGB(byte InH, byte InS, byte InL) {
G = (byte)(L * 255);
B = (byte)(L * 255);
} else {
- float var_1, var_2;
+ float var1, var2;
if (L < 0.5) {
- var_2 = L * (1.0 + S);
+ var2 = L * (1.0 + S);
} else {
- var_2 = (L + S) - (S * L);
+ var2 = (L + S) - (S * L);
}
- var_1 = 2.0f * L - var_2;
+ var1 = 2.0f * L - var2;
- R = (byte)(255 * Hue2RGB(var_1, var_2, H + (1.0f / 3.0f)));
- G = (byte)(255 * Hue2RGB(var_1, var_2, H));
- B = (byte)(255 * Hue2RGB(var_1, var_2, H - (1.0f / 3.0f)));
+ R = (byte)(255 * Hue2RGB(var1, var2, H + (1.0f / 3.0f)));
+ G = (byte)(255 * Hue2RGB(var1, var2, H));
+ B = (byte)(255 * Hue2RGB(var1, var2, H - (1.0f / 3.0f)));
}
return BYTETORGBA(255, R, G, B);
}