Skip to content
Myr

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

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Sean Barrett · committed by Sean Barrett · parents 79a7719, 05a8de3 · Browse files · 1 file+4 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+4 added−2 removed

  • other:+4 added−2 removed

1 file+4 added−2 removed

modified:stb_tilemap_editor.h+4 added-2 removed
166 unmodified lines
167//168// #define STB_TILEMAP_EDITOR_IMPLEMENTATION169// // this triggers the implementation170//171// void STBTE_DRAW_RECT(int x0, int y0, int x1, int y1, uint color);171// void STBTE_DRAW_RECT(int x0, int y0, int x1, int y1, unsigned int color);172// // this must draw a filled rectangle (exclusive on right/bottom)173// // color = (r<<16)|(g<<8)|(b)174// 175// void STBTE_DRAW_TILE(int x0, int y0,
219 unmodified lines
395//396// user input397//398399// if you're using SDL, call the next function for SDL_MOUSEMOVE, SDL_MOUSEBUTTON, SDL_MOUSEWHEEL;399// if you're using SDL, call the next function for SDL_MOUSEMOTION, SDL_MOUSEBUTTONDOWN, SDL_MOUSEBUTTONUP, SDL_MOUSEWHEEL;400// the transformation lets you scale from SDL mouse coords to stb_tilemap_editor coords401extern void stbte_mouse_sdl(stbte_tilemap *tm, const void *sdl_event, float xscale, float yscale, int xoffset, int yoffset);402403// otherwise, hook these up explicitly:404extern void stbte_mouse_move(stbte_tilemap *tm, int x, int y, int shifted, int scrollkey);405extern void stbte_mouse_button(stbte_tilemap *tm, int x, int y, int right, int down, int shifted, int scrollkey);406extern void stbte_mouse_wheel(stbte_tilemap *tm, int x, int y, int vscroll);407408// note: at the moment, mouse wheel events (SDL_MOUSEWHEEL) are ignored.409410// for keyboard, define your own mapping from keys to the following actions.411// this is totally optional, as all features are accessible with the mouse412enum stbte_action413{
3761 unmodified lines