diff --git a/source/code/MenuSystem.cpp b/source/code/MenuSystem.cpp index 8705fe6..86573be 100644 --- a/source/code/MenuSystem.cpp +++ b/source/code/MenuSystem.cpp @@ -103,7 +103,7 @@ static void drawToScreen(const Button& b) { } standardButton.getLabel(b.getLabel())->Draw(globalData.screen, b.x+standardButton.xsize/2,b.y+standardButton.ysize/2, - sago::SagoTextField::Alignment::center, sago::SagoTextField::VerticalAlignment::center); + sago::SagoTextField::Alignment::center, sago::SagoTextField::VerticalAlignment::center); } diff --git a/source/code/main.cpp b/source/code/main.cpp index c6d7b0a..422ac69 100644 --- a/source/code/main.cpp +++ b/source/code/main.cpp @@ -351,7 +351,7 @@ void writeScreenShot() { int rightNow = (int)time(nullptr); int w, h; SDL_GetRendererOutputSize(globalData.screen, &w, &h); - SDL_Surface *sreenshotSurface = SDL_CreateRGBSurface(0, w, h, 32, 0x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000); + SDL_Surface* sreenshotSurface = SDL_CreateRGBSurface(0, w, h, 32, 0x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000); SDL_RenderReadPixels(globalData.screen, NULL, SDL_PIXELFORMAT_ARGB8888, sreenshotSurface->pixels, sreenshotSurface->pitch); OsCreateFolder(pathToScreenShots()); std::string buf = pathToScreenShots() + "/screenshot"+std::to_string(rightNow)+".bmp"; @@ -899,8 +899,8 @@ static void ParseArguments(int argc, char* argv[], globalConfig& conf) { } if (vm.count("help")) { std::cout << fmt::format("Block Attack - Rise of the blocks {}\n\n" - "Block Attack - Rise of the Blocks is a puzzle/blockfall game inspired by Tetris Attack for the SNES.\n\n" - "{}\n\n", VERSION_NUMBER, "www.blockattack.net"); + "Block Attack - Rise of the Blocks is a puzzle/blockfall game inspired by Tetris Attack for the SNES.\n\n" + "{}\n\n", VERSION_NUMBER, "www.blockattack.net"); std::cout << "Usage: "<< commandname << " [OPTION]..." << "\n"; std::cout << desc << "\n"; std::cout << "Examples:" << "\n"; @@ -990,8 +990,8 @@ int main(int argc, char* argv[]) { OsCreateSaveFolder(); PhysFsSetSearchPath(config.search_paths, config.savepath); /*if (globalData.modList.empty() && sago::FileExists(MODLIST_TXT)) { - std::string modString = sago::GetFileContent(MODLIST_TXT); - boost::split(globalData.modList, modString, boost::is_any_of(",")); + std::string modString = sago::GetFileContent(MODLIST_TXT); + boost::split(globalData.modList, modString, boost::is_any_of(",")); }*/ globalData.modinfo.InitModList(globalData.modList); if (sago::FileExists(MODLIST_TXT)) { @@ -1277,10 +1277,10 @@ int main(int argc, char* argv[]) { /*std::string modListString; if (globalData.modList.size()>0) { - modListString = globalData.modList.at(0); - for (size_t i = 1; i < globalData.modList.size(); ++i) { - modListString += std::string(",")+globalData.modList[i]; - } + modListString = globalData.modList.at(0); + for (size_t i = 1; i < globalData.modList.size(); ++i) { + modListString += std::string(",")+globalData.modList[i]; + } }*/ ct = TimeHandler::addTime("totalTime",ct); if (globalData.verboseLevel) { diff --git a/source/code/menudef.cpp b/source/code/menudef.cpp index 1886ef6..13fb9b1 100644 --- a/source/code/menudef.cpp +++ b/source/code/menudef.cpp @@ -132,10 +132,10 @@ void Button_changekey::doAction() { } class Button_confirmVolume : public Button { - private: +private: std::string cvar=""; mutable std::string volumeLabel; /*used for cache*/ - public: +public: explicit Button_confirmVolume(const char* cvar); virtual void doAction() override { /*Do nothing. Equal to choose "back". */ }; virtual const std::string& getLabel() const override; @@ -152,26 +152,26 @@ const std::string& Button_confirmVolume::getLabel() const { } class Button_increaseVolume : public Button { - private: +private: std::string cvar=""; int incrementValue = 1; int lowerLimit = 0; int upperLimit = MIX_MAX_VOLUME; - public: +public: Button_increaseVolume(const char* cvar, int incrementValue); virtual void doAction() override; }; Button_increaseVolume::Button_increaseVolume(const char* cvar, int incrementValue) : cvar{cvar},incrementValue{incrementValue} { - char prefix = '+'; - double value = incrementValue; - if (incrementValue<0) { - prefix = '-'; - value = -incrementValue; - } - value = value*100.0/MIX_MAX_VOLUME; - setLabel(fmt::format("{}{:.2f}", prefix, value)); + char prefix = '+'; + double value = incrementValue; + if (incrementValue<0) { + prefix = '-'; + value = -incrementValue; + } + value = value*100.0/MIX_MAX_VOLUME; + setLabel(fmt::format("{}{:.2f}", prefix, value)); } void Button_increaseVolume::doAction() { @@ -186,7 +186,7 @@ void Button_increaseVolume::doAction() { } class Button_testSound : public Button { - public: +public: Button_testSound(); virtual void doAction() override; }; @@ -202,7 +202,7 @@ void Button_testSound::doAction() { } class Button_testMusic : public Button { - public: +public: Button_testMusic(); virtual void doAction() override; };