hedgewars/uWorld.pas
changeset 10122 cefede760264
parent 10120 b7f632c12784
child 10124 aabd1b75d5a3
equal deleted inserted replaced
10121:8b65699beb56 10122:cefede760264
    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, mtext: PChar; icon, time : LongInt);
    34 procedure ShowMission(caption, subcaption, text: ansistring; 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);
   218         g:= AddGoal(g, gfAny, gidMineTimer, cMinesTime div 1000);
   218         g:= AddGoal(g, gfAny, gidMineTimer, cMinesTime div 1000);
   219     end;
   219     end;
   220 
   220 
   221 // if the string has been set, show it for (default timeframe) seconds
   221 // if the string has been set, show it for (default timeframe) seconds
   222 if length(g) > 0 then
   222 if length(g) > 0 then
   223     ShowMission(trgoal[gidCaption], trgoal[gidSubCaption], PChar(g), 1, 0);
   223     ShowMission(trgoal[gidCaption], trgoal[gidSubCaption], g, 1, 0);
   224 
   224 
   225 cWaveWidth:= SpritesData[sprWater].Width;
   225 cWaveWidth:= SpritesData[sprWater].Width;
   226 //cWaveHeight:= SpritesData[sprWater].Height;
   226 //cWaveHeight:= SpritesData[sprWater].Height;
   227 cWaveHeight:= 32;
   227 cWaveHeight:= 32;
   228 
   228 
  1966     WorldDx:= - LAND_WIDTH - 1024;
  1966     WorldDx:= - LAND_WIDTH - 1024;
  1967 if WorldDx > 1024 then
  1967 if WorldDx > 1024 then
  1968     WorldDx:= 1024;
  1968     WorldDx:= 1024;
  1969 end;
  1969 end;
  1970 
  1970 
  1971 procedure ShowMission(caption, subcaption, mtext: PChar; icon, time : LongInt);
  1971 procedure ShowMission(caption, subcaption, text: ansistring; icon, time : LongInt);
  1972 var r: TSDL_Rect;
  1972 var r: TSDL_Rect;
  1973 begin
  1973 begin
  1974 r.w:= 32;
  1974 r.w:= 32;
  1975 r.h:= 32;
  1975 r.h:= 32;
  1976 
  1976 
  1981 
  1981 
  1982 if icon > -1 then
  1982 if icon > -1 then
  1983     begin
  1983     begin
  1984     r.x:= 0;
  1984     r.x:= 0;
  1985     r.y:= icon * 32;
  1985     r.y:= icon * 32;
  1986     missionTex:= RenderHelpWindow(caption, subcaption, mtext, '', 0, MissionIcons, @r)
  1986     missionTex:= RenderHelpWindow(caption, subcaption, text, '', 0, MissionIcons, @r)
  1987     end
  1987     end
  1988 else
  1988 else
  1989     begin
  1989     begin
  1990     r.x:= ((-icon - 1) shr 4) * 32;
  1990     r.x:= ((-icon - 1) shr 4) * 32;
  1991     r.y:= ((-icon - 1) mod 16) * 32;
  1991     r.y:= ((-icon - 1) mod 16) * 32;
  1992     missionTex:= RenderHelpWindow(caption, subcaption, mtext, '', 0, SpritesData[sprAMAmmos].Surface, @r)
  1992     missionTex:= RenderHelpWindow(caption, subcaption, text, '', 0, SpritesData[sprAMAmmos].Surface, @r)
  1993     end;
  1993     end;
  1994 end;
  1994 end;
  1995 
  1995 
  1996 procedure HideMission;
  1996 procedure HideMission;
  1997 begin
  1997 begin