fix: syntax error
This commit is contained in:
parent
ad5a9ed52f
commit
775e1075c8
|
|
@ -69,13 +69,9 @@ void e2d::Game::Start()
|
||||||
last = now;
|
last = now;
|
||||||
input->Update();
|
input->Update();
|
||||||
|
|
||||||
if (!paused_)
|
UpdateScene();
|
||||||
{
|
|
||||||
timer->Update();
|
|
||||||
UpdateScene();
|
|
||||||
}
|
|
||||||
|
|
||||||
DrawScene();
|
DrawScene();
|
||||||
|
|
||||||
window->Poll();
|
window->Poll();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
@ -168,6 +164,9 @@ bool e2d::Game::IsTransitioning() const
|
||||||
|
|
||||||
void e2d::Game::UpdateScene()
|
void e2d::Game::UpdateScene()
|
||||||
{
|
{
|
||||||
|
if (paused_)
|
||||||
|
return;
|
||||||
|
|
||||||
if (transition_)
|
if (transition_)
|
||||||
{
|
{
|
||||||
transition_->Update();
|
transition_->Update();
|
||||||
|
|
|
||||||
|
|
@ -160,7 +160,7 @@ bool e2d::Image::Preload(const Resource& res)
|
||||||
|
|
||||||
IWICImagingFactory *imaging_factory = Renderer::GetImagingFactory();
|
IWICImagingFactory *imaging_factory = Renderer::GetImagingFactory();
|
||||||
ID2D1HwndRenderTarget* render_target = Renderer::GetInstance()->GetRenderTarget();
|
ID2D1HwndRenderTarget* render_target = Renderer::GetInstance()->GetRenderTarget();
|
||||||
IWICBitmadecoder *decoder = nullptr;
|
IWICBitmapDecoder *decoder = nullptr;
|
||||||
IWICBitmapFrameDecode *source = nullptr;
|
IWICBitmapFrameDecode *source = nullptr;
|
||||||
IWICStream *stream = nullptr;
|
IWICStream *stream = nullptr;
|
||||||
IWICFormatConverter *converter = nullptr;
|
IWICFormatConverter *converter = nullptr;
|
||||||
|
|
@ -172,8 +172,8 @@ bool e2d::Image::Preload(const Resource& res)
|
||||||
|
|
||||||
// ¶¨Î»×ÊÔ´
|
// ¶¨Î»×ÊÔ´
|
||||||
res_handle = ::FindResourceW(
|
res_handle = ::FindResourceW(
|
||||||
HINST_THISCOMPONENT,
|
HINST_THISCOMPONENT,
|
||||||
MAKEINTRESOURCE(res.id),
|
MAKEINTRESOURCE(res.id),
|
||||||
(LPCWSTR)res.type
|
(LPCWSTR)res.type
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
@ -292,7 +292,7 @@ bool e2d::Image::Preload(const String & file_name)
|
||||||
|
|
||||||
IWICImagingFactory *imaging_factory = Renderer::GetImagingFactory();
|
IWICImagingFactory *imaging_factory = Renderer::GetImagingFactory();
|
||||||
ID2D1HwndRenderTarget* render_target = Renderer::GetInstance()->GetRenderTarget();
|
ID2D1HwndRenderTarget* render_target = Renderer::GetInstance()->GetRenderTarget();
|
||||||
IWICBitmadecoder *decoder = nullptr;
|
IWICBitmapDecoder *decoder = nullptr;
|
||||||
IWICBitmapFrameDecode *source = nullptr;
|
IWICBitmapFrameDecode *source = nullptr;
|
||||||
IWICStream *stream = nullptr;
|
IWICStream *stream = nullptr;
|
||||||
IWICFormatConverter *converter = nullptr;
|
IWICFormatConverter *converter = nullptr;
|
||||||
|
|
|
||||||
|
|
@ -69,6 +69,11 @@ e2d::Node::~Node()
|
||||||
SafeRelease(action);
|
SafeRelease(action);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (auto task : tasks_)
|
||||||
|
{
|
||||||
|
SafeRelease(task);
|
||||||
|
}
|
||||||
|
|
||||||
for (auto child : children_)
|
for (auto child : children_)
|
||||||
{
|
{
|
||||||
SafeRelease(child);
|
SafeRelease(child);
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,9 @@ e2d::File::~File()
|
||||||
|
|
||||||
bool e2d::File::Open(const String & file_name)
|
bool e2d::File::Open(const String & file_name)
|
||||||
{
|
{
|
||||||
|
if (file_name.IsEmpty())
|
||||||
|
return false;
|
||||||
|
|
||||||
auto FindFile = [=](const String & path) -> bool
|
auto FindFile = [=](const String & path) -> bool
|
||||||
{
|
{
|
||||||
if (::_waccess((const wchar_t*)path, 0) == 0)
|
if (::_waccess((const wchar_t*)path, 0) == 0)
|
||||||
|
|
|
||||||
|
|
@ -80,7 +80,7 @@ bool e2d::Music::Open(const e2d::String & file_path)
|
||||||
}
|
}
|
||||||
|
|
||||||
File music_file;
|
File music_file;
|
||||||
if (!music_file.Open(file_name))
|
if (!music_file.Open(file_path))
|
||||||
{
|
{
|
||||||
WARN("Music::Open error: File not found.");
|
WARN("Music::Open error: File not found.");
|
||||||
return false;
|
return false;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue