Main Page | Class Hierarchy | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

PhaseLocker.cpp

Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 2004 Ivo Danihelka (ivo@danihelka.net)
00003  *
00004  * This program is free software; you can redistribute it and/or modify
00005  * it under the terms of the GNU General Public License as published by
00006  * the Free Software Foundation; either version 2 of the License, or
00007  * (at your option) any later version.
00008  */
00009 #include "PhaseLocker.h"
00010 
00011 #include "minmax.h"
00012 
00013 //-----------------------------------------------------------------
00014 PhaseLocker::PhaseLocker()
00015 {
00016     m_lockPhases = 0;
00017 }
00018 //-----------------------------------------------------------------
00019 /**
00020  * Reserve game cycle for blocking animation.
00021  * @param count how much phases we need
00022  */
00023     void
00024 PhaseLocker::ensurePhases(int count)
00025 {
00026     m_lockPhases = max(m_lockPhases, count);
00027 }
00028 //-----------------------------------------------------------------
00029 void
00030 PhaseLocker::decLock()
00031 {
00032     if (m_lockPhases > 0) {
00033         m_lockPhases--;
00034     }
00035 }
00036 

Generated on Wed Jun 1 09:54:31 2005 for Fish Fillets - Next Generation by  doxygen 1.4.2