19 |
19 |
20 {$IFDEF IPHONEOS} |
20 {$IFDEF IPHONEOS} |
21 // called by pascal code, they deal with the objc code |
21 // called by pascal code, they deal with the objc code |
22 function IPH_getDocumentsPath: PChar; cdecl; external; |
22 function IPH_getDocumentsPath: PChar; cdecl; external; |
23 procedure IPH_showControls; cdecl; external; |
23 procedure IPH_showControls; cdecl; external; |
24 procedure IPH_returnFrontend; cdecl; external; |
|
25 |
24 |
26 // retrieve protocol information |
25 // retrieve protocol information |
27 function HW_protoVer: LongInt; cdecl; export; |
26 function HW_protoVer: LongInt; cdecl; export; |
28 |
27 |
29 // called by the touch functions (SDL_uikitview.m) |
28 // called by the touch functions (SDL_uikitview.m) |
46 implementation |
45 implementation |
47 |
46 |
48 {$IFDEF IPHONEOS} |
47 {$IFDEF IPHONEOS} |
49 function HW_protoVer: LongInt; cdecl; export; |
48 function HW_protoVer: LongInt; cdecl; export; |
50 begin |
49 begin |
51 WriteLnToConsole('HW - protocol version'); |
|
52 HW_protoVer:= cNetProtoVersion; |
50 HW_protoVer:= cNetProtoVersion; |
53 end; |
51 end; |
54 |
52 |
|
53 |
55 procedure HW_click; cdecl; export; |
54 procedure HW_click; cdecl; export; |
56 begin |
55 begin |
57 WriteLnToConsole('HW - left click'); |
|
58 leftClick:= true; |
56 leftClick:= true; |
59 exit |
|
60 end; |
57 end; |
61 |
58 |
62 procedure HW_zoomIn; cdecl; export; |
59 procedure HW_zoomIn; cdecl; export; |
63 begin |
60 begin |
64 WriteLnToConsole('HW - zooming in'); |
|
65 wheelUp:= true; |
61 wheelUp:= true; |
66 exit |
|
67 end; |
62 end; |
68 |
63 |
69 procedure HW_zoomOut; cdecl; export; |
64 procedure HW_zoomOut; cdecl; export; |
70 begin |
65 begin |
71 WriteLnToConsole('HW - zooming out'); |
|
72 wheelDown:= true; |
66 wheelDown:= true; |
73 exit |
|
74 end; |
67 end; |
75 |
68 |
76 procedure HW_zoomReset; cdecl; export; |
69 procedure HW_zoomReset; cdecl; export; |
77 begin |
70 begin |
78 WriteLnToConsole('HW - reset zoom'); |
|
79 middleClick:= true; |
71 middleClick:= true; |
80 exit |
|
81 end; |
72 end; |
82 |
73 |
83 procedure HW_ammoMenu; cdecl; export; |
74 procedure HW_ammoMenu; cdecl; export; |
84 begin |
75 begin |
85 WriteLnToConsole('HW - right click'); |
|
86 rightClick:= true; |
76 rightClick:= true; |
87 exit |
|
88 end; |
77 end; |
89 |
78 |
90 procedure HW_allKeysUp; cdecl; export; |
79 procedure HW_allKeysUp; cdecl; export; |
91 begin |
80 begin |
92 WriteLnToConsole('HW - resetting keyboard'); |
|
93 |
|
94 upKey:= false; |
81 upKey:= false; |
95 downKey:= false; |
82 downKey:= false; |
96 leftKey:= false; |
83 leftKey:= false; |
97 rightKey:= false; |
84 rightKey:= false; |
98 spaceKey:= false; |
85 spaceKey:= false; |
99 exit |
|
100 end; |
86 end; |
101 |
87 |
102 procedure HW_walkLeft; cdecl; export; |
88 procedure HW_walkLeft; cdecl; export; |
103 begin |
89 begin |
104 WriteLnToConsole('HW - walking left'); |
|
105 leftKey:= true; |
90 leftKey:= true; |
106 exit |
|
107 end; |
91 end; |
108 |
92 |
109 procedure HW_walkRight; cdecl; export; |
93 procedure HW_walkRight; cdecl; export; |
110 begin |
94 begin |
111 WriteLnToConsole('HW - walking right'); |
|
112 rightKey:= true; |
95 rightKey:= true; |
113 exit |
|
114 end; |
96 end; |
115 |
97 |
116 procedure HW_aimUp; cdecl; export; |
98 procedure HW_aimUp; cdecl; export; |
117 begin |
99 begin |
118 WriteLnToConsole('HW - aiming upwards'); |
|
119 upKey:= true; |
100 upKey:= true; |
120 exit |
|
121 end; |
101 end; |
122 |
102 |
123 procedure HW_aimDown; cdecl; export; |
103 procedure HW_aimDown; cdecl; export; |
124 begin |
104 begin |
125 WriteLnToConsole('HW - aiming downwards'); |
|
126 downKey:= true; |
105 downKey:= true; |
127 exit |
|
128 end; |
106 end; |
129 |
107 |
130 procedure HW_shoot; cdecl; export; |
108 procedure HW_shoot; cdecl; export; |
131 begin |
109 begin |
132 WriteLnToConsole('HW - shooting'); |
|
133 spaceKey:= true; |
110 spaceKey:= true; |
134 exit |
|
135 end; |
111 end; |
136 |
112 |
137 procedure HW_whereIsHog; cdecl; export; |
113 procedure HW_whereIsHog; cdecl; export; |
138 var Xcoord, Ycoord: LongInt; |
114 //var Xcoord, Ycoord: LongInt; |
139 begin |
115 begin |
140 //Xcoord:= Gear^.dX + WorldDx; |
116 //Xcoord:= Gear^.dX + WorldDx; |
141 WriteLnToConsole('HW - hog is at x: ' + ' y:'); |
117 WriteLnToConsole('HW - hog is at x: ' + ' y:'); |
142 |
118 |
143 exit |
119 exit |