1
0
mirror of https://github.com/XProger/OpenLara.git synced 2025-08-13 16:44:50 +02:00

fix TR2/TR3 glyphs colorization for Japanese and Greek

This commit is contained in:
XProger
2019-03-31 03:44:46 +03:00
parent a161a5de6e
commit bfa166b2eb
3 changed files with 41 additions and 11 deletions

View File

@@ -274,14 +274,14 @@ const char *helpText =
"C - Look@" "C - Look@"
"R - Slow motion@" "R - Slow motion@"
"T - Fast motion@" "T - Fast motion@"
"Roll - Up + Down@" "Roll - Up & Down@"
"Step Left - Walk + Left@" "Step Left - Walk & Left@"
"Step Right - Walk + Right@" "Step Right - Walk & Right@"
"Out of water - Up + Action@" "Out of water - Up & Action@"
"Handstand - Up + Walk@" "Handstand - Up & Walk@"
"Swan dive - Up + Walk + Jump@" "Swan dive - Up & Walk & Jump@"
"First Person View - Look + Action@" "First Person View - Look & Action@"
"DOZY on - Look + Duck + Action + Jump@" "DOZY on - Look & Duck & Action & Jump@"
"DOZY off - Walk"; "DOZY off - Walk";
#include "lang/en.h" #include "lang/en.h"

View File

@@ -1582,9 +1582,11 @@ struct Level : IGame {
atlasSprites = sAtlas->pack(true); atlasSprites = sAtlas->pack(true);
atlasGlyphs = gAtlas->pack(false); atlasGlyphs = gAtlas->pack(false);
#ifdef _OS_3DS
ASSERT(atlasRooms->width <= 1024 && atlasRooms->height <= 1024); ASSERT(atlasRooms->width <= 1024 && atlasRooms->height <= 1024);
ASSERT(atlasObjects->width <= 1024 && atlasObjects->height <= 1024); ASSERT(atlasObjects->width <= 1024 && atlasObjects->height <= 1024);
ASSERT(atlasSprites->width <= 1024 && atlasSprites->height <= 1024); ASSERT(atlasSprites->width <= 1024 && atlasSprites->height <= 1024);
#endif
delete[] tileData; delete[] tileData;
tileData = NULL; tileData = NULL;

View File

@@ -336,7 +336,14 @@ namespace UI {
y -= getTextSize(text).y / 2; y -= getTextSize(text).y / 2;
} }
Color32 tColor, bColor, sColor = Color32(48, 12, 0, alpha); Color32 tColor, bColor, sColor;
tColor = bColor = sColor = Color32(0, 0, 0, 255);
switch (level->version & TR::VER_VERSION) {
case TR::VER_TR1 : sColor = Color32(48, 12, 0, alpha); break;
case TR::VER_TR2 : sColor = Color32(0, 49, 0, alpha); break;
case TR::VER_TR3 : sColor = shade == SHADE_ORANGE ? Color32(48, 12, 0, alpha) : Color32(12, 12, 12, alpha); break;
}
char lastChar = 0; char lastChar = 0;
@@ -356,8 +363,29 @@ namespace UI {
mesh->addDynSprite(index, short3(x , 1 + y - 1, 0), false, false, sColor, sColor, true); mesh->addDynSprite(index, short3(x , 1 + y - 1, 0), false, false, sColor, sColor, true);
mesh->addDynSprite(index, short3(x , 1 + y + 1, 0), false, false, sColor, sColor, true); mesh->addDynSprite(index, short3(x , 1 + y + 1, 0), false, false, sColor, sColor, true);
tColor = Color32(252, 236, 136, alpha); switch (level->version & TR::VER_VERSION) {
bColor = Color32(160, 104, 56, alpha); case TR::VER_TR1 :
tColor = Color32(252, 236, 136, alpha);
bColor = Color32(160, 104, 56, alpha);
break;
case TR::VER_TR2 :
tColor = Color32(99, 189, 95, alpha);
bColor = Color32( 79, 152, 76, alpha);
break;
case TR::VER_TR3 :
if (shade == SHADE_NONE) {
tColor = Color32(255, 255, 255, alpha);
bColor = Color32(255, 255, 255, alpha);
} else if (shade == SHADE_ORANGE) {
tColor = Color32(255, 190, 90, alpha);
bColor = Color32(140, 50, 10, alpha);
} else if (shade == SHADE_GRAY) {
tColor = Color32(255, 255, 255, alpha);
bColor = Color32(128, 128, 128, alpha);
}
break;
}
mesh->addDynSprite(index, short3(x, 1 + y, 0), false, false, tColor, bColor, true); mesh->addDynSprite(index, short3(x, 1 + y, 0), false, false, tColor, bColor, true);
} }
x += getWideCharGlyphWidth(glyph); x += getWideCharGlyphWidth(glyph);