Basic editor functionality arrived!
Terrible code, must be changed!!!
This commit is contained in:
+15
-4
@@ -70,19 +70,30 @@ SDL_Rect getSourceRectByID( uint64_t id, BlockType type ) {
|
||||
}
|
||||
return ret_src;
|
||||
}
|
||||
std::shared_ptr<SDLPP::RectangleRender> createTerrainBlock( uint64_t block_id, BlockType type, std::shared_ptr<SDLPP::Renderer> &renderer, double x, double y, std::shared_ptr<SDLPP::Texture> texture, bool collision ) {
|
||||
return createBlock( renderer, x, y, texture,
|
||||
getSourceRectByID( block_id, type ), block_id,
|
||||
collision );
|
||||
}
|
||||
std::shared_ptr<SDLPP::RectangleRender> createTerrainBlock( uint64_t block_id, BlockType type, std::shared_ptr<SDLPP::Renderer> &renderer, std::shared_ptr<SDLPP::Texture> texture, bool collision ) {
|
||||
return createTerrainBlock( block_id, type, renderer, 0, 0, texture, collision );
|
||||
}
|
||||
|
||||
std::shared_ptr< SDLPP::RectangleRender >
|
||||
createTerrainBlock( uint64_t block_id, BlockType type,
|
||||
std::shared_ptr< SDLPP::Renderer > &renderer, double x,
|
||||
double y, bool collision ) {
|
||||
return createBlock( renderer, x, y, g_terrain_texture,
|
||||
getSourceRectByID( block_id, type ), block_id,
|
||||
collision );
|
||||
return createTerrainBlock(block_id, type, renderer, x, y, g_terrain_texture, collision);
|
||||
}
|
||||
|
||||
std::shared_ptr< SDLPP::RectangleRender >
|
||||
createTerrainBlock( uint64_t block_id, BlockType type,
|
||||
std::shared_ptr< SDLPP::Renderer > &renderer,
|
||||
bool collision ) {
|
||||
return createTerrainBlock( block_id, type, renderer, 0, 0, collision );
|
||||
return createTerrainBlock(block_id, type, renderer, g_terrain_texture, collision);
|
||||
}
|
||||
|
||||
std::shared_ptr<SDLPP::RectangleRender> createMario( BlockType type, std::shared_ptr<SDLPP::Renderer> &renderer, double x, double y ) {
|
||||
//TODO add type additions
|
||||
return createBlock( renderer, x, y, g_mario_texture, MARIO_STANDING_SRC, MARIO_ID, true );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user