aboutsummaryrefslogtreecommitdiff
path: root/headers
diff options
context:
space:
mode:
authorkdx <kikoodx@paranoici.org>2023-03-27 08:59:27 +0200
committerkdx <kikoodx@paranoici.org>2023-03-27 09:00:58 +0200
commit3e4d0b255a3363dc19e8db99845121b2b401e475 (patch)
tree0489d3ef4a37018acf53765393b207b99efbe398 /headers
parenta65ccb043979b550c3ed516683418fc0e18063f8 (diff)
downloadtzr-3e4d0b255a3363dc19e8db99845121b2b401e475.tar.gz
mouse position and screen transform
Diffstat (limited to 'headers')
-rw-r--r--headers/TZR_events.h2
-rw-r--r--headers/TZR_globals.h3
-rw-r--r--headers/TZR_render.h2
3 files changed, 7 insertions, 0 deletions
diff --git a/headers/TZR_events.h b/headers/TZR_events.h
index 4b2b0c6..61262c8 100644
--- a/headers/TZR_events.h
+++ b/headers/TZR_events.h
@@ -6,3 +6,5 @@ int TZR_PollEvent(TZR_Event *e);
/* Drain queued events with TZR_PollEvent and call TZR_ResourcesWatch. */
void TZR_CycleEvents(void);
+
+void TZR_GetMousePosition(int *x, int *y);
diff --git a/headers/TZR_globals.h b/headers/TZR_globals.h
index 4f8c00c..548110b 100644
--- a/headers/TZR_globals.h
+++ b/headers/TZR_globals.h
@@ -20,3 +20,6 @@ extern int ___tzr_mouse_y;
extern const char *___tzr_command[___TZR_RES_COUNT];
extern TZR_KeyState ___tzr_keystates[SDL_NUM_SCANCODES];
extern TZR_KeyState ___tzr_mousestates[256];
+extern float ___tzr_scale;
+extern int ___tzr_off_x;
+extern int ___tzr_off_y;
diff --git a/headers/TZR_render.h b/headers/TZR_render.h
index 2ba0b3c..592440c 100644
--- a/headers/TZR_render.h
+++ b/headers/TZR_render.h
@@ -55,3 +55,5 @@ int TZR_DrawRectangle(bool fill, int x, int y, int w, int h);
[[nodiscard]]
#endif
int _TZR_DrawImage(const TZR_DrawImageArgs *args);
+
+void TZR_ScreenTransform(int *x, int *y);