Refactoring : header files name
This commit is contained in:
		
							parent
							
								
									860e0fe08e
								
							
						
					
					
						commit
						745bd994a8
					
				|  | @ -1,5 +1,5 @@ | |||
| #include "..\e2daction.h" | ||||
| #include "..\e2dnode.h" | ||||
| #include "..\e2dcomponent.h" | ||||
| 
 | ||||
| e2d::Animate::Animate()  | ||||
| 	: frame_index_(0) | ||||
|  |  | |||
|  | @ -1,5 +1,5 @@ | |||
| #include "..\e2daction.h" | ||||
| #include "..\e2dnode.h" | ||||
| #include "..\e2dcomponent.h" | ||||
| 
 | ||||
| e2d::JumpBy::JumpBy(float duration, const Point & vec, float height, int jumps) | ||||
| 	: FiniteTimeAction(duration) | ||||
|  |  | |||
|  | @ -1,5 +1,5 @@ | |||
| #include "..\e2daction.h" | ||||
| #include "..\e2dnode.h" | ||||
| #include "..\e2dcomponent.h" | ||||
| 
 | ||||
| e2d::JumpTo::JumpTo(float duration, const Point & pos, float height, int jumps) | ||||
| 	: JumpBy(duration, Point(), height, jumps) | ||||
|  |  | |||
|  | @ -1,5 +1,5 @@ | |||
| #include "..\e2daction.h" | ||||
| #include "..\e2dnode.h" | ||||
| #include "..\e2dcomponent.h" | ||||
| 
 | ||||
| 
 | ||||
| e2d::MoveBy::MoveBy(float duration, Point vector) | ||||
|  |  | |||
|  | @ -1,5 +1,5 @@ | |||
| #include "..\e2daction.h" | ||||
| #include "..\e2dnode.h" | ||||
| #include "..\e2dcomponent.h" | ||||
| 
 | ||||
| e2d::MoveTo::MoveTo(float duration, Point pos) | ||||
| 	: MoveBy(duration, Point()) | ||||
|  |  | |||
|  | @ -1,5 +1,5 @@ | |||
| #include "..\e2daction.h" | ||||
| #include "..\e2dnode.h" | ||||
| #include "..\e2dcomponent.h" | ||||
| 
 | ||||
| 
 | ||||
| e2d::OpacityBy::OpacityBy(float duration, float opacity) | ||||
|  |  | |||
|  | @ -1,5 +1,5 @@ | |||
| #include "..\e2daction.h" | ||||
| #include "..\e2dnode.h" | ||||
| #include "..\e2dcomponent.h" | ||||
| 
 | ||||
| 
 | ||||
| e2d::OpacityTo::OpacityTo(float duration, float opacity) | ||||
|  |  | |||
|  | @ -1,5 +1,5 @@ | |||
| #include "..\e2daction.h" | ||||
| #include "..\e2dnode.h" | ||||
| #include "..\e2dcomponent.h" | ||||
| 
 | ||||
| 
 | ||||
| e2d::RotateBy::RotateBy(float duration, float rotation) | ||||
|  |  | |||
|  | @ -1,5 +1,5 @@ | |||
| #include "..\e2daction.h" | ||||
| #include "..\e2dnode.h" | ||||
| #include "..\e2dcomponent.h" | ||||
| 
 | ||||
| 
 | ||||
| e2d::RotateTo::RotateTo(float duration, float rotation) | ||||
|  |  | |||
|  | @ -1,5 +1,5 @@ | |||
| #include "..\e2daction.h" | ||||
| #include "..\e2dnode.h" | ||||
| #include "..\e2dcomponent.h" | ||||
| 
 | ||||
| 
 | ||||
| e2d::ScaleBy::ScaleBy(float duration, float scale) | ||||
|  |  | |||
|  | @ -1,5 +1,5 @@ | |||
| #include "..\e2daction.h" | ||||
| #include "..\e2dnode.h" | ||||
| #include "..\e2dcomponent.h" | ||||
| 
 | ||||
| e2d::ScaleTo::ScaleTo(float duration, float scale) | ||||
| 	: ScaleBy(duration, 0, 0) | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| #include "..\e2dbase.h" | ||||
| #include "..\e2dmodule.h" | ||||
| 
 | ||||
| 
 | ||||
| e2d::Audio * e2d::Audio::instance_ = nullptr; | ||||
|  |  | |||
|  | @ -1,5 +1,5 @@ | |||
| #include "..\e2dbase.h" | ||||
| #include "..\e2dtool.h" | ||||
| #include "..\e2dmodule.h" | ||||
| #include "..\e2dutil.h" | ||||
| #include "..\e2dmanager.h" | ||||
| 
 | ||||
| using namespace e2d; | ||||
|  | @ -38,8 +38,6 @@ e2d::GC::GC() | |||
| e2d::GC::~GC() | ||||
| { | ||||
| 	// 删除所有对象
 | ||||
| 	Timer::GetInstance()->ClearAllTasks(); | ||||
| 
 | ||||
| 	cleanup_ = true; | ||||
| 	for (const auto& ref : pool_) | ||||
| 	{ | ||||
|  |  | |||
|  | @ -1,8 +1,8 @@ | |||
| #include "..\e2dbase.h" | ||||
| #include "..\e2dnode.h" | ||||
| #include "..\e2dmodule.h" | ||||
| #include "..\e2dcomponent.h" | ||||
| #include "..\e2dtransition.h" | ||||
| #include "..\e2dmanager.h" | ||||
| #include "..\e2dtool.h" | ||||
| #include "..\e2dutil.h" | ||||
| #include <thread> | ||||
| 
 | ||||
| 
 | ||||
|  |  | |||
|  | @ -1,5 +1,5 @@ | |||
| #include "..\e2dbase.h" | ||||
| #include "..\e2dtool.h" | ||||
| #include "..\e2dmodule.h" | ||||
| #include "..\e2dutil.h" | ||||
| #include "..\e2dmanager.h" | ||||
| #pragma comment(lib, "dinput8.lib") | ||||
| 
 | ||||
|  |  | |||
|  | @ -1,6 +1,6 @@ | |||
| #include "..\e2dbase.h" | ||||
| #include "..\e2dmodule.h" | ||||
| #include "..\e2dmanager.h" | ||||
| #include "..\e2dnode.h" | ||||
| #include "..\e2dcomponent.h" | ||||
| 
 | ||||
| 
 | ||||
| e2d::Renderer*		e2d::Renderer::instance_ = nullptr; | ||||
|  |  | |||
|  | @ -1,6 +1,6 @@ | |||
| #include "..\e2dbase.h" | ||||
| #include "..\e2dmodule.h" | ||||
| #include "..\e2dmanager.h" | ||||
| #include "..\e2dnode.h" | ||||
| #include "..\e2dcomponent.h" | ||||
| #include <imm.h> | ||||
| #pragma comment (lib ,"imm32.lib") | ||||
| 
 | ||||
|  |  | |||
|  | @ -1,6 +1,8 @@ | |||
| #include "..\e2dcommon.h" | ||||
| #include "..\e2dimpl.h" | ||||
| #include "..\e2dmodule.h" | ||||
| #include "..\e2dmanager.h" | ||||
| #include "..\e2dnode.h" | ||||
| #include "..\e2dcomponent.h" | ||||
| 
 | ||||
| e2d::Collider::Collider(Node * parent) | ||||
| 	: visible_(true) | ||||
|  |  | |||
|  | @ -1,6 +1,6 @@ | |||
| #include "..\e2dcommon.h" | ||||
| #include "..\e2dbase.h" | ||||
| #include "..\e2dtool.h" | ||||
| #include "..\e2dmodule.h" | ||||
| #include "..\e2dutil.h" | ||||
| 
 | ||||
| std::map<size_t, ID2D1Bitmap*> e2d::Image::bitmap_cache_; | ||||
| 
 | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| #include "..\e2dtool.h" | ||||
| #include "..\e2dutil.h" | ||||
| 
 | ||||
| 
 | ||||
| e2d::Resource::Resource(size_t resource_name, const String & resource_type) | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| #include "..\e2dcustom.h" | ||||
| #include "..\e2dimpl.h" | ||||
| 
 | ||||
| 
 | ||||
| e2d::Exception::Exception() E2D_NOEXCEPT | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| #include "..\e2dcustom.h" | ||||
| #include "..\e2dimpl.h" | ||||
| 
 | ||||
| e2d::SystemException::SystemException() E2D_NOEXCEPT | ||||
| 	: Exception("Unknown system exception") | ||||
|  |  | |||
|  | @ -1,5 +1,5 @@ | |||
| #include "..\e2dcustom.h" | ||||
| #include "..\e2dbase.h" | ||||
| #include "..\e2dimpl.h" | ||||
| #include "..\e2dmodule.h" | ||||
| 
 | ||||
| using namespace e2d; | ||||
| 
 | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| #include "..\e2dcustom.h" | ||||
| #include "..\e2dimpl.h" | ||||
| #include "..\e2dcommon.h" | ||||
| 
 | ||||
| e2d::VoiceCallback::VoiceCallback() | ||||
|  |  | |||
|  | @ -1,5 +1,5 @@ | |||
| #include "..\e2devent.h" | ||||
| #include "..\e2dbase.h" | ||||
| #include "..\e2dmodule.h" | ||||
| 
 | ||||
| e2d::MouseEvent::MouseEvent(HWND hWnd, UINT message, WPARAM w_param, LPARAM l_param, float dpi) | ||||
| 	: message_(message) | ||||
|  |  | |||
|  | @ -1,6 +1,7 @@ | |||
| #include "..\e2dmanager.h" | ||||
| #include "..\e2dnode.h" | ||||
| #include "..\e2dtool.h" | ||||
| #include "..\e2dcomponent.h" | ||||
| #include "..\e2dutil.h" | ||||
| #include "..\e2dmodule.h" | ||||
| 
 | ||||
| 
 | ||||
| e2d::CollisionManager * e2d::CollisionManager::GetInstance() | ||||
|  |  | |||
|  | @ -1,5 +1,6 @@ | |||
| #include "..\e2dnode.h" | ||||
| #include "..\e2dcomponent.h" | ||||
| #include "..\e2dmanager.h" | ||||
| #include "..\e2dmodule.h" | ||||
| 
 | ||||
| #define SAFE_SET(pointer, func, ...) if (pointer) { pointer->##func(__VA_ARGS__); } | ||||
| 
 | ||||
|  |  | |||
|  | @ -1,4 +1,5 @@ | |||
| #include "..\e2dnode.h" | ||||
| #include "..\e2dcomponent.h" | ||||
| #include "..\e2dmodule.h" | ||||
| 
 | ||||
| e2d::Canvas::Canvas(float width, float height) | ||||
| 	: render_target_(nullptr) | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| #include "..\e2dnode.h" | ||||
| #include "..\e2dcomponent.h" | ||||
| 
 | ||||
| e2d::Menu::Menu() | ||||
| 	: enabled_(true) | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| #include "..\e2dnode.h" | ||||
| #include "..\e2dcomponent.h" | ||||
| #include "..\e2devent.h" | ||||
| #include "..\e2dmanager.h" | ||||
| #include "..\e2daction.h" | ||||
|  |  | |||
|  | @ -1,5 +1,5 @@ | |||
| #include "..\e2dbase.h" | ||||
| #include "..\e2dnode.h" | ||||
| #include "..\e2dmodule.h" | ||||
| #include "..\e2dcomponent.h" | ||||
| #include "..\e2dmanager.h" | ||||
| 
 | ||||
| e2d::Scene::Scene() | ||||
|  |  | |||
|  | @ -1,5 +1,5 @@ | |||
| #include "..\e2dnode.h" | ||||
| 
 | ||||
| #include "..\e2dcomponent.h" | ||||
| #include "..\e2dmodule.h" | ||||
| 
 | ||||
| e2d::Sprite::Sprite() | ||||
| 	: image_(nullptr) | ||||
|  |  | |||
|  | @ -1,4 +1,5 @@ | |||
| #include "..\e2dnode.h" | ||||
| #include "..\e2dcomponent.h" | ||||
| #include "..\e2dmodule.h" | ||||
| 
 | ||||
| //-------------------------------------------------------
 | ||||
| // Style
 | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| #include "..\e2dnode.h" | ||||
| #include "..\e2dcomponent.h" | ||||
| 
 | ||||
| #define SAFE_SET(pointer, func, ...) if (pointer) { pointer->##func(__VA_ARGS__); } | ||||
| 
 | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| #include "..\e2dtool.h" | ||||
| #include "..\e2dutil.h" | ||||
| 
 | ||||
| 
 | ||||
| e2d::Data::Data(const String & key, const String & field) | ||||
|  |  | |||
|  | @ -1,4 +1,5 @@ | |||
| #include "..\e2dtool.h" | ||||
| #include "..\e2dutil.h" | ||||
| #include "..\e2dmodule.h" | ||||
| #include <shobjidl.h>  | ||||
| 
 | ||||
| std::list<e2d::String>	e2d::File::search_paths_; | ||||
|  |  | |||
|  | @ -1,4 +1,5 @@ | |||
| #include "..\e2dtool.h" | ||||
| #include "..\e2dutil.h" | ||||
| #include "..\e2dmodule.h" | ||||
| 
 | ||||
| 
 | ||||
| #ifndef SAFE_DELETE | ||||
|  |  | |||
|  | @ -1,4 +1,5 @@ | |||
| #include "..\e2dtool.h" | ||||
| #include "..\e2dutil.h" | ||||
| #include "..\e2dmodule.h" | ||||
| #include <shlobj.h> | ||||
| 
 | ||||
| const e2d::String& e2d::Path::GetDataPath() | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| #include "..\e2dtool.h" | ||||
| #include "..\e2dutil.h" | ||||
| 
 | ||||
| 
 | ||||
| e2d::Player * e2d::Player::instance_ = nullptr; | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| #include "..\e2dtool.h" | ||||
| #include "..\e2dutil.h" | ||||
| 
 | ||||
| std::default_random_engine &e2d::Random::GetEngine() | ||||
| { | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| #include "..\e2dtool.h" | ||||
| #include "..\e2dutil.h" | ||||
| 
 | ||||
| 
 | ||||
| e2d::Task::Task(const Function & func, const String & name) | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| #include "..\e2dtool.h" | ||||
| #include "..\e2dutil.h" | ||||
| 
 | ||||
| 
 | ||||
| e2d::Timer * e2d::Timer::GetInstance() | ||||
|  | @ -87,18 +87,6 @@ void e2d::Timer::RemoveAllTasks() | |||
| 	} | ||||
| } | ||||
| 
 | ||||
| void e2d::Timer::ClearAllTasks() | ||||
| { | ||||
| 	if (tasks_.empty()) | ||||
| 		return; | ||||
| 
 | ||||
| 	for (const auto& task : tasks_) | ||||
| 	{ | ||||
| 		task->Release(); | ||||
| 	} | ||||
| 	tasks_.clear(); | ||||
| } | ||||
| 
 | ||||
| void e2d::Timer::Update() | ||||
| { | ||||
| 	if (tasks_.empty()) | ||||
|  |  | |||
|  | @ -1,5 +1,6 @@ | |||
| #include "..\e2dtransition.h" | ||||
| #include "..\e2dnode.h" | ||||
| #include "..\e2dcomponent.h" | ||||
| #include "..\e2dmodule.h" | ||||
| 
 | ||||
| e2d::BoxTransition::BoxTransition(Scene* scene, float duration) | ||||
| 	: Transition(scene, duration) | ||||
|  |  | |||
|  | @ -1,5 +1,5 @@ | |||
| #include "..\e2dtransition.h" | ||||
| #include "..\e2dnode.h" | ||||
| #include "..\e2dcomponent.h" | ||||
| 
 | ||||
| e2d::EmergeTransition::EmergeTransition(Scene* scene, float duration) | ||||
| 	: Transition(scene, duration) | ||||
|  |  | |||
|  | @ -1,5 +1,5 @@ | |||
| #include "..\e2dtransition.h" | ||||
| #include "..\e2dnode.h" | ||||
| #include "..\e2dcomponent.h" | ||||
| 
 | ||||
| e2d::FadeTransition::FadeTransition(Scene* scene, float duration) | ||||
| 	: Transition(scene, duration) | ||||
|  |  | |||
|  | @ -1,5 +1,6 @@ | |||
| #include "..\e2dtransition.h" | ||||
| #include "..\e2dnode.h" | ||||
| #include "..\e2dcomponent.h" | ||||
| #include "..\e2dmodule.h" | ||||
| 
 | ||||
| e2d::MoveTransition::MoveTransition(Scene* scene, float duration, Direction direction) | ||||
| 	: Transition(scene, duration) | ||||
|  |  | |||
|  | @ -1,6 +1,6 @@ | |||
| #include "..\e2dbase.h" | ||||
| #include "..\e2dmodule.h" | ||||
| #include "..\e2dtransition.h" | ||||
| #include "..\e2dnode.h" | ||||
| #include "..\e2dcomponent.h" | ||||
| 
 | ||||
| e2d::Transition::Transition(Scene* scene, float duration) | ||||
| 	: done_(false) | ||||
|  |  | |||
|  | @ -1,6 +1,6 @@ | |||
| #pragma once | ||||
| #include "e2dcommon.h" | ||||
| #include "e2dbase.h" | ||||
| #include "e2dmodule.h" | ||||
| 
 | ||||
| namespace e2d | ||||
| { | ||||
|  |  | |||
|  | @ -1,5 +1,5 @@ | |||
| #pragma once | ||||
| #include "e2dbase.h" | ||||
| #include "e2dcommon.h" | ||||
| #include "e2devent.h" | ||||
| 
 | ||||
| namespace e2d  | ||||
|  | @ -7,6 +7,7 @@ namespace e2d | |||
| 
 | ||||
| 
 | ||||
| class Action; | ||||
| class Scene; | ||||
| 
 | ||||
| 
 | ||||
| // »æÍ¼½Ó¿Ú
 | ||||
|  | @ -1,5 +1,4 @@ | |||
| #pragma once | ||||
| #include "e2dmacros.h" | ||||
| #include "e2dcommon.h" | ||||
| 
 | ||||
| namespace e2d | ||||
|  | @ -1,11 +1,9 @@ | |||
| #pragma once | ||||
| #include "e2dmacros.h" | ||||
| #include "e2dcommon.h" | ||||
| #include "e2dcustom.h" | ||||
| #include "e2dimpl.h" | ||||
| #include "e2dcomponent.h" | ||||
| #include "e2dtransition.h" | ||||
| 
 | ||||
| 
 | ||||
| // Base Classes
 | ||||
| 
 | ||||
| namespace e2d | ||||
| { | ||||
| 
 | ||||
|  | @ -314,9 +312,6 @@ protected: | |||
| }; | ||||
| 
 | ||||
| 
 | ||||
| class Scene; | ||||
| class Transition; | ||||
| 
 | ||||
| // ÓÎÏ·
 | ||||
| class Game | ||||
| { | ||||
|  | @ -1,5 +1,6 @@ | |||
| #pragma once | ||||
| #include "e2dbase.h" | ||||
| #include "e2dcommon.h" | ||||
| #include "e2dimpl.h" | ||||
| 
 | ||||
| namespace e2d | ||||
| { | ||||
|  | @ -292,7 +293,7 @@ protected: | |||
| 	// 任务是否就绪
 | ||||
| 	bool IsReady() const; | ||||
| 
 | ||||
| private: | ||||
| protected: | ||||
| 	bool		running_; | ||||
| 	bool		stopped_; | ||||
| 	int			run_times_; | ||||
|  | @ -340,9 +341,6 @@ public: | |||
| 	// 移除所有任务
 | ||||
| 	void RemoveAllTasks(); | ||||
| 
 | ||||
| 	// 强制清空所有任务
 | ||||
| 	void ClearAllTasks(); | ||||
| 
 | ||||
| 	// 更新定时器
 | ||||
| 	void Update(); | ||||
| 
 | ||||
|  | @ -19,12 +19,12 @@ | |||
| 
 | ||||
| #include "e2dmacros.h" | ||||
| #include "e2dcommon.h" | ||||
| #include "e2dbase.h" | ||||
| #include "e2dmanager.h" | ||||
| #include "e2dnode.h" | ||||
| #include "e2dtool.h" | ||||
| #include "e2dcomponent.h" | ||||
| #include "e2dutil.h" | ||||
| #include "e2daction.h" | ||||
| #include "e2dtransition.h" | ||||
| #include "e2dmodule.h" | ||||
| 
 | ||||
| 
 | ||||
| #if defined(DEBUG) || defined(_DEBUG) | ||||
|  |  | |||
|  | @ -268,15 +268,15 @@ | |||
|   </ItemGroup> | ||||
|   <ItemGroup> | ||||
|     <ClInclude Include="..\..\core\e2daction.h" /> | ||||
|     <ClInclude Include="..\..\core\e2dcustom.h" /> | ||||
|     <ClInclude Include="..\..\core\e2dimpl.h" /> | ||||
|     <ClInclude Include="..\..\core\e2devent.h" /> | ||||
|     <ClInclude Include="..\..\core\easy2d.h" /> | ||||
|     <ClInclude Include="..\..\core\e2dbase.h" /> | ||||
|     <ClInclude Include="..\..\core\e2dmodule.h" /> | ||||
|     <ClInclude Include="..\..\core\e2dcommon.h" /> | ||||
|     <ClInclude Include="..\..\core\e2dmacros.h" /> | ||||
|     <ClInclude Include="..\..\core\e2dmanager.h" /> | ||||
|     <ClInclude Include="..\..\core\e2dnode.h" /> | ||||
|     <ClInclude Include="..\..\core\e2dtool.h" /> | ||||
|     <ClInclude Include="..\..\core\e2dcomponent.h" /> | ||||
|     <ClInclude Include="..\..\core\e2dutil.h" /> | ||||
|     <ClInclude Include="..\..\core\e2dtransition.h" /> | ||||
|   </ItemGroup> | ||||
|   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> | ||||
|  |  | |||
|  | @ -241,14 +241,14 @@ | |||
|   <ItemGroup> | ||||
|     <ClInclude Include="..\..\core\easy2d.h" /> | ||||
|     <ClInclude Include="..\..\core\e2daction.h" /> | ||||
|     <ClInclude Include="..\..\core\e2dbase.h" /> | ||||
|     <ClInclude Include="..\..\core\e2dcommon.h" /> | ||||
|     <ClInclude Include="..\..\core\e2dmacros.h" /> | ||||
|     <ClInclude Include="..\..\core\e2dmanager.h" /> | ||||
|     <ClInclude Include="..\..\core\e2dnode.h" /> | ||||
|     <ClInclude Include="..\..\core\e2dtool.h" /> | ||||
|     <ClInclude Include="..\..\core\e2dtransition.h" /> | ||||
|     <ClInclude Include="..\..\core\e2dcustom.h" /> | ||||
|     <ClInclude Include="..\..\core\e2devent.h" /> | ||||
|     <ClInclude Include="..\..\core\e2dutil.h" /> | ||||
|     <ClInclude Include="..\..\core\e2dmodule.h" /> | ||||
|     <ClInclude Include="..\..\core\e2dcomponent.h" /> | ||||
|     <ClInclude Include="..\..\core\e2dimpl.h" /> | ||||
|   </ItemGroup> | ||||
| </Project> | ||||
		Loading…
	
		Reference in New Issue