/* 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; }
/* 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; }
/* 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; }
/* 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; }
/* 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; }
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; }
/* 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; }
/* 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; }
/* 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; }
/* 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; }
/* 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; }
/* 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; }
/* 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; }
/* 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; }
/* 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; }