Exemplo n.º 1
0
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);
}
Exemplo n.º 2
0
void FightsManager::setupPigFight() {
	Resources &res = Resources::getReference();
	Hotspot *player = res.getActiveHotspot(PLAYER_ID);
	player->setSkipFlag(false);
	player->resource()->colorOffset = 16;
	player->setTickProc(PLAYER_FIGHT_TICK_PROC_ID);
	player->setSize(48, 53);
	player->setAnimationIndex(PLAYER_FIGHT_ANIM_INDEX);
	player->resource()->width = 48;
	player->resource()->height = 53;

	player->setOccupied(false);
	player->setPosition(262, 94);
	FighterRecord &rec = getDetails(PLAYER_ID);
	rec.fwhits = 0;
	rec.fwtrue_x = 262;
	rec.fwtrue_y = 53;
	rec.fwseq_ad = FIGHT_PLAYER_INIT;
	rec.fwenemy_ad = PIG_ID;
}