aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/gfx/drivers/dx_driver.h
diff options
context:
space:
mode:
authorEugene Sandulenko2009-02-15 11:03:21 +0000
committerEugene Sandulenko2009-02-15 11:03:21 +0000
commite9f742806362a84ffdb176a7414318dd2ab4df89 (patch)
treef6e3b49f135a81370a95a5a1314414b30c45feba /engines/sci/gfx/drivers/dx_driver.h
parent7ec7c4399e4ebc57d16347050873326db8b1f4e2 (diff)
downloadscummvm-rg350-e9f742806362a84ffdb176a7414318dd2ab4df89.tar.gz
scummvm-rg350-e9f742806362a84ffdb176a7414318dd2ab4df89.tar.bz2
scummvm-rg350-e9f742806362a84ffdb176a7414318dd2ab4df89.zip
- Move sci/scummvm/ contents to sci/
- Rename scumm_engine.cpp to sci.cpp - Remove unneeded gfx drivers - Rename scummvm_driver.c to gfx_driver.cpp svn-id: r38225
Diffstat (limited to 'engines/sci/gfx/drivers/dx_driver.h')
-rw-r--r--engines/sci/gfx/drivers/dx_driver.h151
1 files changed, 0 insertions, 151 deletions
diff --git a/engines/sci/gfx/drivers/dx_driver.h b/engines/sci/gfx/drivers/dx_driver.h
deleted file mode 100644
index 3eb280cefb..0000000000
--- a/engines/sci/gfx/drivers/dx_driver.h
+++ /dev/null
@@ -1,151 +0,0 @@
-/***************************************************************************
- graphics_directx.h Copyright (C) 2008 Alexander R Angas,
- Some portions Copyright (C) 1999 Dmitry Jemerov
-
- This program may be modified and copied freely according to the terms of
- the GNU general public license (GPL), as long as the above copyright
- notice and the licensing information contained herein are preserved.
-
- Please refer to www.gnu.org for licensing details.
-
- This work is provided AS IS, without warranty of any kind, expressed or
- implied, including but not limited to the warranties of merchantibility,
- noninfringement, and fitness for a specific purpose. The author will not
- be held liable for any damage caused by this work or derivatives of it.
-
- By using this source code, you agree to the licensing terms as stated
- above.
-
- Please contact the maintainer for bug reports or inquiries.
-
- Current Maintainer:
-
- Alexander R Angas (Alex) <arangas AT internode dot on dot net>
-
-***************************************************************************/
-
-#include <windows.h>
-#include <d3d8.h>
-#include <d3dx8math.h>
-#include <dxerr8.h>
-
-extern "C" {
-#include <gfx_system.h>
-#include <gfx_driver.h>
-#include <gfx_tools.h>
-#include <assert.h>
-#include <uinput.h>
-#include <ctype.h>
-#include <console.h> // for sciprintf
-#include <sci_win32.h>
-#include <sci_memory.h>
-};
-
-// Error trapping, every DirectX call should use this
-#define DODX(cmd, proc) \
- hr = cmd; \
- if (hr != S_OK) { \
- sciprintf("%s, %i, %i, %s from %s\n", __FILE__, __LINE__, hr, #cmd, #proc); \
- DXTrace(__FILE__, __LINE__, hr, #cmd" from "#proc, 1); \
- }
-
-
-// Easily release only allocated objects
-#define SAFE_RELEASE(p) \
- if (p) \
- (p)->Release();
-
-
-// Make it simple to access drv->state
-#define dx_state ((struct gfx_dx_struct_t *)(drv->state))
-
-
-// Simply map a key using add_key_event()
-#define MAP_KEY(x,y) case x: add_key_event ((struct gfx_dx_struct_t *)(drv->state), y); break
-
-
-#define DX_CLASS_NAME "FreeSCI DirectX Graphics"
-#define DX_APP_NAME "FreeSCI"
-
-// Vertex format
-#define D3DFVF_CUSTOMVERTEX ( D3DFVF_DIFFUSE | D3DFVF_XYZRHW | D3DFVF_TEX1 )
-
-// Vertex structure
-struct CUSTOMVERTEX
-{
- D3DXVECTOR4 p; // Vertex coordinates
- DWORD colour; // Colour
- D3DXVECTOR2 t; // Texture coordinates
-};
-
-#define SCI_DX_HANDLE_NORMAL 0
-#define SCI_DX_HANDLE_GRABBED 1
-
-// Number of buffers for each type of texture
-#define NUM_VISUAL_BUFFERS 3
-#define NUM_PRIORITY_BUFFERS 2
-
-// What each buffer references
-#define PRIMARY_VIS 0
-#define BACK_VIS 1
-#define STATIC_VIS 2
-
-#define BACK_PRI 0
-#define STATIC_PRI 1
-
-// Struct that holds everything
-struct gfx_dx_struct_t
-{
- D3DFORMAT d3dFormat; // Colour format
- UINT adapterId; // Adapter ID to use
- DWORD vertexProcessing; // Hardware or software vertex processing
-
- LPDIRECT3D8 pD3d; // D3D object
- D3DCAPS8 deviceCaps; // Capabilities of device
- D3DDISPLAYMODE displayMode; // Width and height of screen
- D3DPRESENT_PARAMETERS presParams; // Presentation parameters
- LPDIRECT3DDEVICE8 pDevice; // Rendering device
-
- LPDIRECT3DVERTEXBUFFER8 pVertBuff; // Buffer to hold pixmap vertices
- CUSTOMVERTEX pvData[4]; // Buffer of pixmap vertex structs
-
- LPDIRECT3DTEXTURE8 pTexVisuals[NUM_VISUAL_BUFFERS]; // Array of visual textures
- LPDIRECT3DTEXTURE8 pTexPrioritys[NUM_PRIORITY_BUFFERS]; // Array of priority textures
- gfx_pixmap_t *priority_maps[NUM_PRIORITY_BUFFERS]; // Array of SCI priority maps
-
- gfx_mode_t *pointerMode; // SCI graphics mode for pointer
- LPDIRECT3DTEXTURE8 pTexPointer; // Mouse pointer texture
- LPD3DXSPRITE pSPointer; // Mouse pointer sprite
- POINTS pointerDims; // Pointer dimensions
-
- WNDCLASSEX wc; // Window class
- HWND hWnd; // Window
- UINT xfact, yfact; // Scaling factors
- UINT bpp; // Bits per pixel
-
- // Event queue
- int queue_size, queue_first, queue_last;
- sci_event_t *event_queue;
-};
-
-// Flags that may be set in the driver
-#define DX_FLAGS_FULLSCREEN 1
-
-// Initialization functions
-static int
-ProcessMessages(struct _gfx_driver *drv);
-
-static gfx_return_value_t
-RenderD3D(struct _gfx_driver *drv);
-
-static int
-CheckDevice(struct _gfx_driver *drv);
-
-static gfx_return_value_t
-InitWindow(struct _gfx_driver *drv, UINT width, UINT height);
-
-static gfx_return_value_t
-InitD3D(struct _gfx_driver *drv);
-
-static gfx_return_value_t
-InitScene(struct _gfx_driver *drv);