Changeset 177 for oup/current/Tools


Ignore:
Timestamp:
May 12, 2007, 3:22:11 PM (18 years ago)
Author:
alloc
Message:
 
Location:
oup/current/Tools
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • oup/current/Tools/BinEdit.dfm

    r174 r177  
    6262      Colors.EvenColumn = clNavy
    6363      Colors.CurrentOffsetBackground = clBtnShadow
    64       Colors.OffsetBackground = clBtnFace
     64      Colors.OffsetBackGround = clBtnFace
    6565      Colors.CurrentOffset = clBtnHighlight
    6666      Colors.Grid = clBtnFace
     
    7171      AllowInsertMode = False
    7272      DrawGridLines = False
    73       Version = 'december 06, 2006; '#169' markus stephany, vcl[at]mirkes[dot]de'
     73      Version = 'May 23, 2005; '#169' markus stephany, vcl[at]mirkes[dot]de'
    7474      OnChange = hexChange
    7575      ShowPositionIfNotFocused = True
  • oup/current/Tools/BinEdit.pas

    r174 r177  
    5959    fileid: Integer;
    6060    ConID: Integer;
     61    rawlist: TRawDataList;
    6162  public
    6263  end;
     
    6768implementation
    6869
    69 uses ValueEdit, Main, Functions, DatStructureLoader{, RawEdit};
     70uses ValueEdit, Main, Functions, DatStructureLoader, RawEdit;
    7071{$R *.dfm}
    7172
     
    161162    mem := nil;
    162163    ConManager.Connection[ConID].LoadDatFile(fileid, TStream(mem));
     164    rawlist := ConManager.Connection[ConID].GetRawList(fileid);
    163165    hex.LoadFromStream(mem);
    164166    mem.Free;
     
    173175    ClearValues;
    174176    hex.DataSize := 0;
     177    SetLength(rawlist, 0);
    175178  end;
    176179end;
     
    181184var
    182185  Data: TByteData;
    183   i:    Word;
     186  i:    Integer;
    184187  tempi: Integer;
    185188  floatformat: TFormatSettings;
     
    219222    11:
    220223    begin
    221       tempi := ConManager.Connection[ConID].GetRawInfo(fileid, offset).RawAddr;
    222       if tempi >= 0 then
    223         Result := '0x' + IntToHex(tempi, 8)
    224       else
    225         Result := 'unused';
     224      if Length(rawlist) > 0 then
     225        for i := 0 to High(rawlist) do
     226          if rawlist[i].SrcOffset = offset then
     227          begin
     228            if rawlist[i].RawAddr > 0 then
     229              Result := '0x' + IntToHex(rawlist[i].RawAddr, 8)
     230            else
     231              Result := 'unused';
     232            Break;
     233          end;
    226234    end;
    227235    12:
     
    745753  node: PVirtualNode;
    746754  nodedata: PNodeData;
     755  rawinfo: TRawDataInfo;
    747756  form: TForm_ToolTemplate;
    748757begin
     
    762771      if (nodedata.DataType = 11) and (nodedata.Value <> 'unused') then
    763772      begin
    764         if ConManager.Connection[ConID].GetRawInfo(fileid, nodedata.offset).RawSize > 0 then
    765           Form_Main.open_child('rawedit', ConID, fileid);
     773        rawinfo := ConManager.Connection[ConID].GetRawInfo(fileid, nodedata.offset);
     774        if rawinfo.RawSize > 0 then
     775        begin
     776          form := nil;
     777          form := Form_Main.open_child('rawedit', ConID, fileid);
     778          if Assigned(form) then
     779            TForm_RawEdit(form).LoadRaw(rawinfo);
     780        end;
    766781      end;
    767782      if (nodedata.DataType = 12) and (nodedata.Value <> 'no link') then
  • oup/current/Tools/RawEdit.dfm

    r175 r177  
    118118      Colors.EvenColumn = clNavy
    119119      Colors.CurrentOffsetBackground = clBtnShadow
    120       Colors.OffsetBackground = clBtnFace
     120      Colors.OffsetBackGround = clBtnFace
    121121      Colors.CurrentOffset = clBtnHighlight
    122122      Colors.Grid = clBtnFace
     
    127127      AllowInsertMode = False
    128128      DrawGridLines = False
    129       Version = 'december 06, 2006; '#169' markus stephany, vcl[at]mirkes[dot]de'
     129      Version = 'May 23, 2005; '#169' markus stephany, vcl[at]mirkes[dot]de'
    130130      OnChange = hexChange
    131131      ShowPositionIfNotFocused = True
  • oup/current/Tools/RawEdit.pas

    r175 r177  
    102102var
    103103  i:    Integer;
     104begin
     105  if hex.Modified then
     106  begin
     107    if not Save then
     108    begin
     109      Exit;
     110    end;
     111  end;
     112  for i := 0 to filelist.Count - 1 do
     113  begin
     114    if ConManager.Connection[ConnectionID].ExtractFileIDOfName(filelist.Items.Strings[i]) = Raw_Info.SrcID then
     115    begin
     116      filelist.ItemIndex := i;
     117      listClick(Self);
     118      Break;
     119    end;
     120  end;
     121  for i := 0 to list_offset.Count - 1 do
     122  begin
     123    if MidStr(list_offset.Items.Strings[i], 3, 8) = IntToHex(raw_info.SrcOffset, 8) then
     124    begin
     125      list_offset.ItemIndex := i;
     126      list_offsetClick(Self);
     127      Break;
     128    end;
     129  end;
     130end;
     131
     132
     133
     134
     135
     136
     137procedure TForm_RawEdit.list_offsetClick(Sender: TObject);
     138var
    104139  mem: TMemoryStream;
    105 begin
    106   if hex.Modified then
    107   begin
    108     if not Save then
    109     begin
    110       Exit;
    111     end;
    112   end;
    113   if list_offset.Count = 0 then
    114   begin
    115     for i := 0 to filelist.Count - 1 do
    116     begin
    117       if ConManager.Connection[ConnectionID].ExtractFileIDOfName(filelist.Items.Strings[i]) = Raw_Info.SrcID then
    118       begin
    119         filelist.ItemIndex := i;
    120         listClick(Self);
    121         Break;
    122       end;
    123     end;
    124     for i := 0 to list_offset.Count - 1 do
    125     begin
    126       if MidStr(list_offset.Items.Strings[i], 3, 8) = IntToHex(raw_info.SrcOffset, 8) then
    127       begin
    128         list_offset.ItemIndex := i;
    129         Break;
    130       end;
    131     end;
    132   end;
     140  rawinfo: TRawDataInfo;
     141begin
     142  datoffset := StrToInt('$' + MidStr(
     143    list_offset.Items.Strings[list_offset.ItemIndex], 3, 8));
     144
     145  rawinfo := ConManager.Connection[ConnectionID].GetRawInfo(fileid, datoffset);
     146
    133147  mem := nil;
    134   ConManager.Connection[ConnectionID].LoadRawFile(raw_info.SrcID, raw_info.SrcOffset, TStream(mem));
     148  ConManager.Connection[ConnectionID].LoadRawFile(rawinfo.SrcID, rawinfo.SrcOffset, TStream(mem));
    135149  hex.LoadFromStream(mem);
    136150  ClearValues;
    137151  hexSelectionChanged(Self);
    138 end;
    139 
    140 
    141 
    142 
    143 
    144 
    145 procedure TForm_RawEdit.list_offsetClick(Sender: TObject);
    146 begin
    147   ClearValues;
    148   datoffset := StrToInt('$' + MidStr(
    149     list_offset.Items.Strings[list_offset.ItemIndex], 3, 8));
    150   LoadRaw(ConManager.Connection[ConnectionID].GetRawInfo(fileid, datoffset));
    151152end;
    152153
  • oup/current/Tools/TxmpReplace.dfm

    r105 r177  
    22  Caption = 'TxmpReplace'
    33  OnCreate = FormCreate
     4  ExplicitWidth = 500
     5  ExplicitHeight = 450
    46  PixelsPerInch = 96
    57  TextHeight = 13
     
    3941    end
    4042    inherited panel_extension: TPanel
    41       Visible = False
     43      inherited label_ext: TLabel
     44        Visible = False
     45      end
     46      inherited combo_extension: TComboBox
     47        Visible = False
     48      end
     49      inherited check_zerobyte: TCheckBox
     50        Visible = False
     51      end
    4252    end
    4353    object panel_txmppreview: TPanel
Note: See TracChangeset for help on using the changeset viewer.