void display_option_slot(int slot) { hide_line(slot); wclear(Showline[slot]); switch(slot) { case 1: wprintw(Showline[slot],"-- Option BELLICOSE [TF]: "); wprintw(Showline[slot], optionp(BELLICOSE) ? "(now T) " : "(now F) "); break; case 2: wprintw(Showline[slot],"-- Option JUMPMOVE [TF]: "); wprintw(Showline[slot], optionp(JUMPMOVE) ? "(now T) " : "(now F) "); break; case 3: wprintw(Showline[slot],"-- Option RUNSTOP [TF]: "); wprintw(Showline[slot], optionp(RUNSTOP) ? "(now T) " : "(now F) "); break; case 4: wprintw(Showline[slot],"-- Option PICKUP [TF]: "); wprintw(Showline[slot], optionp(PICKUP) ? "(now T) " : "(now F) "); break; case 5: wprintw(Showline[slot],"-- Option CONFIRM [TF]: "); wprintw(Showline[slot], optionp(CONFIRM) ? "(now T) " : "(now F) "); break; case 6: wprintw(Showline[slot],"-- Option TOPINV [TF]: "); wprintw(Showline[slot], optionp(TOPINV) ? "(now T) " : "(now F) "); break; case 7: wprintw(Showline[slot],"-- Option PACKADD [TF]: "); wprintw(Showline[slot], optionp(PACKADD) ? "(now T) " : "(now F) "); break; case 8: #ifdef COMPRESS_SAVE_FILES wprintw(Showline[slot],"-- Option COMPRESS [TF]: "); wprintw(Showline[slot], optionp(COMPRESS_OPTION) ? "(now T) " : "(now F) "); #endif break; case 9: wprintw(Showline[slot],"-- Option COLOUR [TF]: "); wprintw(Showline[slot], optionp(SHOW_COLOUR) ? "(now T) " : "(now F) "); break; case VERBOSITY_LEVEL: wprintw(Showline[slot], "-- Option VERBOSITY [(T)erse,(M)edium,(V)erbose]: (now "); if (Verbosity == VERBOSE) wprintw(Showline[slot],"Verbose)"); else if (Verbosity == MEDIUM) wprintw(Showline[slot],"Medium)"); else wprintw(Showline[slot],"Terse)"); break; case SEARCH_DURATION: wprintw(Showline[slot],"-- Option SEARCHNUM [0>x>10]: (now %d)",Searchnum); break; } wrefresh(Showline[slot]); }
void drawvision(int x, int y) { static int oldx = -1,oldy = -1; int i,j,c; if (Current_Environment != E_COUNTRYSIDE) { if (Player.status[BLINDED]) { drawspot(oldx,oldy); drawspot(x,y); drawplayer(); } else { if (Player.status[ILLUMINATION] > 0) { for (i= -2;i<3;i++) for (j= -2;j<3;j++) if (inbounds(x+i,y+j)) if (view_los_p(x+i,y+j,Player.x,Player.y)) dodrawspot(x+i,y+j); } else { for (i= -1;i<2;i++) for (j= -1;j<2;j++) if (inbounds(x+i,y+j)) dodrawspot(x+i,y+j); } drawplayer(); drawmonsters(FALSE); /* erase all monsters */ drawmonsters(TRUE); /* draw those now visible */ } if ((! gamestatusp(FAST_MOVE)) || (! optionp(JUMPMOVE))) omshowcursor(Player.x,Player.y); oldx = x; oldy = y; } else { for (i= -1;i<2;i++) for (j= -1;j<2;j++) if (inbounds(x+i,y+j)) { c_set(x+i, y+j, SEEN); if (!offscreen(x+i,y+j)) { wmove(Levelw,screenmody(y+j),screenmodx(x+i)); c = Country[x+i][y+j].current_terrain_type; if (optionp(SHOW_COLOUR)) wattrset(Levelw, CHARATTR(c)); waddch(Levelw,(c&0xff)); } } drawplayer(); omshowcursor(Player.x,Player.y); } }
static void show_screen_country (int top, int left, int bottom, int right) { int j; int last_attr = 0; for (j = top; j < bottom; ++j) { int i; wmove(Levelw, screenmody(j), 0); for (i = left; i < right; ++i) { int c; if (c_statusp(i, j, SEEN)) c = Country[i][j].current_terrain_type; else c = SPACE; if (optionp(SHOW_COLOUR) && CHARATTR(c) != last_attr) { last_attr = CHARATTR(c); wattrset(Levelw, last_attr); } waddch(Levelw, c & 0xff); } } }
static void show_screen_level (int top, int left, int bottom, int right) { int j; int last_attr = 0; for (j = top; j < bottom; ++j) { int i; wmove(Levelw, screenmody(j), 0); for (i = left; i < right; ++i) { int c; if (loc_statusp(i, j, SEEN)) c = getspot(i, j, FALSE); else c = SPACE; if (optionp(SHOW_COLOUR) && CHARATTR(c) != last_attr) { last_attr = CHARATTR(c); wattrset(Levelw, last_attr); } waddch(Levelw, c & 0xff); } } }
void l_countryside(void) { if (optionp(CONFIRM)) { if (cinema_confirm("You're about to return to the countryside.") != 'y') return; } change_environment(E_COUNTRYSIDE); }
/* Puts c at x,y on screen. No fuss, no bother. */ void putspot(int x, int y, Symbol c) { if (! offscreen(x,y)) { wmove(Levelw,screenmody(y),screenmodx(x)); if (optionp(SHOW_COLOUR)) wattrset(Levelw, CHARATTR(c)); waddch(Levelw,(0xff&c)); } }
/* regardless of line of sight, etc, draw a monster */ void plotmon(pmt m) { if (! offscreen(m->x,m->y)) { wmove(Levelw,screenmody(m->y),screenmodx(m->x)); if (optionp(SHOW_COLOUR)) wattrset(Levelw, CHARATTR(m->monchar)); waddch(Levelw,(m->monchar&0xff)); } }
void plotchar(Symbol pyx, int x, int y) { if (! offscreen(x,y)) { wmove(Levelw,screenmody(y),screenmodx(x)); if (optionp(SHOW_COLOUR)) wattrset(Levelw, CHARATTR(pyx)); waddch(Levelw,(pyx&0xff)); wrefresh(Levelw); } }
/* check a move attempt in the countryside */ int p_country_moveable(int x, int y) { if (! inbounds(x,y)) return (false); else if (optionp(CONFIRM)) { if ((Country[x][y].current_terrain_type == CHAOS_SEA) || (Country[x][y].current_terrain_type == MOUNTAINS)) return(cinema_confirm("That's dangerous terrain, and slow going.")=='y'); else return(true); } else return(true); }
void show_screen(void) { int top; int left; int right; int bottom; wclear(Levelw); if (ScreenOffset < 0) ScreenOffset = 0; if (ScreenXOffset < 0) ScreenXOffset = 0; top = ScreenOffset; left = ScreenXOffset; right = ScreenXOffset + ScreenWidth; bottom = ScreenOffset + ScreenLength; if (Current_Environment != E_COUNTRYSIDE) { if (right > Level->level_width) right = Level->level_width; if (bottom > Level->level_length) bottom = Level->level_length; } else { if (right > COUNTRY_WIDTH) right = COUNTRY_WIDTH; if (bottom > COUNTRY_LENGTH) bottom = COUNTRY_LENGTH; } if (Current_Environment != E_COUNTRYSIDE) { show_screen_level(top, left, bottom, right); } else { show_screen_country(top, left, bottom, right); #if 0 for (j=top;j<bottom;j++) { for (i=left;i<right;i++) { wmove(Levelw,screenmody(j),screenmodx(i)); c = ((c_statusp(i,j,SEEN)) ? Country[i][j].current_terrain_type:SPACE); if (optionp(SHOW_COLOUR) && CHARATTR(c) != last_attr) { last_attr = CHARATTR(c); wattrset(Levelw,last_attr); } waddch(Levelw,c&0xff); } wrefresh(Levelw); } #endif } }
void l_house_exit(void) { if (optionp(CONFIRM)) { clearmsg(); if (cinema_confirm("You're about to step out of this abode.") != 'y') return; } #ifndef MSDOS_SUPPORTED_ANTIQUE free_level(Level); #endif Level = NULL; change_environment(Last_Environment); }
void drawplayer(void) { int c; if (E_COUNTRYSIDE == Current_Environment) { if (inbounds(lastx, lasty) && !offscreen(lastx, lasty)) { wmove(Levelw, screenmody(lasty), screenmodx(lastx)); c = Country[lastx][lasty].current_terrain_type; if (optionp(SHOW_COLOUR)) wattrset(Levelw, CHARATTR(c)); waddch(Levelw, c & 0xff); } wmove(Levelw, screenmody(Player.y), screenmodx(Player.x)); if (optionp(SHOW_COLOUR)) wattrset(Levelw, CHARATTR(PLAYER)); waddch(Levelw, PLAYER & 0xff); } else { if (inbounds(lastx, lasty) && !offscreen(lastx, lasty)) plotspot(lastx, lasty, (Player.status[BLINDED] > 0 ? FALSE : TRUE)); wmove(Levelw, screenmody(Player.y), screenmodx(Player.x)); if ((!Player.status[INVISIBLE]) || Player.status[TRUESIGHT]) { if (optionp(SHOW_COLOUR)) wattrset(Levelw, CHARATTR(PLAYER)); waddch(Levelw, PLAYER & 0xff); } } lastx = Player.x; lasty = Player.y; }
/* if display, displays monsters, otherwise erases them */ void drawmonsters(int display) { pml ml; for (ml=Level->mlist;ml!=NULL;ml=ml->next) { if (ml->m->hp > 0) { if (display) { if (view_los_p(Player.x,Player.y,ml->m->x,ml->m->y)) { if (Player.status[TRUESIGHT] || (! m_statusp(ml->m,M_INVISIBLE))) { if (!optionp(SHOW_COLOUR) && (ml->m->level > 5) && ((ml->m->monchar&0xff) != '@') && ((ml->m->monchar&0xff) != '|')) wstandout(Levelw); putspot(ml->m->x,ml->m->y,ml->m->monchar); if (!optionp(SHOW_COLOUR)) wstandend(Levelw); } } } else erase_monster(ml->m); } } }
void l_tactical_exit(void) { if (optionp(CONFIRM)) { if (cinema_confirm("You're about to leave this place.") != 'y') return; } /* Free up monsters and items, and the level, if not SAVE_LEVELS */ free_level(Level); Level = NULL; if ((Current_Environment == E_TEMPLE) || (Current_Environment == E_TACTICAL_MAP) ) change_environment(E_COUNTRYSIDE); else change_environment(Last_Environment); }
/* x y is the proposed place to move to */ int p_moveable(int x, int y) { State.setSkipMonsters(); if (! inbounds(x,y)) return (false); else if (Player.status[SHADOWFORM]) { switch(Level->site[x][y].p_locf) { case L_CHAOS: case L_ABYSS: case L_VOID: return cinema_confirm("That looks dangerous.") == 'y'; default: State.setSkipMonsters(false); return(true); } } else if (loc_statusp(x,y,SECRET)) { if (State.getFastMove() == false) print3("Ouch!"); return(false); } else if (Level->site[x][y].creature != NULL) { if (State.getFastMove() == false) { Level->site[x][y].creature->fight_monster(); State.setSkipMonsters(false); return(false); } else return(false); } else if (Level->site[x][y].locchar == CLOSED_DOOR) // Zop: move into door -> opens doors { if (Level->site[x][y].aux == LOCKED) { print3("That door seems to be locked."); return(false); } else { Level->site[x][y].locchar = OPEN_DOOR; lset(x, y, CHANGED); State.setSkipMonsters(false); return(false); } } else if ((Level->site[x][y].locchar == WALL) || (Level->site[x][y].locchar == STATUE) || (Level->site[x][y].locchar == PORTCULLIS) || (State.getFastMove() && ((Level->site[x][y].locchar == HEDGE) || (Level->site[x][y].locchar == LAVA) || (Level->site[x][y].locchar == ABYSS) || (Level->site[x][y].locchar == VOID_CHAR) || (Level->site[x][y].locchar == FIRE) || (Level->site[x][y].locchar == WHIRLWIND) || (Level->site[x][y].locchar == WATER) || (Level->site[x][y].locchar == LIFT) || (Level->site[x][y].locchar == TRAP)))) { if (State.getFastMove() == false) print3("Ouch!"); return(false); } else if (optionp(CONFIRM)) { if ((Level->site[x][y].locchar == HEDGE) || (Level->site[x][y].locchar == LAVA) || (Level->site[x][y].locchar == FIRE) || (Level->site[x][y].locchar == WHIRLWIND) || (Level->site[x][y].locchar == ABYSS) || (Level->site[x][y].locchar == VOID_CHAR) || (Level->site[x][y].locchar == WATER) || (Level->site[x][y].locchar == RUBBLE) || (Level->site[x][y].locchar == LIFT) || (Level->site[x][y].locchar == TRAP)) { /* horses WILL go into water... */ if (State.getMounted()) { if (Level->site[x][y].locchar != WATER || Level->site[x][y].p_locf != L_WATER) { print1("You can't convince your steed to continue."); State.setSkipMonsters(); return(false); } else return(true); } else if (cinema_confirm("Look where you're about to step!") == 'y') State.setSkipMonsters(false); else State.setSkipMonsters(); return(State.getSkipMonsters() == false); } else { State.setSkipMonsters(false); return(true); } } else { State.setSkipMonsters(false); return(true); } }
int main(int argc, char *argv[]) { int continuing = 0; int count; int scores_only = 0; int i; #ifndef NOGETOPT while(( i= getopt( argc, argv, "dsh")) != -1) { switch (i) { case 'd': #ifdef DEBUG DG_debug_flag++; #endif break; case 's': scores_only = 1; break; case 'h': #ifdef DEBUG printf("Usage: omega [-shd] [savefile]\n"); #else printf("Usage: omega [-sh] [savefile]\n"); #endif printf("Options:\n"); printf(" -s Display high score list\n"); printf(" -h Display this message\n"); #ifdef DEBUG printf(" -d Enable debug mode\n"); #endif exit(0); break; case '?': /* error parsing args... ignore? */ printf("'%c' is an invalid option, ignoring\n", optopt ); break; } } if (optind >= argc ) { /* no save file given */ #if defined( BSD ) || defined( SYSV ) sprintf( SaveFileName, "Omega%d", getuid() ); #else strcpy( SaveFileName,"Omega"); #endif } else { /* savefile given */ continuing = 1; strcpy(SaveFileName,argv[optind]); } #else /* alternate code for people who don't support getopt() -- no enhancement */ if (argc ==2) { strcpy( SaveFileName, argv[1]); continuing = 1; } else { strcpy( SaveFileName,"Omega"); } #endif /* always catch ^c and hang-up signals */ #ifdef SIGINT signal(SIGINT,signalquit); #endif #ifdef SIGHUP signal(SIGHUP,signalsave); #endif #ifndef MSDOS if (CATCH_SIGNALS) { signal(SIGQUIT,signalexit); signal(SIGILL,signalexit); #ifdef DEBUG if( DG_debug_flag ) { #endif signal(SIGTRAP,signalexit); signal(SIGFPE,signalexit); signal(SIGSEGV,signalexit); #ifdef DEBUG } #endif #ifdef SIGIOT signal(SIGIOT,signalexit); #endif #ifdef SIGABRT signal(SIGABRT,signalexit); #endif #ifdef SIGEMT signal(SIGEMT,signalexit); #endif #ifdef SIGBUS signal(SIGBUS,signalexit); #endif #ifdef SIGSYS signal(SIGSYS,signalexit); #endif } #endif #ifndef FIXED_OMEGALIB if (!(Omegalib = getenv("OMEGALIB"))) #endif Omegalib = OMEGALIB; /* if filecheck is 0, some necessary data files are missing */ if (filecheck() == 0) exit(0); /* all kinds of initialization */ init_perms(); initgraf(); #ifndef MSDOS_SUPPORTED_ANTIQUE initdirs(); #endif initrand(E_RANDOM, 0); initspells(); #ifdef DEBUG /* initialize debug log file */ DG_debug_log = fopen( "/tmp/omega_dbg_log", "a" ); assert( DG_debug_log ); /* WDT :) */ setvbuf( DG_debug_log, NULL, _IOLBF, 0); fprintf(DG_debug_log, "############## new game started ##############\n"); #endif for (count = 0; count < STRING_BUFFER_SIZE; count++) strcpy(Stringbuffer[count],"<nothing>"); #ifdef SAVE_LEVELS msdos_init(); #endif omega_title(); showscores(); if (scores_only ) { endgraf(); exit(0); } /* game restore attempts to restore game if there is an argument */ if (continuing) { game_restore(SaveFileName); mprint("Your adventure continues...."); } else { /* monsters initialized in game_restore if game is being restored */ /* items initialized in game_restore if game is being restored */ inititem(TRUE); Date = random_range(360); Phase = random_range(24); #ifdef NEW_BANK bank_init(); #else strcpy(Password,""); #endif continuing = initplayer(); /* RM: 04-19-2000 loading patch */ } if (!continuing) { init_world(); /* RM: 04-19-2000 loading patch */ mprint("'?' for help or commandlist, 'Q' to quit."); } timeprint(); calc_melee(); if (Current_Environment != E_COUNTRYSIDE) showroom(Level->site[Player.x][Player.y].roomnumber); else terrain_check(FALSE); if (optionp(SHOW_COLOUR)) colour_on(); else colour_off(); screencheck(Player.x,Player.y); /* game cycle */ if (!continuing) time_clock(TRUE); while (TRUE) { if (Current_Environment == E_COUNTRYSIDE) p_country_process(); else time_clock(FALSE); } }
/* deal with a new player command in countryside mode */ void p_country_process(void) { int no_op; drawvision(Player.x,Player.y); do { no_op = FALSE; Cmd = mgetc(); clear_if_necessary(); switch (Cmd) { case ' ': case 13: no_op = TRUE; break; case 7: wizard(); break; /* ^g */ case 12: xredraw(); no_op = TRUE; break; /* ^l */ #if !defined(WIN32) case 16: bufferprint(); no_op = TRUE; break; /* ^p */ #else case 15: bufferprint(); no_op = TRUE; break; /* ^o */ #endif case 18: redraw(); no_op = TRUE; break; /* ^r */ case 23: if (gamestatusp(CHEATED)) drawscreen(); break; /* ^w */ case 24: if (gamestatusp(CHEATED) || Player.rank[ADEPT]) wish(1); break; /* ^x */ case 'd': drop(); break; case 'e': eat(); break; case 'i': do_inventory_control(); break; case 's': countrysearch(); break; case 'x': examine(); break; case 'E': dismount_steed(); break; case 'H': hunt(Country[Player.x][Player.y].current_terrain_type); break; case 'I': if (! optionp(TOPINV)) top_inventory_control(); else { menuclear(); display_possessions(); inventory_control(); } break; case 'O': setoptions(); break; case 'P': show_license(); break; /* actually show_license is in file.c */ case 'Q': quit(); break; case 'R': rename_player(); break; case 'S': save(FALSE); break; case 'V': version(); break; case '>': enter_site(Country[Player.x][Player.y].base_terrain_type); break; case '#': if (gamestatusp(CHEATED)) editstats(); break; /* RAC - char editor */ case '/': charid(); no_op = TRUE; break; case '?': help(); no_op = TRUE; break; case '4': case 'h': movepincountry(-1,0); break; case '2': case 'j': movepincountry(0,1); break; case '8': case 'k': movepincountry(0,-1); break; case '6': case 'l': movepincountry(1,0); break; case '1': case 'b': movepincountry(-1,1); break; case '3': case 'n': movepincountry(1,1); break; case '7': case 'y': movepincountry(-1,-1); break; case '9': case 'u': movepincountry(1,-1); break; default: commanderror(); no_op = TRUE; break; } } while (no_op); screencheck(Player.x,Player.y); }
/* deal with a new player command in dungeon or city mode*/ void p_process(void) { static int searchval=0; if (Player.status[BERSERK]) if (goberserk()) { setgamestatus(SKIP_PLAYER); drawvision(Player.x,Player.y); } if (! gamestatusp(SKIP_PLAYER)) { if (searchval > 0) { searchval--; if (searchval == 0) resetgamestatus(FAST_MOVE); } drawvision(Player.x,Player.y); if (! gamestatusp(FAST_MOVE)) { searchval = 0; Cmd = mgetc(); clear_if_necessary(); } Command_Duration = 0; switch (Cmd) { case ' ': case 13: setgamestatus(SKIP_MONSTERS); break; /*no op on space or return*/ case 6: abortshadowform(); break; /* ^f */ case 7: wizard(); break; /* ^g */ case 4: player_dump(); break; /* ^d */ case 9: display_pack(); morewait(); xredraw(); break; /* ^i */ case 11: if (gamestatusp(CHEATED)) frobgamestatus(); break; case 12: xredraw(); setgamestatus(SKIP_MONSTERS); break; /* ^l */ #if !defined(WIN32) case 16: bufferprint(); setgamestatus(SKIP_MONSTERS); break; /* ^p */ #else case 15: bufferprint(); setgamestatus(SKIP_MONSTERS); break; /* ^o */ #endif case 18: redraw(); setgamestatus(SKIP_MONSTERS); break; /* ^r */ case 23: if (gamestatusp(CHEATED)) drawscreen(); break; /* ^w */ case 24: /* ^x */ if (gamestatusp(CHEATED) || Player.rank[ADEPT]) wish(1); Command_Duration = 5; break; case 'a': zapwand(); Command_Duration = Player.speed*8/5; break; case 'c': closedoor(); Command_Duration = Player.speed*2/5; break; case 'd': drop(); Command_Duration = Player.speed*5/5; break; case 'e': eat(); Command_Duration = 30; break; case 'f': fire(); Command_Duration = Player.speed*5/5; break; case 'g': pickup(); Command_Duration = Player.speed*10/5; break; case 'i': do_inventory_control(); break; case 'm': magic(); Command_Duration = 12; break; case 'o': opendoor(); Command_Duration = Player.speed*5/5; break; case 'p': pickpocket(); Command_Duration = Player.speed*20/5; break; case 'q': quaff(); Command_Duration = 10; break; case 'r': peruse(); Command_Duration = 20; break; case 's': search(&searchval); Command_Duration = 20; break; case 't': talk(); Command_Duration = 10; break; case 'v': vault(); Command_Duration = Player.speed*10/5; break; case 'x': examine(); Command_Duration = 1; break; case 'z': bash_location(); Command_Duration = Player.speed*10/5; break; case 'A': activate(); Command_Duration = 10; break; case 'C': callitem(); break; case 'D': disarm(); Command_Duration = 30; break; case 'E': dismount_steed(); Command_Duration = Player.speed*10/5; break; case 'F': tacoptions(); break; case 'G': give(); Command_Duration = 10; break; case 'I': if (! optionp(TOPINV)) top_inventory_control(); else { display_possessions(); inventory_control(); } break; case 'M': city_move(); Command_Duration = 10; break; case 'O': setoptions(); #if defined(WIN32) show_screen(); xredraw(); #endif break; case 'P': show_license(); break; /* actually show_license is in file.c */ case 'Q': quit(); break; case 'R': rename_player(); break; case 'S': save(FALSE); break; case 'T': tunnel(); Command_Duration = Player.speed*30/5; break; case 'V': version(); break; case 'Z': bash_item(); Command_Duration = Player.speed*10/5; break; case '.': rest(); Command_Duration = 10; break; case ',': Command_Duration = 10; nap(); break; case '>': downstairs(); break; case '<': upstairs(); break; case '@': p_movefunction(Level->site[Player.x][Player.y].p_locf); Command_Duration = 5; break; case '#': if (gamestatusp(CHEATED)) editstats(); break; /* RAC - char editor */ case '/': charid(); setgamestatus(SKIP_MONSTERS); break; case '?': help(); setgamestatus(SKIP_MONSTERS); break; case '4': case 'h': moveplayer(-1,0); Command_Duration = Player.speed*5/5; break; case '2': case 'j': moveplayer(0,1); Command_Duration = Player.speed*5/5; break; case '8': case 'k': moveplayer(0,-1); Command_Duration = Player.speed*5/5; break; case '6': case 'l': moveplayer(1,0); Command_Duration = Player.speed*5/5; break; case '1': case 'b': moveplayer(-1,1); Command_Duration = Player.speed*5/5; break; case '3': case 'n': moveplayer(1,1); Command_Duration = Player.speed*5/5; break; case '7': case 'y': moveplayer(-1,-1); Command_Duration = Player.speed*5/5; break; case '9': case 'u': moveplayer(1,-1); Command_Duration = Player.speed*5/5; break; case '5': setgamestatus(SKIP_MONSTERS); /* don't do anything; a dummy turn */ Cmd = mgetc(); while ((Cmd != ESCAPE) && ((Cmd < '1') || (Cmd > '9') || (Cmd=='5'))) { print3("Run in keypad direction [ESCAPE to abort]: "); Cmd = mgetc(); } if (Cmd != ESCAPE) setgamestatus(FAST_MOVE); else clearmsg3(); break; case 'H': setgamestatus(FAST_MOVE); Cmd = 'h'; moveplayer(-1,0); Command_Duration = Player.speed*4/5; break; case 'J': setgamestatus(FAST_MOVE); Cmd = 'j'; moveplayer(0,1); Command_Duration = Player.speed*4/5; break; case 'K': setgamestatus(FAST_MOVE); Cmd = 'k'; moveplayer(0,-1); Command_Duration = Player.speed*4/5; break; case 'L': setgamestatus(FAST_MOVE); Cmd = 'l'; moveplayer(1,0); Command_Duration = Player.speed*4/5; break; case 'B': setgamestatus(FAST_MOVE); Cmd = 'b'; moveplayer(-1,1); Command_Duration = Player.speed*4/5; break; case 'N': setgamestatus(FAST_MOVE); Cmd = 'n'; moveplayer(1,1); Command_Duration = Player.speed*4/5; break; case 'Y': setgamestatus(FAST_MOVE); Cmd = 'y'; moveplayer(-1,-1); Command_Duration = Player.speed*4/5; break; case 'U': setgamestatus(FAST_MOVE); Cmd = 'u'; moveplayer(1,-1); Command_Duration = Player.speed*4/5; break; default: commanderror(); setgamestatus(SKIP_MONSTERS); break; } } if (Current_Environment != E_COUNTRYSIDE) roomcheck(); screencheck(Player.x,Player.y); }
void drawomega(void) { int i; clear(); touchwin(stdscr); for(i=0;i<7;i++) { move(1, 1); if (optionp(SHOW_COLOUR)) wattrset(stdscr, CHARATTR(CLR(LIGHT_BLUE))); printw("\n\n\n"); printw("\n *****"); printw("\n ****** ******"); printw("\n *** ***"); printw("\n *** ***"); printw("\n ** **"); printw("\n *** ***"); printw("\n ** **"); printw("\n ** **"); printw("\n *** ***"); printw("\n *** ***"); printw("\n ** **"); printw("\n * *** *** *"); printw("\n **** ****"); refresh(); usleep(200000); move(1, 1); if (optionp(SHOW_COLOUR)) wattrset(stdscr, CHARATTR(CLR(CYAN))); printw("\n\n\n"); printw("\n +++++"); printw("\n ++++++ ++++++"); printw("\n +++ +++"); printw("\n +++ +++"); printw("\n ++ ++"); printw("\n +++ +++"); printw("\n ++ ++"); printw("\n ++ ++"); printw("\n +++ +++"); printw("\n +++ +++"); printw("\n ++ ++"); printw("\n + +++ +++ +"); printw("\n ++++ ++++"); refresh(); usleep(200000); move(1, 1); if (optionp(SHOW_COLOUR)) wattrset(stdscr, CHARATTR(CLR(BLUE))); printw("\n\n\n"); printw("\n ....."); printw("\n ...... ......"); printw("\n ... ..."); printw("\n ... ..."); printw("\n .. .."); printw("\n ... ..."); printw("\n .. .."); printw("\n .. .."); printw("\n ... ..."); printw("\n ... ..."); printw("\n .. .."); printw("\n . ... ... ."); printw("\n .... ...."); refresh(); usleep(200000); } wattrset(stdscr, CHARATTR(CLR(WHITE))); }