diff options
55 files changed, 344 insertions, 342 deletions
diff --git a/engines/wintermute/ad/ad_actor.cpp b/engines/wintermute/ad/ad_actor.cpp index fb46cef9cf..540b6b62c2 100644 --- a/engines/wintermute/ad/ad_actor.cpp +++ b/engines/wintermute/ad/ad_actor.cpp @@ -752,9 +752,9 @@ bool AdActor::update() { _tempSprite2 = _sentence->_currentSprite;
}
- bool TimeIsUp = (_sentence->_sound && _sentence->_soundStarted && (!_sentence->_sound->isPlaying() && !_sentence->_sound->isPaused())) || (!_sentence->_sound && _sentence->_duration <= _gameRef->_timer - _sentence->_startTime);
- if (_tempSprite2 == NULL || _tempSprite2->_finished || (/*_tempSprite2->_looping &&*/ TimeIsUp)) {
- if (TimeIsUp) {
+ bool timeIsUp = (_sentence->_sound && _sentence->_soundStarted && (!_sentence->_sound->isPlaying() && !_sentence->_sound->isPaused())) || (!_sentence->_sound && _sentence->_duration <= _gameRef->_timer - _sentence->_startTime);
+ if (_tempSprite2 == NULL || _tempSprite2->_finished || (/*_tempSprite2->_looping &&*/ timeIsUp)) {
+ if (timeIsUp) {
_sentence->finish();
_tempSprite2 = NULL;
_state = _nextState;
@@ -797,7 +797,7 @@ bool AdActor::update() { if (_currentSprite && !already_moved) {
- _currentSprite->GetCurrentFrame(_zoomable ? ((AdGame *)_gameRef)->_scene->getZoomAt(_posX, _posY) : 100, _zoomable ? ((AdGame *)_gameRef)->_scene->getZoomAt(_posX, _posY) : 100);
+ _currentSprite->getCurrentFrame(_zoomable ? ((AdGame *)_gameRef)->_scene->getZoomAt(_posX, _posY) : 100, _zoomable ? ((AdGame *)_gameRef)->_scene->getZoomAt(_posX, _posY) : 100);
if (_currentSprite->_changed) {
_posX += _currentSprite->_moveX;
_posY += _currentSprite->_moveY;
@@ -857,7 +857,7 @@ void AdActor::getNextStep() { return;
}
- _currentSprite->GetCurrentFrame(_zoomable ? ((AdGame *)_gameRef)->_scene->getZoomAt(_posX, _posY) : 100, _zoomable ? ((AdGame *)_gameRef)->_scene->getZoomAt(_posX, _posY) : 100);
+ _currentSprite->getCurrentFrame(_zoomable ? ((AdGame *)_gameRef)->_scene->getZoomAt(_posX, _posY) : 100, _zoomable ? ((AdGame *)_gameRef)->_scene->getZoomAt(_posX, _posY) : 100);
if (!_currentSprite->_changed) {
return;
}
@@ -941,9 +941,9 @@ bool AdActor::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack, //////////////////////////////////////////////////////////////////////////
if (strcmp(name, "GoTo") == 0 || strcmp(name, "GoToAsync") == 0) {
stack->correctParams(2);
- int X = stack->pop()->getInt();
- int Y = stack->pop()->getInt();
- goTo(X, Y);
+ int x = stack->pop()->getInt();
+ int y = stack->pop()->getInt();
+ goTo(x, y);
if (strcmp(name, "GoToAsync") != 0) {
script->waitForExclusive(this);
}
@@ -1033,11 +1033,11 @@ bool AdActor::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack, //////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "UnloadAnim") == 0) {
stack->correctParams(1);
- const char *AnimName = stack->pop()->getString();
+ const char *animName = stack->pop()->getString();
- bool Found = false;
+ bool found = false;
for (int i = 0; i < _anims.getSize(); i++) {
- if (scumm_stricmp(_anims[i]->getName(), AnimName) == 0) {
+ if (scumm_stricmp(_anims[i]->getName(), animName) == 0) {
// invalidate sprites in use
if (_anims[i]->containsSprite(_tempSprite2)) {
_tempSprite2 = NULL;
@@ -1053,10 +1053,10 @@ bool AdActor::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack, _anims[i] = NULL;
_anims.remove_at(i);
i--;
- Found = true;
+ found = true;
}
}
- stack->pushBool(Found);
+ stack->pushBool(found);
return STATUS_OK;
}
@@ -1065,8 +1065,8 @@ bool AdActor::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack, //////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "HasAnim") == 0) {
stack->correctParams(1);
- const char *AnimName = stack->pop()->getString();
- stack->pushBool(getAnimByName(AnimName) != NULL);
+ const char *animName = stack->pop()->getString();
+ stack->pushBool(getAnimByName(animName) != NULL);
return STATUS_OK;
} else {
return AdTalkHolder::scCallMethod(script, stack, thisStack, name);
@@ -1421,7 +1421,7 @@ bool AdActor::mergeAnims(const char *animsFilename) { int cmd;
BaseParser parser(_gameRef);
- bool Ret = STATUS_OK;
+ bool ret = STATUS_OK;
while ((cmd = parser.getCommand((char **)&buffer, commands, (char **)¶ms)) > 0) {
switch (cmd) {
@@ -1429,7 +1429,7 @@ bool AdActor::mergeAnims(const char *animsFilename) { AdSpriteSet *anim = new AdSpriteSet(_gameRef, this);
if (!anim || DID_FAIL(anim->loadBuffer(params, false))) {
cmd = PARSERR_GENERIC;
- Ret = STATUS_FAILED;
+ ret = STATUS_FAILED;
} else {
_anims.add(anim);
}
@@ -1438,7 +1438,7 @@ bool AdActor::mergeAnims(const char *animsFilename) { }
}
delete[] fileBuffer;
- return Ret;
+ return ret;
}
//////////////////////////////////////////////////////////////////////////
diff --git a/engines/wintermute/ad/ad_entity.cpp b/engines/wintermute/ad/ad_entity.cpp index aa30a0096c..daa064f328 100644 --- a/engines/wintermute/ad/ad_entity.cpp +++ b/engines/wintermute/ad/ad_entity.cpp @@ -611,9 +611,9 @@ bool AdEntity::update() { _tempSprite2 = _sentence->_currentSprite;
}
- bool TimeIsUp = (_sentence->_sound && _sentence->_soundStarted && (!_sentence->_sound->isPlaying() && !_sentence->_sound->isPaused())) || (!_sentence->_sound && _sentence->_duration <= _gameRef->_timer - _sentence->_startTime);
- if (_tempSprite2 == NULL || _tempSprite2->_finished || (/*_tempSprite2->_looping &&*/ TimeIsUp)) {
- if (TimeIsUp) {
+ bool timeIsUp = (_sentence->_sound && _sentence->_soundStarted && (!_sentence->_sound->isPlaying() && !_sentence->_sound->isPaused())) || (!_sentence->_sound && _sentence->_duration <= _gameRef->_timer - _sentence->_startTime);
+ if (_tempSprite2 == NULL || _tempSprite2->_finished || (/*_tempSprite2->_looping &&*/ timeIsUp)) {
+ if (timeIsUp) {
_sentence->finish();
_tempSprite2 = NULL;
_state = STATE_READY;
@@ -637,7 +637,7 @@ bool AdEntity::update() { if (_currentSprite) {
- _currentSprite->GetCurrentFrame(_zoomable ? ((AdGame *)_gameRef)->_scene->getZoomAt(_posX, _posY) : 100);
+ _currentSprite->getCurrentFrame(_zoomable ? ((AdGame *)_gameRef)->_scene->getZoomAt(_posX, _posY) : 100);
if (_currentSprite->_changed) {
_posX += _currentSprite->_moveX;
_posY += _currentSprite->_moveY;
@@ -648,10 +648,10 @@ bool AdEntity::update() { _ready = (_state == STATE_READY);
if (_theora) {
- int OffsetX, OffsetY;
- _gameRef->getOffset(&OffsetX, &OffsetY);
- _theora->_posX = _posX - OffsetX;
- _theora->_posY = _posY - OffsetY;
+ int offsetX, offsetY;
+ _gameRef->getOffset(&offsetX, &offsetY);
+ _theora->_posX = _posX - offsetX;
+ _theora->_posY = _posY - offsetY;
_theora->update();
if (_theora->isFinished()) {
diff --git a/engines/wintermute/ad/ad_game.cpp b/engines/wintermute/ad/ad_game.cpp index e7bc4483e6..66ec582f21 100644 --- a/engines/wintermute/ad/ad_game.cpp +++ b/engines/wintermute/ad/ad_game.cpp @@ -334,7 +334,7 @@ bool AdGame::displaySentences(bool frozen) { //////////////////////////////////////////////////////////////////////////
void AdGame::finishSentences() {
for (int i = 0; i < _sentences.getSize(); i++) {
- if (_sentences[i]->CanSkip()) {
+ if (_sentences[i]->canSkip()) {
_sentences[i]->_duration = 0;
if (_sentences[i]->_sound) {
_sentences[i]->_sound->stop();
@@ -557,8 +557,8 @@ bool AdGame::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack, //////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "ResetResponse") == 0) {
stack->correctParams(1);
- int ID = stack->pop()->getInt(-1);
- resetResponse(ID);
+ int id = stack->pop()->getInt(-1);
+ resetResponse(id);
stack->pushNULL();
return STATUS_OK;
}
@@ -1175,7 +1175,7 @@ bool AdGame::scSetProperty(const char *name, ScValue *value) { //////////////////////////////////////////////////////////////////////////
-bool AdGame::ExternalCall(ScScript *script, ScStack *stack, ScStack *thisStack, char *name) {
+bool AdGame::externalCall(ScScript *script, ScStack *stack, ScStack *thisStack, char *name) {
ScValue *thisObj;
//////////////////////////////////////////////////////////////////////////
@@ -1204,7 +1204,7 @@ bool AdGame::ExternalCall(ScScript *script, ScStack *stack, ScStack *thisStack, //////////////////////////////////////////////////////////////////////////
// call parent
else {
- return BaseGame::ExternalCall(script, stack, thisStack, name);
+ return BaseGame::externalCall(script, stack, thisStack, name);
}
diff --git a/engines/wintermute/ad/ad_game.h b/engines/wintermute/ad/ad_game.h index e0179d3e94..ef671b0a64 100644 --- a/engines/wintermute/ad/ad_game.h +++ b/engines/wintermute/ad/ad_game.h @@ -135,7 +135,7 @@ public: virtual bool scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack, const char *name);
bool validMouse();
private:
- virtual bool ExternalCall(ScScript *script, ScStack *stack, ScStack *thisStack, char *name);
+ virtual bool externalCall(ScScript *script, ScStack *stack, ScStack *thisStack, char *name);
AdObject *_invObject;
BaseArray<AdInventory *> _inventories;
diff --git a/engines/wintermute/ad/ad_inventory_box.h b/engines/wintermute/ad/ad_inventory_box.h index dfbf62be9a..1857cd8f19 100644 --- a/engines/wintermute/ad/ad_inventory_box.h +++ b/engines/wintermute/ad/ad_inventory_box.h @@ -40,10 +40,6 @@ class AdInventoryBox : public BaseObject { public:
bool _hideSelected;
DECLARE_PERSISTENT(AdInventoryBox, BaseObject)
- bool _exclusive;
- int _scrollBy;
- int _itemHeight;
- int _itemWidth;
bool _visible;
virtual bool display();
UIButton *_closeButton;
@@ -57,6 +53,11 @@ public: bool loadFile(const char *filename);
bool loadBuffer(byte *buffer, bool complete = true);
virtual bool saveAsText(BaseDynamicBuffer *buffer, int indent);
+private:
+ bool _exclusive;
+ int _scrollBy;
+ int _itemHeight;
+ int _itemWidth;
};
} // end of namespace WinterMute
diff --git a/engines/wintermute/ad/ad_item.cpp b/engines/wintermute/ad/ad_item.cpp index c9e0d56b24..70b8bba2a4 100644 --- a/engines/wintermute/ad/ad_item.cpp +++ b/engines/wintermute/ad/ad_item.cpp @@ -378,9 +378,9 @@ bool AdItem::update() { _tempSprite2 = _sentence->_currentSprite;
}
- bool TimeIsUp = (_sentence->_sound && _sentence->_soundStarted && (!_sentence->_sound->isPlaying() && !_sentence->_sound->isPaused())) || (!_sentence->_sound && _sentence->_duration <= _gameRef->_timer - _sentence->_startTime);
- if (_tempSprite2 == NULL || _tempSprite2->_finished || (/*_tempSprite2->_looping &&*/ TimeIsUp)) {
- if (TimeIsUp) {
+ bool timeIsUp = (_sentence->_sound && _sentence->_soundStarted && (!_sentence->_sound->isPlaying() && !_sentence->_sound->isPaused())) || (!_sentence->_sound && _sentence->_duration <= _gameRef->_timer - _sentence->_startTime);
+ if (_tempSprite2 == NULL || _tempSprite2->_finished || (/*_tempSprite2->_looping &&*/ timeIsUp)) {
+ if (timeIsUp) {
_sentence->finish();
_tempSprite2 = NULL;
_state = STATE_READY;
@@ -440,9 +440,9 @@ bool AdItem::display(int x, int y) { if (_amountString) {
font->drawText((byte *)_amountString, amountX, amountY, width, _amountAlign);
} else {
- char Str[256];
- sprintf(Str, "%d", _amount);
- font->drawText((byte *)Str, amountX, amountY, width, _amountAlign);
+ char str[256];
+ sprintf(str, "%d", _amount);
+ font->drawText((byte *)str, amountX, amountY, width, _amountAlign);
}
}
}
diff --git a/engines/wintermute/ad/ad_item.h b/engines/wintermute/ad/ad_item.h index 11010c2a35..eaa6844fcd 100644 --- a/engines/wintermute/ad/ad_item.h +++ b/engines/wintermute/ad/ad_item.h @@ -36,14 +36,6 @@ namespace WinterMute { class AdItem : public AdTalkHolder {
public:
- bool _displayAmount;
- int _amount;
- int _amountOffsetX;
- int _amountOffsetY;
- TTextAlign _amountAlign;
- char *_amountString;
-
-
bool update();
DECLARE_PERSISTENT(AdItem, AdTalkHolder)
bool display(int x, int y);
@@ -63,6 +55,13 @@ public: virtual bool scSetProperty(const char *name, ScValue *value);
virtual bool scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack, const char *name);
virtual const char *scToString();
+private:
+ bool _displayAmount;
+ int _amount;
+ int _amountOffsetX;
+ int _amountOffsetY;
+ TTextAlign _amountAlign;
+ char *_amountString;
};
} // end of namespace WinterMute
diff --git a/engines/wintermute/ad/ad_node_state.h b/engines/wintermute/ad/ad_node_state.h index fc7692a1bf..64ecab6849 100644 --- a/engines/wintermute/ad/ad_node_state.h +++ b/engines/wintermute/ad/ad_node_state.h @@ -35,6 +35,7 @@ class AdEntity; class AdNodeState : public BaseClass {
public:
+ bool _active;
bool transferEntity(AdEntity *entity, bool includingSprites, bool saving);
void setName(const char *name);
void setFilename(const char *filename);
@@ -42,8 +43,9 @@ public: DECLARE_PERSISTENT(AdNodeState, BaseClass)
AdNodeState(BaseGame *inGame);
virtual ~AdNodeState();
+ const char *getName() const { return _name; }
+private:
char *_name;
- bool _active;
char *_caption[7];
void setCaption(const char *caption, int caseVal);
char *getCaption(int caseVal);
diff --git a/engines/wintermute/ad/ad_scene.cpp b/engines/wintermute/ad/ad_scene.cpp index d863d21140..e047373918 100644 --- a/engines/wintermute/ad/ad_scene.cpp +++ b/engines/wintermute/ad/ad_scene.cpp @@ -659,7 +659,7 @@ bool AdScene::loadBuffer(byte *buffer, bool complete) { int ar, ag, ab, aa;
char camera[MAX_PATH_LENGTH] = "";
- /* float WaypointHeight = -1.0f; */
+ /* float waypointHeight = -1.0f; */
while ((cmd = parser.getCommand((char **)&buffer, commands, (char **)¶ms)) > 0) {
switch (cmd) {
@@ -991,8 +991,8 @@ bool AdScene::traverseNodes(bool doUpdate) { _gameRef->_renderer->setup2D();
// for each layer
- /* int MainOffsetX = 0; */
- /* int MainOffsetY = 0; */
+ /* int mainOffsetX = 0; */
+ /* int mainOffsetY = 0; */
for (j = 0; j < _layers.getSize(); j++) {
if (!_layers[j]->_active) {
diff --git a/engines/wintermute/ad/ad_scene.h b/engines/wintermute/ad/ad_scene.h index a4bf666aea..5c2f505001 100644 --- a/engines/wintermute/ad/ad_scene.h +++ b/engines/wintermute/ad/ad_scene.h @@ -47,55 +47,55 @@ class AdPathPoint; class AdScene : public BaseObject {
public:
- BaseObject *getNextAccessObject(BaseObject *CurrObject);
- BaseObject *getPrevAccessObject(BaseObject *CurrObject);
- bool getSceneObjects(BaseArray<AdObject *> &Objects, bool InteractiveOnly);
- bool getRegionObjects(AdRegion *Region, BaseArray<AdObject *> &Objects, bool InteractiveOnly);
+ BaseObject *getNextAccessObject(BaseObject *currObject);
+ BaseObject *getPrevAccessObject(BaseObject *currObject);
+ bool getSceneObjects(BaseArray<AdObject *> &objects, bool interactiveOnly);
+ bool getRegionObjects(AdRegion *region, BaseArray<AdObject *> &objects, bool interactiveOnly);
bool afterLoad();
- bool getRegionsAt(int X, int Y, AdRegion **RegionList, int NumRegions);
- bool handleItemAssociations(const char *ItemName, bool Show);
+ bool getRegionsAt(int x, int y, AdRegion **regionList, int numRegions);
+ bool handleItemAssociations(const char *itemName, bool show);
UIWindow *_shieldWindow;
- float getRotationAt(int X, int Y);
+ float getRotationAt(int x, int y);
bool loadState();
bool saveState();
bool _persistentState;
bool _persistentStateSprites;
BaseObject *getNodeByName(const char *name);
- void setOffset(int OffsetLeft, int OffsetTop);
- bool pointInViewport(int X, int Y);
+ void setOffset(int offsetLeft, int offsetTop);
+ bool pointInViewport(int x, int y);
int getOffsetTop();
int getOffsetLeft();
- bool getViewportSize(int *Width = NULL, int *Height = NULL);
- bool getViewportOffset(int *OffsetX = NULL, int *OffsetY = NULL);
+ bool getViewportSize(int *width = NULL, int *height = NULL);
+ bool getViewportOffset(int *offsetX = NULL, int *offsetY = NULL);
BaseViewport *_viewport;
BaseFader *_fader;
int _pfPointsNum;
- void pfPointsAdd(int X, int Y, int Distance);
+ void pfPointsAdd(int x, int y, int distance);
void pfPointsStart();
bool _initialized;
- bool correctTargetPoint(int StartX, int StartY, int *X, int *Y, bool CheckFreeObjects = false, BaseObject *Requester = NULL);
- bool correctTargetPoint2(int StartX, int StartY, int *TargetX, int *TargetY, bool CheckFreeObjects, BaseObject *Requester);
+ bool correctTargetPoint(int startX, int startY, int *x, int *y, bool checkFreeObjects = false, BaseObject *requester = NULL);
+ bool correctTargetPoint2(int startX, int startY, int *targetX, int *targetY, bool checkFreeObjects, BaseObject *requester);
DECLARE_PERSISTENT(AdScene, BaseObject)
- bool displayRegionContent(AdRegion *Region = NULL, bool Display3DOnly = false);
- bool displayRegionContentOld(AdRegion *Region = NULL);
- static int compareObjs(const void *Obj1, const void *Obj2);
+ bool displayRegionContent(AdRegion *region = NULL, bool display3DOnly = false);
+ bool displayRegionContentOld(AdRegion *region = NULL);
+ static int compareObjs(const void *obj1, const void *obj2);
bool updateFreeObjects();
- bool traverseNodes(bool Update = false);
- float getScaleAt(int Y);
+ bool traverseNodes(bool update = false);
+ float getScaleAt(int y);
bool sortScaleLevels();
bool sortRotLevels();
virtual bool saveAsText(BaseDynamicBuffer *buffer, int indent);
- uint32 getAlphaAt(int X, int Y, bool ColorCheck = false);
+ uint32 getAlphaAt(int x, int y, bool colorCheck = false);
bool _paralaxScrolling;
- void skipTo(int OffsetX, int OffsetY);
+ void skipTo(int offsetX, int offsetY);
void setDefaults();
void cleanup();
- void skipToObject(BaseObject *Object);
- void scrollToObject(BaseObject *Object);
- void scrollTo(int OffsetX, int OffsetY);
+ void skipToObject(BaseObject *object);
+ void scrollToObject(BaseObject *object);
+ void scrollTo(int offsetX, int offsetY);
virtual bool update();
bool _autoScroll;
int _targetOffsetTop;
@@ -113,10 +113,10 @@ public: uint32 _pfMaxTime;
bool initLoop();
void pathFinderStep();
- bool isBlockedAt(int X, int Y, bool CheckFreeObjects = false, BaseObject *Requester = NULL);
- bool isWalkableAt(int X, int Y, bool CheckFreeObjects = false, BaseObject *Requester = NULL);
+ bool isBlockedAt(int x, int y, bool checkFreeObjects = false, BaseObject *requester = NULL);
+ bool isWalkableAt(int x, int y, bool checkFreeObjects = false, BaseObject *requester = NULL);
AdLayer *_mainLayer;
- float getZoomAt(int X, int Y);
+ float getZoomAt(int x, int y);
bool getPath(BasePoint source, BasePoint target, AdPath *path, BaseObject *requester = NULL);
AdScene(BaseGame *inGame);
virtual ~AdScene();
@@ -163,8 +163,8 @@ public: private:
- bool persistState(bool Saving = true);
- void pfAddWaypointGroup(AdWaypointGroup *Wpt, BaseObject *Requester = NULL);
+ bool persistState(bool saving = true);
+ void pfAddWaypointGroup(AdWaypointGroup *Wpt, BaseObject *requester = NULL);
bool _pfReady;
BasePoint *_pfTarget;
AdPath *_pfTargetPath;
diff --git a/engines/wintermute/ad/ad_scene_state.cpp b/engines/wintermute/ad/ad_scene_state.cpp index 673fb965e9..bbacf57707 100644 --- a/engines/wintermute/ad/ad_scene_state.cpp +++ b/engines/wintermute/ad/ad_scene_state.cpp @@ -76,7 +76,7 @@ void AdSceneState::setFilename(const char *filename) { //////////////////////////////////////////////////////////////////////////
AdNodeState *AdSceneState::getNodeState(const char *name, bool saving) {
for (int i = 0; i < _nodeStates.getSize(); i++) {
- if (scumm_stricmp(_nodeStates[i]->_name, name) == 0) {
+ if (scumm_stricmp(_nodeStates[i]->getName(), name) == 0) {
return _nodeStates[i];
}
}
diff --git a/engines/wintermute/ad/ad_sentence.cpp b/engines/wintermute/ad/ad_sentence.cpp index d429c1fedf..6bbcd590a8 100644 --- a/engines/wintermute/ad/ad_sentence.cpp +++ b/engines/wintermute/ad/ad_sentence.cpp @@ -353,7 +353,7 @@ bool AdSentence::update(TDirection dir) { }
//////////////////////////////////////////////////////////////////////////
-bool AdSentence::CanSkip() {
+bool AdSentence::canSkip() {
// prevent accidental sentence skipping (TODO make configurable)
return (_gameRef->_timer - _startTime) > 300;
}
diff --git a/engines/wintermute/ad/ad_sentence.h b/engines/wintermute/ad/ad_sentence.h index 6883bd8893..ae4ee793d5 100644 --- a/engines/wintermute/ad/ad_sentence.h +++ b/engines/wintermute/ad/ad_sentence.h @@ -72,7 +72,7 @@ public: virtual ~AdSentence();
AdTalkDef *_talkDef;
- bool CanSkip();
+ bool canSkip();
private:
char *_tempStance;
diff --git a/engines/wintermute/base/base_frame.cpp b/engines/wintermute/base/base_frame.cpp index 208d6037d9..44e39823e6 100644 --- a/engines/wintermute/base/base_frame.cpp +++ b/engines/wintermute/base/base_frame.cpp @@ -268,9 +268,9 @@ bool BaseFrame::loadBuffer(byte *buffer, int lifeTime, bool keepLoaded) { break;
case TOKEN_APPLY_EVENT: {
- char *Event = new char[strlen(params) + 1];
- strcpy(Event, params);
- _applyEvent.add(Event);
+ char *event = new char[strlen(params) + 1];
+ strcpy(event, params);
+ _applyEvent.add(event);
}
break;
diff --git a/engines/wintermute/base/base_frame.h b/engines/wintermute/base/base_frame.h index c8e9cbb400..b019ebf7b6 100644 --- a/engines/wintermute/base/base_frame.h +++ b/engines/wintermute/base/base_frame.h @@ -52,7 +52,7 @@ public: int _moveX;
uint32 _delay;
BaseArray<BaseSubFrame *> _subframes;
- bool draw(int x, int y, BaseObject *registerOwner = NULL, float zoomX = 100, float zoomY = 100, bool precise = true, uint32 Alpha = 0xFFFFFFFF, bool allFrames = false, float rotate = 0.0f, TSpriteBlendMode blendMode = BLEND_NORMAL);
+ bool draw(int x, int y, BaseObject *registerOwner = NULL, float zoomX = 100, float zoomY = 100, bool precise = true, uint32 alpha = 0xFFFFFFFF, bool allFrames = false, float rotate = 0.0f, TSpriteBlendMode blendMode = BLEND_NORMAL);
bool loadBuffer(byte *buffer, int lifeTime, bool keepLoaded);
BaseFrame(BaseGame *inGame);
diff --git a/engines/wintermute/base/base_game.cpp b/engines/wintermute/base/base_game.cpp index 402b7294aa..20ed358ec2 100644 --- a/engines/wintermute/base/base_game.cpp +++ b/engines/wintermute/base/base_game.cpp @@ -1051,14 +1051,14 @@ bool BaseGame::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack const char *filename = stack->pop()->getString();
ScValue *val = stack->pop();
- bool ClearOld;
+ bool clearOld;
if (val->isNULL()) {
- ClearOld = true;
+ clearOld = true;
} else {
- ClearOld = val->getBool();
+ clearOld = val->getBool();
}
- if (DID_FAIL(_stringTable->loadFile(filename, ClearOld))) {
+ if (DID_FAIL(_stringTable->loadFile(filename, clearOld))) {
stack->pushBool(false);
} else {
stack->pushBool(true);
@@ -1530,7 +1530,7 @@ bool BaseGame::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack bool dropFrames = stack->pop()->getBool(true);
ScValue *valSub = stack->pop();
- const char *SubtitleFile = valSub->isNULL() ? NULL : valSub->getString();
+ const char *subtitleFile = valSub->isNULL() ? NULL : valSub->getString();
if (type < (int)VID_PLAY_POS || type > (int)VID_PLAY_CENTER) {
type = (int)VID_PLAY_STRETCH;
@@ -1538,7 +1538,7 @@ bool BaseGame::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack delete _theoraPlayer;
_theoraPlayer = new VideoTheoraPlayer(this);
- if (_theoraPlayer && DID_SUCCEED(_theoraPlayer->initialize(filename, SubtitleFile))) {
+ if (_theoraPlayer && DID_SUCCEED(_theoraPlayer->initialize(filename, subtitleFile))) {
_theoraPlayer->_dontDropFrames = !dropFrames;
if (DID_SUCCEED(_theoraPlayer->play((TVideoPlayback)type, xVal, yVal, true, freezeMusic))) {
stack->pushBool(true);
@@ -1649,8 +1649,8 @@ bool BaseGame::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack //////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "IsSaveSlotUsed") == 0) {
stack->correctParams(1);
- int Slot = stack->pop()->getInt();
- stack->pushBool(isSaveSlotUsed(Slot));
+ int slot = stack->pop()->getInt();
+ stack->pushBool(isSaveSlotUsed(slot));
return STATUS_OK;
}
@@ -2162,7 +2162,7 @@ bool BaseGame::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack //////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "AccOutputText") == 0) {
stack->correctParams(2);
- /* const char *Str = */ stack->pop()->getString();
+ /* const char *str = */ stack->pop()->getString();
/* int type = */ stack->pop()->getInt();
// do nothing
stack->pushNULL();
@@ -2225,9 +2225,9 @@ bool BaseGame::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack crc checksum = crc_finalize(remainder);
if (asHex) {
- char Hex[100];
- sprintf(Hex, "%x", checksum);
- stack->pushString(Hex);
+ char hex[100];
+ sprintf(hex, "%x", checksum);
+ stack->pushString(hex);
} else {
stack->pushInt(checksum);
}
@@ -3032,7 +3032,7 @@ bool BaseGame::validObject(BaseObject *object) { //////////////////////////////////////////////////////////////////////////
-bool BaseGame::ExternalCall(ScScript *script, ScStack *stack, ScStack *thisStack, char *name) {
+bool BaseGame::externalCall(ScScript *script, ScStack *stack, ScStack *thisStack, char *name) {
ScValue *thisObj;
//////////////////////////////////////////////////////////////////////////
@@ -4266,7 +4266,7 @@ bool BaseGame::displayIndicator() { //////////////////////////////////////////////////////////////////////////
bool BaseGame::updateMusicCrossfade() {
- /* byte GlobMusicVol = _soundMgr->getVolumePercent(SOUND_MUSIC); */
+ /* byte globMusicVol = _soundMgr->getVolumePercent(SOUND_MUSIC); */
if (!_musicCrossfadeRunning) {
return STATUS_OK;
diff --git a/engines/wintermute/base/base_game.h b/engines/wintermute/base/base_game.h index ecb698b70a..d4a4c0e682 100644 --- a/engines/wintermute/base/base_game.h +++ b/engines/wintermute/base/base_game.h @@ -39,7 +39,7 @@ namespace WinterMute {
-typedef void (*ENGINE_LOG_CALLBACK)(char *Text, bool Result, void *Data);
+typedef void (*ENGINE_LOG_CALLBACK)(char *text, bool result, void *data);
class BaseSoundMgr;
class BaseFader;
@@ -168,7 +168,7 @@ public: bool _suppressScriptErrors;
bool _mouseLeftDown; // TODO: Hide
- virtual bool ExternalCall(ScScript *script, ScStack *stack, ScStack *thisStack, char *name);
+ virtual bool externalCall(ScScript *script, ScStack *stack, ScStack *thisStack, char *name);
// scripting interface
virtual ScValue *scGetProperty(const char *name);
virtual bool scSetProperty(const char *name, ScValue *value);
diff --git a/engines/wintermute/base/base_object.cpp b/engines/wintermute/base/base_object.cpp index 18619616fe..76047ef4b4 100644 --- a/engines/wintermute/base/base_object.cpp +++ b/engines/wintermute/base/base_object.cpp @@ -428,8 +428,8 @@ bool BaseObject::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisSta else if (strcmp(name, "SetSoundPosition") == 0) {
stack->correctParams(1);
- uint32 Time = stack->pop()->getInt();
- if (DID_FAIL(setSFXTime(Time))) {
+ uint32 time = stack->pop()->getInt();
+ if (DID_FAIL(setSFXTime(time))) {
stack->pushBool(false);
} else {
stack->pushBool(true);
@@ -1099,7 +1099,7 @@ bool BaseObject::playSFX(const char *filename, bool looping, bool playNow, const _sFX->setPositionTime(_sFXStart);
_sFXStart = 0;
}
- _sFX->ApplyFX(_sFXType, _sFXParam1, _sFXParam2, _sFXParam3, _sFXParam4);
+ _sFX->applyFX(_sFXType, _sFXParam1, _sFXParam2, _sFXParam3, _sFXParam4);
if (playNow) {
setSoundEvent(eventName);
if (loopStart) {
@@ -1192,16 +1192,16 @@ bool BaseObject::updateSounds() { //////////////////////////////////////////////////////////////////////////
bool BaseObject::updateOneSound(BaseSound *sound) {
- bool Ret = STATUS_OK;
+ bool ret = STATUS_OK;
if (sound) {
if (_autoSoundPanning) {
- Ret = sound->setPan(_gameRef->_soundMgr->posToPan(_posX - _gameRef->_offsetX, _posY - _gameRef->_offsetY));
+ ret = sound->setPan(_gameRef->_soundMgr->posToPan(_posX - _gameRef->_offsetX, _posY - _gameRef->_offsetY));
}
- Ret = sound->ApplyFX(_sFXType, _sFXParam1, _sFXParam2, _sFXParam3, _sFXParam4);
+ ret = sound->applyFX(_sFXType, _sFXParam1, _sFXParam2, _sFXParam3, _sFXParam4);
}
- return Ret;
+ return ret;
}
//////////////////////////////////////////////////////////////////////////
diff --git a/engines/wintermute/base/base_persistence_manager.cpp b/engines/wintermute/base/base_persistence_manager.cpp index 9f07da57ac..bc751e6aed 100644 --- a/engines/wintermute/base/base_persistence_manager.cpp +++ b/engines/wintermute/base/base_persistence_manager.cpp @@ -206,13 +206,13 @@ bool BasePersistenceManager::initSave(const char *desc) { magic = SAVE_MAGIC_2;
putDWORD(magic);
- byte VerMajor, VerMinor, ExtMajor, ExtMinor;
- _gameRef->getVersion(&VerMajor, &VerMinor, &ExtMajor, &ExtMinor);
- //uint32 Version = MAKELONG(MAKEWORD(VerMajor, VerMinor), MAKEWORD(ExtMajor, ExtMinor));
- _saveStream->writeByte(VerMajor);
- _saveStream->writeByte(VerMinor);
- _saveStream->writeByte(ExtMajor);
- _saveStream->writeByte(ExtMinor);
+ byte verMajor, verMinor, extMajor, extMinor;
+ _gameRef->getVersion(&verMajor, &verMinor, &extMajor, &extMinor);
+ //uint32 version = MAKELONG(MAKEWORD(VerMajor, VerMinor), MAKEWORD(ExtMajor, ExtMinor));
+ _saveStream->writeByte(verMajor);
+ _saveStream->writeByte(verMinor);
+ _saveStream->writeByte(extMajor);
+ _saveStream->writeByte(extMinor);
// new in ver 2
putDWORD((uint32)DCGF_VER_BUILD);
diff --git a/engines/wintermute/base/base_region.cpp b/engines/wintermute/base/base_region.cpp index 13815a5958..79ea5396fc 100644 --- a/engines/wintermute/base/base_region.cpp +++ b/engines/wintermute/base/base_region.cpp @@ -244,12 +244,12 @@ bool BaseRegion::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisSta //////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "InsertPoint") == 0) {
stack->correctParams(3);
- int Index = stack->pop()->getInt();
+ int index = stack->pop()->getInt();
int x = stack->pop()->getInt();
int y = stack->pop()->getInt();
- if (Index >= 0 && Index < _points.getSize()) {
- _points.insert_at(Index, new BasePoint(x, y));
+ if (index >= 0 && index < _points.getSize()) {
+ _points.insert_at(index, new BasePoint(x, y));
createRegion();
stack->pushBool(true);
@@ -265,13 +265,13 @@ bool BaseRegion::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisSta //////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "SetPoint") == 0) {
stack->correctParams(3);
- int Index = stack->pop()->getInt();
+ int index = stack->pop()->getInt();
int x = stack->pop()->getInt();
int y = stack->pop()->getInt();
- if (Index >= 0 && Index < _points.getSize()) {
- _points[Index]->x = x;
- _points[Index]->y = y;
+ if (index >= 0 && index < _points.getSize()) {
+ _points[index]->x = x;
+ _points[index]->y = y;
createRegion();
stack->pushBool(true);
@@ -497,16 +497,16 @@ bool BaseRegion::getBoundingRect(Rect32 *rect) { if (_points.getSize() == 0) {
BasePlatform::setRectEmpty(rect);
} else {
- int MinX = INT_MAX, MinY = INT_MAX, MaxX = INT_MIN, MaxY = INT_MIN;
+ int minX = INT_MAX, minY = INT_MAX, maxX = INT_MIN, maxY = INT_MIN;
for (int i = 0; i < _points.getSize(); i++) {
- MinX = MIN(MinX, _points[i]->x);
- MinY = MIN(MinY, _points[i]->y);
+ minX = MIN(minX, _points[i]->x);
+ minY = MIN(minY, _points[i]->y);
- MaxX = MAX(MaxX, _points[i]->x);
- MaxY = MAX(MaxY, _points[i]->y);
+ maxX = MAX(maxX, _points[i]->x);
+ maxY = MAX(maxY, _points[i]->y);
}
- BasePlatform::setRect(rect, MinX, MinY, MaxX, MaxY);
+ BasePlatform::setRect(rect, minX, minY, maxX, maxY);
}
return STATUS_OK;
}
diff --git a/engines/wintermute/base/base_sprite.cpp b/engines/wintermute/base/base_sprite.cpp index 274c792263..fb1b5a82cf 100644 --- a/engines/wintermute/base/base_sprite.cpp +++ b/engines/wintermute/base/base_sprite.cpp @@ -103,7 +103,7 @@ void BaseSprite::cleanup() { //////////////////////////////////////////////////////////////////////////
bool BaseSprite::draw(int x, int y, BaseObject *registerOwner, float zoomX, float zoomY, uint32 alpha) {
- GetCurrentFrame(zoomX, zoomY);
+ getCurrentFrame(zoomX, zoomY);
if (_currentFrame < 0 || _currentFrame >= _frames.getSize()) {
return STATUS_OK;
}
@@ -291,14 +291,14 @@ bool BaseSprite::loadBuffer(byte *buffer, bool complete, int lifeTime, TSpriteCa break;
case TOKEN_FRAME: {
- int FrameLifeTime = lifeTime;
+ int frameLifeTime = lifeTime;
if (cacheType == CACHE_HALF && frameCount % 2 != 1) {
- FrameLifeTime = -1;
+ frameLifeTime = -1;
}
frame = new BaseFrame(_gameRef);
- if (DID_FAIL(frame->loadBuffer(params, FrameLifeTime, _streamedKeepLoaded))) {
+ if (DID_FAIL(frame->loadBuffer(params, frameLifeTime, _streamedKeepLoaded))) {
delete frame;
_gameRef->LOG(0, "Error parsing frame %d", frameCount);
return STATUS_FAILED;
@@ -345,7 +345,7 @@ void BaseSprite::reset() { //////////////////////////////////////////////////////////////////////
-bool BaseSprite::GetCurrentFrame(float zoomX, float zoomY) {
+bool BaseSprite::getCurrentFrame(float zoomX, float zoomY) {
//if (_owner && _owner->_freezable && _gameRef->_state == GAME_FROZEN) return true;
if (_currentFrame == -1) {
@@ -406,7 +406,7 @@ bool BaseSprite::GetCurrentFrame(float zoomX, float zoomY) { //////////////////////////////////////////////////////////////////////
-bool BaseSprite::display(int X, int Y, BaseObject *Register, float ZoomX, float ZoomY, uint32 Alpha, float Rotate, TSpriteBlendMode BlendMode) {
+bool BaseSprite::display(int x, int y, BaseObject *registerVal, float zoomX, float zoomY, uint32 alpha, float rotate, TSpriteBlendMode blendMode) {
if (_currentFrame < 0 || _currentFrame >= _frames.getSize()) {
return STATUS_OK;
}
@@ -421,7 +421,7 @@ bool BaseSprite::display(int X, int Y, BaseObject *Register, float ZoomX, float }
// draw frame
- return _frames[_currentFrame]->draw(X - _gameRef->_offsetX, Y - _gameRef->_offsetY, Register, ZoomX, ZoomY, _precise, Alpha, _editorAllFrames, Rotate, BlendMode);
+ return _frames[_currentFrame]->draw(x - _gameRef->_offsetX, y - _gameRef->_offsetY, registerVal, zoomX, zoomY, _precise, alpha, _editorAllFrames, rotate, blendMode);
}
@@ -549,12 +549,12 @@ bool BaseSprite::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisSta //////////////////////////////////////////////////////////////////////////
if (strcmp(name, "GetFrame") == 0) {
stack->correctParams(1);
- int Index = stack->pop()->getInt(-1);
- if (Index < 0 || Index >= _frames.getSize()) {
- script->runtimeError("Sprite.GetFrame: Frame index %d is out of range.", Index);
+ int index = stack->pop()->getInt(-1);
+ if (index < 0 || index >= _frames.getSize()) {
+ script->runtimeError("Sprite.GetFrame: Frame index %d is out of range.", index);
stack->pushNULL();
} else {
- stack->pushNative(_frames[Index], true);
+ stack->pushNative(_frames[index], true);
}
return STATUS_OK;
}
diff --git a/engines/wintermute/base/base_sprite.h b/engines/wintermute/base/base_sprite.h index 477ab70878..084d7b2d70 100644 --- a/engines/wintermute/base/base_sprite.h +++ b/engines/wintermute/base/base_sprite.h @@ -57,7 +57,7 @@ public: int _moveY;
int _moveX;
bool display(int x, int y, BaseObject *registerOwner = NULL, float zoomX = 100, float zoomY = 100, uint32 alpha = 0xFFFFFFFF, float rotate = 0.0f, TSpriteBlendMode blendMode = BLEND_NORMAL);
- bool GetCurrentFrame(float zoomX = 100, float zoomY = 100);
+ bool getCurrentFrame(float zoomX = 100, float zoomY = 100);
bool _canBreak;
bool _editorMuted;
bool _continuous;
diff --git a/engines/wintermute/base/base_surface_storage.h b/engines/wintermute/base/base_surface_storage.h index 350210b95e..13c4deb3db 100644 --- a/engines/wintermute/base/base_surface_storage.h +++ b/engines/wintermute/base/base_surface_storage.h @@ -40,7 +40,7 @@ public: bool initLoop();
bool sortSurfaces();
static int surfaceSortCB(const void *arg1, const void *arg2);
- bool cleanup(bool Warn = false);
+ bool cleanup(bool warn = false);
//DECLARE_PERSISTENT(BaseSurfaceStorage, BaseClass);
bool restoreAll();
diff --git a/engines/wintermute/base/font/base_font.cpp b/engines/wintermute/base/font/base_font.cpp index 937557f4d7..34ff717ae5 100644 --- a/engines/wintermute/base/font/base_font.cpp +++ b/engines/wintermute/base/font/base_font.cpp @@ -191,13 +191,13 @@ bool BaseFont::isTrueType(BaseGame *gameRef, const char *filename) { return false;
}
- byte *WorkBuffer = buffer;
+ byte *workBuffer = buffer;
char *params;
BaseParser parser(gameRef);
bool ret = false;
- if (parser.getCommand((char **)&WorkBuffer, commands, (char **)¶ms) == TOKEN_TTFONT) {
+ if (parser.getCommand((char **)&workBuffer, commands, (char **)¶ms) == TOKEN_TTFONT) {
ret = true;
}
diff --git a/engines/wintermute/base/font/base_font_bitmap.cpp b/engines/wintermute/base/font/base_font_bitmap.cpp index ee876f2503..9431c730bd 100644 --- a/engines/wintermute/base/font/base_font_bitmap.cpp +++ b/engines/wintermute/base/font/base_font_bitmap.cpp @@ -127,9 +127,9 @@ int BaseFontBitmap::textHeightDraw(byte *text, int x, int y, int width, TTextAli return 0;
}
- int LineLength = 0;
- int RealLength = 0;
- int NumLines = 0;
+ int lineLength = 0;
+ int realLength = 0;
+ int numLines = 0;
int i;
@@ -139,66 +139,66 @@ int BaseFontBitmap::textHeightDraw(byte *text, int x, int y, int width, TTextAli int last_end = 0;
bool done = false;
- bool new_line = false;
- bool long_line = false;
+ bool newLine = false;
+ bool longLine = false;
if (draw) {
_gameRef->_renderer->startSpriteBatch();
}
while (!done) {
- if (maxHeight > 0 && (NumLines + 1)*_tileHeight > maxHeight) {
+ if (maxHeight > 0 && (numLines + 1)*_tileHeight > maxHeight) {
if (draw) {
_gameRef->_renderer->endSpriteBatch();
}
- return NumLines * _tileHeight;
+ return numLines * _tileHeight;
}
index++;
if (str[index] == ' ' && (maxHeight < 0 || maxHeight / _tileHeight > 1)) {
end = index - 1;
- RealLength = LineLength;
+ realLength = lineLength;
}
if (str[index] == '\n') {
end = index - 1;
- RealLength = LineLength;
- new_line = true;
+ realLength = lineLength;
+ newLine = true;
}
- if (LineLength + getCharWidth(str[index]) > width && last_end == end) {
+ if (lineLength + getCharWidth(str[index]) > width && last_end == end) {
end = index - 1;
- RealLength = LineLength;
- new_line = true;
- long_line = true;
+ realLength = lineLength;
+ newLine = true;
+ longLine = true;
}
if (str.size() == (index + 1) || (maxLength >= 0 && index == maxLength - 1)) {
done = true;
- if (!new_line) {
+ if (!newLine) {
end = index;
- LineLength += getCharWidth(str[index]);
- RealLength = LineLength;
+ lineLength += getCharWidth(str[index]);
+ realLength = lineLength;
}
} else {
- LineLength += getCharWidth(str[index]);
+ lineLength += getCharWidth(str[index]);
}
- if ((LineLength > width) || done || new_line) {
+ if ((lineLength > width) || done || newLine) {
if (end < 0) {
done = true;
}
- int StartX;
+ int startX;
switch (align) {
case TAL_CENTER:
- StartX = x + (width - RealLength) / 2;
+ startX = x + (width - realLength) / 2;
break;
case TAL_RIGHT:
- StartX = x + width - RealLength;
+ startX = x + width - realLength;
break;
case TAL_LEFT:
- StartX = x;
+ startX = x;
break;
default:
error("BaseFontBitmap::TextHeightDraw - Unhandled enum");
@@ -206,21 +206,21 @@ int BaseFontBitmap::textHeightDraw(byte *text, int x, int y, int width, TTextAli }
for (i = start; i < end + 1; i++) {
if (draw) {
- drawChar(str[i], StartX, y);
+ drawChar(str[i], startX, y);
}
- StartX += getCharWidth(str[i]);
+ startX += getCharWidth(str[i]);
}
y += _tileHeight;
last_end = end;
- if (long_line) {
+ if (longLine) {
end--;
}
start = end + 2;
index = end + 1;
- LineLength = 0;
- new_line = false;
- long_line = false;
- NumLines++;
+ lineLength = 0;
+ newLine = false;
+ longLine = false;
+ numLines++;
}
}
@@ -228,7 +228,7 @@ int BaseFontBitmap::textHeightDraw(byte *text, int x, int y, int width, TTextAli _gameRef->_renderer->endSpriteBatch();
}
- return NumLines * _tileHeight;
+ return numLines * _tileHeight;
}
@@ -255,7 +255,7 @@ void BaseFontBitmap::drawChar(byte c, int x, int y) { BasePlatform::setRect(&rect, col * _tileWidth, row * _tileHeight, col * _tileWidth + tileWidth, (row + 1)*_tileHeight);
bool handled = false;
if (_sprite) {
- _sprite->GetCurrentFrame();
+ _sprite->getCurrentFrame();
if (_sprite->_currentFrame >= 0 && _sprite->_currentFrame < _sprite->_frames.getSize() && _sprite->_frames[_sprite->_currentFrame]) {
if (_sprite->_frames[_sprite->_currentFrame]->_subframes.getSize() > 0) {
_sprite->_frames[_sprite->_currentFrame]->_subframes[0]->_surface->displayTrans(x, y, rect);
diff --git a/engines/wintermute/base/font/base_font_bitmap.h b/engines/wintermute/base/font/base_font_bitmap.h index 79806be95f..abf2d39aa0 100644 --- a/engines/wintermute/base/font/base_font_bitmap.h +++ b/engines/wintermute/base/font/base_font_bitmap.h @@ -62,7 +62,7 @@ private: int getCharWidth(byte index);
void drawChar(byte c, int x, int y);
- int textHeightDraw(byte *text, int x, int y, int width, TTextAlign align, bool draw, int max_height = -1, int MaxLength = -1);
+ int textHeightDraw(byte *text, int x, int y, int width, TTextAlign align, bool draw, int max_height = -1, int maxLength = -1);
};
diff --git a/engines/wintermute/base/font/base_font_truetype.cpp b/engines/wintermute/base/font/base_font_truetype.cpp index ac6430d4c9..c643a5e1b1 100644 --- a/engines/wintermute/base/font/base_font_truetype.cpp +++ b/engines/wintermute/base/font/base_font_truetype.cpp @@ -701,7 +701,7 @@ bool BaseFontTT::initFont() { // http://en.wikipedia.org/wiki/E_(typography)
float pixelsPerEm = (_fontHeight / 72.f) * vertDpi; // Size in inches * dpi
- float EmsPerUnit = 1.0f / _fTFace->units_per_EM;
+ float emsPerUnit = 1.0f / _fTFace->units_per_EM;
float pixelsPerUnit = pixelsPerEm * EmsPerUnit;
// bounding box in pixels
diff --git a/engines/wintermute/base/gfx/base_surface.cpp b/engines/wintermute/base/gfx/base_surface.cpp index 68e3e3d26c..635d48058f 100644 --- a/engines/wintermute/base/gfx/base_surface.cpp +++ b/engines/wintermute/base/gfx/base_surface.cpp @@ -87,7 +87,7 @@ bool BaseSurface::displayTransform(int x, int y, int hotX, int hotY, Rect32 rect }
//////////////////////////////////////////////////////////////////////////
-bool BaseSurface::create(int Width, int Height) {
+bool BaseSurface::create(int width, int height) {
return STATUS_FAILED;
}
diff --git a/engines/wintermute/base/gfx/base_surface.h b/engines/wintermute/base/gfx/base_surface.h index 66a3460d48..4f67f871dd 100644 --- a/engines/wintermute/base/gfx/base_surface.h +++ b/engines/wintermute/base/gfx/base_surface.h @@ -52,12 +52,12 @@ public: virtual bool displayTransZoom(int x, int y, Rect32 rect, float zoomX, float zoomY, uint32 alpha = 0xFFFFFFFF, TSpriteBlendMode blendMode = BLEND_NORMAL, bool mirrorX = false, bool mirrorY = false) = 0;
virtual bool displayTrans(int x, int y, Rect32 rect, uint32 alpha = 0xFFFFFFFF, TSpriteBlendMode blendMode = BLEND_NORMAL, bool mirrorX = false, bool mirrorY = false) = 0;
virtual bool displayTransOffset(int x, int y, Rect32 rect, uint32 alpha = 0xFFFFFFFF, TSpriteBlendMode blendMode = BLEND_NORMAL, bool mirrorX = false, bool mirrorY = false, int offsetX = 0, int offsetY = 0) = 0;
- virtual bool display(int x, int y, Rect32 rect, TSpriteBlendMode blendMode = BLEND_NORMAL, bool mirrorX = false, bool MirrorY = false) = 0;
- virtual bool displayZoom(int x, int y, Rect32 rect, float ZoomX, float ZoomY, uint32 alpha = 0xFFFFFFFF, bool transparent = false, TSpriteBlendMode blendMode = BLEND_NORMAL, bool mirrorX = false, bool mirrorY = false) = 0;
+ virtual bool display(int x, int y, Rect32 rect, TSpriteBlendMode blendMode = BLEND_NORMAL, bool mirrorX = false, bool mirrorY = false) = 0;
+ virtual bool displayZoom(int x, int y, Rect32 rect, float zoomX, float zoomY, uint32 alpha = 0xFFFFFFFF, bool transparent = false, TSpriteBlendMode blendMode = BLEND_NORMAL, bool mirrorX = false, bool mirrorY = false) = 0;
virtual bool displayTransform(int x, int y, int hotX, int hotY, Rect32 rect, float zoomX, float zoomY, uint32 alpha, float rotate, TSpriteBlendMode blendMode = BLEND_NORMAL, bool mirrorX = false, bool mirrorY = false) = 0;
virtual bool restore();
virtual bool create(const char *filename, bool defaultCK, byte ckRed, byte ckGreen, byte ckBlue, int lifeTime = -1, bool keepLoaded = false) = 0;
- virtual bool create(int Width, int Height);
+ virtual bool create(int width, int height);
virtual bool putSurface(const Graphics::Surface &surface, bool hasAlpha = false) {
return STATUS_FAILED;
}
diff --git a/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp b/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp index 6913b3434c..7e43b0b7f4 100644 --- a/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp +++ b/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp @@ -619,8 +619,8 @@ void BaseRenderOSystem::dumpData(const char *filename) { BaseSurfaceStorage *Mgr = _gameRef->_surfaceStorage;
- int TotalKB = 0;
- int TotalLoss = 0;
+ int totalKB = 0;
+ int totalLoss = 0;
fprintf(f, "Filename;Usage;Size;KBytes\n");
for (int i = 0; i < Mgr->_surfaces.getSize(); i++) {
BaseSurfaceOSystem *Surf = (BaseSurfaceOSystem *)Mgr->_surfaces[i];
diff --git a/engines/wintermute/base/gfx/osystem/base_surface_osystem.cpp b/engines/wintermute/base/gfx/osystem/base_surface_osystem.cpp index b77abf6a79..aa9cc8474a 100644 --- a/engines/wintermute/base/gfx/osystem/base_surface_osystem.cpp +++ b/engines/wintermute/base/gfx/osystem/base_surface_osystem.cpp @@ -327,8 +327,8 @@ bool BaseSurfaceOSystem::displayTransZoom(int x, int y, Rect32 rect, float zoomX //////////////////////////////////////////////////////////////////////////
-bool BaseSurfaceOSystem::displayZoom(int x, int y, Rect32 rect, float zoomX, float zoomY, uint32 alpha, bool Transparent, TSpriteBlendMode blendMode, bool mirrorX, bool mirrorY) {
- return drawSprite(x, y, &rect, zoomX, zoomY, alpha, !Transparent, blendMode, mirrorX, mirrorY);
+bool BaseSurfaceOSystem::displayZoom(int x, int y, Rect32 rect, float zoomX, float zoomY, uint32 alpha, bool transparent, TSpriteBlendMode blendMode, bool mirrorX, bool mirrorY) {
+ return drawSprite(x, y, &rect, zoomX, zoomY, alpha, !transparent, blendMode, mirrorX, mirrorY);
}
diff --git a/engines/wintermute/base/gfx/osystem/base_surface_osystem.h b/engines/wintermute/base/gfx/osystem/base_surface_osystem.h index 9ed80cec50..8e4370892b 100644 --- a/engines/wintermute/base/gfx/osystem/base_surface_osystem.h +++ b/engines/wintermute/base/gfx/osystem/base_surface_osystem.h @@ -55,7 +55,7 @@ public: bool displayTrans(int x, int y, Rect32 rect, uint32 alpha = 0xFFFFFFFF, TSpriteBlendMode blendMode = BLEND_NORMAL, bool mirrorX = false, bool mirrorY = false);
bool displayTransOffset(int x, int y, Rect32 rect, uint32 alpha = 0xFFFFFFFF, TSpriteBlendMode blendMode = BLEND_NORMAL, bool mirrorX = false, bool mirrorY = false, int offsetX = 0, int offsetY = 0);
bool display(int x, int y, Rect32 rect, TSpriteBlendMode blendMode = BLEND_NORMAL, bool mirrorX = false, bool mirrorY = false);
- bool displayZoom(int x, int y, Rect32 rect, float zoomX, float zoomY, uint32 alpha = 0xFFFFFFFF, bool Transparent = false, TSpriteBlendMode blendMode = BLEND_NORMAL, bool mirrorX = false, bool mirrorY = false);
+ bool displayZoom(int x, int y, Rect32 rect, float zoomX, float zoomY, uint32 alpha = 0xFFFFFFFF, bool transparent = false, TSpriteBlendMode blendMode = BLEND_NORMAL, bool mirrorX = false, bool mirrorY = false);
bool displayTransform(int x, int y, int hotX, int hotY, Rect32 Rect, float zoomX, float zoomY, uint32 alpha, float rotate, TSpriteBlendMode blendMode = BLEND_NORMAL, bool mirrorX = false, bool mirrorY = false);
virtual bool putSurface(const Graphics::Surface &surface, bool hasAlpha = false);
/* static unsigned DLL_CALLCONV ReadProc(void *buffer, unsigned size, unsigned count, fi_handle handle);
diff --git a/engines/wintermute/base/particles/part_emitter.cpp b/engines/wintermute/base/particles/part_emitter.cpp index 8b86365196..f8c0c1a5cf 100644 --- a/engines/wintermute/base/particles/part_emitter.cpp +++ b/engines/wintermute/base/particles/part_emitter.cpp @@ -45,7 +45,7 @@ namespace WinterMute { IMPLEMENT_PERSISTENT(PartEmitter, false)
//////////////////////////////////////////////////////////////////////////
-PartEmitter::PartEmitter(BaseGame *inGame, BaseScriptHolder *Owner) : BaseObject(inGame) {
+PartEmitter::PartEmitter(BaseGame *inGame, BaseScriptHolder *owner) : BaseObject(inGame) {
_width = _height = 0;
BasePlatform::setRectEmpty(&_border);
@@ -88,7 +88,7 @@ PartEmitter::PartEmitter(BaseGame *inGame, BaseScriptHolder *Owner) : BaseObject _useRegion = false;
_emitEvent = NULL;
- _owner = Owner;
+ _owner = owner;
}
@@ -136,9 +136,9 @@ bool PartEmitter::addSprite(const char *filename) { _gameRef->_fileManager->closeFile(File);
}
- char *Str = new char[strlen(filename) + 1];
- strcpy(Str, filename);
- _sprites.add(Str);
+ char *str = new char[strlen(filename) + 1];
+ strcpy(str, filename);
+ _sprites.add(str);
return STATUS_OK;
}
diff --git a/engines/wintermute/base/particles/part_particle.cpp b/engines/wintermute/base/particles/part_particle.cpp index 4a5239edfe..27dbe9999c 100644 --- a/engines/wintermute/base/particles/part_particle.cpp +++ b/engines/wintermute/base/particles/part_particle.cpp @@ -198,7 +198,7 @@ bool PartParticle::display(PartEmitter *emitter) { return STATUS_OK;
}
- _sprite->GetCurrentFrame();
+ _sprite->getCurrentFrame();
return _sprite->display(_pos.x, _pos.y,
NULL,
_scale, _scale,
diff --git a/engines/wintermute/base/scriptables/script.cpp b/engines/wintermute/base/scriptables/script.cpp index 54a04c454f..75c4d38574 100644 --- a/engines/wintermute/base/scriptables/script.cpp +++ b/engines/wintermute/base/scriptables/script.cpp @@ -165,7 +165,7 @@ bool ScScript::initScript() { //////////////////////////////////////////////////////////////////////////
bool ScScript::initTables() {
- uint32 OrigIP = _iP;
+ uint32 origIP = _iP;
readHeader();
// load symbol table
@@ -232,7 +232,7 @@ bool ScScript::initTables() { }
- _iP = OrigIP;
+ _iP = origIP;
return STATUS_OK;
}
@@ -546,7 +546,7 @@ bool ScScript::executeInstruction() { case II_DEF_GLOB_VAR:
case II_DEF_CONST_VAR: {
dw = getDWORD();
- /* char *Temp = _symbols[dw]; // TODO delete */
+ /* char *temp = _symbols[dw]; // TODO delete */
// only create global var if it doesn't exist
if (!_engine->_globals->propExists(_symbols[dw])) {
_operand->setNULL();
@@ -604,8 +604,8 @@ bool ScScript::executeInstruction() { // push var
// push string
str = _stack->pop()->getString();
- char *MethodName = new char[strlen(str) + 1];
- strcpy(MethodName, str);
+ char *methodName = new char[strlen(str) + 1];
+ strcpy(methodName, str);
ScValue *var = _stack->pop();
if (var->_type == VAL_VARIABLE_REF) {
@@ -613,21 +613,21 @@ bool ScScript::executeInstruction() { }
bool res = STATUS_FAILED;
- bool TriedNative = false;
+ bool triedNative = false;
// we are already calling this method, try native
- if (_thread && _methodThread && strcmp(MethodName, _threadEvent) == 0 && var->_type == VAL_NATIVE && _owner == var->getNative()) {
- TriedNative = true;
- res = var->_valNative->scCallMethod(this, _stack, _thisStack, MethodName);
+ if (_thread && _methodThread && strcmp(methodName, _threadEvent) == 0 && var->_type == VAL_NATIVE && _owner == var->getNative()) {
+ triedNative = true;
+ res = var->_valNative->scCallMethod(this, _stack, _thisStack, methodName);
}
if (DID_FAIL(res)) {
- if (var->isNative() && var->getNative()->canHandleMethod(MethodName)) {
+ if (var->isNative() && var->getNative()->canHandleMethod(methodName)) {
if (!_unbreakable) {
- _waitScript = var->getNative()->invokeMethodThread(MethodName);
+ _waitScript = var->getNative()->invokeMethodThread(methodName);
if (!_waitScript) {
_stack->correctParams(0);
- runtimeError("Error invoking method '%s'.", MethodName);
+ runtimeError("Error invoking method '%s'.", methodName);
_stack->pushNULL();
} else {
_state = SCRIPT_WAITING_SCRIPT;
@@ -636,10 +636,10 @@ bool ScScript::executeInstruction() { } else {
// can call methods in unbreakable mode
_stack->correctParams(0);
- runtimeError("Cannot call method '%s'. Ignored.", MethodName);
+ runtimeError("Cannot call method '%s'. Ignored.", methodName);
_stack->pushNULL();
}
- delete[] MethodName;
+ delete[] methodName;
break;
}
/*
@@ -665,29 +665,29 @@ bool ScScript::executeInstruction() { */
else {
res = STATUS_FAILED;
- if (var->_type == VAL_NATIVE && !TriedNative) {
- res = var->_valNative->scCallMethod(this, _stack, _thisStack, MethodName);
+ if (var->_type == VAL_NATIVE && !triedNative) {
+ res = var->_valNative->scCallMethod(this, _stack, _thisStack, methodName);
}
if (DID_FAIL(res)) {
_stack->correctParams(0);
- runtimeError("Call to undefined method '%s'. Ignored.", MethodName);
+ runtimeError("Call to undefined method '%s'. Ignored.", methodName);
_stack->pushNULL();
}
}
}
- delete[] MethodName;
+ delete[] methodName;
}
break;
case II_EXTERNAL_CALL: {
- uint32 SymbolIndex = getDWORD();
+ uint32 symbolIndex = getDWORD();
- TExternalFunction *f = getExternal(_symbols[SymbolIndex]);
+ TExternalFunction *f = getExternal(_symbols[symbolIndex]);
if (f) {
externalCall(_stack, _thisStack, f);
} else {
- _gameRef->ExternalCall(this, _stack, _thisStack, _symbols[SymbolIndex]);
+ _gameRef->externalCall(this, _stack, _thisStack, _symbols[symbolIndex]);
}
break;
@@ -737,8 +737,8 @@ bool ScScript::executeInstruction() { }
case II_POP_VAR: {
- char *VarName = _symbols[getDWORD()];
- ScValue *var = getVar(VarName);
+ char *varName = _symbols[getDWORD()];
+ ScValue *var = getVar(varName);
if (var) {
ScValue *val = _stack->pop();
if (!val) {
@@ -1460,13 +1460,13 @@ bool ScScript::externalCall(ScStack *stack, ScStack *thisStack, ScScript::TExter //////////////////////////////////////////////////////////////////////////
bool ScScript::copyParameters(ScStack *stack) {
int i;
- int NumParams = stack->pop()->getInt();
- for (i = NumParams - 1; i >= 0; i--) {
+ int numParams = stack->pop()->getInt();
+ for (i = numParams - 1; i >= 0; i--) {
_stack->push(stack->getAt(i));
}
- _stack->pushInt(NumParams);
+ _stack->pushInt(numParams);
- for (i = 0; i < NumParams; i++) {
+ for (i = 0; i < numParams; i++) {
stack->pop();
}
diff --git a/engines/wintermute/base/scriptables/script_engine.cpp b/engines/wintermute/base/scriptables/script_engine.cpp index e1aed7ed82..bc8d54ef58 100644 --- a/engines/wintermute/base/scriptables/script_engine.cpp +++ b/engines/wintermute/base/scriptables/script_engine.cpp @@ -227,13 +227,13 @@ byte *ScEngine::getCompiledScript(const char *filename, uint32 *outSize, bool ig CScCachedScript *cachedScript = new CScCachedScript(filename, compBuffer, compSize);
if (cachedScript) {
int index = 0;
- uint32 MinTime = g_system->getMillis();
+ uint32 minTime = g_system->getMillis();
for (int i = 0; i < MAX_CACHED_SCRIPTS; i++) {
if (_cachedScripts[i] == NULL) {
index = i;
break;
- } else if (_cachedScripts[i]->_timestamp <= MinTime) {
- MinTime = _cachedScripts[i]->_timestamp;
+ } else if (_cachedScripts[i]->_timestamp <= minTime) {
+ minTime = _cachedScripts[i]->_timestamp;
index = i;
}
}
@@ -338,13 +338,13 @@ bool ScEngine::tick() { // time sliced script
if (_scripts[i]->_timeSlice > 0) {
- uint32 StartTime = g_system->getMillis();
- while (_scripts[i]->_state == SCRIPT_RUNNING && g_system->getMillis() - StartTime < _scripts[i]->_timeSlice) {
+ uint32 startTime = g_system->getMillis();
+ while (_scripts[i]->_state == SCRIPT_RUNNING && g_system->getMillis() - startTime < _scripts[i]->_timeSlice) {
_currentScript = _scripts[i];
_scripts[i]->executeInstruction();
}
if (_isProfiling && _scripts[i]->_filename) {
- addScriptTime(_scripts[i]->_filename, g_system->getMillis() - StartTime);
+ addScriptTime(_scripts[i]->_filename, g_system->getMillis() - startTime);
}
}
@@ -473,8 +473,8 @@ bool ScEngine::resetObject(BaseObject *Object) { resetScript(_scripts[i]);
}
- bool IsThread = _scripts[i]->_methodThread || _scripts[i]->_thread;
- _scripts[i]->finish(!IsThread); // 1.9b1 - top-level script kills its threads as well
+ bool isThread = _scripts[i]->_methodThread || _scripts[i]->_thread;
+ _scripts[i]->finish(!isThread); // 1.9b1 - top-level script kills its threads as well
}
}
return STATUS_OK;
@@ -707,7 +707,7 @@ bool ScEngine::loadBreakpoints() { int count = _gameRef->_registry->readInt("Debug", "NumBreakpoints", 0);
for (int i = 1; i <= count; i++) {
- /* uint32 BufSize = 512; */
+ /* uint32 bufSize = 512; */
sprintf(key, "Breakpoint%d", i);
AnsiString breakpoint = _gameRef->_registry->readString("Debug", key, "");
diff --git a/engines/wintermute/base/scriptables/script_ext_array.cpp b/engines/wintermute/base/scriptables/script_ext_array.cpp index 0380103cd4..cc3bec89c0 100644 --- a/engines/wintermute/base/scriptables/script_ext_array.cpp +++ b/engines/wintermute/base/scriptables/script_ext_array.cpp @@ -162,9 +162,9 @@ ScValue *SXArray::scGetProperty(const char *name) { // [number]
//////////////////////////////////////////////////////////////////////////
else {
- char ParamName[20];
- if (validNumber(name, ParamName)) {
- return _values->getProp(ParamName);
+ char paramName[20];
+ if (validNumber(name, paramName)) {
+ return _values->getProp(paramName);
} else {
return _scValue;
}
@@ -178,14 +178,14 @@ bool SXArray::scSetProperty(const char *name, ScValue *value) { // Length
//////////////////////////////////////////////////////////////////////////
if (strcmp(name, "Length") == 0) {
- int OrigLength = _length;
+ int origLength = _length;
_length = MAX(value->getInt(0), 0);
- char PropName[20];
- if (_length < OrigLength) {
- for (int i = _length; i < OrigLength; i++) {
- sprintf(PropName, "%d", i);
- _values->deleteProp(PropName);
+ char propName[20];
+ if (_length < origLength) {
+ for (int i = _length; i < origLength; i++) {
+ sprintf(propName, "%d", i);
+ _values->deleteProp(propName);
}
}
return STATUS_OK;
diff --git a/engines/wintermute/base/scriptables/script_ext_file.cpp b/engines/wintermute/base/scriptables/script_ext_file.cpp index 437fbb64a2..4eeabca04d 100644 --- a/engines/wintermute/base/scriptables/script_ext_file.cpp +++ b/engines/wintermute/base/scriptables/script_ext_file.cpp @@ -188,8 +188,8 @@ bool SXFile::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack, script->runtimeError("File.%s: File is not open", name);
stack->pushBool(false);
} else {
- int Pos = stack->pop()->getInt();
- stack->pushBool(setPos(Pos));
+ int pos = stack->pop()->getInt();
+ stack->pushBool(setPos(pos));
}
return STATUS_OK;
}
@@ -703,10 +703,10 @@ bool SXFile::scSetProperty(const char *name, ScValue *value) { // Length
//////////////////////////////////////////////////////////////////////////
if (strcmp(name, "Length")==0){
- int OrigLength = _length;
+ int origLength = _length;
_length = max(value->getInt(0), 0);
- char PropName[20];
+ char propName[20];
if (_length < OrigLength){
for(int i=_length; i<OrigLength; i++){
sprintf(PropName, "%d", i);
diff --git a/engines/wintermute/base/scriptables/script_ext_file.h b/engines/wintermute/base/scriptables/script_ext_file.h index 4d78feb044..d083f96a4a 100644 --- a/engines/wintermute/base/scriptables/script_ext_file.h +++ b/engines/wintermute/base/scriptables/script_ext_file.h @@ -55,7 +55,7 @@ private: void cleanup();
uint32 getPos();
uint32 getLength();
- bool setPos(uint32 Pos, int whence = SEEK_SET);
+ bool setPos(uint32 pos, int whence = SEEK_SET);
char *_filename;
Common::WriteStream *openForWrite(const Common::String &filename, bool binary);
Common::WriteStream *openForAppend(const Common::String &filename, bool binary);
diff --git a/engines/wintermute/base/scriptables/script_ext_mem_buffer.cpp b/engines/wintermute/base/scriptables/script_ext_mem_buffer.cpp index e15af3446e..9bde5d45e7 100644 --- a/engines/wintermute/base/scriptables/script_ext_mem_buffer.cpp +++ b/engines/wintermute/base/scriptables/script_ext_mem_buffer.cpp @@ -47,14 +47,14 @@ SXMemBuffer::SXMemBuffer(BaseGame *inGame, ScStack *stack): BaseScriptable(inGam _buffer = NULL;
_size = 0;
- int NewSize = stack->pop()->getInt();
- resize(MAX(0, NewSize));
+ int newSize = stack->pop()->getInt();
+ resize(MAX(0, newSize));
}
//////////////////////////////////////////////////////////////////////////
-SXMemBuffer::SXMemBuffer(BaseGame *inGame, void *Buffer): BaseScriptable(inGame) {
+SXMemBuffer::SXMemBuffer(BaseGame *inGame, void *buffer): BaseScriptable(inGame) {
_size = 0;
- _buffer = Buffer;
+ _buffer = buffer;
}
@@ -184,11 +184,11 @@ bool SXMemBuffer::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisSt //////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "GetShort") == 0) {
stack->correctParams(1);
- int Start = stack->pop()->getInt();
- if (!checkBounds(script, Start, sizeof(short))) {
+ int start = stack->pop()->getInt();
+ if (!checkBounds(script, start, sizeof(short))) {
stack->pushNULL();
} else {
- stack->pushInt(65536 + * (short *)((byte *)_buffer + Start));
+ stack->pushInt(65536 + * (short *)((byte *)_buffer + start));
}
return STATUS_OK;
@@ -416,7 +416,7 @@ bool SXMemBuffer::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisSt stack->pushBool(false);
} else {
/*
- int Pointer = (int)Val->getMemBuffer();
+ int pointer = (int)Val->getMemBuffer();
memcpy((byte *)_buffer+Start, &Pointer, sizeof(void*));
stack->pushBool(true);
*/
@@ -478,10 +478,10 @@ bool SXMemBuffer::scSetProperty(const char *name, ScValue *value) { // Length
//////////////////////////////////////////////////////////////////////////
if (strcmp(name, "Length")==0){
- int OrigLength = _length;
+ int origLength = _length;
_length = max(value->getInt(0), 0);
- char PropName[20];
+ char propName[20];
if (_length < OrigLength){
for(int i=_length; i<OrigLength; i++){
sprintf(PropName, "%d", i);
diff --git a/engines/wintermute/base/sound/base_sound.cpp b/engines/wintermute/base/sound/base_sound.cpp index 9cd9e4cc75..9bea6be770 100644 --- a/engines/wintermute/base/sound/base_sound.cpp +++ b/engines/wintermute/base/sound/base_sound.cpp @@ -311,7 +311,7 @@ bool BaseSound::setPan(float pan) { //////////////////////////////////////////////////////////////////////////
-bool BaseSound::ApplyFX(TSFXType type, float param1, float param2, float param3, float param4) {
+bool BaseSound::applyFX(TSFXType type, float param1, float param2, float param3, float param4) {
if (!_sound) {
return STATUS_OK;
}
diff --git a/engines/wintermute/base/sound/base_sound.h b/engines/wintermute/base/sound/base_sound.h index 0b033de47d..bb37e55388 100644 --- a/engines/wintermute/base/sound/base_sound.h +++ b/engines/wintermute/base/sound/base_sound.h @@ -71,7 +71,7 @@ public: BaseSound(BaseGame *inGame);
virtual ~BaseSound();
- bool ApplyFX(TSFXType type = SFX_NONE, float param1 = 0, float param2 = 0, float param3 = 0, float param4 = 0);
+ bool applyFX(TSFXType type = SFX_NONE, float param1 = 0, float param2 = 0, float param3 = 0, float param4 = 0);
private:
TSFXType _sFXType;
diff --git a/engines/wintermute/base/sound/base_sound_buffer.cpp b/engines/wintermute/base/sound/base_sound_buffer.cpp index d94f8c61b6..34aee36f1b 100644 --- a/engines/wintermute/base/sound/base_sound_buffer.cpp +++ b/engines/wintermute/base/sound/base_sound_buffer.cpp @@ -88,8 +88,8 @@ BaseSoundBuffer::~BaseSoundBuffer() { //////////////////////////////////////////////////////////////////////////
-void BaseSoundBuffer::setStreaming(bool Streamed, uint32 NumBlocks, uint32 BlockSize) {
- _streamed = Streamed;
+void BaseSoundBuffer::setStreaming(bool streamed, uint32 numBlocks, uint32 blockSize) {
+ _streamed = streamed;
}
diff --git a/engines/wintermute/platform_osystem.cpp b/engines/wintermute/platform_osystem.cpp index a76cc100ce..c7d0c6cfed 100644 --- a/engines/wintermute/platform_osystem.cpp +++ b/engines/wintermute/platform_osystem.cpp @@ -172,12 +172,12 @@ bool BasePlatform::getCursorPos(Point32 *lpPoint) { }
//////////////////////////////////////////////////////////////////////////
-bool BasePlatform::setCursorPos(int X, int Y) {
+bool BasePlatform::setCursorPos(int x, int y) {
BaseRenderOSystem *renderer = static_cast<BaseRenderOSystem *>(_gameRef->_renderer);
Point32 p;
- p.x = X;
- p.y = Y;
+ p.x = x;
+ p.y = y;
renderer->pointToScreen(&p);
// TODO
//SDL_WarpMouseInWindow(renderer->GetSdlWindow(), p.x, p.y);
diff --git a/engines/wintermute/platform_osystem.h b/engines/wintermute/platform_osystem.h index 77a690c207..14b8c959a8 100644 --- a/engines/wintermute/platform_osystem.h +++ b/engines/wintermute/platform_osystem.h @@ -48,7 +48,7 @@ public: static void outputDebugString(const char *lpOutputString);
//static uint32 getTime();
static bool getCursorPos(Point32 *lpPoint);
- static bool setCursorPos(int X, int Y);
+ static bool setCursorPos(int x, int y);
static bool showWindow(int nCmdShow);
static void setCapture();
diff --git a/engines/wintermute/system/sys_instance.h b/engines/wintermute/system/sys_instance.h index 493055a8fd..90336742f8 100644 --- a/engines/wintermute/system/sys_instance.h +++ b/engines/wintermute/system/sys_instance.h @@ -35,7 +35,7 @@ class SystemClass; class SystemInstance {
public:
- SystemInstance(void *Instance, int ID, SystemClass *sysClass);
+ SystemInstance(void *instance, int id, SystemClass *sysClass);
virtual ~SystemInstance();
int getID() const {
diff --git a/engines/wintermute/ui/ui_window.cpp b/engines/wintermute/ui/ui_window.cpp index b9e2ad056f..6aba91b791 100644 --- a/engines/wintermute/ui/ui_window.cpp +++ b/engines/wintermute/ui/ui_window.cpp @@ -733,10 +733,10 @@ bool UIWindow::saveAsText(BaseDynamicBuffer *buffer, int indent) { }
//////////////////////////////////////////////////////////////////////////
-bool UIWindow::enableWidget(const char *name, bool Enable) {
+bool UIWindow::enableWidget(const char *name, bool enable) {
for (int i = 0; i < _widgets.getSize(); i++) {
if (scumm_stricmp(_widgets[i]->getName(), name) == 0) {
- _widgets[i]->_disable = !Enable;
+ _widgets[i]->_disable = !enable;
}
}
return STATUS_OK;
@@ -744,10 +744,10 @@ bool UIWindow::enableWidget(const char *name, bool Enable) { //////////////////////////////////////////////////////////////////////////
-bool UIWindow::showWidget(const char *name, bool Visible) {
+bool UIWindow::showWidget(const char *name, bool visible) {
for (int i = 0; i < _widgets.getSize(); i++) {
if (scumm_stricmp(_widgets[i]->getName(), name) == 0) {
- _widgets[i]->_visible = Visible;
+ _widgets[i]->_visible = visible;
}
}
return STATUS_OK;
diff --git a/engines/wintermute/utils/string_util.cpp b/engines/wintermute/utils/string_util.cpp index f864a8480a..92f6fb202b 100644 --- a/engines/wintermute/utils/string_util.cpp +++ b/engines/wintermute/utils/string_util.cpp @@ -103,8 +103,8 @@ Utf8String StringUtil::wideToUtf8(const WideString &WideStr) { /* size_t WideSize = WideStr.length();
if (sizeof(wchar_t) == 2) {
- size_t Utf8Size = 3 * WideSize + 1;
- char *Utf8StringNative = new char[Utf8Size];
+ size_t utf8Size = 3 * WideSize + 1;
+ char *utf8StringNative = new char[Utf8Size];
const UTF16 *SourceStart = reinterpret_cast<const UTF16 *>(WideStr.c_str());
const UTF16 *SourceEnd = SourceStart + WideSize;
@@ -122,8 +122,8 @@ Utf8String StringUtil::wideToUtf8(const WideString &WideStr) { delete[] Utf8StringNative;
return ResultString;
} else if (sizeof(wchar_t) == 4) {
- size_t Utf8Size = 4 * WideSize + 1;
- char *Utf8StringNative = new char[Utf8Size];
+ size_t utf8Size = 4 * WideSize + 1;
+ char *utf8StringNative = new char[Utf8Size];
const UTF32 *SourceStart = reinterpret_cast<const UTF32 *>(WideStr.c_str());
const UTF32 *SourceEnd = SourceStart + WideSize;
@@ -175,7 +175,7 @@ WideString StringUtil::ansiToWide(const AnsiString &str) { // using default os locale!
/* setlocale(LC_CTYPE, "");
- size_t WideSize = mbstowcs(NULL, str.c_str(), 0) + 1;
+ size_t wideSize = mbstowcs(NULL, str.c_str(), 0) + 1;
wchar_t *wstr = new wchar_t[WideSize];
mbstowcs(wstr, str.c_str(), WideSize);
WideString ResultString(wstr);
@@ -194,7 +194,7 @@ AnsiString StringUtil::wideToAnsi(const WideString &wstr) { warning("StringUtil::WideToAnsi - WideString not supported yet");
}
/* setlocale(LC_CTYPE, "");
- size_t WideSize = wcstombs(NULL, wstr.c_str(), 0) + 1;
+ size_t wideSize = wcstombs(NULL, wstr.c_str(), 0) + 1;
char *str = new char[WideSize];
wcstombs(str, wstr.c_str(), WideSize);
AnsiString ResultString(str);
@@ -260,8 +260,8 @@ bool StringUtil::endsWith(const AnsiString &str, const AnsiString &pattern, bool }
//////////////////////////////////////////////////////////////////////////
-bool StringUtil::isUtf8BOM(const byte *Buffer, uint32 BufferSize) {
- if (BufferSize > 3 && Buffer[0] == 0xEF && Buffer[1] == 0xBB && Buffer[2] == 0xBF) {
+bool StringUtil::isUtf8BOM(const byte *buffer, uint32 bufferSize) {
+ if (bufferSize > 3 && buffer[0] == 0xEF && buffer[1] == 0xBB && buffer[2] == 0xBF) {
return true;
} else {
return false;
diff --git a/engines/wintermute/utils/utils.cpp b/engines/wintermute/utils/utils.cpp index 3336cf63e2..3050a36263 100644 --- a/engines/wintermute/utils/utils.cpp +++ b/engines/wintermute/utils/utils.cpp @@ -40,9 +40,9 @@ static inline unsigned Sqr(int x) { // Swap - swaps two integers
//////////////////////////////////////////////////////////////////////////////////
void BaseUtils::swap(int *a, int *b) {
- int Temp = *a;
+ int temp = *a;
*a = *b;
- *b = Temp;
+ *b = temp;
}
@@ -150,11 +150,11 @@ float BaseUtils::randomFloat(float from, float to) { }
//////////////////////////////////////////////////////////////////////////
-float BaseUtils::randomAngle(float From, float To) {
- while (To < From) {
- To += 360;
+float BaseUtils::randomAngle(float from, float to) {
+ while (to < from) {
+ to += 360;
}
- return normalizeAngle(randomFloat(From, To));
+ return normalizeAngle(randomFloat(from, to));
}
//////////////////////////////////////////////////////////////////////////
@@ -217,10 +217,10 @@ bool BaseUtils::matchesPattern(const char *pattern, const char *string) { //////////////////////////////////////////////////////////////////////////
-void BaseUtils::RGBtoHSL(uint32 RGBColor, byte *outH, byte *outS, byte *outL) {
- float varR = (RGBCOLGetR(RGBColor) / 255.0f);
- float varG = (RGBCOLGetG(RGBColor) / 255.0f);
- float varB = (RGBCOLGetB(RGBColor) / 255.0f);
+void BaseUtils::RGBtoHSL(uint32 rgbColor, byte *outH, byte *outS, byte *outL) {
+ float varR = (RGBCOLGetR(rgbColor) / 255.0f);
+ float varG = (RGBCOLGetG(rgbColor) / 255.0f);
+ float varB = (RGBCOLGetB(rgbColor) / 255.0f);
//Min. value of RGB
float varMin = MIN(varR, varG);
diff --git a/engines/wintermute/utils/utils.h b/engines/wintermute/utils/utils.h index 3cb01c57b8..5b3ce65470 100644 --- a/engines/wintermute/utils/utils.h +++ b/engines/wintermute/utils/utils.h @@ -55,7 +55,7 @@ public: static bool matchesPattern(const char *pattern, const char *string);
- static void RGBtoHSL(uint32 RGBColor, byte *OutH, byte *OutS, byte *OutL);
+ static void RGBtoHSL(uint32 rgbColor, byte *outH, byte *outS, byte *outL);
static uint32 HSLtoRGB(byte H, byte S, byte L);
private:
diff --git a/engines/wintermute/video/video_player.cpp b/engines/wintermute/video/video_player.cpp index 66ec926582..a4c81d12b5 100644 --- a/engines/wintermute/video/video_player.cpp +++ b/engines/wintermute/video/video_player.cpp @@ -39,12 +39,12 @@ namespace WinterMute { ////////////////////////////////////////////////////////////////////////// VideoPlayer::VideoPlayer(BaseGame *inGame): BaseClass(inGame) { - SetDefaults(); + setDefaults(); } ////////////////////////////////////////////////////////////////////////// -bool VideoPlayer::SetDefaults() { +bool VideoPlayer::setDefaults() { _playing = false; /* _aviFile = NULL; @@ -145,7 +145,7 @@ bool VideoPlayer::initialize(const char *inFilename, const char *SubtitleFile) { #if 0 cleanup(); - char Filename[MAX_PATH_LENGTH]; + char filename[MAX_PATH_LENGTH]; _gameRef->_fileManager->GetFullPath(inFilename, filename); // open file @@ -270,9 +270,9 @@ bool VideoPlayer::update() { // process subtitles _showSubtitle = false; while (_currentSubtitle < _subtitles.getSize()) { - int End = _subtitles[_currentSubtitle]->m_EndFrame; + int end = _subtitles[_currentSubtitle]->m_EndFrame; - bool NextFrameOK = (_currentSubtitle < _subtitles.getSize() - 1 && _subtitles[_currentSubtitle + 1]->_startFrame <= sample); + bool nextFrameOK = (_currentSubtitle < _subtitles.getSize() - 1 && _subtitles[_currentSubtitle + 1]->_startFrame <= sample); if (sample > End) { if (NextFrameOK) { @@ -324,7 +324,7 @@ bool VideoPlayer::display() { // display subtitle if (m_ShowSubtitle) { BaseFont *font = _gameRef->_videoFont ? _gameRef->_videoFont : _gameRef->_systemFont; - int Height = font->GetTextHeight((BYTE *)m_Subtitles[_currentSubtitle]->_text, _gameRef->_renderer->_width); + int height = font->GetTextHeight((BYTE *)m_Subtitles[_currentSubtitle]->_text, _gameRef->_renderer->_width); font->drawText((byte *)_subtitles[m_CurrentSubtitle]->_text, 0, _gameRef->_renderer->_height - Height - 5, _gameRef->_renderer->_width, TAL_CENTER); } @@ -337,7 +337,7 @@ bool VideoPlayer::display() { ////////////////////////////////////////////////////////////////////////// -bool VideoPlayer::play(TVideoPlayback Type, int X, int Y, bool FreezeMusic) { +bool VideoPlayer::play(TVideoPlayback type, int x, int y, bool FreezeMusic) { #if 0 if (!_videoStream || !_vidRenderer) { return STATUS_FAILED; @@ -351,8 +351,8 @@ bool VideoPlayer::play(TVideoPlayback Type, int X, int Y, bool FreezeMusic) { break; case VID_PLAY_STRETCH: { - float ZoomX = (float)((float)_gameRef->_renderer->m_Width / (float)_videoFormat->bmiHeader.biWidth * 100); - float ZoomY = (float)((float)_gameRef->_renderer->m_Height / (float)_videoFormat->bmiHeader.biHeight * 100); + float zoomX = (float)((float)_gameRef->_renderer->m_Width / (float)_videoFormat->bmiHeader.biWidth * 100); + float zoomY = (float)((float)_gameRef->_renderer->m_Height / (float)_videoFormat->bmiHeader.biHeight * 100); _playZoom = min(ZoomX, ZoomY); _playPosX = (_gameRef->_renderer->_width - _videoFormat->bmiHeader.biWidth * (_playZoom / 100)) / 2; _playPosY = (_gameRef->_renderer->_height - _videoFormat->bmiHeader.biHeight * (_playZoom / 100)) / 2; @@ -431,7 +431,7 @@ bool VideoPlayer::loadSubtitles(const char *filename, const char *SubtitleFile) return STATUS_OK; } - char NewFile[MAX_PATH_LENGTH]; + char newFile[MAX_PATH_LENGTH]; char drive[_MAX_DRIVE]; char dir[_MAX_DIR]; char fname[_MAX_FNAME]; @@ -443,35 +443,35 @@ bool VideoPlayer::loadSubtitles(const char *filename, const char *SubtitleFile) _makepath(NewFile, drive, dir, fname, ".SUB"); } - DWORD Size; - BYTE *Buffer = _gameRef->m_FileManager->readWholeFile(NewFile, &Size, false); + DWORD size; + BYTE *buffer = _gameRef->m_FileManager->readWholeFile(NewFile, &Size, false); if (Buffer == NULL) { return STATUS_OK; // no subtitles } LONG Start, End; - bool InToken; - char *TokenStart; - int TokenLength; - int TokenPos; - int TextLength; - - int Pos = 0; - int LineLength = 0; + bool inToken; + char *tokenStart; + int tokenLength; + int tokenPos; + int textLength; + + int pos = 0; + int lineLength = 0; while (Pos < Size) { - Start = End = -1; - InToken = false; - TokenPos = -1; - TextLength = 0; + start = End = -1; + inToken = false; + tokenPos = -1; + textLength = 0; - LineLength = 0; + lineLength = 0; while (Pos + LineLength < Size && Buffer[Pos + LineLength] != '\n' && Buffer[Pos + LineLength] != '\0') { - LineLength++; + lineLength++; } - int RealLength = LineLength - (Pos + LineLength >= Size ? 0 : 1); - char *Text = new char[RealLength + 1]; + int realLength = LineLength - (Pos + LineLength >= Size ? 0 : 1); + char *text = new char[RealLength + 1]; char *line = (char *)&Buffer[Pos]; for (int i = 0; i < RealLength; i++) { @@ -487,7 +487,7 @@ bool VideoPlayer::loadSubtitles(const char *filename, const char *SubtitleFile) } else if (line[i] == '}') { if (InToken) { InToken = false; - char *Token = new char[TokenLength + 1]; + char *token = new char[TokenLength + 1]; strncpy(Token, TokenStart, TokenLength); Token[TokenLength] = '\0'; if (TokenPos == 0) { diff --git a/engines/wintermute/video/video_player.h b/engines/wintermute/video/video_player.h index 8e82a44076..4c02506094 100644 --- a/engines/wintermute/video/video_player.h +++ b/engines/wintermute/video/video_player.h @@ -42,22 +42,22 @@ class VideoPlayer : public BaseClass { public: bool _showSubtitle; int _currentSubtitle; - bool loadSubtitles(const char *filename, const char *SubtitleFile); + bool loadSubtitles(const char *filename, const char *subtitleFile); bool _slowRendering; bool isPlaying(); char *_filename; bool stop(); - bool play(TVideoPlayback Type = VID_PLAY_CENTER, int X = 0, int Y = 0, bool FreezeMusic = true); + bool play(TVideoPlayback Type = VID_PLAY_CENTER, int x = 0, int y = 0, bool freezeMusic = true); uint32 _totalVideoTime; uint32 _startTime; //CVidRenderer *_vidRenderer; //BaseSoundAVI *_sound; bool _soundAvailable; - bool SetDefaults(); + bool setDefaults(); bool _playing; bool display(); bool update(); - bool initialize(const char *inFilename, const char *SubtitleFile = NULL); + bool initialize(const char *inFilename, const char *subtitleFile = NULL); bool cleanup(); VideoPlayer(BaseGame *inGame); virtual ~VideoPlayer(); diff --git a/engines/wintermute/video/video_theora_player.cpp b/engines/wintermute/video/video_theora_player.cpp index 59c83c3a52..6468f02524 100644 --- a/engines/wintermute/video/video_theora_player.cpp +++ b/engines/wintermute/video/video_theora_player.cpp @@ -212,9 +212,9 @@ bool VideoTheoraPlayer::play(TVideoPlayback type, int x, int y, bool freezeGame, break; case VID_PLAY_STRETCH: { - float ZoomX = (float)((float)_gameRef->_renderer->_width / width * 100); - float ZoomY = (float)((float)_gameRef->_renderer->_height / height * 100); - _playZoom = MIN(ZoomX, ZoomY); + float zoomX = (float)((float)_gameRef->_renderer->_width / width * 100); + float zoomY = (float)((float)_gameRef->_renderer->_height / height * 100); + _playZoom = MIN(zoomX, zoomY); _posX = (int)((_gameRef->_renderer->_width - width * (_playZoom / 100)) / 2); _posY = (int)((_gameRef->_renderer->_height - height * (_playZoom / 100)) / 2); } @@ -278,7 +278,7 @@ bool VideoTheoraPlayer::update() { if (_theoraDecoder->getTimeToNextFrame() == 0) { _surface.copyFrom(*_theoraDecoder->decodeNextFrame()); if (_texture) { - WriteVideo(); + writeVideo(); } } return STATUS_OK; @@ -308,7 +308,7 @@ bool VideoTheoraPlayer::update() { if (m_PlaybackStarted && !m_FreezeGame && _gameRef->m_State == GAME_FROZEN) return STATUS_OK; - int Counter = 0; + int counter = 0; while (true) { if (m_Sound) DecodeVorbis(); else m_AudioFrameReady = true; @@ -354,7 +354,7 @@ bool VideoTheoraPlayer::update() { // if our buffers either don't exist or are ready to go, // we can begin playback - bool StartNow = false; + bool startNow = false; if ((!m_TheoraStreams || m_VideoFrameReady) && (!m_VorbisStreams || m_AudioFrameReady)) StartNow = true; // same if we've run out of input @@ -389,7 +389,7 @@ uint32 VideoTheoraPlayer::getMovieTime() { } ////////////////////////////////////////////////////////////////////////// -bool VideoTheoraPlayer::WriteVideo() { +bool VideoTheoraPlayer::writeVideo() { if (!_texture) { return STATUS_FAILED; } @@ -492,13 +492,13 @@ inline int intlog(int num) { } ////////////////////////////////////////////////////////////////////////// -bool VideoTheoraPlayer::SeekToTime(uint32 time) { +bool VideoTheoraPlayer::seekToTime(uint32 time) { warning("VideoTheoraPlayer::SeekToTime(%d) - not supported", time); #if 0 if (!m_TheoraStreams) return STATUS_FAILED; - float TargetTime = Time / 1000.0f; + float targetTime = Time / 1000.0f; ogg_page page; diff --git a/engines/wintermute/video/video_theora_player.h b/engines/wintermute/video/video_theora_player.h index 58fe700d75..fe71ae0f35 100644 --- a/engines/wintermute/video/video_theora_player.h +++ b/engines/wintermute/video/video_theora_player.h @@ -65,10 +65,10 @@ public: bool initialize(const Common::String &filename, const Common::String &subtitleFile = NULL); bool initializeSimple(); bool update(); - bool play(TVideoPlayback type = VID_PLAY_CENTER, int x = 0, int y = 0, bool freezeGame = false, bool freezeMusic = true, bool Looping = false, uint32 startTime = 0, float forceZoom = -1.0f, int volume = -1); + bool play(TVideoPlayback type = VID_PLAY_CENTER, int x = 0, int y = 0, bool freezeGame = false, bool freezeMusic = true, bool looping = false, uint32 startTime = 0, float forceZoom = -1.0f, int volume = -1); bool stop(); bool display(uint32 alpha = 0xFFFFFFFF); - //bool RenderFrame(BaseSurface *Texture, yuv_buffer *yuv); + //bool renderFrame(BaseSurface *texture, yuv_buffer *yuv); bool pause(); bool resume(); @@ -101,7 +101,7 @@ public: __inline byte getAlphaAt(int x, int y); void writeAlpha(); - bool SeekToTime(uint32 Time); + bool seekToTime(uint32 Time); void cleanup(); @@ -135,7 +135,7 @@ private: bool _videoFrameReady; float _videobufTime; - bool WriteVideo(); + bool writeVideo(); bool _playbackStarted; diff --git a/engines/wintermute/wintermute.cpp b/engines/wintermute/wintermute.cpp index ac9c3b7fbf..21ee65b832 100644 --- a/engines/wintermute/wintermute.cpp +++ b/engines/wintermute/wintermute.cpp @@ -174,8 +174,8 @@ int WinterMuteEngine::init() { else param[0] = '\0'; if (strcmp(param, "") != 0) { - char *IniDir = BaseUtils::GetPath(param); - char *IniName = BaseUtils::GetFilename(param); + char *iniDir = BaseUtils::GetPath(param); + char *iniName = BaseUtils::GetFilename(param); // switch to ini's dir warning("TODO: Place ini-files somewhere"); @@ -201,7 +201,7 @@ int WinterMuteEngine::init() { _game->_smartCache = false; } - /* bool AllowDirectDraw = _game->_registry->readBool("Debug", "AllowDirectDraw", false);*/ + /* bool allowDirectDraw = _game->_registry->readBool("Debug", "AllowDirectDraw", false);*/ // load general game settings _game->initialize1(); @@ -245,7 +245,7 @@ int WinterMuteEngine::init() { // load game - uint32 DataInitStart = g_system->getMillis(); + uint32 dataInitStart = g_system->getMillis(); if (DID_FAIL(_game->loadFile(_game->_settingsGameFile ? _game->_settingsGameFile : "default.game"))) { _game->LOG(ret, "Error loading game file. Exiting."); @@ -257,7 +257,7 @@ int WinterMuteEngine::init() { _game->_renderer->_ready = true; _game->_miniUpdateEnabled = true; - _game->LOG(0, "Engine initialized in %d ms", g_system->getMillis() - DataInitStart); + _game->LOG(0, "Engine initialized in %d ms", g_system->getMillis() - dataInitStart); _game->LOG(0, ""); if (ConfMan.hasKey("save_slot")) { @@ -316,8 +316,8 @@ int WinterMuteEngine::messageLoop() { { if (!::IsIconic(_game->_renderer->_window)) { - int PosX = _game->_renderer->_windowRect.left; - int PosY = _game->_renderer->_windowRect.top; + int posX = _game->_renderer->_windowRect.left; + int posY = _game->_renderer->_windowRect.top; PosX -= _game->_renderer->_monitorRect.left; PosY -= _game->_renderer->_monitorRect.top; |