diff --git a/3D/Chart3DCandles.h b/3D/Chart3DCandles.h index 8598dec5b..1340d9be5 100644 --- a/3D/Chart3DCandles.h +++ b/3D/Chart3DCandles.h @@ -66,7 +66,7 @@ class Chart3DCandles : public Chart3DType { cube1.Ptr().GetTSR().translation.y = chart3d.GetPriceScale(_ohlc.GetMinOC()) + _height / 2; cube1.Ptr().GetTSR().scale.y = _height; - //Print(cube1.Ptr().GetTSR().translation.y); + // Print(cube1.Ptr().GetTSR().translation.y); cube1.Ptr().GetMaterial().SetColor(higher ? 0x22FF11 : 0xFF1122); _device.Render(cube1.Ptr()); @@ -93,7 +93,8 @@ class Chart3DCandles : public Chart3DType { cube3.Ptr().GetTSR().translation.y = _y; cube3.Ptr().GetTSR().scale.x = 200.0f; - _device.DrawText(5, _y, StringFormat("%." + IntegerToString(_digits) + "f", _s), 0x90FFFFFF, TA_LEFT | TA_VCENTER, GFX_DRAW_TEXT_FLAG_2D_COORD_X); + _device.DrawText(5, _y, StringFormat("%." + IntegerToString(_digits) + "f", _s), 0x90FFFFFF, TA_LEFT | TA_VCENTER, + GFX_DRAW_TEXT_FLAG_2D_COORD_X); cube3.Ptr().GetMaterial().SetColor(0x333333); _device.Render(cube3.Ptr()); diff --git a/3D/Chart3DType.h b/3D/Chart3DType.h index 66e458212..9e49737f7 100644 --- a/3D/Chart3DType.h +++ b/3D/Chart3DType.h @@ -45,9 +45,7 @@ class Chart3DType : public Dynamic { */ Chart3DType(Chart3D* _chart3d, Device* _device) : chart3d(_chart3d), device(_device) {} - Device* GetDevice() { - return device; - } + Device* GetDevice() { return device; } /** * Renders chart. diff --git a/3D/Device.h b/3D/Device.h index eb54420a2..d7b64f94f 100644 --- a/3D/Device.h +++ b/3D/Device.h @@ -35,11 +35,7 @@ #include "Shader.h" #include "VertexBuffer.h" -enum GFX_DRAW_TEXT_FLAGS { - GFX_DRAW_TEXT_FLAG_NONE, - GFX_DRAW_TEXT_FLAG_2D_COORD_X, - GFX_DRAW_TEXT_FLAG_2D_COORD_Y -}; +enum GFX_DRAW_TEXT_FLAGS { GFX_DRAW_TEXT_FLAG_NONE, GFX_DRAW_TEXT_FLAG_2D_COORD_X, GFX_DRAW_TEXT_FLAG_2D_COORD_Y }; enum ENUM_CLEAR_BUFFER_TYPE { CLEAR_BUFFER_TYPE_COLOR, CLEAR_BUFFER_TYPE_DEPTH }; @@ -201,7 +197,6 @@ class Device : public Dynamic { IndexBuffer* _indices; _mesh.GetBuffers(&this, _vertices, _indices); - SetMaterial(_mesh.GetMaterial()); PushTransform(_mesh.GetTSR()); @@ -264,7 +259,8 @@ class Device : public Dynamic { /** * Enqueues text to be drawn directly into the pixel buffer. Queue will be processed in the Device::End() method. */ - void DrawText(float _x, float _y, string _text, unsigned int _color = 0xFFFFFFFF, unsigned int _align = 0, unsigned int _flags = 0) { + void DrawText(float _x, float _y, string _text, unsigned int _color = 0xFFFFFFFF, unsigned int _align = 0, + unsigned int _flags = 0) { DViewport _viewport; _viewport.x = 0; _viewport.y = 0; diff --git a/3D/Frontend.h b/3D/Frontend.h index 1870fb9bd..8080c65d4 100644 --- a/3D/Frontend.h +++ b/3D/Frontend.h @@ -40,8 +40,7 @@ struct DrawTextQueueItem { */ class Frontend : public Dynamic { protected: - - DrawTextQueueItem draw_text_queue[]; + DrawTextQueueItem draw_text_queue[]; public: /** @@ -105,8 +104,7 @@ class Frontend : public Dynamic { ArrayResize(draw_text_queue, 0); } -protected: - + protected: /** * Draws text directly into the pixel buffer. Should be executed after all 3d drawing. */ diff --git a/3D/Frontends/MT5Frontend.h b/3D/Frontends/MT5Frontend.h index 723e2c2be..9bcec9e73 100644 --- a/3D/Frontends/MT5Frontend.h +++ b/3D/Frontends/MT5Frontend.h @@ -161,13 +161,13 @@ class MT5Frontend : public Frontend { */ virtual void DrawTextNow(int _x, int _y, string _text, unsigned int _color = 0xFFFFFFFF, unsigned int _align = 0) { TextSetFont("Arial", -80, FW_EXTRABOLD, 0); - #ifdef __debug__ +#ifdef __debug__ Print("TextSetFont: LastError = ", GetLastError()); - #endif +#endif TextOut(_text, _x, _y, _align, image, Width(), Height(), _color, COLOR_FORMAT_ARGB_NORMALIZE); - #ifdef __debug__ +#ifdef __debug__ Print("TextOut: LastError = ", GetLastError()); - #endif +#endif } }; diff --git a/3D/Interface.h b/3D/Interface.h index d4e1c74bc..87015f3a4 100644 --- a/3D/Interface.h +++ b/3D/Interface.h @@ -59,7 +59,6 @@ void OnChartEvent(const int id, const long& lparam, const double& dparam, const int _window = 0; InterfaceEvent _event; - if (id == CHART_EVENT_MOUSE_MOVE) { Interface::mouse_pos_x = (int)lparam; Interface::mouse_pos_y = (int)dparam; @@ -74,12 +73,9 @@ void OnChartEvent(const int id, const long& lparam, const double& dparam, const typedef void (*InterfaceListener)(InterfaceEvent&, void*); -class Interface -{ +class Interface { public: - - struct Installation - { + struct Installation { InterfaceListener listener; void* target; }; @@ -120,13 +116,9 @@ class Interface } } - static int GetMouseX() { - return mouse_pos_x; - } + static int GetMouseX() { return mouse_pos_x; } - static int GetMouseY() { - return mouse_pos_y; - } + static int GetMouseY() { return mouse_pos_y; } #endif }; diff --git a/3D/Math.h b/3D/Math.h index 5a496e0e9..e631a214a 100644 --- a/3D/Math.h +++ b/3D/Math.h @@ -3155,10 +3155,10 @@ void DXSHRotate(float &out[], int order, const DXMatrix &_matrix, const float &i gamma = 0.0f; } #else - alpha = 0.0f; - beta = 0.0f; - gamma = 0.0f; - sinb = 0.0f; + alpha = 0.0f; + beta = 0.0f; + gamma = 0.0f; + sinb = 0.0f; #endif //---