Commit 91ae3131 authored by Ilya Prokhorov's avatar Ilya Prokhorov

astyle ident

parent fa4d2aa2
......@@ -4,9 +4,9 @@ using namespace FlameSteelEngine::CommonTraits;
Color::Color(int8_t red, int8_t green, int8_t blue, int8_t alpha) {
this->red = red;
this->green = green;
this->blue = blue;
this->alpha = alpha;
this->red = red;
this->green = green;
this->blue = blue;
this->alpha = alpha;
};
......@@ -9,12 +9,12 @@ namespace CommonTraits {
class Color {
public:
Color(int8_t red, int8_t green, int8_t blue, int8_t alpha);
Color(int8_t red, int8_t green, int8_t blue, int8_t alpha);
uint8_t red;
uint8_t green;
uint8_t blue;
uint8_t alpha;
uint8_t red;
uint8_t green;
uint8_t blue;
uint8_t alpha;
};
};
......
......@@ -4,10 +4,10 @@
* and open the template in the editor.
*/
/*
/*
* File: FSEGTIOSystemParams.cpp
* Author: demensdeum
*
*
* Created on March 8, 2017, 1:29 PM
*/
......
......@@ -4,7 +4,7 @@
* and open the template in the editor.
*/
/*
/*
* File: FSEGTIOSystemParams.h
* Author: demensdeum
*
......@@ -23,12 +23,12 @@ public:
IOSystemParams();
IOSystemParams(const IOSystemParams& orig);
virtual ~IOSystemParams();
shared_ptr<string> title;
int width = 0;
int height = 0;
bool windowed = false;
int width = 0;
int height = 0;
bool windowed = false;
private:
......
......@@ -4,37 +4,37 @@
Image::Image(int width, int height) {
this->width = width;
this->height = height;
auto size = width * height;
for (auto i = 0; i < size; i++) {
auto color = make_shared<Color>(0, 0, 0, 255);
colors.push_back(color);
}
auto size = width * height;
for (auto i = 0; i < size; i++) {
auto color = make_shared<Color>(0, 0, 0, 255);
colors.push_back(color);
}
}
void Image::setColorAtXY(shared_ptr<Color> color, int x, int y) {
if (x < 0 || y < 0 || x >= width || y >= height) {
return;
}
if (x < 0 || y < 0 || x >= width || y >= height) {
return;
}
int index = (y * width) + x;
colors[index] = color;
int index = (y * width) + x;
colors[index] = color;
}
shared_ptr<Color> Image::getColorAtXY(int x, int y) {
if (x < 0 || y < 0 || x >= width || y >= height) {
return shared_ptr<Color>();
}
if (x < 0 || y < 0 || x >= width || y >= height) {
return shared_ptr<Color>();
}
int index = (y * width) + x;
return colors[index];
int index = (y * width) + x;
return colors[index];
};
int Image::getWidth() {
return width;
return width;
};
int Image::getHeight() {
return height;
return height;
};
......@@ -23,17 +23,17 @@ namespace CommonTraits {
class Image {
public:
Image(int width, int height);
void setColorAtXY(shared_ptr<Color> color, int x, int y);
shared_ptr<Color> getColorAtXY(int x, int y);
Image(int width, int height);
void setColorAtXY(shared_ptr<Color> color, int x, int y);
shared_ptr<Color> getColorAtXY(int x, int y);
int getWidth();
int getHeight();
int getWidth();
int getHeight();
private:
vector<shared_ptr<Color>> colors;
int width;
int height;
vector<shared_ptr<Color>> colors;
int width;
int height;
};
......
......@@ -4,24 +4,24 @@
* and open the template in the editor.
*/
/*
/*
* File: FSGLMaterial.cpp
* Author: demensdeum
*
*
* Created on July 31, 2017, 10:36 PM
*/
#include "Material.h"
FSGLMaterial::FSGLMaterial(shared_ptr<string> texturePath) {
this->texturePath = texturePath;
}
FSGLMaterial::FSGLMaterial(SDL_Surface *surface) {
this->surface = surface;
this->surface = surface;
}
......@@ -29,11 +29,11 @@ FSGLMaterial::FSGLMaterial(const FSGLMaterial& ) {
}
FSGLMaterial::~FSGLMaterial() {
if (surface != NULL) {
SDL_FreeSurface(surface);
}
}
......@@ -4,7 +4,7 @@
* and open the template in the editor.
*/
/*
/*
* File: FSGLMaterial.h
* Author: demensdeum
*
......@@ -24,15 +24,15 @@ using namespace std;
class FSGLMaterial {
public:
FSGLMaterial(shared_ptr<string> texturePath);
FSGLMaterial(SDL_Surface *surface);
FSGLMaterial(SDL_Surface *surface);
FSGLMaterial(const FSGLMaterial& orig);
virtual ~FSGLMaterial();
shared_ptr<string> texturePath;
SDL_Surface *surface = nullptr;
bool needsUpdate = false;
bool needsUpdate = false;
private:
......
......@@ -2,6 +2,6 @@
FSEGTSerializedModel::FSEGTSerializedModel(shared_ptr<string> serializedModel) {
this->serializedModel = serializedModel;
this->serializedModel = serializedModel;
}
\ No newline at end of file
......@@ -9,9 +9,9 @@ class FSEGTSerializedModel: public Object {
public:
FSEGTSerializedModel(shared_ptr<string> serializedModel);
FSEGTSerializedModel(shared_ptr<string> serializedModel);
shared_ptr<string> serializedModel;
shared_ptr<string> serializedModel;
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment