1 /* $Id: BaseView.h,v 1.11 2001/09/19 14:05:22 nan Exp $ */
2 
3 // Copyright (C) 2000, 2001  $B?@Fn(B $B5H9((B(Kanna Yoshihiro)
4 //
5 // This program is free software; you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation; either version 2 of the License, or
8 // (at your option) any later version.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 // 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 #ifndef _BaseView_
20 #define _BaseView_
21 
22 #include "View.h"
23 #include "FieldView.h"
24 
25 
26 class BaseView {
27 public:
28   virtual ~BaseView();
29 
30   static BaseView *TheView();
31 
32   virtual bool Init();
33 
34   static void DisplayFunc();
35 
36   virtual bool RedrawAll();
37   virtual bool SetViewPosition();
38 
39   virtual bool AddView( View *view );
40   virtual bool RemoveView( View *view );
41 
42   virtual void EndGame();
43   virtual void QuitGame();
44 
GetWinWidth()45   static long GetWinWidth() { return m_winWidth; };
GetWinHeight()46   static long GetWinHeight() { return m_winHeight; };
47 
GetSurface()48   virtual SDL_Surface *GetSurface() { return m_baseSurface; };
49 protected:
50   BaseView();
51 
52   double         m_centerX;
53   double         m_centerY;
54   double         m_centerZ;
55   View           *m_View;
56   FieldView      *m_fieldView;
57 
58   static long    m_winWidth;
59   static long    m_winHeight;
60 
61   //GLuint       m_offset;
62   //GLuint       m_floor;
63   GLuint       m_title;
64   //GLuint       m_wall[4];
65 
66   SDL_Surface	*m_baseSurface;
67 
68   virtual void SetLookAt();
69 
70 private:
71   static BaseView* m_theView;
72 };
73 
74 #endif // _BaseView
75