Changeset 715
- Timestamp:
- Jan 4, 2026, 6:07:38 PM (21 hours ago)
- Location:
- trunk
- Files:
-
- 13 edited
-
Back.pas (modified) (1 diff)
-
Brain.pas (modified) (1 diff)
-
LocalPlayer/CityScreen.pas (modified) (1 diff)
-
LocalPlayer/Draft.pas (modified) (1 diff)
-
LocalPlayer/Help.pas (modified) (1 diff)
-
LocalPlayer/IsoEngine.pas (modified) (2 diffs)
-
LocalPlayer/NatStat.pas (modified) (1 diff)
-
LocalPlayer/TechTree.pas (modified) (1 diff)
-
LocalPlayer/Term.pas (modified) (5 diffs)
-
LocalPlayer/Tribes.pas (modified) (8 diffs)
-
LocalPlayer/UnitStat.pas (modified) (1 diff)
-
Packages/CevoComponents/ScreenTools.pas (modified) (8 diffs)
-
Packages/CevoComponents/Texture.pas (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Back.pas
r623 r715 66 66 WindowState := TWindowState.wsFullScreen; 67 67 if not Assigned(Img) then begin 68 FileName := GetGraphicsDir + DirectorySeparator + 'Background .png';68 FileName := GetGraphicsDir + DirectorySeparator + 'Background' + PngExt; 69 69 if FileExists(FileName) then begin 70 70 Img := TBitmap.Create; -
trunk/Brain.pas
r679 r715 80 80 TextSize: TSize; 81 81 begin 82 if not LoadGraphicFile(Picture, GetAiDir + DirectorySeparator + FileName + DirectorySeparator + FileName + '.png', [gfNoError]) then begin82 if not LoadGraphicFile(Picture, GetAiDir + DirectorySeparator + FileName + DirectorySeparator + FileName + PngExt, [gfNoError]) then begin 83 83 with Picture.Canvas do begin 84 84 Brush.Color := $904830; -
trunk/LocalPlayer/CityScreen.pas
r662 r715 231 231 Template := TBitmap.Create; 232 232 Template.PixelFormat := TPixelFormat.pf24bit; 233 LoadGraphicFile(Template, GetGraphicsDir + DirectorySeparator + 'City .png',233 LoadGraphicFile(Template, GetGraphicsDir + DirectorySeparator + 'City' + PngExt, 234 234 [gfNoGamma]); 235 235 CityMapTemplate := TBitmap.Create; 236 236 CityMapTemplate.PixelFormat := TPixelFormat.pf24bit; 237 LoadGraphicFile(CityMapTemplate, GetGraphicsDir + DirectorySeparator + 'BigCityMap .png',237 LoadGraphicFile(CityMapTemplate, GetGraphicsDir + DirectorySeparator + 'BigCityMap' + PngExt, 238 238 [gfNoGamma]); 239 239 SmallCityMapTemplate := TBitmap.Create; 240 240 SmallCityMapTemplate.PixelFormat := TPixelFormat.pf24bit; 241 LoadGraphicFile(SmallCityMapTemplate, GetGraphicsDir + DirectorySeparator + 'SmallCityMap .png',241 LoadGraphicFile(SmallCityMapTemplate, GetGraphicsDir + DirectorySeparator + 'SmallCityMap' + PngExt, 242 242 [gfNoGamma]); 243 243 SmallCityMap := TBitmap.Create; -
trunk/LocalPlayer/Draft.pas
r709 r715 95 95 Template := TBitmap.Create; 96 96 Template.PixelFormat := TPixelFormat.pf24bit; 97 LoadGraphicFile(Template, GetGraphicsDir + DirectorySeparator + 'MiliRes .png',97 LoadGraphicFile(Template, GetGraphicsDir + DirectorySeparator + 'MiliRes' + PngExt, 98 98 [gfNoGamma]); 99 99 end; -
trunk/LocalPlayer/Help.pas
r684 r715 1071 1071 until (P > Length(S)) or (S[P] = '\'); 1072 1072 if LoadGraphicFile(ExtPic, LocalizedFilePath('Help' + 1073 DirectorySeparator + Copy(S, 2, P - 2) + '.png')) then1073 DirectorySeparator + Copy(S, 2, P - 2) + PngExt)) then 1074 1074 begin 1075 1075 MainText.AddLine('', pkExternal); -
trunk/LocalPlayer/IsoEngine.pas
r608 r715 337 337 IsoMapCache[ATileSize] := TIsoMapCache.Create; 338 338 339 FileName := Format('Terrain%dx%d .png', [xxt * 2, yyt * 2]);339 FileName := Format('Terrain%dx%d' + PngExt, [xxt * 2, yyt * 2]); 340 340 IsoMapCache[ATileSize].HGrTerrain := LoadGraphicSet(FileName); 341 341 if not Assigned(IsoMapCache[ATileSize].HGrTerrain) then … … 343 343 344 344 345 FileName := Format('Cities%dx%d .png', [xxt * 2, yyt * 2]);345 FileName := Format('Cities%dx%d' + PngExt, [xxt * 2, yyt * 2]); 346 346 IsoMapCache[ATileSize].HGrCities := LoadGraphicSet(FileName); 347 347 if not Assigned(IsoMapCache[ATileSize].HGrCities) then -
trunk/LocalPlayer/NatStat.pas
r549 r715 93 93 Template := TBitmap.Create; 94 94 Template.PixelFormat := TPixelFormat.pf24bit; 95 LoadGraphicFile(Template, GetGraphicsDir + DirectorySeparator + 'Nation .png',95 LoadGraphicFile(Template, GetGraphicsDir + DirectorySeparator + 'Nation' + PngExt, 96 96 [gfNoGamma]); 97 97 end; -
trunk/LocalPlayer/TechTree.pas
r684 r715 178 178 Image := TBitmap.Create; 179 179 Image.PixelFormat := TPixelFormat.pf24bit; 180 LoadGraphicFile(Image, GetAppSharePath('Help' + DirectorySeparator + 'AdvTree .png'),180 LoadGraphicFile(Image, GetAppSharePath('Help' + DirectorySeparator + 'AdvTree' + PngExt), 181 181 [gfNoGamma]); 182 182 -
trunk/LocalPlayer/Term.pas
r709 r715 803 803 Picture.pix := pixNoSlaves; 804 804 Picture.Hash := 0; 805 Picture.GrName := 'StdUnits .png';805 Picture.GrName := 'StdUnits'; 806 806 IsNew := True; 807 807 end … … 823 823 with Tribe[P].ModelPicture[mix] do 824 824 begin 825 HGr := LoadGraphicSet(Picture.GrName );825 HGr := LoadGraphicSet(Picture.GrName + PngExt); 826 826 pix := Picture.pix; 827 827 end; … … 1407 1407 if AILogo[P] = nil then 1408 1408 AILogo[P] := TBitmap.Create; 1409 if not LoadGraphicFile(AILogo[P], GetAppSharePath(Name + '.png'), [gfNoError]) then1409 if not LoadGraphicFile(AILogo[P], GetAppSharePath(Name + PngExt), [gfNoError]) then 1410 1410 begin 1411 1411 FreeAndNil(AILogo[P]); … … 1766 1766 MainMap.SetOutput(Offscreen); 1767 1767 1768 HGrStdUnits := LoadGraphicSet('StdUnits .png');1768 HGrStdUnits := LoadGraphicSet('StdUnits' + PngExt); 1769 1769 SmallImp := TBitmap.Create; 1770 1770 SmallImp.PixelFormat := TPixelFormat.pf24bit; … … 1919 1919 pix := pixNoSlaves; 1920 1920 Hash := 0; 1921 GrName := 'StdUnits .png';1921 GrName := 'StdUnits'; 1922 1922 Tribe[p1].SetModelPicture(Picture, True); 1923 1923 end; -
trunk/LocalPlayer/Tribes.pas
r661 r715 322 322 Item := Get; 323 323 sympix := GetNum; 324 symHGr := LoadGraphicSet(Item + '.png');324 symHGr := LoadGraphicSet(Item + PngExt); 325 325 end; 326 326 end; … … 442 442 end; 443 443 end; 444 cHGr := LoadGraphicSet(Item + '.png');444 cHGr := LoadGraphicSet(Item + PngExt); 445 445 for X := 0 to 3 do 446 446 with CityPicture[X] do begin … … 461 461 else 462 462 begin 463 faceHGr := LoadGraphicSet(Item + '.png');463 faceHGr := LoadGraphicSet(Item + PngExt); 464 464 facepix := GetNum; 465 465 if faceHGr.Data.Canvas.Pixels[facepix mod 10 * 65, … … 493 493 Dec(I); 494 494 Assert(I >= 0); 495 Assert(PictureList[I].HGr = LoadGraphicSet(GrName ));495 Assert(PictureList[I].HGr = LoadGraphicSet(GrName + PngExt)); 496 496 Assert(PictureList[I].pix = pix); 497 497 ModelPicture[mix].HGr := PictureList[I].HGr; … … 503 503 with ModelPicture[mix] do 504 504 begin 505 HGr := LoadGraphicSet(GrName );505 HGr := LoadGraphicSet(GrName + PngExt); 506 506 pix := Info.pix; 507 507 Inc(HGr.PixUsed[pix]); … … 514 514 begin 515 515 Input := Script[I]; 516 if Input = '#UNITS ' + ExtractFileNameOnly(GrName ) then516 if Input = '#UNITS ' + ExtractFileNameOnly(GrName + PngExt) then 517 517 Ok := True 518 518 else if (Input <> '') and (Input[1] = '#') then … … 610 610 LeastUsed := MaxInt; 611 611 612 TestPic.GrName := 'StdUnits .png';612 TestPic.GrName := 'StdUnits'; 613 613 HGr := HGrStdUnits; 614 614 for I := 0 to StdUnitScript.Count - 1 do … … 625 625 begin 626 626 Ok := True; 627 TestPic.GrName := Copy(Input, 8, 255) + '.png';628 HGr := GrExt.SearchByName(TestPic.GrName );627 TestPic.GrName := Copy(Input, 8, 255); 628 HGr := GrExt.SearchByName(TestPic.GrName + PngExt); 629 629 end 630 630 else if (Input <> '') and (Input[1] = '#') then -
trunk/LocalPlayer/UnitStat.pas
r622 r715 86 86 Template := TBitmap.Create; 87 87 Template.PixelFormat := TPixelFormat.pf24bit; 88 LoadGraphicFile(Template, GetGraphicsDir + DirectorySeparator + 'Unit .png',88 LoadGraphicFile(Template, GetGraphicsDir + DirectorySeparator + 'Unit' + PngExt, 89 89 [gfNoGamma]); 90 90 end; -
trunk/Packages/CevoComponents/ScreenTools.pas
r711 r715 116 116 117 117 const 118 BmpExt = '.bmp'; 119 PngExt = '.png'; 120 JpgExt = '.jpg'; 121 118 122 TransparentColor1 = $FF00FF; 119 123 TransparentColor2 = $7F007F; … … 434 438 Result := False; 435 439 if ExtractFileExt(FileName) = '' then 436 FileName := FileName + '.png';440 FileName := FileName + PngExt; 437 441 438 442 if FileExists(FileName) then begin 439 if ExtractFileExt(FileName) = '.jpg'then begin443 if ExtractFileExt(FileName) = JpgExt then begin 440 444 Jpeg := TJpegImage.Create; 441 445 try … … 451 455 FreeAndNil(Jpeg); 452 456 end else 453 if ExtractFileExt(FileName) = '.png'then begin457 if ExtractFileExt(FileName) = PngExt then begin 454 458 Png := TPortableNetworkGraphic.Create; 455 459 try … … 473 477 FreeAndNil(Png); 474 478 end else 475 if ExtractFileExt(FileName) = '.bmp'then begin479 if ExtractFileExt(FileName) = BmpExt then begin 476 480 try 477 481 Bmp.LoadFromFile(FileName); … … 1882 1886 LoadPhrases; 1883 1887 LoadFonts; 1884 Templates := LoadGraphicSet('Templates .png', False);1888 Templates := LoadGraphicSet('Templates' + PngExt, False); 1885 1889 with Templates do begin 1886 1890 Logo := GetItem('Logo'); … … 1898 1902 end; 1899 1903 1900 LoadGraphicFile(Colors, GetGraphicsDir + DirectorySeparator + 'Colors .png');1901 LoadGraphicFile(Paper, GetGraphicsDir + DirectorySeparator + 'Paper .jpg');1902 LoadGraphicFile(BigImp, GetGraphicsDir + DirectorySeparator + 'Icons .png');1904 LoadGraphicFile(Colors, GetGraphicsDir + DirectorySeparator + 'Colors' + PngExt); 1905 LoadGraphicFile(Paper, GetGraphicsDir + DirectorySeparator + 'Paper' + JpgExt); 1906 LoadGraphicFile(BigImp, GetGraphicsDir + DirectorySeparator + 'Icons' + PngExt); 1903 1907 end; 1904 1908 … … 1923 1927 GrExt := TGraphicSets.Create; 1924 1928 1925 HGrSystem := LoadGraphicSet('System .png');1929 HGrSystem := LoadGraphicSet('System' + PngExt); 1926 1930 with HGrSystem do begin 1927 1931 CityMark1 := GetItem('CityMark1'); … … 1929 1933 end; 1930 1934 1931 HGrSystem2 := LoadGraphicSet('System2 .png');1935 HGrSystem2 := LoadGraphicSet('System2' + PngExt); 1932 1936 with HGrSystem2 do begin 1933 1937 Ornament := GetItem('Ornament'); -
trunk/Packages/CevoComponents/Texture.pas
r471 r715 47 47 FAge := AValue; 48 48 LoadGraphicFile(Image, GetGraphicsDir + DirectorySeparator + 49 'Texture' + IntToStr(Age + 1) + '.jpg');49 'Texture' + IntToStr(Age + 1) + JpgExt); 50 50 ColorBevelLight := Colors.Canvas.Pixels[clkAge0 + Age, cliBevelLight]; 51 51 ColorBevelShade := Colors.Canvas.Pixels[clkAge0 + Age, cliBevelShade];
Note:
See TracChangeset
for help on using the changeset viewer.
