Page 1 of 1

Help?

Posted: August 29th, 2017, 1:47 am
by goldengamesTM
I need help. I need an algorithm for drawing circles and I'm dumb and I'm feeling pretty lazy. This is where I will post when I need help from now on.

Re: Help?

Posted: August 29th, 2017, 1:54 am
by goldengamesTM
Ahh **** forgot about this

Code: Select all

void Graphics::DrawCircle( int x,int y,int radius,Color c )
{
	const int rad_sq = radius * radius;
	for( int y_loop = y - radius + 1; y_loop < y + radius; y_loop++ )
	{		
		for( int x_loop = x - radius + 1; x_loop < x + radius; x_loop++ )
		{
			const int x_diff = x - x_loop;
			const int y_diff = y - y_loop;
			if( x_diff * x_diff + y_diff * y_diff <= rad_sq )
			{
				PutPixel( x_loop,y_loop,c );
			}
		}
	}
}

Re: Help?

Posted: August 29th, 2017, 2:09 am
by goldengamesTM
Is there any way to give chili framework access to the mic? I might look it up and make it an extention to the framework.

Re: Help?

Posted: August 29th, 2017, 5:12 am
by chili
The mic... I suppose XAudio2 will have functionality for that. I've never tried it though.

Re: Help?

Posted: August 29th, 2017, 7:31 am
by albinopapa
You might even try the OpenAL library.

Re: Help?

Posted: August 29th, 2017, 1:44 pm
by goldengamesTM
I found this, but I don't understand crap and I don't want to just copy and paste while having no idea what it does.

Re: Help?

Posted: August 29th, 2017, 8:13 pm
by albinopapa
I don't think there is capture capabilities for XAudio2, but you can use Windows Audio Service API

Re: Help?

Posted: August 31st, 2017, 1:48 am
by chili
Yeah this seems to be the case.

Re: Help?

Posted: August 31st, 2017, 2:49 pm
by goldengamesTM
Alright! ( got notepad++ by the way )