my code
// Includes, namespace and prototypes
#include "template.h"
using namespace AGK;
app App;
float fx, fy;
int seanImage, seanSprite, streetImage, bgSprite;
int dummy[50];
int maptile[50];
// Begin app, called once at the start
void app::Begin( void )
{
streetImage = agk::LoadImage("images/testlevelright.png");
bgSprite = agk::CreateSprite(streetImage);
agk::SetSpriteSize(bgSprite,-1, 100.f);
agk::SetSpriteVisible(bgSprite,1);
//agk::FixSpriteToScreen(,0);
agk::SetSpriteDepth(bgSprite, 10);
//set text properties
agk::CreateText(1, "Start");
//imageFont = agk::LoadImage("Images/font.png");
// agk::SetTextDefaultFontImage(imageFont);
agk::SetTextColor(1, 255, 255, 255, 255);
agk::SetTextSize(1,10);
agk::SetTextPosition(1, 35.0f, 15.0f);
agk::SetTextDepth(1,0);
//agk::SetTextLineSpacing( 1, 0 );
agk::SetTextVisible(1,1);
//for(int i =0; i <50; i++)
//{
// //maptile[i] = 1;
// if( (i % 5 == 0) && (i > 5))
// {
// maptile[i] = 0;
//
// }
// else
// {
// maptile[i] = 1;
// }
// if(maptile[i] == 1)
// {
// agk::CreateDummySprite(dummy[i]);
// agk::SetSpriteShapeBox(dummy[i], 0, 1, 15, 13, 0);
// agk::SetSpritePosition(dummy[i], i + 10,60.f);
//
// }
//}
agk::SetTextString(1, agk::Str(maptile[25], 4));
agk::CreateDummySprite(dummy[0]);
agk::SetSpriteShapeBox(dummy[0], 3,24,12,26,0);
agk::SetSpritePosition(dummy[0], 50,70.f);
//for(int i = 0; i < 10; i++)
//{
// agk::CreateDummySprite(dummy[i]);
;
// agk::SetSpritePosition(dummy[i], 10 + i, 80.f);
//
//}
seanImage = agk::LoadImage("images/cakewalk1.png");
seanSprite = agk::CreateSprite(seanImage);
agk::SetSpritePosition(seanSprite, 30.0f, 60.0f);
agk::SetSpriteAnimation(seanSprite, 26, 36, 8);
agk::SetSpriteDepth(seanSprite, 5);
agk::SetSpriteSize(seanSprite, 15.0f, -1);
agk::SetSpriteVisible(seanSprite, 1);
agk::SetSpritePhysicsOn ( seanSprite, 2 );
agk::SetSpriteShape(seanSprite, 2);
agk::FixSpriteToScreen (seanSprite, 0 );
//agk::SetSpriteShapeBox(seanSprite, 3, 24, 12, 26, 0);
//agk::SetSpriteFlip(seanSprite,1,0);
agk::SetPhysicsGravity( 10,10);
agk::PlaySprite(seanSprite, 3, 1, 5, 5);
agk::SetPhysicsDebugOn();
//agk::SetPhysicsWallBottom(1);
}
// Main loop, called every frame
void app::Loop ( void )
{
agk::SetViewOffset(fx, fy);
//agk::SetSpriteX(seanSprite, agk::GetSpriteX(seanSprite) + 0.25f);
fx += 0.25f;
agk::Sync();
}