WINED3D: ParseVertexDeclarationUsage naming

H. Verbeet hverbeet at gmail.com
Wed Mar 22 13:47:32 CST 2006


The name ParseVertexDeclarationUsage is somewhat misleading, since the
function isn't supposed to parse vertexdeclarations, but the
D3DSIO_DCL token in vertex shaders. Also, most of the shader parsing
code uses lower case and underscores as separators in function names.

Changelog:
  - Fix slightly misleading ParseVertexDeclarationUsage naming.
-------------- next part --------------
diff --git a/dlls/wined3d/vertexshader.c b/dlls/wined3d/vertexshader.c
index fd31214..d3e3801 100644
--- a/dlls/wined3d/vertexshader.c
+++ b/dlls/wined3d/vertexshader.c
@@ -1064,7 +1064,7 @@ int ExpandMxMacro(DWORD macro_opcode, co
   return nComponents;
 }
 
-static void ParseVertexDeclarationUsage(IWineD3DVertexShaderImpl *This, INT usage, INT arrayNo)
+static void parse_decl_usage(IWineD3DVertexShaderImpl *This, INT usage, INT arrayNo)
 {
     switch(usage & 0xFFFF) {
         case D3DDECLUSAGE_POSITION:
@@ -1251,7 +1251,7 @@ inline static VOID IWineD3DVertexShaderI
             WINED3DVERTEXELEMENT *element = ((IWineD3DVertexDeclarationImpl*)This->vertexDeclaration)->pDeclarationWine + i;
             INT usage = element->Usage | (element->UsageIndex << 16);
             BYTE arrayNo = element->Reg;
-            ParseVertexDeclarationUsage(This, usage, arrayNo);
+            parse_decl_usage(This, usage, arrayNo);
         }
     }
 
@@ -1288,7 +1288,7 @@ inline static VOID IWineD3DVertexShaderI
                 if (curOpcode->opcode == D3DSIO_DCL){
                     INT usage = *pToken++;
                     INT arrayNo = (*pToken++ & 0x00001FFF);
-                    ParseVertexDeclarationUsage(This, usage, arrayNo); 
+                    parse_decl_usage(This, usage, arrayNo);
                 } else if(curOpcode->opcode == D3DSIO_DEF) {
                             This->constantsUsedBitmap[*pToken & 0xFF] = VS_CONSTANT_CONSTANT;
                             FIXME("Constant %ld\n", *pToken & 0xFF);


More information about the wine-patches mailing list