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 |
|
2698
|
53 |
|
2690
|
54 |
procedure HW_click; cdecl; export;
|
|
55 |
begin
|
|
56 |
leftClick:= true;
|
|
57 |
end;
|
|
58 |
|
|
59 |
procedure HW_zoomIn; cdecl; export;
|
|
60 |
begin
|
|
61 |
wheelUp:= true;
|
|
62 |
end;
|
|
63 |
|
|
64 |
procedure HW_zoomOut; cdecl; export;
|
|
65 |
begin
|
|
66 |
wheelDown:= true;
|
|
67 |
end;
|
|
68 |
|
|
69 |
procedure HW_zoomReset; cdecl; export;
|
|
70 |
begin
|
|
71 |
middleClick:= true;
|
|
72 |
end;
|
|
73 |
|
|
74 |
procedure HW_ammoMenu; cdecl; export;
|
|
75 |
begin
|
|
76 |
rightClick:= true;
|
|
77 |
end;
|
|
78 |
|
|
79 |
procedure HW_allKeysUp; cdecl; export;
|
|
80 |
begin
|
|
81 |
upKey:= false;
|
|
82 |
downKey:= false;
|
|
83 |
leftKey:= false;
|
|
84 |
rightKey:= false;
|
|
85 |
spaceKey:= false;
|
|
86 |
end;
|
|
87 |
|
|
88 |
procedure HW_walkLeft; cdecl; export;
|
|
89 |
begin
|
|
90 |
leftKey:= true;
|
|
91 |
end;
|
|
92 |
|
|
93 |
procedure HW_walkRight; cdecl; export;
|
|
94 |
begin
|
|
95 |
rightKey:= true;
|
|
96 |
end;
|
|
97 |
|
|
98 |
procedure HW_aimUp; cdecl; export;
|
|
99 |
begin
|
|
100 |
upKey:= true;
|
|
101 |
end;
|
|
102 |
|
|
103 |
procedure HW_aimDown; cdecl; export;
|
|
104 |
begin
|
|
105 |
downKey:= true;
|
|
106 |
end;
|
|
107 |
|
|
108 |
procedure HW_shoot; cdecl; export;
|
|
109 |
begin
|
|
110 |
spaceKey:= true;
|
|
111 |
end;
|
|
112 |
|
|
113 |
procedure HW_whereIsHog; cdecl; export;
|
2698
|
114 |
//var Xcoord, Ycoord: LongInt;
|
2690
|
115 |
begin
|
|
116 |
//Xcoord:= Gear^.dX + WorldDx;
|
|
117 |
WriteLnToConsole('HW - hog is at x: ' + ' y:');
|
|
118 |
|
|
119 |
exit
|
|
120 |
end;
|
|
121 |
{$ENDIF}
|
|
122 |
|
|
123 |
end.
|
|
124 |
|