author | koda |
Sun, 16 May 2010 19:24:38 +0000 | |
changeset 3465 | b290993c0810 |
parent 3463 | 23c50be687a9 |
child 3523 | 6592fbb969da |
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 |
|
3463 | 16 |
uses uKeys, GLunit, uWorld, 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 |
||
3347 | 112 |
procedure HW_cursorUp(coefficient:LongInt); cdecl; export; |
113 |
begin |
|
114 |
coeff:= coefficient; |
|
115 |
cursorUp:= true; |
|
116 |
end; |
|
117 |
||
118 |
procedure HW_cursorDown(coefficient:LongInt); cdecl; export; |
|
2690 | 119 |
begin |
3347 | 120 |
coeff:= coefficient; |
121 |
cursorDown:= true; |
|
122 |
end; |
|
2690 | 123 |
|
3347 | 124 |
procedure HW_cursorLeft(coefficient:LongInt); cdecl; export; |
125 |
begin |
|
126 |
coeff:= coefficient; |
|
127 |
cursorLeft:= true; |
|
128 |
end; |
|
129 |
||
130 |
procedure HW_cursorRight(coefficient:LongInt); cdecl; export; |
|
131 |
begin |
|
132 |
coeff:= coefficient; |
|
133 |
cursorRight:= true; |
|
2690 | 134 |
end; |
3063 | 135 |
|
136 |
procedure HW_terminate(closeFrontend: boolean); cdecl; export; |
|
137 |
begin |
|
138 |
isTerminated:= true; |
|
139 |
if closeFrontend then alsoShutdownFrontend:= true; |
|
140 |
end; |
|
3395
095273ad0e08
adding a somewhat working autoration for ipad (uStore.pas and uWorld.pas got mixed in the last two commits)
koda
parents:
3347
diff
changeset
|
141 |
|
095273ad0e08
adding a somewhat working autoration for ipad (uStore.pas and uWorld.pas got mixed in the last two commits)
koda
parents:
3347
diff
changeset
|
142 |
procedure HW_setLandscape(landscape: boolean); cdecl; export; |
095273ad0e08
adding a somewhat working autoration for ipad (uStore.pas and uWorld.pas got mixed in the last two commits)
koda
parents:
3347
diff
changeset
|
143 |
begin |
095273ad0e08
adding a somewhat working autoration for ipad (uStore.pas and uWorld.pas got mixed in the last two commits)
koda
parents:
3347
diff
changeset
|
144 |
if landscape then |
095273ad0e08
adding a somewhat working autoration for ipad (uStore.pas and uWorld.pas got mixed in the last two commits)
koda
parents:
3347
diff
changeset
|
145 |
begin |
3463 | 146 |
cOffsetY:= 0; |
3395
095273ad0e08
adding a somewhat working autoration for ipad (uStore.pas and uWorld.pas got mixed in the last two commits)
koda
parents:
3347
diff
changeset
|
147 |
end |
095273ad0e08
adding a somewhat working autoration for ipad (uStore.pas and uWorld.pas got mixed in the last two commits)
koda
parents:
3347
diff
changeset
|
148 |
else |
095273ad0e08
adding a somewhat working autoration for ipad (uStore.pas and uWorld.pas got mixed in the last two commits)
koda
parents:
3347
diff
changeset
|
149 |
begin |
3463 | 150 |
cOffsetY:= 120; |
3395
095273ad0e08
adding a somewhat working autoration for ipad (uStore.pas and uWorld.pas got mixed in the last two commits)
koda
parents:
3347
diff
changeset
|
151 |
end; |
095273ad0e08
adding a somewhat working autoration for ipad (uStore.pas and uWorld.pas got mixed in the last two commits)
koda
parents:
3347
diff
changeset
|
152 |
end; |
2690 | 153 |
{$ENDIF} |
154 |
||
155 |
end. |
|
156 |