author | koda |
Wed, 10 Feb 2010 22:00:49 +0000 | |
changeset 2799 | 558b29bf00c5 |
parent 2754 | ad4f81fbfb76 |
child 2803 | 1f446fc5c8ec |
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; |
|
24 |
||
2691 | 25 |
// retrieve protocol information |
2799 | 26 |
procedure HW_versionInfo(netProto: PShortInt; versionStr: PString); cdecl; export; |
2691 | 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; |
|
2754
ad4f81fbfb76
touchinput works, invisible buttons added and initial support for chat
koda
parents:
2716
diff
changeset
|
42 |
procedure HW_chat; cdecl; export; |
ad4f81fbfb76
touchinput works, invisible buttons added and initial support for chat
koda
parents:
2716
diff
changeset
|
43 |
procedure HW_tab; cdecl; export; |
2690 | 44 |
{$ENDIF} |
45 |
||
46 |
implementation |
|
47 |
||
48 |
{$IFDEF IPHONEOS} |
|
2799 | 49 |
procedure HW_versionInfo(netProto: PShortInt; versionStr: PString); cdecl; export; |
2691 | 50 |
begin |
2799 | 51 |
if netProto <> nil then netProto^:= cNetProtoVersion; |
52 |
if versionStr <> nil then versionStr^:= string(cVersionString); |
|
2691 | 53 |
end; |
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 |
|
2754
ad4f81fbfb76
touchinput works, invisible buttons added and initial support for chat
koda
parents:
2716
diff
changeset
|
82 |
// set all keys to released |
ad4f81fbfb76
touchinput works, invisible buttons added and initial support for chat
koda
parents:
2716
diff
changeset
|
83 |
init_uKeys(); |
2690 | 84 |
end; |
85 |
||
86 |
procedure HW_walkLeft; cdecl; export; |
|
87 |
begin |
|
88 |
leftKey:= true; |
|
89 |
end; |
|
90 |
||
91 |
procedure HW_walkRight; cdecl; export; |
|
92 |
begin |
|
93 |
rightKey:= true; |
|
94 |
end; |
|
95 |
||
96 |
procedure HW_aimUp; cdecl; export; |
|
97 |
begin |
|
98 |
upKey:= true; |
|
99 |
end; |
|
100 |
||
101 |
procedure HW_aimDown; cdecl; export; |
|
102 |
begin |
|
103 |
downKey:= true; |
|
104 |
end; |
|
105 |
||
106 |
procedure HW_shoot; cdecl; export; |
|
107 |
begin |
|
108 |
spaceKey:= true; |
|
109 |
end; |
|
110 |
||
2754
ad4f81fbfb76
touchinput works, invisible buttons added and initial support for chat
koda
parents:
2716
diff
changeset
|
111 |
procedure HW_chat; cdecl; export; |
ad4f81fbfb76
touchinput works, invisible buttons added and initial support for chat
koda
parents:
2716
diff
changeset
|
112 |
begin |
ad4f81fbfb76
touchinput works, invisible buttons added and initial support for chat
koda
parents:
2716
diff
changeset
|
113 |
chatAction:= true; |
ad4f81fbfb76
touchinput works, invisible buttons added and initial support for chat
koda
parents:
2716
diff
changeset
|
114 |
end; |
ad4f81fbfb76
touchinput works, invisible buttons added and initial support for chat
koda
parents:
2716
diff
changeset
|
115 |
|
ad4f81fbfb76
touchinput works, invisible buttons added and initial support for chat
koda
parents:
2716
diff
changeset
|
116 |
procedure HW_tab; cdecl; export; |
ad4f81fbfb76
touchinput works, invisible buttons added and initial support for chat
koda
parents:
2716
diff
changeset
|
117 |
begin |
ad4f81fbfb76
touchinput works, invisible buttons added and initial support for chat
koda
parents:
2716
diff
changeset
|
118 |
switchAction:= true; |
ad4f81fbfb76
touchinput works, invisible buttons added and initial support for chat
koda
parents:
2716
diff
changeset
|
119 |
end; |
ad4f81fbfb76
touchinput works, invisible buttons added and initial support for chat
koda
parents:
2716
diff
changeset
|
120 |
|
2690 | 121 |
procedure HW_whereIsHog; cdecl; export; |
2698 | 122 |
//var Xcoord, Ycoord: LongInt; |
2690 | 123 |
begin |
124 |
//Xcoord:= Gear^.dX + WorldDx; |
|
125 |
WriteLnToConsole('HW - hog is at x: ' + ' y:'); |
|
126 |
||
127 |
exit |
|
128 |
end; |
|
129 |
{$ENDIF} |
|
130 |
||
131 |
end. |
|
132 |