Пример #1
0
Файл: hud.c Проект: paud/d2x-xl
void ClearBackgroundMessages (void)
{
	#ifdef WINDOWS
if (bExtraClear == gameData.app.nFrameCount) 		//don't do extra clear on same frame
	return;
	#endif

#ifdef WINDOWS
if (( (gameStates.render.cockpit.nMode == CM_STATUS_BAR) || (gameStates.render.cockpit.nMode == CM_FULL_SCREEN)) && (nLastMsgYCrd != -1) && (dd_VR_render_sub_buffer [0].yoff >= 6)) {
	dd_grs_canvas *canv_save = dd_grd_curcanv;
#else
if (( (gameStates.render.cockpit.nMode == CM_STATUS_BAR) || (gameStates.render.cockpit.nMode == CM_FULL_SCREEN)) && (nLastMsgYCrd != -1) && (VR_render_sub_buffer [0].cv_bitmap.bm_props.y >= 6)) {
	grs_canvas	*canv_save = grdCurCanv;
#endif

WINDOS (
	DDGrSetCurrentCanvas (GetCurrentGameScreen ()),
	GrSetCurrentCanvas (GetCurrentGameScreen ())
	);
PA_DFX (pa_set_frontbuffer_current ());
PA_DFX (copy_background_rect (0, nLastMsgYCrd, grdCurCanv->cv_bitmap.bm_props.w, nLastMsgYCrd+nLastMsgHeight-1));
PA_DFX (pa_set_backbuffer_current ());
copy_background_rect (0, nLastMsgYCrd, grdCurCanv->cv_bitmap.bm_props.w, nLastMsgYCrd+nLastMsgHeight-1);
WINDOS (
	DDGrSetCurrentCanvas (canv_save),
	GrSetCurrentCanvas (canv_save)
	);
#ifdef WINDOWS
	if (bExtraClear || !GRMODEINFO (modex)) {
		bExtraClear = 0;
		nLastMsgYCrd = -1;
		}
	else
		bExtraClear = gameData.app.nFrameCount;
#else
	nLastMsgYCrd = -1;
#endif
	}
szDisplayedBackgroundMsg [nVRCurrentPage][0] = 0;
}

//	-----------------------------------------------------------------------------

void HUDClearMessages ()
{
	int i, j;
	tHUDMessage	*pMsgs;

for (j = 2, pMsgs = gameData.hud.msgs; j; j--, pMsgs++) {
	pMsgs->nMessages = 0;
	pMsgs->nFirst = 
	pMsgs->nLast = 0;
	pMsgs->xTimer = 0;
	ClearBackgroundMessages ();
	for (i = 0; i < HUD_MAX_MSGS; i++)
		sprintf (pMsgs->szMsgs [i], TXT_SLAGEL);
	}
}
Пример #2
0
Файл: hud.c Проект: paud/d2x-xl
void ClearBackgroundMessages (void)
{
if (( (gameStates.render.cockpit.nMode == CM_STATUS_BAR) || (gameStates.render.cockpit.nMode == CM_FULL_SCREEN)) && (nLastMsgYCrd != -1) && (gameStates.render.vr.buffers.subRender [0].cvBitmap.bmProps.y >= 6)) {
	gsrCanvas	*canv_save = grdCurCanv;

WINDOS (
	DDGrSetCurrentCanvas (GetCurrentGameScreen ()),
	GrSetCurrentCanvas (GetCurrentGameScreen ())
	);
PA_DFX (pa_set_frontbuffer_current ());
PA_DFX (copy_background_rect (0, nLastMsgYCrd, grdCurCanv->cvBitmap.bmProps.w, nLastMsgYCrd+nLastMsgHeight-1));
PA_DFX (pa_set_backbuffer_current ());
copy_background_rect (0, nLastMsgYCrd, grdCurCanv->cvBitmap.bmProps.w, nLastMsgYCrd+nLastMsgHeight-1);
WINDOS (
	DDGrSetCurrentCanvas (canv_save),
	GrSetCurrentCanvas (canv_save)
	);
	nLastMsgYCrd = -1;
	}
szDisplayedBackgroundMsg [gameStates.render.vr.nCurrentPage][0] = 0;
}
Пример #3
0
//	-----------------------------------------------------------------------------
void clear_background_messages(void)
{
	if ((Cockpit_mode == CM_STATUS_BAR) && (Last_msg_ycrd != -1) && (VR_render_sub_buffer[0].cv_bitmap.bm_y >= 6)) {
		grs_canvas	*canv_save = grd_curcanv;
		gr_set_current_canvas(get_current_game_screen());
		copy_background_rect(0, Last_msg_ycrd, grd_curcanv->cv_bitmap.bm_w, Last_msg_ycrd+Last_msg_height-1);
		gr_set_current_canvas(canv_save);
		Displayed_background_message[0] = 0;
		Last_msg_ycrd = -1;
	}

}