File: hull_weapon_bomb.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 (36 lines) | stat: -rw-r--r-- 884 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
#include "defs.h"
#include "bitmap.h"
#include "raptor.h"

#include "hull_weapon.h"
#include "hull_weapon_bomb.h"

/* This class isnt used as far as I know */
Bomb_WHull::Bomb_WHull():
HullWeapon( WEAPON_BOMB_1, 1, 20 ),
frame( 0 ){}

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

	if ( ++frame > 100 ) frame = 0;
	if ( frame % 1 == 0 )
		if ( ++drawNum > WEAPON_BOMB_7 ) drawNum = WEAPON_BOMB_1;

	//int mx = ((BITMAP *)dat[ drawNum ].dat)->w/2;
	//int my = ((BITMAP *)dat[ drawNum ].dat)->h/2;

	//draw_sprite( who, (BITMAP *)dat[ drawNum ].dat, x-mx, y-my );

	//HullObject::Draw( who, dat, x, y );

	/* TODO: fix, i think o_O
	if ( ++frame > WEAPON_BOMB_7 ) frame = WEAPON_BOMB_1;

	drawNum = frame;
	int mx = ((BITMAP *)dat[ drawNum ].dat)->w/2;
	int my = ((BITMAP *)dat[ drawNum ].dat)->h/2;
	draw_sprite( who, (BITMAP *)dat[ drawNum ].dat, x-mx, y-my );

	*/

}