Пример #1
0
void DisplayTopBar(int ypos, int ttexcol, int backcol, char *title, char*texx, ...) {

    strcpy(topBar.text, get_translation(title));

    char displbuf[3001];
    va_list ap;
    va_start(ap,texx);
    my_sprintf(displbuf, get_translation(texx), ap);
    va_end(ap);

    if (ypos > 0)
        play.top_bar_ypos = ypos;
    if (ttexcol > 0)
        play.top_bar_textcolor = ttexcol;
    if (backcol > 0)
        play.top_bar_backcolor = backcol;

    topBar.wantIt = 1;
    topBar.font = FONT_NORMAL;
    topBar.height = wgetfontheight(topBar.font);
    topBar.height += multiply_up_coordinate(play.top_bar_borderwidth) * 2 + get_fixed_pixel_size(1);

    // they want to customize the font
    if (play.top_bar_font >= 0)
        topBar.font = play.top_bar_font;

    // DisplaySpeech normally sets this up, but since we're not going via it...
    if (play.cant_skip_speech & SKIP_AUTOTIMER)
        play.messagetime = GetTextDisplayTime(texx);

    DisplayAtY(play.top_bar_ypos, displbuf);
}
Пример #2
0
// [DEPRECATED] but still used by Character_SayBackground, might merge since there are no other instances
int DisplaySpeechBackground(int charid, const char*speel) {
    // remove any previous background speech for this character
    int cc;
    for (cc = 0; cc < numscreenover; cc++) {
        if (screenover[cc].bgSpeechForChar == charid) {
            remove_screen_overlay_index(cc);
            cc--;
        }
    }

    int ovrl=CreateTextOverlay(OVR_AUTOPLACE,charid,play.viewport.GetWidth()/2,FONT_SPEECH,
        -game.chars[charid].talkcolor, get_translation(speel));

    int scid = find_overlay_of_type(ovrl);
    screenover[scid].bgSpeechForChar = charid;
    screenover[scid].timeout = GetTextDisplayTime(speel, 1);
    return ovrl;
}