Howdy folks. I hate to resort to taking up your time with what I'll expect to be a pretty lame question.
As in the title, I'm trying to work my way through the book "Games & Graphics in C++" (2nd edition).
It's been a chore. A huge tedious blood pressure raising chore, at the portion in which it wants to teach me AGK.
Code is not compatible and is likely written on an out of date platform, or simply not checked a'tall.
In fact it took me two after work evenings just to figure out why it couldn't find libraries.
I've muddled through a bit of it, but I've come to a complete brick wall for information here, now.
It wants me to change the position of a sprite, using of course, SetSpritePosition.
I've tried a few different ways to make it happen, but the sprite always stays in it's original location.
So I'm going to cave and ask some folks who know what they're doing for help.
Here's what I have to work with.
-----------------------------------------------------
// Includes
#include "template.h"
// Namespace
using namespace AGK;
app App;
const int SCREEN_WIDTH = 640;
const int SCREEN_HEIGHT = 480;
const int HOUSE_INDEX = 1;
const int GHOST_INDEX = 2;
const float GHOST_X = 200;
const float GHOST_Y = 150;
void app::Begin(void)
{
agk::SetVirtualResolution(SCREEN_WIDTH, SCREEN_HEIGHT);
agk::LoadImage(HOUSE_INDEX, "haunted_house.png");
agk::CreateSprite(HOUSE_INDEX);
agk::LoadImage(GHOST_INDEX, "ghost.png");
agk::SetSpritePosition(GHOST_INDEX, GHOST_X, GHOST_Y);
agk::CreateSprite(GHOST_INDEX);
}
void app::Loop (void)
{
agk::Sync();
}
void app::End (void)
{
}
----------------------------------------------
I've also tried
agk::SetSpritePosition(GHOST_INDEX, 200, 150);
I've also tried
agk::SetSpriteX(GHOST_INDEX, 200); same for Y.
I'm out of idea's and a forum search turned up less than helpful in this event.
Soo.. Where have I dum'd?
Thanks, guys!
Dave