aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/irrlicht-1.8/include/IGUISpriteBank.h
diff options
context:
space:
mode:
authorDavid Walter Seikel2013-01-13 18:54:10 +1000
committerDavid Walter Seikel2013-01-13 18:54:10 +1000
commit959831f4ef5a3e797f576c3de08cd65032c997ad (patch)
treee7351908be5995f0b325b2ebeaa02d5a34b82583 /libraries/irrlicht-1.8/include/IGUISpriteBank.h
parentAdd info about changes to Irrlicht. (diff)
downloadSledjHamr-959831f4ef5a3e797f576c3de08cd65032c997ad.zip
SledjHamr-959831f4ef5a3e797f576c3de08cd65032c997ad.tar.gz
SledjHamr-959831f4ef5a3e797f576c3de08cd65032c997ad.tar.bz2
SledjHamr-959831f4ef5a3e797f576c3de08cd65032c997ad.tar.xz
Remove damned ancient DOS line endings from Irrlicht. Hopefully I did not go overboard.
Diffstat (limited to '')
-rw-r--r--libraries/irrlicht-1.8/include/IGUISpriteBank.h190
1 files changed, 95 insertions, 95 deletions
diff --git a/libraries/irrlicht-1.8/include/IGUISpriteBank.h b/libraries/irrlicht-1.8/include/IGUISpriteBank.h
index 4a2b5f5..872bbca 100644
--- a/libraries/irrlicht-1.8/include/IGUISpriteBank.h
+++ b/libraries/irrlicht-1.8/include/IGUISpriteBank.h
@@ -1,95 +1,95 @@
1// Copyright (C) 2002-2012 Nikolaus Gebhardt 1// Copyright (C) 2002-2012 Nikolaus Gebhardt
2// This file is part of the "Irrlicht Engine". 2// This file is part of the "Irrlicht Engine".
3// For conditions of distribution and use, see copyright notice in irrlicht.h 3// For conditions of distribution and use, see copyright notice in irrlicht.h
4 4
5#ifndef __I_GUI_SPRITE_BANK_H_INCLUDED__ 5#ifndef __I_GUI_SPRITE_BANK_H_INCLUDED__
6#define __I_GUI_SPRITE_BANK_H_INCLUDED__ 6#define __I_GUI_SPRITE_BANK_H_INCLUDED__
7 7
8#include "IReferenceCounted.h" 8#include "IReferenceCounted.h"
9#include "irrArray.h" 9#include "irrArray.h"
10#include "SColor.h" 10#include "SColor.h"
11#include "rect.h" 11#include "rect.h"
12 12
13namespace irr 13namespace irr
14{ 14{
15 15
16namespace video 16namespace video
17{ 17{
18 class ITexture; 18 class ITexture;
19} // end namespace video 19} // end namespace video
20 20
21namespace gui 21namespace gui
22{ 22{
23 23
24//! A single sprite frame. 24//! A single sprite frame.
25struct SGUISpriteFrame 25struct SGUISpriteFrame
26{ 26{
27 u32 textureNumber; 27 u32 textureNumber;
28 u32 rectNumber; 28 u32 rectNumber;
29}; 29};
30 30
31//! A sprite composed of several frames. 31//! A sprite composed of several frames.
32struct SGUISprite 32struct SGUISprite
33{ 33{
34 SGUISprite() : Frames(), frameTime(0) {} 34 SGUISprite() : Frames(), frameTime(0) {}
35 35
36 core::array<SGUISpriteFrame> Frames; 36 core::array<SGUISpriteFrame> Frames;
37 u32 frameTime; 37 u32 frameTime;
38}; 38};
39 39
40 40
41//! Sprite bank interface. 41//! Sprite bank interface.
42/** See http://irrlicht.sourceforge.net/phpBB2/viewtopic.php?t=25742&highlight=spritebank 42/** See http://irrlicht.sourceforge.net/phpBB2/viewtopic.php?t=25742&highlight=spritebank
43* for more information how to use the spritebank. 43* for more information how to use the spritebank.
44*/ 44*/
45class IGUISpriteBank : public virtual IReferenceCounted 45class IGUISpriteBank : public virtual IReferenceCounted
46{ 46{
47public: 47public:
48 48
49 //! Returns the list of rectangles held by the sprite bank 49 //! Returns the list of rectangles held by the sprite bank
50 virtual core::array< core::rect<s32> >& getPositions() = 0; 50 virtual core::array< core::rect<s32> >& getPositions() = 0;
51 51
52 //! Returns the array of animated sprites within the sprite bank 52 //! Returns the array of animated sprites within the sprite bank
53 virtual core::array< SGUISprite >& getSprites() = 0; 53 virtual core::array< SGUISprite >& getSprites() = 0;
54 54
55 //! Returns the number of textures held by the sprite bank 55 //! Returns the number of textures held by the sprite bank
56 virtual u32 getTextureCount() const = 0; 56 virtual u32 getTextureCount() const = 0;
57 57
58 //! Gets the texture with the specified index 58 //! Gets the texture with the specified index
59 virtual video::ITexture* getTexture(u32 index) const = 0; 59 virtual video::ITexture* getTexture(u32 index) const = 0;
60 60
61 //! Adds a texture to the sprite bank 61 //! Adds a texture to the sprite bank
62 virtual void addTexture(video::ITexture* texture) = 0; 62 virtual void addTexture(video::ITexture* texture) = 0;
63 63
64 //! Changes one of the textures in the sprite bank 64 //! Changes one of the textures in the sprite bank
65 virtual void setTexture(u32 index, video::ITexture* texture) = 0; 65 virtual void setTexture(u32 index, video::ITexture* texture) = 0;
66 66
67 //! Add the texture and use it for a single non-animated sprite. 67 //! Add the texture and use it for a single non-animated sprite.
68 //! The texture and the corresponding rectangle and sprite will all be added to the end of each array. 68 //! The texture and the corresponding rectangle and sprite will all be added to the end of each array.
69 //! returns the index of the sprite or -1 on failure 69 //! returns the index of the sprite or -1 on failure
70 virtual s32 addTextureAsSprite(video::ITexture* texture) = 0; 70 virtual s32 addTextureAsSprite(video::ITexture* texture) = 0;
71 71
72 //! clears sprites, rectangles and textures 72 //! clears sprites, rectangles and textures
73 virtual void clear() = 0; 73 virtual void clear() = 0;
74 74
75 //! Draws a sprite in 2d with position and color 75 //! Draws a sprite in 2d with position and color
76 virtual void draw2DSprite(u32 index, const core::position2di& pos, 76 virtual void draw2DSprite(u32 index, const core::position2di& pos,
77 const core::rect<s32>* clip=0, 77 const core::rect<s32>* clip=0,
78 const video::SColor& color= video::SColor(255,255,255,255), 78 const video::SColor& color= video::SColor(255,255,255,255),
79 u32 starttime=0, u32 currenttime=0, 79 u32 starttime=0, u32 currenttime=0,
80 bool loop=true, bool center=false) = 0; 80 bool loop=true, bool center=false) = 0;
81 81
82 //! Draws a sprite batch in 2d using an array of positions and a color 82 //! Draws a sprite batch in 2d using an array of positions and a color
83 virtual void draw2DSpriteBatch(const core::array<u32>& indices, const core::array<core::position2di>& pos, 83 virtual void draw2DSpriteBatch(const core::array<u32>& indices, const core::array<core::position2di>& pos,
84 const core::rect<s32>* clip=0, 84 const core::rect<s32>* clip=0,
85 const video::SColor& color= video::SColor(255,255,255,255), 85 const video::SColor& color= video::SColor(255,255,255,255),
86 u32 starttime=0, u32 currenttime=0, 86 u32 starttime=0, u32 currenttime=0,
87 bool loop=true, bool center=false) = 0; 87 bool loop=true, bool center=false) = 0;
88}; 88};
89 89
90 90
91} // end namespace gui 91} // end namespace gui
92} // end namespace irr 92} // end namespace irr
93 93
94#endif // __I_GUI_SPRITE_BANK_H_INCLUDED__ 94#endif // __I_GUI_SPRITE_BANK_H_INCLUDED__
95 95