fix: syntax error

This commit is contained in:
Nomango 2018-09-07 23:47:21 +08:00
parent ad5a9ed52f
commit 775e1075c8
5 changed files with 18 additions and 11 deletions

View File

@ -69,13 +69,9 @@ void e2d::Game::Start()
last = now;
input->Update();
if (!paused_)
{
timer->Update();
UpdateScene();
}
UpdateScene();
DrawScene();
window->Poll();
}
else
@ -168,6 +164,9 @@ bool e2d::Game::IsTransitioning() const
void e2d::Game::UpdateScene()
{
if (paused_)
return;
if (transition_)
{
transition_->Update();

View File

@ -160,7 +160,7 @@ bool e2d::Image::Preload(const Resource& res)
IWICImagingFactory *imaging_factory = Renderer::GetImagingFactory();
ID2D1HwndRenderTarget* render_target = Renderer::GetInstance()->GetRenderTarget();
IWICBitmadecoder *decoder = nullptr;
IWICBitmapDecoder *decoder = nullptr;
IWICBitmapFrameDecode *source = nullptr;
IWICStream *stream = nullptr;
IWICFormatConverter *converter = nullptr;
@ -292,7 +292,7 @@ bool e2d::Image::Preload(const String & file_name)
IWICImagingFactory *imaging_factory = Renderer::GetImagingFactory();
ID2D1HwndRenderTarget* render_target = Renderer::GetInstance()->GetRenderTarget();
IWICBitmadecoder *decoder = nullptr;
IWICBitmapDecoder *decoder = nullptr;
IWICBitmapFrameDecode *source = nullptr;
IWICStream *stream = nullptr;
IWICFormatConverter *converter = nullptr;

View File

@ -69,6 +69,11 @@ e2d::Node::~Node()
SafeRelease(action);
}
for (auto task : tasks_)
{
SafeRelease(task);
}
for (auto child : children_)
{
SafeRelease(child);

View File

@ -23,6 +23,9 @@ e2d::File::~File()
bool e2d::File::Open(const String & file_name)
{
if (file_name.IsEmpty())
return false;
auto FindFile = [=](const String & path) -> bool
{
if (::_waccess((const wchar_t*)path, 0) == 0)

View File

@ -80,7 +80,7 @@ bool e2d::Music::Open(const e2d::String & file_path)
}
File music_file;
if (!music_file.Open(file_name))
if (!music_file.Open(file_path))
{
WARN("Music::Open error: File not found.");
return false;