Updated NeoVerticalSpriteSheet object (markdown)

Michael Miller
2016-04-23 17:17:38 -07:00
parent 0179eeca7c
commit c2a5e05a97

@@ -19,9 +19,14 @@ NeoVerticalSpriteSheet<NeoBufferProgmemMethod<NeoGrbwFeature>> spriteSheet(
myImage);
```
You also need to decide how you are going to store the image data. Images take a lot of memory, and some consideration needs to be taken when making this decision.
If you plan to dynamically modify the image through source code, then you have to define it to use RAM. You can still initialize the RAM stored image from PROGMEM.
If you plan to just consume the image and never modify it, your best approach is to use PROGMEM as it will store in flash like source code and save precious RAM for your sketch.
There are two template "Method" objects that used in the construction of the NeoVerticalSpriteSheet that define where the data for the image is stored. There is no need to call these objects directly and they should just be used to construct the two raster objects..
* NeoBufferMethod - This method object will define the raster object so that it uses RAM to store the image.
* NeoBufferProgmemMethod - This method object will define the raster object so that it uses PROGMEM to store the image.
If you plan to dynamically modify the image through source code, then you have to define it to use RAM by using `NeoBufferMethod `. You can still initialize the RAM stored image from PROGMEM.
If you plan to just consume the image and never modify it, your best approach is to use PROGMEM by using `NeoBufferProgmemMethod` as it will store in flash like source code and save precious RAM for your sketch.
```
// stored in RAM, but initialized by the "myImage" from PROGMEM
NeoVerticalSpriteSheet<NeoBufferMethod<NeoGrbwFeature>> spriteSheet(myImageWidth, myImageHeight, 8, myImage);