mirror of
https://github.com/yuzu-emu/FasTC.git
synced 2025-07-16 19:27:35 +00:00
Squelch some compiler warnings.
This commit is contained in:
parent
dcf389d346
commit
157295efa3
|
@ -90,6 +90,7 @@ CompressedImage &CompressedImage::operator=(const CompressedImage &other) {
|
||||||
m_RGBAData = new uint32[GetWidth() * GetHeight()];
|
m_RGBAData = new uint32[GetWidth() * GetHeight()];
|
||||||
memcpy(m_RGBAData, other.m_RGBAData, sizeof(uint32) * GetWidth() * GetHeight());
|
memcpy(m_RGBAData, other.m_RGBAData, sizeof(uint32) * GetWidth() * GetHeight());
|
||||||
}
|
}
|
||||||
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
CompressedImage::~CompressedImage() {
|
CompressedImage::~CompressedImage() {
|
||||||
|
|
|
@ -95,36 +95,26 @@ namespace PVRTCC {
|
||||||
int32 x, int32 y,
|
int32 x, int32 y,
|
||||||
uint32 width, uint32 height,
|
uint32 width, uint32 height,
|
||||||
const EWrapMode wrapMode) {
|
const EWrapMode wrapMode) {
|
||||||
while(x >= width) {
|
int32 w = static_cast<int32>(width);
|
||||||
if(wrapMode == eWrapMode_Wrap) {
|
int32 h = static_cast<int32>(height);
|
||||||
x -= width;
|
|
||||||
} else {
|
assert(w >= 0);
|
||||||
x = width - 1;
|
assert(h >= 0);
|
||||||
}
|
|
||||||
|
while(x >= w) {
|
||||||
|
x = (wrapMode == eWrapMode_Wrap)? x - w : w - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
while(x < 0) {
|
while(x < 0) {
|
||||||
if(wrapMode == eWrapMode_Wrap) {
|
x = (wrapMode == eWrapMode_Wrap)? x + w : 0;
|
||||||
x += width;
|
|
||||||
} else {
|
|
||||||
x = 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
while(y >= height) {
|
while(y >= h) {
|
||||||
if(wrapMode == eWrapMode_Wrap) {
|
y = (wrapMode == eWrapMode_Wrap)? y - h : h - 1;
|
||||||
y -= height;
|
|
||||||
} else {
|
|
||||||
y = height - 1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
while(y < 0) {
|
while(y < 0) {
|
||||||
if(wrapMode == eWrapMode_Wrap) {
|
y = (wrapMode == eWrapMode_Wrap)? y + h : 0;
|
||||||
y += height;
|
|
||||||
} else {
|
|
||||||
y = 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return img(x, y);
|
return img(x, y);
|
||||||
|
@ -177,7 +167,7 @@ namespace PVRTCC {
|
||||||
|
|
||||||
// Go over the 7x7 texel blocks and extract bounding box diagonals for each
|
// Go over the 7x7 texel blocks and extract bounding box diagonals for each
|
||||||
// block. We should be able to choose which diagonal we want...
|
// block. We should be able to choose which diagonal we want...
|
||||||
const uint32 kKernelSz = 7;
|
const int32 kKernelSz = 7;
|
||||||
|
|
||||||
Image imgA = downscaled;
|
Image imgA = downscaled;
|
||||||
Image imgB = downscaled;
|
Image imgB = downscaled;
|
||||||
|
|
Loading…
Reference in a new issue