mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-13 21:31:53 +00:00
Merge pull request #899 from bluegr/cryo_dat
CRYO: Move all static engine data into cryo.dat
This commit is contained in:
commit
7739d0c5c1
216
devtools/create_cryo/create_cryo_dat.cpp
Normal file
216
devtools/create_cryo/create_cryo_dat.cpp
Normal file
@ -0,0 +1,216 @@
|
||||
/* ScummVM - Graphic Adventure Engine
|
||||
*
|
||||
* ScummVM is the legal property of its developers, whose names
|
||||
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||
* file distributed with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "eden.h"
|
||||
#include "eden_icons.h"
|
||||
#include "eden_rooms.h"
|
||||
#include "eden_static.h"
|
||||
|
||||
#define CRYO_DAT_VER 1 // 32-bit integer
|
||||
|
||||
template <typename T>
|
||||
static void writeLE(FILE *f, T value) {
|
||||
for (int i = 0; i < sizeof(value); i++, value >>= 8) {
|
||||
unsigned char b = value & 0xFF;
|
||||
fwrite(&b, 1, 1, f);
|
||||
}
|
||||
}
|
||||
|
||||
struct _icon_t : icon_t {
|
||||
void write(FILE *f) {
|
||||
writeLE<int16>(f, sx);
|
||||
writeLE<int16>(f, sy);
|
||||
writeLE<int16>(f, ex);
|
||||
writeLE<int16>(f, ey);
|
||||
writeLE<uint16>(f, cursor_id);
|
||||
writeLE<unsigned int>(f, action_id);
|
||||
writeLE<unsigned int>(f, object_id);
|
||||
}
|
||||
};
|
||||
|
||||
static void emitIcons(FILE *f) {
|
||||
_icon_t *icons = (_icon_t*)gameIcons;
|
||||
for (int i = 0; i < kNumIcons; i++)
|
||||
icons[i].write(f);
|
||||
}
|
||||
|
||||
struct _room_t : room_t {
|
||||
void write(FILE *f) {
|
||||
writeLE<byte>(f, ff_0);
|
||||
writeLE<byte>(f, exits[0]);
|
||||
writeLE<byte>(f, exits[1]);
|
||||
writeLE<byte>(f, exits[2]);
|
||||
writeLE<byte>(f, exits[3]);
|
||||
writeLE<byte>(f, flags);
|
||||
writeLE<uint16>(f, bank);
|
||||
writeLE<uint16>(f, party);
|
||||
writeLE<byte>(f, level);
|
||||
writeLE<byte>(f, video);
|
||||
writeLE<byte>(f, location);
|
||||
writeLE<byte>(f, background);
|
||||
}
|
||||
};
|
||||
|
||||
static void emitRooms(FILE *f) {
|
||||
_room_t *rooms = (_room_t*)gameRooms;
|
||||
for (int i = 0; i < kNumRooms; i++)
|
||||
rooms[i].write(f);
|
||||
}
|
||||
|
||||
static void emitStatic(FILE *f) {
|
||||
const int kNumFollowers = 15;
|
||||
const int kNumLabyrinthPath = 70;
|
||||
const int kNumDinoSpeedForCitaLevel = 16;
|
||||
const int kNumTabletView = 12;
|
||||
const int kNumPersoRoomBankTable = 84;
|
||||
const int kNumGotos = 130;
|
||||
const int kNumObjects = 42;
|
||||
const int kNumObjectLocations = 45;
|
||||
const int kNumPersons = 58;
|
||||
const int kNumCitadel = 7;
|
||||
const int kNumCharacterRects = 19;
|
||||
const int kNumCharacters = 20;
|
||||
const int kNumActionCursors = 299;
|
||||
const int kNumAreas = 12;
|
||||
|
||||
for (int i = 0; i < kNumFollowers; i++) {
|
||||
writeLE<char>(f, followerList[i]._id);
|
||||
writeLE<char>(f, followerList[i]._spriteNum);
|
||||
writeLE<int16>(f, followerList[i].sx);
|
||||
writeLE<int16>(f, followerList[i].sy);
|
||||
writeLE<int16>(f, followerList[i].ex);
|
||||
writeLE<int16>(f, followerList[i].ey);
|
||||
writeLE<int16>(f, followerList[i]._spriteBank);
|
||||
writeLE<int16>(f, followerList[i].ff_C);
|
||||
writeLE<int16>(f, followerList[i].ff_E);
|
||||
}
|
||||
|
||||
fwrite(kLabyrinthPath, 1, kNumLabyrinthPath, f);
|
||||
fwrite(kDinoSpeedForCitaLevel, 1, kNumDinoSpeedForCitaLevel, f);
|
||||
fwrite(kTabletView, 1, kNumTabletView, f);
|
||||
fwrite(kPersoRoomBankTable, 1, kNumPersoRoomBankTable, f);
|
||||
fwrite(gotos, 5, kNumGotos, f); // sizeof(Goto)
|
||||
|
||||
for (int i = 0; i < kNumObjects; i++) {
|
||||
writeLE<byte>(f, _objects[i]._id);
|
||||
writeLE<byte>(f, _objects[i]._flags);
|
||||
writeLE<int>(f, _objects[i]._locations);
|
||||
writeLE<uint16>(f, _objects[i]._itemMask);
|
||||
writeLE<uint16>(f, _objects[i]._powerMask);
|
||||
writeLE<int16>(f, _objects[i]._count);
|
||||
}
|
||||
|
||||
for (int i = 0; i < kNumObjectLocations; i++) {
|
||||
writeLE<uint16>(f, kObjectLocations[i]);
|
||||
}
|
||||
|
||||
for (int i = 0; i < kNumPersons; i++) {
|
||||
writeLE<uint16>(f, kPersons[i]._roomNum);
|
||||
writeLE<uint16>(f, kPersons[i]._actionId);
|
||||
writeLE<uint16>(f, kPersons[i]._partyMask);
|
||||
writeLE<byte>(f, kPersons[i]._id);
|
||||
writeLE<byte>(f, kPersons[i]._flags);
|
||||
writeLE<byte>(f, kPersons[i]._roomBankId);
|
||||
writeLE<byte>(f, kPersons[i]._spriteBank);
|
||||
writeLE<uint16>(f, kPersons[i]._items);
|
||||
writeLE<uint16>(f, kPersons[i]._powers);
|
||||
writeLE<byte>(f, kPersons[i]._targetLoc);
|
||||
writeLE<byte>(f, kPersons[i]._lastLoc);
|
||||
writeLE<byte>(f, kPersons[i]._speed);
|
||||
writeLE<byte>(f, kPersons[i]._steps);
|
||||
}
|
||||
|
||||
for (int i = 0; i < kNumCitadel; i++) {
|
||||
writeLE<int16>(f, _citadelList[i]._id);
|
||||
for (int j = 0; j < 8; j++)
|
||||
writeLE<int16>(f, _citadelList[i]._bank[j]);
|
||||
for (int j = 0; j < 8; j++)
|
||||
writeLE<int16>(f, _citadelList[i]._video[j]);
|
||||
}
|
||||
|
||||
for (int i = 0; i < kNumCharacterRects; i++) {
|
||||
writeLE<int16>(f, _characterRects[i].left);
|
||||
writeLE<int16>(f, _characterRects[i].top);
|
||||
writeLE<int16>(f, _characterRects[i].right);
|
||||
writeLE<int16>(f, _characterRects[i].bottom);
|
||||
}
|
||||
|
||||
fwrite(_characterArray, 5, kNumCharacters, f);
|
||||
|
||||
for (int i = 0; i < kNumAreas; i++) {
|
||||
writeLE<byte>(f, kAreasTable[i]._num);
|
||||
writeLE<byte>(f, kAreasTable[i]._type);
|
||||
writeLE<uint16>(f, kAreasTable[i]._flags);
|
||||
writeLE<uint16>(f, kAreasTable[i]._firstRoomIdx);
|
||||
writeLE<byte>(f, kAreasTable[i]._citadelLevel);
|
||||
writeLE<byte>(f, kAreasTable[i]._placeNum);
|
||||
// pointer to _citadelRoomPtr is always initialized to null
|
||||
writeLE<int16>(f, kAreasTable[i]._visitCount);
|
||||
}
|
||||
|
||||
for (int i = 0; i < 64; i++) {
|
||||
writeLE<uint16>(f, tab_2CEF0[i]);
|
||||
}
|
||||
|
||||
for (int i = 0; i < 64; i++) {
|
||||
writeLE<uint16>(f, tab_2CF70[i]);
|
||||
}
|
||||
|
||||
fwrite(kActionCursors, 1, kNumActionCursors, f);
|
||||
fwrite(mapMode, 1, 12, f);
|
||||
fwrite(cubeTextureCoords, 6 * 2 * 3 * 2, 3, f);
|
||||
}
|
||||
|
||||
static int emitData(char *outputFilename) {
|
||||
FILE *f = fopen(outputFilename, "w+b");
|
||||
if (!f) {
|
||||
printf("ERROR: Unable to create output file %s\n", outputFilename);
|
||||
return 1;
|
||||
}
|
||||
|
||||
printf("Generating %s...\n", outputFilename);
|
||||
|
||||
fwrite("CRYODATA", 8, 1, f);
|
||||
writeLE<uint32>(f, CRYO_DAT_VER);
|
||||
|
||||
emitIcons(f);
|
||||
emitRooms(f);
|
||||
emitStatic(f);
|
||||
|
||||
fclose(f);
|
||||
|
||||
printf("Done!\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
|
||||
if (argc > 1)
|
||||
return emitData(argv[1]);
|
||||
else
|
||||
printf("Usage: %s <output.dat>\n", argv[0]);
|
||||
|
||||
return 0;
|
||||
}
|
@ -1,105 +0,0 @@
|
||||
/* ScummVM - Graphic Adventure Engine
|
||||
*
|
||||
* ScummVM is the legal property of its developers, whose names
|
||||
* are too numerous to list here. Please refer to the COPYRIGHT
|
||||
* file distributed with this source distribution.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "eden.h"
|
||||
#include "eden_icons.h"
|
||||
#include "eden_rooms.h"
|
||||
|
||||
template <typename T>
|
||||
static void writeLE(FILE *f, T value) {
|
||||
for (int i = 0; i < sizeof(value); i++, value >>= 8) {
|
||||
unsigned char b = value & 0xFF;
|
||||
fwrite(&b, 1, 1, f);
|
||||
}
|
||||
}
|
||||
|
||||
struct _icon_t : icon_t {
|
||||
void write(FILE *f) {
|
||||
writeLE<int16>(f, sx);
|
||||
writeLE<int16>(f, sy);
|
||||
writeLE<int16>(f, ex);
|
||||
writeLE<int16>(f, ey);
|
||||
writeLE<uint16>(f, cursor_id);
|
||||
writeLE<unsigned int>(f, action_id);
|
||||
writeLE<unsigned int>(f, object_id);
|
||||
}
|
||||
};
|
||||
|
||||
static void emitIcons(FILE *f) {
|
||||
_icon_t *icons = (_icon_t*)gameIcons;
|
||||
for (int i = 0; i < kNumIcons; i++)
|
||||
icons[i].write(f);
|
||||
}
|
||||
|
||||
struct _room_t : room_t {
|
||||
void write(FILE *f) {
|
||||
writeLE<byte>(f, ff_0);
|
||||
writeLE<byte>(f, exits[0]);
|
||||
writeLE<byte>(f, exits[1]);
|
||||
writeLE<byte>(f, exits[2]);
|
||||
writeLE<byte>(f, exits[3]);
|
||||
writeLE<byte>(f, flags);
|
||||
writeLE<uint16>(f, bank);
|
||||
writeLE<uint16>(f, party);
|
||||
writeLE<byte>(f, level);
|
||||
writeLE<byte>(f, video);
|
||||
writeLE<byte>(f, location);
|
||||
writeLE<byte>(f, background);
|
||||
}
|
||||
};
|
||||
|
||||
static void emitRooms(FILE *f) {
|
||||
_room_t *rooms = (_room_t*)gameRooms;
|
||||
for (int i = 0; i < kNumRooms; i++)
|
||||
rooms[i].write(f);
|
||||
}
|
||||
|
||||
static int emitData(char *outputFilename) {
|
||||
FILE *f = fopen(outputFilename, "w+b");
|
||||
if (!f) {
|
||||
printf("ERROR: Unable to create output file %s\n", outputFilename);
|
||||
return 1;
|
||||
}
|
||||
|
||||
printf("Generating %s...\n", outputFilename);
|
||||
|
||||
emitIcons(f);
|
||||
emitRooms(f);
|
||||
|
||||
fclose(f);
|
||||
|
||||
printf("Done!\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
|
||||
if (argc > 1)
|
||||
return emitData(argv[1]);
|
||||
else
|
||||
printf("Usage: %s <output.dat>\n", argv[0]);
|
||||
|
||||
return 0;
|
||||
}
|
@ -25,6 +25,8 @@
|
||||
typedef unsigned char byte;
|
||||
typedef short int16;
|
||||
typedef unsigned short uint16;
|
||||
typedef int int32;
|
||||
typedef unsigned int uint32;
|
||||
|
||||
struct icon_t {
|
||||
int16 sx;
|
||||
@ -49,3 +51,250 @@ struct room_t {
|
||||
byte background;
|
||||
};
|
||||
#define END_ROOMS {0xFF, {0xFF, 0xFF, 0xFF, 0xFF}, 0xFF, 0xFFFF, 0xFFFF, 0xFF, 0xFF, 0xFF, 0xFF}
|
||||
|
||||
struct Follower { // Characters on Mirror screen
|
||||
char _id; // character
|
||||
char _spriteNum; // sprite number
|
||||
int16 sx;
|
||||
int16 sy;
|
||||
int16 ex;
|
||||
int16 ey;
|
||||
int16 _spriteBank;
|
||||
int16 ff_C;
|
||||
int16 ff_E;
|
||||
};
|
||||
|
||||
namespace PersonId {
|
||||
enum PersonId {
|
||||
pidGregor = 0, // The King
|
||||
pidDina, // Pink dino
|
||||
pidTau, // Late grandpa
|
||||
pidMonk, // Old wizard
|
||||
pidJabber, // Executioner
|
||||
pidEloi, // Evergreen ptero
|
||||
pidMungo, // Dina's husband
|
||||
pidEve, // Blonde girl
|
||||
pidShazia, // Big boobs sis
|
||||
pidLeadersBegin, // 9
|
||||
pidChongOfChamaar = pidLeadersBegin, // Dogface
|
||||
pidKommalaOfKoto, // Clones
|
||||
pidUlanOfUlele, // Shaman
|
||||
pidCabukaOfCantura, // Stone people
|
||||
pidMarindaOfEmbalmers, // Gods
|
||||
pidFuggOfTamara, // Boar-like
|
||||
pidThugg, // Bodyguard
|
||||
pidNarrator, // 16, Old Eloi, also BGM
|
||||
pidNarrim, // Sea snake
|
||||
pidMorkus, // Vicious tyran
|
||||
pidDinosaur, // different species of friendly dino
|
||||
pidEnemy // different species of enemy dino
|
||||
};
|
||||
}
|
||||
|
||||
namespace PersonMask {
|
||||
enum PersonMask {
|
||||
pmGregor = 1,
|
||||
pmDina = 2,
|
||||
pmTau = 4,
|
||||
pmMonk = 8,
|
||||
pmJabber = 0x10,
|
||||
pmEloi = 0x20,
|
||||
pmMungo = 0x40,
|
||||
pmEve = 0x80,
|
||||
pmShazia = 0x100,
|
||||
pmLeader = 0x200, // valley tribe leader
|
||||
pmThugg = 0x400,
|
||||
pmQuest = 0x800, // special quest person
|
||||
pmDino = 0x1000,
|
||||
pmEnemy = 0x2000,
|
||||
pmMorkus = 0x4000
|
||||
};
|
||||
}
|
||||
|
||||
namespace PersonFlags {
|
||||
enum PersonFlags {
|
||||
pfType0 = 0,
|
||||
pftTyrann,
|
||||
pfType2,
|
||||
pfType3,
|
||||
pfType4,
|
||||
pfType5,
|
||||
pfType6,
|
||||
pfType7,
|
||||
pfType8,
|
||||
pftMosasaurus,
|
||||
pftTriceraptor,
|
||||
pftVelociraptor,
|
||||
pfType12,
|
||||
pfType13,
|
||||
pfType14,
|
||||
pfType15,
|
||||
pfTypeMask = 0xF,
|
||||
pf10 = 0x10,
|
||||
pf20 = 0x20,
|
||||
pfInParty = 0x40,
|
||||
pf80 = 0x80
|
||||
};
|
||||
}
|
||||
|
||||
namespace Objects {
|
||||
enum Objects {
|
||||
obNone,
|
||||
obWayStone,
|
||||
obShell,
|
||||
obTalisman,
|
||||
obTooth,
|
||||
obPrism, // 5
|
||||
obFlute,
|
||||
obApple,
|
||||
obEgg, // 8
|
||||
obRoot,
|
||||
obUnused10,
|
||||
obShroom, // 11
|
||||
obBadShroom, // 12
|
||||
obKnife, // 13
|
||||
obNest, // 14
|
||||
obFullNest, // 15
|
||||
obGold, // 16
|
||||
obMoonStone,
|
||||
obBag,
|
||||
obSunStone, // 19
|
||||
obHorn, // 20
|
||||
obSword,
|
||||
|
||||
obMaskOfDeath,
|
||||
obMaskOfBonding,
|
||||
obMaskOfBirth,
|
||||
|
||||
obEyeInTheStorm, // 25
|
||||
obSkyHammer,
|
||||
obFireInTheClouds,
|
||||
obWithinAndWithout,
|
||||
obEyeInTheCyclone,
|
||||
obRiverThatWinds,
|
||||
|
||||
obTrumpet, // 31
|
||||
obUnused32,
|
||||
obDrum,
|
||||
obUnused34,
|
||||
obUnused35,
|
||||
obRing,
|
||||
|
||||
obTablet1, // 37 is 1st plaque, 6 total
|
||||
obTablet2,
|
||||
obTablet3, // 39
|
||||
obTablet4,
|
||||
obTablet5,
|
||||
obTablet6
|
||||
};
|
||||
}
|
||||
|
||||
struct Goto {
|
||||
byte _areaNum; // target area
|
||||
byte _curAreaNum; // current area
|
||||
byte _enterVideoNum;
|
||||
byte _travelTime; // time to skip while in travel
|
||||
byte _arriveVideoNum;
|
||||
};
|
||||
|
||||
struct object_t {
|
||||
byte _id;
|
||||
byte _flags;
|
||||
int _locations; // index in kObjectLocations
|
||||
uint16 _itemMask;
|
||||
uint16 _powerMask; // object of power bitmask
|
||||
int16 _count;
|
||||
};
|
||||
|
||||
struct perso_t {
|
||||
uint16 _roomNum; // room this person currently in
|
||||
uint16 _actionId; // TODO: checkme
|
||||
uint16 _partyMask; // party bit mask
|
||||
byte _id; // character
|
||||
byte _flags; // flags and kind
|
||||
byte _roomBankId;// index in kPersoRoomBankTable for specific room banks
|
||||
byte _spriteBank; // sprite bank
|
||||
uint16 _items; // inventory
|
||||
uint16 _powers; // obj of power bitmask
|
||||
byte _targetLoc; // For party member this is mini sprite index
|
||||
byte _lastLoc; // For party member this is mini sprite x offset
|
||||
byte _speed; // num ticks per step
|
||||
byte _steps; // current ticks
|
||||
};
|
||||
|
||||
struct Citadel {
|
||||
int16 _id;
|
||||
int16 _bank[8];
|
||||
int16 _video[8];
|
||||
};
|
||||
|
||||
// A struct to hold the struct members of Common::Rect
|
||||
struct Rect {
|
||||
int16 left, top, right, bottom;
|
||||
};
|
||||
|
||||
namespace Areas {
|
||||
enum Areas {
|
||||
arMo = 1,
|
||||
arTausCave,
|
||||
arChamaar,
|
||||
arUluru,
|
||||
arKoto,
|
||||
arTamara,
|
||||
arCantura,
|
||||
arShandovra,
|
||||
arNarimsCave,
|
||||
arEmbalmersCave,
|
||||
arWhiteArch,
|
||||
arMoorkusLair
|
||||
};
|
||||
}
|
||||
|
||||
namespace AreaFlags {
|
||||
enum AreaFlags {
|
||||
afFlag1 = 1,
|
||||
afFlag2 = 2,
|
||||
afFlag4 = 4,
|
||||
afFlag8 = 8,
|
||||
afGaveGold = 0x10,
|
||||
afFlag20 = 0x20,
|
||||
|
||||
HasTriceraptors = 0x100,
|
||||
HasVelociraptors = 0x200,
|
||||
HasTyrann = 0x400,
|
||||
|
||||
TyrannSighted = 0x4000,
|
||||
afFlag8000 = 0x8000
|
||||
};
|
||||
}
|
||||
|
||||
struct Room {
|
||||
byte _id;
|
||||
byte _exits[4]; //TODO: signed?
|
||||
byte _flags;
|
||||
uint16 _bank;
|
||||
uint16 _party;
|
||||
byte _level; // Citadel level
|
||||
byte _video;
|
||||
byte _location;
|
||||
byte _backgroundBankNum; // bg/mirror image number (relative)
|
||||
};
|
||||
|
||||
struct Area {
|
||||
byte _num;
|
||||
byte _type;
|
||||
uint16 _flags;
|
||||
uint16 _firstRoomIdx;
|
||||
byte _citadelLevel;
|
||||
byte _placeNum;
|
||||
Room *_citadelRoomPtr;
|
||||
int16 _visitCount;
|
||||
};
|
||||
|
||||
namespace AreaType {
|
||||
enum AreaType {
|
||||
atCitadel = 1,
|
||||
atValley = 2,
|
||||
atCave = 3
|
||||
};
|
||||
}
|
||||
|
@ -20,12 +20,10 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "cryo/defs.h"
|
||||
#include "cryo/cryolib.h"
|
||||
#pragma once
|
||||
#include "eden.h"
|
||||
|
||||
namespace Cryo {
|
||||
|
||||
Follower followerList[] = {
|
||||
Follower followerList[15] = {
|
||||
// char, X, sx, sy, ex, ey,bank,
|
||||
{ PersonId::pidGregor, 5, 211, 9, 320, 176, 228, 0, 0 },
|
||||
{ PersonId::pidEloi, 4, 162, 47, 223, 176, 228, 112, 78 },
|
||||
@ -44,15 +42,7 @@ Follower followerList[] = {
|
||||
{ -1, -1, -1, -1, -1, -1, -1, -1, -1 }
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
Labyrinth of Mo
|
||||
|
||||
| | | | | | | |
|
||||
|
||||
*/
|
||||
|
||||
byte kLabyrinthPath[] = {
|
||||
byte kLabyrinthPath[70] = {
|
||||
// each nibble tells which direction to choose to exit the labyrinth
|
||||
0x11, 0x11, 0x11, 0x22, 0x33, 0x55, 0x25, 0x44, 0x25, 0x11, 0x11, 0x11,
|
||||
0x11, 0x35, 0x55, 0x45, 0x45, 0x44, 0x44, 0x34, 0x44, 0x34, 0x32, 0x52,
|
||||
@ -64,7 +54,7 @@ byte kLabyrinthPath[] = {
|
||||
|
||||
char kDinoSpeedForCitaLevel[16] = { 1, 2, 3, 4, 4, 5, 6, 7, 8, 9 };
|
||||
|
||||
char kTabletView[] = { //TODO: make as struct?
|
||||
char kTabletView[12] = { //TODO: make as struct?
|
||||
// opposite tablet id, video id
|
||||
Objects::obUnused10, 83,
|
||||
Objects::obUnused10, 84,
|
||||
@ -75,7 +65,7 @@ char kTabletView[] = { //TODO: make as struct?
|
||||
};
|
||||
|
||||
// special character backgrounds for specific rooms
|
||||
char kPersoRoomBankTable[] = {
|
||||
char kPersoRoomBankTable[84] = {
|
||||
// first entry is default bank, then pairs of [roomNum, bankNum], terminated by -1
|
||||
0, 3, 33, -1,
|
||||
21, 17, 35, -1,
|
||||
@ -102,7 +92,7 @@ char kPersoRoomBankTable[] = {
|
||||
};
|
||||
|
||||
// area transition descriptors
|
||||
Goto gotos[] = {
|
||||
Goto gotos[130] = {
|
||||
// area, oldarea, vid, time, valleyVid
|
||||
{ 0, 1, 0, 2, 20 },
|
||||
{ 0, 1, 162, 3, 168 },
|
||||
@ -236,7 +226,7 @@ Goto gotos[] = {
|
||||
{ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF },
|
||||
};
|
||||
|
||||
object_t _objects[] = {
|
||||
object_t _objects[42] = {
|
||||
//id,fl,loc,masklow,maskhi,ct
|
||||
{ 1, 0, 3, 1, 0, 0}, // Eve's Way Stone
|
||||
{ 2, 0, 3, 2, 0, 0}, // Thau's Seashell
|
||||
@ -286,7 +276,7 @@ object_t _objects[] = {
|
||||
{ 42, 0, 3, 0x8000, 0, 0} // Tablet #6 (Castra)
|
||||
};
|
||||
|
||||
uint16 kObjectLocations[100] = {
|
||||
uint16 kObjectLocations[45] = {
|
||||
0x112, 0xFFFF,
|
||||
0x202, 0xFFFF,
|
||||
0x120, 0xFFFF,
|
||||
@ -301,7 +291,7 @@ uint16 kObjectLocations[100] = {
|
||||
0xFFFF
|
||||
};
|
||||
|
||||
perso_t kPersons[] = {
|
||||
perso_t kPersons[58] = {
|
||||
// room, aid, party mask, id, flags, X,bank,X, X,sprId,sprX,speed, X
|
||||
{ 0x103, 230, PersonMask::pmGregor, PersonId::pidGregor , 0, 0, 1, 0, 0, 0, 0, 0, 0 },
|
||||
{ 0x116, 231, PersonMask::pmDina , PersonId::pidDina , 0, 4, 2, 0, 0, 3, 9, 0, 0 },
|
||||
@ -371,7 +361,7 @@ perso_t kPersons[] = {
|
||||
{ 0x628, 237, PersonMask::pmEve , PersonId::pidEve , 0, 78, 10, 0, 0, 7, 35, 0, 0 }
|
||||
};
|
||||
|
||||
Citadel _citadelList[] = {
|
||||
Citadel _citadelList[7] = {
|
||||
{ 1, { 163, 182, 0, 0, 124, 147, 193, 0 }, { 0, 0, 0, 0, 0, 0, 0, 0 } },
|
||||
{ 48, { 285, 286, 0, 0, 287, 288, 284, 0 }, { 114, 115, 0, 0, 116, 117, 113, 0 } },
|
||||
{ 63, { 290, 291, 0, 0, 292, 293, 289, 0 }, { 119, 120, 0, 0, 121, 122, 118, 0 } },
|
||||
@ -381,7 +371,7 @@ Citadel _citadelList[] = {
|
||||
{ 255, { 310, 311, 0, 0, 312, 313, 309, 0 }, { 139, 140, 0, 0, 141, 142, 138, 0 } }
|
||||
};
|
||||
|
||||
prect_t _characterRects[] = { //TODO: just an array of int16s?
|
||||
Rect _characterRects[19] = { // TODO: just an array of int16s?
|
||||
{ 93, 69, 223, 176},
|
||||
{ 102, 86, 162, 126},
|
||||
{ 88, 103, 168, 163},
|
||||
@ -403,30 +393,30 @@ prect_t _characterRects[] = { //TODO: just an array of int16s?
|
||||
{ 188, 83, 251, 158}
|
||||
};
|
||||
|
||||
byte _characterArray[][5] = { //TODO: struc?
|
||||
{ 8, 15, 23, 25, 0xFF},
|
||||
{ 0, 9, 0xFF },
|
||||
{ 0, 9, 0xFF },
|
||||
{ 0, 9, 0xFF },
|
||||
{ 0, 13, 0xFF },
|
||||
{ 16, 21, 0xFF },
|
||||
{ 11, 20, 0xFF },
|
||||
{ 0, 12, 0xFF },
|
||||
{ 0, 9, 0xFF },
|
||||
{ 0, 9, 0xFF },
|
||||
{ 5, 13, 0xFF },
|
||||
{ 0xFF },
|
||||
{ 0, 8, 0xFF },
|
||||
{ 0xFF },
|
||||
{ 0, 7, 0xFF },
|
||||
{ 0, 8, 0xFF },
|
||||
{ 8, 12, 0xFF },
|
||||
{ 0, 5, 0xFF },
|
||||
{ 0, 4, 0xFF },
|
||||
{ 0xFF }
|
||||
byte _characterArray[20][5] = { // TODO: struc?
|
||||
{ 8, 15, 23, 25, 0xFF },
|
||||
{ 0, 9, 0xFF, 0, 0 },
|
||||
{ 0, 9, 0xFF, 0, 0 },
|
||||
{ 0, 9, 0xFF, 0, 0 },
|
||||
{ 0, 13, 0xFF, 0, 0 },
|
||||
{ 16, 21, 0xFF, 0, 0 },
|
||||
{ 11, 20, 0xFF, 0, 0 },
|
||||
{ 0, 12, 0xFF, 0, 0 },
|
||||
{ 0, 9, 0xFF, 0, 0 },
|
||||
{ 0, 9, 0xFF, 0, 0 },
|
||||
{ 5, 13, 0xFF, 0, 0 },
|
||||
{ 0xFF, 0, 0, 0, 0 },
|
||||
{ 0, 8, 0xFF, 0, 0 },
|
||||
{ 0xFF, 0, 0, 0, 0 },
|
||||
{ 0, 7, 0xFF, 0, 0 },
|
||||
{ 0, 8, 0xFF, 0, 0 },
|
||||
{ 8, 12, 0xFF, 0, 0 },
|
||||
{ 0, 5, 0xFF, 0, 0 },
|
||||
{ 0, 4, 0xFF, 0, 0 },
|
||||
{ 0xFF, 0, 0, 0, 0 }
|
||||
};
|
||||
|
||||
Area kAreasTable[] = {
|
||||
Area kAreasTable[12] = {
|
||||
{ Areas::arMo , AreaType::atCitadel, 0, 0, 0, 1, 0, 0},
|
||||
{ Areas::arTausCave , AreaType::atCave , 0, 112, 0, 2, 0, 0},
|
||||
{ Areas::arChamaar , AreaType::atValley , 0, 133, 0, 3, 0, 0},
|
||||
@ -455,7 +445,7 @@ int16 tab_2CF70[64] = {
|
||||
18, 275, 0, 0, 35, 254, 36, 255, 19, 318, 23, 256, 0, 0, 0, 0,
|
||||
};
|
||||
|
||||
int16 kActionCursors[299] = {
|
||||
byte kActionCursors[299] = {
|
||||
3, 1, 2, 4, 5, 5, 5, 0, 5, 5,
|
||||
5, 5, 5, 3, 2, 5, 5, 5, 3, 2,
|
||||
4, 5, 7, 7, 4, 5, 5, 0, 0, 0,
|
||||
@ -488,8 +478,64 @@ int16 kActionCursors[299] = {
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0
|
||||
};
|
||||
|
||||
float _translationZ = -3400;
|
||||
float flt_2DF80 = -3400;
|
||||
float flt_2DF84 = 200;
|
||||
byte mapMode[12] = { 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 2, 0 };
|
||||
|
||||
} // End of namespace Cryo
|
||||
// Cube faces to texture coords mapping
|
||||
// each entry is num_polys(6) * num_faces_per_poly(2) * vertex_per_face(3) * uv(2)
|
||||
byte cubeTextureCoords[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
|
||||
}
|
||||
};
|
@ -2,10 +2,10 @@
|
||||
MODULE := devtools/create_cryo
|
||||
|
||||
MODULE_OBJS := \
|
||||
create_led_dat.o
|
||||
create_cryo_dat.o
|
||||
|
||||
# Set the name of the executable
|
||||
TOOL_EXECUTABLE := create_led_dat
|
||||
TOOL_EXECUTABLE := create_cryo_dat
|
||||
|
||||
# Include common rules
|
||||
include $(srcdir)/rules.mk
|
||||
|
@ -4,6 +4,9 @@ engine-data README
|
||||
access.dat
|
||||
TODO
|
||||
|
||||
cryo.dat
|
||||
This file contains a lot of hardcoded tables used by the Cryo engine.
|
||||
|
||||
drascula.dat
|
||||
TODO
|
||||
|
||||
|
BIN
dists/engine-data/cryo.dat
Normal file
BIN
dists/engine-data/cryo.dat
Normal file
Binary file not shown.
@ -312,7 +312,7 @@ struct perso_t {
|
||||
uint16 _partyMask; // party bit mask
|
||||
byte _id; // character
|
||||
byte _flags; // flags and kind
|
||||
byte _roomBankId;// index in kPersoRoomBankTable for specific room banks
|
||||
byte _roomBankId;// index in _personRoomBankTable for specific room banks
|
||||
byte _spriteBank; // sprite bank
|
||||
uint16 _items; // inventory
|
||||
uint16 _powers; // obj of power bitmask
|
||||
@ -340,7 +340,7 @@ enum ObjectFlags {
|
||||
struct object_t {
|
||||
byte _id;
|
||||
byte _flags;
|
||||
int _locations; // index in kObjectLocations
|
||||
int _locations; // index in _objectLocations
|
||||
uint16 _itemMask;
|
||||
uint16 _powerMask; // object of power bitmask
|
||||
int16 _count;
|
||||
@ -764,11 +764,6 @@ struct Citadel {
|
||||
int16 _video[8];
|
||||
};
|
||||
|
||||
/////////////// vars
|
||||
|
||||
extern Follower followerList[];
|
||||
|
||||
|
||||
/*
|
||||
Labyrinth of Mo
|
||||
|
||||
@ -783,33 +778,6 @@ enum {
|
||||
LAB_W
|
||||
};
|
||||
|
||||
extern byte kLabyrinthPath[];
|
||||
|
||||
extern char kDinoSpeedForCitaLevel[16];
|
||||
|
||||
extern char kTabletView[];
|
||||
|
||||
// special character backgrounds for specific rooms
|
||||
extern char kPersoRoomBankTable[];
|
||||
|
||||
// area transition descriptors
|
||||
extern Goto gotos[];
|
||||
extern object_t _objects[];
|
||||
extern uint16 kObjectLocations[100];
|
||||
extern perso_t kPersons[];
|
||||
extern Citadel _citadelList[];
|
||||
|
||||
struct prect_t {
|
||||
int16 left, top, right, bottom;
|
||||
};
|
||||
|
||||
extern prect_t _characterRects[];
|
||||
extern byte _characterArray[][5];
|
||||
extern Area kAreasTable[];
|
||||
extern int16 tab_2CEF0[64];
|
||||
extern int16 tab_2CF70[64];
|
||||
extern int16 kActionCursors[299];
|
||||
|
||||
struct CubeFace {
|
||||
int tri;
|
||||
char ff_4;
|
||||
@ -833,10 +801,6 @@ struct Cube {
|
||||
Point3D *_vertices;
|
||||
};
|
||||
|
||||
extern float _translationZ;
|
||||
extern float flt_2DF80;
|
||||
extern float flt_2DF84;
|
||||
|
||||
struct XYZ {
|
||||
signed short x, y, z;
|
||||
};
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -576,7 +576,7 @@ private:
|
||||
int _lastAnimFrameNumb;
|
||||
int _curAnimFrameNumb;
|
||||
int _lastAnimTicks;
|
||||
prect_t *_curCharacterRect;
|
||||
Common::Rect *_curCharacterRect;
|
||||
int16 _numAnimFrames;
|
||||
int16 _maxPersoDesc;
|
||||
int16 _numImgDesc;
|
||||
@ -737,6 +737,40 @@ private:
|
||||
uint8 tab_2CB1E[8][4];
|
||||
|
||||
const unsigned int kMaxMusicSize; // largest .mus file size
|
||||
|
||||
// Loaded from cryo.dat
|
||||
Follower _followerList[15];
|
||||
byte _labyrinthPath[70];
|
||||
char _dinoSpeedForCitadelLevel[16];
|
||||
char _tabletView[12];
|
||||
char _personRoomBankTable[84]; // special character backgrounds for specific rooms
|
||||
|
||||
// Loaded from cryo.dat - Area transition descriptors
|
||||
Goto _gotos[130];
|
||||
object_t _objects[42];
|
||||
uint16 _objectLocations[45];
|
||||
perso_t _persons[58];
|
||||
Citadel _citadelList[7];
|
||||
|
||||
// Loaded from cryo.dat
|
||||
Common::Rect _characterRects[19];
|
||||
byte _characterArray[20][5];
|
||||
Area _areasTable[12];
|
||||
int16 tab_2CEF0[64];
|
||||
int16 tab_2CF70[64];
|
||||
byte _actionCursors[299];
|
||||
byte _mapMode[12];
|
||||
byte _cubeTextureCoords[3][6 * 2 * 3 * 2];
|
||||
|
||||
int32 _translationZ;
|
||||
int8 _zDirection; // 1 (up) or -1 (down)
|
||||
|
||||
// Torch/glow related
|
||||
int16 _torchTick;
|
||||
int16 _glowIndex;
|
||||
int16 _torchCurIndex;
|
||||
|
||||
int _cursCenter;
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -7,7 +7,6 @@ MODULE_OBJS = \
|
||||
detection.o \
|
||||
eden.o \
|
||||
sound.o \
|
||||
staticdata.o \
|
||||
video.o
|
||||
|
||||
# This module can be built as a plugin
|
||||
|
Loading…
Reference in New Issue
Block a user