void DIntermissionScreenFader::Drawer () { if (!mFlatfill && mBackground.isValid()) { double factor = clamp(double(mTicker) / mDuration, 0., 1.); if (mType == FADE_In) factor = 1.0 - factor; int color = MAKEARGB(xs_RoundToInt(factor*255), 0,0,0); if (screen->Begin2D(false)) { screen->DrawTexture (TexMan[mBackground], 0, 0, DTA_Fullscreen, true, DTA_ColorOverlay, color, TAG_DONE); for (unsigned i=0; i < mOverlays.Size(); i++) { if (CheckOverlay(i)) screen->DrawTexture (TexMan[mOverlays[i].mPic], mOverlays[i].x, mOverlays[i].y, DTA_320x200, true, DTA_ColorOverlay, color, TAG_DONE); } screen->FillBorder (NULL); } else { V_SetBlend (0,0,0,int(256*factor)); Super::Drawer(); } } }
// // F_StartFinale // void F_StartFinale (char *music, char *flat, const char *text) { gameaction = ga_nothing; gamestate = GS_FINALE; viewactive = false; // Okay - IWAD dependend stuff. // This has been changed severly, and // some stuff might have changed in the process. // [RH] More flexible now (even more severe changes) // finaleflat, finaletext, and music are now // determined in G_WorldDone() based on data in // a level_info_t and a cluster_info_t. if (*music == 0) S_ChangeMusic (std::string(gameinfo.finaleMusic, 8), !(gameinfo.flags & GI_NOLOOPFINALEMUSIC)); else S_ChangeMusic (std::string(music, 8), !(gameinfo.flags & GI_NOLOOPFINALEMUSIC)); if (*flat == 0) finaleflat = gameinfo.finaleFlat; else finaleflat = flat; if (text) finaletext = text; else finaletext = "Empty message"; finalestage = 0; finalecount = 0; V_SetBlend (0,0,0,0); S_StopAllChannels (); }
int DIntermissionScreenFader::Responder (event_t *ev) { if (ev->type == EV_KeyDown) { V_SetBlend(0,0,0,0); return -1; } return Super::Responder(ev); }
void WI_Start (wbstartstruct_t *wbstartstruct) { WI_initVariables (wbstartstruct); WI_loadData (); WI_initStats(); WI_initNetgameStats(); V_SetBlend (0,0,0,0); S_StopAllChannels (); SN_StopAllSequences (); }
/* Original redscreen palette method - replaces ZDoom method - ML */ void ST_doPaletteStuff(void) { int palette; byte* pal; float cnt; int bzc; float blend[4]; player_t *plyr = &displayplayer(); blend[0] = blend[1] = blend[2] = blend[3] = 0; SV_AddBlend (BaseBlendR / 255.0f, BaseBlendG / 255.0f, BaseBlendB / 255.0f, BaseBlendA, blend); if (!r_underwater && memcmp (blend, st_zdpalette, sizeof(blend))) { memcpy (st_zdpalette, blend, sizeof(blend)); V_SetBlend ((int)(blend[0] * 255.0f), (int)(blend[1] * 255.0f), (int)(blend[2] * 255.0f), (int)(blend[3] * 256.0f)); } if (r_underwater) { palette = 0; if (plyr->powers[pw_ironfeet] > 4*32 || plyr->powers[pw_ironfeet]&8) SV_AddBlend (0.0f, 1.0f, 0.0f, 0.125f, blend); if (plyr->bonuscount) { cnt = (float)(plyr->bonuscount << 3); SV_AddBlend (0.8431f, 0.7294f, 0.2706f, cnt > 128 ? 0.5f : cnt / 255.0f, blend); } if (plyr->damagecount < 114) cnt = damageToAlpha[(int)(plyr->damagecount*r_painintensity)]; else cnt = damageToAlpha[(int)(113*r_painintensity)]; if (plyr->powers[pw_strength]) { // slowly fade the berzerk out int bzc = 128 - ((plyr->powers[pw_strength]>>3) & (~0x1f)); if (bzc > cnt) cnt = bzc; } if (cnt) { if (cnt > 237) cnt = 237; SV_AddBlend (1.0f, 0.0f, 0.0f, cnt / 255.0f, blend); } }
void WI_Start (wbstartstruct_t *wbstartstruct) { V_SetBlend (0,0,0,0); WI_initVariables (wbstartstruct); WI_loadData (); if (deathmatch) WI_initDeathmatchStats(); else if (multiplayer) WI_initNetgameStats(); else WI_initStats(); S_StopAllChannels (); SN_StopAllSequences (); }
void F_StartIntermission(FIntermissionDescriptor *desc, bool deleteme, BYTE state) { if (DIntermissionController::CurrentIntermission != NULL) { DIntermissionController::CurrentIntermission->Destroy(); } V_SetBlend (0,0,0,0); S_StopAllChannels (); gameaction = ga_nothing; gamestate = GS_FINALE; if (state == FSTATE_InLevel) wipegamestate = GS_FINALE; // don't wipe when within a level. viewactive = false; automapactive = false; DIntermissionController::CurrentIntermission = new DIntermissionController(desc, deleteme, state); GC::WriteBarrier(DIntermissionController::CurrentIntermission); }