- Timestamp:
- Jan 9, 2017, 7:58:25 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Integrated.lpi
r38 r39 438 438 <StackChecks Value="True"/> 439 439 </Checks> 440 <VerifyObjMethodCallValidity Value="True"/>441 <TargetCPU Value="i386"/>442 <TargetOS Value="win32"/>443 440 </CodeGeneration> 444 441 <Linking> -
trunk/LocalPlayer/Help.pas
r38 r39 41 41 42 42 THyperText = class(TStringList) 43 public 43 44 procedure AddLine(s: String = ''; Format: integer = 0; Picpix: integer = 0; 44 45 LinkCategory: integer = 0; LinkIndex: integer = 0); -
trunk/LocalPlayer/PVSB.pas
r38 r39 8 8 Windows, 9 9 {$ENDIF} 10 LCLIntf, LCLType, LMessages, Messages, SysUtils;10 Forms, LCLIntf, LCLType, LMessages, Messages, SysUtils; 11 11 12 12 type 13 13 TPVScrollbar = record 14 14 h: integer; 15 si: TScrollInfo end; 15 si: TScrollInfo; 16 Form: TForm; 17 end; 16 18 17 18 19 20 21 22 23 19 procedure CreatePVSB(var sb: TPVScrollbar; Handle, y0, x1, y1: integer); 20 procedure InitPVSB(var sb: TPVScrollbar; max, Page: integer); 21 function ProcessPVSB(var sb: TPVScrollbar; const m: TMessage): boolean; 22 function ProcessMouseWheel(var sb: TPVScrollbar; const m: TMessage) 23 : boolean; 24 procedure ShowPVSB(var sb: TPVScrollbar; Visible: boolean); 25 procedure EndPVSB(var sb: TPVScrollbar); 24 26 25 27 implementation … … 28 30 Count: integer = 0; 29 31 30 procedure CreatePVSB ;32 procedure CreatePVSB(var sb: TPVScrollbar; Handle, y0, x1, y1: integer); 31 33 begin 32 34 inc(Count); 35 {$IFDEF LINUX} 36 sb.Form := TForm.Create(nil); 37 sb.h := sb.Form.Handle; 38 {$ENDIF} 33 39 {$IFDEF WINDOWS} 34 40 sb.h := CreateWindowEx(0, 'SCROLLBAR', pchar('PVSB' + IntToStr(Count)), … … 39 45 end; 40 46 41 procedure InitPVSB ;47 procedure InitPVSB(var sb: TPVScrollbar; max, Page: integer); 42 48 begin 43 49 {$IFDEF WINDOWS} … … 58 64 end; 59 65 60 function ProcessPVSB ;66 function ProcessPVSB(var sb: TPVScrollbar; const m: TMessage): Boolean; 61 67 var 62 68 NewPos: integer; … … 101 107 end; 102 108 103 function ProcessMouseWheel ;109 function ProcessMouseWheel(var sb: TPVScrollbar; const m: TMessage): Boolean; 104 110 var 105 111 NewPos: integer; -
trunk/Protocol.pas
r38 r39 909 909 (adSmartWeapons, preNone, preNone)); // futMissileTechnology 910 910 911 Imp: 912 array [0 .. nImp - 1] of // city improvements 913 record Kind, Preq, Cost, Maint, Expiration: integer; 911 Imp: array [0 .. nImp - 1] of // city improvements 912 record 913 Kind: Integer; 914 Preq: Integer; 915 Cost: Integer; 916 Maint: Integer; 917 Expiration: integer; 914 918 end 915 919 = ((Kind: ikWonder; Preq: adMathematics; Cost: 400; Maint: 0; … … 935 939 (Kind: ikWonder; Preq: adMonotheism; Cost: 400; Maint: 0; Expiration: - 1), 936 940 // woMich 937 (Kind: ikNA; Preq: preNA), // {11} 938 (Kind: ikWonder; Preq: adTheoryOfGravity; Cost: 400; Maint: 0; 939 Expiration: - 1), // woNewton 941 (Kind: ikNA; Preq: preNA; Cost: 0; Maint: 0; Expiration: 0), // {11} 942 (Kind: ikWonder; Preq: adTheoryOfGravity; Cost: 400; Maint: 0; Expiration: - 1), // woNewton 940 943 (Kind: ikWonder; Preq: adTheology; Cost: 400; Maint: 0; Expiration: - 1), 941 944 // woBach 942 (Kind: ikNA; Preq: preNA ), // {14}945 (Kind: ikNA; Preq: preNA; Cost: 0; Maint: 0; Expiration: 0), // {14} 943 946 (Kind: ikWonder; Preq: adDemocracy; Cost: 500; Maint: 0; Expiration: - 1), 944 947 // woLiberty … … 953 956 (Kind: ikWonder; Preq: adSpaceFlight; Cost: 800; Maint: 0; Expiration: - 1), 954 957 // woMir 955 (Kind: ikNA; Preq: preNA ), // {21}956 (Kind: ikNA; Preq: preNA ), // {22}957 (Kind: ikNA; Preq: preNA ), // {23}958 (Kind: ikNA; Preq: preNA ), // {24}959 (Kind: ikNA; Preq: preNA ), // {25}960 (Kind: ikNA; Preq: preNA ), // {26}961 (Kind: ikNA; Preq: preNA ), // {27}962 (Kind: ikTrGoods; Preq: preNone; Cost: 0; Maint: 0 ), // imTrGoods963 (Kind: ikCommon; Preq: adWarriorCode; Cost: 40; Maint: 1 ), // imBarracks964 (Kind: ikCommon; Preq: adPottery; Cost: 60; Maint: 1 ), // imGranary965 (Kind: ikCommon; Preq: adCeremonialBurial; Cost: 40; Maint: 1 ), // imTemple966 (Kind: ikCommon; Preq: adCurrency; Cost: 60; Maint: 1 ), // imMarket967 (Kind: ikCommon; Preq: adWriting; Cost: 80; Maint: 3 ), // imLibrary968 (Kind: ikCommon; Preq: adCodeOfLaws; Cost: 80; Maint: 2 ), // imCourt969 (Kind: ikCommon; Preq: adMasonry; Cost: 80; Maint: 1 ), // imWalls970 (Kind: ikCommon; Preq: adConstruction; Cost: 80; Maint: 1 ), // imAqueduct971 (Kind: ikCommon; Preq: adBanking; Cost: 120; Maint: 2 ), // imBank972 (Kind: ikCommon; Preq: adMonotheism; Cost: 100; Maint: 1 ), // imCathedral973 (Kind: ikCommon; Preq: adUniversity; Cost: 160; Maint: 5 ), // imUniversity974 (Kind: ikCommon; Preq: adSeafaring; Cost: 60; Maint: 1 ), // imHarbor975 (Kind: ikCommon; Preq: adPoetry; Cost: 60; Maint: 2 ), // imTheater976 (Kind: ikCommon; Preq: adIndustrialization; Cost: 200; Maint: 3 ), // imFactory977 (Kind: ikCommon; Preq: adRobotics; Cost: 320; Maint: 5 ), // imMfgPlant978 (Kind: ikCommon; Preq: adRecycling; Cost: 320; Maint: 4 ), // imRecycling979 (Kind: ikCommon; Preq: adElectricity; Cost: 120; Maint: 2 ), // imPower980 (Kind: ikCommon; Preq: adEnvironmentalism; Cost: 120; Maint: 1 ), // imHydro981 (Kind: ikCommon; Preq: adNuclearPower; Cost: 240; Maint: 2 ), // imNuclear982 (Kind: ikCommon; Preq: adRefining; Cost: 160; Maint: 2 ), // imPlatform983 (Kind: ikCommon; Preq: preNone; Cost: 40; Maint: 1 ), // imTownHall984 (Kind: ikCommon; Preq: adSanitation; Cost: 120; Maint: 2 ), // imSewer985 (Kind: ikCommon; Preq: adRefrigeration; Cost: 80; Maint: 2 ), // imSupermarket986 (Kind: ikCommon; Preq: adAutomobile; Cost: 160; Maint: 4 ), // imHighways987 (Kind: ikCommon; Preq: adComputers; Cost: 240; Maint: 7 ), // imResLab988 (Kind: ikCommon; Preq: adAdvancedRocketry; Cost: 100; Maint: 1 ),958 (Kind: ikNA; Preq: preNA; Cost: 0; Maint: 0; Expiration: 0), // {21} 959 (Kind: ikNA; Preq: preNA; Cost: 0; Maint: 0; Expiration: 0), // {22} 960 (Kind: ikNA; Preq: preNA; Cost: 0; Maint: 0; Expiration: 0), // {23} 961 (Kind: ikNA; Preq: preNA; Cost: 0; Maint: 0; Expiration: 0), // {24} 962 (Kind: ikNA; Preq: preNA; Cost: 0; Maint: 0; Expiration: 0), // {25} 963 (Kind: ikNA; Preq: preNA; Cost: 0; Maint: 0; Expiration: 0), // {26} 964 (Kind: ikNA; Preq: preNA; Cost: 0; Maint: 0; Expiration: 0), // {27} 965 (Kind: ikTrGoods; Preq: preNone; Cost: 0; Maint: 0; Expiration: 0), // imTrGoods 966 (Kind: ikCommon; Preq: adWarriorCode; Cost: 40; Maint: 1; Expiration: 0), // imBarracks 967 (Kind: ikCommon; Preq: adPottery; Cost: 60; Maint: 1; Expiration: 0), // imGranary 968 (Kind: ikCommon; Preq: adCeremonialBurial; Cost: 40; Maint: 1; Expiration: 0), // imTemple 969 (Kind: ikCommon; Preq: adCurrency; Cost: 60; Maint: 1; Expiration: 0), // imMarket 970 (Kind: ikCommon; Preq: adWriting; Cost: 80; Maint: 3; Expiration: 0), // imLibrary 971 (Kind: ikCommon; Preq: adCodeOfLaws; Cost: 80; Maint: 2; Expiration: 0), // imCourt 972 (Kind: ikCommon; Preq: adMasonry; Cost: 80; Maint: 1; Expiration: 0), // imWalls 973 (Kind: ikCommon; Preq: adConstruction; Cost: 80; Maint: 1; Expiration: 0), // imAqueduct 974 (Kind: ikCommon; Preq: adBanking; Cost: 120; Maint: 2; Expiration: 0), // imBank 975 (Kind: ikCommon; Preq: adMonotheism; Cost: 100; Maint: 1; Expiration: 0), // imCathedral 976 (Kind: ikCommon; Preq: adUniversity; Cost: 160; Maint: 5; Expiration: 0), // imUniversity 977 (Kind: ikCommon; Preq: adSeafaring; Cost: 60; Maint: 1; Expiration: 0), // imHarbor 978 (Kind: ikCommon; Preq: adPoetry; Cost: 60; Maint: 2; Expiration: 0), // imTheater 979 (Kind: ikCommon; Preq: adIndustrialization; Cost: 200; Maint: 3; Expiration: 0), // imFactory 980 (Kind: ikCommon; Preq: adRobotics; Cost: 320; Maint: 5; Expiration: 0), // imMfgPlant 981 (Kind: ikCommon; Preq: adRecycling; Cost: 320; Maint: 4; Expiration: 0), // imRecycling 982 (Kind: ikCommon; Preq: adElectricity; Cost: 120; Maint: 2; Expiration: 0), // imPower 983 (Kind: ikCommon; Preq: adEnvironmentalism; Cost: 120; Maint: 1; Expiration: 0), // imHydro 984 (Kind: ikCommon; Preq: adNuclearPower; Cost: 240; Maint: 2; Expiration: 0), // imNuclear 985 (Kind: ikCommon; Preq: adRefining; Cost: 160; Maint: 2; Expiration: 0), // imPlatform 986 (Kind: ikCommon; Preq: preNone; Cost: 40; Maint: 1; Expiration: 0), // imTownHall 987 (Kind: ikCommon; Preq: adSanitation; Cost: 120; Maint: 2; Expiration: 0), // imSewer 988 (Kind: ikCommon; Preq: adRefrigeration; Cost: 80; Maint: 2; Expiration: 0), // imSupermarket 989 (Kind: ikCommon; Preq: adAutomobile; Cost: 160; Maint: 4; Expiration: 0), // imHighways 990 (Kind: ikCommon; Preq: adComputers; Cost: 240; Maint: 7; Expiration: 0), // imResLab 991 (Kind: ikCommon; Preq: adAdvancedRocketry; Cost: 100; Maint: 1; Expiration: 0), 989 992 // imMissileBat 990 (Kind: ikCommon; Preq: adMetallurgy; Cost: 80; Maint: 1 ), // imCoastalFort991 (Kind: ikCommon; Preq: adAdvancedFlight; Cost: 160; Maint: 1 ), // imAirport992 (Kind: ikCommon; Preq: adAmphibiousWarfare; Cost: 80; Maint: 1 ), // imDockyard993 (Kind: ikNatLocal; Preq: preNone; Cost: 100; Maint: 0 ), // imPalace994 (Kind: ikNatLocal; Preq: adEngineering; Cost: 400; Maint: 4 ), // imGrWall995 (Kind: ikNatLocal; Preq: adConstruction; Cost: 200; Maint: 4 ), // imColosseum996 (Kind: ikNatLocal; Preq: adAstronomy; Cost: 300; Maint: 4 ), // imObservatory997 (Kind: ikNatLocal; Preq: adTactics; Cost: 100; Maint: 4 ), // imMilAcademy998 (Kind: ikNatLocal; Preq: adSteel; Cost: 200; Maint: 2 ), // imBunker999 (Kind: ikNatLocal; Preq: adSyntheticFood; Cost: 120; Maint: 2 ), // imAlgae1000 (Kind: ikNatGlobal; Preq: adTheCorporation; Cost: 320; Maint: 4 ), // imStockEx1001 (Kind: ikNatLocal; Preq: adSpaceFlight; Cost: 400; Maint: 0 ), // imSpacePort1002 (Kind: ikShipPart; Preq: adTransstellarColonization; Cost: 240; Maint: 0 ),993 (Kind: ikCommon; Preq: adMetallurgy; Cost: 80; Maint: 1; Expiration: 0), // imCoastalFort 994 (Kind: ikCommon; Preq: adAdvancedFlight; Cost: 160; Maint: 1; Expiration: 0), // imAirport 995 (Kind: ikCommon; Preq: adAmphibiousWarfare; Cost: 80; Maint: 1; Expiration: 0), // imDockyard 996 (Kind: ikNatLocal; Preq: preNone; Cost: 100; Maint: 0; Expiration: 0), // imPalace 997 (Kind: ikNatLocal; Preq: adEngineering; Cost: 400; Maint: 4; Expiration: 0), // imGrWall 998 (Kind: ikNatLocal; Preq: adConstruction; Cost: 200; Maint: 4; Expiration: 0), // imColosseum 999 (Kind: ikNatLocal; Preq: adAstronomy; Cost: 300; Maint: 4; Expiration: 0), // imObservatory 1000 (Kind: ikNatLocal; Preq: adTactics; Cost: 100; Maint: 4; Expiration: 0), // imMilAcademy 1001 (Kind: ikNatLocal; Preq: adSteel; Cost: 200; Maint: 2; Expiration: 0), // imBunker 1002 (Kind: ikNatLocal; Preq: adSyntheticFood; Cost: 120; Maint: 2; Expiration: 0), // imAlgae 1003 (Kind: ikNatGlobal; Preq: adTheCorporation; Cost: 320; Maint: 4; Expiration: 0), // imStockEx 1004 (Kind: ikNatLocal; Preq: adSpaceFlight; Cost: 400; Maint: 0; Expiration: 0), // imSpacePort 1005 (Kind: ikShipPart; Preq: adTransstellarColonization; Cost: 240; Maint: 0; Expiration: 0), 1003 1006 // imShipComp 1004 (Kind: ikShipPart; Preq: adImpulseDrive; Cost: 600; Maint: 0 ), // imShipPow1005 (Kind: ikShipPart; Preq: adSelfContainedEnvironment; Cost: 800; Maint: 0 ));1007 (Kind: ikShipPart; Preq: adImpulseDrive; Cost: 600; Maint: 0; Expiration: 0), // imShipPow 1008 (Kind: ikShipPart; Preq: adSelfContainedEnvironment; Cost: 800; Maint: 0; Expiration: 0)); 1006 1009 // imShipHab 1007 1010 1008 1011 nImpReplacement = 5; 1009 ImpReplacement: 1010 array [0 .. nImpReplacement - 1] of record NewImp, OldImp: integer; 1012 ImpReplacement: array [0 .. nImpReplacement - 1] of record 1013 NewImp: Integer; 1014 OldImp: Integer; 1011 1015 end 1012 1016 = ((NewImp: imSewer; OldImp: imAqueduct), (NewImp: imCourt; OldImp: imTownHall), … … 1019 1023 spPow = 1; 1020 1024 spHab = 2; 1021 ShipNeed: 1022 array [0 .. nShipPart - 1] of integer = (6, 4, 2); 1023 ShipImpIndex: 1024 array [0 .. nShipPart - 1] of integer = (imShipComp, imShipPow, imShipHab); 1025 1026 GovPreq: 1027 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 } 1028 1029 (preNone, adMonarchy, adTheRepublic, adTheology, adCommunism, adDemocracy, 1029 1030 adInternet); 1030 1031 1031 AgePreq: 1032 array [1 .. 3] of integer = (adScience, adMassProduction, 1032 AgePreq: array [1 .. 3] of integer = (adScience, adMassProduction, 1033 1033 adTransstellarColonization); 1034 1034 1035 Terrain: 1036 array [0 .. 11] of record MoveCost, Defense, ClearTerrain, IrrEff, IrrClearWork, 1037 AfforestTerrain, MineEff, MineAfforestWork, TransTerrain, TransWork: integer; 1038 FoodRes, ProdRes, TradeRes: array [0 .. 2] of integer; 1039 Filler: 1040 array [0 .. 12] of integer; 1035 Terrain: array [0 .. 11] of record 1036 MoveCost: Integer; 1037 Defense: Integer; 1038 ClearTerrain: Integer; 1039 IrrEff: Integer; 1040 IrrClearWork: Integer; 1041 AfforestTerrain: Integer; 1042 MineEff: Integer; 1043 MineAfforestWork: Integer; 1044 TransTerrain: Integer; 1045 TransWork: Integer; 1046 FoodRes, ProdRes, TradeRes: array [0 .. 2] of Integer; 1047 Filler: array [0 .. 12] of Integer; 1041 1048 end 1042 1049 = ((MoveCost: 1; Defense: 4; ClearTerrain: - 1; IrrEff: 0; IrrClearWork: 0; 1043 1050 AfforestTerrain: - 1; MineEff: 0; MineAfforestWork: 0; TransTerrain: - 1; 1044 1051 TransWork: 0; FoodRes: (0, 0, 0); ProdRes: (0, 0, 0); 1045 TradeRes: (0, 0, 0) ), { Ocn }1052 TradeRes: (0, 0, 0); Filler: (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)), { Ocn } 1046 1053 (MoveCost: 1; Defense: 4; ClearTerrain: - 1; IrrEff: 0; IrrClearWork: 0; 1047 1054 AfforestTerrain: - 1; MineEff: 0; MineAfforestWork: 0; TransTerrain: - 1; 1048 1055 TransWork: 0; FoodRes: (1, 5, 1); ProdRes: (0, 0, 5); 1049 TradeRes: (3, 3, 3) ), { Sho }1056 TradeRes: (3, 3, 3); Filler: (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)), { Sho } 1050 1057 (MoveCost: 1; Defense: 4; ClearTerrain: - 1; IrrEff: 1; IrrClearWork: 600; 1051 1058 AfforestTerrain: fForest; MineEff: 0; MineAfforestWork: 1800; 1052 1059 TransTerrain: fHills; TransWork: 3000; FoodRes: (3, 2, 2); ProdRes: (0, 1, 0); 1053 TradeRes: (1, 1, 1) ), { Gra }1060 TradeRes: (1, 1, 1); Filler: (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)), { Gra } 1054 1061 (MoveCost: 1; Defense: 4; ClearTerrain: fGrass; IrrEff: 0; IrrClearWork: 1800; 1055 1062 AfforestTerrain: - 1; MineEff: 1; MineAfforestWork: 600; 1056 1063 TransTerrain: fPrairie; TransWork: 3000; FoodRes: (0, 3, 0); 1057 ProdRes: (1, 1, 4); TradeRes: (1, 1, 1) ), { Dst }1064 ProdRes: (1, 1, 4); TradeRes: (1, 1, 1); Filler: (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)), { Dst } 1058 1065 (MoveCost: 1; Defense: 4; ClearTerrain: - 1; IrrEff: 1; IrrClearWork: 600; 1059 1066 AfforestTerrain: fForest; MineEff: 0; MineAfforestWork: 2400; 1060 1067 TransTerrain: - 1; TransWork: 0; FoodRes: (1, 3, 1); ProdRes: (1, 1, 3); 1061 TradeRes: (1, 1, 1) ), { Pra }1068 TradeRes: (1, 1, 1); Filler: (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)), { Pra } 1062 1069 (MoveCost: 1; Defense: 4; ClearTerrain: - 1; IrrEff: 1; IrrClearWork: 600; 1063 1070 AfforestTerrain: - 1; MineEff: 0; MineAfforestWork: 0; TransTerrain: fGrass; 1064 1071 TransWork: 3000; FoodRes: (1, 1, 1); ProdRes: (0, 0, 4); 1065 TradeRes: (1, 6, 1) ), { Tun }1072 TradeRes: (1, 6, 1); Filler: (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)), { Tun } 1066 1073 (MoveCost: 2; Defense: 4; ClearTerrain: - 1; IrrEff: 0; IrrClearWork: 0; 1067 1074 AfforestTerrain: - 1; MineEff: 3; MineAfforestWork: 1800; TransTerrain: - 1; 1068 1075 TransWork: 0; FoodRes: (0, 3, 0); ProdRes: (1, 1, 0); 1069 TradeRes: (0, 4, 0) ), { Arc }1076 TradeRes: (0, 4, 0); Filler: (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)), { Arc } 1070 1077 (MoveCost: 2; Defense: 6; ClearTerrain: fGrass; IrrEff: 0; IrrClearWork: 2400; 1071 1078 AfforestTerrain: fForest; MineEff: 0; MineAfforestWork: 2400; 1072 1079 TransTerrain: fHills; TransWork: 3000; FoodRes: (1, 1, 1); ProdRes: (0, 4, 1); 1073 TradeRes: (1, 1, 5)), { Swa } 1074 (), { - } 1080 TradeRes: (1, 1, 5); Filler: (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)), { Swa } 1081 (MoveCost: 0; Defense: 0; ClearTerrain: 0; IrrEff: 0; 1082 IrrClearWork: 0; AfforestTerrain: 0; MineEff: 0; MineAfforestWork: 0; 1083 TransTerrain: 0; TransWork: 0; FoodRes: (0, 0, 0); ProdRes: (0, 0, 0); 1084 TradeRes: (0, 0, 0); Filler: (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)), { - } 1075 1085 (MoveCost: 2; Defense: 6; ClearTerrain: fPrairie; IrrEff: 0; 1076 1086 IrrClearWork: 600; AfforestTerrain: - 1; MineEff: 0; MineAfforestWork: 0; 1077 1087 TransTerrain: - 1; TransWork: 0; FoodRes: (1, 3, 1); ProdRes: (2, 2, 2); 1078 TradeRes: (1, 1, 4) ), { For }1088 TradeRes: (1, 1, 4); Filler: (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)), { For } 1079 1089 (MoveCost: 2; Defense: 8; ClearTerrain: - 1; IrrEff: 1; IrrClearWork: 600; 1080 1090 AfforestTerrain: - 1; MineEff: 3; MineAfforestWork: 1200; 1081 1091 TransTerrain: fGrass; TransWork: 6000; FoodRes: (1, 1, 1); ProdRes: (0, 0, 2); 1082 TradeRes: (0, 4, 0) ), { Hil }1092 TradeRes: (0, 4, 0); Filler: (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)), { Hil } 1083 1093 (MoveCost: 3; Defense: 12; ClearTerrain: - 1; IrrEff: 0; IrrClearWork: 0; 1084 1094 AfforestTerrain: - 1; MineEff: 2; MineAfforestWork: 1200; TransTerrain: - 1; 1085 1095 TransWork: 0; FoodRes: (0, 0, 0); ProdRes: (1, 4, 1); 1086 TradeRes: (0, 0, 7) )); { Mou }1096 TradeRes: (0, 0, 7); Filler: (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0))); { Mou } 1087 1097 1088 1098 // settler work required MP … … 1104 1114 nUpgrade = 15; 1105 1115 upgrade: 1106 array [0 .. nDomains - 1, 0 .. nUpgrade - 1] of record Preq, Strength, Trans, 1107 Cost: integer 1116 array [0 .. nDomains - 1, 0 .. nUpgrade - 1] of record 1117 Preq: Integer; 1118 Strength: Integer; 1119 Trans: Integer; 1120 Cost: integer; 1108 1121 end 1109 = (((Preq: adWarriorCode; Strength: 4; Trans: 0; 1110 Cost: 3), (Preq: adBronzeWorking; Strength: 2; Trans: 0; 1111 Cost: 4), (Preq: adIronWorking; Strength: 2; Trans: 0; 1112 Cost: 5), (Preq: adChivalry; Strength: 2; Trans: 0; 1113 Cost: 5), (Preq: adMonotheism; Strength: 3; Trans: 0; 1114 Cost: 7), (Preq: adGunpowder; Strength: 3; Trans: 0; 1115 Cost: 8), (Preq: adExplosives; Strength: 4; Trans: 0; 1116 Cost: 9), (Preq: adTactics; Strength: 5; Trans: 0; Cost: 10), (Preq: adRadio; 1117 Strength: 6; Trans: 0; Cost: 11), (Preq: adDemocracy; Strength: 6; Trans: 0; 1118 Cost: 5), (Preq: adMobileWarfare; Strength: 7; Trans: 0; 1119 Cost: 12), (Preq: adRobotics; Strength: 8; Trans: 0; 1120 Cost: 15), (Preq: adComposites; Strength: 8; Trans: 0; 1121 Cost: 15), (Preq: adTheLaser; Strength: 8; Trans: 0; 1122 Cost: 14), (Preq: futMaterialTechnology; Strength: 10; Trans: 0; Cost: 2)), 1123 ((Preq: adMapMaking; Strength: 4; Trans: 1; Cost: 8), (Preq: adNavigation; 1124 Strength: 4; Trans: 0; Cost: 10), (Preq: adEngineering; Strength: 0; Trans: 1; 1125 Cost: 8), (Preq: adGunpowder; Strength: 8; Trans: 0; 1126 Cost: 12), (Preq: adMagnetism; Strength: 12; Trans: 1; 1127 Cost: 20), (Preq: adExplosives; Strength: 16; Trans: 0; 1128 Cost: 24), (Preq: adSteamEngine; Strength: 24; Trans: 0; 1129 Cost: 28), (Preq: adAmphibiousWarfare; Strength: 24; Trans: 1; 1130 Cost: 18), (Preq: adAdvancedRocketry; Strength: 32; Trans: 0; 1131 Cost: 38), (Preq: futMaterialTechnology; Strength: 14; Trans: 0; 1132 Cost: 4), (Preq: futArtificialIntelligence; Strength: 14; Trans: 0; 1133 Cost: 4), (Preq: preNA), (Preq: preNA), (Preq: preNA), (Preq: preNA)), 1134 ((Preq: adFlight; Strength: 12; Trans: 1; Cost: 14), (Preq: adTactics; 1135 Strength: 6; Trans: 0; Cost: 17), (Preq: adElectronics; Strength: 6; Trans: 0; 1136 Cost: 20), (Preq: adMin; Strength: 8; Trans: 0; Cost: 24), 1137 (Preq: adComposites; Strength: 8; Trans: 0; Cost: 26), (Preq: adSmartWeapons; 1138 Strength: 11; Trans: 0; Cost: 32), (Preq: futArtificialIntelligence; 1139 Strength: 7; Trans: 0; Cost: 4), (Preq: preNA), (Preq: preNA), (Preq: preNA), 1140 (Preq: preNA), (Preq: preNA), (Preq: preNA), (Preq: preNA), (Preq: preNA))); 1122 = (((Preq: adWarriorCode; Strength: 4; Trans: 0; Cost: 3), 1123 (Preq: adBronzeWorking; Strength: 2; Trans: 0; Cost: 4), 1124 (Preq: adIronWorking; Strength: 2; Trans: 0; Cost: 5), 1125 (Preq: adChivalry; Strength: 2; Trans: 0; Cost: 5), 1126 (Preq: adMonotheism; Strength: 3; Trans: 0; Cost: 7), 1127 (Preq: adGunpowder; Strength: 3; Trans: 0; Cost: 8), 1128 (Preq: adExplosives; Strength: 4; Trans: 0; Cost: 9), 1129 (Preq: adTactics; Strength: 5; Trans: 0; Cost: 10), 1130 (Preq: adRadio; Strength: 6; Trans: 0; Cost: 11), 1131 (Preq: adDemocracy; Strength: 6; Trans: 0; Cost: 5), 1132 (Preq: adMobileWarfare; Strength: 7; Trans: 0; Cost: 12), 1133 (Preq: adRobotics; Strength: 8; Trans: 0; Cost: 15), 1134 (Preq: adComposites; Strength: 8; Trans: 0; Cost: 15), 1135 (Preq: adTheLaser; Strength: 8; Trans: 0; Cost: 14), 1136 (Preq: futMaterialTechnology; Strength: 10; Trans: 0; Cost: 2)), 1137 ((Preq: adMapMaking; Strength: 4; Trans: 1; Cost: 8), 1138 (Preq: adNavigation; Strength: 4; Trans: 0; Cost: 10), 1139 (Preq: adEngineering; Strength: 0; Trans: 1; Cost: 8), 1140 (Preq: adGunpowder; Strength: 8; Trans: 0; Cost: 12), 1141 (Preq: adMagnetism; Strength: 12; Trans: 1; Cost: 20), 1142 (Preq: adExplosives; Strength: 16; Trans: 0; Cost: 24), 1143 (Preq: adSteamEngine; Strength: 24; Trans: 0; Cost: 28), 1144 (Preq: adAmphibiousWarfare; Strength: 24; Trans: 1; Cost: 18), 1145 (Preq: adAdvancedRocketry; Strength: 32; Trans: 0; Cost: 38), 1146 (Preq: futMaterialTechnology; Strength: 14; Trans: 0; Cost: 4), 1147 (Preq: futArtificialIntelligence; Strength: 14; Trans: 0; Cost: 4), 1148 (Preq: preNA; Strength: 0; Trans: 0; Cost: 0), 1149 (Preq: preNA; Strength: 0; Trans: 0; Cost: 0), 1150 (Preq: preNA; Strength: 0; Trans: 0; Cost: 0), 1151 (Preq: preNA; Strength: 0; Trans: 0; Cost: 0)), 1152 ((Preq: adFlight; Strength: 12; Trans: 1; Cost: 14), 1153 (Preq: adTactics; Strength: 6; Trans: 0; Cost: 17), 1154 (Preq: adElectronics; Strength: 6; Trans: 0; Cost: 20), 1155 (Preq: adMin; Strength: 8; Trans: 0; Cost: 24), 1156 (Preq: adComposites; Strength: 8; Trans: 0; Cost: 26), 1157 (Preq: adSmartWeapons; Strength: 11; Trans: 0; Cost: 32), 1158 (Preq: futArtificialIntelligence; Strength: 7; Trans: 0; Cost: 4), 1159 (Preq: preNA; Strength: 0; Trans: 0; Cost: 0), 1160 (Preq: preNA; Strength: 0; Trans: 0; Cost: 0), 1161 (Preq: preNA; Strength: 0; Trans: 0; Cost: 0), 1162 (Preq: preNA; Strength: 0; Trans: 0; Cost: 0), 1163 (Preq: preNA; Strength: 0; Trans: 0; Cost: 0), 1164 (Preq: preNA; Strength: 0; Trans: 0; Cost: 0), 1165 (Preq: preNA; Strength: 0; Trans: 0; Cost: 0), 1166 (Preq: preNA; Strength: 0; Trans: 0; Cost: 0))); 1141 1167 1142 1168 { model features } -
trunk/ScreenTools.pas
r38 r39 238 238 {$ENDIF} 239 239 begin 240 Result := False; 240 241 {$IFNDEF DEBUG} 241 242 if (Sounds = nil) or (SoundMode = smOff) or (Item = '') then … … 386 387 procedure ApplyGamma(Start, Stop: pbyte); 387 388 begin 388 while integer(Start) < integer(Stop)do389 while Start < Stop do 389 390 begin 390 391 Start^ := GammaLUT[Start^]; … … 444 445 FirstLine := bmp.ScanLine[0]; 445 446 LastLine := bmp.ScanLine[bmp.Height - 1]; 446 if integer(FirstLine) < integer(LastLine)then447 if FirstLine < LastLine then 447 448 ApplyGamma(pointer(FirstLine), @LastLine[bmp.Width]) 448 449 else … … 504 505 FirstLine := bmp.ScanLine[0]; 505 506 LastLine := bmp.ScanLine[bmp.Height - 1]; 506 if integer(FirstLine) < integer(LastLine)then507 ApplyGamma( pointer(FirstLine), @LastLine[bmp.Width])507 if FirstLine < LastLine then 508 ApplyGamma(Pointer(FirstLine), @LastLine[bmp.Width]) 508 509 else 509 ApplyGamma( pointer(LastLine), @FirstLine[bmp.Width]);510 ApplyGamma(Pointer(LastLine), @FirstLine[bmp.Width]); 510 511 bmp.EndUpdate; 511 512 end … … 649 650 650 651 dst.BeginUpdate; 652 Src.BeginUpdate; 651 653 h := yDst + h; 652 654 while yDst < h do 653 655 begin 654 PixelDst := pointer(integer(dst.ScanLine[yDst]) + 3 * xDst);655 PixelSrc := pointer(integer(Src.ScanLine[ySrc]) + xSrc);656 PixelDst := dst.ScanLine[yDst] + 3 * xDst; 657 PixelSrc := Src.ScanLine[ySrc] + xSrc; 656 658 for i := 0 to w - 1 do 657 659 begin … … 672 674 else 673 675 PixelDst[0] := test; // Blue 674 PixelDst := pointer(integer(PixelDst) + 3);675 PixelSrc := pointer(integer(PixelSrc) + 1);676 PixelDst := Pointer(PixelDst) + 3; 677 PixelSrc := Pointer(PixelSrc) + 1; 676 678 end; 677 679 inc(yDst); 678 680 inc(ySrc); 679 681 end; 682 src.EndUpdate; 680 683 dst.EndUpdate; 681 684 end; … … 763 766 while y < h do 764 767 begin 765 Pixel := pointer( integer(bmp.ScanLine[y]) + 3 * x);768 Pixel := pointer(bmp.ScanLine[y]) + 3 * x; 766 769 for i := 0 to w - 1 do 767 770 begin … … 776 779 Pixel[1] := Green; 777 780 Pixel[2] := Red; 778 Pixel := pointer( integer(Pixel) + 3);781 Pixel := pointer(Pixel) + 3; 779 782 end; 780 783 inc(y); -
trunk/Switches.inc
r38 r39 10 10 {$TYPEINFO OFF} 11 11 {$DEBUGINFO ON} 12 {$LOCALSYMBOLS ON}12 //{$LOCALSYMBOLS ON} 13 13 14 {$E-,S-,Z1} 14 //{$E-} 15 {$S-} 16 {$Z1} 15 17 16 18 {$IFDEF FPC} // freepascal
Note:
See TracChangeset
for help on using the changeset viewer.