DXGL r399 - Code Review

Jump to navigation Jump to search
Repository:DXGL
Revision:r398‎ | r399 | r400 >
Date:00:23, 5 August 2013
Author:admin
Status:new
Tags:
Comment:
Move generated shader revision number to common version header.
Modified paths:
  • /common/version.h.in (modified) (history)
  • /ddraw/shadergen.cpp (modified) (history)
  • /ddraw/shadergen2d.cpp (modified) (history)

Diff [purge]

Index: common/version.h.in
@@ -11,5 +11,7 @@
1212 #define DXGLVERQWORD (((unsigned __int64)DXGLMAJOR<<48)+((unsigned __int64)DXGLMINOR<<32)+((unsigned __int64)DXGLPOINT<<16)+(unsigned __int64)DXGLBUILD)
1313 #define DXGLVERSTRING $VERSTRING
1414
 15+#define SHADER2DVERSION 1
 16+#define SHADER3DVERSION 1
1517
1618 #endif //__VERSION_H
Index: ddraw/shadergen.cpp
@@ -25,6 +25,7 @@
2626 using namespace std;
2727 #include "shadergen.h"
2828 #include "shaders.h"
 29+#include "../common/version.h"
2930
3031 GenShader *genshaders = NULL;
3132 static __int64 current_shader = 0;
@@ -225,9 +226,8 @@
226227 }
227228
228229
229 -#define REVISION 1
230230 static const char header[] =
231 - "//REV" STR(REVISION) "\n\
 231+ "//REV" STR(SHADER3DVERSION) "\n\
232232 #version 110\n";
233233 static const char vertexshader[] = "//Vertex Shader\n";
234234 static const char fragshader[] = "//Fragment Shader\n";
Index: ddraw/shadergen2d.cpp
@@ -16,6 +16,7 @@
1717 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
1818 #include "common.h"
1919 #include "shadergen2d.h"
 20+#include "../common/version.h"
2021
2122 /* Bits in 2D shader ID:
2223 Bit 0: Use destination alpha (DDBLT_ALPHADEST)
@@ -122,9 +123,8 @@
123124 0x00000000
124125 };
125126
126 -#define REVISION 1
127127 static const char header[] =
128 - "//REV" STR(REVISION) "\n\
 128+ "//REV" STR(SHADER2DVERSION) "\n\
129129 #version 110\n";
130130 static const char vertexshader[] = "//2D Vertex Shader\n";
131131 static const char fragshader[] = "//2D Fragment Shader\n";