Fixed some warnings, theme should now be set based on the system theme
This commit is contained in:
parent
4ef5c0dd15
commit
b8cf331ff9
@ -85,7 +85,10 @@ static inline void DrawPixelRaw(uint32_t x, uint32_t y, color_t clr)
|
||||
static inline color_t FetchPixelColor(uint32_t x, uint32_t y)
|
||||
{
|
||||
u32 off = (y * g_framebuf_width + x)*4;
|
||||
return MakeColor(g_framebuf[off], g_framebuf[++off], g_framebuf[++off], 255);
|
||||
u8 r = g_framebuf[off]; off++;
|
||||
u8 g = g_framebuf[off]; off++;
|
||||
u8 b = g_framebuf[off];
|
||||
return MakeColor(r, g, b, 255);
|
||||
}
|
||||
#else
|
||||
extern color_t pixels[720][1280];
|
||||
|
@ -6,4 +6,8 @@ float approxSin(float x);
|
||||
|
||||
inline float clamp(float x, float min, float max) {
|
||||
return x<min ? min : x>max ? max : x;
|
||||
}
|
||||
|
||||
inline float nxfabs(float x) {
|
||||
return x < 0 ? -x : x;
|
||||
}
|
@ -219,7 +219,7 @@ void drawWave(float timer, color_t color, float height, float phase, float speed
|
||||
new_color = waveBlendAdd(existing_color, color, clamp(alpha, 0.0, 1.0) * 0.3);
|
||||
}
|
||||
else if (alpha < 0.3) { // anti-aliasing
|
||||
alpha = fabs(alpha);
|
||||
alpha = nxfabs(alpha);
|
||||
new_color = MakeColor(color.r * (1.0 - alpha) + existing_color.r * alpha, color.g * (1.0 - alpha) + existing_color.g * alpha, color.b * (1.0 - alpha) + existing_color.b * alpha, 255);
|
||||
}
|
||||
else { // darken closer to bottom of the waves
|
||||
@ -253,7 +253,6 @@ void menuLoop() {
|
||||
menuEntry_s* me;
|
||||
menu_s* menu = menuGetCurrent();
|
||||
int i;
|
||||
int cnt=0;
|
||||
int x, y;
|
||||
|
||||
for (x=0; x<1280; x++) {
|
||||
@ -290,8 +289,7 @@ void menuLoop() {
|
||||
// Draw menu entries
|
||||
for (me = menu->firstEntry, i = 0; me; me = me->next, i ++) {
|
||||
int entry_start_x = 29 + i * (140 + 30);
|
||||
int entry_end_x = entry_start_x + 140;
|
||||
|
||||
|
||||
int screen_width = 1280;
|
||||
if (entry_start_x >= (screen_width - x))
|
||||
break;
|
||||
|
@ -13,7 +13,9 @@ int main(int argc, char **argv)
|
||||
|
||||
appletSetScreenShotPermission(1);
|
||||
|
||||
//themeStartup();
|
||||
ColorSetId theme;
|
||||
setsysGetColorSetId(&theme);
|
||||
themeStartup((ThemePreset)theme);
|
||||
menuStartup();
|
||||
|
||||
launchInit();
|
||||
|
Loading…
Reference in New Issue
Block a user