mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-07-13 16:46:00 +00:00
Windows fixes
This commit is contained in:
parent
b94e14cd55
commit
58e394d5df
@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.0)
|
|||||||
project(PathShagged)
|
project(PathShagged)
|
||||||
if(MSVC)
|
if(MSVC)
|
||||||
# Shaddup MSVC
|
# Shaddup MSVC
|
||||||
add_definitions(-DUNICODE=1 -D_UNICODE=1 -D_CRT_SECURE_NO_WARNINGS=1 -DD_SCL_SECURE_NO_WARNINGS=1 /wd4267 /wd4244 /wd4305)
|
add_definitions(-DUNICODE=1 -D_UNICODE=1 -D__SSE__=1 -D_CRT_SECURE_NO_WARNINGS=1 -DD_SCL_SECURE_NO_WARNINGS=1 /wd4267 /wd4244 /wd4305)
|
||||||
else()
|
else()
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -Wno-multichar -fno-exceptions")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -Wno-multichar -fno-exceptions")
|
||||||
endif()
|
endif()
|
||||||
|
@ -1137,7 +1137,7 @@ bool WriteCMDL(const HECL::ProjectPath& outPath, const HECL::ProjectPath& inPath
|
|||||||
const HECL::SystemString& relPath = path.getRelativePath();
|
const HECL::SystemString& relPath = path.getRelativePath();
|
||||||
|
|
||||||
/* TODO: incorporate hecl hashes */
|
/* TODO: incorporate hecl hashes */
|
||||||
size_t search = relPath.find("TXTR_");
|
size_t search = relPath.find(_S("TXTR_"));
|
||||||
if (search != HECL::SystemString::npos)
|
if (search != HECL::SystemString::npos)
|
||||||
targetMSet.addTexture(relPath.c_str() + search + 5);
|
targetMSet.addTexture(relPath.c_str() + search + 5);
|
||||||
else
|
else
|
||||||
|
@ -87,6 +87,13 @@ public:
|
|||||||
copy[8] = '\0';
|
copy[8] = '\0';
|
||||||
m_id = strtoul(copy, nullptr, 16);
|
m_id = strtoul(copy, nullptr, 16);
|
||||||
}
|
}
|
||||||
|
UniqueID32(const wchar_t* hexStr)
|
||||||
|
{
|
||||||
|
wchar_t copy[9];
|
||||||
|
wcsncpy(copy, hexStr, 8);
|
||||||
|
copy[8] = L'\0';
|
||||||
|
m_id = wcstoul(copy, nullptr, 16);
|
||||||
|
}
|
||||||
|
|
||||||
static constexpr size_t BinarySize() {return 4;}
|
static constexpr size_t BinarySize() {return 4;}
|
||||||
};
|
};
|
||||||
@ -131,7 +138,22 @@ public:
|
|||||||
char copy[17];
|
char copy[17];
|
||||||
strncpy(copy, hexStr, 16);
|
strncpy(copy, hexStr, 16);
|
||||||
copy[16] = '\0';
|
copy[16] = '\0';
|
||||||
|
#if _WIN32
|
||||||
|
m_id = _strtoui64(copy, nullptr, 16);
|
||||||
|
#else
|
||||||
m_id = strtouq(copy, nullptr, 16);
|
m_id = strtouq(copy, nullptr, 16);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
UniqueID64(const wchar_t* hexStr)
|
||||||
|
{
|
||||||
|
wchar_t copy[17];
|
||||||
|
wcsncpy(copy, hexStr, 16);
|
||||||
|
copy[16] = L'\0';
|
||||||
|
#if _WIN32
|
||||||
|
m_id = _wcstoui64(copy, nullptr, 16);
|
||||||
|
#else
|
||||||
|
m_id = wcstouq(copy, nullptr, 16);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static constexpr size_t BinarySize() {return 8;}
|
static constexpr size_t BinarySize() {return 8;}
|
||||||
|
@ -151,7 +151,11 @@ void PAKBridge::build()
|
|||||||
HECL::SNPrintf(num, 16, _S("%02u "), ai);
|
HECL::SNPrintf(num, 16, _S("%02u "), ai);
|
||||||
areaDeps.name = num + areaDeps.name;
|
areaDeps.name = num + areaDeps.name;
|
||||||
|
|
||||||
|
#if HECL_UCS2
|
||||||
|
std::string lowerName = HECL::WideToUTF8(areaDeps.name);
|
||||||
|
#else
|
||||||
std::string lowerName(areaDeps.name);
|
std::string lowerName(areaDeps.name);
|
||||||
|
#endif
|
||||||
for (char& ch : lowerName)
|
for (char& ch : lowerName)
|
||||||
{
|
{
|
||||||
ch = tolower(ch);
|
ch = tolower(ch);
|
||||||
|
2
MathLib
2
MathLib
@ -1 +1 @@
|
|||||||
Subproject commit 8937bfc0c61e8e0f2d4a43026b49e5ef2025160d
|
Subproject commit fca8742f99a012d4681fa622707d92dfa6152c87
|
@ -167,7 +167,7 @@ void CMain::LoadAudio()
|
|||||||
int CMain::appMain(boo::IApplication* app)
|
int CMain::appMain(boo::IApplication* app)
|
||||||
{
|
{
|
||||||
Zeus::detectCPU();
|
Zeus::detectCPU();
|
||||||
mainWindow = app->newWindow("Metroid Prime 1 Reimplementation vZygote");
|
mainWindow = app->newWindow(_S("Metroid Prime 1 Reimplementation vZygote"));
|
||||||
mainWindow->showWindow();
|
mainWindow->showWindow();
|
||||||
TOneStatic<CGameGlobalObjects> globalObjs;
|
TOneStatic<CGameGlobalObjects> globalObjs;
|
||||||
InitializeSubsystems();
|
InitializeSubsystems();
|
||||||
|
2
hecl
2
hecl
@ -1 +1 @@
|
|||||||
Subproject commit e42eecf2370a0e7dcd002ce7799f2e1f32c95573
|
Subproject commit 8e82d2d42b1411f7cc110a2151f22af850a1f1e9
|
Loading…
x
Reference in New Issue
Block a user