~ubuntu-branches/debian/sid/astromenace/sid

« back to all changes in this revision

Viewing changes to AstroMenaceSource/Object3D/Explosion/BulletExplosion/BulletExplosion.cpp

  • Committer: Package Import Robot
  • Author(s): Boris Pek, 1
  • Date: 2013-12-19 15:37:09 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20131219153709-vs62lyk7ts7o3rf5
Tags: 1.3.2+repack-2
Add patch debian/patches/fix_work_on_intel_videocards.patch:
Mesa developers have enabled GL_ARB_texture_storage for all drivers [1], so
i915 and i965 drivers now claim the support of this OpenGL extension, but
texture storage feature does not actually work there.
.
[1] http://lists.freedesktop.org/archives/mesa-dev/2013-June/041188.html
.
This patch is just workaround to make the game work on intel videocards with
new Mesa. But real problem should be fixed in Mesa.
(Closes: #718680)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/************************************************************************************
2
2
 
3
3
        AstroMenace (Hardcore 3D space shooter with spaceship upgrade possibilities)
4
 
        Copyright © 2006-2012 Michael Kurinnoy, Viewizard
 
4
        Copyright © 2006-2013 Michael Kurinnoy, Viewizard
5
5
 
6
6
 
7
7
        AstroMenace is free software: you can redistribute it and/or modify
29
29
#include "BulletExplosion.h"
30
30
#include "../../../Game.h"
31
31
void DestroyRadiusCollisionAllObject3D(CObject3D *DontTouchObject, VECTOR3D Point, float Radius, float Damage, int ObjectStatus);
32
 
void GameCameraSetExplosion(VECTOR3D Location, float Power);
33
32
 
34
33
 
35
34
 
310
309
                                        ProjectileTMP->Orientation = TM1 + (ProjectileTMP->Orientation^(Projectile->Radius*6.0f));
311
310
                                        ProjectileTMP->Orientation.Normalize();
312
311
 
313
 
                                        for (int i=0; i<ProjectileTMP->GraphicFXQuantity; i++)
 
312
                                        for (int j=0; j<ProjectileTMP->GraphicFXQuantity; j++)
314
313
                                        {
315
 
                                                ProjectileTMP->GraphicFX[i]->Direction = ProjectileTMP->Orientation^-1;
316
 
                                                ProjectileTMP->GraphicFX[i]->Speed = 1.5f;
317
 
                                                ProjectileTMP->GraphicFX[i]->SetStartLocation(Location);
 
314
                                                ProjectileTMP->GraphicFX[j]->Direction = ProjectileTMP->Orientation^-1;
 
315
                                                ProjectileTMP->GraphicFX[j]->Speed = 1.5f;
 
316
                                                ProjectileTMP->GraphicFX[j]->SetStartLocation(Location);
318
317
                                        }
319
318
                                        ProjectileTMP->ObjectStatus = ObjectStatus;
320
319
                                        // учитываем пенальти
525
524
                                        ProjectileTMP->Orientation = TM1 + (ProjectileTMP->Orientation^(Projectile->Radius*2.0f));
526
525
                                        ProjectileTMP->Orientation.Normalize();
527
526
 
528
 
                                        for (int i=0; i<ProjectileTMP->GraphicFXQuantity; i++)
 
527
                                        for (int j=0; j<ProjectileTMP->GraphicFXQuantity; j++)
529
528
                                        {
530
 
                                                ProjectileTMP->GraphicFX[i]->Direction = ProjectileTMP->Orientation^-1;
531
 
                                                ProjectileTMP->GraphicFX[i]->Speed = ProjectileTMP->GraphicFX[i]->Speed/2.0f;
532
 
                                                ProjectileTMP->GraphicFX[i]->SetStartLocation(Location);
 
529
                                                ProjectileTMP->GraphicFX[j]->Direction = ProjectileTMP->Orientation^-1;
 
530
                                                ProjectileTMP->GraphicFX[j]->Speed = ProjectileTMP->GraphicFX[j]->Speed/2.0f;
 
531
                                                ProjectileTMP->GraphicFX[j]->SetStartLocation(Location);
533
532
                                        }
534
533
                                        ProjectileTMP->ObjectStatus = ObjectStatus;
535
534
                                        ProjectileTMP->SpeedEnd = ProjectileTMP->Speed/7.0f;
581
580
                                        ProjectileTMP->Orientation = TM1 + (ProjectileTMP->Orientation^(Projectile->Radius*2.0f));
582
581
                                        ProjectileTMP->Orientation.Normalize();
583
582
 
584
 
                                        for (int i=0; i<ProjectileTMP->GraphicFXQuantity; i++)
 
583
                                        for (int j=0; j<ProjectileTMP->GraphicFXQuantity; j++)
585
584
                                        {
586
 
                                                ProjectileTMP->GraphicFX[i]->Direction = ProjectileTMP->Orientation^-1;
587
 
                                                ProjectileTMP->GraphicFX[i]->Speed = ProjectileTMP->GraphicFX[i]->Speed/2.0f;
588
 
                                                ProjectileTMP->GraphicFX[i]->SetStartLocation(Location);
 
585
                                                ProjectileTMP->GraphicFX[j]->Direction = ProjectileTMP->Orientation^-1;
 
586
                                                ProjectileTMP->GraphicFX[j]->Speed = ProjectileTMP->GraphicFX[j]->Speed/2.0f;
 
587
                                                ProjectileTMP->GraphicFX[j]->SetStartLocation(Location);
589
588
                                        }
590
589
                                        ProjectileTMP->ObjectStatus = ObjectStatus;
591
590
                                        ProjectileTMP->SpeedEnd = ProjectileTMP->Speed/7.0f;
638
637
                                        ProjectileTMP->Orientation = TM1 + (ProjectileTMP->Orientation^(Projectile->Radius*2.0f));
639
638
                                        ProjectileTMP->Orientation.Normalize();
640
639
 
641
 
                                        for (int i=0; i<ProjectileTMP->GraphicFXQuantity; i++)
 
640
                                        for (int j=0; j<ProjectileTMP->GraphicFXQuantity; j++)
642
641
                                        {
643
 
                                                ProjectileTMP->GraphicFX[i]->Direction = ProjectileTMP->Orientation^-1;
644
 
                                                ProjectileTMP->GraphicFX[i]->Speed = ProjectileTMP->GraphicFX[i]->Speed/2.0f;
645
 
                                                ProjectileTMP->GraphicFX[i]->SetStartLocation(Location);
 
642
                                                ProjectileTMP->GraphicFX[j]->Direction = ProjectileTMP->Orientation^-1;
 
643
                                                ProjectileTMP->GraphicFX[j]->Speed = ProjectileTMP->GraphicFX[j]->Speed/2.0f;
 
644
                                                ProjectileTMP->GraphicFX[j]->SetStartLocation(Location);
646
645
                                        }
647
646
                                        ProjectileTMP->ObjectStatus = ObjectStatus;
648
647
                                        ProjectileTMP->SpeedEnd = ProjectileTMP->Speed/7.0f;
699
698
                                        ProjectileTMP->Orientation = TM1 + (ProjectileTMP->Orientation^(Projectile->Radius*4.0f));
700
699
                                        ProjectileTMP->Orientation.Normalize();
701
700
 
702
 
                                        for (int i=0; i<ProjectileTMP->GraphicFXQuantity; i++)
 
701
                                        for (int j=0; j<ProjectileTMP->GraphicFXQuantity; j++)
703
702
                                        {
704
 
                                                ProjectileTMP->GraphicFX[i]->Direction = ProjectileTMP->Orientation^-1;
705
 
                                                ProjectileTMP->GraphicFX[i]->Speed = ProjectileTMP->GraphicFX[i]->Speed/2.0f;
706
 
                                                ProjectileTMP->GraphicFX[i]->SetStartLocation(Location);
 
703
                                                ProjectileTMP->GraphicFX[j]->Direction = ProjectileTMP->Orientation^-1;
 
704
                                                ProjectileTMP->GraphicFX[j]->Speed = ProjectileTMP->GraphicFX[j]->Speed/2.0f;
 
705
                                                ProjectileTMP->GraphicFX[j]->SetStartLocation(Location);
707
706
                                        }
708
707
                                        ProjectileTMP->ObjectStatus = ObjectStatus;
709
708
                                        ProjectileTMP->SpeedEnd = ProjectileTMP->Speed/6.0f;
721
720
                                        ProjectileTMP->SetLocation(Location);
722
721
 
723
722
                                        ProjectileTMP->SetRotation(VECTOR3D(5.0f*vw_Randf0, 360.0f*vw_Randf0, 0.0f));
724
 
                                        for (int i=0; i<ProjectileTMP->GraphicFXQuantity; i++)
 
723
                                        for (int j=0; j<ProjectileTMP->GraphicFXQuantity; j++)
725
724
                                        {
726
 
                                                ProjectileTMP->GraphicFX[i]->Direction = ProjectileTMP->Orientation^-1;
727
 
                                                ProjectileTMP->GraphicFX[i]->Speed = ProjectileTMP->GraphicFX[i]->Speed/2.0f;
728
 
                                                ProjectileTMP->GraphicFX[i]->SetStartLocation(Location);
 
725
                                                ProjectileTMP->GraphicFX[j]->Direction = ProjectileTMP->Orientation^-1;
 
726
                                                ProjectileTMP->GraphicFX[j]->Speed = ProjectileTMP->GraphicFX[j]->Speed/2.0f;
 
727
                                                ProjectileTMP->GraphicFX[j]->SetStartLocation(Location);
729
728
                                        }
730
729
                                        ProjectileTMP->ObjectStatus = ObjectStatus;
731
730
                                        ProjectileTMP->SpeedEnd = ProjectileTMP->Speed/6.0f;
743
742
                                        ProjectileTMP->SetLocation(Location);
744
743
 
745
744
                                        ProjectileTMP->SetRotation(VECTOR3D(5.0f*vw_Randf0, 360.0f*vw_Randf0, 0.0f));
746
 
                                        for (int i=0; i<ProjectileTMP->GraphicFXQuantity; i++)
 
745
                                        for (int j=0; j<ProjectileTMP->GraphicFXQuantity; j++)
747
746
                                        {
748
 
                                                ProjectileTMP->GraphicFX[i]->Direction = ProjectileTMP->Orientation^-1;
749
 
                                                ProjectileTMP->GraphicFX[i]->Speed = ProjectileTMP->GraphicFX[i]->Speed/2.0f;
750
 
                                                ProjectileTMP->GraphicFX[i]->SetStartLocation(Location);
 
747
                                                ProjectileTMP->GraphicFX[j]->Direction = ProjectileTMP->Orientation^-1;
 
748
                                                ProjectileTMP->GraphicFX[j]->Speed = ProjectileTMP->GraphicFX[j]->Speed/2.0f;
 
749
                                                ProjectileTMP->GraphicFX[j]->SetStartLocation(Location);
751
750
                                        }
752
751
                                        ProjectileTMP->ObjectStatus = ObjectStatus;
753
752
                                        ProjectileTMP->SpeedEnd = ProjectileTMP->Speed/6.0f;
764
763
                                        ProjectileTMP->SetLocation(Location);
765
764
 
766
765
                                        ProjectileTMP->SetRotation(VECTOR3D(5.0f*vw_Randf0, 360.0f*vw_Randf0, 0.0f));
767
 
                                        for (int i=0; i<ProjectileTMP->GraphicFXQuantity; i++)
 
766
                                        for (int j=0; j<ProjectileTMP->GraphicFXQuantity; j++)
768
767
                                        {
769
 
                                                ProjectileTMP->GraphicFX[i]->Direction = ProjectileTMP->Orientation^-1;
770
 
                                                ProjectileTMP->GraphicFX[i]->Speed = ProjectileTMP->GraphicFX[i]->Speed/2.0f;
771
 
                                                ProjectileTMP->GraphicFX[i]->SetStartLocation(Location);
 
768
                                                ProjectileTMP->GraphicFX[j]->Direction = ProjectileTMP->Orientation^-1;
 
769
                                                ProjectileTMP->GraphicFX[j]->Speed = ProjectileTMP->GraphicFX[j]->Speed/2.0f;
 
770
                                                ProjectileTMP->GraphicFX[j]->SetStartLocation(Location);
772
771
                                        }
773
772
                                        ProjectileTMP->ObjectStatus = ObjectStatus;
774
773
                                        ProjectileTMP->SpeedEnd = ProjectileTMP->Speed/6.0f;
787
786
                                        ProjectileTMP->SetLocation(Location);
788
787
 
789
788
                                        ProjectileTMP->SetRotation(VECTOR3D(20.0f*vw_Randf0, 360.0f*vw_Randf0, 0.0f));
790
 
                                        for (int i=0; i<ProjectileTMP->GraphicFXQuantity; i++)
 
789
                                        for (int j=0; j<ProjectileTMP->GraphicFXQuantity; j++)
791
790
                                        {
792
 
                                                ProjectileTMP->GraphicFX[i]->Direction = ProjectileTMP->Orientation^-1;
793
 
                                                ProjectileTMP->GraphicFX[i]->Speed = ProjectileTMP->GraphicFX[i]->Speed/2.0f;
794
 
                                                ProjectileTMP->GraphicFX[i]->SetStartLocation(Location);
 
791
                                                ProjectileTMP->GraphicFX[j]->Direction = ProjectileTMP->Orientation^-1;
 
792
                                                ProjectileTMP->GraphicFX[j]->Speed = ProjectileTMP->GraphicFX[j]->Speed/2.0f;
 
793
                                                ProjectileTMP->GraphicFX[j]->SetStartLocation(Location);
795
794
                                        }
796
795
                                        ProjectileTMP->ObjectStatus = ObjectStatus;
797
796
                                        ProjectileTMP->SpeedEnd = ProjectileTMP->Speed/6.0f;