Exemple #1
0
void LocationParser_ns::parseGetData(ZonePtr z) {
	TypeData *data = &z->u;
	if (!scumm_stricmp(_tokens[0], "file")) {
		GfxObj *obj = _vm->_gfx->loadGet(_tokens[1]);
		obj->frame = 0;
		obj->x = z->getX();
		obj->y = z->getY();
		obj->_prog = _zoneProg;

		// WORKAROUND for script bug #2969913
		// The katana object has the same default z index (kGfxObjGetZ or -100)
		// as the cripta object (the safe) - a script bug.
		// Game scripts do not set an explicit z for the katana (as it isn't an
		// animation), but rather rely on the draw order to draw it over the
		// safe. In this particular case, the safe is added to the scene after
		// the katana, thus it is drawn over the katana. We explicitly set the
		// z index of the katana to be higher than the safe, so that the katana
		// is drawn correctly over it.
		// This is a regression from the graphics rewrite (commits be2c5d3,
		// 3c2c16c and 44906f5).
		if (!scumm_stricmp(obj->getName(), "katana"))
			obj->z = 0;

		bool visible = (z->_flags & kFlagsRemove) == 0;
		_vm->_gfx->showGfxObj(obj, visible);
		data->_gfxobj = obj;
	} else
	if (!scumm_stricmp(_tokens[0], "icon")) {
		data->_getIcon = 4 + _vm->_objectsNames->lookup(_tokens[1]);
	}
}
Exemple #2
0
bool Debugger::Cmd_GfxObjects(int argc, const char **argv) {

	const char *objType[] = { "DOOR", "GET", "ANIM" };

	DebugPrintf("+--------------------+-----+-----+-----+-----+-----+-------+-----+--------+\n"
				"| name               |  x  |  y  |  w  |  h  |  z  | layer |  f  |  type  |\n"
				"+--------------------+-----+-----+-----+-----+-----+-------+-----+--------+\n");

	GfxObjArray::iterator b = _vm->_gfx->_sceneObjects.begin();
	GfxObjArray::iterator e = _vm->_gfx->_sceneObjects.end();
	Common::Rect r;

	for ( ; b != e; ++b) {
		GfxObj *obj = *b;
		obj->getRect(obj->frame, r);
		DebugPrintf("|%-20s|%5i|%5i|%5i|%5i|%5i|%7i|%5i|%8s|\n", obj->getName(), r.left, r.top, r.width(), r.height(),
			obj->z, obj->layer, obj->frame, objType[obj->type]);
	}

	DebugPrintf("+--------------------+-----+-----+-----+-----+-----+-------+-----+--------+\n");

	return true;
}
Exemple #3
0
	IngameMenuInputState_BR(Parallaction_br *vm, MenuInputHelper *helper) : MenuInputState("ingamemenu", helper), _vm(vm) {
		Frames *menuFrames = _vm->_disk->loadFrames("request.win");
		assert(menuFrames);
		_menuObj = new GfxObj(kGfxObjTypeMenu, menuFrames, "ingamemenu");

		Frames *mscFrames = _vm->_disk->loadFrames("onoff.win");
		assert(mscFrames);
		_mscMenuObj = new GfxObj(kGfxObjTypeMenu, mscFrames, "msc");

		Frames *sfxFrames = _vm->_disk->loadFrames("sfx.win");
		assert(sfxFrames);
		_sfxMenuObj = new GfxObj(kGfxObjTypeMenu, sfxFrames, "sfx");

		_menuObj->getRect(0, _menuRect);
		_cellW = _menuRect.width() / 3;
		_cellH = _menuRect.height() / 2;
	}