#include #include "shadow.h" void draw_window_frame(BITMAP* bmp, int x, int y, int w, int h) { hline(bmp, x, y, x + w - 1, makecol32(255, 255, 255)); vline(bmp, x, y, y + h - 1, makecol32(255, 255, 255)); hline(bmp, x, y + h - 1, x + w - 1, makecol32(127, 127, 127)); vline(bmp, x + w - 1, y, y + h - 1, makecol32(127, 127, 127)); rectfill(bmp, x + 1, y + 1, x + w - 2, y + h - 2, makecol32(191, 191, 191)); } void draw_window_frame_2(BITMAP* bmp, int x, int y, int w, int h) { hline(bmp, x, y, x + w - 1, makecol32(255, 255, 255)); vline(bmp, x, y, y + h - 1, makecol32(255, 255, 255)); hline(bmp, x, y + h - 1, x + w - 1, makecol32(127, 127, 127)); vline(bmp, x + w - 1, y, y + h - 1, makecol32(127, 127, 127)); rect(bmp, x + 1, y + 1, x + w - 2, y + h - 2, makecol32(191, 191, 191)); hline(bmp, x + 2, y + 2, x + w - 3, makecol32(127, 127, 127)); vline(bmp, x + 2, y + 2, y + h - 3, makecol32(127, 127, 127)); hline(bmp, x + 2, y + h - 3, x + w - 3, makecol32(255, 255, 255)); vline(bmp, x + w - 3, y + 2, y + h - 3, makecol32(255, 255, 255)); } void draw_lotsa_text(BITMAP* bmp, int x, int y, int w, int h, int c, int s) { char* string = malloc(sizeof(char) * (w + 1)); int i, j; string[w] = 0; for (j = 0; j < h; j++) { for (i = 0; i < w; i++) { int v = rand() & 63; if (v < 26) string[i] = v + 'a'; else if (v < 36) string[i] = v + '0'; else if (v == 36) string[i] = '.'; else if (v == 37) string[i] = '-'; else string[i] = ' '; } if (s) { textout(bmp, font, string, x, y + j * 8 + 1, 0); textout(bmp, font, string, x + 1, y + j * 8 + 1, 0); textout(bmp, font, string, x + 1, y + j * 8, 0); } textout(bmp, font, string, x, y + j * 8, c); } free(string); }