Logo Search packages:      
Sourcecode: rapid-spring version File versions  Download package

def rapid::unitsync::unitsync::Unitsync::__init__ (   self,
  location 
)
Load unitsync from location and attempt to load all known procedures.
Location must end with .so (Linux) or .dll (Windows)

Definition at line 37 of file unitsync.py.

                                  :
            """Load unitsync from location and attempt to load all known procedures.
            Location must end with .so (Linux) or .dll (Windows)"""
            if location.endswith('.so'):
                  self.unitsync = ctypes.cdll.LoadLibrary(location)
            elif location.endswith('.dll'):
                  locationdir = os.path.dirname(location)
                  # load devil first, to avoid dll conflicts
                  ctypes.windll.LoadLibrary(locationdir + "/devil.dll" )
                  # load other dependencies, in case the spring dir is not in PATH
                  ctypes.windll.LoadLibrary(locationdir + "/ILU.dll" )
                  ctypes.windll.LoadLibrary(locationdir + "/SDL.dll" )
                  self.unitsync = ctypes.windll.LoadLibrary(location)

            self._init("GetNextError", c_char_p)
            self._init("GetSpringVersion", c_char_p)
            self._init("Init", c_int)
            self._init("GetWritableDataDirectory", c_char_p)
            self._init("ProcessUnits", c_int)
            self._init("ProcessUnitsNoChecksum", c_int)
            self._init("GetUnitCount", c_int)
            self._init("GetUnitName", c_char_p)
            self._init("GetFullUnitName", c_char_p)
            self._init("GetArchiveChecksum", c_uint)
            self._init("GetArchivePath", c_char_p)
            self._init("GetMapInfoEx", c_int)
            self._init("GetMapInfo", c_int)
            self._init("GetMapCount", c_int)
            self._init("GetMapName", c_char_p)
            self._init("GetMapDescription", c_char_p)
            self._init("GetMapAuthor", c_char_p)
            self._init("GetMapWidth", c_int)
            self._init("GetMapHeight", c_int)
            self._init("GetMapTidalStrength", c_int)
            self._init("GetMapWindMin", c_int)
            self._init("GetMapWindMax", c_int)
            self._init("GetMapGravity", c_int)
            self._init("GetMapResourceCount", c_int)
            self._init("GetMapResourceName", c_char_p)
            self._init("GetMapResourceMax", c_float)
            self._init("GetMapResourceExtractorRadius", c_int)
            self._init("GetMapPosCount", c_int)
            self._init("GetMapPosX", c_float)
            self._init("GetMapPosZ", c_float)
            self._init("GetMapMinHeight", c_float)
            self._init("GetMapMaxHeight", c_float)
            self._init("GetMapArchiveCount", c_int)
            self._init("GetMapArchiveName", c_char_p)
            self._init("GetMapChecksum", c_uint)
            self._init("GetMapChecksumFromName", c_uint)
            self._init("GetMinimap", pointer)
            self._init("GetInfoMapSize", c_int)
            self._init("GetInfoMap", c_int)
            self._init("GetSkirmishAICount", c_int)
            self._init("GetSkirmishAIInfoCount", c_int)
            self._init("GetInfoKey", c_char_p)
            self._init("GetInfoValue", c_char_p)
            self._init("GetInfoDescription", c_char_p)
            self._init("GetSkirmishAIOptionCount", c_int)
            self._init("GetPrimaryModCount", c_int)
            self._init("GetPrimaryModName", c_char_p)
            self._init("GetPrimaryModShortName", c_char_p)
            self._init("GetPrimaryModVersion", c_char_p)
            self._init("GetPrimaryModMutator", c_char_p)
            self._init("GetPrimaryModGame", c_char_p)
            self._init("GetPrimaryModShortGame", c_char_p)
            self._init("GetPrimaryModDescription", c_char_p)
            self._init("GetPrimaryModArchive", c_char_p)
            self._init("GetPrimaryModArchiveCount", c_int)
            self._init("GetPrimaryModArchiveList", c_char_p)
            self._init("GetPrimaryModIndex", c_int)
            self._init("GetPrimaryModChecksum", c_uint)
            self._init("GetPrimaryModChecksumFromName", c_uint)
            self._init("GetSideCount", c_int)
            self._init("GetSideName", c_char_p)
            self._init("GetSideStartUnit", c_char_p)
            self._init("GetMapOptionCount", c_int)
            self._init("GetModOptionCount", c_int)
            self._init("GetCustomOptionCount", c_int)
            self._init("GetOptionKey", c_char_p)
            self._init("GetOptionScope", c_char_p)
            self._init("GetOptionName", c_char_p)
            self._init("GetOptionSection", c_char_p)
            self._init("GetOptionStyle", c_char_p)
            self._init("GetOptionDesc", c_char_p)
            self._init("GetOptionType", c_int)
            self._init("GetOptionBoolDef", c_int)
            self._init("GetOptionNumberDef", c_float)
            self._init("GetOptionNumberMin", c_float)
            self._init("GetOptionNumberMax", c_float)
            self._init("GetOptionNumberStep", c_float)
            self._init("GetOptionStringDef", c_char_p)
            self._init("GetOptionStringMaxLen", c_int)
            self._init("GetOptionListCount", c_int)
            self._init("GetOptionListDef", c_char_p)
            self._init("GetOptionListItemKey", c_char_p)
            self._init("GetOptionListItemName", c_char_p)
            self._init("GetOptionListItemDesc", c_char_p)
            self._init("GetModValidMapCount", c_int)
            self._init("GetModValidMap", c_char_p)
            self._init("OpenFileVFS", c_int)
            self._init("ReadFileVFS", c_int)
            self._init("FileSizeVFS", c_int)
            self._init("InitFindVFS", c_int)
            self._init("InitDirListVFS", c_int)
            self._init("InitSubDirsVFS", c_int)
            self._init("FindFilesVFS", c_int)
            self._init("OpenArchive", c_int)
            self._init("OpenArchiveType", c_int)
            self._init("FindFilesArchive", c_int)
            self._init("OpenArchiveFile", c_int)
            self._init("ReadArchiveFile", c_int)
            self._init("SizeArchiveFile", c_int)
            self._init("GetSpringConfigFile", c_char_p)
            self._init("GetSpringConfigString", c_char_p)
            self._init("GetSpringConfigInt", c_int)
            self._init("GetSpringConfigFloat", c_float)
            self._init("lpOpenFile", c_int)
            self._init("lpOpenSource", c_int)
            self._init("lpExecute", c_int)
            self._init("lpErrorLog", c_char_p)
            self._init("lpRootTable", c_int)
            self._init("lpRootTableExpr", c_int)
            self._init("lpSubTableInt", c_int)
            self._init("lpSubTableStr", c_int)
            self._init("lpSubTableExpr", c_int)
            self._init("lpGetKeyExistsInt", c_int)
            self._init("lpGetKeyExistsStr", c_int)
            self._init("lpGetIntKeyType", c_int)
            self._init("lpGetStrKeyType", c_int)
            self._init("lpGetIntKeyListCount", c_int)
            self._init("lpGetIntKeyListEntry", c_int)
            self._init("lpGetStrKeyListCount", c_int)
            self._init("lpGetStrKeyListEntry", c_char_p)
            self._init("lpGetIntKeyIntVal", c_int)
            self._init("lpGetStrKeyIntVal", c_int)
            self._init("lpGetIntKeyBoolVal", c_int)
            self._init("lpGetStrKeyBoolVal", c_int)
            self._init("lpGetIntKeyFloatVal", c_float)
            self._init("lpGetStrKeyFloatVal", c_float)
            self._init("lpGetIntKeyStrVal", c_char_p)
            self._init("lpGetStrKeyStrVal", c_char_p)


Generated by  Doxygen 1.6.0   Back to index