Changeset 352 for trunk/LocalPlayer
- Timestamp:
- Apr 6, 2021, 10:16:55 PM (4 years ago)
- Location:
- trunk/LocalPlayer
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LocalPlayer/Battle.pas
r350 r352 243 243 end; 244 244 Frame(Canvas, Border + 1, Border + 1, ClientWidth - (2 + Border), 245 ClientHeight - (2 + Border), MainTexture. clBevelLight,246 MainTexture. clBevelShade);245 ClientHeight - (2 + Border), MainTexture.ColorBevelLight, 246 MainTexture.ColorBevelShade); 247 247 Frame(Canvas, 2 + Border, 2 + Border, ClientWidth - (3 + Border), 248 ClientHeight - (3 + Border), MainTexture. clBevelLight,249 MainTexture. clBevelShade);248 ClientHeight - (3 + Border), MainTexture.ColorBevelLight, 249 MainTexture.ColorBevelShade); 250 250 251 251 if IsSuicideQuery then -
trunk/LocalPlayer/CityScreen.pas
r350 r352 82 82 ProdHint: Boolean; 83 83 AllowChange: Boolean; 84 RedTex: TTexture; 85 BarTex: TTexture; 84 86 procedure InitSmallCityMap; 85 87 procedure InitZoomCityMap; … … 197 199 begin 198 200 inherited; 201 RedTex := TTexture.Create; 202 BarTex := TTexture.Create; 199 203 AreaMap := TIsoMap.Create; 200 204 AreaMap.SetOutput(offscreen); … … 259 263 FreeAndNil(Template); 260 264 FreeAndNil(Back); 265 FreeAndNil(RedTex); 266 FreeAndNil(BarTex); 261 267 end; 262 268 … … 269 275 procedure TCityDlg.CheckAge; 270 276 begin 271 if MainTextureAge <> AgePrepared then 272 begin 273 AgePrepared := MainTextureAge; 277 if MainTexture.Age <> AgePrepared then begin 278 AgePrepared := MainTexture.Age; 274 279 275 280 UnshareBitmap(Back); … … 388 393 procedure FillBar(x, y, pos, Growth, max, Kind: integer; 389 394 IndicateComplete: boolean); 390 var 391 Tex: TTexture; 392 begin 393 Tex := MainTexture; 394 if Kind = 3 then 395 begin 396 Tex.clBevelLight := HGrSystem.Data.Canvas.Pixels[104, 36]; 397 Tex.clBevelShade := Tex.clBevelLight; 395 begin 396 BarTex.Assign(MainTexture); 397 if Kind = 3 then begin 398 BarTex.ColorBevelLight := HGrSystem.Data.Canvas.Pixels[104, 36]; 399 BarTex.ColorBevelShade := BarTex.ColorBevelLight; 398 400 end; 399 401 PaintRelativeProgressBar(offscreen.Canvas, Kind, x - 3, y, wBar - 4, pos, 400 Growth, max, IndicateComplete, Tex);402 Growth, max, IndicateComplete, BarTex); 401 403 end; 402 404 … … 492 494 UnitInfo: TUnitInfo; 493 495 UnitReport: TUnitReport; 494 RedTex: TTexture;495 496 IsCityAlive, CanGrow: boolean; 496 497 begin … … 524 525 Report.Working := c.Size; 525 526 526 RedTex := MainTexture;527 RedTex. clBevelLight := $0000FF;528 RedTex. clBevelShade := $000000;529 RedTex. clTextLight := $000000;530 RedTex. clTextShade := $0000FF;527 RedTex.Assign(MainTexture); 528 RedTex.ColorBevelLight := $0000FF; 529 RedTex.ColorBevelShade := $000000; 530 RedTex.ColorTextLight := $000000; 531 RedTex.ColorTextShade := $0000FF; 531 532 532 533 BitBltCanvas(offscreen.Canvas, 0, 0, 640, 480, Back.Canvas, 0, 0); … … 797 798 Frame(offscreen.Canvas, xSmallMap + 48 * (ZoomArea div 3), 798 799 ySmallMap + 24 * (ZoomArea mod 3), xSmallMap + 48 * (ZoomArea div 3) + 49, 799 ySmallMap + 24 * (ZoomArea mod 3) + 25, MainTexture. clMark,800 MainTexture. clMark);800 ySmallMap + 24 * (ZoomArea mod 3) + 25, MainTexture.ColorMark, 801 MainTexture.ColorMark); 801 802 Frame(offscreen.Canvas, xSmallMap - 1, ySmallMap - 1, xSmallMap + wSmallMap, 802 803 ySmallMap + hSmallMap, $B0B0B0, $FFFFFF); … … 812 813 if Mode = mSupp then 813 814 begin 814 offscreen.Canvas.brush.Color := MainTexture. clMark;815 offscreen.Canvas.brush.Color := MainTexture.ColorMark; 815 816 offscreen.Canvas.FillRect(Rect(x - 27, y - 6, x + 27, y + 6)); 816 817 offscreen.Canvas.brush.style := bsClear; -
trunk/LocalPlayer/CityType.pas
r350 r352 93 93 94 94 Frame(offscreen.Canvas, 0, yList + 32 * nListRow, InnerWidth - 255, 95 yPool - 23, MainTexture. clBevelLight, MainTexture.clBevelShade);95 yPool - 23, MainTexture.ColorBevelLight, MainTexture.ColorBevelShade); 96 96 Frame(offscreen.Canvas, InnerWidth - 254, yList + 32 * nListRow, 97 InnerWidth - 89, yPool - 23, MainTexture. clBevelLight,98 MainTexture. clBevelShade);97 InnerWidth - 89, yPool - 23, MainTexture.ColorBevelLight, 98 MainTexture.ColorBevelShade); 99 99 Frame(offscreen.Canvas, InnerWidth - 88, yList + 32 * nListRow, 100 InnerWidth - 1, yPool - 23, MainTexture. clBevelLight,101 MainTexture. clBevelShade);100 InnerWidth - 1, yPool - 23, MainTexture.ColorBevelLight, 101 MainTexture.ColorBevelShade); 102 102 Frame(offscreen.Canvas, 0, yPool - 22, InnerWidth - 1, yPool - 1, 103 MainTexture. clBevelLight, MainTexture.clBevelShade);103 MainTexture.ColorBevelLight, MainTexture.ColorBevelShade); 104 104 for i := 0 to nCityType - 1 do 105 105 begin 106 106 RFrame(offscreen.Canvas, xSwitch + i * 42, ySwitch, xSwitch + 39 + i * 42, 107 ySwitch + 23, MainTexture. clBevelShade, MainTexture.clBevelLight);107 ySwitch + 23, MainTexture.ColorBevelShade, MainTexture.ColorBevelLight); 108 108 if i = ctype then 109 109 Frame(offscreen.Canvas, xSwitch + 1 + i * 42, ySwitch + 1, 110 xSwitch + 38 + i * 42, ySwitch + 22, MainTexture. clBevelShade,111 MainTexture. clBevelLight)110 xSwitch + 38 + i * 42, ySwitch + 22, MainTexture.ColorBevelShade, 111 MainTexture.ColorBevelLight) 112 112 else 113 113 Frame(offscreen.Canvas, xSwitch + 1 + i * 42, ySwitch + 1, 114 xSwitch + 38 + i * 42, ySwitch + 22, MainTexture. clBevelLight,115 MainTexture. clBevelShade);114 xSwitch + 38 + i * 42, ySwitch + 22, MainTexture.ColorBevelLight, 115 MainTexture.ColorBevelShade); 116 116 BitBltCanvas(offscreen.Canvas, xSwitch + 2 + i * 42, ySwitch + 2, 117 117 xSizeSmall, ySizeSmall, SmallImp.Canvas, (i + 3) * xSizeSmall, 0); … … 130 130 for i := 1 to nListRow - 1 do 131 131 DLine(offscreen.Canvas, xList - 5, xList + 4 + 42 * nListCol, 132 yList - 1 + 32 * i, MainTexture. clBevelLight, MainTexture.clBevelShade);132 yList - 1 + 32 * i, MainTexture.ColorBevelLight, MainTexture.ColorBevelShade); 133 133 for i := 0 to nListCol * nListRow - 1 do 134 134 begin 135 135 s := IntToStr(i + 1); 136 Font.Color := MainTexture. clTextLight;136 Font.Color := MainTexture.ColorTextLight; 137 137 Textout(xList + 20 + i mod nListCol * 42 - TextWidth(s) div 2, 138 138 yList + 15 + i div nListCol * 32 - TextHeight(s) div 2, s); … … 147 147 xList + 21 + xSizeSmall div 2 + i mod nListCol * 42, 148 148 yList + 16 + ySizeSmall div 2 + i div nListCol * 32, 149 MainTexture. clBevelLight, MainTexture.clBevelShade);149 MainTexture.ColorBevelLight, MainTexture.ColorBevelShade); 150 150 BitBltCanvas(offscreen.Canvas, xList + 21 - xSizeSmall div 2 + 151 151 i mod nListCol * 42, yList + 16 - ySizeSmall div 2 + i div nListCol * 32, … … 169 169 nPool div nPoolCol * 32, xPool + 21 + xSizeSmall div 2 + 170 170 nPool mod nPoolCol * 42, yPool + 16 + ySizeSmall div 2 + 171 nPool div nPoolCol * 32, MainTexture. clBevelLight,172 MainTexture. clBevelShade);171 nPool div nPoolCol * 32, MainTexture.ColorBevelLight, 172 MainTexture.ColorBevelShade); 173 173 BitBltCanvas(offscreen.Canvas, xPool + 21 - xSizeSmall div 2 + 174 174 nPool mod nPoolCol * 42, yPool + 16 - ySizeSmall div 2 + -
trunk/LocalPlayer/ClientTools.pas
r328 r352 201 201 i: integer; 202 202 begin 203 if p = me then 204 begin 203 if p = me then begin 205 204 Result := 0; 206 205 for i := 1 to 3 do 207 206 if MyRO.Tech[AgePreq[i]] >= tsApplicable then 208 207 Result := i; 209 end 210 else 211 begin 208 end else begin 212 209 Result := 0; 213 210 for i := 1 to 3 do -
trunk/LocalPlayer/Diagram.pas
r350 r352 63 63 Canvas.Brush.Style := bsClear; 64 64 ScreenTools.Frame(canvas, Left - 1, Top - 1, Left + Width, Top + 200, 65 MainTexture. clBevelShade, MainTexture.clBevelLight);65 MainTexture.ColorBevelShade, MainTexture.ColorBevelLight); 66 66 RFrame(canvas, Left - 2, Top - 2, Left + Width + 1, Top + 200 + 1, 67 MainTexture. clBevelShade, MainTexture.clBevelLight);67 MainTexture.ColorBevelShade, MainTexture.ColorBevelLight); 68 68 69 69 // stars … … 163 163 begin 164 164 LoweredTextOut(offscreen.canvas, -1, MainTexture, x - 2, y, Cap); 165 DLine(offscreen.canvas, x - 2, x + 169, y + 16, MainTexture. clTextShade,166 MainTexture. clTextLight);165 DLine(offscreen.canvas, x - 2, x + 169, y + 16, MainTexture.ColorTextShade, 166 MainTexture.ColorTextLight); 167 167 if val0 > 0 then 168 168 s := Format(Phrases.Lookup('SHARE'), [val0, val1]) -
trunk/LocalPlayer/Draft.pas
r350 r352 183 183 Phrases.Lookup('UNITSPEED')); 184 184 DLine(offscreen.Canvas, xTotal - 2, xTotal + 174, y + 16, 185 MainTexture. clBevelShade, MainTexture.clBevelLight);185 MainTexture.ColorBevelShade, MainTexture.ColorBevelLight); 186 186 DLine(offscreen.Canvas, xTotal2 + 176, xTotal2 + 263, y + 16, 187 MainTexture. clBevelShade, MainTexture.clBevelLight);187 MainTexture.ColorBevelShade, MainTexture.ColorBevelLight); 188 188 s := MovementToString(MyRO.DevModel.Speed); 189 189 RisedTextOut(offscreen.Canvas, xTotal2 + 170 + 64 + 30 - … … 199 199 xTotal2 + 148 + 30, y, '='); 200 200 DLine(offscreen.Canvas, xTotal - 2, xTotal + 174, y + 16, 201 MainTexture. clBevelShade, MainTexture.clBevelLight);201 MainTexture.ColorBevelShade, MainTexture.ColorBevelLight); 202 202 DLine(offscreen.Canvas, xTotal2 + 176, xTotal2 + 263, y + 16, 203 MainTexture. clBevelShade, MainTexture.clBevelLight);203 MainTexture.ColorBevelShade, MainTexture.ColorBevelLight); 204 204 s := IntToStr(MyRO.DevModel.Cost); 205 205 RisedTextOut(offscreen.Canvas, xTotal2 + 170 + 64 + 30 - 12 - … … 216 216 xTotal2 + 148 + 30, y, '='); 217 217 DLine(offscreen.Canvas, xTotal - 2, xTotal + 174, y + 16, 218 MainTexture. clBevelShade, MainTexture.clBevelLight);218 MainTexture.ColorBevelShade, MainTexture.ColorBevelLight); 219 219 DLine(offscreen.Canvas, xTotal2 + 176, xTotal2 + 263, y + 16, 220 MainTexture. clBevelShade, MainTexture.clBevelLight);220 MainTexture.ColorBevelShade, MainTexture.ColorBevelLight); 221 221 s := IntToStr(MyRO.DevModel.Cost * BuildCostMod 222 222 [G.Difficulty[me]] div 12); … … 236 236 237 237 ClientHeight := Template.Height - Cut; 238 if ClientHeight > hMainTexturethen238 if ClientHeight > MainTexture.Height then 239 239 // assemble background from 2 texture tiles 240 240 begin 241 241 BitBltCanvas(Back.Canvas, 0, 0, ClientWidth, 64, 242 MainTexture.Image.Canvas, ( wMainTexture- ClientWidth) div 2,243 hMainTexture- 64);242 MainTexture.Image.Canvas, (MainTexture.Width - ClientWidth) div 2, 243 MainTexture.Height - 64); 244 244 BitBltCanvas(Back.Canvas, 0, 64, ClientWidth, ClientHeight - 64, 245 MainTexture.Image.Canvas, ( wMainTexture- ClientWidth) div 2,245 MainTexture.Image.Canvas, (MainTexture.Width - ClientWidth) div 2, 246 246 0); 247 247 end 248 248 else 249 249 BitBltCanvas(Back.Canvas, 0, 0, ClientWidth, ClientHeight, 250 MainTexture.Image.Canvas, ( wMainTexture- ClientWidth) div 2,251 ( hMainTexture- ClientHeight) div 2);250 MainTexture.Image.Canvas, (MainTexture.Width - ClientWidth) div 2, 251 (MainTexture.Height - ClientHeight) div 2); 252 252 ImageOp_B(Back, Template, 0, 0, 0, 0, Template.Width, 64); 253 253 ImageOp_B(Back, Template, 0, 64, 0, 64 + Cut, Template.Width, … … 320 320 RFrame(offscreen.Canvas, xFeature - (21 + 1), 321 321 yFeature + 2 + LinePitch * i - 1, xFeature - (21 - 24), 322 yFeature + 2 + LinePitch * i + 12, MainTexture. clBevelShade,323 MainTexture. clBevelLight);322 yFeature + 2 + LinePitch * i + 12, MainTexture.ColorBevelShade, 323 MainTexture.ColorBevelLight); 324 324 end 325 325 else … … 329 329 RFrame(offscreen.Canvas, xFeature - (9 + 1), 330 330 yFeature + 2 + LinePitch * i - 1, xFeature - (21 - 24), 331 yFeature + 2 + LinePitch * i + 12, MainTexture. clBevelShade,332 MainTexture. clBevelLight);331 yFeature + 2 + LinePitch * i + 12, MainTexture.ColorBevelShade, 332 MainTexture.ColorBevelLight); 333 333 end; 334 334 … … 362 362 363 363 if MyRO.DevModel.Cap[code[i]] > 0 then 364 TextColor := MainTexture. clLitText364 TextColor := MainTexture.ColorLitText 365 365 else 366 366 TextColor := -1; -
trunk/LocalPlayer/MessgEx.pas
r323 r352 357 357 if (IconKind = mikImp) and (IconIndex = 27) then 358 358 begin // "YOU WIN" message 359 clSaveTextLight := MainTexture. clTextLight;360 clSaveTextShade := MainTexture. clTextShade;361 MainTexture. clTextLight := $000000; // gold362 MainTexture. clTextShade := $0FDBFF;359 clSaveTextLight := MainTexture.ColorTextLight; 360 clSaveTextShade := MainTexture.ColorTextShade; 361 MainTexture.ColorTextLight := $000000; // gold 362 MainTexture.ColorTextShade := $0FDBFF; 363 363 inherited; 364 MainTexture. clTextLight := clSaveTextLight;365 MainTexture. clTextShade := clSaveTextShade;364 MainTexture.ColorTextLight := clSaveTextLight; 365 MainTexture.ColorTextShade := clSaveTextShade; 366 366 end 367 367 else … … 411 411 end; 412 412 mikBook: 413 PaintBook(Canvas, ClientWidth div 2, 24, MainTexture. clPage,414 MainTexture. clCover);413 PaintBook(Canvas, ClientWidth div 2, 24, MainTexture.ColorPage, 414 MainTexture.ColorCover); 415 415 mikTribe: 416 416 if Assigned(Tribe[IconIndex].faceHGr) then -
trunk/LocalPlayer/NatStat.pas
r350 r352 107 107 procedure TNatStatDlg.CheckAge; 108 108 begin 109 if MainTextureAge <> AgePrepared then 110 begin 111 AgePrepared := MainTextureAge; 109 if MainTexture.Age <> AgePrepared then begin 110 AgePrepared := MainTexture.Age; 112 111 BitBltCanvas(Back.Canvas, 0, 0, ClientWidth, ClientHeight, 113 MainTexture.Image.Canvas, ( wMainTexture- ClientWidth) div 2,114 ( hMainTexture- ClientHeight) div 2);112 MainTexture.Image.Canvas, (MainTexture.Width - ClientWidth) div 2, 113 (MainTexture.Height - ClientHeight) div 2); 115 114 ImageOp_B(Back, Template, 0, 0, 0, 0, ClientWidth, ClientHeight); 116 115 end; … … 358 357 with Canvas do 359 358 begin 360 Brush.Color := MainTexture. clBevelShade;359 Brush.Color := MainTexture.ColorBevelShade; 361 360 FillRect(Rect(xReport + wReport, yReport + PaperShade, 362 361 xReport + wReport + PaperShade, yReport + hReport + PaperShade)); -
trunk/LocalPlayer/Nego.pas
r350 r352 510 510 511 511 Fill(Offscreen.Canvas, 3, 3, ClientWidth - 6, ClientHeight - 6, 512 ( wMaintexture - ClientWidth) div 2, (hMaintexture- ClientHeight) div 2);512 (Maintexture.Width - ClientWidth) div 2, (Maintexture.Height - ClientHeight) div 2); 513 513 Frame(Offscreen.Canvas, 0, 0, ClientWidth - 1, ClientHeight - 1, 0, 0); 514 514 Frame(Offscreen.Canvas, 1, 1, ClientWidth - 2, ClientHeight - 2, 515 MainTexture. clBevelLight, MainTexture.clBevelShade);515 MainTexture.ColorBevelLight, MainTexture.ColorBevelShade); 516 516 Frame(Offscreen.Canvas, 2, 2, ClientWidth - 3, ClientHeight - 3, 517 MainTexture. clBevelLight, MainTexture.clBevelShade);517 MainTexture.ColorBevelLight, MainTexture.ColorBevelShade); 518 518 Corner(Offscreen.Canvas, 1, 1, 0, MainTexture); 519 519 Corner(Offscreen.Canvas, ClientWidth - 9, 1, 1, MainTexture); … … 565 565 with Offscreen.Canvas do 566 566 begin 567 Brush.Color := MainTexture. clBevelShade;567 Brush.Color := MainTexture.ColorBevelShade; 568 568 if History[me].Text[Page - 1] <> '' then 569 569 begin -
trunk/LocalPlayer/Rates.pas
r350 r352 56 56 57 57 Fill(Offscreen.Canvas, 0, 0, ClientWidth, ClientHeight, 58 ( wMaintexture - ClientWidth) div 2, (hMaintexture- ClientHeight) div 2);58 (Maintexture.Width - ClientWidth) div 2, (Maintexture.Height - ClientHeight) div 2); 59 59 Frame(Offscreen.Canvas, 0, 0, ClientWidth - 1, ClientHeight - 1, 0, 0); 60 60 Frame(Offscreen.Canvas, 1, 1, ClientWidth - 2, ClientHeight - 2, 61 MainTexture. clBevelLight, MainTexture.clBevelShade);61 MainTexture.ColorBevelLight, MainTexture.ColorBevelShade); 62 62 Frame(Offscreen.Canvas, 2, 2, ClientWidth - 3, ClientHeight - 3, 63 MainTexture. clBevelLight, MainTexture.clBevelShade);63 MainTexture.ColorBevelLight, MainTexture.ColorBevelShade); 64 64 65 65 BtnFrame(Offscreen.Canvas, CloseBtn.BoundsRect, MainTexture); … … 118 118 Frame(Offscreen.Canvas, x - 1, y - 1, x + max, y + 7, $000000, $000000); 119 119 RFrame(Offscreen.Canvas, x - 2, y - 2, x + max + 1, y + 8, 120 MainTexture. clBevelShade, MainTexture.clBevelLight);120 MainTexture.ColorBevelShade, MainTexture.ColorBevelLight); 121 121 with Offscreen.Canvas do 122 122 begin … … 138 138 MyRO.LuxRate * 120 div 100, 0, 120, MainTexture); 139 139 RFrame(Offscreen.Canvas, ScienceBtn.Left - 1, LuxBtn.Top - 1, 140 LuxBtn.Left + 12, LuxBtn.Top + 12, MainTexture. clBevelShade,141 MainTexture. clBevelLight);142 end; 143 144 DLine(Offscreen.Canvas, 1, ClientWidth - 2, 154, MainTexture. clBevelShade,145 MainTexture. clBevelLight);140 LuxBtn.Left + 12, LuxBtn.Top + 12, MainTexture.ColorBevelShade, 141 MainTexture.ColorBevelLight); 142 end; 143 144 DLine(Offscreen.Canvas, 1, ClientWidth - 2, 154, MainTexture.ColorBevelShade, 145 MainTexture.ColorBevelLight); 146 146 RisedTextOut(Offscreen.Canvas, 16 + 80, 164, Phrases.Lookup('TAXRATE')); 147 147 s := Format('%d%%', [MyRO.TaxRate]); … … 151 151 MyRO.TaxRate * 120 div 100, 0, 120, MainTexture); 152 152 RFrame(Offscreen.Canvas, TaxUpBtn.Left - 1, TaxUpBtn.Top - 1, 153 TaxUpBtn.Left + 12, TaxDownBtn.Top + 12, MainTexture. clBevelShade,154 MainTexture. clBevelLight);153 TaxUpBtn.Left + 12, TaxDownBtn.Top + 12, MainTexture.ColorBevelShade, 154 MainTexture.ColorBevelLight); 155 155 156 156 MarkUsedOffscreen(ClientWidth, ClientHeight); -
trunk/LocalPlayer/Select.pas
r350 r352 202 202 begin 203 203 Frame(offscreen.Canvas, x + (16 - 1), y + (16 - 2), x + (16 + xSizeSmall), 204 y + (16 - 1 + ySizeSmall), MainTexture. clBevelLight,205 MainTexture. clBevelShade);204 y + (16 - 1 + ySizeSmall), MainTexture.ColorBevelLight, 205 MainTexture.ColorBevelShade); 206 206 if pix and cpType = 0 then 207 207 if (pix and cpIndex = imPalace) and (MyRO.Government <> gAnarchy) then … … 231 231 if y + TextSize.cy >= TitleHeight + InnerHeight then 232 232 TextSize.cy := TitleHeight + InnerHeight - y; 233 Fill(ca, x, y, TextSize.cx, TextSize.cy, ( wMaintexture- ClientWidth)234 div 2, ( hMaintexture- ClientHeight) div 2);233 Fill(ca, x, y, TextSize.cx, TextSize.cy, (Maintexture.Width - ClientWidth) 234 div 2, (Maintexture.Height - ClientHeight) div 2); 235 235 end; 236 236 LoweredTextOut(ca, Color, MainTexture, x, y, s); … … 260 260 begin 261 261 x := x + SideFrame; 262 y := y + TitleHeight 262 y := y + TitleHeight; 263 263 end; 264 264 if lit then 265 TextColor := MainTexture. clLitText265 TextColor := MainTexture.ColorLitText 266 266 else 267 267 TextColor := -1; … … 434 434 end; 435 435 if lit then 436 TextColor := MainTexture. clLitText436 TextColor := MainTexture.ColorLitText 437 437 else 438 438 TextColor := -1; … … 556 556 begin 557 557 Frame(offscreen.Canvas, (8 + 16 - 1), y0 - 1, (8 + 16 + 36), 558 y0 + 20, MainTexture. clBevelLight, MainTexture.clBevelShade);558 y0 + 20, MainTexture.ColorBevelLight, MainTexture.ColorBevelShade); 559 559 Dump(offscreen, HGrSystem, (8 + 16), y0, 36, 20, 223, 295) 560 560 end … … 562 562 begin 563 563 Frame(offscreen.Canvas, (8 + 16 - 1), y0 - 1, (8 + 16 + 36), 564 y0 + 20, MainTexture. clBevelLight, MainTexture.clBevelShade);564 y0 + 20, MainTexture.ColorBevelLight, MainTexture.ColorBevelShade); 565 565 Dump(offscreen, HGrSystem, (8 + 16), y0, 36, 20, 260, 295) 566 566 end … … 568 568 begin 569 569 Frame(offscreen.Canvas, (8 + 16 - 1), y0 - 1, (8 + 16 + 36), 570 y0 + 20, MainTexture. clBevelLight, MainTexture.clBevelShade);570 y0 + 20, MainTexture.ColorBevelLight, MainTexture.ColorBevelShade); 571 571 Dump(offscreen, HGrSystem, (8 + 16), y0, 36, 20, 38, 295) 572 572 end … … 575 575 Frame(offscreen.Canvas, (8 + 16 - 1), y0 - 1, 576 576 (8 + 16 + xSizeSmall), y0 + ySizeSmall, 577 MainTexture. clBevelLight, MainTexture.clBevelShade);577 MainTexture.ColorBevelLight, MainTexture.ColorBevelShade); 578 578 if AdvIcon[lix] < 84 then 579 579 BitBltCanvas(offscreen.Canvas, (8 + 16), y0, xSizeSmall, … … 681 681 Frame(offscreen.Canvas, 8 + 16 - 1, y0 - 15 + (16 - 2), 682 682 8 + 16 + xSizeSmall, y0 - 15 + (16 - 1 + ySizeSmall), 683 MainTexture. clBevelLight, MainTexture.clBevelShade);683 MainTexture.ColorBevelLight, MainTexture.ColorBevelShade); 684 684 BitBltCanvas(offscreen.Canvas, 8 + 16, y0 - 15 + (16 - 1), 685 685 xSizeSmall, ySizeSmall, SmallImp.Canvas, … … 712 712 end; 713 713 if lit then 714 TextColor := MainTexture. clLitText714 TextColor := MainTexture.ColorLitText 715 715 else 716 716 TextColor := -1; … … 812 812 begin 813 813 Fill(Canvas, 9, ClientHeight - 29, ClientWidth - 18, 24, 814 ( wMaintexture- ClientWidth) div 2,815 ( hMaintexture- ClientHeight) div 2);814 (Maintexture.Width - ClientWidth) div 2, 815 (Maintexture.Height - ClientHeight) div 2); 816 816 if ScienceNation >= 0 then 817 817 begin … … 829 829 ScienceNationDot.Height, Canvas, xScreen - 10, ClientHeight - 27); 830 830 ImageOp_BCC(ScienceNationDotBuffer, Templates.Data, Point(0, 0), 831 ScienceNationDot.BoundsRect, MainTexture. clBevelShade, Tribe[ScienceNation].Color);831 ScienceNationDot.BoundsRect, MainTexture.ColorBevelShade, Tribe[ScienceNation].Color); 832 832 BitBltCanvas(Canvas, xScreen - 10, ClientHeight - 27, ScienceNationDot.Width, 833 833 ScienceNationDot.Height, ScienceNationDotBuffer.Canvas, 0, 0); … … 1532 1532 begin 1533 1533 LineDistance := 21; // looks ugly with scrollbar 1534 MaxLines := ( hMaintexture- (24 + TitleHeight + NarrowFrame))1534 MaxLines := (Maintexture.Height - (24 + TitleHeight + NarrowFrame)) 1535 1535 div LineDistance - 1; 1536 1536 end … … 1538 1538 begin 1539 1539 LineDistance := 24; 1540 MaxLines := ( hMaintexture- (24 + TitleHeight + WideFrame))1540 MaxLines := (Maintexture.Height - (24 + TitleHeight + WideFrame)) 1541 1541 div LineDistance - 1; 1542 1542 end; … … 1574 1574 ClientHeight := InnerHeight + TitleHeight + NarrowFrame; 1575 1575 end; 1576 assert(ClientHeight <= hMaintexture);1576 assert(ClientHeight <= Maintexture.Height); 1577 1577 1578 1578 TechNameSpace := 224; -
trunk/LocalPlayer/Term.pas
r346 r352 1691 1691 Controls[i].Visible := false; 1692 1692 me := -1; 1693 SetMainTextureByAge(-1);1693 MainTexture.Age := -1; 1694 1694 with Panel.Canvas do 1695 1695 begin … … 1728 1728 { if MyRO.Happened and phGameEnd<>0 then 1729 1729 begin 1730 Age :=3;1731 SetMainTextureByAge(-1);1730 Age := 3; 1731 MainTexture.Age := -1; 1732 1732 end 1733 1733 else } 1734 1734 begin 1735 1735 Age := GetAge(me); 1736 if SetMainTextureByAge(Age) then 1736 if MainTexture.Age <> Age then begin 1737 MainTexture.Age := Age; 1737 1738 EOT.Invalidate; // has visible background parts in its bounds 1739 end; 1738 1740 end; 1739 1741 // age:=MyRO.Turn mod 4; //!!! … … 1748 1750 begin 1749 1751 Age := 0; 1750 SetMainTextureByAge(-1);1752 MainTexture.Age := -1; 1751 1753 if ClientMode = cMovieTurn then 1752 1754 EOT.ButtonIndex := eotCancel … … 2538 2540 Age := 0; 2539 2541 if Command = cHelpOnly then 2540 SetMainTextureByAge(-1);2542 MainTexture.Age := -1; 2541 2543 Tribes.Init; 2542 2544 HelpDlg.UserLeft := (Screen.width - HelpDlg.width) div 2; … … 4265 4267 xMini + 2 + G.lx - MapWidth div (xxt * 2), yMini + 2, 4266 4268 xMini + 1 + G.lx + MapWidth div (xxt * 2), yMini + 2 + G.ly - 1, 4267 MainTexture. clMark, MainTexture.clMark)4269 MainTexture.ColorMark, MainTexture.ColorMark) 4268 4270 else 4269 4271 Frame(Panel.Canvas, 4270 4272 xMini + 2 + G.lx - MapWidth div (xxt * 2), yMini + 2 + yw, 4271 4273 xMini + 1 + G.lx + MapWidth div (xxt * 2), yMini + yw + MapHeight div yyt, 4272 MainTexture. clMark, MainTexture.clMark);4274 MainTexture.ColorMark, MainTexture.ColorMark); 4273 4275 end; 4274 4276 end; … … 4301 4303 begin 4302 4304 Fill(Panel.Canvas, 0, 3, xMidPanel + 7 - 10, PanelHeight - 3, 4303 wMainTexture - (xMidPanel + 7 - 10), hMainTexture- PanelHeight);4305 MainTexture.Width - (xMidPanel + 7 - 10), MainTexture.Height - PanelHeight); 4304 4306 Fill(Panel.Canvas, xRightPanel + 10 - 7, 3, Panel.width - xRightPanel - 10 + 4305 7, PanelHeight - 3, -(xRightPanel + 10 - 7), hMainTexture- PanelHeight);4307 7, PanelHeight - 3, -(xRightPanel + 10 - 7), MainTexture.Height - PanelHeight); 4306 4308 FillLarge(Panel.Canvas, xMidPanel - 2, PanelHeight - MidPanelHeight, 4307 4309 xRightPanel + 2, PanelHeight, ClientWidth div 2); … … 4315 4317 LineTo(xRightPanel, 0); 4316 4318 LineTo(ClientWidth, 0); 4317 Pen.Color := MainTexture. clBevelLight;4319 Pen.Color := MainTexture.ColorBevelLight; 4318 4320 MoveTo(xMidPanel + 7 - 9, PanelHeight - MidPanelHeight + 2); 4319 4321 LineTo(xRightPanel + 10 - 8, PanelHeight - MidPanelHeight + 2); 4320 Pen.Color := MainTexture. clBevelLight;4322 Pen.Color := MainTexture.ColorBevelLight; 4321 4323 MoveTo(0, 1); 4322 4324 LineTo(xMidPanel + 7 - 9, 1); 4323 Pen.Color := MainTexture. clBevelShade;4325 Pen.Color := MainTexture.ColorBevelShade; 4324 4326 LineTo(xMidPanel + 7 - 9, PanelHeight - MidPanelHeight + 1); 4325 Pen.Color := MainTexture. clBevelLight;4327 Pen.Color := MainTexture.ColorBevelLight; 4326 4328 LineTo(xRightPanel + 10 - 9, PanelHeight - MidPanelHeight + 1); 4327 Pen.Color := MainTexture. clBevelLight;4329 Pen.Color := MainTexture.ColorBevelLight; 4328 4330 LineTo(xRightPanel + 10 - 9, 1); 4329 4331 LineTo(ClientWidth, 1); … … 4333 4335 MoveTo(0, 2); 4334 4336 LineTo(xMidPanel + 7 - 10, 2); 4335 Pen.Color := MainTexture. clBevelShade;4337 Pen.Color := MainTexture.ColorBevelShade; 4336 4338 LineTo(xMidPanel + 7 - 10, PanelHeight); 4337 4339 Corner(Panel.Canvas, xMidPanel + 7 - 16, 1, 1, MainTexture); … … 4472 4474 ScreenTools.Frame(Panel.Canvas, xTroop + 1 + x, 4473 4475 yTroop + 6 - yyt div 2, xTroop + 2 * xxt - 1 + x, 4474 yTroop + 2 * yyt + 10, MainTexture. clMark, MainTexture.clMark);4476 yTroop + 2 * yyt + 10, MainTexture.ColorMark, MainTexture.ColorMark); 4475 4477 end; 4476 4478 end; … … 4590 4592 else 4591 4593 x := xTroop - 152; 4592 Pen.Color := MainTexture. clBevelShade;4594 Pen.Color := MainTexture.ColorBevelShade; 4593 4595 MoveTo(x - 1, PanelHeight - MidPanelHeight + 2); 4594 4596 LineTo(x - 1, PanelHeight); 4595 Pen.Color := MainTexture. clBevelLight;4597 Pen.Color := MainTexture.ColorBevelLight; 4596 4598 MoveTo(x, PanelHeight - MidPanelHeight + 2); 4597 4599 LineTo(x, PanelHeight); … … 4631 4633 ScreenTools.Frame(Panel.Canvas, xTroop + 3 + x, 4632 4634 yTroop + 2, xTroop + 63 + x, yTroop + 46, 4633 MainTexture. clMark, MainTexture.clMark);4635 MainTexture.ColorMark, MainTexture.ColorMark); 4634 4636 end 4635 4637 else if (unx.Master >= 0) and (unx.Master = UnFocus) then … … 4638 4640 xTroop + 64 + x, yTroop + 47, 8, $000000); 4639 4641 CFrame(Panel.Canvas, xTroop + 3 + x, yTroop + 2, 4640 xTroop + 63 + x, yTroop + 46, 8, MainTexture. clMark);4642 xTroop + 63 + x, yTroop + 46, 8, MainTexture.ColorMark); 4641 4643 end; 4642 4644 NoMapPanel.SetOutput(Panel); … … 4733 4735 RFrame(Panel.Canvas, Left - 1, Top - self.ClientHeight + 4734 4736 (PanelHeight - 1), Left + width, Top + height - self.ClientHeight + 4735 PanelHeight, MainTexture. clBevelShade, MainTexture.clBevelLight)4737 PanelHeight, MainTexture.ColorBevelShade, MainTexture.ColorBevelLight) 4736 4738 end; { if TroopLoc>=0 } 4737 4739 end; … … 4749 4751 RFrame(Panel.Canvas, Left - 1, Top - self.ClientHeight + 4750 4752 (PanelHeight - 1), Left + width, Top + height - self.ClientHeight + 4751 PanelHeight, MainTexture. clBevelShade, MainTexture.clBevelLight);4753 PanelHeight, MainTexture.ColorBevelShade, MainTexture.ColorBevelLight); 4752 4754 end; 4753 4755 end; … … 4763 4765 RFrame(Panel.Canvas, Left - 1, Top - self.ClientHeight + 4764 4766 (PanelHeight - 1), Left + width, Top + height - self.ClientHeight + 4765 PanelHeight, MainTexture. clBevelShade, MainTexture.clBevelLight);4767 PanelHeight, MainTexture.ColorBevelShade, MainTexture.ColorBevelLight); 4766 4768 end; 4767 4769 end; … … 4780 4782 MoveTo(0, TopBarHeight - 1); 4781 4783 LineTo(ClientWidth, TopBarHeight - 1); 4782 Pen.Color := MainTexture. clBevelShade;4784 Pen.Color := MainTexture.ColorBevelShade; 4783 4785 MoveTo(0, TopBarHeight - 2); 4784 4786 LineTo(ClientWidth, TopBarHeight - 2); 4785 4787 MoveTo(0, TopBarHeight - 3); 4786 4788 LineTo(ClientWidth, TopBarHeight - 3); 4787 Pen.Color := MainTexture. clBevelLight;4789 Pen.Color := MainTexture.ColorBevelLight; 4788 4790 ScreenTools.Frame(TopBar.Canvas, 40, -1, xTreasurySection - 1, 4789 TopBarHeight - 7, MainTexture. clBevelShade, MainTexture.clBevelLight);4791 TopBarHeight - 7, MainTexture.ColorBevelShade, MainTexture.ColorBevelLight); 4790 4792 ScreenTools.Frame(TopBar.Canvas, xResearchSection + 332, -1, ClientWidth, 4791 TopBarHeight - 7, MainTexture. clBevelShade, MainTexture.clBevelLight);4793 TopBarHeight - 7, MainTexture.ColorBevelShade, MainTexture.ColorBevelLight); 4792 4794 end; 4793 4795 if GameMode <> cMovie then … … 5224 5226 Frame(Panel.Canvas, xMini + 2 + G.lx - MapWidth div (2 * xxt), 5225 5227 yMini + 2, xMini + 1 + G.lx + MapWidth div (2 * xxt), 5226 yMini + 2 + G.ly - 1, MainTexture. clMark, MainTexture.clMark)5228 yMini + 2 + G.ly - 1, MainTexture.ColorMark, MainTexture.ColorMark) 5227 5229 else 5228 5230 Frame(Panel.Canvas, xMini + 2 + G.lx - MapWidth div (2 * xxt), 5229 5231 yMini + 2 + yw, xMini + 2 + G.lx + MapWidth div (2 * xxt) - 1, 5230 yMini + 2 + yw + MapHeight div yyt - 2, MainTexture. clMark,5231 MainTexture. clMark);5232 yMini + 2 + yw + MapHeight div yyt - 2, MainTexture.ColorMark, 5233 MainTexture.ColorMark); 5232 5234 end; 5233 5235 RectInvalidate(xMini + 2, TopBarHeight + MapHeight - overlap + yMini + 2, … … 7492 7494 Frame(Buffer.Canvas, x - xMini - 2 - MapWidth div (xxt * 2), 0, 7493 7495 x - xMini - 2 + MapWidth div (xxt * 2) - 1, G.ly - 1, 7494 MainTexture. clMark, MainTexture.clMark)7496 MainTexture.ColorMark, MainTexture.ColorMark) 7495 7497 else 7496 7498 Frame(Buffer.Canvas, x - xMini - 2 - MapWidth div (xxt * 2), yw, 7497 7499 x - xMini - 2 + MapWidth div (xxt * 2) - 1, yw + MapHeight div yyt - 7498 2, MainTexture. clMark, MainTexture.clMark);7500 2, MainTexture.ColorMark, MainTexture.ColorMark); 7499 7501 BitBltCanvas(Panel.Canvas, xMini + 2, yMini + 2, G.lx * 2, G.ly, 7500 7502 Buffer.Canvas, 0, 0); -
trunk/LocalPlayer/UnitStat.pas
r350 r352 98 98 procedure TUnitStatDlg.CheckAge; 99 99 begin 100 if MainTextureAge <> AgePrepared then 101 begin 102 AgePrepared := MainTextureAge; 100 if MainTexture.Age <> AgePrepared then begin 101 AgePrepared := MainTexture.Age; 103 102 BitBltCanvas(Back.Canvas, 0, 0, wCommon, hOwnModel, 104 MainTexture.Image.Canvas, ( wMainTexture- wCommon) div 2,105 ( hMainTexture- hOwnModel) div 2);103 MainTexture.Image.Canvas, (MainTexture.Width - wCommon) div 2, 104 (MainTexture.Height - hOwnModel) div 2); 106 105 BitBltCanvas(Back.Canvas, wCommon, 0, wCommon, hEnemyModel, 107 MainTexture.Image.Canvas, ( wMainTexture- wCommon) div 2,108 ( hMainTexture- hEnemyModel) div 2);106 MainTexture.Image.Canvas, (MainTexture.Width - wCommon) div 2, 107 (MainTexture.Height - hEnemyModel) div 2); 109 108 BitBltCanvas(Back.Canvas, 2 * wCommon, 0, wCommon, hEnemyUnit, 110 MainTexture.Image.Canvas, ( wMainTexture- wCommon) div 2,111 ( hMainTexture- hEnemyUnit) div 2);109 MainTexture.Image.Canvas, (MainTexture.Width - wCommon) div 2, 110 (MainTexture.Height - hEnemyUnit) div 2); 112 111 BitBltCanvas(Back.Canvas, 3 * wCommon, 0, wCommon, hEnemyCityDefense, 113 MainTexture.Image.Canvas, ( wMainTexture- wCommon) div 2,114 ( hMainTexture- hEnemyCityDefense) div 2);112 MainTexture.Image.Canvas, (MainTexture.Width - wCommon) div 2, 113 (MainTexture.Height - hEnemyCityDefense) div 2); 115 114 BitBltCanvas(Back.Canvas, 4 * wCommon, 0, wCommon, hEnemyCity, 116 MainTexture.Image.Canvas, ( wMainTexture- wCommon) div 2,117 ( hMainTexture- hEnemyCity) div 2);115 MainTexture.Image.Canvas, (MainTexture.Width - wCommon) div 2, 116 (MainTexture.Height - hEnemyCity) div 2); 118 117 ImageOp_B(Back, Template, 0, 0, 0, 0, 5 * wCommon, hMax); 119 end 118 end; 120 119 end; 121 120 … … 305 304 306 305 procedure FeatureBar(dst: TBitmap; x, y: integer; const mi: TModelInfo; 307 constT: TTexture);306 T: TTexture); 308 307 var 309 308 i, w, dx, num: integer; … … 371 370 end; { featurebar } 372 371 373 procedure NumberBarS(dst: TBitmap; x, y: integer; Cap, s: string; 374 const T: TTexture); 375 begin 376 DLine(dst.Canvas, x - 2, x + 170, y + 16, T.clBevelShade, T.clBevelLight); 372 procedure NumberBarS(dst: TBitmap; x, y: integer; Cap, s: string; T: TTexture); 373 begin 374 DLine(dst.Canvas, x - 2, x + 170, y + 16, T.ColorBevelShade, T.ColorBevelLight); 377 375 LoweredTextOut(dst.Canvas, -1, T, x - 2, y, Cap); 378 376 RisedTextout(dst.Canvas, x + 170 - BiColorTextWidth(dst.Canvas, s), y, s); … … 447 445 end; 448 446 Frame(offscreen.Canvas, x - 1, yImp - 1, x + xSizeSmall, 449 yImp + ySizeSmall, MainTexture. clBevelLight,450 MainTexture. clBevelShade);447 yImp + ySizeSmall, MainTexture.ColorBevelLight, 448 MainTexture.ColorBevelShade); 451 449 BitBltCanvas(offscreen.Canvas, x, yImp, xSizeSmall, ySizeSmall, 452 450 SmallImp.Canvas, j mod 7 * xSizeSmall, … … 527 525 begin 528 526 { Frame(offscreen.canvas,xView-1,yView-1,xView+64,yView+48, 529 MainTexture. clBevelShade,MainTexture.clBevelLight);527 MainTexture.ColorBevelShade,MainTexture.ColorBevelLight); 530 528 RFrame(offscreen.canvas,xView-2,yView-2,xView+65,yView+49, 531 MainTexture. clBevelShade,MainTexture.clBevelLight); }529 MainTexture.ColorBevelShade,MainTexture.ColorBevelLight); } 532 530 with offscreen.Canvas do 533 531 begin … … 615 613 Phrases.Lookup('UNITCOST')); 616 614 DLine(offscreen.Canvas, xTotal - 2, xTotal + 170, yTotal + 57 + 16, 617 MainTexture. clBevelShade, MainTexture.clBevelLight);615 MainTexture.ColorBevelShade, MainTexture.ColorBevelLight); 618 616 if G.Difficulty[me] = 0 then 619 617 s := IntToStr(mi.cost) … … 636 634 (yTotal + StatDown - 19), Phrases.Lookup('UNITINTRO')); 637 635 DLine(offscreen.Canvas, xTotal - 2, xTotal + 170, 638 (yTotal + StatDown - 19) + 16, MainTexture. clTextShade,639 MainTexture. clTextLight);636 (yTotal + StatDown - 19) + 16, MainTexture.ColorTextShade, 637 MainTexture.ColorTextLight); 640 638 s := TurnToString(MyModel[mixShow].IntroTurn); 641 639 RisedTextout(offscreen.Canvas, -
trunk/LocalPlayer/Wonders.pas
r319 r352 199 199 200 200 Fill(Offscreen.Canvas, 3, 3, ClientWidth - 6, ClientHeight - 6, 201 ( wMaintexture - ClientWidth) div 2, (hMaintexture- ClientHeight) div 2);201 (Maintexture.Width - ClientWidth) div 2, (Maintexture.Height - ClientHeight) div 2); 202 202 Frame(Offscreen.Canvas, 0, 0, ClientWidth - 1, ClientHeight - 1, 0, 0); 203 203 Frame(Offscreen.Canvas, 1, 1, ClientWidth - 2, ClientHeight - 2, 204 MainTexture. clBevelLight, MainTexture.clBevelShade);204 MainTexture.ColorBevelLight, MainTexture.ColorBevelShade); 205 205 Frame(Offscreen.Canvas, 2, 2, ClientWidth - 3, ClientHeight - 3, 206 MainTexture. clBevelLight, MainTexture.clBevelShade);206 MainTexture.ColorBevelLight, MainTexture.ColorBevelShade); 207 207 Corner(Offscreen.Canvas, 1, 1, 0, MainTexture); 208 208 Corner(Offscreen.Canvas, ClientWidth - 9, 1, 1, MainTexture); … … 230 230 Fill(Offscreen.Canvas, Center.X - xSizeBig div 2 + RingPosition[I].X - 3, 231 231 Center.Y - ySizeBig div 2 + RingPosition[I].Y - 3, xSizeBig + 6, 232 ySizeBig + 6, ( wMaintexture- ClientWidth) div 2,233 ( hMaintexture- ClientHeight) div 2);232 ySizeBig + 6, (Maintexture.Width - ClientWidth) div 2, 233 (Maintexture.Height - ClientHeight) div 2); 234 234 end; 235 235 WonderDestroyed: begin … … 308 308 begin 309 309 Fill(Canvas, 9, ClientHeight - 3 - 46, ClientWidth - 18, 44, 310 ( wMaintexture - ClientWidth) div 2, (hMaintexture- ClientHeight) div 2);310 (Maintexture.Width - ClientWidth) div 2, (Maintexture.Height - ClientHeight) div 2); 311 311 if Selection >= 0 then 312 312 begin … … 318 318 (ClientWidth-BiColorTextWidth(Canvas,S)) div 2+1, 319 319 ClientHeight-3-36+1, S); 320 Canvas.Font.Color:=MainTexture. clBevelLight;320 Canvas.Font.Color:=MainTexture.ColorBevelLight; 321 321 Canvas.TextOut( 322 322 (ClientWidth-BiColorTextWidth(Canvas,S)) div 2,
Note:
See TracChangeset
for help on using the changeset viewer.