1 | using System;
|
---|
2 | using System.Collections.Generic;
|
---|
3 |
|
---|
4 | namespace CevoAILib
|
---|
5 | {
|
---|
6 | /// <summary>
|
---|
7 | /// INTERNAL - only use from CevoAILib classes!
|
---|
8 | /// </summary>
|
---|
9 | static class Protocol
|
---|
10 | {
|
---|
11 | public const int nPl = 15;
|
---|
12 | public const int nJob = 15;
|
---|
13 |
|
---|
14 | public const int unFortified = 0x01;
|
---|
15 | public const int unBombsLoaded = 0x02;
|
---|
16 | public const int unMountainDelay = 0x04;
|
---|
17 | public const int unConscripts = 0x08;
|
---|
18 | public const int unWithdrawn = 0x10;
|
---|
19 | public const int unMulti = 0x80;
|
---|
20 |
|
---|
21 | public const int mdZOC = 0x01;
|
---|
22 | public const int mdCivil = 0x02;
|
---|
23 | public const int mdDoubleSupport = 0x04;
|
---|
24 |
|
---|
25 | public const int ciCapital = 0x01;
|
---|
26 | public const int ciWalled = 0x02;
|
---|
27 | public const int ciCoastalFort = 0x04;
|
---|
28 | public const int ciMissileBat = 0x08;
|
---|
29 | public const int ciBunker = 0x10;
|
---|
30 | public const int ciSpacePort = 0x20;
|
---|
31 |
|
---|
32 | public const int sExecute = 0x4000; // {call command-sExecute to request return value without execution}
|
---|
33 |
|
---|
34 | // Info Request Commands
|
---|
35 | public const int sMessage = 0x0000;
|
---|
36 | public const int sSetDebugMap = 0x0010;
|
---|
37 | public const int sRefreshDebugMap = 0x0040;
|
---|
38 | public const int sGetChart = 0x0100; // + type shl 4
|
---|
39 | public const int sGetTechCost = 0x0180;
|
---|
40 | public const int sGetTileInfo = 0x0200;
|
---|
41 | public const int sGetCityTileInfo = 0x0210;
|
---|
42 | public const int sGetHypoCityTileInfo = 0x0220;
|
---|
43 | public const int sGetJobProgress = 0x0230;
|
---|
44 | public const int sGetModels = 0x0270;
|
---|
45 | public const int sGetUnits = 0x0280;
|
---|
46 | public const int sGetDefender = 0x0290;
|
---|
47 | public const int sGetBattleForecast = 0x02A0;
|
---|
48 | public const int sGetUnitReport = 0x02B0;
|
---|
49 | public const int sGetMoveAdvice = 0x02C0;
|
---|
50 | public const int sGetPlaneReturn = 0x02D0;
|
---|
51 | public const int sGetBattleForecastEx = 0x02E0;
|
---|
52 | public const int sGetCity = 0x0300;
|
---|
53 | public const int sGetCityReport = 0x0310;
|
---|
54 | public const int sGetCityAreaInfo = 0x0320;
|
---|
55 | public const int sGetEnemyCityReport = 0x0330;
|
---|
56 | public const int sGetEnemyCityAreaInfo = 0x0340;
|
---|
57 | public const int sGetCityTileAdvice = 0x0350;
|
---|
58 | public const int sGetCityReportNew = 0x0360;
|
---|
59 | public const int sGetEnemyCityReportNew = 0x0370;
|
---|
60 |
|
---|
61 | // Client Deactivation Commands
|
---|
62 | public const int sTurn = 0x4800;
|
---|
63 |
|
---|
64 | public const int sSetGovernment = 0x5100;
|
---|
65 | public const int sSetRates = 0x5110;
|
---|
66 | public const int sRevolution = 0x5120;
|
---|
67 | public const int sSetResearch = 0x5200;
|
---|
68 | public const int sStealTech = 0x5210;
|
---|
69 | public const int sSetAttitude = 0x5300; // + concerned player shl 4
|
---|
70 | public const int sCancelTreaty = 0x5400;
|
---|
71 |
|
---|
72 | // Model Related Commands
|
---|
73 | public const int sCreateDevModel = 0x5800;
|
---|
74 | public const int sSetDevModelCap = 0x5C00; // {+value shl 4}
|
---|
75 |
|
---|
76 | // Unit Related Commands
|
---|
77 | public const int sRemoveUnit = 0x6000;
|
---|
78 | public const int sSetUnitHome = 0x6010;
|
---|
79 | public const int sSetSpyMission = 0x6100; // + mission shl 4
|
---|
80 | public const int sLoadUnit = 0x6200;
|
---|
81 | public const int sUnloadUnit = 0x6210;
|
---|
82 | public const int sSelectTransport = 0x6220;
|
---|
83 | public const int sMoveUnit = 0x6400; // {+dx and 7 shl 4 +dy and 7 shl 7}
|
---|
84 |
|
---|
85 | // Settlers Related Commands
|
---|
86 | public const int sctSettlers = 0x2800;
|
---|
87 | public const int sAddToCity = 0x6810;
|
---|
88 | public const int sStartJob = 0x6C00; // {+job shl 4}
|
---|
89 |
|
---|
90 | // City Related Commands
|
---|
91 | public const int sSetCityProject = 0x7001;
|
---|
92 | public const int sBuyCityProject = 0x7010;
|
---|
93 | public const int sSellCityProject = 0x7020;
|
---|
94 | public const int sSellCityImprovement = 0x7101;
|
---|
95 | public const int sRebuildCityImprovement = 0x7111;
|
---|
96 | public const int sSetCityTiles = 0x7201;
|
---|
97 |
|
---|
98 | public const int cInitModule = 0x0000;
|
---|
99 | public const int cReleaseModule = 0x0100;
|
---|
100 | public const int cNewGame = 0x0800;
|
---|
101 | public const int cLoadGame = 0x0810;
|
---|
102 | public const int cGetReady = 0x08F0;
|
---|
103 | public const int cBreakGame = 0x0900;
|
---|
104 | public const int cTurn = 0x2000;
|
---|
105 | public const int cResume = 0x2010;
|
---|
106 | public const int cContinue = 0x2080;
|
---|
107 | public const int cShowAfterMove = 0x3040;
|
---|
108 | public const int cShowAfterAttack = 0x3050;
|
---|
109 | public const int cShowCityChanged = 0x3090;
|
---|
110 | public const int cShowMoving = 0x3140;
|
---|
111 | public const int cShowCapturing = 0x3150;
|
---|
112 | public const int cShowAttacking = 0x3240;
|
---|
113 | public const int cShowEndContact = 0x3810;
|
---|
114 |
|
---|
115 | public const int scContact = 0x4900;
|
---|
116 | public const int scReject = 0x4A00;
|
---|
117 | public const int scDipStart = 0x4B00;
|
---|
118 | public const int scDipNotice = 0x4B10;
|
---|
119 | public const int scDipAccept = 0x4B20;
|
---|
120 | public const int scDipCancelTreaty = 0x4B30;
|
---|
121 | public const int scDipOffer = 0x4B4E;
|
---|
122 | public const int scDipBreak = 0x4BF0;
|
---|
123 |
|
---|
124 | public const int opChoose = 0x00000000;
|
---|
125 | public const int opCivilReport = 0x11000000; // + turn + concerned nation shl 16
|
---|
126 | public const int opMilReport = 0x12000000; // + turn + concerned nation shl 16
|
---|
127 | public const int opMap = 0x1F000000;
|
---|
128 | public const int opTreaty = 0x20000000; // + suggested nation treaty
|
---|
129 | public const int opShipParts = 0x30000000; // + number + part type shl 16
|
---|
130 | public const int opMoney = 0x40000000; // + value
|
---|
131 | public const int opTech = 0x50000000; // + advance
|
---|
132 | public const int opAllTech = 0x51000000;
|
---|
133 | public const int opModel = 0x58000000; // + model index
|
---|
134 | public const int opAllModel = 0x59000000;
|
---|
135 | public const int opMask = 0x7F000000;
|
---|
136 |
|
---|
137 | public const int rExecuted = 0x40000000;
|
---|
138 | public const int rEffective = 0x20000000;
|
---|
139 | public const int rUnitRemoved = 0x10000000;
|
---|
140 | public const int rEnemySpotted = 0x08000000;
|
---|
141 |
|
---|
142 | public const int eEnemyDestroyed = 0x05;
|
---|
143 |
|
---|
144 | public const int mcFirstNonCap = 9;
|
---|
145 |
|
---|
146 | public const int cpIndex = 0x1FF;
|
---|
147 | public const int cpConscripts = 0x200;
|
---|
148 | public const int cpDisbandCity = 0x400;
|
---|
149 | public const int cpImp = 0x800;
|
---|
150 |
|
---|
151 | public const int phStealTech = 0x02;
|
---|
152 | }
|
---|
153 |
|
---|
154 | /// <summary>
|
---|
155 | /// INTERNAL - only use from CevoAILib classes!
|
---|
156 | /// </summary>
|
---|
157 | static class ROReadPoint
|
---|
158 | {
|
---|
159 | public const int TestFlags = 25;
|
---|
160 | public const int DevModel = 44;
|
---|
161 | public const int Tech = 61;
|
---|
162 | public const int Attitude = 85;
|
---|
163 | public const int Wonder = 160;
|
---|
164 | public const int Ship = 216;
|
---|
165 | public const int NatBuilt = 261;
|
---|
166 | public const int nBattleHistory = 272;
|
---|
167 | public const int OracleIncome = 290;
|
---|
168 |
|
---|
169 | public const int SizeOfUn = 8;
|
---|
170 | public const int SizeOfUnitInfo = 4;
|
---|
171 | public const int SizeOfCity = 28;
|
---|
172 | public const int SizeOfCityInfo = 5;
|
---|
173 | public const int SizeOfModel = 17;
|
---|
174 | public const int SizeOfModelInfo = 7;
|
---|
175 | }
|
---|
176 | }
|
---|