mirror of
https://github.com/Maschell/WiiUPluginLoader.git
synced 2024-11-22 16:19:17 +01:00
Formatting
This commit is contained in:
parent
9442c5d62a
commit
16fb3a7080
@ -28,8 +28,7 @@ DefaultGuiSelectBox::DefaultGuiSelectBox(std::string caption, GuiFrame *parent)
|
|||||||
,valueImageData(Resources::GetImageData("gameSettingsButtonEx.png"))
|
,valueImageData(Resources::GetImageData("gameSettingsButtonEx.png"))
|
||||||
,valueSelectedImageData(Resources::GetImageData("gameSettingsButtonExSelected.png"))
|
,valueSelectedImageData(Resources::GetImageData("gameSettingsButtonExSelected.png"))
|
||||||
,valueHighlightedImageData(Resources::GetImageData("gameSettingsButtonExHighlighted.png"))
|
,valueHighlightedImageData(Resources::GetImageData("gameSettingsButtonExHighlighted.png"))
|
||||||
,buttonClickSound(Resources::GetSound("settings_click_2.mp3"))
|
,buttonClickSound(Resources::GetSound("settings_click_2.mp3")) {
|
||||||
{
|
|
||||||
setSize(topBackgroundImg_img.getWidth(),topBackgroundImg_img.getHeight());
|
setSize(topBackgroundImg_img.getWidth(),topBackgroundImg_img.getHeight());
|
||||||
this->setImageTopBackground(&topBackgroundImg_img);
|
this->setImageTopBackground(&topBackgroundImg_img);
|
||||||
this->setImageTopHighlighted(&topHighlightedImg_img);
|
this->setImageTopHighlighted(&topHighlightedImg_img);
|
||||||
@ -41,8 +40,7 @@ DefaultGuiSelectBox::DefaultGuiSelectBox(std::string caption, GuiFrame *parent)
|
|||||||
/**
|
/**
|
||||||
* Destructor for the DefaultGuiSelectBox class.
|
* Destructor for the DefaultGuiSelectBox class.
|
||||||
*/
|
*/
|
||||||
DefaultGuiSelectBox::~DefaultGuiSelectBox()
|
DefaultGuiSelectBox::~DefaultGuiSelectBox() {
|
||||||
{
|
|
||||||
Resources::RemoveImageData(topBackgroundImg_imgdata);
|
Resources::RemoveImageData(topBackgroundImg_imgdata);
|
||||||
Resources::RemoveImageData(topHighlightedImg_imgdata);
|
Resources::RemoveImageData(topHighlightedImg_imgdata);
|
||||||
Resources::RemoveImageData(valueImageData);
|
Resources::RemoveImageData(valueImageData);
|
||||||
|
@ -28,8 +28,7 @@ DefaultGuiSwitch::DefaultGuiSwitch(bool checked)
|
|||||||
,switchOn_imgdata(Resources::GetImageData("switchIconOn.png"))
|
,switchOn_imgdata(Resources::GetImageData("switchIconOn.png"))
|
||||||
,switchOn_img(switchOn_imgdata)
|
,switchOn_img(switchOn_imgdata)
|
||||||
,switchOff_imgdata(Resources::GetImageData("switchIconOff.png"))
|
,switchOff_imgdata(Resources::GetImageData("switchIconOff.png"))
|
||||||
,switchOff_img(switchOff_imgdata)
|
,switchOff_img(switchOff_imgdata) {
|
||||||
{
|
|
||||||
setSize(switchbase_img.getWidth(),switchbase_img.getHeight());
|
setSize(switchbase_img.getWidth(),switchbase_img.getHeight());
|
||||||
this->setImageBackground(&switchbase_img);
|
this->setImageBackground(&switchbase_img);
|
||||||
this->setImageHighlighted(&switchbase_highlighted_img);
|
this->setImageHighlighted(&switchbase_highlighted_img);
|
||||||
@ -39,8 +38,7 @@ DefaultGuiSwitch::DefaultGuiSwitch(bool checked)
|
|||||||
/**
|
/**
|
||||||
* Destructor for the DefaultGuiSwitch class.
|
* Destructor for the DefaultGuiSwitch class.
|
||||||
*/
|
*/
|
||||||
DefaultGuiSwitch::~DefaultGuiSwitch()
|
DefaultGuiSwitch::~DefaultGuiSwitch() {
|
||||||
{
|
|
||||||
Resources::RemoveImageData(switchbase_imgdata);
|
Resources::RemoveImageData(switchbase_imgdata);
|
||||||
Resources::RemoveImageData(switchbase_highlighted_imgdata);
|
Resources::RemoveImageData(switchbase_highlighted_imgdata);
|
||||||
Resources::RemoveImageData(switchOn_imgdata);
|
Resources::RemoveImageData(switchOn_imgdata);
|
||||||
|
@ -8,20 +8,17 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef struct _sr_table_t
|
typedef struct _sr_table_t {
|
||||||
{
|
|
||||||
uint32_t value[16];
|
uint32_t value[16];
|
||||||
uint32_t sdr1;
|
uint32_t sdr1;
|
||||||
} sr_table_t;
|
} sr_table_t;
|
||||||
|
|
||||||
typedef struct _bat_t
|
typedef struct _bat_t {
|
||||||
{
|
|
||||||
uint32_t h;
|
uint32_t h;
|
||||||
uint32_t l;
|
uint32_t l;
|
||||||
} bat_t;
|
} bat_t;
|
||||||
|
|
||||||
typedef struct _bat_table_t
|
typedef struct _bat_table_t {
|
||||||
{
|
|
||||||
bat_t bat[8];
|
bat_t bat[8];
|
||||||
} bat_table_t;
|
} bat_table_t;
|
||||||
|
|
||||||
|
@ -66,7 +66,8 @@ static void KernelWriteSRs(sr_table_t * table) {
|
|||||||
asm volatile("mtsr 5, %0" : : "r" (table->value[i])); i++;*/
|
asm volatile("mtsr 5, %0" : : "r" (table->value[i])); i++;*/
|
||||||
//asm volatile("mtsr 6, %0" : : "r" (table->value[6])); i++;
|
//asm volatile("mtsr 6, %0" : : "r" (table->value[6])); i++;
|
||||||
/*asm volatile("mtsr 7, %0" : : "r" (table->value[i])); i++;*/
|
/*asm volatile("mtsr 7, %0" : : "r" (table->value[i])); i++;*/
|
||||||
asm volatile("mtsr 8, %0" : : "r" (table->value[8])); i++;
|
asm volatile("mtsr 8, %0" : : "r" (table->value[8]));
|
||||||
|
i++;
|
||||||
/*asm volatile("mtsr 9, %0" : : "r" (table->value[i])); i++;
|
/*asm volatile("mtsr 9, %0" : : "r" (table->value[i])); i++;
|
||||||
asm volatile("mtsr 10, %0" : : "r" (table->value[i])); i++;
|
asm volatile("mtsr 10, %0" : : "r" (table->value[i])); i++;
|
||||||
asm volatile("mtsr 11, %0" : : "r" (table->value[i])); i++;
|
asm volatile("mtsr 11, %0" : : "r" (table->value[i])); i++;
|
||||||
|
@ -18,8 +18,12 @@ uint32_t * getFromGX2Buffer(struct buffer_store store, uint32_t size) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void overlay_helper(wups_overlay_options_type_t screen, overlay_callback callback, void * args) {
|
void overlay_helper(wups_overlay_options_type_t screen, overlay_callback callback, void * args) {
|
||||||
if(callback == NULL) return;
|
if(callback == NULL) {
|
||||||
if(!OSIsHomeButtonMenuEnabled()) return; // This pauses the game. Make sure to only do it when the home button is allowed.
|
return;
|
||||||
|
}
|
||||||
|
if(!OSIsHomeButtonMenuEnabled()) {
|
||||||
|
return; // This pauses the game. Make sure to only do it when the home button is allowed.
|
||||||
|
}
|
||||||
|
|
||||||
//TODO: Make sure this actually pauses the game (Hook on GX2VSync?) . Currently only tested from VPADRead which also pauses the game.
|
//TODO: Make sure this actually pauses the game (Hook on GX2VSync?) . Currently only tested from VPADRead which also pauses the game.
|
||||||
|
|
||||||
|
@ -23,14 +23,13 @@
|
|||||||
#include "mem_utils.h"
|
#include "mem_utils.h"
|
||||||
|
|
||||||
void gdImageToUnormR8G8B8A8(gdImagePtr gdImg, u32 *imgBuffer, u32 width, u32 height, u32 pitch) {
|
void gdImageToUnormR8G8B8A8(gdImagePtr gdImg, u32 *imgBuffer, u32 width, u32 height, u32 pitch) {
|
||||||
for(u32 y = 0; y < height; ++y)
|
for(u32 y = 0; y < height; ++y) {
|
||||||
{
|
for(u32 x = 0; x < width; ++x) {
|
||||||
for(u32 x = 0; x < width; ++x)
|
|
||||||
{
|
|
||||||
u32 pixel = gdImageGetPixel(gdImg, x, y);
|
u32 pixel = gdImageGetPixel(gdImg, x, y);
|
||||||
|
|
||||||
u8 a = 254 - 2*((u8)gdImageAlpha(gdImg, pixel));
|
u8 a = 254 - 2*((u8)gdImageAlpha(gdImg, pixel));
|
||||||
if(a == 254) a++;
|
if(a == 254)
|
||||||
|
a++;
|
||||||
|
|
||||||
u8 r = gdImageRed(gdImg, pixel);
|
u8 r = gdImageRed(gdImg, pixel);
|
||||||
u8 g = gdImageGreen(gdImg, pixel);
|
u8 g = gdImageGreen(gdImg, pixel);
|
||||||
|
@ -494,7 +494,8 @@ bool ElfTools::elfLinkOne(char type, size_t offset, int32_t addend, void *destin
|
|||||||
|
|
||||||
result = true;
|
result = true;
|
||||||
exit_error:
|
exit_error:
|
||||||
if (!result) DEBUG_FUNCTION_LINE("Plugin_ElfLinkOne: exit_error\n");
|
if (!result)
|
||||||
|
DEBUG_FUNCTION_LINE("Plugin_ElfLinkOne: exit_error\n");
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -54,8 +54,7 @@ extern const uint32_t switchIconOn_png_size;
|
|||||||
extern const uint8_t TwitterIcon_png[];
|
extern const uint8_t TwitterIcon_png[];
|
||||||
extern const uint32_t TwitterIcon_png_size;
|
extern const uint32_t TwitterIcon_png_size;
|
||||||
|
|
||||||
static ResourceFile ResourceList[] =
|
static ResourceFile ResourceList[] = {
|
||||||
{
|
|
||||||
{"font.ttf", font_ttf, font_ttf_size, NULL, 0},
|
{"font.ttf", font_ttf, font_ttf_size, NULL, 0},
|
||||||
{"gameSettingsButton.png", gameSettingsButton_png, gameSettingsButton_png_size, NULL, 0},
|
{"gameSettingsButton.png", gameSettingsButton_png, gameSettingsButton_png_size, NULL, 0},
|
||||||
{"gameSettingsButtonEx.png", gameSettingsButtonEx_png, gameSettingsButtonEx_png_size, NULL, 0},
|
{"gameSettingsButtonEx.png", gameSettingsButtonEx_png, gameSettingsButtonEx_png_size, NULL, 0},
|
||||||
@ -74,5 +73,7 @@ static ResourceFile ResourceList[] =
|
|||||||
{NULL, NULL, 0, NULL, 0}
|
{NULL, NULL, 0, NULL, 0}
|
||||||
};
|
};
|
||||||
|
|
||||||
ResourceFile * getResourceList(){ return ResourceList; }
|
ResourceFile * getResourceList() {
|
||||||
|
return ResourceList;
|
||||||
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user