static int fade_saver(video_adapter_t *adp, int blank) { static int count = 0; u_char pal[256*3]; int i; if (blank) { if (ISPALAVAIL(adp->va_flags)) { if (count <= 0) vidd_save_palette(adp, palette); if (count < 256) { pal[0] = pal[1] = pal[2] = 0; for (i = 3; i < 256*3; i++) { if (palette[i] - count > 60) pal[i] = palette[i] - count; else pal[i] = 60; } vidd_load_palette(adp, pal); count++; } } else { vidd_blank_display(adp, V_DISPLAY_BLANK); } } else { if (ISPALAVAIL(adp->va_flags)) { vidd_load_palette(adp, palette); count = 0; } else { vidd_blank_display(adp, V_DISPLAY_ON); } } return 0; }
static int fade_init(video_adapter_t *adp) { if (!ISPALAVAIL(adp->va_flags) && (*vidsw[adp->va_index]->blank_display)(adp, V_DISPLAY_ON) != 0) return ENODEV; return 0; }
static int fade_init(video_adapter_t *adp) { if (!ISPALAVAIL(adp->va_flags) && vidd_blank_display(adp, V_DISPLAY_ON) != 0) return ENODEV; return 0; }
static int fade_saver(video_adapter_t *adp, int blank) { static int count = 0; u_char pal[256*3]; int i; if (blank) { blanked = TRUE; if (ISPALAVAIL(adp->va_flags)) { if (count <= 0) save_palette(adp, palette); if (count < 256) { pal[0] = pal[1] = pal[2] = 0; for (i = 3; i < 256*3; i++) { if (palette[i] - count > 60) pal[i] = palette[i] - count; else pal[i] = 60; } load_palette(adp, pal); count++; } } else { (*vidsw[adp->va_index]->blank_display)(adp, V_DISPLAY_BLANK); } } else { if (ISPALAVAIL(adp->va_flags)) { load_palette(adp, palette); count = 0; } else { (*vidsw[adp->va_index]->blank_display)(adp, V_DISPLAY_ON); } blanked = FALSE; } return 0; }