#include "bdscio.h" #define BELL "\007" #define EOL "\033K" #define FF '\014' struct character { char cname[30]; char str[10]; char intel[10]; char wis[10]; char con[10]; char dex[10]; char chr[10]; char hpoints[10]; char level[7]; char class[15]; char aclass[7]; char align[15]; char specials[50]; }; struct player { char name[15]; int nchars; struct character owned[5]; }gamers[10]; main() { char inp[5]; int players,i,j; puts(CLEARS); gotoxy(7,4);puts("\007Enter number of players: "); players = atoi(gets(inp)); if((players<=0)||(players>=11)){ gotoxy(7,4);puts("\033\007KUnable to handle that number"); gotoxy(8,4);puts("of players. Current limit is 10 people."); gotoxy(9,4);puts("Talk to Dann about changing me!!!!"); exit(); } for(i=0;i=6)){ gotoxy(3,4);puts("\033K\007Illegal value; please re-enter."); gotoxy(4,34);puts(EOL); goto l1; } gamers[num].nchars = limit; puts(CLEARS); gotoxy(3,5);puts("Player's name: "); puts(gamers[num].name); gotoxy(5,5);puts("Character #"); gotoxy(7,9);puts("Character name: "); gotoxy(8,9);puts("Strength: "); gotoxy(9,9);puts("Intelligence: "); gotoxy(10,9);puts("Wisdom: "); gotoxy(11,9);puts("Constitution: "); gotoxy(12,9);puts("Dexterity: "); gotoxy(13,9);puts("Charisma: "); gotoxy(15,9);puts("Level: "); gotoxy(16,9);puts("Hit points: "); gotoxy(17,9);puts("Class: "); gotoxy(18,9);puts("Armor class: "); gotoxy(19,9);puts("Alignment: "); gotoxy(21,9);puts("Specials: "); for(i=0;icname); lputs(linebuf); setmem(linebuf,80,' '); linebuf[80] = '\0'; lputs(" STR INT WIS CON"); lputs(" DEX CHR HIT POINTS\n"); sprintf(linebuf+9,"%6s %6s",a->str,a->intel); sprintf(linebuf+24," %6s %6s",a->wis,a->con); sprintf(linebuf+42," %6s %6s",a->dex,a->chr); sprintf(linebuf+60," %-6s\n",a->hpoints); lputs(linebuf); setmem(linebuf,80,' '); linebuf[80] = '\0'; lputs(" LEVEL CLASS ARMOR CLASS ALIGNMENT\n"); sprintf(linebuf+10,"%3s %10s %3s %3s\n",a->level,a->class,a->aclass,a->align); lputs(linebuf); setmem(linebuf,80,' '); linebuf[80] = '\0'; sprintf(linebuf+6,"SPECIALS: %-50s\n\n",a->specials); lputs(linebuf); } } } putlpr(c) char c; { if(c=='\n')bios(LIST,'\r'); bios(LIST,c); } lputs(s) char *s; { while(*s)putlpr(*s++); }