d2dx icon indicating copy to clipboard operation
d2dx copied to clipboard

Support "bold" white color codes (was [Bug][1.14d] Color text bug)

Open tytannial opened this issue 3 years ago • 27 comments

White text is rendered to black text.

org. 20210517214825

d2dx 20210517214802

tytannial avatar May 17 '21 13:05 tytannial

Hmm is this new? Haven't seen it before.

bolrog avatar May 17 '21 13:05 bolrog

Hmm is this new? Haven't seen it before.

https://www.moddb.com/mods/median-xl/downloads/median-xl-2012-v005

Humm. Legacy version.

tytannial avatar May 17 '21 14:05 tytannial

Does it happen in vanilla D2/LoD too?

bolrog avatar May 17 '21 15:05 bolrog

Does it happen in vanilla D2/LoD too? T1

1.13d

Yh793 avatar May 17 '21 15:05 Yh793

Only the text color with the white mark is broken. Normal color of text is different with white. With a white mark in tbl file, the text has a glow board.... but it becomes black in d2dx mode.

tytannial avatar May 17 '21 23:05 tytannial

Thanks, I understand what you mean now. I'll investigate.

bolrog avatar May 18 '21 06:05 bolrog

These are color codes ÿc0 – white ÿc1 – red ÿc2 – "set" green ÿc3 – "magic" blue ÿc4 – "unique" gold ÿc5 – gray ÿc6 – black (barely visible in the profile) ÿc7 – same as 4 ÿc8 – "crafted" amber ÿc9 – "rare" yellow

In tbl, text start with ÿc0

tytannial avatar May 18 '21 06:05 tytannial

Is there a simple mod I could load to see this?

bolrog avatar May 20 '21 14:05 bolrog

Is there a simple mod I could load to see this?

see the link i have post at 3rd reply

tytannial avatar May 21 '21 00:05 tytannial

I see white here, but is that the same color code you mean? image

bolrog avatar May 21 '21 13:05 bolrog

I see white here, but is that the same color code you mean? image

YES 20210522090044

I use version 521.

tytannial avatar May 22 '21 01:05 tytannial

This is truly weird. I wonder what the difference is... I used MXL 2012 with 1.13d. No other mods loaded.

bolrog avatar May 22 '21 09:05 bolrog

This is truly weird. I wonder what the difference is... I used MXL 2012 with 1.13d. No other mods loaded.

maybe it is broken in the 1.14d?

tytannial avatar May 22 '21 14:05 tytannial

What language installer are you using? Could that be the difference?

On Sat, May 22, 2021 at 10:52 AM Tytannial @.***> wrote:

This is truly weird. I wonder what the difference is... I used MXL 2012 with 1.13d. No other mods loaded.

maybe it is broken in the 1.14d?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/bolrog/d2dx/issues/74#issuecomment-846418995, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACMSYAFDF23QPE7M6MW3MTDTO7AJJANCNFSM45AQC75Q .

updawg avatar May 22 '21 17:05 updawg

What language installer are you using? Could that be the difference? On Sat, May 22, 2021 at 10:52 AM Tytannial @.***> wrote: This is truly weird. I wonder what the difference is... I used MXL 2012 with 1.13d. No other mods loaded. maybe it is broken in the 1.14d? — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#74 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACMSYAFDF23QPE7M6MW3MTDTO7AJJANCNFSM45AQC75Q .

Confirmed, I test game in hyper-V VM. When I update game to 1.14d, white text become black. Text color works correctly in 1.13c and 1.13d.

tytannial avatar May 23 '21 05:05 tytannial

The problematic color code is "ÿc/" whatever that means!

"ÿc/passive - regenerates life when you kill an enemy in treewarden form"

It's strange because the color codes are supposed to start at '0', but going by the ASCII table, '/' is one step before 0 (0x2F). I wonder why it's a problem only in 1.14 though.

bolrog avatar May 23 '21 12:05 bolrog

The problematic color code is "ÿc/" whatever that means!

"ÿc/passive - regenerates life when you kill an enemy in treewarden form"

It's strange because the color codes are supposed to start at '0', but going by the ASCII table, '/' is one step before 0 (0x2F). I wonder why it's a problem only in 1.14 though.

You are right.

As you can see, this bug is in the nGlide too. It is a 1.14d bug. 20210524123734

and....GLIDE3-to-OpenGL-Wrapper 20210524124502

tytannial avatar May 24 '21 04:05 tytannial

Finally I found this in PlugY readme. Goddamn Blizzard.🤣

* Color list values (color code greater than 12 is black in 1.14d fullscreen):
  • Invisible: 6
  • Dark gray: 5
  • Gray: 16
  • Light gray: 15
  • White: 0,
  • Bright white: 18
  • Gold: 4
  • Dark yellow: 7
  • Yellow: 9
  • Orange: 8
  • Darkest green: 10
  • Dark green: 12
  • Green: 2
  • Blue: 3
  • Purple: 11
  • Red: 1
  • Crystal red: 19

tytannial avatar May 24 '21 05:05 tytannial

That explains it! Nice detective work. :)

bolrog avatar May 24 '21 05:05 bolrog

Do you know if any of the other colors would be used in MXL?

bolrog avatar May 24 '21 14:05 bolrog

For the upcoming release, I have added a simple remapping so that the black text in this case ("ÿc/") will appear white. This is only done for game version 1.14d.

bolrog avatar May 25 '21 07:05 bolrog

For the upcoming release, I have added a simple remapping so that the black text in this case ("ÿc/") will appear white. This is only done for game version 1.14d.

https://github.com/kambala-decapitator/QTblEditor/blob/a457953bb30fba84830ef24b9f33498ca646eeba/colors.cpp

I think there are all common color codes in most of the d2mods. I will do a test. 😉

tytannial avatar May 25 '21 07:05 tytannial

Test in 1.14d, version 521

DefaultMode DefaultMode

GlideMode GlideMode

Humm.....Maybe this bug caused by blizzard's display fix, I think.

Test case

ÿc!A ÿc"B ÿc#C ÿc$D ÿc%E ÿc&F ÿc'G ÿc(H ÿc)I ÿc*J ÿc+K ÿc,L ÿc-M ÿc.N ÿc/O ÿc0P ÿc1Q ÿc2R ÿc3S ÿc4T ÿc5U ÿc6V ÿc7W ÿc8X ÿc9Y ÿc:Z ÿc;A ÿc<B

ÿc!Aÿc"Bÿc#Cÿc$Dÿc%Eÿc&Fÿc'Gÿc(Hÿc)Iÿc*Jÿc+Kÿc,Lÿc-Mÿc.Nÿc/Oÿc0Pÿc1Qÿc2Rÿc3Sÿc4Tÿc5Uÿc6Vÿc7Wÿc8Xÿc9Yÿc:Zÿc;Aÿc<B

tytannial avatar May 25 '21 10:05 tytannial

Test in 1.13c, version 521

GlideMode 1 13c GlideMode

DefualtMode 1 13c DefualtMode

tytannial avatar May 25 '21 10:05 tytannial

Thanks for the screenshots! It looks like those extra color codes were meant for "bold" white text in different strengths. I don't think the Glide screenshots are the look they intended. It might be worth a shot to emulate the "default" ones in D2DX.

bolrog avatar May 25 '21 15:05 bolrog

Meanwhile, I have added a basic fix to release 525. It turns the '/' color to '0'.

bolrog avatar May 25 '21 19:05 bolrog

I hope that it to be implemented correctly. There is quite limited selection in text color. To use D2 mods like loot filter effectively, we need wider selection of colors. Currently in directdraw mode only 12 colors are possible. in glide mode , 4 more text colors are possible. There is some more text color. I hope that these four glide-only colors will be implemented in D2DX.

#define TEXT_WHITE L"\xff" "c0"
#define TEXT_RED L"\xff" "c1"
#define TEXT_GREEN L"\xff" "c2"
#define TEXT_BLUE L"\xff" "c3"
#define TEXT_GOLD L"\xff" "c4"
#define TEXT_GRAY L"\xff" "c5"
#define TEXT_BLACK L"\xff" "c6"
#define TEXT_TAN L"\xff" "c7"
#define TEXT_ORANGE L"\xff" "c8"
#define TEXT_YELLOW L"\xff" "c9"
#define TEXT_PURPLE L"\xff" "c;"
#define TEXT_DARK_GREEN L"\xff" "c:"

// Glide only colors. In ddraw, opengl, and d2dx( -3dfx) mode, 
// these texts are displayed as "black" text  in D2 v1.14d  as pictures above. 

#define TEXT_CORAL L"\xff" "c\x06"             // pallet color 0x66
#define TEXT_SAGE L"\xff" "c\x07"              // pallet color 0x82
#define TEXT_TEAL L"\xff" "c\x09"                // pallet color 0xC8 
#define TEXT_LIGHT_GRAY L"\xff" "c\x0C"        // pallet color  0xD6

// OK color text on ddraw and d2dx. 

#define TEXT_MEDIUM_RED L"\xff" "c*"
#define TEXT_MEDIUM_GREEN L"\xff" "c<"
#define TEXT_MEDIUM_YELLOW L"\xff" "c+"
#define TEXT_BLUE_GREEN L"\xff" "c$"
#define TEXT_DARK_BLUE L"\xff" "c!"
#define TEXT_COLORS L"\xff" "c"

I hope that these glide only 4 colors implemented sooner in d2dx.

qqkookie avatar Dec 07 '22 09:12 qqkookie