%option '-low'

type

half = 0..65535;
byte = 0..255 ;
str255 = VARYING [ 255 ] OF CHAR ;
colourmap = packed array [0..255] of half ;

const

black=0; red=1; green=2; blue=4;
yellow=red+green; magenta=red+blue; cyan=blue+green;
white=red+green+blue;

mouseleft=1; mousemiddle=2; mouseright=4;

{These are the only new bits..}
iff_screen=1; iff_file=2;

function iffopenframe %alias 'IFF_OPEN_FRAME'
(filename, title : str255; mode : INTEGER) : INTEGER ; EXTERNAL ;
procedure iffcloseframe %alias 'IFF_CLOSE_FRAME' ; EXTERNAL ;

{end of new bits.  Rest is LEVEL1:GRAPHINC.PAS (18/2/88, 14.00) with FRED->IFF}

function mousebuttons %alias 'IFF_GRAPHICS_MOUSEB' : INTEGER ; EXTERNAL ;

function relmousex %alias 'IFF_GRAPHICS_MOUSEX' : INTEGER ; EXTERNAL ;
function relmousey %alias 'IFF_GRAPHICS_MOUSEY' : INTEGER ; EXTERNAL ;
procedure vline %alias 'IFF_GRAPHICS_VLINE' (x, y0, y1:integer) ; EXTERNAL ;
procedure hline %alias 'IFF_GRAPHICS_HLINE' (x0, x1, y:integer) ; EXTERNAL ;
procedure offset %alias 'IFF_GRAPHICS_OFFSET' (x, y:integer) ; EXTERNAL ;
procedure colour %alias 'IFF_GRAPHICS_COLOUR' (colour:integer); EXTERNAL ;
procedure enable %alias 'IFF_GRAPHICS_ENABLE' (planes:integer); EXTERNAL ;
procedure updatecolourmap %alias 'IFF_GRAPHICS_UPCMAP'(var z:colourmap);
  EXTERNAL ;
procedure clear %alias 'IFF_GRAPHICS_CLEAR' ; EXTERNAL ;
procedure halfclear %alias 'IFF_GRAPHICS_HCLEAR' (h:integer) ; EXTERNAL ;
procedure line %alias 'IFF_GRAPHICS_LINE' (x0, y0, x1, y1:integer) ; EXTERNAL ;
procedure fill %alias 'IFF_GRAPHICS_FILL' (x0, y0, x1, y1:integer) ; EXTERNAL ;
procedure triangle %alias 'IFF_GRAPHICS_TRIANGLE'
  (x0, y0, x1, y1, x2, y2:integer) ; EXTERNAL ;
procedure trapeze %alias 'IFF_GRAPHICS_TRAPEZE'
  (x00, x01, y0, x10, x11, y1:integer) ; EXTERNAL ;
procedure disc %alias 'IFF_GRAPHICS_DISC' (x, y, r:integer) ; EXTERNAL ;
procedure ring %alias 'IFF_GRAPHICS_RING' (x, y, r:integer) ; EXTERNAL ;
procedure plot %alias 'IFF_GRAPHICS_PLOT' (x, y:integer) ; EXTERNAL ;
procedure textat %alias 'IFF_GRAPHICS_TEXTAT' (x,y:integer) ; EXTERNAL ;
procedure readfont %alias 'IFF_GRAPHICS_READFONT' 
   (ffile : str255 ; VAR font:integer) ; EXTERNAL ;
procedure showsymbol %alias 'IFF_GRAPHICS_SHOWSYM' (k:integer) ; EXTERNAL ;
procedure showstring %alias 'IFF_GRAPHICS_SHOWSTR' (s : str255) ; EXTERNAL ;
procedure font %alias 'IFF_GRAPHICS_FONT' (f:integer) ; EXTERNAL ;
function fontheight %alias 'IFF_GRAPHICS_FONTHT' : INTEGER ; EXTERNAL ;
function fontdepth %alias 'IFF_GRAPHICS_FONTDP' : INTEGER ; EXTERNAL ;
function maxfontwidth %alias 'IFF_GRAPHICS_FONTWX' : INTEGER ; EXTERNAL ;
function minfontwidth %alias 'IFF_GRAPHICS_FONTWN' : INTEGER ; EXTERNAL ;
function stringwidth %alias 'IFF_GRAPHICS_STRNGW' (s:str255) : INTEGER ;
  EXTERNAL ;
function charheight %alias 'IFF_GRAPHICS_CHARHT' (c:integer) : INTEGER ;
  EXTERNAL ;
function chardepth %alias 'IFF_GRAPHICS_CHARDP' (c:integer) : INTEGER ;
  EXTERNAL ;
function charwidth %alias 'IFF_GRAPHICS_CHARWD' (c:integer) : INTEGER ;
  EXTERNAL ;
function textxpos %alias 'IFF_GRAPHICS_XPOS' : INTEGER ; EXTERNAL ;
function textypos %alias 'IFF_GRAPHICS_YPOS' : INTEGER ; EXTERNAL ;
procedure poly %alias 'IFF_GRAPHICS_POLY' (x, y:integer) ; EXTERNAL ;
procedure closepoly %alias 'IFF_GRAPHICS_CLOSEPOLY' ; EXTERNAL ;
