/* Load the weapon stats */ static bool bufferSWEAPONLoad(const char *fileName, void **ppData) { if (!loadWeaponStats(fileName) || !allocComponentList(COMP_WEAPON, numWeaponStats)) { return false; } // not interested in this value *ppData = NULL; return true; }
/* Load the weapon stats */ static bool bufferSWEAPONLoad(const char *pBuffer, UDWORD size, void **ppData) { calcDataHash((uint8_t *)pBuffer, size, DATA_SWEAPON); if (!loadWeaponStats(pBuffer, size) || !allocComponentList(COMP_WEAPON, numWeaponStats)) { return false; } // not interested in this value *ppData = NULL; return true; }
/* Load the weapon stats */ static bool bufferSWEAPONLoad(const char *fileName, void **ppData) { WzConfig ini(fileName, WzConfig::ReadOnlyAndRequired); calcDataHash(ini, DATA_SWEAPON); if (!loadWeaponStats(ini) || !allocComponentList(COMP_WEAPON, numWeaponStats)) { return false; } // not interested in this value *ppData = nullptr; return true; }