author | koda |
Sat, 13 Feb 2010 01:56:35 +0000 | |
changeset 2803 | 1f446fc5c8ec |
parent 2799 | 558b29bf00c5 |
child 2805 | 36a8cebb91e8 |
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; |
|
2803
1f446fc5c8ec
allow to compile engine as library with HWLIBRARY symbol
koda
parents:
2799
diff
changeset
|
24 |
{$ENDIF} |
2690 | 25 |
|
2803
1f446fc5c8ec
allow to compile engine as library with HWLIBRARY symbol
koda
parents:
2799
diff
changeset
|
26 |
{$IFDEF HWLIBRARY} |
2691 | 27 |
// retrieve protocol information |
2799 | 28 |
procedure HW_versionInfo(netProto: PShortInt; versionStr: PString); cdecl; export; |
2691 | 29 |
|
2690 | 30 |
// called by the touch functions (SDL_uikitview.m) |
31 |
// they emulate user interaction from mouse or keyboard |
|
32 |
procedure HW_click; cdecl; export; |
|
33 |
procedure HW_zoomIn; cdecl; export; |
|
34 |
procedure HW_zoomOut; cdecl; export; |
|
35 |
procedure HW_zoomReset; cdecl; export; |
|
36 |
procedure HW_ammoMenu; cdecl; export; |
|
37 |
procedure HW_allKeysUp; cdecl; export; |
|
38 |
procedure HW_walkLeft; cdecl; export; |
|
39 |
procedure HW_walkRight; cdecl; export; |
|
40 |
procedure HW_aimUp; cdecl; export; |
|
41 |
procedure HW_aimDown; cdecl; export; |
|
42 |
procedure HW_shoot; cdecl; export; |
|
43 |
procedure HW_whereIsHog; cdecl; export; |
|
2754
ad4f81fbfb76
touchinput works, invisible buttons added and initial support for chat
koda
parents:
2716
diff
changeset
|
44 |
procedure HW_chat; cdecl; export; |
ad4f81fbfb76
touchinput works, invisible buttons added and initial support for chat
koda
parents:
2716
diff
changeset
|
45 |
procedure HW_tab; cdecl; export; |
2690 | 46 |
{$ENDIF} |
47 |
||
48 |
implementation |
|
49 |
||
2803
1f446fc5c8ec
allow to compile engine as library with HWLIBRARY symbol
koda
parents:
2799
diff
changeset
|
50 |
{$IFDEF HWLIBRARY} |
2799 | 51 |
procedure HW_versionInfo(netProto: PShortInt; versionStr: PString); cdecl; export; |
2691 | 52 |
begin |
2799 | 53 |
if netProto <> nil then netProto^:= cNetProtoVersion; |
54 |
if versionStr <> nil then versionStr^:= string(cVersionString); |
|
2691 | 55 |
end; |
56 |
||
2690 | 57 |
procedure HW_click; cdecl; export; |
58 |
begin |
|
59 |
leftClick:= true; |
|
60 |
end; |
|
61 |
||
62 |
procedure HW_zoomIn; cdecl; export; |
|
63 |
begin |
|
64 |
wheelUp:= true; |
|
65 |
end; |
|
66 |
||
67 |
procedure HW_zoomOut; cdecl; export; |
|
68 |
begin |
|
69 |
wheelDown:= true; |
|
70 |
end; |
|
71 |
||
72 |
procedure HW_zoomReset; cdecl; export; |
|
73 |
begin |
|
74 |
middleClick:= true; |
|
75 |
end; |
|
76 |
||
77 |
procedure HW_ammoMenu; cdecl; export; |
|
78 |
begin |
|
79 |
rightClick:= true; |
|
80 |
end; |
|
81 |
||
82 |
procedure HW_allKeysUp; cdecl; export; |
|
83 |
begin |
|
2754
ad4f81fbfb76
touchinput works, invisible buttons added and initial support for chat
koda
parents:
2716
diff
changeset
|
84 |
// set all keys to released |
ad4f81fbfb76
touchinput works, invisible buttons added and initial support for chat
koda
parents:
2716
diff
changeset
|
85 |
init_uKeys(); |
2690 | 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 |
||
2754
ad4f81fbfb76
touchinput works, invisible buttons added and initial support for chat
koda
parents:
2716
diff
changeset
|
113 |
procedure HW_chat; cdecl; export; |
ad4f81fbfb76
touchinput works, invisible buttons added and initial support for chat
koda
parents:
2716
diff
changeset
|
114 |
begin |
ad4f81fbfb76
touchinput works, invisible buttons added and initial support for chat
koda
parents:
2716
diff
changeset
|
115 |
chatAction:= true; |
ad4f81fbfb76
touchinput works, invisible buttons added and initial support for chat
koda
parents:
2716
diff
changeset
|
116 |
end; |
ad4f81fbfb76
touchinput works, invisible buttons added and initial support for chat
koda
parents:
2716
diff
changeset
|
117 |
|
ad4f81fbfb76
touchinput works, invisible buttons added and initial support for chat
koda
parents:
2716
diff
changeset
|
118 |
procedure HW_tab; cdecl; export; |
ad4f81fbfb76
touchinput works, invisible buttons added and initial support for chat
koda
parents:
2716
diff
changeset
|
119 |
begin |
ad4f81fbfb76
touchinput works, invisible buttons added and initial support for chat
koda
parents:
2716
diff
changeset
|
120 |
switchAction:= true; |
ad4f81fbfb76
touchinput works, invisible buttons added and initial support for chat
koda
parents:
2716
diff
changeset
|
121 |
end; |
ad4f81fbfb76
touchinput works, invisible buttons added and initial support for chat
koda
parents:
2716
diff
changeset
|
122 |
|
2690 | 123 |
procedure HW_whereIsHog; cdecl; export; |
2698 | 124 |
//var Xcoord, Ycoord: LongInt; |
2690 | 125 |
begin |
126 |
//Xcoord:= Gear^.dX + WorldDx; |
|
127 |
WriteLnToConsole('HW - hog is at x: ' + ' y:'); |
|
128 |
||
129 |
exit |
|
130 |
end; |
|
131 |
{$ENDIF} |
|
132 |
||
133 |
end. |
|
134 |