fixed bug when changing between graphic sets with different tile size
[rocksndiamonds.git] / src / libgame / image.h
1 // ============================================================================
2 // Artsoft Retro-Game Library
3 // ----------------------------------------------------------------------------
4 // (c) 1995-2014 by Artsoft Entertainment
5 //                  Holger Schemel
6 //                  info@artsoft.org
7 //                  http://www.artsoft.org/
8 // ----------------------------------------------------------------------------
9 // image.h
10 // ============================================================================
11
12 #ifndef IMAGE_H
13 #define IMAGE_H
14
15 #include "system.h"
16
17
18 // these bitmap pointers either point to allocated bitmaps or are NULL
19 #define IMG_BITMAP_32x32        0
20 #define IMG_BITMAP_16x16        1
21 #define IMG_BITMAP_8x8          2
22 #define IMG_BITMAP_4x4          3
23 #define IMG_BITMAP_2x2          4
24 #define IMG_BITMAP_1x1          5
25 #define IMG_BITMAP_CUSTOM       6
26
27 #define NUM_IMG_BITMAPS         7
28
29 // this bitmap pointer points to one of the above bitmaps (do not free it)
30 #define IMG_BITMAP_GAME         7
31
32 #define NUM_IMG_BITMAP_POINTERS 8
33
34 // this bitmap pointer points to the bitmap with default image size
35 #define IMG_BITMAP_STANDARD     IMG_BITMAP_32x32
36
37
38 int getImageListSize();
39 struct FileInfo *getImageListEntryFromImageID(int);
40 Bitmap **getBitmapsFromImageID(int);
41 int getOriginalImageWidthFromImageID(int);
42 int getOriginalImageHeightFromImageID(int);
43 char *getTokenFromImageID(int);
44 int getImageIDFromToken(char *);
45 char *getImageConfigFilename();
46 int getImageListPropertyMappingSize();
47 struct PropertyMapping *getImageListPropertyMapping();
48 void InitImageList(struct ConfigInfo *, int, struct ConfigTypeInfo *,
49                    char **, char **, char **, char **, char **);
50
51 void ReloadCustomImages();
52 void CreateImageWithSmallImages(int, int, int);
53 void ScaleImage(int, int);
54
55 void FreeAllImages();
56
57 #endif  /* IMAGE_H */