[Scummvm-git-logs] scummvm master -> 97a172f22a441a15d0bf254fb9f6d2d32de20615
sev-
noreply at scummvm.org
Mon Aug 7 08:50:18 UTC 2023
This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
f94464ecb1 NANCY: JANITORIAL: Remove trailing spaces
bb9e86e9c6 COMMON: Fix warnings
97a172f22a GUI: Remove unused variable
Commit: f94464ecb1b78f9d6f4668f474b528f832167639
https://github.com/scummvm/scummvm/commit/f94464ecb1b78f9d6f4668f474b528f832167639
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2023-08-07T10:47:50+02:00
Commit Message:
NANCY: JANITORIAL: Remove trailing spaces
Changed paths:
engines/nancy/action/actionmanager.cpp
engines/nancy/action/arfactory.cpp
engines/nancy/action/conversation.cpp
engines/nancy/action/conversation.h
engines/nancy/action/overlay.cpp
engines/nancy/action/overridelockpuzzle.cpp
engines/nancy/action/passwordpuzzle.cpp
engines/nancy/action/raycastpuzzle.cpp
engines/nancy/action/raycastpuzzle.h
engines/nancy/action/recordtypes.cpp
engines/nancy/action/riddlepuzzle.cpp
engines/nancy/action/rippedletterpuzzle.cpp
engines/nancy/action/rippedletterpuzzle.h
engines/nancy/action/secondarymovie.cpp
engines/nancy/action/setplayerclock.cpp
engines/nancy/action/soundequalizerpuzzle.cpp
engines/nancy/action/soundequalizerpuzzle.h
engines/nancy/action/towerpuzzle.cpp
engines/nancy/action/towerpuzzle.h
engines/nancy/commontypes.cpp
engines/nancy/cursor.cpp
engines/nancy/enginedata.cpp
engines/nancy/enginedata.h
engines/nancy/font.h
engines/nancy/graphics.h
engines/nancy/input.cpp
engines/nancy/metaengine.cpp
engines/nancy/misc/lightning.cpp
engines/nancy/misc/lightning.h
engines/nancy/misc/specialeffect.cpp
engines/nancy/nancy.cpp
engines/nancy/state/credits.cpp
engines/nancy/state/help.cpp
engines/nancy/state/map.cpp
engines/nancy/state/scene.cpp
engines/nancy/ui/clock.cpp
engines/nancy/ui/inventorybox.cpp
engines/nancy/ui/textbox.cpp
engines/nancy/ui/viewport.cpp
engines/nancy/util.cpp
engines/nancy/video.cpp
diff --git a/engines/nancy/action/actionmanager.cpp b/engines/nancy/action/actionmanager.cpp
index da78c3f6198..18482444396 100644
--- a/engines/nancy/action/actionmanager.cpp
+++ b/engines/nancy/action/actionmanager.cpp
@@ -80,7 +80,7 @@ void ActionManager::handleInput(NancyInput &input) {
rec->_cursorDependency = nullptr;
}
-
+
}
break;
@@ -111,7 +111,7 @@ bool ActionManager::addNewActionRecord(Common::SeekableReadStream &inputData) {
// If the localChunkSize is less than the total data, there must be dependencies at the end of the chunk
uint16 depsDataSize = (uint16)inputData.size() - localChunkSize;
if (depsDataSize > 0) {
- // Each dependency is 12 (up to nancy2) or 16 (nancy3 and up) bytes long
+ // Each dependency is 12 (up to nancy2) or 16 (nancy3 and up) bytes long
uint singleDepSize = g_nancy->getGameType() <= kGameTypeNancy2 ? 12 : 16;
uint numDependencies = depsDataSize / singleDepSize;
if (depsDataSize % singleDepSize) {
@@ -121,7 +121,7 @@ bool ActionManager::addNewActionRecord(Common::SeekableReadStream &inputData) {
_records.size(),
newRecord->_description.c_str());
}
-
+
if (numDependencies == 0) {
newRecord->_dependencies.satisfied = true;
}
@@ -170,12 +170,12 @@ bool ActionManager::addNewActionRecord(Common::SeekableReadStream &inputData) {
case DependencyType::kCloseParenthesis:
depStack.top()->children.pop_back();
depStack.pop();
- break;
+ break;
default:
if (dep.hours != -1 || dep.minutes != -1 || dep.seconds != -1) {
dep.timeData = ((dep.hours * 60 + dep.minutes) * 60 + dep.seconds) * 1000 + dep.milliseconds;
}
-
+
break;
}
}
@@ -276,7 +276,7 @@ void ActionManager::processDependency(DependencyRecord &dep, ActionRecord &recor
}
} else {
dep.satisfied = NancySceneState.getLogicCondition(dep.label, dep.condition);
- }
+ }
break;
case DependencyType::kElapsedGameTime:
@@ -379,7 +379,7 @@ void ActionManager::processDependency(DependencyRecord &dep, ActionRecord &recor
dep.satisfied = isSatisfied;
record._cursorDependency = &dep;
}
-
+
break;
}
case DependencyType::kPlayerTOD:
diff --git a/engines/nancy/action/arfactory.cpp b/engines/nancy/action/arfactory.cpp
index db5cc6caaee..cb5e56ff802 100644
--- a/engines/nancy/action/arfactory.cpp
+++ b/engines/nancy/action/arfactory.cpp
@@ -68,7 +68,7 @@ ActionRecord *ActionManager::createActionRecord(uint16 type) {
return new LightningOn();
} else {
return new SpecialEffect();
- }
+ }
case 50:
return new ConversationVideo(); // PlayPrimaryVideoChan0
case 51:
diff --git a/engines/nancy/action/conversation.cpp b/engines/nancy/action/conversation.cpp
index 9431dfd0868..18f38ca3c33 100644
--- a/engines/nancy/action/conversation.cpp
+++ b/engines/nancy/action/conversation.cpp
@@ -452,7 +452,7 @@ void ConversationVideo::init() {
GraphicsManager::loadSurfacePalette(_drawSurface, _paletteName);
setTransparent(true);
}
-
+
ConversationSound::init();
registerGraphics();
}
@@ -556,7 +556,7 @@ void ConversationCel::readData(Common::SeekableReadStream &stream) {
readFilename(stream, xsheetName);
readFilename(stream, _bodyTreeName);
readFilename(stream, _headTreeName);
-
+
uint xsheetDataSize = 0;
byte *xsbuf = g_nancy->_resource->loadData(xsheetName, xsheetDataSize);
if (!xsbuf) {
@@ -564,7 +564,7 @@ void ConversationCel::readData(Common::SeekableReadStream &stream) {
}
Common::MemoryReadStream xsheet(xsbuf, xsheetDataSize, DisposeAfterUse::YES);
-
+
// Read the xsheet and load all images into the arrays
// Completely unoptimized, the original engine uses a buffer
xsheet.seek(0);
@@ -618,6 +618,6 @@ void ConversationCel::readData(Common::SeekableReadStream &stream) {
bool ConversationCel::isVideoDonePlaying() {
return _curFrame >= _lastFrame && _nextFrameTime <= g_nancy->getTotalPlayTime();
}
-
+
} // End of namespace Action
} // End of namespace Nancy
diff --git a/engines/nancy/action/conversation.h b/engines/nancy/action/conversation.h
index cd8a1f259fb..4e5595bde54 100644
--- a/engines/nancy/action/conversation.h
+++ b/engines/nancy/action/conversation.h
@@ -174,7 +174,7 @@ public:
uint16 _firstFrame = 0;
uint16 _lastFrame = 0;
- uint _curFrame = 0;
+ uint _curFrame = 0;
uint32 _nextFrameTime = 0;
// We use the built-in RenderObject for the body
diff --git a/engines/nancy/action/overlay.cpp b/engines/nancy/action/overlay.cpp
index c9993338a8c..bfd530670b8 100644
--- a/engines/nancy/action/overlay.cpp
+++ b/engines/nancy/action/overlay.cpp
@@ -62,12 +62,12 @@ void Overlay::readData(Common::SeekableReadStream &stream) {
ser.syncAsUint16LE(_loopFirstFrame);
ser.syncAsUint16LE(_loopLastFrame);
uint16 framesPerSec = stream.readUint16LE();
-
+
// Avoid divide by 0
if (framesPerSec) {
_frameTime = Common::Rational(1000, framesPerSec).toInt();
}
-
+
ser.syncAsUint16LE(_z, kGameTypeNancy1, kGameTypeNancy1);
if (ser.getVersion() > kGameTypeNancy1) {
@@ -229,7 +229,7 @@ Common::String Overlay::getRecordTypeName() const {
void Overlay::setFrame(uint frame) {
_currentFrame = frame;
-
+
// Workaround for:
// - the fireplace in nancy2 scene 2491, where one of the rects is invalid.
// - the ball thing in nancy2 scene 1562, where one of the rects is twice as tall as it should be
diff --git a/engines/nancy/action/overridelockpuzzle.cpp b/engines/nancy/action/overridelockpuzzle.cpp
index 505ff445644..31ee0edc918 100644
--- a/engines/nancy/action/overridelockpuzzle.cpp
+++ b/engines/nancy/action/overridelockpuzzle.cpp
@@ -84,7 +84,7 @@ void OverrideLockPuzzle::execute() {
case kBegin: {
init();
registerGraphics();
-
+
// Set the order of the button presses (always random)
// and of the lights (only random on expert difficulty)
uint numButtons = _buttonSrcs.size();
@@ -117,12 +117,12 @@ void OverrideLockPuzzle::execute() {
if (_popButtons == kButtonsPopUp) {
drawButton(_lastPushedButton, true);
}
-
+
drawLights();
_lastPushedButton = -1;
_timeToPop = 0;
-
+
for (uint i = 0; i < _playerOrder.size(); ++i) {
if (_playerOrder[i] != _buttonOrder[i]) {
// Wrong order, reset
@@ -195,7 +195,7 @@ void OverrideLockPuzzle::handleInput(NancyInput &input) {
if (NancySceneState.getViewport().convertViewportToScreen(_hotspots[i]).contains(input.mousePos)) {
g_nancy->_cursorManager->setCursorType(CursorManager::kHotspot);
-
+
if (input.input & NancyInput::kLeftMouseButtonUp) {
drawButton(i, false);
_lastPushedButton = i;
diff --git a/engines/nancy/action/passwordpuzzle.cpp b/engines/nancy/action/passwordpuzzle.cpp
index 0a8c99dddfb..77d0f978843 100644
--- a/engines/nancy/action/passwordpuzzle.cpp
+++ b/engines/nancy/action/passwordpuzzle.cpp
@@ -145,7 +145,7 @@ void PasswordPuzzle::execute() {
_solveExitScene.execute();
break;
}
-
+
g_system->setFeatureState(OSystem::kFeatureVirtualKeyboard, false);
finishExecution();
}
diff --git a/engines/nancy/action/raycastpuzzle.cpp b/engines/nancy/action/raycastpuzzle.cpp
index f316d1478a5..69a48e026c6 100644
--- a/engines/nancy/action/raycastpuzzle.cpp
+++ b/engines/nancy/action/raycastpuzzle.cpp
@@ -149,14 +149,14 @@ void RaycastLevelBuilder::fillCells() {
Common::Array<byte> switchStack;
Common::Point curCell(0, 0);
-
+
for (uint i = 1; i < _inputNumCells;) {
switchStack.clear();
if ( (curCell.y > 0) && ((_cells[(curCell.y - 1) * _inputWidth + curCell.x] & 0xF) == 0xF) ) {
switchStack.push_back(2);
}
-
+
if ( (curCell.y + 1 <= (int)_inputHeight - 1) && ((_cells[(curCell.y + 1) * _inputWidth + curCell.x] & 0xF) == 0xF) ) {
switchStack.push_back(3);
}
@@ -461,7 +461,7 @@ void RaycastLevelBuilder::writeObjectWalls(uint startX, uint startY, uint themeI
for (uint numWrittenWalls = 0; numWrittenWalls < numWallsToWrite;) {
bool vertical = g_nancy->_randomSource->getRandomBit();
bool foundWallLocation = false;
-
+
uint x = 0;
uint y = 0;
@@ -584,7 +584,7 @@ void RaycastLevelBuilder::writeDoors(uint startX, uint startY, uint themeID) {
for (uint numWrittenWalls = 0; numWrittenWalls < numDoorsToWrite;) {
bool vertical = g_nancy->_randomSource->getRandomBit();
bool foundDoorLocation = false;
-
+
uint x = 0;
uint y = 0;
uint otherX = 0;
@@ -637,7 +637,7 @@ void RaycastLevelBuilder::writeDoors(uint startX, uint startY, uint themeID) {
!(_infoMap[y * _fullWidth + otherX]) &&
(y != _startY || x != _startX) &&
(y != _startY || otherX != _startX) ) {
-
+
foundDoorLocation = true;
}
}
@@ -661,7 +661,7 @@ void RaycastLevelBuilder::writeDoors(uint startX, uint startY, uint themeID) {
!(_infoMap[otherY * _fullWidth + x]) &&
(y != _startY || x != _startX) &&
(otherY != _startY || x != _startX) ) {
-
+
foundDoorLocation = true;
}
} else if ( !(_wallMap[(y + 1) * _fullWidth + x]) &&
@@ -678,7 +678,7 @@ void RaycastLevelBuilder::writeDoors(uint startX, uint startY, uint themeID) {
otherY = y + 1;
otherX = x;
-
+
if ( !(_infoMap[y * _fullWidth + x]) &&
!(_infoMap[otherY * _fullWidth + x]) &&
(y != _startY || x != _startX) &&
@@ -819,7 +819,7 @@ void RaycastLevelBuilder::writeExitFloorTexture(uint themeID) {
RCLB::Theme &theme = _themeData->themes[themeID];
int16 selectedFloorID = theme.exitFloorIDs[g_nancy->_randomSource->getRandomNumber(theme.exitFloorIDs.size() - 1)];
uint addToID = 0;
-
+
for (uint y = 0; y < _fullHeight; ++y) {
for (uint x = 0; x < _fullWidth; ++x) {
if (_infoMap[y * _fullWidth + x] == 1) {
@@ -851,7 +851,7 @@ void RaycastLevelBuilder::validateMap() {
if (_wallMap[y * _fullWidth + x] == 1) {
error("wallMap not complete at coordinates x = %d, y = %d", x, y);
}
-
+
if (_floorMap[y * _fullWidth + x] == -1) {
error("floorMap not complete at coordinates x = %d, y = %d", x, y);
}
@@ -868,7 +868,7 @@ void RaycastPuzzle::init() {
assert(_puzzleData);
RaycastLevelBuilder levelBuilder(_mapWidth, _mapHeight, _wallHeight);
-
+
_wallMap.push_back(levelBuilder._wallMap);
_infoMap.push_back(levelBuilder._infoMap);
_floorMap.push_back(levelBuilder._floorMap);
@@ -1052,7 +1052,7 @@ void RaycastPuzzle::handleInput(NancyInput &input) {
newX = _playerX + (int32)(_sinTable[invertedRotation] * deltaPosition);
newY = _playerY + (int32)(_cosTable[invertedRotation] * deltaPosition);
}
-
+
hasMoved = true;
}
@@ -1176,7 +1176,7 @@ void RaycastPuzzle::drawMap() {
uint16 *pixelPtr;
Graphics::PixelFormat &format = _map._drawSurface.format;
-
+
uint16 wallColor = format.RGBToColor(_puzzleData->wallColor[0], _puzzleData->wallColor[1], _puzzleData->wallColor[2]);
uint16 uColor6 = format.RGBToColor(_puzzleData->uColor6[0], _puzzleData->uColor6[1], _puzzleData->uColor6[2]);
uint16 uColor7 = format.RGBToColor(_puzzleData->uColor7[0], _puzzleData->uColor7[1], _puzzleData->uColor7[2]);
@@ -1195,7 +1195,7 @@ void RaycastPuzzle::drawMap() {
if (wallMapCell & kWall) {
*pixelPtr = wallColor;
}
-
+
if ((wallMapCell != 0) && !(wallMapCell & kWall)) {
*pixelPtr = uColor6;
}
@@ -1545,7 +1545,7 @@ void RaycastPuzzle::drawMaze() {
lightValues[0] = hitWallLightValue & 0xF;
lightValues[1] = (hitWallLightValue >> 4) & 0xF;
lightValues[2] = (hitWallLightValue >> 8) & 0xF;
-
+
wallIDs[0] = hitWallValue & 0xFF;
wallIDs[1] = (hitWallValue >> 8) & 0xFF;
wallIDs[2] = (hitWallValue >> 16) & 0xFF;
@@ -1630,11 +1630,11 @@ void RaycastPuzzle::drawMaze() {
for (int y = 0; y < drawnWallHeight; ++y) {
uint32 sY = srcY >> 16;
uint16 *srcPixel = srcPixels[2 - (sY >> 7)] ? &srcPixels[2 - (sY >> 7)][128 * (sY & 0x7F)] : nullptr;
-
+
if (srcPixel) {
*destPixel = *srcPixel;
}
-
+
srcY -= srcYSubtractVal;
destPixel -= _drawSurface.w;
*zBufferDestPixel = curZBufferDepth;
@@ -1665,7 +1665,7 @@ void RaycastPuzzle::drawMaze() {
*destPixel = *srcPixel;
*zBufferDestPixel = curZBufferDepth;
}
-
+
srcY -= srcYSubtractVal;
destPixel -= _drawSurface.w;
zBufferDestPixel -= _drawSurface.w;
@@ -1695,7 +1695,7 @@ void RaycastPuzzle::drawMaze() {
*destPixel = *srcPixel;
*zBufferDestPixel = curZBufferDepth;
}
-
+
srcY -= srcYSubtractVal;
destPixel -= _drawSurface.w;
zBufferDestPixel -= _drawSurface.w;
@@ -1725,7 +1725,7 @@ void RaycastPuzzle::drawMaze() {
*destPixel = *srcPixel;
*zBufferDestPixel = curZBufferDepth;
}
-
+
srcY -= srcYSubtractVal;
destPixel -= _drawSurface.w;
zBufferDestPixel -= _drawSurface.w;
@@ -1832,7 +1832,7 @@ void RaycastPuzzle::clearZBuffer() {
}
void RaycastPuzzle::checkSwitch() {
-
+
}
} // End of namespace Action
diff --git a/engines/nancy/action/raycastpuzzle.h b/engines/nancy/action/raycastpuzzle.h
index fdc4a15f250..1ed82d766ed 100644
--- a/engines/nancy/action/raycastpuzzle.h
+++ b/engines/nancy/action/raycastpuzzle.h
@@ -111,7 +111,7 @@ protected:
void drawMap();
void drawMaze();
void clearZBuffer();
-
+
void checkSwitch();
};
diff --git a/engines/nancy/action/recordtypes.cpp b/engines/nancy/action/recordtypes.cpp
index 3b3bc7e1d70..2e3365b25e8 100644
--- a/engines/nancy/action/recordtypes.cpp
+++ b/engines/nancy/action/recordtypes.cpp
@@ -415,10 +415,10 @@ void LoseGame::readData(Common::SeekableReadStream &stream) {
void LoseGame::execute() {
g_nancy->_sound->stopAndUnloadSpecificSounds();
-
+
// We're not using original menus yet, so just quit the game and go back to the launcher
- // g_nancy->setState(NancyState::kMainMenu);
-
+ // g_nancy->setState(NancyState::kMainMenu);
+
Common::Event ev;
ev.type = Common::EVENT_RETURN_TO_LAUNCHER;
g_system->getEventManager()->pushEvent(ev);
diff --git a/engines/nancy/action/riddlepuzzle.cpp b/engines/nancy/action/riddlepuzzle.cpp
index c9b94b9b5a1..d683ed2b161 100644
--- a/engines/nancy/action/riddlepuzzle.cpp
+++ b/engines/nancy/action/riddlepuzzle.cpp
@@ -141,7 +141,7 @@ void RiddlePuzzle::execute() {
// fall through
case kRun:
switch (_solveState) {
- case kWaitForSound:
+ case kWaitForSound:
if (!g_nancy->_sound->isSoundPlaying(_riddles[_riddleID].sound)) {
_solveState = kNotSolved;
g_system->setFeatureState(OSystem::kFeatureVirtualKeyboard, true);
@@ -243,7 +243,7 @@ void RiddlePuzzle::execute() {
break;
default:
- return;
+ return;
}
if (g_nancy->_sound->isSoundPlaying(*sound)) {
diff --git a/engines/nancy/action/rippedletterpuzzle.cpp b/engines/nancy/action/rippedletterpuzzle.cpp
index 2d553c1b4c9..f4d986104d9 100644
--- a/engines/nancy/action/rippedletterpuzzle.cpp
+++ b/engines/nancy/action/rippedletterpuzzle.cpp
@@ -216,7 +216,7 @@ void RippedLetterPuzzle::handleInput(NancyInput &input) {
// ...then clear the piece from the drawSurface
drawPiece(i, 0);
-
+
g_nancy->_sound->playSound(_takeSound);
}
@@ -271,7 +271,7 @@ void RippedLetterPuzzle::handleInput(NancyInput &input) {
// Then, make sure it doesn't escape outside the viewport bounds
Common::Rect screen = NancySceneState.getViewport().getScreenPosition();
-
+
if (newLocation.left < screen.left) {
newLocation.translate(screen.left - newLocation.left, 0);
}
diff --git a/engines/nancy/action/rippedletterpuzzle.h b/engines/nancy/action/rippedletterpuzzle.h
index 8d9036a0824..04207cc2037 100644
--- a/engines/nancy/action/rippedletterpuzzle.h
+++ b/engines/nancy/action/rippedletterpuzzle.h
@@ -63,7 +63,7 @@ public:
RenderObject _pickedUpPiece;
int8 _pickedUpPieceID = -1;
byte _pickedUpPieceRot = 0;
-
+
Graphics::ManagedSurface _image;
SolveState _solveState = kNotSolved;
RippedLetterPuzzleData *_puzzleState = nullptr;
diff --git a/engines/nancy/action/secondarymovie.cpp b/engines/nancy/action/secondarymovie.cpp
index f662b47e557..fb04acad777 100644
--- a/engines/nancy/action/secondarymovie.cpp
+++ b/engines/nancy/action/secondarymovie.cpp
@@ -95,7 +95,7 @@ void PlaySecondaryMovie::init() {
}
_drawSurface.create(_decoder.getWidth(), _decoder.getHeight(), g_nancy->_graphicsManager->getInputPixelFormat());
-
+
if (_paletteName.size()) {
GraphicsManager::loadSurfacePalette(_fullFrame, _paletteName);
GraphicsManager::loadSurfacePalette(_drawSurface, _paletteName);
@@ -104,7 +104,7 @@ void PlaySecondaryMovie::init() {
if (g_nancy->getGameType() == kGameTypeVampire) {
setTransparent(true);
_fullFrame.setTransparentColor(_drawSurface.getTransparentColor());
-
+
// TVD uses empty video files during the endgame ceremony
// This makes sure the screen doesn't go black while the sound is playing
_drawSurface.clear(_drawSurface.getTransparentColor());
@@ -143,7 +143,7 @@ void PlaySecondaryMovie::updateGraphics() {
GraphicsManager::copyToManaged(*_decoder.decodeNextFrame(), _fullFrame, _paletteName.size() > 0);
_drawSurface.create(_fullFrame, _fullFrame.getBounds());
moveTo(_videoDescs[descID].destRect);
-
+
_needsRedraw = true;
for (auto &f : _frameFlags) {
@@ -156,7 +156,7 @@ void PlaySecondaryMovie::updateGraphics() {
if ((_decoder.getCurFrame() == _lastFrame && _playDirection == kPlayMovieForward) ||
(_decoder.getCurFrame() == _firstFrame && _playDirection == kPlayMovieReverse) ||
_decoder.atEnd()) {
-
+
// Stop the video and block it from starting again, but also wait for
// sound to end before changing state
_decoder.stop();
diff --git a/engines/nancy/action/setplayerclock.cpp b/engines/nancy/action/setplayerclock.cpp
index 49403395632..bc11c539085 100644
--- a/engines/nancy/action/setplayerclock.cpp
+++ b/engines/nancy/action/setplayerclock.cpp
@@ -99,7 +99,7 @@ void SetPlayerClock::execute() {
g_nancy->_sound->loadSound(_alarmRingSound);
_alarmHours = NancySceneState.getPlayerTime().getHours();
-
+
Nancy::UI::Clock *clock = NancySceneState.getClock();
if (clock) {
clock->lockClock(true);
@@ -182,7 +182,7 @@ void SetPlayerClock::handleInput(NancyInput &input) {
_needsRedraw = true;
g_nancy->_sound->playSound(_buttonSound);
-
+
_state = kActionTrigger;
return;
}
@@ -200,7 +200,7 @@ void SetPlayerClock::handleInput(NancyInput &input) {
g_nancy->_sound->playSound(_buttonSound);
_lastDrawnHours = _lastDrawnMinutes = -1;
-
+
_alarmState = kAlarmMode;
_clearButton = true;
return;
@@ -217,7 +217,7 @@ void SetPlayerClock::handleInput(NancyInput &input) {
_needsRedraw = true;
g_nancy->_sound->playSound(_buttonSound);
-
+
_alarmState = kTimeMode;
_clearButton = true;
return;
@@ -233,7 +233,7 @@ void SetPlayerClock::handleInput(NancyInput &input) {
g_nancy->_sound->playSound(_buttonSound);
_alarmHours = _alarmHours + 1 > 23 ? 0 : _alarmHours + 1;
-
+
_clearButton = true;
return;
}
@@ -248,7 +248,7 @@ void SetPlayerClock::handleInput(NancyInput &input) {
g_nancy->_sound->playSound(_buttonSound);
_alarmHours = _alarmHours - 1 < 0 ? 23 : _alarmHours - 1;
-
+
_clearButton = true;
return;
}
@@ -262,7 +262,7 @@ void SetPlayerClock::handleInput(NancyInput &input) {
_needsRedraw = true;
g_nancy->_sound->playSound(_buttonSound);
-
+
_clearButton = true;
_state = kActionTrigger;
_alarmState = kWait;
diff --git a/engines/nancy/action/soundequalizerpuzzle.cpp b/engines/nancy/action/soundequalizerpuzzle.cpp
index 0dbf8ba918d..67e01fa5c17 100644
--- a/engines/nancy/action/soundequalizerpuzzle.cpp
+++ b/engines/nancy/action/soundequalizerpuzzle.cpp
@@ -238,7 +238,7 @@ void SoundEqualizerPuzzle::handleInput(NancyInput &input) {
g_nancy->_sound->loadSound(_exitSound);
g_nancy->_sound->playSound(_exitSound);
-
+
_state = kActionTrigger;
return;
}
@@ -255,7 +255,7 @@ void SoundEqualizerPuzzle::handleInput(NancyInput &input) {
void SoundEqualizerPuzzle::updateSlider(uint sliderID) {
float sliderVal = 1 - _sliders[sliderID]->getPos();
_puzzleState->sliderValues[sliderID] = sliderVal * 100;
-
+
if (sliderID < 3) {
// First three sliders change pitch, except when the slider
// controls the "solve" sound; in that case it does nothing
@@ -264,7 +264,7 @@ void SoundEqualizerPuzzle::updateSlider(uint sliderID) {
_minRate[sliderID] + (_maxRate[sliderID] - _minRate[sliderID]) * sliderVal);
}
} else {
- // Other three sliders change volume;
+ // Other three sliders change volume;
// "solve" sound slider behaves as an on/off switch
if (sliderID - 3 != _solveChannelID) {
g_nancy->_sound->setVolume(_sounds[sliderID - 3],
diff --git a/engines/nancy/action/soundequalizerpuzzle.h b/engines/nancy/action/soundequalizerpuzzle.h
index bff08a2254f..25df8896d10 100644
--- a/engines/nancy/action/soundequalizerpuzzle.h
+++ b/engines/nancy/action/soundequalizerpuzzle.h
@@ -49,7 +49,7 @@ public:
void handleInput(NancyInput &input) override;
Common::String _imageName;
-
+
Common::Rect _buttonSrc;
Common::Rect _buttonDest;
Common::Rect _sliderSrc;
diff --git a/engines/nancy/action/towerpuzzle.cpp b/engines/nancy/action/towerpuzzle.cpp
index b48099847c0..2f2ef2bfe4e 100644
--- a/engines/nancy/action/towerpuzzle.cpp
+++ b/engines/nancy/action/towerpuzzle.cpp
@@ -173,7 +173,7 @@ void TowerPuzzle::handleInput(NancyInput &input) {
if (_state != kRun && _solveState != kNotSolved) {
return;
}
-
+
// Note: this is a click-and-drag puzzle
// Check if mouse is above a pole hotspot
diff --git a/engines/nancy/action/towerpuzzle.h b/engines/nancy/action/towerpuzzle.h
index 1cdd51872dc..b4847812133 100644
--- a/engines/nancy/action/towerpuzzle.h
+++ b/engines/nancy/action/towerpuzzle.h
@@ -25,7 +25,7 @@
#include "engines/nancy/action/actionrecord.h"
namespace Nancy {
-
+
struct TowerPuzzleData;
namespace Action {
diff --git a/engines/nancy/commontypes.cpp b/engines/nancy/commontypes.cpp
index 0df1b79a5cb..d9b9db23fab 100644
--- a/engines/nancy/commontypes.cpp
+++ b/engines/nancy/commontypes.cpp
@@ -70,7 +70,7 @@ void BitmapDescription::readData(Common::SeekableReadStream &stream, bool frameI
// Most likely transparency
stream.skip(2);
}
-
+
readRect(stream, src);
readRect(stream, dest);
}
@@ -109,12 +109,12 @@ void SoundDescription::readNormal(Common::SeekableReadStream &stream) {
s.skip(4, kGameTypeVampire, kGameTypeNancy2);
s.syncAsUint32LE(numLoops);
-
+
s.skip(2);
s.syncAsUint16LE(volume);
s.skip(2); // Second volume, always (?) same as the first
-
+
s.skip(4, kGameTypeVampire, kGameTypeNancy1); // Prior to nancy2 this field was used for something else
s.syncAsUint32LE(samplesPerSec, kGameTypeNancy2, kGameTypeNancy2);
}
@@ -131,11 +131,11 @@ void SoundDescription::readDIGI(Common::SeekableReadStream &stream) {
s.skip(2); // PLAY_SOUND_AS_DIGI = 1, PLAY_SOUND_AS_STREAM = 2
s.syncAsUint32LE(numLoops);
-
+
s.skip(2, kGameTypeVampire, kGameTypeNancy2);
s.syncAsUint16LE(volume);
s.skip(2); // Second volume, always (?) same as the first
-
+
s.syncAsUint16LE(panAnchorFrame, kGameTypeVampire, kGameTypeNancy2);
s.skip(2, kGameTypeVampire, kGameTypeNancy2);
@@ -156,7 +156,7 @@ void SoundDescription::readMenu(Common::SeekableReadStream &stream) {
s.skip(2, kGameTypeVampire, kGameTypeNancy2);
s.syncAsUint32LE(numLoops);
-
+
s.skip(2, kGameTypeVampire, kGameTypeNancy2);
s.syncAsUint16LE(volume);
@@ -180,7 +180,7 @@ void SoundDescription::readScene(Common::SeekableReadStream &stream) {
s.skip(2, kGameTypeNancy3);
s.syncAsUint32LE(numLoops);
-
+
s.skip(2, kGameTypeVampire, kGameTypeNancy2);
s.syncAsUint16LE(volume);
s.skip(2); // Second volume, always (?) same as the first
diff --git a/engines/nancy/cursor.cpp b/engines/nancy/cursor.cpp
index 51c1fb25356..8dde88f27fe 100644
--- a/engines/nancy/cursor.cpp
+++ b/engines/nancy/cursor.cpp
@@ -40,7 +40,7 @@ void CursorManager::init(Common::SeekableReadStream *chunkStream) {
case kGameTypeNancy1:
_numCursorTypes = 4;
break;
- case kGameTypeNancy2:
+ case kGameTypeNancy2:
_numCursorTypes = 5;
break;
default:
@@ -69,7 +69,7 @@ void CursorManager::init(Common::SeekableReadStream *chunkStream) {
showCursor(false);
_isInitialized = true;
-
+
delete chunkStream;
}
@@ -104,7 +104,7 @@ void CursorManager::setCursor(CursorType type, int16 itemID) {
} else {
_curCursorID = 8;
}
-
+
return;
case kHotspotArrow:
if (gameType <= kGameTypeNancy1) {
@@ -134,7 +134,7 @@ void CursorManager::setCursor(CursorType type, int16 itemID) {
} else {
type = kMove;
}
-
+
break;
case kExit:
// Not valid in TVD
@@ -142,7 +142,7 @@ void CursorManager::setCursor(CursorType type, int16 itemID) {
_curCursorID = 3;
return;
}
-
+
break;
default:
break;
diff --git a/engines/nancy/enginedata.cpp b/engines/nancy/enginedata.cpp
index 8e08044c38f..975287e107a 100644
--- a/engines/nancy/enginedata.cpp
+++ b/engines/nancy/enginedata.cpp
@@ -29,18 +29,18 @@ namespace Nancy {
BSUM::BSUM(Common::SeekableReadStream *chunkStream) {
assert(chunkStream);
-
+
chunkStream->seek(0);
Common::Serializer s(chunkStream, nullptr);
s.setVersion(g_nancy->getGameType());
// The header is used to verify savegames
s.syncBytes(header, 90);
-
+
s.skip(0x17, kGameTypeVampire, kGameTypeVampire);
s.skip(0x49, kGameTypeNancy1, kGameTypeNancy1);
s.skip(0x43, kGameTypeNancy2);
-
+
s.syncAsUint16LE(firstScene.sceneID);
s.skip(0xC, kGameTypeVampire, kGameTypeVampire); // Palette name + unknown 2 bytes
s.syncAsUint16LE(firstScene.frameID);
@@ -85,7 +85,7 @@ BSUM::BSUM(Common::SeekableReadStream *chunkStream) {
VIEW::VIEW(Common::SeekableReadStream *chunkStream) {
assert(chunkStream);
-
+
chunkStream->seek(0);
readRect(*chunkStream, screenPosition);
readRect(*chunkStream, bounds);
@@ -153,7 +153,7 @@ INV::INV(Common::SeekableReadStream *chunkStream) {
itemDescriptions.resize(numItems);
for (uint i = 0; i < numItems; ++i) {
ItemDescription &item = itemDescriptions[i];
-
+
s.syncBytes(textBuf, itemNameLength);
textBuf[itemNameLength - 1] = '\0';
item.name = (char *)textBuf;
@@ -208,7 +208,7 @@ TBOX::TBOX(Common::SeekableReadStream *chunkStream) {
if (isVampire) {
ornamentSrcs.resize(14);
ornamentDests.resize(14);
-
+
chunkStream->seek(0x3E);
for (uint i = 0; i < 14; ++i) {
readRect(*chunkStream, ornamentSrcs[i]);
@@ -221,7 +221,7 @@ TBOX::TBOX(Common::SeekableReadStream *chunkStream) {
chunkStream->seek(0x1FE);
defaultFontID = chunkStream->readUint16LE();
-
+
if (g_nancy->getGameType() >= kGameTypeNancy2) {
chunkStream->skip(2);
conversationFontID = chunkStream->readUint16LE();
@@ -325,7 +325,7 @@ HELP::HELP(Common::SeekableReadStream *chunkStream) {
readRect(*chunkStream, buttonDest);
readRect(*chunkStream, buttonSrc);
readRect(*chunkStream, buttonHoverSrc);
- }
+ }
delete chunkStream;
}
@@ -378,7 +378,7 @@ SPUZ::SPUZ(Common::SeekableReadStream *chunkStream) {
tileOrder[i][j] = chunkStream->readSint16LE();
}
}
-
+
delete chunkStream;
}
diff --git a/engines/nancy/enginedata.h b/engines/nancy/enginedata.h
index 0fc8b690c87..09cfe0d96bf 100644
--- a/engines/nancy/enginedata.h
+++ b/engines/nancy/enginedata.h
@@ -225,7 +225,7 @@ struct RCLB {
Common::Array<uint16> exitFloorIDs;
Common::Array<uint16> floorIDs;
Common::Array<uint16> ceilingIDs;
-
+
Common::Array<uint32> doorIDs;
Common::Array<uint32> transparentwallIDs;
Common::Array<uint32> objectwallIDs;
@@ -233,7 +233,7 @@ struct RCLB {
uint16 generalLighting;
uint16 hasLightSwitch;
-
+
int16 transparentWallDensity;
int16 objectWallDensity;
int16 doorDensity;
diff --git a/engines/nancy/font.h b/engines/nancy/font.h
index 49a8e24c62e..9b84990144f 100644
--- a/engines/nancy/font.h
+++ b/engines/nancy/font.h
@@ -77,7 +77,7 @@ private:
uint16 _semicolonOffset; // 0x5E
uint16 _slashOffset; // 0x60
Common::Array<Common::Rect> _symbolRects; // 0x62
-
+
Graphics::ManagedSurface _image;
int _fontHeight;
diff --git a/engines/nancy/graphics.h b/engines/nancy/graphics.h
index a5fc0caa5b5..ac5d7090f4e 100644
--- a/engines/nancy/graphics.h
+++ b/engines/nancy/graphics.h
@@ -38,7 +38,7 @@ public:
void init();
void draw(bool updateScreen = true);
-
+
void loadFonts(Common::SeekableReadStream *chunkStream);
void addObject(RenderObject *object);
diff --git a/engines/nancy/input.cpp b/engines/nancy/input.cpp
index 440bac77db3..1c86078ed4b 100644
--- a/engines/nancy/input.cpp
+++ b/engines/nancy/input.cpp
@@ -134,7 +134,7 @@ NancyInput InputManager::getInput() const {
} else {
ret.eatMouseInput();
}
-
+
return ret;
}
diff --git a/engines/nancy/metaengine.cpp b/engines/nancy/metaengine.cpp
index 786b953aa11..f9715a900b9 100644
--- a/engines/nancy/metaengine.cpp
+++ b/engines/nancy/metaengine.cpp
@@ -70,7 +70,7 @@ public:
void getSavegameThumbnail(Graphics::Surface &thumb) override;
void registerDefaultSettings(const Common::String &target) const override;
-
+
const ADExtraGuiOptionsMap *getAdvancedExtraGuiOptions() const override;
};
@@ -112,7 +112,7 @@ void NancyMetaEngine::registerDefaultSettings(const Common::String &target) cons
ConfMan.setInt("speech_volume", 54 * 255 / 100, target);
ConfMan.setInt("sfx_volume", 51 * 255 / 100, target);
ConfMan.setBool("subtitles", true, target);
-
+
ConfMan.setBool("player_speech", true, target);
ConfMan.setBool("character_speech", true, target);
}
diff --git a/engines/nancy/misc/lightning.cpp b/engines/nancy/misc/lightning.cpp
index c0ed5ea03ec..5058f5b3f25 100644
--- a/engines/nancy/misc/lightning.cpp
+++ b/engines/nancy/misc/lightning.cpp
@@ -96,7 +96,7 @@ void Lightning::run() {
(sceneID > 326 && sceneID < 334) ||
(sceneID > 341 && sceneID < 1726) ||
(sceneID > 1731)) {
-
+
beginLightning(2, 22, 65);
}
}
diff --git a/engines/nancy/misc/lightning.h b/engines/nancy/misc/lightning.h
index fd0cbbc5e52..f80b7ce300a 100644
--- a/engines/nancy/misc/lightning.h
+++ b/engines/nancy/misc/lightning.h
@@ -35,7 +35,7 @@ public:
void beginLightning(int16 distance, uint16 pulseTime, int16 rgbPercent);
void endLightning();
-
+
void run();
private:
diff --git a/engines/nancy/misc/specialeffect.cpp b/engines/nancy/misc/specialeffect.cpp
index a964a986cf3..2d929f11f11 100644
--- a/engines/nancy/misc/specialeffect.cpp
+++ b/engines/nancy/misc/specialeffect.cpp
@@ -74,7 +74,7 @@ void SpecialEffect::afterSceneChange() {
// transColor gets set to the one color guaranteed to not appear in any scene,
// and transparency works correctly
_fadeTo.setTransparentColor(g_nancy->_graphicsManager->getTransColor());
-
+
registerGraphics();
_nextFrameTime = g_nancy->getTotalPlayTime() + _frameTime;
_fadeToBlackEndTime = g_nancy->getTotalPlayTime() + _fadeToBlackTime;
diff --git a/engines/nancy/nancy.cpp b/engines/nancy/nancy.cpp
index 13950e84a8b..8a333e145f9 100644
--- a/engines/nancy/nancy.cpp
+++ b/engines/nancy/nancy.cpp
@@ -112,7 +112,7 @@ NancyEngine *NancyEngine::create(GameType type, OSystem *syst, const NancyGameDe
if (type >= kGameTypeVampire && type <= kGameTypeNancy6) {
return new NancyEngine(syst, gd);
}
-
+
error("Unknown GameType");
}
@@ -274,12 +274,12 @@ Common::Error NancyEngine::run() {
if (s) {
s->process();
}
-
+
_graphicsManager->draw();
-
- if (_gameFlow.changingState) {
+
+ if (_gameFlow.changingState) {
_graphicsManager->clearObjects();
-
+
s = getStateObject(_gameFlow.prevState);
if (s) {
if(s->onStateExit(_gameFlow.prevState)) {
diff --git a/engines/nancy/state/credits.cpp b/engines/nancy/state/credits.cpp
index d8b38fd4c76..b2c8ba5409e 100644
--- a/engines/nancy/state/credits.cpp
+++ b/engines/nancy/state/credits.cpp
@@ -100,7 +100,7 @@ void Credits::run() {
g_nancy->_sound->stopSound(_creditsData->sound);
g_nancy->setMouseEnabled(true);
_fullTextSurface.free();
-
+
// We don't yet support the original menus, so we close the game and go back to the launcher
// g_nancy->setState(NancyState::kMainMenu);
diff --git a/engines/nancy/state/help.cpp b/engines/nancy/state/help.cpp
index 63815fc33d4..f3394b038ed 100644
--- a/engines/nancy/state/help.cpp
+++ b/engines/nancy/state/help.cpp
@@ -72,7 +72,7 @@ bool Help::onStateExit(const NancyState::NancyState nextState) {
// Handle the GMM being called
if (nextState == NancyState::kPause) {
g_nancy->_sound->pauseSound("MSND", true);
-
+
return false;
} else {
return true;
diff --git a/engines/nancy/state/map.cpp b/engines/nancy/state/map.cpp
index 636ecbc4536..b12f597a51d 100644
--- a/engines/nancy/state/map.cpp
+++ b/engines/nancy/state/map.cpp
@@ -405,7 +405,7 @@ void Nancy1Map::load() {
if (!g_nancy->_sound->isSoundPlaying(getSound())) {
g_nancy->_sound->loadSound(getSound());
}
-
+
registerGraphics();
_state = kRun;
}
diff --git a/engines/nancy/state/scene.cpp b/engines/nancy/state/scene.cpp
index 2141521da3f..6e928c152f0 100644
--- a/engines/nancy/state/scene.cpp
+++ b/engines/nancy/state/scene.cpp
@@ -172,7 +172,7 @@ bool Scene::onStateExit(const NancyState::NancyState nextState) {
if (nextState != NancyState::kPause) {
_timers.pushedPlayTime = g_nancy->getTotalPlayTime();
}
-
+
_actionManager.onPause(true);
pauseSceneSpecificSounds();
_gameStateRequested = NancyState::kNone;
@@ -181,7 +181,7 @@ bool Scene::onStateExit(const NancyState::NancyState nextState) {
if (nextState == NancyState::kMap && g_nancy->getGameType() == kGameTypeVampire) {
_clock->registerGraphics();
}
-
+
return false;
}
@@ -610,7 +610,7 @@ PuzzleData *Scene::getPuzzleData(const uint32 tag) {
if (newData) {
_puzzleData.setVal(tag, newData);
}
-
+
return newData;
}
}
@@ -781,7 +781,7 @@ void Scene::handleInput() {
break;
}
}
-
+
// Handle clock before viewport since it overlaps the left hotspot in TVD
if (_clock) {
_clock->handleInput(input);
@@ -814,7 +814,7 @@ void Scene::handleInput() {
}
}
}
-
+
if (_helpButton) {
_helpButton->handleInput(input);
@@ -840,7 +840,7 @@ void Scene::initStaticData() {
// Init buttons
BSUM *bsum = g_nancy->_bootSummary;
assert(bsum);
-
+
if (g_nancy->getGameType() == kGameTypeVampire) {
_mapHotspot = bsum->extraButtonHotspot;
} else if (g_nancy->_mapData) {
@@ -850,7 +850,7 @@ void Scene::initStaticData() {
_menuButton = new UI::Button(5, g_nancy->_graphicsManager->_object0, bsum->menuButtonSrc, bsum->menuButtonDest, bsum->menuButtonHighlightSrc);
_helpButton = new UI::Button(5, g_nancy->_graphicsManager->_object0, bsum->helpButtonSrc, bsum->helpButtonDest, bsum->helpButtonHighlightSrc);
g_nancy->setMouseEnabled(true);
-
+
// Init ornaments and clock (TVD only)
if (g_nancy->getGameType() == kGameTypeVampire) {
_viewportOrnaments = new UI::ViewportOrnaments(9);
diff --git a/engines/nancy/ui/clock.cpp b/engines/nancy/ui/clock.cpp
index 27ec3a6fda5..cb1e3534fd4 100644
--- a/engines/nancy/ui/clock.cpp
+++ b/engines/nancy/ui/clock.cpp
@@ -71,7 +71,7 @@ void Clock::init() {
if (g_nancy->getGameType() == kGameTypeVampire) {
GraphicsManager::loadSurfacePalette(_drawSurface, "OBJECT0");
}
-
+
setTransparent(true);
_animation.init();
@@ -129,7 +129,7 @@ void Clock::ClockAnim::init() {
_destRects = _owner->_clockData->animDests;
_highlightSrcRect = g_nancy->_bootSummary->clockHighlightSrc;
_highlightDestRect = g_nancy->_bootSummary->extraButtonHighlightDest;
-
+
if (_destRects.size()) {
moveTo(g_nancy->_bootSummary->extraButtonHotspot);
} else {
@@ -165,7 +165,7 @@ void Clock::ClockAnim::onClick() {
} else if (g_nancy->getGameType() != kGameTypeVampire) {
_owner->_staticImage.setVisible(true);
}
-
+
_owner->_playerTime = NancySceneState.getPlayerTime();
g_nancy->_sound->playSound("GLOB");
}
diff --git a/engines/nancy/ui/inventorybox.cpp b/engines/nancy/ui/inventorybox.cpp
index b47a1153d3d..b39a1760ae4 100644
--- a/engines/nancy/ui/inventorybox.cpp
+++ b/engines/nancy/ui/inventorybox.cpp
@@ -112,7 +112,7 @@ void InventoryBox::handleInput(NancyInput &input) {
}
} else if (_itemHotspots[i].itemID != -1) {
g_nancy->_cursorManager->setCursorType(CursorManager::kHotspotArrow);
-
+
hoveredHotspot = i;
if (input.input & NancyInput::kLeftMouseButtonUp) {
diff --git a/engines/nancy/ui/textbox.cpp b/engines/nancy/ui/textbox.cpp
index e5f83a7caef..5460dbf0095 100644
--- a/engines/nancy/ui/textbox.cpp
+++ b/engines/nancy/ui/textbox.cpp
@@ -234,7 +234,7 @@ void Textbox::drawTextbox() {
bool isColor = false;
for (Common::String &line : wrappedLines) {
uint horizontalOffset = 0;
-
+
// Trim whitespaces at end of wrapped lines to make counting
// of characters consistent. We do this manually since we _want_
// some whitespaces at the beginning of a line (e.g. tabs)
@@ -276,7 +276,7 @@ void Textbox::drawTextbox() {
tbox->firstLineOffset - font->getFontHeight() + _numLines * lineDist,
maxWidth,
isColor);
-
+
// Then, draw the highlight
if (hasHotspot) {
highlightFont->drawString( &_textHighlightSurface,
@@ -387,7 +387,7 @@ void Textbox::onScrollbarMove() {
uint16 Textbox::getInnerHeight() const {
TBOX *tbox = g_nancy->_textboxData;
assert(tbox);
-
+
// These calculations are _almost_ correct, but off by a pixel sometimes
uint lineDist = tbox->lineHeight + tbox->lineHeight / 4;
if (g_nancy->getGameType() == kGameTypeVampire) {
diff --git a/engines/nancy/ui/viewport.cpp b/engines/nancy/ui/viewport.cpp
index e50845179d6..c11a4f28536 100644
--- a/engines/nancy/ui/viewport.cpp
+++ b/engines/nancy/ui/viewport.cpp
@@ -192,7 +192,7 @@ void Viewport::loadVideo(const Common::String &filename, uint frameNr, uint vert
_videoFormat = format;
enableEdges(kUp | kDown | kLeft | kRight);
-
+
_panningType = panningType;
setFrame(frameNr);
diff --git a/engines/nancy/util.cpp b/engines/nancy/util.cpp
index dce9817d73a..4a1fb16a388 100644
--- a/engines/nancy/util.cpp
+++ b/engines/nancy/util.cpp
@@ -91,10 +91,10 @@ void readFilename(Common::SeekableReadStream &stream, Common::String &inString)
stream.read(buf, 33);
buf[32] = '\0';
}
-
+
inString = buf;
}
-
+
// Reads an 8-character filename from a 10-character source
void readFilename(Common::Serializer &stream, Common::String &inString, Common::Serializer::Version minVersion, Common::Serializer::Version maxVersion) {
@@ -111,7 +111,7 @@ void readFilename(Common::Serializer &stream, Common::String &inString, Common::
stream.syncBytes((byte *)buf, 33);
buf[32] = '\0';
}
-
+
inString = buf;
}
}
@@ -139,7 +139,7 @@ void readFilenameArray(Common::Serializer &stream, Common::Array<Common::String>
stream.syncBytes((byte *)buf, 33);
buf[32] = '\0';
}
-
+
str = buf;
}
}
diff --git a/engines/nancy/video.cpp b/engines/nancy/video.cpp
index d03f685225b..d51504639e1 100644
--- a/engines/nancy/video.cpp
+++ b/engines/nancy/video.cpp
@@ -248,13 +248,13 @@ const Graphics::Surface *AVFDecoder::AVFVideoTrack::decodeFrame(uint frameNr) {
warning("Decompressed size %d exceeds frame size %d", info.size, _frameSize);
return nullptr;
}
-
+
decompBuf = (byte *)_surface->getPixels();
} else {
// For types 1 and 2, we decompress to a temp buffer for decoding
decompBuf = new byte[info.size];
}
-
+
Common::SeekableSubReadStream input(_fileStream, info.offset, info.offset + info.compressedSize);
if (_compressed) {
@@ -268,7 +268,7 @@ const Graphics::Surface *AVFDecoder::AVFVideoTrack::decodeFrame(uint frameNr) {
} else {
// No compression, just copy the data
input.read(decompBuf, info.size);
- }
+ }
if (info.type != 0) {
Common::MemoryReadStream decompStr(decompBuf, info.size);
@@ -278,7 +278,7 @@ const Graphics::Surface *AVFDecoder::AVFVideoTrack::decodeFrame(uint frameNr) {
if (info.type != 0) {
delete[] decompBuf;
}
-
+
_refFrame = frameNr;
return _surface;
}
Commit: bb9e86e9c63acb952c18eec83eae3848f9fceb5d
https://github.com/scummvm/scummvm/commit/bb9e86e9c63acb952c18eec83eae3848f9fceb5d
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2023-08-07T10:48:59+02:00
Commit Message:
COMMON: Fix warnings
Changed paths:
common/formats/formatinfo.cpp
diff --git a/common/formats/formatinfo.cpp b/common/formats/formatinfo.cpp
index ff8e6dcc6a4..f96805ca602 100644
--- a/common/formats/formatinfo.cpp
+++ b/common/formats/formatinfo.cpp
@@ -37,12 +37,12 @@ struct FormatTypeInfo {
};
const FormatTypeInfo g_formatTypeInfo[kCount] = {
- {nullptr},
+ {nullptr, nullptr},
// Image formats
- {"bmp"},
- {"png"},
- {"jpg"},
+ {"bmp", nullptr},
+ {"png", nullptr},
+ {"jpg", nullptr},
{"pct", "pict"},
// Binary formats
Commit: 97a172f22a441a15d0bf254fb9f6d2d32de20615
https://github.com/scummvm/scummvm/commit/97a172f22a441a15d0bf254fb9f6d2d32de20615
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2023-08-07T10:49:54+02:00
Commit Message:
GUI: Remove unused variable
Changed paths:
gui/imagealbum-dialog.cpp
diff --git a/gui/imagealbum-dialog.cpp b/gui/imagealbum-dialog.cpp
index c7d392cbd4b..d19f2fdcc45 100644
--- a/gui/imagealbum-dialog.cpp
+++ b/gui/imagealbum-dialog.cpp
@@ -145,9 +145,6 @@ void ImageAlbumDialog::open() {
}
void ImageAlbumDialog::changeToSlot(uint slot) {
- ContainerWidget *container = _imageContainer;
- container = _imageContainer;
-
bool canSaveImage = _canAlwaysSaveImage;
if (_imageGraphic) {
More information about the Scummvm-git-logs
mailing list