This is an automated email from the git hooks/post-receive script. fabian-guest pushed a commit to branch master in repository rott.
commit aede78d6690cc7f62324eaf3ac16cff3e4342734 Author: Fabian Greffrath <[email protected]> Date: Thu Apr 30 16:25:57 2015 +0200 Imported Upstream version 1.1.2+svn287 --- Makefile.am | 1 + Makefile_old | 33 ++++ README | 35 ++-- configure.ac | 85 ++++++++++ misc/icons.mk | 5 + misc/rott.png | Bin 0 -> 1820 bytes misc/rott.svg | 282 +++++++++++++++++++++++++++++++ misc/rott.xpm | 219 ++++++++++++++++-------- misc/runrott.sh | 2 +- rott/Makefile.am | 56 ++++++ rott/{Makefile => Makefile_old} | 10 +- rott/_rt_floo.h | 2 +- rott/_rt_ted.h | 13 -- rott/audiolib/Makefile.am | 13 ++ rott/audiolib/{Makefile => Makefile_old} | 0 rott/develop.h | 8 +- rott/modexlib.c | 13 +- rott/rt_actor.c | 15 +- rott/rt_cfg.c | 13 +- rott/rt_cfg.h | 4 +- rott/rt_draw.c | 19 ++- rott/rt_floor.c | 9 +- rott/rt_game.c | 4 +- rott/rt_main.c | 53 ++++-- rott/rt_main.h | 10 ++ rott/rt_menu.c | 13 +- rott/rt_scale.c | 4 +- rott/rt_ted.c | 5 +- rott/rt_util.c | 2 +- rott/rt_view.c | 11 +- 30 files changed, 765 insertions(+), 174 deletions(-) diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..c2df278 --- /dev/null +++ b/Makefile.am @@ -0,0 +1 @@ +SUBDIRS = rott diff --git a/Makefile_old b/Makefile_old new file mode 100755 index 0000000..d3c6fdd --- /dev/null +++ b/Makefile_old @@ -0,0 +1,33 @@ +FLVRS=huntbgin darkwar rottcd rottsite +ROTTS=$(addprefix rott-,$(FLVRS)) +SRCDIR=rott + +all: $(ROTTS) + +# Shareware Version +rott-huntbgin: + $(MAKE) -C $(SRCDIR) tidy + $(MAKE) -C $(SRCDIR) ROTT=$@ + mv $(SRCDIR)/$@ . + +# Commercial Version +rott-darkwar: + $(MAKE) -C $(SRCDIR) tidy + $(MAKE) -C $(SRCDIR) ROTT=$@ SHAREWARE=0 + mv $(SRCDIR)/$@ . + +# CD Version +rott-rottcd: + $(MAKE) -C $(SRCDIR) tidy + $(MAKE) -C $(SRCDIR) ROTT=$@ SHAREWARE=0 SUPERROTT=1 + mv $(SRCDIR)/$@ . + +# Site License CD Version +rott-rottsite: + $(MAKE) -C $(SRCDIR) tidy + $(MAKE) -C $(SRCDIR) ROTT=$@ SHAREWARE=0 SITELICENSE=1 + mv $(SRCDIR)/$@ . + +clean: + $(MAKE) -C $(SRCDIR) $@ + $(RM) $(ROTTS) $(addsuffix .exe,$(ROTTS)) diff --git a/README b/README index 20ccd98..b3440cb 100644 --- a/README +++ b/README @@ -71,23 +71,36 @@ distributions. Patches are always welcome. ;-) General Hints ------------- -To compile the source code under Linux, change to the rott/ directory and type: +The following prerequisites are required to compile the source code: - make clean + autoconf + automake + pkg-config + SDL 1.2 + SDL_mixer 1.2 + +To compile the source code, type the following: + + autoreconf -fiv + ./configure make -The build system is setup to use shareware binaries. If you want to use the -registered version of ROTT, compile with: +The resulting binaries can be found in the rott/ directory. + +The build system is setup to build the commercial variant of ROTT. +This variant supports the Registered Version, the "Super ROTT" CD Version and +the "Site License" CD Version of the game by automatically detecting and +loading their corresponding multiplayer map files. - make SHAREWARE=0 +If you want to build the shareware version of ROTT, configure with: -You may additionally append SUPERROTT=1 or SITELICENSE=1, if you want to use -the CD version or the Site License CD version, respectively. However, make -sure to only set one of them to 1 at once. You may want to edit rott/Makefile -to make your changes persistent. + ./configure --enable-shareware -It is generally recommended to build against the most recent version of -the Simple Direct Media Layer and SDL_mixer. +Additionally, you may pass the "--enable-suffix=<suffix>" parameter to +./configure in order to append a suffix to the executable file name, +e.g. to tell the commercial and the shareware variants apart. You may +also want to pass the "--enable-datadir=<datadir>" parameter to point +the executables to the location of your game data files. ------------ diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..8fb3628 --- /dev/null +++ b/configure.ac @@ -0,0 +1,85 @@ +# -*- Autoconf -*- +# Process this file with autoconf to produce a configure script. + +AC_PREREQ([2.69]) +AC_INIT([rott], [1.1.2]) +AM_INIT_AUTOMAKE([foreign no-define]) +AC_CONFIG_SRCDIR([rott/version.h]) +#AC_CONFIG_HEADERS([config.h]) + +# Checks for programs. +AC_PROG_CC +AC_PROG_RANLIB + +# Checks for libraries. +AC_DEFINE([USE_SDL]) +PKG_CHECK_MODULES([SDL], [sdl]) +PKG_CHECK_MODULES([SDL_mixer], [SDL_mixer]) + +# Checks for header files. +AC_DEFINE([PLATFORM_UNIX]) +AC_CHECK_HEADERS([fcntl.h limits.h malloc.h stddef.h stdlib.h string.h unistd.h]) + +# Checks for typedefs, structures, and compiler characteristics. +AC_CHECK_HEADER_STDBOOL +AC_C_INLINE +AC_TYPE_INT16_T +AC_TYPE_INT32_T +AC_TYPE_INT8_T +AC_TYPE_SIZE_T +AC_TYPE_UINT16_T +AC_TYPE_UINT32_T + +# Checks for library functions. +AC_FUNC_ALLOCA +AC_FUNC_MALLOC +AC_FUNC_REALLOC +AC_CHECK_FUNCS([memmove memset mkdir pow strcasecmp strerror strrchr strstr strtol]) + +# Set to build the shareware version +AC_ARG_ENABLE([shareware], + [AS_HELP_STRING([--enable-shareware], + [set to build the shareware version])], + [AC_DEFINE([SHAREWARE])], + []) + +# Set executable file name suffix +AC_ARG_ENABLE([suffix], + [AS_HELP_STRING([--enable-suffix], + [set executable file name suffix])], + [suffix="$enableval"], + [suffix=no]) + +case "$suffix" in +no|yes) + suffix= + ;; +*) + # Add leading dash + suffix=-${suffix} + ;; +esac + +SUFFIX=${suffix} +AC_SUBST([SUFFIX]) + +# Set data file directory +AC_ARG_ENABLE([datadir], + [AS_HELP_STRING([--enable-datadir], + [set data file directory])], + [datadir="$enableval"], + [datadir=no]) + +# Remove duplicate and trailing slashes +datadir=`echo ${datadir} | tr -s '/' | sed 's|/*$||'` + +case "$datadir" in +no|yes) + ;; +*) + AC_DEFINE_UNQUOTED([DATADIR], ["$datadir/"]) + ;; +esac + +AC_CONFIG_FILES([Makefile rott/Makefile rott/audiolib/Makefile]) +AC_OUTPUT diff --git a/misc/icons.mk b/misc/icons.mk new file mode 100644 index 0000000..a4436e0 --- /dev/null +++ b/misc/icons.mk @@ -0,0 +1,5 @@ +rott.xpm: rott.png + convert $^ $@ + +rott.png: rott.svg + inkscape --export-png=$@ $^ diff --git a/misc/rott.png b/misc/rott.png new file mode 100644 index 0000000..f7ed469 Binary files /dev/null and b/misc/rott.png differ diff --git a/misc/rott.svg b/misc/rott.svg new file mode 100644 index 0000000..4e7950e --- /dev/null +++ b/misc/rott.svg @@ -0,0 +1,282 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="32px" + height="32px" + id="svg2993" + version="1.1" + inkscape:version="0.48.4 r9939" + sodipodi:docname="rott.svg"> + <title + id="title3880">rott icon</title> + <defs + id="defs2995"> + <linearGradient + id="linearGradient3977"> + <stop + style="stop-color:#b6db00;stop-opacity:1;" + offset="0" + id="stop3979" /> + <stop + style="stop-color:#924900;stop-opacity:1;" + offset="1" + id="stop3981" /> + </linearGradient> + <linearGradient + id="linearGradient3961"> + <stop + style="stop-color:#000024;stop-opacity:1;" + offset="0" + id="stop3963" /> + <stop + style="stop-color:#494992;stop-opacity:1;" + offset="1" + id="stop3965" /> + </linearGradient> + <linearGradient + id="linearGradient3945"> + <stop + style="stop-color:#6d4949;stop-opacity:1;" + offset="0" + id="stop3947" /> + <stop + style="stop-color:#494924;stop-opacity:1;" + offset="1" + id="stop3949" /> + </linearGradient> + <linearGradient + id="linearGradient3917"> + <stop + style="stop-color:#494924;stop-opacity:1;" + offset="0" + id="stop3919" /> + <stop + style="stop-color:#494924;stop-opacity:0;" + offset="1" + id="stop3921" /> + </linearGradient> + <linearGradient + id="linearGradient3897"> + <stop + id="stop3913" + offset="0" + style="stop-color:#060927;stop-opacity:1;" /> + <stop + style="stop-color:#383058;stop-opacity:1;" + offset="1" + id="stop3901" /> + </linearGradient> + <linearGradient + id="linearGradient3889"> + <stop + style="stop-color:#000000;stop-opacity:1;" + offset="0" + id="stop3891" /> + <stop + style="stop-color:#000000;stop-opacity:0;" + offset="1" + id="stop3893" /> + </linearGradient> + <linearGradient + id="linearGradient3814"> + <stop + style="stop-color:#ff7d7d;stop-opacity:1;" + offset="0" + id="stop3816" /> + <stop + id="stop3818" + offset="0.20312501" + style="stop-color:#590000;stop-opacity:1;" /> + <stop + id="stop3820" + offset="0.328125" + style="stop-color:#000000;stop-opacity:1;" /> + <stop + style="stop-color:#ffffff;stop-opacity:1;" + offset="0.42187497" + id="stop3822" /> + <stop + id="stop3824" + offset="1" + style="stop-color:#555555;stop-opacity:1;" /> + </linearGradient> + <linearGradient + y2="-258.17926" + x2="-300.02075" + y1="-166.01627" + x1="-300.02075" + gradientTransform="matrix(0.33655928,0,0,0.34721102,100.47477,89.642679)" + gradientUnits="userSpaceOnUse" + id="linearGradient3019" + xlink:href="#linearGradient3814" + inkscape:collect="always" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient3945" + id="linearGradient3959" + x1="0" + y1="0" + x2="32" + y2="32" + gradientUnits="userSpaceOnUse" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient3961" + id="linearGradient3975" + x1="32" + y1="32" + x2="0" + y2="0" + gradientUnits="userSpaceOnUse" /> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient3977" + id="radialGradient3993" + cx="16" + cy="12.5" + fx="16" + fy="12.5" + r="3" + gradientTransform="matrix(1,0,0,1.8333333,0,-10.416667)" + gradientUnits="userSpaceOnUse" /> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient3977" + id="radialGradient4001" + cx="10.5" + cy="23.5" + fx="10.5" + fy="23.5" + r="5.5" + gradientTransform="matrix(1,0,0,0.63636364,0,8.5454545)" + gradientUnits="userSpaceOnUse" /> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient3977" + id="radialGradient4009" + cx="21.75" + cy="23.5" + fx="21.75" + fy="23.5" + r="5.25" + gradientTransform="matrix(1,0,0,0.66666667,0,7.8333333)" + gradientUnits="userSpaceOnUse" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient3945" + id="linearGradient4011" + gradientUnits="userSpaceOnUse" + x1="0" + y1="0" + x2="32" + y2="32" /> + </defs> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="20" + inkscape:cx="18.588086" + inkscape:cy="15.921783" + inkscape:current-layer="layer1" + showgrid="true" + inkscape:grid-bbox="true" + inkscape:document-units="px" + inkscape:snap-bbox="false" + inkscape:bbox-paths="false" + inkscape:bbox-nodes="false" + inkscape:snap-bbox-edge-midpoints="true" + inkscape:snap-bbox-midpoints="true" + inkscape:snap-global="true" + inkscape:window-width="1600" + inkscape:window-height="841" + inkscape:window-x="0" + inkscape:window-y="27" + inkscape:window-maximized="1" + inkscape:snap-to-guides="false" + inkscape:snap-nodes="true"> + <inkscape:grid + type="xygrid" + id="grid3044" + empspacing="2" + visible="true" + enabled="true" + snapvisiblegridlinesonly="true" + spacingx="0.5px" + spacingy="0.5px" + originx="-0.5px" + originy="-0.5px" + empcolor="#000000" + empopacity="0.25098039" + dotted="false" + color="#9c9cdb" + opacity="0" /> + </sodipodi:namedview> + <metadata + id="metadata2998"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title>rott icon</dc:title> + <cc:license + rdf:resource="http://www.gnu.org/licenses/gpl-2.0" /> + <dc:creator> + <cc:Agent> + <dc:title>Fabian Greffrath</dc:title> + </cc:Agent> + </dc:creator> + <dc:date>7 Sep 2013</dc:date> + </cc:Work> + </rdf:RDF> + </metadata> + <g + id="layer1" + inkscape:label="Layer 1" + inkscape:groupmode="layer"> + <path + style="fill:url(#linearGradient4011);fill-opacity:1;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:bevel;stroke-opacity:1" + d="m 0.5,28.5 14,-28 2,0 14,28 -2,3 -26,0 z" + id="path3091" + inkscape:connector-curvature="0" + sodipodi:nodetypes="ccccccc" /> + <path + style="fill:url(#linearGradient3975);fill-opacity:1;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:bevel;stroke-opacity:1" + d="m 2.5,29.5 13,-27 13,27 z" + id="path3093" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cccc" /> + <path + style="fill:url(#radialGradient3993);fill-opacity:1;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:bevel;stroke-opacity:1" + d="m 13.5,17.5 4,0 1,-1.5 -3,-10.5 -3,10.5 z" + id="path3095" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cccccc" /> + <path + inkscape:connector-curvature="0" + id="use3097" + d="m 14.5,22.5 -1,-2 -3,0 -5,7 9,-3 z" + style="fill:url(#radialGradient4001);fill-opacity:1;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:bevel;stroke-opacity:1" + sodipodi:nodetypes="cccccc" /> + <path + style="fill:url(#radialGradient4009);fill-opacity:1;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:bevel;stroke-opacity:1" + d="m 17.5,20.5 -1,2 0,2 9,3 -5,-7 z" + id="use3099" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cccccc" /> + </g> +</svg> diff --git a/misc/rott.xpm b/misc/rott.xpm index 8327ce4..430a8a9 100644 --- a/misc/rott.xpm +++ b/misc/rott.xpm @@ -1,67 +1,154 @@ /* XPM */ -static char * rott_xpm[] = { -"32 29 35 1", -" c None", -". c #240000", -"+ c #242424", -"@ c #926D6D", -"# c #000000", -"$ c #6D4949", -"% c #926D49", -"& c #494924", -"* c #6D6D49", -"= c #494949", -"- c #49496D", -"; c #92926D", -"> c #242449", -", c #49246D", -"' c #494992", -") c #242492", -"! c #492424", -"~ c #242400", -"{ c #6D4900", -"] c #24246D", -"^ c #924900", -"/ c #926D00", -"( c #492449", -"_ c #6D4924", -": c #B69200", -"< c #929200", -"[ c #B6B600", -"} c #494900", -"| c #000049", -"1 c #240024", -"2 c #002449", -"3 c #492400", -"4 c #000024", -"5 c #6D6D00", -"6 c #B6DB00", -" .. ", -" +@@. ", -" #$%@& ", -" +*+=&. ", -" #**+-*= ", -" &;+>>=%+ ", -" .@$>>+,*$# ", -" #=%>'&+)=@! ", -" ~;=>,{&]>$*# ", -" #&@>'>^{>]=%! ", -" +@=])=^{>]]=*. ", -" #$@>']!//+]](*&# ", -" +%+)]]_:<!]>]=%~ ", -" .*=>)]]{[:}|]>>$&# ", -" &@>)]]({[[{>]>|=$+ ", -" .@=]])]+^</{12||>$$# ", -" #=@>]]]]>3{{!|||||($+ ", -" ~@(]])]]>]|||]||||>&&# ", -" #$$>]]2>>]]>]>|+>|||=$! ", -" +@+|]>+{^!||>|}{}4|||&$~ ", -" #$$|]]+{:<{1||+{/5}1||+&! ", -" !*+]>+{:6[^~||!{<<5}1||!&. ", -" #$&||({/:/{34||+3}{5{}141&!# ", -" !$12!/{{3+4||||||4+33}}14+&+# ", -" .*+|!}!+|||||||||||4441~3#4&&. ", -"#&$1111||||||||4||44444444#4+&+ ", -"~$!$$=======&=&&&&&&!!&&!!!!!&&#", -"~$$$$*$*$%$*$$$$$$$$$&$$$&$&&&&.", -" .....~...####~~.........#.###. "}; +static char *rott[] = { +/* columns rows colors chars-per-pixel */ +"32 32 116 2 ", +" c #030202", +". c #0B0B05", +"X c #060609", +"o c #09070A", +"O c #0C0A0B", +"+ c #100E05", +"@ c #180D00", +"# c #110E0E", +"$ c #13110D", +"% c #0B0712", +"& c #0C0A12", +"* c #060618", +"= c #0D0C1B", +"- c #110D16", +"; c #100F1C", +": c #141113", +"> c #1A1513", +", c #1C1A11", +"< c #251604", +"1 c #2A1B04", +"2 c #3E1F02", +"3 c #201C14", +"4 c #251E18", +"5 c #291F1A", +"6 c #272206", +"7 c #2D2504", +"8 c #313204", +"9 c #242014", +"0 c #2D2B16", +"q c #272018", +"w c #2A201A", +"e c #342B1F", +"r c #3C3A1F", +"t c #0A0A24", +"y c #0D0D2B", +"u c #110F22", +"i c #131224", +"p c #14132B", +"a c #18152A", +"s c #0C0C34", +"d c #0F0F39", +"f c #141434", +"g c #181837", +"h c #12123C", +"j c #19193C", +"k c #312521", +"l c #352921", +"z c #3A2D24", +"x c #3D3324", +"c c #422D02", +"v c #542A01", +"b c #433502", +"n c #553301", +"m c #7C3F00", +"M c #433C25", +"N c #433329", +"B c #4A3A2D", +"V c #4E3D30", +"C c #533E34", +"Z c #444103", +"A c #5A4901", +"S c #644F01", +"D c #6F4F00", +"F c #615201", +"G c #695600", +"H c #695800", +"J c #6C6300", +"K c #746500", +"L c #7A7000", +"P c #7E7F00", +"I c #474225", +"U c #494327", +"Y c #4C4927", +"T c #4D422B", +"R c #4E4929", +"E c #50422F", +"W c #52492D", +"Q c #554134", +"! c #564931", +"~ c #594934", +"^ c #63493F", +"/ c #151543", +"( c #1C1C44", +") c #1B1B4C", +"_ c #1F1F51", +"` c #20204D", +"' c #222254", +"] c #25255B", +"[ c #28285B", +"{ c #292963", +"} c #2E2E69", +"| c #895600", +" . c #845E00", +".. c #965A00", +"X. c #996200", +"o. c #9B6E00", +"O. c #947400", +"+. c #9C7300", +"@. c #9C7A00", +"#. c #7B8300", +"$. c #9D8B00", +"%. c #A08200", +"&. c #A28A00", +"*. c #A49300", +"=. c #A79C00", +"-. c #A2A200", +";. c #A9A300", +":. c #AAAA00", +">. c #A3B200", +",. c #ADB400", +"<. c #ACBA00", +"1. c #A7C500", +"2. c #AFC000", +"3. c #B0C300", +"4. c #B6DB00", +"5. c None", +/* pixels */ +"5.5.5.5.5.5.5.5.5.5.5.5.5.5. 5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.", +"5.5.5.5.5.5.5.5.5.5.5.5.5.X 5 ^ 5 5.5.5.5.5.5.5.5.5.5.5.5.5.5.", +"5.5.5.5.5.5.5.5.5.5.5.5.5. C > C 5.5.5.5.5.5.5.5.5.5.5.5.5.5.", +"5.5.5.5.5.5.5.5.5.5.5.5. 5 k X k w 5.5.5.5.5.5.5.5.5.5.5.5.5.", +"5.5.5.5.5.5.5.5.5.5.5.5. C [ X C 5.5.5.5.5.5.5.5.5.5.5.5.5.", +"5.5.5.5.5.5.5.5.5.5.5. 5 k a i a k 5 5.5.5.5.5.5.5.5.5.5.5.5.", +"5.5.5.5.5.5.5.5.5.5.5. C O ( j X C 5.5.5.5.5.5.5.5.5.5.5.5.", +"5.5.5.5.5.5.5.5.5.5.X 5 l i a @ a i l q 5.5.5.5.5.5.5.5.5.5.5.", +"5.5.5.5.5.5.5.5.5.5. Q . [ o D . ' o E 5.5.5.5.5.5.5.5.5.5.5.", +"5.5.5.5.5.5.5.5.5.X 5 z u [ + &.+ [ ; l w 5.5.5.5.5.5.5.5.5.5.", +"5.5.5.5.5.5.5.5.5. Q O [ j b ;.Z g ' X Q 5.5.5.5.5.5.5.5.5.5.", +"5.5.5.5.5.5.5.5.X 5 z ; } - K ,.#.: ] - x q 5.5.5.5.5.5.5.5.5.", +"5.5.5.5.5.5.5.5. Q O ' { &.3.<.X ] ( O E 5.5.5.5.5.5.5.5.5.", +"5.5.5.5.5.5.5. 5 N - } ` < *.,.,.6 j [ & x q 5.5.5.5.5.5.5.5.", +"5.5.5.5.5.5.5. Q # ` { a n %.=.;.A i ' j o E 5.5.5.5.5.5.5.5.", +"5.5.5.5.5.5. w N - { { o m o.&.&. .o ' ' O N w 5.5.5.5.5.5.5.", +"5.5.5.5.5.5. Q # ) { { & v ..o.o.n & ' _ h O E 5.5.5.5.5.5.5.", +"5.5.5.5.5. w N & { { { ' ) _ _ _ o x q 5.5.5.5.5.5.", +"5.5.5.5.5.X Q : ( { { ] { ] ] ' ' _ _ _ ) ) f $ E 5.5.5.5.5.5.", +"5.5.5.5. w B o { [ ] { ] ' ' ' ' _ _ _ ) ) ) o r q 5.5.5.5.5.", +"5.5.5.5. Q > j [ ' _ ' ) h ) y $ T 5.5.5.5.5.", +"5.5.5.X 5 V X { ] & S &[email protected] i _ u 2 X.o.S O / / o M 9 5.5.5.5.", +"5.5.5. Q > j [ p 8 ,.:.*.O. _ | @.*.;.8 u / y , U 5.5.5.5.", +"5.5. w V . ] ( . >.4.<.;.&. _ X.%.=.<.1.. y h I 9 5.5.5.", +"5.5. Q 3 a ' O L :.,.;.J 7 X ) 1 S $.;.,.P . d t , U 5.5.5.", +"5. q C X ] ; c O.G 7 X & f / ) ) y & 6 H @.b & s I 9 5.5.", +"5. Q 4 f g < - f ) _ ) ) ) ) / / / y O < t * , U 5.5.", +"X w E X ] ; - f _ _ _ ) ) ) / ) / / / / / h d t O % s I 9 5.", +" B 5 p ' ' ' ' _ _ ) ) ) ) / / / / / / h d d d s s s * , r 5.", +"5.$ # $ $ 5.5.", +"5. e ~ ~ ! ! ~ ! ! ! ! W ! W W W W T W T R R R U R Y Y 0 5.5.", +"5.5. 5.5.5." +}; diff --git a/misc/runrott.sh b/misc/runrott.sh index a71224d..86f15df 100755 --- a/misc/runrott.sh +++ b/misc/runrott.sh @@ -4,7 +4,7 @@ # http://www.delphidude.com/personal/utilities/games/ CONFIG=$HOME/.rott/darkwar/rott.rot -EXE=./rott +EXE=rott if [ $# != 1 ]; then echo "usage: "$0" <RTL or RTC filename>" diff --git a/rott/Makefile.am b/rott/Makefile.am new file mode 100644 index 0000000..8987188 --- /dev/null +++ b/rott/Makefile.am @@ -0,0 +1,56 @@ +SUBDIRS = audiolib + +bin_PROGRAMS = rott@SUFFIX@ +rott@SUFFIX@_SOURCES = \ + byteordr.c \ + cin_actr.c \ + cin_efct.c \ + cin_evnt.c \ + cin_glob.c \ + cin_main.c \ + cin_util.c \ + dosutil.c \ + dukemusc.c \ + engine.c \ + isr.c \ + modexlib.c \ + rt_actor.c \ + rt_battl.c \ + rt_build.c \ + rt_cfg.c \ + rt_com.c \ + rt_crc.c \ + rt_debug.c \ + rt_dmand.c \ + rt_door.c \ + rt_draw.c \ + rt_err.c \ + rt_floor.c \ + rt_game.c \ + rt_in.c \ + rt_main.c \ + rt_map.c \ + rt_menu.c \ + rt_msg.c \ + rt_net.c \ + rt_playr.c \ + rt_rand.c \ + rt_scale.c \ + rt_sound.c \ + rt_spbal.c \ + rt_sqrt.c \ + rt_stat.c \ + rt_state.c \ + rt_str.c \ + rt_swift.c \ + rt_ted.c \ + rt_util.c \ + rt_vid.c \ + rt_view.c \ + scriplib.c \ + watcom.c \ + winrott.c \ + w_wad.c \ + z_zone.c +rott@SUFFIX@_CFLAGS = @SDL_CFLAGS@ @SDL_mixer_CFLAGS@ +rott@SUFFIX@_LDADD = audiolib/libaudiolib.a @SDL_LIBS@ @SDL_mixer_LIBS@ diff --git a/rott/Makefile b/rott/Makefile_old similarity index 86% rename from rott/Makefile rename to rott/Makefile_old index 8470cd7..5a3f85a 100644 --- a/rott/Makefile +++ b/rott/Makefile_old @@ -1,14 +1,8 @@ # Determine which version to build -# Make sure only one of the following is set to 1 at once -# Triple 0 will build the commercial/registered version - -SHAREWARE ?= 1 -SUPERROTT ?= 0 -SITELICENSE ?= 0 +# Leave at 0 to build the commercial/superrott/sitelicense version +SHAREWARE ?= 0 CPPFLAGS += -DSHAREWARE=$(SHAREWARE) -CPPFLAGS += -DSUPERROTT=$(SUPERROTT) -CPPFLAGS += -DSITELICENSE=$(SITELICENSE) ROTT ?= rott diff --git a/rott/_rt_floo.h b/rott/_rt_floo.h index 9c9c608..6abb730 100644 --- a/rott/_rt_floo.h +++ b/rott/_rt_floo.h @@ -23,6 +23,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. //#define MAXVIEWHEIGHT MAXSCREENHEIGHT #define MAXSKYSEGS 2048 #define MAXSKYDATA 8 -#define MINSKYHEIGHT 0//148 //bna++ sky change here +#define MINSKYHEIGHT 148 #endif diff --git a/rott/_rt_ted.h b/rott/_rt_ted.h index 27152e4..247baa4 100644 --- a/rott/_rt_ted.h +++ b/rott/_rt_ted.h @@ -84,19 +84,6 @@ typedef struct #define MAXSILLYSTRINGS 32 -#if (SHAREWARE==0) - #define STANDARDGAMELEVELS (DATADIR "DARKWAR.RTL") - #if (SUPERROTT==1) - #define STANDARDBATTLELEVELS (DATADIR "ROTTCD.RTC") - #elif (SITELICENSE==1) - #define STANDARDBATTLELEVELS (DATADIR "ROTTSITE.RTC") - #else - #define STANDARDBATTLELEVELS (DATADIR "DARKWAR.RTC") - #endif -#else - #define STANDARDGAMELEVELS (DATADIR "HUNTBGIN.RTL") - #define STANDARDBATTLELEVELS (DATADIR "HUNTBGIN.RTC") -#endif diff --git a/rott/audiolib/Makefile.am b/rott/audiolib/Makefile.am new file mode 100644 index 0000000..c3a2a84 --- /dev/null +++ b/rott/audiolib/Makefile.am @@ -0,0 +1,13 @@ +noinst_LIBRARIES = libaudiolib.a +libaudiolib_a_SOURCES = \ + dsl.c \ + fx_man.c \ + ll_man.c \ + multivoc.c \ + mv_mix.c \ + mvreverb.c \ + nodpmi.c \ + pitch.c \ + user.c \ + usrhooks.c +libaudiolib_a_CFLAGS = @SDL_CFLAGS@ diff --git a/rott/audiolib/Makefile b/rott/audiolib/Makefile_old similarity index 100% rename from rott/audiolib/Makefile rename to rott/audiolib/Makefile_old diff --git a/rott/develop.h b/rott/develop.h index c4383c6..a61393a 100644 --- a/rott/develop.h +++ b/rott/develop.h @@ -40,10 +40,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define LOWCOST 0 #define BNACRASHPREVENT 1 //bna added -// Make sure only one of the following are on at one time -//#define SHAREWARE 1 -//#define SUPERROTT 0 -//#define SITELICENSE 0 +// Flavor selection (shareware, registered, cd version, site license) has moved to the Makefile +#ifndef SHAREWARE +#define SHAREWARE 0 +#endif // cute little dopefish thing, only works with special patch? #define DOPEFISH 0 diff --git a/rott/modexlib.c b/rott/modexlib.c index 513689b..ad6e00b 100644 --- a/rott/modexlib.c +++ b/rott/modexlib.c @@ -39,6 +39,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "memcheck.h" #include "rt_util.h" #include "rt_net.h" // for GamePaused +#include "myprint.h" static void StretchMemPicture (); // GLOBAL VARIABLES @@ -796,6 +797,10 @@ int iG_playerTilt; void DrawCenterAim () { int x; + + int percenthealth = (locplayerstate->health * 10) / MaxHitpointsForCharacter(locplayerstate); + int color = percenthealth < 3 ? egacolor[RED] : percenthealth < 4 ? egacolor[YELLOW] : egacolor[GREEN]; + if (iG_aimCross && !GamePaused){ if (( ingame == true )&&(iGLOBAL_SCREENWIDTH>320)){ if ((iG_playerTilt <0 )||(iG_playerTilt >iGLOBAL_SCREENHEIGHT/2)){ @@ -806,22 +811,22 @@ void DrawCenterAim () for (x=iG_X_center-10;x<=iG_X_center-4;x++){ if ((iG_buf_center+x < bufofsTopLimit)&&(iG_buf_center+x > bufofsBottomLimit)){ - *(iG_buf_center+x) = 75; + *(iG_buf_center+x) = color; } } for (x=iG_X_center+4;x<=iG_X_center+10;x++){ if ((iG_buf_center+x < bufofsTopLimit)&&(iG_buf_center+x > bufofsBottomLimit)){ - *(iG_buf_center+x) = 75; + *(iG_buf_center+x) = color; } } for (x=10;x>=4;x--){ if (((iG_buf_center-(x*iGLOBAL_SCREENWIDTH)+iG_X_center) < bufofsTopLimit)&&((iG_buf_center-(x*iGLOBAL_SCREENWIDTH)+iG_X_center) > bufofsBottomLimit)){ - *(iG_buf_center-(x*iGLOBAL_SCREENWIDTH)+iG_X_center) = 75; + *(iG_buf_center-(x*iGLOBAL_SCREENWIDTH)+iG_X_center) = color; } } for (x=4;x<=10;x++){ if (((iG_buf_center+(x*iGLOBAL_SCREENWIDTH)+iG_X_center) < bufofsTopLimit)&&((iG_buf_center+(x*iGLOBAL_SCREENWIDTH)+iG_X_center) > bufofsBottomLimit)){ - *(iG_buf_center+(x*iGLOBAL_SCREENWIDTH)+iG_X_center) = 75; + *(iG_buf_center+(x*iGLOBAL_SCREENWIDTH)+iG_X_center) = color; } } } diff --git a/rott/rt_actor.c b/rott/rt_actor.c index 6780f04..de9a5bb 100644 --- a/rott/rt_actor.c +++ b/rott/rt_actor.c @@ -251,7 +251,7 @@ static int starthitpoints[4][NUMENEMIES+2] = {0,0,60,80,70,70,75,525,300,350,175,2800,3800,5900,4800,-1,350,2}}; -static statobj_t *touchsprite; +static statobj_t *touchsprite = NULL; static const byte dirdiff[8][8] = {{0,1,2,3,4,3,2,1},{1,0,1,2,3,4,3,2}, @@ -1621,11 +1621,8 @@ void SpawnStand (classtype which, int tilex, int tiley, int dir, int ambush) #if 0 - #if (SUPERROTT == 1) - + if (gamestate.Product == ROTT_SUPERCD) ConsiderAlternateActor(new,which); - - #endif #endif StandardEnemyInit(new,dir); @@ -1671,10 +1668,9 @@ void SpawnPatrol (classtype which, int tilex, int tiley, int dir) {statetype *temp; int path=PATH; #if 0 -#if (SUPERROTT == 1) +if (gamestate.Product == ROTT_SUPERCD) char *altstartlabel; #endif -#endif @@ -1711,10 +1707,9 @@ void SpawnPatrol (classtype which, int tilex, int tiley, int dir) #if 0 - #if (SUPERROTT == 1) + if (gamestate.Product == ROTT_SUPERCD) ConsiderAlternateActor(new,which); #endif - #endif StandardEnemyInit(new,dir); @@ -11070,7 +11065,7 @@ void T_Use(objtype*ob) { #if (SHAREWARE == 0) case b_darianobj: - if (!DoPanicMapping()) + if (touchsprite && !DoPanicMapping()) touchsprite->flags |= FL_ACTIVE; if ((!sprites[PLAYER[0]->tilex][PLAYER[0]->tiley]) && (ob->areanumber == PLAYER[0]->areanumber)) {SpawnNewObj(PLAYER[0]->tilex,PLAYER[0]->tiley,&s_dspear1,spearobj); diff --git a/rott/rt_cfg.c b/rott/rt_cfg.c index 8355636..c4ea802 100644 --- a/rott/rt_cfg.c +++ b/rott/rt_cfg.c @@ -2030,6 +2030,7 @@ void WriteConfig (void) memset(passwordtemp,0,sizeof(passwordtemp)); ConvertPasswordStringToString ( &passwordtemp[0] ); SafeWriteString(file,&passwordtemp[0]); + SafeWriteString(file,"\n"); close (file); #endif @@ -2047,13 +2048,12 @@ void WriteConfig (void) void GetAlternatePath (char * tokenstr, AlternateInformation *info) { - strcpy (&info->path[0], ".\0"); + info->path = "."; GetToken (true); if (!stricmp (token, tokenstr)) { GetTokenEOL (false); - memset (&info->path[0], 0, sizeof (info->path)); - strcpy (&info->path[0], &name[0]); + info->path = strdup(name); } } @@ -2068,7 +2068,7 @@ void GetAlternateFile (char * tokenstr, AlternateInformation *info) { // Read in remote sound file // - strcpy (&info->file[0], "foo.foo\0"); + info->file = "foo.foo"; GetToken (true); if (!stricmp (token, tokenstr)) { @@ -2079,11 +2079,10 @@ void GetAlternateFile (char * tokenstr, AlternateInformation *info) { #if (SHAREWARE == 0) info->avail = true; - memset (&info->file[0], 0, sizeof (info->file)); - strcpy (&info->file[0], &token[0]); + info->file = strdup(token); #else printf("Alternate file %s ignored.\n",token); - memset (&info->file[0], 0, sizeof (info->file)); + info->file = ""; #endif } } diff --git a/rott/rt_cfg.h b/rott/rt_cfg.h index 3f6cd28..a803636 100644 --- a/rott/rt_cfg.h +++ b/rott/rt_cfg.h @@ -75,9 +75,9 @@ extern byte passwordstring[20]; typedef struct { - char path[41]; + char *path; boolean avail; - char file[14]; + char *file; } AlternateInformation; extern AlternateInformation RemoteSounds; diff --git a/rott/rt_draw.c b/rott/rt_draw.c index 74b12f4..a04a95c 100644 --- a/rott/rt_draw.c +++ b/rott/rt_draw.c @@ -1636,7 +1636,7 @@ void SetSpriteLightLevel (int x, int y, visobj_t * sprite, int dir, int fullbrig if (fog) { - i=(sprite->viewheight>>normalshade)+minshade; + i=((sprite->viewheight*200/iGLOBAL_SCREENHEIGHT)>>normalshade)+minshade; if (i>maxshade) i=maxshade; sprite->colormap=colormap+(i<<8); } @@ -1697,7 +1697,7 @@ void SetColorLightLevel (int x, int y, visobj_t * sprite, int dir, int color, in if (fog) { - i=(height>>normalshade)+minshade; + i=((height*200/iGLOBAL_SCREENHEIGHT)>>normalshade)+minshade; if (i>maxshade) i=maxshade; sprite->colormap=map+(i<<8); } @@ -1792,7 +1792,7 @@ void SetWallLightLevel (wallcast_t * post) } if (fog) { - i =(post->wallheight>>normalshade)+minshade-lv+la; + i =((post->wallheight*200/iGLOBAL_SCREENHEIGHT)>>normalshade)+minshade-lv+la; if (i>maxshade+la) i=maxshade+la; shadingtable=colormap+(i<<8); } @@ -4114,7 +4114,7 @@ void DrawBackground ( byte * bkgnd ) // int plane; int size; - size=linewidth*400; + size=linewidth*200; #ifdef DOS for (plane=0;plane<4;plane++) @@ -4138,7 +4138,7 @@ void PrepareBackground ( byte * bkgnd ) // int plane; int size; - size=linewidth*400; + size=linewidth*200; #ifdef DOS for (plane=0;plane<4;plane++) @@ -6009,6 +6009,7 @@ void DrawMaskedRotRow(int count, byte * dest, byte * src) void DrawSkyPost (byte * buf, byte * src, int height) { +#if 0 // bna fix for missing sky by high res eg 800x600 // when sky is >400 (max skyheight) then reverse mouintain to missing spot // there should be 200 line of mouintain (400+200) = 600 height lines @@ -6033,13 +6034,17 @@ void DrawSkyPost (byte * buf, byte * src, int height) } // bna section end } - else { + else +#endif + { + int i = 0; + const byte *orig_src = src; // org code while (height--) { *buf = shadingtable[*src]; buf += linewidth; - src++; + src = orig_src + (++i*200/iGLOBAL_SCREENHEIGHT); } // } diff --git a/rott/rt_floor.c b/rott/rt_floor.c index 026e160..5028eb9 100644 --- a/rott/rt_floor.c +++ b/rott/rt_floor.c @@ -105,14 +105,15 @@ void DrawSky( void ) else shadingtable=colormap+(1<<12); - ofs=(((maxheight)-(player->z))>>3)+(centery-(viewheight>>1)); + ofs=(((maxheight)-(player->z))>>3)+(centery*200/iGLOBAL_SCREENHEIGHT-((viewheight*200/iGLOBAL_SCREENHEIGHT)>>1)); + if (ofs>centerskypost) { ofs=centerskypost; } - else if (((centerskypost-ofs)+viewheight)>1799) + else if (((centerskypost-ofs)+viewheight*200/iGLOBAL_SCREENHEIGHT)>1799) { - ofs=-(1799-(centerskypost+viewheight)); + ofs=-(1799-(centerskypost+viewheight*200/iGLOBAL_SCREENHEIGHT)); } //ofs=centerskypost; #ifdef DOS @@ -527,7 +528,7 @@ void SetFCLightLevel (int height) } if (fog) { - i=(height>>normalshade)+minshade; + i=((height*200/iGLOBAL_SCREENHEIGHT)>>normalshade)+minshade; if (i>maxshade) i=maxshade; shadingtable=colormap+(i<<8); } diff --git a/rott/rt_game.c b/rott/rt_game.c index 6654d9a..6de0ee3 100644 --- a/rott/rt_game.c +++ b/rott/rt_game.c @@ -4854,8 +4854,8 @@ boolean SaveTheGame (int num, gamestorage_t * game) memset (&game->info, 0, sizeof (game->info)); if (GameLevels.avail == true) { - memcpy (&game->info.path[0], &GameLevels.path[0], sizeof (GameLevels.path)); - memcpy (&game->info.file[0], &GameLevels.file[0], sizeof (GameLevels.file)); + game->info.path = GameLevels.path; + game->info.file = GameLevels.file; game->info.avail = true; } diff --git a/rott/rt_main.c b/rott/rt_main.c index 08de70c..cb6a011 100644 --- a/rott/rt_main.c +++ b/rott/rt_main.c @@ -179,6 +179,7 @@ extern void RecordDemoQuery ( void ); int main (int argc, char *argv[]) { char *macwd; + extern char *BATTMAPS; #ifndef DOS _argc = argc; _argv = argv; @@ -214,13 +215,33 @@ int main (int argc, char *argv[]) gamestate.Version = ROTTVERSION; #if ( SHAREWARE == 1 ) + BATTMAPS = strdup(STANDARDBATTLELEVELS); + FixFilePath(BATTMAPS); gamestate.Product = ROTT_SHAREWARE; -#elif ( SUPERROTT == 1 ) - gamestate.Product = ROTT_SUPERCD; -#elif ( SITELICENSE == 1 ) - gamestate.Product = ROTT_SITELICENSE; #else - gamestate.Product = ROTT_REGISTERED; + BATTMAPS = strdup(SITELICENSEBATTLELEVELS); + FixFilePath(BATTMAPS); + if (!access(BATTMAPS, R_OK)) + { + gamestate.Product = ROTT_SITELICENSE; + } + else + { + free(BATTMAPS); + BATTMAPS = strdup(SUPERROTTBATTLELEVELS); + FixFilePath(BATTMAPS); + if (!access(BATTMAPS, R_OK)) + { + gamestate.Product = ROTT_SUPERCD; + } + else + { + free(BATTMAPS); + BATTMAPS = strdup(STANDARDBATTLELEVELS); + FixFilePath(BATTMAPS); + gamestate.Product = ROTT_REGISTERED; + } + } #endif DrawRottTitle (); @@ -821,7 +842,7 @@ void SetupWads( void ) { char *newargs[99]; int i, arg, argnum = 0; - char tempstr[129]; + char *tempstr = NULL; char *PStrings[] = {"AIM", "FULLSCREEN", "WINDOW", "RESOLUTION", NULL }; // These must be checked here so that they can override the cfg file @@ -867,8 +888,9 @@ void SetupWads( void ) arg = CheckParm ("filertl"); if (arg!=0) { - FILE *f;char buf[32]; + FILE *f;char *buf = malloc(32); if (_argv[arg+1] != 0) { //are there a filename included + tempstr = realloc(tempstr, 129 + strlen(_argv[arg+1])); strcpy (tempstr,_argv[arg+1]);//copy it to tempstr if (strlen (tempstr) < MAX_PATH) { if (access (tempstr, 0) != 0) { //try open @@ -887,8 +909,9 @@ void SetupWads( void ) }else{ fread(buf,3,3,f);//is the 3 first letters RTL (RTC) if (((strstr(buf,"RTL") != 0)||strstr(buf,"RTC") != 0)) { - strcpy (GameLevels.file,tempstr); + GameLevels.file = strdup(tempstr); GameLevels.avail++; + buf = realloc(buf, 32 + strlen(tempstr)); strcpy (buf,"Adding "); strcat (buf,tempstr); printf("%s", buf); @@ -897,14 +920,16 @@ void SetupWads( void ) } } }else{printf("Missing RTL filename");} + free(buf); } NoRTL:; // Check for rtc files arg = CheckParm ("filertc"); if (arg!=0) { - FILE *f;char buf[32]; + FILE *f;char *buf = malloc(32); if (_argv[arg+1] != 0) { //are there a filename included + tempstr = realloc(tempstr, 129 + strlen(_argv[arg+1])); strcpy (tempstr,_argv[arg+1]);//copy it to tempstr if (strlen (tempstr) < MAX_PATH) { if (access (tempstr, 0) != 0) { //try open @@ -923,8 +948,9 @@ NoRTL:; }else{ fread(buf,3,3,f);//is the 3 first letters RTL (RTC) if (((strstr(buf,"RTL") != 0)||strstr(buf,"RTC") != 0)) { - strcpy (BattleLevels.file,tempstr); + BattleLevels.file = strdup(tempstr); BattleLevels.avail++; + buf = realloc(buf, 32 + strlen(tempstr)); strcpy (buf,"Adding "); strcat (buf,tempstr); printf("%s", buf); @@ -933,6 +959,7 @@ NoRTL:; } } }else{printf("Missing RTC filename");} + free(buf); } NoRTC:; @@ -981,18 +1008,22 @@ NoRTC:; { char *src; + tempstr = realloc(tempstr, strlen(RemoteSounds.path) + strlen(RemoteSounds.file) + 2); strcpy (tempstr,RemoteSounds.path); src = RemoteSounds.path + strlen(RemoteSounds.path) - 1; if (*src != '\\') strcat (tempstr,"\\\0"); strcat (tempstr,RemoteSounds.file); - newargs [argnum++] = tempstr; + newargs [argnum++] = strdup(tempstr); } else { newargs [argnum++] = DATADIR "REMOTE1.RTS"; } + if (tempstr) + free(tempstr); + newargs [argnum++] = NULL; W_InitMultipleFiles(newargs); diff --git a/rott/rt_main.h b/rott/rt_main.h index 746e6ac..13a5e8d 100644 --- a/rott/rt_main.h +++ b/rott/rt_main.h @@ -31,6 +31,16 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "rottnet.h" #include "rt_battl.h" +#if (SHAREWARE==0) + #define STANDARDGAMELEVELS (DATADIR "DARKWAR.RTL") + #define STANDARDBATTLELEVELS (DATADIR "DARKWAR.RTC") + #define SUPERROTTBATTLELEVELS (DATADIR "ROTTCD.RTC") + #define SITELICENSEBATTLELEVELS (DATADIR "ROTTSITE.RTC") +#else + #define STANDARDGAMELEVELS (DATADIR "HUNTBGIN.RTL") + #define STANDARDBATTLELEVELS (DATADIR "HUNTBGIN.RTC") +#endif + enum {vl_low, vl_medium, diff --git a/rott/rt_menu.c b/rott/rt_menu.c index aed465a..1076aa6 100644 --- a/rott/rt_menu.c +++ b/rott/rt_menu.c @@ -5359,9 +5359,9 @@ void DrawExtOptionsMenu (void) FlipMenuBuf(); } -extern long inverse_mouse; +extern int inverse_mouse; extern boolean usemouselook; -extern int iG_aimCross; +extern boolean iG_aimCross; extern boolean usejump; extern boolean sdl_fullscreen; @@ -7155,8 +7155,6 @@ void CP_TeamPlayErrorMessage // //**************************************************************************** -#if (SITELICENSE == 0) - #define SITELINES 8 char *sitemessage[] = @@ -7171,8 +7169,6 @@ char *sitemessage[] = "For more on site licenses, see ORDERING INFO." }; -#endif - void CP_ModemGameMessage (int player ) { @@ -7215,7 +7211,8 @@ void CP_ModemGameMessage (int player ) MenuBufCPrint ("Please wait while\nMaster selects\nCOMM-BAT options."); } -#if (SITELICENSE == 0) +if (gamestate.Product != ROTT_SITELICENSE) +{ if (networkgame==true) { for( i = 0; i < SITELINES; i++ ) @@ -7224,7 +7221,7 @@ void CP_ModemGameMessage (int player ) sitemessage[ i ] ); } } -#endif +} } FlipMenuBuf(); diff --git a/rott/rt_scale.c b/rott/rt_scale.c index ff4d839..e4bbdf4 100644 --- a/rott/rt_scale.c +++ b/rott/rt_scale.c @@ -149,7 +149,7 @@ void SetLightLevel (int height) } if (fog) { - i=(height>>normalshade)+minshade; + i=((height*200/iGLOBAL_SCREENHEIGHT)>>normalshade)+minshade; if (i>maxshade) i=maxshade; shadingtable=colormap+(i<<8); } @@ -861,7 +861,7 @@ void ScaleWeapon (int xoff, int y, int shapenum) return; // off the left side dc_iscale=0xffffffffu/(unsigned)dc_invscale; - dc_texturemid=(((p->origsize>>1)+p->topoffset)<<SFRACBITS)+(SFRACUNIT>>1); + dc_texturemid=(((p->origsize>>1)+p->topoffset)<<SFRACBITS)+(SFRACUNIT>>2); sprtopoffset=(centeryclipped<<16) - FixedMul(dc_texturemid,dc_invscale); // diff --git a/rott/rt_ted.c b/rott/rt_ted.c index a9a76d1..8a79d55 100644 --- a/rott/rt_ted.c +++ b/rott/rt_ted.c @@ -115,7 +115,7 @@ static cachetype * cachelist; static word cacheindex; static boolean CachingStarted=false; static char * ROTTMAPS = STANDARDGAMELEVELS; -static char * BATTMAPS = STANDARDBATTLELEVELS; +char * BATTMAPS; static char NormalWeaponTiles[ 10 ] = { @@ -1669,8 +1669,7 @@ void GetMapFileName ( char * filename ) void SetBattleMapFileName ( char * filename ) { BattleLevels.avail = true; - memset (&(BattleLevels.file[0]), 0, sizeof (BattleLevels.file)); - strcpy (&(BattleLevels.file[0]), filename); + BattleLevels.file = strdup(filename); } /* diff --git a/rott/rt_util.c b/rott/rt_util.c index 20177f9..e455b5f 100644 --- a/rott/rt_util.c +++ b/rott/rt_util.c @@ -1851,7 +1851,7 @@ boolean UL_ChangeDirectory (char *path) return (true); #else - if (!*path) { + if (!path || !*path) { return true; } diff --git a/rott/rt_view.c b/rott/rt_view.c index 57ca868..5d8f911 100644 --- a/rott/rt_view.c +++ b/rott/rt_view.c @@ -386,19 +386,12 @@ void SetViewSize // SetTextMode ( ); // viewheight=viewheight; height = viewheight; - if ( height > 168 ) + if ( height > 168*iGLOBAL_SCREENHEIGHT/200 ) { // Prevent weapon from being scaled too big - height = 168; - if ( iGLOBAL_SCREENWIDTH == 640) { - height = 260; - }else if ( iGLOBAL_SCREENWIDTH == 800) { - height = 360; - } + height = 168*iGLOBAL_SCREENHEIGHT/200; } - if ((G_weaponscale > 150)&&(G_weaponscale <600)){height = G_weaponscale;} - if ( iGLOBAL_SCREENWIDTH == 320) {G_weaponscale=G_weaponscale/2;} weaponscale = ( height << 16 ) / 168;//( height << 16 ) = 170 * 65536 -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/rott.git _______________________________________________ Pkg-games-commits mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits

