7
#define MIN_PC 6 /* OS >= MIN_PC means the OS is a PC OS */
9
static const char *osname[] = {"wingdows", "apple", "next", "sgi", "sun",
10
"palm", "os2", "bsd", "linux", "redhat", "hurd"};
11
#define NUM_OS (sizeof(osname) / sizeof(osname[0]))
13
static Picture *os[NUM_OS]; /* array of OS pictures*/
14
static MCursor *cursor[NUM_OS]; /* array of OS cursors (drag/drop) */
20
for (i = 0; i < NUM_OS; i++) {
21
UI_load_picture(osname[i], 1, &os[i]);
23
UI_load_cursor(osname[i], CURSOR_OWN_MASK, &cursor[i]);
28
OS_draw(int index, int x, int y) {
29
UI_draw(os[index], x, y);
34
return UI_picture_width(os[0]);
39
return UI_picture_height(os[0]);
43
OS_set_cursor(int index) {
44
UI_set_cursor(cursor[index]);
49
return (RAND(MIN_PC, NUM_OS - 1));
54
return (index >= MIN_PC);