diff --git a/src/engine/client/gfx.cpp b/src/engine/client/gfx.cpp index 657d92f00..ba908c68b 100644 --- a/src/engine/client/gfx.cpp +++ b/src/engine/client/gfx.cpp @@ -49,7 +49,7 @@ static const int MAX_TEXTURES = 128; static texture_holder textures[MAX_TEXTURES]; static int first_free_texture; -static const char null_texture_data[] = { +static const unsigned char null_texture_data[] = { 0xff,0x00,0x00,0xff, 0xff,0x00,0x00,0xff, 0x00,0xff,0x00,0xff, 0x00,0xff,0x00,0xff, 0xff,0x00,0x00,0xff, 0xff,0x00,0x00,0xff, 0x00,0xff,0x00,0xff, 0x00,0xff,0x00,0xff, 0x00,0x00,0xff,0xff, 0x00,0x00,0xff,0xff, 0xff,0xff,0x00,0xff, 0xff,0xff,0x00,0xff, diff --git a/src/engine/datafile.cpp b/src/engine/datafile.cpp index 789aa7226..5c0648193 100644 --- a/src/engine/datafile.cpp +++ b/src/engine/datafile.cpp @@ -68,7 +68,7 @@ datafile *datafile_load(const char *filename) // TODO: change this header int header[4]; file.read(header, sizeof(header)); - if(((header[0]>>24)&0xff) != 'D' || ((header[0]>>16)&0xff) != 'A' || (header[0]>>8)&0xff != 'T' || (header[0]&0xff)!= 'A') + if(((header[0]>>24)&0xff) != 'D' || ((header[0]>>16)&0xff) != 'A' || ((header[0]>>8)&0xff) != 'T' || (header[0]&0xff) != 'A') { dbg_msg("datafile", "wrong signature. %x %x %x %x", header[0], header[1], header[2], header[3]); return 0; diff --git a/src/engine/network.cpp b/src/engine/network.cpp index 5402aee7d..e95022f96 100644 --- a/src/engine/network.cpp +++ b/src/engine/network.cpp @@ -305,7 +305,7 @@ static int conn_feed(NETCONNECTION *conn, NETPACKETDATA *p, NETADDR4 *addr) else if(conn->state == NETWORK_CONNSTATE_CONNECT) { // connection made - if(p->flags == NETWORK_PACKETFLAG_CONNECT|NETWORK_PACKETFLAG_ACCEPT) + if(p->flags == (NETWORK_PACKETFLAG_CONNECT|NETWORK_PACKETFLAG_ACCEPT)) { conn_send(conn, NETWORK_PACKETFLAG_ACCEPT, 0, 0); conn->state = NETWORK_CONNSTATE_ONLINE; diff --git a/src/game/client/menu.cpp b/src/game/client/menu.cpp index c8c41e4b2..acb4ebfbe 100644 --- a/src/game/client/menu.cpp +++ b/src/game/client/menu.cpp @@ -1024,13 +1024,13 @@ static int editor_screen_render() // less if (ui_do_button((void *)(200 + i * 2), "", 0, 650, 35 * i + 10 + 15, 16, 16, draw_single_part_button, (void *)slider_big_arrow_left)) { - current_font->m_CharStartTable[(int)s[0]] -= 0.01; + current_font->m_CharStartTable[(int)s[0]] -= 0.01f; } // more if (ui_do_button((void *)(200 + i * 2 + 1), "", 0, 666, 35 * i + 10 + 15, 16, 16, draw_single_part_button, (void *)slider_big_arrow_right)) { - current_font->m_CharStartTable[(int)s[0]] += 0.01; + current_font->m_CharStartTable[(int)s[0]] += 0.01f; } char num[16]; @@ -1043,13 +1043,13 @@ static int editor_screen_render() // less if (ui_do_button((void *)(300 + i * 2), "", 0, 750, 35 * i + 10 + 15, 16, 16, draw_single_part_button, (void *)slider_big_arrow_left)) { - current_font->m_CharEndTable[(int)s[0]] -= 0.01; + current_font->m_CharEndTable[(int)s[0]] -= 0.01f; } // more if (ui_do_button((void *)(300 + i * 2 + 1), "", 0, 766, 35 * i + 10 + 15, 16, 16, draw_single_part_button, (void *)slider_big_arrow_right)) { - current_font->m_CharEndTable[(int)s[0]] += 0.01; + current_font->m_CharEndTable[(int)s[0]] += 0.01f; } sprintf(num, "(%f)", current_font->m_CharEndTable[(int)s[0]]); diff --git a/src/game/game.h b/src/game/game.h index a14718879..9b21a4ede 100644 --- a/src/game/game.h +++ b/src/game/game.h @@ -18,7 +18,7 @@ inline float get_angle(baselib::vec2 dir) return a; } -inline bool col_check_point(float x, float y) { return col_check_point((int)x, (int)y); } +inline bool col_check_point(float x, float y) { return col_check_point((int)x, (int)y) != 0; } inline bool col_check_point(baselib::vec2 p) { return col_check_point(p.x, p.y); } // Network stuff diff --git a/src/game/server/game_server.cpp b/src/game/server/game_server.cpp index 88cbb471c..f86b56af6 100644 --- a/src/game/server/game_server.cpp +++ b/src/game/server/game_server.cpp @@ -516,7 +516,7 @@ public: if(num) { mapres_spawnpoint *sp = (mapres_spawnpoint*)map_get_item(start + (rand()%num), NULL, NULL); - pos = vec2(sp->x, sp->y); + pos = vec2((float)sp->x, (float)sp->y); } else pos = vec2(100.0f, -60.0f);