hedgewars/hwLibrary.pas
branchhedgeroid
changeset 6033 6bcc36225162
parent 6027 302408e45052
child 6035 bdd0528ee8a6
--- a/hedgewars/hwLibrary.pas	Tue Oct 04 17:18:25 2011 +0200
+++ b/hedgewars/hwLibrary.pas	Tue Oct 04 19:20:42 2011 +0200
@@ -17,26 +17,31 @@
  *)
 
 Library hwLibrary;
-
+{$INCLUDE "options.inc"}
 
-// Add all your Pascal units to the "uses" clause below to add them to the program.
+// Add all your Pascal units to the 'uses' clause below to add them to the program.
 // Mark all Pascal procedures/functions that you wish to call from C/C++/Objective-C code using
-// "cdecl; export;" (see the fpclogo.pas unit for an example), and then add C-declarations for
-// these procedures/functions to the PascalImports.h file (also in the "Pascal Sources" group)
+// 'cdecl; export;' (see the fpclogo.pas unit for an example), and then add C-declarations for
+// these procedures/functions to the PascalImports.h file (also in the 'Pascal Sources' group)
 // to make these functions available in the C/C++/Objective-C source files
-// (add "#include PascalImports.h" near the top of these files if it's not there yet)
+// (add '#include PascalImports.h' near the top of these files if it is not there yet)
 uses PascalExports, hwengine{$IFDEF ANDROID}, jni{$ENDIF};
 exports Game, HW_versionInfo;
 
 {$IFDEF ANDROID}
 function JNI_HW_versionInfoNet(env: PJNIEnv; obj: JObject):JInt;cdecl;
 begin
-    JNI_HW_versionInfoNet := cNetProtoVersion;
+    env:= env; // avoid hint
+    obj:= obj; // avoid hint
+    JNI_HW_versionInfoNet:= cNetProtoVersion;
 end;
 
 function JNI_HW_versionInfoVersion(env: PJNIEnv; obj: JObject):JString; cdecl;
+var envderef : JNIEnv;
 begin
-    JNI_HW_versionInfoVersion := env^.NewStringUTF(env, PChar(cVersionString));
+    obj:= obj; // avoid hint
+    envderef:= @env;
+    JNI_HW_versionInfoVersion := envderef^.NewStringUTF(env, PChar(cVersionString));
 end;
 
 exports