hedgewars/uStore.pas
changeset 3384 7eb4707d43f0
parent 3381 f8800c44b3de
child 3390 1d4926d10a9e
equal deleted inserted replaced
3383:45a73be4d8c1 3384:7eb4707d43f0
   451 
   451 
   452 // name of weapons in ammo menu
   452 // name of weapons in ammo menu
   453 for ai:= Low(TAmmoType) to High(TAmmoType) do
   453 for ai:= Low(TAmmoType) to High(TAmmoType) do
   454     with Ammoz[ai] do
   454     with Ammoz[ai] do
   455         begin
   455         begin
       
   456         TryDo(trAmmo[NameId] <> '','No default text/translation found for ammo type #' + intToStr(ord(ai)) + '!',true);
   456         tmpsurf:= TTF_RenderUTF8_Blended(Fontz[CheckCJKFont(trAmmo[NameId],fnt16)].Handle, Str2PChar(trAmmo[NameId]), cWhiteColorChannels);
   457         tmpsurf:= TTF_RenderUTF8_Blended(Fontz[CheckCJKFont(trAmmo[NameId],fnt16)].Handle, Str2PChar(trAmmo[NameId]), cWhiteColorChannels);
       
   458         TryDo(tmpsurf <> nil,'Name-texture creation for ammo type #' + intToStr(ord(ai)) + ' failed!',true);
   457         tmpsurf:= doSurfaceConversion(tmpsurf);
   459         tmpsurf:= doSurfaceConversion(tmpsurf);
   458         NameTex:= Surface2Tex(tmpsurf, false);
   460         NameTex:= Surface2Tex(tmpsurf, false);
   459         SDL_FreeSurface(tmpsurf)
   461         SDL_FreeSurface(tmpsurf)
   460         end;
   462         end;
   461 
   463