From 3a62957499c5be02ccbd0bb82aab6126e4e4215b Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Sun, 21 Oct 2007 01:49:13 +0000 Subject: [PATCH] cleanup 2nd pass --- .../directx/{w32_ddrw.c => w32_ddrw.cpp} | 0 harbour/contrib/directx/w32_ddrw.h | 75 +++++++++++++++++++ 2 files changed, 75 insertions(+) rename harbour/contrib/directx/{w32_ddrw.c => w32_ddrw.cpp} (100%) create mode 100644 harbour/contrib/directx/w32_ddrw.h diff --git a/harbour/contrib/directx/w32_ddrw.c b/harbour/contrib/directx/w32_ddrw.cpp similarity index 100% rename from harbour/contrib/directx/w32_ddrw.c rename to harbour/contrib/directx/w32_ddrw.cpp diff --git a/harbour/contrib/directx/w32_ddrw.h b/harbour/contrib/directx/w32_ddrw.h new file mode 100644 index 0000000000..05de8bac8d --- /dev/null +++ b/harbour/contrib/directx/w32_ddrw.h @@ -0,0 +1,75 @@ +/* + * $Id: do.c 6821 2006-09-01 08:27:40Z druzus $ + */ + +/* + * Copyright(C) 1999 by Jesus Salas + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published + * by the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program; if not, write to: + * + * The Free Software Foundation, Inc., + * 675 Mass Ave, Cambridge, MA 02139, USA. + * + * You can contact me at: jsalas@gruposp.com jsalas@sp-editores.es + * + */ + +#define INITGUID + +#include "hbapi.h" +#include "hbvm.h" +#include "hbstack.h" + +#include "windows.h" +#include "winuser.h" + +#include "errno.h" +#include "objbase.h" +#include "tchar.h" +#include "stdio.h" +#include "math.h" +#include "string.h" +#include "stdlib.h" + +#include "ddraw.h" + + + + // Main Message Loop + + long _stdcall hb_dd_DDWndProc ( HWND , UINT , WPARAM , LPARAM ); + void hb_dd_g_Error ( char *, long , char *); + void hb_dd_CreateWindow ( void ); + + // DDraw initialize + + void HB_DD_DDRAWSTARTUP ( HWND ); + void hb_dd_StartWindow ( void ); + void hb_dd_CreateOffScreenBitmap ( void ); + void hb_dd_ReleaseAllObjects ( void ); + void hb_dd_RestoreAll ( void ); + long hb_dd_checkError ( HRESULT ); + + HRESULT hb_dd_DDCopyBitmap ( IDirectDrawSurface4 * pdds, HBITMAP hbm, int x, int y, int dx, int dy); + void hb_dd_RenderSprites ( long ); + +extern "C" DWORD hb_dd_DDColorMatch ( IDirectDrawSurface4 * pdds, COLORREF rgb ); + +//-------------------------------------------------------// +// API Functions +//-------------------------------------------------------// + + void DD_MsgBox ( void ); + void WinError ( void ); +