| 21 |
|
value_viewer_context_copyasstring: TMenuItem; |
| 22 |
|
value_viewer_context_copyashex: TMenuItem; |
| 23 |
|
VTHPopup: TVTHeaderPopupMenu; |
| 24 |
+ |
panel_imexport: TPanel; |
| 25 |
+ |
btn_export: TButton; |
| 26 |
+ |
btn_import: TButton; |
| 27 |
|
procedure FormCreate(Sender: TObject); |
| 28 |
|
procedure NewFile(fileinfo: TFileInfo); |
| 29 |
|
|
| 61 |
|
private |
| 62 |
|
fileid: Integer; |
| 63 |
|
ConID: Integer; |
| 64 |
+ |
rawlist: TRawDataList; |
| 65 |
|
public |
| 66 |
|
end; |
| 67 |
|
|
| 70 |
|
|
| 71 |
|
implementation |
| 72 |
|
|
| 73 |
< |
uses ValueEdit, Main, Functions, DatStructureLoader{, RawEdit}; |
| 73 |
> |
uses ValueEdit, Main, Functions, DatStructureLoader, RawEdit; |
| 74 |
|
{$R *.dfm} |
| 75 |
|
|
| 76 |
|
type |
| 164 |
|
Self.ClearStructViewer; |
| 165 |
|
mem := nil; |
| 166 |
|
ConManager.Connection[ConID].LoadDatFile(fileid, TStream(mem)); |
| 167 |
+ |
rawlist := ConManager.Connection[ConID].GetRawList(fileid); |
| 168 |
|
hex.LoadFromStream(mem); |
| 169 |
|
mem.Free; |
| 170 |
|
ClearValues; |
| 177 |
|
Self.ClearStructViewer; |
| 178 |
|
ClearValues; |
| 179 |
|
hex.DataSize := 0; |
| 180 |
+ |
SetLength(rawlist, 0); |
| 181 |
|
end; |
| 182 |
|
end; |
| 183 |
|
|
| 186 |
|
function TForm_BinEdit.GetValue(datatype: Word; offset: Integer): String; |
| 187 |
|
var |
| 188 |
|
Data: TByteData; |
| 189 |
< |
i: Word; |
| 189 |
> |
i: Integer; |
| 190 |
|
tempi: Integer; |
| 191 |
|
floatformat: TFormatSettings; |
| 192 |
|
begin |
| 224 |
|
Result := IntToBin(hex.Data[offset]); |
| 225 |
|
11: |
| 226 |
|
begin |
| 227 |
< |
tempi := ConManager.Connection[ConID].GetRawInfo(fileid, offset).RawAddr; |
| 228 |
< |
if tempi >= 0 then |
| 229 |
< |
Result := '0x' + IntToHex(tempi, 8) |
| 230 |
< |
else |
| 231 |
< |
Result := 'unused'; |
| 227 |
> |
if Length(rawlist) > 0 then |
| 228 |
> |
for i := 0 to High(rawlist) do |
| 229 |
> |
if rawlist[i].SrcOffset = offset then |
| 230 |
> |
begin |
| 231 |
> |
if rawlist[i].RawAddr > 0 then |
| 232 |
> |
Result := '0x' + IntToHex(rawlist[i].RawAddr, 8) |
| 233 |
> |
else |
| 234 |
> |
Result := 'unused'; |
| 235 |
> |
Break; |
| 236 |
> |
end; |
| 237 |
|
end; |
| 238 |
|
12: |
| 239 |
|
if hex.Data[offset] = 1 then |
| 755 |
|
var |
| 756 |
|
node: PVirtualNode; |
| 757 |
|
nodedata: PNodeData; |
| 758 |
+ |
rawinfo: TRawDataInfo; |
| 759 |
|
form: TForm_ToolTemplate; |
| 760 |
|
begin |
| 761 |
|
if VST.FocusedColumn = 3 then |
| 773 |
|
begin |
| 774 |
|
if (nodedata.DataType = 11) and (nodedata.Value <> 'unused') then |
| 775 |
|
begin |
| 776 |
< |
if ConManager.Connection[ConID].GetRawInfo(fileid, nodedata.offset).RawSize > 0 then |
| 777 |
< |
Form_Main.open_child('rawedit', ConID, fileid); |
| 776 |
> |
rawinfo := ConManager.Connection[ConID].GetRawInfo(fileid, nodedata.offset); |
| 777 |
> |
if rawinfo.RawSize > 0 then |
| 778 |
> |
begin |
| 779 |
> |
form := nil; |
| 780 |
> |
form := Form_Main.open_child('rawedit', ConID, fileid); |
| 781 |
> |
if Assigned(form) then |
| 782 |
> |
TForm_RawEdit(form).LoadRaw(rawinfo); |
| 783 |
> |
end; |
| 784 |
|
end; |
| 785 |
|
if (nodedata.DataType = 12) and (nodedata.Value <> 'no link') then |
| 786 |
|
begin |