00001 #ifndef _MESSAGEQ_H 00002 00003 #include <stdio.h> // Header File For Standard Input/Output 00004 #include <GL/gl.h> 00005 #include <GL/glu.h> 00006 #include <SDL/SDL.h> 00007 #include <string> 00008 #include <iostream> 00009 #include <fstream> 00010 00011 #include "font.h" 00012 00013 using namespace std; 00014 00015 #define MAX_Q_DEPTH 20 00016 00017 //note: q => queue 00018 00019 class MESSAGEQ 00020 { 00021 //public: 00022 private: 00023 int qdepth; 00024 float qpersist; 00025 string q[MAX_Q_DEPTH]; 00026 bool valid[MAX_Q_DEPTH]; 00027 float qlen[MAX_Q_DEPTH]; 00028 float posx; 00029 float posy; 00030 int size; 00031 int fset; 00032 bool printtime; 00033 bool buildup; 00034 00035 public: 00036 MESSAGEQ(); 00037 ~MESSAGEQ(); 00038 void Clear(); 00039 void SetDepth(int newqdepth); 00040 void SetPersist(float newqpersist); 00041 void SetTimePrint(bool newprinttime); 00042 void SetBuildUp(bool newbuildup); 00043 void SetPos(float newx, float newy, int newsize, int newfset); 00044 void AddMessage(string newq); 00045 void Draw(float timefactor, float fps, FONT & font); 00046 }; 00047 00048 #define _MESSAGEQ_H 00049 #endif
1.4.6