covid-sim
Bitmap.h
1 #ifndef COVIDSIM_BITMAP_H_INCLUDED_
2 #define COVIDSIM_BITMAP_H_INCLUDED_
3 
4 #include <stdint.h>
5 
6 #ifdef UNIX
7 #define DIRECTORY_SEPARATOR "/"
8 #else
9 #define DIRECTORY_SEPARATOR "\\"
10 #endif
11 
12 #define STRICT
13 #ifdef _WIN32
14 #define _WIN32_WINNT 0x0400
15 #define WIN32_LEAN_AND_MEAN
16 #include <windows.h>
17 #include <vfw.h>
18 #include <gdiplus.h>
19 #endif
20 #ifdef IMAGE_MAGICK
21 #include "Magick++.h"
22 #endif
23 
24 const int BWCOLS = 58;
25 
27 {
28  unsigned int filesize;
29  unsigned int spare;
30  unsigned int boffset;
31  unsigned int headersize;
32  unsigned int width, height;
33  unsigned int PlanesAndBitspp;
34  unsigned int compr;
35  unsigned int imagesize;
36  unsigned int hres, vres;
37  unsigned int colours, impcol;
38  unsigned char palette[BWCOLS * 4][4];
39 };
40 
41 extern int32_t *bmPopulation, *bmInfected, *bmRecovered, *bmTreated;
42 extern BitmapHeader* bmh;
43 
44 void CaptureBitmap();
45 void OutputBitmap(int);
46 void InitBMHead();
47 
48 void Bitmap_Finalise();
49 
50 #endif // COVIDSIM_BITMAP_H_INCLUDED_