source: trunk/monsterz/fusion.h @ 350

Last change on this file since 350 was 348, checked in by sam, 11 years ago

Display spawn counts in Fusion mode, and generate random pieces accordingly.

  • Property svn:keywords set to Id
File size: 906 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//
12// The Fusion class
13// ----------------
14//
15
16#if !defined __MONSTERZ_FUSION_H__
17#define __MONSTERZ_FUSION_H__
18
19#include "monsterz.h"
20
21class FusionData;
22
23class Fusion : public WorldEntity
24{
25public:
26    Fusion(int2 dim, int minnpieces, int maxnpieces);
27    virtual ~Fusion();
28
29protected:
30    virtual void TickGame(float deltams);
31    virtual void TickDraw(float deltams);
32
33private:
34    int GetRandomId() const;
35    void Resolve();
36    int TagNeighbours(int list[MAX_PIECES][MAX_PIECES], int i, int j);
37
38    FusionData *data;
39};
40
41#endif // __MONSTERZ_FUSION_H__
42
Note: See TracBrowser for help on using the repository browser.