Shmup/src/shmup/impact.cpp

41 lines
529 B
C++

#include "../config.h"
#include "impact.h"
extern bopti_image_t img_emp_circ;
Impact::Impact( uint16_t _x, uint16_t _y )
{
x = _x;
y = _y;
framecount = 6;
toberemoved = false;
};
Impact::~Impact()
{
};
void Impact::Update( float dt )
{
framecount++;
if(framecount>=8) toberemoved = true;
};
void Impact::Render( void )
{
uint8_t dximg = framecount * 15;
uint8_t sz = framecount;
azrp_subimage_p8( x-sz, y-sz, &img_emp_circ, dximg+7-sz, 7-sz, sz*2+1, sz*2+1, DIMAGE_NONE );
};