indent classes, align by spaces

This commit is contained in:
Garux
2021-03-24 00:25:15 +03:00
parent 5b1b9b5e6c
commit 2222100316
450 changed files with 42485 additions and 42239 deletions

View File

@@ -34,52 +34,52 @@ struct RGBAPixel
class RGBAImage : public Image
{
RGBAImage( const RGBAImage& other );
RGBAImage& operator=( const RGBAImage& other );
RGBAImage( const RGBAImage& other );
RGBAImage& operator=( const RGBAImage& other );
public:
RGBAPixel* pixels;
unsigned int width, height;
RGBAPixel* pixels;
unsigned int width, height;
RGBAImage( unsigned int _width, unsigned int _height )
: pixels( new RGBAPixel[_width * _height] ), width( _width ), height( _height ){
}
virtual ~RGBAImage(){
delete[] pixels;
}
RGBAImage( unsigned int _width, unsigned int _height )
: pixels( new RGBAPixel[_width * _height] ), width( _width ), height( _height ){
}
virtual ~RGBAImage(){
delete[] pixels;
}
void release(){
delete this;
}
byte* getRGBAPixels() const {
return reinterpret_cast<byte*>( pixels );
}
unsigned int getWidth() const {
return width;
}
unsigned int getHeight() const {
return height;
}
void release(){
delete this;
}
byte* getRGBAPixels() const {
return reinterpret_cast<byte*>( pixels );
}
unsigned int getWidth() const {
return width;
}
unsigned int getHeight() const {
return height;
}
};
class RGBAImageFlags : public RGBAImage
{
public:
int m_surfaceFlags;
int m_contentFlags;
int m_value;
RGBAImageFlags( unsigned short _width, unsigned short _height, int surfaceFlags, int contentFlags, int value ) :
RGBAImage( _width, _height ), m_surfaceFlags( surfaceFlags ), m_contentFlags( contentFlags ), m_value( value ){
}
int m_surfaceFlags;
int m_contentFlags;
int m_value;
RGBAImageFlags( unsigned short _width, unsigned short _height, int surfaceFlags, int contentFlags, int value ) :
RGBAImage( _width, _height ), m_surfaceFlags( surfaceFlags ), m_contentFlags( contentFlags ), m_value( value ){
}
int getSurfaceFlags() const {
return m_surfaceFlags;
}
int getContentFlags() const {
return m_contentFlags;
}
int getValue() const {
return m_value;
}
int getSurfaceFlags() const {
return m_surfaceFlags;
}
int getContentFlags() const {
return m_contentFlags;
}
int getValue() const {
return m_value;
}
};
@@ -97,38 +97,38 @@ inline void ArchiveFile_freeBuffer( InputStream::byte_type* buffer ){
class ScopedArchiveBuffer
{
public:
std::size_t length;
InputStream::byte_type* buffer;
std::size_t length;
InputStream::byte_type* buffer;
ScopedArchiveBuffer( ArchiveFile& file ){
buffer = ArchiveFile_loadBuffer( file, length );
}
~ScopedArchiveBuffer(){
ArchiveFile_freeBuffer( buffer );
}
ScopedArchiveBuffer( ArchiveFile& file ){
buffer = ArchiveFile_loadBuffer( file, length );
}
~ScopedArchiveBuffer(){
ArchiveFile_freeBuffer( buffer );
}
};
class PointerInputStream : public InputStream
{
const byte* m_read;
const byte* m_read;
public:
PointerInputStream( const byte* pointer )
: m_read( pointer ){
}
std::size_t read( byte* buffer, std::size_t length ){
const byte* end = m_read + length;
while ( m_read != end )
{
*buffer++ = *m_read++;
PointerInputStream( const byte* pointer )
: m_read( pointer ){
}
std::size_t read( byte* buffer, std::size_t length ){
const byte* end = m_read + length;
while ( m_read != end )
{
*buffer++ = *m_read++;
}
return length;
}
void seek( std::size_t offset ){
m_read += offset;
}
const byte* get(){
return m_read;
}
return length;
}
void seek( std::size_t offset ){
m_read += offset;
}
const byte* get(){
return m_read;
}
};
#endif