Debian Codegraph @

src/game/trackdata.cpp

raw symbols SCIP
1 // This file is part of Dust Racing 2D.
2 // Copyright (C) 2011 Jussi Lind <[email protected]>
3 //
4 // Dust Racing 2D is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation, either version 3 of the License, or
7 // (at your option) any later version.
8 // Dust Racing 2D is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 // GNU General Public License for more details.
12 //
13 // You should have received a copy of the GNU General Public License
14 // along with Dust Racing 2D. If not, see <http://www.gnu.org/licenses/>.
15
16 #include "trackdata.hpp"
17 #include "tracktile.hpp"
18
19 TrackData::TrackData(QString name, bool isUserTrack, unsigned int cols, unsigned int rows)
20 : TrackDataBase(name, isUserTrack)
21 , m_map(cols, rows)
22 , m_route()
23 , m_isLocked(false)
24 {
25 }
26
27 QString TrackData::fileName() const
28 {
29 return m_fileName;
30 }
31
32 void TrackData::setFileName(QString newFileName)
33 {
34 m_fileName = newFileName;
35 }
36
37 Route & TrackData::route()
38 {
39 return m_route;
40 }
41
42 const Route & TrackData::route() const
43 {
44 return m_route;
45 }
46
47 MapBase & TrackData::map()
48 {
49 return m_map;
50 }
51
52 const MapBase & TrackData::map() const
53 {
54 return m_map;
55 }
56
57 Objects & TrackData::objects()
58 {
59 return m_objects;
60 }
61
62 const Objects & TrackData::objects() const
63 {
64 return m_objects;
65 }
66
67 bool TrackData::isLocked() const
68 {
69 return m_isLocked;
70 }
71
72 void TrackData::setIsLocked(bool locked)
73 {
74 m_isLocked = locked;
75 }
76
77 TrackData::~TrackData() = default;