DIRECTOR: Lingo: Implemented 'the colorQD' and 'the colorDepth' entities

This commit is contained in:
Eugene Sandulenko 2016-09-01 18:47:04 +02:00
parent 91cc02b0ee
commit 2f16dabe57
4 changed files with 16 additions and 1 deletions

View File

@ -70,6 +70,8 @@ DirectorEngine::DirectorEngine(OSystem *syst, const DirectorGameDescription *gam
const Common::FSNode gameDataDir(ConfMan.get("path"));
SearchMan.addSubDirectoryMatching(gameDataDir, "data");
SearchMan.addSubDirectoryMatching(gameDataDir, "install");
_colorDepth = 8; // FIXME. Check if it is 8-bit
}
DirectorEngine::~DirectorEngine() {

View File

@ -96,6 +96,9 @@ public:
Common::RandomSource _rnd;
Graphics::MacWindowManager *_wm;
public:
int _colorDepth;
protected:
virtual Common::Error run();

View File

@ -428,7 +428,7 @@ void Frame::renderSprites(Graphics::ManagedSurface &surface, bool renderTrail) {
warning("Cast id %d not found", _sprites[i]->_castId);
continue;
} else {
warning("Getting cast id %d from shared cast");
warning("Getting cast id %d from shared cast", _sprites[i]->_castId);
cast = _vm->getSharedCasts()->getVal(_sprites[i]->_castId);
}
} else {

View File

@ -225,6 +225,10 @@ void Lingo::setTheEntity(int entity, Datum &id, int field, Datum &d) {
_floatPrecisionFormat = Common::String::format("%%.%df", _floatPrecision);
warning("set to %d: %s", _floatPrecision, _floatPrecisionFormat.c_str());
break;
case kTheColorDepth:
_vm->_colorDepth = d.toInt();
warning("STUB: Set color depth to %d", _vm->_colorDepth);
break;
default:
warning("Unprocessed setting field %d of entity %d", field, entity);
}
@ -361,6 +365,12 @@ Datum Lingo::getTheEntity(int entity, Datum &id, int field) {
d.type = FLOAT;
d.u.f = sqrt(id.u.f);
break;
case kTheColorQD:
push(Datum(1));
break;
case kTheColorDepth:
push(Datum(_vm->_colorDepth));
break;
default:
warning("Unprocessed getting field %d of entity %d", field, entity);
d.type = VOID;