rogueclone-cvs Mailing List for Rogue Clone IV (Page 2)
Brought to you by:
mlehotay
You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(8) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(8) |
Feb
(24) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
2005 |
Jan
|
Feb
|
Mar
|
Apr
(5) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(23) |
Jul
|
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
(5) |
2009 |
Jan
(6) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2016 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Michael L. <mle...@us...> - 2008-06-15 19:22:49
|
Update of /cvsroot/rogueclone/rogue/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv26567 Modified Files: move.c Log Message: applied patch [ 1077029 ] move.c - gr_dir() optimization Index: move.c =================================================================== RCS file: /cvsroot/rogueclone/rogue/src/move.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** move.c 13 Jun 2008 00:19:06 -0000 1.6 --- move.c 15 Jun 2008 19:22:46 -0000 1.7 *************** *** 534,574 **** } ! static short gr_dir(void) /* only used within this file */ { ! short d; ! ! d = (short) get_rand(1, 8); ! ! switch(d) { ! case 1: ! d = 'j'; ! break; ! case 2: ! d = 'k'; ! break; ! case 3: ! d = 'l'; ! break; ! case 4: ! d = 'h'; ! break; ! case 5: ! d = 'y'; ! break; ! case 6: ! d = 'u'; ! break; ! case 7: ! d = 'b'; ! break; ! case 8: ! d = 'n'; ! break; ! } ! return(d); } - static void heal(void) /* only used within this file */ { --- 534,548 ---- } ! /* ! * Patch [ 1077029 ] move.c - gr_dir() optimization ! * Submitted By: Nobody/Anonymous - nobody ! */ static short gr_dir(void) /* only used within this file */ { ! char return_list[8] = "jklhyubn"; ! short d = get_rand(0, 7); ! return ( return_list[d] ); } static void heal(void) /* only used within this file */ { |
From: Michael L. <mle...@us...> - 2008-06-14 02:48:37
|
Update of /cvsroot/rogueclone/rogue/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv9859 Modified Files: object.c Log Message: fixed typo (bug 1527538) Index: object.c =================================================================== RCS file: /cvsroot/rogueclone/rogue/src/object.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** object.c 11 Jun 2008 06:16:35 -0000 1.6 --- object.c 14 Jun 2008 02:48:28 -0000 1.7 *************** *** 513,517 **** } if ((obj->which_kind == ARROW) || (obj->which_kind == DAGGER) || ! (obj->which_kind == SHURIKEN) | (obj->which_kind == DART)) { obj->quantity = (short) get_rand(3, 15); obj->quiver = (short) get_rand(0, 126); --- 513,517 ---- } if ((obj->which_kind == ARROW) || (obj->which_kind == DAGGER) || ! (obj->which_kind == SHURIKEN) || (obj->which_kind == DART)) { obj->quantity = (short) get_rand(3, 15); obj->quiver = (short) get_rand(0, 126); |
From: Michael L. <mle...@us...> - 2008-06-14 02:38:29
|
Update of /cvsroot/rogueclone/rogue/doc In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv5981 Modified Files: changelog.txt guide.html Log Message: added the nobeep option Index: changelog.txt =================================================================== RCS file: /cvsroot/rogueclone/rogue/doc/changelog.txt,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** changelog.txt 13 Jun 2008 04:12:01 -0000 1.2 --- changelog.txt 14 Jun 2008 02:38:26 -0000 1.3 *************** *** 1,12 **** To Do ----- ! 1:18 AM 2008-06-11 - fix compiler warnings 9:11 PM 2008-06-10 - apply patches 9:13 PM 2008-06-10 - fix bugs 9:11 PM 2008-06-10 - get linux port working - 9:17 PM 2008-06-11 - silent option Changelog --------- 10:35 PM 2008-06-12 - fixed linker warning 8:03 PM 2008-06-12 - lots of casting to fix compiler warnings --- 1,12 ---- To Do ----- ! 1:18 AM 2008-06-11 - fix remaining vc98 compiler warnings 9:11 PM 2008-06-10 - apply patches 9:13 PM 2008-06-10 - fix bugs 9:11 PM 2008-06-10 - get linux port working Changelog --------- + 7:29 PM 2008-06-13 - added the nobeep option 10:35 PM 2008-06-12 - fixed linker warning 8:03 PM 2008-06-12 - lots of casting to fix compiler warnings Index: guide.html =================================================================== RCS file: /cvsroot/rogueclone/rogue/doc/guide.html,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** guide.html 1 Nov 2004 22:51:42 -0000 1.7 --- guide.html 14 Jun 2008 02:38:26 -0000 1.8 *************** *** 803,807 **** <td><a name="PCgraphics"><i>PCgraphics</i><td>[ <i>PCgraphics</i> ]</a><br> Use extended ASCII characters, just like IBM PC rogue. ! <tr valign=top> <td><i>name</i><td>[ Rodney ]<br> --- 803,811 ---- <td><a name="PCgraphics"><i>PCgraphics</i><td>[ <i>PCgraphics</i> ]</a><br> Use extended ASCII characters, just like IBM PC rogue. ! ! <tr valign=top> ! <td><i>beep</i><td>[ <i>nobeep</i> ]<br> ! Use the terminal bell. ! <tr valign=top> <td><i>name</i><td>[ Rodney ]<br> |
From: Michael L. <mle...@us...> - 2008-06-14 02:38:07
|
Update of /cvsroot/rogueclone/rogue/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv5599 Modified Files: init.c message.c room.c save.c Log Message: added the nobeep option Index: message.c =================================================================== RCS file: /cvsroot/rogueclone/rogue/src/message.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** message.c 13 Jun 2008 00:19:06 -0000 1.6 --- message.c 14 Jun 2008 02:38:02 -0000 1.7 *************** *** 56,60 **** extern boolean cant_int, did_int, interrupted, save_is_interactive; ! extern boolean use_doschars, use_color; extern short add_strength; extern short cur_level; --- 56,60 ---- extern boolean cant_int, did_int, interrupted, save_is_interactive; ! extern boolean use_doschars, use_color, beep; extern short add_strength; extern short cur_level; *************** *** 342,346 **** void sound_bell(void) { ! putchar(7); fflush(stdout); } --- 342,348 ---- void sound_bell(void) { ! if(beep) { ! putchar(7); ! } fflush(stdout); } Index: room.c =================================================================== RCS file: /cvsroot/rogueclone/rogue/src/room.c,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** room.c 13 Jun 2008 00:19:06 -0000 1.10 --- room.c 14 Jun 2008 02:38:02 -0000 1.11 *************** *** 53,57 **** extern short halluc; extern boolean detect_monster, jump, passgo, display_skull; ! extern boolean use_doschars, use_color; extern char *login_name, *fruit, *press_space; --- 53,57 ---- extern short halluc; extern boolean detect_monster, jump, passgo, display_skull; ! extern boolean use_doschars, use_color, beep; extern char *login_name, *fruit, *press_space; *************** *** 60,64 **** static boolean color_kludge; ! #define NOPTS 7 struct option { --- 60,64 ---- static boolean color_kludge; ! #define NOPTS 8 struct option { *************** *** 91,94 **** --- 91,98 ---- }, { + "Use the terminal bell (\"beep\"): ", + 1, (char **) 0, &beep, 0, 0 + }, + { "Name (\"name\"): ", 0, &login_name, (boolean *) 0, 0, 0 Index: save.c =================================================================== RCS file: /cvsroot/rogueclone/rogue/src/save.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** save.c 13 Jun 2008 00:19:06 -0000 1.7 --- save.c 14 Jun 2008 02:38:02 -0000 1.8 *************** *** 80,83 **** --- 80,84 ---- extern boolean use_color; extern boolean use_doschars; + extern boolean beep; extern char *fruit; *************** *** 174,177 **** --- 175,179 ---- r_write(fp, (char *) &use_color, sizeof(use_color)); r_write(fp, (char *) &use_doschars, sizeof(use_doschars)); + r_write(fp, (char *) &beep, sizeof(beep)); write_string(fruit, fp); md_gct(&rt_buf); *************** *** 248,251 **** --- 250,254 ---- r_read(fp, (char *) &use_color, sizeof(use_color)); r_read(fp, (char *) &use_doschars, sizeof(use_doschars)); + r_read(fp, (char *) &beep, sizeof(beep)); read_string(fruit, fp); r_read(fp, (char *) &saved_time, sizeof(saved_time)); Index: init.c =================================================================== RCS file: /cvsroot/rogueclone/rogue/src/init.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** init.c 13 Jun 2008 00:19:06 -0000 1.7 --- init.c 14 Jun 2008 02:38:02 -0000 1.8 *************** *** 63,66 **** --- 63,67 ---- boolean use_doschars = 1; boolean use_color = 1; + boolean beep = 0; char *byebye_string = "Okay, bye bye!"; *************** *** 357,360 **** --- 358,363 ---- } else if (!strncmp(eptr, "color", 5)) { use_color = optval; + } else if (!strncmp(eptr, "beep", 4)) { + beep = optval; } } |
From: Michael L. <mle...@us...> - 2008-06-13 04:12:04
|
Update of /cvsroot/rogueclone/rogue/doc In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv18163 Modified Files: changelog.txt Log Message: no message Index: changelog.txt =================================================================== RCS file: /cvsroot/rogueclone/rogue/doc/changelog.txt,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** changelog.txt 13 Jun 2008 00:09:04 -0000 1.1 --- changelog.txt 13 Jun 2008 04:12:01 -0000 1.2 *************** *** 9,12 **** --- 9,13 ---- Changelog --------- + 10:35 PM 2008-06-12 - fixed linker warning 8:03 PM 2008-06-12 - lots of casting to fix compiler warnings 1:11 AM 2008-06-11 - merged ansi-2-1-0 branch onto main trunk in cvs |
From: Michael L. <mle...@us...> - 2008-06-13 04:09:51
|
Update of /cvsroot/rogueclone/rogue/sys In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv17343 Modified Files: makefile.msc rogue.dsp Log Message: fixed linker warning: no objects used from oldnames.lib Index: rogue.dsp =================================================================== RCS file: /cvsroot/rogueclone/rogue/sys/rogue.dsp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** rogue.dsp 13 Jun 2008 00:12:54 -0000 1.2 --- rogue.dsp 13 Jun 2008 04:09:48 -0000 1.3 *************** *** 43,47 **** # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c ! # ADD CPP /nologo /W2 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c # ADD BASE RSC /l 0x1009 /d "NDEBUG" # ADD RSC /l 0x1009 /d "NDEBUG" --- 43,47 ---- # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c ! # ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c # ADD BASE RSC /l 0x1009 /d "NDEBUG" # ADD RSC /l 0x1009 /d "NDEBUG" *************** *** 51,55 **** LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 ! # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 !ELSEIF "$(CFG)" == "rogue - Win32 Debug" --- 51,55 ---- LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 ! # ADD LINK32 /nologo /machine:I386 /nodefaultlib:"oldnames" /warn:3 !ELSEIF "$(CFG)" == "rogue - Win32 Debug" *************** *** 67,71 **** # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c ! # ADD CPP /nologo /W2 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /FD /GZ /c # ADD BASE RSC /l 0x1009 /d "_DEBUG" # ADD RSC /l 0x1009 /d "_DEBUG" --- 67,71 ---- # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c ! # ADD CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /FD /GZ /c # ADD BASE RSC /l 0x1009 /d "_DEBUG" # ADD RSC /l 0x1009 /d "_DEBUG" *************** *** 75,79 **** LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept ! # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept !ENDIF --- 75,80 ---- LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept ! # ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /nodefaultlib:"oldnames" /pdbtype:sept /warn:3 ! # SUBTRACT LINK32 /pdb:none !ENDIF Index: makefile.msc =================================================================== RCS file: /cvsroot/rogueclone/rogue/sys/makefile.msc,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** makefile.msc 19 Feb 2004 02:12:10 -0000 1.4 --- makefile.msc 13 Jun 2008 04:09:48 -0000 1.5 *************** *** 1,6 **** # NMAKE Makefile for VC98 ! CFLAGS = /nologo /O2 /W2 #want /W4 ! LDFLAGS = /nologo /incremental:no /warn:3 LDLIBS = --- 1,6 ---- # NMAKE Makefile for VC98 ! CFLAGS = /nologo /O2 /W3 #want /W4 ! LDFLAGS = /nologo /incremental:no /warn:3 /nodefaultlib:oldnames LDLIBS = |
From: Michael L. <mle...@us...> - 2008-06-13 00:19:12
|
Update of /cvsroot/rogueclone/rogue/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv26188 Modified Files: curses.c init.c invent.c level.c machdep.c message.c monster.c move.c rogue.h room.c save.c score.c spec_hit.c trap.c use.c zap.c Log Message: typecasting, fixing compiler warnings Index: score.c =================================================================== RCS file: /cvsroot/rogueclone/rogue/src/score.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** score.c 11 Jun 2008 06:16:35 -0000 1.6 --- score.c 13 Jun 2008 00:19:06 -0000 1.7 *************** *** 324,328 **** scores[i][1] = (char) (i + '1'); } ! mvaddstr(i+10, 0, scores[i]); if (rank < 10) { xxxx(scores[i], 80); --- 324,328 ---- scores[i][1] = (char) (i + '1'); } ! mvaddstr((short)(i+10), 0, scores[i]); if (rank < 10) { xxxx(scores[i], 80); *************** *** 571,575 **** margin = (short) ((DCOLS - strlen(buf)) / 2); mvaddstr_in_color(row, margin, buf, ! (use_color) ? color : MAKE_COLOR(WHITE,BLACK)); } --- 571,575 ---- margin = (short) ((DCOLS - strlen(buf)) / 2); mvaddstr_in_color(row, margin, buf, ! (unsigned char) ((use_color) ? color : MAKE_COLOR(WHITE,BLACK))); } Index: use.c =================================================================== RCS file: /cvsroot/rogueclone/rogue/src/use.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** use.c 11 Jun 2008 06:16:35 -0000 1.6 --- use.c 13 Jun 2008 00:19:06 -0000 1.7 *************** *** 297,301 **** id_scrolls[obj->which_kind].id_status = IDENTIFIED; } ! vanish(obj, (obj->which_kind != SLEEP), &rogue.pack); } --- 297,301 ---- id_scrolls[obj->which_kind].id_status = IDENTIFIED; } ! vanish(obj, (short) (obj->which_kind != SLEEP), &rogue.pack); } Index: room.c =================================================================== RCS file: /cvsroot/rogueclone/rogue/src/room.c,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** room.c 11 Jun 2008 06:16:35 -0000 1.9 --- room.c 13 Jun 2008 00:19:06 -0000 1.10 *************** *** 204,209 **** for (i = ((row > MIN_ROW) ? -1 : 0); i <= i_end; i++) { for (j = ((col > 0) ? -1 : 0); j <= j_end; j++) { ! if (can_move(row, col, row+i, col+j)) { ! mvaddcch(row+i, col+j, get_dungeon_char(row+i, col+j)); } } --- 204,210 ---- for (i = ((row > MIN_ROW) ? -1 : 0); i <= i_end; i++) { for (j = ((col > 0) ? -1 : 0); j <= j_end; j++) { ! if (can_move(row, col, (short) (row+i), (short) (col+j))) { ! mvaddcch((short) (row+i), (short) (col+j), ! get_dungeon_char((short) (row+i), (short) (col+j))); } } *************** *** 773,779 **** } else if ((ch == '\010') && (j > 0)) { buf[--j] = '\0'; ! move(i, j + (short) strlen(options[i].prompt)); addch(' '); ! move(i, j + (short) strlen(options[i].prompt)); } refresh(); --- 774,780 ---- } else if ((ch == '\010') && (j > 0)) { buf[--j] = '\0'; ! move(i, (short) (j + strlen(options[i].prompt))); addch(' '); ! move(i, (short) (j + strlen(options[i].prompt))); } refresh(); *************** *** 833,838 **** mvaddstr_in_color(i, 0, opt->prompt, ! use_color ? MAKE_COLOR(CYAN, BLACK) : ! MAKE_COLOR(WHITE,BLACK)); clrtoeol(); } --- 834,839 ---- mvaddstr_in_color(i, 0, opt->prompt, ! (unsigned char) (use_color ? MAKE_COLOR(CYAN, BLACK) : ! MAKE_COLOR(WHITE,BLACK))); clrtoeol(); } Index: spec_hit.c =================================================================== RCS file: /cvsroot/rogueclone/rogue/src/spec_hit.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** spec_hit.c 11 Jun 2008 06:16:35 -0000 1.5 --- spec_hit.c 13 Jun 2008 00:19:06 -0000 1.6 *************** *** 268,283 **** for (n = 0; n <= 5; n++) { for (i = -n; i <= n; i++) { ! if (try_to_cough(row+n, col+i, obj)) { return; } ! if (try_to_cough(row-n, col+i, obj)) { return; } } for (i = -n; i <= n; i++) { ! if (try_to_cough(row+i, col-n, obj)) { return; } ! if (try_to_cough(row+i, col+n, obj)) { return; } --- 268,283 ---- for (n = 0; n <= 5; n++) { for (i = -n; i <= n; i++) { ! if (try_to_cough((short)(row+n), (short)(col+i), obj)) { return; } ! if (try_to_cough((short)(row-n), (short)(col+i), obj)) { return; } } for (i = -n; i <= n; i++) { ! if (try_to_cough((short)(row+i), (short)(col-n), obj)) { return; } ! if (try_to_cough((short)(row+i), (short)(col+n), obj)) { return; } Index: message.c =================================================================== RCS file: /cvsroot/rogueclone/rogue/src/message.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** message.c 11 Jun 2008 06:16:35 -0000 1.5 --- message.c 13 Jun 2008 00:19:06 -0000 1.6 *************** *** 96,100 **** --- 96,105 ---- if (did_int) { did_int = 0; + #ifdef _MSC_VER + onintr(0); + #else onintr(); + #endif + } } *************** *** 146,153 **** if (insert[0]) { ! mvaddstr(0, n + 1, insert); (void) strcpy(buf, insert); i = (short) strlen(insert); ! move(0, (n + i + 1)); refresh(); } --- 151,158 ---- if (insert[0]) { ! mvaddstr(0, (short) (n + 1), insert); (void) strcpy(buf, insert); i = (short) strlen(insert); ! move(0, (short) (n + i + 1)); refresh(); } *************** *** 164,169 **** if ((ch == '\b') && (i > 0)) { if (do_echo) { ! mvaddch(0, i + n, ' '); ! move(MIN_ROW-1, i+n); } i--; --- 169,174 ---- if ((ch == '\b') && (i > 0)) { if (do_echo) { ! mvaddch(0, (short) (i + n), ' '); ! move((short) (MIN_ROW-1), (short) (i+n)); } i--; Index: monster.c =================================================================== RCS file: /cvsroot/rogueclone/rogue/src/monster.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** monster.c 11 Jun 2008 06:16:35 -0000 1.4 --- monster.c 13 Jun 2008 00:19:06 -0000 1.5 *************** *** 184,188 **** } ! monster = level_monsters.next_monster, *test_mons; /* Comma seperates statements but what does '*test_mons;" do? */ while (monster) { --- 184,188 ---- } ! monster = level_monsters.next_monster; while (monster) { *************** *** 402,406 **** switch(n) { case 0: ! if (!tried[n] && mtry(monster, row, monster->col-1)) { goto O; } --- 402,406 ---- switch(n) { case 0: ! if (!tried[n] && mtry(monster, row, (short) (monster->col-1))) { goto O; } *************** *** 412,421 **** break; case 2: ! if (!tried[n] && mtry(monster, row, monster->col+1)) { goto O; } break; case 3: ! if (!tried[n] && mtry(monster, monster->row-1, col)) { goto O; } --- 412,421 ---- break; case 2: ! if (!tried[n] && mtry(monster, row, (short) (monster->col+1))) { goto O; } break; case 3: ! if (!tried[n] && mtry(monster, (short) (monster->row-1), col)) { goto O; } *************** *** 427,431 **** break; case 5: ! if (!tried[n] && mtry(monster, monster->row+1, col)) { goto O; } --- 427,431 ---- break; case 5: ! if (!tried[n] && mtry(monster, (short) (monster->row+1), col)) { goto O; } *************** *** 508,512 **** } if (dungeon[row][col] & DOOR) { ! dr_course(monster, ((dungeon[mrow][mcol] & TUNNEL) ? 1 : 0), row, col); } else { --- 508,513 ---- } if (dungeon[row][col] & DOOR) { ! dr_course(monster, ! (unsigned char) ((dungeon[mrow][mcol] & TUNNEL) ? 1 : 0), row, col); } else { Index: level.c =================================================================== RCS file: /cvsroot/rogueclone/rogue/src/level.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** level.c 11 Jun 2008 06:16:35 -0000 1.4 --- level.c 13 Jun 2008 00:19:06 -0000 1.5 *************** *** 172,183 **** if (i < (MAXROOMS-1)) { ! (void) connect_rooms(i, i+1); } if (i < (MAXROOMS-3)) { ! (void) connect_rooms(i, i+3); } if (i < (MAXROOMS-2)) { if (rooms[i+1].is_room & R_NOTHING) { ! if (connect_rooms(i, i+2)) { rooms[i+1].is_room = R_CROSS; } --- 172,183 ---- if (i < (MAXROOMS-1)) { ! (void) connect_rooms(i, (short) (i+1)); } if (i < (MAXROOMS-3)) { ! (void) connect_rooms(i, (short) (i+3)); } if (i < (MAXROOMS-2)) { if (rooms[i+1].is_room & R_NOTHING) { ! if (connect_rooms(i, (short) (i+2))) { rooms[i+1].is_room = R_CROSS; } *************** *** 186,190 **** if (i < (MAXROOMS-6)) { if (rooms[i+3].is_room & R_NOTHING) { ! if (connect_rooms(i, i+6)) { rooms[i+3].is_room = R_CROSS; } --- 186,190 ---- if (i < (MAXROOMS-6)) { if (rooms[i+3].is_room & R_NOTHING) { ! if (connect_rooms(i, (short) (i+6))) { rooms[i+3].is_room = R_CROSS; } *************** *** 677,681 **** (dungeon[r-1][c+1] != TUNNEL) && (dungeon[r-2][c] != TUNNEL)) { ! make_maze((r-1), c, tr, br, lc, rc); } break; --- 677,681 ---- (dungeon[r-1][c+1] != TUNNEL) && (dungeon[r-2][c] != TUNNEL)) { ! make_maze((short) (r-1), c, tr, br, lc, rc); } break; *************** *** 686,690 **** (dungeon[r+1][c+1] != TUNNEL) && (dungeon[r+2][c] != TUNNEL)) { ! make_maze((r+1), c, tr, br, lc, rc); } break; --- 686,690 ---- (dungeon[r+1][c+1] != TUNNEL) && (dungeon[r+2][c] != TUNNEL)) { ! make_maze((short) (r+1), c, tr, br, lc, rc); } break; *************** *** 695,699 **** (dungeon[r+1][c-1] != TUNNEL) && (dungeon[r][c-2] != TUNNEL)) { ! make_maze(r, (c-1), tr, br, lc, rc); } break; --- 695,699 ---- (dungeon[r+1][c-1] != TUNNEL) && (dungeon[r][c-2] != TUNNEL)) { ! make_maze(r, (short) (c-1), tr, br, lc, rc); } break; *************** *** 704,708 **** (dungeon[r+1][c+1] != TUNNEL) && (dungeon[r][c+2] != TUNNEL)) { ! make_maze(r, (c+1), tr, br, lc, rc); } break; --- 704,708 ---- (dungeon[r+1][c+1] != TUNNEL) && (dungeon[r][c+2] != TUNNEL)) { ! make_maze(r, (short) (c+1), tr, br, lc, rc); } break; Index: rogue.h =================================================================== RCS file: /cvsroot/rogueclone/rogue/src/rogue.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** rogue.h 11 Jun 2008 06:16:35 -0000 1.7 --- rogue.h 13 Jun 2008 00:19:06 -0000 1.8 *************** *** 624,631 **** void start_window(void); void stop_window(void); - void byebye(void); - void onintr(void); void error_save(void); void strip(char *s, const boolean add_blank); --- 624,636 ---- void start_window(void); void stop_window(void); void error_save(void); void strip(char *s, const boolean add_blank); + #ifdef _MSC_VER + void onintr(int foo); + void byebye(int foo); + #else + void onintr(void); + void byebye(void); + #endif Index: move.c =================================================================== RCS file: /cvsroot/rogueclone/rogue/src/move.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** move.c 11 Jun 2008 06:16:35 -0000 1.5 --- move.c 13 Jun 2008 00:19:06 -0000 1.6 *************** *** 195,199 **** row = rogue.row; col = rogue.col; ! if (((m = one_move_rogue((dirch + 96), 1)) == MOVE_FAILED) || (m == STOPPED_ON_SOMETHING) || interrupted) { --- 195,199 ---- row = rogue.row; col = rogue.col; ! if (((m = one_move_rogue((short) (dirch + 96), 1)) == MOVE_FAILED) || (m == STOPPED_ON_SOMETHING) || interrupted) { *************** *** 203,207 **** if ( (!interrupted) && passgo && (m == MOVE_FAILED) && (dungeon[rogue.row][rogue.col] & TUNNEL)) { ! turn_passage(dirch + 96, 0); } break; --- 203,207 ---- if ( (!interrupted) && passgo && (m == MOVE_FAILED) && (dungeon[rogue.row][rogue.col] & TUNNEL)) { ! turn_passage((short) (dirch + 96), 0); } break; *************** *** 214,222 **** case 'U': case 'N': ! while ((!interrupted) && (one_move_rogue((dirch + 32), 1) == MOVED)) ; if ( (!interrupted) && passgo && (dungeon[rogue.row][rogue.col] & TUNNEL)) { ! turn_passage(dirch + 32, 1); } break; --- 214,222 ---- case 'U': case 'N': ! while ((!interrupted) && (one_move_rogue((short) (dirch + 32), 1) == MOVED)) ; if ( (!interrupted) && passgo && (dungeon[rogue.row][rogue.col] & TUNNEL)) { ! turn_passage((short) (dirch + 32), 1); } break; *************** *** 650,671 **** short ndir = 0; /* fix compiler warning */ ! if ((dir != 'h') && can_turn(crow, ccol + 1)) { turns++; ndir = 'l'; } ! if ((dir != 'l') && can_turn(crow, ccol - 1)) { turns++; ndir = 'h'; } ! if ((dir != 'k') && can_turn(crow + 1, ccol)) { turns++; ndir = 'j'; } ! if ((dir != 'j') && can_turn(crow - 1, ccol)) { turns++; ndir = 'k'; } if (turns == 1) { ! multiple_move_rogue(ndir - (fast ? 32 : 96)); } } --- 650,671 ---- short ndir = 0; /* fix compiler warning */ ! if ((dir != 'h') && can_turn(crow, (short) (ccol + 1))) { turns++; ndir = 'l'; } ! if ((dir != 'l') && can_turn(crow, (short) (ccol - 1))) { turns++; ndir = 'h'; } ! if ((dir != 'k') && can_turn((short) (crow + 1), ccol)) { turns++; ndir = 'j'; } ! if ((dir != 'j') && can_turn((short) (crow - 1), ccol)) { turns++; ndir = 'k'; } if (turns == 1) { ! multiple_move_rogue((short) (ndir - (fast ? 32 : 96))); } } Index: zap.c =================================================================== RCS file: /cvsroot/rogueclone/rogue/src/zap.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** zap.c 11 Jun 2008 06:16:35 -0000 1.6 --- zap.c 13 Jun 2008 00:19:06 -0000 1.7 *************** *** 446,450 **** clear_wand_effect(orow, ocol, row, col, dir); rogue_damage(damage, (object *) 0, ! ((ball == FIRE) ? KFIRE : HYPOTHERMIA)); } } else { --- 446,450 ---- clear_wand_effect(orow, ocol, row, col, dir); rogue_damage(damage, (object *) 0, ! (short) ((ball == FIRE) ? KFIRE : HYPOTHERMIA)); } } else { Index: init.c =================================================================== RCS file: /cvsroot/rogueclone/rogue/src/init.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** init.c 11 Jun 2008 06:16:35 -0000 1.6 --- init.c 13 Jun 2008 00:19:06 -0000 1.7 *************** *** 248,252 **** --- 248,257 ---- + + #ifdef _MSC_VER + void byebye(int foo) + #else void byebye(void) + #endif { md_ignore_signals(); *************** *** 260,264 **** --- 265,273 ---- + #ifdef _MSC_VER + void onintr(int foo) + #else void onintr(void) + #endif { md_ignore_signals(); Index: trap.c =================================================================== RCS file: /cvsroot/rogueclone/rogue/src/trap.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** trap.c 11 Jun 2008 06:16:35 -0000 1.4 --- trap.c 13 Jun 2008 00:19:06 -0000 1.5 *************** *** 273,280 **** } - /* This if (a && b) expression with assignment for second operand 'b' may - rely on strict right to left evaluation and may not work on all compilers - because the 'b' expression may or may not be evaluated if 'a' is false */ - if ((!is_auto) && (reg_search = !reg_search)) { (void) reg_move(); --- 273,276 ---- Index: machdep.c =================================================================== RCS file: /cvsroot/rogueclone/rogue/src/machdep.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** machdep.c 11 Jun 2008 06:16:35 -0000 1.5 --- machdep.c 13 Jun 2008 00:19:06 -0000 1.6 *************** *** 334,340 **** */ ! void md_sleep(int nsecs) { - nsecs = nsecs; /* make compiler happy */ #if 0 clock_t alarm = clock() + nsecs*CLK_TCK; --- 334,339 ---- */ ! void md_sleep(const int nsecs) { #if 0 clock_t alarm = clock() + nsecs*CLK_TCK; Index: invent.c =================================================================== RCS file: /cvsroot/rogueclone/rogue/src/invent.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** invent.c 11 Jun 2008 06:16:35 -0000 1.7 --- invent.c 13 Jun 2008 00:19:06 -0000 1.8 *************** *** 356,360 **** } } ! mvaddstr(rows - 1, 0, need_two_screens ? more : press_space); refresh(); wait_for_ack(); --- 356,360 ---- } } ! mvaddstr((short) (rows - 1), 0, need_two_screens ? more : press_space); refresh(); wait_for_ack(); Index: curses.c =================================================================== RCS file: /cvsroot/rogueclone/rogue/src/curses.c,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** curses.c 11 Jun 2008 06:16:35 -0000 1.10 --- curses.c 13 Jun 2008 00:19:06 -0000 1.11 *************** *** 686,691 **** COORD coord; ! coord.X = (SHORT) col; ! coord.Y = (SHORT) row; SetConsoleCursorPosition(hStdOut, coord); --- 686,691 ---- COORD coord; ! coord.X = (short) col; ! coord.Y = (short) row; SetConsoleCursorPosition(hStdOut, coord); Index: save.c =================================================================== RCS file: /cvsroot/rogueclone/rogue/src/save.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** save.c 11 Jun 2008 06:16:35 -0000 1.6 --- save.c 13 Jun 2008 00:19:06 -0000 1.7 *************** *** 302,306 **** } else if (new_obj->in_use_flags & (ON_EITHER_HAND)) { do_put_on(new_obj, ! ((new_obj->in_use_flags & ON_LEFT_HAND) ? 1 : 0)); } } --- 302,306 ---- } else if (new_obj->in_use_flags & (ON_EITHER_HAND)) { do_put_on(new_obj, ! (unsigned char) ((new_obj->in_use_flags & ON_LEFT_HAND) ? 1 : 0)); } } |
From: Michael L. <mle...@us...> - 2008-06-13 00:13:08
|
Update of /cvsroot/rogueclone/rogue/sys In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv23899 Modified Files: rogue.dsp Log Message: generate browser files Index: rogue.dsp =================================================================== RCS file: /cvsroot/rogueclone/rogue/sys/rogue.dsp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** rogue.dsp 11 Jun 2008 06:17:43 -0000 1.1 --- rogue.dsp 13 Jun 2008 00:12:54 -0000 1.2 *************** *** 67,71 **** # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c ! # ADD CPP /nologo /W2 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c # ADD BASE RSC /l 0x1009 /d "_DEBUG" # ADD RSC /l 0x1009 /d "_DEBUG" --- 67,71 ---- # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c ! # ADD CPP /nologo /W2 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /FD /GZ /c # ADD BASE RSC /l 0x1009 /d "_DEBUG" # ADD RSC /l 0x1009 /d "_DEBUG" |
From: Michael L. <mle...@us...> - 2008-06-13 00:11:01
|
Update of /cvsroot/rogueclone/rogue/doc In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv23094 Modified Files: compile.txt readme.txt Log Message: updating web links Index: compile.txt =================================================================== RCS file: /cvsroot/rogueclone/rogue/doc/compile.txt,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** compile.txt 22 Feb 2004 04:08:03 -0000 1.1 --- compile.txt 13 Jun 2008 00:10:58 -0000 1.2 *************** *** 28,35 **** 2) cd to the top directory and run nmake ! That's it. If everything went as it should have your executable will be in the newly created exe directory. If you experience any problems email the rogueclone-devel mailing list at rog...@li... and ask for help. You can view the list ! archives at http://sourceforge.net/mailarchive/forum.php?forum_id=37360 --- 28,35 ---- 2) cd to the top directory and run nmake ! That's it. If everything went as it should, your executable will be in the newly created exe directory. If you experience any problems email the rogueclone-devel mailing list at rog...@li... and ask for help. You can view the list ! archives at http://sourceforge.net/mailarchive/forum.php?forum_name=rogueclone-devel Index: readme.txt =================================================================== RCS file: /cvsroot/rogueclone/rogue/doc/readme.txt,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** readme.txt 22 Feb 2004 04:08:03 -0000 1.1 --- readme.txt 13 Jun 2008 00:10:58 -0000 1.2 *************** *** 12,16 **** To get the latest version of Rogue Clone IV, visit ! http://rogueclone.sourceforge.net on the web. At our web site you will find news about current and upcoming releases, information about the Rogue Clone IV mailing lists, forms for submitting patches and bug reports, nightly development --- 12,16 ---- To get the latest version of Rogue Clone IV, visit ! http://rogueclone.sourceforge.net on the web. At the web site you will find news about current and upcoming releases, information about the Rogue Clone IV mailing lists, forms for submitting patches and bug reports, nightly development |
From: Michael L. <mle...@us...> - 2008-06-13 00:09:10
|
Update of /cvsroot/rogueclone/rogue/doc In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv22296 Added Files: changelog.txt Log Message: new changelog file --- NEW FILE: changelog.txt --- To Do ----- 1:18 AM 2008-06-11 - fix compiler warnings 9:11 PM 2008-06-10 - apply patches 9:13 PM 2008-06-10 - fix bugs 9:11 PM 2008-06-10 - get linux port working 9:17 PM 2008-06-11 - silent option Changelog --------- 8:03 PM 2008-06-12 - lots of casting to fix compiler warnings 1:11 AM 2008-06-11 - merged ansi-2-1-0 branch onto main trunk in cvs 10:55 PM 2008-06-10 - created visual studio 6.0 project & workspace files 10:55 PM 2008-06-10 - created changelog file |
From: Michael L. <mle...@us...> - 2008-06-11 06:17:46
|
Update of /cvsroot/rogueclone/rogue/sys In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv14316 Added Files: rogue.dsp rogue.dsw Log Message: Visual Studio 6.0 project and workspace --- NEW FILE: rogue.dsp --- # Microsoft Developer Studio Project File - Name="rogue" - Package Owner=<4> # Microsoft Developer Studio Generated Build File, Format Version 6.00 # ** DO NOT EDIT ** # TARGTYPE "Win32 (x86) Console Application" 0x0103 CFG=rogue - Win32 Debug !MESSAGE This is not a valid makefile. To build this project using NMAKE, !MESSAGE use the Export Makefile command and run !MESSAGE !MESSAGE NMAKE /f "rogue.mak". !MESSAGE !MESSAGE You can specify a configuration when running NMAKE !MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE !MESSAGE NMAKE /f "rogue.mak" CFG="rogue - Win32 Debug" !MESSAGE !MESSAGE Possible choices for configuration are: !MESSAGE !MESSAGE "rogue - Win32 Release" (based on "Win32 (x86) Console Application") !MESSAGE "rogue - Win32 Debug" (based on "Win32 (x86) Console Application") !MESSAGE # Begin Project # PROP AllowPerConfigDependencies 0 # PROP Scc_ProjName "" # PROP Scc_LocalPath "" CPP=cl.exe RSC=rc.exe !IF "$(CFG)" == "rogue - Win32 Release" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 0 # PROP BASE Output_Dir "Release" # PROP BASE Intermediate_Dir "Release" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 0 # PROP Output_Dir "Release" # PROP Intermediate_Dir "Release" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c # ADD CPP /nologo /W2 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c # ADD BASE RSC /l 0x1009 /d "NDEBUG" # ADD RSC /l 0x1009 /d "NDEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 !ELSEIF "$(CFG)" == "rogue - Win32 Debug" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 1 # PROP BASE Output_Dir "Debug" # PROP BASE Intermediate_Dir "Debug" # PROP BASE Target_Dir "" # PROP Use_MFC 0 # PROP Use_Debug_Libraries 1 # PROP Output_Dir "Debug" # PROP Intermediate_Dir "Debug" # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c # ADD CPP /nologo /W2 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FD /GZ /c # ADD BASE RSC /l 0x1009 /d "_DEBUG" # ADD RSC /l 0x1009 /d "_DEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept !ENDIF # Begin Target # Name "rogue - Win32 Release" # Name "rogue - Win32 Debug" # Begin Group "Source Files" # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" # Begin Source File SOURCE=..\src\curses.c # End Source File # Begin Source File SOURCE=..\src\hit.c # End Source File # Begin Source File SOURCE=..\src\init.c # End Source File # Begin Source File SOURCE=..\src\invent.c # End Source File # Begin Source File SOURCE=..\src\level.c # End Source File # Begin Source File SOURCE=..\src\machdep.c # End Source File # Begin Source File SOURCE=..\src\main.c # End Source File # Begin Source File SOURCE=..\src\message.c # End Source File # Begin Source File SOURCE=..\src\monster.c # End Source File # Begin Source File SOURCE=..\src\move.c # End Source File # Begin Source File SOURCE=..\src\object.c # End Source File # Begin Source File SOURCE=..\src\pack.c # End Source File # Begin Source File SOURCE=..\src\play.c # End Source File # Begin Source File SOURCE=..\src\random.c # End Source File # Begin Source File SOURCE=..\src\ring.c # End Source File # Begin Source File SOURCE=..\src\room.c # End Source File # Begin Source File SOURCE=..\src\save.c # End Source File # Begin Source File SOURCE=..\src\score.c # End Source File # Begin Source File SOURCE=..\src\spec_hit.c # End Source File # Begin Source File SOURCE=..\src\throw.c # End Source File # Begin Source File SOURCE=..\src\trap.c # End Source File # Begin Source File SOURCE=..\src\use.c # End Source File # Begin Source File SOURCE=..\src\zap.c # End Source File # End Group # Begin Group "Header Files" # PROP Default_Filter "h;hpp;hxx;hm;inl" # Begin Source File SOURCE=..\src\paths.h # End Source File # Begin Source File SOURCE=..\src\rogue.h # End Source File # Begin Source File SOURCE=..\src\version.h # End Source File # End Group # Begin Group "Resource Files" # PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" # End Group # End Target # End Project --- NEW FILE: rogue.dsw --- Microsoft Developer Studio Workspace File, Format Version 6.00 # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! ############################################################################### Project: "rogue"=".\rogue.dsp" - Package Owner=<4> Package=<5> {{{ }}} Package=<4> {{{ }}} ############################################################################### Global: Package=<5> {{{ }}} Package=<3> {{{ }}} ############################################################################### |
From: Michael L. <mle...@us...> - 2008-06-11 06:16:41
|
Update of /cvsroot/rogueclone/rogue/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv13877 Modified Files: curses.c invent.c move.c object.c rogue.h use.c zap.c hit.c init.c level.c machdep.c main.c message.c monster.c pack.c play.c random.c ring.c room.c save.c score.c spec_hit.c throw.c trap.c Log Message: merged in ansi-2-1-0 branch (Steve's ansification patches) Index: message.c =================================================================== RCS file: /cvsroot/rogueclone/rogue/src/message.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** message.c 14 Feb 2004 13:42:31 -0000 1.4 --- message.c 11 Jun 2008 06:16:35 -0000 1.5 *************** *** 60,66 **** extern short cur_level; ! message(msg, intrpt) ! char *msg; ! boolean intrpt; { cant_int = 1; --- 60,68 ---- extern short cur_level; ! ! static void pad(const char *s, const short n); /*only used in this file*/ ! ! ! void message(char *msg, const boolean intrpt) { cant_int = 1; *************** *** 88,92 **** refresh(); msg_cleared = 0; ! msg_col = strlen(msg); cant_int = 0; --- 90,94 ---- refresh(); msg_cleared = 0; ! msg_col = (short) strlen(msg); cant_int = 0; *************** *** 98,103 **** } ! remessage(c) ! short c; { if (imsg != -1) { --- 100,104 ---- } ! void remessage(short c) { if (imsg != -1) { *************** *** 114,118 **** } ! check_message() { if (msg_cleared) { --- 115,119 ---- } ! void check_message(void) { if (msg_cleared) { *************** *** 125,128 **** --- 126,134 ---- } + /*OLD_CODE - note - arguments (prompt, insert, buf) are in a different order + in the argument list than in the argument type declaration below. Can this be + an issue on some compilers? The three calling files (object.c, pack.c and + zap.c) all use 'buf' as the third argument. + get_input_line(prompt, insert, buf, if_cancelled, add_blank, do_echo) char *prompt, *buf, *insert; *************** *** 130,133 **** --- 136,141 ---- boolean add_blank; boolean do_echo; + */ + short get_input_line(char *prompt, char *insert, char *buf, char *if_cancelled, const boolean add_blank, const boolean do_echo) { short ch; *************** *** 135,144 **** message(prompt, 0); ! n = strlen(prompt); if (insert[0]) { mvaddstr(0, n + 1, insert); (void) strcpy(buf, insert); ! i = strlen(insert); move(0, (n + i + 1)); refresh(); --- 143,152 ---- message(prompt, 0); ! n = (short) strlen(prompt); if (insert[0]) { mvaddstr(0, n + 1, insert); (void) strcpy(buf, insert); ! i = (short) strlen(insert); move(0, (n + i + 1)); refresh(); *************** *** 148,152 **** if ((ch >= ' ') && (ch <= '~') && (i < MAX_TITLE_LENGTH-2)) { if ((ch != ' ') || (i > 0)) { ! buf[i++] = ch; if (do_echo) { addch(ch); --- 156,160 ---- if ((ch >= ' ') && (ch <= '~') && (i < MAX_TITLE_LENGTH-2)) { if ((ch != ' ') || (i > 0)) { ! buf[i++] = (char) ch; if (do_echo) { addch(ch); *************** *** 188,197 **** */ ! print_stats(stat_mask) ! register stat_mask; { char buf[16]; boolean label; ! int row = DROWS - 1; byte color; --- 196,204 ---- */ ! void print_stats(const int stat_mask) { char buf[16]; boolean label; ! short row = DROWS - 1; byte color; *************** *** 276,286 **** } ! pad(s, n) ! char *s; ! short n; { short i; ! for (i = strlen(s); i < n; i++) { addch(' '); } --- 283,291 ---- } ! static void pad(const char *s, const short n) /*only used in this file*/ { short i; ! for (i = (short) strlen(s); i < n; i++) { addch(' '); } *************** *** 290,294 **** /* NS: We convert to ASCII characters before saving, if necessary. */ ! save_screen() { FILE *fp; --- 295,299 ---- /* NS: We convert to ASCII characters before saving, if necessary. */ ! void save_screen(void) { FILE *fp; *************** *** 308,312 **** found_non_blank = 0; for (j = (DCOLS - 1); j >= 0; j--) { ! buf[j] = mvinch(i, j); if (!found_non_blank) { if ((buf[j] != ' ') || (j == 0)) { --- 313,317 ---- found_non_blank = 0; for (j = (DCOLS - 1); j >= 0; j--) { ! buf[j] = (char) mvinch(i, j); if (!found_non_blank) { if ((buf[j] != ' ') || (j == 0)) { *************** *** 330,334 **** } ! sound_bell() { putchar(7); --- 335,339 ---- } ! void sound_bell(void) { putchar(7); *************** *** 336,355 **** } ! boolean ! is_digit(ch) ! short ch; { ! return((ch >= '0') && (ch <= '9')); } ! r_index(str, ch, last) ! char *str; ! int ch; ! boolean last; { int i = 0; if (last) { ! for (i = strlen(str) - 1; i >= 0; i--) { if (str[i] == ch) { return(i); --- 341,361 ---- } ! boolean is_digit(const short ch) { ! /* return((ch >= '0') && (ch <= '9')); fix compiler warning */ ! ! if ((ch >= '0') && (ch <= '9')) ! return(1); ! ! return(0); } ! ! int r_index(const char *str, const int ch, const boolean last) { int i = 0; if (last) { ! for (i = (int) (strlen(str) - 1); i >= 0; i--) { if (str[i] == ch) { return(i); Index: use.c =================================================================== RCS file: /cvsroot/rogueclone/rogue/src/use.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** use.c 2 Apr 2005 13:41:17 -0000 1.5 --- use.c 11 Jun 2008 06:16:35 -0000 1.6 *************** *** 67,71 **** extern boolean use_color; ! quaff() { short ch; --- 67,80 ---- extern boolean use_color; ! ! static void potion_heal(const int extra); /*used only within this file*/ ! static void idntfy(void); /*only used within this file*/ ! static void hold_monster(void); /*only used within this file*/ ! static void go_blind(void); /*only used within this file*/ ! static char * get_ench_color(void); /*only used within this file*/ ! static void uncurse_all(void); /*only used within this file*/ ! ! ! void quaff(void) { short ch; *************** *** 109,113 **** case POISON: if (!sustain_strength) { ! rogue.str_current -= get_rand(1, 3); if (rogue.str_current < 1) { rogue.str_current = 1; --- 118,122 ---- case POISON: if (!sustain_strength) { ! rogue.str_current -= (short) get_rand(1, 3); if (rogue.str_current < 1) { rogue.str_current = 1; *************** *** 129,133 **** case HALLUCINATION: message("oh wow, everything seems so cosmic", 0); ! halluc += get_rand(500, 800); break; case DETECT_MONSTER: --- 138,142 ---- case HALLUCINATION: message("oh wow, everything seems so cosmic", 0); ! halluc += (short) get_rand(500, 800); break; case DETECT_MONSTER: *************** *** 153,162 **** case LEVITATION: message("you start to float in the air", 0); ! levitate += get_rand(15, 30); ! being_held = bear_trap = 0; break; case HASTE_SELF: message("you feel yourself moving much faster", 0); ! haste_self += get_rand(11, 21); if (!(haste_self % 2)) { haste_self++; --- 162,173 ---- case LEVITATION: message("you start to float in the air", 0); ! levitate += (short) get_rand(15, 30); ! /* being_held = bear_trap = 0; fix compiler type conversion warning */ ! being_held = 0; ! bear_trap = 0; break; case HASTE_SELF: message("you feel yourself moving much faster", 0); ! haste_self += (short) get_rand(11, 21); if (!(haste_self % 2)) { haste_self++; *************** *** 180,184 **** } ! read_scroll() { short ch; --- 191,196 ---- } ! ! void read_scroll(void) { short ch; *************** *** 292,299 **** */ ! vanish(obj, rm, pack) ! object *obj; ! short rm; ! object *pack; { if (obj->quantity > 1) { --- 304,308 ---- */ ! void vanish(object *obj, const short rm, object *pack) { if (obj->quantity > 1) { *************** *** 315,319 **** --- 324,332 ---- } + /* OLD_CODE - extra is implicitly defined and only called with hard coded 0 or 1 potion_heal(extra) + */ + + static void potion_heal(const int extra) /*used only within this file*/ { float ratio; *************** *** 360,364 **** } ! idntfy() { short ch; --- 373,378 ---- } ! ! static void idntfy(void) /*only used within this file*/ { short ch; *************** *** 387,391 **** } ! eat() { short ch; --- 401,406 ---- } ! ! void eat(void) { short ch; *************** *** 408,412 **** } if ((obj->which_kind == FRUIT) || rand_percent(60)) { ! moves = get_rand(950, 1150); if (obj->which_kind == RATION) { message("yum, that tasted good", 0); --- 423,427 ---- } if ((obj->which_kind == FRUIT) || rand_percent(60)) { ! moves = (short) get_rand(950, 1150); if (obj->which_kind == RATION) { message("yum, that tasted good", 0); *************** *** 416,420 **** } } else { ! moves = get_rand(750, 950); message("yuk, that food tasted awful", 0); add_exp(2, 1); --- 431,435 ---- } } else { ! moves = (short) get_rand(750, 950); message("yuk, that food tasted awful", 0); add_exp(2, 1); *************** *** 428,432 **** } ! hold_monster() { short i, j; --- 443,448 ---- } ! ! static void hold_monster(void) /*only used within this file*/ { short i, j; *************** *** 460,464 **** } ! tele() { mvaddcch(rogue.row, rogue.col, get_dungeon_char(rogue.row, rogue.col)); --- 476,481 ---- } ! ! void tele(void) { mvaddcch(rogue.row, rogue.col, get_dungeon_char(rogue.row, rogue.col)); *************** *** 472,476 **** } ! hallucinate() { object *obj, *monster; --- 489,494 ---- } ! ! void hallucinate(void) { object *obj, *monster; *************** *** 497,501 **** obj = level_objects.next_object; while (obj) { ! ch = mvinch(obj->row, obj->col); if (((ch < 'A') || (ch > 'Z')) && ((obj->row != rogue.row) || (obj->col != rogue.col))) --- 515,519 ---- obj = level_objects.next_object; while (obj) { ! ch = (short) mvinch(obj->row, obj->col); if (((ch < 'A') || (ch > 'Z')) && ((obj->row != rogue.row) || (obj->col != rogue.col))) *************** *** 513,517 **** while (monster) { ! ch = mvinch(monster->row, monster->col); if ((ch >= 'A') && (ch <= 'Z')) { addch(get_rand('A', 'Z')); --- 531,535 ---- while (monster) { ! ch = (short) mvinch(monster->row, monster->col); if ((ch >= 'A') && (ch <= 'Z')) { addch(get_rand('A', 'Z')); *************** *** 521,525 **** } ! unhallucinate() { halluc = 0; --- 539,544 ---- } ! ! void unhallucinate(void) { halluc = 0; *************** *** 528,532 **** } ! unblind() { blind = 0; --- 547,552 ---- } ! ! void unblind(void) { blind = 0; *************** *** 541,545 **** } ! relight() { if (cur_room == PASSAGE) { --- 561,566 ---- } ! ! void relight(void) { if (cur_room == PASSAGE) { *************** *** 551,559 **** } ! take_a_nap() { short i; ! i = get_rand(2, 5); md_sleep(1); --- 572,581 ---- } ! ! void take_a_nap(void) { short i; ! i = (short) get_rand(2, 5); md_sleep(1); *************** *** 565,569 **** } ! go_blind() { short i, j; --- 587,592 ---- } ! ! static void go_blind(void) /*only used within this file*/ { short i, j; *************** *** 572,576 **** message("a cloak of darkness falls around you", 0); } ! blind += get_rand(500, 800); if (detect_monster) { --- 595,599 ---- message("a cloak of darkness falls around you", 0); } ! blind += (short) get_rand(500, 800); if (detect_monster) { *************** *** 596,601 **** } ! char * ! get_ench_color() { if (halluc) { --- 619,624 ---- } ! ! static char * get_ench_color(void) /*only used within this file*/ { if (halluc) { *************** *** 607,616 **** } ! cnfs() { ! confused += get_rand(12, 22); } ! unconfuse() { char msg[80]; --- 630,641 ---- } ! ! void cnfs(void) { ! confused += (short) get_rand(12, 22); } ! ! void unconfuse(void) { char msg[80]; *************** *** 621,625 **** } ! uncurse_all() { object *obj; --- 646,651 ---- } ! ! static void uncurse_all(void) /*only used within this file*/ { object *obj; Index: curses.c =================================================================== RCS file: /cvsroot/rogueclone/rogue/src/curses.c,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** curses.c 2 Apr 2005 13:41:17 -0000 1.9 --- curses.c 11 Jun 2008 06:16:35 -0000 1.10 *************** *** 134,144 **** /* ================= PRIVATE PROTOTYPES ================= */ ! static clear_buffers(); ! static cls(); ! /* static put_char_at(register int row, register int col, char ch); */ ! static put_color_char_at(register int row, register int col, COLORBUF cb); ! static put_cursor(register int row, register int col); ! static char translate_keypad(int scancode); ! static wrefresh(WINDOW *scr); /* ================== PUBLIC FUNCTIONS ================== */ --- 134,147 ---- /* ================= PRIVATE PROTOTYPES ================= */ ! static void addstr_in_color(char *str, const byte color); /* only used within this file */ ! static void addcstr(color_char *cstr); /* only used within this file */ ! static char translate_keypad(int scancode); /* only used within this file */ ! /* static void put_char_at(int row, int col, char ch) only used within this file*/ ! static void put_color_char_at(int row, int col, COLORBUF cb); /* only used within this file */ ! static void put_cursor(int row, int col); /* only used within this file */ ! static void clear_buffers(void); /* only used within this file */ ! static void cls(void); /* only uwed within this file */ ! static void wrefresh(WINDOW *scr); /* only used within this file */ ! /* ================== PUBLIC FUNCTIONS ================== */ *************** *** 146,150 **** /* Returns a keystroke, translated into a Rogue command. */ ! rgetchar() { char ch; --- 149,154 ---- /* Returns a keystroke, translated into a Rogue command. */ ! ! char rgetchar(void) { char ch; *************** *** 155,159 **** put_cursor(curscr->_cury, curscr->_curx); #else ! register scancode; regs_t regs; #endif --- 159,163 ---- put_cursor(curscr->_cury, curscr->_curx); #else ! int scancode; regs_t regs; #endif *************** *** 241,245 **** /* Initializes the screen and pulls in the DPMI mode and page in use */ ! initscr() { #ifdef _MSC_VER --- 245,250 ---- /* Initializes the screen and pulls in the DPMI mode and page in use */ ! ! void initscr(void) { #ifdef _MSC_VER *************** *** 267,272 **** ! move(row, col) ! short row, col; { curscr->_cury = row; --- 272,276 ---- ! void move(const short row, const short col) { curscr->_cury = row; *************** *** 283,287 **** */ ! addstr(char *str) { while (*str) { --- 287,291 ---- */ ! void addstr(char *str) { while (*str) { *************** *** 291,297 **** ! mvaddstr(row, col, str) ! short row, col; ! char *str; { move(row, col); --- 295,299 ---- ! void mvaddstr(const short row, const short col, char *str) { move(row, col); *************** *** 300,304 **** ! addstr_in_color(char *str, byte color) { color_char cc; --- 302,306 ---- ! static void addstr_in_color(char *str, const byte color) /* only used within this file */ { color_char cc; *************** *** 312,316 **** ! mvaddstr_in_color(short row, short col, char *str, byte color) { move(row, col); --- 314,318 ---- ! void mvaddstr_in_color(const short row, const short col, char *str, const byte color) { move(row, col); *************** *** 319,323 **** ! addcstr(color_char *cstr) { while ((*cstr).b16 != 0) { --- 321,325 ---- ! static void addcstr(color_char *cstr) /* only used within this file */ { while ((*cstr).b16 != 0) { *************** *** 327,331 **** ! mvaddcstr(short row, short col, color_char *cstr) { move(row, col); --- 329,333 ---- ! void mvaddcstr(const short row, const short col, color_char *cstr) { move(row, col); *************** *** 340,348 **** */ ! addch(register int ch) { color_char cc; ! cc.b8.ch = ch; if (buf_stand_out) { cc.b8.color = MAKE_COLOR(BRIGHT_WHITE, BLACK); --- 342,350 ---- */ ! void addch(const int ch) { color_char cc; ! cc.b8.ch = (char) ch; if (buf_stand_out) { cc.b8.color = MAKE_COLOR(BRIGHT_WHITE, BLACK); *************** *** 354,358 **** } ! mvaddch(short row, short col, int ch) { move(row, col); --- 356,361 ---- } ! ! void mvaddch(const short row, const short col, const int ch) { move(row, col); *************** *** 360,364 **** } ! addcch(color_char cc) { short row, col; --- 363,368 ---- } ! ! void addcch(const color_char cc) { short row, col; *************** *** 372,376 **** } ! mvaddcch(short row, short col, color_char cc) { move(row, col); --- 376,381 ---- } ! ! void mvaddcch(const short row, const short col, const color_char cc) { move(row, col); *************** *** 383,387 **** */ ! colorize(char *str, byte color, color_char *cstr) { while (*str != '\0') { --- 388,392 ---- */ ! void colorize(char *str, const byte color, color_char *cstr) { while (*str != '\0') { *************** *** 400,406 **** */ ! refresh() { ! register i, j, line; short old_row, old_col, first_row; --- 405,411 ---- */ ! void refresh(void) { ! int i, j, line; short old_row, old_col, first_row; *************** *** 428,432 **** } ! redraw() { wrefresh(curscr); } --- 433,439 ---- } ! ! void redraw(void) ! { wrefresh(curscr); } *************** *** 436,441 **** /* Returns the character currently at the specified current position */ ! mvinch(row, col) ! short row, col; { move(row, col); --- 443,447 ---- /* Returns the character currently at the specified current position */ ! int mvinch(const short row, const short col) { move(row, col); *************** *** 443,447 **** } ! color_char mvincch(short row, short col) { move(row, col); --- 449,454 ---- } ! ! color_char mvincch(const short row, const short col) { move(row, col); *************** *** 454,458 **** */ ! clear() { cls(); --- 461,465 ---- */ ! void clear(void) { cls(); *************** *** 463,467 **** } ! clrtoeol() { short row, col; --- 470,475 ---- } ! ! void clrtoeol(void) { short row, col; *************** *** 480,489 **** */ ! standout() { buf_stand_out = 1; } ! standend() { buf_stand_out = 0; --- 488,497 ---- */ ! void standout(void) { buf_stand_out = 1; } ! void standend(void) { buf_stand_out = 0; *************** *** 497,502 **** */ ! void ! draw_box(color_char cset[6], int ulrow, int ulcol, int height, int width) { short i; --- 505,509 ---- */ ! void draw_box(const color_char cset[6], const short ulrow, const short ulcol, const short height, const short width) { short i; *************** *** 535,551 **** */ ! endwin() { } ! crmode() { } ! noecho() { } ! nonl() { } --- 542,561 ---- */ ! void endwin(void) { } ! ! void crmode(void) { } ! ! void noecho(void) { } ! ! void nonl(void) { } *************** *** 564,568 **** */ #if 0 ! overlay(color_char cca[][], int rows, int cols, int ulrow, int ulcol) { int r, c, ar, ar0, ac; --- 574,578 ---- */ #if 0 ! void overlay(color_char cca[][], int rows, int cols, int ulrow, int ulcol) { int r, c, ar, ar0, ac; *************** *** 603,607 **** */ #ifndef _MSC_VER ! static char translate_keypad(int scancode) { const char keys[] = "yku-h5l+bjn0."; const char control[] = "\031\013\025-\0105\014+\002\012\0160."; --- 613,618 ---- */ #ifndef _MSC_VER ! static char translate_keypad(int scancode) /* only used within this file */ ! { const char keys[] = "yku-h5l+bjn0."; const char control[] = "\031\013\025-\0105\014+\002\012\0160."; *************** *** 626,630 **** #if 0 ! static put_char_at(register int row, register int col, char ch) { put_color_char_at(row, col, (COLORBUF) MAKE_COLOR_CHAR(WHITE, BLACK, ch)); --- 637,641 ---- #if 0 ! static void put_char_at(int row, int col, char ch) /* only used within this file*/ { put_color_char_at(row, col, (COLORBUF) MAKE_COLOR_CHAR(WHITE, BLACK, ch)); *************** *** 632,636 **** #endif ! static put_color_char_at(register int row, register int col, COLORBUF cb) { #ifdef _MSC_VER --- 643,648 ---- #endif ! ! static void put_color_char_at(int row, int col, COLORBUF cb) /* only used within this file */ { #ifdef _MSC_VER *************** *** 645,650 **** #ifdef _MSC_VER ! coord.X = col; ! coord.Y = row; attrib = cb.b8.color; --- 657,662 ---- #ifdef _MSC_VER ! coord.X = (short) col; ! coord.Y = (short) row; attrib = cb.b8.color; *************** *** 668,678 **** /* Moves the cursor to a coordinate on the screen. */ ! static put_cursor(register int row, register int col) { #ifdef _MSC_VER COORD coord; ! coord.X = col; ! coord.Y = row; SetConsoleCursorPosition(hStdOut, coord); --- 680,691 ---- /* Moves the cursor to a coordinate on the screen. */ ! ! static void put_cursor(int row, int col) /* only used within this file */ { #ifdef _MSC_VER COORD coord; ! coord.X = (SHORT) col; ! coord.Y = (SHORT) row; SetConsoleCursorPosition(hStdOut, coord); *************** *** 692,698 **** /* Clears the internal screen buffers */ ! static clear_buffers() { ! register i, j; screen_dirty = 0; --- 705,712 ---- /* Clears the internal screen buffers */ ! ! static void clear_buffers(void) /* only used within this file */ { ! int i, j; screen_dirty = 0; *************** *** 712,716 **** */ ! static cls() { #ifdef _MSC_VER --- 726,730 ---- */ ! static void cls(void) /* only uwed within this file */ { #ifdef _MSC_VER *************** *** 740,744 **** */ ! static wrefresh(WINDOW *scr) { short i, col; --- 754,758 ---- */ ! static void wrefresh(WINDOW *scr) /* only used within this file */ { short i, col; Index: zap.c =================================================================== RCS file: /cvsroot/rogueclone/rogue/src/zap.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** zap.c 2 Apr 2005 13:41:17 -0000 1.5 --- zap.c 11 Jun 2008 06:16:35 -0000 1.6 *************** *** 52,59 **** extern short cur_room; - void bounce(short ball, short dir, short row, short col, short r); ! zapp() { short wch; --- 52,63 ---- extern short cur_room; + static object * get_zapped_monster(const short dir, short *row, short *col); /*only used within this file*/ + static void zap_monster(object *monster, const unsigned short kind); /*only used within this file*/ + static void tele_away(object *monster); /*only used within this file*/ + static void wdrain_life(object *monster); /*only used within this file*/ ! ! void zapp(void) { short wch; *************** *** 109,116 **** } ! object * ! get_zapped_monster(dir, row, col) ! short dir; ! short *row, *col; { short orow, ocol; --- 113,118 ---- } ! ! static object * get_zapped_monster(const short dir, short *row, short *col) /*only used within this file*/ { short orow, ocol; *************** *** 132,138 **** } ! zap_monster(monster, kind) ! object *monster; ! unsigned short kind; { short row, col; --- 134,139 ---- } ! ! static void zap_monster(object *monster, const unsigned short kind) /*only used within this file*/ { short row, col; *************** *** 199,204 **** } ! tele_away(monster) ! object *monster; { short row, col; --- 200,205 ---- } ! ! static void tele_away(object *monster) /*only used within this file*/ { short row, col; *************** *** 218,222 **** } ! wizardize() { char buf[100]; --- 219,224 ---- } ! ! void wizardize(void) { char buf[100]; *************** *** 228,232 **** if (get_input_line("wizard's password:", "", buf, "", 0, 0)) { (void) xxx(1); ! xxxx(buf, strlen(buf)); if (!strncmp(buf, "\247\104\126\272\115\243\027", 7)) { wizard = 1; --- 230,234 ---- if (get_input_line("wizard's password:", "", buf, "", 0, 0)) { (void) xxx(1); ! xxxx(buf, (short) strlen(buf)); if (!strncmp(buf, "\247\104\126\272\115\243\027", 7)) { wizard = 1; *************** *** 240,245 **** } ! wdrain_life(monster) ! object *monster; { short hp; --- 242,247 ---- } ! ! static void wdrain_life(object *monster) /*only used within this file*/ { short hp; *************** *** 273,277 **** * hit along its path. */ ! static void clear_wand_effect(short orow, short ocol, short row, short col, short dir) { /* short ch; */ --- 275,280 ---- * hit along its path. */ ! static void clear_wand_effect(short orow, short ocol, const short row, const short col, const short dir) ! { /* short ch; */ *************** *** 331,335 **** * function is no less hideous, though. :-) */ ! void bounce(short ball, short dir, short row, short col, short r) { short orow, ocol, new_dir = -1; char buf[DCOLS]; --- 334,340 ---- * function is no less hideous, though. :-) */ ! ! void bounce(const short ball, const short dir, short row, short col, short r) ! { short orow, ocol, new_dir = -1; char buf[DCOLS]; *************** *** 341,345 **** if (++r == 1) { ! btime = get_rand(3, 6); } else if (r > btime) { return; --- 346,350 ---- if (++r == 1) { ! btime = (short) get_rand(3, 6); } else if (r > btime) { return; *************** *** 396,400 **** damage = (monster->hp_to_kill / 10) + 1; } else { ! damage = get_rand((rogue.hp_current / 3), rogue.hp_max); } } else { --- 401,405 ---- damage = (monster->hp_to_kill / 10) + 1; } else { ! damage = (short) get_rand((rogue.hp_current / 3), rogue.hp_max); } } else { *************** *** 412,416 **** clear_wand_effect(orow, ocol, row, col, dir); monster->m_flags |= (ASLEEP | NAPPING); ! monster->nap_length = get_rand(3, 6); } else { damage = rogue.hp_current / 4; --- 417,421 ---- clear_wand_effect(orow, ocol, row, col, dir); monster->m_flags |= (ASLEEP | NAPPING); ! monster->nap_length = (short) get_rand(3, 6); } else { damage = rogue.hp_current / 4; *************** *** 432,439 **** goto ND; } else { ! damage = get_rand(3, (3 * rogue.exp)); if (ball == FIRE) { damage = (damage * 3) / 2; ! damage -= get_armor_class(rogue.armor); } sprintf(buf, "the %s hits you", s); --- 437,444 ---- goto ND; } else { ! damage = (short) get_rand(3, (3 * rogue.exp)); if (ball == FIRE) { damage = (damage * 3) / 2; ! damage -= (short) get_armor_class(rogue.armor); } sprintf(buf, "the %s hits you", s); *************** *** 447,451 **** ND: for (i = 0; i < 10; i++) { ! ndir = get_rand(0, DIRS-1); nrow = row; ncol = col; --- 452,456 ---- ND: for (i = 0; i < 10; i++) { ! ndir = (short) get_rand(0, DIRS-1); nrow = row; ncol = col; Index: play.c =================================================================== RCS file: /cvsroot/rogueclone/rogue/src/play.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** play.c 16 Feb 2004 01:01:46 -0000 1.5 --- play.c 11 Jun 2008 06:16:35 -0000 1.6 *************** *** 55,59 **** extern boolean wizard, trap_door; ! play_level() { short ch; --- 55,59 ---- extern boolean wizard, trap_door; ! void play_level(void) { short ch; *************** *** 83,87 **** break; case 's': ! search(((count > 0) ? count : 1), 0); break; case 'i': --- 83,87 ---- break; case 's': ! search( (short) ((count > 0) ? count : 1), 0); break; case 'i': *************** *** 153,157 **** case '\020': do { ! remessage(count++); ch = rgetchar(); } while (ch == '\020'); --- 153,157 ---- case '\020': do { ! remessage( (short) count++); ch = rgetchar(); } while (ch == '\020'); *************** *** 173,177 **** case ')': case ']': ! inv_armor_weapon(ch == ')'); break; case '=': --- 173,177 ---- case ')': case ']': ! inv_armor_weapon( (boolean) (ch == ')') ); break; case '=': Index: trap.c =================================================================== RCS file: /cvsroot/rogueclone/rogue/src/trap.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** trap.c 30 Jan 2004 20:33:03 -0000 1.3 --- trap.c 11 Jun 2008 06:16:35 -0000 1.4 *************** *** 73,78 **** extern short blind; ! trap_at(row, col) ! register row, col; { short i; --- 73,78 ---- extern short blind; ! ! static short trap_at(const short row, const short col) /*only used within this file*/ { short i; *************** *** 86,91 **** } ! trap_player(row, col) ! short row, col; { short t; --- 86,91 ---- } ! ! void trap_player(const short row, const short col) { short t; *************** *** 106,110 **** case BEAR_TRAP: message(trap_strings[(t*2)+1], 1); ! bear_trap = get_rand(4, 7); break; case TELE_TRAP: --- 106,110 ---- case BEAR_TRAP: message(trap_strings[(t*2)+1], 1); ! bear_trap = (short) get_rand(4, 7); break; case TELE_TRAP: *************** *** 138,142 **** } ! add_traps() { short i, n, tries = 0; --- 138,143 ---- } ! ! void add_traps(void) { short i, n, tries = 0; *************** *** 146,169 **** n = 0; } else if (cur_level <= 7) { ! n = get_rand(0, 2); } else if (cur_level <= 11) { ! n = get_rand(1, 2); } else if (cur_level <= 16) { ! n = get_rand(2, 3); } else if (cur_level <= 21) { ! n = get_rand(2, 4); } else if (cur_level <= (AMULET_LEVEL + 2)) { ! n = get_rand(3, 5); } else { ! n = get_rand(5, MAX_TRAPS); } for (i = 0; i < n; i++) { ! traps[i].trap_type = get_rand(0, (TRAPS - 1)); if ((i == 0) && (party_room != NO_ROOM)) { do { ! row = get_rand((rooms[party_room].top_row+1), (rooms[party_room].bottom_row-1)); ! col = get_rand((rooms[party_room].left_col+1), (rooms[party_room].right_col-1)); tries++; --- 147,170 ---- n = 0; } else if (cur_level <= 7) { ! n = (short) get_rand(0, 2); } else if (cur_level <= 11) { ! n = (short) get_rand(1, 2); } else if (cur_level <= 16) { ! n = (short) get_rand(2, 3); } else if (cur_level <= 21) { ! n = (short) get_rand(2, 4); } else if (cur_level <= (AMULET_LEVEL + 2)) { ! n = (short) get_rand(3, 5); } else { ! n = (short) get_rand(5, MAX_TRAPS); } for (i = 0; i < n; i++) { ! traps[i].trap_type = (short) get_rand(0, (TRAPS - 1)); if ((i == 0) && (party_room != NO_ROOM)) { do { ! row = (short) get_rand((rooms[party_room].top_row+1), (rooms[party_room].bottom_row-1)); ! col = (short) get_rand((rooms[party_room].left_col+1), (rooms[party_room].right_col-1)); tries++; *************** *** 182,186 **** } ! id_trap() { short dir, row, col, d, t; --- 183,187 ---- } ! void id_trap(void) { short dir, row, col, d, t; *************** *** 209,213 **** } ! show_traps() { short i, j; --- 210,215 ---- } ! ! void show_traps(void) { short i, j; *************** *** 222,228 **** } ! search(n, is_auto) ! short n; ! boolean is_auto; { short s, i, j, row, col, t; --- 224,229 ---- } ! ! void search(const short n, const boolean is_auto) { short s, i, j, row, col, t; *************** *** 271,274 **** --- 272,280 ---- } } + + /* This if (a && b) expression with assignment for second operand 'b' may + rely on strict right to left evaluation and may not work on all compilers + because the 'b' expression may or may not be evaluated if 'a' is false */ + if ((!is_auto) && (reg_search = !reg_search)) { (void) reg_move(); Index: throw.c =================================================================== RCS file: /cvsroot/rogueclone/rogue/src/throw.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** throw.c 30 Jan 2004 20:33:03 -0000 1.3 --- throw.c 11 Jun 2008 06:16:35 -0000 1.4 *************** *** 51,55 **** extern char hit_message[]; ! throw() { short wch, d; --- 51,62 ---- extern char hit_message[]; ! ! static int throw_at_monster(object *monster, object *weapon); /*only used within this file*/ ! static object * get_thrown_at_monster(const object *obj, short dir, short *row, short *col); /*only used within this file*/ ! static void flop_weapon(object *weapon, short row, short col); /*only used within this file*/ ! ! ! ! void throw(void) { short wch, d; *************** *** 114,119 **** } ! throw_at_monster(monster, weapon) ! object *monster, *weapon; { short damage, hit_chance; --- 121,126 ---- } ! ! static int throw_at_monster(object *monster, object *weapon) /*only used within this file*/ { short damage, hit_chance; *************** *** 149,157 **** } ! object * ! get_thrown_at_monster(obj, dir, row, col) ! object *obj; ! short dir; ! short *row, *col; { short orow, ocol; --- 156,161 ---- } ! ! static object * get_thrown_at_monster(const object *obj, short dir, short *row, short *col) /*only used within this file*/ { short orow, ocol; *************** *** 195,201 **** } ! flop_weapon(weapon, row, col) ! object *weapon; ! short row, col; { object *new_weapon, *monster; --- 199,204 ---- } ! ! static void flop_weapon(object *weapon, short row, short col) /*only used within this file*/ { object *new_weapon, *monster; *************** *** 231,235 **** dcch.b16 = get_dungeon_char(row, col).b16; if (mon) { ! mch = mvinch(row, col); if (monster = object_at(&level_monsters, row, col)) { monster->trail_char.b16 = dcch.b16; --- 234,238 ---- dcch.b16 = get_dungeon_char(row, col).b16; if (mon) { ! mch = (short) mvinch(row, col); if (monster = object_at(&level_monsters, row, col)) { monster->trail_char.b16 = dcch.b16; *************** *** 255,260 **** } ! rand_around(i, r, c) ! short i, *r, *c; { static char* pos = "\010\007\001\003\004\005\002\006\0"; --- 258,263 ---- } ! ! void rand_around(const short i, short *r, short *c) { static char* pos = "\010\007\001\003\004\005\002\006\0"; *************** *** 268,279 **** col = *c; ! o = get_rand(1, 8); for (j = 0; j < 5; j++) { ! x = get_rand(0, 8); y = (x + o) % 9; t = pos[x]; pos[x] = pos[y]; ! pos[y] = t; } } --- 271,282 ---- col = *c; ! o = (short) get_rand(1, 8); for (j = 0; j < 5; j++) { ! x = (short) get_rand(0, 8); y = (x + o) % 9; t = pos[x]; pos[x] = pos[y]; ! pos[y] = (char) t; } } Index: hit.c =================================================================== RCS file: /cvsroot/rogueclone/rogue/src/hit.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** hit.c 14 Feb 2004 13:42:31 -0000 1.4 --- hit.c 11 Jun 2008 06:16:35 -0000 1.5 *************** *** 54,59 **** extern boolean being_held, interrupted, wizard, con_mon; ! mon_hit(monster) ! register object *monster; { short damage, hit_chance; --- 54,63 ---- extern boolean being_held, interrupted, wizard, con_mon; ! ! static short to_hit(const object *obj); /* only used within this file */ ! static short damage_for_strength(void); /*only used within this file*/ ! ! ! void mon_hit(object *monster) { short damage, hit_chance; *************** *** 97,102 **** minus = (float) ((AMULET_LEVEL * 2) - cur_level); } else { ! minus = (float) get_armor_class(rogue.armor) * 3.00; ! minus = minus/100.00 * (float) damage; } damage -= (short) minus; --- 101,106 ---- minus = (float) ((AMULET_LEVEL * 2) - cur_level); } else { ! minus = (float) (get_armor_class(rogue.armor) * 3.00); /* fix compiler warning */ ! minus = (float) (minus/100.00) * (float) damage; /* fix compiler warning */ } damage -= (short) minus; *************** *** 115,121 **** } ! rogue_hit(monster, force_hit) ! register object *monster; ! boolean force_hit; { short damage, hit_chance; --- 119,124 ---- } ! ! void rogue_hit(object *monster, const boolean force_hit) { short damage, hit_chance; *************** *** 153,160 **** } ! rogue_damage(d, monster, other) ! short d; ! object *monster; ! short other; { if (d >= rogue.hp_current) { --- 156,161 ---- } ! ! void rogue_damage(const short d, object *monster, const short other) { if (d >= rogue.hp_current) { *************** *** 169,177 **** } ! get_damage(ds, r) ! char *ds; ! boolean r; { ! register i = 0, j, n, d, total = 0; while (ds[i]) { --- 170,177 ---- } ! ! short get_damage(char *ds, const boolean r) { ! int i = 0, j, n, d, total = 0; while (ds[i]) { *************** *** 192,204 **** } } ! return(total); } ! get_w_damage(obj) ! object *obj; { char new_damage[12]; ! register to_hit, damage; ! register i = 0; if ((!obj) || (obj->what_is != WEAPON)) { --- 192,204 ---- } } ! return( (short) total); } ! ! static short get_w_damage(const object *obj) /*only used within this file*/ { char new_damage[12]; ! int to_hit, damage; ! int i = 0; if ((!obj) || (obj->what_is != WEAPON)) { *************** *** 214,222 **** } ! get_number(s) ! register char *s; { ! register i = 0; ! register total = 0; while ((s[i] >= '0') && (s[i] <= '9')) { --- 214,222 ---- } ! ! int get_number(const char *s) { ! int i = 0; ! int total = 0; while ((s[i] >= '0') && (s[i] <= '9')) { *************** *** 227,233 **** } ! long ! lget_number(s) ! char *s; { short i = 0; --- 227,232 ---- } ! ! long lget_number(const char *s) { short i = 0; *************** *** 241,254 **** } ! to_hit(obj) ! object *obj; { if (!obj) { return(1); } ! return(get_number(obj->damage) + obj->hit_enchant); } ! damage_for_strength() { short strength; --- 240,254 ---- } ! ! static short to_hit(const object *obj) /* only used within this file */ { if (!obj) { return(1); } ! return( (short) (get_number(obj->damage) + obj->hit_enchant) ); } ! ! static short damage_for_strength(void) /*only used within this file*/ { short strength; *************** *** 280,286 **** } ! mon_damage(monster, damage) ! object *monster; ! short damage; { char *mn; --- 280,285 ---- } ! ! int mon_damage(object *monster, const short damage) { char *mn; *************** *** 313,318 **** } ! fight(to_the_death) ! boolean to_the_death; { short ch, c, d; --- 312,317 ---- } ! ! void fight(const boolean to_the_death) { short ch, c, d; *************** *** 336,340 **** get_dir_rc(d, &row, &col, 0); ! c = mvinch(row, col); if (((c < 'A') || (c > 'Z')) || (!can_move(rogue.row, rogue.col, row, col))) { --- 335,339 ---- get_dir_rc(d, &row, &col, 0); ! c = (short) mvinch(row, col); if (((c < 'A') || (c > 'Z')) || (!can_move(rogue.row, rogue.col, row, col))) { *************** *** 364,371 **** } ! get_dir_rc(dir, row, col, allow_off_screen) ! short dir; ! short *row, *col; ! short allow_off_screen; { switch(dir) { --- 363,368 ---- } ! ! void get_dir_rc(const short dir, short *row, short *col, const short allow_off_screen) { switch(dir) { *************** *** 417,422 **** } ! get_hit_chance(weapon) ! object *weapon; { short hit_chance; --- 414,419 ---- } ! ! short get_hit_chance(const object *weapon) { short hit_chance; *************** *** 428,433 **** } ! get_weapon_damage(weapon) ! object *weapon; { short damage; --- 425,430 ---- } ! ! short get_weapon_damage(const object *weapon) { short damage; *************** *** 439,444 **** } ! s_con_mon(monster) ! object *monster; { if (con_mon) { --- 436,441 ---- } ! ! void s_con_mon(object *monster) { if (con_mon) { Index: save.c =================================================================== RCS file: /cvsroot/rogueclone/rogue/src/save.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** save.c 16 Feb 2004 15:30:57 -0000 1.5 --- save.c 11 Jun 2008 06:16:35 -0000 1.6 *************** *** 48,53 **** #include "rogue.h" ! void r_read(FILE *fp, char *buf, int n); void r_write(FILE *fp, char *buf, int n); short write_failed = 0; --- 48,54 ---- #include "rogue.h" ! /* static r_read(FILE *fp, char *buf, int n); void r_write(FILE *fp, char *buf, int n); + */ short write_failed = 0; *************** *** 83,87 **** extern boolean msg_cleared; ! save_game() { check_message(); --- 84,101 ---- extern boolean msg_cleared; ! ! static void write_pack(object *pack, FILE *fp); /* only used within this file */ ! static void read_pack(object *pack, FILE *fp, const boolean is_rogue); /* only used within this file */ ! static void rw_dungeon(FILE *fp, const boolean rw); /* only used within this file */ ! static void rw_id(struct id id_table[], FILE *fp, const int n, const boolean wr); /* only used within this file */ ! static void write_string(char *s, FILE *fp); /* only used within this file */ ! static void read_string(char *s, FILE *fp); /* only used within this file */ ! static void rw_rooms(FILE *fp, const boolean rw); /* only used within this file */ ! static void r_read(FILE *fp, char *buf, unsigned int n); /* only used within this file */ ! static void r_write(FILE *fp, const char *buf, unsigned int n); /* only used within this file */ ! static boolean has_been_touched(rogue_time *saved_time, const rogue_time *mod_time); /*only used within this file*/ ! ! ! void save_game(void) { check_message(); *************** *** 98,103 **** } ! save_into_file(sfile) ! char *sfile; { FILE *fp; --- 112,117 ---- } ! ! void save_into_file(char *sfile) { FILE *fp; *************** *** 105,109 **** char name_buffer[80]; char *hptr; ! struct rogue_time rt_buf; if (sfile[0] == '~') { --- 119,123 ---- char name_buffer[80]; char *hptr; ! rogue_time rt_buf; if (sfile[0] == '~') { *************** *** 173,181 **** } ! restore(fname) ! char *fname; { FILE *fp; ! struct rogue_time saved_time, mod_time; char buf[4]; int new_file_id, saved_file_id; --- 187,195 ---- } ! ! void restore(char *fname) { FILE *fp; ! rogue_time saved_time, mod_time; char buf[4]; int new_file_id, saved_file_id; *************** *** 256,262 **** } ! write_pack(pack, fp) ! object *pack; ! FILE *fp; { object t; --- 270,275 ---- } ! ! static void write_pack(object *pack, FILE *fp) /* only used within this file */ { object t; *************** *** 269,276 **** } ! read_pack(pack, fp, is_rogue) ! object *pack; ! FILE *fp; ! boolean is_rogue; { object read_obj, *new_obj; --- 282,287 ---- } ! ! static void read_pack(object *pack, FILE *fp, const boolean is_rogue) /* only used within this file */ { object read_obj, *new_obj; *************** *** 299,305 **** } ! rw_dungeon(fp, rw) ! FILE *fp; ! boolean rw; { short i, j; --- 310,315 ---- } ! ! static void rw_dungeon(FILE *fp, const boolean rw) /* only used within this file */ { short i, j; *************** *** 323,331 **** } ! rw_id(id_table, fp, n, wr) ! struct id id_table[]; ! FILE *fp; ! int n; ! boolean wr; { short i; --- 333,338 ---- } ! ! static void rw_id(struct id id_table[], FILE *fp, const int n, const boolean wr) /* only used within this file */ { short i; *************** *** 346,356 **** } ! write_string(s, fp) ! char *s; ! FILE *fp; { short n; ! n = strlen(s) + 1; xxxx(s, n); r_write(fp, (char *) &n, sizeof(short)); --- 353,362 ---- } ! ! static void write_string(char *s, FILE *fp) /* only used within this file */ { short n; ! n = (short) strlen(s) + 1; xxxx(s, n); r_write(fp, (char *) &n, sizeof(short)); *************** *** 358,364 **** } ! read_string(s, fp) ! char *s; ! FILE *fp; { short n; --- 364,369 ---- } ! ! static void read_string(char *s, FILE *fp) /* only used within this file */ { short n; *************** *** 369,375 **** } ! rw_rooms(fp, rw) ! FILE *fp; ! boolean rw; { short i; --- 374,379 ---- } ! ! static void rw_rooms(FILE *fp, const boolean rw) /* only used within this file */ { short i; *************** *** 381,389 **** } ! void ! r_read(fp, buf, n) ! FILE *fp; ! char *buf; ! int n; { if (fread(buf, sizeof(char), n, fp) != n) { --- 385,390 ---- } ! ! static void r_read(FILE *fp, char *buf, unsigned int n) /* only used within this file */ { if (fread(buf, sizeof(char), n, fp) != n) { *************** *** 392,400 **** } ! void ! r_write(fp, buf, n) ! FILE *fp; ! char *buf; ! int n; { if (!write_failed) { --- 393,398 ---- } ! ! static void r_write(FILE *fp, const char *buf, unsigned int n) /* only used within this file */ { if (!write_failed) { *************** *** 407,413 **** } ! boolean ! has_been_touched(saved_time, mod_time) ! struct rogue_time *saved_time, *mod_time; { if (saved_time->year < mod_time->year) { --- 405,410 ---- } ! ! static boolean has_been_touched(rogue_time *saved_time, const rogue_time *mod_time) /*only used within this file*/ { if (saved_time->year < mod_time->year) { Index: object.c =================================================================== RCS file: /cvsroot/rogueclone/rogue/src/object.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** object.c 2 Apr 2005 13:41:17 -0000 1.5 --- object.c 11 Jun 2008 06:16:35 -0000 1.6 *************** *** 169,173 **** extern boolean use_color; ! put_objects() { short i, n; --- 169,185 ---- extern boolean use_color; ! ! static void put_gold(void); /* only used within this file */ ! static void plant_gold(const short row, const short col, const boolean is_maze); /* only used within this file */ ! static void gr_scroll(object *obj); /* only used within this file */ ! static void gr_potion(object *obj); /* only used within this file */ ! static void gr_weapon(object *obj, const int assign_wk);/* only used within this file */ ! static void gr_armor(object *obj); /* only used within this file */ ! static void gr_wand(object *obj); /* only used within this file */ ! static void make_party(void); /* only used within this file */ ! static void rand_place(object *obj); /* only used within this file */ ! ! ! void put_objects(void) { short i, n; *************** *** 177,181 **** return; } ! n = coin_toss() ? get_rand(2, 4) : get_rand(3, 5); while (rand_percent(33)) { n++; --- 189,193 ---- return; } ! n = (short) (coin_toss() ? get_rand(2, 4) : get_rand(3, 5)); while (rand_percent(33)) { n++; *************** *** 191,195 **** } ! put_gold() { short i, j; --- 203,208 ---- } ! ! static void put_gold(void) /* only used within this file */ { short i, j; *************** *** 206,212 **** if (is_maze || rand_percent(GOLD_PERCENT)) { for (j = 0; j < 50; j++) { ! row = get_rand(rooms[i].top_row+1, rooms[i].bottom_row-1); ! col = get_rand(rooms[i].left_col+1, rooms[i].right_col-1); if ((dungeon[row][col] == FLOOR) || --- 219,225 ---- if (is_maze || rand_percent(GOLD_PERCENT)) { for (j = 0; j < 50; j++) { ! row = (short) get_rand(rooms[i].top_row+1, rooms[i].bottom_row-1); ! col = (short) get_rand(rooms[i].left_col+1, rooms[i].right_col-1); if ((dungeon[row][col] == FLOOR) || *************** *** 220,226 **** } ! plant_gold(row, col, is_maze) ! short row, col; ! boolean is_maze; { object *obj; --- 233,238 ---- } ! ! static void plant_gold(const short row, const short col, const boolean is_maze) /* only used within this file */ { object *obj; *************** *** 229,233 **** obj->row = row; obj->col = col; obj->what_is = GOLD; ! obj->quantity = get_rand((2 * cur_level), (16 * cur_level)); if (is_maze) { obj->quantity += obj->quantity / 2; --- 241,245 ---- obj->row = row; obj->col = col; obj->what_is = GOLD; ! obj->quantity = (short) get_rand((2 * cur_level), (16 * cur_level)); if (is_maze) { obj->quantity += obj->quantity / 2; *************** *** 237,242 **** } ! place_at(obj, row, col) ! object *obj; { obj->row = row; --- 249,254 ---- } ! ! void place_at(object *obj, const short row, const short col) { obj->row = row; *************** *** 246,253 **** } ! object * ! object_at(pack, row, col) ! register object *pack; ! short row, col; { object *obj = (object *) 0; --- 258,263 ---- } ! ! object * object_at(object *pack, const short row, const short col) { object *obj = (object *) 0; *************** *** 266,271 **** } ! object * ! get_letter_object(ch) { object *obj; --- 276,281 ---- } ! ! object * get_letter_object(const short ch) { object *obj; *************** *** 279,284 **** } ! free_stuff(objlist) ! object *objlist; { object *obj; --- 289,294 ---- } ! ! void free_stuff(object *objlist) { object *obj; *************** *** 292,298 **** } ! char * ! name_of(obj) ! object *obj; { char *retstring; --- 302,307 ---- } ! ! char * name_of(const object *obj) { char *retstring; *************** *** 349,354 **** } ! object * ! gr_object() { object *obj; --- 358,363 ---- } ! ! object * gr_object(void) { object *obj; *************** *** 388,398 **** } ! unsigned short ! gr_what_is() { short percent; unsigned short what_is; ! percent = get_rand(1, 91); if (percent <= 30) { --- 397,407 ---- } ! ! unsigned short gr_what_is(void) { short percent; unsigned short what_is; ! percent = (short) get_rand(1, 91); if (percent <= 30) { *************** *** 414,423 **** } ! gr_scroll(obj) ! object *obj; { short percent; ! percent = get_rand(0, 91); obj->what_is = SCROL; --- 423,432 ---- } ! ! static void gr_scroll(object *obj) /* only used within this file */ { short percent; ! percent = (short) get_rand(0, 91); obj->what_is = SCROL; *************** *** 452,461 **** } ! gr_potion(obj) ! object *obj; { short percent; ! percent = get_rand(1, 118); obj->what_is = POTION; --- 461,470 ---- } ! ! static void gr_potion(object *obj) /* only used within this file */ { short percent; ! percent = (short) get_rand(1, 118); obj->what_is = POTION; *************** *** 492,498 **** } ! gr_weapon(obj, assign_wk) ! object *obj; ! int assign_wk; { short percent; --- 501,506 ---- } ! ! static void gr_weapon(object *obj, const int assign_wk) /* only used within this file */ { short percent; *************** *** 502,511 **** obj->what_is = WEAPON; if (assign_wk) { ! obj->which_kind = get_rand(0, (WEAPONS - 1)); } if ((obj->which_kind == ARROW) || (obj->which_kind == DAGGER) || (obj->which_kind == SHURIKEN) | (obj->which_kind == DART)) { ! obj->quantity = get_rand(3, 15); ! obj->quiver = get_rand(0, 126); } else { obj->quantity = 1; --- 510,519 ---- obj->what_is = WEAPON; if (assign_wk) { ! obj->which_kind = (unsigned short) get_rand(0, (WEAPONS - 1)); } if ((obj->which_kind == ARROW) || (obj->which_kind == DAGGER) || (obj->which_kind == SHURIKEN) | (obj->which_kind == DART)) { ! obj->quantity = (short) get_rand(3, 15); ! obj->quiver = (short) get_rand(0, 126); } else { obj->quantity = 1; *************** *** 513,518 **** obj->hit_enchant = obj->d_enchant = 0; ! percent = get_rand(1, 96); ! blessing = get_rand(1, 3); if (percent <= 16) { --- 521,526 ---- obj->hit_enchant = obj->d_enchant = 0; ! percent = (short) get_rand(1, 96); ! blessing = (short) get_rand(1, 3); if (percent <= 16) { *************** *** 557,562 **** } ! gr_armor(obj) ! object *obj; { short percent; --- 565,570 ---- } ! ! static void gr_armor(object *obj) /* only used within this file */ { short percent; *************** *** 564,568 **** obj->what_is = ARMOR; ! obj->which_kind = get_rand(0, (ARMORS - 1)); obj->class = obj->which_kind + 2; if ((obj->which_kind == PLATE) || (obj->which_kind == SPLINT)) { --- 572,576 ---- obj->what_is = ARMOR; ! obj->which_kind = (unsigned short) get_rand(0, (ARMORS - 1)); obj->class = obj->which_kind + 2; if ((obj->which_kind == PLATE) || (obj->which_kind == SPLINT)) { *************** *** 572,577 **** obj->d_enchant = 0; ! percent = get_rand(1, 100); ! blessing = get_rand(1, 3); if (percent <= 16) { --- 580,585 ---- obj->d_enchant = 0; ! percent = (short) get_rand(1, 100); ! blessing = (short) get_rand(1, 3); if (percent <= 16) { *************** *** 583,597 **** } ! gr_wand(obj) ! object *obj; { obj->what_is = WAND; ! obj->which_kind = get_rand(0, (WANDS - 1)); ! obj->class = get_rand(3, 7); } ! get_food(obj, force_ration) ! object *obj; ! boolean force_ration; { obj->what_is = FOOD; --- 591,604 ---- } ! ! static void gr_wand(object *obj) /* only used within this file */ { obj->what_is = WAND; ! obj->which_kind = (unsigned short) get_rand(0, (WANDS - 1)); ! obj->class = (short) get_rand(3, 7); } ! ! void get_food(object *obj, const boolean force_ration) { obj->what_is = FOOD; *************** *** 604,608 **** } ! put_stairs() { short row, col; --- 611,616 ---- } ! ! void put_stairs(void) { short row, col; *************** *** 612,617 **** } ! get_armor_class(obj) ! object *obj; { if (obj) { --- 620,625 ---- } ! ! int get_armor_class(const object *obj) { if (obj) { *************** *** 621,626 **** } ! object * ! alloc_object() { object *obj; --- 629,634 ---- } ! ! object * alloc_object(void) { object *obj; *************** *** 642,647 **** } ! free_object(obj) ! object *obj; { obj->next_object = free_list; --- 650,655 ---- } ! ! void free_object(object *obj) { obj->next_object = free_list; *************** *** 649,653 **** } ! make_party() { short n; --- 657,662 ---- } ! ! static void make_party(void) /* only used within this file */ { short n; *************** *** 661,665 **** } ! show_objects() { object *obj; --- 670,675 ---- } ! ! void show_objects(void) { object *obj; *************** *** 681,685 **** } } ! mc = mvinch(row, col); if (((mc < 'A') || (mc > 'Z')) && ((row != rogue.row) || (col != rogue.col))) { --- 691,695 ---- } } ! mc = (short) mvinch(row, col); if (((mc < 'A') || (mc > 'Z')) && ((row != rogue.row) || (col != rogue.col))) { *************** *** 700,704 **** } ! put_amulet() { object *obj; --- 710,715 ---- } ! ! void put_amulet(void) { object *obj; *************** *** 709,714 **** } ! rand_place(obj) ! object *obj; { short row, col; --- 720,725 ---- } ! ! static void rand_place(object *obj) /* only used within this file */ { short row, col; *************** *** 718,722 **** } ! c_object_for_wizard() { short ch, max, wk; --- 729,734 ---- } ! ! void c_object_for_wizard(void) { short ch, max, wk; *************** *** 775,779 **** GIL: if (get_input_line("which kind?", "", buf, "", 0, 1)) { ! wk = get_number(buf); if ((wk >= 0) && (wk <= max)) { obj->which_kind = (unsigned short) wk; --- 787,791 ---- GIL: if (get_input_line("which kind?", "", buf, "", 0, 1)) { ! wk = (short) get_number(buf); if ((wk >= 0) && (wk <= max)) { obj->which_kind = (unsigned short) wk; *************** *** 802,806 **** */ ! discovery() { object *obj; --- 814,818 ---- */ ! void discovery(void) { object *obj; *************** *** 846,850 **** get_desc(obj, bwdesc); (void) colorize(bwdesc, item_color, descs[i]+4); ! if ((n = strlen(bwdesc)+4) > maxlen) { maxlen = n; } --- 858,862 ---- get_desc(obj, bwdesc); (void) colorize(bwdesc, item_color, descs[i]+4); ! if ((n = (short) strlen(bwdesc)+4) > maxlen) { maxlen = n; } Index: ring.c =================================================================== RCS file: /cvsroot/rogueclone/rogue/src/ring.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ring.c 30 Jan 2004 20:33:03 -0000 1.2 --- ring.c 11 Jun 2008 06:16:35 -0000 1.3 *************** *** 64,68 **** extern boolean wizard; ! put_on_ring() { short ch; --- 64,68 ---- extern boolean wizard; ! void put_on_ring(void) { short ch; *************** *** 124,130 **** */ ! do_put_on(ring, on_left) ! object *ring; ! boolean on_left; { if (on_left) { --- 124,128 ---- */ ! void do_put_on(object *ring, const boolean on_left) { if (on_left) { *************** *** 137,141 **** } ! remove_ring() { boolean left = 0, right = 0; --- 135,140 ---- } ! ! void remove_ring(void) { boolean left = 0, right = 0; *************** *** 156,161 **** } while ((ch != CANCEL) && (ch != 'l') && (ch != 'r') && (ch != '\n') && (ch != '\r')); ! left = (ch == 'l'); ! right = (ch == 'r'); check_message(); } --- 155,160 ---- } while ((ch != CANCEL) && (ch != 'l') && (ch != 'r') && (ch != '\n') && (ch != '\r')); ! left = (boolean) (ch == 'l'); ! right = (boolean) (ch == 'r'); check_message(); } *************** *** 186,191 **** } ! un_put_on(ring) ! object *ring; { if (ring && (ring->in_use_flags & ON_LEFT_HAND)) { --- 185,190 ---- } ! ! void un_put_on(object *ring) { if (ring && (ring->in_use_flags & ON_LEFT_HAND)) { *************** *** 199,209 **** } ! gr_ring(ring, assign_wk) ! object *ring; ! boolean assign_wk; { ring->what_is = RING; if (assign_wk) { ! ring->which_kind = get_rand(0, (RINGS - 1)); } ring->class = 0; --- 198,207 ---- } ! ! void gr_ring(object *ring, const boolean assign_wk) { ring->what_is = RING; if (assign_wk) { ! ring->which_kind = (unsigned short) get_rand(0, (RINGS - 1)); } ring->class = 0; *************** *** 231,244 **** case ADD_STRENGTH: case DEXTERITY: ! while ((ring->class = (get_rand(0, 4) - 2)) == 0) ; ring->is_cursed = (ring->class < 0); break; case ADORNMENT: ! ring->is_cursed = coin_toss(); break; } } ! inv_rings() { char buf[DCOLS]; --- 229,243 ---- case ADD_STRENGTH: case DEXTERITY: ! while ((ring->class = (short) (get_rand(0, 4) - 2)) == 0) ; ring->is_cursed = (ring->class < 0); break; case ADORNMENT: ! ring->is_cursed = (short) coin_toss(); break; } } ! ! void inv_rings(void) { char buf[DCOLS]; *************** *** 265,270 **** } ! ring_stats(pr) ! boolean pr; { short i; --- 264,269 ---- } ! ! void ring_stats(const boolean pr) { short i; Index: score.c =================================================================== RCS file: /cvsroot/rogueclone/rogue/src/score.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** score.c 16 Feb 2004 01:01:46 -0000 1.5 --- score.c 11 Jun 2008 06:16:35 -0000 1.6 *************** *** 55,63 **** extern char *byebye_string; /* NS: Added color support */ ! killed_by(monster, other) ! object *monster; ! short other; { char buf[128]; --- 55,72 ---- extern c... [truncated message content] |
From: Michael L. <mle...@us...> - 2005-04-02 16:48:01
|
Update of /cvsroot/rogueclone/rogue/sys In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv519/sys Modified Files: makefile.dj Log Message: fixed curses.o and machdep.o prerequisites Index: makefile.dj =================================================================== RCS file: /cvsroot/rogueclone/rogue/sys/makefile.dj,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** makefile.dj 2 Apr 2005 13:29:46 -0000 1.1 --- makefile.dj 2 Apr 2005 16:47:52 -0000 1.2 *************** *** 1,7 **** # rogue clone IV makefile for DJGPP Make ! CFLAGS = -O2 # -Wall LDFLAGS = -s ! LDLIBS = SRC = src --- 1,7 ---- # rogue clone IV makefile for DJGPP Make ! CFLAGS = -O2 -DHAVECURSES # -Wall LDFLAGS = -s ! LDLIBS = -lpdcurses SRC = src *************** *** 30,36 **** # explicit rules for the non-ansi source files ! $(OBJ)/curses.o : $(CC) -c $(CFLAGS) $(SRC)/$(*F).c -o $@ ! $(OBJ)/machdep.o : $(CC) -c $(CFLAGS) $(SRC)/$(*F).c -o $@ --- 30,36 ---- # explicit rules for the non-ansi source files ! $(OBJ)/curses.o : $(SRC)/curses.c $(CC) -c $(CFLAGS) $(SRC)/$(*F).c -o $@ ! $(OBJ)/machdep.o : $(SRC)/machdep.c $(CC) -c $(CFLAGS) $(SRC)/$(*F).c -o $@ |
From: Michael L. <mle...@us...> - 2005-04-02 13:41:38
|
Update of /cvsroot/rogueclone/rogue/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27491/src Modified Files: curses.c invent.c move.c object.c rogue.h use.c zap.c Log Message: got rid of non-ansi // comments Index: object.c =================================================================== RCS file: /cvsroot/rogueclone/rogue/src/object.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** object.c 14 Feb 2004 13:42:31 -0000 1.4 --- object.c 2 Apr 2005 13:41:17 -0000 1.5 *************** *** 854,858 **** } (void) colorize(press_space, MAKE_COLOR(WHITE, BLACK), descs[i++]); ! // (void) strcpy(descs[i++], press_space); if (maxlen < 27) maxlen = 27; col = DCOLS - (maxlen + 2); --- 854,858 ---- } (void) colorize(press_space, MAKE_COLOR(WHITE, BLACK), descs[i++]); ! /* (void) strcpy(descs[i++], press_space); */ if (maxlen < 27) maxlen = 27; col = DCOLS - (maxlen + 2); Index: use.c =================================================================== RCS file: /cvsroot/rogueclone/rogue/src/use.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** use.c 16 Feb 2004 01:01:47 -0000 1.4 --- use.c 2 Apr 2005 13:41:17 -0000 1.5 *************** *** 500,504 **** if (((ch < 'A') || (ch > 'Z')) && ((obj->row != rogue.row) || (obj->col != rogue.col))) ! // if ((ch != ' ') && (ch != '.') && (ch != '\xB1') && (ch != '+')) { if (strchr(steadychars, ch) == 0) { cch.b16 = gr_obj_char(-1).b16; --- 500,504 ---- if (((ch < 'A') || (ch > 'Z')) && ((obj->row != rogue.row) || (obj->col != rogue.col))) ! /* if ((ch != ' ') && (ch != '.') && (ch != '\xB1') && (ch != '+')) { */ if (strchr(steadychars, ch) == 0) { cch.b16 = gr_obj_char(-1).b16; Index: invent.c =================================================================== RCS file: /cvsroot/rogueclone/rogue/src/invent.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** invent.c 16 Feb 2004 04:07:31 -0000 1.5 --- invent.c 2 Apr 2005 13:41:17 -0000 1.6 *************** *** 280,284 **** } (void) colorize(press_space, MAKE_COLOR(WHITE, BLACK), descs[i++]); ! // (void) strcpy(descs[i++], press_space); if (maxlen < 27) maxlen = 27; col = DCOLS - (maxlen + 2); --- 280,284 ---- } (void) colorize(press_space, MAKE_COLOR(WHITE, BLACK), descs[i++]); ! /* (void) strcpy(descs[i++], press_space); */ if (maxlen < 27) maxlen = 27; col = DCOLS - (maxlen + 2); *************** *** 433,437 **** if (ch <= '\031') { ch += 96; ! // (void) strcpy(until, "until adjascent"); (void) strcpy(until, "until adjacent"); /* NS - :-) */ } else { --- 433,437 ---- if (ch <= '\031') { ch += 96; ! /* (void) strcpy(until, "until adjascent"); */ (void) strcpy(until, "until adjacent"); /* NS - :-) */ } else { Index: curses.c =================================================================== RCS file: /cvsroot/rogueclone/rogue/src/curses.c,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** curses.c 19 Feb 2004 01:39:06 -0000 1.8 --- curses.c 2 Apr 2005 13:41:17 -0000 1.9 *************** *** 113,118 **** int LINES=DROWS, COLS=DCOLS; ! // static char terminal[DROWS][DCOLS]; ! // static char buffer[DROWS][DCOLS]; static COLORBUF terminal[DROWS][DCOLS]; static COLORBUF buffer[DROWS][DCOLS]; --- 113,118 ---- int LINES=DROWS, COLS=DCOLS; ! /* static char terminal[DROWS][DCOLS]; */ ! /* static char buffer[DROWS][DCOLS]; */ static COLORBUF terminal[DROWS][DCOLS]; static COLORBUF buffer[DROWS][DCOLS]; *************** *** 563,567 **** * ulcol: upper-left column of the subwindow */ ! /* overlay(color_char cca[][], int rows, int cols, int ulrow, int ulcol) { --- 563,567 ---- * ulcol: upper-left column of the subwindow */ ! #if 0 overlay(color_char cca[][], int rows, int cols, int ulrow, int ulcol) { *************** *** 570,574 **** color_char cc; ! // compute window dimensions and override any insanity if (rows < 1 || cols < 1) return 0; --- 570,574 ---- color_char cc; ! /* compute window dimensions and override any insanity */ if (rows < 1 || cols < 1) return 0; *************** *** 578,589 **** lrcol = MIN(ulcol + cols, DCOLS); ! // We will loop until all rows in cca are displayed ar = 0; do while (ar < rows) { ! // write the next screenful of data. Reserve the bottom ! // row for "Press Space" messages. ! // ! ar0 = ar; // save where our screenful begins for (r=ulrow; r<=lrrow-1 && ; r++) { for (c=ulcol, ac=0; c<=lrcol; c++, ac++) { --- 578,588 ---- lrcol = MIN(ulcol + cols, DCOLS); ! /* We will loop until all rows in cca are displayed */ ar = 0; do while (ar < rows) { ! /* write the next screenful of data. Reserve the bottom ! row for "Press Space" messages. */ ! ar0 = ar; /* save where our screenful begins */ for (r=ulrow; r<=lrrow-1 && ; r++) { for (c=ulcol, ac=0; c<=lrcol; c++, ac++) { *************** *** 595,599 **** } } ! */ --- 594,598 ---- } } ! #endif *************** *** 654,661 **** #else regs.h.ah = 0x09; ! // regs.h.al = (ch & ~ST_MASK); regs.h.al = cb.b8.ch; regs.h.bh = videopage; ! // regs.h.bl = (ch & ST_MASK) ? 0x0f : 0x07; regs.h.bl = cb.b8.color; regs.x.cx = 1; --- 653,660 ---- #else regs.h.ah = 0x09; ! /* regs.h.al = (ch & ~ST_MASK); */ regs.h.al = cb.b8.ch; regs.h.bh = videopage; ! /* regs.h.bl = (ch & ST_MASK) ? 0x0f : 0x07; */ regs.h.bl = cb.b8.color; regs.x.cx = 1; Index: rogue.h =================================================================== RCS file: /cvsroot/rogueclone/rogue/src/rogue.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** rogue.h 14 Feb 2004 13:42:31 -0000 1.5 --- rogue.h 2 Apr 2005 13:41:17 -0000 1.6 *************** *** 391,395 **** ! // #define PARTY_TIME 10 /* (NS - this is unused) one party somewhere in each 10 level span */ #define PARTY_PCT 8 /* NS - % of levels having a party room */ #define BIG_PARTY_PCT 1 /* NS - % of party rooms that are supersized */ --- 391,395 ---- ! /* #define PARTY_TIME 10 */ /* (NS - this is unused) one party somewhere in each 10 level span */ #define PARTY_PCT 8 /* NS - % of levels having a party room */ #define BIG_PARTY_PCT 1 /* NS - % of party rooms that are supersized */ Index: move.c =================================================================== RCS file: /cvsroot/rogueclone/rogue/src/move.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** move.c 30 Jan 2004 20:33:03 -0000 1.3 --- move.c 2 Apr 2005 13:41:17 -0000 1.4 *************** *** 429,434 **** break; case -1: ! // NS: The original bug is funny enough to leave here for posterity. :-) ! // rogue.moves_left -= (rogue.moves_left % 2); rogue.moves_left -= get_rand(0,1); break; --- 429,434 ---- break; case -1: ! /* NS: The original bug is funny enough to leave here for posterity. :-) ! * rogue.moves_left -= (rogue.moves_left % 2); */ rogue.moves_left -= get_rand(0,1); break; *************** *** 439,443 **** rogue.moves_left--; (void) check_hunger(1); ! // rogue.moves_left -= (rogue.moves_left % 2); rogue.moves_left -= get_rand(0,1); break; --- 439,443 ---- rogue.moves_left--; (void) check_hunger(1); ! /* rogue.moves_left -= (rogue.moves_left % 2); */ rogue.moves_left -= get_rand(0,1); break; Index: zap.c =================================================================== RCS file: /cvsroot/rogueclone/rogue/src/zap.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** zap.c 30 Jan 2004 20:33:03 -0000 1.4 --- zap.c 2 Apr 2005 13:41:17 -0000 1.5 *************** *** 274,278 **** */ static void clear_wand_effect(short orow, short ocol, short row, short col, short dir) { ! // short ch; message("", 0); /* causes a --more-- message */ --- 274,278 ---- */ static void clear_wand_effect(short orow, short ocol, short row, short col, short dir) { ! /* short ch; */ message("", 0); /* causes a --more-- message */ *************** *** 282,287 **** get_dir_rc(dir, &orow, &ocol, 1); mvaddcch(orow, ocol, get_dungeon_char(orow, ocol)); ! // ch = mvinch(orow, ocol); ! // mvaddch(orow, ocol, ch); } mvaddcch(rogue.row, rogue.col, get_rogue_char()); --- 282,287 ---- get_dir_rc(dir, &orow, &ocol, 1); mvaddcch(orow, ocol, get_dungeon_char(orow, ocol)); ! /* ch = mvinch(orow, ocol); */ ! /* mvaddch(orow, ocol, ch); */ } mvaddcch(rogue.row, rogue.col, get_rogue_char()); *************** *** 362,366 **** orow = row; ocol = col; ! // standout(); do { get_dir_rc(dir, &row, &col, 1); --- 362,366 ---- orow = row; ocol = col; ! /* standout(); */ do { get_dir_rc(dir, &row, &col, 1); *************** *** 375,379 **** (dungeon[row][col] & ANYROOMSIDE) || ((row == rogue.row) && (col == rogue.col)))); ! // standend(); refresh(); --- 375,379 ---- (dungeon[row][col] & ANYROOMSIDE) || ((row == rogue.row) && (col == rogue.col)))); ! /* standend(); */ refresh(); |
From: Michael L. <mle...@us...> - 2005-04-02 13:29:55
|
Update of /cvsroot/rogueclone/rogue/sys In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22001/sys Modified Files: setup.bat Added Files: makefile.dj Log Message: new DJGPP makefile Index: setup.bat =================================================================== RCS file: /cvsroot/rogueclone/rogue/sys/setup.bat,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** setup.bat 31 Jan 2004 17:00:11 -0000 1.2 --- setup.bat 2 Apr 2005 13:29:46 -0000 1.3 *************** *** 10,19 **** :compiler if "%1"=="wcc" goto WATCOM ! if "%1"=="gcc" goto DJGPP if "%1"=="msc" goto MICROSOFT echo Usage: setup compiler echo supported compilers: echo wcc - Open Watcom ! echo gcc - DJGPP echo msc - Microsoft C goto end --- 10,19 ---- :compiler if "%1"=="wcc" goto WATCOM ! if "%1"=="djgpp" goto DJGPP if "%1"=="msc" goto MICROSOFT echo Usage: setup compiler echo supported compilers: echo wcc - Open Watcom ! echo djgpp - DJGPP echo msc - Microsoft C goto end *************** *** 26,30 **** :DJGPP echo Setting up for DJGPP... ! set makefile=makefile.gcc goto common --- 26,30 ---- :DJGPP echo Setting up for DJGPP... ! set makefile=makefile.dj goto common --- NEW FILE: makefile.dj --- # rogue clone IV makefile for DJGPP Make CFLAGS = -O2 # -Wall LDFLAGS = -s LDLIBS = SRC = src H = src OBJ = o EXE = exe GAME = rogue OBJECTS = $(OBJ)/curses.o $(OBJ)/hit.o $(OBJ)/init.o $(OBJ)/invent.o \ $(OBJ)/level.o $(OBJ)/machdep.o $(OBJ)/main.o $(OBJ)/message.o \ $(OBJ)/monster.o $(OBJ)/move.o $(OBJ)/object.o $(OBJ)/pack.o \ $(OBJ)/play.o $(OBJ)/random.o $(OBJ)/ring.o $(OBJ)/room.o \ $(OBJ)/save.o $(OBJ)/score.o $(OBJ)/spec_hit.o $(OBJ)/throw.o \ $(OBJ)/trap.o $(OBJ)/use.o $(OBJ)/zap.o ############################################################################### # rules $(EXE)/$(GAME).exe : $(OBJECTS) $(CC) $(LDFLAGS) $^ $(LDLIBS) -o $@ # implicit rule for the ansi source files $(OBJ)/%.o : $(SRC)/%.c $(CC) -c $(CFLAGS) -ansi -pedantic $(SRC)/$(*F).c -o $@ # explicit rules for the non-ansi source files $(OBJ)/curses.o : $(CC) -c $(CFLAGS) $(SRC)/$(*F).c -o $@ $(OBJ)/machdep.o : $(CC) -c $(CFLAGS) $(SRC)/$(*F).c -o $@ # header files $(OBJ)/curses.o : $(H)/rogue.h $(OBJ)/hit.o : $(H)/rogue.h $(OBJ)/init.o : $(H)/rogue.h $(H)/version.h $(H)/paths.h $(OBJ)/invent.o : $(H)/rogue.h $(H)/paths.h $(OBJ)/level.o : $(H)/rogue.h $(OBJ)/machdep.o : $(H)/rogue.h $(H)/paths.h $(H)/version.h $(OBJ)/main.o : $(H)/rogue.h $(OBJ)/message.o : $(H)/rogue.h $(H)/paths.h $(OBJ)/monster.o : $(H)/rogue.h $(OBJ)/move.o : $(H)/rogue.h $(OBJ)/object.o : $(H)/rogue.h $(H)/paths.h $(OBJ)/pack.o : $(H)/rogue.h $(OBJ)/play.o : $(H)/rogue.h $(H)/version.h $(OBJ)/random.o : $(OBJ)/ring.o : $(H)/rogue.h $(OBJ)/room.o : $(H)/rogue.h $(OBJ)/save.o : $(H)/rogue.h $(OBJ)/score.o : $(H)/rogue.h $(H)/paths.h $(OBJ)/spec_hit.o : $(H)/rogue.h $(OBJ)/throw.o : $(H)/rogue.h $(OBJ)/trap.o : $(H)/rogue.h $(OBJ)/use.o : $(H)/rogue.h $(OBJ)/zap.o : $(H)/rogue.h ############################################################################### # housekeeping .PHONY: spotless clean spotless : clean @if exist $(EXE)\$(GAME).exe del $(EXE)\$(GAME).exe @if exist $(EXE)\rogue.sco del $(EXE)\rogue.sco @if exist $(EXE)\rogue.sav del $(EXE)\rogue.sav @if exist $(EXE)\screen.txt del $(EXE)\screen.txt clean : @if exist $(OBJ)\curses.o del $(OBJ)\curses.o @if exist $(OBJ)\hit.o del $(OBJ)\hit.o @if exist $(OBJ)\init.o del $(OBJ)\init.o @if exist $(OBJ)\invent.o del $(OBJ)\invent.o @if exist $(OBJ)\level.o del $(OBJ)\level.o @if exist $(OBJ)\machdep.o del $(OBJ)\machdep.o @if exist $(OBJ)\main.o del $(OBJ)\main.o @if exist $(OBJ)\message.o del $(OBJ)\message.o @if exist $(OBJ)\monster.o del $(OBJ)\monster.o @if exist $(OBJ)\move.o del $(OBJ)\move.o @if exist $(OBJ)\object.o del $(OBJ)\object.o @if exist $(OBJ)\pack.o del $(OBJ)\pack.o @if exist $(OBJ)\play.o del $(OBJ)\play.o @if exist $(OBJ)\random.o del $(OBJ)\random.o @if exist $(OBJ)\ring.o del $(OBJ)\ring.o @if exist $(OBJ)\room.o del $(OBJ)\room.o @if exist $(OBJ)\save.o del $(OBJ)\save.o @if exist $(OBJ)\score.o del $(OBJ)\score.o @if exist $(OBJ)\spec_hit.o del $(OBJ)\spec_hit.o @if exist $(OBJ)\throw.o del $(OBJ)\throw.o @if exist $(OBJ)\trap.o del $(OBJ)\trap.o @if exist $(OBJ)\use.o del $(OBJ)\use.o @if exist $(OBJ)\zap.o del $(OBJ)\zap.o |
From: Michael L. <mle...@us...> - 2005-04-02 13:28:23
|
Update of /cvsroot/rogueclone/rogue/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20273/src Modified Files: version.h Log Message: added VERSION_COMMENT string Index: version.h =================================================================== RCS file: /cvsroot/rogueclone/rogue/src/version.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** version.h 22 Feb 2004 04:06:19 -0000 1.5 --- version.h 2 Apr 2005 13:28:05 -0000 1.6 *************** *** 1,5 **** #define VERSION_MAJOR 2 #define VERSION_MINOR 1 ! #define VERSION_PATCH 0 /*****************************************************************************/ --- 1,17 ---- #define VERSION_MAJOR 2 #define VERSION_MINOR 1 ! #define VERSION_PATCH 99 ! #define VERSION_COMMENT "ack! pft!" /* max 13 chars */ ! ! /*****************************************************************************/ ! /* Version 2.2.x */ ! ! /* ! * Rogue Clone IV 2.2.0, in development ! * todo: fix broken curses support ! * todo: port to Linux ! * todo: fix some bugs ! * todo: apply some patches (but not ansification patches, not yet) ! */ /*****************************************************************************/ *************** *** 72,83 **** #endif ! #ifdef RELEASE /* define this on the [n|w]make command line */ ! #define REL_STRING "" #else ! #define REL_STRING " (pre-release)" #endif ! #if defined(__DOS__) || defined(MSDOS) ! #if _M_IX86 >= 300 || defined(__i386__) || defined(__386__) #define PORT "32-bit DOS" #else --- 84,95 ---- #endif ! #ifdef VERSION_COMMENT ! #define REL_STRING " (" VERSION_COMMENT ")" #else ! #define REL_STRING "" #endif ! #if defined(__DOS__) || defined(__MSDOS__) || defined(MSDOS) ! #if _M_IX86 >= 300 || defined(__i386__) || defined(__386__) #define PORT "32-bit DOS" #else |
From: Michael L. <mle...@us...> - 2005-04-02 13:22:42
|
Update of /cvsroot/rogueclone/rogue In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17582 Modified Files: .cvsignore Log Message: ignore README Index: .cvsignore =================================================================== RCS file: /cvsroot/rogueclone/rogue/.cvsignore,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** .cvsignore 14 Feb 2004 13:56:15 -0000 1.2 --- .cvsignore 2 Apr 2005 13:22:19 -0000 1.3 *************** *** 2,5 **** --- 2,6 ---- exe foo + README Makefile rogue.lnk |
From: Michael L. <mle...@us...> - 2004-11-01 22:52:06
|
Update of /cvsroot/rogueclone/rogue/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11676 Modified Files: guide.html Log Message: fix "experience level levels" Index: guide.html =================================================================== RCS file: /cvsroot/rogueclone/rogue/doc/guide.html,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** guide.html 21 Feb 2004 19:43:51 -0000 1.6 --- guide.html 1 Nov 2004 22:51:42 -0000 1.7 *************** *** 532,537 **** <td>Show your real and effective average health point raises. In the cryptic line that is displayed, <samp>R-Hp</samp> is the average increase to your ! maximum health points from gaining experience level levels. <samp>E-Hp</samp> ! is the average increase per experience level including other changes to your maximum health points. The number of "other" health points you have gained (<samp>!</samp>) and lost (<samp>V</samp>) is also shown. --- 532,537 ---- <td>Show your real and effective average health point raises. In the cryptic line that is displayed, <samp>R-Hp</samp> is the average increase to your ! maximum health points from gaining experience levels. <samp>E-Hp</samp> is ! the average increase per experience level including other changes to your maximum health points. The number of "other" health points you have gained (<samp>!</samp>) and lost (<samp>V</samp>) is also shown. |
Update of /cvsroot/rogueclone/rogue/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4200 Modified Files: Tag: ansi-2-1-0 curses.c hit.c init.c invent.c level.c machdep.c message.c monster.c move.c object.c pack.c random.c ring.c rogue.h room.c save.c score.c spec_hit.c throw.c trap.c use.c zap.c Log Message: steve_ued's 2nd ansification patch (9 July 2004) For each function in each file, put 'const' for parameters that are constant in the function. This compiles and works using the 'Compile as C code' switch from Microsoft. If you try to compile it as C++ code, it crashes when the potions are initialized (in init() in init.c) because the code trys to modify a statically defined string. MS will put those strings into a read only memory page. Any writes to that page will cause the program to crash. It's now at 103 warnings at the maximum warning level. Some of those warnings are stupid like a type mismatch warning for the following code short x = 5, y = 6; x += y; /* perfectly valid but MS compiler gives a warning */ The calls to signal() work but need to have compiler warnings fixed Index: score.c =================================================================== RCS file: /cvsroot/rogueclone/rogue/src/score.c,v retrieving revision 1.5.2.1 retrieving revision 1.5.2.2 diff -C2 -d -r1.5.2.1 -r1.5.2.2 *** score.c 10 Jul 2004 14:52:18 -0000 1.5.2.1 --- score.c 10 Jul 2004 14:59:36 -0000 1.5.2.2 *************** *** 56,65 **** ! static void insert_score(char scores[][82], short rank, short n, object *monster, short other); /* only used within this file */ static void sell_pack(void); /* only used within this file */ static void id_all(void); /* only used within this file */ static int name_cmp(char *s1, char *s2); /* only used within this file */ ! static void center(short row, char *buf); /* only used within this file */ ! static void center_in_color(short row, char *buf, byte color); /* only used within this file */ static void sf_error(void); /* only used within this file */ --- 56,65 ---- ! static void insert_score(char scores[][82], const short rank, const short n, const object *monster, const short other); /* only used within this file */ static void sell_pack(void); /* only used within this file */ static void id_all(void); /* only used within this file */ static int name_cmp(char *s1, char *s2); /* only used within this file */ ! static void center(const short row, char *buf); /* only used within this file */ ! static void center_in_color(const short row, char *buf, const byte color); /* only used within this file */ static void sf_error(void); /* only used within this file */ *************** *** 68,72 **** */ ! void killed_by(object *monster, short other) { char buf[128]; --- 68,72 ---- */ ! void killed_by(const object *monster, const short other) { char buf[128]; *************** *** 187,191 **** ! void quit(boolean from_intrpt) { char buf[128]; --- 187,191 ---- ! void quit(const boolean from_intrpt) { char buf[128]; *************** *** 228,232 **** ! void put_scores(object *monster, short other) { short i, n, rank = 10, x, ne = 0, found_player = -1; --- 228,232 ---- ! void put_scores(const object *monster, const short other) { short i, n, rank = 10, x, ne = 0, found_player = -1; *************** *** 344,348 **** ! static void insert_score(char scores[][82], short rank, short n, object *monster, short other) /* only used within this file */ { short i; --- 344,348 ---- ! static void insert_score(char scores[][82], const short rank, const short n, const object *monster, const short other) /* only used within this file */ { short i; *************** *** 400,404 **** ! int is_vowel(short ch) { return( (ch == 'a') || --- 400,404 ---- ! int is_vowel(const short ch) { return( (ch == 'a') || *************** *** 443,447 **** ! int get_value(object *obj) { short wc; --- 443,447 ---- ! int get_value(const object *obj) { short wc; *************** *** 527,531 **** ! void xxxx(char *buf, short n) { short i; --- 527,531 ---- ! void xxxx(char *buf, const short n) { short i; *************** *** 542,546 **** ! long xxx(boolean st) { static long f, s; --- 542,546 ---- ! long xxx(const boolean st) { static long f, s; *************** *** 559,563 **** ! static void center(short row, char *buf) /* only used within this file */ { center_in_color(row, buf, MAKE_COLOR(WHITE,BLACK)); --- 559,563 ---- ! static void center(const short row, char *buf) /* only used within this file */ { center_in_color(row, buf, MAKE_COLOR(WHITE,BLACK)); *************** *** 565,569 **** ! static void center_in_color(short row, char *buf, byte color) /* only used within this file */ { short margin; --- 565,569 ---- ! static void center_in_color(const short row, char *buf, const byte color) /* only used within this file */ { short margin; Index: use.c =================================================================== RCS file: /cvsroot/rogueclone/rogue/src/use.c,v retrieving revision 1.4.2.1 retrieving revision 1.4.2.2 diff -C2 -d -r1.4.2.1 -r1.4.2.2 *** use.c 10 Jul 2004 14:52:18 -0000 1.4.2.1 --- use.c 10 Jul 2004 14:59:36 -0000 1.4.2.2 *************** *** 68,72 **** ! static void potion_heal(int extra); /*used only within this file*/ static void idntfy(void); /*only used within this file*/ static void hold_monster(void); /*only used within this file*/ --- 68,72 ---- ! static void potion_heal(const int extra); /*used only within this file*/ static void idntfy(void); /*only used within this file*/ static void hold_monster(void); /*only used within this file*/ *************** *** 304,308 **** */ ! void vanish(object *obj, short rm, object *pack) { if (obj->quantity > 1) { --- 304,308 ---- */ ! void vanish(object *obj, const short rm, object *pack) { if (obj->quantity > 1) { *************** *** 328,332 **** */ ! static void potion_heal(int extra) /*used only within this file*/ { float ratio; --- 328,332 ---- */ ! static void potion_heal(const int extra) /*used only within this file*/ { float ratio; Index: room.c =================================================================== RCS file: /cvsroot/rogueclone/rogue/src/room.c,v retrieving revision 1.8.2.1 retrieving revision 1.8.2.2 diff -C2 -d -r1.8.2.1 -r1.8.2.2 *** room.c 10 Jul 2004 14:52:18 -0000 1.8.2.1 --- room.c 10 Jul 2004 14:59:36 -0000 1.8.2.2 *************** *** 147,155 **** ! static void visit_rooms(int rn); /* only used within this file */ ! static int get_oth_room(short rn, short *row, short *col); /* only used within this file */ ! static void opt_show(short i); /* only used within this file */ ! static void opt_erase(short i); /* only used within this file */ ! static void opt_go(short i); /* only used within this file */ static void init_groc_array(void); /* only used within this file */ --- 147,155 ---- ! static void visit_rooms(const int rn); /* only used within this file */ ! static int get_oth_room(const short rn, short *row, short *col); /* only used within this file */ ! static void opt_show(const short i); /* only used within this file */ ! static void opt_erase(const short i); /* only used within this file */ ! static void opt_go(const short i); /* only used within this file */ static void init_groc_array(void); /* only used within this file */ *************** *** 158,162 **** /* ======================= FUNCTIONS ===================== */ ! void light_up_room(int rn) { short i, j; --- 158,162 ---- /* ======================= FUNCTIONS ===================== */ ! void light_up_room(const int rn) { short i, j; *************** *** 192,196 **** ! void light_passage(short row, short col) { short i, j, i_end, j_end; --- 192,196 ---- ! void light_passage(const short row, const short col) { short i, j, i_end, j_end; *************** *** 212,216 **** ! void darken_room(short rn) { short i, j; --- 212,216 ---- ! void darken_room(const short rn) { short i, j; *************** *** 236,240 **** ! color_char get_terrain_char(unsigned short mask) { color_char cc; --- 236,240 ---- ! color_char get_terrain_char(const unsigned short mask) { color_char cc; *************** *** 261,265 **** ! color_char get_dungeon_char(short row, short col) { unsigned short mask = dungeon[row][col]; --- 261,265 ---- ! color_char get_dungeon_char(const short row, const short col) { unsigned short mask = dungeon[row][col]; *************** *** 343,347 **** */ ! color_char get_mask_char(unsigned short mask) { color_char cc; --- 343,347 ---- */ ! color_char get_mask_char(const unsigned short mask) { color_char cc; *************** *** 415,419 **** ! void gr_row_col(short *row, short *col, unsigned short mask) { short rn; --- 415,419 ---- ! void gr_row_col(short *row, short *col, const unsigned short mask) { short rn; *************** *** 447,451 **** ! short party_objects(short rn) { short i, j, nf = 0; --- 447,451 ---- ! short party_objects(const short rn) { short i, j, nf = 0; *************** *** 480,484 **** ! short get_room_number(short row, short col) { short i; --- 480,484 ---- ! short get_room_number(const short row, const short col) { short i; *************** *** 516,520 **** ! static void visit_rooms(int rn) /* only used within this file */ { short i; --- 516,520 ---- ! static void visit_rooms(const int rn) /* only used within this file */ { short i; *************** *** 596,600 **** ! void dr_course(object *monster, boolean entering, short row, short col) { short i, j, k, rn; --- 596,600 ---- ! void dr_course(object *monster, const boolean entering, short row, short col) { short i, j, k, rn; *************** *** 668,672 **** ! static int get_oth_room(short rn, short *row, short *col) /* only used within this file */ { short d = -1; --- 668,672 ---- ! static int get_oth_room(const short rn, short *row, short *col) /* only used within this file */ { short d = -1; *************** *** 812,816 **** ! static void opt_show(short i) { char *s; --- 812,816 ---- ! static void opt_show(const short i) { char *s; *************** *** 828,832 **** ! static void opt_erase(short i) { struct option *opt = &options[i]; --- 828,832 ---- ! static void opt_erase(const short i) { struct option *opt = &options[i]; *************** *** 839,843 **** ! static void opt_go(short i) /* only used within this file */ { move(i, (short) strlen(options[i].prompt)); --- 839,843 ---- ! static void opt_go(const short i) /* only used within this file */ { move(i, (short) strlen(options[i].prompt)); *************** *** 872,876 **** */ ! color_char gr_obj_char(int ix) { struct _screenchars *sc; --- 872,876 ---- */ ! color_char gr_obj_char(const int ix) { struct _screenchars *sc; Index: message.c =================================================================== RCS file: /cvsroot/rogueclone/rogue/src/message.c,v retrieving revision 1.4.2.1 retrieving revision 1.4.2.2 diff -C2 -d -r1.4.2.1 -r1.4.2.2 *** message.c 10 Jul 2004 14:52:18 -0000 1.4.2.1 --- message.c 10 Jul 2004 14:59:36 -0000 1.4.2.2 *************** *** 61,68 **** ! static void pad(char *s, short n); /*only used in this file*/ ! void message(char *msg, boolean intrpt) { cant_int = 1; --- 61,68 ---- ! static void pad(const char *s, const short n); /*only used in this file*/ ! void message(char *msg, const boolean intrpt) { cant_int = 1; *************** *** 137,141 **** boolean do_echo; */ ! short get_input_line(char *prompt, char *insert, char *buf, char *if_cancelled, boolean add_blank, boolean do_echo) { short ch; --- 137,141 ---- boolean do_echo; */ ! short get_input_line(char *prompt, char *insert, char *buf, char *if_cancelled, const boolean add_blank, const boolean do_echo) { short ch; *************** *** 196,200 **** */ ! void print_stats(int stat_mask) { char buf[16]; --- 196,200 ---- */ ! void print_stats(const int stat_mask) { char buf[16]; *************** *** 283,287 **** } ! static void pad(char *s, short n) /*only used in this file*/ { short i; --- 283,287 ---- } ! static void pad(const char *s, const short n) /*only used in this file*/ { short i; *************** *** 341,345 **** } ! boolean is_digit(short ch) { /* return((ch >= '0') && (ch <= '9')); fix compiler warning */ --- 341,345 ---- } ! boolean is_digit(const short ch) { /* return((ch >= '0') && (ch <= '9')); fix compiler warning */ *************** *** 352,356 **** ! int r_index(char *str, int ch, boolean last) { int i = 0; --- 352,356 ---- ! int r_index(const char *str, const int ch, const boolean last) { int i = 0; Index: invent.c =================================================================== RCS file: /cvsroot/rogueclone/rogue/src/invent.c,v retrieving revision 1.5.2.1 retrieving revision 1.5.2.2 diff -C2 -d -r1.5.2.1 -r1.5.2.2 *** invent.c 10 Jul 2004 14:52:18 -0000 1.5.2.1 --- invent.c 10 Jul 2004 14:59:36 -0000 1.5.2.2 *************** *** 226,236 **** /* =================== FUNCTIONS ================= */ ! static int pr_com_id(int ch); /* only used within this file */ ! static int get_com_id(int *index, short ch); /* only used within this file */ static int pr_motion_char(int ch); /* only used within this file */ ! void inventory(object *pack, unsigned short mask) { object *obj; --- 226,236 ---- /* =================== FUNCTIONS ================= */ ! static int pr_com_id(const int ch); /* only used within this file */ ! static int get_com_id(int *index, const short ch); /* only used within this file */ static int pr_motion_char(int ch); /* only used within this file */ ! void inventory(object *pack, const unsigned short mask) { object *obj; *************** *** 387,391 **** ! static int pr_com_id(int ch) /* only used within this file */ { int i; --- 387,391 ---- ! static int pr_com_id(const int ch) /* only used within this file */ { int i; *************** *** 400,404 **** ! static int get_com_id(int *index, short ch) /* only used within this file */ { short i; --- 400,404 ---- ! static int get_com_id(int *index, const short ch) /* only used within this file */ { short i; *************** *** 678,682 **** ! void single_inv(short ichar) { short ch; --- 678,682 ---- ! void single_inv(const short ichar) { short ch; *************** *** 702,706 **** ! struct id * get_id_table(object *obj) { switch(obj->what_is) { --- 702,706 ---- ! struct id * get_id_table(const object *obj) { switch(obj->what_is) { *************** *** 722,726 **** ! void inv_armor_weapon(boolean is_weapon) { if (is_weapon) { --- 722,726 ---- ! void inv_armor_weapon(const boolean is_weapon) { if (is_weapon) { Index: zap.c =================================================================== RCS file: /cvsroot/rogueclone/rogue/src/zap.c,v retrieving revision 1.4.2.1 retrieving revision 1.4.2.2 diff -C2 -d -r1.4.2.1 -r1.4.2.2 *** zap.c 10 Jul 2004 14:52:18 -0000 1.4.2.1 --- zap.c 10 Jul 2004 14:59:36 -0000 1.4.2.2 *************** *** 53,57 **** ! static object * get_zapped_monster(short dir, short *row, short *col); /*only used within this file*/static void zap_monster(object *monster, unsigned short kind); /*only used within this file*/ static void tele_away(object *monster); /*only used within this file*/ static void wdrain_life(object *monster); /*only used within this file*/ --- 53,58 ---- ! static object * get_zapped_monster(const short dir, short *row, short *col); /*only used within this file*/ ! static void zap_monster(object *monster, const unsigned short kind); /*only used within this file*/ static void tele_away(object *monster); /*only used within this file*/ static void wdrain_life(object *monster); /*only used within this file*/ *************** *** 113,117 **** ! static object * get_zapped_monster(short dir, short *row, short *col) /*only used within this file*/ { short orow, ocol; --- 114,118 ---- ! static object * get_zapped_monster(const short dir, short *row, short *col) /*only used within this file*/ { short orow, ocol; *************** *** 134,138 **** ! static void zap_monster(object *monster, unsigned short kind) /*only used within this file*/ { short row, col; --- 135,139 ---- ! static void zap_monster(object *monster, const unsigned short kind) /*only used within this file*/ { short row, col; *************** *** 274,278 **** * hit along its path. */ ! static void clear_wand_effect(short orow, short ocol, short row, short col, short dir) { /* // short ch; */ --- 275,279 ---- * hit along its path. */ ! static void clear_wand_effect(short orow, short ocol, const short row, const short col, const short dir) { /* // short ch; */ *************** *** 335,339 **** */ ! void bounce(short ball, short dir, short row, short col, short r) { short orow, ocol, new_dir = -1; --- 336,340 ---- */ ! void bounce(const short ball, const short dir, short row, short col, short r) { short orow, ocol, new_dir = -1; Index: monster.c =================================================================== RCS file: /cvsroot/rogueclone/rogue/src/monster.c,v retrieving revision 1.3.2.1 retrieving revision 1.3.2.2 diff -C2 -d -r1.3.2.1 -r1.3.2.2 *** monster.c 10 Jul 2004 14:52:18 -0000 1.3.2.1 --- monster.c 10 Jul 2004 14:59:36 -0000 1.3.2.2 *************** *** 120,130 **** ! static int mtry(object *monster, short row, short col); /*only used within this file*/ ! static short rogue_is_around(short row, short col); /*only used within this file*/ ! static void put_m_at(short row, short col, object *monster); /*only used within this file*/ static void aim_monster(object *monster); /*only used within this file*/ static int move_confused(object *monster); /*only used within this file*/ static int flit(object *monster); /*only used within this file*/ ! static int no_room_for_monster(int rn); /*only used within this file*/ --- 120,130 ---- ! static int mtry(object *monster, const short row, const short col); /*only used within this file*/ ! static short rogue_is_around(const short row, const short col); /*only used within this file*/ ! static void put_m_at(const short row, const short col, object *monster); /*only used within this file*/ static void aim_monster(object *monster); /*only used within this file*/ static int move_confused(object *monster); /*only used within this file*/ static int flit(object *monster); /*only used within this file*/ ! static int no_room_for_monster(const int rn); /*only used within this file*/ *************** *** 184,188 **** } ! monster = level_monsters.next_monster, *test_mons; while (monster) { --- 184,188 ---- } ! monster = level_monsters.next_monster, *test_mons; /* Comma seperates statements but what does '*test_mons;" do? */ while (monster) { *************** *** 238,242 **** ! void party_monsters(int rn, int n) { short i, j; --- 238,242 ---- ! void party_monsters(const int rn, int n) { short i, j; *************** *** 281,285 **** * except for imitators. */ ! color_char gmc_row_col(short row, short col) { object *monster; --- 281,285 ---- * except for imitators. */ ! color_char gmc_row_col(const short row, const short col) { object *monster; *************** *** 297,301 **** ! color_char gmc(object *monster) { color_char cc; --- 297,301 ---- ! color_char gmc(const object *monster) { color_char cc; *************** *** 458,462 **** ! static int mtry(object *monster, short row, short col) /*only used within this file*/ { if (mon_can_go(monster, row, col)) { --- 458,462 ---- ! static int mtry(object *monster, const short row, const short col) /*only used within this file*/ { if (mon_can_go(monster, row, col)) { *************** *** 468,472 **** ! void move_mon_to(object *monster, short row, short col) { short c; --- 468,472 ---- ! void move_mon_to(object *monster, const short row, const short col) { short c; *************** *** 517,521 **** ! short mon_can_go(object *monster, short row, short col) { object *obj; --- 517,521 ---- ! short mon_can_go(const object *monster, const short row, const short col) { object *obj; *************** *** 565,569 **** ! void wake_room(short rn, boolean entering, short row, short col) { object *monster; --- 565,569 ---- ! void wake_room(const short rn, const boolean entering, const short row, const short col) { object *monster; *************** *** 599,603 **** ! char * mon_name(object *monster) { short ch; --- 599,603 ---- ! char * mon_name(const object *monster) { short ch; *************** *** 616,620 **** ! static short rogue_is_around(short row, short col) /*only used within this file*/ { short rdif, cdif, retval; --- 616,620 ---- ! static short rogue_is_around(const short row, const short col) /*only used within this file*/ { short rdif, cdif, retval; *************** *** 717,721 **** ! static void put_m_at(short row, short col, object *monster) /*only used within this file*/ { monster->row = row; --- 717,721 ---- ! static void put_m_at(const short row, const short col, object *monster) /*only used within this file*/ { monster->row = row; *************** *** 745,749 **** } ! int rogue_can_see(short row, short col) { int retval; --- 745,749 ---- } ! int rogue_can_see(const short row, const short col) { int retval; *************** *** 814,818 **** ! static int no_room_for_monster(int rn) /*only used within this file*/ { short i, j; --- 814,818 ---- ! static int no_room_for_monster(const int rn) /*only used within this file*/ { short i, j; *************** *** 853,857 **** */ ! boolean mon_sees(object *monster, short row, short col) { short rn, rdif, cdif, retval; --- 853,857 ---- */ ! boolean mon_sees(const object *monster, const short row, const short col) { short rn, rdif, cdif, retval; Index: throw.c =================================================================== RCS file: /cvsroot/rogueclone/rogue/src/throw.c,v retrieving revision 1.3.2.1 retrieving revision 1.3.2.2 diff -C2 -d -r1.3.2.1 -r1.3.2.2 *** throw.c 10 Jul 2004 14:52:18 -0000 1.3.2.1 --- throw.c 10 Jul 2004 14:59:36 -0000 1.3.2.2 *************** *** 53,57 **** static int throw_at_monster(object *monster, object *weapon); /*only used within this file*/ ! static object * get_thrown_at_monster(object *obj, short dir, short *row, short *col); /*only used within this file*/ static void flop_weapon(object *weapon, short row, short col); /*only used within this file*/ --- 53,57 ---- static int throw_at_monster(object *monster, object *weapon); /*only used within this file*/ ! static object * get_thrown_at_monster(const object *obj, short dir, short *row, short *col); /*only used within this file*/ static void flop_weapon(object *weapon, short row, short col); /*only used within this file*/ *************** *** 157,161 **** ! static object * get_thrown_at_monster(object *obj, short dir, short *row, short *col) /*only used within this file*/ { short orow, ocol; --- 157,161 ---- ! static object * get_thrown_at_monster(const object *obj, short dir, short *row, short *col) /*only used within this file*/ { short orow, ocol; *************** *** 259,263 **** ! void rand_around(short i, short *r, short *c) { static char* pos = "\010\007\001\003\004\005\002\006\0"; --- 259,263 ---- ! void rand_around(const short i, short *r, short *c) { static char* pos = "\010\007\001\003\004\005\002\006\0"; Index: hit.c =================================================================== RCS file: /cvsroot/rogueclone/rogue/src/hit.c,v retrieving revision 1.4.2.1 retrieving revision 1.4.2.2 diff -C2 -d -r1.4.2.1 -r1.4.2.2 *** hit.c 10 Jul 2004 14:52:18 -0000 1.4.2.1 --- hit.c 10 Jul 2004 14:59:36 -0000 1.4.2.2 *************** *** 55,59 **** ! static short to_hit(object *obj); /* only used within this file */ static short damage_for_strength(void); /*only used within this file*/ --- 55,59 ---- ! static short to_hit(const object *obj); /* only used within this file */ static short damage_for_strength(void); /*only used within this file*/ *************** *** 120,124 **** ! void rogue_hit(object *monster, boolean force_hit) { short damage, hit_chance; --- 120,124 ---- ! void rogue_hit(object *monster, const boolean force_hit) { short damage, hit_chance; *************** *** 157,161 **** ! void rogue_damage(short d, object *monster, short other) { if (d >= rogue.hp_current) { --- 157,161 ---- ! void rogue_damage(const short d, object *monster, const short other) { if (d >= rogue.hp_current) { *************** *** 171,175 **** ! short get_damage(char *ds, boolean r) { int i = 0, j, n, d, total = 0; --- 171,175 ---- ! short get_damage(char *ds, const boolean r) { int i = 0, j, n, d, total = 0; *************** *** 196,200 **** ! static short get_w_damage(object *obj) /*only used within this file*/ { char new_damage[12]; --- 196,200 ---- ! static short get_w_damage(const object *obj) /*only used within this file*/ { char new_damage[12]; *************** *** 215,219 **** ! int get_number(char *s) { int i = 0; --- 215,219 ---- ! int get_number(const char *s) { int i = 0; *************** *** 228,232 **** ! long lget_number(char *s) { short i = 0; --- 228,232 ---- ! long lget_number(const char *s) { short i = 0; *************** *** 241,245 **** ! static short to_hit(object *obj) /* only used within this file */ { if (!obj) { --- 241,245 ---- ! static short to_hit(const object *obj) /* only used within this file */ { if (!obj) { *************** *** 281,285 **** ! int mon_damage(object *monster, short damage) { char *mn; --- 281,285 ---- ! int mon_damage(object *monster, const short damage) { char *mn; *************** *** 313,317 **** ! void fight(boolean to_the_death) { short ch, c, d; --- 313,317 ---- ! void fight(const boolean to_the_death) { short ch, c, d; *************** *** 364,368 **** ! void get_dir_rc(short dir, short *row, short *col, short allow_off_screen) { switch(dir) { --- 364,368 ---- ! void get_dir_rc(const short dir, short *row, short *col, const short allow_off_screen) { switch(dir) { *************** *** 415,419 **** ! short get_hit_chance(object *weapon) { short hit_chance; --- 415,419 ---- ! short get_hit_chance(const object *weapon) { short hit_chance; *************** *** 426,430 **** ! short get_weapon_damage(object *weapon) { short damage; --- 426,430 ---- ! short get_weapon_damage(const object *weapon) { short damage; Index: save.c =================================================================== RCS file: /cvsroot/rogueclone/rogue/src/save.c,v retrieving revision 1.5.2.1 retrieving revision 1.5.2.2 diff -C2 -d -r1.5.2.1 -r1.5.2.2 *** save.c 10 Jul 2004 14:52:18 -0000 1.5.2.1 --- save.c 10 Jul 2004 14:59:36 -0000 1.5.2.2 *************** *** 86,98 **** static void write_pack(object *pack, FILE *fp); /* only used within this file */ ! static void read_pack(object *pack, FILE *fp, boolean is_rogue); /* only used within this file */ ! static void rw_dungeon(FILE *fp, boolean rw); /* only used within this file */ ! static void rw_id(struct id id_table[], FILE *fp, int n, boolean wr); /* only used within this file */ static void write_string(char *s, FILE *fp); /* only used within this file */ static void read_string(char *s, FILE *fp); /* only used within this file */ ! static void rw_rooms(FILE *fp, boolean rw); /* only used within this file */ static void r_read(FILE *fp, char *buf, unsigned int n); /* only used within this file */ ! static void r_write(FILE *fp, char *buf, unsigned int n); /* only used within this file */ ! static boolean has_been_touched(rogue_time *saved_time, rogue_time *mod_time); /*only used within this file*/ --- 86,98 ---- static void write_pack(object *pack, FILE *fp); /* only used within this file */ ! static void read_pack(object *pack, FILE *fp, const boolean is_rogue); /* only used within this file */ ! static void rw_dungeon(FILE *fp, const boolean rw); /* only used within this file */ ! static void rw_id(struct id id_table[], FILE *fp, const int n, const boolean wr); /* only used within this file */ static void write_string(char *s, FILE *fp); /* only used within this file */ static void read_string(char *s, FILE *fp); /* only used within this file */ ! static void rw_rooms(FILE *fp, const boolean rw); /* only used within this file */ static void r_read(FILE *fp, char *buf, unsigned int n); /* only used within this file */ ! static void r_write(FILE *fp, const char *buf, unsigned int n); /* only used within this file */ ! static boolean has_been_touched(rogue_time *saved_time, const rogue_time *mod_time); /*only used within this file*/ *************** *** 283,287 **** ! static void read_pack(object *pack, FILE *fp, boolean is_rogue) /* only used within this file */ { object read_obj, *new_obj; --- 283,287 ---- ! static void read_pack(object *pack, FILE *fp, const boolean is_rogue) /* only used within this file */ { object read_obj, *new_obj; *************** *** 311,315 **** ! static void rw_dungeon(FILE *fp, boolean rw) /* only used within this file */ { short i, j; --- 311,315 ---- ! static void rw_dungeon(FILE *fp, const boolean rw) /* only used within this file */ { short i, j; *************** *** 334,338 **** ! static void rw_id(struct id id_table[], FILE *fp, int n, boolean wr) /* only used within this file */ { short i; --- 334,338 ---- ! static void rw_id(struct id id_table[], FILE *fp, const int n, const boolean wr) /* only used within this file */ { short i; *************** *** 375,379 **** ! static void rw_rooms(FILE *fp, boolean rw) /* only used within this file */ { short i; --- 375,379 ---- ! static void rw_rooms(FILE *fp, const boolean rw) /* only used within this file */ { short i; *************** *** 394,398 **** ! static void r_write(FILE *fp, char *buf, unsigned int n) /* only used within this file */ { if (!write_failed) { --- 394,398 ---- ! static void r_write(FILE *fp, const char *buf, unsigned int n) /* only used within this file */ { if (!write_failed) { *************** *** 406,410 **** ! static boolean has_been_touched(rogue_time *saved_time, rogue_time *mod_time) /*only used within this file*/ { if (saved_time->year < mod_time->year) { --- 406,410 ---- ! static boolean has_been_touched(rogue_time *saved_time, const rogue_time *mod_time) /*only used within this file*/ { if (saved_time->year < mod_time->year) { Index: object.c =================================================================== RCS file: /cvsroot/rogueclone/rogue/src/object.c,v retrieving revision 1.4.2.1 retrieving revision 1.4.2.2 diff -C2 -d -r1.4.2.1 -r1.4.2.2 *** object.c 10 Jul 2004 14:52:18 -0000 1.4.2.1 --- object.c 10 Jul 2004 14:59:36 -0000 1.4.2.2 *************** *** 171,178 **** static void put_gold(void); /* only used within this file */ ! static void plant_gold(short row, short col, boolean is_maze); /* only used within this file */ static void gr_scroll(object *obj); /* only used within this file */ static void gr_potion(object *obj); /* only used within this file */ ! static void gr_weapon(object *obj, int assign_wk);/* only used within this file */ static void gr_armor(object *obj); /* only used within this file */ static void gr_wand(object *obj); /* only used within this file */ --- 171,178 ---- static void put_gold(void); /* only used within this file */ ! static void plant_gold(const short row, const short col, const boolean is_maze); /* only used within this file */ static void gr_scroll(object *obj); /* only used within this file */ static void gr_potion(object *obj); /* only used within this file */ ! static void gr_weapon(object *obj, const int assign_wk);/* only used within this file */ static void gr_armor(object *obj); /* only used within this file */ static void gr_wand(object *obj); /* only used within this file */ *************** *** 234,238 **** ! static void plant_gold(short row, short col, boolean is_maze) /* only used within this file */ { object *obj; --- 234,238 ---- ! static void plant_gold(const short row, const short col, const boolean is_maze) /* only used within this file */ { object *obj; *************** *** 250,254 **** ! void place_at(object *obj, short row, short col) { obj->row = row; --- 250,254 ---- ! void place_at(object *obj, const short row, const short col) { obj->row = row; *************** *** 259,263 **** ! object * object_at(object *pack, short row, short col) { object *obj = (object *) 0; --- 259,263 ---- ! object * object_at(object *pack, const short row, const short col) { object *obj = (object *) 0; *************** *** 277,281 **** ! object * get_letter_object(short ch) { object *obj; --- 277,281 ---- ! object * get_letter_object(const short ch) { object *obj; *************** *** 303,307 **** ! char * name_of(object *obj) { char *retstring; --- 303,307 ---- ! char * name_of(const object *obj) { char *retstring; *************** *** 502,506 **** ! static void gr_weapon(object *obj, int assign_wk) /* only used within this file */ { short percent; --- 502,506 ---- ! static void gr_weapon(object *obj, const int assign_wk) /* only used within this file */ { short percent; *************** *** 600,604 **** ! void get_food(object *obj, boolean force_ration) { obj->what_is = FOOD; --- 600,604 ---- ! void get_food(object *obj, const boolean force_ration) { obj->what_is = FOOD; *************** *** 621,625 **** ! int get_armor_class(object *obj) { if (obj) { --- 621,625 ---- ! int get_armor_class(const object *obj) { if (obj) { Index: spec_hit.c =================================================================== RCS file: /cvsroot/rogueclone/rogue/src/spec_hit.c,v retrieving revision 1.4.2.1 retrieving revision 1.4.2.2 diff -C2 -d -r1.4.2.1 -r1.4.2.2 *** spec_hit.c 10 Jul 2004 14:52:18 -0000 1.4.2.1 --- spec_hit.c 10 Jul 2004 14:59:36 -0000 1.4.2.2 *************** *** 62,70 **** static void steal_item(object *monster); /*only used within this file*/ static void disappear(object *monster); /*only used within this file*/ ! int try_to_cough(short row, short col, object *obj); /*only used within this file*/ ! static int gold_at(short row, short col); /*only used within this file*/ ! static void sting(object *monster); /*only used within this file*/ static void drop_level(void); /*only used within this file*/ ! static short get_dir(short srow, short scol, short drow, short dcol); /*only used within this file*/ --- 62,70 ---- static void steal_item(object *monster); /*only used within this file*/ static void disappear(object *monster); /*only used within this file*/ ! static int try_to_cough(const short row, const short col, object *obj); /*only used within this file*/ ! static int gold_at(const short row, const short col); /*only used within this file*/ ! static void sting(const object *monster); /*only used within this file*/ static void drop_level(void); /*only used within this file*/ ! static short get_dir(const short srow, const short scol, const short drow, const short dcol); /*only used within this file*/ *************** *** 244,248 **** ! void cough_up(object *monster) { object *obj; --- 244,248 ---- ! void cough_up(const object *monster) { object *obj; *************** *** 291,295 **** */ ! int try_to_cough(short row, short col, object *obj) /*only used within this file*/ { color_char cc; --- 291,295 ---- */ ! static int try_to_cough(const short row, const short col, object *obj) /*only used within this file*/ { color_char cc; *************** *** 350,354 **** ! static int gold_at(short row, short col) /*only used within this file*/ { if (dungeon[row][col] & OBJECT) { --- 350,354 ---- ! static int gold_at(const short row, const short col) /*only used within this file*/ { if (dungeon[row][col] & OBJECT) { *************** *** 389,393 **** ! int imitating(short row, short col) { if (dungeon[row][col] & MONSTER) { --- 389,393 ---- ! int imitating(const short row, const short col) { if (dungeon[row][col] & MONSTER) { *************** *** 405,409 **** ! static void sting(object *monster) /*only used within this file*/ { short sting_chance = 35; --- 405,409 ---- ! static void sting(const object *monster) /*only used within this file*/ { short sting_chance = 35; *************** *** 536,540 **** ! static short get_dir(short srow, short scol, short drow, short dcol) /*only used within this file*/ { if (srow == drow) { --- 536,540 ---- ! static short get_dir(const short srow, const short scol, const short drow, const short dcol) /*only used within this file*/ { if (srow == drow) { Index: rogue.h =================================================================== RCS file: /cvsroot/rogueclone/rogue/src/rogue.h,v retrieving revision 1.5.2.1 retrieving revision 1.5.2.2 diff -C2 -d -r1.5.2.1 -r1.5.2.2 *** rogue.h 10 Jul 2004 14:52:18 -0000 1.5.2.1 --- rogue.h 10 Jul 2004 14:59:36 -0000 1.5.2.2 *************** *** 578,600 **** char rgetchar(void); void initscr(void); ! void move(short row, short col); void addstr(char *str); ! void mvaddstr(short row, short col, char *str); ! void mvaddstr_in_color(short row, short col, char *str, byte color); ! void mvaddcstr(short row, short col, color_char *cstr); ! void addch(int ch); ! void mvaddch(short row, short col, int ch); ! void addcch(color_char cc); ! void mvaddcch(short row, short col, color_char cc); ! void colorize(char *str, byte color, color_char *cstr); void refresh(void); void redraw(void); ! int mvinch(short row, short col); ! color_char mvincch(short row, short col); void clear(void); void clrtoeol(void); void standout(void); void standend(void); ! void draw_box(color_char cset[6], short ulrow, short ulcol, short height, short width); void endwin(void); void crmode(void); --- 578,600 ---- char rgetchar(void); void initscr(void); ! void move(const short row, const short col); void addstr(char *str); ! void mvaddstr(const short row, const short col, char *str); ! void mvaddstr_in_color(const short row, const short col, char *str, const byte color); ! void mvaddcstr(const short row, const short col, color_char *cstr); ! void addch(const int ch); ! void mvaddch(const short row, const short col, const int ch); ! void addcch(const color_char cc); ! void mvaddcch(const short row, const short col, const color_char cc); ! void colorize(char *str, const byte color, color_char *cstr); void refresh(void); void redraw(void); ! int mvinch(const short row, const short col); ! color_char mvincch(const short row, const short col); void clear(void); void clrtoeol(void); void standout(void); void standend(void); ! void draw_box(const color_char cset[6], const short ulrow, const short ulcol, const short height, const short width); void endwin(void); void crmode(void); *************** *** 605,625 **** /* hit.c */ void mon_hit(object *monster); ! void rogue_hit(object *monster, boolean force_hit); ! void rogue_damage(short d, object *monster, short other); ! short get_damage(char *ds, boolean r); ! int get_number(char *s); ! long lget_number(char *s); ! int mon_damage(object *monster, short damage); ! void fight(boolean to_the_death); ! void get_dir_rc(short dir, short *row, short *col, short allow_off_screen); ! short get_hit_chance(object *weapon); ! short get_weapon_damage(object *weapon); void s_con_mon(object *monster); /* init.c */ ! int init(int argc, char *argv[]); ! void make_filename(char **fname, char *name); ! void clean_up(char *estr); void start_window(void); void stop_window(void); --- 605,625 ---- /* hit.c */ void mon_hit(object *monster); ! void rogue_hit(object *monster, const boolean force_hit); ! void rogue_damage(const short d, object *monster, const short other); ! short get_damage(char *ds, const boolean r); ! int get_number(const char *s); ! long lget_number(const char *s); ! int mon_damage(object *monster, const short damage); ! void fight(const boolean to_the_death); ! void get_dir_rc(const short dir, short *row, short *col, const short allow_off_screen); ! short get_hit_chance(const object *weapon); ! short get_weapon_damage(const object *weapon); void s_con_mon(object *monster); /* init.c */ ! int init(const int argc, char *argv[]); ! void make_filename(char **fname, const char *name); ! void clean_up(const char *estr); void start_window(void); void stop_window(void); *************** *** 627,635 **** void onintr(void); void error_save(void); ! void strip(char *s, boolean add_blank); /* invent.c */ ! void inventory(object *pack, unsigned short mask); void id_com(void); void mix_colors(void); --- 627,635 ---- void onintr(void); void error_save(void); ! void strip(char *s, const boolean add_blank); /* invent.c */ ! void inventory(object *pack, const unsigned short mask); void id_com(void); void mix_colors(void); *************** *** 637,643 **** void get_desc(object *obj, char *desc); void get_wand_and_ring_materials(void); ! void single_inv(short ichar); ! struct id * get_id_table(object *obj); ! void inv_armor_weapon(boolean is_weapon); void id_type(void); --- 637,643 ---- void get_desc(object *obj, char *desc); void get_wand_and_ring_materials(void); ! void single_inv(const short ichar); ! struct id * get_id_table(const object *obj); ! void inv_armor_weapon(const boolean is_weapon); void id_type(void); *************** *** 646,653 **** void make_level(void); void clear_level(void); ! void put_player(short nr); int drop_check(void); int check_up(void); ! void add_exp(int e, boolean promotion); int hp_raise(void); void show_average_hp(void); --- 646,653 ---- void make_level(void); void clear_level(void); ! void put_player(const short nr); int drop_check(void); int check_up(void); ! void add_exp(const int e, const boolean promotion); int hp_raise(void); void show_average_hp(void); *************** *** 663,687 **** void md_gct(rogue_time *rt_buf); void md_gfmt(char *fname, rogue_time *rt_buf); ! boolean md_df(char *fname); char * md_gln(void); ! void md_sleep(int nsecs); ! char * md_getenv(char *name); ! char * md_malloc(int n); int md_gseed(void); void md_exit(int status); void md_lock(boolean l); ! void md_shell(char *shell); /* message.c */ ! void message(char *msg, boolean intrpt); void remessage(short c); void check_message(void); ! short get_input_line(char *prompt, char *insert, char *buf, char *if_cancelled, boolean add_blank, boolean do_echo); ! void print_stats(int stat_mask); void save_screen(void); void sound_bell(void); ! boolean is_digit(short ch); ! int r_index(char *str, int ch, boolean last); /* monster.c */ --- 663,687 ---- void md_gct(rogue_time *rt_buf); void md_gfmt(char *fname, rogue_time *rt_buf); ! boolean md_df(const char *fname); char * md_gln(void); ! void md_sleep(const int nsecs); ! char * md_getenv(const char *name); ! char * md_malloc(const int n); int md_gseed(void); void md_exit(int status); void md_lock(boolean l); ! void md_shell(const char *shell); /* message.c */ ! void message(char *msg, const boolean intrpt); void remessage(short c); void check_message(void); ! short get_input_line(char *prompt, char *insert, char *buf, char *if_cancelled, const boolean add_blank, const boolean do_echo); ! void print_stats(const int stat_mask); void save_screen(void); void sound_bell(void); ! boolean is_digit(const short ch); ! int r_index(const char *str, const int ch, const boolean last); /* monster.c */ *************** *** 689,734 **** object * gr_monster(object *monster, int mn); void mv_mons(void); ! void party_monsters(int rn, int n); ! color_char gmc_row_col(short row, short col); ! color_char gmc(object *monster); void mv_1_monster(object *monster, short row, short col); ! void move_mon_to(object *monster, short row, short col); ! short mon_can_go(object *monster, short row, short col); void wake_up(object *monster); ! void wake_room(short rn, boolean entering, short row, short col); ! char * mon_name(object *monster); void wanderer(void); void show_monsters(void); void create_monster(void); ! int rogue_can_see(short row, short col); void aggravate(void); ! boolean mon_sees(object *monster, short row, short col); void mv_aquatars(void); /* move.c */ ! short one_move_rogue(short dirch, short pickup); ! void multiple_move_rogue(short dirch); ! int is_passable(short row, short col); ! int can_move(short row1, short col1, short row2, short col2); void move_onto(void); ! boolean is_direction(short c, short *d); ! boolean check_hunger(boolean msg_only); boolean reg_move(void); ! void rest(int count); /* object.c */ void put_objects(void); ! void place_at(object *obj, short row, short col); ! object * object_at(object *pack, short row, short col); ! object * get_letter_object(short ch); void free_stuff(object *objlist); ! char * name_of(object *obj); object * gr_object(void); unsigned short gr_what_is(void); ! void get_food(object *obj, boolean force_ration); void put_stairs(void); ! int get_armor_class(object *obj); object * alloc_object(void); void free_object(object *obj); --- 689,734 ---- object * gr_monster(object *monster, int mn); void mv_mons(void); ! void party_monsters(const int rn, int n); ! color_char gmc_row_col(const short row, const short col); ! color_char gmc(const object *monster); void mv_1_monster(object *monster, short row, short col); ! void move_mon_to(object *monster, const short row, const short col); ! short mon_can_go(const object *monster, const short row, const short col); void wake_up(object *monster); ! void wake_room(const short rn, const boolean entering, const short row, const short col); ! char * mon_name(const object *monster); void wanderer(void); void show_monsters(void); void create_monster(void); ! int rogue_can_see(const short row, const short col); void aggravate(void); ! boolean mon_sees(const object *monster, const short row, const short col); void mv_aquatars(void); /* move.c */ ! short one_move_rogue(short dirch, const short pickup); ! void multiple_move_rogue(const short dirch); ! int is_passable(const short row, const short col); ! int can_move(const short row1, const short col1, const short row2, const short col2); void move_onto(void); ! boolean is_direction(const short c, short *d); ! boolean check_hunger(const boolean msg_only); boolean reg_move(void); ! void rest(const int count); /* object.c */ void put_objects(void); ! void place_at(object *obj, const short row, const short col); ! object * object_at(object *pack, const short row, const short col); ! object * get_letter_object(const short ch); void free_stuff(object *objlist); ! char * name_of(const object *obj); object * gr_object(void); unsigned short gr_what_is(void); ! void get_food(object *obj, const boolean force_ration); void put_stairs(void); ! int get_armor_class(const object *obj); object * alloc_object(void); void free_object(object *obj); *************** *** 742,748 **** /* pack.c */ ! object * add_to_pack(object *obj, object *pack, int condense); ! void take_from_pack(object *obj, object *pack); ! object * pick_up(short row, short col, short *status); void drop(void); void wait_for_ack(void); --- 742,748 ---- /* pack.c */ ! object * add_to_pack(object *obj, object *pack, const int condense); ! void take_from_pack(const object *obj, object *pack); ! object * pick_up(const short row, const short col, short *status); void drop(void); void wait_for_ack(void); *************** *** 766,773 **** /* random.c */ ! void srrandom(int x); long rrandom(); int get_rand(int x, int y); ! int rand_percent(int percentage); int coin_toss(void); --- 766,773 ---- /* random.c */ ! void srrandom(const int x); long rrandom(); int get_rand(int x, int y); ! int rand_percent(const int percentage); int coin_toss(void); *************** *** 775,805 **** /* ring.c */ void put_on_ring(void); ! void do_put_on(object *ring, boolean on_left); void remove_ring(void); void un_put_on(object *ring); ! void gr_ring(object *ring, boolean assign_wk); void inv_rings(void); ! void ring_stats(boolean pr); /* room.c */ ! void light_up_room(int rn); ! void light_passage(short row, short col); ! void darken_room(short rn); ! color_char get_terrain_char(unsigned short mask); ! color_char get_dungeon_char(short row, short col); ! color_char get_mask_char(unsigned short mask); color_char get_rogue_char(void); void regenerate_screen(void); ! void gr_row_col(short *row, short *col, unsigned short mask); short gr_room(void); ! short party_objects(short rn); ! short get_room_number(short row, short col); int is_all_connected(void); void draw_magic_map(void); ! void dr_course(object *monster, boolean entering, short row, short col); void edit_opts(void); void do_shell(void); ! color_char gr_obj_char(int ix); int gr_obj_index(void); --- 775,805 ---- /* ring.c */ void put_on_ring(void); ! void do_put_on(object *ring, const boolean on_left); void remove_ring(void); void un_put_on(object *ring); ! void gr_ring(object *ring, const boolean assign_wk); void inv_rings(void); ! void ring_stats(const boolean pr); /* room.c */ ! void light_up_room(const int rn); ! void light_passage(const short row, const short col); ! void darken_room(const short rn); ! color_char get_terrain_char(const unsigned short mask); ! color_char get_dungeon_char(const short row, const short col); ! color_char get_mask_char(const unsigned short mask); color_char get_rogue_char(void); void regenerate_screen(void); ! void gr_row_col(short *row, short *col, const unsigned short mask); short gr_room(void); ! short party_objects(const short rn); ! short get_room_number(const short row, const short col); int is_all_connected(void); void draw_magic_map(void); ! void dr_course(object *monster, const boolean entering, short row, short col); void edit_opts(void); void do_shell(void); ! color_char gr_obj_char(const int ix); int gr_obj_index(void); *************** *** 812,823 **** /* score.c */ ! void killed_by(object *monster, short other); void win(void); ! void quit(boolean from_intrpt); ! void put_scores(object *monster, short other); ! int is_vowel(short ch); ! int get_value(object *obj); ! void xxxx(char *buf, short n); ! long xxx(boolean st); --- 812,823 ---- /* score.c */ ! void killed_by(const object *monster, const short other); void win(void); ! void quit(const boolean from_intrpt); ! void put_scores(const object *monster, const short other); ! int is_vowel(const short ch); ! int get_value(const object *obj); ! void xxxx(char *buf, const short n); ! long xxx(const boolean st); *************** *** 825,833 **** void special_hit(object *monster); void rust(object *monster); ! void cough_up(object *monster); int seek_gold(object *monster); void check_gold_seeker(object *monster); int check_imitator(object *monster); ! int imitating(short row, short col); void drain_life(void); int m_confuse(object *monster); --- 825,833 ---- void special_hit(object *monster); void rust(object *monster); ! void cough_up(const object *monster); int seek_gold(object *monster); void check_gold_seeker(object *monster); int check_imitator(object *monster); ! int imitating(const short row, const short col); void drain_life(void); int m_confuse(object *monster); *************** *** 837,854 **** /* throw.c */ void throw(void); ! void rand_around(short i, short *r, short *c); /* trap.c */ ! void trap_player(short row, short col); void add_traps(void); void id_trap(void); void show_traps(void); ! void search(short n, boolean is_auto); /* use.c */ void quaff(void); void read_scroll(void); ! void vanish(object *obj, short rm, object *pack); void eat(void); void tele(void); --- 837,854 ---- /* throw.c */ void throw(void); ! void rand_around(const short i, short *r, short *c); /* trap.c */ ! void trap_player(const short row, const short col); void add_traps(void); void id_trap(void); void show_traps(void); ! void search(const short n, const boolean is_auto); /* use.c */ void quaff(void); void read_scroll(void); ! void vanish(object *obj, const short rm, object *pack); void eat(void); void tele(void); *************** *** 865,869 **** void zapp(void); void wizardize(void); ! void bounce(short ball, short dir, short row, short col, short r); --- 865,869 ---- void zapp(void); void wizardize(void); ! void bounce(const short ball, const short dir, short row, short col, short r); Index: move.c =================================================================== RCS file: /cvsroot/rogueclone/rogue/src/move.c,v retrieving revision 1.3.2.1 retrieving revision 1.3.2.2 diff -C2 -d -r1.3.2.1 -r1.3.2.2 *** move.c 10 Jul 2004 14:52:18 -0000 1.3.2.1 --- move.c 10 Jul 2004 14:59:36 -0000 1.3.2.2 *************** *** 59,69 **** ! static int next_to_something(short drow, short dcol); /* only used within this file */ static short gr_dir(void); /* only used within this file */ static void heal(void); /* only used within this file */ ! static void turn_passage(short dir, boolean fast); /* only used within this file */ ! short one_move_rogue(short dirch, short pickup) { short row, col; --- 59,69 ---- ! static int next_to_something(const short drow, const short dcol); /* only used within this file */ static short gr_dir(void); /* only used within this file */ static void heal(void); /* only used within this file */ ! static void turn_passage(const short dir, const boolean fast); /* only used within this file */ ! short one_move_rogue(short dirch, const short pickup) { short row, col; *************** *** 178,182 **** ! void multiple_move_rogue(short dirch) { short row, col; --- 178,182 ---- ! void multiple_move_rogue(const short dirch) { short row, col; *************** *** 225,229 **** ! int is_passable(short row, short col) { if ((row < MIN_ROW) || (row > (DROWS - 2)) || (col < 0) || --- 225,229 ---- ! int is_passable(const short row, const short col) { if ((row < MIN_ROW) || (row > (DROWS - 2)) || (col < 0) || *************** *** 238,242 **** ! static int next_to_something(short drow, short dcol) /* only used within this file */ { short i, j, i_end, j_end, row, col; --- 238,242 ---- ! static int next_to_something(const short drow, const short dcol) /* only used within this file */ { short i, j, i_end, j_end, row, col; *************** *** 299,303 **** ! int can_move(short row1, short col1, short row2, short col2) { if (!is_passable(row2, col2)) { --- 299,303 ---- ! int can_move(const short row1, const short col1, const short row2, const short col2) { if (!is_passable(row2, col2)) { *************** *** 335,339 **** ! boolean is_direction(short c, short *d) { switch(c) { --- 335,339 ---- ! boolean is_direction(const short c, short *d) { switch(c) { *************** *** 371,375 **** ! boolean check_hunger(boolean msg_only) { short i, n; --- 371,375 ---- ! boolean check_hunger(const boolean msg_only) { short i, n; *************** *** 521,525 **** ! void rest(int count) { int i; --- 521,525 ---- ! void rest(const int count) { int i; *************** *** 637,641 **** ! static boolean can_turn(short nrow, short ncol) { if ((dungeon[nrow][ncol] & TUNNEL) && is_passable(nrow, ncol)) { --- 637,641 ---- ! static boolean can_turn(const short nrow, const short ncol) { if ((dungeon[nrow][ncol] & TUNNEL) && is_passable(nrow, ncol)) { *************** *** 646,650 **** ! static void turn_passage(short dir, boolean fast) /* only used within this file */ { short crow = rogue.row, ccol = rogue.col, turns = 0; --- 646,650 ---- ! static void turn_passage(const short dir, const boolean fast) /* only used within this file */ { short crow = rogue.row, ccol = rogue.col, turns = 0; Index: trap.c =================================================================== RCS file: /cvsroot/rogueclone/rogue/src/trap.c,v retrieving revision 1.3.2.1 retrieving revision 1.3.2.2 diff -C2 -d -r1.3.2.1 -r1.3.2.2 *** trap.c 10 Jul 2004 14:52:18 -0000 1.3.2.1 --- trap.c 10 Jul 2004 14:59:36 -0000 1.3.2.2 *************** *** 74,78 **** ! static short trap_at(short row, short col) /*only used within this file*/ { short i; --- 74,78 ---- ! static short trap_at(const short row, const short col) /*only used within this file*/ { short i; *************** *** 87,91 **** ! void trap_player(short row, short col) { short t; --- 87,91 ---- ! void trap_player(const short row, const short col) { short t; *************** *** 225,229 **** ! void search(short n, boolean is_auto) { short s, i, j, row, col, t; --- 225,229 ---- ! void search(const short n, const boolean is_auto) { short s, i, j, row, col, t; Index: init.c =================================================================== RCS file: /cvsroot/rogueclone/rogue/src/init.c,v retrieving revision 1.5.2.1 retrieving revision 1.5.2.2 diff -C2 -d -r1.5.2.1 -r1.5.2.2 *** init.c 10 Jul 2004 14:52:18 -0000 1.5.2.1 --- init.c 10 Jul 2004 14:59:36 -0000 1.5.2.2 *************** *** 74,81 **** static void player_init(void); /* only used within this file*/ ! static void do_args(int argc, char *argv[]); /* only used within this file */ static void do_opts(void); /*only used within this file*/ ! static void env_get_value(char **s, char *e, boolean add_blank); /*only used within this file*/ ! static void init_str(char **str, char *dflt); /*only used within this file*/ --- 74,81 ---- static void player_init(void); /* only used within this file*/ ! static void do_args(const int argc, char *argv[]); /* only used within this file */ static void do_opts(void); /*only used within this file*/ ! static void env_get_value(char **s, char *e, const boolean add_blank); /*only used within this file*/ ! static void init_str(char **str, const char *dflt); /*only used within this file*/ *************** *** 87,91 **** */ ! int init(int argc, char *argv[]) { int seed; --- 87,91 ---- */ ! int init(const int argc, char *argv[]) { int seed; *************** *** 144,148 **** ! void make_filename(char **fname, char *name) { char *p, *punct = "_^$~!#%&-{}()@'`"; --- 144,148 ---- ! void make_filename(char **fname, const char *name) { char *p, *punct = "_^$~!#%&-{}()@'`"; *************** *** 216,220 **** ! void clean_up(char *estr) { if (save_is_interactive) { --- 216,220 ---- ! void clean_up(const char *estr) { if ... [truncated message content] |
Update of /cvsroot/rogueclone/rogue/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3735/src Modified Files: Tag: ansi-2-1-0 curses.c hit.c init.c invent.c level.c machdep.c main.c message.c monster.c move.c object.c pack.c play.c random.c ring.c rogue.h room.c save.c score.c spec_hit.c throw.c trap.c use.c zap.c Log Message: steve_ued's ansification patch (4 July 2004) Change functions to be ansi prototypes - Move function call arguments into () - Give functions a return value type instead of the compiler default of 'int' - Correctly determine the types to use for 'register' declared variables when simple to do. Global search and fix for 'register'. Add Ansi prototypes for functions - Put ones used externally into rogue.h - Make all others as static functions - since they are used only within their own source file Index: score.c =================================================================== RCS file: /cvsroot/rogueclone/rogue/src/score.c,v retrieving revision 1.5 retrieving revision 1.5.2.1 diff -C2 -d -r1.5 -r1.5.2.1 *** score.c 16 Feb 2004 01:01:46 -0000 1.5 --- score.c 10 Jul 2004 14:52:18 -0000 1.5.2.1 *************** *** 55,63 **** extern char *byebye_string; /* NS: Added color support */ ! killed_by(monster, other) ! object *monster; ! short other; { char buf[128]; --- 55,72 ---- extern char *byebye_string; + + static void insert_score(char scores[][82], short rank, short n, object *monster, short other); /* only used within this file */ + static void sell_pack(void); /* only used within this file */ + static void id_all(void); /* only used within this file */ + static int name_cmp(char *s1, char *s2); /* only used within this file */ + static void center(short row, char *buf); /* only used within this file */ + static void center_in_color(short row, char *buf, byte color); /* only used within this file */ + static void sf_error(void); /* only used within this file */ + + /* NS: Added color support */ ! ! void killed_by(object *monster, short other) { char buf[128]; *************** *** 153,157 **** } ! win() { unwield(rogue.weapon); /* disarm and relax */ --- 162,167 ---- } ! ! void win(void) { unwield(rogue.weapon); /* disarm and relax */ *************** *** 176,181 **** } ! quit(from_intrpt) ! boolean from_intrpt; { char buf[128]; --- 186,191 ---- } ! ! void quit(boolean from_intrpt) { char buf[128]; *************** *** 192,196 **** for (i = 0; i < DCOLS; i++) { ! buf[i] = mvinch(0, i); } } --- 202,206 ---- for (i = 0; i < DCOLS; i++) { ! buf[i] = (char) mvinch(0, i); } } *************** *** 217,223 **** } ! put_scores(monster, other) ! object *monster; ! short other; { short i, n, rank = 10, x, ne = 0, found_player = -1; --- 227,232 ---- } ! ! void put_scores(object *monster, short other) { short i, n, rank = 10, x, ne = 0, found_player = -1; *************** *** 238,242 **** for (i = 0; i < 10; i++) { ! if (((n = fread(scores[i], sizeof(char), 80, fp)) < 80) && (n != 0)) { sf_error(); } else if (n != 0) { --- 247,251 ---- for (i = 0; i < 10; i++) { ! if (((n = (short) fread(scores[i], sizeof(char), 80, fp)) < 80) && (n != 0)) { sf_error(); } else if (n != 0) { *************** *** 313,317 **** } else { scores[i][0] = ' '; ! scores[i][1] = i + '1'; } mvaddstr(i+10, 0, scores[i]); --- 322,326 ---- } else { scores[i][0] = ' '; ! scores[i][1] = (char) (i + '1'); } mvaddstr(i+10, 0, scores[i]); *************** *** 334,341 **** } ! insert_score(scores, rank, n, monster, other) ! char scores[][82]; ! short rank, n; ! object *monster; { short i; --- 343,348 ---- } ! ! static void insert_score(char scores[][82], short rank, short n, object *monster, short other) /* only used within this file */ { short i; *************** *** 385,389 **** (void) strcat(buf, "with amulet"); } ! for (i = strlen(buf); i < 79; i++) { buf[i] = ' '; } --- 392,396 ---- (void) strcat(buf, "with amulet"); } ! for (i = (short) strlen(buf); i < 79; i++) { buf[i] = ' '; } *************** *** 392,397 **** } ! is_vowel(ch) ! short ch; { return( (ch == 'a') || --- 399,404 ---- } ! ! int is_vowel(short ch) { return( (ch == 'a') || *************** *** 402,406 **** } ! sell_pack() { object *obj; --- 409,414 ---- } ! ! static void sell_pack(void) /* only used within this file */ { object *obj; *************** *** 416,420 **** if (obj->what_is != FOOD) { obj->identified = 1; ! val = get_value(obj); rogue.gold += val; --- 424,428 ---- if (obj->what_is != FOOD) { obj->identified = 1; ! val = (short) get_value(obj); rogue.gold += val; *************** *** 434,439 **** } ! get_value(obj) ! object *obj; { short wc; --- 442,447 ---- } ! ! int get_value(object *obj) { short wc; *************** *** 481,485 **** } ! id_all() { short i; --- 489,494 ---- } ! ! static void id_all(void) /* only used within this file */ { short i; *************** *** 502,507 **** } ! name_cmp(s1, s2) ! char *s1, *s2; { short i = 0; --- 511,516 ---- } ! ! static int name_cmp(char *s1, char *s2) /* only used within this file */ { short i = 0; *************** *** 517,523 **** } ! xxxx(buf, n) ! char *buf; ! short n; { short i; --- 526,531 ---- } ! ! void xxxx(char *buf, short n) { short i; *************** *** 533,539 **** } ! long ! xxx(st) ! boolean st; { static long f, s; --- 541,546 ---- } ! ! long xxx(boolean st) { static long f, s; *************** *** 552,558 **** ! center(row, buf) ! short row; ! char *buf; { center_in_color(row, buf, MAKE_COLOR(WHITE,BLACK)); --- 559,563 ---- ! static void center(short row, char *buf) /* only used within this file */ { center_in_color(row, buf, MAKE_COLOR(WHITE,BLACK)); *************** *** 560,571 **** ! center_in_color(row, buf, color) ! short row; ! char *buf; ! byte color; { short margin; ! margin = ((DCOLS - strlen(buf)) / 2); mvaddstr_in_color(row, margin, buf, (use_color) ? color : MAKE_COLOR(WHITE,BLACK)); --- 565,573 ---- ! static void center_in_color(short row, char *buf, byte color) /* only used within this file */ { short margin; ! margin = (short) ((DCOLS - strlen(buf)) / 2); mvaddstr_in_color(row, margin, buf, (use_color) ? color : MAKE_COLOR(WHITE,BLACK)); *************** *** 573,577 **** ! sf_error() { md_lock(0); --- 575,579 ---- ! static void sf_error(void) /* only used within this file */ { md_lock(0); Index: use.c =================================================================== RCS file: /cvsroot/rogueclone/rogue/src/use.c,v retrieving revision 1.4 retrieving revision 1.4.2.1 diff -C2 -d -r1.4 -r1.4.2.1 *** use.c 16 Feb 2004 01:01:47 -0000 1.4 --- use.c 10 Jul 2004 14:52:18 -0000 1.4.2.1 *************** *** 67,71 **** extern boolean use_color; ! quaff() { short ch; --- 67,80 ---- extern boolean use_color; ! ! static void potion_heal(int extra); /*used only within this file*/ ! static void idntfy(void); /*only used within this file*/ ! static void hold_monster(void); /*only used within this file*/ ! static void go_blind(void); /*only used within this file*/ ! static char * get_ench_color(void); /*only used within this file*/ ! static void uncurse_all(void); /*only used within this file*/ ! ! ! void quaff(void) { short ch; *************** *** 109,113 **** case POISON: if (!sustain_strength) { ! rogue.str_current -= get_rand(1, 3); if (rogue.str_current < 1) { rogue.str_current = 1; --- 118,122 ---- case POISON: if (!sustain_strength) { ! rogue.str_current -= (short) get_rand(1, 3); if (rogue.str_current < 1) { rogue.str_current = 1; *************** *** 129,133 **** case HALLUCINATION: message("oh wow, everything seems so cosmic", 0); ! halluc += get_rand(500, 800); break; case DETECT_MONSTER: --- 138,142 ---- case HALLUCINATION: message("oh wow, everything seems so cosmic", 0); ! halluc += (short) get_rand(500, 800); break; case DETECT_MONSTER: *************** *** 153,162 **** case LEVITATION: message("you start to float in the air", 0); ! levitate += get_rand(15, 30); ! being_held = bear_trap = 0; break; case HASTE_SELF: message("you feel yourself moving much faster", 0); ! haste_self += get_rand(11, 21); if (!(haste_self % 2)) { haste_self++; --- 162,173 ---- case LEVITATION: message("you start to float in the air", 0); ! levitate += (short) get_rand(15, 30); ! /* being_held = bear_trap = 0; fix compiler type conversion warning */ ! being_held = 0; ! bear_trap = 0; break; case HASTE_SELF: message("you feel yourself moving much faster", 0); ! haste_self += (short) get_rand(11, 21); if (!(haste_self % 2)) { haste_self++; *************** *** 180,184 **** } ! read_scroll() { short ch; --- 191,196 ---- } ! ! void read_scroll(void) { short ch; *************** *** 292,299 **** */ ! vanish(obj, rm, pack) ! object *obj; ! short rm; ! object *pack; { if (obj->quantity > 1) { --- 304,308 ---- */ ! void vanish(object *obj, short rm, object *pack) { if (obj->quantity > 1) { *************** *** 315,319 **** --- 324,332 ---- } + /* OLD_CODE - extra is implicitly defined and only called with hard coded 0 or 1 potion_heal(extra) + */ + + static void potion_heal(int extra) /*used only within this file*/ { float ratio; *************** *** 360,364 **** } ! idntfy() { short ch; --- 373,378 ---- } ! ! static void idntfy(void) /*only used within this file*/ { short ch; *************** *** 387,391 **** } ! eat() { short ch; --- 401,406 ---- } ! ! void eat(void) { short ch; *************** *** 408,412 **** } if ((obj->which_kind == FRUIT) || rand_percent(60)) { ! moves = get_rand(950, 1150); if (obj->which_kind == RATION) { message("yum, that tasted good", 0); --- 423,427 ---- } if ((obj->which_kind == FRUIT) || rand_percent(60)) { ! moves = (short) get_rand(950, 1150); if (obj->which_kind == RATION) { message("yum, that tasted good", 0); *************** *** 416,420 **** } } else { ! moves = get_rand(750, 950); message("yuk, that food tasted awful", 0); add_exp(2, 1); --- 431,435 ---- } } else { ! moves = (short) get_rand(750, 950); message("yuk, that food tasted awful", 0); add_exp(2, 1); *************** *** 428,432 **** } ! hold_monster() { short i, j; --- 443,448 ---- } ! ! static void hold_monster(void) /*only used within this file*/ { short i, j; *************** *** 460,464 **** } ! tele() { mvaddcch(rogue.row, rogue.col, get_dungeon_char(rogue.row, rogue.col)); --- 476,481 ---- } ! ! void tele(void) { mvaddcch(rogue.row, rogue.col, get_dungeon_char(rogue.row, rogue.col)); *************** *** 472,476 **** } ! hallucinate() { object *obj, *monster; --- 489,494 ---- } ! ! void hallucinate(void) { object *obj, *monster; *************** *** 497,504 **** obj = level_objects.next_object; while (obj) { ! ch = mvinch(obj->row, obj->col); if (((ch < 'A') || (ch > 'Z')) && ((obj->row != rogue.row) || (obj->col != rogue.col))) ! // if ((ch != ' ') && (ch != '.') && (ch != '\xB1') && (ch != '+')) { if (strchr(steadychars, ch) == 0) { cch.b16 = gr_obj_char(-1).b16; --- 515,522 ---- obj = level_objects.next_object; while (obj) { ! ch = (short) mvinch(obj->row, obj->col); if (((ch < 'A') || (ch > 'Z')) && ((obj->row != rogue.row) || (obj->col != rogue.col))) ! /* // if ((ch != ' ') && (ch != '.') && (ch != '\xB1') && (ch != '+')) { */ if (strchr(steadychars, ch) == 0) { cch.b16 = gr_obj_char(-1).b16; *************** *** 513,517 **** while (monster) { ! ch = mvinch(monster->row, monster->col); if ((ch >= 'A') && (ch <= 'Z')) { addch(get_rand('A', 'Z')); --- 531,535 ---- while (monster) { ! ch = (short) mvinch(monster->row, monster->col); if ((ch >= 'A') && (ch <= 'Z')) { addch(get_rand('A', 'Z')); *************** *** 521,525 **** } ! unhallucinate() { halluc = 0; --- 539,544 ---- } ! ! void unhallucinate(void) { halluc = 0; *************** *** 528,532 **** } ! unblind() { blind = 0; --- 547,552 ---- } ! ! void unblind(void) { blind = 0; *************** *** 541,545 **** } ! relight() { if (cur_room == PASSAGE) { --- 561,566 ---- } ! ! void relight(void) { if (cur_room == PASSAGE) { *************** *** 551,559 **** } ! take_a_nap() { short i; ! i = get_rand(2, 5); md_sleep(1); --- 572,581 ---- } ! ! void take_a_nap(void) { short i; ! i = (short) get_rand(2, 5); md_sleep(1); *************** *** 565,569 **** } ! go_blind() { short i, j; --- 587,592 ---- } ! ! static void go_blind(void) /*only used within this file*/ { short i, j; *************** *** 572,576 **** message("a cloak of darkness falls around you", 0); } ! blind += get_rand(500, 800); if (detect_monster) { --- 595,599 ---- message("a cloak of darkness falls around you", 0); } ! blind += (short) get_rand(500, 800); if (detect_monster) { *************** *** 596,601 **** } ! char * ! get_ench_color() { if (halluc) { --- 619,624 ---- } ! ! static char * get_ench_color(void) /*only used within this file*/ { if (halluc) { *************** *** 607,616 **** } ! cnfs() { ! confused += get_rand(12, 22); } ! unconfuse() { char msg[80]; --- 630,641 ---- } ! ! void cnfs(void) { ! confused += (short) get_rand(12, 22); } ! ! void unconfuse(void) { char msg[80]; *************** *** 621,625 **** } ! uncurse_all() { object *obj; --- 646,651 ---- } ! ! static void uncurse_all(void) /*only used within this file*/ { object *obj; Index: room.c =================================================================== RCS file: /cvsroot/rogueclone/rogue/src/room.c,v retrieving revision 1.8 retrieving revision 1.8.2.1 diff -C2 -d -r1.8 -r1.8.2.1 *** room.c 18 Feb 2004 03:34:20 -0000 1.8 --- room.c 10 Jul 2004 14:52:18 -0000 1.8.2.1 *************** *** 146,150 **** static short dc_len = -1; ! static init_groc_array(); --- 146,156 ---- static short dc_len = -1; ! ! static void visit_rooms(int rn); /* only used within this file */ ! static int get_oth_room(short rn, short *row, short *col); /* only used within this file */ ! static void opt_show(short i); /* only used within this file */ ! static void opt_erase(short i); /* only used within this file */ ! static void opt_go(short i); /* only used within this file */ ! static void init_groc_array(void); /* only used within this file */ *************** *** 152,157 **** /* ======================= FUNCTIONS ===================== */ ! light_up_room(rn) ! int rn; { short i, j; --- 158,162 ---- /* ======================= FUNCTIONS ===================== */ ! void light_up_room(int rn) { short i, j; *************** *** 187,191 **** ! light_passage(row, col) { short i, j, i_end, j_end; --- 192,196 ---- ! void light_passage(short row, short col) { short i, j, i_end, j_end; *************** *** 206,211 **** } ! darken_room(rn) ! short rn; { short i, j; --- 211,216 ---- } ! ! void darken_room(short rn) { short i, j; *************** *** 231,236 **** ! ! color_char get_terrain_char(mask) { color_char cc; --- 236,240 ---- ! color_char get_terrain_char(unsigned short mask) { color_char cc; *************** *** 257,263 **** ! color_char get_dungeon_char(register row, register col) { ! register unsigned short mask = dungeon[row][col]; color_char cc; --- 261,267 ---- ! color_char get_dungeon_char(short row, short col) { ! unsigned short mask = dungeon[row][col]; color_char cc; *************** *** 338,342 **** * NS: This now returns a 16-bit color_char. */ ! color_char get_mask_char(register unsigned short mask) { color_char cc; --- 342,347 ---- * NS: This now returns a 16-bit color_char. */ ! ! color_char get_mask_char(unsigned short mask) { color_char cc; *************** *** 363,367 **** /* Returns the rogue's character based on the current options settings. */ ! color_char get_rogue_char() { color_char cc; --- 368,373 ---- /* Returns the rogue's character based on the current options settings. */ ! ! color_char get_rogue_char(void) { color_char cc; *************** *** 377,384 **** * monsters / detect things combination platter. */ ! regenerate_screen() { ! int i, j; ! register unsigned short mask; object *monster; --- 383,391 ---- * monsters / detect things combination platter. */ ! ! void regenerate_screen(void) { ! short i, j; ! unsigned short mask; object *monster; *************** *** 408,414 **** ! gr_row_col(row, col, mask) ! short *row, *col; ! unsigned short mask; { short rn; --- 415,419 ---- ! void gr_row_col(short *row, short *col, unsigned short mask) { short rn; *************** *** 416,421 **** do { ! r = get_rand(MIN_ROW, DROWS-2); ! c = get_rand(0, DCOLS-1); rn = get_room_number(r, c); } while ((rn == NO_ROOM) || --- 421,426 ---- do { ! r = (short) get_rand(MIN_ROW, DROWS-2); ! c = (short) get_rand(0, DCOLS-1); rn = get_room_number(r, c); } while ((rn == NO_ROOM) || *************** *** 429,438 **** } ! gr_room() { short i; do { ! i = get_rand(0, MAXROOMS-1); } while (!(rooms[i].is_room & (R_ROOM | R_MAZE))); --- 434,444 ---- } ! ! short gr_room(void) { short i; do { ! i = (short) get_rand(0, MAXROOMS-1); } while (!(rooms[i].is_room & (R_ROOM | R_MAZE))); *************** *** 440,444 **** } ! party_objects(rn) { short i, j, nf = 0; --- 446,451 ---- } ! ! short party_objects(short rn) { short i, j, nf = 0; *************** *** 449,453 **** N = ((rooms[rn].bottom_row - rooms[rn].top_row) - 1) * ((rooms[rn].right_col - rooms[rn].left_col) - 1); ! n = get_rand(5, 10); if (n > N) { n = N - 2; --- 456,460 ---- N = ((rooms[rn].bottom_row - rooms[rn].top_row) - 1) * ((rooms[rn].right_col - rooms[rn].left_col) - 1); ! n = (short) get_rand(5, 10); if (n > N) { n = N - 2; *************** *** 455,461 **** for (i = 0; i < n; i++) { for (j = found = 0; ((!found) && (j < 250)); j++) { ! row = get_rand(rooms[rn].top_row+1, rooms[rn].bottom_row-1); ! col = get_rand(rooms[rn].left_col+1, rooms[rn].right_col-1); if ((dungeon[row][col] == FLOOR) || (dungeon[row][col] == TUNNEL)) { --- 462,468 ---- for (i = 0; i < n; i++) { for (j = found = 0; ((!found) && (j < 250)); j++) { ! row = (short) get_rand(rooms[rn].top_row+1, rooms[rn].bottom_row-1); ! col = (short) get_rand(rooms[rn].left_col+1, rooms[rn].right_col-1); if ((dungeon[row][col] == FLOOR) || (dungeon[row][col] == TUNNEL)) { *************** *** 472,477 **** } ! get_room_number(row, col) ! register row, col; { short i; --- 479,484 ---- } ! ! short get_room_number(short row, short col) { short i; *************** *** 486,490 **** } ! is_all_connected() { short i, starting_room; --- 493,498 ---- } ! ! int is_all_connected(void) { short i, starting_room; *************** *** 507,512 **** } ! visit_rooms(rn) ! int rn; { short i; --- 515,520 ---- } ! ! static void visit_rooms(int rn) /* only used within this file */ { short i; *************** *** 523,530 **** } /* NS: Fixed a bug here; if the rogue read a magic mapping scroll while * standing on a trap, he disappears from the screen. */ ! draw_magic_map() { short i, j, ch; --- 531,540 ---- } + /* NS: Fixed a bug here; if the rogue read a magic mapping scroll while * standing on a trap, he disappears from the screen. */ ! ! void draw_magic_map(void) { short i, j, ch; *************** *** 538,542 **** s = dungeon[i][j]; if (s & mask) { ! ch = mvinch(i,j); cch.b16 = mvincch(i,j).b16; if ((ch == ' ') --- 548,552 ---- s = dungeon[i][j]; if (s & mask) { ! ch = (short) mvinch(i,j); cch.b16 = mvincch(i,j).b16; if ((ch == ' ') *************** *** 585,592 **** } ! dr_course(monster, entering, row, col) ! object *monster; ! boolean entering; ! short row, col; { short i, j, k, rn; --- 595,600 ---- } ! ! void dr_course(object *monster, boolean entering, short row, short col) { short i, j, k, rn; *************** *** 604,608 **** if (entering) { /* entering room */ /* look for door to some other room */ ! r = get_rand(0, MAXROOMS-1); for (i = 0; i < MAXROOMS; i++) { rr = (r + i) % MAXROOMS; --- 612,616 ---- if (entering) { /* entering room */ /* look for door to some other room */ ! r = (short) get_rand(0, MAXROOMS-1); for (i = 0; i < MAXROOMS; i++) { rr = (r + i) % MAXROOMS; *************** *** 659,664 **** } ! get_oth_room(rn, row, col) ! short rn, *row, *col; { short d = -1; --- 667,672 ---- } ! ! static int get_oth_room(short rn, short *row, short *col) /* only used within this file */ { short d = -1; *************** *** 687,691 **** * options, but that's all we need at the moment. */ ! edit_opts() { color_char save[NOPTS+1][DCOLS]; --- 695,700 ---- * options, but that's all we need at the moment. */ ! ! void edit_opts(void) { color_char save[NOPTS+1][DCOLS]; *************** *** 759,770 **** do { if ((ch >= ' ') && (ch <= '~') && (j < MAX_OPT_LEN)) { ! buf[j++] = ch; buf[j] = '\0'; addch(ch); } else if ((ch == '\010') && (j > 0)) { buf[--j] = '\0'; ! move(i, j + strlen(options[i].prompt)); addch(' '); ! move(i, j + strlen(options[i].prompt)); } refresh(); --- 768,779 ---- do { if ((ch >= ' ') && (ch <= '~') && (j < MAX_OPT_LEN)) { ! buf[j++] = (char) ch; buf[j] = '\0'; addch(ch); } else if ((ch == '\010') && (j > 0)) { buf[--j] = '\0'; ! move(i, j + (short) strlen(options[i].prompt)); addch(' '); ! move(i, j + (short) strlen(options[i].prompt)); } refresh(); *************** *** 802,807 **** } ! opt_show(i) ! int i; { char *s; --- 811,816 ---- } ! ! static void opt_show(short i) { char *s; *************** *** 818,823 **** } ! opt_erase(i) ! int i; { struct option *opt = &options[i]; --- 827,832 ---- } ! ! static void opt_erase(short i) { struct option *opt = &options[i]; *************** *** 829,839 **** } ! opt_go(i) ! int i; { ! move(i, strlen(options[i].prompt)); } ! do_shell() { char *sh; --- 838,849 ---- } ! ! static void opt_go(short i) /* only used within this file */ { ! move(i, (short) strlen(options[i].prompt)); } ! ! void do_shell(void) { char *sh; *************** *** 843,847 **** sh = md_getenv("COMSPEC"); } ! move(LINES-1, 0); refresh(); stop_window(); --- 853,857 ---- sh = md_getenv("COMSPEC"); } ! move( (short) (LINES-1), 0); refresh(); stop_window(); *************** *** 861,864 **** --- 871,875 ---- * switches display options; there is surely an easier way to do it... */ + color_char gr_obj_char(int ix) { *************** *** 895,899 **** * user switches display options on us. */ ! gr_obj_index() { /* initialize groc array and check for failing case */ --- 906,911 ---- * user switches display options on us. */ ! ! int gr_obj_index(void) { /* initialize groc array and check for failing case */ *************** *** 913,917 **** * gr_obj_char() or gr_obj_index() */ ! static init_groc_array() { int i; --- 925,930 ---- * gr_obj_char() or gr_obj_index() */ ! ! static void init_groc_array(void) /* only used within this file */ { int i; Index: message.c =================================================================== RCS file: /cvsroot/rogueclone/rogue/src/message.c,v retrieving revision 1.4 retrieving revision 1.4.2.1 diff -C2 -d -r1.4 -r1.4.2.1 *** message.c 14 Feb 2004 13:42:31 -0000 1.4 --- message.c 10 Jul 2004 14:52:18 -0000 1.4.2.1 *************** *** 60,66 **** extern short cur_level; ! message(msg, intrpt) ! char *msg; ! boolean intrpt; { cant_int = 1; --- 60,68 ---- extern short cur_level; ! ! static void pad(char *s, short n); /*only used in this file*/ ! ! ! void message(char *msg, boolean intrpt) { cant_int = 1; *************** *** 88,92 **** refresh(); msg_cleared = 0; ! msg_col = strlen(msg); cant_int = 0; --- 90,94 ---- refresh(); msg_cleared = 0; ! msg_col = (short) strlen(msg); cant_int = 0; *************** *** 98,103 **** } ! remessage(c) ! short c; { if (imsg != -1) { --- 100,104 ---- } ! void remessage(short c) { if (imsg != -1) { *************** *** 114,118 **** } ! check_message() { if (msg_cleared) { --- 115,119 ---- } ! void check_message(void) { if (msg_cleared) { *************** *** 125,128 **** --- 126,134 ---- } + /*OLD_CODE - note - arguments (prompt, insert, buf) are in a different order + in the argument list than in the argument type declaration below. Can this be + an issue on some compilers? The three calling files (object.c, pack.c and + zap.c) all use 'buf' as the third argument. + get_input_line(prompt, insert, buf, if_cancelled, add_blank, do_echo) char *prompt, *buf, *insert; *************** *** 130,133 **** --- 136,141 ---- boolean add_blank; boolean do_echo; + */ + short get_input_line(char *prompt, char *insert, char *buf, char *if_cancelled, boolean add_blank, boolean do_echo) { short ch; *************** *** 135,144 **** message(prompt, 0); ! n = strlen(prompt); if (insert[0]) { mvaddstr(0, n + 1, insert); (void) strcpy(buf, insert); ! i = strlen(insert); move(0, (n + i + 1)); refresh(); --- 143,152 ---- message(prompt, 0); ! n = (short) strlen(prompt); if (insert[0]) { mvaddstr(0, n + 1, insert); (void) strcpy(buf, insert); ! i = (short) strlen(insert); move(0, (n + i + 1)); refresh(); *************** *** 148,152 **** if ((ch >= ' ') && (ch <= '~') && (i < MAX_TITLE_LENGTH-2)) { if ((ch != ' ') || (i > 0)) { ! buf[i++] = ch; if (do_echo) { addch(ch); --- 156,160 ---- if ((ch >= ' ') && (ch <= '~') && (i < MAX_TITLE_LENGTH-2)) { if ((ch != ' ') || (i > 0)) { ! buf[i++] = (char) ch; if (do_echo) { addch(ch); *************** *** 188,197 **** */ ! print_stats(stat_mask) ! register stat_mask; { char buf[16]; boolean label; ! int row = DROWS - 1; byte color; --- 196,204 ---- */ ! void print_stats(int stat_mask) { char buf[16]; boolean label; ! short row = DROWS - 1; byte color; *************** *** 276,286 **** } ! pad(s, n) ! char *s; ! short n; { short i; ! for (i = strlen(s); i < n; i++) { addch(' '); } --- 283,291 ---- } ! static void pad(char *s, short n) /*only used in this file*/ { short i; ! for (i = (short) strlen(s); i < n; i++) { addch(' '); } *************** *** 290,294 **** /* NS: We convert to ASCII characters before saving, if necessary. */ ! save_screen() { FILE *fp; --- 295,299 ---- /* NS: We convert to ASCII characters before saving, if necessary. */ ! void save_screen(void) { FILE *fp; *************** *** 308,312 **** found_non_blank = 0; for (j = (DCOLS - 1); j >= 0; j--) { ! buf[j] = mvinch(i, j); if (!found_non_blank) { if ((buf[j] != ' ') || (j == 0)) { --- 313,317 ---- found_non_blank = 0; for (j = (DCOLS - 1); j >= 0; j--) { ! buf[j] = (char) mvinch(i, j); if (!found_non_blank) { if ((buf[j] != ' ') || (j == 0)) { *************** *** 330,334 **** } ! sound_bell() { putchar(7); --- 335,339 ---- } ! void sound_bell(void) { putchar(7); *************** *** 336,355 **** } ! boolean ! is_digit(ch) ! short ch; { ! return((ch >= '0') && (ch <= '9')); } ! r_index(str, ch, last) ! char *str; ! int ch; ! boolean last; { int i = 0; if (last) { ! for (i = strlen(str) - 1; i >= 0; i--) { if (str[i] == ch) { return(i); --- 341,361 ---- } ! boolean is_digit(short ch) { ! /* return((ch >= '0') && (ch <= '9')); fix compiler warning */ ! ! if ((ch >= '0') && (ch <= '9')) ! return(1); ! ! return(0); } ! ! int r_index(char *str, int ch, boolean last) { int i = 0; if (last) { ! for (i = (int) (strlen(str) - 1); i >= 0; i--) { if (str[i] == ch) { return(i); Index: invent.c =================================================================== RCS file: /cvsroot/rogueclone/rogue/src/invent.c,v retrieving revision 1.5 retrieving revision 1.5.2.1 diff -C2 -d -r1.5 -r1.5.2.1 *** invent.c 16 Feb 2004 04:07:31 -0000 1.5 --- invent.c 10 Jul 2004 14:52:18 -0000 1.5.2.1 *************** *** 226,232 **** /* =================== FUNCTIONS ================= */ ! inventory(pack, mask) ! object *pack; ! unsigned short mask; { object *obj; --- 226,236 ---- /* =================== FUNCTIONS ================= */ ! static int pr_com_id(int ch); /* only used within this file */ ! static int get_com_id(int *index, short ch); /* only used within this file */ ! static int pr_motion_char(int ch); /* only used within this file */ ! ! ! ! void inventory(object *pack, unsigned short mask) { object *obj; *************** *** 259,263 **** descs[i][0].b8.ch = ' '; descs[i][1].b8.color = letter_color; ! descs[i][1].b8.ch = obj->ichar; if ((obj->what_is & ARMOR) && obj->is_protected) { descs[i][2].b8.color = protect_color; --- 263,267 ---- descs[i][0].b8.ch = ' '; descs[i][1].b8.color = letter_color; ! descs[i][1].b8.ch = (char) obj->ichar; if ((obj->what_is & ARMOR) && obj->is_protected) { descs[i][2].b8.color = protect_color; *************** *** 272,276 **** get_desc(obj, bwdesc); (void) colorize(bwdesc, item_color, descs[i]+4); ! if ((n = strlen(bwdesc)+4) > maxlen) { maxlen = n; } --- 276,280 ---- get_desc(obj, bwdesc); (void) colorize(bwdesc, item_color, descs[i]+4); ! if ((n = (short) (strlen(bwdesc)+4) ) > maxlen) { maxlen = n; } *************** *** 280,284 **** } (void) colorize(press_space, MAKE_COLOR(WHITE, BLACK), descs[i++]); ! // (void) strcpy(descs[i++], press_space); if (maxlen < 27) maxlen = 27; col = DCOLS - (maxlen + 2); --- 284,288 ---- } (void) colorize(press_space, MAKE_COLOR(WHITE, BLACK), descs[i++]); ! /* (void) strcpy(descs[i++], press_space); */ if (maxlen < 27) maxlen = 27; col = DCOLS - (maxlen + 2); *************** *** 305,309 **** } ! id_com() { int ch = 0; --- 309,314 ---- } ! ! void id_com(void) { int ch = 0; *************** *** 381,390 **** } ! pr_com_id(ch) ! int ch; { int i; ! if (!get_com_id(&i, ch)) { return(0); } --- 386,395 ---- } ! ! static int pr_com_id(int ch) /* only used within this file */ { int i; ! if (!get_com_id(&i, (short) ch)) { return(0); } *************** *** 394,400 **** } ! get_com_id(index, ch) ! int *index; ! short ch; { short i; --- 399,404 ---- } ! ! static int get_com_id(int *index, short ch) /* only used within this file */ { short i; *************** *** 409,414 **** } ! pr_motion_char(ch) ! int ch; { if ( (ch == 'J') || --- 413,418 ---- } ! ! static int pr_motion_char(int ch) /* only used within this file */ { if ( (ch == 'J') || *************** *** 433,437 **** if (ch <= '\031') { ch += 96; ! // (void) strcpy(until, "until adjascent"); (void) strcpy(until, "until adjacent"); /* NS - :-) */ } else { --- 437,441 ---- if (ch <= '\031') { ch += 96; ! /* // (void) strcpy(until, "until adjascent"); */ (void) strcpy(until, "until adjacent"); /* NS - :-) */ } else { *************** *** 439,443 **** until[0] = '\0'; } ! (void) get_com_id(&n, ch); sprintf(buf, "run %s %s", com_id_tab[n].com_desc + 8, until); check_message(); --- 443,447 ---- until[0] = '\0'; } ! (void) get_com_id(&n, (short) ch); sprintf(buf, "run %s %s", com_id_tab[n].com_desc + 8, until); check_message(); *************** *** 449,453 **** } ! mix_colors() { short i, j, k; --- 453,457 ---- } ! void mix_colors(void) { short i, j, k; *************** *** 455,460 **** for (i = 0; i <= 32; i++) { ! j = get_rand(0, (POTIONS - 1)); ! k = get_rand(0, (POTIONS - 1)); t = id_potions[j].title; id_potions[j].title = id_potions[k].title; --- 459,464 ---- for (i = 0; i <= 32; i++) { ! j = (short) get_rand(0, (POTIONS - 1)); ! k = (short) get_rand(0, (POTIONS - 1)); t = id_potions[j].title; id_potions[j].title = id_potions[k].title; *************** *** 463,467 **** } ! make_scroll_titles() { short i, j, n; --- 467,472 ---- } ! ! void make_scroll_titles(void) { short i, j, n; *************** *** 469,487 **** for (i = 0; i < SCROLS; i++) { ! sylls = get_rand(2, 5); (void) strcpy(id_scrolls[i].title, "'"); for (j = 0; j < sylls; j++) { ! s = get_rand(1, (MAXSYLLABLES-1)); (void) strcat(id_scrolls[i].title, syllables[s]); } ! n = strlen(id_scrolls[i].title); (void) strcpy(id_scrolls[i].title+(n-1), "' "); } } ! get_desc(obj, desc) ! object *obj; ! char *desc; { char *item_name; --- 474,491 ---- for (i = 0; i < SCROLS; i++) { ! sylls = (short) get_rand(2, 5); (void) strcpy(id_scrolls[i].title, "'"); for (j = 0; j < sylls; j++) { ! s = (short) get_rand(1, (MAXSYLLABLES-1)); (void) strcat(id_scrolls[i].title, syllables[s]); } ! n = (short) strlen(id_scrolls[i].title); (void) strcpy(id_scrolls[i].title+(n-1), "' "); } } ! ! void get_desc(object *obj, char *desc) { char *item_name; *************** *** 627,631 **** if (!strncmp(desc, "a ", 2)) { if (is_vowel(desc[2])) { ! for (i = strlen(desc) + 1; i > 1; i--) { desc[i] = desc[i-1]; } --- 631,635 ---- if (!strncmp(desc, "a ", 2)) { if (is_vowel(desc[2])) { ! for (i = (short) strlen(desc) + 1; i > 1; i--) { desc[i] = desc[i-1]; } *************** *** 644,648 **** } ! get_wand_and_ring_materials() { short i, j; --- 648,653 ---- } ! ! void get_wand_and_ring_materials(void) { short i, j; *************** *** 654,662 **** for (i = 0; i < WANDS; i++) { do { ! j = get_rand(0, WAND_MATERIALS-1); } while (used[j]); used[j] = 1; (void) strcpy(id_wands[i].title, wand_materials[j]); ! is_wood[i] = (j > MAX_METAL); } for (i = 0; i < GEMS; i++) { --- 659,667 ---- for (i = 0; i < WANDS; i++) { do { ! j = (short) get_rand(0, WAND_MATERIALS-1); } while (used[j]); used[j] = 1; (void) strcpy(id_wands[i].title, wand_materials[j]); ! is_wood[i] = (boolean) (j > MAX_METAL); } for (i = 0; i < GEMS; i++) { *************** *** 665,669 **** for (i = 0; i < RINGS; i++) { do { ! j = get_rand(0, GEMS-1); } while (used[j]); used[j] = 1; --- 670,674 ---- for (i = 0; i < RINGS; i++) { do { ! j = (short) get_rand(0, GEMS-1); } while (used[j]); used[j] = 1; *************** *** 672,677 **** } ! single_inv(ichar) ! short ichar; { short ch; --- 677,682 ---- } ! ! void single_inv(short ichar) { short ch; *************** *** 688,692 **** return; } ! desc[0] = ch; desc[1] = ((obj->what_is & ARMOR) && obj->is_protected) ? '}' : ')'; desc[2] = ' '; --- 693,697 ---- return; } ! desc[0] = (char) ch; desc[1] = ((obj->what_is & ARMOR) && obj->is_protected) ? '}' : ')'; desc[2] = ' '; *************** *** 696,702 **** } ! struct id * ! get_id_table(obj) ! object *obj; { switch(obj->what_is) { --- 701,706 ---- } ! ! struct id * get_id_table(object *obj) { switch(obj->what_is) { *************** *** 717,722 **** } ! inv_armor_weapon(is_weapon) ! boolean is_weapon; { if (is_weapon) { --- 721,726 ---- } ! ! void inv_armor_weapon(boolean is_weapon) { if (is_weapon) { *************** *** 735,739 **** } ! id_type() { char *id; --- 739,744 ---- } ! ! void id_type(void) { char *id; Index: zap.c =================================================================== RCS file: /cvsroot/rogueclone/rogue/src/zap.c,v retrieving revision 1.4 retrieving revision 1.4.2.1 diff -C2 -d -r1.4 -r1.4.2.1 *** zap.c 30 Jan 2004 20:33:03 -0000 1.4 --- zap.c 10 Jul 2004 14:52:18 -0000 1.4.2.1 *************** *** 52,59 **** extern short cur_room; ! void bounce(short ball, short dir, short row, short col, short r); ! zapp() { short wch; --- 52,62 ---- extern short cur_room; ! ! static object * get_zapped_monster(short dir, short *row, short *col); /*only used within this file*/static void zap_monster(object *monster, unsigned short kind); /*only used within this file*/ ! static void tele_away(object *monster); /*only used within this file*/ ! static void wdrain_life(object *monster); /*only used within this file*/ ! void zapp(void) { short wch; *************** *** 109,116 **** } ! object * ! get_zapped_monster(dir, row, col) ! short dir; ! short *row, *col; { short orow, ocol; --- 112,117 ---- } ! ! static object * get_zapped_monster(short dir, short *row, short *col) /*only used within this file*/ { short orow, ocol; *************** *** 132,138 **** } ! zap_monster(monster, kind) ! object *monster; ! unsigned short kind; { short row, col; --- 133,138 ---- } ! ! static void zap_monster(object *monster, unsigned short kind) /*only used within this file*/ { short row, col; *************** *** 199,204 **** } ! tele_away(monster) ! object *monster; { short row, col; --- 199,204 ---- } ! ! static void tele_away(object *monster) /*only used within this file*/ { short row, col; *************** *** 218,222 **** } ! wizardize() { char buf[100]; --- 218,223 ---- } ! ! void wizardize(void) { char buf[100]; *************** *** 228,232 **** if (get_input_line("wizard's password:", "", buf, "", 0, 0)) { (void) xxx(1); ! xxxx(buf, strlen(buf)); if (!strncmp(buf, "\247\104\126\272\115\243\027", 7)) { wizard = 1; --- 229,233 ---- if (get_input_line("wizard's password:", "", buf, "", 0, 0)) { (void) xxx(1); ! xxxx(buf, (short) strlen(buf)); if (!strncmp(buf, "\247\104\126\272\115\243\027", 7)) { wizard = 1; *************** *** 240,245 **** } ! wdrain_life(monster) ! object *monster; { short hp; --- 241,246 ---- } ! ! static void wdrain_life(object *monster) /*only used within this file*/ { short hp; *************** *** 273,278 **** * hit along its path. */ ! static void clear_wand_effect(short orow, short ocol, short row, short col, short dir) { ! // short ch; message("", 0); /* causes a --more-- message */ --- 274,280 ---- * hit along its path. */ ! static void clear_wand_effect(short orow, short ocol, short row, short col, short dir) ! { ! /* // short ch; */ message("", 0); /* causes a --more-- message */ *************** *** 282,287 **** get_dir_rc(dir, &orow, &ocol, 1); mvaddcch(orow, ocol, get_dungeon_char(orow, ocol)); ! // ch = mvinch(orow, ocol); // mvaddch(orow, ocol, ch); } mvaddcch(rogue.row, rogue.col, get_rogue_char()); --- 284,290 ---- get_dir_rc(dir, &orow, &ocol, 1); mvaddcch(orow, ocol, get_dungeon_char(orow, ocol)); ! /* // ch = mvinch(orow, ocol); // mvaddch(orow, ocol, ch); + */ } mvaddcch(rogue.row, rogue.col, get_rogue_char()); *************** *** 331,335 **** * function is no less hideous, though. :-) */ ! void bounce(short ball, short dir, short row, short col, short r) { short orow, ocol, new_dir = -1; char buf[DCOLS]; --- 334,340 ---- * function is no less hideous, though. :-) */ ! ! void bounce(short ball, short dir, short row, short col, short r) ! { short orow, ocol, new_dir = -1; char buf[DCOLS]; *************** *** 341,345 **** if (++r == 1) { ! btime = get_rand(3, 6); } else if (r > btime) { return; --- 346,350 ---- if (++r == 1) { ! btime = (short) get_rand(3, 6); } else if (r > btime) { return; *************** *** 362,366 **** orow = row; ocol = col; ! // standout(); do { get_dir_rc(dir, &row, &col, 1); --- 367,371 ---- orow = row; ocol = col; ! /* // standout(); */ do { get_dir_rc(dir, &row, &col, 1); *************** *** 375,379 **** (dungeon[row][col] & ANYROOMSIDE) || ((row == rogue.row) && (col == rogue.col)))); ! // standend(); refresh(); --- 380,384 ---- (dungeon[row][col] & ANYROOMSIDE) || ((row == rogue.row) && (col == rogue.col)))); ! /* // standend(); */ refresh(); *************** *** 396,400 **** damage = (monster->hp_to_kill / 10) + 1; } else { ! damage = get_rand((rogue.hp_current / 3), rogue.hp_max); } } else { --- 401,405 ---- damage = (monster->hp_to_kill / 10) + 1; } else { ! damage = (short) get_rand((rogue.hp_current / 3), rogue.hp_max); } } else { *************** *** 412,416 **** clear_wand_effect(orow, ocol, row, col, dir); monster->m_flags |= (ASLEEP | NAPPING); ! monster->nap_length = get_rand(3, 6); } else { damage = rogue.hp_current / 4; --- 417,421 ---- clear_wand_effect(orow, ocol, row, col, dir); monster->m_flags |= (ASLEEP | NAPPING); ! monster->nap_length = (short) get_rand(3, 6); } else { damage = rogue.hp_current / 4; *************** *** 432,439 **** goto ND; } else { ! damage = get_rand(3, (3 * rogue.exp)); if (ball == FIRE) { damage = (damage * 3) / 2; ! damage -= get_armor_class(rogue.armor); } sprintf(buf, "the %s hits you", s); --- 437,444 ---- goto ND; } else { ! damage = (short) get_rand(3, (3 * rogue.exp)); if (ball == FIRE) { damage = (damage * 3) / 2; ! damage -= (short) get_armor_class(rogue.armor); } sprintf(buf, "the %s hits you", s); *************** *** 447,451 **** ND: for (i = 0; i < 10; i++) { ! ndir = get_rand(0, DIRS-1); nrow = row; ncol = col; --- 452,456 ---- ND: for (i = 0; i < 10; i++) { ! ndir = (short) get_rand(0, DIRS-1); nrow = row; ncol = col; Index: play.c =================================================================== RCS file: /cvsroot/rogueclone/rogue/src/play.c,v retrieving revision 1.5 retrieving revision 1.5.2.1 diff -C2 -d -r1.5 -r1.5.2.1 *** play.c 16 Feb 2004 01:01:46 -0000 1.5 --- play.c 10 Jul 2004 14:52:18 -0000 1.5.2.1 *************** *** 55,59 **** extern boolean wizard, trap_door; ! play_level() { short ch; --- 55,59 ---- extern boolean wizard, trap_door; ! void play_level(void) { short ch; *************** *** 83,87 **** break; case 's': ! search(((count > 0) ? count : 1), 0); break; case 'i': --- 83,87 ---- break; case 's': ! search( (short) ((count > 0) ? count : 1), 0); break; case 'i': *************** *** 153,157 **** case '\020': do { ! remessage(count++); ch = rgetchar(); } while (ch == '\020'); --- 153,157 ---- case '\020': do { ! remessage( (short) count++); ch = rgetchar(); } while (ch == '\020'); *************** *** 173,177 **** case ')': case ']': ! inv_armor_weapon(ch == ')'); break; case '=': --- 173,177 ---- case ')': case ']': ! inv_armor_weapon( (boolean) (ch == ')') ); break; case '=': Index: monster.c =================================================================== RCS file: /cvsroot/rogueclone/rogue/src/monster.c,v retrieving revision 1.3 retrieving revision 1.3.2.1 diff -C2 -d -r1.3 -r1.3.2.1 *** monster.c 30 Jan 2004 20:33:03 -0000 1.3 --- monster.c 10 Jul 2004 14:52:18 -0000 1.3.2.1 *************** *** 119,123 **** extern short stealthy; ! put_mons() { short i; --- 119,134 ---- extern short stealthy; ! ! static int mtry(object *monster, short row, short col); /*only used within this file*/ ! static short rogue_is_around(short row, short col); /*only used within this file*/ ! static void put_m_at(short row, short col, object *monster); /*only used within this file*/ ! static void aim_monster(object *monster); /*only used within this file*/ ! static int move_confused(object *monster); /*only used within this file*/ ! static int flit(object *monster); /*only used within this file*/ ! static int no_room_for_monster(int rn); /*only used within this file*/ ! ! ! ! void put_mons(void) { short i; *************** *** 126,130 **** short row, col; ! n = get_rand(4, 6); for (i = 0; i < n; i++) { --- 137,141 ---- short row, col; ! n = (short) get_rand(4, 6); for (i = 0; i < n; i++) { *************** *** 138,145 **** } ! object * ! gr_monster(monster, mn) ! register object *monster; ! register mn; { if (!monster) { --- 149,154 ---- } ! ! object * gr_monster(object *monster, int mn) { if (!monster) { *************** *** 165,171 **** } ! mv_mons() { ! register object *monster, *next_monster, *test_mons; boolean flew; --- 174,181 ---- } ! ! void mv_mons(void) { ! object *monster, *next_monster, *test_mons; boolean flew; *************** *** 227,232 **** } ! party_monsters(rn, n) ! int rn, n; { short i, j; --- 237,242 ---- } ! ! void party_monsters(int rn, int n) { short i, j; *************** *** 245,251 **** } for (j = found = 0; ((!found) && (j < 250)); j++) { ! row = get_rand(rooms[rn].top_row+1, rooms[rn].bottom_row-1); ! col = get_rand(rooms[rn].left_col+1, rooms[rn].right_col-1); if ((!(dungeon[row][col] & MONSTER)) && --- 255,261 ---- } for (j = found = 0; ((!found) && (j < 250)); j++) { ! row = (short) get_rand(rooms[rn].top_row+1, rooms[rn].bottom_row-1); ! col = (short) get_rand(rooms[rn].left_col+1, rooms[rn].right_col-1); if ((!(dungeon[row][col] & MONSTER)) && *************** *** 271,277 **** * except for imitators. */ ! color_char gmc_row_col(register row, register col) { ! register object *monster; color_char cc; --- 281,287 ---- * except for imitators. */ ! color_char gmc_row_col(short row, short col) { ! object *monster; color_char cc; *************** *** 305,316 **** /* your garden variety monster */ cc.b8.color = MAKE_COLOR(WHITE,BLACK); ! cc.b8.ch = monster->m_char; return(cc); } ! mv_1_monster(monster, row, col) ! register object *monster; ! short row, col; { short i, n; --- 315,324 ---- /* your garden variety monster */ cc.b8.color = MAKE_COLOR(WHITE,BLACK); ! cc.b8.ch = (char) monster->m_char; return(cc); } ! void mv_1_monster(object *monster, short row, short col) { short i, n; *************** *** 391,395 **** for (i = 0; i < 6; i++) { ! NEXT_TRY: n = get_rand(0, 5); switch(n) { case 0: --- 399,403 ---- for (i = 0; i < 6; i++) { ! NEXT_TRY: n = (short) get_rand(0, 5); switch(n) { case 0: *************** *** 435,440 **** if ((monster->trow == NO_ROOM) && (!mon_sees(monster, rogue.row, rogue.col))) { ! monster->trow = get_rand(1, (DROWS - 2)); ! monster->tcol = get_rand(0, (DCOLS - 1)); } else { monster->trow = NO_ROOM; --- 443,448 ---- if ((monster->trow == NO_ROOM) && (!mon_sees(monster, rogue.row, rogue.col))) { ! monster->trow = (short) get_rand(1, (DROWS - 2)); ! monster->tcol = (short) get_rand(0, (DCOLS - 1)); } else { monster->trow = NO_ROOM; *************** *** 449,455 **** } ! mtry(monster, row, col) ! register object *monster; ! register short row, col; { if (mon_can_go(monster, row, col)) { --- 457,462 ---- } ! ! static int mtry(object *monster, short row, short col) /*only used within this file*/ { if (mon_can_go(monster, row, col)) { *************** *** 460,469 **** } ! move_mon_to(monster, row, col) ! register object *monster; ! register short row, col; { short c; ! register mrow, mcol; mrow = monster->row; --- 467,475 ---- } ! ! void move_mon_to(object *monster, short row, short col) { short c; ! short mrow, mcol; mrow = monster->row; *************** *** 473,477 **** dungeon[row][col] |= MONSTER; ! c = mvinch(mrow, mcol); if ((c >= 'A') && (c <= 'Z')) { --- 479,483 ---- dungeon[row][col] |= MONSTER; ! c = (short) mvinch(mrow, mcol); if ((c >= 'A') && (c <= 'Z')) { *************** *** 510,516 **** } ! mon_can_go(monster, row, col) ! register object *monster; ! register short row, col; { object *obj; --- 516,521 ---- } ! ! short mon_can_go(object *monster, short row, short col) { object *obj; *************** *** 551,556 **** } ! wake_up(monster) ! object *monster; { if (!(monster->m_flags & NAPPING)) { --- 556,561 ---- } ! ! void wake_up(object *monster) { if (!(monster->m_flags & NAPPING)) { *************** *** 559,566 **** } ! wake_room(rn, entering, row, col) ! short rn; ! boolean entering; ! short row, col; { object *monster; --- 564,569 ---- } ! ! void wake_room(short rn, boolean entering, short row, short col) { object *monster; *************** *** 576,580 **** while (monster) { ! in_room = (rn == get_room_number(monster->row, monster->col)); if (in_room) { if (entering) { --- 579,583 ---- while (monster) { ! in_room = (boolean) (rn == get_room_number(monster->row, monster->col)); if (in_room) { if (entering) { *************** *** 595,601 **** } ! char * ! mon_name(monster) ! object *monster; { short ch; --- 598,603 ---- } ! ! char * mon_name(object *monster) { short ch; *************** *** 606,610 **** } if (halluc) { ! ch = get_rand('A', 'Z') - 'A'; return(m_names[ch]); } --- 608,612 ---- } if (halluc) { ! ch = (short) (get_rand('A', 'Z') - 'A'); return(m_names[ch]); } *************** *** 613,618 **** } ! rogue_is_around(row, col) ! register row, col; { short rdif, cdif, retval; --- 615,620 ---- } ! ! static short rogue_is_around(short row, short col) /*only used within this file*/ { short rdif, cdif, retval; *************** *** 625,629 **** } ! wanderer() { object *monster; --- 627,632 ---- } ! ! void wanderer(void) { object *monster; *************** *** 655,659 **** } ! show_monsters() { object *monster; --- 658,663 ---- } ! ! void show_monsters(void) { object *monster; *************** *** 676,680 **** } ! create_monster() { short row, col; --- 680,685 ---- } ! ! void create_monster(void) { short row, col; *************** *** 711,717 **** } ! put_m_at(row, col, monster) ! short row, col; ! object *monster; { monster->row = row; --- 716,721 ---- } ! ! static void put_m_at(short row, short col, object *monster) /*only used within this file*/ { monster->row = row; *************** *** 723,733 **** } ! aim_monster(monster) ! object *monster; { short i, rn, d, r; rn = get_room_number(monster->row, monster->col); ! r = get_rand(0, 12); for (i = 0; i < 4; i++) { --- 727,737 ---- } ! ! static void aim_monster(object *monster) /*only used within this file*/ { short i, rn, d, r; rn = get_room_number(monster->row, monster->col); ! r = (short) get_rand(0, 12); for (i = 0; i < 4; i++) { *************** *** 741,748 **** } ! rogue_can_see(row, col) ! register row, col; { ! register retval; retval = !blind && --- 745,751 ---- } ! int rogue_can_see(short row, short col) { ! int retval; retval = !blind && *************** *** 754,759 **** } ! move_confused(monster) ! object *monster; { short i, row, col; --- 757,762 ---- } ! ! static int move_confused(object *monster) /*only used within this file*/ { short i, row, col; *************** *** 784,789 **** } ! flit(monster) ! object *monster; { short i, row, col; --- 787,792 ---- } ! ! static int flit(object *monster) /*only used within this file*/ { short i, row, col; *************** *** 810,815 **** } ! no_room_for_monster(rn) ! int rn; { short i, j; --- 813,818 ---- } ! ! static int no_room_for_monster(int rn) /*only used within this file*/ { short i, j; *************** *** 825,829 **** } ! aggravate() { object *monster; --- 828,833 ---- } ! ! void aggravate(void) { object *monster; *************** *** 843,849 **** } ! boolean mon_sees(monster, row, col) object *monster; { short rn, rdif, cdif, retval; --- 847,857 ---- } ! /* OLD_CODE - row, col implicitly defined ! boolean mon_sees(monster, row, col) object *monster; + */ + + boolean mon_sees(object *monster, short row, short col) { short rn, rdif, cdif, retval; *************** *** 860,867 **** retval = (rdif >= -1) && (rdif <= 1) && (cdif >= -1) && (cdif <= 1); ! return(retval); } ! mv_aquatars() { object *monster; --- 868,876 ---- retval = (rdif >= -1) && (rdif <= 1) && (cdif >= -1) && (cdif <= 1); ! return( (boolean) retval); } ! ! void mv_aquatars(void) { object *monster; Index: throw.c =================================================================== RCS file: /cvsroot/rogueclone/rogue/src/throw.c,v retrieving revision 1.3 retrieving revision 1.3.2.1 diff -C2 -d -r1.3 -r1.3.2.1 *** throw.c 30 Jan 2004 20:33:03 -0000 1.3 --- throw.c 10 Jul 2004 14:52:18 -0000 1.3.2.1 *************** *** 51,55 **** extern char hit_message[]; ! throw() { short wch, d; --- 51,62 ---- extern char hit_message[]; ! ! static int throw_at_monster(object *monster, object *weapon); /*only used within this file*/ ! static object * get_thrown_at_monster(object *obj, short dir, short *row, short *col); /*only used within this file*/ ! static void flop_weapon(object *weapon, short row, short col); /*only used within this file*/ ! ! ! ! void throw(void) { short wch, d; *************** *** 114,119 **** } ! throw_at_monster(monster, weapon) ! object *monster, *weapon; { short damage, hit_chance; --- 121,126 ---- } ! ! static int throw_at_monster(object *monster, object *weapon) /*only used within this file*/ { short damage, hit_chance; *************** *** 149,157 **** } ! object * ! get_thrown_at_monster(obj, dir, row, col) ! object *obj; ! short dir; ! short *row, *col; { short orow, ocol; --- 156,161 ---- } ! ! static object * get_thrown_at_monster(object *obj, short dir, short *row, short *col) /*only used within this file*/ { short orow, ocol; *************** *** 195,201 **** } ! flop_weapon(weapon, row, col) ! object *weapon; ! short row, col; { object *new_weapon, *monster; --- 199,204 ---- } ! ! static void flop_weapon(object *weapon, short row, short col) /*only used within this file*/ { object *new_weapon, *monster; *************** *** 231,235 **** dcch.b16 = get_dungeon_char(row, col).b16; if (mon) { ! mch = mvinch(row, col); if (monster = object_at(&level_monsters, row, col)) { monster->trail_char.b16 = dcch.b16; --- 234,238 ---- dcch.b16 = get_dungeon_char(row, col).b16; if (mon) { ! mch = (short) mvinch(row, col); if (monster = object_at(&level_monsters, row, col)) { monster->trail_char.b16 = dcch.b16; *************** *** 255,260 **** } ! rand_around(i, r, c) ! short i, *r, *c; { static char* pos = "\010\007\001\003\004\005\002\006\0"; --- 258,263 ---- } ! ! void rand_around(short i, short *r, short *c) { static char* pos = "\010\007\001\003\004\005\002\006\0"; *************** *** 268,279 **** col = *c; ! o = get_rand(1, 8); for (j = 0; j < 5; j++) { ! x = get_rand(0, 8); y = (x + o) % 9; t = pos[x]; pos[x] = pos[y]; ! pos[y] = t; } } --- 271,282 ---- col = *c; ! o = (short) get_rand(1, 8); for (j = 0; j < 5; j++) { ! x = (short) get_rand(0, 8); y = (x + o) % 9; t = pos[x]; pos[x] = pos[y]; ! pos[y] = (char) t; } } Index: hit.c =================================================================== RCS file: /cvsroot/rogueclone/rogue/src/hit.c,v retrieving revision 1.4 retrieving revision 1.4.2.1 diff -C2 -d -r1.4 -r1.4.2.1 *** hit.c 14 Feb 2004 13:42:31 -0000 1.4 --- hit.c 10 Jul 2004 14:52:18 -0000 1.4.2.1 *************** *** 54,59 **** extern boolean being_held, interrupted, wizard, con_mon; ! mon_hit(monster) ! register object *monster; { short damage, hit_chance; --- 54,63 ---- extern boolean being_held, interrupted, wizard, con_mon; ! ! static short to_hit(object *obj); /* only used within this file */ ! static short damage_for_strength(void); /*only used within this file*/ ! ! ! void mon_hit(object *monster) { short damage, hit_chance; *************** *** 97,102 **** minus = (float) ((AMULET_LEVEL * 2) - cur_level); } else { ! minus = (float) get_armor_class(rogue.armor) * 3.00; ! minus = minus/100.00 * (float) damage; } damage -= (short) minus; --- 101,106 ---- minus = (float) ((AMULET_LEVEL * 2) - cur_level); } else { ! minus = (float) (get_armor_class(rogue.armor) * 3.00); /* fix compiler warning */ ! minus = (float) (minus/100.00) * (float) damage; /* fix compiler warning */ } damage -= (short) minus; *************** *** 115,121 **** } ! rogue_hit(monster, force_hit) ! register object *monster; ! boolean force_hit; { short damage, hit_chance; --- 119,124 ---- } ! ! void rogue_hit(object *monster, boolean force_hit) { short damage, hit_chance; *************** *** 153,160 **** } ! rogue_damage(d, monster, other) ! short d; ! object *monster; ! short other; { if (d >= rogue.hp_current) { --- 156,161 ---- } ! ! void rogue_damage(short d, object *monster, short other) { if (d >= rogue.hp_current) { *************** *** 169,177 **** } ! get_damage(ds, r) ! char *ds; ! boolean r; { ! register i = 0, j, n, d, total = 0; while (ds[i]) { --- 170,177 ---- } ! ! short get_damage(char *ds, boolean r) { ! int i = 0, j, n, d, total = 0; while (ds[i]) { *************** *** 192,204 **** } } ! return(total); } ! get_w_damage(obj) ! object *obj; { char new_damage[12]; ! register to_hit, damage; ! register i = 0; if ((!obj) || (obj->what_is != WEAPON)) { --- 192,204 ---- } } ! return( (short) total); } ! ! static short get_w_damage(object *obj) /*only used within this file*/ { char new_damage[12]; ! int to_hit, damage; ! int i = 0; if ((!obj) || (obj->what_is != WEAPON)) { *************** *** 214,222 **** } ! get_number(s) ! register char *s; { ! register i = 0; ! register total = 0; while ((s[i] >= '0') && (s[i] <= '9')) { --- 214,222 ---- } ! ! int get_number(char *s) { ! int i = 0; ! int total = 0; while ((s[i] >= '0') && (s[i] <= '9')) { *************** *** 227,233 **** } ! long ! lget_number(s) ! char *s; { short i = 0; --- 227,232 ---- } ! ! long lget_number(char *s) { short i = 0; *************** *** 241,254 **** } ! to_hit(obj) ! object *obj; { if (!obj) { return(1); } ! return(get_number(obj->damage) + obj->hit_enchant); } ! damage_for_strength() { short strength; --- 240,254 ---- } ! ! static short ... [truncated message content] |
From: <mle...@us...> - 2004-02-22 04:20:25
|
Update of /cvsroot/rogueclone/rogue/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21242/doc Added Files: compile.txt readme.txt Log Message: added readme.txt for version 2.1 and compilation instructions --- NEW FILE: compile.txt --- Rogue Clone IV compilation instructions ======================================= Rogue Clone IV can be compiled with a number of different compilers and for a number of different systems. This file contains instructions for building rogue and links to places to go for help if need it. The first thing you should do is visit http://rogueclone.sourceforge.net and make sure you have the latest version of the source code. Then unpack the code to a dedicated new directory, which you can call anything you want. In these instructions it will be referred to as the "top" directory. Below the top directory there should be three subdirectories: The doc directory contains documentation and other general information The src directory contains the source code for Rogue Clone IV The sys directory contains makefiles and other system dependant things To compile a 16-bit DOS executable using Open Watcom 1) cd to the sys subdirectory and run setup wcc 2) cd to the top directory and run wmake To compile a 32-bit DOS executable using DJGPP 1) cd to the sys subdirectory and run setup gcc 2) cd to the top directory run make To compile a 32-bit Windows console application with Visual C++ 1) cd to the sys subdirectory and run setup msc 2) cd to the top directory and run nmake That's it. If everything went as it should have your executable will be in the newly created exe directory. If you experience any problems email the rogueclone-devel mailing list at rog...@li... and ask for help. You can view the list archives at http://sourceforge.net/mailarchive/forum.php?forum_id=37360 --- NEW FILE: readme.txt --- Rogue Clone IV version 2.1 ========================== Welcome to Rogue Clone IV! In previous versions this program was called DOS Rogue Clone. The name was changed when we adapted the game to run as a Windows console application. Expect ports to other systems in the future. The files rogue.html and guide.html contain all the information you need to play. Help is also available within the game by using the '?' and '/' commands. To get the latest version of Rogue Clone IV, visit http://rogueclone.sourceforge.net on the web. At our web site you will find news about current and upcoming releases, information about the Rogue Clone IV mailing lists, forms for submitting patches and bug reports, nightly development snapshots, and up-to-the-minute source code from our CVS repository. Rogue Clone IV may be freely distributed. See the file LICENSE.TXT for details. |
From: <mle...@us...> - 2004-02-22 04:18:42
|
Update of /cvsroot/rogueclone/rogue/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20881 Modified Files: version.h Log Message: optimistically set release date in comments to tomorrow Index: version.h =================================================================== RCS file: /cvsroot/rogueclone/rogue/src/version.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** version.h 16 Feb 2004 01:01:47 -0000 1.4 --- version.h 22 Feb 2004 04:06:19 -0000 1.5 *************** *** 7,16 **** /* ! * Rogue Clone IV 2.1.0, February ??, 2004 ! * Nick Straguzzi wrote most of the new code for this version * new Windows console application port * DOS port now compiles with Open Watcom and DJGPP (abandoned Watcom 7.0) - * now supports color graphics throughout * uses PC-Rogue high ASCII characters * fixed bug in dragon's fire-breathing aim * fixed several bugs pertaining to object naming under gcc --- 7,15 ---- /* ! * Rogue Clone IV 2.1.0, February 22, 2004 * new Windows console application port * DOS port now compiles with Open Watcom and DJGPP (abandoned Watcom 7.0) * uses PC-Rogue high ASCII characters + * now supports color graphics throughout * fixed bug in dragon's fire-breathing aim * fixed several bugs pertaining to object naming under gcc |
From: <mle...@us...> - 2004-02-21 19:56:00
|
Update of /cvsroot/rogueclone/rogue/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27005/doc Modified Files: guide.html rogue.html Log Message: updated documentation for rogue clone IV Index: guide.html =================================================================== RCS file: /cvsroot/rogueclone/rogue/doc/guide.html,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** guide.html 20 Feb 2004 04:06:15 -0000 1.5 --- guide.html 21 Feb 2004 19:43:51 -0000 1.6 *************** *** 39,65 **** <body> ! <center> ! <h1>A Guide to the Dungeons of Doom</h1> ! ! <p><i>Michael C. Toy<br> ! Kenneth C. R. C. Arnold</i> ! ! <p>Computer Systems Research Group<br> ! Department of Electrical Engineering and Computer Science<br> ! University of California<br> ! Berkeley, California 94720 ! ! <p><i>ABSTRACT</i> ! </center> ! <blockquote> ! <i>Rogue</i> is a visual CRT based fantasy game which runs under the ! UNIX<a href="#endnote1">®</a> timesharing system. ! This paper describes how to play rogue, and gives a few hints for those who ! might otherwise get lost in the Dungeons of Doom. ! </blockquote> ! <h2>1. Introduction</h2> <p>You have just finished your years as a student at the local fighter's guild. --- 39,70 ---- <body> ! <h1>A Guide to the Dungeons of Doom</h1> ! <p><b><a href="#introduction">Introduction</a></b><br> ! <b><a href="#orientation">What is going on here?</a></b><br> ! <b><a href="#screen">The screen</a>:</b> ! <a href="#status">bottom line</a>, ! <a href="#message">top line</a>, ! <a href="#map">rest of the screen</a><br> ! <b><a href="#commands">Commands</a></b><br> ! <b><a href="#rooms">Rooms</a></b><br> ! <b><a href="#fighting">Fighting</a></b><br> ! <b><a href="#objects">Objects</a>:</b> ! <a href="#weapons">weapons</a>, ! <a href="#armor">armor</a>, ! <a href="#scrolls">scrolls</a>, ! <a href="#potions">potions</a>, ! <a href="#wands">staves and wands</a>, ! <a href="#rings">rings</a>, ! <a href="#food">food</a><br> ! <b><a href="#options">Options</a>:</b> ! <a href="#settingoptions">setting options</a>, ! <a href="#optionlist">option list</a><br> ! <b><a href="#scoring">Scoring</a></b><br> ! <b><a href="#credits">Credits</a></b> + <p><hr> ! <h2><a name="introduction">1. Introduction</a></h2> <p>You have just finished your years as a student at the local fighter's guild. *************** *** 84,88 **** ! <h2>2. What is going on here?</h2> <p>You have just begun a game of rogue. Your goal is to grab as much treasure --- 89,93 ---- ! <h2><a name="orientation">2. What is going on here?</a></h2> <p>You have just begun a game of rogue. Your goal is to grab as much treasure *************** *** 92,114 **** on the screen in front of you. ! <p>Rogue differs from most computer fantasy games in that it is screen ! oriented. Commands are all one or two ! keystrokes<a href="#endnote2"><sup><small>2</small></sup></a> and the results ! of your commands are displayed graphically on the screen rather than being ! explained in words.<a href="#endnote3"><sup><small>3</small></sup></a> ! ! <p>Another major difference between rogue and other computer fantasy games is ! that once you have solved all the puzzles in a standard fantasy game, it has ! lost most of its excitement and it ceases to be fun. Rogue, on the other hand, ! generates a new dungeon every time you play it and even the author finds it an ! entertaining and exciting game. ! <h2>3. What do all those things on the screen mean?</h2> <p>In order to understand what is going on in rogue you have to first get some ! grasp of what rogue is doing with the screen. The rogue screen is intended to ! replace the "You can see ..." descriptions of standard fantasy games. Figure 1 ! is a sample of what a rogue screen might look like. <center> --- 97,111 ---- on the screen in front of you. ! <p>Commands in rogue are all one or two keystrokes and the results of your ! commands are displayed graphically on the screen. A minimum screen size of 24 ! lines by 80 columns is required. If the screen is larger, only the 24x80 section ! will be used for the map. ! <h2><a name="screen">3. What do all those things on the screen mean?</a></h2> <p>In order to understand what is going on in rogue you have to first get some ! grasp of what rogue is doing with the screen. Figure 1 is a sample of what a ! rogue screen might look like. <center> *************** *** 129,133 **** ! <h3>3.1 The bottom line</h3> <p>At the bottom line of the screen are a few pieces of cryptic information --- 126,130 ---- ! <h3><a name="status">3.1. The bottom line</a></h3> <p>At the bottom line of the screen are a few pieces of cryptic information *************** *** 178,182 **** ! <h3>3.2 The top line</h3> <p>The top line of the screen is reserved for printing messages that describe --- 175,179 ---- ! <h3><a name="message">3.2. The top line</a></h3> <p>The top line of the screen is reserved for printing messages that describe *************** *** 187,195 **** ! <h3>3.3 The rest of the screen</h3> <p>The rest of the screen is the map of the level as you have explored it so ! far. Each symbol on the screen represents something. Here is a list of what the ! various symbols mean: <p> --- 184,193 ---- ! <h3><a name="map">3.3. The rest of the screen</a></h3> <p>The rest of the screen is the map of the level as you have explored it so ! far. Each symbol on the screen represents something. Below is a list of what the ! original rogue symbols mean. Rogue Clone IV can be configured to draw fancier ! maps with the <i><a href="#PCgraphics">PCgraphics</a></i> option. <p> *************** *** 264,276 **** ! <h2>4. Commands</h2> <p>Commands are given to rogue by typing one or two characters. Most commands can be preceded by a count to repeat them (e.g. typing '<kbd>10s</kbd>' will do ten searches). Commands for which counts make no sense have the count ignored. ! To cancel a count or a prefix, type <kbd><ESC></kbd>. The list of ! commands is rather long, but it can be read at any time during the game with ! the '<kbd>?</kbd>' command. Here it is for reference, with a short explanation ! of each command. <p> --- 262,274 ---- ! <h2><a name="commands">4. Commands</a></h2> <p>Commands are given to rogue by typing one or two characters. Most commands can be preceded by a count to repeat them (e.g. typing '<kbd>10s</kbd>' will do ten searches). Commands for which counts make no sense have the count ignored. ! To cancel a count or a prefix, type <kbd><ESC></kbd>. The list of commands ! is rather long, but it can be read at any time during the game with the ! '<kbd><a href="#help">?</a></kbd>' command. Here it is for reference, with a ! short explanation of each command. <p> *************** *** 278,282 **** <tr valign=top> ! <td><kbd>?</kbd> <td>The help command. Asks for a character to give help on. If you type a '<kbd>*</kbd>', it will list all the commands, otherwise it will explain what --- 276,280 ---- <tr valign=top> ! <td><kbd><a name="#help">?</a></kbd> <td>The help command. Asks for a character to give help on. If you type a '<kbd>*</kbd>', it will list all the commands, otherwise it will explain what *************** *** 291,294 **** --- 289,299 ---- <tr valign=top> + <td><kbd><SCROLL LOCK></kbd> + <td>Toggle Fast Play mode. As well as the keys described below, you may use the + directional keys on the numeric keypad to move around. In Fast Play mode these + keys make you run instead of walk. Use the <kbd><SHIFT></kbd> or + <kbd><CTRL></kbd> keys when you want to move just one space. + + <tr valign=top> <td><kbd>h<br>H<br>^H</kbd> <td>Move left. You move one space to the left. If you use upper case *************** *** 330,340 **** <tr valign=top> ! <td><kbd><<small>SCROLL LOCK</small>></kbd> ! <td>Toggle Fast Play mode. In addition to the keys described above, you may use ! the directional keys on the numeric keypad to move. In Fast Play mode these ! keys will make you run instead of walk. ! ! <tr valign=top> ! <td><kbd>t</kbd> <td>Throw an object. This is a prefix command. When followed with a direction it throws an object in the specified direction. (e.g. type '<kbd>th</kbd>' to --- 335,339 ---- <tr valign=top> ! <td><kbd><a name="#throw">t</a></kbd> <td>Throw an object. This is a prefix command. When followed with a direction it throws an object in the specified direction. (e.g. type '<kbd>th</kbd>' to *************** *** 348,352 **** <tr valign=top> ! <td><a name="move"><kbd>m</kbd></a> <td>Move onto something without picking it up. This will move you one space in the direction you specify and, if there is an object there you can pick up, it --- 347,351 ---- <tr valign=top> ! <td><kbd><a name="move">m</a></kbd> <td>Move onto something without picking it up. This will move you one space in the direction you specify and, if there is an object there you can pick up, it *************** *** 354,358 **** <tr valign=top> ! <td><kbd>z</kbd> <td>Zap prefix. Point a staff or wand in a given direction and fire it. Even non-directional staves must be pointed in some direction to be used. --- 353,357 ---- <tr valign=top> ! <td><kbd><a name="#zap">z</a></kbd> <td>Zap prefix. Point a staff or wand in a given direction and fire it. Even non-directional staves must be pointed in some direction to be used. *************** *** 401,432 **** <tr valign=top> ! <td><kbd>q</kbd> <td>Quaff one of the potions you are carrying. <tr valign=top> ! <td><kbd>r</kbd> <td>Read one of the scrolls in your pack. <tr valign=top> ! <td><kbd>e</kbd> <td>Eat food from your pack. <tr valign=top> ! <td><kbd>w</kbd> <td>Wield a weapon. Take a weapon out of your pack and carry it for use in combat, replacing the one you are currently using (if any). <tr valign=top> ! <td><kbd>W</kbd> <td>Wear armor. You can only wear one suit of armor at a time. <!-- This takes extra time. --> <tr valign=top> ! <td><kbd>T</kbd> <td>Take armor off. You can't remove armor that is cursed. <!-- This takes extra time. --> <tr valign=top> ! <td><kbd>P</kbd> <td>Put on a ring. You can wear only two rings at a time (one on each hand). If you aren't wearing any rings, this command will ask you which hand you want --- 400,431 ---- <tr valign=top> ! <td><kbd><a name="#quaff">q</a></kbd> <td>Quaff one of the potions you are carrying. <tr valign=top> ! <td><kbd><a name="#read">r</a></kbd> <td>Read one of the scrolls in your pack. <tr valign=top> ! <td><kbd><a name="#eat">e</a></kbd> <td>Eat food from your pack. <tr valign=top> ! <td><kbd><a name="#wield">w</a></kbd> <td>Wield a weapon. Take a weapon out of your pack and carry it for use in combat, replacing the one you are currently using (if any). <tr valign=top> ! <td><kbd><a name="#wear">W</a></kbd> <td>Wear armor. You can only wear one suit of armor at a time. <!-- This takes extra time. --> <tr valign=top> ! <td><kbd><a name="#takeoff">T</a></kbd> <td>Take armor off. You can't remove armor that is cursed. <!-- This takes extra time. --> <tr valign=top> ! <td><kbd><a name="#puton">P</a></kbd> <td>Put on a ring. You can wear only two rings at a time (one on each hand). If you aren't wearing any rings, this command will ask you which hand you want *************** *** 435,439 **** <tr valign=top> ! <td><kbd>R</kbd> <td>Remove a ring. If you are only wearing one ring, this command takes it off. If you are wearing two, it will ask you which one you wish to remove. --- 434,438 ---- <tr valign=top> ! <td><kbd><a name="#remove">R</a></kbd> <td>Remove a ring. If you are only wearing one ring, this command takes it off. If you are wearing two, it will ask you which one you wish to remove. *************** *** 446,450 **** <tr valign=top> ! <td><a name="call"><kbd>c</kbd></a> <td>Call an object something. If you have a type of object in your pack which you wish to remember something about, you can use the call command to give a --- 445,449 ---- <tr valign=top> ! <td><kbd><a name="call">c</a></kbd> <td>Call an object something. If you have a type of object in your pack which you wish to remember something about, you can use the call command to give a *************** *** 531,545 **** <tr valign=top> <td><kbd>^A</kbd> ! <td>Show your real and effective average health point raises. <samp>R-Hp</samp> ! is the average increase to your maximum health points from gaining experience ! level levels. <samp>E-Hp</samp> is the average increase per experience level ! including other changes to your maximum health points. The number of "other" ! health points you have gained (<samp>!</samp>) and lost (<samp>V</samp>) is ! also shown. </table> ! <h2>5. Rooms</h2> <p>Rooms in the dungeons are lit as you enter them. Upon leaving a room, all --- 530,544 ---- <tr valign=top> <td><kbd>^A</kbd> ! <td>Show your real and effective average health point raises. In the cryptic ! line that is displayed, <samp>R-Hp</samp> is the average increase to your ! maximum health points from gaining experience level levels. <samp>E-Hp</samp> ! is the average increase per experience level including other changes to your ! maximum health points. The number of "other" health points you have gained ! (<samp>!</samp>) and lost (<samp>V</samp>) is also shown. </table> ! <h2><a name="rooms">5. Rooms</a></h2> <p>Rooms in the dungeons are lit as you enter them. Upon leaving a room, all *************** *** 555,559 **** ! <h2>6. Fighting</h2> <p>If you see a monster and you wish to fight it, just attempt to run into it. --- 554,558 ---- ! <h2><a name="fighting">6. Fighting</a></h2> <p>If you see a monster and you wish to fight it, just attempt to run into it. *************** *** 562,578 **** ! <h2>7. Objects you can find</h2> <p>When you find something in the dungeon, it is common to want to pick the object up. This is accomplished in rogue by walking over the object (unless you ! use the '<kbd>m</kbd>' prefix, <a href="#move">see above</a>). If you are ! carrying too many things, the program will tell you and it won't pick up the ! object, otherwise it will add it to your pack and tell you what you just picked ! up. <p>Many of the commands that operate on objects must prompt you to find out ! which object you want to use. If you change your mind and don't want to do that ! command after all, just type an <kbd><ESC></kbd> and the command will be ! aborted. <p>Some objects, like armor and weapons, are easily differentiated. Others, --- 561,582 ---- ! <h2><a name="objects">7. Objects you can find</a></h2> <p>When you find something in the dungeon, it is common to want to pick the object up. This is accomplished in rogue by walking over the object (unless you ! use the '<kbd><a href="#move">m</a></kbd>' prefix. If you are carrying too many ! things, the program will tell you and it won't pick up the object, otherwise it ! will add it to your pack and tell you what you just picked up. <p>Many of the commands that operate on objects must prompt you to find out ! which object you want to use. You can type '<kbd>*</kbd>' to get a list of the ! logical choices. Sometimes, however, you don't want to see that list, but ! instead you want to see the list of your scrolls, potions, weapons, or whatever. ! In these cases you can type one of <kbd>?!=:/)]</kbd> to see a menu of your ! scrolls, potions, rings, foods, wands, weapons or armor respectively. This is ! especially useful when you know you want to drop a particular item, a scroll for ! example, but you don't want to pick it from the entire list, just from your ! collection of scrolls. If you change your mind and don't want to do that command ! after all, just type an <kbd><ESC></kbd> and the command will be aborted. <p>Some objects, like armor and weapons, are easily differentiated. Others, *************** *** 581,588 **** type. However, the labels will vary from game to game. ! <p>When you use one of these labeled objects, its effect may be obvious. ! Potions or scrolls will become identified at this point, but not other items. ! If you want to call these other items something so you will recognize it later, ! you can use the "call" command (<a href="#call">see above</a>). <!-- When you use one of these labeled objects, if its effect is obvious, rogue --- 585,592 ---- type. However, the labels will vary from game to game. ! <p>When you use one of these labeled objects, its effect may be obvious. Potions ! or scrolls will become identified at this point, but not other items. If you ! want to call these other items something so you will recognize them later, you ! can use the "<a href="#call">call</a>" command. <!-- When you use one of these labeled objects, if its effect is obvious, rogue *************** *** 592,606 **** ! <h3>7.1 Weapons</h3> <p>Some weapons, like arrows, come in bunches, but most come one at a time. In order to use a weapon, you must wield it. To fire an arrow out of a bow, you ! must first wield the bow, then throw the arrow. You can only wield one weapon ! at a time, but you can't change weapons if the one you are currently wielding ! is cursed. The commands to use weapons are '<kbd>w</kbd>' (wield) and ! '<kbd>t</kbd>' (throw). ! ! <h3>7.2 Armor</h3> <p>There are various sorts of armor lying around in the dungeon. Some of it is --- 596,609 ---- ! <h3><a name="weapons">7.1. Weapons</a></h3> <p>Some weapons, like arrows, come in bunches, but most come one at a time. In order to use a weapon, you must wield it. To fire an arrow out of a bow, you ! must first wield the bow, then throw the arrow. You can only wield one weapon at ! a time, but you can't change weapons if the one you are currently wielding is ! cursed. The commands to use weapons are '<kbd><a href="#wield">w</a></kbd>' ! (wield) and '<kbd><a href="#throw">t</a></kbd>' (throw). ! <h3><a name="armor">7.2. Armor</a></h3> <p>There are various sorts of armor lying around in the dungeon. Some of it is *************** *** 645,668 **** that is lower than normal is cursed. ! <p>The commands to use armor are '<kbd>W</kbd>' (wear) and '<kbd>T</kbd>' (take ! off). ! <h3>7.3 Scrolls</h3> ! <p>Scrolls come with titles in an unknown ! tongue.<a href="#endnote4"><sup><small>4</small></sup></a> After you read a ! scroll, it disappears from your pack. The command to use a scroll is ! '<kbd>r</kbd>' (read). ! <h3>7.4 Potions</h3> <p>Potions are labeled by the color of the liquid inside the flask. They ! disappear after being quaffed. The command to use a potion is '<kbd>q</kbd>' ! (quaff). ! <h3>7.5 Staves and Wands</h3> <p>Staves and wands do the same kinds of things. Staves are identified by a --- 648,670 ---- that is lower than normal is cursed. ! <p>The commands to use armor are '<kbd><a href="#wear">W</a></kbd>' (wear) and ! '<kbd><a href="#takeoff">T</a></kbd>' (take off). ! <h3><a name="scrolls">7.3. Scrolls</a></h3> ! <p>Scrolls come with titles in an unknown tongue. After you read a scroll, it ! disappears from your pack. The command to use a scroll is ! '<kbd><a href="#read">r</a></kbd>' (read). ! <h3><a name="potions">7.4. Potions</a></h3> <p>Potions are labeled by the color of the liquid inside the flask. They ! disappear after being quaffed. The command to use a potion is ! '<kbd><a href="#quaff">q</a></kbd>' (quaff). ! <h3><a name="wands">7.5. Staves and Wands</a></h3> <p>Staves and wands do the same kinds of things. Staves are identified by a *************** *** 674,681 **** metal. ! <p>The command to use a wand or staff is '<kbd>z</kbd>' (zap) ! <h3>7.6 Rings</h3> <p>Rings are very useful items, since they are relatively permanent magic, --- 676,683 ---- metal. ! <p>The command to use a wand or staff is '<kbd><a href="#zap">z</a></kbd>' (zap) ! <h3><a name="rings">7.6. Rings</a></h3> <p>Rings are very useful items, since they are relatively permanent magic, *************** *** 683,695 **** the bad rings are also more powerful. Most rings also cause you to use up food more rapidly, the rate varying with the type of ring. Rings are differentiated ! by their stone settings. The commands to use rings are '<kbd>P</kbd>' (put on) ! and '<kbd>R</kbd>' (remove). ! <h3>7.7 Food</h3> <p>Food is necessary to keep you going. If you go too long without eating you will faint, and eventually die of starvation. The command to use food is ! '<kbd>e</kbd>' (eat). --- 685,698 ---- the bad rings are also more powerful. Most rings also cause you to use up food more rapidly, the rate varying with the type of ring. Rings are differentiated ! by their stone settings. The commands to use rings are ! '<kbd><a href="#puton">P</a></kbd>' (put on) and ! '<kbd><a href="#remove">R</a></kbd>' (remove). ! <h3><a name="food">7.7. Food</a></h3> <p>Food is necessary to keep you going. If you go too long without eating you will faint, and eventually die of starvation. The command to use food is ! '<kbd><a href="#eat">e</a></kbd>' (eat). *************** *** 701,712 **** ! <h3>8.1 Setting the options</h3> <p>There are two ways to set the options. The first is with the '<kbd>o</kbd>' command of rogue; the second is with the ROGUEOPTS environment ! variable.<a href="#endnote5"><sup><small>5</small></sup></a> ! <h4>8.1.1 Using the '<kbd>o</kbd>' command</h4> <p>When you type '<kbd>o</kbd>' in rogue, it clears the screen and displays the --- 704,715 ---- ! <h3><a name="settingoptions">8.1. Setting the options</a></h3> <p>There are two ways to set the options. The first is with the '<kbd>o</kbd>' command of rogue; the second is with the ROGUEOPTS environment ! variable. ! <h4>8.1.1. Using the '<kbd>o</kbd>' command</h4> <p>When you type '<kbd>o</kbd>' in rogue, it clears the screen and displays the *************** *** 721,725 **** ! <h4>8.1.2 Using the ROGUEOPTS variable</h4> <p>The ROGUEOPTS variable is a string containing a comma separated list of --- 724,728 ---- ! <h4>8.1.2. Using the ROGUEOPTS variable</h4> <p>The ROGUEOPTS variable is a string containing a comma separated list of *************** *** 731,741 **** <blockquote> ! <samp>C:\></samp><kbd>set ROGUEOPTS=jump,nopassgo,name:Blue ! Meanie</kbd><a href="#endnote6"><sup><small>6</small></sup></a> <!-- % setenv ROGUEOPTS "jump,noterse,name=Blue Meanie" --> </blockquote> ! <h3>8.2 Option list</h3> <p>Here is a list of the options and an explanation of what each one is for. --- 734,743 ---- <blockquote> ! <samp>C:\></samp><kbd>set ROGUEOPTS=jump,nopassgo,name:Blue Meanie</kbd> <!-- % setenv ROGUEOPTS "jump,noterse,name=Blue Meanie" --> </blockquote> ! <h3><a name="optionlist">8.2. Option list</a></h3> <p>Here is a list of the options and an explanation of what each one is for. *************** *** 776,781 **** <tr valign=top> <td><i>skull</i><td>[ <i>skull</i> ]<br> ! Print out the skull at the end if you get killed. This is nice but slow, so ! you can turn it off if you like. <!-- <i>tombstone</i> [ <i>tombstone</i> ] --- 778,783 ---- <tr valign=top> <td><i>skull</i><td>[ <i>skull</i> ]<br> ! Print out a skull or tombstone at the end if you get killed. The <i>tomb</i> ! option does the same thing. <!-- <i>tombstone</i> [ <i>tombstone</i> ] *************** *** 795,798 **** --- 797,808 ---- <tr valign=top> + <td><i>color</i><td>[ <i>color</i> ]<br> + Use pretty colors when drawing the map. + + <tr valign=top> + <td><a name="PCgraphics"><i>PCgraphics</i><td>[ <i>PCgraphics</i> ]</a><br> + Use extended ASCII characters, just like IBM PC rogue. + + <tr valign=top> <td><i>name</i><td>[ Rodney ]<br> This is the name of your character. It is used if you get on the top ten *************** *** 813,817 **** ! <h2>9. Scoring</h2> <p>Rogue maintains a list of the top scoring people or scores on your machine. --- 823,827 ---- ! <h2><a name="scoring">9. Scoring</a></h2> <p>Rogue maintains a list of the top scoring people or scores on your machine. *************** *** 830,838 **** you get killed in the Dungeons of Doom, your body is forwarded to your next-of-kin, along with 90% of your gold; ten percent of your gold is kept by ! the Dungeons' wizard as a ! fee.<a href="#endnote7"><sup><small>7</small></sup></a> This should make you ! consider whether you want to take one last hit at that monster and possibly ! live, or quit and thus stop with whatever you have. If you quit, you do get all ! your gold, but if you swing and live, you might find more. <p>If you just want to see what the current top players/games list is, you can --- 840,847 ---- you get killed in the Dungeons of Doom, your body is forwarded to your next-of-kin, along with 90% of your gold; ten percent of your gold is kept by ! the Dungeons' wizard as a fee. This should make you consider whether you want to ! take one last hit at that monster and possibly live, or quit and thus stop with ! whatever you have. If you quit, you do get all your gold, but if you swing and ! live, you might find more. <p>If you just want to see what the current top players/games list is, you can *************** *** 844,895 **** ! <h2>10. Acknowledgements</h2> <p>Rogue was originally conceived of by Glenn Wichman and Michael Toy. Ken ! Arnold and Michael Toy then smoothed out the user interface, and added jillions ! of new features. We would like to thank Bob Arnold, Michelle Busch, Andy ! Hatcher, Kipp Hickman, Mark Horton, Daniel Jensen, Bill Joy, Joe Kalash, Steve ! Maurer, Marty McNary, Jan Miller, and Scott Nelson for their ideas and ! assistance; and also the teeming multitudes who graciously ignored work, ! school, and social life to play rogue and send us bugs, complaints, ! suggestions, and just plain flames. And also Mom. ! ! <p>The public domain version of rogue now distributed with Berkeley UNIX was ! written by Timothy Stoehr. ! ! ! <p><hr> ! <h2>Notes</h2> ! ! <p><a name="endnote1">1.</a> ! UNIX is a registered trademark of The Open Group in the United States and other countries. ! ! <p><a name="endnote2">2.</a> ! As opposed to pseudo English sentences. ! ! <p><a name="endnote3">3.</a> ! A minimum screen size of 24 lines by 80 columns is required. If the screen is ! larger, only the 24x80 section will be used for the map. ! ! <p><a name="endnote4">4.</a> ! Actually, it's a dialect spoken only by the twenty-seven members of a tribe in ! Outer Mongolia, but you're not supposed to know that. ! ! <p><a name="endnote5">5.</a> ! On Version 6 systems, there is no equivalent of the ROGUEOPTS feature. ! ! <p><a name="endnote6">6.</a> ! For those of you who use the Bourne shell, the commands would be ! ! <blockquote> ! <samp>$</samp> <kbd>ROGUEOPTS="jump,nopassgo,name=Blue Meanie"</kbd><br> ! <!-- $ ROGUEOPTS="jump,noterse,name=Blue Meanie" --> ! <samp>$</samp> <kbd>export ROGUEOPTS</kbd> ! </blockquote> ! <p><a name="endnote7">7.</a> ! The Dungeon's wizard is named Wally the Wonder Badger. Invocations should be ! accompanied by a sizable donation. </body> --- 853,875 ---- ! <h2><a name="credits">10. Credits</a></h2> <p>Rogue was originally conceived of by Glenn Wichman and Michael Toy. Ken ! Arnold and Michael Toy then smoothed out the user interface and added jillions ! of new features. Soon Jon Lane joined the rogue team and adapted the game for ! the IBM PC. Together, these four made several versions of rogue for various ! computer systems and sold them commercially. ! <p>Timothy Stoehr wrote rogue 5.3 clone versions I and II and donated them to ! The University of California, Berkeley. The folks at Berkeley started ! distributing rogue 5.3 clone version III with the BSD UNIX® operating system ! when standard rogue stopped being freely available. UNIX is a registered ! trademark of The Open Group in the United States and other countries. + <p>Much later, Michael Lehotay adapted rogue clone for DOS and released it as + DOS Rogue Clone. Nick Straguzzi added support for colors and IBM PC + graphics, and the two of them released Rogue Clone IV for DOS and Windows. + Rogue Clone IV retained its version numbers from DOS Rogue Clone and started + with version 2.1. </body> Index: rogue.html =================================================================== RCS file: /cvsroot/rogueclone/rogue/doc/rogue.html,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** rogue.html 30 Jan 2004 20:33:03 -0000 1.3 --- rogue.html 21 Feb 2004 19:43:51 -0000 1.4 *************** *** 85,90 **** file. --> ! <p>For more detailed directions, read the document <i>A Guide to the Dungeons ! of Doom.</i> </blockquote> --- 85,90 ---- file. --> ! <p>For more detailed directions, read the document <i><a href="guide.html">A ! Guide to the Dungeons of Doom</a></i>. </blockquote> *************** *** 117,122 **** <blockquote> ! <p>Michael C. Toy and Kenneth C. R. C. Arnold, <i>A Guide to the Dungeons of ! Doom</i> </blockquote> --- 117,122 ---- <blockquote> ! <p>Michael C. Toy and Kenneth C. R. C. Arnold, <i><a href="guide.html">A Guide ! to the Dungeons of Doom</a></i> </blockquote> |
From: <mle...@us...> - 2004-02-20 04:17:04
|
Update of /cvsroot/rogueclone/rogue/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13394 Modified Files: guide.html Log Message: use correct attribution for UNIX Index: guide.html =================================================================== RCS file: /cvsroot/rogueclone/rogue/doc/guide.html,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** guide.html 20 Feb 2004 01:42:19 -0000 1.4 --- guide.html 20 Feb 2004 04:06:15 -0000 1.5 *************** *** 55,59 **** <blockquote> <i>Rogue</i> is a visual CRT based fantasy game which runs under the ! UNIX<a href="#endnote1"><sup><small>1</small></sup></a> timesharing system. This paper describes how to play rogue, and gives a few hints for those who might otherwise get lost in the Dungeons of Doom. --- 55,59 ---- <blockquote> <i>Rogue</i> is a visual CRT based fantasy game which runs under the ! UNIX<a href="#endnote1">®</a> timesharing system. This paper describes how to play rogue, and gives a few hints for those who might otherwise get lost in the Dungeons of Doom. *************** *** 333,337 **** <td>Toggle Fast Play mode. In addition to the keys described above, you may use the directional keys on the numeric keypad to move. In Fast Play mode these ! keys will normally make you run instead of walk. <tr valign=top> --- 333,337 ---- <td>Toggle Fast Play mode. In addition to the keys described above, you may use the directional keys on the numeric keypad to move. In Fast Play mode these ! keys will make you run instead of walk. <tr valign=top> *************** *** 863,867 **** <p><a name="endnote1">1.</a> ! UNIX is a trademark of Bell Laboratories. <p><a name="endnote2">2.</a> --- 863,867 ---- <p><a name="endnote1">1.</a> ! UNIX is a registered trademark of The Open Group in the United States and other countries. <p><a name="endnote2">2.</a> |
From: <mle...@us...> - 2004-02-20 02:35:45
|
Update of /cvsroot/rogueclone/rogue/dist In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29222/dist Removed Files: changes.txt readme.txt Log Message: remove old documentation --- changes.txt DELETED --- --- readme.txt DELETED --- |