fixed compiler warnings
This commit is contained in:
+2
-3
@@ -392,7 +392,7 @@ bool Model::PullGlobalHighscore(std::stringstream &highscore_stream) {
|
||||
int bytes_sent;
|
||||
bytes_sent = SDLNet_TCP_Send (server_socket, http_query_string.c_str(), http_query_string.size());
|
||||
|
||||
if (bytes_sent != http_query_string.size()) {
|
||||
if (static_cast<unsigned int>(bytes_sent) != http_query_string.size()) {
|
||||
Engine::LogError ("SDL_net tcp send: %s", SDLNet_GetError());
|
||||
return false;
|
||||
}
|
||||
@@ -501,7 +501,7 @@ bool Model::SubmitGlobalHigscoreEntry (std::string name, const unsigned int poin
|
||||
int bytes_sent;
|
||||
bytes_sent = SDLNet_TCP_Send (server_socket, http_query_string.c_str(), http_query_string.size());
|
||||
|
||||
if (bytes_sent != http_query_string.size()) {
|
||||
if (static_cast<unsigned int>(bytes_sent) != http_query_string.size()) {
|
||||
Engine::LogError ("SDL_net tcp send: %s", SDLNet_GetError());
|
||||
return false;
|
||||
}
|
||||
@@ -800,7 +800,6 @@ void Model::OnLevelComplete() {
|
||||
// calculate the bonus points
|
||||
float level_time = roundf(mLevelTimeSeconds);
|
||||
float level_par_time = roundf(mLevelParTimeSeconds);
|
||||
int bonus_points = 0;
|
||||
|
||||
if (level_time <= level_par_time) {
|
||||
// secret time bonus formula
|
||||
|
||||
+1
-4
@@ -589,8 +589,6 @@ void View::DrawUiGameOver() {
|
||||
text_xpos,
|
||||
text_ypos);
|
||||
|
||||
const static int value_width = 10;
|
||||
|
||||
text_ypos += 48;
|
||||
|
||||
// ----- New Score -----
|
||||
@@ -781,7 +779,6 @@ void View::DrawUiLevelComplete() {
|
||||
|
||||
if (GetModel()->GetGameModified()) {
|
||||
SelectFont("console.ttf size=23 color=#cc0000");
|
||||
float width, height;
|
||||
std::string message ("* UNOFFICIAL GAME * UNOFFICIAL GAME * UNOFFICIAL GAME *");
|
||||
|
||||
float xpos = (screen_left) + 5;
|
||||
@@ -951,7 +948,7 @@ void View::DrawUiPlayerDied() {
|
||||
*/
|
||||
void View::DrawHighscoreEntry (float x, float y, float entry_width, const std::string &name, unsigned int points) {
|
||||
const float width_buffer = 30.;
|
||||
float width, height;
|
||||
float height;
|
||||
float name_width, points_value_width;
|
||||
|
||||
// Measure and draw the name
|
||||
|
||||
@@ -88,8 +88,8 @@ std::string find_game_data_dir () {
|
||||
paths.push_back("/usr/local/share/fysxasteroids");
|
||||
paths.push_back("/usr/share/fysxasteroids");
|
||||
|
||||
std::vector<std::string>::iterator iter = paths.begin();
|
||||
for (iter; iter != paths.end(); iter++) {
|
||||
std::vector<std::string>::iterator iter;
|
||||
for (iter = paths.begin(); iter != paths.end(); iter++) {
|
||||
std::string test_path = *iter;
|
||||
|
||||
if (!boost::filesystem::is_directory(test_path + "/data/fonts"))
|
||||
@@ -157,7 +157,6 @@ int main (int argc, char* argv[]) {
|
||||
Engine::SetMusicVolume (0.);
|
||||
|
||||
// Load the icon
|
||||
Uint32 colorkey;
|
||||
SDL_Surface *image = NULL;
|
||||
image = SDL_LoadBMP("./data/textures/icon.bmp");
|
||||
if (!image)
|
||||
|
||||
Reference in New Issue
Block a user