source: trunk/src/world.cpp @ 2183

Last change on this file since 2183 was 2183, checked in by sam, 7 years ago

build: fix the WTFPL site URL in all code comments.

  • Property svn:keywords set to Id
File size: 1.1 KB
Line 
1//
2// Lol Engine
3//
4// Copyright: (c) 2010-2012 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://www.wtfpl.net/ 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
21namespace lol
22{
23
24/*
25 * World implementation class
26 */
27
28class WorldData
29{
30    friend class World;
31
32private:
33    int width, height;
34};
35
36/*
37 * Public World class
38 */
39
40World::World()
41  : data(new WorldData())
42{
43    data->width = 0;
44    data->height = 0;
45
46    m_drawgroup = DRAWGROUP_BEFORE;
47}
48
49World::~World()
50{
51    delete data;
52}
53
54char const *World::GetName()
55{
56    return "<world>";
57}
58
59void World::TickGame(float seconds)
60{
61    Entity::TickGame(seconds);
62}
63
64void World::TickDraw(float seconds)
65{
66    Entity::TickDraw(seconds);
67}
68
69int World::GetWidth()
70{
71    return data->width * 32;
72}
73
74int World::GetHeight()
75{
76    return data->height * 32;
77}
78
79} /* namespace lol */
80
Note: See TracBrowser for help on using the repository browser.