Changeset 73 for trunk/Start.pas


Ignore:
Timestamp:
Jan 15, 2017, 4:12:10 PM (8 years ago)
Author:
chronos
Message:
  • Modified: All graphics images converted from BMP to PNG.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Start.pas

    r72 r73  
    330330
    331331  BrainPicture[0] := TBitmap.Create;
    332   BrainPicture[0].width := 64;
    333   BrainPicture[0].height := 64;
     332  BrainPicture[0].SetSize(64, 64);
    334333  BitBlt(BrainPicture[0].Canvas.Handle, 0, 0, 64, 64,
    335334    GrExt[HGrSystem2].Data.Canvas.Handle, 1, 111, SRCCOPY);
    336335  BrainPicture[1] := TBitmap.Create;
    337   BrainPicture[1].width := 64;
    338   BrainPicture[1].height := 64;
     336  BrainPicture[1].SetSize(64, 64);
    339337  BitBlt(BrainPicture[1].Canvas.Handle, 0, 0, 64, 64,
    340338    GrExt[HGrSystem2].Data.Canvas.Handle, 66, 111, SRCCOPY);
    341339  BrainPicture[2] := TBitmap.Create;
    342   BrainPicture[2].width := 64;
    343   BrainPicture[2].height := 64;
     340  BrainPicture[2].SetSize(64, 64);
    344341  BitBlt(BrainPicture[2].Canvas.Handle, 0, 0, 64, 64,
    345342    GrExt[HGrSystem2].Data.Canvas.Handle, 131, 111, SRCCOPY);
    346343  BrainPicture[3] := TBitmap.Create;
    347   BrainPicture[3].width := 64;
    348   BrainPicture[3].height := 64;
     344  BrainPicture[3].SetSize(64, 64);
    349345  BitBlt(BrainPicture[3].Canvas.Handle, 0, 0, 64, 64,
    350346    GrExt[HGrSystem2].Data.Canvas.Handle, 131, 46, SRCCOPY);
    351   for i := bixFirstAI to nBrain - 1 do
    352   begin
     347  for i := bixFirstAI to nBrain - 1 do begin
    353348    BrainPicture[i] := TBitmap.Create;
    354     if not LoadGraphicFile(BrainPicture[i], HomeDir + 'AI' + DirectorySeparator + Brain[i].FileName,
    355       gfNoError) then
    356     begin
     349    if not LoadGraphicFile(BrainPicture[i], HomeDir + 'AI' + DirectorySeparator + Brain[i].FileName + '.png',
     350      gfNoError) then begin
    357351      BrainPicture[i].width := 64;
    358352      BrainPicture[i].height := 64;
    359       with BrainPicture[i].Canvas do
    360       begin
     353      with BrainPicture[i].Canvas do begin
    361354        Brush.Color := $904830;
    362355        FillRect(Rect(0, 0, 64, 64));
     
    366359        Textout(32 - TextWidth(Brain[i].FileName) div 2,
    367360          32 - TextHeight(Brain[i].FileName) div 2, Brain[i].FileName);
    368       end
    369     end
     361      end;
     362    end;
    370363  end;
    371364
     
    11681161          MapFileName := List.Items[List.ItemIndex] + '.cevo map';
    11691162        if LoadGraphicFile(Mini, DataDir + 'Maps' + DirectorySeparator + Copy(MapFileName, 1,
    1170           Length(MapFileName) - 9), gfNoError) then
     1163          Length(MapFileName) - 9) + '.png', gfNoError) then
    11711164        begin
    11721165          if Mini.width div 2 > MaxWidthMapLogo then
     
    17651758        try // rename map picture
    17661759          AssignFile(f, DataDir + 'Maps'+ DirectorySeparator + List.Items[List.ItemIndex]
    1767             + '.bmp');
    1768           Rename(f, DataDir + 'Maps'+ DirectorySeparator + NewName + '.bmp');
     1760            + '.png');
     1761          Rename(f, DataDir + 'Maps'+ DirectorySeparator + NewName + '.png');
    17691762        except
    17701763        end;
Note: See TracChangeset for help on using the changeset viewer.