Get rid of d3d.h and xdk_defines.h

This commit is contained in:
twinaphex 2018-05-14 03:57:27 +02:00
parent 5fe6c74b51
commit 6a9b39da3f
17 changed files with 36 additions and 97 deletions

View File

@ -1,21 +0,0 @@
/* RetroArch - A frontend for libretro.
* Copyright (C) 2011-2017 - Daniel De Matteis
*
* RetroArch 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 Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* RetroArch 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 RetroArch.
* If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _XDK_DEFINES_H
#define _XDK_DEFINES_H
typedef HANDLE WNDCLASSEX;
#endif

View File

@ -22,7 +22,6 @@
#include <d3d8.h>
#include "../drivers/d3d.h"
#include "../video_driver.h"
#include "../../verbosity.h"
@ -53,7 +52,9 @@ typedef struct d3d8_video
struct video_viewport vp;
struct video_shader shader;
video_info_t video_info;
#ifdef HAVE_WINDOW
WNDCLASSEX windowClass;
#endif
LPDIRECT3DDEVICE8 dev;
D3DVIEWPORT8 final_viewport;

View File

@ -23,7 +23,7 @@
#include <d3d9.h>
#include "../drivers/d3d.h"
#include "d3d_common.h"
#include "../video_driver.h"
#include "../../verbosity.h"
@ -89,7 +89,9 @@ typedef struct d3d9_video
struct video_viewport vp;
struct video_shader shader;
video_info_t video_info;
#ifdef HAVE_WINDOW
WNDCLASSEX windowClass;
#endif
LPDIRECT3DDEVICE9 dev;
D3DVIEWPORT9 final_viewport;

View File

@ -16,9 +16,18 @@
#ifndef _D3D_COMMON_H
#define _D3D_COMMON_H
#ifdef HAVE_CONFIG_H
#include "../../config.h"
#endif
#ifndef _XBOX
#define HAVE_WINDOW
#endif
#include <boolean.h>
#include <retro_common_api.h>
#include "../font_driver.h"
#include "../video_driver.h"
RETRO_BEGIN_DECLS
@ -29,6 +38,25 @@ typedef struct d3d_texture
INT32 pool;
} d3d_texture_t;
typedef struct
{
bool fullscreen;
bool enabled;
unsigned tex_w, tex_h;
float tex_coords[4];
float vert_coords[4];
float alpha_mod;
void *tex;
void *vert_buf;
} overlay_t;
typedef struct Vertex
{
float x, y, z;
uint32_t color;
float u, v;
} Vertex;
#ifndef BYTE_CLAMP
#define BYTE_CLAMP(i) (int) ((((i) > 255) ? 255 : (((i) < 0) ? 0 : (i))))
#endif

View File

@ -36,9 +36,7 @@
#include "../../driver.h"
#include "../video_driver.h"
#ifdef _XBOX
#include "../../defines/xdk_defines.h"
#else
#ifndef _XBOX
#include "../../ui/drivers/ui_win32_resource.h"
#include "../../ui/drivers/ui_win32.h"
#endif

View File

@ -1,56 +0,0 @@
/* RetroArch - A frontend for libretro.
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
* Copyright (C) 2011-2017 - Daniel De Matteis
*
* RetroArch 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 Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* RetroArch 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 RetroArch.
* If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __D3DVIDEO_INTF_H__
#define __D3DVIDEO_INTF_H__
#ifdef HAVE_CONFIG_H
#include "../../config.h"
#endif
#ifndef _XBOX
#define HAVE_WINDOW
#endif
#include "../../driver.h"
#include "../font_driver.h"
#include "../video_driver.h"
#ifdef _XBOX
#include "../../defines/xdk_defines.h"
#endif
typedef struct
{
bool fullscreen;
bool enabled;
unsigned tex_w, tex_h;
float tex_coords[4];
float vert_coords[4];
float alpha_mod;
void *tex;
void *vert_buf;
} overlay_t;
typedef struct Vertex
{
float x, y, z;
uint32_t color;
float u, v;
} Vertex;
#endif

View File

@ -31,7 +31,6 @@
#include <d3d8.h>
#include "d3d.h"
#include "../../defines/d3d_defines.h"
#include "../common/d3d8_common.h"
#include "../common/d3d_common.h"
@ -1198,9 +1197,8 @@ static bool d3d8_init_internal(d3d8_video_t *d3d,
d3d->menu->vert_coords[2] = 1;
d3d->menu->vert_coords[3] = -1;
memset(&d3d->windowClass, 0, sizeof(d3d->windowClass));
#ifdef HAVE_WINDOW
memset(&d3d->windowClass, 0, sizeof(d3d->windowClass));
d3d->windowClass.lpfnWndProc = WndProcD3D;
win32_window_init(&d3d->windowClass, true, NULL);
#endif

View File

@ -31,7 +31,6 @@
#include <d3d9.h>
#include "d3d.h"
#include "../../defines/d3d_defines.h"
#include "../common/d3d_common.h"
#include "../common/d3d9_common.h"
@ -1210,9 +1209,8 @@ static bool d3d9_init_internal(d3d9_video_t *d3d,
d3d->menu->vert_coords[2] = 1;
d3d->menu->vert_coords[3] = -1;
memset(&d3d->windowClass, 0, sizeof(d3d->windowClass));
#ifdef HAVE_WINDOW
memset(&d3d->windowClass, 0, sizeof(d3d->windowClass));
d3d->windowClass.lpfnWndProc = WndProcD3D;
win32_window_init(&d3d->windowClass, true, NULL);
#endif

View File

@ -24,7 +24,6 @@
#include "../../config.h"
#endif
#include "../drivers/d3d.h"
#include "../common/d3d_common.h"
#include "../common/d3d9_common.h"
#include "../font_driver.h"

View File

@ -21,7 +21,6 @@
#include "../../config.h"
#endif
#include "../drivers/d3d.h"
#include "../common/d3d_common.h"
#include "../common/d3d8_common.h"

View File

@ -21,7 +21,6 @@
#include <string/stdstring.h>
#include "../drivers/d3d.h"
#include "../common/d3d_common.h"
#include "../common/d3d9_common.h"
#include "../font_driver.h"

View File

@ -33,7 +33,6 @@
#include "../common/d3d_common.h"
#include "../common/d3d9_common.h"
#include "../drivers/d3d.h"
#include "../drivers/d3d_shaders/opaque.cg.d3d9.h"
#include "../video_driver.h"

View File

@ -22,7 +22,6 @@
#include <d3d9.h>
#include "../drivers/d3d.h"
#include "../../defines/d3d_defines.h"
#include "../common/d3d_common.h"
#include "../common/d3d9_common.h"

View File

@ -32,7 +32,6 @@
#endif
#include "../video_shader_parse.h"
#include "../drivers/d3d.h"
#include "../../managers/state_manager.h"
#include "../../verbosity.h"

View File

@ -47,7 +47,6 @@
#include "../../retroarch.h"
#include "../../verbosity.h"
#include "../../gfx/drivers/d3d.h"
#include "../../gfx/common/d3d_common.h"
#include "../../gfx/common/d3d9_common.h"

View File

@ -26,7 +26,6 @@
#include "../menu_driver.h"
#include "../../gfx/video_driver.h"
#include "../../gfx/drivers/d3d.h"
#include "../../gfx/common/d3d_common.h"
#include "../../gfx/common/d3d8_common.h"

View File

@ -26,7 +26,6 @@
#include "../menu_driver.h"
#include "../../gfx/video_driver.h"
#include "../../gfx/drivers/d3d.h"
#include "../../gfx/common/d3d_common.h"
#include "../../gfx/common/d3d9_common.h"