mirror of
https://github.com/GabsPuNs/Project-Zenith-Main.git
synced 2026-07-10 17:38:10 +00:00
Use SpriteSheets and move server.db and server.txt to "Data" folder.
This commit is contained in:
@@ -1190,11 +1190,11 @@ int APIENTRY _tWinMain(_In_ HINSTANCE hInstance,
|
||||
MultiByteToWideChar(CP_ACP, 0, g_Win64Username, -1, g_Win64UsernameW, 17);
|
||||
|
||||
// convert servers.txt to servers.db
|
||||
if (GetFileAttributesA("servers.txt") != INVALID_FILE_ATTRIBUTES &&
|
||||
GetFileAttributesA("servers.db") == INVALID_FILE_ATTRIBUTES)
|
||||
if (GetFileAttributesA("Data\\servers.txt") != INVALID_FILE_ATTRIBUTES &&
|
||||
GetFileAttributesA("Data\\servers.db") == INVALID_FILE_ATTRIBUTES)
|
||||
{
|
||||
FILE* txtFile = nullptr;
|
||||
if (fopen_s(&txtFile, "servers.txt", "r") == 0 && txtFile)
|
||||
if (fopen_s(&txtFile, "Data\\servers.txt", "r") == 0 && txtFile)
|
||||
{
|
||||
struct MigEntry { std::string ip; uint16_t port; std::string name; };
|
||||
std::vector<MigEntry> migEntries;
|
||||
@@ -1232,7 +1232,7 @@ int APIENTRY _tWinMain(_In_ HINSTANCE hInstance,
|
||||
if (!migEntries.empty())
|
||||
{
|
||||
FILE* dbFile = nullptr;
|
||||
if (fopen_s(&dbFile, "servers.db", "wb") == 0 && dbFile)
|
||||
if (fopen_s(&dbFile, "Data\\servers.db", "wb") == 0 && dbFile)
|
||||
{
|
||||
fwrite("MCSV", 1, 4, dbFile);
|
||||
uint32_t ver = 1;
|
||||
|
||||
Reference in New Issue
Block a user