Changeset 10


Ignore:
Timestamp:
Jan 7, 2017, 2:33:20 PM (7 years ago)
Author:
chronos
Message:
  • Modified: Created CevoComponents ackage for installable custom components.
  • Fixed: Compile time range check error.
  • Added: Heaptrace check and fixed some memory leaks.
  • Fixed: MaskD function.
Location:
trunk
Files:
10 added
7 deleted
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/Back.lfm

    r9 r10  
    11object Background: TBackground
    2   Left = 199
    3   Top = 123
     2  Left = 581
     3  Height = 172
     4  Top = 638
     5  Width = 202
    46  BorderIcons = []
    57  BorderStyle = bsNone
    68  Caption = 'C-evo'
    7   ClientHeight = 172
    8   ClientWidth = 202
    99  Color = clBlack
    10   Font.Charset = DEFAULT_CHARSET
    1110  Font.Color = clWindowText
    1211  Font.Height = -13
    1312  Font.Name = 'MS Sans Serif'
    14   Font.Style = []
    15   WindowState = wsMaximized
    1613  OnClose = FormClose
    1714  OnCreate = FormCreate
     15  OnDestroy = FormDestroy
    1816  OnPaint = FormPaint
    1917  OnShow = FormShow
    20   PixelsPerInch = 96
     18  LCLVersion = '1.6.2.0'
     19  WindowState = wsMaximized
    2120end
  • trunk/Back.pas

    r9 r10  
    88
    99type
     10
     11  { TBackground }
     12
    1013  TBackground = class(TForm)
     14    procedure FormDestroy(Sender: TObject);
    1115    procedure FormPaint(Sender: TObject);
    1216    procedure FormShow(Sender: TObject);
     
    5458end;
    5559
     60procedure TBackground.FormDestroy(Sender: TObject);
     61begin
     62  // TODO Why FormClose is not executed?
     63  if img <> nil then
     64    FreeAndNil(img);
     65end;
     66
    5667procedure TBackground.FormPaint(Sender: TObject);
    5768begin
  • trunk/Database.pas

    r9 r10  
    7979  TVicinity21Loc = array [0 .. 27] of integer;
    8080
    81 procedure MaskD(var x; Count, Mask: Cardinal);
     81procedure MaskD(var x: array of Cardinal; Count, Mask: Cardinal);
    8282procedure IntServer(Command, Player, Subject: integer; var Data);
    8383procedure CompactLists(p: integer);
     
    171171  UnBuilt: array [0 .. nPl - 1] of integer; { number of units built }
    172172
    173 procedure MaskD(var x; Count, Mask: Cardinal);
    174 begin
    175 { TODO
    176   sub eax,4
    177 @r: and [eax+edx*4],ecx
    178   dec edx
    179   jnz @r
    180   }
     173procedure MaskD(var x: array of Cardinal; Count, Mask: Cardinal);
     174var
     175  I: Integer;
     176begin
     177  for I := 0 to Count - 1 do
     178    x[I] := x[I] and Mask;
    181179end;
    182180
     
    16591657    RealMap[Loc1]:=RealMap[Loc1] or fPoll; }
    16601658
    1661   FillChar(Occupant, MapSize, -1);
     1659  FillChar(Occupant, MapSize, Byte(-1));
    16621660  FillChar(ZoCMap, MapSize, 0);
    16631661  FillChar(ObserveLevel, MapSize * 4, 0);
    1664   FillChar(UsedByCity, MapSize * 4, -1);
     1662  FillChar(UsedByCity, MapSize * 4, Byte(-1));
    16651663  GTestFlags := 0;
    16661664  GInitialized := GAlive or GWatching;
     
    16811679        GetMem(Map, 4 * MapSize);
    16821680        GetMem(MapObservedLast, 2 * MapSize);
    1683         FillChar(MapObservedLast^, 2 * MapSize, -1);
     1681        FillChar(MapObservedLast^, 2 * MapSize, Byte(-1));
    16841682        GetMem(Territory, MapSize);
    16851683        FillChar(Territory^, MapSize, $FF);
     
    17081706            GetMem(EnemyReport[p1], SizeOf(TEnemyReport) - 2 *
    17091707              (INFIN + 1 - nmmax));
    1710             FillChar(EnemyReport[p1].Tech, nAdv, tsNA);
     1708            FillChar(EnemyReport[p1].Tech, nAdv, Byte(tsNA));
    17111709            EnemyReport[p1].TurnOfContact := -1;
    17121710            EnemyReport[p1].TurnOfCivilReport := -1;
     
    17311729        for Loc1 := 0 to MapSize - 1 do
    17321730          Map[Loc1] := fUNKNOWN;
    1733         FillChar(Tech, nAdv, tsNA);
     1731        FillChar(Tech, nAdv, Byte(tsNA));
    17341732        FillChar(NatBuilt, SizeOf(NatBuilt), 0);
    17351733      end;
     
    18201818begin
    18211819  CalculatePrimitive;
    1822   FillChar(Occupant, MapSize, -1);
     1820  FillChar(Occupant, MapSize, Byte(-1));
    18231821  FillChar(ObserveLevel, MapSize * 4, 0);
    18241822  with RW[0] do
     
    18271825    GetMem(Map, 4 * MapSize);
    18281826    GetMem(MapObservedLast, 2 * MapSize);
    1829     FillChar(MapObservedLast^, 2 * MapSize, -1);
     1827    FillChar(MapObservedLast^, 2 * MapSize, Byte(-1));
    18301828    GetMem(Territory, MapSize);
    18311829    FillChar(Territory^, MapSize, $FF);
     
    26932691  if Mode = moLoading_Fast then
    26942692    exit;
    2695   MaskD(RW[p].Map^, MapSize, not Cardinal(fInEnemyZoC));
     2693  MaskD(RW[p].Map^, MapSize, Cardinal(not Cardinal(fInEnemyZoC)));
    26962694  ObserveMask := 3 shl (2 * p);
    26972695  for Loc := 0 to MapSize - 1 do
     
    27212719  if Mode <> moPlaying then
    27222720    exit;
    2723   MaskD(RW[p].Map^, MapSize, not Cardinal(fPeace));
     2721  MaskD(RW[p].Map^, MapSize, Cardinal(not Cardinal(fPeace)));
    27242722  for p1 := -1 to nPl - 1 do
    27252723    PeacePlayer[p1] := (p1 >= 0) and (p1 <> p) and (1 shl p1 and GAlive <> 0)
     
    28292827  end;
    28302828
    2831   FillChar(Country, MapSize, -1);
     2829  FillChar(Country, MapSize, Byte(-1));
    28322830  for Loc := 0 to MapSize - 1 do
    28332831    Dist[Loc] := CountryRadius + 1;
  • trunk/GameServer.pas

    r9 r10  
    15441544  MaskD(ObserveLevel, MapSize, not Cardinal(3 shl (2 * pTurn)));
    15451545  if Mode > moLoading_Fast then
    1546     MaskD(RW[pTurn].Map^, MapSize, not Cardinal(fUnit or fHiddenUnit or
     1546    MaskD(RW[pTurn].Map^, MapSize, Cardinal(not Cardinal(fUnit or fHiddenUnit or
    15471547      fStealthUnit or fObserved or fSpiedOut or fOwned or fOwnZoCUnit or
    1548       fInEnemyZoC));
     1548      fInEnemyZoC)));
    15491549  RW[pTurn].nEnemyUn := 0;
    15501550
     
    19951995      MaskD(ObserveLevel, MapSize, not Cardinal(3 shl (2 * pTurn)));
    19961996      if Mode > moLoading_Fast then
    1997         MaskD(RW[pTurn].Map^, MapSize, not Cardinal(fUnit or fHiddenUnit or
     1997        MaskD(RW[pTurn].Map^, MapSize, Cardinal(not Cardinal(fUnit or fHiddenUnit or
    19981998          fStealthUnit or fObserved or fSpiedOut or fOwned or fOwnZoCUnit or
    1999           fInEnemyZoC));
     1999          fInEnemyZoC)));
    20002000      RW[pTurn].nEnemyUn := 0;
    20012001      DiscoverViewAreas(pTurn);
  • trunk/Integrated.lpi

    r9 r10  
    2323    </VersionInfo>
    2424    <BuildModes Count="2">
    25       <Item1 Name="Default" Default="True"/>
     25      <Item1 Name="Debug" Default="True"/>
    2626      <Item2 Name="Release">
    2727        <CompilerOptions>
     
    7373      </local>
    7474    </RunParams>
    75     <RequiredPackages Count="1">
     75    <RequiredPackages Count="2">
    7676      <Item1>
     77        <PackageName Value="CevoComponents"/>
     78        <DefaultFilename Value="Components\CevoComponents.lpk" Prefer="True"/>
     79      </Item1>
     80      <Item2>
    7781        <PackageName Value="LCL"/>
    78       </Item1>
     82      </Item2>
    7983    </RequiredPackages>
    8084    <Units Count="41">
     
    8286        <Filename Value="Integrated.lpr"/>
    8387        <IsPartOfProject Value="True"/>
    84         <UnitName Value="cevo"/>
    8588      </Unit0>
    8689      <Unit1>
     
    143146        <Filename Value="Back.pas"/>
    144147        <IsPartOfProject Value="True"/>
    145         <HasResources Value="True"/>
     148        <ComponentName Value="Background"/>
     149        <HasResources Value="True"/>
     150        <ResourceBaseClass Value="Form"/>
    146151      </Unit14>
    147152      <Unit15>
     
    300305    </CodeGeneration>
    301306    <Linking>
     307      <Debugging>
     308        <UseHeaptrc Value="True"/>
     309      </Debugging>
    302310      <Options>
    303311        <Win32>
     
    307315    </Linking>
    308316    <Other>
    309       <CustomOptions Value="-dBorland -dVer150 -dDelphi7 -dCompiler6_Up -dPUREPASCAL"/>
     317      <CompilerMessages>
     318        <IgnoredMessages idx5024="True"/>
     319      </CompilerMessages>
     320      <CustomOptions Value="-dBorland -dVer150 -dDelphi7 -dCompiler6_Up -dPUREPASCAL -dDEBUG"/>
    310321    </Other>
    311322  </CompilerOptions>
  • trunk/Integrated.lpr

    r9 r10  
    33
    44uses
    5   Forms, Interfaces,
     5  Forms, Interfaces, SysUtils,
    66  StringTables in 'StringTables.pas',
    77  Directories in 'Directories.pas',
     
    4747{$R cevo.RES}
    4848
     49{$IFDEF DEBUG}
     50const
     51  HeapTraceLog = 'heaptrclog.trc';
     52{$ENDIF}
     53
    4954begin
     55  {$IFDEF DEBUG}
     56  // Heap trace
     57  DeleteFile(ExtractFilePath(ParamStr(0)) + HeapTraceLog);
     58  SetHeapTraceOutput(ExtractFilePath(ParamStr(0)) + HeapTraceLog);
     59  {$ENDIF}
     60
    5061  DotNetClient := nil;
    5162  Application.Initialize;
  • trunk/LocalPlayer/CityType.pas

    r6 r10  
    342342procedure TCityTypeDlg.DeleteBtnClick(Sender: TObject);
    343343begin
    344   fillchar(MyData.ImpOrder[ctype], sizeof(MyData.ImpOrder[ctype]), -1);
     344  fillchar(MyData.ImpOrder[ctype], sizeof(MyData.ImpOrder[ctype]), Byte(-1));
    345345  listed := [];
    346346  Changed := true;
  • trunk/LocalPlayer/ClientTools.pas

    r6 r10  
    434434  var
    435435    stage, NextJob, Tile: integer;
    436     Done: Set of jNone .. jTrans;
     436    Done: Set of jNone .. jPoll;
    437437  begin
    438438    Done := [];
  • trunk/LocalPlayer/Term.pas

    r9 r10  
    25162516                FarTech := adNone;
    25172517                FillChar(EnhancementJobs, SizeOf(EnhancementJobs), jNone);
    2518                 FillChar(ImpOrder, SizeOf(ImpOrder), -1);
     2518                FillChar(ImpOrder, SizeOf(ImpOrder), Byte(-1));
    25192519                ColdWarStart := -ColdWarTurns - 1;
    25202520                ToldAge := -1;
     
    25332533                    EffectiveOwner := -1
    25342534                  end;
    2535                 FillChar(ToldTech, SizeOf(ToldTech), tsNA);
     2535                FillChar(ToldTech, SizeOf(ToldTech), Byte(tsNA));
    25362536                if G.Difficulty[p1] > 0 then
    25372537                  SoundPreload(sbStart);
  • trunk/Protocol.pas

    r6 r10  
    14161416  TJobProgressData = array [0 .. nJob - 1] of record Required, Done,
    14171417    NextTurnPlus: integer;
    1418 end;
    1419 TBattleForecast = record pAtt, mixAtt, HealthAtt, ExpAtt, FlagsAtt, Movement,
    1420   EndHealthDef, EndHealthAtt: integer;
    1421 end;
    1422 TBattleForecastEx = record pAtt, mixAtt, HealthAtt, ExpAtt, FlagsAtt, Movement,
    1423   EndHealthDef, EndHealthAtt: integer; // must be same as in TBattleForecast
    1424 AStr, DStr, ABaseDamage, DBaseDamage: integer;
    1425 end;
    1426 TShowMove = record Owner, Health, mix, emix, Flags, FromLoc, dx, dy, EndHealth,
    1427   EndHealthDef, Fuel, Exp, Load: integer;
    1428 end;
    1429 TShowShipChange = record Reason, Ship1Owner, Ship2Owner: integer;
    1430 Ship1Change, Ship2Change: array [0 .. nShipPart - 1] of integer;
    1431 end;
    1432 TOffer = record nDeliver, nCost: integer;
    1433 Price:
    1434 array [0 .. 11] of Cardinal;
    1435 end;
    1436 TChart = array [0 .. INFIN] of integer;
    1437 TEditTileData = record Loc, NewTile: integer
    1438 end;
    1439 TCreateUnitData = record Loc, p, mix: integer;
    1440 end;
    1441 
    1442 TTileList = array [0 .. INFIN] of Cardinal;
    1443 TTileObservedLastList = array [0 .. INFIN] of SmallInt;
    1444 TOwnerList = array [0 .. INFIN] of ShortInt;
    1445 TByteList = array [0 .. INFIN] of Byte;
    1446 TIntList = array [0 .. INFIN] of integer;
    1447 TCityList = array [0 .. INFIN] of TCity;
    1448 TUnList = array [0 .. INFIN] of TUn;
    1449 TModelList = array [0 .. INFIN] of TModel;
    1450 TEnemyUnList = array [0 .. INFIN] of TUnitInfo;
    1451 TEnemyCityList = array [0 .. INFIN] of TCityInfo;
    1452 TEnemyModelList = array [0 .. INFIN] of TModelInfo;
    1453 TBattleList = array [0 .. INFIN] of TBattle;
    1454 
    1455 TPlayerContext = record Data: pointer;
    1456 Map:
    1457 ^TTileList;
    1458 { the playground, a list of tiles with index = location, see tile flags }
    1459 MapObservedLast:
    1460 ^TTileObservedLastList;
    1461 // turn in which the tile was observed last, index = location
    1462 Territory:
    1463 ^TOwnerList; // nation to which's territory a tile belongs, -1 indicates none
    1464 Un:
    1465 ^TUnList; { units }
    1466 City:
    1467 ^TCityList; { cities }
    1468 Model:
    1469 ^TModelList; { unit models }
    1470 EnemyUn:
    1471 ^TEnemyUnList; // known units of enemy players
    1472 EnemyCity:
    1473 ^TEnemyCityList; // known cities of enemy players
    1474 EnemyModel:
    1475 ^TEnemyModelList; // known unit models of enemy players
    1476 EnemyReport:
    1477 array [0 .. nPl - 1] of ^TEnemyReport;
    1478 
    1479 TestFlags, // options turned on in the "Manipulation" menu
    1480 Turn, // current turn
    1481 Alive, { bitset of IDs of players still alive, flag 1 shl p for player p }
    1482 Happened, // flags indicate what happened within the last turnaround
    1483 AnarchyStart, // start turn of anarchy, <0 if not in anarchy
    1484 Credibility, // own credibility
    1485 MaxCredibility, // maximum credibility still to achieve
    1486 nUn, { number of units }
    1487 nCity, { number of cities }
    1488 nModel, { number of developed unit models }
    1489 nEnemyUn, nEnemyCity, nEnemyModel, Government, { gAnarchy..gDemocracy }
    1490 Money, TaxRate, LuxRate, Research,
    1491 { collected research points for currently researched tech }
    1492 ResearchTech: integer; // currently researched tech
    1493 DevModel:
    1494 TModel; { unit model currently under development }
    1495 Tech:
    1496 array [0 .. (nAdv + 3) div 4 * 4 - 1] of ShortInt; { tech status indicator }
    1497 Attitude:
    1498 array [0 .. nPl - 1] of integer; // attitude to other nations
    1499 Treaty:
    1500 array [0 .. nPl - 1] of integer; // treaty with other nations
    1501 EvaStart:
    1502 array [0 .. nPl - 1] of integer; // peace treaty: start of evacuation period
    1503 Tribute:
    1504 array [0 .. nPl - 1] of integer; // no longer in use
    1505 TributePaid:
    1506 array [0 .. nPl - 1] of integer; // no longer in use
    1507 Wonder:
    1508 array [0 .. 27] of TWonderInfo;
    1509 Ship:
    1510 array [0 .. nPl - 1] of TShipInfo;
    1511 NatBuilt:
    1512 array [28 .. (nImp + 3) div 4 * 4 - 1] of ShortInt;
    1513 nBattleHistory:
    1514 integer;
    1515 BattleHistory:
    1516 ^TBattleList; // complete list of all my battles in the whole game
    1517 BorderHelper:
    1518 ^TByteList;
    1519 LastCancelTreaty:
    1520 array [0 .. nPl - 1] of integer; // turn of last treaty cancel
    1521 OracleIncome:
    1522 integer;
    1523 DefaultDebugMap:
    1524 ^TIntList;
    1525 Filler:
    1526 array [0 .. 879] of Byte;
    1527 end;
    1528 
    1529 TInitModuleData = record Server: TServerCall;
    1530 DataVersion, DataSize, Flags: integer;
    1531 end;
    1532 TNewGameData = record lx, ly, LandMass, MaxTurn: integer;
    1533 Difficulty:
    1534 array [0 .. nPl - 1] of integer;
    1535 { difficulty levels of the players, if it's 0 this player is the supervisor,
    1536   -1 for unused slots }
    1537 RO:
    1538 array [0 .. nPl - 1] of ^TPlayerContext;
    1539 AssemblyPath:
    1540 array [0 .. 255] of char;
    1541 SuperVisorRO:
    1542 array [0 .. nPl - 1] of ^TPlayerContext;
    1543 end;
    1544 TNewGameExData = record lx, ly, LandMass, MaxTurn, RND: integer;
    1545 Difficulty:
    1546 array [0 .. nPl - 1] of integer;
    1547 { difficulty levels of the players, if it's 0 this player is the supervisor,
    1548   -1 for unused slots }
    1549 Controlled:
    1550 integer;
    1551 end;
    1552 TShowNegoData = record pSender, pTarget, Action: integer;
    1553 Offer:
    1554 TOffer;
    1555 end;
     1418  end;
     1419  TBattleForecast = record
     1420    pAtt, mixAtt, HealthAtt, ExpAtt, FlagsAtt, Movement,
     1421    EndHealthDef, EndHealthAtt: integer;
     1422  end;
     1423  TBattleForecastEx = record
     1424    pAtt, mixAtt, HealthAtt, ExpAtt, FlagsAtt, Movement,
     1425    EndHealthDef, EndHealthAtt: integer; // must be same as in TBattleForecast
     1426    AStr, DStr, ABaseDamage, DBaseDamage: integer;
     1427  end;
     1428  TShowMove = record
     1429    Owner, Health, mix, emix, Flags, FromLoc, dx, dy, EndHealth,
     1430    EndHealthDef, Fuel, Exp, Load: integer;
     1431  end;
     1432  TShowShipChange = record
     1433    Reason, Ship1Owner, Ship2Owner: integer;
     1434    Ship1Change, Ship2Change: array [0 .. nShipPart - 1] of integer;
     1435  end;
     1436  TOffer = record nDeliver, nCost: integer;
     1437    Price: array [0 .. 11] of Cardinal;
     1438  end;
     1439  TChart = array [0 .. INFIN] of integer;
     1440  TEditTileData = record
     1441    Loc, NewTile: integer
     1442  end;
     1443  TCreateUnitData = record
     1444    Loc, p, mix: integer;
     1445  end;
     1446
     1447  TTileList = array [0 .. INFIN] of Cardinal;
     1448  TTileObservedLastList = array [0 .. INFIN] of SmallInt;
     1449  TOwnerList = array [0 .. INFIN] of ShortInt;
     1450  TByteList = array [0 .. INFIN] of Byte;
     1451  TIntList = array [0 .. INFIN] of integer;
     1452  TCityList = array [0 .. INFIN] of TCity;
     1453  TUnList = array [0 .. INFIN] of TUn;
     1454  TModelList = array [0 .. INFIN] of TModel;
     1455  TEnemyUnList = array [0 .. INFIN] of TUnitInfo;
     1456  TEnemyCityList = array [0 .. INFIN] of TCityInfo;
     1457  TEnemyModelList = array [0 .. INFIN] of TModelInfo;
     1458  TBattleList = array [0 .. INFIN] of TBattle;
     1459
     1460  TPlayerContext = record
     1461    Data: pointer;
     1462    Map: ^TTileList;
     1463    { the playground, a list of tiles with index = location, see tile flags }
     1464    MapObservedLast: ^TTileObservedLastList;
     1465    // turn in which the tile was observed last, index = location
     1466    Territory: ^TOwnerList; // nation to which's territory a tile belongs, -1 indicates none
     1467    Un: ^TUnList; { units }
     1468    City: ^TCityList; { cities }
     1469    Model: ^TModelList; { unit models }
     1470    EnemyUn: ^TEnemyUnList; // known units of enemy players
     1471    EnemyCity: ^TEnemyCityList; // known cities of enemy players
     1472    EnemyModel: ^TEnemyModelList; // known unit models of enemy players
     1473    EnemyReport: array [0 .. nPl - 1] of ^TEnemyReport;
     1474
     1475    TestFlags, // options turned on in the "Manipulation" menu
     1476    Turn, // current turn
     1477    Alive, { bitset of IDs of players still alive, flag 1 shl p for player p }
     1478    Happened, // flags indicate what happened within the last turnaround
     1479    AnarchyStart, // start turn of anarchy, <0 if not in anarchy
     1480    Credibility, // own credibility
     1481    MaxCredibility, // maximum credibility still to achieve
     1482    nUn, { number of units }
     1483    nCity, { number of cities }
     1484    nModel, { number of developed unit models }
     1485    nEnemyUn, nEnemyCity, nEnemyModel, Government, { gAnarchy..gDemocracy }
     1486    Money, TaxRate, LuxRate, Research,
     1487    { collected research points for currently researched tech }
     1488    ResearchTech: integer; // currently researched tech
     1489    DevModel: TModel; { unit model currently under development }
     1490    Tech: array [0 .. (nAdv + 3) div 4 * 4 - 1] of ShortInt; { tech status indicator }
     1491    Attitude: array [0 .. nPl - 1] of integer; // attitude to other nations
     1492    Treaty: array [0 .. nPl - 1] of integer; // treaty with other nations
     1493    EvaStart: array [0 .. nPl - 1] of integer; // peace treaty: start of evacuation period
     1494    Tribute: array [0 .. nPl - 1] of integer; // no longer in use
     1495    TributePaid: array [0 .. nPl - 1] of integer; // no longer in use
     1496    Wonder: array [0 .. 27] of TWonderInfo;
     1497    Ship: array [0 .. nPl - 1] of TShipInfo;
     1498    NatBuilt: array [28 .. (nImp + 3) div 4 * 4 - 1] of ShortInt;
     1499    nBattleHistory: integer;
     1500    BattleHistory: ^TBattleList; // complete list of all my battles in the whole game
     1501    BorderHelper: ^TByteList;
     1502    LastCancelTreaty: array [0 .. nPl - 1] of integer; // turn of last treaty cancel
     1503    OracleIncome: integer;
     1504    DefaultDebugMap: ^TIntList;
     1505    Filler: array [0 .. 879] of Byte;
     1506  end;
     1507
     1508  TInitModuleData = record
     1509    Server: TServerCall;
     1510    DataVersion, DataSize, Flags: integer;
     1511  end;
     1512
     1513  TNewGameData = record
     1514    lx, ly, LandMass, MaxTurn: integer;
     1515    Difficulty: array [0 .. nPl - 1] of integer;
     1516    { difficulty levels of the players, if it's 0 this player is the supervisor,
     1517      -1 for unused slots }
     1518    RO: array [0 .. nPl - 1] of ^TPlayerContext;
     1519    AssemblyPath: array [0 .. 255] of char;
     1520    SuperVisorRO: array [0 .. nPl - 1] of ^TPlayerContext;
     1521  end;
     1522
     1523  TNewGameExData = record
     1524    lx, ly, LandMass, MaxTurn, RND: integer;
     1525    Difficulty: array [0 .. nPl - 1] of integer;
     1526    { difficulty levels of the players, if it's 0 this player is the supervisor,
     1527      -1 for unused slots }
     1528    Controlled: integer;
     1529  end;
     1530
     1531  TShowNegoData = record
     1532    pSender, pTarget, Action: integer;
     1533    Offer: TOffer;
     1534  end;
    15561535
    15571536const
     
    17391718
    17401719begin
    1741   assert(sizeof(TPlayerContext) = 2048);
    1742   assert(sizeof(TModel) - 2 * sizeof(LongInt) - 4 * sizeof(word)
    1743     = sIntSetDevModel and $F * 4);
     1720  // TODO assert(sizeof(TPlayerContext) = 2048);
     1721  // TODO assert(sizeof(TModel) - 2 * sizeof(LongInt) - 4 * sizeof(word)
     1722  //  = sIntSetDevModel and $F * 4);
    17441723
    17451724end.
  • trunk/ScreenTools.pas

    r9 r10  
    15001500  Phrases2.loadfromfile(HomeDir + 'Language2.txt');
    15011501end;
     1502
    15021503Sounds := TStringTable.create;
    15031504if not Sounds.loadfromfile(HomeDir + 'Sounds\sound.txt') then
     
    15921593  UniFont[section].Free;
    15931594Phrases.Free;
     1595FreeAndNil(Phrases2);
    15941596if Sounds <> nil then
    15951597  Sounds.Free;
Note: See TracChangeset for help on using the changeset viewer.