mirror of
https://github.com/yuzu-emu/FasTC
synced 2024-11-22 11:24:02 +00:00
Move file format to a separate header in order to better obfuscate the image loaders within the io library.
This commit is contained in:
parent
db6e76f1b3
commit
f2c2f7c9af
4 changed files with 16 additions and 6 deletions
|
@ -1,11 +1,7 @@
|
|||
#ifndef _IMAGE_LOADER_H_
|
||||
#define _IMAGE_LOADER_H_
|
||||
|
||||
enum EImageFileFormat {
|
||||
eFileFormat_PNG,
|
||||
|
||||
kNumImageFileFormats
|
||||
};
|
||||
#include "ImageFileFormat.h"
|
||||
|
||||
class ImageLoader {
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef _IMAGE_FILE_H_
|
||||
#define _IMAGE_FILE_H_
|
||||
|
||||
#include "ImageLoader.h"
|
||||
#include "ImageFileFormat.h"
|
||||
|
||||
class ImageFile {
|
||||
|
||||
|
|
10
IO/include/ImageFileFormat.h
Normal file
10
IO/include/ImageFileFormat.h
Normal file
|
@ -0,0 +1,10 @@
|
|||
#ifndef _IMAGE_FILE_FORMAT_H_
|
||||
#define _IMAGE_FILE_FORMAT_H_
|
||||
|
||||
enum EImageFileFormat {
|
||||
eFileFormat_PNG,
|
||||
|
||||
kNumImageFileFormats
|
||||
};
|
||||
|
||||
#endif // _IMAGE_FILE_FORMAT_H_
|
|
@ -5,6 +5,7 @@
|
|||
#include <assert.h>
|
||||
|
||||
#include "ImageFile.h"
|
||||
#include "ImageLoader.h"
|
||||
|
||||
#ifdef PNG_FOUND
|
||||
# include "ImageLoaderPNG.h"
|
||||
|
@ -149,6 +150,9 @@ EImageFileFormat ImageFile::DetectFileFormat(const char *filename) {
|
|||
// !FIXME! Report Error.....
|
||||
return kNumImageFileFormats;
|
||||
}
|
||||
|
||||
// consume the last character...
|
||||
dotPos++;
|
||||
|
||||
const char *ext = &filename[dotPos];
|
||||
|
||||
|
|
Loading…
Reference in a new issue