Skip to content

Commit

Permalink
fix some more gradients stuff, still needs a little work
Browse files Browse the repository at this point in the history
  • Loading branch information
Astral-C committed Dec 17, 2024
1 parent a44b266 commit e3bbde9
Show file tree
Hide file tree
Showing 5 changed files with 243 additions and 112 deletions.
30 changes: 16 additions & 14 deletions include/io/BloIO.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,16 +112,16 @@ namespace Blo {
uint8_t mAccumulateAlpha;

public:

uint8_t Alpha() { return mAplha; }
ElementType Type() { return mType; }
int16_t mRect[4];
virtual bool Load(bStream::CStream* stream, std::shared_ptr<Pane> parent, std::shared_ptr<Archive::Folder> timg);
virtual void DrawHierarchy(std::shared_ptr<Blo::Pane> selection);
virtual void Draw();
virtual void DrawHierarchy(std::shared_ptr<Blo::Pane>& selection);
virtual void Draw(std::shared_ptr<Blo::Pane>& selection);
};

class Picture : public Pane {
Image mTexutres[4];
std::shared_ptr<Image> mTextures[4] { nullptr, nullptr, nullptr, nullptr };
Palette mPalette;
Binding mBinding;
double mBlendFactors[4];
Expand All @@ -139,14 +139,15 @@ namespace Blo {
glm::vec4 mColors[4];

public:
std::shared_ptr<Image> GetTexture(){ return mTextures[0]; }
bool Load(bStream::CStream* stream, std::shared_ptr<Pane> parent, std::shared_ptr<Archive::Folder> timg);
void DrawHierarchy(std::shared_ptr<Blo::Pane> selection);
void Draw();
void DrawHierarchy(std::shared_ptr<Blo::Pane>& selection);
void Draw(std::shared_ptr<Blo::Pane>& selection);
};

class Window : public Pane {
Image mTextures[4];
Image mContentTexture;
std::shared_ptr<Image> mTextures[4] { nullptr, nullptr, nullptr, nullptr };
std::shared_ptr<Image> mContentTexture { nullptr };
Palette mPalette;
Bti mContectBG;

Expand All @@ -155,8 +156,8 @@ namespace Blo {
glm::vec4 mToColor;
public:
bool Load(bStream::CStream* stream, std::shared_ptr<Pane> parent, std::shared_ptr<Archive::Folder> timg);
void DrawHierarchy(std::shared_ptr<Blo::Pane> selection);
void Draw();
void DrawHierarchy(std::shared_ptr<Blo::Pane>& selection);
void Draw(std::shared_ptr<Blo::Pane>& selection);
};

class Textbox : public Pane {
Expand All @@ -175,17 +176,18 @@ namespace Blo {
glm::vec4 mToColor;
public:
bool Load(bStream::CStream* stream, std::shared_ptr<Pane> parent, std::shared_ptr<Archive::Folder> timg);
void DrawHierarchy(std::shared_ptr<Blo::Pane> selection);
void Draw();
void DrawHierarchy(std::shared_ptr<Blo::Pane>& selection);
void Draw(std::shared_ptr<Blo::Pane>& selection);
};

class Screen : public Pane {
uint32_t mColor;
bool LoadBlo1(bStream::CStream* stream, std::shared_ptr<Pane> parent, std::shared_ptr<Archive::Folder> timg);
public:
void Save(bStream::CStream* stream);
bool Load(bStream::CStream* stream, std::shared_ptr<Archive::Folder> timg);
void DrawHierarchy(std::shared_ptr<Blo::Pane> selection);
void Draw();
void DrawHierarchy(std::shared_ptr<Blo::Pane>& selection);
void Draw(std::shared_ptr<Blo::Pane>& selection);
};

};
2 changes: 1 addition & 1 deletion include/io/BtiIO.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,6 @@ class Bti {
void Save(bStream::CStream* stream, uint16_t width, uint16_t height, std::vector<uint8_t>& imageData);

Bti(){}
~Bti(){ if(mImageData != nullptr) delete[] mImageData; }
~Bti(){ if(mImageData != nullptr){ delete[] mImageData; } }

};
Loading

0 comments on commit e3bbde9

Please sign in to comment.