diff --git a/src/Util.hs b/src/Util.hs new file mode 100644 index 0000000..78e83db --- /dev/null +++ b/src/Util.hs @@ -0,0 +1,13 @@ +module Util where + +import qualified Data.Vector as V + +-- internal imports + +import Types + +getFrame :: EngineData -> Int -> FrameData +getFrame engineData frame = + let frameVector = engineFrames engineData + in + frameVector V.! (frame `mod` V.length frameVector)