aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCharles <sircharlesaze@gmail.com>2020-03-08 22:53:57 +0100
committerCharles <sircharlesaze@gmail.com>2020-03-08 22:53:57 +0100
commitfafabad0906ff9641b0c6183fda8b07745579dfb (patch)
tree64e57f2b72b3986aa3869924567ce459a1da5433 /src
parentf52b4ad77158b52fad161e98e116059ac5b68d3d (diff)
downloadcub3d-fafabad0906ff9641b0c6183fda8b07745579dfb.tar.gz
cub3d-fafabad0906ff9641b0c6183fda8b07745579dfb.tar.bz2
cub3d-fafabad0906ff9641b0c6183fda8b07745579dfb.zip
Linux versionlinux
Diffstat (limited to 'src')
-rw-r--r--src/main.c2
-rw-r--r--src/render_sprite.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/main.c b/src/main.c
index b935b52..3167354 100644
--- a/src/main.c
+++ b/src/main.c
@@ -22,8 +22,8 @@ int main(int argc, char **argv)
return (1);
if (argc == 3)
return (capture(state));
- mlx_hook(state->window_ptr, 2, (1L << 1), event_keydown, (void*)state);
mlx_hook(state->window_ptr, 17L, 0, event_quit, (void*)state);
+ mlx_key_hook(state->window_ptr, event_keydown, (void*)state);
mlx_loop_hook(state->mlx_ptr, render_update, (void*)state);
mlx_loop(state->mlx_ptr);
return (0);
diff --git a/src/render_sprite.c b/src/render_sprite.c
index 2ca34c0..195cadc 100644
--- a/src/render_sprite.c
+++ b/src/render_sprite.c
@@ -55,11 +55,11 @@ static void draw_stripe_pixels(t_state *state, t_sprite_state *sstate,
static void draw_stripe(t_state *state, t_sprite_state *sstate, int stripe)
{
int tex_width;
- int tex_height;
+ /* int tex_height; */
int tex_x;
tex_width = state->textures[TEX_SPRITE].width;
- tex_height = state->textures[TEX_SPRITE].height;
+ /* tex_height = state->textures[TEX_SPRITE].height; */
tex_x = (int)(256 * (stripe - (-sstate->sprite_width / 2
+ sstate->sprite_window_x))
* tex_width / sstate->sprite_width) / 256;