Giter Site home page Giter Site logo

Comments (3)

remy avatar remy commented on May 30, 2024

So, this partially works. You can drop a .spr file onto the PNG import and it will try to read the file, but the maths really started to blow my brain:

ptr = (((i % 16) + 256 * ((i / 16) | 0)) % 4096) + 16 * ((i / 256) | 0)

I've managed to use it myself to copy the first 16 sprites from an older sprite sheet, but the maths goes bad after the next row.

I'll certainly get this in, because I've needed it too.

from zx-tools.

Andy1966uk avatar Andy1966uk commented on May 30, 2024

It’s all about maths :) appreciate the work Remy

from zx-tools.

remy avatar remy commented on May 30, 2024

I gave up on the maths and went for the simple solution (not realising it was there all along). You can now import 16x and 8x sprite sheets. They'll be rendered in a single column (so 16x1024 for a 16x sprite sheet) which looks a bit naff, but works.

I've also added support for copy over (rather than replace the target sprite) as well as pasting over (hold shift when pasting).

I realise this is way way after you wanted it, but I needed it (again) today so had a crack this evening and managed to solve it (it should be live shortly).

from zx-tools.

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.