improve proj

- remove VTImage.hpp to make sure stb image do not need external project to ref.
- finish CKStateChunk write part. add some compatibilty code.
- add debugger pause function
- add filename getter for CKPathManager.
This commit is contained in:
2023-09-24 20:56:23 +08:00
parent 6870fca911
commit b2d0b743cb
15 changed files with 96 additions and 52 deletions

View File

@ -284,12 +284,12 @@ namespace LibCmo::CK2 {
CKFileVisitor::CKFileVisitor(CKFileReader* reader) :
m_IsReader(true), m_Reader(reader), m_Writer(nullptr), m_Ctx(reader->m_Ctx) {
if (reader == nullptr) LIBPANIC("Reader is nullptr.");
if (reader == nullptr) LIBCMO_PANIC("Reader is nullptr.");
}
CKFileVisitor::CKFileVisitor(CKFileWriter* writer) :
m_IsReader(false), m_Reader(nullptr), m_Writer(writer), m_Ctx(writer->m_Ctx) {
if (writer == nullptr) LIBPANIC("Writer is nullptr.");
if (writer == nullptr) LIBCMO_PANIC("Writer is nullptr.");
}
CKFileVisitor::CKFileVisitor(const CKFileVisitor& rhs) :
@ -316,7 +316,7 @@ namespace LibCmo::CK2 {
return *this;
}
const CKFileObject* CKFileVisitor::GetFileObjectByIndex(size_t index) {
const CKFileObject* CKFileVisitor::GetFileObjectByIndex(CKDWORD index) {
if (m_IsReader) {
return &m_Reader->m_FileObjects[index];
} else {