Ignore:
Timestamp:
Apr 24, 2021, 11:41:07 PM (4 years ago)
Author:
chronos
Message:
  • Modified: Merged changes from trunk r377.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/highdpi/Protocol.pas

    r349 r378  
    12751275  TClientCall = procedure (Command, Player: Integer; var Data); stdcall;
    12761276
     1277  TCommand = (
     1278    cmInitModule = $0000,
     1279    cmReleaseModule = $0100,
     1280    cmBroadcast = $0200,
     1281    cmHelpOnly = $0700,
     1282    cmStartHelp = $0710,
     1283    cmStartCredits = $0720,
     1284
     1285    cmNewGame = $0800,
     1286    cmLoadGame = $0810,
     1287    cmMovie = $0820,
     1288    cmNewGameEx = $0840,
     1289    cmLoadGameEx = $0850,
     1290    cmNewMap = $0880,
     1291    cmReplay = $08E0,
     1292    cmGetReady = $08F0,
     1293    cmBreakGame = $0900,
     1294
     1295    cmTurn = $2000,
     1296    cmResume = $2010,
     1297    cmContinue = $2080,
     1298    cmMovieTurn = $2100,
     1299    cmMovieEndTurn = $2110,
     1300    cmEditMap = $2800,
     1301
     1302    // cShowTileM=$3000;cShowTileA=$3010;cShowFoundCity=$3020;
     1303    cmShowUnitChanged = $3030,
     1304    cmShowAfterMove = $3040,
     1305    cmShowAfterAttack = $3050,
     1306    cmShowCityChanged = $3090,
     1307    // cShowMove=$3100;cShowCapture=$3110;
     1308    // cShowAttackBegin=$3200;cShowAttackWon=$3210;cShowAttackLost=$3220;
     1309    cmShowMoving = $3140,
     1310    cmShowCapturing = $3150,
     1311    cmShowAttacking = $3240,
     1312    cmShowMissionResult = $3300,
     1313    cmShowShipChange = $3400,
     1314    cmShowGreatLibTech = $3500,
     1315    cmShowTurnChange = $3700,
     1316    cmShowCancelTreaty = $3800,
     1317    cmShowEndContact = $3810,
     1318    cmShowCancelTreatyByAlliance = $3820,
     1319    cmShowSupportAllianceAgainst = $3830,
     1320    cmShowPeaceViolation = $3880,
     1321    cmShowGame = $3F00, { cShowSuperView=$3F80; }
     1322    cmRefreshDebugMap = $3F90,
     1323
     1324    // diplomacy commands equal to server, see below
     1325
     1326    cmDebugMessage = $7000,
     1327    cmShowNego = $7010
     1328  );
     1329
    12771330  TUn = packed record
    12781331    Loc: LongInt; { location }
     
    16691722    Flags: Integer;
    16701723  end;
     1724  PInitModuleData = ^TInitModuleData;
    16711725
    16721726  TNewGameData = record
     
    17771831function DelphiRandom: Extended; overload;
    17781832procedure DelphiRandomize;
     1833function GetCommandDataSize(Command: TCommand): Integer;
    17791834
    17801835
     
    19191974end;
    19201975
     1976function GetCommandDataSize(Command: TCommand): Integer;
     1977begin
     1978  case Command of
     1979    cmInitModule: Result := SizeOf(TInitModuleData);
     1980    cmGetReady: Result := 0;
     1981    cmTurn: Result := 0;
     1982    cmShowTurnChange: Result := SizeOf(Integer);
     1983    cmShowNego: Result := SizeOf(TShowNegoData);
     1984    cmNewGame, cmLoadGame, cmMovie, cmNewMap: Result := SizeOf(TNewGameData);
     1985    cmShowShipChange: Result := SizeOf(TShowShipChange);
     1986    cmShowGreatLibTech: Result := SizeOf(Integer);
     1987    cmShowCityChanged: Result := SizeOf(Integer);
     1988    cmShowPeaceViolation: Result := SizeOf(Integer);
     1989    cmShowMoving: Result := SizeOf(TShowMove);
     1990    cmShowUnitChanged: Result := SizeOf(Integer);
     1991    cmShowMissionResult: Result := SizeOf(Cardinal);
     1992    cmShowAfterMove: Result := SizeOf(Integer);
     1993    cmShowAfterAttack: Result := SizeOf(Integer);
     1994    cmShowSupportAllianceAgainst: Result := SizeOf(Integer);
     1995    cmShowCancelTreatyByAlliance: Result := SizeOf(Integer);
     1996    cmShowEndContact: Result := 0;
     1997    cmShowGame: Result := 0;
     1998    //sIntCancelTreaty: Result := SizeOf(Integer);
     1999    else begin
     2000      Result := 0;
     2001    end;
     2002  end;
     2003end;
     2004
     2005
    19212006initialization
    19222007
Note: See TracChangeset for help on using the changeset viewer.