diff -ruN omega.orig/Makefile omega/Makefile --- omega.orig/Makefile 2021-11-12 16:35:07.539557000 -0500 +++ omega/Makefile 2021-11-12 16:35:11.034141000 -0500 @@ -1,14 +1,14 @@ # These two definitions are used if you 'make install' # the value of LIBDIR should be the same as OMEGALIB in defs.h -BINDIR = /home/sdossey/omega/ -LIBDIR = /home/sdossey/omega/lib/ +BINDIR = ${PREFIX}/bin +LIBDIR = ${PREFIX}/share/omega # One of these should be uncommented, as appropriate, unless your compiler # does it for you. You can test this by simply trying to 'make' omega - # it will fail if none of them are defined. If you do uncomment # one, make sure you comment out the other definition of CFLAGS lower down -CFLAGS = -DBSD -ggdb +CFLAGS+= -DBSD -DOMEGALIB=\"${LIBDIR}/\" #CFLAGS = -DSYSV -O # I also had to define -cckr (K&R style C) for system V #CFLAGS = -DMSDOS -O @@ -17,14 +17,14 @@ # CPP should contain the command to run the C preprocessor. #CPP = cc -E #CPP = /lib/cpp -CPP = gcc -E +CPP = ${CC} -E # If you have gcc and don't intend to hack around with the game, # I recommend setting CC to gcc and using -O (as the CFLAGS). #CFLAGS = -O #LDFLAGS = -s -CC = gcc +#CC = gcc # comment out one of the following two, after establishing whether your # machine uses termcap (most BSD machines) or terminfo (System-V) @@ -46,9 +46,12 @@ spell.o time.o trap.o util.o village.o compress.o omega: $(OBJ) - $(CC) $(LDFLAGS) $(OBJ) $(LIBS) -o omega + $(CC) $(CFLAGS) $(LDFLAGS) $(OBJ) $(LIBS) -o omega -install: omega $(BINDIR) $(LIBDIR) +install: omega + mkdir -p $(BINDIR) + mkdir -p $(LIBDIR) + chown games:games omega cp omega $(BINDIR) chmod 4711 $(BINDIR)/omega - cp lib/* $(LIBDIR) @@ -71,9 +74,9 @@ $(OBJ): clrgen.h defs.h extern.h glob.h -clrgen.h clrgen.c: genclr.c minit.h defs.h - $(MAKE) genclr - $(CPP) -DOMEGA_CLRGEN *.[ch] | ./genclr clrgen.c clrgen.h +clrgen.c: genclr + $(CPP) $(CFLAGS) -DOMEGA_CLRGEN *.[ch] | ./genclr clrgen.c clrgen.h +clrgen.h: | clrgen.c genclr: genclr.o - $(CC) $(LDFLAGS) genclr.o -o genclr + $(CC) $(CFLAGS) $(LDFLAGS) genclr.o -o genclr diff -ruN omega.orig/aux1.c omega/aux1.c --- omega.orig/aux1.c 2021-11-12 16:35:07.545052000 -0500 +++ omega/aux1.c 2021-11-12 16:35:11.042530000 -0500 @@ -3,6 +3,7 @@ /* auxiliary functions for those in com.c, also see aux2.c and aux3.c */ #include "glob.h" +#include @@ -524,6 +525,13 @@ kill_all_levels(); #endif endgraf(); + char buf[100]; + strcpy(buf, Player.name); + strcat(buf, ".sav"); + change_to_user_perms(); + unlink(buf); + change_to_game_perms(); + //if (access(buf, F_OK )) { unlink(buf); } exit(0); } @@ -809,7 +817,7 @@ if (m_statusp(m,HOSTILE)) monster_talk(m); else { - print2("The guard (bored): Have you broken a law? [yn] "); + print2("The guard (bored): Have you broken a law? [YN] "); if (ynq2() == 'y') { print2("The guard grabs you, and drags you to court."); morewait(); diff -ruN omega.orig/char.c omega/char.c --- omega.orig/char.c 2021-11-12 16:35:07.545250000 -0500 +++ omega/char.c 2021-11-12 16:35:11.044523000 -0500 @@ -97,11 +97,11 @@ FILE *fd; #if defined(MSDOS) || defined(AMIGA) if ((fd = fopen("omega.rc","rb")) != NULL) { - print2("Use omega.rc charcter record in current directory? [yn] "); + print2("Use omega.rc charcter record in current directory? [YN] "); #else sprintf(Str1, "%s/.omegarc", getenv("HOME")); if ((fd = fopen(Str1,"r")) != NULL) { - print2("Use .omegarc in home directory? [yn] "); + print2("Use .omegarc in home directory? [YN] "); #endif if (ynq2()!='y') { fclose(fd); @@ -122,9 +122,9 @@ user_character_stats(); user_intro(); #if defined(MSDOS) || defined(AMIGA) - print1("Do you want to save this set-up to omega.rc in this directory? [yn] "); + print1("Do you want to save this set-up to omega.rc in this directory? [YN] "); #else - print1("Do you want to save this set-up to .omegarc in your home directory? [yn] "); + print1("Do you want to save this set-up to .omegarc in your home directory? [YN] "); #endif if (ynq1()=='y') save_omegarc(); @@ -300,7 +300,7 @@ Player.str = Player.maxstr = 18; } - print1("Took an official IQ test? [yn] "); + print1("Took an official IQ test? [YN] "); if (ynq1()=='y') { print1("So, whadja get? "); num = (int) parsenum()/10; @@ -314,7 +314,7 @@ numints++; } - print1("Took Undergraduate entrance exams? [yn] "); + print1("Took Undergraduate entrance exams? [YN] "); if (ynq1()=='y') { do { print1("So, what percentile? "); @@ -329,7 +329,7 @@ iqpts += (num - 49)*9/50 + 9; numints++; } - print1("Took Graduate entrance exams? [yn] "); + print1("Took Graduate entrance exams? [YN] "); if (ynq1()=='y') { do { print1("So, what percentile? "); @@ -346,7 +346,7 @@ } if (numints == 0) { - print1("Pretty dumb, aren't you? [yn] "); + print1("Pretty dumb, aren't you? [YN] "); if (ynq1()=='y') { Player.iq = random_range(3)+3; print2("I thought so...."); @@ -361,59 +361,59 @@ else Player.iq = iqpts/numints; Player.maxiq = Player.iq; agipts = 0; - print1("Can you dance? [yn] "); + print1("Can you dance? [YN] "); if (ynq1()=='y') { agipts++; - nprint1(" Well? [yn] "); + nprint1(" Well? [YN] "); if (ynq1()=='y') agipts+=2; } - print1("Do you have training in a martial art or gymnastics? [yn] "); + print1("Do you have training in a martial art or gymnastics? [YN] "); if (ynq1()=='y') { agipts+=2; - print2("Do you have dan rank or equivalent? [yn] "); + print2("Do you have dan rank or equivalent? [YN] "); if (ynq2()=='y') agipts+=4; } clearmsg(); - print1("Do you play some field sport? [yn] "); + print1("Do you play some field sport? [YN] "); if (ynq1()=='y') { agipts++; - nprint1(" Are you good? [yn] "); + nprint1(" Are you good? [YN] "); if (ynq1()=='y') agipts++; } - print1("Do you cave, mountaineer, etc.? [yn] "); + print1("Do you cave, mountaineer, etc.? [YN] "); if (ynq1()=='y') agipts+=3; - print1("Do you skate or ski? [yn] "); + print1("Do you skate or ski? [YN] "); if (ynq1()=='y') { agipts+=2; - nprint1(" Well? [yn] "); + nprint1(" Well? [YN] "); if (ynq1()=='y') agipts+=2; } - print1("Are you physically handicapped? [yn] "); + print1("Are you physically handicapped? [YN] "); if (ynq1()=='y') agipts-=4; - print1("Are you accident prone? [yn] "); + print1("Are you accident prone? [YN] "); if (ynq1()=='y') agipts-=4; - print1("Can you use a bicycle? [yn] "); + print1("Can you use a bicycle? [YN] "); if (ynq1()!='y') agipts-=4; Player.agi = Player.maxagi = 9 + agipts/2; - print1("Do you play video games? [yn] "); + print1("Do you play video games? [YN] "); if (ynq1()=='y') { dexpts+=2; - print2("Do you get high scores? [yn] "); + print2("Do you get high scores? [YN] "); if (ynq2()=='y') dexpts+=4; } clearmsg(); - print1("Are you an archer, fencer, or marksman? [yn] "); + print1("Are you an archer, fencer, or marksman? [YN] "); if (ynq1()=='y') { dexpts+=2; - print2("A good one? [yn] "); + print2("A good one? [YN] "); if (ynq2()=='y') dexpts+=4; } clearmsg(); - print1("Have you ever picked a lock? [yn] "); + print1("Have you ever picked a lock? [YN] "); if (ynq1()=='y') { dexpts+=2; print2("Really. Well, the police are being notified."); @@ -429,38 +429,38 @@ num = 125; } dexpts += num/25; - print1("Hold your arm out. Tense your fist. Hand shaking? [yn] "); + print1("Hold your arm out. Tense your fist. Hand shaking? [YN] "); if (ynq1()=='y') dexpts-=3; - print1("Ambidextrous, are you? [yn] "); + print1("Ambidextrous, are you? [YN] "); if (ynq1()=='y') dexpts+=4; - print1("Can you cut a deck of cards with one hand? [yn] "); + print1("Can you cut a deck of cards with one hand? [YN] "); if (ynq1()=='y') dexpts+=2; - print1("Can you tie your shoes blindfolded? [yn] "); + print1("Can you tie your shoes blindfolded? [YN] "); if (ynq1()!='y') dexpts-=3; Player.dex = Player.maxdex = 6 + dexpts/2; - print1("Do you ever get colds? [yn] "); + print1("Do you ever get colds? [YN] "); if (ynq1()!='y') conpts+=4; else { - nprint1(" Frequently? [yn] "); + nprint1(" Frequently? [YN] "); if (ynq1() == 'y') conpts -=4; } - print1("Had any serious accident or illness this year? [yn] "); + print1("Had any serious accident or illness this year? [YN] "); if (ynq1()=='y') conpts -=4; else conpts +=4; - print1("Have a chronic disease? [yn] "); + print1("Have a chronic disease? [YN] "); if (ynq1() =='y') conpts -=4; - print1("Overweight or underweight by more than 20 percent? [yn] "); + print1("Overweight or underweight by more than 20 percent? [YN] "); if (ynq1() =='y') conpts -=2; - print1("High Blood Pressure? [yn] "); + print1("High Blood Pressure? [YN] "); if (ynq1() =='y') conpts -=2; - print1("Smoke? [yn] "); + print1("Smoke? [YN] "); if (ynq1() =='y') conpts -=3; - print1("Take aerobics classes? [yn] "); + print1("Take aerobics classes? [YN] "); if (ynq1() =='y') conpts +=2; print1("How many miles can you run? "); num = (int) parsenum(); @@ -475,30 +475,30 @@ else if (num < 10) conpts += 4; else conpts += 8; Player.con = Player.maxcon = 12 + conpts/3; - print1("Do animals react oddly to your presence? [yn] "); + print1("Do animals react oddly to your presence? [YN] "); if (ynq1()=='y') { print2("How curious that must be."); morewait(); clearmsg(); powpts += 2; } - print1("Can you see auras? [yn] "); + print1("Can you see auras? [YN] "); if (ynq1()=='y') { nprint1(" How strange."); morewait(); powpts += 3; } - print1("Ever have an out-of-body experience? [yn] "); + print1("Ever have an out-of-body experience? [YN] "); if (ynq1()=='y') { print2("Wow, man. Fly the friendly skies...."); morewait(); clearmsg(); powpts += 3; } - print1("Did you ever cast a spell? [yn] "); + print1("Did you ever cast a spell? [YN] "); if (ynq1()=='y') { powpts += 3; - nprint1(" Did it work? [yn] "); + nprint1(" Did it work? [YN] "); if (ynq1()=='y') { powpts+=7; print2("Sure it did."); @@ -506,28 +506,28 @@ clearmsg(); } } - print1("Do you have ESP? [yn] "); + print1("Do you have ESP? [YN] "); if (ynq1()=='y') { powpts += 3; print2("Somehow, I knew you were going to say that."); morewait(); clearmsg(); } - print1("Do you have PK? [yn] "); + print1("Do you have PK? [YN] "); if (ynq1()=='y') { powpts+= 6; print2("I can't tell you how much that moves me."); morewait(); clearmsg(); } - print1("Do you believe in ghosts? [yn] "); + print1("Do you believe in ghosts? [YN] "); if (ynq1()=='y') { powpts+=2; print2("I do! I do! I do believe in ghosts!"); morewait(); clearmsg(); } - print1("Are you Irish? [yn] "); + print1("Are you Irish? [YN] "); if (ynq1()=='y') { powpts+=2; nprint1(" Is that blarney or what?"); diff -ruN omega.orig/city.c omega/city.c --- omega.orig/city.c 2021-11-12 16:35:07.539940000 -0500 +++ omega/city.c 2021-11-12 16:35:11.046232000 -0500 @@ -328,6 +328,7 @@ permutation[k] = l; } } + for(int i=0; i < 64; i++) permutation[i]=i; if (next > 63) { /* in case someone changes the no. of x's */ Level->site[x][y].locchar = CLOSED_DOOR; Level->site[x][y].p_locf = L_HOUSE; diff -ruN omega.orig/command2.c omega/command2.c --- omega.orig/command2.c 2021-11-12 16:35:07.539760000 -0500 +++ omega/command2.c 2021-11-12 16:35:11.048498000 -0500 @@ -688,7 +688,7 @@ print1("Call it:"); obj->objstr = salloc(msgscanstring()); clearmsg(); - print2("Also call all similar items by that name? [yn] "); + print2("Also call all similar items by that name? [YN] "); if (ynq2() == 'y') { Objects[obj->id].objstr = obj->objstr; } @@ -765,7 +765,7 @@ print1("Back Door WIZARD Mode!"); print2("You will invalidate your score if you proceed."); morewait(); - print1("Enable WIZARD Mode? [yn] "); + print1("Enable WIZARD Mode? [YN] "); if (ynq1()=='y') { print2("You feel like a cheater."); setgamestatus(CHEATED); @@ -970,12 +970,12 @@ } } if (!force && ok) { - print1("Confirm Save? [yn] "); + print1("Confirm Save? [YN] "); ok = (ynq1() == 'y'); } if (force || ok) { - print1("Enter savefile name: "); - strcpy(fname,msgscanstring()); + strcpy(fname,Player.name); + strcat(fname,".sav"); if (fname[0] == '\0') { print1("No save file entered - save aborted."); ok = FALSE; diff -ruN omega.orig/command3.c omega/command3.c --- omega.orig/command3.c 2021-11-12 16:35:07.538861000 -0500 +++ omega/command3.c 2021-11-12 16:35:11.051318000 -0500 @@ -176,7 +176,7 @@ while ((c < 'a' || c > 'n') && c != ESCAPE); if (c == 'n') { print1("Trying to copy all help files to ./omega.doc "); - nprint1("Confirm [yn]"); + nprint1("Confirm [YN]"); if (ynq1()=='y') { change_to_user_perms(); out = checkfopen("omega.doc", "w"); @@ -197,13 +197,7 @@ } else if (c != ESCAPE) { sprintf(filestr, "%shelp%d.txt", Omegalib, c+1-'a'); - print1("Display help file, or Copy help file to file in wd. [dc] "); - do - c = (char) mcigetc(); - while ((c != 'd') && (c != 'c')&& (c!=ESCAPE)); - if (c == 'd') - displayfile(filestr); - else if (c == 'c') copyfile(filestr); + displayfile(filestr); } #endif xredraw(); @@ -314,7 +308,7 @@ { clearmsg(); change_to_game_perms(); - mprint("Quit: Are you sure? [yn] "); + mprint("Quit: Are you sure? [YN] "); if (ynq()=='y') { if (Player.rank[ADEPT] == 0) display_quit(); else display_bigwin(); @@ -510,7 +504,7 @@ if (gamestatusp(CHEATED)) mprint("You're already in wizard mode!"); else { clearmsg(); - mprint("Really try to enter wizard mode? [yn] "); + mprint("Really try to enter wizard mode? [YN] "); if (ynq()=='y') { lname = getlogin(); #ifndef MSDOS_SUPPORTED_ANTIQUE @@ -1019,7 +1013,7 @@ print3("You're on foot already!"); else if (Current_Environment == E_COUNTRYSIDE) { mprint("If you leave your steed here he will wander away!"); - mprint("Do it anyway? [yn] "); + mprint("Do it anyway? [YN] "); if (ynq()=='y') resetgamestatus(MOUNTED); } else { diff -ruN omega.orig/defs.h omega/defs.h --- omega.orig/defs.h 2021-11-12 16:35:07.539214000 -0500 +++ omega/defs.h 2021-11-12 16:35:11.053689000 -0500 @@ -45,7 +45,9 @@ This might usually be "/usr/games/lib/omegalib/", for unix, or something like "c:\\games\\omega\\omegalib\\" for msdos */ +#ifndef OMEGALIB #define OMEGALIB "./lib/" +#endif /* Comment the following line out if you want users to be able to override */ /* the OMEGALIB define, above, by setting the environment variable OMEGALIB */ @@ -570,7 +572,11 @@ /* WDT: thank goodness for that lack of implementation. */ #else +#ifdef __FreeBSD__ +#include +#else #include +#endif #define COL_FG_BLINK A_BLINK @@ -684,7 +690,7 @@ #define TOPINV 32 #define PACKADD 64 #define COMPRESS_OPTION 128 -#define SHOW_COLOUR 256 +#define SHOW_COLOUR 0 /* This has to be changed whenever an item is added */ #define NUMSCROLLS 24 diff -ruN omega.orig/file.c omega/file.c --- omega.orig/file.c 2021-11-12 16:35:07.538375000 -0500 +++ omega/file.c 2021-11-12 16:35:11.055425000 -0500 @@ -9,7 +9,11 @@ # ifdef AMIGA # include # else -# include +# ifdef __FreeBSD__ +# include +# else +# include +# endif # endif # include # include @@ -550,7 +554,7 @@ } else if (badbutpossible) { printf("\nFurther execution may cause anomalous behavior."); - printf("\nContinue anyhow? [yn] "); + printf("\nContinue anyhow? [YN] "); if (getchar()=='y') return(-1); else return(0); } diff -ruN omega.orig/fixstr.c omega/fixstr.c --- omega.orig/fixstr.c 2021-11-12 16:35:07.539522000 -0500 +++ omega/fixstr.c 2021-11-12 16:35:11.057093000 -0500 @@ -15,7 +15,9 @@ Thus it can be broken. */ #include +#ifndef __FreeBSD__ #include +#endif #define TMPFILE "fixtmp.c" diff -ruN omega.orig/genclr.c omega/genclr.c --- omega.orig/genclr.c 2021-11-12 16:35:07.538671000 -0500 +++ omega/genclr.c 2021-11-12 16:35:11.058763000 -0500 @@ -281,16 +281,20 @@ */ fp = emitopen (cfile, argv); fprintf (fp, "\ +#ifdef __FreeBSD__\n\ +#include \n\ +#else\n\ #include \n\ +#endif\n\ #include \n\ #include \n\ - +\n\ #include \"%s\"\n\ - +\n\ void clrgen_init (void)\n\ ""{\n\ if (%d > COLOR_PAIRS - 1) {\n\ - endwin(); + endwin();\n\ fputs (\"Too many color pairs!\\n\", stderr);\n\ exit (1);\n\ }\n\ diff -ruN omega.orig/guild1.c omega/guild1.c --- omega.orig/guild1.c 2021-11-12 16:35:07.544170000 -0500 +++ omega/guild1.c 2021-11-12 16:35:11.060476000 -0500 @@ -31,7 +31,7 @@ case 0: nprint2("and see the Recruiting Centurion."); morewait(); - print2("Do you wish to join the Legion? [yn] "); + print2("Do you wish to join the Legion? [YN] "); if (ynq2()=='y') { clearmsg(); if (Player.rank[ARENA]>0) { @@ -207,7 +207,7 @@ clearmsg(); } if (Player.rank[NOBILITY]==0) { - print1("Well, sirrah, wouldst embark on a quest? [yn] "); + print1("Well, sirrah, wouldst embark on a quest? [YN] "); if (ynq1() == 'y') { print2("Splendid. Bring me the head of the Goblin King."); Player.rank[NOBILITY]=COMMONER; @@ -311,7 +311,7 @@ while ((response != 'e') && (response != 'r') && (response != ESCAPE)); } else { - print2("Enter the games? [yn] "); + print2("Enter the games? [YN] "); response = ynq2(); if (response == 'y') response = 'e'; else response = ESCAPE; diff -ruN omega.orig/guild2.c omega/guild2.c --- omega.orig/guild2.c 2021-11-12 16:35:07.545339000 -0500 +++ omega/guild2.c 2021-11-12 16:35:11.062858000 -0500 @@ -69,7 +69,7 @@ clearmsg(); mprint("Dues are"); mnumprint(dues); - mprint(" Au. Pay it? [yn] "); + mprint(" Au. Pay it? [YN] "); if (ynq1() =='y') { if (Player.cash < dues) { print1("You can't cheat the Thieves' Guild!"); @@ -185,7 +185,7 @@ clearmsg(); print1("The fee will be: "); mnumprint(max(count*fee,fee)); - nprint1("Au. Pay it? [yn] "); + nprint1("Au. Pay it? [YN] "); if (ynq1()=='y') if (Player.cash < max(count*fee,fee)) print2("Try again when you have the cash."); @@ -211,7 +211,7 @@ clearmsg(); print1("I'll give you "); mlongprint(2 * item_value(Player.possessions[i]) / 3); - nprint1("Au each. OK? [yn] "); + nprint1("Au each. OK? [YN] "); if (ynq1() == 'y') { number = getnumber(Player.possessions[i]->number); if ((number >= Player.possessions[i]->number) && @@ -317,7 +317,7 @@ } else { print1("Tuition is 1000Au. "); - nprint1("Pay it? [yn] "); + nprint1("Pay it? [YN] "); if (ynq1() =='y') { if (Player.cash < 1000) print2("You don't have the funds!"); @@ -424,7 +424,7 @@ } if (Spellsleft < 1) { print1("Extracurricular Lab fee: 2000 Au. "); - nprint1("Pay it? [yn] "); + nprint1("Pay it? [YN] "); if (ynq1()=='y') { if (Player.cash < 2000) print1("Try again when you have the cash."); @@ -504,7 +504,7 @@ mprint("For you, there is an initiation fee of"); mnumprint(fee); mprint(" Au."); - print2("Pay it? [yn] "); + print2("Pay it? [YN] "); if (ynq2() =='y') { if (Player.cash < fee) print3("Try again when you have the cash!"); @@ -605,7 +605,7 @@ clearmsg(); print1("That will be: "); mnumprint(fee); - nprint1("Au. Pay it? [yn] "); + nprint1("Au. Pay it? [YN] "); if (ynq1()=='y') { if (Player.cash < fee) print2("Begone, deadbeat, or face the wrath of the Circle!"); @@ -688,7 +688,7 @@ else if (Player.rank[LEGION] != 0) print1("Go back to your barracks, mercenary!"); else { - print1("Dost thou wish to join our Order? [yn] "); + print1("Dost thou wish to join our Order? [YN] "); if (ynq1()=='y') { print1("Justiciar "); nprint1(Justiciar); diff -ruN omega.orig/inv.c omega/inv.c --- omega.orig/inv.c 2021-11-12 16:35:07.545107000 -0500 +++ omega/inv.c 2021-11-12 16:35:11.064801000 -0500 @@ -8,7 +8,11 @@ # ifdef AMIGA # include # else -# include +# ifdef __FreeBSD__ +# include +# else +# include +# endif # endif #endif @@ -840,8 +844,7 @@ use_pack_item(response - 'a',slot); } } - if ( optionp(TOPINV) ) - display_possessions(); + display_possessions(); return slot; } diff -ruN omega.orig/itemf3.c omega/itemf3.c --- omega.orig/itemf3.c 2021-11-12 16:35:07.539636000 -0500 +++ omega/itemf3.c 2021-11-12 16:35:11.066611000 -0500 @@ -37,7 +37,7 @@ else { HiMagicUse = Date; print1("With a shriek of tearing aether, a magic portal appears!"); - print2("Step through? [yn] "); + print2("Step through? [YN] "); if (ynq()=='y') change_environment(E_COURT); print1("The sceptre seems to subside. You hear a high whine, as of"); print2("capacitors beginning to recharge."); diff -ruN omega.orig/move.c omega/move.c --- omega.orig/move.c 2021-11-12 16:35:07.539034000 -0500 +++ omega/move.c 2021-11-12 16:35:11.068482000 -0500 @@ -520,12 +520,12 @@ print2("You feel the terrible heat despite your immunity to fire!"); morewait(); } - print2("Enter the flames? [yn] "); + print2("Enter the flames? [YN] "); if (ynq2()=='y') { if (Player.hp == 1) p_death("total incineration"); else Player.hp = 1; dataprint(); - print1("You feel like you are being incinerated! Jump back? [yn] "); + print1("You feel like you are being incinerated! Jump back? [YN] "); if (ynq1()=='y') print2("Phew! That was close!"); else { @@ -562,7 +562,7 @@ print2("The vapor burns despite your immunity to acid!"); morewait(); } - print1("Enter the fluid? [yn] "); + print1("Enter the fluid? [YN] "); if (ynq1()=='y') { if (Player.hp == 1) p_death("drowning in acid (ick, what a way to go)"); else Player.hp = 1; @@ -571,7 +571,7 @@ morewait(); nprint2("Your lungs burn...."); morewait(); - print2("Your body begins to disintegrate.... Leave the pool? [yn] "); + print2("Your body begins to disintegrate.... Leave the pool? [YN] "); if (ynq2()=='y') print2("Phew! That was close!"); else { @@ -603,13 +603,13 @@ if (Player.immunity[ELECTRICITY]) print2("You feel static cling despite your immunity to electricity!"); morewait(); - print1("Enter the storm? [yn] "); + print1("Enter the storm? [YN] "); if (ynq1()=='y') { if (Player.hp == 1) p_death("being torn apart and then electrocuted"); else Player.hp = 1; dataprint(); print1("You are buffeted and burnt by the storm...."); - print2("You begin to lose consciousness.... Leave the storm? [yn] "); + print2("You begin to lose consciousness.... Leave the storm? [YN] "); if (ynq1()=='y') print2("Phew! That was close!"); else { @@ -640,13 +640,13 @@ if (find_item(&o,THINGID+6,-1)) print2("A splash of salt water does nothing to dissuade the vines."); morewait(); - print1("Enter the overgrown mire? [yn] "); + print1("Enter the overgrown mire? [YN] "); if (ynq1()=='y') { if (Player.hp == 1) p_death("being eaten alive"); else Player.hp = 1; dataprint(); print1("You are being dragged into the muck. Suckers bite you...."); - print2("You're about to be entangled.... Leave the mud? [yn] "); + print2("You're about to be entangled.... Leave the mud? [YN] "); if (ynq2()=='y') print2("Phew! That was close!"); else { @@ -704,7 +704,7 @@ void l_void_station() { int i,something=FALSE; - print1("You are at the brink of an endless void. Enter it? [yn] "); + print1("You are at the brink of an endless void. Enter it? [YN] "); if (ynq()=='y') { if (Level->mlist == NULL) { print2("You fall forever. Eventually you die of starvation."); @@ -804,7 +804,7 @@ void l_enter_circle() { print1("You see a translucent stairway before you, leading down."); - print2("Take it? [yn] "); + print2("Take it? [YN] "); if (ynq()=='y') change_environment(E_CIRCLE); } @@ -859,7 +859,7 @@ pob o; int i; print1("You have come upon a huge ornately appointed throne!"); - print2("Sit in it? [yn] "); + print2("Sit in it? [YN] "); if (ynq1()=='y') { if (! find_item(&o,ARTIFACTID+22,-1)) { print1("The throne emits an eerie violet-black radiance."); @@ -954,7 +954,7 @@ print1("You have found an extremely long stairway going straight up."); print2("The stairs are grilled steel and the bannister is rubber."); morewait(); - print1("Take the stairway? [yn] "); + print1("Take the stairway? [YN] "); if (ynq1()=='y') { print1("The stairs suddenly start moving with a grind of gears!"); print2("You are wafted to the surface...."); @@ -964,7 +964,7 @@ void l_enter_court() { - print1("You have found a magical portal! Enter it? [yn] "); + print1("You have found a magical portal! Enter it? [YN] "); if (ynq1()=='y') { if (! gamestatusp(COMPLETED_CASTLE)) { if (! gamestatusp(ATTACKED_ORACLE)) { @@ -988,7 +988,7 @@ else print2("You find it extremely difficult to approach the stone."); morewait(); clearmsg(); - print1("Touch it? [yn] "); + print1("Touch it? [YN] "); if (ynq1()=='y') { print1("A sudden flux of energy surrounds you!"); morewait(); @@ -1008,7 +1008,7 @@ print2("You feel a sense of balance as you regard it."); morewait(); clearmsg(); - print1("Touch it? [yn] "); + print1("Touch it? [YN] "); if (ynq1()=='y') { print1("A vortex of mana spins about you!"); if (abs(Player.alignment) > random_range(50)) { @@ -1023,7 +1023,7 @@ drawvision(Player.x,Player.y); } else { - print2("You are being drained of experience! Step back? [yn] "); + print2("You are being drained of experience! Step back? [YN] "); if (ynq2()=='y') { clearmsg(); print1("The vortex calms down, dimishes, and then disappears."); @@ -1053,7 +1053,7 @@ else print2("You find the stone extremely distasteful to contemplate."); morewait(); clearmsg(); - print1("Touch it? [yn] "); + print1("Touch it? [YN] "); if (ynq()=='y') { print1("A matrix of power flows about you!"); morewait(); @@ -1074,7 +1074,7 @@ print2("A feeling of nihility emanates from it."); morewait(); clearmsg(); - print1("Touch it? [yn] "); + print1("Touch it? [YN] "); if (ynq()=='y') { print1("You feel negated."); morewait(); @@ -1102,10 +1102,10 @@ print2("On the top surface is an indentation in human shape."); morewait(); print1("You see old rust colored stains in the grain of the stone."); - print2("You sense something awakening. Touch the block? [yn] "); + print2("You sense something awakening. Touch the block? [YN] "); if (ynq2() == 'y') { print1("You sense great pain emanating from the ancient altar."); - print2("Climb on to the block? [yn] "); + print2("Climb on to the block? [YN] "); if (ynq2() == 'y') { print1("You are stuck fast to the block!"); print2("You feel your life-force being sucked away!"); @@ -1158,7 +1158,7 @@ print2("Flashes of irridescent light glint from the object."); morewait(); print1("You feel your attention being drawn by the intricate crystal."); - print2("Look away from the interesting phenomenon? [yn] "); + print2("Look away from the interesting phenomenon? [YN] "); if (ynq2()=='n') { print1("Your gaze focuses deeply on the gem...."); print2("The crystal seems to open up and surround you!"); diff -ruN omega.orig/mtalk.c omega/mtalk.c --- omega.orig/mtalk.c 2021-11-12 16:35:07.538785000 -0500 +++ omega/mtalk.c 2021-11-12 16:35:11.073034000 -0500 @@ -31,7 +31,7 @@ } } } - mprint("Do you request a ritual of neutralization? [yn] "); + mprint("Do you request a ritual of neutralization? [YN] "); if (ynq() == 'y') { if (Phase/2 == 6 || Phase/2 == 0) { /* full or new moon */ mprint("\"Unfortunately, I cannot perform a ritual of balance on"); @@ -78,7 +78,7 @@ mprint("The ArchDruid looks at you and cries: 'Unclean! Unclean!'"); disrupt(Player.x,Player.y,100); mprint("This seems to have satiated his desire for vengeance."); - mprint("'Have you learned your lesson?' The ArchDruid asks. [yn] "); + mprint("'Have you learned your lesson?' The ArchDruid asks. [YN] "); if (ynq()) { mprint("'I certainly hope so!' says the ArchDruid."); for (curr = Level->mlist; curr; curr = curr->next) @@ -176,7 +176,7 @@ { if (m_statusp(m,HOSTILE)) { print1("'Surrender in the name of the Law!'"); - print2("Do it? [yn] "); + print2("Do it? [YN] "); if (ynq2()=='y') { Player.alignment++; if (Current_Environment == E_CITY) { @@ -279,7 +279,7 @@ mprint("for only"); mlongprint(max(10,4*true_item_value(m->possessions->thing))); mprint("Au."); - mprint("Want it? [yn] "); + mprint("Want it? [YN] "); if (ynq()=='y') { if (Player.cash < (max(10,4*true_item_value(m->possessions->thing)))) { if (Player.alignment > 10) { @@ -498,7 +498,7 @@ { strcat(Str2," beckons seductively..."); mprint(Str2); - mprint("Flee? [yn] "); + mprint("Flee? [YN] "); if (ynq()=='y') { mprint("You feel stupid."); } @@ -533,7 +533,7 @@ { strcat(Str2," beckons seductively..."); mprint(Str2); - mprint("Flee? [yn] "); + mprint("Flee? [YN] "); if (ynq()=='y') mprint("You feel fortunate...."); else { @@ -585,7 +585,7 @@ else if (Current_Environment == Current_Dungeon) mprint("The horse shies; maybe he doesn't like the dungeon air...."); else { - mprint("The horse lets you pat his nose. Want to ride him? [yn] "); + mprint("The horse lets you pat his nose. Want to ride him? [YN] "); if (ynq()=='y') { m->hp = -1; Level->site[m->x][m->y].creature = NULL; @@ -617,12 +617,12 @@ if (m->id == SERV_LAW) { target = SERV_CHAOS; mprint("The Servant of Law pauses in thought for a moment."); - mprint("You are asked: Are there any Servants of Chaos hereabouts? [yn] "); + mprint("You are asked: Are there any Servants of Chaos hereabouts? [YN] "); } else { target = SERV_LAW; mprint("The Servant of Chaos grins mischievously at you."); - mprint("You are asked: Are there any Servants of Law hereabouts? [yn] "); + mprint("You are asked: Are there any Servants of Law hereabouts? [YN] "); } if (ynq()=='y') { print1("Show me."); @@ -710,7 +710,7 @@ if (! m_statusp(m,HOSTILE)) { if (Current_Environment == E_VILLAGE) { mprint("The merchant asks you if you want to buy a horse for 250GP."); - mprint("Pay the merchant? [yn] "); + mprint("Pay the merchant? [YN] "); if (ynq()=='y') { if (Player.cash < 250) mprint("The merchant says: 'Come back when you've got the cash!'"); diff -ruN omega.orig/omega.c omega/omega.c --- omega.orig/omega.c 2021-11-12 16:35:07.538550000 -0500 +++ omega/omega.c 2021-11-12 16:35:11.074791000 -0500 @@ -220,7 +220,7 @@ exit(0); } change_to_user_perms(); - unlink(savestr); + //unlink(savestr); change_to_game_perms(); return(TRUE); } diff -ruN omega.orig/priest.c omega/priest.c --- omega.orig/priest.c 2021-11-12 16:35:07.544955000 -0500 +++ omega/priest.c 2021-11-12 16:35:11.076536000 -0500 @@ -36,7 +36,7 @@ print1("This oaken altar is ornately engraved with leaves."); break; } - print2("Worship at this altar? [yn] "); + print2("Worship at this altar? [YN] "); if (ynq2() == 'y') { if (Player.rank[PRIESTHOOD] == 0) increase_priest_rank(deity); diff -ruN omega.orig/scr.c omega/scr.c --- omega.orig/scr.c 2021-11-12 16:35:07.545548000 -0500 +++ omega/scr.c 2021-11-12 16:35:11.078430000 -0500 @@ -10,7 +10,11 @@ # ifdef AMIGA # include # else -# include +# ifdef __FreeBSD__ +# include +# else +# include +# endif # endif # include #endif @@ -125,20 +129,20 @@ { char p='*'; /* the user's choice; start with something impossible * to prevent a loop. */ - while ((p != 'n') && (p != 'y') && (p != 'q') && (p != ESCAPE) && + while ((p != 'N') && (p != 'Y') && (p != 'Q') && (p != ESCAPE) && (p != EOF) && (p != ' ')) p = wgetch(Msgw); switch (p) { - case 'y': wprintw(Msgw,"yes. "); break; - case 'n': wprintw(Msgw,"no. "); break; + case 'Y': wprintw(Msgw,"yes. "); break; + case 'N': wprintw(Msgw,"no. "); break; - case ESCAPE: p = 'q'; /* fall through to 'q' */ - case ' ': p = 'q'; /* fall through to 'q' */ - case 'q': wprintw(Msgw,"quit. "); break; + case ESCAPE: p = 'Q'; /* fall through to 'q' */ + case ' ': p = 'Q'; /* fall through to 'q' */ + case 'Q': wprintw(Msgw,"quit. "); break; default: assert( p == EOF ); } wrefresh(Msgw); - return(p); + return(tolower(p)); } diff -ruN omega.orig/site1.c omega/site1.c --- omega.orig/site1.c 2021-11-12 16:35:07.545004000 -0500 +++ omega/site1.c 2021-11-12 16:35:11.080261000 -0500 @@ -213,7 +213,7 @@ clearmsg(); print1("I can let you have it for "); mlongprint(2*true_item_value(newitem)); - nprint1("Au. Buy it? [yn] "); + nprint1("Au. Buy it? [YN] "); if (ynq1() == 'y') { if (Player.cash < 2*true_item_value(newitem)) { print2("Why not try again some time you have the cash?"); @@ -239,7 +239,7 @@ if (! gamestatusp(CLUB_MEMBER)) { if (Player.level < 2) print3("Only reknowned adventurers need apply."); else { - print2("Dues are 100Au. Pay it? [yn] "); + print2("Dues are 100Au. Pay it? [YN] "); if (ynq2()=='y') { if (Player.cash < 100) print3("Beat it, or we'll blackball you!"); @@ -603,7 +603,7 @@ int num; pob food; print1("Commandant Sonder's Rampart-fried Lyzzard partes. Open 24 hrs."); - print2("Buy a bucket! Only 5 Au. Make a purchase? [yn] "); + print2("Buy a bucket! Only 5 Au. Make a purchase? [YN] "); if (ynq2()=='y') { clearmsg(); print1("How many? "); @@ -630,7 +630,7 @@ void l_diner() { print1("The Rampart Diner. All you can eat, 25Au."); - print2("Place an order? [yn] "); + print2("Place an order? [YN] "); if (ynq2()=='y') { if (Player.cash < 25) mprint("TANSTAAFL! Now git!"); @@ -649,7 +649,7 @@ if ((hour() < 17) || (hour() > 23)) print2 ("So sorry, we are closed 'til the morrow..."); else { - print2("May I take your order? [yn] "); + print2("May I take your order? [YN] "); if (ynq2()=='y') { if (Player.cash < 1000) print2("So sorry, you have not the funds for dinner."); @@ -749,7 +749,7 @@ break; case 3: print1("Riley draws you a shot of his 'special reserve'"); - print2("Drink it [yn]?"); + print2("Drink it [YN]?"); if (ynq2()=='y') { if (Player.con < random_range(20)) { print1(" Quite a kick!"); @@ -830,7 +830,7 @@ clearmsg(); print1("I'll give you "); mnumprint(obj->basevalue/3); - nprint1("Au for it. Take it? [yn] "); + nprint1("Au for it. Take it? [YN] "); if (ynq1()=='y') { Player.cash += (obj->basevalue/3); conform_lost_objects(1,obj); @@ -852,7 +852,7 @@ mlevel = Monsters[obj->charge].level; print1("It'll cost you "); mnumprint(max(10,obj->basevalue*2)); - nprint1("Au for the transformation. Pay it? [yn] "); + nprint1("Au for the transformation. Pay it? [YN] "); if (ynq1()=='y') { if (Player.cash < max(10,obj->basevalue*2)) print2("You can't afford it!"); @@ -881,7 +881,7 @@ if (Date - LastDay < 7) print2("G'wan! Get a job!"); else if (Player.cash < 100) { - print2("Do you want to go on the dole? [yn] "); + print2("Do you want to go on the dole? [YN] "); if (ynq2()=='y') { print1("Well, ok, but spend it wisely."); morewait(); @@ -928,7 +928,7 @@ } morewait(); while(! done) { - print1("Pay the fee? [yn] "); + print1("Pay the fee? [YN] "); if (ynq1()=='y') { if (Player.cash < fee) { print2("No payee, No studee."); @@ -1121,7 +1121,7 @@ clearmsg(); print1("You can get "); mlongprint(item_value(Player.possessions[i]) / 2); - nprint1("Au each. Sell [yn]? "); + nprint1("Au each. Sell [YN]? "); if (ynq1() == 'y') { number = getnumber(Player.possessions[i]->number); if ((number >= Player.possessions[i]->number) && @@ -1152,7 +1152,7 @@ nprint1(itemid(Player.pack[i])); nprint1(" for "); mlongprint(item_value(Player.pack[i])/2); - nprint1("Au each? [yn] "); + nprint1("Au each? [YN] "); if (ynq1()=='y') { number = getnumber(Player.pack[i]->number); if (number > 0) { diff -ruN omega.orig/site2.c omega/site2.c --- omega.orig/site2.c 2021-11-12 16:35:07.539992000 -0500 +++ omega/site2.c 2021-11-12 16:35:11.082118000 -0500 @@ -17,7 +17,7 @@ print2("Which are you interested in [r,p, or ESCAPE] "); response = mgetc(); if (response == 'p') { - print2("Only 50,000Au. Buy it? [yn] "); + print2("Only 50,000Au. Buy it? [YN] "); if (ynq2()=='y') { if (Player.cash < 50000) print3("No mortgages, buddy."); @@ -31,7 +31,7 @@ } } else if (response == 'r') { - print2("Weekly Rental, 1000Au. Pay for it? [yn] "); + print2("Weekly Rental, 1000Au. Pay for it? [YN] "); if (ynq2()=='y') { if (Player.cash < 1000) print2("Hey, pay the rent or out you go...."); @@ -96,7 +96,7 @@ } else if (response == 'd') { clearmsg(); - print1("You sure you want to retire, now? [yn] "); + print1("You sure you want to retire, now? [YN] "); if (ynq1() == 'y') { p_win(); } @@ -337,7 +337,7 @@ morewait(); clearmsg(); } - print2("Enter the mystic portal? [yn] "); + print2("Enter the mystic portal? [YN] "); if (ynq2()!='y') { if (Player.level > 100) { print1("The Lords of Destiny spurn your cowardice...."); @@ -454,7 +454,7 @@ Level->site[12][56].locchar = WALL; morewait(); clearmsg(); - print1("Try to crack it? [yn] "); + print1("Try to crack it? [YN] "); if (ynq1()=='y') { if (random_range(100) < Player.rank[THIEVES]*Player.rank[THIEVES]) { print2("The lock clicks open!!!"); @@ -485,7 +485,7 @@ print2("A sign reads `The House of the Eclipse'"); morewait(); clearmsg(); - print1("Try to enter? [yn] "); + print1("Try to enter? [YN] "); if (ynq1()=='y') { menuclear(); menuprint("a:knock on the door.\n"); @@ -505,7 +505,7 @@ print2("There is no reponse."); else { print1("A window opens in the door."); - print2("`500Au, buddy. For the night.' pay it? [yn] "); + print2("`500Au, buddy. For the night.' pay it? [YN] "); if (ynq2()=='y') { if (Player.cash < 500) { print1("`What, no roll?!'"); @@ -809,7 +809,7 @@ char response; if (gamestatusp(ATTACKED_ORACLE) && (! gamestatusp(COMPLETED_ASTRAL))) { print1("You come before a blue crystal dais. You see a broken mirror."); - print2("Look in the mirror? [yn] "); + print2("Look in the mirror? [YN] "); if (ynq2()=='y') { print1("A strange force rips you from your place...."); Player.hp = 1; @@ -829,7 +829,7 @@ print2("You notice a robed figure in front of you...."); morewait(); print1("The oracle doffs her cowl. Her eyes glitter with blue fire!"); - print2("Attack her? [yn] "); + print2("Attack her? [YN] "); if (ynq2() == 'y') { setgamestatus(ATTACKED_ORACLE); print1("The oracle deftly avoids your attack."); @@ -852,7 +852,7 @@ else if (!gamestatusp(COMPLETED_ASTRAL)) { morewait(); print1("'Journey to the Astral Plane and meet the Gods' servants.'"); - print2("The oracle holds out her hand. Do you take it? [yn] "); + print2("The oracle holds out her hand. Do you take it? [YN] "); if (ynq2()=='y') { print1("'Beware: Only the Star Gem can escape the Astral Plane.'"); print2("A magic portal opens behind the oracle. She leads you"); @@ -891,21 +891,21 @@ void l_mansion() { - print1("Enter the mansion? [yn] "); + print1("Enter the mansion? [YN] "); if (ynq1()=='y') change_environment(E_MANSION); } void l_house() { - print1("Enter the house? [yn] "); + print1("Enter the house? [YN] "); if (ynq1()=='y') change_environment(E_HOUSE); } void l_hovel() { - print1("Enter the hovel? [yn] "); + print1("Enter the hovel? [YN] "); if (ynq1()=='y') change_environment(E_HOVEL); } @@ -992,7 +992,7 @@ { int i,j,x,y; print1("Ye Olde Mappe Shoppe."); - print2("Map of the local area: 500Au. Buy it? [yn] "); + print2("Map of the local area: 500Au. Buy it? [YN] "); if (ynq2()=='y') { if (Player.cash < 500) print3("Cursed be cheapskates! May you never find an aid station...."); @@ -1027,7 +1027,7 @@ void l_charity() { long donation; - print2("'Greetings, friend. Do you wish to make a donation?' [yn] "); + print2("'Greetings, friend. Do you wish to make a donation?' [YN] "); if (ynq2()!='y') print3("'Pinchpurse!'"); else { diff -ruN omega.orig/spell.c omega/spell.c --- omega.orig/spell.c 2021-11-12 16:35:07.545294000 -0500 +++ omega/spell.c 2021-11-12 16:35:11.083936000 -0500 @@ -261,7 +261,7 @@ mprint("A storm of mana coaelesces around you."); mprint("You are buffeted by bursts of random magic."); p_damage(random_range(Player.pow),UNSTOPPABLE,"high magic"); - mprint("Continue ritual? Could be dangerous.... [yn] "); + mprint("Continue ritual? Could be dangerous.... [YN] "); if (ynq()=='y') s_wish(); else mprint("The mana fades away to nothingness."); x = Player.x; diff -ruN omega.orig/util.c omega/util.c --- omega.orig/util.c 2021-11-12 16:35:07.540276000 -0500 +++ omega/util.c 2021-11-12 16:35:11.085765000 -0500 @@ -652,10 +652,10 @@ int confirmation() { switch(random_range(4)) { - case 0: mprint("Are you sure? [yn] "); break; - case 1: mprint("Certain about that? [yn] "); break; - case 2: mprint("Do you really mean it? [yn] "); break; - case 3: mprint("Confirm that, would you? [yn] "); break; + case 0: mprint("Are you sure? [YN] "); break; + case 1: mprint("Certain about that? [YN] "); break; + case 2: mprint("Do you really mean it? [YN] "); break; + case 3: mprint("Confirm that, would you? [YN] "); break; } return(ynq()=='y'); }