Hi,
As will be obvious from my pathetic question I am fairly new to Easy CE (and C++ for that matter). All I want to do is assign a tga file to a sprite. Is this possible or do I have to use a bitmap? The following shows the code I have been playing around with:
Any help would be muchly appreciated.
Cheers,
DS
As will be obvious from my pathetic question I am fairly new to Easy CE (and C++ for that matter). All I want to do is assign a tga file to a sprite. Is this possible or do I have to use a bitmap? The following shows the code I have been playing around with:
- Code:
void main()
{
unsigned short* buffer = (unsigned short*)getbuffer();
loadtga(L"\\My Documents\\Pocket Invaders\\Invaders_Title.tga", 240, 320, buffer);
PIXEL* buttonbuffer = new PIXEL[135 * 35];
loadtga(L"\\My Documents\\Pocket Invaders\\Button_Start.tga", 135, 35, buttonbuffer);
ASprite buttonsprite( 135, 35, 35, buttonbuffer );
ASprite::settarget( buffer );
buttonsprite.setpos( 50, 100 );
buttonsprite.draw();
while (clicked()) { update(); };
while (!clicked()) { update(); };
}
Any help would be muchly appreciated.
Cheers,
DS