src/spriteloader/png.hpp
author truelight
Wed, 13 Jun 2007 16:21:11 +0000
changeset 7392 a716551b0c7f
child 6870 ca3fd1fbe311
permissions -rw-r--r--
(svn r10143) -Add: store the filename of the grfs opened and allow easy access to the name
-Codechange: store the SpriteID in the spritecache too
-Add: add a PNG loader for graphical files
-Documentation: added a document to explain the PNG format
7392
a716551b0c7f (svn r10143) -Add: store the filename of the grfs opened and allow easy access to the name
truelight
parents:
diff changeset
     1
/* $Id$ */
a716551b0c7f (svn r10143) -Add: store the filename of the grfs opened and allow easy access to the name
truelight
parents:
diff changeset
     2
a716551b0c7f (svn r10143) -Add: store the filename of the grfs opened and allow easy access to the name
truelight
parents:
diff changeset
     3
/** @file png.hpp */
a716551b0c7f (svn r10143) -Add: store the filename of the grfs opened and allow easy access to the name
truelight
parents:
diff changeset
     4
a716551b0c7f (svn r10143) -Add: store the filename of the grfs opened and allow easy access to the name
truelight
parents:
diff changeset
     5
#ifndef SPRITELOADER_PNG_HPP
a716551b0c7f (svn r10143) -Add: store the filename of the grfs opened and allow easy access to the name
truelight
parents:
diff changeset
     6
#define SPRITELOADER_PNG_HPP
a716551b0c7f (svn r10143) -Add: store the filename of the grfs opened and allow easy access to the name
truelight
parents:
diff changeset
     7
a716551b0c7f (svn r10143) -Add: store the filename of the grfs opened and allow easy access to the name
truelight
parents:
diff changeset
     8
#include "spriteloader.hpp"
a716551b0c7f (svn r10143) -Add: store the filename of the grfs opened and allow easy access to the name
truelight
parents:
diff changeset
     9
a716551b0c7f (svn r10143) -Add: store the filename of the grfs opened and allow easy access to the name
truelight
parents:
diff changeset
    10
class SpriteLoaderPNG : public SpriteLoader {
a716551b0c7f (svn r10143) -Add: store the filename of the grfs opened and allow easy access to the name
truelight
parents:
diff changeset
    11
public:
a716551b0c7f (svn r10143) -Add: store the filename of the grfs opened and allow easy access to the name
truelight
parents:
diff changeset
    12
	/**
a716551b0c7f (svn r10143) -Add: store the filename of the grfs opened and allow easy access to the name
truelight
parents:
diff changeset
    13
	 * Load a sprite from the disk and return a sprite struct which is the same for all loaders.
a716551b0c7f (svn r10143) -Add: store the filename of the grfs opened and allow easy access to the name
truelight
parents:
diff changeset
    14
	 */
a716551b0c7f (svn r10143) -Add: store the filename of the grfs opened and allow easy access to the name
truelight
parents:
diff changeset
    15
	bool LoadSprite(SpriteLoader::Sprite *sprite, const char *filename, uint32 file_pos);
a716551b0c7f (svn r10143) -Add: store the filename of the grfs opened and allow easy access to the name
truelight
parents:
diff changeset
    16
};
a716551b0c7f (svn r10143) -Add: store the filename of the grfs opened and allow easy access to the name
truelight
parents:
diff changeset
    17
a716551b0c7f (svn r10143) -Add: store the filename of the grfs opened and allow easy access to the name
truelight
parents:
diff changeset
    18
#endif /* SPRITELOADER_PNG_HPP */