HDB: Fix space formatting

This commit is contained in:
Nipun Garg 2019-06-25 00:26:39 +05:30 committed by Eugene Sandulenko
parent f49b4d3221
commit a28eb3e60e
6 changed files with 26 additions and 26 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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];
}

View File

@ -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;
}
}

View File

@ -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 == ' ')

View File

@ -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)