From 8601abdf297f3994026825609e58e413dd410cee Mon Sep 17 00:00:00 2001 From: dimok321 <15055714+dimok789@users.noreply.github.com> Date: Sat, 13 Jun 2009 00:24:36 +0000 Subject: [PATCH] *Sorting files a bit --- Makefile | 4 ++- gui.pnproj | 2 +- gui.pnps | 2 +- source/FreeTypeGX.cpp | 5 +-- source/fatmounter.c | 3 +- source/language/language.c | 3 ++ source/language/language.h | 1 - source/libwiigui/gui_customoptionbrowser.cpp | 2 +- source/libwiigui/gui_gamebrowser.cpp | 2 +- source/libwiigui/gui_gamebrowser.h | 2 +- source/libwiigui/gui_gamecarousel.cpp | 2 +- source/libwiigui/gui_gamecarousel.h | 2 +- source/libwiigui/gui_gamegrid.cpp | 2 +- source/libwiigui/gui_gamegrid.h | 2 +- source/libwiigui/gui_keyboard.cpp | 2 +- source/main.cpp | 37 +++++--------------- source/main.h | 2 -- source/menu.cpp | 23 ++++++------ source/menu.h | 4 +-- source/{ => mload}/dip_plugin.c | 0 source/{ => mload}/dip_plugin.h | 0 source/{ => mload}/ehcmodule.c | 0 source/{ => mload}/ehcmodule.h | 0 source/{ => mload}/mload.c | 0 source/{ => mload}/mload.h | 0 source/{ => network}/dns.c | 0 source/{ => network}/dns.h | 0 source/{ => network}/http.c | 0 source/{ => network}/http.h | 5 --- source/{ => network}/updater.c | 18 ++++++++++ source/{ => network}/updater.h | 3 ++ source/{ => patches}/dvd_broadway.c | 0 source/{ => patches}/dvd_broadway.h | 0 source/{ => patches}/fst.c | 3 +- source/{ => patches}/fst.h | 0 source/{ => patches}/fwrite_patch.h | 0 source/{ => patches}/geckomenu.h | 0 source/{ => patches}/kenobiwii.h | 0 source/{ => patches}/patchcode.c | 2 +- source/{ => patches}/patchcode.h | 0 source/{ => patches}/patchhook.S | 0 source/{ => patches}/ppc.h | 0 source/{ => prompts}/PromptWindows.cpp | 26 +++++++------- source/{ => prompts}/PromptWindows.h | 2 +- source/{ => prompts}/gameinfo.cpp | 12 +++---- source/{ => prompts}/gameinfo.h | 0 source/{ => settings}/Settings.cpp | 20 +++++------ source/{ => settings}/Settings.h | 0 source/{ => settings}/SettingsPrompts.cpp | 8 ++--- source/{ => settings}/SettingsPrompts.h | 0 source/{ => settings}/cfg.c | 8 +++-- source/{ => settings}/cfg.h | 3 +- source/sys.cpp | 14 ++++---- source/{ => usbloader}/apploader.c | 6 ++-- source/{ => usbloader}/apploader.h | 0 source/{ => usbloader}/disc.c | 5 ++- source/{ => usbloader}/disc.h | 0 source/{ => usbloader}/getentries.cpp | 6 ++-- source/{ => usbloader}/getentries.h | 2 +- source/{ => usbloader}/partition.c | 0 source/{ => usbloader}/partition.h | 0 source/{ => usbloader}/sdhc.c | 0 source/{ => usbloader}/sdhc.h | 0 source/{ => usbloader}/usbstorage.c | 0 source/{ => usbloader}/usbstorage.h | 0 source/{ => usbloader}/utils.c | 0 source/{ => usbloader}/utils.h | 0 source/{ => usbloader}/video2.c | 0 source/{ => usbloader}/video2.h | 0 source/{ => usbloader}/wbfs.c | 0 source/{ => usbloader}/wbfs.h | 0 source/{ => usbloader}/wdvd.c | 0 source/{ => usbloader}/wdvd.h | 0 source/video.cpp | 2 +- source/{ => xml}/xml.c | 4 +-- source/{ => xml}/xml.h | 0 76 files changed, 126 insertions(+), 125 deletions(-) rename source/{ => mload}/dip_plugin.c (100%) rename source/{ => mload}/dip_plugin.h (100%) rename source/{ => mload}/ehcmodule.c (100%) rename source/{ => mload}/ehcmodule.h (100%) rename source/{ => mload}/mload.c (100%) rename source/{ => mload}/mload.h (100%) rename source/{ => network}/dns.c (100%) rename source/{ => network}/dns.h (100%) rename source/{ => network}/http.c (100%) rename source/{ => network}/http.h (85%) rename source/{ => network}/updater.c (83%) rename source/{ => network}/updater.h (79%) rename source/{ => patches}/dvd_broadway.c (100%) rename source/{ => patches}/dvd_broadway.h (100%) rename source/{ => patches}/fst.c (94%) rename source/{ => patches}/fst.h (100%) rename source/{ => patches}/fwrite_patch.h (100%) rename source/{ => patches}/geckomenu.h (100%) rename source/{ => patches}/kenobiwii.h (100%) rename source/{ => patches}/patchcode.c (95%) rename source/{ => patches}/patchcode.h (100%) rename source/{ => patches}/patchhook.S (100%) rename source/{ => patches}/ppc.h (100%) rename source/{ => prompts}/PromptWindows.cpp (96%) rename source/{ => prompts}/PromptWindows.h (94%) rename source/{ => prompts}/gameinfo.cpp (96%) rename source/{ => prompts}/gameinfo.h (100%) rename source/{ => settings}/Settings.cpp (97%) rename source/{ => settings}/Settings.h (100%) rename source/{ => settings}/SettingsPrompts.cpp (96%) rename source/{ => settings}/SettingsPrompts.h (100%) rename source/{ => settings}/cfg.c (95%) rename source/{ => settings}/cfg.h (93%) rename source/{ => usbloader}/apploader.c (96%) rename source/{ => usbloader}/apploader.h (100%) rename source/{ => usbloader}/disc.c (98%) rename source/{ => usbloader}/disc.h (100%) rename source/{ => usbloader}/getentries.cpp (92%) rename source/{ => usbloader}/getentries.h (86%) rename source/{ => usbloader}/partition.c (100%) rename source/{ => usbloader}/partition.h (100%) rename source/{ => usbloader}/sdhc.c (100%) rename source/{ => usbloader}/sdhc.h (100%) rename source/{ => usbloader}/usbstorage.c (100%) rename source/{ => usbloader}/usbstorage.h (100%) rename source/{ => usbloader}/utils.c (100%) rename source/{ => usbloader}/utils.h (100%) rename source/{ => usbloader}/video2.c (100%) rename source/{ => usbloader}/video2.h (100%) rename source/{ => usbloader}/wbfs.c (100%) rename source/{ => usbloader}/wbfs.h (100%) rename source/{ => usbloader}/wdvd.c (100%) rename source/{ => usbloader}/wdvd.h (100%) rename source/{ => xml}/xml.c (96%) rename source/{ => xml}/xml.h (100%) diff --git a/Makefile b/Makefile index 4859eb3e..9d6d750a 100644 --- a/Makefile +++ b/Makefile @@ -17,7 +17,9 @@ include $(DEVKITPPC)/wii_rules #--------------------------------------------------------------------------------- TARGET := boot BUILD := build -SOURCES := source source/libwiigui source/images source/fonts source/sounds source/libwbfs source/unzip source/language +SOURCES := source source/libwiigui source/images source/fonts source/sounds \ + source/libwbfs source/unzip source/language source/mload source/patches \ + source/usbloader source/xml source/network source/settings source/prompts INCLUDES := source SVNDEV := -D'SVN_REV="$(shell svnversion -n ..)"' diff --git a/gui.pnproj b/gui.pnproj index bef6d051..3793a186 100644 --- a/gui.pnproj +++ b/gui.pnproj @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/gui.pnps b/gui.pnps index 0538f749..12ebc6fa 100644 --- a/gui.pnps +++ b/gui.pnps @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/source/FreeTypeGX.cpp b/source/FreeTypeGX.cpp index 6381aa58..d469fb4a 100644 --- a/source/FreeTypeGX.cpp +++ b/source/FreeTypeGX.cpp @@ -23,9 +23,10 @@ #include "FreeTypeGX.h" #include "language/CH2Unicode.h" #include "language/GB2Unicode.h" -#include "language/sjis2unicode.h" +#include "language/sjis2unicode.h" +#include "settings/cfg.h" + #include "main.h" -#include "cfg.h" /*! \struct ftgxCharData_ * diff --git a/source/fatmounter.c b/source/fatmounter.c index d2a1a67c..cfb01483 100644 --- a/source/fatmounter.c +++ b/source/fatmounter.c @@ -7,7 +7,8 @@ #include #include #include -#include "usbstorage.h" + +#include "usbloader/usbstorage.h" //these are the only stable and speed is good #define CACHE 32 diff --git a/source/language/language.c b/source/language/language.c index 8c5ec6dd..c6c624dc 100644 --- a/source/language/language.c +++ b/source/language/language.c @@ -5,7 +5,10 @@ #include #include #include + +#include "usbloader/disc.h" #include "language.h" + static char *cfg_name, *cfg_val; char* strcopy(char *dest, char *src, int size) diff --git a/source/language/language.h b/source/language/language.h index 326760e4..16504e8e 100644 --- a/source/language/language.h +++ b/source/language/language.h @@ -1,5 +1,4 @@ #include -#include "disc.h" #ifndef _LANGUAGE_H_ #define _LANGUAGE_H_ diff --git a/source/libwiigui/gui_customoptionbrowser.cpp b/source/libwiigui/gui_customoptionbrowser.cpp index 87f025bc..89916896 100644 --- a/source/libwiigui/gui_customoptionbrowser.cpp +++ b/source/libwiigui/gui_customoptionbrowser.cpp @@ -9,7 +9,7 @@ #include "gui.h" #include "../wpad.h" #include "../main.h" -#include "../cfg.h" +#include "../settings/cfg.h" #include "gui_customoptionbrowser.h" #include diff --git a/source/libwiigui/gui_gamebrowser.cpp b/source/libwiigui/gui_gamebrowser.cpp index f697eba8..90c6ea63 100644 --- a/source/libwiigui/gui_gamebrowser.cpp +++ b/source/libwiigui/gui_gamebrowser.cpp @@ -11,7 +11,7 @@ #include #include "gui_gamebrowser.h" -#include "../cfg.h" +#include "../settings/cfg.h" #include "../main.h" #include diff --git a/source/libwiigui/gui_gamebrowser.h b/source/libwiigui/gui_gamebrowser.h index 47b260de..173db5f6 100644 --- a/source/libwiigui/gui_gamebrowser.h +++ b/source/libwiigui/gui_gamebrowser.h @@ -2,7 +2,7 @@ #define _GUIGAMEBROWSER_H_ #include "gui.h" -#include "../disc.h" +#include "../usbloader/disc.h" class GuiGameBrowser : public GuiElement { diff --git a/source/libwiigui/gui_gamecarousel.cpp b/source/libwiigui/gui_gamecarousel.cpp index 2f7bfde2..8d72b3bc 100644 --- a/source/libwiigui/gui_gamecarousel.cpp +++ b/source/libwiigui/gui_gamecarousel.cpp @@ -11,7 +11,7 @@ #include #include "gui_gamecarousel.h" -#include "../cfg.h" +#include "../settings/cfg.h" #include "../main.h" #include diff --git a/source/libwiigui/gui_gamecarousel.h b/source/libwiigui/gui_gamecarousel.h index 06f82dfc..06c9aa49 100644 --- a/source/libwiigui/gui_gamecarousel.h +++ b/source/libwiigui/gui_gamecarousel.h @@ -2,7 +2,7 @@ #define _GUIGAMECAROUSEL_H_ #include "gui.h" -#include "../disc.h" +#include "../usbloader/disc.h" class GuiGameCarousel : public GuiElement { diff --git a/source/libwiigui/gui_gamegrid.cpp b/source/libwiigui/gui_gamegrid.cpp index 598485f4..98753212 100644 --- a/source/libwiigui/gui_gamegrid.cpp +++ b/source/libwiigui/gui_gamegrid.cpp @@ -11,7 +11,7 @@ #include #include "gui_gamegrid.h" -#include "../cfg.h" +#include "../settings/cfg.h" #include #include diff --git a/source/libwiigui/gui_gamegrid.h b/source/libwiigui/gui_gamegrid.h index 75b57107..37ec1e86 100644 --- a/source/libwiigui/gui_gamegrid.h +++ b/source/libwiigui/gui_gamegrid.h @@ -2,7 +2,7 @@ #define _GUIGAMEGRID_H_ #include "gui.h" -#include "../disc.h" +#include "../usbloader/disc.h" class GuiGameGrid : public GuiElement { diff --git a/source/libwiigui/gui_keyboard.cpp b/source/libwiigui/gui_keyboard.cpp index fdf0debe..05b83063 100644 --- a/source/libwiigui/gui_keyboard.cpp +++ b/source/libwiigui/gui_keyboard.cpp @@ -10,7 +10,7 @@ #include "gui.h" #include "../main.h" -#include "../cfg.h" +#include "../settings/cfg.h" #include #include /** diff --git a/source/main.cpp b/source/main.cpp index f4704d73..f2f01a07 100644 --- a/source/main.cpp +++ b/source/main.cpp @@ -16,6 +16,13 @@ #include #include +#include "usbloader/wbfs.h" +#include "usbloader/video2.h" +#include "network/http.h" +#include "network/dns.h" +#include "settings/cfg.h" +#include "language/language.h" +#include "mload/mload.h" #include "FreeTypeGX.h" #include "video.h" #include "audio.h" @@ -23,18 +30,10 @@ #include "input.h" #include "filelist.h" #include "main.h" -#include "http.h" -#include "dns.h" #include "fatmounter.h" -#include "disc.h" -#include "wbfs.h" #include "sys.h" -#include "video2.h" #include "wpad.h" -#include "cfg.h" -#include "language/language.h" #include "fat.h" -#include "mload.h" /* Constants */ @@ -45,25 +44,6 @@ FreeTypeGX *fontSystem=0; FreeTypeGX *fontClock=0; -bool netcheck = false; - - -/*Networking - Forsaekn*/ -int Net_Init(char *ip){ - - s32 res; - while ((res = net_init()) == -EAGAIN) - { - usleep(100 * 1000); //100ms - } - - if (if_config(ip, NULL, NULL, true) < 0) { - printf(" Error reading IP address, exiting"); - usleep(1000 * 1000 * 1); //1 sec - return FALSE; - } - return TRUE; -} int main(int argc, char *argv[]) @@ -100,6 +80,7 @@ main(int argc, char *argv[]) /* Load Custom IOS */ if(Settings.cios == ios222) { ret2 = IOS_ReloadIOS(222); + load_ehc_module(); if (ret2 < 0) { Settings.cios = ios249; ret2 = IOS_ReloadIOS(249); @@ -113,8 +94,6 @@ main(int argc, char *argv[]) SYS_ResetSystem(SYS_RETURNTOMENU, 0, 0); } - if(Settings.cios == ios222) load_ehc_module(); - SDCard_Init(); // now mount SD:/ USBDevice_Init(); // and mount USB:/ diff --git a/source/main.h b/source/main.h index ac66d5d8..f2588132 100644 --- a/source/main.h +++ b/source/main.h @@ -14,7 +14,5 @@ extern struct SSettings Settings; void DefaultSettings(); extern FreeTypeGX *fontSystem; -extern bool netcheck; -extern int Net_Init(char *ip); #endif diff --git a/source/menu.cpp b/source/menu.cpp index 0fa48f68..0f4b46ac 100644 --- a/source/menu.cpp +++ b/source/menu.cpp @@ -16,24 +16,25 @@ #include "libwiigui/gui_gamegrid.h" #include "libwiigui/gui_gamecarousel.h" #include "libwiigui/gui_gamebrowser.h" +#include "usbloader/usbstorage.h" +#include "usbloader/wbfs.h" +#include "usbloader/disc.h" +#include "usbloader/getentries.h" +#include "language/language.h" +#include "settings/Settings.h" +#include "prompts/PromptWindows.h" +#include "prompts/gameinfo.h" +#include "mload/mload.h" +#include "patches/patchcode.h" +#include "network/updater.h" #include "menu.h" #include "audio.h" #include "input.h" -#include "wbfs.h" -#include "disc.h" #include "filelist.h" #include "sys.h" -#include "patchcode.h" #include "wpad.h" -#include "language/language.h" #include "listfiles.h" #include "fatmounter.h" -#include "getentries.h" -#include "PromptWindows.h" -#include "Settings.h" -#include "gameinfo.h" -#include "mload.h" -#include "usbstorage.h" //#include "xml.h" /* XML - Lustar*/ @@ -147,6 +148,7 @@ UpdateGUI (void *arg) Menu_DrawRectangle(0,0,screenwidth,screenheight,(GXColor){0, 0, 0, a},1); Menu_Render(); } + mainWindow->RemoveAll(); ShutoffRumble(); return 0; } @@ -1814,7 +1816,6 @@ int MainMenu(int menu) break; } } - ExitGUIThreads(); bgMusic->Stop(); diff --git a/source/menu.h b/source/menu.h index bbe4734c..145710f0 100644 --- a/source/menu.h +++ b/source/menu.h @@ -9,9 +9,9 @@ #ifndef _MENU_H_ #define _MENU_H_ -#include +#include +#include "settings/cfg.h" #include "main.h" -#include "cfg.h" void InitGUIThreads(void); void ExitGUIThreads(void); diff --git a/source/dip_plugin.c b/source/mload/dip_plugin.c similarity index 100% rename from source/dip_plugin.c rename to source/mload/dip_plugin.c diff --git a/source/dip_plugin.h b/source/mload/dip_plugin.h similarity index 100% rename from source/dip_plugin.h rename to source/mload/dip_plugin.h diff --git a/source/ehcmodule.c b/source/mload/ehcmodule.c similarity index 100% rename from source/ehcmodule.c rename to source/mload/ehcmodule.c diff --git a/source/ehcmodule.h b/source/mload/ehcmodule.h similarity index 100% rename from source/ehcmodule.h rename to source/mload/ehcmodule.h diff --git a/source/mload.c b/source/mload/mload.c similarity index 100% rename from source/mload.c rename to source/mload/mload.c diff --git a/source/mload.h b/source/mload/mload.h similarity index 100% rename from source/mload.h rename to source/mload/mload.h diff --git a/source/dns.c b/source/network/dns.c similarity index 100% rename from source/dns.c rename to source/network/dns.c diff --git a/source/dns.h b/source/network/dns.h similarity index 100% rename from source/dns.h rename to source/network/dns.h diff --git a/source/http.c b/source/network/http.c similarity index 100% rename from source/http.c rename to source/network/http.c diff --git a/source/http.h b/source/network/http.h similarity index 85% rename from source/http.h rename to source/network/http.h index 50fccb49..0bcf90a2 100644 --- a/source/http.h +++ b/source/network/http.h @@ -2,14 +2,9 @@ #define _HTTP_H_ #include -#include #include -#include - -#include #include #include -#include #ifdef __cplusplus extern "C" diff --git a/source/updater.c b/source/network/updater.c similarity index 83% rename from source/updater.c rename to source/network/updater.c index 625e2cc9..95434019 100644 --- a/source/updater.c +++ b/source/network/updater.c @@ -6,6 +6,24 @@ #include "http.h" static s32 connection; +bool netcheck = false; + +/*Networking - Forsaekn*/ +int Net_Init(char *ip){ + + s32 res; + while ((res = net_init()) == -EAGAIN) + { + usleep(100 * 1000); //100ms + } + + if (if_config(ip, NULL, NULL, true) < 0) { + printf(" Error reading IP address, exiting"); + usleep(1000 * 1000 * 1); //1 sec + return FALSE; + } + return TRUE; +} s32 network_request(const char * request) { diff --git a/source/updater.h b/source/network/updater.h similarity index 79% rename from source/updater.h rename to source/network/updater.h index 7863d5f5..dda98110 100644 --- a/source/updater.h +++ b/source/network/updater.h @@ -6,6 +6,9 @@ extern "C" { #endif +extern bool netcheck; + +int Net_Init(char *ip); s32 network_request(const char * request); s32 network_read(void *buf, u32 len); s32 downloadrev(const char * url); diff --git a/source/dvd_broadway.c b/source/patches/dvd_broadway.c similarity index 100% rename from source/dvd_broadway.c rename to source/patches/dvd_broadway.c diff --git a/source/dvd_broadway.h b/source/patches/dvd_broadway.h similarity index 100% rename from source/dvd_broadway.h rename to source/patches/dvd_broadway.h diff --git a/source/fst.c b/source/patches/fst.c similarity index 94% rename from source/fst.c rename to source/patches/fst.c index b0333bdd..fbac17e0 100644 --- a/source/fst.c +++ b/source/patches/fst.c @@ -27,11 +27,12 @@ #include #include #include + +#include "settings/cfg.h" #include "ogc/ipc.h" #include "fst.h" #include "dvd_broadway.h" #include "wpad.h" -#include "cfg.h" #include "fatmounter.h" extern struct SSettings Settings; diff --git a/source/fst.h b/source/patches/fst.h similarity index 100% rename from source/fst.h rename to source/patches/fst.h diff --git a/source/fwrite_patch.h b/source/patches/fwrite_patch.h similarity index 100% rename from source/fwrite_patch.h rename to source/patches/fwrite_patch.h diff --git a/source/geckomenu.h b/source/patches/geckomenu.h similarity index 100% rename from source/geckomenu.h rename to source/patches/geckomenu.h diff --git a/source/kenobiwii.h b/source/patches/kenobiwii.h similarity index 100% rename from source/kenobiwii.h rename to source/patches/kenobiwii.h diff --git a/source/patchcode.c b/source/patches/patchcode.c similarity index 95% rename from source/patchcode.c rename to source/patches/patchcode.c index 51a6a1bc..9382e7a0 100644 --- a/source/patchcode.c +++ b/source/patches/patchcode.c @@ -23,8 +23,8 @@ #include #include #include +#include "usbloader/apploader.h" #include "geckomenu.h" -#include "apploader.h" #include "patchcode.h" #include "fwrite_patch.h" diff --git a/source/patchcode.h b/source/patches/patchcode.h similarity index 100% rename from source/patchcode.h rename to source/patches/patchcode.h diff --git a/source/patchhook.S b/source/patches/patchhook.S similarity index 100% rename from source/patchhook.S rename to source/patches/patchhook.S diff --git a/source/ppc.h b/source/patches/ppc.h similarity index 100% rename from source/ppc.h rename to source/patches/ppc.h diff --git a/source/PromptWindows.cpp b/source/prompts/PromptWindows.cpp similarity index 96% rename from source/PromptWindows.cpp rename to source/prompts/PromptWindows.cpp index 41ca7d41..6b0a4568 100644 --- a/source/PromptWindows.cpp +++ b/source/prompts/PromptWindows.cpp @@ -5,23 +5,23 @@ #include #include +#include "usbloader/wbfs.h" +#include "usbloader/wdvd.h" +#include "usbloader/partition.h" +#include "usbloader/usbstorage.h" +#include "usbloader/getentries.h" +#include "language/language.h" +#include "libwiigui/gui.h" +#include "libwiigui/gui_diskcover.h" +#include "network/updater.h" +#include "network/http.h" +#include "mload/mload.h" +#include "fatmounter.h" +#include "listfiles.h" #include "menu.h" #include "filelist.h" #include "sys.h" #include "wpad.h" -#include "wbfs.h" -#include "wdvd.h" -#include "language/language.h" -#include "libwiigui/gui.h" -#include "libwiigui/gui_diskcover.h" -#include "fatmounter.h" -#include "listfiles.h" -#include "updater.h" -#include "http.h" -#include "partition.h" -#include "usbstorage.h" -#include "getentries.h" -#include "mload.h" /*** Variables that are also used extern ***/ int cntMissFiles = 0; diff --git a/source/PromptWindows.h b/source/prompts/PromptWindows.h similarity index 94% rename from source/PromptWindows.h rename to source/prompts/PromptWindows.h index 01eb2029..5a71f377 100644 --- a/source/PromptWindows.h +++ b/source/prompts/PromptWindows.h @@ -8,7 +8,7 @@ #ifndef _PROMPTWINDOWS_H_ #define _PROMPTWINDOWS_H_ -#include "partition.h" +#include "usbloader/partition.h" void WindowCredits(); int OnScreenKeyboard(char * var, u32 maxlen, int min); diff --git a/source/gameinfo.cpp b/source/prompts/gameinfo.cpp similarity index 96% rename from source/gameinfo.cpp rename to source/prompts/gameinfo.cpp index 6ebb77c7..6c051d95 100644 --- a/source/gameinfo.cpp +++ b/source/prompts/gameinfo.cpp @@ -5,20 +5,18 @@ #include #include - -#include "gameinfo.h" - +#include "usbloader/wbfs.h" +#include "language/language.h" +#include "libwiigui/gui.h" +#include "../xml/xml.h" #include "menu.h" #include "filelist.h" #include "sys.h" #include "wpad.h" -#include "wbfs.h" -#include "language/language.h" -#include "libwiigui/gui.h" #include "fatmounter.h" #include "listfiles.h" +#include "gameinfo.h" -#include "xml.h" /*** Extern variables ***/ extern GuiWindow * mainWindow; diff --git a/source/gameinfo.h b/source/prompts/gameinfo.h similarity index 100% rename from source/gameinfo.h rename to source/prompts/gameinfo.h diff --git a/source/Settings.cpp b/source/settings/Settings.cpp similarity index 97% rename from source/Settings.cpp rename to source/settings/Settings.cpp index e951d68a..c62db534 100644 --- a/source/Settings.cpp +++ b/source/settings/Settings.cpp @@ -1,17 +1,17 @@ #include #include -#include "menu.h" -#include "filelist.h" -#include "sys.h" -#include "wbfs.h" +#include "usbloader/wbfs.h" +#include "usbloader/getentries.h" #include "language/language.h" #include "libwiigui/gui.h" #include "libwiigui/gui_customoptionbrowser.h" +#include "prompts/PromptWindows.h" +#include "settings/SettingsPrompts.h" #include "fatmounter.h" -#include "PromptWindows.h" -#include "getentries.h" -#include "SettingsPrompts.h" +#include "menu.h" +#include "filelist.h" +#include "sys.h" #define MAXOPTIONS 11 @@ -960,7 +960,7 @@ int MenuSettings() if (Settings.godmode == 0) { WindowPrompt(LANGUAGE.CorrectPassword,LANGUAGE.InstallRenameandDeleteareunlocked,LANGUAGE.ok,0,0,0); Settings.godmode = 1; - __Menu_GetEntries(); + //__Menu_GetEntries(); menu = MENU_DISCLIST; } } else { @@ -972,7 +972,7 @@ int MenuSettings() if(choice == 1) { WindowPrompt(LANGUAGE.ConsoleLocked,LANGUAGE.USBLoaderisprotected,LANGUAGE.ok,0,0,0); Settings.godmode = 0; - __Menu_GetEntries(); + //__Menu_GetEntries(); menu = MENU_DISCLIST; } } @@ -1906,7 +1906,7 @@ int GameSettings(struct discHdr * header) LANGUAGE.ok,0,0,0); } else { - __Menu_GetEntries(); + //__Menu_GetEntries(); WindowPrompt( LANGUAGE.Successfullydeleted, gameName, diff --git a/source/Settings.h b/source/settings/Settings.h similarity index 100% rename from source/Settings.h rename to source/settings/Settings.h diff --git a/source/SettingsPrompts.cpp b/source/settings/SettingsPrompts.cpp similarity index 96% rename from source/SettingsPrompts.cpp rename to source/settings/SettingsPrompts.cpp index 5d6f2c63..b4d20125 100644 --- a/source/SettingsPrompts.cpp +++ b/source/settings/SettingsPrompts.cpp @@ -2,16 +2,16 @@ #include #include -#include "filelist.h" -#include "sys.h" #include "language/language.h" +#include "prompts/PromptWindows.h" #include "libwiigui/gui.h" #include "libwiigui/gui_customoptionbrowser.h" +#include "settings/cfg.h" #include "listfiles.h" -#include "cfg.h" #include "main.h" -#include "PromptWindows.h" #include "fatmounter.h" +#include "filelist.h" +#include "sys.h" /*** Extern variables ***/ diff --git a/source/SettingsPrompts.h b/source/settings/SettingsPrompts.h similarity index 100% rename from source/SettingsPrompts.h rename to source/settings/SettingsPrompts.h diff --git a/source/cfg.c b/source/settings/cfg.c similarity index 95% rename from source/cfg.c rename to source/settings/cfg.c index 97988b32..2c8cc9ef 100644 --- a/source/cfg.c +++ b/source/settings/cfg.c @@ -6,9 +6,11 @@ #include #include #include -#include "cfg.h" + #include "language/language.h" -#include "xml.h" /* XML - Lustar*/ +#include "xml/xml.h" /* XML - Lustar*/ +#include "cfg.h" + struct SSettings Settings; @@ -1604,7 +1606,7 @@ void CFG_Load(void) cfg_load_game_num(); if (Settings.titlesOverride==1)CFG_LoadXml(); - + Global_Default(); //global default depends on theme information CFG_LoadGlobal(); diff --git a/source/cfg.h b/source/settings/cfg.h similarity index 93% rename from source/cfg.h rename to source/settings/cfg.h index 16b11fd3..2e34fa7c 100644 --- a/source/cfg.h +++ b/source/settings/cfg.h @@ -2,13 +2,14 @@ #define _CFG_H_ #include -#include "disc.h" #ifdef __cplusplus extern "C" { #endif +#include "usbloader/disc.h" + #define CFG_HOME_REBOOT 0 #define CFG_HOME_EXIT 1 diff --git a/source/sys.cpp b/source/sys.cpp index 77ce5ed1..a01725c3 100644 --- a/source/sys.cpp +++ b/source/sys.cpp @@ -2,17 +2,17 @@ #include #include -#include "sys.h" -#include "wpad.h" -#include "wdvd.h" -#include "usbstorage.h" -#include "disc.h" -#include "wbfs.h" +#include "usbloader/wdvd.h" +#include "usbloader/usbstorage.h" +#include "usbloader/disc.h" +#include "usbloader/wbfs.h" +#include "mload/mload.h" #include "video.h" #include "audio.h" #include "menu.h" #include "fatmounter.h" -#include "mload.h" +#include "sys.h" +#include "wpad.h" /* Constants */ #define CERTS_LEN 0x280 diff --git a/source/apploader.c b/source/usbloader/apploader.c similarity index 96% rename from source/apploader.c rename to source/usbloader/apploader.c index 3d95c9cd..5f3bd2e1 100644 --- a/source/apploader.c +++ b/source/usbloader/apploader.c @@ -1,13 +1,13 @@ #include #include #include - + +#include "patches/patchcode.h" +#include "patches/kenobiwii.h" /*FISHEARS*/ #include "apploader.h" #include "wdvd.h" #include "wpad.h" -#include "patchcode.h" #include "disc.h" -#include "kenobiwii.h" /*FISHEARS*/ /*KENOBI! - FISHEARS*/ extern const unsigned char kenobiwii[]; diff --git a/source/apploader.h b/source/usbloader/apploader.h similarity index 100% rename from source/apploader.h rename to source/usbloader/apploader.h diff --git a/source/disc.c b/source/usbloader/disc.c similarity index 98% rename from source/disc.c rename to source/usbloader/disc.c index 6715cc78..1e30175c 100644 --- a/source/disc.c +++ b/source/usbloader/disc.c @@ -5,12 +5,11 @@ #include #include - +#include "patches/fst.h" #include "apploader.h" #include "disc.h" #include "video.h" #include "wdvd.h" -#include "fst.h" /* Constants */ #define PTABLE_OFFSET 0x40000 @@ -289,7 +288,7 @@ s32 Disc_BootPartition(u64 offset, u8 videoselected, u8 cheat, u8 vipatch, u8 pa WPAD_Disconnect(0); WPAD_Shutdown(); - WDVD_Close(); + WDVD_Close(); /* Shutdown IOS subsystems */ SYS_ResetSystem(SYS_SHUTDOWN, 0, 0); diff --git a/source/disc.h b/source/usbloader/disc.h similarity index 100% rename from source/disc.h rename to source/usbloader/disc.h diff --git a/source/getentries.cpp b/source/usbloader/getentries.cpp similarity index 92% rename from source/getentries.cpp rename to source/usbloader/getentries.cpp index 23c12ea0..9130b444 100644 --- a/source/getentries.cpp +++ b/source/usbloader/getentries.cpp @@ -1,7 +1,7 @@ #include -#include "wbfs.h" -#include "cfg.h" +#include "settings/cfg.h" +#include "usbloader/wbfs.h" #include "main.h" @@ -58,7 +58,7 @@ s32 __Menu_EntryCmpCount(const void *a, const void *b) * Get Gamelist ***************************************************************************/ -s32 __Menu_GetEntries(void) +int __Menu_GetEntries(void) { struct discHdr *buffer = NULL; struct discHdr *buffer2 = NULL; diff --git a/source/getentries.h b/source/usbloader/getentries.h similarity index 86% rename from source/getentries.h rename to source/usbloader/getentries.h index 4dbcc1f5..98baeb59 100644 --- a/source/getentries.h +++ b/source/usbloader/getentries.h @@ -8,6 +8,6 @@ #ifndef _GETENTRIES_H_ #define _GETENTRIES_H_ -s32 __Menu_GetEntries(void); +int __Menu_GetEntries(void); #endif diff --git a/source/partition.c b/source/usbloader/partition.c similarity index 100% rename from source/partition.c rename to source/usbloader/partition.c diff --git a/source/partition.h b/source/usbloader/partition.h similarity index 100% rename from source/partition.h rename to source/usbloader/partition.h diff --git a/source/sdhc.c b/source/usbloader/sdhc.c similarity index 100% rename from source/sdhc.c rename to source/usbloader/sdhc.c diff --git a/source/sdhc.h b/source/usbloader/sdhc.h similarity index 100% rename from source/sdhc.h rename to source/usbloader/sdhc.h diff --git a/source/usbstorage.c b/source/usbloader/usbstorage.c similarity index 100% rename from source/usbstorage.c rename to source/usbloader/usbstorage.c diff --git a/source/usbstorage.h b/source/usbloader/usbstorage.h similarity index 100% rename from source/usbstorage.h rename to source/usbloader/usbstorage.h diff --git a/source/utils.c b/source/usbloader/utils.c similarity index 100% rename from source/utils.c rename to source/usbloader/utils.c diff --git a/source/utils.h b/source/usbloader/utils.h similarity index 100% rename from source/utils.h rename to source/usbloader/utils.h diff --git a/source/video2.c b/source/usbloader/video2.c similarity index 100% rename from source/video2.c rename to source/usbloader/video2.c diff --git a/source/video2.h b/source/usbloader/video2.h similarity index 100% rename from source/video2.h rename to source/usbloader/video2.h diff --git a/source/wbfs.c b/source/usbloader/wbfs.c similarity index 100% rename from source/wbfs.c rename to source/usbloader/wbfs.c diff --git a/source/wbfs.h b/source/usbloader/wbfs.h similarity index 100% rename from source/wbfs.h rename to source/usbloader/wbfs.h diff --git a/source/wdvd.c b/source/usbloader/wdvd.c similarity index 100% rename from source/wdvd.c rename to source/usbloader/wdvd.c diff --git a/source/wdvd.h b/source/usbloader/wdvd.h similarity index 100% rename from source/wdvd.h rename to source/usbloader/wdvd.h diff --git a/source/video.cpp b/source/video.cpp index d2a7553b..33f257e6 100644 --- a/source/video.cpp +++ b/source/video.cpp @@ -17,7 +17,7 @@ #include "input.h" #include "libwiigui/gui.h" -#include "cfg.h" +#include "settings/cfg.h" #define DEFAULT_FIFO_SIZE 256 * 1024 static unsigned int *xfb[2] = { NULL, NULL }; // Double buffered diff --git a/source/xml.c b/source/xml/xml.c similarity index 96% rename from source/xml.c rename to source/xml/xml.c index b9df5e5f..0b72ee74 100644 --- a/source/xml.c +++ b/source/xml/xml.c @@ -5,8 +5,8 @@ Load game information from XML - Lustar */ #include -#include "cfg.h" -#include "xml.h" +#include "settings/cfg.h" +#include "xml/xml.h" #include "unzip/unzip.h" diff --git a/source/xml.h b/source/xml/xml.h similarity index 100% rename from source/xml.h rename to source/xml/xml.h