codesite...@google.com
unread,Apr 4, 2009, 12:32:37 AM4/4/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to pjmo...@googlegroups.com
Author: davidferreira.FZ
Date: Fri Apr 3 21:22:24 2009
New Revision: 148
Modified:
trunk/projeto/src/GraphicCore.cpp
Log:
Adicionando Inicialização do sistema de timer da SDL;
Modified: trunk/projeto/src/GraphicCore.cpp
==============================================================================
--- trunk/projeto/src/GraphicCore.cpp (original)
+++ trunk/projeto/src/GraphicCore.cpp Fri Apr 3 21:22:24 2009
@@ -20,18 +20,18 @@
namespace Graphic {
-//Limpa a tela
-void GraphicCore::clear()
+//Limpa a tela
+void GraphicCore::clear()
{
SDL_FillRect(gsMode.getScreen(), NULL, 0);
}
-//Salva uma imagem da tela
-void GraphicCore::salvarScreenShot(std::string arquivo)
+//Salva uma imagem da tela
+void GraphicCore::salvarScreenShot(std::string arquivo)
{
SDL_SaveBMP(gsMode.getScreen(),arquivo.c_str());
}
-//Destrutor
-GraphicCore::~GraphicCore()
+//Destrutor
+GraphicCore::~GraphicCore()
{
// UtilLog::sistema("Removendo GraphicSystem");
@@ -41,7 +41,7 @@
SDL_QuitSubSystem(SDL_INIT_VIDEO);
}
-void GraphicCore::iniciar()
+void GraphicCore::iniciar()
{
std::cout << "GBF::Kernel::Graphic::GraphicCore::iniciar()" <<
std::endl;
gsScreen->setScreen(gsMode.getScreen());
@@ -53,13 +53,13 @@
graphicSystem->gfx->inicializar();
GraphicSystemUtility::setGraphicSystem(graphicSystem);
}
-//Realiza o flip(troca) entre os buffers de v�deo
-void GraphicCore::flip()
+//Realiza o flip(troca) entre os buffers de v�deo
+void GraphicCore::flip()
{
SDL_Flip(gsMode.getScreen());
}
-//Inicializa SubSistema de suporte a Video
-GraphicCore::GraphicCore()
+//Inicializa SubSistema de suporte a Video
+GraphicCore::GraphicCore()
{
const SDL_version *v = SDL_Linked_Version();
@@ -68,7 +68,7 @@
std::cout << "\tSDL: " << (int) v->major << "." << (int) v->minor
<< "." << (int) v->patch << " version" << std::endl;
- if (SDL_Init(SDL_INIT_VIDEO) < 0) {
+ if (SDL_Init(SDL_INIT_VIDEO|SDL_INIT_TIMER) < 0) {
std::cerr << "[ERROR]SDL: " << SDL_GetError() << std::endl;
exit(-1);
} else {