예제 #1
0
파일: LCD.cpp 프로젝트: aiten/CNCLib
void CLcd::Init()
{
	_nextdrawtime = Splash() + millis();
	_splash = true;

	DrawRequest(CLcd::DrawForceAll);		//first draw doesnt return fast! call at init time
}
예제 #2
0
void GraphicsHandler::draw(SDL_Texture* texture,
                           SDL_Rect src_rect,
                           SDL_Rect dest_rect,
                           GraphicPriority priority,
                           bool cleanup,
                           double angle_clockwise,
                           SDL_Point* rotation_point) {
    draw_queue_.at(priority).push_back(DrawRequest(texture, src_rect, dest_rect, cleanup, angle_clockwise, rotation_point));
}
예제 #3
0
파일: U8GLCD.cpp 프로젝트: aiten/CNCLib
void CU8GLcd::ButtonPress()
{
    ButtonFunction fnc = GetButtonPress(&_pagedef[GetPage()].buttonpress);

    if (fnc)
    {
        (*this.*fnc)();
        DrawRequest(DrawForceAll);
    }
}
예제 #4
0
파일: Sprite.cpp 프로젝트: Taka03/DogFight
//============================================================================
//処理
//============================================================================
void CSprite::Exec()
{
	/*アニメーションの設定*/
	SetAnimation();
	
	/*描画先*/
	m_DstRect.Set( m_vPos.x, m_vPos.y, m_fSize.x * m_fScale.x, m_fSize.y * m_fScale.y );
	
	/*描画元*/
	m_SrcRect.Set( m_Anim.x * m_fSize.x, m_Anim.y * m_fSize.y, m_fSize.x, m_fSize.y );
	
	//描画リクエスト
	DrawRequest();
	
	map< string, sp<CGameObject> > mapDraw;
	
	mapDraw.clear();
	
	mapDraw = CCommonObject::GetResMgr()->GetDrawMap();

	map< string, sp<CGameObject> >::iterator it = mapDraw.begin();




#if defined( DEBUG ) | ( _DEBUG )

	Peripheral::IKeyboard *pKey = CCommonObject::GetAppli()->GetCore()->GetKeyboard();


	static bool IsHit = true;

	if( pKey->GetKeyData( SELENE_VK_Q ) )
	{
		IsHit = !IsHit;
	}



#endif

#if defined( DEBUG ) | ( _DEBUG )

	if( IsHit )
#endif
	{

		while( it != mapDraw.end() )
		{
			sp<CGameObject> spObj( it->second );
			
			bool IsThis = ( this->GetPos().x > 0 && this->GetPos().x < SCREEN_WIDTH - this->GetSize().x && this->GetPos().y > 0 
							&& this->GetPos().y < SCREEN_HEIGHT - this->GetSize().y );
			
				if( this->HitCheck( spObj ) )
				{
					this->HitExec( spObj );
				}
			

			it++;
		}
	}



	
}
예제 #5
0
파일: LCD.cpp 프로젝트: aiten/CNCLib
void CLcd::Poll()
{
	DrawRequest(CLcd::DrawAll);
}
	//Draw request entry point -
	void Renderer::add_draw_request(U32 render_pass_id, U32 mesh_handle, U32 material_handle, Mat4x4& transform)
	{
		Renderer::get_instance().add_draw_request(DrawRequest(render_pass_id,mesh_handle,material_handle,transform));
	}