diff libcore/core/texture.h @ 167:b9b826cd9832

core: texture_(scale|draw) now return a bool
author David Demelier <markand@malikania.fr>
date Tue, 20 Oct 2020 14:58:51 +0200
parents b386d25832c8
children eb0a7ab71023
line wrap: on
line diff
--- a/libcore/core/texture.h	Tue Oct 20 14:54:14 2020 +0200
+++ b/libcore/core/texture.h	Tue Oct 20 14:58:51 2020 +0200
@@ -56,9 +56,8 @@
  * This function simply checks if the texture is initialized and has non-null
  * dimensions.
  *
- * \pre tex != NULL
- * \param tex the texture to check
- * \return True if the texture is initialized
+ * \param tex the texture to check (may be NULL)
+ * \return True if the texture is properly initialized.
  */
 bool
 texture_ok(const struct texture *tex);
@@ -70,8 +69,9 @@
  * \param tex the texture
  * \param x the X coordinate
  * \param y the Y coordinate
+ * \return False in case of rendering error.
  */
-void
+bool
 texture_draw(struct texture *tex, int x, int y);
 
 /**
@@ -88,8 +88,9 @@
  * \param dst_w the destination rectangle width
  * \param dst_h the destination rectangle height
  * \param angle the angle
+ * \return False in case of rendering error.
  */
-void
+bool
 texture_scale(struct texture *tex,
               int src_x,
               int src_y,