Changeset 88 for trunk/ScreenTools.pas
- Timestamp:
- Jan 18, 2017, 4:22:26 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ScreenTools.pas
r74 r88 59 59 procedure EditFrame(ca: TCanvas; p: TRect; const T: TTexture); 60 60 function HexStringToColor(s: string): integer; 61 function LoadGraphicFile(bmp: TBitmap; Path: string;61 function LoadGraphicFile(bmp: TBitmap; const Path: string; 62 62 Options: integer = 0): boolean; 63 function LoadGraphicSet( Name: string): integer;63 function LoadGraphicSet(const Name: string): integer; 64 64 procedure Dump(dst: TBitmap; HGr, xDst, yDst, Width, Height, xGr, yGr: integer); 65 65 procedure Sprite(Canvas: TCanvas; HGr, xDst, yDst, Width, Height, xGr, … … 451 451 end; 452 452 453 function LoadGraphicFile(bmp: TBitmap; Path: string; Options: integer): boolean;453 function LoadGraphicFile(bmp: TBitmap; const Path: string; Options: integer): boolean; 454 454 var 455 455 jtex: tjpegimage; … … 505 505 if not Result then begin 506 506 if Options and gfNoError = 0 then 507 Application.MessageBox(PChar(Format(Phrases.Lookup('FILENOTFOUND'), 508 [Path])), 'C-evo', 0); 509 Exit; 507 raise Exception.Create(Format(Phrases.Lookup('FILENOTFOUND'), 508 [Path])); 510 509 end; 511 510 … … 514 513 end; 515 514 516 function LoadGraphicSet( Name: string): integer;517 var 518 i, x, y, xmax, OriginalColor: integer;515 function LoadGraphicSet(const Name: string): integer; 516 var 517 I, x, y, xmax, OriginalColor: integer; 519 518 FileName: string; 520 519 Source: TBitmap; 521 520 DataPixel, MaskPixel: TPixelPointer; 522 521 begin 523 i:= 0;524 while ( i< nGrExt) and (GrExt[i].Name <> Name) do525 inc(i);526 result := i;527 if i= nGrExt then begin522 I := 0; 523 while (I < nGrExt) and (GrExt[i].Name <> Name) do 524 Inc(I); 525 Result := I; 526 if I = nGrExt then begin 528 527 Source := TBitmap.Create; 529 528 Source.PixelFormat := pf24bit;
Note:
See TracChangeset
for help on using the changeset viewer.