-
Notifications
You must be signed in to change notification settings - Fork 1
/
user.h
53 lines (43 loc) · 962 Bytes
/
user.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
//
// Created by hamster on 7/19/18.
//
#ifndef DC27_BADGE_USER_H
#define DC27_BADGE_USER_H
#include <stdint.h>
#include <stdbool.h>
typedef enum {
CLAN_MARVWASHERE,
CLAN_HELGA,
CLAN_801LABS,
CLAN_THETRANSISTOR,
CLAN_RAM,
CLAN_BADGELIFE,
CLAN_ADMIN
} CLAN;
typedef struct {
CLAN clan;
char* name;
char* filename;
} CLAN_STRUCT;
typedef struct __attribute__ ((__packed__)) {
uint8_t configured : 1;
char name[11];
uint32_t score;
CLAN clan;
int16_t modifier;
uint32_t nemusAdventure;
bool wargameUnlock;
} USER;
void loadUser(void);
void storeUser(void);
void userConfigure(void);
char* getClanFile(CLAN clan);
char* getClanName(CLAN clan);
int getTempScoreModifier(void);
void setTempScoreModifier(int);
void addTempScoreModifier(int modifier);
int getTotalScoreModifier(void);
extern USER user;
#define FIRST_ALLOWED_CHAR ' '
#define LAST_ALLOWED_CHAR '~'
#endif //DC27_BADGE_USER_H