15 * along with this program; if not, write to the Free Software |
15 * along with this program; if not, write to the Free Software |
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA |
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA |
17 *) |
17 *) |
18 |
18 |
19 Library hwLibrary; |
19 Library hwLibrary; |
|
20 {$INCLUDE "options.inc"} |
20 |
21 |
21 // Add all your Pascal units to the "uses" clause below to add them to the program. |
22 // Add all your Pascal units to the 'uses' clause below to add them to the program. |
22 // Mark all Pascal procedures/functions that you wish to call from C/C++/Objective-C code using |
23 // Mark all Pascal procedures/functions that you wish to call from C/C++/Objective-C code using |
23 // "cdecl; export;" (see the fpclogo.pas unit for an example), and then add C-declarations for |
24 // 'cdecl; export;' (see the fpclogo.pas unit for an example), and then add C-declarations for |
24 // these procedures/functions to the PascalImports.h file (also in the "Pascal Sources" group) |
25 // these procedures/functions to the PascalImports.h file (also in the 'Pascal Sources' group) |
25 // to make these functions available in the C/C++/Objective-C source files |
26 // to make these functions available in the C/C++/Objective-C source files |
26 // (add "#include PascalImports.h" near the top of these files if it's not there yet) |
27 // (add '#include PascalImports.h' near the top of these files if it is not there yet) |
27 uses PascalExports, hwengine; |
28 uses PascalExports, hwengine{$IFDEF ANDROID}, jni{$ENDIF}; |
28 exports Game, HW_versionInfo; |
29 exports Game, HW_versionInfo; |
|
30 |
|
31 {$IFDEF ANDROID} |
|
32 function JNI_HW_versionInfoNet(env: PJNIEnv; obj: JObject):JInt;cdecl; |
|
33 begin |
|
34 env:= env; // avoid hint |
|
35 obj:= obj; // avoid hint |
|
36 JNI_HW_versionInfoNet:= cNetProtoVersion; |
|
37 end; |
|
38 |
|
39 function JNI_HW_versionInfoVersion(env: PJNIEnv; obj: JObject):JString; cdecl; |
|
40 var envderef : JNIEnv; |
|
41 begin |
|
42 obj:= obj; // avoid hint |
|
43 envderef:= @env; |
|
44 JNI_HW_versionInfoVersion := envderef^.NewStringUTF(env, PChar(cVersionString)); |
|
45 end; |
|
46 |
|
47 exports |
|
48 JNI_HW_versionInfoNet name Java_Prefix+'HWversionInfoNetProto', |
|
49 JNI_HW_versionInfoVersion name Java_Prefix+'HWversionInfoVersion', |
|
50 GenLandPreview name Java_Prefix + 'GenLandPreview', |
|
51 HW_getNumberOfweapons name Java_Prefix + 'HWgetNumberOfWeapons', |
|
52 HW_getMaxNumberOfHogs name Java_Prefix + 'HWgetMaxNumberOfHogs', |
|
53 HW_getMaxNumberOfTeams name Java_Prefix + 'HWgetMaxNumberOfTeams', |
|
54 HW_terminate name Java_Prefix + 'HWterminate'; |
|
55 {$ENDIF} |
|
56 |
29 begin |
57 begin |
30 |
58 |
31 end. |
59 end. |
32 |
60 |