hedgewars/uWorld.pas
changeset 10009 88929358d2e1
parent 9998 736015b847e3
child 10015 4feced261c68
child 10032 db65298717da
equal deleted inserted replaced
10008:b8b91c7e0da8 10009:88929358d2e1
    29 procedure InitWorld;
    29 procedure InitWorld;
    30 procedure ResetWorldTex;
    30 procedure ResetWorldTex;
    31 
    31 
    32 procedure DrawWorld(Lag: LongInt);
    32 procedure DrawWorld(Lag: LongInt);
    33 procedure DrawWorldStereo(Lag: LongInt; RM: TRenderMode);
    33 procedure DrawWorldStereo(Lag: LongInt; RM: TRenderMode);
    34 procedure ShowMission(caption, subcaption, text: ansistring; icon, time : LongInt);
    34 procedure ShowMission(caption, subcaption, mtext: PChar; icon, time : LongInt);
    35 procedure HideMission;
    35 procedure HideMission;
    36 procedure ShakeCamera(amount: LongInt);
    36 procedure ShakeCamera(amount: LongInt);
    37 procedure InitCameraBorders;
    37 procedure InitCameraBorders;
    38 procedure InitTouchInterface;
    38 procedure InitTouchInterface;
    39 procedure SetUtilityWidgetState(ammoType: TAmmoType);
    39 procedure SetUtilityWidgetState(ammoType: TAmmoType);
   211         g:= AddGoal(g, gfAny, gidMineTimer, cMinesTime div 1000);
   211         g:= AddGoal(g, gfAny, gidMineTimer, cMinesTime div 1000);
   212     end;
   212     end;
   213 
   213 
   214 // if the string has been set, show it for (default timeframe) seconds
   214 // if the string has been set, show it for (default timeframe) seconds
   215 if g <> '' then
   215 if g <> '' then
   216     ShowMission(trgoal[gidCaption], trgoal[gidSubCaption], g, 1, 0);
   216     ShowMission(trgoal[gidCaption], trgoal[gidSubCaption], PChar(g), 1, 0);
   217 
   217 
   218 cWaveWidth:= SpritesData[sprWater].Width;
   218 cWaveWidth:= SpritesData[sprWater].Width;
   219 //cWaveHeight:= SpritesData[sprWater].Height;
   219 //cWaveHeight:= SpritesData[sprWater].Height;
   220 cWaveHeight:= 32;
   220 cWaveHeight:= 32;
   221 
   221 
  1895     WorldDx:= - LAND_WIDTH - 1024;
  1895     WorldDx:= - LAND_WIDTH - 1024;
  1896 if WorldDx > 1024 then
  1896 if WorldDx > 1024 then
  1897     WorldDx:= 1024;
  1897     WorldDx:= 1024;
  1898 end;
  1898 end;
  1899 
  1899 
  1900 procedure ShowMission(caption, subcaption, text: ansistring; icon, time : LongInt);
  1900 procedure ShowMission(caption, subcaption, mtext: PChar; icon, time : LongInt);
  1901 var r: TSDL_Rect;
  1901 var r: TSDL_Rect;
  1902 begin
  1902 begin
  1903 r.w:= 32;
  1903 r.w:= 32;
  1904 r.h:= 32;
  1904 r.h:= 32;
  1905 
  1905 
  1910 
  1910 
  1911 if icon > -1 then
  1911 if icon > -1 then
  1912     begin
  1912     begin
  1913     r.x:= 0;
  1913     r.x:= 0;
  1914     r.y:= icon * 32;
  1914     r.y:= icon * 32;
  1915     missionTex:= RenderHelpWindow(caption, subcaption, text, '', 0, MissionIcons, @r)
  1915     missionTex:= RenderHelpWindow(caption, subcaption, mtext, '', 0, MissionIcons, @r)
  1916     end
  1916     end
  1917 else
  1917 else
  1918     begin
  1918     begin
  1919     r.x:= ((-icon - 1) shr 4) * 32;
  1919     r.x:= ((-icon - 1) shr 4) * 32;
  1920     r.y:= ((-icon - 1) mod 16) * 32;
  1920     r.y:= ((-icon - 1) mod 16) * 32;
  1921     missionTex:= RenderHelpWindow(caption, subcaption, text, '', 0, SpritesData[sprAMAmmos].Surface, @r)
  1921     missionTex:= RenderHelpWindow(caption, subcaption, mtext, '', 0, SpritesData[sprAMAmmos].Surface, @r)
  1922     end;
  1922     end;
  1923 end;
  1923 end;
  1924 
  1924 
  1925 procedure HideMission;
  1925 procedure HideMission;
  1926 begin
  1926 begin