diff --git a/include/eepp/graphics/textureatlas.hpp b/include/eepp/graphics/textureatlas.hpp index 6e6e69131..0076fb06a 100644 --- a/include/eepp/graphics/textureatlas.hpp +++ b/include/eepp/graphics/textureatlas.hpp @@ -65,7 +65,7 @@ class EE_API TextureAtlas : public ResourceManager { const Uint32& getId() const; /** @return The number of SubTextures inside the texture atlas. */ - Uint32 count(); + Uint32 getCount(); /** @return The texture that corresponds to the texture atlas. * @param texnum The texture index. A texture atlas can use more than one texture, so it can be 0 to GetTexturesLoadedCount(). Usually a texture atlas corresponds to only one texture, so the texture index is 0. diff --git a/include/eepp/system/clock.hpp b/include/eepp/system/clock.hpp index 356140df6..35ba44ff1 100644 --- a/include/eepp/system/clock.hpp +++ b/include/eepp/system/clock.hpp @@ -24,7 +24,7 @@ class EE_API Clock { /** Time in time elapsed between this call and the last call to Elapsed() * This is the equivalent to call GetElapsedTime() and then Restart(). */ - Time elapsed(); + Time getElapsed(); private: Platform::ClockImpl * mClockImpl; }; diff --git a/include/eepp/system/log.hpp b/include/eepp/system/log.hpp index 070dcc4a4..7c9931d5b 100755 --- a/include/eepp/system/log.hpp +++ b/include/eepp/system/log.hpp @@ -36,19 +36,19 @@ class EE_API Log : protected Mutex { void writef( const char* format, ... ); /** @returns A copy of the current writed log. */ - std::string buffer() const; + std::string getBuffer() const; /** @returns If the log Writes are outputed to the terminal. */ - const bool& consoleOutput() const; + const bool& isConsoleOutput() const; /** @brief Enabled or disables to output the Writes to the terminal. */ - void consoleOutput( const bool& output ); + void setConsoleOutput( const bool& output ); /** @returns If the file is forced to flush the data on every Write call. */ - const bool& liveWrite() const; + const bool& isLiveWrite() const; /** @brief Activate or deactivate to flush the writed data to the log on every Write call. */ - void liveWrite( const bool& lw ); + void setLiveWrite( const bool& lw ); /** @brief Adds a reader interface. ** The reader interface is used to the informed for every writed text to the log. @@ -62,13 +62,13 @@ class EE_API Log : protected Mutex { protected: Log(); - std::string mData; - std::string mFilePath; - bool mSave; - bool mConsoleOutput; - bool mLiveWrite; - IOStreamFile * mFS; - std::list mReaders; + std::string mData; + std::string mFilePath; + bool mSave; + bool mConsoleOutput; + bool mLiveWrite; + IOStreamFile * mFS; + std::list mReaders; void openFS(); diff --git a/include/eepp/system/objectloader.hpp b/include/eepp/system/objectloader.hpp index a06fc1c93..8010715fa 100644 --- a/include/eepp/system/objectloader.hpp +++ b/include/eepp/system/objectloader.hpp @@ -52,11 +52,11 @@ class EE_API ObjectLoader : protected Thread { virtual bool isLoading(); /** @returns If the loader is asynchronous */ - bool threaded() const; + bool isThreaded() const; /** @brief Sets if the loader is asynchronous. ** This must be called before the load starts. */ - void threaded( const bool& threaded ); + void setThreaded( const bool& setThreaded ); /** @return The object loader type */ const Uint32& type() const; diff --git a/include/eepp/system/packmanager.hpp b/include/eepp/system/packmanager.hpp index 64f453640..8a6dcc5ff 100644 --- a/include/eepp/system/packmanager.hpp +++ b/include/eepp/system/packmanager.hpp @@ -26,7 +26,7 @@ class EE_API PackManager : public Container { Pack * getPackByPath( std::string path ); /** @returns If the packs opened are being used as a fallback in case of a file wasn't found in the file system path. */ - const bool& fallbackToPacks() const; + const bool& isFallbackToPacksActive() const; /** @brief Sets if the files that failed to be loaded from the file system should try to be loaded from the currently open packs. ** For example if you try to load a texture from the file system a fails it will search the same path in the opened packs, and load it from there. @@ -34,7 +34,7 @@ class EE_API PackManager : public Container { ** If the file is not in the file system, it will be searched in the opened packs, and loaded if is found. ** In case that the process path is appended to the path... like Sys::GetProcessPath() + "mytexture.png", the process path will be removed from the file path. */ - void fallbackToPacks( const bool& fallback ); + void setFallbackToPacks( const bool& fallback ); protected: bool mFallback; diff --git a/include/eepp/system/resourceloader.hpp b/include/eepp/system/resourceloader.hpp index 7902c1f3b..af0988eaf 100644 --- a/include/eepp/system/resourceloader.hpp +++ b/include/eepp/system/resourceloader.hpp @@ -45,21 +45,21 @@ class EE_API ResourceLoader { virtual bool isLoading(); /** @returns If the resource loader is asynchronous */ - bool threaded() const; + bool isThreaded() const; /** @brief Sets if the resource loader is asynchronous. ** This must be called before the load starts. */ - void threaded( const bool& threaded ); + void setThreaded( const bool& setThreaded ); /** @brief Clears the resources added to load that werent loaded, and delete the instances of the loaders. ** @param ClearObjectsLoaded Sets if the objects loader that were already loaded must be also deleted ( it will not unload the loaded resources, but the instance of the object loader ). */ bool clear( const bool& ClearObjectsLoaded = true ); /** @return The aproximate percent of progress ( between 0 and 100 ) */ - Float progress(); + Float getProgress(); /** @returns The number of resources added to load. */ - Uint32 count() const; + Uint32 getCount() const; protected: bool mLoaded; bool mLoading; diff --git a/include/eepp/system/resourcemanager.hpp b/include/eepp/system/resourcemanager.hpp index 023ed5477..4d5bbee86 100644 --- a/include/eepp/system/resourcemanager.hpp +++ b/include/eepp/system/resourcemanager.hpp @@ -41,13 +41,13 @@ class ResourceManager { T * getById( const Uint32& Id ); /** @returns The number of resources added */ - Uint32 count(); + Uint32 getCount(); /** @returns The number of resources that where added with the indicated name. */ - Uint32 count( const std::string& Name ); + Uint32 setCount( const std::string& Name ); /** @returns The number of resources that where added with the indicated id. */ - Uint32 count( const Uint32& Id ); + Uint32 setCount( const Uint32& Id ); /** @returns If the resource name exists in the resources list. */ bool exists( const std::string& Name ); @@ -113,7 +113,7 @@ template T * ResourceManager::add( T * Resource ) { if ( NULL != Resource ) { if ( mUniqueId ) { - Uint32 c = count( Resource->getId() ); + Uint32 c = setCount( Resource->getId() ); if ( 0 == c ) { mResources.push_back( Resource ); @@ -122,7 +122,7 @@ T * ResourceManager::add( T * Resource ) { } else { std::string RealName( Resource->getName() ); - while ( count( Resource->getId() ) ) { + while ( setCount( Resource->getId() ) ) { c++; Resource->setName( RealName + String::toStr( c ) ); } @@ -214,12 +214,12 @@ void ResourceManager::printNames() { } template -Uint32 ResourceManager::count() { +Uint32 ResourceManager::getCount() { return (Uint32)mResources.size(); } template -Uint32 ResourceManager::count( const Uint32& Id ) { +Uint32 ResourceManager::setCount( const Uint32& Id ) { typename std::list::iterator it; Uint32 Count = 0; @@ -231,8 +231,8 @@ Uint32 ResourceManager::count( const Uint32& Id ) { } template -Uint32 ResourceManager::count( const std::string& Name ) { - return count( String::hash( Name ) ); +Uint32 ResourceManager::setCount( const std::string& Name ) { + return setCount( String::hash( Name ) ); } }} diff --git a/include/eepp/system/threadlocal.hpp b/include/eepp/system/threadlocal.hpp index d6237a91f..fbc7c6254 100644 --- a/include/eepp/system/threadlocal.hpp +++ b/include/eepp/system/threadlocal.hpp @@ -21,11 +21,11 @@ class EE_API ThreadLocal : NonCopyable { /** @brief Set the thread-specific value of the variable ** @param value Value of the variable for the current thread */ - void value(void* value); + void setValue(void* setValue); /** @brief Retrieve the thread-specific value of the variable ** @return Value of the variable for the current thread */ - void* value() const; + void* getValue() const; private : Private::ThreadLocalImpl* mImpl; ///< Pointer to the OS specific implementation }; diff --git a/include/eepp/system/threadlocalptr.hpp b/include/eepp/system/threadlocalptr.hpp index 179ded309..69577105c 100644 --- a/include/eepp/system/threadlocalptr.hpp +++ b/include/eepp/system/threadlocalptr.hpp @@ -33,7 +33,7 @@ class ThreadLocalPtr : private ThreadLocal /** @brief Assignment operator for a raw pointer parameter ** @param value Pointer to assign ** @return Reference to self */ - ThreadLocalPtr& operator =(T* value); + ThreadLocalPtr& operator =(T* setValue); /** @brief Assignment operator for a ThreadLocalPtr parameter ** @param right ThreadLocalPtr to assign @@ -49,28 +49,28 @@ ThreadLocalPtr::ThreadLocalPtr(T* value) : template T& ThreadLocalPtr::operator *() const { - return *static_cast(value()); + return *static_cast(getValue()); } template T* ThreadLocalPtr::operator ->() const { - return static_cast(value()); + return static_cast(getValue()); } template ThreadLocalPtr::operator T*() const { - return static_cast(value()); + return static_cast(getValue()); } template ThreadLocalPtr& ThreadLocalPtr::operator =(T* val) { - value(val); + setValue(val); return *this; } template ThreadLocalPtr& ThreadLocalPtr::operator =(const ThreadLocalPtr& right) { - value(right.value()); + setValue(right.getValue()); return *this; } diff --git a/src/eepp/audio/music.cpp b/src/eepp/audio/music.cpp index 47036d68e..f725ecdab 100755 --- a/src/eepp/audio/music.cpp +++ b/src/eepp/audio/music.cpp @@ -25,7 +25,7 @@ bool Music::openFromPack( Pack* Pack, const std::string& FilePackPath ) { bool Music::openFromFile( const std::string& Filename ) { if ( !FileSystem::fileExists( Filename ) ) { - if ( PackManager::instance()->fallbackToPacks() ) { + if ( PackManager::instance()->isFallbackToPacksActive() ) { std::string tPath( Filename ); Pack * tPack = PackManager::instance()->exists( tPath ); diff --git a/src/eepp/audio/soundbuffer.cpp b/src/eepp/audio/soundbuffer.cpp index d18316acf..bca1cfd49 100755 --- a/src/eepp/audio/soundbuffer.cpp +++ b/src/eepp/audio/soundbuffer.cpp @@ -39,7 +39,7 @@ SoundBuffer::~SoundBuffer() { bool SoundBuffer::loadFromFile(const std::string& Filename) { if ( !FileSystem::fileExists( Filename ) ) { - if ( PackManager::instance()->fallbackToPacks() ) { + if ( PackManager::instance()->isFallbackToPacksActive() ) { std::string tPath( Filename ); Pack * tPack = PackManager::instance()->exists( tPath ); diff --git a/src/eepp/core/debug.cpp b/src/eepp/core/debug.cpp index 52febfc70..3834e7bb8 100644 --- a/src/eepp/core/debug.cpp +++ b/src/eepp/core/debug.cpp @@ -31,7 +31,7 @@ void eeREPORT_ASSERT( const char * File, int Line, const char * Exp ) { if ( PrintDebugInLog ) { Log::instance()->writef( "ASSERT: %s file:%s line:%d", Exp, File, Line ); - if ( !Log::instance()->consoleOutput() ) + if ( !Log::instance()->isConsoleOutput() ) printf( "ASSERT: %s file:%s line:%d", Exp, File, Line ); } else { printf( "ASSERT: %s file:%s line:%d", Exp, File, Line ); @@ -57,7 +57,7 @@ static void print_buffer( std::string& buf, bool newLine ) { #ifdef EE_COMPILER_MSVC OutputDebugStringA( buf.c_str() ); #else - if ( PrintDebugInLog && Log::instance()->consoleOutput() ) { + if ( PrintDebugInLog && Log::instance()->isConsoleOutput() ) { Log::instance()->write( buf, false ); return; } else { diff --git a/src/eepp/gaming/tilemap.cpp b/src/eepp/gaming/tilemap.cpp index 79c4c239f..79aec18ba 100644 --- a/src/eepp/gaming/tilemap.cpp +++ b/src/eepp/gaming/tilemap.cpp @@ -1045,7 +1045,7 @@ bool TileMap::Load( const std::string& path ) { IOStreamFile IOS( mPath, std::ios::in | std::ios::binary ); return LoadFromStream( IOS ); - } else if ( PackManager::instance()->fallbackToPacks() ) { + } else if ( PackManager::instance()->isFallbackToPacksActive() ) { std::string tPath( path ); Pack * tPack = PackManager::instance()->exists( tPath ) ; diff --git a/src/eepp/graphics/console.cpp b/src/eepp/graphics/console.cpp index bea54f059..9732e09f0 100755 --- a/src/eepp/graphics/console.cpp +++ b/src/eepp/graphics/console.cpp @@ -757,7 +757,7 @@ void Console::cmdFrameLimit ( const std::vector < String >& params ) { } void Console::cmdGetLog() { - std::vector < String > tvec = String::split( String( String::toStr( Log::instance()->buffer() ) ) ); + std::vector < String > tvec = String::split( String( String::toStr( Log::instance()->getBuffer() ) ) ); if ( tvec.size() > 0 ) { for ( unsigned int i = 0; i < tvec.size(); i++ ) privPushText( tvec[i] ); diff --git a/src/eepp/graphics/image.cpp b/src/eepp/graphics/image.cpp index de1962aee..34be9c202 100644 --- a/src/eepp/graphics/image.cpp +++ b/src/eepp/graphics/image.cpp @@ -203,7 +203,7 @@ EE_PIXEL_FORMAT Image::channelsToPixelFormat( const Uint32& channels ) { bool Image::getInfo( const std::string& path, int * width, int * height, int * channels ) { bool res = stbi_info( path.c_str(), width, height, channels ) != 0; - if ( !res && PackManager::instance()->fallbackToPacks() ) { + if ( !res && PackManager::instance()->isFallbackToPacksActive() ) { std::string npath( path ); Pack * tPack = PackManager::instance()->exists( npath ); @@ -313,7 +313,7 @@ Image::Image( std::string Path, const unsigned int& forceChannels ) : mSize = mWidth * mHeight * mChannels; mLoadedFromStbi = true; - } else if ( PackManager::instance()->fallbackToPacks() && NULL != ( tPack = PackManager::instance()->exists( Path ) ) ) { + } else if ( PackManager::instance()->isFallbackToPacksActive() && NULL != ( tPack = PackManager::instance()->exists( Path ) ) ) { loadFromPack( tPack, Path ); } else { std::string reason = "."; diff --git a/src/eepp/graphics/scrollparallax.cpp b/src/eepp/graphics/scrollparallax.cpp index 51e9ddda2..f2f148e66 100755 --- a/src/eepp/graphics/scrollparallax.cpp +++ b/src/eepp/graphics/scrollparallax.cpp @@ -82,7 +82,7 @@ const Vector2f& ScrollParallax::position() const { void ScrollParallax::draw() { if ( NULL != mSubTexture && mAABB.Left != mAABB.Right && mAABB.Top != mAABB.Bottom && 0 != mColor.Alpha ) { - mPos += mSpeed * (Float)mElapsed.elapsed().asSeconds(); + mPos += mSpeed * (Float)mElapsed.getElapsed().asSeconds(); if ( mPos.x > mAABB.Left + mRealSize.width() || mPos.x < mAABB.Left - mRealSize.width() ) mPos.x = mAABB.Left; diff --git a/src/eepp/graphics/shader.cpp b/src/eepp/graphics/shader.cpp index 998507a71..73c59e84c 100644 --- a/src/eepp/graphics/shader.cpp +++ b/src/eepp/graphics/shader.cpp @@ -36,7 +36,7 @@ Shader::Shader( const Uint32& Type, const std::string& Filename ) { std::string tPath = Filename; Pack * tPack = NULL; - if ( PackManager::instance()->fallbackToPacks() && NULL != ( tPack = PackManager::instance()->exists( tPath ) ) ) { + if ( PackManager::instance()->isFallbackToPacksActive() && NULL != ( tPack = PackManager::instance()->exists( tPath ) ) ) { SafeDataPointer PData; tPack->extractFileToMemory( tPath, PData ); diff --git a/src/eepp/graphics/textureatlas.cpp b/src/eepp/graphics/textureatlas.cpp index a9803de42..d8e235a3d 100644 --- a/src/eepp/graphics/textureatlas.cpp +++ b/src/eepp/graphics/textureatlas.cpp @@ -52,8 +52,8 @@ SubTexture * TextureAtlas::add( const Uint32& TexId, const Recti& SrcRect, const return add( eeNew ( SubTexture, ( TexId, SrcRect, DestSize, Offset, Name ) ) ); } -Uint32 TextureAtlas::count() { - return ResourceManager::count(); +Uint32 TextureAtlas::getCount() { + return ResourceManager::getCount(); } void TextureAtlas::setTextures( std::vector textures ) { diff --git a/src/eepp/graphics/textureatlasloader.cpp b/src/eepp/graphics/textureatlasloader.cpp index 34324c010..8c16ada8f 100644 --- a/src/eepp/graphics/textureatlasloader.cpp +++ b/src/eepp/graphics/textureatlasloader.cpp @@ -89,7 +89,7 @@ void TextureAtlasLoader::update() { } void TextureAtlasLoader::loadFromStream( IOStream& IOS ) { - mRL.threaded( mThreaded ); + mRL.setThreaded( mThreaded ); if ( IOS.isOpen() ) { IOS.read( (char*)&mTexGrHdr, sizeof(sTextureAtlasHdr) ); @@ -124,11 +124,11 @@ void TextureAtlasLoader::loadFromStream( IOStream& IOS ) { } } - if ( !mSkipResourceLoad || ( !mSkipResourceLoad && 0 == mRL.count() ) ) { + if ( !mSkipResourceLoad || ( !mSkipResourceLoad && 0 == mRL.getCount() ) ) { mIsLoading = true; mRL.load(); - if ( !mThreaded || ( !mSkipResourceLoad && 0 == mRL.count() ) ) + if ( !mThreaded || ( !mSkipResourceLoad && 0 == mRL.getCount() ) ) createSubTextures(); } } @@ -142,7 +142,7 @@ void TextureAtlasLoader::load( const std::string& TextureAtlasPath ) { IOStreamFile IOS( mTextureAtlasPath, std::ios::in | std::ios::binary ); loadFromStream( IOS ); - } else if ( PackManager::instance()->fallbackToPacks() ) { + } else if ( PackManager::instance()->isFallbackToPacksActive() ) { std::string tgPath( mTextureAtlasPath ); Pack * tPack = PackManager::instance()->exists( tgPath ); diff --git a/src/eepp/graphics/texturefont.cpp b/src/eepp/graphics/texturefont.cpp index e04081830..8f5986705 100755 --- a/src/eepp/graphics/texturefont.cpp +++ b/src/eepp/graphics/texturefont.cpp @@ -147,7 +147,7 @@ bool TextureFont::load( const Uint32& TexId, const std::string& CoordinatesDatPa IOStreamFile IOS( CoordinatesDatPath, std::ios::in | std::ios::binary ); return loadFromStream( TexId, IOS ); - } else if ( PackManager::instance()->fallbackToPacks() ) { + } else if ( PackManager::instance()->isFallbackToPacksActive() ) { std::string tPath( CoordinatesDatPath ); Pack * tPack = PackManager::instance()->exists( tPath ); diff --git a/src/eepp/graphics/texturefontloader.cpp b/src/eepp/graphics/texturefontloader.cpp index 9a2ca9fd3..e36181fd0 100644 --- a/src/eepp/graphics/texturefontloader.cpp +++ b/src/eepp/graphics/texturefontloader.cpp @@ -60,7 +60,7 @@ TextureFontLoader::~TextureFontLoader() { void TextureFontLoader::start() { ObjectLoader::start(); - mTexLoader->threaded( false ); + mTexLoader->setThreaded( false ); if ( !mThreaded ) { update(); diff --git a/src/eepp/graphics/textureloader.cpp b/src/eepp/graphics/textureloader.cpp index 9440981bc..ced30162a 100644 --- a/src/eepp/graphics/textureloader.cpp +++ b/src/eepp/graphics/textureloader.cpp @@ -294,7 +294,7 @@ void TextureLoader::loadFromPath() { } } } - } else if ( PackManager::instance()->fallbackToPacks() ) { + } else if ( PackManager::instance()->isFallbackToPacksActive() ) { mPack = PackManager::instance()->exists( mFilepath ); if ( NULL != mPack ) { @@ -496,7 +496,7 @@ void TextureLoader::loadFromPixels() { mTexId = TextureFactory::instance()->pushTexture( mFilepath, tTexId, width, height, mImgWidth, mImgHeight, mMipmap, mChannels, mClampMode, mCompressTexture || mIsCompressed, mLocalCopy, mSize ); - eePRINTL( "Texture %s loaded in %4.3f ms.", mFilepath.c_str(), mTE.elapsed().asMilliseconds() ); + eePRINTL( "Texture %s loaded in %4.3f ms.", mFilepath.c_str(), mTE.getElapsed().asMilliseconds() ); } else { eePRINTL( "Failed to create texture. Reason: %s", SOIL_last_result() ); } diff --git a/src/eepp/graphics/ttffont.cpp b/src/eepp/graphics/ttffont.cpp index 4aaa8c2fe..ba08b1048 100755 --- a/src/eepp/graphics/ttffont.cpp +++ b/src/eepp/graphics/ttffont.cpp @@ -69,7 +69,7 @@ bool TTFFont::load( const std::string& Filepath, const unsigned int& Size, EE_TT } return iLoad( Size, Style, NumCharsToGen, FontColor, OutlineSize, OutlineColor, AddPixelSeparator ); - } else if ( PackManager::instance()->fallbackToPacks() ) { + } else if ( PackManager::instance()->isFallbackToPacksActive() ) { Pack * tPack = PackManager::instance()->exists( mFilepath ); if ( NULL != tPack ) { diff --git a/src/eepp/system/clock.cpp b/src/eepp/system/clock.cpp index 3a5ee20a3..2f611c324 100755 --- a/src/eepp/system/clock.cpp +++ b/src/eepp/system/clock.cpp @@ -21,7 +21,7 @@ Time Clock::getElapsedTime() const { return Microseconds( mClockImpl->getElapsedTime() ); } -Time Clock::elapsed() { +Time Clock::getElapsed() { Time r = getElapsedTime(); restart(); return r; diff --git a/src/eepp/system/inifile.cpp b/src/eepp/system/inifile.cpp index 8919fa2fe..e9df05a4f 100755 --- a/src/eepp/system/inifile.cpp +++ b/src/eepp/system/inifile.cpp @@ -87,7 +87,7 @@ bool IniFile::loadFromFile( const std::string& iniPath ) { mIniReaded = false; return true; - } else if ( PackManager::instance()->fallbackToPacks() ) { + } else if ( PackManager::instance()->isFallbackToPacksActive() ) { std::string tPath( iniPath ); Pack * tPack = PackManager::instance()->exists( tPath ); diff --git a/src/eepp/system/log.cpp b/src/eepp/system/log.cpp index 9573858b9..027e80346 100755 --- a/src/eepp/system/log.cpp +++ b/src/eepp/system/log.cpp @@ -151,15 +151,15 @@ void Log::writef( const char* format, ... ) { } } -std::string Log::buffer() const { +std::string Log::getBuffer() const { return mData; } -const bool& Log::consoleOutput() const { +const bool& Log::isConsoleOutput() const { return mConsoleOutput; } -void Log::consoleOutput( const bool& output ) { +void Log::setConsoleOutput( const bool& output ) { bool OldOutput = mConsoleOutput; mConsoleOutput = output; @@ -172,11 +172,11 @@ void Log::consoleOutput( const bool& output ) { } -const bool& Log::liveWrite() const { +const bool& Log::isLiveWrite() const { return mLiveWrite; } -void Log::liveWrite( const bool& lw ) { +void Log::setLiveWrite( const bool& lw ) { mLiveWrite = lw; } diff --git a/src/eepp/system/objectloader.cpp b/src/eepp/system/objectloader.cpp index 5551dd2a7..d3e83ade7 100644 --- a/src/eepp/system/objectloader.cpp +++ b/src/eepp/system/objectloader.cpp @@ -54,11 +54,11 @@ bool ObjectLoader::isLoading() { return mLoading; } -bool ObjectLoader::threaded() const { +bool ObjectLoader::isThreaded() const { return mThreaded; } -void ObjectLoader::threaded( const bool& threaded ) { +void ObjectLoader::setThreaded( const bool& threaded ) { mThreaded = threaded; } diff --git a/src/eepp/system/packmanager.cpp b/src/eepp/system/packmanager.cpp index 51357ca09..857b449dd 100644 --- a/src/eepp/system/packmanager.cpp +++ b/src/eepp/system/packmanager.cpp @@ -46,11 +46,11 @@ Pack * PackManager::getPackByPath( std::string path ) { return NULL; } -const bool& PackManager::fallbackToPacks() const { +const bool& PackManager::isFallbackToPacksActive() const { return mFallback; } -void PackManager::fallbackToPacks( const bool& fallback ) { +void PackManager::setFallbackToPacks( const bool& fallback ) { mFallback = fallback; } diff --git a/src/eepp/system/platform/posix/threadlocalimpl.cpp b/src/eepp/system/platform/posix/threadlocalimpl.cpp index 6a5235caa..85b549c29 100644 --- a/src/eepp/system/platform/posix/threadlocalimpl.cpp +++ b/src/eepp/system/platform/posix/threadlocalimpl.cpp @@ -12,11 +12,11 @@ ThreadLocalImpl::~ThreadLocalImpl() { pthread_key_delete(mKey); } -void ThreadLocalImpl::value(void* val) { +void ThreadLocalImpl::setValue(void* val) { pthread_setspecific(mKey, val); } -void* ThreadLocalImpl::value() const { +void* ThreadLocalImpl::getValue() const { return pthread_getspecific(mKey); } diff --git a/src/eepp/system/platform/posix/threadlocalimpl.hpp b/src/eepp/system/platform/posix/threadlocalimpl.hpp index 98e146db1..0d09d652a 100644 --- a/src/eepp/system/platform/posix/threadlocalimpl.hpp +++ b/src/eepp/system/platform/posix/threadlocalimpl.hpp @@ -16,9 +16,9 @@ class ThreadLocalImpl : NonCopyable { ~ThreadLocalImpl(); - void value(void* val); + void setValue(void* val); - void* value() const; + void* getValue() const; private : pthread_key_t mKey; }; diff --git a/src/eepp/system/platform/win/threadlocalimpl.cpp b/src/eepp/system/platform/win/threadlocalimpl.cpp index e0fa51284..5d57cfb34 100644 --- a/src/eepp/system/platform/win/threadlocalimpl.cpp +++ b/src/eepp/system/platform/win/threadlocalimpl.cpp @@ -12,11 +12,11 @@ ThreadLocalImpl::~ThreadLocalImpl() { TlsFree(mIndex); } -void ThreadLocalImpl::value(void* val) { +void ThreadLocalImpl::setValue(void* val) { TlsSetValue(mIndex, val); } -void* ThreadLocalImpl::value() const { +void* ThreadLocalImpl::getValue() const { return TlsGetValue(mIndex); } diff --git a/src/eepp/system/platform/win/threadlocalimpl.hpp b/src/eepp/system/platform/win/threadlocalimpl.hpp index ec5f2952e..8c65a7487 100644 --- a/src/eepp/system/platform/win/threadlocalimpl.hpp +++ b/src/eepp/system/platform/win/threadlocalimpl.hpp @@ -22,9 +22,9 @@ class ThreadLocalImpl : NonCopyable { ~ThreadLocalImpl(); - void value(void* val); + void setValue(void* val); - void* value() const; + void* getValue() const; private : DWORD mIndex; }; diff --git a/src/eepp/system/resourceloader.cpp b/src/eepp/system/resourceloader.cpp index b7b7b9f22..717517a3d 100644 --- a/src/eepp/system/resourceloader.cpp +++ b/src/eepp/system/resourceloader.cpp @@ -26,15 +26,15 @@ void ResourceLoader::setThreads() { } } -bool ResourceLoader::threaded() const { +bool ResourceLoader::isThreaded() const { return mThreaded; } -Uint32 ResourceLoader::count() const { +Uint32 ResourceLoader::getCount() const { return mObjs.size(); } -void ResourceLoader::threaded( const bool& threaded ) { +void ResourceLoader::setThreaded( const bool& threaded ) { if ( !mLoading ) { mThreaded = threaded; } @@ -94,7 +94,7 @@ void ResourceLoader::load() { Obj = (*it); if ( NULL != Obj ) { - Obj->threaded( mThreaded ); + Obj->setThreaded( mThreaded ); if ( !Obj->isLoaded() ) { if ( !Obj->isLoading() ) { @@ -171,7 +171,7 @@ void ResourceLoader::setLoaded() { } } -Float ResourceLoader::progress() { +Float ResourceLoader::getProgress() { return ( (Float)mObjsLoaded.size() / (Float)( mObjs.size() + mObjsLoaded.size() ) ) * 100.f; } diff --git a/src/eepp/system/threadlocal.cpp b/src/eepp/system/threadlocal.cpp index d448e1ec3..408891359 100644 --- a/src/eepp/system/threadlocal.cpp +++ b/src/eepp/system/threadlocal.cpp @@ -3,22 +3,22 @@ namespace EE { namespace System { -ThreadLocal::ThreadLocal(void* val) : +ThreadLocal::ThreadLocal(void* value) : mImpl( eeNew( Private::ThreadLocalImpl, () ) ) { - value( val ); + setValue( value ); } ThreadLocal::~ThreadLocal() { eeSAFE_DELETE( mImpl ); } -void ThreadLocal::value(void* val) { - mImpl->value(val); +void ThreadLocal::setValue(void* val) { + mImpl->setValue(val); } -void* ThreadLocal::value() const { - return mImpl->value(); +void* ThreadLocal::getValue() const { + return mImpl->getValue(); } }} diff --git a/src/eepp/ui/uitheme.cpp b/src/eepp/ui/uitheme.cpp index 4946f3346..8dbff7199 100644 --- a/src/eepp/ui/uitheme.cpp +++ b/src/eepp/ui/uitheme.cpp @@ -162,7 +162,7 @@ UITheme * UITheme::loadFromTextureAtlas( UITheme * tTheme, Graphics::TextureAtla tTheme->add( eeNew( UISkinSimple, ( ElemFound[i] ) ) ); } - eePRINTL( "UI Theme Loaded in: %4.3f ms ( from TextureAtlas )", TE.elapsed().asMilliseconds() ); + eePRINTL( "UI Theme Loaded in: %4.3f ms ( from TextureAtlas )", TE.getElapsed().asMilliseconds() ); return tTheme; } @@ -213,7 +213,7 @@ UITheme * UITheme::loadFromPath( UITheme * tTheme, const std::string& Path, cons } } - if ( tSG->count() ) + if ( tSG->getCount() ) TextureAtlasManager::instance()->add( tSG ); else eeSAFE_DELETE( tSG ); @@ -225,7 +225,7 @@ UITheme * UITheme::loadFromPath( UITheme * tTheme, const std::string& Path, cons tTheme->add( eeNew( UISkinSimple, ( ElemFound[i] ) ) ); } - eePRINTL( "UI Theme Loaded in: %4.3f ms ( from path )", TE.elapsed().asMilliseconds() ); + eePRINTL( "UI Theme Loaded in: %4.3f ms ( from path )", TE.getElapsed().asMilliseconds() ); return tTheme; } diff --git a/src/eepp/window/window.cpp b/src/eepp/window/window.cpp index 6e6e5b83c..2cbebe8d1 100644 --- a/src/eepp/window/window.cpp +++ b/src/eepp/window/window.cpp @@ -261,7 +261,7 @@ void Window::getElapsedTime() { mFrameData.FrameElapsed = eeNew( Clock, () ); } - mFrameData.ElapsedTime = mFrameData.FrameElapsed->elapsed(); + mFrameData.ElapsedTime = mFrameData.FrameElapsed->getElapsed(); } void Window::calculateFps() { diff --git a/src/test/eetest.cpp b/src/test/eetest.cpp index 4779a486d..408499064 100644 --- a/src/test/eetest.cpp +++ b/src/test/eetest.cpp @@ -11,8 +11,8 @@ namespace Demo_Test { void EETest::Init() { EE = Engine::instance(); - Log::instance()->liveWrite( true ); - Log::instance()->consoleOutput( true ); + Log::instance()->setLiveWrite( true ); + Log::instance()->setConsoleOutput( true ); DrawBack = false; MultiViewportMode = false; @@ -184,7 +184,7 @@ void EETest::OnFontLoaded( ResourceLoader * ObjLoaded ) { TTF = FontManager::instance()->getByName( "arial" ); TTFB = FontManager::instance()->getByName( "arialb" ); - eePRINTL( "Fonts loading time: %4.3f ms.", mFTE.elapsed().asMilliseconds() ); + eePRINTL( "Fonts loading time: %4.3f ms.", mFTE.getElapsed().asMilliseconds() ); eeASSERT( TTF != NULL ); eeASSERT( TTFB != NULL ); @@ -252,7 +252,7 @@ void EETest::CreateUI() { CreateUIThemeTextureAtlas(); - eePRINTL( "Texture Atlas Loading Time: %4.3f ms.", TE.elapsed().asMilliseconds() ); + eePRINTL( "Texture Atlas Loading Time: %4.3f ms.", TE.getElapsed().asMilliseconds() ); UIManager::instance()->init(); //UI_MANAGER_HIGHLIGHT_FOCUS | UI_MANAGER_HIGHLIGHT_OVER @@ -573,7 +573,7 @@ void EETest::CreateUI() { C = reinterpret_cast ( C->parent() ); - eePRINTL( "CreateUI time: %4.3f ms.", TE.elapsed().asMilliseconds() ); + eePRINTL( "CreateUI time: %4.3f ms.", TE.getElapsed().asMilliseconds() ); } void EETest::CreateMapEditor() { @@ -928,7 +928,7 @@ void EETest::LoadTextures() { mBoxSprite = eeNew( Sprite, ( GlobalTextureAtlas::instance()->add( eeNew( SubTexture, ( TN[3], "ilmare" ) ) ) ) ); mCircleSprite = eeNew( Sprite, ( GlobalTextureAtlas::instance()->add( eeNew( SubTexture, ( TN[1], "thecircle" ) ) ) ) ); - eePRINTL( "Textures loading time: %4.3f ms.", TE.elapsed().asMilliseconds() ); + eePRINTL( "Textures loading time: %4.3f ms.", TE.getElapsed().asMilliseconds() ); Map.Load( MyPath + "maps/test.eem" ); Map.DrawGrid( false ); @@ -936,7 +936,7 @@ void EETest::LoadTextures() { Map.DrawBackground( false ); Map.ViewSize( mWindow->getSize() ); - eePRINTL( "Map creation time: %4.3f ms.", TE.elapsed().asMilliseconds() ); + eePRINTL( "Map creation time: %4.3f ms.", TE.getElapsed().asMilliseconds() ); } void EETest::run() { @@ -952,7 +952,7 @@ void EETest::ParticlesThread() { void EETest::UpdateParticles() { if ( MultiViewportMode || Screen == 2 ) { - PSElapsed = cElapsed.elapsed(); + PSElapsed = cElapsed.getElapsed(); for ( Uint8 i = 0; i < PS.size(); i++ ) PS[i].update( PSElapsed );