|
From: <ms...@mo...> - 2002-12-27 10:39:19
|
TODO item:
- Subtitles in conversation will sometimes hang off the end (e.g. the
Ilwrath reacting to the Ur-Quan Drone) or not appear at all (e.g. the
Yehat).
This appears to happen for races whose subtitle text is setup to begin
somewhere other than the top center of the display window. The code
that handles display of the messages will truncate the text if a line
is too long to be displayed. If the text placement is moved to the top
center this problem goes away for the two listed races...
I did not do a code trace of this bug to read the text display code...
I would recommend setting all races to display in standard position
(left, top, center)... then check the longest text line from each of their
message files to be sure they are not truncated due to the font in use
by that race.
I'd be happy to produce a patch to switch the other races to standard
placement and check each race's longest line... but only if I hear back
that a patch to that effect will be accepted...
Later,
Mike
...This may be related to the TODO item:
- subtitles may go past the bottom boundary
The following is a grep which will allow quick reference of the different
races text display configuration... at least the following races don't use
the 'normal' top of the display window to begin text:
comandr, rebel, starbas, zoqfot, yehat, vux.
grep -A 1 -E '(AlienTextTemplate)|(TEXT_X_OFFS)' ./src/sc2code/comm/*/*.c
====
./src/sc2code/comm/ilwrath/ilwrathc.c:
ilwrath_desc.AlienTextTemplate.baseline.x =
TEXT_X_OFFS + (SIS_TEXT_WIDTH >> 1);
ilwrath_desc.AlienTextTemplate.baseline.y = 64;
ilwrath_desc.AlienTextTemplate.align = ALIGN_CENTER;
ilwrath_desc.AlienTextWidth = SIS_TEXT_WIDTH - 16;
====
./src/sc2code/comm/yehat/yehatc.c:
yehat_desc.AlienTextTemplate.baseline.x = SIS_SCREEN_WIDTH * 2 / 3;
yehat_desc.AlienTextTemplate.baseline.y = 107 * 2 / 3;
yehat_desc.AlienTextTemplate.align = ALIGN_CENTER;
yehat_desc.AlienTextWidth = (SIS_TEXT_WIDTH - 16) * 2 / 3;
====
Here is a sample text that is truncated by the cvs mainline which is fixed
with this patch... 'Approached Earth,' is lost without the patch.
content/comm/ilwrath/ilwrath.txt
=======
#(SEND_MESSAGE) ilwra022.ogg
By The Fetid Breath Of The Dark Twin, Kazon!
A Hu-Man In An Alien Starship... How Fascinating!
When I Intercepted That Ur-Quan Drone, And Learned That An Unidentified Starship Had Approached Earth,
I Never Expected To Find Such A Remarkable Vehicle In The Hands Of A Hu-Man.
Hu-Mans Are Prey Animals - Weak And Helpless-
But Here Is A Hu-Man In An Armed Starship!
And Therefore In Direct Violation Of The Oath Of Fealty.
I Am Sure Our Masters, The Ur-Quan, Will Punish Earth Most Severely For This Treachery....
When I Present Them With The Twisted Wreckage Of Your Ship And Your Many Charred Corpses.
=======
Index: ./src/sc2code/comm/yehat/yehatc.c
===================================================================
RCS file: /cvsroot/sc2/sc2/src/sc2code/comm/yehat/yehatc.c,v
retrieving revision 1.2
diff -u -p -r1.2 yehatc.c
--- ./src/sc2code/comm/yehat/yehatc.c 27 Sep 2002 22:38:19 -0000 1.2
+++ ./src/sc2code/comm/yehat/yehatc.c 27 Dec 2002 10:27:48 -0000
@@ -646,10 +646,10 @@ init_yehat_comm (void)
yehat_desc.init_encounter_func = Intro;
yehat_desc.uninit_encounter_func = uninit_yehat;
- yehat_desc.AlienTextTemplate.baseline.x = SIS_SCREEN_WIDTH * 2 / 3;
- yehat_desc.AlienTextTemplate.baseline.y = 107 * 2 / 3;
+ yehat_desc.AlienTextTemplate.baseline.x = TEXT_X_OFFS + (SIS_TEXT_WIDTH >> 1);
+ yehat_desc.AlienTextTemplate.baseline.y = 0;
yehat_desc.AlienTextTemplate.align = ALIGN_CENTER;
- yehat_desc.AlienTextWidth = (SIS_TEXT_WIDTH - 16) * 2 / 3;
+ yehat_desc.AlienTextWidth = SIS_TEXT_WIDTH - 16;
if (LOBYTE (GLOBAL (CurrentActivity)) != WON_LAST_BATTLE)
{
Index: ./src/sc2code/comm/ilwrath/ilwrathc.c
===================================================================
RCS file: /cvsroot/sc2/sc2/src/sc2code/comm/ilwrath/ilwrathc.c,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 ilwrathc.c
--- ./src/sc2code/comm/ilwrath/ilwrathc.c 3 Sep 2002 00:57:52 -0000 1.1.1.1
+++ ./src/sc2code/comm/ilwrath/ilwrathc.c 27 Dec 2002 10:27:49 -0000
@@ -603,7 +603,7 @@ init_ilwrath_comm (void)
ilwrath_desc.AlienTextTemplate.baseline.x =
TEXT_X_OFFS + (SIS_TEXT_WIDTH >> 1);
- ilwrath_desc.AlienTextTemplate.baseline.y = 64;
+ ilwrath_desc.AlienTextTemplate.baseline.y = 0;
ilwrath_desc.AlienTextTemplate.align = ALIGN_CENTER;
ilwrath_desc.AlienTextWidth = SIS_TEXT_WIDTH - 16;
|