Newer
Older
Scratch / objgfx / sprite.h
@Christopher W. Olsen Christopher W. Olsen on 25 Oct 2019 864 bytes Scratch
#ifndef SPRITE_H
#define SPRITE_H

#include "objgfx30.h"

class TogSprite {
  protected:
   void *       image;
   uInt32       imagesize;
   TRGBA*       pal;
   uInt32       width, height;
   uInt8        bitdepth;
   uInt8        RFP;
   uInt8        GFP;
   uInt8        BFP;
   uInt8        AFP;
   uInt8        RShift;
   uInt8        GShift;
   uInt8        BShift;
   uInt8        AShift;
   uInt32       getPixel(void *);
   void         unpackRGB(uInt32, uInt8&, uInt8&, uInt8&);
  public:
   TogSprite(void);
   void get(TGfx0&, Int32, Int32, Int32, Int32);
   uInt32 getHeight(void) { return height; }
   uInt32 getSize(void);
   uInt32 getWidth(void) { return width; }
   bool load(const char *);
   bool loadFrom(const char *, uInt32);
   bool save(const char *);
   bool saveTo(const char *, Int32);

   ~TogSprite(void);
   
}; // TogSprite
#endif