Use SpriteSheets and move server.db and server.txt to "Data" folder.

This commit is contained in:
GabsPuNs
2026-06-21 19:18:22 -04:00
parent 0c38270b29
commit 578d7dd90e
48 changed files with 153 additions and 162 deletions

View File

@@ -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);

View 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;