mirror of
https://github.com/ondra-novak/gates_of_skeldal.git
synced 2025-07-13 18:02:01 -04:00
you can now visit caredbar!
This commit is contained in:
parent
bf59962724
commit
3b903e2b52
55 changed files with 953 additions and 1428 deletions
|
@ -29,6 +29,8 @@ void temp_storage_store(const char *name, const void *data, int32_t size) {
|
|||
auto &v =temp_fsystem[std::string(name)];
|
||||
v.clear();
|
||||
v.resize(size+1);
|
||||
v[size] = 0;
|
||||
v.resize(size);
|
||||
std::copy(b,e, v.begin());
|
||||
v[size] = 0;
|
||||
}
|
||||
|
@ -61,6 +63,8 @@ void temp_storage_clear() {
|
|||
TMPFILE_RD* temp_storage_open(const char *name) {
|
||||
auto iter = temp_fsystem.find(std::string_view(name));
|
||||
if (iter == temp_fsystem.end()) return NULL;
|
||||
iter->second.push_back(0); //put extra zero at the end
|
||||
iter->second.resize(iter->second.size()-1);
|
||||
return new TMPFILE_RD{std::basic_string_view<uint8_t>(iter->second.data(), iter->second.size())};
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue