Changeset 16


Ignore:
Timestamp:
Mar 24, 2011, 7:05:53 AM (13 years ago)
Author:
george
Message:
  • Added: Menu action to view RawImage description.
Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/UCore.pas

    r15 r16  
    888888      TPlayer(Players[I]).Paint;
    889889    end;
     890
    890891    if Assigned(FBitmap) then
    891892    try
  • trunk/UMainForm.lfm

    r14 r16  
    55  Width = 514
    66  Caption = 'Tunneler'
    7   ClientHeight = 389
     7  ClientHeight = 393
    88  ClientWidth = 514
    99  Menu = MainMenu1
     
    1717  object StatusBar1: TStatusBar
    1818    Left = 0
    19     Height = 17
    20     Top = 372
     19    Height = 20
     20    Top = 373
    2121    Width = 514
    2222    Panels = <   
     
    4646  object Image1: TImage
    4747    Left = 0
    48     Height = 372
     48    Height = 373
    4949    Top = 0
    5050    Width = 514
     
    7878        Action = AFullScreen
    7979      end
     80      object MenuItem8: TMenuItem
     81        Action = AShowRawImageDesc
     82      end
     83    end
     84    object MenuItem7: TMenuItem
     85      Action = AAbout
    8086    end
    8187  end
     
    109115      ShortCut = 123
    110116    end
     117    object AAbout: TAction
     118      Caption = 'About'
     119    end
     120    object AShowRawImageDesc: TAction
     121      Caption = 'Show RawImage Description'
     122      OnExecute = AShowRawImageDescExecute
     123    end
    111124  end
    112125end
  • trunk/UMainForm.pas

    r14 r16  
    77uses
    88  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ExtCtrls,
    9   ComCtrls, Menus, ActnList, UCore, UPlatform, Math, DateUtils;
     9  ComCtrls, Menus, ActnList, UCore, UPlatform, Math, DateUtils, GraphType;
    1010
    1111type
     
    1414
    1515  TMainForm = class(TForm)
     16    AAbout: TAction;
     17    AShowRawImageDesc: TAction;
    1618    AShowMap: TAction;
    1719    ANewGame: TAction;
     
    2729    MenuItem5: TMenuItem;
    2830    MenuItem6: TMenuItem;
     31    MenuItem7: TMenuItem;
     32    MenuItem8: TMenuItem;
    2933    StatusBar1: TStatusBar;
    3034    TimerDraw: TTimer;
     
    3438    procedure ANewGameExecute(Sender: TObject);
    3539    procedure AShowMapExecute(Sender: TObject);
     40    procedure AShowRawImageDescExecute(Sender: TObject);
    3641    procedure FormCreate(Sender: TObject);
    3742    procedure FormDeactivate(Sender: TObject);
     
    172177end;
    173178
     179procedure TMainForm.AShowRawImageDescExecute(Sender: TObject);
     180var
     181  List: TStringList;
     182begin
     183  with Image1.Picture.Bitmap.RawImage, Description do
     184  try
     185    List := TStringList.Create;
     186    with List do begin
     187      Add('Format: ' + RawImageColorFormatNames[Format]);
     188      Add('Width: ' + IntToStr(Width));
     189      Add('Height: ' + IntToStr(Height));
     190      Add('Depth: ' + IntToStr(Depth));
     191      Add('BitOrder: ' + RawImageBitOrderNames[BitOrder]);
     192      Add('ByteOrder: ' + RawImageByteOrderNames[ByteOrder]);
     193      Add('LineOrder: ' + RawImageLineOrderNames[LineOrder]);
     194      Add('LineEnd: ' + RawImageLineEndNames[LineEnd]);
     195      Add('BitsPerPixel: ' + IntToStr(BitsPerPixel));
     196      Add('RedPrec: ' + IntToStr(RedPrec));
     197      Add('RedShift: ' + IntToStr(RedShift));
     198      Add('GreenPrec: ' + IntToStr(GreenPrec));
     199      Add('GreenShift: ' + IntToStr(GreenShift));
     200      Add('BluePrec: ' + IntToStr(BluePrec));
     201      Add('BlueShift: ' + IntToStr(BlueShift));
     202      Add('AlphaPrec: ' + IntToStr(AlphaPrec));
     203      Add('AlphaShift: ' + IntToStr(AlphaShift));
     204    end;
     205    ShowMessage(List.Text);
     206  finally
     207    List.Free;
     208  end;
     209end;
     210
    174211procedure TMainForm.AExitExecute(Sender: TObject);
    175212begin
  • trunk/tunneler.lpi

    r15 r16  
    4242      </Item3>
    4343    </RequiredPackages>
    44     <Units Count="52">
     44    <Units Count="53">
    4545      <Unit0>
    4646        <Filename Value="tunneler.lpr"/>
     
    5858        <ResourceBaseClass Value="Form"/>
    5959        <UnitName Value="UMainForm"/>
    60         <EditorIndex Value="11"/>
    61         <WindowIndex Value="0"/>
    62         <TopLine Value="19"/>
    63         <CursorPos X="90" Y="28"/>
     60        <IsVisibleTab Value="True"/>
     61        <EditorIndex Value="4"/>
     62        <WindowIndex Value="0"/>
     63        <TopLine Value="190"/>
     64        <CursorPos X="1" Y="206"/>
    6465        <UsageCount Value="83"/>
    6566        <Loaded Value="True"/>
     
    7071        <IsPartOfProject Value="True"/>
    7172        <UnitName Value="UCore"/>
    72         <IsVisibleTab Value="True"/>
    7373        <EditorIndex Value="0"/>
    7474        <WindowIndex Value="0"/>
    75         <TopLine Value="1"/>
    76         <CursorPos X="18" Y="14"/>
     75        <TopLine Value="885"/>
     76        <CursorPos X="40" Y="895"/>
    7777        <UsageCount Value="83"/>
    7878        <Loaded Value="True"/>
     
    104104      <Unit6>
    105105        <Filename Value="/usr/share/fpcsrc/2.4.0/rtl/objpas/classes/classesh.inc"/>
    106         <EditorIndex Value="5"/>
    107106        <WindowIndex Value="0"/>
    108107        <TopLine Value="19"/>
    109108        <CursorPos X="4" Y="36"/>
    110109        <UsageCount Value="14"/>
    111         <Loaded Value="True"/>
    112110      </Unit6>
    113111      <Unit7>
     
    143141      <Unit11>
    144142        <Filename Value="../../PascalClassLibrary/Generics/TemplateGenerics/Generic/GenericMatrix.inc"/>
    145         <EditorIndex Value="4"/>
    146143        <WindowIndex Value="0"/>
    147144        <TopLine Value="152"/>
    148145        <CursorPos X="1" Y="158"/>
    149146        <UsageCount Value="34"/>
    150         <Loaded Value="True"/>
    151147      </Unit11>
    152148      <Unit12>
     
    175171      <Unit15>
    176172        <Filename Value="../../PascalClassLibrary/Generics/TemplateGenerics/Generic/GenericList.inc"/>
    177         <EditorIndex Value="1"/>
    178173        <WindowIndex Value="0"/>
    179174        <TopLine Value="10"/>
    180175        <CursorPos X="21" Y="13"/>
    181176        <UsageCount Value="23"/>
    182         <Loaded Value="True"/>
    183177      </Unit15>
    184178      <Unit16>
     
    267261        <ResourceBaseClass Value="Form"/>
    268262        <UnitName Value="UMapForm"/>
    269         <EditorIndex Value="10"/>
     263        <EditorIndex Value="3"/>
    270264        <WindowIndex Value="0"/>
    271265        <TopLine Value="6"/>
     
    290284      <Unit30>
    291285        <Filename Value="/usr/share/fpcsrc/2.4.0/rtl/inc/mathh.inc"/>
    292         <EditorIndex Value="3"/>
    293286        <WindowIndex Value="0"/>
    294287        <TopLine Value="58"/>
    295288        <CursorPos X="14" Y="75"/>
    296289        <UsageCount Value="16"/>
    297         <Loaded Value="True"/>
    298290      </Unit30>
    299291      <Unit31>
     
    307299        <Filename Value="../../../lazarus/lcl/intfgraphics.pas"/>
    308300        <UnitName Value="IntfGraphics"/>
    309         <EditorIndex Value="9"/>
    310301        <WindowIndex Value="0"/>
    311302        <TopLine Value="3131"/>
    312303        <CursorPos X="42" Y="3148"/>
    313304        <UsageCount Value="17"/>
    314         <Loaded Value="True"/>
    315305      </Unit32>
    316306      <Unit33>
     
    339329      <Unit36>
    340330        <Filename Value="../../PascalClassLibrary/Generics/TemplateGenerics/Generic/GenericBitmap.inc"/>
    341         <EditorIndex Value="7"/>
    342331        <WindowIndex Value="0"/>
    343332        <TopLine Value="25"/>
    344333        <CursorPos X="14" Y="25"/>
    345334        <UsageCount Value="21"/>
    346         <Loaded Value="True"/>
    347335      </Unit36>
    348336      <Unit37>
     
    432420      <Unit48>
    433421        <Filename Value="../../../lazarus/lcl/include/custombitmap.inc"/>
    434         <EditorIndex Value="8"/>
    435422        <WindowIndex Value="0"/>
    436423        <TopLine Value="330"/>
    437424        <CursorPos X="35" Y="338"/>
    438425        <UsageCount Value="17"/>
    439         <Loaded Value="True"/>
    440426      </Unit48>
    441427      <Unit49>
     
    451437        <IsPartOfProject Value="True"/>
    452438        <UnitName Value="URectangle"/>
    453         <EditorIndex Value="6"/>
     439        <EditorIndex Value="2"/>
    454440        <WindowIndex Value="0"/>
    455441        <TopLine Value="120"/>
     
    460446      <Unit51>
    461447        <Filename Value="/usr/share/fpcsrc/2.4.0/rtl/objpas/sysutils/sysstrh.inc"/>
    462         <EditorIndex Value="2"/>
    463448        <WindowIndex Value="0"/>
    464449        <TopLine Value="147"/>
    465450        <CursorPos X="10" Y="84"/>
    466451        <UsageCount Value="12"/>
     452      </Unit51>
     453      <Unit52>
     454        <Filename Value="../../FreePascalManager/trunk/Instance/1/Lazarus/lcl/graphtype.pp"/>
     455        <UnitName Value="GraphType"/>
     456        <EditorIndex Value="1"/>
     457        <WindowIndex Value="0"/>
     458        <TopLine Value="66"/>
     459        <CursorPos X="20" Y="79"/>
     460        <UsageCount Value="10"/>
    467461        <Loaded Value="True"/>
    468       </Unit51>
     462      </Unit52>
    469463    </Units>
    470     <JumpHistory Count="30" HistoryIndex="29">
     464    <JumpHistory Count="25" HistoryIndex="24">
    471465      <Position1>
    472         <Filename Value="../../PascalClassLibrary/Generics/TemplateGenerics/Generic/GenericList.inc"/>
    473         <Caret Line="214" Column="13" TopLine="188"/>
     466        <Filename Value="UCore.pas"/>
     467        <Caret Line="102" Column="1" TopLine="72"/>
    474468      </Position1>
    475469      <Position2>
    476         <Filename Value="../../PascalClassLibrary/Generics/TemplateGenerics/Generic/GenericList.inc"/>
    477         <Caret Line="51" Column="26" TopLine="34"/>
     470        <Filename Value="UCore.pas"/>
     471        <Caret Line="420" Column="8" TopLine="391"/>
    478472      </Position2>
    479473      <Position3>
    480474        <Filename Value="UCore.pas"/>
    481         <Caret Line="886" Column="6" TopLine="866"/>
     475        <Caret Line="379" Column="42" TopLine="361"/>
    482476      </Position3>
    483477      <Position4>
    484         <Filename Value="UMainForm.pas"/>
    485         <Caret Line="49" Column="56" TopLine="34"/>
     478        <Filename Value="UCore.pas"/>
     479        <Caret Line="453" Column="17" TopLine="433"/>
    486480      </Position4>
    487481      <Position5>
    488         <Filename Value="UMainForm.pas"/>
    489         <Caret Line="146" Column="5" TopLine="132"/>
     482        <Filename Value="UCore.pas"/>
     483        <Caret Line="480" Column="88" TopLine="447"/>
    490484      </Position5>
    491485      <Position6>
    492         <Filename Value="UMainForm.pas"/>
    493         <Caret Line="176" Column="20" TopLine="174"/>
     486        <Filename Value="UCore.pas"/>
     487        <Caret Line="521" Column="66" TopLine="496"/>
    494488      </Position6>
    495489      <Position7>
    496         <Filename Value="UMainForm.pas"/>
    497         <Caret Line="94" Column="37" TopLine="92"/>
     490        <Filename Value="UCore.pas"/>
     491        <Caret Line="935" Column="26" TopLine="924"/>
    498492      </Position7>
    499493      <Position8>
    500         <Filename Value="UMainForm.pas"/>
    501         <Caret Line="135" Column="7" TopLine="133"/>
     494        <Filename Value="UCore.pas"/>
     495        <Caret Line="895" Column="40" TopLine="885"/>
    502496      </Position8>
    503497      <Position9>
    504         <Filename Value="UCore.pas"/>
    505         <Caret Line="156" Column="13" TopLine="139"/>
     498        <Filename Value="../../FreePascalManager/trunk/Instance/1/Lazarus/lcl/graphtype.pp"/>
     499        <Caret Line="189" Column="31" TopLine="176"/>
    506500      </Position9>
    507501      <Position10>
    508         <Filename Value="UCore.pas"/>
    509         <Caret Line="119" Column="24" TopLine="110"/>
     502        <Filename Value="UMainForm.pas"/>
     503        <Caret Line="28" Column="90" TopLine="19"/>
    510504      </Position10>
    511505      <Position11>
    512         <Filename Value="UCore.pas"/>
    513         <Caret Line="788" Column="15" TopLine="771"/>
     506        <Filename Value="UMainForm.pas"/>
     507        <Caret Line="29" Column="90" TopLine="20"/>
    514508      </Position11>
    515509      <Position12>
    516         <Filename Value="UCore.pas"/>
    517         <Caret Line="340" Column="22" TopLine="320"/>
     510        <Filename Value="UMainForm.pas"/>
     511        <Caret Line="30" Column="90" TopLine="21"/>
    518512      </Position12>
    519513      <Position13>
    520514        <Filename Value="UMainForm.pas"/>
    521         <Caret Line="135" Column="27" TopLine="118"/>
     515        <Caret Line="31" Column="90" TopLine="21"/>
    522516      </Position13>
    523517      <Position14>
    524518        <Filename Value="UMainForm.pas"/>
    525         <Caret Line="95" Column="1" TopLine="92"/>
     519        <Caret Line="8" Column="30" TopLine="1"/>
    526520      </Position14>
    527521      <Position15>
    528522        <Filename Value="UMainForm.pas"/>
    529         <Caret Line="175" Column="1" TopLine="171"/>
     523        <Caret Line="181" Column="46" TopLine="179"/>
    530524      </Position15>
    531525      <Position16>
    532         <Filename Value="UCore.pas"/>
    533         <Caret Line="411" Column="10" TopLine="384"/>
     526        <Filename Value="../../FreePascalManager/trunk/Instance/1/Lazarus/lcl/graphtype.pp"/>
     527        <Caret Line="189" Column="28" TopLine="176"/>
    534528      </Position16>
    535529      <Position17>
    536         <Filename Value="UCore.pas"/>
    537         <Caret Line="83" Column="19" TopLine="65"/>
     530        <Filename Value="UMainForm.pas"/>
     531        <Caret Line="188" Column="25" TopLine="180"/>
    538532      </Position17>
    539533      <Position18>
    540         <Filename Value="UCore.pas"/>
    541         <Caret Line="25" Column="14" TopLine="18"/>
     534        <Filename Value="../../FreePascalManager/trunk/Instance/1/Lazarus/lcl/graphtype.pp"/>
     535        <Caret Line="66" Column="23" TopLine="53"/>
    542536      </Position18>
    543537      <Position19>
    544         <Filename Value="UCore.pas"/>
    545         <Caret Line="157" Column="59" TopLine="142"/>
     538        <Filename Value="../../FreePascalManager/trunk/Instance/1/Lazarus/lcl/graphtype.pp"/>
     539        <Caret Line="114" Column="33" TopLine="93"/>
    546540      </Position19>
    547541      <Position20>
    548         <Filename Value="UCore.pas"/>
    549         <Caret Line="438" Column="67" TopLine="420"/>
     542        <Filename Value="UMainForm.pas"/>
     543        <Caret Line="183" Column="45" TopLine="180"/>
    550544      </Position20>
    551545      <Position21>
    552         <Filename Value="UCore.pas"/>
    553         <Caret Line="423" Column="16" TopLine="416"/>
     546        <Filename Value="UMainForm.pas"/>
     547        <Caret Line="187" Column="43" TopLine="180"/>
    554548      </Position21>
    555549      <Position22>
    556         <Filename Value="UCore.pas"/>
    557         <Caret Line="89" Column="24" TopLine="61"/>
     550        <Filename Value="UMainForm.pas"/>
     551        <Caret Line="183" Column="46" TopLine="174"/>
    558552      </Position22>
    559553      <Position23>
    560         <Filename Value="UCore.pas"/>
    561         <Caret Line="585" Column="31" TopLine="575"/>
     554        <Filename Value="UMainForm.pas"/>
     555        <Caret Line="9" Column="74" TopLine="1"/>
    562556      </Position23>
    563557      <Position24>
    564         <Filename Value="UCore.pas"/>
    565         <Caret Line="586" Column="12" TopLine="578"/>
     558        <Filename Value="UMainForm.pas"/>
     559        <Caret Line="191" Column="29" TopLine="175"/>
    566560      </Position24>
    567561      <Position25>
    568         <Filename Value="UCore.pas"/>
    569         <Caret Line="102" Column="1" TopLine="72"/>
     562        <Filename Value="UMainForm.pas"/>
     563        <Caret Line="188" Column="5" TopLine="180"/>
    570564      </Position25>
    571       <Position26>
    572         <Filename Value="UCore.pas"/>
    573         <Caret Line="420" Column="8" TopLine="391"/>
    574       </Position26>
    575       <Position27>
    576         <Filename Value="UCore.pas"/>
    577         <Caret Line="379" Column="42" TopLine="361"/>
    578       </Position27>
    579       <Position28>
    580         <Filename Value="UCore.pas"/>
    581         <Caret Line="453" Column="17" TopLine="433"/>
    582       </Position28>
    583       <Position29>
    584         <Filename Value="UCore.pas"/>
    585         <Caret Line="480" Column="88" TopLine="447"/>
    586       </Position29>
    587       <Position30>
    588         <Filename Value="UCore.pas"/>
    589         <Caret Line="521" Column="66" TopLine="496"/>
    590       </Position30>
    591565    </JumpHistory>
    592566  </ProjectOptions>
Note: See TracChangeset for help on using the changeset viewer.