3 * Daniel Nelson - 8/24/0
5 * Copyright (C) 2000 Daniel Nelson
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 2
10 * of the License, or (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21 * Daniel Nelson - aluminumangel.org
26 #ifndef MESSAGEMANAGER_H
27 #define MESSAGEMANAGER_H
31 #include "Displayer.h"
34 #define MS_1x1 (1 << 0)
35 #define MS_2x1 (1 << 1)
36 #define MS_4x1 (1 << 2)
39 #define MS_COUNT_DOWN_GO (0)
40 #define MS_COUNT_DOWN_1 (1)
41 #define MS_COUNT_DOWN_2 (2)
42 #define MS_COUNT_DOWN_3 (3)
44 #define MS_WAITING (5)
48 #define MS_GAME_OVER (9)
51 #define MM_NORMAL (1 << 0)
52 #define MM_CELEBRATION (1 << 1)
54 /* static */ class MessageManager
{
56 static inline void readyMessage ( int message
)
58 Displayer::readyMessage(message
);
59 message_shape
= Displayer::message_shape
[message
];
63 static inline void nextMessage ( int message
)
65 Displayer::nextMessage(message
);
66 message_shape
= Displayer::message_shape
[message
];
70 static inline void freeMessage ( )
72 Displayer::freeMessage();
76 static inline void timeStep ( )
78 if (!message_shape
) return;
79 if (++time_step
== DC_MESSAGE_PULSE_PERIOD
)
83 static int message_shape
;