Пример #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();

	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;
}
Пример #2
0
DIVANote::DIVANote(const Note& _note, double _totalTime, double singleTime, EETexture& _nodeTex, EETexture& _stripTex)
	:
	EEQuad2D(FLOAT3((float)_note.x, (float)_note.y, 0.f), EEGetWidth() / 20.f, EEGetHeight() / 11.f, _nodeTex),

	m_type(_note.key < NOTE_NUM ? NOTETYPE_NORMAL : NOTETYPE_STRIP),
	m_key(_note.key),
	m_x(_note.x),
	m_y(_note.y),
	m_tailx(_note.tailx),
	m_taily(_note.taily),
	m_note(FLOAT3((float)_note.tailx, (float)_note.taily, 0.f), EEGetWidth() / 20.f, EEGetHeight() / 11.f, _nodeTex),
	m_stripNote(FLOAT3((float)_note.tailx, (float)_note.taily, 0.f), EEGetWidth() / 20.f, EEGetHeight() / 11.f, _nodeTex),
	m_strip(_stripTex),

	m_state(DIVA_NOTE_DEFAULT),
	m_actionTime(0.1),
	m_totalTime(_totalTime),
	m_restTime(_totalTime),

	m_totalDuration(_note.duration * singleTime),
	m_restDuration(_note.duration * singleTime)
{
	m_strip.SetWidth(EEGetWidth() / 30.f);
}
Пример #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(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;
}
Пример #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();

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