author | koda |
Sun, 24 Jan 2010 19:52:30 +0000 | |
changeset 2714 | c85ffe57d971 |
parent 2698 | 90585aba87ad |
child 2716 | b9ca1bfca24f |
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 |
|
2714
c85ffe57d971
update iphone frontend to the new (silly) sdl api, code cleanups for other sections
koda
parents:
2698
diff
changeset
|
22 |
procedure IPH_CreateWindowsFromObjc; cdecl; external; |
2690 | 23 |
function IPH_getDocumentsPath: PChar; cdecl; external; |
24 |
procedure IPH_showControls; cdecl; external; |
|
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 |
|
51 |
HW_protoVer:= cNetProtoVersion; |
|
52 |
end; |
|
53 |
||
2698 | 54 |
|
2690 | 55 |
procedure HW_click; cdecl; export; |
56 |
begin |
|
57 |
leftClick:= true; |
|
58 |
end; |
|
59 |
||
60 |
procedure HW_zoomIn; cdecl; export; |
|
61 |
begin |
|
62 |
wheelUp:= true; |
|
63 |
end; |
|
64 |
||
65 |
procedure HW_zoomOut; cdecl; export; |
|
66 |
begin |
|
67 |
wheelDown:= true; |
|
68 |
end; |
|
69 |
||
70 |
procedure HW_zoomReset; cdecl; export; |
|
71 |
begin |
|
72 |
middleClick:= true; |
|
73 |
end; |
|
74 |
||
75 |
procedure HW_ammoMenu; cdecl; export; |
|
76 |
begin |
|
77 |
rightClick:= true; |
|
78 |
end; |
|
79 |
||
80 |
procedure HW_allKeysUp; cdecl; export; |
|
81 |
begin |
|
82 |
upKey:= false; |
|
83 |
downKey:= false; |
|
84 |
leftKey:= false; |
|
85 |
rightKey:= false; |
|
86 |
spaceKey:= false; |
|
87 |
end; |
|
88 |
||
89 |
procedure HW_walkLeft; cdecl; export; |
|
90 |
begin |
|
91 |
leftKey:= true; |
|
92 |
end; |
|
93 |
||
94 |
procedure HW_walkRight; cdecl; export; |
|
95 |
begin |
|
96 |
rightKey:= true; |
|
97 |
end; |
|
98 |
||
99 |
procedure HW_aimUp; cdecl; export; |
|
100 |
begin |
|
101 |
upKey:= true; |
|
102 |
end; |
|
103 |
||
104 |
procedure HW_aimDown; cdecl; export; |
|
105 |
begin |
|
106 |
downKey:= true; |
|
107 |
end; |
|
108 |
||
109 |
procedure HW_shoot; cdecl; export; |
|
110 |
begin |
|
111 |
spaceKey:= true; |
|
112 |
end; |
|
113 |
||
114 |
procedure HW_whereIsHog; cdecl; export; |
|
2698 | 115 |
//var Xcoord, Ycoord: LongInt; |
2690 | 116 |
begin |
117 |
//Xcoord:= Gear^.dX + WorldDx; |
|
118 |
WriteLnToConsole('HW - hog is at x: ' + ' y:'); |
|
119 |
||
120 |
exit |
|
121 |
end; |
|
122 |
{$ENDIF} |
|
123 |
||
124 |
end. |
|
125 |