Move d3d8_texture_new to d3d8.c and make it static

This commit is contained in:
libretroadmin 2023-05-31 19:43:20 +02:00
parent 923b756926
commit 29584b9960
3 changed files with 16 additions and 23 deletions

View File

@ -95,22 +95,6 @@ void d3d8_deinitialize_symbols(void)
#endif
}
void *d3d8_texture_new(LPDIRECT3DDEVICE8 dev,
unsigned width, unsigned height,
unsigned miplevels, unsigned usage, INT32 format,
INT32 pool, unsigned filter, unsigned mipfilter,
INT32 color_key, void *src_info_data,
PALETTEENTRY *palette, bool want_mipmap)
{
void *buf = NULL;
if (SUCCEEDED(IDirect3DDevice8_CreateTexture(dev,
width, height, miplevels, usage,
(D3DFORMAT)format, (D3DPOOL)pool,
(struct IDirect3DTexture8**)&buf)))
return buf;
return NULL;
}
static bool d3d8_create_device_internal(
LPDIRECT3DDEVICE8 dev,
D3DPRESENT_PARAMETERS *d3dpp,

View File

@ -81,13 +81,6 @@ d3d8_vertex_buffer_lock(LPDIRECT3DVERTEXBUFFER8 vertbuf)
return buf;
}
void *d3d8_texture_new(LPDIRECT3DDEVICE8 dev,
unsigned width, unsigned height,
unsigned miplevels, unsigned usage, INT32 format,
INT32 pool, unsigned filter, unsigned mipfilter,
INT32 color_key, void *src_info_data,
PALETTEENTRY *palette, bool want_mipmap);
bool d3d8_create_device(void *dev,
void *d3dpp,
LPDIRECT3D8 d3d,

View File

@ -96,6 +96,22 @@ struct d3d8_texture_info
enum texture_filter_type type;
};
static void *d3d8_texture_new(LPDIRECT3DDEVICE8 dev,
unsigned width, unsigned height,
unsigned miplevels, unsigned usage, INT32 format,
INT32 pool, unsigned filter, unsigned mipfilter,
INT32 color_key, void *src_info_data,
PALETTEENTRY *palette, bool want_mipmap)
{
void *buf = NULL;
if (SUCCEEDED(IDirect3DDevice8_CreateTexture(dev,
width, height, miplevels, usage,
(D3DFORMAT)format, (D3DPOOL)pool,
(struct IDirect3DTexture8**)&buf)))
return buf;
return NULL;
}
void d3d8_set_mvp(void *data, const void *mat_data)
{
struct d3d_matrix matrix;