source: trunk/src/world.cpp @ 686

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
22namespace lol
23{
24
25/*
26 * World implementation class
27 */
28
29class WorldData
30{
31    friend class World;
32
33private:
34    int width, height;
35};
36
37/*
38 * Public World class
39 */
40
41World::World()
42  : data(new WorldData())
43{
44    data->width = 0;
45    data->height = 0;
46
47    drawgroup = DRAWGROUP_BEFORE;
48}
49
50World::~World()
51{
52    delete data;
53}
54
55char const *World::GetName()
56{
57    return "<world>";
58}
59
60void World::TickGame(float deltams)
61{
62    Entity::TickGame(deltams);
63}
64
65void World::TickDraw(float deltams)
66{
67    Entity::TickDraw(deltams);
68}
69
70int World::GetWidth()
71{
72    return data->width * 32;
73}
74
75int World::GetHeight()
76{
77    return data->height * 32;
78}
79
80} /* namespace lol */
81
Note: See TracBrowser for help on using the repository browser.