moved almost all hardcoded constants to "define.dat"
[k8-i-v-a-n.git] / src / game / message.h
bloba23246dde87ad977ee359db0c14685e4244d211a
1 /*
3 * Iter Vehemens ad Necem (IVAN)
4 * Copyright (C) Timo Kiviluoto
5 * Released under the GNU General
6 * Public License
8 * See LICENSING which should be included
9 * along with this file for more details
12 #ifndef __MESSAGE_H__
13 #define __MESSAGE_H__
15 #include "ivancommon.h"
17 #include <vector>
18 #include "v2.h"
19 #include "festring.h"
22 #define ADD_MESSAGE msgsystem::AddMessage
25 class felist;
26 class outputfile;
27 class inputfile;
28 class bitmap;
31 class msgsystem {
32 public:
33 static void LIKE_PRINTF(1, 2) AddMessage(cchar*, ...);
34 static void Draw();
35 static void DrawMessageHistory();
36 static void Format();
37 static void Save(outputfile&);
38 static void Load(inputfile&);
39 static void ScrollDown();
40 static void ScrollUp();
41 static void EnableMessages() { Enabled = true; }
42 static void DisableMessages() { Enabled = false; }
43 static void EnterBigMessageMode() { BigMessageMode = true; }
44 static void LeaveBigMessageMode();
45 static void Init();
46 static void InitMessagesSinceLastKeyScan();
47 static void ThyMessagesAreNowOld();
48 private:
49 static felist MessageHistory;
50 static festring LastMessage;
51 static festring BigMessage;
52 static int Times;
53 static v2 Begin, End;
54 static truth Enabled;
55 static truth BigMessageMode;
56 static truth MessagesChanged;
57 static bitmap* QuickDrawCache;
58 static int LastMessageLines;
62 class soundsystem {
63 public:
64 static void playSound (const festring &Buffer);
65 static void setVolume (sLong vol); // 0..128
67 private:
68 static void initSound ();
69 static int addFile (const festring &filename);
70 //static truth matches (const festring &Pattern, const festring &Buffer);
71 static struct SoundFile *findMatchingSound (const festring &Buffer);
73 private:
74 static int SoundState;
75 static std::vector<struct SoundFile> files;
76 static std::vector<struct SoundInfo> patterns;
80 #endif