(from Yitzhak) part2
part 2 touches only port files Makes Borland happy with current sources. Fixes bug in WM_PAINT handling in rip/splash code. Fixes getline() bug (H0009) Tidies up source. Fixes up copyright notices. Adds TODO docs for Borland. (Removes "TODO" note) Small changes to defaults formatting. Fixes ALT key on Graphical Port non NetHack mode. Hilites pet in Graphical Port text mode. Also Implements windowcolors for status and message window in graphical port. On graphical port, tested to see it actually works. Tested on platforms Makefile MSC/BCC Graphical/Console, MSC IDE for compile and run and performing hilite pet in graphical text, not displaying rawio, alt key.
This commit is contained in:
@@ -176,7 +176,8 @@ Setting Up
|
||||
For building the TTY version, ensure that GRAPHICAL is set to "N",
|
||||
or commented out. (If you aren't building the TTY version, you are
|
||||
currently reading the wrong section, and following the wrong set of
|
||||
steps. In that case, you may wish to start reading from the top again.)
|
||||
steps. In that case, you may wish to start reading from the top
|
||||
again.)
|
||||
|
||||
Optional step:
|
||||
If you elected not to use the high-quality BSD random number routines by
|
||||
@@ -314,7 +315,7 @@ Setting Up
|
||||
they are not necessary for building the graphical version of NetHack
|
||||
(you can delete them to save space if you wish.)
|
||||
|
||||
Required Directories for a Win32 Console NetHack:
|
||||
Required Directories for a Win32 Graphical NetHack:
|
||||
|
||||
top
|
||||
|
|
||||
@@ -350,6 +351,11 @@ Setting Up
|
||||
Microsoft compiler users, perform step 3a.
|
||||
Borland compiler users, perform step 3b.
|
||||
|
||||
Note for Microsoft users: It's possible to build a graphical version
|
||||
using the Makefile. For simplicity's sake, however, only the Visual
|
||||
C IDE build will be explained. The IDE build has full game
|
||||
functionality and is the officially released build.s
|
||||
|
||||
a) Microsoft compiler:
|
||||
Start the Visual C IDE. In the Visual C IDE Menus, choose:
|
||||
File | Open Workspace
|
||||
@@ -405,8 +411,11 @@ Setting Up
|
||||
b) Borland Compiler only:
|
||||
|
||||
o Edit the Makefile. Ensure the following are set correctly.
|
||||
GRAPHICS should be set to "Y"
|
||||
{TODO: put a list of other things to check in Makefile.bcc here}
|
||||
GRAPHICAL should be set to "Y"
|
||||
|
||||
o Ensure that all your tools directories are set up properly.
|
||||
By default, your tools are assumed to be in the same
|
||||
directory as the MAKE program.
|
||||
|
||||
|
||||
Building
|
||||
|
||||
@@ -35,10 +35,10 @@
|
||||
TARGETOS=BOTH
|
||||
APPVER=4.0
|
||||
|
||||
bccroot = c:\borland\bcc55
|
||||
bccbin = $(MAKEDIR)
|
||||
bccroot = $(MAKEDIR)\..
|
||||
bccinc = $(bccroot)\include
|
||||
bcclib = $(bccroot)\lib
|
||||
bccbin = $(bccroot)\bin
|
||||
|
||||
!IFNDEF APPVER
|
||||
APPVER = 4.0
|
||||
@@ -136,8 +136,8 @@ DO_LEX = LEX_MSG
|
||||
|
||||
# - Specify your yacc and lex programs (or work-alikes) here.
|
||||
|
||||
#YACC = bison -y
|
||||
YACC = byacc
|
||||
YACC = bison -y
|
||||
#YACC = byacc
|
||||
#YACC = yacc
|
||||
|
||||
#LEX = lex
|
||||
@@ -150,9 +150,9 @@ LEX = flex
|
||||
FLEXSKEL =
|
||||
#FLEXSKEL = -S../tools/flex.ske
|
||||
|
||||
YTABC = y_tab.c
|
||||
YTABH = y_tab.h
|
||||
LEXYYC = lexyy.c
|
||||
YTABC = y.tab.c
|
||||
YTABH = y.tab.h
|
||||
LEXYYC = lex.yy.c
|
||||
|
||||
#
|
||||
# Optional high-quality BSD random number generation routines
|
||||
@@ -587,10 +587,10 @@ $(NHRES): $(TILEBMP16) $(WIN32)\winhack.rc $(WIN32)\mnsel.bmp \
|
||||
$(WIN32)\mnselcnt.bmp $(WIN32)\mnunsel.bmp \
|
||||
$(WIN32)\petmark.bmp $(WIN32)\NetHack.ico $(WIN32)\rip.bmp \
|
||||
$(WIN32)\splash.bmp
|
||||
@$(rc) -r -fo$@ -i$(WIN32) -dNDEBUG $(WIN32)\winhack.rc
|
||||
@$(rc) -r -fo$@ -i$(WIN32) -i$(bccinc) -dNDEBUG $(WIN32)\winhack.rc
|
||||
!ELSE
|
||||
$(NHRES): $(NTSYS)\console.rc $(NTSYS)\NetHack.ico
|
||||
@$(rc) -r -fo$@ -i$(NTSYS) -dNDEBUG $(NTSYS)\console.rc
|
||||
@$(rc) -r -fo$@ -i$(NTSYS) -i$(bccinc) -dNDEBUG $(NTSYS)\console.rc
|
||||
!ENDIF
|
||||
|
||||
#==========================================
|
||||
@@ -737,7 +737,7 @@ $(O)lev_yacc.o: $(HACK_H) $(SP_LEV_H) $(INCL)\lev_comp.h $(U)lev_yacc.c
|
||||
|
||||
$(O)lev_$(LEX).o: $(HACK_H) $(INCL)\lev_comp.h $(SP_LEV_H) \
|
||||
$(U)lev_$(LEX).c
|
||||
@$(cc) $(LEVCFLAGS) -o$@ $(U)lev_$(LEX).c
|
||||
@$(cc) $(LEVCFLAGS) -D__IO_H -o$@ $(U)lev_$(LEX).c
|
||||
|
||||
$(O)lev_main.o: $(U)lev_main.c $(HACK_H) $(SP_LEV_H)
|
||||
@$(cc) $(LEVCFLAGS) -o$@ $(U)lev_main.c
|
||||
@@ -794,7 +794,7 @@ $(O)dgn_yacc.o: $(HACK_H) $(DGN_FILE_H) $(INCL)\dgn_comp.h $(U)dgn_yacc.c
|
||||
|
||||
$(O)dgn_$(LEX).o: $(HACK_H) $(DGN_FILE_H) $(INCL)\dgn_comp.h \
|
||||
$(U)dgn_$(LEX).c
|
||||
@$(cc) $(LEVCFLAGS) -o$@ $(U)dgn_$(LEX).c
|
||||
@$(cc) $(LEVCFLAGS) -D__IO_H -o$@ $(U)dgn_$(LEX).c
|
||||
|
||||
$(O)dgn_main.o: $(HACK_H) $(U)dgn_main.c
|
||||
@$(cc) $(LEVCFLAGS) -o$@ $(U)dgn_main.c
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* SCCS Id: @(#)console.rc 3.4 2002/02/14 */
|
||||
/* Copyright (c) NetHack Win32 Porting Team, 2002. */
|
||||
/* Copyright (c) Yitzhak Sapir, 2002. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
#include "windows.h"
|
||||
|
||||
@@ -21,18 +21,25 @@ OPTIONS=IBMGraphics
|
||||
# ascii7x12|ascii8x12|ascii16x12|ascii12x16|
|
||||
# ascii10x18|ascii_fit_to_screen
|
||||
OPTIONS=map_mode:tiles,scroll_margin:5
|
||||
|
||||
#
|
||||
# Message window settings
|
||||
OPTIONS=align_message:top,hilite_pet
|
||||
OPTIONS=align_message:top
|
||||
|
||||
#
|
||||
# Menu settings
|
||||
OPTIONS=font_menu:Arial,font_size_menu:9
|
||||
|
||||
#
|
||||
# Status window settings
|
||||
OPTIONS=font_size_status:10
|
||||
|
||||
#
|
||||
# Other
|
||||
OPTIONS=font_size_text:9,font_size_message:9,toptenwin
|
||||
OPTIONS=font_size_text:9,font_size_message:9,hilite_pet
|
||||
|
||||
# Top Ten Window. Highly Recommended.
|
||||
OPTIONS=toptenwin
|
||||
|
||||
# *** Personal Preferences ***
|
||||
# Some options to set personal preferences. Uncomment and change these to
|
||||
|
||||
Reference in New Issue
Block a user