Permalink
Browse files

Move TPT's icons to the (real) Private Use Area of the unicode

  • Loading branch information...
mniip committed May 1, 2018
1 parent b8c5e94 commit 833383b121d54e3c43bd17778496e9a576806c28
@@ -280,6 +280,7 @@ unsigned short font_ptrs[] = {
0x06FE, 0x070E, 0x071B, 0x0728, 0x0738, 0x0745, 0x0758, 0x0768,
0x0778, 0x0788, 0x0798, 0x07A5, 0x07B5, 0x07C2, 0x07D2, 0x07E2,
0x07F5, 0x0805, 0x0815, 0x0825, 0x0832, 0x0839, 0x0846, 0x0859,
0x0866, 0x087F, 0x08A4, 0x08C9, 0x08E8, 0x090D, 0x092C, 0x094B,
0x096A, 0x0989, 0x09A8, 0x09C7, 0x09E6, 0x0A0B, 0x0A1E, 0x0A3D,
0x0A5C, 0x0A7B, 0x0A9A, 0x0AB3, 0x0AD5, 0x0AF7, 0x0B1C, 0x0B41,
@@ -300,7 +301,8 @@ unsigned short font_ptrs[] = {
0x155E,
};
unsigned int font_ranges[][2] = {
{ 0x000000, 0x0000FF },
{ 0x000000, 0x00007F },
{ 0x00E000, 0x00E07F },
{ 0x00FFFD, 0x00FFFD },
{ 0, 0 },
};
@@ -803,262 +803,262 @@ void Graphics::draw_icon(int x, int y, Icon icon, unsigned char alpha, bool inve
{
case IconOpen:
if(invert)
drawchar(x, y, 0x81, 0, 0, 0, alpha);
drawchar(x, y, 0xE001, 0, 0, 0, alpha);
else
drawchar(x, y, 0x81, 255, 255, 255, alpha);
drawchar(x, y, 0xE001, 255, 255, 255, alpha);
break;
case IconReload:
if(invert)
drawchar(x, y, 0x91, 0, 0, 0, alpha);
drawchar(x, y, 0xE011, 0, 0, 0, alpha);
else
drawchar(x, y, 0x91, 255, 255, 255, alpha);
drawchar(x, y, 0xE011, 255, 255, 255, alpha);
break;
case IconSave:
if(invert)
drawchar(x, y, 0x82, 0, 0, 0, alpha);
drawchar(x, y, 0xE002, 0, 0, 0, alpha);
else
drawchar(x, y, 0x82, 255, 255, 255, alpha);
drawchar(x, y, 0xE002, 255, 255, 255, alpha);
break;
case IconVoteUp:
if(invert)
{
drawchar(x-11, y+1, 0xCB, 0, 100, 0, alpha);
drawchar(x-11, y+1, 0xE04B, 0, 100, 0, alpha);
drawtext(x+2, y+1, "Vote", 0, 100, 0, alpha);
}
else
{
drawchar(x-11, y+1, 0xCB, 0, 187, 18, alpha);
drawchar(x-11, y+1, 0xE04B, 0, 187, 18, alpha);
drawtext(x+2, y+1, "Vote", 0, 187, 18, alpha);
}
break;
case IconVoteDown:
if(invert)
drawchar(x, y, 0xCA, 100, 10, 0, alpha);
drawchar(x, y, 0xE04A, 100, 10, 0, alpha);
else
drawchar(x, y, 0xCA, 187, 40, 0, alpha);
drawchar(x, y, 0xE04A, 187, 40, 0, alpha);
break;
case IconTag:
if(invert)
drawchar(x, y, 0x83, 0, 0, 0, alpha);
drawchar(x, y, 0xE003, 0, 0, 0, alpha);
else
drawchar(x, y, 0x83, 255, 255, 255, alpha);
drawchar(x, y, 0xE003, 255, 255, 255, alpha);
break;
case IconNew:
if(invert)
drawchar(x, y, 0x92, 0, 0, 0, alpha);
drawchar(x, y, 0xE012, 0, 0, 0, alpha);
else
drawchar(x, y, 0x92, 255, 255, 255, alpha);
drawchar(x, y, 0xE012, 255, 255, 255, alpha);
break;
case IconLogin:
if(invert)
drawchar(x, y+1, 0x84, 0, 0, 0, alpha);
drawchar(x, y+1, 0xE004, 0, 0, 0, alpha);
else
drawchar(x, y+1, 0x84, 255, 255, 255, alpha);
drawchar(x, y+1, 0xE004, 255, 255, 255, alpha);
break;
case IconSimulationSettings:
if(invert)
drawchar(x, y+1, 0xCF, 0, 0, 0, alpha);
drawchar(x, y+1, 0xE04F, 0, 0, 0, alpha);
else
drawchar(x, y+1, 0xCF, 255, 255, 255, alpha);
drawchar(x, y+1, 0xE04F, 255, 255, 255, alpha);
break;
case IconRenderSettings:
if(invert)
{
drawchar(x, y+1, 0xD8, 255, 0, 0, alpha);
drawchar(x, y+1, 0xD9, 0, 255, 0, alpha);
drawchar(x, y+1, 0xDA, 0, 0, 255, alpha);
drawchar(x, y+1, 0xE058, 255, 0, 0, alpha);
drawchar(x, y+1, 0xE059, 0, 255, 0, alpha);
drawchar(x, y+1, 0xE05A, 0, 0, 255, alpha);
}
else
{
addchar(x, y+1, 0xD8, 255, 0, 0, alpha);
addchar(x, y+1, 0xD9, 0, 255, 0, alpha);
addchar(x, y+1, 0xDA, 0, 0, 255, alpha);
addchar(x, y+1, 0xE058, 255, 0, 0, alpha);
addchar(x, y+1, 0xE059, 0, 255, 0, alpha);
addchar(x, y+1, 0xE05A, 0, 0, 255, alpha);
}
break;
case IconPause:
if(invert)
drawchar(x, y, 0x90, 0, 0, 0, alpha);
drawchar(x, y, 0xE010, 0, 0, 0, alpha);
else
drawchar(x, y, 0x90, 255, 255, 255, alpha);
drawchar(x, y, 0xE010, 255, 255, 255, alpha);
break;
case IconFavourite:
if(invert)
drawchar(x, y, 0xCC, 100, 80, 32, alpha);
drawchar(x, y, 0xE04C, 100, 80, 32, alpha);
else
drawchar(x, y, 0xCC, 192, 160, 64, alpha);
drawchar(x, y, 0xE04C, 192, 160, 64, alpha);
break;
case IconReport:
if(invert)
drawchar(x, y, 0xE3, 140, 140, 0, alpha);
drawchar(x, y, 0xE063, 140, 140, 0, alpha);
else
drawchar(x, y, 0xE3, 255, 255, 0, alpha);
drawchar(x, y, 0xE063, 255, 255, 0, alpha);
break;
case IconUsername:
if(invert)
{
drawchar(x, y, 0x8B, 32, 64, 128, alpha);
drawchar(x, y, 0x8A, 0, 0, 0, alpha);
drawchar(x, y, 0xE00B, 32, 64, 128, alpha);
drawchar(x, y, 0xE00A, 0, 0, 0, alpha);
}
else
{
drawchar(x, y, 0x8B, 32, 64, 128, alpha);
drawchar(x, y, 0x8A, 255, 255, 255, alpha);
drawchar(x, y, 0xE00B, 32, 64, 128, alpha);
drawchar(x, y, 0xE00A, 255, 255, 255, alpha);
}
break;
case IconPassword:
if(invert)
{
drawchar(x, y, 0x8C, 160, 144, 32, alpha);
drawchar(x, y, 0x84, 0, 0, 0, alpha);
drawchar(x, y, 0xE00C, 160, 144, 32, alpha);
drawchar(x, y, 0xE004, 0, 0, 0, alpha);
}
else
{
drawchar(x, y, 0x8C, 160, 144, 32, alpha);
drawchar(x, y, 0x84, 255, 255, 255, alpha);
drawchar(x, y, 0xE00C, 160, 144, 32, alpha);
drawchar(x, y, 0xE004, 255, 255, 255, alpha);
}
break;
case IconClose:
if(invert)
drawchar(x, y, 0xAA, 20, 20, 20, alpha);
drawchar(x, y, 0xE02A, 20, 20, 20, alpha);
else
drawchar(x, y, 0xAA, 230, 230, 230, alpha);
drawchar(x, y, 0xE02A, 230, 230, 230, alpha);
break;
case IconVoteSort:
if (invert)
{
drawchar(x, y, 0xA9, 44, 48, 32, alpha);
drawchar(x, y, 0xA8, 32, 44, 32, alpha);
drawchar(x, y, 0xA7, 128, 128, 128, alpha);
drawchar(x, y, 0xE029, 44, 48, 32, alpha);
drawchar(x, y, 0xE028, 32, 44, 32, alpha);
drawchar(x, y, 0xE027, 128, 128, 128, alpha);
}
else
{
drawchar(x, y, 0xA9, 144, 48, 32, alpha);
drawchar(x, y, 0xA8, 32, 144, 32, alpha);
drawchar(x, y, 0xA7, 255, 255, 255, alpha);
drawchar(x, y, 0xE029, 144, 48, 32, alpha);
drawchar(x, y, 0xE028, 32, 144, 32, alpha);
drawchar(x, y, 0xE027, 255, 255, 255, alpha);
}
break;
case IconDateSort:
if (invert)
{
drawchar(x, y, 0xA6, 32, 32, 32, alpha);
drawchar(x, y, 0xE026, 32, 32, 32, alpha);
}
else
{
drawchar(x, y, 0xA6, 255, 255, 255, alpha);
drawchar(x, y, 0xE026, 255, 255, 255, alpha);
}
break;
case IconMyOwn:
if (invert)
{
drawchar(x, y, 0x94, 192, 160, 64, alpha);
drawchar(x, y, 0x93, 32, 32, 32, alpha);
drawchar(x, y, 0xE014, 192, 160, 64, alpha);
drawchar(x, y, 0xE013, 32, 32, 32, alpha);
}
else
{
drawchar(x, y, 0x94, 192, 160, 64, alpha);
drawchar(x, y, 0x93, 255, 255, 255, alpha);
drawchar(x, y, 0xE014, 192, 160, 64, alpha);
drawchar(x, y, 0xE013, 255, 255, 255, alpha);
}
break;
case IconSearch:
drawchar(x, y, 0x8E, 30, 30, 180, alpha);
drawchar(x, y, 0x8F, 255, 255, 255, alpha);
drawchar(x, y, 0xE00E, 30, 30, 180, alpha);
drawchar(x, y, 0xE00F, 255, 255, 255, alpha);
break;
case IconDelete:
if(invert)
{
drawchar(x, y, 0x86, 159, 47, 31, alpha);
drawchar(x, y, 0x85, 0, 0, 0, alpha);
drawchar(x, y, 0xE006, 159, 47, 31, alpha);
drawchar(x, y, 0xE005, 0, 0, 0, alpha);
}
else
{
drawchar(x, y, 0x86, 159, 47, 31, alpha);
drawchar(x, y, 0x85, 255, 255, 255, alpha);
drawchar(x, y, 0xE006, 159, 47, 31, alpha);
drawchar(x, y, 0xE005, 255, 255, 255, alpha);
}
break;
case IconAdd:
if(invert)
{
drawchar(x, y, 0x86, 32, 144, 32, alpha);
drawchar(x, y, 0x89, 0, 0, 0, alpha);
drawchar(x, y, 0xE006, 32, 144, 32, alpha);
drawchar(x, y, 0xE009, 0, 0, 0, alpha);
}
else
{
drawchar(x, y, 0x86, 32, 144, 32, alpha);
drawchar(x, y, 0x89, 255, 255, 255, alpha);
drawchar(x, y, 0xE006, 32, 144, 32, alpha);
drawchar(x, y, 0xE009, 255, 255, 255, alpha);
}
break;
case IconVelocity:
drawchar(x+1, y, 0x98, 128, 160, 255, alpha);
drawchar(x+1, y, 0xE018, 128, 160, 255, alpha);
break;
case IconPressure:
if(invert)
drawchar(x+1, y+1, 0x99, 180, 160, 16, alpha);
drawchar(x+1, y+1, 0xE019, 180, 160, 16, alpha);
else
drawchar(x+1, y+1, 0x99, 255, 212, 32, alpha);
drawchar(x+1, y+1, 0xE019, 255, 212, 32, alpha);
break;
case IconPersistant:
if(invert)
drawchar(x+1, y+1, 0x9A, 20, 20, 20, alpha);
drawchar(x+1, y+1, 0xE01A, 20, 20, 20, alpha);
else
drawchar(x+1, y+1, 0x9A, 212, 212, 212, alpha);
drawchar(x+1, y+1, 0xE01A, 212, 212, 212, alpha);
break;
case IconFire:
drawchar(x+1, y+1, 0x9B, 255, 0, 0, alpha);
drawchar(x+1, y+1, 0x9C, 255, 255, 64, alpha);
drawchar(x+1, y+1, 0xE01B, 255, 0, 0, alpha);
drawchar(x+1, y+1, 0xE01C, 255, 255, 64, alpha);
break;
case IconBlob:
if(invert)
drawchar(x+1, y, 0xBF, 55, 180, 55, alpha);
drawchar(x+1, y, 0xE03F, 55, 180, 55, alpha);
else
drawchar(x+1, y, 0xBF, 55, 255, 55, alpha);
drawchar(x+1, y, 0xE03F, 55, 255, 55, alpha);
break;
case IconHeat:
drawchar(x+3, y, 0xBE, 255, 0, 0, alpha);
drawchar(x+3, y, 0xE03E, 255, 0, 0, alpha);
if(invert)
drawchar(x+3, y, 0xBD, 0, 0, 0, alpha);
drawchar(x+3, y, 0xE03D, 0, 0, 0, alpha);
else
drawchar(x+3, y, 0xBD, 255, 255, 255, alpha);
drawchar(x+3, y, 0xE03D, 255, 255, 255, alpha);
break;
case IconBlur:
if(invert)
drawchar(x+1, y, 0xC4, 50, 70, 180, alpha);
drawchar(x+1, y, 0xE044, 50, 70, 180, alpha);
else
drawchar(x+1, y, 0xC4, 100, 150, 255, alpha);
drawchar(x+1, y, 0xE044, 100, 150, 255, alpha);
break;
case IconGradient:
if(invert)
drawchar(x+1, y+1, 0xD3, 255, 50, 255, alpha);
drawchar(x+1, y+1, 0xE053, 255, 50, 255, alpha);
else
drawchar(x+1, y+1, 0xD3, 205, 50, 205, alpha);
drawchar(x+1, y+1, 0xE053, 205, 50, 205, alpha);
break;
case IconLife:
if(invert)
drawchar(x, y+1, 0xE0, 0, 0, 0, alpha);
drawchar(x, y+1, 0xE060, 0, 0, 0, alpha);
else
drawchar(x, y+1, 0xE0, 255, 255, 255, alpha);
drawchar(x, y+1, 0xE060, 255, 255, 255, alpha);
break;
case IconEffect:
drawchar(x+1, y, 0xE1, 255, 255, 160, alpha);
drawchar(x+1, y, 0xE061, 255, 255, 160, alpha);
break;
case IconGlow:
drawchar(x+1, y, 0xDF, 200, 255, 255, alpha);
drawchar(x+1, y, 0xE05F, 200, 255, 255, alpha);
break;
case IconWarp:
drawchar(x+1, y, 0xDE, 255, 255, 255, alpha);
drawchar(x+1, y, 0xE05E, 255, 255, 255, alpha);
break;
case IconBasic:
if(invert)
drawchar(x+1, y+1, 0xDB, 50, 50, 0, alpha);
drawchar(x+1, y+1, 0xE05B, 50, 50, 0, alpha);
else
drawchar(x+1, y+1, 0xDB, 255, 255, 200, alpha);
drawchar(x+1, y+1, 0xE05B, 255, 255, 200, alpha);
break;
case IconAltAir:
if(invert) {
drawchar(x+1, y+1, 0xD4, 180, 55, 55, alpha);
drawchar(x+1, y+1, 0xD5, 55, 180, 55, alpha);
drawchar(x+1, y+1, 0xE054, 180, 55, 55, alpha);
drawchar(x+1, y+1, 0xE055, 55, 180, 55, alpha);
} else {
drawchar(x+1, y+1, 0xD4, 255, 55, 55, alpha);
drawchar(x+1, y+1, 0xD5, 55, 255, 55, alpha);
drawchar(x+1, y+1, 0xE054, 255, 55, 55, alpha);
drawchar(x+1, y+1, 0xE055, 55, 255, 55, alpha);
}
break;
default:
@@ -677,7 +677,7 @@ VideoBuffer * Renderer::WallIcon(int wallID, int width, int height)
newTexture->SetPixel(i, j, PIXR(pc), PIXG(pc), PIXB(pc), 255);
}
}
newTexture->AddCharacter(4, 2, 0x8D, 255, 255, 255, 255);
newTexture->AddCharacter(4, 2, 0xE00D, 255, 255, 255, 255);
for (i=width/3; i<width; i++)
{
newTexture->SetPixel(i, 7+(int)(3.9f*cos(i*0.3f)), 255, 255, 255, 255);
@@ -805,7 +805,7 @@ void Renderer::DrawWalls()
// there is no velocity here, draw a streamline and continue
if (!xVel && !yVel)
{
drawtext(x*CELL, y*CELL-2, "\x8D", 255, 255, 255, 128);
drawtext(x*CELL, y*CELL-2, String(1, 0xE00D), 255, 255, 255, 128);
addpixel(oldX, oldY, 255, 255, 255, 255);
continue;
}
@@ -836,7 +836,7 @@ void Renderer::DrawWalls()
xf += xVel;
yf += yVel;
}
drawtext(x*CELL, y*CELL-2, "\x8D", 255, 255, 255, 128);
drawtext(x*CELL, y*CELL-2, String(1, 0xE00D), 255, 255, 255, 128);
}
break;
case 1:
Oops, something went wrong.

0 comments on commit 833383b

Please sign in to comment.