void Initialize(){ DrawString(TOP_SCREEN, " INITIALIZE... ", 0, 240-8, WHITE, BLACK); if(FSInit()){ DrawString(TOP_SCREEN, " LOADING... ", 0, 240-8, WHITE, BLACK); }else{ DrawString(TOP_SCREEN, " ERROR! ", 0, 240-8, RED, BLACK); } LoadPack(); //Console Stuff memset(TOP_SCREEN, 0x00, 0x46500); memset(TOP_SCREEN2, 0x00, 0x46500); ConsoleSetXY(15, 15); ConsoleSetWH(370, 160); ConsoleSetBorderColor(BLUE); ConsoleSetTextColor(WHITE); ConsoleSetBackgroundColor(BLACK); ConsoleSetSpecialColor(BLUE); ConsoleSetSpacing(2); ConsoleSetBorderWidth(3); //Check that the data is installed f_mkdir ("rxTools"); f_mkdir ("rxTools/nand"); InstallConfigData(); SplashScreen(); for(int i = 0; i < 0x333333*6; i++){ u32 pad = GetInput(); if(pad & BUTTON_R1 && i > 0x333333) goto rxTools_boot; } rxModeQuickBoot(); rxTools_boot: memset(TOP_SCREEN, 0x00, 0x46500); memset(TOP_SCREEN2, 0x00, 0x46500); }
//--------------------------------------------------------------------------- // 函数: Load // 功能: 加载一个INI文件 // 参数: FileName 文件名 // 返回: TRUE 成功 // FALSE 失败 //--------------------------------------------------------------------------- BOOL KIniFile::Load(LPCSTR FileName) { KPakFile File; DWORD dwSize; PVOID Buffer; TPackHead* pHeader; // check file name if (FileName[0] == 0) return FALSE; if (m_Header.pNextNode) Clear(); if (!File.Open((char*)FileName)) { g_DebugLog("Can't open ini file : %s", FileName); return FALSE; } #pragma message("KIniFile 当前不支持 KeyName 为中文! by Romandou") dwSize = File.Size(); Buffer = m_MemStack.Push(dwSize + 4); File.Read(Buffer, dwSize); pHeader = (TPackHead*)Buffer; if (pHeader->Id == 0x4b434150) // "PACK" { File.Close(); return LoadPack(FileName); } CreateIniLink(Buffer, dwSize); return TRUE; }
void Initialize(){ char str[100]; char strl[100]; char strr[100]; DrawString(BOT_SCREEN, " INITIALIZE... ", 0, SCREEN_HEIGHT-FONT_SIZE, WHITE, BLACK); if(FSInit()){ DrawString(BOT_SCREEN, " LOADING... ", 0, SCREEN_HEIGHT-FONT_SIZE, WHITE, BLACK); }else{ DrawString(BOT_SCREEN, " ERROR! ", 0, SCREEN_HEIGHT-FONT_SIZE, RED, BLACK); } LoadPack(); //Console Stuff ConsoleSetXY(15, 20); ConsoleSetWH(SCREEN_WIDTH-30, SCREEN_HEIGHT-80); ConsoleSetBorderColor(BLUE); ConsoleSetTextColor(RGB(0, 141, 197)); ConsoleSetBackgroundColor(TRANSPARENT); ConsoleSetSpecialColor(BLUE); ConsoleSetSpacing(2); ConsoleSetBorderWidth(3); //Check that the data is installed f_mkdir("rxTools"); f_mkdir("rxTools/nand"); InstallConfigData(); LoadSettings(); sprintf(str, "/rxTools/Theme/%c/TOP.bin", Theme); sprintf(strl, "/rxTools/Theme/%c/TOPL.bin", Theme); sprintf(strr, "/rxTools/Theme/%c/TOPR.bin", Theme); if(theme_3d) DrawTopSplash(str, strl, strr); else DrawTopSplash(str, str, str); if (!bootGUI) { if(silent_boot) { sprintf(str, "/rxTools/Theme/%c/boot.bin", Theme); DrawBottomSplash(str); for (int i = 0; i < 0x333333 * 2; i++){ u32 pad = GetInput(); if (pad & BUTTON_R1 && i > 0x333333) goto rxTools_boot; } } else { ConsoleInit(); ConsoleSetTitle(STR_AUTOBOOT[language]); print(STR_HOLD_R[language]); ConsoleShow(); for (int i = 0; i < 0x333333 * 6; i++){ u32 pad = GetInput(); if (pad & BUTTON_R1 && i > 0x333333) goto rxTools_boot; } } rxModeQuickBoot(); } rxTools_boot: sprintf(str, "/rxTools/Theme/%c/TOP.bin", Theme); sprintf(strl, "/rxTools/Theme/%c/TOPL.bin", Theme); sprintf(strr, "/rxTools/Theme/%c/TOPR.bin", Theme); if(theme_3d) DrawTopSplash(str, strl, strr); else DrawTopSplash(str, str, str); }