author | Xeli |
Sun, 21 Aug 2011 18:14:49 +0200 | |
branch | hedgeroid |
changeset 5625 | 9add7b92c5f0 |
parent 5452 | 3edc3e3b8cdc |
child 6025 | cac1d5601d7c |
permissions | -rw-r--r-- |
4930 | 1 |
(* |
2 |
* Hedgewars, a free turn based strategy game |
|
3 |
* Copyright (c) 2004-2011 Andrey Korotaev <unC0Rr@gmail.com> |
|
4 |
* |
|
5 |
* This program is free software; you can redistribute it and/or modify |
|
6 |
* it under the terms of the GNU General Public License as published by |
|
7 |
* the Free Software Foundation; version 2 of the License |
|
8 |
* |
|
9 |
* This program is distributed in the hope that it will be useful, |
|
10 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 |
* GNU General Public License for more details. |
|
13 |
* |
|
14 |
* You should have received a copy of the GNU General Public License |
|
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 |
|
17 |
*) |
|
2698 | 18 |
|
19 |
Library hwLibrary; |
|
20 |
||
5452
3edc3e3b8cdc
Created callbacks to give the frontend information of maxteams/hogs
Xeli
parents:
5166
diff
changeset
|
21 |
{$IFDEF fpc} |
3edc3e3b8cdc
Created callbacks to give the frontend information of maxteams/hogs
Xeli
parents:
5166
diff
changeset
|
22 |
{$MODE delphi} |
3edc3e3b8cdc
Created callbacks to give the frontend information of maxteams/hogs
Xeli
parents:
5166
diff
changeset
|
23 |
{$ENDIF} |
3edc3e3b8cdc
Created callbacks to give the frontend information of maxteams/hogs
Xeli
parents:
5166
diff
changeset
|
24 |
|
3edc3e3b8cdc
Created callbacks to give the frontend information of maxteams/hogs
Xeli
parents:
5166
diff
changeset
|
25 |
{$IFDEF ANDROID} |
3edc3e3b8cdc
Created callbacks to give the frontend information of maxteams/hogs
Xeli
parents:
5166
diff
changeset
|
26 |
{$MACRO ON} |
3edc3e3b8cdc
Created callbacks to give the frontend information of maxteams/hogs
Xeli
parents:
5166
diff
changeset
|
27 |
{$DEFINE Java_Prefix := 'Java_org_hedgewars_mobile_EngineProtocol_PascalExports_'} |
3edc3e3b8cdc
Created callbacks to give the frontend information of maxteams/hogs
Xeli
parents:
5166
diff
changeset
|
28 |
{$ENDIF} |
3edc3e3b8cdc
Created callbacks to give the frontend information of maxteams/hogs
Xeli
parents:
5166
diff
changeset
|
29 |
|
2698 | 30 |
// Add all your Pascal units to the "uses" clause below to add them to the program. |
31 |
// Mark all Pascal procedures/functions that you wish to call from C/C++/Objective-C code using |
|
32 |
// "cdecl; export;" (see the fpclogo.pas unit for an example), and then add C-declarations for |
|
33 |
// these procedures/functions to the PascalImports.h file (also in the "Pascal Sources" group) |
|
34 |
// to make these functions available in the C/C++/Objective-C source files |
|
35 |
// (add "#include PascalImports.h" near the top of these files if it's not there yet) |
|
5452
3edc3e3b8cdc
Created callbacks to give the frontend information of maxteams/hogs
Xeli
parents:
5166
diff
changeset
|
36 |
uses PascalExports, hwengine{$IFDEF ANDROID},jni{$ENDIF}; |
3edc3e3b8cdc
Created callbacks to give the frontend information of maxteams/hogs
Xeli
parents:
5166
diff
changeset
|
37 |
exports Game{$IFNDEF ANDROID}, HW_versionInfo{$ENDIF}; |
3edc3e3b8cdc
Created callbacks to give the frontend information of maxteams/hogs
Xeli
parents:
5166
diff
changeset
|
38 |
|
3edc3e3b8cdc
Created callbacks to give the frontend information of maxteams/hogs
Xeli
parents:
5166
diff
changeset
|
39 |
function JNI_HW_versionInfoNet(env: PJNIEnv; obj: JObject):JInt;cdecl; |
3edc3e3b8cdc
Created callbacks to give the frontend information of maxteams/hogs
Xeli
parents:
5166
diff
changeset
|
40 |
begin |
3edc3e3b8cdc
Created callbacks to give the frontend information of maxteams/hogs
Xeli
parents:
5166
diff
changeset
|
41 |
JNI_HW_versionInfoNet := cNetProtoVersion; |
3edc3e3b8cdc
Created callbacks to give the frontend information of maxteams/hogs
Xeli
parents:
5166
diff
changeset
|
42 |
end; |
3edc3e3b8cdc
Created callbacks to give the frontend information of maxteams/hogs
Xeli
parents:
5166
diff
changeset
|
43 |
|
3edc3e3b8cdc
Created callbacks to give the frontend information of maxteams/hogs
Xeli
parents:
5166
diff
changeset
|
44 |
function JNI_HW_versionInfoVersion(env: PJNIEnv; obj: JObject):JString; cdecl; |
3edc3e3b8cdc
Created callbacks to give the frontend information of maxteams/hogs
Xeli
parents:
5166
diff
changeset
|
45 |
begin |
3edc3e3b8cdc
Created callbacks to give the frontend information of maxteams/hogs
Xeli
parents:
5166
diff
changeset
|
46 |
JNI_HW_versionInfoVersion := env^.NewStringUTF(env, PChar(cVersionString)); |
3edc3e3b8cdc
Created callbacks to give the frontend information of maxteams/hogs
Xeli
parents:
5166
diff
changeset
|
47 |
end; |
3edc3e3b8cdc
Created callbacks to give the frontend information of maxteams/hogs
Xeli
parents:
5166
diff
changeset
|
48 |
|
3edc3e3b8cdc
Created callbacks to give the frontend information of maxteams/hogs
Xeli
parents:
5166
diff
changeset
|
49 |
|
3edc3e3b8cdc
Created callbacks to give the frontend information of maxteams/hogs
Xeli
parents:
5166
diff
changeset
|
50 |
{$IFDEF ANDROID} |
3edc3e3b8cdc
Created callbacks to give the frontend information of maxteams/hogs
Xeli
parents:
5166
diff
changeset
|
51 |
exports |
3edc3e3b8cdc
Created callbacks to give the frontend information of maxteams/hogs
Xeli
parents:
5166
diff
changeset
|
52 |
JNI_HW_versionInfoNet name Java_Prefix+'HWversionInfoNetProto', |
3edc3e3b8cdc
Created callbacks to give the frontend information of maxteams/hogs
Xeli
parents:
5166
diff
changeset
|
53 |
JNI_HW_versionInfoVersion name Java_Prefix+'HWversionInfoVersion', |
3edc3e3b8cdc
Created callbacks to give the frontend information of maxteams/hogs
Xeli
parents:
5166
diff
changeset
|
54 |
GenLandPreview name Java_Prefix + 'GenLandPreview', |
3edc3e3b8cdc
Created callbacks to give the frontend information of maxteams/hogs
Xeli
parents:
5166
diff
changeset
|
55 |
HW_getNumberOfweapons name Java_Prefix + 'HWgetNumberOfWeapons', |
3edc3e3b8cdc
Created callbacks to give the frontend information of maxteams/hogs
Xeli
parents:
5166
diff
changeset
|
56 |
HW_getMaxNumberOfHogs name Java_Prefix + 'HWgetMaxNumberOfHogs', |
3edc3e3b8cdc
Created callbacks to give the frontend information of maxteams/hogs
Xeli
parents:
5166
diff
changeset
|
57 |
HW_getMaxNumberOfTeams name Java_Prefix + 'HWgetMaxNumberOfTeams'; |
3edc3e3b8cdc
Created callbacks to give the frontend information of maxteams/hogs
Xeli
parents:
5166
diff
changeset
|
58 |
{$ENDIF} |
3edc3e3b8cdc
Created callbacks to give the frontend information of maxteams/hogs
Xeli
parents:
5166
diff
changeset
|
59 |
|
4187 | 60 |
begin |
4850 | 61 |
|
2698 | 62 |
end. |
63 |