equal
deleted
inserted
replaced
314 begin |
314 begin |
315 tmpsurf:= TTF_RenderUTF8_Blended(Fontz[fnt16].Handle, Str2PChar(trAmmo[NameId]), $FFFFFF); |
315 tmpsurf:= TTF_RenderUTF8_Blended(Fontz[fnt16].Handle, Str2PChar(trAmmo[NameId]), $FFFFFF); |
316 NameTex:= Surface2Tex(tmpsurf, false); |
316 NameTex:= Surface2Tex(tmpsurf, false); |
317 SDL_FreeSurface(tmpsurf) |
317 SDL_FreeSurface(tmpsurf) |
318 end; |
318 end; |
319 |
319 |
320 for i:= Low(CountTexz) to High(CountTexz) do |
320 for i:= Low(CountTexz) to High(CountTexz) do |
321 begin |
321 begin |
322 tmpsurf:= TTF_RenderUTF8_Blended(Fontz[fnt16].Handle, Str2PChar(IntToStr(i) + 'x'), $FFFFFF); |
322 tmpsurf:= TTF_RenderUTF8_Blended(Fontz[fnt16].Handle, Str2PChar(IntToStr(i) + 'x'), $FFFFFF); |
323 CountTexz[i]:= Surface2Tex(tmpsurf, false); |
323 CountTexz[i]:= Surface2Tex(tmpsurf, false); |
324 SDL_FreeSurface(tmpsurf) |
324 SDL_FreeSurface(tmpsurf) |
697 substr: shortstring; |
697 substr: shortstring; |
698 edge, corner, tail: TSPrite; |
698 edge, corner, tail: TSPrite; |
699 begin |
699 begin |
700 |
700 |
701 case SpeechType of |
701 case SpeechType of |
702 1: begin; |
702 1: begin; |
703 edge:= sprSpeechEdge; |
703 edge:= sprSpeechEdge; |
704 corner:= sprSpeechCorner; |
704 corner:= sprSpeechCorner; |
705 tail:= sprSpeechTail; |
705 tail:= sprSpeechTail; |
706 end; |
706 end; |
707 2: begin; |
707 2: begin; |
708 edge:= sprThoughtEdge; |
708 edge:= sprThoughtEdge; |
709 corner:= sprThoughtCorner; |
709 corner:= sprThoughtCorner; |
710 tail:= sprThoughtTail; |
710 tail:= sprThoughtTail; |
711 end; |
711 end; |
712 3: begin; |
712 3: begin; |
713 edge:= sprShoutEdge; |
713 edge:= sprShoutEdge; |
714 corner:= sprShoutCorner; |
714 corner:= sprShoutCorner; |
715 tail:= sprShoutTail; |
715 tail:= sprShoutTail; |
716 end; |
716 end; |
717 end; |
717 end; |
883 var tmpsurf: PSDL_Surface; |
883 var tmpsurf: PSDL_Surface; |
884 s: shortstring; |
884 s: shortstring; |
885 {$IFDEF IPHONEOS} |
885 {$IFDEF IPHONEOS} |
886 convertedSurf: PSDL_Surface; |
886 convertedSurf: PSDL_Surface; |
887 const TestFormat: TSDL_PixelFormat = ( |
887 const TestFormat: TSDL_PixelFormat = ( |
888 palette: nil; |
888 palette: nil; |
889 BitsPerPixel : 32; |
889 BitsPerPixel : 32; |
890 BytesPerPixel: 4; |
890 BytesPerPixel: 4; |
891 Rloss : 0; |
891 Rloss : 0; |
892 Gloss : 0; |
892 Gloss : 0; |
893 Bloss : 0; |
893 Bloss : 0; |
894 Aloss : 0; |
894 Aloss : 0; |
895 Rshift: 0; |
895 Rshift: 0; |
896 Gshift: 8; |
896 Gshift: 8; |
897 Bshift: 16; |
897 Bshift: 16; |
898 Ashift: 24; |
898 Ashift: 24; |
899 RMask : $000000FF; |
899 RMask : $000000FF; |
900 GMask : $0000FF00; |
900 GMask : $0000FF00; |
901 BMask : $00FF0000; |
901 BMask : $00FF0000; |
902 AMask : $FF000000; |
902 AMask : $FF000000; |
903 colorkey: 0; |
903 colorkey: 0; |
904 alpha : 255); |
904 alpha : 255); |
905 {$ENDIF} |
905 {$ENDIF} |
906 begin |
906 begin |
907 WriteToConsole(msgLoading + filename + '... '); |
907 WriteToConsole(msgLoading + filename + '... '); |
908 s:= filename + '.' + cBitsStr + '.png'; |
908 s:= filename + '.' + cBitsStr + '.png'; |
909 tmpsurf:= IMG_Load(Str2PChar(s)); |
909 tmpsurf:= IMG_Load(Str2PChar(s)); |
916 |
916 |
917 if ((imageFlags and ifLowRes) <> 0) then |
917 if ((imageFlags and ifLowRes) <> 0) then |
918 begin |
918 begin |
919 s:= filename + '-lowres.png'; |
919 s:= filename + '-lowres.png'; |
920 if (tmpsurf <> nil) then |
920 if (tmpsurf <> nil) then |
921 begin |
921 begin |
922 if ((tmpsurf^.w > MaxTextureSize) or (tmpsurf^.h > MaxTextureSize)) then |
922 if ((tmpsurf^.w > MaxTextureSize) or (tmpsurf^.h > MaxTextureSize)) then |
923 begin |
923 begin |
924 WriteLnToConsole('Image too big, trying to load lowres version: ' + s); |
924 WriteLnToConsole('Image too big, trying to load lowres version: ' + s); |
925 tmpsurf:= IMG_Load(Str2PChar(s)) |
925 tmpsurf:= IMG_Load(Str2PChar(s)) |
926 end; |
926 end; |
929 begin |
929 begin |
930 WriteLnToConsole('Image not found, trying to load lowres version: ' + s); |
930 WriteLnToConsole('Image not found, trying to load lowres version: ' + s); |
931 tmpsurf:= IMG_Load(Str2PChar(s)) |
931 tmpsurf:= IMG_Load(Str2PChar(s)) |
932 end; |
932 end; |
933 end; |
933 end; |
934 |
934 |
935 if tmpsurf = nil then |
935 if tmpsurf = nil then |
936 begin |
936 begin |
937 OutError(msgFailed, (imageFlags and ifCritical) <> 0); |
937 OutError(msgFailed, (imageFlags and ifCritical) <> 0); |
938 exit(nil) |
938 exit(nil) |
939 end; |
939 end; |