Begin LoadSprites, LoadChests, housekeeping
This commit is contained in:
@@ -20,45 +20,53 @@ namespace zelda3 {
|
||||
|
||||
class Sprite {
|
||||
public:
|
||||
uchar x_, y_, id_;
|
||||
uchar nx_, ny_;
|
||||
uchar layer_ = 0;
|
||||
uchar subtype_ = 0;
|
||||
Sprite();
|
||||
Sprite(Bytes src, uchar mapid, uchar id, uchar x, uchar y, int map_x,
|
||||
int map_y);
|
||||
void InitSprite(Bytes& src, uchar mapid, uchar id, uchar x, uchar y,
|
||||
int map_x, int map_y);
|
||||
void updateBBox();
|
||||
|
||||
void Draw();
|
||||
void DrawSpriteTile(int x, int y, int srcx, int srcy, int pal,
|
||||
bool mirror_x = false, bool mirror_y = false,
|
||||
int sizex = 2, int sizey = 2);
|
||||
|
||||
// New methods
|
||||
void updateCoordinates(int map_x, int map_y);
|
||||
|
||||
auto PreviewGraphics() const { return preview_gfx_; }
|
||||
auto GetRealX() const { return bounding_box_.x; }
|
||||
auto GetRealY() const { return bounding_box_.y; }
|
||||
auto id() const { return id_; }
|
||||
|
||||
auto Width() const { return bounding_box_.w; }
|
||||
auto Height() const { return bounding_box_.h; }
|
||||
std::string Name() const { return name_; }
|
||||
|
||||
private:
|
||||
Bytes current_gfx_;
|
||||
bool overworld_;
|
||||
uchar map_id_;
|
||||
uchar id_;
|
||||
uchar x_;
|
||||
uchar y_;
|
||||
uchar nx_;
|
||||
uchar ny_;
|
||||
uchar overlord_ = 0;
|
||||
std::string name_;
|
||||
uchar keyDrop_ = 0;
|
||||
int sizeMap_ = 512;
|
||||
bool overworld_ = false;
|
||||
bool preview_ = false;
|
||||
uchar map_id_ = 0;
|
||||
int map_x_ = 0;
|
||||
int map_y_ = 0;
|
||||
short room_id_ = 0;
|
||||
bool picker_ = false;
|
||||
bool selected_ = false;
|
||||
int map_x_;
|
||||
int map_y_;
|
||||
Bytes preview_gfx_;
|
||||
uchar lowerX_;
|
||||
uchar lowerY_;
|
||||
uchar higherX_;
|
||||
uchar higherY_;
|
||||
SDL_Rect bounding_box_;
|
||||
|
||||
Bytes current_gfx_;
|
||||
Bytes preview_gfx_;
|
||||
|
||||
int lowerX_ = 32;
|
||||
int lowerY_ = 32;
|
||||
int higherX_ = 0;
|
||||
int higherY_ = 0;
|
||||
int width_ = 16;
|
||||
int height_ = 16;
|
||||
|
||||
Sprite(Bytes src, uchar mapid, uchar id, uchar x, uchar y, int map_x,
|
||||
int map_y);
|
||||
void updateBBox();
|
||||
|
||||
void Draw(bool picker = false);
|
||||
|
||||
void DrawSpriteTile(int x, int y, int srcx, int srcy, int pal,
|
||||
bool mirror_x = false, bool mirror_y = false,
|
||||
int sizex = 2, int sizey = 2, bool iskey = false);
|
||||
|
||||
auto PreviewGraphics() { return preview_gfx_; }
|
||||
};
|
||||
|
||||
} // namespace zelda3
|
||||
|
||||
Reference in New Issue
Block a user