2021-07-25 11:34:54 +00:00
|
|
|
#include "random_name.h"
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <stdbool.h>
|
|
|
|
#include <furi.h>
|
|
|
|
|
|
|
|
void set_random_name(char* name, uint8_t max_name_size) {
|
2022-06-26 17:57:29 +00:00
|
|
|
const char* prefix[] = {
|
|
|
|
"super",
|
|
|
|
"big",
|
|
|
|
"little",
|
|
|
|
"liquid",
|
|
|
|
"unknown",
|
|
|
|
"thin",
|
|
|
|
"thick",
|
|
|
|
"great",
|
|
|
|
"my",
|
2022-09-21 05:43:07 +00:00
|
|
|
"mini",
|
|
|
|
"ultra",
|
|
|
|
"haupt",
|
|
|
|
"small",
|
|
|
|
"random",
|
|
|
|
"strange",
|
2022-06-26 17:57:29 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
const char* suffix[] = {
|
|
|
|
"maslina",
|
|
|
|
"sus",
|
|
|
|
"anomalija",
|
|
|
|
"artefact",
|
|
|
|
"monolit",
|
|
|
|
"burer",
|
|
|
|
"sidorovich",
|
|
|
|
"habar",
|
2022-09-21 05:43:07 +00:00
|
|
|
"radar",
|
|
|
|
"borov",
|
|
|
|
"pda",
|
|
|
|
"konserva",
|
|
|
|
"aptechka",
|
|
|
|
"door",
|
|
|
|
"thing",
|
|
|
|
"stuff",
|
2022-06-26 17:57:29 +00:00
|
|
|
};
|
|
|
|
// sus is not (sus)pect - this is about super sus
|
|
|
|
uint8_t prefix_i = rand() % COUNT_OF(prefix);
|
|
|
|
uint8_t suffix_i = rand() % COUNT_OF(suffix);
|
|
|
|
|
2022-08-03 16:00:17 +00:00
|
|
|
snprintf(name, max_name_size, "%s_%s", prefix[prefix_i], suffix[suffix_i]);
|
2022-06-26 17:57:29 +00:00
|
|
|
// Set first symbol to upper case
|
|
|
|
name[0] = name[0] - 0x20;
|
|
|
|
}
|