14 | );
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/src/MAC/ConsoleController.h:
--------------------------------------------------------------------------------
1 | // This file is hereby placed in the Public Domain -- Neil Stevens
2 |
3 | #import
4 |
5 | @interface ConsoleController : NSWindowController
6 | {
7 | IBOutlet NSTextView *textView;
8 |
9 | NSMutableString *log;
10 | id launchDelegate;
11 | }
12 |
13 | - (id)initWithWindow:(id)window;
14 | - (void)awakeFromNib;
15 | - (void)dealloc;
16 |
17 | - (void)launch:(NSString *)launchPath args:(NSArray *)args delegate:(id)delegate;
18 |
19 | - (void)taskComplete:(NSNotification *)notification;
20 | - (void)dataReady:(NSNotification *)notification;
21 |
22 | @end
23 |
--------------------------------------------------------------------------------
/doc/Makefile.am:
--------------------------------------------------------------------------------
1 | ## Process this file with automake to produce Makefile.in
2 | #
3 | # Makefile.am for LxDoom doc directory
4 | #
5 | #
6 |
7 | docdir=$(prefix)/share/doc/@PACKAGE@-@VERSION@
8 | man_MANS=prboom.6 boom.cfg.5 prboom-game-server.6
9 | doc_DATA=boom.txt MBF.txt MBFFAQ.txt README.demos README.compat
10 | EXTRA_DIST=boom.txt prboom.6 boom.cfg.5 prboom-game-server.6 \
11 | MBF.txt MBFFAQ.txt README.demos README.compat
12 |
13 | README.command-line: prboom.6 boom.cfg.5 prboom-game-server.6
14 | (echo ".ll +12" && cat *.5 *.6) | groff -Tascii -mandoc | perl -p -e 's/.\x08//g' > README.command-line
15 |
16 |
--------------------------------------------------------------------------------
/frontend/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 | WebPrBoom
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/src/MAC/FileButtonController.h:
--------------------------------------------------------------------------------
1 | // This file is hereby placed in the Public Domain -- Neil Stevens
2 |
3 | #import
4 |
5 | @interface FileButtonController : NSObject
6 | {
7 | IBOutlet NSButton *button;
8 | IBOutlet id field;
9 |
10 | NSArray *types;
11 | bool allowMultiple;
12 | }
13 |
14 | - (id)init;
15 | - (void)dealloc;
16 |
17 | - (void)setTypes:(NSArray *)typeArray;
18 | - (void)setAllowMultiple:(bool)allow;
19 |
20 | - (IBAction)buttonClicked:(id)sender;
21 | - (void)panelEnded:(NSOpenPanel *)panel returnCode:(int)code contextInfo:(void *)info;
22 |
23 | - (id)field;
24 | - (void)setEnabled:(BOOL)enabled;
25 |
26 | @end
27 |
--------------------------------------------------------------------------------
/ICONS/resource.h:
--------------------------------------------------------------------------------
1 | //{{NO_DEPENDENCIES}}
2 | // Microsoft Developer Studio generated include file.
3 | // Used by icons.rc
4 | //
5 | #define IDI_ICON1 101
6 | #define IDI_ICON2 102
7 | #define IDI_ICON3 103
8 | #define IDI_ICON4 104
9 | #define IDI_ICON5 105
10 |
11 | // Next default values for new objects
12 | //
13 | #ifdef APSTUDIO_INVOKED
14 | #ifndef APSTUDIO_READONLY_SYMBOLS
15 | #define _APS_NEXT_RESOURCE_VALUE 106
16 | #define _APS_NEXT_COMMAND_VALUE 40001
17 | #define _APS_NEXT_CONTROL_VALUE 1000
18 | #define _APS_NEXT_SYMED_VALUE 101
19 | #endif
20 | #endif
21 |
--------------------------------------------------------------------------------
/src/MAC/DrawerButton.m:
--------------------------------------------------------------------------------
1 | // This file is hereby placed in the Public Domain -- Neil Stevens
2 |
3 | #import "DrawerButton.h"
4 |
5 | @implementation DrawerButton
6 |
7 | - (void)drawerDidClose:(NSNotification *)notification
8 | {
9 | [self updateTitle];
10 | }
11 |
12 | - (void)drawerDidOpen:(NSNotification *)notification
13 | {
14 | [self updateTitle];
15 | }
16 |
17 | - (void)updateTitle
18 | {
19 | int state = [drawer state];
20 | bool opening = state == NSDrawerOpenState | state == NSDrawerOpeningState;
21 | NSString *newText = opening ? @"Hide " : @"Show ";
22 | if([[self title] hasPrefix:@"Hide "] || [[self title] hasPrefix:@"Show "])
23 | {
24 | [self setTitle:[newText stringByAppendingString:
25 | [[self title] substringFromIndex:5]]];
26 | }
27 | }
28 |
29 | @end
30 |
--------------------------------------------------------------------------------
/VisualC6/Doom.dsw:
--------------------------------------------------------------------------------
1 | Microsoft Developer Studio Workspace File, Format Version 6.00
2 | # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
3 |
4 | ###############################################################################
5 |
6 | Project: "Doom"=.\Doom.dsp - Package Owner=<4>
7 |
8 | Package=<5>
9 | {{{
10 | }}}
11 |
12 | Package=<4>
13 | {{{
14 | }}}
15 |
16 | ###############################################################################
17 |
18 | Project: "prboom_server"=.\prboom_server.dsp - Package Owner=<4>
19 |
20 | Package=<5>
21 | {{{
22 | }}}
23 |
24 | Package=<4>
25 | {{{
26 | }}}
27 |
28 | ###############################################################################
29 |
30 | Global:
31 |
32 | Package=<5>
33 | {{{
34 | }}}
35 |
36 | Package=<3>
37 | {{{
38 | }}}
39 |
40 | ###############################################################################
41 |
42 |
--------------------------------------------------------------------------------
/ICONS/icons.rc:
--------------------------------------------------------------------------------
1 | //Microsoft Developer Studio generated resource script.
2 | //
3 | #include "resource.h"
4 |
5 | #define APSTUDIO_READONLY_SYMBOLS
6 |
7 | /////////////////////////////////////////////////////////////////////////////
8 | #undef APSTUDIO_READONLY_SYMBOLS
9 |
10 | /////////////////////////////////////////////////////////////////////////////
11 | //
12 | // Icon
13 | //
14 |
15 | // Icon with lowest ID value placed first to ensure application icon
16 | // remains consistent on all systems.
17 | IDI_ICON1 ICON DISCARDABLE "fouch.ico"
18 | IDI_ICON2 ICON DISCARDABLE "god.ico"
19 | IDI_ICON3 ICON DISCARDABLE "skull.ico"
20 | IDI_ICON4 ICON DISCARDABLE "Heada1.ico"
21 | IDI_ICON5 ICON DISCARDABLE "barrel.ico"
22 | /////////////////////////////////////////////////////////////////////////////
23 |
--------------------------------------------------------------------------------
/autotools/ac_cpu_optimisations.m4:
--------------------------------------------------------------------------------
1 | dnl AC_CPU_OPTIMISATIONS
2 | dnl Tries to find compiler optimisation flags for the target system
3 | AC_DEFUN([AC_CPU_OPTIMISATIONS],[
4 | AC_REQUIRE([AC_CANONICAL_TARGET])
5 | AC_ARG_ENABLE(cpu-opt,AC_HELP_STRING([--disable-cpu-opt],[turns off cpu specific optimisations]),[
6 | ],[
7 | AC_MSG_CHECKING(whether compiler supports -march=native)
8 | OLD_CFLAGS="$CFLAGS"
9 | CFLAGS="$OLD_CFLAGS -march=native"
10 | AC_TRY_COMPILE(,[
11 | void f() {};
12 | ],[
13 | AC_MSG_RESULT(yes)
14 | ],[
15 | AC_MSG_RESULT(no)
16 | CFLAGS="$OLD_CFLAGS"
17 |
18 | case "$target" in
19 | # marginal gains from aligning code
20 | i386-*) ;;
21 | i486-*) CPU_CFLAGS="-mtune=i486" ;;
22 | # nothing special for pentium
23 | # CMOV op on ppro/II/686 can help us
24 | i686-*) CPU_CFLAGS="-march=i686" ;;
25 | esac
26 | AC_C_COMPILE_FLAGS($CPU_CFLAGS)
27 | ])
28 | ])
29 | ])
30 |
--------------------------------------------------------------------------------
/src/MAC/Makefile.am:
--------------------------------------------------------------------------------
1 | ## Process this file with automake to produce Makefile.in
2 |
3 | EXTRA_DIST = ANSIString.h \
4 | ANSIString.m \
5 | config.h \
6 | ConsoleController.h \
7 | ConsoleController.m \
8 | DrawerButton.h \
9 | DrawerButton.m \
10 | English.lproj/MainMenu.nib/classes.nib \
11 | English.lproj/MainMenu.nib/info.nib \
12 | English.lproj/MainMenu.nib/keyedobjects.nib \
13 | FileButtonController.h \
14 | FileButtonController.m \
15 | Image-DS_Store \
16 | Info.plist \
17 | i_sound.c \
18 | i_system.m \
19 | LauncherApp.h \
20 | LauncherApp.m \
21 | Launcher.icns \
22 | LauncherMain.m \
23 | macsupport.rb \
24 | Makefile.am \
25 | PrBoom.icns \
26 | PrBoom.sdef \
27 | Rakefile \
28 | ResolutionDataSource.h \
29 | ResolutionDataSource.m \
30 | SDLMain.h \
31 | SDLMain.m \
32 | TODO \
33 | UKFileWatcher.h \
34 | UKKQueue.h \
35 | UKKQueue.m \
36 | UKMainThreadProxy.h \
37 | UKMainThreadProxy.m \
38 | WadViewController.h \
39 | WadViewController.m
40 |
--------------------------------------------------------------------------------
/src/MAC/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | English
7 | CFBundleExecutable
8 | Launcher
9 | CFBundleGetInfoString
10 | %VERSION%
11 | CFBundleIconFile
12 | PrBoom.icns
13 | CFBundleIdentifier
14 | net.sourceforge.prboom
15 | CFBundleName
16 | PrBoom
17 | CFBundlePackageType
18 | APPL
19 | CFBundleVersion
20 | %VERSION%
21 | NSPrincipalClass
22 | NSApplication
23 | NSMainNibFile
24 | MainMenu
25 | NSAppleScriptEnabled
26 |
27 | OSAScriptingDefinition
28 | PrBoom.sdef
29 |
30 |
31 |
--------------------------------------------------------------------------------
/src/MAC/SDLMain.h:
--------------------------------------------------------------------------------
1 | /* SDLMain.m - main entry point for our Cocoa-ized SDL app
2 | Initial Version: Darrell Walisser
3 | Non-NIB-Code & other changes: Max Horn
4 |
5 | Feel free to customize this file to suit your needs
6 | */
7 |
8 | #import
9 |
10 | /* Portions of CPS.h */
11 | typedef struct CPSProcessSerNum
12 | {
13 | UInt32 lo;
14 | UInt32 hi;
15 | } CPSProcessSerNum;
16 |
17 | extern OSErr CPSGetCurrentProcess( CPSProcessSerNum *psn);
18 | extern OSErr CPSEnableForegroundOperation( CPSProcessSerNum *psn, UInt32 _arg2, UInt32 _arg3, UInt32 _arg4, UInt32 _arg5);
19 | extern OSErr CPSSetFrontProcess( CPSProcessSerNum *psn);
20 |
21 | static int gArgc;
22 | static char **gArgv;
23 | static BOOL gFinderLaunch;
24 | static BOOL gCalledAppMainline = FALSE;
25 |
26 | @interface SDLApplication : NSApplication
27 | @end
28 |
29 | @interface SDLMain : NSObject
30 | @end
31 |
32 | /* This is needed in Tiger */
33 | @interface NSApplication(PrBoom)
34 | - (void)setAppleMenu:(NSMenu *)menu;
35 | @end
36 |
--------------------------------------------------------------------------------
/src/MAC/WadViewController.h:
--------------------------------------------------------------------------------
1 | // This file is hereby placed in the Public Domain -- Neil Stevens
2 |
3 | #import
4 |
5 | @interface WadViewController : NSObject
6 | {
7 | // Wad options
8 | NSMutableArray *wads;
9 |
10 | IBOutlet id view;
11 | IBOutlet id removeButton;
12 | }
13 |
14 | - (id)init;
15 | - (void)dealloc;
16 |
17 | // UI
18 | - (IBAction)add:(id)sender;
19 | - (void)addEnded:(NSOpenPanel *)panel returnCode:(int)code contextInfo:(void *)info;
20 | - (IBAction)remove:(id)sender;
21 |
22 | // Preferences saving
23 | - (NSArray *)wads;
24 | - (void)setWads:(NSArray *)newWads;
25 |
26 | // Table view and data source
27 | - (void)tableViewSelectionDidChange:(NSNotification *)notification;
28 | - (int)numberOfRowsInTableView:(NSTableView *)tableView;
29 | - (id)tableView:(NSTableView *)tableView
30 | objectValueForTableColumn:(NSTableColumn *)column
31 | row:(int)row;
32 | - (void)tableView:(NSTableView *)tableView
33 | setObjectValue:(id)object
34 | forTableColumn:(NSTableColumn *)column
35 | row:(int)row;
36 | @end
37 |
--------------------------------------------------------------------------------
/LICENSE.UstymUkhma:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2018 UstymUkhman
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/frontend/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "webprboom",
3 | "version": "0.1.0",
4 | "homepage": "./",
5 | "private": true,
6 | "dependencies": {
7 | "@testing-library/jest-dom": "^5.11.9",
8 | "@testing-library/react": "^11.2.3",
9 | "@testing-library/user-event": "^12.6.0",
10 | "install": "^0.13.0",
11 | "npm": "^6.14.11",
12 | "rc-progress": "^3.1.3",
13 | "react": "^17.0.1",
14 | "react-dom": "^17.0.1",
15 | "react-scripts": "4.0.1",
16 | "react-spring-3d-carousel": "^1.2.0",
17 | "web-vitals": "^0.2.4"
18 | },
19 | "scripts": {
20 | "start": "react-scripts start",
21 | "build": "react-scripts build",
22 | "test": "react-scripts test",
23 | "eject": "react-scripts eject"
24 | },
25 | "eslintConfig": {
26 | "extends": [
27 | "react-app",
28 | "react-app/jest"
29 | ]
30 | },
31 | "browserslist": {
32 | "production": [
33 | ">0.2%",
34 | "not dead",
35 | "not op_mini all"
36 | ],
37 | "development": [
38 | "last 1 chrome version",
39 | "last 1 firefox version",
40 | "last 1 safari version"
41 | ]
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/frontend/src/App.css:
--------------------------------------------------------------------------------
1 | .Header {
2 | padding: 0 0 1vh 0;
3 | }
4 |
5 | .Header img {
6 | display: block;
7 | margin-left: auto;
8 | margin-right: auto;
9 | max-width: 58vw;
10 | max-height: 9vh;
11 | }
12 |
13 | .Footer {
14 | padding: 3vh 0 0 0;
15 | }
16 |
17 | .Footer img {
18 | display: block;
19 | margin-left: auto;
20 | margin-right: auto;
21 | max-width: 80vw;
22 | max-height: 7vh;
23 | }
24 |
25 | .BoomCarousel-outer {
26 | margin: 0 auto;
27 | overflow: hidden;
28 | width: 90vw;
29 | height: calc(90vw * .555);
30 | max-height: 55vh;
31 | max-width: calc(55vh * 1.8);
32 | position: relative;
33 | }
34 |
35 | .BoomCarousel-outer img {
36 | cursor: pointer;
37 | }
38 |
39 | .Menu {
40 | position: absolute;
41 | left: 50%;
42 | top: 50%;
43 | transform: translate(-50%, -50%);
44 | }
45 |
46 | #GameCanvas {
47 | display: none;
48 | position: absolute;
49 |
50 | width: calc(100% - 4vw);
51 | height: calc(96vw * .75);
52 | max-height: 96vh;
53 | max-width: calc(96vh * 1.333);
54 |
55 | left: 50%;
56 | top: 50%;
57 | transform: translate(-50%, -50%);
58 | }
59 |
--------------------------------------------------------------------------------
/prboom.spec:
--------------------------------------------------------------------------------
1 | %define doomname prboom
2 |
3 | Name: %{doomname}
4 | Summary: Doom - classic 3D shoot-em-up game
5 | Version: 2.5.0
6 | Release: 1
7 | Source: ftp://prdownloads.sourceforge.net/prboom/prboom-2.5.0.tar.gz
8 | URL: http://prboom.sourceforge.net/
9 | Group: Amusements/Games
10 | BuildRoot: /var/tmp/%{doomname}-buildroot
11 | License: GPL
12 | Packager: Colin Phipps
13 | Prefix: %{_prefix}
14 | Autoreq: 0
15 | Requires: libSDL-1.2.so.0, libSDL_mixer-1.2.so.0, libSDL_net-1.2.so.0, libm.so.6, libc.so.6
16 |
17 | %description
18 | Doom is the classic 3D shoot-em-up game. It must have been one of the best
19 | selling games ever; it totally outclassed any 3D world games that preceded
20 | it, with amazing speed, flexibility, and outstanding gameplay. The specs to
21 | the game were released, and thousands of extra levels were written by fans of
22 | the game; even today new levels are written for Doom faster then any one person
23 | could play them.
24 |
25 | %prep
26 | rm -rf $RPM_BUILD_ROOT
27 |
28 | %setup -q
29 |
30 | %build
31 | %configure --disable-cpu-opt
32 | make
33 |
34 | %install
35 | make %{?buildroot:DESTDIR=%{buildroot}} install
36 |
37 | %clean
38 | rm -rf $RPM_BUILD_ROOT
39 |
40 | %files
41 | %{_mandir}/man5
42 | %{_mandir}/man6
43 | %docdir %{_docdir}
44 | %{_docdir}
45 | /usr/games
46 | %{_datadir}/games/doom/prboom.wad
47 |
48 |
--------------------------------------------------------------------------------
/prboom.spec.in:
--------------------------------------------------------------------------------
1 | %define doomname prboom
2 |
3 | Name: %{doomname}
4 | Summary: Doom - classic 3D shoot-em-up game
5 | Version: 2.5.0
6 | Release: 1
7 | Source: ftp://prdownloads.sourceforge.net/prboom/prboom-2.5.0.tar.gz
8 | URL: http://prboom.sourceforge.net/
9 | Group: Amusements/Games
10 | BuildRoot: /var/tmp/%{doomname}-buildroot
11 | License: GPL
12 | Packager: Colin Phipps
13 | Prefix: %{_prefix}
14 | Autoreq: 0
15 | Requires: libSDL-1.2.so.0, libSDL_mixer-1.2.so.0, libSDL_net-1.2.so.0, libm.so.6, libc.so.6
16 |
17 | %description
18 | Doom is the classic 3D shoot-em-up game. It must have been one of the best
19 | selling games ever; it totally outclassed any 3D world games that preceded
20 | it, with amazing speed, flexibility, and outstanding gameplay. The specs to
21 | the game were released, and thousands of extra levels were written by fans of
22 | the game; even today new levels are written for Doom faster then any one person
23 | could play them.
24 |
25 | %prep
26 | rm -rf $RPM_BUILD_ROOT
27 |
28 | %setup -q
29 |
30 | %build
31 | %configure --disable-cpu-opt
32 | make
33 |
34 | %install
35 | make %{?buildroot:DESTDIR=%{buildroot}} install
36 |
37 | %clean
38 | rm -rf $RPM_BUILD_ROOT
39 |
40 | %files
41 | %{_mandir}/man5
42 | %{_mandir}/man6
43 | %docdir %{_docdir}
44 | %{_docdir}
45 | /usr/games
46 | %{_datadir}/games/doom/prboom.wad
47 |
48 |
--------------------------------------------------------------------------------
/src/MAC/FileButtonController.m:
--------------------------------------------------------------------------------
1 | // This file is hereby placed in the Public Domain -- Neil Stevens
2 |
3 | #import "FileButtonController.h"
4 |
5 | @implementation FileButtonController
6 |
7 | - (id)init
8 | {
9 | [super init];
10 | types = [[NSArray alloc] init];
11 | allowMultiple = false;
12 | return self;
13 | }
14 |
15 | - (void)dealloc
16 | {
17 | [types release];
18 | [super dealloc];
19 | }
20 |
21 | - (void)setTypes:(NSArray *)typeArray
22 | {
23 | [types release];
24 | types = [[NSArray alloc] initWithArray:typeArray];
25 | }
26 |
27 | - (void)setAllowMultiple:(bool)allow
28 | {
29 | allowMultiple = allow;
30 | }
31 |
32 | - (IBAction)buttonClicked:(id)sender
33 | {
34 | NSOpenPanel *panel = [NSOpenPanel openPanel];
35 | [panel setAllowsMultipleSelection:allowMultiple];
36 | [panel setCanChooseFiles:true];
37 | [panel setCanChooseDirectories:false];
38 | [panel beginSheetForDirectory:nil file:nil types:types
39 | modalForWindow:[NSApp mainWindow] modalDelegate:self
40 | didEndSelector:@selector(panelEnded:returnCode:contextInfo:)
41 | contextInfo:nil];
42 | }
43 |
44 | - (void)panelEnded:(NSOpenPanel *)panel returnCode:(int)code contextInfo:(void *)info
45 | {
46 | if(code == NSCancelButton) return;
47 | [field setStringValue:[[panel filenames] objectAtIndex:0]];
48 | }
49 |
50 | - (id)field
51 | {
52 | return field;
53 | }
54 |
55 | - (void)setEnabled:(BOOL)enabled
56 | {
57 | [field setEnabled:enabled];
58 | [button setEnabled:enabled];
59 | }
60 |
61 | @end
62 |
--------------------------------------------------------------------------------
/src/version.c:
--------------------------------------------------------------------------------
1 | /* Emacs style mode select -*- C++ -*-
2 | *-----------------------------------------------------------------------------
3 | *
4 | *
5 | * PrBoom: a Doom port merged with LxDoom and LSDLDoom
6 | * based on BOOM, a modified and improved DOOM engine
7 | * Copyright (C) 1999 by
8 | * id Software, Chi Hoang, Lee Killough, Jim Flynn, Rand Phares, Ty Halderman
9 | * Copyright (C) 1999-2000 by
10 | * Jess Haas, Nicolas Kalkhof, Colin Phipps, Florian Schulze
11 | * Copyright 2005, 2006 by
12 | * Florian Schulze, Colin Phipps, Neil Stevens, Andrey Budko
13 | *
14 | * This program is free software; you can redistribute it and/or
15 | * modify it under the terms of the GNU General Public License
16 | * as published by the Free Software Foundation; either version 2
17 | * of the License, or (at your option) any later version.
18 | *
19 | * This program is distributed in the hope that it will be useful,
20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 | * GNU General Public License for more details.
23 | *
24 | * You should have received a copy of the GNU General Public License
25 | * along with this program; if not, write to the Free Software
26 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
27 | * 02111-1307, USA.
28 | *
29 | * DESCRIPTION:
30 | * Date stamp
31 | *
32 | *-----------------------------------------------------------------------------
33 | */
34 |
35 |
36 | #include "version.h"
37 |
38 | const char version_date[] = __DATE__;
39 |
--------------------------------------------------------------------------------
/src/MAC/ANSIString.h:
--------------------------------------------------------------------------------
1 | // Copyright (C) 2006 Neil Stevens
2 | //
3 | // Permission is hereby granted, free of charge, to any person obtaining a copy
4 | // of this software and associated documentation files (the "Software"), to deal
5 | // in the Software without restriction, including without limitation the rights
6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | // copies of the Software, and to permit persons to whom the Software is
8 | // furnished to do so, subject to the following conditions:
9 | //
10 | // The above copyright notice and this permission notice shall be included in
11 | // all copies or substantial portions of the Software.
12 | //
13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | // THE AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
17 | // AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
18 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
19 | //
20 | // Except as contained in this notice, the name(s) of the author(s) shall not be
21 | // used in advertising or otherwise to promote the sale, use or other dealings
22 | // in this Software without prior written authorization from the author(s).
23 |
24 | #import
25 |
26 | @interface ANSIString : NSObject
27 |
28 | + (NSAttributedString *)parseColorCodes:(NSString *)ansiString;
29 |
30 | @end
31 |
--------------------------------------------------------------------------------
/src/version.h:
--------------------------------------------------------------------------------
1 | /* Emacs style mode select -*- C++ -*-
2 | *-----------------------------------------------------------------------------
3 | *
4 | *
5 | * PrBoom: a Doom port merged with LxDoom and LSDLDoom
6 | * based on BOOM, a modified and improved DOOM engine
7 | * Copyright (C) 1999 by
8 | * id Software, Chi Hoang, Lee Killough, Jim Flynn, Rand Phares, Ty Halderman
9 | * Copyright (C) 1999-2000 by
10 | * Jess Haas, Nicolas Kalkhof, Colin Phipps, Florian Schulze
11 | * Copyright 2005, 2006 by
12 | * Florian Schulze, Colin Phipps, Neil Stevens, Andrey Budko
13 | *
14 | * This program is free software; you can redistribute it and/or
15 | * modify it under the terms of the GNU General Public License
16 | * as published by the Free Software Foundation; either version 2
17 | * of the License, or (at your option) any later version.
18 | *
19 | * This program is distributed in the hope that it will be useful,
20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 | * GNU General Public License for more details.
23 | *
24 | * You should have received a copy of the GNU General Public License
25 | * along with this program; if not, write to the Free Software
26 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
27 | * 02111-1307, USA.
28 | *
29 | * DESCRIPTION:
30 | * Doom version indicators.
31 | *
32 | *-----------------------------------------------------------------------------*/
33 |
34 |
35 | #ifndef __DOOMVERSION__
36 | #define __DOOMVERSION__
37 |
38 | extern const char version_date[];
39 |
40 | #endif
41 |
--------------------------------------------------------------------------------
/src/md5.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This is the header file for the MD5 message-digest algorithm.
3 | * The algorithm is due to Ron Rivest. This code was
4 | * written by Colin Plumb in 1993, no copyright is claimed.
5 | * This code is in the public domain; do with it what you wish.
6 | *
7 | * Equivalent code is available from RSA Data Security, Inc.
8 | * This code has been tested against that, and is equivalent,
9 | * except that you don't need to include two pages of legalese
10 | * with every copy.
11 | *
12 | * To compute the message digest of a chunk of bytes, declare an
13 | * MD5Context structure, pass it to MD5Init, call MD5Update as
14 | * needed on buffers full of bytes, and then call MD5Final, which
15 | * will fill a supplied 16-byte array with the digest.
16 | *
17 | * Changed so as no longer to depend on Colin Plumb's `usual.h'
18 | * header definitions; now uses stuff from dpkg's config.h
19 | * - Ian Jackson .
20 | * Still in the public domain.
21 | */
22 |
23 | #ifndef MD5_H
24 | #define MD5_H
25 |
26 | #ifdef _MSC_VER
27 | #define WIN32_LEAN_AND_MEAN
28 | #include
29 | #define UWORD32 DWORD
30 | #else
31 | #include
32 | #define UWORD32 uint32_t
33 | #endif
34 | #define md5byte unsigned char
35 |
36 | struct MD5Context {
37 | UWORD32 buf[4];
38 | UWORD32 bytes[2];
39 | UWORD32 in[16];
40 | };
41 |
42 | void MD5Init(struct MD5Context *context);
43 | void MD5Update(struct MD5Context *context, md5byte const *buf, unsigned len);
44 | void MD5Final(unsigned char digest[16], struct MD5Context *context);
45 | void MD5Transform(UWORD32 buf[4], UWORD32 const in[16]);
46 |
47 | #endif /* !MD5_H */
48 |
--------------------------------------------------------------------------------
/src/f_wipe.h:
--------------------------------------------------------------------------------
1 | /* Emacs style mode select -*- C++ -*-
2 | *-----------------------------------------------------------------------------
3 | *
4 | *
5 | * PrBoom: a Doom port merged with LxDoom and LSDLDoom
6 | * based on BOOM, a modified and improved DOOM engine
7 | * Copyright (C) 1999 by
8 | * id Software, Chi Hoang, Lee Killough, Jim Flynn, Rand Phares, Ty Halderman
9 | * Copyright (C) 1999-2000 by
10 | * Jess Haas, Nicolas Kalkhof, Colin Phipps, Florian Schulze
11 | * Copyright 2005, 2006 by
12 | * Florian Schulze, Colin Phipps, Neil Stevens, Andrey Budko
13 | *
14 | * This program is free software; you can redistribute it and/or
15 | * modify it under the terms of the GNU General Public License
16 | * as published by the Free Software Foundation; either version 2
17 | * of the License, or (at your option) any later version.
18 | *
19 | * This program is distributed in the hope that it will be useful,
20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 | * GNU General Public License for more details.
23 | *
24 | * You should have received a copy of the GNU General Public License
25 | * along with this program; if not, write to the Free Software
26 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
27 | * 02111-1307, USA.
28 | *
29 | * DESCRIPTION:
30 | * Mission start screen wipe/melt, special effects.
31 | *
32 | *-----------------------------------------------------------------------------*/
33 |
34 | #ifndef __F_WIPE_H__
35 | #define __F_WIPE_H__
36 |
37 | /*
38 | * SCREEN WIPE PACKAGE
39 | */
40 |
41 | int wipe_ScreenWipe (int ticks);
42 | int wipe_StartScreen(void);
43 | int wipe_EndScreen (void);
44 |
45 | #endif
46 |
--------------------------------------------------------------------------------
/src/i_main.h:
--------------------------------------------------------------------------------
1 | /* Emacs style mode select -*- C++ -*-
2 | *-----------------------------------------------------------------------------
3 | *
4 | *
5 | * PrBoom: a Doom port merged with LxDoom and LSDLDoom
6 | * based on BOOM, a modified and improved DOOM engine
7 | * Copyright (C) 1999 by
8 | * id Software, Chi Hoang, Lee Killough, Jim Flynn, Rand Phares, Ty Halderman
9 | * Copyright (C) 1999-2000 by
10 | * Jess Haas, Nicolas Kalkhof, Colin Phipps, Florian Schulze
11 | * Copyright 2005, 2006 by
12 | * Florian Schulze, Colin Phipps, Neil Stevens, Andrey Budko
13 | *
14 | * This program is free software; you can redistribute it and/or
15 | * modify it under the terms of the GNU General Public License
16 | * as published by the Free Software Foundation; either version 2
17 | * of the License, or (at your option) any later version.
18 | *
19 | * This program is distributed in the hope that it will be useful,
20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 | * GNU General Public License for more details.
23 | *
24 | * You should have received a copy of the GNU General Public License
25 | * along with this program; if not, write to the Free Software
26 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
27 | * 02111-1307, USA.
28 | *
29 | * DESCRIPTION:
30 | * General system functions. Signal related stuff, exit function
31 | * prototypes, and programmable Doom clock.
32 | *
33 | *-----------------------------------------------------------------------------
34 | */
35 |
36 | #ifndef __I_MAIN__
37 | #define __I_MAIN__
38 |
39 | void I_Init(void);
40 | void I_SafeExit(int rc);
41 |
42 | extern int (*I_GetTime)(void);
43 |
44 | #endif
45 |
--------------------------------------------------------------------------------
/src/r_segs.h:
--------------------------------------------------------------------------------
1 | /* Emacs style mode select -*- C++ -*-
2 | *-----------------------------------------------------------------------------
3 | *
4 | *
5 | * PrBoom: a Doom port merged with LxDoom and LSDLDoom
6 | * based on BOOM, a modified and improved DOOM engine
7 | * Copyright (C) 1999 by
8 | * id Software, Chi Hoang, Lee Killough, Jim Flynn, Rand Phares, Ty Halderman
9 | * Copyright (C) 1999-2000 by
10 | * Jess Haas, Nicolas Kalkhof, Colin Phipps, Florian Schulze
11 | * Copyright 2005, 2006 by
12 | * Florian Schulze, Colin Phipps, Neil Stevens, Andrey Budko
13 | *
14 | * This program is free software; you can redistribute it and/or
15 | * modify it under the terms of the GNU General Public License
16 | * as published by the Free Software Foundation; either version 2
17 | * of the License, or (at your option) any later version.
18 | *
19 | * This program is distributed in the hope that it will be useful,
20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 | * GNU General Public License for more details.
23 | *
24 | * You should have received a copy of the GNU General Public License
25 | * along with this program; if not, write to the Free Software
26 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
27 | * 02111-1307, USA.
28 | *
29 | * DESCRIPTION:
30 | * Refresh module, drawing LineSegs from BSP.
31 | *
32 | *-----------------------------------------------------------------------------*/
33 |
34 | #ifndef __R_SEGS__
35 | #define __R_SEGS__
36 |
37 | #ifdef __GNUG__
38 | #pragma interface
39 | #endif
40 |
41 | void R_RenderMaskedSegRange(drawseg_t *ds, int x1, int x2);
42 | void R_StoreWallRange(const int start, const int stop);
43 |
44 | #endif
45 |
--------------------------------------------------------------------------------
/src/MAC/ResolutionDataSource.h:
--------------------------------------------------------------------------------
1 | // Copyright (C) 2006 Neil Stevens
2 | //
3 | // Permission is hereby granted, free of charge, to any person obtaining a copy
4 | // of this software and associated documentation files (the "Software"), to deal
5 | // in the Software without restriction, including without limitation the rights
6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | // copies of the Software, and to permit persons to whom the Software is
8 | // furnished to do so, subject to the following conditions:
9 | //
10 | // The above copyright notice and this permission notice shall be included in
11 | // all copies or substantial portions of the Software.
12 | //
13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | // THE AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
17 | // AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
18 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
19 | //
20 | // Except as contained in this notice, the name(s) of the author(s) shall not be
21 | // used in advertising or otherwise to promote the sale, use or other dealings
22 | // in this Software without prior written authorization from the author(s).
23 |
24 | #import
25 |
26 | @interface ResolutionDataSource : NSObject
27 | {
28 | }
29 |
30 | + (NSArray *)resolutions;
31 |
32 | - (id)comboBox:(NSComboBox *)box objectValueForItemAtIndex:(int)i;
33 | - (int)comboBox:(NSComboBox *)box indexOfItemWithStringValue:(NSString *)string;
34 | - (int)numberOfItemsInComboBox:(NSComboBox *)box;
35 |
36 | @end
37 |
--------------------------------------------------------------------------------
/src/m_argv.h:
--------------------------------------------------------------------------------
1 | /* Emacs style mode select -*- C++ -*-
2 | *-----------------------------------------------------------------------------
3 | *
4 | *
5 | * PrBoom: a Doom port merged with LxDoom and LSDLDoom
6 | * based on BOOM, a modified and improved DOOM engine
7 | * Copyright (C) 1999 by
8 | * id Software, Chi Hoang, Lee Killough, Jim Flynn, Rand Phares, Ty Halderman
9 | * Copyright (C) 1999-2000 by
10 | * Jess Haas, Nicolas Kalkhof, Colin Phipps, Florian Schulze
11 | * Copyright 2005, 2006 by
12 | * Florian Schulze, Colin Phipps, Neil Stevens, Andrey Budko
13 | *
14 | * This program is free software; you can redistribute it and/or
15 | * modify it under the terms of the GNU General Public License
16 | * as published by the Free Software Foundation; either version 2
17 | * of the License, or (at your option) any later version.
18 | *
19 | * This program is distributed in the hope that it will be useful,
20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 | * GNU General Public License for more details.
23 | *
24 | * You should have received a copy of the GNU General Public License
25 | * along with this program; if not, write to the Free Software
26 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
27 | * 02111-1307, USA.
28 | *
29 | * DESCRIPTION:
30 | * Argument handling.
31 | *
32 | *-----------------------------------------------------------------------------*/
33 |
34 |
35 | #ifndef __M_ARGV__
36 | #define __M_ARGV__
37 |
38 | /*
39 | * MISC
40 | */
41 | extern int myargc;
42 | extern const char * const * myargv; /* CPhipps - const * const * */
43 |
44 | /* Returns the position of the given parameter in the arg list (0 if not found). */
45 | int M_CheckParm(const char *check);
46 |
47 | #endif
48 |
--------------------------------------------------------------------------------
/src/r_demo.h:
--------------------------------------------------------------------------------
1 | /* Emacs style mode select -*- C++ -*-
2 | *-----------------------------------------------------------------------------
3 | *
4 | *
5 | * PrBoom: a Doom port merged with LxDoom and LSDLDoom
6 | * based on BOOM, a modified and improved DOOM engine
7 | * Copyright (C) 1999 by
8 | * id Software, Chi Hoang, Lee Killough, Jim Flynn, Rand Phares, Ty Halderman
9 | * Copyright (C) 1999-2000 by
10 | * Jess Haas, Nicolas Kalkhof, Colin Phipps, Florian Schulze, Andrey Budko
11 | * Copyright 2005, 2006 by
12 | * Florian Schulze, Colin Phipps, Neil Stevens, Andrey Budko
13 | *
14 | * This program is free software; you can redistribute it and/or
15 | * modify it under the terms of the GNU General Public License
16 | * as published by the Free Software Foundation; either version 2
17 | * of the License, or (at your option) any later version.
18 | *
19 | * This program is distributed in the hope that it will be useful,
20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 | * GNU General Public License for more details.
23 | *
24 | * You should have received a copy of the GNU General Public License
25 | * along with this program; if not, write to the Free Software
26 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
27 | * 02111-1307, USA.
28 | *
29 | * DESCRIPTION:
30 | * Demo stuff
31 | *
32 | *---------------------------------------------------------------------
33 | */
34 |
35 | #include "doomstat.h"
36 |
37 | #define SMOOTH_PLAYING_MAXFACTOR 16
38 |
39 | extern int demo_smoothturns;
40 | extern int demo_smoothturnsfactor;
41 |
42 | void R_SmoothPlaying_Reset(player_t *player);
43 | void R_SmoothPlaying_Add(int delta);
44 | angle_t R_SmoothPlaying_Get(angle_t defangle);
45 | void R_ResetAfterTeleport(player_t *player);
46 |
--------------------------------------------------------------------------------
/src/i_joy.h:
--------------------------------------------------------------------------------
1 | /* Emacs style mode select -*- C++ -*-
2 | *-----------------------------------------------------------------------------
3 | *
4 | *
5 | * PrBoom: a Doom port merged with LxDoom and LSDLDoom
6 | * based on BOOM, a modified and improved DOOM engine
7 | * Copyright (C) 1999 by
8 | * id Software, Chi Hoang, Lee Killough, Jim Flynn, Rand Phares, Ty Halderman
9 | * Copyright (C) 1999-2000 by
10 | * Jess Haas, Nicolas Kalkhof, Colin Phipps, Florian Schulze
11 | * Copyright 2005, 2006 by
12 | * Florian Schulze, Colin Phipps, Neil Stevens, Andrey Budko
13 | *
14 | * This program is free software; you can redistribute it and/or
15 | * modify it under the terms of the GNU General Public License
16 | * as published by the Free Software Foundation; either version 2
17 | * of the License, or (at your option) any later version.
18 | *
19 | * This program is distributed in the hope that it will be useful,
20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 | * GNU General Public License for more details.
23 | *
24 | * You should have received a copy of the GNU General Public License
25 | * along with this program; if not, write to the Free Software
26 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
27 | * 02111-1307, USA.
28 | *
29 | * DESCRIPTION:
30 | * Joystick interface.
31 | *
32 | *-----------------------------------------------------------------------------*/
33 |
34 | extern int joybfire;
35 | extern int joybstrafe;
36 | extern int joybuse;
37 | extern int joybspeed;
38 | extern int joybweaponprev;
39 | extern int joybweaponnext;
40 |
41 | extern int joyleft;
42 | extern int joyright;
43 | extern int joyup;
44 | extern int joydown;
45 |
46 | extern int usejoystick;
47 |
48 | void I_InitJoystick(void);
49 | void I_PollJoystick(void);
50 |
--------------------------------------------------------------------------------
/src/doomdef.c:
--------------------------------------------------------------------------------
1 | /* Emacs style mode select -*- C++ -*-
2 | *-----------------------------------------------------------------------------
3 | *
4 | *
5 | * PrBoom: a Doom port merged with LxDoom and LSDLDoom
6 | * based on BOOM, a modified and improved DOOM engine
7 | * Copyright (C) 1999 by
8 | * id Software, Chi Hoang, Lee Killough, Jim Flynn, Rand Phares, Ty Halderman
9 | * Copyright (C) 1999-2000 by
10 | * Jess Haas, Nicolas Kalkhof, Colin Phipps, Florian Schulze
11 | * Copyright 2005, 2006 by
12 | * Florian Schulze, Colin Phipps, Neil Stevens, Andrey Budko
13 | *
14 | * This program is free software; you can redistribute it and/or
15 | * modify it under the terms of the GNU General Public License
16 | * as published by the Free Software Foundation; either version 2
17 | * of the License, or (at your option) any later version.
18 | *
19 | * This program is distributed in the hope that it will be useful,
20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 | * GNU General Public License for more details.
23 | *
24 | * You should have received a copy of the GNU General Public License
25 | * along with this program; if not, write to the Free Software
26 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
27 | * 02111-1307, USA.
28 | *
29 | * DESCRIPTION:
30 | * DoomDef - basic defines for DOOM, e.g. Version, game mode
31 | * and skill level, and display parameters.
32 | *
33 | *-----------------------------------------------------------------------------
34 | */
35 |
36 | #ifdef __GNUG__
37 | #pragma implementation "doomdef.h"
38 | #endif
39 |
40 | #include "doomdef.h"
41 |
42 | // Location for any defines turned variables.
43 | // None.
44 |
45 | // proff 08/17/98: Changed for high-res
46 | int SCREENWIDTH=320;
47 | int SCREENHEIGHT=200;
48 | int SCREENPITCH=320;
49 |
--------------------------------------------------------------------------------
/src/MAC/UKMainThreadProxy.h:
--------------------------------------------------------------------------------
1 | /* =============================================================================
2 | FILE: UKMainThreadProxy.h
3 | PROJECT: UKMainThreadProxy
4 |
5 | PURPOSE: Send a message to object theObject to [theObject mainThreadProxy]
6 | instead and the message will be received on the main thread by
7 | theObject.
8 |
9 | COPYRIGHT: (c) 2004 M. Uli Kusterer, all rights reserved.
10 |
11 | AUTHORS: M. Uli Kusterer - UK
12 |
13 | LICENSES: GPL, Modified BSD
14 |
15 | REVISIONS:
16 | 2004-10-14 UK Created.
17 | ========================================================================== */
18 |
19 | // -----------------------------------------------------------------------------
20 | // Headers:
21 | // -----------------------------------------------------------------------------
22 |
23 | #import
24 |
25 |
26 | // -----------------------------------------------------------------------------
27 | // Categories:
28 | // -----------------------------------------------------------------------------
29 |
30 | @interface NSObject (UKMainThreadProxy)
31 |
32 | -(id) mainThreadProxy; // You can't init or release this object.
33 | -(id) copyMainThreadProxy; // Gives you a retained version.
34 |
35 | @end
36 |
37 |
38 | // -----------------------------------------------------------------------------
39 | // Classes:
40 | // -----------------------------------------------------------------------------
41 |
42 | /*
43 | This object is created as a proxy in a second thread for an existing object.
44 | All messages you send to this object will automatically be sent to the other
45 | object on the main thread, except NSObject methods like retain/release etc.
46 | */
47 |
48 | @interface UKMainThreadProxy : NSObject
49 | {
50 | IBOutlet id target;
51 | }
52 |
53 | -(id) initWithTarget: (id)targ;
54 |
55 | @end
56 |
--------------------------------------------------------------------------------
/frontend/src/BoomCarousel.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react';
2 | import { config } from "react-spring";
3 | import Carousel from 'react-spring-3d-carousel';
4 |
5 | import './BoomCarousel.css';
6 |
7 | export default class BoomCarousel extends Component {
8 | constructor(props) {
9 | super(props);
10 |
11 | this.slides = props.slides.map((slide, index) => {
12 | return {
13 | ...slide,
14 | onClick: () => {
15 | if (this.state.goToSlide === index) {
16 | this.onSelected(slide.key);
17 | }
18 | this.setState({ goToSlide: index });
19 | }
20 | };
21 | });
22 | }
23 |
24 | state = {
25 | goToSlide: 0,
26 | };
27 |
28 | onSelected(key) {
29 | if (this.props.onSelected) {
30 | this.props.onSelected(key);
31 | }
32 | }
33 |
34 | moveRight() {
35 | let slide = this.state.goToSlide;
36 | slide++;
37 | if (slide === this.slides.length) {
38 | slide = 0;
39 | }
40 | this.setState({ goToSlide: slide });
41 | }
42 |
43 | moveLeft() {
44 | let slide = this.state.goToSlide;
45 | slide--;
46 | if (slide < 0) {
47 | slide = this.slides.length - 1;
48 | }
49 | this.setState({ goToSlide: slide });
50 | }
51 |
52 | select() {
53 | this.onSelected(this.slides[this.state.goToSlide].key);
54 | }
55 |
56 | render() {
57 | return (
58 |
64 | )
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/src/p_user.h:
--------------------------------------------------------------------------------
1 | /* Emacs style mode select -*- C++ -*-
2 | *-----------------------------------------------------------------------------
3 | *
4 | *
5 | * PrBoom: a Doom port merged with LxDoom and LSDLDoom
6 | * based on BOOM, a modified and improved DOOM engine
7 | * Copyright (C) 1999 by
8 | * id Software, Chi Hoang, Lee Killough, Jim Flynn, Rand Phares, Ty Halderman
9 | * Copyright (C) 1999-2000 by
10 | * Jess Haas, Nicolas Kalkhof, Colin Phipps, Florian Schulze
11 | * Copyright 2005, 2006 by
12 | * Florian Schulze, Colin Phipps, Neil Stevens, Andrey Budko
13 | *
14 | * This program is free software; you can redistribute it and/or
15 | * modify it under the terms of the GNU General Public License
16 | * as published by the Free Software Foundation; either version 2
17 | * of the License, or (at your option) any later version.
18 | *
19 | * This program is distributed in the hope that it will be useful,
20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 | * GNU General Public License for more details.
23 | *
24 | * You should have received a copy of the GNU General Public License
25 | * along with this program; if not, write to the Free Software
26 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
27 | * 02111-1307, USA.
28 | *
29 | * DESCRIPTION:
30 | * Player related stuff.
31 | * Bobbing POV/weapon, movement.
32 | * Pending weapon.
33 | *
34 | *-----------------------------------------------------------------------------*/
35 |
36 | #ifndef __P_USER__
37 | #define __P_USER__
38 |
39 | #include "d_player.h"
40 |
41 | void P_PlayerThink(player_t *player);
42 | void P_CalcHeight(player_t *player);
43 | void P_DeathThink(player_t *player);
44 | void P_MovePlayer(player_t *player);
45 | void P_Thrust(player_t *player, angle_t angle, fixed_t move);
46 |
47 | #endif /* __P_USER__ */
48 |
--------------------------------------------------------------------------------
/src/f_finale.h:
--------------------------------------------------------------------------------
1 | /* Emacs style mode select -*- C++ -*-
2 | *-----------------------------------------------------------------------------
3 | *
4 | *
5 | * PrBoom: a Doom port merged with LxDoom and LSDLDoom
6 | * based on BOOM, a modified and improved DOOM engine
7 | * Copyright (C) 1999 by
8 | * id Software, Chi Hoang, Lee Killough, Jim Flynn, Rand Phares, Ty Halderman
9 | * Copyright (C) 1999-2000 by
10 | * Jess Haas, Nicolas Kalkhof, Colin Phipps, Florian Schulze
11 | * Copyright 2005, 2006 by
12 | * Florian Schulze, Colin Phipps, Neil Stevens, Andrey Budko
13 | *
14 | * This program is free software; you can redistribute it and/or
15 | * modify it under the terms of the GNU General Public License
16 | * as published by the Free Software Foundation; either version 2
17 | * of the License, or (at your option) any later version.
18 | *
19 | * This program is distributed in the hope that it will be useful,
20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 | * GNU General Public License for more details.
23 | *
24 | * You should have received a copy of the GNU General Public License
25 | * along with this program; if not, write to the Free Software
26 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
27 | * 02111-1307, USA.
28 | *
29 | * DESCRIPTION:
30 | * Related to f_finale.c, which is called at the end of a level
31 | *
32 | *-----------------------------------------------------------------------------*/
33 |
34 |
35 | #ifndef __F_FINALE__
36 | #define __F_FINALE__
37 |
38 | #include "doomtype.h"
39 | #include "d_event.h"
40 |
41 | /*
42 | * FINALE
43 | */
44 |
45 | /* Called by main loop. */
46 | boolean F_Responder (event_t* ev);
47 |
48 | /* Called by main loop. */
49 | void F_Ticker (void);
50 |
51 | /* Called by main loop. */
52 | void F_Drawer (void);
53 |
54 | void F_StartFinale (void);
55 |
56 | #endif
57 |
--------------------------------------------------------------------------------
/src/m_bbox.h:
--------------------------------------------------------------------------------
1 | /* Emacs style mode select -*- C++ -*-
2 | *-----------------------------------------------------------------------------
3 | *
4 | *
5 | * PrBoom: a Doom port merged with LxDoom and LSDLDoom
6 | * based on BOOM, a modified and improved DOOM engine
7 | * Copyright (C) 1999 by
8 | * id Software, Chi Hoang, Lee Killough, Jim Flynn, Rand Phares, Ty Halderman
9 | * Copyright (C) 1999-2000 by
10 | * Jess Haas, Nicolas Kalkhof, Colin Phipps, Florian Schulze
11 | * Copyright 2005, 2006 by
12 | * Florian Schulze, Colin Phipps, Neil Stevens, Andrey Budko
13 | *
14 | * This program is free software; you can redistribute it and/or
15 | * modify it under the terms of the GNU General Public License
16 | * as published by the Free Software Foundation; either version 2
17 | * of the License, or (at your option) any later version.
18 | *
19 | * This program is distributed in the hope that it will be useful,
20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 | * GNU General Public License for more details.
23 | *
24 | * You should have received a copy of the GNU General Public License
25 | * along with this program; if not, write to the Free Software
26 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
27 | * 02111-1307, USA.
28 | *
29 | * DESCRIPTION:
30 | * Simple bounding box datatype and functions.
31 | *
32 | *-----------------------------------------------------------------------------*/
33 |
34 |
35 | #ifndef __M_BBOX__
36 | #define __M_BBOX__
37 |
38 | #include
39 | #include "m_fixed.h"
40 |
41 | /* Bounding box coordinate storage. */
42 | enum
43 | {
44 | BOXTOP,
45 | BOXBOTTOM,
46 | BOXLEFT,
47 | BOXRIGHT
48 | }; /* bbox coordinates */
49 |
50 | /* Bounding box functions. */
51 |
52 | void M_ClearBox(fixed_t* box);
53 |
54 | void M_AddToBox(fixed_t* box,fixed_t x,fixed_t y);
55 |
56 | #endif
57 |
--------------------------------------------------------------------------------
/src/r_sky.h:
--------------------------------------------------------------------------------
1 | /* Emacs style mode select -*- C++ -*-
2 | *-----------------------------------------------------------------------------
3 | *
4 | *
5 | * PrBoom: a Doom port merged with LxDoom and LSDLDoom
6 | * based on BOOM, a modified and improved DOOM engine
7 | * Copyright (C) 1999 by
8 | * id Software, Chi Hoang, Lee Killough, Jim Flynn, Rand Phares, Ty Halderman
9 | * Copyright (C) 1999-2000 by
10 | * Jess Haas, Nicolas Kalkhof, Colin Phipps, Florian Schulze
11 | * Copyright 2005, 2006 by
12 | * Florian Schulze, Colin Phipps, Neil Stevens, Andrey Budko
13 | *
14 | * This program is free software; you can redistribute it and/or
15 | * modify it under the terms of the GNU General Public License
16 | * as published by the Free Software Foundation; either version 2
17 | * of the License, or (at your option) any later version.
18 | *
19 | * This program is distributed in the hope that it will be useful,
20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 | * GNU General Public License for more details.
23 | *
24 | * You should have received a copy of the GNU General Public License
25 | * along with this program; if not, write to the Free Software
26 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
27 | * 02111-1307, USA.
28 | *
29 | * DESCRIPTION:
30 | * Sky rendering.
31 | *
32 | *-----------------------------------------------------------------------------*/
33 |
34 | #ifndef __R_SKY__
35 | #define __R_SKY__
36 |
37 | #include "m_fixed.h"
38 |
39 | #ifdef __GNUG__
40 | #pragma interface
41 | #endif
42 |
43 | /* SKY, store the number for name. */
44 | #define SKYFLATNAME "F_SKY1"
45 |
46 | /* The sky map is 256*128*4 maps. */
47 | #define ANGLETOSKYSHIFT 22
48 |
49 | extern int skytexture;
50 | extern int skytexturemid;
51 |
52 | /* Called whenever the view size changes. */
53 | void R_InitSkyMap(void);
54 |
55 | #endif
56 |
--------------------------------------------------------------------------------
/src/d_items.h:
--------------------------------------------------------------------------------
1 | /* Emacs style mode select -*- C++ -*-
2 | *-----------------------------------------------------------------------------
3 | *
4 | *
5 | * PrBoom: a Doom port merged with LxDoom and LSDLDoom
6 | * based on BOOM, a modified and improved DOOM engine
7 | * Copyright (C) 1999 by
8 | * id Software, Chi Hoang, Lee Killough, Jim Flynn, Rand Phares, Ty Halderman
9 | * Copyright (C) 1999-2000 by
10 | * Jess Haas, Nicolas Kalkhof, Colin Phipps, Florian Schulze
11 | * Copyright 2005, 2006 by
12 | * Florian Schulze, Colin Phipps, Neil Stevens, Andrey Budko
13 | *
14 | * This program is free software; you can redistribute it and/or
15 | * modify it under the terms of the GNU General Public License
16 | * as published by the Free Software Foundation; either version 2
17 | * of the License, or (at your option) any later version.
18 | *
19 | * This program is distributed in the hope that it will be useful,
20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 | * GNU General Public License for more details.
23 | *
24 | * You should have received a copy of the GNU General Public License
25 | * along with this program; if not, write to the Free Software
26 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
27 | * 02111-1307, USA.
28 | *
29 | * DESCRIPTION:
30 | * Items: key cards, artifacts, weapon, ammunition.
31 | *
32 | *-----------------------------------------------------------------------------*/
33 |
34 |
35 | #ifndef __D_ITEMS__
36 | #define __D_ITEMS__
37 |
38 | #include "doomdef.h"
39 |
40 | #ifdef __GNUG__
41 | #pragma interface
42 | #endif
43 |
44 |
45 | /* Weapon info: sprite frames, ammunition use. */
46 | typedef struct
47 | {
48 | ammotype_t ammo;
49 | int upstate;
50 | int downstate;
51 | int readystate;
52 | int atkstate;
53 | int flashstate;
54 |
55 | } weaponinfo_t;
56 |
57 | extern weaponinfo_t weaponinfo[NUMWEAPONS];
58 |
59 | #endif
60 |
--------------------------------------------------------------------------------
/src/r_sky.c:
--------------------------------------------------------------------------------
1 | /* Emacs style mode select -*- C++ -*-
2 | *-----------------------------------------------------------------------------
3 | *
4 | *
5 | * PrBoom: a Doom port merged with LxDoom and LSDLDoom
6 | * based on BOOM, a modified and improved DOOM engine
7 | * Copyright (C) 1999 by
8 | * id Software, Chi Hoang, Lee Killough, Jim Flynn, Rand Phares, Ty Halderman
9 | * Copyright (C) 1999-2000 by
10 | * Jess Haas, Nicolas Kalkhof, Colin Phipps, Florian Schulze
11 | * Copyright 2005, 2006 by
12 | * Florian Schulze, Colin Phipps, Neil Stevens, Andrey Budko
13 | *
14 | * This program is free software; you can redistribute it and/or
15 | * modify it under the terms of the GNU General Public License
16 | * as published by the Free Software Foundation; either version 2
17 | * of the License, or (at your option) any later version.
18 | *
19 | * This program is distributed in the hope that it will be useful,
20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 | * GNU General Public License for more details.
23 | *
24 | * You should have received a copy of the GNU General Public License
25 | * along with this program; if not, write to the Free Software
26 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
27 | * 02111-1307, USA.
28 | *
29 | * DESCRIPTION:
30 | * Sky rendering. The DOOM sky is a texture map like any
31 | * wall, wrapping around. A 1024 columns equal 360 degrees.
32 | * The default sky map is 256 columns and repeats 4 times
33 | * on a 320 screen?
34 | *
35 | *-----------------------------------------------------------------------------*/
36 |
37 | #ifdef __GNUG__
38 | #pragma implementation "r_sky.h"
39 | #endif
40 | #include "r_sky.h"
41 |
42 | //
43 | // sky mapping
44 | //
45 | int skyflatnum;
46 | int skytexture;
47 | int skytexturemid;
48 |
49 | //
50 | // R_InitSkyMap
51 | // Called whenever the view size changes.
52 | //
53 | void R_InitSkyMap (void)
54 | {
55 | skytexturemid = 100*FRACUNIT;
56 | }
57 |
--------------------------------------------------------------------------------
/src/m_cheat.h:
--------------------------------------------------------------------------------
1 | /* Emacs style mode select -*- C++ -*-
2 | *-----------------------------------------------------------------------------
3 | *
4 | *
5 | * PrBoom: a Doom port merged with LxDoom and LSDLDoom
6 | * based on BOOM, a modified and improved DOOM engine
7 | * Copyright (C) 1999 by
8 | * id Software, Chi Hoang, Lee Killough, Jim Flynn, Rand Phares, Ty Halderman
9 | * Copyright (C) 1999-2000 by
10 | * Jess Haas, Nicolas Kalkhof, Colin Phipps, Florian Schulze
11 | * Copyright 2005, 2006 by
12 | * Florian Schulze, Colin Phipps, Neil Stevens, Andrey Budko
13 | *
14 | * This program is free software; you can redistribute it and/or
15 | * modify it under the terms of the GNU General Public License
16 | * as published by the Free Software Foundation; either version 2
17 | * of the License, or (at your option) any later version.
18 | *
19 | * This program is distributed in the hope that it will be useful,
20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 | * GNU General Public License for more details.
23 | *
24 | * You should have received a copy of the GNU General Public License
25 | * along with this program; if not, write to the Free Software
26 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
27 | * 02111-1307, USA.
28 | *
29 | * DESCRIPTION:
30 | * Cheat code checking.
31 | *
32 | *-----------------------------------------------------------------------------*/
33 |
34 | #ifndef __M_CHEAT__
35 | #define __M_CHEAT__
36 |
37 | /* killough 4/16/98: Cheat table structure */
38 |
39 | extern struct cheat_s {
40 | const char * cheat;
41 | const char *const deh_cheat;
42 | enum {
43 | always = 0,
44 | not_dm = 1,
45 | not_coop = 2,
46 | not_demo = 4,
47 | not_menu = 8,
48 | not_deh = 16,
49 | not_net = not_dm | not_coop
50 | } const when;
51 | void (*const func)();
52 | const int arg;
53 | uint_64_t code, mask;
54 | } cheat[];
55 |
56 | boolean M_FindCheats(int key);
57 |
58 | #endif
59 |
--------------------------------------------------------------------------------
/src/m_bbox.c:
--------------------------------------------------------------------------------
1 | /* Emacs style mode select -*- C++ -*-
2 | *-----------------------------------------------------------------------------
3 | *
4 | *
5 | * PrBoom: a Doom port merged with LxDoom and LSDLDoom
6 | * based on BOOM, a modified and improved DOOM engine
7 | * Copyright (C) 1999 by
8 | * id Software, Chi Hoang, Lee Killough, Jim Flynn, Rand Phares, Ty Halderman
9 | * Copyright (C) 1999-2000 by
10 | * Jess Haas, Nicolas Kalkhof, Colin Phipps, Florian Schulze
11 | * Copyright 2005, 2006 by
12 | * Florian Schulze, Colin Phipps, Neil Stevens, Andrey Budko
13 | *
14 | * This program is free software; you can redistribute it and/or
15 | * modify it under the terms of the GNU General Public License
16 | * as published by the Free Software Foundation; either version 2
17 | * of the License, or (at your option) any later version.
18 | *
19 | * This program is distributed in the hope that it will be useful,
20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 | * GNU General Public License for more details.
23 | *
24 | * You should have received a copy of the GNU General Public License
25 | * along with this program; if not, write to the Free Software
26 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
27 | * 02111-1307, USA.
28 | *
29 | * DESCRIPTION:
30 | * Main loop menu stuff.
31 | * Random number LUT.
32 | * Default Config File.
33 | * PCX Screenshots.
34 | *
35 | *-----------------------------------------------------------------------------*/
36 |
37 | #ifdef __GNUG__
38 | #pragma implementation "m_bbox.h"
39 | #endif
40 | #include "m_bbox.h"
41 |
42 | void M_ClearBox (fixed_t *box)
43 | {
44 | box[BOXTOP] = box[BOXRIGHT] = INT_MIN;
45 | box[BOXBOTTOM] = box[BOXLEFT] = INT_MAX;
46 | }
47 |
48 | void M_AddToBox(fixed_t* box,fixed_t x,fixed_t y)
49 | {
50 | if (xbox[BOXRIGHT])
53 | box[BOXRIGHT] = x;
54 | if (ybox[BOXTOP])
57 | box[BOXTOP] = y;
58 | }
59 |
--------------------------------------------------------------------------------
/src/wi_stuff.h:
--------------------------------------------------------------------------------
1 | /* Emacs style mode select -*- C++ -*-
2 | *-----------------------------------------------------------------------------
3 | *
4 | *
5 | * PrBoom: a Doom port merged with LxDoom and LSDLDoom
6 | * based on BOOM, a modified and improved DOOM engine
7 | * Copyright (C) 1999 by
8 | * id Software, Chi Hoang, Lee Killough, Jim Flynn, Rand Phares, Ty Halderman
9 | * Copyright (C) 1999-2000 by
10 | * Jess Haas, Nicolas Kalkhof, Colin Phipps, Florian Schulze
11 | * Copyright 2005, 2006 by
12 | * Florian Schulze, Colin Phipps, Neil Stevens, Andrey Budko
13 | *
14 | * This program is free software; you can redistribute it and/or
15 | * modify it under the terms of the GNU General Public License
16 | * as published by the Free Software Foundation; either version 2
17 | * of the License, or (at your option) any later version.
18 | *
19 | * This program is distributed in the hope that it will be useful,
20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 | * GNU General Public License for more details.
23 | *
24 | * You should have received a copy of the GNU General Public License
25 | * along with this program; if not, write to the Free Software
26 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
27 | * 02111-1307, USA.
28 | *
29 | * DESCRIPTION:
30 | * Intermission screens.
31 | *
32 | *-----------------------------------------------------------------------------*/
33 |
34 | #ifndef __WI_STUFF__
35 | #define __WI_STUFF__
36 |
37 | //#include "v_video.h"
38 |
39 | #include "doomdef.h"
40 |
41 | // States for the intermission
42 |
43 | typedef enum
44 | {
45 | NoState = -1,
46 | StatCount,
47 | ShowNextLoc
48 |
49 | } stateenum_t;
50 |
51 | // Called by main loop, animate the intermission.
52 | void WI_Ticker (void);
53 |
54 | // Called by main loop,
55 | // draws the intermission directly into the screen buffer.
56 | void WI_Drawer (void);
57 |
58 | // Setup for an intermission screen.
59 | void WI_Start(wbstartstruct_t* wbstartstruct);
60 |
61 | // Release intermission screen memory
62 | void WI_End(void);
63 |
64 | #endif
65 |
--------------------------------------------------------------------------------
/src/m_argv.c:
--------------------------------------------------------------------------------
1 | /* Emacs style mode select -*- C++ -*-
2 | *-----------------------------------------------------------------------------
3 | *
4 | *
5 | * PrBoom: a Doom port merged with LxDoom and LSDLDoom
6 | * based on BOOM, a modified and improved DOOM engine
7 | * Copyright (C) 1999 by
8 | * id Software, Chi Hoang, Lee Killough, Jim Flynn, Rand Phares, Ty Halderman
9 | * Copyright (C) 1999-2000 by
10 | * Jess Haas, Nicolas Kalkhof, Colin Phipps, Florian Schulze
11 | * Copyright 2005, 2006 by
12 | * Florian Schulze, Colin Phipps, Neil Stevens, Andrey Budko
13 | *
14 | * This program is free software; you can redistribute it and/or
15 | * modify it under the terms of the GNU General Public License
16 | * as published by the Free Software Foundation; either version 2
17 | * of the License, or (at your option) any later version.
18 | *
19 | * This program is distributed in the hope that it will be useful,
20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 | * GNU General Public License for more details.
23 | *
24 | * You should have received a copy of the GNU General Public License
25 | * along with this program; if not, write to the Free Software
26 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
27 | * 02111-1307, USA.
28 | *
29 | * DESCRIPTION:
30 | * Some argument handling.
31 | *
32 | *-----------------------------------------------------------------------------*/
33 |
34 | #include
35 | // CPhipps - include the correct header
36 | #include "doomtype.h"
37 | #include "m_argv.h"
38 |
39 | int myargc;
40 | const char * const * myargv; // CPhipps - not sure if ANSI C allows you to
41 | // modify contents of argv, but I can't imagine it does.
42 |
43 | //
44 | // M_CheckParm
45 | // Checks for the given parameter
46 | // in the program's command line arguments.
47 | // Returns the argument number (1 to argc-1)
48 | // or 0 if not present
49 | //
50 |
51 | int M_CheckParm(const char *check)
52 | {
53 | signed int i = myargc;
54 | while (--i>0)
55 | if (!strcasecmp(check, myargv[i]))
56 | return i;
57 | return 0;
58 | }
59 |
--------------------------------------------------------------------------------
/src/r_drawcolpipeline.inl:
--------------------------------------------------------------------------------
1 |
2 | // no color mapping
3 | #define R_DRAWCOLUMN_FUNCNAME R_DRAWCOLUMN_FUNCNAME_COMPOSITE(_PointUV)
4 | #define R_DRAWCOLUMN_PIPELINE (R_DRAWCOLUMN_PIPELINE_BASE | RDC_NOCOLMAP)
5 | #include "r_drawcolumn.inl"
6 |
7 | // simple depth color mapping
8 | #define R_DRAWCOLUMN_FUNCNAME R_DRAWCOLUMN_FUNCNAME_COMPOSITE(_PointUV_PointZ)
9 | #define R_DRAWCOLUMN_PIPELINE R_DRAWCOLUMN_PIPELINE_BASE
10 | #include "r_drawcolumn.inl"
11 |
12 | // z-dither
13 | #define R_DRAWCOLUMN_FUNCNAME R_DRAWCOLUMN_FUNCNAME_COMPOSITE(_PointUV_LinearZ)
14 | #define R_DRAWCOLUMN_PIPELINE (R_DRAWCOLUMN_PIPELINE_BASE | RDC_DITHERZ)
15 | #include "r_drawcolumn.inl"
16 |
17 | // bilinear with no color mapping
18 | #define R_DRAWCOLUMN_FUNCNAME R_DRAWCOLUMN_FUNCNAME_COMPOSITE(_LinearUV)
19 | #define R_DRAWCOLUMN_PIPELINE (R_DRAWCOLUMN_PIPELINE_BASE | RDC_BILINEAR | RDC_NOCOLMAP)
20 | #include "r_drawcolumn.inl"
21 |
22 | // bilinear with simple depth color mapping
23 | #define R_DRAWCOLUMN_FUNCNAME R_DRAWCOLUMN_FUNCNAME_COMPOSITE(_LinearUV_PointZ)
24 | #define R_DRAWCOLUMN_PIPELINE (R_DRAWCOLUMN_PIPELINE_BASE | RDC_BILINEAR)
25 | #include "r_drawcolumn.inl"
26 |
27 | // bilinear + z-dither
28 | #define R_DRAWCOLUMN_FUNCNAME R_DRAWCOLUMN_FUNCNAME_COMPOSITE(_LinearUV_LinearZ)
29 | #define R_DRAWCOLUMN_PIPELINE (R_DRAWCOLUMN_PIPELINE_BASE | RDC_BILINEAR | RDC_DITHERZ)
30 | #include "r_drawcolumn.inl"
31 |
32 | // rounded with no color mapping
33 | #define R_DRAWCOLUMN_FUNCNAME R_DRAWCOLUMN_FUNCNAME_COMPOSITE(_RoundedUV)
34 | #define R_DRAWCOLUMN_PIPELINE (R_DRAWCOLUMN_PIPELINE_BASE | RDC_ROUNDED | RDC_NOCOLMAP)
35 | #include "r_drawcolumn.inl"
36 |
37 | // rounded with simple depth color mapping
38 | #define R_DRAWCOLUMN_FUNCNAME R_DRAWCOLUMN_FUNCNAME_COMPOSITE(_RoundedUV_PointZ)
39 | #define R_DRAWCOLUMN_PIPELINE (R_DRAWCOLUMN_PIPELINE_BASE | RDC_ROUNDED)
40 | #include "r_drawcolumn.inl"
41 |
42 | // rounded + z-dither
43 | #define R_DRAWCOLUMN_FUNCNAME R_DRAWCOLUMN_FUNCNAME_COMPOSITE(_RoundedUV_LinearZ)
44 | #define R_DRAWCOLUMN_PIPELINE (R_DRAWCOLUMN_PIPELINE_BASE | RDC_ROUNDED | RDC_DITHERZ)
45 | #include "r_drawcolumn.inl"
46 |
47 | #undef R_FLUSHWHOLE_FUNCNAME
48 | #undef R_FLUSHHEADTAIL_FUNCNAME
49 | #undef R_FLUSHQUAD_FUNCNAME
50 | #undef R_DRAWCOLUMN_FUNCNAME_COMPOSITE
51 | #undef R_DRAWCOLUMN_PIPELINE_BITS
52 |
--------------------------------------------------------------------------------
/src/MAC/English.lproj/MainMenu.nib/info.nib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IBDocumentLocation
6 | 554 67 356 451 0 0 1280 1002
7 | IBEditorPositions
8 |
9 | 225
10 | 129 132 202 144 0 0 1280 1002
11 | 235
12 | 360 72 171 353 0 0 1280 1002
13 | 29
14 | 3 293 333 44 0 0 1280 1002
15 |
16 | IBFramework Version
17 | 446.1
18 | IBLockedObjects
19 |
20 | 324
21 | 318
22 | 319
23 | 325
24 | 614
25 | 615
26 | 616
27 | 617
28 | 618
29 | 619
30 | 622
31 | 623
32 | 624
33 | 625
34 | 613
35 | 626
36 | 647
37 | 631
38 | 637
39 | 642
40 | 643
41 | 644
42 | 645
43 | 646
44 | 650
45 | 659
46 | 660
47 | 661
48 | 590
49 | 316
50 | 358
51 | 365
52 | 460
53 | 461
54 | 462
55 | 572
56 | 610
57 | 665
58 | 666
59 | 752
60 | 753
61 | 757
62 | 758
63 |
64 | IBLockedTabItems
65 |
66 | 361
67 |
68 | IBOpenObjects
69 |
70 | 21
71 | 601
72 |
73 | IBSystem Version
74 | 8J135
75 | IBUsesTextArchiving
76 |
77 |
78 |
79 |
--------------------------------------------------------------------------------
/src/d_ticcmd.h:
--------------------------------------------------------------------------------
1 | /* Emacs style mode select -*- C++ -*-
2 | *-----------------------------------------------------------------------------
3 | *
4 | *
5 | * PrBoom: a Doom port merged with LxDoom and LSDLDoom
6 | * based on BOOM, a modified and improved DOOM engine
7 | * Copyright (C) 1999 by
8 | * id Software, Chi Hoang, Lee Killough, Jim Flynn, Rand Phares, Ty Halderman
9 | * Copyright (C) 1999-2000 by
10 | * Jess Haas, Nicolas Kalkhof, Colin Phipps, Florian Schulze
11 | * Copyright 2005, 2006 by
12 | * Florian Schulze, Colin Phipps, Neil Stevens, Andrey Budko
13 | *
14 | * This program is free software; you can redistribute it and/or
15 | * modify it under the terms of the GNU General Public License
16 | * as published by the Free Software Foundation; either version 2
17 | * of the License, or (at your option) any later version.
18 | *
19 | * This program is distributed in the hope that it will be useful,
20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 | * GNU General Public License for more details.
23 | *
24 | * You should have received a copy of the GNU General Public License
25 | * along with this program; if not, write to the Free Software
26 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
27 | * 02111-1307, USA.
28 | *
29 | * DESCRIPTION:
30 | * System specific interface stuff.
31 | *
32 | *-----------------------------------------------------------------------------*/
33 |
34 | #ifndef __D_TICCMD__
35 | #define __D_TICCMD__
36 |
37 | #include "doomtype.h"
38 |
39 | #ifdef __GNUG__
40 | #pragma interface
41 | #endif
42 |
43 | /* The data sampled per tick (single player)
44 | * and transmitted to other peers (multiplayer).
45 | * Mainly movements/button commands per game tick,
46 | * plus a checksum for internal state consistency.
47 | * CPhipps - explicitely signed the elements, since they have to be signed to work right
48 | */
49 | typedef struct
50 | {
51 | signed char forwardmove; /* *2048 for move */
52 | signed char sidemove; /* *2048 for move */
53 | signed short angleturn; /* <<16 for angle delta */
54 | short consistancy; /* checks for net game */
55 | byte chatchar;
56 | byte buttons;
57 | } ticcmd_t;
58 |
59 | #endif
60 |
--------------------------------------------------------------------------------
/src/z_bmalloc.h:
--------------------------------------------------------------------------------
1 | /* Emacs style mode select -*- C++ -*-
2 | *-----------------------------------------------------------------------------
3 | *
4 | *
5 | * PrBoom: a Doom port merged with LxDoom and LSDLDoom
6 | * based on BOOM, a modified and improved DOOM engine
7 | * Copyright (C) 1999 by
8 | * id Software, Chi Hoang, Lee Killough, Jim Flynn, Rand Phares, Ty Halderman
9 | * Copyright (C) 1999-2000 by
10 | * Jess Haas, Nicolas Kalkhof, Colin Phipps, Florian Schulze
11 | * Copyright 2005, 2006 by
12 | * Florian Schulze, Colin Phipps, Neil Stevens, Andrey Budko
13 | *
14 | * This program is free software; you can redistribute it and/or
15 | * modify it under the terms of the GNU General Public License
16 | * as published by the Free Software Foundation; either version 2
17 | * of the License, or (at your option) any later version.
18 | *
19 | * This program is distributed in the hope that it will be useful,
20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 | * GNU General Public License for more details.
23 | *
24 | * You should have received a copy of the GNU General Public License
25 | * along with this program; if not, write to the Free Software
26 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
27 | * 02111-1307, USA.
28 | *
29 | * DESCRIPTION:
30 | * Block memory allocator
31 | * This is designed to be a fast allocator for small, regularly used block sizes
32 | *-----------------------------------------------------------------------------*/
33 |
34 | struct block_memory_alloc_s {
35 | void *firstpool;
36 | size_t size;
37 | size_t perpool;
38 | int tag;
39 | const char *desc;
40 | };
41 |
42 | #define DECLARE_BLOCK_MEMORY_ALLOC_ZONE(name) extern struct block_memory_alloc_s name
43 | #define IMPLEMENT_BLOCK_MEMORY_ALLOC_ZONE(name, size, tag, num, desc) \
44 | struct block_memory_alloc_s name = { NULL, size, num, tag, desc}
45 | #define NULL_BLOCK_MEMORY_ALLOC_ZONE(name) name.firstpool = NULL
46 |
47 | void* Z_BMalloc(struct block_memory_alloc_s *pzone);
48 |
49 | inline static void* Z_BCalloc(struct block_memory_alloc_s *pzone)
50 | { void *p = Z_BMalloc(pzone); memset(p,0,pzone->size); return p; }
51 |
52 | void Z_BFree(struct block_memory_alloc_s *pzone, void* p);
53 |
--------------------------------------------------------------------------------
/src/p_setup.h:
--------------------------------------------------------------------------------
1 | /* Emacs style mode select -*- C++ -*-
2 | *-----------------------------------------------------------------------------
3 | *
4 | *
5 | * PrBoom: a Doom port merged with LxDoom and LSDLDoom
6 | * based on BOOM, a modified and improved DOOM engine
7 | * Copyright (C) 1999 by
8 | * id Software, Chi Hoang, Lee Killough, Jim Flynn, Rand Phares, Ty Halderman
9 | * Copyright (C) 1999-2000 by
10 | * Jess Haas, Nicolas Kalkhof, Colin Phipps, Florian Schulze
11 | * Copyright 2005, 2006 by
12 | * Florian Schulze, Colin Phipps, Neil Stevens, Andrey Budko
13 | *
14 | * This program is free software; you can redistribute it and/or
15 | * modify it under the terms of the GNU General Public License
16 | * as published by the Free Software Foundation; either version 2
17 | * of the License, or (at your option) any later version.
18 | *
19 | * This program is distributed in the hope that it will be useful,
20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 | * GNU General Public License for more details.
23 | *
24 | * You should have received a copy of the GNU General Public License
25 | * along with this program; if not, write to the Free Software
26 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
27 | * 02111-1307, USA.
28 | *
29 | * DESCRIPTION:
30 | * Setup a game, startup stuff.
31 | *
32 | *-----------------------------------------------------------------------------*/
33 |
34 | #ifndef __P_SETUP__
35 | #define __P_SETUP__
36 |
37 | #include "p_mobj.h"
38 |
39 | #ifdef __GNUG__
40 | #pragma interface
41 | #endif
42 |
43 | void P_SetupLevel(int episode, int map, int playermask, skill_t skill);
44 | void P_Init(void); /* Called by startup code. */
45 |
46 | extern const byte *rejectmatrix; /* for fast sight rejection - cph - const* */
47 |
48 | /* killough 3/1/98: change blockmap from "short" to "long" offsets: */
49 | extern long *blockmaplump; /* offsets in blockmap are from here */
50 | extern long *blockmap;
51 | extern int bmapwidth;
52 | extern int bmapheight; /* in mapblocks */
53 | extern fixed_t bmaporgx;
54 | extern fixed_t bmaporgy; /* origin of block map */
55 | extern mobj_t **blocklinks; /* for thing chains */
56 |
57 | #endif
58 |
--------------------------------------------------------------------------------
/src/r_bsp.h:
--------------------------------------------------------------------------------
1 | /* Emacs style mode select -*- C++ -*-
2 | *-----------------------------------------------------------------------------
3 | *
4 | *
5 | * PrBoom: a Doom port merged with LxDoom and LSDLDoom
6 | * based on BOOM, a modified and improved DOOM engine
7 | * Copyright (C) 1999 by
8 | * id Software, Chi Hoang, Lee Killough, Jim Flynn, Rand Phares, Ty Halderman
9 | * Copyright (C) 1999-2000 by
10 | * Jess Haas, Nicolas Kalkhof, Colin Phipps, Florian Schulze
11 | * Copyright 2005, 2006 by
12 | * Florian Schulze, Colin Phipps, Neil Stevens, Andrey Budko
13 | *
14 | * This program is free software; you can redistribute it and/or
15 | * modify it under the terms of the GNU General Public License
16 | * as published by the Free Software Foundation; either version 2
17 | * of the License, or (at your option) any later version.
18 | *
19 | * This program is distributed in the hope that it will be useful,
20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 | * GNU General Public License for more details.
23 | *
24 | * You should have received a copy of the GNU General Public License
25 | * along with this program; if not, write to the Free Software
26 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
27 | * 02111-1307, USA.
28 | *
29 | * DESCRIPTION:
30 | * Refresh module, BSP traversal and handling.
31 | *
32 | *-----------------------------------------------------------------------------*/
33 |
34 | #ifndef __R_BSP__
35 | #define __R_BSP__
36 |
37 | #ifdef __GNUG__
38 | #pragma interface
39 | #endif
40 |
41 | extern seg_t *curline;
42 | extern side_t *sidedef;
43 | extern line_t *linedef;
44 | extern sector_t *frontsector;
45 | extern sector_t *backsector;
46 |
47 | /* old code -- killough:
48 | * extern drawseg_t drawsegs[MAXDRAWSEGS];
49 | * new code -- killough: */
50 | extern drawseg_t *drawsegs;
51 | extern unsigned maxdrawsegs;
52 |
53 | extern byte solidcol[MAX_SCREENWIDTH];
54 |
55 | extern drawseg_t *ds_p;
56 |
57 | void R_ClearClipSegs(void);
58 | void R_ClearDrawSegs(void);
59 | void R_RenderBSPNode(int bspnum);
60 |
61 | /* killough 4/13/98: fake floors/ceilings for deep water / fake ceilings: */
62 | sector_t *R_FakeFlat(sector_t *, sector_t *, int *, int *, boolean);
63 |
64 | #endif
65 |
--------------------------------------------------------------------------------
/src/MAC/LauncherApp.h:
--------------------------------------------------------------------------------
1 | // This file is hereby placed in the Public Domain -- Neil Stevens
2 |
3 | #import
4 |
5 | @interface LauncherApp : NSObject
6 | {
7 | IBOutlet id window;
8 |
9 | // Game
10 | IBOutlet id compatibilityLevelButton;
11 | IBOutlet id gameButton;
12 | IBOutlet id launchButton;
13 | IBOutlet id gameMenu;
14 |
15 | // Options
16 | IBOutlet id respawnMonstersButton;
17 | IBOutlet id fastMonstersButton;
18 | IBOutlet id noMonstersButton;
19 |
20 | IBOutlet id fullscreenButton;
21 | IBOutlet id resolutionComboBox;
22 | IBOutlet id graphicsModeComboBox;
23 |
24 | // Debug options
25 | IBOutlet id disableGraphicsButton;
26 | IBOutlet id disableJoystickButton;
27 | IBOutlet id disableMouseButton;
28 | IBOutlet id disableMusicButton;
29 | IBOutlet id disableSoundButton;
30 | IBOutlet id disableSoundEffectsButton;
31 | IBOutlet id configFileButtonController;
32 |
33 | // Demo options
34 | IBOutlet id noDemoButton;
35 | IBOutlet id playDemoButton;
36 | IBOutlet id fastDemoButton;
37 | IBOutlet id timeDemoButton;
38 | IBOutlet id demoMatrix;
39 |
40 | IBOutlet id ffToLevelField;
41 | IBOutlet id demoFileButtonController;
42 |
43 | // Wad options
44 | IBOutlet id wadViewController;
45 |
46 | // Drawers
47 | IBOutlet id wadDrawer;
48 | IBOutlet id demoDrawer;
49 | IBOutlet id debugDrawer;
50 |
51 | // Console
52 | IBOutlet id consoleController;
53 | }
54 |
55 | - (NSString *)wadPath;
56 | - (void)awakeFromNib;
57 | - (void)windowWillClose:(NSNotification *)notification;
58 |
59 | - (IBAction)openWebsite:(id)sender;
60 |
61 | - (void)loadDefaults;
62 | - (void)saveDefaults;
63 |
64 | - (NSString *)wadForIndex:(int)index;
65 | - (NSString *)selectedWad;
66 | - (void)updateGameWad;
67 | - (void)watcher:(id)watcher receivedNotification:(NSString *)notification
68 | forPath:(NSString *)path;
69 |
70 | // Game
71 | - (void)tryToLaunch;
72 | - (IBAction)startClicked:(id)sender;
73 | - (void)taskEnded:(id)sender;
74 | - (IBAction)gameButtonClicked:(id)sender;
75 |
76 | // Tools
77 | - (IBAction)showGameFolderClicked:(id)sender;
78 | - (IBAction)showConsoleClicked:(id)sender;
79 |
80 | // Options
81 | - (IBAction)disableSoundClicked:(id)sender;
82 |
83 | // Demo options
84 | - (IBAction)demoButtonClicked:(id)sender;
85 |
86 | @end
87 |
88 | @interface LaunchCommand : NSScriptCommand
89 | - (id)performDefaultImplementation;
90 | @end
91 |
--------------------------------------------------------------------------------
/src/MAC/UKFileWatcher.h:
--------------------------------------------------------------------------------
1 | /* =============================================================================
2 | FILE: UKFileWatcher.h
3 | PROJECT: Filie
4 |
5 | COPYRIGHT: (c) 2005 M. Uli Kusterer, all rights reserved.
6 |
7 | AUTHORS: M. Uli Kusterer - UK
8 |
9 | LICENSES: GPL, Modified BSD
10 |
11 | REVISIONS:
12 | 2005-02-25 UK Created.
13 | ========================================================================== */
14 |
15 | /*
16 | This is a protocol that file change notification classes should adopt.
17 | That way, no matter whether you use Carbon's FNNotify/FNSubscribe, BSD's
18 | kqueue or whatever, the object being notified can react to change
19 | notifications the same way, and you can easily swap one out for the other
20 | to cater to different OS versions, target volumes etc.
21 | */
22 |
23 | // -----------------------------------------------------------------------------
24 | // Protocol:
25 | // -----------------------------------------------------------------------------
26 |
27 | @protocol UKFileWatcher
28 |
29 | -(void) addPath: (NSString*)path;
30 | -(void) removePath: (NSString*)path;
31 |
32 | -(id) delegate;
33 | -(void) setDelegate: (id)newDelegate;
34 |
35 | @end
36 |
37 | // -----------------------------------------------------------------------------
38 | // Methods delegates need to provide:
39 | // -----------------------------------------------------------------------------
40 |
41 | @interface NSObject (UKFileWatcherDelegate)
42 |
43 | -(void) watcher: (id)kq receivedNotification: (NSString*)nm forPath: (NSString*)fpath;
44 |
45 | @end
46 |
47 |
48 | // Notifications this sends:
49 | // (object is the file path registered with, and these are sent via the workspace notification center)
50 | #define UKFileWatcherRenameNotification @"UKKQueueFileRenamedNotification"
51 | #define UKFileWatcherWriteNotification @"UKKQueueFileWrittenToNotification"
52 | #define UKFileWatcherDeleteNotification @"UKKQueueFileDeletedNotification"
53 | #define UKFileWatcherAttributeChangeNotification @"UKKQueueFileAttributesChangedNotification"
54 | #define UKFileWatcherSizeIncreaseNotification @"UKKQueueFileSizeIncreasedNotification"
55 | #define UKFileWatcherLinkCountChangeNotification @"UKKQueueFileLinkCountChangedNotification"
56 | #define UKFileWatcherAccessRevocationNotification @"UKKQueueFileAccessRevocationNotification"
57 |
58 |
--------------------------------------------------------------------------------
/src/gl_struct.h:
--------------------------------------------------------------------------------
1 | /* Emacs style mode select -*- C++ -*-
2 | *-----------------------------------------------------------------------------
3 | *
4 | *
5 | * PrBoom: a Doom port merged with LxDoom and LSDLDoom
6 | * based on BOOM, a modified and improved DOOM engine
7 | * Copyright (C) 1999 by
8 | * id Software, Chi Hoang, Lee Killough, Jim Flynn, Rand Phares, Ty Halderman
9 | * Copyright (C) 1999-2000 by
10 | * Jess Haas, Nicolas Kalkhof, Colin Phipps, Florian Schulze
11 | * Copyright 2005, 2006 by
12 | * Florian Schulze, Colin Phipps, Neil Stevens, Andrey Budko
13 | *
14 | * This program is free software; you can redistribute it and/or
15 | * modify it under the terms of the GNU General Public License
16 | * as published by the Free Software Foundation; either version 2
17 | * of the License, or (at your option) any later version.
18 | *
19 | * This program is distributed in the hope that it will be useful,
20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 | * GNU General Public License for more details.
23 | *
24 | * You should have received a copy of the GNU General Public License
25 | * along with this program; if not, write to the Free Software
26 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
27 | * 02111-1307, USA.
28 | *
29 | * DESCRIPTION:
30 | *
31 | *---------------------------------------------------------------------
32 | */
33 |
34 | #ifndef _GL_STRUCT_H
35 | #define _GL_STRUCT_H
36 |
37 | extern int nodesVersion;
38 |
39 | void gld_Init(int width, int height);
40 | void gld_InitCommandLine();
41 |
42 | void gld_DrawNumPatch(int x, int y, int lump, int cm, enum patch_translation_e flags);
43 | void gld_DrawBackground(const char* name);
44 | void gld_DrawLine(int x0, int y0, int x1, int y1, int BaseColor);
45 | void gld_DrawWeapon(int weaponlump, vissprite_t *vis, int lightlevel);
46 | void gld_FillBlock(int x, int y, int width, int height, int col);
47 | void gld_SetPalette(int palette);
48 |
49 | unsigned char *gld_ReadScreen (void);
50 |
51 | void gld_CleanMemory(void);
52 | void gld_PreprocessLevel(void);
53 |
54 | void gld_Set2DMode();
55 | void gld_InitDrawScene(void);
56 | void gld_StartDrawScene(void);
57 | void gld_AddPlane(int subsectornum, visplane_t *floor, visplane_t *ceiling);
58 | void gld_AddWall(seg_t *seg);
59 | void gld_AddSprite(vissprite_t *vspr);
60 | void gld_DrawScene(player_t *player);
61 | void gld_EndDrawScene(void);
62 | void gld_Finish();
63 |
64 | #endif // _GL_STRUCT_H
65 |
--------------------------------------------------------------------------------
/src/r_plane.h:
--------------------------------------------------------------------------------
1 | /* Emacs style mode select -*- C++ -*-
2 | *-----------------------------------------------------------------------------
3 | *
4 | *
5 | * PrBoom: a Doom port merged with LxDoom and LSDLDoom
6 | * based on BOOM, a modified and improved DOOM engine
7 | * Copyright (C) 1999 by
8 | * id Software, Chi Hoang, Lee Killough, Jim Flynn, Rand Phares, Ty Halderman
9 | * Copyright (C) 1999-2000 by
10 | * Jess Haas, Nicolas Kalkhof, Colin Phipps, Florian Schulze
11 | * Copyright 2005, 2006 by
12 | * Florian Schulze, Colin Phipps, Neil Stevens, Andrey Budko
13 | *
14 | * This program is free software; you can redistribute it and/or
15 | * modify it under the terms of the GNU General Public License
16 | * as published by the Free Software Foundation; either version 2
17 | * of the License, or (at your option) any later version.
18 | *
19 | * This program is distributed in the hope that it will be useful,
20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 | * GNU General Public License for more details.
23 | *
24 | * You should have received a copy of the GNU General Public License
25 | * along with this program; if not, write to the Free Software
26 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
27 | * 02111-1307, USA.
28 | *
29 | * DESCRIPTION:
30 | * Refresh, visplane stuff (floor, ceilings).
31 | *
32 | *-----------------------------------------------------------------------------*/
33 |
34 | #ifndef __R_PLANE__
35 | #define __R_PLANE__
36 |
37 | #include "r_data.h"
38 |
39 | #ifdef __GNUG__
40 | #pragma interface
41 | #endif
42 |
43 | /* killough 10/98: special mask indicates sky flat comes from sidedef */
44 | #define PL_SKYFLAT (0x80000000)
45 |
46 | /* Visplane related. */
47 | extern int *lastopening; // dropoff overflow
48 |
49 | extern int floorclip[], ceilingclip[]; // dropoff overflow
50 | extern fixed_t yslope[], distscale[];
51 |
52 | void R_InitPlanes(void);
53 | void R_ClearPlanes(void);
54 | void R_DrawPlanes (void);
55 |
56 | visplane_t *R_FindPlane(
57 | fixed_t height,
58 | int picnum,
59 | int lightlevel,
60 | fixed_t xoffs, /* killough 2/28/98: add x-y offsets */
61 | fixed_t yoffs
62 | );
63 |
64 | visplane_t *R_CheckPlane(visplane_t *pl, int start, int stop);
65 | visplane_t *R_DupPlane(const visplane_t *pl, int start, int stop);
66 |
67 | #endif
68 |
--------------------------------------------------------------------------------
/src/r_fps.h:
--------------------------------------------------------------------------------
1 | /* Emacs style mode select -*- C++ -*-
2 | *-----------------------------------------------------------------------------
3 | *
4 | *
5 | * PrBoom: a Doom port merged with LxDoom and LSDLDoom
6 | * based on BOOM, a modified and improved DOOM engine
7 | * Copyright (C) 1999 by
8 | * id Software, Chi Hoang, Lee Killough, Jim Flynn, Rand Phares, Ty Halderman
9 | * Copyright (C) 1999-2000 by
10 | * Jess Haas, Nicolas Kalkhof, Colin Phipps, Florian Schulze, Andrey Budko
11 | * Copyright 2005, 2006 by
12 | * Florian Schulze, Colin Phipps, Neil Stevens, Andrey Budko
13 | *
14 | * This program is free software; you can redistribute it and/or
15 | * modify it under the terms of the GNU General Public License
16 | * as published by the Free Software Foundation; either version 2
17 | * of the License, or (at your option) any later version.
18 | *
19 | * This program is distributed in the hope that it will be useful,
20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 | * GNU General Public License for more details.
23 | *
24 | * You should have received a copy of the GNU General Public License
25 | * along with this program; if not, write to the Free Software
26 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
27 | * 02111-1307, USA.
28 | *
29 | * DESCRIPTION:
30 | * Uncapped framerate stuff
31 | *
32 | *---------------------------------------------------------------------
33 | */
34 |
35 | #ifndef __R_FPS__
36 | #define __R_FPS__
37 |
38 | #include "doomstat.h"
39 |
40 | extern int movement_smooth;
41 |
42 | typedef struct {
43 | fixed_t viewx;
44 | fixed_t viewy;
45 | fixed_t viewz;
46 | angle_t viewangle;
47 | angle_t viewpitch;
48 | } view_vars_t;
49 |
50 | extern view_vars_t original_view_vars;
51 |
52 | typedef struct {
53 | unsigned int start;
54 | unsigned int next;
55 | unsigned int step;
56 | fixed_t frac;
57 | float msec;
58 | } tic_vars_t;
59 |
60 | extern tic_vars_t tic_vars;
61 |
62 | void R_InitInterpolation(void);
63 | void R_InterpolateView (player_t *player, fixed_t frac);
64 |
65 | extern boolean WasRenderedInTryRunTics;
66 |
67 | void R_ResetViewInterpolation ();
68 | void R_UpdateInterpolations();
69 | void R_StopAllInterpolations(void);
70 | void R_DoInterpolations(fixed_t smoothratio);
71 | void R_RestoreInterpolations();
72 | void R_ActivateSectorInterpolations();
73 | void R_ActivateThinkerInterpolations(thinker_t *th);
74 | void R_StopInterpolationIfNeeded(thinker_t *th);
75 |
76 | #endif
77 |
--------------------------------------------------------------------------------
/src/p_saveg.h:
--------------------------------------------------------------------------------
1 | /* Emacs style mode select -*- C++ -*-
2 | *-----------------------------------------------------------------------------
3 | *
4 | *
5 | * PrBoom: a Doom port merged with LxDoom and LSDLDoom
6 | * based on BOOM, a modified and improved DOOM engine
7 | * Copyright (C) 1999 by
8 | * id Software, Chi Hoang, Lee Killough, Jim Flynn, Rand Phares, Ty Halderman
9 | * Copyright (C) 1999-2000 by
10 | * Jess Haas, Nicolas Kalkhof, Colin Phipps, Florian Schulze
11 | * Copyright 2005, 2006 by
12 | * Florian Schulze, Colin Phipps, Neil Stevens, Andrey Budko
13 | *
14 | * This program is free software; you can redistribute it and/or
15 | * modify it under the terms of the GNU General Public License
16 | * as published by the Free Software Foundation; either version 2
17 | * of the License, or (at your option) any later version.
18 | *
19 | * This program is distributed in the hope that it will be useful,
20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 | * GNU General Public License for more details.
23 | *
24 | * You should have received a copy of the GNU General Public License
25 | * along with this program; if not, write to the Free Software
26 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
27 | * 02111-1307, USA.
28 | *
29 | * DESCRIPTION:
30 | * Savegame I/O, archiving, persistence.
31 | *
32 | *-----------------------------------------------------------------------------*/
33 |
34 | #ifndef __P_SAVEG__
35 | #define __P_SAVEG__
36 |
37 | #ifdef __GNUG__
38 | #pragma interface
39 | #endif
40 |
41 | /* Persistent storage/archiving.
42 | * These are the load / save game routines. */
43 | void P_ArchivePlayers(void);
44 | void P_UnArchivePlayers(void);
45 | void P_ArchiveWorld(void);
46 | void P_UnArchiveWorld(void);
47 | void P_ArchiveThinkers(void);
48 | void P_UnArchiveThinkers(void);
49 | void P_ArchiveSpecials(void);
50 | void P_UnArchiveSpecials(void);
51 | void P_ThinkerToIndex(void); /* phares 9/13/98: save soundtarget in savegame */
52 | void P_IndexToThinker(void); /* phares 9/13/98: save soundtarget in savegame */
53 |
54 | /* 1/18/98 killough: add RNG info to savegame */
55 | void P_ArchiveRNG(void);
56 | void P_UnArchiveRNG(void);
57 |
58 | /* 2/21/98 killough: add automap info to savegame */
59 | void P_ArchiveMap(void);
60 | void P_UnArchiveMap(void);
61 |
62 | extern byte *save_p;
63 | void CheckSaveGame(size_t,const char*, int); /* killough */
64 | #define CheckSaveGame(a) (CheckSaveGame)(a, __FILE__, __LINE__)
65 |
66 | #endif
67 |
--------------------------------------------------------------------------------
/src/MAC/config.h:
--------------------------------------------------------------------------------
1 | /**/
2 | #define PACKAGE "prboom"
3 | #define VERSION "2.5.0"
4 |
5 | #ifdef DEBUG
6 |
7 | /* Define to enable internal range checking */
8 | #define RANGECHECK 1
9 |
10 | /* Define this to see real-time memory allocation
11 | * statistics, and enable extra debugging features
12 | */
13 | #define INSTRUMENTED 1
14 |
15 | /* Uncomment this to exhaustively run memory checks
16 | * while the game is running (this is EXTREMELY slow).
17 | * Only useful if INSTRUMENTED is also defined.
18 | */
19 | #define CHECKHEAP 1
20 |
21 | /* Uncomment this to cause heap dumps to be generated.
22 | * Only useful if INSTRUMENTED is also defined.
23 | */
24 | #define HEAPDUMP 1
25 |
26 | /* Uncomment this to perform id checks on zone blocks,
27 | * to detect corrupted and illegally freed blocks
28 | */
29 | #define ZONEIDCHECK 1
30 |
31 | /* CPhipps - some debugging macros for the new wad lump handling code */
32 | /* Defining this causes quick checks which only impose an overhead if a
33 | * posible error is detected. */
34 | #define SIMPLECHECKS 1
35 |
36 | /* Defining this causes time stamps to be created each time a lump is locked, and
37 | * lumps locked for long periods of time are reported */
38 | #define TIMEDIAG 1
39 |
40 | #endif // DEBUG
41 |
42 | #define DOGS 1
43 | #define MONITOR_VISIBILITY 1
44 | /*#define DISABLE_LUMP_CACHING*/
45 |
46 | /**/
47 | #define USE_SDL 1
48 | /*#define HAVE_MIXER 1*/
49 | #define HAVE_NET 1
50 | #define USE_SDL_NET 1
51 |
52 | /**/
53 | #define HIGHRES 1
54 | #define GL_DOOM 1
55 | #define USE_GLU_TESS 1
56 | #define USE_GLU_IMAGESCALE 1
57 | #define USE_GLU_MIPMAP 1
58 | #define DISABLE_DOUBLEBUFFER
59 |
60 | /**/
61 | #define STDC_HEADERS 1
62 |
63 | #define stricmp strcasecmp
64 | #define strnicmp strncasecmp
65 |
66 | #define HAVE_INET_ATON 1
67 | #define HAVE_INET_NTOP 1
68 | #define HAVE_INET_PTON 1
69 | #define HAVE_SETSOCKOPT 1
70 |
71 | #define HAVE_SNPRINTF 1
72 | #define HAVE_VSNPRINTF 1
73 |
74 | #define HAVE_MKSTEMPS 1
75 |
76 | #define HAVE_IPv6 1
77 |
78 | #define HAVE_UNISTD_H
79 | #define HAVE_SYS_WAIT_H
80 | #define HAVE_GETOPT
81 | /* causes a duplicate define warning
82 | #define HAVE_NETINET_IN_H
83 | */
84 | #define SYS_SIGLIST_DECLARED
85 |
86 | /**/
87 | #ifdef __BIG_ENDIAN__
88 | #define WORDS_BIGENDIAN
89 | #endif
90 |
91 | #ifdef __i386__
92 | #define I386_ASM 1
93 | #endif
94 |
95 | #define PACKEDATTR __attribute__((packed))
96 |
97 | #define MACOSX
98 | #define HAVE_LIBKERN_OSBYTEORDER_H
99 | #define HAVE_OWN_MUSIC
100 | #define UPDATE_MUSIC
101 | #define SCREENSHOT_DIR I_DoomExeDir()
102 | #define HEAPDUMP_DIR I_DoomExeDir()
103 |
--------------------------------------------------------------------------------
/src/lprintf.h:
--------------------------------------------------------------------------------
1 | /* Emacs style mode select -*- C++ -*-
2 | *-----------------------------------------------------------------------------
3 | *
4 | *
5 | * PrBoom: a Doom port merged with LxDoom and LSDLDoom
6 | * based on BOOM, a modified and improved DOOM engine
7 | * Copyright (C) 1999 by
8 | * id Software, Chi Hoang, Lee Killough, Jim Flynn, Rand Phares, Ty Halderman
9 | * Copyright (C) 1999-2000 by
10 | * Jess Haas, Nicolas Kalkhof, Colin Phipps, Florian Schulze
11 | * Copyright 2005, 2006 by
12 | * Florian Schulze, Colin Phipps, Neil Stevens, Andrey Budko
13 | *
14 | * This program is free software; you can redistribute it and/or
15 | * modify it under the terms of the GNU General Public License
16 | * as published by the Free Software Foundation; either version 2
17 | * of the License, or (at your option) any later version.
18 | *
19 | * This program is distributed in the hope that it will be useful,
20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 | * GNU General Public License for more details.
23 | *
24 | * You should have received a copy of the GNU General Public License
25 | * along with this program; if not, write to the Free Software
26 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
27 | * 02111-1307, USA.
28 | *
29 | * DESCRIPTION:
30 | * Declarations etc. for logical console output
31 | *
32 | *-----------------------------------------------------------------------------*/
33 |
34 | #ifndef __LPRINTF__
35 | #define __LPRINTF__
36 |
37 | typedef enum /* Logical output levels */
38 | {
39 | LO_INFO=1, /* One of these is used in each physical output */
40 | LO_CONFIRM=2, /* call. Which are output, or echoed to console */
41 | LO_WARN=4, /* if output redirected is determined by the */
42 | LO_ERROR=8, /* global masks: cons_output_mask,cons_error_mask. */
43 | LO_FATAL=16,
44 | LO_DEBUG=32,
45 | LO_ALWAYS=64,
46 | } OutputLevels;
47 |
48 | #ifndef __GNUC__
49 | #define __attribute__(x)
50 | #endif
51 |
52 | extern int lprintf(OutputLevels pri, const char *fmt, ...) __attribute__((format(printf,2,3)));
53 | extern int cons_output_mask;
54 | extern int cons_error_mask;
55 |
56 | /* killough 3/20/98: add const
57 | * killough 4/25/98: add gcc attributes
58 | * cphipps 01/11- moved from i_system.h */
59 | void I_Error(const char *error, ...) __attribute__((format(printf,1,2)));
60 |
61 | #ifdef _WIN32
62 | void I_ConTextAttr(unsigned char a);
63 | void I_UpdateConsole(void);
64 | int Init_ConsoleWin(void);
65 | void Done_ConsoleWin(void);
66 | #endif
67 |
68 | #endif
69 |
--------------------------------------------------------------------------------
/src/i_network.h:
--------------------------------------------------------------------------------
1 | /* Emacs style mode select -*- C++ -*-
2 | *-----------------------------------------------------------------------------
3 | *
4 | *
5 | * PrBoom: a Doom port merged with LxDoom and LSDLDoom
6 | * based on BOOM, a modified and improved DOOM engine
7 | * Copyright (C) 1999 by
8 | * id Software, Chi Hoang, Lee Killough, Jim Flynn, Rand Phares, Ty Halderman
9 | * Copyright (C) 1999-2000 by
10 | * Jess Haas, Nicolas Kalkhof, Colin Phipps, Florian Schulze
11 | * Copyright 2005, 2006 by
12 | * Florian Schulze, Colin Phipps, Neil Stevens, Andrey Budko
13 | *
14 | * This program is free software; you can redistribute it and/or
15 | * modify it under the terms of the GNU General Public License
16 | * as published by the Free Software Foundation; either version 2
17 | * of the License, or (at your option) any later version.
18 | *
19 | * This program is distributed in the hope that it will be useful,
20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 | * GNU General Public License for more details.
23 | *
24 | * You should have received a copy of the GNU General Public License
25 | * along with this program; if not, write to the Free Software
26 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
27 | * 02111-1307, USA.
28 | *
29 | * DESCRIPTION:
30 | * Low level network interface.
31 | *-----------------------------------------------------------------------------*/
32 |
33 | #ifdef HAVE_CONFIG_H
34 | #include "config.h"
35 | #endif
36 |
37 | #ifdef USE_SDL_NET
38 | #include "SDL_net.h"
39 | #define UDP_SOCKET UDPsocket
40 | #define UDP_PACKET UDPpacket
41 | #define AF_INET
42 | #define UDP_CHANNEL int
43 | extern UDP_SOCKET udp_socket;
44 | #else
45 | #define UDP_CHANNEL struct sockaddr
46 | #endif
47 |
48 | #ifndef IPPORT_RESERVED
49 | #define IPPORT_RESERVED 1024
50 | #endif
51 |
52 | void I_InitNetwork(void);
53 | size_t I_GetPacket(packet_header_t* buffer, size_t buflen);
54 | void I_SendPacket(packet_header_t* packet, size_t len);
55 | void I_WaitForPacket(int ms);
56 |
57 | #ifdef USE_SDL_NET
58 | UDP_SOCKET I_Socket(Uint16 port);
59 | int I_ConnectToServer(const char *serv);
60 | UDP_CHANNEL I_RegisterPlayer(IPaddress *ipaddr);
61 | void I_UnRegisterPlayer(UDP_CHANNEL channel);
62 | extern IPaddress sentfrom_addr;
63 | #endif
64 |
65 | #ifdef AF_INET
66 | void I_SendPacketTo(packet_header_t* packet, size_t len, UDP_CHANNEL *to);
67 | void I_SetupSocket(int sock, int port, int family);
68 | void I_PrintAddress(FILE* fp, UDP_CHANNEL *addr);
69 |
70 | extern UDP_CHANNEL sentfrom;
71 | extern int v4socket, v6socket;
72 | #endif
73 |
74 | extern size_t sentbytes, recvdbytes;
75 |
--------------------------------------------------------------------------------
/src/p_tick.h:
--------------------------------------------------------------------------------
1 | /* Emacs style mode select -*- C++ -*-
2 | *-----------------------------------------------------------------------------
3 | *
4 | *
5 | * PrBoom: a Doom port merged with LxDoom and LSDLDoom
6 | * based on BOOM, a modified and improved DOOM engine
7 | * Copyright (C) 1999 by
8 | * id Software, Chi Hoang, Lee Killough, Jim Flynn, Rand Phares, Ty Halderman
9 | * Copyright (C) 1999-2000,2002 by
10 | * Jess Haas, Nicolas Kalkhof, Colin Phipps, Florian Schulze
11 | * Copyright 2005, 2006 by
12 | * Florian Schulze, Colin Phipps, Neil Stevens, Andrey Budko
13 | *
14 | * This program is free software; you can redistribute it and/or
15 | * modify it under the terms of the GNU General Public License
16 | * as published by the Free Software Foundation; either version 2
17 | * of the License, or (at your option) any later version.
18 | *
19 | * This program is distributed in the hope that it will be useful,
20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 | * GNU General Public License for more details.
23 | *
24 | * You should have received a copy of the GNU General Public License
25 | * along with this program; if not, write to the Free Software
26 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
27 | * 02111-1307, USA.
28 | *
29 | * DESCRIPTION:
30 | * Core thinker processing prototypes.
31 | *-----------------------------------------------------------------------------*/
32 |
33 | #ifndef __P_TICK__
34 | #define __P_TICK__
35 |
36 | #include "d_think.h"
37 |
38 | #ifdef __GNUG__
39 | #pragma interface
40 | #endif
41 |
42 | /* Called by C_Ticker, can call G_PlayerExited.
43 | * Carries out all thinking of monsters and players. */
44 |
45 | void P_Ticker(void);
46 |
47 | void P_InitThinkers(void);
48 | void P_AddThinker(thinker_t *thinker);
49 | void P_RemoveThinker(thinker_t *thinker);
50 | void P_RemoveThinkerDelayed(thinker_t *thinker); // killough 4/25/98
51 |
52 | void P_UpdateThinker(thinker_t *thinker); // killough 8/29/98
53 |
54 | void P_SetTarget(mobj_t **mo, mobj_t *target); // killough 11/98
55 |
56 | /* killough 8/29/98: threads of thinkers, for more efficient searches
57 | * cph 2002/01/13: for consistency with the main thinker list, keep objects
58 | * pending deletion on a class list too
59 | */
60 | typedef enum {
61 | th_delete,
62 | th_misc,
63 | th_friends,
64 | th_enemies,
65 | NUMTHCLASS,
66 | th_all = NUMTHCLASS, /* For P_NextThinker, indicates "any class" */
67 | } th_class;
68 |
69 | extern thinker_t thinkerclasscap[];
70 | #define thinkercap thinkerclasscap[th_all]
71 |
72 | /* cph 2002/01/13 - iterator for thinker lists */
73 | thinker_t* P_NextThinker(thinker_t*,th_class);
74 |
75 | #endif
76 |
--------------------------------------------------------------------------------
/src/i_system.h:
--------------------------------------------------------------------------------
1 | /* Emacs style mode select -*- C++ -*-
2 | *-----------------------------------------------------------------------------
3 | *
4 | *
5 | * PrBoom: a Doom port merged with LxDoom and LSDLDoom
6 | * based on BOOM, a modified and improved DOOM engine
7 | * Copyright (C) 1999 by
8 | * id Software, Chi Hoang, Lee Killough, Jim Flynn, Rand Phares, Ty Halderman
9 | * Copyright (C) 1999-2000 by
10 | * Jess Haas, Nicolas Kalkhof, Colin Phipps, Florian Schulze
11 | * Copyright 2005, 2006 by
12 | * Florian Schulze, Colin Phipps, Neil Stevens, Andrey Budko
13 | *
14 | * This program is free software; you can redistribute it and/or
15 | * modify it under the terms of the GNU General Public License
16 | * as published by the Free Software Foundation; either version 2
17 | * of the License, or (at your option) any later version.
18 | *
19 | * This program is distributed in the hope that it will be useful,
20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 | * GNU General Public License for more details.
23 | *
24 | * You should have received a copy of the GNU General Public License
25 | * along with this program; if not, write to the Free Software
26 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
27 | * 02111-1307, USA.
28 | *
29 | * DESCRIPTION:
30 | * System specific interface stuff.
31 | *
32 | *-----------------------------------------------------------------------------*/
33 |
34 | #ifndef __I_SYSTEM__
35 | #define __I_SYSTEM__
36 |
37 | #ifdef __GNUG__
38 | #pragma interface
39 | #endif
40 |
41 | extern int ms_to_next_tick;
42 | boolean I_StartDisplay(void);
43 | void I_EndDisplay(void);
44 | int I_GetTime_RealTime(void); /* killough */
45 | #ifndef PRBOOM_SERVER
46 | fixed_t I_GetTimeFrac (void);
47 | #endif
48 | void I_GetTime_SaveMS(void);
49 |
50 | unsigned long I_GetRandomTimeSeed(void); /* cphipps */
51 |
52 | void I_uSleep(unsigned long usecs);
53 |
54 | /* cphipps - I_GetVersionString
55 | * Returns a version string in the given buffer
56 | */
57 | const char* I_GetVersionString(char* buf, size_t sz);
58 |
59 | /* cphipps - I_SigString
60 | * Returns a string describing a signal number
61 | */
62 | const char* I_SigString(char* buf, size_t sz, int signum);
63 |
64 | const char *I_DoomExeDir(void); // killough 2/16/98: path to executable's dir
65 |
66 | boolean HasTrailingSlash(const char* dn);
67 | char* I_FindFile(const char* wfname, const char* ext);
68 |
69 | /* cph 2001/11/18 - wrapper for read(2) which deals with partial reads */
70 | void I_Read(int fd, void* buf, size_t sz);
71 |
72 | /* cph 2001/11/18 - Move W_Filelength to i_system.c */
73 | int I_Filelength(int handle);
74 |
75 | void I_SetAffinityMask(void);
76 |
77 | #endif
78 |
--------------------------------------------------------------------------------
/src/p_checksum.c:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 | #include
4 | #include /* exit(), atexit() */
5 |
6 | #include "p_checksum.h"
7 | #include "md5.h"
8 | #include "doomstat.h" /* players{,ingame} */
9 | #include "lprintf.h"
10 |
11 | /* forward decls */
12 | static void p_checksum_cleanup(void);
13 | void checksum_gamestate(int tic);
14 |
15 | /* vars */
16 | static void p_checksum_nop(int tic){} /* do nothing */
17 | void (*P_Checksum)(int) = p_checksum_nop;
18 |
19 | /*
20 | * P_RecordChecksum
21 | * sets up the file and function pointers to write out checksum data
22 | */
23 | static FILE *outfile = NULL;
24 | static struct MD5Context md5global;
25 |
26 | void P_RecordChecksum(const char *file) {
27 | size_t fnsize;
28 |
29 | fnsize = strlen(file);
30 |
31 | /* special case: write to stdout */
32 | if(0 == strncmp("-",file,MIN(1,fnsize)))
33 | outfile = stdout;
34 | else {
35 | outfile = fopen(file,"wb");
36 | if(NULL == outfile) {
37 | I_Error("cannot open %s for writing checksum:\n%s\n",
38 | file, strerror(errno));
39 | }
40 | atexit(p_checksum_cleanup);
41 | }
42 |
43 | MD5Init(&md5global);
44 |
45 | P_Checksum = checksum_gamestate;
46 | }
47 |
48 | void P_ChecksumFinal(void) {
49 | int i;
50 | unsigned char digest[16];
51 |
52 | if (!outfile)
53 | return;
54 |
55 | MD5Final(digest, &md5global);
56 | fprintf(outfile, "final: ");
57 | for (i=0; i<16; i++)
58 | fprintf(outfile,"%x", digest[i]);
59 | fprintf(outfile, "\n");
60 | MD5Init(&md5global);
61 | }
62 |
63 | static void p_checksum_cleanup(void) {
64 | if (outfile && (outfile != stdout))
65 | fclose(outfile);
66 | }
67 |
68 | /*
69 | * runs on each tic when recording checksums
70 | */
71 | void checksum_gamestate(int tic) {
72 | int i;
73 | struct MD5Context md5ctx;
74 | unsigned char digest[16];
75 | char buffer[2048];
76 |
77 | fprintf(outfile,"%6d, ", tic);
78 |
79 | /* based on "ArchivePlayers" */
80 | MD5Init(&md5ctx);
81 | for (i=0 ; i -1)];
68 | }
69 |
70 | - (int)numberOfRowsInTableView:(NSTableView *)tableView
71 | {
72 | return [wads count];
73 | }
74 |
75 | - (id)tableView:(NSTableView *)tableView
76 | objectValueForTableColumn:(NSTableColumn *)column
77 | row:(int)row
78 | {
79 | NSString *columnId = [column identifier];
80 | if([columnId isEqualToString:@"Path"])
81 | return [wads objectAtIndex:row];
82 | else if([columnId isEqualToString:@"Icon"])
83 | return [[NSWorkspace sharedWorkspace] iconForFile:[wads objectAtIndex:row]];
84 | else
85 | return nil;
86 | }
87 |
88 | - (void)tableView:(NSTableView *)tableView
89 | setObjectValue:(id)object
90 | forTableColumn:(NSTableColumn *)column
91 | row:(int)row
92 | {
93 | NSString *columnId = [[column identifier] stringValue];
94 | if([columnId isEqualToString:@"Path"])
95 | [wads replaceObjectAtIndex:row withObject:object];
96 | }
97 |
98 | @end
99 |
--------------------------------------------------------------------------------
/src/dstrings.h:
--------------------------------------------------------------------------------
1 | /* Emacs style mode select -*- C++ -*-
2 | *-----------------------------------------------------------------------------
3 | *
4 | *
5 | * PrBoom: a Doom port merged with LxDoom and LSDLDoom
6 | * based on BOOM, a modified and improved DOOM engine
7 | * Copyright (C) 1999 by
8 | * id Software, Chi Hoang, Lee Killough, Jim Flynn, Rand Phares, Ty Halderman
9 | * Copyright (C) 1999-2000 by
10 | * Jess Haas, Nicolas Kalkhof, Colin Phipps, Florian Schulze
11 | * Copyright 2005, 2006 by
12 | * Florian Schulze, Colin Phipps, Neil Stevens, Andrey Budko
13 | *
14 | * This program is free software; you can redistribute it and/or
15 | * modify it under the terms of the GNU General Public License
16 | * as published by the Free Software Foundation; either version 2
17 | * of the License, or (at your option) any later version.
18 | *
19 | * This program is distributed in the hope that it will be useful,
20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 | * GNU General Public License for more details.
23 | *
24 | * You should have received a copy of the GNU General Public License
25 | * along with this program; if not, write to the Free Software
26 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
27 | * 02111-1307, USA.
28 | *
29 | * DESCRIPTION:
30 | * DOOM strings, by language.
31 | * Note: In BOOM, some new strings hav ebeen defined that are
32 | * not found in the French version. A better approach is
33 | * to create a BEX text-replacement file for other
34 | * languages since any language can be supported that way
35 | * without recompiling the program.
36 | *
37 | *-----------------------------------------------------------------------------*/
38 |
39 | #ifndef __DSTRINGS__
40 | #define __DSTRINGS__
41 |
42 | /* All important printed strings.
43 | * Language selection (message strings).
44 | * Use -DFRENCH etc.
45 | */
46 |
47 | #ifdef FRENCH
48 | #include "d_french.h"
49 | #else
50 | #include "d_englsh.h"
51 | #endif
52 |
53 | /* Note this is not externally modifiable through DEH/BEX
54 | * Misc. other strings.
55 | * #define SAVEGAMENAME "boomsav" * killough 3/22/98 *
56 | * Ty 05/04/98 - replaced with a modifiable string, see d_deh.c
57 | */
58 |
59 | /*
60 | * File locations,
61 | * relative to current position.
62 | * Path names are OS-sensitive.
63 | */
64 | #define DEVMAPS "devmaps"
65 | #define DEVDATA "devdata"
66 |
67 |
68 | /* Not done in french?
69 | * QuitDOOM messages *
70 | * killough 1/18/98:
71 | * replace hardcoded limit with extern var (silly hack, I know)
72 | */
73 |
74 | #include
75 |
76 | extern const size_t NUM_QUITMESSAGES; /* Calculated in dstrings.c */
77 |
78 | extern const char* const endmsg[]; /* killough 1/18/98 const added */
79 |
80 | #endif
81 |
--------------------------------------------------------------------------------
/src/r_things.h:
--------------------------------------------------------------------------------
1 | /* Emacs style mode select -*- C++ -*-
2 | *-----------------------------------------------------------------------------
3 | *
4 | *
5 | * PrBoom: a Doom port merged with LxDoom and LSDLDoom
6 | * based on BOOM, a modified and improved DOOM engine
7 | * Copyright (C) 1999 by
8 | * id Software, Chi Hoang, Lee Killough, Jim Flynn, Rand Phares, Ty Halderman
9 | * Copyright (C) 1999-2000 by
10 | * Jess Haas, Nicolas Kalkhof, Colin Phipps, Florian Schulze
11 | * Copyright 2005, 2006 by
12 | * Florian Schulze, Colin Phipps, Neil Stevens, Andrey Budko
13 | *
14 | * This program is free software; you can redistribute it and/or
15 | * modify it under the terms of the GNU General Public License
16 | * as published by the Free Software Foundation; either version 2
17 | * of the License, or (at your option) any later version.
18 | *
19 | * This program is distributed in the hope that it will be useful,
20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 | * GNU General Public License for more details.
23 | *
24 | * You should have received a copy of the GNU General Public License
25 | * along with this program; if not, write to the Free Software
26 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
27 | * 02111-1307, USA.
28 | *
29 | * DESCRIPTION:
30 | * Rendering of moving objects, sprites.
31 | *
32 | *-----------------------------------------------------------------------------*/
33 |
34 | #ifndef __R_THINGS__
35 | #define __R_THINGS__
36 |
37 | #ifdef __GNUG__
38 | #pragma interface
39 | #endif
40 |
41 | #include "r_draw.h"
42 |
43 | /* Constant arrays used for psprite clipping and initializing clipping. */
44 |
45 | extern int negonearray[MAX_SCREENWIDTH]; /* killough 2/8/98: */ // dropoff overflow
46 | extern int screenheightarray[MAX_SCREENWIDTH]; /* change to MAX_* */ // dropoff overflow
47 |
48 | /* Vars for R_DrawMaskedColumn */
49 |
50 | extern int *mfloorclip; // dropoff overflow
51 | extern int *mceilingclip; // dropoff overflow
52 | extern fixed_t spryscale;
53 | extern fixed_t sprtopscreen;
54 | extern fixed_t pspritescale;
55 | extern fixed_t pspriteiscale;
56 | /* proff 11/06/98: Added for high-res */
57 | extern fixed_t pspriteyscale;
58 |
59 | void R_DrawMaskedColumn(const rpatch_t *patch,
60 | R_DrawColumn_f colfunc,
61 | draw_column_vars_t *dcvars,
62 | const rcolumn_t *column,
63 | const rcolumn_t *prevcolumn,
64 | const rcolumn_t *nextcolumn);
65 | void R_SortVisSprites(void);
66 | void R_AddSprites(subsector_t* subsec, int lightlevel);
67 | void R_DrawPlayerSprites(void);
68 | void R_InitSprites(const char * const * namelist);
69 | void R_ClearSprites(void);
70 | void R_DrawMasked(void);
71 |
72 | #endif
73 |
--------------------------------------------------------------------------------
/src/p_inter.h:
--------------------------------------------------------------------------------
1 | /* Emacs style mode select -*- C++ -*-
2 | *-----------------------------------------------------------------------------
3 | *
4 | *
5 | * PrBoom: a Doom port merged with LxDoom and LSDLDoom
6 | * based on BOOM, a modified and improved DOOM engine
7 | * Copyright (C) 1999 by
8 | * id Software, Chi Hoang, Lee Killough, Jim Flynn, Rand Phares, Ty Halderman
9 | * Copyright (C) 1999-2000 by
10 | * Jess Haas, Nicolas Kalkhof, Colin Phipps, Florian Schulze
11 | * Copyright 2005, 2006 by
12 | * Florian Schulze, Colin Phipps, Neil Stevens, Andrey Budko
13 | *
14 | * This program is free software; you can redistribute it and/or
15 | * modify it under the terms of the GNU General Public License
16 | * as published by the Free Software Foundation; either version 2
17 | * of the License, or (at your option) any later version.
18 | *
19 | * This program is distributed in the hope that it will be useful,
20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 | * GNU General Public License for more details.
23 | *
24 | * You should have received a copy of the GNU General Public License
25 | * along with this program; if not, write to the Free Software
26 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
27 | * 02111-1307, USA.
28 | *
29 | * DESCRIPTION:
30 | * Thing events, and dehacked specified numbers controlling them.
31 | *
32 | *-----------------------------------------------------------------------------*/
33 |
34 | #ifndef __P_INTER__
35 | #define __P_INTER__
36 |
37 | #include "d_player.h"
38 | #include "p_mobj.h"
39 |
40 | #ifdef __GNUG__
41 | #pragma interface
42 | #endif
43 |
44 | /* Ty 03/09/98 Moved to an int in p_inter.c for deh and externalization */
45 | #define MAXHEALTH maxhealth
46 |
47 | /* follow a player exlusively for 3 seconds */
48 | #define BASETHRESHOLD (100)
49 |
50 | boolean P_GivePower(player_t *, int);
51 | void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher);
52 | void P_DamageMobj(mobj_t *target,mobj_t *inflictor,mobj_t *source,int damage);
53 |
54 | /* killough 5/2/98: moved from d_deh.c, g_game.c, m_misc.c, others: */
55 |
56 | extern int god_health; /* Ty 03/09/98 - deh support, see also p_inter.c */
57 | extern int idfa_armor;
58 | extern int idfa_armor_class;
59 | extern int idkfa_armor;
60 | extern int idkfa_armor_class; /* Ty - end */
61 | /* Ty 03/13/98 - externalized initial settings for respawned player */
62 | extern int initial_health;
63 | extern int initial_bullets;
64 | extern int maxhealth;
65 | extern int max_armor;
66 | extern int green_armor_class;
67 | extern int blue_armor_class;
68 | extern int max_soul;
69 | extern int soul_health;
70 | extern int mega_health;
71 | extern int bfgcells;
72 | extern int monsters_infight; // e6y: Dehacked support - monsters infight
73 | extern int maxammo[], clipammo[];
74 |
75 | #endif
76 |
--------------------------------------------------------------------------------
/src/d_main.h:
--------------------------------------------------------------------------------
1 | /* Emacs style mode select -*- C++ -*-
2 | *-----------------------------------------------------------------------------
3 | *
4 | *
5 | * PrBoom: a Doom port merged with LxDoom and LSDLDoom
6 | * based on BOOM, a modified and improved DOOM engine
7 | * Copyright (C) 1999 by
8 | * id Software, Chi Hoang, Lee Killough, Jim Flynn, Rand Phares, Ty Halderman
9 | * Copyright (C) 1999-2000 by
10 | * Jess Haas, Nicolas Kalkhof, Colin Phipps, Florian Schulze
11 | * Copyright 2005, 2006 by
12 | * Florian Schulze, Colin Phipps, Neil Stevens, Andrey Budko
13 | *
14 | * This program is free software; you can redistribute it and/or
15 | * modify it under the terms of the GNU General Public License
16 | * as published by the Free Software Foundation; either version 2
17 | * of the License, or (at your option) any later version.
18 | *
19 | * This program is distributed in the hope that it will be useful,
20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 | * GNU General Public License for more details.
23 | *
24 | * You should have received a copy of the GNU General Public License
25 | * along with this program; if not, write to the Free Software
26 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
27 | * 02111-1307, USA.
28 | *
29 | * DESCRIPTION:
30 | * Main startup and splash screenstuff.
31 | *
32 | *-----------------------------------------------------------------------------*/
33 |
34 | #ifndef __D_MAIN__
35 | #define __D_MAIN__
36 |
37 | #include "d_event.h"
38 | #include "w_wad.h"
39 |
40 | #ifdef __GNUG__
41 | #pragma interface
42 | #endif
43 |
44 | /* CPhipps - removed wadfiles[] stuff to w_wad.h */
45 |
46 | extern char basesavegame[]; // killough 2/16/98: savegame path
47 |
48 | //jff 1/24/98 make command line copies of play modes available
49 | extern boolean clnomonsters; // checkparm of -nomonsters
50 | extern boolean clrespawnparm; // checkparm of -respawn
51 | extern boolean clfastparm; // checkparm of -fast
52 | //jff end of external declaration of command line playmode
53 |
54 | extern boolean nosfxparm;
55 | extern boolean nomusicparm;
56 | extern int ffmap;
57 |
58 | // Called by IO functions when input is detected.
59 | void D_PostEvent(event_t* ev);
60 |
61 | // Demo stuff
62 | extern boolean advancedemo;
63 | void D_AdvanceDemo(void);
64 | void D_DoAdvanceDemo (void);
65 |
66 | //
67 | // BASE LEVEL
68 | //
69 |
70 | void D_Display(void);
71 | void D_PageTicker(void);
72 | void D_StartTitle(void);
73 | void D_DoomMain(void);
74 | void D_AddFile (const char *file, wad_source_t source);
75 |
76 | /* cph - MBF-like wad/deh/bex autoload code */
77 | /* proff 2001/7/1 - added prboom.wad as last entry so it's always loaded and
78 | doesn't overlap with the cfg settings */
79 | #define MAXLOADFILES 3
80 | extern const char *wad_files[MAXLOADFILES], *deh_files[MAXLOADFILES];
81 |
82 | #endif
83 |
--------------------------------------------------------------------------------
/src/i_video.h:
--------------------------------------------------------------------------------
1 | /* Emacs style mode select -*- C++ -*-
2 | *-----------------------------------------------------------------------------
3 | *
4 | *
5 | * PrBoom: a Doom port merged with LxDoom and LSDLDoom
6 | * based on BOOM, a modified and improved DOOM engine
7 | * Copyright (C) 1999 by
8 | * id Software, Chi Hoang, Lee Killough, Jim Flynn, Rand Phares, Ty Halderman
9 | * Copyright (C) 1999-2000 by
10 | * Jess Haas, Nicolas Kalkhof, Colin Phipps, Florian Schulze
11 | * Copyright 2005, 2006 by
12 | * Florian Schulze, Colin Phipps, Neil Stevens, Andrey Budko
13 | *
14 | * This program is free software; you can redistribute it and/or
15 | * modify it under the terms of the GNU General Public License
16 | * as published by the Free Software Foundation; either version 2
17 | * of the License, or (at your option) any later version.
18 | *
19 | * This program is distributed in the hope that it will be useful,
20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 | * GNU General Public License for more details.
23 | *
24 | * You should have received a copy of the GNU General Public License
25 | * along with this program; if not, write to the Free Software
26 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
27 | * 02111-1307, USA.
28 | *
29 | * DESCRIPTION:
30 | * System specific interface stuff.
31 | *
32 | *-----------------------------------------------------------------------------*/
33 |
34 | #ifndef __I_VIDEO__
35 | #define __I_VIDEO__
36 |
37 | #include "doomtype.h"
38 | #include "v_video.h"
39 |
40 | #ifdef __GNUG__
41 | #pragma interface
42 | #endif
43 |
44 | void I_PreInitGraphics(void); /* CPhipps - do stuff immediately on start */
45 | void I_CalculateRes(unsigned int width, unsigned int height); /* calculate resolution */
46 | void I_SetRes(void); /* set resolution */
47 | void I_InitGraphics (void);
48 | void I_UpdateVideoMode(void);
49 | void I_ShutdownGraphics(void);
50 |
51 | /* Takes full 8 bit values. */
52 | void I_SetPalette(int pal); /* CPhipps - pass down palette number */
53 |
54 | void I_UpdateNoBlit (void);
55 | void I_FinishUpdate (void);
56 |
57 | int I_ScreenShot (const char *fname);
58 |
59 | /* I_StartTic
60 | * Called by D_DoomLoop,
61 | * called before processing each tic in a frame.
62 | * Quick syncronous operations are performed here.
63 | * Can call D_PostEvent.
64 | */
65 | void I_StartTic (void);
66 |
67 | /* I_StartFrame
68 | * Called by D_DoomLoop,
69 | * called before processing any tics in a frame
70 | * (just after displaying a frame).
71 | * Time consuming syncronous operations
72 | * are performed here (joystick reading).
73 | * Can call D_PostEvent.
74 | */
75 |
76 | void I_StartFrame (void);
77 |
78 | extern int use_doublebuffer; /* proff 2001-7-4 - controls wether to use doublebuffering*/
79 | extern int use_fullscreen; /* proff 21/05/2000 */
80 | extern int desired_fullscreen; //e6y
81 |
82 | #endif
83 |
--------------------------------------------------------------------------------
/doc/README.demos:
--------------------------------------------------------------------------------
1 | PrBoom demo support
2 | ===================
3 |
4 | PrBoom has lots of demo options compared to most Doom ports, so I decided to
5 | write a brief document outlining the features. If you're thinking of
6 | recording demos, you're strongly advised to read this.
7 |
8 | To play demos, you of course use "prboom -playdemo demoname" (the .lmp is
9 | optional). To the best of my knowledge, PrBoom should play all MBF and new
10 | PrBoom demos perfectly. It also plays most Doom v1.9 demos (significantly more
11 | than Boom or MBF); almost all demos recorded with ultimate doom or doom2.exe
12 | version v1.9 should work (please let me know if you find ones that don't), but
13 | there are still problems with doom95 and final doom though. It should play most
14 | Boom v2.01 and v2.02 demos, although I don't know of that many to test with. It
15 | will also try to play older Doom demos, LxDoom demos, and Boom v2.00 demos.
16 |
17 | Recording demos is done with "prboom -record demoname". **IMPORTANT** PrBoom
18 | will record to a number of demo formats, namely Doom v1.9, Boom v2.02, MBF,
19 | and PrBoom - which format it records is determined by your current
20 | compatibility level, see README.compat. The purpose of this feature is so
21 | people like me that won't let DOS anywhere near their computers can record
22 | demos compatible with other engines.
23 |
24 | PrBoom supports the -recordfrom parameter, which starts recording a demo
25 | from a given savegame. "-recordfrom demoname n" is a synonym for "-record
26 | demoname -loadgame n", which records a demo from savegame number n.
27 |
28 | People doing speedrun demos may be interested in the comp_moveblock option,
29 | see README.compat.
30 |
31 | PrBoom supports loading and saving games during demo recording and playback
32 | (but only for new PrBoom demos, not for older demo formats, obviously).
33 | Don't worry, saves in demo playback are written with different names, they
34 | don't overwrite your own saves. Saves when recording, do. You can load games
35 | during recording, but they'd better be games saved during the same
36 | recording, otherwise it won't play back.
37 |
38 | PrBoom supports continuation of recorded demos. This is the scenario this
39 | feature is designed for: say you're beta testing a level for someone, and
40 | you want to send them a *complete* demo of how the level went (saves, deaths
41 | and reloads and all). You start with "prboom test.wad -record test", play
42 | for half an hour, save and exit. Next day, you go to play again, with
43 | "prboom test.wad -record test" again. PrBoom will scan the existing
44 | test.lmp, find the savegame command, and insert a loadgame command to reload
45 | that game; it will reload the game and continue recording of the demo. This
46 | is an experimental feature, but hopefully it works :-).
47 |
48 | **IMPORTANT** The observant will have noticed from the above that PrBoom
49 | won't overwrite existing demos anymore. If you want to record over a demo,
50 | delete it first.
51 |
52 | I think that's all for now.
53 |
54 | - Colin
55 |
--------------------------------------------------------------------------------
/src/mmus2mid.h:
--------------------------------------------------------------------------------
1 | /* Emacs style mode select -*- C++ -*-
2 | *-----------------------------------------------------------------------------
3 | *
4 | *
5 | * PrBoom: a Doom port merged with LxDoom and LSDLDoom
6 | * based on BOOM, a modified and improved DOOM engine
7 | * Copyright (C) 1999 by
8 | * id Software, Chi Hoang, Lee Killough, Jim Flynn, Rand Phares, Ty Halderman
9 | * Copyright (C) 1999-2000 by
10 | * Jess Haas, Nicolas Kalkhof, Colin Phipps, Florian Schulze
11 | * Copyright 2005, 2006 by
12 | * Florian Schulze, Colin Phipps, Neil Stevens, Andrey Budko
13 | *
14 | * This program is free software; you can redistribute it and/or
15 | * modify it under the terms of the GNU General Public License
16 | * as published by the Free Software Foundation; either version 2
17 | * of the License, or (at your option) any later version.
18 | *
19 | * This program is distributed in the hope that it will be useful,
20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 | * GNU General Public License for more details.
23 | *
24 | * You should have received a copy of the GNU General Public License
25 | * along with this program; if not, write to the Free Software
26 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
27 | * 02111-1307, USA.
28 | *
29 | * DESCRIPTION:
30 | * mmus2mid.c supports conversion of MUS format music in memory
31 | * to MIDI format 1 music in memory.
32 | */
33 |
34 | #if !defined( MMUS2MID_H )
35 | #define MMUS2MID_H
36 |
37 | // error codes
38 |
39 | typedef enum
40 | {
41 | MUSDATACOR, // MUS data corrupt
42 | TOOMCHAN, // Too many channels
43 | MEMALLOC, // Memory allocation error
44 | MUSDATAMT, // MUS file empty
45 | BADMUSCTL, // MUS event 5 or 7 found
46 | BADSYSEVT, // MUS system event not in 10-14 range
47 | BADCTLCHG, // MUS control change larger than 9
48 | TRACKOVF, // MIDI track exceeds allocation
49 | BADMIDHDR, // bad midi header detected
50 | } error_code_t;
51 |
52 | // some names for integers of various sizes, all unsigned
53 | typedef unsigned char UBYTE; // a one-byte int
54 | typedef unsigned short UWORD; // a two-byte int
55 | // proff: changed from unsigned int to unsigned long to avoid warning
56 | typedef unsigned long ULONG; // a four-byte int (assumes int 4 bytes)
57 |
58 | #ifndef MSDOS /* proff: This is from allegro.h */
59 | #define MIDI_TRACKS 32
60 |
61 | typedef struct MIDI /* a midi file */
62 | {
63 | int divisions; /* number of ticks per quarter note */
64 | struct {
65 | unsigned char *data; /* MIDI message stream */
66 | int len; /* length of the track data */
67 | } track[MIDI_TRACKS];
68 | } MIDI;
69 | #endif /* !MSDOS */
70 |
71 | extern int mmus2mid(const UBYTE *mus,MIDI *mid, UWORD division, int nocomp);
72 | extern void free_mididata(MIDI *mid);
73 | extern int MIDIToMidi(MIDI *mididata,UBYTE **mid,int *midlen);
74 | extern int MidiToMIDI(UBYTE *mid,MIDI *mididata);
75 |
76 | #endif
77 |
--------------------------------------------------------------------------------
/src/MAC/English.lproj/MainMenu.nib/classes.nib:
--------------------------------------------------------------------------------
1 | {
2 | IBClasses = (
3 | {
4 | CLASS = ConsoleController;
5 | LANGUAGE = ObjC;
6 | OUTLETS = {textView = NSTextView; };
7 | SUPERCLASS = NSWindowController;
8 | },
9 | {
10 | CLASS = DrawerButton;
11 | LANGUAGE = ObjC;
12 | OUTLETS = {drawer = NSDrawer; };
13 | SUPERCLASS = NSButton;
14 | },
15 | {
16 | ACTIONS = {buttonClicked = id; };
17 | CLASS = FileButtonController;
18 | LANGUAGE = ObjC;
19 | OUTLETS = {button = NSButton; field = id; };
20 | SUPERCLASS = NSObject;
21 | },
22 | {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
23 | {
24 | ACTIONS = {
25 | demoButtonClicked = id;
26 | disableSoundClicked = id;
27 | gameButtonClicked = id;
28 | openWebsite = id;
29 | showConsoleClicked = id;
30 | showGameFolderClicked = id;
31 | startClicked = id;
32 | };
33 | CLASS = LauncherApp;
34 | LANGUAGE = ObjC;
35 | OUTLETS = {
36 | compatibilityLevelButton = id;
37 | configFileButtonController = id;
38 | consoleController = id;
39 | debugDrawer = id;
40 | demoDrawer = id;
41 | demoFileButtonController = id;
42 | demoMatrix = id;
43 | disableGraphicsButton = id;
44 | disableJoystickButton = id;
45 | disableMouseButton = id;
46 | disableMusicButton = id;
47 | disableSoundButton = id;
48 | disableSoundEffectsButton = id;
49 | fastDemoButton = id;
50 | fastMonstersButton = id;
51 | ffToLevelField = id;
52 | fullscreenButton = id;
53 | gameButton = id;
54 | gameMenu = id;
55 | graphicsModeComboBox = id;
56 | launchButton = id;
57 | noDemoButton = id;
58 | noMonstersButton = id;
59 | playDemoButton = id;
60 | resolutionComboBox = id;
61 | respawnMonstersButton = id;
62 | timeDemoButton = id;
63 | wadDrawer = id;
64 | wadViewController = id;
65 | window = id;
66 | };
67 | SUPERCLASS = NSObject;
68 | },
69 | {CLASS = RMUDAnsiTextView; LANGUAGE = ObjC; SUPERCLASS = NSTextView; },
70 | {CLASS = ResolutionDataSource; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
71 | {
72 | ACTIONS = {add = id; remove = id; };
73 | CLASS = WadViewController;
74 | LANGUAGE = ObjC;
75 | OUTLETS = {removeButton = id; view = id; };
76 | SUPERCLASS = NSObject;
77 | }
78 | );
79 | IBVersion = 1;
80 | }
--------------------------------------------------------------------------------
/src/r_demo.c:
--------------------------------------------------------------------------------
1 | /* Emacs style mode select -*- C++ -*-
2 | *-----------------------------------------------------------------------------
3 | *
4 | *
5 | * PrBoom: a Doom port merged with LxDoom and LSDLDoom
6 | * based on BOOM, a modified and improved DOOM engine
7 | * Copyright (C) 1999 by
8 | * id Software, Chi Hoang, Lee Killough, Jim Flynn, Rand Phares, Ty Halderman
9 | * Copyright (C) 1999-2000 by
10 | * Jess Haas, Nicolas Kalkhof, Colin Phipps, Florian Schulze, Andrey Budko
11 | * Copyright 2005, 2006 by
12 | * Florian Schulze, Colin Phipps, Neil Stevens, Andrey Budko
13 | *
14 | * This program is free software; you can redistribute it and/or
15 | * modify it under the terms of the GNU General Public License
16 | * as published by the Free Software Foundation; either version 2
17 | * of the License, or (at your option) any later version.
18 | *
19 | * This program is distributed in the hope that it will be useful,
20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 | * GNU General Public License for more details.
23 | *
24 | * You should have received a copy of the GNU General Public License
25 | * along with this program; if not, write to the Free Software
26 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
27 | * 02111-1307, USA.
28 | *
29 | * DESCRIPTION:
30 | * Demo stuff
31 | *
32 | *---------------------------------------------------------------------
33 | */
34 |
35 | #include "doomstat.h"
36 | #include "r_demo.h"
37 | #include "r_fps.h"
38 |
39 | int demo_smoothturns = false;
40 | int demo_smoothturnsfactor = 6;
41 |
42 | static int smooth_playing_turns[SMOOTH_PLAYING_MAXFACTOR];
43 | static int_64_t smooth_playing_sum;
44 | static int smooth_playing_index;
45 | static angle_t smooth_playing_angle;
46 |
47 | void R_SmoothPlaying_Reset(player_t *player)
48 | {
49 | if (demo_smoothturns && demoplayback && players)
50 | {
51 | if (!player)
52 | player = &players[displayplayer];
53 |
54 | if (player==&players[displayplayer])
55 | {
56 | smooth_playing_angle = players[displayplayer].mo->angle;
57 | memset(smooth_playing_turns, 0, sizeof(smooth_playing_turns[0]) * SMOOTH_PLAYING_MAXFACTOR);
58 | smooth_playing_sum = 0;
59 | smooth_playing_index = 0;
60 | }
61 | }
62 | }
63 |
64 | void R_SmoothPlaying_Add(int delta)
65 | {
66 | if (demo_smoothturns && demoplayback)
67 | {
68 | smooth_playing_sum -= smooth_playing_turns[smooth_playing_index];
69 | smooth_playing_turns[smooth_playing_index] = delta;
70 | smooth_playing_index = (smooth_playing_index + 1)%(demo_smoothturnsfactor);
71 | smooth_playing_sum += delta;
72 | smooth_playing_angle += (int)(smooth_playing_sum/(demo_smoothturnsfactor));
73 | }
74 | }
75 |
76 | angle_t R_SmoothPlaying_Get(angle_t defangle)
77 | {
78 | if (demo_smoothturns && demoplayback)
79 | return smooth_playing_angle;
80 | else
81 | return defangle;
82 | }
83 |
84 | void R_ResetAfterTeleport(player_t *player)
85 | {
86 | R_ResetViewInterpolation();
87 | R_SmoothPlaying_Reset(player);
88 | }
89 |
--------------------------------------------------------------------------------
/src/gl_intern.h:
--------------------------------------------------------------------------------
1 | /* Emacs style mode select -*- C++ -*-
2 | *-----------------------------------------------------------------------------
3 | *
4 | *
5 | * PrBoom: a Doom port merged with LxDoom and LSDLDoom
6 | * based on BOOM, a modified and improved DOOM engine
7 | * Copyright (C) 1999 by
8 | * id Software, Chi Hoang, Lee Killough, Jim Flynn, Rand Phares, Ty Halderman
9 | * Copyright (C) 1999-2000 by
10 | * Jess Haas, Nicolas Kalkhof, Colin Phipps, Florian Schulze
11 | * Copyright 2005, 2006 by
12 | * Florian Schulze, Colin Phipps, Neil Stevens, Andrey Budko
13 | *
14 | * This program is free software; you can redistribute it and/or
15 | * modify it under the terms of the GNU General Public License
16 | * as published by the Free Software Foundation; either version 2
17 | * of the License, or (at your option) any later version.
18 | *
19 | * This program is distributed in the hope that it will be useful,
20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 | * GNU General Public License for more details.
23 | *
24 | * You should have received a copy of the GNU General Public License
25 | * along with this program; if not, write to the Free Software
26 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
27 | * 02111-1307, USA.
28 | *
29 | * DESCRIPTION:
30 | *
31 | *---------------------------------------------------------------------
32 | */
33 |
34 | #ifndef _GL_INTERN_H
35 | #define _GL_INTERN_H
36 |
37 | typedef enum
38 | {
39 | GLDT_UNREGISTERED,
40 | GLDT_BROKEN,
41 | GLDT_PATCH,
42 | GLDT_TEXTURE,
43 | GLDT_FLAT
44 | } GLTexType;
45 |
46 | typedef struct
47 | {
48 | int index;
49 | int width,height;
50 | int leftoffset,topoffset;
51 | int tex_width,tex_height;
52 | int realtexwidth, realtexheight;
53 | int buffer_width,buffer_height;
54 | int buffer_size;
55 | int glTexID[CR_LIMIT+MAXPLAYERS];
56 | GLTexType textype;
57 | boolean mipmap;
58 | } GLTexture;
59 |
60 | extern int gld_max_texturesize;
61 | extern char *gl_tex_format_string;
62 | extern int gl_tex_format;
63 | extern int gl_tex_filter;
64 | extern int gl_mipmap_filter;
65 | extern int gl_texture_filter_anisotropic;
66 | extern int gl_paletted_texture;
67 | extern int gl_shared_texture_palette;
68 | extern boolean use_mipmapping;
69 | extern int transparent_pal_index;
70 | extern unsigned char gld_palmap[256];
71 | extern GLTexture *last_gltexture;
72 | extern int last_cm;
73 |
74 | //e6y: in some cases textures with a zero index (NO_TEXTURE) should be registered
75 | GLTexture *gld_RegisterTexture(int texture_num, boolean mipmap, boolean force);
76 | void gld_BindTexture(GLTexture *gltexture);
77 | GLTexture *gld_RegisterPatch(int lump, int cm);
78 | void gld_BindPatch(GLTexture *gltexture, int cm);
79 | GLTexture *gld_RegisterFlat(int lump, boolean mipmap);
80 | void gld_BindFlat(GLTexture *gltexture);
81 | void gld_InitPalettedTextures(void);
82 | int gld_GetTexDimension(int value);
83 | void gld_SetTexturePalette(GLenum target);
84 | void gld_Precache(void);
85 |
86 | PFNGLCOLORTABLEEXTPROC gld_ColorTableEXT;
87 |
88 | #endif // _GL_INTERN_H
89 |
--------------------------------------------------------------------------------
/src/d_think.h:
--------------------------------------------------------------------------------
1 | /* Emacs style mode select -*- C++ -*-
2 | *-----------------------------------------------------------------------------
3 | *
4 | *
5 | * PrBoom: a Doom port merged with LxDoom and LSDLDoom
6 | * based on BOOM, a modified and improved DOOM engine
7 | * Copyright (C) 1999 by
8 | * id Software, Chi Hoang, Lee Killough, Jim Flynn, Rand Phares, Ty Halderman
9 | * Copyright (C) 1999-2000 by
10 | * Jess Haas, Nicolas Kalkhof, Colin Phipps, Florian Schulze
11 | * Copyright 2005, 2006 by
12 | * Florian Schulze, Colin Phipps, Neil Stevens, Andrey Budko
13 | *
14 | * This program is free software; you can redistribute it and/or
15 | * modify it under the terms of the GNU General Public License
16 | * as published by the Free Software Foundation; either version 2
17 | * of the License, or (at your option) any later version.
18 | *
19 | * This program is distributed in the hope that it will be useful,
20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 | * GNU General Public License for more details.
23 | *
24 | * You should have received a copy of the GNU General Public License
25 | * along with this program; if not, write to the Free Software
26 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
27 | * 02111-1307, USA.
28 | *
29 | * DESCRIPTION:
30 | * MapObj data. Map Objects or mobjs are actors, entities,
31 | * thinker, take-your-pick... anything that moves, acts, or
32 | * suffers state changes of more or less violent nature.
33 | *
34 | *-----------------------------------------------------------------------------*/
35 |
36 | #ifndef __D_THINK__
37 | #define __D_THINK__
38 |
39 | #ifdef __GNUG__
40 | #pragma interface
41 | #endif
42 |
43 | /*
44 | * Experimental stuff.
45 | * To compile this as "ANSI C with classes"
46 | * we will need to handle the various
47 | * action functions cleanly.
48 | */
49 | // killough 11/98: convert back to C instead of C++
50 | typedef void (*actionf_t)();
51 | //typedef void (*actionf_v)();
52 | //typedef void (*actionf_p1)( void* );
53 | //typedef void (*actionf_p2)( void*, void* );
54 |
55 | /* Note: In d_deh.c you will find references to these
56 | * wherever code pointers and function handlers exist
57 | */
58 | /*
59 | typedef union
60 | {
61 | actionf_p1 acp1;
62 | actionf_v acv;
63 | actionf_p2 acp2;
64 |
65 | } actionf_t;
66 | */
67 |
68 | /* Historically, "think_t" is yet another
69 | * function pointer to a routine to handle
70 | * an actor.
71 | */
72 | typedef actionf_t think_t;
73 |
74 |
75 | /* Doubly linked list of actors. */
76 | typedef struct thinker_s
77 | {
78 | struct thinker_s* prev;
79 | struct thinker_s* next;
80 | think_t function;
81 |
82 | /* killough 8/29/98: we maintain thinkers in several equivalence classes,
83 | * according to various criteria, so as to allow quicker searches.
84 | */
85 |
86 | struct thinker_s *cnext, *cprev; /* Next, previous thinkers in same class */
87 |
88 | /* killough 11/98: count of how many other objects reference
89 | * this one using pointers. Used for garbage collection.
90 | */
91 | unsigned references;
92 | } thinker_t;
93 |
94 | #endif
95 |
--------------------------------------------------------------------------------
/src/tables.h:
--------------------------------------------------------------------------------
1 | /* Emacs style mode select -*- C++ -*-
2 | *-----------------------------------------------------------------------------
3 | *
4 | *
5 | * PrBoom: a Doom port merged with LxDoom and LSDLDoom
6 | * based on BOOM, a modified and improved DOOM engine
7 | * Copyright (C) 1999 by
8 | * id Software, Chi Hoang, Lee Killough, Jim Flynn, Rand Phares, Ty Halderman
9 | * Copyright (C) 1999-2000 by
10 | * Jess Haas, Nicolas Kalkhof, Colin Phipps, Florian Schulze
11 | * Copyright 2005, 2006 by
12 | * Florian Schulze, Colin Phipps, Neil Stevens, Andrey Budko
13 | *
14 | * This program is free software; you can redistribute it and/or
15 | * modify it under the terms of the GNU General Public License
16 | * as published by the Free Software Foundation; either version 2
17 | * of the License, or (at your option) any later version.
18 | *
19 | * This program is distributed in the hope that it will be useful,
20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 | * GNU General Public License for more details.
23 | *
24 | * You should have received a copy of the GNU General Public License
25 | * along with this program; if not, write to the Free Software
26 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
27 | * 02111-1307, USA.
28 | *
29 | * DESCRIPTION:
30 | * Lookup tables.
31 | * Do not try to look them up :-).
32 | * In the order of appearance:
33 | *
34 | * int finetangent[4096] - Tangens LUT.
35 | * Should work with BAM fairly well (12 of 16bit,
36 | * effectively, by shifting).
37 | *
38 | * int finesine[10240] - Sine lookup.
39 | * Guess what, serves as cosine, too.
40 | * Remarkable thing is, how to use BAMs with this?
41 | *
42 | * int tantoangle[2049] - ArcTan LUT,
43 | * maps tan(angle) to angle fast. Gotta search.
44 | *
45 | *-----------------------------------------------------------------------------*/
46 |
47 | #ifndef __TABLES__
48 | #define __TABLES__
49 |
50 | #include "m_fixed.h"
51 |
52 | #define FINEANGLES 8192
53 | #define FINEMASK (FINEANGLES-1)
54 |
55 | // 0x100000000 to 0x2000
56 | #define ANGLETOFINESHIFT 19
57 |
58 | // Binary Angle Measument, BAM.
59 | #define ANG45 0x20000000
60 | #define ANG90 0x40000000
61 | #define ANG180 0x80000000
62 | #define ANG270 0xc0000000
63 | #ifndef M_PI
64 | #define M_PI 3.14159265358979323846
65 | #endif
66 |
67 | #define SLOPERANGE 2048
68 | #define SLOPEBITS 11
69 | #define DBITS (FRACBITS-SLOPEBITS)
70 |
71 | typedef unsigned angle_t;
72 |
73 | // Load trig tables if needed
74 | void R_LoadTrigTables(void);
75 |
76 | // Effective size is 10240.
77 | extern fixed_t finesine[5*FINEANGLES/4];
78 |
79 | // Re-use data, is just PI/2 phase shift.
80 | static fixed_t *const finecosine = finesine + (FINEANGLES/4);
81 |
82 | // Effective size is 4096.
83 | extern fixed_t finetangent[FINEANGLES/2];
84 |
85 | // Effective size is 2049;
86 | // The +1 size is to handle the case when x==y without additional checking.
87 |
88 | extern angle_t tantoangle[SLOPERANGE+1];
89 |
90 | // Utility function, called by R_PointToAngle.
91 | int SlopeDiv(unsigned num, unsigned den);
92 |
93 | #endif
94 |
--------------------------------------------------------------------------------
/src/Makefile.am:
--------------------------------------------------------------------------------
1 | #
2 | # automake Makefile.am for the PrBoom source directory
3 | #
4 | #
5 | # Process this file with automake to produce Makefile.in
6 | #
7 | #
8 |
9 | SUBDIRS = SDL POSIX MAC
10 |
11 | gamesdir=$(prefix)/games
12 | games_PROGRAMS = prboom prboom-game-server
13 |
14 | CFLAGS = @CFLAGS@ @SDL_CFLAGS@
15 |
16 | prboom_game_server_SOURCES = d_server.c protocol.h
17 | prboom_game_server_LDADD = POSIX/libposixdoom.a SDL/i_network.o @NET_LIBS@ @SDL_LIBS@
18 |
19 | COMMON_SRC = \
20 | am_map.c g_game.c p_maputl.h r_plane.h \
21 | am_map.h g_game.h p_mobj.c r_demo.c r_segs.c \
22 | hu_lib.c lprintf.c p_mobj.h r_demo.h r_segs.h \
23 | hu_lib.h lprintf.h p_plats.c r_sky.c \
24 | d_deh.c hu_stuff.c m_argv.c p_pspr.c r_sky.h \
25 | d_deh.h hu_stuff.h m_argv.h p_pspr.h r_state.h \
26 | d_englsh.h i_joy.h m_bbox.c p_saveg.c r_things.c \
27 | d_event.h m_bbox.h p_saveg.h r_things.h \
28 | d_items.c i_network.h m_cheat.c p_setup.c s_sound.c \
29 | d_items.h i_sound.h m_cheat.h p_setup.h s_sound.h \
30 | d_main.c i_system.h m_fixed.h p_sight.c sounds.c \
31 | d_main.h i_video.h m_menu.c p_spec.c sounds.h \
32 | info.c m_menu.h p_spec.h st_lib.c \
33 | d_net.h info.h m_misc.c p_switch.c st_lib.h \
34 | d_player.h m_misc.h p_telept.c st_stuff.c \
35 | m_random.c p_tick.c st_stuff.h i_main.h \
36 | d_think.h m_random.h p_tick.h tables.c \
37 | d_ticcmd.h m_swap.h p_user.c tables.h \
38 | doomdata.h p_ceilng.c p_user.h v_video.c \
39 | doomdef.c p_doors.c protocol.h v_video.h \
40 | doomdef.h p_enemy.c r_bsp.c version.c \
41 | doomstat.c p_enemy.h r_bsp.h version.h \
42 | doomstat.h p_floor.c r_data.c w_wad.c \
43 | doomtype.h p_genlin.c r_data.h w_wad.h \
44 | dstrings.c p_inter.c r_defs.h wi_stuff.c \
45 | dstrings.h p_inter.h r_draw.c wi_stuff.h \
46 | f_finale.c p_lights.c r_draw.h z_bmalloc.c \
47 | f_finale.h p_map.c r_main.c z_bmalloc.h \
48 | f_wipe.c p_map.h r_main.h z_zone.c \
49 | f_wipe.h p_maputl.c r_plane.c z_zone.h \
50 | md5.c md5.h p_checksum.h p_checksum.c \
51 | r_patch.c r_patch.h r_fps.c r_fps.h \
52 | r_filter.c r_filter.h
53 |
54 | NET_CLIENT_SRC = d_client.c
55 |
56 | if BUILD_GL
57 | USE_GL_SRC = gl_intern.h gl_main.c gl_struct.h gl_texture.c
58 | else
59 | USE_GL_SRC =
60 | endif
61 |
62 | if WAD_MMAP
63 | WAD_SRC = w_mmap.c
64 | else
65 | WAD_SRC = w_memcache.c
66 | endif
67 |
68 | prboom_SOURCES = mmus2mid.c mmus2mid.h $(COMMON_SRC) $(NET_CLIENT_SRC) $(USE_GL_SRC) $(WAD_SRC)
69 | prboom_LDADD = SDL/libsdldoom.a @MIXER_LIBS@ @NET_LIBS@ @SDL_LIBS@ @GL_LIBS@ @MATH_LIB@
70 |
71 | EXTRA_DIST = \
72 | r_drawcolumn.inl r_drawflush.inl r_drawspan.inl r_drawcolpipeline.inl
73 |
--------------------------------------------------------------------------------
/src/s_sound.h:
--------------------------------------------------------------------------------
1 | /* Emacs style mode select -*- C++ -*-
2 | *-----------------------------------------------------------------------------
3 | *
4 | *
5 | * PrBoom: a Doom port merged with LxDoom and LSDLDoom
6 | * based on BOOM, a modified and improved DOOM engine
7 | * Copyright (C) 1999 by
8 | * id Software, Chi Hoang, Lee Killough, Jim Flynn, Rand Phares, Ty Halderman
9 | * Copyright (C) 1999-2000 by
10 | * Jess Haas, Nicolas Kalkhof, Colin Phipps, Florian Schulze
11 | * Copyright 2005, 2006 by
12 | * Florian Schulze, Colin Phipps, Neil Stevens, Andrey Budko
13 | *
14 | * This program is free software; you can redistribute it and/or
15 | * modify it under the terms of the GNU General Public License
16 | * as published by the Free Software Foundation; either version 2
17 | * of the License, or (at your option) any later version.
18 | *
19 | * This program is distributed in the hope that it will be useful,
20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 | * GNU General Public License for more details.
23 | *
24 | * You should have received a copy of the GNU General Public License
25 | * along with this program; if not, write to the Free Software
26 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
27 | * 02111-1307, USA.
28 | *
29 | * DESCRIPTION:
30 | * The not so system specific sound interface.
31 | *
32 | *-----------------------------------------------------------------------------*/
33 |
34 | #ifndef __S_SOUND__
35 | #define __S_SOUND__
36 |
37 | #ifdef __GNUG__
38 | #pragma interface
39 | #endif
40 |
41 | //
42 | // Initializes sound stuff, including volume
43 | // Sets channels, SFX and music volume,
44 | // allocates channel buffer, sets S_sfx lookup.
45 | //
46 | void S_Init(int sfxVolume, int musicVolume);
47 |
48 | // Kills all sounds
49 | void S_Stop(void);
50 |
51 | //
52 | // Per level startup code.
53 | // Kills playing sounds at start of level,
54 | // determines music if any, changes music.
55 | //
56 | void S_Start(void);
57 |
58 | //
59 | // Start sound for thing at
60 | // using from sounds.h
61 | //
62 | void S_StartSound(void *origin, int sound_id);
63 |
64 | // Will start a sound at a given volume.
65 | void S_StartSoundAtVolume(void *origin, int sound_id, int volume);
66 |
67 | // killough 4/25/98: mask used to indicate sound origin is player item pickup
68 | #define PICKUP_SOUND (0x8000)
69 |
70 | // Stop sound for thing at
71 | void S_StopSound(void* origin);
72 |
73 | // Start music using from sounds.h
74 | void S_StartMusic(int music_id);
75 |
76 | // Start music using from sounds.h, and set whether looping
77 | void S_ChangeMusic(int music_id, int looping);
78 |
79 | // Stops the music fer sure.
80 | void S_StopMusic(void);
81 |
82 | // Stop and resume music, during game PAUSE.
83 | void S_PauseSound(void);
84 | void S_ResumeSound(void);
85 |
86 | //
87 | // Updates music & sounds
88 | //
89 | void S_UpdateSounds(void* listener);
90 | void S_SetMusicVolume(int volume);
91 | void S_SetSfxVolume(int volume);
92 |
93 | // machine-independent sound params
94 | extern int default_numChannels;
95 | extern int numChannels;
96 |
97 | //jff 3/17/98 holds last IDMUS number, or -1
98 | extern int idmusnum;
99 |
100 | #endif
101 |
--------------------------------------------------------------------------------
/src/p_maputl.h:
--------------------------------------------------------------------------------
1 | /* Emacs style mode select -*- C++ -*-
2 | *-----------------------------------------------------------------------------
3 | *
4 | *
5 | * PrBoom: a Doom port merged with LxDoom and LSDLDoom
6 | * based on BOOM, a modified and improved DOOM engine
7 | * Copyright (C) 1999 by
8 | * id Software, Chi Hoang, Lee Killough, Jim Flynn, Rand Phares, Ty Halderman
9 | * Copyright (C) 1999-2000 by
10 | * Jess Haas, Nicolas Kalkhof, Colin Phipps, Florian Schulze
11 | * Copyright 2005, 2006 by
12 | * Florian Schulze, Colin Phipps, Neil Stevens, Andrey Budko
13 | *
14 | * This program is free software; you can redistribute it and/or
15 | * modify it under the terms of the GNU General Public License
16 | * as published by the Free Software Foundation; either version 2
17 | * of the License, or (at your option) any later version.
18 | *
19 | * This program is distributed in the hope that it will be useful,
20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 | * GNU General Public License for more details.
23 | *
24 | * You should have received a copy of the GNU General Public License
25 | * along with this program; if not, write to the Free Software
26 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
27 | * 02111-1307, USA.
28 | *
29 | * DESCRIPTION:
30 | * Map utility functions
31 | *
32 | *-----------------------------------------------------------------------------*/
33 |
34 | #ifndef __P_MAPUTL__
35 | #define __P_MAPUTL__
36 |
37 | #include "r_defs.h"
38 |
39 | /* mapblocks are used to check movement against lines and things */
40 | #define MAPBLOCKUNITS 128
41 | #define MAPBLOCKSIZE (MAPBLOCKUNITS*FRACUNIT)
42 | #define MAPBLOCKSHIFT (FRACBITS+7)
43 | #define MAPBMASK (MAPBLOCKSIZE-1)
44 | #define MAPBTOFRAC (MAPBLOCKSHIFT-FRACBITS)
45 |
46 | #define PT_ADDLINES 1
47 | #define PT_ADDTHINGS 2
48 | #define PT_EARLYOUT 4
49 |
50 | typedef struct {
51 | fixed_t x;
52 | fixed_t y;
53 | fixed_t dx;
54 | fixed_t dy;
55 | } divline_t;
56 |
57 | typedef struct {
58 | fixed_t frac; /* along trace line */
59 | boolean isaline;
60 | union {
61 | mobj_t* thing;
62 | line_t* line;
63 | } d;
64 | } intercept_t;
65 |
66 | typedef boolean (*traverser_t)(intercept_t *in);
67 |
68 | fixed_t CONSTFUNC P_AproxDistance (fixed_t dx, fixed_t dy);
69 | int PUREFUNC P_PointOnLineSide (fixed_t x, fixed_t y, const line_t *line);
70 | int PUREFUNC P_BoxOnLineSide (const fixed_t *tmbox, const line_t *ld);
71 | fixed_t PUREFUNC P_InterceptVector (const divline_t *v2, const divline_t *v1);
72 | /* cph - old compatibility version below */
73 | fixed_t PUREFUNC P_InterceptVector2(const divline_t *v2, const divline_t *v1);
74 |
75 | void P_LineOpening (const line_t *linedef);
76 | void P_UnsetThingPosition(mobj_t *thing);
77 | void P_SetThingPosition(mobj_t *thing);
78 | boolean P_BlockLinesIterator (int x, int y, boolean func(line_t *));
79 | boolean P_BlockThingsIterator(int x, int y, boolean func(mobj_t *));
80 | boolean P_PathTraverse(fixed_t x1, fixed_t y1, fixed_t x2, fixed_t y2,
81 | int flags, boolean trav(intercept_t *));
82 |
83 | extern fixed_t opentop;
84 | extern fixed_t openbottom;
85 | extern fixed_t openrange;
86 | extern fixed_t lowfloor;
87 | extern divline_t trace;
88 |
89 | #endif /* __P_MAPUTL__ */
90 |
--------------------------------------------------------------------------------
/frontend/.eslintcache:
--------------------------------------------------------------------------------
1 | [{"F:\\work\\react\\webprboom\\src\\index.js":"1","F:\\work\\react\\webprboom\\src\\App.js":"2","F:\\work\\react\\webprboom\\src\\BoomCarousel.js":"3","F:\\work\\react\\webprboom\\src\\Loading.js":"4","F:\\work\\webPrBoom\\frontend\\src\\index.js":"5","F:\\work\\webPrBoom\\frontend\\src\\App.js":"6","F:\\work\\webPrBoom\\frontend\\src\\Loading.js":"7","F:\\work\\webPrBoom\\frontend\\src\\BoomCarousel.js":"8","F:\\work\\webPrBoom\\frontend\\src\\Storage.js":"9","F:\\work\\webPrBoom\\frontend\\src\\Log.js":"10","F:\\work\\webPrBoom\\frontend\\src\\storage.js":"11"},{"size":184,"mtime":1610993609021,"results":"12","hashOfConfig":"13"},{"size":2613,"mtime":1611042671989,"results":"14","hashOfConfig":"13"},{"size":1994,"mtime":1610993602636,"results":"15","hashOfConfig":"13"},{"size":657,"mtime":1611044350921,"results":"16","hashOfConfig":"13"},{"size":184,"mtime":1611618904063,"results":"17","hashOfConfig":"18"},{"size":8037,"mtime":1611639181587,"results":"19","hashOfConfig":"18"},{"size":470,"mtime":1611618904057,"results":"20","hashOfConfig":"18"},{"size":1622,"mtime":1611618904057,"results":"21","hashOfConfig":"18"},{"size":4766,"mtime":1611638910339,"results":"22","hashOfConfig":"18"},{"size":155,"mtime":1611606679086,"results":"23","hashOfConfig":"18"},{"size":4766,"mtime":1611638910339,"results":"24","hashOfConfig":"18"},{"filePath":"25","messages":"26","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1xleziv",{"filePath":"27","messages":"28","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"29","messages":"30","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"31","messages":"32","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"33","messages":"34","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"wurjho",{"filePath":"35","messages":"36","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"37","messages":"38","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"39"},{"filePath":"40","messages":"41","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"39"},{"filePath":"42","messages":"43","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"44","messages":"45","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"46","messages":"47","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"F:\\work\\react\\webprboom\\src\\index.js",[],"F:\\work\\react\\webprboom\\src\\App.js",["48"],"F:\\work\\react\\webprboom\\src\\BoomCarousel.js",[],"F:\\work\\react\\webprboom\\src\\Loading.js",[],"F:\\work\\webPrBoom\\frontend\\src\\index.js",[],"F:\\work\\webPrBoom\\frontend\\src\\App.js",[],"F:\\work\\webPrBoom\\frontend\\src\\Loading.js",[],["49","50"],"F:\\work\\webPrBoom\\frontend\\src\\BoomCarousel.js",[],"F:\\work\\webPrBoom\\frontend\\src\\Storage.js",[],"F:\\work\\webPrBoom\\frontend\\src\\Log.js",[],"F:\\work\\webPrBoom\\frontend\\src\\storage.js",[],{"ruleId":"51","severity":1,"message":"52","line":57,"column":15,"nodeType":"53","messageId":"54","endLine":57,"endColumn":24},{"ruleId":"55","replacedBy":"56"},{"ruleId":"57","replacedBy":"58"},"no-unused-vars","'statusBar' is assigned a value but never used.","Identifier","unusedVar","no-native-reassign",["59"],"no-negated-in-lhs",["60"],"no-global-assign","no-unsafe-negation"]
--------------------------------------------------------------------------------
/data/prboom.txt:
--------------------------------------------------------------------------------
1 | # PWAD creation directives for prboom.wad
2 | # Initially generated by DeuTex 4.4.0
3 |
4 | # List of data Lumps
5 | [lumps]
6 | SWITCHES
7 | ANIMATED
8 | C_START
9 | WATERMAP
10 | C_END
11 | CRBRICK
12 | CRTAN
13 | CRGRAY
14 | CRGREEN
15 | CRBROWN
16 | CRGOLD
17 | CRRED
18 | CRBLUE
19 | CRBLUE2
20 | CRORANGE
21 | CRYELLOW
22 |
23 | # PrBoom internal data lumps (large data lumps removed from the source code)
24 | B_START
25 | SINETABL
26 | TANGTABL
27 | TANTOANG
28 | GAMMATBL
29 | B_END
30 |
31 | # List of Sounds
32 | [sounds]
33 | # MBF dog sounds
34 | DSDGSIT
35 | DSDGATK
36 | DSDGACT
37 | DSDGDTH
38 | DSDGPAIN
39 |
40 | # List of Pictures (with insertion point)
41 | [graphics]
42 | M_HORSEN 0 0
43 | M_VERSEN 0 0
44 | M_COMPAT 0 0
45 | M_GENERL 0 0
46 | STBR123 0 0
47 | STBR124 0 0
48 | STBR125 0 0
49 | STBR126 0 0
50 | STBR127 0 0
51 | DIG0 0 0
52 | DIG1 0 0
53 | DIG2 0 0
54 | DIG3 0 0
55 | DIG4 0 0
56 | DIG5 0 0
57 | DIG6 0 0
58 | DIG7 0 0
59 | DIG8 0 0
60 | DIG9 0 0
61 | DIGA 0 0
62 | DIGB 0 0
63 | DIGC 0 0
64 | DIGD 0 0
65 | DIGE 0 0
66 | DIGF 0 0
67 | DIGG 0 0
68 | DIGH 0 0
69 | DIGI 0 0
70 | DIGJ 0 0
71 | DIGK 0 0
72 | DIGL 0 0
73 | DIGM 0 0
74 | DIGN 0 0
75 | DIGO 0 0
76 | DIGP 0 0
77 | DIGQ 0 0
78 | DIGR 0 0
79 | DIGS 0 0
80 | DIGT 0 0
81 | DIGU 0 0
82 | DIGV 0 0
83 | DIGW 0 0
84 | DIGX 0 0
85 | DIGY 0 0
86 | DIGZ 0 0
87 | DIG45 0 0
88 | DIG47 0 0
89 | DIG58 0 0
90 | DIG91 0 0
91 | DIG93 0 0
92 | STKEYS6 0 0
93 | STKEYS7 0 0
94 | STKEYS8 0 0
95 | BOXUL 0 0
96 | BOXUC 0 0
97 | BOXUR 0 0
98 | BOXCL 0 0
99 | BOXCC 0 0
100 | BOXCR 0 0
101 | BOXLL 0 0
102 | BOXLC 0 0
103 | BOXLR 0 0
104 | PRBOOM 0 0
105 | HU_FRAGS 0 0
106 | HU_FRGBX 0 0
107 | M_SETUP 0 0
108 | M_KEYBND 0 0
109 | M_AUTO 0 0
110 | M_CHAT 0 0
111 | M_ENEM 0 0
112 | M_STAT 0 0
113 | M_WEAP 0 0
114 | M_MESS 0 0
115 | M_COLORS 0 0
116 | M_PALSEL 0 0
117 | M_PALNO 0 0
118 | M_SLIDEM 0 0
119 | M_SLIDEL 0 0
120 | M_SLIDEO 0 0
121 | M_SLIDER 0 0
122 | M_FEAT 0 0
123 | M_MULTI 0 0
124 | M_ABOUT 0 0
125 | M_DEMOS 0 0
126 | M_WAD 0 0
127 | M_SOUND 0 0
128 | M_VIDEO 0 0
129 | M_MOUSE 0 0
130 | M_KEYBND 0 0
131 | M_STAT 0 0
132 | M_HUD 0 0
133 | M_COMPAT 0 0
134 | M_VBOX 0 0
135 | STCFN096 0 0
136 | STCFN123 0 0
137 | STCFN124 0 0
138 | STCFN125 0 0
139 | M_BUTT1 0 0
140 | M_BUTT2 0 0
141 |
142 | # List of Sprites
143 | [sprites]
144 | # Empty sprite
145 | TNT1A0 0 0
146 |
147 | # MBF dog sprites
148 | DOGSD5 32 59
149 | DOGSH5 32 59
150 | DOGSC5 32 59
151 | DOGSG5 32 59
152 | DOGSB1 32 59
153 | DOGSA5 32 59
154 | DOGSE5 32 59
155 | DOGSC1 32 59
156 | DOGSD1 32 59
157 | DOGSB5 32 59
158 | DOGSF5 32 59
159 | DOGSA1 32 59
160 | DOGSE1 32 59
161 | DOGSF1 32 59
162 | DOGSD2D8 32 59
163 | DOGSH2 32 59
164 | DOGSG1 32 59
165 | DOGSH8 32 59
166 | DOGSE8 32 59
167 | DOGSD4D6 32 59
168 | DOGSH4 32 59
169 | DOGSA2A8 32 59
170 | DOGSE2 32 59
171 | DOGSF8 32 59
172 | DOGSH1 32 59
173 | DOGSA4A6 32 59
174 | DOGSE4 32 59
175 | DOGSB4B6 32 59
176 | DOGSF4 32 59
177 | DOGSH6 32 59
178 | DOGSB2B8 32 59
179 | DOGSF2 32 59
180 | DOGSC2C8 32 59
181 | DOGSG2 32 59
182 | DOGSG6 32 59
183 | DOGSC4C6 32 59
184 | DOGSG4 32 59
185 | DOGSG8 32 59
186 | DOGSF6 32 59
187 | DOGSN0 32 59
188 | DOGSE6 32 59
189 | DOGSD3D7 32 59
190 | DOGSH3 32 59
191 | DOGSH7 32 59
192 | DOGSI0 32 59
193 | DOGSA3A7 32 59
194 | DOGSE3 32 59
195 | DOGSB3B7 32 59
196 | DOGSF3 32 59
197 | DOGSF7 32 59
198 | DOGSE7 32 59
199 | DOGSC3C7 32 59
200 | DOGSG3 32 59
201 | DOGSG7 32 59
202 | DOGSJ0 32 59
203 | DOGSK0 32 59
204 | DOGSL0 32 59
205 | DOGSM0 32 59
206 |
207 | # End of extraction
208 |
--------------------------------------------------------------------------------
/src/d_event.h:
--------------------------------------------------------------------------------
1 | /* Emacs style mode select -*- C++ -*-
2 | *-----------------------------------------------------------------------------
3 | *
4 | *
5 | * PrBoom: a Doom port merged with LxDoom and LSDLDoom
6 | * based on BOOM, a modified and improved DOOM engine
7 | * Copyright (C) 1999 by
8 | * id Software, Chi Hoang, Lee Killough, Jim Flynn, Rand Phares, Ty Halderman
9 | * Copyright (C) 1999-2000 by
10 | * Jess Haas, Nicolas Kalkhof, Colin Phipps, Florian Schulze
11 | * Copyright 2005, 2006 by
12 | * Florian Schulze, Colin Phipps, Neil Stevens, Andrey Budko
13 | *
14 | * This program is free software; you can redistribute it and/or
15 | * modify it under the terms of the GNU General Public License
16 | * as published by the Free Software Foundation; either version 2
17 | * of the License, or (at your option) any later version.
18 | *
19 | * This program is distributed in the hope that it will be useful,
20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 | * GNU General Public License for more details.
23 | *
24 | * You should have received a copy of the GNU General Public License
25 | * along with this program; if not, write to the Free Software
26 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
27 | * 02111-1307, USA.
28 | *
29 | * DESCRIPTION:
30 | * Event information structures.
31 | *
32 | *-----------------------------------------------------------------------------*/
33 |
34 |
35 | #ifndef __D_EVENT__
36 | #define __D_EVENT__
37 |
38 |
39 | #include "doomtype.h"
40 |
41 |
42 | //
43 | // Event handling.
44 | //
45 |
46 | // Input event types.
47 | typedef enum
48 | {
49 | ev_keydown,
50 | ev_keyup,
51 | ev_mouse,
52 | ev_joystick
53 | } evtype_t;
54 |
55 | // Event structure.
56 | typedef struct
57 | {
58 | evtype_t type;
59 | int data1; // keys / mouse/joystick buttons
60 | int data2; // mouse/joystick x move
61 | int data3; // mouse/joystick y move
62 | } event_t;
63 |
64 |
65 | typedef enum
66 | {
67 | ga_nothing,
68 | ga_loadlevel,
69 | ga_newgame,
70 | ga_loadgame,
71 | ga_savegame,
72 | ga_playdemo,
73 | ga_completed,
74 | ga_victory,
75 | ga_worlddone,
76 | } gameaction_t;
77 |
78 |
79 |
80 | //
81 | // Button/action code definitions.
82 | //
83 | typedef enum
84 | {
85 | // Press "Fire".
86 | BT_ATTACK = 1,
87 |
88 | // Use button, to open doors, activate switches.
89 | BT_USE = 2,
90 |
91 | // Flag: game events, not really buttons.
92 | BT_SPECIAL = 128,
93 | BT_SPECIALMASK = 3,
94 |
95 | // Flag, weapon change pending.
96 | // If true, the next 4 bits hold weapon num.
97 | BT_CHANGE = 4,
98 |
99 | // The 4bit weapon mask and shift, convenience.
100 | //BT_WEAPONMASK = (8+16+32),
101 | BT_WEAPONMASK = (8+16+32+64), // extended to pick up SSG // phares
102 | BT_WEAPONSHIFT = 3,
103 |
104 | // Special events
105 | BTS_LOADGAME = 0, // Loads a game
106 | // Pause the game.
107 | BTS_PAUSE = 1,
108 | // Save the game at each console.
109 | BTS_SAVEGAME = 2,
110 | BTS_RESTARTLEVEL= 3, // Restarts the current level
111 |
112 | // Savegame slot numbers occupy the second byte of buttons.
113 | BTS_SAVEMASK = (4+8+16),
114 | BTS_SAVESHIFT = 2,
115 |
116 | } buttoncode_t;
117 |
118 |
119 | //
120 | // GLOBAL VARIABLES
121 | //
122 |
123 | extern gameaction_t gameaction;
124 |
125 | #endif
126 |
--------------------------------------------------------------------------------
/src/d_items.c:
--------------------------------------------------------------------------------
1 | /* Emacs style mode select -*- C++ -*-
2 | *-----------------------------------------------------------------------------
3 | *
4 | *
5 | * PrBoom: a Doom port merged with LxDoom and LSDLDoom
6 | * based on BOOM, a modified and improved DOOM engine
7 | * Copyright (C) 1999 by
8 | * id Software, Chi Hoang, Lee Killough, Jim Flynn, Rand Phares, Ty Halderman
9 | * Copyright (C) 1999-2000 by
10 | * Jess Haas, Nicolas Kalkhof, Colin Phipps, Florian Schulze
11 | * Copyright 2005, 2006 by
12 | * Florian Schulze, Colin Phipps, Neil Stevens, Andrey Budko
13 | *
14 | * This program is free software; you can redistribute it and/or
15 | * modify it under the terms of the GNU General Public License
16 | * as published by the Free Software Foundation; either version 2
17 | * of the License, or (at your option) any later version.
18 | *
19 | * This program is distributed in the hope that it will be useful,
20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 | * GNU General Public License for more details.
23 | *
24 | * You should have received a copy of the GNU General Public License
25 | * along with this program; if not, write to the Free Software
26 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
27 | * 02111-1307, USA.
28 | *
29 | * DESCRIPTION:
30 | * Something to do with weapon sprite frames. Don't ask me.
31 | *
32 | *-----------------------------------------------------------------------------
33 | */
34 |
35 | // We are referring to sprite numbers.
36 | #include "doomtype.h"
37 | #include "info.h"
38 |
39 | #ifdef __GNUG__
40 | #pragma implementation "d_items.h"
41 | #endif
42 | #include "d_items.h"
43 |
44 |
45 | //
46 | // PSPRITE ACTIONS for waepons.
47 | // This struct controls the weapon animations.
48 | //
49 | // Each entry is:
50 | // ammo/amunition type
51 | // upstate
52 | // downstate
53 | // readystate
54 | // atkstate, i.e. attack/fire/hit frame
55 | // flashstate, muzzle flash
56 | //
57 | weaponinfo_t weaponinfo[NUMWEAPONS] =
58 | {
59 | {
60 | // fist
61 | am_noammo,
62 | S_PUNCHUP,
63 | S_PUNCHDOWN,
64 | S_PUNCH,
65 | S_PUNCH1,
66 | S_NULL
67 | },
68 | {
69 | // pistol
70 | am_clip,
71 | S_PISTOLUP,
72 | S_PISTOLDOWN,
73 | S_PISTOL,
74 | S_PISTOL1,
75 | S_PISTOLFLASH
76 | },
77 | {
78 | // shotgun
79 | am_shell,
80 | S_SGUNUP,
81 | S_SGUNDOWN,
82 | S_SGUN,
83 | S_SGUN1,
84 | S_SGUNFLASH1
85 | },
86 | {
87 | // chaingun
88 | am_clip,
89 | S_CHAINUP,
90 | S_CHAINDOWN,
91 | S_CHAIN,
92 | S_CHAIN1,
93 | S_CHAINFLASH1
94 | },
95 | {
96 | // missile launcher
97 | am_misl,
98 | S_MISSILEUP,
99 | S_MISSILEDOWN,
100 | S_MISSILE,
101 | S_MISSILE1,
102 | S_MISSILEFLASH1
103 | },
104 | {
105 | // plasma rifle
106 | am_cell,
107 | S_PLASMAUP,
108 | S_PLASMADOWN,
109 | S_PLASMA,
110 | S_PLASMA1,
111 | S_PLASMAFLASH1
112 | },
113 | {
114 | // bfg 9000
115 | am_cell,
116 | S_BFGUP,
117 | S_BFGDOWN,
118 | S_BFG,
119 | S_BFG1,
120 | S_BFGFLASH1
121 | },
122 | {
123 | // chainsaw
124 | am_noammo,
125 | S_SAWUP,
126 | S_SAWDOWN,
127 | S_SAW,
128 | S_SAW1,
129 | S_NULL
130 | },
131 | {
132 | // super shotgun
133 | am_shell,
134 | S_DSGUNUP,
135 | S_DSGUNDOWN,
136 | S_DSGUN,
137 | S_DSGUN1,
138 | S_DSGUNFLASH1
139 | },
140 | };
141 |
--------------------------------------------------------------------------------
/src/r_state.h:
--------------------------------------------------------------------------------
1 | /* Emacs style mode select -*- C++ -*-
2 | *-----------------------------------------------------------------------------
3 | *
4 | *
5 | * PrBoom: a Doom port merged with LxDoom and LSDLDoom
6 | * based on BOOM, a modified and improved DOOM engine
7 | * Copyright (C) 1999 by
8 | * id Software, Chi Hoang, Lee Killough, Jim Flynn, Rand Phares, Ty Halderman
9 | * Copyright (C) 1999-2000 by
10 | * Jess Haas, Nicolas Kalkhof, Colin Phipps, Florian Schulze
11 | * Copyright 2005, 2006 by
12 | * Florian Schulze, Colin Phipps, Neil Stevens, Andrey Budko
13 | *
14 | * This program is free software; you can redistribute it and/or
15 | * modify it under the terms of the GNU General Public License
16 | * as published by the Free Software Foundation; either version 2
17 | * of the License, or (at your option) any later version.
18 | *
19 | * This program is distributed in the hope that it will be useful,
20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 | * GNU General Public License for more details.
23 | *
24 | * You should have received a copy of the GNU General Public License
25 | * along with this program; if not, write to the Free Software
26 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
27 | * 02111-1307, USA.
28 | *
29 | * DESCRIPTION:
30 | * Refresh/render internal state variables (global).
31 | *
32 | *-----------------------------------------------------------------------------*/
33 |
34 |
35 | #ifndef __R_STATE__
36 | #define __R_STATE__
37 |
38 | // Need data structure definitions.
39 | #include "d_player.h"
40 | #include "r_data.h"
41 |
42 | #ifdef __GNUG__
43 | #pragma interface
44 | #endif
45 |
46 |
47 | //
48 | // Refresh internal data structures,
49 | // for rendering.
50 | //
51 |
52 | // needed for texture pegging
53 | extern fixed_t *textureheight;
54 |
55 | extern int scaledviewwidth;
56 |
57 | extern int firstflat, numflats;
58 |
59 | // for global animation
60 | extern int *flattranslation;
61 | extern int *texturetranslation;
62 |
63 | // Sprite....
64 | extern int firstspritelump;
65 | extern int lastspritelump;
66 | extern int numspritelumps;
67 |
68 | //
69 | // Lookup tables for map data.
70 | //
71 | extern int numsprites;
72 | extern spritedef_t *sprites;
73 |
74 | extern int numvertexes;
75 | extern vertex_t *vertexes;
76 |
77 | extern int numsegs;
78 | extern seg_t *segs;
79 |
80 | extern int numsectors;
81 | extern sector_t *sectors;
82 |
83 | extern int numsubsectors;
84 | extern subsector_t *subsectors;
85 |
86 | extern int numnodes;
87 | extern node_t *nodes;
88 |
89 | extern int numlines;
90 | extern line_t *lines;
91 |
92 | extern int numsides;
93 | extern side_t *sides;
94 |
95 |
96 | //
97 | // POV data.
98 | //
99 | extern fixed_t viewx;
100 | extern fixed_t viewy;
101 | extern fixed_t viewz;
102 | extern angle_t viewangle;
103 | extern player_t *viewplayer;
104 | extern angle_t clipangle;
105 | extern int viewangletox[FINEANGLES/2];
106 | extern angle_t xtoviewangle[MAX_SCREENWIDTH+1]; // killough 2/8/98
107 | extern fixed_t rw_distance;
108 | extern angle_t rw_normalangle;
109 |
110 | // angle to line origin
111 | extern int rw_angle1;
112 |
113 | extern visplane_t *floorplane;
114 | extern visplane_t *ceilingplane;
115 |
116 | #endif
117 |
--------------------------------------------------------------------------------
/src/hu_stuff.h:
--------------------------------------------------------------------------------
1 | /* Emacs style mode select -*- C++ -*-
2 | *-----------------------------------------------------------------------------
3 | *
4 | *
5 | * PrBoom: a Doom port merged with LxDoom and LSDLDoom
6 | * based on BOOM, a modified and improved DOOM engine
7 | * Copyright (C) 1999 by
8 | * id Software, Chi Hoang, Lee Killough, Jim Flynn, Rand Phares, Ty Halderman
9 | * Copyright (C) 1999-2000 by
10 | * Jess Haas, Nicolas Kalkhof, Colin Phipps, Florian Schulze
11 | * Copyright 2005, 2006 by
12 | * Florian Schulze, Colin Phipps, Neil Stevens, Andrey Budko
13 | *
14 | * This program is free software; you can redistribute it and/or
15 | * modify it under the terms of the GNU General Public License
16 | * as published by the Free Software Foundation; either version 2
17 | * of the License, or (at your option) any later version.
18 | *
19 | * This program is distributed in the hope that it will be useful,
20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 | * GNU General Public License for more details.
23 | *
24 | * You should have received a copy of the GNU General Public License
25 | * along with this program; if not, write to the Free Software
26 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
27 | * 02111-1307, USA.
28 | *
29 | * DESCRIPTION: Head up display
30 | *
31 | *-----------------------------------------------------------------------------*/
32 |
33 | #ifndef __HU_STUFF_H__
34 | #define __HU_STUFF_H__
35 |
36 | #include "d_event.h"
37 |
38 | /*
39 | * Globally visible constants.
40 | */
41 | #define HU_FONTSTART '!' /* the first font characters */
42 | #define HU_FONTEND (0x7f) /*jff 2/16/98 '_' the last font characters */
43 |
44 | /* Calculate # of glyphs in font. */
45 | #define HU_FONTSIZE (HU_FONTEND - HU_FONTSTART + 1)
46 |
47 | #define HU_BROADCAST 5
48 |
49 | /*#define HU_MSGREFRESH KEYD_ENTER phares */
50 | #define HU_MSGX 0
51 | #define HU_MSGY 0
52 | #define HU_MSGWIDTH 64 /* in characters */
53 | #define HU_MSGHEIGHT 1 /* in lines */
54 |
55 | #define HU_MSGTIMEOUT (4*TICRATE)
56 |
57 | /*
58 | * Heads up text
59 | */
60 | void HU_Init(void);
61 | void HU_Start(void);
62 |
63 | boolean HU_Responder(event_t* ev);
64 |
65 | void HU_Ticker(void);
66 | void HU_Drawer(void);
67 | char HU_dequeueChatChar(void);
68 | void HU_Erase(void);
69 | void HU_MoveHud(void); // jff 3/9/98 avoid glitch in HUD display
70 |
71 | /* killough 5/2/98: moved from m_misc.c: */
72 |
73 | /* jff 2/16/98 hud supported automap colors added */
74 | extern int hudcolor_titl; /* color range of automap level title */
75 | extern int hudcolor_xyco; /* color range of new coords on automap */
76 | /* jff 2/16/98 hud text colors, controls added */
77 | extern int hudcolor_mesg; /* color range of scrolling messages */
78 | extern int hudcolor_chat; /* color range of chat lines */
79 | /* jff 2/26/98 hud message list color and background enable */
80 | extern int hudcolor_list; /* color of list of past messages */
81 | extern int hud_list_bgon; /* solid window background for list of messages */
82 | extern int hud_msg_lines; /* number of message lines in window up to 16 */
83 | extern int hud_distributed; /* whether hud is all in lower left or distributed */
84 | /* jff 2/23/98 hud is currently displayed */
85 | extern int hud_displayed; /* hud is displayed */
86 | /* jff 2/18/98 hud/status control */
87 | extern int hud_active; /* hud mode 0=off, 1=small, 2=full */
88 | extern int hud_nosecrets; /* status does not list secrets/items/kills */
89 |
90 | #endif
91 |
--------------------------------------------------------------------------------
/src/dstrings.c:
--------------------------------------------------------------------------------
1 | /* Emacs style mode select -*- C++ -*-
2 | *-----------------------------------------------------------------------------
3 | *
4 | *
5 | * PrBoom: a Doom port merged with LxDoom and LSDLDoom
6 | * based on BOOM, a modified and improved DOOM engine
7 | * Copyright (C) 1999 by
8 | * id Software, Chi Hoang, Lee Killough, Jim Flynn, Rand Phares, Ty Halderman
9 | * Copyright (C) 1999-2000 by
10 | * Jess Haas, Nicolas Kalkhof, Colin Phipps, Florian Schulze
11 | * Copyright 2005, 2006 by
12 | * Florian Schulze, Colin Phipps, Neil Stevens, Andrey Budko
13 | *
14 | * This program is free software; you can redistribute it and/or
15 | * modify it under the terms of the GNU General Public License
16 | * as published by the Free Software Foundation; either version 2
17 | * of the License, or (at your option) any later version.
18 | *
19 | * This program is distributed in the hope that it will be useful,
20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 | * GNU General Public License for more details.
23 | *
24 | * You should have received a copy of the GNU General Public License
25 | * along with this program; if not, write to the Free Software
26 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
27 | * 02111-1307, USA.
28 | *
29 | * DESCRIPTION:
30 | * Globally defined strings.
31 | *
32 | *-----------------------------------------------------------------------------
33 | */
34 |
35 | #ifdef __GNUG__
36 | #pragma implementation "dstrings.h"
37 | #endif
38 | #include "dstrings.h"
39 |
40 |
41 | // killough 1/18/98: remove hardcoded limit, add const:
42 | const char *const endmsg[]=
43 | {
44 | // DOOM1
45 | QUITMSG,
46 | "please don't leave, there's more\ndemons to toast!",
47 | "let's beat it -- this is turning\ninto a bloodbath!",
48 | "i wouldn't leave if i were you.\ndos is much worse.",
49 | "you're trying to say you like dos\nbetter than me, right?",
50 | "don't leave yet -- there's a\ndemon around that corner!",
51 | "ya know, next time you come in here\ni'm gonna toast ya.",
52 | "go ahead and leave. see if i care.", // 1/15/98 killough
53 |
54 | // QuitDOOM II messages
55 | "you want to quit?\nthen, thou hast lost an eighth!",
56 | "don't go now, there's a \ndimensional shambler waiting\nat the dos prompt!",
57 | "get outta here and go back\nto your boring programs.",
58 | "if i were your boss, i'd \n deathmatch ya in a minute!",
59 | "look, bud. you leave now\nand you forfeit your body count!",
60 | "just leave. when you come\nback, i'll be waiting with a bat.",
61 | "you're lucky i don't smack\nyou for thinking about leaving.", // 1/15/98 killough
62 |
63 | // FinalDOOM?
64 |
65 | // Note that these ending "bad taste" strings were commented out
66 | // in the original id code as the #else case of an #if 1
67 | // Obviously they were internal playthings before the release of
68 | // DOOM2 and were not intended for public use.
69 | //
70 | // Following messages commented out for now. Bad taste. // phares
71 |
72 | // "fuck you, pussy!\nget the fuck out!",
73 | // "you quit and i'll jizz\nin your cystholes!",
74 | // "if you leave, i'll make\nthe lord drink my jizz.",
75 | // "hey, ron! can we say\n'fuck' in the game?",
76 | // "i'd leave: this is just\nmore monsters and levels.\nwhat a load.",
77 | // "suck it down, asshole!\nyou're a fucking wimp!",
78 | // "don't quit now! we're \nstill spending your money!",
79 |
80 | // Internal debug. Different style, too.
81 | "THIS IS NO MESSAGE!\nPage intentionally left blank.", // 1/15/98 killough
82 | };
83 |
84 | // killough 1/18/98: remove hardcoded limit and replace with var (silly hack):
85 | const size_t NUM_QUITMESSAGES = sizeof(endmsg)/sizeof(*endmsg) - 1;
86 |
--------------------------------------------------------------------------------
/src/r_patch.h:
--------------------------------------------------------------------------------
1 | /* Emacs style mode select -*- C++ -*-
2 | *-----------------------------------------------------------------------------
3 | *
4 | *
5 | * PrBoom: a Doom port merged with LxDoom and LSDLDoom
6 | * based on BOOM, a modified and improved DOOM engine
7 | * Copyright (C) 1999 by
8 | * id Software, Chi Hoang, Lee Killough, Jim Flynn, Rand Phares, Ty Halderman
9 | * Copyright (C) 1999-2000 by
10 | * Jess Haas, Nicolas Kalkhof, Colin Phipps, Florian Schulze
11 | * Copyright 2005, 2006 by
12 | * Florian Schulze, Colin Phipps, Neil Stevens, Andrey Budko
13 | *
14 | * This program is free software; you can redistribute it and/or
15 | * modify it under the terms of the GNU General Public License
16 | * as published by the Free Software Foundation; either version 2
17 | * of the License, or (at your option) any later version.
18 | *
19 | * This program is distributed in the hope that it will be useful,
20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 | * GNU General Public License for more details.
23 | *
24 | * You should have received a copy of the GNU General Public License
25 | * along with this program; if not, write to the Free Software
26 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
27 | * 02111-1307, USA.
28 | *
29 | *-----------------------------------------------------------------------------*/
30 |
31 |
32 | #ifndef R_PATCH_H
33 | #define R_PATCH_H
34 |
35 | // Used to specify the sloping of the top and bottom of a column post
36 | typedef enum {
37 | RDRAW_EDGESLOPE_TOP_UP = (1<<0),
38 | RDRAW_EDGESLOPE_TOP_DOWN = (1<<1),
39 | RDRAW_EDGESLOPE_BOT_UP = (1<<2),
40 | RDRAW_EDGESLOPE_BOT_DOWN = (1<<3),
41 | RDRAW_EDGESLOPE_TOP_MASK = 0x3,
42 | RDRAW_EDGESLOPE_BOT_MASK = 0xc,
43 | } edgeslope_t;
44 |
45 | typedef struct {
46 | int topdelta;
47 | int length;
48 | edgeslope_t slope;
49 | } rpost_t;
50 |
51 | typedef struct {
52 | int numPosts;
53 | rpost_t *posts;
54 | unsigned char *pixels;
55 | } rcolumn_t;
56 |
57 | typedef struct {
58 | int width;
59 | int height;
60 | unsigned widthmask;
61 |
62 | unsigned char isNotTileable;
63 |
64 | int leftoffset;
65 | int topoffset;
66 |
67 | // this is the single malloc'ed/free'd array
68 | // for this patch
69 | unsigned char *data;
70 |
71 | // these are pointers into the data array
72 | unsigned char *pixels;
73 | rcolumn_t *columns;
74 | rpost_t *posts;
75 |
76 | #ifdef TIMEDIAG
77 | int locktic;
78 | #endif
79 | unsigned int locks;
80 | } rpatch_t;
81 |
82 |
83 | const rpatch_t *R_CachePatchNum(int id);
84 | void R_UnlockPatchNum(int id);
85 | #define R_CachePatchName(name) R_CachePatchNum(W_GetNumForName(name))
86 | #define R_UnlockPatchName(name) R_UnlockPatchNum(W_GetNumForName(name))
87 |
88 | const rpatch_t *R_CacheTextureCompositePatchNum(int id);
89 | void R_UnlockTextureCompositePatchNum(int id);
90 |
91 |
92 | // Size query funcs
93 | int R_NumPatchWidth(int lump) ;
94 | int R_NumPatchHeight(int lump);
95 | #define R_NamePatchWidth(name) R_NumPatchWidth(W_GetNumForName(name))
96 | #define R_NamePatchHeight(name) R_NumPatchHeight(W_GetNumForName(name))
97 |
98 |
99 | const rcolumn_t *R_GetPatchColumnWrapped(const rpatch_t *patch, int columnIndex);
100 | const rcolumn_t *R_GetPatchColumnClamped(const rpatch_t *patch, int columnIndex);
101 |
102 |
103 | // returns R_GetPatchColumnWrapped for square, non-holed textures
104 | // and R_GetPatchColumnClamped otherwise
105 | const rcolumn_t *R_GetPatchColumn(const rpatch_t *patch, int columnIndex);
106 |
107 |
108 | void R_InitPatches();
109 | void R_FlushAllPatches();
110 |
111 | #endif
112 |
--------------------------------------------------------------------------------
/src/p_pspr.h:
--------------------------------------------------------------------------------
1 | /* Emacs style mode select -*- C++ -*-
2 | *-----------------------------------------------------------------------------
3 | *
4 | *
5 | * PrBoom: a Doom port merged with LxDoom and LSDLDoom
6 | * based on BOOM, a modified and improved DOOM engine
7 | * Copyright (C) 1999 by
8 | * id Software, Chi Hoang, Lee Killough, Jim Flynn, Rand Phares, Ty Halderman
9 | * Copyright (C) 1999-2000 by
10 | * Jess Haas, Nicolas Kalkhof, Colin Phipps, Florian Schulze
11 | * Copyright 2005, 2006 by
12 | * Florian Schulze, Colin Phipps, Neil Stevens, Andrey Budko
13 | *
14 | * This program is free software; you can redistribute it and/or
15 | * modify it under the terms of the GNU General Public License
16 | * as published by the Free Software Foundation; either version 2
17 | * of the License, or (at your option) any later version.
18 | *
19 | * This program is distributed in the hope that it will be useful,
20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 | * GNU General Public License for more details.
23 | *
24 | * You should have received a copy of the GNU General Public License
25 | * along with this program; if not, write to the Free Software
26 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
27 | * 02111-1307, USA.
28 | *
29 | * DESCRIPTION:
30 | * Sprite animation.
31 | *
32 | *-----------------------------------------------------------------------------*/
33 |
34 | #ifndef __P_PSPR__
35 | #define __P_PSPR__
36 |
37 | /* Basic data types.
38 | * Needs fixed point, and BAM angles. */
39 |
40 | #include "m_fixed.h"
41 | #include "tables.h"
42 |
43 | /* Needs to include the precompiled sprite animation tables.
44 | *
45 | * Header generated by multigen utility.
46 | * This includes all the data for thing animation,
47 | * i.e. the Thing Atrributes table and the Frame Sequence table.
48 | */
49 |
50 | #include "info.h"
51 |
52 | #ifdef __GNUG__
53 | #pragma interface
54 | #endif
55 |
56 | /*
57 | * Frame flags:
58 | * handles maximum brightness (torches, muzzle flare, light sources)
59 | */
60 |
61 | #define FF_FULLBRIGHT 0x8000 /* flag in thing->frame */
62 | #define FF_FRAMEMASK 0x7fff
63 |
64 | /*
65 | * Overlay psprites are scaled shapes
66 | * drawn directly on the view screen,
67 | * coordinates are given for a 320*200 view screen.
68 | */
69 |
70 | typedef enum
71 | {
72 | ps_weapon,
73 | ps_flash,
74 | NUMPSPRITES
75 | } psprnum_t;
76 |
77 | typedef struct
78 | {
79 | state_t *state; /* a NULL state means not active */
80 | int tics;
81 | fixed_t sx;
82 | fixed_t sy;
83 | } pspdef_t;
84 |
85 | extern int weapon_preferences[2][NUMWEAPONS+1]; /* killough 5/2/98 */
86 | int P_WeaponPreferred(int w1, int w2);
87 |
88 | struct player_s;
89 | int P_SwitchWeapon(struct player_s *player);
90 | boolean P_CheckAmmo(struct player_s *player);
91 | void P_SetupPsprites(struct player_s *curplayer);
92 | void P_MovePsprites(struct player_s *curplayer);
93 | void P_DropWeapon(struct player_s *player);
94 | int P_NextWeapon(struct player_s *player, boolean forward);
95 |
96 | void A_Light0();
97 | void A_WeaponReady();
98 | void A_Lower();
99 | void A_Raise();
100 | void A_Punch();
101 | void A_ReFire();
102 | void A_FirePistol();
103 | void A_Light1();
104 | void A_FireShotgun();
105 | void A_Light2();
106 | void A_FireShotgun2();
107 | void A_CheckReload();
108 | void A_OpenShotgun2();
109 | void A_LoadShotgun2();
110 | void A_CloseShotgun2();
111 | void A_FireCGun();
112 | void A_GunFlash();
113 | void A_FireMissile();
114 | void A_Saw();
115 | void A_FirePlasma();
116 | void A_BFGsound();
117 | void A_FireBFG();
118 | void A_BFGSpray();
119 |
120 | #endif
121 |
--------------------------------------------------------------------------------
/src/st_stuff.h:
--------------------------------------------------------------------------------
1 | /* Emacs style mode select -*- C++ -*-
2 | *-----------------------------------------------------------------------------
3 | *
4 | *
5 | * PrBoom: a Doom port merged with LxDoom and LSDLDoom
6 | * based on BOOM, a modified and improved DOOM engine
7 | * Copyright (C) 1999 by
8 | * id Software, Chi Hoang, Lee Killough, Jim Flynn, Rand Phares, Ty Halderman
9 | * Copyright (C) 1999-2000 by
10 | * Jess Haas, Nicolas Kalkhof, Colin Phipps, Florian Schulze
11 | * Copyright 2005, 2006 by
12 | * Florian Schulze, Colin Phipps, Neil Stevens, Andrey Budko
13 | *
14 | * This program is free software; you can redistribute it and/or
15 | * modify it under the terms of the GNU General Public License
16 | * as published by the Free Software Foundation; either version 2
17 | * of the License, or (at your option) any later version.
18 | *
19 | * This program is distributed in the hope that it will be useful,
20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 | * GNU General Public License for more details.
23 | *
24 | * You should have received a copy of the GNU General Public License
25 | * along with this program; if not, write to the Free Software
26 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
27 | * 02111-1307, USA.
28 | *
29 | * DESCRIPTION:
30 | * Status bar code.
31 | * Does the face/direction indicator animatin.
32 | * Does palette indicators as well (red pain/berserk, bright pickup)
33 | *
34 | *-----------------------------------------------------------------------------*/
35 |
36 | #ifndef __STSTUFF_H__
37 | #define __STSTUFF_H__
38 |
39 | #include "doomtype.h"
40 | #include "d_event.h"
41 |
42 | // Size of statusbar.
43 | // Now sensitive for scaling.
44 |
45 | // proff 08/18/98: Changed for high-res
46 | #define ST_HEIGHT 32
47 | #define ST_WIDTH 320
48 | #define ST_Y (200 - ST_HEIGHT)
49 | #define ST_SCALED_HEIGHT (ST_HEIGHT*SCREENHEIGHT/200)
50 | #define ST_SCALED_WIDTH SCREENWIDTH
51 | #define ST_SCALED_Y (SCREENHEIGHT - ST_SCALED_HEIGHT)
52 |
53 | //
54 | // STATUS BAR
55 | //
56 |
57 | // Called by main loop.
58 | boolean ST_Responder(event_t* ev);
59 |
60 | // Called by main loop.
61 | void ST_Ticker(void);
62 |
63 | // Called by main loop.
64 | void ST_Drawer(boolean st_statusbaron, boolean refresh);
65 |
66 | // Called when the console player is spawned on each level.
67 | void ST_Start(void);
68 |
69 | // Called by startup code.
70 | void ST_Init(void);
71 |
72 | // States for status bar code.
73 | typedef enum
74 | {
75 | AutomapState,
76 | FirstPersonState
77 | } st_stateenum_t;
78 |
79 | // States for the chat code.
80 | typedef enum
81 | {
82 | StartChatState,
83 | WaitDestState,
84 | GetChatState
85 | } st_chatstateenum_t;
86 |
87 | // killough 5/2/98: moved from m_misc.c:
88 |
89 | extern int health_red; // health amount less than which status is red
90 | extern int health_yellow; // health amount less than which status is yellow
91 | extern int health_green; // health amount above is blue, below is green
92 | extern int armor_red; // armor amount less than which status is red
93 | extern int armor_yellow; // armor amount less than which status is yellow
94 | extern int armor_green; // armor amount above is blue, below is green
95 | extern int ammo_red; // ammo percent less than which status is red
96 | extern int ammo_yellow; // ammo percent less is yellow more green
97 | extern int sts_always_red;// status numbers do not change colors
98 | extern int sts_pct_always_gray;// status percents do not change colors
99 | extern int sts_traditional_keys; // display keys the traditional way
100 |
101 | extern int st_palette; // cph 2006/04/06 - make palette visible
102 | #endif
103 |
--------------------------------------------------------------------------------
/src/protocol.h:
--------------------------------------------------------------------------------
1 | /* Emacs style mode select -*- C++ -*-
2 | *-----------------------------------------------------------------------------
3 | *
4 | *
5 | * PrBoom: a Doom port merged with LxDoom and LSDLDoom
6 | * based on BOOM, a modified and improved DOOM engine
7 | * Copyright (C) 1999 by
8 | * id Software, Chi Hoang, Lee Killough, Jim Flynn, Rand Phares, Ty Halderman
9 | * Copyright (C) 1999-2000 by
10 | * Jess Haas, Nicolas Kalkhof, Colin Phipps, Florian Schulze
11 | * Copyright 2005, 2006 by
12 | * Florian Schulze, Colin Phipps, Neil Stevens, Andrey Budko
13 | *
14 | * This program is free software; you can redistribute it and/or
15 | * modify it under the terms of the GNU General Public License
16 | * as published by the Free Software Foundation; either version 2
17 | * of the License, or (at your option) any later version.
18 | *
19 | * This program is distributed in the hope that it will be useful,
20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 | * GNU General Public License for more details.
23 | *
24 | * You should have received a copy of the GNU General Public License
25 | * along with this program; if not, write to the Free Software
26 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
27 | * 02111-1307, USA.
28 | *
29 | * DESCRIPTION:
30 | * Doom Network protocol packet definitions.
31 | *-----------------------------------------------------------------------------*/
32 |
33 | #include "doomtype.h"
34 | #include "d_ticcmd.h"
35 | #include "m_swap.h"
36 |
37 | enum packet_type_e {
38 | PKT_INIT, // initial packet to server
39 | PKT_SETUP, // game information packet
40 | PKT_GO, // game has started
41 | PKT_TICC, // tics from client
42 | PKT_TICS, // tics from server
43 | PKT_RETRANS, // Request for retransmission
44 | PKT_EXTRA, // Extra info packet
45 | PKT_QUIT, // Player quit game
46 | PKT_DOWN, // Server downed
47 | PKT_WAD, // Wad file request
48 | PKT_BACKOFF, // Request for client back-off
49 | };
50 |
51 | typedef struct {
52 | byte checksum; // Simple checksum of the entire packet
53 | byte type; /* Type of packet */
54 | byte reserved[2]; /* Was random in prboom <=2.2.4, now 0 */
55 | unsigned tic; // Timestamp
56 | } PACKEDATTR packet_header_t;
57 |
58 | static inline void packet_set(packet_header_t* p, enum packet_type_e t, unsigned long tic)
59 | { p->tic = doom_htonl(tic); p->type = t; p->reserved[0] = 0; p->reserved[1] = 0; }
60 |
61 | #ifndef GAME_OPTIONS_SIZE
62 | // From g_game.h
63 | #define GAME_OPTIONS_SIZE 64
64 | #endif
65 |
66 | struct setup_packet_s {
67 | byte players, yourplayer, skill, episode, level, deathmatch, complevel, ticdup, extratic;
68 | byte game_options[GAME_OPTIONS_SIZE];
69 | byte numwads;
70 | byte wadnames[1]; // Actually longer
71 | };
72 |
73 | /* cph - convert network byte stream to usable ticcmd_t and visa-versa
74 | * - the functions are functionally identical apart from parameters
75 | * - the void* param can be unaligned. By using void* as the parameter
76 | * it means gcc won't assume alignment so won't make false assumptions
77 | * when optimising. So I'm told.
78 | */
79 | inline static void RawToTic(ticcmd_t* dst, const void* src)
80 | {
81 | memcpy(dst,src,sizeof *dst);
82 | dst->angleturn = doom_ntohs(dst->angleturn);
83 | dst->consistancy = doom_ntohs(dst->consistancy);
84 | }
85 |
86 | inline static void TicToRaw(void* dst, const ticcmd_t* src)
87 | {
88 | /* We have to make a copy of the source struct, then do byte swaps,
89 | * and fnially copy to the destination (can't do the swaps in the
90 | * destination, because it might not be aligned).
91 | */
92 | ticcmd_t tmp = *src;
93 | tmp.angleturn = doom_ntohs(tmp.angleturn);
94 | tmp.consistancy = doom_ntohs(tmp.consistancy);
95 | memcpy(dst,&tmp,sizeof tmp);
96 | }
97 |
--------------------------------------------------------------------------------
/VisualC8/Doom.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 9.00
3 | # Visual C++ Express 2005
4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Doom", "Doom.vcproj", "{205FF625-2E96-4BC8-A269-62530A7D1F24}"
5 | EndProject
6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "prboom_server", "prboom_server.vcproj", "{BA3D7F7F-EF41-4073-A251-39C0B6AD1F75}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug NOASM|Win32 = Debug NOASM|Win32
11 | Debug OpenGL NOASM|Win32 = Debug OpenGL NOASM|Win32
12 | Debug OpenGL|Win32 = Debug OpenGL|Win32
13 | Debug|Win32 = Debug|Win32
14 | Release NOASM|Win32 = Release NOASM|Win32
15 | Release OpenGL NOASM|Win32 = Release OpenGL NOASM|Win32
16 | Release OpenGL|Win32 = Release OpenGL|Win32
17 | Release|Win32 = Release|Win32
18 | EndGlobalSection
19 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
20 | {205FF625-2E96-4BC8-A269-62530A7D1F24}.Debug NOASM|Win32.ActiveCfg = Debug NOASM|Win32
21 | {205FF625-2E96-4BC8-A269-62530A7D1F24}.Debug NOASM|Win32.Build.0 = Debug NOASM|Win32
22 | {205FF625-2E96-4BC8-A269-62530A7D1F24}.Debug OpenGL NOASM|Win32.ActiveCfg = Debug OpenGL NOASM|Win32
23 | {205FF625-2E96-4BC8-A269-62530A7D1F24}.Debug OpenGL NOASM|Win32.Build.0 = Debug OpenGL NOASM|Win32
24 | {205FF625-2E96-4BC8-A269-62530A7D1F24}.Debug OpenGL|Win32.ActiveCfg = Debug OpenGL|Win32
25 | {205FF625-2E96-4BC8-A269-62530A7D1F24}.Debug OpenGL|Win32.Build.0 = Debug OpenGL|Win32
26 | {205FF625-2E96-4BC8-A269-62530A7D1F24}.Debug|Win32.ActiveCfg = Debug|Win32
27 | {205FF625-2E96-4BC8-A269-62530A7D1F24}.Debug|Win32.Build.0 = Debug|Win32
28 | {205FF625-2E96-4BC8-A269-62530A7D1F24}.Release NOASM|Win32.ActiveCfg = Release NOASM|Win32
29 | {205FF625-2E96-4BC8-A269-62530A7D1F24}.Release NOASM|Win32.Build.0 = Release NOASM|Win32
30 | {205FF625-2E96-4BC8-A269-62530A7D1F24}.Release OpenGL NOASM|Win32.ActiveCfg = Release OpenGL NOASM|Win32
31 | {205FF625-2E96-4BC8-A269-62530A7D1F24}.Release OpenGL NOASM|Win32.Build.0 = Release OpenGL NOASM|Win32
32 | {205FF625-2E96-4BC8-A269-62530A7D1F24}.Release OpenGL|Win32.ActiveCfg = Release OpenGL|Win32
33 | {205FF625-2E96-4BC8-A269-62530A7D1F24}.Release OpenGL|Win32.Build.0 = Release OpenGL|Win32
34 | {205FF625-2E96-4BC8-A269-62530A7D1F24}.Release|Win32.ActiveCfg = Release|Win32
35 | {205FF625-2E96-4BC8-A269-62530A7D1F24}.Release|Win32.Build.0 = Release|Win32
36 | {BA3D7F7F-EF41-4073-A251-39C0B6AD1F75}.Debug NOASM|Win32.ActiveCfg = Debug|Win32
37 | {BA3D7F7F-EF41-4073-A251-39C0B6AD1F75}.Debug NOASM|Win32.Build.0 = Debug|Win32
38 | {BA3D7F7F-EF41-4073-A251-39C0B6AD1F75}.Debug OpenGL NOASM|Win32.ActiveCfg = Debug|Win32
39 | {BA3D7F7F-EF41-4073-A251-39C0B6AD1F75}.Debug OpenGL NOASM|Win32.Build.0 = Debug|Win32
40 | {BA3D7F7F-EF41-4073-A251-39C0B6AD1F75}.Debug OpenGL|Win32.ActiveCfg = Debug|Win32
41 | {BA3D7F7F-EF41-4073-A251-39C0B6AD1F75}.Debug OpenGL|Win32.Build.0 = Debug|Win32
42 | {BA3D7F7F-EF41-4073-A251-39C0B6AD1F75}.Debug|Win32.ActiveCfg = Debug|Win32
43 | {BA3D7F7F-EF41-4073-A251-39C0B6AD1F75}.Debug|Win32.Build.0 = Debug|Win32
44 | {BA3D7F7F-EF41-4073-A251-39C0B6AD1F75}.Release NOASM|Win32.ActiveCfg = Release|Win32
45 | {BA3D7F7F-EF41-4073-A251-39C0B6AD1F75}.Release NOASM|Win32.Build.0 = Release|Win32
46 | {BA3D7F7F-EF41-4073-A251-39C0B6AD1F75}.Release OpenGL NOASM|Win32.ActiveCfg = Release|Win32
47 | {BA3D7F7F-EF41-4073-A251-39C0B6AD1F75}.Release OpenGL NOASM|Win32.Build.0 = Release|Win32
48 | {BA3D7F7F-EF41-4073-A251-39C0B6AD1F75}.Release OpenGL|Win32.ActiveCfg = Release|Win32
49 | {BA3D7F7F-EF41-4073-A251-39C0B6AD1F75}.Release OpenGL|Win32.Build.0 = Release|Win32
50 | {BA3D7F7F-EF41-4073-A251-39C0B6AD1F75}.Release|Win32.ActiveCfg = Release|Win32
51 | {BA3D7F7F-EF41-4073-A251-39C0B6AD1F75}.Release|Win32.Build.0 = Release|Win32
52 | EndGlobalSection
53 | GlobalSection(SolutionProperties) = preSolution
54 | HideSolutionNode = FALSE
55 | EndGlobalSection
56 | EndGlobal
57 |
--------------------------------------------------------------------------------