Skip to content
Snippets Groups Projects
Commit ae2079ac authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

text.dat string IDs can now be used in/as @-codes, directly

The TEXT:<x> @-code can now be used with the text.dat string ID rather than
the text.dat string number, if preferred.

For convenience and brevity, ALL text.dat string IDs are now valid @-codes
(case-sensitive). While this functionality is redundant with the TEXT: @-code
now, if there are any conflicts between new/existing @-codes and text.dat
string IDs, the TEXT: @-code can be used to overcome such conflicts.

This should help with localization (to other languages) by using common
single-word replacements (Which, Quit, Next, etc.) in text.dat strings.
parent 6aabd11d
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #4754 failed
...@@ -918,7 +918,8 @@ const char* sbbs_t::atcode(char* sp, char* str, size_t maxlen, int* pmode, bool ...@@ -918,7 +918,8 @@ const char* sbbs_t::atcode(char* sp, char* str, size_t maxlen, int* pmode, bool
i = atoi(sp + 5); i = atoi(sp + 5);
if(i >= 1 && i <= TOTAL_TEXT) if(i >= 1 && i <= TOTAL_TEXT)
return text[i - 1]; return text[i - 1];
return nulstr; else
return gettext(sp + 5);
} }
/* NOSTOP */ /* NOSTOP */
...@@ -2188,6 +2189,5 @@ const char* sbbs_t::atcode(char* sp, char* str, size_t maxlen, int* pmode, bool ...@@ -2188,6 +2189,5 @@ const char* sbbs_t::atcode(char* sp, char* str, size_t maxlen, int* pmode, bool
} }
} }
return NULL; return gettext(sp);
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment