00001 /* 00002 $Id: font_generic.cpp,v 1.1 2001/03/06 15:09:20 mbn Exp $ 00003 00004 ------------------------------------------------------------------------ 00005 ClanLib, the platform independent game SDK. 00006 00007 This library is distributed under the GNU LIBRARY GENERAL PUBLIC LICENSE 00008 version 2. See COPYING for details. 00009 00010 For a total list of contributers see CREDITS. 00011 00012 ------------------------------------------------------------------------ 00013 */ 00014 00015 #include "Core/precomp.h" 00016 #include "font_generic.h" 00017 #include <API/Core/Resources/resource_manager.h> 00018 00019 CL_Font_Generic::CL_Font_Generic() 00020 { 00021 ref_count = 0; 00022 resource = NULL; 00023 } 00024 00025 CL_Font_Generic::~CL_Font_Generic() 00026 { 00027 if(resource != NULL) resource->unload(); 00028 resource = NULL; 00029 } 00030 00031 int CL_Font_Generic::add_reference() 00032 { 00033 if (ref_count > 0 && resource != NULL) resource->load(); 00034 return ++ref_count; 00035 } 00036 00037 int CL_Font_Generic::release_reference() 00038 { 00039 if (resource != NULL) resource->unload(); 00040 return --ref_count; 00041 }
1.2.6 written by Dimitri van Heesch,
© 1997-2001