diff options
author | Filippos Karapetis | 2017-02-11 17:16:45 +0200 |
---|---|---|
committer | Filippos Karapetis | 2017-02-11 17:16:45 +0200 |
commit | 05c99c5b0d2103bbbceeb68520484cc5ecbd0360 (patch) | |
tree | 117fbce0b75d645db602a3e4efc7869ac2e7fef1 | |
parent | 37c53cdf49209a582cc661b3c300c5b067ced8b8 (diff) | |
download | scummvm-rg350-05c99c5b0d2103bbbceeb68520484cc5ecbd0360.tar.gz scummvm-rg350-05c99c5b0d2103bbbceeb68520484cc5ecbd0360.tar.bz2 scummvm-rg350-05c99c5b0d2103bbbceeb68520484cc5ecbd0360.zip |
CRYO: Move more static data to cryo.dat (2/2)
-rw-r--r-- | engines/cryo/eden.cpp | 70 | ||||
-rw-r--r-- | engines/cryo/eden.h | 3 |
2 files changed, 7 insertions, 66 deletions
diff --git a/engines/cryo/eden.cpp b/engines/cryo/eden.cpp index 49ede20e32..b0175e3970 100644 --- a/engines/cryo/eden.cpp +++ b/engines/cryo/eden.cpp @@ -4911,6 +4911,8 @@ void EdenGame::loadpermfiles() { } f.read(kActionCursors, kNumActionCursors); + f.read(_mapMode, 12); + f.read(_cubeTextureCoords, 3 * 6 * 2 * 3 * 2); f.close(); @@ -8829,77 +8831,15 @@ int EdenGame::nextVal(char **ptr, char *error) { } void EdenGame::selectMap(int16 num) { - static const char mapMode[12] = { 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 2, 0 }; - // Cube faces to texture coords mapping - // each entry is num_polys(6) * num_faces_per_poly(2) * vertex_per_face(3) * uv(2) - - static const int16 cube_texcoords[3][6 * 2 * 3 * 2] = { - { - 32, 32, 0, 32, 0, 0, - 32, 32, 0, 0, 32, 0, - - 0, 32, 0, 0, 32, 0, - 0, 32, 32, 0, 32, 32, - - 32, 32, 0, 32, 0, 0, - 32, 32, 0, 0, 32, 0, - - 32, 0, 32, 32, 0, 32, - 32, 0, 0, 32, 0, 0, - - 0, 0, 32, 0, 32, 32, - 0, 0, 32, 32, 0, 32, - - 0, 32, 0, 0, 32, 0, - 0, 32, 32, 0, 32, 32 - }, { - 32, 32, 0, 32, 0, 0, - 32, 32, 0, 0, 32, 0, - - 32, 0, 32, 32, 0, 32, - 32, 0, 0, 32, 0, 0, - - 32, 0, 32, 32, 0, 32, - 32, 0, 0, 32, 0, 0, - - 0, 32, 0, 0, 32, 0, - 0, 32, 32, 0, 32, 32, - - 32, 0, 32, 32, 0, 32, - 32, 0, 0, 32, 0, 0, - - 32, 0, 32, 32, 0, 32, - 32, 0, 0, 32, 0, 0 - }, { - 30, 30, 2, 30, 2, 2, - 30, 30, 2, 2, 30, 2, - - 2, 30, 2, 2, 30, 2, - 2, 30, 30, 2, 30, 30, - - 30, 30, 2, 30, 2, 2, - 30, 30, 2, 2, 30, 2, - - 30, 2, 30, 30, 2, 30, - 30, 2, 2, 30, 2, 2, - - 2, 2, 30, 2, 30, 30, - 2, 2, 30, 30, 2, 30, - - 2, 30, 2, 2, 30, 2, - 2, 30, 30, 2, 30, 30 - } - }; - _cursCurPCMap = num; int16 k = 0; - int mode = mapMode[num]; + int mode = _mapMode[num]; int16 x = (num & 7) * 32; int16 y = (num & 0x18) * 4; for (int i = 0; i < 6 * 2; i++) { for (int j = 0; j < 3; j++) { - _cube._faces[i]->_uv[j * 2 ] = x + cube_texcoords[mode][k++]; - _cube._faces[i]->_uv[j * 2 + 1] = y + cube_texcoords[mode][k++]; + _cube._faces[i]->_uv[j * 2 ] = x + _cubeTextureCoords[mode][k++]; + _cube._faces[i]->_uv[j * 2 + 1] = y + _cubeTextureCoords[mode][k++]; } } } diff --git a/engines/cryo/eden.h b/engines/cryo/eden.h index 1abc364d2b..79ea63a43c 100644 --- a/engines/cryo/eden.h +++ b/engines/cryo/eden.h @@ -759,7 +759,8 @@ private: int16 tab_2CEF0[64]; int16 tab_2CF70[64]; byte kActionCursors[299]; - + byte _mapMode[12]; + byte _cubeTextureCoords[3][6 * 2 * 3 * 2]; float _translationZ = -3400; float flt_2DF80 = -3400; float flt_2DF84 = 200; |