J :
* Add some pretty printers to help debugging.
This commit is contained in:
@@ -113,7 +113,7 @@ void DuelLayers::Render(){
|
||||
int DuelLayers::receiveEvent(WEvent * e){
|
||||
|
||||
#if 1
|
||||
#define PRINT_IF(type) { type *foo = dynamic_cast<type*>(e); if (foo) cout << "Is a " << #type << endl; }
|
||||
#define PRINT_IF(type) { type *foo = dynamic_cast<type*>(e); if (foo) cout << "Is a " #type " " << *foo << endl; }
|
||||
cout << "Received event " << e << " ";
|
||||
PRINT_IF(WEventZoneChange);
|
||||
PRINT_IF(WEventDamage);
|
||||
|
||||
Reference in New Issue
Block a user