blob: b3e60a0e7eaeb35982c2b9310fecba99232b3344 (
plain) (
tree)
|
|
#ifndef LOGIN_H
#define LOGIN_H
enum login_state {
LoggedOut,
EnterPassword,
WantMakeAccount,
MakePassword,
MakeConfirmPassword,
Complete
};
typedef struct player {
int xp;
int hp;
int max_hp;
int level;
int location_id;
char *pw_hash;
char *name;
} player_t;
typedef struct player_conn {
int conn;
enum login_state state;
player_t plr;
} playerc_t;
int step_login(playerc_t *player, int conn_fd);
void handle_player(int conn_fd);
#endif
|