DungeonCrawl
Loading...
Searching...
No Matches
character_database.h
Go to the documentation of this file.
1
5#ifndef CHARACTER_DATABASE_H
6#define CHARACTER_DATABASE_H
7
9#include "../database.h"
10
18void save_character(const db_connection_t* db_connection, const character_t character, const sqlite3_int64 game_state_id);
19
27void save_character_inventory(const db_connection_t* db_connection, const character_t character, const sqlite3_int64 character_id);
28
36void get_character_from_db(const db_connection_t* db_connection, character_t* character, int game_state_id);
37
38
39#endif//CHARACTER_DATABASE_H
Exposes functions for working working with the character.
void save_character(const db_connection_t *db_connection, const character_t character, const sqlite3_int64 game_state_id)
This function saves the character to the database.
void save_character_inventory(const db_connection_t *db_connection, const character_t character, const sqlite3_int64 character_id)
This function saves the character's inventory to the database.
void get_character_from_db(const db_connection_t *db_connection, character_t *character, int game_state_id)
This function retrieves a character from the database.
Exposes functions for working with the database.
This struct is used for the database connection in SQLite.
Definition database.h:22