From a20ccd4a7d975a80db748c621d173a2f059f1fd7 Mon Sep 17 00:00:00 2001 From: Sherjil Ozair Date: Fri, 25 May 2018 22:46:47 -0400 Subject: [PATCH 1/2] Update stb_tilemap_editor.h --- stb_tilemap_editor.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stb_tilemap_editor.h b/stb_tilemap_editor.h index 352042b..23fde68 100644 --- a/stb_tilemap_editor.h +++ b/stb_tilemap_editor.h @@ -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) // From 05a8de3b86812d9e5849e69f04e19e5df91cdc0c Mon Sep 17 00:00:00 2001 From: Sherjil Ozair Date: Sat, 26 May 2018 05:37:55 -0400 Subject: [PATCH 2/2] Update stb_tilemap_editor.h --- stb_tilemap_editor.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/stb_tilemap_editor.h b/stb_tilemap_editor.h index 23fde68..e6184d0 100644 --- a/stb_tilemap_editor.h +++ b/stb_tilemap_editor.h @@ -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