Beispiel #1
0
void ARX_FOGS_RenderAll() {
	
	EERIE_QUAT rotation;
	Quat_Init(&rotation);

	GRenderer->SetRenderState(Renderer::AlphaBlending, false);

	for(long i = 0; i < MAX_FOG; i++) {
		FOG_DEF *fog = &fogs[i];

		if(!fog->exist)
			continue;

			if(fogobj)
				DrawEERIEInter(fogobj, &rotation, &fog->pos, NULL);

			fog->bboxmin = BBOXMIN;
			fog->bboxmax = BBOXMAX;

			if(fog->special & FOG_DIRECTIONAL) {
				EERIEDraw3DLine(fog->pos, fog->pos + fog->move * 50.f, Color::white);
			}

			if(fog->selected) {
				EERIEDraw2DLine(fog->bboxmin.x, fog->bboxmin.y, fog->bboxmax.x, fog->bboxmin.y, 0.01f, Color::yellow);
				EERIEDraw2DLine(fog->bboxmax.x, fog->bboxmin.y, fog->bboxmax.x, fog->bboxmax.y, 0.01f, Color::yellow);
				EERIEDraw2DLine(fog->bboxmax.x, fog->bboxmax.y, fog->bboxmin.x, fog->bboxmax.y, 0.01f, Color::yellow);
				EERIEDraw2DLine(fog->bboxmin.x, fog->bboxmax.y, fog->bboxmin.x, fog->bboxmin.y, 0.01f, Color::yellow);
			}
	}
}
Beispiel #2
0
void ComputeLight2DPos(EERIE_LIGHT * _pL) {
	
	TexturedVertex in, out;
	in.p = _pL->pos;
	EERIETreatPoint(&in, &out);
	
	if ((out.p.z > 0.f) && (out.p.z < 1000.f) && (out.rhw > 0))
	{
		float t;
		float siz = 50;
		float fMaxdist = 300;

		if (Project.telekinesis) fMaxdist = 850;

		t = siz * (1.0f - 1.0f / (out.rhw * fMaxdist)) + 10;

		_pL->maxs.x = out.p.x + t;
		_pL->mins.x = out.p.x - t;
		_pL->maxs.y = out.p.y + t;
		_pL->mins.y = out.p.y - t;


		if (0)
			if ((_pL->mins.x >= -200.f) && (_pL->mins.x <= 1000.f))
				if ((_pL->mins.y >= -200.f) && (_pL->mins.y <= 1000.f))
				{

					EERIEDraw2DLine(_pL->mins.x, _pL->mins.y, _pL->maxs.x, _pL->mins.y, 0.00001f, Color::white);
					EERIEDraw2DLine(_pL->maxs.x, _pL->mins.y, _pL->maxs.x, _pL->maxs.y, 0.00001f, Color::white);
					EERIEDraw2DLine(_pL->maxs.x, _pL->maxs.y, _pL->mins.x, _pL->maxs.y, 0.00001f, Color::white);
					EERIEDraw2DLine(_pL->mins.x, _pL->maxs.y, _pL->mins.x, _pL->mins.y, 0.00001f, Color::white);
				}
	}
}
Beispiel #3
0
//*************************************************************************************
//*************************************************************************************
void ARX_FOGS_RenderAll(LPDIRECT3DDEVICE7 m_pd3dDevice)
{
	EERIE_3D angle;
	Vector_Init(&angle); 

	SETALPHABLEND(m_pd3dDevice, FALSE);

	for (long i = 0; i < MAX_FOG; i++)
	{
		if (fogs[i].exist)
		{
			if (fogobj)
				DrawEERIEInter(m_pd3dDevice, fogobj, &angle, &fogs[i].pos, NULL);

			Vector_Copy(&fogs[i].bboxmin, &BBOXMIN);
			Vector_Copy(&fogs[i].bboxmax, &BBOXMAX);

			if (fogs[i].special & FOG_DIRECTIONAL)
			{
				EERIE_3D orgn, dest;
				orgn.x = fogs[i].pos.x;
				orgn.y = fogs[i].pos.y;
				orgn.z = fogs[i].pos.z;
				dest.x = orgn.x + fogs[i].move.x * 50.f;
				dest.y = orgn.y + fogs[i].move.y * 50.f;
				dest.z = orgn.z + fogs[i].move.z * 50.f;
				EERIEDraw3DLine(m_pd3dDevice, &orgn, &dest, EERIECOLOR_WHITE); 
			}

			if (fogs[i].selected)
			{
				EERIEDraw2DLine(m_pd3dDevice, fogs[i].bboxmin.x, fogs[i].bboxmin.y, fogs[i].bboxmax.x, fogs[i].bboxmin.y, 0.01f, EERIECOLOR_YELLOW);
				EERIEDraw2DLine(m_pd3dDevice, fogs[i].bboxmax.x, fogs[i].bboxmin.y, fogs[i].bboxmax.x, fogs[i].bboxmax.y, 0.01f, EERIECOLOR_YELLOW);
				EERIEDraw2DLine(m_pd3dDevice, fogs[i].bboxmax.x, fogs[i].bboxmax.y, fogs[i].bboxmin.x, fogs[i].bboxmax.y, 0.01f, EERIECOLOR_YELLOW);
				EERIEDraw2DLine(m_pd3dDevice, fogs[i].bboxmin.x, fogs[i].bboxmax.y, fogs[i].bboxmin.x, fogs[i].bboxmin.y, 0.01f, EERIECOLOR_YELLOW);
			}
		}
	}
}