OpenMortal Apocalypse mirror
Sourceforge mirror
SourceForge.net Logo
      News | Info | Characters | Arenas | Screenshots | Forums | Download  
Developer: Making of | Character-HOWTO | AI Design | Submit a Character
Documentation: Main Page | Modules | Class Hierarchy | Class List | File List

RlePack.h

Go to the documentation of this file.
00001 /***************************************************************************
00002                           RlePack.h  -  description
00003                              -------------------
00004     begin                : Mon Sep 24 2001
00005     copyright            : (C) 2001 by upi
00006     email                : upi@apocalypse.rulez.org
00007  ***************************************************************************/
00008 
00009 #ifndef __RLEPACK_H
00010 #define __RLEPACK_H
00011 
00012 #include "FighterEnum.h"
00013 
00014 struct CRlePack_P;
00015 struct SDL_Surface;
00016 
00050 class CRlePack
00051 {
00052 public:
00053     CRlePack( const char* a_pcFilename, int a_iNumColors );
00054     ~CRlePack();
00055 
00056     void        Clear();
00057     int         LoadFile( const char* a_pcFilename, int a_iNumColors ); 
00058     int         Count();
00059     void        OffsetSprites( int a_iOffset );
00060     void        SetTint( TintEnum a_enTint );
00061     void        ApplyPalette();
00062     
00063     int         GetWidth( int a_iIndex );
00064     int         GetHeight( int a_iIndex );
00065     void        Draw( int a_iIndex, int a_iX, int a_iY, bool a_bFlipped=false );
00066     SDL_Surface* CreateSurface( int a_iIndex, bool a_bFlipped=false );
00067     
00068 private:
00069     CRlePack_P* p;
00070 };
00071 
00072 #endif