-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathb_hook_color_bonus.c
32 lines (28 loc) · 1.16 KB
/
b_hook_color_bonus.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* b_hook_color_bonus.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: nkawaguc <nkawaguc@student.42tokyo.jp> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/10/29 18:52:07 by nkawaguc #+# #+# */
/* Updated: 2024/10/29 23:21:31 by nkawaguc ### ########.fr */
/* */
/* ************************************************************************** */
#include "b_fdf_bonus.h"
int hook_color(t_data *data)
{
data->color = !data->color;
return (0);
}
int hook_color_update(t_data *data)
{
int i;
if (!data->color)
return (0);
i = -1;
while (++i < WIN_HEIGHT * WIN_WIDTH)
data->addr[i] ^= 0x00FFFFFF;
data->color = 0;
return (0);
}