Coder Social home page Coder Social logo

Comments (5)

elliottbarrett avatar elliottbarrett commented on August 21, 2024

I'll see if I can find a solution all the same :)

from sfml-tmxloader.

elliottbarrett avatar elliottbarrett commented on August 21, 2024

Solution found --- add the line:
m_tileInfo.clear();

to MapLoader::m_Unload() in MapLoaderPrivate.cpp

from sfml-tmxloader.

fallahn avatar fallahn commented on August 21, 2024

Ah. I haven't tried it, but I'm figuring there's something not being cleared, such as m_tileInfo, which should be in m_Unload() (that's the first place I'd look anyway). I feel I should point out, however, that if you want the state between different maps to persist between transitions then you should load them into their own instances of the map loader eg

MapLoader ml1(path), ml2(path);
ml1.load("interior.tmx");
ml2.load("exterior.tmx");

EDIT beat me to it :)

from sfml-tmxloader.

elliottbarrett avatar elliottbarrett commented on August 21, 2024

That's a good point --- you could probably implement persistence by using a stack internally? (alternatively, I could do it by using a stack of MapLoaders)

from sfml-tmxloader.

fallahn avatar fallahn commented on August 21, 2024

It's an interesting idea. I may add it, but if I do it won't be any time soon. Contributions are always welcome though ;)

from sfml-tmxloader.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.