File: hull_weapon_machine.cpp

package info (click to toggle)
rafkill 1.2.2-3.3
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 13,268 kB
  • sloc: cpp: 13,508; makefile: 64; sh: 14
file content (42 lines) | stat: -rw-r--r-- 1,021 bytes parent folder | download | duplicates (12)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#include "hull_weapon.h"
#include "hull_weapon_machine.h"
#include "ebox.h"
#include "bitmap.h"

Machine_WHull::Machine_WHull( int str ):
HullWeapon( 0, 1, str ) {
	color = Bitmap::makeColor( 180, 20, 74 );
	switch ( str ) {
		case 1  :       color = Bitmap::makeColor(200,200,200); break;
		case 2  :       color = Bitmap::makeColor(40,210,95); break;
		case 3  :       color = Bitmap::makeColor(216,133,242); break;
		default : {
			int r = (int)(strength*10+strength)%255;
			int g = (int)(strength*2+150)%255;
			int b = (int)(strength * 14 + 100 ) % 255;
			color = Bitmap::makeColor(r,g,b);
		}
	}

	collide = new ECollide( 1, 1 );
	/*
	collide = new ECollide();
	collide->setXS( 0 );
	collide->setYS( 0 );
	collide->my_size = 1;
	EBox * arch = new EBox( 0, 0, 1, 1 );
	collide->add( arch );
	collide->finalize();
	*/

}


void Machine_WHull::Draw( const Bitmap & who, int x, int y ) {
	// circlefill( who, x, y, 1, color );
	who.circleFill( x, y, 1, color );
}

Machine_WHull::~Machine_WHull(){
	delete collide;
}