src/wavegens.cpp
// This function sets all the wave generators up, in their
// original positions.
// Everything related to wave gens initialization is here.

This function sets all the wave generators up, in their
original positions.
Everything related to wave gens initialization is here.
This function sets all the wave generators up in their original positions . Everything related to wave gens initialization is here .
bool createWaveGenObjects()
{
	waveGenUnitStruct waveGenData;
	waveGenList.resetList();
	setupWaveGenUnit(waveGenData, FILE_GAMEDATA_WAVEGEN_WHITESHEEPS);
	waveGenData.generatingNow=true;
	waveGenData.isPosRelative=true;
	waveGenData.xFromCamera=
		scriptMan.getIntVariable("wSheepGenX");
	waveGenData.yFromCamera=
				scriptMan.getIntVariable("wSheepGenY");
	waveGenData.x=waveGenData.xFromCamera;
	waveGenData.y=waveGenData.yFromCamera;
	if (!waveGenList.isValidIndex(waveGenList.addNode(waveGenData))) {
		logger.logLine("Failed adding node to waveGenList");
		return false;
	}
	setupWaveGenUnit(waveGenData, FILE_GAMEDATA_WAVEGEN_BLACKSHEEPS);
	waveGenData.generatingNow=true;
	waveGenData.isPosRelative=true;
	waveGenData.xFromCamera=
		scriptMan.getIntVariable("bSheepGenX");
	waveGenData.yFromCamera=
		scriptMan.getIntVariable("bSheepGenY");
	waveGenData.x=waveGenData.xFromCamera;
	waveGenData.y=waveGenData.yFromCamera;
	if (!waveGenList.isValidIndex(waveGenList.addNode(waveGenData))) {
		logger.logLine("Failed adding node to waveGenList");
		return false;
	}
	setupWaveGenUnit(waveGenData, FILE_GAMEDATA_WAVEGEN_HUMANHEADS);
	waveGenData.generatingNow=true;
	waveGenData.isPosRelative=true;
	waveGenData.xFromCamera=
		scriptMan.getIntVariable("headGenX");
	waveGenData.yFromCamera=
		scriptMan.getIntVariable("headGenY");
	waveGenData.x=waveGenData.xFromCamera;
	waveGenData.y=waveGenData.yFromCamera;
	if (!waveGenList.isValidIndex(waveGenList.addNode(waveGenData))) {
		logger.logLine("Failed adding node to waveGenList");
		return false;
	}
	setupWaveGenUnit(waveGenData, FILE_GAMEDATA_WAVEGEN_SHEEPSOUT);
	waveGenData.generatingNow=false;
	waveGenData.isPosRelative=true;
	waveGenData.xFromCamera=
		scriptMan.getIntVariable("sheepsOutGenX");
	waveGenData.yFromCamera=
		scriptMan.getIntVariable("sheepsOutGenY");
	waveGenData.x=waveGenData.xFromCamera;
	waveGenData.y=waveGenData.yFromCamera;
	if (!waveGenList.isValidIndex(waveGenList.addNode(waveGenData))) {
		logger.logLine("Failed adding node to waveGenList");
		return false;
	}
	return true;
}
bool createWaveGenObjects ( ) { waveGenUnitStruct waveGenData ; waveGenList . resetList ( ) ; setupWaveGenUnit ( waveGenData , FILE_GAMEDATA_WAVEGEN_WHITESHEEPS ) ; waveGenData . generatingNow = true ; waveGenData . isPosRelative = true ; waveGenData . xFromCamera = scriptMan . getIntVariable ( " " ) ; waveGenData . yFromCamera = scriptMan . getIntVariable ( " " ) ; waveGenData . x = waveGenData . xFromCamera ; waveGenData . y = waveGenData . yFromCamera ; if ( ! waveGenList . isValidIndex ( waveGenList . addNode ( waveGenData ) ) ) { logger . logLine ( " " ) ; return false ; } setupWaveGenUnit ( waveGenData , FILE_GAMEDATA_WAVEGEN_BLACKSHEEPS ) ; waveGenData . generatingNow = true ; waveGenData . isPosRelative = true ; waveGenData . xFromCamera = scriptMan . getIntVariable ( " " ) ; waveGenData . yFromCamera = scriptMan . getIntVariable ( " " ) ; waveGenData . x = waveGenData . xFromCamera ; waveGenData . y = waveGenData . yFromCamera ; if ( ! waveGenList . isValidIndex ( waveGenList . addNode ( waveGenData ) ) ) { logger . logLine ( " " ) ; return false ; } setupWaveGenUnit ( waveGenData , FILE_GAMEDATA_WAVEGEN_HUMANHEADS ) ; waveGenData . generatingNow = true ; waveGenData . isPosRelative = true ; waveGenData . xFromCamera = scriptMan . getIntVariable ( " " ) ; waveGenData . yFromCamera = scriptMan . getIntVariable ( " " ) ; waveGenData . x = waveGenData . xFromCamera ; waveGenData . y = waveGenData . yFromCamera ; if ( ! waveGenList . isValidIndex ( waveGenList . addNode ( waveGenData ) ) ) { logger . logLine ( " " ) ; return false ; } setupWaveGenUnit ( waveGenData , FILE_GAMEDATA_WAVEGEN_SHEEPSOUT ) ; waveGenData . generatingNow = false ; waveGenData . isPosRelative = true ; waveGenData . xFromCamera = scriptMan . getIntVariable ( " " ) ; waveGenData . yFromCamera = scriptMan . getIntVariable ( " " ) ; waveGenData . x = waveGenData . xFromCamera ; waveGenData . y = waveGenData . yFromCamera ; if ( ! waveGenList . isValidIndex ( waveGenList . addNode ( waveGenData ) ) ) { logger . logLine ( " " ) ; return false ; } return true ; }
This function sets all the wave generators up, in their
original positions.
This function sets all the wave generators up in their original positions .
// Add our wave generators to the list
 // The distance between waves is set in the Staging Manager
 // Drop the existent wave gens from the list
 // WaveGen that creates white sheep carriers:
 // Basic info
 // Generation data
 // Set the relative position stuff (relative to camera)
 // are xFromCamera and yFromCamera used for relative position?
 // Coordinates
 // Add this node
 // WaveGen that creates black sheep carriers:
 // Basic info
 // Generation data
 // Set the relative position stuff (relative to camera)
 // are xFromCamera and yFromCamera used for relative position?
 // Coordinates
 // Add this node
 // WaveGen that creates human head carriers:
 // Basic info
 // Generation data
 // Set the relative position stuff (relative to camera)
 // are xFromCamera and yFromCamera used for relative position?
 // Coordinates
 // Add this node
 // WaveGen for sheeps to escape by:
 // Basic info
 // Generation data
 // Set the relative position stuff (relative to camera)
 // are xFromCamera and yFromCamera used for relative position?
 // Coordinates
 // Add this node
 // all ok
