Changeset 369 for trunk/src/lua
- Timestamp:
- 05/22/15 13:21:44 (10 years ago)
- Location:
- trunk/src/lua
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lua/lua_glm.cc
r368 r369 360 360 { 361 361 for (size_t i = 0; i < 256; ++i ) nlua_swizzel_lookup[i] = 255; 362 using nv:: char8;363 nlua_swizzel_lookup[ char8( 'x' )] = 0;364 nlua_swizzel_lookup[ char8( 'r' )] = 0;365 nlua_swizzel_lookup[ char8( 's' )] = 0;366 nlua_swizzel_lookup[ char8( '0' )] = 0;367 nlua_swizzel_lookup[ char8( 'y' )] = 1;368 nlua_swizzel_lookup[ char8( 'g' )] = 1;369 nlua_swizzel_lookup[ char8( 't' )] = 0;370 nlua_swizzel_lookup[ char8( '1' )] = 1;371 nlua_swizzel_lookup[ char8( 'z' )] = 2;372 nlua_swizzel_lookup[ char8( 'b' )] = 2;373 nlua_swizzel_lookup[ char8( 'u' )] = 0;374 nlua_swizzel_lookup[ char8( '2' )] = 2;375 nlua_swizzel_lookup[ char8( 'w' )] = 3;376 nlua_swizzel_lookup[ char8( 'a' )] = 3;377 nlua_swizzel_lookup[ char8( 'v' )] = 0;378 nlua_swizzel_lookup[ char8( '3' )] = 3;362 using nv::uchar8; 363 nlua_swizzel_lookup[uchar8( 'x' )] = 0; 364 nlua_swizzel_lookup[uchar8( 'r' )] = 0; 365 nlua_swizzel_lookup[uchar8( 's' )] = 0; 366 nlua_swizzel_lookup[uchar8( '0' )] = 0; 367 nlua_swizzel_lookup[uchar8( 'y' )] = 1; 368 nlua_swizzel_lookup[uchar8( 'g' )] = 1; 369 nlua_swizzel_lookup[uchar8( 't' )] = 0; 370 nlua_swizzel_lookup[uchar8( '1' )] = 1; 371 nlua_swizzel_lookup[uchar8( 'z' )] = 2; 372 nlua_swizzel_lookup[uchar8( 'b' )] = 2; 373 nlua_swizzel_lookup[uchar8( 'u' )] = 0; 374 nlua_swizzel_lookup[uchar8( '2' )] = 2; 375 nlua_swizzel_lookup[uchar8( 'w' )] = 3; 376 nlua_swizzel_lookup[uchar8( 'a' )] = 3; 377 nlua_swizzel_lookup[uchar8( 'v' )] = 0; 378 nlua_swizzel_lookup[uchar8( '3' )] = 3; 379 379 int stack = lua_gettop( L ); 380 380 -
trunk/src/lua/lua_map_tile.cc
r368 r369 20 20 struct map_tile 21 21 { 22 nv::uint8* data;23 nv:: char8* ascii;24 nv::uint16 size_x;25 nv::uint16 size_y;22 nv::uint8* data; 23 nv::uchar8* ascii; 24 nv::uint16 size_x; 25 nv::uint16 size_y; 26 26 }; 27 27 … … 66 66 } 67 67 tile.data = new nv::uint8[ tile.size_x * tile.size_y ]; 68 tile.ascii = ( ascii ? new nv:: char8[ tile.size_x * tile.size_y ] : nullptr );68 tile.ascii = ( ascii ? new nv::uchar8[ tile.size_x * tile.size_y ] : nullptr ); 69 69 70 70 nv::uint8 translation[256] = { 0 }; … … 89 89 for ( nv::uint16 row = 0; row < tile.size_y; row++ ) 90 90 { 91 nv:: char8 gylph = (nv::char8)code[ row * ( tile.size_x + 1 ) + line ];91 nv::uchar8 gylph = (nv::uchar8)code[ row * ( tile.size_x + 1 ) + line ]; 92 92 // TODO: check for errors 93 93 tile.data[ row * tile.size_x + line ] = translation[ gylph ]; … … 110 110 if ( old_tile->ascii ) 111 111 { 112 new_tile->ascii = new nv:: char8[ size ];112 new_tile->ascii = new nv::uchar8[ size ]; 113 113 } 114 114 std::copy( old_tile->data, old_tile->data + size, new_tile->data );
Note: See TracChangeset
for help on using the changeset viewer.