From 5c3240cce35bedf6563bc724923d1195abb94eaa Mon Sep 17 00:00:00 2001 From: aap Date: Thu, 21 Jul 2016 17:06:56 +0200 Subject: [PATCH] small changes --- src/plg.cpp | 2 ++ src/rwobjects.h | 5 +++++ 2 files changed, 7 insertions(+) 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);