Changeset 319 for trunk/LocalPlayer
- Timestamp:
- Mar 19, 2021, 3:31:53 PM (4 years ago)
- Location:
- trunk/LocalPlayer
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LocalPlayer/Term.pas
r318 r319 1362 1362 need := false; 1363 1363 for i := 0 to 27 do 1364 if MyRO.Wonder[i].CityID <> -1then1364 if MyRO.Wonder[i].CityID <> WonderNotBuiltYet then 1365 1365 need := true; 1366 1366 if need then … … 2024 2024 if MyRO.Wonder[i].CityID <> MyData.ToldWonders[i].CityID then 2025 2025 begin 2026 if MyRO.Wonder[i].CityID = -2then2026 if MyRO.Wonder[i].CityID = WonderDestroyed then 2027 2027 with MessgExDlg do 2028 2028 begin { tell about destroyed wonders } … … 2076 2076 end 2077 2077 else if (MyRO.Wonder[i].EffectiveOwner <> MyData.ToldWonders[i] 2078 .EffectiveOwner) and (MyRO.Wonder[i].CityID > -2) then2078 .EffectiveOwner) and (MyRO.Wonder[i].CityID > WonderDestroyed) then 2079 2079 if MyRO.Wonder[i].EffectiveOwner < 0 then 2080 2080 begin … … 5907 5907 begin // city destroyed 5908 5908 for i := 0 to 27 do { tell about destroyed wonders } 5909 if (MyRO.Wonder[i].CityID = -2) and (MyData.ToldWonders[i].CityID <> -2)5909 if (MyRO.Wonder[i].CityID = WonderDestroyed) and (MyData.ToldWonders[i].CityID <> WonderDestroyed) 5910 5910 then 5911 5911 with MessgExDlg do … … 7316 7316 mEUnitStat.Enabled := MyRO.nEnemyModel > 0; 7317 7317 { mWonders.Enabled:= false; 7318 for i:=0 to 27 do if MyRO.Wonder[i].CityID <>-1then7318 for i:=0 to 27 do if MyRO.Wonder[i].CityID <> WonderNotBuiltYet then 7319 7319 mWonders.Enabled:=true; } 7320 7320 mDiagram.Enabled := MyRO.Turn >= 2; -
trunk/LocalPlayer/Wonders.pas
r245 r319 100 100 ax: Integer; 101 101 R: Integer; 102 I: Integer;103 102 C: Integer; 104 103 Ch: Integer; … … 223 222 PaintBackgroundShape; 224 223 225 for I := 0 to 20 do 226 if Imp[I].Preq <> preNA then 227 begin 224 // Draw all bitmaps first 225 HaveWonder := False; 226 for I := 0 to 20 do begin 227 if Imp[I].Preq <> preNA then begin 228 228 case MyRO.Wonder[I].CityID of 229 - 1: // not built yet 230 begin 231 Fill(Offscreen.Canvas, Center.X - xSizeBig div 2 + RingPosition[I].X - 3, 232 Center.Y - ySizeBig div 2 + RingPosition[I].Y - 3, xSizeBig + 6, 233 ySizeBig + 6, (wMaintexture - ClientWidth) div 2, 234 (hMaintexture - ClientHeight) div 2); 235 DarkIcon(I); 236 end; 237 -2: // destroyed 238 begin 239 Glow(I, $000000); 240 end; 241 else 242 begin 243 if MyRO.Wonder[I].EffectiveOwner >= 0 then 244 Glow(I, Tribe[MyRO.Wonder[I].EffectiveOwner].Color) 245 else 246 Glow(I, $000000); 247 end; 248 end; 249 end; 250 251 HaveWonder := False; 252 for I := 0 to 20 do 253 if Imp[I].Preq <> preNA then 254 begin 255 case MyRO.Wonder[I].CityID of 256 -1: // not built yet 257 begin 258 Fill(Offscreen.Canvas, Center.X - xSizeBig div 2 + RingPosition[I].X - 3, 259 Center.Y - ySizeBig div 2 + RingPosition[I].Y - 3, xSizeBig + 6, 260 ySizeBig + 6, (wMaintexture - ClientWidth) div 2, 261 (hMaintexture - ClientHeight) div 2); 262 DarkIcon(I); 263 end; 264 -2: // destroyed 265 begin 266 HaveWonder := True; 267 BitBltCanvas(Offscreen.Canvas, 268 Center.X - xSizeBig div 2 + RingPosition[I].X, 269 Center.Y - ySizeBig div 2 + RingPosition[I].Y, xSizeBig, 270 ySizeBig, BigImp.Canvas, 0, (SystemIconLines + 3) * 271 ySizeBig); 272 end; 273 else 274 begin 229 WonderNotBuiltYet: begin 230 Fill(Offscreen.Canvas, Center.X - xSizeBig div 2 + RingPosition[I].X - 3, 231 Center.Y - ySizeBig div 2 + RingPosition[I].Y - 3, xSizeBig + 6, 232 ySizeBig + 6, (wMaintexture - ClientWidth) div 2, 233 (hMaintexture - ClientHeight) div 2); 234 end; 235 WonderDestroyed: begin 236 HaveWonder := True; 237 BitBltCanvas(Offscreen.Canvas, 238 Center.X - xSizeBig div 2 + RingPosition[I].X, 239 Center.Y - ySizeBig div 2 + RingPosition[I].Y, xSizeBig, 240 ySizeBig, BigImp.Canvas, 0, (SystemIconLines + 3) * 241 ySizeBig); 242 end; 243 else begin 275 244 HaveWonder := True; 276 245 BitBltCanvas(Offscreen.Canvas, … … 282 251 end; 283 252 end; 253 end; 254 255 // Do direct pixel postprocessing separately to avoid bitmap copying in memory 256 Offscreen.Canvas.FillRect(0, 0, 0, 0); 257 Offscreen.BeginUpdate; 258 for I := 0 to 20 do begin 259 if Imp[I].Preq <> preNA then begin 260 case MyRO.Wonder[I].CityID of 261 WonderNotBuiltYet: DarkIcon(I); 262 WonderDestroyed: Glow(I, $000000); 263 else begin 264 if MyRO.Wonder[I].EffectiveOwner >= 0 then 265 Glow(I, Tribe[MyRO.Wonder[I].EffectiveOwner].Color) 266 else Glow(I, $000000); 267 end; 268 end; 269 end; 270 end; 271 Offscreen.EndUpdate; 284 272 285 273 if not HaveWonder then … … 323 311 if Selection >= 0 then 324 312 begin 325 if MyRO.Wonder[Selection].CityID = -1then313 if MyRO.Wonder[Selection].CityID = WonderNotBuiltYet then 326 314 begin // not built yet 327 315 { S:=Phrases.Lookup('IMPROVEMENTS',Selection); … … 338 326 begin 339 327 S := Phrases.Lookup('IMPROVEMENTS', Selection); 340 if MyRO.Wonder[Selection].CityID <> -2then328 if MyRO.Wonder[Selection].CityID <> WonderDestroyed then 341 329 S := Format(Phrases.Lookup('WONDEROF'), 342 330 [S, CityName(MyRO.Wonder[Selection].CityID)]); … … 344 332 (ClientWidth - BiColorTextWidth(Canvas, S)) div 2, 345 333 ClientHeight - 3 - 36 - 10, S); 346 if MyRO.Wonder[Selection].CityID = -2then334 if MyRO.Wonder[Selection].CityID = WonderDestroyed then 347 335 S := Phrases.Lookup('DESTROYED') 348 336 else if MyRO.Wonder[Selection].EffectiveOwner < 0 then
Note:
See TracChangeset
for help on using the changeset viewer.