mirror of
https://gitlab.com/GaryOderNichts/re3-wiiu.git
synced 2024-11-23 01:29:16 +01:00
fix windows build, don't use crossplatform
This commit is contained in:
parent
b0414c84b9
commit
40c09d28f7
@ -858,19 +858,37 @@ RpHAnimHierarchy *RpSkinAtomicGetHAnimHierarchy( const RpAtomic *atomic ) { retu
|
|||||||
RwImage *
|
RwImage *
|
||||||
RtBMPImageWrite(RwImage *image, const RwChar *imageName)
|
RtBMPImageWrite(RwImage *image, const RwChar *imageName)
|
||||||
{
|
{
|
||||||
char *r = (char *)alloca(strlen((char *)imageName) + 2);
|
#ifndef _WIN32
|
||||||
// Use default path(and pass error handling to librw) if we can't find any match
|
char *r = nil;
|
||||||
if(!casepath((char *)imageName, r)) r = (char *)imageName;
|
FILE *valid = fopen((char *)imageName, "r");
|
||||||
|
if(!valid) {
|
||||||
|
char *r = (char *)alloca(strlen((char *)imageName) + 2);
|
||||||
|
// Use default path(and pass error handling to librw) if we can't find any match
|
||||||
|
if(!casepath((char *)imageName, r)) r = (char *)imageName;
|
||||||
|
} else
|
||||||
|
fclose(valid);
|
||||||
rw::writeBMP(image, r);
|
rw::writeBMP(image, r);
|
||||||
|
#else
|
||||||
|
rw::writeBMP(image, imageName);
|
||||||
|
#endif
|
||||||
return image;
|
return image;
|
||||||
}
|
}
|
||||||
RwImage *
|
RwImage *
|
||||||
RtBMPImageRead(const RwChar *imageName)
|
RtBMPImageRead(const RwChar *imageName)
|
||||||
{
|
{
|
||||||
char *r = (char *)alloca(strlen((char *)imageName) + 2);
|
#ifndef _WIN32
|
||||||
// Use default path(and pass error handling to librw) if we can't find any match
|
char *r = nil;
|
||||||
if(!casepath((char *)imageName, r)) r = (char *)imageName;
|
FILE *valid = fopen((char *)imageName, "r");
|
||||||
|
if(!valid) {
|
||||||
|
r = (char *)alloca(strlen((char *)imageName) + 2);
|
||||||
|
// Use default path(and pass error handling to librw) if we can't find any match
|
||||||
|
if(!casepath((char *)imageName, r)) r = (char *)imageName;
|
||||||
|
} else
|
||||||
|
fclose(valid);
|
||||||
return rw::readBMP(r);
|
return rw::readBMP(r);
|
||||||
|
#else
|
||||||
|
return rw::readBMP(imageName);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "rtquat.h"
|
#include "rtquat.h"
|
||||||
|
Loading…
Reference in New Issue
Block a user