aboutsummaryrefslogtreecommitdiff
path: root/sky/grid.cpp
diff options
context:
space:
mode:
authorRobert Göffringmann2004-12-15 06:48:08 +0000
committerRobert Göffringmann2004-12-15 06:48:08 +0000
commit2308ba8aafcd4d9f4f1ef7c0281177455c8e3e14 (patch)
tree1296b833b4c30432d828a7b87a7bbba8abf54284 /sky/grid.cpp
parent75ac1363b36158bfab3c51a5b9aafec85ea54d4e (diff)
downloadscummvm-rg350-2308ba8aafcd4d9f4f1ef7c0281177455c8e3e14.tar.gz
scummvm-rg350-2308ba8aafcd4d9f4f1ef7c0281177455c8e3e14.tar.bz2
scummvm-rg350-2308ba8aafcd4d9f4f1ef7c0281177455c8e3e14.zip
moved compacts and related static data out of the scummvm.exe into an external file
(available from www.lavosspawn.de/tmp/sky_cpt.zip) svn-id: r16053
Diffstat (limited to 'sky/grid.cpp')
-rw-r--r--sky/grid.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/sky/grid.cpp b/sky/grid.cpp
index 8967eeabe8..6e94a28bc3 100644
--- a/sky/grid.cpp
+++ b/sky/grid.cpp
@@ -23,6 +23,7 @@
#include "sky/disk.h"
#include "sky/grid.h"
#include "sky/logic.h"
+#include "sky/compact.h"
namespace Sky {
@@ -129,10 +130,11 @@ int8 Grid::_gridConvertTable[] = {
69, //96
};
-Grid::Grid(Disk *pDisk) {
+Grid::Grid(Disk *pDisk, SkyCompact *skyCompact) {
for (int cnt = 0; cnt < TOT_NO_GRIDS; cnt++)
_gameGrids[cnt] = NULL;
_skyDisk = pDisk;
+ _skyCompact = skyCompact;
}
Grid::~Grid(void) {
@@ -152,12 +154,13 @@ void Grid::loadGrids(void) {
// Reloading the grids can sometimes cause problems eg when reichs door is
// open the door grid bit gets replaced so you can't get back in (or out)
if (Logic::_scriptVariables[REICH_DOOR_FLAG])
- removeGrid(256, 280, 1, &SkyCompact::reich_door_20);
+ removeGrid(256, 280, 1, _skyCompact->fetchCpt(CPT_REICH_DOOR_20));
+ //removeGrid(256, 280, 1, &SkyCompact::reich_door_20);
}
}
bool Grid::getGridValues(Compact *cpt, uint8 *resGrid, uint32 *resBitNum, uint32 *resWidth) {
- uint16 width = SkyCompact::getMegaSet(cpt, cpt->extCompact->megaSet)->gridWidth;
+ uint16 width = SkyCompact::getMegaSet(cpt)->gridWidth;
return getGridValues(cpt->xcood, cpt->ycood, width, cpt, resGrid, resBitNum, resWidth);
}