cQ      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~  None#A mutable list of mappings from keymousebutton updown/ stilldown  events to IO actions. ?A mutable list of keys (or mouse buttons), along with modifier  state and mouse position. ;BInitialise the input system, which keeps a list of input event to D action bindings and executes the the proper actions automatically. E Returns a function for adding bindings, and another which should be F called periodically (eg from refresh) to trigger still-down actions. 456789:; !"#$456789:; $!"#7:98564;4567:98;None<= %&'()*+,<= <,%&'()*+=<=None>?@A>?@A>@?A>@?ANoneB$invisible colors (in RGB) of bitmap C!width, height and data of bitmap Dcolor in RGB format Ea bidimensional point in space F&position, size and name of the window BCDEFBCDEFFEDCBBCDEFNoneGHIJKLMNOPQRSTUVWXYZ[\]^_GHIJKLMNOPQRSTUVWXYZ[\]^_GHJKLMNOPQRSUTVWXYZ[\]^_IGHIJKLMNOPQRSTUVWXYZ[\]^_None `ab`abab` `abNoneIcdefghijk     lmnopqrstuvwxyz{|}~ !"#$%&'()*'cdefghijklmnopqrstuvwxyz{|}~'mnopqsrtu|}~fhgikjcedlwxyz{v1cedfhgikj     lm nopqrstuvwxyz{|}~ !"#$%&'()* None#+,-./0123456.-,+/0123456 None 76Game flags: mapDrawing, objectsDrawing, objectsMoving $A game action (IOGame) has the type IOGame t s u v a, where t, s, u and v G are as for Game and a is the type returned by each action of the game  (such as the Int for IO Int)). The name IOGame was chosen to remind E that each action deals with a Game, but an IO operation can also be B performed between game actions (such as the reading of a file or $ printing something in the prompt). A game has the type  Game t s u v , where . t is the type of the game special attributes 0 s is the type of the object special attributes * u is the type of the game levels (state) j v is the type of the map tile special attribute, in case we use a Tile Map as the background of our game For a mnemonic, uh...  t - Top-level game attribute type,  s - Sprite object attribute type,  u - Updating game state type,  v - V#icinity (map tile) attribute type. @A Game consists of the following attributes, accessible via the  accessor functions below:  @gameMap :: IORef (GameMap v) -- a map (background) @gameState :: IORef u -- initial game state @gameFlags :: IORef GameFlags -- initial game flags )objManagers :: IORef [(ObjectManager s)] -- some object managers textList :: IORef [Text] -- some texts =quadricObj :: QuadricPrimitive -- a quadric thing JwindowConfig :: IORef WindowConfig -- a config for the main window >gameAttribute :: IORef t -- a game attribute %pictureList :: IORef [TextureObject] -- some pictures @fpsInfo :: IORef (Int,Int,Float) -- only for debugging8a map (background) 9initial game state :initial game flags ;some object managers < some texts =a quadric thing >a config for the main window ?a game attribute @some pictures i7AB89:;<=>?@CDEFGHIJKLMNOPQRSLL]7A B89:;<=>?@CDEFGHIJKLMNOPQRS NoneDGiven a fungen Game and IOGame, generate an opengl display handler. T&Run one update and display an IOGame. TTNone3A mapping from an input event to an input handler. 9A FunGEn input handler (which we use instead of GLUTInput's) is E an IOGame (game action) that takes two extra arguments: the current L keyboard modifiers state, and the current mouse position. (For a StillDown M event, these will be the original state and position from the Press event.) U3  !"#$-./0123789:3$!"#7:98 3-./012 U NoneVV None  !"#$%&'()*+,-./0123789:<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~W !"#$%&'()*+,-./001,2345464748494:4;4<=>=?=@=A=B=C=2DEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      F       !"#$%&'()*+,-./0123456789 : ; < = > ? @ A B C D E F G H I J K L M N O P  Q R S T U V W X Y Z [ \ ] ^ _ ` a bc de FunGEn-0.4Graphics.UI.Fungen.InputGraphics.UI.GLUT.InputGraphics.UI.Fungen.TextGraphics.UI.Fungen.TimerGraphics.UI.Fungen.TypesGraphics.UI.Fungen.UtilGraphics.UI.Fungen.LoaderGraphics.UI.Fungen.ObjectsGraphics.UI.Fungen.MapGraphics.UI.Fungen.GameGraphics.UI.Fungen.DisplayGraphics.UI.Fungen.InitGraphics.UI.FungenOpenGL-2.8.0.0'Graphics.Rendering.OpenGL.GL.CoordTransPosition GLUT-2.4.0.0!Graphics.UI.GLUT.Callbacks.WindowKeyF1KeyF2KeyF3KeyF4KeyF5KeyF6KeyF7KeyF8KeyF9KeyF10KeyF11KeyF12KeyLeftKeyUpKeyRightKeyDown KeyPageUp KeyPageDownKeyHomeKeyEnd KeyInsert KeyNumLockKeyBegin KeyDelete KeyUnknown SpecialKeyaltctrlshift ModifiersChar MouseButtonKeyGraphics.UI.GLUT.Fonts Fixed8By13 Fixed9By15 TimesRoman10 TimesRoman24 Helvetica10 Helvetica12 Helvetica18 BitmapFontGraphics.UI.GLUT.Types LeftButton MiddleButton RightButtonWheelUp WheelDownAdditionalButtonStillDownHandler KeyBinder InputHandlerKeyEventRelease StillDownPress initGLUTInputText putGameText RefreshTypeTimerIdle setRefreshInvList AwbfBitmap ColorList3Point2D WindowConfig texCoord2vertex3 bindTexturetexStufftoRadrandInt randFloat randDouble shiftLeft toDecimalpow2toBinarymake0ord2 dropGLsizeiaddNoInvisibilityracMod matrixToList matrixSize inv2color3pathAndInv2color3Listpoint2DtoVertex3isEmptywhenunlessFilePictureList loadBitmaploadBitmapListFillModeUnfilledFilled ObjectPictureBasicTex PrimitiveCirclePolyg ObjectManager GameObjectgetGameObjectIdgetGameObjectNamegetGameObjectManagerNamegetGameObjectAsleepgetGameObjectSizegetGameObjectPositiongetGameObjectSpeedgetGameObjectAttributeupdateObjectPictureupdateObjectAsleepupdateObjectSizeupdateObjectPositionupdateObjectSpeedupdateObjectAttributegetObjectManagerNamegetObjectManagerCountergetObjectManagerObjectsobject objectGroupaddObjectsToManagerdrawGameObjectsdrawGameObjectfindObjectFromIdsearchObjectManagersearchGameObject updateObjectmoveGameObjectsdestroyGameObjectGameMap TileMatrixTile getMapSize isTileMapgetTileMapTileMatrixgetTileMapTileSizegetTileMapScrollgetTileMapSizegetTilePictureIndexgetTileBlockedgetTileMoveCostgetTileSpecialAttribute getCurrentMapupdateCurrentMap isMultiMapupdateCurrentIndexcolorMap textureMaptileMapmultiMapclearGameScreen drawGameMapIOGameGame runIOGame runIOGameMliftIOtoIOGameliftIOtoIOGame' getGameState setGameState getGameFlags setGameFlagsgetObjectManagerssetObjectManagersgetGameAttributesetGameAttribute createGamefunExitdrawMapgetTileFromWindowPositiongetTileFromIndex clearScreensetCurrentMapIndexenableGameFlagsdisableGameFlagsenableMapDrawingdisableMapDrawingenableObjectsDrawingdisableObjectsDrawingenableObjectsMovingdisableObjectsMovingdrawAllObjects drawObjectmoveAllObjectsdestroyObjects destroyObjectgetObjectsFromGroupaddObjectsToGroupaddObjectsToNewGroupfindObjectManager findObject getObjectNamegetObjectGroupNamegetObjectAsleep getObjectSizegetObjectPositiongetObjectSpeedgetObjectAttributesetObjectAsleepsetObjectPositionsetObjectSpeedsetObjectCurrentPicturesetObjectAttribute replaceObject reverseXSpeed reverseYSpeedobjectTopMapCollisionobjectTopMapFutureCollisionobjectBottomMapCollisionobjectBottomMapFutureCollisionobjectRightMapCollisionobjectRightMapFutureCollisionobjectLeftMapCollisionobjectLeftMapFutureCollisionobjectsCollisionobjectsFutureCollisionobjectListObjectCollisionobjectListObjectFutureCollisionpointsObjectCollisionpointsObjectListCollision printOnPrompt printOnScreen printText randomInt randomFloat randomDoubleshowFPSwaitdisplay InputBinding funBindingfunInit BindingTableKeyTable newKeyTablegetKeysinsertIntoKeyTabledeleteFromKeyTablenewBindingTablebindKey execAction stillDowntimer toDecimalAux racModPos racModNeg inv2color3AuxBmpListbinAux loadBmListAuxgetWH getBmDataaddInvisiblity makeColorListmakeColorListAuxGameObjectPictureBTx GamePrimitiveCPOMmngName mngCounter mngObjectsGOobjIdobjNameobjManagerName objPicture objAsleepobjSize objPositionobjSpeed objAttributegetGameObjectPictureupdateObjectManagerObjects createPicturefindSizeobjectGroupAuxaddObjectsToManagerAuxadjustNewObjectsdrawGameObjectListfindObjectFromIdAux searchFromIdsearchGameObjectAuxupdateObjectAuxmoveSingleObjectdestroyGameObjectAuxMultiMapTileMap TextureMapColorMapTileLine newMapListmapListContainsMultiMapmatrixOk matrixOkAuxdrawTextureMap drawTileMapdrawTileMapLine GameFlagsgameMap gameState gameFlags objManagerstextList quadricObj windowConfig gameAttribute pictureListIOGfpsInfobindSTunitSTgetMap getRealMap setRealMap getTextList setTextList getQuadricgetPictureListgetWindowConfig getFpsInfo setFpsInfo loadPicturesgetElapsedTimewaitAux $fMonadIOGame displayIOGame userBinding basicInit