_________ __                 __
        /   _____//  |_____________ _/  |______     ____  __ __  ______
        \_____  \\   __\_  __ \__  \\   __\__  \   / ___\|  |  \/  ___/
        /        \|  |  |  | \// __ \|  |  / __ \_/ /_/  >  |  /\___ \
       /_______  /|__|  |__|  (____  /__| (____  /\___  /|____//____  >
               \/                  \/          \//_____/            \/
    ______________________                           ______________________
                          T H E   W A R   B E G I N S
                   Stratagus - A free fantasy real time strategy game engine

Public Member Functions | Public Attributes | List of all members
Mng Class Reference

#include <video.h>

Inheritance diagram for Mng:
gcn::Image

Public Member Functions

virtual int getWidth () const
 
virtual int getHeight () const
 
virtual bool isDirty () const
 
- Public Member Functions inherited from gcn::Image
 Image (void *data, int width, int height)
 
 Image (const std::string &filename)
 
virtual ~Image ()
 

Public Attributes

bool is_dirty
 
std::string name
 
FILE * fd
 
mng_handle handle
 
SDL_Surface * surface
 
unsigned char * buffer
 
unsigned long ticks
 
int iteration
 

mng.cpp - The mng graphic file loader.

static uint32_t MaxFPS = 15
 
static MngNew (const std::string &name)
 
static void Free (Mng *mng)
 
bool Load ()
 
void Reset ()
 
void Draw (int x, int y)
 
virtual void_getData () const
 

Additional Inherited Members

- Static Public Member Functions inherited from gcn::Image
static ImageLoader_getImageLoader ()
 
static void setImageLoader (ImageLoader *imageLoader)
 
- Protected Member Functions inherited from gcn::Image
 Image ()
 
- Protected Attributes inherited from gcn::Image
voidmData
 
int mWidth
 
int mHeight
 
bool mLoadedWithImageLoader
 
- Static Protected Attributes inherited from gcn::Image
static ImageLoadermImageLoader = NULL
 

Member Function Documentation

◆ _getData()

void * Mng::_getData ( ) const
virtual

Gets the data of the Image. Image data can be different things depending on what ImageLoader you use. If you for instance use the SDLImageLoader then an SDL_Surface will be returned.

Returns
a void pointer to the Image data.
See also
SDLImageLoader, AllegroImageLoader

Reimplemented from gcn::Image.

◆ Draw()

void Mng::Draw ( int  x,
int  y 
)

Display a MNG

Parameters
xX coordinate
yY coordinate

◆ Free()

void Mng::Free ( Mng mng)
static

◆ getHeight()

virtual int Mng::getHeight ( ) const
inlinevirtual

Gets the height of the Image.

Returns
the image height

Reimplemented from gcn::Image.

◆ getWidth()

virtual int Mng::getWidth ( ) const
inlinevirtual

Gets the width of the Image.

Returns
the image width

Reimplemented from gcn::Image.

◆ isDirty()

virtual bool Mng::isDirty ( ) const
inlinevirtual

Reimplemented from gcn::Image.

◆ Load()

bool Mng::Load ( )

Load a MNG

Parameters
nameName of the MNG file

◆ New()

Mng * Mng::New ( const std::string &  name)
static

◆ Reset()

void Mng::Reset ( )

Reset a MNG

Member Data Documentation

◆ buffer

unsigned char* Mng::buffer

◆ fd

FILE* Mng::fd

◆ handle

mng_handle Mng::handle

◆ is_dirty

bool Mng::is_dirty
mutable

◆ iteration

int Mng::iteration

◆ MaxFPS

uint32_t Mng::MaxFPS = 15
static

◆ name

std::string Mng::name

◆ surface

SDL_Surface* Mng::surface

◆ ticks

unsigned long Mng::ticks

The documentation for this class was generated from the following files:
(C) Copyright 1998-2012 by The Stratagus Project under the GNU General Public License.
All trademarks and copyrights on this page are owned by their respective owners.