Пример #1
0
//---------------------------------------------------------------------------------
void BoxTest_Asynch(v16 x, v16 y, v16 z, v16 width, v16 height, v16 depth)
//---------------------------------------------------------------------------------
{
  glPolyFmt(BIT(12) | BIT(13));
  glBegin(GL_TRIANGLES);
  glEnd();

  GFX_BOX_TEST = VERTEX_PACK(x, y);
  GFX_BOX_TEST = VERTEX_PACK(z, width);
  GFX_BOX_TEST = VERTEX_PACK(height, depth);
}
Пример #2
0
//---------------------------------------------------------------------------------
int BoxTest(v16 x, v16 y, v16 z, v16 width, v16 height, v16 depth)
//---------------------------------------------------------------------------------
{
  glPolyFmt(BIT(12) | BIT(13));
  glBegin(GL_TRIANGLES);
  glEnd();

  GFX_BOX_TEST = VERTEX_PACK(x, y);
  GFX_BOX_TEST = VERTEX_PACK(z, width);
  GFX_BOX_TEST = VERTEX_PACK(height, depth);

  while(GFX_STATUS & BIT(0));

  return (GFX_STATUS & BIT(1));
}
Пример #3
0
/*	Creates a display list for a quad, be aware that this display list
 *  won't set a texture for you, when calling this list, you have to
 *  make sure the correct textures has been bound
 */
u32 * glCreateQuadList(int x, int y, int x2, int y2, int u1, int v1) {
	u32 * list;
	int u2 = u1 + (x2-x);
	int v2 = v1 + (y2-y);

	if(( list = (u32*)malloc(sizeof(temlate_quadList)))) {
		memcpy(list, temlate_quadList, sizeof(temlate_quadList));
		list[3] 	= TEXTURE_PACK_T16(u1, v1);
		list[4] 	= VERTEX_PACK(x, y);
		list[6] 	= TEXTURE_PACK_T16(u2, v1);
		list[8] 	= VERTEX_PACK(x2, y);
		list[9] 	= TEXTURE_PACK_T16(u2, v2);
		list[10] 	= VERTEX_PACK(x2, y2);
		list[11] 	= TEXTURE_PACK_T16(u1, v2);
		list[13] 	= VERTEX_PACK(x, y2);
		return list;
	}

	return NULL;
}
Пример #4
0
/*	Sets the position of the quad encapsulated in a
 *  display list and can additionally resize it with
 *  the 3rd and 4th parameters
 */
void setPosQuadList(int x, int y, int x2, int y2, u32 * list) {
	list[4] 	= VERTEX_PACK(x, y);
	list[8] 	= VERTEX_PACK(x2, y);
	list[10] 	= VERTEX_PACK(x2, y2);
	list[13] 	= VERTEX_PACK(x, y2);
}