summaryrefslogtreecommitdiffhomepage
path: root/src/external
diff options
context:
space:
mode:
authorRay <[email protected]>2019-02-12 12:18:01 +0100
committerRay <[email protected]>2019-02-12 12:18:01 +0100
commit944a388b1bfee6048528c29719c5a78d4888bfa5 (patch)
tree950e70cdb956484807b8221bddeabc51200858c5 /src/external
parente7466eb0c4d2337d939cc7149e4e0eb8d5effd68 (diff)
downloadraylib-944a388b1bfee6048528c29719c5a78d4888bfa5.tar.gz
raylib-944a388b1bfee6048528c29719c5a78d4888bfa5.zip
Include mini_al directly, no separate module
Diffstat (limited to 'src/external')
-rw-r--r--src/external/mini_al.c8
-rw-r--r--src/external/mini_al.h72
2 files changed, 72 insertions, 8 deletions
diff --git a/src/external/mini_al.c b/src/external/mini_al.c
deleted file mode 100644
index d52789a7..00000000
--- a/src/external/mini_al.c
+++ /dev/null
@@ -1,8 +0,0 @@
-// The implementation of mini_al needs to #include windows.h which means it needs to go into
-// it's own translation unit. Not doing this will cause conflicts with CloseWindow(), etc.
-#define MINI_AL_IMPLEMENTATION
-#define MAL_NO_JACK
-#define MAL_NO_OPENAL
-#define MAL_NO_SDL
-//#define MAL_NO_NULL
-#include "mini_al.h"
diff --git a/src/external/mini_al.h b/src/external/mini_al.h
index e892b031..4444be6f 100644
--- a/src/external/mini_al.h
+++ b/src/external/mini_al.h
@@ -2775,7 +2775,79 @@ mal_uint64 mal_sine_wave_read_ex(mal_sine_wave* pSineWave, mal_uint64 frameCount
#endif
#ifdef MAL_WIN32
+
+// @raysan5: To avoid conflicting windows.h symbols with raylib, so flags are defined
+// WARNING: Those flags avoid inclusion of some Win32 headers that could be required
+// by user at some point and won't be included...
+//-------------------------------------------------------------------------------------
+
+// If defined, the following flags inhibit definition of the indicated items.
+#define NOGDICAPMASKS // CC_*, LC_*, PC_*, CP_*, TC_*, RC_
+#define NOVIRTUALKEYCODES // VK_*
+#define NOWINMESSAGES // WM_*, EM_*, LB_*, CB_*
+#define NOWINSTYLES // WS_*, CS_*, ES_*, LBS_*, SBS_*, CBS_*
+#define NOSYSMETRICS // SM_*
+#define NOMENUS // MF_*
+#define NOICONS // IDI_*
+#define NOKEYSTATES // MK_*
+#define NOSYSCOMMANDS // SC_*
+#define NORASTEROPS // Binary and Tertiary raster ops
+#define NOSHOWWINDOW // SW_*
+#define OEMRESOURCE // OEM Resource values
+#define NOATOM // Atom Manager routines
+#define NOCLIPBOARD // Clipboard routines
+#define NOCOLOR // Screen colors
+#define NOCTLMGR // Control and Dialog routines
+#define NODRAWTEXT // DrawText() and DT_*
+#define NOGDI // All GDI defines and routines
+#define NOKERNEL // All KERNEL defines and routines
+#define NOUSER // All USER defines and routines
+//#define NONLS // All NLS defines and routines
+#define NOMB // MB_* and MessageBox()
+#define NOMEMMGR // GMEM_*, LMEM_*, GHND, LHND, associated routines
+#define NOMETAFILE // typedef METAFILEPICT
+#define NOMINMAX // Macros min(a,b) and max(a,b)
+#define NOMSG // typedef MSG and associated routines
+#define NOOPENFILE // OpenFile(), OemToAnsi, AnsiToOem, and OF_*
+#define NOSCROLL // SB_* and scrolling routines
+#define NOSERVICE // All Service Controller routines, SERVICE_ equates, etc.
+#define NOSOUND // Sound driver routines
+#define NOTEXTMETRIC // typedef TEXTMETRIC and associated routines
+#define NOWH // SetWindowsHook and WH_*
+#define NOWINOFFSETS // GWL_*, GCL_*, associated routines
+#define NOCOMM // COMM driver routines
+#define NOKANJI // Kanji support stuff.
+#define NOHELP // Help engine interface.
+#define NOPROFILER // Profiler interface.
+#define NODEFERWINDOWPOS // DeferWindowPos routines
+#define NOMCX // Modem Configuration Extensions
+
+// Type required before windows.h inclusion
+typedef struct tagMSG *LPMSG;
+
#include <windows.h>
+
+// Type required by some unused function...
+typedef struct tagBITMAPINFOHEADER {
+ DWORD biSize;
+ LONG biWidth;
+ LONG biHeight;
+ WORD biPlanes;
+ WORD biBitCount;
+ DWORD biCompression;
+ DWORD biSizeImage;
+ LONG biXPelsPerMeter;
+ LONG biYPelsPerMeter;
+ DWORD biClrUsed;
+ DWORD biClrImportant;
+} BITMAPINFOHEADER, *PBITMAPINFOHEADER;
+
+// @raysan5: Some required types defined for TinyC compiler
+#if defined(__TINYC__)
+ #include "propidl.h"
+#endif
+//----------------------------------------------------------------------------------
+
#else
#include <stdlib.h> // For malloc()/free()
#include <string.h> // For memset()