[eros-cvs] cvs commit: eros/src/base/sys/console cons_VESA.cxx logosm.h

mhilsdale@eros.cs.jhu.edu mhilsdale@eros.cs.jhu.edu
Wed, 22 Aug 2001 15:48:33 -0400


mhilsdale    01/08/22 15:48:33

  Modified:    src/base/sys/console cons_VESA.cxx logosm.h
  Log:
  Fixed problem with logo colors.  Still not sure why logo animates slower and slower.

Revision  Changes    Path
1.9       +12 -10    eros/src/base/sys/console/cons_VESA.cxx

Index: cons_VESA.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/console/cons_VESA.cxx,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- cons_VESA.cxx	2001/08/22 17:38:35	1.8
+++ cons_VESA.cxx	2001/08/22 19:48:32	1.9
@@ -95,6 +95,12 @@
   uint8_t a = 0;
 #endif
 
+  /* hack: make logos work correctly */
+  /* Gimp macro resets the header_data pointers each time it uses it. */
+  /* Thus, pointer needs to be reset each time the logo is redrawn. */
+  orig_header_data = header_data;
+  orig_header_data2 = header_data2;
+
   if (!BootInfoPtr->useGraphicsFB)
     return false;
 
@@ -311,6 +317,8 @@
   uint16_t lx, ly;
   uint8_t p[3];
 
+  header_data = orig_header_data;
+
   for(ly = y; ly < (height + y); ly++)
     {
       for(lx = x; lx < (width + x); lx++)
@@ -327,6 +335,8 @@
   uint16_t lx, ly;
   uint8_t p[3];
 
+  header_data2 = orig_header_data2;
+
   for(ly = y; ly < (height2 + y); ly++)
     {
       for(lx = x; lx < (width2 + x); lx++)
@@ -342,17 +352,16 @@
 {
   uint16_t x, y;
   uint16_t i, j;
+#if 0
   x = x;
   y = y;
   i = i;
   j = j;
-
-  orig_header_data = header_data;
+#endif
 
   /* left -> right */
   for (x = 0; x <= XRES - width; x++)
     {
-      header_data = orig_header_data;
       drawLogo(x,0);
       if(x!=0)
 	{
@@ -362,12 +371,10 @@
 	    }
 	}
     }
-  header_data = orig_header_data;
 
   /* top -> bottom */
   for (y = 0; y <= YRES - height; y++)
     {
-      header_data = orig_header_data;
       drawLogo(XRES-width,y);
       if(y!=0)
 	{
@@ -377,12 +384,10 @@
 	    }
 	}
     }
-  header_data = orig_header_data;
 
   /* right -> left */
   for (x = 0; x <= XRES - width; x++)
     {
-      header_data = orig_header_data;
       drawLogo(XRES-width-x,YRES-height);
       if(x!=0)
 	{
@@ -392,12 +397,10 @@
 	    }
 	}
     }
-  header_data = orig_header_data;
 
   /* bottom -> top */
   for (y = 0; y <= YRES - height; y++)
     {
-      header_data = orig_header_data;
       drawLogo(0,YRES-height-y);
       if(y!=0)
 	{
@@ -407,5 +410,4 @@
 	    }
 	}
     }
-  header_data = orig_header_data;
 }



1.2       +3 -0      eros/src/base/sys/console/logosm.h

Index: logosm.h
===================================================================
RCS file: /cvs/eros/src/base/sys/console/logosm.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- logosm.h	2001/08/20 21:52:22	1.1
+++ logosm.h	2001/08/22 19:48:32	1.2
@@ -11,6 +11,9 @@
   pixel[2] = ((((data[2] - 33) & 0x3) << 6) | ((data[3] - 33))); \
   data += 4;\
 }
+
+static char *orig_header_data2;
+
 static char *header_data2 =
 	"````````````````````````````````````^`@X,3UN&256!A-#!!)$\"!1+PLW_"
 	"^04OX_(AS-H)^04U^`<W````````````````````````````````@HZ_)#!A#1E*"