3 * Daniel Nelson - 10/27/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
25 * Very simple, but I need somewhere to put this code.
29 #include "CountDownManager.h"
30 #include "MessageManager.h"
31 #include "Displayer.h"
35 int CountDownManager::state
;
36 int CountDownManager::start_pause_alarm
;
37 int CountDownManager::message_switch_alarm
;
39 void CountDownManager::gameStart ( )
41 start_pause_alarm
= GC_START_PAUSE_DELAY
;
42 message_switch_alarm
= GC_START_PAUSE_DELAY
/ 3;
45 MessageManager::readyMessage(state
);
48 void CountDownManager::cleanUp ( )
50 if (state
!= -1) MessageManager::freeMessage();
53 void CountDownManager::timeStep_inline_split_ ( )
55 if (start_pause_alarm
)
58 if (--message_switch_alarm
== 0)
60 MessageManager::freeMessage();
61 message_switch_alarm
= 0;
63 } else if (state
== MS_COUNT_DOWN_GO
) {
64 MessageManager::freeMessage();
65 MessageManager::readyMessage(MS_COUNT_DOWN_GO
);
66 message_switch_alarm
= GC_START_PAUSE_DELAY
/ 3;
69 MessageManager::nextMessage(state
);
70 message_switch_alarm
= GC_START_PAUSE_DELAY
/ 3;