source: trunk/src/world.cpp @ 210

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

Allow for different priorities in game and draw tick levels.

  • Property svn:keywords set to Id
File size: 864 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    drawgroup = DRAWGROUP_BEFORE;
40}
41
42World::~World()
43{
44    delete data;
45}
46
47char const *World::GetName()
48{
49    return "<world>";
50}
51
52void World::TickGame(float deltams)
53{
54    Entity::TickGame(deltams);
55}
56
57void World::TickDraw(float deltams)
58{
59    Entity::TickDraw(deltams);
60}
61
62int World::GetWidth()
63{
64    return data->width * 32;
65}
66
67int World::GetHeight()
68{
69    return data->height * 32;
70}
71
Note: See TracBrowser for help on using the repository browser.