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 - Tresky

Pages: [1] 2 3
1
Graphics / Re: LoadFromFile Crash
« on: May 20, 2013, 05:51:39 am »
I switched smart pointers and that solved it for the most part, so it was probably some memory leaks somewhere like you said. Thanks a lot. :)

2
Graphics / Re: LoadFromFile Crash
« on: May 20, 2013, 03:28:54 am »
Hmmm. I see. The sf::Image it is loading into is a member of the class containing the above mentioned function. All I did was:

class Class
{
public:
  Class()
    : tileset_image()
  {}

  bool Parse()
  {
    tileset_image.loadFromFile(source);
    return true;
  }

private:
  sf::Image tileset_image;
};

Am I forgetting anything? Of course, this code is shortened an extreme amount. Haha.

3
Graphics / Re: LoadFromFile Crash
« on: May 20, 2013, 03:15:21 am »
Yup. As I said earlier, I tried a minimal example of just loading that image and it worked fine. So it's something in my code, but I don't even know where to look.

4
SFML projects / Re: Terra Game Engine
« on: May 20, 2013, 01:51:27 am »
Hey man, I'm really sorry to hear about your depression. Life can really be a stick in the side. I am glad to hear that you are doing better though! May God have his hand on you.

5
Graphics / [SOLVED] LoadFromFile Crash
« on: May 20, 2013, 12:35:50 am »
Hey guys!

I have been having particular trouble loading an image. It's never given me trouble before, but now it is.

I have checked to use the correct versions of the library. I am using the pre-compiled VS2012 version of the SDK. I am linking Debug libraries to my Debug project.

I couldn't produce a smaller version of the error. I first created a test program to test and see if it was SFML messing up. Just as I predicted, SFML was not the problem and it is my own doing. Since then, I have not been able to locate the error.

// Load the image of the tileset and store
  // it in the SfTileset.
  string source = "tmw_desert_spacing.png";

  cout << source << endl;
  if (!tileset_image.loadFromFile(source))
  {
    cout << "Failed to load tileset image" << endl;
    return false;
  }
  cout << "Success" << endl;

This code managed to gather the correct source from the XML file, so we can rule out the TinyXML code. I debugged the crash and it occurs directly on the line with the loadFromFile() call. It doesn't send a fail to SFML either because it never gets inside of the if statement or even past it.

The error says:
Unhandled exception at 0x0FB5CCC8 (msvcp110d.dll) in sf_tile_engine.exe: 0xC0000005: Access violation reading location 0x51DF2948.

The call stack says:
>   msvcp110d.dll!std::_Container_base12::_Orphan_all() Line 216
>   sfml-graphics-d-2.dll!0ff5dd9a()
>   [Frames below may be incorrect and/or missing, no symbols loaded for sfml-graphics-d-2.dll]   
>   sfml-graphics-d-2.dll!0ff63ea4()
>   sfml-graphics-d-2.dll!0ff629b9()
>   sf_tile_engine.exe!sftile::SfTileset::Parse(tinyxml2::XMLElement * _element) Line 74 // This is the function that contains the above code.


Any hints?

PS: The image it's trying to load is indeed in the directory and of the type PNG.

Thanks! :)

6
Graphics / Re: View Drawing
« on: April 10, 2013, 09:09:45 pm »
Okay thank you! :)

7
Graphics / View Drawing
« on: April 10, 2013, 08:47:54 pm »
Just a quick question. If I use an sf::View to zoom into a large image and pan around on it, will the View take care of only drawing what is visible so as to maximize performance? Or will I need to use some other abstraction to accomplish this?

Thanks,
Tresky

8
SFML projects / Re: Terra Game Engine
« on: March 08, 2013, 08:46:06 pm »
I realize this is 2 years late, but is this project still available? The links are broken up top, but it sounds interesting and I'd like more information if it's still available. :)

Ciao!

9
SFML projects / Re: Thor 2.0
« on: August 10, 2012, 08:25:42 am »
Ah! That makes sense. Thank you.

10
SFML projects / Re: Thor 2.0
« on: August 10, 2012, 07:47:54 am »
Hey! I've begun using the Animation classes for Thor to help animate the ground on a map (water flowing, grass moving, etc). I was wondering, would it be best to have one Animator animating every single tile of grass (its a tile map), or to have each tile have its own Animator and just update them all?

It seems like the second method would be memory intensive, but I'm not expert with Thor yet, so I'm not sure how it goes about doing things.

11
Graphics / Re: Loading a map of a file
« on: July 13, 2012, 10:07:53 pm »
Quote
Well for some reason the function he passes the string[] in to sees the string[] as a char and not a string so it won't compile...
I see what you're saying. Allow me to explain. A std::string is nothing more than a character array. Therefore using the brackets on a string is simply accessing a specific element in the character array.

std::string line = "Tresky";
line[0] will return 'T'
line[2] will return 'e'
etc.

12
Graphics / Re: Loading a map of a file
« on: July 13, 2012, 04:47:32 am »
Quote
why are you making line a string then using [] on it?
A string is simply an array of characters, so using [] on it will access a specific character inside of it.

string line = "abcde";
line[2] will return 'c'.
line[4] will return 'e'.
etc.

The format of his map is a string of numbers (each number represents one tile on a tilemap). If he accesses each number individually he will be able to then display each tile individually and thereby creating his map.
Make sense?

Quote
Can you help me?

My project: https://dl.dropbox.com/u/38888521/sfml.zip

I am getting errors, so I can't make it work.

At the beginning, it freezes.

Goodbye!
No body is going to want to download your entire project and go through your entire code. Make a reduced code that still presents the error. Then C/P that code into here.

13
Graphics / Re: Help with arrays, and crashing (RPG inventory system)
« on: July 12, 2012, 10:06:21 am »
Quote
"Hey look at my completly broken and rusty car! Could you please put some new shiny rims on it? I'll get the car fix later, but now I just need those rims!"
LOL! Ricers!
http://i9.photobucket.com/albums/a95/rehab_/Ricer/ricer.jpg

14
SFML projects / Re: Thor 2.0
« on: July 10, 2012, 06:04:09 am »
My compiler isn't compatible with C++11. :( Unless there was a MSVS2010 update I'm not aware of.

EDIT: I take that back. Finally found them. Just had to do the right search. :P

15
SFML projects / Re: Thor 2.0
« on: July 09, 2012, 11:50:20 pm »
Were the Thor smart_ptrs taken out of the library? I can't find them.

Pages: [1] 2 3
anything