%option "-low"

@16_7F400  %short MouseX
@16_7F402  %short MouseY
!@16_7FFF4  %byte  MouseButtons
%dynamic %volatile %byte %integer %function %spec mouse buttons %c
                               %alias "FRED_GRAPHICS_MOUSEB"

@16_e00000  %integerarray frame(0:32767)
@16_e20002  %short origin reg
@16_e20001  %byte colour reg
@16_e20000  %byte enable reg
@16_e30000  %shortintegerarray colourmap(0:511)

%dynamic %routine %spec hline %alias "FRED_GRAPHICS_HLINE" (%integer x0, x1, y)
%dynamic %routine %spec line %alias "FRED_GRAPHICS_LINE" %c
                                                       (%integer x0, y0, x1, y1)
%dynamic %routine %spec fill %alias "FRED_GRAPHICS_FILL" %c
                                                       (%integer x0, y0, x1, y1)

 %constinteger yfiddle=511

%constinteger Yes =1, No =4, Left=1, Centre=2, Right=4, Current = 0,
                        FVPXL=0, FVPXR=687,     {Full Viewport}
                        FVPYB=0, FVPYT=511,
                        FVP Ht= 511, FVP Length =687,
                        A4=840, A3=1680, Slide=860,
                        Page Table = 4, Symbol Table = 1, Up=1, Down=4,
                        Page type= 4, Symbol type= 1

 %record %format %spec Symbol

 %record %format Line Item(%integer oriX,oriY,endX,endY,colour,
                                    %record(Line Item) %name last,next)

 %record %format Box Item(%integer oriX,oriY,endX,endY,colour,
                                   %record(Box Item) %name last,next)

 %record %format Text Item(%integer oriX,oriY,endX,endY,
                                    font,size,colour,
                                    %string(80) text,
                                    %record(Text Item) %name last,next)

 %record %format Circle Item(%integer oriX,oriY,radius,colour,
                             %record(Circle Item) %name last,next)

 %record %format Symbol Instance(%integer oriX,oriY,endX,endY,
                                 %record(symbol instance) %name next,last,
                                 (%record(Symbol) %name Table entry %or %c
                                 %string(10) Symbol name))

 %record %format Symbol(%string(10) name,
                                 %integer length,Ht,instances,type,
                                 %record(Line Item) Lines,
                                 %record(Box Item) Boxes,
                                 %record(Text Item) Text,
                                 %record(Circle Item) Circles,
                                 %record(Symbol Instance) Symbols,
                                 %record(Symbol) %name Next,Last)

%endoffile
