| 1 | /*************************************************************************** |
| 2 | message.h - description |
| 3 | ------------------- |
| 4 | begin : Monday Jan 13 2003 |
| 5 | copyright : (C) 2003 by Michael Bridak |
| 6 | email : [email protected] |
| 7 | $Id: message.h,v 1.3 2003/04/20 16:44:30 mbridak Exp $ |
| 8 | ***************************************************************************/ |
| 9 | |
| 10 | /*************************************************************************** |
| 11 | * * |
| 12 | * This program is free software; you can redistribute it and/or modify * |
| 13 | * it under the terms of the GNU General Public License as published by * |
| 14 | * the Free Software Foundation; either version 2 of the License. * |
| 15 | * . * |
| 16 | * * |
| 17 | ***************************************************************************/ |
| 18 | |
| 19 | #ifndef MESSAGE_H |
| 20 | #define MESSAGE_H |
| 21 | |
| 22 | #include <string> |
| 23 | |
| 24 | /** |
| 25 | *@author Michael Bridak |
| 26 | */ |
| 27 | |
| 28 | class msg { |
| 29 | public: |
| 30 | char buffer[20][256]; |
| 31 | |
| 32 | void InitGraphics(); |
| 33 | |
| 34 | /** Places a one line message into the |
| 35 | message buffer to be later displayed |
| 36 | by the display_message() method.*/ |
| 37 | void post_message(char *temp_string); |
| 38 | |
| 39 | /** Displays the tail end of the buffer |
| 40 | onto the main screen.*/ |
| 41 | void display_message(); |
| 42 | |
| 43 | /** Our constructor....*/ |
| 44 | msg(); |
| 45 | |
| 46 | /** And the probably never to be used destructor..*/ |
| 47 | ~msg(); |
| 48 | private: |
| 49 | /** Our main storage for buffer text.*/ |
| 50 | |
| 51 | SDL_Surface *screen; |
| 52 | SDL_Surface *messagewindow; |
| 53 | DFont largeFont(const char*, const char *); |
| 54 | Uint32 textcolor; |
| 55 | Uint32 black; |
| 56 | Uint32 white; |
| 57 | Uint32 red; |
| 58 | Uint32 green; |
| 59 | Uint32 yellow; |
| 60 | |
| 61 | }; |
| 62 | |
| 63 | #endif |