NANCY: JANITORIAL: Spaces to tabs / double spaces

Fixed all cases where spaces were used instead of tabs, and
all cases where a space was erroneously doubled.
This commit is contained in:
Kaloyan Chehlarski 2023-12-04 16:05:47 +02:00
parent 4a26b5631c
commit 586225d614
14 changed files with 32 additions and 32 deletions

@ -157,9 +157,9 @@ void BulPuzzle::updateGraphics() {
_needsRedraw = true;
}
if (g_nancy->_sound->isSoundPlaying(_rollSound) ||
g_nancy->_sound->isSoundPlaying(_resetSound) ||
g_nancy->_sound->isSoundPlaying(_passSound)) {
if (g_nancy->_sound->isSoundPlaying(_rollSound) ||
g_nancy->_sound->isSoundPlaying(_passSound) ||
g_nancy->_sound->isSoundPlaying(_resetSound)) {
return;
}

@ -484,7 +484,7 @@ void CollisionPuzzle::drawGrid() {
dest.x += (cellRect.width() - _horizontalWallSrc.width()) / 2;
dest.y = cellRect.bottom - 1 + _lineWidth / 6;
if (_lineWidth != 6) { // Improvement
if (_lineWidth != 6) { // Improvement
++dest.y;
}
@ -496,7 +496,7 @@ void CollisionPuzzle::drawGrid() {
continue;
}
if (_lineWidth == 6) { // Improvement
if (_lineWidth == 6) { // Improvement
dest.x -= 1;
} else {
dest.x += 1;

@ -38,7 +38,7 @@ class RaycastPuzzle : public RenderActionRecord {
friend class RaycastDeferredLoader;
friend class RaycastLevelBuilder;
public:
RaycastPuzzle() : RenderActionRecord(7), _map(7) {}
RaycastPuzzle() : RenderActionRecord(7), _map(7) {}
~RaycastPuzzle() override {}
void init() override;

@ -40,18 +40,18 @@ public:
Scrollbar(zOrder, srcBounds, srcSurf, topPosition, scrollDistance, isVertical) {}
virtual ~ViewportScrollbar() = default;
bool handleInput(NancyInput &input) {
if (_screenPosition.contains(input.mousePos)) {
input.input &= (~NancyInput::kRightMouseButtonUp);
bool handleInput(NancyInput &input) {
if (_screenPosition.contains(input.mousePos)) {
input.input &= (~NancyInput::kRightMouseButtonUp);
Scrollbar::handleInput(input);
Scrollbar::handleInput(input);
g_nancy->_cursorManager->setCursorType(CursorManager::kHotspot);
g_nancy->_cursorManager->setCursorType(CursorManager::kHotspot);
return true;
}
}
return false;
}
}
};
SoundEqualizerPuzzle::~SoundEqualizerPuzzle() {

@ -383,7 +383,7 @@ void TangramPuzzle::redrawBuffer(const Common::Rect &rect) {
memset(dest, -1, rect.width());
}
for (uint z = _z + 1; z < _z + _tiles.size(); ++z) {
for (uint z = _z + 1; z < _z + _tiles.size(); ++z) {
for (uint i = 0; i < _tiles.size() - 1; ++i) {
Tile &tile = _tiles[i];
if (tile._z == z) {

@ -681,7 +681,7 @@ bool NancyConsole::Cmd_scanForActionRecordType(int argc, const char **argv) {
insertVal = s.asUint64();
if (insertVal != 0 || s.firstChar() == '0') {
if (i % 2) {
if (i % 2) {
if (insertVal > 255) {
debugPrintf("Invalid input: %u is a byte, value cannot be over 255!\n", (uint32)insertVal);
return true;

@ -30,7 +30,7 @@
namespace Nancy {
CursorManager::CursorManager() :
CursorManager::CursorManager() :
_isInitialized(false),
_curItemID(-1),
_curCursorType(kNormal),

@ -221,7 +221,7 @@ static const Nancy::NancyGameDescription gameDescriptions[] = {
"nancy3", nullptr,
{
{ "data1.hdr", 0, "9da72fec24e1ca4f8f6b563bbdab3276", 237686 },
{ "data1.cab", 0, "a7a259e45ae643aed63fa958531cc318", 3473219 },
{ "data1.cab", 0, "a7a259e45ae643aed63fa958531cc318", 3473219 },
{ "data2.cab", 0, "cb709fba73605814f9dda823b1cfaf85", 433625036 },
{ "is:data1.cab:ciftree.dat", 0, "A:6b379f9d8edfb2d439062122e08f785c", 16161148 },
AD_LISTEND
@ -322,7 +322,7 @@ static const Nancy::NancyGameDescription gameDescriptions[] = {
"nancy4", nullptr,
{
{ "data1.hdr", 0, "694d11d7ebdf2c96cd395f4baf938c10", 256535 },
{ "data1.cab", 0, "9c9c9c60c5344e877e033e54564c6e6e", 4892300 },
{ "data1.cab", 0, "9c9c9c60c5344e877e033e54564c6e6e", 4892300 },
{ "data2.cab", 0, "05ef8fac76a227f829479719f40522b5", 458917888 },
{ "data3.cab", 0, "9b266564726664befe1770754150f5d8", 65795720 },
{ "is:data1.cab:ciftree.dat", 0, "A:a1090497f5fefce17494804bd1d624e1", 9991442 },
@ -370,7 +370,7 @@ static const Nancy::NancyGameDescription gameDescriptions[] = {
{ "data1.hdr", 0, "0db3fb5bc002eb875eebb872969a22ca", 278505 },
{ "data1.cab", 0, "b5d2d218ded5683b5ca2eafcdc1ed76e", 1720654 },
{ "data2.cab", 0, "d379a879fb23b3013f78537927ac6cfe", 548761463 },
{ "is:data1.cab:ciftree.dat", 0, "A:21fa81f322595c3100d8d58d100852d5", 8187692 },
{ "is:data1.cab:ciftree.dat", 0, "A:21fa81f322595c3100d8d58d100852d5", 8187692 },
AD_LISTEND
},
Common::EN_ANY,

@ -160,7 +160,7 @@ void NancyEngine::errorString(const char *buf_input, char *buf_output, int buf_o
}
bool NancyEngine::hasFeature(EngineFeature f) const {
return (f == kSupportsReturnToLauncher) ||
return (f == kSupportsReturnToLauncher) ||
(f == kSupportsLoadingDuringRuntime) ||
(f == kSupportsSavingDuringRuntime) ||
(f == kSupportsChangingOptionsDuringRuntime) ||

@ -754,14 +754,14 @@ void SoundManager::soundEffectMaintenance(uint16 channelID, bool force) {
Math::Quaternion quat;
switch (chan.effectData->rotateMoveAxis) {
case kRotateAroundX:
quat = Math::Quaternion::xAxis(360.0 / chan.effectData->numMoveSteps);
break;
quat = Math::Quaternion::xAxis(360.0 / chan.effectData->numMoveSteps);
break;
case kRotateAroundY:
quat = Math::Quaternion::yAxis(360.0 / chan.effectData->numMoveSteps);
break;
quat = Math::Quaternion::yAxis(360.0 / chan.effectData->numMoveSteps);
break;
case kRotateAroundZ:
quat = Math::Quaternion::zAxis(360.0 / chan.effectData->numMoveSteps);
break;
quat = Math::Quaternion::zAxis(360.0 / chan.effectData->numMoveSteps);
break;
}
quat.transform(chan.position);

@ -132,7 +132,7 @@ Scene::Scene() :
_isRunningAd(false),
_hotspotDebug(50) {}
Scene::~Scene() {
Scene::~Scene() {
delete _helpButton;
delete _menuButton;
delete _viewportOrnaments;
@ -336,7 +336,7 @@ void Scene::removeItemFromInventory(uint16 id, bool pickUp) {
}
}
void Scene::setHeldItem(int16 id) {
void Scene::setHeldItem(int16 id) {
_flags.heldItem = id; g_nancy->_cursorManager->setCursorItemID(id);
}

@ -30,7 +30,7 @@ namespace Nancy {
namespace UI {
Scrollbar::Scrollbar(uint16 zOrder, const Common::Rect &srcBounds, const Common::Point &topPosition, uint16 scrollDistance, bool isVertical) :
Scrollbar(zOrder, srcBounds, g_nancy->_graphicsManager->_object0, topPosition, scrollDistance, isVertical) {}
Scrollbar(zOrder, srcBounds, g_nancy->_graphicsManager->_object0, topPosition, scrollDistance, isVertical) {}
Scrollbar::Scrollbar(uint16 zOrder, const Common::Rect &srcBounds, Graphics::ManagedSurface &srcSurf, const Common::Point &topPosition, uint16 scrollDistance, bool isVertical) :
RenderObject(zOrder),
@ -112,7 +112,7 @@ void Scrollbar::handleInput(NancyInput &input) {
}
void Scrollbar::setPosition(float pos) {
_currentPosition = pos;
_currentPosition = pos;
if (_isVertical) {
moveTo(Common::Point(_screenPosition.left, _startPosition.y + (_maxDist * pos)));
} else {

@ -43,7 +43,7 @@ public:
void resetPosition();
float getPos() const { return _currentPosition; }
void setPosition(float pos);
void setPosition(float pos);
void calculatePosition();
Common::Point _startPosition;

@ -272,7 +272,7 @@ bool AVFDecoder::AVFVideoTrack::decode(byte *outBuf, uint32 frameSize, Common::R
return true;
}
const Graphics::Surface *AVFDecoder::AVFVideoTrack::decodeFrame(uint frameNr) {
const Graphics::Surface *AVFDecoder::AVFVideoTrack::decodeFrame(uint frameNr) {
if (frameNr < _frameCache.size() && _frameCache[frameNr].getPixels()) {
// Frame is cached, return a pointer to it
return &_frameCache[frameNr];