RSC - format of classifier of GIS Panorama ver. 7.2.(rsc.rfh):
Class: GIS files, Status: Almost Complete, Last change: 21.01.2011 15:34:24

//set encoding oem
set encoding ansi

type

TRSCSign array[4]of Char,<0;
TRscHdr0 struc
  TRSCSign Sign
  ulong FSize
  ulong Ver //?
ends

data

0 TRscHdr0 Hdr0

assert (Hdr0.Sign='RSC')and(Hdr0.FSize=FileSize)and(Hdr0.Ver=0x0702);

descr ('RSC - format of classifier of the GIS Panorama ver. 7.2.',NL)
descr ('  Partially reconstructed by me (AX) using Panorama API data structures',NL)

type bit
  TBit num+(1)
  TBit1 num+(1)
  TBit2 num+(2)
  TBit3 num+(3)
  TBit4 num+(4)
  TBit8 num+(8)
  TBit11 num+(11)
  TBit20 num+(20)
  TBit23 num+(23)
  TDoubleHi struc
    TBit20 M
    TBit11 P
    TBit1 S //Sign 1->Neg
  ends

  TFloat struc
    TBit23 M
    TBit8 P
    TBit1 S //Sign 1->Neg
  ends: displ=(@.S,' 1.',HEX(@.M*2,6),'*2^',INT(@.P-0x7F));

type
  TDouble struc
    ulong Lo
    TDoubleHi Hi
  ends: displ=(@.Hi.S,' 1.',HEX(@.Hi.M,5),HEX(@.Lo,8),'*2^',INT(@.Hi.P-0x3FF));

type
u1 num+(1):displ=(INT(@))
u2 num+(2):displ=(INT(@))

TRSCDate array[8]of Char;
TRSCName32 array[32]of Char,<0; 
TRSCName16 array[16]of Char,<0; 

include rsc_gdi.rfi

type

TObjLoc enum u1 (
  OL_LINE      = 0,         // Tv
  OL_SQUARE    = 1,         // 
  OL_MARK      = 2,         // Tv
  OL_TEXT      = 3,         // 
  OL_VECTOR    = 4,         // Tv
  OL_PATTERN   = 5)         // +


TObjRec struc
  ulong Sz
  long ExCode
  long i1
  long i2
  char LocCh
  array[11]of Char,<0; sExCode
  array[3]of ulong X
  ulong SemC1
  ulong X5
  TRSCName32 Name
  TObjLoc Loc
  u1 Layer
  u1 Scale //Scalable sign
  u1 Direct
  Byte GenLvl
  Byte Yb1
  Byte Yb2
  Byte Yb3
  long SemC1a // ,   v   ( )
  array[5]of ulong Y
  raw[] Rest
ends:[@:Size=@.Sz]

TObjSec(Sz,Cnt) array[@:Cnt]of(TObjRec):[@:Size=@:Sz]

TSegRec struc
  ulong Sz
  TRSCName32 Name
  TRSCName16 Key
  sint N1
  sint N2
  word Cnt
  array[@.Cnt]of long Ids //may be objects in the layer
  raw[] Rest
ends:[@:Size=@.Sz]

TSegSec(Sz,Cnt) array[@:Cnt]of(TSegRec):[@:Size=@:Sz]

TParRec struc
  ulong Sz
  u2 N
  TImgFnInfo F
  raw[] Rest
ends:[@:Size=@.Sz]

TParSec(Sz,Cnt) array[@:Cnt]of(TParRec):[@:Size=@:Sz]


TSEMTYPE enum int (    // TL- =L++=L- T+L=TLL
   TUNDEFINED = -1,    //   
   TSTRING    = 0,     // T 
   TNUMBER    = 1,     // + 
   TANYFILE   = 9,     // L   
   TBMPFILE   = 10,    // L  BMP
   TOLEFILE   = 11,    // L ,v OLE-
   TREFER     = 12,    // Tv  v  v
                       // (v  )
   TMAPFILE   = 13,    // L - 
   TTXTFILE   = 14,    // L  
   TPCXFILE   = 15,    // L  PCX
   TCODE      = 16,    //     
                       //   
   TDATE      = 17,    //  v    (++++--)
   TANGLE     = 18,    // L   
   TTIME      = 19,    //      (++TT)
   TFONT      = 20,    // L  ("Arial", "Courier"...)
   TCOLOR     = 21     // +    RGB
//   TLAST      = 21     // T+-=-- +L=LL TLTL +-+T
)

TSemRec struc
  long Code
  TSEMTYPE DT
  word Y
  TRSCName32 Name
  TRSCName16 Key
  ulong X0
  ulong X1
  word X2L
  word X2H
  ulong ClsFileOfs
  long ClsCnt
  ulong X5
  ulong X6
  raw[] Rest
ends:[@:Size=0x54]

TSemSec(Sz,Cnt) array[@:Cnt]of(TSemRec):[@:Size=@:Sz]


TTxtRec struc
  TRSCName32 Name
  TRSCName32 Name1
  long N
  ulong F
ends

TTxtSec(Sz,Cnt) array[@:Cnt]of TTxtRec


TLimRec struc
  ulong Sz
  long ExCode
  long Loc
  long l2
  long Sem1 //  .
  u2 Cnt1
  u2 C1
  long Sem2
  u2 Cnt2
  u2 C2
  array[@.Cnt1]of TDouble Lim1
  array[@.Cnt2]of TDouble Lim2
/*  array[@.Cnt1]of case @@.Cnt2 of
   0: u1
   else array[@@@.Cnt2]of u1
   endc PosInCode*/
  array[@.Cnt2 when (@.Cnt2>0) exc 1]of array[@@.Cnt1]of u1 PosInCode
  raw[] Rest
ends:[@:Size=@.Sz]

TLimSec(Sz,Cnt) array[@:Cnt]of(TLimRec)//:[@:Size=@:Sz]

TPalRec struc
  array[256]of TColor PalTbl
  array[32]of Char,0; Name
ends

TPalSec(Sz,Cnt) array[@:Cnt]of(TPalRec):[@:Size=@:Sz]

TSecStart(Sz,Cnt) struc
  TRSCSign Sign
  case @.Sign of
    'OBJ': TObjSec(@@:Sz,@@:Cnt)
    'SEG': TSegSec(@@:Sz,@@:Cnt)
    'PAR': TParSec(@@:Sz,@@:Cnt) //+ 
    'PRN': TParSec(@@:Sz,@@:Cnt) //+   
    'SEM': TSemSec(@@:Sz,@@:Cnt)
    'TXT': TTxtSec(@@:Sz,@@:Cnt)
    'LIM': TLimSec(@@:Sz,@@:Cnt)
    'PAL': TPalSec(@@:Sz,@@:Cnt) //v
  endc data
  raw[] at 0; rest
ends:[@:Size=@:Sz+4]

PSecStart(Sz,Cnt) ^TSecStart(@:Sz,@:Cnt) NEAR=ulong,REF=@-4;:displ=(@^.Sign,'{',@,'}')

TSecInfo struc
  PSecStart Ofs
  ulong Sz
  long Cnt
ends:[@.Ofs:Sz=@.Sz,@.Ofs:Cnt=@.Cnt]

TRscHdr struc
  ulong X3
  ulong X4
  long X5
  long Language
  long ObjCnt
  TRSCDate Date
  TRSCName32 RSCType
  TRSCName32 Name
  array[8]of Byte Code
  long Scale
  long X8
  array[13] of TSecInfo SecInfo
ends

data
Hdr0:Size; TRscHdr Hdr


Other specifications.


FlexT home page, Author`s home page.