wmtetris: Add wmtetris version 0.1 to repository.
From http://www.cs.mun.ca/~gstarkes/wmaker/dockapps/files/wmtetris-0.1.tar.gz
This commit is contained in:
		
							parent
							
								
									da1e047a36
								
							
						
					
					
						commit
						ad80340129
					
				
					 9 changed files with 2113 additions and 0 deletions
				
			
		
							
								
								
									
										22
									
								
								wmtetris/README
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								wmtetris/README
									
									
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,22 @@
 | 
				
			||||||
 | 
					Here it is, just what you always wanted -- tetris for the dock.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					To install, type make or something.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					I started with the wmapm code and made just enough changes to make it
 | 
				
			||||||
 | 
					play tetris and not show your laptop's battery status. So if you want
 | 
				
			||||||
 | 
					actual documentation, refer to the files that come with wmapm.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					This is commercial software. If you decide to keep it after your 21 day
 | 
				
			||||||
 | 
					evaluation period, you are required by law to send me the registration
 | 
				
			||||||
 | 
					fee of $899 U.S. Failure to promptly transfer these funds may result in
 | 
				
			||||||
 | 
					criminal prosecution for violation of U.S. copyright law and Bill Gates
 | 
				
			||||||
 | 
					will shake is finger at you and condemn you as a thief of "intellectual
 | 
				
			||||||
 | 
					property".
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					WMTETRIS IS PROVIDED "AS IS", AND COMES WITH NO WARRANTY WHATSOEVER,
 | 
				
			||||||
 | 
					INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTEES OF NOT MAKING YOU
 | 
				
			||||||
 | 
					FEEL LIKE A JERK FOR DOWNLOADING CRAPPY SOFTWARE, AND OF NOT CAUSING A
 | 
				
			||||||
 | 
					CULT FOLLOWING TO DEVELOP ;-). 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Comments, questions, and psychiatric referrals to srs25@cornell.edu.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
							
								
								
									
										366
									
								
								wmtetris/wmgeneral/wmgeneral.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										366
									
								
								wmtetris/wmgeneral/wmgeneral.c
									
									
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,366 @@
 | 
				
			||||||
 | 
					/*
 | 
				
			||||||
 | 
						Best viewed with vim5, using ts=4
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						wmgeneral was taken from wmppp.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						It has a lot of routines which most of the wm* programs use.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						------------------------------------------------------------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						Author: Martijn Pieterse (pieterse@xs4all.nl)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						---
 | 
				
			||||||
 | 
						CHANGES:
 | 
				
			||||||
 | 
						---
 | 
				
			||||||
 | 
						02/05/1998 (Martijn Pieterse, pieterse@xs4all.nl)
 | 
				
			||||||
 | 
							* changed the read_rc_file to parse_rcfile, as suggester by Marcelo E. Magallon
 | 
				
			||||||
 | 
							* debugged the parse_rc file.
 | 
				
			||||||
 | 
						30/04/1998 (Martijn Pieterse, pieterse@xs4all.nl)
 | 
				
			||||||
 | 
							* Ripped similar code from all the wm* programs,
 | 
				
			||||||
 | 
							  and put them in a single file.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include <stdlib.h>
 | 
				
			||||||
 | 
					#include <stdio.h>
 | 
				
			||||||
 | 
					#include <string.h>
 | 
				
			||||||
 | 
					#include <unistd.h>
 | 
				
			||||||
 | 
					#include <ctype.h>
 | 
				
			||||||
 | 
					#include <stdarg.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include <X11/Xlib.h>
 | 
				
			||||||
 | 
					#include <X11/xpm.h>
 | 
				
			||||||
 | 
					#include <X11/extensions/shape.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include "wmgeneral.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  /*****************/
 | 
				
			||||||
 | 
					 /* X11 Variables */
 | 
				
			||||||
 | 
					/*****************/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Window		Root;
 | 
				
			||||||
 | 
					int			screen;
 | 
				
			||||||
 | 
					int			x_fd;
 | 
				
			||||||
 | 
					int			d_depth;
 | 
				
			||||||
 | 
					XSizeHints	mysizehints;
 | 
				
			||||||
 | 
					XWMHints	mywmhints;
 | 
				
			||||||
 | 
					Pixel		back_pix, fore_pix;
 | 
				
			||||||
 | 
					char		*Geometry = "";
 | 
				
			||||||
 | 
					Window		iconwin, win;
 | 
				
			||||||
 | 
					GC			NormalGC;
 | 
				
			||||||
 | 
					XpmIcon		wmgen;
 | 
				
			||||||
 | 
					Pixmap		pixmask;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  /*****************/
 | 
				
			||||||
 | 
					 /* Mouse Regions */
 | 
				
			||||||
 | 
					/*****************/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					typedef struct {
 | 
				
			||||||
 | 
						int		enable;
 | 
				
			||||||
 | 
						int		top;
 | 
				
			||||||
 | 
						int		bottom;
 | 
				
			||||||
 | 
						int		left;
 | 
				
			||||||
 | 
						int		right;
 | 
				
			||||||
 | 
					} MOUSE_REGION;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#define MAX_MOUSE_REGION (8)
 | 
				
			||||||
 | 
					MOUSE_REGION	mouse_region[MAX_MOUSE_REGION];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  /***********************/
 | 
				
			||||||
 | 
					 /* Function Prototypes */
 | 
				
			||||||
 | 
					/***********************/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static void GetXPM(XpmIcon *, char **);
 | 
				
			||||||
 | 
					static Pixel GetColor(char *);
 | 
				
			||||||
 | 
					void RedrawWindow(void);
 | 
				
			||||||
 | 
					void AddMouseRegion(int, int, int, int, int);
 | 
				
			||||||
 | 
					int CheckMouseRegion(int, int);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/*******************************************************************************\
 | 
				
			||||||
 | 
					|* read_rc_file																   *|
 | 
				
			||||||
 | 
					\*******************************************************************************/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void parse_rcfile(const char *filename, rckeys *keys) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						char	*p;
 | 
				
			||||||
 | 
						char	temp[128];
 | 
				
			||||||
 | 
						char	*tokens = " :\t\n";
 | 
				
			||||||
 | 
						FILE	*fp;
 | 
				
			||||||
 | 
						int		i,key;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						fp = fopen(filename, "r");
 | 
				
			||||||
 | 
						if (fp) {
 | 
				
			||||||
 | 
							while (fgets(temp, 128, fp)) {
 | 
				
			||||||
 | 
								key = 0;
 | 
				
			||||||
 | 
								while (key >= 0 && keys[key].label) {
 | 
				
			||||||
 | 
									if ((p = strstr(temp, keys[key].label))) {
 | 
				
			||||||
 | 
										p += strlen(keys[key].label);
 | 
				
			||||||
 | 
										p += strspn(p, tokens);
 | 
				
			||||||
 | 
										if ((i = strcspn(p, "#\n"))) p[i] = 0;
 | 
				
			||||||
 | 
										free(*keys[key].var);
 | 
				
			||||||
 | 
										*keys[key].var = strdup(p);
 | 
				
			||||||
 | 
										key = -1;
 | 
				
			||||||
 | 
									} else key++;
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							fclose(fp);
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/*******************************************************************************\
 | 
				
			||||||
 | 
					|* GetXPM																	   *|
 | 
				
			||||||
 | 
					\*******************************************************************************/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static void GetXPM(XpmIcon *wmgen, char *pixmap_bytes[]) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						XWindowAttributes	attributes;
 | 
				
			||||||
 | 
						int					err;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/* For the colormap */
 | 
				
			||||||
 | 
						XGetWindowAttributes(display, Root, &attributes);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						wmgen->attributes.valuemask |= (XpmReturnPixels | XpmReturnExtensions);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						err = XpmCreatePixmapFromData(display, Root, pixmap_bytes, &(wmgen->pixmap),
 | 
				
			||||||
 | 
										&(wmgen->mask), &(wmgen->attributes));
 | 
				
			||||||
 | 
						
 | 
				
			||||||
 | 
						if (err != XpmSuccess) {
 | 
				
			||||||
 | 
							fprintf(stderr, "Not enough free colorcells.\n");
 | 
				
			||||||
 | 
							exit(1);
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/*******************************************************************************\
 | 
				
			||||||
 | 
					|* GetColor																	   *|
 | 
				
			||||||
 | 
					\*******************************************************************************/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static Pixel GetColor(char *name) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						XColor				color;
 | 
				
			||||||
 | 
						XWindowAttributes	attributes;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						XGetWindowAttributes(display, Root, &attributes);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						color.pixel = 0;
 | 
				
			||||||
 | 
						if (!XParseColor(display, attributes.colormap, name, &color)) {
 | 
				
			||||||
 | 
							fprintf(stderr, "wm.app: can't parse %s.\n", name);
 | 
				
			||||||
 | 
						} else if (!XAllocColor(display, attributes.colormap, &color)) {
 | 
				
			||||||
 | 
							fprintf(stderr, "wm.app: can't allocate %s.\n", name);
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return color.pixel;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/*******************************************************************************\
 | 
				
			||||||
 | 
					|* flush_expose																   *|
 | 
				
			||||||
 | 
					\*******************************************************************************/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static int flush_expose(Window w) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						XEvent 		dummy;
 | 
				
			||||||
 | 
						int			i=0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						while (XCheckTypedWindowEvent(display, w, Expose, &dummy))
 | 
				
			||||||
 | 
							i++;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						return i;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/*******************************************************************************\
 | 
				
			||||||
 | 
					|* RedrawWindow																   *|
 | 
				
			||||||
 | 
					\*******************************************************************************/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void RedrawWindow(void) {
 | 
				
			||||||
 | 
						
 | 
				
			||||||
 | 
						flush_expose(iconwin);
 | 
				
			||||||
 | 
						XCopyArea(display, wmgen.pixmap, iconwin, NormalGC, 
 | 
				
			||||||
 | 
									0,0, wmgen.attributes.width, wmgen.attributes.height, 0,0);
 | 
				
			||||||
 | 
						flush_expose(win);
 | 
				
			||||||
 | 
						XCopyArea(display, wmgen.pixmap, win, NormalGC,
 | 
				
			||||||
 | 
									0,0, wmgen.attributes.width, wmgen.attributes.height, 0,0);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/*******************************************************************************\
 | 
				
			||||||
 | 
					|* RedrawWindowXY															   *|
 | 
				
			||||||
 | 
					\*******************************************************************************/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void RedrawWindowXY(int x, int y) {
 | 
				
			||||||
 | 
						
 | 
				
			||||||
 | 
						flush_expose(iconwin);
 | 
				
			||||||
 | 
						XCopyArea(display, wmgen.pixmap, iconwin, NormalGC, 
 | 
				
			||||||
 | 
									x,y, wmgen.attributes.width, wmgen.attributes.height, 0,0);
 | 
				
			||||||
 | 
						flush_expose(win);
 | 
				
			||||||
 | 
						XCopyArea(display, wmgen.pixmap, win, NormalGC,
 | 
				
			||||||
 | 
									x,y, wmgen.attributes.width, wmgen.attributes.height, 0,0);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/*******************************************************************************\
 | 
				
			||||||
 | 
					|* AddMouseRegion															   *|
 | 
				
			||||||
 | 
					\*******************************************************************************/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void AddMouseRegion(int index, int left, int top, int right, int bottom) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (index < MAX_MOUSE_REGION) {
 | 
				
			||||||
 | 
							mouse_region[index].enable = 1;
 | 
				
			||||||
 | 
							mouse_region[index].top = top;
 | 
				
			||||||
 | 
							mouse_region[index].left = left;
 | 
				
			||||||
 | 
							mouse_region[index].bottom = bottom;
 | 
				
			||||||
 | 
							mouse_region[index].right = right;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/*******************************************************************************\
 | 
				
			||||||
 | 
					|* CheckMouseRegion															   *|
 | 
				
			||||||
 | 
					\*******************************************************************************/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					int CheckMouseRegion(int x, int y) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						int		i;
 | 
				
			||||||
 | 
						int		found;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						found = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						for (i=0; i<MAX_MOUSE_REGION && !found; i++) {
 | 
				
			||||||
 | 
							if (mouse_region[i].enable &&
 | 
				
			||||||
 | 
								x <= mouse_region[i].right &&
 | 
				
			||||||
 | 
								x >= mouse_region[i].left &&
 | 
				
			||||||
 | 
								y <= mouse_region[i].bottom &&
 | 
				
			||||||
 | 
								y >= mouse_region[i].top)
 | 
				
			||||||
 | 
								found = 1;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						if (!found) return -1;
 | 
				
			||||||
 | 
						return (i-1);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/*******************************************************************************\
 | 
				
			||||||
 | 
					|* copyXPMArea																   *|
 | 
				
			||||||
 | 
					\*******************************************************************************/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void copyXPMArea(int x, int y, int sx, int sy, int dx, int dy) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						XCopyArea(display, wmgen.pixmap, wmgen.pixmap, NormalGC, x, y, sx, sy, dx, dy);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/*******************************************************************************\
 | 
				
			||||||
 | 
					|* copyXBMArea																   *|
 | 
				
			||||||
 | 
					\*******************************************************************************/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void copyXBMArea(int x, int y, int sx, int sy, int dx, int dy) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						XCopyArea(display, wmgen.mask, wmgen.pixmap, NormalGC, x, y, sx, sy, dx, dy);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/*******************************************************************************\
 | 
				
			||||||
 | 
					|* setMaskXY																   *|
 | 
				
			||||||
 | 
					\*******************************************************************************/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void setMaskXY(int x, int y) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						 XShapeCombineMask(display, win, ShapeBounding, x, y, pixmask, ShapeSet);
 | 
				
			||||||
 | 
						 XShapeCombineMask(display, iconwin, ShapeBounding, x, y, pixmask, ShapeSet);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/*******************************************************************************\
 | 
				
			||||||
 | 
					|* openXwindow																   *|
 | 
				
			||||||
 | 
					\*******************************************************************************/
 | 
				
			||||||
 | 
					void openXwindow(int argc, char *argv[], char *pixmap_bytes[], char *pixmask_bits, int pixmask_width, int pixmask_height) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						unsigned int	borderwidth = 1;
 | 
				
			||||||
 | 
						XClassHint		classHint;
 | 
				
			||||||
 | 
						char			*display_name = NULL;
 | 
				
			||||||
 | 
						char			*wname = argv[0];
 | 
				
			||||||
 | 
						XTextProperty	name;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						XGCValues		gcv;
 | 
				
			||||||
 | 
						unsigned long	gcm;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						int				dummy=0;
 | 
				
			||||||
 | 
						int				i;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						for (i=1; argv[i]; i++) {
 | 
				
			||||||
 | 
							if (!strcmp(argv[i], "-display")) 
 | 
				
			||||||
 | 
								display_name = argv[i+1];
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (!(display = XOpenDisplay(display_name))) {
 | 
				
			||||||
 | 
							fprintf(stderr, "%s: can't open display %s\n", 
 | 
				
			||||||
 | 
											wname, XDisplayName(display_name));
 | 
				
			||||||
 | 
							exit(1);
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						screen  = DefaultScreen(display);
 | 
				
			||||||
 | 
						Root    = RootWindow(display, screen);
 | 
				
			||||||
 | 
						d_depth = DefaultDepth(display, screen);
 | 
				
			||||||
 | 
						x_fd    = XConnectionNumber(display);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/* Convert XPM to XImage */
 | 
				
			||||||
 | 
						GetXPM(&wmgen, pixmap_bytes);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/* Create a window to hold the stuff */
 | 
				
			||||||
 | 
						mysizehints.flags = USSize | USPosition;
 | 
				
			||||||
 | 
						mysizehints.x = 0;
 | 
				
			||||||
 | 
						mysizehints.y = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						back_pix = GetColor("white");
 | 
				
			||||||
 | 
						fore_pix = GetColor("black");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						XWMGeometry(display, screen, Geometry, NULL, borderwidth, &mysizehints,
 | 
				
			||||||
 | 
									&mysizehints.x, &mysizehints.y,&mysizehints.width,&mysizehints.height, &dummy);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						mysizehints.width = 64;
 | 
				
			||||||
 | 
						mysizehints.height = 64;
 | 
				
			||||||
 | 
							
 | 
				
			||||||
 | 
						win = XCreateSimpleWindow(display, Root, mysizehints.x, mysizehints.y,
 | 
				
			||||||
 | 
									mysizehints.width, mysizehints.height, borderwidth, fore_pix, back_pix);
 | 
				
			||||||
 | 
						
 | 
				
			||||||
 | 
						iconwin = XCreateSimpleWindow(display, win, mysizehints.x, mysizehints.y,
 | 
				
			||||||
 | 
									mysizehints.width, mysizehints.height, borderwidth, fore_pix, back_pix);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/* Activate hints */
 | 
				
			||||||
 | 
						XSetWMNormalHints(display, win, &mysizehints);
 | 
				
			||||||
 | 
						classHint.res_name = wname;
 | 
				
			||||||
 | 
						classHint.res_class = wname;
 | 
				
			||||||
 | 
						XSetClassHint(display, win, &classHint);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						XSelectInput(display, win, ButtonPressMask | ExposureMask | ButtonReleaseMask | PointerMotionMask | StructureNotifyMask);
 | 
				
			||||||
 | 
						XSelectInput(display, iconwin, ButtonPressMask | ExposureMask | ButtonReleaseMask | PointerMotionMask | StructureNotifyMask);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (XStringListToTextProperty(&wname, 1, &name) == 0) {
 | 
				
			||||||
 | 
							fprintf(stderr, "%s: can't allocate window name\n", wname);
 | 
				
			||||||
 | 
							exit(1);
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						XSetWMName(display, win, &name);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/* Create GC for drawing */
 | 
				
			||||||
 | 
						
 | 
				
			||||||
 | 
						gcm = GCForeground | GCBackground | GCGraphicsExposures;
 | 
				
			||||||
 | 
						gcv.foreground = fore_pix;
 | 
				
			||||||
 | 
						gcv.background = back_pix;
 | 
				
			||||||
 | 
						gcv.graphics_exposures = 0;
 | 
				
			||||||
 | 
						NormalGC = XCreateGC(display, Root, gcm, &gcv);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/* ONLYSHAPE ON */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						pixmask = XCreateBitmapFromData(display, win, pixmask_bits, pixmask_width, pixmask_height);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						XShapeCombineMask(display, win, ShapeBounding, 0, 0, pixmask, ShapeSet);
 | 
				
			||||||
 | 
						XShapeCombineMask(display, iconwin, ShapeBounding, 0, 0, pixmask, ShapeSet);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/* ONLYSHAPE OFF */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						mywmhints.initial_state = WithdrawnState;
 | 
				
			||||||
 | 
						mywmhints.icon_window = iconwin;
 | 
				
			||||||
 | 
						mywmhints.icon_x = mysizehints.x;
 | 
				
			||||||
 | 
						mywmhints.icon_y = mysizehints.y;
 | 
				
			||||||
 | 
						mywmhints.window_group = win;
 | 
				
			||||||
 | 
						mywmhints.flags = StateHint | IconWindowHint | IconPositionHint | WindowGroupHint;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						XSetWMHints(display, win, &mywmhints);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						XSetCommand(display, win, argv, argc);
 | 
				
			||||||
 | 
						XMapWindow(display, win);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										50
									
								
								wmtetris/wmgeneral/wmgeneral.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										50
									
								
								wmtetris/wmgeneral/wmgeneral.h
									
									
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,50 @@
 | 
				
			||||||
 | 
					#ifndef WMGENERAL_H_INCLUDED
 | 
				
			||||||
 | 
					#define WMGENERAL_H_INCLUDED
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  /***********/
 | 
				
			||||||
 | 
					 /* Defines */
 | 
				
			||||||
 | 
					/***********/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#define MAX_MOUSE_REGION (8)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  /************/
 | 
				
			||||||
 | 
					 /* Typedefs */
 | 
				
			||||||
 | 
					/************/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					typedef struct _rckeys rckeys;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					struct _rckeys {
 | 
				
			||||||
 | 
						const char	*label;
 | 
				
			||||||
 | 
						char		**var;
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					typedef struct {
 | 
				
			||||||
 | 
						Pixmap			pixmap;
 | 
				
			||||||
 | 
						Pixmap			mask;
 | 
				
			||||||
 | 
						XpmAttributes	attributes;
 | 
				
			||||||
 | 
					} XpmIcon;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  /*******************/
 | 
				
			||||||
 | 
					 /* Global variable */
 | 
				
			||||||
 | 
					/*******************/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Display		*display;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  /***********************/
 | 
				
			||||||
 | 
					 /* Function Prototypes */
 | 
				
			||||||
 | 
					/***********************/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void AddMouseRegion(int index, int left, int top, int right, int bottom);
 | 
				
			||||||
 | 
					int CheckMouseRegion(int x, int y);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void openXwindow(int argc, char *argv[], char **, char *, int, int);
 | 
				
			||||||
 | 
					void RedrawWindow(void);
 | 
				
			||||||
 | 
					void RedrawWindowXY(int x, int y);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void copyXPMArea(int, int, int, int, int, int);
 | 
				
			||||||
 | 
					void copyXBMArea(int, int, int, int, int, int);
 | 
				
			||||||
 | 
					void setMaskXY(int, int);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void parse_rcfile(const char *, rckeys *);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
							
								
								
									
										16
									
								
								wmtetris/wmtetris/Makefile
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								wmtetris/wmtetris/Makefile
									
									
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,16 @@
 | 
				
			||||||
 | 
					LIBDIR = -L/usr/X11R6/lib
 | 
				
			||||||
 | 
					LIBS   = -lXpm -lXext
 | 
				
			||||||
 | 
					OBJS   =  wmtetris.o \
 | 
				
			||||||
 | 
						  ../wmgeneral/wmgeneral.o \
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					wmtetris: $(OBJS)
 | 
				
			||||||
 | 
						cc -O -o wmtetris $^ $(LIBDIR) $(LIBS)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					%.o:	%.c
 | 
				
			||||||
 | 
						cc -O -c -o $@ $<
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					clean:
 | 
				
			||||||
 | 
						for i in $(OBJS) ; do \
 | 
				
			||||||
 | 
							rm -f $$i;\
 | 
				
			||||||
 | 
						done
 | 
				
			||||||
 | 
						rm -f wmtetris
 | 
				
			||||||
							
								
								
									
										739
									
								
								wmtetris/wmtetris/wmmon.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										739
									
								
								wmtetris/wmtetris/wmmon.c
									
									
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,739 @@
 | 
				
			||||||
 | 
					/*
 | 
				
			||||||
 | 
						Code based on wmppp/wmifs
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						[Orig WMPPP comments]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						This code was mainly put together by looking at the
 | 
				
			||||||
 | 
						following programs:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						asclock
 | 
				
			||||||
 | 
							A neat piece of equip, used to display the date
 | 
				
			||||||
 | 
							and time on the screen.
 | 
				
			||||||
 | 
							Comes with every AfterStep installation.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							Source used:
 | 
				
			||||||
 | 
								How do I create a not so solid window?
 | 
				
			||||||
 | 
								How do I open a window?
 | 
				
			||||||
 | 
								How do I use pixmaps?
 | 
				
			||||||
 | 
						
 | 
				
			||||||
 | 
						------------------------------------------------------------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						Authors: Martijn Pieterse (pieterse@xs4all.nl)
 | 
				
			||||||
 | 
							 Antoine Nulle (warp@xs4all.nl)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						This program is distributed under the GPL license.
 | 
				
			||||||
 | 
						(as were asclock and pppstats)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						----
 | 
				
			||||||
 | 
						Changes:
 | 
				
			||||||
 | 
						----
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						18/05/1998 (Antoine Nulle, warp@xs4all.nl)
 | 
				
			||||||
 | 
							* MEM/SWAP/UPTIME only updated when visible
 | 
				
			||||||
 | 
							* Using global file descriptors to reduce file
 | 
				
			||||||
 | 
							  system overhead, both updates are based on a diff 
 | 
				
			||||||
 | 
							  supplied by Dave Harden (dharden@wisewire.com) 
 | 
				
			||||||
 | 
						15/05/1998 (Antoine Nulle, warp@xs4all.nl)
 | 
				
			||||||
 | 
							* Fixed memory overflow in the MEM gaugebar
 | 
				
			||||||
 | 
							* MEM gauge displays now real used mem
 | 
				
			||||||
 | 
							  (buffered + cached mem removed)
 | 
				
			||||||
 | 
						14/05/1998 (Antoine Nulle, warp@xs4all.nl)
 | 
				
			||||||
 | 
							* Added -i & -s kludge for selecting startupmode,
 | 
				
			||||||
 | 
							  tijno, don't hate me for this :)
 | 
				
			||||||
 | 
						12/05/1998 (Antoine Nulle, warp@xs4all.nl)
 | 
				
			||||||
 | 
							* Finetuned master-xpm, tijno don't worry, no 
 | 
				
			||||||
 | 
							  reprogramming needed this time ;-)
 | 
				
			||||||
 | 
						07/05/1998 (Martijn Pieterse, pieterse@xs4all.nl)
 | 
				
			||||||
 | 
							* Added disk i/o
 | 
				
			||||||
 | 
						03/05/1998 (Antoine Nulle, warp@xs4all.nl)
 | 
				
			||||||
 | 
							* Added new master-xpm which contains the gfx
 | 
				
			||||||
 | 
							  for the upcoming SysInfo part :P
 | 
				
			||||||
 | 
						02/05/1998 (Martijn Pieterse, pieterse@xs4all.nl)
 | 
				
			||||||
 | 
							* Removed a lot of code, that was put in wmgeneral
 | 
				
			||||||
 | 
						23/04/1998 (Martijn Pieterse, pieterse@xs4all.nl)
 | 
				
			||||||
 | 
							* Added zombie destroying code (aka wait :) )
 | 
				
			||||||
 | 
						18/04/1998 (Martijn Pieterse, pieterse@xs4all.nl)
 | 
				
			||||||
 | 
							* Added CPU-on-screen.
 | 
				
			||||||
 | 
							* Added -display command line
 | 
				
			||||||
 | 
						15/04/1998 (Martijn Pieterse, pieterse@xs4all.nl)
 | 
				
			||||||
 | 
							* Fixed a bug in the stats routine
 | 
				
			||||||
 | 
							  (Top 3 bright pixels were not shown when 100% loaded)
 | 
				
			||||||
 | 
							* Changed xpm to a no-title one.
 | 
				
			||||||
 | 
							  This included the reprogramming of all positions.
 | 
				
			||||||
 | 
							  warpstah, i hate you! ;)
 | 
				
			||||||
 | 
						05/04/1998 (Martijn Pieterse, pieterse@xs4all.nl)
 | 
				
			||||||
 | 
							* First Working Version
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include <stdlib.h>
 | 
				
			||||||
 | 
					#include <stdio.h>
 | 
				
			||||||
 | 
					#include <time.h>
 | 
				
			||||||
 | 
					#include <string.h>
 | 
				
			||||||
 | 
					#include <fcntl.h>
 | 
				
			||||||
 | 
					#include <unistd.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include <sys/wait.h>
 | 
				
			||||||
 | 
					#include <sys/param.h>
 | 
				
			||||||
 | 
					#include <sys/types.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include <X11/Xlib.h>
 | 
				
			||||||
 | 
					#include <X11/xpm.h>
 | 
				
			||||||
 | 
					#include <X11/extensions/shape.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include "../wmgeneral/wmgeneral.h"
 | 
				
			||||||
 | 
					#include "../wmgeneral/misc.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include "wmmon-master.xpm"
 | 
				
			||||||
 | 
					#include "wmmon-mask.xbm"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  /***********/
 | 
				
			||||||
 | 
					 /* Defines */
 | 
				
			||||||
 | 
					/***********/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#define LEFT_ACTION (NULL)
 | 
				
			||||||
 | 
					#define RIGHT_ACTION (NULL)
 | 
				
			||||||
 | 
					#define MIDDLE_ACTION (NULL)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#define WMMON_VERSION "1.0.b2"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  /********************/
 | 
				
			||||||
 | 
					 /* Global Variables */
 | 
				
			||||||
 | 
					/********************/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					char	*ProgName;
 | 
				
			||||||
 | 
					int	stat_current = 0; /* now global */
 | 
				
			||||||
 | 
					FILE	*fp_meminfo;
 | 
				
			||||||
 | 
					FILE	*fp_stat;
 | 
				
			||||||
 | 
					FILE	*fp_loadavg;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/* functions */
 | 
				
			||||||
 | 
					void usage(void);
 | 
				
			||||||
 | 
					void printversion(void);
 | 
				
			||||||
 | 
					void DrawStats(int *, int, int, int, int);
 | 
				
			||||||
 | 
					void DrawStats_io(int *, int, int, int, int);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void wmmon_routine(int, char **);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void main(int argc, char *argv[]) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						int		i;
 | 
				
			||||||
 | 
						
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/* Parse Command Line */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						ProgName = argv[0];
 | 
				
			||||||
 | 
						if (strlen(ProgName) >= 5)
 | 
				
			||||||
 | 
							ProgName += (strlen(ProgName) - 5);
 | 
				
			||||||
 | 
						
 | 
				
			||||||
 | 
						for (i=1; i<argc; i++) {
 | 
				
			||||||
 | 
							char *arg = argv[i];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							if (*arg=='-') {
 | 
				
			||||||
 | 
								switch (arg[1]) {
 | 
				
			||||||
 | 
								case 'd' :
 | 
				
			||||||
 | 
									if (strcmp(arg+1, "display")) {
 | 
				
			||||||
 | 
										usage();
 | 
				
			||||||
 | 
										exit(1);
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
									break;
 | 
				
			||||||
 | 
								case 'v' :
 | 
				
			||||||
 | 
									printversion();
 | 
				
			||||||
 | 
									exit(0);
 | 
				
			||||||
 | 
									break;
 | 
				
			||||||
 | 
								case 'i' :
 | 
				
			||||||
 | 
									stat_current = 1;
 | 
				
			||||||
 | 
									break;
 | 
				
			||||||
 | 
								case 's' :
 | 
				
			||||||
 | 
									stat_current = 2;
 | 
				
			||||||
 | 
									break;
 | 
				
			||||||
 | 
								default:
 | 
				
			||||||
 | 
									usage();
 | 
				
			||||||
 | 
									exit(0);
 | 
				
			||||||
 | 
									break;
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						wmmon_routine(argc, argv);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/*******************************************************************************\
 | 
				
			||||||
 | 
					|* wmmon_routine															   *|
 | 
				
			||||||
 | 
					\*******************************************************************************/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					typedef struct {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						char	name[5];			/* "cpu0..cpuz", eventually.. :) */
 | 
				
			||||||
 | 
						int		his[55];
 | 
				
			||||||
 | 
						int		hisaddcnt;
 | 
				
			||||||
 | 
						long	rt_stat;
 | 
				
			||||||
 | 
						long	statlast;
 | 
				
			||||||
 | 
						long	rt_idle;
 | 
				
			||||||
 | 
						long	idlelast;
 | 
				
			||||||
 | 
						
 | 
				
			||||||
 | 
					} stat_dev;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#define MAX_STAT_DEVICES (4)
 | 
				
			||||||
 | 
					stat_dev	stat_device[MAX_STAT_DEVICES];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					char		*left_action;
 | 
				
			||||||
 | 
					char		*right_action;
 | 
				
			||||||
 | 
					char		*middle_action;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					int checksysdevs(void);
 | 
				
			||||||
 | 
					void get_statistics(char *, long *, long *, long *);
 | 
				
			||||||
 | 
					void DrawActive(char *);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void update_stat_cpu(stat_dev *);
 | 
				
			||||||
 | 
					void update_stat_io(stat_dev *);
 | 
				
			||||||
 | 
					void update_stat_mem(stat_dev *st, stat_dev *st2);
 | 
				
			||||||
 | 
					void update_stat_swp(stat_dev *);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void wmmon_routine(int argc, char **argv) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						rckeys		wmmon_keys[] = {
 | 
				
			||||||
 | 
							{ "left", &left_action },
 | 
				
			||||||
 | 
							{ "right", &right_action },
 | 
				
			||||||
 | 
							{ "middle", &middle_action },
 | 
				
			||||||
 | 
							{ NULL, NULL }
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						unsigned long		i,j;
 | 
				
			||||||
 | 
						long		k;
 | 
				
			||||||
 | 
						XEvent		Event;
 | 
				
			||||||
 | 
						int			but_stat = -1;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						int			stat_online;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						long		starttime;
 | 
				
			||||||
 | 
						long		curtime;
 | 
				
			||||||
 | 
						long		nexttime;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						long		istat;
 | 
				
			||||||
 | 
						long		idle;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						FILE		*fp;
 | 
				
			||||||
 | 
						char		temp[128];
 | 
				
			||||||
 | 
						char		*p;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						int			xpm_X = 0, xpm_Y = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						long		online_time = 0;
 | 
				
			||||||
 | 
						long		ref_time = 0;
 | 
				
			||||||
 | 
						long		cnt_time;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						fp = fopen("/proc/uptime", "r");
 | 
				
			||||||
 | 
						fp_meminfo = fopen("/proc/meminfo", "r");
 | 
				
			||||||
 | 
						fp_loadavg = fopen("/proc/loadavg", "r");
 | 
				
			||||||
 | 
						fp_stat = fopen("/proc/stat", "r");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (fp) {
 | 
				
			||||||
 | 
							fscanf(fp, "%ld", &online_time);
 | 
				
			||||||
 | 
							ref_time = time(0);
 | 
				
			||||||
 | 
							fclose(fp);
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						for (i=0; i<MAX_STAT_DEVICES; i++) {
 | 
				
			||||||
 | 
							for (j=0; j<55; j++) {
 | 
				
			||||||
 | 
								stat_device[i].his[j] = 0;
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							stat_device[i].hisaddcnt = 0;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (LEFT_ACTION) left_action = strdup(LEFT_ACTION);
 | 
				
			||||||
 | 
						if (RIGHT_ACTION) right_action = strdup(RIGHT_ACTION);
 | 
				
			||||||
 | 
						if (MIDDLE_ACTION) middle_action = strdup(MIDDLE_ACTION);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						strcpy(temp, "/etc/wmmonrc");
 | 
				
			||||||
 | 
						parse_rcfile(temp, wmmon_keys);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						p = getenv("HOME");
 | 
				
			||||||
 | 
						strcpy(temp, p);
 | 
				
			||||||
 | 
						strcat(temp, "/.wmmonrc");
 | 
				
			||||||
 | 
						parse_rcfile(temp, wmmon_keys);
 | 
				
			||||||
 | 
						
 | 
				
			||||||
 | 
						strcpy(temp, "/etc/wmmonrc.fixed");
 | 
				
			||||||
 | 
						parse_rcfile(temp, wmmon_keys);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						stat_online = checksysdevs();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						openXwindow(argc, argv, wmmon_master_xpm, wmmon_mask_bits, wmmon_mask_width, wmmon_mask_height);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/* add mouse region */
 | 
				
			||||||
 | 
						AddMouseRegion(0, 12, 13, 58, 57);
 | 
				
			||||||
 | 
						AddMouseRegion(1, 5, 5, 24, 14);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						starttime = time(0);
 | 
				
			||||||
 | 
						nexttime = starttime + 10;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						for (i=0; i<stat_online; i++) {
 | 
				
			||||||
 | 
							get_statistics(stat_device[i].name, &k, &istat, &idle);
 | 
				
			||||||
 | 
							stat_device[i].statlast = istat;
 | 
				
			||||||
 | 
							stat_device[i].idlelast = idle;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						if (stat_current == 0) DrawStats(stat_device[stat_current].his, 54, 40, 5, 58);
 | 
				
			||||||
 | 
						if (stat_current == 1) {
 | 
				
			||||||
 | 
							DrawStats_io(stat_device[stat_current].his, 54, 40, 5, 58);
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						if (stat_current == 2) {
 | 
				
			||||||
 | 
							xpm_X = 64;
 | 
				
			||||||
 | 
							setMaskXY(-64, 0);
 | 
				
			||||||
 | 
						} else {
 | 
				
			||||||
 | 
							xpm_X = 0;
 | 
				
			||||||
 | 
							setMaskXY(0, 0);
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						DrawActive(stat_device[stat_current].name);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						while (1) {
 | 
				
			||||||
 | 
							curtime = time(0);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							waitpid(0, NULL, WNOHANG);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							update_stat_cpu(&stat_device[0]);
 | 
				
			||||||
 | 
							update_stat_io(&stat_device[1]);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							if(stat_current == 2) {
 | 
				
			||||||
 | 
								update_stat_mem(&stat_device[2], &stat_device[3]);
 | 
				
			||||||
 | 
					//			update_stat_swp(&stat_device[3]);
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							if (stat_current < 2) {
 | 
				
			||||||
 | 
								i = stat_current;
 | 
				
			||||||
 | 
							
 | 
				
			||||||
 | 
								/* Load ding is 45 pixels hoog */
 | 
				
			||||||
 | 
								copyXPMArea(0, 64, 32, 12, 28, 4);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								j = (stat_device[i].rt_stat + stat_device[i].rt_idle);
 | 
				
			||||||
 | 
								if (j != 0) {
 | 
				
			||||||
 | 
									j = (stat_device[i].rt_stat * 100) / j;
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
								j = j * 0.32;
 | 
				
			||||||
 | 
								if (j > 32) j = 32;
 | 
				
			||||||
 | 
								copyXPMArea(32, 64, j, 12, 28, 4);
 | 
				
			||||||
 | 
							} else {
 | 
				
			||||||
 | 
								/* Nu zal ie wel 3 zijn. */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								copyXPMArea(0, 64, 32, 12, 28+64, 4);
 | 
				
			||||||
 | 
								copyXPMArea(0, 64, 32, 12, 28+64, 18);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								j = stat_device[2].rt_idle;
 | 
				
			||||||
 | 
								if (j != 0) {
 | 
				
			||||||
 | 
									j = (stat_device[2].rt_stat * 100) / j;
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
								j = j * 0.32;
 | 
				
			||||||
 | 
								if (j > 32) j = 32;
 | 
				
			||||||
 | 
								copyXPMArea(32, 64, j, 12, 28+64, 4);
 | 
				
			||||||
 | 
								/*---------------------           ------------------*/
 | 
				
			||||||
 | 
								j = stat_device[3].rt_idle;
 | 
				
			||||||
 | 
								if (j != 0) {
 | 
				
			||||||
 | 
									j = (stat_device[3].rt_stat * 100) / j;
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
								j = j * 0.32;
 | 
				
			||||||
 | 
								if (j > 32) j = 32;
 | 
				
			||||||
 | 
								copyXPMArea(32, 64, j, 12, 28+64, 18);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								/*----------- online tijd neerzetten! ----------*/
 | 
				
			||||||
 | 
								
 | 
				
			||||||
 | 
								cnt_time = time(0) - ref_time + online_time;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								/* cnt_time = uptime in seconden */
 | 
				
			||||||
 | 
								/*
 | 
				
			||||||
 | 
									secs = 108,47
 | 
				
			||||||
 | 
									mins = 89,47
 | 
				
			||||||
 | 
									uren = 70,47
 | 
				
			||||||
 | 
									digits = 40,78, 6breed, 9hoog
 | 
				
			||||||
 | 
								*/
 | 
				
			||||||
 | 
								i = cnt_time % 60;
 | 
				
			||||||
 | 
								cnt_time /= 60;
 | 
				
			||||||
 | 
								copyXPMArea(40 + (i % 10)*7, 78, 6, 9, 115, 47);
 | 
				
			||||||
 | 
								copyXPMArea(40 + (i / 10)*7, 78, 6, 9, 108, 47);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								i = cnt_time % 60;
 | 
				
			||||||
 | 
								cnt_time /= 60;
 | 
				
			||||||
 | 
								copyXPMArea(40 + (i % 10)*7, 78, 6, 9, 96, 47);
 | 
				
			||||||
 | 
								copyXPMArea(40 + (i / 10)*7, 78, 6, 9, 89, 47);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								i = cnt_time % 24;
 | 
				
			||||||
 | 
								cnt_time /= 24;
 | 
				
			||||||
 | 
								copyXPMArea(40 + (i % 10)*7, 78, 6, 9, 77, 47);
 | 
				
			||||||
 | 
								copyXPMArea(40 + (i / 10)*7, 78, 6, 9, 70, 47);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								/* De rest is dagen!  5x7*/
 | 
				
			||||||
 | 
								
 | 
				
			||||||
 | 
								i = cnt_time;
 | 
				
			||||||
 | 
								copyXPMArea(66 + (i % 10)*6, 66, 5, 7, 88, 35);
 | 
				
			||||||
 | 
								i /= 10;
 | 
				
			||||||
 | 
								copyXPMArea(66 + (i % 10)*6, 66, 5, 7, 82, 35);
 | 
				
			||||||
 | 
								i /= 10;
 | 
				
			||||||
 | 
								copyXPMArea(66 + (i % 10)*6, 66, 5, 7, 76, 35);
 | 
				
			||||||
 | 
								i /= 10;
 | 
				
			||||||
 | 
								copyXPMArea(66 + (i % 10)*6, 66, 5, 7, 70, 35);
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							if (curtime >= nexttime) {
 | 
				
			||||||
 | 
								nexttime+=10;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								for (i=0; i<stat_online; i++) {
 | 
				
			||||||
 | 
									if (stat_device[i].his[54])
 | 
				
			||||||
 | 
										stat_device[i].his[54] /= stat_device[i].hisaddcnt;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
									for (j=1; j<55; j++) {
 | 
				
			||||||
 | 
										stat_device[i].his[j-1] = stat_device[i].his[j];
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
									if (i == stat_current) {
 | 
				
			||||||
 | 
										if (i == 0) DrawStats(stat_device[i].his, 54, 40, 5, 58);
 | 
				
			||||||
 | 
										if (i == 1) DrawStats_io(stat_device[i].his, 54, 40, 5, 58);
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
									stat_device[i].his[54] = 0;
 | 
				
			||||||
 | 
									stat_device[i].hisaddcnt = 0;
 | 
				
			||||||
 | 
									
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							RedrawWindowXY(xpm_X, xpm_Y);
 | 
				
			||||||
 | 
						
 | 
				
			||||||
 | 
							while (XPending(display)) {
 | 
				
			||||||
 | 
								XNextEvent(display, &Event);
 | 
				
			||||||
 | 
								switch (Event.type) {
 | 
				
			||||||
 | 
								case Expose:
 | 
				
			||||||
 | 
									RedrawWindowXY(xpm_X, xpm_Y);
 | 
				
			||||||
 | 
									break;
 | 
				
			||||||
 | 
								case DestroyNotify:
 | 
				
			||||||
 | 
									XCloseDisplay(display);
 | 
				
			||||||
 | 
									exit(0);
 | 
				
			||||||
 | 
									break;
 | 
				
			||||||
 | 
								case ButtonPress:
 | 
				
			||||||
 | 
									but_stat = CheckMouseRegion(Event.xbutton.x, Event.xbutton.y);
 | 
				
			||||||
 | 
									break;
 | 
				
			||||||
 | 
								case ButtonRelease:
 | 
				
			||||||
 | 
									i = CheckMouseRegion(Event.xbutton.x, Event.xbutton.y);
 | 
				
			||||||
 | 
									if (but_stat == i && but_stat >= 0) {
 | 
				
			||||||
 | 
										switch (but_stat) {
 | 
				
			||||||
 | 
										case 0:
 | 
				
			||||||
 | 
											switch (Event.xbutton.button) {
 | 
				
			||||||
 | 
											case 1:
 | 
				
			||||||
 | 
												if (left_action)
 | 
				
			||||||
 | 
													execCommand(left_action);
 | 
				
			||||||
 | 
												break;
 | 
				
			||||||
 | 
											case 2:
 | 
				
			||||||
 | 
												if (middle_action)
 | 
				
			||||||
 | 
													execCommand(middle_action);
 | 
				
			||||||
 | 
												break;
 | 
				
			||||||
 | 
											case 3:
 | 
				
			||||||
 | 
												if (right_action)
 | 
				
			||||||
 | 
													execCommand(right_action);
 | 
				
			||||||
 | 
												break;
 | 
				
			||||||
 | 
											}
 | 
				
			||||||
 | 
										case 1:
 | 
				
			||||||
 | 
											stat_current++;
 | 
				
			||||||
 | 
											printf("current stat is :%d\n", stat_current);
 | 
				
			||||||
 | 
											if (stat_current == stat_online)
 | 
				
			||||||
 | 
												stat_current = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
											DrawActive(stat_device[stat_current].name);
 | 
				
			||||||
 | 
											if (stat_current == 0) DrawStats(stat_device[stat_current].his, 54, 40, 5, 58);
 | 
				
			||||||
 | 
											if (stat_current == 1) {
 | 
				
			||||||
 | 
												DrawStats_io(stat_device[stat_current].his, 54, 40, 5, 58);
 | 
				
			||||||
 | 
											}
 | 
				
			||||||
 | 
											if (stat_current == 2) {
 | 
				
			||||||
 | 
												xpm_X = 64;
 | 
				
			||||||
 | 
												setMaskXY(-64, 0);
 | 
				
			||||||
 | 
											} else {
 | 
				
			||||||
 | 
												xpm_X = 0;
 | 
				
			||||||
 | 
												setMaskXY(0, 0);
 | 
				
			||||||
 | 
											}
 | 
				
			||||||
 | 
											RedrawWindowXY(xpm_X, xpm_Y);
 | 
				
			||||||
 | 
											break;
 | 
				
			||||||
 | 
										}
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
									break;
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							usleep( stat_current == 0 ? 100000L : 200000L);
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void update_stat_cpu(stat_dev *st) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						long	k, istat, idle;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						get_statistics(st->name, &k, &istat, &idle);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						st->rt_idle = idle - st->idlelast;
 | 
				
			||||||
 | 
						st->idlelast = idle;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						st->rt_stat = istat - st->statlast;
 | 
				
			||||||
 | 
						st->statlast = istat;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						st->his[54] += k;
 | 
				
			||||||
 | 
						st->hisaddcnt += 1;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void update_stat_io(stat_dev *st) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						long			j, k, istat, idle;
 | 
				
			||||||
 | 
						static long		maxdiskio = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						get_statistics(st->name, &k, &istat, &idle);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						st->rt_idle = idle - st->idlelast;
 | 
				
			||||||
 | 
						st->idlelast = idle;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						st->rt_stat = istat - st->statlast;
 | 
				
			||||||
 | 
						st->statlast = istat;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						j = st->rt_stat;
 | 
				
			||||||
 | 
						if (maxdiskio < j) {
 | 
				
			||||||
 | 
							maxdiskio = j;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						st->rt_idle = maxdiskio - j;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						st->his[54] += st->rt_stat;
 | 
				
			||||||
 | 
						st->hisaddcnt += 1;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void update_stat_mem(stat_dev *st, stat_dev *st2) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						char	temp[128];
 | 
				
			||||||
 | 
						unsigned long free, shared, buffers, cached;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						freopen("/proc/meminfo", "r", fp_meminfo);
 | 
				
			||||||
 | 
						while (fgets(temp, 128, fp_meminfo)) {
 | 
				
			||||||
 | 
							if (strstr(temp, "Mem:")) {
 | 
				
			||||||
 | 
								sscanf(temp, "Mem: %ld %ld %ld %ld %ld %ld",
 | 
				
			||||||
 | 
								       &st->rt_idle, &st->rt_stat,
 | 
				
			||||||
 | 
								       &free, &shared, &buffers, &cached);
 | 
				
			||||||
 | 
								st->rt_idle >>= 10;
 | 
				
			||||||
 | 
								st->rt_stat -= buffers+cached;
 | 
				
			||||||
 | 
								st->rt_stat >>= 10;
 | 
				
			||||||
 | 
					//			break;
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							if (strstr(temp, "Swap:")) {
 | 
				
			||||||
 | 
								sscanf(temp, "Swap: %ld %ld", &st2->rt_idle, &st2->rt_stat);
 | 
				
			||||||
 | 
								st2->rt_idle >>= 10;
 | 
				
			||||||
 | 
								st2->rt_stat >>= 10;
 | 
				
			||||||
 | 
								break;
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void update_stat_swp(stat_dev *st) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						char	temp[128];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						fseek(fp_meminfo, 0, SEEK_SET);
 | 
				
			||||||
 | 
						while (fgets(temp, 128, fp_meminfo)) {
 | 
				
			||||||
 | 
							if (strstr(temp, "Swap:")) {
 | 
				
			||||||
 | 
								sscanf(temp, "Swap: %ld %ld", &st->rt_idle, &st->rt_stat);
 | 
				
			||||||
 | 
								st->rt_idle >>= 10;
 | 
				
			||||||
 | 
								st->rt_stat >>= 10;
 | 
				
			||||||
 | 
								break;
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/*******************************************************************************\
 | 
				
			||||||
 | 
					|* get_statistics															   *|
 | 
				
			||||||
 | 
					\*******************************************************************************/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void get_statistics(char *devname, long *is, long *ds, long *idle) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						int	i;
 | 
				
			||||||
 | 
						char	temp[128];
 | 
				
			||||||
 | 
						char	*p;
 | 
				
			||||||
 | 
						char	*tokens = " \t\n";
 | 
				
			||||||
 | 
						float	f;
 | 
				
			||||||
 | 
						long	maxdiskio=0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						*is = 0;
 | 
				
			||||||
 | 
						*ds = 0;
 | 
				
			||||||
 | 
						*idle = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (!strncmp(devname, "cpu", 3)) {
 | 
				
			||||||
 | 
							fseek(fp_stat, 0, SEEK_SET);
 | 
				
			||||||
 | 
							while (fgets(temp, 128, fp_stat)) {
 | 
				
			||||||
 | 
								if (strstr(temp, "cpu")) {
 | 
				
			||||||
 | 
									p = strtok(temp, tokens);
 | 
				
			||||||
 | 
									/* 1..3, 4 == idle, we don't want idle! */
 | 
				
			||||||
 | 
									for (i=0; i<3; i++) {
 | 
				
			||||||
 | 
										p = strtok(NULL, tokens);
 | 
				
			||||||
 | 
										*ds += atol(p);
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
									p = strtok(NULL, tokens);
 | 
				
			||||||
 | 
									*idle = atol(p);
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							fp_loadavg = freopen("/proc/loadavg", "r", fp_loadavg);
 | 
				
			||||||
 | 
							fscanf(fp_loadavg, "%f", &f);
 | 
				
			||||||
 | 
							*is = (long) (100 * f);
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (!strncmp(devname, "i/o", 3)) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							fseek(fp_stat, 0, SEEK_SET);
 | 
				
			||||||
 | 
							while (fgets(temp, 128, fp_stat)) {
 | 
				
			||||||
 | 
								if (strstr(temp, "disk_rio") || strstr(temp, "disk_wio")) {
 | 
				
			||||||
 | 
									p = strtok(temp, tokens);
 | 
				
			||||||
 | 
									/* 1..4 */
 | 
				
			||||||
 | 
									for (i=0; i<4; i++) {
 | 
				
			||||||
 | 
										p = strtok(NULL, tokens);
 | 
				
			||||||
 | 
										*ds += atol(p);
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							if (*ds > maxdiskio) maxdiskio = *ds;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/*******************************************************************************\
 | 
				
			||||||
 | 
					|* checksysdevs																   *|
 | 
				
			||||||
 | 
					\*******************************************************************************/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					int checksysdevs(void) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						strcpy(stat_device[0].name, "cpu0");
 | 
				
			||||||
 | 
						strcpy(stat_device[1].name, "i/o");
 | 
				
			||||||
 | 
						strcpy(stat_device[2].name, "sys");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						return 3;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/*******************************************************************************\
 | 
				
			||||||
 | 
					|* void DrawActive(char *)													   *|
 | 
				
			||||||
 | 
					\*******************************************************************************/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void DrawActive(char *name) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/* Alles op X,77
 | 
				
			||||||
 | 
						   CPU: 0
 | 
				
			||||||
 | 
						   I/O: 21
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						   20 Breed, 10 hoog
 | 
				
			||||||
 | 
						   Destinatie: 5,5
 | 
				
			||||||
 | 
						*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (name[0] == 'c') {
 | 
				
			||||||
 | 
							copyXPMArea(0, 77, 19, 10, 5, 5);
 | 
				
			||||||
 | 
						} else if (name[0] == 'i') {
 | 
				
			||||||
 | 
							copyXPMArea(19, 77, 19, 10, 5, 5);
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/*******************************************************************************\
 | 
				
			||||||
 | 
					|* DrawStats                                                                   *|
 | 
				
			||||||
 | 
					\*******************************************************************************/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void DrawStats(int *his, int num, int size, int x_left, int y_bottom) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						int     pixels_per_byte;
 | 
				
			||||||
 | 
						int     j,k;
 | 
				
			||||||
 | 
						int     *p;
 | 
				
			||||||
 | 
						int		d;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						pixels_per_byte = 100;
 | 
				
			||||||
 | 
						p = his;
 | 
				
			||||||
 | 
						for (j=0; j<num; j++) {
 | 
				
			||||||
 | 
							if (p[0] > pixels_per_byte)
 | 
				
			||||||
 | 
								pixels_per_byte += 100;
 | 
				
			||||||
 | 
							p += 1;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						p = his;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						for (k=0; k<num; k++) {
 | 
				
			||||||
 | 
							d = (1.0 * p[0] / pixels_per_byte) * size;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							for (j=0; j<size; j++) {
 | 
				
			||||||
 | 
							
 | 
				
			||||||
 | 
								if (j < d - 3)
 | 
				
			||||||
 | 
									copyXPMArea(2, 88, 1, 1, k+x_left, y_bottom-j);
 | 
				
			||||||
 | 
								else if (j < d)
 | 
				
			||||||
 | 
									copyXPMArea(2, 89, 1, 1, k+x_left, y_bottom-j);
 | 
				
			||||||
 | 
								else
 | 
				
			||||||
 | 
									copyXPMArea(2, 90, 1, 1, k+x_left, y_bottom-j);
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							p += 1;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/* Nu horizontaal op 100/200/300 etc lijntje trekken! */
 | 
				
			||||||
 | 
						for (j = pixels_per_byte-100; j > 0; j-=100) {
 | 
				
			||||||
 | 
							for (k=0; k<num; k++) {
 | 
				
			||||||
 | 
								d = (40.0 / pixels_per_byte) * j;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								copyXPMArea(2, 91, 1, 1, k+x_left, y_bottom-d);
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/*******************************************************************************\
 | 
				
			||||||
 | 
					|* DrawStats_io                                                                *|
 | 
				
			||||||
 | 
					\*******************************************************************************/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void DrawStats_io(int *his, int num, int size, int x_left, int y_bottom) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						float	pixels_per_byte;
 | 
				
			||||||
 | 
						int     j,k;
 | 
				
			||||||
 | 
						int     *p;
 | 
				
			||||||
 | 
						int		d;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						static int	global_io_scale = 1;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						p = his;
 | 
				
			||||||
 | 
						for (j=0; j<num; j++) {
 | 
				
			||||||
 | 
							if (p[j] > global_io_scale) global_io_scale = p[j];
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						pixels_per_byte = 1.0 * global_io_scale / size;
 | 
				
			||||||
 | 
						if (pixels_per_byte == 0) pixels_per_byte = 1;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						for (k=0; k<num; k++) {
 | 
				
			||||||
 | 
							d = (1.0 * p[0] / pixels_per_byte);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							for (j=0; j<size; j++) {
 | 
				
			||||||
 | 
							
 | 
				
			||||||
 | 
								if (j < d - 3)
 | 
				
			||||||
 | 
									copyXPMArea(2, 88, 1, 1, k+x_left, y_bottom-j);
 | 
				
			||||||
 | 
								else if (j < d)
 | 
				
			||||||
 | 
									copyXPMArea(2, 89, 1, 1, k+x_left, y_bottom-j);
 | 
				
			||||||
 | 
								else
 | 
				
			||||||
 | 
									copyXPMArea(2, 90, 1, 1, k+x_left, y_bottom-j);
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							p += 1;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/*******************************************************************************\
 | 
				
			||||||
 | 
					|* usage																	   *|
 | 
				
			||||||
 | 
					\*******************************************************************************/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void usage(void) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						fprintf(stderr, "\nwmmon - programming: tijno, (de)bugging & design warp, webhosting: bobby\n\n");
 | 
				
			||||||
 | 
						fprintf(stderr, "usage:\n");
 | 
				
			||||||
 | 
						fprintf(stderr, "\t-display <display name>\n");
 | 
				
			||||||
 | 
						fprintf(stderr, "\t-h\tthis screen\n");
 | 
				
			||||||
 | 
						fprintf(stderr, "\t-v\tprint the version number\n");
 | 
				
			||||||
 | 
						fprintf(stderr, "\t-i\tstartup in DiskIO mode\n");
 | 
				
			||||||
 | 
						fprintf(stderr, "\t-s\tstartup in SysInfo mode\n");
 | 
				
			||||||
 | 
						fprintf(stderr, "\n");
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/*******************************************************************************\
 | 
				
			||||||
 | 
					|* printversion																   *|
 | 
				
			||||||
 | 
					\*******************************************************************************/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void printversion(void) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (!strcmp(ProgName, "wmmon")) {
 | 
				
			||||||
 | 
							fprintf(stderr, "%s\n", WMMON_VERSION);
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										46
									
								
								wmtetris/wmtetris/wmtetris-mask.xbm
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										46
									
								
								wmtetris/wmtetris/wmtetris-mask.xbm
									
									
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,46 @@
 | 
				
			||||||
 | 
					#define wmtetris_mask_width 64
 | 
				
			||||||
 | 
					#define wmtetris_mask_height 64
 | 
				
			||||||
 | 
					static unsigned char wmtetris_mask_bits[] = {
 | 
				
			||||||
 | 
					   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 | 
				
			||||||
 | 
					   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 | 
				
			||||||
 | 
					   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff,
 | 
				
			||||||
 | 
					   0xff, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f,
 | 
				
			||||||
 | 
					   0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0xff,
 | 
				
			||||||
 | 
					   0xff, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f,
 | 
				
			||||||
 | 
					   0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0xff,
 | 
				
			||||||
 | 
					   0xff, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f,
 | 
				
			||||||
 | 
					   0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0xff,
 | 
				
			||||||
 | 
					   0xff, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f,
 | 
				
			||||||
 | 
					   0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0xff,
 | 
				
			||||||
 | 
					   0xff, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f,
 | 
				
			||||||
 | 
					   0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0xff,
 | 
				
			||||||
 | 
					   0xff, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f,
 | 
				
			||||||
 | 
					   0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0xff,
 | 
				
			||||||
 | 
					   0xff, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f,
 | 
				
			||||||
 | 
					   0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0xff,
 | 
				
			||||||
 | 
					   0xff, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f,
 | 
				
			||||||
 | 
					   0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0xff,
 | 
				
			||||||
 | 
					   0xff, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f,
 | 
				
			||||||
 | 
					   0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0xff,
 | 
				
			||||||
 | 
					   0xff, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f,
 | 
				
			||||||
 | 
					   0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0xff,
 | 
				
			||||||
 | 
					   0xff, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f,
 | 
				
			||||||
 | 
					   0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0xff,
 | 
				
			||||||
 | 
					   0xff, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f,
 | 
				
			||||||
 | 
					   0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0xff,
 | 
				
			||||||
 | 
					   0xff, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f,
 | 
				
			||||||
 | 
					   0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0xff,
 | 
				
			||||||
 | 
					   0xff, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f,
 | 
				
			||||||
 | 
					   0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0xff,
 | 
				
			||||||
 | 
					   0xff, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f,
 | 
				
			||||||
 | 
					   0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0xff,
 | 
				
			||||||
 | 
					   0xff, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f,
 | 
				
			||||||
 | 
					   0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0xff,
 | 
				
			||||||
 | 
					   0xff, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f,
 | 
				
			||||||
 | 
					   0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0xff,
 | 
				
			||||||
 | 
					   0xff, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f,
 | 
				
			||||||
 | 
					   0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0xff,
 | 
				
			||||||
 | 
					   0xff, 0xff, 0xff, 0x0f, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f,
 | 
				
			||||||
 | 
					   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 | 
				
			||||||
 | 
					   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 | 
				
			||||||
 | 
					   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
 | 
				
			||||||
							
								
								
									
										302
									
								
								wmtetris/wmtetris/wmtetris.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										302
									
								
								wmtetris/wmtetris/wmtetris.c
									
									
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,302 @@
 | 
				
			||||||
 | 
					#include <stdio.h>
 | 
				
			||||||
 | 
					#include <unistd.h>
 | 
				
			||||||
 | 
					#include <stdlib.h>
 | 
				
			||||||
 | 
					#include <string.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include <X11/Xlib.h>
 | 
				
			||||||
 | 
					#include <X11/xpm.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include "../wmgeneral/wmgeneral.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include "wmtetris.xpm"
 | 
				
			||||||
 | 
					#include "wmtetris-mask.xbm"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#define TEMPORAL_RESOLUTION 10000
 | 
				
			||||||
 | 
					#define INITIAL_DELAY 250000
 | 
				
			||||||
 | 
					#define FAST_MODE_DELAY 30000
 | 
				
			||||||
 | 
					#define DELAY_INCREMENT 20000
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#define BLOCK_SIZE 3
 | 
				
			||||||
 | 
					#define BOARD_POS_X 4
 | 
				
			||||||
 | 
					#define BOARD_POS_Y 6
 | 
				
			||||||
 | 
					#define BOARD_WIDTH 13
 | 
				
			||||||
 | 
					#define BOARD_HEIGHT 18
 | 
				
			||||||
 | 
					#define NEXT_POS_X 46
 | 
				
			||||||
 | 
					#define NEXT_POS_Y 7
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#define BUTTONC 6
 | 
				
			||||||
 | 
					#define BUTTON_NONE 0
 | 
				
			||||||
 | 
					#define BUTTON_ROTATE_LEFT 1
 | 
				
			||||||
 | 
					#define BUTTON_ROTATE_RIGHT 2
 | 
				
			||||||
 | 
					#define BUTTON_MOVE_LEFT 3
 | 
				
			||||||
 | 
					#define BUTTON_MOVE_RIGHT 4
 | 
				
			||||||
 | 
					#define BUTTON_MOVE_DOWN 5
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static int buttons[6][4] = {
 | 
				
			||||||
 | 
						{ 0,  0, 64, 64},
 | 
				
			||||||
 | 
						{43, 31, 51, 40},
 | 
				
			||||||
 | 
						{52, 31, 60, 40},
 | 
				
			||||||
 | 
						{43, 41, 51, 50},
 | 
				
			||||||
 | 
						{52, 41, 60, 50},
 | 
				
			||||||
 | 
						{43, 51, 60, 60}
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static int initial_figures[7][4][2] = {
 | 
				
			||||||
 | 
						{ {0, 1}, {1, 1}, {2, 1}, {3, 1} },
 | 
				
			||||||
 | 
						{ {0, 1}, {1, 1}, {2, 1}, {2, 2} },
 | 
				
			||||||
 | 
						{ {0, 2}, {1, 2}, {2, 2}, {2, 1} },
 | 
				
			||||||
 | 
						{ {0, 2}, {1, 1}, {1, 2}, {2, 2} },
 | 
				
			||||||
 | 
						{ {0, 2}, {1, 2}, {1, 1}, {2, 1} },
 | 
				
			||||||
 | 
						{ {0, 1}, {1, 1}, {1, 2}, {2, 2} },
 | 
				
			||||||
 | 
						{ {1, 1}, {2, 1}, {1, 2}, {2, 2} }
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					unsigned char board[BOARD_WIDTH][BOARD_HEIGHT];
 | 
				
			||||||
 | 
					int score=0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					int which_button(int x, int y);
 | 
				
			||||||
 | 
					int rotate_figure(int direction, int figure[4][2], int fig_x, int fig_y);
 | 
				
			||||||
 | 
					void draw_figure(int figure[4][2], int type, int x, int y);
 | 
				
			||||||
 | 
					void draw_next_figure(int figure[4][2], int type);
 | 
				
			||||||
 | 
					void general_draw_figure(int base_x, int base_y, int figure[4][2],
 | 
				
			||||||
 | 
											 int type, int x, int y);
 | 
				
			||||||
 | 
					void full_refresh();
 | 
				
			||||||
 | 
					int check_figure_position(int fig_x, int fig_y, int figure[4][2]);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					int main(int argc, char *argv[]) {
 | 
				
			||||||
 | 
						int i, x, y, step, input, fast_mode, progress,
 | 
				
			||||||
 | 
							fig_x, fig_y, new_figure=1, figure_type, next_figure_type;
 | 
				
			||||||
 | 
						int figure[4][2] = { {0, 0}, {0, 0}, {0, 0}, {0, 0} },
 | 
				
			||||||
 | 
							next_figure[4][2] = { {0, 0}, {0, 0}, {0, 0}, {0, 0} };
 | 
				
			||||||
 | 
						unsigned long delay = INITIAL_DELAY, start_time;
 | 
				
			||||||
 | 
						XEvent event;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						srand(time());
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						for (y = 0; y < BOARD_HEIGHT; y++)
 | 
				
			||||||
 | 
							for (x = 0; x < BOARD_WIDTH; x++)
 | 
				
			||||||
 | 
								board[x][y] = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						openXwindow(argc, argv, wmtetris_xpm, wmtetris_mask_bits,
 | 
				
			||||||
 | 
									wmtetris_mask_width, wmtetris_mask_height);
 | 
				
			||||||
 | 
						copyXPMArea(64, 0, 64, 64, 0, 0);
 | 
				
			||||||
 | 
						RedrawWindow();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						fast_mode=0;
 | 
				
			||||||
 | 
						figure_type = random() % 7;
 | 
				
			||||||
 | 
						for (i = 0; i < 4; i++) {
 | 
				
			||||||
 | 
							figure[i][0] = initial_figures[figure_type][i][0];
 | 
				
			||||||
 | 
							figure[i][1] = initial_figures[figure_type][i][1];
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						next_figure_type = random() % 7;
 | 
				
			||||||
 | 
						for (i = 0; i < 4; i++) {
 | 
				
			||||||
 | 
							next_figure[i][0] = initial_figures[next_figure_type][i][0];
 | 
				
			||||||
 | 
							next_figure[i][1] = initial_figures[next_figure_type][i][1];
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						draw_next_figure(next_figure, next_figure_type);
 | 
				
			||||||
 | 
						fig_x = BOARD_WIDTH / 2 - 1;
 | 
				
			||||||
 | 
						fig_y = 0;
 | 
				
			||||||
 | 
						draw_figure(figure, figure_type, fig_x, fig_y);
 | 
				
			||||||
 | 
						RedrawWindow();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						while (1) {
 | 
				
			||||||
 | 
							if (check_figure_position(fig_x, fig_y + 1, figure)) {
 | 
				
			||||||
 | 
								new_figure = 0;
 | 
				
			||||||
 | 
								draw_figure(figure, -1, fig_x, fig_y);
 | 
				
			||||||
 | 
								fig_y++;
 | 
				
			||||||
 | 
							} else {
 | 
				
			||||||
 | 
								new_figure = 1;
 | 
				
			||||||
 | 
								for (i = 0; i < 4; i++) {
 | 
				
			||||||
 | 
									board [fig_x + figure[i][0]] [fig_y + figure[i][1]] = figure_type + 1;
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								progress=0;
 | 
				
			||||||
 | 
								for (y = 0; y < BOARD_HEIGHT; y++) {
 | 
				
			||||||
 | 
									for (x = 0; x < BOARD_WIDTH; x++)
 | 
				
			||||||
 | 
										if (!board[x][y])
 | 
				
			||||||
 | 
											break;
 | 
				
			||||||
 | 
									if (x == BOARD_WIDTH) {
 | 
				
			||||||
 | 
										for (i = y; i > 0; i--)
 | 
				
			||||||
 | 
											for (x = 0; x < BOARD_WIDTH; x++)
 | 
				
			||||||
 | 
												board[x][i] = board[x][i-1];
 | 
				
			||||||
 | 
										progress++;
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
								score += progress*progress;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								full_refresh();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								i = score;
 | 
				
			||||||
 | 
								for (x = 3; x >= 0; x--) {
 | 
				
			||||||
 | 
									copyXPMArea(4 * (i % 10), 100, 3, 5, 44 + 4*x, 24);
 | 
				
			||||||
 | 
									i /= 10;
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								figure_type = next_figure_type;
 | 
				
			||||||
 | 
								next_figure_type = random() % 7;
 | 
				
			||||||
 | 
								for (i = 0; i < 4; i++) {
 | 
				
			||||||
 | 
									figure[i][0] = next_figure[i][0];
 | 
				
			||||||
 | 
									figure[i][1] = next_figure[i][1];
 | 
				
			||||||
 | 
									next_figure[i][0] = initial_figures[next_figure_type][i][0];
 | 
				
			||||||
 | 
									next_figure[i][1] = initial_figures[next_figure_type][i][1];
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
								draw_next_figure(next_figure, next_figure_type);
 | 
				
			||||||
 | 
								fig_x = BOARD_WIDTH / 2 - 1;
 | 
				
			||||||
 | 
								fig_y = 0;
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							draw_figure(figure, figure_type, fig_x, fig_y);
 | 
				
			||||||
 | 
							RedrawWindow();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							if (new_figure) {
 | 
				
			||||||
 | 
								if (!check_figure_position(fig_x, fig_y, figure)) {
 | 
				
			||||||
 | 
									copyXPMArea(64, 64, 23, 15, 12, 24);
 | 
				
			||||||
 | 
									RedrawWindow();
 | 
				
			||||||
 | 
									while (1) {
 | 
				
			||||||
 | 
										XNextEvent(display, &event);
 | 
				
			||||||
 | 
										if (event.type == ButtonPress)
 | 
				
			||||||
 | 
											break;
 | 
				
			||||||
 | 
										if (event.type == Expose)
 | 
				
			||||||
 | 
											RedrawWindow();
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
									exit(0);
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							for (step = 0; step < (fast_mode ? FAST_MODE_DELAY / TEMPORAL_RESOLUTION : INITIAL_DELAY / TEMPORAL_RESOLUTION); step++) {
 | 
				
			||||||
 | 
								while (XPending(display)) {
 | 
				
			||||||
 | 
									input = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
									XNextEvent(display, &event);
 | 
				
			||||||
 | 
									switch (event.type) {
 | 
				
			||||||
 | 
									case ButtonRelease:
 | 
				
			||||||
 | 
										fast_mode = 0;
 | 
				
			||||||
 | 
										break;
 | 
				
			||||||
 | 
									case ButtonPress:
 | 
				
			||||||
 | 
										if (!(input =
 | 
				
			||||||
 | 
											  which_button(event.xbutton.x, event.xbutton.y))) {
 | 
				
			||||||
 | 
					/*
 | 
				
			||||||
 | 
											switch (event.xbutton.button) {
 | 
				
			||||||
 | 
											case 1:
 | 
				
			||||||
 | 
												input = BUTTON_MOVE_LEFT;
 | 
				
			||||||
 | 
												break;
 | 
				
			||||||
 | 
											case 3:
 | 
				
			||||||
 | 
												input = BUTTON_MOVE_RIGHT;
 | 
				
			||||||
 | 
												break;
 | 
				
			||||||
 | 
											case 2:
 | 
				
			||||||
 | 
												input = BUTTON_ROTATE_RIGHT;
 | 
				
			||||||
 | 
												break;
 | 
				
			||||||
 | 
											}
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
 | 
										}
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
									if (input) {
 | 
				
			||||||
 | 
										draw_figure(figure, -1, fig_x, fig_y);
 | 
				
			||||||
 | 
										switch (input) {
 | 
				
			||||||
 | 
										case BUTTON_ROTATE_LEFT:
 | 
				
			||||||
 | 
											rotate_figure(0, figure, fig_x, fig_y);
 | 
				
			||||||
 | 
											break;
 | 
				
			||||||
 | 
										case BUTTON_ROTATE_RIGHT:
 | 
				
			||||||
 | 
											rotate_figure(1, figure, fig_x, fig_y);
 | 
				
			||||||
 | 
											break;
 | 
				
			||||||
 | 
										case BUTTON_MOVE_LEFT:
 | 
				
			||||||
 | 
											if (check_figure_position(fig_x - 1, fig_y, figure))
 | 
				
			||||||
 | 
												fig_x--;
 | 
				
			||||||
 | 
											break;
 | 
				
			||||||
 | 
										case BUTTON_MOVE_RIGHT:
 | 
				
			||||||
 | 
											if (check_figure_position(fig_x + 1, fig_y, figure))
 | 
				
			||||||
 | 
												fig_x++;
 | 
				
			||||||
 | 
											break;
 | 
				
			||||||
 | 
										case BUTTON_MOVE_DOWN:
 | 
				
			||||||
 | 
											fast_mode = 1;
 | 
				
			||||||
 | 
											break;
 | 
				
			||||||
 | 
										}
 | 
				
			||||||
 | 
										draw_figure(figure, figure_type, fig_x, fig_y);
 | 
				
			||||||
 | 
										RedrawWindow();
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
								usleep(TEMPORAL_RESOLUTION);
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					int which_button(int x, int y) {
 | 
				
			||||||
 | 
						int i;
 | 
				
			||||||
 | 
						
 | 
				
			||||||
 | 
						for (i = BUTTONC - 1; i >= 0; i--) {
 | 
				
			||||||
 | 
							if ((buttons[i][0] <= x && x < buttons[i][2]) &&
 | 
				
			||||||
 | 
								(buttons[i][1] <= y && y < buttons[i][3]))
 | 
				
			||||||
 | 
							 break;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return i;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					int rotate_figure(int direction, int figure[4][2], int fig_x, int fig_y) {
 | 
				
			||||||
 | 
						int i, temp[4][2];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						for (i = 0; i < 4; i++) {
 | 
				
			||||||
 | 
							temp[i][0] = direction ? 3 - figure[i][1] :     figure[i][1];
 | 
				
			||||||
 | 
							temp[i][1] = direction ?     figure[i][0] : 3 - figure[i][0];
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						if (check_figure_position(fig_x, fig_y, temp)) {
 | 
				
			||||||
 | 
							for (i = 0; i < 4; i++) {
 | 
				
			||||||
 | 
								figure[i][0] = temp[i][0];
 | 
				
			||||||
 | 
								figure[i][1] = temp[i][1];
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							return 1;
 | 
				
			||||||
 | 
						} else {
 | 
				
			||||||
 | 
							return 0;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void draw_figure(int figure[4][2], int type, int x, int y) {
 | 
				
			||||||
 | 
						general_draw_figure(BOARD_POS_X, BOARD_POS_Y, figure, type, x, y);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void draw_next_figure(int figure[4][2], int type) {
 | 
				
			||||||
 | 
						copyXPMArea(64 + NEXT_POS_X, NEXT_POS_Y, BLOCK_SIZE * 4, BLOCK_SIZE * 4,
 | 
				
			||||||
 | 
									NEXT_POS_X, NEXT_POS_Y);
 | 
				
			||||||
 | 
						general_draw_figure(NEXT_POS_X, NEXT_POS_Y, figure, type, 0, 0);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void general_draw_figure(int base_x, int base_y, int figure[4][2],
 | 
				
			||||||
 | 
											 int type, int x, int y)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						int i, block_x, block_y;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						for (i = 0; i < 4; i++) {
 | 
				
			||||||
 | 
							block_x = base_x + BLOCK_SIZE * (x + figure[i][0]);
 | 
				
			||||||
 | 
							block_y = base_y + BLOCK_SIZE * (y + figure[i][1]);
 | 
				
			||||||
 | 
							if (type == -1)
 | 
				
			||||||
 | 
								copyXPMArea(64 + block_x, block_y, BLOCK_SIZE, BLOCK_SIZE, block_x, block_y);
 | 
				
			||||||
 | 
							else
 | 
				
			||||||
 | 
								copyXPMArea(0, 64 + BLOCK_SIZE * type, BLOCK_SIZE, BLOCK_SIZE, block_x, block_y);
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void full_refresh() {
 | 
				
			||||||
 | 
						int x, y;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						for (y = 0; y < BOARD_HEIGHT; y++)
 | 
				
			||||||
 | 
							for (x = 0; x < BOARD_WIDTH; x++)
 | 
				
			||||||
 | 
								if (board[x][y])
 | 
				
			||||||
 | 
									copyXPMArea(0, 64 + BLOCK_SIZE * (board[x][y] - 1), BLOCK_SIZE, BLOCK_SIZE,
 | 
				
			||||||
 | 
												BOARD_POS_X + BLOCK_SIZE * x, BOARD_POS_Y + BLOCK_SIZE * y);
 | 
				
			||||||
 | 
								else
 | 
				
			||||||
 | 
									copyXPMArea(64 + BOARD_POS_X + BLOCK_SIZE * x, BOARD_POS_Y + BLOCK_SIZE * y, 
 | 
				
			||||||
 | 
												BLOCK_SIZE, BLOCK_SIZE, 
 | 
				
			||||||
 | 
												BOARD_POS_X + BLOCK_SIZE * x, BOARD_POS_Y + BLOCK_SIZE * y);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					int check_figure_position(int fig_x, int fig_y, int figure[4][2]) {
 | 
				
			||||||
 | 
						int i, x, y;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						for (i = 0; i < 4; i++) {
 | 
				
			||||||
 | 
							x = fig_x + figure[i][0];
 | 
				
			||||||
 | 
							y = fig_y + figure[i][1];
 | 
				
			||||||
 | 
							if ((x < 0) || (x >= BOARD_WIDTH) || (y < 0) || (y >= BOARD_HEIGHT))
 | 
				
			||||||
 | 
								return 0;
 | 
				
			||||||
 | 
							if (board[x][y])
 | 
				
			||||||
 | 
								return 0;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return 1;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										40
									
								
								wmtetris/wmtetris/wmtetris.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										40
									
								
								wmtetris/wmtetris/wmtetris.h
									
									
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,40 @@
 | 
				
			||||||
 | 
					/*  wmapm.h -- Header file for WMAPM
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 *  wmapm-1.2 (C) 1998 Chris D. Faulhaber <jedgar@speck.ml.org>
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * This program is free software; you can redistribute it and/or modify
 | 
				
			||||||
 | 
					 * it under the terms of the GNU General Public License as published by
 | 
				
			||||||
 | 
					 * the Free Software Foundation; either version 2, or (at your option)
 | 
				
			||||||
 | 
					 * any later version.
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * This program is distributed in the hope that it will be useful,
 | 
				
			||||||
 | 
					 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
				
			||||||
 | 
					 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
				
			||||||
 | 
					 * GNU General Public License for more details.
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * You should have received a copy of the GNU General Public License
 | 
				
			||||||
 | 
					 * along with this program (see the file COPYING); if not, write to the
 | 
				
			||||||
 | 
					 * Free Software Foundation, Inc.,
 | 
				
			||||||
 | 
					 * 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA
 | 
				
			||||||
 | 
					 ***********************************************************************/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#define DELAY 250000          /* Delay between refreshes (in microseconds) */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#define WMAPM_VERSION "1.2"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					typedef struct apm_info {
 | 
				
			||||||
 | 
					   const char driver_version[10];
 | 
				
			||||||
 | 
					   int        apm_version_major;
 | 
				
			||||||
 | 
					   int        apm_version_minor;
 | 
				
			||||||
 | 
					   int        apm_flags;
 | 
				
			||||||
 | 
					   int        ac_line_status;
 | 
				
			||||||
 | 
					   int        battery_status;
 | 
				
			||||||
 | 
					   int        battery_flags;
 | 
				
			||||||
 | 
					   int        battery_percentage;
 | 
				
			||||||
 | 
					   int        battery_time;
 | 
				
			||||||
 | 
					   int        using_minutes;
 | 
				
			||||||
 | 
					} apm_info;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifndef APM_32_BIT_SUPPORT
 | 
				
			||||||
 | 
					#define APM_32_BIT_SUPPORT      0x0002
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
							
								
								
									
										532
									
								
								wmtetris/wmtetris/wmtetris.xpm
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										532
									
								
								wmtetris/wmtetris/wmtetris.xpm
									
									
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,532 @@
 | 
				
			||||||
 | 
					/* XPM */
 | 
				
			||||||
 | 
					static char * wmtetris_xpm[] = {
 | 
				
			||||||
 | 
					"128 120 409 2",
 | 
				
			||||||
 | 
					"  	c None",
 | 
				
			||||||
 | 
					". 	c #000000",
 | 
				
			||||||
 | 
					"+ 	c #0000FF",
 | 
				
			||||||
 | 
					"@ 	c #010000",
 | 
				
			||||||
 | 
					"# 	c #020000",
 | 
				
			||||||
 | 
					"$ 	c #030000",
 | 
				
			||||||
 | 
					"% 	c #040000",
 | 
				
			||||||
 | 
					"& 	c #4D4D4D",
 | 
				
			||||||
 | 
					"* 	c #494949",
 | 
				
			||||||
 | 
					"= 	c #454545",
 | 
				
			||||||
 | 
					"- 	c #424242",
 | 
				
			||||||
 | 
					"; 	c #3F3F3F",
 | 
				
			||||||
 | 
					"> 	c #3D3D3D",
 | 
				
			||||||
 | 
					", 	c #3C3C3C",
 | 
				
			||||||
 | 
					"' 	c #3A3A3A",
 | 
				
			||||||
 | 
					") 	c #717571",
 | 
				
			||||||
 | 
					"! 	c #9E9A9E",
 | 
				
			||||||
 | 
					"~ 	c #181818",
 | 
				
			||||||
 | 
					"{ 	c #BEBEBE",
 | 
				
			||||||
 | 
					"] 	c #CFCFCF",
 | 
				
			||||||
 | 
					"^ 	c #8E8A8E",
 | 
				
			||||||
 | 
					"/ 	c #616561",
 | 
				
			||||||
 | 
					"( 	c #CFCBCF",
 | 
				
			||||||
 | 
					"_ 	c #A6A2A6",
 | 
				
			||||||
 | 
					": 	c #DFDFDF",
 | 
				
			||||||
 | 
					"< 	c #EFEBEF",
 | 
				
			||||||
 | 
					"[ 	c #E7E7E7",
 | 
				
			||||||
 | 
					"} 	c #BEBABE",
 | 
				
			||||||
 | 
					"| 	c #DFDBDF",
 | 
				
			||||||
 | 
					"1 	c #969296",
 | 
				
			||||||
 | 
					"2 	c #C7C7C7",
 | 
				
			||||||
 | 
					"3 	c #E7E3E7",
 | 
				
			||||||
 | 
					"4 	c #AEAEAE",
 | 
				
			||||||
 | 
					"5 	c #696969",
 | 
				
			||||||
 | 
					"6 	c #B6AEAE",
 | 
				
			||||||
 | 
					"7 	c #717171",
 | 
				
			||||||
 | 
					"8 	c #B6B2B6",
 | 
				
			||||||
 | 
					"9 	c #383430",
 | 
				
			||||||
 | 
					"0 	c #050000",
 | 
				
			||||||
 | 
					"a 	c #414141",
 | 
				
			||||||
 | 
					"b 	c #3E3E3E",
 | 
				
			||||||
 | 
					"c 	c #383838",
 | 
				
			||||||
 | 
					"d 	c #363636",
 | 
				
			||||||
 | 
					"e 	c #343434",
 | 
				
			||||||
 | 
					"f 	c #5F635F",
 | 
				
			||||||
 | 
					"g 	c #848484",
 | 
				
			||||||
 | 
					"h 	c #060A06",
 | 
				
			||||||
 | 
					"i 	c #5F5F5F",
 | 
				
			||||||
 | 
					"j 	c #A4A4A4",
 | 
				
			||||||
 | 
					"k 	c #B4B4B4",
 | 
				
			||||||
 | 
					"l 	c #B4B0B4",
 | 
				
			||||||
 | 
					"m 	c #C5BDBD",
 | 
				
			||||||
 | 
					"n 	c #161A16",
 | 
				
			||||||
 | 
					"o 	c #9C989C",
 | 
				
			||||||
 | 
					"p 	c #47433F",
 | 
				
			||||||
 | 
					"q 	c #161616",
 | 
				
			||||||
 | 
					"r 	c #949494",
 | 
				
			||||||
 | 
					"s 	c #474747",
 | 
				
			||||||
 | 
					"t 	c #16120E",
 | 
				
			||||||
 | 
					"u 	c #949094",
 | 
				
			||||||
 | 
					"v 	c #4F4F4F",
 | 
				
			||||||
 | 
					"w 	c #948C8C",
 | 
				
			||||||
 | 
					"x 	c #57534F",
 | 
				
			||||||
 | 
					"y 	c #8C8C8C",
 | 
				
			||||||
 | 
					"z 	c #575757",
 | 
				
			||||||
 | 
					"A 	c #160E0E",
 | 
				
			||||||
 | 
					"B 	c #8C888C",
 | 
				
			||||||
 | 
					"C 	c #5F5B57",
 | 
				
			||||||
 | 
					"D 	c #060000",
 | 
				
			||||||
 | 
					"E 	c #2E2A26",
 | 
				
			||||||
 | 
					"F 	c #070000",
 | 
				
			||||||
 | 
					"G 	c #393939",
 | 
				
			||||||
 | 
					"H 	c #353535",
 | 
				
			||||||
 | 
					"I 	c #333333",
 | 
				
			||||||
 | 
					"J 	c #313131",
 | 
				
			||||||
 | 
					"K 	c #2F2F2F",
 | 
				
			||||||
 | 
					"L 	c #4D514D",
 | 
				
			||||||
 | 
					"M 	c #8A868A",
 | 
				
			||||||
 | 
					"N 	c #8A8A8A",
 | 
				
			||||||
 | 
					"O 	c #7A7A7A",
 | 
				
			||||||
 | 
					"P 	c #928E92",
 | 
				
			||||||
 | 
					"Q 	c #929292",
 | 
				
			||||||
 | 
					"R 	c #8A8282",
 | 
				
			||||||
 | 
					"S 	c #2D312D",
 | 
				
			||||||
 | 
					"T 	c #0C0C0C",
 | 
				
			||||||
 | 
					"U 	c #827E82",
 | 
				
			||||||
 | 
					"V 	c #0C0804",
 | 
				
			||||||
 | 
					"W 	c #AAA6AA",
 | 
				
			||||||
 | 
					"X 	c #A2A2A2",
 | 
				
			||||||
 | 
					"Y 	c #040404",
 | 
				
			||||||
 | 
					"Z 	c #45413D",
 | 
				
			||||||
 | 
					"` 	c #0C0404",
 | 
				
			||||||
 | 
					" .	c #827A7A",
 | 
				
			||||||
 | 
					"..	c #726E72",
 | 
				
			||||||
 | 
					"+.	c #7A7272",
 | 
				
			||||||
 | 
					"@.	c #4D4945",
 | 
				
			||||||
 | 
					"#.	c #241C1C",
 | 
				
			||||||
 | 
					"$.	c #928A8A",
 | 
				
			||||||
 | 
					"%.	c #140804",
 | 
				
			||||||
 | 
					"&.	c #080000",
 | 
				
			||||||
 | 
					"*.	c #2E2E2E",
 | 
				
			||||||
 | 
					"=.	c #2B2B2B",
 | 
				
			||||||
 | 
					"-.	c #292929",
 | 
				
			||||||
 | 
					";.	c #3B3F3B",
 | 
				
			||||||
 | 
					">.	c #808080",
 | 
				
			||||||
 | 
					",.	c #787878",
 | 
				
			||||||
 | 
					"'.	c #787478",
 | 
				
			||||||
 | 
					").	c #1A1A1A",
 | 
				
			||||||
 | 
					"!.	c #686868",
 | 
				
			||||||
 | 
					"~.	c #231E1A",
 | 
				
			||||||
 | 
					"{.	c #686468",
 | 
				
			||||||
 | 
					"].	c #232323",
 | 
				
			||||||
 | 
					"^.	c #2B2323",
 | 
				
			||||||
 | 
					"/.	c #685F5B",
 | 
				
			||||||
 | 
					"(.	c #332F2B",
 | 
				
			||||||
 | 
					"_.	c #5B5753",
 | 
				
			||||||
 | 
					":.	c #2B2723",
 | 
				
			||||||
 | 
					"<.	c #5B5B5B",
 | 
				
			||||||
 | 
					"[.	c #3B3733",
 | 
				
			||||||
 | 
					"}.	c #120A0A",
 | 
				
			||||||
 | 
					"|.	c #433F3B",
 | 
				
			||||||
 | 
					"1.	c #0A0000",
 | 
				
			||||||
 | 
					"2.	c #2D2D2D",
 | 
				
			||||||
 | 
					"3.	c #272727",
 | 
				
			||||||
 | 
					"4.	c #252525",
 | 
				
			||||||
 | 
					"5.	c #242424",
 | 
				
			||||||
 | 
					"6.	c #292D29",
 | 
				
			||||||
 | 
					"7.	c #5E5551",
 | 
				
			||||||
 | 
					"8.	c #191410",
 | 
				
			||||||
 | 
					"9.	c #494D49",
 | 
				
			||||||
 | 
					"0.	c #5E5A5E",
 | 
				
			||||||
 | 
					"a.	c #5E5E5E",
 | 
				
			||||||
 | 
					"b.	c #100C08",
 | 
				
			||||||
 | 
					"c.	c #515151",
 | 
				
			||||||
 | 
					"d.	c #191010",
 | 
				
			||||||
 | 
					"e.	c #514D49",
 | 
				
			||||||
 | 
					"f.	c #666266",
 | 
				
			||||||
 | 
					"g.	c #211D19",
 | 
				
			||||||
 | 
					"h.	c #292521",
 | 
				
			||||||
 | 
					"i.	c #080400",
 | 
				
			||||||
 | 
					"j.	c #413D39",
 | 
				
			||||||
 | 
					"k.	c #312D29",
 | 
				
			||||||
 | 
					"l.	c #0C0000",
 | 
				
			||||||
 | 
					"m.	c #212121",
 | 
				
			||||||
 | 
					"n.	c #1F1F1F",
 | 
				
			||||||
 | 
					"o.	c #090000",
 | 
				
			||||||
 | 
					"p.	c #0B0000",
 | 
				
			||||||
 | 
					"q.	c #0D0000",
 | 
				
			||||||
 | 
					"r.	c #1E1E1E",
 | 
				
			||||||
 | 
					"s.	c #191919",
 | 
				
			||||||
 | 
					"t.	c #0E0000",
 | 
				
			||||||
 | 
					"u.	c #0F0000",
 | 
				
			||||||
 | 
					"v.	c #141414",
 | 
				
			||||||
 | 
					"w.	c #100000",
 | 
				
			||||||
 | 
					"x.	c #0E0E0E",
 | 
				
			||||||
 | 
					"y.	c #110000",
 | 
				
			||||||
 | 
					"z.	c #120000",
 | 
				
			||||||
 | 
					"A.	c #130000",
 | 
				
			||||||
 | 
					"B.	c #140000",
 | 
				
			||||||
 | 
					"C.	c #150000",
 | 
				
			||||||
 | 
					"D.	c #160000",
 | 
				
			||||||
 | 
					"E.	c #170000",
 | 
				
			||||||
 | 
					"F.	c #180000",
 | 
				
			||||||
 | 
					"G.	c #190000",
 | 
				
			||||||
 | 
					"H.	c #1A0000",
 | 
				
			||||||
 | 
					"I.	c #1B0000",
 | 
				
			||||||
 | 
					"J.	c #1C0000",
 | 
				
			||||||
 | 
					"K.	c #1D0000",
 | 
				
			||||||
 | 
					"L.	c #1E0000",
 | 
				
			||||||
 | 
					"M.	c #4E4E4E",
 | 
				
			||||||
 | 
					"N.	c #4A4A4A",
 | 
				
			||||||
 | 
					"O.	c #444444",
 | 
				
			||||||
 | 
					"P.	c #404040",
 | 
				
			||||||
 | 
					"Q.	c #1F0000",
 | 
				
			||||||
 | 
					"R.	c #200000",
 | 
				
			||||||
 | 
					"S.	c #210000",
 | 
				
			||||||
 | 
					"T.	c #220000",
 | 
				
			||||||
 | 
					"U.	c #230000",
 | 
				
			||||||
 | 
					"V.	c #008F00",
 | 
				
			||||||
 | 
					"W.	c #00E100",
 | 
				
			||||||
 | 
					"X.	c #240000",
 | 
				
			||||||
 | 
					"Y.	c #250000",
 | 
				
			||||||
 | 
					"Z.	c #260000",
 | 
				
			||||||
 | 
					"`.	c #270000",
 | 
				
			||||||
 | 
					" +	c #280000",
 | 
				
			||||||
 | 
					".+	c #290000",
 | 
				
			||||||
 | 
					"++	c #2A0000",
 | 
				
			||||||
 | 
					"@+	c #2B0000",
 | 
				
			||||||
 | 
					"#+	c #2C0000",
 | 
				
			||||||
 | 
					"$+	c #2D0000",
 | 
				
			||||||
 | 
					"%+	c #2E0000",
 | 
				
			||||||
 | 
					"&+	c #D7D3D7",
 | 
				
			||||||
 | 
					"*+	c #9E9E9E",
 | 
				
			||||||
 | 
					"=+	c #2F0000",
 | 
				
			||||||
 | 
					"-+	c #515551",
 | 
				
			||||||
 | 
					";+	c #300000",
 | 
				
			||||||
 | 
					">+	c #310000",
 | 
				
			||||||
 | 
					",+	c #303430",
 | 
				
			||||||
 | 
					"'+	c #000400",
 | 
				
			||||||
 | 
					")+	c #320000",
 | 
				
			||||||
 | 
					"!+	c #282C28",
 | 
				
			||||||
 | 
					"~+	c #080C08",
 | 
				
			||||||
 | 
					"{+	c #969696",
 | 
				
			||||||
 | 
					"]+	c #330000",
 | 
				
			||||||
 | 
					"^+	c #340000",
 | 
				
			||||||
 | 
					"/+	c #350000",
 | 
				
			||||||
 | 
					"(+	c #360000",
 | 
				
			||||||
 | 
					"_+	c #370000",
 | 
				
			||||||
 | 
					":+	c #380000",
 | 
				
			||||||
 | 
					"<+	c #390000",
 | 
				
			||||||
 | 
					"[+	c #3A0000",
 | 
				
			||||||
 | 
					"}+	c #3B0000",
 | 
				
			||||||
 | 
					"|+	c #3C0000",
 | 
				
			||||||
 | 
					"1+	c #3D0000",
 | 
				
			||||||
 | 
					"2+	c #3E0000",
 | 
				
			||||||
 | 
					"3+	c #3F0000",
 | 
				
			||||||
 | 
					"4+	c #400000",
 | 
				
			||||||
 | 
					"5+	c #410000",
 | 
				
			||||||
 | 
					"6+	c #420000",
 | 
				
			||||||
 | 
					"7+	c #616161",
 | 
				
			||||||
 | 
					"8+	c #430000",
 | 
				
			||||||
 | 
					"9+	c #440000",
 | 
				
			||||||
 | 
					"0+	c #450000",
 | 
				
			||||||
 | 
					"a+	c #460000",
 | 
				
			||||||
 | 
					"b+	c #470000",
 | 
				
			||||||
 | 
					"c+	c #480000",
 | 
				
			||||||
 | 
					"d+	c #490000",
 | 
				
			||||||
 | 
					"e+	c #4A0000",
 | 
				
			||||||
 | 
					"f+	c #4B0000",
 | 
				
			||||||
 | 
					"g+	c #4C0000",
 | 
				
			||||||
 | 
					"h+	c #4D0000",
 | 
				
			||||||
 | 
					"i+	c #4E0000",
 | 
				
			||||||
 | 
					"j+	c #4F0000",
 | 
				
			||||||
 | 
					"k+	c #500000",
 | 
				
			||||||
 | 
					"l+	c #510000",
 | 
				
			||||||
 | 
					"m+	c #6B6B6B",
 | 
				
			||||||
 | 
					"n+	c #0D0D0D",
 | 
				
			||||||
 | 
					"o+	c #520000",
 | 
				
			||||||
 | 
					"p+	c #530000",
 | 
				
			||||||
 | 
					"q+	c #540000",
 | 
				
			||||||
 | 
					"r+	c #505050",
 | 
				
			||||||
 | 
					"s+	c #550000",
 | 
				
			||||||
 | 
					"t+	c #560000",
 | 
				
			||||||
 | 
					"u+	c #131313",
 | 
				
			||||||
 | 
					"v+	c #570000",
 | 
				
			||||||
 | 
					"w+	c #580000",
 | 
				
			||||||
 | 
					"x+	c #590000",
 | 
				
			||||||
 | 
					"y+	c #00C700",
 | 
				
			||||||
 | 
					"z+	c #00B200",
 | 
				
			||||||
 | 
					"A+	c #009A00",
 | 
				
			||||||
 | 
					"B+	c #FFFFFF",
 | 
				
			||||||
 | 
					"C+	c #F8F8F8",
 | 
				
			||||||
 | 
					"D+	c #F2F2F2",
 | 
				
			||||||
 | 
					"E+	c #EFEFEF",
 | 
				
			||||||
 | 
					"F+	c #EDEDED",
 | 
				
			||||||
 | 
					"G+	c #ECECEC",
 | 
				
			||||||
 | 
					"H+	c #EAEAEA",
 | 
				
			||||||
 | 
					"I+	c #E9E9E9",
 | 
				
			||||||
 | 
					"J+	c #008600",
 | 
				
			||||||
 | 
					"K+	c #FEFEFE",
 | 
				
			||||||
 | 
					"L+	c #FBFBFB",
 | 
				
			||||||
 | 
					"M+	c #F9F9F9",
 | 
				
			||||||
 | 
					"N+	c #F5F5F5",
 | 
				
			||||||
 | 
					"O+	c #F3F3F3",
 | 
				
			||||||
 | 
					"P+	c #EBEBEB",
 | 
				
			||||||
 | 
					"Q+	c #E8E8E8",
 | 
				
			||||||
 | 
					"R+	c #E4E4E4",
 | 
				
			||||||
 | 
					"S+	c #E2E2E2",
 | 
				
			||||||
 | 
					"T+	c #006D00",
 | 
				
			||||||
 | 
					"U+	c #F4F4F4",
 | 
				
			||||||
 | 
					"V+	c #E6E6E6",
 | 
				
			||||||
 | 
					"W+	c #E5E5E5",
 | 
				
			||||||
 | 
					"X+	c #E0E0E0",
 | 
				
			||||||
 | 
					"Y+	c #DEDEDE",
 | 
				
			||||||
 | 
					"Z+	c #DDDDDD",
 | 
				
			||||||
 | 
					"`+	c #DBDBDB",
 | 
				
			||||||
 | 
					" @	c #D8D8D8",
 | 
				
			||||||
 | 
					".@	c #D7D7D7",
 | 
				
			||||||
 | 
					"+@	c #00C7C7",
 | 
				
			||||||
 | 
					"@@	c #00B2B6",
 | 
				
			||||||
 | 
					"#@	c #009A9E",
 | 
				
			||||||
 | 
					"$@	c #E3E3E3",
 | 
				
			||||||
 | 
					"%@	c #D9D9D9",
 | 
				
			||||||
 | 
					"&@	c #D6D6D6",
 | 
				
			||||||
 | 
					"*@	c #D5D5D5",
 | 
				
			||||||
 | 
					"=@	c #D3D3D3",
 | 
				
			||||||
 | 
					"-@	c #D1D1D1",
 | 
				
			||||||
 | 
					";@	c #D0D0D0",
 | 
				
			||||||
 | 
					">@	c #CDCDCD",
 | 
				
			||||||
 | 
					",@	c #CBCBCB",
 | 
				
			||||||
 | 
					"'@	c #CACACA",
 | 
				
			||||||
 | 
					")@	c #C8C8C8",
 | 
				
			||||||
 | 
					"!@	c #008686",
 | 
				
			||||||
 | 
					"~@	c #DCDCDC",
 | 
				
			||||||
 | 
					"{@	c #D4D4D4",
 | 
				
			||||||
 | 
					"]@	c #CECECE",
 | 
				
			||||||
 | 
					"^@	c #C9C9C9",
 | 
				
			||||||
 | 
					"/@	c #C6C6C6",
 | 
				
			||||||
 | 
					"(@	c #C5C5C5",
 | 
				
			||||||
 | 
					"_@	c #C1C1C1",
 | 
				
			||||||
 | 
					":@	c #C0C0C0",
 | 
				
			||||||
 | 
					"<@	c #006D69",
 | 
				
			||||||
 | 
					"[@	c #0000C0",
 | 
				
			||||||
 | 
					"}@	c #D2D2D2",
 | 
				
			||||||
 | 
					"|@	c #CCCCCC",
 | 
				
			||||||
 | 
					"1@	c #C4C4C4",
 | 
				
			||||||
 | 
					"2@	c #C3C3C3",
 | 
				
			||||||
 | 
					"3@	c #BFBFBF",
 | 
				
			||||||
 | 
					"4@	c #BBBBBB",
 | 
				
			||||||
 | 
					"5@	c #B9B9B9",
 | 
				
			||||||
 | 
					"6@	c #B6B6B6",
 | 
				
			||||||
 | 
					"7@	c #B5B5B5",
 | 
				
			||||||
 | 
					"8@	c #0000C7",
 | 
				
			||||||
 | 
					"9@	c #0000B6",
 | 
				
			||||||
 | 
					"0@	c #00009E",
 | 
				
			||||||
 | 
					"a@	c #C2C2C2",
 | 
				
			||||||
 | 
					"b@	c #BDBDBD",
 | 
				
			||||||
 | 
					"c@	c #BCBCBC",
 | 
				
			||||||
 | 
					"d@	c #B7B7B7",
 | 
				
			||||||
 | 
					"e@	c #B2B2B2",
 | 
				
			||||||
 | 
					"f@	c #AFAFAF",
 | 
				
			||||||
 | 
					"g@	c #ABABAB",
 | 
				
			||||||
 | 
					"h@	c #A9A9A9",
 | 
				
			||||||
 | 
					"i@	c #A8A8A8",
 | 
				
			||||||
 | 
					"j@	c #A6A6A6",
 | 
				
			||||||
 | 
					"k@	c #A5A5A5",
 | 
				
			||||||
 | 
					"l@	c #000086",
 | 
				
			||||||
 | 
					"m@	c #000069",
 | 
				
			||||||
 | 
					"n@	c #ADADAD",
 | 
				
			||||||
 | 
					"o@	c #A7A7A7",
 | 
				
			||||||
 | 
					"p@	c #A0A0A0",
 | 
				
			||||||
 | 
					"q@	c #9D9D9D",
 | 
				
			||||||
 | 
					"r@	c #9C9C9C",
 | 
				
			||||||
 | 
					"s@	c #9A9A9A",
 | 
				
			||||||
 | 
					"t@	c #999999",
 | 
				
			||||||
 | 
					"u@	c #979797",
 | 
				
			||||||
 | 
					"v@	c #919191",
 | 
				
			||||||
 | 
					"w@	c #8F8F8F",
 | 
				
			||||||
 | 
					"x@	c #C700C7",
 | 
				
			||||||
 | 
					"y@	c #B600B6",
 | 
				
			||||||
 | 
					"z@	c #9E009E",
 | 
				
			||||||
 | 
					"A@	c #A3A3A3",
 | 
				
			||||||
 | 
					"B@	c #9B9B9B",
 | 
				
			||||||
 | 
					"C@	c #959595",
 | 
				
			||||||
 | 
					"D@	c #909090",
 | 
				
			||||||
 | 
					"E@	c #898989",
 | 
				
			||||||
 | 
					"F@	c #878787",
 | 
				
			||||||
 | 
					"G@	c #828282",
 | 
				
			||||||
 | 
					"H@	c #860086",
 | 
				
			||||||
 | 
					"I@	c #989898",
 | 
				
			||||||
 | 
					"J@	c #939393",
 | 
				
			||||||
 | 
					"K@	c #8E8E8E",
 | 
				
			||||||
 | 
					"L@	c #8B8B8B",
 | 
				
			||||||
 | 
					"M@	c #858585",
 | 
				
			||||||
 | 
					"N@	c #7D7D7D",
 | 
				
			||||||
 | 
					"O@	c #7C7C7C",
 | 
				
			||||||
 | 
					"P@	c #797979",
 | 
				
			||||||
 | 
					"Q@	c #777777",
 | 
				
			||||||
 | 
					"R@	c #690069",
 | 
				
			||||||
 | 
					"S@	c #888888",
 | 
				
			||||||
 | 
					"T@	c #838383",
 | 
				
			||||||
 | 
					"U@	c #7E7E7E",
 | 
				
			||||||
 | 
					"V@	c #7B7B7B",
 | 
				
			||||||
 | 
					"W@	c #767676",
 | 
				
			||||||
 | 
					"X@	c #727272",
 | 
				
			||||||
 | 
					"Y@	c #707070",
 | 
				
			||||||
 | 
					"Z@	c #6F6F6F",
 | 
				
			||||||
 | 
					"`@	c #6D6D6D",
 | 
				
			||||||
 | 
					" #	c #C70000",
 | 
				
			||||||
 | 
					".#	c #B60000",
 | 
				
			||||||
 | 
					"+#	c #9E0000",
 | 
				
			||||||
 | 
					"@#	c #868686",
 | 
				
			||||||
 | 
					"##	c #282828",
 | 
				
			||||||
 | 
					"$#	c #818181",
 | 
				
			||||||
 | 
					"%#	c #747474",
 | 
				
			||||||
 | 
					"&#	c #737373",
 | 
				
			||||||
 | 
					"*#	c #6E6E6E",
 | 
				
			||||||
 | 
					"=#	c #666666",
 | 
				
			||||||
 | 
					"-#	c #656565",
 | 
				
			||||||
 | 
					";#	c #636363",
 | 
				
			||||||
 | 
					">#	c #860000",
 | 
				
			||||||
 | 
					",#	c #757575",
 | 
				
			||||||
 | 
					"'#	c #6C6C6C",
 | 
				
			||||||
 | 
					")#	c #646464",
 | 
				
			||||||
 | 
					"!#	c #5A5A5A",
 | 
				
			||||||
 | 
					"~#	c #585858",
 | 
				
			||||||
 | 
					"{#	c #565656",
 | 
				
			||||||
 | 
					"]#	c #690000",
 | 
				
			||||||
 | 
					"^#	c #BAB8BA",
 | 
				
			||||||
 | 
					"/#	c #6A6A6A",
 | 
				
			||||||
 | 
					"(#	c #676767",
 | 
				
			||||||
 | 
					"_#	c #595959",
 | 
				
			||||||
 | 
					":#	c #545454",
 | 
				
			||||||
 | 
					"<#	c #535353",
 | 
				
			||||||
 | 
					"[#	c #4B4B4B",
 | 
				
			||||||
 | 
					"}#	c #C7C700",
 | 
				
			||||||
 | 
					"|#	c #B6B200",
 | 
				
			||||||
 | 
					"1#	c #9E9A00",
 | 
				
			||||||
 | 
					"2#	c #868600",
 | 
				
			||||||
 | 
					"3#	c #696D00",
 | 
				
			||||||
 | 
					"4#	c #797D79",
 | 
				
			||||||
 | 
					"5#	c #696D69",
 | 
				
			||||||
 | 
					"6#	c #414541",
 | 
				
			||||||
 | 
					"7#	c #202020",
 | 
				
			||||||
 | 
					"8#	c #383C38",
 | 
				
			||||||
 | 
					"9#	c #202420",
 | 
				
			||||||
 | 
					"0#	c #595D59",
 | 
				
			||||||
 | 
					"a#	c #101410",
 | 
				
			||||||
 | 
					"b#	c #CF0000",
 | 
				
			||||||
 | 
					". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ",
 | 
				
			||||||
 | 
					". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ",
 | 
				
			||||||
 | 
					". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ",
 | 
				
			||||||
 | 
					". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ",
 | 
				
			||||||
 | 
					". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + . . . . . . . . . . . . . . . . @ @ @ @ @ @ @ # # # # # # $ $ $ $ $ $ $ % % % & * = - ; > , ' ' ' , > ; - = * & + + + + ",
 | 
				
			||||||
 | 
					". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + . ) ! ~ ) { ] ^ / ( _ : < [ } ( < [ | 1 | < [ { 2 < 3 4 5 | < [ 6 7 ( 3 8 9 0 * = a b ' c d e e e d c ' b a = * + + + + ",
 | 
				
			||||||
 | 
					". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + @ f g h i j k k l m ; n o p q r s . . . t u v t w x t y z A B C A B i D ; E F = a > G H I J K K K J I H G > a = + + + + ",
 | 
				
			||||||
 | 
					". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + $ L M N O P Q O R Q S T U H V R W X L . Y O Z `  .X X ..` % +.@.. #.$.X +.%.&.- b G e J *.=.-.-.-.=.*.J e G b - + + + + ",
 | 
				
			||||||
 | 
					". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + % ;.>.,.>.'.,.).# !.~.# {.].# {.^.. . . . /.(.# /._.{.:.. . <.[.. ^.}.. _.|.1.; ' H J 2.-.3.4.5.4.3.-.2.J H ' ; + + + + ",
 | 
				
			||||||
 | 
					". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + D 6.7.8.9.0.a.b.. c.d.. e.8.. e.f.f.f.b.. * g.. * h.i.e.j.f.0.a.e.k.a.f.c.&.l.> c I *.-.4.m.n.n.n.m.4.-.*.I c > + + + + ",
 | 
				
			||||||
 | 
					". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + F &.&.&.&.&.&.&.o.o.o.o.o.o.1.1.1.1.1.1.1.p.p.p.p.p.p.p.l.l.l.l.l.l.q.q.q.q.q., d J =.3.m.r.).s.).r.m.3.=.J d , + + + + ",
 | 
				
			||||||
 | 
					". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + o.o.o.o.1.1.1.1.1.1.1.p.p.p.p.p.p.l.l.l.l.l.l.l.q.q.q.q.q.q.t.t.t.t.t.t.t.u.u.' e K -.4.n.).q v.q ).n.4.-.K e ' + + + + ",
 | 
				
			||||||
 | 
					". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + p.p.p.p.p.p.p.l.l.l.l.l.l.l.q.q.q.q.q.q.t.t.t.t.t.t.t.u.u.u.u.u.u.u.w.w.w.w.w.' e K -.5.n.s.v.x.v.s.n.5.-.K e ' + + + + ",
 | 
				
			||||||
 | 
					". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + l.l.l.q.q.q.q.q.q.q.t.t.t.t.t.t.t.u.u.u.u.u.u.w.w.w.w.w.w.w.y.y.y.y.y.y.y.z.z.' e K -.4.n.).q v.q ).n.4.-.K e ' + + + + ",
 | 
				
			||||||
 | 
					". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + t.t.t.t.t.t.u.u.u.u.u.u.u.w.w.w.w.w.w.w.y.y.y.y.y.y.z.z.z.z.z.z.z.A.A.A.A.A.A., d J =.3.m.r.).s.).r.m.3.=.J d , + + + + ",
 | 
				
			||||||
 | 
					". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + u.u.u.w.w.w.w.w.w.y.y.y.y.y.y.y.z.z.z.z.z.z.z.A.A.A.A.A.A.B.B.B.B.B.B.B.C.C.C.> c I *.-.4.m.n.n.n.m.4.-.*.I c > + + + + ",
 | 
				
			||||||
 | 
					". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + y.y.y.y.y.y.z.z.z.z.z.z.A.A.A.A.A.A.A.B.B.B.B.B.B.B.C.C.C.C.C.C.D.D.D.D.D.D.D.; ' H J 2.-.3.4.5.4.3.-.2.J H ' ; + + + + ",
 | 
				
			||||||
 | 
					". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + z.z.A.A.A.A.A.A.A.B.B.B.B.B.B.C.C.C.C.C.C.C.D.D.D.D.D.D.D.E.E.E.E.E.E.F.F.F.F.- b G e J *.=.-.-.-.=.*.J e G b - + + + + ",
 | 
				
			||||||
 | 
					". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + B.B.B.B.B.C.C.C.C.C.C.C.D.D.D.D.D.D.E.E.E.E.E.E.E.F.F.F.F.F.F.G.G.G.G.G.G.G.H.= a > G H I J K K K J I H G > a = + + + + ",
 | 
				
			||||||
 | 
					". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + C.D.D.D.D.D.D.D.E.E.E.E.E.E.E.F.F.F.F.F.F.G.G.G.G.G.G.G.H.H.H.H.H.H.H.I.I.I.I.* = a b ' c d e e e d c ' b a = * + + + + ",
 | 
				
			||||||
 | 
					". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + E.E.E.E.F.F.F.F.F.F.F.G.G.G.G.G.G.G.H.H.H.H.H.H.I.I.I.I.I.I.I.J.J.J.J.J.J.J.K.& * = - ; > , ' ' ' , > ; - = * & + + + + ",
 | 
				
			||||||
 | 
					". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + G.G.G.G.G.G.G.H.H.H.H.H.H.H.I.I.I.I.I.I.J.J.J.J.J.J.J.K.K.K.K.K.K.K.L.L.L.L.L.c.M.N.s O.- a P.; P.a - O.s N.M.c.+ + + + ",
 | 
				
			||||||
 | 
					". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + H.H.H.H.I.I.I.I.I.I.J.J.J.J.J.J.J.K.K.K.K.K.K.K.L.L.L.L.L.L.Q.Q.Q.Q.Q.Q.Q.R.R.. . . . . . . . . . . . . . . . . + + + + ",
 | 
				
			||||||
 | 
					". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + J.J.J.J.J.J.J.K.K.K.K.K.K.L.L.L.L.L.L.L.Q.Q.Q.Q.Q.Q.Q.R.R.R.R.R.R.S.S.S.S.S.S.. . . . . . . . . . . . . . . . . + + + + ",
 | 
				
			||||||
 | 
					". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + K.K.K.L.L.L.L.L.L.L.Q.Q.Q.Q.Q.Q.R.R.R.R.R.R.R.S.S.S.S.S.S.S.T.T.T.T.T.T.U.U.U.. V.W.V.. V.W.V.. V.W.V.. V.W.V.. + + + + ",
 | 
				
			||||||
 | 
					". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + Q.Q.Q.Q.Q.Q.R.R.R.R.R.R.S.S.S.S.S.S.S.T.T.T.T.T.T.T.U.U.U.U.U.U.U.X.X.X.X.X.X.. W.. W.. W.. W.. W.. W.. W.. W.. + + + + ",
 | 
				
			||||||
 | 
					". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + R.R.S.S.S.S.S.S.S.T.T.T.T.T.T.T.U.U.U.U.U.U.X.X.X.X.X.X.X.Y.Y.Y.Y.Y.Y.Y.Z.Z.Z.. W.. W.. W.. W.. W.. W.. W.. W.. + + + + ",
 | 
				
			||||||
 | 
					". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + T.T.T.T.T.U.U.U.U.U.U.U.X.X.X.X.X.X.X.Y.Y.Y.Y.Y.Y.Z.Z.Z.Z.Z.Z.Z.`.`.`.`.`.`.`.. W.. W.. W.. W.. W.. W.. W.. W.. + + + + ",
 | 
				
			||||||
 | 
					". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + U.U.X.X.X.X.X.X.Y.Y.Y.Y.Y.Y.Y.Z.Z.Z.Z.Z.Z.`.`.`.`.`.`.`. + + + + + + +.+.+.+.+. V.W.V.. V.W.V.. V.W.V.. V.W.V.. + + + + ",
 | 
				
			||||||
 | 
					". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + Y.Y.Y.Y.Y.Z.Z.Z.Z.Z.Z.`.`.`.`.`.`.`. + + + + + + +.+.+.+.+.+.+++++++++++++++@+. . . . . . . . . . . . . . . . . + + + + ",
 | 
				
			||||||
 | 
					". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + Z.`.`.`.`.`.`.`. + + + + + +.+.+.+.+.+.+.+++++++++++++++@+@+@+@+@+@+#+#+#+#+#+. . . . . . . . . . . . . . . . . + + + + ",
 | 
				
			||||||
 | 
					". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + +  + + + +.+.+.+.+.+.+.+++++++++++++@+@+@+@+@+@+@+#+#+#+#+#+#+$+$+$+$+$+$+$+%+%+&+&+&+&+&+&+&+*+. &+&+&+&+&+&+&+*++ + + + ",
 | 
				
			||||||
 | 
					". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + ++++++++++++++@+@+@+@+@+@+@+#+#+#+#+#+#+$+$+$+$+$+$+$+%+%+%+%+%+%+%+=+=+=+=+=+&+*+*+*+*+*+*+-+. &+*+*+*+*+*+*+-++ + + + ",
 | 
				
			||||||
 | 
					". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + @+@+@+#+#+#+#+#+#+#+$+$+$+$+$+$+$+%+%+%+%+%+%+=+=+=+=+=+=+=+;+;+;+;+;+;+;+>+>+&+1 ,+'+'+,+1 -+. &+1 ,+'+'+,+1 -++ + + + ",
 | 
				
			||||||
 | 
					". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + $+$+$+$+$+$+%+%+%+%+%+%+%+=+=+=+=+=+=+=+;+;+;+;+;+;+>+>+>+>+>+>+>+)+)+)+)+)+)+&+!+~+{+{+~+!+-+. &+!+~+{+{+~+!+-++ + + + ",
 | 
				
			||||||
 | 
					". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + %+%+%+=+=+=+=+=+=+;+;+;+;+;+;+;+>+>+>+>+>+>+)+)+)+)+)+)+)+]+]+]+]+]+]+]+^+^+^+&+. 7 *+9.*+. -+. &+. *+9.*+7 . -++ + + + ",
 | 
				
			||||||
 | 
					". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + ;+;+;+;+;+;+>+>+>+>+>+>+)+)+)+)+)+)+)+]+]+]+]+]+]+]+^+^+^+^+^+^+/+/+/+/+/+/+/+&+!+. 7 . 9.*+-+. &+*+9.. 7 . !+-++ + + + ",
 | 
				
			||||||
 | 
					". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + >+>+)+)+)+)+)+)+]+]+]+]+]+]+]+^+^+^+^+^+^+^+/+/+/+/+/+/+/+(+(+(+(+(+(+_+_+_+_+&+1 !+. . . 9.-+. &+9.. . . !+1 -++ + + + ",
 | 
				
			||||||
 | 
					". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + ]+]+]+]+]+^+^+^+^+^+^+/+/+/+/+/+/+/+(+(+(+(+(+(+(+_+_+_+_+_+_+:+:+:+:+:+:+:+<+&+*+*+*+*+*+*+-+. &+*+*+*+*+*+*+-++ + + + ",
 | 
				
			||||||
 | 
					". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + ^+/+/+/+/+/+/+/+(+(+(+(+(+(+(+_+_+_+_+_+_+:+:+:+:+:+:+:+<+<+<+<+<+<+<+[+[+[+[+*+-+-+-+-+-+-+-+. *+-+-+-+-+-+-+-++ + + + ",
 | 
				
			||||||
 | 
					". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + (+(+(+(+_+_+_+_+_+_+_+:+:+:+:+:+:+<+<+<+<+<+<+<+[+[+[+[+[+[+[+}+}+}+}+}+}+}+|+. . . . . . . . . . . . . . . . . + + + + ",
 | 
				
			||||||
 | 
					". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + :+:+:+:+:+:+:+<+<+<+<+<+<+<+[+[+[+[+[+[+}+}+}+}+}+}+}+|+|+|+|+|+|+|+1+1+1+1+1+&+&+&+&+&+&+&+*+. &+&+&+&+&+&+&+*++ + + + ",
 | 
				
			||||||
 | 
					". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + <+<+<+<+[+[+[+[+[+[+}+}+}+}+}+}+}+|+|+|+|+|+|+|+1+1+1+1+1+1+2+2+2+2+2+2+2+3+3+&+*+*+*+*+*+*+-+. &+*+*+*+*+*+*+-++ + + + ",
 | 
				
			||||||
 | 
					". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + }+}+}+}+}+}+}+|+|+|+|+|+|+1+1+1+1+1+1+1+2+2+2+2+2+2+3+3+3+3+3+3+3+4+4+4+4+4+4+&+*+*+*+) * *+-+. &+*+* ) *+*+*+-++ + + + ",
 | 
				
			||||||
 | 
					". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + |+|+|+1+1+1+1+1+1+1+2+2+2+2+2+2+3+3+3+3+3+3+3+4+4+4+4+4+4+5+5+5+5+5+5+5+6+6+6+&+*+7+c . . *+-+. &+*+. . c 7+*+-++ + + + ",
 | 
				
			||||||
 | 
					". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + 2+2+2+2+2+2+3+3+3+3+3+3+3+4+4+4+4+4+4+5+5+5+5+5+5+5+6+6+6+6+6+6+6+8+8+8+8+8+8+&+c ~+'+. . *+-+. &+*+. . '+~+c -++ + + + ",
 | 
				
			||||||
 | 
					". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + 3+3+4+4+4+4+4+4+4+5+5+5+5+5+5+6+6+6+6+6+6+6+8+8+8+8+8+8+8+9+9+9+9+9+9+9+0+0+0+&+*+7+c . . *+-+. &+*+. . c 7+*+-++ + + + ",
 | 
				
			||||||
 | 
					". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + 5+5+5+5+5+6+6+6+6+6+6+6+8+8+8+8+8+8+8+9+9+9+9+9+9+0+0+0+0+0+0+0+a+a+a+a+a+a+b+&+*+*+*+) * *+-+. &+*+* ) *+*+*+-++ + + + ",
 | 
				
			||||||
 | 
					". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + 6+6+8+8+8+8+8+8+9+9+9+9+9+9+9+0+0+0+0+0+0+0+a+a+a+a+a+a+b+b+b+b+b+b+b+c+c+c+c+&+*+*+*+*+*+*+-+. &+*+*+*+*+*+*+-++ + + + ",
 | 
				
			||||||
 | 
					". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + 9+9+9+9+9+0+0+0+0+0+0+a+a+a+a+a+a+a+b+b+b+b+b+b+b+c+c+c+c+c+c+d+d+d+d+d+d+d+e+*+-+-+-+-+-+-+-+. *+-+-+-+-+-+-+-++ + + + ",
 | 
				
			||||||
 | 
					". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + 0+a+a+a+a+a+a+a+b+b+b+b+b+b+c+c+c+c+c+c+c+d+d+d+d+d+d+d+e+e+e+e+e+e+f+f+f+f+f+. . . . . . . . . . . . . . . . . + + + + ",
 | 
				
			||||||
 | 
					". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + b+b+b+b+c+c+c+c+c+c+c+d+d+d+d+d+d+e+e+e+e+e+e+e+f+f+f+f+f+f+f+g+g+g+g+g+g+h+h+&+&+&+&+&+&+&+&+&+&+&+&+&+&+&+&+*++ + + + ",
 | 
				
			||||||
 | 
					". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + d+d+d+d+d+d+d+e+e+e+e+e+e+f+f+f+f+f+f+f+g+g+g+g+g+g+g+h+h+h+h+h+h+i+i+i+i+i+i+&+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+-++ + + + ",
 | 
				
			||||||
 | 
					". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + e+e+e+f+f+f+f+f+f+f+g+g+g+g+g+g+g+h+h+h+h+h+h+i+i+i+i+i+i+i+j+j+j+j+j+j+j+k+k+&+*+* . . . . . . . . . . . * *+-++ + + + ",
 | 
				
			||||||
 | 
					". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + g+g+g+g+g+g+h+h+h+h+h+h+h+i+i+i+i+i+i+i+j+j+j+j+j+j+k+k+k+k+k+k+k+l+l+l+l+l+l+&+*+*+m+n+. . . . . . . n+m+*+*+9.+ + + + ",
 | 
				
			||||||
 | 
					". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + h+h+i+i+i+i+i+i+i+j+j+j+j+j+j+j+k+k+k+k+k+k+k+l+l+l+l+l+l+o+o+o+o+o+o+o+p+p+p+&+*+*+*+y *.. . . . . *.y *+*+*+-++ + + + ",
 | 
				
			||||||
 | 
					". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + j+j+j+j+j+j+k+k+k+k+k+k+l+l+l+l+l+l+l+o+o+o+o+o+o+o+p+p+p+p+p+p+q+q+q+q+q+q+q+&+*+*+*+*+*+r+. . . r+*+*+*+*+*+-++ + + + ",
 | 
				
			||||||
 | 
					". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + k+k+l+l+l+l+l+l+l+o+o+o+o+o+o+p+p+p+p+p+p+p+q+q+q+q+q+q+q+s+s+s+s+s+s+t+t+t+t+&+*+*+*+*+*+*+7 u+7 *+*+*+*+*+*+-++ + + + ",
 | 
				
			||||||
 | 
					". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + o+o+o+o+o+p+p+p+p+p+p+p+q+q+q+q+q+q+s+s+s+s+s+s+s+t+t+t+t+t+t+v+v+v+v+v+v+v+w+&+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+-++ + + + ",
 | 
				
			||||||
 | 
					". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + p+q+q+q+q+q+q+q+s+s+s+s+s+s+s+t+t+t+t+t+t+v+v+v+v+v+v+v+w+w+w+w+w+w+w+x+x+x+x+*+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-++ + + + ",
 | 
				
			||||||
 | 
					". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ",
 | 
				
			||||||
 | 
					". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ",
 | 
				
			||||||
 | 
					". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ",
 | 
				
			||||||
 | 
					". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ",
 | 
				
			||||||
 | 
					"y+z+A++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + . B+B+B+. . . . B+. . . C+. . . D+. E+F+G+H+I+                          B+B+B+        B+      B+      B+  B+B+B+B+B+. . . + + + ",
 | 
				
			||||||
 | 
					"z+A+J++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + B+K+. L+M+. . N+O+D+. . F+P+. Q+[ . R+S+. . .                         B+B+  B+B+    B+B+B+    B+B+  B+B+  B+B+      . . . + + + ",
 | 
				
			||||||
 | 
					"A+J+T++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + U+O+. . . . P+I+. V+W+. S+X+Y+Z+`+.  @.@. . .                         B+B+        B+B+  B+B+  B+B+B+B+B+  B+B+      . . . + + + ",
 | 
				
			||||||
 | 
					"+@@@#@+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + I+[ V+R+$@. : Y+. `+%@. &@*@=@-@;@. >@,@'@)@.                         B+B+B+B+B+  B+B+  B+B+  B+B+B+B+B+  B+B+B+B+  . . . + + + ",
 | 
				
			||||||
 | 
					"@@#@!@+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +                               + + + + + + Z+~@. %@.@. {@=@-@] ]@. ,@^@)@/@(@. _@:@. . .                         B+B+  B+B+  B+B+B+B+B+  B+B+B+B+B+  B+B+      . . . + + + ",
 | 
				
			||||||
 | 
					"#@!@<@+ + + + + + + + + + + + + + + + + + + + + + [@+ + + + + + + + + + + + + + + + +                               + + + + + + }@;@. >@|@. ^@2 . 1@2@. 3@{ . 4@5@. 6@7@. . .                         B+B+  B+B+  B+B+  B+B+  B+B+  B+B+  B+B+      . . . + + + ",
 | 
				
			||||||
 | 
					"8@9@0@+ + + + + + + + + *+*+*+*+*+*+*+*+*+*+*+*+*+. . . . . . . . . . . . . . . . . .                               + + + + + + . (@1@a@:@. b@c@. 5@d@. k e@. f@4 . g@h@i@j@k@                          B+B+B+B+  B+B+  B+B+  B+B+  B+B+  B+B+B+B+B+. . . + + + ",
 | 
				
			||||||
 | 
					"9@0@l@+ + + + + + + + + *+*+*+*+*+*+*+*+*+*+*+*+. . . . . . . . . . . . . . . . . . .                               + + + + + + . . . . . . . . . . . . . . . . . . . . . . .                                                                       . . . + + + ",
 | 
				
			||||||
 | 
					"0@l@m@+ + + + + + + + + *+*+*+*+*+*+*+*+*+*+*+. . . . . . . . . . . . . . . . . . . .                               + + . . . . . 4 n@g@. . o@k@. X p@. q@r@s@t@u@. r Q v@w@.                           B+B+B+    B+B+  B+B+  B+B+B+B+B+  B+B+B+B+  . . . + + + ",
 | 
				
			||||||
 | 
					"x@y@z@+ + + + + + + + + *+*+*+*+*+*+        . . . . . . . . .       . . . . . . . . .                               + + . . . . k@A@. p@*+. B@s@. u@C@. Q D@. . . . E@F@. g G@                        B+B+  B+B+  B+B+  B+B+  B+B+        B+B+  B+B+. . . + + + ",
 | 
				
			||||||
 | 
					"y@z@H@+ + + + + + + + + *+*+*+*+*+*+        . . . . . . . . . .     . . . . . . . . .                               + + . . . . t@I@. r J@. D@K@. L@N . F@M@. . . . N@O@. P@Q@                        B+B+  B+B+  B+B+  B+B+  B+B+        B+B+  B+B+. . . + + + ",
 | 
				
			||||||
 | 
					"z@H@R@+ + + + + + + + + *+*+*+*+*+*+      . . . . . . . . . . . .   . . . . . . . . . + + + + + + + + + + + + + + + + + . . . . K@y . E@S@. g T@. >.U@. V@O ,.W@. . X@Y@Z@`@.                         B+B+  B+B+  B+B+  B+B+  B+B+B+B+    B+B+B+B+  . . . + + + ",
 | 
				
			||||||
 | 
					" #.#+#+ + + + + + + + + *+*+*+*+*+*+    @###. . . . . . . . . . . . . . . . . . . . . + + + + + + + + + + + + + + + + + . . . . G@$#. U@O@. P@Q@. %#&#. Y@*#. . . . =#-#;#. .                         B+B+  B+B+  B+B+  B+B+  B+B+        B+B+B+    . . . + + + ",
 | 
				
			||||||
 | 
					".#+#>#+ + + + + + + + + *+*+*+*+*+*+  *+*+*+* . . . . . . . . . . . . . . . . . . . . + + + + + + + + + + + + + + + + + . . . . Q@,#. X@7 . . '#m+5 . . )#;#. . . . <.!#~#{#.                         B+B+  B+B+    B+B+B+    B+B+        B+B+B+B+  . . . + + + ",
 | 
				
			||||||
 | 
					"+#>#]#+ + + + + + + ^#^#*+*+*+*+*+*+  *+*+*+*+m+n+. . . . . . . . . . . . . . . . . . + + + + + + + + + + + + + + + + + . . . . . /#5 (#. . . . i . . . _#z {#:#<#. r+M.. [#*                           B+B+B+        B+      B+B+B+B+B+  B+B+  B+B+. . . + + + ",
 | 
				
			||||||
 | 
					"}#|#1#+ + + + + + + + + *+*+*+*+*+*+*+*+*+*+*+*+y *.. . . . . . .   . . . . . . + + + + + + + + + + + + + + + + + + + + + + + + . . . . . . . . . . . . . . . . . . . . . . .                                                                       + + + + + + ",
 | 
				
			||||||
 | 
					"|#1#2#+ + + + + + + + + *+*+*+*+*+*+*+*+*+*+*+*+*+*+r+. . . . . .   . . . . . . &+&+&+&+&+&+&+*+&+&+&+&+&+&+&+*+                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ",
 | 
				
			||||||
 | 
					"1#2#3#+ + + + + + + + + *+*+*+*+*+*+*+*+*+*+*+*+*+*+*+7 u+. . .     . . . . . . &+*+*+*+*+*+*+-+&+*+*+*+*+*+*+-+                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ",
 | 
				
			||||||
 | 
					"_ 1 4#+ + + + + + + + + *+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+Q H .       . . . . . . &+1 ,+'+'+,+1 -+&+1 ,+'+'+,+1 -+                                                . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + + + + + + + + + + + + ",
 | 
				
			||||||
 | 
					"1 4#5#+ + + + + + + + + *+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+{#      . . . . . . &+!+~+{+{+~+!+-+&+!+~+{+{+~+!+-+                                                . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + + + + + + + + + + + + ",
 | 
				
			||||||
 | 
					"4#5#_#+ + + + + + + + + *+*+*+*+*+*+  *+*+*+*+*+*+*+*+*+*+q@        . . . . . . &+. 7 *+9.*+. -+&+. *+9.*+7 . -+                                                . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + + + + + + + + + + + + ",
 | 
				
			||||||
 | 
					"+ + + + + + + + + + + + *+*+*+*+*+*+      *+*+*+*+*+*+*+q@          . . . . . . &+!+. 7 . 9.*+-+&+*+9.. 7 . !+-+                                                . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + + + + + + + + + + + + ",
 | 
				
			||||||
 | 
					"+ + + + + + + + + + + + *+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+I . . . . . . . . . . . &+1 !+. . . 9.-+&+9.. . . !+1 -+                                                . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + + + + + + + + + + + + ",
 | 
				
			||||||
 | 
					"+ + + + + + + + + + + + *+*+*+*+*+*+*+*+*+*+*+*+*+*+*+:#. . . . . . . . . . . . &+*+*+*+*+*+*+-+&+*+*+*+*+*+*+-+                                                . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + + + + + + + + + + + + ",
 | 
				
			||||||
 | 
					"+ + + + + + + + + + + + + + + + + + + + + + + + + *+W@. . . . . . . . . . . . . *+-+-+-+-+-+-+-+*+-+-+-+-+-+-+-+                                                . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + + + + + + + + + + + + ",
 | 
				
			||||||
 | 
					"+ + + + + + + + + + + + + + + + + + + + + + + + + + . . . . . . . . . . . . . . &+&+&+&+&+&+&+*+&+&+&+&+&+&+&+*+                                                . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + + + + + + + + + + + + ",
 | 
				
			||||||
 | 
					"+ + + + + + + + + + + + + + + + + + + + + + + + + + . . . . . . . . . . . . . . &+*+*+*+*+*+*+-+&+*+*+*+*+*+*+-+                                                . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + + + + + + + + + + + + ",
 | 
				
			||||||
 | 
					"+ + + + + + + + + + + + + + + + + + + + + + + + + *+*+*+*+*+*+*+*+*+*+*+. . . . &+*+*+*+) * *+-+&+*+* ) *+*+*+-+                                                . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + + + + + + + + + + + + ",
 | 
				
			||||||
 | 
					"+ + + + + + + + + + + + + + + + + + + + + + + + + *+*+*+*+*+*+*+*+*+*+*+. . . . &+*+7+c . . *+-+&+*+. . c 7+*+-+                                                . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + + + + + + + + + + + + ",
 | 
				
			||||||
 | 
					"+ + + + + + + + + + + + + + + + + + + + + + + + + *+*+*+*+*+*+*+*+*+*+*+. . . . &+c ~+'+. . *+-+&+*+. . '+~+c -+                                                . . . . . 5 6#7#. . . . . . . 7#6#5   . . . . . . . . . . . . . . + + + + + + + + + + + + + + + ",
 | 
				
			||||||
 | 
					"                                                                                &+*+7+c . . *+-+&+*+. . c 7+*+-+                                                . . . . . *+@#_#!+. . . . . !+_#@#*+  . . . . . . . . . . . . . . + + + + + + + + + + + + + + + ",
 | 
				
			||||||
 | 
					"                                                                                &+*+*+*+) * *+-+&+*+* ) *+*+*+-+                                                . . . . . *+*+*+4#8#. . . 8#4#*+*+*+  . . . . . . . . . . . . . . + + + + + + + + + + + + + + + ",
 | 
				
			||||||
 | 
					"                                                                                &+*+*+*+*+*+*+-+&+*+*+*+*+*+*+-+                                                . . . . . *+*+*+*+*+5 . 5 *+*+*+*+*+  . . . . . . . . . . . . . . + + + + + + + + + + + + + + + ",
 | 
				
			||||||
 | 
					"                                                                                *+-+-+-+-+-+-+-+*+-+-+-+-+-+-+-+                                                . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + + + + + + + + + + + + ",
 | 
				
			||||||
 | 
					"                                                                                &+&+&+&+&+&+&+&+&+&+&+&+&+&+&+*+                                                . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + + + + + + + + + + + + ",
 | 
				
			||||||
 | 
					". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . &+*+*+*+*+*+*+*+*+*+*+*+*+*+*+-+                                                . . . . . . . _#9#. . . . 9#_#. . . . . . . . . . . . . . . . . . + + + + + + + + + + + + + + + ",
 | 
				
			||||||
 | 
					"V.W.V.. . W.. . W.W.V.. W.W.V.. W.. W.. W.W.W.. V.W.W.. W.W.W.. V.W.V.. V.W.V.. &+*+*+*+*+*+*+*+*+*+*+*+*+*+*+-+                                                . . . . . . . {+0#a#. . a#0#{+. . . . . . . . . . . . . . . . . . + + + + + + + + + + + + + + + ",
 | 
				
			||||||
 | 
					"W.. W.. W.W.. . . . W.. . . W.. W.. W.. W.. . . W.. . . . . W.. W.. W.. W.. W.. &+5 6#7#. . . . . . . . 7#6#5 9.                                                . . . . . . . *+! 0#'+'+0#! *+. . . . . . . . . . . . . . . . . . + + + + + + + + + + + + + + + ",
 | 
				
			||||||
 | 
					"W.. W.. . W.. . V.W.V.. W.W.V.. V.W.W.. W.W.V.. W.W.V.. . . W.. V.W.V.. V.W.W.. &+*+@#_#!+. . . . . . !+_#@#*+-+                                                . . . . . . . *+*+*+9.9.*+*+*+. . . . . . . . . . . . . . . . . . + + + + + + + + + + + + + + + ",
 | 
				
			||||||
 | 
					"W.. W.. . W.. . W.. . . . . W.. . . W.. . . W.. W.. W.. . . W.. W.. W.. . . W.. &+*+*+*+4#8#. . . . 8#4#*+*+*+-+                                                . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + + + + + + + + + + + + ",
 | 
				
			||||||
 | 
					"V.W.V.. . W.. . W.W.W.. W.W.V.. . . W.. W.W.V.. V.W.V.. . . W.. V.W.V.. W.W.V.. &+*+*+*+*+*+5 . . 5 *+*+*+*+*+-+                                                . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + + + + + + + + + + + + ",
 | 
				
			||||||
 | 
					". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . &+*+*+*+*+*+*+*+*+*+*+*+*+*+*+-+                                                . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + + + + + + + + + + + + ",
 | 
				
			||||||
 | 
					". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . *+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                                                . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + + + + + + + + + + + + ",
 | 
				
			||||||
 | 
					"b#b#b#. . b#. . b#b#b#. b#b#b#. b#. b#. b#b#b#. b#b#b#. b#b#b#. b#b#b#. b#b#b#. . . . . . . . . . . . . . . . .                                                 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . + + + + + + + + + + + + + + + ",
 | 
				
			||||||
 | 
					"b#. b#. b#b#. . . . b#. . . b#. b#. b#. b#. . . b#. . . . . b#. b#. b#. b#. b#.                                                                                                                                                                         + + + + ",
 | 
				
			||||||
 | 
					"b#. b#. . b#. . b#b#b#. b#b#b#. b#b#b#. b#b#b#. b#b#b#. . . b#. b#b#b#. b#b#b#.                           B+      B+  B+      B+  B+B+B+B+B+  B+B+B+B+B+  B+B+B+B+B+  B+B+B+B+    B+B+B+B+B+    B+B+B+                                                  + + + + ",
 | 
				
			||||||
 | 
					"b#. b#. . b#. . b#. . . . . b#. . . b#. . . b#. b#. b#. . . b#. b#. b#. . . b#.                           B+      B+  B+  B+  B+      B+      B+              B+      B+      B+      B+      B+                                                        + + + + ",
 | 
				
			||||||
 | 
					"b#b#b#. . b#. . b#b#b#. b#b#b#. . . b#. b#b#b#. b#b#b#. . . b#. b#b#b#. b#b#b#.                           B+  B+  B+  B+  B+  B+      B+      B+B+B+B+        B+      B+B+B+B+        B+        B+B+B+                                                  + + + + ",
 | 
				
			||||||
 | 
					". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                           B+  B+  B+  B+      B+      B+      B+              B+      B+  B+          B+              B+                                                + + + + ",
 | 
				
			||||||
 | 
					"                                                                                                          B+      B+  B+      B+      B+      B+B+B+B+B+      B+      B+      B+  B+B+B+B+B+    B+B+B+                                                  + + + + ",
 | 
				
			||||||
 | 
					"+ + + + + + + + +                                                                                                                                                                                                                                       + + + + ",
 | 
				
			||||||
 | 
					"+ + + + + + + + +                                                                                                                                                                                                                                       + + + + ",
 | 
				
			||||||
 | 
					"+ + + + + + + + +                                                                                                                                                                                                                                       + + + + ",
 | 
				
			||||||
 | 
					"+ + + + + + + + +                                                                                                                                                                                                                                       + + + + ",
 | 
				
			||||||
 | 
					"+ + + + + + + + +                                                                                                                                                                                                                                       + + + + ",
 | 
				
			||||||
 | 
					"+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + "};
 | 
				
			||||||
		Loading…
	
		Reference in a new issue