It's a very simple app. I'm just playing around with the sdk. Here's my source code:
#include "DragonFireSDK.h"
#include "stdlib.h"
using namespace std;
int AddToScore(int touchId);
const int CUR_SCORE_TEXT_MAX_LENGTH = 200;
const int CUR_SCORE_FONT_SIZE = 20;
int fontId = 0;
int curScore = 0;
char curScoreText[10] = "\0";
int scoreLabelId = 0;
int scoreButtonId = 0;
const int BUTTON_TOUCH_ID = 1;
void AppMain()
{
fontId = FontAdd("Arial", "Regular", CUR_SCORE_FONT_SIZE, 0xff0000);
scoreButtonId = ButtonAdd("Images/button", 100, 100, AddToScore, BUTTON_TOUCH_ID);
scoreLabelId = TextAdd(10, 10, curScoreText, fontId);
}
void AppExit()
{
}
void OnTimer()
{
itoa(curScore, curScoreText, 10);
TextSetText(scoreLabelId, curScoreText);
}
int AddToScore(int touchId)
{
curScore++;
return 0;
}