Integrate RenderEngine to Core

This commit is contained in:
Jiga228
2025-09-16 21:56:34 +07:00
parent f15c8b09cd
commit 25cc75ba69
10 changed files with 93 additions and 106 deletions
+1
View File
@@ -66,4 +66,5 @@ void GameInstance::start()
void GameInstance::quit()
{
is_running = false;
core.quit();
}
+13 -5
View File
@@ -66,7 +66,11 @@ SaveMap::SaveMap(const std::string& json_data)
size_t begin = json_data.find(':', i) + 2;
size_t end = i = json_data.find('\"', begin);
i++;
std::string value = json_data.substr(begin, end - begin);
std::string value;
if (begin != end)
value = json_data.substr(begin, end - begin);
else
value = "";
save_string[name.c_str() + 1] = value;
} else if (name[0] == 'o')
{
@@ -147,12 +151,16 @@ SaveMap::SaveMap(const std::string& json_data)
continue;
std::vector<std::string>& vector_strings = save_vector_strings[key];
size_t j = 2;
size_t j = 0;
while (j < arr_data.length())
{
size_t begin = j;
size_t end = j = arr_data.find('\"', begin + 1);
std::string value = arr_data.substr(begin, end - begin);
size_t begin = arr_data.find('\"', j) + 1;
size_t end = j = arr_data.find('\"', begin);
std::string value;
if (begin != end)
value = arr_data.substr(begin, end - begin);
else
value = "";
vector_strings.push_back(value);
j += 3;
}