Mario: silence some warnings
This commit is contained in:
parent
5d20757d43
commit
808f392119
@ -375,7 +375,7 @@ void selectNextTool() {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
int addition = 1;
|
int addition = 1;
|
||||||
if ( global_vars.tool.index % multiplier == ( multiplier - 1 ) )
|
if ( global_vars.tool.index % multiplier == static_cast<uint64_t>( multiplier - 1 ) )
|
||||||
addition = multiplier + 1;
|
addition = multiplier + 1;
|
||||||
if ( global_vars.tool.index == max_index )
|
if ( global_vars.tool.index == max_index )
|
||||||
return;
|
return;
|
||||||
@ -806,6 +806,7 @@ void populateToolGrid(
|
|||||||
tool_store.push_back( createMario(
|
tool_store.push_back( createMario(
|
||||||
global_vars.current_world_type, renderer, 0, 0 ) );
|
global_vars.current_world_type, renderer, 0, 0 ) );
|
||||||
else
|
else
|
||||||
|
// fall through
|
||||||
case ToolType::BLOCK:
|
case ToolType::BLOCK:
|
||||||
case ToolType::MOD:
|
case ToolType::MOD:
|
||||||
tool_store.push_back( createTerrainBlock(
|
tool_store.push_back( createTerrainBlock(
|
||||||
|
@ -20,10 +20,19 @@ SDLPP::Mouse::getMousePositionDouble( const SDLPP::Renderer &r,
|
|||||||
( r.getDoubleDimensions() - Vec2D< double >( 1.0, 1.0 ) ) / 2;
|
( r.getDoubleDimensions() - Vec2D< double >( 1.0, 1.0 ) ) / 2;
|
||||||
switch ( alignment_x ) {
|
switch ( alignment_x ) {
|
||||||
case SDLPP::OBJ_CENTER:
|
case SDLPP::OBJ_CENTER:
|
||||||
ret -= additions;
|
ret -= { additions.getX(), 0 };
|
||||||
break;
|
break;
|
||||||
case SDLPP::OBJ_END:
|
case SDLPP::OBJ_END:
|
||||||
ret -= 2 * additions;
|
ret -= { 2 * additions.getX(), 0 };
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
switch ( alignment_y ) {
|
||||||
|
case SDLPP::OBJ_CENTER:
|
||||||
|
ret -= { 0, additions.getY() };
|
||||||
|
break;
|
||||||
|
case SDLPP::OBJ_END:
|
||||||
|
ret -= { 0, 2 * additions.getY() };
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -146,9 +146,9 @@ void RectangleRender::updateSizeAndPosition() {
|
|||||||
rect.h =
|
rect.h =
|
||||||
std::round( ( current.getY() + original_size.getY() ) * dimension ) -
|
std::round( ( current.getY() + original_size.getY() ) * dimension ) -
|
||||||
rect.y;
|
rect.y;
|
||||||
if(rect.w < min_size.getX())
|
if(static_cast<uint64_t>(rect.w) < min_size.getX())
|
||||||
rect.w = min_size.getX();
|
rect.w = min_size.getX();
|
||||||
if(rect.h < min_size.getY())
|
if(static_cast<uint64_t>(rect.h) < min_size.getY())
|
||||||
rect.h = min_size.getY();
|
rect.h = min_size.getY();
|
||||||
if ( polygon )
|
if ( polygon )
|
||||||
polygon->updateCollision( collisionPushX(), collisionPushY(),
|
polygon->updateCollision( collisionPushX(), collisionPushY(),
|
||||||
|
Loading…
Reference in New Issue
Block a user