blob: 1a07ae2e35216d398db2abefb52fd687236c0e1f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
#include "loadsave.h"
#include "dungeonman.h"
#include "champion.h"
namespace DM {
LoadsaveMan::LoadsaveMan(DMEngine *vm) : _vm(vm) {}
LoadgameResponse LoadsaveMan::loadgame() {
bool newGame = _vm->_dungeonMan->_messages._newGame;
ChampionMan &cm = *_vm->_championMan;
if (newGame) {
_vm->_restartGameAllowed = false;
cm._partyChampionCount = 0;
cm._leaderHand = Thing::_thingNone;
_vm->_gameId = _vm->_rnd->getRandomNumber(65536) * _vm->_rnd->getRandomNumber(65536);
} else {
assert(false);
// MISSING CODE: load game
}
_vm->_dungeonMan->loadDungeonFile();
if (newGame) {
warning("MISSING CODE: Timline init, Group init");
} else {
assert(false);
// MISSING CODE: load game
}
cm._partyDead = false;
return kLoadgameSuccess;
}
}
|