packages feed

ansi-terminal-game 1.9.2.0 → 1.9.3.0

raw patch · 4 files changed

+27/−12 lines, 4 filesdep ~QuickCheckdep ~ansi-terminaldep ~containersPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependency ranges changed: QuickCheck, ansi-terminal, containers, random

API changes (from Hackage documentation)

- Terminal.Game: class UniformRange a
+ Terminal.Game: class () => UniformRange a
- Terminal.Game: data ByteString
+ Terminal.Game: data () => ByteString
- Terminal.Game: data Color
+ Terminal.Game: data () => Color
- Terminal.Game: data ColorIntensity
+ Terminal.Game: data () => ColorIntensity
- Terminal.Game: data Colour a
+ Terminal.Game: data () => Colour a
- Terminal.Game: data Hyphenator
+ Terminal.Game: data () => Hyphenator
- Terminal.Game: data StdGen
+ Terminal.Game: data () => StdGen
- Terminal.Game: data Timed a
+ Terminal.Game: data () => Timed a

Files

NEWS view
@@ -1,3 +1,11 @@+1.9.3.0+-------++- Bump ansi-terminal 1.1. Due to the introduction of hNowSupportsANSI,+  older ansi-terminal support has been dropped. If you rely on them,+  contact me.+- Released on mer 7 feb 2024, 17:44:31+ 1.9.2.0 ------- 
ansi-terminal-game.cabal view
@@ -1,5 +1,5 @@ name:                ansi-terminal-game-version:             1.9.2.0+version:             1.9.3.0 synopsis:            cross-platform library for terminal games description:         Library which aims to replicate standard 2d game                      functions (blit, ticks, timers, etc.) in a terminal@@ -53,7 +53,7 @@                        Terminal.Game.Random,                        Terminal.Game.Timer   build-depends:       base == 4.*,-                       ansi-terminal >= 0.11 && < 1.1,+                       ansi-terminal >= 1.0 && < 1.2,                        array == 0.5.*,                        bytestring >= 0.10 && < 0.13,                        cereal == 0.5.*,@@ -108,7 +108,7 @@                        Terminal.Game.Random,                        Terminal.Game.RandomSpec   build-depends:       base == 4.*,-                       ansi-terminal >= 0.11 && < 1.1,+                       ansi-terminal >= 1.0 && < 1.2,                        array == 0.5.*,                        bytestring >= 0.10 && < 0.13,                        cereal == 0.5.*,
src/Terminal/Game.hs view
@@ -195,23 +195,26 @@ -- $xcompat -- Good practices for cross-compatibility: ----- * choose game dimensions of no more than __24 rows__ and __80 columns__.+-- * Choose game dimensions of no more than __24 rows__ and __80 columns__. --   This ensures compatibility with the trickiest terminals (i.e. Win32---   console);+--   console). ----- * use __ASCII characters__ only. Again this is for Win32 console+-- * Use __ASCII characters__ only. Again this is for Win32 console --   compatibility, until --   [this GHC bug](https://gitlab.haskell.org/ghc/ghc/issues/7593) gets---   fixed;+--   fixed. ----- * employ colour sparingly: as some users will play your game in a+-- * Employ colour sparingly: as some users will play your game in a --   light-background terminal and some in a dark one, choose only colours---   that go well with either (blue, red, etc.);+--   that go well with either (blue, red, etc.). ----- * some terminals/multiplexers (i.e. tmux) do not make a distinction+-- * Some terminals/multiplexers (i.e. tmux) do not make a distinction --   between vivid/dull, others do not display bold; do not base your game---   mechanics on that---   difference.+--   mechanics on that difference.+--+-- * If you use WASD for movement, you can readily gain compatibility with+--   AZERTY keyboard layout by mapping “up” to both @W@ and @Z@ and “left”+--   to @A@ and @Q@. Users from France, Belgium, and Québec will thank you.  -- | /Usable/ terminal display size (on Win32 console the last line is -- set aside for input). Throws 'CannotGetDisplaySize' on error.
src/Terminal/Game/Layer/Object/IO.hs view
@@ -21,6 +21,7 @@ import qualified Control.Monad                as CM import qualified Control.Monad.Catch          as MC import qualified Control.Monad.Trans          as T+import qualified GHC.IO.StdHandles            as GH import qualified Data.List.Split              as LS import qualified System.Clock                 as SC import qualified System.Console.ANSI          as CA@@ -193,6 +194,9 @@             -- initial setup/checks            CA.hideCursor >>+           CA.hNowSupportsANSI GH.stdout >>+             -- On Windows, tries to turn ANSI control+             -- characters support on.             -- text encoding            SI.mkTextEncoding "UTF-8//TRANSLIT" >>= \te ->