Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "fe7.h"
- namespace dir{
- enum dirs{right = 0x10, left = 0x20, up = 0x40, down = 0x80};
- }
- namespace pointerdir{
- enum dirs{up, down, left, right};
- }
- struct RButton;
- class RButtonData{
- private:
- int buf[11];
- RButton* rbutton;
- int buf2[7];
- u16 text;
- u16 buf3;
- u16 direction;
- public:
- RButton* getR(){
- return this->rbutton;
- }
- u16 getText(){
- return this->text;
- }
- u16 getDir(){
- return this->direction;
- }
- void setText(u16 arg){
- this->text = arg;
- }
- void setDir(u16 arg){
- this->direction = arg;
- }
- };
- class RButton{
- private:
- RButton* otherdata[4];
- //0
- u8 xcoord;
- //+10
- u8 ycoord;
- //+11
- u16 text;
- //+12
- bool (*condition)(RButtonData*);
- //+14
- void (*setTextID)(RButtonData*);
- //+18
- public:
- RButton* getDirectionPointer(pointerdir::dirs arg){
- return (arg < pointerdir::up || arg > pointerdir::right) ? NULL : this->otherdata[arg];
- }
- u8 getX(){
- return this->xcoord;
- }
- u8 getY(){
- return this->ycoord;
- }
- u16 getText(){
- return this->text;
- }
- bool (*getCondition())(RButtonData* arg){
- return this->condition;
- }
- bool getCondition(RButtonData* arg){
- return (this->getCondition())(arg);
- }
- void (*setTextFunc())(RButtonData* arg){
- return this->setTextID;
- }
- void setText(RButtonData* arg){
- (this->setTextFunc())(arg);
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement