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;
|
|
24 |
|
2691
|
25 |
// retrieve protocol information
|
|
26 |
function HW_protoVer: LongInt; cdecl; export;
|
|
27 |
|
2690
|
28 |
// called by the touch functions (SDL_uikitview.m)
|
|
29 |
// they emulate user interaction from mouse or keyboard
|
|
30 |
procedure HW_click; cdecl; export;
|
|
31 |
procedure HW_zoomIn; cdecl; export;
|
|
32 |
procedure HW_zoomOut; cdecl; export;
|
|
33 |
procedure HW_zoomReset; cdecl; export;
|
|
34 |
procedure HW_ammoMenu; cdecl; export;
|
|
35 |
procedure HW_allKeysUp; cdecl; export;
|
|
36 |
procedure HW_walkLeft; cdecl; export;
|
|
37 |
procedure HW_walkRight; cdecl; export;
|
|
38 |
procedure HW_aimUp; cdecl; export;
|
|
39 |
procedure HW_aimDown; cdecl; export;
|
|
40 |
procedure HW_shoot; cdecl; export;
|
|
41 |
procedure HW_whereIsHog; cdecl; export;
|
|
42 |
|
|
43 |
{$ENDIF}
|
|
44 |
|
|
45 |
implementation
|
|
46 |
|
|
47 |
{$IFDEF IPHONEOS}
|
2691
|
48 |
function HW_protoVer: LongInt; cdecl; export;
|
|
49 |
begin
|
|
50 |
HW_protoVer:= cNetProtoVersion;
|
|
51 |
end;
|
|
52 |
|
2690
|
53 |
procedure HW_click; cdecl; export;
|
|
54 |
begin
|
|
55 |
WriteLnToConsole('HW - left click');
|
|
56 |
leftClick:= true;
|
|
57 |
exit
|
|
58 |
end;
|
|
59 |
|
|
60 |
procedure HW_zoomIn; cdecl; export;
|
|
61 |
begin
|
|
62 |
WriteLnToConsole('HW - zooming in');
|
|
63 |
wheelUp:= true;
|
|
64 |
exit
|
|
65 |
end;
|
|
66 |
|
|
67 |
procedure HW_zoomOut; cdecl; export;
|
|
68 |
begin
|
|
69 |
WriteLnToConsole('HW - zooming out');
|
|
70 |
wheelDown:= true;
|
|
71 |
exit
|
|
72 |
end;
|
|
73 |
|
|
74 |
procedure HW_zoomReset; cdecl; export;
|
|
75 |
begin
|
|
76 |
WriteLnToConsole('HW - reset zoom');
|
|
77 |
middleClick:= true;
|
|
78 |
exit
|
|
79 |
end;
|
|
80 |
|
|
81 |
procedure HW_ammoMenu; cdecl; export;
|
|
82 |
begin
|
|
83 |
WriteLnToConsole('HW - right click');
|
|
84 |
rightClick:= true;
|
|
85 |
exit
|
|
86 |
end;
|
|
87 |
|
|
88 |
procedure HW_allKeysUp; cdecl; export;
|
|
89 |
begin
|
|
90 |
WriteLnToConsole('HW - resetting keyboard');
|
|
91 |
|
|
92 |
upKey:= false;
|
|
93 |
downKey:= false;
|
|
94 |
leftKey:= false;
|
|
95 |
rightKey:= false;
|
|
96 |
spaceKey:= false;
|
|
97 |
exit
|
|
98 |
end;
|
|
99 |
|
|
100 |
procedure HW_walkLeft; cdecl; export;
|
|
101 |
begin
|
|
102 |
WriteLnToConsole('HW - walking left');
|
|
103 |
leftKey:= true;
|
|
104 |
exit
|
|
105 |
end;
|
|
106 |
|
|
107 |
procedure HW_walkRight; cdecl; export;
|
|
108 |
begin
|
|
109 |
WriteLnToConsole('HW - walking right');
|
|
110 |
rightKey:= true;
|
|
111 |
exit
|
|
112 |
end;
|
|
113 |
|
|
114 |
procedure HW_aimUp; cdecl; export;
|
|
115 |
begin
|
|
116 |
WriteLnToConsole('HW - aiming upwards');
|
|
117 |
upKey:= true;
|
|
118 |
exit
|
|
119 |
end;
|
|
120 |
|
|
121 |
procedure HW_aimDown; cdecl; export;
|
|
122 |
begin
|
|
123 |
WriteLnToConsole('HW - aiming downwards');
|
|
124 |
downKey:= true;
|
|
125 |
exit
|
|
126 |
end;
|
|
127 |
|
|
128 |
procedure HW_shoot; cdecl; export;
|
|
129 |
begin
|
|
130 |
WriteLnToConsole('HW - shooting');
|
|
131 |
spaceKey:= true;
|
|
132 |
exit
|
|
133 |
end;
|
|
134 |
|
|
135 |
procedure HW_whereIsHog; cdecl; export;
|
|
136 |
var Xcoord, Ycoord: LongInt;
|
|
137 |
begin
|
|
138 |
//Xcoord:= Gear^.dX + WorldDx;
|
|
139 |
WriteLnToConsole('HW - hog is at x: ' + ' y:');
|
|
140 |
|
|
141 |
exit
|
|
142 |
end;
|
|
143 |
{$ENDIF}
|
|
144 |
|
|
145 |
end.
|
|
146 |
|