当前位置: 首页>>代码示例>>C++>>正文


C++ Hotspot类代码示例

本文整理汇总了C++中Hotspot的典型用法代码示例。如果您正苦于以下问题:C++ Hotspot类的具体用法?C++ Hotspot怎么用?C++ Hotspot使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了Hotspot类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: remoteRoomViewSetup

void Script::remoteRoomViewSetup(uint16 v1, uint16 v2, uint16 v3) {
	Hotspot *player = Resources::getReference().getActiveHotspot(PLAYER_ID);

	player->setTickProc(NULL_TICK_PROC_ID);
	Resources::getReference().fieldList().setField(OLD_ROOM_NUMBER,
		player->roomNumber());
}
开发者ID:Bundesdrucker,项目名称:scummvm,代码行数:7,代码来源:scripts.cpp

示例2: pauseRatpouch

void Script::pauseRatpouch(uint16 v1, uint16 v2, uint16 v3) {
	Resources &res = Resources::getReference();
	Hotspot *ratpouch = res.getActiveHotspot(RATPOUCH_ID);
	assert(ratpouch);
	ratpouch->setCharacterMode(CHARMODE_PAUSED);
	ratpouch->setDelayCtr(0x7fff);
}
开发者ID:Bundesdrucker,项目名称:scummvm,代码行数:7,代码来源:scripts.cpp

示例3: assert

void Script::startSpeakingToNoone(uint16 characterId, uint16 stringId, uint16 v3) {
	Resources &res = Resources::getReference();
	Hotspot *charHotspot = res.getActiveHotspot(characterId);
	assert(charHotspot);

	charHotspot->converse(NOONE_ID, stringId, true);
}
开发者ID:Bundesdrucker,项目名称:scummvm,代码行数:7,代码来源:scripts.cpp

示例4: cutSack

void Script::cutSack(uint16 hotspotId, uint16 v2, uint16 v3) {
	Resources &res = Resources::getReference();
	HotspotData *data = res.getHotspot(SACK_ID);
	data->startY = 138;
	Hotspot *activeHotspot = res.getActiveHotspot(SACK_ID);
	if (activeHotspot)
		activeHotspot->setPosition(data->startX, data->startY);
}
开发者ID:Bundesdrucker,项目名称:scummvm,代码行数:8,代码来源:scripts.cpp

示例5: resetPathfinder

void Script::resetPathfinder(uint16 v1, uint16 v2, uint16 v3) {
	// Reset the pathfinding for any characters
	Resources &res = Resources::getReference();

	for (uint16 charId = PLAYER_ID + 1; charId < FIRST_NONCHARACTER_ID; ++charId) {
		Hotspot *charHotspot = res.getActiveHotspot(charId);
		if (charHotspot) charHotspot->pathFinder().clear();
	}
}
开发者ID:Bundesdrucker,项目名称:scummvm,代码行数:9,代码来源:scripts.cpp

示例6:

Hotspot *Resources::getActiveHotspot(uint16 hotspotId) {
	HotspotList::iterator i;

	for (i = _activeHotspots.begin(); i != _activeHotspots.end(); ++i) {
		Hotspot *rec = (*i).get();
		if (rec->hotspotId() == hotspotId) return rec;
	}

	return NULL;
}
开发者ID:,项目名称:,代码行数:10,代码来源:

示例7: setNewSupportData

void Script::setNewSupportData(uint16 index, uint16 hotspotId, uint16 v3) {
	Resources &res = Resources::getReference();
	uint16 dataId = res.getCharOffset(index);
	CharacterScheduleEntry *entry = res.charSchedules().getEntry(dataId);

	Hotspot *h = res.getActiveHotspot(hotspotId);
	h->setBlockedFlag(false);
	h->currentActions().addFront(DISPATCH_ACTION, entry, h->roomNumber());
	h->setActionCtr(0);
}
开发者ID:Bundesdrucker,项目名称:scummvm,代码行数:10,代码来源:scripts.cpp

示例8: setBlockingHotspotScript

void Script::setBlockingHotspotScript(uint16 charId, uint16 scriptIndex, uint16 v3) {
	Resources &r = Resources::getReference();
	uint16 offset = r.getHotspotScript(scriptIndex);

	if (charId == PLAYER_ID)
		Room::getReference().setCursorState(CS_SEQUENCE);

	Hotspot *hs = r.getActiveHotspot(charId);
	hs->setHotspotScript(offset);
	hs->currentActions().top().setAction(EXEC_HOTSPOT_SCRIPT);
	hs->setOccupied(true);
}
开发者ID:Bundesdrucker,项目名称:scummvm,代码行数:12,代码来源:scripts.cpp

示例9: barmanServe

void Script::barmanServe(uint16 v1, uint16 v2, uint16 v3) {
	Resources &res = Resources::getReference();
	Hotspot *player = res.getActiveHotspot(PLAYER_ID);
	BarEntry &barEntry = res.barmanLists().getDetails(player->roomNumber());

	for (int index = 0; index < NUM_SERVE_CUSTOMERS; ++index) {
		if (barEntry.customers[index].hotspotId == PLAYER_ID) {
			barEntry.customers[index].serveFlags |= 5;
			break;
		}
	}
}
开发者ID:Bundesdrucker,项目名称:scummvm,代码行数:12,代码来源:scripts.cpp

示例10: ratpouchPushBricks

void Script::ratpouchPushBricks(uint16 v1, uint16 v2, uint16 v3) {
	Resources &res = Resources::getReference();

	// Mark the bricks exit as now open
	RoomExitJoinData *joinRec = res.getExitJoin(BRICKS_ID);
	joinRec->blocked = 0;

	// Set Ratpouch moving through the new exit to room #7
	Hotspot *ratpouchHotspot = res.getActiveHotspot(RATPOUCH_ID);
	ratpouchHotspot->setActions(0); // Make sure he can't be interrupted
	ratpouchHotspot->currentActions().clear();
	ratpouchHotspot->currentActions().addBack(DISPATCH_ACTION, 7);
}
开发者ID:Bundesdrucker,项目名称:scummvm,代码行数:13,代码来源:scripts.cpp

示例11: setHotspotScript

void Script::setHotspotScript(uint16 hotspotId, uint16 scriptIndex, uint16 v3) {
	Resources &res = Resources::getReference();
	uint16 offset = res.getHotspotScript(scriptIndex);
	Hotspot *hotspot = res.getActiveHotspot(hotspotId);

	if (hotspot != NULL) {
		hotspot->setHotspotScript(offset);
	} else {
		HotspotData *hs = res.getHotspot(hotspotId);
		assert(hs);
		hs->hotspotScriptOffset = offset;
	}
}
开发者ID:Bundesdrucker,项目名称:scummvm,代码行数:13,代码来源:scripts.cpp

示例12: transformPlayer

void Script::transformPlayer(uint16 v1, uint16 v2, uint16 v3) {
	Resources &res = Resources::getReference();
	HotspotData *hotspot = res.getHotspot(TRANSFORM_ID);
	HotspotData *player = res.getHotspot(PLAYER_ID);

	hotspot->roomNumber = player->roomNumber;
	hotspot->startX = player->startX - 14;
	hotspot->startY = player->startY - 10;

	Hotspot *activeHotspot = res.activateHotspot(TRANSFORM_ID);
	activeHotspot->setActionCtr(0);
	activeHotspot->setHotspotScript(0x630);
}
开发者ID:Bundesdrucker,项目名称:scummvm,代码行数:13,代码来源:scripts.cpp

示例13: setupSkorlFight

void FightsManager::setupSkorlFight() {
	Resources &res = Resources::getReference();
	Hotspot *player = res.getActiveHotspot(PLAYER_ID);
	FighterRecord &rec = getDetails(PLAYER_ID);

	setupPigFight();

	rec.fwenemy_ad = SKORL_FIGHTER_ID;
	rec.fwweapon = 0x445;
	rec.fwtrue_x = 282;
	rec.fwtrue_y = 136;
	player->setPosition(282, 136);
	player->resource()->colorOffset = 96;
}
开发者ID:AReim1982,项目名称:scummvm,代码行数:14,代码来源:fights.cpp

示例14: while

void Resources::deactivateHotspot(uint16 hotspotId, bool isDestId) {
	HotspotList::iterator i = _activeHotspots.begin();

	while (i != _activeHotspots.end()) {
		Hotspot *h = (*i).get();
		if ((!isDestId && (h->hotspotId() == hotspotId)) ||
			(isDestId && (h->destHotspotId() == hotspotId) && (h->hotspotId() == 0xffff))) {
			_activeHotspots.erase(i);
			break;
		}

		i++;
	}
}
开发者ID:,项目名称:,代码行数:14,代码来源:

示例15: fixGoewin

void Script::fixGoewin(uint16 v1, uint16 v2, uint16 v3) {
	Resources &res = Resources::getReference();
	Hotspot *hotspot = res.getActiveHotspot(GOEWIN_ID);
	assert(hotspot);
	hotspot->setTickProc(STANDARD_CHARACTER_TICK_PROC);

	CharacterScheduleEntry *entry = res.charSchedules().getEntry(GOEWIN_STANDARD_SUPPORT_ID);
	assert(entry);
	hotspot->currentActions().clear();
	hotspot->currentActions().addFront(DISPATCH_ACTION, entry, hotspot->roomNumber());

	hotspot->setActions(hotspot->resource()->actions & ~(1 << (TELL - 1)));
	hotspot->setActionCtr(0);
	hotspot->setDelayCtr(0);
	hotspot->setCharacterMode(CHARMODE_NONE);
}
开发者ID:Bundesdrucker,项目名称:scummvm,代码行数:16,代码来源:scripts.cpp


注:本文中的Hotspot类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。