From 7d53552979835951ef73c988ecf20326c89c25a8 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Fri, 10 Jul 2015 07:54:34 +0200 Subject: [PATCH] Fix object viewer include issue --HG-- branch : develop --- code/nel/src/3d/font_generator.cpp | 5 ++++- code/nel/tools/3d/object_viewer/object_viewer.cpp | 9 +++++++-- code/nel/tools/3d/object_viewer/particle_dlg.cpp | 1 - 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/code/nel/src/3d/font_generator.cpp b/code/nel/src/3d/font_generator.cpp index 3c73a0a20..21453ba82 100644 --- a/code/nel/src/3d/font_generator.cpp +++ b/code/nel/src/3d/font_generator.cpp @@ -76,7 +76,10 @@ const char *CFontGenerator::getFT2Error(FT_Error fte) return ukn; } - +CFontGenerator *newCFontGenerator(const std::string &fontFileName) +{ + return new CFontGenerator(fontFileName); +} /* * Constructor diff --git a/code/nel/tools/3d/object_viewer/object_viewer.cpp b/code/nel/tools/3d/object_viewer/object_viewer.cpp index d79090662..c6f163146 100644 --- a/code/nel/tools/3d/object_viewer/object_viewer.cpp +++ b/code/nel/tools/3d/object_viewer/object_viewer.cpp @@ -36,7 +36,6 @@ #include "nel/3d/scene_group.h" #include "nel/3d/animation_playlist.h" #include "nel/3d/track_keyframer.h" -#include "nel/3d/font_generator.h" #include "nel/3d/register_3d.h" #include "nel/3d/seg_remanence.h" @@ -592,6 +591,12 @@ void CObjectViewer::initCamera () // *************************************************************************** +namespace NL3D { + CFontGenerator *newCFontGenerator(const std::string &fontFileName); +} + +// *************************************************************************** + bool CObjectViewer::initUI (HWND parent) { AFX_MANAGE_STATE(AfxGetStaticModuleState()); @@ -616,7 +621,7 @@ bool CObjectViewer::initUI (HWND parent) _FontPath+="\\fonts\\arial.ttf"; // The font generator - _FontGenerator = new NL3D::CFontGenerator ( _FontPath ); + _FontGenerator = NL3D::newCFontGenerator ( _FontPath ); delete[] wd; // The viewport diff --git a/code/nel/tools/3d/object_viewer/particle_dlg.cpp b/code/nel/tools/3d/object_viewer/particle_dlg.cpp index 7ee628da4..f56bfa1dd 100644 --- a/code/nel/tools/3d/object_viewer/particle_dlg.cpp +++ b/code/nel/tools/3d/object_viewer/particle_dlg.cpp @@ -44,7 +44,6 @@ #include "nel/3d/texture_grouped.h" #include "nel/3d/nelu.h" #include "nel/3d/font_manager.h" -#include "nel/3d/font_generator.h" // #include "nel/misc/file.h" #include "start_stop_particle_system.h"