COXFileWatcher::~COXFileWatcher()
{
	// Will stop thread if it's running and will delete handles
	RemoveAllWatches();		
	// ... m_pWatcherThread may already be NULL
	delete m_pWatcherThread;
}
示例#2
0
void GrafxMakeRandomBackground(
	GraphicsDevice *device,
	CampaignOptions *co, struct MissionOptions *mo, Map *map)
{
	HSV tint;
	CampaignSettingInit(&co->Setting);
	ActorsInit();
	ObjsInit();
	MobObjsInit();
	SetupQuickPlayCampaign(&co->Setting, &gConfig.QuickPlay);
	co->seed = rand();
	tint.h = rand() * 360.0 / RAND_MAX;
	tint.s = rand() * 1.0 / RAND_MAX;
	tint.v = 0.5;
	DrawBuffer buffer;
	DrawBufferInit(&buffer, Vec2iNew(X_TILES, Y_TILES), device);
	co->MissionIndex = 0;
	GrafxMakeBackground(
		device, &buffer, co, mo, map,
		tint, 0, 1, Vec2iCenterOfTile(Vec2iScaleDiv(map->Size, 2)), NULL);
	DrawBufferTerminate(&buffer);
	ActorsTerminate();
	ObjsTerminate();
	MobObjsTerminate();
	RemoveAllWatches();
	MissionOptionsTerminate(mo);
	CampaignSettingTerminate(&co->Setting);
	co->seed = gConfig.Game.RandomSeed;
}
void COXFileWatcher::Empty()
{
	RemoveAllWatches();
	m_arFileWatchNotifiers.DeleteAll();
}
示例#4
0
void FreeTriggersAndWatches(void)
{
	RemoveAllTriggers();
	RemoveAllWatches();
}