1 #ifndef __GNUC__
2 #pragma once
3 #endif
4 #ifndef __XR_LEVEL_GAME_H__
5 #define __XR_LEVEL_GAME_H__
6 
7 #include "xr_ai_way.h"
8 
9 namespace xray_re {
10 
11 // in-game format defs.
12 enum {
13 	GAME_CHUNK_WAYS		= 0x1000,
14 	GAME_CHUNK_RPOINTS	= 0x2000,
15 };
16 
17 class xr_level_game {
18 public:
19 				xr_level_game();
20 				xr_level_game(xr_reader& r);
21 	virtual			~xr_level_game();
22 
23 	void			load(xr_reader& r);
24 	void			save(xr_writer& w) const;
25 	bool			load(const char* path, const char* name);
26 	bool			save(const char* path, const char* name) const;
27 
28 	way_path_vec&		paths();
29 	const way_path_vec&	paths() const;
30 	mp_rpoint_vec&		rpoints();
31 	const mp_rpoint_vec&	rpoints() const;
32 
33 private:
34 	way_path_vec		m_paths;
35 	mp_rpoint_vec		m_rpoints;
36 };
37 
xr_level_game()38 inline xr_level_game::xr_level_game() {}
xr_level_game(xr_reader & r)39 inline xr_level_game::xr_level_game(xr_reader& r) { load(r); }
40 
paths()41 inline way_path_vec& xr_level_game::paths() { return m_paths; }
paths()42 inline const way_path_vec& xr_level_game::paths() const { return m_paths; }
rpoints()43 inline mp_rpoint_vec& xr_level_game::rpoints() { return m_rpoints; }
rpoints()44 inline const mp_rpoint_vec& xr_level_game::rpoints() const { return m_rpoints; }
45 
46 } // end of namespace xray_re
47 
48 #endif
49