Tried this for testing purposes.
types.h
struct clickArea
{
float _Left;
float _Upper;
float _Right;
float _Lower;
};
struct scrollData{
float mouseX;
float mouseY;
clickArea buttonInventory;
int sprInventoryBG;
int pickup;
int drop;
int initInvItem;
int invItemSelected;
int usingItem;
};
struct sButtons
{
int NO;
clickArea clickNO;
int YES;
clickArea clickYES;
int TEST2;
clickArea clickTEST2;
int TEST;
clickArea clickTEST;
int inventory;
clickArea clickInventory;
int menu;
clickArea clickMenu;
};
struct fReturn
{
int INT1;
int INT2;
int INT3;
int INT4;
std::string STR1;
std::string STR2;
std::string STR3;
std::string STR4;
float FLT1;
float FLT2;
float FLT3;
float FLT4;
clickArea CA1;
bool leftMouse;
bool rightMouse;
};
struct LOOP_VARS
{
sButtons RRbuttons;
scrollData RRscroll;
int objPage;
int objIndex;
int osi;
int invItemSelected;
int initInvItem;
int invSize;
int usingItem;
int ingest;
std::string dialogue;
int NEWscene;
int newLOCUS;
int locChange;
std::string location;
int LOCUS;
int locDir;
std::string locOBJ;
std::string locLook;
std::string aniVideo;
int videoPlay;
int aniSpriteNum;
int doorOpen;
int thruDoor;
bool drop;
bool pickup;
int wake_up;
int inBedSL;
int inBedRM;
int ffImage;
int aniRaven;
int imgFreezeFrame;
int sprFreezeFrame;
int imageBlack;
int spriteBlack;
bool roomFirstTime;
std::string TOD;
int imgSprite;
int dirca;
bool loopToggle1;
bool invToggle;
bool invMenuState;
bool invSelect;
fReturn retPass;
};
main.cpp
// Includes
#include "template.h"
#include <string>
#include "types.h"
// Namespace
using namespace AGK;
using namespace std;
app App;
float screenWidth;
float screenHeight;
float mouseX;
float mouseY;
int loopCount;
LOOP_VARS MainLoop;
void app::Begin(void)
{
screenWidth = 1280;
screenHeight = 720;
agk::SetScreenResolution(1920, 1080);
agk::SetVirtualResolution(screenWidth, screenHeight);
agk::SetWindowSize(1920, 1080, 0);
agk::SetClearColor(0, 0, 0); // light blue
agk::SetSyncRate(60, 0);
agk::SetScissor(0, 0, 0, 0);
agk::SetWindowTitle("Cylical Redundancy Check");
for (int a = 1; a <= 40; a++)
{
agk::CreateText(a, "");
agk::SetTextSize(a, float(30));
agk::SetTextColor(a, 0, 255, 255, 255);
agk::SetTextPosition(a, float(1), float(a * 30));
agk::SetTextDepth(a, 0);
}
loopCount = 0;
}
void app::Loop (void)
{
mouseX = agk::GetPointerX();
mouseY = agk::GetPointerY();
char* smouseX = agk::Str(mouseX);
char* smouseY = agk::Str(mouseY);
agk::SetTextString(1, ("mouseX= " + std::string(smouseX)).c_str());
agk::SetTextString(2, ("mouseY= " + std::string(smouseY)).c_str());
delete[] smouseX;
delete[] smouseY;
agk::Sync();
if (agk::GetRawMouseLeftPressed() == 1)
{
MainLoop.loopToggle1 = 1;
MainLoop.retPass.leftMouse = 1;
}
if (agk::GetRawMouseRightPressed() == 1)
{
MainLoop.loopToggle1 = 1;
MainLoop.retPass.rightMouse = 1;
}
char* leftMouse = agk::Str(MainLoop.retPass.leftMouse);
char* rightMouse = agk::Str(MainLoop.retPass.rightMouse);
agk::SetTextString(4, ("leftMouse= " + std::string(leftMouse)).c_str());
agk::SetTextString(5, ("rightMouse= " + std::string(rightMouse)).c_str());
delete[] leftMouse;
delete[] rightMouse;
agk::Sync();
}
void app::End (void)
{
}
home.wavecable.com/~mindsclay