aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_init_bmp.c
blob: 8e94eba60c6b1ddc0b5d8c13cc9681465853494f (plain)
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/* ************************************************************************** */
/*                                                                            */
/*                                                        :::      ::::::::   */
/*   ft_init_bmp.c                                      :+:      :+:    :+:   */
/*                                                    +:+ +:+         +:+     */
/*   By: rbousset <marvin@42.fr>                    +#+  +:+       +#+        */
/*                                                +#+#+#+#+#+   +#+           */
/*   Created: 2020/02/14 17:28:46 by rbousset          #+#    #+#             */
/*   Updated: 2020/02/14 17:28:46 by rbousset         ###   ########lyon.fr   */
/*                                                                            */
/* ************************************************************************** */

#include <libft.h>
#include <cub3d.h>
#include <stdint.h>

t_bmp_colors
	ft_init_bmp_colors(void)
{
	t_bmp_colors	bmp_colors;

	bmp_colors.red_mask = 0x00ff0000;
	bmp_colors.green_mask = 0x0000ff00;
	bmp_colors.blue_mask = 0x000000ff;
	bmp_colors.alpha_mask = 0xff000000;
	bmp_colors.color_space_type = 0x73524742;
	ft_bzero(bmp_colors.unused, 16);
	return (bmp_colors);
}

t_bmp_info
	ft_init_bmp_info(void)
{
	t_bmp_info	bmp_info;

	bmp_info.size = 0;
	bmp_info.width = 0;
	bmp_info.height = 0;
	bmp_info.planes = 1;
	bmp_info.bit_count = 0;
	bmp_info.compression = 0;
	bmp_info.size_image = 0;
	bmp_info.x_pixels_per_meter = 0;
	bmp_info.y_pixels_per_meter = 0;
	bmp_info.colors_used = 0;
	bmp_info.colors_important = 0;
	return (bmp_info);
}

t_bmp_file
	ft_init_bmp(void)
{
	t_bmp_file	bmp_file;

	bmp_file.file_type = 0x4d42;
	bmp_file.file_size = 0;
	bmp_file.reserv_one = 0;
	bmp_file.reserv_two = 0;
	bmp_file.offset_data = 0;
	return (bmp_file);
}