Hello, I recently purchased AppGameKit and had a blast with Tier 1. Now I am ready to take the libraries to C++, but I run into a issue.
Using the provided template for Visual Studio, I tried under app:Loop (void){
agk::LoadImage(1, "x.png");
agk::CreateSprite(1);
And put a x.png in my "Final" folder.
It worked properly (the image loaded). Please ignore the fact that there is no check if the sprite exists, I am aware to do this for an actual game/product. For the purposes of the demo, it does not matter.
However,
I made a class:
"Player.h"
#include <agk.h>
class Player{
public:
Player::Player(int iID, const char* kF);
};
[newfile] Player.cpp
#include "Player.h"
using namespace AGK;
Player::Player(int iID, const char* kF){
agk::LoadImage(iID, "x.png");
agk::CreateSprite(iID);
}
[back under the loop in template.cpp]
Player* x = new Player(1, "x.png");
Instead, I get a small white block in the corner of the window, no image.
What is causing this? I am misunderstanding the use of agk in Objects?