+-Discord Shoutbox


Alternatively, join us on Discord directly.
You can help CodeWalrus stay online by donating here.

Graphics and other system routines

Started by DarkestEx, October 19, 2015, 10:31:05 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

DarkestEx

November 24, 2015, 08:30:05 AM #60 Last Edit: November 24, 2015, 12:19:15 PM by DarkestEx
Quote from: DJ Omnimaga on November 24, 2015, 07:55:27 AM
So I am curious about what the following sprites would look like in Microcat format and how much space they would take:



Would the sprite sheet need to be split into multiple files and only one part loaded at a time?
Sure, I'll convert it for you.
About the size and if you have to split it, you can calculate that easily.
But first, what pixel format do you want to use? In this case I would either use 4bpp or preferably 8bpp.
To calculate the size of an image in bytes, simply do:
size = 20 + (2^bpp) - 1 + (width * height * bpp) / 8

(Only do the + (2^bpp) - 1 if you are using a bpp < 8 )

The maximum size of a sprite(sheet) is 32KB.

Edit: But to answer your question, no, you cannot load a sprite(sheet) this big at once. 32 KB max per sprite(sheet). I will in the future just refer to sprite as for the console / claw, a spritesheet and a single sprite are exactly the same thing.
There will be a draw sprite rectangle method to draw only a part of a sprite or spritesheet.
  • Calculators owned: TI-84+, Casio 101-S, RPN-Calc, Hewlett-Packard 100LX, Hewlett-Packard 95LX
  • Consoles, mobile devices and vintage computers owned: Original Commodore 64C, C64 DTV, Nintendo GameBoy Color, Nintendo GameCube, Xbox 360, PlayStation 2

DJ Omnimaga

Thanks for the info. Not bad I guess, since I can split the spritesheet in rows :)
  • Calculators owned: TI-84 Plus C Silver Edition, TI-84 Plus CE, Casio fx-CG10, HP Prime, fx 1.0 Plus, fx-7400G Plus, fx-9750G Plus, fx-9860G, HP 39gII
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite

Powered by EzPortal