|
@@ -15,6 +15,7 @@ Map::Map( MinigameKlientV *klient )
|
|
|
this->klient = klient;
|
|
|
map = new RCArray< Array< int > >();
|
|
|
score = 0;
|
|
|
+ scoreCheck = score * 11197;
|
|
|
breite = 0;
|
|
|
höhe = 0;
|
|
|
geschwindigkeit = 0;
|
|
@@ -64,6 +65,7 @@ void Map::reset( Text *zOptionen )
|
|
|
next = 0;
|
|
|
beendet = 0;
|
|
|
score = 0;
|
|
|
+ scoreCheck = score * 11197;
|
|
|
map->leeren();
|
|
|
Text *tmp = zOptionen->getTeilText( zOptionen->positionVon( '=' ) + 1, zOptionen->positionVon( ',' ) );
|
|
|
breite = *tmp;
|
|
@@ -103,6 +105,7 @@ void Map::reset( Text *zOptionen )
|
|
|
if( br == breite && hö == höhe )
|
|
|
{
|
|
|
save->lese( (char*)&score, 4 );
|
|
|
+ scoreCheck = score * 11197;
|
|
|
for( int x = 0; x < breite; x++ )
|
|
|
{
|
|
|
map->set( new Array< int >(), x );
|
|
@@ -236,6 +239,7 @@ void Map::doMausEreignis( MausEreignis &me )
|
|
|
if( del )
|
|
|
{
|
|
|
score++;
|
|
|
+ scoreCheck = score * 11197;
|
|
|
map->remove( x - xOff );
|
|
|
xOff++;
|
|
|
}
|
|
@@ -320,6 +324,12 @@ bool Map::tick( double tickVal )
|
|
|
if( row->hat( i ) )
|
|
|
beendet |= row->get( i ) != 0;
|
|
|
}
|
|
|
+ beendet |= ( score * 11197 != scoreCheck );
|
|
|
+ if( score * 11197 != scoreCheck )
|
|
|
+ {
|
|
|
+ score = 0;
|
|
|
+ scoreCheck = 0;
|
|
|
+ }
|
|
|
if( beendet && klient )
|
|
|
{
|
|
|
capture.close();
|
|
@@ -331,10 +341,20 @@ bool Map::tick( double tickVal )
|
|
|
{
|
|
|
InitDatei *opd = new InitDatei( "data/Minigames/Blöcke/data/optionen.ini" );
|
|
|
opd->laden();
|
|
|
+ if( !opd->wertExistiert( "Breite" ) )
|
|
|
+ opd->addWert( "Breite", "20" );
|
|
|
+ if( !opd->wertExistiert( "Height" ) )
|
|
|
+ opd->addWert( "Height", "12" );
|
|
|
+ if( !opd->wertExistiert( "Farben" ) )
|
|
|
+ opd->addWert( "Farben", "5" );
|
|
|
+ if( !opd->wertExistiert( "Geschwindigkeit" ) )
|
|
|
+ opd->addWert( "Geschwindigkeit", "4000" );
|
|
|
+ if( !opd->wertExistiert( "Fortsetzen" ) )
|
|
|
+ opd->addWert( "Fortsetzen", "0" );
|
|
|
Text optionen = "Width=";
|
|
|
optionen += opd->zWert( "Breite" )->getText();
|
|
|
optionen += ",Height=";
|
|
|
- optionen += opd->zWert( "Höhe" )->getText();
|
|
|
+ optionen += opd->zWert( "Height" )->getText();
|
|
|
optionen += ",Farben=";
|
|
|
optionen += opd->zWert( "Farben" )->getText();
|
|
|
optionen += ",Speed=";
|