What do you have to do:
1. Delete interpreter.cpp & interpreter.h
2. Inside Core.cpp place this:
#include "template.h" instead of this
#include "interpreter.h"
3. Do the same to CoreForApp.h
4. Add these
unsigned int g_dwDeviceWidth;
unsigned int g_dwDeviceHeight;
unsigned int g_dwFullScreen;
unsigned int g_dwResolutionMode;
char g_pWindowTitle [ 512 ];
inside
class app {
public:
// here
};
(Basically, somewhere inside template.h, inside app class in public)
5. You're done.
Here's how my template.h looks like:
#ifndef _H_APP
#define _H_APP
// Link to AGK libraries
#include "agk.h"
// Global values for the app
class app
{
public:
// main vars
public:
unsigned int g_dwDeviceWidth;
unsigned int g_dwDeviceHeight;
unsigned int g_dwFullScreen;
unsigned int g_dwResolutionMode;
char g_pWindowTitle [ 512 ];
// constructor
app() { memset ( this, 0, sizeof(app)); }
// main app functions
void Begin( void );
void Loop( void );
void End( void );
};
extern app App;
#endif
// Allow us to use the LoadImage function name
#ifdef LoadImage
#undef LoadImage
#endif
Here's how my template.cpp looks like:
// Includes, namespace and prototypes
#include "template.h"
using namespace AGK;
app App;
// Begin app, called once at the start
void app::Begin( void )
{
}
// Main loop, called every frame
void app::Loop ( void )
{
agk::Sync();
}
// Called when the app ends
void app::End ( void )
{
}
6. Delete functions:
void AppQuitNow ( void )
void AppGatherData ( DWORD dwhWnd, char* lpCmdLine )
void RuntimError ( const char* pErrorString )
from CoreForApp.h. They're in there for interpreter, which you don't use.
After that, simply edit bar-descriptor.xml for things you need.
And here's stupid error to fix:
Be able to rename your project to something else than AGKProject. (When you rename it to something else, it stops working)