D:/Zythum/DinoKod/Common/Game.h

00001 //---------------------------------------------------------------------------------------------
00002 //      This file is a part of "DinoKod".
00003 //      Copyright © 2003 Dino Productions. All Rights Reserved.
00004 //      
00005 //      File                    : Game.h
00006 //      Author                  : Sebastien LEIX        sebastien.leix@wanadoo.fr
00007 //      Date                    : 
00008 //      Modification    :
00009 //
00010 //---------------------------------------------------------------------------------------------
00011 #ifndef __GAME_H__
00012 #define __GAME_H__
00013 
00014 #include "Common/CommonDll.h"
00015 #include <windows.h>
00016 #include "Common/Types.h"
00017 
00018 class KIni;
00019 class KVariableList;
00020 class KCommandList;
00021 
00022 //---------------------------------------------------------------------------------------------------------------------
00023 class COMMON_API KGame
00024 {
00025 protected:
00026         HINSTANCE                               m_hInstance;
00027         KIni*                                   m_pIniFile;
00028         KVariableList*                  m_pVariable;
00029         KCommandList*                   m_pCommand;
00030         KTIME                                   m_StartTime;
00031         KVERSION                                m_Version;
00032 
00033         bool                                    m_bQuit;
00034         HWND                                    m_hWnd;
00035 
00036         static void                             CommandEcho( KStr sArgument, void* pContext );
00037         static void                             CommandExit( KStr sArgument, void* pContext );
00038         static void                             CommandHelp( KStr sArgument, void* pContext );
00039 
00040 public:
00041                                                         KGame( HINSTANCE hInstance );
00042         virtual                                 ~KGame();
00043 
00044         virtual bool                    Init();
00045         virtual void                    Run()=0;
00046         virtual void                    End();
00047 
00048         // Accessors
00049         void                                    SethWnd( HWND hWnd )    { m_hWnd = hWnd;                }
00050         HWND                                    GethWnd()                               { return m_hWnd;                }
00051         HINSTANCE                               GethInstance()                  { return m_hInstance;   }
00052         KIni*                                   GetpIniFile()                   { return m_pIniFile;    }
00053         KVariableList*                  GetpVariable()                  { return m_pVariable;   }
00054         KCommandList*                   GetpCommand()                   { return m_pCommand;    }
00055         KTIME                                   GetStartTime()                  { return m_StartTime;   }
00056         KVERSION                                GetVersion()                    { return m_Version;             }
00057 
00058         void                                    Quit()                                  { m_bQuit = true;               }
00059 };
00060 
00061 extern COMMON_API KGame*        g_pGame;
00062 
00063 #endif  __GAME_H__

Generated on Sun Mar 25 20:02:10 2007 for Zythum Project by  doxygen 1.5.1-p1