~ubuntu-branches/ubuntu/precise/primrose/precise

« back to all changes in this revision

Viewing changes to tilePlacementGames/game1/gameSource/common.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Paul Wise
  • Date: 2009-04-06 19:26:56 UTC
  • Revision ID: james.westby@ubuntu.com-20090406192656-cri7503gebyvfl8t
Tags: upstream-5+dfsg1
ImportĀ upstreamĀ versionĀ 5+dfsg1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#include "common.h"
 
2
 
 
3
#include "minorGems/graphics/converters/TGAImageConverter.h"
 
4
 
 
5
#include "minorGems/io/file/File.h"
 
6
 
 
7
#include "minorGems/io/file/FileInputStream.h"
 
8
 
 
9
 
 
10
#include <math.h>
 
11
 
 
12
 
 
13
 
 
14
Image *readTGA( char *inFileName ) {
 
15
    return readTGA( "graphics", inFileName );
 
16
    }
 
17
 
 
18
 
 
19
 
 
20
Image *readTGA( char *inFolderName, char *inFileName ) {
 
21
    File tgaFile( new Path( inFolderName ), inFileName );
 
22
    FileInputStream tgaStream( &tgaFile );
 
23
    
 
24
    TGAImageConverter converter;
 
25
    
 
26
    return converter.deformatImage( &tgaStream );
 
27
    }
 
28
 
 
29
 
 
30