hedgewars/uMisc.pas
changeset 869 daddcd31ef34
parent 865 a4a5ec6c61d4
child 883 07a568ba44e0
equal deleted inserted replaced
868:4884bce5e5eb 869:daddcd31ef34
   232 begin
   232 begin
   233 r:= SignAs(cLittle, r)
   233 r:= SignAs(cLittle, r)
   234 end;
   234 end;
   235 
   235 
   236 procedure SendStat(sit: TStatInfoType; s: shortstring);
   236 procedure SendStat(sit: TStatInfoType; s: shortstring);
   237 const stc: array [TStatInfoType] of char = 'rDK';
   237 const stc: array [TStatInfoType] of char = 'rDkK';
   238 begin
   238 begin
   239 SendIPC('i' + stc[sit] + s)
   239 SendIPC('i' + stc[sit] + s)
   240 end;
   240 end;
   241 
   241 
   242 function rndSign(num: hwFloat): hwFloat;
   242 function rndSign(num: hwFloat): hwFloat;
   288 Surface2Tex^.h:= surf^.h;
   288 Surface2Tex^.h:= surf^.h;
   289 
   289 
   290 if (surf^.format^.BytesPerPixel = 3) then mode:= GL_RGB else
   290 if (surf^.format^.BytesPerPixel = 3) then mode:= GL_RGB else
   291 if (surf^.format^.BytesPerPixel = 4) then mode:= GL_RGBA else
   291 if (surf^.format^.BytesPerPixel = 4) then mode:= GL_RGBA else
   292    begin
   292    begin
   293    TryDo(false, 'Surface2Tex: BytePerPixel not in [3, 4]', true);
   293    TryDo(false, 'Surface2Tex: BytesPerPixel not in [3, 4]', true);
   294    Surface2Tex^.id:= 0;
   294    Surface2Tex^.id:= 0;
   295    exit
   295    exit
   296    end;
   296    end;
   297 
   297 
   298 glGenTextures(1, @Surface2Tex^.id);
   298 glGenTextures(1, @Surface2Tex^.id);