Commit 9c306e98 authored by Alexandre Julliard's avatar Alexandre Julliard

wined3d: Make some functions and variables static.

parent e9832a06
......@@ -376,7 +376,7 @@ static ULONG WINAPI IWineD3DImpl_Release(IWineD3D *iface) {
/* Set the shader type for this device, depending on the given capabilities,
* the device type, and the user preferences in wined3d_settings */
void select_shader_mode(const WineD3D_GL_Info *gl_info, WINED3DDEVTYPE DeviceType, int *ps_selected, int *vs_selected)
static void select_shader_mode(const WineD3D_GL_Info *gl_info, WINED3DDEVTYPE DeviceType, int *ps_selected, int *vs_selected)
{
if (wined3d_settings.vs_mode == VS_NONE) {
*vs_selected = SHADER_NONE;
......@@ -500,7 +500,7 @@ static DWORD ver_for_ext(GL_SupportedExt ext)
return 0;
}
BOOL IWineD3DImpl_FillGLCaps(WineD3D_GL_Info *gl_info) {
static BOOL IWineD3DImpl_FillGLCaps(WineD3D_GL_Info *gl_info) {
const char *GL_Extensions = NULL;
const char *WGL_Extensions = NULL;
const char *gl_string = NULL;
......@@ -4052,7 +4052,7 @@ static void WINE_GLAPI warn_no_specular_func(const void *data)
WARN("GL_EXT_secondary_color not supported\n");
}
void fillGLAttribFuncs(const WineD3D_GL_Info *gl_info)
static void fillGLAttribFuncs(const WineD3D_GL_Info *gl_info)
{
position_funcs[WINED3DDECLTYPE_FLOAT1] = invalid_func;
position_funcs[WINED3DDECLTYPE_FLOAT2] = invalid_func;
......
......@@ -29,7 +29,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(d3d);
#define GLINFO_LOCATION stateblock->wineD3DDevice->adapter->gl_info
void nvts_activate_dimensions(DWORD stage, IWineD3DStateBlockImpl *stateblock, WineD3DContext *context) {
static void nvts_activate_dimensions(DWORD stage, IWineD3DStateBlockImpl *stateblock, WineD3DContext *context) {
BOOL bumpmap = FALSE;
if(stage > 0 && (stateblock->textureState[stage - 1][WINED3DTSS_COLOROP] == WINED3DTOP_BUMPENVMAPLUMINANCE ||
......@@ -548,7 +548,7 @@ static void nvrc_colorop(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3
}
}
void nvts_texdim(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DContext *context) {
static void nvts_texdim(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DContext *context) {
DWORD sampler = state - STATE_SAMPLER(0);
DWORD mapped_stage = stateblock->wineD3DDevice->texUnitMap[sampler];
......@@ -678,7 +678,7 @@ static BOOL nvts_conv_supported(WINED3DFORMAT fmt) {
return FALSE;
}
const struct StateEntryTemplate nvrc_fragmentstate_template[] = {
static const struct StateEntryTemplate nvrc_fragmentstate_template[] = {
{ STATE_TEXTURESTAGE(0, WINED3DTSS_COLOROP), { STATE_TEXTURESTAGE(0, WINED3DTSS_COLOROP), nvrc_colorop }, 0 },
{ STATE_TEXTURESTAGE(0, WINED3DTSS_COLORARG1), { STATE_TEXTURESTAGE(0, WINED3DTSS_COLOROP), nvrc_colorop }, 0 },
{ STATE_TEXTURESTAGE(0, WINED3DTSS_COLORARG2), { STATE_TEXTURESTAGE(0, WINED3DTSS_COLOROP), nvrc_colorop }, 0 },
......
......@@ -3473,7 +3473,7 @@ static void sampler(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DCont
}
}
void apply_pshader_fog(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DContext *context) {
static void apply_pshader_fog(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DContext *context) {
IWineD3DDeviceImpl *device = stateblock->wineD3DDevice;
if (use_ps(device)) {
......
......@@ -2609,7 +2609,7 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_AddDirtyRect(IWineD3DSurface *iface, C
return WINED3D_OK;
}
HRESULT WINAPI IWineD3DSurfaceImpl_SetFormat(IWineD3DSurface *iface, WINED3DFORMAT format) {
static HRESULT WINAPI IWineD3DSurfaceImpl_SetFormat(IWineD3DSurface *iface, WINED3DFORMAT format) {
IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *)iface;
HRESULT hr;
const GlPixelFormatDesc *glDesc;
......@@ -2630,7 +2630,7 @@ HRESULT WINAPI IWineD3DSurfaceImpl_SetFormat(IWineD3DSurface *iface, WINED3DFORM
return hr;
}
HRESULT WINAPI IWineD3DSurfaceImpl_SetMem(IWineD3DSurface *iface, void *Mem) {
static HRESULT WINAPI IWineD3DSurfaceImpl_SetMem(IWineD3DSurface *iface, void *Mem) {
IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *) iface;
if(This->Flags & (SFLAG_LOCKED | SFLAG_DCINUSE)) {
......
......@@ -685,7 +685,8 @@ HRESULT IWineD3DBaseSurfaceImpl_CreateDIBSection(IWineD3DSurface *iface) {
return WINED3D_OK;
}
void convert_r32f_r16f(const BYTE *src, BYTE *dst, DWORD pitch_in, DWORD pitch_out, unsigned int w, unsigned int h)
static void convert_r32f_r16f(const BYTE *src, BYTE *dst, DWORD pitch_in, DWORD pitch_out,
unsigned int w, unsigned int h)
{
unsigned int x, y;
const float *src_f;
......@@ -706,7 +707,7 @@ struct d3dfmt_convertor_desc {
void (*convert)(const BYTE *src, BYTE *dst, DWORD pitch_in, DWORD pitch_out, unsigned int w, unsigned int h);
};
const struct d3dfmt_convertor_desc convertors[] =
static const struct d3dfmt_convertor_desc convertors[] =
{
{WINED3DFMT_R32F, WINED3DFMT_R16F, convert_r32f_r16f},
};
......@@ -733,7 +734,7 @@ static inline const struct d3dfmt_convertor_desc *find_convertor(WINED3DFORMAT f
* fmt: Requested destination format
*
*****************************************************************************/
IWineD3DSurfaceImpl *surface_convert_format(IWineD3DSurfaceImpl *source, WINED3DFORMAT to_fmt) {
static IWineD3DSurfaceImpl *surface_convert_format(IWineD3DSurfaceImpl *source, WINED3DFORMAT to_fmt) {
IWineD3DSurface *ret = NULL;
const struct d3dfmt_convertor_desc *conv;
WINED3DLOCKED_RECT lock_src, lock_dst;
......
......@@ -42,7 +42,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d_surface);
* to destroy all the GL things.
*
*****************************************************************************/
ULONG WINAPI IWineGDISurfaceImpl_Release(IWineD3DSurface *iface) {
static ULONG WINAPI IWineGDISurfaceImpl_Release(IWineD3DSurface *iface) {
IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *)iface;
ULONG ref = InterlockedDecrement(&This->resource.ref);
TRACE("(%p) : Releasing from %d\n", This, ref + 1);
......@@ -245,7 +245,7 @@ IWineGDISurfaceImpl_Flip(IWineD3DSurface *iface,
* D3DERR_INVALIDCALL
*
*****************************************************************************/
HRESULT WINAPI
static HRESULT WINAPI
IWineGDISurfaceImpl_LoadTexture(IWineD3DSurface *iface, BOOL srgb_mode)
{
ERR("Unsupported on X11 surfaces\n");
......@@ -280,7 +280,7 @@ static int get_shift(DWORD color_mask) {
}
HRESULT WINAPI
static HRESULT WINAPI
IWineGDISurfaceImpl_SaveSnapshot(IWineD3DSurface *iface,
const char* filename)
{
......@@ -366,7 +366,7 @@ const char* filename)
return WINED3D_OK;
}
HRESULT WINAPI IWineGDISurfaceImpl_GetDC(IWineD3DSurface *iface, HDC *pHDC) {
static HRESULT WINAPI IWineGDISurfaceImpl_GetDC(IWineD3DSurface *iface, HDC *pHDC) {
IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *)iface;
WINED3DLOCKED_RECT lock;
HRESULT hr;
......@@ -436,7 +436,7 @@ HRESULT WINAPI IWineGDISurfaceImpl_GetDC(IWineD3DSurface *iface, HDC *pHDC) {
return WINED3D_OK;
}
HRESULT WINAPI IWineGDISurfaceImpl_ReleaseDC(IWineD3DSurface *iface, HDC hDC) {
static HRESULT WINAPI IWineGDISurfaceImpl_ReleaseDC(IWineD3DSurface *iface, HDC hDC) {
IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *)iface;
TRACE("(%p)->(%p)\n",This,hDC);
......@@ -457,7 +457,7 @@ HRESULT WINAPI IWineGDISurfaceImpl_ReleaseDC(IWineD3DSurface *iface, HDC hDC) {
return WINED3D_OK;
}
HRESULT WINAPI IWineGDISurfaceImpl_RealizePalette(IWineD3DSurface *iface) {
static HRESULT WINAPI IWineGDISurfaceImpl_RealizePalette(IWineD3DSurface *iface) {
IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *) iface;
RGBQUAD col[256];
IWineD3DPaletteImpl *pal = This->palette;
......@@ -507,7 +507,7 @@ HRESULT WINAPI IWineGDISurfaceImpl_RealizePalette(IWineD3DSurface *iface) {
* The return values of called methods on failure
*
*****************************************************************************/
HRESULT WINAPI
static HRESULT WINAPI
IWineGDISurfaceImpl_PrivateSetup(IWineD3DSurface *iface)
{
IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *) iface;
......@@ -534,13 +534,13 @@ IWineGDISurfaceImpl_PrivateSetup(IWineD3DSurface *iface)
return WINED3D_OK;
}
void WINAPI IWineGDISurfaceImpl_GetGlDesc(IWineD3DSurface *iface, glDescriptor **glDescription) {
static void WINAPI IWineGDISurfaceImpl_GetGlDesc(IWineD3DSurface *iface, glDescriptor **glDescription) {
IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *)iface;
FIXME("(%p) : Should not be called on a GDI surface\n", This);
*glDescription = NULL;
}
HRESULT WINAPI IWineGDISurfaceImpl_AddDirtyRect(IWineD3DSurface *iface, CONST RECT* pDirtyRect) {
static HRESULT WINAPI IWineGDISurfaceImpl_AddDirtyRect(IWineD3DSurface *iface, CONST RECT* pDirtyRect) {
/* GDI surface data can only be in one location, the system memory dib section. So they are
* always clean by definition.
*/
......@@ -548,7 +548,7 @@ HRESULT WINAPI IWineGDISurfaceImpl_AddDirtyRect(IWineD3DSurface *iface, CONST RE
return WINED3D_OK;
}
HRESULT WINAPI IWineGDISurfaceImpl_SetMem(IWineD3DSurface *iface, void *Mem) {
static HRESULT WINAPI IWineGDISurfaceImpl_SetMem(IWineD3DSurface *iface, void *Mem) {
IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *) iface;
/* Render targets depend on their hdc, and we can't create an hdc on a user pointer */
......
......@@ -143,7 +143,7 @@ static inline void fixup_transformed_pos(float *p) {
p[3] = w;
}
DWORD *find_conversion_shift(IWineD3DVertexBufferImpl *This, const WineDirect3DVertexStridedData *strided, DWORD stride)
static DWORD *find_conversion_shift(IWineD3DVertexBufferImpl *This, const WineDirect3DVertexStridedData *strided, DWORD stride)
{
DWORD *ret, i, shift, j, type;
DWORD orig_type_size;
......@@ -280,7 +280,7 @@ static inline BOOL check_attribute(IWineD3DVertexBufferImpl *This, const WineDir
return ret;
}
inline BOOL WINAPI IWineD3DVertexBufferImpl_FindDecl(IWineD3DVertexBufferImpl *This)
static inline BOOL IWineD3DVertexBufferImpl_FindDecl(IWineD3DVertexBufferImpl *This)
{
IWineD3DDeviceImpl *device = This->resource.wineD3DDevice;
BOOL ret = FALSE;
......@@ -744,7 +744,7 @@ static HRESULT WINAPI IWineD3DVertexBufferImpl_Lock(IWineD3DVertexBuffer *iface
/* TODO: check Flags compatibility with This->currentDesc.Usage (see MSDN) */
return WINED3D_OK;
}
HRESULT WINAPI IWineD3DVertexBufferImpl_Unlock(IWineD3DVertexBuffer *iface) {
static HRESULT WINAPI IWineD3DVertexBufferImpl_Unlock(IWineD3DVertexBuffer *iface) {
IWineD3DVertexBufferImpl *This = (IWineD3DVertexBufferImpl *) iface;
LONG lockcount;
TRACE("(%p)\n", This);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment