summaryrefslogtreecommitdiff
path: root/rwsdk/include/d3d8/rtcharse.h
blob: 4fdc2568fa368b7b92396977aedd89789a4e21e0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
/*
 *
 * Data structures for the charse toolkit
 */

/***************************************************************************
 *                                                                         *
 * Module  : rtcharse.h                                                    *
 *                                                                         *
 * Purpose : Charset handling                                              *
 *                                                                         *
 **************************************************************************/

#ifndef RTCHARSE_H
#define RTCHARSE_H

/**
 * \defgroup rtcharset RtCharset
 * \ingroup rttool
 *
 * Character Set/Foot Toolkit for RenderWare.
 */

/****************************************************************************
 Includes
 */

#include <rwcore.h>

/****************************************************************************
 Global Types
 */

/* RWPUBLIC */

typedef struct RtCharsetDesc RtCharsetDesc;

/**
 * \ingroup rtcharset
 * \struct RtCharsetDesc
 * Holds information about a character set.
 */
struct RtCharsetDesc
{
    RwInt32             width;
                        /**< Pixel-width of each character.   */
    RwInt32             height;
                        /**< Pixel-height of each character.  */
    RwInt32             width_internal;
                        /**< Pixel-width used internally, this is usually width+1 to add a border */
    RwInt32             height_internal;
                        /**< Pixel-height used internally, this is usually height+1 to add a border */
    RwInt32             count;
                        /**< Number of characters in the set. */
    RwInt32             tilewidth;
                        /**< Width of raster in characters.   */
    RwInt32             tileheight;
                        /**< Height of raster in characters.  */

};

/**
 * \ingroup rtcharset
 * \typedef RtCharset
 * typedef for a structure defining a character set (opaque).
 * \see RtCharsetCreate
 */
typedef RwRaster    RtCharset;

/* RWPUBLICEND */

/****************************************************************************
 Function prototypes
 */

/* RWPUBLIC */

#ifdef    __cplusplus
extern              "C"
{
#endif                          /* __cplusplus */

extern RwBool       RtCharsetOpen(void);
extern void         RtCharsetClose(void);

extern RtCharset   *RtCharsetPrint(RtCharset * charSet,
                                   const RwChar * string,
                                   RwInt32 x, RwInt32 y);
extern RtCharset   *RtCharsetPrintBuffered(RtCharset * charSet,
                                           const RwChar * string,
                                           RwInt32 x, RwInt32 y,
                                           RwBool hideSpaces);
extern RwBool       RtCharsetBufferFlush(void);

extern RtCharset   *RtCharsetSetColors(RtCharset * charSet,
                                       const RwRGBA * foreGround,
                                       const RwRGBA * backGround);
extern RtCharset   *RtCharsetGetDesc(RtCharset * charset,
                                     RtCharsetDesc * desc);

extern RtCharset   *RtCharsetCreate(const RwRGBA * foreGround,
                                    const RwRGBA * backGround);
extern RwBool       RtCharsetDestroy(RtCharset * charSet);

#ifdef    __cplusplus
}
#endif                          /* __cplusplus */

/* RWPUBLICEND */

#endif                          /* RTCHARSE_H */