Well, i'm still having trouble with getting the crosshair to work. what i want to acheive is getting a simple HUD to work. If there is anyone who has made a HUD or knows how to, i think it will not only help me, but alot of other peeps out there using this wonderful engine.
PLZ!
HUD HELP PLZ!
Personally Im just making a 2D game but drawing to the screen goes sort of like this:
Something like that. Have a look at the getTexture and the makeColorKeyTexture functions and also the draw2DImage function I recon
Code: Select all
// Load the image
sPlayer.tImage = gZomfg->gDevice->getVideoDriver()->getTexture("images/pacman.bmp");
// Set keycolor
gZomfg->gDevice->getVideoDriver()->makeColorKeyTexture(sPlayer.tImage, position2d<s32>(0,0));
void CGameStatePlaying::drawPlayer(void)
{
gZomfg->gDevice->getVideoDriver()->draw2DImage(sPlayer.tImage, position2d<s32>(sPlayer.iPositionX, sPlayer.iPositionY), sPlayer.rAnimations[sPlayer.iAnimState], 0, SColor(255,255,255,255), true);
}