Changeset 21
- Timestamp:
- Sep 27, 2011, 11:01:18 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 7 added
- 3 edited
- 4 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UMainForm.lfm
r19 r21 94 94 end 95 95 object ActionList1: TActionList 96 left = 2 7297 top = 2496 left = 288 97 top = 32 98 98 object AFullScreen: TAction 99 99 Caption = 'Fullscreen mode' … … 124 124 end 125 125 end 126 object CoolTranslator1: TCoolTranslator 127 POFilesFolder = 'Languages' 128 left = 288 129 top = 104 130 end 126 131 end -
trunk/Forms/UMainForm.pas
r19 r21 8 8 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ExtCtrls, 9 9 ComCtrls, Menus, ActnList, UCore, UPlatform, Math, DateUtils, GraphType, 10 UPersistentForm, UApplicationInfo ;10 UPersistentForm, UApplicationInfo, UCoolTranslator; 11 11 12 12 type … … 22 22 AFullScreen: TAction; 23 23 ActionList1: TActionList; 24 CoolTranslator1: TCoolTranslator; 24 25 Image1: TImage; 25 26 MainMenu1: TMainMenu; … … 69 70 70 71 uses 71 UMapForm ;72 UMapForm, UNewGameForm; 72 73 73 74 { TMainForm } … … 186 187 procedure TMainForm.ANewGameExecute(Sender: TObject); 187 188 begin 188 Engine.NewGame;189 if NewGameForm.ShowModal = mrOk then Engine.NewGame; 189 190 end; 190 191 … … 225 226 begin 226 227 PersistentForm.Load(Self); 228 CoolTranslator1.Language := CoolTranslator1.Languages.SearchByCode('cs'); 227 229 end; 228 230 -
trunk/UCore.pas
r19 r21 76 76 public 77 77 Id: Integer; 78 Enabled: Boolean; 78 79 Engine: TEngine; 79 80 Position: TPoint; … … 82 83 Name: string; 83 84 Keys: TPlayerKeys; 84 Tanks: TListObject; 85 Bullets: TListObject; // TList <TBullet>85 Tanks: TListObject; // TListObject<TTank> 86 Bullets: TListObject; // TListObject<TBullet> 86 87 Energy: Real; 87 88 LastEnergy: Real; … … 153 154 FSystemThread: TSystemThread; 154 155 IntfImage: TLazIntfImage; 156 ClearBackground: Boolean; 155 157 function GetPlayerCount: Integer; 156 158 procedure SetActive(const AValue: Boolean); … … 163 165 Keyboard: TKeyboard; 164 166 World: TWorld; 165 Players: T ObjectList; //<TPlayer>167 Players: TListObject; // TListObject<TPlayer> 166 168 Lock: TCriticalSection; 167 169 constructor Create; … … 900 902 BytePerPixel := RawImage.Description.BitsPerPixel div 8; 901 903 BytePerRow := RawImage.Description.BytesPerLine; 902 FillChar(RawImage.Data^, Bitmap.Height * BytePerRow, 0); 904 if ClearBackground then begin 905 FillChar(RawImage.Data^, Bitmap.Height * BytePerRow, 0); 906 ClearBackground := False; 907 end; 903 908 904 909 if (FBitmap.Width / FBitmapLower.Width) < (FBitmap.Height / FBitmapLower.Height) then … … 983 988 end; 984 989 end; 990 ClearBackground := True; 985 991 Redraw; 986 992 end; … … 992 998 FBitmapLock := TCriticalSection.Create; 993 999 IntfImage := TLazIntfImage.Create(1, 1); 994 Players := T ObjectList.Create;1000 Players := TListObject.Create; 995 1001 Keyboard := TKeyboard.Create; 996 1002 World := TWorld.Create; -
trunk/tunneler.lpi
r19 r21 11 11 </General> 12 12 <i18n> 13 <EnableI18N LFM="False"/> 13 <EnableI18N Value="True"/> 14 <OutDir Value="Languages"/> 14 15 </i18n> 15 16 <VersionInfo> … … 30 31 </local> 31 32 </RunParams> 32 <RequiredPackages Count=" 3">33 <RequiredPackages Count="4"> 33 34 <Item1> 35 <PackageName Value="CoolTranslator"/> 36 </Item1> 37 <Item2> 34 38 <PackageName Value="LCLBase"/> 35 39 <MinVersion Major="1" Release="1" Valid="True"/> 36 </Item1>37 <Item2>38 <PackageName Value="TemplateGenerics"/>39 40 </Item2> 40 41 <Item3> 42 <PackageName Value="TemplateGenerics"/> 43 </Item3> 44 <Item4> 41 45 <PackageName Value="LCL"/> 42 </Item 3>46 </Item4> 43 47 </RequiredPackages> 44 <Units Count="6 0">48 <Units Count="64"> 45 49 <Unit0> 46 50 <Filename Value="tunneler.lpr"/> 47 51 <IsPartOfProject Value="True"/> 48 52 <UnitName Value="tunneler"/> 49 <WindowIndex Value="0"/> 50 <TopLine Value="1"/> 51 <CursorPos X="15" Y="4"/> 52 <UsageCount Value="92"/> 53 <EditorIndex Value="3"/> 54 <WindowIndex Value="0"/> 55 <TopLine Value="1"/> 56 <CursorPos X="61" Y="10"/> 57 <UsageCount Value="93"/> 58 <Loaded Value="True"/> 53 59 </Unit0> 54 60 <Unit1> 55 61 <Filename Value="UMainForm.pas"/> 56 <IsPartOfProject Value="True"/>57 62 <ComponentName Value="MainForm"/> 58 63 <ResourceBaseClass Value="Form"/> 59 64 <UnitName Value="UMainForm"/> 60 <EditorIndex Value="9"/> 61 <WindowIndex Value="0"/> 62 <TopLine Value="75"/> 63 <CursorPos X="28" Y="91"/> 64 <UsageCount Value="92"/> 65 <Loaded Value="True"/> 66 <LoadedDesigner Value="True"/> 65 <WindowIndex Value="0"/> 66 <TopLine Value="203"/> 67 <CursorPos X="68" Y="209"/> 68 <UsageCount Value="93"/> 67 69 </Unit1> 68 70 <Unit2> … … 70 72 <IsPartOfProject Value="True"/> 71 73 <UnitName Value="UCore"/> 72 <IsVisibleTab Value="True"/>73 74 <EditorIndex Value="0"/> 74 75 <WindowIndex Value="0"/> 75 <TopLine Value=" 879"/>76 <CursorPos X=" 5" Y="902"/>77 <UsageCount Value="9 2"/>76 <TopLine Value="77"/> 77 <CursorPos X="20" Y="86"/> 78 <UsageCount Value="93"/> 78 79 <Loaded Value="True"/> 79 80 </Unit2> … … 141 142 <Unit11> 142 143 <Filename Value="../../PascalClassLibrary/Generics/TemplateGenerics/Generic/GenericMatrix.inc"/> 143 <EditorIndex Value=" 4"/>144 <EditorIndex Value="8"/> 144 145 <WindowIndex Value="0"/> 145 146 <TopLine Value="154"/> … … 259 260 <Unit27> 260 261 <Filename Value="UMapForm.pas"/> 261 <IsPartOfProject Value="True"/>262 262 <ComponentName Value="MapForm"/> 263 263 <ResourceBaseClass Value="Form"/> 264 264 <UnitName Value="UMapForm"/> 265 <EditorIndex Value="8"/> 266 <WindowIndex Value="0"/> 267 <TopLine Value="6"/> 268 <CursorPos X="20" Y="39"/> 269 <UsageCount Value="71"/> 270 <Loaded Value="True"/> 265 <WindowIndex Value="0"/> 266 <TopLine Value="15"/> 267 <CursorPos X="39" Y="45"/> 268 <UsageCount Value="72"/> 271 269 </Unit27> 272 270 <Unit28> … … 331 329 <Unit36> 332 330 <Filename Value="../../PascalClassLibrary/Generics/TemplateGenerics/Generic/GenericBitmap.inc"/> 333 <EditorIndex Value=" 3"/>331 <EditorIndex Value="7"/> 334 332 <WindowIndex Value="0"/> 335 333 <TopLine Value="1"/> … … 341 339 <Filename Value="../../PascalClassLibrary/Generics/TemplateGenerics/Specialized/SpecializedBitmap.pas"/> 342 340 <UnitName Value="SpecializedBitmap"/> 343 <EditorIndex Value=" 2"/>341 <EditorIndex Value="6"/> 344 342 <WindowIndex Value="0"/> 345 343 <TopLine Value="47"/> … … 398 396 <IsPartOfProject Value="True"/> 399 397 <UnitName Value="UPlatform"/> 400 <UsageCount Value="5 1"/>398 <UsageCount Value="52"/> 401 399 </Unit44> 402 400 <Unit45> … … 443 441 <IsPartOfProject Value="True"/> 444 442 <UnitName Value="URectangle"/> 445 <EditorIndex Value=" 7"/>443 <EditorIndex Value="11"/> 446 444 <WindowIndex Value="0"/> 447 445 <TopLine Value="120"/> 448 446 <CursorPos X="44" Y="150"/> 449 <UsageCount Value="3 6"/>447 <UsageCount Value="37"/> 450 448 <Loaded Value="True"/> 451 449 </Unit50> … … 469 467 <IsPartOfProject Value="True"/> 470 468 <UnitName Value="UPersistentForm"/> 471 <EditorIndex Value=" 5"/>469 <EditorIndex Value="9"/> 472 470 <WindowIndex Value="0"/> 473 471 <TopLine Value="69"/> 474 472 <CursorPos X="3" Y="90"/> 475 <UsageCount Value=" 29"/>473 <UsageCount Value="30"/> 476 474 <Loaded Value="True"/> 477 475 </Unit53> … … 480 478 <IsPartOfProject Value="True"/> 481 479 <UnitName Value="UApplicationInfo"/> 482 <EditorIndex Value=" 6"/>480 <EditorIndex Value="10"/> 483 481 <WindowIndex Value="0"/> 484 482 <TopLine Value="1"/> 485 483 <CursorPos X="70" Y="42"/> 486 <UsageCount Value=" 29"/>484 <UsageCount Value="30"/> 487 485 <Loaded Value="True"/> 488 486 </Unit54> … … 491 489 <IsPartOfProject Value="True"/> 492 490 <UnitName Value="URegistry"/> 493 <UsageCount Value="2 8"/>491 <UsageCount Value="29"/> 494 492 </Unit55> 495 493 <Unit56> … … 518 516 <IsPartOfProject Value="True"/> 519 517 <UnitName Value="UThreading"/> 520 <EditorIndex Value=" 1"/>518 <EditorIndex Value="5"/> 521 519 <WindowIndex Value="0"/> 522 520 <TopLine Value="79"/> 523 521 <CursorPos X="13" Y="95"/> 524 <UsageCount Value="2 0"/>522 <UsageCount Value="21"/> 525 523 <Loaded Value="True"/> 526 524 </Unit59> 525 <Unit60> 526 <Filename Value="/usr/share/fpcsrc/2.4.2/packages/fcl-base/src/contnrs.pp"/> 527 <UnitName Value="contnrs"/> 528 <EditorIndex Value="4"/> 529 <WindowIndex Value="0"/> 530 <TopLine Value="55"/> 531 <CursorPos X="3" Y="72"/> 532 <UsageCount Value="10"/> 533 <Loaded Value="True"/> 534 </Unit60> 535 <Unit61> 536 <Filename Value="Forms/UNewGameForm.pas"/> 537 <IsPartOfProject Value="True"/> 538 <ComponentName Value="NewGameForm"/> 539 <ResourceBaseClass Value="Form"/> 540 <UnitName Value="UNewGameForm"/> 541 <EditorIndex Value="1"/> 542 <WindowIndex Value="0"/> 543 <TopLine Value="27"/> 544 <CursorPos X="51" Y="42"/> 545 <UsageCount Value="21"/> 546 <Loaded Value="True"/> 547 <LoadedDesigner Value="True"/> 548 </Unit61> 549 <Unit62> 550 <Filename Value="Forms/UMainForm.pas"/> 551 <IsPartOfProject Value="True"/> 552 <ComponentName Value="MainForm"/> 553 <HasResources Value="True"/> 554 <ResourceBaseClass Value="Form"/> 555 <UnitName Value="UMainForm"/> 556 <IsVisibleTab Value="True"/> 557 <EditorIndex Value="2"/> 558 <WindowIndex Value="0"/> 559 <TopLine Value="204"/> 560 <CursorPos X="74" Y="228"/> 561 <UsageCount Value="21"/> 562 <Loaded Value="True"/> 563 <LoadedDesigner Value="True"/> 564 </Unit62> 565 <Unit63> 566 <Filename Value="Forms/UMapForm.pas"/> 567 <IsPartOfProject Value="True"/> 568 <ComponentName Value="MapForm"/> 569 <HasResources Value="True"/> 570 <ResourceBaseClass Value="Form"/> 571 <UnitName Value="UMapForm"/> 572 <EditorIndex Value="12"/> 573 <WindowIndex Value="0"/> 574 <TopLine Value="1"/> 575 <CursorPos X="10" Y="5"/> 576 <UsageCount Value="21"/> 577 <Loaded Value="True"/> 578 <LoadedDesigner Value="True"/> 579 </Unit63> 527 580 </Units> 528 581 <JumpHistory Count="30" HistoryIndex="29"> 529 582 <Position1> 530 583 <Filename Value="UCore.pas"/> 531 <Caret Line=" 970" Column="1" TopLine="946"/>584 <Caret Line="1006" Column="1" TopLine="987"/> 532 585 </Position1> 533 586 <Position2> 534 587 <Filename Value="UCore.pas"/> 535 <Caret Line=" 973" Column="1" TopLine="946"/>588 <Caret Line="1007" Column="1" TopLine="987"/> 536 589 </Position2> 537 590 <Position3> 538 591 <Filename Value="UCore.pas"/> 539 <Caret Line=" 930" Column="1" TopLine="924"/>592 <Caret Line="1008" Column="1" TopLine="987"/> 540 593 </Position3> 541 594 <Position4> 542 595 <Filename Value="UCore.pas"/> 543 <Caret Line=" 931" Column="1" TopLine="924"/>596 <Caret Line="1009" Column="1" TopLine="987"/> 544 597 </Position4> 545 598 <Position5> 546 599 <Filename Value="UCore.pas"/> 547 <Caret Line=" 932" Column="1" TopLine="924"/>600 <Caret Line="1010" Column="1" TopLine="987"/> 548 601 </Position5> 549 602 <Position6> 550 603 <Filename Value="UCore.pas"/> 551 <Caret Line=" 933" Column="1" TopLine="924"/>604 <Caret Line="1011" Column="1" TopLine="987"/> 552 605 </Position6> 553 606 <Position7> 554 607 <Filename Value="UCore.pas"/> 555 <Caret Line=" 934" Column="1" TopLine="924"/>608 <Caret Line="1012" Column="1" TopLine="987"/> 556 609 </Position7> 557 610 <Position8> 558 611 <Filename Value="UCore.pas"/> 559 <Caret Line=" 933" Column="1" TopLine="924"/>612 <Caret Line="1068" Column="1" TopLine="1038"/> 560 613 </Position8> 561 614 <Position9> 562 615 <Filename Value="UCore.pas"/> 563 <Caret Line=" 934" Column="1" TopLine="924"/>616 <Caret Line="170" Column="15" TopLine="153"/> 564 617 </Position9> 565 618 <Position10> 566 619 <Filename Value="UCore.pas"/> 567 <Caret Line=" 933" Column="1" TopLine="924"/>620 <Caret Line="826" Column="1" TopLine="809"/> 568 621 </Position10> 569 622 <Position11> 570 623 <Filename Value="UCore.pas"/> 571 <Caret Line=" 934" Column="1" TopLine="924"/>624 <Caret Line="827" Column="1" TopLine="809"/> 572 625 </Position11> 573 626 <Position12> 574 627 <Filename Value="UCore.pas"/> 575 <Caret Line=" 933" Column="1" TopLine="924"/>628 <Caret Line="166" Column="23" TopLine="140"/> 576 629 </Position12> 577 630 <Position13> 578 <Filename Value=" UCore.pas"/>579 <Caret Line=" 934" Column="1" TopLine="924"/>631 <Filename Value="Forms/UNewGameForm.pas"/> 632 <Caret Line="12" Column="31" TopLine="1"/> 580 633 </Position13> 581 634 <Position14> 582 <Filename Value=" UCore.pas"/>583 <Caret Line=" 937" Column="1" TopLine="924"/>635 <Filename Value="Forms/UNewGameForm.pas"/> 636 <Caret Line="16" Column="31" TopLine="1"/> 584 637 </Position14> 585 638 <Position15> 586 <Filename Value=" UCore.pas"/>587 <Caret Line=" 939" Column="1" TopLine="924"/>639 <Filename Value="Forms/UNewGameForm.pas"/> 640 <Caret Line="17" Column="31" TopLine="1"/> 588 641 </Position15> 589 642 <Position16> 590 <Filename Value=" UMainForm.pas"/>591 <Caret Line="1 23" Column="3" TopLine="121"/>643 <Filename Value="Forms/UNewGameForm.pas"/> 644 <Caret Line="18" Column="31" TopLine="1"/> 592 645 </Position16> 593 646 <Position17> 594 <Filename Value=" UCore.pas"/>595 <Caret Line=" 161" Column="28" TopLine="153"/>647 <Filename Value="Forms/UNewGameForm.pas"/> 648 <Caret Line="21" Column="31" TopLine="1"/> 596 649 </Position17> 597 650 <Position18> 598 <Filename Value=" UCore.pas"/>599 <Caret Line=" 939" Column="1" TopLine="906"/>651 <Filename Value="Forms/UNewGameForm.pas"/> 652 <Caret Line="49" Column="28" TopLine="19"/> 600 653 </Position18> 601 654 <Position19> 602 <Filename Value=" UCore.pas"/>603 <Caret Line=" 895" Column="1" TopLine="874"/>655 <Filename Value="Forms/UNewGameForm.pas"/> 656 <Caret Line="52" Column="29" TopLine="21"/> 604 657 </Position19> 605 658 <Position20> 606 <Filename Value=" UCore.pas"/>607 <Caret Line=" 175" Column="57" TopLine="151"/>659 <Filename Value="Forms/UNewGameForm.pas"/> 660 <Caret Line="51" Column="30" TopLine="21"/> 608 661 </Position20> 609 662 <Position21> 610 663 <Filename Value="UCore.pas"/> 611 <Caret Line="8 23" Column="39" TopLine="811"/>664 <Caret Line="84" Column="18" TopLine="67"/> 612 665 </Position21> 613 666 <Position22> 614 <Filename Value=" UCore.pas"/>615 <Caret Line=" 1047" Column="11" TopLine="1030"/>667 <Filename Value="Forms/UNewGameForm.pas"/> 668 <Caret Line="50" Column="30" TopLine="21"/> 616 669 </Position22> 617 670 <Position23> 618 <Filename Value=" UCore.pas"/>619 <Caret Line=" 161" Column="17" TopLine="154"/>671 <Filename Value="Forms/UNewGameForm.pas"/> 672 <Caret Line="42" Column="14" TopLine="28"/> 620 673 </Position23> 621 674 <Position24> 622 <Filename Value=" UCore.pas"/>623 <Caret Line=" 876" Column="21" TopLine="876"/>675 <Filename Value="Forms/UMainForm.pas"/> 676 <Caret Line="5" Column="32" TopLine="1"/> 624 677 </Position24> 625 678 <Position25> 626 <Filename Value=" Common/UThreading.pas"/>627 <Caret Line=" 338" Column="1" TopLine="321"/>679 <Filename Value="Forms/UMainForm.pas"/> 680 <Caret Line="72" Column="26" TopLine="56"/> 628 681 </Position25> 629 682 <Position26> 630 <Filename Value=" UCore.pas"/>631 <Caret Line=" 223" Column="42" TopLine="205"/>683 <Filename Value="Forms/UMainForm.pas"/> 684 <Caret Line="189" Column="3" TopLine="187"/> 632 685 </Position26> 633 686 <Position27> 634 <Filename Value=" Common/UThreading.pas"/>635 <Caret Line=" 338" Column="10" TopLine="321"/>687 <Filename Value="Forms/UMainForm.pas"/> 688 <Caret Line="235" Column="1" TopLine="204"/> 636 689 </Position27> 637 690 <Position28> 638 <Filename Value=" Common/UThreading.pas"/>639 <Caret Line=" 337" Column="3" TopLine="330"/>691 <Filename Value="Forms/UMainForm.pas"/> 692 <Caret Line="202" Column="53" TopLine="187"/> 640 693 </Position28> 641 694 <Position29> 642 <Filename Value=" UCore.pas"/>643 <Caret Line=" 175" Column="53" TopLine="150"/>695 <Filename Value="Forms/UMainForm.pas"/> 696 <Caret Line="50" Column="1" TopLine="33"/> 644 697 </Position29> 645 698 <Position30> 646 <Filename Value=" UCore.pas"/>647 <Caret Line=" 221" Column="3" TopLine="189"/>699 <Filename Value="Forms/UMainForm.pas"/> 700 <Caret Line="181" Column="17" TopLine="171"/> 648 701 </Position30> 649 702 </JumpHistory> … … 656 709 <SearchPaths> 657 710 <IncludeFiles Value="$(ProjOutDir)"/> 658 <OtherUnitFiles Value="Common "/>711 <OtherUnitFiles Value="Common;Forms"/> 659 712 <UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/> 660 713 </SearchPaths> … … 667 720 </Linking> 668 721 <Other> 722 <CompilerMessages> 723 <UseMsgFile Value="True"/> 724 </CompilerMessages> 669 725 <CompilerPath Value="$(CompPath)"/> 670 726 </Other> 671 727 </CompilerOptions> 672 728 <Debugging> 673 <BreakPoints Count="1">674 <Item1>675 <Kind Value="bpkSource"/>676 <Source Value="UCore.pas"/>677 <Line Value="825"/>678 </Item1>679 </BreakPoints>680 729 <Exceptions Count="3"> 681 730 <Item1> -
trunk/tunneler.lpr
r19 r21 9 9 {$ENDIF}{$ENDIF} 10 10 Interfaces, // this includes the LCL widgetset 11 Forms, UMainForm, UCore, TemplateGenerics, UMapForm, UPlatform, 12 UApplicationInfo, URectangle, UPersistentForm, URegistry, UThreading 11 Forms, UCore, TemplateGenerics, CoolTranslator, UPlatform, 12 UApplicationInfo, URectangle, UPersistentForm, URegistry, UThreading, 13 UNewGameForm, UMainForm, UMapForm 13 14 { you can add units after this }; 14 15 … … 19 20 Application.CreateForm(TMainForm, MainForm); 20 21 Application.CreateForm(TMapForm, MapForm); 22 Application.CreateForm(TNewGameForm, NewGameForm); 21 23 Application.Run; 22 24 end.
Note:
See TracChangeset
for help on using the changeset viewer.