Changeset 709
- Timestamp:
- Aug 21, 2025, 11:37:30 PM (3 hours ago)
- Location:
- trunk/LocalPlayer
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LocalPlayer/Battle.pas
r622 r709 66 66 MaxBar := 65; 67 67 68 // TerrType :=MyMap[ToLoc] and fTerrain;68 // TerrType := MyMap[ToLoc] and fTerrain; 69 69 GetUnitInfo(ToLoc, euix, UnitInfo); 70 70 … … 171 171 UnshareBitmap(Buffer); 172 172 BitBltCanvas(Buffer.Canvas, 0, 0, 66, 48, ca, xm + 8 + 4, ym - 8 - 12 - 48); 173 { if TerrType <fForest then174 Sprite(Buffer, HGrTerrain,0,16,66,32,1+TerrType*(xxt*2+1),1+yyt)173 { if TerrType < fForest then 174 Sprite(Buffer, HGrTerrain, 0, 16, 66, 32, 1 + TerrType * (xxt * 2 + 1), 1 + yyt) 175 175 else 176 176 begin 177 Sprite(Buffer,HGrTerrain,0,16,66,32,1+2*(xxt*2+1),1+yyt+2*(yyt*3+1));178 if (TerrType=fForest) and IsJungle(ToLoc div G.lx) then179 Sprite(Buffer,HGrTerrain,0,16,66,32,1+7*(xxt*2+1),1+yyt+19*(yyt*3+1))180 else Sprite(Buffer,HGrTerrain,0,16,66,32,1+7*(xxt*2+1),1+yyt+2*(2+TerrType-fForest)*(yyt*3+1));177 Sprite(Buffer, HGrTerrain, 0, 16, 66, 32, 1 + 2 * (xxt * 2 + 1), 1 + yyt + 2 * (yyt * 3 + 1)); 178 if (TerrType = fForest) and IsJungle(ToLoc div G.lx) then 179 Sprite(Buffer, HGrTerrain, 0, 16, 66, 32, 1 + 7 * (xxt * 2 + 1), 1+ yyt + 19 * (yyt * 3 + 1)) 180 else Sprite(Buffer, HGrTerrain, 0, 16, 66, 32, 1 + 7 * (xxt * 2 + 1), 1 + yyt + 2 * (2 + TerrType - fForest) * (yyt * 3 + 1)); 181 181 end; } 182 182 IsoMap.PaintUnit(1, 0, UnitInfo, 0); … … 201 201 procedure TBattleDlg.FormShow(Sender: TObject); 202 202 begin 203 if IsSuicideQuery then 204 begin 205 ClientWidth := 300; 206 ClientHeight := 288; 203 if IsSuicideQuery then begin 204 BoundsRect := Bounds(0, 0, 300, 288); 207 205 OKBtn.Visible := True; 208 206 CancelBtn.Visible := True; 209 207 CenterToScreen; 210 end 211 else 212 begin 213 ClientWidth := 178; 214 ClientHeight := 178; 208 end else begin 209 BoundsRect := Bounds(0, 0, 178, 178); 215 210 OKBtn.Visible := False; 216 211 CancelBtn.Visible := False; … … 226 221 begin 227 222 Brush.Color := 0; 228 FillRect(Rect(0, 0, ClientWidth, ClientHeight));223 FillRect(Rect(0, 0, Width, Height)); 229 224 Brush.Style := TBrushStyle.bsClear; 230 225 PaintBackground(Canvas, 3 + Border, 3 + Border, 231 ClientWidth - (6 + 2 * Border), ClientHeight - (6 + 2 * Border),232 ClientWidth, ClientHeight);233 end; 234 Frame(Canvas, Border + 1, Border + 1, ClientWidth - (2 + Border),235 ClientHeight - (2 + Border), MainTexture.ColorBevelLight,226 Width - (6 + 2 * Border), Height - (6 + 2 * Border), 227 Width, Height); 228 end; 229 Frame(Canvas, Border + 1, Border + 1, Width - (2 + Border), 230 Height - (2 + Border), MainTexture.ColorBevelLight, 236 231 MainTexture.ColorBevelShade); 237 Frame(Canvas, 2 + Border, 2 + Border, ClientWidth - (3 + Border),238 ClientHeight - (3 + Border), MainTexture.ColorBevelLight,232 Frame(Canvas, 2 + Border, 2 + Border, Width - (3 + Border), 233 Height - (3 + Border), MainTexture.ColorBevelLight, 239 234 MainTexture.ColorBevelShade); 240 235 … … 243 238 Canvas.Font.Assign(UniFont[ftCaption]); 244 239 S := Phrases.Lookup('TITLE_SUICIDE'); 245 RisedTextOut(Canvas, ( ClientWidth - BiColorTextWidth(Canvas, S)) div 2,240 RisedTextOut(Canvas, (Width - BiColorTextWidth(Canvas, S)) div 2, 246 241 7 + Border, S); 247 242 Canvas.Font.Assign(UniFont[ftNormal]); … … 249 244 P := Pos('\', S); 250 245 if P = 0 then 251 RisedTextOut(Canvas, (ClientWidth - BiColorTextWidth(Canvas, S)) 252 div 2, 205, S) 246 RisedTextOut(Canvas, (Width - BiColorTextWidth(Canvas, S)) div 2, 205, S) 253 247 else 254 248 begin 255 249 s1 := Copy(S, 1, P - 1); 256 RisedTextOut(Canvas, ( ClientWidth - BiColorTextWidth(Canvas, s1)) div 2,250 RisedTextOut(Canvas, (Width - BiColorTextWidth(Canvas, s1)) div 2, 257 251 205 - MessageLineSpacing div 2, s1); 258 252 s1 := Copy(S, P + 1, 255); 259 RisedTextOut(Canvas, ( ClientWidth - BiColorTextWidth(Canvas, s1)) div 2,253 RisedTextOut(Canvas, (Width - BiColorTextWidth(Canvas, s1)) div 2, 260 254 205 + (MessageLineSpacing - MessageLineSpacing div 2), s1); 261 255 end; … … 263 257 end 264 258 else 265 ym := ClientHeight div 2;259 ym := Height div 2; 266 260 Canvas.Font.Assign(UniFont[ftSmall]); 267 PaintBattleOutcome(Canvas, ClientWidth div 2, ym, uix, ToLoc, Forecast);261 PaintBattleOutcome(Canvas, Width div 2, ym, uix, ToLoc, Forecast); 268 262 269 263 for cix := 0 to ControlCount - 1 do … … 293 287 Shift: TShiftState); 294 288 begin 289 if Key = VK_RETURN then OKBtnClick(Self) 290 else 295 291 if not IsSuicideQuery and (Key <> VK_SHIFT) then 296 292 begin -
trunk/LocalPlayer/Draft.pas
r684 r709 415 415 procedure TDraftDlg.SetDomain(D: Integer); 416 416 417 function Prio( fix: Integer): Integer;417 function Prio(Fix: Integer): Integer; 418 418 var 419 419 FeaturePreq: Integer; 420 420 begin 421 FeaturePreq := Feature[ fix].Preq;421 FeaturePreq := Feature[Fix].Preq; 422 422 Assert(FeaturePreq <> preNA); 423 if fix < mcFirstNonCap then424 Result := 10000 + fix423 if Fix < mcFirstNonCap then 424 Result := 10000 + Fix 425 425 else if FeaturePreq = preNone then 426 426 Result := 20000 … … 429 429 else 430 430 Result := 30000 + AdvValue[FeaturePreq]; 431 if not ( fix in AutoFeature) then431 if not (Fix in AutoFeature) then 432 432 Inc(Result, 90000); 433 433 end; … … 471 471 begin 472 472 Domain := dGround; 473 while (Domain < dAir) and ( upgrade[Domain, 0].Preq <> preNone) and474 (MyRO.Tech[ upgrade[Domain, 0].Preq] < tsApplicable) do473 while (Domain < dAir) and (Upgrade[Domain, 0].Preq <> preNone) and 474 (MyRO.Tech[Upgrade[Domain, 0].Preq] < tsApplicable) do 475 475 Inc(Domain); 476 476 … … 478 478 MaxLines := 0; 479 479 for D := 0 to nDomains - 1 do 480 if ( upgrade[D, 0].Preq = preNone) or481 (MyRO.Tech[ upgrade[D, 0].Preq] >= tsApplicable) then480 if (Upgrade[D, 0].Preq = preNone) or 481 (MyRO.Tech[Upgrade[D, 0].Preq] >= tsApplicable) then 482 482 begin 483 483 Count := 0; … … 519 519 begin 520 520 for D := 0 to nDomains - 1 do 521 if (D <> Domain) and (( upgrade[D, 0].Preq = preNone) or522 (MyRO.Tech[ upgrade[D, 0].Preq] >= tsApplicable)) and521 if (D <> Domain) and ((Upgrade[D, 0].Preq = preNone) or 522 (MyRO.Tech[Upgrade[D, 0].Preq] >= tsApplicable)) and 523 523 (X >= xDomain + D * DomainPitch) and 524 524 (X < xDomain + D * DomainPitch + 36) and (Y >= yDomain) and -
trunk/LocalPlayer/Term.pas
r704 r709 2928 2928 InitTurn(NewPlayer); 2929 2929 DipMem[Me].pContact := -1; 2930 (* if (Me =0) and (MyRO.Alive and (1 shl Me)=0)} then2930 (* if (Me = 0) and (MyRO.Alive and (1 shl Me) = 0)} then 2931 2931 begin 2932 if SimpleQuery(Phrases.Lookup('RESIGN')) =mrIgnore then2933 Server(sResign, Me,0,nil^)2934 else Server(sBreak, Me,0,nil^)2932 if SimpleQuery(Phrases.Lookup('RESIGN')) = mrIgnore then 2933 Server(sResign, Me, 0, nil^) 2934 else Server(sBreak, Me, 0, nil^) 2935 2935 end 2936 2936 else Play('TURNSTART'); *)
Note:
See TracChangeset
for help on using the changeset viewer.