Texts on walls

Discuss Chaos Strikes Back for Windows and Linux, an unofficial port of Chaos Strikes Back to PC by Paul Stevens, as well as CSBuild, an associated dungeon editor.

Moderator: Zyx

Forum rules
Please read the Forum rules and policies before posting.
Post Reply
charlatan75

Texts on walls

Post by charlatan75 »

Hello, :)

I found something wrong in the way "texts on walls" are displayed in CSBWin...

Well, as you know, when you look at a text on a wall at distance 2 or 3 (D2 or D3), what you see is, in fact, the graphic number 0122 (or graphic number 0121 when viewed from the side, these graphics represent an unreadable text), which is "cut", more or less high, in function of the number of lines there are in the real text.

While "exploring" the file number 0558 (0x22e) of "Graphics.dat", I discovered the following things (I consider the first byte of file 0558 is number 0001) :

Byte number / Value / Function...
-------------------------------------
3035 / 45 (0x2D) / D3 - side view (graph 0121) - distance from the upper border of the "dungeon view" (in pixels) at which the graphic is "cut" if there is only one line in the real text (=> the player will see one "unreadable" line written on the wall).

3036 / 48 (0x30) / D3 - side view (graph 0121) - same as above but when there are two lines in the real text

3037 / 53 (0x35) / D3 - side view (graph 0121) - same as above but when there are three lines in the real text

3038 / 43 (0x2B) / D3 - face view (graph 0122) - distance from the upper border of the "dungeon view" (in pixels) at which the graphic is "cut" if there is only one line in the real text

3039 / 49 (0x31) / D3 - face view (graph 0122) - same as above but when there are two lines in the real text

3040 / 56 (0x38) / D3 - face view (graph 0122) - same as above but when there are three lines in the real text

3041 / 42 (0x2A) / D2 - side view (graph 0121) - distance from the upper border of the "dungeon view" (in pixels) at which the graphic is "cut" if there is only one line in the real text

3042 / 49 (0x31) / D2 - side view (graph 0121) - same as above but when there are two lines in the real text

3043 / 56 (0x38) / D2 - side view (graph 0121) - same as above but when there are three lines in the real text

3044 / 46 (0x2E) / D2 - face view (graph 0122) - distance from the upper border of the "dungeon view" (in pixels) at which the graphic is "cut" if there is only one line in the real text

3045 / 53 (0x35) / D2 - face view (graph 0122) - same as above but when there are two lines in the real text

3046 / 63 (0x3F) / D2 - face view (graph 0122) - same as above but when there are three lines in the real text

3047 / 46 (0x2E) / D1 - side view (graph 0121) - distance from the upper border of the "dungeon view" (in pixels) at which the graphic is "cut" if there is only one line in the real text

3048 / 57 (0x39) / D1 - side view (graph 0121) - same as above but when there are two lines in the real text

3049 / 68 (0x44) / D1 - side view (graph 0121) - same as above but when there are three lines in the real text

(NB : If there are 4 lines in the real wall text, the graphic 0121 or 0122 is displayed entirely...)
-------------------------------------

What's wrong in the way CSBWin displays graphic 0121 or 0122?

Hmmm... that's simple... CSBWin does only use the 3 first values I mentioned for ALL views (face, side, all possible distances)...

For example, let's consider a text of two lines. In CSBWin, when you look at this text at distance 2 (face view), you will see this "text" as if it's only "one line and a half" in height (the second line is cut in the middle of its height), because the graphic is "cut" at 48 pixels (this value comes from byte number 3036) from the upper border of the dungeon view (NB : the graphic should be "cut" at 53 pixels, according to the byte number 3045 value).

I think (but I am not sure of that) that those values are stored in something you called "i8 Byte4213[17]" according to the file "Data.h" in "CSBsrc93.rar" (I hope this will help you).

Hmmm... I hope what I tried to explain is clear, but I'm not sure it is! :))))

- Charlatan75 -
User avatar
Paul Stevens
CSBwin Guru
Posts: 4322
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Re: Texts on walls

Post by Paul Stevens »

Thank you. This will take a bit of study. These graphics
always have confused me. More than a tad.

PAul
Post Reply

Return to “Chaos Strikes Back for Windows & Linux (CSBWin) / CSBuild”