Browse Source

remove DEPRECATED

dmuratshin 9 years ago
parent
commit
e654d19f65

+ 1 - 1
examples/Demo/src/TestInputText.h

@@ -17,7 +17,7 @@ public:
 
 
         TextStyle style;
         TextStyle style;
         style.color = Color::Black;
         style.color = Color::Black;
-        style.hAlign = TextStyle::HALIGN_CENTER;
+        style.hAlign = TextStyle::HALIGN_MIDDLE;
         style.vAlign = TextStyle::VALIGN_MIDDLE;
         style.vAlign = TextStyle::VALIGN_MIDDLE;
         style.multiline = true;
         style.multiline = true;
         style.font = Test::resourcesUI.getResFont("big");
         style.font = Test::resourcesUI.getResFont("big");

+ 1 - 1
examples/Demo/src/TestMask.h

@@ -50,7 +50,7 @@ public:
         style.font = resourcesUI.getResFont("big");
         style.font = resourcesUI.getResFont("big");
         style.color = Color::OrangeRed;
         style.color = Color::OrangeRed;
         style.vAlign = TextStyle::VALIGN_MIDDLE;
         style.vAlign = TextStyle::VALIGN_MIDDLE;
-        style.hAlign = TextStyle::HALIGN_CENTER;
+        style.hAlign = TextStyle::HALIGN_MIDDLE;
         style.multiline = true;
         style.multiline = true;
 
 
         spTextField text = new TextField();
         spTextField text = new TextField();

+ 3 - 3
examples/Demo/src/TestText.h

@@ -75,15 +75,15 @@ public:
 
 
 
 
         tests.push_back(text_test("It is html style tagged text. <div c='ffff00'>It could be colored.  It <div c='0000ff'>supports</div> <div c='00ff00AA'> nested tags</div> and  <br/> broken lines.</div><br/>It supports CDATA and xml escape sequences:\n<![CDATA[<div c='00ffff'>it is CDATA</div>]]>",
         tests.push_back(text_test("It is html style tagged text. <div c='ffff00'>It could be colored.  It <div c='0000ff'>supports</div> <div c='00ff00AA'> nested tags</div> and  <br/> broken lines.</div><br/>It supports CDATA and xml escape sequences:\n<![CDATA[<div c='00ffff'>it is CDATA</div>]]>",
-                                  TextStyle::HALIGN_CENTER, TextStyle::VALIGN_MIDDLE, size, true));
+                                  TextStyle::HALIGN_MIDDLE, TextStyle::VALIGN_MIDDLE, size, true));
 
 
         for (int h = TextStyle::HALIGN_LEFT; h <= TextStyle::HALIGN_RIGHT; ++h)
         for (int h = TextStyle::HALIGN_LEFT; h <= TextStyle::HALIGN_RIGHT; ++h)
         {
         {
-            tests.push_back(text_test("<div c='00ff00'>Scaled Font test<br/></div> The quick brown fox jumps over the lazy dog. 1234567890. The quick brown fox jumps over the lazy dog. 1234567890. The quick brown fox jumps over the lazy dog. 1234567890. The quick brown fox jumps over the lazy dog. 1234567890. ", TextStyle::HALIGN_CENTER, TextStyle::VALIGN_MIDDLE, size, true, 5 * h  + 20));
+            tests.push_back(text_test("<div c='00ff00'>Scaled Font test<br/></div> The quick brown fox jumps over the lazy dog. 1234567890. The quick brown fox jumps over the lazy dog. 1234567890. The quick brown fox jumps over the lazy dog. 1234567890. The quick brown fox jumps over the lazy dog. 1234567890. ", TextStyle::HALIGN_MIDDLE, TextStyle::VALIGN_MIDDLE, size, true, 5 * h  + 20));
         }
         }
 
 
 
 
-        tests.push_back(text_test("<div c='00ff00'>Using '\\n' new line test</div>\nnew line\nnew line\nnew line", TextStyle::HALIGN_CENTER, TextStyle::VALIGN_TOP, size));
+        tests.push_back(text_test("<div c='00ff00'>Using '\\n' new line test</div>\nnew line\nnew line\nnew line", TextStyle::HALIGN_MIDDLE, TextStyle::VALIGN_TOP, size));
 
 
         for (int h = TextStyle::HALIGN_LEFT; h <= TextStyle::HALIGN_RIGHT; ++h)
         for (int h = TextStyle::HALIGN_LEFT; h <= TextStyle::HALIGN_RIGHT; ++h)
         {
         {

+ 1 - 1
examples/Demo/src/test.cpp

@@ -69,7 +69,7 @@ spTextField createText(const std::string& txt)
 #endif
 #endif
     style.color = textColor;
     style.color = textColor;
     style.vAlign = TextStyle::VALIGN_MIDDLE;
     style.vAlign = TextStyle::VALIGN_MIDDLE;
-    style.hAlign = TextStyle::HALIGN_CENTER;
+    style.hAlign = TextStyle::HALIGN_MIDDLE;
     style.multiline = true;
     style.multiline = true;
 
 
     text->setStyle(style);
     text->setStyle(style);

+ 1 - 1
examples/Game/part4/src/GameMenu.cpp

@@ -29,7 +29,7 @@ GameMenu::GameMenu()
     //vertical align
     //vertical align
     style.vAlign = TextStyle::VALIGN_BOTTOM;
     style.vAlign = TextStyle::VALIGN_BOTTOM;
     //horizontal align
     //horizontal align
-    style.hAlign = TextStyle::HALIGN_CENTER;
+    style.hAlign = TextStyle::HALIGN_MIDDLE;
 
 
     spTextField paused = initActor(new TextField,
     spTextField paused = initActor(new TextField,
                                    arg_style = style,
                                    arg_style = style,

+ 1 - 1
examples/Game/part4/src/MyButton.cpp

@@ -34,7 +34,7 @@ void MyButton::setText(const string& txt)
         TextStyle style;
         TextStyle style;
         style.font = res::ui.getResFont("normal");
         style.font = res::ui.getResFont("normal");
         style.vAlign = TextStyle::VALIGN_MIDDLE;
         style.vAlign = TextStyle::VALIGN_MIDDLE;
-        style.hAlign = TextStyle::HALIGN_CENTER;
+        style.hAlign = TextStyle::HALIGN_MIDDLE;
 
 
         //attach it to MyButton and set the same size as button
         //attach it to MyButton and set the same size as button
         //text would be centered
         //text would be centered

+ 1 - 1
examples/Game/part5/src/GameMenu.cpp

@@ -29,7 +29,7 @@ GameMenu::GameMenu()
     //vertical align
     //vertical align
     style.vAlign = TextStyle::VALIGN_BOTTOM;
     style.vAlign = TextStyle::VALIGN_BOTTOM;
     //horizontal align
     //horizontal align
-    style.hAlign = TextStyle::HALIGN_CENTER;
+    style.hAlign = TextStyle::HALIGN_MIDDLE;
 
 
     spTextField paused = initActor(new TextField,
     spTextField paused = initActor(new TextField,
                                    arg_style = style,
                                    arg_style = style,

+ 1 - 1
examples/Game/part5/src/MyButton.cpp

@@ -34,7 +34,7 @@ void MyButton::setText(const string& txt)
         TextStyle style;
         TextStyle style;
         style.font = res::ui.getResFont("normal");
         style.font = res::ui.getResFont("normal");
         style.vAlign = TextStyle::VALIGN_MIDDLE;
         style.vAlign = TextStyle::VALIGN_MIDDLE;
-        style.hAlign = TextStyle::HALIGN_CENTER;
+        style.hAlign = TextStyle::HALIGN_MIDDLE;
 
 
         //attach it to MyButton and set the same size as button
         //attach it to MyButton and set the same size as button
         //text would be centered
         //text would be centered

+ 1 - 6
examples/HelloWorld/src/example.cpp

@@ -55,12 +55,7 @@ public:
         text->setPosition(button->getSize() / 2);
         text->setPosition(button->getSize() / 2);
 
 
         //initialize text style
         //initialize text style
-        TextStyle style;
-        style.font = gameResources.getResFont("main");
-        style.color = Color::White;
-        style.vAlign = TextStyle::VALIGN_MIDDLE;
-        style.hAlign = TextStyle::HALIGN_CENTER;
-
+        TextStyle style = TextStyle(gameResources.getResFont("main")).withColor(Color::White).alignMiddle();
         text->setStyle(style);
         text->setStyle(style);
         text->setText("Click\nMe!");
         text->setText("Click\nMe!");
 
 

+ 0 - 7
oxygine/src/Actor.h

@@ -245,13 +245,6 @@ namespace oxygine
         virtual void handleEvent(Event* event);
         virtual void handleEvent(Event* event);
         virtual void doRender(const RenderState& rs) {}
         virtual void doRender(const RenderState& rs) {}
 
 
-        //converts global position (position in parent space) to local space, deprecated use parent2local
-        OXYGINE_DEPRECATED
-        Vector2 global2local(const Vector2& pos) const { return parent2local(pos); }
-        //converts local position to parent space, deprecated use local2parent
-        OXYGINE_DEPRECATED
-        Vector2 local2global(const Vector2& pos = Vector2(0, 0)) const { return local2parent(pos); }
-
         //converts position in parent space to local space
         //converts position in parent space to local space
         Vector2 parent2local(const Vector2& pos) const;
         Vector2 parent2local(const Vector2& pos) const;
         //converts local position to parent space
         //converts local position to parent space

+ 0 - 5
oxygine/src/DebugActor.cpp

@@ -116,11 +116,6 @@ namespace oxygine
         zp.reset();
         zp.reset();
     }
     }
 
 
-    void DebugActor::setCornerPosition(int corner)
-    {
-        setCorner(corner);
-    }
-
     void DebugActor::addButton(float& x, const char* name, const char* anim)
     void DebugActor::addButton(float& x, const char* name, const char* anim)
     {
     {
         spButton btn;
         spButton btn;

+ 1 - 4
oxygine/src/DebugActor.h

@@ -19,6 +19,7 @@ namespace oxygine
         static void toggle();
         static void toggle();
         static void hide();
         static void hide();
         static void release();
         static void release();
+        /**where to display DebugActor. 0 - top left, 1 - top right, 2 - bottom right, 3 - bottom left corner*/
         static void setCorner(int corner);
         static void setCorner(int corner);
         static void addDebugString(const char* format, ...);
         static void addDebugString(const char* format, ...);
         static std::string getDefaultName() { return "debug_actor"; }
         static std::string getDefaultName() { return "debug_actor"; }
@@ -26,10 +27,6 @@ namespace oxygine
         DebugActor();
         DebugActor();
         ~DebugActor();
         ~DebugActor();
 
 
-        /**where to display DebugActor. 0 - top left, 1 - top right, 2 - bottom right, 3 - bottom left corner*/
-        OXYGINE_DEPRECATED
-        void setCornerPosition(int corner);
-        //void addDebugString(const string &str);
 
 
         /**function for debug. Helps you to find actor who handled TouchEvent*/
         /**function for debug. Helps you to find actor who handled TouchEvent*/
         void showTouchedActor(bool show);
         void showTouchedActor(bool show);

+ 0 - 5
oxygine/src/STDRenderer.cpp

@@ -245,11 +245,6 @@ namespace oxygine
         _vp = viewProj;
         _vp = viewProj;
     }
     }
 
 
-    void STDRenderer::setViewProjTransform(const Matrix& view, const Matrix& proj)
-    {
-        _vp = view * proj;
-    }
-
     IVideoDriver* STDRenderer::getDriver()
     IVideoDriver* STDRenderer::getDriver()
     {
     {
         return _driver;
         return _driver;

+ 0 - 2
oxygine/src/STDRenderer.h

@@ -43,8 +43,6 @@ namespace oxygine
 
 
         void setDriver(IVideoDriver*);
         void setDriver(IVideoDriver*);
 
 
-        OXYGINE_DEPRECATED
-        void setViewProjTransform(const Matrix& view, const Matrix& proj);
         void setViewProjTransform(const Matrix& viewProj);
         void setViewProjTransform(const Matrix& viewProj);
         void setVertexDeclaration(const VertexDeclaration* decl);
         void setVertexDeclaration(const VertexDeclaration* decl);
         void setUberShaderProgram(UberShaderProgram* pr);
         void setUberShaderProgram(UberShaderProgram* pr);

+ 0 - 10
oxygine/src/TextField.cpp

@@ -102,11 +102,6 @@ namespace oxygine
         needRebuild();
         needRebuild();
     }
     }
 
 
-    void TextField::setFontSize2Scale(int scale2size)
-    {
-        setFontSize(scale2size);
-    }
-
     void TextField::setFontSize(int size)
     void TextField::setFontSize(int size)
     {
     {
         _style.fontSize = size;
         _style.fontSize = size;
@@ -223,11 +218,6 @@ namespace oxygine
         setHtmlText(ws2utf8(str.c_str()));
         setHtmlText(ws2utf8(str.c_str()));
     }
     }
 
 
-    int TextField::getFontSize2Scale() const
-    {
-        return _style.fontSize;
-    }
-
     int            TextField::getFontSize() const
     int            TextField::getFontSize() const
     {
     {
         return _style.fontSize;
         return _style.fontSize;

+ 1 - 6
oxygine/src/TextField.h

@@ -28,9 +28,7 @@ namespace oxygine
         /**Returns current text*/
         /**Returns current text*/
         const std::string&          getText() const { return _text; }
         const std::string&          getText() const { return _text; }
         const ResFont*              getFont() const;
         const ResFont*              getFont() const;
-        /**deprecated use getFontSize*/
-        OXYGINE_DEPRECATED
-        int                         getFontSize2Scale() const;
+
         int                         getFontSize() const;
         int                         getFontSize() const;
         int                         getLinesOffset() const;
         int                         getLinesOffset() const;
         int                         getKerning() const;
         int                         getKerning() const;
@@ -64,9 +62,6 @@ namespace oxygine
         void setBaselineScale(float scale);
         void setBaselineScale(float scale);
         /**Overwrites TextStyle kerning*/
         /**Overwrites TextStyle kerning*/
         void setKerning(int kerning);
         void setKerning(int kerning);
-        /**Overwrites TextStyle scale2Size. deprecated, use setFontSize*/
-        OXYGINE_DEPRECATED
-        void setFontSize2Scale(int scale2size);
         /**Overwrites TextStyle fontSize*/
         /**Overwrites TextStyle fontSize*/
         void setFontSize(int size);
         void setFontSize(int size);
         /**Overwrites TextStyle color*/
         /**Overwrites TextStyle color*/

+ 3 - 7
oxygine/src/TextStyle.h

@@ -13,7 +13,6 @@ namespace oxygine
             HALIGN_DEFAULT,
             HALIGN_DEFAULT,
             HALIGN_LEFT,
             HALIGN_LEFT,
             HALIGN_MIDDLE,
             HALIGN_MIDDLE,
-            HALIGN_CENTER = HALIGN_MIDDLE,//HALIGN_CENTER deprecated
             HALIGN_RIGHT
             HALIGN_RIGHT
         };
         };
 
 
@@ -27,7 +26,7 @@ namespace oxygine
         };
         };
 
 
 
 
-        TextStyle(): font(0),
+        TextStyle(const ResFont* rs = 0): font(rs),
             hAlign(HALIGN_DEFAULT),
             hAlign(HALIGN_DEFAULT),
             vAlign(VALIGN_DEFAULT),
             vAlign(VALIGN_DEFAULT),
             linesOffset(0),
             linesOffset(0),
@@ -54,11 +53,8 @@ namespace oxygine
         Color color;
         Color color;
 
 
 
 
-        union
-        {
-            int fontSize;
-            int fontSize2Scale;//DEPRECATED, use fontSize
-        };
+
+        int fontSize;
 
 
 
 
         float outline;//works only with SD fonts, disabled by default = 0.0f, 0.5 - max outline
         float outline;//works only with SD fonts, disabled by default = 0.0f, 0.5 - max outline

+ 0 - 3
oxygine/src/Tween.h

@@ -132,9 +132,6 @@ namespace oxygine
         void setClient(Actor* client) { _client = client; }
         void setClient(Actor* client) { _client = client; }
         void setTwoSides(bool ts) { _twoSides = ts; }
         void setTwoSides(bool ts) { _twoSides = ts; }
 
 
-        /**delete actor from parent node when tween done. Deprecated, use detachWhenDone*/
-        OXYGINE_DEPRECATED
-        void setDetachActor(bool detach) { _detach = detach; }
         /**delete actor from parent node when tween done*/
         /**delete actor from parent node when tween done*/
         void detachWhenDone(bool detach = true) { _detach = detach; }
         void detachWhenDone(bool detach = true) { _detach = detach; }
 
 

+ 1 - 1
oxygine/src/core/oxygine.cpp

@@ -688,7 +688,7 @@ namespace oxygine
                         break;
                         break;
                     }
                     }
                     case SDL_MOUSEWHEEL:
                     case SDL_MOUSEWHEEL:
-                        input->sendPointerWheelEvent(getStageByWindow(event.window.windowID), Vector2(event.wheel.x, event.wheel.y), &input->_pointerMouse);
+                        input->sendPointerWheelEvent(getStageByWindow(event.window.windowID), Vector2((float)event.wheel.x, (float)event.wheel.y), &input->_pointerMouse);
                         break;
                         break;
                     case SDL_KEYDOWN:
                     case SDL_KEYDOWN:
                     {
                     {

+ 0 - 3
oxygine/src/core/oxygine.h

@@ -107,9 +107,6 @@ namespace oxygine
         ThreadDispatcher& getMainThreadDispatcher();
         ThreadDispatcher& getMainThreadDispatcher();
         ThreadDispatcher& getUiThreadMessages();
         ThreadDispatcher& getUiThreadMessages();
 
 
-        OXYGINE_DEPRECATED
-        inline ThreadDispatcher& getMainThreadMessages() {return getMainThreadDispatcher();}
-
         bool isActive();
         bool isActive();
         bool hasFocus();
         bool hasFocus();
 
 

+ 1 - 36
oxygine/src/math/Matrix.h

@@ -79,15 +79,6 @@ namespace oxygine
         static vector4& transformVec4(vector4& out, const vector4& in, const MatrixT& mat);
         static vector4& transformVec4(vector4& out, const vector4& in, const MatrixT& mat);
 
 
 
 
-        OXYGINE_DEPRECATED
-        void translation(const vector3&);
-        OXYGINE_DEPRECATED
-        void scaling(const vector3&);
-        OXYGINE_DEPRECATED
-        MatrixT getInverse()const;
-        OXYGINE_DEPRECATED
-        MatrixT getTranspose()const;
-
         union
         union
         {
         {
             struct
             struct
@@ -151,11 +142,7 @@ namespace oxygine
         inverse(this, *this);
         inverse(this, *this);
     }
     }
 
 
-    template <class T>
-    MatrixT<T> MatrixT<T>::getInverse() const
-    {
-        return inversed();
-    }
+
 
 
 
 
     template <class T>
     template <class T>
@@ -181,12 +168,6 @@ namespace oxygine
         transpose(*this, *this);
         transpose(*this, *this);
     }
     }
 
 
-    template <class T>
-    MatrixT<T> MatrixT<T>::getTranspose() const
-    {
-        return transposed();
-    }
-
 
 
     template <class T>
     template <class T>
     MatrixT<T> MatrixT<T>::transposed() const
     MatrixT<T> MatrixT<T>::transposed() const
@@ -196,13 +177,6 @@ namespace oxygine
         return m;
         return m;
     }
     }
 
 
-    template <class T>
-    void MatrixT<T>::translation(const vector3& t)
-    {
-        translate(t);
-    }
-
-
     template <class T>
     template <class T>
     void MatrixT<T>::translate(const vector3& t)
     void MatrixT<T>::translate(const vector3& t)
     {
     {
@@ -211,15 +185,6 @@ namespace oxygine
         *this = *this * tm;
         *this = *this * tm;
     }
     }
 
 
-    template <class T>
-    void MatrixT<T>::scaling(const vector3& s)
-    {
-        matrix sm;
-        matrix::scaling(sm, s);
-        *this = *this * sm;
-    }
-
-
     template <class T>
     template <class T>
     void MatrixT<T>::scale(const vector3& s)
     void MatrixT<T>::scale(const vector3& s)
     {
     {