hedgewars/uCommandHandlers.pas
changeset 14700 4eaeba349179
parent 14699 c96889bf5796
child 14701 d74517fdb34f
equal deleted inserted replaced
14699:c96889bf5796 14700:4eaeba349179
   283     SendIPC(_S'Z');
   283     SendIPC(_S'Z');
   284 bShowFinger:= false;
   284 bShowFinger:= false;
   285 with CurrentHedgehog^.Gear^ do
   285 with CurrentHedgehog^.Gear^ do
   286     Message:= Message or (gmPrecise and InputMask);
   286     Message:= Message or (gmPrecise and InputMask);
   287     ScriptCall('onPrecise');
   287     ScriptCall('onPrecise');
       
   288 if cVolumeDelta > 0 then
       
   289     cVolumeDelta:= 1;
       
   290 if cVolumeDelta < 0 then
       
   291     cVolumeDelta:= -1;
   288 end;
   292 end;
   289 
   293 
   290 procedure chPrecise_m(var s: shortstring);
   294 procedure chPrecise_m(var s: shortstring);
   291 begin
   295 begin
   292 s:= s; // avoid compiler hint
   296 s:= s; // avoid compiler hint
   295 if not isExternalSource then
   299 if not isExternalSource then
   296     SendIPC(_S'z');
   300     SendIPC(_S'z');
   297 with CurrentHedgehog^.Gear^ do
   301 with CurrentHedgehog^.Gear^ do
   298     Message:= Message and (not (gmPrecise and InputMask));
   302     Message:= Message and (not (gmPrecise and InputMask));
   299     ScriptCall('onPreciseUp');
   303     ScriptCall('onPreciseUp');
       
   304 if cVolumeDelta > 0 then
       
   305     cVolumeDelta:= 3;
       
   306 if cVolumeDelta < 0 then
       
   307     cVolumeDelta:= -3;
   300 end;
   308 end;
   301 
   309 
   302 procedure chLJump(var s: shortstring);
   310 procedure chLJump(var s: shortstring);
   303 begin
   311 begin
   304 s:= s; // avoid compiler hint
   312 s:= s; // avoid compiler hint
   593 end;
   601 end;
   594 
   602 
   595 procedure chVol_p(var s: shortstring);
   603 procedure chVol_p(var s: shortstring);
   596 begin
   604 begin
   597 s:= s; // avoid compiler hint
   605 s:= s; // avoid compiler hint
   598 inc(cVolumeDelta, 3)
   606 if (LocalMessage and gmPrecise) <> 0 then
       
   607     inc(cVolumeDelta, 1)
       
   608 else
       
   609     inc(cVolumeDelta, 3);
   599 end;
   610 end;
   600 
   611 
   601 procedure chVol_m(var s: shortstring);
   612 procedure chVol_m(var s: shortstring);
   602 begin
   613 begin
   603 s:= s; // avoid compiler hint
   614 s:= s; // avoid compiler hint
   604 dec(cVolumeDelta, 3)
   615 if (LocalMessage and gmPrecise) <> 0 then
       
   616     dec(cVolumeDelta, 1)
       
   617 else
       
   618     dec(cVolumeDelta, 3);
   605 end;
   619 end;
   606 
   620 
   607 procedure chMute(var s: shortstring);
   621 procedure chMute(var s: shortstring);
   608 begin
   622 begin
   609 s:= s; // avoid compiler hint
   623 s:= s; // avoid compiler hint
   717 
   731 
   718 procedure chZoomIn(var s: shortstring);
   732 procedure chZoomIn(var s: shortstring);
   719 begin
   733 begin
   720     s:= s; // avoid compiler hint
   734     s:= s; // avoid compiler hint
   721     if ZoomValue < cMinZoomLevel then
   735     if ZoomValue < cMinZoomLevel then
   722         ZoomValue:= ZoomValue + cZoomDelta;
   736         if (LocalMessage and gmPrecise <> 0) then
       
   737             ZoomValue:= ZoomValue + cZoomDeltaSmall
       
   738         else
       
   739             ZoomValue:= ZoomValue + cZoomDelta;
   723 end;
   740 end;
   724 
   741 
   725 procedure chZoomOut(var s: shortstring);
   742 procedure chZoomOut(var s: shortstring);
   726 begin
   743 begin
   727     s:= s; // avoid compiler hint
   744     s:= s; // avoid compiler hint
   728     if ZoomValue > cMaxZoomLevel then
   745     if ZoomValue > cMaxZoomLevel then
   729         ZoomValue:= ZoomValue - cZoomDelta;
   746         if (LocalMessage and gmPrecise <> 0) then
       
   747             ZoomValue:= ZoomValue - cZoomDeltaSmall
       
   748         else
       
   749             ZoomValue:= ZoomValue - cZoomDelta;
   730 end;
   750 end;
   731 
   751 
   732 procedure chZoomReset(var s: shortstring);
   752 procedure chZoomReset(var s: shortstring);
   733 begin
   753 begin
   734     s:= s; // avoid compiler hint
   754     s:= s; // avoid compiler hint