229 else CurrentTeam^.Binds[b]:= s |
238 else CurrentTeam^.Binds[b]:= s |
230 end; |
239 end; |
231 |
240 |
232 procedure chCurU_p(var s: shortstring); |
241 procedure chCurU_p(var s: shortstring); |
233 begin |
242 begin |
|
243 s:= s; // avoid compiler hint |
234 CursorMovementY:= -1; |
244 CursorMovementY:= -1; |
235 end; |
245 end; |
236 |
246 |
237 procedure chCurU_m(var s: shortstring); |
247 procedure chCurU_m(var s: shortstring); |
238 begin |
248 begin |
|
249 s:= s; // avoid compiler hint |
239 CursorMovementY:= 0; |
250 CursorMovementY:= 0; |
240 end; |
251 end; |
241 |
252 |
242 procedure chCurD_p(var s: shortstring); |
253 procedure chCurD_p(var s: shortstring); |
243 begin |
254 begin |
|
255 s:= s; // avoid compiler hint |
244 CursorMovementY:= 1; |
256 CursorMovementY:= 1; |
245 end; |
257 end; |
246 |
258 |
247 procedure chCurD_m(var s: shortstring); |
259 procedure chCurD_m(var s: shortstring); |
248 begin |
260 begin |
|
261 s:= s; // avoid compiler hint |
249 CursorMovementY:= 0; |
262 CursorMovementY:= 0; |
250 end; |
263 end; |
251 |
264 |
252 procedure chCurL_p(var s: shortstring); |
265 procedure chCurL_p(var s: shortstring); |
253 begin |
266 begin |
|
267 s:= s; // avoid compiler hint |
254 CursorMovementX:= -1; |
268 CursorMovementX:= -1; |
255 end; |
269 end; |
256 |
270 |
257 procedure chCurL_m(var s: shortstring); |
271 procedure chCurL_m(var s: shortstring); |
258 begin |
272 begin |
|
273 s:= s; // avoid compiler hint |
259 CursorMovementX:= 0; |
274 CursorMovementX:= 0; |
260 end; |
275 end; |
261 |
276 |
262 procedure chCurR_p(var s: shortstring); |
277 procedure chCurR_p(var s: shortstring); |
263 begin |
278 begin |
|
279 s:= s; // avoid compiler hint |
264 CursorMovementX:= 1; |
280 CursorMovementX:= 1; |
265 end; |
281 end; |
266 |
282 |
267 procedure chCurR_m(var s: shortstring); |
283 procedure chCurR_m(var s: shortstring); |
268 begin |
284 begin |
|
285 s:= s; // avoid compiler hint |
269 CursorMovementX:= 0; |
286 CursorMovementX:= 0; |
270 end; |
287 end; |
271 |
288 |
272 procedure chLeft_p(var s: shortstring); |
289 procedure chLeft_p(var s: shortstring); |
273 begin |
290 begin |
|
291 s:= s; // avoid compiler hint |
274 if CheckNoTeamOrHH or isPaused then exit; |
292 if CheckNoTeamOrHH or isPaused then exit; |
275 bShowFinger:= false; |
293 bShowFinger:= false; |
276 if not CurrentTeam^.ExtDriven then SendIPC('L'); |
294 if not CurrentTeam^.ExtDriven then SendIPC('L'); |
277 with CurrentHedgehog^.Gear^ do |
295 with CurrentHedgehog^.Gear^ do |
278 Message:= Message or gm_Left |
296 Message:= Message or gm_Left |
279 end; |
297 end; |
280 |
298 |
281 procedure chLeft_m(var s: shortstring); |
299 procedure chLeft_m(var s: shortstring); |
282 begin |
300 begin |
|
301 s:= s; // avoid compiler hint |
283 if CheckNoTeamOrHH then exit; |
302 if CheckNoTeamOrHH then exit; |
284 if not CurrentTeam^.ExtDriven then SendIPC('l'); |
303 if not CurrentTeam^.ExtDriven then SendIPC('l'); |
285 with CurrentHedgehog^.Gear^ do |
304 with CurrentHedgehog^.Gear^ do |
286 Message:= Message and not gm_Left |
305 Message:= Message and not gm_Left |
287 end; |
306 end; |
288 |
307 |
289 procedure chRight_p(var s: shortstring); |
308 procedure chRight_p(var s: shortstring); |
290 begin |
309 begin |
|
310 s:= s; // avoid compiler hint |
291 if CheckNoTeamOrHH or isPaused then exit; |
311 if CheckNoTeamOrHH or isPaused then exit; |
292 bShowFinger:= false; |
312 bShowFinger:= false; |
293 if not CurrentTeam^.ExtDriven then SendIPC('R'); |
313 if not CurrentTeam^.ExtDriven then SendIPC('R'); |
294 with CurrentHedgehog^.Gear^ do |
314 with CurrentHedgehog^.Gear^ do |
295 Message:= Message or gm_Right |
315 Message:= Message or gm_Right |
296 end; |
316 end; |
297 |
317 |
298 procedure chRight_m(var s: shortstring); |
318 procedure chRight_m(var s: shortstring); |
299 begin |
319 begin |
|
320 s:= s; // avoid compiler hint |
300 if CheckNoTeamOrHH then exit; |
321 if CheckNoTeamOrHH then exit; |
301 if not CurrentTeam^.ExtDriven then SendIPC('r'); |
322 if not CurrentTeam^.ExtDriven then SendIPC('r'); |
302 with CurrentHedgehog^.Gear^ do |
323 with CurrentHedgehog^.Gear^ do |
303 Message:= Message and not gm_Right |
324 Message:= Message and not gm_Right |
304 end; |
325 end; |
305 |
326 |
306 procedure chUp_p(var s: shortstring); |
327 procedure chUp_p(var s: shortstring); |
307 begin |
328 begin |
|
329 s:= s; // avoid compiler hint |
308 if CheckNoTeamOrHH or isPaused then exit; |
330 if CheckNoTeamOrHH or isPaused then exit; |
309 bShowFinger:= false; |
331 bShowFinger:= false; |
310 if not CurrentTeam^.ExtDriven then SendIPC('U'); |
332 if not CurrentTeam^.ExtDriven then SendIPC('U'); |
311 with CurrentHedgehog^.Gear^ do |
333 with CurrentHedgehog^.Gear^ do |
312 Message:= Message or gm_Up |
334 Message:= Message or gm_Up |
313 end; |
335 end; |
314 |
336 |
315 procedure chUp_m(var s: shortstring); |
337 procedure chUp_m(var s: shortstring); |
316 begin |
338 begin |
|
339 s:= s; // avoid compiler hint |
317 if CheckNoTeamOrHH then exit; |
340 if CheckNoTeamOrHH then exit; |
318 if not CurrentTeam^.ExtDriven then SendIPC('u'); |
341 if not CurrentTeam^.ExtDriven then SendIPC('u'); |
319 with CurrentHedgehog^.Gear^ do |
342 with CurrentHedgehog^.Gear^ do |
320 Message:= Message and not gm_Up |
343 Message:= Message and not gm_Up |
321 end; |
344 end; |
322 |
345 |
323 procedure chDown_p(var s: shortstring); |
346 procedure chDown_p(var s: shortstring); |
324 begin |
347 begin |
|
348 s:= s; // avoid compiler hint |
325 if CheckNoTeamOrHH or isPaused then exit; |
349 if CheckNoTeamOrHH or isPaused then exit; |
326 bShowFinger:= false; |
350 bShowFinger:= false; |
327 if not CurrentTeam^.ExtDriven then SendIPC('D'); |
351 if not CurrentTeam^.ExtDriven then SendIPC('D'); |
328 with CurrentHedgehog^.Gear^ do |
352 with CurrentHedgehog^.Gear^ do |
329 Message:= Message or gm_Down |
353 Message:= Message or gm_Down |
330 end; |
354 end; |
331 |
355 |
332 procedure chDown_m(var s: shortstring); |
356 procedure chDown_m(var s: shortstring); |
333 begin |
357 begin |
|
358 s:= s; // avoid compiler hint |
334 if CheckNoTeamOrHH then exit; |
359 if CheckNoTeamOrHH then exit; |
335 if not CurrentTeam^.ExtDriven then SendIPC('d'); |
360 if not CurrentTeam^.ExtDriven then SendIPC('d'); |
336 with CurrentHedgehog^.Gear^ do |
361 with CurrentHedgehog^.Gear^ do |
337 Message:= Message and not gm_Down |
362 Message:= Message and not gm_Down |
338 end; |
363 end; |
339 |
364 |
340 procedure chPrecise_p(var s: shortstring); |
365 procedure chPrecise_p(var s: shortstring); |
341 begin |
366 begin |
|
367 s:= s; // avoid compiler hint |
342 if CheckNoTeamOrHH or isPaused then exit; |
368 if CheckNoTeamOrHH or isPaused then exit; |
343 bShowFinger:= false; |
369 bShowFinger:= false; |
344 if not CurrentTeam^.ExtDriven then SendIPC('Z'); |
370 if not CurrentTeam^.ExtDriven then SendIPC('Z'); |
345 with CurrentHedgehog^.Gear^ do |
371 with CurrentHedgehog^.Gear^ do |
346 Message:= Message or gm_Precise |
372 Message:= Message or gm_Precise |
347 end; |
373 end; |
348 |
374 |
349 procedure chPrecise_m(var s: shortstring); |
375 procedure chPrecise_m(var s: shortstring); |
350 begin |
376 begin |
|
377 s:= s; // avoid compiler hint |
351 if CheckNoTeamOrHH then exit; |
378 if CheckNoTeamOrHH then exit; |
352 if not CurrentTeam^.ExtDriven then SendIPC('z'); |
379 if not CurrentTeam^.ExtDriven then SendIPC('z'); |
353 with CurrentHedgehog^.Gear^ do |
380 with CurrentHedgehog^.Gear^ do |
354 Message:= Message and not gm_Precise |
381 Message:= Message and not gm_Precise |
355 end; |
382 end; |
356 |
383 |
357 procedure chLJump(var s: shortstring); |
384 procedure chLJump(var s: shortstring); |
358 begin |
385 begin |
|
386 s:= s; // avoid compiler hint |
359 if CheckNoTeamOrHH or isPaused then exit; |
387 if CheckNoTeamOrHH or isPaused then exit; |
360 bShowFinger:= false; |
388 bShowFinger:= false; |
361 if not CurrentTeam^.ExtDriven then SendIPC('j'); |
389 if not CurrentTeam^.ExtDriven then SendIPC('j'); |
362 with CurrentHedgehog^.Gear^ do |
390 with CurrentHedgehog^.Gear^ do |
363 Message:= Message or gm_LJump |
391 Message:= Message or gm_LJump |
364 end; |
392 end; |
365 |
393 |
366 procedure chHJump(var s: shortstring); |
394 procedure chHJump(var s: shortstring); |
367 begin |
395 begin |
|
396 s:= s; // avoid compiler hint |
368 if CheckNoTeamOrHH or isPaused then exit; |
397 if CheckNoTeamOrHH or isPaused then exit; |
369 bShowFinger:= false; |
398 bShowFinger:= false; |
370 if not CurrentTeam^.ExtDriven then SendIPC('J'); |
399 if not CurrentTeam^.ExtDriven then SendIPC('J'); |
371 with CurrentHedgehog^.Gear^ do |
400 with CurrentHedgehog^.Gear^ do |
372 Message:= Message or gm_HJump |
401 Message:= Message or gm_HJump |
373 end; |
402 end; |
374 |
403 |
375 procedure chAttack_p(var s: shortstring); |
404 procedure chAttack_p(var s: shortstring); |
376 begin |
405 begin |
|
406 s:= s; // avoid compiler hint |
377 if CheckNoTeamOrHH or isPaused then exit; |
407 if CheckNoTeamOrHH or isPaused then exit; |
378 bShowFinger:= false; |
408 bShowFinger:= false; |
379 with CurrentHedgehog^.Gear^ do |
409 with CurrentHedgehog^.Gear^ do |
380 begin |
410 begin |
381 {$IFDEF DEBUGFILE}AddFileLog('/+attack: hedgehog''s Gear^.State = '+inttostr(State));{$ENDIF} |
411 {$IFDEF DEBUGFILE}AddFileLog('/+attack: hedgehog''s Gear^.State = '+inttostr(State));{$ENDIF} |
715 SetupOpenGL(); |
754 SetupOpenGL(); |
716 end; |
755 end; |
717 |
756 |
718 procedure chVol_p(var s: shortstring); |
757 procedure chVol_p(var s: shortstring); |
719 begin |
758 begin |
|
759 s:= s; // avoid compiler hint |
720 inc(cVolumeDelta, 3) |
760 inc(cVolumeDelta, 3) |
721 end; |
761 end; |
722 |
762 |
723 procedure chVol_m(var s: shortstring); |
763 procedure chVol_m(var s: shortstring); |
724 begin |
764 begin |
|
765 s:= s; // avoid compiler hint |
725 dec(cVolumeDelta, 3) |
766 dec(cVolumeDelta, 3) |
726 end; |
767 end; |
727 |
768 |
728 procedure chFindhh(var s: shortstring); |
769 procedure chFindhh(var s: shortstring); |
729 begin |
770 begin |
|
771 s:= s; // avoid compiler hint |
730 if CheckNoTeamOrHH or isPaused then exit; |
772 if CheckNoTeamOrHH or isPaused then exit; |
731 bShowFinger:= true; |
773 bShowFinger:= true; |
732 FollowGear:= CurrentHedgehog^.Gear |
774 FollowGear:= CurrentHedgehog^.Gear |
733 end; |
775 end; |
734 |
776 |
735 procedure chPause(var s: shortstring); |
777 procedure chPause(var s: shortstring); |
736 begin |
778 begin |
|
779 s:= s; // avoid compiler hint |
737 if gameType <> gmtNet then |
780 if gameType <> gmtNet then |
738 isPaused:= not isPaused; |
781 isPaused:= not isPaused; |
739 SDL_ShowCursor(ord(isPaused)) |
782 SDL_ShowCursor(ord(isPaused)) |
740 end; |
783 end; |
741 |
784 |
742 procedure chRotateMask(var s: shortstring); |
785 procedure chRotateMask(var s: shortstring); |
743 begin |
786 begin |
|
787 s:= s; // avoid compiler hint |
744 if ((GameFlags and gfInvulnerable) = 0) then cTagsMask:= cTagsMasks[cTagsMask] else cTagsMask:= cTagsMasksNoHealth[cTagsMask]; |
788 if ((GameFlags and gfInvulnerable) = 0) then cTagsMask:= cTagsMasks[cTagsMask] else cTagsMask:= cTagsMasksNoHealth[cTagsMask]; |
745 end; |
789 end; |
746 |
790 |
747 procedure chSpeedup_p(var s: shortstring); |
791 procedure chSpeedup_p(var s: shortstring); |
748 begin |
792 begin |
|
793 s:= s; // avoid compiler hint |
749 isSpeed:= true |
794 isSpeed:= true |
750 end; |
795 end; |
751 |
796 |
752 procedure chSpeedup_m(var s: shortstring); |
797 procedure chSpeedup_m(var s: shortstring); |
753 begin |
798 begin |
|
799 s:= s; // avoid compiler hint |
754 isSpeed:= false |
800 isSpeed:= false |
755 end; |
801 end; |
756 |
802 |
757 procedure chZoomIn(var s: shortstring); |
803 procedure chZoomIn(var s: shortstring); |
758 begin |
804 begin |
|
805 s:= s; // avoid compiler hint |
759 {$IFDEF IPHONEOS} |
806 {$IFDEF IPHONEOS} |
760 if ZoomValue < 3.5 then |
807 if ZoomValue < 3.5 then |
761 {$ELSE} |
808 {$ELSE} |
762 if ZoomValue < 3.0 then |
809 if ZoomValue < 3.0 then |
763 {$ENDIF} |
810 {$ENDIF} |
764 ZoomValue:= ZoomValue + 0.25; |
811 ZoomValue:= ZoomValue + 0.25; |
765 end; |
812 end; |
766 |
813 |
767 procedure chZoomOut(var s: shortstring); |
814 procedure chZoomOut(var s: shortstring); |
768 begin |
815 begin |
|
816 s:= s; // avoid compiler hint |
769 {$IFDEF IPHONEOS} |
817 {$IFDEF IPHONEOS} |
770 if ZoomValue > 0.5 then |
818 if ZoomValue > 0.5 then |
771 {$ELSE} |
819 {$ELSE} |
772 if ZoomValue > 1.0 then |
820 if ZoomValue > 1.0 then |
773 {$ENDIF} |
821 {$ENDIF} |
774 ZoomValue:= ZoomValue - 0.25; |
822 ZoomValue:= ZoomValue - 0.25; |
775 end; |
823 end; |
776 |
824 |
777 procedure chZoomReset(var s: shortstring); |
825 procedure chZoomReset(var s: shortstring); |
778 begin |
826 begin |
|
827 s:= s; // avoid compiler hint |
779 ZoomValue:= 2.0 |
828 ZoomValue:= 2.0 |
780 end; |
829 end; |
781 |
830 |
782 procedure chChat(var s: shortstring); |
831 procedure chChat(var s: shortstring); |
783 begin |
832 begin |
|
833 s:= s; // avoid compiler hint |
784 GameState:= gsChat; |
834 GameState:= gsChat; |
785 KeyPressChat(27) |
835 KeyPressChat(27) |
786 end; |
836 end; |
787 |
837 |
788 procedure chHistory(var s: shortstring); |
838 procedure chHistory(var s: shortstring); |
789 begin |
839 begin |
|
840 s:= s; // avoid compiler hint |
790 uChat.showAll:= not uChat.showAll |
841 uChat.showAll:= not uChat.showAll |
791 end; |
842 end; |