Last change
on this file since 1110 was
1110,
checked in by sam, 9 years ago
|
core: prefix Entity members with m_ to avoid accidental shadowing.
|
-
Property svn:keywords set to
Id
|
File size:
1.1 KB
|
Line | |
---|
1 | // |
---|
2 | // Lol Engine |
---|
3 | // |
---|
4 | // Copyright: (c) 2010-2011 Sam Hocevar <sam@hocevar.net> |
---|
5 | // This program is free software; you can redistribute it and/or |
---|
6 | // modify it under the terms of the Do What The Fuck You Want To |
---|
7 | // Public License, Version 2, as published by Sam Hocevar. See |
---|
8 | // http://sam.zoy.org/projects/COPYING.WTFPL for more details. |
---|
9 | // |
---|
10 | |
---|
11 | #if defined HAVE_CONFIG_H |
---|
12 | # include "config.h" |
---|
13 | #endif |
---|
14 | |
---|
15 | #include <cstring> |
---|
16 | #include <cstdlib> |
---|
17 | #include <ctype.h> |
---|
18 | |
---|
19 | #include "core.h" |
---|
20 | |
---|
21 | namespace lol |
---|
22 | { |
---|
23 | |
---|
24 | /* |
---|
25 | * World implementation class |
---|
26 | */ |
---|
27 | |
---|
28 | class WorldData |
---|
29 | { |
---|
30 | friend class World; |
---|
31 | |
---|
32 | private: |
---|
33 | int width, height; |
---|
34 | }; |
---|
35 | |
---|
36 | /* |
---|
37 | * Public World class |
---|
38 | */ |
---|
39 | |
---|
40 | World::World() |
---|
41 | : data(new WorldData()) |
---|
42 | { |
---|
43 | data->width = 0; |
---|
44 | data->height = 0; |
---|
45 | |
---|
46 | m_drawgroup = DRAWGROUP_BEFORE; |
---|
47 | } |
---|
48 | |
---|
49 | World::~World() |
---|
50 | { |
---|
51 | delete data; |
---|
52 | } |
---|
53 | |
---|
54 | char const *World::GetName() |
---|
55 | { |
---|
56 | return "<world>"; |
---|
57 | } |
---|
58 | |
---|
59 | void World::TickGame(float deltams) |
---|
60 | { |
---|
61 | Entity::TickGame(deltams); |
---|
62 | } |
---|
63 | |
---|
64 | void World::TickDraw(float deltams) |
---|
65 | { |
---|
66 | Entity::TickDraw(deltams); |
---|
67 | } |
---|
68 | |
---|
69 | int World::GetWidth() |
---|
70 | { |
---|
71 | return data->width * 32; |
---|
72 | } |
---|
73 | |
---|
74 | int World::GetHeight() |
---|
75 | { |
---|
76 | return data->height * 32; |
---|
77 | } |
---|
78 | |
---|
79 | } /* namespace lol */ |
---|
80 | |
---|
Note: See
TracBrowser
for help on using the repository browser.