Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - KevinK

Pages: [1]
1
SFML projects / Re: 'Tiled' Tile-map Loader
« on: April 22, 2014, 06:25:29 am »
Well I messed around with it for a number of hours today, I was able to get my program to compile in debug only... what made debug work was changing from sf::String to std::string and adding the full path to my files, for whatever reason. But when I try to run my program in release it still crashes from a buffer overrun :/ I'm not sure what to do to get release mode working. I tried googling my problem to try and find similar issues and they were all not very useful. I had a lead to possibly the encoding that was causing the buffer overrun but I don't know anything about encoding.
const std::string pathToPlayer = "C:\\Users\\Kevin\\Documents\\Visual Studio 11\\Projects\\Time-Voyager2\\player.png";
const std::string myMapString = "C:\\Users\\Kevin\\Documents\\Visual Studio 11\\Projects\\Time-Voyager2\\maps";
const std::string filename = "test.tmx";
const std::string caption = "TileD Maps";

int main(){

        std::cout << myMapString.length();
        tmx::MapLoader myMap(myMapString);
       
       
        myMap.Load(filename);
}
 

2
SFML projects / Re: 'Tiled' Tile-map Loader
« on: April 20, 2014, 10:25:07 pm »
Hi I'm trying to get the tiled map loader up and running, I have all the libraries and includes done as well as the .cpp files added to the solution. I'm using VS 2012. The program runs just fine but it breaks when I run this command in the code down below. It says "A buffer overrun has occurred in "Time-Voyager.exe" which has corrupted the programs internal states. Press break to debug the program or continue to terminate.". The last call stack says this: "msvcr110.dll!_crt_debugger_hook(int _Reserved) Line 60   C" I'm not sure what to do I've tried everything.


#include <stdio.h>
#include <iostream>
#include <zlib.h>
#include <tmx/MapLoader.h>
#include <SFML/Graphics.hpp>
#include <SFML/Window.hpp>
#include <math.h>

using namespace sf;

int main(){

tmx::MapLoader myMap("maps\\");

}

 

Pages: [1]