2021-04-22 13:17:04 +08:00
|
|
|
/*
|
|
|
|
|
* sfall
|
2022-12-31 10:01:57 +08:00
|
|
|
* Copyright (C) 2008-2023 The sfall team
|
2021-04-22 13:17:04 +08:00
|
|
|
*
|
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
|
* (at your option) any later version.
|
|
|
|
|
*
|
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
|
*
|
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
2021-10-21 11:36:11 +08:00
|
|
|
namespace sfall
|
|
|
|
|
{
|
|
|
|
|
|
2021-11-15 21:59:26 +08:00
|
|
|
class Translate {
|
|
|
|
|
public:
|
|
|
|
|
static void init(const char* config);
|
2021-04-22 13:17:04 +08:00
|
|
|
|
2021-11-15 21:59:26 +08:00
|
|
|
// Translates given string using sfall translation INI file and puts the result into given buffer
|
2021-11-25 09:20:48 +08:00
|
|
|
static size_t Get(const char* section, const char* setting, const char* defaultValue, char* buffer, size_t bufSize = 128);
|
2021-04-22 13:17:04 +08:00
|
|
|
|
2021-11-15 21:59:26 +08:00
|
|
|
// Translates given string using sfall translation INI file
|
2021-11-25 09:20:48 +08:00
|
|
|
static std::string Get(const char* section, const char* setting, const char* defaultValue, size_t bufSize = 128);
|
2021-04-22 13:17:04 +08:00
|
|
|
|
2021-11-15 21:59:26 +08:00
|
|
|
// Translates given list of strings using sfall translation INI file
|
2021-11-25 09:20:48 +08:00
|
|
|
static std::vector<std::string> GetList(const char* section, const char* setting, const char* defaultValue, char delimiter, size_t bufSize = 256);
|
2021-04-22 13:17:04 +08:00
|
|
|
|
2021-11-15 21:59:26 +08:00
|
|
|
/* Messages */
|
2021-04-22 13:17:04 +08:00
|
|
|
|
2021-11-15 21:59:26 +08:00
|
|
|
// SaveSfallDataFail: "ERROR saving extended savegame information!"
|
|
|
|
|
static const char* SfallSaveDataFailure();
|
2021-04-22 13:17:04 +08:00
|
|
|
|
2021-11-15 21:59:26 +08:00
|
|
|
// SaveInCombat: "Cannot save at this time."
|
|
|
|
|
static const char* CombatSaveBlockMessage();
|
2021-04-22 13:17:04 +08:00
|
|
|
|
2021-11-15 21:59:26 +08:00
|
|
|
// BlockedCombat: "You cannot enter combat at this time."
|
|
|
|
|
static const char* CombatBlockMessage();
|
|
|
|
|
};
|
2021-10-21 11:36:11 +08:00
|
|
|
|
|
|
|
|
}
|