Skip to content

Commit

Permalink
*get rid of the unsightly pure blue text color in menus, and replace …
Browse files Browse the repository at this point in the history
…it with something more mild. do the same thing with the Imladris faction color. first one gets replaced by vertex shader, the latter by module system.
  • Loading branch information
Swyter committed Mar 20, 2017
1 parent 7cb239b commit d025d42
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 3 deletions.
Binary file modified Data/mb.fxo
Binary file not shown.
2 changes: 1 addition & 1 deletion ModuleSystem/module_factions.py
Expand Up @@ -30,7 +30,7 @@
("mordor", "Mordor", 0,0.5,[("gondor",-0.5),("rohan",-0.2),("lorien",-0.2),("imladris",-0.2),("woodelf",-0.2), ("harad", 0.5),("rhun", 0.2),("khand", 0.2),("dunland", 0.2),("umbar", 0.5),("isengard", 0.2),("moria", 0.5),("guldur", 0.5),("gundabad", 0.5),("dale",-0.2),("dwarf",-0.2),("beorn",-0.2),("tribal_orcs",-0.5), ("player_faction",-0.15)], [], 0xFF0000),
("isengard", "Isengard", 0,0.5,[("gondor",-0.5),("rohan",-0.5),("lorien",-0.1),("imladris",-0.1),("woodelf",-0.1),("mordor", 0.2),("harad", 0.1),("rhun", 0.5),("khand", 0.5),("dunland", 0.5),("umbar", 0.5), ("moria", 0.5),("guldur", 0.5),("gundabad", 0.5),("dale",-0.2),("dwarf",-0.2),("beorn",-0.2),("tribal_orcs",-0.5), ("player_faction",-0.15)], [], 0xFFEE00),
("lorien", "Lothlorien", 0,0.5,[("gondor", 0.5),("rohan", 0.2), ("imladris", 0.5),("woodelf", 0.5),("mordor",-0.2),("harad",-0.1),("rhun",-0.5),("khand",-0.1),("dunland",-0.1),("umbar",-0.1),("isengard",-0.1),("moria",-0.5),("guldur",-0.5),("gundabad",-0.5),("dale", 0.2),("dwarf", 0.1),("beorn", 0.2),("tribal_orcs",-0.5) ], [], 0x00FFC8),
("imladris", "Imladris", 0,0.5,[("gondor", 0.5),("rohan", 0.2),("lorien", 0.5), ("woodelf", 0.5),("mordor",-0.2),("harad",-0.1),("rhun",-0.1),("khand",-0.1),("dunland",-0.1),("umbar",-0.1),("isengard",-0.1),("moria",-0.5),("guldur",-0.5),("gundabad",-0.5),("dale", 0.2),("dwarf", 0.1),("beorn", 0.2),("tribal_orcs",-0.5),("outlaws",-0.05) ], [], 0x160ae5),
("imladris", "Imladris", 0,0.5,[("gondor", 0.5),("rohan", 0.2),("lorien", 0.5), ("woodelf", 0.5),("mordor",-0.2),("harad",-0.1),("rhun",-0.1),("khand",-0.1),("dunland",-0.1),("umbar",-0.1),("isengard",-0.1),("moria",-0.5),("guldur",-0.5),("gundabad",-0.5),("dale", 0.2),("dwarf", 0.1),("beorn", 0.2),("tribal_orcs",-0.5),("outlaws",-0.05) ], [], 0xADA8FF),
("woodelf","Mirkwood Elves",0,0.5,[("gondor", 0.5),("rohan", 0.2),("lorien", 0.5),("imladris", 0.5), ("mordor",-0.2),("harad",-0.1),("rhun",-0.1),("khand",-0.1),("dunland",-0.1),("umbar",-0.1),("isengard",-0.1),("moria",-0.5),("guldur",-0.9),("gundabad",-0.5),("dale", 0.1),("dwarf", 0.1),("beorn", 0.2),("tribal_orcs",-0.5),("outlaws",-0.05) ], [], 0x5EFFA9),
("dale", "Dale", 0,0.5,[("gondor", 0.2),("rohan", 0.5),("lorien", 0.5),("imladris", 0.5),("woodelf", 0.5),("mordor",-0.5),("harad",-0.5),("rhun",-0.5),("khand",-0.5),("dunland",-0.5),("umbar",-0.5),("isengard",-0.5),("moria",-0.5),("guldur",-0.5),("gundabad",-0.5), ("dwarf", 0.5),("beorn", 0.2),("tribal_orcs",-0.5),("outlaws",-0.05) ], [], 0xFFFEB8),
("harad", "Harad", 0,0.5,[("gondor",-0.5),("rohan",-0.5),("lorien",-0.1),("imladris",-0.1),("woodelf",-0.1),("mordor", 0.5), ("rhun", 0.5),("khand", 0.5),("dunland", 0.5),("umbar", 0.5),("isengard", 0.5),("moria", 0.5),("guldur", 0.5),("gundabad", 0.5),("dale",-0.2),("dwarf",-0.2),("beorn",-0.2),("tribal_orcs",-0.5) ], [], 0xFF5E79),
Expand Down
8 changes: 8 additions & 0 deletions _wb/GLShaders/vs_font_outline_mtarini.glsl
Expand Up @@ -23,6 +23,14 @@ void main ()
tmpvar_3 = (matWorldView * tmpvar_2).xyz;
outColor0 = inColor0.bgra * vMaterialColor;

/* swy: turn pure blue text into something less unsightly,
and do it here because tracking down every instance is a pain in places */
if (inColor0.r == 0.0 && inColor0.g == 0.0 && inColor0.b == 1.0)
outColor0.rgb = vec3(
127.0 / 255.0,
076.0 / 255.0,
033.0 / 255.0
);
// compute border color
outTexCoord.xy = inTexCoord;
outTexCoord.z = float( (max(outColor0.r, max( outColor0.g, outColor0.b ) ) >0.5)?0:1 );
Expand Down
2 changes: 1 addition & 1 deletion _wb/factions.txt
Expand Up @@ -18,7 +18,7 @@ fac_no_faction No_Faction 0 11184810
0 0 0 -0.5 -0.2 -0.5 0.2 0.5 -0.1 -0.1 -0.1 -0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 -0.5 0 0 -0.15 0 -0.5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 fac_lorien Lothlorien 0 65480
0 0 0 0.5 0.1 0.2 -0.2 -0.1 0.5 0.5 0.5 0.5 -0.1 -0.1 -0.1 -0.5 -0.5 -0.5 -0.5 -0.1 0.5 0 0 0 0 -0.5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 fac_imladris Imladris 0 1444581
0 fac_imladris Imladris 0 11380991
0 0 -0.05 0.5 0.1 0.2 -0.2 -0.1 0.5 0.5 0.5 0.5 -0.1 -0.1 -0.1 -0.5 -0.5 -0.5 -0.5 -0.1 0.5 0 0 0 0 -0.5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 fac_woodelf Mirkwood_Elves 0 6225833
0 0 -0.05 0.5 0.1 0.2 -0.2 -0.1 0.5 0.5 0.5 0.5 -0.1 -0.1 -0.1 -0.5 -0.5 -0.5 -0.5 -0.1 0.5 0 0 0 0 -0.5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Expand Down
Binary file modified _wb/mb.fx
Binary file not shown.
9 changes: 9 additions & 0 deletions _wb/mb_src.fx
Expand Up @@ -5756,6 +5756,15 @@ VS_OUTPUT_FONT_MTARINI vs_font_mtarini(float4 vPosition : POSITION, float4 vColo
Out.Tex0.xy = tc;
Out.Color = vColor * vMaterialColor;

/* swy: turn pure blue text into something less unsightly,
and do it here because tracking down every instance is a pain in places */
if (vColor.r == 0.f && vColor.g == 0.f && vColor.b == 1.f)
Out.Color.rgb = float3(
127.f / 255.f,
076.f / 255.f,
033.f / 255.f
);

// compute border color
Out.Tex0.z = (max(Out.Color.r, max( Out.Color.g, Out.Color.b ) ) >0.5)?0:1;

Expand Down
2 changes: 1 addition & 1 deletion factions.txt
Expand Up @@ -18,7 +18,7 @@ fac_no_faction No_Faction 0 11184810
0 0 0 -0.5 -0.2 -0.5 0.2 0.5 -0.1 -0.1 -0.1 -0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 -0.5 0 0 -0.15 0 -0.5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 fac_lorien Lothlorien 0 65480
0 0 0 0.5 0.1 0.2 -0.2 -0.1 0.5 0.5 0.5 0.5 -0.1 -0.1 -0.1 -0.5 -0.5 -0.5 -0.5 -0.1 0.5 0 0 0 0 -0.5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 fac_imladris Imladris 0 1444581
0 fac_imladris Imladris 0 11380991
0 0 -0.05 0.5 0.1 0.2 -0.2 -0.1 0.5 0.5 0.5 0.5 -0.1 -0.1 -0.1 -0.5 -0.5 -0.5 -0.5 -0.1 0.5 0 0 0 0 -0.5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 fac_woodelf Mirkwood_Elves 0 6225833
0 0 -0.05 0.5 0.1 0.2 -0.2 -0.1 0.5 0.5 0.5 0.5 -0.1 -0.1 -0.1 -0.5 -0.5 -0.5 -0.5 -0.1 0.5 0 0 0 0 -0.5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Expand Down
Binary file modified mb.fx
Binary file not shown.
10 changes: 10 additions & 0 deletions mb_src.fx
Expand Up @@ -782,6 +782,16 @@ VS_OUTPUT_FONT_MTARINI vs_font_mtarini(float4 vPosition : POSITION, float4 vColo
Out.Tex0.xy = tc;
Out.Color = vColor * vMaterialColor;

/* swy: turn pure blue text into something less unsightly,
and do it here because tracking down every instance is a pain in places */
if (vColor.r == 0.f && vColor.g == 0.f && vColor.b == 1.f)
Out.Color.rgb = float3(
127.f / 255.f,
076.f / 255.f,
033.f / 255.f
);


// compute border color
Out.Tex0.z = (max(Out.Color.r, max( Out.Color.g, Out.Color.b ) ) >0.5)?0:1;

Expand Down

0 comments on commit d025d42

Please sign in to comment.