Call this function to get information/options from a unloaded mod
| 754 | } |
| 755 | // Call this function to get information/options from a unloaded mod |
| 756 | bool 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. |
| 778 | int GetDLLRequirements(const char *name, char *requirements, int buflen) { |
no test coverage detected