Skip to content

Midarius/mlx_sdl2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mlx_sdl2

minilibx made with SDL2.

Getting Started

Prerequisites

Library Description
SDL2 Download the development libraries:
https://www.libsdl.org/download-2.0.php
SDL2_image Download the development libraries:
https://www.libsdl.org/projects/SDL_image/
SDL2_ttf Download the development libraries:
https://www.libsdl.org/projects/SDL_ttf/

Limitations

Color format

Alpha is 0-255 and 0 mean full transparency

Events

Only 6 events:

  • 00: Loop
  • 02: KeyPress
  • 03: KeyRelease
  • 04: ButtonPress
  • 05: ButtonRelease
  • 17: DestroyNotify

KeyCodes

Code send by keypress/keyrelease/buttonpress/buttonrelease are SDL code, see: https://wiki.libsdl.org/SDL_MouseButtonEvent https://wiki.libsdl.org/SDLKeycodeLookup

Not yet implemented

Theses functions has no effect when called (it will not crash)

unsigned int	mlx_get_color_value(void *mlx_ptr, int color);
int	mlx_pixel_put(void *mlx_ptr, void *win_ptr, int x, int y, int color);
int	mlx_do_key_autorepeatoff(void *mlx_ptr);
int	mlx_do_key_autorepeaton(void *mlx_ptr);
int	mlx_do_sync(void *mlx_ptr);

License

This project is licensed under the MIT License - see the LICENSE.md file for details

About

minilibx made with SDL2

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published