File: messages.h

package info (click to toggle)
qonk 0.3.1-1
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 2,076 kB
  • ctags: 2,026
  • sloc: cpp: 14,978; sh: 3,464; makefile: 200
file content (48 lines) | stat: -rw-r--r-- 1,064 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
// Copyright 2005 by Anthony Liekens anthony@liekens.net

#ifndef MESSAGES_H
#define MESSAGES_H

#include <string>
#include <map>

#include <SDL/SDL.h>

class Universe;
class Game;

class Message {
private:
  Uint8 r, g, b;
  Uint32 displayTime;
  std::string message;
public:
  Message( Uint32, std::string message, Uint32 displayTime, Uint8 r, Uint8 g, Uint8 b );
  Message( Uint32, std::string message, Uint32 displayTime, Uint32 color );
  Message( Uint32, std::string message, Uint8 r, Uint8 g, Uint8 b );
  Message( Uint32, std::string message, Uint32 color );
  void render(int &x, int &y, int time );
  Uint32 getDisplayTime();
};

class Messages : std::multimap< Uint32, Message > {
//Begin Jacobsen
private:
	Message fleetStrengthMessage;
//End Jacobsen
public:
  Messages();
  ~Messages();
  void addMessage( Uint32 time, Message m );
  void cleanup(Uint32);
  void render(Uint32);
  
  //Begin Jacobsen
  void setFleetStrengthMessage( Message m );
  //End Jacobsen
};

void MSGwon(Game *, int, int);
void MSGlost(Game *);
void MSGstart(Game *);
#endif