hedgewars/uStore.pas
changeset 844 9a82149409f3
parent 843 27b5180d0988
child 853 0b4a23795530
equal deleted inserted replaced
843:27b5180d0988 844:9a82149409f3
   114 Result.h:= h + FontBorder * 2;
   114 Result.h:= h + FontBorder * 2;
   115 WriteInRoundRect:= Result
   115 WriteInRoundRect:= Result
   116 end;
   116 end;
   117 
   117 
   118 procedure StoreLoad;
   118 procedure StoreLoad;
   119 var ii: TSprite;
   119 var s: string;
   120     fi: THWFont;
       
   121     ai: TAmmoType;
       
   122     s: string;
       
   123     tmpsurf: PSDL_Surface;
       
   124 
   120 
   125     procedure WriteNames(Font: THWFont);
   121     procedure WriteNames(Font: THWFont);
   126     var t: LongInt;
   122     var t: LongInt;
   127         i: LongInt;
   123         i: LongInt;
   128         r, rr: TSDL_Rect;
   124         r, rr: TSDL_Rect;
   161     end;
   157     end;
   162 
   158 
   163     procedure MakeCrossHairs;
   159     procedure MakeCrossHairs;
   164     var t: LongInt;
   160     var t: LongInt;
   165         tmpsurf, texsurf: PSDL_Surface;
   161         tmpsurf, texsurf: PSDL_Surface;
   166         s: string;
       
   167         Color, i: Longword;
   162         Color, i: Longword;
   168     begin
   163     begin
   169     s:= Pathz[ptGraphics] + '/' + cCHFileName;
   164     s:= Pathz[ptGraphics] + '/' + cCHFileName;
   170     tmpsurf:= LoadImage(s, true, true, false);
   165     tmpsurf:= LoadImage(s, true, true, false);
   171 
   166 
   247     glClearColor(c1.r / 255, c1.g / 255, c1.b / 255, 0.99); // sky color
   242     glClearColor(c1.r / 255, c1.g / 255, c1.b / 255, 0.99); // sky color
   248     cExplosionBorderColor:= c2.value or
   243     cExplosionBorderColor:= c2.value or
   249                             $FF000000
   244                             $FF000000
   250     end;
   245     end;
   251 
   246 
       
   247 var ii: TSprite;
       
   248     fi: THWFont;
       
   249     ai: TAmmoType;
       
   250     tmpsurf: PSDL_Surface;
       
   251     i: LongInt;
   252 begin
   252 begin
   253 for fi:= Low(THWFont) to High(THWFont) do
   253 for fi:= Low(THWFont) to High(THWFont) do
   254     with Fontz[fi] do
   254     with Fontz[fi] do
   255          begin
   255          begin
   256          s:= Pathz[ptFonts] + '/' + Name;
   256          s:= Pathz[ptFonts] + '/' + Name;
   301 		begin
   301 		begin
   302 		tmpsurf:= TTF_RenderUTF8_Blended(Fontz[fnt16].Handle, Str2PChar(trAmmo[NameId]), $FFFFFF);
   302 		tmpsurf:= TTF_RenderUTF8_Blended(Fontz[fnt16].Handle, Str2PChar(trAmmo[NameId]), $FFFFFF);
   303 		NameTex:= Surface2Tex(tmpsurf);
   303 		NameTex:= Surface2Tex(tmpsurf);
   304 		SDL_FreeSurface(tmpsurf)
   304 		SDL_FreeSurface(tmpsurf)
   305 		end;
   305 		end;
       
   306 
       
   307 for i:= Low(CountTexz) to High(CountTexz) do
       
   308 	begin
       
   309 	tmpsurf:= TTF_RenderUTF8_Blended(Fontz[fnt16].Handle, Str2PChar(IntToStr(i) + 'x'), $FFFFFF);
       
   310 	CountTexz[i]:= Surface2Tex(tmpsurf);
       
   311 	SDL_FreeSurface(tmpsurf)
       
   312 	end;
   306 
   313 
   307 {$IFDEF DUMP}
   314 {$IFDEF DUMP}
   308 SDL_SaveBMP_RW(LandSurface, SDL_RWFromFile('LandSurface.bmp', 'wb'), 1);
   315 SDL_SaveBMP_RW(LandSurface, SDL_RWFromFile('LandSurface.bmp', 'wb'), 1);
   309 SDL_SaveBMP_RW(StoreSurface, SDL_RWFromFile('StoreSurface.bmp', 'wb'), 1);
   316 SDL_SaveBMP_RW(StoreSurface, SDL_RWFromFile('StoreSurface.bmp', 'wb'), 1);
   310 {$ENDIF}
   317 {$ENDIF}