author | smxx |
Sat, 27 Mar 2010 17:22:33 +0000 | |
changeset 3115 | 831bd0f7050d |
parent 3063 | 0092dc37fbd6 |
child 3245 | 252be02536ab |
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 |
|
3063 | 16 |
uses uKeys, uConsole, hwengine; |
2690 | 17 |
|
2924 | 18 |
{$INCLUDE "config.inc"} |
2691 | 19 |
|
2690 | 20 |
implementation |
21 |
||
2803
1f446fc5c8ec
allow to compile engine as library with HWLIBRARY symbol
koda
parents:
2799
diff
changeset
|
22 |
{$IFDEF HWLIBRARY} |
3063 | 23 |
// retrieve protocol information |
2799 | 24 |
procedure HW_versionInfo(netProto: PShortInt; versionStr: PString); cdecl; export; |
2691 | 25 |
begin |
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2924
diff
changeset
|
26 |
if netProto <> nil then netProto^:= cNetProtoVersion; |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2924
diff
changeset
|
27 |
if versionStr <> nil then versionStr^:= shortstring(cVersionString); |
2691 | 28 |
end; |
29 |
||
2690 | 30 |
procedure HW_click; cdecl; export; |
31 |
begin |
|
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2924
diff
changeset
|
32 |
leftClick:= true; |
2690 | 33 |
end; |
34 |
||
35 |
procedure HW_zoomIn; cdecl; export; |
|
36 |
begin |
|
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2924
diff
changeset
|
37 |
wheelUp:= true; |
2690 | 38 |
end; |
39 |
||
40 |
procedure HW_zoomOut; cdecl; export; |
|
41 |
begin |
|
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2924
diff
changeset
|
42 |
wheelDown:= true; |
2690 | 43 |
end; |
44 |
||
45 |
procedure HW_zoomReset; cdecl; export; |
|
46 |
begin |
|
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2924
diff
changeset
|
47 |
middleClick:= true; |
2690 | 48 |
end; |
49 |
||
50 |
procedure HW_ammoMenu; cdecl; export; |
|
51 |
begin |
|
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2924
diff
changeset
|
52 |
rightClick:= true; |
2690 | 53 |
end; |
54 |
||
55 |
procedure HW_allKeysUp; cdecl; export; |
|
56 |
begin |
|
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2924
diff
changeset
|
57 |
// set all keys to released |
3040
3e7f4a30e18a
Insert commit message here (to get along with palewolf)
koda
parents:
3015
diff
changeset
|
58 |
uKeys.initModule; |
2690 | 59 |
end; |
60 |
||
61 |
procedure HW_walkLeft; cdecl; export; |
|
62 |
begin |
|
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2924
diff
changeset
|
63 |
leftKey:= true; |
2690 | 64 |
end; |
65 |
||
66 |
procedure HW_walkRight; cdecl; export; |
|
67 |
begin |
|
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2924
diff
changeset
|
68 |
rightKey:= true; |
2690 | 69 |
end; |
70 |
||
71 |
procedure HW_aimUp; cdecl; export; |
|
72 |
begin |
|
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2924
diff
changeset
|
73 |
upKey:= true; |
2690 | 74 |
end; |
75 |
||
76 |
procedure HW_aimDown; cdecl; export; |
|
77 |
begin |
|
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2924
diff
changeset
|
78 |
downKey:= true; |
2690 | 79 |
end; |
80 |
||
81 |
procedure HW_shoot; cdecl; export; |
|
82 |
begin |
|
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2924
diff
changeset
|
83 |
spaceKey:= true; |
2690 | 84 |
end; |
85 |
||
3015 | 86 |
procedure HW_jump; cdecl; export; |
87 |
begin |
|
88 |
enterKey:= true; |
|
89 |
end; |
|
90 |
||
91 |
procedure HW_backjump; cdecl; export; |
|
92 |
begin |
|
93 |
backspaceKey:= true; |
|
94 |
end; |
|
95 |
||
2754
ad4f81fbfb76
touchinput works, invisible buttons added and initial support for chat
koda
parents:
2716
diff
changeset
|
96 |
procedure HW_chat; cdecl; export; |
ad4f81fbfb76
touchinput works, invisible buttons added and initial support for chat
koda
parents:
2716
diff
changeset
|
97 |
begin |
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2924
diff
changeset
|
98 |
chatAction:= true; |
2754
ad4f81fbfb76
touchinput works, invisible buttons added and initial support for chat
koda
parents:
2716
diff
changeset
|
99 |
end; |
ad4f81fbfb76
touchinput works, invisible buttons added and initial support for chat
koda
parents:
2716
diff
changeset
|
100 |
|
ad4f81fbfb76
touchinput works, invisible buttons added and initial support for chat
koda
parents:
2716
diff
changeset
|
101 |
procedure HW_tab; cdecl; export; |
ad4f81fbfb76
touchinput works, invisible buttons added and initial support for chat
koda
parents:
2716
diff
changeset
|
102 |
begin |
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2924
diff
changeset
|
103 |
switchAction:= true; |
2754
ad4f81fbfb76
touchinput works, invisible buttons added and initial support for chat
koda
parents:
2716
diff
changeset
|
104 |
end; |
ad4f81fbfb76
touchinput works, invisible buttons added and initial support for chat
koda
parents:
2716
diff
changeset
|
105 |
|
2805 | 106 |
procedure HW_pause; cdecl; export; |
107 |
begin |
|
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2924
diff
changeset
|
108 |
pauseAction:= true; |
2805 | 109 |
end; |
110 |
||
2690 | 111 |
procedure HW_whereIsHog; cdecl; export; |
2698 | 112 |
//var Xcoord, Ycoord: LongInt; |
2690 | 113 |
begin |
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2924
diff
changeset
|
114 |
//Xcoord:= Gear^.dX + WorldDx; |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2924
diff
changeset
|
115 |
WriteLnToConsole('HW - hog is at x: ' + ' y:'); |
2690 | 116 |
|
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2924
diff
changeset
|
117 |
exit |
2690 | 118 |
end; |
3063 | 119 |
|
120 |
procedure HW_terminate(closeFrontend: boolean); cdecl; export; |
|
121 |
begin |
|
122 |
isTerminated:= true; |
|
123 |
if closeFrontend then alsoShutdownFrontend:= true; |
|
124 |
end; |
|
2690 | 125 |
{$ENDIF} |
126 |
||
127 |
end. |
|
128 |