hedgewars/hwLibrary.pas
author koda
Mon, 26 Sep 2011 01:16:15 +0200
branchhedgeroid
changeset 6027 302408e45052
parent 6025 cac1d5601d7c
child 6033 6bcc36225162
permissions -rw-r--r--
code working on ios now
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
4930
5d59bb58c365 fix issue 185 :|
koda
parents: 4929
diff changeset
     1
(*
5d59bb58c365 fix issue 185 :|
koda
parents: 4929
diff changeset
     2
 * Hedgewars, a free turn based strategy game
5d59bb58c365 fix issue 185 :|
koda
parents: 4929
diff changeset
     3
 * Copyright (c) 2004-2011 Andrey Korotaev <unC0Rr@gmail.com>
5d59bb58c365 fix issue 185 :|
koda
parents: 4929
diff changeset
     4
 *
5d59bb58c365 fix issue 185 :|
koda
parents: 4929
diff changeset
     5
 * This program is free software; you can redistribute it and/or modify
5d59bb58c365 fix issue 185 :|
koda
parents: 4929
diff changeset
     6
 * it under the terms of the GNU General Public License as published by
5d59bb58c365 fix issue 185 :|
koda
parents: 4929
diff changeset
     7
 * the Free Software Foundation; version 2 of the License
5d59bb58c365 fix issue 185 :|
koda
parents: 4929
diff changeset
     8
 *
5d59bb58c365 fix issue 185 :|
koda
parents: 4929
diff changeset
     9
 * This program is distributed in the hope that it will be useful,
5d59bb58c365 fix issue 185 :|
koda
parents: 4929
diff changeset
    10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
5d59bb58c365 fix issue 185 :|
koda
parents: 4929
diff changeset
    11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
5d59bb58c365 fix issue 185 :|
koda
parents: 4929
diff changeset
    12
 * GNU General Public License for more details.
5d59bb58c365 fix issue 185 :|
koda
parents: 4929
diff changeset
    13
 *
5d59bb58c365 fix issue 185 :|
koda
parents: 4929
diff changeset
    14
 * You should have received a copy of the GNU General Public License
5d59bb58c365 fix issue 185 :|
koda
parents: 4929
diff changeset
    15
 * along with this program; if not, write to the Free Software
5d59bb58c365 fix issue 185 :|
koda
parents: 4929
diff changeset
    16
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
5d59bb58c365 fix issue 185 :|
koda
parents: 4929
diff changeset
    17
 *)
2698
90585aba87ad objc/pascal finally working
koda
parents:
diff changeset
    18
90585aba87ad objc/pascal finally working
koda
parents:
diff changeset
    19
Library hwLibrary;
90585aba87ad objc/pascal finally working
koda
parents:
diff changeset
    20
5452
3edc3e3b8cdc Created callbacks to give the frontend information of maxteams/hogs
Xeli
parents: 5166
diff changeset
    21
2698
90585aba87ad objc/pascal finally working
koda
parents:
diff changeset
    22
// Add all your Pascal units to the "uses" clause below to add them to the program.
90585aba87ad objc/pascal finally working
koda
parents:
diff changeset
    23
// Mark all Pascal procedures/functions that you wish to call from C/C++/Objective-C code using
90585aba87ad objc/pascal finally working
koda
parents:
diff changeset
    24
// "cdecl; export;" (see the fpclogo.pas unit for an example), and then add C-declarations for
90585aba87ad objc/pascal finally working
koda
parents:
diff changeset
    25
// these procedures/functions to the PascalImports.h file (also in the "Pascal Sources" group)
90585aba87ad objc/pascal finally working
koda
parents:
diff changeset
    26
// to make these functions available in the C/C++/Objective-C source files
90585aba87ad objc/pascal finally working
koda
parents:
diff changeset
    27
// (add "#include PascalImports.h" near the top of these files if it's not there yet)
6025
cac1d5601d7c reviewed the build system and parts of the previous merge, performed some code cleanup
koda
parents: 5452
diff changeset
    28
uses PascalExports, hwengine{$IFDEF ANDROID}, jni{$ENDIF};
cac1d5601d7c reviewed the build system and parts of the previous merge, performed some code cleanup
koda
parents: 5452
diff changeset
    29
exports Game, HW_versionInfo;
5452
3edc3e3b8cdc Created callbacks to give the frontend information of maxteams/hogs
Xeli
parents: 5166
diff changeset
    30
6027
302408e45052 code working on ios now
koda
parents: 6025
diff changeset
    31
{$IFDEF ANDROID}
5452
3edc3e3b8cdc Created callbacks to give the frontend information of maxteams/hogs
Xeli
parents: 5166
diff changeset
    32
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
    33
begin
3edc3e3b8cdc Created callbacks to give the frontend information of maxteams/hogs
Xeli
parents: 5166
diff changeset
    34
    JNI_HW_versionInfoNet := cNetProtoVersion;
3edc3e3b8cdc Created callbacks to give the frontend information of maxteams/hogs
Xeli
parents: 5166
diff changeset
    35
end;
3edc3e3b8cdc Created callbacks to give the frontend information of maxteams/hogs
Xeli
parents: 5166
diff changeset
    36
3edc3e3b8cdc Created callbacks to give the frontend information of maxteams/hogs
Xeli
parents: 5166
diff changeset
    37
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
    38
begin
3edc3e3b8cdc Created callbacks to give the frontend information of maxteams/hogs
Xeli
parents: 5166
diff changeset
    39
    JNI_HW_versionInfoVersion := env^.NewStringUTF(env, PChar(cVersionString));
3edc3e3b8cdc Created callbacks to give the frontend information of maxteams/hogs
Xeli
parents: 5166
diff changeset
    40
end;
3edc3e3b8cdc Created callbacks to give the frontend information of maxteams/hogs
Xeli
parents: 5166
diff changeset
    41
6025
cac1d5601d7c reviewed the build system and parts of the previous merge, performed some code cleanup
koda
parents: 5452
diff changeset
    42
exports
5452
3edc3e3b8cdc Created callbacks to give the frontend information of maxteams/hogs
Xeli
parents: 5166
diff changeset
    43
    JNI_HW_versionInfoNet name Java_Prefix+'HWversionInfoNetProto', 
3edc3e3b8cdc Created callbacks to give the frontend information of maxteams/hogs
Xeli
parents: 5166
diff changeset
    44
    JNI_HW_versionInfoVersion name Java_Prefix+'HWversionInfoVersion', 
3edc3e3b8cdc Created callbacks to give the frontend information of maxteams/hogs
Xeli
parents: 5166
diff changeset
    45
    GenLandPreview name Java_Prefix + 'GenLandPreview',
3edc3e3b8cdc Created callbacks to give the frontend information of maxteams/hogs
Xeli
parents: 5166
diff changeset
    46
    HW_getNumberOfweapons name Java_Prefix + 'HWgetNumberOfWeapons',
3edc3e3b8cdc Created callbacks to give the frontend information of maxteams/hogs
Xeli
parents: 5166
diff changeset
    47
    HW_getMaxNumberOfHogs name Java_Prefix + 'HWgetMaxNumberOfHogs',
3edc3e3b8cdc Created callbacks to give the frontend information of maxteams/hogs
Xeli
parents: 5166
diff changeset
    48
    HW_getMaxNumberOfTeams name Java_Prefix + 'HWgetMaxNumberOfTeams';
3edc3e3b8cdc Created callbacks to give the frontend information of maxteams/hogs
Xeli
parents: 5166
diff changeset
    49
{$ENDIF}
3edc3e3b8cdc Created callbacks to give the frontend information of maxteams/hogs
Xeli
parents: 5166
diff changeset
    50
4187
adb144a907aa remove last warnings from xcodeproj
koda
parents: 3464
diff changeset
    51
begin
4850
434cd1284204 code cleanup
koda
parents: 4603
diff changeset
    52
2698
90585aba87ad objc/pascal finally working
koda
parents:
diff changeset
    53
end.
90585aba87ad objc/pascal finally working
koda
parents:
diff changeset
    54