#include "rA1Main.h"
rA1Main Engine;
int main (void)
{
//Engine.Initialize("Program!!!", true, 640, 480);
/*
Error: .WaitUntilKeyPress must have class/struct/union type.
But it is already part of Keyboard, which is part of Engine...
*/
Engine.Keyboard.WaitUntilKeyPressed();
return 0;
}
rA1Main.h
#ifndef _RA1MAIN_H_
#define _RA1MAIN_H_
#pragma once
class rA1Main
{
public:
rA1Keyboard Keyboard;
};
#endif /* _RA1MAIN_H_ */
rA1Main.cpp
#include <allegro.h>
#include "rA1Keyboard.h"
#include "rA1Main.h"
rA1Keyboard.h
#ifndef _RA1KEYBOARD_H_
#define _RA1KEYBOARD_H_
#pragma once
class rA1Keyboard
{
public:
void WaitUntilKeyboard(void);
};
#endif /* _RA1KEYBOARD_H_ */
rA1Keyboard.cpp
#include "rA1Keyboard.h"
void rA1Keyboard::WaitUntilKeyPress(void)
{
// code
return;
}
Rob LoachWebsite: Over-Development
Current Project: Pong, The First
"The question is not how far, the question is do you possess the constitution, the depth of faith, to go as far as is needed."
- The Boondock Saints