Skip to content

Commit

Permalink
MORTEVIELLE: Remove trailing spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
Strangerke committed Apr 6, 2012
1 parent 9dfee9c commit edbeb90
Show file tree
Hide file tree
Showing 14 changed files with 103 additions and 103 deletions.
18 changes: 9 additions & 9 deletions engines/mortevielle/actions.cpp
Expand Up @@ -70,10 +70,10 @@ void MortevielleEngine::fctMove() {
_coreVar._currPlace = ATTIC;
_menu.setDestinationText(ATTIC);
}

if (_num != 6)
_coreVar._currPlace = ROOM26;

if ((_num > 1) && (_num < 6))
_ment = _num - 1;
else if (_num > 7)
Expand Down Expand Up @@ -116,10 +116,10 @@ void MortevielleEngine::fctMove() {
menuChoice = 6;
else if (((_coreVar._currPlace == LANDING) || (_coreVar._currPlace == ROOM26)) && (menuChoice == 4))
menuChoice = 6;

if ((_coreVar._currPlace > MOUNTAIN) && (_coreVar._currPlace != ROOM26))
menuChoice += 10;

if ((_coreVar._currPlace == CHAPEL) && (menuChoice == 13))
menuChoice = 16;
else if (_coreVar._currPlace == MANOR_FRONT) {
Expand Down Expand Up @@ -710,7 +710,7 @@ void MortevielleEngine::fctPlace() {
drawClock();
if (_currBitIndex != 0)
showPeoplePresent(_currBitIndex);
else
else
displayAloneText();

_menu.displayMenu();
Expand Down Expand Up @@ -1109,7 +1109,7 @@ void MortevielleEngine::fctEat() {
else
h = 1;
}

_jh += h;
_crep = 135;
prepareRoom();
Expand Down Expand Up @@ -1145,7 +1145,7 @@ void MortevielleEngine::fctEnter() {
_x = (getRandomNumber(0, 10)) - 5;
_speechManager.startSpeech(7, _x, 1);
aniof(1, 1);

_x = convertBitIndexToCharacterIndex(z);
++_coreVar._faithScore;
_coreVar._currPlace = LANDING;
Expand All @@ -1166,7 +1166,7 @@ void MortevielleEngine::fctEnter() {
_x = (getRandomNumber(0, 10)) - 5;
_speechManager.startSpeech(7, _x, 1);
aniof(1, 1);

_coreVar._currPlace = _ment;
affrep();
resetRoomVariables(_coreVar._currPlace);
Expand Down Expand Up @@ -1590,7 +1590,7 @@ void MortevielleEngine::endGame() {
repon(2, 35);
startMusicOrSpeech(0);
testKey(false);
// A wait message was displayed.
// A wait message was displayed.
// testKey (aka tkey1) was called before and after.
// Most likely the double call is useless, thus removed
//
Expand Down
2 changes: 1 addition & 1 deletion engines/mortevielle/detection.cpp
Expand Up @@ -41,7 +41,7 @@ static const PlainGameDescriptor MortevielleGame[] = {

class MortevielleMetaEngine : public AdvancedMetaEngine {
public:
MortevielleMetaEngine() : AdvancedMetaEngine(Mortevielle::MortevielleGameDescriptions, sizeof(ADGameDescription),
MortevielleMetaEngine() : AdvancedMetaEngine(Mortevielle::MortevielleGameDescriptions, sizeof(ADGameDescription),
MortevielleGame) {
_md5Bytes = 512;
_singleid = "mortevielle";
Expand Down
4 changes: 2 additions & 2 deletions engines/mortevielle/dialogs.cpp
Expand Up @@ -418,7 +418,7 @@ void f3f8::draw() {
}

/**
* Alert function - Loop until F8 is pressed, update
* Alert function - Loop until F8 is pressed, update
* Graphical Device if modified
* @remarks Originally called 'diver'
*/
Expand Down Expand Up @@ -462,7 +462,7 @@ void f3f8::aff50(bool drawAni50Fl) {
ani50();
else
g_vm->repon(2, kDialogStringIndex + 142);

// Draw the f3/f8 dialog
draw();
}
Expand Down
2 changes: 1 addition & 1 deletion engines/mortevielle/dialogs.h
Expand Up @@ -58,6 +58,6 @@ class f3f8 {
static void aff50(bool drawAni50Fl);
static void ani50();
};

} // End of namespace Mortevielle
#endif
50 changes: 25 additions & 25 deletions engines/mortevielle/graphics.cpp
Expand Up @@ -31,8 +31,8 @@
namespace Mortevielle {

/*-------------------------------------------------------------------------*
* Palette Manager
*
* Palette Manager
*
*-------------------------------------------------------------------------*/

/**
Expand Down Expand Up @@ -71,7 +71,7 @@ void PaletteManager::setDefaultPalette() {

/*-------------------------------------------------------------------------*
* Image decoding
*
*
* The code in this section is responsible for decoding image resources.
* Images are broken down into rectangular sections, which can use one
* of 18 different encoding methods.
Expand Down Expand Up @@ -138,7 +138,7 @@ void GfxSurface::decode(const byte *pSrc) {
_xSize = READ_BE_UINT16(pSrc + 2) + 1;
_ySize = READ_BE_UINT16(pSrc + 4) + 1;
majTtxTty();

pSrc += 6;
pDest = &outputBuffer[0];

Expand All @@ -159,7 +159,7 @@ void GfxSurface::decode(const byte *pSrc) {
const byte *pSrcSaved = pSrc;
bool savedNibbleFlag = _nibbleFlag;
int savedLookupIndex = _lookupIndex;

do {
pSrc = pSrcSaved;
_nibbleFlag = savedNibbleFlag;
Expand Down Expand Up @@ -237,7 +237,7 @@ void GfxSurface::decode(const byte *pSrc) {
pDest = &outputBuffer[_yp * DEFAULT_WIDTH + _xp];
pSrcStart = pSrc;
INCR_TAIX;

for (int yCtr = 0; yCtr < _ySize; ++yCtr, pDest += DEFAULT_WIDTH) {
byte *pDestLine = pDest;
for (int xCtr = 0; xCtr < _xSize; ++xCtr) {
Expand Down Expand Up @@ -490,7 +490,7 @@ void GfxSurface::horizontal(const byte *&pSrc, byte *&pDest, const byte *&pLooku
break;
continue;
}

bool continueFlag = false;
do {
for (int xIndex = 0; xIndex < _xSize; ++xIndex) {
Expand Down Expand Up @@ -599,7 +599,7 @@ void GfxSurface::vertical(const byte *&pSrc, byte *&pDest, const byte *&pLookup)
pDest += _thickness;
drawIndex += _thickness;
}

while (_xSize < (drawIndex + _thickness)) {
if (--_thickness == 0)
return;
Expand All @@ -622,7 +622,7 @@ void GfxSurface::vertical(const byte *&pSrc, byte *&pDest, const byte *&pLookup)
for (int xCtr = 0; xCtr < _thickness; ++xCtr)
*--pDest = csuiv(pSrc, pLookup);
}
}
}
if ((_ySize % 2) == 0) {
pDest += _thickness;
drawIndex += _thickness;
Expand Down Expand Up @@ -743,7 +743,7 @@ void GfxSurface::diag(const byte *&pSrc, byte *&pDest, const byte *&pLookup) {
NIH();
increments(pDest);
}

NIH();
NIV();
increments(pDest);
Expand Down Expand Up @@ -780,7 +780,7 @@ void GfxSurface::diag(const byte *&pSrc, byte *&pDest, const byte *&pLookup) {
NIH();
increments(pDest);
}

NIH();
NIV();
increments(pDest);
Expand All @@ -791,13 +791,13 @@ void GfxSurface::diag(const byte *&pSrc, byte *&pDest, const byte *&pLookup) {
break;
} else {
pDest += _xInc;

if (--drawIndex == 0) {
TF2(pSrc, pDest, pLookup, diagIndex);
NIH();
break;
}
}
}

NIH();
}
Expand Down Expand Up @@ -885,7 +885,7 @@ void ScreenSurface::updateScreen() {
// Iterate through copying dirty areas to the screen
for (Common::List<Common::Rect>::iterator i = _dirtyRects.begin(); i != _dirtyRects.end(); ++i) {
Common::Rect r = *i;
g_system->copyRectToScreen((const byte *)getBasePtr(r.left, r.top), pitch,
g_system->copyRectToScreen((const byte *)getBasePtr(r.left, r.top), pitch,
r.left, r.top, r.width(), r.height());
}
_dirtyRects.clear();
Expand All @@ -896,7 +896,7 @@ void ScreenSurface::updateScreen() {

/**
* Draws a decoded picture on the screen
* @remarks - Because the ScummVM surface is using a double height 640x400 surface to
* @remarks - Because the ScummVM surface is using a double height 640x400 surface to
* simulate the original 640x400 surface, all Y values have to be doubled.
* - Image resources are stored at 320x200, so when drawn onto the screen a single pixel
* from the source image is drawn using the two pixels at the given index in the palette map
Expand All @@ -909,13 +909,13 @@ void ScreenSurface::drawPicture(GfxSurface &surface, int x, int y) {
y += surface._offset.y;

// Lock the affected area of the surface to write to
Graphics::Surface destSurface = lockArea(Common::Rect(x * 2, y * 2,
Graphics::Surface destSurface = lockArea(Common::Rect(x * 2, y * 2,
(x + surface.w) * 2, (y + surface.h) * 2));

// Get a lookup for the palette mapping
const byte *paletteMap = &g_vm->_mem[0x7000 * 16 + 2];

// Loop through writing
// Loop through writing
for (int yp = 0; yp < surface.h; ++yp) {
if (((y + yp) < 0) || ((y + yp) >= 200))
continue;
Expand Down Expand Up @@ -948,7 +948,7 @@ void ScreenSurface::drawPicture(GfxSurface &surface, int x, int y) {
void ScreenSurface::copyFrom(Graphics::Surface &src, int x, int y) {
Graphics::Surface destSurface = lockArea(Common::Rect(x, y, x + src.w, y + src.h));

// Loop through writing
// Loop through writing
for (int yp = 0; yp < src.h; ++yp) {
if (((y + yp) < 0) || ((y + yp) >= SCREEN_HEIGHT))
continue;
Expand All @@ -961,11 +961,11 @@ void ScreenSurface::copyFrom(Graphics::Surface &src, int x, int y) {

/**
* Draws a character at the specified co-ordinates
* @remarks Because the ScummVM surface is using a double height 640x400 surface to
* @remarks Because the ScummVM surface is using a double height 640x400 surface to
* simulate the original 640x400 surface, all Y values have to be doubled
*/
void ScreenSurface::writeCharacter(const Common::Point &pt, unsigned char ch, int palIndex) {
Graphics::Surface destSurface = lockArea(Common::Rect(pt.x, pt.y * 2,
Graphics::Surface destSurface = lockArea(Common::Rect(pt.x, pt.y * 2,
pt.x + FONT_WIDTH, (pt.y + FONT_HEIGHT) * 2));

// Get the start of the character to use
Expand All @@ -988,7 +988,7 @@ void ScreenSurface::writeCharacter(const Common::Point &pt, unsigned char ch, in

/**
* Draws a box at the specified position and size
* @remarks Because the ScummVM surface is using a double height 640x400 surface to
* @remarks Because the ScummVM surface is using a double height 640x400 surface to
* simulate the original 640x400 surface, all Y values have to be doubled
*/
void ScreenSurface::drawBox(int x, int y, int dx, int dy, int col) {
Expand All @@ -1011,13 +1011,13 @@ void ScreenSurface::drawBox(int x, int y, int dx, int dy, int col) {

/**
* Fills an area with the specified colour
* @remarks Because the ScummVM surface is using a double height 640x400 surface to
* @remarks Because the ScummVM surface is using a double height 640x400 surface to
* simulate the original 640x400 surface, all Y values have to be doubled
*/
void ScreenSurface::fillRect(int colour, const Common::Rect &bounds) {
Graphics::Surface destSurface = lockArea(Common::Rect(bounds.left, bounds.top * 2,
bounds.right, bounds.bottom * 2));

// Fill the area
destSurface.fillRect(Common::Rect(0, 0, destSurface.w, destSurface.h), colour);
}
Expand All @@ -1032,7 +1032,7 @@ void ScreenSurface::clearScreen() {

/**
* Sets a single pixel at the specified co-ordinates
* @remarks Because the ScummVM surface is using a double height 640x400 surface to
* @remarks Because the ScummVM surface is using a double height 640x400 surface to
* simulate the original 640x400 surface, all Y values have to be doubled
*/
void ScreenSurface::setPixel(const Common::Point &pt, int palIndex) {
Expand Down Expand Up @@ -1115,7 +1115,7 @@ void ScreenSurface::drawLine(int x, int y, int xx, int yy, int coul) {
yr = y;
xro = xx;
yro = yy;

if (abs(y - yy) > abs(x - xx)) {
a = (float)((x - xx)) / (y - yy);
b = (yr * xro - yro * xr) / (y - yy);
Expand Down
12 changes: 6 additions & 6 deletions engines/mortevielle/menu.cpp
Expand Up @@ -177,7 +177,7 @@ void Menu::displayMenu() {
int pt, x, y, color, msk, num_letr;

g_vm->_mouse.hideMouse();

g_vm->_screenSurface.fillRect(7, Common::Rect(0, 0, 639, 10));
col = 28 * g_vm->_res;
if (g_vm->_currGraphicalDevice == MODE_CGA)
Expand Down Expand Up @@ -434,9 +434,9 @@ void Menu::mdn() {
return;
else
g_vm->_prevPos = curPos;
bool tes = (curPos.y < 11)
&& ((curPos.x >= (28 * g_vm->_res) && curPos.x <= (28 * g_vm->_res + 24))

bool tes = (curPos.y < 11)
&& ((curPos.x >= (28 * g_vm->_res) && curPos.x <= (28 * g_vm->_res + 24))
|| (curPos.x >= (76 * g_vm->_res) && curPos.x <= (76 * g_vm->_res + 24))
|| ((curPos.x > 124 * g_vm->_res) && (curPos.x < 124 * g_vm->_res + 24))
|| ((curPos.x > 172 * g_vm->_res) && (curPos.x < 172 * g_vm->_res + 24))
Expand Down Expand Up @@ -481,7 +481,7 @@ void Menu::mdn() {
menuDown(_msg3);

g_vm->setMouseClick(false);
} else {
} else {
// A menu was clicked on
_menuSelected = (_multiTitle) && (_msg4 != OPCODE_NONE);
menuUp(_msg3);
Expand Down Expand Up @@ -551,7 +551,7 @@ void Menu::initMenu() {
* @remarks Originally called 'mfoudi'
*/
void Menu::setSearchMenu() {
for (int i = 1; i <= 7; ++i)
for (int i = 1; i <= 7; ++i)
disableMenuItem(_moveMenu[i]);

for (int i = 1; i <= 11; ++i)
Expand Down

0 comments on commit edbeb90

Please sign in to comment.