diff --git a/src/plg.cpp b/src/plg.cpp index 0cf8afb..2b94ecb 100644 --- a/src/plg.cpp +++ b/src/plg.cpp @@ -106,6 +106,8 @@ PluginList::registerPlugin(int32 size, uint32 id, Plugin *p = (Plugin*)malloc(sizeof(Plugin)); p->offset = this->size; this->size += size; + int32 round = sizeof(void*)-1; + this->size = (this->size + round)&~round; p->size = size; p->id = id; diff --git a/src/rwobjects.h b/src/rwobjects.h index 0b9ac91..02b1d5e 100644 --- a/src/rwobjects.h +++ b/src/rwobjects.h @@ -472,6 +472,11 @@ struct Atomic : PluginBase Sphere *getWorldBoundingSphere(void); ObjPipeline *getPipeline(void); void render(void) { this->renderCB(this); } + void setRenderCB(RenderCB renderCB){ + this->renderCB = renderCB; + if(this->renderCB == nil) + this->renderCB = defaultRenderCB; + }; static Atomic *streamReadClump(Stream *stream, FrameList_ *frameList, Geometry **geometryList); bool streamWriteClump(Stream *stream, FrameList_ *frmlst);