aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkdx <kikoodx@paranoici.org>2022-11-23 21:17:59 +0100
committerkdx <kikoodx@paranoici.org>2022-11-23 21:17:59 +0100
commit00fdadbdcc62e3ad9608ceefd0f82ed825a0a9b7 (patch)
treefeb121f0ab53d27ff6b1ad304f844d3a47659043
parentad215de024e7fdb1c4e207193166ba207008ebcb (diff)
downloadlzr-00fdadbdcc62e3ad9608ceefd0f82ed825a0a9b7.tar.gz
flips were fucked up
-rw-r--r--lzr.c4
-rw-r--r--lzr.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/lzr.c b/lzr.c
index 701ce66..b5b9930 100644
--- a/lzr.c
+++ b/lzr.c
@@ -609,8 +609,8 @@ int LZR_DrawImageEx(int id, int x, int y, LZR_ImageDrawSettings stg)
dx_log_error("%s", SDL_GetError());
return -1;
}
- const int flip = (stg.flip_h ? SDL_FLIP_VERTICAL : 0) |
- (stg.flip_v ? SDL_FLIP_HORIZONTAL : 0);
+ const int flip = (stg.flip_v ? SDL_FLIP_VERTICAL : 0) |
+ (stg.flip_h ? SDL_FLIP_HORIZONTAL : 0);
if (SDL_RenderCopyEx(renderer, images[id].tex, &src, &dst, stg.angle,
NULL, flip)) {
dx_log_error("%s", SDL_GetError());
diff --git a/lzr.h b/lzr.h
index c03e677..e244a51 100644
--- a/lzr.h
+++ b/lzr.h
@@ -42,7 +42,7 @@ typedef struct LZR_Event {
typedef struct LZR_ImageDrawSettings {
int ix, iy, width, height;
double scale_x, scale_y, angle;
- bool center, flip_v, flip_h;
+ bool center, flip_h, flip_v;
} LZR_ImageDrawSettings;
int LZR_Init(LZR_Config cfg);