本文整理汇总了C++中ZonePtr::getY方法的典型用法代码示例。如果您正苦于以下问题:C++ ZonePtr::getY方法的具体用法?C++ ZonePtr::getY怎么用?C++ ZonePtr::getY使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ZonePtr
的用法示例。
在下文中一共展示了ZonePtr::getY方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: parseGetData
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]);
}
}
示例2: parseDoorData
void LocationParser_br::parseDoorData(ZonePtr z) {
TypeData *data = &z->u;
if (!scumm_stricmp(_tokens[0], "slidetext")) {
_vm->_location._slideText[0] = _tokens[1];
_vm->_location._slideText[1] = _tokens[2];
} else
if (!scumm_stricmp(_tokens[0], "location")) {
data->_doorLocation = _tokens[1];
} else
if (!scumm_stricmp(_tokens[0], "file")) {
GfxObj *obj = _vm->_gfx->loadDoor(_tokens[1]);
obj->frame = z->_flags & kFlagsClosed ? 0 : 1;
obj->x = z->getX();
obj->y = z->getY();
_vm->_gfx->showGfxObj(obj, true);
data->_gfxobj = obj;
} else
if (!scumm_stricmp(_tokens[0], "startpos")) {
data->_doorStartPos.x = atoi(_tokens[1]);
data->_doorStartPos.y = atoi(_tokens[2]);
data->_doorStartFrame = atoi(_tokens[3]);
} else
if (!scumm_stricmp(_tokens[0], "startpos2")) {
data->_doorStartPos2_br.x = atoi(_tokens[1]);
data->_doorStartPos2_br.y = atoi(_tokens[2]);
data->_doorStartFrame2_br = atoi(_tokens[3]);
}
}
示例3: parseGetData
void LocationParser_br::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;
data->_gfxobj = obj;
} else
if (!scumm_stricmp(_tokens[0], "mask")) {
_out->_info->loadGfxObjMask(_tokens[1], data->_gfxobj);
} else
if (!scumm_stricmp(_tokens[0], "path")) {
_out->_info->loadGfxObjPath(_tokens[1], data->_gfxobj);
} else
if (!scumm_stricmp(_tokens[0], "icon")) {
data->_getIcon = 4 + _vm->_objectsNames->lookup(_tokens[1]);
}
}
示例4: drawZone
void Parallaction::drawZone(ZonePtr zone) {
if (!zone) {
return;
}
GfxObj *obj = 0;
if (ACTIONTYPE(zone) == kZoneGet) {
obj = zone->u._gfxobj;
} else if (ACTIONTYPE(zone) == kZoneDoor) {
obj = zone->u._gfxobj;
}
if (!obj) {
return;
}
obj->x = zone->getX();
obj->y = zone->getY();
_gfx->addObjectToScene(obj);
}
示例5: keepZone_ns
bool Location::keepZone_ns(ZonePtr z) {
return (z->getY() == -1) || (z->getX() == -2);
}