| aaba4f1e |
Poul Sander |
2023-07-25 13:34 |
1 |
/* |
| aaba4f1e |
Poul Sander |
2023-07-25 13:34 |
2 |
=========================================================================== |
| aaba4f1e |
Poul Sander |
2023-07-25 13:34 |
3 |
blockattack - Block Attack - Rise of the Blocks |
| aaba4f1e |
Poul Sander |
2023-07-25 13:34 |
4 |
Copyright (C) 2005-2023 Poul Sander |
| aaba4f1e |
Poul Sander |
2023-07-25 13:34 |
5 |
|
| aaba4f1e |
Poul Sander |
2023-07-25 13:34 |
6 |
This program is free software: you can redistribute it and/or modify |
| aaba4f1e |
Poul Sander |
2023-07-25 13:34 |
7 |
it under the terms of the GNU General Public License as published by |
| aaba4f1e |
Poul Sander |
2023-07-25 13:34 |
8 |
the Free Software Foundation, either version 2 of the License, or |
| aaba4f1e |
Poul Sander |
2023-07-25 13:34 |
9 |
(at your option) any later version. |
| aaba4f1e |
Poul Sander |
2023-07-25 13:34 |
10 |
|
| aaba4f1e |
Poul Sander |
2023-07-25 13:34 |
11 |
This program is distributed in the hope that it will be useful, |
| aaba4f1e |
Poul Sander |
2023-07-25 13:34 |
12 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
| aaba4f1e |
Poul Sander |
2023-07-25 13:34 |
13 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| aaba4f1e |
Poul Sander |
2023-07-25 13:34 |
14 |
GNU General Public License for more details. |
| aaba4f1e |
Poul Sander |
2023-07-25 13:34 |
15 |
|
| aaba4f1e |
Poul Sander |
2023-07-25 13:34 |
16 |
You should have received a copy of the GNU General Public License |
| aaba4f1e |
Poul Sander |
2023-07-25 13:34 |
17 |
along with this program. If not, see http://www.gnu.org/licenses/ |
| aaba4f1e |
Poul Sander |
2023-07-25 13:34 |
18 |
|
| aaba4f1e |
Poul Sander |
2023-07-25 13:34 |
19 |
Source information and contacts persons can be found at |
| aaba4f1e |
Poul Sander |
2023-07-25 13:34 |
20 |
https://www.blockattack.net |
| aaba4f1e |
Poul Sander |
2023-07-25 13:34 |
21 |
=========================================================================== |
| aaba4f1e |
Poul Sander |
2023-07-25 13:34 |
22 |
*/ |
| aaba4f1e |
Poul Sander |
2023-07-25 13:34 |
23 |
|
| aaba4f1e |
Poul Sander |
2023-07-25 13:34 |
24 |
#pragma once |
| aaba4f1e |
Poul Sander |
2023-07-25 13:34 |
25 |
|
| aaba4f1e |
Poul Sander |
2023-07-25 13:34 |
26 |
#include <string> |
| a0c212cb |
Poul Sander |
2023-08-13 16:10 |
27 |
#include <vector> |
| aaba4f1e |
Poul Sander |
2023-07-25 13:34 |
28 |
|
| 081d847a |
Poul Sander |
2023-07-29 19:59 |
29 |
enum class ImgScale { Stretch, |
| 2660ccea |
Poul Sander |
2023-09-22 19:25 |
30 |
Tile, |
| 2660ccea |
Poul Sander |
2023-09-22 19:25 |
31 |
Resize, |
| 2660ccea |
Poul Sander |
2023-09-22 19:25 |
32 |
Cut }; |
| 081d847a |
Poul Sander |
2023-07-29 19:59 |
33 |
|
| 081d847a |
Poul Sander |
2023-07-29 19:59 |
34 |
struct BackGroundData { |
| 081d847a |
Poul Sander |
2023-07-29 19:59 |
35 |
std::string background_name = ""; |
| 081d847a |
Poul Sander |
2023-07-29 19:59 |
36 |
std::string background_sprite = ""; |
| 081d847a |
Poul Sander |
2023-07-29 19:59 |
37 |
std::string background_sprite_16x9 = ""; |
| 6444412c |
Poul Sander |
2023-07-30 22:07 |
38 |
int tileMoveSpeedX = 0; //Move the tiled background every X milliseconds. 0 disables it. |
| 6444412c |
Poul Sander |
2023-07-30 22:07 |
39 |
int tileMoveSpeedY = 0; //Move the tiled background every X milliseconds. 0 disables it. |
| 081d847a |
Poul Sander |
2023-07-29 19:59 |
40 |
ImgScale background_scale = ImgScale::Stretch; |
| 081d847a |
Poul Sander |
2023-07-29 19:59 |
41 |
}; |
| 081d847a |
Poul Sander |
2023-07-29 19:59 |
42 |
|
| 2660ccea |
Poul Sander |
2023-09-22 19:25 |
43 |
|
| a0c212cb |
Poul Sander |
2023-08-13 16:10 |
44 |
struct DecorationData { |
| a0c212cb |
Poul Sander |
2023-08-13 16:10 |
45 |
std::string name = "smilies"; |
| a0c212cb |
Poul Sander |
2023-08-13 16:10 |
46 |
std::vector<std::string> decoration_sprites = {"smileys0", "smileys1", "smileys2", "smileys3"}; |
| a0c212cb |
Poul Sander |
2023-08-13 16:10 |
47 |
}; |
| a0c212cb |
Poul Sander |
2023-08-13 16:10 |
48 |
|
| aaba4f1e |
Poul Sander |
2023-07-25 13:34 |
49 |
struct Theme { |
| aaba4f1e |
Poul Sander |
2023-07-25 13:34 |
50 |
std::string theme_name = "standard"; |
| aaba4f1e |
Poul Sander |
2023-07-25 13:34 |
51 |
std::string back_board = "back_board"; // Can also be "back_board_sample_snow" or "trans_cover" |
| 2660ccea |
Poul Sander |
2023-09-22 19:25 |
52 |
std::string background_name = "standard"; |
| 2660ccea |
Poul Sander |
2023-09-22 19:25 |
53 |
BackGroundData background; //Should not be serialized. Extract form background_name |
| 2660ccea |
Poul Sander |
2023-09-22 19:25 |
54 |
std::string decoration_name = "smilies"; |
| a0c212cb |
Poul Sander |
2023-08-13 16:10 |
55 |
DecorationData decoration; |
| aaba4f1e |
Poul Sander |
2023-07-25 13:34 |
56 |
}; |
| aaba4f1e |
Poul Sander |
2023-07-25 13:34 |
57 |
|
| 2660ccea |
Poul Sander |
2023-09-22 19:25 |
58 |
struct ThemeFileData { |
| 2660ccea |
Poul Sander |
2023-09-22 19:25 |
59 |
std::vector<BackGroundData> background_data; |
| 2660ccea |
Poul Sander |
2023-09-22 19:25 |
60 |
std::vector<Theme> themes; |
| 2660ccea |
Poul Sander |
2023-09-22 19:25 |
61 |
}; |
| 2660ccea |
Poul Sander |
2023-09-22 19:25 |
62 |
|
| aaba4f1e |
Poul Sander |
2023-07-25 13:34 |
63 |
/** |
| aaba4f1e |
Poul Sander |
2023-07-25 13:34 |
64 |
* @brief returns a theme from a list |
| aaba4f1e |
Poul Sander |
2023-07-25 13:34 |
65 |
* @return A copy of a theme |
| aaba4f1e |
Poul Sander |
2023-07-25 13:34 |
66 |
*/ |
| aaba4f1e |
Poul Sander |
2023-07-25 13:34 |
67 |
Theme getNextTheme(); |
| 081d847a |
Poul Sander |
2023-07-29 19:59 |
68 |
|
| 081d847a |
Poul Sander |
2023-07-29 19:59 |
69 |
/** |
| 081d847a |
Poul Sander |
2023-07-29 19:59 |
70 |
* @brief getTheme returns a specific theme |
| 081d847a |
Poul Sander |
2023-07-29 19:59 |
71 |
* @param theme_number |
| 081d847a |
Poul Sander |
2023-07-29 19:59 |
72 |
* @return |
| 081d847a |
Poul Sander |
2023-07-29 19:59 |
73 |
*/ |
| 081d847a |
Poul Sander |
2023-07-29 19:59 |
74 |
Theme getTheme(size_t theme_number); |
|
|
1970-01-01 00:00 |
75 |
|