mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-24 08:30:16 +00:00
(360/Xbox 1) Move reusable XDK files to new folder - xdk -and
create header for XDK definitions
This commit is contained in:
parent
077d9a1f63
commit
4b0d3620c7
@ -38,7 +38,7 @@
|
||||
#include "../gfx/fonts/xdk360_fonts.h"
|
||||
#endif
|
||||
|
||||
#include "xdk_resources.h"
|
||||
#include "../xdk/xdk_resources.h"
|
||||
|
||||
extern video_console_t video_console;
|
||||
extern xdk360_video_font_t m_Font;
|
||||
|
@ -18,6 +18,7 @@
|
||||
#define _XDK360_VIDEO_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include "../xdk/xdk_defines.h"
|
||||
|
||||
#define DFONT_MAX 4096
|
||||
#define PRIM_FVF (D3DFVF_XYZRHW | D3DFVF_TEX1)
|
||||
@ -41,19 +42,6 @@ typedef struct DrawVerticeFormats
|
||||
float u, v;
|
||||
} DrawVerticeFormats;
|
||||
|
||||
/* Direct3D 9 */
|
||||
#define LPDIRECT3D_PTR LPDIRECT3D9
|
||||
#define LPDIRECT3DDEVICE_PTR LPDIRECT3DDEVICE9
|
||||
#define LPDIRECT3DTEXTURE_PTR LPDIRECT3DTEXTURE9
|
||||
#define LPDIRECT3DSURFACE_PTR LPDIRECT3DSURFACE9
|
||||
#define LPDIRECT3DVERTEXBUFFER_PTR LPDIRECT3DVERTEXBUFFER9
|
||||
|
||||
#define D3DVIEWPORT D3DVIEWPORT9
|
||||
#define D3DVERTEXELEMENT D3DVERTEXELEMENT9
|
||||
|
||||
#define direct3d_create_ctx Direct3DCreate9
|
||||
#define IDirect3DVertexDeclaration IDirect3DVertexDeclaration9
|
||||
|
||||
typedef struct xdk_d3d_video
|
||||
{
|
||||
bool block_swap;
|
||||
@ -64,16 +52,16 @@ typedef struct xdk_d3d_video
|
||||
unsigned frame_count;
|
||||
unsigned last_width;
|
||||
unsigned last_height;
|
||||
LPDIRECT3D_PTR d3d_device;
|
||||
LPDIRECT3DDEVICE_PTR d3d_render_device;
|
||||
LPDIRECT3DVERTEXBUFFER_PTR vertex_buf;
|
||||
LPDIRECT3DTEXTURE_PTR lpTexture;
|
||||
LPDIRECT3D d3d_device;
|
||||
LPDIRECT3DDEVICE d3d_render_device;
|
||||
LPDIRECT3DVERTEXBUFFER vertex_buf;
|
||||
LPDIRECT3DTEXTURE lpTexture;
|
||||
D3DTexture lpTexture_ot_as16srgb;
|
||||
LPDIRECT3DTEXTURE_PTR lpTexture_ot;
|
||||
LPDIRECT3DTEXTURE lpTexture_ot;
|
||||
IDirect3DVertexDeclaration9* v_decl;
|
||||
XVIDEO_MODE video_mode;
|
||||
D3DPRESENT_PARAMETERS d3dpp;
|
||||
LPDIRECT3DSURFACE_PTR lpSurface;
|
||||
LPDIRECT3DSURFACE lpSurface;
|
||||
} xdk_d3d_video_t;
|
||||
|
||||
#endif
|
||||
|
@ -99,7 +99,7 @@ VIDEO DRIVER
|
||||
#include "../../gfx/gfx_common.c"
|
||||
|
||||
#ifdef _XBOX
|
||||
#include "../../360/xdk_resources.cpp"
|
||||
#include "../../xdk/xdk_resources.cpp"
|
||||
#if defined(HAVE_D3D9)
|
||||
#include "../../360/xdk_d3d9.cpp"
|
||||
#elif defined(HAVE_D3D8)
|
||||
|
@ -17,7 +17,7 @@
|
||||
#ifndef RARCH_360_FONTS_H
|
||||
#define RARCH_360_FONTS_H
|
||||
|
||||
#include "../../360/xdk_resources.h"
|
||||
#include "../../xdk/xdk_resources.h"
|
||||
|
||||
#define PAGE_UP (255)
|
||||
#define PAGE_DOWN (-255)
|
||||
|
@ -20,6 +20,8 @@
|
||||
#include <stdint.h>
|
||||
#include <xfont.h>
|
||||
|
||||
#include "../xdk/xdk_defines.h"
|
||||
|
||||
#define SHOW_DEBUG_INFO
|
||||
|
||||
#define DFONT_MAX 4096
|
||||
@ -45,27 +47,6 @@ typedef struct DrawVerticeFormats
|
||||
float u, v;
|
||||
} DrawVerticeFormats;
|
||||
|
||||
/* Direct3D 8 */
|
||||
#define LPDIRECT3D_PTR LPDIRECT3D8
|
||||
#define LPDIRECT3DDEVICE_PTR LPDIRECT3DDEVICE8
|
||||
#define LPDIRECT3DTEXTURE_PTR LPDIRECT3DTEXTURE8
|
||||
#define LPDIRECT3DSURFACE_PTR LPDIRECT3DSURFACE8
|
||||
#define LPDIRECT3DVERTEXBUFFER_PTR LPDIRECT3DVERTEXBUFFER8
|
||||
|
||||
#define D3DVIEWPORT D3DVIEWPORT8
|
||||
#define D3DVERTEXELEMENT D3DVERTEXELEMENT8
|
||||
|
||||
#define direct3d_create_ctx Direct3DCreate8
|
||||
#define IDirect3DVertexBuffer IDirect3DVertexBuffer8
|
||||
|
||||
#define SetSamplerState SetTextureStageState
|
||||
#define D3DLOCK_NOSYSLOCK (0)
|
||||
|
||||
#define D3DSAMP_ADDRESSU D3DTSS_ADDRESSU
|
||||
#define D3DSAMP_ADDRESSV D3DTSS_ADDRESSV
|
||||
#define D3DSAMP_MAGFILTER D3DTSS_MAGFILTER
|
||||
#define D3DSAMP_MINFILTER D3DTSS_MINFILTER
|
||||
|
||||
typedef struct xdk_d3d_video
|
||||
{
|
||||
bool block_swap;
|
||||
@ -76,10 +57,10 @@ typedef struct xdk_d3d_video
|
||||
unsigned frame_count;
|
||||
unsigned last_width;
|
||||
unsigned last_height;
|
||||
LPDIRECT3D_PTR d3d_device;
|
||||
LPDIRECT3DDEVICE_PTR d3d_render_device;
|
||||
LPDIRECT3DVERTEXBUFFER_PTR vertex_buf;
|
||||
LPDIRECT3DTEXTURE_PTR lpTexture;
|
||||
LPDIRECT3D d3d_device;
|
||||
LPDIRECT3DDEVICE d3d_render_device;
|
||||
LPDIRECT3DVERTEXBUFFER vertex_buf;
|
||||
LPDIRECT3DTEXTURE lpTexture;
|
||||
DWORD video_mode;
|
||||
D3DPRESENT_PARAMETERS d3dpp;
|
||||
XFONT *debug_font;
|
||||
|
65
xdk/xdk_defines.h
Normal file
65
xdk/xdk_defines.h
Normal file
@ -0,0 +1,65 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2010-2012 - Hans-Kristian Arntzen
|
||||
* Copyright (C) 2011-2012 - 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
|
||||
|
||||
#if defined(_XBOX1)
|
||||
/* XBox 1*/
|
||||
#define LPDIRECT3DRESOURCE LPDIRECT3DRESOURCE8
|
||||
#define LPDIRECT3DTEXTURE LPDIRECT3DTEXTURE8
|
||||
#define LPDIRECT3DCUBETEXTURE LPDIRECT3DCUBETEXTURE8
|
||||
#define LPDIRECT3DVOLUMETEXTURE LPDIRECT3DVOLUMETEXTURE8
|
||||
#define LPDIRECT3DVERTEXBUFFER LPDIRECT3DVERTEXBUFFER8
|
||||
#define LPDIRECT3DRESOURCE LPDIRECT3DRESOURCE8
|
||||
#define LPDIRECT3D LPDIRECT3D8
|
||||
#define LPDIRECT3DDEVICE LPDIRECT3DDEVICE8
|
||||
#define LPDIRECT3DSURFACE LPDIRECT3DSURFACE8
|
||||
|
||||
#define D3DVIEWPORT D3DVIEWPORT8
|
||||
#define D3DVERTEXELEMENT D3DVERTEXELEMENT8
|
||||
|
||||
#define direct3d_create_ctx Direct3DCreate8
|
||||
#define IDirect3DVertexBuffer IDirect3DVertexBuffer8
|
||||
|
||||
#define SetSamplerState SetTextureStageState
|
||||
#define D3DLOCK_NOSYSLOCK (0)
|
||||
|
||||
#define D3DSAMP_ADDRESSU D3DTSS_ADDRESSU
|
||||
#define D3DSAMP_ADDRESSV D3DTSS_ADDRESSV
|
||||
#define D3DSAMP_MAGFILTER D3DTSS_MAGFILTER
|
||||
#define D3DSAMP_MINFILTER D3DTSS_MINFILTER
|
||||
|
||||
#elif defined(_XBOX360)
|
||||
/* XBox 360*/
|
||||
#define LPDIRECT3D LPDIRECT3D9
|
||||
#define LPDIRECT3DDEVICE LPDIRECT3DDEVICE9
|
||||
#define LPDIRECT3DTEXTURE LPDIRECT3DTEXTURE9
|
||||
#define LPDIRECT3DCUBETEXTURE LPDIRECT3DCUBETEXTURE9
|
||||
#define LPDIRECT3DSURFACE LPDIRECT3DSURFACE9
|
||||
#define LPDIRECT3DVOLUMETEXTURE LPDIRECT3DVOLUMETEXTURE9
|
||||
#define LPDIRECT3DVERTEXBUFFER LPDIRECT3DVERTEXBUFFER9
|
||||
#define LPDIRECT3DRESOURCE LPDIRECT3DRESOURCE9
|
||||
|
||||
#define D3DVIEWPORT D3DVIEWPORT9
|
||||
#define D3DVERTEXELEMENT D3DVERTEXELEMENT9
|
||||
|
||||
#define direct3d_create_ctx Direct3DCreate9
|
||||
#define IDirect3DVertexDeclaration IDirect3DVertexDeclaration9
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
@ -1,3 +1,18 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2010-2012 - Hans-Kristian Arntzen
|
||||
*
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
#include <xgraphics.h>
|
||||
#include "xdk_resources.h"
|
||||
|
@ -1,21 +1,22 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2010-2012 - Hans-Kristian Arntzen
|
||||
*
|
||||
* 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 RARCH_XDK_RESOURCE_H
|
||||
#define RARCH_XDK_RESOURCE_H
|
||||
|
||||
#if defined(_XBOX1)
|
||||
#define LPDIRECT3DRESOURCE LPDIRECT3DRESOURCE8
|
||||
#define LPDIRECT3DTEXTURE LPDIRECT3DTEXTURE8
|
||||
#define LPDIRECT3DCUBETEXTURE LPDIRECT3DCUBETEXTURE8
|
||||
#define LPDIRECT3DVOLUMETEXTURE LPDIRECT3DVOLUMETEXTURE8
|
||||
#define LPDIRECT3DVERTEXBUFFER LPDIRECT3DVERTEXBUFFER8
|
||||
#define LPDIRECT3DRESOURCE LPDIRECT3DRESOURCE8
|
||||
#elif defined(_XBOX360)
|
||||
#define LPDIRECT3DRESOURCE LPDIRECT3DRESOURCE9
|
||||
#define LPDIRECT3DTEXTURE LPDIRECT3DTEXTURE9
|
||||
#define LPDIRECT3DCUBETEXTURE LPDIRECT3DCUBETEXTURE9
|
||||
#define LPDIRECT3DVOLUMETEXTURE LPDIRECT3DVOLUMETEXTURE9
|
||||
#define LPDIRECT3DVERTEXBUFFER LPDIRECT3DVERTEXBUFFER9
|
||||
#define LPDIRECT3DRESOURCE LPDIRECT3DRESOURCE9
|
||||
#endif
|
||||
#include "xdk_defines.h"
|
||||
|
||||
DWORD XBResource_SizeOf( LPDIRECT3DRESOURCE pResource );
|
||||
|
Loading…
Reference in New Issue
Block a user