+      !"#$%&'()*+,-./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<Used by  to configure the main loop's timing strategy. ?$Change the current timing strategy.  Generate a GLUT timer callback. <=>?<=>?<>=?None@$invisible colors (in RGB) of bitmap A!width, height and data of bitmap Bcolor in RGB format Ca bidimensional point in space D&position, size and name of the window @ABCD@ABCD@ABCDNoneE8String to be printed, font, screen position, color RGB. FDisplay these texts on screen. EF %&'()*+,EFEFNoneVBto be used when no invisibility must be added when loading a file YQreturn the max indexes of a matrix (assumed that its lines have the same length) GHIJKLMNOPQRSTUVWXYZ[\]^_GHIJKLMNOPQRSTUVWXYZ[\]^_GHIJKLMNOPQRSTUVWXYZ[\]^_NoneaLoads a bitmap from a file. bLoads n bitmaps from n files. `ab`ab `ab Nonetcreates a PreColorMap ucreates a PreTextureMap vgcreates a PreTileMap, cheking if the tileMatrix given is valid and automatically defining the map size wcreates a multimap xclear the screen ydraw the background map #c     defghijklmnopqrstuvwxycdefghijklmnopqrstuvwxyc     defghijklmnopqrstuvwxy NoneIz{|}~ !"#$%&'()*+,-./0123456'z{|}~1z|{}~  !"#$%&'()*+,-./0123456 None976Game flags: mapDrawing, objectsDrawing, objectsMoving @IOGame is the monad in which game actions run. An IOGame action $ takes a Game (with type parameters t s u v), performs some IO, 8 and returns an updated Game along with a result value (a):  Enewtype IOGame t s u v a = IOG (Game t s u v -> IO (Game t s u v,a))CThe name IOGame was chosen to remind that each action deals with a > Game, but an IO operation can also be performed between game E 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.  Internally, a Game consists of:  @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 A+loads all of the pictures used in the game draws the background map @returns a mapTile, given its pixel position (x,y) in the screen 9returns a mapTile, given its index (x,y) in the tile map 2paint the whole screen with a specified RGB color #set the current map for a MultiMap draws all visible objects draw one object 0changes objects position according to its speed destroys objects from the game !destroys an object from the game Creturns the list of all objects from the group whose name is given -adds an object to a previously created group adds an object to a new group Ereturns an object manager of the game, given its name (internal use) Ireturns an object of the game, given its name and is object manager name Rthere is no need to search through the managers, because the name of an object is D never modified so the result of this function will always be safe. Nbecause an object can have its group (manager) name modified, it is necessary H to search through the managers to find it, otherwise this functions won' t be safe. Ibecause an object can have its sleeping status modified, it is necessary H to search through the managers to find it, otherwise this functions won' t be safe. >because an object can have its size modified, it is necessary H to search through the managers to find it, otherwise this functions won' t be safe. Bbecause an object can have its position modified, it is necessary H to search through the managers to find it, otherwise this functions won' t be safe. ?because an object can have its speed modified, it is necessary H to search through the managers to find it, otherwise this functions won' t be safe. Cbecause an object can have its attribute modified, it is necessary H to search through the managers to find it, otherwise this functions won' t be safe. ?changes the sleeping status of an object, given its new status :changes the position of an object, given its new position 4changes the speed of an object, given its new speed 6changes the current picture of a multitextured object <changes the attribute of an object, given its new attribute creplaces an object by a new one, given the old object and the function that must be applied to it. >checks the collision between an object and the top of the map Uchecks the collision between an object and the top of the map in the next game cicle Achecks the collision between an object and the bottom of the map Xchecks the collision between an object and the bottom of the map in the next game cicle Echecks the collision between an object and the right side of the map \checks the collision between an object and the right side of the map in the next game cicle Dchecks the collision between an object and the left side of the map [checks the collision between an object and the left side of the map in the next game cicle )checks the collision between two objects @checks the collision between two objects in the next game cicle prints a string in the prompt &prints a string in the current window internal use of the engine -shows the frame rate (or frame per seconds) B!get the elapsed time of the game ?delay for N seconds while continuing essential game functions h7CD89:;<=>?@EFGHIJKLMNOPQABRSK\7C D89:;<=>?@EFGHIJKLMNOPQABRS None3A mapping from an input event to an input handler. BA FunGEn input handler is like an IOGame (game action) that takes D two extra arguments: the current keyboard modifiers state, and the C current mouse position. (For a StillDown event, these will be the 4 original state and position from the Press event.) BInitialise the input system, which keeps a list of input event to D action bindings and executes the the proper actions automatically. - Returns a function for adding bindings (GLUT's - should return the A FunGEn-aware one instead ?), and another which should be called ? periodically (eg from refresh) to trigger still-down actions. 3  !"#$-./0123789: None<Given a fungen Game and IOGame step action, generate a GLUT @ display callback that steps the game and renders its resulting  state.  runs this automatically. T&Run one update and display an IOGame. TTNone*Build a FunGEn game and start it running. ;Exit the program successfully (from within a game action).  main window config background tile map object (sprite) groups initial game state initial game attribute input bindings  step action  timing type image files to load UUNone  !"#$%&'()*+,-./0123789:<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~DCBA@ab`,%&'()*+EFcedtuvwgrfhjkilmnopqsyx}~z|{7:98$!"# 3-./012 <>=?GHJKLMNOPQRSUTVWXYZ[\]^_IV !"#$%&'()*+,-./0112-34565758595:5;5<5=>?>@>A>B>C>D>3EFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrs t u v w x y z { | } ~                G                ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ 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 bcd FunGEn-0.4.2Graphics.UI.FungenGraphics.UI.GLUT.InputGraphics.UI.Fungen.TimerfunInitGraphics.UI.Fungen.TypesGraphics.UI.Fungen.TextGraphics.UI.Fungen.UtilGraphics.UI.Fungen.LoaderGraphics.UI.Fungen.MapGraphics.UI.Fungen.ObjectsGraphics.UI.Fungen.GameGraphics.UI.Fungen.InputGraphics.UI.Fungen.DisplayGraphics.UI.Fungen.InitOpenGL-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 glutInitInput RefreshTypeTimerIdle setRefreshInvList AwbfBitmap ColorList3Point2D WindowConfigText putGameText texCoord2vertex3 bindTexturetexStufftoRadrandInt randFloat randDouble shiftLeft toDecimalpow2toBinarymake0ord2 dropGLsizeiaddNoInvisibilityracMod matrixToList matrixSize inv2color3pathAndInv2color3Listpoint2DtoVertex3isEmptywhenunlessFilePictureList loadBitmaploadBitmapListGameMap TileMatrixTile getMapSize isTileMapgetTileMapTileMatrixgetTileMapTileSizegetTileMapScrollgetTileMapSizegetTilePictureIndexgetTileBlockedgetTileMoveCostgetTileSpecialAttribute getCurrentMapupdateCurrentMap isMultiMapupdateCurrentIndexcolorMap textureMaptileMapmultiMapclearGameScreen drawGameMapFillModeUnfilledFilled ObjectPictureBasicTex PrimitiveCirclePolyg ObjectManager GameObjectgetGameObjectIdgetGameObjectNamegetGameObjectManagerNamegetGameObjectAsleepgetGameObjectSizegetGameObjectPositiongetGameObjectSpeedgetGameObjectAttributeupdateObjectPictureupdateObjectAsleepupdateObjectSizeupdateObjectPositionupdateObjectSpeedupdateObjectAttributegetObjectManagerNamegetObjectManagerCountergetObjectManagerObjectsobject objectGroupaddObjectsToManagerdrawGameObjectsdrawGameObjectfindObjectFromIdsearchObjectManagersearchGameObject updateObjectmoveGameObjectsdestroyGameObjectIOGameGame runIOGame runIOGameMliftIOtoIOGameliftIOtoIOGame' getGameState setGameState getGameFlags setGameFlagsgetObjectManagerssetObjectManagersgetGameAttributesetGameAttribute createGamedrawMapgetTileFromWindowPositiongetTileFromIndex clearScreensetCurrentMapIndexenableGameFlagsdisableGameFlagsenableMapDrawingdisableMapDrawingenableObjectsDrawingdisableObjectsDrawingenableObjectsMovingdisableObjectsMovingdrawAllObjects drawObjectmoveAllObjectsdestroyObjects destroyObjectgetObjectsFromGroupaddObjectsToGroupaddObjectsToNewGroupfindObjectManager findObject getObjectNamegetObjectGroupNamegetObjectAsleep getObjectSizegetObjectPositiongetObjectSpeedgetObjectAttributesetObjectAsleepsetObjectPositionsetObjectSpeedsetObjectCurrentPicturesetObjectAttribute replaceObject reverseXSpeed reverseYSpeedobjectTopMapCollisionobjectTopMapFutureCollisionobjectBottomMapCollisionobjectBottomMapFutureCollisionobjectRightMapCollisionobjectRightMapFutureCollisionobjectLeftMapCollisionobjectLeftMapFutureCollisionobjectsCollisionobjectsFutureCollisionobjectListObjectCollisionobjectListObjectFutureCollisionpointsObjectCollisionpointsObjectListCollision printOnPrompt printOnScreen printText randomInt randomFloat randomDoubleshowFPSwait InputBinding funInitInputdisplayfunExit BindingTableKeyTable newKeyTablegetKeysinsertIntoKeyTabledeleteFromKeyTablenewBindingTablebindKey execAction stillDowntimer toDecimalAux racModPos racModNeg inv2color3AuxBmpListbinAux loadBmListAuxgetWH getBmDataaddInvisiblity makeColorListmakeColorListAuxMultiMapTileMap TextureMapColorMapTileLine newMapListmapListContainsMultiMapmatrixOk matrixOkAuxdrawTextureMap drawTileMapdrawTileMapLineGameObjectPictureBTx GamePrimitiveCPOMmngName mngCounter mngObjectsGOobjIdobjNameobjManagerName objPicture objAsleepobjSize objPositionobjSpeed objAttributegetGameObjectPictureupdateObjectManagerObjects createPicturefindSizeobjectGroupAuxaddObjectsToManagerAuxadjustNewObjectsdrawGameObjectListfindObjectFromIdAux searchFromIdsearchGameObjectAuxupdateObjectAuxmoveSingleObjectdestroyGameObjectAux GameFlagsgameMap gameState gameFlags objManagerstextList quadricObj windowConfig gameAttribute pictureList loadPicturesgetElapsedTimeIOGfpsInfobindSTunitSTgetMap getRealMap setRealMap getTextList setTextList getQuadricgetPictureListgetWindowConfig getFpsInfo setFpsInfowaitAux $fMonadIOGame displayIOGame basicInit