mirror of
https://github.com/vcmi/vcmi.git
synced 2025-03-25 21:38:59 +02:00
Moved object construction macros to more logical location
This commit is contained in:
parent
00605b5129
commit
337431901f
@ -112,24 +112,3 @@ public:
|
||||
};
|
||||
|
||||
extern CGuiHandler GH; //global gui handler
|
||||
|
||||
struct SObjectConstruction
|
||||
{
|
||||
CIntObject *myObj;
|
||||
SObjectConstruction(CIntObject *obj);
|
||||
~SObjectConstruction();
|
||||
};
|
||||
|
||||
struct SSetCaptureState
|
||||
{
|
||||
bool previousCapture;
|
||||
SSetCaptureState(bool allow, ui8 actions);
|
||||
~SSetCaptureState();
|
||||
};
|
||||
|
||||
#define OBJ_CONSTRUCTION SObjectConstruction obj__i(this)
|
||||
#define OBJ_CONSTRUCTION_TARGETED(obj) SObjectConstruction obj__i(obj)
|
||||
#define OBJECT_CONSTRUCTION_CAPTURING(actions) SSetCaptureState obj__i1(true, actions); SObjectConstruction obj__i(this)
|
||||
#define OBJECT_CONSTRUCTION_CUSTOM_CAPTURING(actions) SSetCaptureState obj__i1(true, actions); SObjectConstruction obj__i(this)
|
||||
|
||||
#define OBJ_CONSTRUCTION_CAPTURING_ALL_NO_DISPOSE SSetCaptureState obj__i1(true, 255 - DISPOSE); SObjectConstruction obj__i(this)
|
||||
|
@ -211,3 +211,24 @@ class EmptyStatusBar : public IStatusBar
|
||||
virtual void setEnteringMode(bool on){};
|
||||
virtual void setEnteredText(const std::string & text){};
|
||||
};
|
||||
|
||||
struct SObjectConstruction
|
||||
{
|
||||
CIntObject *myObj;
|
||||
SObjectConstruction(CIntObject *obj);
|
||||
~SObjectConstruction();
|
||||
};
|
||||
|
||||
struct SSetCaptureState
|
||||
{
|
||||
bool previousCapture;
|
||||
SSetCaptureState(bool allow, ui8 actions);
|
||||
~SSetCaptureState();
|
||||
};
|
||||
|
||||
#define OBJ_CONSTRUCTION SObjectConstruction obj__i(this)
|
||||
#define OBJ_CONSTRUCTION_TARGETED(obj) SObjectConstruction obj__i(obj)
|
||||
#define OBJECT_CONSTRUCTION_CAPTURING(actions) SSetCaptureState obj__i1(true, actions); SObjectConstruction obj__i(this)
|
||||
#define OBJECT_CONSTRUCTION_CUSTOM_CAPTURING(actions) SSetCaptureState obj__i1(true, actions); SObjectConstruction obj__i(this)
|
||||
|
||||
#define OBJ_CONSTRUCTION_CAPTURING_ALL_NO_DISPOSE SSetCaptureState obj__i1(true, ALL_ACTIONS); SObjectConstruction obj__i(this)
|
||||
|
Loading…
x
Reference in New Issue
Block a user