Changeset 364 for trunk/Protocol.pas
- Timestamp:
- Apr 12, 2021, 11:55:20 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Protocol.pas
r334 r364 1275 1275 TClientCall = procedure (Command, Player: Integer; var Data); stdcall; 1276 1276 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 1277 1330 TUn = packed record 1278 1331 Loc: LongInt; { location } … … 1777 1830 function DelphiRandom: Extended; overload; 1778 1831 procedure DelphiRandomize; 1832 function GetCommandDataSize(Command: TCommand): Integer; 1779 1833 1780 1834 … … 1919 1973 end; 1920 1974 1975 function GetCommandDataSize(Command: TCommand): Integer; 1976 begin 1977 case Command of 1978 cmInitModule: Result := SizeOf(TInitModuleData); 1979 cmGetReady: Result := 0; 1980 cmTurn: Result := 0; 1981 cmShowTurnChange: Result := SizeOf(Integer); 1982 cmShowNego: Result := SizeOf(TShowNegoData); 1983 cmNewGame, cmLoadGame, cmMovie, cmNewMap: Result := SizeOf(TNewGameData); 1984 else begin 1985 Result := 0; 1986 end; 1987 end; 1988 end; 1989 1990 1921 1991 initialization 1922 1992
Note:
See TracChangeset
for help on using the changeset viewer.