mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-11-30 16:29:12 +00:00
51 lines
No EOL
1.1 KiB
C
51 lines
No EOL
1.1 KiB
C
#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) {
|
|
const char* prefix[] = {
|
|
"super",
|
|
"big",
|
|
"little",
|
|
"liquid",
|
|
"unknown",
|
|
"thin",
|
|
"thick",
|
|
"great",
|
|
"my",
|
|
"mini",
|
|
"ultra",
|
|
"haupt",
|
|
"small",
|
|
"random",
|
|
"strange",
|
|
};
|
|
|
|
const char* suffix[] = {
|
|
"maslina",
|
|
"sus",
|
|
"anomalija",
|
|
"artefact",
|
|
"monolit",
|
|
"burer",
|
|
"sidorovich",
|
|
"habar",
|
|
"radar",
|
|
"borov",
|
|
"pda",
|
|
"konserva",
|
|
"aptechka",
|
|
"door",
|
|
"thing",
|
|
"stuff",
|
|
};
|
|
// 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);
|
|
|
|
snprintf(name, max_name_size, "%s_%s", prefix[prefix_i], suffix[suffix_i]);
|
|
// Set first symbol to upper case
|
|
name[0] = name[0] - 0x20;
|
|
} |