hedgewars/CCHandlers.inc
changeset 3407 dcc129c4352e
parent 3405 8fdb08497bf1
child 3426 4ec21c6d6d33
equal deleted inserted replaced
3406:f4bdebced042 3407:dcc129c4352e
    29 end;
    29 end;
    30 ////////////////////////////////////////////////////////////////////////////////
    30 ////////////////////////////////////////////////////////////////////////////////
    31 procedure chQuit(var s: shortstring);
    31 procedure chQuit(var s: shortstring);
    32 const prevGState: TGameState = gsConfirm;
    32 const prevGState: TGameState = gsConfirm;
    33 begin
    33 begin
       
    34 s:= s; // avoid compiler hint
    34 if GameState <> gsConfirm then
    35 if GameState <> gsConfirm then
    35         begin
    36         begin
    36         prevGState:= GameState;
    37         prevGState:= GameState;
    37         GameState:= gsConfirm
    38         GameState:= gsConfirm
    38         end else
    39         end else
    39         GameState:= prevGState
    40         GameState:= prevGState
    40 end;
    41 end;
    41 
    42 
    42 procedure chConfirm(var s: shortstring);
    43 procedure chConfirm(var s: shortstring);
    43 begin
    44 begin
       
    45 s:= s; // avoid compiler hint
    44 if GameState = gsConfirm then
    46 if GameState = gsConfirm then
    45     begin
    47     begin
    46     SendIPC('Q');
    48     SendIPC('Q');
    47     GameState:= gsExit
    49     GameState:= gsExit
    48     end
    50     end
    73 
    75 
    74 procedure chAddTeam(var s: shortstring);
    76 procedure chAddTeam(var s: shortstring);
    75 var Color: Longword;
    77 var Color: Longword;
    76     ts, cs: shortstring;
    78     ts, cs: shortstring;
    77 begin
    79 begin
       
    80 cs:= '';
       
    81 ts:= '';
    78 if isDeveloperMode then
    82 if isDeveloperMode then
    79 begin
    83 begin
    80 SplitBySpace(s, cs);
    84 SplitBySpace(s, cs);
    81 SplitBySpace(cs, ts);
    85 SplitBySpace(cs, ts);
    82 val(cs, Color);
    86 val(cs, Color);
    94 end
    98 end
    95 end;
    99 end;
    96 
   100 
    97 procedure chTeamLocal(var s: shortstring);
   101 procedure chTeamLocal(var s: shortstring);
    98 begin
   102 begin
       
   103 s:= s; // avoid compiler hint
    99 if not isDeveloperMode then exit;
   104 if not isDeveloperMode then exit;
   100 if CurrentTeam = nil then OutError(errmsgIncorrectUse + ' "/rdriven"', true);
   105 if CurrentTeam = nil then OutError(errmsgIncorrectUse + ' "/rdriven"', true);
   101 CurrentTeam^.ExtDriven:= true
   106 CurrentTeam^.ExtDriven:= true
   102 end;
   107 end;
   103 
   108 
   142 
   147 
   143 procedure chAddHH(var id: shortstring);
   148 procedure chAddHH(var id: shortstring);
   144 var s: shortstring;
   149 var s: shortstring;
   145     Gear: PGear;
   150     Gear: PGear;
   146 begin
   151 begin
       
   152 s:= '';
   147 if (not isDeveloperMode) or (CurrentTeam = nil) then exit;
   153 if (not isDeveloperMode) or (CurrentTeam = nil) then exit;
   148 with CurrentTeam^ do
   154 with CurrentTeam^ do
   149     begin
   155     begin
   150     SplitBySpace(id, s);
   156     SplitBySpace(id, s);
   151     CurrentHedgehog:= @Hedgehogs[HedgehogsNumber];
   157     CurrentHedgehog:= @Hedgehogs[HedgehogsNumber];
   181 
   187 
   182 procedure chSetHHCoords(var x: shortstring);
   188 procedure chSetHHCoords(var x: shortstring);
   183 var y: shortstring;
   189 var y: shortstring;
   184     t: Longint;
   190     t: Longint;
   185 begin
   191 begin
       
   192 y:= '';
   186 if (not isDeveloperMode) or (CurrentHedgehog = nil) or (CurrentHedgehog^.Gear = nil) then exit;
   193 if (not isDeveloperMode) or (CurrentHedgehog = nil) or (CurrentHedgehog^.Gear = nil) then exit;
   187 SplitBySpace(x, y);
   194 SplitBySpace(x, y);
   188 val(x, t);
   195 val(x, t);
   189 CurrentHedgehog^.Gear^.X:= int2hwFloat(t);
   196 CurrentHedgehog^.Gear^.X:= int2hwFloat(t);
   190 val(y, t);
   197 val(y, t);
   211 SetAmmoReinforcement(descr)
   218 SetAmmoReinforcement(descr)
   212 end;
   219 end;
   213 
   220 
   214 procedure chAddAmmoStore(var descr: shortstring);
   221 procedure chAddAmmoStore(var descr: shortstring);
   215 begin
   222 begin
       
   223 descr:= ''; // avoid compiler hint
   216 AddAmmoStore
   224 AddAmmoStore
   217 end;
   225 end;
   218 
   226 
   219 procedure chBind(var id: shortstring);
   227 procedure chBind(var id: shortstring);
   220 var s: shortstring;
   228 var s: shortstring;
   221     b: LongInt;
   229     b: LongInt;
   222 begin
   230 begin
       
   231 s:= '';
   223 if CurrentTeam = nil then exit;
   232 if CurrentTeam = nil then exit;
   224 SplitBySpace(id, s);
   233 SplitBySpace(id, s);
   225 if s[1]='"' then Delete(s, 1, 1);
   234 if s[1]='"' then Delete(s, 1, 1);
   226 if s[byte(s[0])]='"' then Delete(s, byte(s[0]), 1);
   235 if s[byte(s[0])]='"' then Delete(s, byte(s[0]), 1);
   227 b:= KeyNameToCode(id);
   236 b:= KeyNameToCode(id);
   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}
   388     end
   418     end
   389 end;
   419 end;
   390 
   420 
   391 procedure chAttack_m(var s: shortstring);
   421 procedure chAttack_m(var s: shortstring);
   392 begin
   422 begin
       
   423 s:= s; // avoid compiler hint
   393 if CheckNoTeamOrHH then exit;
   424 if CheckNoTeamOrHH then exit;
   394 with CurrentHedgehog^.Gear^ do
   425 with CurrentHedgehog^.Gear^ do
   395     begin
   426     begin
   396     if not CurrentTeam^.ExtDriven and
   427     if not CurrentTeam^.ExtDriven and
   397         ((Message and gm_Attack) <> 0) then SendIPC('a');
   428         ((Message and gm_Attack) <> 0) then SendIPC('a');
   399     end
   430     end
   400 end;
   431 end;
   401 
   432 
   402 procedure chSwitch(var s: shortstring);
   433 procedure chSwitch(var s: shortstring);
   403 begin
   434 begin
       
   435 s:= s; // avoid compiler hint
   404 if CheckNoTeamOrHH or isPaused then exit;
   436 if CheckNoTeamOrHH or isPaused then exit;
   405 if not CurrentTeam^.ExtDriven then SendIPC('S');
   437 if not CurrentTeam^.ExtDriven then SendIPC('S');
   406 with CurrentHedgehog^.Gear^ do
   438 with CurrentHedgehog^.Gear^ do
   407     Message:= Message or gm_Switch
   439     Message:= Message or gm_Switch
   408 end;
   440 end;
   409 
   441 
   410 procedure chNextTurn(var s: shortstring);
   442 procedure chNextTurn(var s: shortstring);
   411 begin
   443 begin
       
   444 s:= s; // avoid compiler hint
   412 TryDo(AllInactive, '/nextturn called when not all gears are inactive', true);
   445 TryDo(AllInactive, '/nextturn called when not all gears are inactive', true);
   413 
   446 
   414 if not CurrentTeam^.ExtDriven then SendIPC('N');
   447 if not CurrentTeam^.ExtDriven then SendIPC('N');
   415 {$IFDEF DEBUGFILE}AddFileLog('Doing SwitchHedgehog: time '+inttostr(GameTicks));{$ENDIF}
   448 {$IFDEF DEBUGFILE}AddFileLog('Doing SwitchHedgehog: time '+inttostr(GameTicks));{$ENDIF}
   416 end;
   449 end;
   577             OutError('got /put while not being in choose target mode', false)
   610             OutError('got /put while not being in choose target mode', false)
   578 end;
   611 end;
   579 
   612 
   580 procedure chPut(var s: shortstring);
   613 procedure chPut(var s: shortstring);
   581 begin
   614 begin
       
   615 s:= s; // avoid compiler hint
   582 doPut(0, 0, false)
   616 doPut(0, 0, false)
   583 end;
   617 end;
   584 
   618 
   585 procedure chCapture(var s: shortstring);
   619 procedure chCapture(var s: shortstring);
   586 begin
   620 begin
       
   621 s:= s; // avoid compiler hint
   587 flagMakeCapture:= true
   622 flagMakeCapture:= true
   588 end;
   623 end;
   589 
   624 
   590 procedure chSkip(var s: shortstring);
   625 procedure chSkip(var s: shortstring);
   591 begin
   626 begin
       
   627 s:= s; // avoid compiler hint
   592 if not CurrentTeam^.ExtDriven then SendIPC(',');
   628 if not CurrentTeam^.ExtDriven then SendIPC(',');
   593 uStats.Skipped;
   629 uStats.Skipped;
   594 skipFlag:= true
   630 skipFlag:= true
   595 end;
   631 end;
   596 
   632 
   622 end
   658 end
   623 end;
   659 end;
   624 
   660 
   625 procedure chAmmoMenu(var s: shortstring);
   661 procedure chAmmoMenu(var s: shortstring);
   626 begin
   662 begin
       
   663 s:= s; // avoid compiler hint
   627 if CheckNoTeamOrHH then 
   664 if CheckNoTeamOrHH then 
   628 bShowAmmoMenu:= true
   665 bShowAmmoMenu:= true
   629 else
   666 else
   630 with CurrentTeam^ do
   667 with CurrentTeam^ do
   631         with Hedgehogs[CurrHedgehog] do
   668         with Hedgehogs[CurrHedgehog] do
   647 {$ENDIF}
   684 {$ENDIF}
   648 {$IFDEF SDL13}
   685 {$IFDEF SDL13}
   649     window: PSDL_Window;
   686     window: PSDL_Window;
   650 {$ENDIF}
   687 {$ENDIF}
   651 begin
   688 begin
       
   689     s:= s; // avoid compiler hint
       
   690     buf[0]:= char(0); // avoid compiler hint
   652     if Length(s) = 0 then cFullScreen:= not cFullScreen
   691     if Length(s) = 0 then cFullScreen:= not cFullScreen
   653     else cFullScreen:= s = '1';
   692     else cFullScreen:= s = '1';
   654 
   693 
   655 {$IFDEF DEBUGFILE}
   694 {$IFDEF DEBUGFILE}
   656     AddFileLog('Prepare to change video parameters...');
   695     AddFileLog('Prepare to change video parameters...');
   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;