Remove extra spaces

This commit is contained in:
Jordi Vilalta Prat 2009-05-09 17:47:28 +00:00
parent 4ae44dec3e
commit fb2575b33e
33 changed files with 303 additions and 303 deletions

View file

@ -237,7 +237,7 @@ void Actor::setWalkChore(int chore, Costume *cost) {
void Actor::setTurnChores(int left_chore, int right_chore, Costume *cost) { void Actor::setTurnChores(int left_chore, int right_chore, Costume *cost) {
if (_turnCostume == cost && _leftTurnChore == left_chore && if (_turnCostume == cost && _leftTurnChore == left_chore &&
_rightTurnChore == right_chore) _rightTurnChore == right_chore)
return; return;
if (_leftTurnChore >= 0) { if (_leftTurnChore >= 0) {
@ -347,7 +347,7 @@ void Actor::sayLine(const char *msg, const char *msgId) {
// (the mumble chore doesn't exist with the cat races announcer) // (the mumble chore doesn't exist with the cat races announcer)
if (!_lipSync && _mumbleChore != -1) if (!_lipSync && _mumbleChore != -1)
_mumbleCostume->playChoreLooping(_mumbleChore); _mumbleCostume->playChoreLooping(_mumbleChore);
_talkAnim = -1; _talkAnim = -1;
} }
} }
@ -381,7 +381,7 @@ bool Actor::talking() {
// If there's no sound file then we're obviously not talking // If there's no sound file then we're obviously not talking
if (strlen(_talkSoundName.c_str()) == 0) if (strlen(_talkSoundName.c_str()) == 0)
return false; return false;
return g_imuse->getSoundStatus(_talkSoundName.c_str()); return g_imuse->getSoundStatus(_talkSoundName.c_str());
} }
@ -410,7 +410,7 @@ void Actor::shutUp() {
void Actor::pushCostume(const char *name) { void Actor::pushCostume(const char *name) {
Costume *newCost = g_resourceloader->loadCostume(name, currentCostume()); Costume *newCost = g_resourceloader->loadCostume(name, currentCostume());
newCost->setColormap(NULL); newCost->setColormap(NULL);
_costumeStack.push_back(newCost); _costumeStack.push_back(newCost);
} }
@ -566,7 +566,7 @@ void Actor::update() {
// Update lip syncing // Update lip syncing
if (_lipSync) { if (_lipSync) {
int posSound; int posSound;
// While getPosIn60HzTicks will return "-1" to indicate that the // While getPosIn60HzTicks will return "-1" to indicate that the
// sound is no longer playing, it is more appropriate to check first // sound is no longer playing, it is more appropriate to check first
if(g_imuse->getSoundStatus(_talkSoundName.c_str())) if(g_imuse->getSoundStatus(_talkSoundName.c_str()))

View file

@ -183,13 +183,13 @@ void BitmapComponent::setKey(int val) {
return; return;
} }
// Complain that we couldn't find the bitmap. This means we probably // Complain that we couldn't find the bitmap. This means we probably
// didn't handle something correctly. Example: Before the tube-switcher // didn't handle something correctly. Example: Before the tube-switcher
// bitmaps were not loading with the scene. This was because they were requested // bitmaps were not loading with the scene. This was because they were requested
// as a different case then they were stored (tu_0_dorcu_door_open versus // as a different case then they were stored (tu_0_dorcu_door_open versus
// TU_0_DORCU_door_open), which was causing problems in the string comparison. // TU_0_DORCU_door_open), which was causing problems in the string comparison.
if(debugLevel == DEBUG_BITMAPS || debugLevel == DEBUG_WARN || debugLevel == DEBUG_ALL) if(debugLevel == DEBUG_BITMAPS || debugLevel == DEBUG_WARN || debugLevel == DEBUG_ALL)
warning("Missing scene bitmap: %s", bitmap); warning("Missing scene bitmap: %s", bitmap);
/* In case you feel like drawing the missing bitmap anyway... /* In case you feel like drawing the missing bitmap anyway...
// Assume that all objects the scene file forgot about are OBJSTATE_STATE class // Assume that all objects the scene file forgot about are OBJSTATE_STATE class
state = new ObjectState(0, ObjectState::OBJSTATE_STATE, bitmap, NULL, true); state = new ObjectState(0, ObjectState::OBJSTATE_STATE, bitmap, NULL, true);
@ -207,7 +207,7 @@ ModelComponent::ModelComponent(Costume::Component *parent, int parentID, const c
Costume::Component(parent, parentID, tag), _filename(filename), Costume::Component(parent, parentID, tag), _filename(filename),
_obj(NULL), _hier(NULL) { _obj(NULL), _hier(NULL) {
const char *comma = std::strchr(filename, ','); const char *comma = std::strchr(filename, ',');
// Can be called with a comma and a numeric parameter afterward, but // Can be called with a comma and a numeric parameter afterward, but
// the use for this parameter is currently unknown // the use for this parameter is currently unknown
// Example: At the "scrimshaw parlor" in Rubacava the object // Example: At the "scrimshaw parlor" in Rubacava the object
@ -220,7 +220,7 @@ ModelComponent::ModelComponent(Costume::Component *parent, int parentID, const c
} }
if (prevComponent) { if (prevComponent) {
MainModelComponent *mmc = dynamic_cast<MainModelComponent *>(prevComponent); MainModelComponent *mmc = dynamic_cast<MainModelComponent *>(prevComponent);
if (mmc) if (mmc)
_previousCmap = mmc->cmap(); _previousCmap = mmc->cmap();
} }
@ -232,7 +232,7 @@ void ModelComponent::init() {
// constructor before // constructor before
if (!_obj) { if (!_obj) {
CMap *cmap = this->cmap(); CMap *cmap = this->cmap();
// Get the default colormap if we haven't found // Get the default colormap if we haven't found
// a valid colormap // a valid colormap
if (!cmap) { if (!cmap) {
@ -255,7 +255,7 @@ void ModelComponent::init() {
// parent object's tree. // parent object's tree.
if (_parent) { if (_parent) {
MeshComponent *mc = dynamic_cast<MeshComponent *>(_parent); MeshComponent *mc = dynamic_cast<MeshComponent *>(_parent);
if (mc) if (mc)
mc->node()->addChild(_hier); mc->node()->addChild(_hier);
else if (debugLevel == DEBUG_MODEL || debugLevel == DEBUG_WARN || debugLevel == DEBUG_ALL) else if (debugLevel == DEBUG_MODEL || debugLevel == DEBUG_WARN || debugLevel == DEBUG_ALL)
@ -288,7 +288,7 @@ void ModelComponent::update() {
void ModelComponent::resetColormap() { void ModelComponent::resetColormap() {
CMap *cmap; CMap *cmap;
cmap = this->cmap(); cmap = this->cmap();
if (_obj && cmap) if (_obj && cmap)
_obj->reload(*cmap); _obj->reload(*cmap);
@ -330,7 +330,7 @@ MainModelComponent::MainModelComponent(Costume::Component *parent, int parentID,
ModelComponent(parent, parentID, filename, prevComponent, tag), _hierShared(false) { ModelComponent(parent, parentID, filename, prevComponent, tag), _hierShared(false) {
if (parentID == -2 && prevComponent) { if (parentID == -2 && prevComponent) {
MainModelComponent *mmc = dynamic_cast<MainModelComponent *>(prevComponent); MainModelComponent *mmc = dynamic_cast<MainModelComponent *>(prevComponent);
if (mmc && mmc->_filename == filename) { if (mmc && mmc->_filename == filename) {
_obj = mmc->_obj; _obj = mmc->_obj;
_hier = mmc->_hier; _hier = mmc->_hier;
@ -382,7 +382,7 @@ private:
ColormapComponent::ColormapComponent(Costume::Component *parent, int parentID, const char *filename, tag32 tag) : ColormapComponent::ColormapComponent(Costume::Component *parent, int parentID, const char *filename, tag32 tag) :
Costume::Component(parent, parentID, tag) { Costume::Component(parent, parentID, tag) {
_cmap = g_resourceloader->loadColormap(filename); _cmap = g_resourceloader->loadColormap(filename);
if (parent) if (parent)
parent->setColormap(_cmap); parent->setColormap(_cmap);
else else
@ -524,19 +524,19 @@ void MeshComponent::update() {
MaterialComponent::MaterialComponent(Costume::Component *parent, int parentID, const char *filename, tag32 tag) : MaterialComponent::MaterialComponent(Costume::Component *parent, int parentID, const char *filename, tag32 tag) :
Costume::Component(parent, parentID, tag), _filename(filename), Costume::Component(parent, parentID, tag), _filename(filename),
_num(0) { _num(0) {
if (debugLevel == DEBUG_MODEL || debugLevel == DEBUG_WARN || debugLevel == DEBUG_ALL) if (debugLevel == DEBUG_MODEL || debugLevel == DEBUG_WARN || debugLevel == DEBUG_ALL)
warning("Constructing MaterialComponent %s", filename); warning("Constructing MaterialComponent %s", filename);
} }
void MaterialComponent::init() { void MaterialComponent::init() {
CMap *cmap = this->cmap(); CMap *cmap = this->cmap();
if (!cmap) { if (!cmap) {
// Use the default colormap if we're still drawing a blank // Use the default colormap if we're still drawing a blank
if (debugLevel == DEBUG_MODEL || debugLevel == DEBUG_WARN || debugLevel == DEBUG_ALL) if (debugLevel == DEBUG_MODEL || debugLevel == DEBUG_WARN || debugLevel == DEBUG_ALL)
warning("MaterialComponent::init on %s", _filename.c_str()); warning("MaterialComponent::init on %s", _filename.c_str());
cmap = g_resourceloader->loadColormap(DEFAULT_COLORMAP); cmap = g_resourceloader->loadColormap(DEFAULT_COLORMAP);
} }
_mat = g_resourceloader->loadMaterial(_filename.c_str(), *cmap); _mat = g_resourceloader->loadMaterial(_filename.c_str(), *cmap);
@ -629,7 +629,7 @@ void SoundComponent::reset() {
Costume::Costume(const char *filename, const char *data, int len, Costume *prevCost) : Costume::Costume(const char *filename, const char *data, int len, Costume *prevCost) :
_fname(filename), _cmap(NULL) { _fname(filename), _cmap(NULL) {
TextSplitter ts(data, len); TextSplitter ts(data, len);
ts.expectString("costume v0.1"); ts.expectString("costume v0.1");
ts.expectString("section tags"); ts.expectString("section tags");
int numTags; int numTags;
@ -638,7 +638,7 @@ Costume::Costume(const char *filename, const char *data, int len, Costume *prevC
for (int i = 0; i < numTags; i++) { for (int i = 0; i < numTags; i++) {
unsigned char t[4]; unsigned char t[4];
int which; int which;
// Obtain a tag ID from the file // Obtain a tag ID from the file
ts.scanString(" %d '%c%c%c%c'", 5, &which, &t[0], &t[1], &t[2], &t[3]); ts.scanString(" %d '%c%c%c%c'", 5, &which, &t[0], &t[1], &t[2], &t[3]);
// Force characters to upper case // Force characters to upper case
@ -654,7 +654,7 @@ Costume::Costume(const char *filename, const char *data, int len, Costume *prevC
int id, tagID, hash, parentID, namePos; int id, tagID, hash, parentID, namePos;
const char *line = ts.currentLine(); const char *line = ts.currentLine();
Component *prevComponent = NULL; Component *prevComponent = NULL;
if (std::sscanf(line, " %d %d %d %d %n", &id, &tagID, &hash, &parentID, &namePos) < 4) if (std::sscanf(line, " %d %d %d %d %n", &id, &tagID, &hash, &parentID, &namePos) < 4)
error("Bad component specification line: `%s'", line); error("Bad component specification line: `%s'", line);
ts.nextLine(); ts.nextLine();
@ -663,7 +663,7 @@ Costume::Costume(const char *filename, const char *data, int len, Costume *prevC
// use the properties of the previous costume as a base // use the properties of the previous costume as a base
if (parentID == -1 && prevCost) { if (parentID == -1 && prevCost) {
MainModelComponent *mmc; MainModelComponent *mmc;
// However, only the first item can actually share the // However, only the first item can actually share the
// node hierarchy with the previous costume, so flag // node hierarchy with the previous costume, so flag
// that component so it knows what to do // that component so it knows what to do
@ -671,7 +671,7 @@ Costume::Costume(const char *filename, const char *data, int len, Costume *prevC
parentID = -2; parentID = -2;
prevComponent = prevCost->_components[0]; prevComponent = prevCost->_components[0];
mmc = dynamic_cast<MainModelComponent *>(prevComponent); mmc = dynamic_cast<MainModelComponent *>(prevComponent);
// Make sure that the component is valid // Make sure that the component is valid
if (!mmc) if (!mmc)
prevComponent = NULL; prevComponent = NULL;
} }
@ -735,7 +735,7 @@ Costume::Component::Component(Component *parent, int parentID, tag32 tag) {
void Costume::Component::setColormap(CMap *c) { void Costume::Component::setColormap(CMap *c) {
ModelComponent *mc = dynamic_cast<ModelComponent *>(this); ModelComponent *mc = dynamic_cast<ModelComponent *>(this);
if (c) if (c)
_cmap = c; _cmap = c;
if (mc && this->cmap()) if (mc && this->cmap())

View file

@ -94,7 +94,7 @@ public:
private: private:
Component *loadComponent(tag32 tag, Component *parent, int parentID, const char *name, Component *prevComponent); Component *loadComponent(tag32 tag, Component *parent, int parentID, const char *name, Component *prevComponent);
std::string _fname; std::string _fname;
int _numComponents; int _numComponents;
Component **_components; Component **_components;

View file

@ -291,7 +291,7 @@ Engine::~Engine() {
void Engine::handleButton(int operation, int key, int /*keyModifier*/, uint16 ascii) { void Engine::handleButton(int operation, int key, int /*keyModifier*/, uint16 ascii) {
lua_Object handler, system_table, userPaintHandler; lua_Object handler, system_table, userPaintHandler;
// If we're not supposed to handle the key then don't // If we're not supposed to handle the key then don't
if (!_controlsEnabled[key]) if (!_controlsEnabled[key])
return; return;
@ -311,7 +311,7 @@ void Engine::handleButton(int operation, int key, int /*keyModifier*/, uint16 as
// recognize character codes // recognize character codes
if (handler != LUA_NOOBJECT && operation == Common::EVENT_KEYDOWN) { if (handler != LUA_NOOBJECT && operation == Common::EVENT_KEYDOWN) {
char keychar[2]; char keychar[2];
lua_beginblock(); lua_beginblock();
lua_pushobject(userPaintHandler); lua_pushobject(userPaintHandler);
keychar[0] = ascii; keychar[0] = ascii;
@ -814,7 +814,7 @@ Scene *Engine::findScene(const char *name) {
void Engine::setSceneLock(const char *name, bool lockStatus) { void Engine::setSceneLock(const char *name, bool lockStatus) {
Scene *scene = findScene(name); Scene *scene = findScene(name);
if (!scene) { if (!scene) {
if (debugLevel == DEBUG_WARN || debugLevel == DEBUG_ALL) if (debugLevel == DEBUG_WARN || debugLevel == DEBUG_ALL)
warning("Scene object '%s' not found in list!", name); warning("Scene object '%s' not found in list!", name);
@ -827,7 +827,7 @@ void Engine::setSceneLock(const char *name, bool lockStatus) {
void Engine::setScene(const char *name) { void Engine::setScene(const char *name) {
Scene *scene = findScene(name); Scene *scene = findScene(name);
Scene *lastScene = _currScene; Scene *lastScene = _currScene;
// If the scene already exists then use the existing data // If the scene already exists then use the existing data
if (scene) { if (scene) {
setScene(scene); setScene(scene);
@ -849,7 +849,7 @@ void Engine::setScene(const char *name) {
void Engine::setScene(Scene *scene) { void Engine::setScene(Scene *scene) {
Scene *lastScene = _currScene; Scene *lastScene = _currScene;
_currScene = scene; _currScene = scene;
_currScene->setSoundParameters(20, 127); _currScene->setSoundParameters(20, 127);
// should delete the old scene after setting the new one // should delete the old scene after setting the new one

View file

@ -78,10 +78,10 @@ Font::~Font() {
uint16 Font::getCharIndex(unsigned char c) { uint16 Font::getCharIndex(unsigned char c) {
uint16 c2 = uint16(c); uint16 c2 = uint16(c);
// In order to ensure the correct character codes for // In order to ensure the correct character codes for
// accented characters it is necessary to check the // accented characters it is necessary to check the
// requested code against the index of characters for // requested code against the index of characters for
// the font. Previously, signed characters were // the font. Previously, signed characters were
// causing the problem but it might be possible for // causing the problem but it might be possible for
// an invalid character to be called for other reasons. // an invalid character to be called for other reasons.
@ -109,99 +109,99 @@ uint16 Font::getCharIndex(unsigned char c) {
// Hardcoded default font for GUI, etc // Hardcoded default font for GUI, etc
const uint8 Font::emerFont[][13] = { const uint8 Font::emerFont[][13] = {
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
{0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18}, {0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18},
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x36, 0x36, 0x36}, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x36, 0x36, 0x36},
{0x00, 0x00, 0x00, 0x66, 0x66, 0xff, 0x66, 0x66, 0xff, 0x66, 0x66, 0x00, 0x00}, {0x00, 0x00, 0x00, 0x66, 0x66, 0xff, 0x66, 0x66, 0xff, 0x66, 0x66, 0x00, 0x00},
{0x00, 0x00, 0x18, 0x7e, 0xff, 0x1b, 0x1f, 0x7e, 0xf8, 0xd8, 0xff, 0x7e, 0x18}, {0x00, 0x00, 0x18, 0x7e, 0xff, 0x1b, 0x1f, 0x7e, 0xf8, 0xd8, 0xff, 0x7e, 0x18},
{0x00, 0x00, 0x0e, 0x1b, 0xdb, 0x6e, 0x30, 0x18, 0x0c, 0x76, 0xdb, 0xd8, 0x70}, {0x00, 0x00, 0x0e, 0x1b, 0xdb, 0x6e, 0x30, 0x18, 0x0c, 0x76, 0xdb, 0xd8, 0x70},
{0x00, 0x00, 0x7f, 0xc6, 0xcf, 0xd8, 0x70, 0x70, 0xd8, 0xcc, 0xcc, 0x6c, 0x38}, {0x00, 0x00, 0x7f, 0xc6, 0xcf, 0xd8, 0x70, 0x70, 0xd8, 0xcc, 0xcc, 0x6c, 0x38},
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x1c, 0x0c, 0x0e}, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x1c, 0x0c, 0x0e},
{0x00, 0x00, 0x0c, 0x18, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x18, 0x0c}, {0x00, 0x00, 0x0c, 0x18, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x18, 0x0c},
{0x00, 0x00, 0x30, 0x18, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x18, 0x30}, {0x00, 0x00, 0x30, 0x18, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x18, 0x30},
{0x00, 0x00, 0x00, 0x00, 0x99, 0x5a, 0x3c, 0xff, 0x3c, 0x5a, 0x99, 0x00, 0x00}, {0x00, 0x00, 0x00, 0x00, 0x99, 0x5a, 0x3c, 0xff, 0x3c, 0x5a, 0x99, 0x00, 0x00},
{0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0xff, 0xff, 0x18, 0x18, 0x18, 0x00, 0x00}, {0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0xff, 0xff, 0x18, 0x18, 0x18, 0x00, 0x00},
{0x00, 0x00, 0x30, 0x18, 0x1c, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, {0x00, 0x00, 0x30, 0x18, 0x1c, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00}, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00},
{0x00, 0x00, 0x00, 0x38, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, {0x00, 0x00, 0x00, 0x38, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
{0x00, 0x60, 0x60, 0x30, 0x30, 0x18, 0x18, 0x0c, 0x0c, 0x06, 0x06, 0x03, 0x03}, {0x00, 0x60, 0x60, 0x30, 0x30, 0x18, 0x18, 0x0c, 0x0c, 0x06, 0x06, 0x03, 0x03},
{0x00, 0x00, 0x3c, 0x66, 0xc3, 0xe3, 0xf3, 0xdb, 0xcf, 0xc7, 0xc3, 0x66, 0x3c}, {0x00, 0x00, 0x3c, 0x66, 0xc3, 0xe3, 0xf3, 0xdb, 0xcf, 0xc7, 0xc3, 0x66, 0x3c},
{0x00, 0x00, 0x7e, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x78, 0x38, 0x18}, {0x00, 0x00, 0x7e, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x78, 0x38, 0x18},
{0x00, 0x00, 0xff, 0xc0, 0xc0, 0x60, 0x30, 0x18, 0x0c, 0x06, 0x03, 0xe7, 0x7e}, {0x00, 0x00, 0xff, 0xc0, 0xc0, 0x60, 0x30, 0x18, 0x0c, 0x06, 0x03, 0xe7, 0x7e},
{0x00, 0x00, 0x7e, 0xe7, 0x03, 0x03, 0x07, 0x7e, 0x07, 0x03, 0x03, 0xe7, 0x7e}, {0x00, 0x00, 0x7e, 0xe7, 0x03, 0x03, 0x07, 0x7e, 0x07, 0x03, 0x03, 0xe7, 0x7e},
{0x00, 0x00, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0xff, 0xcc, 0x6c, 0x3c, 0x1c, 0x0c}, {0x00, 0x00, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0xff, 0xcc, 0x6c, 0x3c, 0x1c, 0x0c},
{0x00, 0x00, 0x7e, 0xe7, 0x03, 0x03, 0x07, 0xfe, 0xc0, 0xc0, 0xc0, 0xc0, 0xff}, {0x00, 0x00, 0x7e, 0xe7, 0x03, 0x03, 0x07, 0xfe, 0xc0, 0xc0, 0xc0, 0xc0, 0xff},
{0x00, 0x00, 0x7e, 0xe7, 0xc3, 0xc3, 0xc7, 0xfe, 0xc0, 0xc0, 0xc0, 0xe7, 0x7e}, {0x00, 0x00, 0x7e, 0xe7, 0xc3, 0xc3, 0xc7, 0xfe, 0xc0, 0xc0, 0xc0, 0xe7, 0x7e},
{0x00, 0x00, 0x30, 0x30, 0x30, 0x30, 0x18, 0x0c, 0x06, 0x03, 0x03, 0x03, 0xff}, {0x00, 0x00, 0x30, 0x30, 0x30, 0x30, 0x18, 0x0c, 0x06, 0x03, 0x03, 0x03, 0xff},
{0x00, 0x00, 0x7e, 0xe7, 0xc3, 0xc3, 0xe7, 0x7e, 0xe7, 0xc3, 0xc3, 0xe7, 0x7e}, {0x00, 0x00, 0x7e, 0xe7, 0xc3, 0xc3, 0xe7, 0x7e, 0xe7, 0xc3, 0xc3, 0xe7, 0x7e},
{0x00, 0x00, 0x7e, 0xe7, 0x03, 0x03, 0x03, 0x7f, 0xe7, 0xc3, 0xc3, 0xe7, 0x7e}, {0x00, 0x00, 0x7e, 0xe7, 0x03, 0x03, 0x03, 0x7f, 0xe7, 0xc3, 0xc3, 0xe7, 0x7e},
{0x00, 0x00, 0x00, 0x38, 0x38, 0x00, 0x00, 0x38, 0x38, 0x00, 0x00, 0x00, 0x00}, {0x00, 0x00, 0x00, 0x38, 0x38, 0x00, 0x00, 0x38, 0x38, 0x00, 0x00, 0x00, 0x00},
{0x00, 0x00, 0x30, 0x18, 0x1c, 0x1c, 0x00, 0x00, 0x1c, 0x1c, 0x00, 0x00, 0x00}, {0x00, 0x00, 0x30, 0x18, 0x1c, 0x1c, 0x00, 0x00, 0x1c, 0x1c, 0x00, 0x00, 0x00},
{0x00, 0x00, 0x06, 0x0c, 0x18, 0x30, 0x60, 0xc0, 0x60, 0x30, 0x18, 0x0c, 0x06}, {0x00, 0x00, 0x06, 0x0c, 0x18, 0x30, 0x60, 0xc0, 0x60, 0x30, 0x18, 0x0c, 0x06},
{0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00}, {0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00},
{0x00, 0x00, 0x60, 0x30, 0x18, 0x0c, 0x06, 0x03, 0x06, 0x0c, 0x18, 0x30, 0x60}, {0x00, 0x00, 0x60, 0x30, 0x18, 0x0c, 0x06, 0x03, 0x06, 0x0c, 0x18, 0x30, 0x60},
{0x00, 0x00, 0x18, 0x00, 0x00, 0x18, 0x18, 0x0c, 0x06, 0x03, 0xc3, 0xc3, 0x7e}, {0x00, 0x00, 0x18, 0x00, 0x00, 0x18, 0x18, 0x0c, 0x06, 0x03, 0xc3, 0xc3, 0x7e},
{0x00, 0x00, 0x3f, 0x60, 0xcf, 0xdb, 0xd3, 0xdd, 0xc3, 0x7e, 0x00, 0x00, 0x00}, {0x00, 0x00, 0x3f, 0x60, 0xcf, 0xdb, 0xd3, 0xdd, 0xc3, 0x7e, 0x00, 0x00, 0x00},
{0x00, 0x00, 0xc3, 0xc3, 0xc3, 0xc3, 0xff, 0xc3, 0xc3, 0xc3, 0x66, 0x3c, 0x18}, {0x00, 0x00, 0xc3, 0xc3, 0xc3, 0xc3, 0xff, 0xc3, 0xc3, 0xc3, 0x66, 0x3c, 0x18},
{0x00, 0x00, 0xfe, 0xc7, 0xc3, 0xc3, 0xc7, 0xfe, 0xc7, 0xc3, 0xc3, 0xc7, 0xfe}, {0x00, 0x00, 0xfe, 0xc7, 0xc3, 0xc3, 0xc7, 0xfe, 0xc7, 0xc3, 0xc3, 0xc7, 0xfe},
{0x00, 0x00, 0x7e, 0xe7, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xe7, 0x7e}, {0x00, 0x00, 0x7e, 0xe7, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xe7, 0x7e},
{0x00, 0x00, 0xfc, 0xce, 0xc7, 0xc3, 0xc3, 0xc3, 0xc3, 0xc3, 0xc7, 0xce, 0xfc}, {0x00, 0x00, 0xfc, 0xce, 0xc7, 0xc3, 0xc3, 0xc3, 0xc3, 0xc3, 0xc7, 0xce, 0xfc},
{0x00, 0x00, 0xff, 0xc0, 0xc0, 0xc0, 0xc0, 0xfc, 0xc0, 0xc0, 0xc0, 0xc0, 0xff}, {0x00, 0x00, 0xff, 0xc0, 0xc0, 0xc0, 0xc0, 0xfc, 0xc0, 0xc0, 0xc0, 0xc0, 0xff},
{0x00, 0x00, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xfc, 0xc0, 0xc0, 0xc0, 0xff}, {0x00, 0x00, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xfc, 0xc0, 0xc0, 0xc0, 0xff},
{0x00, 0x00, 0x7e, 0xe7, 0xc3, 0xc3, 0xcf, 0xc0, 0xc0, 0xc0, 0xc0, 0xe7, 0x7e}, {0x00, 0x00, 0x7e, 0xe7, 0xc3, 0xc3, 0xcf, 0xc0, 0xc0, 0xc0, 0xc0, 0xe7, 0x7e},
{0x00, 0x00, 0xc3, 0xc3, 0xc3, 0xc3, 0xc3, 0xff, 0xc3, 0xc3, 0xc3, 0xc3, 0xc3}, {0x00, 0x00, 0xc3, 0xc3, 0xc3, 0xc3, 0xc3, 0xff, 0xc3, 0xc3, 0xc3, 0xc3, 0xc3},
{0x00, 0x00, 0x7e, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x7e}, {0x00, 0x00, 0x7e, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x7e},
{0x00, 0x00, 0x7c, 0xee, 0xc6, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06}, {0x00, 0x00, 0x7c, 0xee, 0xc6, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06},
{0x00, 0x00, 0xc3, 0xc6, 0xcc, 0xd8, 0xf0, 0xe0, 0xf0, 0xd8, 0xcc, 0xc6, 0xc3}, {0x00, 0x00, 0xc3, 0xc6, 0xcc, 0xd8, 0xf0, 0xe0, 0xf0, 0xd8, 0xcc, 0xc6, 0xc3},
{0x00, 0x00, 0xff, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0}, {0x00, 0x00, 0xff, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0},
{0x00, 0x00, 0xc3, 0xc3, 0xc3, 0xc3, 0xc3, 0xc3, 0xdb, 0xff, 0xff, 0xe7, 0xc3}, {0x00, 0x00, 0xc3, 0xc3, 0xc3, 0xc3, 0xc3, 0xc3, 0xdb, 0xff, 0xff, 0xe7, 0xc3},
{0x00, 0x00, 0xc7, 0xc7, 0xcf, 0xcf, 0xdf, 0xdb, 0xfb, 0xf3, 0xf3, 0xe3, 0xe3}, {0x00, 0x00, 0xc7, 0xc7, 0xcf, 0xcf, 0xdf, 0xdb, 0xfb, 0xf3, 0xf3, 0xe3, 0xe3},
{0x00, 0x00, 0x7e, 0xe7, 0xc3, 0xc3, 0xc3, 0xc3, 0xc3, 0xc3, 0xc3, 0xe7, 0x7e}, {0x00, 0x00, 0x7e, 0xe7, 0xc3, 0xc3, 0xc3, 0xc3, 0xc3, 0xc3, 0xc3, 0xe7, 0x7e},
{0x00, 0x00, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xfe, 0xc7, 0xc3, 0xc3, 0xc7, 0xfe}, {0x00, 0x00, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xfe, 0xc7, 0xc3, 0xc3, 0xc7, 0xfe},
{0x00, 0x00, 0x3f, 0x6e, 0xdf, 0xdb, 0xc3, 0xc3, 0xc3, 0xc3, 0xc3, 0x66, 0x3c}, {0x00, 0x00, 0x3f, 0x6e, 0xdf, 0xdb, 0xc3, 0xc3, 0xc3, 0xc3, 0xc3, 0x66, 0x3c},
{0x00, 0x00, 0xc3, 0xc6, 0xcc, 0xd8, 0xf0, 0xfe, 0xc7, 0xc3, 0xc3, 0xc7, 0xfe}, {0x00, 0x00, 0xc3, 0xc6, 0xcc, 0xd8, 0xf0, 0xfe, 0xc7, 0xc3, 0xc3, 0xc7, 0xfe},
{0x00, 0x00, 0x7e, 0xe7, 0x03, 0x03, 0x07, 0x7e, 0xe0, 0xc0, 0xc0, 0xe7, 0x7e}, {0x00, 0x00, 0x7e, 0xe7, 0x03, 0x03, 0x07, 0x7e, 0xe0, 0xc0, 0xc0, 0xe7, 0x7e},
{0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xff}, {0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xff},
{0x00, 0x00, 0x7e, 0xe7, 0xc3, 0xc3, 0xc3, 0xc3, 0xc3, 0xc3, 0xc3, 0xc3, 0xc3}, {0x00, 0x00, 0x7e, 0xe7, 0xc3, 0xc3, 0xc3, 0xc3, 0xc3, 0xc3, 0xc3, 0xc3, 0xc3},
{0x00, 0x00, 0x18, 0x3c, 0x3c, 0x66, 0x66, 0xc3, 0xc3, 0xc3, 0xc3, 0xc3, 0xc3}, {0x00, 0x00, 0x18, 0x3c, 0x3c, 0x66, 0x66, 0xc3, 0xc3, 0xc3, 0xc3, 0xc3, 0xc3},
{0x00, 0x00, 0xc3, 0xe7, 0xff, 0xff, 0xdb, 0xdb, 0xc3, 0xc3, 0xc3, 0xc3, 0xc3}, {0x00, 0x00, 0xc3, 0xe7, 0xff, 0xff, 0xdb, 0xdb, 0xc3, 0xc3, 0xc3, 0xc3, 0xc3},
{0x00, 0x00, 0xc3, 0x66, 0x66, 0x3c, 0x3c, 0x18, 0x3c, 0x3c, 0x66, 0x66, 0xc3}, {0x00, 0x00, 0xc3, 0x66, 0x66, 0x3c, 0x3c, 0x18, 0x3c, 0x3c, 0x66, 0x66, 0xc3},
{0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x3c, 0x66, 0x66, 0xc3}, {0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x3c, 0x66, 0x66, 0xc3},
{0x00, 0x00, 0xff, 0xc0, 0xc0, 0x60, 0x30, 0x7e, 0x0c, 0x06, 0x03, 0x03, 0xff}, {0x00, 0x00, 0xff, 0xc0, 0xc0, 0x60, 0x30, 0x7e, 0x0c, 0x06, 0x03, 0x03, 0xff},
{0x00, 0x00, 0x3c, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x3c}, {0x00, 0x00, 0x3c, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x3c},
{0x00, 0x03, 0x03, 0x06, 0x06, 0x0c, 0x0c, 0x18, 0x18, 0x30, 0x30, 0x60, 0x60}, {0x00, 0x03, 0x03, 0x06, 0x06, 0x0c, 0x0c, 0x18, 0x18, 0x30, 0x30, 0x60, 0x60},
{0x00, 0x00, 0x3c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x3c}, {0x00, 0x00, 0x3c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x3c},
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc3, 0x66, 0x3c, 0x18}, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc3, 0x66, 0x3c, 0x18},
{0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, {0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x38, 0x30, 0x70}, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x38, 0x30, 0x70},
{0x00, 0x00, 0x7f, 0xc3, 0xc3, 0x7f, 0x03, 0xc3, 0x7e, 0x00, 0x00, 0x00, 0x00}, {0x00, 0x00, 0x7f, 0xc3, 0xc3, 0x7f, 0x03, 0xc3, 0x7e, 0x00, 0x00, 0x00, 0x00},
{0x00, 0x00, 0xfe, 0xc3, 0xc3, 0xc3, 0xc3, 0xfe, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0}, {0x00, 0x00, 0xfe, 0xc3, 0xc3, 0xc3, 0xc3, 0xfe, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0},
{0x00, 0x00, 0x7e, 0xc3, 0xc0, 0xc0, 0xc0, 0xc3, 0x7e, 0x00, 0x00, 0x00, 0x00}, {0x00, 0x00, 0x7e, 0xc3, 0xc0, 0xc0, 0xc0, 0xc3, 0x7e, 0x00, 0x00, 0x00, 0x00},
{0x00, 0x00, 0x7f, 0xc3, 0xc3, 0xc3, 0xc3, 0x7f, 0x03, 0x03, 0x03, 0x03, 0x03}, {0x00, 0x00, 0x7f, 0xc3, 0xc3, 0xc3, 0xc3, 0x7f, 0x03, 0x03, 0x03, 0x03, 0x03},
{0x00, 0x00, 0x7f, 0xc0, 0xc0, 0xfe, 0xc3, 0xc3, 0x7e, 0x00, 0x00, 0x00, 0x00}, {0x00, 0x00, 0x7f, 0xc0, 0xc0, 0xfe, 0xc3, 0xc3, 0x7e, 0x00, 0x00, 0x00, 0x00},
{0x00, 0x00, 0x30, 0x30, 0x30, 0x30, 0x30, 0xfc, 0x30, 0x30, 0x30, 0x33, 0x1e}, {0x00, 0x00, 0x30, 0x30, 0x30, 0x30, 0x30, 0xfc, 0x30, 0x30, 0x30, 0x33, 0x1e},
{0x7e, 0xc3, 0x03, 0x03, 0x7f, 0xc3, 0xc3, 0xc3, 0x7e, 0x00, 0x00, 0x00, 0x00}, {0x7e, 0xc3, 0x03, 0x03, 0x7f, 0xc3, 0xc3, 0xc3, 0x7e, 0x00, 0x00, 0x00, 0x00},
{0x00, 0x00, 0xc3, 0xc3, 0xc3, 0xc3, 0xc3, 0xc3, 0xfe, 0xc0, 0xc0, 0xc0, 0xc0}, {0x00, 0x00, 0xc3, 0xc3, 0xc3, 0xc3, 0xc3, 0xc3, 0xfe, 0xc0, 0xc0, 0xc0, 0xc0},
{0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x18, 0x00}, {0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x18, 0x00},
{0x38, 0x6c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x00, 0x00, 0x0c, 0x00}, {0x38, 0x6c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x00, 0x00, 0x0c, 0x00},
{0x00, 0x00, 0xc6, 0xcc, 0xf8, 0xf0, 0xd8, 0xcc, 0xc6, 0xc0, 0xc0, 0xc0, 0xc0}, {0x00, 0x00, 0xc6, 0xcc, 0xf8, 0xf0, 0xd8, 0xcc, 0xc6, 0xc0, 0xc0, 0xc0, 0xc0},
{0x00, 0x00, 0x7e, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x78}, {0x00, 0x00, 0x7e, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x78},
{0x00, 0x00, 0xdb, 0xdb, 0xdb, 0xdb, 0xdb, 0xdb, 0xfe, 0x00, 0x00, 0x00, 0x00}, {0x00, 0x00, 0xdb, 0xdb, 0xdb, 0xdb, 0xdb, 0xdb, 0xfe, 0x00, 0x00, 0x00, 0x00},
{0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xfc, 0x00, 0x00, 0x00, 0x00}, {0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xfc, 0x00, 0x00, 0x00, 0x00},
{0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, {0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00},
{0xc0, 0xc0, 0xc0, 0xfe, 0xc3, 0xc3, 0xc3, 0xc3, 0xfe, 0x00, 0x00, 0x00, 0x00}, {0xc0, 0xc0, 0xc0, 0xfe, 0xc3, 0xc3, 0xc3, 0xc3, 0xfe, 0x00, 0x00, 0x00, 0x00},
{0x03, 0x03, 0x03, 0x7f, 0xc3, 0xc3, 0xc3, 0xc3, 0x7f, 0x00, 0x00, 0x00, 0x00}, {0x03, 0x03, 0x03, 0x7f, 0xc3, 0xc3, 0xc3, 0xc3, 0x7f, 0x00, 0x00, 0x00, 0x00},
{0x00, 0x00, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xe0, 0xfe, 0x00, 0x00, 0x00, 0x00}, {0x00, 0x00, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xe0, 0xfe, 0x00, 0x00, 0x00, 0x00},
{0x00, 0x00, 0xfe, 0x03, 0x03, 0x7e, 0xc0, 0xc0, 0x7f, 0x00, 0x00, 0x00, 0x00}, {0x00, 0x00, 0xfe, 0x03, 0x03, 0x7e, 0xc0, 0xc0, 0x7f, 0x00, 0x00, 0x00, 0x00},
{0x00, 0x00, 0x1c, 0x36, 0x30, 0x30, 0x30, 0x30, 0xfc, 0x30, 0x30, 0x30, 0x00}, {0x00, 0x00, 0x1c, 0x36, 0x30, 0x30, 0x30, 0x30, 0xfc, 0x30, 0x30, 0x30, 0x00},
{0x00, 0x00, 0x7e, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, {0x00, 0x00, 0x7e, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00},
{0x00, 0x00, 0x18, 0x3c, 0x3c, 0x66, 0x66, 0xc3, 0xc3, 0x00, 0x00, 0x00, 0x00}, {0x00, 0x00, 0x18, 0x3c, 0x3c, 0x66, 0x66, 0xc3, 0xc3, 0x00, 0x00, 0x00, 0x00},
{0x00, 0x00, 0xc3, 0xe7, 0xff, 0xdb, 0xc3, 0xc3, 0xc3, 0x00, 0x00, 0x00, 0x00}, {0x00, 0x00, 0xc3, 0xe7, 0xff, 0xdb, 0xc3, 0xc3, 0xc3, 0x00, 0x00, 0x00, 0x00},
{0x00, 0x00, 0xc3, 0x66, 0x3c, 0x18, 0x3c, 0x66, 0xc3, 0x00, 0x00, 0x00, 0x00}, {0x00, 0x00, 0xc3, 0x66, 0x3c, 0x18, 0x3c, 0x66, 0xc3, 0x00, 0x00, 0x00, 0x00},
{0xc0, 0x60, 0x60, 0x30, 0x18, 0x3c, 0x66, 0x66, 0xc3, 0x00, 0x00, 0x00, 0x00}, {0xc0, 0x60, 0x60, 0x30, 0x18, 0x3c, 0x66, 0x66, 0xc3, 0x00, 0x00, 0x00, 0x00},
{0x00, 0x00, 0xff, 0x60, 0x30, 0x18, 0x0c, 0x06, 0xff, 0x00, 0x00, 0x00, 0x00}, {0x00, 0x00, 0xff, 0x60, 0x30, 0x18, 0x0c, 0x06, 0xff, 0x00, 0x00, 0x00, 0x00},
{0x00, 0x00, 0x0f, 0x18, 0x18, 0x18, 0x38, 0xf0, 0x38, 0x18, 0x18, 0x18, 0x0f}, {0x00, 0x00, 0x0f, 0x18, 0x18, 0x18, 0x38, 0xf0, 0x38, 0x18, 0x18, 0x18, 0x0f},
{0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18}, {0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18},
{0x00, 0x00, 0xf0, 0x18, 0x18, 0x18, 0x1c, 0x0f, 0x1c, 0x18, 0x18, 0x18, 0xf0}, {0x00, 0x00, 0xf0, 0x18, 0x18, 0x18, 0x1c, 0x0f, 0x1c, 0x18, 0x18, 0x18, 0xf0},
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x8f, 0xf1, 0x60, 0x00, 0x00, 0x00} {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x8f, 0xf1, 0x60, 0x00, 0x00, 0x00}
}; };

View file

@ -933,7 +933,7 @@ Bitmap *GfxOpenGL::getScreenshot(int w, int h) {
step++; step++;
} }
} }
Bitmap *screenshot = new Bitmap((char *) buffer, w, h, "screenshot"); Bitmap *screenshot = new Bitmap((char *) buffer, w, h, "screenshot");
delete[] buffer; delete[] buffer;
return screenshot; return screenshot;
@ -978,7 +978,7 @@ void GfxOpenGL::dimScreen() {
void GfxOpenGL::dimRegion(int x, int yReal, int w, int h, float level) { void GfxOpenGL::dimRegion(int x, int yReal, int w, int h, float level) {
uint32 *data = new uint32[w * h]; uint32 *data = new uint32[w * h];
int y = _screenHeight - yReal; int y = _screenHeight - yReal;
// collect the requested area and generate the dimmed version // collect the requested area and generate the dimmed version
glReadPixels(x, y - h, w, h, GL_RGBA, GL_UNSIGNED_BYTE, data); glReadPixels(x, y - h, w, h, GL_RGBA, GL_UNSIGNED_BYTE, data);
for (int ly = 0; ly < h; ly++) { for (int ly = 0; ly < h; ly++) {
@ -991,7 +991,7 @@ void GfxOpenGL::dimRegion(int x, int yReal, int w, int h, float level) {
data[ly * w + lx] = ((color & 0xFF) << 16) | ((color & 0xFF) << 8) | (color & 0xFF); data[ly * w + lx] = ((color & 0xFF) << 16) | ((color & 0xFF) << 8) | (color & 0xFF);
} }
} }
glMatrixMode(GL_PROJECTION); glMatrixMode(GL_PROJECTION);
glLoadIdentity(); glLoadIdentity();
glOrtho(0, _screenWidth, _screenHeight, 0, 0, 1); glOrtho(0, _screenWidth, _screenHeight, 0, 0, 1);

View file

@ -49,7 +49,7 @@ public:
void setupCamera(float fov, float nclip, float fclip, float roll); void setupCamera(float fov, float nclip, float fclip, float roll);
void positionCamera(Vector3d pos, Vector3d interest); void positionCamera(Vector3d pos, Vector3d interest);
void clearScreen(); void clearScreen();
void flipBuffer(); void flipBuffer();
bool isHardwareAccelerated(); bool isHardwareAccelerated();

View file

@ -100,10 +100,10 @@ static void lookAt(TGLfloat eyex, TGLfloat eyey, TGLfloat eyez, TGLfloat centerx
static void transformPoint(TGLfloat out[4], const TGLfloat m[16], const TGLfloat in[4]) { static void transformPoint(TGLfloat out[4], const TGLfloat m[16], const TGLfloat in[4]) {
#define M(row,col) m[col * 4 + row] #define M(row,col) m[col * 4 + row]
out[0] = M(0, 0) * in[0] + M(0, 1) * in[1] + M(0, 2) * in[2] + M(0, 3) * in[3]; out[0] = M(0, 0) * in[0] + M(0, 1) * in[1] + M(0, 2) * in[2] + M(0, 3) * in[3];
out[1] = M(1, 0) * in[0] + M(1, 1) * in[1] + M(1, 2) * in[2] + M(1, 3) * in[3]; out[1] = M(1, 0) * in[0] + M(1, 1) * in[1] + M(1, 2) * in[2] + M(1, 3) * in[3];
out[2] = M(2, 0) * in[0] + M(2, 1) * in[1] + M(2, 2) * in[2] + M(2, 3) * in[3]; out[2] = M(2, 0) * in[0] + M(2, 1) * in[1] + M(2, 2) * in[2] + M(2, 3) * in[3];
out[3] = M(3, 0) * in[0] + M(3, 1) * in[1] + M(3, 2) * in[2] + M(3, 3) * in[3]; out[3] = M(3, 0) * in[0] + M(3, 1) * in[1] + M(3, 2) * in[2] + M(3, 3) * in[3];
#undef M #undef M
} }
@ -578,7 +578,7 @@ void TinyGLBlit(byte *dst, byte *src, int x, int y, int width, int height, bool
dst += (x + (y * 640)) * 2; dst += (x + (y * 640)) * 2;
src += (srcX + (srcY * width)) * 2; src += (srcX + (srcY * width)) * 2;
int copyWidth = width * 2; int copyWidth = width * 2;
if (!trans) { if (!trans) {

View file

@ -42,7 +42,7 @@ public:
void setupCamera(float fov, float nclip, float fclip, float roll); void setupCamera(float fov, float nclip, float fclip, float roll);
void positionCamera(Vector3d pos, Vector3d interest); void positionCamera(Vector3d pos, Vector3d interest);
void clearScreen(); void clearScreen();
void flipBuffer(); void flipBuffer();
bool isHardwareAccelerated(); bool isHardwareAccelerated();

View file

@ -120,7 +120,7 @@ void Imuse::playMusic(const ImuseTable *table, int atribPos, bool sequence) {
} }
char *soundName = getCurMusicSoundName(); char *soundName = getCurMusicSoundName();
int pan; int pan;
if (table->pan == 0) if (table->pan == 0)
pan = 64; pan = 64;
else else

View file

@ -99,7 +99,7 @@ void Imuse::startSfx(const char *soundName, int priority) {
int32 Imuse::getPosIn60HzTicks(const char *soundName) { int32 Imuse::getPosIn60HzTicks(const char *soundName) {
Common::StackLock lock(_mutex); Common::StackLock lock(_mutex);
Track *getTrack = NULL; Track *getTrack = NULL;
getTrack = findTrack(soundName); getTrack = findTrack(soundName);
// Warn the user if the track was not found // Warn the user if the track was not found
if (getTrack == NULL) { if (getTrack == NULL) {
@ -128,11 +128,11 @@ bool Imuse::isVoicePlaying() {
bool Imuse::getSoundStatus(const char *soundName) { bool Imuse::getSoundStatus(const char *soundName) {
Common::StackLock lock(_mutex); Common::StackLock lock(_mutex);
Track *track = NULL; Track *track = NULL;
// If there's no name then don't try to get the status! // If there's no name then don't try to get the status!
if (strlen(soundName) == 0) if (strlen(soundName) == 0)
return false; return false;
track = findTrack(soundName); track = findTrack(soundName);
// Warn the user if the track was not found // Warn the user if the track was not found
if (track == NULL || !g_system->getMixer()->isSoundHandleActive(track->handle)) { if (track == NULL || !g_system->getMixer()->isSoundHandleActive(track->handle)) {
@ -150,7 +150,7 @@ void Imuse::stopSound(const char *soundName) {
if (debugLevel == DEBUG_IMUSE || debugLevel == DEBUG_ALL) if (debugLevel == DEBUG_IMUSE || debugLevel == DEBUG_ALL)
printf("Imuse::stopSound(): SoundName %s\n", soundName); printf("Imuse::stopSound(): SoundName %s\n", soundName);
Track *removeTrack = NULL; Track *removeTrack = NULL;
removeTrack = findTrack(soundName); removeTrack = findTrack(soundName);
// Warn the user if the track was not found // Warn the user if the track was not found
if (removeTrack == NULL) { if (removeTrack == NULL) {

View file

@ -287,7 +287,7 @@ int ImuseSndMgr::getJumpIdByRegionAndHookId(SoundDesc *sound, int region, int ho
return l; return l;
} }
} }
return -1; return -1;
} }
@ -337,6 +337,6 @@ int32 ImuseSndMgr::getDataFromRegion(SoundDesc *sound, int region, byte **buf, i
*buf = new byte[size]; *buf = new byte[size];
memcpy(*buf, sound->resPtr + region_offset + offset, size); memcpy(*buf, sound->resPtr + region_offset + offset, size);
} }
return size; return size;
} }

View file

@ -59,7 +59,7 @@ private:
byte hookId; // id of hook byte hookId; // id of hook
int16 fadeDelay; // fade delay in ms int16 fadeDelay; // fade delay in ms
}; };
public: public:
struct SoundDesc { struct SoundDesc {

View file

@ -28,7 +28,7 @@
int Imuse::allocSlot(int priority) { int Imuse::allocSlot(int priority) {
int l, lowest_priority = 127; int l, lowest_priority = 127;
int trackId = -1; int trackId = -1;
// allocSlot called by startSound so no locking is necessary // allocSlot called by startSound so no locking is necessary
for (l = 0; l < MAX_IMUSE_TRACKS; l++) { for (l = 0; l < MAX_IMUSE_TRACKS; l++) {
if (!_track[l]->used) { if (!_track[l]->used) {
@ -144,7 +144,7 @@ bool Imuse::startSound(const char *soundName, int volGroupId, int hookId, int vo
Track *Imuse::findTrack(const char *soundName) { Track *Imuse::findTrack(const char *soundName) {
for (int l = 0; l < MAX_IMUSE_TRACKS; l++) { for (int l = 0; l < MAX_IMUSE_TRACKS; l++) {
Track *track = _track[l]; Track *track = _track[l];
// Since the audio (at least for Eva's keystrokes) can be referenced // Since the audio (at least for Eva's keystrokes) can be referenced
// two ways: keyboard.IMU and keyboard.imu, make a case insensitive // two ways: keyboard.IMU and keyboard.imu, make a case insensitive
// search for the track to make sure we can find it // search for the track to make sure we can find it
@ -160,7 +160,7 @@ void Imuse::setPriority(const char *soundName, int priority) {
Common::StackLock lock(_mutex); Common::StackLock lock(_mutex);
Track *changeTrack = NULL; Track *changeTrack = NULL;
assert ((priority >= 0) && (priority <= 127)); assert ((priority >= 0) && (priority <= 127));
changeTrack = findTrack(soundName); changeTrack = findTrack(soundName);
// Check to make sure we found the track // Check to make sure we found the track
if (changeTrack == NULL) { if (changeTrack == NULL) {
@ -173,7 +173,7 @@ void Imuse::setPriority(const char *soundName, int priority) {
void Imuse::setVolume(const char *soundName, int volume) { void Imuse::setVolume(const char *soundName, int volume) {
Common::StackLock lock(_mutex); Common::StackLock lock(_mutex);
Track *changeTrack; Track *changeTrack;
changeTrack = findTrack(soundName); changeTrack = findTrack(soundName);
if (changeTrack == NULL) { if (changeTrack == NULL) {
warning("Unable to find track '%s' to change volume!", soundName); warning("Unable to find track '%s' to change volume!", soundName);
@ -185,7 +185,7 @@ void Imuse::setVolume(const char *soundName, int volume) {
void Imuse::setPan(const char *soundName, int pan) { void Imuse::setPan(const char *soundName, int pan) {
Common::StackLock lock(_mutex); Common::StackLock lock(_mutex);
Track *changeTrack; Track *changeTrack;
changeTrack = findTrack(soundName); changeTrack = findTrack(soundName);
if (changeTrack == NULL) { if (changeTrack == NULL) {
warning("Unable to find track '%s' to change pan!", soundName); warning("Unable to find track '%s' to change pan!", soundName);
@ -197,7 +197,7 @@ void Imuse::setPan(const char *soundName, int pan) {
int Imuse::getVolume(const char *soundName) { int Imuse::getVolume(const char *soundName) {
Common::StackLock lock(_mutex); Common::StackLock lock(_mutex);
Track *getTrack; Track *getTrack;
getTrack = findTrack(soundName); getTrack = findTrack(soundName);
if (getTrack == NULL) { if (getTrack == NULL) {
warning("Unable to find track '%s' to get volume!", soundName); warning("Unable to find track '%s' to get volume!", soundName);
@ -209,7 +209,7 @@ int Imuse::getVolume(const char *soundName) {
void Imuse::setHookId(const char *soundName, int hookId) { void Imuse::setHookId(const char *soundName, int hookId) {
Common::StackLock lock(_mutex); Common::StackLock lock(_mutex);
Track *changeTrack; Track *changeTrack;
changeTrack = findTrack(soundName); changeTrack = findTrack(soundName);
if (changeTrack == NULL) { if (changeTrack == NULL) {
warning("Unable to find track '%s' to change hook id!", soundName); warning("Unable to find track '%s' to change hook id!", soundName);
@ -221,7 +221,7 @@ void Imuse::setHookId(const char *soundName, int hookId) {
int Imuse::getCountPlayedTracks(const char *soundName) { int Imuse::getCountPlayedTracks(const char *soundName) {
Common::StackLock lock(_mutex); Common::StackLock lock(_mutex);
int count = 0; int count = 0;
for (int l = 0; l < MAX_IMUSE_TRACKS; l++) { for (int l = 0; l < MAX_IMUSE_TRACKS; l++) {
Track *track = _track[l]; Track *track = _track[l];
if (track->used && !track->toBeRemoved && (strcasecmp(track->soundName, soundName) == 0)) { if (track->used && !track->toBeRemoved && (strcasecmp(track->soundName, soundName) == 0)) {

View file

@ -46,7 +46,7 @@ void KeyframeAnim::loadBinary(const char *data, int len) {
// Next 36 bytes are the filename // Next 36 bytes are the filename
if (debugLevel == DEBUG_NORMAL || debugLevel == DEBUG_ALL) { if (debugLevel == DEBUG_NORMAL || debugLevel == DEBUG_ALL) {
char filebuf[37]; char filebuf[37];
memcpy(filebuf, data + 4, 36); memcpy(filebuf, data + 4, 36);
filebuf[36] = 0; filebuf[36] = 0;
printf("Loading Keyframe '%s'.", filebuf); printf("Loading Keyframe '%s'.", filebuf);

View file

@ -100,15 +100,15 @@ int LipSync::getAnim(int pos) {
} }
const LipSync::PhonemeAnim LipSync::_animTable[] = { const LipSync::PhonemeAnim LipSync::_animTable[] = {
{0x005F, 0}, {0x0251, 1}, {0x0061, 1}, {0x00E6, 1}, {0x028C, 8}, {0x005F, 0}, {0x0251, 1}, {0x0061, 1}, {0x00E6, 1}, {0x028C, 8},
{0x0254, 1}, {0x0259, 1}, {0x0062, 6}, {0x02A7, 2}, {0x0064, 2}, {0x0254, 1}, {0x0259, 1}, {0x0062, 6}, {0x02A7, 2}, {0x0064, 2},
{0x00F0, 5}, {0x025B, 8}, {0x0268, 8}, {0x025A, 9}, {0x025D, 9}, {0x00F0, 5}, {0x025B, 8}, {0x0268, 8}, {0x025A, 9}, {0x025D, 9},
{0x0065, 1}, {0x0066, 4}, {0x0067, 8}, {0x0261, 8}, {0x0068, 8}, {0x0065, 1}, {0x0066, 4}, {0x0067, 8}, {0x0261, 8}, {0x0068, 8},
{0x026A, 8}, {0x0069, 3}, {0x02A4, 2}, {0x006B, 2}, {0x006C, 5}, {0x026A, 8}, {0x0069, 3}, {0x02A4, 2}, {0x006B, 2}, {0x006C, 5},
{0x026B, 5}, {0x006D, 6}, {0x006E, 8}, {0x014B, 8}, {0x006F, 7}, {0x026B, 5}, {0x006D, 6}, {0x006E, 8}, {0x014B, 8}, {0x006F, 7},
{0x0070, 6}, {0x0072, 2}, {0x027B, 2}, {0x0279, 2}, {0x0073, 2}, {0x0070, 6}, {0x0072, 2}, {0x027B, 2}, {0x0279, 2}, {0x0073, 2},
{0x0283, 2}, {0x0074, 2}, {0x027E, 2}, {0x03B8, 5}, {0x028A, 9}, {0x0283, 2}, {0x0074, 2}, {0x027E, 2}, {0x03B8, 5}, {0x028A, 9},
{0x0075, 9}, {0x0076, 4}, {0x0077, 9}, {0x006A, 8}, {0x007A, 2}, {0x0075, 9}, {0x0076, 4}, {0x0077, 9}, {0x006A, 8}, {0x007A, 2},
{0x0292, 2}, {0x002E, 2} {0x0292, 2}, {0x002E, 2}
}; };

View file

@ -129,7 +129,7 @@ static inline PrimitiveObject *check_primobject(int num) {
return static_cast<PrimitiveObject *>(lua_getuserdata(param)); return static_cast<PrimitiveObject *>(lua_getuserdata(param));
luaL_argerror(num, "primitive expected"); luaL_argerror(num, "primitive expected");
return NULL; return NULL;
} }
static inline TextObject *check_textobject(int num) { static inline TextObject *check_textobject(int num) {
lua_Object param = lua_getparam(num); lua_Object param = lua_getparam(num);
@ -152,18 +152,18 @@ static inline double check_double(int num) {
// where doubles of "zero" are called as nil // where doubles of "zero" are called as nil
if (lua_isnil(lua_getparam(num))) if (lua_isnil(lua_getparam(num)))
return 0.0; return 0.0;
return luaL_check_number(num); return luaL_check_number(num);
} }
static inline int check_int(int num) { static inline int check_int(int num) {
double val; double val;
// Have found some instances, such as in Rubacava and the tube-switcher // Have found some instances, such as in Rubacava and the tube-switcher
// room, where integers of "zero" are called as nil // room, where integers of "zero" are called as nil
if(lua_isnil(lua_getparam(num))) if(lua_isnil(lua_getparam(num)))
return 0; return 0;
val = luaL_check_number(num); val = luaL_check_number(num);
return int(round(val)); return int(round(val));
} }
@ -220,7 +220,7 @@ static void PrintDebug() {
DEBUG_FUNCTION(); DEBUG_FUNCTION();
if (debugLevel == DEBUG_NORMAL || debugLevel == DEBUG_ALL) { if (debugLevel == DEBUG_NORMAL || debugLevel == DEBUG_ALL) {
std::string msg = luaL_check_string(1); std::string msg = luaL_check_string(1);
msg.insert(0, "Debug: "); msg.insert(0, "Debug: ");
msg.append("\n"); msg.append("\n");
std::fputs(msg.c_str(), stderr); std::fputs(msg.c_str(), stderr);
@ -231,7 +231,7 @@ static void PrintError() {
DEBUG_FUNCTION(); DEBUG_FUNCTION();
if (debugLevel == DEBUG_ERROR || debugLevel == DEBUG_ALL) { if (debugLevel == DEBUG_ERROR || debugLevel == DEBUG_ALL) {
std::string msg = luaL_check_string(1); std::string msg = luaL_check_string(1);
msg.insert(0, "Error: "); msg.insert(0, "Error: ");
// don't do 'error()' so we can stay alive if possible // don't do 'error()' so we can stay alive if possible
std::fputs(msg.c_str(), stderr); std::fputs(msg.c_str(), stderr);
@ -242,7 +242,7 @@ static void PrintWarning() {
DEBUG_FUNCTION(); DEBUG_FUNCTION();
if (debugLevel == DEBUG_WARN || debugLevel == DEBUG_ALL) { if (debugLevel == DEBUG_WARN || debugLevel == DEBUG_ALL) {
std::string msg = luaL_check_string(1); std::string msg = luaL_check_string(1);
msg.insert(0, "Warning: "); msg.insert(0, "Warning: ");
warning(msg.c_str()); warning(msg.c_str());
} }
@ -293,7 +293,7 @@ static void FunctionName() {
static void CheckForFile() { static void CheckForFile() {
const char *filename = luaL_check_string(1); const char *filename = luaL_check_string(1);
DEBUG_FUNCTION(); DEBUG_FUNCTION();
pushbool(g_resourceloader->fileExists(filename)); pushbool(g_resourceloader->fileExists(filename));
} }
@ -332,7 +332,7 @@ static void GetColorComponents() {
static void ReadRegistryValue() { static void ReadRegistryValue() {
const char *key; const char *key;
const char *val; const char *val;
DEBUG_FUNCTION(); DEBUG_FUNCTION();
key = luaL_check_string(1); key = luaL_check_string(1);
val = g_registry->get(key, ""); val = g_registry->get(key, "");
@ -345,7 +345,7 @@ static void ReadRegistryValue() {
static void WriteRegistryValue() { static void WriteRegistryValue() {
const char *key; const char *key;
const char *val; const char *val;
DEBUG_FUNCTION(); DEBUG_FUNCTION();
key = luaL_check_string(1); key = luaL_check_string(1);
val = luaL_check_string(2); val = luaL_check_string(2);
@ -356,7 +356,7 @@ static void WriteRegistryValue() {
static void LoadActor() { static void LoadActor() {
const char *name; const char *name;
DEBUG_FUNCTION(); DEBUG_FUNCTION();
if (lua_isnil(lua_getparam(1))) if (lua_isnil(lua_getparam(1)))
name = "<unnamed>"; name = "<unnamed>";
@ -374,7 +374,7 @@ static void GetActorTimeScale() {
static void SetSelectedActor() { static void SetSelectedActor() {
Actor *act; Actor *act;
DEBUG_FUNCTION(); DEBUG_FUNCTION();
act = check_actor(1); act = check_actor(1);
g_engine->setSelectedActor(act); g_engine->setSelectedActor(act);
@ -386,7 +386,7 @@ static void SetSelectedActor() {
*/ */
static void GetCameraActor() { static void GetCameraActor() {
Actor *act; Actor *act;
DEBUG_FUNCTION(); DEBUG_FUNCTION();
stubWarning("VERIFY: GetCameraActor"); stubWarning("VERIFY: GetCameraActor");
act = g_engine->selectedActor(); act = g_engine->selectedActor();
@ -413,7 +413,7 @@ static void SetSayLineDefaults() {
return; return;
} }
key = lua_getresult(1); key = lua_getresult(1);
if (lua_isnil(key)) if (lua_isnil(key))
break; break;
key_text = lua_getstring(key); key_text = lua_getstring(key);
@ -427,7 +427,7 @@ static void SetSayLineDefaults() {
static void SetActorTalkColor() { static void SetActorTalkColor() {
Actor *act; Actor *act;
Color *c; Color *c;
DEBUG_FUNCTION(); DEBUG_FUNCTION();
act = check_actor(1); act = check_actor(1);
c = check_color(2); c = check_color(2);
@ -532,7 +532,7 @@ static void SetActorMumblechore() {
static void SetActorVisibility() { static void SetActorVisibility() {
Actor *act; Actor *act;
bool val; bool val;
DEBUG_FUNCTION(); DEBUG_FUNCTION();
act = check_actor(1); act = check_actor(1);
val = getbool(2); val = getbool(2);
@ -550,7 +550,7 @@ static void PutActorAt() {
static void GetActorPos() { static void GetActorPos() {
Actor *act; Actor *act;
Vector3d pos; Vector3d pos;
DEBUG_FUNCTION(); DEBUG_FUNCTION();
act = check_actor(1); act = check_actor(1);
pos = act->pos(); pos = act->pos();
@ -588,7 +588,7 @@ static void GetActorRot() {
static void IsActorTurning() { static void IsActorTurning() {
Actor *act; Actor *act;
DEBUG_FUNCTION(); DEBUG_FUNCTION();
act = check_actor(1); act = check_actor(1);
pushbool(act->isTurning()); pushbool(act->isTurning());
@ -597,7 +597,7 @@ static void IsActorTurning() {
static void GetAngleBetweenActors() { static void GetAngleBetweenActors() {
Actor *act1; Actor *act1;
Actor *act2; Actor *act2;
DEBUG_FUNCTION(); DEBUG_FUNCTION();
act1 = check_actor(1); act1 = check_actor(1);
act2 = check_actor(2); act2 = check_actor(2);
@ -608,7 +608,7 @@ static void GetActorYawToPoint() {
Vector3d yawVector; Vector3d yawVector;
lua_Object param2; lua_Object param2;
Actor *act; Actor *act;
DEBUG_FUNCTION(); DEBUG_FUNCTION();
act = check_actor(1); act = check_actor(1);
param2 = lua_getparam(2); param2 = lua_getparam(2);
@ -634,7 +634,7 @@ static void GetActorYawToPoint() {
static void PutActorInSet() { static void PutActorInSet() {
const char *set = ""; const char *set = "";
Actor *act; Actor *act;
DEBUG_FUNCTION(); DEBUG_FUNCTION();
act = check_actor(1); act = check_actor(1);
// If the set is "nil" then set to an empty string, we should not render // If the set is "nil" then set to an empty string, we should not render
@ -669,7 +669,7 @@ static void GetActorWalkRate() {
static void SetActorTurnRate() { static void SetActorTurnRate() {
Actor *act; Actor *act;
float rate; float rate;
DEBUG_FUNCTION(); DEBUG_FUNCTION();
act = check_actor(1); act = check_actor(1);
rate = luaL_check_number(2); rate = luaL_check_number(2);
@ -678,7 +678,7 @@ static void SetActorTurnRate() {
static void WalkActorForward() { static void WalkActorForward() {
Actor *act; Actor *act;
DEBUG_FUNCTION(); DEBUG_FUNCTION();
act = check_actor(1); act = check_actor(1);
act->walkForward(); act->walkForward();
@ -687,7 +687,7 @@ static void WalkActorForward() {
static void SetActorReflection() { static void SetActorReflection() {
Actor *act; Actor *act;
float angle; float angle;
DEBUG_FUNCTION(); DEBUG_FUNCTION();
act = check_actor(1); act = check_actor(1);
angle = luaL_check_number(2); angle = luaL_check_number(2);
@ -757,7 +757,7 @@ static void GetVideoDevices() {
static void EnumerateVideoDevices() { static void EnumerateVideoDevices() {
lua_Object result = lua_createtable(); lua_Object result = lua_createtable();
DEBUG_FUNCTION(); DEBUG_FUNCTION();
lua_pushobject(result); lua_pushobject(result);
lua_pushnumber(0.0); // id of device lua_pushnumber(0.0); // id of device
@ -792,7 +792,7 @@ static void IsActorResting() {
} }
/* Get the location of one of the actor's nodes, this is /* Get the location of one of the actor's nodes, this is
* used by Glottis to watch where Manny is located in * used by Glottis to watch where Manny is located in
* order to hand him the work order. This function is * order to hand him the work order. This function is
* also important for when Velasco hands Manny the logbook * also important for when Velasco hands Manny the logbook
* in Rubacava * in Rubacava
@ -802,7 +802,7 @@ static void GetActorNodeLocation() {
Costume *c; Costume *c;
Actor *act; Actor *act;
int node; int node;
DEBUG_FUNCTION(); DEBUG_FUNCTION();
act = check_actor(1); act = check_actor(1);
node = check_int(2); node = check_int(2);
@ -836,7 +836,7 @@ static void GetActorNodeLocation() {
static void SetActorWalkDominate() { static void SetActorWalkDominate() {
lua_Object param2; lua_Object param2;
Actor *act; Actor *act;
DEBUG_FUNCTION(); DEBUG_FUNCTION();
act = check_actor(1); act = check_actor(1);
if (!act) { if (!act) {
@ -848,7 +848,7 @@ static void SetActorWalkDominate() {
lua_pushnil(); lua_pushnil();
} else if (lua_isnumber(param2)) { } else if (lua_isnumber(param2)) {
int walkcode = check_int(2); int walkcode = check_int(2);
if (walkcode != 1) { if (walkcode != 1) {
warning("Unknown SetActorWalkDominate 'walking code' value: %d", walkcode); warning("Unknown SetActorWalkDominate 'walking code' value: %d", walkcode);
lua_pushnil(); lua_pushnil();
@ -868,7 +868,7 @@ static void SetActorColormap() {
const char *mapname; const char *mapname;
CMap *_cmap; CMap *_cmap;
Actor *act; Actor *act;
DEBUG_FUNCTION(); DEBUG_FUNCTION();
act = check_actor(1); act = check_actor(1);
mapname = luaL_check_string(2); mapname = luaL_check_string(2);
@ -879,7 +879,7 @@ static void SetActorColormap() {
static void TurnActor() { static void TurnActor() {
Actor *act; Actor *act;
int dir; int dir;
DEBUG_FUNCTION(); DEBUG_FUNCTION();
act = check_actor(1); act = check_actor(1);
dir = check_int(2); dir = check_int(2);
@ -927,7 +927,7 @@ static void GetActorCostume() {
static void PopActorCostume() { static void PopActorCostume() {
Actor *act; Actor *act;
DEBUG_FUNCTION(); DEBUG_FUNCTION();
act = check_actor(1); act = check_actor(1);
act->popCostume(); act->popCostume();
@ -935,7 +935,7 @@ static void PopActorCostume() {
static void GetActorCostumeDepth() { static void GetActorCostumeDepth() {
Actor *act; Actor *act;
DEBUG_FUNCTION(); DEBUG_FUNCTION();
act = check_actor(1); act = check_actor(1);
lua_pushnumber(act->costumeStackDepth()); lua_pushnumber(act->costumeStackDepth());
@ -972,7 +972,7 @@ static void CompleteActorChore() {
// //
// Note: This does not appear to function entirely as it should // Note: This does not appear to function entirely as it should
// TODO: Make this operation work better // TODO: Make this operation work better
DEBUG_FUNCTION(); DEBUG_FUNCTION();
act = check_actor(1); act = check_actor(1);
num = check_int(2); num = check_int(2);
@ -1158,7 +1158,7 @@ static void TurnActorTo() {
z = luaL_check_number(4); z = luaL_check_number(4);
} else if (isActor(2)) { } else if (isActor(2)) {
Actor *destActor; Actor *destActor;
destActor = check_actor(2); destActor = check_actor(2);
x = destActor->pos().x(); x = destActor->pos().x();
y = destActor->pos().y(); y = destActor->pos().y();
@ -1168,7 +1168,7 @@ static void TurnActorTo() {
warning("TurnActorTo() parameter type not understood"); warning("TurnActorTo() parameter type not understood");
return; return;
} }
// Find the vector pointing from the actor to the desired location // Find the vector pointing from the actor to the desired location
Vector3d turnToVector(x, y, z); Vector3d turnToVector(x, y, z);
Vector3d lookVector = turnToVector - act->pos(); Vector3d lookVector = turnToVector - act->pos();
@ -1177,7 +1177,7 @@ static void TurnActorTo() {
// yaw is offset from forward by 90 degrees // yaw is offset from forward by 90 degrees
yaw -= 90.0f; yaw -= 90.0f;
act->turnTo(0, yaw, 0); act->turnTo(0, yaw, 0);
// Game will lock in elevator if this doesn't return false // Game will lock in elevator if this doesn't return false
pushbool(false); pushbool(false);
} }
@ -1189,7 +1189,7 @@ static void PointActorAt() {
TurnActorTo(); TurnActorTo();
} }
/* WalkActorVector handles the movement of the selected actor /* WalkActorVector handles the movement of the selected actor
* when the game is in "Camera-Relative Movement Mode" * when the game is in "Camera-Relative Movement Mode"
* *
* NOTE: The usage for paramaters 1 and 5 are as-yet unknown. * NOTE: The usage for paramaters 1 and 5 are as-yet unknown.
@ -1197,7 +1197,7 @@ static void PointActorAt() {
static void WalkActorVector() { static void WalkActorVector() {
float moveHoriz, moveVert, yaw; float moveHoriz, moveVert, yaw;
Actor *act; Actor *act;
DEBUG_FUNCTION(); DEBUG_FUNCTION();
stubWarning("VERIFY: WalkActorVector"); stubWarning("VERIFY: WalkActorVector");
// Second option is the actor returned by GetCameraActor // Second option is the actor returned by GetCameraActor
@ -1233,14 +1233,14 @@ static void WalkActorVector() {
act->walkForward(); act->walkForward();
} }
/* RotateVector takes a vector and rotates it around /* RotateVector takes a vector and rotates it around
* the point (0,0,0) by the requested number of degrees. * the point (0,0,0) by the requested number of degrees.
* This function is used to calculate the locations for * This function is used to calculate the locations for
* getting on and off of the Bone Wagon. * getting on and off of the Bone Wagon.
*/ */
static void RotateVector() { static void RotateVector() {
lua_Object param1, param2, result; lua_Object param1, param2, result;
DEBUG_FUNCTION(); DEBUG_FUNCTION();
stubWarning("VERIFY: RotateVector"); stubWarning("VERIFY: RotateVector");
param1 = lua_getparam(1); param1 = lua_getparam(1);
@ -1249,7 +1249,7 @@ static void RotateVector() {
Vector3d vec1 = tableToVector(param1); Vector3d vec1 = tableToVector(param1);
lua_Object rotateObject = getTableValue(param2, "y"); lua_Object rotateObject = getTableValue(param2, "y");
float rotate, currAngle, newAngle; float rotate, currAngle, newAngle;
// The signpost uses an indexed table (1,2,3) instead of // The signpost uses an indexed table (1,2,3) instead of
// a value-based table (x,y,z) // a value-based table (x,y,z)
if (rotateObject == 0) if (rotateObject == 0)
@ -1300,7 +1300,7 @@ static void SetActorPitch() {
param2 = lua_getparam(2); param2 = lua_getparam(2);
if (lua_isnumber(param2)) { if (lua_isnumber(param2)) {
float pitch = lua_getnumber(param2); float pitch = lua_getnumber(param2);
act->setRot(pitch, act->yaw(), act->roll()); act->setRot(pitch, act->yaw(), act->roll());
} else { } else {
if (debugLevel == DEBUG_WARN || debugLevel == DEBUG_ALL) if (debugLevel == DEBUG_WARN || debugLevel == DEBUG_ALL)
@ -1345,7 +1345,7 @@ static void SetActorHead() {
static void PutActorAtInterest() { static void PutActorAtInterest() {
Actor *act; Actor *act;
DEBUG_FUNCTION(); DEBUG_FUNCTION();
act = check_actor(1); act = check_actor(1);
if (!g_engine->currScene()) if (!g_engine->currScene())
@ -1372,7 +1372,7 @@ static void SetActorConstrain() {
// Actor *act = check_actor(1); // Actor *act = check_actor(1);
// bool constrain = !lua_isnil(lua_getparam(2)); // bool constrain = !lua_isnil(lua_getparam(2));
// that below should be enabled, but for now it's disabled realated to // that below should be enabled, but for now it's disabled realated to
// above func SetActorFollowBoxes. // above func SetActorFollowBoxes.
// act->setConstrain(constrain); // act->setConstrain(constrain);
stubWarning("SetActorConstrain"); stubWarning("SetActorConstrain");
@ -1488,7 +1488,7 @@ std::string parseMsgText(const char *msg, char *msgId) {
if (msg[0] == '/' && msgId) { if (msg[0] == '/' && msgId) {
secondSlash = std::strchr(msg + 1, '/'); secondSlash = std::strchr(msg + 1, '/');
if (secondSlash) { if (secondSlash) {
strncpy(msgId, msg + 1, secondSlash - msg - 1); strncpy(msgId, msg + 1, secondSlash - msg - 1);
msgId[secondSlash - msg - 1] = 0; msgId[secondSlash - msg - 1] = 0;
} else { } else {
msgId[0] = 0; msgId[0] = 0;
@ -1509,7 +1509,7 @@ static void TextFileGetLine() {
textBuf[0] = 0; textBuf[0] = 0;
const char *filename; const char *filename;
Common::SeekableReadStream *file; Common::SeekableReadStream *file;
DEBUG_FUNCTION(); DEBUG_FUNCTION();
filename = luaL_check_string(1); filename = luaL_check_string(1);
Common::SaveFileManager *saveFileMan = g_system->getSavefileManager(); Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
@ -1569,7 +1569,7 @@ static void TextFileGetLineCount() {
static void LocalizeString() { static void LocalizeString() {
char msgId[32], buf[640]; char msgId[32], buf[640];
const char *str, *result; const char *str, *result;
DEBUG_FUNCTION(); DEBUG_FUNCTION();
str = luaL_check_string(1); str = luaL_check_string(1);
// If the string that we're passed isn't localized yet then // If the string that we're passed isn't localized yet then
@ -1662,7 +1662,7 @@ static void InputDialog() {
static void IsMessageGoing() { static void IsMessageGoing() {
Actor *act; Actor *act;
DEBUG_FUNCTION(); DEBUG_FUNCTION();
if (lua_getparam(1) == LUA_NOOBJECT) { if (lua_getparam(1) == LUA_NOOBJECT) {
pushbool(g_imuse->isVoicePlaying()); pushbool(g_imuse->isVoicePlaying());
@ -1674,7 +1674,7 @@ static void IsMessageGoing() {
static void ShutUpActor() { static void ShutUpActor() {
Actor *act; Actor *act;
DEBUG_FUNCTION(); DEBUG_FUNCTION();
act = check_actor(1); act = check_actor(1);
if (act) if (act)
@ -1689,7 +1689,7 @@ static void GetPointSector() {
lua_Object xparam, yparam, zparam; lua_Object xparam, yparam, zparam;
Sector *result; Sector *result;
float x = 0.0f, y = 0.0f, z = 0.0f; float x = 0.0f, y = 0.0f, z = 0.0f;
DEBUG_FUNCTION(); DEBUG_FUNCTION();
stubWarning("VERIFY: GetPointSector"); stubWarning("VERIFY: GetPointSector");
xparam = lua_getparam(1); xparam = lua_getparam(1);
@ -1697,7 +1697,7 @@ static void GetPointSector() {
zparam = lua_getparam(3); zparam = lua_getparam(3);
if (lua_isnumber(xparam) && lua_isnumber(yparam) && lua_isnumber(zparam)) { if (lua_isnumber(xparam) && lua_isnumber(yparam) && lua_isnumber(zparam)) {
Vector3d point(x, y, z); Vector3d point(x, y, z);
// Find the point in any available sector // Find the point in any available sector
result = g_engine->currScene()->findPointSector(point, 0xFFFF); result = g_engine->currScene()->findPointSector(point, 0xFFFF);
} else { } else {
@ -1809,7 +1809,7 @@ static void MakeSectorActive() {
// Scene functions // Scene functions
static void LockSet() { static void LockSet() {
const char *name; const char *name;
DEBUG_FUNCTION(); DEBUG_FUNCTION();
name = luaL_check_string(1); name = luaL_check_string(1);
// We should lock the set so it isn't destroyed // We should lock the set so it isn't destroyed
@ -1818,7 +1818,7 @@ static void LockSet() {
static void UnLockSet() { static void UnLockSet() {
const char *name; const char *name;
DEBUG_FUNCTION(); DEBUG_FUNCTION();
name = luaL_check_string(1); name = luaL_check_string(1);
// We should unlock the set so it can be destroyed again // We should unlock the set so it can be destroyed again
@ -1827,7 +1827,7 @@ static void UnLockSet() {
static void MakeCurrentSet() { static void MakeCurrentSet() {
const char *name; const char *name;
DEBUG_FUNCTION(); DEBUG_FUNCTION();
name = luaL_check_string(1); name = luaL_check_string(1);
if (debugLevel == DEBUG_NORMAL || debugLevel == DEBUG_ALL) if (debugLevel == DEBUG_NORMAL || debugLevel == DEBUG_ALL)
@ -1870,7 +1870,7 @@ static void MakeCurrentSetup() {
static void GetCurrentSetup() { static void GetCurrentSetup() {
const char *name; const char *name;
Scene *scene; Scene *scene;
DEBUG_FUNCTION(); DEBUG_FUNCTION();
name = luaL_check_string(1); name = luaL_check_string(1);
scene = g_engine->findScene(name); scene = g_engine->findScene(name);
@ -1886,7 +1886,7 @@ static void GetCurrentSetup() {
// FIXME: Function only spits back what it's given // FIXME: Function only spits back what it's given
static void GetShrinkPos() { static void GetShrinkPos() {
double x, y, z, r; double x, y, z, r;
DEBUG_FUNCTION(); DEBUG_FUNCTION();
x = luaL_check_number(1); x = luaL_check_number(1);
y = luaL_check_number(2); y = luaL_check_number(2);
@ -1918,7 +1918,7 @@ static void ImStartSound() {
soundName = luaL_check_string(1); soundName = luaL_check_string(1);
priority = check_int(2); priority = check_int(2);
group = check_int(3); group = check_int(3);
// Start the sound with the appropriate settings // Start the sound with the appropriate settings
if (g_imuse->startSound(soundName, group, 0, 127, 0, priority, NULL)) { if (g_imuse->startSound(soundName, group, 0, 127, 0, priority, NULL)) {
lua_pushstring(soundName); lua_pushstring(soundName);
@ -1937,7 +1937,7 @@ static void ImStartSound() {
static void ImStopSound() { static void ImStopSound() {
const char *soundName; const char *soundName;
DEBUG_FUNCTION(); DEBUG_FUNCTION();
soundName = luaL_check_string(1); soundName = luaL_check_string(1);
g_imuse->stopSound(soundName); g_imuse->stopSound(soundName);
@ -1960,7 +1960,7 @@ static void ImResume() {
static void ImSetVoiceEffect() { static void ImSetVoiceEffect() {
const char *effectName; const char *effectName;
DEBUG_FUNCTION(); DEBUG_FUNCTION();
effectName = luaL_check_string(1); effectName = luaL_check_string(1);
if (debugLevel == DEBUG_WARN || debugLevel == DEBUG_ALL) if (debugLevel == DEBUG_WARN || debugLevel == DEBUG_ALL)
@ -2066,7 +2066,7 @@ static void ImSetState() {
static void ImSetSequence() { static void ImSetSequence() {
int state; int state;
DEBUG_FUNCTION(); DEBUG_FUNCTION();
state = check_int(1); state = check_int(1);
lua_pushnumber(g_imuse->setMusicSequence(state)); lua_pushnumber(g_imuse->setMusicSequence(state));
@ -2097,7 +2097,7 @@ static void SetSoundPosition() {
Vector3d pos; Vector3d pos;
int minVolume = 10; int minVolume = 10;
int maxVolume = 127; int maxVolume = 127;
DEBUG_FUNCTION(); DEBUG_FUNCTION();
if (g_engine->currScene()) { if (g_engine->currScene()) {
g_engine->currScene()->getSoundParameters(&minVolume, &maxVolume); g_engine->currScene()->getSoundParameters(&minVolume, &maxVolume);
@ -2188,7 +2188,7 @@ void setMovieTime(float movieTime) {
void PerSecond() { void PerSecond() {
float rate; float rate;
DEBUG_FUNCTION(); DEBUG_FUNCTION();
rate = luaL_check_number(1); rate = luaL_check_number(1);
lua_pushnumber(g_engine->perSecond(rate)); lua_pushnumber(g_engine->perSecond(rate));
@ -2196,7 +2196,7 @@ void PerSecond() {
void EnableControl() { void EnableControl() {
int num; int num;
DEBUG_FUNCTION(); DEBUG_FUNCTION();
num = check_control(1); num = check_control(1);
g_engine->enableControl(num); g_engine->enableControl(num);
@ -2204,7 +2204,7 @@ void EnableControl() {
void DisableControl() { void DisableControl() {
int num; int num;
DEBUG_FUNCTION(); DEBUG_FUNCTION();
num = check_control(1); num = check_control(1);
g_engine->disableControl(num); g_engine->disableControl(num);
@ -2212,7 +2212,7 @@ void DisableControl() {
void GetControlState() { void GetControlState() {
int num; int num;
DEBUG_FUNCTION(); DEBUG_FUNCTION();
num = check_control(1); num = check_control(1);
if (num >= KEYCODE_AXIS_JOY1_X && num <= KEYCODE_AXIS_MOUSE_Z) if (num >= KEYCODE_AXIS_JOY1_X && num <= KEYCODE_AXIS_MOUSE_Z)
@ -2233,7 +2233,7 @@ static void killBitmapPrimitives(Bitmap *bitmap) {
static void GetImage() { static void GetImage() {
const char *bitmapName; const char *bitmapName;
DEBUG_FUNCTION(); DEBUG_FUNCTION();
bitmapName = luaL_check_string(1); bitmapName = luaL_check_string(1);
Bitmap *image = g_resourceloader->loadBitmap(bitmapName); Bitmap *image = g_resourceloader->loadBitmap(bitmapName);
@ -2253,7 +2253,7 @@ static void BlastImage() {
bool transparent; bool transparent;
Bitmap *bitmap; Bitmap *bitmap;
int x, y; int x, y;
DEBUG_FUNCTION(); DEBUG_FUNCTION();
bitmap = check_bitmapobject(1); bitmap = check_bitmapobject(1);
x = check_int(2); x = check_int(2);
@ -2269,7 +2269,7 @@ static void BlastImage() {
void setTextObjectParams(TextObject *textObject, lua_Object table_obj) { void setTextObjectParams(TextObject *textObject, lua_Object table_obj) {
const char *key_text = NULL; const char *key_text = NULL;
lua_Object key = LUA_NOOBJECT; lua_Object key = LUA_NOOBJECT;
DEBUG_FUNCTION(); DEBUG_FUNCTION();
for (;;) { for (;;) {
lua_pushobject(table_obj); lua_pushobject(table_obj);
@ -2284,7 +2284,7 @@ void setTextObjectParams(TextObject *textObject, lua_Object table_obj) {
return; return;
} }
key = lua_getresult(1); key = lua_getresult(1);
if (lua_isnil(key)) if (lua_isnil(key))
break; break;
// printf("debug param: %s %s\n", lua_getstring(key), lua_getstring(lua_getresult(2))); // printf("debug param: %s %s\n", lua_getstring(key), lua_getstring(lua_getresult(2)));
@ -2321,7 +2321,7 @@ static void CleanBuffer() {
DEBUG_FUNCTION(); DEBUG_FUNCTION();
g_driver->copyStoredToDisplay(); g_driver->copyStoredToDisplay();
} }
static void Exit() { static void Exit() {
DEBUG_FUNCTION(); DEBUG_FUNCTION();
@ -2334,7 +2334,7 @@ static void Exit() {
*/ */
TextObject *TextObjectExists(char *name) { TextObject *TextObjectExists(char *name) {
TextObject *modifyObject = NULL; TextObject *modifyObject = NULL;
DEBUG_FUNCTION(); DEBUG_FUNCTION();
for (Engine::TextListType::const_iterator i = g_engine->textsBegin(); i != g_engine->textsEnd(); i++) { for (Engine::TextListType::const_iterator i = g_engine->textsBegin(); i != g_engine->textsEnd(); i++) {
TextObject *textO = *i; TextObject *textO = *i;
@ -2345,7 +2345,7 @@ TextObject *TextObjectExists(char *name) {
} }
return modifyObject; return modifyObject;
} }
/* Destroy a text object since we don't need it anymore /* Destroy a text object since we don't need it anymore
* note that the menu creates more objects than it needs, * note that the menu creates more objects than it needs,
* so it deletes some objects right after creating them * so it deletes some objects right after creating them
@ -2386,7 +2386,7 @@ static void ChangeTextObject() {
if (lua_istable(tableObj)) if (lua_istable(tableObj))
setTextObjectParams(textObject, tableObj); setTextObjectParams(textObject, tableObj);
if (lua_isstring(lua_getparam(2))) { if (lua_isstring(lua_getparam(2))) {
line = lua_getstring(lua_getparam(2)); line = lua_getstring(lua_getparam(2));
textObject->setText((char *)line); textObject->setText((char *)line);
@ -2408,7 +2408,7 @@ static void GetTextSpeed() {
static void SetTextSpeed() { static void SetTextSpeed() {
int speed; int speed;
DEBUG_FUNCTION(); DEBUG_FUNCTION();
speed = check_int(1); speed = check_int(1);
g_engine->setTextSpeed(speed); g_engine->setTextSpeed(speed);
@ -2445,7 +2445,7 @@ static void MakeTextObject() {
static void GetTextObjectDimensions() { static void GetTextObjectDimensions() {
TextObject *textObjectParam; TextObject *textObjectParam;
DEBUG_FUNCTION(); DEBUG_FUNCTION();
textObjectParam = check_textobject(1); textObjectParam = check_textobject(1);
lua_pushnumber(textObjectParam->getBitmapWidth()); lua_pushnumber(textObjectParam->getBitmapWidth());
@ -2464,7 +2464,7 @@ static void ExpireText() {
static void GetTextCharPosition() { static void GetTextCharPosition() {
TextObject *textObjectParam; TextObject *textObjectParam;
int pos; int pos;
DEBUG_FUNCTION(); DEBUG_FUNCTION();
textObjectParam = check_textobject(1); textObjectParam = check_textobject(1);
pos = (int)lua_getnumber(lua_getparam(2)); pos = (int)lua_getnumber(lua_getparam(2));
@ -2501,7 +2501,7 @@ static void SetOffscreenTextPos() {
static void SetSpeechMode() { static void SetSpeechMode() {
int mode; int mode;
DEBUG_FUNCTION(); DEBUG_FUNCTION();
mode = check_int(1); mode = check_int(1);
if (mode >= 1 && mode <= 3) if (mode >= 1 && mode <= 3)
@ -2644,7 +2644,7 @@ static void DrawLine() {
int x1, y1, x2, y2; int x1, y1, x2, y2;
lua_Object tableObj; lua_Object tableObj;
Color color; Color color;
DEBUG_FUNCTION(); DEBUG_FUNCTION();
x1 = check_int(1); x1 = check_int(1);
y1 = check_int(2); y1 = check_int(2);
@ -2734,7 +2734,7 @@ static void DrawRectangle() {
int x1, y1, x2, y2; int x1, y1, x2, y2;
lua_Object tableObj; lua_Object tableObj;
Color color; Color color;
DEBUG_FUNCTION(); DEBUG_FUNCTION();
x1 = check_int(1); x1 = check_int(1);
y1 = check_int(2); y1 = check_int(2);
@ -2772,7 +2772,7 @@ static void BlastRect() {
int x1, y1, x2, y2; int x1, y1, x2, y2;
lua_Object tableObj; lua_Object tableObj;
Color color; Color color;
DEBUG_FUNCTION(); DEBUG_FUNCTION();
x1 = check_int(1); x1 = check_int(1);
y1 = check_int(2); y1 = check_int(2);
@ -2838,7 +2838,7 @@ static void NewObjectState() {
DEBUG_FUNCTION(); DEBUG_FUNCTION();
// Called with "nil" if you jump to zone "sp" // Called with "nil" if you jump to zone "sp"
setupID = check_int(1); // Setup ID setupID = check_int(1); // Setup ID
pos = check_objstate_pos(2); // When to draw pos = check_objstate_pos(2); // When to draw
bitmap = luaL_check_string(3); // Bitmap bitmap = luaL_check_string(3); // Bitmap
zbitmap = NULL; // Zbuffer Bitmap zbitmap = NULL; // Zbuffer Bitmap
visible = getbool(5); // Starts visible? visible = getbool(5); // Starts visible?
@ -2852,7 +2852,7 @@ static void NewObjectState() {
static void FreeObjectState() { static void FreeObjectState() {
ObjectState *state; ObjectState *state;
DEBUG_FUNCTION(); DEBUG_FUNCTION();
state = check_object(1); state = check_object(1);
g_engine->currScene()->deleteObjectState(state); g_engine->currScene()->deleteObjectState(state);
@ -2860,7 +2860,7 @@ static void FreeObjectState() {
static void SendObjectToBack() { static void SendObjectToBack() {
lua_Object param; lua_Object param;
DEBUG_FUNCTION(); DEBUG_FUNCTION();
param = lua_getparam(1); param = lua_getparam(1);
if (lua_isuserdata(param) && lua_tag(param) == MKID_BE('STAT')) { if (lua_isuserdata(param) && lua_tag(param) == MKID_BE('STAT')) {
@ -2872,7 +2872,7 @@ static void SendObjectToBack() {
static void SendObjectToFront() { static void SendObjectToFront() {
lua_Object param; lua_Object param;
DEBUG_FUNCTION(); DEBUG_FUNCTION();
param = lua_getparam(1); param = lua_getparam(1);
if (lua_isuserdata(param) && lua_tag(param) == MKID_BE('STAT')) { if (lua_isuserdata(param) && lua_tag(param) == MKID_BE('STAT')) {
@ -2885,7 +2885,7 @@ static void SendObjectToFront() {
static void SetObjectType() { static void SetObjectType() {
ObjectState::Position pos; ObjectState::Position pos;
ObjectState *state; ObjectState *state;
DEBUG_FUNCTION(); DEBUG_FUNCTION();
state = check_object(1); state = check_object(1);
pos = check_objstate_pos(2); pos = check_objstate_pos(2);
@ -2899,7 +2899,7 @@ static void GetCurrentScript() {
static void ScreenShot() { static void ScreenShot() {
int width, height; int width, height;
DEBUG_FUNCTION(); DEBUG_FUNCTION();
width = check_int(1); width = check_int(1);
height = check_int(2); height = check_int(2);
@ -2927,7 +2927,7 @@ static void GetSaveGameImage() {
char *data; char *data;
Bitmap *screenshot; Bitmap *screenshot;
int dataSize; int dataSize;
printf("GetSaveGameImage() started.\n"); printf("GetSaveGameImage() started.\n");
DEBUG_FUNCTION(); DEBUG_FUNCTION();
filename = luaL_check_string(1); filename = luaL_check_string(1);
@ -2953,7 +2953,7 @@ static void SubmitSaveGameData() {
SaveGame *savedState; SaveGame *savedState;
int count = 0; int count = 0;
const char *str; const char *str;
printf("SubmitSaveGameData() started.\n"); printf("SubmitSaveGameData() started.\n");
DEBUG_FUNCTION(); DEBUG_FUNCTION();
table = lua_getparam(1); table = lua_getparam(1);
@ -3018,7 +3018,7 @@ static void GetSaveGameData() {
static void Load() { static void Load() {
lua_Object fileName; lua_Object fileName;
DEBUG_FUNCTION(); DEBUG_FUNCTION();
fileName = lua_getparam(1); fileName = lua_getparam(1);
if (lua_isnil(fileName)) { if (lua_isnil(fileName)) {
@ -3035,7 +3035,7 @@ static void Load() {
static void Save() { static void Save() {
lua_Object fileName; lua_Object fileName;
DEBUG_FUNCTION(); DEBUG_FUNCTION();
fileName = lua_getparam(1); fileName = lua_getparam(1);
if (lua_isnil(fileName)) { if (lua_isnil(fileName)) {
@ -3187,8 +3187,8 @@ static void LoadBundle() {
* function. This is useful for finding problems in a LUA script * function. This is useful for finding problems in a LUA script
* that are due to a few function calls leading up to a failure. * that are due to a few function calls leading up to a failure.
* *
* This function is also used by the "Stub" handler which will * This function is also used by the "Stub" handler which will
* generate warnings about missing functions when the debug flag * generate warnings about missing functions when the debug flag
* is set to "Stub", warnings, or everything. * is set to "Stub", warnings, or everything.
*/ */
static void debugFunction(const char *debugMessage, const char *funcName) { static void debugFunction(const char *debugMessage, const char *funcName) {
@ -3197,7 +3197,7 @@ static void debugFunction(const char *debugMessage, const char *funcName) {
if (!stubFn && debugLevel != DEBUG_FUNC && debugLevel != DEBUG_ALL) if (!stubFn && debugLevel != DEBUG_FUNC && debugLevel != DEBUG_ALL)
return; return;
if (stubFn) if (stubFn)
output = stderr; output = stderr;
else else
@ -3576,7 +3576,7 @@ struct luaL_reg mainOpcodes[] = {
{ "AddShadowPlane", AddShadowPlane }, { "AddShadowPlane", AddShadowPlane },
{ "SetActorShadowValid", SetActorShadowValid }, { "SetActorShadowValid", SetActorShadowValid },
{ "FreeObjectState", FreeObjectState }, { "FreeObjectState", FreeObjectState },
{ "NewObjectState", NewObjectState }, { "NewObjectState", NewObjectState },
{ "SetObjectType", SetObjectType }, { "SetObjectType", SetObjectType },
{ "SendObjectToBack", SendObjectToBack }, { "SendObjectToBack", SendObjectToBack },
{ "SendObjectToFront", SendObjectToFront }, { "SendObjectToFront", SendObjectToFront },
@ -3843,7 +3843,7 @@ lua_Object getTableFunction(lua_Object table, const char *name) {
lua_pushobject(table); lua_pushobject(table);
lua_pushstring(const_cast<char *>(name)); lua_pushstring(const_cast<char *>(name));
lua_Object handler = lua_gettable(); lua_Object handler = lua_gettable();
if (lua_isnil(handler)) if (lua_isnil(handler))
return LUA_NOOBJECT; return LUA_NOOBJECT;
@ -3873,7 +3873,7 @@ lua_Object getTableValue(lua_Object table, const char *name) {
error("getTableValue(): Parameter not a table!"); error("getTableValue(): Parameter not a table!");
return 0; return 0;
} }
for (;;) { for (;;) {
lua_pushobject(table); lua_pushobject(table);
if (key_text) if (key_text)
@ -3949,16 +3949,16 @@ void setTableValue(lua_Object table, const char *name, lua_Object newvalue) {
Vector3d tableToVector(lua_Object table) { Vector3d tableToVector(lua_Object table) {
lua_Object xparam, yparam, zparam; lua_Object xparam, yparam, zparam;
float x, y, z; float x, y, z;
if (!lua_istable(table)) if (!lua_istable(table))
error("tableToVector passed a LUA object that is not a table!"); error("tableToVector passed a LUA object that is not a table!");
xparam = getTableValue(table, "x"); xparam = getTableValue(table, "x");
yparam = getTableValue(table, "y"); yparam = getTableValue(table, "y");
zparam = getTableValue(table, "z"); zparam = getTableValue(table, "z");
if (!lua_isnumber(xparam) || !lua_isnumber(yparam) || !lua_isnumber(zparam)) if (!lua_isnumber(xparam) || !lua_isnumber(yparam) || !lua_isnumber(zparam))
error("tableToVector passed a LUA table that does not contain vector coordinates!"); error("tableToVector passed a LUA table that does not contain vector coordinates!");
x = lua_getnumber(xparam); x = lua_getnumber(xparam);
y = lua_getnumber(yparam); y = lua_getnumber(yparam);
z = lua_getnumber(zparam); z = lua_getnumber(zparam);

View file

@ -311,7 +311,7 @@ void lua_Restore(RestoreStream restoreStream, RestoreSint32 restoreSint32, Resto
arraysObj->object = tempClosure; arraysObj->object = tempClosure;
arraysObj++; arraysObj++;
} }
Hash *tempHash; Hash *tempHash;
arraysObj = (ArrayIDObj *)luaM_malloc(sizeof(ArrayIDObj) * arrayHashTablesCount); arraysObj = (ArrayIDObj *)luaM_malloc(sizeof(ArrayIDObj) * arrayHashTablesCount);
arrayHashTables = arraysObj; arrayHashTables = arraysObj;

View file

@ -52,7 +52,7 @@ public:
public: public:
LuaFile(); LuaFile();
~LuaFile(); ~LuaFile();
void close(); void close();
bool isOpen() const; bool isOpen() const;
uint32 read(void *buf, uint32 len); uint32 read(void *buf, uint32 len);

View file

@ -44,8 +44,8 @@ void Matrix3::buildFromPitchYawRoll(float pitch, float yaw, float roll) {
(*this) *= temp2; (*this) *= temp2;
} }
#define DEGTORAD(a) (a * LOCAL_PI / 180.0) #define DEGTORAD(a) (a * LOCAL_PI / 180.0)
#define RADTODEG(a) (a * 180.0 / LOCAL_PI) #define RADTODEG(a) (a * 180.0 / LOCAL_PI)
float RadianToDegree(float rad) { float RadianToDegree(float rad) {
return (float)RADTODEG(rad); return (float)RADTODEG(rad);

View file

@ -480,7 +480,7 @@ void Model::HierNode::setMatrix(Matrix4 matrix) {
void Model::HierNode::update() { void Model::HierNode::update() {
if (!_initialized) if (!_initialized)
return; return;
_localMatrix._pos.set(_animPos.x() / _totalWeight, _animPos.y() / _totalWeight, _animPos.z() / _totalWeight); _localMatrix._pos.set(_animPos.x() / _totalWeight, _animPos.y() / _totalWeight, _animPos.z() / _totalWeight);
_localMatrix._rot.buildFromPitchYawRoll(_animPitch / _totalWeight, _animYaw / _totalWeight, _animRoll / _totalWeight); _localMatrix._rot.buildFromPitchYawRoll(_animPitch / _totalWeight, _animYaw / _totalWeight, _animRoll / _totalWeight);

View file

@ -234,7 +234,7 @@ LipSync *ResourceLoader::loadLipSync(const char *filename) {
result = NULL; result = NULL;
} else { } else {
result = new LipSync(filename, b->data(), b->len()); result = new LipSync(filename, b->data(), b->len());
// Some lipsync files have no data // Some lipsync files have no data
if (result->isValid()) { if (result->isValid()) {
delete b; delete b;
@ -243,7 +243,7 @@ LipSync *ResourceLoader::loadLipSync(const char *filename) {
delete result; delete result;
result = NULL; result = NULL;
} }
} }
return result; return result;
} }
@ -285,7 +285,7 @@ Model *ResourceLoader::loadModel(const char *filename, const CMap &c) {
bool ResourceLoader::exportResource(const char *filename) { bool ResourceLoader::exportResource(const char *filename) {
FILE *myFile = fopen(filename, "w"); FILE *myFile = fopen(filename, "w");
Block *b = getFileBlock(filename); Block *b = getFileBlock(filename);
if (!b) if (!b)
return false; return false;
fwrite(b->data(), b->len(), 1, myFile); fwrite(b->data(), b->len(), 1, myFile);

View file

@ -80,7 +80,7 @@ Scene::Scene(const char *name, const char *buf, int len) :
// Calculate the number of sectors // Calculate the number of sectors
ts.expectString("section: sectors"); ts.expectString("section: sectors");
if (ts.eof()) // Sectors are optional, but section: doesn't seem to be if (ts.eof()) // Sectors are optional, but section: doesn't seem to be
return; return;
int sectorStart = ts.getLineNumber(); int sectorStart = ts.getLineNumber();
@ -170,7 +170,7 @@ void Scene::Light::load(TextSplitter &ts) {
ts.scanString(" intensity %f", 1, &_intensity); ts.scanString(" intensity %f", 1, &_intensity);
ts.scanString(" umbraangle %f", 1, &_umbraangle); ts.scanString(" umbraangle %f", 1, &_umbraangle);
ts.scanString(" penumbraangle %f", 1, &_penumbraangle); ts.scanString(" penumbraangle %f", 1, &_penumbraangle);
int r, g, b; int r, g, b;
ts.scanString(" color %d %d %d", 3, &r, &g, &b); ts.scanString(" color %d %d %d", 3, &r, &g, &b);
_color.red() = r; _color.red() = r;
@ -258,7 +258,7 @@ ObjectState *Scene::findState(const char *filename) {
// Check the different state objects for the bitmap // Check the different state objects for the bitmap
for (StateList::iterator i = _states.begin(); i != _states.end(); i++) { for (StateList::iterator i = _states.begin(); i != _states.end(); i++) {
const char *file = (*i)->bitmapFilename(); const char *file = (*i)->bitmapFilename();
if (strcmp(file, filename) == 0) if (strcmp(file, filename) == 0)
return *i; return *i;
if (strcasecmp(file, filename) == 0) { if (strcasecmp(file, filename) == 0) {

View file

@ -76,7 +76,7 @@ public:
int getSectorCount() { int getSectorCount() {
return _numSectors; return _numSectors;
} }
Sector *getSectorBase(int id) { Sector *getSectorBase(int id) {
if ((_numSectors >= 0) && (id < _numSectors)) if ((_numSectors >= 0) && (id < _numSectors))
return &_sectors[id]; return &_sectors[id];
else else

View file

@ -226,7 +226,7 @@ void Blocky16::makeTablesInterpolation(int param) {
} else { } else {
b2 = 4; b2 = 4;
} }
memset(tableSmallBig, 0, param * param * 4); memset(tableSmallBig, 0, param * param * 4);
variable2 = abs(value_table47_2_2 - value_table47_2_1); variable2 = abs(value_table47_2_2 - value_table47_2_1);
@ -353,7 +353,7 @@ void Blocky16::makeTables47(int width) {
_tableBig[128 + a + d * 2] = (byte)tmp; _tableBig[128 + a + d * 2] = (byte)tmp;
_tableBig[128 + a + d * 2 + 1] = tmp >> 8; _tableBig[128 + a + d * 2 + 1] = tmp >> 8;
} }
a += 388; a += 388;
c += 128; c += 128;
} while (c < 32768); } while (c < 32768);
@ -379,11 +379,11 @@ void Blocky16::level3(byte *d_dst) {
d_dst += _d_pitch; d_dst += _d_pitch;
} }
} else if ((code == 0xFF) || (code == 0xF8)) { } else if ((code == 0xFF) || (code == 0xF8)) {
WRITE_2X1_LINE(d_dst + 0, READ_LE_UINT16(_d_src + 0)); WRITE_2X1_LINE(d_dst + 0, READ_LE_UINT16(_d_src + 0));
WRITE_2X1_LINE(d_dst + 2, READ_LE_UINT16(_d_src + 2)); WRITE_2X1_LINE(d_dst + 2, READ_LE_UINT16(_d_src + 2));
d_dst += _d_pitch; d_dst += _d_pitch;
WRITE_2X1_LINE(d_dst + 0, READ_LE_UINT16(_d_src + 4)); WRITE_2X1_LINE(d_dst + 0, READ_LE_UINT16(_d_src + 4));
WRITE_2X1_LINE(d_dst + 2, READ_LE_UINT16(_d_src + 6)); WRITE_2X1_LINE(d_dst + 2, READ_LE_UINT16(_d_src + 6));
_d_src += 8; _d_src += 8;
} else if (code == 0xFD) { } else if (code == 0xFD) {
t = *_d_src++; t = *_d_src++;
@ -420,7 +420,7 @@ void Blocky16::level3(byte *d_dst) {
t = READ_LE_UINT16(_paramPtr + code * 2); t = READ_LE_UINT16(_paramPtr + code * 2);
t = (t << 16) | t; t = (t << 16) | t;
for (i = 0; i < 2; i++) { for (i = 0; i < 2; i++) {
WRITE_4X1_LINE(d_dst + 0, t); WRITE_4X1_LINE(d_dst + 0, t);
d_dst += _d_pitch; d_dst += _d_pitch;
} }
} }
@ -476,7 +476,7 @@ void Blocky16::level2(byte *d_dst) {
byte l = tmp_ptr[96]; byte l = tmp_ptr[96];
int16 *tmp_ptr2 = (int16 *)tmp_ptr; int16 *tmp_ptr2 = (int16 *)tmp_ptr;
while (l--) { while (l--) {
WRITE_2X1_LINE(d_dst + READ_LE_UINT16(tmp_ptr2) * 2, val); WRITE_2X1_LINE(d_dst + READ_LE_UINT16(tmp_ptr2) * 2, val);
tmp_ptr2++; tmp_ptr2++;
} }
l = tmp_ptr[97]; l = tmp_ptr[97];
@ -568,7 +568,7 @@ void Blocky16::level1(byte *d_dst) {
val >>= 16; val >>= 16;
tmp_ptr2 = (int16 *)(tmp_ptr + 128); tmp_ptr2 = (int16 *)(tmp_ptr + 128);
while (l--) { while (l--) {
WRITE_2X1_LINE(d_dst + READ_LE_UINT16(tmp_ptr2) * 2, val); WRITE_2X1_LINE(d_dst + READ_LE_UINT16(tmp_ptr2) * 2, val);
tmp_ptr2++; tmp_ptr2++;
} }
} else if (code >= 0xF9) { } else if (code >= 0xF9) {
@ -703,7 +703,7 @@ static byte bompDecode() {
if (bomp_num == 0) { if (bomp_num == 0) {
bomp_left = 2; bomp_left = 2;
} }
return result; return result;
} }
@ -749,7 +749,7 @@ void Blocky16::decode(byte *dst, const byte *src) {
*(uint16 *)(ptr1++) = val; *(uint16 *)(ptr1++) = val;
*(uint16 *)(ptr2++) = val; *(uint16 *)(ptr2++) = val;
}; };
} }
_prevSeqNb = -1; _prevSeqNb = -1;
} }
@ -771,7 +771,7 @@ void Blocky16::decode(byte *dst, const byte *src) {
if (seq_nb == _prevSeqNb + 1) { if (seq_nb == _prevSeqNb + 1) {
decode2(_curBuf, gfx_data, _width, _height, src + 24, src + 40); decode2(_curBuf, gfx_data, _width, _height, src + 24, src + 40);
} }
break; break;
case 3: case 3:
memcpy(_curBuf, _deltaBufs[1], _frameSize); memcpy(_curBuf, _deltaBufs[1], _frameSize);

View file

@ -109,7 +109,7 @@ void Smush::deinit() {
_videoLooping = false; _videoLooping = false;
_videoFinished = true; _videoFinished = true;
_videoPause = true; _videoPause = true;
_file.close(); _file.close();
} }
void Smush::handleWave(const byte *src, uint32 size) { void Smush::handleWave(const byte *src, uint32 size) {
@ -157,7 +157,7 @@ void Smush::handleFrame() {
if (tag == MKID_BE('ANNO')) { if (tag == MKID_BE('ANNO')) {
char *anno; char *anno;
byte *data; byte *data;
size = _file.readUint32BE(); size = _file.readUint32BE();
data = new byte[size]; data = new byte[size];
_file.read(data, size); _file.read(data, size);
@ -303,9 +303,9 @@ bool Smush::setupAnim(const char *file, int x, int y) {
return true; return true;
} }
void Smush::stop() { void Smush::stop() {
deinit(); deinit();
g_engine->setMode(ENGINE_MODE_NORMAL); g_engine->setMode(ENGINE_MODE_NORMAL);
} }
bool Smush::play(const char *filename, int x, int y) { bool Smush::play(const char *filename, int x, int y) {
@ -313,7 +313,7 @@ bool Smush::play(const char *filename, int x, int y) {
if (debugLevel == DEBUG_SMUSH) if (debugLevel == DEBUG_SMUSH)
printf("Playing video '%s'.\n", filename); printf("Playing video '%s'.\n", filename);
// Load the video // Load the video
if (!setupAnim(filename, x, y)) if (!setupAnim(filename, x, y))
return false; return false;
@ -335,7 +335,7 @@ zlibFile::~zlibFile() {
close(); close();
} }
struct SavePos *zlibFile::getPos() { struct SavePos *zlibFile::getPos() {
struct SavePos *pos; struct SavePos *pos;
uint32 position = _handle->pos(); uint32 position = _handle->pos();
@ -352,7 +352,7 @@ struct SavePos *zlibFile::getPos() {
return pos; return pos;
} }
bool zlibFile::setPos(struct SavePos *pos) { bool zlibFile::setPos(struct SavePos *pos) {
if (!pos) { if (!pos) {
warning("Unable to rewind SMUSH movie (no position passed)!"); warning("Unable to rewind SMUSH movie (no position passed)!");
return false; return false;
@ -503,7 +503,7 @@ uint32 zlibFile::read(void *ptr, uint32 len) {
return (uint32)(len - _stream.avail_out); return (uint32)(len - _stream.avail_out);
} }
byte zlibFile::readByte() { byte zlibFile::readByte() {
unsigned char c; unsigned char c;

View file

@ -75,7 +75,7 @@ private:
Audio::SoundHandle _soundHandle; Audio::SoundHandle _soundHandle;
Audio::AppendableAudioStream *_stream; Audio::AppendableAudioStream *_stream;
int32 _frame; int32 _frame;
bool _updateNeeded; bool _updateNeeded;
int32 _speed; int32 _speed;
int32 _movieTime; int32 _movieTime;

View file

@ -223,7 +223,7 @@ void TextObject::draw() {
if (y < 0) if (y < 0)
y = 0; y = 0;
if (_justify == LJUSTIFY || _justify == NONE) if (_justify == LJUSTIFY || _justify == NONE)
g_driver->drawTextBitmap(_x, height + y, _textObjectHandle[i]); g_driver->drawTextBitmap(_x, height + y, _textObjectHandle[i]);
else if (_justify == CENTER) { else if (_justify == CENTER) {

View file

@ -64,7 +64,7 @@ int residual_vsscanf(const char *str, int field_count, const char *format, va_li
TextSplitter::TextSplitter(const char *data, int len) { TextSplitter::TextSplitter(const char *data, int len) {
char *line, *tmpData; char *line, *tmpData;
int i; int i;
tmpData = new char[len + 1]; tmpData = new char[len + 1];
std::memcpy(tmpData, data, len); std::memcpy(tmpData, data, len);
tmpData[len] = '\0'; tmpData[len] = '\0';
@ -159,7 +159,7 @@ void TextSplitter::processLine() {
void TextSplitter::TextLines::setData(char *data, int length) { void TextSplitter::TextLines::setData(char *data, int length) {
int _lineLength = length; int _lineLength = length;
_lineData = new char[_lineLength]; _lineData = new char[_lineLength];
std::memcpy(_lineData, data, _lineLength); std::memcpy(_lineData, data, _lineLength);
_lineData[_lineLength-1] = 0; _lineData[_lineLength-1] = 0;

View file

@ -97,7 +97,7 @@ public:
float a = x() / magnitude(); float a = x() / magnitude();
float b = y() / magnitude(); float b = y() / magnitude();
float yaw; float yaw;
// find the angle on the upper half of the unit circle // find the angle on the upper half of the unit circle
yaw = std::acos(a) * (180.0f / LOCAL_PI); yaw = std::acos(a) * (180.0f / LOCAL_PI);
if (b < 0.0f) if (b < 0.0f)

View file

@ -22,7 +22,7 @@
extern const char *gResidualVersion; // e.g. "0.0.6" extern const char *gResidualVersion; // e.g. "0.0.6"
extern const char *gResidualBuildDate; // e.g. "2008-06-15" extern const char *gResidualBuildDate; // e.g. "2008-06-15"
extern const char *gResidualVersionDate; // e.g. "0.0.6 (2008-06-15)" extern const char *gResidualVersionDate; // e.g. "0.0.6 (2008-06-15)"
extern const char *gResidualFullVersion; // e.g. "Residual 0.0.6 (2008-06-15)" extern const char *gResidualFullVersion; // e.g. "Residual 0.0.6 (2008-06-15)"
extern const char *gResidualFeatures; // e.g. "ALSA MPEG2 zLib" extern const char *gResidualFeatures; // e.g. "ALSA MPEG2 zLib"

View file

@ -108,14 +108,14 @@ bool Sector::isPointInSector(Vector3d point) const {
// z-coordinates so the railing in Cafe Calavera works properly. // z-coordinates so the railing in Cafe Calavera works properly.
if (_height != 0.0f && _height != 9999.0f) { if (_height != 0.0f && _height != 9999.0f) {
bool heightOK = false; bool heightOK = false;
// Handle height above Z // Handle height above Z
if ((point.z() >= _vertices[0].z()) && (point.z() <= _vertices[0].z() + _height)) if ((point.z() >= _vertices[0].z()) && (point.z() <= _vertices[0].z() + _height))
heightOK = true; heightOK = true;
// Handle height below Z // Handle height below Z
if ((point.z() <= _vertices[0].z()) && (point.z() >= _vertices[0].z() - _height)) if ((point.z() <= _vertices[0].z()) && (point.z() >= _vertices[0].z() - _height))
heightOK = true; heightOK = true;
for (int i = 0; i < _numVertices; i++) { for (int i = 0; i < _numVertices; i++) {
if (_vertices[i + 1].z() != _vertices[i].z()) if (_vertices[i + 1].z() != _vertices[i].z())
heightOK = true; heightOK = true;

View file

@ -32,7 +32,7 @@
class TextSplitter; class TextSplitter;
class Sector { class Sector {
public: public:
Sector() : _vertices(0) {} Sector() : _vertices(0) {}
~Sector() { if (_vertices) delete[] _vertices; } ~Sector() { if (_vertices) delete[] _vertices; }