void F_CastDrawer (void) { spritedef_t* sprdef; spriteframe_t* sprframe; int lump; boolean flip; patch_t* patch; // erase the entire screen to a background V_DrawPatch (0, 0, W_CacheLumpName (DEH_String("BOSSBACK"), PU_CACHE)); F_CastPrint (DEH_String(castorder[castnum].name)); // draw the current frame in the middle of the screen sprdef = &sprites[caststate->sprite]; sprframe = &sprdef->spriteframes[ caststate->frame & FF_FRAMEMASK]; lump = sprframe->lump[castangle]; // [crispy] turnable cast flip = (boolean)sprframe->flip[castangle]; // [crispy] turnable cast patch = W_CacheLumpNum (lump+firstspritelump, PU_CACHE); if (flip) V_DrawPatchFlipped(160, 170, patch); else V_DrawPatch(160, 170, patch); }
// // F_CastDrawer // static void F_CastDrawer(void) { spritedef_t *sprdef; spriteframe_t *sprframe; int lump; int rot = 0; dboolean flip; patch_t *patch; int y = ORIGINALHEIGHT - 30; mobjtype_t type = castorder[castnum].type; // erase the entire screen to a background V_DrawPatch(0, 0, 0, W_CacheLumpName(bgcastcall, PU_CACHE)); F_CastPrint(*(castorder[castnum].name)); // draw the current frame in the middle of the screen sprdef = &sprites[caststate->sprite]; sprframe = &sprdef->spriteframes[caststate->frame & FF_FRAMEMASK]; if (sprframe->rotate) rot = castrot; lump = sprframe->lump[rot]; flip = !!(sprframe->flip & (1 << rot)); patch = W_CacheLumpNum(lump + firstspritelump, PU_CACHE); patch->topoffset = spritetopoffset[lump] >> FRACBITS; if (type == MT_SKULL) y -= 30; else if (type == MT_PAIN || (type == MT_HEAD && !castdeath)) y -= 20; if (flip || castdeathflip) { patch->leftoffset = (spritewidth[lump] - spriteoffset[lump]) >> FRACBITS; if (r_shadows && ((type != MT_SKULL && type != MT_PAIN) || !castdeath)) { if (r_translucency) { if (type == MT_SHADOWS) V_DrawFlippedSpectreShadowPatch(ORIGINALWIDTH / 2, ORIGINALHEIGHT - 28, patch); else V_DrawFlippedShadowPatch(ORIGINALWIDTH / 2, ORIGINALHEIGHT - 28, patch); } else V_DrawFlippedSolidShadowPatch(ORIGINALWIDTH / 2, ORIGINALHEIGHT - 28, patch); } if (r_translucency && (type == MT_SKULL || (type == MT_PAIN && castdeath))) V_DrawFlippedTranslucentRedPatch(ORIGINALWIDTH / 2, y, patch); else if (type == MT_SHADOWS) V_DrawFlippedFuzzPatch(ORIGINALWIDTH / 2, y, patch); else V_DrawFlippedPatch(ORIGINALWIDTH / 2, y, patch); }
OVERLAY void F_CastDrawer (void) { spritedef_t* sprdef; spriteframe_t* sprframe; int lump; boolean flip; // erase the entire screen to a background // CPhipps - patch drawing updated V_DrawNamePatch(0,0,0, bgcastcall, NULL, VPT_STRETCH); // Ty 03/30/98 bg texture extern F_CastPrint (*(castorder[castnum].name)); // draw the current frame in the middle of the screen sprdef = &sprites[caststate->sprite]; sprframe = &sprdef->spriteframes[ caststate->frame & FF_FRAMEMASK]; lump = sprframe->lump[0]; flip = (boolean)sprframe->flip[0]; // CPhipps - patch drawing updated V_DrawNumPatch(160, 170, 0, lump+firstspritelump, NULL, (enum patch_translation_e)(VPT_STRETCH | (flip ? VPT_FLIP : 0))); }