1 /* 2 Copyright (C) 1994-1995 Apogee Software, Ltd. 3 4 This program is free software; you can redistribute it and/or 5 modify it under the terms of the GNU General Public License 6 as published by the Free Software Foundation; either version 2 7 of the License, or (at your option) any later version. 8 9 This program is distributed in the hope that it will be useful, 10 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 13 See the GNU General Public License for more details. 14 15 You should have received a copy of the GNU General Public License 16 along with this program; if not, write to the Free Software 17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 19 */ 20 #ifndef _rt_msg_public 21 #define _rt_msg_public 22 23 #define MSG_PERMANENT 0x80 24 #define MSG_NODELETE 0x40 25 #define MSG_PRIORITY( x ) ( ( x ) & 0x3f ) 26 27 #define PERMANENT_MSG( x ) ( ( x ) & MSG_PERMANENT ) 28 #define DELETABLE_MSG( x ) ( ( x ) & MSG_NODELETE ) 29 30 #define MSG_MODEM ( 1 | MSG_PERMANENT ) 31 #define MSG_SYSTEM ( 2 ) 32 #define MSG_REMOTERIDICULE ( 3 ) 33 #define MSG_REMOTE ( 4 | MSG_NODELETE ) 34 #define MSG_GAME ( 5 | MSG_NODELETE ) 35 #define MSG_DOOR ( 6 ) 36 #define MSG_CHEAT ( 7 ) 37 #define MSG_NAMEMENU ( 8 | MSG_PERMANENT | MSG_NODELETE ) 38 #define MSG_QUIT ( 9 ) 39 #define MSG_MACRO ( 10 ) 40 #define MSG_BONUS1 ( 11 ) 41 #define MSG_BONUS ( 12 ) 42 #define MSG_MSGSYSTEM ( 13 ) 43 44 #define MAXMSGS 15 45 46 typedef struct msgt 47 { 48 byte active; 49 byte flags; 50 int tictime; 51 char * text; 52 } messagetype; 53 54 extern messagetype Messages[MAXMSGS]; 55 56 extern boolean MessagesEnabled; 57 58 59 void RestoreMessageBackground( void ); 60 void DrawMessages ( void ); 61 int AddMessage (char * text, int flags); 62 void InitializeMessages ( void ); 63 void ResetMessageTime ( void ); 64 int StringLength (char *string); 65 void UpdateModemMessage (int num, char c); 66 void ModemMessageDeleteChar (int num); 67 void DeleteMessage ( int num ); 68 void FinishModemMessage( int num, boolean send ); 69 void DeletePriorityMessage( int flags ); 70 71 #endif 72