rafkill (1.2.2-3.2) build/hulls/hull_weapon_rocket_normal.cpp

Summary

 build/hulls/hull_weapon_rocket_normal.cpp |   23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

    
download this patch

Patch contents

--- rafkill-1.2.2.orig/build/hulls/hull_weapon_rocket_normal.cpp
+++ rafkill-1.2.2/build/hulls/hull_weapon_rocket_normal.cpp
@@ -0,0 +1,23 @@
+#include "spaceobj.h"
+#include "bitmap.h"
+#include "hull_weapon.h"
+#include "hull_weapon_rocket_normal.h"
+	
+static const int Xfactor = 4;
+static const int Yfactor = 20;
+
+NormalRocket_WHull::NormalRocket_WHull():
+HullWeapon( 0, 1, 20 ){}
+
+void NormalRocket_WHull::Draw( const Bitmap & who, int x, int y ) {
+	who.rectangleFill( x, y+3, x+Xfactor, y+Yfactor, Bitmap::makeColor(200,200,200) );
+	who.triangle( x, y+3, x+Xfactor/2, y, x+Xfactor, y+3, Bitmap::makeColor(230,230,230) );
+}
+
+bool NormalRocket_WHull::Collide( int mx, int my, SpaceObject * check ) {
+	if ( check->HitMe( mx, my ) )
+		return true;
+	if ( check->HitMe( mx+Xfactor/2, my+Yfactor*2/3 ) )
+		return true;
+	return false;
+}