comparison src/dmtext_bm.c @ 1950:a3983da9b8b9

Constify.
author Matti Hamalainen <ccr@tnsp.org>
date Sat, 30 Jun 2018 00:45:42 +0300
parents 5e5f75b45f8d
children ebcb7713bb6a
comparison
equal deleted inserted replaced
1949:f8e2728c1b7f 1950:a3983da9b8b9
51 dmDrawBMTextVA(screen, font, condensed, mode, xc, yc, fmt, ap); 51 dmDrawBMTextVA(screen, font, condensed, mode, xc, yc, fmt, ap);
52 va_end(ap); 52 va_end(ap);
53 } 53 }
54 54
55 55
56 DMBitmapFont *dmNewBitmapFont(int nglyphs, int width, int height) 56 DMBitmapFont *dmNewBitmapFont(const int nglyphs, const int width, const int height)
57 { 57 {
58 DMBitmapFont *font = dmMalloc0(sizeof(DMBitmapFont)); 58 DMBitmapFont *font = dmMalloc0(sizeof(DMBitmapFont));
59 if (font == NULL) 59 if (font == NULL)
60 return NULL; 60 return NULL;
61 61
96 96
97 /* Set the palette for each glyph. While the function allows you to 97 /* Set the palette for each glyph. While the function allows you to
98 * specify 'start' and 'end' indices and palette array freely, you should 98 * specify 'start' and 'end' indices and palette array freely, you should
99 * typically use DMFONT_NPALETTE size palette starting at index 0. 99 * typically use DMFONT_NPALETTE size palette starting at index 0.
100 */ 100 */
101 int dmSetBitmapFontPalette(DMBitmapFont *font, SDL_Color *pal, int start, int size) 101 int dmSetBitmapFontPalette(DMBitmapFont *font, const SDL_Color *pal, const int start, const int size)
102 { 102 {
103 int i; 103 int i;
104 104
105 if (font == NULL) 105 if (font == NULL)
106 return DMERR_NULLPTR; 106 return DMERR_NULLPTR;
117 } 117 }
118 } 118 }
119 119
120 return DMERR_OK; 120 return DMERR_OK;
121 } 121 }
122
122 123
123 //#define FN_DEBUG 124 //#define FN_DEBUG
124 125
125 int dmLoadBitmapFont(DMResource *res, DMBitmapFont **pfont) 126 int dmLoadBitmapFont(DMResource *res, DMBitmapFont **pfont)
126 { 127 {