source: trunk/src/forge.cpp @ 2815

Last change on this file since 2815 was 2815, checked in by lolbot, 7 years ago

fixed 542 files out of 2754:

  • removed 0 CR characters
  • removed 0 trailing whitespaces
  • replaced 0 tabs with spaces
  • fixed 542 svn:eol-style properties
  • Property svn:eol-style set to CR
  • Property svn:keywords set to Id
File size: 1018 bytes
Line 
1// // Lol Engine // // Copyright: (c) 2010-2011 Sam Hocevar <sam@hocevar.net> //   This program is free software; you can redistribute it and/or //   modify it under the terms of the Do What The Fuck You Want To //   Public License, Version 2, as published by Sam Hocevar. See //   http://www.wtfpl.net/ for more details. // #if defined HAVE_CONFIG_H #   include "config.h" #endif #include "core.h" namespace lol { /*  * Forge implementation class  */ static class ForgeData {     friend class Forge; public:     Dict fonts; } forgedata; static ForgeData * const data = &forgedata; /*  * Public Forge class  */ int Forge::Register(char const *path) {     int id = data->fonts.MakeSlot(path);     if (!data->fonts.GetEntity(id))     {         Font *font = new Font(path);         data->fonts.SetEntity(id, font);     }     return id; } void Forge::Deregister(int id) {     data->fonts.RemoveSlot(id); } Font *Forge::GetFont(int id) {     return (Font *)data->fonts.GetEntity(id); } } /* namespace lol */
Note: See TracBrowser for help on using the repository browser.