bevel orama (temp test, just to see if it looks right)
authorDerek Foreman <manmower@gmail.com>
Mon, 2 Jun 2003 03:56:55 +0000 (03:56 +0000)
committerDerek Foreman <manmower@gmail.com>
Mon, 2 Jun 2003 03:56:55 +0000 (03:56 +0000)
render2/paint.c
render2/planar.h

index ff783dc5e41211fbab173d916d62de83c05aa434..d1c40ff3e21e5dfde9db241a9db6cee778827033 100644 (file)
@@ -100,6 +100,47 @@ void RrPaint(struct RrSurface *sur)
         break;
     }
 
+    switch (RrPlanarBevelType(sur)) {
+    case RR_SUNKEN_OUTER:
+        glBegin(GL_LINES);
+        glEnd();
+    break;
+    case RR_SUNKEN_INNER:
+        glBegin(GL_LINES);
+        glEnd();
+    break;
+    case RR_RAISED_OUTER:
+        glColor4f(1.0, 1.0, 1.0, 0.25);
+        glBegin(GL_LINES);
+        glVertex2i(RrSurfaceX(sur) + 1, RrSurfaceY(sur) + 1);
+        glVertex2i(RrSurfaceX(sur) + 1,
+                   RrSurfaceY(sur) + RrSurfaceHeight(sur) - 2);
+
+
+        glVertex2i(RrSurfaceX(sur) + 1,
+                   RrSurfaceY(sur) + RrSurfaceHeight(sur) - 2);
+        glVertex2i(RrSurfaceX(sur) + RrSurfaceWidth(sur) - 2,
+                   RrSurfaceY(sur) + RrSurfaceHeight(sur) - 2);
+
+        glColor4f(0.0, 0.0, 0.0, 0.25);
+        glVertex2i(RrSurfaceX(sur) + RrSurfaceWidth(sur) - 2,
+                   RrSurfaceY(sur) + RrSurfaceHeight(sur) - 2);
+        glVertex2i(RrSurfaceX(sur) + RrSurfaceWidth(sur) - 2,
+                   RrSurfaceY(sur) + 1);
+
+        glVertex2i(RrSurfaceX(sur) + RrSurfaceWidth(sur) - 2,
+                   RrSurfaceY(sur) + 1);
+        glVertex2i(RrSurfaceX(sur) + 1, RrSurfaceY(sur) + 1);
+        glEnd();
+    break;
+    case RR_RAISED_INNER:
+        glBegin(GL_LINES);
+        glEnd();
+    break;
+    case RR_BEVEL_NONE:
+    break;
+    }
+
     for (i = 0; i < sur->ntextures; ++i)
         RrTexturePaint(sur, &sur->texture[i]);
 
index bb48aca465011c6ca571f05c82f605e761f3df01..755b122043ba73b22647be78d2c26b0938b9af19 100644 (file)
@@ -17,6 +17,7 @@ struct RrPlanarSurface {
 #define RrPlanarColorType(sur) ((sur)->data.planar.colortype)
 #define RrPlanarPrimaryColor(sur) ((sur)->data.planar.primary)
 #define RrPlanarSecondaryColor(sur) ((sur)->data.planar.secondary)
+#define RrPlanarBevelType(sur) ((sur)->data.planar.bevel)
 
 void RrPlanarPaint(struct RrSurface *sur, int absx, int absy);