Ejemplo n.º 1
0
void ScriptOverlay::Remove() 
{
  int overlayIndex = find_overlay_of_type(overlayId);
  if (overlayIndex < 0)
  {
    quit("ScriptOverlay::Remove: overlay is not there!");
  }
  remove_screen_overlay_index(overlayIndex);
  overlayId = -1;
}
Ejemplo n.º 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;
}