*/
#include <math.h>
+#include <time.h>
#include "screenhack.h"
/* non-user-modifiable immutable definitions */
if ((c < '0') || (c > '9'))
c = '0';
- bitmapDrawChar5x8 (b, x, y, c);
+ bitmapDrawChar5x8 (b, x, y, c);
}
/* draw a upc/ean digit at the given coordinates */
st->barcodes[st->barcode_count - 1].mag * BARCODE_WIDTH);
barcode->x += RAND_FLOAT_01 * 100;
barcode->mag = RAND_FLOAT_01 * MAX_MAG;
+
+ if (st->windowWidth < 100 || st->windowHeight < 100) {
+ barcode->mag *= 0.5;
+ if (barcode->mag <= 0) barcode->mag = 1;
+ }
+
barcode->y =
RAND_FLOAT_01 * (st->windowHeight - BARCODE_HEIGHT * barcode->mag);
if (barcode->y < 0)
static const char *barcode_defaults [] = {
".background: black",
".foreground: green",
+ ".lowrez: true",
"*fpsSolid: true",
"*delay: 10000",
"*mode: scroll",