X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fobject.cpp;h=404d30576113a97ad9516b04677d087f81ad4346;hb=89b8b0c60579d8ef0cf9a13521e7bf7c7864883f;hp=99d73ce7c5b61a628adce7ed53027b13f0418c0e;hpb=14fee18e7a8ebfccfc1ebe203fe049f268efb40a;p=architektonas diff --git a/src/object.cpp b/src/object.cpp index 99d73ce..404d305 100644 --- a/src/object.cpp +++ b/src/object.cpp @@ -40,8 +40,9 @@ Object::Object(): position(Vector(0, 0)), parent(0), type(OTObject), } -Object::Object(Vector v, Object * passedInParent/*= 0*/): position(v), parent(passedInParent), - state(OSInactive), oldState(OSInactive), needUpdate(false)//, attachedDimension(0) +Object::Object(Vector v, Object * passedInParent/*= 0*/): position(v), + parent(passedInParent), state(OSInactive), oldState(OSInactive), + needUpdate(false)//, attachedDimension(0) { } @@ -147,6 +148,7 @@ printf("Object: Destroyed!\n"); /*virtual*/ void Object::Disconnect(Object * obj, double parameter) { +#if 0 for(uint i=0; i::iterator i; + + for(i=connected.begin(); i!=connected.end(); i++) + { + if (((*i).object == obj) && ((*i).t == parameter)) + { + connected.erase(i); + return; + } + } +#endif } /*virtual*/ void Object::DisconnectAll(Object * obj) { +#if 0 // According the std::vector docs, only items at position i and beyond are // invalidated, everything before i is still valid. So we use that here. for(uint i=0; i::iterator i; + + for(i=connected.begin(); i!=connected.end(); ) + { + if ((*i).object == obj) + connected.erase(i); + else + i++; + } +#endif } @@ -189,6 +215,22 @@ printf("Object: Destroyed!\n"); #endif +/*virtual*/ void Object::Translate(Vector amount) +{ + position += amount; +} + + +/*virtual*/ void Object::Rotate(Vector, double) +{ +} + + +/*virtual*/ void Object::Scale(Vector, double) +{ +} + + ObjectState Object::GetState(void) { return state;