
#include "spiel.hpp"






Cunt* MapRGB::Routine(Api* shit)
{

	shit->Lock();
	for (int i = 0; i < _SCRNW; i++) {
	for (int j = 0; j < _SCRNH; j++) {
		int alpha = (i+j) % _SCRNW;
		Uint32 color = shit->Color(i, j, _SCRNW-i);
		shit->Plot(i,j,color);
	}
	}
	shit->Unlock();

	return 0;
}

Cunt* DrawShit::Routine(Api* shit)
{

	shit->Lock();
	Uint32 red = shit->Color(128, 0, 0);
	Uint32 green = shit->Color(0, 128, 0);
	Uint32 blue = shit->Color(0, 0, 128);
	for (int x = 16; x < 64; x++)
	for (int y = 16; y < 64; y++)
	if (x == y) shit->Plot(x,y,0);
	else shit->Plot(x,y,green);
	shit->Unlock();
	return 0;
}

Cunt* EveryFrame::Routine(Api* shit)
{
	if (shit->Quit()) shit->Gtfo();
	shit->Refresh();

	shit->Delay(50);
	return 0;
	return this;
}

Cunt* AudioFrame::Routine(Api* shit)
{
	SDL_LockAudio();

	//shit->sndgen = &SineWave<_RATE,220>;
	SDL_UnlockAudio();
	return 0;
}





