DM: Fix 2 GCC warnings, some renaming
This commit is contained in:
parent
a60558071d
commit
706b1b27a4
8 changed files with 30 additions and 30 deletions
|
@ -1828,7 +1828,7 @@ ChampionIndex ChampionMan::getIndexInCell(int16 cell) {
|
|||
}
|
||||
|
||||
void ChampionMan::resetDataToStartGame() {
|
||||
if (_vm->_gameMode = k0_modeLoadSavedGame) {
|
||||
if (_vm->_gameMode == kDMModeLoadSavedGame) {
|
||||
Thing handThing = _leaderHandObject;
|
||||
if (handThing == Thing::_none) {
|
||||
_leaderEmptyHanded = true;
|
||||
|
|
|
@ -137,7 +137,7 @@ DMEngine::DMEngine(OSystem *syst, const DMADGameDescription *desc) : Engine(syst
|
|||
_engineShouldQuit = false;
|
||||
_dungeonId = 0;
|
||||
|
||||
_gameMode = k0_modeLoadSavedGame;
|
||||
_gameMode = kDMModeLoadSavedGame;
|
||||
_restartGameRequest = false;
|
||||
_stopWaitingForPlayerInput = true;
|
||||
_gameTimeTicking = false;
|
||||
|
@ -205,7 +205,7 @@ Common::Error DMEngine::loadGameState(int slot) {
|
|||
if (loadgame(slot) != kDMLoadgameFailure) {
|
||||
_displayMan->fillScreen(kDMColorBlack);
|
||||
_displayMan->startEndFadeToPalette(_displayMan->_palDungeonView[0]);
|
||||
_gameMode = k0_modeLoadSavedGame;
|
||||
_gameMode = kDMModeLoadSavedGame;
|
||||
|
||||
startGame();
|
||||
_restartGameRequest = false;
|
||||
|
@ -259,7 +259,7 @@ void DMEngine::initializeGame() {
|
|||
if (_engineShouldQuit)
|
||||
return;
|
||||
|
||||
if (_gameMode == k0_modeLoadSavedGame) { // if resume was clicked, bring up ScummVM load screen
|
||||
if (_gameMode == kDMModeLoadSavedGame) { // if resume was clicked, bring up ScummVM load screen
|
||||
GUI::SaveLoadChooser *dialog = new GUI::SaveLoadChooser(_("Restore game:"), _("Restore"), false);
|
||||
saveSlot = dialog->runModalWithCurrentTarget();
|
||||
delete dialog;
|
||||
|
@ -273,7 +273,7 @@ void DMEngine::initializeGame() {
|
|||
_displayMan->allocateFlippedWallBitmaps();
|
||||
|
||||
startGame();
|
||||
if (_gameMode != k0_modeLoadSavedGame)
|
||||
if (_gameMode != kDMModeLoadSavedGame)
|
||||
_moveSens->getMoveResult(Thing::_party, kDMMapXNotOnASquare, 0, _dungeonMan->_partyMapX, _dungeonMan->_partyMapY);
|
||||
_eventMan->showMouse();
|
||||
_eventMan->discardAllInput();
|
||||
|
@ -312,7 +312,7 @@ void DMEngine::startGame() {
|
|||
|
||||
processNewPartyMap(_dungeonMan->_partyMapIndex);
|
||||
|
||||
if (_gameMode == k0_modeLoadSavedGame) {
|
||||
if (_gameMode == kDMModeLoadSavedGame) {
|
||||
_displayMan->startEndFadeToPalette(_displayMan->_paletteTopAndBottomScreen);
|
||||
_displayMan->_useByteBoxCoordinates = false;
|
||||
delay(1);
|
||||
|
@ -535,21 +535,21 @@ void DMEngine::processEntrance() {
|
|||
drawEntrance();
|
||||
_eventMan->showMouse();
|
||||
_eventMan->discardAllInput();
|
||||
_gameMode = k99_modeWaitingOnEntrance;
|
||||
_gameMode = kDMModeWaitingOnEntrance;
|
||||
do {
|
||||
_eventMan->processInput();
|
||||
if (_engineShouldQuit)
|
||||
return;
|
||||
_eventMan->processCommandQueue();
|
||||
_displayMan->updateScreen();
|
||||
} while (_gameMode == k99_modeWaitingOnEntrance);
|
||||
} while (_gameMode == kDMCommandEntranceDrawCredits);
|
||||
} while (_gameMode == kDMModeWaitingOnEntrance);
|
||||
} while (_gameMode == kDMModeEntranceDrawCredits);
|
||||
|
||||
//Strangerke: CHECKME: Earlier versions were using G0566_puc_Graphic534_Sound01Switch
|
||||
_sound->play(kDMSoundIndexSwitch, 112, 0x40, 0x40);
|
||||
delay(20);
|
||||
_eventMan->showMouse();
|
||||
if (_gameMode != k0_modeLoadSavedGame)
|
||||
if (_gameMode != kDMModeLoadSavedGame)
|
||||
openEntranceDoors();
|
||||
|
||||
delete[] _entranceDoorAnimSteps[0];
|
||||
|
@ -701,7 +701,7 @@ T0444017:
|
|||
_displayMan->startEndFadeToPalette(darkBluePalette);
|
||||
_displayMan->fillScreen(kDMColorBlack);
|
||||
_displayMan->startEndFadeToPalette(_displayMan->_palDungeonView[0]);
|
||||
_gameMode = k0_modeLoadSavedGame;
|
||||
_gameMode = kDMModeLoadSavedGame;
|
||||
if (loadgame(1) != kDMLoadgameFailure) {
|
||||
startGame();
|
||||
_restartGameRequest = false;
|
||||
|
@ -891,7 +891,7 @@ void DMEngine::entranceDrawCredits() {
|
|||
_displayMan->startEndFadeToPalette(_displayMan->_palCredits);
|
||||
delay(50);
|
||||
_eventMan->waitForMouseOrKeyActivity();
|
||||
_gameMode = k202_modeEntranceDrawCredits;
|
||||
_gameMode = kDMModeEntranceDrawCredits;
|
||||
}
|
||||
|
||||
void DMEngine::fuseSequence() {
|
||||
|
|
|
@ -129,10 +129,10 @@ enum Cell {
|
|||
};
|
||||
|
||||
enum GameMode {
|
||||
k0_modeLoadSavedGame = 0, // @ C000_MODE_LOAD_SAVED_GAME
|
||||
k1_modeLoadDungeon = 1, // @ C001_MODE_LOAD_DUNGEON
|
||||
k99_modeWaitingOnEntrance = 99, // @ C099_MODE_WAITING_ON_ENTRANCE
|
||||
k202_modeEntranceDrawCredits = 202 // @ C202_MODE_ENTRANCE_DRAW_CREDITS
|
||||
kDMModeLoadSavedGame = 0, // @ C000_MODE_LOAD_SAVED_GAME
|
||||
kDMModeLoadDungeon = 1, // @ C001_MODE_LOAD_DUNGEON
|
||||
kDMModeWaitingOnEntrance = 99, // @ C099_MODE_WAITING_ON_ENTRANCE
|
||||
kDMModeEntranceDrawCredits = 202 // @ C202_MODE_ENTRANCE_DRAW_CREDITS
|
||||
};
|
||||
|
||||
enum LoadgameResult {
|
||||
|
|
|
@ -562,7 +562,7 @@ void DungeonMan::loadDungeonFile(Common::InSaveFile *file) {
|
|||
50 /* Explosion */
|
||||
};
|
||||
|
||||
if (_vm->_gameMode != k0_modeLoadSavedGame)
|
||||
if (_vm->_gameMode != kDMModeLoadSavedGame)
|
||||
decompressDungeonFile();
|
||||
|
||||
Common::ReadStream *dunDataStream = nullptr;
|
||||
|
@ -587,7 +587,7 @@ void DungeonMan::loadDungeonFile(Common::InSaveFile *file) {
|
|||
_dungeonFileHeader._thingCounts[i] = dunDataStream->readUint16BE();
|
||||
|
||||
// init party position and mapindex
|
||||
if (_vm->_gameMode != k0_modeLoadSavedGame) {
|
||||
if (_vm->_gameMode != kDMModeLoadSavedGame) {
|
||||
uint16 startLoc = _dungeonFileHeader._partyStartLocation;
|
||||
_partyDir = (Direction)((startLoc >> 10) & 3);
|
||||
_partyMapX = startLoc & 0x1F;
|
||||
|
@ -643,7 +643,7 @@ void DungeonMan::loadDungeonFile(Common::InSaveFile *file) {
|
|||
_dungeonColumCount = columCount;
|
||||
|
||||
uint32 actualSquareFirstThingCount = _dungeonFileHeader._squareFirstThingCount;
|
||||
if (_vm->_gameMode != k0_modeLoadSavedGame)
|
||||
if (_vm->_gameMode != kDMModeLoadSavedGame)
|
||||
_dungeonFileHeader._squareFirstThingCount += 300;
|
||||
|
||||
if (!_vm->_restartGameRequest) {
|
||||
|
@ -662,7 +662,7 @@ void DungeonMan::loadDungeonFile(Common::InSaveFile *file) {
|
|||
for (uint16 i = 0; i < actualSquareFirstThingCount; ++i)
|
||||
_squareFirstThings[i].set(dunDataStream->readUint16BE());
|
||||
|
||||
if (_vm->_gameMode != k0_modeLoadSavedGame) {
|
||||
if (_vm->_gameMode != kDMModeLoadSavedGame) {
|
||||
for (uint16 i = 0; i < 300; ++i)
|
||||
_squareFirstThings[actualSquareFirstThingCount + i] = Thing::_none;
|
||||
}
|
||||
|
@ -676,13 +676,13 @@ void DungeonMan::loadDungeonFile(Common::InSaveFile *file) {
|
|||
for (uint16 i = 0; i < _dungeonFileHeader._textDataWordCount; ++i)
|
||||
_dungeonTextData[i] = dunDataStream->readUint16BE();
|
||||
|
||||
if (_vm->_gameMode != k0_modeLoadSavedGame)
|
||||
if (_vm->_gameMode != kDMModeLoadSavedGame)
|
||||
_vm->_timeline->_eventMaxCount = 100;
|
||||
|
||||
// load things
|
||||
for (uint16 thingType = kDMThingTypeDoor; thingType < kDMThingTypeTotal; ++thingType) {
|
||||
uint16 thingCount = _dungeonFileHeader._thingCounts[thingType];
|
||||
if (_vm->_gameMode != k0_modeLoadSavedGame)
|
||||
if (_vm->_gameMode != kDMModeLoadSavedGame)
|
||||
_dungeonFileHeader._thingCounts[thingType] = MIN((thingType == kDMThingTypeExplosion) ? 768 : 1024, thingCount + additionalThingCounts[thingType]);
|
||||
|
||||
uint16 thingStoreWordCount = _thingDataWordCount[thingType];
|
||||
|
@ -713,7 +713,7 @@ void DungeonMan::loadDungeonFile(Common::InSaveFile *file) {
|
|||
}
|
||||
}
|
||||
|
||||
if (_vm->_gameMode != k0_modeLoadSavedGame) {
|
||||
if (_vm->_gameMode != kDMModeLoadSavedGame) {
|
||||
if ((thingType == kDMThingTypeGroup) || thingType >= kDMThingTypeProjectile)
|
||||
_vm->_timeline->_eventMaxCount += _dungeonFileHeader._thingCounts[thingType];
|
||||
|
||||
|
|
|
@ -904,12 +904,12 @@ void EventManager::processCommandQueue() {
|
|||
}
|
||||
|
||||
if (cmdType == kDMCommandEntranceEnterDungeon) {
|
||||
_vm->_gameMode = k1_modeLoadDungeon;
|
||||
_vm->_gameMode = kDMModeLoadDungeon;
|
||||
return;
|
||||
}
|
||||
|
||||
if (cmdType == kDMCommandEntranceResume) {
|
||||
_vm->_gameMode = k0_modeLoadSavedGame;
|
||||
_vm->_gameMode = kDMModeLoadSavedGame;
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -76,7 +76,7 @@ uint16 GroupMan::toggleFlag(uint16& val, uint16 mask) {
|
|||
}
|
||||
|
||||
void GroupMan::initActiveGroups() {
|
||||
if (_vm->_gameMode != k0_modeLoadSavedGame)
|
||||
if (_vm->_gameMode != kDMModeLoadSavedGame)
|
||||
_maxActiveGroupCount = 60;
|
||||
|
||||
if (_activeGroups)
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
namespace DM {
|
||||
|
||||
LoadgameResult DMEngine::loadgame(int16 slot) {
|
||||
if (slot == -1 && _gameMode == k0_modeLoadSavedGame)
|
||||
if (slot == -1 && _gameMode == kDMModeLoadSavedGame)
|
||||
return kDMLoadgameFailure;
|
||||
|
||||
bool fadePalette = true;
|
||||
|
@ -59,7 +59,7 @@ LoadgameResult DMEngine::loadgame(int16 slot) {
|
|||
uint16 _dungeonId;
|
||||
} dmSaveHeader;
|
||||
|
||||
if (_gameMode != k0_modeLoadSavedGame) {
|
||||
if (_gameMode != kDMModeLoadSavedGame) {
|
||||
//L1366_B_FadePalette = !F0428_DIALOG_RequireGameDiskInDrive_NoDialogDrawn(C0_DO_NOT_FORCE_DIALOG_DM_CSB, true);
|
||||
_restartGameAllowed = false;
|
||||
_championMan->_partyChampionCount = 0;
|
||||
|
@ -123,7 +123,7 @@ LoadgameResult DMEngine::loadgame(int16 slot) {
|
|||
_dungeonMan->loadDungeonFile(file);
|
||||
delete file;
|
||||
|
||||
if (_gameMode != k0_modeLoadSavedGame) {
|
||||
if (_gameMode != kDMModeLoadSavedGame) {
|
||||
_timeline->initTimeline();
|
||||
_groupMan->initActiveGroups();
|
||||
|
||||
|
|
|
@ -110,7 +110,7 @@ Timeline::~Timeline() {
|
|||
void Timeline::initTimeline() {
|
||||
_events = new TimelineEvent[_eventMaxCount];
|
||||
_timeline = new uint16[_eventMaxCount];
|
||||
if (_vm->_gameMode != k0_modeLoadSavedGame) {
|
||||
if (_vm->_gameMode != kDMModeLoadSavedGame) {
|
||||
for (int16 i = 0; i < _eventMaxCount; ++i)
|
||||
_events[i]._type = k0_TMEventTypeNone;
|
||||
_eventCount = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue