#include <AfxWin.h>
#include <AfxExt.h>
#include <ddraw.h>
#include <d3d.h>
#include <d3drm.h>
#include <d3drmwin.h>
#include "RMApp.h"
#include "RMWin.h"

#ifdef _DEBUG
#undef THIS_FILE
static char BASED_CODE THIS_FILE[] = __FILE__;
#endif


BEGIN_MESSAGE_MAP(RMApp, CWinApp)
	//{{AFX_MSG_MAP(RMApp)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

RMApp::RMApp()
{
	rmwin=0;
	m_pMainWnd=0;
}

BOOL RMApp::InitInstance()
{
	ASSERT(m_pMainWnd);
	m_pMainWnd->ShowWindow( SW_SHOWNORMAL );
	m_pMainWnd->UpdateWindow();
	return TRUE;
}

BOOL RMApp::OnIdle(LONG count) 
{
	ASSERT( RMWin::d3drm );
	ASSERT( rmwin );
	rmwin->OnIdle( count );
	RMWin::d3drm->Tick( D3DVALUE(1) );
	return TRUE;
}

