Last change
on this file since 686 was
686,
checked in by sam, 10 years ago
|
Put everything in the "lol" namespace. Better late than never.
|
-
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 <cstdio> |
---|
16 | #include <cstring> |
---|
17 | #include <cstdlib> |
---|
18 | #include <ctype.h> |
---|
19 | |
---|
20 | #include "core.h" |
---|
21 | |
---|
22 | namespace lol |
---|
23 | { |
---|
24 | |
---|
25 | /* |
---|
26 | * World implementation class |
---|
27 | */ |
---|
28 | |
---|
29 | class WorldData |
---|
30 | { |
---|
31 | friend class World; |
---|
32 | |
---|
33 | private: |
---|
34 | int width, height; |
---|
35 | }; |
---|
36 | |
---|
37 | /* |
---|
38 | * Public World class |
---|
39 | */ |
---|
40 | |
---|
41 | World::World() |
---|
42 | : data(new WorldData()) |
---|
43 | { |
---|
44 | data->width = 0; |
---|
45 | data->height = 0; |
---|
46 | |
---|
47 | drawgroup = DRAWGROUP_BEFORE; |
---|
48 | } |
---|
49 | |
---|
50 | World::~World() |
---|
51 | { |
---|
52 | delete data; |
---|
53 | } |
---|
54 | |
---|
55 | char const *World::GetName() |
---|
56 | { |
---|
57 | return "<world>"; |
---|
58 | } |
---|
59 | |
---|
60 | void World::TickGame(float deltams) |
---|
61 | { |
---|
62 | Entity::TickGame(deltams); |
---|
63 | } |
---|
64 | |
---|
65 | void World::TickDraw(float deltams) |
---|
66 | { |
---|
67 | Entity::TickDraw(deltams); |
---|
68 | } |
---|
69 | |
---|
70 | int World::GetWidth() |
---|
71 | { |
---|
72 | return data->width * 32; |
---|
73 | } |
---|
74 | |
---|
75 | int World::GetHeight() |
---|
76 | { |
---|
77 | return data->height * 32; |
---|
78 | } |
---|
79 | |
---|
80 | } /* namespace lol */ |
---|
81 | |
---|
Note: See
TracBrowser
for help on using the repository browser.