source: trunk/src/world.cpp @ 183

Last change on this file since 183 was 183, checked in by sam, 9 years ago

Start creating the World class.

  • Property svn:keywords set to Id
File size: 891 bytes
Line 
1//
2// Deus Hax (working title)
3// Copyright (c) 2010 Sam Hocevar <sam@hocevar.net>
4//
5
6#if defined HAVE_CONFIG_H
7#   include "config.h"
8#endif
9
10#include <cstdio>
11#include <cstring>
12#include <cstdlib>
13#include <ctype.h>
14
15#include "core.h"
16
17/*
18 * World implementation class
19 */
20
21class WorldData
22{
23    friend class World;
24
25private:
26    int width, height;
27};
28
29/*
30 * Public World class
31 */
32
33World::World()
34{
35    data = new WorldData();
36    data->width = 0;
37    data->height = 0;
38}
39
40World::~World()
41{
42    delete data;
43}
44
45Entity::Group World::GetGroup()
46{
47    return GROUP_BEFORE;
48}
49
50char const *World::GetName()
51{
52    return "<world>";
53}
54
55void World::TickGame(float deltams)
56{
57    Entity::TickGame(deltams);
58}
59
60void World::TickDraw(float deltams)
61{
62    Entity::TickDraw(deltams);
63}
64
65int World::GetWidth()
66{
67    return data->width * 32;
68}
69
70int World::GetHeight()
71{
72    return data->height * 32;
73}
74
Note: See TracBrowser for help on using the repository browser.