SDLPP: add option to specify background objects in scene and move Z index of objects just above those background objects
This commit is contained in:
@@ -22,6 +22,7 @@ public:
|
||||
void moveZ( const std::shared_ptr< RenderObject > &obj, int addition );
|
||||
void moveZTop( const std::shared_ptr< RenderObject > &obj );
|
||||
void moveZBottom( const std::shared_ptr< RenderObject > &obj );
|
||||
void moveZJustAboveBackground( const std::shared_ptr< RenderObject > &obj );
|
||||
std::shared_ptr< RenderObject > getObject( int index );
|
||||
std::vector< std::shared_ptr< RenderObject > > getObjects();
|
||||
std::vector< std::shared_ptr< RenderObject > >
|
||||
@@ -49,6 +50,8 @@ public:
|
||||
void setPrevTicks( int ticks );
|
||||
void saveScene();
|
||||
void resetScene();
|
||||
void setBackgroundObjectIDs(const std::unordered_set<uint64_t> &ids);
|
||||
void updateBackgroundObjectZIndex();
|
||||
|
||||
private:
|
||||
void checkKilled();
|
||||
@@ -64,6 +67,8 @@ private:
|
||||
std::shared_ptr< RenderObject > rightmost_obj;
|
||||
uint64_t max_object_id = 0;
|
||||
std::mutex render_mutex;
|
||||
std::unordered_set<uint64_t> background_ids;
|
||||
uint64_t first_non_background_index = 1;
|
||||
};
|
||||
} // end of namespace SDLPP
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user