diff options
author | Strangerke | 2011-09-06 22:59:10 +0200 |
---|---|---|
committer | Strangerke | 2011-09-06 22:59:10 +0200 |
commit | 39d09d5865d9a01bfdbde02b047806f801a5d5c8 (patch) | |
tree | fcade39041ec5bad397e436dc1e524fc76ab20bc /engines/cge/cge.cpp | |
parent | 85d10fe6c7fb249bdb0e349fba5f4d46dce464e4 (diff) | |
download | scummvm-rg350-39d09d5865d9a01bfdbde02b047806f801a5d5c8.tar.gz scummvm-rg350-39d09d5865d9a01bfdbde02b047806f801a5d5c8.tar.bz2 scummvm-rg350-39d09d5865d9a01bfdbde02b047806f801a5d5c8.zip |
CGE: Cleanup: remove residuals of the demo code
Thanks to fingolfin and LordHoto for pointing it out
Diffstat (limited to 'engines/cge/cge.cpp')
-rw-r--r-- | engines/cge/cge.cpp | 27 |
1 files changed, 4 insertions, 23 deletions
diff --git a/engines/cge/cge.cpp b/engines/cge/cge.cpp index dafb8a3782..66262e5e4a 100644 --- a/engines/cge/cge.cpp +++ b/engines/cge/cge.cpp @@ -38,6 +38,8 @@ namespace CGE { +const int CGEEngine::_maxCaveArr[5] = {1, 8, 16, 23, 24}; + CGEEngine::CGEEngine(OSystem *syst, const ADGameDescription *gameDescription) : Engine(syst), _gameDescription(gameDescription), _randomSource("cge") { @@ -54,36 +56,17 @@ CGEEngine::CGEEngine(OSystem *syst, const ADGameDescription *gameDescription) } void CGEEngine::initCaveValues() { - _caveDx = 9; - _caveDy = 10; - _caveNx = 8; - _caveNy = 3; - _caveMax = _caveNx * _caveNy; - - _maxCaveArr[0] = 1; - _maxCaveArr[1] = 8; - _maxCaveArr[2] = 16; - _maxCaveArr[3] = 23; - _maxCaveArr[4] = 24; - - _heroXY = (Hxy *)malloc(sizeof(Hxy) * _caveMax); - for (int i = 0; i < _caveMax; i++) { + for (int i = 0; i < kCaveMax; i++) { _heroXY[i]._x = 0; _heroXY[i]._y = 0; } - _barriers = (Bar *)malloc(sizeof(Bar) * (1 + _caveMax)); - for (int i = 0; i < _caveMax + 1; i++) { + for (int i = 0; i < kCaveMax + 1; i++) { _barriers[i]._horz = 0xFF; _barriers[i]._vert = 0xFF; } } -void CGEEngine::freeCaveValues() { - free(_heroXY); - free(_barriers); -} - void CGEEngine::init() { debugC(1, kCGEDebugEngine, "CGEEngine::setup()"); @@ -195,8 +178,6 @@ void CGEEngine::deinit() { delete _miniShpList[i]; delete[] _miniShpList; } - - freeCaveValues(); } CGEEngine::~CGEEngine() { |