Store user data in $HOME
[kball.git] / include / backgbmp.h
blobecdcb8175c44b041455f35276a7862be60b1078f
1 // ------------------------------------------------------------------
2 // backgbmp.h
3 // System for handling level backgrounds
4 //
5 //
6 // NOTE ; SYSTEM VERY SLOW, IMPROVE IT WITH A CACHE, ETC!
7 // ------------------------------------------------------------------
8 // By Kronoman - In loving memory of my father
9 // Copyright (c) 2004, Kronoman
10 // ------------------------------------------------------------------
12 #ifndef BACKGBMP_H
13 #define BACKGBMP_H
15 #include <allegro.h>
18 // background
19 class CBackground
21 public:
22 CBackground();
23 ~CBackground();
25 BITMAP *get_background(char *filename, int index); // gets the background from file, or a default background otherwise
26 void free_memory(); // releases memory and returns to default background
28 private:
29 BITMAP *bmp_in_ram;
30 DATAFILE *data_loaded;
31 BITMAP *bmp_default;
33 // cache stuff
34 char file_loaded[1024]; // wich file we have in memory
35 int index_loaded;
40 #endif