MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / GetDLLGameInfo

Function GetDLLGameInfo

Descent3/Game2DLL.cpp:756–775  ·  view source on GitHub ↗

Call this function to get information/options from a unloaded mod

Source from the content-addressed store, hash-verified

754}
755// Call this function to get information/options from a unloaded mod
756bool GetDLLGameInfo(const char *name, tDLLOptions *options) {
757 module mod = {NULL};
758 memset(options, 0, sizeof(tDLLOptions));
759 DLLGetGameInfo_fp modGetGameInfo;
760 if (!InitGameModule(name, &mod))
761 return false;
762 // Clear out error queue
763 mod_GetLastError();
764 modGetGameInfo = (DLLGetGameInfo_fp)mod_GetSymbol(&mod, "DLLGetGameInfo", 4);
765 if (!modGetGameInfo) {
766 int err = mod_GetLastError();
767 mprintf(0, "Couldn't get a handle to the dll function DLLGetGameInfo!\n");
768 Int3();
769 CloseGameModule(&mod);
770 return false;
771 }
772 modGetGameInfo(options);
773 CloseGameModule(&mod);
774 return true;
775}
776// Call this function to get the list of requirements that the given module needs in order
777// to be playable. Returns the number of requirements it needs...-1 on error.
778int GetDLLRequirements(const char *name, char *requirements, int buflen) {

Callers 2

GetDLLRequirementsFunction · 0.85
GetDLLNumTeamInfoFunction · 0.85

Calls 4

InitGameModuleFunction · 0.85
mod_GetLastErrorFunction · 0.85
mod_GetSymbolFunction · 0.85
CloseGameModuleFunction · 0.85

Tested by

no test coverage detected