Changeset 364 for trunk/src


Ignore:
Timestamp:
05/15/15 12:52:52 (10 years ago)
Author:
epyon
Message:
  • fixed compilation on clang
  • cleared all clang warnings (except fix_me's)
Location:
trunk/src
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/engine/resource_system.cc

    r361 r364  
    1212{
    1313        m_lua = a_lua_state;
    14         std::string constructor_name( get_resource_name() );
    15         constructor_name = "register_"+constructor_name;
    16         int correct = 0;
    17         lua::register_storage( m_lua, get_storage_name(), constructor_name );
     14        lua::register_storage( m_lua, get_storage_name(), "register_" + get_resource_name().to_string() );
    1815}
    1916
  • trunk/src/gl/gl_context.cc

    r342 r364  
    734734                if ( slots[i] > OUTPUT_7 ) buffers[i] = 0;
    735735        }
    736         glDrawBuffers( count, buffers );
     736        glDrawBuffers( (GLsizei)count, buffers );
    737737}
    738738
  • trunk/src/gl/gl_device.cc

    r361 r364  
    5656{
    5757        load_sdl_image_library();
    58         SDL_Surface* image = IMG_LoadTyped_RW( SDL_RWFromMem( (void*)data, size ), 1, "tga" );
     58        SDL_Surface* image = IMG_LoadTyped_RW( SDL_RWFromMem( (void*)data, (int)size ), 1, "png" );
    5959        if ( !image )
    6060        {
     
    402402
    403403        const char* pc = shader_code.data();
    404         int l = shader_code.length();
     404        int l = (int)shader_code.length();
    405405
    406406        glShaderSource( glid, 1, &pc, &l );
  • trunk/src/gui/gui_ascii_renderer.cc

    r356 r364  
    8080                for ( int x = 0; x < abs.get_width(); ++x )
    8181                {
    82                         m_terminal->print( position( abs.ul.y, abs.ul.x + x ), er->border_color, er->border_chars[0] );
    83                         m_terminal->print( position( abs.lr.y, abs.ul.x + x ), er->border_color, er->border_chars[1] );
     82                        m_terminal->print( position( abs.ul.y, abs.ul.x + x ), er->border_color, (unsigned char)er->border_chars[0] );
     83                        m_terminal->print( position( abs.lr.y, abs.ul.x + x ), er->border_color, (unsigned char)er->border_chars[1] );
    8484                }
    8585
    8686                for ( int y = 0; y < abs.get_height(); ++y )
    8787                {
    88                         m_terminal->print( position( abs.ul.y + y, abs.ul.x ), er->border_color, er->border_chars[2] );
    89                         m_terminal->print( position( abs.ul.y + y, abs.lr.x ), er->border_color, er->border_chars[3] );
     88                        m_terminal->print( position( abs.ul.y + y, abs.ul.x ), er->border_color, (unsigned char)er->border_chars[2] );
     89                        m_terminal->print( position( abs.ul.y + y, abs.lr.x ), er->border_color, (unsigned char)er->border_chars[3] );
    9090                }
    9191
    92                 m_terminal->print( abs.ul,   er->border_color, er->border_chars[4] );
    93                 m_terminal->print( abs.ur(), er->border_color, er->border_chars[5] );
    94                 m_terminal->print( abs.ll(), er->border_color, er->border_chars[6] );
    95                 m_terminal->print( abs.lr,   er->border_color, er->border_chars[7] );
     92                m_terminal->print( abs.ul,   er->border_color, (unsigned char)er->border_chars[4] );
     93                m_terminal->print( abs.ur(), er->border_color, (unsigned char)er->border_chars[5] );
     94                m_terminal->print( abs.ll(), er->border_color, (unsigned char)er->border_chars[6] );
     95                m_terminal->print( abs.lr,   er->border_color, (unsigned char)er->border_chars[7] );
    9696        }
    9797        if ( !e->m_text.empty() )
     
    100100                for ( char c : e->m_text )
    101101                {
    102                         m_terminal->print( p, er->text_color, c );
     102                        m_terminal->print( p, er->text_color, (unsigned char)c );
    103103                        ++p.x;
    104104                }
     
    111111}
    112112
    113 void nv::gui::ascii_renderer::on_hover_change( element* e, bool hover )
     113void nv::gui::ascii_renderer::on_hover_change( element* e, bool /*hover*/ )
    114114{
    115115        // TODO: FIX
     116        int fix_me;
    116117        NV_LOG( nv::LOG_DEBUG, "on_hover_change" );
    117118        e->m_flags[DIRTY] = true;
    118119}
    119120
    120 void nv::gui::ascii_renderer::on_select_change( element* e, bool select )
     121void nv::gui::ascii_renderer::on_select_change( element* e, bool /*select*/ )
    121122{
    122123        // TODO: FIX
     124        int fix_me;
    123125        NV_LOG( nv::LOG_DEBUG, "on_select_change" );
    124126        e->m_flags[DIRTY] = true;
  • trunk/src/gui/gui_gfx_renderer.cc

    r354 r364  
    266266                                vec2 tsize32 = ( image->t2 - image->t1 ) * ( 2.0f / 3.0f );
    267267                                vec2 tsizex = vec2( tsize.x, 0.0f );
    268                                 vec2 tsizey = vec2( 0.0f, tsize.y );
     268                                //vec2 tsizey = vec2( 0.0f, tsize.y );
    269269                                vec2 tsize3x = vec2( tsize3.x, 0.0f );
    270270                                vec2 tsize3y = vec2( 0.0f, tsize3.y );
     
    343343}
    344344
    345 void gfx_renderer::on_hover_change( element* e, bool hover )
     345void gfx_renderer::on_hover_change( element* e, bool /*hover*/ )
    346346{
    347347        // TODO: FIX
     348        int fix_me;
    348349        NV_LOG( nv::LOG_DEBUG, "on_hover_change" );
    349350        e->m_flags[DIRTY] = true;
    350351}
    351352
    352 void gfx_renderer::on_select_change( element* e, bool select )
     353void gfx_renderer::on_select_change( element* e, bool /*select*/ )
    353354{
    354355        // TODO: FIX
     356        int fix_me;
    355357        NV_LOG( nv::LOG_DEBUG, "on_select_change" );
    356358        e->m_flags[DIRTY] = true;
  • trunk/src/lua/lua_handle.cc

    r335 r364  
    1515        NV_LUA_STACK_ASSERT( L, +1 );
    1616        lua_rawgeti( L, LUA_REGISTRYINDEX, pseudoindex ); // table
    17         lua_rawgeti( L, -1, index );                      // table, entry
     17        lua_rawgeti( L, -1, (int)index );                 // table, entry
    1818        if ( !lua_istable( L, -1 ) )
    1919        {
     
    5757        lua_rawgeti( L, LUA_REGISTRYINDEX, pseudoindex );
    5858        lua_insert( L, -2 );
    59         lua_rawseti( L, -2, index );
     59        lua_rawseti( L, -2, (int)index );
    6060        lua_pop( L, 1 );
    6161}
     
    6666        lua_rawgeti( L, LUA_REGISTRYINDEX, pseudoindex ); // table
    6767        lua_pushinteger( L, 0 );
    68         lua_rawseti( L, -2, index );
     68        lua_rawseti( L, -2, (int)index );
    6969        lua_pop( L, 1 );
    7070}
Note: See TracChangeset for help on using the changeset viewer.