Giter VIP home page Giter VIP logo

sdl2-image's Introduction

sdl2-image

Hackage Build Status

Haskell bindings to SDL2_image

Both the raw and the higher level bindings should allow you to use any aspect of the original SDL2_image library. Please report an issue if you encounter a bug or feel that something is missing.

Install
cabal install sdl2-image
Documentation

For documentation, visit Hackage.

The original SDL2_image documentation can also help, as the bindings are close to a direct mapping.

Example

A small example executable is included with the library. It loads and displays a given image. You can find it in the example directory.

cd sdl2-image
cabal run path/to/some/image.type

sdl2-image's People

Contributors

ashe avatar krantz-xrf avatar nxths avatar sbidin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

sdl2-image's Issues

[Windows 10] Build error: conflicting types for SDL_main

As the title says, trying to do stack install sdl2-image.

λ stack build
sdl2-image-2.0.0: configure
sdl2-image-2.0.0: build
Progress 1/18

--  While building custom Setup.hs for package sdl2-image-2.0.0 using:
      C:\sr\setup-exe-cache\x86_64-windows\Cabal-simple_Z6RU0evB_2.2.0.1_ghc-8.4.3.exe --builddir=.stack-work\dist\7d103d30 build --ghc-options " -ddump-hi -ddump-to-file -fdiagnostics-color=always"
    Process exited with code: ExitFailure 1
    Logs have been written to: C:\Users\Ashley\Desktop\haskell-sdl2-examples-master\.stack-work\logs\sdl2-image-2.0.0.log

    Configuring sdl2-image-2.0.0...
    Preprocessing library for sdl2-image-2.0.0..
    In file included from C:/Users/Ashley/AppData/Local/Programs/stack/x86_64-windows/msys2-20180531/mingw64/include/SDL2/SDL.h:32:0,
                     from C:/Users/Ashley/AppData/Local/Programs/stack/x86_64-windows/msys2-20180531/mingw64/include/SDL2/SDL_image.h:27,
                     from Image.hsc:71:
    C:/Users/Ashley/AppData/Local/Programs/stack/x86_64-windows/msys2-20180531/mingw64/include/SDL2/SDL_main.h:111:17: error: conflicting types for 'SDL_main'
     #define main    SDL_main
                     ^
    C:\Users\Ashley\AppData\Local\Temp\stack11840\sdl2-image-2.0.0\Image.hsc:73:5: note: in expansion of macro 'main'
    C:/Users/Ashley/AppData/Local/Programs/stack/x86_64-windows/msys2-20180531/mingw64/include/SDL2/SDL_main.h:117:39: note: previous declaration of 'SDL_main' was here
     extern C_LINKAGE SDLMAIN_DECLSPEC int SDL_main(int argc, char *argv[]);
                                           ^~~~~~~~
    compiling .stack-work\dist\7d103d30\build\SDL\Raw\Image_hsc_make.c failed (exit code 1)
    command was: C:\Users\Ashley\AppData\Local\Programs\stack\x86_64-windows\ghc-8.4.3\lib/../mingw/bin\gcc.exe -c .stack-work\dist\7d103d30\build\SDL\Raw\Image_hsc_make.c -o .stack-work\dist\7d103d30\build\SDL\Raw\Image_hsc_make.o -fno-stack-protector -D__GLASGOW_HASKELL__=804 -Dmingw32_BUILD_OS=1 -Dx86_64_BUILD_ARCH=1 -Dmingw32_HOST_OS=1 -Dx86_64_HOST_ARCH=1 -IC:\Users\Ashley\AppData\Local\Programs\stack\x86_64-windows\msys2-20180531\mingw64\include -IC:/Users/Ashley/AppData/Local/Programs/stack/x86_64-windows/msys2-20180531/mingw64/include/SDL2 -IC:\Users\Ashley\AppData\Local\Programs\stack\x86_64-windows\msys2-20180531\mingw64\include -IC:/Users/Ashley/AppData/Local/Programs/stack/x86_64-windows/msys2-20180531/mingw64/include/SDL2 -Dmain=SDL_main -I.stack-work\dist\7d103d30\build\autogen -I.stack-work\dist\7d103d30\build\global-autogen -include .stack-work\dist\7d103d30\build\autogen\cabal_macros.h -IC:\Users\Ashley\AppData\Local\Programs\stack\x86_64-windows\msys2-20150512\mingw64\include -IC:/Users/Ashley/AppData/Local/Programs/stack/x86_64-windows/msys2-20150512/mingw64/include/SDL2 -IC:\Users\Ashley\AppData\Local\Programs\stack\x86_64-windows\msys2-20150512\mingw64\include -IC:\Users\Ashley\AppData\Local\Programs\stack\x86_64-windows\msys2-20150512\mingw64\include -IC:\Users\Ashley\AppData\Local\Programs\stack\x86_64-windows\msys2-20150512\mingw64\include -IC:\sr\snapshots\cf99d8ac\lib\x86_64-windows-ghc-8.4.3\vector-0.12.0.1-1fezwShzdEfG3Hp1Pmvjkq\include -IC:\Users\Ashley\AppData\Local\Programs\stack\x86_64-windows\msys2-20150512\mingw64\include -IC:\Users\Ashley\AppData\Local\Programs\stack\x86_64-windows\msys2-20150512\mingw64\include -IC:\Users\Ashley\AppData\Local\Programs\stack\x86_64-windows\msys2-20150512\mingw64\include -IC:\Users\Ashley\AppData\Local\Programs\stack\x86_64-windows\msys2-20150512\mingw64\include -IC:\Users\Ashley\AppData\Local\Programs\stack\x86_64-windows\msys2-20150512\mingw64\include -IC:\Users\Ashley\AppData\Local\Programs\stack\x86_64-windows\msys2-20150512\mingw64\include -IC:\Users\Ashley\AppData\Local\Programs\stack\x86_64-windows\msys2-20150512\mingw64\include -IC:\Users\Ashley\AppData\Local\Programs\stack\x86_64-windows\msys2-20150512\mingw64\include -IC:\sr\snapshots\cf99d8ac\lib\x86_64-windows-ghc-8.4.3\primitive-0.6.4.0-39Pwmm1zkQX6bM7xFUT3Jc\include -IC:\Users\Ashley\AppData\Local\Programs\stack\x86_64-windows\msys2-20150512\mingw64\include -IC:\Users\Ashley\AppData\Local\Programs\stack\x86_64-windows\ghc-8.4.3\lib\time-1.8.0.2\include -IC:\Users\Ashley\AppData\Local\Programs\stack\x86_64-windows\msys2-20150512\mingw64\include -IC:\Users\Ashley\AppData\Local\Programs\stack\x86_64-windows\msys2-20150512\mingw64\include -IC:\Users\Ashley\AppData\Local\Programs\stack\x86_64-windows\msys2-20150512\mingw64\include -IC:\Users\Ashley\AppData\Local\Programs\stack\x86_64-windows\msys2-20150512\mingw64\include -IC:\Users\Ashley\AppData\Local\Programs\stack\x86_64-windows\msys2-20150512\mingw64\include -IC:\Users\Ashley\AppData\Local\Programs\stack\x86_64-windows\msys2-20150512\mingw64\include -IC:\Users\Ashley\AppData\Local\Programs\stack\x86_64-windows\msys2-20150512\mingw64\include -IC:\Users\Ashley\AppData\Local\Programs\stack\x86_64-windows\msys2-20150512\mingw64\include -IC:\Users\Ashley\AppData\Local\Programs\stack\x86_64-windows\msys2-20150512\mingw64\include -IC:\Users\Ashley\AppData\Local\Programs\stack\x86_64-windows\msys2-20150512\mingw64\include -IC:\Users\Ashley\AppData\Local\Programs\stack\x86_64-windows\msys2-20150512\mingw64\include -IC:\Users\Ashley\AppData\Local\Programs\stack\x86_64-windows\msys2-20150512\mingw64\include -IC:\Users\Ashley\AppData\Local\Programs\stack\x86_64-windows\msys2-20150512\mingw64\include -IC:\Users\Ashley\AppData\Local\Programs\stack\x86_64-windows\msys2-20150512\mingw64\include -IC:\Users\Ashley\AppData\Local\Programs\stack\x86_64-windows\msys2-20150512\mingw64\include -IC:\Users\Ashley\AppData\Local\Programs\stack\x86_64-windows\msys2-20150512\mingw64\include -IC:\Users\Ashley\AppData\Local\Programs\stack\x86_64-windows\msys2-20150512\mingw64\include -IC:\Users\Ashley\AppData\Local\Programs\stack\x86_64-windows\msys2-20150512\mingw64\include -IC:\Users\Ashley\AppData\Local\Programs\stack\x86_64-windows\msys2-20150512\mingw64\include -IC:\Users\Ashley\AppData\Local\Programs\stack\x86_64-windows\ghc-8.4.3\lib\Win32-2.6.1.0\include -IC:\Users\Ashley\AppData\Local\Programs\stack\x86_64-windows\ghc-8.4.3\lib\bytestring-0.10.8.2\include -IC:\Users\Ashley\AppData\Local\Programs\stack\x86_64-windows\msys2-20150512\mingw64\include -IC:\Users\Ashley\AppData\Local\Programs\stack\x86_64-windows\ghc-8.4.3\lib\base-4.11.1.0\include -IC:\Users\Ashley\AppData\Local\Programs\stack\x86_64-windows\ghc-8.4.3\lib\integer-gmp-1.0.2.0\include -IC:\Users\Ashley\AppData\Local\Programs\stack\x86_64-windows\ghc-8.4.3\lib/include -IC:\Users\Ashley\AppData\Local\Programs\stack\x86_64-windows\ghc-8.4.3/lib/include/

I uninstalled Stack from my Windows machine to try and build this using this guide. I also installed sdl2-image with:

λ stack exec -- pacman --noconfirm -S mingw-w64-x86_64-SDL2_gfx mingw-w64-x86_64-SDL2_image mingw-w64-x86_64-SDL2_mixer mingw-w64-x86_64-SDL2_ttf

I don't know how often people are using SDL2-image, or if they're just using it on something other than Windows, but without smooth compilations on Windows people aren't going to take gamedev with Haskell seriously, so let me know if there's any data you need me to gather as I've read you don't have access to a Windows machine yourself. I really want this to work as I can't really work on my Haskell game too much until I know there's a way of building it on Windows.

Thanks!

Calling load causes the program to do nothing. (Windows, Stack)

The following program has no output:

module Main where

import SDL.Image

main :: IO ()
main = do
  putStrLn "hello world"

  f <- load "guy.png"
  putStrLn $ seq f "f loaded"

Commenting out the last two lines gives the expected output "hello world".

On Windows with stack, in stack.yaml:

extra-deps:
- git: https://github.com/haskell-game/sdl2-image.git
  commit: 382395c763b473032721c71921b5c9241142178f

load fails while loading PNG images

I get a sdlExceptionError = "Unsupported image format" while trying to open a png file with the load function. It works fine with gif files though.

I am using linux, ghc 7.10.2 and SDL2 2.0.3

Windows 10 build error

Was trying to build a project to experience haskell game programming https://github.com/jxv/dino-rush but it failed when trying building sdl2-image:

  • Stack 1.7.1
  • Windows 10 N 64-bit

It seems to be the same issue as #7 which was fixed with this pull request #8. As an haskell beginner I can probably talk about things that I misunderstood but is Stackage up to date with the latest fix?

Here my build logs:

...skiping all the successfull build logs
sdl2-2.4.1.0: download                                                                                                                                                                                                                       
sdl2-2.4.1.0: configure                                                                                                                                                                                                                      
sdl2-2.4.1.0: build                                                                                                                                                                                                                          
sdl2-2.4.1.0: copy/register                                                                                                                                                                                                                  
sdl2-ttf-2.0.2: download                                                                                                                                                                                                                     
sdl2-mixer-1.1.0: download                                                                                                                                                                                                                   
sdl2-image-2.0.0: download                                                                                                                                                                                                                   
sdl2-ttf-2.0.2: configure                                                                                                                                                                                                                    
sdl2-ttf-2.0.2: build                                                                                                                                                                                                                        
sdl2-image-2.0.0: configure                                                                                                                                                                                                                  
sdl2-mixer-1.1.0: configure                                                                                                                                                                                                                  
sdl2-image-2.0.0: build                                                                                                                                                                                                                      
sdl2-mixer-1.1.0: build                                                                                                                                                                                                                      
sdl2-ttf-2.0.2: copy/register                                                                                                                                                                                                                
sdl2-mixer-1.1.0: copy/register                                                                                                                                                                                                              
Progress 54/55                                                                                                                                                                                                                               
                                                                                                                                                                                                                                             
--  While building custom Setup.hs for package sdl2-image-2.0.0 using:                                                                                                                                                                       
      C:\sr\setup-exe-cache\x86_64-windows\Cabal-simple_Z6RU0evB_2.2.0.1_ghc-8.4.3.exe --builddir=.stack-work\dist\7d103d30 build --ghc-options " -ddump-hi -ddump-to-file -fdiagnostics-color=always"                                       
    Process exited with code: ExitFailure 1                                                                                                                                                                                                  
    Logs have been written to: F:\Yoann\documents\apps\dino-rush\.stack-work\logs\sdl2-image-2.0.0.log                                                                                                                                       
                                                                                                                                                                                                                                             
    Configuring sdl2-image-2.0.0...                                                                                                                                                                                                          
    Preprocessing library for sdl2-image-2.0.0..                                                                                                                                                                                             
    In file included from C:/Users/Yoann/AppData/Local/Programs/stack/x86_64-windows/msys2-20180531/mingw64/include/SDL2/SDL.h:32:0,                                                                                                         
                     from C:/Users/Yoann/AppData/Local/Programs/stack/x86_64-windows/msys2-20180531/mingw64/include/SDL2/SDL_image.h:27,                                                                                                     
                     from Image.hsc:71:                                                                                                                                                                                                      
    C:/Users/Yoann/AppData/Local/Programs/stack/x86_64-windows/msys2-20180531/mingw64/include/SDL2/SDL_main.h:111:17: error: conflicting types for 'SDL_main'                                                                                
     #define main    SDL_main                                                                                                                                                                                                                
                     ^                                                                                                                                                                                                                       
    C:\Users\Yoann\AppData\Local\Temp\stack9068\sdl2-image-2.0.0\Image.hsc:73:5: note: in expansion of macro 'main'                                                                                                                          
    C:/Users/Yoann/AppData/Local/Programs/stack/x86_64-windows/msys2-20180531/mingw64/include/SDL2/SDL_main.h:117:39: note: previous declaration of 'SDL_main' was here                                                                      
     extern C_LINKAGE SDLMAIN_DECLSPEC int SDL_main(int argc, char *argv[]);                                                                                                                                                                 
                                           ^~~~~~~~                                                                                                                                                                                          
    compiling .stack-work\dist\7d103d30\build\SDL\Raw\Image_hsc_make.c failed (exit code 1)                                                                                                                                                  
    command was: C:\Users\Yoann\AppData\Local\Programs\stack\x86_64-windows\ghc-8.4.3\lib/../mingw/bin\gcc.exe -c .stack-work\dist\7d103d30\build\SDL\Raw\Image_hsc_make.c -o .stack-work\dist\7d103d30\build\SDL\Raw\Image_hsc_make.o -fno-s
ack-protector -D__GLASGOW_HASKELL__=804 -Dmingw32_BUILD_OS=1 -Dx86_64_BUILD_ARCH=1 -Dmingw32_HOST_OS=1 -Dx86_64_HOST_ARCH=1 -IC:\Users\Yoann\AppData\Local\Programs\stack\x86_64-windows\msys2-20180531\mingw64\include -IC:/Users/Yoann/AppD
ta/Local/Programs/stack/x86_64-windows/msys2-20180531/mingw64/include/SDL2 -IC:\Users\Yoann\AppData\Local\Programs\stack\x86_64-windows\msys2-20180531\mingw64\include -IC:/Users/Yoann/AppData/Local/Programs/stack/x86_64-windows/msys2-201
0531/mingw64/include/SDL2 -Dmain=SDL_main -I.stack-work\dist\7d103d30\build\autogen -I.stack-work\dist\7d103d30\build\global-autogen -include .stack-work\dist\7d103d30\build\autogen\cabal_macros.h -IC:\Users\Yoann\AppData\Local\Programs\
tack\x86_64-windows\msys2-20180531\mingw64\include -IC:/Users/Yoann/AppData/Local/Programs/stack/x86_64-windows/msys2-20180531/mingw64/include/SDL2 -IC:\Users\Yoann\AppData\Local\Programs\stack\x86_64-windows\msys2-20180531\mingw64\inclu
e -IC:\Users\Yoann\AppData\Local\Programs\stack\x86_64-windows\msys2-20180531\mingw64\include -IC:\Users\Yoann\AppData\Local\Programs\stack\x86_64-windows\msys2-20180531\mingw64\include -IC:\sr\snapshots\03cb0bbe\lib\x86_64-windows-ghc-8
4.3\vector-0.12.0.1-4awQG9XUvVEBfJgKGHBhOb\include -IC:\Users\Yoann\AppData\Local\Programs\stack\x86_64-windows\msys2-20180531\mingw64\include -IC:\Users\Yoann\AppData\Local\Programs\stack\x86_64-windows\msys2-20180531\mingw64\include -I
:\Users\Yoann\AppData\Local\Programs\stack\x86_64-windows\msys2-20180531\mingw64\include -IC:\Users\Yoann\AppData\Local\Programs\stack\x86_64-windows\msys2-20180531\mingw64\include -IC:\Users\Yoann\AppData\Local\Programs\stack\x86_64-win
ows\msys2-20180531\mingw64\include -IC:\Users\Yoann\AppData\Local\Programs\stack\x86_64-windows\msys2-20180531\mingw64\include -IC:\Users\Yoann\AppData\Local\Programs\stack\x86_64-windows\msys2-20180531\mingw64\include -IC:\Users\Yoann\A
pData\Local\Programs\stack\x86_64-windows\msys2-20180531\mingw64\include -IC:\sr\snapshots\03cb0bbe\lib\x86_64-windows-ghc-8.4.3\primitive-0.6.3.0-DaZpcxwJp2TGn8ITSgfI4C\include -IC:\Users\Yoann\AppData\Local\Programs\stack\x86_64-window
\msys2-20180531\mingw64\include -IC:\Users\Yoann\AppData\Local\Programs\stack\x86_64-windows\ghc-8.4.3\lib\time-1.8.0.2\include -IC:\Users\Yoann\AppData\Local\Programs\stack\x86_64-windows\msys2-20180531\mingw64\include -IC:\Users\Yoann\
ppData\Local\Programs\stack\x86_64-windows\msys2-20180531\mingw64\include -IC:\Users\Yoann\AppData\Local\Programs\stack\x86_64-windows\msys2-20180531\mingw64\include -IC:\Users\Yoann\AppData\Local\Programs\stack\x86_64-windows\msys2-2018
531\mingw64\include -IC:\Users\Yoann\AppData\Local\Programs\stack\x86_64-windows\msys2-20180531\mingw64\include -IC:\Users\Yoann\AppData\Local\Programs\stack\x86_64-windows\msys2-20180531\mingw64\include -IC:\Users\Yoann\AppData\Local\Pr
grams\stack\x86_64-windows\msys2-20180531\mingw64\include -IC:\Users\Yoann\AppData\Local\Programs\stack\x86_64-windows\msys2-20180531\mingw64\include -IC:\Users\Yoann\AppData\Local\Programs\stack\x86_64-windows\msys2-20180531\mingw64\inc
ude -IC:\Users\Yoann\AppData\Local\Programs\stack\x86_64-windows\msys2-20180531\mingw64\include -IC:\Users\Yoann\AppData\Local\Programs\stack\x86_64-windows\msys2-20180531\mingw64\include -IC:\Users\Yoann\AppData\Local\Programs\stack\x86
64-windows\msys2-20180531\mingw64\include -IC:\Users\Yoann\AppData\Local\Programs\stack\x86_64-windows\msys2-20180531\mingw64\include -IC:\Users\Yoann\AppData\Local\Programs\stack\x86_64-windows\msys2-20180531\mingw64\include -IC:\Users\
oann\AppData\Local\Programs\stack\x86_64-windows\msys2-20180531\mingw64\include -IC:\Users\Yoann\AppData\Local\Programs\stack\x86_64-windows\msys2-20180531\mingw64\include -IC:\Users\Yoann\AppData\Local\Programs\stack\x86_64-windows\msys
-20180531\mingw64\include -IC:\Users\Yoann\AppData\Local\Programs\stack\x86_64-windows\msys2-20180531\mingw64\include -IC:\Users\Yoann\AppData\Local\Programs\stack\x86_64-windows\msys2-20180531\mingw64\include -IC:\Users\Yoann\AppData\Lo
al\Programs\stack\x86_64-windows\ghc-8.4.3\lib\Win32-2.6.1.0\include -IC:\Users\Yoann\AppData\Local\Programs\stack\x86_64-windows\ghc-8.4.3\lib\bytestring-0.10.8.2\include -IC:\Users\Yoann\AppData\Local\Programs\stack\x86_64-windows\msys
-20150512\mingw64\include -IC:\Users\Yoann\AppData\Local\Programs\stack\x86_64-windows\msys2-20150512\mingw64\include -IC:\Users\Yoann\AppData\Local\Programs\stack\x86_64-windows\ghc-8.4.3\lib\base-4.11.1.0\include -IC:\Users\Yoann\AppDa
a\Local\Programs\stack\x86_64-windows\ghc-8.4.3\lib\integer-gmp-1.0.2.0\include -IC:\Users\Yoann\AppData\Local\Programs\stack\x86_64-windows\ghc-8.4.3\lib/include -IC:\Users\Yoann\AppData\Local\Programs\stack\x86_64-windows\ghc-8.4.3/lib
include/                                                                                                                                                                                                                                     

Not building on windows

Could it be that sdl2-image needs the same fix as sdl2-ttf ?

if os(windows)
    cpp-options: -D_SDL_main_h

sdl2-image build failure on Stackge nightly

> /tmp/stackage-build13$ stack unpack sdl2-image-2.0.0
Unpacked sdl2-image-2.0.0 to /tmp/stackage-build13/sdl2-image-2.0.0/
> /tmp/stackage-build13/sdl2-image-2.0.0$ ghc -clear-package-db -global-package-db -package-db=/var/stackage/work/builds/nightly/pkgdb Setup
[1 of 1] Compiling Main             ( Setup.hs, Setup.o )
Linking Setup ...
> /tmp/stackage-build13/sdl2-image-2.0.0$ ./Setup configure --package-db=clear --package-db=global --package-db=/var/stackage/work/builds/nightly/pkgdb --libdir=/var/stackage/work/builds/nightly/lib --bindir=/var/stackage/work/builds/nightly/bin --datadir=/var/stackage/work/builds/nightly/share --libexecdir=/var/stackage/work/builds/nightly/libexec --sysconfdir=/var/stackage/work/builds/nightly/etc --docdir=/var/stackage/work/builds/nightly/doc/sdl2-image-2.0.0 --htmldir=/var/stackage/work/builds/nightly/doc/sdl2-image-2.0.0 --haddockdir=/var/stackage/work/builds/nightly/doc/sdl2-image-2.0.0 --flags=
Configuring sdl2-image-2.0.0...
Setup: The pkg-config package 'SDL2_image' version >=2.0.0 is required but it
could not be found.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.