Click here to Skip to main content
15,896,154 members
Articles / Mobile Apps / Android

Diggers: cross-platform 2D game

Rate me:
Please Sign up or sign in to vote.
4.80/5 (17 votes)
5 Nov 2012CPOL4 min read 33.4K   43  
2D cross-platfrom game using SDL and Open GLES 2.0
#include "SDL_ttf.h"

#include "Sprites/Sprite.h"
#include "Utilities.h"


class TextSprite : public Sprite
{
private:
	float m_XLeftBound;
	float m_YDownBound;
	float m_XRightBound;
	float m_YUpBound;
public:
	TextSprite(float _xLeft, float _yDown, float _xRight, float _yUp, GLuint _textureID = Texture::m_TextureIDNone);

	~TextSprite(void);

	void SetMultiText(const wchar_t* _text, TTF_Font* _font = TextSprite::m_FontCommon, SDL_Color _colorFG = TextSprite::m_ColorFG);

	static TTF_Font *m_FontCommon;
	static TTF_Font *m_FontCaption;
	static TTF_Font *m_FontFPS;

	static SDL_Color m_ColorFG;
	static SDL_Color m_DebugColorFG;

	virtual bool Update(float _dt);
};


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)


Written By
Russian Federation Russian Federation
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions