Beispiel #1
0
/* Load the body stats */
static bool bufferSBODYLoad(const char* fileName, void** ppData)
{
	if (!loadBodyStats(fileName) || !allocComponentList(COMP_BODY, numBodyStats))
	{
		return false;
	}
	*ppData = (void *)1;
	return true;
}
Beispiel #2
0
/* Load the Brain stats */
static bool bufferSBRAINLoad(const char *fileName, void **ppData)
{
	if (!loadBrainStats(fileName) || !allocComponentList(COMP_BRAIN, numBrainStats))
	{
		return false;
	}
	//not interested in this value
	*ppData = NULL;
	return true;
}
Beispiel #3
0
/* Load the Repair stats */
static bool bufferSREPAIRLoad(const char *fileName, void **ppData)
{
	if (!loadRepairStats(fileName) || !allocComponentList(COMP_REPAIRUNIT, numRepairStats))
	{
		return false;
	}

	//not interested in this value
	*ppData = NULL;
	return true;
}
Beispiel #4
0
/* Load the Propulsion stats */
static bool bufferSPROPLoad(const char* fileName, void** ppData)
{
	if (!loadPropulsionStats(fileName) || !allocComponentList(COMP_PROPULSION, numPropulsionStats))
	{
		return false;
	}

	//not interested in this value
	*ppData = (void *)1;
	return true;
}
Beispiel #5
0
/* Load the body stats */
static bool bufferSBODYLoad(const char *fileName, void **ppData)
{
	WzConfig ini(fileName, WzConfig::ReadOnlyAndRequired);
	calcDataHash(ini, DATA_SBODY);

	if (!loadBodyStats(ini) || !allocComponentList(COMP_BODY, numBodyStats))
	{
		return false;
	}
	*ppData = (void *)1;
	return true;
}
Beispiel #6
0
static bool bufferSSENSORLoad(const char *fileName, void **ppData)
{
	if (!loadSensorStats(fileName)
	 || !allocComponentList(COMP_SENSOR, numSensorStats))
	{
	        return false;
	}

	//not interested in this value
	*ppData = NULL;
	return true;
}
Beispiel #7
0
/* Load the constructor stats */
static bool bufferSCONSTRLoad(const char *fileName, void **ppData)
{
	if (!loadConstructStats(fileName)
	 || !allocComponentList(COMP_CONSTRUCT, numConstructStats))
	{
		return false;
	}

	//not interested in this value
	*ppData = NULL;
	return true;
}
Beispiel #8
0
/* Load the Brain stats */
static bool bufferSBRAINLoad(const char *fileName, void **ppData)
{
	WzConfig ini(fileName, WzConfig::ReadOnlyAndRequired);
	calcDataHash(ini, DATA_SBRAIN);

	if (!loadBrainStats(ini) || !allocComponentList(COMP_BRAIN, numBrainStats))
	{
		return false;
	}
	//not interested in this value
	*ppData = nullptr;
	return true;
}
Beispiel #9
0
/* Load the Brain stats */
static bool bufferSBRAINLoad(const char *pBuffer, UDWORD size, void **ppData)
{
	calcDataHash((uint8_t *)pBuffer, size, DATA_SBRAIN);

	if (!loadBrainStats(pBuffer, size)
	 || !allocComponentList(COMP_BRAIN, numBrainStats))
	{
		return false;
	}

	//not interested in this value
	*ppData = NULL;
	return true;
}
Beispiel #10
0
/* Load the Repair stats */
static bool bufferSREPAIRLoad(const char *pBuffer, UDWORD size, void **ppData)
{
	calcDataHash((uint8_t *)pBuffer, size, DATA_SREPAIR);

	if (!loadRepairStats(pBuffer, size)
	 || !allocComponentList(COMP_REPAIRUNIT, numRepairStats))
	{
		return false;
	}

	//not interested in this value
	*ppData = NULL;
	return true;
}
Beispiel #11
0
/* Load the Sensor stats */
static bool bufferSSENSORLoad(const char *pBuffer, UDWORD size, void **ppData)
{
	calcDataHash((uint8_t *)pBuffer, size, DATA_SSENSOR);

	if (!loadSensorStats(pBuffer, size)
	 || !allocComponentList(COMP_SENSOR, numSensorStats))
	{
		return false;
	}

	//not interested in this value
	*ppData = NULL;
	return true;
}
Beispiel #12
0
/* Load the Propulsion stats */
static bool bufferSPROPLoad(const char *pBuffer, UDWORD size, void **ppData)
{
	calcDataHash((uint8_t *)pBuffer, size, DATA_SPROP);

	if (!loadPropulsionStats(pBuffer, size)
	 || !allocComponentList(COMP_PROPULSION, numPropulsionStats))
	{
		return false;
	}

	//not interested in this value
	*ppData = NULL;
	return true;
}
Beispiel #13
0
/* Load the constructor stats */
static bool bufferSCONSTRLoad(const char *pBuffer, UDWORD size, void **ppData)
{
	calcDataHash((uint8_t *)pBuffer, size, DATA_SCONSTR);

	if (!loadConstructStats(pBuffer, size)
	 || !allocComponentList(COMP_CONSTRUCT, numConstructStats))
	{
		return false;
	}

	//not interested in this value
	*ppData = NULL;
	return true;
}
Beispiel #14
0
/* Load the body stats */
static bool bufferSBODYLoad(const char *pBuffer, UDWORD size, void **ppData)
{
	calcDataHash((uint8_t *)pBuffer, size, DATA_SBODY);

	if (!loadBodyStats(pBuffer, size)
	 || !allocComponentList(COMP_BODY, numBodyStats))
	{
		return false;
	}

	// set a dummy value so the release function gets called
	*ppData = (void *)1;
	return true;
}
Beispiel #15
0
/* Load the Propulsion stats */
static bool bufferSPROPLoad(const char *fileName, void **ppData)
{
	WzConfig ini(fileName, WzConfig::ReadOnlyAndRequired);
	calcDataHash(ini, DATA_SPROP);

	if (!loadPropulsionStats(ini) || !allocComponentList(COMP_PROPULSION, numPropulsionStats))
	{
		return false;
	}

	//not interested in this value
	*ppData = (void *)1;
	return true;
}