Пример #1
0
//int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR pScmdline, int iCmdshow)
int main(int _argc, char** _argv)
{
	EEDesc desc;
	desc.applicationName = L"Emerald";	//窗口名称
	desc.isFullScreen = false;			//是否全屏
	desc.width = 800;					//窗口宽度
	desc.height = 450;					//窗口高度
	desc.isSSAA = true;					//是开启抗锯齿
	desc.isVsync = false;				//是否垂直同步
	EEInitialize(desc);

	EETexture bgTex(L"Texture\\主界面\\主界面背景.jpg");
	EETexture button2Tex(L"Texture/主界面/模式标签/生涯模式.png");
	EEFont helloworld(FLOAT3(100.0f, 100.0f, 0.0f), EEColor::YELLOW, L"hello world");
	EELineEditer *lineEditer = new EELineEditer(Rect_Float(200.f, 300.f, 300.f, 350.f), bgTex, EEColor::BLACK);
	EELineEditer *lineEditer2 = new EELineEditer(Rect_Float(400.f, 300.f, 500.f, 350.f), bgTex, EEColor::BLACK);

	while (EERun())
	{
		EEBeginScene(EEColor::BLACK);
		EEShowFPSInTitle(L"- -");

		lineEditer->Process();
		lineEditer2->Process();
		helloworld.Process();

		EEEndScene();
	}

	EEShutdown();
	return 0;
}
Пример #2
0
//int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR pScmdline, int iCmdshow)
int main(int _argc, char** _argv)
{
    EEDesc desc;
    desc.applicationName = L"Emerald";	//窗口名称
    desc.isFullScreen = false;			//是否全屏
    desc.width = 800;					//窗口宽度
    desc.height = 450;					//窗口高度
    desc.isSSAA = true;					//是开启抗锯齿
    desc.isVsync = false;				//是否垂直同步
    EEInitialize(desc);

    EETexture bgTex(L"Texture\\test.gif");
    EESlide mainScene(Rect_Float(0, 0, (float)bgTex.GetWidth(), (float)bgTex.GetHeight()), bgTex, 0.1f);

    while (EERun())
    {
        EEBeginScene(EEColor::BLACK);

        mainScene.Process();

        EEEndScene();
    }

    EEShutdown();
    return 0;
}
Пример #3
0
//int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR pScmdline, int iCmdshow)
int main(int _argc, char** _argv)
{
	EEDesc desc;
	desc.applicationName = L"Emerald";	//窗口名称
	desc.isFullScreen = false;			//是否全屏
	desc.width = 800;					//窗口宽度
	desc.height = 450;					//窗口高度
	desc.isSSAA = true;					//是开启抗锯齿
	desc.isVsync = false;				//是否垂直同步
	EEInitialize();

	EETexture tex0(L"Texture\\etc\\101087.jpg");
	EETexture tex1(L"Texture\\etc\\xmyrz.jpg");
	//EETexture bgTex(L"Texture\\test3.gif");

	//EETexture bgTex(L"Texture\\Project Diva Freedom\\主界面\\默认主题\\背景.jpg");
	EEQuad2D quad(Rect_Float(0, 0, (float)EEGetWidth(), (float)EEGetHeight()), tex1);
	EEContrastAndBrightC cb(tex1);
	cb.SetContrast(200.f);
	cb.SetBright(0.1f);

	while (EERun())
	{
		EEBeginScene(EEColor::BLACK);

		quad.Process();

		printf("%d ", EEGetFPS());
		EEEndScene();
	}

	EEShutdown();
	return 0;
}
Пример #4
0
//int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR pScmdline, int iCmdshow)
int main(int _argc, char** _argv)
{
	EEDesc desc;
	desc.applicationName = L"Emerald";	//窗口名称
	desc.isFullScreen = false;			//是否全屏
	desc.width = 800;					//窗口宽度
	desc.height = 450;					//窗口高度
	desc.isSSAA = true;					//是开启抗锯齿
	desc.isVsync = false;				//是否垂直同步
	EEInitialize(desc);

	EERecorder recorder;
	recorder.Start();
	recorder.Play();


	while (EERun())
	{
		EEBeginScene(EEColor::BLACK);


		EEEndScene();
	}

	EEShutdown();
	return 0;
}
Пример #5
0
//int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR pScmdline, int iCmdshow)
int main(int _argc, char** _argv)
{
	EEDesc desc;
	desc.applicationName = L"Emerald";	//窗口名称
	desc.isFullScreen = false;			//是否全屏
	desc.width = 800;					//窗口宽度
	desc.height = 450;					//窗口高度
	desc.isSSAA = true;					//是开启抗锯齿
	desc.isVsync = false;				//是否垂直同步
	EEInitialize(desc);

	EELine2D line(FLOAT2(2.0, 3.0), FLOAT2(200.0f, 300.0f));
	line.SetColor(EEColor::RED);

	
	while (EERun())
	{
		EEBeginScene(EEColor::BLACK);
		EEShowFPSInTitle(L"- -");

		line.Process();

		EEEndScene();
	}

	EEShutdown();
	return 0;
}
Пример #6
0
//int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR pScmdline, int iCmdshow)
int main(int _argc, char** _argv)
{
	EEDesc desc;
	desc.applicationName = L"Emerald";	//窗口名称
	desc.isFullScreen = false;			//是否全屏
	desc.width = 800;					//窗口宽度
	desc.height = 450;					//窗口高度
	desc.isSSAA = true;					//是开启抗锯齿
	desc.isVsync = false;				//是否垂直同步
	EEInitialize(desc);

	EEBitmap bitmap1 = EEGetFontBitmap(L'啊');
	EEBitmap bitmap2 = EEGetFontBitmap(L'呀');
	EEBitmap bitmap3 = EEGetFontBitmap(L'?');
	EEBitmap bitmap = EEBitmapCombineHorizontal(bitmap1, bitmap2);
	//bitmap = EEBitmapCombineHorizontal(bitmap, bitmap3);
	//bitmap.Resize(500, 500);
	//std::vector<EEBitmap> bitmaps;
	//EEBitmapDivideVertical(bitmap, 3, bitmaps);
	//EETexture fonttex(bitmaps[1]);
	EEQuad2D quad0(Rect_Float(0, 0, (float)bitmap.GetWidth(), (float)bitmap.GetHeight()), bitmap);
	quad0.SetLocalZOrder(10.0f);

	EEBitmap bitmap11 = EEGetFontBitmap(L"大家好!呀\n呀\'呀呀?");
	EEQuad2D quad1(Rect_Float(0, 200, (float)bitmap11.GetWidth(), (float)bitmap11.GetHeight() + 200), bitmap11);
	quad1.SetLocalZOrder(10.0f);

	EETexture bgTex(L"Texture\\Project Diva Freedom\\01\\选歌条.png");
	EEFont helloworld(FLOAT3(100.0f, 100.0f, 0.0f), EEColor::YELLOW, L"hello world");
	helloworld.AddText(L'1');
	EELineEditor *lineEditor = new EELineEditor(Rect_Float(200.f, 300.f, 300.f, 350.f), bgTex, EEColor::BLACK);
	EELineEditor *lineEditor2 = new EELineEditor(Rect_Float(400.f, 300.f, 500.f, 350.f), bgTex, EEColor::BLACK);
	EETextEditor *textEditor = new EETextEditor(Rect_Float(300.f, 100.f, 400.f, 150.f), bgTex, EEColor::BLACK);

	while (EERun())
	{
		EEBeginScene(EEColor::BLACK);
		EEShowFPSInTitle(L"- -");

		quad0.Process();
		quad1.Process();
		lineEditor->Process();
		lineEditor2->Process();
		helloworld.Process();
		textEditor->Process();

		EEEndScene();
	}

	EEShutdown();
	return 0;
}
Пример #7
0
//int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR pScmdline, int iCmdshow)
int main(int _argc, char** _argv)
{
	EEDesc desc;
	desc.applicationName = L"Emerald";	//窗口名称
	desc.isFullScreen = false;			//是否全屏
	desc.width = 800;					//窗口宽度
	desc.height = 450;					//窗口高度
	desc.isSSAA = true;					//是开启抗锯齿
	desc.isVsync = false;				//是否垂直同步
	EEInitialize(desc);

	EERecorder recorder((DWORD_PTR)RecorderInProc);
	recorder.Start();

	std::map<char, EEMusic*> voices;

	while (EERun())
	{
		EEBeginScene(EEColor::BLACK);

		std::string recv;
		if (g_client.Recv(recv, 61))
		{
			std::map<char, EEMusic*>::iterator it = voices.find(recv[0]);
			if (it == voices.end())
			{
				EEMusic *voice = new EEMusic(recorder.GetFormat());
				voice->Play();
				voices.insert(std::pair<char, EEMusic*>(recv[0], voice));
				char code[960];
				EEWaveCoder::WaveDecode(&recv[1], 60, code, NULL);
				voice->AddBuffer(code, 960);
			}
			else
			{
				char code[960];
				EEWaveCoder::WaveDecode(&recv[1], 60, code, NULL);
				it->second->AddBuffer(code, 960);
			}
		}

		EEEndScene();
	}

	EEShutdown();
	return 0;
}
Пример #8
0
//int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR pScmdline, int iCmdshow)
int main(int _argc, char** _argv)
{
	EEDesc desc;
	desc.applicationName = L"Emerald";	//窗口名称
	desc.isFullScreen = false;			//是否全屏
	desc.width = 800;					//窗口宽度
	desc.height = 450;					//窗口高度
	desc.isSSAA = true;					//是开启抗锯齿
	desc.isVsync = false;				//是否垂直同步
	EEInitialize(desc);

	EEAnimationEmitter *emitter = new EEAnimationEmitter();
	std::vector<EEAnimationFrame*> target = emitter->GetAnimation()->GetFrames();

	EETexture button1Tex(L"Texture/Project Diva Freedom\\主界面\\默认主题/自由模式.png");
	EEButton addItem(EE_BUTTON_SCALE, Rect_Float((float)EEGetWidth() * 0.03f, (float)EEGetHeight() * 0.8489f, (float)EEGetWidth() * 0.1075f, (float)EEGetHeight() * 0.9856f), 1.3f, 0.2f, 0.2f, button1Tex);
	EEComboBox *combo = new EEComboBox(Rect_Float(100.f, 300.f, 200.f, 320.f), EEColor::WHITE, EEColor::BLACK);

	while (EERun())
	{
		EEBeginScene(EEColor::BLACK);

		addItem.Process();
		combo->Process();
		if (EEIsMouseInput())
		{
			EEGetMouse();
			emitter->Emit(FLOAT3(EEGetMousePosition(), 0.0f));
		}
		emitter->Process();

		EEEndScene();
	}
	SAFE_DELETE(emitter);

	EEShutdown();
	return 0;
}
Пример #9
0
//int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR pScmdline, int iCmdshow)
int main(int _argc, char** _argv)
{
	EEDesc desc;
	desc.applicationName = L"Emerald";	//窗口名称
	desc.isFullScreen = false;			//是否全屏
	desc.width = 800;					//窗口宽度
	desc.height = 450;					//窗口高度
	desc.isSSAA = true;					//是开启抗锯齿
	desc.isVsync = false;				//是否垂直同步
	EEInitialize();

	// EETexture tex0(L"Texture\\etc\\101087.jpg");
	EETexture tex1(L"Texture/etc/xmyrz.jpg");
	EETexture tex1_gray = tex1.Clone();
	EEGrayC gray(tex1_gray);
	gray.Process();

	EEQuad2D quad(Rect_Float(0, 0, (float)EEGetWidth(), (float)EEGetHeight()), tex1);
	EEDilateC dilate(tex1, tex1_gray, INT2(2, 2));
	dilate.Process();
	EEErodeC erode(tex1, tex1_gray, INT2(2, 2));
	erode.Process();
	

	while (EERun())
	{
		EEBeginScene(EEColor::BLACK);

		quad.Process();

		printf("%d ", EEGetFPS());
		EEEndScene();
	}

	EEShutdown();
	return 0;
}
Пример #10
0
//int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR pScmdline, int iCmdshow)
int main(int _argc, char** _argv)
{
	EEDesc desc;
	desc.applicationName = L"Emerald";	//窗口名称
	desc.isFullScreen = false;			//是否全屏
	desc.width = 800;					//窗口宽度
	desc.height = 450;					//窗口高度
	desc.isSSAA = true;					//是开启抗锯齿
	desc.isVsync = false;				//是否垂直同步
	EEInitialize();
	
	unsigned char data[5] = { 255, 2, 41, 0, 0 };
	EEBitmap bitmap(1, 1, data);
	EEAverageC *test = new EEAverageC(EETexture(bitmap));

	while (EERun())
	{
		EEBeginScene(EEColor::BLACK);

		test->Process();
		//int a = 1;
		//int b = 1;
		//int times = 10000000;
		//while (times--)
		//{
		//	a += times;
		//	//a += times;
		//}

		printf("%f\n", EEGetDeltaTime());
		EEEndScene();
	}

	EEShutdown();
	return 0;
}