Changeset 323


Ignore:
Timestamp:
Jun 25, 2024, 1:34:07 AM (5 months ago)
Author:
chronos
Message:
Location:
trunk
Files:
3 added
1 deleted
3 edited
7 moved

Legend:

Unmodified
Added
Removed
  • trunk/GameProtocol.pas

    r317 r323  
    44
    55uses
    6   Classes, SysUtils, Game, UVarBlockSerializer, CommPin, SpecializedList;
     6  Classes, SysUtils, Game, VarBlockSerializer, CommPin, SpecializedList;
    77
    88type
  • trunk/Packages/CoolStreaming/BitStream.pas

    r322 r323  
    1 unit UBitStream;
     1unit BitStream;
    22
    33// Date: 2010-08-17
    4 
    5 {$mode delphi}
    64
    75interface
     
    343341destructor TMemoryBitStream.Destroy;
    344342begin
    345   FMemory.Free;
    346   inherited Destroy;
     343  FreeAndNil(FMemory);
     344  inherited;
    347345end;
    348346
  • trunk/Packages/CoolStreaming/BufferedFileStream.pas

    r322 r323  
    1 unit UBufferedFileStream;
     1unit BufferedFileStream;
    22
    33interface
     
    3131    property BufferUsed: Integer read GetBufferUsed;
    3232  end;
     33
    3334
    3435implementation
  • trunk/Packages/CoolStreaming/CoolStreaming.lpk

    r308 r323  
    11<?xml version="1.0" encoding="UTF-8"?>
    22<CONFIG>
    3   <Package Version="4">
     3  <Package Version="5">
    44    <PathDelim Value="\"/>
    55    <Name Value="CoolStreaming"/>
     
    3939    <Description Value="Contains various streaming classes."/>
    4040    <License Value="GNU/GPL"/>
    41     <Version Minor="1"/>
     41    <Version Minor="2"/>
    4242    <Files Count="7">
    4343      <Item1>
    44         <Filename Value="UStreamHelper.pas"/>
    45         <UnitName Value="UStreamHelper"/>
     44        <Filename Value="StreamHelper.pas"/>
     45        <UnitName Value="StreamHelper"/>
    4646      </Item1>
    4747      <Item2>
    48         <Filename Value="USubStream.pas"/>
    49         <UnitName Value="USubStream"/>
     48        <Filename Value="SubStream.pas"/>
     49        <UnitName Value="SubStream"/>
    5050      </Item2>
    5151      <Item3>
    52         <Filename Value="UVarBlockSerializer.pas"/>
    53         <UnitName Value="UVarBlockSerializer"/>
     52        <Filename Value="VarBlockSerializer.pas"/>
     53        <UnitName Value="VarBlockSerializer"/>
    5454      </Item3>
    5555      <Item4>
    56         <Filename Value="UBufferedFileStream.pas"/>
    57         <UnitName Value="UBufferedFileStream"/>
     56        <Filename Value="BufferedFileStream.pas"/>
     57        <UnitName Value="BufferedFileStream"/>
    5858      </Item4>
    5959      <Item5>
    60         <Filename Value="UTextFileStream.pas"/>
    61         <UnitName Value="UTextFileStream"/>
     60        <Filename Value="TextFileStream.pas"/>
     61        <UnitName Value="TextFileStream"/>
    6262      </Item5>
    6363      <Item6>
    64         <Filename Value="UBitStream.pas"/>
    65         <UnitName Value="UBitStream"/>
     64        <Filename Value="BitStream.pas"/>
     65        <UnitName Value="BitStream"/>
    6666      </Item6>
    6767      <Item7>
    68         <Filename Value="UDynNumber.pas"/>
    69         <UnitName Value="UDynNumber"/>
     68        <Filename Value="DynNumber.pas"/>
     69        <UnitName Value="DynNumber"/>
    7070      </Item7>
    7171    </Files>
     72    <CompatibilityMode Value="True"/>
     73    <i18n>
     74      <EnableI18N Value="True"/>
     75      <OutDir Value="Languages"/>
     76    </i18n>
    7277    <RequiredPkgs Count="3">
    7378      <Item1>
  • trunk/Packages/CoolStreaming/CoolStreaming.pas

    r185 r323  
    33 }
    44
    5 unit CoolStreaming; 
     5unit CoolStreaming;
    66
    77interface
    88
    99uses
    10     UStreamHelper, USubStream, UVarBlockSerializer, UBufferedFileStream,
    11   UTextFileStream, UBitStream, UDynNumber, LazarusPackageIntf;
     10  StreamHelper, SubStream, VarBlockSerializer, BufferedFileStream,
     11  TextFileStream, BitStream, DynNumber, LazarusPackageIntf;
    1212
    1313implementation
    1414
    15 procedure Register; 
     15procedure Register;
    1616begin
    17 end; 
     17end;
    1818
    1919initialization
    20   RegisterPackage('CoolStreaming', @Register); 
     20  RegisterPackage('CoolStreaming', @Register);
    2121end.
  • trunk/Packages/CoolStreaming/DynNumber.pas

    r322 r323  
    1 unit UDynNumber;
    2 
    3 {$mode objfpc}{$H+}
     1unit DynNumber;
    42
    53interface
    64
    75uses
    8   Classes, SysUtils, UBitStream, Math;
     6  Classes, SysUtils, BitStream, Math;
    97
    108type
     
    2119    function ReadNumber2: QWord;
    2220  end;
     21
    2322
    2423implementation
     
    7473destructor TDynamicNumber.Destroy;
    7574begin
    76   Stream.Free;
    77   inherited Destroy;
     75  FreeAndNil(Stream);
     76  inherited;
    7877end;
    7978
  • trunk/Packages/CoolStreaming/StreamHelper.pas

    r322 r323  
    1 unit UStreamHelper;
    2 
    3 {$mode delphi}{$H+}
     1unit StreamHelper;
    42
    53interface
     
    6866  end;
    6967
     68
    7069implementation
    7170
     
    232231destructor TStreamHelper.Destroy;
    233232begin
    234   if FOwnStream then FStream.Free;
    235   inherited Destroy;
     233  if FOwnStream then FreeAndNil(FStream);
     234  inherited;
    236235end;
    237236
  • trunk/Packages/CoolStreaming/SubStream.pas

    r322 r323  
    1 unit USubStream;
    2 
    3 {$mode delphi}
     1unit SubStream;
    42
    53interface
     
    2725    property SourcePosition: Int64 read FSourcePosition write FSourcePosition;
    2826  end;
     27
    2928
    3029implementation
  • trunk/Packages/CoolStreaming/TextFileStream.pas

    r322 r323  
    1 // TTextFileStream class by Chronos 12.9.2005
    2 // Homepage: http://jirihajda.zdechov.net/
    3 
    4 unit UTextFileStream;
    5 
    6 {$mode Delphi}{$H+}
     1unit TextFileStream;
    72
    83interface
    94
    10 uses Classes, SysUtils;
     5uses
     6  Classes, SysUtils;
    117
    128type
     
    1511  private
    1612    FBuffer: string;
    17   protected
    18 
    1913  public
    2014    function Eof: Boolean;
     
    2418    function RowsCount: Integer;
    2519  end;
     20
    2621
    2722implementation
  • trunk/Packages/CoolStreaming/VarBlockSerializer.pas

    r322 r323  
    1 // 2011-02-22
    2 
    3 unit UVarBlockSerializer;
    4 
    5 {$mode Delphi}{$H+}
     1unit VarBlockSerializer;
    62
    73// One level of recursive VarInt size supported
     
    117
    128uses
    13   Classes, DateUtils, UStreamHelper, Math, SysUtils, USubStream, LazUTF8,
     9  Classes, DateUtils, StreamHelper, Math, SysUtils, SubStream, LazUTF8,
    1410  SpecializedList, LCLProc;
    1511
     
    118114    destructor Destroy; override;
    119115  end;
     116
    120117
    121118implementation
     
    698695constructor TVarBlockSerializer.Create;
    699696begin
    700   inherited Create;
     697  inherited;
    701698  Stream := TStreamHelper.Create;
    702699  OwnsStream := True;
     
    707704begin
    708705  if OwnsStream then begin
    709     Stream.Free;
    710   end;
    711   inherited Destroy;
     706    FreeAndNil(FStream);
     707  end;
     708  inherited;
    712709end;
    713710
Note: See TracChangeset for help on using the changeset viewer.