Extend random name generator (#1551)

* Extend random name generator
* Format sources

Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
Peter Seprus 2022-08-07 17:28:04 +02:00 committed by GitHub
parent 67a9753f78
commit f3d7d7dba0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -12,15 +12,10 @@ void set_random_name(char* name, uint8_t max_name_size) {
rand_generator_inited = true; rand_generator_inited = true;
} }
const char* prefix[] = { const char* prefix[] = {
"ancient", "ancient", "hollow", "strange", "disappeared", "unknown",
"hollow", "unthinkable", "unnamable", "nameless", "my", "concealed",
"strange", "forgotten", "hidden", "mysterious", "obscure", "random",
"disappeared", "remote", "uncharted", "undefined", "untravelled", "untold",
"unknown",
"unthinkable",
"unnamable",
"nameless",
"my",
}; };
const char* suffix[] = { const char* suffix[] = {
@ -32,6 +27,10 @@ void set_random_name(char* name, uint8_t max_name_size) {
"entree", "entree",
"opening", "opening",
"crack", "crack",
"access",
"corridor",
"passage",
"port",
}; };
uint8_t prefix_i = rand() % COUNT_OF(prefix); uint8_t prefix_i = rand() % COUNT_OF(prefix);
uint8_t suffix_i = rand() % COUNT_OF(suffix); uint8_t suffix_i = rand() % COUNT_OF(suffix);