Changeset 190
- Timestamp:
- May 7, 2020, 10:33:59 AM (5 years ago)
- Location:
- trunk
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Direct.pas
r143 r190 129 129 ShowModal; 130 130 if ModalResult = mrOK then 131 OpenURL( 'http://c-evo.org/_sg/contact/cevobug.html');131 OpenURL(CevoContactBug); 132 132 end 133 133 *) … … 218 218 Application.MessageBox(PChar(Phrases.Lookup('NOAI')), 'C-evo', 0); 219 219 Close; 220 exit 220 exit; 221 221 end; 222 222 Quick := false; … … 244 244 begin 245 245 SimpleMessage(Phrases.Lookup('LOADERR')); 246 Close 247 end 248 end 249 end; 250 if not Quick then 251 begin 246 Close; 247 end; 248 end; 249 end; 250 if not Quick then begin 252 251 background.Show; 253 StartDlg.Show 254 end 252 StartDlg.Show; 253 end; 255 254 end; 256 255 … … 310 309 PaintProgressBar(Canvas, 6, ClientWidth div 2 - 64, 40, State, 128 - State, 311 310 128, MainTexture); 312 end 311 end; 313 312 end; 314 313 -
trunk/Global.pas
r189 r190 7 7 CevoMapExt = '.cevo map'; 8 8 CevoHomepage = 'http://c-evo.org'; 9 CevoHomepageContact = 'http://c-evo.org/_sg/contact'; 9 CevoContact = 'http://c-evo.org/_sg/contact'; 10 CevoContactBug = 'http://c-evo.org/_sg/contact/cevobug.html'; 10 11 AppRegistryKey = '\SOFTWARE\C-evo'; 12 AITemplateFileName = 'AI Template' + DirectorySeparator + 'AI development manual.html'; 11 13 12 14 implementation -
trunk/LocalPlayer/Help.pas
r189 r190 1948 1948 if Link shr 8 and $3F = hkInternet then 1949 1949 case Link and $FF of 1950 1: OpenDocument( pchar(HomeDir + 'AI Template' + DirectorySeparator + 'AI development manual.html'));1950 1: OpenDocument(HomeDir + AITemplateFileName); 1951 1951 2: OpenURL(CevoHomepage); 1952 3: OpenURL(Cevo HomepageContact);1952 3: OpenURL(CevoContact); 1953 1953 end 1954 1954 else -
trunk/LocalPlayer/MessgEx.pas
r188 r190 345 345 if UnitsInLine > LostUnitsPerLine then 346 346 UnitsInLine := LostUnitsPerLine; 347 end 347 end; 348 348 end; 349 349 end; … … 450 450 if OpenSound <> '' then 451 451 PostMessage(Handle, WM_PLAYSOUND, 0, 0); 452 end; { FormPaint }452 end; 453 453 454 454 procedure TMessgExDlg.Button1Click(Sender: TObject); … … 469 469 procedure TMessgExDlg.Button3Click(Sender: TObject); 470 470 begin 471 ModalResult := mrCancel 471 ModalResult := mrCancel; 472 472 end; 473 473 474 474 procedure TMessgExDlg.RemoveBtnClick(Sender: TObject); 475 475 begin 476 ModalResult := mrNo 476 ModalResult := mrNo; 477 477 end; 478 478 … … 485 485 ModalResult := mrCancel 486 486 else if Button2.Visible then 487 ModalResult := mrIgnore 487 ModalResult := mrIgnore; 488 488 end; 489 489 … … 497 497 Kind := mkOk; 498 498 ShowModal; 499 end 499 end; 500 500 end; 501 501 … … 522 522 Kind := QueryKind; 523 523 ShowModal; 524 result := ModalResult 525 end 524 result := ModalResult; 525 end; 526 526 end; 527 527 … … 537 537 HelpNo := ContextNo; 538 538 ShowModal; 539 end 539 end; 540 540 end; 541 541 … … 552 552 end; 553 553 554 554 555 initialization 555 556 -
trunk/LocalPlayer/TechTree.pas
r188 r190 78 78 X, w: Integer; 79 79 begin 80 with Canvas do 81 begin 80 with Canvas do begin 82 81 // black border 83 82 brush.color := $000000; … … 120 119 procedure TTechTreeDlg.FormShow(Sender: TObject); 121 120 var 122 X, Y, ad , TexWidth, TexHeight: Integer;121 X, Y, ad: Integer; 123 122 s: string; 124 SrcPixel, DstPixel: TPixelPointer; 125 begin 126 if Image = nil then127 begin123 const 124 TransparentColor = $7F007F; 125 begin 126 if Image = nil then begin 128 127 Image := TBitmap.Create; 129 128 Image.PixelFormat := pf24bit; 130 129 LoadGraphicFile(Image, HomeDir + 'Help' + DirectorySeparator + 'AdvTree.png', gfNoGamma); 131 130 132 with Image.Canvas do 133 begin 131 with Image.Canvas do begin 134 132 // write advance names 135 133 Font.Assign(UniFont[ftSmall]); … … 147 145 TextOut(xStart + X * xPitch + 2, yStart + Y * yPitch, s); 148 146 Pixels[xStart + X * xPitch + 10, yStart + Y * yPitch - 1] 149 := $7F007F;147 := TransparentColor; 150 148 end 151 149 end; … … 162 160 end; 163 161 164 // texturize background 165 Image.BeginUpdate; 166 TexWidth := Paper.Width; 167 TexHeight := Paper.Height; 168 DstPixel.Init(Image); 169 SrcPixel.Init(Paper); 170 for Y := 0 to Image.Height - 1 do begin 171 for X := 0 to Image.Width - 1 do begin 172 if (DstPixel.Pixel^.ARGB and $FFFFFF) = $7F007F then begin // transparent 173 SrcPixel.SetXY(X mod TexWidth, Y mod TexHeight); 174 DstPixel.Pixel^.B := SrcPixel.Pixel^.B; 175 DstPixel.Pixel^.G := SrcPixel.Pixel^.G; 176 DstPixel.Pixel^.R := SrcPixel.Pixel^.R; 177 end; 178 DstPixel.NextPixel; 179 end; 180 DstPixel.NextLine; 181 end; 182 Image.EndUpdate; 162 Texturize(Image, Paper, TransparentColor); 183 163 end; 184 164 … … 205 185 xDown := X; 206 186 yDown := Y; 207 end 187 end; 208 188 end; 209 189 … … 235 215 236 216 SmartInvalidate; 237 end 217 end; 238 218 end; 239 219 … … 247 227 procedure TTechTreeDlg.CloseBtnClick(Sender: TObject); 248 228 begin 249 Close ();229 Close; 250 230 end; 251 231 -
trunk/LocalPlayer/Term.pas
r189 r190 6857 6857 end 6858 6858 else if Sender = mWebsite then 6859 OpenURL( 'http://c-evo.org')6859 OpenURL(CevoHomepage) 6860 6860 else if Sender = mRandomMap then 6861 6861 begin -
trunk/Packages/CevoComponents/Directories.pas
r189 r190 38 38 end; 39 39 if Lang = '' then begin 40 T := ''; 40 41 LazGetLanguageIDs(Lang, T); 41 42 Lang := Copy(Lang, 1, 2); -
trunk/Packages/CevoComponents/ScreenTools.pas
r189 r190 81 81 function SetMainTextureByAge(Age: integer): boolean; 82 82 procedure LoadPhrases; 83 procedure Texturize(Dest, Texture: TBitmap; TransparentColor: Integer); 83 84 84 85 const … … 1398 1399 end; 1399 1400 1401 procedure Texturize(Dest, Texture: TBitmap; TransparentColor: Integer); 1402 var 1403 SrcPixel, DstPixel: TPixelPointer; 1404 X, Y: Integer; 1405 TexWidth, TexHeight: Integer; 1406 begin 1407 // texturize background 1408 Dest.BeginUpdate; 1409 TexWidth := Texture.Width; 1410 TexHeight := Texture.Height; 1411 DstPixel.Init(Dest); 1412 SrcPixel.Init(Texture); 1413 for Y := 0 to Dest.Height - 1 do begin 1414 for X := 0 to Dest.Width - 1 do begin 1415 if (DstPixel.Pixel^.ARGB and $FFFFFF) = TransparentColor then begin 1416 SrcPixel.SetXY(X mod TexWidth, Y mod TexHeight); 1417 DstPixel.Pixel^.B := SrcPixel.Pixel^.B; 1418 DstPixel.Pixel^.G := SrcPixel.Pixel^.G; 1419 DstPixel.Pixel^.R := SrcPixel.Pixel^.R; 1420 end; 1421 DstPixel.NextPixel; 1422 end; 1423 DstPixel.NextLine; 1424 end; 1425 Dest.EndUpdate; 1426 end; 1427 1400 1428 procedure LoadFonts; 1401 1429 var -
trunk/Start.pas
r189 r190 446 446 447 447 ActionsOffered := [maConfig, maManual, maCredits, maWeb]; 448 if FileExists(HomeDir + 'AI Template' + DirectorySeparator + 'AI development manual.html') then448 if FileExists(HomeDir + AITemplateFileName) then 449 449 Include(ActionsOffered, maAIDev); 450 450 … … 1671 1671 DirectHelp(cStartCredits); 1672 1672 maAIDev: 1673 OpenDocument( pchar(HomeDir + 'AI Template' + DirectorySeparator + 'AI development manual.html'));1673 OpenDocument(HomeDir + AITemplateFileName); 1674 1674 maWeb: 1675 1675 OpenURL(CevoHomepage);
Note:
See TracChangeset
for help on using the changeset viewer.