本文整理汇总了C++中shared_ptr::ChangeView方法的典型用法代码示例。如果您正苦于以下问题:C++ shared_ptr::ChangeView方法的具体用法?C++ shared_ptr::ChangeView怎么用?C++ shared_ptr::ChangeView使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类shared_ptr
的用法示例。
在下文中一共展示了shared_ptr::ChangeView方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: _tWinMain
int APIENTRY _tWinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPTSTR lpCmdLine,
int nCmdShow)
{
auto General_Scene = make_shared<MX::Scene>();
draw1 = shared_ptr<MX::Draw>(new MX::Draw);
shared_ptr<MX::Spriter> spriter(new MX::Spriter(draw1));
if (!draw1->Initialize())
return -1;
if (!draw1->ChangeView(1280, 800, true))
return -1;
if (!spriter->Init())
return -1;
bool bs = MX::Sound::Initialize();
initGame(draw1,spriter,&(*General_Scene));
/*
shared_ptr<MX::Image> image(new MX::Image), image2(new MX::Image), image3(new MX::Ima0ge);
image->Load(*draw1, L"images\\plansza_1_layer1.png");
image2->Load(*draw1, L"images\\plansza_1_layer2.png");
image3->Load(*draw1, L"images\\interface_main.png");
*/
/*
menu1Music.LoadStream(L"music\\menu.mp3");
menu2Music.LoadStream(L"music\\menu2.mp3");
game1Music.LoadStream(L"music\\game.mp3");
winMusic.LoadStream(L"music\\win.mp3");
menu1Music.Play();*/
SoundBank::Initialize();
shared_ptr<MX::Liner> liner = shared_ptr<MX::Liner>(MX::Liner::Create(draw1));
liner->SetAntialias(true);
liner->SetWidth(1.2f);
MX::ActorSprite::spriter = spriter.get();
MX::World::Initialize();
srand(MX::World::GetTick());
//InitializeDemo(draw1,spriter, General_Scene.get());
//InitializeGame(draw1,spriter, General_Scene.get());
InitializeTitle(draw1,spriter, General_Scene.get());
/*
auto part = make_shared<MX::ParticleGenerator<MX::SimpleParticleCreator, MX::SimpleParticleDispatcher<3,10>>>(General_Scene);
part->creator.SetAnimation(MX::CreateAnimationFromFile(L"images\\serce1.png"));
part->x = 200;
part->y = 200;
shared_ptr<MX::Command> com = MX::q(wait(1000), die());
part->OnDo.connect(com);
General_Scene->AddActor(part);*/
while (MX::Window::Loop())
{
if (MX::World::Key[VK_ESCAPE])
PostQuitMessage(0);
MX::World::ElapseTime();
if (draw1->IsDeviceReset())
{
draw1->Clear(0xFF000000);
if (draw1->Begin())
{
if (spriter->Begin(D3DXSPRITE_ALPHABLEND | D3DXSPRITE_SORT_DEPTH_FRONTTOBACK))
{
General_Scene->Draw();
spriter->ResetTransform();
spriter->End();
}
draw1->End();
}
draw1->Present();
//.........这里部分代码省略.........