Initial source commit
This commit is contained in:
commit
f1384c11ee
335 changed files with 52715 additions and 0 deletions
24
gamma256/gameSource/common.cpp
Normal file
24
gamma256/gameSource/common.cpp
Normal file
|
@ -0,0 +1,24 @@
|
|||
#include "common.h"
|
||||
|
||||
#include "minorGems/graphics/converters/TGAImageConverter.h"
|
||||
|
||||
#include "minorGems/io/file/File.h"
|
||||
|
||||
#include "minorGems/io/file/FileInputStream.h"
|
||||
|
||||
|
||||
|
||||
Image *readTGA( const char *inFileName ) {
|
||||
return readTGA( "graphics", inFileName );
|
||||
}
|
||||
|
||||
|
||||
|
||||
Image *readTGA( const char *inFolderName, const char *inFileName ) {
|
||||
File tgaFile( new Path( inFolderName ), inFileName );
|
||||
FileInputStream tgaStream( &tgaFile );
|
||||
|
||||
TGAImageConverter converter;
|
||||
|
||||
return converter.deformatImage( &tgaStream );
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue