From 5f3cc56b81ca2214055836d2f58c4ce6e53eb652 Mon Sep 17 00:00:00 2001 From: Adam Johnson Date: Sun, 28 Jun 2015 22:23:15 -0400 Subject: [PATCH] Actually overload some Max methods This has the pleasant side effect of completely and totally fixing busted light maps in the Max plugin --- Sources/Tools/MaxConvert/plMaxLightContext.h | 2 +- Sources/Tools/MaxConvert/plRenderGlobalContext.cpp | 2 +- Sources/Tools/MaxConvert/plRenderGlobalContext.h | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Sources/Tools/MaxConvert/plMaxLightContext.h b/Sources/Tools/MaxConvert/plMaxLightContext.h index 819987a5..3f6cdf8f 100644 --- a/Sources/Tools/MaxConvert/plMaxLightContext.h +++ b/Sources/Tools/MaxConvert/plMaxLightContext.h @@ -131,7 +131,7 @@ class plMaxRendContext : public RendContext public: Matrix3 WorldToCam() const { return Matrix3(1); } Color GlobalLightLevel() const { return Color(1.f, 1.f, 1.f); } - int Progress(int done, int total) { + int Progress(int done, int total) const { return 1; } }; diff --git a/Sources/Tools/MaxConvert/plRenderGlobalContext.cpp b/Sources/Tools/MaxConvert/plRenderGlobalContext.cpp index 94c4c159..442b0960 100644 --- a/Sources/Tools/MaxConvert/plRenderGlobalContext.cpp +++ b/Sources/Tools/MaxConvert/plRenderGlobalContext.cpp @@ -118,7 +118,7 @@ void plRenderGlobalContext::MakeRenderInstances(plMaxNode* root, TimeValue t) fInstList[i].SetNext(&fInstList[i+1]); } -RenderInstance* plRenderGlobalContext::GetRenderInstance(int i) const +RenderInstance* plRenderGlobalContext::GetRenderInstance(int i) { if (fInstList.GetCount() > i) return &fInstList[i]; diff --git a/Sources/Tools/MaxConvert/plRenderGlobalContext.h b/Sources/Tools/MaxConvert/plRenderGlobalContext.h index a464cf6a..a5ee3cb9 100644 --- a/Sources/Tools/MaxConvert/plRenderGlobalContext.h +++ b/Sources/Tools/MaxConvert/plRenderGlobalContext.h @@ -62,8 +62,8 @@ public: void MakeRenderInstances(plMaxNode* root, TimeValue t); - virtual int NumRenderInstances() const { return fInstList.GetCount(); } - virtual RenderInstance* GetRenderInstance( int i ) const; + virtual int NumRenderInstances() { return fInstList.GetCount(); } + virtual RenderInstance* GetRenderInstance( int i ); virtual void IntersectRay(RenderInstance *inst, Ray& ray, ISect &isct, ISectList &xpList, BOOL findExit); virtual BOOL IntersectWorld(Ray &ray, int skipID, ISect &hit, ISectList &xplist, int blurFrame = NO_MOTBLUR);