1 /* 2 ** st_start.h 3 ** Interface for the startup screen. 4 ** 5 **--------------------------------------------------------------------------- 6 ** Copyright 2006-2007 Randy Heit 7 ** All rights reserved. 8 ** 9 ** Redistribution and use in source and binary forms, with or without 10 ** modification, are permitted provided that the following conditions 11 ** are met: 12 ** 13 ** 1. Redistributions of source code must retain the above copyright 14 ** notice, this list of conditions and the following disclaimer. 15 ** 2. Redistributions in binary form must reproduce the above copyright 16 ** notice, this list of conditions and the following disclaimer in the 17 ** documentation and/or other materials provided with the distribution. 18 ** 3. The name of the author may not be used to endorse or promote products 19 ** derived from this software without specific prior written permission. 20 ** 21 ** THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 22 ** IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 23 ** OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 24 ** IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 25 ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 26 ** NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27 ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28 ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 30 ** THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 **--------------------------------------------------------------------------- 32 ** 33 ** The startup screen interface is based on a mix of Heretic and Hexen. 34 ** Actual implementation is system-specific. 35 */ 36 37 class FStartupScreen 38 { 39 public: 40 static FStartupScreen *CreateInstance(int max_progress); 41 42 FStartupScreen(int max_progress); 43 virtual ~FStartupScreen(); 44 45 virtual void Progress(); 46 virtual void LoadingStatus(const char *message, int colors); // Used by Heretic only 47 virtual void AppendStatusLine(const char *status); // Used by Heretic only 48 49 virtual void NetInit(const char *message, int num_players); 50 virtual void NetProgress(int count); 51 virtual void NetMessage(const char *format, ...); // cover for printf 52 virtual void NetDone(); 53 virtual bool NetLoop(bool (*timer_callback)(void *), void *userdata); 54 protected: 55 int MaxPos, CurPos, NotchPos; 56 }; 57 58 extern FStartupScreen *StartScreen; 59 60 extern void ST_Endoom(); 61