summaryrefslogtreecommitdiff
path: root/src/win95/awtexld.h
diff options
context:
space:
mode:
authorSteven Fuller <relnev@icculus.org>2001-08-03 05:30:40 +0000
committerPatryk Obara <dreamer.tan@gmail.com>2019-08-20 02:22:36 +0200
commit29792b40ef3d62dfaf65802cd5be4c68031d94f7 (patch)
treeb835fd5f2635fd2f49cc604de62980cb770fd8fd /src/win95/awtexld.h
parentcfd7274022c512ba5e06a659a5281097f6468e40 (diff)
Fixed errors in inline.h.
More compiling. 156 unique undefined references.
Diffstat (limited to 'src/win95/awtexld.h')
-rw-r--r--src/win95/awtexld.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/src/win95/awtexld.h b/src/win95/awtexld.h
index 3ab81ff..9e5eb3f 100644
--- a/src/win95/awtexld.h
+++ b/src/win95/awtexld.h
@@ -42,6 +42,8 @@ enum AwTlErc
AW_TL_ERC;
+#define NO_ERROR 0
+
/*********/
/* Flags */
/*********/
@@ -76,6 +78,43 @@ extern DDSurface * AwCreateSurface(char const * _argFormatS, ...);
extern AW_TL_ERC AwDestroyBackupTexture(AW_BACKUPTEXTUREHANDLE _bH);
+
+typedef int (* AW_TL_PFN_CALLBACK) (void *);
+
+/* Structure for receiving specific regions of an image in a surface or texture.
+ * A pointer to an array of thise structures is passed to the AwCreate...
+ * functions if the 'a' format specifier is used. The fields 'left', 'right',
+ * 'top' and 'bottom' specify the rectangle to cut out of the image being loaded
+ * and must be valid. In AwCreateSurface, the 'pSurface' field is used and is a
+ * pointer to the Direct Draw surface created; in AwCreateTexture, the
+ * 'pTexture' field is used and is a pointer to the Direct 3D texture created.
+ * If an error occurs all the pointers in the array will be set to NULL. The
+ * 'width' and 'height' fields will be filled in with the width and height of
+ * the surface or texture that is created. If the rectangle specified is
+ * completely outsided the main image, the width and height will be set to zero,
+ * and the pointer field will be set to NULL, but this does not constitute an
+ * error. If the 't' option is used, the pointer fields are assumed to be valid
+ * textures or surfaces into which to load the new textures or surfaces. If the
+ * pointer is NULL, the structure is ignored. The pointers will remain unchanged
+ * even in the event of an error or a rectangle specified outside the main
+ * image, though the width and height will still be set to zero.
+ */
+struct AwCreateGraphicRegion
+{
+ unsigned left, top, right, bottom; /* rectangle to cut from the original image */
+ unsigned width, height; /* width and height of the resulting surface or texture */
+ union /* DDSurface or D3DTexture pointer depending on the context used */
+ {
+ DDSurface * pSurface; /* Direct Draw Surface object pointer */
+ D3DTexture * pTexture; /* Direct 3D Texture object pointer */
+ };
+};
+
+/* typedef to save typing 'struct' when not using C++ */
+typedef struct AwCreateGraphicRegion AW_CREATEGRAPHICREGION;
+
+extern char const * AwTlErrorToString(AW_TL_ERC _AWTL_DEFAULTPARM(awTlLastErr));
+
#if 0
#include <windows.h>