From 1b83929487f797b0b0960b89fb5cbdc8c216ba96 Mon Sep 17 00:00:00 2001 From: Piotr Dziwinski Date: Thu, 28 Jun 2012 22:54:53 +0200 Subject: Pulled changes from master branch --- src/object/robotmain.cpp | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) (limited to 'src/object/robotmain.cpp') diff --git a/src/object/robotmain.cpp b/src/object/robotmain.cpp index 1929f6d..1b213f2 100644 --- a/src/object/robotmain.cpp +++ b/src/object/robotmain.cpp @@ -283,22 +283,22 @@ CRobotMain::CRobotMain(CInstanceManager* iMan) m_windowPos = Math::Point(0.15f, 0.17f); m_windowDim = Math::Point(0.70f, 0.66f); - if ( GetProfileFloat("Edit", "FontSize", fValue) ) m_fontSize = fValue; - if ( GetProfileFloat("Edit", "WindowPos.x", fValue) ) m_windowPos.x = fValue; - if ( GetProfileFloat("Edit", "WindowPos.y", fValue) ) m_windowPos.y = fValue; - if ( GetProfileFloat("Edit", "WindowDim.x", fValue) ) m_windowDim.x = fValue; - if ( GetProfileFloat("Edit", "WindowDim.y", fValue) ) m_windowDim.y = fValue; + if ( GetLocalProfileFloat("Edit", "FontSize", fValue) ) m_fontSize = fValue; + if ( GetLocalProfileFloat("Edit", "WindowPos.x", fValue) ) m_windowPos.x = fValue; + if ( GetLocalProfileFloat("Edit", "WindowPos.y", fValue) ) m_windowPos.y = fValue; + if ( GetLocalProfileFloat("Edit", "WindowDim.x", fValue) ) m_windowDim.x = fValue; + if ( GetLocalProfileFloat("Edit", "WindowDim.y", fValue) ) m_windowDim.y = fValue; m_IOPublic = false; m_IODim = Math::Point(320.0f/640.0f, (121.0f+18.0f*8)/480.0f); m_IOPos.x = (1.0f-m_IODim.x)/2.0f; // in the middle m_IOPos.y = (1.0f-m_IODim.y)/2.0f; - if ( GetProfileInt ("Edit", "IOPublic", iValue) ) m_IOPublic = iValue; - if ( GetProfileFloat("Edit", "IOPos.x", fValue) ) m_IOPos.x = fValue; - if ( GetProfileFloat("Edit", "IOPos.y", fValue) ) m_IOPos.y = fValue; - if ( GetProfileFloat("Edit", "IODim.x", fValue) ) m_IODim.x = fValue; - if ( GetProfileFloat("Edit", "IODim.y", fValue) ) m_IODim.y = fValue; + if ( GetLocalProfileInt ("Edit", "IOPublic", iValue) ) m_IOPublic = iValue; + if ( GetLocalProfileFloat("Edit", "IOPos.x", fValue) ) m_IOPos.x = fValue; + if ( GetLocalProfileFloat("Edit", "IOPos.y", fValue) ) m_IOPos.y = fValue; + if ( GetLocalProfileFloat("Edit", "IODim.x", fValue) ) m_IODim.x = fValue; + if ( GetLocalProfileFloat("Edit", "IODim.y", fValue) ) m_IODim.y = fValue; m_short->FlushShortcuts(); InitEye(); @@ -315,7 +315,7 @@ CRobotMain::CRobotMain(CInstanceManager* iMan) g_unit = 4.0f; m_gamerName[0] = 0; - GetProfileString("Gamer", "LastName", m_gamerName, 100); + GetLocalProfileString("Gamer", "LastName", m_gamerName, 100); SetGlobalGamerName(m_gamerName); ReadFreeParam(); m_dialog->SetupRecall(); @@ -430,7 +430,7 @@ void CRobotMain::CreateIni() int iValue; // colobot.ini don't exist? - if ( !GetProfileInt("Setup", "TotoMode", iValue) ) + if ( !GetLocalProfileInt("Setup", "TotoMode", iValue) ) { m_dialog->SetupMemorize(); } @@ -1801,7 +1801,7 @@ float CRobotMain::RetGameTime() void CRobotMain::SetFontSize(float size) { m_fontSize = size; - SetProfileFloat("Edit", "FontSize", m_fontSize); + SetLocalProfileFloat("Edit", "FontSize", m_fontSize); } float CRobotMain::RetFontSize() @@ -1814,8 +1814,8 @@ float CRobotMain::RetFontSize() void CRobotMain::SetWindowPos(Math::Point pos) { m_windowPos = pos; - SetProfileFloat("Edit", "WindowPos.x", m_windowPos.x); - SetProfileFloat("Edit", "WindowPos.y", m_windowPos.y); + SetLocalProfileFloat("Edit", "WindowPos.x", m_windowPos.x); + SetLocalProfileFloat("Edit", "WindowPos.y", m_windowPos.y); } Math::Point CRobotMain::RetWindowPos() @@ -1826,8 +1826,8 @@ Math::Point CRobotMain::RetWindowPos() void CRobotMain::SetWindowDim(Math::Point dim) { m_windowDim = dim; - SetProfileFloat("Edit", "WindowDim.x", m_windowDim.x); - SetProfileFloat("Edit", "WindowDim.y", m_windowDim.y); + SetLocalProfileFloat("Edit", "WindowDim.x", m_windowDim.x); + SetLocalProfileFloat("Edit", "WindowDim.y", m_windowDim.y); } Math::Point CRobotMain::RetWindowDim() @@ -1841,7 +1841,7 @@ Math::Point CRobotMain::RetWindowDim() void CRobotMain::SetIOPublic(bool bMode) { m_IOPublic = bMode; - SetProfileInt("Edit", "IOPublic", m_IOPublic); + SetLocalProfileInt("Edit", "IOPublic", m_IOPublic); } bool CRobotMain::RetIOPublic() @@ -1852,8 +1852,8 @@ bool CRobotMain::RetIOPublic() void CRobotMain::SetIOPos(Math::Point pos) { m_IOPos = pos; - SetProfileFloat("Edit", "IOPos.x", m_IOPos.x); - SetProfileFloat("Edit", "IOPos.y", m_IOPos.y); + SetLocalProfileFloat("Edit", "IOPos.x", m_IOPos.x); + SetLocalProfileFloat("Edit", "IOPos.y", m_IOPos.y); } Math::Point CRobotMain::RetIOPos() @@ -1864,8 +1864,8 @@ Math::Point CRobotMain::RetIOPos() void CRobotMain::SetIODim(Math::Point dim) { m_IODim = dim; - SetProfileFloat("Edit", "IODim.x", m_IODim.x); - SetProfileFloat("Edit", "IODim.y", m_IODim.y); + SetLocalProfileFloat("Edit", "IODim.x", m_IODim.x); + SetLocalProfileFloat("Edit", "IODim.y", m_IODim.y); } Math::Point CRobotMain::RetIODim() -- cgit v1.2.3-1-g7c22