-
Notifications
You must be signed in to change notification settings - Fork 4
/
Inspector.bt
56 lines (52 loc) · 2.05 KB
/
Inspector.bt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
// -*- mode: c;-*-
//-----------------------------------
//--- 010 Editor v4.0 Binary Template
//
// File: Inspector.bt
// Author: SweetScape Software
// Revision: 1.1
// Purpose: This template may be used
// to customize the auto tab of the
// Inspector with your own variables.
// See the Inspector section of the
// Options dialog for more information.
// Changes:
// 1.1 (SweetScape):
// - Added hfloat data type.
//-----------------------------------
RequiresVersion( 4.0 );
// Calculate the position for each variable,
// either at the beginning of the selection
// or at the current cursor position.
local int64 pos;
if( GetSelSize() > 0 )
pos = GetSelStart();
else
pos = GetCursorPos();
// Define variables for the inspector
FSeek( pos ); byte _si8 <name="Signed Byte">;
FSeek( pos ); ubyte _ui8 <name="Unsigned Byte">;
FSeek( pos ); short _si16 <name="Signed Short">;
FSeek( pos ); ushort _ui16 <name="Unsigned Short">;
FSeek( pos ); int _si32 <name="Signed Int">;
FSeek( pos ); uint _ui32 <name="Unsigned Int">;
FSeek( pos ); int64 _si64 <name="Signed Int64">;
FSeek( pos ); uint64 _ui64 <name="Unsigned Int64">;
FSeek( pos ); float _f <name="Float">;
FSeek( pos ); double _d <name="Double">;
FSeek( pos ); hfloat _hf <name="Half Float">;
FSeek( pos ); char _s [ReadStringLength(pos,256)] <name="String">; // limit to 256 characters
FSeek( pos ); wchar_t _ws[ReadWStringLength(pos,256)] <name="Unicode">; // limit to 256 characters
FSeek( pos ); DOSDATE _dd <name="DOS Date">;
FSeek( pos ); DOSTIME _dt <name="DOS Time">;
FSeek( pos ); FILETIME _ft <name="FILETIME">;
FSeek( pos ); OLETIME _ot <name="OLETIME">;
FSeek( pos ); time_t _tt <name="time_t">;
#include "scaffolds/Bits.bt"
#include "filetypes/Banks.bt"
#include "filetypes/Memory.bt"
BitfieldDisablePadding();
FSeek( pos ); ZBank _zb <name="ZBank">;
FSeek( pos ); ZBankPointer _zbp <name="ZBankPointer">;
FSeek( pos ); BitEight _be <name="BitEight">;
FSeek( pos ); Ram _ram <name="Ram">;