summary refs log tree commit diff stats
path: root/hslist.h
blob: f043336ad6d2b940ec1c78721504e125354acb3a (plain) (blame)
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
53
54
55
56
57
58
59
60
61
62
#include <SDL.h>
#include <vector>
#include "highscore.h"
#include "state.h"

#ifndef HSLIST_H
#define HSLIST_H

class HighscoreList
{
	public:
		SDL_Surface* render();

	protected:
		std::vector<Highscore> getLocalHighscores();
		std::vector<Highscore> getGlobalHighscores();

		std::vector<Highscore> hslist;
};

class LocalHighscoreList : public HighscoreList {
	public:
		LocalHighscoreList();
};

class GlobalHighscoreList : public HighscoreList {
	public:
		GlobalHighscoreList();
		SDL_Surface* render();

	private:
		typedef HighscoreList super;

	protected:
		bool fail;
};

class ChooseHighscoreListState : public State {
	public:
		State* operator() (SDL_Renderer* renderer);
};

class DisplayLocalHighscoreListState : public State {
	public:
		State* operator() (SDL_Renderer* renderer);
};

class DisplayGlobalHighscoreListState : public State {
	public:
		State* operator() (SDL_Renderer* renderer);
		
	protected:
		SDL_Surface* list_s;
		SDL_Texture* list;
		GlobalHighscoreList* lhl;
		SDL_mutex* m;
		
	private:
		static int LoadHighscoreList(void* pParam);
};

#endif