lineFeed :: Quake ()
lineFeed = do
    globals.gCon.cX .= 0

    use (globals.gCon) >>= \console ->
      when ((console^.cDisplay) == (console^.cCurrent)) $
        globals.gCon.cDisplay += 1

    globals.gCon.cCurrent += 1

    use (globals.gCon) >>= \console -> do
      let i = ((console^.cCurrent) `mod` (console^.cTotalLines)) * (console^.cLineWidth)
          e = i + (console^.cLineWidth)
      fillSpaces (console^.cText) i e

  where fillSpaces :: MSV.IOVector Char -> Int -> Int -> Quake ()
        fillSpaces text i e
          | i >= e = return ()
          | otherwise = do
              io $ MSV.write text i ' '
              fillSpaces text (i + 1) e
lineFeed :: Quake ()
lineFeed = do
    globals.gCon.cX .= 0

    use (globals.gCon) >>= \console ->
      when ((console^.cDisplay) == (console^.cCurrent)) $
        globals.gCon.cDisplay += 1

    globals.gCon.cCurrent += 1

    use (globals.gCon) >>= \console -> do
      let i = ((console^.cCurrent) `mod` (console^.cTotalLines)) * (console^.cLineWidth)
          e = i + (console^.cLineWidth)
      fillSpaces (console^.cText) i e

  where fillSpaces :: MSV.IOVector Char -> Int -> Int -> Quake ()
        fillSpaces text i e
          | i >= e = return ()
          | otherwise = do
              io $ MSV.write text i ' '
              fillSpaces text (i + 1) e
lineFeed = do
    globals.gCon.cX .= 0

    use (globals.gCon) >>= \console ->
      when ((console^.cDisplay) == (console^.cCurrent)) $
        globals.gCon.cDisplay += 1

    globals.gCon.cCurrent += 1

    use (globals.gCon) >>= \console -> do
      let i = ((console^.cCurrent) `mod` (console^.cTotalLines)) * (console^.cLineWidth)
          e = i + (console^.cLineWidth)
      fillSpaces (console^.cText) i e

  where fillSpaces :: MSV.IOVector Char -> Int -> Int -> Quake ()
        fillSpaces text i e
          | i >= e = return ()
          | otherwise = do
              io $ MSV.write text i ' '
              fillSpaces text (i + 1) e