#include "stdafx.h"
#include "common.h"

void video1()
{


	killdct();
}

void stoned()
{
	setpalblack();
	palpos=1;
	paldest=0;
	palspd=1/100.f;
	loadraw((unsigned char*)"data\\stoned.raw",tex[0]);
	int mode=0;
	while (!kbhit() && curpos<STONEDEND)
	{
		dofproc();

		if (curpos>STONEDEND-16 && mode==0)
		{
			setpalgrey();
			palpos=0;
			palspd=1/40.f;
			paldest=1;
			mode=1;
		}
		if (curpos>STONEDEND-8 && mode==1)
		{
			memcpy(mypal,destpal,768);
			setpalblack();
			palpos=0;
			paldest=1;
			mode=2;
		}
		swapscreens(tex[0]);
	}
}