File: hull_weapon_yehat.cpp

package info (click to toggle)
rafkill 1.2.2-4
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 13,268 kB
  • ctags: 5,074
  • sloc: cpp: 13,508; makefile: 64; sh: 14
file content (31 lines) | stat: -rw-r--r-- 681 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
#include "hull_weapon.h"
#include "bitmap.h"
#include "hull_weapon_yehat.h"
#include "ebox.h"

Yehat_WHull::Yehat_WHull( int str ):
HullWeapon( 0, 1, str ) {
	strength = str;

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


void Yehat_WHull::Draw( const Bitmap & who, int x, int y ) {

	int str = (int)strength;
	
	int col = 150+str<255?150+str:255;
	col = str*5<255?str*5:255;
	// circlefill( who, x, y, 2, makecol(250,col,str%255) );
    	who.circleFill( x, y, 2, Bitmap::makeColor(250,col,str%255) );
}