1 /* $Id: BaseView2D.h,v 1.3 2001/09/01 18:19:38 nan Exp $ */
2 
3 // Copyright (C) 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 _BaseView2D_
20 #define _BaseView2D_
21 
22 #include "BaseView.h"
23 #include "FieldView2D.h"
24 
25 bool RenderRect( double x1, double y1, double z1,
26 		 double x2, double y2, double z2,
27 		 SDL_Rect *rect );
28 bool RenderPoint( double x, double y, double z,
29 		  int *_x, int *_y );
30 
31 class BaseView2D : public BaseView {
32 public:
33   BaseView2D();
34   ~BaseView2D();
35 
36   bool Init();
37 
38   static void DisplayFunc();
39 
40   virtual bool RedrawAll();
41   virtual bool SetViewPosition();
42 
43   virtual void EndGame();
44   virtual void QuitGame();
45 
46   virtual bool AddUpdateRect( SDL_Rect *r );
47 protected:
48   virtual void SetLookAt();
49   long m_updateX1;
50   long m_updateY1;
51   long m_updateX2;
52   long m_updateY2;
53 };
54 
55 #endif // _BaseView2D
56