16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-20 06:49:19 +02:00

position and rotation adjustment value snap mode in scenery editor, position adjustment for memory cells in scenery editor

This commit is contained in:
tmj-fstate
2018-07-10 01:09:20 +02:00
parent e01f05f57c
commit 219e8badc5
8 changed files with 102 additions and 10 deletions

View File

@@ -422,6 +422,18 @@ basic_cell::erase( TAnimModel *Instance ) {
// TODO: update cell bounding area
}
// removes provided memory cell from the cell
void
basic_cell::erase( TMemCell *Memorycell ) {
m_memorycells.erase(
std::remove_if(
std::begin( m_memorycells ), std::end( m_memorycells ),
[=]( TMemCell *memorycell ) {
return memorycell == Memorycell; } ),
std::end( m_memorycells ) );
}
// registers provided path in the lookup directory of the cell
void
basic_cell::register_end( TTrack *Path ) {
@@ -1282,6 +1294,17 @@ basic_region::erase_instance( TAnimModel *Instance ) {
}
}
// removes specified memory cell from the region
void
basic_region::erase_memorycell( TMemCell *Memorycell ) {
auto const location { Memorycell->location() };
if( point_inside( location ) ) {
section( location ).erase( Memorycell );
}
}
// inserts provided sound in the region
void
basic_region::insert_sound( sound_source *Sound, scratch_data &Scratchpad ) {