source: trunk/monsterz/mash.cpp @ 259

Last change on this file since 259 was 259, checked in by sam, 10 years ago

Slightly change the ...Data initialisation in classes.

File size: 972 bytes
Line 
1//
2// Monsterz
3//
4// Copyright: (c) 2005-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 <cmath>
17
18#include "core.h"
19#include "mash.h"
20#include "monsterz.h"
21
22/*
23 * Mash implementation class
24 */
25
26class MashData
27{
28    friend class Mash;
29
30private:
31    Game *game;
32};
33
34/*
35 * Public Mash class
36 */
37
38Mash::Mash(Game *game, Int2 *cell)
39  : data(new MashData()),
40    nextmash(NULL)
41{
42    data->game = game;
43    Ticker::Ref(game);
44}
45
46void Mash::TickGame(float deltams)
47{
48    Entity::TickGame(deltams);
49}
50
51void Mash::TickDraw(float deltams)
52{
53    Entity::TickDraw(deltams);
54}
55
56Mash::~Mash()
57{
58    Ticker::Unref(data->game);
59    delete data;
60}
61
Note: See TracBrowser for help on using the repository browser.