Skip to content

Commit

Permalink
wip(vtfpp): add mip argument to width/height getters
Browse files Browse the repository at this point in the history
  • Loading branch information
craftablescience committed May 30, 2024
1 parent ba8cc59 commit 6c0fce9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions include/vtfpp/vtfpp.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,9 @@ class VTF {

[[nodiscard]] uint32_t getMinorVersion() const;

[[nodiscard]] uint16_t getWidth() const;
[[nodiscard]] uint16_t getWidth(uint8_t mip = 0) const;

[[nodiscard]] uint16_t getHeight() const;
[[nodiscard]] uint16_t getHeight(uint8_t mip = 0) const;

[[nodiscard]] Flags getFlags() const;

Expand Down
8 changes: 4 additions & 4 deletions src/vtfpp/vtfpp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,12 +163,12 @@ uint32_t VTF::getMinorVersion() const {
return this->minorVersion;
}

uint16_t VTF::getWidth() const {
return this->width;
uint16_t VTF::getWidth(uint8_t mip) const {
return mip > 0 ? ImageDimensions::getMipDim(mip, this->width) : this->width;
}

uint16_t VTF::getHeight() const {
return this->height;
uint16_t VTF::getHeight(uint8_t mip) const {
return mip > 0 ? ImageDimensions::getMipDim(mip, this->height) : this->height;
}

VTF::Flags VTF::getFlags() const {
Expand Down

0 comments on commit 6c0fce9

Please sign in to comment.