mirror of
https://github.com/GabsPuNs/Project-Zenith-Main.git
synced 2026-07-18 02:10:41 +00:00
Use SpriteSheets and move server.db and server.txt to "Data" folder.
This commit is contained in:
@@ -849,7 +849,7 @@ void UIScene_JoinMenu::UpdateServerInFile(const wstring& newIP, const wstring& n
|
||||
struct ServerEntry { std::string ip; uint16_t port; std::string name; };
|
||||
std::vector<ServerEntry> entries;
|
||||
|
||||
FILE* file = fopen("servers.db", "rb");
|
||||
FILE* file = fopen("Data\\servers.db", "rb");
|
||||
if (file)
|
||||
{
|
||||
char magic[4] = {};
|
||||
@@ -888,7 +888,7 @@ void UIScene_JoinMenu::UpdateServerInFile(const wstring& newIP, const wstring& n
|
||||
entries[idx].name = std::string(narrowNewName);
|
||||
}
|
||||
|
||||
file = fopen("servers.db", "wb");
|
||||
file = fopen("Data\\servers.db", "wb");
|
||||
if (file)
|
||||
{
|
||||
fwrite("MCSV", 1, 4, file);
|
||||
@@ -916,7 +916,7 @@ void UIScene_JoinMenu::RemoveServerFromFile()
|
||||
struct ServerEntry { std::string ip; uint16_t port; std::string name; };
|
||||
std::vector<ServerEntry> entries;
|
||||
|
||||
FILE* file = fopen("servers.db", "rb");
|
||||
FILE* file = fopen("Data\\servers.db", "rb");
|
||||
if (file)
|
||||
{
|
||||
char magic[4] = {};
|
||||
@@ -953,7 +953,7 @@ void UIScene_JoinMenu::RemoveServerFromFile()
|
||||
entries.erase(entries.begin() + idx);
|
||||
}
|
||||
|
||||
file = fopen("servers.db", "wb");
|
||||
file = fopen("Data\\servers.db", "wb");
|
||||
if (file)
|
||||
{
|
||||
fwrite("MCSV", 1, 4, file);
|
||||
|
||||
@@ -1673,7 +1673,7 @@ void UIScene_LoadCreateJoinMenu::CheckAndJoinGame(int gameIndex)
|
||||
#ifdef _WINDOWS64
|
||||
{
|
||||
int serverDbCount = 0;
|
||||
FILE* dbFile = fopen("servers.db", "rb");
|
||||
FILE* dbFile = fopen("Data\\servers.db", "rb");
|
||||
if (dbFile)
|
||||
{
|
||||
char magic[4] = {};
|
||||
@@ -1867,7 +1867,7 @@ void UIScene_LoadCreateJoinMenu::BeginAddServer()
|
||||
|
||||
void UIScene_LoadCreateJoinMenu::AppendServerToFile(const wstring& ip, const wstring& port, const wstring& name)
|
||||
{
|
||||
FILE* f = fopen("servers.db", "ab");
|
||||
FILE* f = fopen("Data\\servers.db", "ab");
|
||||
if (!f) return;
|
||||
|
||||
uint32_t version = 1;
|
||||
|
||||
Reference in New Issue
Block a user