From: Rafal R. <di...@us...> - 2004-08-11 21:35:46
|
Update of /cvsroot/gemrb/gemrb/gemrb/plugins/Core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25376/gemrb/plugins/Core Modified Files: Ambient.cpp Ambient.h Log Message: moved Ambient accessors back to the header (to have them automatically inlined) Index: Ambient.cpp =================================================================== RCS file: /cvsroot/gemrb/gemrb/gemrb/plugins/Core/Ambient.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Ambient.cpp 9 Aug 2004 18:24:28 -0000 1.2 --- Ambient.cpp 11 Aug 2004 21:35:33 -0000 1.3 *************** *** 34,52 **** } - const char *Ambient::getName() const { return name; } - const Point &Ambient::getOrigin() const { return origin; } - ieWord Ambient::getRadius() const { return radius; } - ieWord Ambient::getHeight() const { return height; } - ieWord Ambient::getGain() const { return gain; } - char *Ambient::getSound(ieDword i) - { - if(i<sounds.size()) return sounds[i]; - return NULL; - } - ieDword Ambient::getInterval() const { return interval; } - ieDword Ambient::getPerset() const { return perset; } - ieDword Ambient::getAppearance() const { return appearance; } - ieDword Ambient::getFlags() const { return flags; } void Ambient::setActive() { flags |= IE_AMBI_ENABLED; } void Ambient::setInactive() { flags &= ~IE_AMBI_ENABLED; } - --- 34,37 ---- Index: Ambient.h =================================================================== RCS file: /cvsroot/gemrb/gemrb/gemrb/plugins/Core/Ambient.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Ambient.h 9 Aug 2004 18:24:28 -0000 1.3 --- Ambient.h 11 Aug 2004 21:35:33 -0000 1.4 *************** *** 50,63 **** Ambient(); ~Ambient(); ! const char *getName() const; ! const Point &getOrigin() const; ! ieWord getRadius() const; ! ieWord getHeight() const; ! ieWord getGain() const; ! char *getSound(ieDword i); ! ieDword getInterval() const; ! ieDword getPerset() const; ! ieDword getAppearance() const; ! ieDword getFlags() const; void setActive(); void setInactive(); --- 50,72 ---- Ambient(); ~Ambient(); ! ! /* there is a good reason to have these in the header: ! * they are automatically inlined, so we have ! * no roundtrips and no overhead for accessors --Divide */ ! const char *getName() const { return name; } ! const Point &getOrigin() const { return origin; } ! ieWord getRadius() const { return radius; } ! ieWord getHeight() const { return height; } ! ieWord getGain() const { return gain; } ! char *getSound(ieDword i) ! { ! if(i<sounds.size()) return sounds[i]; ! return NULL; ! } ! ieDword getInterval() const { return interval; } ! ieDword getPerset() const { return perset; } ! ieDword getAppearance() const { return appearance; } ! ieDword getFlags() const { return flags; } ! void setActive(); void setInactive(); |