INNER CODE UNIT · C++

buffer

TombEngine/TombEngine · TombEngine/Game/camera.cpp:402

	int buffer = CLICK(1) - 1;
	if ((Camera.pos.y - buffer) < pointColl.GetCeilingHeight() &&
		(Camera.pos.y + buffer) > pointColl.GetFloorHeight() &&
		pointColl.GetCeilingHeight() < pointColl.GetFloorHeight() &&
		pointColl.GetCeilingHeight() != NO_HEIGHT &&
		pointColl.GetFloorHeight() != NO_HEIGHT)
	{
		Camera.pos.y = (pointColl.GetFloorHeight() + pointColl.GetCeilingHeight()) / 2;
	}
	else if ((Camera.pos.y + buffer) > pointColl.GetFloorHeight() &&
		pointColl.GetCeilingHeight() < pointColl.GetFloorHeight() &&
		pointColl.GetCeilingHeight() != NO_HEIGHT &&
		pointColl.GetFloorHeight() != NO_HEIGHT)
	{
		Camera.pos.y = pointColl.GetFloorHeight() - buffer;
	}
	else if ((Camera.pos.y - buffer) < pointColl.GetCeilingHeight() &&
		pointColl.GetCeilingHeight() < pointColl.GetFloorHeight() &&

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…