Commit 74435cd4 authored by Ilya Prokhorov's avatar Ilya Prokhorov

Fixed by aStyle

parent 7f846639
......@@ -51,19 +51,19 @@ void FSEGTObjectsContext::removeAllObjects()
}
shared_ptr<Object> FSEGTObjectsContext::objectAtIndex(int index) {
return objects->objectAtIndex(index);
return objects->objectAtIndex(index);
}
int FSEGTObjectsContext::size() {
return objects->size();
return objects->size();
}
void FSEGTObjectsContext::addObject(shared_ptr<Object> object)
{
if (objects.get() == nullptr) {
throwRuntimeException(string("objects object is null"));
}
if (objects.get() == nullptr) {
throwRuntimeException(string("objects object is null"));
}
objects->addObject(object);
......
......@@ -32,7 +32,7 @@ public:
shared_ptr<Object> objectAtIndex(int index);
int size();
void setObjects(shared_ptr<Objects> objects);
void removeAllObjects();
......
......@@ -43,7 +43,7 @@ public:
void setIOSystem(shared_ptr<FSEGTIOSystem> ioSystem);
void switchToState(int state);
void startGameLoop();
void startGameLoop();
protected:
shared_ptr<ResourcesLoader> resourcesLoader;
......
......@@ -11,6 +11,6 @@ FSEGTTouch::FSEGTTouch(shared_ptr<string> uuid, int x, int y)
};
shared_ptr<FSEGTTouch> FSEGTTouch::copy() {
auto touch = make_shared<FSEGTTouch>(this->getClassIdentifier(), x, y);
return touch;
auto touch = make_shared<FSEGTTouch>(this->getClassIdentifier(), x, y);
return touch;
};
\ No newline at end of file
......@@ -17,7 +17,7 @@ public:
int x;
int y;
shared_ptr<FSEGTTouch> copy();
shared_ptr<FSEGTTouch> copy();
};
......
......@@ -50,6 +50,6 @@ void FSEGTVector::populate(shared_ptr<FSEGTVector> vector)
}
glm::vec3 FSEGTVector::vec3() {
auto vector = glm::vec3(x,y,z);
return vector;
auto vector = glm::vec3(x,y,z);
return vector;
}
\ No newline at end of file
......@@ -26,7 +26,7 @@ public:
int getTileX();
int getTileY();
glm::vec3 vec3();
glm::vec3 vec3();
shared_ptr<FSEGTVector> copy();
void populate(shared_ptr<FSEGTVector> vector);
......
......@@ -10,8 +10,8 @@
FSEGTInputController::FSEGTInputController()
{
this->jumpKeyPressed = false;
this->crouchKeyPressed = false;
this->crouchKeyPressed = false;
this->ioSystem = nullptr;
this->leftKeyPressed = false;
this->rightKeyPressed = false;
......@@ -59,7 +59,7 @@ void FSEGTInputController::clearKeys()
{
this->jumpKeyPressed = false;
this->crouchKeyPressed = false;
this->leftKeyPressed = false;
this->rightKeyPressed = false;
this->downKeyPressed = false;
......
......@@ -25,7 +25,7 @@ public:
virtual bool isJumpKeyPressed();
virtual bool isCrouchKeyPressed();
virtual bool isLeftKeyPressed();
virtual bool isRightKeyPressed();
virtual bool isUpKeyPressed();
......@@ -52,7 +52,7 @@ public:
public:
bool jumpKeyPressed = false;
bool crouchKeyPressed = false;
bool leftKeyPressed = false;
bool rightKeyPressed = false;
bool downKeyPressed = false;
......@@ -73,7 +73,7 @@ public:
int pointerXdiff = 0;
int pointerYdiff = 0;
float wheelDiffY = 0;
float wheelDiffY = 0;
};
#endif /* FSEGTINPUTCONTROLLER_H_ */
......@@ -50,10 +50,10 @@ bool FSEGTUtils::isSkyboxObject(shared_ptr<Object> object)
bool FSEGTUtils::contains3D(shared_ptr<Object> object)
{
auto contains3D = object->containsComponentWithIdentifier(make_shared<string>(FSEGTConstComponentsModel)) ||
object->containsComponentWithIdentifier(make_shared<string>(FSEGTConstComponentsSerializedModel));
auto contains3D = object->containsComponentWithIdentifier(make_shared<string>(FSEGTConstComponentsModel)) ||
object->containsComponentWithIdentifier(make_shared<string>(FSEGTConstComponentsSerializedModel));
//cout << "contains3D: " << contains3D << endl;
//cout << "contains3D: " << contains3D << endl;
return contains3D;
......
......@@ -5,61 +5,61 @@
using namespace FlameSteelEngine::GameToolkit;
shared_ptr<FSEGTSerializedModel> Factory::makeSerializedModel() {
auto serializedModel = FSEGTFactory::makeSerializedModelComponent(make_shared<string>());
return serializedModel;
auto serializedModel = FSEGTFactory::makeSerializedModelComponent(make_shared<string>());
return serializedModel;
};
shared_ptr<SurfaceMaterial> Factory::makeSurfaceMaterial(int width, int height) {
auto surfaceMaterial = FSEGTFactory::makeSurfaceMaterialComponent(width, height);
return surfaceMaterial;
auto surfaceMaterial = FSEGTFactory::makeSurfaceMaterialComponent(width, height);
return surfaceMaterial;
};
shared_ptr<FSEGTVector> Factory::makePosition(int x, int y, int z) {
auto position = FSEGTFactory::makePositionComponent(x, y, z);
return position;
auto position = FSEGTFactory::makePositionComponent(x, y, z);
return position;
};
shared_ptr<FSEGTVector> Factory::makeRotation(float rotationX, float rotationY, float rotationZ) {
auto rotation = FSEGTFactory::makeRotationComponent(rotationX, rotationY, rotationZ);
return rotation;
auto rotation = FSEGTFactory::makeRotationComponent(rotationX, rotationY, rotationZ);
return rotation;
};
shared_ptr <FSEGTVector> Factory::makeScale(float width, float height, float depth) {
auto scale = FSEGTFactory::makeScaleComponent(width, height, depth);
return scale;
auto scale = FSEGTFactory::makeScaleComponent(width, height, depth);
return scale;
};
shared_ptr<FloatComponent> Factory::makeBrightness(float factor) {
auto brightness = FSEGTFactory::makeBrightnessComponent(factor);
return brightness;
auto brightness = FSEGTFactory::makeBrightnessComponent(factor);
return brightness;
}
NotNull<Object> Factory::makeObject(
shared_ptr<string> classIdentifier,
shared_ptr<string> instanceIdentifier,
float x,
float y,
float z,
float scaleX,
float scaleY,
float scaleZ,
float rotationX,
float rotationY,
float rotationZ
) {
shared_ptr<string> classIdentifier,
shared_ptr<string> instanceIdentifier,
float x,
float y,
float z,
float scaleX,
float scaleY,
float scaleZ,
float rotationX,
float rotationY,
float rotationZ
) {
auto object = FSEGTFactory::makeOnSceneObject(
classIdentifier,
instanceIdentifier,
shared_ptr<string>(),
shared_ptr<string>(),
shared_ptr<string>(),
x, y, z,
scaleX, scaleY, scaleZ,
rotationX, rotationY, rotationZ,
0);
auto object = FSEGTFactory::makeOnSceneObject(
classIdentifier,
instanceIdentifier,
shared_ptr<string>(),
shared_ptr<string>(),
shared_ptr<string>(),
x, y, z,
scaleX, scaleY, scaleZ,
rotationX, rotationY, rotationZ,
0);
auto notNull = toNotNull(object);
auto notNull = toNotNull(object);
return notNull;
return notNull;
};
\ No newline at end of file
......@@ -19,25 +19,25 @@ namespace GameToolkit {
class Factory {
public:
static shared_ptr<FSEGTSerializedModel> makeSerializedModel();
static shared_ptr<SurfaceMaterial> makeSurfaceMaterial(int width, int height);
static shared_ptr<FSEGTVector> makePosition(int x, int y, int z);
static shared_ptr<FSEGTVector> makeRotation(float rotationX, float rotationY, float rotationZ);
static shared_ptr <FSEGTVector> makeScale(float width, float height, float depth);
static shared_ptr<FloatComponent> makeBrightness(float factor);
static NotNull<Object> makeObject(
shared_ptr<string> classIdentifier,
shared_ptr<string> instanceIdentifier,
float x,
float y,
float z,
float scaleX,
float scaleY,
float scaleZ,
float rotationX,
float rotationY,
float rotationZ
);
static shared_ptr<FSEGTSerializedModel> makeSerializedModel();
static shared_ptr<SurfaceMaterial> makeSurfaceMaterial(int width, int height);
static shared_ptr<FSEGTVector> makePosition(int x, int y, int z);
static shared_ptr<FSEGTVector> makeRotation(float rotationX, float rotationY, float rotationZ);
static shared_ptr <FSEGTVector> makeScale(float width, float height, float depth);
static shared_ptr<FloatComponent> makeBrightness(float factor);
static NotNull<Object> makeObject(
shared_ptr<string> classIdentifier,
shared_ptr<string> instanceIdentifier,
float x,
float y,
float z,
float scaleX,
float scaleY,
float scaleZ,
float rotationX,
float rotationY,
float rotationZ
);
};
};
......
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