예제 #1
0
파일: line.c 프로젝트: Nekrofage/DoomRPi
int
GGI_glide_gethline(ggi_visual *vis, int x, int y, int w, void *data)
{
	grLfbReadRegion(GLIDE_PRIV(vis)->readbuf, x, y,
			 w, 1, GLIDE_PRIV(vis)->bytes_per_pixel*w, data);
	return 0;
}
예제 #2
0
파일: GMain.c 프로젝트: 5432935/genesis3d
//==================================================================================
//==================================================================================
geBoolean DRIVERCC GMain_ScreenShot(const char *Name)
{
	uint16		*Buffer;
	
	Buffer = (uint16*)malloc(sizeof(uint16*)*ClientWindow.Width*ClientWindow.Height);
	
	if (!grLfbReadRegion(GR_BUFFER_FRONTBUFFER,0,0,ClientWindow.Width,ClientWindow.Height,
		ClientWindow.Width*2, (void*)Buffer))
	{
		SetLastDrvError(DRV_ERROR_GENERIC, "GLIDE: Could not save BMP.");
		return FALSE;
	}
	
	WriteBMP(Buffer, Name, ClientWindow.Width, ClientWindow.Height);

	free(Buffer);

	return GE_TRUE;
}