Changeset 375


Ignore:
Timestamp:
Apr 24, 2021, 1:51:40 PM (6 months ago)
Author:
chronos
Message:
Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/GameServer.pas

    r367 r375  
    44954495end; { <<<server }
    44964496
    4497 function ExtractFileNameWithoutExt(const Filename: string): string;
    4498 var
    4499   P: Integer;
    4500 begin
    4501   Result := Filename;
    4502   P := Length(Result);
    4503   while P > 0 do begin
    4504     case Result[P] of
    4505       PathDelim: Exit;
    4506       {$ifdef windows}
    4507       '/': if ('/' in AllowDirectorySeparators) then Exit;
    4508       {$endif}
    4509       '.': Exit(Copy(Result, 1, P - 1));
    4510     end;
    4511     Dec(P);
    4512   end;
    4513 end;
    4514 
    45154497
    45164498initialization
  • trunk/Packages/CevoComponents/ScreenTools.pas

    r374 r375  
    5454procedure EditFrame(ca: TCanvas; p: TRect; T: TTexture);
    5555function HexStringToColor(S: string): integer;
     56function ExtractFileNameWithoutExt(const Filename: string): string;
    5657function LoadGraphicFile(Bmp: TBitmap; FileName: string; Options: TLoadGraphicFileOptions = []): boolean;
    5758function LoadGraphicSet(const Name: string): TGraphicSet;
     
    493494end;
    494495
     496function ExtractFileNameWithoutExt(const Filename: string): string;
     497var
     498  P: Integer;
     499begin
     500  Result := Filename;
     501  P := Length(Result);
     502  while P > 0 do begin
     503    case Result[P] of
     504      PathDelim: Exit;
     505      {$ifdef windows}
     506      '/': if ('/' in AllowDirectorySeparators) then Exit;
     507      {$endif}
     508      '.': Exit(Copy(Result, 1, P - 1));
     509    end;
     510    Dec(P);
     511  end;
     512end;
     513
    495514function LoadGraphicSet(const Name: string): TGraphicSet;
    496515var
  • trunk/UBrain.pas

    r368 r375  
    5151
    5252implementation
     53
     54uses
     55  ScreenTools;
    5356
    5457{ TBrain }
Note: See TracChangeset for help on using the changeset viewer.