MODULE WorldMap;

(* $F-, $R-, $S-, $V-, $N- *)

FROM Intuition   IMPORT ScreenPtr,WindowPtr;
FROM ZEICHNE     IMPORT zeichne;
FROM ScreenLib   IMPORT SetColReg,GetColReg;
FROM WindowLib   IMPORT SimpleWin,GetWinScr,gzz,noSize,CloseWin;
FROM WinIOLib    IMPORT ReportClose,InspClose;
FROM WinGraphics IMPORT SetPens;

VAR
  WorldWin : WindowPtr;
  Screen   : ScreenPtr;
  count    : CARDINAL;
  close    : BOOLEAN;
  r,g,b    : ARRAY[0..3] OF CARDINAL;
  
BEGIN

  WorldWin := SimpleWin(NIL,"WorldMap",0,12,640,200,gzz+noSize);
  Screen   := GetWinScr(WorldWin);
  FOR count:=0 TO 3 DO
    GetColReg(Screen,count,r[count],g[count],b[count])
  END;
  SetColReg(Screen,0, 0, 8,15);
  SetColReg(Screen,1,15,12, 0);
  SetColReg(Screen,2, 0,11, 0);
  SetColReg(Screen,3,10, 0,15);
  SetPens(WorldWin,1,0,0);
  ReportClose(WorldWin,TRUE);
  FOR count :=1 TO 69 DO
    zeichne(WorldWin,count,(count MOD 3)+1)
  END;
  close := InspClose(WorldWin,3);
  CloseWin(WorldWin);
  FOR count:=0 TO 3 DO
    SetColReg(Screen,count,r[count],g[count],b[count])
  END

END WorldMap.
