-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhiscore_cell.cpp
More file actions
52 lines (36 loc) · 1.88 KB
/
hiscore_cell.cpp
File metadata and controls
52 lines (36 loc) · 1.88 KB
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
#include "splashkit.h"
#include "menu.h"
#include "button.h"
#include "battlestar.h"
#include <vector>
#include "hiscore_cell.h"
using namespace std;
hiscore_cell_data new_hiscore_cell(int placing, int score, double x_pos, double y_pos)
{
hiscore_cell_data hiscore_cell;
hiscore_cell.placing = placing;
hiscore_cell.score = score;
hiscore_cell.x_pos = x_pos;
hiscore_cell.y_pos = y_pos;
return hiscore_cell;
}
void update_hiscore_cell(hiscore_cell_data &hiscore_cell)
{
// update_sprite(hiscore_cell.hiscore_cell_placing_sprite);
// update_sprite(hiscore_cell.hiscore_cell_score_sprite);
// draw_text(to_string(hiscore_cell.placing), COLOR_WHITE, load_font("pcsenior", "pcsenior"), 16, hiscore_cell.x_pos, hiscore_cell.y_pos, option_to_screen());
// draw_text(to_string(hiscore_cell.score), COLOR_WHITE, load_font("pcsenior", "pcsenior"), 16, hiscore_cell.x_pos, hiscore_cell.y_pos+100, option_to_screen());
}
void draw_hiscore_cell(hiscore_cell_data &hiscore_cell)
{
bitmap hiscore_cell_placing_bitmap;
bitmap hiscore_cell_score_bitmap;
// draw_sprite(hiscore_cell.hiscore_cell_placing_sprite);
// draw_sprite(hiscore_cell.hiscore_cell_score_sprite);
hiscore_cell_placing_bitmap = bitmap_named("hiscore_cell_placing");
hiscore_cell_score_bitmap = bitmap_named("hiscore_cell_score");
draw_bitmap(hiscore_cell_placing_bitmap, hiscore_cell.x_pos, hiscore_cell.y_pos);
draw_bitmap(hiscore_cell_score_bitmap, hiscore_cell.x_pos+50, hiscore_cell.y_pos);
draw_text(to_string(hiscore_cell.placing), COLOR_BLACK, load_font("pcsenior", "pcsenior"), 16, hiscore_cell.x_pos+10, hiscore_cell.y_pos+15, option_to_screen());
draw_text(to_string(hiscore_cell.score), COLOR_WHITE, load_font("pcsenior", "pcsenior"), 16, hiscore_cell.x_pos+100, hiscore_cell.y_pos+15, option_to_screen());
}