├── pkg ├── osx │ ├── PkgInfo │ ├── Resources │ │ ├── app.png │ │ └── launcher.nib │ │ │ └── keyedobjects.nib │ ├── disk │ │ ├── background.png │ │ └── dir.DS_Store │ ├── .gitignore │ ├── main.m │ ├── Execute.h │ ├── AppController.h │ ├── IWADController.h │ └── LauncherManager.h ├── win32 │ ├── .gitignore │ └── README ├── .gitignore ├── config.make.in ├── style.html └── Makefile.am ├── .devcontainer ├── prefs │ └── NO_VERSION_CONTROL ├── share │ └── NO_VERSION_CONTROL ├── wads │ └── NO_VERSION_CONTROL ├── .gitignore ├── initialize-linux.sh └── Dockerfile ├── autogen.sh ├── src ├── doom │ ├── .gitignore │ ├── statdump.h │ ├── p_inter.h │ ├── doomdef.c │ ├── p_tick.h │ ├── r_segs.h │ ├── p_setup.h │ ├── r_sky.h │ ├── d_textur.h │ ├── f_finale.h │ ├── doomstat.c │ ├── dstrings.h │ ├── m_random.h │ ├── d_items.h │ ├── d_main.h │ ├── pr_process.h │ ├── deh_doom.c │ ├── r_local.h │ ├── wi_stuff.h │ ├── r_sky.c │ ├── f_wipe.h │ ├── am_map.h │ ├── r_data.h │ ├── r_bsp.h │ └── r_plane.h ├── hexen │ ├── .gitignore │ ├── ct_chat.h │ ├── m_random.h │ └── st_start.h ├── strife │ ├── .gitignore │ ├── doomdef.c │ ├── p_tick.h │ ├── r_segs.h │ ├── p_setup.h │ ├── m_random.h │ ├── r_sky.h │ ├── d_textur.h │ ├── doomstat.c │ ├── dstrings.h │ ├── f_finale.h │ ├── d_items.h │ ├── p_inter.h │ ├── deh_strife.c │ ├── r_local.h │ ├── am_map.h │ ├── f_wipe.h │ ├── wi_stuff.h │ ├── r_sky.c │ ├── r_bsp.h │ ├── r_data.h │ ├── m_saves.h │ └── r_plane.h ├── heretic │ ├── .gitignore │ ├── ct_chat.h │ ├── m_random.h │ └── s_sound.h ├── setup │ ├── .gitignore │ ├── Setup.desktop.in │ ├── mouse.h │ ├── sound.h │ ├── keyboard.h │ ├── compatibility.h │ ├── display.h │ ├── joystick.h │ ├── mode.h │ ├── multiplayer.h │ ├── txt_keyinput.h │ ├── txt_mouseinput.h │ ├── txt_joybinput.h │ ├── CMakeLists.txt │ ├── execute.h │ ├── Makefile.am │ └── compatibility.c ├── psdoom-ng.desktop.in ├── Doom.desktop.in ├── Hexen.desktop.in ├── Heretic.desktop.in ├── Strife.desktop.in ├── Doom_Screensaver.desktop.in ├── .gitignore ├── manifest.xml ├── psdoom-ng.metainfo.xml.in ├── net_petname.h ├── setup-res.rc.in ├── net_dedicated.h ├── doom-res.rc.in ├── hexen-res.rc.in ├── heretic-res.rc.in ├── net_sdl.h ├── strife-res.rc.in ├── gusconf.h ├── w_checksum.h ├── i_endoom.h ├── net_loop.h ├── net_gui.h ├── w_main.h ├── aes_prng.h ├── mus2mid.h ├── m_fixed.h ├── v_diskicon.h ├── m_bbox.h ├── i_timer.h ├── deh_io.h ├── net_server.h ├── i_videohr.h ├── sha1.h ├── m_bbox.c ├── memio.h ├── d_dedicated.c ├── midifallback.h ├── i_swap.h ├── m_fixed.c ├── w_merge.h ├── deh_str.h ├── i_cdmus.h ├── m_argv.h ├── m_cheat.h ├── i_glob.h ├── i_input.h ├── m_config.h ├── v_patch.h ├── d_event.c ├── deh_main.h ├── net_packet.h └── net_query.h ├── data ├── doom.ico ├── doom.png ├── hexen.ico ├── hexen.png ├── setup.ico ├── setup.png ├── heretic.ico ├── heretic.png ├── strife.ico ├── strife.png ├── wadfile.png ├── .gitignore ├── README └── Makefile.am ├── psdoom-ng.pdf ├── textscreen ├── .gitignore ├── fonts │ ├── large.png │ ├── normal.png │ ├── small.png │ ├── Makefile.am │ └── README ├── examples │ ├── .gitignore │ └── Makefile.am ├── txt_utf8.h ├── txt_io.h ├── textscreen.h ├── txt_strut.h ├── txt_gui.h ├── CMakeLists.txt ├── txt_sdl.h └── Makefile.am ├── man ├── bash-completion │ ├── .gitignore │ ├── hexen.template.in │ ├── heretic.template.in │ ├── strife.template.in │ └── doom.template.in ├── wikipages ├── CMDLINE.template ├── CMDLINE.template.md ├── .gitignore ├── environ.man ├── extra.cfg.template ├── setup.template ├── doom.template └── hexen.template ├── opl ├── .gitignore ├── examples │ ├── .gitignore │ └── Makefile.am ├── Makefile.am ├── ioperm_sys.h ├── CMakeLists.txt ├── opl_timer.h └── opl_queue.h ├── pcsound ├── .gitignore ├── Makefile.am ├── CMakeLists.txt ├── pcsound.h └── pcsound_internal.h ├── .gitmodules ├── contrib └── psdoom-2000.05.03-data.tar.gz ├── psdoom-ng.conf.example ├── vcpkg.json ├── ChangeLog ├── check-extern.sh ├── AUTHORS ├── cmake └── config.h.cin ├── .github ├── workflows │ └── cppcheck.yml └── ISSUE_TEMPLATE.md ├── .travis.sh ├── CREDITS.psdoom-ng ├── .lvimrc ├── .gitignore └── setup └── setup-manifest.xml /pkg/osx/PkgInfo: -------------------------------------------------------------------------------- 1 | APPL???? 2 | -------------------------------------------------------------------------------- /.devcontainer/prefs/NO_VERSION_CONTROL: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.devcontainer/share/NO_VERSION_CONTROL: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.devcontainer/wads/NO_VERSION_CONTROL: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /pkg/win32/.gitignore: -------------------------------------------------------------------------------- 1 | staging-* 2 | *.zip 3 | -------------------------------------------------------------------------------- /.devcontainer/.gitignore: -------------------------------------------------------------------------------- 1 | *.xauth 2 | wads/ 3 | prefs/ 4 | share/ -------------------------------------------------------------------------------- /pkg/.gitignore: -------------------------------------------------------------------------------- 1 | Makefile 2 | Makefile.in 3 | config.make 4 | -------------------------------------------------------------------------------- /autogen.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | autoreconf -fi 4 | ./configure "$@" 5 | -------------------------------------------------------------------------------- /src/doom/.gitignore: -------------------------------------------------------------------------------- 1 | Makefile 2 | Makefile.in 3 | .deps 4 | tags 5 | TAGS 6 | -------------------------------------------------------------------------------- /src/hexen/.gitignore: -------------------------------------------------------------------------------- 1 | Makefile 2 | Makefile.in 3 | .deps 4 | tags 5 | TAGS 6 | -------------------------------------------------------------------------------- /src/strife/.gitignore: -------------------------------------------------------------------------------- 1 | Makefile 2 | Makefile.in 3 | .deps 4 | tags 5 | TAGS 6 | -------------------------------------------------------------------------------- /data/doom.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orsonteodoro/psdoom-ng1/HEAD/data/doom.ico -------------------------------------------------------------------------------- /data/doom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orsonteodoro/psdoom-ng1/HEAD/data/doom.png -------------------------------------------------------------------------------- /data/hexen.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orsonteodoro/psdoom-ng1/HEAD/data/hexen.ico -------------------------------------------------------------------------------- /data/hexen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orsonteodoro/psdoom-ng1/HEAD/data/hexen.png -------------------------------------------------------------------------------- /data/setup.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orsonteodoro/psdoom-ng1/HEAD/data/setup.ico -------------------------------------------------------------------------------- /data/setup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orsonteodoro/psdoom-ng1/HEAD/data/setup.png -------------------------------------------------------------------------------- /psdoom-ng.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orsonteodoro/psdoom-ng1/HEAD/psdoom-ng.pdf -------------------------------------------------------------------------------- /src/heretic/.gitignore: -------------------------------------------------------------------------------- 1 | Makefile 2 | Makefile.in 3 | .deps 4 | tags 5 | TAGS 6 | 7 | -------------------------------------------------------------------------------- /textscreen/.gitignore: -------------------------------------------------------------------------------- 1 | Makefile 2 | Makefile.in 3 | .deps 4 | *.a 5 | tags 6 | TAGS 7 | -------------------------------------------------------------------------------- /data/heretic.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orsonteodoro/psdoom-ng1/HEAD/data/heretic.ico -------------------------------------------------------------------------------- /data/heretic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orsonteodoro/psdoom-ng1/HEAD/data/heretic.png -------------------------------------------------------------------------------- /data/strife.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orsonteodoro/psdoom-ng1/HEAD/data/strife.ico -------------------------------------------------------------------------------- /data/strife.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orsonteodoro/psdoom-ng1/HEAD/data/strife.png -------------------------------------------------------------------------------- /data/wadfile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orsonteodoro/psdoom-ng1/HEAD/data/wadfile.png -------------------------------------------------------------------------------- /man/bash-completion/.gitignore: -------------------------------------------------------------------------------- 1 | *doom 2 | *heretic 3 | *hexen 4 | *strife 5 | *.template 6 | -------------------------------------------------------------------------------- /opl/.gitignore: -------------------------------------------------------------------------------- 1 | Makefile.in 2 | Makefile 3 | .deps 4 | libopl.a 5 | *.rc 6 | tags 7 | TAGS 8 | -------------------------------------------------------------------------------- /opl/examples/.gitignore: -------------------------------------------------------------------------------- 1 | Makefile.in 2 | Makefile 3 | .deps 4 | droplay 5 | *.exe 6 | tags 7 | TAGS 8 | -------------------------------------------------------------------------------- /pcsound/.gitignore: -------------------------------------------------------------------------------- 1 | Makefile.in 2 | Makefile 3 | .deps 4 | libpcsound.a 5 | *.rc 6 | tags 7 | TAGS 8 | 9 | -------------------------------------------------------------------------------- /pkg/osx/Resources/app.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orsonteodoro/psdoom-ng1/HEAD/pkg/osx/Resources/app.png -------------------------------------------------------------------------------- /pkg/osx/disk/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orsonteodoro/psdoom-ng1/HEAD/pkg/osx/disk/background.png -------------------------------------------------------------------------------- /pkg/osx/disk/dir.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orsonteodoro/psdoom-ng1/HEAD/pkg/osx/disk/dir.DS_Store -------------------------------------------------------------------------------- /pkg/win32/README: -------------------------------------------------------------------------------- 1 | Makefile to build Windows packages. Requires zip and unix2dos 2 | packages to be installed. 3 | -------------------------------------------------------------------------------- /src/setup/.gitignore: -------------------------------------------------------------------------------- 1 | Makefile.in 2 | Makefile 3 | .deps 4 | setup-manifest.xml 5 | *.rc 6 | tags 7 | TAGS 8 | -------------------------------------------------------------------------------- /textscreen/fonts/large.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orsonteodoro/psdoom-ng1/HEAD/textscreen/fonts/large.png -------------------------------------------------------------------------------- /textscreen/fonts/normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orsonteodoro/psdoom-ng1/HEAD/textscreen/fonts/normal.png -------------------------------------------------------------------------------- /textscreen/fonts/small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orsonteodoro/psdoom-ng1/HEAD/textscreen/fonts/small.png -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "quickcheck"] 2 | path = quickcheck 3 | url = https://github.com/chocolate-doom/quickcheck.git 4 | -------------------------------------------------------------------------------- /data/.gitignore: -------------------------------------------------------------------------------- 1 | Makefile.in 2 | Makefile 3 | *-doom.png 4 | *-heretic.png 5 | *-hexen.png 6 | *-setup.png 7 | *-strife.png 8 | -------------------------------------------------------------------------------- /textscreen/examples/.gitignore: -------------------------------------------------------------------------------- 1 | Makefile.in 2 | Makefile 3 | .deps 4 | guitest 5 | calculator 6 | *.exe 7 | tags 8 | TAGS 9 | -------------------------------------------------------------------------------- /contrib/psdoom-2000.05.03-data.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orsonteodoro/psdoom-ng1/HEAD/contrib/psdoom-2000.05.03-data.tar.gz -------------------------------------------------------------------------------- /psdoom-ng.conf.example: -------------------------------------------------------------------------------- 1 | DOOMWADPATH="/usr/share/games/doom-data:/usr/share/psdoom-ng" 2 | DEFAULT_ARGS="-psuser ${USER} -episode 1 -godstart" 3 | -------------------------------------------------------------------------------- /pkg/osx/Resources/launcher.nib/keyedobjects.nib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/orsonteodoro/psdoom-ng1/HEAD/pkg/osx/Resources/launcher.nib/keyedobjects.nib -------------------------------------------------------------------------------- /pkg/osx/.gitignore: -------------------------------------------------------------------------------- 1 | Info.plist 2 | app.iconset 3 | app.icns 4 | wadfile.iconset 5 | wadfile.icns 6 | launcher 7 | *.o 8 | *.d 9 | *.dmg 10 | staging 11 | -------------------------------------------------------------------------------- /vcpkg.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": [ 3 | "sdl2", 4 | "sdl2-mixer", 5 | "sdl2-net", 6 | "libpng", 7 | "libsamplerate", 8 | "fluidsynth" 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /ChangeLog: -------------------------------------------------------------------------------- 1 | Chocolate Doom's version history is stored in Git. For a full 2 | change log, clone the repository on Github: 3 | 4 | https://github.com/chocolate-doom/chocolate-doom 5 | 6 | -------------------------------------------------------------------------------- /man/wikipages: -------------------------------------------------------------------------------- 1 | # This is a list of wiki pages to automatically link to when generating 2 | # wikitext output. 3 | Dehacked 4 | Doom 1.91 5 | Merging 6 | Multiplayer 7 | Three screen mode 8 | -------------------------------------------------------------------------------- /check-extern.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | EXTERN="$(grep -e 'extern[^A-Za-z0-9_]' $(find . -name *.c))" 3 | if [ -n "$EXTERN" ] ; then 4 | echo "extern found in .c files:\n${EXTERN}" 5 | exit 1 6 | fi 7 | -------------------------------------------------------------------------------- /opl/examples/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | AM_CFLAGS = -I$(top_srcdir)/opl 3 | 4 | noinst_PROGRAMS=droplay 5 | 6 | droplay_LDADD = ../libopl.a @LDFLAGS@ @SDL_LIBS@ @SDLMIXER_LIBS@ 7 | droplay_SOURCES = droplay.c 8 | 9 | -------------------------------------------------------------------------------- /src/psdoom-ng.desktop.in: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=psdoom-ng 3 | Exec=psd 4 | Icon=psdoom-ng 5 | Type=Application 6 | Comment=psdoom-ng, personified process killer and monitor 7 | Categories=System;Monitor; 8 | -------------------------------------------------------------------------------- /man/CMDLINE.template: -------------------------------------------------------------------------------- 1 | == Command line parameters == 2 | 3 | This is a full list of the supported command line parameters. A number of 4 | additional parameters are supported in addition to those present in the DOS 5 | version. 6 | 7 | @content 8 | 9 | -------------------------------------------------------------------------------- /man/CMDLINE.template.md: -------------------------------------------------------------------------------- 1 | # Command line parameters 2 | 3 | This is a full list of the supported command line parameters. A number of 4 | additional parameters are supported in addition to those present in the DOS 5 | version. 6 | 7 | @content 8 | 9 | -------------------------------------------------------------------------------- /src/Doom.desktop.in: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=@PACKAGE_SHORTNAME@ Doom 3 | Exec=@PROGRAM_PREFIX@doom 4 | Icon=@PROGRAM_PREFIX@doom 5 | Type=Application 6 | Comment=@PACKAGE_SHORTDESC@ 7 | Categories=Game;ActionGame; 8 | Keywords=first;person;shooter;vanilla; 9 | -------------------------------------------------------------------------------- /src/Hexen.desktop.in: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=@PACKAGE_SHORTNAME@ Hexen 3 | Exec=@PROGRAM_PREFIX@hexen 4 | Icon=@PROGRAM_PREFIX@hexen 5 | Type=Application 6 | Comment=@PACKAGE_SHORTDESC@ 7 | Categories=Game;ActionGame; 8 | Keywords=first;person;shooter;doom;vanilla; 9 | -------------------------------------------------------------------------------- /src/Heretic.desktop.in: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=@PACKAGE_SHORTNAME@ Heretic 3 | Exec=@PROGRAM_PREFIX@heretic 4 | Icon=@PROGRAM_PREFIX@heretic 5 | Type=Application 6 | Comment=@PACKAGE_SHORTDESC@ 7 | Categories=Game;ActionGame; 8 | Keywords=first;person;shooter;doom;vanilla; 9 | -------------------------------------------------------------------------------- /src/Strife.desktop.in: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=@PACKAGE_SHORTNAME@ Strife 3 | Exec=@PROGRAM_PREFIX@strife 4 | Icon=@PROGRAM_PREFIX@strife 5 | Type=Application 6 | Comment=@PACKAGE_SHORTDESC@ 7 | Categories=Game;ActionGame; 8 | Keywords=first;person;shooter;doom;vanilla; 9 | -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | Simon Howard 2 | James Haley 3 | Samuel Villarreal 4 | Fabian Greffrath 5 | Jonathan Dowland 6 | Alexey Khokholov 7 | Turo Lamminen 8 | -------------------------------------------------------------------------------- /src/setup/Setup.desktop.in: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=@PACKAGE_SHORTNAME@ Setup 3 | Exec=@PROGRAM_PREFIX@setup 4 | Icon=@PROGRAM_PREFIX@setup 5 | Type=Application 6 | Comment=Setup tool for @PACKAGE_SHORTNAME@ 7 | Categories=Settings; 8 | Keywords=first;person;shooter;doom;heretic;hexen;strife;vanilla; 9 | -------------------------------------------------------------------------------- /man/.gitignore: -------------------------------------------------------------------------------- 1 | CMDLINE.doom 2 | CMDLINE.doom.md 3 | CMDLINE.heretic 4 | CMDLINE.heretic.md 5 | CMDLINE.hexen 6 | CMDLINE.hexen.md 7 | CMDLINE.strife 8 | CMDLINE.strife.md 9 | INSTALL.doom 10 | INSTALL.heretic 11 | INSTALL.hexen 12 | INSTALL.strife 13 | Makefile.in 14 | Makefile 15 | *.6 16 | *.5 17 | -------------------------------------------------------------------------------- /src/Doom_Screensaver.desktop.in: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=@PACKAGE_SHORTNAME@ Doom 3 | Comment=@PACKAGE_SHORTDESC@ 4 | TryExec=@PROGRAM_PREFIX@doom 5 | Exec=@PROGRAM_PREFIX@doom 6 | StartupNotify=false 7 | Terminal=false 8 | Type=Application 9 | OnlyShowIn=GNOME;MATE; 10 | Categories=Screensaver; 11 | -------------------------------------------------------------------------------- /textscreen/examples/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | AM_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/textscreen 3 | 4 | noinst_PROGRAMS=guitest calculator 5 | 6 | guitest_LDADD = ../libtextscreen.a @LDFLAGS@ @SDL_LIBS@ 7 | guitest_SOURCES = guitest.c 8 | 9 | calculator_LDADD = ../libtextscreen.a @LDFLAGS@ @SDL_LIBS@ 10 | calculator_SOURCES = calculator.c 11 | 12 | -------------------------------------------------------------------------------- /.devcontainer/initialize-linux.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | HERE=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P ) 3 | 4 | ### Create the xauth file allowing the container to interact with a forwarded X11 5 | XAUTH="$HERE/share/devcontainer.xauth"; 6 | touch "$XAUTH" 7 | xauth nlist $DISPLAY | sed -e 's/^..../ffff/' | xauth -f $XAUTH nmerge - 8 | 9 | ### TODO: pulseaudio pasthrough -------------------------------------------------------------------------------- /src/.gitignore: -------------------------------------------------------------------------------- 1 | Makefile 2 | Makefile.in 3 | .deps 4 | *.rc 5 | chocolate-doom 6 | chocolate-heretic 7 | chocolate-hexen 8 | chocolate-server 9 | chocolate-strife 10 | chocolate-doom-setup 11 | chocolate-heretic-setup 12 | chocolate-hexen-setup 13 | chocolate-strife-setup 14 | chocolate-setup 15 | *.cfg 16 | *.exe 17 | *.desktop 18 | *.txt 19 | !CMakeLists.txt 20 | *.metainfo.xml 21 | tags 22 | TAGS 23 | -------------------------------------------------------------------------------- /cmake/config.h.cin: -------------------------------------------------------------------------------- 1 | #cmakedefine PACKAGE_NAME "@PACKAGE_NAME@" 2 | #cmakedefine PACKAGE_TARNAME "@PACKAGE_TARNAME@" 3 | #cmakedefine PACKAGE_VERSION "@PACKAGE_VERSION@" 4 | #cmakedefine PACKAGE_STRING "@PACKAGE_STRING@" 5 | #cmakedefine PROGRAM_PREFIX "@PROGRAM_PREFIX@" 6 | 7 | #cmakedefine HAVE_FLUIDSYNTH 8 | #cmakedefine HAVE_LIBSAMPLERATE 9 | #cmakedefine HAVE_LIBPNG 10 | #cmakedefine HAVE_DIRENT_H 11 | #cmakedefine01 HAVE_DECL_STRCASECMP 12 | #cmakedefine01 HAVE_DECL_STRNCASECMP 13 | -------------------------------------------------------------------------------- /src/manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | true 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /textscreen/fonts/Makefile.am: -------------------------------------------------------------------------------- 1 | FONT_HDRS = small.h normal.h large.h codepage.h 2 | EXTRA_DIST = small.png normal.png large.png convert-font $(FONT_HDRS) 3 | 4 | noinst_DATA = $(FONT_HDRS) 5 | 6 | if HAVE_FONTS 7 | 8 | small.h: small.png convert-font 9 | $(srcdir)/convert-font small small.png small.h 10 | 11 | normal.h: normal.png convert-font 12 | $(srcdir)/convert-font normal normal.png normal.h 13 | 14 | large.h: large.png convert-font 15 | $(srcdir)/convert-font large large.png large.h 16 | 17 | endif 18 | 19 | -------------------------------------------------------------------------------- /pcsound/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | AM_CFLAGS=@SDLMIXER_CFLAGS@ 3 | 4 | EXTRA_DIST=CMakeLists.txt 5 | 6 | noinst_LIBRARIES=libpcsound.a 7 | 8 | libpcsound_a_SOURCES = \ 9 | pcsound.c pcsound.h \ 10 | pcsound_bsd.c \ 11 | pcsound_sdl.c \ 12 | pcsound_linux.c \ 13 | pcsound_win32.c \ 14 | pcsound_internal.h 15 | 16 | -------------------------------------------------------------------------------- /src/psdoom-ng.metainfo.xml.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | psdoom-ng.desktop 5 | CC0-1.0 6 | GPL-2.0+ 7 | @PACKAGE_MAINTAINER@ 8 | @PACKAGE_URL@ 9 | @PACKAGE_BUGREPORT@ 10 | 11 |

12 | psdoom-ng is a process killer and monitor, 13 |

14 |
15 |
16 | -------------------------------------------------------------------------------- /.github/workflows/cppcheck.yml: -------------------------------------------------------------------------------- 1 | name: cppcheck 2 | 3 | on: 4 | pull_request: 5 | types: [opened, reopened, synchronize] 6 | push: 7 | branches: 8 | - master 9 | 10 | jobs: 11 | cppcheck: 12 | runs-on: ubuntu-22.04 13 | 14 | steps: 15 | - name: Install dependencies 16 | run: sudo apt-get update && sudo apt-get install cppcheck 17 | 18 | - uses: actions/checkout@v4 19 | 20 | - name: Run cppcheck 21 | env: 22 | ANALYZE: true 23 | run: $GITHUB_WORKSPACE/.travis.sh 24 | -------------------------------------------------------------------------------- /.travis.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | if [ "$ANALYZE" = "true" ] ; then 3 | # -D__GNUC__ is required for cppcheck to know about noreturn functions 4 | cppcheck --error-exitcode=1 -j2 -UTESTING -D__GNUC__ -Iopl -Isrc -Isrc/setup opl pcsound src textscreen 2> stderr.txt 5 | RET=$? 6 | if [ -s stderr.txt ] 7 | then 8 | cat stderr.txt 9 | fi 10 | exit $RET 11 | else 12 | set -e 13 | ./autogen.sh --enable-werror 14 | make -j4 15 | make install DESTDIR=/tmp/whatever 16 | make dist 17 | PREFIX=`sed -n '/PROGRAM_PREFIX/p' ${PWD}/config.h | cut -d '"' -f 2` 18 | make -j4 -C quickcheck check SOURCE_PORT=$PWD/src/${PREFIX}doom 19 | fi 20 | -------------------------------------------------------------------------------- /src/net_petname.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 2019 Jonathan Dowland 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // DESCRIPTION: 15 | // Generate a randomized, private, memorable name for a Player 16 | // 17 | 18 | char *NET_GetRandomPetName(); 19 | -------------------------------------------------------------------------------- /opl/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | AM_CFLAGS=@SDLMIXER_CFLAGS@ 3 | 4 | EXTRA_DIST=CMakeLists.txt 5 | 6 | SUBDIRS = . examples 7 | 8 | noinst_LIBRARIES=libopl.a 9 | 10 | libopl_a_SOURCES = \ 11 | opl_internal.h \ 12 | opl.c opl.h \ 13 | opl_linux.c \ 14 | opl_obsd.c \ 15 | opl_queue.c opl_queue.h \ 16 | opl_sdl.c \ 17 | opl_timer.c opl_timer.h \ 18 | opl_win32.c \ 19 | ioperm_sys.c ioperm_sys.h \ 20 | opl3.c opl3.h 21 | 22 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 12 | 13 | ### Background 14 | 15 | Version of Chocolate Doom: 16 | 17 | Operating System and version: 18 | 19 | Game: (Doom/Heretic/Hexen/Strife/other) 20 | 21 | Any loaded WADs and mods (please include full command line): 22 | 23 | ### Bug description 24 | 25 | Observed behavior: 26 | 27 | Expected behavior: 28 | 29 | -------------------------------------------------------------------------------- /data/README: -------------------------------------------------------------------------------- 1 | The Chocolate Doom icon is based on an image by Chris Metcalf 2 | (http://www.chrismetcalf.org/) which is copyrighted to him: 3 | 4 | http://www.flickr.com/photos/laffy4k/448920776/ 5 | 6 | Chris has kindly agreed that the Chocolate Doom icon may be used under 7 | the GNU GPL, so the copyright status of the icon is the same as that of 8 | the rest of the project. 9 | 10 | The "foo8.ico" files are 8-bit depth only, while the "foo.ico" files 11 | contain full 32-bit versions, scaled to different sizes and with proper 12 | alpha masks (as well as the 8-bit versions). The 8-bit versions are 13 | used when setting the icon within SDL, as SDL under Windows displays 14 | full color icons in a very poor quality. The full-color versions are 15 | used in the resource files. 16 | 17 | -------------------------------------------------------------------------------- /src/doom/statdump.h: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright(C) 2005-2014 Simon Howard 4 | 5 | This program is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU General Public License 7 | as published by the Free Software Foundation; either version 2 8 | of the License, or (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | 15 | */ 16 | 17 | #ifndef DOOM_STATDUMP_H 18 | #define DOOM_STATDUMP_H 19 | 20 | void StatCopy(const wbstartstruct_t *stats); 21 | void StatDump(void); 22 | 23 | #endif /* #ifndef DOOM_STATDUMP_H */ 24 | -------------------------------------------------------------------------------- /src/setup-res.rc.in: -------------------------------------------------------------------------------- 1 | 1 ICON "@top_srcdir@/data/setup.ico" 2 | 3 | 1 24 MOVEABLE PURE "@top_builddir@/src/setup/setup-manifest.xml" 4 | 5 | 1 VERSIONINFO 6 | PRODUCTVERSION @WINDOWS_RC_VERSION@ 7 | FILEVERSION @WINDOWS_RC_VERSION@ 8 | FILETYPE 1 9 | { 10 | BLOCK "StringFileInfo" 11 | { 12 | BLOCK "040904E4" 13 | { 14 | VALUE "FileVersion", "@PACKAGE_VERSION@.0" 15 | VALUE "FileDescription", "@PACKAGE_STRING@ Setup" 16 | VALUE "InternalName", "@PACKAGE_TARNAME@" 17 | VALUE "CompanyName", "@PACKAGE_BUGREPORT@" 18 | VALUE "LegalCopyright", "GNU General Public License" 19 | VALUE "ProductName", "@PACKAGE_NAME@ Setup" 20 | VALUE "ProductVersion", "@PACKAGE_VERSION@" 21 | } 22 | } 23 | BLOCK "VarFileInfo" 24 | { 25 | VALUE "Translation", 0x409, 1252 26 | } 27 | } 28 | 29 | -------------------------------------------------------------------------------- /src/net_dedicated.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 2005-2014 Simon Howard 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // 15 | // Dedicated server code. 16 | // 17 | 18 | #ifndef NET_DEDICATED_H 19 | #define NET_DEDICATED_H 20 | 21 | void NET_DedicatedServer(void); 22 | 23 | #endif /* #ifndef NET_DEDICATED_H */ 24 | 25 | 26 | -------------------------------------------------------------------------------- /pkg/osx/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 2005-2014 Simon Howard 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | 15 | #include 16 | #include "Execute.h" 17 | 18 | int main(int argc, const char *argv[]) 19 | { 20 | SetProgramLocation(argv[0]); 21 | 22 | return NSApplicationMain (argc, argv); 23 | } 24 | 25 | -------------------------------------------------------------------------------- /src/setup/mouse.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 2005-2014 Simon Howard 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | 15 | #ifndef SETUP_MOUSE_H 16 | #define SETUP_MOUSE_H 17 | 18 | void ConfigMouse(void *widget, void *user_data); 19 | void BindMouseVariables(void); 20 | 21 | extern int novert; 22 | 23 | #endif /* #ifndef SETUP_MOUSE_H */ 24 | -------------------------------------------------------------------------------- /pkg/config.make.in: -------------------------------------------------------------------------------- 1 | # Shared file included by the makefiles used to build packages. 2 | # This contains various information needed by the makefiles, 3 | # and is autogenerated by configure to include various 4 | # necessary details. 5 | 6 | # Tools needed: 7 | 8 | CC = @CC@ 9 | OBJDUMP = @OBJDUMP@ 10 | STRIP = @STRIP@ 11 | LDFLAGS = @LDFLAGS@ 12 | 13 | # Package name and version number: 14 | 15 | PROGRAM_PREFIX = @PROGRAM_PREFIX@ 16 | PACKAGE = @PACKAGE@ 17 | PACKAGE_NAME = @PACKAGE_NAME@ 18 | PACKAGE_STRING = @PACKAGE_STRING@ 19 | PACKAGE_TARNAME = @PACKAGE_TARNAME@ 20 | PACKAGE_VERSION = @PACKAGE_VERSION@ 21 | 22 | TARGET_OS = @TARGET_OS@ 23 | 24 | # Documentation files to distribute with packages. 25 | 26 | DOC_FILES = README.md \ 27 | README.Music.md \ 28 | COPYING.md \ 29 | NEWS.md 30 | 31 | -------------------------------------------------------------------------------- /src/setup/sound.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 2005-2014 Simon Howard 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | 15 | #ifndef SETUP_SOUND_H 16 | #define SETUP_SOUND_H 17 | 18 | #include "i_sound.h" 19 | 20 | void ConfigSound(void *widget, void *user_data); 21 | void BindSoundVariables(void); 22 | 23 | 24 | #endif /* #ifndef SETUP_SOUND_H */ 25 | -------------------------------------------------------------------------------- /src/doom/p_inter.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License 7 | // as published by the Free Software Foundation; either version 2 8 | // of the License, or (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // DESCRIPTION: 16 | // 17 | // 18 | 19 | 20 | #ifndef __P_INTER__ 21 | #define __P_INTER__ 22 | 23 | 24 | 25 | 26 | boolean P_GivePower(player_t*, int); 27 | 28 | 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /src/doom-res.rc.in: -------------------------------------------------------------------------------- 1 | 1 ICON "@top_srcdir@/data/doom.ico" 2 | 3 | #include 4 | 5 | CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "@top_srcdir@/src/manifest.xml" 6 | 7 | 1 VERSIONINFO 8 | PRODUCTVERSION @WINDOWS_RC_VERSION@ 9 | FILEVERSION @WINDOWS_RC_VERSION@ 10 | FILETYPE 1 11 | { 12 | BLOCK "StringFileInfo" 13 | { 14 | BLOCK "040904E4" 15 | { 16 | VALUE "FileVersion", "@PACKAGE_VERSION@.0" 17 | VALUE "FileDescription", "@PACKAGE_STRING@" 18 | VALUE "InternalName", "@PACKAGE_TARNAME@" 19 | VALUE "CompanyName", "@PACKAGE_BUGREPORT@" 20 | VALUE "LegalCopyright", "@PACKAGE_COPYRIGHT@. Licensed under @PACKAGE_LICENSE@" 21 | VALUE "ProductName", "@PACKAGE_NAME@" 22 | VALUE "ProductVersion", "@PACKAGE_VERSION@" 23 | } 24 | } 25 | BLOCK "VarFileInfo" 26 | { 27 | VALUE "Translation", 0x409, 1252 28 | } 29 | } 30 | 31 | -------------------------------------------------------------------------------- /src/hexen-res.rc.in: -------------------------------------------------------------------------------- 1 | 1 ICON "@top_srcdir@/data/hexen.ico" 2 | 3 | #include 4 | 5 | CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "@top_srcdir@/src/manifest.xml" 6 | 7 | 1 VERSIONINFO 8 | PRODUCTVERSION @WINDOWS_RC_VERSION@ 9 | FILEVERSION @WINDOWS_RC_VERSION@ 10 | FILETYPE 1 11 | { 12 | BLOCK "StringFileInfo" 13 | { 14 | BLOCK "040904E4" 15 | { 16 | VALUE "FileVersion", "@PACKAGE_VERSION@.0" 17 | VALUE "FileDescription", "@PACKAGE_STRING@" 18 | VALUE "InternalName", "@PACKAGE_TARNAME@" 19 | VALUE "CompanyName", "@PACKAGE_BUGREPORT@" 20 | VALUE "LegalCopyright", "@PACKAGE_COPYRIGHT@. Licensed under @PACKAGE_LICENSE@" 21 | VALUE "ProductName", "@PACKAGE_NAME@" 22 | VALUE "ProductVersion", "@PACKAGE_VERSION@" 23 | } 24 | } 25 | BLOCK "VarFileInfo" 26 | { 27 | VALUE "Translation", 0x409, 1252 28 | } 29 | } 30 | 31 | -------------------------------------------------------------------------------- /src/heretic-res.rc.in: -------------------------------------------------------------------------------- 1 | 1 ICON "@top_srcdir@/data/heretic.ico" 2 | 3 | #include 4 | 5 | CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "@top_srcdir@/src/manifest.xml" 6 | 7 | 1 VERSIONINFO 8 | PRODUCTVERSION @WINDOWS_RC_VERSION@ 9 | FILEVERSION @WINDOWS_RC_VERSION@ 10 | FILETYPE 1 11 | { 12 | BLOCK "StringFileInfo" 13 | { 14 | BLOCK "040904E4" 15 | { 16 | VALUE "FileVersion", "@PACKAGE_VERSION@.0" 17 | VALUE "FileDescription", "@PACKAGE_STRING@" 18 | VALUE "InternalName", "@PACKAGE_TARNAME@" 19 | VALUE "CompanyName", "@PACKAGE_BUGREPORT@" 20 | VALUE "LegalCopyright", "@PACKAGE_COPYRIGHT@. Licensed under @PACKAGE_LICENSE@" 21 | VALUE "ProductName", "@PACKAGE_NAME@" 22 | VALUE "ProductVersion", "@PACKAGE_VERSION@" 23 | } 24 | } 25 | BLOCK "VarFileInfo" 26 | { 27 | VALUE "Translation", 0x409, 1252 28 | } 29 | } 30 | 31 | -------------------------------------------------------------------------------- /src/net_sdl.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 2005-2014 Simon Howard 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // DESCRIPTION: 15 | // Networking module which uses SDL_net 16 | // 17 | 18 | #ifndef NET_SDL_H 19 | #define NET_SDL_H 20 | 21 | #include "net_defs.h" 22 | 23 | extern net_module_t net_sdl_module; 24 | 25 | #endif /* #ifndef NET_SDL_H */ 26 | 27 | -------------------------------------------------------------------------------- /src/strife-res.rc.in: -------------------------------------------------------------------------------- 1 | 1 ICON "@top_srcdir@/data/strife.ico" 2 | 3 | #include 4 | 5 | CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "@top_srcdir@/src/manifest.xml" 6 | 7 | 1 VERSIONINFO 8 | PRODUCTVERSION @WINDOWS_RC_VERSION@ 9 | FILEVERSION @WINDOWS_RC_VERSION@ 10 | FILETYPE 1 11 | { 12 | BLOCK "StringFileInfo" 13 | { 14 | BLOCK "040904E4" 15 | { 16 | VALUE "FileVersion", "@PACKAGE_VERSION@.0" 17 | VALUE "FileDescription", "@PACKAGE_STRING@" 18 | VALUE "InternalName", "@PACKAGE_TARNAME@" 19 | VALUE "CompanyName", "@PACKAGE_BUGREPORT@" 20 | VALUE "LegalCopyright", "@PACKAGE_COPYRIGHT@. Licensed under @PACKAGE_LICENSE@" 21 | VALUE "ProductName", "@PACKAGE_NAME@" 22 | VALUE "ProductVersion", "@PACKAGE_VERSION@" 23 | } 24 | } 25 | BLOCK "VarFileInfo" 26 | { 27 | VALUE "Translation", 0x409, 1252 28 | } 29 | } 30 | 31 | -------------------------------------------------------------------------------- /src/setup/keyboard.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 2005-2014 Simon Howard 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | 15 | #ifndef SETUP_KEYBOARD_H 16 | #define SETUP_KEYBOARD_H 17 | 18 | void ConfigKeyboard(void *widget, void *user_data); 19 | void BindKeyboardVariables(void); 20 | 21 | extern int vanilla_keyboard_mapping; 22 | 23 | #endif /* #ifndef SETUP_KEYBOARD_H */ 24 | -------------------------------------------------------------------------------- /CREDITS.psdoom-ng: -------------------------------------------------------------------------------- 1 | This list of credits for psDooM is in no particular order, save for id 2 | Software coming first. I'll try to keep it more or less cronological. 3 | 4 | id Software: http://www.idsoftware.com 5 | 6 | --For writing Doom in the first place. 7 | --For giving eager programmers the GPL'd source. 8 | 9 | Udo Munk: um@compuserve.com 10 | 11 | --For programming XDoom and maintaining it. 12 | 13 | 14 | 15 | --For helping out with XDoom. 16 | 17 | Dennis Chao: dlchao@cs.unm.edu 18 | 19 | --For coming up with the brilliant idea of using Doom for process 20 | management and wading through the XDoom code to implement it. 21 | 22 | Mark H. Hamilton: mark.h.hamilton@gtemail.net 23 | 24 | --For coming up with the psDooM moniker "DooM for Sys A's". 25 | 26 | psDooM is currently maintained by: 27 | David Koppenhofer (djk@users.sourceforge.net) 28 | -------------------------------------------------------------------------------- /.lvimrc: -------------------------------------------------------------------------------- 1 | " Local vimrc configuration file. Install the localvimrc.vim vim script. 2 | set expandtab 3 | set tabstop=8 4 | set softtabstop=4 5 | set shiftwidth=4 6 | 7 | " Add all tag files to tags path. 8 | 9 | let topdir = findfile("configure.ac", ".;") 10 | let topdir = substitute(topdir, "configure.ac", "", "") 11 | 12 | " Check tags file in current dir: 13 | set tags+=tags 14 | 15 | " Add tag files in parent directories: 16 | let tagfiles = findfile("tags", ".;", -1) 17 | 18 | " Add tag files for libraries: 19 | call add(tagfiles, topdir . "opl/tags") 20 | call add(tagfiles, topdir . "pcsound/tags") 21 | call add(tagfiles, topdir . "textscreen/tags") 22 | 23 | for tagfile in tagfiles 24 | " Don't go beyond the project top level when adding parent dirs: 25 | if stridx(tagfile, topdir) >= 0 26 | exec "set tags+=" . tagfile 27 | endif 28 | endfor 29 | 30 | unlet topdir 31 | unlet tagfiles 32 | 33 | -------------------------------------------------------------------------------- /src/gusconf.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 2005-2014 Simon Howard 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // DESCRIPTION: 15 | // GUS emulation code. 16 | // 17 | 18 | #ifndef __GUSCONF_H__ 19 | #define __GUSCONF_H__ 20 | 21 | #include "doomtype.h" 22 | 23 | extern char *gus_patch_path; 24 | extern int gus_ram_kb; 25 | 26 | boolean GUS_WriteConfig(char *path); 27 | 28 | #endif /* #ifndef __GUSCONF_H__ */ 29 | 30 | -------------------------------------------------------------------------------- /src/doom/doomdef.c: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License 7 | // as published by the Free Software Foundation; either version 2 8 | // of the License, or (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // DESCRIPTION: 16 | // DoomDef - basic defines for DOOM, e.g. Version, game mode 17 | // and skill level, and display parameters. 18 | // 19 | 20 | 21 | 22 | #include "doomdef.h" 23 | 24 | // Location for any defines turned variables. 25 | 26 | // None. 27 | 28 | 29 | -------------------------------------------------------------------------------- /src/setup/compatibility.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 2005-2014 Simon Howard 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | 15 | #ifndef SETUP_COMPATIBILITY_H 16 | #define SETUP_COMPATIBILITY_H 17 | 18 | void CompatibilitySettings(void *widget, void *user_data); 19 | void BindCompatibilityVariables(void); 20 | 21 | extern int vanilla_savegame_limit; 22 | extern int vanilla_demo_limit; 23 | 24 | #endif /* #ifndef SETUP_COMPATIBILITY_H */ 25 | -------------------------------------------------------------------------------- /src/strife/doomdef.c: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License 7 | // as published by the Free Software Foundation; either version 2 8 | // of the License, or (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // DESCRIPTION: 16 | // DoomDef - basic defines for DOOM, e.g. Version, game mode 17 | // and skill level, and display parameters. 18 | // 19 | 20 | 21 | 22 | #include "doomdef.h" 23 | 24 | // Location for any defines turned variables. 25 | 26 | // None. 27 | 28 | 29 | -------------------------------------------------------------------------------- /src/w_checksum.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License 7 | // as published by the Free Software Foundation; either version 2 8 | // of the License, or (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // DESCRIPTION: 16 | // Generate a checksum of the WAD directory. 17 | // 18 | 19 | #ifndef W_CHECKSUM_H 20 | #define W_CHECKSUM_H 21 | 22 | #include "doomtype.h" 23 | 24 | extern void W_Checksum(sha1_digest_t digest); 25 | 26 | #endif /* #ifndef W_CHECKSUM_H */ 27 | 28 | -------------------------------------------------------------------------------- /src/i_endoom.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License 7 | // as published by the Free Software Foundation; either version 2 8 | // of the License, or (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // DESCRIPTION: 16 | // Exit text-mode ENDOOM screen. 17 | // 18 | 19 | 20 | #ifndef __I_ENDOOM__ 21 | #define __I_ENDOOM__ 22 | 23 | // Display the Endoom screen on shutdown. Pass a pointer to the 24 | // ENDOOM lump. 25 | 26 | void I_Endoom(byte *data); 27 | 28 | #endif 29 | 30 | -------------------------------------------------------------------------------- /src/net_loop.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 2005-2014 Simon Howard 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // DESCRIPTION: 15 | // Loopback network module for server compiled into the client 16 | // 17 | 18 | #ifndef NET_LOOP_H 19 | #define NET_LOOP_H 20 | 21 | #include "net_defs.h" 22 | 23 | extern net_module_t net_loop_client_module; 24 | extern net_module_t net_loop_server_module; 25 | 26 | #endif /* #ifndef NET_LOOP_H */ 27 | 28 | -------------------------------------------------------------------------------- /src/doom/p_tick.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License 7 | // as published by the Free Software Foundation; either version 2 8 | // of the License, or (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // DESCRIPTION: 16 | // ? 17 | // 18 | 19 | 20 | #ifndef __P_TICK__ 21 | #define __P_TICK__ 22 | 23 | 24 | 25 | 26 | // Called by C_Ticker, 27 | // can call G_PlayerExited. 28 | // Carries out all thinking of monsters and players. 29 | void P_Ticker (void); 30 | 31 | 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /src/strife/p_tick.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License 7 | // as published by the Free Software Foundation; either version 2 8 | // of the License, or (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // DESCRIPTION: 16 | // ? 17 | // 18 | 19 | 20 | #ifndef __P_TICK__ 21 | #define __P_TICK__ 22 | 23 | 24 | 25 | 26 | // Called by C_Ticker, 27 | // can call G_PlayerExited. 28 | // Carries out all thinking of monsters and players. 29 | void P_Ticker (void); 30 | 31 | 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /src/setup/display.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 2005-2014 Simon Howard 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | 15 | #ifndef SETUP_DISPLAY_H 16 | #define SETUP_DISPLAY_H 17 | 18 | void ConfigDisplay(void *widget, void *user_data); 19 | void SetDisplayDriver(void); 20 | void BindDisplayVariables(void); 21 | 22 | extern int show_endoom; 23 | extern int graphical_startup; 24 | extern int png_screenshots; 25 | 26 | #endif /* #ifndef SETUP_DISPLAY_H */ 27 | -------------------------------------------------------------------------------- /src/net_gui.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 2005-2014 Simon Howard 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // Graphical stuff related to the networking code: 15 | // 16 | // * The client waiting screen when we are waiting for the server to 17 | // start the game. 18 | // 19 | 20 | 21 | #ifndef NET_GUI_H 22 | #define NET_GUI_H 23 | 24 | #include "doomtype.h" 25 | 26 | extern void NET_WaitForLaunch(void); 27 | 28 | #endif /* #ifndef NET_GUI_H */ 29 | 30 | -------------------------------------------------------------------------------- /textscreen/txt_utf8.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 2005-2014 Simon Howard 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | 15 | #ifndef TXT_UTF8_H 16 | #define TXT_UTF8_H 17 | 18 | #include 19 | 20 | char *TXT_EncodeUTF8(char *p, unsigned int c); 21 | unsigned int TXT_DecodeUTF8(const char **ptr); 22 | unsigned int TXT_UTF8_Strlen(const char *s); 23 | char *TXT_UTF8_SkipChars(const char *s, unsigned int n); 24 | 25 | #endif /* #ifndef TXT_UTF8_H */ 26 | 27 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | CMDLINE 2 | INSTALL 3 | Makefile 4 | Makefile.in 5 | TAGS 6 | aclocal.m4 7 | autom4te.cache 8 | autotools 9 | bin 10 | config.h 11 | config.hin 12 | config.log 13 | config.status 14 | configure 15 | lib 16 | obj 17 | rpm.spec 18 | stamp-h 19 | stamp-h.in 20 | stamp-h1 21 | tags 22 | \#*\# 23 | DOOM*.png 24 | HTIC*.png 25 | HEXEN*.png 26 | STRIFE*.png 27 | DOOM*.pcx 28 | HTIC*.pcx 29 | HEXEN*.pcx 30 | STRIFE*.pcx 31 | 32 | # CMake-specific ignores 33 | /.vs 34 | /build* 35 | /CMakeSettings.json 36 | /out 37 | 38 | # These are the default patterns globally ignored by Subversion: 39 | *.o 40 | *.lo 41 | *.la 42 | *.al 43 | .libs 44 | *.so 45 | *.so.[0-9]* 46 | *.a 47 | *.pyc 48 | *.pyo 49 | *.rej 50 | *~ 51 | .#* 52 | .*.swp 53 | .DS_store 54 | 55 | # Ignore GNU Global tags and html files 56 | GPATH 57 | GRTAGS 58 | GTAGS 59 | /HTML/ 60 | 61 | # VSCode settings 62 | 63 | /.vscode/ 64 | 65 | # clangd settings 66 | /.cache/clangd 67 | compile_commands.json 68 | -------------------------------------------------------------------------------- /pkg/style.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 48 | 49 | -------------------------------------------------------------------------------- /src/doom/r_segs.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License 7 | // as published by the Free Software Foundation; either version 2 8 | // of the License, or (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // DESCRIPTION: 16 | // Refresh module, drawing LineSegs from BSP. 17 | // 18 | 19 | 20 | #ifndef __R_SEGS__ 21 | #define __R_SEGS__ 22 | 23 | 24 | extern lighttable_t **walllights; 25 | 26 | 27 | void 28 | R_RenderMaskedSegRange 29 | ( drawseg_t* ds, 30 | int x1, 31 | int x2 ); 32 | 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /pkg/osx/Execute.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 2005-2014 Simon Howard 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | 15 | #ifndef LAUNCHER_EXECUTE_H 16 | #define LAUNCHER_EXECUTE_H 17 | 18 | void SetProgramLocation(const char *path); 19 | void ExecuteProgram(const char *executable, const char *iwad, const char *args); 20 | void OpenTerminalWindow(const char *doomwadpath); 21 | void OpenDocumentation(const char *filename); 22 | 23 | #endif /* #ifndef LAUNCHER_EXECUTE_H */ 24 | 25 | -------------------------------------------------------------------------------- /src/strife/r_segs.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License 7 | // as published by the Free Software Foundation; either version 2 8 | // of the License, or (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // DESCRIPTION: 16 | // Refresh module, drawing LineSegs from BSP. 17 | // 18 | 19 | 20 | #ifndef __R_SEGS__ 21 | #define __R_SEGS__ 22 | 23 | 24 | extern lighttable_t **walllights; 25 | 26 | 27 | void 28 | R_RenderMaskedSegRange 29 | ( drawseg_t* ds, 30 | int x1, 31 | int x2 ); 32 | 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /src/w_main.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 2005-2014 Simon Howard 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // DESCRIPTION: 15 | // Common code to parse command line, identifying WAD files to load. 16 | // 17 | 18 | #ifndef W_MAIN_H 19 | #define W_MAIN_H 20 | 21 | #include "d_mode.h" 22 | 23 | boolean W_ParseCommandLine(void); 24 | void W_CheckCorrectIWAD(GameMission_t mission); 25 | 26 | // Autoload all .wad files from the given directory: 27 | void W_AutoLoadWADs(const char *path); 28 | 29 | #endif /* #ifndef W_MAIN_H */ 30 | 31 | -------------------------------------------------------------------------------- /src/setup/joystick.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 2005-2014 Simon Howard 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | 15 | #ifndef SETUP_JOYSTICK_H 16 | #define SETUP_JOYSTICK_H 17 | 18 | 19 | #include "i_joystick.h" 20 | 21 | 22 | extern int joystick_index; 23 | extern int joystick_physical_buttons[NUM_VIRTUAL_BUTTONS]; 24 | extern int use_gamepad; 25 | extern int gamepad_type; 26 | 27 | 28 | void ConfigJoystick(void *widget, void *user_data); 29 | void BindJoystickVariables(void); 30 | 31 | #endif /* #ifndef SETUP_JOYSTICK_H */ 32 | 33 | -------------------------------------------------------------------------------- /src/aes_prng.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 2005-2014 Simon Howard 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // DESCRIPTION: 15 | // Pseudo-random number generator for secure demos. 16 | // 17 | 18 | #ifndef __AES_PRNG_H__ 19 | #define __AES_PRNG_H__ 20 | 21 | #include "doomtype.h" 22 | 23 | // Nonce value used as random seed for secure demos. 24 | 25 | typedef byte prng_seed_t[16]; 26 | 27 | void PRNG_Start(prng_seed_t seed); 28 | void PRNG_Stop(void); 29 | unsigned int PRNG_Random(void); 30 | 31 | #endif /* #ifndef __AES_PRNG_H__ */ 32 | 33 | -------------------------------------------------------------------------------- /opl/ioperm_sys.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 2002, 2003 Marcel Telka 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License 7 | // as published by the Free Software Foundation; either version 2 8 | // of the License, or (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // DESCRIPTION: 16 | // Interface to the ioperm.sys driver, based on code from the 17 | // Cygwin ioperm library. 18 | // 19 | 20 | #ifndef IOPERM_SYS_H 21 | #define IOPERM_SYS_H 22 | 23 | int IOperm_EnablePortRange(unsigned int from, unsigned int num, int turn_on); 24 | int IOperm_InstallDriver(void); 25 | int IOperm_UninstallDriver(void); 26 | 27 | #endif /* #ifndef IOPERM_SYS_H */ 28 | 29 | -------------------------------------------------------------------------------- /man/environ.man: -------------------------------------------------------------------------------- 1 | .TP 2 | \fBDOOMWADDIR\fR, \fBDOOMWADPATH\fR 3 | See the section, \fBIWAD SEARCH PATHS\fR above. 4 | .TP 5 | \fBPCSOUND_DRIVER\fR 6 | When running in PC speaker sound effect mode, this environment variable 7 | specifies a PC speaker driver to use for sound effect playback. Valid 8 | options are "Linux" for the Linux console mode driver, "BSD" for the 9 | NetBSD/OpenBSD PC speaker driver, and "SDL" for SDL-based emulated PC speaker 10 | playback (using the digital output). 11 | .TP 12 | \fBOPL_DRIVER\fR 13 | When using OPL MIDI playback, this environment variable specifies an 14 | OPL backend driver to use. Valid options are "SDL" for an SDL-based 15 | software emulated OPL chip, "Linux" for the Linux hardware OPL driver, 16 | and "OpenBSD" for the OpenBSD/NetBSD hardware OPL driver. 17 | 18 | Generally speaking, a real hardware OPL chip sounds better than software 19 | emulation; however, modern machines do not often include one. If 20 | present, it may still require extra work to set up and elevated 21 | security privileges to access. 22 | 23 | -------------------------------------------------------------------------------- /pcsound/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library(pcsound STATIC 2 | pcsound.c pcsound.h 3 | pcsound_bsd.c 4 | pcsound_sdl.c 5 | pcsound_linux.c 6 | pcsound_win32.c 7 | pcsound_internal.h) 8 | target_include_directories(pcsound 9 | INTERFACE "." 10 | PRIVATE "${CMAKE_CURRENT_BINARY_DIR}/../") 11 | if (DEFINED EMSCRIPTEN) 12 | if(ENABLE_SDL2_MIXER) 13 | set_target_properties(pcsound PROPERTIES COMPILE_FLAGS "-s USE_SDL=2 -s USE_SDL_MIXER=2") 14 | set_target_properties(pcsound PROPERTIES LINK_FLAGS "-s USE_SDL=2 -s USE_SDL_MIXER=2") 15 | else() 16 | set_target_properties(pcsound PROPERTIES COMPILE_FLAGS "-s USE_SDL=2") 17 | set_target_properties(pcsound PROPERTIES LINK_FLAGS "-s USE_SDL=2") 18 | endif() 19 | else() 20 | target_link_libraries(pcsound SDL2::SDL2) 21 | if(ENABLE_SDL2_MIXER) 22 | target_link_libraries(pcsound SDL2_mixer::SDL2_mixer) 23 | endif() 24 | endif() 25 | -------------------------------------------------------------------------------- /src/setup/mode.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 2005-2014 Simon Howard 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | 15 | #ifndef SETUP_MODE_H 16 | #define SETUP_MODE_H 17 | 18 | #include "d_mode.h" 19 | #include "d_iwad.h" 20 | 21 | typedef void (*GameSelectCallback)(void); 22 | extern GameMission_t gamemission; 23 | 24 | void SetupMission(GameSelectCallback callback); 25 | void InitBindings(void); 26 | const char *GetExecutableName(void); 27 | const char *GetGameTitle(void); 28 | const iwad_t **GetIwads(void); 29 | 30 | #endif /* #ifndef SETUP_MODE_H */ 31 | 32 | -------------------------------------------------------------------------------- /src/strife/p_setup.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License 7 | // as published by the Free Software Foundation; either version 2 8 | // of the License, or (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // DESCRIPTION: 16 | // Setup a game, startup stuff. 17 | // 18 | 19 | 20 | #ifndef __P_SETUP__ 21 | #define __P_SETUP__ 22 | 23 | 24 | 25 | 26 | // NOT called by W_Ticker. Fixme. 27 | // [STRIFE] Removed episode parameter 28 | void 29 | P_SetupLevel 30 | ( int map, 31 | int playermask, 32 | skill_t skill); 33 | 34 | // Called by startup code. 35 | void P_Init (void); 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /src/mus2mid.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // Copyright(C) 2006 Ben Ryves 2006 5 | // 6 | // This program is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU General Public License 8 | // as published by the Free Software Foundation; either version 2 9 | // of the License, or (at your option) any later version. 10 | // 11 | // This program is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | // 16 | // 17 | // mus2mid.h - Ben Ryves 2006 - http://benryves.com - benryves@benryves.com 18 | // Use to convert a MUS file into a single track, type 0 MIDI file. 19 | 20 | #ifndef MUS2MID_H 21 | #define MUS2MID_H 22 | 23 | #include "doomtype.h" 24 | #include "memio.h" 25 | 26 | boolean mus2mid(MEMFILE *musinput, MEMFILE *midioutput); 27 | 28 | #endif /* #ifndef MUS2MID_H */ 29 | 30 | -------------------------------------------------------------------------------- /src/m_fixed.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License 7 | // as published by the Free Software Foundation; either version 2 8 | // of the License, or (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // DESCRIPTION: 16 | // Fixed point arithemtics, implementation. 17 | // 18 | 19 | 20 | #ifndef __M_FIXED__ 21 | #define __M_FIXED__ 22 | 23 | 24 | 25 | 26 | // 27 | // Fixed point, 32bit as 16.16. 28 | // 29 | #define FRACBITS 16 30 | #define FRACUNIT (1< 20 | 21 | #include "doomstat.h" 22 | 23 | 24 | // Game Mode - identify IWAD as shareware, retail etc. 25 | GameMode_t gamemode = indetermined; 26 | GameMission_t gamemission = doom; 27 | GameVersion_t gameversion = exe_strife_1_31; 28 | const char *gamedescription; 29 | 30 | // Set if homebrew PWAD stuff has been added. 31 | boolean modifiedgame; 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /src/v_diskicon.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License 7 | // as published by the Free Software Foundation; either version 2 8 | // of the License, or (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // DESCRIPTION: 16 | // Disk load indicator. 17 | // 18 | 19 | #ifndef __V_DISKICON__ 20 | #define __V_DISKICON__ 21 | 22 | // Dimensions of the flashing "loading" disk icon 23 | 24 | #define LOADING_DISK_W 16 25 | #define LOADING_DISK_H 16 26 | 27 | extern void V_EnableLoadingDisk(const char *lump_name, int xoffs, int yoffs); 28 | extern void V_BeginRead(size_t nbytes); 29 | extern void V_DrawDiskIcon(void); 30 | extern void V_RestoreDiskBackground(void); 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /src/doom/doomstat.c: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License 7 | // as published by the Free Software Foundation; either version 2 8 | // of the License, or (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // DESCRIPTION: 16 | // Put all global tate variables here. 17 | // 18 | 19 | #include 20 | 21 | #include "doomstat.h" 22 | 23 | 24 | // Game Mode - identify IWAD as shareware, retail etc. 25 | GameMode_t gamemode = indetermined; 26 | GameMission_t gamemission = doom; 27 | GameVersion_t gameversion = exe_final2; 28 | GameVariant_t gamevariant = vanilla; 29 | 30 | // Set if homebrew PWAD stuff has been added. 31 | boolean modifiedgame; 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /src/setup/txt_keyinput.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 2005-2014 Simon Howard 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | 15 | #ifndef TXT_KEY_INPUT_H 16 | #define TXT_KEY_INPUT_H 17 | 18 | typedef struct txt_key_input_s txt_key_input_t; 19 | 20 | #include "txt_widget.h" 21 | 22 | // 23 | // A key input is like an input box. When selected, a box pops up 24 | // allowing a key to be selected. 25 | // 26 | 27 | struct txt_key_input_s 28 | { 29 | txt_widget_t widget; 30 | int *variable; 31 | int check_conflicts; 32 | }; 33 | 34 | txt_key_input_t *TXT_NewKeyInput(int *variable); 35 | 36 | #endif /* #ifndef TXT_KEY_INPUT_H */ 37 | 38 | 39 | -------------------------------------------------------------------------------- /src/doom/dstrings.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License 7 | // as published by the Free Software Foundation; either version 2 8 | // of the License, or (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // 16 | // DESCRIPTION: 17 | // DOOM strings, by language. 18 | // 19 | 20 | 21 | #ifndef __DSTRINGS__ 22 | #define __DSTRINGS__ 23 | 24 | 25 | // All important printed strings. 26 | 27 | #include "d_englsh.h" 28 | 29 | // Misc. other strings. 30 | #define SAVEGAMENAME "doomsav" 31 | 32 | 33 | // QuitDOOM messages 34 | // 8 per each game type 35 | #define NUM_QUITMESSAGES 8 36 | 37 | extern const char *doom1_endmsg[]; 38 | extern const char *doom2_endmsg[]; 39 | 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /src/strife/dstrings.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License 7 | // as published by the Free Software Foundation; either version 2 8 | // of the License, or (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // 16 | // DESCRIPTION: 17 | // DOOM strings, by language. 18 | // 19 | 20 | 21 | #ifndef __DSTRINGS__ 22 | #define __DSTRINGS__ 23 | 24 | 25 | // All important printed strings. 26 | 27 | #include "d_englsh.h" 28 | 29 | // Misc. other strings. 30 | #define SAVEGAMENAME "doomsav" 31 | 32 | 33 | // QuitDOOM messages 34 | // 8 per each game type 35 | #define NUM_QUITMESSAGES 8 36 | 37 | extern const char *doom1_endmsg[]; 38 | extern const char *doom2_endmsg[]; 39 | 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /opl/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library(opl STATIC 2 | opl_internal.h 3 | opl.c opl.h 4 | opl_linux.c 5 | opl_obsd.c 6 | opl_queue.c opl_queue.h 7 | opl_sdl.c 8 | opl_timer.c opl_timer.h 9 | opl_win32.c 10 | ioperm_sys.c ioperm_sys.h 11 | opl3.c opl3.h) 12 | target_include_directories(opl 13 | INTERFACE "." 14 | PRIVATE "${CMAKE_CURRENT_BINARY_DIR}/../") 15 | if (DEFINED EMSCRIPTEN) 16 | if(ENABLE_SDL2_MIXER) 17 | set_target_properties(opl PROPERTIES COMPILE_FLAGS "-s USE_SDL=2 -s USE_SDL_MIXER=2") 18 | set_target_properties(opl PROPERTIES LINK_FLAGS "-s USE_SDL=2 -s USE_SDL_MIXER=2") 19 | else() 20 | set_target_properties(opl PROPERTIES COMPILE_FLAGS "-s USE_SDL=2") 21 | set_target_properties(opl PROPERTIES LINK_FLAGS "-s USE_SDL=2") 22 | endif() 23 | else() 24 | target_link_libraries(opl SDL2::SDL2) 25 | if(ENABLE_SDL2_MIXER) 26 | target_link_libraries(opl SDL2_mixer::SDL2_mixer) 27 | endif() 28 | endif() 29 | -------------------------------------------------------------------------------- /opl/opl_timer.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 2005-2014 Simon Howard 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // DESCRIPTION: 15 | // OPL timer thread. 16 | // 17 | 18 | #ifndef OPL_TIMER_H 19 | #define OPL_TIMER_H 20 | 21 | #include "opl.h" 22 | 23 | int OPL_Timer_StartThread(void); 24 | void OPL_Timer_StopThread(void); 25 | void OPL_Timer_SetCallback(uint64_t us, opl_callback_t callback, void *data); 26 | void OPL_Timer_ClearCallbacks(void); 27 | void OPL_Timer_Lock(void); 28 | void OPL_Timer_Unlock(void); 29 | void OPL_Timer_SetPaused(int paused); 30 | void OPL_Timer_AdjustCallbacks(float factor); 31 | 32 | #endif /* #ifndef OPL_TIMER_H */ 33 | 34 | -------------------------------------------------------------------------------- /src/doom/m_random.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License 7 | // as published by the Free Software Foundation; either version 2 8 | // of the License, or (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // DESCRIPTION: 16 | // 17 | // 18 | 19 | 20 | #ifndef __M_RANDOM__ 21 | #define __M_RANDOM__ 22 | 23 | 24 | #include "doomtype.h" 25 | 26 | 27 | // Returns a number from 0 to 255, 28 | // from a lookup table. 29 | int M_Random (void); 30 | 31 | // As M_Random, but used only by the play simulation. 32 | int P_Random (void); 33 | 34 | // Fix randoms for demos. 35 | void M_ClearRandom (void); 36 | 37 | // Defined version of P_Random() - P_Random() 38 | int P_SubRandom (void); 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /src/hexen/ct_chat.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 1993-2008 Raven Software 4 | // Copyright(C) 2005-2014 Simon Howard 5 | // 6 | // This program is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU General Public License 8 | // as published by the Free Software Foundation; either version 2 9 | // of the License, or (at your option) any later version. 10 | // 11 | // This program is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | // 16 | // 17 | // Chat mode stuff 18 | // 19 | 20 | #ifndef HEXEN_CT_CHAT_H 21 | #define HEXEN_CT_CHAT_H 22 | 23 | #define CT_PLR_GREEN 1 24 | #define CT_PLR_YELLOW 2 25 | #define CT_PLR_RED 3 26 | #define CT_PLR_BLUE 4 27 | #define CT_PLR_ALL 5 28 | 29 | #define CT_KEY_GREEN 'g' 30 | #define CT_KEY_YELLOW 'y' 31 | #define CT_KEY_RED 'r' 32 | #define CT_KEY_BLUE 'b' 33 | #define CT_KEY_ALL 't' 34 | 35 | extern char *chat_macros[10]; 36 | 37 | #endif 38 | 39 | -------------------------------------------------------------------------------- /src/setup/txt_mouseinput.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 2005-2014 Simon Howard 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | 15 | #ifndef TXT_MOUSE_INPUT_H 16 | #define TXT_MOUSE_INPUT_H 17 | 18 | typedef struct txt_mouse_input_s txt_mouse_input_t; 19 | 20 | #include "txt_widget.h" 21 | 22 | // 23 | // A mouse input is like an input box. When selected, a box pops up 24 | // allowing a mouse to be selected. 25 | // 26 | 27 | struct txt_mouse_input_s 28 | { 29 | txt_widget_t widget; 30 | int *variable; 31 | int check_conflicts; 32 | }; 33 | 34 | txt_mouse_input_t *TXT_NewMouseInput(int *variable); 35 | 36 | #endif /* #ifndef TXT_MOUSE_INPUT_H */ 37 | 38 | 39 | -------------------------------------------------------------------------------- /src/doom/d_items.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License 7 | // as published by the Free Software Foundation; either version 2 8 | // of the License, or (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // DESCRIPTION: 16 | // Items: key cards, artifacts, weapon, ammunition. 17 | // 18 | 19 | 20 | #ifndef __D_ITEMS__ 21 | #define __D_ITEMS__ 22 | 23 | #include "doomdef.h" 24 | 25 | 26 | 27 | // Weapon info: sprite frames, ammunition use. 28 | typedef struct 29 | { 30 | ammotype_t ammo; 31 | int upstate; 32 | int downstate; 33 | int readystate; 34 | int atkstate; 35 | int flashstate; 36 | 37 | } weaponinfo_t; 38 | 39 | extern weaponinfo_t weaponinfo[NUMWEAPONS]; 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /src/m_bbox.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License 7 | // as published by the Free Software Foundation; either version 2 8 | // of the License, or (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // DESCRIPTION: 16 | // Nil. 17 | // 18 | 19 | 20 | #ifndef __M_BBOX__ 21 | #define __M_BBOX__ 22 | 23 | #include 24 | 25 | #include "m_fixed.h" 26 | 27 | 28 | // Bounding box coordinate storage. 29 | enum 30 | { 31 | BOXTOP, 32 | BOXBOTTOM, 33 | BOXLEFT, 34 | BOXRIGHT 35 | }; // bbox coordinates 36 | 37 | // Bounding box functions. 38 | void M_ClearBox (fixed_t* box); 39 | 40 | void 41 | M_AddToBox 42 | ( fixed_t* box, 43 | fixed_t x, 44 | fixed_t y ); 45 | 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /src/heretic/ct_chat.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 1993-2008 Raven Software 4 | // Copyright(C) 2005-2014 Simon Howard 5 | // 6 | // This program is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU General Public License 8 | // as published by the Free Software Foundation; either version 2 9 | // of the License, or (at your option) any later version. 10 | // 11 | // This program is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | // 16 | // 17 | // Chat mode stuff 18 | // 19 | 20 | #ifndef HERETIC_CT_CHAT_H 21 | #define HERETIC_CT_CHAT_H 22 | 23 | #define CT_PLR_GREEN 1 24 | #define CT_PLR_YELLOW 2 25 | #define CT_PLR_RED 3 26 | #define CT_PLR_BLUE 4 27 | #define CT_PLR_ALL 5 28 | 29 | #define CT_KEY_GREEN 'g' 30 | #define CT_KEY_YELLOW 'y' 31 | #define CT_KEY_RED 'r' 32 | #define CT_KEY_BLUE 'b' 33 | #define CT_KEY_ALL 't' 34 | 35 | extern char *chat_macros[10]; 36 | 37 | #endif /* #ifndef HERETIC_CT_CHAT_H */ 38 | 39 | -------------------------------------------------------------------------------- /src/i_timer.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License 7 | // as published by the Free Software Foundation; either version 2 8 | // of the License, or (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // DESCRIPTION: 16 | // System-specific timer interface 17 | // 18 | 19 | 20 | #ifndef __I_TIMER__ 21 | #define __I_TIMER__ 22 | 23 | #define TICRATE 35 24 | 25 | // Called by D_DoomLoop, 26 | // returns current time in tics. 27 | int I_GetTime (void); 28 | 29 | // returns current time in ms 30 | int I_GetTimeMS (void); 31 | 32 | // Pause for a specified number of ms 33 | void I_Sleep(int ms); 34 | 35 | // Initialize timer 36 | void I_InitTimer(void); 37 | 38 | // Wait for vertical retrace or pause a bit. 39 | void I_WaitVBL(int count); 40 | 41 | #endif 42 | 43 | -------------------------------------------------------------------------------- /src/strife/f_finale.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License 7 | // as published by the Free Software Foundation; either version 2 8 | // of the License, or (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // DESCRIPTION: 16 | // 17 | // 18 | 19 | 20 | #ifndef __F_FINALE__ 21 | #define __F_FINALE__ 22 | 23 | 24 | #include "doomtype.h" 25 | #include "d_event.h" 26 | // 27 | // FINALE 28 | // 29 | 30 | // Called by main loop. 31 | boolean F_Responder (event_t* ev); 32 | 33 | // Called by main loop. 34 | void F_Ticker (void); 35 | 36 | // haleyjd: [STRIFE] Called from G_Ticker as well... 37 | void F_WaitTicker(void); 38 | 39 | // Called by main loop. 40 | void F_Drawer (void); 41 | 42 | 43 | void F_StartFinale (void); 44 | 45 | 46 | 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /src/hexen/m_random.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 1993-2008 Raven Software 4 | // Copyright(C) 2005-2014 Simon Howard 5 | // 6 | // This program is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU General Public License 8 | // as published by the Free Software Foundation; either version 2 9 | // of the License, or (at your option) any later version. 10 | // 11 | // This program is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | // 16 | 17 | #ifndef HEXEN_M_RANDOM_H 18 | #define HEXEN_M_RANDOM_H 19 | 20 | // Most damage defined using HITDICE 21 | #define HITDICE(a) ((1+(P_Random()&7))*a) 22 | 23 | int M_Random(void); 24 | // returns a number from 0 to 255 25 | int P_Random(void); 26 | // as M_Random, but used only by the play simulation 27 | 28 | void M_ClearRandom(void); 29 | // fix randoms for demos 30 | 31 | extern int rndindex; 32 | 33 | // Defined version of P_Random() - P_Random() 34 | int P_SubRandom (void); 35 | 36 | #endif // HEXEN_M_RANDOM_H 37 | 38 | -------------------------------------------------------------------------------- /src/strife/d_items.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License 7 | // as published by the Free Software Foundation; either version 2 8 | // of the License, or (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // DESCRIPTION: 16 | // Items: key cards, artifacts, weapon, ammunition. 17 | // 18 | 19 | 20 | #ifndef __D_ITEMS__ 21 | #define __D_ITEMS__ 22 | 23 | #include "doomdef.h" 24 | 25 | 26 | 27 | // Weapon info: sprite frames, ammunition use. 28 | typedef struct 29 | { 30 | ammotype_t ammo; 31 | int upstate; 32 | int downstate; 33 | int readystate; 34 | int atkstate; 35 | int flashstate; 36 | boolean availabledemo; // villsa [STRIFE] 37 | 38 | } weaponinfo_t; 39 | 40 | extern weaponinfo_t weaponinfo[NUMWEAPONS]; 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /src/heretic/m_random.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 1993-2008 Raven Software 4 | // Copyright(C) 2005-2014 Simon Howard 5 | // 6 | // This program is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU General Public License 8 | // as published by the Free Software Foundation; either version 2 9 | // of the License, or (at your option) any later version. 10 | // 11 | // This program is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | // 16 | 17 | #ifndef HERETIC_M_RANDOM_H 18 | #define HERETIC_M_RANDOM_H 19 | 20 | // Most damage defined using HITDICE 21 | #define HITDICE(a) ((1+(P_Random()&7))*a) 22 | 23 | int M_Random(void); 24 | // returns a number from 0 to 255 25 | int P_Random(void); 26 | // as M_Random, but used only by the play simulation 27 | 28 | void M_ClearRandom(void); 29 | // fix randoms for demos 30 | 31 | extern int rndindex; 32 | 33 | // Defined version of P_Random() - P_Random() 34 | int P_SubRandom (void); 35 | 36 | #endif // HERETIC_M_RANDOM_H 37 | 38 | -------------------------------------------------------------------------------- /data/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | EXTRA_DIST= \ 3 | README \ 4 | doom.ico \ 5 | doom.png \ 6 | heretic.ico \ 7 | heretic.png \ 8 | hexen.ico \ 9 | hexen.png \ 10 | setup.ico \ 11 | setup.png \ 12 | strife.ico \ 13 | strife.png \ 14 | wadfile.png \ 15 | convert-icon 16 | 17 | iconsdir = $(prefix)/share/icons/hicolor/128x128/apps 18 | if ENABLE_ALL_GAMES 19 | icons_DATA = @PROGRAM_PREFIX@doom.png \ 20 | @PROGRAM_PREFIX@heretic.png \ 21 | @PROGRAM_PREFIX@hexen.png \ 22 | @PROGRAM_PREFIX@setup.png \ 23 | @PROGRAM_PREFIX@strife.png 24 | endif 25 | 26 | @PROGRAM_PREFIX@doom.png : doom.png 27 | cp $(top_srcdir)/data/doom.png $@ 28 | 29 | @PROGRAM_PREFIX@heretic.png : heretic.png 30 | cp $(top_srcdir)/data/heretic.png $@ 31 | 32 | @PROGRAM_PREFIX@hexen.png : hexen.png 33 | cp $(top_srcdir)/data/hexen.png $@ 34 | 35 | @PROGRAM_PREFIX@setup.png : setup.png 36 | cp $(top_srcdir)/data/setup.png $@ 37 | 38 | @PROGRAM_PREFIX@strife.png : strife.png 39 | cp $(top_srcdir)/data/strife.png $@ 40 | 41 | CLEANFILES = $(icons_DATA) 42 | -------------------------------------------------------------------------------- /src/strife/p_inter.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License 7 | // as published by the Free Software Foundation; either version 2 8 | // of the License, or (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // DESCRIPTION: 16 | // 17 | // 18 | 19 | 20 | #ifndef __P_INTER__ 21 | #define __P_INTER__ 22 | 23 | // haleyjd [STRIFE]: Multiple externals added 24 | boolean P_GiveCard(player_t* player, card_t card); 25 | boolean P_GiveBody(player_t* player, int num); 26 | boolean P_GiveArmor(player_t* player, int armortype); 27 | boolean P_GivePower(player_t* player, powertype_t power); 28 | boolean P_GiveAmmo(player_t* player, ammotype_t ammo, int num); 29 | boolean P_GiveWeapon(player_t* player, weapontype_t weapon, boolean dropped); 30 | void P_KillMobj(mobj_t* source, mobj_t* target); 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /src/setup/txt_joybinput.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 2005-2014 Simon Howard 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | 15 | #ifndef TXT_JOYB_INPUT_H 16 | #define TXT_JOYB_INPUT_H 17 | 18 | typedef struct txt_joystick_input_s txt_joystick_input_t; 19 | 20 | #include "txt_widget.h" 21 | #include "txt_window.h" 22 | 23 | // 24 | // A joystick input is like an input box. When selected, a box pops up 25 | // allowing a joystick button to be pressed to select it. 26 | // 27 | 28 | struct txt_joystick_input_s 29 | { 30 | txt_widget_t widget; 31 | int *variable; 32 | txt_window_t *prompt_window; 33 | int check_conflicts; 34 | }; 35 | 36 | txt_joystick_input_t *TXT_NewJoystickInput(int *variable); 37 | 38 | #endif /* #ifndef TXT_JOYB_INPUT_H */ 39 | 40 | 41 | -------------------------------------------------------------------------------- /textscreen/txt_io.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 2005-2014 Simon Howard 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // 15 | // Text mode emulation in SDL 16 | // 17 | 18 | #ifndef TXT_IO_H 19 | #define TXT_IO_H 20 | 21 | #include "txt_main.h" 22 | 23 | typedef struct 24 | { 25 | int bgcolor; 26 | int fgcolor; 27 | } txt_saved_colors_t; 28 | 29 | void TXT_PutSymbol(int c); 30 | void TXT_PutChar(int c); 31 | void TXT_Puts(const char *s); 32 | void TXT_GotoXY(int x, int y); 33 | void TXT_GetXY(int *x, int *y); 34 | void TXT_FGColor(txt_color_t color); 35 | void TXT_BGColor(int color, int blinking); 36 | void TXT_SaveColors(txt_saved_colors_t *save); 37 | void TXT_RestoreColors(txt_saved_colors_t *save); 38 | void TXT_ClearScreen(void); 39 | 40 | #endif /* #ifndef TXT_IO_H */ 41 | 42 | -------------------------------------------------------------------------------- /src/deh_io.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 2005-2014 Simon Howard 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // 15 | // Dehacked I/O code (does all reads from dehacked files) 16 | // 17 | 18 | #ifndef DEH_IO_H 19 | #define DEH_IO_H 20 | 21 | #include "deh_defs.h" 22 | 23 | deh_context_t *DEH_OpenFile(const char *filename); 24 | deh_context_t *DEH_OpenLump(int lumpnum); 25 | void DEH_CloseFile(deh_context_t *context); 26 | int DEH_GetChar(deh_context_t *context); 27 | char *DEH_ReadLine(deh_context_t *context, boolean extended); 28 | void DEH_Error(deh_context_t *context, const char *msg, ...) PRINTF_ATTR(2, 3); 29 | void DEH_Warning(deh_context_t *context, const char *msg, ...) PRINTF_ATTR(2, 3); 30 | boolean DEH_HadError(deh_context_t *context); 31 | 32 | #endif /* #ifndef DEH_IO_H */ 33 | 34 | -------------------------------------------------------------------------------- /setup/setup-manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 10 | 11 | 12 | 14 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /src/net_server.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 2005-2014 Simon Howard 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // Network server code 15 | // 16 | 17 | #ifndef NET_SERVER_H 18 | #define NET_SERVER_H 19 | 20 | // initialize server and wait for connections 21 | 22 | void NET_SV_Init(void); 23 | 24 | // run server: check for new packets received etc. 25 | 26 | void NET_SV_Run(void); 27 | 28 | // Shut down the server 29 | // Blocks until all clients disconnect, or until a 5 second timeout 30 | 31 | void NET_SV_Shutdown(void); 32 | 33 | // Add a network module to the context used by the server 34 | 35 | void NET_SV_AddModule(net_module_t *module); 36 | 37 | // Register server with master server. 38 | 39 | void NET_SV_RegisterWithMaster(void); 40 | 41 | #endif /* #ifndef NET_SERVER_H */ 42 | 43 | -------------------------------------------------------------------------------- /src/i_videohr.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 2005-2014 Simon Howard 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // DESCRIPTION: 15 | // SDL emulation of VGA 640x480x4 planar video mode, 16 | // for Hexen startup loading screen. 17 | // 18 | 19 | #ifndef I_VIDEOHR_H 20 | #define I_VIDEOHR_H 21 | 22 | boolean I_SetVideoModeHR(void); 23 | void I_UnsetVideoModeHR(void); 24 | void I_SetWindowTitleHR(const char *title); 25 | void I_ClearScreenHR(void); 26 | void I_SlamBlockHR(int x, int y, int w, int h, const byte *src); 27 | void I_SlamHR(const byte *buffer); 28 | void I_InitPaletteHR(void); 29 | void I_SetPaletteHR(const byte *palette); 30 | void I_FadeToPaletteHR(const byte *palette); 31 | void I_BlackPaletteHR(void); 32 | boolean I_CheckAbortHR(void); 33 | 34 | #endif /* #ifndef I_VIDEOHR_H */ 35 | 36 | -------------------------------------------------------------------------------- /pcsound/pcsound.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 2005-2014 Simon Howard 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // DESCRIPTION: 15 | // PC speaker interface. 16 | // 17 | 18 | #ifndef PCSOUND_H 19 | #define PCSOUND_H 20 | 21 | typedef void (*pcsound_callback_func)(int *duration, int *frequency); 22 | 23 | // Initialise the PC speaker subsystem. The given function is called 24 | // periodically to request more sound data to play. 25 | 26 | int PCSound_Init(pcsound_callback_func callback_func); 27 | 28 | // Shut down the PC speaker subsystem. 29 | 30 | void PCSound_Shutdown(void); 31 | 32 | // Set the preferred output sample rate when emulating a PC speaker. 33 | // This must be called before PCSound_Init. 34 | 35 | void PCSound_SetSampleRate(int rate); 36 | 37 | #endif /* #ifndef PCSOUND_H */ 38 | 39 | -------------------------------------------------------------------------------- /src/doom/d_main.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License 7 | // as published by the Free Software Foundation; either version 2 8 | // of the License, or (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // DESCRIPTION: 16 | // System specific interface stuff. 17 | // 18 | 19 | 20 | #ifndef __D_MAIN__ 21 | #define __D_MAIN__ 22 | 23 | #include "doomdef.h" 24 | 25 | 26 | 27 | 28 | // Read events from all input devices 29 | 30 | void D_ProcessEvents (void); 31 | 32 | 33 | // 34 | // BASE LEVEL 35 | // 36 | void D_PageTicker (void); 37 | void D_PageDrawer (void); 38 | void D_AdvanceDemo (void); 39 | void D_DoAdvanceDemo (void); 40 | void D_StartTitle (void); 41 | 42 | // 43 | // GLOBAL VARIABLES 44 | // 45 | 46 | extern gameaction_t gameaction; 47 | extern boolean advancedemo; 48 | 49 | extern const char *pagename; 50 | 51 | 52 | #endif 53 | 54 | -------------------------------------------------------------------------------- /src/doom/pr_process.h: -------------------------------------------------------------------------------- 1 | // pr_process.h 2 | // Copyright (C) 1999 by Dennis Chao 3 | // Copyright (C) 2000 by David Koppenhofer 4 | 5 | // Passed as second argument to P_SpawnMapThing() to tell it 6 | // if we're spawning a pid mobj or not. 7 | #define IS_NOT_PID_MOBJ 0 8 | #define IS_PID_MOBJ 1 9 | 10 | // All flags below are generally set up in d_main.c, D_DoomMain(). 11 | 12 | // Need to have a flag to tell if we loaded the special process 13 | // management level. 14 | extern boolean ps_level_loaded; 15 | 16 | // Flag to prevent the 'ps' portion of the program from running. 17 | extern boolean nopsmon; 18 | 19 | // Flag to prevent the execution of process re-nicing and killing. 20 | extern boolean nopsact; 21 | 22 | // Flag to allow pid monsters to be damaged by things other than a player. 23 | extern boolean nopssafety; 24 | 25 | // Flag to show all users' processes. 26 | extern boolean psallusers; 27 | 28 | // Enumeration of types of user lists to have. 29 | // Passed to and used in add_to_ps_userlist(). 30 | typedef enum 31 | { 32 | psuser, 33 | psnotuser 34 | } ps_userlist_type_t; 35 | 36 | // Functions 37 | void pr_check(void); 38 | void cleanup_pid_list(mobj_t *del_mobj); 39 | void pr_kill(int pid); 40 | void pr_renice(int pid); 41 | void add_to_ps_userlist(ps_userlist_type_t listtype, char *username); 42 | -------------------------------------------------------------------------------- /src/strife/deh_strife.c: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 2005-2014 Simon Howard 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // 15 | // Top-level dehacked definitions for Strife dehacked (sehacked) 16 | // 17 | 18 | #include 19 | #include "deh_defs.h" 20 | #include "deh_main.h" 21 | 22 | const char *deh_signatures[] = 23 | { 24 | "Patch File for SeHackEd v0.4", 25 | "Patch File for SeHackEd v0.3", 26 | NULL 27 | }; 28 | 29 | 30 | // 31 | // List of section types: 32 | // 33 | 34 | deh_section_t *deh_section_types[] = 35 | { 36 | &deh_section_ammo, 37 | &deh_section_cheat, 38 | &deh_section_frame, 39 | &deh_section_misc, 40 | &deh_section_pointer, 41 | &deh_section_sound, 42 | &deh_section_text, 43 | &deh_section_thing, 44 | &deh_section_weapon, 45 | NULL 46 | }; 47 | 48 | -------------------------------------------------------------------------------- /src/doom/deh_doom.c: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 2005-2014 Simon Howard 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // 15 | // Top-level dehacked definitions for Doom dehacked. 16 | // 17 | 18 | #include 19 | #include "deh_defs.h" 20 | #include "deh_main.h" 21 | 22 | const char *deh_signatures[] = 23 | { 24 | "Patch File for DeHackEd v2.3", 25 | "Patch File for DeHackEd v3.0", 26 | NULL 27 | }; 28 | 29 | 30 | // 31 | // List of section types: 32 | // 33 | 34 | deh_section_t *deh_section_types[] = 35 | { 36 | &deh_section_ammo, 37 | &deh_section_cheat, 38 | &deh_section_frame, 39 | &deh_section_misc, 40 | &deh_section_pointer, 41 | &deh_section_sound, 42 | &deh_section_text, 43 | &deh_section_thing, 44 | &deh_section_weapon, 45 | &deh_section_bexstr, 46 | NULL 47 | }; 48 | 49 | -------------------------------------------------------------------------------- /src/doom/r_local.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License 7 | // as published by the Free Software Foundation; either version 2 8 | // of the License, or (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // DESCRIPTION: 16 | // Refresh (R_*) module, global header. 17 | // All the rendering/drawing stuff is here. 18 | // 19 | 20 | #ifndef __R_LOCAL__ 21 | #define __R_LOCAL__ 22 | 23 | // Binary Angles, sine/cosine/atan lookups. 24 | #include "tables.h" 25 | 26 | // Screen size related parameters. 27 | #include "doomdef.h" 28 | 29 | // Include the refresh/render data structs. 30 | #include "r_data.h" 31 | 32 | 33 | 34 | // 35 | // Separate header file for each module. 36 | // 37 | #include "r_main.h" 38 | #include "r_bsp.h" 39 | #include "r_segs.h" 40 | #include "r_plane.h" 41 | #include "r_data.h" 42 | #include "r_things.h" 43 | #include "r_draw.h" 44 | 45 | #endif // __R_LOCAL__ 46 | -------------------------------------------------------------------------------- /src/setup/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library(setup STATIC 2 | compatibility.c compatibility.h 3 | display.c display.h 4 | joystick.c joystick.h 5 | keyboard.c keyboard.h 6 | mainmenu.c 7 | mode.c mode.h 8 | mouse.c mouse.h 9 | multiplayer.c multiplayer.h 10 | sound.c sound.h 11 | execute.c execute.h 12 | txt_joyaxis.c txt_joyaxis.h 13 | txt_joybinput.c txt_joybinput.h 14 | txt_keyinput.c txt_keyinput.h 15 | txt_mouseinput.c txt_mouseinput.h) 16 | 17 | target_include_directories(setup PRIVATE "../" "${CMAKE_CURRENT_BINARY_DIR}/../../") 18 | 19 | if (DEFINED EMSCRIPTEN) 20 | set(SDL_FLAGS "-s USE_SDL=2") 21 | if(ENABLE_SDL2_MIXER) 22 | set(SDL_FLAGS "${SDL_FLAGS} -s USE_SDL_MIXER=2") 23 | endif() 24 | else() 25 | set(SDL_LINK_LIBS, "SDL2::SDL2") 26 | if(ENABLE_SDL2_MIXER) 27 | list(APPEND SDL_LINK_LIBS SDL2_mixer::SDL2_mixer) 28 | endif() 29 | endif() 30 | target_link_libraries(setup textscreen ${SDL_LINK_LIBS}) 31 | set_target_properties(setup PROPERTIES COMPILE_FLAGS "${SDL_FLAGS}") 32 | set_target_properties(setup PROPERTIES LINK_FLAGS "${SDL_FLAGS}") 33 | -------------------------------------------------------------------------------- /src/sha1.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 2005-2014 Simon Howard 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // DESCRIPTION: 15 | // SHA-1 digest. 16 | // 17 | 18 | #ifndef __SHA1_H__ 19 | #define __SHA1_H__ 20 | 21 | #include "doomtype.h" 22 | 23 | typedef struct sha1_context_s sha1_context_t; 24 | typedef byte sha1_digest_t[20]; 25 | 26 | struct sha1_context_s { 27 | uint32_t h0,h1,h2,h3,h4; 28 | uint32_t nblocks; 29 | byte buf[64]; 30 | int count; 31 | }; 32 | 33 | void SHA1_Init(sha1_context_t *context); 34 | void SHA1_Update(sha1_context_t *context, byte *buf, size_t len); 35 | void SHA1_Final(sha1_digest_t digest, sha1_context_t *context); 36 | void SHA1_UpdateInt32(sha1_context_t *context, unsigned int val); 37 | void SHA1_UpdateString(sha1_context_t *context, char *str); 38 | 39 | #endif /* #ifndef __SHA1_H__ */ 40 | 41 | -------------------------------------------------------------------------------- /src/strife/r_local.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License 7 | // as published by the Free Software Foundation; either version 2 8 | // of the License, or (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // DESCRIPTION: 16 | // Refresh (R_*) module, global header. 17 | // All the rendering/drawing stuff is here. 18 | // 19 | 20 | #ifndef __R_LOCAL__ 21 | #define __R_LOCAL__ 22 | 23 | // Binary Angles, sine/cosine/atan lookups. 24 | #include "tables.h" 25 | 26 | // Screen size related parameters. 27 | #include "doomdef.h" 28 | 29 | // Include the refresh/render data structs. 30 | #include "r_data.h" 31 | 32 | 33 | 34 | // 35 | // Separate header file for each module. 36 | // 37 | #include "r_main.h" 38 | #include "r_bsp.h" 39 | #include "r_segs.h" 40 | #include "r_plane.h" 41 | #include "r_data.h" 42 | #include "r_things.h" 43 | #include "r_draw.h" 44 | 45 | #endif // __R_LOCAL__ 46 | -------------------------------------------------------------------------------- /man/bash-completion/hexen.template.in: -------------------------------------------------------------------------------- 1 | # bash completion for @PACKAGE_SHORTNAME@ Hexen -*- shell-script -*- 2 | 3 | _@PROGRAM_SPREFIX@_hexen() 4 | { 5 | local cur prev words cword 6 | _init_completion || return 7 | 8 | # Save the previous switch on the command line in the prevsw variable 9 | local i prevsw="" 10 | for (( i=1; $cword > 1 && i <= $cword; i++ )); do 11 | if [[ ${words[i]} == -* ]]; then 12 | prevsw=${words[i]} 13 | fi 14 | done 15 | 16 | # Allow adding more than one file with the same extension to the same switch 17 | case $prevsw in 18 | -config|-extraconfig) 19 | _filedir cfg 20 | ;; 21 | -file|-iwad|-aa|-af|-as|-merge|-nwtmerge) 22 | _filedir wad 23 | ;; 24 | -playdemo|-timedemo) 25 | _filedir lmp 26 | ;; 27 | esac 28 | 29 | case $prev in 30 | -gameversion) 31 | COMPREPLY=(1.1 1.1r2) 32 | ;; 33 | -setmem) 34 | COMPREPLY=(dos622 dos71 dosbox) 35 | ;; 36 | esac 37 | 38 | if [[ $cur == -* ]]; then 39 | COMPREPLY=( $( compgen -W '@content' -- "$cur" ) ) 40 | fi 41 | } && 42 | 43 | complete -F _@PROGRAM_SPREFIX@_hexen @PROGRAM_PREFIX@hexen 44 | 45 | # ex: ts=4 sw=4 et filetype=sh 46 | -------------------------------------------------------------------------------- /src/m_bbox.c: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License 7 | // as published by the Free Software Foundation; either version 2 8 | // of the License, or (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // DESCRIPTION: 16 | // Main loop menu stuff. 17 | // Random number LUT. 18 | // Default Config File. 19 | // PCX Screenshots. 20 | // 21 | 22 | 23 | 24 | #include "m_bbox.h" 25 | 26 | 27 | 28 | 29 | void M_ClearBox (fixed_t *box) 30 | { 31 | box[BOXTOP] = box[BOXRIGHT] = INT_MIN; 32 | box[BOXBOTTOM] = box[BOXLEFT] = INT_MAX; 33 | } 34 | 35 | void 36 | M_AddToBox 37 | ( fixed_t* box, 38 | fixed_t x, 39 | fixed_t y ) 40 | { 41 | if (xbox[BOXRIGHT]) 44 | box[BOXRIGHT] = x; 45 | if (ybox[BOXTOP]) 48 | box[BOXTOP] = y; 49 | } 50 | 51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /pkg/osx/AppController.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 2005-2014 Simon Howard 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | 15 | #ifndef LAUNCHER_APPCONTROLLER_H 16 | #define LAUNCHER_APPCONTROLLER_H 17 | 18 | #include 19 | 20 | #include "LauncherManager.h" 21 | 22 | @interface AppController : NSObject 23 | { 24 | LauncherManager *launcherManager; 25 | BOOL filesAdded; 26 | } 27 | 28 | + (void)initialize; 29 | 30 | - (id)init; 31 | - (void)dealloc; 32 | 33 | - (void)awakeFromNib; 34 | 35 | - (void)applicationDidFinishLaunching:(NSNotification *)aNotif; 36 | - (BOOL)applicationShouldTerminate:(id)sender; 37 | - (void)applicationWillTerminate:(NSNotification *)aNotif; 38 | - (BOOL)application:(NSApplication *)application openFile:(NSString *)fileName; 39 | 40 | - (void)showPrefPanel:(id)sender; 41 | 42 | @end 43 | 44 | #endif 45 | 46 | -------------------------------------------------------------------------------- /src/memio.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License 7 | // as published by the Free Software Foundation; either version 2 8 | // of the License, or (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | 16 | #ifndef MEMIO_H 17 | #define MEMIO_H 18 | 19 | typedef struct _MEMFILE MEMFILE; 20 | 21 | typedef enum 22 | { 23 | MEM_SEEK_SET, 24 | MEM_SEEK_CUR, 25 | MEM_SEEK_END, 26 | } mem_rel_t; 27 | 28 | MEMFILE *mem_fopen_read(void *buf, size_t buflen); 29 | size_t mem_fread(void *buf, size_t size, size_t nmemb, MEMFILE *stream); 30 | MEMFILE *mem_fopen_write(void); 31 | size_t mem_fwrite(const void *ptr, size_t size, size_t nmemb, MEMFILE *stream); 32 | void mem_get_buf(MEMFILE *stream, void **buf, size_t *buflen); 33 | void mem_fclose(MEMFILE *stream); 34 | long mem_ftell(MEMFILE *stream); 35 | int mem_fseek(MEMFILE *stream, signed long offset, mem_rel_t whence); 36 | 37 | #endif /* #ifndef MEMIO_H */ 38 | 39 | -------------------------------------------------------------------------------- /man/extra.cfg.template: -------------------------------------------------------------------------------- 1 | .TH @PROGRAM_SPREFIX@\-@GAME@.cfg 5 2 | .SH NAME 3 | @PROGRAM_SPREFIX@\-@GAME@.cfg \- @PACKAGE_SHORTNAME@ @GAME_UPPER@ configuration file 4 | .SH DESCRIPTION 5 | .PP 6 | \fI@PROGRAM_SPREFIX@\-@GAME@.cfg\fR 7 | is a configuration file for \fB@PROGRAM_SPREFIX@\-@GAME@\fR(6). This file acts 8 | as an auxiliary configuration file; the main configuration options 9 | are stored in \fB@CFGFILE@\fR, which contains the same configuration 10 | options as Vanilla @GAME_UPPER@ (for compatibility). \fI@PROGRAM_SPREFIX@\-@GAME@.cfg\fR 11 | contains configuration options that are specific to @PACKAGE_SHORTNAME@\-@GAME_UPPER@ 12 | only. 13 | .PP 14 | \fI@PROGRAM_SPREFIX@\-@GAME@.cfg\fR is normally stored in the user's home directory, 15 | as \fI~/.local/share/@PROGRAM_SPREFIX@\-@GAME@/@PROGRAM_SPREFIX@\-@GAME@.cfg\fR. The path can be 16 | overridden using the \fBXDG_DATA_HOME\fR environment variable (see the XDG 17 | Base Directory Specification). 18 | .PP 19 | The \fB@PROGRAM_SPREFIX@\-@GAME@\-setup\fR(6) tool provides a simple to use front-end 20 | for editing \fI@PROGRAM_SPREFIX@\-@GAME@.cfg\fR. 21 | .SH FILE FORMAT 22 | .PP 23 | The file format is the same as that used for \fB@CFGFILE@\fR(5). 24 | .br 25 | 26 | @content 27 | 28 | .SH SEE ALSO 29 | \fB@PROGRAM_SPREFIX@\-@GAME@\fR(6), 30 | \fB@CFGFILE@\fR(5), 31 | \fB@PROGRAM_SPREFIX@\-@GAME@\-setup\fR(6) 32 | 33 | -------------------------------------------------------------------------------- /src/doom/wi_stuff.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License 7 | // as published by the Free Software Foundation; either version 2 8 | // of the License, or (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // DESCRIPTION: 16 | // Intermission. 17 | // 18 | 19 | #ifndef __WI_STUFF__ 20 | #define __WI_STUFF__ 21 | 22 | //#include "v_video.h" 23 | 24 | #include "doomdef.h" 25 | 26 | // States for the intermission 27 | 28 | typedef enum 29 | { 30 | NoState = -1, 31 | StatCount, 32 | ShowNextLoc, 33 | } stateenum_t; 34 | 35 | // Called by main loop, animate the intermission. 36 | void WI_Ticker (void); 37 | 38 | // Called by main loop, 39 | // draws the intermission directly into the screen buffer. 40 | void WI_Drawer (void); 41 | 42 | // Setup for an intermission screen. 43 | void WI_Start(wbstartstruct_t* wbstartstruct); 44 | 45 | // Shut down the intermission screen 46 | void WI_End(void); 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /src/heretic/s_sound.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 1993-2008 Raven Software 4 | // Copyright(C) 2005-2014 Simon Howard 5 | // 6 | // This program is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU General Public License 8 | // as published by the Free Software Foundation; either version 2 9 | // of the License, or (at your option) any later version. 10 | // 11 | // This program is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | // 16 | 17 | // soundst.h 18 | 19 | #ifndef __SOUNDSTH__ 20 | #define __SOUNDSTH__ 21 | 22 | extern int snd_MaxVolume; 23 | extern int snd_MusicVolume; 24 | extern int snd_Channels; 25 | 26 | 27 | void S_Start(void); 28 | void S_StartSound(void *origin, int sound_id); 29 | void S_StartSoundAtVolume(void *origin, int sound_id, int volume); 30 | void S_StopSound(void *origin); 31 | void S_PauseSound(void); 32 | void S_ResumeSound(void); 33 | void S_UpdateSounds(mobj_t * listener); 34 | void S_StartSong(int song, boolean loop); 35 | void S_Init(void); 36 | void S_GetChannelInfo(SoundInfo_t * s); 37 | void S_SetMaxVolume(boolean fullprocess); 38 | void S_SetMusicVolume(void); 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /src/d_dedicated.c: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 2005-2014 Simon Howard 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // Code specific to the standalone dedicated server. 15 | // 16 | 17 | #include 18 | #include 19 | #include 20 | 21 | #include "config.h" 22 | 23 | #include "m_argv.h" 24 | #include "net_defs.h" 25 | 26 | #include "net_dedicated.h" 27 | #include "net_server.h" 28 | #include "z_zone.h" 29 | 30 | void NET_CL_Run(void) 31 | { 32 | // No client present :-) 33 | // 34 | // This is here because the server code sometimes runs this 35 | // to let the client do some processing if it needs to. 36 | // In a standalone dedicated server, we don't have a client. 37 | } 38 | 39 | void D_DoomMain(void) 40 | { 41 | printf(PACKAGE_NAME " standalone dedicated server\n"); 42 | 43 | Z_Init(); 44 | 45 | NET_DedicatedServer(); 46 | } 47 | 48 | -------------------------------------------------------------------------------- /src/midifallback.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 2022 ceski 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // DESCRIPTION: 15 | // MIDI instrument fallback support 16 | // 17 | 18 | #ifdef _WIN32 19 | 20 | #ifndef MIDIFALLBACK_H 21 | #define MIDIFALLBACK_H 22 | 23 | #include "doomtype.h" 24 | #include "midifile.h" 25 | 26 | typedef enum midi_fallback_type_t 27 | { 28 | FALLBACK_NONE, 29 | FALLBACK_BANK_MSB, 30 | FALLBACK_BANK_LSB, 31 | FALLBACK_DRUMS, 32 | } midi_fallback_type_t; 33 | 34 | typedef struct midi_fallback_t 35 | { 36 | midi_fallback_type_t type; 37 | byte value; 38 | } midi_fallback_t; 39 | 40 | void MIDI_CheckFallback(const midi_event_t *event, midi_fallback_t *fallback, 41 | boolean allow_sysex); 42 | void MIDI_ResetFallback(void); 43 | void MIDI_InitFallback(void); 44 | 45 | #endif // MIDIFALLBACK_H 46 | 47 | #endif // _WIN32 48 | -------------------------------------------------------------------------------- /src/i_swap.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License 7 | // as published by the Free Software Foundation; either version 2 8 | // of the License, or (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // DESCRIPTION: 16 | // Endianess handling, swapping 16bit and 32bit. 17 | // 18 | 19 | 20 | #ifndef __I_SWAP__ 21 | #define __I_SWAP__ 22 | 23 | #include "SDL_endian.h" 24 | 25 | // Endianess handling. 26 | // WAD files are stored little endian. 27 | 28 | // Just use SDL's endianness swapping functions. 29 | 30 | // These are deliberately cast to signed values; this is the behaviour 31 | // of the macros in the original source and some code relies on it. 32 | 33 | #define SHORT(x) ((signed short) SDL_SwapLE16(x)) 34 | #define LONG(x) ((signed int) SDL_SwapLE32(x)) 35 | 36 | // Defines for checking the endianness of the system. 37 | 38 | #if SDL_BYTEORDER == SDL_BIG_ENDIAN 39 | #define SYS_BIG_ENDIAN 40 | #endif 41 | 42 | #endif 43 | 44 | -------------------------------------------------------------------------------- /textscreen/textscreen.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 2005-2014 Simon Howard 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | 15 | #ifndef TEXTSCREEN_H 16 | #define TEXTSCREEN_H 17 | 18 | #ifdef __cplusplus 19 | extern "C" { 20 | #endif 21 | 22 | #include "../src/doomkeys.h" 23 | #include "txt_main.h" 24 | 25 | #include "txt_button.h" 26 | #include "txt_checkbox.h" 27 | #include "txt_conditional.h" 28 | #include "txt_desktop.h" 29 | #include "txt_dropdown.h" 30 | #include "txt_fileselect.h" 31 | #include "txt_inputbox.h" 32 | #include "txt_label.h" 33 | #include "txt_radiobutton.h" 34 | #include "txt_scrollpane.h" 35 | #include "txt_separator.h" 36 | #include "txt_spinctrl.h" 37 | #include "txt_strut.h" 38 | #include "txt_table.h" 39 | #include "txt_widget.h" 40 | #include "txt_window_action.h" 41 | #include "txt_window.h" 42 | 43 | #ifdef __cplusplus 44 | } 45 | #endif 46 | 47 | #endif /* #ifndef TEXTSCREEN_H */ 48 | 49 | -------------------------------------------------------------------------------- /man/bash-completion/heretic.template.in: -------------------------------------------------------------------------------- 1 | # bash completion for @PACKAGE_SHORTNAME@ Heretic -*- shell-script -*- 2 | 3 | _@PROGRAM_SPREFIX@_heretic() 4 | { 5 | local cur prev words cword 6 | _init_completion || return 7 | 8 | # Save the previous switch on the command line in the prevsw variable 9 | local i prevsw="" 10 | for (( i=1; $cword > 1 && i <= $cword; i++ )); do 11 | if [[ ${words[i]} == -* ]]; then 12 | prevsw=${words[i]} 13 | fi 14 | done 15 | 16 | # Allow adding more than one file with the same extension to the same switch 17 | case $prevsw in 18 | -config|-extraconfig) 19 | _filedir cfg 20 | ;; 21 | -file|-iwad|-aa|-af|-as|-merge|-nwtmerge) 22 | _filedir wad 23 | ;; 24 | -playdemo|-timedemo) 25 | _filedir lmp 26 | ;; 27 | -deh) 28 | _filedir hhe 29 | ;; 30 | esac 31 | 32 | case $prev in 33 | -hhever) 34 | COMPREPLY=(1.0 1.2 1.3) 35 | ;; 36 | -setmem) 37 | COMPREPLY=(dos622 dos71 dosbox) 38 | ;; 39 | esac 40 | 41 | if [[ $cur == -* ]]; then 42 | COMPREPLY=( $( compgen -W '@content' -- "$cur" ) ) 43 | fi 44 | } && 45 | 46 | complete -F _@PROGRAM_SPREFIX@_heretic @PROGRAM_PREFIX@heretic 47 | 48 | # ex: ts=4 sw=4 et filetype=sh 49 | -------------------------------------------------------------------------------- /man/bash-completion/strife.template.in: -------------------------------------------------------------------------------- 1 | # bash completion for @PACKAGE_SHORTNAME@ Strife -*- shell-script -*- 2 | 3 | _@PROGRAM_SPREFIX@_strife() 4 | { 5 | local cur prev words cword 6 | _init_completion || return 7 | 8 | # Save the previous switch on the command line in the prevsw variable 9 | local i prevsw="" 10 | for (( i=1; $cword > 1 && i <= $cword; i++ )); do 11 | if [[ ${words[i]} == -* ]]; then 12 | prevsw=${words[i]} 13 | fi 14 | done 15 | 16 | # Allow adding more than one file with the same extension to the same switch 17 | case $prevsw in 18 | -config|-extraconfig) 19 | _filedir cfg 20 | ;; 21 | -file|-iwad|-aa|-af|-as|-merge|-nwtmerge) 22 | _filedir wad 23 | ;; 24 | -playdemo|-timedemo) 25 | _filedir lmp 26 | ;; 27 | -deh) 28 | _filedir seh 29 | ;; 30 | esac 31 | 32 | case $prev in 33 | -gameversion) 34 | COMPREPLY=(1.2 1.31) 35 | ;; 36 | -setmem) 37 | COMPREPLY=(dos622 dos71 dosbox) 38 | ;; 39 | esac 40 | 41 | if [[ $cur == -* ]]; then 42 | COMPREPLY=( $( compgen -W '@content' -- "$cur" ) ) 43 | fi 44 | } && 45 | 46 | complete -F _@PROGRAM_SPREFIX@_strife @PROGRAM_PREFIX@strife 47 | 48 | # ex: ts=4 sw=4 et filetype=sh 49 | -------------------------------------------------------------------------------- /src/m_fixed.c: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License 7 | // as published by the Free Software Foundation; either version 2 8 | // of the License, or (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // DESCRIPTION: 16 | // Fixed point implementation. 17 | // 18 | 19 | 20 | 21 | #include "stdlib.h" 22 | 23 | #include "doomtype.h" 24 | #include "i_system.h" 25 | 26 | #include "m_fixed.h" 27 | 28 | 29 | 30 | 31 | // Fixme. __USE_C_FIXED__ or something. 32 | 33 | fixed_t 34 | FixedMul 35 | ( fixed_t a, 36 | fixed_t b ) 37 | { 38 | return ((int64_t) a * (int64_t) b) >> FRACBITS; 39 | } 40 | 41 | 42 | 43 | // 44 | // FixedDiv, C version. 45 | // 46 | 47 | fixed_t FixedDiv(fixed_t a, fixed_t b) 48 | { 49 | if ((abs(a) >> 14) >= abs(b)) 50 | { 51 | return (a^b) < 0 ? INT_MIN : INT_MAX; 52 | } 53 | else 54 | { 55 | int64_t result; 56 | 57 | result = ((int64_t) a << FRACBITS) / b; 58 | 59 | return (fixed_t) result; 60 | } 61 | } 62 | 63 | -------------------------------------------------------------------------------- /src/w_merge.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 2005-2014 Simon Howard 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // DESCRIPTION: 15 | // Handles merging of PWADs, similar to deutex's -merge option 16 | // 17 | // Ideally this should work exactly the same as in deutex, but trying to 18 | // read the deutex source code made my brain hurt. 19 | // 20 | 21 | #ifndef W_MERGE_H 22 | #define W_MERGE_H 23 | 24 | #define W_NWT_MERGE_SPRITES 0x1 25 | #define W_NWT_MERGE_FLATS 0x2 26 | 27 | // Add a new WAD and merge it into the main directory 28 | 29 | void W_MergeFile(const char *filename); 30 | 31 | // NWT-style merging 32 | 33 | void W_NWTMergeFile(const char *filename, int flags); 34 | 35 | // Acts the same as NWT's "-merge" option. 36 | 37 | void W_NWTDashMerge(const char *filename); 38 | 39 | // Debug function that prints the WAD directory. 40 | 41 | void W_PrintDirectory(void); 42 | 43 | #endif /* #ifndef W_MERGE_H */ 44 | 45 | -------------------------------------------------------------------------------- /src/doom/r_sky.c: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License 7 | // as published by the Free Software Foundation; either version 2 8 | // of the License, or (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // DESCRIPTION: 16 | // Sky rendering. The DOOM sky is a texture map like any 17 | // wall, wrapping around. A 1024 columns equal 360 degrees. 18 | // The default sky map is 256 columns and repeats 4 times 19 | // on a 320 screen? 20 | // 21 | // 22 | 23 | 24 | 25 | // Needed for FRACUNIT. 26 | #include "m_fixed.h" 27 | 28 | // Needed for Flat retrieval. 29 | #include "r_data.h" 30 | 31 | 32 | #include "r_sky.h" 33 | 34 | // 35 | // sky mapping 36 | // 37 | int skyflatnum; 38 | int skytexture; 39 | int skytexturemid; 40 | 41 | 42 | 43 | // 44 | // R_InitSkyMap 45 | // Called whenever the view size changes. 46 | // 47 | void R_InitSkyMap (void) 48 | { 49 | // skyflatnum = R_FlatNumForName ( SKYFLATNAME ); 50 | skytexturemid = SCREENHEIGHT/2*FRACUNIT; 51 | } 52 | 53 | -------------------------------------------------------------------------------- /src/doom/f_wipe.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License 7 | // as published by the Free Software Foundation; either version 2 8 | // of the License, or (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // DESCRIPTION: 16 | // Mission start screen wipe/melt, special effects. 17 | // 18 | 19 | 20 | #ifndef __F_WIPE_H__ 21 | #define __F_WIPE_H__ 22 | 23 | // 24 | // SCREEN WIPE PACKAGE 25 | // 26 | 27 | enum 28 | { 29 | // simple gradual pixel change for 8-bit only 30 | wipe_ColorXForm, 31 | 32 | // weird screen melt 33 | wipe_Melt, 34 | 35 | wipe_NUMWIPES 36 | }; 37 | 38 | int 39 | wipe_StartScreen 40 | ( int x, 41 | int y, 42 | int width, 43 | int height ); 44 | 45 | 46 | int 47 | wipe_EndScreen 48 | ( int x, 49 | int y, 50 | int width, 51 | int height ); 52 | 53 | 54 | int 55 | wipe_ScreenWipe 56 | ( int wipeno, 57 | int x, 58 | int y, 59 | int width, 60 | int height, 61 | int ticks ); 62 | 63 | #endif 64 | -------------------------------------------------------------------------------- /src/doom/am_map.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License 7 | // as published by the Free Software Foundation; either version 2 8 | // of the License, or (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // DESCRIPTION: 16 | // AutoMap module. 17 | // 18 | 19 | #ifndef __AMMAP_H__ 20 | #define __AMMAP_H__ 21 | 22 | #include "d_event.h" 23 | #include "m_cheat.h" 24 | 25 | // Used by ST StatusBar stuff. 26 | #define AM_MSGHEADER (('a'<<24)+('m'<<16)) 27 | #define AM_MSGENTERED (AM_MSGHEADER | ('e'<<8)) 28 | #define AM_MSGEXITED (AM_MSGHEADER | ('x'<<8)) 29 | 30 | 31 | // Called by main loop. 32 | boolean AM_Responder (event_t* ev); 33 | 34 | // Called by main loop. 35 | void AM_Ticker (void); 36 | 37 | // Called by main loop, 38 | // called instead of view drawer if automap active. 39 | void AM_Drawer (void); 40 | 41 | // Called to force the automap to quit 42 | // if the level is completed while it is up. 43 | void AM_Stop (void); 44 | 45 | 46 | extern cheatseq_t cheat_amap; 47 | 48 | 49 | #endif 50 | -------------------------------------------------------------------------------- /src/strife/am_map.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License 7 | // as published by the Free Software Foundation; either version 2 8 | // of the License, or (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // DESCRIPTION: 16 | // AutoMap module. 17 | // 18 | 19 | #ifndef __AMMAP_H__ 20 | #define __AMMAP_H__ 21 | 22 | #include "d_event.h" 23 | #include "m_cheat.h" 24 | 25 | // Used by ST StatusBar stuff. 26 | #define AM_MSGHEADER (('a'<<24)+('m'<<16)) 27 | #define AM_MSGENTERED (AM_MSGHEADER | ('e'<<8)) 28 | #define AM_MSGEXITED (AM_MSGHEADER | ('x'<<8)) 29 | 30 | 31 | // Called by main loop. 32 | boolean AM_Responder (event_t* ev); 33 | 34 | // Called by main loop. 35 | void AM_Ticker (void); 36 | 37 | // Called by main loop, 38 | // called instead of view drawer if automap active. 39 | void AM_Drawer (void); 40 | 41 | // Called to force the automap to quit 42 | // if the level is completed while it is up. 43 | void AM_Stop (void); 44 | 45 | 46 | extern cheatseq_t cheat_amap; 47 | 48 | 49 | #endif 50 | -------------------------------------------------------------------------------- /src/strife/f_wipe.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License 7 | // as published by the Free Software Foundation; either version 2 8 | // of the License, or (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // DESCRIPTION: 16 | // Mission start screen wipe/melt, special effects. 17 | // 18 | 19 | 20 | #ifndef __F_WIPE_H__ 21 | #define __F_WIPE_H__ 22 | 23 | // 24 | // SCREEN WIPE PACKAGE 25 | // 26 | 27 | enum 28 | { 29 | // [STRIFE]: ColorXForm reimplemented as a proper crossfade 30 | wipe_ColorXForm, 31 | 32 | // weird screen melt 33 | wipe_Melt, 34 | 35 | wipe_NUMWIPES 36 | }; 37 | 38 | int 39 | wipe_StartScreen 40 | ( int x, 41 | int y, 42 | int width, 43 | int height ); 44 | 45 | 46 | int 47 | wipe_EndScreen 48 | ( int x, 49 | int y, 50 | int width, 51 | int height ); 52 | 53 | 54 | int 55 | wipe_ScreenWipe 56 | ( int wipeno, 57 | int x, 58 | int y, 59 | int width, 60 | int height, 61 | int ticks ); 62 | 63 | #endif 64 | -------------------------------------------------------------------------------- /textscreen/txt_strut.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 2005-2014 Simon Howard 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | 15 | #ifndef TXT_STRUT_H 16 | #define TXT_STRUT_H 17 | 18 | /** 19 | * @file txt_strut.h 20 | * 21 | * Strut widget. 22 | */ 23 | 24 | /** 25 | * Strut widget. 26 | * 27 | * A strut is a widget that takes up a fixed amount of space. It can 28 | * be visualised as a transparent box. Struts are used to provide 29 | * spacing between widgets. 30 | */ 31 | 32 | typedef struct txt_strut_s txt_strut_t; 33 | 34 | #include "txt_widget.h" 35 | 36 | struct txt_strut_s 37 | { 38 | txt_widget_t widget; 39 | int width; 40 | int height; 41 | }; 42 | 43 | /** 44 | * Create a new strut. 45 | * 46 | * @param width Width of the strut, in characters. 47 | * @param height Height of the strut, in characters. 48 | */ 49 | 50 | txt_strut_t *TXT_NewStrut(int width, int height); 51 | 52 | #endif /* #ifndef TXT_STRUT_H */ 53 | 54 | 55 | -------------------------------------------------------------------------------- /src/strife/wi_stuff.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License 7 | // as published by the Free Software Foundation; either version 2 8 | // of the License, or (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // DESCRIPTION: 16 | // Intermission. 17 | // 18 | 19 | #ifndef __WI_STUFF__ 20 | #define __WI_STUFF__ 21 | 22 | // haleyjd 08/23/2010: Strife does not have an intermission 23 | #if 0 24 | //#include "v_video.h" 25 | 26 | #include "doomdef.h" 27 | 28 | // States for the intermission 29 | 30 | typedef enum 31 | { 32 | NoState = -1, 33 | StatCount, 34 | ShowNextLoc, 35 | } stateenum_t; 36 | 37 | // Called by main loop, animate the intermission. 38 | void WI_Ticker (void); 39 | 40 | // Called by main loop, 41 | // draws the intermission directly into the screen buffer. 42 | void WI_Drawer (void); 43 | 44 | // Setup for an intermission screen. 45 | void WI_Start(wbstartstruct_t* wbstartstruct); 46 | 47 | // Shut down the intermission screen 48 | void WI_End(void); 49 | 50 | #endif 51 | #endif 52 | -------------------------------------------------------------------------------- /src/deh_str.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 2005-2014 Simon Howard 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // 15 | // Dehacked string replacements 16 | // 17 | 18 | #ifndef DEH_STR_H 19 | #define DEH_STR_H 20 | 21 | #include 22 | 23 | #include "doomtype.h" 24 | 25 | // Used to do dehacked text substitutions throughout the program 26 | 27 | const char *DEH_String(const char *s) PRINTF_ARG_ATTR(1); 28 | void DEH_printf(const char *fmt, ...) PRINTF_ATTR(1, 2); 29 | void DEH_fprintf(FILE *fstream, const char *fmt, ...) PRINTF_ATTR(2, 3); 30 | void DEH_snprintf(char *buffer, size_t len, const char *fmt, ...) PRINTF_ATTR(3, 4); 31 | void DEH_AddStringReplacement(const char *from_text, const char *to_text); 32 | 33 | 34 | #if 0 35 | // Static macro versions of the functions above 36 | 37 | #define DEH_String(x) (x) 38 | #define DEH_printf printf 39 | #define DEH_fprintf fprintf 40 | #define DEH_snprintf snprintf 41 | 42 | #endif 43 | 44 | #endif /* #ifndef DEH_STR_H */ 45 | 46 | -------------------------------------------------------------------------------- /.devcontainer/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu 2 | 3 | ######### Apt dependencies 4 | 5 | ARG system_apt_dependencies="build-essential gdb automake autoconf libtool git pkg-config python3 python3-pip sudo" 6 | ARG choco_apt_dependencies="gcc make libsdl2-dev libsdl2-net-dev libsdl2-mixer-dev" 7 | ARG choco_apt_dependencies_optional="libflac-dev libfluidsynth-dev libpng-dev libsamplerate-dev libvorbis-dev" 8 | RUN apt-get update && \ 9 | DEBIAN_FRONTEND=noninteractive apt-get install -qq $system_apt_dependencies $choco_apt_dependencies $choco_apt_dependencies_optional 10 | 11 | ########## Install Pillow (PIL) via pip, not apt 12 | 13 | ARG choco_pip_dependencies="pillow" 14 | RUN pip install $choco_pip_dependencies 15 | 16 | ########## Container user setup 17 | 18 | ARG USERNAME=chocodev 19 | ARG USER_UID=1000 20 | ARG USER_GID=$USER_UID 21 | RUN groupadd --gid $USER_GID $USERNAME \ 22 | && useradd --uid $USER_UID --gid $USER_GID -m $USERNAME 23 | 24 | # Add sudo support 25 | RUN echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \ 26 | && chmod 0440 /etc/sudoers.d/$USERNAME 27 | 28 | # Add the user to the audio group, to have ALSA sound access 29 | # TODO: pulseaudio, so this isn't necessary? 30 | RUN addgroup $USERNAME audio 31 | 32 | # Use bash, not sh. Yuck. 33 | RUN chsh $USERNAME -s /bin/bash 34 | 35 | USER $USERNAME 36 | 37 | # Make sure we actually own our own local share stuff 38 | RUN mkdir -p /home/$USERNAME/.local/share && \ 39 | chown -R $USERNAME:$USERNAME /home/$USERNAME/.local 40 | -------------------------------------------------------------------------------- /src/i_cdmus.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 1993-2008 Raven Software 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License 7 | // as published by the Free Software Foundation; either version 2 8 | // of the License, or (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | 16 | // i_cdmus.h 17 | 18 | #ifndef __ICDMUS__ 19 | #define __ICDMUS__ 20 | 21 | #define CDERR_NOTINSTALLED 10 // MSCDEX not installed 22 | #define CDERR_NOAUDIOSUPPORT 11 // CD-ROM Doesn't support audio 23 | #define CDERR_NOAUDIOTRACKS 12 // Current CD has no audio tracks 24 | #define CDERR_BADDRIVE 20 // Bad drive number 25 | #define CDERR_BADTRACK 21 // Bad track number 26 | #define CDERR_IOCTLBUFFMEM 22 // Not enough low memory for IOCTL 27 | #define CDERR_DEVREQBASE 100 // DevReq errors 28 | 29 | extern int cd_Error; 30 | 31 | int I_CDMusInit(void); 32 | void I_CDMusPrintStartup(void); 33 | int I_CDMusPlay(int track); 34 | int I_CDMusStop(void); 35 | int I_CDMusResume(void); 36 | int I_CDMusSetVolume(int volume); 37 | int I_CDMusFirstTrack(void); 38 | int I_CDMusLastTrack(void); 39 | int I_CDMusTrackLength(int track); 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /opl/opl_queue.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 2005-2014 Simon Howard 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // DESCRIPTION: 15 | // OPL callback queue. 16 | // 17 | 18 | #ifndef OPL_QUEUE_H 19 | #define OPL_QUEUE_H 20 | 21 | #include "opl.h" 22 | 23 | typedef struct opl_callback_queue_s opl_callback_queue_t; 24 | 25 | opl_callback_queue_t *OPL_Queue_Create(void); 26 | int OPL_Queue_IsEmpty(opl_callback_queue_t *queue); 27 | void OPL_Queue_Clear(opl_callback_queue_t *queue); 28 | void OPL_Queue_Destroy(opl_callback_queue_t *queue); 29 | void OPL_Queue_Push(opl_callback_queue_t *queue, 30 | opl_callback_t callback, void *data, 31 | uint64_t time); 32 | int OPL_Queue_Pop(opl_callback_queue_t *queue, 33 | opl_callback_t *callback, void **data); 34 | uint64_t OPL_Queue_Peek(opl_callback_queue_t *queue); 35 | void OPL_Queue_AdjustCallbacks(opl_callback_queue_t *queue, 36 | uint64_t time, float factor); 37 | 38 | #endif /* #ifndef OPL_QUEUE_H */ 39 | 40 | -------------------------------------------------------------------------------- /pkg/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | OSX_FILES= \ 3 | osx/Resources/app.png \ 4 | osx/Resources/launcher.nib/designable.nib \ 5 | osx/Resources/launcher.nib/keyedobjects.nib \ 6 | osx/disk/dir.DS_Store \ 7 | osx/disk/background.png \ 8 | osx/GNUmakefile \ 9 | osx/Info.plist.in \ 10 | osx/PkgInfo \ 11 | osx/cp-with-libs \ 12 | osx/dmgfix \ 13 | osx/main.m \ 14 | osx/AppController.m osx/AppController.h \ 15 | osx/Execute.m osx/Execute.h \ 16 | osx/IWADController.m osx/IWADController.h \ 17 | osx/LauncherManager.m osx/LauncherManager.h 18 | 19 | WIN32_FILES= \ 20 | win32/GNUmakefile \ 21 | win32/cp-with-libs \ 22 | win32/README 23 | 24 | EXTRA_DIST=style.html $(OSX_FILES) $(WIN32_FILES) 25 | 26 | -------------------------------------------------------------------------------- /man/bash-completion/doom.template.in: -------------------------------------------------------------------------------- 1 | # bash completion for @PACKAGE_SHORTNAME@ Doom -*- shell-script -*- 2 | 3 | _@PROGRAM_SPREFIX@_doom() 4 | { 5 | local cur prev words cword 6 | _init_completion || return 7 | 8 | # Save the previous switch on the command line in the prevsw variable 9 | local i prevsw="" 10 | for (( i=1; $cword > 1 && i <= $cword; i++ )); do 11 | if [[ ${words[i]} == -* ]]; then 12 | prevsw=${words[i]} 13 | fi 14 | done 15 | 16 | # Allow adding more than one file with the same extension to the same switch 17 | case $prevsw in 18 | -config|-extraconfig) 19 | _filedir cfg 20 | ;; 21 | -file|-iwad|-aa|-af|-as|-merge|-nwtmerge) 22 | _filedir wad 23 | ;; 24 | -playdemo|-timedemo) 25 | _filedir lmp 26 | ;; 27 | -deh) 28 | _filedir '@(bex|deh)' 29 | ;; 30 | esac 31 | 32 | case $prev in 33 | -pack) 34 | COMPREPLY=(doom2 tnt plutonia) 35 | ;; 36 | -gameversion) 37 | COMPREPLY=(1.666 1.7 1.8 1.9 ultimate final final2 hacx chex) 38 | ;; 39 | -setmem) 40 | COMPREPLY=(dos622 dos71 dosbox) 41 | ;; 42 | esac 43 | 44 | if [[ $cur == -* ]]; then 45 | COMPREPLY=( $( compgen -W '@content' -- "$cur" ) ) 46 | fi 47 | } && 48 | 49 | complete -F _@PROGRAM_SPREFIX@_doom @PROGRAM_PREFIX@doom 50 | 51 | # ex: ts=4 sw=4 et filetype=sh 52 | -------------------------------------------------------------------------------- /src/doom/r_data.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License 7 | // as published by the Free Software Foundation; either version 2 8 | // of the License, or (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // DESCRIPTION: 16 | // Refresh module, data I/O, caching, retrieval of graphics 17 | // by name. 18 | // 19 | 20 | 21 | #ifndef __R_DATA__ 22 | #define __R_DATA__ 23 | 24 | #include "r_defs.h" 25 | #include "r_state.h" 26 | 27 | 28 | // Retrieve column data for span blitting. 29 | byte* 30 | R_GetColumn 31 | ( int tex, 32 | int col ); 33 | 34 | 35 | // I/O, setting up the stuff. 36 | void R_InitData (void); 37 | void R_PrecacheLevel (void); 38 | 39 | 40 | // Retrieval. 41 | // Floor/ceiling opaque texture tiles, 42 | // lookup by name. For animation? 43 | int R_FlatNumForName(const char *name); 44 | 45 | 46 | // Called by P_Ticker for switches and animations, 47 | // returns the texture number for the texture name. 48 | int R_TextureNumForName(const char *name); 49 | int R_CheckTextureNumForName(const char *name); 50 | 51 | 52 | extern int numflats; 53 | 54 | 55 | #endif 56 | -------------------------------------------------------------------------------- /src/m_argv.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License 7 | // as published by the Free Software Foundation; either version 2 8 | // of the License, or (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // DESCRIPTION: 16 | // Nil. 17 | // 18 | 19 | 20 | #ifndef __M_ARGV__ 21 | #define __M_ARGV__ 22 | 23 | #include "doomtype.h" 24 | 25 | // 26 | // MISC 27 | // 28 | extern int myargc; 29 | extern char** myargv; 30 | 31 | extern char *exedir; 32 | void M_SetExeDir(void); 33 | 34 | // Returns the position of the given parameter 35 | // in the arg list (0 if not found). 36 | int M_CheckParm (const char* check); 37 | 38 | // Same as M_CheckParm, but checks that num_args arguments are available 39 | // following the specified argument. 40 | int M_CheckParmWithArgs(const char *check, int num_args); 41 | 42 | void M_FindResponseFile(void); 43 | void M_AddLooseFiles(void); 44 | 45 | // Parameter has been specified? 46 | 47 | boolean M_ParmExists(const char *check); 48 | 49 | // Get name of executable used to run this program: 50 | 51 | const char *M_GetExecutableName(void); 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /textscreen/txt_gui.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 2005-2014 Simon Howard 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // 15 | // Text mode emulation in SDL 16 | // 17 | 18 | #ifndef TXT_GUI_H 19 | #define TXT_GUI_H 20 | 21 | #define TXT_INACTIVE_WINDOW_BACKGROUND TXT_COLOR_BLACK 22 | #define TXT_ACTIVE_WINDOW_BACKGROUND TXT_COLOR_BLUE 23 | #define TXT_HOVER_BACKGROUND TXT_COLOR_CYAN 24 | 25 | void TXT_DrawDesktopBackground(const char *title); 26 | void TXT_DrawWindowFrame(const char *title, int x, int y, int w, int h); 27 | void TXT_DrawSeparator(int x, int y, int w); 28 | void TXT_DrawCodePageString(const char *s); 29 | void TXT_DrawString(const char *s); 30 | int TXT_CanDrawCharacter(unsigned int c); 31 | 32 | void TXT_DrawHorizScrollbar(int x, int y, int w, int cursor, int range); 33 | void TXT_DrawVertScrollbar(int x, int y, int h, int cursor, int range); 34 | 35 | void TXT_InitClipArea(void); 36 | void TXT_PushClipArea(int x1, int x2, int y1, int y2); 37 | void TXT_PopClipArea(void); 38 | 39 | #endif /* #ifndef TXT_GUI_H */ 40 | 41 | -------------------------------------------------------------------------------- /src/m_cheat.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License 7 | // as published by the Free Software Foundation; either version 2 8 | // of the License, or (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // DESCRIPTION: 16 | // Cheat code checking. 17 | // 18 | 19 | 20 | #ifndef __M_CHEAT__ 21 | #define __M_CHEAT__ 22 | 23 | // 24 | // CHEAT SEQUENCE PACKAGE 25 | // 26 | 27 | // declaring a cheat 28 | 29 | #define CHEAT(value, parameters) \ 30 | { value, sizeof(value) - 1, parameters, 0, 0, "" } 31 | 32 | #define MAX_CHEAT_LEN 25 33 | #define MAX_CHEAT_PARAMS 5 34 | 35 | typedef struct 36 | { 37 | // settings for this cheat 38 | 39 | char sequence[MAX_CHEAT_LEN]; 40 | size_t sequence_len; 41 | int parameter_chars; 42 | 43 | // state used during the game 44 | 45 | size_t chars_read; 46 | int param_chars_read; 47 | char parameter_buf[MAX_CHEAT_PARAMS]; 48 | } cheatseq_t; 49 | 50 | int 51 | cht_CheckCheat 52 | ( cheatseq_t* cht, 53 | char key ); 54 | 55 | 56 | void 57 | cht_GetParam 58 | ( cheatseq_t* cht, 59 | char* buffer ); 60 | 61 | 62 | #endif 63 | -------------------------------------------------------------------------------- /src/strife/r_sky.c: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License 7 | // as published by the Free Software Foundation; either version 2 8 | // of the License, or (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // DESCRIPTION: 16 | // Sky rendering. The DOOM sky is a texture map like any 17 | // wall, wrapping around. A 1024 columns equal 360 degrees. 18 | // The default sky map is 256 columns and repeats 4 times 19 | // on a 320 screen? 20 | // 21 | // 22 | 23 | 24 | 25 | // Needed for FRACUNIT. 26 | #include "m_fixed.h" 27 | 28 | // Needed for Flat retrieval. 29 | #include "r_data.h" 30 | 31 | 32 | #include "r_sky.h" 33 | 34 | // 35 | // sky mapping 36 | // 37 | int skyflatnum; 38 | int skytexture; 39 | int skytexturemid; 40 | 41 | 42 | 43 | // 44 | // R_InitSkyMap 45 | // Called whenever the view size changes. 46 | // 47 | void R_InitSkyMap (void) 48 | { 49 | // haleyjd 10/03/10: [STRIFE] Sky is set here, not in G_DoLoadLevel. 50 | // Also skytexturemid changed from 100 to 199. 51 | skyflatnum = R_FlatNumForName ( SKYFLATNAME ); 52 | skytexturemid = 199*FRACUNIT; 53 | } 54 | 55 | -------------------------------------------------------------------------------- /src/setup/execute.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 2005-2014 Simon Howard 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | 15 | #ifndef TESTCONFIG_H 16 | #define TESTCONFIG_H 17 | 18 | #include "doomtype.h" 19 | #include "textscreen.h" 20 | 21 | typedef struct execute_context_s execute_context_t; 22 | 23 | #define IWAD_DOOM2 (1 << 0) /* doom2.wad */ 24 | #define IWAD_PLUTONIA (1 << 1) /* plutonia.wad */ 25 | #define IWAD_TNT (1 << 2) /* tnt.wad */ 26 | #define IWAD_DOOM (1 << 3) /* doom.wad */ 27 | #define IWAD_DOOM1 (1 << 4) /* doom1.wad */ 28 | #define IWAD_CHEX (1 << 5) /* chex.wad */ 29 | 30 | execute_context_t *NewExecuteContext(void); 31 | void AddCmdLineParameter(execute_context_t *context, const char *s, ...) PRINTF_ATTR(2, 3); 32 | void PassThroughArguments(execute_context_t *context); 33 | int ExecuteDoom(execute_context_t *context); 34 | int FindInstalledIWADs(void); 35 | boolean OpenFolder(const char *path); 36 | 37 | txt_window_action_t *TestConfigAction(void); 38 | 39 | #endif /* #ifndef TESTCONFIG_H */ 40 | 41 | -------------------------------------------------------------------------------- /src/i_glob.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 2018 Simon Howard 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // DESCRIPTION: 15 | // System specific file globbing interface. 16 | // 17 | 18 | 19 | #ifndef __I_GLOB__ 20 | #define __I_GLOB__ 21 | 22 | #define GLOB_FLAG_NOCASE 0x01 23 | #define GLOB_FLAG_SORTED 0x02 24 | 25 | typedef struct glob_s glob_t; 26 | 27 | // Start reading a list of file paths from the given directory which match 28 | // the given glob pattern. I_EndGlob() must be called on completion. 29 | glob_t *I_StartGlob(const char *directory, const char *glob, int flags); 30 | 31 | // Same as I_StartGlob but multiple glob patterns can be provided. The list 32 | // of patterns must be terminated with NULL. 33 | glob_t *I_StartMultiGlob(const char *directory, int flags, 34 | const char *glob, ...); 35 | 36 | // Finish reading file list. 37 | void I_EndGlob(glob_t *glob); 38 | 39 | // Read the name of the next globbed filename. NULL is returned if there 40 | // are no more found. 41 | const char *I_NextGlob(glob_t *glob); 42 | 43 | #endif 44 | 45 | -------------------------------------------------------------------------------- /textscreen/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library(textscreen STATIC 2 | textscreen.h 3 | txt_conditional.c txt_conditional.h 4 | txt_checkbox.c txt_checkbox.h 5 | txt_desktop.c txt_desktop.h 6 | txt_dropdown.c txt_dropdown.h 7 | txt_fileselect.c txt_fileselect.h 8 | txt_gui.c txt_gui.h 9 | txt_inputbox.c txt_inputbox.h 10 | txt_io.c txt_io.h 11 | txt_main.h 12 | txt_button.c txt_button.h 13 | txt_label.c txt_label.h 14 | txt_radiobutton.c txt_radiobutton.h 15 | txt_scrollpane.c txt_scrollpane.h 16 | txt_separator.c txt_separator.h 17 | txt_spinctrl.c txt_spinctrl.h 18 | txt_sdl.c txt_sdl.h 19 | txt_strut.c txt_strut.h 20 | txt_table.c txt_table.h 21 | txt_utf8.c txt_utf8.h 22 | txt_widget.c txt_widget.h 23 | txt_window.c txt_window.h 24 | txt_window_action.c txt_window_action.h) 25 | target_include_directories(textscreen 26 | INTERFACE "." 27 | PRIVATE "../src/") 28 | if (DEFINED EMSCRIPTEN) 29 | set_target_properties(textscreen PROPERTIES COMPILE_FLAGS "-s USE_SDL=2") 30 | set_target_properties(textscreen PROPERTIES LINK_FLAGS "-s USE_SDL=2") 31 | else() 32 | target_link_libraries(textscreen m SDL2::SDL2) 33 | endif() 34 | -------------------------------------------------------------------------------- /man/setup.template: -------------------------------------------------------------------------------- 1 | .TH @PROGRAM_SPREFIX@\-@GAME@-setup 6 2 | .SH NAME 3 | @PROGRAM_SPREFIX@\-@GAME@-setup \- configuration tool for @PROGRAM_SPREFIX@\-@GAME@ 4 | .SH SYNOPSIS 5 | .B @PROGRAM_SPREFIX@\-@GAME@-setup 6 | [OPTIONS] 7 | .SH DESCRIPTION 8 | .PP 9 | @PACKAGE_SHORTNAME@ @GAME_UPPER@ is a modern @GAME_UPPER@ engine designed to behave 10 | as similar to the original @GAME_UPPER@ game as is possible. 11 | .PP 12 | .B @PROGRAM_SPREFIX@\-@GAME@-setup 13 | is a tool for configuring @PACKAGE_SHORTNAME@ @GAME_UPPER@. It provides a menu\-based 14 | interface for the display, joystick, keyboard, mouse, sound and 15 | compatibility settings. 16 | .PP 17 | .B @PROGRAM_SPREFIX@\-@GAME@-setup 18 | can also be used to start and join network games. 19 | .PP 20 | .SH OPTIONS 21 | .TP 22 | \fB-config \fR 23 | Load configuration from the specified file, instead of @CFGFILE@. 24 | .TP 25 | \fB-extraconfig \fR 26 | Load extra configuration from the specified file, instead of @PROGRAM_SPREFIX@\-@GAME@.cfg. 27 | .SH SEE ALSO 28 | \fB@PROGRAM_SPREFIX@\-@GAME@\fR(6), 29 | \fBdefault.cfg\fR(5), 30 | \fB@PROGRAM_SPREFIX@\-@GAME@.cfg\fR(5) 31 | .SH AUTHOR 32 | Chocolate Doom is written and maintained by Simon Howard. 33 | .PP 34 | This manual was written by Jonathan Dowland. 35 | .SH COPYRIGHT 36 | Copyright \(co id Software Inc. 37 | Copyright \(co 2005-8 Simon Howard. 38 | .br 39 | This is free software. You may redistribute copies of it under the terms of 40 | the GNU General Public License . 41 | There is NO WARRANTY, to the extent permitted by law. 42 | 43 | -------------------------------------------------------------------------------- /src/setup/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | AM_CFLAGS = @SDL_CFLAGS@ \ 3 | @SDLMIXER_CFLAGS@ \ 4 | -I$(top_srcdir)/textscreen -I$(top_srcdir)/src 5 | 6 | noinst_LIBRARIES = libsetup.a 7 | 8 | libsetup_a_SOURCES = \ 9 | compatibility.c compatibility.h \ 10 | display.c display.h \ 11 | joystick.c joystick.h \ 12 | keyboard.c keyboard.h \ 13 | mainmenu.c \ 14 | mode.c mode.h \ 15 | mouse.c mouse.h \ 16 | multiplayer.c multiplayer.h \ 17 | sound.c sound.h \ 18 | execute.c execute.h \ 19 | txt_joyaxis.c txt_joyaxis.h \ 20 | txt_joybinput.c txt_joybinput.h \ 21 | txt_keyinput.c txt_keyinput.h \ 22 | txt_mouseinput.c txt_mouseinput.h 23 | 24 | EXTRA_DIST= \ 25 | CMakeLists.txt \ 26 | setup_icon.c 27 | 28 | appdir = $(prefix)/share/applications 29 | app_DATA = @PACKAGE_RDNS@.Setup.desktop 30 | 31 | CLEANFILES = $(app_DATA) 32 | 33 | @PACKAGE_RDNS@.Setup.desktop : Setup.desktop 34 | cp Setup.desktop $@ 35 | 36 | if HAVE_ICONS 37 | 38 | setup_icon.c : $(top_builddir)/data/setup.png 39 | $(top_builddir)/data/convert-icon $(top_builddir)/data/setup.png $@ 40 | 41 | endif 42 | 43 | -------------------------------------------------------------------------------- /src/hexen/st_start.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 1993-2008 Raven Software 4 | // Copyright(C) 2005-2014 Simon Howard 5 | // 6 | // This program is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU General Public License 8 | // as published by the Free Software Foundation; either version 2 9 | // of the License, or (at your option) any later version. 10 | // 11 | // This program is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | // 16 | 17 | #ifndef STSTART_H 18 | #define STSTART_H 19 | 20 | #include "doomtype.h" 21 | 22 | // HEADER FILES ------------------------------------------------------------ 23 | 24 | // MACROS ------------------------------------------------------------------ 25 | 26 | // TYPES ------------------------------------------------------------------- 27 | 28 | // PUBLIC FUNCTION PROTOTYPES ---------------------------------------------- 29 | extern void ST_Init(void); 30 | extern void ST_Done(void); 31 | extern void ST_Message(const char *message, ...) PRINTF_ATTR(1, 2); 32 | extern void ST_RealMessage(const char *message, ...) PRINTF_ATTR(1, 2); 33 | extern void ST_Progress(void); 34 | extern void ST_NetProgress(void); 35 | extern void ST_NetDone(void); 36 | 37 | // PUBLIC DATA DECLARATIONS ------------------------------------------------ 38 | 39 | extern int graphical_startup; 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /src/i_input.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License 7 | // as published by the Free Software Foundation; either version 2 8 | // of the License, or (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // DESCRIPTION: 16 | // System-specific keyboard/mouse input. 17 | // 18 | 19 | 20 | #ifndef __I_INPUT__ 21 | #define __I_INPUT__ 22 | 23 | #include "doomtype.h" 24 | 25 | #include "SDL.h" 26 | 27 | 28 | #define MAX_MOUSE_BUTTONS 8 29 | 30 | extern float mouse_acceleration; 31 | extern int mouse_threshold; 32 | 33 | void I_BindInputVariables(void); 34 | void I_ReadMouse(void); 35 | 36 | // I_StartTextInput begins text input, activating the on-screen keyboard 37 | // (if one is used). The caller indicates that any entered text will be 38 | // displayed in the rectangle given by the provided set of coordinates. 39 | void I_StartTextInput(int x1, int y1, int x2, int y2); 40 | 41 | // I_StopTextInput finishes text input, deactivating the on-screen keyboard 42 | // (if one is used). 43 | void I_StopTextInput(void); 44 | 45 | void I_HandleKeyboardEvent(SDL_Event *sdlevent); 46 | void I_HandleMouseEvent(SDL_Event *sdlevent); 47 | 48 | 49 | #endif 50 | -------------------------------------------------------------------------------- /textscreen/txt_sdl.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 2005-2014 Simon Howard 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // 15 | // Text mode emulation in SDL 16 | // 17 | 18 | #ifndef TXT_SDL_H 19 | #define TXT_SDL_H 20 | 21 | // The textscreen API itself doesn't need SDL; however, SDL needs its 22 | // headers included where main() is defined. 23 | 24 | #include "SDL.h" 25 | 26 | // Event callback function type: a function of this type can be used 27 | // to intercept events in the textscreen event processing loop. 28 | // Returning 1 will cause the event to be eaten; the textscreen code 29 | // will not see it. 30 | 31 | typedef int (*TxtSDLEventCallbackFunc)(SDL_Event *event, void *user_data); 32 | 33 | // Set a callback function to call in the SDL event loop. Useful for 34 | // intercepting events. Pass callback=NULL to clear an existing 35 | // callback function. 36 | // user_data is a void pointer to be passed to the callback function. 37 | 38 | void TXT_SDL_SetEventCallback(TxtSDLEventCallbackFunc callback, void *user_data); 39 | 40 | 41 | extern SDL_Window *TXT_SDLWindow; 42 | 43 | 44 | #endif /* #ifndef TXT_SDL_H */ 45 | 46 | -------------------------------------------------------------------------------- /src/doom/r_bsp.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License 7 | // as published by the Free Software Foundation; either version 2 8 | // of the License, or (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // DESCRIPTION: 16 | // Refresh module, BSP traversal and handling. 17 | // 18 | 19 | 20 | #ifndef __R_BSP__ 21 | #define __R_BSP__ 22 | 23 | 24 | 25 | extern seg_t* curline; 26 | extern side_t* sidedef; 27 | extern line_t* linedef; 28 | extern sector_t* frontsector; 29 | extern sector_t* backsector; 30 | 31 | extern int rw_x; 32 | extern int rw_stopx; 33 | 34 | extern boolean segtextured; 35 | 36 | // false if the back side is the same plane 37 | extern boolean markfloor; 38 | extern boolean markceiling; 39 | 40 | extern boolean skymap; 41 | 42 | extern drawseg_t drawsegs[MAXDRAWSEGS]; 43 | extern drawseg_t* ds_p; 44 | 45 | extern lighttable_t** hscalelight; 46 | extern lighttable_t** vscalelight; 47 | extern lighttable_t** dscalelight; 48 | 49 | 50 | typedef void (*drawfunc_t) (int start, int stop); 51 | 52 | 53 | // BSP? 54 | void R_ClearClipSegs (void); 55 | void R_ClearDrawSegs (void); 56 | 57 | 58 | void R_RenderBSPNode (int bspnum); 59 | 60 | 61 | #endif 62 | -------------------------------------------------------------------------------- /src/strife/r_bsp.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License 7 | // as published by the Free Software Foundation; either version 2 8 | // of the License, or (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // DESCRIPTION: 16 | // Refresh module, BSP traversal and handling. 17 | // 18 | 19 | 20 | #ifndef __R_BSP__ 21 | #define __R_BSP__ 22 | 23 | 24 | 25 | extern seg_t* curline; 26 | extern side_t* sidedef; 27 | extern line_t* linedef; 28 | extern sector_t* frontsector; 29 | extern sector_t* backsector; 30 | 31 | extern int rw_x; 32 | extern int rw_stopx; 33 | 34 | extern boolean segtextured; 35 | 36 | // false if the back side is the same plane 37 | extern boolean markfloor; 38 | extern boolean markceiling; 39 | 40 | extern boolean skymap; 41 | 42 | extern drawseg_t drawsegs[MAXDRAWSEGS]; 43 | extern drawseg_t* ds_p; 44 | 45 | extern lighttable_t** hscalelight; 46 | extern lighttable_t** vscalelight; 47 | extern lighttable_t** dscalelight; 48 | 49 | 50 | typedef void (*drawfunc_t) (int start, int stop); 51 | 52 | 53 | // BSP? 54 | void R_ClearClipSegs (void); 55 | void R_ClearDrawSegs (void); 56 | 57 | 58 | void R_RenderBSPNode (int bspnum); 59 | 60 | 61 | #endif 62 | -------------------------------------------------------------------------------- /src/strife/r_data.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License 7 | // as published by the Free Software Foundation; either version 2 8 | // of the License, or (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // DESCRIPTION: 16 | // Refresh module, data I/O, caching, retrieval of graphics 17 | // by name. 18 | // 19 | 20 | 21 | #ifndef __R_DATA__ 22 | #define __R_DATA__ 23 | 24 | #include "r_defs.h" 25 | #include "r_state.h" 26 | #include "p_spec.h" // villsa [STRIFE] 27 | 28 | 29 | extern int numflats; 30 | 31 | 32 | // Retrieve column data for span blitting. 33 | byte* 34 | R_GetColumn 35 | ( int tex, 36 | int col ); 37 | 38 | 39 | // I/O, setting up the stuff. 40 | void R_InitData (void); 41 | void R_PrecacheLevel (void); 42 | 43 | 44 | // Retrieval. 45 | // Floor/ceiling opaque texture tiles, 46 | // lookup by name. For animation? 47 | int R_FlatNumForName(const char *name); 48 | 49 | 50 | // Called by P_Ticker for switches and animations, 51 | // returns the texture number for the texture name. 52 | int R_TextureNumForName (const char *name); 53 | int R_CheckTextureNumForName (const char *name); 54 | void R_SoundNumForDoor(vldoor_t* door); // villsa [STRIFE] 55 | 56 | #endif 57 | -------------------------------------------------------------------------------- /pkg/osx/IWADController.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 2005-2014 Simon Howard 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | 15 | #ifndef LAUNCHER_IWADCONTROLLER_H 16 | #define LAUNCHER_IWADCONTROLLER_H 17 | 18 | #include 19 | #include 20 | 21 | @interface IWADController : NSObject 22 | { 23 | id iwadSelector; 24 | id configWindow; 25 | 26 | id chex; 27 | id doom1; 28 | id doom2; 29 | id plutonia; 30 | id tnt; 31 | id freedoom1; 32 | id freedoom2; 33 | id freedm; 34 | 35 | id heretic; 36 | id hexen; 37 | id strife; 38 | } 39 | 40 | - (void) closeConfigWindow: (id)sender; 41 | - (void) openConfigWindow: (id)sender; 42 | - (NSString *) getIWADLocation; 43 | - (NSString *) autoloadPath; 44 | - (void) awakeFromNib; 45 | - (BOOL) setDropdownList; 46 | - (void) setDropdownSelection; 47 | - (void) saveConfig; 48 | - (char *) doomWadPath; 49 | - (void) setEnvironment; 50 | - (const char *) getGameName; 51 | - (BOOL) addIWADPath: (NSString *) path; 52 | - (BOOL) selectGameByName: (const char *) name; 53 | 54 | @end 55 | 56 | #endif /* #ifndef LAUNCHER_IWADCONTROLLER_H */ 57 | 58 | -------------------------------------------------------------------------------- /pkg/osx/LauncherManager.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 2005-2014 Simon Howard 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | 15 | #ifndef LAUNCHER_LAUNCHERMANAGER_H 16 | #define LAUNCHER_LAUNCHERMANAGER_H 17 | 18 | #include 19 | #include 20 | #include "IWADController.h" 21 | 22 | @interface LauncherManager : NSObject 23 | { 24 | IWADController *iwadController; 25 | 26 | id launcherWindow; 27 | id launchButton; 28 | 29 | id commandLineArguments; 30 | } 31 | 32 | - (void) launch: (id)sender; 33 | - (void) runSetup: (id)sender; 34 | - (void) awakeFromNib; 35 | - (void) clearCommandLine; 36 | - (BOOL) addIWADPath: (NSString *) path; 37 | - (void) addFileToCommandLine: (NSString *) fileName 38 | forArgument: (NSString *) args; 39 | - (BOOL) selectGameByName: (const char *) name; 40 | - (void) openTerminal: (id) sender; 41 | 42 | - (void) openREADME: (id) sender; 43 | - (void) openINSTALL: (id) sender; 44 | - (void) openCMDLINE: (id) sender; 45 | - (void) openCOPYING: (id) sender; 46 | - (void) openDocumentation: (id) sender; 47 | 48 | @end 49 | 50 | #endif /* #ifndef LAUNCHER_LAUNCHERMANAGER_H */ 51 | 52 | -------------------------------------------------------------------------------- /textscreen/fonts/README: -------------------------------------------------------------------------------- 1 | 2 | This directory contains the fonts used by libtextscreen: 3 | 4 | * normal.png is the standard DOS font, from the DOSbox project. 5 | Copyright (C) 2002-2004 The DOSBox Team 6 | 7 | * small.png contains a miniature, half-size font for low-resolution 8 | displays. This is based on the Atari-Small font by Tom Fine. The 9 | original font was standard ASCII only; this has been extended to the 10 | full Extended ASCII range with scaled-down versions of the full-size 11 | DOS font. Original copyright notice: 12 | 13 | Copyright (c) 1999, Thomas A. Fine 14 | 15 | License to copy, modify, and distribute for both commercial and 16 | non-commercial use is herby granted, provided this notice 17 | is preserved. 18 | 19 | Email to my last name at head.cfa.harvard.edu 20 | http://hea-www.harvard.edu/~fine/ 21 | 22 | * large.png is a scaled-up version of normal.png with extra detail 23 | added; this is for use on modern high-resolution ("retina") displays. 24 | 25 | All modifications and enhancements to the above fonts are: 26 | 27 | Copyright (C) 2005-2016 Simon Howard 28 | 29 | This program is free software; you can redistribute it and/or modify 30 | it under the terms of the GNU General Public License as published by 31 | the Free Software Foundation; either version 2 of the License, or 32 | (at your option) any later version. 33 | 34 | This program is distributed in the hope that it will be useful, 35 | but WITHOUT ANY WARRANTY; without even the implied warranty of 36 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 37 | GNU General Public License for more details. 38 | 39 | -------------------------------------------------------------------------------- /src/m_config.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License 7 | // as published by the Free Software Foundation; either version 2 8 | // of the License, or (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // DESCRIPTION: 16 | // Configuration file interface. 17 | // 18 | 19 | 20 | #ifndef __M_CONFIG__ 21 | #define __M_CONFIG__ 22 | 23 | #include "doomtype.h" 24 | 25 | void M_LoadDefaults(void); 26 | void M_SaveDefaults(void); 27 | void M_SaveDefaultsAlternate(const char *main, const char *extra); 28 | void M_SetConfigDir(const char *dir); 29 | void M_SetMusicPackDir(void); 30 | void M_BindIntVariable(const char *name, int *variable); 31 | void M_BindFloatVariable(const char *name, float *variable); 32 | void M_BindStringVariable(const char *name, char **variable); 33 | boolean M_SetVariable(const char *name, const char *value); 34 | int M_GetIntVariable(const char *name); 35 | const char *M_GetStringVariable(const char *name); 36 | float M_GetFloatVariable(const char *name); 37 | void M_SetConfigFilenames(const char *main_config, const char *extra_config); 38 | char *M_GetSaveGameDir(const char *iwadname); 39 | char *M_GetAutoloadDir(const char *iwadname); 40 | 41 | extern const char *configdir; 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /src/v_patch.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License 7 | // as published by the Free Software Foundation; either version 2 8 | // of the License, or (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // DESCRIPTION: 16 | // Refresh/rendering module, shared data struct definitions. 17 | // 18 | 19 | 20 | #ifndef V_PATCH_H 21 | #define V_PATCH_H 22 | 23 | // Patches. 24 | // A patch holds one or more columns. 25 | // Patches are used for sprites and all masked pictures, 26 | // and we compose textures from the TEXTURE1/2 lists 27 | // of patches. 28 | 29 | typedef PACKED_STRUCT ( 30 | { 31 | short width; // bounding box size 32 | short height; 33 | short leftoffset; // pixels to the left of origin 34 | short topoffset; // pixels below the origin 35 | int columnofs[8]; // only [width] used 36 | // the [0] is &columnofs[width] 37 | }) patch_t; 38 | 39 | // posts are runs of non masked source pixels 40 | typedef PACKED_STRUCT ( 41 | { 42 | byte topdelta; // -1 is the last post in a column 43 | byte length; // length data bytes follows 44 | }) post_t; 45 | 46 | // column_t is a list of 0 or more post_t, (byte)-1 terminated 47 | typedef post_t column_t; 48 | 49 | #endif 50 | 51 | -------------------------------------------------------------------------------- /textscreen/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | AM_CFLAGS = -I$(top_srcdir)/src 3 | 4 | CTAGS_ARGS=-I TXT_UNCAST_ARG+ 5 | 6 | # build this directory before the examples directory. 7 | 8 | SUBDIRS = fonts . examples 9 | 10 | noinst_LIBRARIES=libtextscreen.a 11 | 12 | EXTRA_DIST=CMakeLists.txt Doxyfile 13 | 14 | libtextscreen_a_SOURCES = \ 15 | textscreen.h \ 16 | txt_conditional.c txt_conditional.h \ 17 | txt_checkbox.c txt_checkbox.h \ 18 | txt_desktop.c txt_desktop.h \ 19 | txt_dropdown.c txt_dropdown.h \ 20 | txt_fileselect.c txt_fileselect.h \ 21 | txt_gui.c txt_gui.h \ 22 | txt_inputbox.c txt_inputbox.h \ 23 | txt_io.c txt_io.h \ 24 | txt_main.h \ 25 | txt_button.c txt_button.h \ 26 | txt_label.c txt_label.h \ 27 | txt_radiobutton.c txt_radiobutton.h \ 28 | txt_scrollpane.c txt_scrollpane.h \ 29 | txt_separator.c txt_separator.h \ 30 | txt_spinctrl.c txt_spinctrl.h \ 31 | txt_sdl.c txt_sdl.h \ 32 | txt_strut.c txt_strut.h \ 33 | txt_table.c txt_table.h \ 34 | txt_utf8.c txt_utf8.h \ 35 | txt_widget.c txt_widget.h \ 36 | txt_window.c txt_window.h \ 37 | txt_window_action.c txt_window_action.h 38 | 39 | doc: 40 | doxygen 41 | 42 | -------------------------------------------------------------------------------- /man/doom.template: -------------------------------------------------------------------------------- 1 | .TH @PROGRAM_SPREFIX@\-doom 6 2 | .SH NAME 3 | @PROGRAM_SPREFIX@\-doom \- historically compatible Doom engine 4 | .SH SYNOPSIS 5 | .B @PROGRAM_SPREFIX@\-doom 6 | [\fIOPTIONS\fR] 7 | .SH DESCRIPTION 8 | .PP 9 | @PACKAGE_SHORTNAME@ Doom is a port of Id Software's 1993 game "Doom" that is designed 10 | to behave as similar to the original DOS version of Doom as is possible. 11 | .br 12 | @content 13 | .SH IWAD SEARCH PATHS 14 | @include iwad_paths.man 15 | .SH ENVIRONMENT 16 | This section describes environment variables that control @PACKAGE_NAME@'s 17 | behavior. 18 | @include environ.man 19 | .SH FILES 20 | .TP 21 | \fB$HOME/.local/share/@PROGRAM_SPREFIX@\-doom/default.cfg\fR 22 | The main configuration file for @PACKAGE_NAME@. See \fBdefault.cfg\fR(5). 23 | .TP 24 | \fB$HOME/.local/share/@PROGRAM_SPREFIX@\-doom/@PROGRAM_SPREFIX@\-doom.cfg\fR 25 | Extra configuration values that are specific to @PACKAGE_NAME@ and not 26 | present in Vanilla Doom. See \fB@PROGRAM_SPREFIX@\-doom.cfg\fR(5). 27 | .SH SEE ALSO 28 | \fB@PROGRAM_SPREFIX@\-server\fR(6), 29 | \fB@PROGRAM_SPREFIX@\-setup\fR(6), 30 | \fB@PROGRAM_SPREFIX@\-heretic\fR(6), 31 | \fB@PROGRAM_SPREFIX@\-hexen\fR(6), 32 | \fB@PROGRAM_SPREFIX@\-strife\fR(6) 33 | .SH AUTHOR 34 | Chocolate Doom is written and maintained by Simon Howard. It is based on 35 | the LinuxDoom source code, released by Id Software. 36 | .SH COPYRIGHT 37 | Copyright \(co id Software Inc. 38 | Copyright \(co 2005-2016 Simon Howard. 39 | .br 40 | This is free software. You may redistribute copies of it under the terms of 41 | the GNU General Public License . 42 | There is NO WARRANTY, to the extent permitted by law. 43 | 44 | -------------------------------------------------------------------------------- /src/d_event.c: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License 7 | // as published by the Free Software Foundation; either version 2 8 | // of the License, or (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // 16 | // DESCRIPTION: Event handling. 17 | // 18 | // Events are asynchronous inputs generally generated by the game user. 19 | // Events can be discarded if no responder claims them 20 | // 21 | 22 | #include 23 | #include "d_event.h" 24 | 25 | #define MAXEVENTS 64 26 | 27 | static event_t events[MAXEVENTS]; 28 | static int eventhead; 29 | static int eventtail; 30 | 31 | // 32 | // D_PostEvent 33 | // Called by the I/O functions when input is detected 34 | // 35 | void D_PostEvent (event_t* ev) 36 | { 37 | events[eventhead] = *ev; 38 | eventhead = (eventhead + 1) % MAXEVENTS; 39 | } 40 | 41 | // Read an event from the queue. 42 | 43 | event_t *D_PopEvent(void) 44 | { 45 | event_t *result; 46 | 47 | // No more events waiting. 48 | 49 | if (eventtail == eventhead) 50 | { 51 | return NULL; 52 | } 53 | 54 | result = &events[eventtail]; 55 | 56 | // Advance to the next event in the queue. 57 | 58 | eventtail = (eventtail + 1) % MAXEVENTS; 59 | 60 | return result; 61 | } 62 | 63 | 64 | -------------------------------------------------------------------------------- /src/deh_main.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 2005-2014 Simon Howard 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // 15 | // Dehacked entrypoint and common code 16 | // 17 | 18 | #ifndef DEH_MAIN_H 19 | #define DEH_MAIN_H 20 | 21 | #include "doomtype.h" 22 | #include "deh_str.h" 23 | #include "sha1.h" 24 | 25 | // These are the limits that dehacked uses (from dheinit.h in the dehacked 26 | // source). If these limits are exceeded, it does not generate an error, but 27 | // a warning is displayed. 28 | 29 | #define DEH_VANILLA_NUMSTATES 966 30 | #define DEH_VANILLA_NUMSFX 107 31 | 32 | void DEH_ParseCommandLine(void); 33 | int DEH_LoadFile(const char *filename); 34 | void DEH_AutoLoadPatches(const char *path); 35 | int DEH_LoadLump(int lumpnum, boolean allow_long, boolean allow_error); 36 | int DEH_LoadLumpByName(const char *name, boolean allow_long, boolean allow_error); 37 | 38 | boolean DEH_ParseAssignment(char *line, char **variable_name, char **value); 39 | 40 | void DEH_Checksum(sha1_digest_t digest); 41 | 42 | extern boolean deh_allow_extended_strings; 43 | extern boolean deh_allow_long_strings; 44 | extern boolean deh_allow_long_cheats; 45 | extern boolean deh_apply_cheats; 46 | 47 | #endif /* #ifndef DEH_MAIN_H */ 48 | 49 | -------------------------------------------------------------------------------- /src/setup/compatibility.c: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 2005-2014 Simon Howard 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | 15 | // Sound control menu 16 | 17 | #include 18 | 19 | #include "m_config.h" 20 | #include "textscreen.h" 21 | #include "mode.h" 22 | 23 | #include "compatibility.h" 24 | 25 | #define WINDOW_HELP_URL "https://www.chocolate-doom.org/setup-compat" 26 | 27 | int vanilla_savegame_limit = 1; 28 | int vanilla_demo_limit = 1; 29 | 30 | void CompatibilitySettings(TXT_UNCAST_ARG(widget), void *user_data) 31 | { 32 | txt_window_t *window; 33 | 34 | window = TXT_NewWindow("Compatibility"); 35 | 36 | TXT_SetWindowHelpURL(window, WINDOW_HELP_URL); 37 | 38 | TXT_AddWidgets(window, 39 | TXT_NewCheckBox("Vanilla savegame limit", 40 | &vanilla_savegame_limit), 41 | TXT_NewCheckBox("Vanilla demo limit", 42 | &vanilla_demo_limit), 43 | NULL); 44 | } 45 | 46 | void BindCompatibilityVariables(void) 47 | { 48 | M_BindIntVariable("vanilla_savegame_limit", &vanilla_savegame_limit); 49 | M_BindIntVariable("vanilla_demo_limit", &vanilla_demo_limit); 50 | } 51 | 52 | -------------------------------------------------------------------------------- /pcsound/pcsound_internal.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 2005-2014 Simon Howard 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // DESCRIPTION: 15 | // PC speaker interface. 16 | // 17 | 18 | #ifndef PCSOUND_INTERNAL_H 19 | #define PCSOUND_INTERNAL_H 20 | 21 | #include "pcsound.h" 22 | 23 | #ifdef HAVE_DEV_ISA_SPKRIO_H 24 | #define HAVE_BSD_SPEAKER 25 | #endif 26 | #ifdef HAVE_DEV_SPEAKER_SPEAKER_H 27 | #define HAVE_BSD_SPEAKER 28 | #endif 29 | 30 | #define PCSOUND_8253_FREQUENCY 1193280 31 | 32 | typedef struct pcsound_driver_s pcsound_driver_t; 33 | typedef int (*pcsound_init_func)(pcsound_callback_func callback); 34 | typedef void (*pcsound_shutdown_func)(void); 35 | 36 | struct pcsound_driver_s 37 | { 38 | const char *name; 39 | pcsound_init_func init_func; 40 | pcsound_shutdown_func shutdown_func; 41 | }; 42 | 43 | extern int pcsound_sample_rate; 44 | 45 | 46 | #ifdef _WIN32 47 | extern pcsound_driver_t pcsound_win32_driver; 48 | #endif 49 | 50 | #ifdef HAVE_BSD_SPEAKER 51 | extern pcsound_driver_t pcsound_bsd_driver; 52 | #endif 53 | 54 | #ifdef HAVE_LINUX_KD_H 55 | extern pcsound_driver_t pcsound_linux_driver; 56 | #endif 57 | 58 | extern pcsound_driver_t pcsound_sdl_driver; 59 | 60 | 61 | #endif /* #ifndef PCSOUND_INTERNAL_H */ 62 | 63 | -------------------------------------------------------------------------------- /man/hexen.template: -------------------------------------------------------------------------------- 1 | .TH @PROGRAM_SPREFIX@\-hexen 6 2 | .SH NAME 3 | @PROGRAM_SPREFIX@\-hexen \- historically compatible Hexen engine 4 | .SH SYNOPSIS 5 | .B @PROGRAM_SPREFIX@\-hexen 6 | [\fIOPTIONS\fR] 7 | .SH DESCRIPTION 8 | .PP 9 | @PACKAGE_SHORTNAME@ Hexen is a port of Raven Software's 1995 game "Hexen" that 10 | aims to behave as similar to the original DOS version of Hexen as 11 | possible. 12 | .br 13 | @content 14 | .SH IWAD SEARCH PATHS 15 | @include iwad_paths.man 16 | .SH ENVIRONMENT 17 | This section describes environment variables that control @PACKAGE_SHORTNAME@ Hexen's 18 | behavior. 19 | @include environ.man 20 | .SH FILES 21 | .TP 22 | \fB$HOME/.local/share/@PROGRAM_SPREFIX@\-doom/hexen.cfg\fR 23 | The main configuration file for @PACKAGE_SHORTNAME@ Hexen. See \fBhexen.cfg\fR(5). 24 | .TP 25 | \fB$HOME/.local/share/@PROGRAM_SPREFIX@\-doom/@PROGRAM_SPREFIX@\-hexen.cfg\fR 26 | Extra configuration values that are specific to @PACKAGE_SHORTNAME@ Hexen and not 27 | present in Vanilla Hexen. See \fB@PROGRAM_SPREFIX@\-hexen.cfg\fR(5). 28 | .SH SEE ALSO 29 | \fB@PROGRAM_SPREFIX@\-doom\fR(6), 30 | \fB@PROGRAM_SPREFIX@\-heretic\fR(6), 31 | \fB@PROGRAM_SPREFIX@\-server\fR(6), 32 | \fB@PROGRAM_SPREFIX@\-setup\fR(6) 33 | .SH AUTHOR 34 | Chocolate Hexen is part of the Chocolate Doom project, written and 35 | maintained by Simon Howard. It is based on the Hexen source code, 36 | released by Raven Software. 37 | .SH COPYRIGHT 38 | Copyright \(co id Software Inc. 39 | Copyright \(co Raven Software Inc. 40 | Copyright \(co 2005-2013 Simon Howard. 41 | .br 42 | This is free software. You may redistribute copies of it under the terms of 43 | the GNU General Public License . 44 | There is NO WARRANTY, to the extent permitted by law. 45 | 46 | -------------------------------------------------------------------------------- /src/net_packet.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 2005-2014 Simon Howard 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // DESCRIPTION: 15 | // Definitions for use in networking code. 16 | // 17 | 18 | #ifndef NET_PACKET_H 19 | #define NET_PACKET_H 20 | 21 | #include "net_defs.h" 22 | 23 | net_packet_t *NET_NewPacket(int initial_size); 24 | net_packet_t *NET_PacketDup(net_packet_t *packet); 25 | void NET_FreePacket(net_packet_t *packet); 26 | 27 | boolean NET_ReadInt8(net_packet_t *packet, unsigned int *data); 28 | boolean NET_ReadInt16(net_packet_t *packet, unsigned int *data); 29 | boolean NET_ReadInt32(net_packet_t *packet, unsigned int *data); 30 | 31 | boolean NET_ReadSInt8(net_packet_t *packet, signed int *data); 32 | boolean NET_ReadSInt16(net_packet_t *packet, signed int *data); 33 | boolean NET_ReadSInt32(net_packet_t *packet, signed int *data); 34 | 35 | char *NET_ReadString(net_packet_t *packet); 36 | char *NET_ReadSafeString(net_packet_t *packet); 37 | 38 | void NET_WriteInt8(net_packet_t *packet, unsigned int i); 39 | void NET_WriteInt16(net_packet_t *packet, unsigned int i); 40 | void NET_WriteInt32(net_packet_t *packet, unsigned int i); 41 | 42 | void NET_WriteString(net_packet_t *packet, const char *string); 43 | 44 | #endif /* #ifndef NET_PACKET_H */ 45 | 46 | -------------------------------------------------------------------------------- /src/doom/r_plane.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License 7 | // as published by the Free Software Foundation; either version 2 8 | // of the License, or (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // DESCRIPTION: 16 | // Refresh, visplane stuff (floor, ceilings). 17 | // 18 | 19 | 20 | #ifndef __R_PLANE__ 21 | #define __R_PLANE__ 22 | 23 | 24 | #include "r_data.h" 25 | 26 | 27 | 28 | // Visplane related. 29 | extern short* lastopening; 30 | 31 | 32 | typedef void (*planefunction_t) (int top, int bottom); 33 | 34 | extern planefunction_t floorfunc; 35 | extern planefunction_t ceilingfunc_t; 36 | 37 | extern short floorclip[SCREENWIDTH]; 38 | extern short ceilingclip[SCREENWIDTH]; 39 | 40 | extern fixed_t yslope[SCREENHEIGHT]; 41 | extern fixed_t distscale[SCREENWIDTH]; 42 | 43 | void R_InitPlanes (void); 44 | void R_ClearPlanes (void); 45 | 46 | void 47 | R_MapPlane 48 | ( int y, 49 | int x1, 50 | int x2 ); 51 | 52 | void 53 | R_MakeSpans 54 | ( int x, 55 | int t1, 56 | int b1, 57 | int t2, 58 | int b2 ); 59 | 60 | void R_DrawPlanes (void); 61 | 62 | visplane_t* 63 | R_FindPlane 64 | ( fixed_t height, 65 | int picnum, 66 | int lightlevel ); 67 | 68 | visplane_t* 69 | R_CheckPlane 70 | ( visplane_t* pl, 71 | int start, 72 | int stop ); 73 | 74 | 75 | 76 | #endif 77 | -------------------------------------------------------------------------------- /src/strife/m_saves.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2010 James Haley, Samuel Villareal 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License 7 | // as published by the Free Software Foundation; either version 2 8 | // of the License, or (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // DESCRIPTION: 16 | // 17 | // [STRIFE] New Module 18 | // 19 | // Strife Hub Saving Code 20 | // 21 | 22 | #ifndef M_SAVES_H__ 23 | #define M_SAVES_H__ 24 | 25 | #define CHARACTER_NAME_LEN 32 26 | 27 | extern char *savepath; 28 | extern char *savepathtemp; 29 | extern char *loadpath; 30 | extern char character_name[CHARACTER_NAME_LEN]; 31 | 32 | // Strife Savegame Functions 33 | void ClearTmp(void); 34 | void ClearSlot(void); 35 | void FromCurr(void); 36 | void ToCurr(void); 37 | void M_SaveMoveMapToHere(void); 38 | void M_SaveMoveHereToMap(void); 39 | 40 | boolean M_SaveMisObj(const char *path); 41 | void M_ReadMisObj(void); 42 | 43 | // Custom Utilities for Filepath Handling 44 | void *M_Calloc(size_t n1, size_t n2); 45 | int M_StringAlloc(char **str, int numstrs, size_t extra, const char *str1, ...); 46 | char *M_SafeFilePath(const char *basepath, const char *newcomponent); 47 | char M_GetFilePath(const char *fn, char *dest, size_t len); 48 | char *M_MakeStrifeSaveDir(int slotnum, const char *extra); 49 | void M_CreateSaveDirs(const char *savedir); 50 | 51 | #endif 52 | 53 | // EOF 54 | 55 | 56 | -------------------------------------------------------------------------------- /src/strife/r_plane.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License 7 | // as published by the Free Software Foundation; either version 2 8 | // of the License, or (at your option) any later version. 9 | // 10 | // This program is distributed in the hope that it will be useful, 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | // GNU General Public License for more details. 14 | // 15 | // DESCRIPTION: 16 | // Refresh, visplane stuff (floor, ceilings). 17 | // 18 | 19 | 20 | #ifndef __R_PLANE__ 21 | #define __R_PLANE__ 22 | 23 | 24 | #include "r_data.h" 25 | 26 | 27 | 28 | // Visplane related. 29 | extern short* lastopening; 30 | 31 | 32 | typedef void (*planefunction_t) (int top, int bottom); 33 | 34 | extern planefunction_t floorfunc; 35 | extern planefunction_t ceilingfunc_t; 36 | 37 | extern short floorclip[SCREENWIDTH]; 38 | extern short ceilingclip[SCREENWIDTH]; 39 | 40 | extern fixed_t yslope[SCREENHEIGHT]; 41 | extern fixed_t distscale[SCREENWIDTH]; 42 | 43 | void R_InitPlanes (void); 44 | void R_ClearPlanes (void); 45 | 46 | void 47 | R_MapPlane 48 | ( int y, 49 | int x1, 50 | int x2 ); 51 | 52 | void 53 | R_MakeSpans 54 | ( int x, 55 | int t1, 56 | int b1, 57 | int t2, 58 | int b2 ); 59 | 60 | void R_DrawPlanes (void); 61 | 62 | visplane_t* 63 | R_FindPlane 64 | ( fixed_t height, 65 | int picnum, 66 | int lightlevel ); 67 | 68 | visplane_t* 69 | R_CheckPlane 70 | ( visplane_t* pl, 71 | int start, 72 | int stop ); 73 | 74 | 75 | 76 | #endif 77 | -------------------------------------------------------------------------------- /src/net_query.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 2005-2014 Simon Howard 3 | // 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU General Public License 6 | // as published by the Free Software Foundation; either version 2 7 | // of the License, or (at your option) any later version. 8 | // 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | // GNU General Public License for more details. 13 | // 14 | // DESCRIPTION: 15 | // Querying servers to find their current status. 16 | // 17 | 18 | #ifndef NET_QUERY_H 19 | #define NET_QUERY_H 20 | 21 | #include "net_defs.h" 22 | 23 | typedef void (*net_query_callback_t)(net_addr_t *addr, 24 | net_querydata_t *querydata, 25 | unsigned int ping_time, 26 | void *user_data); 27 | 28 | extern int NET_StartLANQuery(void); 29 | extern int NET_StartMasterQuery(void); 30 | 31 | extern void NET_LANQuery(void); 32 | extern void NET_MasterQuery(void); 33 | extern void NET_QueryAddress(const char *addr); 34 | extern net_addr_t *NET_FindLANServer(void); 35 | 36 | extern int NET_Query_Poll(net_query_callback_t callback, void *user_data); 37 | 38 | extern net_addr_t *NET_Query_ResolveMaster(net_context_t *context); 39 | extern void NET_Query_AddToMaster(net_addr_t *master_addr); 40 | extern boolean NET_Query_CheckAddedToMaster(boolean *result); 41 | extern void NET_Query_AddResponse(net_packet_t *packet); 42 | extern void NET_RequestHolePunch(net_context_t *context, net_addr_t *addr); 43 | 44 | #endif /* #ifndef NET_QUERY_H */ 45 | 46 | --------------------------------------------------------------------------------