Giter VIP home page Giter VIP logo

andenginetexturepackerextension's Introduction

๐Ÿ‘‹ Hi, Iโ€™m @nicolasgramlich

andenginetexturepackerextension's People

Contributors

nazgee avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

andenginetexturepackerextension's Issues

File naming

If you have a TexturePack and want to change its texture the asset filename must not be the same or it won't change the texture.
For example:
I have a texture pack ( myTexturePack ) and I want to change it for different chapters.

myTexturePack = texturepackLoader.loadFromAsset("gfx/chapter1/myGFX.xml", "gfx/chapter1/");
//we load it
myTexturePack.load();

//then we want to change it (*forget unloading stuff)
myTexturePack = texturePackLoader.loadFromAsset("gfx/chapter2/myGFX.xml", "gfx/chapter2/");
myTexturePack.load();

At this point we would aspect to have the graphics from chapter 2 loaded, but this doesn't happen because of the check made in the parser.

final String file = SAXUtils.getAttributeOrThrow(pAttributes, TexturePackParser.TAG_TEXTURE_ATTRIBUTE_FILE);

if(this.mTextureManager.hasMappedTexture(file)) {
    return this.mTextureManager.getMappedTexture(file);
}

The string should contain the whole path not just the filename or there should be a reference somewhere saying that the names of the files must be different.

~korn3l

TexturePackParserm line 156

The following code starting at 156 is incorrect, showing the error
_The constructor BitmapTexture(TextureManager, BitmapTexture.BitmapTextureFormat, TextureOptions) is undefined_

return new BitmapTexture(this.mTextureManager, BitmapTextureFormat.fromPixelFormat(pixelFormat), textureOptions) {
                    @Override
                    protected InputStream onGetInputStream() throws IOException {
                        return TexturePackParser.this.onGetInputStream(file);
                    }
                };

It requires an IInputStreamOpener as an argument. The problem I can quickly see is this class needs access to the asset manager, which it currently does not have.

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.