Help?

The Partridge Family were neither partridges nor a family. Discuss.
Post Reply
goldengamesTM

Help?

Post by goldengamesTM » August 29th, 2017, 1:47 am

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.

goldengamesTM

Re: Help?

Post by goldengamesTM » August 29th, 2017, 1:54 am

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 );
			}
		}
	}
}

goldengamesTM

Re: Help?

Post by goldengamesTM » August 29th, 2017, 2:09 am

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.
Last edited by goldengamesTM on August 29th, 2017, 1:23 pm, edited 1 time in total.

User avatar
chili
Site Admin
Posts: 3948
Joined: December 31st, 2011, 4:53 pm
Location: Japan
Contact:

Re: Help?

Post by chili » August 29th, 2017, 5:12 am

The mic... I suppose XAudio2 will have functionality for that. I've never tried it though.
Chili

albinopapa
Posts: 4373
Joined: February 28th, 2013, 3:23 am
Location: Oklahoma, United States

Re: Help?

Post by albinopapa » August 29th, 2017, 7:31 am

You might even try the OpenAL library.
If you think paging some data from disk into RAM is slow, try paging it into a simian cerebrum over a pair of optical nerves. - gameprogrammingpatterns.com

goldengamesTM

Re: Help?

Post by goldengamesTM » August 29th, 2017, 1:44 pm

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.

albinopapa
Posts: 4373
Joined: February 28th, 2013, 3:23 am
Location: Oklahoma, United States

Re: Help?

Post by albinopapa » August 29th, 2017, 8:13 pm

I don't think there is capture capabilities for XAudio2, but you can use Windows Audio Service API
If you think paging some data from disk into RAM is slow, try paging it into a simian cerebrum over a pair of optical nerves. - gameprogrammingpatterns.com

User avatar
chili
Site Admin
Posts: 3948
Joined: December 31st, 2011, 4:53 pm
Location: Japan
Contact:

Re: Help?

Post by chili » August 31st, 2017, 1:48 am

Yeah this seems to be the case.
Chili

goldengamesTM

Re: Help?

Post by goldengamesTM » August 31st, 2017, 2:49 pm

Alright! ( got notepad++ by the way )

Post Reply