From 4d7ec31abceeb1a9fec35935ab631a612760cf7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=AD=C2=ADn=20Lucas=20Golini?= Date: Sun, 19 Feb 2017 18:21:40 -0300 Subject: [PATCH] Fixed windows build. --HG-- branch : dev --- include/eepp/core/string.hpp | 2 +- include/eepp/gaming/maphelper.hpp | 16 ++++++------ include/eepp/graphics/subtexture.hpp | 2 +- include/eepp/graphics/textureatlas.hpp | 2 +- include/eepp/ui/uicontrol.hpp | 2 +- include/eepp/window/cursormanager.hpp | 4 +-- src/eepp/graphics/console.cpp | 2 +- src/eepp/system/sys.cpp | 6 ++--- src/eepp/ui/uicomplexcontrol.cpp | 2 +- src/eepp/ui/uicontrol.cpp | 2 +- src/eepp/ui/uicontrolanim.cpp | 8 +++--- src/eepp/ui/uigenericgrid.cpp | 6 ++--- src/eepp/ui/uilistbox.cpp | 6 ++--- src/eepp/ui/uimenusubmenu.cpp | 2 +- src/eepp/ui/uipushbutton.cpp | 20 +++++++------- src/eepp/ui/uitextinput.cpp | 2 +- .../window/backend/SDL2/cursormanagersdl2.cpp | 6 ++--- .../window/backend/SDL2/cursormanagersdl2.hpp | 2 +- .../window/backend/SFML/cursormanagersfml.cpp | 6 ++--- .../window/backend/SFML/cursormanagersfml.hpp | 2 +- .../window/backend/null/cursormanagernull.cpp | 2 +- .../window/backend/null/cursormanagernull.hpp | 2 +- src/eepp/window/cursormanager.cpp | 2 +- src/eepp/window/platform/win/cursorwin.cpp | 26 +++++++++---------- src/test/eetest.cpp | 22 ++++++++-------- 25 files changed, 77 insertions(+), 77 deletions(-) diff --git a/include/eepp/core/string.hpp b/include/eepp/core/string.hpp index 3eb87bd17..b79c9d132 100644 --- a/include/eepp/core/string.hpp +++ b/include/eepp/core/string.hpp @@ -63,7 +63,7 @@ class EE_API String { /** @return string hash */ static Uint32 hash( const std::string& str ); - /** @return string hash. Note: String::Hash( std::string( "text" ) ) is != to String::Hash( String( "text" ) ) */ + /** @return string hash. Note: String::hash( std::string( "text" ) ) is != to String::hash( String( "text" ) ) */ static Uint32 hash( const String& str ); /** @return If the value passed is a character */ diff --git a/include/eepp/gaming/maphelper.hpp b/include/eepp/gaming/maphelper.hpp index 05cf63b6e..287031443 100644 --- a/include/eepp/gaming/maphelper.hpp +++ b/include/eepp/gaming/maphelper.hpp @@ -91,14 +91,14 @@ class GObjFlags { }; enum EE_GAMEOBJECT_TYPE { - GAMEOBJECT_TYPE_BASE = 2088954976UL, //String::Hash( "Base" ) - GAMEOBJECT_TYPE_VIRTUAL = 3708695628UL, //String::Hash( "Virtual" ) - GAMEOBJECT_TYPE_SUBTEXTURE = 1772101792UL, //String::Hash( "SubTexture" ) - GAMEOBJECT_TYPE_SUBTEXTUREEX = 1378537981UL, //String::Hash( "SubTextureEx" ) - GAMEOBJECT_TYPE_SPRITE = 3517332124UL, //String::Hash( "Sprite" ) - GAMEOBJECT_TYPE_OBJECT = 3343895260UL, //String::Hash( "Object" ) - GAMEOBJECT_TYPE_POLYGON = 482716845UL, //String::Hash( "Polygon" ) - GAMEOBJECT_TYPE_POLYLINE = 3044927249UL //String::Hash( "Polyline" ) + GAMEOBJECT_TYPE_BASE = 2088954976UL, //String::hash( "Base" ) + GAMEOBJECT_TYPE_VIRTUAL = 3708695628UL, //String::hash( "Virtual" ) + GAMEOBJECT_TYPE_SUBTEXTURE = 1772101792UL, //String::hash( "SubTexture" ) + GAMEOBJECT_TYPE_SUBTEXTUREEX = 1378537981UL, //String::hash( "SubTextureEx" ) + GAMEOBJECT_TYPE_SPRITE = 3517332124UL, //String::hash( "Sprite" ) + GAMEOBJECT_TYPE_OBJECT = 3343895260UL, //String::hash( "Object" ) + GAMEOBJECT_TYPE_POLYGON = 482716845UL, //String::hash( "Polygon" ) + GAMEOBJECT_TYPE_POLYLINE = 3044927249UL //String::hash( "Polyline" ) }; enum EE_LAYER_TYPE { diff --git a/include/eepp/graphics/subtexture.hpp b/include/eepp/graphics/subtexture.hpp index bad11b87f..071f32ee2 100644 --- a/include/eepp/graphics/subtexture.hpp +++ b/include/eepp/graphics/subtexture.hpp @@ -45,7 +45,7 @@ class EE_API SubTexture { virtual ~SubTexture(); - /** @return The SubTexture Id. The Id is the String::Hash of the SubTexture name. */ + /** @return The SubTexture Id. The Id is the String::hash of the SubTexture name. */ const Uint32& getId() const; /** @return The SubTexture Name. */ diff --git a/include/eepp/graphics/textureatlas.hpp b/include/eepp/graphics/textureatlas.hpp index 6be09fbf1..ae59cf5c2 100644 --- a/include/eepp/graphics/textureatlas.hpp +++ b/include/eepp/graphics/textureatlas.hpp @@ -61,7 +61,7 @@ class EE_API TextureAtlas : public ResourceManager { /** Sets the texture atlas path. */ void setPath( const std::string& path ); - /** @return The texture atlas Id. The Id is the String::Hash of the texture atlas name. */ + /** @return The texture atlas Id. The Id is the String::hash of the texture atlas name. */ const Uint32& getId() const; /** @return The number of SubTextures inside the texture atlas. */ diff --git a/include/eepp/ui/uicontrol.hpp b/include/eepp/ui/uicontrol.hpp index a0074e0e8..f2102df49 100644 --- a/include/eepp/ui/uicontrol.hpp +++ b/include/eepp/ui/uicontrol.hpp @@ -377,7 +377,7 @@ class EE_API UIControl { void sendParentSizeChange( const Vector2i& SizeChange ); - Time elapsed(); + Time getElapsed(); Recti makePadding( bool PadLeft = true, bool PadRight = true, bool PadTop = true, bool PadBottom = true, bool SkipFlags = false ); diff --git a/include/eepp/window/cursormanager.hpp b/include/eepp/window/cursormanager.hpp index 06cc7dc80..4858c6e2d 100644 --- a/include/eepp/window/cursormanager.hpp +++ b/include/eepp/window/cursormanager.hpp @@ -103,10 +103,10 @@ class EE_API CursorManager { virtual void reload() = 0; /** Set to show/hide the cursor */ - virtual void visible( bool visible ) = 0; + virtual void setVisible( bool visible ) = 0; /** @return If the cursor is visible in the window */ - virtual bool visible(); + virtual bool getVisible(); /** @return A pointer to the curent cursor */ Cursor * getCurrent() const; diff --git a/src/eepp/graphics/console.cpp b/src/eepp/graphics/console.cpp index 78a7ccbc9..bd5e7e8aa 100755 --- a/src/eepp/graphics/console.cpp +++ b/src/eepp/graphics/console.cpp @@ -733,7 +733,7 @@ void Console::cmdShowCursor ( const std::vector < String >& params ) { bool Res = String::fromString( tInt, params[1] ); if ( Res && ( tInt == 0 || tInt == 1 ) ) { - mWindow->getCursorManager()->visible( 0 != tInt ); + mWindow->getCursorManager()->setVisible( 0 != tInt ); } else privPushText( "Valid parameters are 0 or 1." ); } else { diff --git a/src/eepp/system/sys.cpp b/src/eepp/system/sys.cpp index 47e5d1e8a..0f133ef08 100644 --- a/src/eepp/system/sys.cpp +++ b/src/eepp/system/sys.cpp @@ -501,9 +501,9 @@ static std::string sGetProcessPath() { size_t cb = sizeof(buf); sysctl(mib, 4, buf, &cb, NULL, 0); - return FileSystem::FileRemoveFileName( std::string( buf ) ); + return FileSystem::fileRemoveFileName( std::string( buf ) ); #elif EE_PLATFORM == EE_PLATFORM_SOLARIS - return FileRemoveFileName( std::string( getexecname() ) ); + return fileRemoveFileName( std::string( getexecname() ) ); #elif EE_PLATFORM == EE_PLATFORM_HAIKU image_info info; int32 cookie = 0; @@ -513,7 +513,7 @@ static std::string sGetProcessPath() { break; } - return FileSystem::FileRemoveFileName( std::string( info.name ) ); + return FileSystem::fileRemoveFileName( std::string( info.name ) ); #elif EE_PLATFORM == EE_PLATFORM_ANDROID if ( NULL != Window::Engine::instance() && NULL != Window::Engine::instance()->getCurrentWindow() ) return Window::Engine::instance()->getCurrentWindow()->getExternalStoragePath(); diff --git a/src/eepp/ui/uicomplexcontrol.cpp b/src/eepp/ui/uicomplexcontrol.cpp index 4838c383f..454cc57c3 100644 --- a/src/eepp/ui/uicomplexcontrol.cpp +++ b/src/eepp/ui/uicomplexcontrol.cpp @@ -55,7 +55,7 @@ void UIComplexControl::update() { mTooltip->show(); } else { if ( -1.f != mTooltip->getTooltipTime().asMilliseconds() ) { - mTooltip->addTooltipTime( UIManager::instance()->getElapsed() ); + mTooltip->addTooltipTime( getElapsed() ); } if ( mTooltip->getTooltipTime() >= UIThemeManager::instance()->getTooltipTimeToShow() ) { diff --git a/src/eepp/ui/uicontrol.cpp b/src/eepp/ui/uicontrol.cpp index 488899140..0e9197b36 100644 --- a/src/eepp/ui/uicontrol.cpp +++ b/src/eepp/ui/uicontrol.cpp @@ -895,7 +895,7 @@ void UIControl::updateCenter() { mCenter = Vector2f( mScreenPosf.x + (Float)mSize.getWidth() * 0.5f, mScreenPosf.y + (Float)mSize.getHeight() * 0.5f ); } -Time UIControl::elapsed() { +Time UIControl::getElapsed() { return UIManager::instance()->getElapsed(); } diff --git a/src/eepp/ui/uicontrolanim.cpp b/src/eepp/ui/uicontrolanim.cpp index 3d4d7d576..9fb3c13b2 100644 --- a/src/eepp/ui/uicontrolanim.cpp +++ b/src/eepp/ui/uicontrolanim.cpp @@ -188,7 +188,7 @@ void UIControlAnim::update() { UIDragable::update(); if ( NULL != mMoveAnim && mMoveAnim->isEnabled() ) { - mMoveAnim->update( elapsed() ); + mMoveAnim->update( getElapsed() ); setPosition( (int)mMoveAnim->getPos().x, (int)mMoveAnim->getPos().y ); if ( mMoveAnim->ended() ) @@ -196,7 +196,7 @@ void UIControlAnim::update() { } if ( NULL != mAlphaAnim && mAlphaAnim->isEnabled() ) { - mAlphaAnim->update( elapsed() ); + mAlphaAnim->update( getElapsed() ); setAlpha( mAlphaAnim->getRealPos() ); if ( mAlphaAnim->ended() ) { @@ -214,7 +214,7 @@ void UIControlAnim::update() { } if ( NULL != mScaleAnim && mScaleAnim->isEnabled() ) { - mScaleAnim->update( elapsed() ); + mScaleAnim->update( getElapsed() ); setScale( mScaleAnim->getPos() ); if ( mScaleAnim->ended() ) @@ -222,7 +222,7 @@ void UIControlAnim::update() { } if ( NULL != mAngleAnim && mAngleAnim->isEnabled() ) { - mAngleAnim->update( elapsed() ); + mAngleAnim->update( getElapsed() ); setRotation( mAngleAnim->getRealPos() ); if ( mAngleAnim->ended() ) diff --git a/src/eepp/ui/uigenericgrid.cpp b/src/eepp/ui/uigenericgrid.cpp index 6d7d4af0c..a45e1eae0 100644 --- a/src/eepp/ui/uigenericgrid.cpp +++ b/src/eepp/ui/uigenericgrid.cpp @@ -579,13 +579,13 @@ void UIGenericGrid::update() { mVScrollBar->setValue( mVScrollBar->getValue() + ( -diff.y / (Float)( ( mItems.size() - 1 ) * mRowHeight ) ) ); - mTouchDragAcceleration += elapsed().asMilliseconds() * diff.y * mTouchDragDeceleration; + mTouchDragAcceleration += getElapsed().asMilliseconds() * diff.y * mTouchDragDeceleration; mTouchDragPoint = Pos; UIManager::instance()->setControlDragging( true ); } else { - mTouchDragAcceleration -= elapsed().asMilliseconds() * mTouchDragAcceleration * 0.01f; + mTouchDragAcceleration -= getElapsed().asMilliseconds() * mTouchDragAcceleration * 0.01f; } } else { // Mouse Down @@ -608,7 +608,7 @@ void UIGenericGrid::update() { if ( mTouchDragAcceleration > 0.01f || mTouchDragAcceleration < -0.01f ) { mVScrollBar->setValue( mVScrollBar->getValue() + ( -mTouchDragAcceleration / (Float)( ( mItems.size() - 1 ) * mRowHeight ) ) ); - mTouchDragAcceleration -= mTouchDragAcceleration * mTouchDragDeceleration * elapsed().asMilliseconds(); + mTouchDragAcceleration -= mTouchDragAcceleration * mTouchDragDeceleration * getElapsed().asMilliseconds(); } } } diff --git a/src/eepp/ui/uilistbox.cpp b/src/eepp/ui/uilistbox.cpp index eb3bc59ca..43470dbb1 100644 --- a/src/eepp/ui/uilistbox.cpp +++ b/src/eepp/ui/uilistbox.cpp @@ -973,13 +973,13 @@ void UIListBox::update() { mVScrollBar->setValue( mVScrollBar->getValue() + ( -diff.y / (Float)( ( mItems.size() - 1 ) * mRowHeight ) ) ); - mTouchDragAcceleration += elapsed().asMilliseconds() * diff.y * mTouchDragDeceleration; + mTouchDragAcceleration += getElapsed().asMilliseconds() * diff.y * mTouchDragDeceleration; mTouchDragPoint = Pos; UIManager::instance()->setControlDragging( true ); } else { - mTouchDragAcceleration -= elapsed().asMilliseconds() * mTouchDragAcceleration * 0.01f; + mTouchDragAcceleration -= getElapsed().asMilliseconds() * mTouchDragAcceleration * 0.01f; } } else { // Mouse Down @@ -1002,7 +1002,7 @@ void UIListBox::update() { if ( mTouchDragAcceleration > 0.01f || mTouchDragAcceleration < -0.01f ) { mVScrollBar->setValue( mVScrollBar->getValue() + ( -mTouchDragAcceleration / (Float)( ( mItems.size() - 1 ) * mRowHeight ) ) ); - mTouchDragAcceleration -= mTouchDragAcceleration * mTouchDragDeceleration * elapsed().asMilliseconds(); + mTouchDragAcceleration -= mTouchDragAcceleration * mTouchDragDeceleration * getElapsed().asMilliseconds(); } } } diff --git a/src/eepp/ui/uimenusubmenu.cpp b/src/eepp/ui/uimenusubmenu.cpp index a814e06a2..7e0179c0c 100644 --- a/src/eepp/ui/uimenusubmenu.cpp +++ b/src/eepp/ui/uimenusubmenu.cpp @@ -88,7 +88,7 @@ Uint32 UIMenuSubMenu::onMouseMove( const Vector2i &Pos, const Uint32 Flags ) { UIMenuItem::onMouseMove( Pos, Flags ); if ( NULL != mSubMenu && !mSubMenu->isVisible() ) { - mTimeOver += UIManager::instance()->getElapsed().asMilliseconds(); + mTimeOver += getElapsed().asMilliseconds(); if ( mTimeOver >= mMaxTime ) { showSubMenu(); diff --git a/src/eepp/ui/uipushbutton.cpp b/src/eepp/ui/uipushbutton.cpp index 6e9d3b1fa..a76aa5ff3 100644 --- a/src/eepp/ui/uipushbutton.cpp +++ b/src/eepp/ui/uipushbutton.cpp @@ -98,24 +98,24 @@ void UIPushButton::onSizeChange() { /** if ( mFlags & UI_AUTO_SIZE ) { if ( NULL != mTextBox ) { - Recti P = MakePadding(); + Recti P = makePadding(); - mSize.Height( mIcon->size().height() + P.Top + P.Bottom ); + mSize.setHeight( mIcon->getSize().getHeight() + P.Top + P.Bottom ); - if ( 0 == mTextBox->Text().size() ) { - mSize.Width ( mIcon->size().width() + P.Left + P.Right ); + if ( 0 == mTextBox->getText().size() ) { + mSize.setWidth ( mIcon->getSize().getWidth() + P.Left + P.Right ); - mIcon->Center(); + mIcon->center(); } else { - mSize.Width( mIconSpace + mIcon->position(.x + mIcon->size().width() + mTextBox->size().width() ); + mSize.setWidth( mIconSpace + mIcon->setPosition(.x + mIcon->getSize().getWidth() + mTextBox->getSize().getWidth() ); - if ( mSize.Height() < P.Top + P.Bottom + mTextBox->GetTextHeight() ) - mSize.Height( P.Top + P.Bottom + mTextBox->GetTextHeight() ); + if ( mSize.getHeight() < P.Top + P.Bottom + mTextBox->getTextHeight() ) + mSize.setHeight( P.Top + P.Bottom + mTextBox->getTextHeight() ); } } } else { - if ( NULL != mTextBox && 0 == mTextBox->Text().size() ) { - mIcon->Center(); + if ( NULL != mTextBox && 0 == mTextBox->getText().size() ) { + mIcon->center(); } } */ diff --git a/src/eepp/ui/uitextinput.cpp b/src/eepp/ui/uitextinput.cpp index 4a01f0718..fc1eb178d 100644 --- a/src/eepp/ui/uitextinput.cpp +++ b/src/eepp/ui/uitextinput.cpp @@ -75,7 +75,7 @@ void UITextInput::onCursorPosChange() { void UITextInput::drawWaitingCursor() { if ( mVisible && mTextBuffer.isActive() && mTextBuffer.isFreeEditingEnabled() ) { - mWaitCursorTime += UIManager::instance()->getElapsed().asMilliseconds(); + mWaitCursorTime += getElapsed().asMilliseconds(); if ( mShowingWait ) { bool disableSmooth = mShowingWait && GLi->isLineSmooth(); diff --git a/src/eepp/window/backend/SDL2/cursormanagersdl2.cpp b/src/eepp/window/backend/SDL2/cursormanagersdl2.cpp index 6038dedda..7dba18f38 100644 --- a/src/eepp/window/backend/SDL2/cursormanagersdl2.cpp +++ b/src/eepp/window/backend/SDL2/cursormanagersdl2.cpp @@ -54,14 +54,14 @@ void CursorManagerSDL::set( EE_SYSTEM_CURSOR syscurid ) { } void CursorManagerSDL::show() { - visible( true ); + setVisible( true ); } void CursorManagerSDL::hide() { - visible( false ); + setVisible( false ); } -void CursorManagerSDL::visible( bool visible ) { +void CursorManagerSDL::setVisible( bool visible ) { if ( visible ) { SDL_ShowCursor( SDL_ENABLE ); mVisible = true; diff --git a/src/eepp/window/backend/SDL2/cursormanagersdl2.hpp b/src/eepp/window/backend/SDL2/cursormanagersdl2.hpp index 8af3556ac..452fa2efc 100644 --- a/src/eepp/window/backend/SDL2/cursormanagersdl2.hpp +++ b/src/eepp/window/backend/SDL2/cursormanagersdl2.hpp @@ -28,7 +28,7 @@ class CursorManagerSDL : public CursorManager { void hide(); - void visible( bool visible ); + void setVisible( bool visible ); void remove( Cursor * cursor, bool Delete = false ); diff --git a/src/eepp/window/backend/SFML/cursormanagersfml.cpp b/src/eepp/window/backend/SFML/cursormanagersfml.cpp index 39eab4a8f..ea0dc3209 100644 --- a/src/eepp/window/backend/SFML/cursormanagersfml.cpp +++ b/src/eepp/window/backend/SFML/cursormanagersfml.cpp @@ -50,14 +50,14 @@ void CursorManagerSFML::set( EE_SYSTEM_CURSOR syscurid ) { } void CursorManagerSFML::show() { - visible( true ); + setVisible( true ); } void CursorManagerSFML::hide() { - visible( false ); + setVisible( false ); } -void CursorManagerSFML::visible( bool visible ) { +void CursorManagerSFML::setVisible( bool visible ) { if ( visible ) { reinterpret_cast(mWindow)->getSFMLWindow()->setMouseCursorVisible( true ); diff --git a/src/eepp/window/backend/SFML/cursormanagersfml.hpp b/src/eepp/window/backend/SFML/cursormanagersfml.hpp index a154d4a95..0ed3af994 100644 --- a/src/eepp/window/backend/SFML/cursormanagersfml.hpp +++ b/src/eepp/window/backend/SFML/cursormanagersfml.hpp @@ -27,7 +27,7 @@ class CursorManagerSFML : public CursorManager { void hide(); - void visible( bool visible ); + void setVisible( bool visible ); void remove( Cursor * cursor, bool Delete = false ); diff --git a/src/eepp/window/backend/null/cursormanagernull.cpp b/src/eepp/window/backend/null/cursormanagernull.cpp index 4ad9ca8b2..972aa6943 100644 --- a/src/eepp/window/backend/null/cursormanagernull.cpp +++ b/src/eepp/window/backend/null/cursormanagernull.cpp @@ -32,7 +32,7 @@ void CursorManagerNull::show() { void CursorManagerNull::hide() { } -void CursorManagerNull::visible( bool visible ) { +void CursorManagerNull::setVisible( bool visible ) { } void CursorManagerNull::remove( Cursor * cursor, bool Delete ) { diff --git a/src/eepp/window/backend/null/cursormanagernull.hpp b/src/eepp/window/backend/null/cursormanagernull.hpp index b987d6b66..2b138f032 100644 --- a/src/eepp/window/backend/null/cursormanagernull.hpp +++ b/src/eepp/window/backend/null/cursormanagernull.hpp @@ -25,7 +25,7 @@ class CursorManagerNull : public CursorManager { void hide(); - void visible( bool visible ); + void setVisible( bool visible ); void remove( Cursor * cursor, bool Delete = false ); diff --git a/src/eepp/window/cursormanager.cpp b/src/eepp/window/cursormanager.cpp index 1ea7ea4fb..33fbe359f 100644 --- a/src/eepp/window/cursormanager.cpp +++ b/src/eepp/window/cursormanager.cpp @@ -98,7 +98,7 @@ void CursorManager::set( EE_CURSOR_TYPE cursor ) { } } -bool CursorManager::visible() { +bool CursorManager::getVisible() { return mVisible; } diff --git a/src/eepp/window/platform/win/cursorwin.cpp b/src/eepp/window/platform/win/cursorwin.cpp index 1d86c1ca6..f1ed9a4d1 100644 --- a/src/eepp/window/platform/win/cursorwin.cpp +++ b/src/eepp/window/platform/win/cursorwin.cpp @@ -48,8 +48,8 @@ static BITMAPINFO *get_bitmap_info( Image * bitmap ) { bi->bmiHeader.biSize = sizeof(BITMAPINFOHEADER); bi->bmiHeader.biBitCount = 32; bi->bmiHeader.biPlanes = 1; - bi->bmiHeader.biWidth = (int)bitmap->Width(); - bi->bmiHeader.biHeight = -((int)bitmap->Height()); + bi->bmiHeader.biWidth = (int)bitmap->getWidth(); + bi->bmiHeader.biHeight = -((int)bitmap->getHeight()); bi->bmiHeader.biClrUsed = 256; bi->bmiHeader.biCompression = BI_RGB; @@ -70,8 +70,8 @@ static BYTE *get_dib_from_bitmap_32(Image *bitmap) { BYTE *pixels; BYTE *dst; - w = (int)bitmap->Width(); - h = (int)bitmap->Height(); + w = (int)bitmap->getWidth(); + h = (int)bitmap->getHeight(); pitch = w * 4; pixels = (BYTE *) eeMalloc(h * pitch); @@ -82,7 +82,7 @@ static BYTE *get_dib_from_bitmap_32(Image *bitmap) { dst = pixels + y * pitch; for (x = 0; x < w; x++) { - ColorA C = bitmap->GetPixel( x, y ); + ColorA C = bitmap->getPixel( x, y ); /* BGR */ dst[0] = C.b(); @@ -98,7 +98,7 @@ static BYTE *get_dib_from_bitmap_32(Image *bitmap) { } static void local_stretch_blit_to_hdc( Image *bitmap, HDC dc, int src_x, int src_y, int src_w, int src_h, int dest_x, int dest_y, int dest_w, int dest_h) { - const int bitmap_h = (const int)bitmap->Height(); + const int bitmap_h = (const int)bitmap->getHeight(); const int bottom_up_src_y = bitmap_h - src_y - src_h; BYTE *pixels; BITMAPINFO *bi; @@ -123,13 +123,13 @@ static void local_stretch_blit_to_hdc( Image *bitmap, HDC dc, int src_x, int src } static void local_draw_to_hdc( HDC dc, Image * bitmap, int x, int y ) { - int w = bitmap->Width(); - int h = bitmap->Height(); + int w = bitmap->getWidth(); + int h = bitmap->getHeight(); local_stretch_blit_to_hdc(bitmap, dc, 0, 0, w, h, x, y, w, h); } void CursorWin::create() { - if ( NULL == mImage && mImage->MemSize() ) + if ( NULL == mImage && mImage->getMemSize() ) return; int x, y; @@ -148,7 +148,7 @@ void CursorWin::create() { sys_sm_cx = GetSystemMetrics(SM_CXCURSOR); sys_sm_cy = GetSystemMetrics(SM_CYCURSOR); - if ( ( (int)mImage->Width() > sys_sm_cx ) || ( (int)mImage->Height() > sys_sm_cy ) ) { + if ( ( (int)mImage->getWidth() > sys_sm_cx ) || ( (int)mImage->getHeight() > sys_sm_cy ) ) { return; } @@ -174,9 +174,9 @@ void CursorWin::create() { local_draw_to_hdc( h_xor_dc, mImage, 0, 0 ); /* Make cursor background transparent */ - for (y = 0; y < (int)mImage->Height(); y++) { - for (x = 0; x < (int)mImage->Width(); x++) { - ColorA C = mImage->GetPixel( x, y ); + for (y = 0; y < (int)mImage->getHeight(); y++) { + for (x = 0; x < (int)mImage->getWidth(); x++) { + ColorA C = mImage->getPixel( x, y ); if ( C.a() != 0 ) { /* Don't touch XOR value */ diff --git a/src/test/eetest.cpp b/src/test/eetest.cpp index 8ff50f3a1..15ab9911a 100644 --- a/src/test/eetest.cpp +++ b/src/test/eetest.cpp @@ -558,17 +558,17 @@ void EETest::createUI() { #ifdef EE_PLATFORM_TOUCH TextureAtlas * SG = GlobalTextureAtlas::instance(); - Texture * butTex = TF->getTexture( TF->Load( MyPath + "sprites/button-te_normal.png" ) ); + Texture * butTex = TF->getTexture( TF->load( MyPath + "sprites/button-te_normal.png" ) ); - SG->Add( butTex->Id(), "button-te_normal" ); - SG->Add( TF->Load( MyPath + "sprites/button-te_mdown.png" ), "button-te_mdown" ); + SG->Add( butTex->getId(), "button-te_normal" ); + SG->Add( TF->load( MyPath + "sprites/button-te_mdown.png" ), "button-te_mdown" ); UISkinSimple nSkin( "button-te" ); - mShowMenu = mTheme->CreatePushButton( NULL, butTex->size(), Vector2i( mWindow->GetWidth() - butTex->Width() - 20, mWindow->GetHeight() - butTex->Height() - 10 ), UI_CONTROL_ALIGN_CENTER | UI_ANCHOR_RIGHT | UI_ANCHOR_BOTTOM ); - mShowMenu->SetSkin( nSkin ); - mShowMenu->Text( "Show Menu" ); - mShowMenu->AddEventListener( UIEvent::EventMouseClick, cb::Make1( this, &EETest::OnShowMenu ) ); + mShowMenu = mTheme->createPushButton( NULL, butTex->getSize(), Vector2i( mWindow->getWidth() - butTex->getWidth() - 20, mWindow->getHeight() - butTex->getHeight() - 10 ), UI_CONTROL_ALIGN_CENTER | UI_ANCHOR_RIGHT | UI_ANCHOR_BOTTOM ); + mShowMenu->setSkin( nSkin ); + mShowMenu->setText( "Show Menu" ); + mShowMenu->addEventListener( UIEvent::EventMouseClick, cb::Make1( this, &EETest::OnShowMenu ) ); #endif C = reinterpret_cast ( C->getParent() ); @@ -861,7 +861,7 @@ void EETest::loadTextures() { #ifdef EE_GLES Image tImg( MyPath + "sprites/objects/2.png", 4 ); tImg.CreateMaskFromColor( ColorA(0,0,0,255), 0 ); - Tiles[7] = SG->Add( TF->loadFromPixels( tImg.GetPixelsPtr(), tImg.Width(), tImg.Height(), tImg.Channels() ), "8" ); + Tiles[7] = SG->Add( TF->loadFromPixels( tImg.getPixelsPtr(), tImg.getWidth(), tImg.getHeight(), tImg.getChannels() ), "8" ); #else Tiles[7] = SG->add( TF->load( MyPath + "sprites/objects/2.png" ), "8" ); Tiles[7]->getTexture()->createMaskFromColor( ColorA(0,0,0,255), 0 ); @@ -907,8 +907,8 @@ void EETest::loadTextures() { CursorP[0] = TF->getTexture( Cursor[0] ); CursorManager * CurMan = mWindow->getCursorManager(); - CurMan->visible( false ); - CurMan->visible( true ); + CurMan->setVisible( false ); + CurMan->setVisible( true ); CurMan->set( EE::Window::SYS_CURSOR_HAND ); CurMan->setGlobalCursor( EE_CURSOR_ARROW, CurMan->add( CurMan->create( CursorP[0], Vector2i( 1, 1 ), "cursor_special" ) ) ); CurMan->set( EE_CURSOR_ARROW ); @@ -1835,7 +1835,7 @@ void EETest::physicsUpdate() { InputFinger * Finger = KM->GetFingerIndex(i); mMousePoint[i] = cVectNew( Finger->x, Finger->y ); cVect newPoint = tovect( cpvlerp( tocpv( mMousePoint_last[i] ), tocpv( mMousePoint[i] ), 0.25 ) ); - mMouseBody[i]->Pos( newPoint ); + mMouseBody[i]->setPosition( newPoint ); mMouseBody[i]->Vel( ( newPoint - mMousePoint_last[i] ) * (cpFloat)mWindow->FPS() ); mMousePoint_last[i] = newPoint;