diff --git a/.gitignore b/.gitignore index 21e3bf30..b73666a4 100644 --- a/.gitignore +++ b/.gitignore @@ -378,3 +378,5 @@ FodyWeavers.xsd # Build directories build/ dist/ + +src/vcpkg_installed diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 00000000..881a7dd4 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,12 @@ +{ + "configurations": [ + { + "type": "cmake", + "request": "launch", + "name": "Debug portfile(s)", + "cmakeDebugType": "external", + "pipeName": "/tmp/vcpkg_ext_portfile_dbg", + "preLaunchTask": "Debug vcpkg commands" + } + ] +} diff --git a/bin/pack/root/mousemodule.py b/bin/pack/root/mousemodule.py index 92927652..86cbedee 100644 --- a/bin/pack/root/mousemodule.py +++ b/bin/pack/root/mousemodule.py @@ -16,7 +16,7 @@ import systemSetting import localeInfo ## Mouse Controler -## 콺 Ŀ ϸ 콺 Ŀ AttachǾ ̴ Object ִ. +## When the cursor is over the object, the Attach menu appears and allows attaching or editing the object. class CursorImage(object): def __init__(self): @@ -57,9 +57,7 @@ class CursorImage(object): grpImage.Render(self.handle) class CMouseController(object): - def __init__(self): - self.x = 0 self.y = 0 @@ -84,9 +82,12 @@ class CMouseController(object): self.DeattachObject() self.callbackDict = {} + self.cursorDict = {} def __del__(self): self.callbackDict = {} + for k, v in self.cursorDict.items(): + v.DeleteImage() def Create(self): self.IsSoftwareCursor = systemSetting.IsSoftwareCursor() @@ -157,7 +158,7 @@ class CMouseController(object): self.curCursorImage = self.cursorDict[app.NORMAL] except KeyError: - dbg.TraceError("mouseModule.MouseController.SetCursor - ߸ Ŀ ȣ [%d]" % cursorNum) + dbg.TraceError("mouseModule.MouseController.SetCursor - �߸��� Ŀ�� ��ȣ [%d]" % cursorNum) self.curCursorName = app.NORMAL self.curCursorImage = self.cursorDict[app.NORMAL] diff --git a/bin/pack/root/prototype.py b/bin/pack/root/prototype.py index 442f7ffd..7f22ab93 100644 --- a/bin/pack/root/prototype.py +++ b/bin/pack/root/prototype.py @@ -57,6 +57,7 @@ def RunApp(): app.Loop() mainStream.Destroy() + del mouseModule.mouseController RunApp() diff --git a/src/GameLib/Property.cpp b/src/GameLib/Property.cpp index 4e92b9d6..cee2771a 100644 --- a/src/GameLib/Property.cpp +++ b/src/GameLib/Property.cpp @@ -5,13 +5,13 @@ #include "PropertyManager.h" #include "Property.h" /* - * CProperty 파일 포맷 - * - * 0 ~ 4 bytes: fourcc - * 5 ~ 6 bytes: \r\n - * - * 그 이후의 바이트들은 텍스트 파일 로더와 같은 구조 - */ +* CProperty file format +* +* 0 ~ 4 bytes: fourcc +* 5 ~ 6 bytes: \r\n +* +* The bytes after that are structured like a text file loader +*/ CProperty::CProperty(const char * c_pszFileName) : mc_pFileName(NULL), m_dwCRC(0) { m_stFileName = c_pszFileName; @@ -68,25 +68,25 @@ bool CProperty::GetVector(const char * c_pszKey, CTokenVector & rTokenVector) if (m_stTokenMap.end() == it) return false; -// NOTE : 튕김 현상 발견 -// std::copy(rTokenVector.begin(), it->second.begin(), it->second.end()); -// NOTE : 레퍼런스에는 이런 식으로 하게끔 되어 있음 -/////////////////////////////////////////////////////////////////////////////// -// template -// OutputIterator copy(InputIterator first, InputIterator last, -// OutputIterator result); -// -// vector V(5); -// iota(V.begin(), V.end(), 1); -// list L(V.size()); -// copy(V.begin(), V.end(), L.begin()); -// assert(equal(V.begin(), V.end(), L.begin())); -/////////////////////////////////////////////////////////////////////////////// -// 헌데 그래도 튕김. - [levites] -// std::copy(it->second.begin(), it->second.end(), rTokenVector.begin()); + // NOTE: Crash issue discovered + // std::copy(rTokenVector.begin(), it->second.begin(), it->second.end()); + // NOTE: According to the reference, it's supposed to be done like this + /////////////////////////////////////////////////////////////////////////////// + // template + // OutputIterator copy(InputIterator first, InputIterator last, + // OutputIterator result); + // + // vector V(5); + // iota(V.begin(), V.end(), 1); + // list L(V.size()); + // copy(V.begin(), V.end(), L.begin()); + // assert(equal(V.begin(), V.end(), L.begin())); + /////////////////////////////////////////////////////////////////////////////// + // But it still crashes. - [levites] + // std::copy(it->second.begin(), it->second.end(), rTokenVector.begin()); -// 결국 이렇게.. - [levites] -// 현재 사용하는 곳 : WorldEditor/Dialog/MapObjectPropertyPageBuilding.cpp + // Ended up doing it this way.. - [levites] + // Current usage location: WorldEditor/Dialog/MapObjectPropertyPageBuilding.cpp CTokenVector & rSourceTokenVector = it->second; CTokenVector::iterator itor = rSourceTokenVector.begin(); for (; itor != rSourceTokenVector.end(); ++itor) @@ -102,7 +102,7 @@ void CProperty::PutString(const char * c_pszKey, const char * c_pszString) std::string stTempKey = c_pszKey; stl_lowers(stTempKey); - // 이미 있는걸 지움 + // Deleting/removing what already exists CTokenVectorMap::iterator itor = m_stTokenMap.find(stTempKey); if (itor != m_stTokenMap.end()) @@ -145,16 +145,17 @@ bool CProperty::ReadFromMemory(const void * c_pvData, int iLen, const char * c_p pcData += sizeof(DWORD); - if (*pcData != '\r' || *(pcData + 1) != '\n') - { + if ((*pcData == '\r' && *(pcData + 1) == '\n')) + pcData += 2; + else if (*pcData == '\n') + pcData += 1; + else { TraceError("CProperty::ReadFromMemory: File format error after FourCC: %s\n", c_pszFileName); return false; } - pcData += 2; - CTokenVector stTokenVector; -/* + /* char szTimeStamp[64]; memcpy(szTimeStamp, pcData, 14); szTimeStamp[14] = '\0';