From 4497fe1337ab2c16b1e2d3a14f96f2ff7c745000 Mon Sep 17 00:00:00 2001 From: Christopher Roy Bratusek Date: Sun, 18 Mar 2012 09:42:11 +0100 Subject: [PATCH] changed some strings in the installer bump installer version to 0.2.1 --- installer/source/getios.cpp | 2 +- installer/source/menu.cpp | 130 +++++++++++++++++++----------------- 2 files changed, 69 insertions(+), 63 deletions(-) diff --git a/installer/source/getios.cpp b/installer/source/getios.cpp index beb9027..1262a25 100644 --- a/installer/source/getios.cpp +++ b/installer/source/getios.cpp @@ -80,7 +80,7 @@ bool listIOS() if (titleID == 0) continue; // Skip nandemu IOS - //if (titleID == 253) continue; + if (titleID == 253) continue; // Skip bootmii IOS if (titleID == 254) continue; diff --git a/installer/source/menu.cpp b/installer/source/menu.cpp index f622712..6a814db 100644 --- a/installer/source/menu.cpp +++ b/installer/source/menu.cpp @@ -23,22 +23,27 @@ void show_menu_head() { Con_FgColor(6, 1); printf("\x1b[%i;%iH", startpos_x, startpos_y); - printf("HBF installer v0.2"); - + printf("HBF installer v0.2.1"); + Con_FgColor(7, 1); printf("\t\t\t\t\t(C) 2011"); Con_FgColor(6, 1); printf(" hamachi-mp"); + + Con_FgColor(7, 1); + printf("\t\t\t\t\t\t\t\t(C) 2012"); + Con_FgColor(6, 1); + printf(" Nano"); } void fill_menu_main() { text1.clear(); stringstream buffer; - buffer << "Install The Homebrew Filter rev" << SvnRev(); - text1.push_back(buffer.str()); + buffer << "Install the HomebrewFilter rev" << SvnRev(); + text1.push_back(buffer.str()); if(CheckAppFound(GetTitleID())) - text1.push_back("Uninstall The Homebrew Filter"); + text1.push_back("Uninstall the HomebrewFilter"); else text1.push_back(""); text1.push_back(""); @@ -49,13 +54,14 @@ void fill_menu_main() void fill_menu_install_uninstall() { - text2.push_back("Yes, continue"); - text2.push_back("No, take me back"); + text2.push_back("Continue"); + text2.push_back("Go Back"); } void fill_menu_copyright() { text3.push_back("Copyright (C) hamachi-mp"); + text3.push_back("Copyright (C) Nano"); text3.push_back(""); text3.push_back("Thanks to:"); text3.push_back("\tTeam Twiizers"); @@ -73,7 +79,7 @@ void menu() fill_menu_main(); fill_menu_install_uninstall(); fill_menu_copyright(); - + menu_main_choice = text1.size() -1; /* int fgcolor = 3; @@ -85,7 +91,7 @@ void menu() Con_FgColor(fgcolor, fgbold); printf("test"); - + while(1) { WPAD_ScanPads(); @@ -135,7 +141,7 @@ void menu() exit(0); } */ - + int currentMenu = 0; while(currentMenu != MENU_EXIT) { @@ -144,64 +150,64 @@ void menu() case MENU_MAIN: currentMenu = menu_main(menu_main_choice); break; - + case MENU_INSTALL: currentMenu = menu_install_uninstall(1); break; - + case MENU_UNINSTALL: currentMenu = menu_install_uninstall(0); break; - + case MENU_INSTALLING: currentMenu = menu_install(); break; - + case MENU_UNINSTALLING: currentMenu = menu_uninstall(); break; - + case MENU_COPYRIGHT: currentMenu = menu_copyright(); break; } } - + ISFS_Deinitialize(); } int menu_main(int scrollpos) { Con_Clear(); - + show_menu_head(); fill_menu_main(); if(text1[scrollpos] == "") scrollpos = text1.size() -1; - + Con_FgColor(3, 1); printf("\x1b[%i;%iH", startpos_x +2, startpos_y); printf("Main Menu"); - + Con_FgColor(7, 1); for(int i=0; i < (signed)text1.size(); i++) { printf("\x1b[%i;%iH", startpos_x +4 +i, startpos_y +3); printf("%s", text1[i].c_str()); } - + bool scroll = true; while(1) { WPAD_ScanPads(); u32 pressed = WPAD_ButtonsDown(0); - + if ( pressed & WPAD_BUTTON_DOWN && scrollpos < (signed)text1.size() -1) { scrollpos++; while(text1[scrollpos] == "") scrollpos++; - + scroll = true; } else if ( pressed & WPAD_BUTTON_UP && scrollpos != 0) @@ -209,10 +215,10 @@ int menu_main(int scrollpos) scrollpos--; while(text1[scrollpos] == "") scrollpos--; - + scroll = true; } - + if(scroll) { for(int i=0; i < (signed)text1.size(); i++) @@ -222,11 +228,11 @@ int menu_main(int scrollpos) printf(">>"); else printf(" "); - + } scroll = false; } - + if( pressed & WPAD_BUTTON_A ) { menu_main_choice = scrollpos; @@ -234,13 +240,13 @@ int menu_main(int scrollpos) { case 0: return MENU_INSTALL; - + case 1: return MENU_UNINSTALL; - + case 3: return MENU_COPYRIGHT; - + default: return MENU_EXIT; } @@ -252,27 +258,27 @@ int menu_install_uninstall(int install) { Con_Clear(); show_menu_head(); - + Con_FgColor(7, 1); printf("\x1b[%i;%iH", startpos_x +2, startpos_y); if(install) - printf("Install The Homebrew Filter now"); + printf("Install the HomebrewFilter now"); else - printf("Uninstall The Homebrew Filter now"); - + printf("Uninstall the HomebrewFilter now"); + for(int i=0; i < (signed)text2.size(); i++) { printf("\x1b[%i;%iH", startpos_x +4 +i, startpos_y +3); printf("%s", text2[i].c_str()); } - + int scrollpos = 1; bool scroll = true; while(1) { WPAD_ScanPads(); u32 pressed = WPAD_ButtonsDown(0); - + if ( pressed & WPAD_BUTTON_DOWN && scrollpos < (signed)text2.size() -1) { scrollpos++; @@ -283,7 +289,7 @@ int menu_install_uninstall(int install) scrollpos--; scroll = true; } - + if(scroll) { for(int i=0; i < (signed)text2.size(); i++) @@ -293,11 +299,11 @@ int menu_install_uninstall(int install) printf(">>"); else printf(" "); - + } scroll = false; } - + if( pressed & WPAD_BUTTON_A ) { switch(scrollpos) @@ -308,7 +314,7 @@ int menu_install_uninstall(int install) else return MENU_UNINSTALLING; break; - + case 1: return MENU_MAIN; } @@ -320,11 +326,11 @@ int menu_install() { Con_Clear(); show_menu_head(); - + Con_FgColor(7, 1); printf("\x1b[%i;%iH", startpos_x +2, startpos_y); - printf("Installing The Homebrew Filter"); - + printf("Installing the HomebrewFilter"); + printf("\x1b[%i;%iH", startpos_x +4, startpos_y); if(Wad_InstallFromMemory(startpos_x, startpos_y) >= 0) { @@ -333,45 +339,45 @@ int menu_install() s32 fd; u32 high = (u32)(GetTitleID() >> 32); u32 low = (u32)(GetTitleID() & 0xFFFFFFFF); - + char filepath[ISFS_MAXPATH]; sprintf(filepath, "/title/%08x/%08x/content/title.tmd", high, low); - + static fstats filestats ATTRIBUTE_ALIGN(32); static u8 filearray[1024] ATTRIBUTE_ALIGN(32); - + fd = ISFS_Open(filepath, ISFS_OPEN_READ); if (fd <= 0) ISFS_Close(fd); - + ISFS_GetFileStats(fd, &filestats); ISFS_Read(fd, filearray, filestats.file_length); ISFS_Close(fd); - + if(filestats.file_length >= 0) { fd = ISFS_Open(filepath, ISFS_OPEN_RW); - + if(getIOS(61)) filearray[395] = 61; else filearray[395] = IOS_GetVersion(); - + ISFS_Write(fd, filearray, sizeof( filearray )); ISFS_Close(fd); } } } - + Con_FgColor(7, 1); printf("\x1b[%i;%iH", startpos_x +8, startpos_y); printf(">> Continue"); - + while(1) { WPAD_ScanPads(); u32 pressed = WPAD_ButtonsDown(0); - + if( pressed & WPAD_BUTTON_A ) return MENU_MAIN; } @@ -381,22 +387,22 @@ int menu_uninstall() { Con_Clear(); show_menu_head(); - + Con_FgColor(7, 1); printf("\x1b[%i;%iH", startpos_x +2, startpos_y); - printf("Uninstalling The Homebrew Filter"); - + printf("Uninstalling the HomebrewFilter"); + Wad_UninstallFromMemory(startpos_x, startpos_y); - + Con_FgColor(7, 1); printf("\x1b[%i;%iH", startpos_x +8, startpos_y); printf(">> Continue"); - + while(1) { WPAD_ScanPads(); u32 pressed = WPAD_ButtonsDown(0); - + if( pressed & WPAD_BUTTON_A ) return MENU_MAIN; } @@ -406,9 +412,9 @@ int menu_copyright() { Con_Clear(); show_menu_head(); - + Con_FgColor(7, 1); - + for(int i=0; i < (signed)text3.size(); i++) { printf("\x1b[%i;%iH", startpos_x +2 +i, startpos_y); @@ -422,8 +428,8 @@ int menu_copyright() { WPAD_ScanPads(); u32 pressed = WPAD_ButtonsDown(0); - + if( pressed & WPAD_BUTTON_A ) return MENU_MAIN; } -} \ No newline at end of file +}