[MSVIDC32]
[reactos.git] / reactos / dll / win32 / msvidc32 / msvideo1.c
index d01f07a..bfa413c 100644 (file)
  * if it's present, then the data is PAL8; RGB555 otherwise.
  */
 
+#define WIN32_NO_STATUS
+#define _INC_WINDOWS
+#define COM_NO_WINDOWS_H
+
 #include <stdarg.h>
-#include "windef.h"
-#include "winbase.h"
-#include "wingdi.h"
-#include "winuser.h" 
-#include "commdlg.h"
-#include "vfw.h"
-#include "mmsystem.h"
+#include <windef.h>
+#include <winbase.h>
+#include <wingdi.h>
+//#include "winuser.h" 
+//#include "commdlg.h"
+#include <vfw.h>
+//#include "mmsystem.h"
 #include "msvidc32_private.h"
  
-#include "wine/debug.h"
+#include <wine/debug.h>
  
 WINE_DEFAULT_DEBUG_CHANNEL(msvidc32); 
 
@@ -67,7 +71,7 @@ typedef BYTE uint8_t;
 
 typedef struct Msvideo1Context {
     DWORD dwMagic;
-    int mode_8bit;  /* if it's not 8-bit, it's 16-bit */
+    BOOL mode_8bit;  /* if it's not 8-bit, it's 16-bit */
 } Msvideo1Context;
 
 static void 
@@ -308,26 +312,26 @@ CRAM_DecompressQuery( Msvideo1Context *info, LPBITMAPINFO in, LPBITMAPINFO out )
     if( ( in->bmiHeader.biCompression != CRAM_MAGIC ) &&
         ( in->bmiHeader.biCompression != MSVC_MAGIC ) &&
         ( in->bmiHeader.biCompression != WHAM_MAGIC ) )
-        return ICERR_UNSUPPORTED;
+        return ICERR_BADFORMAT;
 
     if( ( in->bmiHeader.biBitCount != 16 ) &&
         ( in->bmiHeader.biBitCount != 8 ) )
     {
         TRACE("can't do %d bpp\n", in->bmiHeader.biBitCount );
-        return ICERR_UNSUPPORTED;
+        return ICERR_BADFORMAT;
     }
 
     /* output must be same dimensions as input */
     if( out )
     {
         if( in->bmiHeader.biBitCount != out->bmiHeader.biBitCount )
-            return ICERR_UNSUPPORTED;
+            return ICERR_BADFORMAT;
         if( in->bmiHeader.biPlanes != out->bmiHeader.biPlanes )
-            return ICERR_UNSUPPORTED;
+            return ICERR_BADFORMAT;
         if( in->bmiHeader.biHeight != out->bmiHeader.biHeight )
-            return ICERR_UNSUPPORTED;
+            return ICERR_BADFORMAT;
         if( in->bmiHeader.biWidth != out->bmiHeader.biWidth )
-            return ICERR_UNSUPPORTED;
+            return ICERR_BADFORMAT;
     }
 
     TRACE("OK!\n");
@@ -370,12 +374,12 @@ static LRESULT CRAM_DecompressBegin( Msvideo1Context *info, LPBITMAPINFO in, LPB
 
     TRACE("bitmap is %d bpp\n", in->bmiHeader.biBitCount);
     if( in->bmiHeader.biBitCount == 8 )
-        info->mode_8bit = 1;
+        info->mode_8bit = TRUE;
     else if( in->bmiHeader.biBitCount == 16 )
-        info->mode_8bit = 0;
+        info->mode_8bit = FALSE;
     else
     {
-        info->mode_8bit = 0;
+        info->mode_8bit = FALSE;
         FIXME("Unsupported output format %i\n", in->bmiHeader.biBitCount);
     }
 
@@ -580,9 +584,6 @@ BOOL WINAPI DllMain(HINSTANCE hModule, DWORD dwReason, LPVOID lpReserved)
         DisableThreadLibraryCalls(hModule);
         MSVIDC32_hModule = hModule;
         break;
-
-    case DLL_PROCESS_DETACH:
-        break;
     }
     return TRUE;
 }