author | koda |
Thu, 07 Oct 2010 02:03:01 +0200 | |
changeset 3928 | 2560731c860d |
child 3935 | 5ca27a0e9a63 |
permissions | -rw-r--r-- |
3928
2560731c860d
move all mobile-related functions in their own module, provides a structure for future mobile ports
koda
parents:
diff
changeset
|
1 |
(* |
2560731c860d
move all mobile-related functions in their own module, provides a structure for future mobile ports
koda
parents:
diff
changeset
|
2 |
* Hedgewars, a free turn based strategy game |
2560731c860d
move all mobile-related functions in their own module, provides a structure for future mobile ports
koda
parents:
diff
changeset
|
3 |
* Copyright (c) 2004-2008 Andrey Korotaev <unC0Rr@gmail.com> |
2560731c860d
move all mobile-related functions in their own module, provides a structure for future mobile ports
koda
parents:
diff
changeset
|
4 |
* |
2560731c860d
move all mobile-related functions in their own module, provides a structure for future mobile ports
koda
parents:
diff
changeset
|
5 |
* This program is free software; you can redistribute it and/or modify |
2560731c860d
move all mobile-related functions in their own module, provides a structure for future mobile ports
koda
parents:
diff
changeset
|
6 |
* it under the terms of the GNU General Public License as published by |
2560731c860d
move all mobile-related functions in their own module, provides a structure for future mobile ports
koda
parents:
diff
changeset
|
7 |
* the Free Software Foundation; version 2 of the License |
2560731c860d
move all mobile-related functions in their own module, provides a structure for future mobile ports
koda
parents:
diff
changeset
|
8 |
* |
2560731c860d
move all mobile-related functions in their own module, provides a structure for future mobile ports
koda
parents:
diff
changeset
|
9 |
* This program is distributed in the hope that it will be useful, |
2560731c860d
move all mobile-related functions in their own module, provides a structure for future mobile ports
koda
parents:
diff
changeset
|
10 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
2560731c860d
move all mobile-related functions in their own module, provides a structure for future mobile ports
koda
parents:
diff
changeset
|
11 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
2560731c860d
move all mobile-related functions in their own module, provides a structure for future mobile ports
koda
parents:
diff
changeset
|
12 |
* GNU General Public License for more details. |
2560731c860d
move all mobile-related functions in their own module, provides a structure for future mobile ports
koda
parents:
diff
changeset
|
13 |
* |
2560731c860d
move all mobile-related functions in their own module, provides a structure for future mobile ports
koda
parents:
diff
changeset
|
14 |
* You should have received a copy of the GNU General Public License |
2560731c860d
move all mobile-related functions in their own module, provides a structure for future mobile ports
koda
parents:
diff
changeset
|
15 |
* along with this program; if not, write to the Free Software |
2560731c860d
move all mobile-related functions in their own module, provides a structure for future mobile ports
koda
parents:
diff
changeset
|
16 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA |
2560731c860d
move all mobile-related functions in their own module, provides a structure for future mobile ports
koda
parents:
diff
changeset
|
17 |
*) |
2560731c860d
move all mobile-related functions in their own module, provides a structure for future mobile ports
koda
parents:
diff
changeset
|
18 |
|
2560731c860d
move all mobile-related functions in their own module, provides a structure for future mobile ports
koda
parents:
diff
changeset
|
19 |
{$INCLUDE "options.inc"} |
2560731c860d
move all mobile-related functions in their own module, provides a structure for future mobile ports
koda
parents:
diff
changeset
|
20 |
|
2560731c860d
move all mobile-related functions in their own module, provides a structure for future mobile ports
koda
parents:
diff
changeset
|
21 |
unit uMobile; |
2560731c860d
move all mobile-related functions in their own module, provides a structure for future mobile ports
koda
parents:
diff
changeset
|
22 |
interface |
2560731c860d
move all mobile-related functions in their own module, provides a structure for future mobile ports
koda
parents:
diff
changeset
|
23 |
|
2560731c860d
move all mobile-related functions in their own module, provides a structure for future mobile ports
koda
parents:
diff
changeset
|
24 |
{$IFDEF IPHONEOS} |
2560731c860d
move all mobile-related functions in their own module, provides a structure for future mobile ports
koda
parents:
diff
changeset
|
25 |
(* iOS calls written in C/Objc *) |
2560731c860d
move all mobile-related functions in their own module, provides a structure for future mobile ports
koda
parents:
diff
changeset
|
26 |
procedure clearView; cdecl; external; |
2560731c860d
move all mobile-related functions in their own module, provides a structure for future mobile ports
koda
parents:
diff
changeset
|
27 |
procedure startSpinning; cdecl; external; |
2560731c860d
move all mobile-related functions in their own module, provides a structure for future mobile ports
koda
parents:
diff
changeset
|
28 |
procedure stopSpinning; cdecl; external; |
2560731c860d
move all mobile-related functions in their own module, provides a structure for future mobile ports
koda
parents:
diff
changeset
|
29 |
procedure replayBegan; cdecl; external; |
2560731c860d
move all mobile-related functions in their own module, provides a structure for future mobile ports
koda
parents:
diff
changeset
|
30 |
procedure replayFinished; cdecl; external; |
2560731c860d
move all mobile-related functions in their own module, provides a structure for future mobile ports
koda
parents:
diff
changeset
|
31 |
procedure updateVisualsNewTurn; cdecl; external; |
2560731c860d
move all mobile-related functions in their own module, provides a structure for future mobile ports
koda
parents:
diff
changeset
|
32 |
function isApplePhone: Boolean; cdecl; external; |
2560731c860d
move all mobile-related functions in their own module, provides a structure for future mobile ports
koda
parents:
diff
changeset
|
33 |
{$ENDIF} |
2560731c860d
move all mobile-related functions in their own module, provides a structure for future mobile ports
koda
parents:
diff
changeset
|
34 |
function isPhone: Boolean; |
2560731c860d
move all mobile-related functions in their own module, provides a structure for future mobile ports
koda
parents:
diff
changeset
|
35 |
procedure doRumble; |
2560731c860d
move all mobile-related functions in their own module, provides a structure for future mobile ports
koda
parents:
diff
changeset
|
36 |
procedure doSomethingWhen_AddProgress; |
2560731c860d
move all mobile-related functions in their own module, provides a structure for future mobile ports
koda
parents:
diff
changeset
|
37 |
procedure doSomethingWhen_FinishProgress; |
2560731c860d
move all mobile-related functions in their own module, provides a structure for future mobile ports
koda
parents:
diff
changeset
|
38 |
procedure doSomethingWhen_NewTurnBeginning; |
2560731c860d
move all mobile-related functions in their own module, provides a structure for future mobile ports
koda
parents:
diff
changeset
|
39 |
procedure doSomethingWhen_SaveBeganSynching; |
2560731c860d
move all mobile-related functions in their own module, provides a structure for future mobile ports
koda
parents:
diff
changeset
|
40 |
procedure doSomethingWhen_SaveFinishedSynching; |
2560731c860d
move all mobile-related functions in their own module, provides a structure for future mobile ports
koda
parents:
diff
changeset
|
41 |
|
2560731c860d
move all mobile-related functions in their own module, provides a structure for future mobile ports
koda
parents:
diff
changeset
|
42 |
implementation |
2560731c860d
move all mobile-related functions in their own module, provides a structure for future mobile ports
koda
parents:
diff
changeset
|
43 |
|
2560731c860d
move all mobile-related functions in their own module, provides a structure for future mobile ports
koda
parents:
diff
changeset
|
44 |
function isPhone: Boolean; |
2560731c860d
move all mobile-related functions in their own module, provides a structure for future mobile ports
koda
parents:
diff
changeset
|
45 |
begin |
2560731c860d
move all mobile-related functions in their own module, provides a structure for future mobile ports
koda
parents:
diff
changeset
|
46 |
{$IFDEF IPHONEOS} |
2560731c860d
move all mobile-related functions in their own module, provides a structure for future mobile ports
koda
parents:
diff
changeset
|
47 |
exit(isApplePhone()); |
2560731c860d
move all mobile-related functions in their own module, provides a structure for future mobile ports
koda
parents:
diff
changeset
|
48 |
{$ENDIF} |
2560731c860d
move all mobile-related functions in their own module, provides a structure for future mobile ports
koda
parents:
diff
changeset
|
49 |
exit(false); |
2560731c860d
move all mobile-related functions in their own module, provides a structure for future mobile ports
koda
parents:
diff
changeset
|
50 |
end; |
2560731c860d
move all mobile-related functions in their own module, provides a structure for future mobile ports
koda
parents:
diff
changeset
|
51 |
|
2560731c860d
move all mobile-related functions in their own module, provides a structure for future mobile ports
koda
parents:
diff
changeset
|
52 |
procedure doRumble; |
2560731c860d
move all mobile-related functions in their own module, provides a structure for future mobile ports
koda
parents:
diff
changeset
|
53 |
begin |
2560731c860d
move all mobile-related functions in their own module, provides a structure for future mobile ports
koda
parents:
diff
changeset
|
54 |
// fill me! |
2560731c860d
move all mobile-related functions in their own module, provides a structure for future mobile ports
koda
parents:
diff
changeset
|
55 |
end; |
2560731c860d
move all mobile-related functions in their own module, provides a structure for future mobile ports
koda
parents:
diff
changeset
|
56 |
|
2560731c860d
move all mobile-related functions in their own module, provides a structure for future mobile ports
koda
parents:
diff
changeset
|
57 |
procedure doSomethingWhen_AddProgress; |
2560731c860d
move all mobile-related functions in their own module, provides a structure for future mobile ports
koda
parents:
diff
changeset
|
58 |
begin |
2560731c860d
move all mobile-related functions in their own module, provides a structure for future mobile ports
koda
parents:
diff
changeset
|
59 |
{$IFDEF IPHONEOS} |
2560731c860d
move all mobile-related functions in their own module, provides a structure for future mobile ports
koda
parents:
diff
changeset
|
60 |
startSpinning(); |
2560731c860d
move all mobile-related functions in their own module, provides a structure for future mobile ports
koda
parents:
diff
changeset
|
61 |
{$ENDIF} |
2560731c860d
move all mobile-related functions in their own module, provides a structure for future mobile ports
koda
parents:
diff
changeset
|
62 |
end; |
2560731c860d
move all mobile-related functions in their own module, provides a structure for future mobile ports
koda
parents:
diff
changeset
|
63 |
|
2560731c860d
move all mobile-related functions in their own module, provides a structure for future mobile ports
koda
parents:
diff
changeset
|
64 |
procedure doSomethingWhen_FinishProgress; |
2560731c860d
move all mobile-related functions in their own module, provides a structure for future mobile ports
koda
parents:
diff
changeset
|
65 |
begin |
2560731c860d
move all mobile-related functions in their own module, provides a structure for future mobile ports
koda
parents:
diff
changeset
|
66 |
{$IFDEF IPHONEOS} |
2560731c860d
move all mobile-related functions in their own module, provides a structure for future mobile ports
koda
parents:
diff
changeset
|
67 |
stopSpinning(); |
2560731c860d
move all mobile-related functions in their own module, provides a structure for future mobile ports
koda
parents:
diff
changeset
|
68 |
{$ENDIF} |
2560731c860d
move all mobile-related functions in their own module, provides a structure for future mobile ports
koda
parents:
diff
changeset
|
69 |
end; |
2560731c860d
move all mobile-related functions in their own module, provides a structure for future mobile ports
koda
parents:
diff
changeset
|
70 |
|
2560731c860d
move all mobile-related functions in their own module, provides a structure for future mobile ports
koda
parents:
diff
changeset
|
71 |
procedure doSomethingWhen_NewTurnBeginning; |
2560731c860d
move all mobile-related functions in their own module, provides a structure for future mobile ports
koda
parents:
diff
changeset
|
72 |
begin |
2560731c860d
move all mobile-related functions in their own module, provides a structure for future mobile ports
koda
parents:
diff
changeset
|
73 |
{$IFDEF IPHONEOS} |
2560731c860d
move all mobile-related functions in their own module, provides a structure for future mobile ports
koda
parents:
diff
changeset
|
74 |
clearView(); |
2560731c860d
move all mobile-related functions in their own module, provides a structure for future mobile ports
koda
parents:
diff
changeset
|
75 |
updateVisualsNewTurn(); |
2560731c860d
move all mobile-related functions in their own module, provides a structure for future mobile ports
koda
parents:
diff
changeset
|
76 |
{$ENDIF} |
2560731c860d
move all mobile-related functions in their own module, provides a structure for future mobile ports
koda
parents:
diff
changeset
|
77 |
end; |
2560731c860d
move all mobile-related functions in their own module, provides a structure for future mobile ports
koda
parents:
diff
changeset
|
78 |
|
2560731c860d
move all mobile-related functions in their own module, provides a structure for future mobile ports
koda
parents:
diff
changeset
|
79 |
procedure doSomethingWhen_SaveBeganSynching; |
2560731c860d
move all mobile-related functions in their own module, provides a structure for future mobile ports
koda
parents:
diff
changeset
|
80 |
begin |
2560731c860d
move all mobile-related functions in their own module, provides a structure for future mobile ports
koda
parents:
diff
changeset
|
81 |
{$IFDEF IPHONEOS} |
2560731c860d
move all mobile-related functions in their own module, provides a structure for future mobile ports
koda
parents:
diff
changeset
|
82 |
replayBegan(); |
2560731c860d
move all mobile-related functions in their own module, provides a structure for future mobile ports
koda
parents:
diff
changeset
|
83 |
{$ENDIF} |
2560731c860d
move all mobile-related functions in their own module, provides a structure for future mobile ports
koda
parents:
diff
changeset
|
84 |
end; |
2560731c860d
move all mobile-related functions in their own module, provides a structure for future mobile ports
koda
parents:
diff
changeset
|
85 |
|
2560731c860d
move all mobile-related functions in their own module, provides a structure for future mobile ports
koda
parents:
diff
changeset
|
86 |
procedure doSomethingWhen_SaveFinishedSynching; |
2560731c860d
move all mobile-related functions in their own module, provides a structure for future mobile ports
koda
parents:
diff
changeset
|
87 |
begin |
2560731c860d
move all mobile-related functions in their own module, provides a structure for future mobile ports
koda
parents:
diff
changeset
|
88 |
{$IFDEF IPHONEOS} |
2560731c860d
move all mobile-related functions in their own module, provides a structure for future mobile ports
koda
parents:
diff
changeset
|
89 |
replayFinished(); |
2560731c860d
move all mobile-related functions in their own module, provides a structure for future mobile ports
koda
parents:
diff
changeset
|
90 |
{$ENDIF} |
2560731c860d
move all mobile-related functions in their own module, provides a structure for future mobile ports
koda
parents:
diff
changeset
|
91 |
end; |
2560731c860d
move all mobile-related functions in their own module, provides a structure for future mobile ports
koda
parents:
diff
changeset
|
92 |
|
2560731c860d
move all mobile-related functions in their own module, provides a structure for future mobile ports
koda
parents:
diff
changeset
|
93 |
|
2560731c860d
move all mobile-related functions in their own module, provides a structure for future mobile ports
koda
parents:
diff
changeset
|
94 |
end. |