Changeset 717 for branches/zoom/LocalPlayer
- Timestamp:
- Jan 10, 2026, 12:15:35 PM (4 weeks ago)
- Location:
- branches/zoom
- Files:
-
- 15 edited
-
. (modified) (1 prop)
-
LocalPlayer/Battle.lfm (modified) (1 prop) ( previous)
-
LocalPlayer/Battle.pas (modified) (8 diffs)
-
LocalPlayer/CityScreen.pas (modified) (1 diff)
-
LocalPlayer/Draft.pas (modified) (6 diffs)
-
LocalPlayer/Help.pas (modified) (1 diff)
-
LocalPlayer/IsoEngine.pas (modified) (2 diffs)
-
LocalPlayer/MessgEx.pas (modified) (1 diff)
-
LocalPlayer/NatStat.pas (modified) (1 diff)
-
LocalPlayer/Nego.lfm (modified) (1 prop) ( previous)
-
LocalPlayer/Select.pas (modified) (1 diff)
-
LocalPlayer/TechTree.pas (modified) (1 diff)
-
LocalPlayer/Term.pas (modified) (5 diffs)
-
LocalPlayer/Tribes.pas (modified) (5 diffs)
-
LocalPlayer/UnitStat.pas (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/zoom
-
branches/zoom/LocalPlayer/Battle.lfm
- Property svn:mime-type deleted
-
branches/zoom/LocalPlayer/Battle.pas
r622 r717 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 -
branches/zoom/LocalPlayer/CityScreen.pas
r662 r717 231 231 Template := TBitmap.Create; 232 232 Template.PixelFormat := TPixelFormat.pf24bit; 233 LoadGraphicFile(Template, GetGraphicsDir + DirectorySeparator + 'City .png',233 LoadGraphicFile(Template, GetGraphicsDir + DirectorySeparator + 'City' + PngExt, 234 234 [gfNoGamma]); 235 235 CityMapTemplate := TBitmap.Create; 236 236 CityMapTemplate.PixelFormat := TPixelFormat.pf24bit; 237 LoadGraphicFile(CityMapTemplate, GetGraphicsDir + DirectorySeparator + 'BigCityMap .png',237 LoadGraphicFile(CityMapTemplate, GetGraphicsDir + DirectorySeparator + 'BigCityMap' + PngExt, 238 238 [gfNoGamma]); 239 239 SmallCityMapTemplate := TBitmap.Create; 240 240 SmallCityMapTemplate.PixelFormat := TPixelFormat.pf24bit; 241 LoadGraphicFile(SmallCityMapTemplate, GetGraphicsDir + DirectorySeparator + 'SmallCityMap .png',241 LoadGraphicFile(SmallCityMapTemplate, GetGraphicsDir + DirectorySeparator + 'SmallCityMap' + PngExt, 242 242 [gfNoGamma]); 243 243 SmallCityMap := TBitmap.Create; -
branches/zoom/LocalPlayer/Draft.pas
r684 r717 95 95 Template := TBitmap.Create; 96 96 Template.PixelFormat := TPixelFormat.pf24bit; 97 LoadGraphicFile(Template, GetGraphicsDir + DirectorySeparator + 'MiliRes .png',97 LoadGraphicFile(Template, GetGraphicsDir + DirectorySeparator + 'MiliRes' + PngExt, 98 98 [gfNoGamma]); 99 99 end; … … 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 -
branches/zoom/LocalPlayer/Help.pas
r684 r717 1071 1071 until (P > Length(S)) or (S[P] = '\'); 1072 1072 if LoadGraphicFile(ExtPic, LocalizedFilePath('Help' + 1073 DirectorySeparator + Copy(S, 2, P - 2) + '.png')) then1073 DirectorySeparator + Copy(S, 2, P - 2) + PngExt)) then 1074 1074 begin 1075 1075 MainText.AddLine('', pkExternal); -
branches/zoom/LocalPlayer/IsoEngine.pas
r608 r717 337 337 IsoMapCache[ATileSize] := TIsoMapCache.Create; 338 338 339 FileName := Format('Terrain%dx%d .png', [xxt * 2, yyt * 2]);339 FileName := Format('Terrain%dx%d' + PngExt, [xxt * 2, yyt * 2]); 340 340 IsoMapCache[ATileSize].HGrTerrain := LoadGraphicSet(FileName); 341 341 if not Assigned(IsoMapCache[ATileSize].HGrTerrain) then … … 343 343 344 344 345 FileName := Format('Cities%dx%d .png', [xxt * 2, yyt * 2]);345 FileName := Format('Cities%dx%d' + PngExt, [xxt * 2, yyt * 2]); 346 346 IsoMapCache[ATileSize].HGrCities := LoadGraphicSet(FileName); 347 347 if not Assigned(IsoMapCache[ATileSize].HGrCities) then -
branches/zoom/LocalPlayer/MessgEx.pas
r622 r717 77 77 CenterTo := 0; 78 78 OpenSound := ''; 79 EInput.AutoSelect := False; 79 80 end; 80 81 -
branches/zoom/LocalPlayer/NatStat.pas
r549 r717 93 93 Template := TBitmap.Create; 94 94 Template.PixelFormat := TPixelFormat.pf24bit; 95 LoadGraphicFile(Template, GetGraphicsDir + DirectorySeparator + 'Nation .png',95 LoadGraphicFile(Template, GetGraphicsDir + DirectorySeparator + 'Nation' + PngExt, 96 96 [gfNoGamma]); 97 97 end; -
branches/zoom/LocalPlayer/Nego.lfm
- Property svn:mime-type deleted
-
branches/zoom/LocalPlayer/Select.pas
r693 r717 1055 1055 kEnemyModels: 1056 1056 MainScreen.UnitStatDlg.ShowNewContent_EnemyModel(wmPersistent, 1057 Layers[laImprovements].Lines[ScrollBar.Position + Selected]. Code);1057 Layers[laImprovements].Lines[ScrollBar.Position + Selected].Model); 1058 1058 kAllEnemyModels, kChooseEnemyModel: 1059 1059 if lix <> mixAll then -
branches/zoom/LocalPlayer/TechTree.pas
r684 r717 178 178 Image := TBitmap.Create; 179 179 Image.PixelFormat := TPixelFormat.pf24bit; 180 LoadGraphicFile(Image, GetAppSharePath('Help' + DirectorySeparator + 'AdvTree .png'),180 LoadGraphicFile(Image, GetAppSharePath('Help' + DirectorySeparator + 'AdvTree' + PngExt), 181 181 [gfNoGamma]); 182 182 -
branches/zoom/LocalPlayer/Term.pas
r704 r717 803 803 Picture.pix := pixNoSlaves; 804 804 Picture.Hash := 0; 805 Picture.GrName := 'StdUnits .png';805 Picture.GrName := 'StdUnits'; 806 806 IsNew := True; 807 807 end … … 1407 1407 if AILogo[P] = nil then 1408 1408 AILogo[P] := TBitmap.Create; 1409 if not LoadGraphicFile(AILogo[P], GetAppSharePath(Name + '.png'), [gfNoError]) then1409 if not LoadGraphicFile(AILogo[P], GetAppSharePath(Name + PngExt), [gfNoError]) then 1410 1410 begin 1411 1411 FreeAndNil(AILogo[P]); … … 1766 1766 MainMap.SetOutput(Offscreen); 1767 1767 1768 HGrStdUnits := LoadGraphicSet('StdUnits .png');1768 HGrStdUnits := LoadGraphicSet('StdUnits' + PngExt); 1769 1769 SmallImp := TBitmap.Create; 1770 1770 SmallImp.PixelFormat := TPixelFormat.pf24bit; … … 1919 1919 pix := pixNoSlaves; 1920 1920 Hash := 0; 1921 GrName := 'StdUnits .png';1921 GrName := 'StdUnits'; 1922 1922 Tribe[p1].SetModelPicture(Picture, True); 1923 1923 end; … … 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'); *) -
branches/zoom/LocalPlayer/Tribes.pas
r661 r717 322 322 Item := Get; 323 323 sympix := GetNum; 324 symHGr := LoadGraphicSet(Item + '.png');324 symHGr := LoadGraphicSet(Item + PngExt); 325 325 end; 326 326 end; … … 442 442 end; 443 443 end; 444 cHGr := LoadGraphicSet(Item + '.png');444 cHGr := LoadGraphicSet(Item + PngExt); 445 445 for X := 0 to 3 do 446 446 with CityPicture[X] do begin … … 461 461 else 462 462 begin 463 faceHGr := LoadGraphicSet(Item + '.png');463 faceHGr := LoadGraphicSet(Item + PngExt); 464 464 facepix := GetNum; 465 465 if faceHGr.Data.Canvas.Pixels[facepix mod 10 * 65, … … 610 610 LeastUsed := MaxInt; 611 611 612 TestPic.GrName := 'StdUnits .png';612 TestPic.GrName := 'StdUnits'; 613 613 HGr := HGrStdUnits; 614 614 for I := 0 to StdUnitScript.Count - 1 do … … 625 625 begin 626 626 Ok := True; 627 TestPic.GrName := Copy(Input, 8, 255) + '.png';627 TestPic.GrName := Copy(Input, 8, 255); 628 628 HGr := GrExt.SearchByName(TestPic.GrName); 629 629 end -
branches/zoom/LocalPlayer/UnitStat.pas
r622 r717 86 86 Template := TBitmap.Create; 87 87 Template.PixelFormat := TPixelFormat.pf24bit; 88 LoadGraphicFile(Template, GetGraphicsDir + DirectorySeparator + 'Unit .png',88 LoadGraphicFile(Template, GetGraphicsDir + DirectorySeparator + 'Unit' + PngExt, 89 89 [gfNoGamma]); 90 90 end;
Note:
See TracChangeset
for help on using the changeset viewer.
