Changeset 189 for trunk/LocalPlayer
- Timestamp:
- May 7, 2020, 12:46:55 AM (5 years ago)
- Location:
- trunk/LocalPlayer
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LocalPlayer/CityScreen.pas
r188 r189 216 216 Template := TBitmap.Create; 217 217 Template.PixelFormat := pf24bit; 218 LoadGraphicFile(Template, HomeDir + 'Graphics'+ DirectorySeparator + 'City.png', gfNoGamma);218 LoadGraphicFile(Template, GetGraphicsDir + DirectorySeparator + 'City.png', gfNoGamma); 219 219 CityMapTemplate := TBitmap.Create; 220 220 CityMapTemplate.PixelFormat := pf24bit; 221 LoadGraphicFile(CityMapTemplate, HomeDir + 'Graphics'+ DirectorySeparator + 'BigCityMap.png', gfNoGamma);221 LoadGraphicFile(CityMapTemplate, GetGraphicsDir + DirectorySeparator + 'BigCityMap.png', gfNoGamma); 222 222 SmallCityMapTemplate := TBitmap.Create; 223 223 SmallCityMapTemplate.PixelFormat := pf24bit; 224 LoadGraphicFile(SmallCityMapTemplate, HomeDir + 'Graphics'+ DirectorySeparator + 'SmallCityMap.png',224 LoadGraphicFile(SmallCityMapTemplate, GetGraphicsDir + DirectorySeparator + 'SmallCityMap.png', 225 225 gfNoGamma); 226 226 SmallCityMap := TBitmap.Create; -
trunk/LocalPlayer/Draft.pas
r188 r189 92 92 Template := TBitmap.Create; 93 93 Template.PixelFormat := pf24bit; 94 LoadGraphicFile(Template, HomeDir + 'Graphics'+ DirectorySeparator + 'MiliRes.png', gfNoGamma);94 LoadGraphicFile(Template, GetGraphicsDir + DirectorySeparator + 'MiliRes.png', gfNoGamma); 95 95 end; 96 96 -
trunk/LocalPlayer/Help.pas
r188 r189 5 5 6 6 uses 7 Protocol, ScreenTools, BaseWin, StringTables, Math, 8 L CLIntf, LCLType, LMessages, Messages, SysUtils, Classes, Graphics, Controls, Forms,9 ExtCtrls,ButtonB, PVSB, Types, fgl;7 Protocol, ScreenTools, BaseWin, StringTables, Math, LCLIntf, LCLType, 8 LMessages, Messages, SysUtils, Classes, Graphics, Controls, Forms, ExtCtrls, 9 ButtonB, PVSB, Types, fgl; 10 10 11 11 const … … 123 123 HelpDlg: THelpDlg; 124 124 125 125 126 implementation 126 127 127 128 uses 128 Directories, ClientTools, Term, Tribes, Inp, Messg, PixelPointer ;129 Directories, ClientTools, Term, Tribes, Inp, Messg, PixelPointer, Global; 129 130 130 131 {$R *.lfm} … … 1229 1230 List := TStringList.Create; 1230 1231 Plus := TStringList.Create; 1231 if FindFirst( HomeDir + 'Graphics'+ DirectorySeparator + '*.credits.txt', $27, sr) = 0 then1232 if FindFirst(GetGraphicsDir + DirectorySeparator + '*.credits.txt', $27, sr) = 0 then 1232 1233 repeat 1233 Plus.LoadFromFile( HomeDir + 'Graphics'+ DirectorySeparator + sr.Name);1234 Plus.LoadFromFile(GetGraphicsDir + DirectorySeparator + sr.Name); 1234 1235 List.AddStrings(Plus); 1235 1236 until FindNext(sr) <> 0; … … 1262 1263 begin 1263 1264 List := TStringList.Create; 1264 List.LoadFromFile( HomeDir + 'Sounds'+ DirectorySeparator + 'sound.credits.txt');1265 List.LoadFromFile(GetSoundsDir + DirectorySeparator + 'sound.credits.txt'); 1265 1266 for i := 0 to List.Count - 1 do begin 1266 1267 s := List[i]; … … 1948 1949 case Link and $FF of 1949 1950 1: OpenDocument(pchar(HomeDir + 'AI Template' + DirectorySeparator + 'AI development manual.html')); 1950 2: OpenURL( 'http://c-evo.org');1951 3: OpenURL( 'http://c-evo.org/_sg/contact');1951 2: OpenURL(CevoHomepage); 1952 3: OpenURL(CevoHomepageContact); 1952 1953 end 1953 1954 else -
trunk/LocalPlayer/IsoEngine.pas
r188 r189 620 620 if Flags and unFortified <> 0 then 621 621 begin 622 { Data DC:=GrExt[HGrTerrain].Data.Canvas.Handle;623 Mask DC:=GrExt[HGrTerrain].Mask.Canvas.Handle;622 { DataCanvas:=GrExt[HGrTerrain].Data.Canvas; 623 MaskCanvas:=GrExt[HGrTerrain].Mask.Canvas; 624 624 TSprite(x,y+16,12*9+7); } 625 625 Sprite(HGrStdUnits, x, y, xxu * 2, yyu * 2, 1 + 6 * (xxu * 2 + 1), 1); -
trunk/LocalPlayer/NatStat.pas
r188 r189 93 93 Template := TBitmap.Create; 94 94 Template.PixelFormat := pf24bit; 95 LoadGraphicFile(Template, HomeDir + 'Graphics'+ DirectorySeparator + 'Nation.png', gfNoGamma);95 LoadGraphicFile(Template, GetGraphicsDir + DirectorySeparator + 'Nation.png', gfNoGamma); 96 96 end; 97 97 -
trunk/LocalPlayer/Term.pas
r188 r189 273 273 procedure RectInvalidate(Left, Top, Rigth, Bottom: integer); 274 274 procedure SmartRectInvalidate(Left, Top, Rigth, Bottom: integer); 275 procedure LoadSettings; 275 276 procedure SaveSettings; 276 277 procedure OnScroll(var m: TMessage); message WM_VSCROLL; … … 467 468 Directories, IsoEngine, CityScreen, Draft, MessgEx, Select, CityType, Help, 468 469 UnitStat, Log, Diagram, NatStat, Wonders, Enhance, Nego, PixelPointer, Sound, 469 Battle, Rates, TechTree, Registry ;470 Battle, Rates, TechTree, Registry, Global; 470 471 471 472 {$R *.lfm} … … 3407 3408 procedure TMainScreen.FormCreate(Sender: TObject); 3408 3409 var 3409 DefaultOptionChecked: integer;3410 Reg: TRegistry;3411 3410 i, j: integer; 3412 3411 begin … … 3437 3436 SaveOption[20] := mAlFastMoves.Tag; 3438 3437 SaveOption[21] := mAlNoMoves.Tag; 3439 DefaultOptionChecked := 1 shl 1 + 1 shl 7 + 1 shl 10 + 1 shl 12 + 1 shl 14 + 3440 1 shl 18 + 1 shl 19; 3441 3442 Reg := TRegistry.Create; 3443 with Reg do 3444 try 3445 OpenKey(AppRegistryKey, false); 3446 if ValueExists('TileWidth') then xxt := ReadInteger('TileWidth') div 2 3447 else xxt := 48; 3448 if ValueExists('TileHeight') then yyt := ReadInteger('TileHeight') div 2 3449 else yyt := 24; 3450 if ValueExists('OptionChecked') then OptionChecked := ReadInteger('OptionChecked') 3451 else OptionChecked := DefaultOptionChecked; 3452 if ValueExists('MapOptionChecked') then MapOptionChecked := ReadInteger('MapOptionChecked') 3453 else MapOptionChecked := 1 shl moCityNames; 3454 if ValueExists('CityReport') then CityRepMask := Cardinal(ReadInteger('CityReport')) 3455 else CityRepMask := Cardinal(not chPopIncrease and not chNoGrowthWarning and 3456 not chCaptured); 3457 if OptionChecked and (7 shl 16) = 0 then 3458 OptionChecked := OptionChecked or (1 shl 16); 3459 // old regver with no scrolling 3460 finally 3461 Free; 3462 end; 3463 3464 if 1 shl 13 and OptionChecked <> 0 then 3465 SoundMode := smOff 3466 else if 1 shl 15 and OptionChecked <> 0 then 3467 SoundMode := smOnAlt 3468 else 3469 SoundMode := smOn; 3438 3439 LoadSettings; 3470 3440 3471 3441 Screen.Cursors[crImpDrag] := LoadCursor(HInstance, 'DRAG'); … … 7777 7747 end; 7778 7748 7749 procedure TMainScreen.LoadSettings; 7750 var 7751 Reg: TRegistry; 7752 DefaultOptionChecked: Integer; 7753 begin 7754 DefaultOptionChecked := 1 shl 1 + 1 shl 7 + 1 shl 10 + 1 shl 12 + 1 shl 14 + 7755 1 shl 18 + 1 shl 19; 7756 Reg := TRegistry.Create; 7757 with Reg do try 7758 OpenKey(AppRegistryKey, False); 7759 if ValueExists('TileWidth') then xxt := ReadInteger('TileWidth') div 2 7760 else xxt := 48; 7761 if ValueExists('TileHeight') then yyt := ReadInteger('TileHeight') div 2 7762 else yyt := 24; 7763 if ValueExists('OptionChecked') then OptionChecked := ReadInteger('OptionChecked') 7764 else OptionChecked := DefaultOptionChecked; 7765 if ValueExists('MapOptionChecked') then MapOptionChecked := ReadInteger('MapOptionChecked') 7766 else MapOptionChecked := 1 shl moCityNames; 7767 if ValueExists('CityReport') then CityRepMask := Cardinal(ReadInteger('CityReport')) 7768 else CityRepMask := Cardinal(not chPopIncrease and not chNoGrowthWarning and 7769 not chCaptured); 7770 if OptionChecked and (7 shl 16) = 0 then 7771 OptionChecked := OptionChecked or (1 shl 16); 7772 // old regver with no scrolling 7773 finally 7774 Free; 7775 end; 7776 7777 if 1 shl 13 and OptionChecked <> 0 then 7778 SoundMode := smOff 7779 else if 1 shl 15 and OptionChecked <> 0 then 7780 SoundMode := smOnAlt 7781 else 7782 SoundMode := smOn; 7783 end; 7784 7779 7785 procedure TMainScreen.mRepClicked(Sender: TObject); 7780 7786 begin -
trunk/LocalPlayer/UnitStat.pas
r188 r189 83 83 Template := TBitmap.Create; 84 84 Template.PixelFormat := pf24bit; 85 LoadGraphicFile(Template, HomeDir + 'Graphics'+ DirectorySeparator + 'Unit.png', gfNoGamma);85 LoadGraphicFile(Template, GetGraphicsDir + DirectorySeparator + 'Unit.png', gfNoGamma); 86 86 end; 87 87
Note:
See TracChangeset
for help on using the changeset viewer.