|
@@ -11,6 +11,12 @@ using namespace Editor;
|
|
// Konstruktor
|
|
// Konstruktor
|
|
AsteroidsEditor::AsteroidsEditor()
|
|
AsteroidsEditor::AsteroidsEditor()
|
|
{
|
|
{
|
|
|
|
+ kamera = new Kamera2D();
|
|
|
|
+ minimap = new Kamera2D();
|
|
|
|
+ minimap->setSize( 200, 200 );
|
|
|
|
+ minimap->setStyle( ZeichnungHintergrund::Style::Sichtbar | ZeichnungHintergrund::Style::Rahmen );
|
|
|
|
+ minimap->setRahmenFarbe( 0xFFFFFFFF );
|
|
|
|
+ minimap->setName( "minimap" );
|
|
schrift = 0;
|
|
schrift = 0;
|
|
klient = 0;
|
|
klient = 0;
|
|
laden = 0;
|
|
laden = 0;
|
|
@@ -40,6 +46,8 @@ AsteroidsEditor::~AsteroidsEditor()
|
|
if( daten )
|
|
if( daten )
|
|
daten->release();
|
|
daten->release();
|
|
dialogs->release();
|
|
dialogs->release();
|
|
|
|
+ kamera->release();
|
|
|
|
+ minimap->release();
|
|
}
|
|
}
|
|
|
|
|
|
void AsteroidsEditor::ladeKarte()
|
|
void AsteroidsEditor::ladeKarte()
|
|
@@ -52,6 +60,8 @@ void AsteroidsEditor::ladeKarte()
|
|
daten->release();
|
|
daten->release();
|
|
daten = new KarteDaten( (EditorKlient *)klient->getThis() );
|
|
daten = new KarteDaten( (EditorKlient *)klient->getThis() );
|
|
i->setDaten( (KarteDaten *)daten->getThis() );
|
|
i->setDaten( (KarteDaten *)daten->getThis() );
|
|
|
|
+ minimap->setWelt( daten->getWelt(), 0 );
|
|
|
|
+ kamera->setWelt( daten->getWelt(), 1 );
|
|
}
|
|
}
|
|
|
|
|
|
// nicht constant
|
|
// nicht constant
|
|
@@ -215,6 +225,8 @@ bool AsteroidsEditor::tick( double z )
|
|
if( laden )
|
|
if( laden )
|
|
rend |= laden->tick( z );
|
|
rend |= laden->tick( z );
|
|
rend |= i->tick( z );
|
|
rend |= i->tick( z );
|
|
|
|
+ rend |= minimap->tick( z );
|
|
|
|
+ rend |= kamera->tick( z );
|
|
c.lock();
|
|
c.lock();
|
|
for( auto i = dialogs->getIterator(); i && i._; i++ )
|
|
for( auto i = dialogs->getIterator(); i && i._; i++ )
|
|
rend |= i->tick( z );
|
|
rend |= i->tick( z );
|
|
@@ -235,6 +247,10 @@ void AsteroidsEditor::render( Bild & zRObj )
|
|
i = new Interface( schrift, windowSize );
|
|
i = new Interface( schrift, windowSize );
|
|
}
|
|
}
|
|
zRObj.setAlpha( alpha );
|
|
zRObj.setAlpha( alpha );
|
|
|
|
+ kamera->setSize( zRObj.getSize() );
|
|
|
|
+ kamera->render( zRObj );
|
|
|
|
+ minimap->setPosition( 10, zRObj.getHeight() - 210 );
|
|
|
|
+ minimap->render( zRObj );
|
|
i->render( zRObj );
|
|
i->render( zRObj );
|
|
c.lock();
|
|
c.lock();
|
|
for( int i = dialogs->getEintragAnzahl() - 1; i >= 0; i-- )
|
|
for( int i = dialogs->getEintragAnzahl() - 1; i >= 0; i-- )
|