From bef9c5e476b07e766c2ac24fa21bdc24fb93a916 Mon Sep 17 00:00:00 2001 From: Vincent Wei Date: Wed, 4 Mar 2020 15:27:43 +0800 Subject: [PATCH] add dump_gal_rect and dump_surface --- src/include/debug.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/include/debug.h b/src/include/debug.h index de3d5b23..48cef259 100644 --- a/src/include/debug.h +++ b/src/include/debug.h @@ -84,6 +84,13 @@ dump_rect (const RECT* rect, const char* name) RECTWP(rect), RECTHP(rect)); } +static inline void +dump_gal_rect (const GAL_Rect* rect, const char* name) +{ + _MG_PRINTF("rect of %s: (%d, %d), (%d X %d)\n", name, + rect->x, rect->y, rect->w, rect->h); +} + static inline void dump_window (HWND hwnd, const char* name) { @@ -371,6 +378,16 @@ dump_window_details (HWND hwnd, const char* name) _MG_PRINTF ("End of info for handle (%p) of %s", hwnd, name); } +static inline void +dump_surface (GAL_Surface* surface, const char* name) +{ + _MG_PRINTF ("Surface RGBA masks for %s: %x, %x, %x, %x\n", name, + surface->format->Rmask, + surface->format->Gmask, + surface->format->Bmask, + surface->format->Amask); +} + #ifdef __cplusplus } #endif /* __cplusplus */