Merge branch 'patch-1' of https://github.com/sherjilozair/stb into working

This commit is contained in:
Sean Barrett 2019-02-07 07:27:42 -08:00
commit 9bb4bc1db4
1 changed files with 4 additions and 2 deletions

View File

@ -168,7 +168,7 @@
// #define STB_TILEMAP_EDITOR_IMPLEMENTATION
// // this triggers the implementation
//
// void STBTE_DRAW_RECT(int x0, int y0, int x1, int y1, uint color);
// void STBTE_DRAW_RECT(int x0, int y0, int x1, int y1, unsigned int color);
// // this must draw a filled rectangle (exclusive on right/bottom)
// // color = (r<<16)|(g<<8)|(b)
//
@ -396,7 +396,7 @@ extern void stbte_tick(stbte_tilemap *tm, float time_in_seconds_since_last_frame
// user input
//
// if you're using SDL, call the next function for SDL_MOUSEMOVE, SDL_MOUSEBUTTON, SDL_MOUSEWHEEL;
// if you're using SDL, call the next function for SDL_MOUSEMOTION, SDL_MOUSEBUTTONDOWN, SDL_MOUSEBUTTONUP, SDL_MOUSEWHEEL;
// the transformation lets you scale from SDL mouse coords to stb_tilemap_editor coords
extern void stbte_mouse_sdl(stbte_tilemap *tm, const void *sdl_event, float xscale, float yscale, int xoffset, int yoffset);
@ -405,6 +405,8 @@ extern void stbte_mouse_move(stbte_tilemap *tm, int x, int y, int shifted, int s
extern void stbte_mouse_button(stbte_tilemap *tm, int x, int y, int right, int down, int shifted, int scrollkey);
extern void stbte_mouse_wheel(stbte_tilemap *tm, int x, int y, int vscroll);
// note: at the moment, mouse wheel events (SDL_MOUSEWHEEL) are ignored.
// for keyboard, define your own mapping from keys to the following actions.
// this is totally optional, as all features are accessible with the mouse
enum stbte_action