Changeset 2428 for code/branches/objecthierarchy2/src/core
- Timestamp:
- Dec 13, 2008, 10:54:26 PM (16 years ago)
- Location:
- code/branches/objecthierarchy2/src/core
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/objecthierarchy2/src/core/BaseObject.h
r2369 r2428 135 135 inline Scene* getScene() const { return this->scene_; } 136 136 137 inline void setGametype(Gametype* gametype) { this->oldGametype_ = this->gametype_; this->gametype_ = gametype; this->changedGametype(); } 137 inline void setGametype(Gametype* gametype) 138 { 139 if (gametype != this->gametype_) 140 { 141 this->oldGametype_ = this->gametype_; 142 this->gametype_ = gametype; 143 this->changedGametype(); 144 } 145 } 138 146 inline Gametype* getGametype() const { return this->gametype_; } 139 147 inline Gametype* getOldGametype() const { return this->oldGametype_; } 140 virtual inlinevoid changedGametype() {}148 virtual void changedGametype() {} 141 149 142 150 void fireEvent(); … … 197 205 SUPER_FUNCTION(6, BaseObject, changedMainState, false); 198 206 SUPER_FUNCTION(9, BaseObject, changedName, false); 207 SUPER_FUNCTION(10, BaseObject, changedGametype, false); 199 208 } 200 209 -
code/branches/objecthierarchy2/src/core/Super.h
r2369 r2428 265 265 #define SUPER_changedName(classname, functionname, ...) \ 266 266 SUPER_NOARGS(classname, functionname) 267 268 #define SUPER_changedGametype(classname, functionname, ...) \ 269 SUPER_NOARGS(classname, functionname) 267 270 // (1/3) --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <-- 268 271 … … 513 516 514 517 SUPER_FUNCTION_GLOBAL_DECLARATION_PART1(9, changedName, false) 518 () 519 SUPER_FUNCTION_GLOBAL_DECLARATION_PART2; 520 521 SUPER_FUNCTION_GLOBAL_DECLARATION_PART1(10, changedGametype, false) 515 522 () 516 523 SUPER_FUNCTION_GLOBAL_DECLARATION_PART2; … … 568 575 SUPER_INTRUSIVE_DECLARATION(changedOverlayGroup); 569 576 SUPER_INTRUSIVE_DECLARATION(changedName); 577 SUPER_INTRUSIVE_DECLARATION(changedGametype); 570 578 // (3/3) --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <-- --> HERE <-- 571 579
Note: See TracChangeset
for help on using the changeset viewer.