mirror of
https://github.com/yuzu-emu/FasTC.git
synced 2024-11-23 23:25:41 +01:00
Merge branch 'master' into DecompressASTC
This commit is contained in:
commit
da6d6e5106
@ -71,7 +71,6 @@ int main(int argc, char **argv) {
|
||||
|
||||
ImageFile imgf (argv[1]);
|
||||
if(!imgf.Load()) {
|
||||
fprintf(stderr, "Error loading file: %s\n", argv[1]);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -53,6 +53,7 @@
|
||||
#define _CRT_SECURE_NO_WARNINGS
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#include <cstdlib>
|
||||
#include <cstdio>
|
||||
|
@ -62,6 +62,8 @@ IF(MSVC)
|
||||
SET(MSVC_VERSION_STRING vc100)
|
||||
ELSEIF(MSVC11)
|
||||
SET(MSVC_VERSION_STRING vc110)
|
||||
ELSEIF(MSVC12)
|
||||
SET(MSVC_VERSION_STRING vc120)
|
||||
ELSEIF(MSVC90)
|
||||
SET(MSVC_VERSION_STRING vc90)
|
||||
ELSEIF(MSVC80)
|
||||
|
@ -95,7 +95,9 @@ public:
|
||||
}
|
||||
|
||||
~FileStreamImpl() {
|
||||
fclose(m_FilePtr);
|
||||
if (0 != m_FilePtr) {
|
||||
fclose(m_FilePtr);
|
||||
}
|
||||
}
|
||||
|
||||
void IncreaseReferenceCount() { m_ReferenceCount++; }
|
||||
|
@ -209,29 +209,33 @@ FasTC::Image<> *ImageLoader::LoadImage() {
|
||||
for(uint32 i = 0; i < aw; i++) {
|
||||
|
||||
unsigned int redVal = GetChannelForPixel(i, j, 0);
|
||||
if(redVal == INT_MAX)
|
||||
if(redVal == INT_MAX) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
unsigned int greenVal = redVal;
|
||||
unsigned int blueVal = redVal;
|
||||
|
||||
if(GetGreenChannelPrecision() > 0) {
|
||||
greenVal = GetChannelForPixel(i, j, 1);
|
||||
if(greenVal == INT_MAX)
|
||||
if(greenVal == INT_MAX) {
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
if(GetBlueChannelPrecision() > 0) {
|
||||
blueVal = GetChannelForPixel(i, j, 2);
|
||||
if(blueVal == INT_MAX)
|
||||
if(blueVal == INT_MAX) {
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
unsigned int alphaVal = 0xFF;
|
||||
if(GetAlphaChannelPrecision() > 0) {
|
||||
alphaVal = GetChannelForPixel(i, j, 3);
|
||||
if(alphaVal == INT_MAX)
|
||||
if(alphaVal == INT_MAX) {
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
// Red channel
|
||||
|
2
Windows
2
Windows
@ -1 +1 @@
|
||||
Subproject commit 4feeeb6550851ba3541c3f9505c76018e665667e
|
||||
Subproject commit 6d9f6ba0f9ebec0f6735b1f29527ea5835ef3572
|
Loading…
Reference in New Issue
Block a user