author | nemo |
Sat, 03 Apr 2010 06:28:36 +0000 | |
changeset 3278 | 39eacae90580 |
parent 3245 | 252be02536ab |
child 3347 | 5d0ac8197eb7 |
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 |
3245
252be02536ab
fix an error in passing strings between ObjC and Pascal
koda
parents:
3063
diff
changeset
|
24 |
procedure HW_versionInfo(netProto: PShortInt; versionStr: Ppchar); cdecl; export; |
2691 | 25 |
begin |
3245
252be02536ab
fix an error in passing strings between ObjC and Pascal
koda
parents:
3063
diff
changeset
|
26 |
// http://bugs.freepascal.org/view.php?id=16156 |
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2924
diff
changeset
|
27 |
if netProto <> nil then netProto^:= cNetProtoVersion; |
3245
252be02536ab
fix an error in passing strings between ObjC and Pascal
koda
parents:
3063
diff
changeset
|
28 |
if versionStr <> nil then versionStr^:= cVersionString; |
2691 | 29 |
end; |
30 |
||
2690 | 31 |
procedure HW_click; cdecl; export; |
32 |
begin |
|
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2924
diff
changeset
|
33 |
leftClick:= true; |
2690 | 34 |
end; |
35 |
||
36 |
procedure HW_zoomIn; cdecl; export; |
|
37 |
begin |
|
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2924
diff
changeset
|
38 |
wheelUp:= true; |
2690 | 39 |
end; |
40 |
||
41 |
procedure HW_zoomOut; cdecl; export; |
|
42 |
begin |
|
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2924
diff
changeset
|
43 |
wheelDown:= true; |
2690 | 44 |
end; |
45 |
||
46 |
procedure HW_zoomReset; cdecl; export; |
|
47 |
begin |
|
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2924
diff
changeset
|
48 |
middleClick:= true; |
2690 | 49 |
end; |
50 |
||
51 |
procedure HW_ammoMenu; cdecl; export; |
|
52 |
begin |
|
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2924
diff
changeset
|
53 |
rightClick:= true; |
2690 | 54 |
end; |
55 |
||
56 |
procedure HW_allKeysUp; cdecl; export; |
|
57 |
begin |
|
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2924
diff
changeset
|
58 |
// set all keys to released |
3040
3e7f4a30e18a
Insert commit message here (to get along with palewolf)
koda
parents:
3015
diff
changeset
|
59 |
uKeys.initModule; |
2690 | 60 |
end; |
61 |
||
62 |
procedure HW_walkLeft; cdecl; export; |
|
63 |
begin |
|
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2924
diff
changeset
|
64 |
leftKey:= true; |
2690 | 65 |
end; |
66 |
||
67 |
procedure HW_walkRight; cdecl; export; |
|
68 |
begin |
|
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2924
diff
changeset
|
69 |
rightKey:= true; |
2690 | 70 |
end; |
71 |
||
72 |
procedure HW_aimUp; cdecl; export; |
|
73 |
begin |
|
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2924
diff
changeset
|
74 |
upKey:= true; |
2690 | 75 |
end; |
76 |
||
77 |
procedure HW_aimDown; cdecl; export; |
|
78 |
begin |
|
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2924
diff
changeset
|
79 |
downKey:= true; |
2690 | 80 |
end; |
81 |
||
82 |
procedure HW_shoot; cdecl; export; |
|
83 |
begin |
|
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2924
diff
changeset
|
84 |
spaceKey:= true; |
2690 | 85 |
end; |
86 |
||
3015 | 87 |
procedure HW_jump; cdecl; export; |
88 |
begin |
|
89 |
enterKey:= true; |
|
90 |
end; |
|
91 |
||
92 |
procedure HW_backjump; cdecl; export; |
|
93 |
begin |
|
94 |
backspaceKey:= true; |
|
95 |
end; |
|
96 |
||
2754
ad4f81fbfb76
touchinput works, invisible buttons added and initial support for chat
koda
parents:
2716
diff
changeset
|
97 |
procedure HW_chat; cdecl; export; |
ad4f81fbfb76
touchinput works, invisible buttons added and initial support for chat
koda
parents:
2716
diff
changeset
|
98 |
begin |
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2924
diff
changeset
|
99 |
chatAction:= true; |
2754
ad4f81fbfb76
touchinput works, invisible buttons added and initial support for chat
koda
parents:
2716
diff
changeset
|
100 |
end; |
ad4f81fbfb76
touchinput works, invisible buttons added and initial support for chat
koda
parents:
2716
diff
changeset
|
101 |
|
ad4f81fbfb76
touchinput works, invisible buttons added and initial support for chat
koda
parents:
2716
diff
changeset
|
102 |
procedure HW_tab; cdecl; export; |
ad4f81fbfb76
touchinput works, invisible buttons added and initial support for chat
koda
parents:
2716
diff
changeset
|
103 |
begin |
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2924
diff
changeset
|
104 |
switchAction:= true; |
2754
ad4f81fbfb76
touchinput works, invisible buttons added and initial support for chat
koda
parents:
2716
diff
changeset
|
105 |
end; |
ad4f81fbfb76
touchinput works, invisible buttons added and initial support for chat
koda
parents:
2716
diff
changeset
|
106 |
|
2805 | 107 |
procedure HW_pause; cdecl; export; |
108 |
begin |
|
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2924
diff
changeset
|
109 |
pauseAction:= true; |
2805 | 110 |
end; |
111 |
||
2690 | 112 |
procedure HW_whereIsHog; cdecl; export; |
2698 | 113 |
//var Xcoord, Ycoord: LongInt; |
2690 | 114 |
begin |
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2924
diff
changeset
|
115 |
//Xcoord:= Gear^.dX + WorldDx; |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2924
diff
changeset
|
116 |
WriteLnToConsole('HW - hog is at x: ' + ' y:'); |
2690 | 117 |
|
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
2924
diff
changeset
|
118 |
exit |
2690 | 119 |
end; |
3063 | 120 |
|
121 |
procedure HW_terminate(closeFrontend: boolean); cdecl; export; |
|
122 |
begin |
|
123 |
isTerminated:= true; |
|
124 |
if closeFrontend then alsoShutdownFrontend:= true; |
|
125 |
end; |
|
2690 | 126 |
{$ENDIF} |
127 |
||
128 |
end. |
|
129 |