mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-23 14:19:55 -06:00
lay base for OSD
This commit is contained in:
@ -11,6 +11,7 @@ SET(SOURCES_LIBUI
|
|||||||
DlgInputConfig.cpp
|
DlgInputConfig.cpp
|
||||||
DlgVideoSettings.cpp
|
DlgVideoSettings.cpp
|
||||||
DlgWifiSettings.cpp
|
DlgWifiSettings.cpp
|
||||||
|
OSD.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
option(BUILD_SHARED_LIBS "Whether to build libui as a shared library or a static library" ON)
|
option(BUILD_SHARED_LIBS "Whether to build libui as a shared library or a static library" ON)
|
||||||
|
305
src/libui_sdl/OSD.cpp
Normal file
305
src/libui_sdl/OSD.cpp
Normal file
@ -0,0 +1,305 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2016-2019 Arisotura
|
||||||
|
|
||||||
|
This file is part of melonDS.
|
||||||
|
|
||||||
|
melonDS is free software: you can redistribute it and/or modify it under
|
||||||
|
the terms of the GNU General Public License as published by the Free
|
||||||
|
Software Foundation, either version 3 of the License, or (at your option)
|
||||||
|
any later version.
|
||||||
|
|
||||||
|
melonDS is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||||
|
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along
|
||||||
|
with melonDS. If not, see http://www.gnu.org/licenses/.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <queue>
|
||||||
|
#include <SDL2/SDL.h>
|
||||||
|
#include "types.h"
|
||||||
|
#include "OSD.h"
|
||||||
|
|
||||||
|
#include "libui/ui.h"
|
||||||
|
#include "../OpenGLSupport.h"
|
||||||
|
|
||||||
|
#include "font.h"
|
||||||
|
|
||||||
|
extern int WindowWidth, WindowHeight;
|
||||||
|
|
||||||
|
namespace OSD
|
||||||
|
{
|
||||||
|
|
||||||
|
const u32 kOSDMargin = 6;
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
Uint32 Timestamp;
|
||||||
|
u32 Width, Height;
|
||||||
|
u32* Bitmap;
|
||||||
|
|
||||||
|
bool DrawBitmapLoaded;
|
||||||
|
uiDrawBitmap* DrawBitmap;
|
||||||
|
|
||||||
|
bool GLTextureLoaded;
|
||||||
|
GLuint GLTexture;
|
||||||
|
|
||||||
|
} Item;
|
||||||
|
|
||||||
|
std::queue<Item*> CurrentItems;
|
||||||
|
|
||||||
|
|
||||||
|
bool Init()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void DeInit()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int FindBreakPoint(const char* text, int i)
|
||||||
|
{
|
||||||
|
// i = character that went out of bounds
|
||||||
|
|
||||||
|
for (int j = i; j >= 0; j--)
|
||||||
|
{
|
||||||
|
if (text[j] == ' ')
|
||||||
|
return j;
|
||||||
|
}
|
||||||
|
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
|
||||||
|
void LayoutText(const char* text, u32* width, u32* height, int* breaks)
|
||||||
|
{
|
||||||
|
u32 w = 0;
|
||||||
|
u32 h = 14;
|
||||||
|
u32 totalw = 0;
|
||||||
|
u32 maxw = WindowWidth - (kOSDMargin*2);
|
||||||
|
int lastbreak = -1;
|
||||||
|
int numbrk = 0;
|
||||||
|
u16* ptr;
|
||||||
|
|
||||||
|
memset(breaks, 0, sizeof(int)*64);
|
||||||
|
|
||||||
|
for (int i = 0; text[i] != '\0'; )
|
||||||
|
{
|
||||||
|
int glyphsize;
|
||||||
|
if (text[i] == ' ')
|
||||||
|
{
|
||||||
|
glyphsize = 6;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
u32 ch = text[i];
|
||||||
|
if (ch < 0x10 || ch > 0x7E) ch = 0x7F;
|
||||||
|
|
||||||
|
ptr = &font[(ch-0x10) << 4];
|
||||||
|
glyphsize = ptr[0];
|
||||||
|
if (!glyphsize) glyphsize = 6;
|
||||||
|
else glyphsize += 2; // space around the character
|
||||||
|
}
|
||||||
|
|
||||||
|
w += glyphsize;
|
||||||
|
if (w > maxw)
|
||||||
|
{
|
||||||
|
// wrap shit as needed
|
||||||
|
if (text[i] == ' ')
|
||||||
|
{
|
||||||
|
if (numbrk >= 64) break;
|
||||||
|
breaks[numbrk++] = i;
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
int brk = FindBreakPoint(text, i);
|
||||||
|
if (brk != lastbreak) i = brk;
|
||||||
|
|
||||||
|
if (numbrk >= 64) break;
|
||||||
|
breaks[numbrk++] = i;
|
||||||
|
|
||||||
|
lastbreak = brk;
|
||||||
|
}
|
||||||
|
|
||||||
|
w = 0;
|
||||||
|
h += 14;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
i++;
|
||||||
|
|
||||||
|
if (w > totalw) totalw = w;
|
||||||
|
}
|
||||||
|
|
||||||
|
*width = totalw;
|
||||||
|
*height = h;
|
||||||
|
}
|
||||||
|
|
||||||
|
u32 RainbowColor(u32 inc)
|
||||||
|
{
|
||||||
|
// inspired from Acmlmboard
|
||||||
|
|
||||||
|
if (inc < 100) return 0xFFFF9BFF + (inc << 8);
|
||||||
|
else if (inc < 200) return 0xFFFFFF9B - ((inc-100) << 16);
|
||||||
|
else if (inc < 300) return 0xFF9BFF9B + (inc-200);
|
||||||
|
else if (inc < 400) return 0xFF9BFFFF - ((inc-300) << 8);
|
||||||
|
else if (inc < 500) return 0xFF9B9BFF + ((inc-400) << 16);
|
||||||
|
else return 0xFFFF9BFF - (inc-500);
|
||||||
|
}
|
||||||
|
|
||||||
|
void RenderText(u32 color, const char* text, Item* item)
|
||||||
|
{
|
||||||
|
u32 w, h;
|
||||||
|
int breaks[64];
|
||||||
|
|
||||||
|
bool rainbow = (color == 0);
|
||||||
|
u32 rainbowinc = rand() % 600;
|
||||||
|
|
||||||
|
color |= 0xFF000000;
|
||||||
|
const u32 shadow = 0xC0000000;
|
||||||
|
|
||||||
|
LayoutText(text, &w, &h, breaks);
|
||||||
|
|
||||||
|
item->Width = w;
|
||||||
|
item->Height = h;
|
||||||
|
item->Bitmap = new u32[w*h];
|
||||||
|
memset(item->Bitmap, 0, w*h*sizeof(u32));
|
||||||
|
|
||||||
|
u32 x = 0, y = 1;
|
||||||
|
u32 maxw = WindowWidth - (kOSDMargin*2);
|
||||||
|
int curline = 0;
|
||||||
|
u16* ptr;
|
||||||
|
|
||||||
|
for (int i = 0; text[i] != '\0'; )
|
||||||
|
{
|
||||||
|
int glyphsize;
|
||||||
|
if (text[i] == ' ')
|
||||||
|
{
|
||||||
|
x += 6;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
u32 ch = text[i];
|
||||||
|
if (ch < 0x10 || ch > 0x7E) ch = 0x7F;
|
||||||
|
|
||||||
|
ptr = &font[(ch-0x10) << 4];
|
||||||
|
int glyphsize = ptr[0];
|
||||||
|
if (!glyphsize) x += 6;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
x++;
|
||||||
|
|
||||||
|
if (rainbow)
|
||||||
|
{
|
||||||
|
color = RainbowColor(rainbowinc);
|
||||||
|
rainbowinc = (rainbowinc + 30) % 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
// draw character
|
||||||
|
for (int cy = 0; cy < 12; cy++)
|
||||||
|
{
|
||||||
|
u16 val = ptr[4+cy];
|
||||||
|
|
||||||
|
for (int cx = 0; cx < glyphsize; cx++)
|
||||||
|
{
|
||||||
|
if (val & (1<<cx))
|
||||||
|
item->Bitmap[((y+cy) * w) + x+cx] = color;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
x += glyphsize;
|
||||||
|
x++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
i++;
|
||||||
|
if (breaks[curline] && i >= breaks[curline])
|
||||||
|
{
|
||||||
|
i = breaks[curline++];
|
||||||
|
if (text[i] == ' ') i++;
|
||||||
|
|
||||||
|
x = 0;
|
||||||
|
y += 14;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// shadow
|
||||||
|
for (y = 0; y < h; y++)
|
||||||
|
{
|
||||||
|
for (x = 0; x < w; x++)
|
||||||
|
{
|
||||||
|
u32 val;
|
||||||
|
|
||||||
|
val = item->Bitmap[(y * w) + x];
|
||||||
|
if ((val >> 24) == 0xFF) continue;
|
||||||
|
|
||||||
|
if (x > 0) val = item->Bitmap[(y * w) + x-1];
|
||||||
|
if (x < w-1) val |= item->Bitmap[(y * w) + x+1];
|
||||||
|
if (y > 0)
|
||||||
|
{
|
||||||
|
if (x > 0) val |= item->Bitmap[((y-1) * w) + x-1];
|
||||||
|
val |= item->Bitmap[((y-1) * w) + x];
|
||||||
|
if (x < w-1) val |= item->Bitmap[((y-1) * w) + x+1];
|
||||||
|
}
|
||||||
|
if (y < h-1)
|
||||||
|
{
|
||||||
|
if (x > 0) val |= item->Bitmap[((y+1) * w) + x-1];
|
||||||
|
val |= item->Bitmap[((y+1) * w) + x];
|
||||||
|
if (x < w-1) val |= item->Bitmap[((y+1) * w) + x+1];
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((val >> 24) == 0xFF)
|
||||||
|
item->Bitmap[(y * w) + x] = shadow;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void test(u32* berp)
|
||||||
|
{
|
||||||
|
Item barp;
|
||||||
|
RenderText(0x000000, "This is a test of OSD, it can display really long messages, like thiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiis. Also, pancakes are the best thing ever.", &barp);
|
||||||
|
|
||||||
|
for (int y = 0; y < barp.Height; y++)
|
||||||
|
{
|
||||||
|
for (int x = 0; x < barp.Width; x++)
|
||||||
|
{
|
||||||
|
u32 src = barp.Bitmap[(y*barp.Width)+x];
|
||||||
|
u32 dst = berp[((y+6)*256)+x+6];
|
||||||
|
|
||||||
|
u32 sR = (src >> 16) & 0xFF;
|
||||||
|
u32 sG = (src >> 8) & 0xFF;
|
||||||
|
u32 sB = (src ) & 0xFF;
|
||||||
|
u32 sA = (src >> 24) & 0xFF;
|
||||||
|
|
||||||
|
u32 dR = (dst >> 16) & 0xFF;
|
||||||
|
u32 dG = (dst >> 8) & 0xFF;
|
||||||
|
u32 dB = (dst ) & 0xFF;
|
||||||
|
|
||||||
|
dR = ((sR * sA) + (dR * (255-sA))) >> 8;
|
||||||
|
dG = ((sG * sA) + (dG * (255-sA))) >> 8;
|
||||||
|
dB = ((sB * sA) + (dB * (255-sA))) >> 8;
|
||||||
|
|
||||||
|
dst = (dR << 16) | (dG << 8) | dB;
|
||||||
|
|
||||||
|
berp[((y+6)*256)+x+6] = dst | 0xFF000000;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
delete[] barp.Bitmap;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void AddMessage(u32 color, const char* text)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
void Update(bool opengl)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
36
src/libui_sdl/OSD.h
Normal file
36
src/libui_sdl/OSD.h
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2016-2019 Arisotura
|
||||||
|
|
||||||
|
This file is part of melonDS.
|
||||||
|
|
||||||
|
melonDS is free software: you can redistribute it and/or modify it under
|
||||||
|
the terms of the GNU General Public License as published by the Free
|
||||||
|
Software Foundation, either version 3 of the License, or (at your option)
|
||||||
|
any later version.
|
||||||
|
|
||||||
|
melonDS is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||||
|
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along
|
||||||
|
with melonDS. If not, see http://www.gnu.org/licenses/.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef OSD_H
|
||||||
|
#define OSD_H
|
||||||
|
|
||||||
|
namespace OSD
|
||||||
|
{
|
||||||
|
|
||||||
|
bool Init();
|
||||||
|
void DeInit();
|
||||||
|
|
||||||
|
void test(u32* berp);
|
||||||
|
|
||||||
|
void AddMessage(u32 color, const char* text);
|
||||||
|
|
||||||
|
void Update(bool opengl);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // OSD_H
|
135
src/libui_sdl/font.h
Normal file
135
src/libui_sdl/font.h
Normal file
@ -0,0 +1,135 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2016-2019 Arisotura
|
||||||
|
|
||||||
|
This file is part of melonDS.
|
||||||
|
|
||||||
|
melonDS is free software: you can redistribute it and/or modify it under
|
||||||
|
the terms of the GNU General Public License as published by the Free
|
||||||
|
Software Foundation, either version 3 of the License, or (at your option)
|
||||||
|
any later version.
|
||||||
|
|
||||||
|
melonDS is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||||
|
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along
|
||||||
|
with melonDS. If not, see http://www.gnu.org/licenses/.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef FONT_H
|
||||||
|
#define FONT_H
|
||||||
|
unsigned short font[] = {
|
||||||
|
12, 0, 0, 0,0x0C03, 0x0E07, 0x070E, 0x039C, 0x01F8, 0x00F0, 0x00F0, 0x01F8, 0x039C, 0x070E, 0x0E07, 0x0C03,
|
||||||
|
12, 0, 0, 0,0x01C0, 0x00E0, 0x0060, 0x0860, 0x0C60, 0x0FE0, 0x07F0, 0x0038, 0x001C, 0x000E, 0x0007, 0x0003,
|
||||||
|
12, 0, 0, 0,0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||||
|
12, 0, 0, 0,0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||||
|
12, 0, 0, 0,0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||||
|
12, 0, 0, 0,0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||||
|
12, 0, 0, 0,0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||||
|
12, 0, 0, 0,0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||||
|
12, 0, 0, 0,0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||||
|
12, 0, 0, 0,0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||||
|
12, 0, 0, 0,0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||||
|
12, 0, 0, 0,0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||||
|
12, 0, 0, 0,0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||||
|
12, 0, 0, 0,0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||||
|
12, 0, 0, 0,0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||||
|
12, 0, 0, 0,0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
2, 0, 0, 0,0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0000, 0x0000, 0x0003, 0x0003, 0x0000, 0x0000,
|
||||||
|
9, 0, 0, 0,0x01EF, 0x01EF, 0x018C, 0x01CE, 0x00E7, 0x0063, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||||
|
10, 0, 0, 0,0x00CC, 0x00CC, 0x03FF, 0x03FF, 0x00CC, 0x00CC, 0x03FF, 0x03FF, 0x00CC, 0x00CC, 0x0000, 0x0000,
|
||||||
|
8, 0, 0, 0,0x0018, 0x00FE, 0x00FF, 0x001B, 0x007F, 0x00FE, 0x00D8, 0x00FF, 0x007F, 0x0018, 0x0000, 0x0000,
|
||||||
|
10, 0, 0, 0,0x0306, 0x038F, 0x01CF, 0x00E6, 0x0070, 0x0038, 0x019C, 0x03CE, 0x03C7, 0x0183, 0x0000, 0x0000,
|
||||||
|
10, 0, 0, 0,0x007C, 0x00FE, 0x00C6, 0x00EE, 0x007C, 0x037E, 0x03E7, 0x01F3, 0x03BF, 0x031E, 0x0000, 0x0000,
|
||||||
|
4, 0, 0, 0,0x000F, 0x000F, 0x000C, 0x000E, 0x0007, 0x0003, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||||
|
4, 0, 0, 0,0x000C, 0x000E, 0x0007, 0x0003, 0x0003, 0x0003, 0x0003, 0x0007, 0x000E, 0x000C, 0x0000, 0x0000,
|
||||||
|
4, 0, 0, 0,0x0003, 0x0007, 0x000E, 0x000C, 0x000C, 0x000C, 0x000C, 0x000E, 0x0007, 0x0003, 0x0000, 0x0000,
|
||||||
|
10, 0, 0, 0,0x0030, 0x0333, 0x03B7, 0x01FE, 0x00FC, 0x00FC, 0x01FE, 0x03B7, 0x0333, 0x0030, 0x0000, 0x0000,
|
||||||
|
10, 0, 0, 0,0x0030, 0x0030, 0x0030, 0x0030, 0x03FF, 0x03FF, 0x0030, 0x0030, 0x0030, 0x0030, 0x0000, 0x0000,
|
||||||
|
4, 0, 0, 0,0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x000F, 0x000F, 0x000C, 0x000E, 0x0007, 0x0003,
|
||||||
|
10, 0, 0, 0,0x0000, 0x0000, 0x0000, 0x0000, 0x03FF, 0x03FF, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||||
|
3, 0, 0, 0,0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0007, 0x0007, 0x0007, 0x0000, 0x0000,
|
||||||
|
10, 0, 0, 0,0x0300, 0x0380, 0x01C0, 0x00E0, 0x0070, 0x0038, 0x001C, 0x000E, 0x0007, 0x0003, 0x0000, 0x0000,
|
||||||
|
8, 0, 0, 0,0x007E, 0x00FF, 0x00C3, 0x00C3, 0x00C3, 0x00C3, 0x00C3, 0x00C3, 0x00FF, 0x007E, 0x0000, 0x0000,
|
||||||
|
4, 0, 0, 0,0x0006, 0x0007, 0x0007, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x000F, 0x000F, 0x0000, 0x0000,
|
||||||
|
8, 0, 0, 0,0x007E, 0x00FF, 0x00C3, 0x00C0, 0x00FE, 0x007F, 0x0003, 0x0003, 0x00FF, 0x00FF, 0x0000, 0x0000,
|
||||||
|
8, 0, 0, 0,0x007F, 0x00FF, 0x00C0, 0x00C0, 0x007C, 0x00FC, 0x00C0, 0x00C0, 0x00FF, 0x007F, 0x0000, 0x0000,
|
||||||
|
8, 0, 0, 0,0x0063, 0x0063, 0x0063, 0x0063, 0x0063, 0x0063, 0x00FF, 0x00FE, 0x0060, 0x0060, 0x0000, 0x0000,
|
||||||
|
8, 0, 0, 0,0x00FF, 0x00FF, 0x0003, 0x0003, 0x007F, 0x00FF, 0x00C0, 0x00C0, 0x00FF, 0x007F, 0x0000, 0x0000,
|
||||||
|
8, 0, 0, 0,0x007E, 0x007F, 0x0003, 0x0003, 0x007F, 0x00FF, 0x00C3, 0x00C3, 0x00FF, 0x007E, 0x0000, 0x0000,
|
||||||
|
8, 0, 0, 0,0x00FF, 0x00FF, 0x00C0, 0x00E0, 0x0070, 0x0038, 0x001C, 0x000C, 0x000C, 0x000C, 0x0000, 0x0000,
|
||||||
|
8, 0, 0, 0,0x007E, 0x00FF, 0x00C3, 0x00C3, 0x007E, 0x00FF, 0x00C3, 0x00C3, 0x00FF, 0x007E, 0x0000, 0x0000,
|
||||||
|
8, 0, 0, 0,0x007E, 0x00FF, 0x00C3, 0x00C3, 0x00FF, 0x00FE, 0x00C0, 0x00C0, 0x00FE, 0x007E, 0x0000, 0x0000,
|
||||||
|
3, 0, 0, 0,0x0000, 0x0000, 0x0007, 0x0007, 0x0000, 0x0000, 0x0000, 0x0007, 0x0007, 0x0000, 0x0000, 0x0000,
|
||||||
|
4, 0, 0, 0,0x0000, 0x0000, 0x000E, 0x000E, 0x0000, 0x0000, 0x000C, 0x000E, 0x0007, 0x0003, 0x0000, 0x0000,
|
||||||
|
6, 0, 0, 0,0x0030, 0x0038, 0x001C, 0x000E, 0x0007, 0x0007, 0x000E, 0x001C, 0x0038, 0x0030, 0x0000, 0x0000,
|
||||||
|
7, 0, 0, 0,0x0000, 0x0000, 0x0000, 0x007F, 0x007F, 0x0000, 0x0000, 0x007F, 0x007F, 0x0000, 0x0000, 0x0000,
|
||||||
|
6, 0, 0, 0,0x0003, 0x0007, 0x000E, 0x001C, 0x0038, 0x0038, 0x001C, 0x000E, 0x0007, 0x0003, 0x0000, 0x0000,
|
||||||
|
8, 0, 0, 0,0x007E, 0x00FF, 0x00C3, 0x00C3, 0x00F0, 0x0078, 0x0018, 0x0000, 0x0018, 0x0018, 0x0000, 0x0000,
|
||||||
|
10, 0, 0, 0,0x00FC, 0x01FE, 0x0387, 0x0333, 0x037B, 0x03FB, 0x01F3, 0x0007, 0x03FE, 0x03FC, 0x0000, 0x0000,
|
||||||
|
9, 0, 0, 0,0x00FE, 0x01FF, 0x0183, 0x0183, 0x0183, 0x01FF, 0x01FF, 0x0183, 0x0183, 0x0183, 0x0000, 0x0000,
|
||||||
|
9, 0, 0, 0,0x00FF, 0x01FF, 0x0183, 0x0183, 0x00FF, 0x01FF, 0x0183, 0x0183, 0x01FF, 0x00FF, 0x0000, 0x0000,
|
||||||
|
8, 0, 0, 0,0x00FE, 0x00FF, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x00FF, 0x00FE, 0x0000, 0x0000,
|
||||||
|
9, 0, 0, 0,0x007F, 0x00FF, 0x01C3, 0x0183, 0x0183, 0x0183, 0x0183, 0x01C3, 0x00FF, 0x007F, 0x0000, 0x0000,
|
||||||
|
9, 0, 0, 0,0x01FF, 0x01FF, 0x0003, 0x0003, 0x00FF, 0x00FF, 0x0003, 0x0003, 0x01FF, 0x01FF, 0x0000, 0x0000,
|
||||||
|
9, 0, 0, 0,0x01FF, 0x01FF, 0x0003, 0x0003, 0x00FF, 0x00FF, 0x0003, 0x0003, 0x0003, 0x0003, 0x0000, 0x0000,
|
||||||
|
9, 0, 0, 0,0x01FE, 0x01FF, 0x0003, 0x0003, 0x01F3, 0x01F3, 0x0183, 0x0183, 0x01FF, 0x00FE, 0x0000, 0x0000,
|
||||||
|
9, 0, 0, 0,0x0183, 0x0183, 0x0183, 0x0183, 0x01FF, 0x01FF, 0x0183, 0x0183, 0x0183, 0x0183, 0x0000, 0x0000,
|
||||||
|
6, 0, 0, 0,0x003F, 0x003F, 0x000C, 0x000C, 0x000C, 0x000C, 0x000C, 0x000C, 0x003F, 0x003F, 0x0000, 0x0000,
|
||||||
|
9, 0, 0, 0,0x01F0, 0x01F0, 0x00C0, 0x00C0, 0x00C0, 0x00C0, 0x00C3, 0x00C3, 0x00FF, 0x007E, 0x0000, 0x0000,
|
||||||
|
9, 0, 0, 0,0x0183, 0x01C3, 0x00E3, 0x0073, 0x003F, 0x003F, 0x0073, 0x00E3, 0x01C3, 0x0183, 0x0000, 0x0000,
|
||||||
|
7, 0, 0, 0,0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x007F, 0x007F, 0x0000, 0x0000,
|
||||||
|
10, 0, 0, 0,0x0303, 0x0387, 0x03CF, 0x03FF, 0x037B, 0x0333, 0x0303, 0x0303, 0x0303, 0x0303, 0x0000, 0x0000,
|
||||||
|
10, 0, 0, 0,0x0303, 0x0307, 0x030F, 0x031F, 0x033B, 0x0373, 0x03E3, 0x03C3, 0x0383, 0x0303, 0x0000, 0x0000,
|
||||||
|
10, 0, 0, 0,0x01FE, 0x03FF, 0x0303, 0x0303, 0x0303, 0x0303, 0x0303, 0x0303, 0x03FF, 0x01FE, 0x0000, 0x0000,
|
||||||
|
9, 0, 0, 0,0x00FF, 0x01FF, 0x0183, 0x0183, 0x01FF, 0x00FF, 0x0003, 0x0003, 0x0003, 0x0003, 0x0000, 0x0000,
|
||||||
|
10, 0, 0, 0,0x01FE, 0x03FF, 0x0303, 0x0303, 0x0333, 0x0373, 0x03E3, 0x01C3, 0x03FF, 0x037E, 0x0000, 0x0000,
|
||||||
|
9, 0, 0, 0,0x00FF, 0x01FF, 0x0183, 0x0183, 0x01FF, 0x00FF, 0x0073, 0x00E3, 0x01C3, 0x0183, 0x0000, 0x0000,
|
||||||
|
10, 0, 0, 0,0x01FE, 0x01FF, 0x0003, 0x0003, 0x01FF, 0x03FE, 0x0300, 0x0300, 0x03FE, 0x01FE, 0x0000, 0x0000,
|
||||||
|
10, 0, 0, 0,0x03FF, 0x03FF, 0x0030, 0x0030, 0x0030, 0x0030, 0x0030, 0x0030, 0x0030, 0x0030, 0x0000, 0x0000,
|
||||||
|
9, 0, 0, 0,0x0183, 0x0183, 0x0183, 0x0183, 0x0183, 0x0183, 0x0183, 0x0183, 0x01FF, 0x00FE, 0x0000, 0x0000,
|
||||||
|
10, 0, 0, 0,0x0303, 0x0303, 0x0303, 0x0303, 0x0303, 0x0387, 0x01CE, 0x00FC, 0x0078, 0x0030, 0x0000, 0x0000,
|
||||||
|
10, 0, 0, 0,0x0303, 0x0303, 0x0303, 0x0303, 0x0333, 0x037B, 0x03FF, 0x03CF, 0x0387, 0x0303, 0x0000, 0x0000,
|
||||||
|
10, 0, 0, 0,0x0303, 0x0387, 0x01CE, 0x00FC, 0x0078, 0x0078, 0x00FC, 0x01CE, 0x0387, 0x0303, 0x0000, 0x0000,
|
||||||
|
10, 0, 0, 0,0x0303, 0x0387, 0x01CE, 0x00FC, 0x0078, 0x0030, 0x0030, 0x0030, 0x0030, 0x0030, 0x0000, 0x0000,
|
||||||
|
10, 0, 0, 0,0x03FF, 0x03FF, 0x01C0, 0x00E0, 0x0070, 0x0038, 0x001C, 0x000E, 0x03FF, 0x03FF, 0x0000, 0x0000,
|
||||||
|
4, 0, 0, 0,0x000F, 0x000F, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x000F, 0x000F, 0x0000, 0x0000,
|
||||||
|
10, 0, 0, 0,0x0003, 0x0007, 0x000E, 0x001C, 0x0038, 0x0070, 0x00E0, 0x01C0, 0x0380, 0x0300, 0x0000, 0x0000,
|
||||||
|
4, 0, 0, 0,0x000F, 0x000F, 0x000C, 0x000C, 0x000C, 0x000C, 0x000C, 0x000C, 0x000F, 0x000F, 0x0000, 0x0000,
|
||||||
|
8, 0, 0, 0,0x0018, 0x003C, 0x007E, 0x00E7, 0x00C3, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||||
|
10, 0, 0, 0,0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x03FF, 0x03FF,
|
||||||
|
4, 0, 0, 0,0x000F, 0x000F, 0x0003, 0x0007, 0x000E, 0x000C, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||||
|
7, 0, 0, 0,0x0000, 0x0000, 0x003E, 0x007E, 0x0060, 0x007E, 0x007F, 0x0063, 0x007F, 0x007E, 0x0000, 0x0000,
|
||||||
|
7, 0, 0, 0,0x0003, 0x0003, 0x0003, 0x003F, 0x007F, 0x0063, 0x0063, 0x0063, 0x007F, 0x003F, 0x0000, 0x0000,
|
||||||
|
7, 0, 0, 0,0x0000, 0x0000, 0x007E, 0x007F, 0x0003, 0x0003, 0x0003, 0x0003, 0x007F, 0x007E, 0x0000, 0x0000,
|
||||||
|
7, 0, 0, 0,0x0060, 0x0060, 0x0060, 0x007E, 0x007F, 0x0063, 0x0063, 0x0063, 0x007F, 0x007E, 0x0000, 0x0000,
|
||||||
|
7, 0, 0, 0,0x0000, 0x0000, 0x003E, 0x007F, 0x0063, 0x007F, 0x003F, 0x0003, 0x003F, 0x003E, 0x0000, 0x0000,
|
||||||
|
6, 0, 0, 0,0x003C, 0x003E, 0x0006, 0x0006, 0x001F, 0x001F, 0x0006, 0x0006, 0x0006, 0x0006, 0x0000, 0x0000,
|
||||||
|
7, 0, 0, 0,0x0000, 0x0000, 0x007E, 0x007F, 0x0063, 0x0063, 0x007F, 0x007E, 0x0060, 0x0060, 0x007E, 0x003E,
|
||||||
|
7, 0, 0, 0,0x0003, 0x0003, 0x0003, 0x003F, 0x007F, 0x0063, 0x0063, 0x0063, 0x0063, 0x0063, 0x0000, 0x0000,
|
||||||
|
2, 0, 0, 0,0x0003, 0x0003, 0x0000, 0x0000, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0000, 0x0000,
|
||||||
|
7, 0, 0, 0,0x0060, 0x0060, 0x0000, 0x0000, 0x0060, 0x0060, 0x0060, 0x0060, 0x0060, 0x0063, 0x007F, 0x003E,
|
||||||
|
8, 0, 0, 0,0x0003, 0x0003, 0x00E3, 0x0073, 0x003B, 0x001F, 0x001F, 0x003B, 0x0073, 0x00E3, 0x0000, 0x0000,
|
||||||
|
4, 0, 0, 0,0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x000F, 0x000E, 0x0000, 0x0000,
|
||||||
|
10, 0, 0, 0,0x0000, 0x0000, 0x01FF, 0x03FF, 0x0333, 0x0333, 0x0333, 0x0333, 0x0333, 0x0333, 0x0000, 0x0000,
|
||||||
|
7, 0, 0, 0,0x0000, 0x0000, 0x003F, 0x007F, 0x0063, 0x0063, 0x0063, 0x0063, 0x0063, 0x0063, 0x0000, 0x0000,
|
||||||
|
8, 0, 0, 0,0x0000, 0x0000, 0x007E, 0x00FF, 0x00C3, 0x00C3, 0x00C3, 0x00C3, 0x00FF, 0x007E, 0x0000, 0x0000,
|
||||||
|
7, 0, 0, 0,0x0000, 0x0000, 0x003F, 0x007F, 0x0063, 0x0063, 0x007F, 0x003F, 0x0003, 0x0003, 0x0003, 0x0003,
|
||||||
|
7, 0, 0, 0,0x0000, 0x0000, 0x007E, 0x007F, 0x0063, 0x0063, 0x007F, 0x007E, 0x0060, 0x0060, 0x0060, 0x0060,
|
||||||
|
7, 0, 0, 0,0x0000, 0x0000, 0x003B, 0x007F, 0x0067, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0000, 0x0000,
|
||||||
|
8, 0, 0, 0,0x0000, 0x0000, 0x007E, 0x007F, 0x0003, 0x007F, 0x00FE, 0x00C0, 0x00FE, 0x007E, 0x0000, 0x0000,
|
||||||
|
6, 0, 0, 0,0x0006, 0x0006, 0x003F, 0x003F, 0x0006, 0x0006, 0x0006, 0x0006, 0x003E, 0x003C, 0x0000, 0x0000,
|
||||||
|
7, 0, 0, 0,0x0000, 0x0000, 0x0063, 0x0063, 0x0063, 0x0063, 0x0063, 0x0063, 0x007F, 0x007E, 0x0000, 0x0000,
|
||||||
|
10, 0, 0, 0,0x0000, 0x0000, 0x0303, 0x0303, 0x0303, 0x0387, 0x01CE, 0x00FC, 0x0078, 0x0030, 0x0000, 0x0000,
|
||||||
|
10, 0, 0, 0,0x0000, 0x0000, 0x0303, 0x0303, 0x0333, 0x037B, 0x03FF, 0x03CF, 0x0387, 0x0303, 0x0000, 0x0000,
|
||||||
|
8, 0, 0, 0,0x0000, 0x0000, 0x00C3, 0x00E7, 0x007E, 0x003C, 0x003C, 0x007E, 0x00E7, 0x00C3, 0x0000, 0x0000,
|
||||||
|
10, 0, 0, 0,0x0000, 0x0000, 0x0303, 0x0307, 0x038E, 0x01DC, 0x00F8, 0x0070, 0x0038, 0x001C, 0x000E, 0x0006,
|
||||||
|
8, 0, 0, 0,0x0000, 0x0000, 0x00FF, 0x00FF, 0x0070, 0x0038, 0x001C, 0x000E, 0x00FF, 0x00FF, 0x0000, 0x0000,
|
||||||
|
6, 0, 0, 0,0x0038, 0x003C, 0x000C, 0x000C, 0x000F, 0x000F, 0x000C, 0x000C, 0x003C, 0x0038, 0x0000, 0x0000,
|
||||||
|
2, 0, 0, 0,0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0000, 0x0000,
|
||||||
|
6, 0, 0, 0,0x0007, 0x000F, 0x000C, 0x000C, 0x003C, 0x003C, 0x000C, 0x000C, 0x000F, 0x0007, 0x0000, 0x0000,
|
||||||
|
10, 0, 0, 0,0x0000, 0x0000, 0x0000, 0x031C, 0x03BE, 0x01F7, 0x00E3, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||||
|
11, 0, 0, 0,0x0555, 0x0000, 0x0401, 0x0000, 0x0401, 0x0000, 0x0401, 0x0000, 0x0401, 0x0000, 0x0555, 0x0000,
|
||||||
|
};
|
||||||
|
#endif
|
@ -46,6 +46,8 @@
|
|||||||
|
|
||||||
#include "../Savestate.h"
|
#include "../Savestate.h"
|
||||||
|
|
||||||
|
#include "OSD.h"
|
||||||
|
|
||||||
|
|
||||||
// savestate slot mapping
|
// savestate slot mapping
|
||||||
// 1-8: regular slots (quick access)
|
// 1-8: regular slots (quick access)
|
||||||
@ -972,6 +974,8 @@ void OnAreaDraw(uiAreaHandler* handler, uiArea* area, uiAreaDrawParams* params)
|
|||||||
uiRect top = {0, 0, 256, 192};
|
uiRect top = {0, 0, 256, 192};
|
||||||
uiRect bot = {0, 0, 256, 192};
|
uiRect bot = {0, 0, 256, 192};
|
||||||
|
|
||||||
|
//OSD::test(GPU::Framebuffer[frontbuf][0]);
|
||||||
|
|
||||||
uiDrawBitmapUpdate(ScreenBitmap[0], GPU::Framebuffer[frontbuf][0]);
|
uiDrawBitmapUpdate(ScreenBitmap[0], GPU::Framebuffer[frontbuf][0]);
|
||||||
uiDrawBitmapUpdate(ScreenBitmap[1], GPU::Framebuffer[frontbuf][1]);
|
uiDrawBitmapUpdate(ScreenBitmap[1], GPU::Framebuffer[frontbuf][1]);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user