This commit is contained in:
Ondřej Novák 2025-04-06 20:21:41 +02:00
commit 4fa01c46aa
2 changed files with 4 additions and 4 deletions

View file

@ -5,7 +5,7 @@ project(skeldal)
find_package(SDL2 REQUIRED)
if (MSVC)
add_compile_options(/W4 /EHa /DNOMINMAX /J)
add_compile_options(/W4 /EHa /DNOMINMAX /D_CRT_SECURE_NO_WARNINGS /J)
set(STANDARD_LIBRARIES "")
else()
add_compile_options(-Wall -Wextra -Werror -Wno-unused-result -Wno-unused-parameter -Wno-unused-value -Wno-extern-c-compat -funsigned-char)

View file

@ -49,10 +49,10 @@ void new_ddl(std::string ddl_file, std::string path) {
while (iter != end) {
const auto &entry = *iter;
if (entry.is_regular_file()) {
uint32_t sz = entry.file_size();
uint32_t sz = static_cast<uint32_t>(entry.file_size());
std::string fname = entry.path().filename().string();
if (fname.size() <= 12) {
std::transform(fname.begin(), fname.end(), fname.begin(),[](char c)->char{return std::toupper(c);});
std::transform(fname.begin(), fname.end(), fname.begin(),[](char c)->char{return static_cast<char>(std::toupper(c));});
dir.push_back(DirEntry{entry.path(), fname, sz,0});
}
}
@ -67,7 +67,7 @@ void new_ddl(std::string ddl_file, std::string path) {
std::size_t dataofs = 8 + dir.size()*(12+4);
for (auto &x: dir) {
x.offset = dataofs;
x.offset = static_cast<std::uint32_t>(dataofs);
dataofs+=4+x.size;
}