mirror of
https://github.com/wiidev/usbloadergx.git
synced 2024-11-16 00:15:08 +01:00
1618b4b1e0
New: - Added game categories and filter games list by categories (Can be imported from WiiTDB). - Wiinertag support. - Supporting arguments from meta.xml on boot (--ios=xxx and --usbport=x) (Requires Homebrew Channel 1.0.7+ or UNEO Forwarder v3.0). - New ehci modules by Rodries with better drive compatibility. - Added two new video modes to force progressive video mode, 'FORCE PAL480p' and 'FORCE NTSC480p'. - Added Sneek Video Patch mode. - Added new 'Inherit' setting for game settings named "Use global". If that option is set then the main loader setting is used. - Full d2x cIOS support with it's new features (Block IOS Reload, Return To, Sector Sizes > 512). - Support for sector sizes > 512B with FAT32/NTFS (Requires d2x v6+) - Real support for simultanious use of both USB ports without switching the 2nd drive temporary off. (Requires Hermes cIOS or Rodries MOD of the Hermes cIOS (recommended)) - Added two new settings menus - Added saving of game browser position when returning to USB Loader GX Changes: - Improved several GUI controls/navigations - Changed settings menu layout and sorted the items to their correct place (HDD menu, features menu) - Set games settings to use the global setting by default, set to "use global" to use the main loader settings. - Use TinyXML instead of MXML (better XML support) - Updated to new libs (libogc, libfat, libext2fs, libntfs) Fix: - "Return to" option now work for all games, even problematic games like Prince of Persia. (Requires d2x v4+) - Xflip setting fixed. - Fix the parental lock of Individual game settings (Thanks to NJ7) - Fix Theme downloader - Fixed reset of the loader when loading game with IOS reload and disabled WiiTDB titles - Fixed timeout timer on startup to count correctly. - Fixed reversed disc image download when Custom/Original option is selected - Fixed reload of game list after a game rename - Fixed horizontal text scrolling - Fixed booting games by arguments (headless id feature) - Fixed We Dare game boot (thx oggzee) R1099 Change Log: *Added IOS225 from Rodries cIOS Installer MOD to Hermes IOS types New Forwarder V3.0 Changes: *added support for ext partitions *added support for arguments from xml *clean up of source
74 lines
1.4 KiB
C
74 lines
1.4 KiB
C
#include <malloc.h>
|
|
#include "pngu.h"
|
|
#include "video.h"
|
|
#include "filelist.h"
|
|
|
|
static int imagewidth = 0;
|
|
static int imageheight = 0;
|
|
|
|
u8 * GetImageData()
|
|
{
|
|
PNGUPROP imgProp;
|
|
IMGCTX ctx;
|
|
u8 * data = NULL;
|
|
int ret;
|
|
|
|
if(CONF_GetAspectRatio() == CONF_ASPECT_16_9)
|
|
ctx = PNGU_SelectImageFromBuffer(background169_png);
|
|
else
|
|
ctx = PNGU_SelectImageFromBuffer(background_png);
|
|
|
|
if (!ctx)
|
|
return NULL;
|
|
|
|
ret = PNGU_GetImageProperties(ctx, &imgProp);
|
|
if (ret != PNGU_OK)
|
|
return NULL;
|
|
|
|
imagewidth = imgProp.imgWidth;
|
|
imageheight = imgProp.imgHeight;
|
|
|
|
int len = ((((imgProp.imgWidth+3)>>2)*((imgProp.imgHeight+3)>>2)*32*2) + 31) & ~31;
|
|
|
|
data = (u8 *)memalign (32, len);
|
|
|
|
ret = PNGU_DecodeTo4x4RGBA8 (ctx, imgProp.imgWidth, imgProp.imgHeight, data, 255);
|
|
|
|
DCFlushRange(data, len);
|
|
|
|
PNGU_ReleaseImageContext(ctx);
|
|
|
|
return data;
|
|
}
|
|
|
|
void Background_Show(float x, float y, float z, u8 * data, float angle, float scaleX, float scaleY, u8 alpha)
|
|
{
|
|
/* Draw image */
|
|
Menu_DrawImg(x, y, z, imagewidth, imageheight, data, angle, scaleX, scaleY, alpha);
|
|
Menu_Render();
|
|
}
|
|
|
|
void fadein(u8 * imgdata)
|
|
{
|
|
int i;
|
|
|
|
/* fadein of image */
|
|
for(i = 0; i < 255; i = i+10)
|
|
{
|
|
if(i>255) i = 255;
|
|
Background_Show(0, 0, 0, imgdata, 0, 1, 1, i);
|
|
}
|
|
}
|
|
|
|
void fadeout(u8 * imgdata)
|
|
{
|
|
int i;
|
|
|
|
/* fadeoout of image */
|
|
for(i = 255; i > 1; i = i-7)
|
|
{
|
|
if(i < 0) i = 0;
|
|
Background_Show(0, 0, 0, imgdata, 0, 1, 1, i);
|
|
}
|
|
}
|