I haven't been able to test AppGameKit V2 with my project since it crashes when deleting sprites or text. I created a simple piece of code that replicates the problem. I attached the entire project here in a zip file. I will summit a bug report and link it back here.
It is tier 2. It is a Visual C++ 2010 project. I use 2013 IDE and have windows 8.1.
Thanks for any help.
Crashing Code:
// Includes
#include "template.h"
// Namespace
using namespace std;
using namespace AGK;
int iImage;
int iSprite;
int iText;
int iCount = 0;
app App;
void app::Begin(void)
{
agk::SetVirtualResolution (1024, 768);
agk::SetClearColor( 0,0,0 );
agk::SetSyncRate(60,0);
agk::SetScissor(0,0,0,0);
agk::SetPrintSize(20);
iImage = agk::LoadImage("sprite.png", 1);
}
void app::Loop (void)
{
iCount++;
if (iCount == 1)
{
iSprite = agk::CreateSprite(iImage);
//agk::SetSpriteDepth(iSprite, 500);
//agk::SetSpriteAngle(iSprite, 81);
//agk::SetSpriteFlip(iSprite, 1, 0);
//agk::SetSpriteShape(iSprite);
//agk::SetSpritePositionByOffset(iSprite, 50, 50);
}
if (iCount == 5)
{
iText = agk::CreateText("Testing 1 ....");
//agk::SetTextString(iText, "Testing 2 ....");
agk::SetTextPosition(iText, 10, 10);
}
if (iCount == 10)
{
agk::DeleteSprite(iSprite);
}
if (iCount == 15)
{
agk::DeleteText(iText);
}
if (iCount == 20)
{
iCount = 0;
}
agk::Print(iCount);
agk::Sync();
}
void app::End (void)
{
}
Crash Error:
First-chance exception at 0x0141ACA0 in Template.exe: 0xC0000005: Access violation reading location 0xFEEEFEEE.
Unhandled exception at 0x0141ACA0 in Template.exe: 0xC0000005: Access violation reading location 0xFEEEFEEE.