diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2018-03-01 16:11:34 -0500 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2018-03-01 16:11:34 -0500 |
commit | 09a36afd0731b4565dc4628114e6cd76a42e8893 (patch) | |
tree | 764026074a42bbed1b7ed97e018550e039107b4d /database.cpp | |
parent | 473b327ceed3afb5e5683002b39fd9c1947cb25a (diff) | |
download | lunatic-09a36afd0731b4565dc4628114e6cd76a42e8893.tar.gz lunatic-09a36afd0731b4565dc4628114e6cd76a42e8893.tar.bz2 lunatic-09a36afd0731b4565dc4628114e6cd76a42e8893.zip |
Renamed "moon image" to color
Also moved color sprites to a resources directory.
Diffstat (limited to 'database.cpp')
-rw-r--r-- | database.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/database.cpp b/database.cpp index f8b5016..2885d1f 100644 --- a/database.cpp +++ b/database.cpp | |||
@@ -44,7 +44,7 @@ database::~database() | |||
44 | 44 | ||
45 | achievement database::getRandomAchievement() const | 45 | achievement database::getRandomAchievement() const |
46 | { | 46 | { |
47 | std::string queryString = "SELECT achievements.achievement_id, achievements.game_id, achievements.title, games.moon_image FROM achievements INNER JOIN games ON games.game_id = achievements.game_id ORDER BY RANDOM() LIMIT 1"; | 47 | std::string queryString = "SELECT achievements.achievement_id, achievements.game_id, achievements.title, games.color FROM achievements INNER JOIN games ON games.game_id = achievements.game_id ORDER BY RANDOM() LIMIT 1"; |
48 | 48 | ||
49 | sqlite3_stmt* ppstmt; | 49 | sqlite3_stmt* ppstmt; |
50 | if (sqlite3_prepare_v2( | 50 | if (sqlite3_prepare_v2( |
@@ -73,7 +73,7 @@ achievement database::getRandomAchievement() const | |||
73 | result.achievementId = sqlite3_column_int(ppstmt, 0); | 73 | result.achievementId = sqlite3_column_int(ppstmt, 0); |
74 | result.gameId = sqlite3_column_int(ppstmt, 1); | 74 | result.gameId = sqlite3_column_int(ppstmt, 1); |
75 | result.title = reinterpret_cast<const char*>(sqlite3_column_text(ppstmt, 2)); | 75 | result.title = reinterpret_cast<const char*>(sqlite3_column_text(ppstmt, 2)); |
76 | result.moonImage = reinterpret_cast<const char*>(sqlite3_column_text(ppstmt, 3)); | 76 | result.color = reinterpret_cast<const char*>(sqlite3_column_text(ppstmt, 3)); |
77 | 77 | ||
78 | sqlite3_finalize(ppstmt); | 78 | sqlite3_finalize(ppstmt); |
79 | 79 | ||