author | koda |
Tue, 12 Jan 2010 07:32:15 +0000 | |
changeset 2692 | ce9992075118 |
parent 2691 | c0da3a98c01c |
child 2698 | 90585aba87ad |
permissions | -rw-r--r-- |
2690 | 1 |
(* |
2 |
* PascalExports.pas |
|
3 |
* hwengine |
|
4 |
* |
|
5 |
* Created by Vittorio on 09/01/10. |
|
6 |
* Copyright 2009 __MyCompanyName__. All rights reserved. |
|
7 |
* |
|
8 |
*) |
|
9 |
||
10 |
||
11 |
{$INCLUDE "options.inc"} |
|
12 |
||
13 |
unit PascalExports; |
|
14 |
||
15 |
interface |
|
16 |
uses uKeys, uConsole; |
|
17 |
||
2691 | 18 |
{$INCLUDE "proto.inc"} |
19 |
||
2690 | 20 |
{$IFDEF IPHONEOS} |
21 |
// called by pascal code, they deal with the objc code |
|
22 |
function IPH_getDocumentsPath: PChar; cdecl; external; |
|
23 |
procedure IPH_showControls; cdecl; external; |
|
2692
ce9992075118
better network support + initial work for returning to frontend
koda
parents:
2691
diff
changeset
|
24 |
procedure IPH_returnFrontend; cdecl; external; |
2690 | 25 |
|
2691 | 26 |
// retrieve protocol information |
27 |
function HW_protoVer: LongInt; cdecl; export; |
|
28 |
||
2690 | 29 |
// called by the touch functions (SDL_uikitview.m) |
30 |
// they emulate user interaction from mouse or keyboard |
|
31 |
procedure HW_click; cdecl; export; |
|
32 |
procedure HW_zoomIn; cdecl; export; |
|
33 |
procedure HW_zoomOut; cdecl; export; |
|
34 |
procedure HW_zoomReset; cdecl; export; |
|
35 |
procedure HW_ammoMenu; cdecl; export; |
|
36 |
procedure HW_allKeysUp; cdecl; export; |
|
37 |
procedure HW_walkLeft; cdecl; export; |
|
38 |
procedure HW_walkRight; cdecl; export; |
|
39 |
procedure HW_aimUp; cdecl; export; |
|
40 |
procedure HW_aimDown; cdecl; export; |
|
41 |
procedure HW_shoot; cdecl; export; |
|
42 |
procedure HW_whereIsHog; cdecl; export; |
|
43 |
||
44 |
{$ENDIF} |
|
45 |
||
46 |
implementation |
|
47 |
||
48 |
{$IFDEF IPHONEOS} |
|
2691 | 49 |
function HW_protoVer: LongInt; cdecl; export; |
50 |
begin |
|
2692
ce9992075118
better network support + initial work for returning to frontend
koda
parents:
2691
diff
changeset
|
51 |
WriteLnToConsole('HW - protocol version'); |
2691 | 52 |
HW_protoVer:= cNetProtoVersion; |
53 |
end; |
|
54 |
||
2690 | 55 |
procedure HW_click; cdecl; export; |
56 |
begin |
|
57 |
WriteLnToConsole('HW - left click'); |
|
58 |
leftClick:= true; |
|
59 |
exit |
|
60 |
end; |
|
61 |
||
62 |
procedure HW_zoomIn; cdecl; export; |
|
63 |
begin |
|
64 |
WriteLnToConsole('HW - zooming in'); |
|
65 |
wheelUp:= true; |
|
66 |
exit |
|
67 |
end; |
|
68 |
||
69 |
procedure HW_zoomOut; cdecl; export; |
|
70 |
begin |
|
71 |
WriteLnToConsole('HW - zooming out'); |
|
72 |
wheelDown:= true; |
|
73 |
exit |
|
74 |
end; |
|
75 |
||
76 |
procedure HW_zoomReset; cdecl; export; |
|
77 |
begin |
|
78 |
WriteLnToConsole('HW - reset zoom'); |
|
79 |
middleClick:= true; |
|
80 |
exit |
|
81 |
end; |
|
82 |
||
83 |
procedure HW_ammoMenu; cdecl; export; |
|
84 |
begin |
|
85 |
WriteLnToConsole('HW - right click'); |
|
86 |
rightClick:= true; |
|
87 |
exit |
|
88 |
end; |
|
89 |
||
90 |
procedure HW_allKeysUp; cdecl; export; |
|
91 |
begin |
|
92 |
WriteLnToConsole('HW - resetting keyboard'); |
|
93 |
||
94 |
upKey:= false; |
|
95 |
downKey:= false; |
|
96 |
leftKey:= false; |
|
97 |
rightKey:= false; |
|
98 |
spaceKey:= false; |
|
99 |
exit |
|
100 |
end; |
|
101 |
||
102 |
procedure HW_walkLeft; cdecl; export; |
|
103 |
begin |
|
104 |
WriteLnToConsole('HW - walking left'); |
|
105 |
leftKey:= true; |
|
106 |
exit |
|
107 |
end; |
|
108 |
||
109 |
procedure HW_walkRight; cdecl; export; |
|
110 |
begin |
|
111 |
WriteLnToConsole('HW - walking right'); |
|
112 |
rightKey:= true; |
|
113 |
exit |
|
114 |
end; |
|
115 |
||
116 |
procedure HW_aimUp; cdecl; export; |
|
117 |
begin |
|
118 |
WriteLnToConsole('HW - aiming upwards'); |
|
119 |
upKey:= true; |
|
120 |
exit |
|
121 |
end; |
|
122 |
||
123 |
procedure HW_aimDown; cdecl; export; |
|
124 |
begin |
|
125 |
WriteLnToConsole('HW - aiming downwards'); |
|
126 |
downKey:= true; |
|
127 |
exit |
|
128 |
end; |
|
129 |
||
130 |
procedure HW_shoot; cdecl; export; |
|
131 |
begin |
|
132 |
WriteLnToConsole('HW - shooting'); |
|
133 |
spaceKey:= true; |
|
134 |
exit |
|
135 |
end; |
|
136 |
||
137 |
procedure HW_whereIsHog; cdecl; export; |
|
138 |
var Xcoord, Ycoord: LongInt; |
|
139 |
begin |
|
140 |
//Xcoord:= Gear^.dX + WorldDx; |
|
141 |
WriteLnToConsole('HW - hog is at x: ' + ' y:'); |
|
142 |
||
143 |
exit |
|
144 |
end; |
|
145 |
{$ENDIF} |
|
146 |
||
147 |
end. |
|
148 |