
The JNA direct mapping branch is operational (tested with NullOOJavaAI on linux and on windows). It is on the main repo now.
name: javaaispeed
The only thing that changed, interface wise, is that these methods are not available:
Code: Select all
Clb_UnitDef_0MAP1SIZE0getCustomParams
Clb_UnitDef_0MAP1KEYS0getCustomParams
Clb_UnitDef_0MAP1VALS0getCustomParams
Clb_Unit_SupportedCommand_0ARRAY1SIZE0getParams
Clb_Unit_SupportedCommand_0ARRAY1VALS0getParams
Clb_Group_SupportedCommand_0ARRAY1SIZE0getParams
Clb_Group_SupportedCommand_0ARRAY1VALS0getParams
Clb_Map_0ARRAY1SIZE0REF1Resource2resourceId0getResourceMapSpotsPositions
Clb_Map_0ARRAY1VALS0REF1Resource2resourceId0getResourceMapSpotsPositions
Clb_FeatureDef_0MAP1SIZE0getCustomParams
Clb_FeatureDef_0MAP1KEYS0getCustomParams
Clb_FeatureDef_0MAP1VALS0getCustomParams
Clb_WeaponDef_0MAP1SIZE0getCustomParams
Clb_WeaponDef_0MAP1KEYS0getCustomParams
Clb_WeaponDef_0MAP1VALS0getCustomParams
If the performance gain is notable, i may rewrite the C interface to allow fetching those things one by one, eg. const char* GetString(int i) instead of int GetStrings(const char**). This will make the calling of these functions a bit heavier, but as they are all easily cachable (and in fact are already cached in the Java interface) that should not be a problem. The Java interface would stay the same.
cranphin:
could you do some performance testing pls? :D
i should be online all day, and probably the next few days too, if you are not around.