Subversion Repositories Kolibri OS

Rev

Rev 5315 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5315 Rev 5316
Line 404... Line 404...
404
                    i--;
404
                    i--;
405
                    continue;
405
                    continue;
406
                };
406
                };
Line 407... Line 407...
407
                
407
                
-
 
408
            }
-
 
409
            
-
 
410
            else if (obj->obj_type == OBJ_HUGE_EXPLOSION) {
-
 
411
                
-
 
412
                obj->t++;
-
 
413
                if (obj->t >= HUGE_EXPLOSIONS_COUNT) {
-
 
414
                    game_obj_remove(i);
-
 
415
                    i--;
-
 
416
                    continue;
-
 
417
                };
-
 
418
                
-
 
419
            }
408
            }
420
            
Line 409... Line 421...
409
            else if ( (obj->obj_type == OBJ_ROCK) || (obj->obj_type == OBJ_MINIROCK) ) {
421
            else if ( (obj->obj_type == OBJ_ROCK) || (obj->obj_type == OBJ_MINIROCK) ) {
410
                
422
                
411
                obj->x -= rock_speed;
423
                obj->x -= rock_speed;
Line 441... Line 453...
441
                if ( obj->x < GAME_WIDTH*4/5 ) {
453
                if ( obj->x < GAME_WIDTH*4/5 ) {
442
                    // turret shoot
454
                    // turret shoot
443
                    obj->t--;
455
                    obj->t--;
444
                    if (obj->t < 1) {
456
                    if (obj->t < 1) {
445
                        soundbuf_play(&game.sound_turret_shoot, 0);
457
                        soundbuf_play(&game.sound_turret_shoot, 0);
446
                        game_obj_add( game_obj( OBJ_RED_BULLET, 0, 0, 3, obj->x - 30, obj->y, 0, 0) );
458
                        game_obj_add( game_obj( OBJ_RED_BULLET, 0, 0, 3, obj->x - 5, obj->y, 0, 0) );
Line 447... Line 459...
447
                        
459
                        
448
                        int c_const = (game.stage_level < 4) ? (10 - 2*game.stage_level) : 3;
460
                        int c_const = (game.stage_level < 4) ? (10 - 2*game.stage_level) : 3;
Line 449... Line 461...
449
                        int c_var = (game.stage_level < 6) ? (20 - 3*game.stage_level) : 3;
461
                        int c_var = (game.stage_level < 6) ? (20 - 3*game.stage_level) : 3;
Line 463... Line 475...
463
        
475
        
464
        
476
        
-
 
477
        
-
 
478
        for (i = 0; i < game.objs_count; i++) {
-
 
479
            if ( IS_BIT_SET( game.objs[i].flags, OBJ_FLAG_DESTROYED ) ) {
-
 
480
                    
-
 
481
                if (game.objs[i].obj_type == OBJ_TURRET) {
-
 
482
                    soundbuf_play( &game.sound_huge_explosion, 0 );
465
        
483
                    game_obj_add( game_obj( OBJ_HUGE_EXPLOSION, 0, 0, HUGE_EXPLOSION_RADIUS, game.objs[i].x, game.objs[i].y, 0, 0.0 ) );
466
        for (i = 0; i < game.objs_count; i++) {
484
                }
-
 
485
                else {
467
            if ( IS_BIT_SET( game.objs[i].flags, OBJ_FLAG_DESTROYED ) ) {
486
                    soundbuf_play( &game.sound_explosions[ rs_rand() % SOUND_EXPLOSIONS_COUNT ], 0 );
468
                soundbuf_play( &game.sound_explosions[ rs_rand() % SOUND_EXPLOSIONS_COUNT ], 0 );
487
                    game_obj_add( game_obj( OBJ_EXPLOSION, 0, 0, EXPLOSION_RADIUS, game.objs[i].x, game.objs[i].y, 0, 0.0 ) );
Line 469... Line 488...
469
                game_obj_add( game_obj( OBJ_EXPLOSION, 0, 0, EXPLOSION_RADIUS, game.objs[i].x, game.objs[i].y, 0, 0.0 ) );
488
                };
470
                game_obj_remove(i);
489
                game_obj_remove(i);