mirror of
https://github.com/minetest/irrlicht.git
synced 2025-07-02 00:00:26 +02:00
Reformat the code, using:
find -type f | # list all regular files grep -E '\.(h|cpp|mm)$' | # filter for source files grep -v '/mt_' | # filter out generated files grep -v '/vendor/' | # and vendored GL grep -v '/test/image_loader_test.cpp' | # and this file (has giant literals arrays) xargs -n 1 -P $(nproc) clang-format -i # reformat everything Co-authored-by: numzero <numzer0@yandex.ru>
This commit is contained in:
@ -11,59 +11,57 @@ namespace irr
|
||||
|
||||
namespace video
|
||||
{
|
||||
class IVideoDriver;
|
||||
class ITexture;
|
||||
class IVideoDriver;
|
||||
class ITexture;
|
||||
}
|
||||
|
||||
namespace gui
|
||||
{
|
||||
|
||||
class IGUIEnvironment;
|
||||
class IGUIEnvironment;
|
||||
|
||||
//! Sprite bank interface.
|
||||
class CGUISpriteBank : public IGUISpriteBank
|
||||
{
|
||||
public:
|
||||
|
||||
CGUISpriteBank(IGUIEnvironment* env);
|
||||
CGUISpriteBank(IGUIEnvironment *env);
|
||||
virtual ~CGUISpriteBank();
|
||||
|
||||
core::array< core::rect<s32> >& getPositions() override;
|
||||
core::array< SGUISprite >& getSprites() override;
|
||||
core::array<core::rect<s32>> &getPositions() override;
|
||||
core::array<SGUISprite> &getSprites() override;
|
||||
|
||||
u32 getTextureCount() const override;
|
||||
video::ITexture* getTexture(u32 index) const override;
|
||||
void addTexture(video::ITexture* texture) override;
|
||||
void setTexture(u32 index, video::ITexture* texture) override;
|
||||
video::ITexture *getTexture(u32 index) const override;
|
||||
void addTexture(video::ITexture *texture) override;
|
||||
void setTexture(u32 index, video::ITexture *texture) override;
|
||||
|
||||
//! Add the texture and use it for a single non-animated sprite.
|
||||
s32 addTextureAsSprite(video::ITexture* texture) override;
|
||||
s32 addTextureAsSprite(video::ITexture *texture) override;
|
||||
|
||||
//! clears sprites, rectangles and textures
|
||||
void clear() override;
|
||||
|
||||
//! Draws a sprite in 2d with position and color
|
||||
virtual void draw2DSprite(u32 index, const core::position2di& pos, const core::rect<s32>* clip=0,
|
||||
const video::SColor& color= video::SColor(255,255,255,255),
|
||||
u32 starttime=0, u32 currenttime=0, bool loop=true, bool center=false) override;
|
||||
virtual void draw2DSprite(u32 index, const core::position2di &pos, const core::rect<s32> *clip = 0,
|
||||
const video::SColor &color = video::SColor(255, 255, 255, 255),
|
||||
u32 starttime = 0, u32 currenttime = 0, bool loop = true, bool center = false) override;
|
||||
|
||||
//! Draws a sprite in 2d with destination rectangle and colors
|
||||
virtual void draw2DSprite(u32 index, const core::rect<s32>& destRect,
|
||||
const core::rect<s32>* clip=0,
|
||||
const video::SColor * const colors=0,
|
||||
virtual void draw2DSprite(u32 index, const core::rect<s32> &destRect,
|
||||
const core::rect<s32> *clip = 0,
|
||||
const video::SColor *const colors = 0,
|
||||
u32 timeTicks = 0,
|
||||
bool loop=true) override;
|
||||
bool loop = true) override;
|
||||
|
||||
//! Draws a sprite batch in 2d using an array of positions and a color
|
||||
virtual void draw2DSpriteBatch(const core::array<u32>& indices, const core::array<core::position2di>& pos,
|
||||
const core::rect<s32>* clip=0,
|
||||
const video::SColor& color= video::SColor(255,255,255,255),
|
||||
u32 starttime=0, u32 currenttime=0,
|
||||
bool loop=true, bool center=false) override;
|
||||
virtual void draw2DSpriteBatch(const core::array<u32> &indices, const core::array<core::position2di> &pos,
|
||||
const core::rect<s32> *clip = 0,
|
||||
const video::SColor &color = video::SColor(255, 255, 255, 255),
|
||||
u32 starttime = 0, u32 currenttime = 0,
|
||||
bool loop = true, bool center = false) override;
|
||||
|
||||
protected:
|
||||
|
||||
bool getFrameNr(u32& frameNr, u32 index, u32 time, bool loop) const;
|
||||
bool getFrameNr(u32 &frameNr, u32 index, u32 time, bool loop) const;
|
||||
|
||||
struct SDrawBatch
|
||||
{
|
||||
@ -73,11 +71,10 @@ protected:
|
||||
};
|
||||
|
||||
core::array<SGUISprite> Sprites;
|
||||
core::array< core::rect<s32> > Rectangles;
|
||||
core::array<video::ITexture*> Textures;
|
||||
IGUIEnvironment* Environment;
|
||||
video::IVideoDriver* Driver;
|
||||
|
||||
core::array<core::rect<s32>> Rectangles;
|
||||
core::array<video::ITexture *> Textures;
|
||||
IGUIEnvironment *Environment;
|
||||
video::IVideoDriver *Driver;
|
||||
};
|
||||
|
||||
} // end namespace gui
|
||||
|
Reference in New Issue
Block a user