summaryrefslogtreecommitdiff
path: root/src/ai/ai_instance.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ai/ai_instance.cpp')
-rw-r--r--src/ai/ai_instance.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/ai/ai_instance.cpp b/src/ai/ai_instance.cpp
index 4a0924995..a1dc69d07 100644
--- a/src/ai/ai_instance.cpp
+++ b/src/ai/ai_instance.cpp
@@ -87,6 +87,11 @@ AIStorage::~AIStorage()
if (log_data != NULL) AILog::FreeLogPointer();
}
+/**
+ * Callback called by squirrel when an AI uses "print" and for error messages.
+ * @param error_msg Is this an error message?
+ * @param message The actual message text.
+ */
static void PrintFunc(bool error_msg, const SQChar *message)
{
/* Convert to OpenTTD internal capable string */
@@ -453,8 +458,9 @@ enum SQSaveLoadType {
SQSL_ARRAY_TABLE_END = 0xFF, ///< Marks the end of an array or table, no data follows.
};
-static byte _ai_sl_byte;
+static byte _ai_sl_byte; //!< Used as source/target by the AI saveload code to store/load a single byte.
+/** SaveLoad array that saves/loads exactly one byte. */
static const SaveLoad _ai_byte[] = {
SLEG_VAR(_ai_sl_byte, SLE_UINT8),
SLE_END()