- Timestamp:
- May 13, 2018, 10:11:03 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Integrated.lpr
r117 r148 42 42 ScreenTools, Directories; 43 43 44 {$R cevo.res}45 46 44 {$if declared(UseHeapTrace)} 47 45 const -
trunk/Protocol.pas
r129 r148 44 44 MaxMoneyPrice = $FFFF; 45 45 MaxShipPartPrice = 100; 46 BombardmentDestroysCity = false;46 BombardmentDestroysCity = False; 47 47 StartMoney = 0; 48 48 InitialCredibility = 95; … … 53 53 // difficulty settings 54 54 MaxDiff = 4; { maximum difficulty level } 55 StorageSize: array [1 .. MaxDiff] of integer = (30, 40, 50, 60);56 TechFormula_M: array [1 .. MaxDiff] of single = (2.0, 2.3, 2.6, 4.0);57 TechFormula_D: array [1 .. MaxDiff] of single = (102.0, 80.0, 64.0, 64.0);58 BuildCostMod: array [1 .. MaxDiff] of integer = (9, 12, 15, 18); // in 1/1255 StorageSize: array [1 .. MaxDiff] of Integer = (30, 40, 50, 60); 56 TechFormula_M: array [1 .. MaxDiff] of Single = (2.0, 2.3, 2.6, 4.0); 57 TechFormula_D: array [1 .. MaxDiff] of Single = (102.0, 80.0, 64.0, 64.0); 58 BuildCostMod: array [1 .. MaxDiff] of Integer = (9, 12, 15, 18); // in 1/12 59 59 60 60 // test flags … … 795 795 imShipHab = 69; 796 796 797 SettlerFood: array [0 .. nGov - 1] of integer = (1, 1, 1, 2, 1, 2, 2, 2);798 CorrLevel: array [0 .. nGov - 1] of integer = (3, 3, 1, 2, 1, 0, 0, 0);799 SupportFree: array [0 .. nGov - 1] of integer = (2, 2, 1, 0, 2, 1, 0, 0);797 SettlerFood: array [0 .. nGov - 1] of Integer = (1, 1, 1, 2, 1, 2, 2, 2); 798 CorrLevel: array [0 .. nGov - 1] of Integer = (3, 3, 1, 2, 1, 0, 0, 0); 799 SupportFree: array [0 .. nGov - 1] of Integer = (2, 2, 1, 0, 2, 1, 0, 0); 800 800 // in 1/2*city size 801 801 … … 808 808 preNA = -$FF; 809 809 810 JobPreq: array [0 .. nJob - 1] of integer = (preNone, preNone, adRailroad,810 JobPreq: array [0 .. nJob - 1] of Integer = (preNone, preNone, adRailroad, 811 811 preNone, preNone, adRefrigeration, preNone, preNone, adExplosives, 812 812 adExplosives, adConstruction, preNone, adMedicine, preNone, preNone); 813 813 814 AdvPreq: array [0 .. nAdv - 1, 0 .. 2] of integer = { advance prerequisites }814 AdvPreq: array [0 .. nAdv - 1, 0 .. 2] of Integer = { advance prerequisites } 815 815 ((adFlight, adRobotics, preNone), // adAdvancedFlight 816 816 (adNavigation, adTactics, preNone), // adAmphibiousWarfare … … 1023 1023 spPow = 1; 1024 1024 spHab = 2; 1025 ShipNeed: array [0 .. nShipPart - 1] of integer = (6, 4, 2);1026 ShipImpIndex: array [0 .. nShipPart - 1] of integer = (imShipComp, imShipPow, imShipHab);1027 1028 GovPreq: array [1 .. nGov - 1] of integer = { government prerequisites }1025 ShipNeed: array [0 .. nShipPart - 1] of Integer = (6, 4, 2); 1026 ShipImpIndex: array [0 .. nShipPart - 1] of Integer = (imShipComp, imShipPow, imShipHab); 1027 1028 GovPreq: array [1 .. nGov - 1] of Integer = { government prerequisites } 1029 1029 (preNone, adMonarchy, adTheRepublic, adTheology, adCommunism, adDemocracy, 1030 1030 adInternet); 1031 1031 1032 AgePreq: array [1 .. 3] of integer = (adScience, adMassProduction,1032 AgePreq: array [1 .. 3] of Integer = (adScience, adMassProduction, 1033 1033 adTransstellarColonization); 1034 1034 … … 1044 1044 TransTerrain: Integer; 1045 1045 TransWork: Integer; 1046 FoodRes, ProdRes, TradeRes: array [0 .. 2] of Integer; 1046 FoodRes: array [0 .. 2] of Integer; 1047 ProdRes: array [0 .. 2] of Integer; 1048 TradeRes: array [0 .. 2] of Integer; 1047 1049 Filler: array [0 .. 12] of Integer; 1048 1050 end … … 1201 1203 1202 1204 Feature: array [0 .. nFeature - 1] of { unit model features } 1203 record Domains, Preq, Weight, Cost: integer; 1204 end 1205 record 1206 Domains: Integer; 1207 Preq: Integer; 1208 Weight: Integer; 1209 Cost: Integer; 1210 end 1205 1211 = ((Domains: 7; Preq: preNone; Weight: 1; Cost: 1), { mcOffense } 1206 1212 (Domains: 7; Preq: preNone; Weight: 1; Cost: 1), { mcDefense } … … 1231 1237 (Domains: 7; Preq: adMassProduction; Weight: 0; Cost: 0)); { mcLine } 1232 1238 1233 WeightPreq7: array [0 .. nDomains - 1] of integer = (adHorsebackRiding, adSeafaring,1239 WeightPreq7: array [0 .. nDomains - 1] of Integer = (adHorsebackRiding, adSeafaring, 1234 1240 adAdvancedFlight); 1235 WeightPreq10: array [0 .. nDomains - 1] of integer = (adAutomobile, adSteel, preNA);1241 WeightPreq10: array [0 .. nDomains - 1] of Integer = (adAutomobile, adSteel, preNA); 1236 1242 1237 1243 INFIN = 999999; … … 1261 1267 1262 1268 type 1263 TServerCall = function (Command, Player, Subject: integer; var Data)1264 : integer; stdcall;1265 TClientCall = procedure (Command, Player: integer; var Data); stdcall;1269 TServerCall = function (Command, Player, Subject: Integer; var Data) 1270 : Integer; stdcall; 1271 TClientCall = procedure (Command, Player: Integer; var Data); stdcall; 1266 1272 1267 1273 TUn = packed record 1268 Loc ,{ location }1269 Status ,// free for AI use1274 Loc: LongInt; { location } 1275 Status: LongInt; // free for AI use 1270 1276 SavedStatus: LongInt; // for server internal use only 1271 ID: word; // unit number, never changes, unique within this nation1272 mix ,{ model index }1273 Home ,{ home city index, -1 if none }1274 Master ,{ index of transporting unit, -1 if none }1277 ID: Word; // unit number, never changes, unique within this nation 1278 mix: SmallInt; { model index } 1279 Home: SmallInt; { home city index, -1 if none } 1280 Master: SmallInt; { index of transporting unit, -1 if none } 1275 1281 Movement: SmallInt; { movement left for this turn } 1276 Health ,// = 100-Damage1282 Health: ShortInt; // = 100-Damage 1277 1283 Fuel: ShortInt; 1278 Job ,{ current terrain improvement job }1279 Exp ,{ micro experience, the level is Exp div ExpCost }1280 TroopLoad ,{ number of transported ground units }1284 Job: Byte; { current terrain improvement job } 1285 Exp: Byte; { micro experience, the level is Exp div ExpCost } 1286 TroopLoad: Byte; { number of transported ground units } 1281 1287 AirLoad: Byte; // number of transported air units 1282 1288 Flags: Cardinal; … … 1286 1292 1287 1293 TCity = packed record 1288 Loc ,{ location }1289 Status ,// free for AI use1294 Loc: LongInt; { location } 1295 Status: LongInt; // free for AI use 1290 1296 SavedStatus: LongInt; // for server internal use only 1291 ID ,// founding player shl 12 + number, never changes, unique within the whole game1292 Size: word;1293 Project ,// current production project, see city project flags1294 Project0 ,// for server use only1295 Food ,// collected food in storage1296 Pollution ,// collected pollution in dump1297 Prod ,// for project collected production points1297 ID: Word; // founding player shl 12 + number, never changes, unique within the whole game 1298 Size: Word; 1299 Project: SmallInt; // current production project, see city project flags 1300 Project0: SmallInt; // for server use only 1301 Food: SmallInt; // collected food in storage 1302 Pollution: SmallInt; // collected pollution in dump 1303 Prod: SmallInt; // for project collected production points 1298 1304 Prod0: SmallInt; 1299 1305 // for project collected production points in the beginning of the turn 1300 Flags ,// what happened within the last turnaround1301 Tiles ,{ currently by city exploited tiles, bitset with index1306 Flags: Cardinal; // what happened within the last turnaround 1307 Tiles: Cardinal; { currently by city exploited tiles, bitset with index 1302 1308 (dy+3) shl 2+(dx+3) shr 1, (dx,dy) relative to central tile } 1303 1309 N1: Cardinal; // reserved for future use … … 1307 1313 1308 1314 TModel = packed record 1309 Status ,// free for AI use1315 Status: LongInt; // free for AI use 1310 1316 SavedStatus: LongInt; // for server internal use only 1311 ID, // developing player shl 12 + number, never changes, unique within the whole game 1312 IntroTurn, Built, // units built with this model 1313 Lost: word; // units of this model lost in combat 1314 Kind, Domain: Byte; 1315 Attack, Defense, Speed, Cost, MStrength: word; 1317 ID: Word; // developing player shl 12 + number, never changes, unique within the whole game 1318 IntroTurn: Word; 1319 Built: Word; // units built with this model 1320 Lost: Word; // units of this model lost in combat 1321 Kind: Byte; 1322 Domain: Byte; 1323 Attack: Word; 1324 Defense: Word; 1325 Speed: Word; 1326 Cost: Word; 1327 MStrength: Word; 1316 1328 // construction time multipliers, only valid if kind is mkSelfDeveloped or mkEnemyDeveloped 1317 MTrans, MCost, Weight, MaxWeight: Byte; 1329 MTrans: Byte; 1330 MCost: Byte; 1331 Weight: Byte; 1332 MaxWeight: Byte; 1318 1333 // weight and maximum weight (construction time) 1319 Upgrades ,// bitarray indicating all upgrades1334 Upgrades: Cardinal; // bitarray indicating all upgrades 1320 1335 Flags: Cardinal; 1321 1336 Cap: array [0 .. (nFeature + 3) div 4 * 4 - 1] of Byte; // special features … … 1324 1339 TUnitInfo = packed record 1325 1340 Loc: LongInt; 1326 mix ,// index of unit model for its owner1327 emix: word; // index in enemy model list1341 mix: Word; // index of unit model for its owner 1342 emix: Word; // index in enemy model list 1328 1343 Owner: Byte; 1329 Health ,// = 100-Damage1344 Health: ShortInt; // = 100-Damage 1330 1345 Fuel: ShortInt; 1331 Job ,// current terrain improvement job1332 Exp ,{ micro experience, the level is Exp div ExpCost }1346 Job: Byte; // current terrain improvement job 1347 Exp: Byte; { micro experience, the level is Exp div ExpCost } 1333 1348 Load: Byte; { number of transported units } 1334 Flags: word;1349 Flags: Word; 1335 1350 end; 1336 1351 1337 1352 TCityInfo = packed record 1338 Loc, Status, // free for AI use 1353 Loc: LongInt; 1354 Status: LongInt; // free for AI use 1339 1355 SavedStatus: LongInt; // for server internal use only 1340 Owner, // last known owner, even if not alive anymore! 1341 ID, // founding player <<12 + number, never changes, unique within the whole game 1342 Size, Flags: word; 1356 Owner: Word; // last known owner, even if not alive anymore! 1357 ID: Word; // founding player <<12 + number, never changes, unique within the whole game 1358 Size: Word; 1359 Flags: Word; 1343 1360 end; 1344 1361 1345 1362 TModelInfo = packed record 1346 Owner, // Player which owns the model 1347 mix, // index of unit model for its owner 1348 ID: word; // developing player shl 12 + number, never changes, unique within the whole game 1349 Kind, Domain: Byte; 1350 Attack, Defense, Speed, Cost: word; 1351 TTrans, // ground unit transport capability 1363 Owner: Word; // Player which owns the model 1364 mix: Word; // index of unit model for its owner 1365 ID: Word; // developing player shl 12 + number, never changes, unique within the whole game 1366 Kind: Byte; 1367 Domain: Byte; 1368 Attack: Word; 1369 Defense: Word; 1370 Speed: Word; 1371 Cost: Word; 1372 TTrans: Byte; // ground unit transport capability 1352 1373 ATrans_Fuel: Byte; // air unit transport capability resp. fuel 1353 Bombs: word; // additional attack with bombs1374 Bombs: Word; // additional attack with bombs 1354 1375 Cap: Cardinal; // special features, bitset with index Feature-mcFirstNonCap 1355 MaxUpgrade ,// maximum used upgrade1376 MaxUpgrade: Byte; // maximum used upgrade 1356 1377 Weight: Byte; 1357 Lost: word;1378 Lost: Word; 1358 1379 end; 1359 1380 1360 1381 TBattle = packed record 1361 Enemy, Flags: Byte; 1362 Turn, mix, mixEnemy: word; 1363 ToLoc, FromLoc: integer; 1382 Enemy: Byte; 1383 Flags: Byte; 1384 Turn: Word; 1385 mix: Word; 1386 mixEnemy: Word; 1387 ToLoc: Integer; 1388 FromLoc: Integer; 1364 1389 end; 1365 1390 1366 1391 TWonderInfo = record 1367 CityID ,// -2 if destroyed, -1 if never completed, >=0 ID of city1368 EffectiveOwner: integer1392 CityID: Integer; // -2 if destroyed, -1 if never completed, >=0 ID of city 1393 EffectiveOwner: Integer; 1369 1394 // owning player if effective, -1 if expired or not built 1370 end; 1371 1372 TShipInfo = record Parts: array [0 .. nShipPart - 1] of integer; 1395 end; 1396 1397 TShipInfo = record 1398 Parts: array [0 .. nShipPart - 1] of Integer; 1373 1399 end; 1374 1400 1375 1401 TEnemyReport = record 1376 TurnOfContact, TurnOfCivilReport, TurnOfMilReport, Attitude, 1377 Credibility: integer; // 0..100, last update: ToC 1378 Treaty: array [0 .. nPl - 1] of integer; 1402 TurnOfContact: Integer; 1403 TurnOfCivilReport: Integer; 1404 TurnOfMilReport: Integer; 1405 Attitude: Integer; 1406 Credibility: Integer; // 0..100, last update: ToC 1407 Treaty: array [0 .. nPl - 1] of Integer; 1379 1408 // diplomatic status with other nations, last update: ToCR 1380 Government, // gAnarchy..gDemocracy, last update: ToCR 1381 Money, // last update: ToCR 1382 ResearchTech, ResearchDone: integer; // last update: ToCR 1409 Government: Integer; // gAnarchy..gDemocracy, last update: ToCR 1410 Money: Integer; // last update: ToCR 1411 ResearchTech: Integer; // last update: ToCR 1412 ResearchDone: Integer; // last update: ToCR 1383 1413 Tech: array [0 .. (nAdv + 3) div 4 * 4 - 1] of ShortInt; 1384 1414 // tech status indicator, last update: ToCR 1385 nModelCounted: integer;1415 nModelCounted: Integer; 1386 1416 // number of models with info in UnCount, last update: ToMR 1387 UnCount: array [0 .. INFIN] of word;1417 UnCount: array [0 .. INFIN] of Word; 1388 1418 // number of available units for each model, last update: ToMR 1389 1419 end; 1390 1420 1391 1421 TMoveAdviceData = record 1392 ToLoc, nStep, MoreTurns, MaxHostile_MovementLeft: integer; 1393 dx, dy: array [0 .. 24] of integer; 1422 ToLoc: Integer; 1423 nStep: Integer; 1424 MoreTurns: Integer; 1425 MaxHostile_MovementLeft: Integer; 1426 dx: array [0 .. 24] of Integer; 1427 dy: array [0 .. 24] of Integer; 1394 1428 end; 1395 1429 1396 1430 TPlaneReturnData = record 1397 Loc, Fuel, Movement: integer; 1431 Loc: Integer; 1432 Fuel: Integer; 1433 Movement: Integer; 1398 1434 end; 1399 1435 1400 1436 TTileInfo = record 1401 Food, Prod, Trade, ExplCity: integer; 1437 Food: Integer; 1438 Prod: Integer; 1439 Trade: Integer; 1440 ExplCity: Integer; 1402 1441 end; 1403 1442 1404 1443 TCityReport = record 1405 HypoTiles, HypoTax, HypoLux, Working, Happy, FoodRep, 1406 ProdRep, Trade, PollRep, Corruption, Tax, Lux, Science, Support, Eaten, 1407 ProdCost, Storage, Deployed: integer; 1444 HypoTiles: Integer; 1445 HypoTax: Integer; 1446 HypoLux: Integer; 1447 Working: Integer; 1448 Happy: Integer; 1449 FoodRep: Integer; 1450 ProdRep: Integer; 1451 Trade: Integer; 1452 PollRep: Integer; 1453 Corruption: Integer; 1454 Tax: Integer; 1455 Lux: Integer; 1456 Science: Integer; 1457 Support: Integer; 1458 Eaten: Integer; 1459 ProdCost: Integer; 1460 Storage: Integer; 1461 Deployed: Integer; 1408 1462 end; 1409 1463 1410 1464 TCityReportNew = record 1411 HypoTiles ,1465 HypoTiles: Integer; 1412 1466 // tiles that should be considered as exploited (for the current adjustment, set this to -1 or to TCity.Tiles of the city) 1413 HypoTaxRate, HypoLuxuryRate, 1467 HypoTaxRate: Integer; 1468 HypoLuxuryRate: Integer; 1414 1469 // tax and luxury rate that should be assumed (for current rates, set this to -1 or to RO.TaxRate resp. RO.LuxRate) 1415 Morale, FoodSupport, MaterialSupport, 1470 Morale: Integer; 1471 FoodSupport: Integer; 1472 MaterialSupport: Integer; 1416 1473 // food and material taken for unit support 1417 ProjectCost, // material cost of current project 1418 Storage, // size of food storage 1419 Deployed, // number of units causing unrest (unrest=2*deployed) 1420 CollectedControl, CollectedFood, CollectedMaterial, CollectedTrade, 1474 ProjectCost: Integer; // material cost of current project 1475 Storage: Integer; // size of food storage 1476 Deployed: Integer; // number of units causing unrest (unrest=2*deployed) 1477 CollectedControl: Integer; 1478 CollectedFood: Integer; 1479 CollectedMaterial: Integer; 1480 CollectedTrade: Integer; 1421 1481 // raw control, food, material and trade as collected by the citizens 1422 Working, // number of exploited tiles including city tile 1423 FoodSurplus, Production, AddPollution, 1482 Working: Integer; // number of exploited tiles including city tile 1483 FoodSurplus: Integer; 1484 Production: Integer; 1485 AddPollution: Integer; 1424 1486 // food surplus, production gain and pollution after all effects 1425 Corruption, Tax, Science, Luxury, 1487 Corruption: Integer; 1488 Tax: Integer; 1489 Science: Integer; 1490 Luxury: Integer; 1426 1491 // corruption, tax, science and wealth after all effects 1427 HappinessBalance: integer;1492 HappinessBalance: Integer; 1428 1493 // = (Morale+Wealth+Control) - (Size+Unrest), value < 0 means disorder 1429 1494 end; 1430 1495 1431 1496 TCityTileAdviceData = record 1432 ResourceWeights, Tiles: Cardinal; 1497 ResourceWeights: Cardinal; 1498 Tiles: Cardinal; 1433 1499 CityReport: TCityReport; 1434 1500 end; 1435 1501 1436 1502 TGetCityData = record 1437 Owner: integer;1503 Owner: Integer; 1438 1504 c: TCity; 1439 1505 end; 1440 1506 1441 1507 TCityAreaInfo = record 1442 Available: array [0 .. 26] of integer;1508 Available: array [0 .. 26] of Integer; 1443 1509 end; 1444 1510 1445 1511 TUnitReport = record 1446 FoodSupport, ProdSupport, ReportFlags: integer; 1512 FoodSupport: Integer; 1513 ProdSupport: Integer; 1514 ReportFlags: Integer; 1447 1515 end; 1448 1516 1449 1517 TJobProgressData = array [0 .. nJob - 1] of record 1450 1518 Required, Done, 1451 NextTurnPlus: integer; 1452 end; 1519 NextTurnPlus: Integer; 1520 end; 1521 1453 1522 TBattleForecast = record 1454 pAtt, mixAtt, HealthAtt, ExpAtt, FlagsAtt, Movement, 1455 EndHealthDef, EndHealthAtt: integer; 1456 end; 1523 pAtt: Integer; 1524 mixAtt: Integer; 1525 HealthAtt: Integer; 1526 ExpAtt: Integer; 1527 FlagsAtt: Integer; 1528 Movement: Integer; 1529 EndHealthDef: Integer; 1530 EndHealthAtt: Integer; 1531 end; 1532 1457 1533 TBattleForecastEx = record 1458 pAtt, mixAtt, HealthAtt, ExpAtt, FlagsAtt, Movement, 1459 EndHealthDef, EndHealthAtt: integer; // must be same as in TBattleForecast 1460 AStr, DStr, ABaseDamage, DBaseDamage: integer; 1461 end; 1534 pAtt: Integer; 1535 mixAtt: Integer; 1536 HealthAtt: Integer; 1537 ExpAtt: Integer; 1538 FlagsAtt: Integer; 1539 Movement: Integer; 1540 EndHealthDef: Integer; 1541 EndHealthAtt: Integer; // must be same as in TBattleForecast 1542 AStr: Integer; 1543 DStr: Integer; 1544 ABaseDamage: Integer; 1545 DBaseDamage: Integer; 1546 end; 1547 1462 1548 TShowMove = record 1463 Owner, Health, mix, emix, Flags, FromLoc, dx, dy, EndHealth, 1464 EndHealthDef, Fuel, Exp, Load: integer; 1465 end; 1549 Owner: Integer; 1550 Health: Integer; 1551 mix: Integer; 1552 emix: Integer; 1553 Flags: Integer; 1554 FromLoc: Integer; 1555 dx: Integer; 1556 dy: Integer; 1557 EndHealth: Integer; 1558 EndHealthDef: Integer; 1559 Fuel: Integer; 1560 Exp: Integer; 1561 Load: Integer; 1562 end; 1563 1466 1564 TShowShipChange = record 1467 Reason, Ship1Owner, Ship2Owner: integer; 1468 Ship1Change, Ship2Change: array [0 .. nShipPart - 1] of integer; 1469 end; 1565 Reason: Integer; 1566 Ship1Owner: Integer; 1567 Ship2Owner: Integer; 1568 Ship1Change: array [0 .. nShipPart - 1] of Integer; 1569 Ship2Change: array [0 .. nShipPart - 1] of Integer; 1570 end; 1571 1470 1572 TOffer = record 1471 nDeliver, nCost: integer; 1573 nDeliver: Integer; 1574 nCost: Integer; 1472 1575 Price: array [0 .. 11] of Cardinal; 1473 1576 end; 1474 TChart = array [0 .. INFIN] of integer; 1577 1578 TChart = array [0 .. INFIN] of Integer; 1475 1579 TEditTileData = record 1476 Loc, NewTile: integer 1580 Loc: Integer; 1581 NewTile: Integer; 1477 1582 end; 1478 1583 TCreateUnitData = record 1479 Loc, p, mix: integer; 1584 Loc: Integer; 1585 p: Integer; 1586 mix: Integer; 1480 1587 end; 1481 1588 … … 1494 1601 1495 1602 TPlayerContext = record 1496 Data: pointer;1603 Data: Pointer; 1497 1604 Map: ^TTileList; 1498 1605 { the playground, a list of tiles with index = location, see tile flags } … … 1508 1615 EnemyReport: array [0 .. nPl - 1] of ^TEnemyReport; 1509 1616 1510 TestFlags, // options turned on in the "Manipulation" menu 1511 Turn, // current turn 1512 Alive, { bitset of IDs of players still alive, flag 1 shl p for player p } 1513 Happened, // flags indicate what happened within the last turnaround 1514 AnarchyStart, // start turn of anarchy, <0 if not in anarchy 1515 Credibility, // own credibility 1516 MaxCredibility, // maximum credibility still to achieve 1517 nUn, { number of units } 1518 nCity, { number of cities } 1519 nModel, { number of developed unit models } 1520 nEnemyUn, nEnemyCity, nEnemyModel, Government, { gAnarchy..gDemocracy } 1521 Money, TaxRate, LuxRate, Research, 1617 TestFlags: Integer; // options turned on in the "Manipulation" menu 1618 Turn: Integer; // current turn 1619 Alive: Integer; { bitset of IDs of players still alive, flag 1 shl p for player p } 1620 Happened: Integer; // flags indicate what happened within the last turnaround 1621 AnarchyStart: Integer; // start turn of anarchy, <0 if not in anarchy 1622 Credibility: Integer; // own credibility 1623 MaxCredibility: Integer; // maximum credibility still to achieve 1624 nUn: Integer; { number of units } 1625 nCity: Integer; { number of cities } 1626 nModel: Integer; { number of developed unit models } 1627 nEnemyUn: Integer; 1628 nEnemyCity: Integer; 1629 nEnemyModel: Integer; 1630 Government: Integer; { gAnarchy..gDemocracy } 1631 Money: Integer; 1632 TaxRate: Integer; 1633 LuxRate: Integer; 1634 Research: Integer; 1522 1635 { collected research points for currently researched tech } 1523 ResearchTech: integer; // currently researched tech1636 ResearchTech: Integer; // currently researched tech 1524 1637 DevModel: TModel; { unit model currently under development } 1525 1638 Tech: array [0 .. (nAdv + 3) div 4 * 4 - 1] of ShortInt; { tech status indicator } 1526 Attitude: array [0 .. nPl - 1] of integer; // attitude to other nations1527 Treaty: array [0 .. nPl - 1] of integer; // treaty with other nations1528 EvaStart: array [0 .. nPl - 1] of integer; // peace treaty: start of evacuation period1529 Tribute: array [0 .. nPl - 1] of integer; // no longer in use1530 TributePaid: array [0 .. nPl - 1] of integer; // no longer in use1639 Attitude: array [0 .. nPl - 1] of Integer; // attitude to other nations 1640 Treaty: array [0 .. nPl - 1] of Integer; // treaty with other nations 1641 EvaStart: array [0 .. nPl - 1] of Integer; // peace treaty: start of evacuation period 1642 Tribute: array [0 .. nPl - 1] of Integer; // no longer in use 1643 TributePaid: array [0 .. nPl - 1] of Integer; // no longer in use 1531 1644 Wonder: array [0 .. 27] of TWonderInfo; 1532 1645 Ship: array [0 .. nPl - 1] of TShipInfo; 1533 1646 NatBuilt: array [28 .. (nImp + 3) div 4 * 4 - 1] of ShortInt; 1534 nBattleHistory: integer;1647 nBattleHistory: Integer; 1535 1648 BattleHistory: ^TBattleList; // complete list of all my battles in the whole game 1536 1649 BorderHelper: ^TByteList; 1537 LastCancelTreaty: array [0 .. nPl - 1] of integer; // turn of last treaty cancel1538 OracleIncome: integer;1650 LastCancelTreaty: array [0 .. nPl - 1] of Integer; // turn of last treaty cancel 1651 OracleIncome: Integer; 1539 1652 DefaultDebugMap: ^TIntList; 1540 1653 Filler: array [0 .. 879] of Byte; … … 1543 1656 TInitModuleData = record 1544 1657 Server: TServerCall; 1545 DataVersion, DataSize, Flags: integer; 1658 DataVersion: Integer; 1659 DataSize: Integer; 1660 Flags: Integer; 1546 1661 end; 1547 1662 1548 1663 TNewGameData = record 1549 lx, ly, LandMass, MaxTurn: integer; 1550 Difficulty: array [0 .. nPl - 1] of integer; 1664 lx: Integer; 1665 ly: Integer; 1666 LandMass: Integer; 1667 MaxTurn: Integer; 1668 Difficulty: array [0 .. nPl - 1] of Integer; 1551 1669 { difficulty levels of the players, if it's 0 this player is the supervisor, 1552 1670 -1 for unused slots } 1553 1671 RO: array [0 .. nPl - 1] of ^TPlayerContext; 1554 AssemblyPath: array [0 .. 255] of char;1672 AssemblyPath: array [0 .. 255] of Char; 1555 1673 SuperVisorRO: array [0 .. nPl - 1] of ^TPlayerContext; 1556 1674 end; 1557 1675 1558 1676 TNewGameExData = record 1559 lx, ly, LandMass, MaxTurn, RND: integer; 1560 Difficulty: array [0 .. nPl - 1] of integer; 1677 lx: Integer; 1678 ly: Integer; 1679 LandMass: Integer; 1680 MaxTurn: Integer; 1681 RND: Integer; 1682 Difficulty: array [0 .. nPl - 1] of Integer; 1561 1683 { difficulty levels of the players, if it's 0 this player is the supervisor, 1562 1684 -1 for unused slots } 1563 Controlled: integer;1685 Controlled: Integer; 1564 1686 end; 1565 1687 1566 1688 TShowNegoData = record 1567 pSender, pTarget, Action: integer; 1689 pSender: Integer; 1690 pTarget: Integer; 1691 Action: Integer; 1568 1692 Offer: TOffer; 1569 1693 end; … … 1637 1761 DelphiRandSeed: Integer; 1638 1762 1639 procedure MakeUnitInfo(p: integer; const u: TUn; var ui: TUnitInfo);1640 procedure MakeModelInfo(p, mix: integer; const m: TModel; var mi: TModelInfo);1641 function IsSameModel(const mi1, mi2: TModelInfo): boolean;1642 function SpecialTile(Loc, TerrType, lx: integer): integer;1763 procedure MakeUnitInfo(p: Integer; const u: TUn; var ui: TUnitInfo); 1764 procedure MakeModelInfo(p, mix: Integer; const m: TModel; var mi: TModelInfo); 1765 function IsSameModel(const mi1, mi2: TModelInfo): Boolean; 1766 function SpecialTile(Loc, TerrType, lx: Integer): Integer; 1643 1767 function DelphiRandom(const pi_Max: Integer): Integer; overload; 1644 1768 function DelphiRandom: Extended; overload; … … 1647 1771 implementation 1648 1772 1649 procedure MakeUnitInfo(p: integer; const u: TUn; var ui: TUnitInfo);1773 procedure MakeUnitInfo(p: Integer; const u: TUn; var ui: TUnitInfo); 1650 1774 begin 1651 1775 ui.Owner := p; … … 1660 1784 end; 1661 1785 1662 procedure MakeModelInfo(p, mix: integer; const m: TModel; var mi: TModelInfo);1786 procedure MakeModelInfo(p, mix: Integer; const m: TModel; var mi: TModelInfo); 1663 1787 var 1664 i: integer;1788 i: Integer; 1665 1789 begin 1666 1790 mi.Owner := p; … … 1699 1823 end; 1700 1824 1701 function IsSameModel(const mi1, mi2: TModelInfo): boolean;1825 function IsSameModel(const mi1, mi2: TModelInfo): Boolean; 1702 1826 type 1703 1827 TModelInfo_Compare = array [0 .. 5] of Cardinal; … … 1712 1836 end; 1713 1837 1714 function SpecialTile(Loc, TerrType, lx: integer): integer;1838 function SpecialTile(Loc, TerrType, lx: Integer): Integer; 1715 1839 var 1716 x, y, qx, qy, a: integer;1840 x, y, qx, qy, a: Integer; 1717 1841 begin 1718 1842 if TerrType = fOcean then
Note:
See TracChangeset
for help on using the changeset viewer.