home *** CD-ROM | disk | FTP | other *** search
- /* Map discription
- *
- * This file describes map cells, animations, monsters, buildings,
- * flying monsters, on-water monsters...
- */
- #pragma pack(1)
- typedef unsigned short word;
- #include "AntiBug.h"
- #include "Icons.h"
- #define NBRANCH 4
- class Weapon;
- class SelGroup;
- //╬∩Φ±αφΦσ εΣφεΘ Ωδσ≥ΩΦ φα Ωα≡≥σ(ßστ Ωα≡≥ΦφΩΦ)
- struct MapCell{
- //word Flags; //╬∩Φ±√Γα■≥ ±ε±≥ε φΦσ Ωδσ≥ΩΦ
- // bool LandLock:1; //╩δσ≥Ωα φσΣε±≥≤∩φα Σδ φατσ∞φ√⌡
- bool WaterLock:1; //╩δσ≥Ωα φσΣε±≥≤∩φα Σδ ΓεΣφ√⌡
- bool AirLock:1; //╩δσ≥Ωα φσΣε±≥≤∩φα Σδ δσ≥α■∙Φ⌡
- bool TempLock:1; //╧≡ΦτφαΩ Γ≡σ∞σφφεΘ φσΣε±≥≤∩φε±≥Φ
- byte LayerID; //═ΦµφΦΘ ±δεΘ φα Ωα≡≥σ-εß·σΩ≥ ≥Φ∩α ╠┼╤╥╬╨╬╞─┼═╚┼
- word MonsterID; //═ε∞σ≡ ∞εφ±≥≡α Γ ≥αßδΦ÷σ εß·σΩ≥εΓ
- word BuildingID; //═ε∞σ≡ τΣαφΦ Γ ≥αßδΦ÷σ εß·σΩ≥εΓ
- word FlyID; //╦σ≥α■∙ΦΘ εß·σΩ≥
- // word TileID; //═ε∞σ≡ Ωα≡≥ΦφΩΦ, ε∩Φ±√Γα■∙σΘ ∩εΓσ≡⌡φε±≥ⁿ
- };//8 bytes
-
- //▌δσ∞σφ≥ Γ ≥αßδΦ÷σ εß·σΩ≥εΓ
- struct ObjectRef{
- unsigned ObjID:8; //╥Φ∩ εß·σΩ≥α
- unsigned Location:2;//═ατσ∞φ√Θ/┬εΣφ√Θ/╦σ≥α■∙ΦΘ/┬±σ⌡ ≥Φ∩εΓ
- void* lpObj; //╤±√δΩα φα εß·σΩ≥
- };
- //╠αΩ±Φ∞αδⁿφεσ ΩεδΦ≈σ±≥Γε εß·σΩ≥εΓ
- #define MaxObject 8192
- //╠α±±ΦΓ εß·σΩ≥εΓ
- typedef ObjectRef ObjArray[MaxObject];
- //╬∩Φ±αφΦσ αφΦ∞α÷ΦΦ
- struct OneSlide{
- word FileID; //═ε∞σ≡ ⌠αΘδα αφΦ∞α÷ΦΦ
- small dx; //╤∞σ∙σφΦσ ±∩≡αΘ≥α ∩ε πε≡Φτεφ≥αδΦ
- small dy; //-----/----- ∩ε Γσ≡≥ΦΩαδΦ
- word spr; //═ε∞σ≡ ±∩≡αΘ≥α Γ Σαφφε∞ ⌠αΘδσ
- word SoundID; //═ε∞σ≡ τΓ≤Ωα
- };
- typedef OneSlide MovieType[256];
- typedef MovieType* lpOneMovie ;
- struct Octant{
- byte count;
- byte ticks;
- small gdx;
- small gdy;
- OneSlide* Movie;
- };
- typedef Octant Animation[8];
- //╚φ⌠ε≡∞α÷Φ ε αφΦ∞α÷ΦΦ Φ σσ ∩≡Φ∞σφσφΦΦ
- struct MoreAnimation{
- Octant* Anm;
- word WhatFor; //╩αΩ ß≤Σσ≥ Φ±∩εδⁿτεΓα≥ⁿ± Σαφφα αφΦ∞α÷Φ
- word Kind; //
- //word Reserved;
- };
- typedef MoreAnimation AnimArray[32];
- typedef word WordArray[32768];
- typedef WordArray* lpWordArray;
- struct ObjIcon{
- //word FileID;
- word spr;
- };
- #include "Upgrade.h"
- //╬∩Φ±αφΦσ ≥Φ∩εΓ εß·σΩ≥εΓ(ΦΣσφ≥Φ⌠ΦΩα≥ε≡√)
- #define EmptyID 0
- //#define MonsterID 1
- class Crowd{
- public:
- char* Message;
- word Amount;
- byte NI;
- bool Active:1;
- word MLSize;
- word* MemList;
- int LastDx;
- int LastDy;
- int LastAbs;
- int BestX;
- int BestY;
- int BestLx;
- int BestLy;
- int BestX1;
- int BestY1;
- int RealX;
- int RealY;
- int RealLx;
- int RealLy;
- int RealX1;
- int RealY1;
- int PrevDX;
- int PrevDY;
- int DestX;
- int DestY;
- int NInside;
- int NMembers;
- int Usage;//=0-≡στσ≡Γ
- //=1-ε≥≡ Σ ε⌡≡αφ√
- //=2-ε≥≡ Σ τα⌡Γα≥≈ΦΩεΓ
-
- int Stage;//=0-
- word ForAtt[32];
- int FUNC;
- Crowd();
- void CreateCrowd(byte NI);
- void Disband();
- bool DisbandHalf();
- void FindNewPosition();
- void HandleCrowd();
- int Funct(int x,int y,int Lx,int Ly);
- void SendCrowd();
- void GetSize();
- void AddToAttackQueue(word ID);
- bool HandleAttacks(byte PRIO);
- void HandleDefence();
- };
- //╬∩Φ±αφΦσ ßατεΓεπε ≥Φ∩α, εß∙σπε Σδ Γ±σ⌡ εß·σΩ≥εΓ
- class GeneralObject{
- public:
- char* Message;
- bool cpbBase:1;
- bool cpbFarm:1;
- bool OnCost:1;
- bool OnOil:1;
- bool NoSearchVictim:1;
- bool NoAnswer:1;
- bool NeedNoHelp:1;
- bool Enabled:1;
- bool OnWater:1;
- bool Warrior:1;
- bool OnAir:1;
- bool Teleport:1;
- bool Transport:1;
- bool SATT:1;
- bool UATT:1;
- bool WATT:1;
- bool AATT:1;
- bool P100:1;
- bool T3X3:1;
- bool FWEAP:1;//επφσφφεσ ε≡≤µΦσ
- bool AGold:1;
- bool AWood:1;
- bool Submarine:1;
- bool RefreshLife:1;
- bool CanFly:1;
- bool CanAttWall:1;
- bool CanFear:1;
- bool UseMagic:1;
- bool canNucAttack:1;
- bool AntiNuc:1;
- bool UFO:1;
- bool UFOTrans:1;
- bool CanRepair:1;
- bool ExtMenu:1;
- bool CanDest:1;
- word MagAgainst;
- word MagWith;
- word IDforUFO;
- word capMagic;
- byte Kind;
- word MaxAutoAmount;
- word Useful[NBRANCH];//∩εδστφε±≥ⁿ εß·σΩ≥α Σδ ΩαµΣεΘ Φτ ε≥≡α±δσΘ
- word SpUsef[NBRANCH];//≤Σσδⁿφα ∩εδστφε±≥ⁿ
- word AbsNeedPrio;
- word AbsNeedCount;
- word LifeShotLost;
- int cost;
- word delay;
- short wepX;
- short wepY;
- byte WepSpeed;
- byte WepDelay;
- byte VisRadius;
- byte VisSpots;
- byte SpotType;
- byte SpotSize;
- byte DangerZone;
- word NUpgrades;
- word* Upg;
- char Wdx[8];
- char Wdy[8];
- byte NIcons;
- word* IRefs;
- word NWeap;
- byte NStages;
- Weapon* MWeap[12];
- byte SWPIndex[12];
- short HitSound;
- short ClickSound;
- short OrderSound;
- short DeathSound;
- short BornSound;
- short AttackSound;
- short TreeSound;
- short GoldSound;
- word LockID;
- byte NLockUnits;
- /////DON'T CHANGE STRUCTURE AND ORDER UNDER THIS LINE/////
- ///// L O A D I N G Z O N E /////
- word NameIndex;
- word PreCreateMessage;
- word PostCreateMessage;
- //ObjIcon Icon;
- //╚φΣσΩ± ∩σ≡σφατφα≈σφΦ
- //╩δ■≈ Σε∩≤±Ωα Ω ∩≡εΦτΓεΣ±≥Γ≤
- int ProduceAccess;
- //╩δ■≈ Σε±≥≤∩α Σδ ±ετΣαφΦ
- int CreationAccess;
- //┼±δΦ Object1.ProdiuceAcess & Object2.CreationAccess!=0 ≥ε
- // Oject1 ∞εµσ≥ ∩≡εΦτΓσ±≥Φ Object2
- //╩δα±± εß·σΩ≥α
- word ObjType;
- // =0 - ╠εφ±≥≡
- // =1 - ╟ΣαφΦσ
- // =2 - ╙∞σφΦσ
- // =3 - ╙±εΓσ≡°σφ±≥ΓεΓαφΦσ
-
- //╧≡Φ ±ετΣαφΦΦ Σαφφ√Θ εß·σΩ≥ ∞εµσ≥ Σσδα≥ⁿ Σε±≥≤∩φ√∞Φ Σ≡≤πΦσ
- //εß·σΩ≥√,Ωε≥ε≡√σ ≡αφσσ ß√δΦ φσΣε±≥≤∩φ√, ∞εµφε ε≥Ω≡√Γα≥ⁿ Σε±≥≤∩ φσ ßεδσσ,
- //≈σ∞ Ω ≈σ≥√≡σ∞ εß·σΩ≥α∞. OpenAccess ±εΣσ≡µΦ≥ ΦφΣσΩ±√ ε≥Ω≡√Γασ∞√⌡
- //εß·σΩ≥εΓ. ▌≥ε Φ σ±≥ⁿ τφαφΦ .
- word OpenAccess[2];
- //╚τεß≡σ≥σφΦ . ┬ ±Φ±≥σ∞σ σ±≥ⁿ ∞α±±ΦΓ ±∩Φ±ΩεΓ Φτεß≡σ≥σφΦΘ.
- //ΩαµΣ√Θ ²δσ∞σφ≥ Γ ±∩Φ±Ωσ ±εΣσ≡µΦ≥ φε∞σ≡ ε≥Ω≡√Γασ∞επε εß·σΩ≥α,
- //∞ΦφΦ∞αδⁿφ√Θ ≤≡εΓσφⁿ ÷ΦΓΦδΦτεΓαφφε±≥Φ, φσεß⌡εΣΦ∞√Θ Σδ
- //Φτεß≡σ≥σφΦ Σαφφεπε εß·σΩ≥α. ┬σ≡ε ≥φε±≥ⁿ ≥επε, ≈≥ε ⌡ε≥ⁿ
- //≈≥ε-≥ε ß≤Σσ≥ Φτεß≡σ≥σφε ∩≡Φ ±ετΣαφΦΦ, ε∩≡σΣσδ σ≥±
- //∞≤Σ≡ε±≥ⁿ■.
- byte SizeX;
- byte SizeY;
- word Visdom;
- //╟Γ≤ΩΦ Σδ ≡ατδΦ≈φ√⌡ ±εß√≥ΦΘ
- Weapon* Weap;
- //word sndChoose; //╟Γ≤Ω ∩≡Φ Γ√ßε≡σ εß·σΩ≥α
- //word sndUnderAttack; //╟Γ≤Ω,ΩεπΣα εß·σΩ≥α εßΦµα■≥
- //╤∩ε±εßφε±≥Φ εß·σΩ≥α
- bool cpbRotation:1; //╧εΓε≡ε≥√
- bool cpbMoving:1; //─ΓΦµσφΦσ
- bool cpbSpending:1; //┬≡σ∞ Σδ Σε±≤πα Φ ∩≡ΦΩεδα
- bool cpbNearAttack:1; //┴δΦµφΦΘ ßεΘ
- bool cpbFarAttack:1; //╧ε≡αµσφΦσ φα ≡α±±≥ε φΦΦ
- bool cpbCarry:1; //╤∩ε±εßφε±≥ⁿ φσ±≥Φ ∩≡σΣ∞σ≥
- bool cpbPatrol:1; //╤∩ε±εßφε±≥ⁿ ∩α≥≡≤δΦ≡εΓα≥ⁿ
- bool cpbBuild:1; //╤≥≡εΦ≥σδⁿ±≥Γε
- bool cpbCreation:1; //╤ετΣαφΦσ ∞εφ±≥≡α
- bool cpbResearch:1; //╤∩ε±εßφε±≥ⁿ Φ±±δσΣεΓα≥ⁿ φσΦτΓσ±≥φεσ τφαφΦσ
- bool cpbResource:1; //╚±∩εδⁿτεΓαφΦσ Γ Ωα≈σ±≥Γσ ≡σ±≤≡±α
- bool cpbDamage:1; //═αδΦ≈Φσ αφΦ∞α÷ΦΦ Σδ ∩εΓ≡σµΣσφφεπε ±ε±≥ε φΦ
- bool cpbDeath:1; //═αδΦ≈Φσ αφΦ∞α÷ΦΦ Σδ πΦßσδΦ
- bool cbpAccess:1; //─ε±≥≤∩φε Γ Σαφφ√Θ ∞ε∞σφ≥
- //bool cpbOneAccess:1; //╧ε±δσ ±ετΣαφΦ cpbAccess=false
- bool cpbBuilding:1; //▀Γδ σ≥± τΣαφΦσ∞
- word Resrvd;
- //╨σ±≤≡±√, φσεß⌡εΣΦ∞√σ Σδ ∩ε±≥≡εΘΩΦ(∩≡εΦτΓεΣ±≥Γα)
- byte ResourceID[4]; //╚φΣσΩ± φσεß⌡εΣΦ∞επε ≡σ±≤≡±α
- word ResAmount[4]; //╤ΩεδⁿΩε φσεß⌡εΣΦ∞ε Σδ ∩ε±≥≡εΘΩΦ
- word NAnm; //╩εδΦ≈σ±≥Γε Σε±≥≤∩φ√⌡ αφΦ∞α÷ΦΘ
- MoreAnimation *lpFAnim;//└φΦ∞α÷Φ ± ε∩Φ±αφΦσ∞ ∩≡Φ∞σφσφΦ
- void GetMonsterCostString(char* st);
- void CloseGO();
- };
- //╩δα±± ΓΦΣΦ∞√⌡ εß·σΩ≥εΓ-∞εφ±≥≡√,τΣαφΦ
- class Visuals : public GeneralObject
- {
- public:
- //┴ατεΓ√σ ∩εΩατα≥σδΦ
- union{
- struct{
- word MaxLife;
- word MaxShield;
- word Strength;
- word PsychoForce;
- word Dextrity;
- word MinDamage;
- word MaxDamage;
- word Productivity;
- word AttackRange;
- word Reserved1;
- word Reserved2;
- word Reserved3;
- word Reserved4;
- word Reserved5;
- word Reserved6;
- word Reserved7;
- } Basic;
- word Index[16];
- } info;
- //╚φ⌠ε≡∞α÷Φ εß ε≡≤µΦΦ Σαδⁿφσπε ∩ε≡αµσφΦ
- };
- //Upgrade-τα∞σφα εΣφεπε ≥Φ∩α εß·σΩ≥εΓ φα Σ≡≤πεΘ
- class ObjectUpgrade : public GeneralObject
- {
- public:
- word SourceTypeIndex[8];
- word FinalTypeIndex[8];
- };
- //Upgrade - Σδ Visuals-≤δ≤≈°σφΦσ ∩α≡α∞σ≥≡εΓ Σδ π≡≤∩∩√ εß·σΩ≥εΓ;
- class ParameterUpgrade : public GeneralObject
- {
- word ObjectIndex[8];
- byte ChangedParameter[8];
- byte AdditionalValue[8];
- };
-
- class OneObject;
- typedef void ReportFn(OneObject* Sender);
- //╬∩Φ±αφΦσ Ωε∞αφΣφεπε ßδεΩα
- //╧≡ΦΩατ√ 1-πε ≤≡εΓφ
- struct Order1{
- //╙Ωατα≥σδⁿ φα ε≥δεµσφφ√Θ ∩≡ΦΩατ, σ±δΦ NULL ≥ε φσ≥
- //ε≥δεµσφφεπε ∩≡ΦΩατα
- Order1* NextOrder;
- //╙≡εΓσφⁿ ∩≡Φε≡Φ≥σ≥α Γ√∩εδφσφΦ Ωε∞αφΣ√
- //0-φΦµαΘ°ΦΘ ≤≡εΓσφⁿ ∩≡Φε≡Φ≥σ≥α
- //─αφφεσ ταΣαφΦσ ∞εµσ≥ ß√≥ⁿ ε≥δεµσφε ≥εδⁿΩε Γ ≥ε∞ ±δ≤≈ασ,
- //σ±δΦ ∩≡Φε≡Φ≥σ≥ ∩≡σ≡√ΓαφΦ Γ√°σ ∩≡Φε≡Φ≥σ≥α Γ√∩εδφσφΦ
- byte PrioryLevel;
- byte OrderType;
- byte OrderTime;//=0 if very fast
- //=1 - ±≥ε ≥ⁿ φα ∞σ±≥σ
- //=2 - ∩σ≡σΘ≥Φ Γ ≥ε≈Ω≤ ± Ωεε≡ΣΦφα≥α∞Φ (x,y)
- //=3 - ±δσΣεΓα≥ⁿ τα εß·σΩ≥ε∞ (obj)
- //=4 - ∩≡σ±δσΣεΓα≥ⁿ Φ α≥αΩεΓα≥ⁿ εß·σΩ≥ (obj)
- //=5 - ∩ε±≥≡εΦ≥ⁿ εß·σΩ≥
- //=6 - ±ετΣα≥ⁿ εß·σΩ≥
- //=7 - ∩α≥≡≤δΦ≡εΓα≥ⁿ
- //╚φ⌠ε≡∞α÷Φ ∩ε ΩαµΣε∞≤ ≥Φ∩≤ ∩≡ΦΩατεΓ
- ReportFn* DoLink;
- union{
- struct{
- byte VisibilityRadius;
- } Stand;
- struct{
- byte x;
- byte y;
- word PrevDist;
- byte Times;
- } MoveToXY;
- struct{
- byte xd;
- byte yd;
- byte time;
- word BuildID;
- word BSN;
- } UFO;
- struct{
- byte x;
- byte y;
- byte wep;
- } AttackXY;
- struct{
- word ObjIndex;
- word SN;
- word PrevDist;
- byte wep;
- } MoveToObj;
- struct{
- byte x;
- byte y;
- byte x1;
- byte y1;
- byte dir;
- } Patrol;
- struct{
- word ObjIndex;
- word Progress;
- word NStages;
- byte PStep;
- }Produce;
- struct{
- word OldUpgrade;
- word NewUpgrade;
- word Stage;
- word NStages;
- }PUpgrade;
- struct{
- byte dir;
- }MoveFrom;
- struct{
- byte x;
- byte y;
- byte ResID;
- }TakeRes;
-
- }info;
- };
- class Legion;
- class Nation;
- //╚φ⌠ε≡∞α÷Φ Σδ ΩαµΣεπε ΦφΣΦΓΦΣ≤≤∞α
- class OneObject{
- public:
- Nation* Nat;
- Crowd* CrowdRef;
- union{
- GeneralObject* General;
- Visuals* Visual;
- ObjectUpgrade* OUpgrade;
- ParameterUpgrade* PUpgrade;
- } Ref;
- //-----------new path algoritm variables----------------
- bool NeedPath;
- byte CPdestX;
- byte CPdestY;
- byte* PathX;
- byte* PathY;
- word NIPoints;
- word CurIPoint;
- //--------------------------------------------//
- //-----------begin of saving cluster----------//
- //--------------------------------------------//
- word Index;//φε∞σ≡ ²≥επε ∞εφ±≥≡α
- word NIndex;//ΦφΣσΩ± Γ φα÷Φεφαδⁿφε∞ ±∩Φ±Ωσ
- bool Selected:1;
- bool Borg:1;
- bool Invert:1;
- bool Push:1;
- bool Sdoxlo:1;
- //bool inMotion:1;//┬√∩εδφ σ≥± ∩≡ΦΩατ ε ∩σ≡σ∞σ∙σφΦΦ
- bool isMoving:1;
- bool XYChanged:1;
- bool Removed:1;
- bool Important:1;//─σδασ≥ ≈≥ε-≥ε Γαµφεσ
- bool Attack:1;
- bool Egoist:1;
- bool NoMotion:1;//φσ ±ΣΓΦπα≥ⁿ± φΦ ∩≡≥ ΩαΩΦ⌡ ≤±δεΓΦ ⌡,Ω≡ε∞σ ∩≡ΦΩατα ∩ε α≡∞ΦΦ
- bool NoFire:1;//φσ ε≥Ω≡√Γα≥ⁿ επεφⁿ ∩ε Γ≡απ≤ Φ φσ ∩≡ΦΓδσΩα≥ⁿ ΓφΦ∞αφΦ
- bool NoInitiate:1;//φσ ΦφΦ÷ΦΦ≡εΓα≥ⁿ ±≡αµσφΦσ
- bool WasInMobilZone:1;//┴√δ Γ τεφσ ∞εßΦδΦτα÷ΦΦ
- bool TempFlag:1;//Γ≡σ∞σφφ√Θ ⌠δαπ, Φ±∩εδⁿτ≤σ∞√Θ Σδ ±ε≡≥Φ≡εΓΩΦ ε≥≡ Σα
- bool Mobilised:1;
- bool MoveInRect:1;//≤±≥αφεΓδσφ, σ±δΦ ±≡σΣΦ ≡ΦΩατεΓ σ±≥ⁿ ∩≡ΦΩατ ε ∩σ≡σ∞σ∙σφΦΦ π≡≤∩∩√
- bool DrawUp:1;//╤╥╨╨PP╬╚╥▄╤▀!!!
- bool PathBroken:1;//┼±δΦ ⌡ε≥ⁿ ≡ατ ß√δα ∩≡σπ≡αΣα φα ∩≤≥Φ
- bool capBuilding:1;
- bool cpbMoving:1;
- bool capBuild:1;
- bool capBase:1;
- bool Ready:1;
- bool NoSearchVictim:1;
- bool NoAnswer:1;
- bool NeedNoHelp:1;
- bool OnWater:1;
- bool AskMade:1;
- bool FlyAttackMode:1;
- bool Teleport:1;
- bool capTeleport:1;
- bool StandGround:1;
- bool Invisible:1;
- //bool WATT:1;
- //bool AATT:1;
- //bool P100:1;
- //bool T3X3:1;
- //bool DoubleForce:1;
- //bool TripleForce:1;
- //bool QuadraForce:1;
- bool Slow:1;
- bool Transport:1;
- bool Absent:1;
- bool InFire:1;
- bool RefreshLife:1;
- bool DoWalls:1;
- bool Use_AI:1;
- bool AntiNuc:1;
- bool UFOTrans:1;
- bool Repair:1;
- word MagSrcID;
- byte AbRes;
- byte xForce;
- word MTime;
- word capMagic;
- word Magic;
- word NUstages;
- word Ustage;
- word Serial;
- byte Kind;
- byte Lx;
- byte Ly;
- byte Wait;
- word Life;
- word MaxLife;
- byte x;
- byte y;
- byte DstX;
- byte DstY;
- byte destX;
- byte destY;
- byte destX1;
- byte destY1;
- byte lastX;
- byte lastY;
- short wepX;
- short wepY;
- word delay;
- byte MaxDelay;
- byte Npush;
- byte MemoryTime;
- byte StandTime;
- byte NStages;
- byte Stage;
- byte NNUM;
- char Addx;
- char Addy;
- word EnemyDist;
- word EnemyID;
- word EnemySN;
- byte NMask;
- byte RStage;
- byte RType;
- byte RAmount;
- word NearBase;
- byte VisRadius;
- byte VisSpots;
- byte SpotType;
- byte SpotSize;
- byte DangerZone;
- //╥σΩ≤∙σσ ΓΦΣΦ∞εσ ±ε±≥ε φΦσ ∞εφ±≥≡α
- byte Direction; // ═α∩≡αΓδσφΦσ ∞εφ±≥≡α 0..7
- byte CurrentSprite; // ═ε∞σ≡ ±∩≡αΘ≥α, Ωε≥ε≡√Θ Σεδµσφ
- // ≡Φ±εΓα≥ⁿ±
- byte Ticks; // ╧≡ε°δε ≥ΦΩεΓ ± ∞ε∞σφ≥α ±∞σφ√ ΩαΣ≡α
- byte TicksPerChange; // ╥ΦΩεΓ φα ±∞σφ≤ ΩαΣ≡α
- byte AnmStandKind;
- byte AnmGoKind;
- byte Media;//=0-terrain,=1-on water,=2-on air
- //-----------------------------------------------//
- //-------------end of saving cluster-------------//
- //-----------------------------------------------//
- Octant* CurAnm; // ╥σΩ≤∙α Γ√∩εδφ σ∞α αφΦ∞α÷Φ
- word* Inside;
- word* TimeInside;
- word NInside;
- //Flying objects only:
- int RealX;//1 pixel=16 length units
- int RealY;
- int DestX;
- int DestY;
- int RealVx;
- int RealVy;
- int BestDist;
- int BestHeight;
- int Height;
- byte RealDir;
- //for all objects
- Legion* Wars;
- //byte bx;
- //byte by;
- SelGroup* GroupIndex;
-
- //╙Ωατα≥σδⁿ φα ≥σΩ≤∙ΦΘ ∩≡ΦΩατ 1-πε ≤≡εΓφ
- //╥Φ∩√ ∩≡ΦΩατεΓ:
- // ╧σ≡σΘ≥Φ(x,y)->(x1,y1) ∩ε ε∩≥Φ∞αδⁿφε∞≤ ∩≤≥Φ;
- // └≥αΩεΓα≥ⁿ εß·σΩ≥(obj_index)- ≤Σαδσφφ√Θ ΦδΦ ßδΦτΩΦΘ
- // ╙∞σ≡σ≥ⁿ
- // ╤ετΣα≥ⁿ ²Ωτσ∞∩δ ≡ εß·σΩ≥α(obj)...
- Order1* LocalOrder;
- //╙Ωατα≥σδⁿ φα ∩≡ε÷σΣ≤≡≤, Ωε≥ε≡εΘ ±εεß∙ασ≥± ε ≥σΩ≤∙σ∞ ±ε±≥ε φΦΦ
- //εß·σΩ≥α Γ ∩≡ε÷σ±±σ Γ√∩εδφσφΦ ∩≡ΦΩατα
- //ReportFn* OrderReport;
- //╟φα≈σφΦ MessageType:
- // 00000001 - └φΦ∞α÷Φ ταΓσ≡°σφα
- // 00000010 - ┬±σ Ωε∞αφΣ√ Φτ ß≤⌠σ≡α Φ±∩εδφσφ√
- // 00000100 - ╚τ∞σφΦδΦ±ⁿ Ωεε≡ΣΦφα≥√ εß·σΩ≥α
- // 00001000 - ═σΓετ∞εµφε ε±≤∙σ±≥ΓΦ≥ⁿ ∩σ≡σ∞σ∙σφΦσ
- //╥σ ±εß√≥Φ , Ωε≥ε≡√σ Γ√τ√Γα■≥ τ≥≤ ∩≡ε÷σΣ≤≡≤, εß≡αßα≥√Γα■≥±
- //Γ ±εε≥Γσ≥±≥ΓΦΦ ± ⌠δαπα∞Φ
- //word MessageFlags;
- //╬∩Φ±αφΦσ ∩≡σ≡√ΓαφΦΘ
- byte PrioryLevel;
- //byte MessageKind;
- // =0 - φσ ß√δε ∩≡σ≡√ΓαφΦΘ
- // =1 - ╧ε∞επΦ≥σ! ∞σφ ßⁿ■≥!
- // =2 - ▀ ≤ßⁿ■ ≥σß !
- // =3 - ταΣαφΦσ ∩≡σ≡Γαφε
- //word Sender;
- // =\0xFFFF - ∩≡σ≡√ΓαφΦσ ε≥ Φπ≡εΩα, Φφα≈σ φε∞σ≡
- // εß·σΩ≥α, ∩ε±δαΓ°σπε ±εεß∙σφΦσ.
-
- //╙Ωατα≥σδⁿ φα ß≤⌠σ≡ Ωε∞αφΣ, Ωε≥ε≡√σ Γ√∩εδφ ■≥± ∩ε±δσΣεΓα≥σδⁿφε
- //∩≡ε÷σΣ≤≡εΘ ∩≡ε±≈σ≥α ±δσΣ≤■∙σπε ±ε±≥ε φΦ ,≥ε σ±≥ⁿ ΓΦΣεΦτ∞σφ ■≥
- //∩≡σΣ√Σ≤∙Φσ ∩σ≡σ∞σφφ√σ. ┼±δΦ InLineCom=NULL-φσ≈σπε Φ±∩εδφ ≥ⁿ
- char* InLineCom;
- int LineOffset;//╙Ωατα≥σδⁿ φα ≥σΩ≤∙≤■ Ωε∞αφΣ≤(ε≥φε±Φ≥σδⁿφ√Θ)
- /* ╬∩Φ±αφΦσ Ωε∞αφΣ ∩±σΓΣεα±±σ∞ßδσ≡α (≤≡εΓσφⁿ 0)
- 00 1 ═σ∩≡αΓΦδⁿφα Ωε∞αφΣα(comUNKNOWN)
- 01 1 ╬Ωεφ≈αφΦσ ∩≡ε÷σΣ≤≡√, ΓετΓ≡α≥(comRET)
- 02 1 ╬≥δεµΦ≥ⁿ ΣαδⁿφσΘ°σσ Γ√∩εδφσφΦσ
- Σε εΩεφ≈αφΦ Γ√∩εδφσφΦ ≥σΩ≤∙σΘ
- αφΦ∞α÷ΦΦ
- 03 1 ╦εΩαδⁿφεσ ταΣαφΦσ ≤≡εΓφ 1 Γ√∩εδφσφε
- 04 db(x) db(y) 3 ╙±≥αφεΓΦ≥ⁿ ≥σΩ≤∙≤■ Ωεε≡ΣΦφα≥≤
- 05 db(direction) 2 ╙±≥αφεΓΦ≥ⁿ ≥σΩ≤∙σσ φα∩≡αΓδσφΦσ
-
- 06 db(dtype) ╟απ≡≤τΦ≥ⁿ ≡σπΦ±≥≡ (stype) αφΦ∞α÷ΦσΘ
- db(stype) ≥Φ∩α (dtype) ± α≥≡Φß≤≥ε∞ (kind)
- dw(kind) 5 cm MoreAnimation, dtype=WhatFor;
- kind=kind. ╟φα≈σφΦ (stype):
- 0-Stand
- 1-Move
- 2-Attack
- 3-Death
- 4-Spending
- 5-Working
- ...
-
- 07 dd(address) 5 ┴στ≤±δεΓφ√Θ ∩σ≡σ⌡εΣ ∩ε αΣ≡σ±≤ Γ ∩α∞ ≥Φ
- */
- //╨σπΦ±≥≡√ αφΦ∞α÷ΦΦ-Σδ ≤±Ωε≡σφΦ Σε±≥≤∩α Ω αφΦ∞α÷Φ ∞
- MoreAnimation ARegs[5];
- Weapon* Weap;
- void DefaultSettings(GeneralObject* GO);
- void LoadAnimation(int Reg,byte WhatFor,word Kind);
- void SendFlyTo(int x,int y,byte prio);
- void MakeProcess();
- void MakePreProcess();
- void MakeWPreProcess();
- void SendTo(int x,int y,int);
- void WSendTo(int x2,int y2,int Prio);
- void AttackObj(word OID,int Prio);
- void WAttackObj(word OID,int Prio);
- void FlyAttack(word OID,byte Prio);
- void AttackPoint(byte x,byte y,byte wep,int Prio);
- void ComplexAttack(word OID,byte wep,int Prio);
- void ProcessFly();
- void CreatePath(int x1,int y1);
- void CreateSimplePath(int x1,int y1);
- void CreatePrePath(int x1,int y1);
- void CreateWPath(int txt1,int tyt1);
- void CreatePreWPath(int txt1,int tyt1);
- void CreateSimpleWPath(int txt1,int tyt1);
- void MoveFrom(int dir);
- void WMoveFrom(int dir);
- void FreeAsmLink();
- void LoadCurAnm(int reg);
- void Die();
- void Eliminate();
- void MakeDamage(int Fundam,int Persist,OneObject* Sender);
- void SearchSupport(word OBJ);//╧εΦ±Ω ∩ε∞ε∙φΦΩεΓ τα∞ε≈Φ≥ⁿ OBJ
- void SearchVictim();
- void FreeOrdBlock(Order1* p );
- void ClearOrders();
- void ProcessMotion();
- void ProcessAttackMotion();
- void SendInGroup(byte tx,byte ty,byte x0,byte y0,byte x1,byte y1);
- void NextStage();
- bool BuildObj(word OID,int Prio);
- int CheckAbility(word ID);
- void Produce(word ID);
- bool BuildWall(word OID,int Prio);
- bool DamageWall(word OID,int Prio);
- word FindNearestBase();
- bool TakeResource(byte x,byte y,byte ResID,int Prio);
- void PerformUpgrade(word NewU);
- word FindNearestPort();
- bool BuildOnWater(word OID,int Prio);
- bool GetOil(word OID,int Prio);
- void SetDstPoint(byte x,byte y);
- void Patrol(int x1,int y1,int x2,int y2,byte prio);
- //void Repair(int x,int y,byte prio);
- void EnableDoubleForce();
- void DisableDoubleForce();
- void EnableTripleForce();
- void DiasableTripleForce();
- void EnableQuadraForce();
- void DisableQuadraForce();
- void ContinueAttackPoint(byte x,byte y,int Prio);
- void ContinueAttackWall(byte x,byte y,int Prio);
- void NuclearAttack(byte x,byte y);
- void MakeMeUFO();
- void WaitForRepair();
- inline int GetMinDam(){
- return Ref.Visual->info.Basic.MinDamage;
- };
- inline int GetMaxDam(){
- return Ref.Visual->info.Basic.MaxDamage;
- }
- bool GoToTransport(word MID,byte Prio);
- bool UnloadPassangers(byte x ,byte y);
- void MakeMeFly(word MagID);
- void MakeMeSit();
- //#pragma warning( disable )
- inline byte DistTo(byte xx,byte yy){
- __asm{
- xor eax,eax
- xor ecx,ecx
- xor edx,edx
- mov al,xx
- mov ebx,this
- mov dl,[ebx]this.x
- sub ax,dx
- jge uui
- neg ax
- uui: mov cl,yy
- mov dl,[ebx]this.y
- sub cx,dx
- jge uux
- neg cx
- uux: cmp cx,ax
- jl uuz
- mov ax,cx
- uuz:
- };
- };
- //#pragma warning( default )
- void CloseObject();
- };
- //╬∩Φ±αφΦσ ε≡≤µΦ
- class Nation;
- class Weapon{
- public:
- Visuals* Vis;//ε≡≤µΦσ ε⌠ε≡∞δ σ≥± ΩαΩ ε≥Σσδⁿφα φα÷Φ
- word NatIndex;
- byte FShift;//φα≈. ±∞σ∙σφΦσ Φ±≥ε≈φΦΩα ∩ε≡αµσφΦ
- byte MinDamage;
- byte MaxDamage;
- byte Force;
- byte FDecrement;//φα±ΩεδⁿΩε ≤∞σφⁿ°ασ≥± ±Φδα ε≡≤µΦ ∩≡Φ ∩ε∩αΣαφΦΦ
- byte Probab1;//Γσ≡ε ≥φε±≥ⁿ ∩≡εΣΦ≥ⁿ 1 ε≡≤µΦσ(0..255)
- byte Probab2;//Γσ≡ε ≥φε±≥ⁿ ∩ε≡εΣΦ≥ⁿ 2 ε≡≤µΦ (0..2555)
- short ExplPath;//∩≤≥ⁿ, ∩≡ε⌡εΣΦ∞√Θ Σε ΣσδσφΦ
- byte DirectFactor;//±≥σ∩σφⁿ Ωε≡≡σδ ÷ΦΦ φα∩≡αΓδσφΦ ∩σ≡σ∞σ∙σφΦ
- //∩ε≡εµΣασ∞επε ε≡≤µΦ Φ ∩ε≡εµΣα■∙σπε
- //0-φσταΓΦ±Φ∞√, 255-±εΓ∩αΣα■≥
- //word ar1;
- //word ar2;
- word atime;
- byte Transparent;
- Weapon* NextWeapon;//╬≡≤µΦσ,∩ε≡εµΣασ∞εσ Γ ≥ε≈Ωσ ∩ε≡αµσφΦ
- Octant* Fly;
- Octant* Action;
- byte NMask;
- void CreateWeapon(Nation* WNat,word Ind,byte ExplCount,byte Kind);
- void CreateNWeapon(int r1,int r2,int time);
- //Kind: 0-simple weapon
- //1-weak division weapon
- //2-middle division
- //3-strong division,NUCLEAR-like weapon
- //4-super strong weapon.Total elimination.
- short SoundID;
-
- };
- //╬∩Φ±αφΦσ ²δσ∞σφ≥α αφΦ∞α÷ΦΦ(ε≡≤µΦσ Γ ΣσΘ±≥ΓΦΦ)
- class AnmObject{
- public:
- byte xm;//Map coordinates
- byte ym;
- byte xm0;
- byte ym0;
- int x;
- int y;
- int vx;
- int vy;
- short v;
- word ASerial;
- byte PhDir;//(0..255);-⌠ΦτΦ≈σ±Ωεσ φα∩≡αΓδσφΦσ
- byte Direction;//φα∩≡αΓδσφΦσ Φτ εΩ≥αφ≥α
- byte NMask;
- OneObject* Sender;
- Weapon* Wpn;
- word Path;
- word MaxPath;
- bool Visible:1;
- bool OneTime:1;
- bool SATT:1;
- bool UATT:1;
- bool WATT:1;
- bool AATT:1;
- bool P100:1;
- bool T3X3:1;
- bool AnmLead:1;
- byte Transparent;
- byte Nanm;
- byte Canm;
- byte Force;
- byte Decrement;
- word MinDamage;
- word MaxDamage;
- OneSlide* Kino;
- byte destX;
- byte destY;
- word DestObj;
- word DSerial;
- };
- class City;
- class Needness{
- public:
- byte NeedType;//==0-monster,==1-Upgrade
- word MonID;
- byte GroupSize;
- byte Amount;
- word Probability;
- word MoneyPercent;
- };
- struct SWPAR{
- word Range;
- byte MinMagic;
- bool Enabled:1;
- bool Fly:1;
- };
- struct sAI_Req{
- byte Kind;//0-unit,1-upgrade,2-group
- word ObjID;
- word Amount;
- };
- struct sAI_Devlp{
- byte Kind;//0-unit,1-upgrade
- byte ConKind;//0-unit,2-group
- word ObjID;
- word ConID;
- word Amount;
- word GoldPercent;
- word AtnPercent;
- };
- //╬∩Φ±αφΦσ φα÷ΦΦ Γ ÷σδε∞
- class Nation{
- public:
- char SCRIPT[16];
- int NMon;
- GeneralObject* Mon[2048];
- City* CITY;
- int NGidot;
- int NFarms;
- word* PAble[2048];
- word PACount[2048];
- int BranchPercent[NBRANCH];
- Upgrade UPG;
- int NOct;
- int NSlides;
- //AI Statements
- int CasheSize;
- int TAX_PERCENT;
- int CASH_PUSH_PROBABILITY;
- int NationalAI;//0..32768-determines speed of development
- int AI_Level_MIN;
- int AI_Level_MAX;
- int AI_Forward;
- short DangerSound;
- short VictorySound;
- short ConstructSound;
- short BuildDieSound;
- short UnitDieSound;
- word LastAttackTime;
- byte MagicDelay;
- word NLmenus;
- word* Lmenus;
- word NAmenus;
- word* Amenus;
- word NWmenus;
- word* Wmenus;
- word NCmenus;
- word* Cmenus;
- word NNeed;
- Needness NEED[1024];
- //ENDAI
- byte NNUM;
- Octant* Animations;
- OneSlide* Slides;
- MoreAnimation* Finf;
- int NFinf;
- byte palette[256];
- word CivilisationLevel;
- byte NMask;
- word NIcons;
- WIcon* wIcons[1024];
- word TOWN0ID;
- word TOWN1ID;
- word TOWN2ID;
- word SubmID;
- word PortID;
- word RefineryID;
- word FoundaryID;
- word TankerID;
- word OilBaseID;
- word TOWNHALL1;
- word TOWNHALL2;
- word LUMBERMILL;
- word WMagic[256];
- word NCOND;
- word CLSize[256];//Access controlling
- word* CLRef[256];
- //Strange weapon prameters
- word SWRange[256];
- SWPAR SWP[256];
- //-------------NEW AI--------------
- word NGrp; //Groups of types definition
- word GRSize[32];
- word* GRRef[32];
- word GAmount[32];//Result of calculation
- word N_AI_Levels;
- word N_AI_Req[256];
- word N_AI_Devlp[256];
- sAI_Req* AI_Req[256];
- sAI_Devlp* AI_Devlp[256];
- word AI_Level;
- //---------------------------------
- void CreateNation(LPCSTR NationFile,byte NMask,byte NIndex);
- bool CreateTerrainAt(int x,int y,int n);
- bool CreateOnWater(int xp,int yp,int n);
- bool CreateOnFly(int xf,int yf,int n);
- void AssignWeapon(Weapon* Wpn,int i);
- int CreateBuilding(word ID,byte x,byte y);
- bool CheckBuilding(word ID,byte x,byte y);
- void GetUpgradeCostString(char* st,word UI);
- void GetTax(byte RC_Type,int RC_Amount);
- void CloseNation();
- };
- //╬≥≡ Σ ∞εφ±≥≡εΓ
- class Legion{
- public:
- word* Member;//╙Ωατα≥σδⁿ φα ±∩Φ±εΩ ≈δσφεΓ δσπΦεφα
- word NMemb;//╩εδ-Γε ≈δσφεΓ
- word NNeed;//φσεß⌡εΣΦ∞ε Σδ Ωε∞∩δσΩ≥α÷ΦΦ
- byte NMask;//φα÷Φ
- byte minx;
- byte miny;
- byte maxx;
- byte maxy;
- byte XL1;
- byte YL1;
- byte SizeX1;//ΩαΩεΘ Σεδµσφ ß√≥ⁿ ≡ατ∞σ≡ ∩ε OX εßδα±≥ⁿ τα∙Φ≥φΦΩεΓ
- byte SizeY1;//------/------ ∩ε OY
- byte XL2;
- byte YL2;
- byte SizeX2;//------------/---------------- εßδα±≥ⁿ ±≥≡σδΩεΓ
- byte SizeY2;
- byte maxDeplX;//≡ατ∞σ≡ ε≥≡ Σα ∩ε ⌡, ∩≡Φ Ωε≥ε≡ε∞ ≤µσ φ≤µφε ∩ε±≥≡εσφΦσ
- byte maxDeplY;
- byte critDeplX;//∩ε±≡εσφΦσ αß±εδ■≥φε φσεß⌡εΣΦ∞ε,Φφα≈σ ≡ατπ≡ε∞
- byte critDeplY;
- word MobilTimer;//Γ≡σ∞ φα π≡≤∩∩Φ≡εΓΩ≤
- word Order3Time;
- word NoMmobilTimer;//Γ≡σ∞ , Γ ≥σ≈σφΦσ Ωε≥ε≡επε φεΓ√Θ ∩≡ΦΩατ ε π≡≤∩∩Φ≡εΓΩσ
- //Φπφε≡Φ≡≤σ≥±
- word EnemyID;
-
- byte destX;
- byte destY;
- byte destX1;
- byte destY1;
- byte FinX;
- byte FinY;
- byte Ordering;//±≥σ∩σφⁿ ≤∩ε≡ Σε≈σφφε±≥Φ
- //⌠δαπΦ ≡σαΩ÷ΦΦ ε≥≡ Σα φα ±εß√≥Φ
- bool NoMotion:1;//φσ ±ΣΓΦπα≥ⁿ± φΦ ∩≡≥ ΩαΩΦ⌡ ≤±δεΓΦ ⌡,Ω≡ε∞σ ∩≡ΦΩατα ∩ε α≡∞ΦΦ
- bool NoFire:1;//φσ ε≥Ω≡√Γα≥ⁿ επεφⁿ ∩ε Γ≡απ≤ Φ φσ ∩≡ΦΓδσΩα≥ⁿ ΓφΦ∞αφΦ
- bool NoInitiate:1;//φσ ΦφΦ÷ΦΦ≡εΓα≥ⁿ ±≡αµσφΦσ
- //∩ε ≤∞εδ≈αφΦ■ Γ±σ ⌠δαπΦ=false-±α∞εΓεδⁿφεσ ΦτßΦ≡αφΦσ ≥αΩ≥ΦΩΦ ±≡αµσφΦ
- //⌠δαπΦ ±ε±≥ε φΦ ε≥≡ Σα
- bool Mobil:1;//ε≥≡ Σ ∞εßΦδΦτεΓαφ
- bool inWar;//ε≥≡ Σ ΓεΓδσ≈σφ Γ Γεσφφ√σ ΣσΘ±≥ΓΦ
- bool NotExists;//∩εδφ√Θ ≡ατπ≡ε∞ ε≥≡ Σα
- bool CheckMobility:1;//∩≡εΓσ≡ ≥ⁿ ±≥σ∩σφⁿ ≤∩ε≡ Σε≈σφφε±≥Φ
- bool TempMobil;//∩≡ε∞σµ≤≥ε≈φα ∞εßΦδΦτα÷Φ
- bool StonesInside:1;//Γ ±σ≡σΣΦφσ ≡α±∩εδεµσφΦ σ±≥ⁿ φσ≤±≥≡αφΦ∞√σ ∩≡σπ≡αΣ√
- //⌠δαπΦ ∩≡ΦΩατεΓ
- bool needMobil;//∩≡ΦΩατ ε ∞εßΦδΦτα÷ΦΦ
- bool needCompose:1;//φσεß⌡εΣΦ∞α π≡≤∩∩Φ≡εΓΩα
- bool needMoveTo:1;
- bool needDestroyObj:1;
- bool needCompactness:1;//∩ε ∩≤≥Φ ε≥≡ Σ ∩εΣµΦΣασ≥ ε≥±≥αΓ°Φ⌡
- void CreateLegionInSquare(byte x,byte y,byte x1,byte y1,byte Mask);
- void CreateSmartLegionInSquare(byte x,byte y,byte x1,byte y1,byte Mask);
- void CreateLegionFromSelection(byte Mask);
- void CreateSmartLegionFromSelection(byte Mask);
- void CreateLegionNearPoint(byte x,byte y,byte MaxRadius,word NMem,byte Mask);
- void CreateSmartLegionNearPoint(byte x,byte y,byte MaxRadius,word NMem,byte Mask);
- void CreateMobilZone(byte x,byte y);
- void FastCreateMobilZone(byte x,byte y);
- char GetOrderDegree();
- //0-φΦΩαΩεπε ∩ε≡ ΣΩα φσ≥, ΓεΘ±Ωε ≡α±±σ φε
- //1-∩ε≡ ΣεΩ φσΣε±≥α≥ε≈σφ Σδ φε≡∞αδⁿφεπε ⌠≤φΩ÷ΦεφΦ≡εΓαφΦ
- //2-∩ε≡ ΣεΩ, Σε±≥α≥ε≈φ√Θ Σδ ∩σ≡σ∞σ∙σφΦ
- //3-∞ΦφΦ∞αδⁿφ√Θ ßσ±∩ε≡ ΣεΩ,≥Γα≡Φ ≥εδⁿΩε φα εΣφ≤ Ωδσ≥Ω≤ φσ ΓδστδΦ
- //4-ΦΣσαδⁿφ√Θ ∩ε≡ ΣεΩ
- void Compose();
- void Mobilisate();
- void MoveTo(byte x,byte y);
- void AttackObj(word ObjID);
- void CalculateArea();//τα∩εδφσφΦσ ∩εδσΘ minx,miny,maxx,maxy
- void CalculateBestComposition();//∩ε τφα≈σφΦ ∞
- //min..,max..,NMemb->NNeed,SizeX1,SizeY1
- void CalculateSoldiers();//±≈Φ≥ασ≥ Φ ß√±≥≡ε ±ε≡≥Φ≡≤σ≥ ±εδΣα≥,
- //ε∩≡σΣσδ σ≥ ταφΦ∞ασ∞≤■ ε≥≡ Σε∞ εßδα±≥ⁿ
- void CreateFinalZone(byte x,byte y);
- void PreProcess();
- void Process();//∩≡εΣεδµΦ≥ⁿ Γ√∩εδφσφΦσ ∩≡ΦΩατα
- bool MobilisationIsDone();
- bool CompositionIsDone();
- void SendSoldiers();
- void SendTo(byte x,byte y);
-
- };
- class SelGroup{
- public:
- word* Member;
- word* SerialN;
- word NMemb;
- bool CanMove:1;
- bool CanSearchVictim:1;
- bool CanHelpToFriend:1;
- bool Egoizm:1;
- SelGroup();
- void CreateFromSelection(byte NI);
- void SelectMembers(byte NI);
- void DeleteMembers(byte NI);
- };
-
-
- //╠α±±ΦΓ Γ±σ ∞εφ±≥≡εΓ φα Ωα≡≥σ
- #define MaxObj 8192
- #define maximage 2048
- extern OneObject* Group[MaxObj];
- extern RLCTable MImage[maximage];
- extern RLCTable miniMImage[maximage];
- void LoadMonsters();
- #define maxmap 256 //Don't change it!
- typedef byte SimpMap[maxmap][maxmap];
- extern MapCell map[maxmap][maxmap];
- extern SimpMap TrMap;
- void LoadLock();
- #define MaxAsmCount 16384
- #define OneAsmSize 256
- #define OneAShift 8;
- #define MaxOrdCount 32768
- #define OneOrdSize 32;
- #define OneOShift 5;
- char* GetAsmBlock();
- void FreeAsmBlock(char* p );
- void InitAsmBuf();
- Order1* GetOrdBlock();
- //void FreeOrdBlock(Order1* p );
- void InitOrdBuf();
- extern Order1 OrdBuf[MaxOrdCount];
- extern bool AsmUsage[MaxAsmCount];
- extern int msx;
- extern int msy;
- extern void Except();
- //╨ατ∞σ≡ ε≈σ≡σΣΦ φα Γ√∩εδφσφΦσ(2^n only !)
- #define StSize 8192
- #define StMask StSize-1;
- extern word ComStc[StSize];
- extern word StHead;
- extern word StTile;
- #define FreeTime 600;
- void CarryOutOrder();
- void InitStack();
- extern RLCTable rlc;
- extern RLCFont rlf;
- extern RLCFont rlf1;
- extern RLCTable mon;
- extern RLCTable rlc_s;
- extern RLCFont rlf_s;
- extern RLCFont rlf1_s;
- extern RLCTable mon_s;
- void doooo();
- extern byte LLock[maxmap][maxmap];
- extern word Mops[maxmap][maxmap];
- extern word Creator;
- extern Nation NAT;
- extern int smapx;
- extern int smapy;
- extern int smaplx;
- extern int smaply;
- extern int minix;
- extern int miniy;
- extern HWND hwnd;
- void MakePostProcess();
- void MakeWPostProcess();
- void PrepareProcessing();
- extern int Flips;
- extern word Died[maxmap][maxmap];
- //extern void FreeOrdBlock(Order1* p );
- extern int mapx;
- extern int mapy;
- //byte CreateExObj(Weapon* Wep,short x,short y,
- // short dx,short dy,short v,byte Mask,OneObject* Send);
- void CreateExObjD(Weapon* Wep,int x,int y,
- short PDir,short v,byte Mask,OneObject* Send);
- //byte CreateExObjDPoint(Weapon* Wep,short x,short y,
- // short dx,short dy,short v,byte Mask,OneObject* Send,byte dsx,byte dsy);
- byte AttackByWeapon(Weapon* Wep,short x,short y,OneObject* Send,word DOBJ);
- void InitExplosions();
- void ProcessExpl();
- extern Weapon FlyFire1;
- extern Weapon Vibux1;
- void CloseExplosions();
- short rando();
- extern byte PlayerMask;
- extern bool EgoFlag;
- void AddAsk(word ReqID,byte x,byte y,char zdx,char zdy);
- extern SelGroup SelSet[80];
- extern Weapon* WPLIST[1024];
- typedef void HandlePro(int);
- void InitZones();
- int CreateZone(int x,int y,int lx,int ly,HandlePro* HPro,int Index,char* Hint);
- void ControlZones();
- void DeleteZone(int i);
- void ShowProp();
- void InitPrpBar();
- void ShowAbility();
- extern word* Selm[8];
- extern word* SerN[8];
- extern word NSL[8];
- void CmdCreateSelection(byte NI,byte x,byte y,byte x1,byte y1);
- void CmdSendToXY(byte NI,byte x,byte y);
- void CmdAttackObj(byte NI,word ObjID);
- void CmdCreateTerrain(byte NI,byte x,byte y,word Type);
- void CmdCreateBuilding(byte NI,byte x,byte y,word Type);
- void CmdProduceObj(byte NI,word Type);
- void CmdMemSelection(byte NI,byte Index);
- void CmdRememSelection(byte NI,byte Index);
- void CmdBuildObj(byte NI,word ObjID);
- void CmdBuildWall(byte NI);
- void CmdRepairWall(byte NI,word LIN);
- void CmdDamageWall(byte NI,word LIN);
- void CmdTakeRes(byte NI,byte x,byte y,byte ResID);
- void CmdPerformUpgrade(byte NI,word UI);
- void CmdCreateKindSelection(byte NI,byte x,byte y,byte x1,byte y1,byte Kind);
- void CmdCreateTypeSelection(byte NI,byte x,byte y,byte x1,byte y1,word Type);
- void CmdCreateGoodSelection(byte NI,word x,word y,word x1,word y1);
- void CmdCreateGoodKindSelection(byte NI,word x,word y,word x1,word y1,byte Kind);
- void CmdCreateGoodTypeSelection(byte NI,word x,word y,word x1,word y1,word Type);
- void CmdSetDst(byte NI,byte x,byte y);
- void CmdSendToPoint(byte NI,byte x,byte y);
- void CmdAttackToXY(byte NI,byte x,byte y);
- void CmdStop(byte NI);
- void CmdStandGround(byte NI);
- void CmdPatrol(byte NI,byte x,byte y);
- void CmdRepair(byte NI,byte x,byte y);
- void CmdGetResource(byte NI,byte x,byte y);
- void CmdComplexAttackPoint(byte NI,byte x,byte y,byte kind);
- void CmdComplexAttack(byte NI,word ID,byte kind);
- void CmdSendToTransport(byte NI,word ID);
- void CmdUnload(byte NI,byte x,byte y);
- void CmdDie(byte NI);
- void CmdContinueAttackPoint(byte NI,byte x,byte y);
- void CmdContinueAttackWall(byte NI,byte x,byte y);
- void CmdSitDown(byte NI);
- void CmdNucAtt(byte NI,byte x,byte y);
- void CmdChooseSelType(byte NI,word ID);
- void CmdChooseUnSelType(byte NI,word ID);
- extern Nation NATIONS[8];
- extern byte MyNation;
- void InitEBuf();
- void ExecuteBuffer();
- extern char Prompt[80];
- extern int PromptTime;
- extern byte tmap[maxmap][maxmap];
- bool CheckCost(byte NI,byte ResID,word Amount);
- void CreateWaterMap();
- extern byte WLock[256][256];//Water locking map
- extern byte WMap[256][256];//Static locking map
- extern int SCRSizeX;
- extern int SCRSizeY;
- extern int RSCRSizeX;
- extern int RSCRSizeY;
- extern int COPYSizeX;
- void CmdGetOil(byte NI,word UI);
- //DEBUGGING definitions. Remove this definitions in retail version
- //#define DEBLEVEL1
- //#define DEBLEVEL2
- //#define DEBLEVEL3
- //#define DEBLEVEL4
- extern byte NLocks[64][64];
- inline void IncLock(byte x,byte y){
- NLocks[y>>2][x>>2]++;
- };
- inline void DecLock(byte x,byte y){
- NLocks[y>>2][x>>2]--;
- };
- extern bool FASTMODE;
- extern word MAXOBJECT;
- void SetupHint();
- void AssignHint(char* s,int time);
- void GetChar(GeneralObject* GO,char* s);
- void ProcessHint();
- extern OneObject OBJECTS[8192];
- extern short TSin[257];
- extern short TCos[257];
- extern short TAtg[257];
- void SetFlyMarkers();
- void ClearFlyMarkers();
- typedef void UniqMethood(int n,int x,int y);
- void HandleSW();
- void CreateStrangeObject(int i,byte NI,int x,int y,word ID);
- void ShowRLCItemMutno(int x,int y,lpRLCTable lprt,int n);
- void ShowRLCItemFired(int x,int y,lpRLCTable lprt,int n);
- byte CreateUniExObj(Weapon* Wep,int x,int y,
- short v,byte Mask,
- OneObject* Send,
- byte dsx,byte dsy,
- word DOBJ);
- byte CreateLeadingObject(Weapon* Wep,int x,int y,
- short v,byte Mask,
- OneObject* Send,
- word DestAnm);
- bool CheckAttAbility(OneObject* OB,word Patient);
- void PrepareToEdit();
- void PrepareToGame();
- extern int MaxSizeX;
- extern int MaxSizeY;
- extern bool MiniMode;
- void SetMiniMode();
- void ClearMiniMode();
- extern int Shifter;
- extern int Multip;