diff options
author | Nipun Garg | 2019-06-25 00:26:39 +0530 |
---|---|---|
committer | Eugene Sandulenko | 2019-09-03 17:16:59 +0200 |
commit | a28eb3e60e377a87d75b0760f07215eb7ea45848 (patch) | |
tree | f2a2da25cb3aedab0ba93e1758f956daddad81c6 /engines | |
parent | f49b4d3221bcf33b6907eda7b9cc8b892845043d (diff) | |
download | scummvm-rg350-a28eb3e60e377a87d75b0760f07215eb7ea45848.tar.gz scummvm-rg350-a28eb3e60e377a87d75b0760f07215eb7ea45848.tar.bz2 scummvm-rg350-a28eb3e60e377a87d75b0760f07215eb7ea45848.zip |
HDB: Fix space formatting
Diffstat (limited to 'engines')
-rw-r--r-- | engines/hdb/ai-cinematic.cpp | 10 | ||||
-rw-r--r-- | engines/hdb/ai-lists.cpp | 12 | ||||
-rw-r--r-- | engines/hdb/ai-waypoint.cpp | 4 | ||||
-rw-r--r-- | engines/hdb/ai.h | 2 | ||||
-rw-r--r-- | engines/hdb/draw-manager.cpp | 6 | ||||
-rw-r--r-- | engines/hdb/map-loader.cpp | 18 |
6 files changed, 26 insertions, 26 deletions
diff --git a/engines/hdb/ai-cinematic.cpp b/engines/hdb/ai-cinematic.cpp index 8d502598d3..4b906bdf3a 100644 --- a/engines/hdb/ai-cinematic.cpp +++ b/engines/hdb/ai-cinematic.cpp @@ -77,7 +77,7 @@ void AI::processCines() { g_hdb->_window->checkDialogClose(0, 0); // Make sure Cine Pics are drawing - for (int i = 0;i < _numCineBlitList;i++) { + for (int i = 0; i < _numCineBlitList; i++) { if (_cineBlitList[i]->masked == false) _cineBlitList[i]->pic->draw(_cine[i]->x, _cine[i]->y); else @@ -86,7 +86,7 @@ void AI::processCines() { // TODO: Check for Game Pause - for (uint i = 0; i < _cine.size();i++) { + for (uint i = 0; i < _cine.size(); i++) { debug(3, "processCines: [%d] %s now: %d start: %d delay: %d", i, cineTypeStr[_cine[i]->cmdType], g_system->getMillis(), _cine[i]->start, _cine[i]->delay); @@ -405,7 +405,7 @@ void AI::cineAddToBlitList(const char *id, Picture *pic, int x, int y, bool mask } Picture *AI::cineFindInBlitList(const char *name) { - for (int i = 0; i < _numCineBlitList;i++) { + for (int i = 0; i < _numCineBlitList; i++) { if (Common::matchString(_cineBlitList[i]->id, name)) return _cineBlitList[i]->pic; } @@ -413,7 +413,7 @@ Picture *AI::cineFindInBlitList(const char *name) { } void AI::cineRemoveFromBlitList(const char *name) { - for (int i = 0; i < _numCineBlitList;i++) { + for (int i = 0; i < _numCineBlitList; i++) { if (Common::matchString(_cineBlitList[i]->id, name)) delete _cineBlitList[i]; for (; i < _numCineBlitList - 1; i++) @@ -434,7 +434,7 @@ void AI::cineAddToFreeList(Picture *pic) { } void AI::cineFreeGfx() { - for (int i = 0;i < _numCineFreeList;i++) { + for (int i = 0; i < _numCineFreeList; i++) { delete _cineFreeList[i]; } _numCineFreeList = 0; diff --git a/engines/hdb/ai-lists.cpp b/engines/hdb/ai-lists.cpp index b113f4a6f0..174729bf66 100644 --- a/engines/hdb/ai-lists.cpp +++ b/engines/hdb/ai-lists.cpp @@ -65,7 +65,7 @@ void AI::addAnimateTarget(int x, int y, int start, int end, AnimSpeed speed, boo char name[32]; uint32 size; - for (int i = start;i <= end;i++) { + for (int i = start; i <= end; i++) { if (i < 10) snprintf(name, 32, "%s0%d", tileName, i + 1); else @@ -177,7 +177,7 @@ void AI::addToActionList(int actionIndex, int x, int y, char *luaFuncInt, char * // Checks if the location passed-in matches an action pair. // If so, activate it if possible. Returns TRUE for finding pair. bool AI::checkActionList(AIEntity *e, int x, int y, bool lookAndGrab) { - for (int i = 0;i < kMaxActions;i++) { + for (int i = 0; i < kMaxActions; i++) { if ((_actions[i].x1 == x && _actions[i].y1 == y) || (_actions[i].x2 == x && _actions[i].y2 == y)) { int targetX = _actions[i].x2; int targetY = _actions[i].y2; @@ -227,7 +227,7 @@ void AI::addToAutoList(int x, int y, const char *luaFuncInit, const char *luaFun const char *get; - for (int i = 0;i < kMaxAutoActions;i++) { + for (int i = 0; i < kMaxAutoActions; i++) { if (!_autoActions[i].x) { _autoActions[i].x = x; _autoActions[i].y = y; @@ -254,7 +254,7 @@ void AI::addToAutoList(int x, int y, const char *luaFuncInit, const char *luaFun } void AI::autoDeactivate(int x, int y) { - for (int i = 0; i < kMaxAutoActions;i++) { + for (int i = 0; i < kMaxAutoActions; i++) { if (_autoActions[i].x == x && _autoActions[i].y == y) { _autoActions[i].activated = false; return; @@ -387,7 +387,7 @@ bool AI::activateAction(AIEntity *e, int x, int y, int targetX, int targetY) { } bool AI::checkAutoList(AIEntity *e, int x, int y) { - for (int i = 0;i < kMaxAutoActions;i++) { + for (int i = 0; i < kMaxAutoActions; i++) { if (_autoActions[i].x == x && _autoActions[i].y == y && !_autoActions[i].activated) { debug(1, "Activating action for Entity: %s, x: %d, y: %d", e->entityName, x, y); bool success = activateAction(e, x, y, 0, 0); @@ -408,7 +408,7 @@ bool AI::checkAutoList(AIEntity *e, int x, int y) { } bool AI::autoActive(int x, int y) { - for (int i = 0;i < kMaxAutoActions;i++) { + for (int i = 0; i < kMaxAutoActions; i++) { if (_autoActions[i].x == x && _autoActions[i].y == y) { if (!_autoActions[i].activated) return false; diff --git a/engines/hdb/ai-waypoint.cpp b/engines/hdb/ai-waypoint.cpp index 976ba4baa8..70847aba8b 100644 --- a/engines/hdb/ai-waypoint.cpp +++ b/engines/hdb/ai-waypoint.cpp @@ -29,7 +29,7 @@ void AI::addWaypoint(int px, int py, int x, int y, int level) { return; // Check for duplicates - for (int i = 0;i < _numWaypoints;i++) + for (int i = 0; i < _numWaypoints; i++) if (_waypoints[i].x == x && _waypoints[i].y == y) return; @@ -56,7 +56,7 @@ void AI::removeFirstWaypoint() { return; int i; - for (i = 0;i < _numWaypoints;i++) { + for (i = 0; i < _numWaypoints; i++) { _waypoints[i] = _waypoints[i + 1]; } diff --git a/engines/hdb/ai.h b/engines/hdb/ai.h index 32cca0a96f..96f0e6ded2 100644 --- a/engines/hdb/ai.h +++ b/engines/hdb/ai.h @@ -544,7 +544,7 @@ struct AnimTarget { Tile *gfxList[kMaxAnimTFrames]; AnimTarget() : x(0), y(0), start(0), end(0), vel(0), animCycle(0), animFrame(0), killAuto(false), inMap(false) { - for (int i = 0; i < kMaxAnimTFrames;i++) { + for (int i = 0; i < kMaxAnimTFrames; i++) { gfxList[i] = new Tile; } } diff --git a/engines/hdb/draw-manager.cpp b/engines/hdb/draw-manager.cpp index f4edcb7a68..23bfb35832 100644 --- a/engines/hdb/draw-manager.cpp +++ b/engines/hdb/draw-manager.cpp @@ -194,7 +194,7 @@ Tile *DrawMan::getTile(int index) { } void DrawMan::cacheTileSequence(int tileIndex, int count) { - for (int i = tileIndex;i < tileIndex + count;i++) + for (int i = tileIndex; i < tileIndex + count; i++) getTile(i); } @@ -450,7 +450,7 @@ bool DrawMan::loadFont(const char *string) { int startPos = stream->pos(); // Position after _fontHeader int curPos; // Position after reading cInfo uint16 *ptr; - for (int i = 0; i < _fontHeader.numChars;i++) { + for (int i = 0; i < _fontHeader.numChars; i++) { cInfo = new CharInfo; cInfo->width = (int16)stream->readUint32LE(); cInfo->offset = (int32)stream->readUint32LE(); @@ -497,7 +497,7 @@ void DrawMan::drawText(const char *string) { unsigned char c; char cr[256]; // Carriage Return Array - for (int i = 0; i < (int)strlen(string);i++) { + for (int i = 0; i < (int)strlen(string); i++) { c = string[i]; width += _charInfoBlocks[c]->width + _fontHeader.kerning + kFontIncrement; if (c == ' ') diff --git a/engines/hdb/map-loader.cpp b/engines/hdb/map-loader.cpp index 182e761e1e..25ff4ea6e2 100644 --- a/engines/hdb/map-loader.cpp +++ b/engines/hdb/map-loader.cpp @@ -27,21 +27,21 @@ namespace HDB { Map::Map() { _mapLoaded = false; - for (int i = 0; i < kMaxGratings;i++) { + for (int i = 0; i < kMaxGratings; i++) { _gratings[i] = new Foreground; } - for (int i = 0; i < kMaxForegrounds;i++) { + for (int i = 0; i < kMaxForegrounds; i++) { _foregrounds[i] = new Foreground; } } Map::~Map() { - for (int i = 0; i < kMaxGratings;i++) { + for (int i = 0; i < kMaxGratings; i++) { delete _gratings[i]; } - for (int i = 0; i < kMaxForegrounds;i++) { + for (int i = 0; i < kMaxForegrounds; i++) { delete _foregrounds[i]; } } @@ -145,7 +145,7 @@ bool Map::load(Common::SeekableReadStream *stream) { _mapX = _mapY = 0; // Setup animating Tile lists - for (int i = 0; i < _width*_height;i++) { + for (int i = 0; i < _width*_height; i++) { addBGTileAnimation(i % _width, i / _width); addFGTileAnimation(i % _width, i / _width); } @@ -408,7 +408,7 @@ bool Map::load(Common::SeekableReadStream *stream) { // Scan all icons and init all Entities warning("STUB: Map::load: SetupProgressBar"); - for (int i = 0; i < _iconNum;i++) { + for (int i = 0; i < _iconNum; i++) { // Don't spawn Action Mode Entities in Puzzle Mode if (!g_hdb->getActionMode()) { switch (aiInfo[_iconList[i].icon].type) { @@ -683,7 +683,7 @@ void Map::drawEnts() { } void Map::drawGratings() { - for (int i = 0; i < kMaxGratings;i++) { + for (int i = 0; i < kMaxGratings; i++) { g_hdb->_drawMan->getTile(_gratings[i]->tile)->drawMasked(_gratings[i]->x, _gratings[i]->y); } @@ -691,7 +691,7 @@ void Map::drawGratings() { } void Map::drawForegrounds() { - for (int i = 0; i < kMaxForegrounds;i++) { + for (int i = 0; i < kMaxForegrounds; i++) { g_hdb->_drawMan->getTile(_foregrounds[i]->tile)->drawMasked(_foregrounds[i]->x, _foregrounds[i]->y); } @@ -928,7 +928,7 @@ void Map::centerMapXY(int x, int y) { } bool Map::checkOneTileExistInRange(int tileIndex, int count) { - for (int i = 0; i < _width*_height;i++) { + for (int i = 0; i < _width*_height; i++) { if (_background[i] >= tileIndex && _background[i] < tileIndex + count) return true; if (_foreground[i] >= tileIndex && _foreground[i] < tileIndex + count) |