fixed compiler warnings
parent
40a11244dd
commit
99f3a4dfff
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -186,7 +186,7 @@ void CommandSetErrorString (const std::string &error_str){
|
|||
|
||||
std::string CommandGetErrorString (){
|
||||
if (!CommandsInitialized ())
|
||||
return false;
|
||||
return std::string("");
|
||||
|
||||
return CommandsInstance->GetErrorString();
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ bool regionhit (int x, int y, int w, int h) {
|
|||
|
||||
void DrawBlock (int x, int y, int w, int h) {
|
||||
const float shading_dark = 0.5f;
|
||||
const float shading_light = 1.3f;
|
||||
// const float shading_light = 1.3f;
|
||||
|
||||
float color[4];
|
||||
glGetFloatv (GL_CURRENT_COLOR, color);
|
||||
|
@ -297,6 +297,8 @@ bool Button (int id, const char* caption, int x, int y, int w, int h) {
|
|||
controller->uistate.kbditem = 0;
|
||||
return true;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -418,6 +420,8 @@ bool CheckButton (int id, const char* caption, bool checked, int x, int y, int w
|
|||
|
||||
return true;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -541,7 +545,7 @@ bool LineEdit (int id, int x, int y, std::string &text_value, const int &maxleng
|
|||
break;
|
||||
default:
|
||||
// The raw input processing
|
||||
if (maxlength > 0 && text_value.size() < maxlength) {
|
||||
if (maxlength > 0 && static_cast<int>(text_value.size()) < maxlength) {
|
||||
if (controller->uistate.last_unicode) {
|
||||
if ((controller->uistate.last_unicode & 0xFF80) == 0) {
|
||||
// we do not want to add special characters such as backspaces
|
||||
|
@ -681,7 +685,7 @@ bool LineEditMasked (int id, int x, int y, std::string &text_value, const int &m
|
|||
break;
|
||||
default:
|
||||
// The raw input processing
|
||||
if (maxlength > 0 && text_value.size() < maxlength) {
|
||||
if (maxlength > 0 && static_cast<int>(text_value.size()) < maxlength) {
|
||||
if (controller->uistate.last_unicode) {
|
||||
if ((controller->uistate.last_unicode & 0xFF80) == 0) {
|
||||
char c = controller->uistate.last_unicode & 0x7F;
|
||||
|
@ -789,6 +793,8 @@ float VerticalSlider (int id, int x, int y, int w, int h, float min_value, float
|
|||
controller->uistate.last_keysym = SDLK_CLEAR;
|
||||
return true;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -11,8 +11,8 @@ class Module;
|
|||
class SoundSample {
|
||||
public:
|
||||
SoundSample() :
|
||||
mMixChunk (NULL),
|
||||
mChannel (-1) {
|
||||
mChannel (-1),
|
||||
mMixChunk (NULL) {
|
||||
}
|
||||
~SoundSample();
|
||||
|
||||
|
|
Loading…
Reference in New Issue