[Scummvm-cvs-logs] CVS: scummvm/queen bankman.cpp,1.7,1.8 command.cpp,1.77,1.78 credits.cpp,1.8,1.9 cutaway.cpp,1.136,1.137 display.cpp,1.74,1.75 graphics.cpp,1.107,1.108 grid.cpp,1.6,1.7 logic.cpp,1.210,1.211 logic.h,1.121,1.122 music.cpp,1.24,1.25 queen.cpp,1.97,1.98 resource.cpp,1.53,1.54 sound.cpp,1.45,1.46 talk.cpp,1.109,1.110 walk.cpp,1.44,1.45
Gregory Montoir
cyx at users.sourceforge.net
Tue Nov 23 14:26:02 CET 2004
Update of /cvsroot/scummvm/scummvm/queen
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12794/queen
Modified Files:
bankman.cpp command.cpp credits.cpp cutaway.cpp display.cpp
graphics.cpp grid.cpp logic.cpp logic.h music.cpp queen.cpp
resource.cpp sound.cpp talk.cpp walk.cpp
Log Message:
cleanup, follow code conventions
Index: bankman.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/bankman.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- bankman.cpp 3 Oct 2004 21:34:37 -0000 1.7
+++ bankman.cpp 23 Nov 2004 22:21:20 -0000 1.8
@@ -32,7 +32,7 @@
}
BankManager::~BankManager() {
- for(uint32 i = 0; i < MAX_BANKS_NUMBER; ++i) {
+ for (uint32 i = 0; i < MAX_BANKS_NUMBER; ++i) {
close(i);
}
eraseFrames(true);
Index: command.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/command.cpp,v
retrieving revision 1.77
retrieving revision 1.78
diff -u -d -r1.77 -r1.78
--- command.cpp 17 Oct 2004 19:00:09 -0000 1.77
+++ command.cpp 23 Nov 2004 22:21:21 -0000 1.78
@@ -122,7 +122,8 @@
}
Command::Command(QueenEngine *vm)
- : _cmdText((vm->resource()->getLanguage() == HEBREW), CmdText::COMMAND_Y_POS, vm), _vm(vm) {
+ : _cmdList(NULL), _cmdArea(NULL), _cmdObject(NULL), _cmdInventory(NULL), _cmdGameState(NULL),
+ _cmdText((vm->resource()->getLanguage() == HEBREW), CmdText::COMMAND_Y_POS, vm), _vm(vm) {
}
Command::~Command() {
Index: credits.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/credits.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- credits.cpp 8 Oct 2004 18:43:23 -0000 1.8
+++ credits.cpp 23 Nov 2004 22:21:25 -0000 1.9
@@ -95,7 +95,7 @@
/* wait until next room */
if (0 == _pause)
_pause = -1;
- for(i = 0; i < _count; i++) {
+ for (i = 0; i < _count; i++) {
_vm->display()->textCurrentColor(_list[i].color);
_vm->display()->setText(_list[i].x, _list[i].y, _list[i].text);
}
Index: cutaway.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/cutaway.cpp,v
retrieving revision 1.136
retrieving revision 1.137
diff -u -d -r1.136 -r1.137
--- cutaway.cpp 8 Oct 2004 18:43:23 -0000 1.136
+++ cutaway.cpp 23 Nov 2004 22:21:25 -0000 1.137
@@ -426,7 +426,7 @@
if (object.fromObject > 0) {
/* Copy FROM_OBJECT into OBJECT */
- if(object.objectNumber != object.fromObject) {
+ if (object.objectNumber != object.fromObject) {
_vm->logic()->objectCopy(object.fromObject, object.objectNumber);
} else {
// Same object, so just turn it on!
@@ -1130,7 +1130,7 @@
bool update = false;
if (stateIndex > 0) {
- if(_vm->logic()->gameState(stateIndex) == stateValue)
+ if (_vm->logic()->gameState(stateIndex) == stateValue)
update = true;
} else {
_vm->logic()->gameState(ABS(stateIndex), stateValue);
Index: display.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/display.cpp,v
retrieving revision 1.74
retrieving revision 1.75
diff -u -d -r1.74 -r1.75
--- display.cpp 22 Nov 2004 22:16:42 -0000 1.74
+++ display.cpp 23 Nov 2004 22:21:26 -0000 1.75
@@ -279,25 +279,25 @@
int i;
switch (roomNum) {
case 31:
- for(i = 72; i < 84; i++) {
+ for (i = 72; i < 84; i++) {
_pal.room[i * 3 + 1] = _pal.room[i * 3 + 1] * 90 / 100;
_pal.room[i * 3 + 2] = _pal.room[i * 3 + 2] * 70 / 100;
}
break;
case 29:
- for(i = 72; i < 84; i++) {
+ for (i = 72; i < 84; i++) {
_pal.room[i * 3 + 1] = _pal.room[i * 3 + 1] * 60 / 100;
_pal.room[i * 3 + 2] = _pal.room[i * 3 + 2] * 60 / 100;
}
break;
case 30:
- for(i = 72; i < 84; i++) {
+ for (i = 72; i < 84; i++) {
_pal.room[i * 3 + 0] = _pal.room[i * 3 + 0] * 60 / 100;
_pal.room[i * 3 + 1] = _pal.room[i * 3 + 1] * 80 / 100;
}
break;
case 28:
- for(i = 72; i < 84; i++) {
+ for (i = 72; i < 84; i++) {
_pal.room[i * 3 + 0] = _pal.room[i * 3 + 0] * 80 / 100;
_pal.room[i * 3 + 2] = _pal.room[i * 3 + 1] * 60 / 100;
}
@@ -321,12 +321,12 @@
switch (roomNum) {
case 123: {
static int16 j = 0, jdir = 2;
- for(i = 96; i < 111; ++i) {
+ for (i = 96; i < 111; ++i) {
_pal.screen[i * 3 + 0] = MIN(255, _pal.room[i * 3 + 0] + j * 8);
_pal.screen[i * 3 + 1] = MIN(255, _pal.room[i * 3 + 1] + j * 4);
}
j += jdir;
- if(j <= 0 || j >= 18) {
+ if (j <= 0 || j >= 18) {
jdir = -jdir;
}
loPal = 96;
@@ -335,12 +335,12 @@
break;
case 124: {
static int16 j = 0,jdir = 2;
- for(i = 80; i < 144; ++i) {
+ for (i = 80; i < 144; ++i) {
_pal.screen[i * 3 + 0] = MIN(255, _pal.room[i * 3 + 0] + j * 8);
_pal.screen[i * 3 + 1] = MIN(255, _pal.room[i * 3 + 1] + j * 4);
}
j += jdir;
- if(j <= 0 || j >= 14) {
+ if (j <= 0 || j >= 14) {
jdir = -jdir;
if (_rnd.getRandomNumber(1)) {
if (ABS(jdir) == 1) {
@@ -361,7 +361,7 @@
hiPal = 95;
break;
case 100:
- if(scrollx & 1) {
+ if (scrollx & 1) {
palScroll(128, 132);
palScroll(133, 137);
palScroll(138, 143);
@@ -370,14 +370,14 @@
}
break;
case 102:
- if(scrollx & 1) {
+ if (scrollx & 1) {
palScroll(112, 127);
loPal = 112;
hiPal = 127;
}
break;
case 62:
- if(scrollx & 1) {
+ if (scrollx & 1) {
palScroll(108, 119);
loPal = 108;
hiPal = 119;
@@ -389,7 +389,7 @@
hiPal = 123;
break;
case 59:
- if(scrollx & 1) {
+ if (scrollx & 1) {
palScroll(56, 63);
loPal = 56;
hiPal = 63;
@@ -405,24 +405,24 @@
palScroll(88, 91);
palScroll(92, 95);
palScroll(128, 135);
- if(scrollx & 1) {
+ if (scrollx & 1) {
palScroll(136, 143);
}
loPal = 28;
hiPal = 143;
break;
case 40:
- if(scrollx & 1) {
+ if (scrollx & 1) {
palScroll(96, 103);
}
- if(scrollx & 3) {
+ if (scrollx & 3) {
palScroll(104, 107);
}
loPal = 96;
hiPal = 107;
break;
case 97:
- if(scrollx & 1) {
+ if (scrollx & 1) {
palScroll(96, 107);
palScroll(108, 122);
loPal = 96;
@@ -436,7 +436,7 @@
break;
case 57:
palScroll(128, 143);
- if(scrollx & 1) {
+ if (scrollx & 1) {
palScroll(96, 103);
}
loPal = 96;
@@ -448,7 +448,7 @@
hiPal = 95;
break;
case 2:
- if(scrollx & 1) {
+ if (scrollx & 1) {
palScroll(120, 127);
loPal = 120;
hiPal = 127;
@@ -456,7 +456,7 @@
break;
case 3:
case 5:
- if(scrollx & 1) {
+ if (scrollx & 1) {
palScroll(128, 135);
palScroll(136, 143);
loPal = 128;
@@ -464,14 +464,14 @@
}
break;
case 7:
- if(scrollx & 1) {
+ if (scrollx & 1) {
palScroll(119, 127);
loPal = 119;
hiPal = 127;
}
break;
case 42:
- if(scrollx & 1) {
+ if (scrollx & 1) {
palScroll(118, 127);
palScroll(136, 143);
loPal = 118;
@@ -479,7 +479,7 @@
}
break;
case 4:
- if(scrollx & 1) {
+ if (scrollx & 1) {
palScroll(32,47);
}
palScroll(64, 70);
@@ -488,7 +488,7 @@
hiPal = 79;
break;
case 8:
- if(scrollx & 1) {
+ if (scrollx & 1) {
palScroll(120, 127);
}
loPal = 120;
@@ -496,7 +496,7 @@
break;
case 12:
case 64:
- if(scrollx & 1) {
+ if (scrollx & 1) {
palScroll(112, 119);
palScroll(120, 127);
loPal = 112;
@@ -721,9 +721,9 @@
}
} else if (!xflip) { // Masked bitmap unflipped
while (h--) {
- for(int i = 0; i < w; ++i) {
+ for (int i = 0; i < w; ++i) {
uint8 b = *(srcBuf + i);
- if(b != 0) {
+ if (b != 0) {
*(dstBuf + i) = b;
}
}
@@ -732,9 +732,9 @@
}
} else { // Masked bitmap flipped
while (h--) {
- for(int i = 0; i < w; ++i) {
+ for (int i = 0; i < w; ++i) {
uint8 b = *(srcBuf + i);
- if(b != 0) {
+ if (b != 0) {
*(dstBuf - i) = b;
}
}
@@ -907,7 +907,7 @@
uint8 c = *chr++;
if (c != 0) {
for (i = 0; i < 8; ++i) {
- if(c & 0x80) {
+ if (c & 0x80) {
*p = color;
}
++p;
@@ -969,9 +969,10 @@
}
void Display::blankScreenEffect1() {
+ static const int inc[] = { -1, 1 };
uint8 buf[32 * 32];
while (_vm->input()->idleTime() >= Input::DELAY_SCREEN_BLANKER) {
- for(int i = 0; i < 2; ++i) {
+ for (int i = 0; i < 2; ++i) {
uint16 x = _rnd.getRandomNumber(SCREEN_W - 32 - 2) + 1;
uint16 y = _rnd.getRandomNumber(SCREEN_H - 32 - 2) + 1;
uint8 *p = _screenBuf + SCREEN_W * y + x;
@@ -982,7 +983,6 @@
p += SCREEN_W;
q += 32;
}
- const int inc[] = { -1, 1 };
x += inc[_rnd.getRandomNumber(1)];
y += inc[_rnd.getRandomNumber(1)];
_system->copyRectToScreen(buf, 32, x, y, 32, 32);
Index: graphics.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/graphics.cpp,v
retrieving revision 1.107
retrieving revision 1.108
diff -u -d -r1.107 -r1.108
--- graphics.cpp 17 Oct 2004 19:06:35 -0000 1.107
+++ graphics.cpp 23 Nov 2004 22:21:28 -0000 1.108
@@ -86,26 +86,26 @@
}
void BobSlot::moveOneStep() {
- if(xmajor) {
- if(x == endx) {
+ if (xmajor) {
+ if (x == endx) {
y = endy;
moving = false;
} else {
x += xdir;
total += dy;
- if(total > dx) {
+ if (total > dx) {
y += ydir;
total -= dx;
}
}
} else {
- if(y == endy) {
+ if (y == endy) {
x = endx;
moving = false;
} else {
y += ydir;
total += dx;
- if(total > dy) {
+ if (total > dy) {
x += xdir;
total -= dy;
}
@@ -116,7 +116,7 @@
void BobSlot::animOneStep() {
if (anim.string.buffer != NULL) {
--anim.speed;
- if(anim.speed <= 0) {
+ if (anim.speed <= 0) {
// jump to next entry
++anim.string.curPos;
uint16 nextFrame = anim.string.curPos->frame;
@@ -131,7 +131,7 @@
} else {
// normal looping animation
--anim.speed;
- if(anim.speed == 0) {
+ if (anim.speed == 0) {
anim.speed = anim.speedBak;
int16 nextFrame = frameNum + frameDir;
@@ -259,7 +259,7 @@
const Box *box = (bs->box == BobSlot::_defaultBox) ? bbox : &bs->box;
- if(w != 0 && h != 0 && box->intersects(x, y, w, h)) {
+ if (w != 0 && h != 0 && box->intersects(x, y, w, h)) {
uint8 *src = bf->data;
uint16 x_skip = 0;
uint16 y_skip = 0;
@@ -333,7 +333,7 @@
uint8* dst = _shrinkBuffer.data;
for (y = 0; y < new_h; ++y) {
uint8 *p = bf->data + sh[y] * bf->width;
- for(x = 0; x < new_w; ++x) {
+ for (x = 0; x < new_w; ++x) {
*dst++ = *(p + sh[x]);
}
}
@@ -400,13 +400,13 @@
}
void Graphics::clearBobs() {
- for(int32 i = 0; i < ARRAYSIZE(_bobs); ++i) {
+ for (int32 i = 0; i < ARRAYSIZE(_bobs); ++i) {
_bobs[i].clear();
}
}
void Graphics::stopBobs() {
- for(int32 i = 0; i < ARRAYSIZE(_bobs); ++i) {
+ for (int32 i = 0; i < ARRAYSIZE(_bobs); ++i) {
_bobs[i].moving = false;
}
}
Index: grid.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/grid.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- grid.cpp 17 Oct 2004 19:00:09 -0000 1.6
+++ grid.cpp 23 Nov 2004 22:21:29 -0000 1.7
@@ -92,7 +92,7 @@
if (screen == GS_PANEL) {
y -= ROOM_ZONE_HEIGHT;
}
- for(i = 1; i < MAX_ZONES_NUMBER; ++i) {
+ for (i = 1; i < MAX_ZONES_NUMBER; ++i) {
const ZoneSlot *pzs = &_zones[screen][i];
if (pzs->valid && pzs->box.contains(x, y)) {
return i;
@@ -114,7 +114,7 @@
void Grid::clear(GridScreen screen) {
debug(9, "Grid::clear(%d)", screen);
- for(int i = 1; i < MAX_ZONES_NUMBER; ++i) {
+ for (int i = 1; i < MAX_ZONES_NUMBER; ++i) {
_zones[screen][i].valid = false;
}
}
@@ -161,7 +161,7 @@
}
void Grid::drawZones() {
- for(int i = 1; i < MAX_ZONES_NUMBER; ++i) {
+ for (int i = 1; i < MAX_ZONES_NUMBER; ++i) {
const ZoneSlot *pzs = &_zones[GS_ROOM][i];
if (pzs->valid) {
const Box *b = &pzs->box;
@@ -227,7 +227,7 @@
uint16 room = _vm->logic()->currentRoom();
uint16 scale = 100;
uint16 areaNum = findAreaForPos(GS_ROOM, x, y);
- if(areaNum != 0) {
+ if (areaNum != 0) {
scale = _area[room][areaNum].calcScale(y);
}
return scale;
Index: logic.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/logic.cpp,v
retrieving revision 1.210
retrieving revision 1.211
diff -u -d -r1.210 -r1.211
--- logic.cpp 23 Nov 2004 21:51:26 -0000 1.210
+++ logic.cpp 23 Nov 2004 22:21:29 -0000 1.211
@@ -68,6 +68,9 @@
memset(_talkSelected, 0, sizeof(_talkSelected));
_puzzleAttemptCount = 0;
_journal = new Journal(vm);
+ _scene = 0;
+ memset(_gameState, 0, sizeof(_gameState));
+ initialise();
}
Logic::~Logic() {
@@ -85,7 +88,7 @@
delete[] _graphicAnim;
}
-void Logic::start() {
+void Logic::initialise() {
int16 i;
uint8 *jas = _vm->resource()->loadFile("QUEEN.JAS", 20);
@@ -187,7 +190,7 @@
_currentRoom = _objectData[_entryObj].room;
_entryObj = 0;
- if(memcmp(ptr, _vm->resource()->JASVersion(), 5) != 0) {
+ if (memcmp(ptr, _vm->resource()->JASVersion(), 5) != 0) {
warning("Unexpected queen.jas file format");
}
@@ -250,10 +253,10 @@
for (i = 1; i <= _numAFile; i++) {
_aFile.push_back(queen2jas.nextLine());
}
+}
+void Logic::start() {
_vm->command()->clear(false);
- _scene = 0;
- memset(_gameState, 0, sizeof(_gameState));
_vm->display()->setupPanel();
_vm->graphics()->unpackControlBank();
_vm->graphics()->setupMouseCursor();
@@ -261,6 +264,7 @@
_vm->grid()->setupPanel();
_oldRoom = 0;
+ _newRoom = _currentRoom;
}
ObjectData* Logic::objectData(int index) const {
@@ -285,7 +289,7 @@
if (img <= -10) {
// object has been turned off, but the image order hasn't been updated
- if(_graphicData[-(img + 10)].lastFrame != 0) {
+ if (_graphicData[-(img + 10)].lastFrame != 0) {
bobtype = 1;
}
} else if (img == -2) {
Index: logic.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/logic.h,v
retrieving revision 1.121
retrieving revision 1.122
diff -u -d -r1.121 -r1.122
--- logic.h 23 Nov 2004 21:51:30 -0000 1.121
+++ logic.h 23 Nov 2004 22:21:31 -0000 1.122
@@ -207,6 +207,8 @@
protected:
+ void initialise();
+
void asmMakeJoeUseDress();
void asmMakeJoeUseNormalClothes();
void asmMakeJoeUseUnderwear();
Index: music.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/music.cpp,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- music.cpp 10 Nov 2004 17:54:51 -0000 1.24
+++ music.cpp 23 Nov 2004 22:21:32 -0000 1.25
@@ -186,7 +186,7 @@
if ((tuneList + 1) == 3) {
_randomLoop = true;
int i = 0;
- while(Sound::_jungleList[i])
+ while (Sound::_jungleList[i])
queueSong(Sound::_jungleList[i++] - 1);
return;
}
@@ -211,10 +211,10 @@
int i = 0;
if (_numSongs == 40) {
- while(Sound::_tuneDemo[tuneList].tuneNum[i])
+ while (Sound::_tuneDemo[tuneList].tuneNum[i])
queueSong(Sound::_tuneDemo[tuneList].tuneNum[i++] - 1);
} else {
- while(Sound::_tune[tuneList].tuneNum[i])
+ while (Sound::_tune[tuneList].tuneNum[i])
queueSong(Sound::_tune[tuneList].tuneNum[i++] - 1);
}
Index: queen.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/queen.cpp,v
retrieving revision 1.97
retrieving revision 1.98
diff -u -d -r1.97 -r1.98
--- queen.cpp 23 Nov 2004 21:51:30 -0000 1.97
+++ queen.cpp 23 Nov 2004 22:21:33 -0000 1.98
@@ -290,9 +290,6 @@
int QueenEngine::go() {
_logic->start();
- _logic->oldRoom(0);
- _logic->newRoom(_logic->currentRoom());
-
_quit = false;
while (!_quit) {
// queen.c lines 4080-4104
Index: resource.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/resource.cpp,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -d -r1.53 -r1.54
--- resource.cpp 15 Nov 2004 19:38:57 -0000 1.53
+++ resource.cpp 23 Nov 2004 22:21:42 -0000 1.54
@@ -65,7 +65,7 @@
_resourceFile->close();
delete _resourceFile;
- if(_resourceTable != _resourceTablePEM10)
+ if (_resourceTable != _resourceTablePEM10)
delete[] _resourceTable;
}
Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/sound.cpp,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -d -r1.45 -r1.46
--- sound.cpp 1 Oct 2004 14:48:49 -0000 1.45
+++ sound.cpp 23 Nov 2004 22:21:43 -0000 1.46
@@ -79,10 +79,10 @@
void Sound::waitFinished(bool isSpeech) {
if (isSpeech)
- while(_speechHandle.isActive())
+ while (_speechHandle.isActive())
_vm->input()->delay(10);
else
- while(_sfxHandle.isActive())
+ while (_sfxHandle.isActive())
_vm->input()->delay(10);
}
Index: talk.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/talk.cpp,v
retrieving revision 1.109
retrieving revision 1.110
diff -u -d -r1.109 -r1.110
--- talk.cpp 22 Nov 2004 22:16:50 -0000 1.109
+++ talk.cpp 23 Nov 2004 22:21:43 -0000 1.110
@@ -123,7 +123,7 @@
int16 head = _dialogueTree[level][0].head;
// TODO: split this loop in several functions
- while(retval != -1) {
+ while (retval != -1) {
char otherVoiceFilePrefix[MAX_STRING_SIZE];
_talkString[0][0] = '\0';
Index: walk.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/walk.cpp,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -d -r1.44 -r1.45
--- walk.cpp 3 Oct 2004 21:34:39 -0000 1.44
+++ walk.cpp 23 Nov 2004 22:21:45 -0000 1.45
@@ -170,7 +170,7 @@
k *= ((k * ds) / pwd->area->box.yDiff()) / 2;
}
- if(ABS(pwd->dx) < k) {
+ if (ABS(pwd->dx) < k) {
if (pwd->dy < 0) {
if (mpd->walkBack1 > 0) {
pwd->anim.set(mpd->walkBack1, mpd->walkBack2, DIR_BACK);
@@ -182,7 +182,7 @@
} else if (pwd->dy > 0) {
if (mpd->walkFront1 > 0) {
pwd->anim.set(mpd->walkFront1, mpd->walkFront2, DIR_FRONT);
- } else if(ABS(mpd->walkLeft1) == ABS(mpd->walkRight1)) {
+ } else if (ABS(mpd->walkLeft1) == ABS(mpd->walkRight1)) {
if (pwd->dx < 0) {
pwd->anim.set(mpd->walkLeft1, mpd->walkLeft2, DIR_FRONT);
} else {
@@ -272,7 +272,7 @@
debug(9, "Walk::moveJoe(%d, %d, %d, %d, %d) - old = %d, new = %d", direction, oldx, oldy, endx, endy, oldPos, newPos);
// if in cutaway, allow Joe to walk anywhere
- if(newPos == 0 && inCutaway) {
+ if (newPos == 0 && inCutaway) {
incWalkData(oldx, oldy, endx, endy, oldPos);
} else {
if (calc(oldPos, newPos, oldx, oldy, endx, endy)) {
@@ -470,10 +470,10 @@
// the X,Y coord to be in this area
if (recalibrate) {
b = &_roomArea[pos].box;
- if(*x < b->x1) *x = b->x1;
- if(*x > b->x2) *x = b->x2;
- if(*y < b->y1) *y = b->y1;
- if(*y > b->y2) *y = b->y2;
+ if (*x < b->x1) *x = b->x1;
+ if (*x > b->x2) *x = b->x2;
+ if (*y < b->y1) *y = b->y1;
+ if (*y > b->y2) *y = b->y2;
}
return pos;
}
@@ -486,7 +486,7 @@
int b = _roomAreaCount - testArea;
if (map & (1 << b)) {
// connecting area, check if it's been struck off
- if(!isAreaStruck(testArea)) {
+ if (!isAreaStruck(testArea)) {
// legitimate connecting area, keep it
freeArea = testArea;
break;
@@ -524,7 +524,7 @@
++_areaListCount;
assert(_areaListCount < MAX_WALK_DATA);
_areaList[_areaListCount] = area;
- if(!isAreaStruck(area)) {
+ if (!isAreaStruck(area)) {
++_areaStrikeCount;
assert(_areaStrikeCount < MAX_WALK_DATA);
_areaStrike[_areaStrikeCount] = area;
More information about the Scummvm-git-logs
mailing list