mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2026-04-27 12:31:47 +00:00
German + Czech tranlations + fs_sys_copy_file edit
This commit is contained in:
parent
77952291b8
commit
7ad271e138
4 changed files with 33 additions and 12 deletions
|
|
@ -18,6 +18,7 @@ DEBUG_FLY = "@ vstoupil do stavu volného letu"
|
|||
IMPORT_MOD_SUCCESS = "\\#a0ffa0\\Importován mod\n\\#dcdcdc\\'@'"
|
||||
IMPORT_DYNOS_SUCCESS = "\\#a0ffa0\\Importován DynOS pack\n\\#dcdcdc\\'@'"
|
||||
IMPORT_PALETTE_SUCCESS = "\\#a0ffa0\\Importované přednastavení palety\n\\#dcdcdc\\'@'"
|
||||
IMPORT_DATABASE_SUCCESS = "\\#a0ffa0\\Načtena databáze ovladačového mapování\n\\#dcdcdc\\'@'"
|
||||
IMPORT_FAIL = "\\#ffa0a0\\Chyba importu modu nebo DynOS packu\n\\#dcdcdc\\'@'"
|
||||
IMPORT_FAIL_INGAME = "\\#ffa0a0\\Nelze importovat mod, protože jste ve hře"
|
||||
COOPNET_CONNECTION_FAILED = "\\#ffa0a0\\Nezdařilo se připojit na CoopNet!"
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ DEBUG_FLY = "@ hat den Debug-Free-Fly-Modus aktiviert."
|
|||
IMPORT_MOD_SUCCESS = "\\#a0ffa0\\Mod erfolgreich importiert\n\\#dcdcdc\\'@'"
|
||||
IMPORT_DYNOS_SUCCESS = "\\#a0ffa0\\DynOS-Paket erfolgreich importiert\n\\#dcdcdc\\'@'"
|
||||
IMPORT_PALETTE_SUCCESS = "\\#a0ffa0\\Paletten-Voreinstellung erfolgreich importiert\n\\#dcdcdc\\'@'"
|
||||
IMPORT_DATABASE_SUCCESS = "\\#a0ffa0\\Controller-Zuordnungsdatenbank importiert\n\\#dcdcdc\\'@'"
|
||||
IMPORT_FAIL = "\\#ffa0a0\\Importierung fehlgeschlagen\n\\#dcdcdc\\'@'"
|
||||
IMPORT_FAIL_INGAME = "\\#ffa0a0\\Ein Fehler beim Importieren ist aufgetreten."
|
||||
COOPNET_CONNECTION_FAILED = "\\#ffa0a0\\Es konnte keine Verbindung zu CoopNet hergestellt werden!"
|
||||
|
|
|
|||
|
|
@ -310,20 +310,12 @@ static char* path_basename(char* path) {
|
|||
}
|
||||
|
||||
bool fs_sys_copy_file(char* src, const char* dir) {
|
||||
const char* directory = fs_get_write_path(dir);
|
||||
fs_sys_mkdir(directory);
|
||||
|
||||
char dst[SYS_MAX_PATH] = { 0 };
|
||||
if (!concat_path(dst, (char*)directory, path_basename(src))) {
|
||||
return false;
|
||||
}
|
||||
|
||||
FILE* fin = fopen(src, "rb");
|
||||
if (fin == NULL) {
|
||||
return false;
|
||||
}
|
||||
|
||||
FILE* fout = fopen(dst, "wb");
|
||||
FILE* fout = fopen(dir, "wb");
|
||||
if (fout == NULL) {
|
||||
fclose(fin);
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -11,7 +11,16 @@
|
|||
#include "mods_utils.h"
|
||||
|
||||
static bool mod_import_lua(char* src) {
|
||||
bool success = fs_sys_copy_file(src, MOD_DIRECTORY);
|
||||
const char* modDirectory = fs_get_write_path(MOD_DIRECTORY);
|
||||
fs_sys_mkdir(modDirectory);
|
||||
|
||||
char dst[SYS_MAX_PATH] = { 0 };
|
||||
if (!concat_path(dst, (char*)modDirectory, path_basename(src))) {
|
||||
LOG_ERROR("Failed to concat lua mod directory");
|
||||
return false;
|
||||
}
|
||||
|
||||
bool success = fs_sys_copy_file(src, dst);
|
||||
|
||||
if (!success) {
|
||||
LOG_ERROR("Failed to import lua mod file");
|
||||
|
|
@ -23,7 +32,16 @@ static bool mod_import_lua(char* src) {
|
|||
}
|
||||
|
||||
static bool mod_import_palette(char* src) {
|
||||
bool success = fs_sys_copy_file(src, PALETTES_DIRECTORY);
|
||||
const char* paletteDirectory = fs_get_write_path(PALETTES_DIRECTORY);
|
||||
fs_sys_mkdir(paletteDirectory);
|
||||
|
||||
char dst[SYS_MAX_PATH] = { 0 };
|
||||
if (!concat_path(dst, (char*)paletteDirectory, path_basename(src))) {
|
||||
LOG_ERROR("Failed to concat palette preset directory");
|
||||
return false;
|
||||
}
|
||||
|
||||
bool success = fs_sys_copy_file(src, dst);
|
||||
|
||||
if (!success) {
|
||||
LOG_ERROR("Failed to import palette preset file");
|
||||
|
|
@ -35,7 +53,16 @@ static bool mod_import_palette(char* src) {
|
|||
}
|
||||
|
||||
static bool mod_import_database(char* src) {
|
||||
bool success = fs_sys_copy_file(src, DATABASES_DIRECTORY);
|
||||
const char* databasesDirectory = fs_get_write_path(DATABASES_DIRECTORY);
|
||||
fs_sys_mkdir(databasesDirectory);
|
||||
|
||||
char dst[SYS_MAX_PATH] = { 0 };
|
||||
if (!concat_path(dst, (char*)databasesDirectory, path_basename(src))) {
|
||||
LOG_ERROR("Failed to concat controller database directory");
|
||||
return false;
|
||||
}
|
||||
|
||||
bool success = fs_sys_copy_file(src, dst);
|
||||
|
||||
if (!success) {
|
||||
LOG_ERROR("Failed to import controller database file");
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue