author | nemo |
Sun, 14 Mar 2010 14:59:08 +0000 | |
changeset 2986 | c0c91cd3f423 |
parent 2948 | 3f21a9dc93d0 |
child 3015 | 20a9c8160e82 |
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 |
||
2924 | 18 |
{$INCLUDE "config.inc"} |
2691 | 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; |
2805 | 45 |
procedure HW_pause; cdecl; export; |
2754
ad4f81fbfb76
touchinput works, invisible buttons added and initial support for chat
koda
parents:
2716
diff
changeset
|
46 |
procedure HW_tab; cdecl; export; |
2690 | 47 |
{$ENDIF} |
48 |
||
49 |
implementation |
|
50 |
||
2803
1f446fc5c8ec
allow to compile engine as library with HWLIBRARY symbol
koda
parents:
2799
diff
changeset
|
51 |
{$IFDEF HWLIBRARY} |
2799 | 52 |
procedure HW_versionInfo(netProto: PShortInt; versionStr: PString); cdecl; export; |
2691 | 53 |
begin |
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2924
diff
changeset
|
54 |
if netProto <> nil then netProto^:= cNetProtoVersion; |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2924
diff
changeset
|
55 |
if versionStr <> nil then versionStr^:= shortstring(cVersionString); |
2691 | 56 |
end; |
57 |
||
2690 | 58 |
procedure HW_click; cdecl; export; |
59 |
begin |
|
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2924
diff
changeset
|
60 |
leftClick:= true; |
2690 | 61 |
end; |
62 |
||
63 |
procedure HW_zoomIn; cdecl; export; |
|
64 |
begin |
|
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2924
diff
changeset
|
65 |
wheelUp:= true; |
2690 | 66 |
end; |
67 |
||
68 |
procedure HW_zoomOut; cdecl; export; |
|
69 |
begin |
|
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2924
diff
changeset
|
70 |
wheelDown:= true; |
2690 | 71 |
end; |
72 |
||
73 |
procedure HW_zoomReset; cdecl; export; |
|
74 |
begin |
|
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2924
diff
changeset
|
75 |
middleClick:= true; |
2690 | 76 |
end; |
77 |
||
78 |
procedure HW_ammoMenu; cdecl; export; |
|
79 |
begin |
|
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2924
diff
changeset
|
80 |
rightClick:= true; |
2690 | 81 |
end; |
82 |
||
83 |
procedure HW_allKeysUp; cdecl; export; |
|
84 |
begin |
|
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2924
diff
changeset
|
85 |
// set all keys to released |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2924
diff
changeset
|
86 |
init_uKeys(); |
2690 | 87 |
end; |
88 |
||
89 |
procedure HW_walkLeft; cdecl; export; |
|
90 |
begin |
|
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2924
diff
changeset
|
91 |
leftKey:= true; |
2690 | 92 |
end; |
93 |
||
94 |
procedure HW_walkRight; cdecl; export; |
|
95 |
begin |
|
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2924
diff
changeset
|
96 |
rightKey:= true; |
2690 | 97 |
end; |
98 |
||
99 |
procedure HW_aimUp; cdecl; export; |
|
100 |
begin |
|
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2924
diff
changeset
|
101 |
upKey:= true; |
2690 | 102 |
end; |
103 |
||
104 |
procedure HW_aimDown; cdecl; export; |
|
105 |
begin |
|
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2924
diff
changeset
|
106 |
downKey:= true; |
2690 | 107 |
end; |
108 |
||
109 |
procedure HW_shoot; cdecl; export; |
|
110 |
begin |
|
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2924
diff
changeset
|
111 |
spaceKey:= true; |
2690 | 112 |
end; |
113 |
||
2754
ad4f81fbfb76
touchinput works, invisible buttons added and initial support for chat
koda
parents:
2716
diff
changeset
|
114 |
procedure HW_chat; cdecl; export; |
ad4f81fbfb76
touchinput works, invisible buttons added and initial support for chat
koda
parents:
2716
diff
changeset
|
115 |
begin |
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2924
diff
changeset
|
116 |
chatAction:= true; |
2754
ad4f81fbfb76
touchinput works, invisible buttons added and initial support for chat
koda
parents:
2716
diff
changeset
|
117 |
end; |
ad4f81fbfb76
touchinput works, invisible buttons added and initial support for chat
koda
parents:
2716
diff
changeset
|
118 |
|
ad4f81fbfb76
touchinput works, invisible buttons added and initial support for chat
koda
parents:
2716
diff
changeset
|
119 |
procedure HW_tab; cdecl; export; |
ad4f81fbfb76
touchinput works, invisible buttons added and initial support for chat
koda
parents:
2716
diff
changeset
|
120 |
begin |
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2924
diff
changeset
|
121 |
switchAction:= true; |
2754
ad4f81fbfb76
touchinput works, invisible buttons added and initial support for chat
koda
parents:
2716
diff
changeset
|
122 |
end; |
ad4f81fbfb76
touchinput works, invisible buttons added and initial support for chat
koda
parents:
2716
diff
changeset
|
123 |
|
2805 | 124 |
procedure HW_pause; cdecl; export; |
125 |
begin |
|
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2924
diff
changeset
|
126 |
pauseAction:= true; |
2805 | 127 |
end; |
128 |
||
2690 | 129 |
procedure HW_whereIsHog; cdecl; export; |
2698 | 130 |
//var Xcoord, Ycoord: LongInt; |
2690 | 131 |
begin |
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2924
diff
changeset
|
132 |
//Xcoord:= Gear^.dX + WorldDx; |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2924
diff
changeset
|
133 |
WriteLnToConsole('HW - hog is at x: ' + ' y:'); |
2690 | 134 |
|
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2924
diff
changeset
|
135 |
exit |
2690 | 136 |
end; |
137 |
{$ENDIF} |
|
138 |
||
139 |
end. |
|
140 |