~ubuntu-branches/ubuntu/natty/smc/natty

« back to all changes in this revision

Viewing changes to src/video/font.h

  • Committer: Bazaar Package Importer
  • Author(s): Muammar El Khatib
  • Date: 2008-10-20 00:31:35 UTC
  • mfrom: (1.1.4 upstream) (5.1.1 sid)
  • Revision ID: james.westby@ubuntu.com-20081020003135-5ac8cpecomfohvv5
Tags: 1.6-1
* New upstream release. (Closes:#479415)
* Bumped standards version to 3.8.0.
* debian/control: dpatch build dependency has been removed temporarily.
* debian/control: smc-data does not depend on smc anymore. This change will
  avoid a circular dependency. (Closes: #478712)
* smc does not segfault. (Closes: #500039, #491590) 
* Icon is not missed in Gnome Menu. Thanks to Saïvann for providing a 
  solution. (Closes: #491885)
* debian/control: smc-data's and smc-music's descriptions have been improved.
  (Closes: #493630)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/***************************************************************************
2
 
                        font.h  -  header for the corresponding cpp file
3
 
                         -------------------
4
 
    copyright            : (C) 2006 - 2007 by Florian Richter
 
2
 * font.h  -  header for the corresponding cpp file
 
3
 *
 
4
 * Copyright (C) 2006 - 2008 Florian Richter
5
5
 ***************************************************************************/
6
6
/*
7
7
   This program is free software; you can redistribute it and/or modify
13
13
   along with this program.  If not, see <http://www.gnu.org/licenses/>.
14
14
*/
15
15
 
16
 
#ifndef __FONT_H__
17
 
#define __FONT_H__
 
16
#ifndef SMC_FONT_H
 
17
#define SMC_FONT_H
18
18
 
19
19
#include "../core/globals.h"
20
20
#include "../video/img_manager.h"
21
21
 
22
 
/* *** *** *** *** *** *** *** Font class *** *** *** *** *** *** *** *** *** *** */
 
22
/* *** *** *** *** *** *** *** Font Manager class *** *** *** *** *** *** *** *** *** *** */
23
23
 
24
24
// Deletes an active Font Surface
25
25
void Font_Delete_Ref( GL_Surface *surface );
26
26
 
27
 
class cFont
 
27
class cFont_Manager
28
28
{
29
29
public:
30
 
        cFont( void );
31
 
        ~cFont( void );
 
30
        cFont_Manager( void );
 
31
        ~cFont_Manager( void );
32
32
 
33
33
        // initialization
34
34
        void Init( void );
39
39
        void Delete_Ref( GL_Surface *surface );
40
40
 
41
41
        // Renders the given text into a new surface
42
 
        GL_Surface *RenderText( TTF_Font *font, string text, Color color = static_cast<Uint8>(0) );
 
42
        GL_Surface *Render_Text( TTF_Font *font, string text, Color color = static_cast<Uint8>(0) );
43
43
 
44
44
        /* Saves hardware textures in software memory
45
45
        */
56
56
        typedef vector<GL_Surface *> ActiveFontList;
57
57
        ActiveFontList active_fonts;
58
58
 
59
 
        // saved software textures for reloading
60
 
        SoftwareTextureList software_textures;
 
59
        // saved software textures only used for reloading
 
60
        Saved_Texture_List software_textures;
61
61
};
62
62
 
63
63
/* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
64
64
 
65
65
// Font Handler
66
 
extern cFont *pFont;
 
66
namespace SMC
 
67
{ // work around conflicts caused by lack of namespace use in smc
 
68
extern cFont_Manager *pFont;
 
69
}
67
70
 
68
71
/* *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** */
 
72
using namespace SMC;
69
73
 
70
74
#endif