AVALANCHE: Janitorial - Removing trailing spaces and tabs

This commit is contained in:
Strangerke 2013-11-22 21:31:39 +01:00
parent b76b301d4f
commit 93e5d415c6
13 changed files with 46 additions and 46 deletions

View File

@ -248,7 +248,7 @@ void AnimationType::walk() {
break;
case kMagicUnfinished: {
bounce();
Common::String tmpStr = Common::String::format("%c%cSorry.%cThis place is not available yet!",
Common::String tmpStr = Common::String::format("%c%cSorry.%cThis place is not available yet!",
kControlBell, kControlCenter, kControlRoman);
_anim->_vm->_dialogs->displayText(tmpStr);
}

View File

@ -157,7 +157,7 @@ private:
void followAvalotY(byte tripnum);
void backAndForth(byte tripnum);
void faceAvvy(byte tripnum);
// Movements for Homing NPCs: Spludwick and Geida.
void spin(Direction dir, byte &tripnum);
void takeAStep(byte &tripnum);

View File

@ -42,7 +42,7 @@ AvalancheEngine::AvalancheEngine(OSystem *syst, const AvalancheGameDescription *
_system->getTimeAndDate(time);
_rnd->setSeed(time.tm_sec + time.tm_min + time.tm_hour);
_showDebugLines = false;
_clock = nullptr;
_graphics = nullptr;
_parser = nullptr;
@ -352,7 +352,7 @@ void AvalancheEngine::synchronize(Common::Serializer &sz) {
sz.syncAsByte(_timer->_times[i]._action);
sz.syncAsByte(_timer->_times[i]._reason);
}
}
bool AvalancheEngine::canSaveGameStateCurrently() { // TODO: Refine these!!!
@ -469,9 +469,9 @@ bool AvalancheEngine::loadGame(const int16 slot) {
_animation->animLink();
_background->update();
Common::String tmpStr = Common::String::format("%cLoaded: %c%s.ASG%c%c%c%s%c%csaved on %s.",
kControlItalic, kControlRoman, description.c_str(), kControlCenter, kControlNewLine,
kControlNewLine, _roomnName.c_str(), kControlNewLine, kControlNewLine,
Common::String tmpStr = Common::String::format("%cLoaded: %c%s.ASG%c%c%c%s%c%csaved on %s.",
kControlItalic, kControlRoman, description.c_str(), kControlCenter, kControlNewLine,
kControlNewLine, _roomnName.c_str(), kControlNewLine, kControlNewLine,
expandDate(t.tm_mday, t.tm_mon, t.tm_year).c_str());
_dialogs->displayText(tmpStr);

View File

@ -291,7 +291,7 @@ public:
void newGame(); // This sets up the DNA for a completely new game.
bool getFlag(char x);
bool decreaseMoney(uint16 amount); // Called pennycheck in the original.
Common::String getName(People whose);
Common::String getItem(byte which); // Called get_better in the original.
Common::String f5Does(); // This procedure determines what f5 does.

View File

@ -143,7 +143,7 @@ void Clock::update() {
if ((_hour == 0) && (_oldHour != 0) && (_oldHour != 17717)) {
Common::String tmpStr = Common::String::format("Good morning!%c%cYes, it's just past " \
"midnight. Are you having an all-night Avvy session? Glad you like the game that much!",
"midnight. Are you having an all-night Avvy session? Glad you like the game that much!",
kControlNewLine, kControlNewLine);
_vm->_dialogs->displayText(tmpStr);
}
@ -184,7 +184,7 @@ void Clock::chime() {
// Mute - skip the sound generation
if ((_oldHour == 17717) || (!_vm->_soundFx))
return;
byte hour = _hour % 12;
if (hour == 0)
hour = 12;
@ -194,7 +194,7 @@ void Clock::chime() {
for (int i = 1; i <= hour; i++) {
for (int j = 1; j <= 3; j++)
_vm->_sound->playNote((i % 3) * 64 + 140 - j * 30, 50 - j * 12);
if (i != hour)
if (i != hour)
_vm->_system->delayMillis(100);
}
}
@ -999,7 +999,7 @@ void AvalancheEngine::enterRoom(Room roomId, byte ped) {
case kRoomDucks:
_npcFacing = 1; // Duck.
break;
break;
default:
break;
@ -1064,7 +1064,7 @@ void AvalancheEngine::drawScore() {
_scoreToDisplay[i] = numbers[i];
}
void AvalancheEngine::incScore(byte num) {
void AvalancheEngine::incScore(byte num) {
for (int i = 1; i <= num; i++) {
_dnascore++;
@ -1311,9 +1311,9 @@ void AvalancheEngine::fadeOut() {
void AvalancheEngine::fadeIn() {
if (_holdTheDawn || !_fxHidden)
return;
_fxHidden = false;
byte pal[3];
for (int i = 15; i >= 0; i--) {
for (int j = 0; j < 16; j++) {
@ -1380,7 +1380,7 @@ uint16 AvalancheEngine::bearing(byte whichPed) {
if (avvy->_x == curPed->_x)
return 0;
int16 deltaX = avvy->_x - curPed->_x;
int16 deltaY = avvy->_y - curPed->_y;
uint16 result = (uint16)(atan((float)(deltaY / deltaX)) * 180 / M_PI);
@ -1391,7 +1391,7 @@ uint16 AvalancheEngine::bearing(byte whichPed) {
}
}
/**
/**
* @remarks Originally called 'sprite_run'
*/
void AvalancheEngine::spriteRun() {
@ -1566,7 +1566,7 @@ Common::String AvalancheEngine::getName(People whose) {
static const char lads[17][20] = {
"Avalot", "Spludwick", "Crapulus", "Dr. Duck", "Malagauche",
"Friar Tuck", "Robin Hood", "Cwytalot", "du Lustie", "the Duke of Cardiff",
"Dogfood", "A trader", "Ibythneth", "Ayles", "Port",
"Dogfood", "A trader", "Ibythneth", "Ayles", "Port",
"Spurge", "Jacques"
};
@ -1748,10 +1748,10 @@ void AvalancheEngine::openDoor(Room whither, byte ped, byte magicnum) {
}
void AvalancheEngine::setRoom(People persId, Room roomId) {
_whereIs[persId - kPeopleAvalot] = roomId;
_whereIs[persId - kPeopleAvalot] = roomId;
}
Room AvalancheEngine::getRoom(People persId) {
return _whereIs[persId - kPeopleAvalot];
return _whereIs[persId - kPeopleAvalot];
}
} // End of namespace Avalanche

View File

@ -40,7 +40,7 @@ public:
Clock(AvalancheEngine *vm);
void update();
private:
static const int kCenterX = 510;
static const int kCenterY = 183;

View File

@ -251,7 +251,7 @@ void Background::update() {
if (_nextBell < 5)
_nextBell = 12;
_nextBell--;
// CHECKME: 2 is a guess. No length in the original?
// CHECKME: 2 is a guess. No length in the original?
_vm->_sound->playNote(_vm->kNotes[_nextBell], 2);
break;
case 2:

View File

@ -375,7 +375,7 @@ void Dialogs::scrollModeMusic() {
else
store(kPitchHigher, played);
}
if (theyMatch(played)) {
setReadyLight(0);
_vm->_timer->addTimer(8, Timer::kProcJacquesWakesUp, Timer::kReasonJacquesWakingUp);
@ -502,7 +502,7 @@ void Dialogs::drawScroll(DialogFunctionType modeFunc) {
_underScroll = (my + 3) * 2; // Multiplying because of the doubled screen height.
ringBell();
_vm->_dropsOk = false;
dodgem();
@ -510,7 +510,7 @@ void Dialogs::drawScroll(DialogFunctionType modeFunc) {
unDodgem();
_vm->_dropsOk = true;
resetScrollDriver();
}
@ -597,7 +597,7 @@ Common::String Dialogs::displayMoney() {
else
result = Common::String::format("%d/%d", _vm->_money / 12, _vm->_money % 12);
} else { // L, s & d
result = Common::String::format("\x9C%d.%d.%d", _vm->_money / 240, (_vm->_money / 12) % 20,
result = Common::String::format("\x9C%d.%d.%d", _vm->_money / 240, (_vm->_money / 12) % 20,
_vm->_money % 12);
}
if (_vm->_money > 12) {
@ -636,7 +636,7 @@ void Dialogs::solidify(byte n) {
/**
* @remarks Originally called 'calldriver'
* Display text by calling the dialog driver. It unifies the function of the original
* Display text by calling the dialog driver. It unifies the function of the original
* 'calldriver' and 'display' by using Common::String instead of a private buffer.
*/
void Dialogs::displayText(Common::String text) {
@ -717,7 +717,7 @@ void Dialogs::displayText(Common::String text) {
PedType *quasiPed = &_vm->_peds[kQuasipeds[_param - 10]._whichPed];
_talkX = quasiPed->_x;
_talkY = quasiPed->_y; // Position.
_vm->_graphics->setDialogColor(kQuasipeds[_param - 10]._backgroundColor, kQuasipeds[_param - 10]._textColor);
} else {
_vm->errorLed(); // Not valid.
@ -732,7 +732,7 @@ void Dialogs::displayText(Common::String text) {
return;
break;
// CHECME: The whole kControlNegative block seems completely unused, as the only use (the easter egg check) is a false positive
// CHECME: The whole kControlNegative block seems completely unused, as the only use (the easter egg check) is a false positive
case kControlNegative:
switch (_param) {
case 1:
@ -777,7 +777,7 @@ void Dialogs::displayText(Common::String text) {
break;
case 11:
for (int j = 0; j < kObjectNum; j++) {
if (_vm->_objects[j])
if (_vm->_objects[j])
displayText(_vm->getItem(j) + ", " + kControlToBuffer);
}
break;
@ -830,7 +830,7 @@ int16 Dialogs::getTalkPosX() {
bool Dialogs::displayQuestion(Common::String question) {
displayText(question + kControlNewLine + kControlQuestion);
if (_scReturn && (_vm->_rnd->getRandomNumber(1) == 0)) { // Half-and-half chance.
Common::String tmpStr = Common::String::format("...Positive about that?%cI%c%c%c", kControlRegister, kControlIcon, kControlNewLine, kControlQuestion);
displayText(tmpStr); // Be annoying!
@ -874,7 +874,7 @@ void Dialogs::loadFont() {
* @remarks Originally called 'musical_scroll'
*/
void Dialogs::displayMusicalScroll() {
Common::String tmpStr = Common::String::format("To play the harp...%c%cUse these keys:%c%cQ W E R T Y U I O P [ ]%c%cOr press Enter to stop playing.%c",
Common::String tmpStr = Common::String::format("To play the harp...%c%cUse these keys:%c%cQ W E R T Y U I O P [ ]%c%cOr press Enter to stop playing.%c",
kControlNewLine, kControlNewLine, kControlNewLine, kControlInsertSpaces, kControlNewLine, kControlNewLine, kControlToBuffer);
displayText(tmpStr);
@ -1019,7 +1019,7 @@ void Dialogs::talkTo(byte whom) {
case 1: // Fallthrough is intended.
case 2: {
Common::String objStr = _vm->getItem(AvalancheEngine::kSpludwicksOrder[_vm->_givenToSpludwick]);
Common::String tmpStr = Common::String::format("Can you get me %s, please?%c2%c",
Common::String tmpStr = Common::String::format("Can you get me %s, please?%c2%c",
objStr.c_str(), kControlRegister, kControlSpeechBubble);
displayText(tmpStr);
}

View File

@ -81,12 +81,12 @@ enum VerbCode {
kVerbCodeRestart = 31, kVerbCodeEat = 32, kVerbCodeListen = 33, kVerbCodeBuy = 34, kVerbCodeAttack = 35,
kVerbCodePasswd = 36, kVerbCodeDir = 37, kVerbCodeDie = 38, kVerbCodeScore = 39, kVerbCodePut = 40,
kVerbCodeKiss = 41, kVerbCodeClimb = 42, kVerbCodeJump = 43, kVerbCodeHiscores = 44, kVerbCodeWake = 45,
kVerbCodeHello = 46, kVerbCodeThanks = 47,
kVerbCodeHello = 46, kVerbCodeThanks = 47,
kVerbCodeSmartAlec = 249, kVerbCodeExpletive = 253, kVerbCodePardon = 254
};
enum MouseCursor {
kCurUpArrow = 0, kCurScrewDriver = 1, kCurRightArrow = 2, kCurFletch = 3, kCurWait = 4, kCurHand = 5,
kCurUpArrow = 0, kCurScrewDriver = 1, kCurRightArrow = 2, kCurFletch = 3, kCurWait = 4, kCurHand = 5,
kCurCrosshair = 6, kCurIBeam = 7
};

View File

@ -573,7 +573,7 @@ void GraphicManager::drawPicture(Graphics::Surface &target, const Graphics::Surf
if (destX + maxX > target.w)
maxX = target.w - destX;
if (destY + maxY > target.h)
maxY = target.h - destY;
@ -624,7 +624,7 @@ void GraphicManager::drawSign(Common::String fn, int16 xl, int16 yl, int16 y) {
}
}
}
drawPicture(_scrolls, sign, kScreenWidth / 2 - width / 2, y);
file.close();
@ -669,7 +669,7 @@ void GraphicManager::prepareBubble(int xc, int xw, int my, Common::Point points[
drawTriangle(points, _talkBackgroundColor);
}
/**
/**
* Set the background of the text to the desired color.
*/
void GraphicManager::wipeChar(int x, int y, Color color) {

View File

@ -64,7 +64,7 @@ void HeadType::highlight() {
// Force reload and redraw of cursor.
_menu->_vm->_currentMouse = 177;
}
bool HeadType::parseAltTrigger(char key) {
@ -141,8 +141,8 @@ void MenuItem::display() {
void MenuItem::wipe() {
CursorMan.showMouse(false);
_menu->drawMenuText(_menu->_menuBar._menuItems[_menu->_activeMenuItem._activeNum]._xpos, 1,
_menu->_menuBar._menuItems[_menu->_activeMenuItem._activeNum]._trigger,
_menu->drawMenuText(_menu->_menuBar._menuItems[_menu->_activeMenuItem._activeNum]._xpos, 1,
_menu->_menuBar._menuItems[_menu->_activeMenuItem._activeNum]._trigger,
_menu->_menuBar._menuItems[_menu->_activeMenuItem._activeNum]._title, true, false);
_activeNow = false;

View File

@ -926,7 +926,7 @@ void Parser::parse() {
_polite = true;
}
if ((!unkString.empty()) && (_verb != kVerbCodeExam) && (_verb != kVerbCodeTalk) &&
if ((!unkString.empty()) && (_verb != kVerbCodeExam) && (_verb != kVerbCodeTalk) &&
(_verb != kVerbCodeSave) && (_verb != kVerbCodeLoad) && (_verb != kVerbCodeDir)) {
Common::String tmpStr = Common::String::format("Sorry, but I have no idea what \"%s\" means. Can you rephrase it?", unkString.c_str());
_vm->_dialogs->displayText(tmpStr);
@ -1691,7 +1691,7 @@ void Parser::doThat() {
case kVerbCodeOpen:
openDoor();
break;
case kVerbCodePause: {
case kVerbCodePause: {
// Note that the original game doesn't care about the "O.K." box neither, it accepts
// clicks from everywhere on the screen to continue. Just like my code.
Common::String tmpStr = Common::String::format("Game paused.%c%c%cPress Enter, Esc, or click the mouse on the `O.K.\" " \
@ -1861,7 +1861,7 @@ void Parser::doThat() {
if (savegameId < 0)
// dialog aborted, nothing to load
return;
_vm->loadGame(savegameId);
}
break;
@ -2317,7 +2317,7 @@ void Parser::doThat() {
break;
case kVerbCodeScore: {
Common::String tmpStr = Common::String::format("Your score is %d,%c%cout of a possible 128.%c%c " \
"This gives you a rank of %s.%c%c%s", _vm->_dnascore, kControlCenter, kControlNewLine, kControlNewLine,
"This gives you a rank of %s.%c%c%s", _vm->_dnascore, kControlCenter, kControlNewLine, kControlNewLine,
kControlNewLine, rank().c_str(), kControlNewLine, kControlNewLine, totalTime().c_str());
_vm->_dialogs->displayText(tmpStr);
}

View File

@ -201,7 +201,7 @@ void Timer::updateTimer() {
}
}
}
_vm->_roomCycles++; // Cycles since you've been in this room.
}