Subversion Repositories freemyipod

Rev

Rev 551 | Rev 660 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 551 Rev 651
Line 139... Line 139...
139
};
139
};
140
 
140
 
141
 
141
 
142
static void main()
142
static void main()
143
{
143
{
144
    struct emcorelib_header* libboot = get_library(0x4c424365, LIBBOOT_API_VERSION, LIBSOURCE_BOOTFLASH, "libboot ");
144
    struct emcorelib_header* libboot = get_library(LIBBOOT_IDENTIFIER, LIBBOOT_API_VERSION, LIBSOURCE_BOOTFLASH, "libboot ");
145
    if (!libboot) panicf(PANIC_KILLTHREAD, "Could not load booting library!");
145
    if (!libboot) panicf(PANIC_KILLTHREAD, "Could not load booting library!");
146
    struct libboot_api* boot = (struct libboot_api*)libboot->api;
146
    struct libboot_api* boot = (struct libboot_api*)libboot->api;
147
    struct emcorelib_header* libpng = get_library(0x64474e50, LIBPNG_API_VERSION, LIBSOURCE_BOOTFLASH, "libpng  ");
147
    struct emcorelib_header* libpng = get_library(LIBPNG_IDENTIFIER, LIBPNG_API_VERSION, LIBSOURCE_BOOTFLASH, "libpng  ");
148
    if (!libpng) panicf(PANIC_KILLTHREAD, "Could not load PNG decoder library!");
148
    if (!libpng) panicf(PANIC_KILLTHREAD, "Could not load PNG decoder library!");
149
    struct libpng_api* png = (struct libpng_api*)libpng->api;
149
    struct libpng_api* png = (struct libpng_api*)libpng->api;
150
    struct emcorelib_header* libui = get_library(0x49554365, LIBUI_API_VERSION, LIBSOURCE_BOOTFLASH, "libui   ");
150
    struct emcorelib_header* libui = get_library(LIBUI_IDENTIFIER, LIBUI_API_VERSION, LIBSOURCE_BOOTFLASH, "libui   ");
151
    if (!libui) panicf(PANIC_KILLTHREAD, "Could not load user interface library!");
151
    if (!libui) panicf(PANIC_KILLTHREAD, "Could not load user interface library!");
152
    struct libui_api* ui = (struct libui_api*)libui->api;
152
    struct libui_api* ui = (struct libui_api*)libui->api;
153
    int size = bootflash_filesize("backgrnd");
153
    int size = bootflash_filesize("backgrnd");
154
    if (size == -1) panicf(PANIC_KILLTHREAD, "Could not find background image!");
154
    if (size == -1) panicf(PANIC_KILLTHREAD, "Could not find background image!");
155
    void* buf = memalign(0x10, size);
155
    void* buf = memalign(0x10, size);