J'ai tenté de recompiler la SFML, j'ai placé les dll obtenues dans le dossier de l'exécutable et :
http://prntscr.com/5bpe02EDIT : Je l'ai refais mais en x86, et la j'ai ça ^^
http://prntscr.com/5bpk3yRE-EDIT : Bingo, j'ai réussi à le faire fonctionner, mais j'ai un soucis, avec mon pattern gamestate, le voici
J'ai ce code qui provoque une erreur
void SMenu::Update(CGameEngine* game)
{
}
void SMenu::Draw(CGameEngine* game)
{
game->m_window->draw(trollface);
}
#include <stdio.h>
#include <iostream>
#include <SFML/Graphics.hpp>
#include "gameengine.h"
#include "gamestate.h"
#include "../globals.h"
#include <assert.h>
void CGameEngine::Init(const char* title, int width, int height, bool fullscreen)
{
if ( fullscreen ) {
m_window = new sf::RenderWindow(sf::VideoMode(width, height), title,sf::Style::Fullscreen);
}
else
{
m_window = new sf::RenderWindow(sf::VideoMode(width, height), title);
}
m_fullscreen = fullscreen;
m_running = true;
printf("Game engine op and running\n");
}
void CGameEngine::Cleanup()
{
// cleanup the all states
while (!states.empty()) {
states.back()->Cleanup();
states.pop_back();
}
// switch back to windowed mode so other
// programs won't get accidentally resized
if (m_fullscreen) {
m_window->setSize(sf::Vector2u(MIN_SCREENSIZE_X,MIN_SCREENSIZE_Y));
}
printf("Game engine cleaned and shut down\n");
// shutdown SDL
m_window->close();
}
void CGameEngine::ChangeState(CGameState* state)
{
// cleanup the current state
if ( !states.empty() ) {
states.back()->Cleanup();
states.pop_back();
}
// store and init the new state
states.push_back(state);
states.back()->Init();
}
void CGameEngine::PushState(CGameState* state)
{
// pause current state
if ( !states.empty() ) {
states.back()->Pause();
}
// store and init the new state
states.push_back(state);
if (states.back() == NULL)
{
cout << "NOPE";
cin.get();
exit(-1);
}
else
{
states.back()->Init();
}
}
void CGameEngine::PopState()
{
// cleanup the current state
if ( !states.empty() ) {
states.back()->Cleanup();
states.pop_back();
}
// resume previous state
if ( !states.empty() ) {
states.back()->Resume();
}
}
void CGameEngine::HandleEvents()
{
// let the state handle events
sf::Event x;
if (m_window->pollEvent(x))
{
if (x.type == sf::Event::Closed)
Cleanup();
}
else //Except for the Quit event, handle them via the last state !
states.back()->HandleEvents(this);
}
void CGameEngine::Update()
{
// let the state update the game
states.back()->Update(this);
}
void CGameEngine::Draw()
{
// let the state draw the screen
states.back()->Draw(this);
}
Enfait, je lance mon programme et y'a ça : PAGE BLANCHE
http://prntscr.com/5bptpbPuis, je veux le fermer et bim
http://prntscr.com/5bptua Une Debug assertion sauvage apparait