Changeset 10576 for code/branches/core7/src/libraries/core
- Timestamp:
- Sep 9, 2015, 2:15:46 PM (9 years ago)
- Location:
- code/branches/core7/src/libraries/core
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core7/src/libraries/core/BaseObject.cc
r10571 r10576 63 63 this->bActive_ = true; 64 64 this->bVisible_ = true; 65 this->oldGametype_ = 0;66 65 this->bRegisteredEventStates_ = false; 67 66 -
code/branches/core7/src/libraries/core/BaseObject.h
r10571 r10576 148 148 inline virtual uint32_t getSceneID() const { return this->sceneID_; } 149 149 150 inline void setGametype(const StrongPtr<Gametype>& gametype) 151 { 152 if (gametype != this->gametype_) 153 { 154 this->oldGametype_ = this->gametype_; 155 this->gametype_ = gametype; 156 this->changedGametype(); 157 } 158 } 150 inline void setGametype(const StrongPtr<Gametype>& gametype) { this->gametype_ = gametype; } 159 151 inline Gametype* getGametype() const { return this->gametype_; } 160 inline Gametype* getOldGametype() const { return this->oldGametype_; }161 virtual void changedGametype() {}162 152 163 153 inline void setLevel(const StrongPtr<Level>& level) { this->level_ = level; } … … 219 209 uint32_t sceneID_; 220 210 StrongPtr<Gametype> gametype_; 221 Gametype* oldGametype_;222 211 StrongPtr<Level> level_; 223 212 std::set<Template*> templates_; … … 235 224 SUPER_FUNCTION(4, BaseObject, XMLEventPort, false); 236 225 SUPER_FUNCTION(8, BaseObject, changedName, false); 237 SUPER_FUNCTION(9, BaseObject, changedGametype, false);238 226 } 239 227 -
code/branches/core7/src/libraries/core/class/Super.h
r9667 r10576 274 274 SUPER_NOARGS(classname, functionname) 275 275 276 #define SUPER_changedGametype(classname, functionname, ...) \277 SUPER_NOARGS(classname, functionname)278 279 276 #define SUPER_changedUsed(classname, functionname, ...) \ 280 277 SUPER_NOARGS(classname, functionname) … … 555 552 SUPER_FUNCTION_GLOBAL_DECLARATION_PART2; 556 553 557 SUPER_FUNCTION_GLOBAL_DECLARATION_PART1(9, changedGametype, false) 558 () 559 SUPER_FUNCTION_GLOBAL_DECLARATION_PART2; 560 561 SUPER_FUNCTION_GLOBAL_DECLARATION_PART1(10, changedUsed, false) 562 () 563 SUPER_FUNCTION_GLOBAL_DECLARATION_PART2; 564 565 SUPER_FUNCTION_GLOBAL_DECLARATION_PART1(11, changedCarrier, false) 566 () 567 SUPER_FUNCTION_GLOBAL_DECLARATION_PART2; 568 569 SUPER_FUNCTION_GLOBAL_DECLARATION_PART1(12, changedPickedUp, false) 554 SUPER_FUNCTION_GLOBAL_DECLARATION_PART1(9, changedUsed, false) 555 () 556 SUPER_FUNCTION_GLOBAL_DECLARATION_PART2; 557 558 SUPER_FUNCTION_GLOBAL_DECLARATION_PART1(10, changedCarrier, false) 559 () 560 SUPER_FUNCTION_GLOBAL_DECLARATION_PART2; 561 562 SUPER_FUNCTION_GLOBAL_DECLARATION_PART1(11, changedPickedUp, false) 570 563 () 571 564 SUPER_FUNCTION_GLOBAL_DECLARATION_PART2; … … 623 616 SUPER_INTRUSIVE_DECLARATION(changedOverlayGroup); 624 617 SUPER_INTRUSIVE_DECLARATION(changedName); 625 SUPER_INTRUSIVE_DECLARATION(changedGametype);626 618 SUPER_INTRUSIVE_DECLARATION(changedUsed); 627 619 SUPER_INTRUSIVE_DECLARATION(changedCarrier);
Note: See TracChangeset
for help on using the changeset viewer.