Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

TetroGL: An OpenGL Game Tutorial in C++ for Win32 Platforms - Part 2

, 29 Mar 2009 CPOL
Learn how to load images, display them on the screen and manage them efficiently and how to display animations.
Tutorial2.zip
bin
DevIL.dll
GrassIso.bmp
KnightPause.bmp
KnightWalk.bmp
Trees.bmp
dependencies
DevIL
include
IL
lib
DevIL.dll
DevIL.exp
DevIL.lib
ILU.dll
ILU.exp
ILU.lib
ILUT.dll
ILUT.exp
ILUT.lib
src
#ifndef _ANIMFILELOADER_H_
#define _ANIMFILELOADER_H_

#include "ImageList.h"

// Simple class to help in the loading of the animations
// of a sprite.
class CAnimFileLoader
{
public:
	CAnimFileLoader(const std::string& strFile, unsigned imgsPerRow, 
			unsigned imgWidth, unsigned imgHeight);
	~CAnimFileLoader();

	CImageList GetAnimation(unsigned startIndex, unsigned stopIndex);

private:
	std::string m_strFileName;

	unsigned m_uImgWidth;
	unsigned m_uImgHeight;
	unsigned m_uImgsPerRow;
};

#endif  // _ANIMFILELOADER_H_

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Cedric Moonen
Engineer
Belgium Belgium
I am a 29 years old guy and I live with my girlfriend in Hoegaarden, little city from Belgium well known for its white beer Smile | :) .
I studied as an industrial engineer in electronics but I oriented myself more towards software development when I started to work.
Currently I am working in a research centre in mechatronica. I mainly develop in C++ but I also do a bit of Java.
When I have so spare time, I like to read (mainly fantasy) and play electric guitar.

| Advertise | Privacy | Mobile
Web03 | 2.8.141022.2 | Last Updated 29 Mar 2009
Article Copyright 2008 by Cedric Moonen
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid