2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 03:47:43 +00:00

CActorContraption fixes, better CMake dependency handling

This commit is contained in:
Jack Andersen
2019-06-11 16:05:17 -10:00
parent 77d0ef942d
commit e218b8aeb5
295 changed files with 942 additions and 2219 deletions

View File

@@ -1148,7 +1148,7 @@ bool TXTR::Cook(const hecl::ProjectPath& inPath, const hecl::ProjectPath& outPat
bool doDXT1 = (colorType == PNG_COLOR_TYPE_RGB || colorType == PNG_COLOR_TYPE_RGB_ALPHA) && width >= 4 && height >= 4;
/* Read into mip0 image buffer */
for (int r = 0; r < height; ++r) {
for (png_uint_32 r = 0; r < height; ++r) {
if (colorType == PNG_COLOR_TYPE_RGB) {
png_read_row(pngRead, rowBuf.get(), nullptr);
for (unsigned i = 0; i < width; ++i) {
@@ -1175,7 +1175,7 @@ bool TXTR::Cook(const hecl::ProjectPath& inPath, const hecl::ProjectPath& outPat
fclose(inf);
/* Reduce mipmaps to minimum allowed dimensions */
int minDimX, minDimY;
unsigned minDimX, minDimY;
if (doDXT1) {
minDimX = minDimY = 4;
} else {
@@ -1601,7 +1601,7 @@ static const atInt32 RetroToDol[11] {
std::string TXTR::CalculateDolphinName(DataSpec::PAKEntryReadStream& rs) {
atUint32 format = RetroToDol[rs.readUint32Big()];
if (format == -1)
if (format == UINT32_MAX)
return {};
atUint16 width = rs.readUint16Big();