]> git.tdb.fi Git - r2c2.git/blobdiff - source/3d/overlay.cpp
Mscellaneous adaptations to mspgl API changes
[r2c2.git] / source / 3d / overlay.cpp
index 6065dbf7ccbdac06e80503a9c6ae357ed2715ff4..bab469ca4cf0cb14bc3994d705498f01adf1e927 100644 (file)
@@ -1,10 +1,3 @@
-/* $Id$
-
-This file is part of R²C²
-Copyright © 2010-2011  Mikkosoft Productions, Mikko Rasa
-Distributed under the GPL
-*/
-
 #include <algorithm>
 #include <cmath>
 #include <msp/fs/path.h>
@@ -91,7 +84,7 @@ void Overlay3D::render(GL::Renderer &renderer, const GL::Tag &) const
 
        glLineWidth(1);
 
-       int size = int(font.get_default_size()+0.5);
+       int size = int(font.get_native_size()+0.5);
        float spacing = round(size*1.1)/size;
        float baseline = round((0.5-font.get_ascent()*0.5-font.get_descent()*0.5)*size)/size;
 
@@ -147,7 +140,7 @@ const GL::Mesh *Overlay3D::get_graphic(const string &name)
                {
                        DataFile::load(*grf, (FS::Path("icons")/(name+".mesh")).str());
                }
-               catch(const Exception &e)
+               catch(const exception &e)
                {
                        IO::print("Error loading overlay graphic '%s': %s\n", name, e.what());
                        delete grf;
@@ -190,7 +183,7 @@ void Overlay3D::update_icon(Icon &icon)
        {
                GL::MeshBuilder bld(icon.text);
                bld.color(0.0f, 1.0f, 0.0f);
-               font.draw_string(icon.label, bld);
+               font.build_string(icon.label, bld);
        }
 }