Changeset 327 for trunk/LocalPlayer/IsoEngine.pas
- Timestamp:
- Mar 25, 2021, 2:09:42 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LocalPlayer/IsoEngine.pas
r326 r327 66 66 end; 67 67 68 const69 // options switched by buttons70 moPolitical = 0;71 moCityNames = 1;72 moGreatWall = 4;73 moGrid = 5;74 moBareTerrain = 6;75 76 // other options77 moEditMode = 16;78 moLocCodes = 17;79 80 68 var 81 69 NoMap: TIsoMap; 82 Options: Integer;70 MapOptions: TMapOptions; 83 71 pDebugMap: Integer; // -1 for off 84 72 … … 1004 992 begin 1005 993 BehindCityInfo.Loc := Loc - 2 * G.lx; 1006 if ShowCityNames and (Options and (1 shl moEditMode) = 0) and994 if ShowCityNames and not (moEditMode in MapOptions) and 1007 995 (BehindCityInfo.Loc >= 0) and (BehindCityInfo.Loc < G.lx * G.ly) and 1008 996 (MyMap[BehindCityInfo.Loc] and fCity <> 0) then … … 1025 1013 procedure ShowSpacePort; 1026 1014 begin 1027 if ShowObjects and (Options and (1 shl moEditMode) = 0) and1015 if ShowObjects and not (moEditMode in MapOptions) and 1028 1016 (Tile and fCity <> 0) and (CityInfo.Flags and ciSpacePort <> 0) then 1029 1017 TSprite(x + xxt, y - 6, spSpacePort); … … 1093 1081 else 1094 1082 Tile := MyMap[Loc]; 1095 if ShowObjects and (Options and (1 shl moEditMode) = 0) and1083 if ShowObjects and not (moEditMode in MapOptions) and 1096 1084 (Tile and fCity <> 0) then 1097 1085 GetCityInfo(Loc, cix, CityInfo); … … 1148 1136 TSprite(x, y, spMinerals + (Tile shr 25 and 3) * TerrainIconCols); 1149 1137 1150 if Options and (1 shl moEditMode) <> 0then1138 if moEditMode in MapOptions then 1151 1139 fog := (Loc < 0) or (Loc >= G.lx * G.ly) 1152 1140 // else if CityLoc>=0 then … … 1182 1170 end; 1183 1171 {$ENDIF} 1184 if Options and (1 shl moEditMode) <> 0then1172 if moEditMode in MapOptions then 1185 1173 begin 1186 1174 if Tile and fPrefStartPos <> 0 then … … 1427 1415 begin 1428 1416 FoW := true; 1429 ShowLoc := Options and (1 shl moLocCodes) <> 0;1417 ShowLoc := moLocCodes in MapOptions; 1430 1418 ShowDebug := pDebugMap >= 0; 1431 ShowObjects := (CityOwner >= 0) or (Options and (1 shl moBareTerrain) = 0);1419 ShowObjects := (CityOwner >= 0) or not (moBareTerrain in MapOptions); 1432 1420 ShowCityNames := ShowObjects and (CityOwner < 0) and 1433 ( Options and (1 shl moCityNames) <> 0);1421 (moCityNames in MapOptions); 1434 1422 ShowBorder := true; 1435 1423 ShowMyBorder := CityOwner < 0; 1436 ShowGrWall := (CityOwner < 0) and ( Options and (1 shl moGreatWall) <> 0);1424 ShowGrWall := (CityOwner < 0) and (moGreatWall in MapOptions); 1437 1425 if ShowDebug then 1438 1426 Server(sGetDebugMap, me, pDebugMap, DebugMap) … … 1622 1610 else 1623 1611 begin 1624 if ShowLoc or ( Options and (1 shl moEditMode) <> 0) or1625 ( Options and (1 shl moGrid) <> 0) then1612 if ShowLoc or (moEditMode in MapOptions) or 1613 (moGrid in MapOptions) then 1626 1614 PaintGrid(x, y, nx, ny); 1627 1615 for dy := -2 to ny + 1 do
Note:
See TracChangeset
for help on using the changeset viewer.