File: epimap.h

package info (click to toggle)
epiphany 0.7.0+0-6
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 7,532 kB
  • sloc: cpp: 6,404; ansic: 141; makefile: 78; sh: 7
file content (102 lines) | stat: -rw-r--r-- 2,396 bytes parent folder | download | duplicates (6)
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
// -*-C++-*-
/***************************************************************************
                    epimap.h  -  Definition of epimap class
                             -------------------
    begin                : Sat Aug 3 2002
    copyright            : (C) 2002 by Giuseppe Martino aka denever
    email                : rdmartin@infinito.it
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License, Version 2,      *
 *   as published by the Free Software Foundation.                         *
 *                                                                         *
 ***************************************************************************/

#include "dephine.h"
#include "entity_type.h"
#include <vector>
#include <string>

#ifndef EPIMAP_H
#define EPIMAP_H

typedef std::vector< std::vector<Entity_Type> > entity_matrix;

class Epimap
{
private:
	Uint32 m_version;
	Uint32 m_size_x;
	Uint32 m_size_y;

	std::string m_name;
	std::string m_author;

	Uint32 m_min_score;
	Uint32 m_max_time;

	entity_matrix m_map;



	void make_borders();

	bool m_player_on_map();


	bool m_exit_on_map();

public:

	Epimap();
//	Epimap(const Epimap&);
	~Epimap();

	void set_map_version(Uint32);
	Uint32 get_map_version();

	Uint32 count_total_score();
	Uint32 get_min_score();
	Uint32 get_max_time();
    
	void set_min_score(Uint32);
	void set_max_time(Uint32);
    
	std::string get_name();
	std::string get_author();
    
	void set_name(const std::string&);
	void set_author(const std::string&);
    
	Uint32 get_size_x();
	Uint32 get_size_y();
    
	void set_map_size_xy(Uint32, Uint32);
       
	entity_matrix& get_map();

	void put_entity(Entity_Type, Uint32, Uint32);

	Entity_Type get_entity(Uint32, Uint32);

	void put_line(Entity_Type, Uint32, Uint32, Uint32, Uint32);

	void put_rectangle(Entity_Type, Uint32, Uint32, Uint32, Uint32);

};
 /*
class Epimap_excep
{// temporany exception class
public:
    Epimap_excep(const std::string& msg): m_msg(msg)
	{};
    inline std::string get_msg(){ return m_msg;};

private:
    std::string m_msg;
};
*/
#endif //EPIMAP_H