Browse Source

Documentation update.
Code formatting consistency.
Handle underscore escaping in DocConverter.

Lasse Öörni 12 years ago
parent
commit
53d87516b5

+ 2 - 0
Docs/Reference.dox

@@ -1642,6 +1642,8 @@ byte[]     Bytecode
 
 \page CodingConventions Coding conventions
 
+- Indent style is Allman (BSD) -like, ie. brace on the next line from a control statement, indented on the same level. In switch-case statements the cases are on the same indent level as the switch statement.
+
 - Class and struct names are in camelcase beginning with an uppercase letter. They should be nouns. For example DebugRenderer, FreeTypeLibrary, Graphics.
 
 - Functions are likewise in upper-camelcase. For example CreateComponent, SetLinearRestThreshold.

+ 4 - 4
Engine/Graphics/Direct3D9/D3D9Texture2D.cpp

@@ -328,19 +328,19 @@ bool Texture2D::Load(SharedPtr<Image> image, bool useAlpha)
         
         switch (components)
         {
-            case 1:
+        case 1:
             format = useAlpha ? Graphics::GetAlphaFormat() : Graphics::GetLuminanceFormat();
             break;
             
-            case 2:
+        case 2:
             format = Graphics::GetLuminanceAlphaFormat();
             break;
             
-            case 3:
+        case 3:
             format = Graphics::GetRGBFormat();
             break;
             
-            case 4:
+        case 4:
             format = Graphics::GetRGBAFormat();
             break;
         }

+ 4 - 4
Engine/Graphics/Direct3D9/D3D9TextureCube.cpp

@@ -393,19 +393,19 @@ bool TextureCube::Load(CubeMapFace face, SharedPtr<Image> image, bool useAlpha)
         
         switch (components)
         {
-            case 1:
+        case 1:
             format = useAlpha ? Graphics::GetAlphaFormat() : Graphics::GetLuminanceFormat();
             break;
             
-            case 2:
+        case 2:
             format = Graphics::GetLuminanceAlphaFormat();
             break;
             
-            case 3:
+        case 3:
             format = Graphics::GetRGBFormat();
             break;
             
-            case 4:
+        case 4:
             format = Graphics::GetRGBAFormat();
             break;
         }

+ 4 - 4
Engine/Graphics/OpenGL/OGLTexture2D.cpp

@@ -273,19 +273,19 @@ bool Texture2D::Load(SharedPtr<Image> image, bool useAlpha)
         
         switch (components)
         {
-            case 1:
+        case 1:
             format = useAlpha ? Graphics::GetAlphaFormat() : Graphics::GetLuminanceFormat();
             break;
             
-            case 2:
+        case 2:
             format = Graphics::GetLuminanceAlphaFormat();
             break;
             
-            case 3:
+        case 3:
             format = Graphics::GetRGBFormat();
             break;
             
-            case 4:
+        case 4:
             format = Graphics::GetRGBAFormat();
             break;
         }

+ 4 - 4
Engine/Graphics/OpenGL/OGLTextureCube.cpp

@@ -345,19 +345,19 @@ bool TextureCube::Load(CubeMapFace face, SharedPtr<Image> image, bool useAlpha)
         
         switch (components)
         {
-            case 1:
+        case 1:
             format = useAlpha ? Graphics::GetAlphaFormat() : Graphics::GetLuminanceFormat();
             break;
             
-            case 2:
+        case 2:
             format = Graphics::GetLuminanceAlphaFormat();
             break;
             
-            case 3:
+        case 3:
             format = Graphics::GetRGBFormat();
             break;
             
-            case 4:
+        case 4:
             format = Graphics::GetRGBAFormat();
             break;
         }

+ 2 - 0
Tools/DocConverter/DocConverter.cpp

@@ -148,6 +148,8 @@ void ProcessFile(const String& fileName)
             
             // Handle escapes
             line.Replace("*", "\x060*\x060");
+            if (line.Find("http") == String::NPOS)
+                line.Replace("_", "\x060_\x060");
             line.Replace("[", "\x060[\x060");
             line.Replace("]", "\x060]\x060");
             line.Replace("&auml;", "\x0c3\x0a4");