138
138
cEnemy::Set_Direction( dir, 1 );
140
name += _(Get_Direction_Name( start_direction).c_str());
140
name += _(Get_Direction_Name(start_direction).c_str());
142
142
if( direction == DIR_LEFT )
395
402
// moving smoke particle animation
396
403
while( quota > 0 )
405
anim = new cParticle_Emitter();
401
410
if( direction == DIR_LEFT )
403
anim = new cParticle_Emitter();
404
412
anim->Set_Pos( posx + col_rect.w - Get_Random_Float( 5, 8 ), posy + Get_Random_Float( 0, rect.h - 15 ) );
405
413
anim->Set_Direction_Range( 320, 100 );
409
anim = new cParticle_Emitter();
410
417
anim->Set_Pos( posx + Get_Random_Float( 5, 8 ), posy + Get_Random_Float( 0, rect.h - 15 ) );
411
418
anim->Set_Direction_Range( 140, 100 );
421
anim->Set_Scale( 1.1f );
417
anim = new cParticle_Emitter();
418
426
anim->Set_Pos( posx + Get_Random_Float( 0, col_rect.w ), posy + Get_Random_Float( 0, rect.h ) );
427
anim->Set_Scale( 0.5f );
421
// - 0.000001f caused a weird graphical z pos bug with my ATI card
430
// - 0.000001f caused a weird graphical z pos bug with an ATI card
422
431
anim->Set_Pos_Z( posz - 0.000005f );
423
432
anim->Set_Image( pVideo->Get_Surface( "animation/particles/smoke_black.png" ) );
424
433
anim->Set_Time_to_Live( 0.3f, 1 );
425
434
anim->Set_Speed( 1, 1 );
426
anim->Set_Scale( 1.3f );
427
435
anim->Set_Const_Rotation_Z( -1, 2 );
428
436
anim->Set_Color( Color( static_cast<Uint8>(155), 150, 130 ) );
429
437
anim->Set_Fading_Alpha( 1 );
470
478
bool cRokko :: Is_Draw_Valid( void )
472
if( cEnemy::Is_Draw_Valid() == 1 )
477
// if not editor enabled or not active mouse object
478
if( !editor_enabled || pMouseCursor->active_object != this )
480
bool valid = cEnemy::Is_Draw_Valid();
485
// if active mouse object
486
if( pMouseCursor->active_object == this )
486
496
unsigned int cRokko :: Validate_Collision( cSprite *obj )
530
540
CEGUI::WindowManager &wmgr = CEGUI::WindowManager::getSingleton();
543
CEGUI::Combobox *combobox = static_cast<CEGUI::Combobox *>(wmgr.createWindow( "TaharezLook/Combobox", "editor_rokko_direction" ));
544
Editor_Add( UTF8_("Direction"), UTF8_("Direction"), combobox, 100, 75 );
546
combobox->addItem( new CEGUI::ListboxTextItem( "left" ) );
547
combobox->addItem( new CEGUI::ListboxTextItem( "right" ) );
549
combobox->setText( Get_Direction_Name( start_direction ) );
550
combobox->subscribeEvent( CEGUI::Combobox::EventListSelectionAccepted, CEGUI::Event::Subscriber( &cRokko::Editor_Direction_Select, this ) );
533
553
CEGUI::Editbox *editbox = static_cast<CEGUI::Editbox *>(wmgr.createWindow( "TaharezLook/Editbox", "editor_rokko_speed" ));
534
554
Editor_Add( UTF8_("Speed"), UTF8_("Speed when activated"), editbox, 120 );
563
bool cRokko :: Editor_Direction_Select( const CEGUI::EventArgs &event )
565
const CEGUI::WindowEventArgs &windowEventArgs = static_cast<const CEGUI::WindowEventArgs&>( event );
566
CEGUI::ListboxItem *item = static_cast<CEGUI::Combobox *>( windowEventArgs.window )->getSelectedItem();
568
Set_Direction( Get_Direction_Id( item->getText().c_str() ) );
543
573
bool cRokko :: Editor_Speed_Key( const CEGUI::EventArgs &event )
545
575
const CEGUI::WindowEventArgs &windowEventArgs = static_cast<const CEGUI::WindowEventArgs&>( event );