├── pkg ├── osx │ ├── PkgInfo │ ├── .gitignore │ ├── Resources │ │ ├── app.png │ │ ├── app.icns │ │ ├── 128x128.png │ │ ├── wadfile.icns │ │ ├── wadfile.png │ │ └── launcher.nib │ │ │ └── keyedobjects.nib │ ├── disk │ │ ├── dir.DS_Store │ │ └── background.png │ ├── main.m │ ├── Execute.h │ ├── AppController.h │ ├── IWADController.h │ └── LauncherManager.h ├── win32 │ ├── .gitignore │ └── README ├── .gitignore └── config.make.in ├── autogen.sh ├── data ├── .gitignore ├── doom.ico ├── doom.png ├── doom8.ico ├── setup.ico ├── setup.png ├── setup8.ico ├── Makefile.am └── README ├── src ├── doom │ ├── .gitignore │ ├── statdump.h │ ├── p_inter.h │ ├── deh_bexpars.h │ ├── doomdef.c │ ├── r_segs.h │ ├── r_swirl.h │ ├── p_tick.h │ ├── d_textur.h │ ├── f_finale.h │ ├── dstrings.h │ ├── r_sky.h │ ├── doomstat.c │ ├── d_items.h │ ├── p_setup.h │ ├── r_bmaps.h │ ├── d_main.h │ ├── m_random.h │ ├── p_extsaveg.h │ ├── r_local.h │ ├── wi_stuff.h │ ├── s_musinfo.h │ ├── f_wipe.h │ ├── am_map.h │ ├── p_extnodes.h │ ├── hu_stuff.h │ ├── r_bsp.h │ ├── r_data.h │ ├── m_menu.h │ └── r_sky.c ├── hexen │ ├── .gitignore │ ├── ct_chat.h │ ├── m_random.h │ └── st_start.h ├── strife │ ├── .gitignore │ ├── doomdef.c │ ├── r_segs.h │ ├── p_tick.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 │ ├── r_local.h │ ├── am_map.h │ ├── f_wipe.h │ ├── wi_stuff.h │ ├── r_sky.c │ ├── d_main.h │ ├── r_data.h │ ├── r_bsp.h │ ├── r_plane.h │ └── d_think.h ├── heretic │ ├── .gitignore │ ├── ct_chat.h │ ├── m_random.h │ ├── s_sound.h │ └── deh_htic.h ├── setup │ ├── .gitignore │ ├── Setup.desktop.in │ ├── mouse.h │ ├── CMakeLists.txt │ ├── joystick.h │ ├── keyboard.h │ ├── sound.h │ ├── compatibility.h │ ├── display.h │ ├── mode.h │ ├── multiplayer.h │ ├── txt_keyinput.h │ ├── txt_mouseinput.h │ ├── txt_joybinput.h │ ├── execute.h │ └── Makefile.am ├── Doom.desktop.in ├── Hexen.desktop.in ├── Strife.desktop.in ├── Heretic.desktop.in ├── Doom_Screensaver.desktop.in ├── .gitignore ├── manifest.xml ├── net_petname.h ├── setup-res.rc.in ├── net_dedicated.h ├── resource.rc.in ├── net_sdl.h ├── gusconf.h ├── w_checksum.h ├── i_endoom.h ├── net_loop.h ├── net_gui.h ├── aes_prng.h ├── mus2mid.h ├── w_main.h ├── m_fixed.h ├── m_bbox.h ├── v_diskicon.h ├── i_timer.h ├── net_server.h ├── i_videohr.h ├── sha1.h ├── m_bbox.c ├── deh_io.h ├── memio.h ├── d_dedicated.c ├── i_swap.h ├── i_midipipe.h ├── m_fixed.c ├── w_merge.h ├── m_argv.h ├── crispy.c ├── i_cdmus.h ├── deh_str.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 └── d_ticcmd.h ├── midiproc ├── .gitignore ├── Makefile.am ├── CMakeLists.txt └── proto.h ├── textscreen ├── .gitignore ├── fonts │ ├── large.png │ ├── normal.png │ ├── small.png │ ├── Makefile.am │ └── README ├── examples │ ├── .gitignore │ └── Makefile.am ├── txt_utf8.h ├── txt_io.h ├── CMakeLists.txt ├── textscreen.h ├── txt_strut.h ├── txt_gui.h ├── 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 └── heretic.template ├── opl ├── .gitignore ├── examples │ ├── .gitignore │ └── Makefile.am ├── CMakeLists.txt ├── Makefile.am ├── ioperm_sys.h ├── opl_timer.h └── opl_queue.h ├── pcsound ├── .gitignore ├── CMakeLists.txt ├── Makefile.am ├── pcsound_internal.h └── pcsound.h ├── .gitmodules ├── AUTHORS ├── cmake └── config.h.cin ├── .travis.yml ├── .github └── ISSUE_TEMPLATE.md ├── .travis.sh ├── .gitignore ├── .lvimrc └── TODO.md /pkg/osx/PkgInfo: -------------------------------------------------------------------------------- 1 | APPL???? 2 | -------------------------------------------------------------------------------- /pkg/win32/.gitignore: -------------------------------------------------------------------------------- 1 | staging-* 2 | *.zip 3 | -------------------------------------------------------------------------------- /pkg/.gitignore: -------------------------------------------------------------------------------- 1 | Makefile 2 | Makefile.in 3 | config.make 4 | -------------------------------------------------------------------------------- /autogen.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | autoreconf -fi 4 | ./configure "$@" 5 | -------------------------------------------------------------------------------- /data/.gitignore: -------------------------------------------------------------------------------- 1 | Makefile.in 2 | Makefile 3 | *-doom.png 4 | *-setup.png 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/lefticus/cpp-doom/HEAD/data/doom.ico -------------------------------------------------------------------------------- /data/doom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lefticus/cpp-doom/HEAD/data/doom.png -------------------------------------------------------------------------------- /data/doom8.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lefticus/cpp-doom/HEAD/data/doom8.ico -------------------------------------------------------------------------------- /data/setup.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lefticus/cpp-doom/HEAD/data/setup.ico -------------------------------------------------------------------------------- /data/setup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lefticus/cpp-doom/HEAD/data/setup.png -------------------------------------------------------------------------------- /data/setup8.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lefticus/cpp-doom/HEAD/data/setup8.ico -------------------------------------------------------------------------------- /midiproc/.gitignore: -------------------------------------------------------------------------------- 1 | Makefile.in 2 | Makefile 3 | *.exe 4 | .deps 5 | tags 6 | TAGS 7 | -------------------------------------------------------------------------------- /pkg/osx/.gitignore: -------------------------------------------------------------------------------- 1 | Info.plist 2 | launcher 3 | *.o 4 | *.d 5 | *.dmg 6 | staging 7 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /pkg/osx/Resources/app.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lefticus/cpp-doom/HEAD/pkg/osx/Resources/app.png -------------------------------------------------------------------------------- /pkg/osx/disk/dir.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lefticus/cpp-doom/HEAD/pkg/osx/disk/dir.DS_Store -------------------------------------------------------------------------------- /pcsound/.gitignore: -------------------------------------------------------------------------------- 1 | Makefile.in 2 | Makefile 3 | .deps 4 | libpcsound.a 5 | *.rc 6 | tags 7 | TAGS 8 | 9 | -------------------------------------------------------------------------------- /pkg/osx/Resources/app.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lefticus/cpp-doom/HEAD/pkg/osx/Resources/app.icns -------------------------------------------------------------------------------- /pkg/osx/disk/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lefticus/cpp-doom/HEAD/pkg/osx/disk/background.png -------------------------------------------------------------------------------- /textscreen/fonts/large.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lefticus/cpp-doom/HEAD/textscreen/fonts/large.png -------------------------------------------------------------------------------- /textscreen/fonts/normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lefticus/cpp-doom/HEAD/textscreen/fonts/normal.png -------------------------------------------------------------------------------- /textscreen/fonts/small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lefticus/cpp-doom/HEAD/textscreen/fonts/small.png -------------------------------------------------------------------------------- /pkg/osx/Resources/128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lefticus/cpp-doom/HEAD/pkg/osx/Resources/128x128.png -------------------------------------------------------------------------------- /pkg/osx/Resources/wadfile.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lefticus/cpp-doom/HEAD/pkg/osx/Resources/wadfile.icns -------------------------------------------------------------------------------- /pkg/osx/Resources/wadfile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lefticus/cpp-doom/HEAD/pkg/osx/Resources/wadfile.png -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "quickcheck"] 2 | path = quickcheck 3 | url = https://github.com/chocolate-doom/quickcheck.git 4 | -------------------------------------------------------------------------------- /textscreen/examples/.gitignore: -------------------------------------------------------------------------------- 1 | Makefile.in 2 | Makefile 3 | .deps 4 | guitest 5 | calculator 6 | *.exe 7 | tags 8 | TAGS 9 | -------------------------------------------------------------------------------- /pkg/osx/Resources/launcher.nib/keyedobjects.nib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lefticus/cpp-doom/HEAD/pkg/osx/Resources/launcher.nib/keyedobjects.nib -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | Simon Howard 2 | James Haley 3 | Samuel Villarreal 4 | Fabian Greffrath 5 | Jonathan Dowland 6 | Alexey Khokholov 7 | -------------------------------------------------------------------------------- /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@doom 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@doom 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@doom 5 | Type=Application 6 | Comment=@PACKAGE_SHORTDESC@ 7 | Categories=Game;ActionGame; 8 | Keywords=first;person;shooter;doom;vanilla; 9 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /midiproc/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | AM_CFLAGS=-I$(top_srcdir)/src @SDLMIXER_CFLAGS@ 3 | 4 | EXTRA_DIST=CMakeLists.txt 5 | 6 | if HAVE_WINDRES 7 | 8 | noinst_PROGRAMS = @PROGRAM_PREFIX@midiproc 9 | 10 | @PROGRAM_PREFIX@midiproc_LDADD = @SDLMIXER_LIBS@ 11 | @PROGRAM_PREFIX@midiproc_SOURCES = buffer.c buffer.h main.c proto.h 12 | 13 | endif 14 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /midiproc/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | if(WIN32) 2 | add_executable("${PROGRAM_PREFIX}midiproc" WIN32 buffer.c buffer.h main.c proto.h) 3 | target_include_directories("${PROGRAM_PREFIX}midiproc" 4 | PRIVATE "../src/" "${CMAKE_CURRENT_BINARY_DIR}/../") 5 | target_link_libraries("${PROGRAM_PREFIX}midiproc" SDL2::SDL2main SDL2::mixer) 6 | endif() 7 | -------------------------------------------------------------------------------- /src/.gitignore: -------------------------------------------------------------------------------- 1 | Makefile 2 | Makefile.in 3 | .deps 4 | *.rc 5 | crispy-doom 6 | crispy-heretic 7 | crispy-hexen 8 | crispy-server 9 | crispy-strife 10 | crispy-doom-setup 11 | crispy-heretic-setup 12 | crispy-hexen-setup 13 | crispy-strife-setup 14 | crispy-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_LIBSAMPLERATE 8 | #cmakedefine HAVE_LIBPNG 9 | #cmakedefine HAVE_DIRENT_H 10 | #cmakedefine01 HAVE_DECL_STRCASECMP 11 | #cmakedefine01 HAVE_DECL_STRNCASECMP 12 | -------------------------------------------------------------------------------- /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 | target_link_libraries(pcsound SDL2::mixer) 12 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: c 2 | 3 | compiler: gcc 4 | 5 | sudo: required 6 | dist: bionic 7 | 8 | env: 9 | - ANALYZE=false 10 | - ANALYZE=true 11 | 12 | addons: 13 | apt: 14 | packages: 15 | - cppcheck 16 | - libpng-dev 17 | - libsdl2-dev 18 | - libsdl2-mixer-dev 19 | - libsdl2-net-dev 20 | - libsdl2-image-dev 21 | - libsamplerate0-dev 22 | 23 | script: ./.travis.sh 24 | 25 | branches: 26 | only: 27 | - master 28 | -------------------------------------------------------------------------------- /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_PYTHON 7 | 8 | small.h: small.png convert-font 9 | ./convert-font small small.png small.h 10 | 11 | normal.h: normal.png convert-font 12 | ./convert-font normal normal.png normal.h 13 | 14 | large.h: large.png convert-font 15 | ./convert-font large large.png large.h 16 | 17 | endif 18 | 19 | -------------------------------------------------------------------------------- /src/manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | true 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 5 | 6 | ### Background 7 | 8 | Version of Crispy Doom: 9 | 10 | Operating System and version: 11 | 12 | Game: (Doom/Heretic/Hexen/Strife/other) 13 | 14 | Any loaded WADs and mods (please include full command line): 15 | 16 | ### Bug description 17 | 18 | Observed behavior: 19 | 20 | Expected behavior: 21 | 22 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /.travis.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | if [ "$ANALYZE" = "true" ] ; then 3 | cppcheck --error-exitcode=1 -j2 -UTESTING -Iopl -Isrc -Isrc/setup opl pcsound src textscreen 2> stderr.txt 4 | RET=$? 5 | if [ -s stderr.txt ] 6 | then 7 | cat stderr.txt 8 | fi 9 | exit $RET 10 | else 11 | set -e 12 | ./autogen.sh --enable-werror 13 | make -j4 14 | make install DESTDIR=/tmp/whatever 15 | make dist 16 | PREFIX=`sed -n '/PROGRAM_PREFIX/p' ${PWD}/config.h | cut -d '"' -f 2` 17 | make -j4 -C quickcheck check SOURCE_PORT=$PWD/src/${PREFIX}doom 18 | fi 19 | -------------------------------------------------------------------------------- /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 | target_link_libraries(opl SDL2::mixer) 16 | -------------------------------------------------------------------------------- /data/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | EXTRA_DIST= \ 3 | README \ 4 | doom.ico \ 5 | doom8.ico \ 6 | doom.png \ 7 | setup.ico \ 8 | setup8.ico \ 9 | setup.png \ 10 | convert-icon 11 | 12 | iconsdir = $(prefix)/share/icons/hicolor/128x128/apps 13 | icons_DATA = @PROGRAM_PREFIX@doom.png \ 14 | @PROGRAM_PREFIX@setup.png 15 | 16 | @PROGRAM_PREFIX@doom.png : doom.png 17 | cp $(top_srcdir)/data/doom.png $@ 18 | 19 | @PROGRAM_PREFIX@setup.png : setup.png 20 | cp $(top_srcdir)/data/setup.png $@ 21 | 22 | CLEANFILES = $(icons_DATA) 23 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | # Documentation files to distribute with packages. 23 | 24 | DOC_FILES = README.md \ 25 | README.Music.md \ 26 | COPYING.md \ 27 | NEWS.md 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 | -------------------------------------------------------------------------------- /.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 | -------------------------------------------------------------------------------- /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/resource.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/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/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 | target_link_libraries(setup textscreen SDL2::SDL2 SDL2::mixer) 19 | -------------------------------------------------------------------------------- /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 | extern int joystick_index; 19 | 20 | void ConfigJoystick(void *widget, void *user_data); 21 | void BindJoystickVariables(void); 22 | 23 | #endif /* #ifndef SETUP_JOYSTICK_H */ 24 | 25 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | extern char *snd_dmxoption; 24 | 25 | #endif /* #ifndef SETUP_SOUND_H */ 26 | -------------------------------------------------------------------------------- /src/doom/deh_bexpars.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 2005-2014 Simon Howard 3 | // Copyright(C) 2014-2019 Fabian Greffrath 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 | // Parses [PARS] sections in BEX files 17 | // 18 | 19 | #ifndef DEH_BEXPARS_H 20 | #define DEH_BEXPARS_H 21 | 22 | extern int bex_pars[6][10]; 23 | extern int bex_cpars[32]; 24 | 25 | #endif /* #ifndef DEH_BEXPARS_H */ 26 | -------------------------------------------------------------------------------- /.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/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 | 25 | 26 | void 27 | R_RenderMaskedSegRange 28 | ( drawseg_t* ds, 29 | int x1, 30 | int x2 ); 31 | 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /src/doom/r_swirl.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2000, 2005-2014 Simon Howard 4 | // Copyright(C) 2019 Fabian Greffrath 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 | // DESCRIPTION: 17 | // [crispy] add support for SMMU swirling flats 18 | // 19 | 20 | #ifndef __R_SWIRL__ 21 | #define __R_SWIRL__ 22 | 23 | void R_InitDistortedFlats(); 24 | char *R_DistortedFlat(int flatnum); 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /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/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 | 25 | 26 | void 27 | R_RenderMaskedSegRange 28 | ( drawseg_t* ds, 29 | int x1, 30 | int x2 ); 31 | 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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/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 | -------------------------------------------------------------------------------- /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/setup/multiplayer.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_MULTIPLAYER_H 16 | #define SETUP_MULTIPLAYER_H 17 | 18 | void StartMultiGame(void *widget, void *user_data); 19 | void WarpMenu(void *widget, void *user_data); 20 | void JoinMultiGame(void *widget, void *user_data); 21 | void MultiplayerConfig(void *widget, void *user_data); 22 | 23 | void SetChatMacroDefaults(void); 24 | void SetPlayerNameDefault(void); 25 | 26 | void BindMultiplayerVariables(void); 27 | 28 | #endif /* #ifndef SETUP_MULTIPLAYER_H */ 29 | 30 | -------------------------------------------------------------------------------- /src/strife/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 | 28 | // Returns a number from 0 to 255, 29 | // from a lookup table. 30 | int M_Random (void); 31 | 32 | // As M_Random, but used only by the play simulation. 33 | int P_Random (void); 34 | 35 | // Fix randoms for demos. 36 | void M_ClearRandom (void); 37 | 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /src/strife/r_sky.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 | // Sky rendering. 17 | // 18 | 19 | 20 | #ifndef __R_SKY__ 21 | #define __R_SKY__ 22 | 23 | 24 | 25 | // SKY, store the number for name. 26 | #define SKYFLATNAME "F_SKY001" // villsa [STRIFE] 27 | 28 | // The sky map is 256*128*4 maps. 29 | #define ANGLETOSKYSHIFT 22 30 | 31 | extern int skytexture; 32 | extern int skytexturemid; 33 | 34 | // Called whenever the view size changes. 35 | void R_InitSkyMap (void); 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /src/doom/d_textur.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 | // Typedefs related to to textures etc., 17 | // isolated here to make it easier separating modules. 18 | // 19 | 20 | 21 | #ifndef __D_TEXTUR__ 22 | #define __D_TEXTUR__ 23 | 24 | #include "doomtype.h" 25 | 26 | 27 | 28 | 29 | // 30 | // Flats? 31 | // 32 | // a pic is an unmasked block of pixels 33 | typedef struct 34 | { 35 | byte width; 36 | byte height; 37 | byte data; 38 | } pic_t; 39 | 40 | 41 | 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /src/doom/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 | // Called by main loop. 37 | void F_Drawer (void); 38 | 39 | 40 | void F_StartFinale (void); 41 | 42 | 43 | 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /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 | int W_MergeDump (const char *file); 27 | int W_LumpDump (const char *lumpname); 28 | 29 | // Autoload all .wad files from the given directory: 30 | void W_AutoLoadWADs(const char *path); 31 | 32 | #endif /* #ifndef W_MAIN_H */ 33 | 34 | -------------------------------------------------------------------------------- /src/strife/d_textur.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 | // Typedefs related to to textures etc., 17 | // isolated here to make it easier separating modules. 18 | // 19 | 20 | 21 | #ifndef __D_TEXTUR__ 22 | #define __D_TEXTUR__ 23 | 24 | #include "doomtype.h" 25 | 26 | 27 | 28 | 29 | // 30 | // Flats? 31 | // 32 | // a pic is an unmasked block of pixels 33 | typedef struct 34 | { 35 | byte width; 36 | byte height; 37 | byte data; 38 | } pic_t; 39 | 40 | 41 | 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /src/strife/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_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/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_final2; 28 | GameVariant_t gamevariant = vanilla; 29 | const char *gamedescription; 30 | 31 | // Set if homebrew PWAD stuff has been added. 32 | boolean modifiedgame; 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /midiproc/proto.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 2017 Alex Mayfield 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 | // Headers for all types of midipipe messages. 16 | // 17 | 18 | #ifndef __PROTO__ 19 | #define __PROTO__ 20 | 21 | typedef enum { 22 | MIDIPIPE_PACKET_TYPE_REGISTER_SONG, 23 | MIDIPIPE_PACKET_TYPE__DEPRECATED_1, 24 | MIDIPIPE_PACKET_TYPE_SET_VOLUME, 25 | MIDIPIPE_PACKET_TYPE_PLAY_SONG, 26 | MIDIPIPE_PACKET_TYPE_STOP_SONG, 27 | MIDIPIPE_PACKET_TYPE_SHUTDOWN, 28 | MIDIPIPE_PACKET_TYPE_UNREGISTER_SONG, 29 | MIDIPIPE_PACKET_TYPE_ACK, 30 | } net_midipipe_packet_type_t; 31 | 32 | #endif 33 | 34 | -------------------------------------------------------------------------------- /src/doom/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 | #include "w_wad.h" 24 | 25 | 26 | extern lumpinfo_t *maplumpinfo; 27 | // [crispy] pointer to the map lump about to load 28 | extern lumpinfo_t *savemaplumpinfo; 29 | 30 | // NOT called by W_Ticker. Fixme. 31 | void 32 | P_SetupLevel 33 | ( int episode, 34 | int map, 35 | int playermask, 36 | skill_t skill); 37 | 38 | // Called by startup code. 39 | void P_Init (void); 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /src/doom/r_bmaps.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // Copyright(C) 2017 Fabian Greffrath 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 | // DESCRIPTION: 17 | // Brightmaps for wall textures 18 | // 19 | 20 | #ifndef __R_BMAPS__ 21 | #define __R_BMAPS__ 22 | 23 | #include "doomtype.h" 24 | 25 | extern void R_InitBrightmaps (); 26 | 27 | extern byte *(*R_BrightmapForTexName) (const char *texname); 28 | extern byte *(*R_BrightmapForSprite) (const int type); 29 | extern byte *(*R_BrightmapForFlatNum) (const int num); 30 | extern byte *(*R_BrightmapForState) (const int state); 31 | 32 | extern byte **texturebrightmap; 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /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/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 | #include "crispy.h" 23 | 24 | // Dimensions of the flashing "loading" disk icon 25 | 26 | #define LOADING_DISK_W (16 << crispy->hires) 27 | #define LOADING_DISK_H (16 << crispy->hires) 28 | 29 | extern void V_EnableLoadingDisk(const char *lump_name, int xoffs, int yoffs); 30 | extern void V_BeginRead(size_t nbytes); 31 | extern void V_DrawDiskIcon(void); 32 | extern void V_RestoreDiskBackground(void); 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /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/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 | 48 | 49 | #endif 50 | 51 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | #define PCSOUND_8253_FREQUENCY 1193280 24 | 25 | typedef struct pcsound_driver_s pcsound_driver_t; 26 | typedef int (*pcsound_init_func)(pcsound_callback_func callback); 27 | typedef void (*pcsound_shutdown_func)(void); 28 | 29 | struct pcsound_driver_s 30 | { 31 | const char *name; 32 | pcsound_init_func init_func; 33 | pcsound_shutdown_func shutdown_func; 34 | }; 35 | 36 | extern int pcsound_sample_rate; 37 | 38 | #endif /* #ifndef PCSOUND_INTERNAL_H */ 39 | 40 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -setmem) 31 | COMPREPLY=(dos622 dos71 dosbox) 32 | ;; 33 | esac 34 | 35 | if [[ $cur == -* ]]; then 36 | COMPREPLY=( $( compgen -W '@content' -- "$cur" ) ) 37 | fi 38 | } && 39 | 40 | complete -F _@PROGRAM_SPREFIX@_hexen @PROGRAM_PREFIX@hexen 41 | 42 | # ex: ts=4 sw=4 et filetype=sh 43 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | // [crispy] our own private random function 35 | int Crispy_Random (void); 36 | 37 | // Fix randoms for demos. 38 | void M_ClearRandom (void); 39 | 40 | // Defined version of P_Random() - P_Random() 41 | int P_SubRandom (void); 42 | int Crispy_SubRandom (void); 43 | 44 | #endif 45 | -------------------------------------------------------------------------------- /src/doom/p_extsaveg.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // Copyright(C) 2016 Fabian Greffrath 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 | // DESCRIPTION: 17 | // [crispy] Archiving: Extended SaveGame I/O. 18 | // 19 | 20 | #ifndef __P_EXTSAVEG__ 21 | #define __P_EXTSAVEG__ 22 | 23 | /* p_extsaveg.c */ 24 | extern char *savewadfilename; 25 | 26 | extern void P_WriteExtendedSaveGameData (void); 27 | extern void P_ReadExtendedSaveGameData (int pass); 28 | 29 | /* p_saveg.c */ 30 | extern uint32_t P_ThinkerToIndex (thinker_t* thinker); 31 | extern thinker_t* P_IndexToThinker (uint32_t index); 32 | 33 | /* m_menu.c */ 34 | extern void M_ForceLoadGame (void); 35 | extern void M_ConfirmDeleteGame (void); 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /man/extra.cfg.template: -------------------------------------------------------------------------------- 1 | .TH @PROGRAM_SPREFIX@\-doom.cfg 5 2 | .SH NAME 3 | @PROGRAM_SPREFIX@\-doom.cfg \- @PACKAGE_NAME@ configuration file 4 | .SH DESCRIPTION 5 | .PP 6 | \fI@PROGRAM_SPREFIX@\-doom.cfg\fR 7 | is a configuration file for \fB@PROGRAM_SPREFIX@\-doom\fR(6). This file acts 8 | as an auxiliary configuration file; the main configuration options 9 | are stored in \fBdefault.cfg\fR, which contains the same configuration 10 | options as Vanilla Doom (for compatibility). \fI@PROGRAM_SPREFIX@\-doom.cfg\fR 11 | contains configuration options that are specific to @PACKAGE_NAME@ 12 | only. 13 | .PP 14 | \fI@PROGRAM_SPREFIX@\-doom.cfg\fR is normally stored in the user's home directory, 15 | as \fI~/.local/share/@PROGRAM_SPREFIX@\-doom/@PROGRAM_SPREFIX@\-doom.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@\-setup\fR(6) tool provides a simple to use front-end 20 | for editing \fI@PROGRAM_SPREFIX@\-doom.cfg\fR. 21 | .SH FILE FORMAT 22 | .PP 23 | The file format is the same as that used for \fBdefault.cfg\fR(5). 24 | .br 25 | 26 | @content 27 | 28 | .SH SEE ALSO 29 | \fB@PROGRAM_SPREFIX@\-doom\fR(6), 30 | \fBdefault.cfg\fR(5), 31 | \fB@PROGRAM_SPREFIX@\-setup\fR(6) 32 | 33 | -------------------------------------------------------------------------------- /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/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/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 | -------------------------------------------------------------------------------- /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/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 | 25 | void S_Start(void); 26 | void S_StartSound(void *origin, int sound_id); 27 | void S_StartSoundAtVolume(void *origin, int sound_id, int volume); 28 | void S_StopSound(void *origin); 29 | void S_PauseSound(void); 30 | void S_ResumeSound(void); 31 | void S_UpdateSounds(mobj_t * listener); 32 | void S_StartSong(int song, boolean loop); 33 | void S_Init(void); 34 | void S_GetChannelInfo(SoundInfo_t * s); 35 | void S_SetMaxVolume(boolean fullprocess); 36 | void S_SetMusicVolume(void); 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /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 | char *DEH_FileName(deh_context_t *context); // [crispy] returns filename 32 | 33 | #endif /* #ifndef DEH_IO_H */ 34 | 35 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | target_link_libraries(textscreen m SDL2::SDL2) 29 | -------------------------------------------------------------------------------- /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/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/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 | -------------------------------------------------------------------------------- /src/i_midipipe.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 2013 James Haley et al. 3 | // Copyright(C) 2017 Alex Mayfield 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 | // Client Interface to Midi Server 17 | // 18 | 19 | #ifndef __I_MIDIPIPE__ 20 | #define __I_MIDIPIPE__ 21 | 22 | #if _WIN32 23 | 24 | #include "SDL_mixer.h" 25 | 26 | #include "doomtype.h" 27 | 28 | extern boolean midi_server_initialized; 29 | extern boolean midi_server_registered; 30 | 31 | boolean I_MidiPipe_RegisterSong(char *filename); 32 | void I_MidiPipe_UnregisterSong(void); 33 | void I_MidiPipe_SetVolume(int vol); 34 | void I_MidiPipe_PlaySong(int loops); 35 | void I_MidiPipe_StopSong(); 36 | void I_MidiPipe_ShutdownServer(); 37 | 38 | boolean I_MidiPipe_InitServer(); 39 | 40 | #else 41 | 42 | #include "doomtype.h" 43 | 44 | static const boolean midi_server_registered = false; 45 | 46 | #endif 47 | 48 | #endif 49 | 50 | -------------------------------------------------------------------------------- /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/s_musinfo.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 | // Copyright(C) 2005-2006 Florian Schulze, Colin Phipps, Neil Stevens, Andrey Budko 6 | // Copyright(C) 2017 Fabian Greffrath 7 | // 8 | // This program is free software; you can redistribute it and/or 9 | // modify it under the terms of the GNU General Public License 10 | // as published by the Free Software Foundation; either version 2 11 | // of the License, or (at your option) any later version. 12 | // 13 | // This program is distributed in the hope that it will be useful, 14 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | // GNU General Public License for more details. 17 | // 18 | // DESCRIPTION: 19 | // [crispy] Support MUSINFO lump (dynamic music changing) 20 | // 21 | 22 | #ifndef __S_MUSINFO__ 23 | #define __S_MUSINFO__ 24 | 25 | #include "p_mobj.h" 26 | 27 | #define MAX_MUS_ENTRIES 65 // [crispy] 0 to 64 inclusive 28 | 29 | typedef struct musinfo_s 30 | { 31 | mobj_t *mapthing; 32 | mobj_t *lastmapthing; 33 | int tics; 34 | int current_item; 35 | int items[MAX_MUS_ENTRIES]; 36 | boolean from_savegame; 37 | } musinfo_t; 38 | 39 | extern musinfo_t musinfo; 40 | 41 | extern void S_ParseMusInfo (const char *mapid); 42 | extern void T_MusInfo (void); 43 | 44 | #endif 45 | -------------------------------------------------------------------------------- /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/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 | // Returns the position of the given parameter 32 | // in the arg list (0 if not found). 33 | int M_CheckParm (const char* check); 34 | 35 | // Same as M_CheckParm, but checks that num_args arguments are available 36 | // following the specified argument. 37 | int M_CheckParmWithArgs(const char *check, int num_args); 38 | 39 | void M_FindResponseFile(void); 40 | void M_AddLooseFiles(void); 41 | 42 | // Parameter has been specified? 43 | 44 | boolean M_ParmExists(const char *check); 45 | 46 | // Get name of executable used to run this program: 47 | 48 | const char *M_GetExecutableName(void); 49 | 50 | #endif 51 | -------------------------------------------------------------------------------- /src/crispy.c: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // Copyright(C) 2014-2017 Fabian Greffrath 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 | // DESCRIPTION: 17 | // Crispy Doom specific variables. 18 | // 19 | 20 | 21 | #include "crispy.h" 22 | 23 | // [crispy] "regular" config variables 24 | static crispy_t crispy_s = { 25 | 0, 26 | .extautomap = 1, 27 | .extsaveg = 1, 28 | .hires = 1, 29 | .smoothscaling = 1, 30 | .soundfix = 1, 31 | .vsync = 1, 32 | }; 33 | crispy_t *const crispy = &crispy_s; 34 | 35 | // [crispy] "critical" config variables 36 | static const crispy_t critical_s = {0}; 37 | const crispy_t *critical = &critical_s; 38 | 39 | // [crispy] update the "singleplayer" variable and the "critical" struct 40 | void CheckCrispySingleplayer (boolean singleplayer) 41 | { 42 | if ((crispy->singleplayer = singleplayer)) 43 | { 44 | critical = &crispy_s; 45 | } 46 | else 47 | { 48 | critical = &critical_s; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | boolean DEH_HasStringReplacement(const char *s); 33 | 34 | 35 | #if 0 36 | // Static macro versions of the functions above 37 | 38 | #define DEH_String(x) (x) 39 | #define DEH_printf printf 40 | #define DEH_fprintf fprintf 41 | #define DEH_snprintf snprintf 42 | 43 | #endif 44 | 45 | #endif /* #ifndef DEH_STR_H */ 46 | 47 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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/p_extnodes.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(C) 1993-1996 Id Software, Inc. 3 | // Copyright(C) 2005-2014 Simon Howard 4 | // Copyright(C) 2015-2018 Fabian Greffrath 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 | // DESCRIPTION: 17 | // [crispy] support maps with NODES in compressed or uncompressed ZDBSP 18 | // format or DeePBSP format and/or LINEDEFS and THINGS lumps in Hexen format 19 | // 20 | 21 | 22 | #ifndef __P_EXTNODES__ 23 | #define __P_EXTNODES__ 24 | 25 | typedef enum 26 | { 27 | MFMT_DOOMBSP = 0x000, 28 | MFMT_DEEPBSP = 0x001, 29 | MFMT_ZDBSPX = 0x002, 30 | MFMT_ZDBSPZ = 0x004, 31 | MFMT_HEXEN = 0x100, 32 | } mapformat_t; 33 | 34 | extern mapformat_t P_CheckMapFormat (int lumpnum); 35 | 36 | extern void P_LoadSegs_DeePBSP (int lump); 37 | extern void P_LoadSubsectors_DeePBSP (int lump); 38 | extern void P_LoadNodes_DeePBSP (int lump); 39 | extern void P_LoadNodes_ZDBSP (int lump, boolean compressed); 40 | extern void P_LoadThings_Hexen (int lump); 41 | extern void P_LoadLineDefs_Hexen (int lump); 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /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/strife/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 | void D_QuitGame (void); // [STRIFE] 42 | 43 | void D_IntroTick(void); // [STRIFE] 44 | 45 | // 46 | // GLOBAL VARIABLES 47 | // 48 | 49 | extern gameaction_t gameaction; 50 | extern boolean isregistered; // villsa [STRIFE] 51 | extern boolean isdemoversion; // haleyjd [STRIFE] 52 | extern boolean stonecold; // villsa [STRIFE] 53 | extern boolean workparm; // villsa [STRIFE] 54 | 55 | #endif 56 | 57 | -------------------------------------------------------------------------------- /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/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 | #endif /* #ifndef TXT_SDL_H */ 41 | 42 | -------------------------------------------------------------------------------- /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_PYTHON 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/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 | // Retrieve column data for span blitting. 30 | byte* 31 | R_GetColumn 32 | ( int tex, 33 | int col ); 34 | 35 | 36 | // I/O, setting up the stuff. 37 | void R_InitData (void); 38 | void R_PrecacheLevel (void); 39 | 40 | 41 | // Retrieval. 42 | // Floor/ceiling opaque texture tiles, 43 | // lookup by name. For animation? 44 | int R_FlatNumForName(const char *name); 45 | 46 | 47 | // Called by P_Ticker for switches and animations, 48 | // returns the texture number for the texture name. 49 | int R_TextureNumForName (const char *name); 50 | int R_CheckTextureNumForName (const char *name); 51 | void R_SoundNumForDoor(vldoor_t* door); // villsa [STRIFE] 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /src/doom/hu_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: Head up display 16 | // 17 | 18 | #ifndef __HU_STUFF_H__ 19 | #define __HU_STUFF_H__ 20 | 21 | #include "d_event.h" 22 | 23 | 24 | // 25 | // Globally visible constants. 26 | // 27 | #define HU_FONTSTART '!' // the first font characters 28 | #define HU_FONTEND '_' // the last font characters 29 | 30 | // Calculate # of glyphs in font. 31 | #define HU_FONTSIZE (HU_FONTEND - HU_FONTSTART + 1) 32 | 33 | #define HU_BROADCAST 5 34 | 35 | #define HU_MSGX (0 - DELTAWIDTH) 36 | #define HU_MSGY 0 37 | #define HU_MSGWIDTH 64 // in characters 38 | #define HU_MSGHEIGHT 1 // in lines 39 | 40 | #define HU_MSGTIMEOUT (4*TICRATE) 41 | 42 | // 43 | // HEADS UP TEXT 44 | // 45 | 46 | void HU_Init(void); 47 | void HU_Start(void); 48 | 49 | boolean HU_Responder(event_t* ev); 50 | 51 | void HU_Ticker(void); 52 | void HU_Drawer(void); 53 | char HU_dequeueChatChar(void); 54 | void HU_Erase(void); 55 | 56 | extern char *chat_macros[10]; 57 | 58 | #endif 59 | 60 | -------------------------------------------------------------------------------- /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 | #define MAX_MOUSE_BUTTONS 8 26 | 27 | extern float mouse_acceleration; 28 | extern int mouse_threshold; 29 | extern float mouse_acceleration_y; // [crispy] 30 | extern int mouse_threshold_y; // [crispy] 31 | extern int mouse_y_invert; // [crispy] 32 | extern int novert; // [crispy] 33 | 34 | void I_BindInputVariables(void); 35 | void I_ReadMouse(void); 36 | 37 | // I_StartTextInput begins text input, activating the on-screen keyboard 38 | // (if one is used). The caller indicates that any entered text will be 39 | // displayed in the rectangle given by the provided set of coordinates. 40 | void I_StartTextInput(int x1, int y1, int x2, int y2); 41 | 42 | // I_StopTextInput finishes text input, deactivating the on-screen keyboard 43 | // (if one is used). 44 | void I_StopTextInput(void); 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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; 43 | extern drawseg_t* ds_p; 44 | extern int numdrawsegs; 45 | 46 | extern lighttable_t** hscalelight; 47 | extern lighttable_t** vscalelight; 48 | extern lighttable_t** dscalelight; 49 | 50 | 51 | typedef void (*drawfunc_t) (int start, int stop); 52 | 53 | 54 | // BSP? 55 | void R_ClearClipSegs (void); 56 | void R_ClearDrawSegs (void); 57 | 58 | 59 | void R_RenderBSPNode (int bspnum); 60 | 61 | 62 | #endif 63 | -------------------------------------------------------------------------------- /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/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 | #define LOOKDIRMIN 110 // [crispy] -110, actually 28 | #define LOOKDIRMAX 90 29 | #define LOOKDIRS (LOOKDIRMIN+1+LOOKDIRMAX) // [crispy] lookdir range: -110..0..90 30 | 31 | // Retrieve column data for span blitting. 32 | byte* 33 | R_GetColumn 34 | ( int tex, 35 | int col, 36 | boolean opaque ); 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 | 55 | #endif 56 | -------------------------------------------------------------------------------- /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/heretic/deh_htic.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 | // Common header for Heretic dehacked (HHE) support. 16 | // 17 | 18 | #ifndef DEH_HTIC_H 19 | #define DEH_HTIC_H 20 | 21 | #include "info.h" 22 | 23 | // HHE executable version. Loading HHE patches is (unfortunately) 24 | // dependent on the version of the Heretic executable used to make them. 25 | 26 | typedef enum 27 | { 28 | deh_hhe_1_0, 29 | deh_hhe_1_2, 30 | deh_hhe_1_3, 31 | deh_hhe_num_versions 32 | } deh_hhe_version_t; 33 | 34 | // HHE doesn't know about the last two states in the state table, so 35 | // these are considered invalid. 36 | 37 | #define DEH_HERETIC_NUMSTATES (NUMSTATES - 2) 38 | 39 | // It also doesn't know about the last two things in the mobjinfo table 40 | // (which correspond to the states above) 41 | 42 | #define DEH_HERETIC_NUMMOBJTYPES (NUMMOBJTYPES - 2) 43 | 44 | void DEH_HereticInit(void); 45 | int DEH_MapHereticThingType(int type); 46 | int DEH_MapHereticFrameNumber(int frame); 47 | void DEH_SuggestHereticVersion(deh_hhe_version_t version); 48 | 49 | extern deh_hhe_version_t deh_hhe_version; 50 | 51 | #endif /* #ifndef DEH_HTIC_H */ 52 | 53 | -------------------------------------------------------------------------------- /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/doom/m_menu.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 | // Menu widget stuff, episode selection and such. 17 | // 18 | 19 | 20 | #ifndef __M_MENU__ 21 | #define __M_MENU__ 22 | 23 | 24 | 25 | #include "d_event.h" 26 | 27 | // 28 | // MENUS 29 | // 30 | // Called by main loop, 31 | // saves config file and calls I_Quit when user exits. 32 | // Even when the menu is not displayed, 33 | // this can resize the view and change game parameters. 34 | // Does all the real work of the menu interaction. 35 | boolean M_Responder (event_t *ev); 36 | 37 | 38 | // Called by main loop, 39 | // only used for menu (skull cursor) animation. 40 | void M_Ticker (void); 41 | 42 | // Called by main loop, 43 | // draws the menus directly into the screen buffer. 44 | void M_Drawer (void); 45 | 46 | // Called by D_DoomMain, 47 | // loads the config file. 48 | void M_Init (void); 49 | 50 | // Called by intro code to force menu up upon a keypress, 51 | // does nothing if menu is already up. 52 | void M_StartControlPanel (void); 53 | 54 | 55 | 56 | extern int detailLevel; 57 | extern int screenblocks; 58 | 59 | 60 | 61 | #endif 62 | -------------------------------------------------------------------------------- /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/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[MAXWIDTH]; 38 | extern short ceilingclip[MAXWIDTH]; 39 | 40 | extern fixed_t yslope[MAXHEIGHT]; 41 | extern fixed_t distscale[MAXWIDTH]; 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(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 | -------------------------------------------------------------------------------- /src/strife/d_think.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 | // MapObj data. Map Objects or mobjs are actors, entities, 17 | // thinker, take-your-pick... anything that moves, acts, or 18 | // suffers state changes of more or less violent nature. 19 | // 20 | 21 | 22 | #ifndef __D_THINK__ 23 | #define __D_THINK__ 24 | 25 | 26 | 27 | 28 | 29 | // 30 | // Experimental stuff. 31 | // To compile this as "ANSI C with classes" 32 | // we will need to handle the various 33 | // action functions cleanly. 34 | // 35 | typedef void (*actionf_v)(); 36 | typedef void (*actionf_p1)( void* ); 37 | typedef void (*actionf_p2)( void*, void* ); 38 | 39 | typedef union 40 | { 41 | actionf_v acv; 42 | actionf_p1 acp1; 43 | actionf_p2 acp2; 44 | 45 | } actionf_t; 46 | 47 | 48 | 49 | 50 | 51 | // Historically, "think_t" is yet another 52 | // function pointer to a routine to handle 53 | // an actor. 54 | typedef actionf_t think_t; 55 | 56 | 57 | // Doubly linked list of actors. 58 | typedef struct thinker_s 59 | { 60 | struct thinker_s* prev; 61 | struct thinker_s* next; 62 | think_t function; 63 | 64 | } thinker_t; 65 | 66 | 67 | 68 | #endif 69 | -------------------------------------------------------------------------------- /man/heretic.template: -------------------------------------------------------------------------------- 1 | .TH @PROGRAM_SPREFIX@\-heretic 6 2 | .SH NAME 3 | @PROGRAM_SPREFIX@\-heretic \- historically compatible Heretic engine 4 | .SH SYNOPSIS 5 | .B @PROGRAM_SPREFIX@\-heretic 6 | [\fIOPTIONS\fR] 7 | .SH DESCRIPTION 8 | .PP 9 | @PACKAGE_SHORTNAME@ Heretic is a port of Raven Software's 1994 game "Heretic" that 10 | aims to behave as similar to the original DOS version of Heretic 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@ Heretic's 18 | behavior. 19 | @include environ.man 20 | .SH FILES 21 | .TP 22 | \fB$HOME/.local/share/@PROGRAM_SPREFIX@\-doom/heretic.cfg\fR 23 | The main configuration file for @PACKAGE_SHORTNAME@ Heretic. See \fBheretic.cfg\fR(5). 24 | .TP 25 | \fB$HOME/.local/share/@PROGRAM_SPREFIX@\-doom/@PROGRAM_SPREFIX@\-heretic.cfg\fR 26 | Extra configuration values that are specific to @PACKAGE_SHORTNAME@ Heretic and not 27 | present in Vanilla Heretic. See \fB@PROGRAM_SPREFIX@\-heretic.cfg\fR(5). 28 | .SH SEE ALSO 29 | \fB@PROGRAM_SPREFIX@\-doom\fR(6), 30 | \fB@PROGRAM_SPREFIX@\-hexen\fR(6), 31 | \fB@PROGRAM_SPREFIX@\-server\fR(6), 32 | \fB@PROGRAM_SPREFIX@\-setup\fR(6) 33 | .SH AUTHOR 34 | Chocolate Heretic is part of the Chocolate Doom project, written and 35 | maintained by Simon Howard. It is based on the Heretic 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/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 = -1; // [crispy] initialize 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 | // [crispy] stretch sky 51 | if (skytexture == -1) 52 | { 53 | return; 54 | } 55 | if ((crispy->stretchsky = crispy->freelook || crispy->mouselook || crispy->pitch)) 56 | { 57 | skytexturemid = -28*FRACUNIT * (textureheight[skytexture] >> FRACBITS) / SKYSTRETCH_HEIGHT; 58 | } 59 | else 60 | skytexturemid = ORIGHEIGHT/2*FRACUNIT; 61 | } 62 | 63 | -------------------------------------------------------------------------------- /TODO.md: -------------------------------------------------------------------------------- 1 | This is Chocolate Doom’s “to do” list. Note that this is kind of an arbitrary 2 | and unstructured wish list of features and improvements. The bug tracker 3 | (http://chocolate-doom.org/bugs) has more feature requests. 4 | 5 | * Multiplayer: 6 | - Use UPnP to automatically configure port forwarding for NATed 7 | networks. 8 | - Multiplayer options and configuration file (server name, etc) 9 | * Improve multiplayer startup: 10 | - Select an IWAD automatically from the server’s game type rather than 11 | all players having to specify -iwad. 12 | - Send list of WADs to load instead of all clients having to specify -file. 13 | - Same applies to dehacked patches and wad merging parameters. 14 | * Portability improvements: 15 | - Test on and fix for architectures where `((-2) >> 1) != -1` 16 | - Use size-specific types (eg. `int32_t` instead of int) 17 | - Don’t make structure packing assumptions when loading levels. 18 | - Port to every OS and architecture under the sun 19 | - Port to Emscripten and release a web-based version. 20 | * Video capture mode 21 | - Real-time recording of gameplay 22 | - Batch conversion of demos into videos 23 | * Heretic/Hexen/Strife: 24 | - Merge r_draw.c to common version and delete duplicates 25 | - Heretic v1.2 emulation (if possible) 26 | - Hexen v1.0 emulation (if possible/necessary) 27 | - Strife v1.1 emulation (for demo IWAD support) 28 | - Screensaver mode 29 | 30 | Crazy pie in the sky ideas: 31 | 32 | * Automatic WAD installer - download and run TCs from a list automatically 33 | (automating the current “instructions on wiki” system). 34 | * Textscreen interface to the Compet-N database: menu driven system to 35 | automatically download and play speedruns. 36 | * DWANGO-like interface for finding players and setting up games. 37 | -------------------------------------------------------------------------------- /src/d_ticcmd.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 | // DESCRIPTION: 17 | // System specific interface stuff. 18 | // 19 | 20 | 21 | #ifndef __D_TICCMD__ 22 | #define __D_TICCMD__ 23 | 24 | #include "doomtype.h" 25 | 26 | 27 | // The data sampled per tick (single player) 28 | // and transmitted to other peers (multiplayer). 29 | // Mainly movements/button commands per game tick, 30 | // plus a checksum for internal state consistency. 31 | 32 | typedef struct 33 | { 34 | signed char forwardmove; // *2048 for move 35 | signed char sidemove; // *2048 for move 36 | short angleturn; // <<16 for angle delta 37 | byte chatchar; 38 | byte buttons; 39 | // villsa [STRIFE] according to the asm, 40 | // consistancy is a short, not a byte 41 | byte consistancy; // checks for net game 42 | 43 | // villsa - Strife specific: 44 | 45 | byte buttons2; 46 | int inventory; 47 | 48 | // Heretic/Hexen specific: 49 | 50 | byte lookfly; // look/fly up/down/centering 51 | byte arti; // artitype_t to use 52 | 53 | int lookdir; 54 | } ticcmd_t; 55 | 56 | 57 | 58 | #endif 59 | --------------------------------------------------------------------------------