From c4f33f2a674cd2c98d94591aeb6b7b1718471ea0 Mon Sep 17 00:00:00 2001 From: avolkov Date: Tue, 31 Oct 2006 06:48:32 +0000 Subject: [PATCH] Removed TEXT.valign hack; removed LOCDATA.AlienTextTemplate hack; some comments git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@2486 8092fc87-c524-0410-9efc-e669fe64eaf9 --- sc2/src/sc2code/comm.c | 34 +++++++++++++------------ sc2/src/sc2code/comm/arilou/arilouc.c | 16 ++++++------ sc2/src/sc2code/comm/blackur/blackurc.c | 10 ++++---- sc2/src/sc2code/comm/chmmr/chmmrc.c | 16 ++++++------ sc2/src/sc2code/comm/comandr/comandr.c | 16 ++++++------ sc2/src/sc2code/comm/druuge/druugec.c | 19 +++++++------- sc2/src/sc2code/comm/ilwrath/ilwrathc.c | 17 ++++++------- sc2/src/sc2code/comm/melnorm/melnorm.c | 16 ++++++------ sc2/src/sc2code/comm/mycon/myconc.c | 16 ++++++------ sc2/src/sc2code/comm/orz/orzc.c | 16 ++++++------ sc2/src/sc2code/comm/pkunk/pkunkc.c | 16 ++++++------ sc2/src/sc2code/comm/rebel/rebel.c | 10 ++++---- sc2/src/sc2code/comm/shofixt/shofixt.c | 16 ++++++------ sc2/src/sc2code/comm/slyhome/slyhome.c | 12 ++++----- sc2/src/sc2code/comm/slyland/slyland.c | 12 ++++----- sc2/src/sc2code/comm/spahome/spahome.c | 12 ++++----- sc2/src/sc2code/comm/spathi/spathic.c | 14 +++++----- sc2/src/sc2code/comm/starbas/starbas.c | 16 ++++++------ sc2/src/sc2code/comm/supox/supoxc.c | 16 ++++++------ sc2/src/sc2code/comm/syreen/syreenc.c | 16 ++++++------ sc2/src/sc2code/comm/talkpet/talkpet.c | 16 ++++++------ sc2/src/sc2code/comm/thradd/thraddc.c | 16 ++++++------ sc2/src/sc2code/comm/umgah/umgahc.c | 16 ++++++------ sc2/src/sc2code/comm/urquan/urquanc.c | 16 ++++++------ sc2/src/sc2code/comm/utwig/utwigc.c | 17 ++++++------- sc2/src/sc2code/comm/vux/vuxc.c | 16 ++++++------ sc2/src/sc2code/comm/yehat/yehatc.c | 10 ++++---- sc2/src/sc2code/comm/zoqfot/zoqfotc.c | 22 ++++++++-------- sc2/src/sc2code/commanim.c | 3 ++- sc2/src/sc2code/confirm.c | 1 - sc2/src/sc2code/credits.c | 2 -- sc2/src/sc2code/globdata.h | 4 ++- sc2/src/sc2code/intro.c | 2 -- sc2/src/sc2code/libs/gfxlib.h | 1 - sc2/src/sc2code/libs/graphics/widgets.c | 11 -------- sc2/src/sc2code/melee.c | 1 - sc2/src/sc2code/mouse_err.c | 1 - sc2/src/sc2code/restart.c | 1 - 38 files changed, 227 insertions(+), 245 deletions(-) diff --git a/sc2/src/sc2code/comm.c b/sc2/src/sc2code/comm.c index 524f39713..44e926204 100644 --- a/sc2/src/sc2code/comm.c +++ b/sc2/src/sc2code/comm.c @@ -81,6 +81,7 @@ static PENCOUNTER_STATE pCurInputState; static SUBTITLE_STATE subtitle_state = DONE_SUBTITLE; static Mutex subtitle_mutex; +TEXT SubtitleText; static const UNICODE * volatile last_subtitle; CONTEXT TextCacheContext; @@ -95,7 +96,8 @@ RECT CommWndRect = { /* _count_lines - sees how many lines a given input string would take to * display given the line wrapping information */ -static int _count_lines (PTEXT pText) +static int +_count_lines (PTEXT pText) { SIZE text_width; COUNT maxchars = (COUNT)~0; @@ -210,12 +212,13 @@ add_text (int status, PTEXT pTextIn) numchars = 0; pStr = pText->pStr; - if (status > 0 && (CommData.AlienTextTemplate.valign & ( - VALIGN_MIDDLE|VALIGN_BOTTOM))) { + if (status > 0 && (CommData.AlienTextValign & + (VALIGN_MIDDLE | VALIGN_BOTTOM))) + { num_lines = _count_lines(pText); - if (CommData.AlienTextTemplate.valign == VALIGN_BOTTOM) + if (CommData.AlienTextValign == VALIGN_BOTTOM) pText->baseline.y -= (leading * num_lines); - else if (CommData.AlienTextTemplate.valign == VALIGN_MIDDLE) + else if (CommData.AlienTextValign == VALIGN_MIDDLE) pText->baseline.y -= ((leading * num_lines) / 2); if (pText->baseline.y < 0) pText->baseline.y = 0; @@ -1352,6 +1355,9 @@ HailAlien (void) CommData.ConversationPhrases = CaptureStringTable ( LoadStringTable ((RESOURCE)CommData.ConversationPhrases)); + SubtitleText.baseline = CommData.AlienTextBaseline; + SubtitleText.align = CommData.AlienTextAlign; + // init subtitle cache context TextCacheContext = CaptureContext (CreateContext ()); TextCacheFrame = CaptureDrawable ( @@ -1775,14 +1781,8 @@ do_subtitles (UNICODE *pStr) { case READ_SUBTITLE: { - TEXT t; - - CommData.AlienTextTemplate.pStr = pStr; - t = CommData.AlienTextTemplate; - - CommData.AlienTextTemplate.CharCount = - utf8StringCountN(CommData.AlienTextTemplate.pStr, - t.pStr); + SubtitleText.pStr = pStr; + SubtitleText.CharCount = (COUNT)~0; subtitle_state = WAIT_SUBTITLE; break; } @@ -1804,20 +1804,22 @@ do_subtitles (UNICODE *pStr) } void -RedrawSubtitles (void) { +RedrawSubtitles (void) +{ TEXT t; if (!optSubtitles) return; - t = CommData.AlienTextTemplate; + t = SubtitleText; add_text (1, &t); } // Sets ClearSubtitle, returning the old value. The current subtitle state // is also returned, through sub_state BOOLEAN -SetClearSubtitle (BOOLEAN flag, SUBTITLE_STATE *sub_state) { +SetClearSubtitle (BOOLEAN flag, SUBTITLE_STATE *sub_state) +{ BOOLEAN oldClearSubtitle; LockMutex (subtitle_mutex); diff --git a/sc2/src/sc2code/comm/arilou/arilouc.c b/sc2/src/sc2code/comm/arilou/arilouc.c index 65d0b7ca2..d16630222 100644 --- a/sc2/src/sc2code/comm/arilou/arilouc.c +++ b/sc2/src/sc2code/comm/arilou/arilouc.c @@ -32,14 +32,17 @@ static LOCDATA arilou_desc = (FONT)ARILOU_FONT, /* AlienFont */ WHITE_COLOR, /* AlienTextFColor */ BLACK_COLOR, /* AlienTextBColor */ + {0, 0}, /* AlienTextBaseline */ 0, /* SIS_TEXT_WIDTH - 16, */ /* AlienTextWidth */ + ALIGN_CENTER, /* AlienTextAlign */ + VALIGN_TOP, /* AlienTextValign */ (COLORMAP)ARILOU_COLOR_MAP, /* AlienColorMap */ ARILOU_MUSIC, /* AlienSong */ 0, /* AlienAltSong */ 0, /* AlienSongFlags */ ARILOU_CONVERSATION_PHRASES, /* PlayerPhrases */ 20, /* NumAnimations */ - { + { /* AlienAmbientArray (ambient animations) */ { 4, /* StartIndex */ 9, /* NumFrames */ @@ -201,7 +204,7 @@ static LOCDATA arilou_desc = 0, /* BlockMask */ }, }, - { + { /* AlienTransitionDesc */ 0, /* StartIndex */ 0, /* NumFrames */ 0, /* AnimFlags */ @@ -209,7 +212,7 @@ static LOCDATA arilou_desc = 0, 0, /* RestartRate */ 0, /* BlockMask */ }, - { + { /* AlienTalkDesc */ 1, /* StartIndex */ 3, /* NumFrames */ 0, /* AnimFlags */ @@ -218,7 +221,6 @@ static LOCDATA arilou_desc = 0, /* BlockMask */ }, NULL_PTR, /* AlienNumberSpeech - none */ - { {0, 0}, 0, 0, 0, 0 }, /* AlienTextTemplate - starts blank */ }; static void @@ -829,10 +831,8 @@ init_arilou_comm (void) arilou_desc.post_encounter_func = post_arilou_enc; arilou_desc.uninit_encounter_func = uninit_arilou; - arilou_desc.AlienTextTemplate.baseline.x = - TEXT_X_OFFS + (SIS_TEXT_WIDTH >> 1); - arilou_desc.AlienTextTemplate.baseline.y = 0; - arilou_desc.AlienTextTemplate.align = ALIGN_CENTER; + arilou_desc.AlienTextBaseline.x = TEXT_X_OFFS + (SIS_TEXT_WIDTH >> 1); + arilou_desc.AlienTextBaseline.y = 0; arilou_desc.AlienTextWidth = SIS_TEXT_WIDTH - 16; if (GET_GAME_STATE (ARILOU_SPACE_SIDE) > 1 diff --git a/sc2/src/sc2code/comm/blackur/blackurc.c b/sc2/src/sc2code/comm/blackur/blackurc.c index 6376e1af1..500bee221 100644 --- a/sc2/src/sc2code/comm/blackur/blackurc.c +++ b/sc2/src/sc2code/comm/blackur/blackurc.c @@ -29,7 +29,10 @@ static LOCDATA blackurq_desc = (FONT)BLACKURQ_FONT, /* AlienFont */ WHITE_COLOR, /* AlienTextFColor */ BLACK_COLOR, /* AlienTextBColor */ + {0, 0}, /* AlienTextBaseline */ 0, /* SIS_TEXT_WIDTH - 16, */ /* AlienTextWidth */ + ALIGN_CENTER, /* AlienTextAlign */ + VALIGN_TOP, /* AlienTextValign */ (COLORMAP)BLACKURQ_COLOR_MAP, /* AlienColorMap */ BLACKURQ_MUSIC, /* AlienSong */ 0, /* AlienAltSong */ @@ -120,7 +123,6 @@ static LOCDATA blackurq_desc = 0, /* BlockMask */ }, NULL_PTR, /* AlienNumberSpeech - none */ - { {0, 0}, 0, 0, 0, 0 }, /* AlienTextTemplate - starts blank */ }; static void @@ -542,10 +544,8 @@ init_blackurq_comm (void) blackurq_desc.post_encounter_func = post_blackurq_enc; blackurq_desc.uninit_encounter_func = uninit_blackurq; - blackurq_desc.AlienTextTemplate.baseline.x = - TEXT_X_OFFS + (SIS_TEXT_WIDTH >> 1); - blackurq_desc.AlienTextTemplate.baseline.y = 0; - blackurq_desc.AlienTextTemplate.align = ALIGN_CENTER; + blackurq_desc.AlienTextBaseline.x = TEXT_X_OFFS + (SIS_TEXT_WIDTH >> 1); + blackurq_desc.AlienTextBaseline.y = 0; blackurq_desc.AlienTextWidth = SIS_TEXT_WIDTH - 16; if (!GET_GAME_STATE (KOHR_AH_KILLED_ALL) diff --git a/sc2/src/sc2code/comm/chmmr/chmmrc.c b/sc2/src/sc2code/comm/chmmr/chmmrc.c index 5cfb2ee65..72e0555b4 100644 --- a/sc2/src/sc2code/comm/chmmr/chmmrc.c +++ b/sc2/src/sc2code/comm/chmmr/chmmrc.c @@ -32,14 +32,17 @@ static LOCDATA chmmr_desc = (FONT)CHMMR_FONT, /* AlienFont */ WHITE_COLOR, /* AlienTextFColor */ BLACK_COLOR, /* AlienTextBColor */ + {0, 0}, /* AlienTextBaseline */ 0, /* SIS_TEXT_WIDTH - 16, */ /* AlienTextWidth */ + ALIGN_CENTER, /* AlienTextAlign */ + VALIGN_TOP, /* AlienTextValign */ (COLORMAP)CHMMR_COLOR_MAP, /* AlienColorMap */ CHMMR_MUSIC, /* AlienSong */ 0, /* AlienAltSong */ 0, /* AlienSongFlags */ CHMMR_CONVERSATION_PHRASES, /* PlayerPhrases */ 6, /* NumAnimations */ - { + { /* AlienAmbientArray (ambient animations) */ { 12, /* StartIndex */ 5, /* NumFrames */ @@ -89,7 +92,7 @@ static LOCDATA chmmr_desc = 0, /* BlockMask */ }, }, - { + { /* AlienTransitionDesc */ 0, /* StartIndex */ 0, /* NumFrames */ 0, /* AnimFlags */ @@ -97,7 +100,7 @@ static LOCDATA chmmr_desc = 0, 0, /* RestartRate */ 0, /* BlockMask */ }, - { + { /* AlienTalkDesc */ 1, /* StartIndex */ 11, /* NumFrames */ 0, /* AnimFlags */ @@ -106,7 +109,6 @@ static LOCDATA chmmr_desc = 0, /* BlockMask */ }, NULL_PTR, /* AlienNumberSpeech - none */ - { {0, 0}, 0, 0, 0, 0 }, /* AlienTextTemplate - starts blank */ }; static void @@ -618,10 +620,8 @@ init_chmmr_comm (void) chmmr_desc.post_encounter_func = post_chmmr_enc; chmmr_desc.uninit_encounter_func = uninit_chmmr; - chmmr_desc.AlienTextTemplate.baseline.x = - TEXT_X_OFFS + (SIS_TEXT_WIDTH >> 1); - chmmr_desc.AlienTextTemplate.baseline.y = 0; - chmmr_desc.AlienTextTemplate.align = ALIGN_CENTER; + chmmr_desc.AlienTextBaseline.x = TEXT_X_OFFS + (SIS_TEXT_WIDTH >> 1); + chmmr_desc.AlienTextBaseline.y = 0; chmmr_desc.AlienTextWidth = SIS_TEXT_WIDTH - 16; SET_GAME_STATE (BATTLE_SEGUE, 0); diff --git a/sc2/src/sc2code/comm/comandr/comandr.c b/sc2/src/sc2code/comm/comandr/comandr.c index 49032c06a..19d67b7fe 100644 --- a/sc2/src/sc2code/comm/comandr/comandr.c +++ b/sc2/src/sc2code/comm/comandr/comandr.c @@ -31,14 +31,17 @@ static LOCDATA commander_desc = (FONT)COMMANDER_FONT, /* AlienFont */ WHITE_COLOR, /* AlienTextFColor */ BLACK_COLOR, /* AlienTextBColor */ + {0, 0}, /* AlienTextBaseline */ 0, /* SIS_TEXT_WIDTH, */ /* AlienTextWidth */ + ALIGN_CENTER, /* AlienTextAlign */ + VALIGN_MIDDLE, /* AlienTextValign */ COMMANDER_COLOR_MAP, /* AlienColorMap */ COMMANDER_MUSIC, /* AlienSong */ 0, /* AlienAltSong */ 0, /* AlienSongFlags */ COMMANDER_CONVERSATION_PHRASES, /* PlayerPhrases */ 3, /* NumAnimations */ - { + { /* AlienAmbientArray (ambient animations) */ { /* Blink */ 1, /* StartIndex */ 3, /* NumFrames */ @@ -64,7 +67,7 @@ static LOCDATA commander_desc = 0, /* BlockMask */ }, }, - { + { /* AlienTransitionDesc */ 0, /* StartIndex */ 0, /* NumFrames */ 0, /* AnimFlags */ @@ -72,7 +75,7 @@ static LOCDATA commander_desc = 0, 0, /* RestartRate */ 0, /* BlockMask */ }, - { + { /* AlienTalkDesc */ 4, /* StartIndex */ 6, /* NumFrames */ 0, /* AnimFlags */ @@ -81,7 +84,6 @@ static LOCDATA commander_desc = 0, /* BlockMask */ }, NULL_PTR, /* AlienNumberSpeech - none */ - { {0, 0}, 0, 0, 0, 0 }, /* AlienTextTemplate - starts blank */ }; static void @@ -702,10 +704,8 @@ init_commander_comm () } commander_desc.AlienTextWidth = 143; - commander_desc.AlienTextTemplate.baseline.x = 164; - commander_desc.AlienTextTemplate.baseline.y = 20; - commander_desc.AlienTextTemplate.align = ALIGN_CENTER; - commander_desc.AlienTextTemplate.valign = VALIGN_MIDDLE; + commander_desc.AlienTextBaseline.x = 164; + commander_desc.AlienTextBaseline.y = 20; SET_GAME_STATE (BATTLE_SEGUE, 0); retval = &commander_desc; diff --git a/sc2/src/sc2code/comm/druuge/druugec.c b/sc2/src/sc2code/comm/druuge/druugec.c index b73f2fc38..e9771edf7 100644 --- a/sc2/src/sc2code/comm/druuge/druugec.c +++ b/sc2/src/sc2code/comm/druuge/druugec.c @@ -33,14 +33,17 @@ static LOCDATA druuge_desc = (FONT)DRUUGE_FONT, /* AlienFont */ WHITE_COLOR, /* AlienTextFColor */ BLACK_COLOR, /* AlienTextBColor */ + {0, 0}, /* AlienTextBaseline */ 0, /* SIS_TEXT_WIDTH - 16, */ /* AlienTextWidth */ + ALIGN_CENTER, /* AlienTextAlign */ + VALIGN_MIDDLE, /* AlienTextValign */ (COLORMAP)DRUUGE_COLOR_MAP, /* AlienColorMap */ DRUUGE_MUSIC, /* AlienSong */ 0, /* AlienAltSong */ 0, /* AlienSongFlags */ DRUUGE_CONVERSATION_PHRASES, /* PlayerPhrases */ - 11, - { + 11, /* NumAnimations */ + { /* AlienAmbientArray (ambient animations) */ { 5, /* StartIndex */ 4, /* NumFrames */ @@ -130,7 +133,7 @@ static LOCDATA druuge_desc = 0, /* BlockMask */ }, }, - { + { /* AlienTransitionDesc */ 0, /* StartIndex */ 0, /* NumFrames */ 0, /* AnimFlags */ @@ -138,7 +141,7 @@ static LOCDATA druuge_desc = 0, 0, /* RestartRate */ 0, /* BlockMask */ }, - { + { /* AlienTalkDesc */ 1, /* StartIndex */ 4, /* NumFrames */ 0, /* AnimFlags */ @@ -147,7 +150,6 @@ static LOCDATA druuge_desc = 0, /* BlockMask */ }, NULL_PTR, /* AlienNumberSpeech - none */ - { {0, 0}, 0, 0, 0, 0 }, /* AlienTextTemplate - starts blank */ }; static COUNT SlaveryCount = 0; @@ -904,11 +906,8 @@ init_druuge_comm (void) druuge_desc.post_encounter_func = post_druuge_enc; druuge_desc.uninit_encounter_func = uninit_druuge; - druuge_desc.AlienTextTemplate.baseline.x = - TEXT_X_OFFS + (SIS_TEXT_WIDTH >> 1); - druuge_desc.AlienTextTemplate.baseline.y = 70; - druuge_desc.AlienTextTemplate.align = ALIGN_CENTER; - druuge_desc.AlienTextTemplate.valign = VALIGN_MIDDLE; + druuge_desc.AlienTextBaseline.x = TEXT_X_OFFS + (SIS_TEXT_WIDTH >> 1); + druuge_desc.AlienTextBaseline.y = 70; druuge_desc.AlienTextWidth = SIS_TEXT_WIDTH - 16; if ((GET_GAME_STATE (DRUUGE_MANNER) == 0 diff --git a/sc2/src/sc2code/comm/ilwrath/ilwrathc.c b/sc2/src/sc2code/comm/ilwrath/ilwrathc.c index ae9f9846d..fe8114e22 100644 --- a/sc2/src/sc2code/comm/ilwrath/ilwrathc.c +++ b/sc2/src/sc2code/comm/ilwrath/ilwrathc.c @@ -32,14 +32,17 @@ static LOCDATA ilwrath_desc = (FONT)ILWRATH_FONT, /* AlienFont */ WHITE_COLOR, /* AlienTextFColor */ BLACK_COLOR, /* AlienTextBColor */ + {0, 0}, /* AlienTextBaseline */ 0, /* SIS_TEXT_WIDTH - 16, */ /* AlienTextWidth */ + ALIGN_CENTER, /* AlienTextAlign */ + VALIGN_MIDDLE, /* AlienTextValign */ (COLORMAP)ILWRATH_COLOR_MAP, /* AlienColorMap */ ILWRATH_MUSIC, /* AlienSong */ 0, /* AlienAltSong */ 0, /* AlienSongFlags */ ILWRATH_CONVERSATION_PHRASES, /* PlayerPhrases */ 4, /* NumAnimations */ - { + { /* AlienAmbientArray (ambient animations) */ { 6, /* StartIndex */ 5, /* NumFrames */ @@ -73,7 +76,7 @@ static LOCDATA ilwrath_desc = 0, /* BlockMask */ }, }, - { + { /* AlienTransitionDesc */ 0, /* StartIndex */ 0, /* NumFrames */ 0, /* AnimFlags */ @@ -81,7 +84,7 @@ static LOCDATA ilwrath_desc = 0, 0, /* RestartRate */ 0, /* BlockMask */ }, - { + { /* AlienTalkDesc */ 1, /* StartIndex */ 5, /* NumFrames */ 0, /* AnimFlags */ @@ -90,7 +93,6 @@ static LOCDATA ilwrath_desc = 0, /* BlockMask */ }, NULL_PTR, /* AlienNumberSpeech - none */ - { {0, 0}, 0, 0, 0, 0 }, /* AlienTextTemplate - starts blank */ }; static void @@ -622,11 +624,8 @@ init_ilwrath_comm (void) ilwrath_desc.post_encounter_func = post_ilwrath_enc; ilwrath_desc.uninit_encounter_func = uninit_ilwrath; - ilwrath_desc.AlienTextTemplate.baseline.x = - TEXT_X_OFFS + (SIS_TEXT_WIDTH >> 1); - ilwrath_desc.AlienTextTemplate.baseline.y = 70; - ilwrath_desc.AlienTextTemplate.align = ALIGN_CENTER; - ilwrath_desc.AlienTextTemplate.valign = VALIGN_MIDDLE; + ilwrath_desc.AlienTextBaseline.x = TEXT_X_OFFS + (SIS_TEXT_WIDTH >> 1); + ilwrath_desc.AlienTextBaseline.y = 70; ilwrath_desc.AlienTextWidth = SIS_TEXT_WIDTH - 16; if (GET_GAME_STATE (PROBE_ILWRATH_ENCOUNTER) diff --git a/sc2/src/sc2code/comm/melnorm/melnorm.c b/sc2/src/sc2code/comm/melnorm/melnorm.c index c778bf8d1..8db88be99 100644 --- a/sc2/src/sc2code/comm/melnorm/melnorm.c +++ b/sc2/src/sc2code/comm/melnorm/melnorm.c @@ -43,14 +43,17 @@ static LOCDATA melnorme_desc = (FONT)MELNORME_FONT, /* AlienFont */ WHITE_COLOR, /* AlienTextFColor */ BLACK_COLOR, /* AlienTextBColor */ + {0, 0}, /* AlienTextBaseline */ 0, /* SIS_TEXT_WIDTH - 16, */ /* AlienTextWidth */ + ALIGN_CENTER, /* AlienTextAlign */ + VALIGN_TOP, /* AlienTextValign */ MELNORME_COLOR_MAP, /* AlienColorMap */ MELNORME_MUSIC, /* AlienSong */ 0, /* AlienAltSong */ 0, /* AlienSongFlags */ MELNORME_CONVERSATION_PHRASES, /* PlayerPhrases */ 4, /* NumAnimations */ - { + { /* AlienAmbientArray (ambient animations) */ { 6, /* StartIndex */ 5, /* NumFrames */ @@ -84,7 +87,7 @@ static LOCDATA melnorme_desc = 0, /* BlockMask */ }, }, - { + { /* AlienTransitionDesc */ 0, /* StartIndex */ 0, /* NumFrames */ 0, /* AnimFlags */ @@ -92,7 +95,7 @@ static LOCDATA melnorme_desc = 0, 0, /* RestartRate */ 0, /* BlockMask */ }, - { + { /* AlienTalkDesc */ 1, /* StartIndex */ 5, /* NumFrames */ 0, /* AnimFlags */ @@ -101,7 +104,6 @@ static LOCDATA melnorme_desc = 0, /* BlockMask */ }, &melnorme_numbers_english, /* AlienNumberSpeech - default */ - { {0, 0}, 0, 0, 0, 0 }, /* AlienTextTemplate - starts blank */ }; static COUNT melnorme_digit_names[] = @@ -1856,10 +1858,8 @@ init_melnorme_comm (void) melnorme_desc.post_encounter_func = post_melnorme_enc; melnorme_desc.uninit_encounter_func = uninit_melnorme; - melnorme_desc.AlienTextTemplate.baseline.x = - TEXT_X_OFFS + (SIS_TEXT_WIDTH >> 1); - melnorme_desc.AlienTextTemplate.baseline.y = 0; - melnorme_desc.AlienTextTemplate.align = ALIGN_CENTER; + melnorme_desc.AlienTextBaseline.x = TEXT_X_OFFS + (SIS_TEXT_WIDTH >> 1); + melnorme_desc.AlienTextBaseline.y = 0; melnorme_desc.AlienTextWidth = SIS_TEXT_WIDTH - 16; local_stack0 = 0; diff --git a/sc2/src/sc2code/comm/mycon/myconc.c b/sc2/src/sc2code/comm/mycon/myconc.c index fac917f8d..91855ebb5 100644 --- a/sc2/src/sc2code/comm/mycon/myconc.c +++ b/sc2/src/sc2code/comm/mycon/myconc.c @@ -33,14 +33,17 @@ static LOCDATA mycon_desc = (FONT)MYCON_FONT, /* AlienFont */ WHITE_COLOR, /* AlienTextFColor */ BLACK_COLOR, /* AlienTextBColor */ + {0, 0}, /* AlienTextBaseline */ 0, /* SIS_TEXT_WIDTH - 16, */ /* AlienTextWidth */ + ALIGN_CENTER, /* AlienTextAlign */ + VALIGN_TOP, /* AlienTextValign */ (COLORMAP)MYCON_COLOR_MAP, /* AlienColorMap */ MYCON_MUSIC, /* AlienSong */ 0, /* AlienAltSong */ 0, /* AlienSongFlags */ MYCON_CONVERSATION_PHRASES, /* PlayerPhrases */ 5, /* NumAnimations */ - { + { /* AlienAmbientArray (ambient animations) */ { 12, /* StartIndex */ 6, /* NumFrames */ @@ -82,7 +85,7 @@ static LOCDATA mycon_desc = 0, /* BlockMask */ }, }, - { + { /* AlienTransitionDesc */ 0, /* StartIndex */ 0, /* NumFrames */ 0, /* AnimFlags */ @@ -90,7 +93,7 @@ static LOCDATA mycon_desc = 0, 0, /* RestartRate */ 0, /* BlockMask */ }, - { + { /* AlienTalkDesc */ 1, /* StartIndex */ 11, /* NumFrames */ 0, /* AnimFlags */ @@ -99,7 +102,6 @@ static LOCDATA mycon_desc = 0, /* BlockMask */ }, NULL_PTR, /* AlienNumberSpeech - none */ - { {0, 0}, 0, 0, 0, 0 }, /* AlienTextTemplate - starts blank */ }; static BYTE MadeChoice; @@ -617,10 +619,8 @@ init_mycon_comm (void) mycon_desc.post_encounter_func = post_mycon_enc; mycon_desc.uninit_encounter_func = uninit_mycon; - mycon_desc.AlienTextTemplate.baseline.x = - TEXT_X_OFFS + (SIS_TEXT_WIDTH >> 1); - mycon_desc.AlienTextTemplate.baseline.y = 0; - mycon_desc.AlienTextTemplate.align = ALIGN_CENTER; + mycon_desc.AlienTextBaseline.x = TEXT_X_OFFS + (SIS_TEXT_WIDTH >> 1); + mycon_desc.AlienTextBaseline.y = 0; mycon_desc.AlienTextWidth = SIS_TEXT_WIDTH - 16; MadeChoice = 0; diff --git a/sc2/src/sc2code/comm/orz/orzc.c b/sc2/src/sc2code/comm/orz/orzc.c index 3d19bd578..a3f35ef74 100644 --- a/sc2/src/sc2code/comm/orz/orzc.c +++ b/sc2/src/sc2code/comm/orz/orzc.c @@ -31,14 +31,17 @@ static LOCDATA orz_desc = (FONT)ORZ_FONT, /* AlienFont */ WHITE_COLOR, /* AlienTextFColor */ BLACK_COLOR, /* AlienTextBColor */ + {0, 0}, /* AlienTextBaseline */ 0, /* SIS_TEXT_WIDTH - 16, */ /* AlienTextWidth */ + ALIGN_CENTER, /* AlienTextAlign */ + VALIGN_TOP, /* AlienTextValign */ (COLORMAP)ORZ_COLOR_MAP, /* AlienColorMap */ ORZ_MUSIC, /* AlienSong */ 0, /* AlienAltSong */ 0, /* AlienSongFlags */ ORZ_CONVERSATION_PHRASES, /* PlayerPhrases */ 12 /* 13 */, /* NumAnimations */ - { + { /* AlienAmbientArray (ambient animations) */ { 4, /* StartIndex */ 6, /* NumFrames */ @@ -144,7 +147,7 @@ static LOCDATA orz_desc = (1 << 10), /* BlockMask */ }, }, - { + { /* AlienTransitionDesc */ 0, /* StartIndex */ 0, /* NumFrames */ 0, /* AnimFlags */ @@ -152,7 +155,7 @@ static LOCDATA orz_desc = 0, 0, /* RestartRate */ 0, /* BlockMask */ }, - { + { /* AlienTalkDesc */ 1, /* StartIndex */ 3, /* NumFrames */ 0, /* AnimFlags */ @@ -161,7 +164,6 @@ static LOCDATA orz_desc = 0, /* BlockMask */ }, NULL_PTR, /* AlienNumberSpeech - none */ - { {0, 0}, 0, 0, 0, 0 }, /* AlienTextTemplate - starts blank */ }; static void @@ -874,10 +876,8 @@ init_orz_comm (void) orz_desc.post_encounter_func = post_orz_enc; orz_desc.uninit_encounter_func = uninit_orz; - orz_desc.AlienTextTemplate.baseline.x = - TEXT_X_OFFS + (SIS_TEXT_WIDTH >> 1); - orz_desc.AlienTextTemplate.baseline.y = 0; - orz_desc.AlienTextTemplate.align = ALIGN_CENTER; + orz_desc.AlienTextBaseline.x = TEXT_X_OFFS + (SIS_TEXT_WIDTH >> 1); + orz_desc.AlienTextBaseline.y = 0; orz_desc.AlienTextWidth = SIS_TEXT_WIDTH - 16; if (GET_GAME_STATE (ORZ_MANNER) == 3 diff --git a/sc2/src/sc2code/comm/pkunk/pkunkc.c b/sc2/src/sc2code/comm/pkunk/pkunkc.c index 86ca2fe77..139e3fd29 100644 --- a/sc2/src/sc2code/comm/pkunk/pkunkc.c +++ b/sc2/src/sc2code/comm/pkunk/pkunkc.c @@ -33,14 +33,17 @@ static LOCDATA pkunk_desc = (FONT)PKUNK_FONT, /* AlienFont */ WHITE_COLOR, /* AlienTextFColor */ BLACK_COLOR, /* AlienTextBColor */ + {0, 0}, /* AlienTextBaseline */ 0, /* SIS_TEXT_WIDTH - 16, */ /* AlienTextWidth */ + ALIGN_CENTER, /* AlienTextAlign */ + VALIGN_TOP, /* AlienTextValign */ (COLORMAP)PKUNK_COLOR_MAP, /* AlienColorMap */ PKUNK_MUSIC, /* AlienSong */ 0, /* AlienAltSong */ 0, /* AlienSongFlags */ PKUNK_CONVERSATION_PHRASES, /* PlayerPhrases */ 3, /* NumAnimations */ - { + { /* AlienAmbientArray (ambient animations) */ { 3, /* StartIndex */ 4, /* NumFrames */ @@ -69,7 +72,7 @@ static LOCDATA pkunk_desc = (1 << 1), /* BlockMask */ }, }, - { + { /* AlienTransitionDesc */ 0, /* StartIndex */ 0, /* NumFrames */ 0, /* AnimFlags */ @@ -77,7 +80,7 @@ static LOCDATA pkunk_desc = 0, 0, /* RestartRate */ 0, /* BlockMask */ }, - { + { /* AlienTalkDesc */ 1, /* StartIndex */ 2, /* NumFrames */ 0, /* AnimFlags */ @@ -86,7 +89,6 @@ static LOCDATA pkunk_desc = 0, /* BlockMask */ }, NULL_PTR, /* AlienNumberSpeech - none */ - { {0, 0}, 0, 0, 0, 0 }, /* AlienTextTemplate - starts blank */ }; static BOOLEAN @@ -1120,10 +1122,8 @@ init_pkunk_comm (void) pkunk_desc.post_encounter_func = post_pkunk_enc; pkunk_desc.uninit_encounter_func = uninit_pkunk; - pkunk_desc.AlienTextTemplate.baseline.x = - TEXT_X_OFFS + (SIS_TEXT_WIDTH >> 1); - pkunk_desc.AlienTextTemplate.baseline.y = 0; - pkunk_desc.AlienTextTemplate.align = ALIGN_CENTER; + pkunk_desc.AlienTextBaseline.x = TEXT_X_OFFS + (SIS_TEXT_WIDTH >> 1); + pkunk_desc.AlienTextBaseline.y = 0; pkunk_desc.AlienTextWidth = SIS_TEXT_WIDTH - 16; if (GET_GAME_STATE (PKUNK_MANNER) == 3 diff --git a/sc2/src/sc2code/comm/rebel/rebel.c b/sc2/src/sc2code/comm/rebel/rebel.c index 65bef5ac2..b29863810 100644 --- a/sc2/src/sc2code/comm/rebel/rebel.c +++ b/sc2/src/sc2code/comm/rebel/rebel.c @@ -32,7 +32,10 @@ static LOCDATA yehat_desc = (FONT)YEHAT_FONT, /* AlienFont */ WHITE_COLOR, /* AlienTextFColor */ BLACK_COLOR, /* AlienTextBColor */ + {0, 0}, /* AlienTextBaseline */ 0, /* (SIS_TEXT_WIDTH - 16) * 2 / 3, */ /* AlienTextWidth */ + ALIGN_CENTER, /* AlienTextAlign */ + VALIGN_MIDDLE, /* AlienTextValign */ (COLORMAP)YEHAT_COLOR_MAP, /* AlienColorMap */ YEHAT_MUSIC, /* AlienSong */ 0, /* AlienAltSong */ @@ -183,7 +186,6 @@ static LOCDATA yehat_desc = 0, /* BlockMask */ }, NULL_PTR, /* AlienNumberSpeech - none */ - { {0, 0}, 0, 0, 0, 0 }, /* AlienTextTemplate - starts blank */ }; static void @@ -429,10 +431,8 @@ init_rebel_yehat_comm (void) yehat_desc.post_encounter_func = post_yehat_enc; yehat_desc.uninit_encounter_func = uninit_yehat; - yehat_desc.AlienTextTemplate.baseline.x = SIS_SCREEN_WIDTH * 2 / 3; - yehat_desc.AlienTextTemplate.baseline.y = 60; - yehat_desc.AlienTextTemplate.align = ALIGN_CENTER; - yehat_desc.AlienTextTemplate.valign = VALIGN_MIDDLE; + yehat_desc.AlienTextBaseline.x = SIS_SCREEN_WIDTH * 2 / 3; + yehat_desc.AlienTextBaseline.y = 60; yehat_desc.AlienTextWidth = (SIS_TEXT_WIDTH - 16) * 2 / 3; // use alternate "Rebels" track if available diff --git a/sc2/src/sc2code/comm/shofixt/shofixt.c b/sc2/src/sc2code/comm/shofixt/shofixt.c index d72af9fd8..a0b812a64 100644 --- a/sc2/src/sc2code/comm/shofixt/shofixt.c +++ b/sc2/src/sc2code/comm/shofixt/shofixt.c @@ -32,14 +32,17 @@ static LOCDATA shofixti_desc = (FONT)SHOFIXTI_FONT, /* AlienFont */ WHITE_COLOR, /* AlienTextFColor */ BLACK_COLOR, /* AlienTextBColor */ + {0, 0}, /* AlienTextBaseline */ 0, /* SIS_TEXT_WIDTH, */ /* AlienTextWidth */ + ALIGN_CENTER, /* AlienTextAlign */ + VALIGN_TOP, /* AlienTextValign */ (COLORMAP)SHOFIXTI_COLOR_MAP, /* AlienColorMap */ SHOFIXTI_MUSIC, /* AlienSong */ 0, /* AlienAltSong */ 0, /* AlienSongFlags */ SHOFIXTI_CONVERSATION_PHRASES, /* PlayerPhrases */ 11, /* NumAnimations */ - { + { /* AlienAmbientArray (ambient animations) */ { 5, /* StartIndex */ 15, /* NumFrames */ @@ -130,7 +133,7 @@ static LOCDATA shofixti_desc = (1 << 9), /* BlockMask */ }, }, - { + { /* AlienTransitionDesc */ 0, /* StartIndex */ 0, /* NumFrames */ 0, /* AnimFlags */ @@ -138,7 +141,7 @@ static LOCDATA shofixti_desc = 0, 0, /* RestartRate */ 0, /* BlockMask */ }, - { + { /* AlienTalkDesc */ 1, /* StartIndex */ 4, /* NumFrames */ 0, /* AnimFlags */ @@ -147,7 +150,6 @@ static LOCDATA shofixti_desc = 0, /* BlockMask */ }, NULL_PTR, /* AlienNumberSpeech - none */ - { {0, 0}, 0, 0, 0, 0 }, /* AlienTextTemplate - starts blank */ }; static RESPONSE_REF shofixti_name; @@ -639,10 +641,8 @@ init_shofixti_comm (void) shofixti_desc.post_encounter_func = post_shofixti_enc; shofixti_desc.uninit_encounter_func = uninit_shofixti; - shofixti_desc.AlienTextTemplate.baseline.x = - TEXT_X_OFFS + (SIS_TEXT_WIDTH >> 1); - shofixti_desc.AlienTextTemplate.baseline.y = 0; - shofixti_desc.AlienTextTemplate.align = ALIGN_CENTER; + shofixti_desc.AlienTextBaseline.x = TEXT_X_OFFS + (SIS_TEXT_WIDTH >> 1); + shofixti_desc.AlienTextBaseline.y = 0; shofixti_desc.AlienTextWidth = SIS_TEXT_WIDTH; SET_GAME_STATE (BATTLE_SEGUE, 0); diff --git a/sc2/src/sc2code/comm/slyhome/slyhome.c b/sc2/src/sc2code/comm/slyhome/slyhome.c index 0610f0233..cd73dad77 100644 --- a/sc2/src/sc2code/comm/slyhome/slyhome.c +++ b/sc2/src/sc2code/comm/slyhome/slyhome.c @@ -31,14 +31,17 @@ static LOCDATA slylandro_desc = (FONT)SLYLANDRO_FONT, /* AlienFont */ WHITE_COLOR, /* AlienTextFColor */ BLACK_COLOR, /* AlienTextBColor */ + {0, 0}, /* AlienTextBaseline */ 0, /* SIS_TEXT_WIDTH, */ /* AlienTextWidth */ + ALIGN_CENTER, /* AlienTextAlign */ + VALIGN_TOP, /* AlienTextValign */ (COLORMAP)SLYLANDRO_COLOR_MAP, /* AlienColorMap */ SLYLANDRO_MUSIC, /* AlienSong */ 0, /* AlienAltSong */ 0, /* AlienSongFlags */ SLYLANDRO_CONVERSATION_PHRASES, /* PlayerPhrases */ 13, /* NumAnimations */ - { + { /* AlienAmbientArray (ambient animations) */ { 0, /* StartIndex */ 5, /* NumFrames */ @@ -161,7 +164,6 @@ static LOCDATA slylandro_desc = 0, /* BlockMask */ }, NULL_PTR, /* AlienNumberSpeech - none */ - { {0, 0}, 0, 0, 0, 0 }, /* AlienTextTemplate - starts blank */ }; static void @@ -903,10 +905,8 @@ init_slylandro_comm (void) slylandro_desc.post_encounter_func = post_slylandro_enc; slylandro_desc.uninit_encounter_func = uninit_slylandro; - slylandro_desc.AlienTextTemplate.baseline.x = - TEXT_X_OFFS + (SIS_TEXT_WIDTH >> 1); - slylandro_desc.AlienTextTemplate.baseline.y = 0; - slylandro_desc.AlienTextTemplate.align = ALIGN_CENTER; + slylandro_desc.AlienTextBaseline.x = TEXT_X_OFFS + (SIS_TEXT_WIDTH >> 1); + slylandro_desc.AlienTextBaseline.y = 0; slylandro_desc.AlienTextWidth = SIS_TEXT_WIDTH; SET_GAME_STATE (BATTLE_SEGUE, 0); diff --git a/sc2/src/sc2code/comm/slyland/slyland.c b/sc2/src/sc2code/comm/slyland/slyland.c index 84b986b50..bc7096398 100644 --- a/sc2/src/sc2code/comm/slyland/slyland.c +++ b/sc2/src/sc2code/comm/slyland/slyland.c @@ -34,14 +34,17 @@ static LOCDATA slylandro_desc = (FONT)SLYLAND_FONT, /* AlienFont */ WHITE_COLOR, /* AlienTextFColor */ BLACK_COLOR, /* AlienTextBColor */ + {0, 0}, /* AlienTextBaseline */ 0, /* SIS_TEXT_WIDTH - 16, */ /* AlienTextWidth */ + ALIGN_CENTER, /* AlienTextAlign */ + VALIGN_TOP, /* AlienTextValign */ (COLORMAP)SLYLAND_COLOR_MAP, /* AlienColorMap */ SLYLAND_MUSIC, /* AlienSong */ 0, /* AlienAltSong */ 0, /* AlienSongFlags */ SLYLAND_CONVERSATION_PHRASES, /* PlayerPhrases */ 6, /* NumAnimations */ - { + { /* AlienAmbientArray (ambient animations) */ { 1, /* StartIndex */ 9, /* NumFrames */ @@ -108,7 +111,6 @@ static LOCDATA slylandro_desc = 0, /* BlockMask */ }, NULL_PTR, /* AlienNumberSpeech - none */ - { {0, 0}, 0, 0, 0, 0 }, /* AlienTextTemplate - starts blank */ }; static RESPONSE_REF threat, @@ -401,10 +403,8 @@ init_slyland_comm (void) slylandro_desc.post_encounter_func = post_slyland_enc; slylandro_desc.uninit_encounter_func = uninit_slyland; - slylandro_desc.AlienTextTemplate.baseline.x = - TEXT_X_OFFS + (SIS_TEXT_WIDTH >> 1); - slylandro_desc.AlienTextTemplate.baseline.y = 0; - slylandro_desc.AlienTextTemplate.align = ALIGN_CENTER; + slylandro_desc.AlienTextBaseline.x = TEXT_X_OFFS + (SIS_TEXT_WIDTH >> 1); + slylandro_desc.AlienTextBaseline.y = 0; slylandro_desc.AlienTextWidth = SIS_TEXT_WIDTH - 16; SET_GAME_STATE (BATTLE_SEGUE, 1); diff --git a/sc2/src/sc2code/comm/spahome/spahome.c b/sc2/src/sc2code/comm/spahome/spahome.c index a5b6adade..58075fe7a 100644 --- a/sc2/src/sc2code/comm/spahome/spahome.c +++ b/sc2/src/sc2code/comm/spahome/spahome.c @@ -33,14 +33,17 @@ static LOCDATA spahome_desc = (FONT)SPATHI_FONT, /* AlienFont */ WHITE_COLOR, /* AlienTextFColor */ BLACK_COLOR, /* AlienTextBColor */ + {0, 0}, /* AlienTextBaseline */ 0, /* SIS_TEXT_WIDTH - 16, */ /* AlienTextWidth */ + ALIGN_CENTER, /* AlienTextAlign */ + VALIGN_TOP, /* AlienTextValign */ (COLORMAP)SPATHI_HOME_COLOR_MAP, /* AlienColorMap */ SPATHI_MUSIC, /* AlienSong */ 0, /* AlienAltSong */ 0, /* AlienSongFlags */ SPATHI_HOME_CONVERSATION_PHRASES, /* PlayerPhrases */ 14, /* NumAnimations */ - { + { /* AlienAmbientArray (ambient animations) */ { 1, /* StartIndex */ 3, /* NumFrames */ @@ -174,7 +177,6 @@ static LOCDATA spahome_desc = 0, /* BlockMask */ }, NULL_PTR, /* AlienNumberSpeech - none */ - { {0, 0}, 0, 0, 0, 0 }, /* AlienTextTemplate - starts blank */ }; static void @@ -989,10 +991,8 @@ init_spahome_comm () spahome_desc.post_encounter_func = post_spahome_enc; spahome_desc.uninit_encounter_func = uninit_spahome; - spahome_desc.AlienTextTemplate.baseline.x = - TEXT_X_OFFS + (SIS_TEXT_WIDTH >> 1); - spahome_desc.AlienTextTemplate.baseline.y = 0; - spahome_desc.AlienTextTemplate.align = ALIGN_CENTER; + spahome_desc.AlienTextBaseline.x = TEXT_X_OFFS + (SIS_TEXT_WIDTH >> 1); + spahome_desc.AlienTextBaseline.y = 0; spahome_desc.AlienTextWidth = SIS_TEXT_WIDTH - 16; // use alternate "Safe Ones" track if available diff --git a/sc2/src/sc2code/comm/spathi/spathic.c b/sc2/src/sc2code/comm/spathi/spathic.c index e1922a4d6..cc94da8b1 100644 --- a/sc2/src/sc2code/comm/spathi/spathic.c +++ b/sc2/src/sc2code/comm/spathi/spathic.c @@ -32,14 +32,17 @@ static LOCDATA spathi_desc = (FONT)SPATHI_FONT, /* AlienFont */ WHITE_COLOR, /* AlienTextFColor */ BLACK_COLOR, /* AlienTextBColor */ + {0, 0}, /* AlienTextBaseline */ 0, /* SIS_TEXT_WIDTH - 16, */ /* AlienTextWidth */ + ALIGN_CENTER, /* AlienTextAlign */ + VALIGN_TOP, /* AlienTextValign */ (COLORMAP)SPATHI_COLOR_MAP, /* AlienColorMap */ SPATHI_MUSIC, /* AlienSong */ 0, /* AlienAltSong */ 0, /* AlienSongFlags */ SPATHI_CONVERSATION_PHRASES, /* PlayerPhrases */ 8, /* NumAnimations */ - { + { /* AlienAmbientArray (ambient animations) */ { 1, /* StartIndex */ 6, /* NumFrames */ @@ -107,7 +110,7 @@ static LOCDATA spathi_desc = 0, /* BlockMask */ }, }, - { + { /* AlienTransitionDesc */ 0, /* StartIndex */ 0, /* NumFrames */ 0, /* AnimFlags */ @@ -135,7 +138,6 @@ static LOCDATA spathi_desc = }, #endif /* NEVER */ NULL_PTR, /* AlienNumberSpeech - none */ - { {0, 0}, 0, 0, 0, 0 }, /* AlienTextTemplate - starts blank */ }; static void @@ -795,10 +797,8 @@ init_spathi_comm (void) spathi_desc.post_encounter_func = post_spathi_enc; spathi_desc.uninit_encounter_func = uninit_spathi; - spathi_desc.AlienTextTemplate.baseline.x = - TEXT_X_OFFS + (SIS_TEXT_WIDTH >> 1); - spathi_desc.AlienTextTemplate.baseline.y = 0; - spathi_desc.AlienTextTemplate.align = ALIGN_CENTER; + spathi_desc.AlienTextBaseline.x = TEXT_X_OFFS + (SIS_TEXT_WIDTH >> 1); + spathi_desc.AlienTextBaseline.y = 0; spathi_desc.AlienTextWidth = SIS_TEXT_WIDTH - 16; if (GET_GAME_STATE (FOUND_PLUTO_SPATHI) == 1) diff --git a/sc2/src/sc2code/comm/starbas/starbas.c b/sc2/src/sc2code/comm/starbas/starbas.c index 00eeee8a5..cd61c99cb 100644 --- a/sc2/src/sc2code/comm/starbas/starbas.c +++ b/sc2/src/sc2code/comm/starbas/starbas.c @@ -43,14 +43,17 @@ static LOCDATA commander_desc = (FONT)COMMANDER_FONT, /* AlienFont */ WHITE_COLOR, /* AlienTextFColor */ BLACK_COLOR, /* AlienTextBColor */ + {0, 0}, /* AlienTextBaseline */ 0, /* SIS_TEXT_WIDTH, */ /* AlienTextWidth */ + ALIGN_CENTER, /* AlienTextAlign */ + VALIGN_MIDDLE, /* AlienTextValign */ (COLORMAP)COMMANDER_COLOR_MAP, /* AlienColorMap */ COMMANDER_MUSIC, /* AlienSong */ 0, /* AlienAltSong */ 0, /* AlienSongFlags */ STARBASE_CONVERSATION_PHRASES, /* PlayerPhrases */ 10, /* NumAnimations */ - { + { /* AlienAmbientArray (ambient animations) */ { /* Blink */ 1, /* StartIndex */ 3, /* NumFrames */ @@ -132,7 +135,7 @@ static LOCDATA commander_desc = 0, /* BlockMask */ }, }, - { + { /* AlienTransitionDesc */ 0, /* StartIndex */ 0, /* NumFrames */ 0, /* AnimFlags */ @@ -140,7 +143,7 @@ static LOCDATA commander_desc = 0, 0, /* RestartRate */ 0, /* BlockMask */ }, - { + { /* AlienTalkDesc */ 4, /* StartIndex */ 6, /* NumFrames */ 0, /* AnimFlags */ @@ -149,7 +152,6 @@ static LOCDATA commander_desc = 0, /* BlockMask */ }, NULL_PTR, /* AlienNumberSpeech - none */ - { {0, 0}, 0, 0, 0, 0 }, /* AlienTextTemplate - starts blank */ }; static DWORD CurBulletinMask; @@ -1938,10 +1940,8 @@ init_starbase_comm () commander_desc.uninit_encounter_func = uninit_starbase; commander_desc.AlienTextWidth = 143; - commander_desc.AlienTextTemplate.baseline.x = 164; - commander_desc.AlienTextTemplate.baseline.y = 20; - commander_desc.AlienTextTemplate.align = ALIGN_CENTER; - commander_desc.AlienTextTemplate.valign = VALIGN_MIDDLE; + commander_desc.AlienTextBaseline.x = 164; + commander_desc.AlienTextBaseline.y = 20; // use alternate Starbase track if available commander_desc.AlienAltSong = STARBASE_ALT_MUSIC; diff --git a/sc2/src/sc2code/comm/supox/supoxc.c b/sc2/src/sc2code/comm/supox/supoxc.c index 99a593cbd..ae1f3b175 100644 --- a/sc2/src/sc2code/comm/supox/supoxc.c +++ b/sc2/src/sc2code/comm/supox/supoxc.c @@ -32,14 +32,17 @@ static LOCDATA supox_desc = (FONT)SUPOX_FONT, /* AlienFont */ WHITE_COLOR, /* AlienTextFColor */ BLACK_COLOR, /* AlienTextBColor */ + {0, 0}, /* AlienTextBaseline */ 0, /* SIS_TEXT_WIDTH - 16, */ /* AlienTextWidth */ + ALIGN_CENTER, /* AlienTextAlign */ + VALIGN_TOP, /* AlienTextValign */ (COLORMAP)SUPOX_COLOR_MAP, /* AlienColorMap */ SUPOX_MUSIC, /* AlienSong */ 0, /* AlienAltSong */ 0, /* AlienSongFlags */ SUPOX_CONVERSATION_PHRASES, /* PlayerPhrases */ 4, /* NumAnimations */ - { + { /* AlienAmbientArray (ambient animations) */ { 4, /* StartIndex */ 5, /* NumFrames */ @@ -74,7 +77,7 @@ static LOCDATA supox_desc = 0, /* BlockMask */ }, }, - { + { /* AlienTransitionDesc */ 0, /* StartIndex */ 0, /* NumFrames */ 0, /* AnimFlags */ @@ -82,7 +85,7 @@ static LOCDATA supox_desc = 0, 0, /* RestartRate */ 0, /* BlockMask */ }, - { + { /* AlienTalkDesc */ 1, /* StartIndex */ 3, /* NumFrames */ 0, /* AnimFlags */ @@ -91,7 +94,6 @@ static LOCDATA supox_desc = 0, /* BlockMask */ }, NULL_PTR, /* AlienNumberSpeech - none */ - { {0, 0}, 0, 0, 0, 0 }, /* AlienTextTemplate - starts blank */ }; static void @@ -684,10 +686,8 @@ init_supox_comm (void) supox_desc.post_encounter_func = post_supox_enc; supox_desc.uninit_encounter_func = uninit_supox; - supox_desc.AlienTextTemplate.baseline.x = - TEXT_X_OFFS + (SIS_TEXT_WIDTH >> 1); - supox_desc.AlienTextTemplate.baseline.y = 0; - supox_desc.AlienTextTemplate.align = ALIGN_CENTER; + supox_desc.AlienTextBaseline.x = TEXT_X_OFFS + (SIS_TEXT_WIDTH >> 1); + supox_desc.AlienTextBaseline.y = 0; supox_desc.AlienTextWidth = SIS_TEXT_WIDTH - 16; if (!GET_GAME_STATE (SUPOX_HOSTILE) diff --git a/sc2/src/sc2code/comm/syreen/syreenc.c b/sc2/src/sc2code/comm/syreen/syreenc.c index 70523ce55..c3cdf4d45 100644 --- a/sc2/src/sc2code/comm/syreen/syreenc.c +++ b/sc2/src/sc2code/comm/syreen/syreenc.c @@ -33,14 +33,17 @@ static LOCDATA syreen_desc = (FONT)SYREEN_FONT, /* AlienFont */ WHITE_COLOR, /* AlienTextFColor */ BLACK_COLOR, /* AlienTextBColor */ + {0, 0}, /* AlienTextBaseline */ 0, /* SIS_TEXT_WIDTH - 16, */ /* AlienTextWidth */ + ALIGN_CENTER, /* AlienTextAlign */ + VALIGN_TOP, /* AlienTextValign */ (COLORMAP)SYREEN_COLOR_MAP, /* AlienColorMap */ SYREEN_MUSIC, /* AlienSong */ 0, /* AlienAltSong */ 0, /* AlienSongFlags */ SYREEN_CONVERSATION_PHRASES, /* PlayerPhrases */ 15, /* NumAnimations */ - { + { /* AlienAmbientArray (ambient animations) */ { 5, /* StartIndex */ 2, /* NumFrames */ @@ -164,7 +167,7 @@ static LOCDATA syreen_desc = (1 << 9) | (1 << 13), /* BlockMask */ }, }, - { + { /* AlienTransitionDesc */ 0, /* StartIndex */ 0, /* NumFrames */ 0, /* AnimFlags */ @@ -172,7 +175,7 @@ static LOCDATA syreen_desc = 0, 0, /* RestartRate */ 0, /* BlockMask */ }, - { + { /* AlienTalkDesc */ 1, /* StartIndex */ 4, /* NumFrames */ 0, /* AnimFlags */ @@ -181,7 +184,6 @@ static LOCDATA syreen_desc = 0, /* BlockMask */ }, NULL_PTR, /* AlienNumberSpeech - none */ - { {0, 0}, 0, 0, 0, 0 }, /* AlienTextTemplate - starts blank */ }; static void @@ -853,10 +855,8 @@ init_syreen_comm (void) syreen_desc.post_encounter_func = post_syreen_enc; syreen_desc.uninit_encounter_func = uninit_syreen; - syreen_desc.AlienTextTemplate.baseline.x = - TEXT_X_OFFS + (SIS_TEXT_WIDTH >> 1); - syreen_desc.AlienTextTemplate.baseline.y = 0; - syreen_desc.AlienTextTemplate.align = ALIGN_CENTER; + syreen_desc.AlienTextBaseline.x = TEXT_X_OFFS + (SIS_TEXT_WIDTH >> 1); + syreen_desc.AlienTextBaseline.y = 0; syreen_desc.AlienTextWidth = SIS_TEXT_WIDTH - 16; SET_GAME_STATE (BATTLE_SEGUE, 0); diff --git a/sc2/src/sc2code/comm/talkpet/talkpet.c b/sc2/src/sc2code/comm/talkpet/talkpet.c index ba13e3f8e..144c0257e 100644 --- a/sc2/src/sc2code/comm/talkpet/talkpet.c +++ b/sc2/src/sc2code/comm/talkpet/talkpet.c @@ -31,14 +31,17 @@ static LOCDATA talkpet_desc = (FONT)TALKING_PET_FONT, /* AlienFont */ WHITE_COLOR, /* AlienTextFColor */ BLACK_COLOR, /* AlienTextBColor */ + {0, 0}, /* AlienTextBaseline */ 0, /* SIS_TEXT_WIDTH - 16, */ /* AlienTextWidth */ + ALIGN_CENTER, /* AlienTextAlign */ + VALIGN_TOP, /* AlienTextValign */ (COLORMAP)TALKING_PET_COLOR_MAP, /* AlienColorMap */ TALKING_PET_MUSIC, /* AlienSong */ 0, /* AlienAltSong */ 0, /* AlienSongFlags */ TALKING_PET_CONVERSATION_PHRASES, /* PlayerPhrases */ 16, /* NumAnimations */ - { + { /* AlienAmbientArray (ambient animations) */ { 7, /* StartIndex */ 3, /* NumFrames */ @@ -171,7 +174,7 @@ static LOCDATA talkpet_desc = 0, /* BlockMask */ }, }, - { + { /* AlienTransitionDesc */ 0, /* StartIndex */ 0, /* NumFrames */ 0, /* AnimFlags */ @@ -179,7 +182,7 @@ static LOCDATA talkpet_desc = 0, 0, /* RestartRate */ 0, /* BlockMask */ }, - { + { /* AlienTalkDesc */ 1, /* StartIndex */ 6, /* NumFrames */ 0, /* AnimFlags */ @@ -188,7 +191,6 @@ static LOCDATA talkpet_desc = 0, /* BlockMask */ }, NULL_PTR, /* AlienNumberSpeech - none */ - { {0, 0}, 0, 0, 0, 0 }, /* AlienTextTemplate - starts blank */ }; #define STROBE_RATE 15 @@ -799,10 +801,8 @@ init_talkpet_comm (void) talkpet_desc.post_encounter_func = post_talkpet_enc; talkpet_desc.uninit_encounter_func = uninit_talkpet; - talkpet_desc.AlienTextTemplate.baseline.x = - TEXT_X_OFFS + (SIS_TEXT_WIDTH >> 1); - talkpet_desc.AlienTextTemplate.baseline.y = 0; - talkpet_desc.AlienTextTemplate.align = ALIGN_CENTER; + talkpet_desc.AlienTextBaseline.x = TEXT_X_OFFS + (SIS_TEXT_WIDTH >> 1); + talkpet_desc.AlienTextBaseline.y = 0; talkpet_desc.AlienTextWidth = SIS_TEXT_WIDTH - 16; if (LOBYTE (GLOBAL (CurrentActivity)) != IN_LAST_BATTLE) diff --git a/sc2/src/sc2code/comm/thradd/thraddc.c b/sc2/src/sc2code/comm/thradd/thraddc.c index f68fa0dc0..7c47247cf 100644 --- a/sc2/src/sc2code/comm/thradd/thraddc.c +++ b/sc2/src/sc2code/comm/thradd/thraddc.c @@ -33,14 +33,17 @@ static LOCDATA thradd_desc = (FONT)THRADD_FONT, /* AlienFont */ WHITE_COLOR, /* AlienTextFColor */ BLACK_COLOR, /* AlienTextBColor */ + {0, 0}, /* AlienTextBaseline */ 0, /* SIS_TEXT_WIDTH - 16, */ /* AlienTextWidth */ + ALIGN_CENTER, /* AlienTextAlign */ + VALIGN_TOP, /* AlienTextValign */ (COLORMAP)THRADD_COLOR_MAP, /* AlienColorMap */ THRADD_MUSIC, /* AlienSong */ 0, /* AlienAltSong */ 0, /* AlienSongFlags */ THRADD_CONVERSATION_PHRASES, /* PlayerPhrases */ 8, /* NumAnimations */ - { + { /* AlienAmbientArray (ambient animations) */ { 8, /* StartIndex */ 4, /* NumFrames */ @@ -107,7 +110,7 @@ static LOCDATA thradd_desc = 0, /* BlockMask */ }, }, - { + { /* AlienTransitionDesc */ 0, /* StartIndex */ 0, /* NumFrames */ 0, /* AnimFlags */ @@ -115,7 +118,7 @@ static LOCDATA thradd_desc = 0, 0, /* RestartRate */ 0, /* BlockMask */ }, - { + { /* AlienTalkDesc */ 1, /* StartIndex */ 7, /* NumFrames */ 0, /* AnimFlags */ @@ -124,7 +127,6 @@ static LOCDATA thradd_desc = 0, /* BlockMask */ }, NULL_PTR, /* AlienNumberSpeech - none */ - { {0, 0}, 0, 0, 0, 0 }, /* AlienTextTemplate - starts blank */ }; static int @@ -927,10 +929,8 @@ init_thradd_comm (void) thradd_desc.post_encounter_func = post_thradd_enc; thradd_desc.uninit_encounter_func = uninit_thradd; - thradd_desc.AlienTextTemplate.baseline.x = - TEXT_X_OFFS + (SIS_TEXT_WIDTH >> 1); - thradd_desc.AlienTextTemplate.baseline.y = 0; - thradd_desc.AlienTextTemplate.align = ALIGN_CENTER; + thradd_desc.AlienTextBaseline.x = TEXT_X_OFFS + (SIS_TEXT_WIDTH >> 1); + thradd_desc.AlienTextBaseline.y = 0; thradd_desc.AlienTextWidth = SIS_TEXT_WIDTH - 16; if (GET_GAME_STATE (THRADD_MANNER) diff --git a/sc2/src/sc2code/comm/umgah/umgahc.c b/sc2/src/sc2code/comm/umgah/umgahc.c index 7283cb1c4..b515fd289 100644 --- a/sc2/src/sc2code/comm/umgah/umgahc.c +++ b/sc2/src/sc2code/comm/umgah/umgahc.c @@ -32,14 +32,17 @@ static LOCDATA umgah_desc = (FONT)UMGAH_FONT, /* AlienFont */ WHITE_COLOR, /* AlienTextFColor */ BLACK_COLOR, /* AlienTextBColor */ + {0, 0}, /* AlienTextBaseline */ 0, /* SIS_TEXT_WIDTH - 16, */ /* AlienTextWidth */ + ALIGN_CENTER, /* AlienTextAlign */ + VALIGN_TOP, /* AlienTextValign */ (COLORMAP)UMGAH_COLOR_MAP, /* AlienColorMap */ UMGAH_MUSIC, /* AlienSong */ 0, /* AlienAltSong */ 0, /* AlienSongFlags */ UMGAH_CONVERSATION_PHRASES, /* PlayerPhrases */ 16, /* NumAnimations */ - { + { /* AlienAmbientArray (ambient animations) */ { 5, /* StartIndex */ 3, /* NumFrames */ @@ -169,7 +172,7 @@ static LOCDATA umgah_desc = (1 << 14), /* BlockMask */ }, }, - { + { /* AlienTransitionDesc */ 0, /* StartIndex */ 0, /* NumFrames */ 0, /* AnimFlags */ @@ -177,7 +180,7 @@ static LOCDATA umgah_desc = 0, 0, /* RestartRate */ 0, /* BlockMask */ }, - { + { /* AlienTalkDesc */ 1, /* StartIndex */ 4, /* NumFrames */ 0, /* AnimFlags */ @@ -186,7 +189,6 @@ static LOCDATA umgah_desc = 0, /* BlockMask */ }, NULL_PTR, /* AlienNumberSpeech - none */ - { {0, 0}, 0, 0, 0, 0 }, /* AlienTextTemplate - starts blank */ }; static void @@ -704,10 +706,8 @@ init_umgah_comm (void) umgah_desc.post_encounter_func = post_umgah_enc; umgah_desc.uninit_encounter_func = uninit_umgah; - umgah_desc.AlienTextTemplate.baseline.x = - TEXT_X_OFFS + (SIS_TEXT_WIDTH >> 1); - umgah_desc.AlienTextTemplate.baseline.y = 0; - umgah_desc.AlienTextTemplate.align = ALIGN_CENTER; + umgah_desc.AlienTextBaseline.x = TEXT_X_OFFS + (SIS_TEXT_WIDTH >> 1); + umgah_desc.AlienTextBaseline.y = 0; umgah_desc.AlienTextWidth = SIS_TEXT_WIDTH - 16; if ((GET_GAME_STATE (TALKING_PET) && !GET_GAME_STATE (UMGAH_HOSTILE)) diff --git a/sc2/src/sc2code/comm/urquan/urquanc.c b/sc2/src/sc2code/comm/urquan/urquanc.c index 3fe404175..a59b6b894 100644 --- a/sc2/src/sc2code/comm/urquan/urquanc.c +++ b/sc2/src/sc2code/comm/urquan/urquanc.c @@ -29,14 +29,17 @@ static LOCDATA urquan_desc = (FONT)URQUAN_FONT, /* AlienFont */ WHITE_COLOR, /* AlienTextFColor */ BLACK_COLOR, /* AlienTextBColor */ + {0, 0}, /* AlienTextBaseline */ 0, /* SIS_TEXT_WIDTH - 16, */ /* AlienTextWidth */ + ALIGN_CENTER, /* AlienTextAlign */ + VALIGN_TOP, /* AlienTextValign */ (COLORMAP)URQUAN_COLOR_MAP, /* AlienColorMap */ URQUAN_MUSIC, /* AlienSong */ 0, /* AlienAltSong */ 0, /* AlienSongFlags */ URQUAN_CONVERSATION_PHRASES, /* PlayerPhrases */ 7, /* NumAnimations */ - { + { /* AlienAmbientArray (ambient animations) */ { 7, /* StartIndex */ 6, /* NumFrames */ @@ -94,7 +97,7 @@ static LOCDATA urquan_desc = 0, /* BlockMask */ }, }, - { + { /* AlienTransitionDesc */ 1, /* StartIndex */ 2, /* NumFrames */ 0, /* AnimFlags */ @@ -102,7 +105,7 @@ static LOCDATA urquan_desc = 0, 0, /* RestartRate */ 0, /* BlockMask */ }, - { + { /* AlienTalkDesc */ 2, /* StartIndex */ 5, /* NumFrames */ 0, /* AnimFlags */ @@ -111,7 +114,6 @@ static LOCDATA urquan_desc = 0, /* BlockMask */ }, NULL_PTR, /* AlienNumberSpeech - none */ - { {0, 0}, 0, 0, 0, 0 }, /* AlienTextTemplate - starts blank */ }; static void @@ -527,10 +529,8 @@ init_urquan_comm (void) urquan_desc.post_encounter_func = post_urquan_enc; urquan_desc.uninit_encounter_func = uninit_urquan; - urquan_desc.AlienTextTemplate.baseline.x = - TEXT_X_OFFS + (SIS_TEXT_WIDTH >> 1); - urquan_desc.AlienTextTemplate.baseline.y = 0; - urquan_desc.AlienTextTemplate.align = ALIGN_CENTER; + urquan_desc.AlienTextBaseline.x = TEXT_X_OFFS + (SIS_TEXT_WIDTH >> 1); + urquan_desc.AlienTextBaseline.y = 0; urquan_desc.AlienTextWidth = SIS_TEXT_WIDTH - 16; GrpOffs = GET_GAME_STATE_32 (URQUAN_PROBE_GRPOFFS0); diff --git a/sc2/src/sc2code/comm/utwig/utwigc.c b/sc2/src/sc2code/comm/utwig/utwigc.c index 7128727ad..d58b5fb12 100644 --- a/sc2/src/sc2code/comm/utwig/utwigc.c +++ b/sc2/src/sc2code/comm/utwig/utwigc.c @@ -33,14 +33,17 @@ static LOCDATA utwig_desc = (FONT)UTWIG_FONT, /* AlienFont */ WHITE_COLOR, /* AlienTextFColor */ BLACK_COLOR, /* AlienTextBColor */ + {0, 0}, /* AlienTextBaseline */ 0, /* SIS_TEXT_WIDTH - 16, */ /* AlienTextWidth */ + ALIGN_CENTER, /* AlienTextAlign */ + VALIGN_MIDDLE, /* AlienTextValign */ (COLORMAP)UTWIG_COLOR_MAP, /* AlienColorMap */ UTWIG_MUSIC, /* AlienSong */ 0, /* AlienAltSong */ 0, /* AlienSongFlags */ UTWIG_CONVERSATION_PHRASES, /* PlayerPhrases */ 16, /* NumAnimations */ - { + { /* AlienAmbientArray (ambient animations) */ { 4, /* StartIndex */ 3, /* NumFrames */ @@ -171,7 +174,7 @@ static LOCDATA utwig_desc = 0, /* BlockMask */ }, }, - { + { /* AlienTransitionDesc */ 0, /* StartIndex */ 0, /* NumFrames */ 0, /* AnimFlags */ @@ -179,7 +182,7 @@ static LOCDATA utwig_desc = 0, 0, /* RestartRate */ 0, /* BlockMask */ }, - { + { /* AlienTalkDesc */ 1, /* StartIndex */ 3, /* NumFrames */ 0, /* AnimFlags */ @@ -188,7 +191,6 @@ static LOCDATA utwig_desc = 0, /* BlockMask */ }, NULL_PTR, /* AlienNumberSpeech - none */ - { {0, 0}, 0, 0, 0, 0 }, /* AlienTextTemplate - starts blank */ }; static void @@ -962,11 +964,8 @@ init_utwig_comm (void) utwig_desc.post_encounter_func = post_utwig_enc; utwig_desc.uninit_encounter_func = uninit_utwig; - utwig_desc.AlienTextTemplate.baseline.x = - TEXT_X_OFFS + (SIS_TEXT_WIDTH >> 1); - utwig_desc.AlienTextTemplate.baseline.y = 70; - utwig_desc.AlienTextTemplate.align = ALIGN_CENTER; - utwig_desc.AlienTextTemplate.valign = VALIGN_MIDDLE; + utwig_desc.AlienTextBaseline.x = TEXT_X_OFFS + (SIS_TEXT_WIDTH >> 1); + utwig_desc.AlienTextBaseline.y = 70; utwig_desc.AlienTextWidth = SIS_TEXT_WIDTH - 16; if (GET_GAME_STATE (UTWIG_HAVE_ULTRON)) diff --git a/sc2/src/sc2code/comm/vux/vuxc.c b/sc2/src/sc2code/comm/vux/vuxc.c index 84f9fd8ae..161751b4d 100644 --- a/sc2/src/sc2code/comm/vux/vuxc.c +++ b/sc2/src/sc2code/comm/vux/vuxc.c @@ -29,14 +29,17 @@ static LOCDATA vux_desc = (FONT)VUX_FONT, /* AlienFont */ WHITE_COLOR, /* AlienTextFColor */ BLACK_COLOR, /* AlienTextBColor */ + {0, 0}, /* AlienTextBaseline */ 0, /* (SIS_TEXT_WIDTH - 16) >> 1, */ /* AlienTextWidth */ + ALIGN_CENTER, /* AlienTextAlign */ + VALIGN_TOP, /* AlienTextValign */ VUX_COLOR_MAP, /* AlienColorMap */ VUX_MUSIC, /* AlienSong */ 0, /* AlienAltSong */ 0, /* AlienSongFlags */ VUX_CONVERSATION_PHRASES, /* PlayerPhrases */ 17, /* NumAnimations */ - { + { /* AlienAmbientArray (ambient animations) */ { 12, /* StartIndex */ 3, /* NumFrames */ @@ -174,7 +177,7 @@ static LOCDATA vux_desc = 0, /* BlockMask */ }, }, - { + { /* AlienTransitionDesc */ 0, /* StartIndex */ 0, /* NumFrames */ 0, /* AnimFlags */ @@ -182,7 +185,7 @@ static LOCDATA vux_desc = 0, 0, /* RestartRate */ 0, /* BlockMask */ }, - { + { /* AlienTalkDesc */ 1, /* StartIndex */ 11, /* NumFrames */ 0, /* AnimFlags */ @@ -191,7 +194,6 @@ static LOCDATA vux_desc = 0, /* BlockMask */ }, NULL_PTR, /* AlienNumberSpeech - none */ - { {0, 0}, 0, 0, 0, 0 }, /* AlienTextTemplate - starts blank */ }; static void @@ -770,11 +772,9 @@ init_vux_comm (void) vux_desc.post_encounter_func = post_vux_enc; vux_desc.uninit_encounter_func = uninit_vux; - vux_desc.AlienTextTemplate.baseline.x = - TEXT_X_OFFS + (SIS_TEXT_WIDTH >> 1) + vux_desc.AlienTextBaseline.x = TEXT_X_OFFS + (SIS_TEXT_WIDTH >> 1) + (SIS_TEXT_WIDTH >> 2); - vux_desc.AlienTextTemplate.baseline.y = 0; - vux_desc.AlienTextTemplate.align = ALIGN_CENTER; + vux_desc.AlienTextBaseline.y = 0; vux_desc.AlienTextWidth = (SIS_TEXT_WIDTH - 16) >> 1; if ((GET_GAME_STATE (GLOBAL_FLAGS_AND_DATA) & (1 << 6)) diff --git a/sc2/src/sc2code/comm/yehat/yehatc.c b/sc2/src/sc2code/comm/yehat/yehatc.c index 164e445c8..c4903d820 100644 --- a/sc2/src/sc2code/comm/yehat/yehatc.c +++ b/sc2/src/sc2code/comm/yehat/yehatc.c @@ -34,7 +34,10 @@ static LOCDATA yehat_desc = (FONT)YEHAT_FONT, /* AlienFont */ WHITE_COLOR, /* AlienTextFColor */ BLACK_COLOR, /* AlienTextBColor */ + {0, 0}, /* AlienTextBaseline */ 0, /* (SIS_TEXT_WIDTH - 16) * 2 / 3, */ /* AlienTextWidth */ + ALIGN_CENTER, /* AlienTextAlign */ + VALIGN_MIDDLE, /* AlienTextValign */ (COLORMAP)YEHAT_COLOR_MAP, /* AlienColorMap */ YEHAT_MUSIC, /* AlienSong */ 0, /* AlienAltSong */ @@ -182,7 +185,6 @@ static LOCDATA yehat_desc = 0, /* BlockMask */ }, NULL_PTR, /* AlienNumberSpeech - none */ - { {0, 0}, 0, 0, 0, 0 }, /* AlienTextTemplate - starts blank */ }; static void @@ -663,10 +665,8 @@ init_yehat_comm (void) yehat_desc.post_encounter_func = post_yehat_enc; yehat_desc.uninit_encounter_func = uninit_yehat; - yehat_desc.AlienTextTemplate.baseline.x = SIS_SCREEN_WIDTH * 2 / 3; - yehat_desc.AlienTextTemplate.baseline.y = 60; - yehat_desc.AlienTextTemplate.align = ALIGN_CENTER; - yehat_desc.AlienTextTemplate.valign = VALIGN_MIDDLE; + yehat_desc.AlienTextBaseline.x = SIS_SCREEN_WIDTH * 2 / 3; + yehat_desc.AlienTextBaseline.y = 60; yehat_desc.AlienTextWidth = (SIS_TEXT_WIDTH - 16) * 2 / 3; if (LOBYTE (GLOBAL (CurrentActivity)) != WON_LAST_BATTLE) diff --git a/sc2/src/sc2code/comm/zoqfot/zoqfotc.c b/sc2/src/sc2code/comm/zoqfot/zoqfotc.c index 907039e3a..b230dabb9 100644 --- a/sc2/src/sc2code/comm/zoqfot/zoqfotc.c +++ b/sc2/src/sc2code/comm/zoqfot/zoqfotc.c @@ -49,14 +49,17 @@ static LOCDATA zoqfot_desc = (FONT)ZOQFOTPIK_FONT, /* AlienFont */ 0, /* AlienTextFColor */ 0, /* AlienTextBColor */ - 0, /* SIS_SCREEN_WIDTH, */ /* AlienTextWidth */ + {0, 0}, /* AlienTextBaseline */ + 0, /* AlienTextWidth */ + ALIGN_CENTER, /* AlienTextAlign */ + VALIGN_MIDDLE, /* AlienTextValign */ (COLORMAP)ZOQFOTPIK_COLOR_MAP, /* AlienColorMap */ ZOQFOTPIK_MUSIC, /* AlienSong */ 0, /* AlienAltSong */ 0, /* AlienSongFlags */ ZOQFOTPIK_CONVERSATION_PHRASES, /* PlayerPhrases */ 3, /* NumAnimations */ - { + { /* AlienAmbientArray (ambient animations) */ { /* Eye blink */ 1, /* StartIndex */ 4, /* NumFrames */ @@ -83,7 +86,7 @@ static LOCDATA zoqfot_desc = 0, /* BlockMask */ }, }, - { /* Move Eye */ + { /* AlienTransitionDesc - Move Eye */ FOT_TO_ZOQ, /* StartIndex */ 3, /* NumFrames */ 0, /* AnimFlags */ @@ -91,7 +94,7 @@ static LOCDATA zoqfot_desc = 0, 0, /* RestartRate */ 0, /* BlockMask */ }, - { + { /* AlienTalkDesc */ ZOQ_TALK_INDEX, /* StartIndex */ ZOQ_TALK_FRAMES, /* NumFrames */ 0, /* AnimFlags */ @@ -100,7 +103,6 @@ static LOCDATA zoqfot_desc = 0, /* BlockMask */ }, NULL_PTR, /* AlienNumberSpeech - none */ - { {0, 0}, 0, 0, 0, 0 }, /* AlienTextTemplate - starts blank */ }; enum @@ -124,8 +126,8 @@ SelectAlienZOQ (void) CommData.AlienTalkDesc.NumFrames = ZOQ_TALK_FRAMES; CommData.AlienAmbientArray[1].AnimFlags &= ~WAIT_TALKING; - CommData.AlienTextTemplate.baseline.x = (SWORD)ZOQ_BASE_X; - CommData.AlienTextTemplate.baseline.y = ZOQ_BASE_Y; + CommData.AlienTextBaseline.x = (SWORD)ZOQ_BASE_X; + CommData.AlienTextBaseline.y = ZOQ_BASE_Y; CommData.AlienTextFColor = ZOQ_FG_COLOR; CommData.AlienTextBColor = ZOQ_BG_COLOR; } @@ -143,8 +145,8 @@ SelectAlienPIK (void) CommData.AlienTalkDesc.NumFrames = PIK_TALK_FRAMES; CommData.AlienAmbientArray[1].AnimFlags |= WAIT_TALKING; - CommData.AlienTextTemplate.baseline.x = (SWORD)PIK_BASE_X; - CommData.AlienTextTemplate.baseline.y = PIK_BASE_Y; + CommData.AlienTextBaseline.x = (SWORD)PIK_BASE_X; + CommData.AlienTextBaseline.y = PIK_BASE_Y; CommData.AlienTextFColor = PIK_FG_COLOR; CommData.AlienTextBColor = PIK_BG_COLOR; } @@ -939,8 +941,6 @@ init_zoqfot_comm (void) zoqfot_desc.post_encounter_func = post_zoqfot_enc; zoqfot_desc.uninit_encounter_func = uninit_zoqfot; - zoqfot_desc.AlienTextTemplate.align = ALIGN_CENTER; - zoqfot_desc.AlienTextTemplate.valign = VALIGN_MIDDLE; zoqfot_desc.AlienTextWidth = (SIS_TEXT_WIDTH >> 1) - TEXT_X_OFFS; if ((ActivateStarShip (ZOQFOTPIK_SHIP, CHECK_ALLIANCE) & GOOD_GUY) diff --git a/sc2/src/sc2code/commanim.c b/sc2/src/sc2code/commanim.c index e178865c3..bb1558ad8 100644 --- a/sc2/src/sc2code/commanim.c +++ b/sc2/src/sc2code/commanim.c @@ -523,7 +523,8 @@ ambient_anim_task (void *data) } Task -StartCommAnimTask(void) { +StartCommAnimTask(void) +{ return AssignTask (ambient_anim_task, 3072, "ambient animations"); } diff --git a/sc2/src/sc2code/confirm.c b/sc2/src/sc2code/confirm.c index e28cdfb14..bb290492c 100644 --- a/sc2/src/sc2code/confirm.c +++ b/sc2/src/sc2code/confirm.c @@ -58,7 +58,6 @@ DrawConfirmationWindow (BOOLEAN answer) t.baseline.y = r.corner.y + 8; t.pStr = GAME_STRING (QUITMENU_STRING_BASE); // "Really Quit?" t.align = ALIGN_CENTER; - t.valign = VALIGN_BOTTOM; t.CharCount = (COUNT)~0; font_DrawText (&t); t.baseline.y += 10; diff --git a/sc2/src/sc2code/credits.c b/sc2/src/sc2code/credits.c index aec6ce17d..21aa18e59 100644 --- a/sc2/src/sc2code/credits.c +++ b/sc2/src/sc2code/credits.c @@ -202,7 +202,6 @@ Credits_RenderTextFrame (CONTEXT TempContext, int *istr, int dir, return 0; t.align = ALIGN_LEFT; - t.valign = VALIGN_MIDDLE; t.baseline.x = 100; // any value will do t.baseline.y = 100; // any value will do t.pStr = " "; @@ -266,7 +265,6 @@ Credits_RenderTextFrame (CONTEXT TempContext, int *istr, int dir, col_format_t *fmt = colfmt + TextLines[i].baseline.x; TextLines[i].align = fmt->align; - TextLines[i].valign = VALIGN_MIDDLE; TextLines[i].baseline.x = fmt->basex; TextLines[i].baseline.y *= leading; } diff --git a/sc2/src/sc2code/globdata.h b/sc2/src/sc2code/globdata.h index 7c78291bb..92e594de1 100644 --- a/sc2/src/sc2code/globdata.h +++ b/sc2/src/sc2code/globdata.h @@ -139,7 +139,10 @@ typedef struct FRAME AlienFrame; FONT AlienFont; COLOR AlienTextFColor, AlienTextBColor; + POINT AlienTextBaseline; COUNT AlienTextWidth; + TEXT_ALIGN AlienTextAlign; + TEXT_VALIGN AlienTextValign; COLORMAP AlienColorMap; DWORD AlienSong; DWORD AlienAltSong; @@ -154,7 +157,6 @@ typedef struct ANIMATION_DESC AlienTalkDesc; NUMBER_SPEECH AlienNumberSpeech; - TEXT AlienTextTemplate; } LOCDATA; typedef LOCDATA *PLOCDATA; #define LOCDATAPTR PLOCDATA diff --git a/sc2/src/sc2code/intro.c b/sc2/src/sc2code/intro.c index 3308a6c7f..965845969 100644 --- a/sc2/src/sc2code/intro.c +++ b/sc2/src/sc2code/intro.c @@ -453,7 +453,6 @@ DoPresentation (PVOID pIS) for (i = 0; i < pPIS->LinesCount; ++i, y += leading) { pPIS->TextLines[i].align = ALIGN_CENTER; - pPIS->TextLines[i].valign = VALIGN_MIDDLE; pPIS->TextLines[i].baseline.x = SCREEN_WIDTH / 2; pPIS->TextLines[i].baseline.y = y; } @@ -501,7 +500,6 @@ DoPresentation (PVOID pIS) for (i = 0; i < pPIS->LinesCount; ++i, y += leading) { pPIS->TextLines[i].align = ALIGN_CENTER; - pPIS->TextLines[i].valign = VALIGN_MIDDLE; pPIS->TextLines[i].baseline.x = SCREEN_WIDTH / 2; pPIS->TextLines[i].baseline.y = y; } diff --git a/sc2/src/sc2code/libs/gfxlib.h b/sc2/src/sc2code/libs/gfxlib.h index 0567251cd..20947decc 100644 --- a/sc2/src/sc2code/libs/gfxlib.h +++ b/sc2/src/sc2code/libs/gfxlib.h @@ -117,7 +117,6 @@ typedef struct text POINT baseline; const UNICODE *pStr; TEXT_ALIGN align; - TEXT_VALIGN valign; COUNT CharCount; } TEXT; typedef TEXT *PTEXT; diff --git a/sc2/src/sc2code/libs/graphics/widgets.c b/sc2/src/sc2code/libs/graphics/widgets.c index d1531e5f9..4fc835a70 100644 --- a/sc2/src/sc2code/libs/graphics/widgets.c +++ b/sc2/src/sc2code/libs/graphics/widgets.c @@ -99,7 +99,6 @@ DrawLabelAsWindow(WIDGET_LABEL *label) { t.pStr = label->lines[i]; t.align = ALIGN_CENTER; - t.valign = VALIGN_BOTTOM; t.CharCount = (COUNT)~0; font_DrawText (&t); t.baseline.y += 8; @@ -128,7 +127,6 @@ Widget_DrawToolTips (int numlines, const char **tips) r.extent.height = SCREEN_HEIGHT - 4; t.align = ALIGN_CENTER; - t.valign = VALIGN_BOTTOM; t.CharCount = ~0; t.baseline.x = r.corner.x + (r.extent.width >> 1); t.baseline.y = r.corner.y + (r.extent.height - 8 - 8 * numlines); @@ -175,7 +173,6 @@ Widget_DrawMenuScreen (WIDGET *_self, int x, int y) t.baseline.y = r.corner.y + 8; t.pStr = self->title; t.align = ALIGN_CENTER; - t.valign = VALIGN_BOTTOM; t.CharCount = ~0; font_DrawText (&t); t.baseline.y += 8; @@ -226,7 +223,6 @@ Widget_DrawChoice (WIDGET *_self, int x, int y) t.baseline.x = x; t.baseline.y = y; t.align = ALIGN_LEFT; - t.valign = VALIGN_BOTTOM; t.CharCount = ~0; t.pStr = self->category; if (widget_focus == _self) @@ -284,7 +280,6 @@ Widget_DrawButton (WIDGET *_self, int x, int y) t.baseline.x = 160; t.baseline.y = y; t.align = ALIGN_CENTER; - t.valign = VALIGN_BOTTOM; t.CharCount = ~0; t.pStr = self->name; if (widget_focus == _self) @@ -316,7 +311,6 @@ Widget_DrawLabel (WIDGET *_self, int x, int y) t.baseline.x = 160; t.baseline.y = y; t.align = ALIGN_CENTER; - t.valign = VALIGN_BOTTOM; t.CharCount = ~0; for (i = 0; i < self->line_count; i++) @@ -350,7 +344,6 @@ Widget_DrawSlider(WIDGET *_self, int x, int y) t.baseline.x = x; t.baseline.y = y; t.align = ALIGN_LEFT; - t.valign = VALIGN_BOTTOM; t.CharCount = ~0; t.pStr = self->category; if (widget_focus == _self) @@ -395,7 +388,6 @@ Widget_Slider_DrawValue (WIDGET_SLIDER *self, int x, int y) t.baseline.x = x; t.baseline.y = y; t.align = ALIGN_CENTER; - t.valign = VALIGN_BOTTOM; t.CharCount = ~0; t.pStr = buffer; @@ -421,7 +413,6 @@ Widget_DrawTextEntry (WIDGET *_self, int x, int y) t.baseline.x = x; t.baseline.y = y; t.align = ALIGN_LEFT; - t.valign = VALIGN_BOTTOM; t.CharCount = ~0; t.pStr = self->category; if (widget_focus == _self) @@ -438,7 +429,6 @@ Widget_DrawTextEntry (WIDGET *_self, int x, int y) self->value[WIDGET_TEXTENTRY_WIDTH-1] = 0; t.baseline.y = y; - t.valign = VALIGN_BOTTOM; t.CharCount = utf8StringCount (self->value); t.pStr = self->value; @@ -555,7 +545,6 @@ Widget_DrawControlEntry (WIDGET *_self, int x, int y) t.baseline.x = x; t.baseline.y = y; t.align = ALIGN_LEFT; - t.valign = VALIGN_BOTTOM; t.CharCount = ~0; t.pStr = self->category; if (widget_focus == _self) diff --git a/sc2/src/sc2code/melee.c b/sc2/src/sc2code/melee.c index 5730d74da..3109bc341 100644 --- a/sc2/src/sc2code/melee.c +++ b/sc2/src/sc2code/melee.c @@ -607,7 +607,6 @@ DrawMeleeStatusMessage (const char *message) TEXT lfText; lfText.pStr = message; lfText.align = ALIGN_LEFT; - lfText.valign = VALIGN_TOP; lfText.CharCount = (COUNT)~0; SetContextFont (MicroFont); diff --git a/sc2/src/sc2code/mouse_err.c b/sc2/src/sc2code/mouse_err.c index 98f68cde5..8265c2f83 100644 --- a/sc2/src/sc2code/mouse_err.c +++ b/sc2/src/sc2code/mouse_err.c @@ -92,7 +92,6 @@ DoMouseError (PMOUSE_ERROR_STATE pInputState) t.baseline.x = r.extent.width >> 1; t.baseline.y = r.extent.height >> 1; t.align = ALIGN_CENTER; - t.valign = VALIGN_MIDDLE; t.pStr = "Mouse input is not supported at this time."; t.CharCount = ~0; font_DrawText (&t); diff --git a/sc2/src/sc2code/restart.c b/sc2/src/sc2code/restart.c index a600c6cde..fc0f3ee08 100644 --- a/sc2/src/sc2code/restart.c +++ b/sc2/src/sc2code/restart.c @@ -96,7 +96,6 @@ DrawRestartMenu (BYTE OldState, BYTE NewState, FRAME f) t.baseline.x = SCREEN_WIDTH - 3; t.baseline.y = SCREEN_HEIGHT - 2; t.align = ALIGN_RIGHT; - t.valign = VALIGN_BOTTOM; t.CharCount = (COUNT)~0; sprintf (buf, "v%d.%d.%d%s", UQM_MAJOR_VERSION, UQM_MINOR_VERSION, UQM_PATCH_VERSION, UQM_EXTRA_VERSION);