annotate tools/libgutil.h @ 2385:5ffc48a0bebe

Conditionally define DM_ATTR_PRINTF_FMT(xstart, xend) instead of using __attribute__ ((__format__ (__printf__, (xstart), (xend)))) directly. Wrap it in an #ifdef check for __MINGW64__ as there are some annoying issues on that side, which we just suppress now.
author Matti Hamalainen <ccr@tnsp.org>
date Thu, 09 Jan 2020 18:51:22 +0200
parents 43e39d9ec42f
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1327
59e9ad13b50e Move common functions to libgutil.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
1 /*
59e9ad13b50e Move common functions to libgutil.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
2 * Common graphics utility functions for tools
59e9ad13b50e Move common functions to libgutil.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
3 * Programmed and designed by Matti 'ccr' Hamalainen
59e9ad13b50e Move common functions to libgutil.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
4 * (C) Copyright 2012-2015 Tecnic Software productions (TNSP)
59e9ad13b50e Move common functions to libgutil.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
5 *
59e9ad13b50e Move common functions to libgutil.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
6 * Please read file 'COPYING' for information on license and distribution.
59e9ad13b50e Move common functions to libgutil.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
7 */
59e9ad13b50e Move common functions to libgutil.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
8 #ifndef LIBGUTIL_H
59e9ad13b50e Move common functions to libgutil.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
9 #define LIBGUTIL_H 1
59e9ad13b50e Move common functions to libgutil.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
10
59e9ad13b50e Move common functions to libgutil.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
11 #include "dmlib.h"
59e9ad13b50e Move common functions to libgutil.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
12 #include "dmtext.h"
59e9ad13b50e Move common functions to libgutil.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
13
59e9ad13b50e Move common functions to libgutil.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
14 #ifdef __cplusplus
59e9ad13b50e Move common functions to libgutil.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
15 extern "C" {
59e9ad13b50e Move common functions to libgutil.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
16 #endif
59e9ad13b50e Move common functions to libgutil.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
17
59e9ad13b50e Move common functions to libgutil.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
18 void dmFillRect(SDL_Surface *screen, int x0, int y0, int x1, int y1, Uint32 col);
59e9ad13b50e Move common functions to libgutil.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
19 void dmDrawHLine(SDL_Surface *screen, int x0, int x1, int yc, const Uint32 col);
59e9ad13b50e Move common functions to libgutil.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
20 void dmDrawVLine(SDL_Surface *screen, int y0, int y1, int xc, const Uint32 col);
59e9ad13b50e Move common functions to libgutil.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
21 void dmDrawBox3D(SDL_Surface *screen, int x0, int y0, int x1, int y1, Uint32 ucol, Uint32 dcol);
59e9ad13b50e Move common functions to libgutil.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
22 void dmFillBox3D(SDL_Surface *screen, int x0, int y0, int x1, int y1, Uint32 bgcol, Uint32 ucol, Uint32 dcol);
59e9ad13b50e Move common functions to libgutil.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
23 void dmDrawBMTextConstQ(SDL_Surface *screen, DMBitmapFont *font, int mode, int xc, int yc, const char *fmt);
59e9ad13b50e Move common functions to libgutil.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
24 void dmDrawBMTextVAQ(SDL_Surface *screen, DMBitmapFont *font, int mode, int xc, int yc, const char *fmt, va_list ap);
2383
43e39d9ec42f Add __attribute__(__format__ ..) specifiers for functions that use printf() style format specifiers.
Matti Hamalainen <ccr@tnsp.org>
parents: 1327
diff changeset
25 void dmDrawBMTextQ(SDL_Surface *screen, DMBitmapFont *font, int mode, int xc, int yc, const char *fmt, ...)
2385
5ffc48a0bebe Conditionally define DM_ATTR_PRINTF_FMT(xstart, xend) instead of using
Matti Hamalainen <ccr@tnsp.org>
parents: 2383
diff changeset
26 DM_ATTR_PRINTF_FMT(6, 7);
1327
59e9ad13b50e Move common functions to libgutil.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
27
59e9ad13b50e Move common functions to libgutil.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
28
59e9ad13b50e Move common functions to libgutil.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
29 #ifdef __cplusplus
59e9ad13b50e Move common functions to libgutil.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
30 }
59e9ad13b50e Move common functions to libgutil.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
31 #endif
59e9ad13b50e Move common functions to libgutil.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
32
59e9ad13b50e Move common functions to libgutil.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
33 #endif // LIBGUTIL_H