├── README.md ├── patches └── psdoom-20120205-1.6.0.patch └── trunk ├── AUTHORS ├── CMDLINE ├── COPYING ├── ChangeLog ├── HACKING ├── INSTALL ├── Makefile ├── Makefile.am ├── Makefile.in ├── NEWS ├── NOT-BUGS ├── README ├── README.OPL ├── TODO ├── acinclude.m4 ├── aclocal.m4 ├── autom4te.cache ├── output.0 ├── output.1 ├── requests ├── traces.0 └── traces.1 ├── autotools ├── depcomp ├── install-sh └── missing ├── codeblocks ├── README ├── config.h ├── game-res.rc ├── game.cbp ├── libpcsound.cbp ├── main.workspace ├── server.cbp ├── setup-res.rc ├── setup.cbp └── textscreen.cbp ├── config.h ├── config.hin ├── config.log ├── config.status ├── configure ├── configure.in ├── contrib └── psdoom-cf-ctl ├── data ├── Makefile ├── Makefile.am ├── Makefile.in ├── README ├── chocolate-doom.png ├── chocolate-setup.png ├── convert-icon ├── doom.ico ├── doom.png ├── doom8.ico ├── psd-doom.png ├── psd-setup.png ├── psdoom.png ├── pssetup.png ├── setup.ico ├── setup.png └── setup8.ico ├── man ├── CMDLINE.template ├── INSTALL ├── INSTALL.template ├── Makefile ├── Makefile.am ├── Makefile.in ├── chocolate-doom.6 ├── chocolate-doom.cfg.5 ├── chocolate-server.6 ├── chocolate-setup.6 ├── default.cfg.5 ├── default.cfg.template ├── docgen ├── extra.cfg.template ├── manpage.template ├── psdoom.cfg.5 ├── simplecpp └── wikipages ├── msvc ├── ChocolateDoom.sln ├── ChocolateDoom.vcproj ├── README ├── config.h ├── inttypes.h ├── stdint.h └── win32.rc ├── opl ├── .deps │ ├── dbopl.Po │ ├── ioperm_sys.Po │ ├── opl.Po │ ├── opl_linux.Po │ ├── opl_obsd.Po │ ├── opl_queue.Po │ ├── opl_sdl.Po │ ├── opl_timer.Po │ └── opl_win32.Po ├── Makefile ├── Makefile.am ├── Makefile.in ├── dbopl.c ├── dbopl.h ├── examples │ ├── .deps │ │ └── droplay.Po │ ├── Makefile │ ├── Makefile.am │ ├── Makefile.in │ └── droplay.c ├── ioperm_sys.c ├── ioperm_sys.h ├── opl.c ├── opl.h ├── opl_internal.h ├── opl_linux.c ├── opl_obsd.c ├── opl_queue.c ├── opl_queue.h ├── opl_sdl.c ├── opl_timer.c ├── opl_timer.h └── opl_win32.c ├── pcsound ├── .deps │ ├── pcsound.Po │ ├── pcsound_bsd.Po │ ├── pcsound_linux.Po │ ├── pcsound_sdl.Po │ └── pcsound_win32.Po ├── Makefile ├── Makefile.am ├── Makefile.in ├── pcsound.c ├── pcsound.h ├── pcsound_bsd.c ├── pcsound_internal.h ├── pcsound_linux.c ├── pcsound_sdl.c └── pcsound_win32.c ├── pkg ├── Makefile ├── Makefile.am ├── Makefile.in ├── config.make ├── config.make.in ├── osx │ ├── AppController.h │ ├── AppController.m │ ├── Execute.h │ ├── Execute.m │ ├── GNUmakefile │ ├── IWADController.h │ ├── IWADController.m │ ├── IWADLocation.h │ ├── IWADLocation.m │ ├── Info-gnustep.plist │ ├── Info-gnustep.plist.in │ ├── Info.plist │ ├── Info.plist.in │ ├── LauncherManager.h │ ├── LauncherManager.m │ ├── PkgInfo │ ├── Resources │ │ ├── 128x128.png │ │ ├── app.icns │ │ ├── app.png │ │ ├── launcher.nib │ │ │ ├── designable.nib │ │ │ └── keyedobjects.nib │ │ ├── wadfile.icns │ │ └── wadfile.png │ ├── cp-with-libs │ ├── disk │ │ ├── background.png │ │ └── dir.DS_Store │ ├── dmgfix │ └── main.m ├── win32 │ ├── GNUmakefile │ └── README └── wince │ ├── GNUmakefile │ ├── wince-cab.cfg │ └── wince-cabgen ├── psdoom ├── CHANGELOG ├── COPYING ├── CREDITS ├── README └── TODO ├── rpm.spec ├── rpm.spec.in ├── setup ├── .deps │ ├── compatibility.Po │ ├── configfile.Po │ ├── display.Po │ ├── execute.Po │ ├── joystick.Po │ ├── keyboard.Po │ ├── m_argv.Po │ ├── mainmenu.Po │ ├── mouse.Po │ ├── multiplayer.Po │ ├── sound.Po │ ├── txt_joybinput.Po │ ├── txt_keyinput.Po │ └── txt_mouseinput.Po ├── Makefile ├── Makefile.am ├── Makefile.in ├── chocolate-setup ├── chocolate-setup.desktop ├── compatibility.c ├── compatibility.h ├── configfile.c ├── configfile.h ├── display.c ├── display.h ├── execute.c ├── execute.h ├── joystick.c ├── joystick.h ├── keyboard.c ├── keyboard.h ├── m_argv.c ├── m_argv.h ├── mainmenu.c ├── mouse.c ├── mouse.h ├── multiplayer.c ├── multiplayer.h ├── psd-setup ├── psd-setup.desktop ├── pssetup.desktop ├── setup-manifest.xml ├── setup-manifest.xml.in ├── setup-res.rc ├── setup-res.rc.in ├── setup.desktop ├── setup.desktop.in ├── setup_icon.c ├── sound.c ├── sound.h ├── txt_joybinput.c ├── txt_joybinput.h ├── txt_keyinput.c ├── txt_keyinput.h ├── txt_mouseinput.c └── txt_mouseinput.h ├── src ├── .deps │ ├── am_map.Po │ ├── d_dedicated.Po │ ├── d_items.Po │ ├── d_iwad.Po │ ├── d_main.Po │ ├── d_net.Po │ ├── deh_ammo.Po │ ├── deh_cheat.Po │ ├── deh_frame.Po │ ├── deh_io.Po │ ├── deh_main.Po │ ├── deh_mapping.Po │ ├── deh_misc.Po │ ├── deh_ptr.Po │ ├── deh_sound.Po │ ├── deh_text.Po │ ├── deh_thing.Po │ ├── deh_weapon.Po │ ├── doomdef.Po │ ├── doomstat.Po │ ├── dstrings.Po │ ├── f_finale.Po │ ├── f_wipe.Po │ ├── g_game.Po │ ├── hu_lib.Po │ ├── hu_stuff.Po │ ├── i_joystick.Po │ ├── i_main.Po │ ├── i_oplmusic.Po │ ├── i_pcsound.Po │ ├── i_scale.Po │ ├── i_sdlmusic.Po │ ├── i_sdlsound.Po │ ├── i_system.Po │ ├── i_timer.Po │ ├── i_video.Po │ ├── info.Po │ ├── m_argv.Po │ ├── m_bbox.Po │ ├── m_cheat.Po │ ├── m_config.Po │ ├── m_fixed.Po │ ├── m_menu.Po │ ├── m_misc.Po │ ├── m_random.Po │ ├── md5.Po │ ├── memio.Po │ ├── midifile.Po │ ├── mus2mid.Po │ ├── net_client.Po │ ├── net_common.Po │ ├── net_dedicated.Po │ ├── net_gui.Po │ ├── net_io.Po │ ├── net_loop.Po │ ├── net_packet.Po │ ├── net_query.Po │ ├── net_sdl.Po │ ├── net_server.Po │ ├── net_structrw.Po │ ├── p_ceilng.Po │ ├── p_doors.Po │ ├── p_enemy.Po │ ├── p_floor.Po │ ├── p_inter.Po │ ├── p_lights.Po │ ├── p_map.Po │ ├── p_maputl.Po │ ├── p_mobj.Po │ ├── p_plats.Po │ ├── p_pspr.Po │ ├── p_saveg.Po │ ├── p_setup.Po │ ├── p_sight.Po │ ├── p_spec.Po │ ├── p_switch.Po │ ├── p_telept.Po │ ├── p_tick.Po │ ├── p_user.Po │ ├── pr_process.Po │ ├── r_bsp.Po │ ├── r_data.Po │ ├── r_draw.Po │ ├── r_main.Po │ ├── r_plane.Po │ ├── r_segs.Po │ ├── r_sky.Po │ ├── r_things.Po │ ├── s_sound.Po │ ├── sounds.Po │ ├── st_lib.Po │ ├── st_stuff.Po │ ├── tables.Po │ ├── v_video.Po │ ├── w_checksum.Po │ ├── w_file.Po │ ├── w_file_posix.Po │ ├── w_file_stdc.Po │ ├── w_file_win32.Po │ ├── w_merge.Po │ ├── w_wad.Po │ ├── wi_stuff.Po │ ├── z_native.Po │ └── z_zone.Po ├── Makefile ├── Makefile.am ├── Makefile.in ├── am_map.c ├── am_map.h ├── chocolate-doom-screensaver.desktop ├── chocolate-doom.desktop ├── d_dedicated.c ├── d_englsh.h ├── d_event.h ├── d_items.c ├── d_items.h ├── d_iwad.c ├── d_iwad.h ├── d_main.c ├── d_main.h ├── d_net.c ├── d_net.h ├── d_player.h ├── d_textur.h ├── d_think.h ├── d_ticcmd.h ├── deh_ammo.c ├── deh_cheat.c ├── deh_defs.h ├── deh_frame.c ├── deh_io.c ├── deh_io.h ├── deh_main.c ├── deh_main.h ├── deh_mapping.c ├── deh_mapping.h ├── deh_misc.c ├── deh_misc.h ├── deh_ptr.c ├── deh_sound.c ├── deh_text.c ├── deh_thing.c ├── deh_weapon.c ├── doom-screensaver.desktop ├── doom-screensaver.desktop.in ├── doom.desktop ├── doom.desktop.in ├── doomdata.h ├── doomdef.c ├── doomdef.h ├── doomfeatures.h ├── doomkeys.h ├── doomstat.c ├── doomstat.h ├── doomtype.h ├── dstrings.c ├── dstrings.h ├── f_finale.c ├── f_finale.h ├── f_wipe.c ├── f_wipe.h ├── g_game.c ├── g_game.h ├── hu_lib.c ├── hu_lib.h ├── hu_stuff.c ├── hu_stuff.h ├── i_joystick.c ├── i_joystick.h ├── i_main.c ├── i_oplmusic.c ├── i_pcsound.c ├── i_scale.c ├── i_scale.h ├── i_sdlmusic.c ├── i_sdlsound.c ├── i_swap.h ├── i_system.c ├── i_system.h ├── i_timer.c ├── i_timer.h ├── i_video.c ├── i_video.h ├── icon.c ├── info.c ├── info.h ├── m_argv.c ├── m_argv.h ├── m_bbox.c ├── m_bbox.h ├── m_cheat.c ├── m_cheat.h ├── m_config.c ├── m_config.h ├── m_fixed.c ├── m_fixed.h ├── m_menu.c ├── m_menu.h ├── m_misc.c ├── m_misc.h ├── m_random.c ├── m_random.h ├── md5.c ├── md5.h ├── memio.c ├── memio.h ├── midifile.c ├── midifile.h ├── mus2mid.c ├── mus2mid.h ├── net_client.c ├── net_client.h ├── net_common.c ├── net_common.h ├── net_dedicated.c ├── net_dedicated.h ├── net_defs.h ├── net_gui.c ├── net_gui.h ├── net_io.c ├── net_io.h ├── net_loop.c ├── net_loop.h ├── net_packet.c ├── net_packet.h ├── net_query.c ├── net_query.h ├── net_sdl.c ├── net_sdl.h ├── net_server.c ├── net_server.h ├── net_structrw.c ├── net_structrw.h ├── p_ceilng.c ├── p_doors.c ├── p_enemy.c ├── p_floor.c ├── p_inter.c ├── p_inter.h ├── p_lights.c ├── p_local.h ├── p_map.c ├── p_maputl.c ├── p_mobj.c ├── p_mobj.h ├── p_plats.c ├── p_pspr.c ├── p_pspr.h ├── p_saveg.c ├── p_saveg.h ├── p_setup.c ├── p_setup.h ├── p_sight.c ├── p_spec.c ├── p_spec.h ├── p_switch.c ├── p_telept.c ├── p_tick.c ├── p_tick.h ├── p_user.c ├── pr_process.c ├── pr_process.h ├── psd-doom-screensaver.desktop ├── psd-doom.desktop ├── psdoom-screensaver.desktop ├── psdoom.desktop ├── r_bsp.c ├── r_bsp.h ├── r_data.c ├── r_data.h ├── r_defs.h ├── r_draw.c ├── r_draw.h ├── r_local.h ├── r_main.c ├── r_main.h ├── r_plane.c ├── r_plane.h ├── r_segs.c ├── r_segs.h ├── r_sky.c ├── r_sky.h ├── r_state.h ├── r_things.c ├── r_things.h ├── resource.rc ├── resource.rc.in ├── s_sound.c ├── s_sound.h ├── sounds.c ├── sounds.h ├── st_lib.c ├── st_lib.h ├── st_stuff.c ├── st_stuff.h ├── tables.c ├── tables.h ├── v_video.c ├── v_video.h ├── w_checksum.c ├── w_checksum.h ├── w_file.c ├── w_file.h ├── w_file_posix.c ├── w_file_stdc.c ├── w_file_win32.c ├── w_merge.c ├── w_merge.h ├── w_wad.c ├── w_wad.h ├── wi_stuff.c ├── wi_stuff.h ├── z_native.c ├── z_zone.c └── z_zone.h ├── stamp-h1 ├── textscreen ├── .deps │ ├── txt_button.Po │ ├── txt_checkbox.Po │ ├── txt_desktop.Po │ ├── txt_dropdown.Po │ ├── txt_gui.Po │ ├── txt_inputbox.Po │ ├── txt_io.Po │ ├── txt_label.Po │ ├── txt_radiobutton.Po │ ├── txt_scrollpane.Po │ ├── txt_sdl.Po │ ├── txt_separator.Po │ ├── txt_spinctrl.Po │ ├── txt_strut.Po │ ├── txt_table.Po │ ├── txt_widget.Po │ ├── txt_window.Po │ └── txt_window_action.Po ├── Doxyfile ├── Makefile ├── Makefile.am ├── Makefile.in ├── examples │ ├── .deps │ │ ├── calculator.Po │ │ └── guitest.Po │ ├── Makefile │ ├── Makefile.am │ ├── Makefile.in │ ├── calculator.c │ └── guitest.c ├── textscreen.h ├── txt_button.c ├── txt_button.h ├── txt_checkbox.c ├── txt_checkbox.h ├── txt_desktop.c ├── txt_desktop.h ├── txt_dropdown.c ├── txt_dropdown.h ├── txt_font.h ├── txt_gui.c ├── txt_gui.h ├── txt_inputbox.c ├── txt_inputbox.h ├── txt_io.c ├── txt_io.h ├── txt_label.c ├── txt_label.h ├── txt_main.h ├── txt_radiobutton.c ├── txt_radiobutton.h ├── txt_scrollpane.c ├── txt_scrollpane.h ├── txt_sdl.c ├── txt_sdl.h ├── txt_separator.c ├── txt_separator.h ├── txt_smallfont.h ├── txt_spinctrl.c ├── txt_spinctrl.h ├── txt_strut.c ├── txt_strut.h ├── txt_table.c ├── txt_table.h ├── txt_widget.c ├── txt_widget.h ├── txt_window.c ├── txt_window.h ├── txt_window_action.c └── txt_window_action.h └── wince ├── .deps ├── dummy.Po ├── env.Po ├── errno.Po └── fileops.Po ├── Makefile ├── Makefile.am ├── Makefile.in ├── README ├── dummy.c ├── env.c ├── env.h ├── errno.c ├── errno.h ├── fileops.c ├── fileops.h └── libc_wince.h /README.md: -------------------------------------------------------------------------------- 1 | psdoom-ng 2 | ========= 3 | 4 | psdoom-ng is a First Person Shooter operating system process killer based on psDooM and Chocolate Doom. 5 | 6 | 7 | Compile and usage 8 | ----------------- 9 | 10 | Quick guide: 11 | 12 | 1. Install all dependencies: gcc, make, libsdl, sdl_mixer, sdl_net, python. 13 | 2. `cd trunk && ./configure && make` 14 | 4. Get a copy of Doom, to copy the file Doom2.wad. 15 | 3. Action! `./src/psdoom` 16 | 17 | Find more information in: 18 | * trunk/COMPILE 19 | * trunk/CMDLINE 20 | * trunk/psdoom/README (specific options and instructions to find your processess) 21 | 22 | Mac OS X 23 | --------- 24 | 25 | Now with support for Mac OS X! 26 | 27 | It is recommended use brew to install the depenedencies. 28 | 29 | 30 | Support for external process source 31 | ----------------------------------- 32 | 33 | You can use external commands as interface to retrieve, renice and kill process. 34 | 35 | This makes it easy to adapt the tool to your needs, or even integrate it with external 36 | services (AWS, heroku, vmware, etc). 37 | 38 | For that, you only need to override these environment variables: 39 | 40 | * PSDOOMPSCMD List the processes. The command must print one space separated 41 | line per process with the format: ` ` 42 | 43 | keymon 29 web4 1 44 | keymon 30 web3 1 45 | keymon 31 adis3 1 46 | keymon 32 core15 1 47 | keymon 20 core2 1 48 | 49 | * PSDOOMRENICECMD Command to renice the process. Will get the pid as argument 50 | 51 | * PSDOOMKILLCMD Command to kill the process. Will get the pid as argument 52 | 53 | 54 | For example, in contrib you can find a script that interacts with cloudfoundry: 55 | 56 | cd trunk 57 | PSDOOMPSCMD="./contrib/psdoom-cf-ctl ps" \ 58 | PSDOOMRENICECMD="true" \ 59 | PSDOOMKILLCMD="./contrib/psdoom-cf-ctl kill" \ 60 | ./src/psdoom 61 | 62 | 63 | NOTE: psdoom does a synchronous call to the external commands (mono-thread). If your 64 | command takes too long, you will feel hipcuts in the game. Try to make your commands 65 | respond really fast! 66 | -------------------------------------------------------------------------------- /trunk/AUTHORS: -------------------------------------------------------------------------------- 1 | Simon Howard 2 | -------------------------------------------------------------------------------- /trunk/Makefile.am: -------------------------------------------------------------------------------- 1 | AUX_DIST_GEN = \ 2 | $(ac_aux_dir)/install-sh \ 3 | $(ac_aux_dir)/missing 4 | 5 | MSVC_FILES= \ 6 | msvc/README \ 7 | msvc/config.h \ 8 | msvc/inttypes.h \ 9 | msvc/stdint.h \ 10 | msvc/win32.rc \ 11 | msvc/ChocolateDoom.sln \ 12 | msvc/ChocolateDoom.vcproj 13 | 14 | CODEBLOCKS_FILES= \ 15 | codeblocks/config.h \ 16 | codeblocks/game.cbp \ 17 | codeblocks/game-res.rc \ 18 | codeblocks/libpcsound.cbp \ 19 | codeblocks/main.workspace \ 20 | codeblocks/README \ 21 | codeblocks/server.cbp \ 22 | codeblocks/setup.cbp \ 23 | codeblocks/setup-res.rc \ 24 | codeblocks/textscreen.cbp 25 | 26 | DOC_FILES= \ 27 | CMDLINE \ 28 | README \ 29 | README.OPL \ 30 | NEWS \ 31 | ChangeLog \ 32 | NOT-BUGS 33 | 34 | EXTRA_DIST= \ 35 | $(AUX_DIST_GEN) \ 36 | $(MSVC_FILES) \ 37 | $(CODEBLOCKS_FILES) \ 38 | $(DOC_FILES) \ 39 | .lvimrc \ 40 | HACKING \ 41 | TODO \ 42 | rpm.spec 43 | 44 | docdir=$(prefix)/share/doc/@PACKAGE@ 45 | doc_DATA=$(DOC_FILES) 46 | 47 | MAINTAINERCLEANFILES = $(AUX_DIST_GEN) 48 | 49 | SUBDIRS=wince textscreen opl pcsound data src man setup 50 | DIST_SUBDIRS=pkg $(SUBDIRS) 51 | 52 | if HAVE_PYTHON 53 | 54 | noinst_DATA=CMDLINE 55 | 56 | CMDLINE : src/ 57 | ./man/docgen -p man/CMDLINE.template src/ > $@ 58 | 59 | INSTALL : man/INSTALL.template man/simplecpp 60 | ./man/simplecpp < man/INSTALL.template > $@ 61 | 62 | endif 63 | 64 | -------------------------------------------------------------------------------- /trunk/TODO: -------------------------------------------------------------------------------- 1 | Currently in progress: 2 | 3 | Planned features 4 | 5 | Windows XP/7 ps/kill Support... 6 | Support for ps/kill MacOS... 7 | Support for killing logged on users and to visualize those users as avatars 8 | Remote administration 9 | 10 | For past todo's by original maintainers of psDooM see psdoom/TODO 11 | 12 | # vim: tw=70 13 | 14 | -------------------------------------------------------------------------------- /trunk/acinclude.m4: -------------------------------------------------------------------------------- 1 | 2 | dnl 3 | dnl SDL workaround autoconf macros, by Simon Howard. 4 | dnl I release the contents of this file to the public domain. 5 | dnl 6 | 7 | dnl Macro to check if autoconf's compile tests have been broken by 8 | dnl SDL. Tries to build the simplest possible program, and if it 9 | dnl fails, calls the given block. 10 | 11 | AC_DEFUN([AC_CHECK_SDL_BREAKAGE], [ 12 | AC_LINK_IFELSE(AC_LANG_PROGRAM([], []), [], [ 13 | $1 14 | ]) 15 | ]) 16 | 17 | dnl Macro to work around SDL redefining main. The provided block 18 | dnl is run with main #defined to SDL_main via a compiler switch 19 | dnl if autoconf tests are found to be broken. 20 | 21 | AC_DEFUN([AC_SDL_MAIN_WORKAROUND], [ 22 | sdl_workaround_saved_CFLAGS="$CFLAGS" 23 | 24 | AC_CHECK_SDL_BREAKAGE([ 25 | CFLAGS="$CFLAGS -Dmain=SDL_main" 26 | ]) 27 | 28 | AC_CHECK_SDL_BREAKAGE([ 29 | AC_MSG_ERROR([Autoconf checks broken by SDL, and can't figure out how to fix them.]) 30 | ]) 31 | 32 | $1 33 | 34 | CFLAGS="$sdl_workaround_saved_CFLAGS" 35 | ]) 36 | 37 | -------------------------------------------------------------------------------- /trunk/codeblocks/README: -------------------------------------------------------------------------------- 1 | 2 | This is a set of codeblocks project files for building chocolate doom 3 | under Windows. Thanks to Russell Rice for these :-) 4 | 5 | -------------------------------------------------------------------------------- /trunk/codeblocks/config.h: -------------------------------------------------------------------------------- 1 | 2 | /* Name of package */ 3 | #define PACKAGE "chocolate-doom" 4 | 5 | /* Define to the address where bug reports for this package should be sent. */ 6 | #define PACKAGE_BUGREPORT "fraggle@gmail.com" 7 | 8 | /* Define to the full name of this package. */ 9 | #define PACKAGE_NAME "Chocolate Doom" 10 | 11 | /* Define to the full name and version of this package. */ 12 | #define PACKAGE_STRING "Chocolate Doom 1.6.0" 13 | 14 | /* Define to the one symbol short name of this package. */ 15 | #define PACKAGE_TARNAME "chocolate-doom" 16 | 17 | /* Define to the version of this package. */ 18 | #define PACKAGE_VERSION "1.6.0" 19 | 20 | /* Change this when you create your awesome forked version */ 21 | #define PROGRAM_PREFIX "chocolate-" 22 | 23 | /* Define to 1 if you have the ANSI C header files. */ 24 | #define STDC_HEADERS 1 25 | 26 | /* Version number of package */ 27 | #define VERSION "1.6.0" 28 | 29 | /* Define to 1 if your processor stores words with the most significant byte 30 | first (like Motorola and SPARC, unlike Intel and VAX). */ 31 | /* #undef WORDS_BIGENDIAN */ 32 | 33 | -------------------------------------------------------------------------------- /trunk/codeblocks/game-res.rc: -------------------------------------------------------------------------------- 1 | 1 ICON "../data/doom.ico" 2 | 3 | 1 VERSIONINFO 4 | PRODUCTVERSION 1,6,0,0 5 | FILEVERSION 1,6,0,0 6 | FILETYPE 1 7 | { 8 | BLOCK "StringFileInfo" 9 | { 10 | BLOCK "040904E4" 11 | { 12 | VALUE "FileVersion", "1.6.0" 13 | VALUE "FileDescription", "1.6.0" 14 | VALUE "InternalName", "Chocolate-Doom" 15 | VALUE "CompanyName", "Chocolate-Doom" 16 | VALUE "LegalCopyright", "GNU General Public License" 17 | VALUE "ProductName", "Chocolate-Doom" 18 | VALUE "ProductVersion", "1.6.0" 19 | } 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /trunk/codeblocks/libpcsound.cbp: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 64 | 65 | -------------------------------------------------------------------------------- /trunk/codeblocks/main.workspace: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /trunk/codeblocks/setup-res.rc: -------------------------------------------------------------------------------- 1 | 1 ICON "../data/setup.ico" 2 | 3 | CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "setup-manifest.xml" 4 | 5 | 1 VERSIONINFO 6 | PRODUCTVERSION 1,6,0,0 7 | FILEVERSION 1,6,0,0 8 | FILETYPE 1 9 | { 10 | BLOCK "StringFileInfo" 11 | { 12 | BLOCK "040904E4" 13 | { 14 | VALUE "FileVersion", "1.6.0" 15 | VALUE "FileDescription", "Chocolate-Doom Setup" 16 | VALUE "InternalName", "chocolate-setup" 17 | VALUE "CompanyName", "fraggle@gmail.com" 18 | VALUE "LegalCopyright", "GNU General Public License" 19 | VALUE "ProductName", "Chocolate-Doom Setup" 20 | VALUE "ProductVersion", "1.6.0" 21 | } 22 | } 23 | } 24 | 25 | -------------------------------------------------------------------------------- /trunk/contrib/psdoom-cf-ctl: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Command line tool to use psdoom-ng (patched to support external commands) 4 | # with cloudfoundry. This is just a small proof of concept, it will show 5 | # all the apps in the current space as processes. 6 | # 7 | # Kill the process in psdoom means delete the app. 8 | # 9 | # PSDOOMPSCMD="./contrib/psdoom-cf-ctl ps" \ 10 | # PSDOOMRENICECMD="true" \ 11 | # PSDOOMKILLCMD="./contrib/psdoom-cf-ctl kill" \ 12 | # ./trunk/src/psdoom 13 | # 14 | 15 | export CF_COLOR=false 16 | APPS_CACHE_FILE=/tmp/psdoom-cf_apps_pids.txt 17 | CF_APPS_OUTPUT=/tmp/psdoom-cf_apps_output.txt 18 | 19 | # Hacky function to get an pid per app 20 | get_pid_for_app() { 21 | app=$1 22 | grep -qe "^$1\$" $APPS_CACHE_FILE &> /dev/null || echo $app >> $APPS_CACHE_FILE 23 | nl $APPS_CACHE_FILE | awk "/\t$app\$/ { print \$1 }" 24 | } 25 | get_app_for_pid() { 26 | pid=$1 27 | nl $APPS_CACHE_FILE | awk "/^[ \t]*$pid\t/ { print \$2 }" 28 | } 29 | 30 | if [ "$1" == "ps" ]; then 31 | # We use always a cached output, because it is just easier 32 | [ ! -f $CF_APPS_OUTPUT ] && touch $CF_APPS_OUTPUT 33 | 34 | # The running ones are deamons, the stopped ones, are normal guys 35 | for app in $(cat $CF_APPS_OUTPUT | grep -e 'started' | cut -f 1 -d ' '); do 36 | pid=$(get_pid_for_app $app) 37 | echo "$USER $pid $app 1" 38 | done 39 | for app in $(cat $CF_APPS_OUTPUT | grep -e 'stopped' | cut -f 1 -d ' '); do 40 | pid=$(get_pid_for_app $app) 41 | echo "$USER $pid $app 0" 42 | done 43 | 44 | # Refresh the cache 45 | nohup cf apps > $CF_APPS_OUTPUT & 46 | 47 | elif [ "$1" == "kill" ]; then 48 | app=$(get_app_for_pid $2) 49 | get_app_for_pid $2 50 | if [ ! -z "$app" ]; then 51 | # delete it from CF 52 | cf delete $app -f 1>&2 53 | # And from the cache 54 | sed -i "" "/^$app /d" $CF_APPS_OUTPUT 55 | fi 56 | fi 57 | echo $0 $@ 1>&2 58 | -------------------------------------------------------------------------------- /trunk/data/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | EXTRA_DIST= \ 3 | README \ 4 | doom.ico \ 5 | doom8.ico \ 6 | doom.png \ 7 | setup.ico \ 8 | setup8.ico \ 9 | setup.png \ 10 | convert-icon 11 | 12 | iconsdir = $(prefix)/share/icons 13 | icons_DATA = @PROGRAM_PREFIX@doom.png \ 14 | @PROGRAM_PREFIX@setup.png 15 | 16 | @PROGRAM_PREFIX@doom.png : doom.png 17 | cp $^ $@ 18 | 19 | @PROGRAM_PREFIX@setup.png : setup.png 20 | cp $^ $@ 21 | 22 | -------------------------------------------------------------------------------- /trunk/data/README: -------------------------------------------------------------------------------- 1 | The Chocolate Doom icon is based on an image by Chris Metcalf 2 | (http://www.chrismetcalf.org/) which is copyrighted to him: 3 | 4 | http://www.flickr.com/photos/laffy4k/448920776/ 5 | 6 | The "foo8.ico" files are 8-bit depth only, while the "foo.ico" files 7 | contain full 32-bit versions, scaled to different sizes and with proper 8 | alpha masks (as well as the 8-bit versions). The 8-bit versions are 9 | used when setting the icon within SDL, as SDL under Windows displays 10 | full color icons in a very poor quality. The full-color versions are 11 | used in the resource files. 12 | 13 | -------------------------------------------------------------------------------- /trunk/data/chocolate-doom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keymon/psdoom-ng/83d02bafe91439117421a0ccc3e238a0b9544e93/trunk/data/chocolate-doom.png -------------------------------------------------------------------------------- /trunk/data/chocolate-setup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keymon/psdoom-ng/83d02bafe91439117421a0ccc3e238a0b9544e93/trunk/data/chocolate-setup.png -------------------------------------------------------------------------------- /trunk/data/doom.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keymon/psdoom-ng/83d02bafe91439117421a0ccc3e238a0b9544e93/trunk/data/doom.ico -------------------------------------------------------------------------------- /trunk/data/doom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keymon/psdoom-ng/83d02bafe91439117421a0ccc3e238a0b9544e93/trunk/data/doom.png -------------------------------------------------------------------------------- /trunk/data/doom8.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keymon/psdoom-ng/83d02bafe91439117421a0ccc3e238a0b9544e93/trunk/data/doom8.ico -------------------------------------------------------------------------------- /trunk/data/psd-doom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keymon/psdoom-ng/83d02bafe91439117421a0ccc3e238a0b9544e93/trunk/data/psd-doom.png -------------------------------------------------------------------------------- /trunk/data/psd-setup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keymon/psdoom-ng/83d02bafe91439117421a0ccc3e238a0b9544e93/trunk/data/psd-setup.png -------------------------------------------------------------------------------- /trunk/data/psdoom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keymon/psdoom-ng/83d02bafe91439117421a0ccc3e238a0b9544e93/trunk/data/psdoom.png -------------------------------------------------------------------------------- /trunk/data/pssetup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keymon/psdoom-ng/83d02bafe91439117421a0ccc3e238a0b9544e93/trunk/data/pssetup.png -------------------------------------------------------------------------------- /trunk/data/setup.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keymon/psdoom-ng/83d02bafe91439117421a0ccc3e238a0b9544e93/trunk/data/setup.ico -------------------------------------------------------------------------------- /trunk/data/setup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keymon/psdoom-ng/83d02bafe91439117421a0ccc3e238a0b9544e93/trunk/data/setup.png -------------------------------------------------------------------------------- /trunk/data/setup8.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keymon/psdoom-ng/83d02bafe91439117421a0ccc3e238a0b9544e93/trunk/data/setup8.ico -------------------------------------------------------------------------------- /trunk/man/CMDLINE.template: -------------------------------------------------------------------------------- 1 | == Command line parameters == 2 | 3 | This is a list of the command line parameters supported by Chocolate Doom. 4 | A number of additional parameters are supported in addition to those 5 | present in Vanilla Doom. 6 | 7 | @content 8 | 9 | -------------------------------------------------------------------------------- /trunk/man/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | MANPAGE_GEN_FILES=manpage.template docgen default.cfg.template extra.cfg.template 3 | 4 | docdir=$(prefix)/share/doc/@PACKAGE@ 5 | 6 | if HAVE_PYTHON 7 | 8 | man_MANS=chocolate-doom.6 \ 9 | chocolate-server.6 \ 10 | chocolate-setup.6 \ 11 | default.cfg.5 \ 12 | $(PACKAGE).cfg.5 13 | 14 | nodist_doc_DATA=INSTALL 15 | 16 | chocolate-doom.6: ../src $(MANPAGE_GEN_FILES) 17 | ./docgen -m manpage.template ../src > $@ 18 | 19 | default.cfg.5: ../src default.cfg.template 20 | ./docgen -m default.cfg.template -c default.cfg ../src > $@ 21 | 22 | $(PACKAGE).cfg.5: ../src extra.cfg.template 23 | ./docgen -m extra.cfg.template -c chocolate-doom.cfg ../src > $@ 24 | 25 | INSTALL: INSTALL.template 26 | ./simplecpp -DPRECOMPILED < INSTALL.template > $@ 27 | 28 | endif 29 | 30 | EXTRA_DIST = $(man_MANS) $(MANPAGE_GEN_FILES) \ 31 | wikipages \ 32 | CMDLINE.template \ 33 | INSTALL.template \ 34 | simplecpp 35 | 36 | -------------------------------------------------------------------------------- /trunk/man/chocolate-server.6: -------------------------------------------------------------------------------- 1 | .TH chocolate\-server 6 2 | .SH NAME 3 | chocolate\-server \- dedicated server for chocolate\-doom 4 | .SH SYNOPSIS 5 | .B chocolate\-server 6 | [OPTIONS] 7 | .SH DESCRIPTION 8 | .PP 9 | Chocolate Doom is a modern doom engine designed to behave 10 | as similar to the original doom game as is possible. 11 | .PP 12 | .B chocolate\-server 13 | is a dedicated server for Chocolate Doom. It is equivalent to 14 | running 15 | .B chocolate\-doom 16 | with the "-dedicated" option. 17 | .PP 18 | Game options are not specified to the server, which merely acts to 19 | retransmit data between players in the game; parameters for the 20 | game should be specified by the first player to connect to the server, 21 | who is designated the controlling player. 22 | .br 23 | .SH OPTIONS 24 | .TP 25 | \fB-ignoreversion\fR 26 | Ignore version mismatches between the server and the client. Using this 27 | option may cause game desyncs to occur, or differences in protocol may 28 | mean the netgame will simply not function at all. 29 | .TP 30 | \fB-port \fR 31 | Use the specified UDP port for communications, instead of the default (2342). 32 | .TP 33 | \fB-privateserver\fR 34 | Don't register with the global master server. 35 | .TP 36 | \fB-servername \fR 37 | Specify a name for the server. 38 | .SH SEE ALSO 39 | \fBchocolate-doom\fR(6), 40 | \fBchocolate-setup\fR(6) 41 | .SH AUTHOR 42 | Chocolate Doom is written and maintained by Simon Howard. 43 | .PP 44 | This manual was written by Jon Dowland. 45 | .SH COPYRIGHT 46 | Copyright \(co id Software Inc. 47 | Copyright \(co 2005-8 Simon Howard. 48 | .br 49 | This is free software. You may redistribute copies of it under the terms of 50 | the GNU General Public License . 51 | There is NO WARRANTY, to the extent permitted by law. 52 | 53 | -------------------------------------------------------------------------------- /trunk/man/chocolate-setup.6: -------------------------------------------------------------------------------- 1 | .TH chocolate\-setup 6 2 | .SH NAME 3 | chocolate\-setup \- configuration tool for chocolate\-doom 4 | .SH SYNOPSIS 5 | .B chocolate\-setup 6 | [OPTIONS] 7 | .SH DESCRIPTION 8 | .PP 9 | Chocolate Doom is a modern Doom engine designed to behave 10 | as similar to the original Doom game as is possible. 11 | .PP 12 | .B chocolate\-setup 13 | is a tool for configuring Chocolate Doom. It provides a menu\-based 14 | interface for the display, joystick, keyboard, mouse, sound and 15 | compatibility settings. 16 | .PP 17 | .B chocolate\-setup 18 | can also be used to start and join network games. 19 | .PP 20 | .SH OPTIONS 21 | .TP 22 | \fB-config \fR 23 | Load configuration from the specified file, instead of default.cfg. 24 | .TP 25 | \fB-extraconfig \fR 26 | Load extra configuration from the specified file, instead of chocolate-doom.cfg. 27 | .SH SEE ALSO 28 | \fBchocolate-doom\fR(6), 29 | \fBdefault.cfg\fR(5), 30 | \fBchocolate-doom.cfg\fR(5) 31 | .SH AUTHOR 32 | Chocolate Doom is written and maintained by Simon Howard. 33 | .PP 34 | This manual was written by Jon Dowland. 35 | .SH COPYRIGHT 36 | Copyright \(co id Software Inc. 37 | Copyright \(co 2005-8 Simon Howard. 38 | .br 39 | This is free software. You may redistribute copies of it under the terms of 40 | the GNU General Public License . 41 | There is NO WARRANTY, to the extent permitted by law. 42 | 43 | -------------------------------------------------------------------------------- /trunk/man/default.cfg.template: -------------------------------------------------------------------------------- 1 | .TH default.cfg 5 2 | .SH NAME 3 | default.cfg \- Chocolate Doom configuration file 4 | .SH DESCRIPTION 5 | .PP 6 | \fIdefault.cfg\fR 7 | is the configuration file for \fBchocolate-doom\fR(6). The configuration 8 | options stored in the file are the same as those stored in the 9 | original DOS Vanilla Doom. 10 | Extra Chocolate Doom-specific options are stored in a separate 11 | configuration file, \fBchocolate-doom.cfg\fR. 12 | .PP 13 | \fIdefault.cfg\fR is normally stored in the user's home directory, 14 | in \fI~/.chocolate-doom/default.cfg\fR. 15 | .PP 16 | The \fBchocolate-setup\fR(6) tool provides a simple to use front-end 17 | for editing \fIdefault.cfg\fR. 18 | .br 19 | .SH FILE FORMAT 20 | The file is a plain-text file, consisting of a list of configuration 21 | options and their values, separated by whitespace. Each option is stored 22 | on a separate line. Options have different types; an option may have 23 | either an integer, floating point or string value. If the option is 24 | of a string type, the value is surrounded by quotes ("). 25 | .PP 26 | For example: 27 | .RS 28 | .PP 29 | integer_value 1 30 | .br 31 | integer_value2 1 32 | .br 33 | floating_point_value 4.2 34 | .br 35 | string_value "hello world" 36 | .RE 37 | .PP 38 | Invalid lines or comments in the file will be ignored, but it is advisable 39 | not to put them in the file; the file is rewritten from scratch every time 40 | the game exits, so any invalid lines or comments will be lost. 41 | .PP 42 | Some options are used for keyboard key bindings; these are stored as 43 | integer values containing the keyboard scan code of the key to be bound to. 44 | Boolean values are also stored as integers, with a value of zero usually 45 | indicating "false" and a non-zero value indicating "true". 46 | 47 | @content 48 | 49 | .SH SEE ALSO 50 | \fBchocolate-doom\fR(6), 51 | \fBchocolate-doom.cfg\fR(5), 52 | \fBchocolate-setup\fR(6) 53 | 54 | -------------------------------------------------------------------------------- /trunk/man/extra.cfg.template: -------------------------------------------------------------------------------- 1 | .TH chocolate-doom.cfg 5 2 | .SH NAME 3 | chocolate-doom.cfg \- Chocolate Doom configuration file 4 | .SH DESCRIPTION 5 | .PP 6 | \fIchocolate-doom.cfg\fR 7 | is a configuration file for \fBchocolate-doom\fR(6). This file acts 8 | as an auxiliary configuration file; the main configuration options 9 | are stored in \fBdefault.cfg\fR, which contains the same configuration 10 | options as Vanilla Doom (for compatibility). \fIchocolate-doom.cfg\fR 11 | contains configuration options that are specific to Chocolate Doom 12 | only. 13 | .PP 14 | \fIchocolate-doom.cfg\fR is normally stored in the user's home directory, 15 | as \fI~/.chocolate-doom/chocolate-doom.cfg\fR. 16 | .PP 17 | The \fBchocolate-setup\fR(6) tool provides a simple to use front-end 18 | for editing \fIchocolate-doom.cfg\fR. 19 | .SH FILE FORMAT 20 | .PP 21 | The file format is the same as that used for \fBdefault.cfg\fR(5). 22 | .br 23 | 24 | @content 25 | 26 | .SH SEE ALSO 27 | \fBchocolate-doom\fR(6), 28 | \fBdefault.cfg\fR(5), 29 | \fBchocolate-setup\fR(6) 30 | 31 | -------------------------------------------------------------------------------- /trunk/man/wikipages: -------------------------------------------------------------------------------- 1 | # This is a list of wiki pages to automatically link to when generating 2 | # wikitext output. 3 | Dehacked 4 | Doom 1.91 5 | Configuration 6 | Merging 7 | Multiplayer 8 | Three screen mode 9 | -------------------------------------------------------------------------------- /trunk/msvc/ChocolateDoom.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 10.00 3 | # Visual C++ Express 2008 4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Chocolate Doom", "ChocolateDoom.vcproj", "{8B744A3B-8F18-41A0-85A3-293816E85B6E}" 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 8 | Debug Client|Win32 = Debug Client|Win32 9 | Debug Server|Win32 = Debug Server|Win32 10 | Debug Setup|Win32 = Debug Setup|Win32 11 | Release Client|Win32 = Release Client|Win32 12 | Release Server|Win32 = Release Server|Win32 13 | Release Setup|Win32 = Release Setup|Win32 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {8B744A3B-8F18-41A0-85A3-293816E85B6E}.Debug Client|Win32.ActiveCfg = Debug|Win32 17 | {8B744A3B-8F18-41A0-85A3-293816E85B6E}.Debug Client|Win32.Build.0 = Debug|Win32 18 | {8B744A3B-8F18-41A0-85A3-293816E85B6E}.Debug Server|Win32.ActiveCfg = Debug Server|Win32 19 | {8B744A3B-8F18-41A0-85A3-293816E85B6E}.Debug Server|Win32.Build.0 = Debug Server|Win32 20 | {8B744A3B-8F18-41A0-85A3-293816E85B6E}.Debug Setup|Win32.ActiveCfg = Debug Setup|Win32 21 | {8B744A3B-8F18-41A0-85A3-293816E85B6E}.Debug Setup|Win32.Build.0 = Debug Setup|Win32 22 | {8B744A3B-8F18-41A0-85A3-293816E85B6E}.Release Client|Win32.ActiveCfg = Release|Win32 23 | {8B744A3B-8F18-41A0-85A3-293816E85B6E}.Release Client|Win32.Build.0 = Release|Win32 24 | {8B744A3B-8F18-41A0-85A3-293816E85B6E}.Release Server|Win32.ActiveCfg = Release Server|Win32 25 | {8B744A3B-8F18-41A0-85A3-293816E85B6E}.Release Server|Win32.Build.0 = Release Server|Win32 26 | {8B744A3B-8F18-41A0-85A3-293816E85B6E}.Release Setup|Win32.ActiveCfg = Release Setup|Win32 27 | {8B744A3B-8F18-41A0-85A3-293816E85B6E}.Release Setup|Win32.Build.0 = Release Setup|Win32 28 | EndGlobalSection 29 | GlobalSection(SolutionProperties) = preSolution 30 | HideSolutionNode = FALSE 31 | EndGlobalSection 32 | EndGlobal 33 | -------------------------------------------------------------------------------- /trunk/msvc/README: -------------------------------------------------------------------------------- 1 | Project and header files for building with Microsoft Visual C++. Please 2 | note that the MSVC project files are not officially supported; the 3 | canonical way to build Chocolate Doom under Windows is using 4 | MingW + MSYS. 5 | 6 | -------------------------------------------------------------------------------- /trunk/msvc/config.h: -------------------------------------------------------------------------------- 1 | /* config.h for MSVC builds. This is just the config.h created by 2 | * configure. */ 3 | 4 | /* Name of package */ 5 | #define PACKAGE "chocolate-doom" 6 | 7 | /* Define to the address where bug reports for this package should be sent. */ 8 | #define PACKAGE_BUGREPORT "fraggle@gmail.com" 9 | 10 | /* Define to the full name of this package. */ 11 | #define PACKAGE_NAME "Chocolate Doom" 12 | 13 | /* Define to the full name and version of this package. */ 14 | #define PACKAGE_STRING "Chocolate Doom 1.6.0" 15 | 16 | /* Define to the one symbol short name of this package. */ 17 | #define PACKAGE_TARNAME "chocolate-doom" 18 | 19 | /* Define to the version of this package. */ 20 | #define PACKAGE_VERSION "1.6.0" 21 | 22 | /* Change this when you create your awesome forked version */ 23 | #define PROGRAM_PREFIX "chocolate-" 24 | 25 | /* Version number of package */ 26 | #define VERSION "1.6.0" 27 | 28 | /* Define to 1 if your processor stores words with the most significant byte 29 | first (like Motorola and SPARC, unlike Intel and VAX). */ 30 | /* #undef WORDS_BIGENDIAN */ 31 | 32 | -------------------------------------------------------------------------------- /trunk/msvc/win32.rc: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // 3 | // Copyright(C) 2005 Simon Howard 4 | // Copyright(C) 2008 "GhostlyDeath" (ghostlydeath@gmail.com) 5 | // 6 | // This program is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU General Public License 8 | // as published by the Free Software Foundation; either version 2 9 | // of the License, or (at your option) any later version. 10 | // 11 | // This program is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | // 16 | // You should have received a copy of the GNU General Public License 17 | // along with this program; if not, write to the Free Software 18 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 19 | // 02111-1307, USA. 20 | // 21 | // DESCRIPTION: 22 | // Win32 Resources 23 | // 24 | //----------------------------------------------------------------------------- 25 | 26 | #ifndef DEDICATEDSERVER 27 | #ifdef CHOCOLATESETUP 28 | 1 ICON "../data/setup.ico" 29 | #else 30 | 1 ICON "../data/doom.ico" 31 | #endif 32 | #endif 33 | 34 | 1 VERSIONINFO 35 | PRODUCTVERSION 1,6,0,0 36 | FILEVERSION 1,6,0,0 37 | FILETYPE 1 38 | BEGIN 39 | BLOCK "StringFileInfo" 40 | BEGIN 41 | BLOCK "040904E4" 42 | BEGIN 43 | VALUE "FileVersion", "1.6.0" 44 | VALUE "FileDescription", "Chocolate Doom 1.6.0" 45 | VALUE "InternalName", "chocolate-doom" 46 | VALUE "CompanyName", "fraggle@gmail.com" 47 | VALUE "LegalCopyright", "GNU General Public License" 48 | VALUE "ProductName", "Chocolate Doom" 49 | VALUE "ProductVersion", "1.6.0" 50 | END 51 | END 52 | END 53 | 54 | // GhostlyDeath - Preferebly for codeblocks (if it even uses this RC!) 55 | #ifdef __MINGW32__ 56 | #ifdef CHOCOLATESETUP 57 | // RT_MANIFEST might NOT be defined 58 | 1 24 "../setup/setup-manifest.xml" 59 | #endif 60 | #endif 61 | -------------------------------------------------------------------------------- /trunk/opl/.deps/ioperm_sys.Po: -------------------------------------------------------------------------------- 1 | ioperm_sys.o: ioperm_sys.c 2 | -------------------------------------------------------------------------------- /trunk/opl/.deps/opl_obsd.Po: -------------------------------------------------------------------------------- 1 | opl_obsd.o: opl_obsd.c ../config.h 2 | 3 | ../config.h: 4 | -------------------------------------------------------------------------------- /trunk/opl/.deps/opl_win32.Po: -------------------------------------------------------------------------------- 1 | opl_win32.o: opl_win32.c ../config.h 2 | 3 | ../config.h: 4 | -------------------------------------------------------------------------------- /trunk/opl/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | AM_CFLAGS=@SDLMIXER_CFLAGS@ 3 | 4 | SUBDIRS = . examples 5 | 6 | noinst_LIBRARIES=libopl.a 7 | 8 | libopl_a_SOURCES = \ 9 | opl_internal.h \ 10 | opl.c opl.h \ 11 | opl_linux.c \ 12 | opl_obsd.c \ 13 | opl_queue.c opl_queue.h \ 14 | opl_sdl.c \ 15 | opl_timer.c opl_timer.h \ 16 | opl_win32.c \ 17 | ioperm_sys.c ioperm_sys.h \ 18 | dbopl.c dbopl.h 19 | 20 | -------------------------------------------------------------------------------- /trunk/opl/examples/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | AM_CFLAGS = -I.. 3 | 4 | noinst_PROGRAMS=droplay 5 | 6 | droplay_LDADD = ../libopl.a @LDFLAGS@ @SDL_LIBS@ @SDLMIXER_LIBS@ 7 | droplay_SOURCES = droplay.c 8 | 9 | -------------------------------------------------------------------------------- /trunk/opl/ioperm_sys.h: -------------------------------------------------------------------------------- 1 | // Emacs style mode select -*- C++ -*- 2 | //----------------------------------------------------------------------------- 3 | // 4 | // Copyright(C) 2002, 2003 Marcel Telka 5 | // Copyright(C) 2009 Simon Howard 6 | // 7 | // This program is free software; you can redistribute it and/or 8 | // modify it under the terms of the GNU General Public License 9 | // as published by the Free Software Foundation; either version 2 10 | // of the License, or (at your option) any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program; if not, write to the Free Software 19 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 20 | // 02111-1307, USA. 21 | // 22 | // DESCRIPTION: 23 | // Interface to the ioperm.sys driver, based on code from the 24 | // Cygwin ioperm library. 25 | // 26 | //----------------------------------------------------------------------------- 27 | 28 | #ifndef IOPERM_SYS_H 29 | #define IOPERM_SYS_H 30 | 31 | int IOperm_EnablePortRange(unsigned int from, unsigned int num, int turn_on); 32 | int IOperm_InstallDriver(void); 33 | int IOperm_UninstallDriver(void); 34 | 35 | #endif /* #ifndef IOPERM_SYS_H */ 36 | 37 | -------------------------------------------------------------------------------- /trunk/opl/opl_queue.h: -------------------------------------------------------------------------------- 1 | // Emacs style mode select -*- C++ -*- 2 | //----------------------------------------------------------------------------- 3 | // 4 | // Copyright(C) 2009 Simon Howard 5 | // 6 | // This program is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU General Public License 8 | // as published by the Free Software Foundation; either version 2 9 | // of the License, or (at your option) any later version. 10 | // 11 | // This program is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | // 16 | // You should have received a copy of the GNU General Public License 17 | // along with this program; if not, write to the Free Software 18 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 19 | // 02111-1307, USA. 20 | // 21 | // DESCRIPTION: 22 | // OPL callback queue. 23 | // 24 | //----------------------------------------------------------------------------- 25 | 26 | #ifndef OPL_QUEUE_H 27 | #define OPL_QUEUE_H 28 | 29 | #include "opl.h" 30 | 31 | typedef struct opl_callback_queue_s opl_callback_queue_t; 32 | 33 | opl_callback_queue_t *OPL_Queue_Create(void); 34 | int OPL_Queue_IsEmpty(opl_callback_queue_t *queue); 35 | void OPL_Queue_Clear(opl_callback_queue_t *queue); 36 | void OPL_Queue_Destroy(opl_callback_queue_t *queue); 37 | void OPL_Queue_Push(opl_callback_queue_t *queue, 38 | opl_callback_t callback, void *data, 39 | unsigned int time); 40 | int OPL_Queue_Pop(opl_callback_queue_t *queue, 41 | opl_callback_t *callback, void **data); 42 | unsigned int OPL_Queue_Peek(opl_callback_queue_t *queue); 43 | 44 | #endif /* #ifndef OPL_QUEUE_H */ 45 | 46 | -------------------------------------------------------------------------------- /trunk/opl/opl_timer.h: -------------------------------------------------------------------------------- 1 | // Emacs style mode select -*- C++ -*- 2 | //----------------------------------------------------------------------------- 3 | // 4 | // Copyright(C) 2009 Simon Howard 5 | // 6 | // This program is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU General Public License 8 | // as published by the Free Software Foundation; either version 2 9 | // of the License, or (at your option) any later version. 10 | // 11 | // This program is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | // 16 | // You should have received a copy of the GNU General Public License 17 | // along with this program; if not, write to the Free Software 18 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 19 | // 02111-1307, USA. 20 | // 21 | // DESCRIPTION: 22 | // OPL timer thread. 23 | // 24 | //----------------------------------------------------------------------------- 25 | 26 | #ifndef OPL_TIMER_H 27 | #define OPL_TIMER_H 28 | 29 | #include "opl.h" 30 | 31 | int OPL_Timer_StartThread(void); 32 | void OPL_Timer_StopThread(void); 33 | void OPL_Timer_SetCallback(unsigned int ms, 34 | opl_callback_t callback, 35 | void *data); 36 | void OPL_Timer_ClearCallbacks(void); 37 | void OPL_Timer_Lock(void); 38 | void OPL_Timer_Unlock(void); 39 | void OPL_Timer_SetPaused(int paused); 40 | 41 | #endif /* #ifndef OPL_TIMER_H */ 42 | 43 | -------------------------------------------------------------------------------- /trunk/pcsound/.deps/pcsound_bsd.Po: -------------------------------------------------------------------------------- 1 | pcsound_bsd.o: pcsound_bsd.c ../config.h 2 | 3 | ../config.h: 4 | -------------------------------------------------------------------------------- /trunk/pcsound/.deps/pcsound_win32.Po: -------------------------------------------------------------------------------- 1 | pcsound_win32.o: pcsound_win32.c 2 | -------------------------------------------------------------------------------- /trunk/pcsound/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | AM_CFLAGS=@SDLMIXER_CFLAGS@ 3 | 4 | noinst_LIBRARIES=libpcsound.a 5 | 6 | libpcsound_a_SOURCES = \ 7 | pcsound.c pcsound.h \ 8 | pcsound_bsd.c \ 9 | pcsound_sdl.c \ 10 | pcsound_linux.c \ 11 | pcsound_win32.c \ 12 | pcsound_internal.h 13 | 14 | -------------------------------------------------------------------------------- /trunk/pcsound/pcsound.h: -------------------------------------------------------------------------------- 1 | // Emacs style mode select -*- C++ -*- 2 | //----------------------------------------------------------------------------- 3 | // 4 | // Copyright(C) 2007 Simon Howard 5 | // 6 | // This program is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU General Public License 8 | // as published by the Free Software Foundation; either version 2 9 | // of the License, or (at your option) any later version. 10 | // 11 | // This program is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | // 16 | // You should have received a copy of the GNU General Public License 17 | // along with this program; if not, write to the Free Software 18 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 19 | // 02111-1307, USA. 20 | // 21 | // DESCRIPTION: 22 | // PC speaker interface. 23 | // 24 | //----------------------------------------------------------------------------- 25 | 26 | #ifndef PCSOUND_H 27 | #define PCSOUND_H 28 | 29 | typedef void (*pcsound_callback_func)(int *duration, int *frequency); 30 | 31 | // Initialise the PC speaker subsystem. The given function is called 32 | // periodically to request more sound data to play. 33 | 34 | int PCSound_Init(pcsound_callback_func callback_func); 35 | 36 | // Shut down the PC speaker subsystem. 37 | 38 | void PCSound_Shutdown(void); 39 | 40 | // Set the preferred output sample rate when emulating a PC speaker. 41 | // This must be called before PCSound_Init. 42 | 43 | void PCSound_SetSampleRate(int rate); 44 | 45 | #endif /* #ifndef PCSOUND_H */ 46 | 47 | -------------------------------------------------------------------------------- /trunk/pcsound/pcsound_internal.h: -------------------------------------------------------------------------------- 1 | // Emacs style mode select -*- C++ -*- 2 | //----------------------------------------------------------------------------- 3 | // 4 | // Copyright(C) 2007 Simon Howard 5 | // 6 | // This program is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU General Public License 8 | // as published by the Free Software Foundation; either version 2 9 | // of the License, or (at your option) any later version. 10 | // 11 | // This program is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | // 16 | // You should have received a copy of the GNU General Public License 17 | // along with this program; if not, write to the Free Software 18 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 19 | // 02111-1307, USA. 20 | // 21 | // DESCRIPTION: 22 | // PC speaker interface. 23 | // 24 | //----------------------------------------------------------------------------- 25 | 26 | #ifndef PCSOUND_INTERNAL_H 27 | #define PCSOUND_INTERNAL_H 28 | 29 | #include "pcsound.h" 30 | 31 | #define PCSOUND_8253_FREQUENCY 1193280 32 | 33 | typedef struct pcsound_driver_s pcsound_driver_t; 34 | typedef int (*pcsound_init_func)(pcsound_callback_func callback); 35 | typedef void (*pcsound_shutdown_func)(void); 36 | 37 | struct pcsound_driver_s 38 | { 39 | char *name; 40 | pcsound_init_func init_func; 41 | pcsound_shutdown_func shutdown_func; 42 | }; 43 | 44 | extern int pcsound_sample_rate; 45 | 46 | #endif /* #ifndef PCSOUND_INTERNAL_H */ 47 | 48 | -------------------------------------------------------------------------------- /trunk/pkg/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | OSX_FILES= \ 3 | osx/Resources/128x128.png \ 4 | osx/Resources/app.icns \ 5 | osx/Resources/app.png \ 6 | osx/Resources/wadfile.icns \ 7 | osx/Resources/wadfile.png \ 8 | osx/Resources/launcher.nib/designable.nib \ 9 | osx/Resources/launcher.nib/keyedobjects.nib \ 10 | osx/disk/dir.DS_Store \ 11 | osx/disk/background.png \ 12 | osx/GNUmakefile \ 13 | osx/Info.plist.in osx/Info-gnustep.plist.in \ 14 | osx/PkgInfo \ 15 | osx/cp-with-libs \ 16 | osx/dmgfix \ 17 | osx/main.m \ 18 | osx/AppController.m osx/AppController.h \ 19 | osx/Execute.m osx/Execute.h \ 20 | osx/IWADController.m osx/IWADController.h \ 21 | osx/IWADLocation.m osx/IWADLocation.h \ 22 | osx/LauncherManager.m osx/LauncherManager.h 23 | 24 | WINCE_FILES= \ 25 | wince/GNUmakefile \ 26 | wince/wince-cab.cfg \ 27 | wince/wince-cabgen 28 | 29 | WIN32_FILES= \ 30 | win32/GNUmakefile \ 31 | win32/README 32 | 33 | EXTRA_DIST=$(OSX_FILES) $(WINCE_FILES) $(WIN32_FILES) 34 | 35 | -------------------------------------------------------------------------------- /trunk/pkg/config.make: -------------------------------------------------------------------------------- 1 | # Shared file included by the makefiles used to build packages. 2 | # This contains various information needed by the makefiles, 3 | # and is autogenerated by configure to include various 4 | # necessary details. 5 | 6 | # Tools needed: 7 | 8 | CC = gcc 9 | STRIP = strip 10 | 11 | # Package name and version number: 12 | 13 | PROGRAM_PREFIX = ps 14 | PACKAGE = psdoom 15 | PACKAGE_NAME = psdoom 16 | PACKAGE_STRING = psdoom 2012.02.05-1.6.0 17 | PACKAGE_TARNAME = psdoom 18 | PACKAGE_VERSION = 2012.02.05-1.6.0 19 | 20 | # Documentation files to distribute with packages. 21 | 22 | DOC_FILES = README \ 23 | COPYING \ 24 | ChangeLog \ 25 | NEWS \ 26 | NOT-BUGS \ 27 | CMDLINE \ 28 | TODO 29 | 30 | -------------------------------------------------------------------------------- /trunk/pkg/config.make.in: -------------------------------------------------------------------------------- 1 | # Shared file included by the makefiles used to build packages. 2 | # This contains various information needed by the makefiles, 3 | # and is autogenerated by configure to include various 4 | # necessary details. 5 | 6 | # Tools needed: 7 | 8 | CC = @CC@ 9 | STRIP = @STRIP@ 10 | 11 | # Package name and version number: 12 | 13 | PROGRAM_PREFIX = @PROGRAM_PREFIX@ 14 | PACKAGE = @PACKAGE@ 15 | PACKAGE_NAME = @PACKAGE_NAME@ 16 | PACKAGE_STRING = @PACKAGE_STRING@ 17 | PACKAGE_TARNAME = @PACKAGE_TARNAME@ 18 | PACKAGE_VERSION = @PACKAGE_VERSION@ 19 | 20 | # Documentation files to distribute with packages. 21 | 22 | DOC_FILES = README \ 23 | COPYING \ 24 | ChangeLog \ 25 | NEWS \ 26 | NOT-BUGS \ 27 | CMDLINE \ 28 | TODO 29 | 30 | -------------------------------------------------------------------------------- /trunk/pkg/osx/AppController.h: -------------------------------------------------------------------------------- 1 | /* ... */ 2 | //----------------------------------------------------------------------------- 3 | // 4 | // Copyright(C) 2009 Simon Howard 5 | // 6 | // This program is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU General Public License 8 | // as published by the Free Software Foundation; either version 2 9 | // of the License, or (at your option) any later version. 10 | // 11 | // This program is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | // 16 | // You should have received a copy of the GNU General Public License 17 | // along with this program; if not, write to the Free Software 18 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 19 | // 02111-1307, USA. 20 | // 21 | //----------------------------------------------------------------------------- 22 | 23 | #ifndef LAUNCHER_APPCONTROLLER_H 24 | #define LAUNCHER_APPCONTROLLER_H 25 | 26 | #include 27 | 28 | #include "LauncherManager.h" 29 | 30 | @interface AppController : NSObject 31 | { 32 | LauncherManager *launcherManager; 33 | BOOL filesAdded; 34 | } 35 | 36 | + (void)initialize; 37 | 38 | - (id)init; 39 | - (void)dealloc; 40 | 41 | - (void)awakeFromNib; 42 | 43 | - (void)applicationDidFinishLaunching:(NSNotification *)aNotif; 44 | - (BOOL)applicationShouldTerminate:(id)sender; 45 | - (void)applicationWillTerminate:(NSNotification *)aNotif; 46 | - (BOOL)application:(NSApplication *)application openFile:(NSString *)fileName; 47 | 48 | - (void)showPrefPanel:(id)sender; 49 | 50 | @end 51 | 52 | #endif 53 | 54 | -------------------------------------------------------------------------------- /trunk/pkg/osx/Execute.h: -------------------------------------------------------------------------------- 1 | /* ... */ 2 | //----------------------------------------------------------------------------- 3 | // 4 | // Copyright(C) 2009 Simon Howard 5 | // 6 | // This program is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU General Public License 8 | // as published by the Free Software Foundation; either version 2 9 | // of the License, or (at your option) any later version. 10 | // 11 | // This program is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | // 16 | // You should have received a copy of the GNU General Public License 17 | // along with this program; if not, write to the Free Software 18 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 19 | // 02111-1307, USA. 20 | // 21 | //----------------------------------------------------------------------------- 22 | 23 | #ifndef LAUNCHER_EXECUTE_H 24 | #define LAUNCHER_EXECUTE_H 25 | 26 | void SetProgramLocation(const char *path); 27 | void ExecuteProgram(const char *executable, const char *iwad, const char *args); 28 | void OpenTerminalWindow(const char *doomwadpath); 29 | void OpenDocumentation(const char *filename); 30 | 31 | #endif /* #ifndef LAUNCHER_EXECUTE_H */ 32 | 33 | -------------------------------------------------------------------------------- /trunk/pkg/osx/IWADController.h: -------------------------------------------------------------------------------- 1 | /* ... */ 2 | //----------------------------------------------------------------------------- 3 | // 4 | // Copyright(C) 2009 Simon Howard 5 | // 6 | // This program is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU General Public License 8 | // as published by the Free Software Foundation; either version 2 9 | // of the License, or (at your option) any later version. 10 | // 11 | // This program is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | // 16 | // You should have received a copy of the GNU General Public License 17 | // along with this program; if not, write to the Free Software 18 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 19 | // 02111-1307, USA. 20 | // 21 | //----------------------------------------------------------------------------- 22 | 23 | #ifndef LAUNCHER_IWADCONTROLLER_H 24 | #define LAUNCHER_IWADCONTROLLER_H 25 | 26 | #include 27 | #include 28 | 29 | @interface IWADController : NSObject 30 | { 31 | id iwadSelector; 32 | id configWindow; 33 | 34 | id chex; 35 | id doom1; 36 | id doom2; 37 | id plutonia; 38 | id tnt; 39 | } 40 | 41 | - (void) closeConfigWindow: (id)sender; 42 | - (void) openConfigWindow: (id)sender; 43 | - (NSString *) getIWADLocation; 44 | - (void) awakeFromNib; 45 | - (BOOL) setDropdownList; 46 | - (void) setDropdownSelection; 47 | - (void) saveConfig; 48 | - (char *) doomWadPath; 49 | - (void) setEnvironment; 50 | - (BOOL) addIWADPath: (NSString *) path; 51 | 52 | @end 53 | 54 | #endif /* #ifndef LAUNCHER_IWADCONTROLLER_H */ 55 | 56 | -------------------------------------------------------------------------------- /trunk/pkg/osx/IWADLocation.h: -------------------------------------------------------------------------------- 1 | /* ... */ 2 | //----------------------------------------------------------------------------- 3 | // 4 | // Copyright(C) 2009 Simon Howard 5 | // 6 | // This program is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU General Public License 8 | // as published by the Free Software Foundation; either version 2 9 | // of the License, or (at your option) any later version. 10 | // 11 | // This program is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | // 16 | // You should have received a copy of the GNU General Public License 17 | // along with this program; if not, write to the Free Software 18 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 19 | // 02111-1307, USA. 20 | // 21 | //----------------------------------------------------------------------------- 22 | 23 | #ifndef LAUNCHER_IWADLOCATION_H 24 | #define LAUNCHER_IWADLOCATION_H 25 | 26 | #include 27 | 28 | #include "IWADController.h" 29 | 30 | @interface IWADLocation : NSObject 31 | { 32 | IWADController *iwadController; 33 | 34 | id locationConfigBox; 35 | } 36 | 37 | - (void) setButtonClicked: (id)sender; 38 | - (NSString *) getLocation; 39 | - (void) setLocation: (NSString *) value; 40 | 41 | @end 42 | 43 | #endif /* #ifndef LAUNCHER_IWADLOCATION_H */ 44 | 45 | -------------------------------------------------------------------------------- /trunk/pkg/osx/Info-gnustep.plist: -------------------------------------------------------------------------------- 1 | { 2 | ApplicationName = "psdoom"; 3 | ApplicationDescription = "psdoom-ng source port - psDooM with Chocolate Doom"; 4 | ApplicationIcon = app.png; 5 | ApplicationRelease = 2012.02.05-1.6.0; 6 | ApplicationURL = "https://github.com/orsonteodoro/psdoom-ng/"; 7 | Authors = ( 8 | "Orson Teodoro " 9 | ); 10 | Copyright = "Copyright (C) 1993-2012"; 11 | CopyrightDescription = "GNU General Public License, version 2"; 12 | FullVersionID = 2012.02.05-1.6.0; 13 | GSMainMarkupFile = ""; 14 | NSExecutable = "launcher"; 15 | NSIcon = app.png; 16 | NSMainNibFile = launcher.nib; 17 | NSPrincipalClass = NSApplication; 18 | NSRole = Application; 19 | NSTypes = ( 20 | { 21 | NSHumanReadableName = "Doom WAD file"; 22 | NSUnixExtensions = ( wad ); 23 | NSRole = Viewer; 24 | NSMimeTypes = ( 25 | "application/x-doom" 26 | ); 27 | NSIcon = "wadfile.png"; 28 | }, 29 | { 30 | NSHumanReadableName = "Dehacked patch"; 31 | NSUnixExtensions = ( deh ); 32 | NSRole = Viewer; 33 | NSIcon = "wadfile.png"; 34 | } 35 | ); 36 | } 37 | -------------------------------------------------------------------------------- /trunk/pkg/osx/Info-gnustep.plist.in: -------------------------------------------------------------------------------- 1 | { 2 | ApplicationName = "@PACKAGE_NAME@"; 3 | ApplicationDescription = "@PACKAGE_SHORTDESC@"; 4 | ApplicationIcon = app.png; 5 | ApplicationRelease = @PACKAGE_VERSION@; 6 | ApplicationURL = "@PACKAGE_URL@"; 7 | Authors = ( 8 | "@PACKAGE_MAINTAINER@ <@PACKAGE_BUGREPORT@>" 9 | ); 10 | Copyright = "@PACKAGE_COPYRIGHT@"; 11 | CopyrightDescription = "@PACKAGE_LICENSE@"; 12 | FullVersionID = @PACKAGE_VERSION@; 13 | GSMainMarkupFile = ""; 14 | NSExecutable = "launcher"; 15 | NSIcon = app.png; 16 | NSMainNibFile = launcher.nib; 17 | NSPrincipalClass = NSApplication; 18 | NSRole = Application; 19 | NSTypes = ( 20 | { 21 | NSHumanReadableName = "Doom WAD file"; 22 | NSUnixExtensions = ( wad ); 23 | NSRole = Viewer; 24 | NSMimeTypes = ( 25 | "application/x-doom" 26 | ); 27 | NSIcon = "wadfile.png"; 28 | }, 29 | { 30 | NSHumanReadableName = "Dehacked patch"; 31 | NSUnixExtensions = ( deh ); 32 | NSRole = Viewer; 33 | NSIcon = "wadfile.png"; 34 | } 35 | ); 36 | } 37 | -------------------------------------------------------------------------------- /trunk/pkg/osx/LauncherManager.h: -------------------------------------------------------------------------------- 1 | /* ... */ 2 | //----------------------------------------------------------------------------- 3 | // 4 | // Copyright(C) 2009 Simon Howard 5 | // 6 | // This program is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU General Public License 8 | // as published by the Free Software Foundation; either version 2 9 | // of the License, or (at your option) any later version. 10 | // 11 | // This program is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | // 16 | // You should have received a copy of the GNU General Public License 17 | // along with this program; if not, write to the Free Software 18 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 19 | // 02111-1307, USA. 20 | // 21 | //----------------------------------------------------------------------------- 22 | 23 | #ifndef LAUNCHER_LAUNCHERMANAGER_H 24 | #define LAUNCHER_LAUNCHERMANAGER_H 25 | 26 | #include 27 | #include 28 | #include "IWADController.h" 29 | 30 | @interface LauncherManager : NSObject 31 | { 32 | IWADController *iwadController; 33 | 34 | id launcherWindow; 35 | id launchButton; 36 | 37 | id commandLineArguments; 38 | } 39 | 40 | - (void) launch: (id)sender; 41 | - (void) runSetup: (id)sender; 42 | - (void) awakeFromNib; 43 | - (void) clearCommandLine; 44 | - (BOOL) addIWADPath: (NSString *) path; 45 | - (void) addFileToCommandLine: (NSString *) fileName 46 | forArgument: (NSString *) args; 47 | - (void) openTerminal: (id) sender; 48 | 49 | - (void) openREADME: (id) sender; 50 | - (void) openINSTALL: (id) sender; 51 | - (void) openCMDLINE: (id) sender; 52 | - (void) openCOPYING: (id) sender; 53 | - (void) openDocumentation: (id) sender; 54 | 55 | @end 56 | 57 | #endif /* #ifndef LAUNCHER_LAUNCHERMANAGER_H */ 58 | 59 | -------------------------------------------------------------------------------- /trunk/pkg/osx/PkgInfo: -------------------------------------------------------------------------------- 1 | APPL???? 2 | -------------------------------------------------------------------------------- /trunk/pkg/osx/Resources/128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keymon/psdoom-ng/83d02bafe91439117421a0ccc3e238a0b9544e93/trunk/pkg/osx/Resources/128x128.png -------------------------------------------------------------------------------- /trunk/pkg/osx/Resources/app.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keymon/psdoom-ng/83d02bafe91439117421a0ccc3e238a0b9544e93/trunk/pkg/osx/Resources/app.icns -------------------------------------------------------------------------------- /trunk/pkg/osx/Resources/app.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keymon/psdoom-ng/83d02bafe91439117421a0ccc3e238a0b9544e93/trunk/pkg/osx/Resources/app.png -------------------------------------------------------------------------------- /trunk/pkg/osx/Resources/launcher.nib/keyedobjects.nib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keymon/psdoom-ng/83d02bafe91439117421a0ccc3e238a0b9544e93/trunk/pkg/osx/Resources/launcher.nib/keyedobjects.nib -------------------------------------------------------------------------------- /trunk/pkg/osx/Resources/wadfile.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keymon/psdoom-ng/83d02bafe91439117421a0ccc3e238a0b9544e93/trunk/pkg/osx/Resources/wadfile.icns -------------------------------------------------------------------------------- /trunk/pkg/osx/Resources/wadfile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keymon/psdoom-ng/83d02bafe91439117421a0ccc3e238a0b9544e93/trunk/pkg/osx/Resources/wadfile.png -------------------------------------------------------------------------------- /trunk/pkg/osx/disk/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keymon/psdoom-ng/83d02bafe91439117421a0ccc3e238a0b9544e93/trunk/pkg/osx/disk/background.png -------------------------------------------------------------------------------- /trunk/pkg/osx/disk/dir.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keymon/psdoom-ng/83d02bafe91439117421a0ccc3e238a0b9544e93/trunk/pkg/osx/disk/dir.DS_Store -------------------------------------------------------------------------------- /trunk/pkg/osx/main.m: -------------------------------------------------------------------------------- 1 | /* ... */ 2 | //----------------------------------------------------------------------------- 3 | // 4 | // Copyright(C) 2009 Simon Howard 5 | // 6 | // This program is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU General Public License 8 | // as published by the Free Software Foundation; either version 2 9 | // of the License, or (at your option) any later version. 10 | // 11 | // This program is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | // 16 | // You should have received a copy of the GNU General Public License 17 | // along with this program; if not, write to the Free Software 18 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 19 | // 02111-1307, USA. 20 | // 21 | //----------------------------------------------------------------------------- 22 | 23 | #include 24 | #include "Execute.h" 25 | 26 | int main(int argc, const char *argv[]) 27 | { 28 | SetProgramLocation(argv[0]); 29 | 30 | return NSApplicationMain (argc, argv); 31 | } 32 | 33 | -------------------------------------------------------------------------------- /trunk/pkg/win32/GNUmakefile: -------------------------------------------------------------------------------- 1 | 2 | include ../config.make 3 | 4 | TOPLEVEL=../.. 5 | 6 | EXE_FILES=$(TOPLEVEL)/src/$(PROGRAM_PREFIX)doom.exe \ 7 | $(TOPLEVEL)/src/$(PROGRAM_PREFIX)server.exe \ 8 | $(TOPLEVEL)/setup/$(PROGRAM_PREFIX)setup.exe 9 | 10 | DLL_FILES=$(TOPLEVEL)/src/SDL.dll \ 11 | $(TOPLEVEL)/src/SDL_mixer.dll \ 12 | $(TOPLEVEL)/src/SDL_net.dll 13 | 14 | DOC_FILES += README.OPL 15 | 16 | ZIP=$(PACKAGE_TARNAME)-$(PACKAGE_VERSION)-win32.zip 17 | 18 | $(ZIP) : staging 19 | zip -j -r $@ staging/ 20 | 21 | staging: $(EXE_FILES) $(DLL_FILES) $(patsubst %,../../%,$(DOC_FILES)) 22 | rm -rf staging 23 | mkdir staging 24 | cp $(EXE_FILES) $(DLL_FILES) staging/ 25 | $(STRIP) staging/*.exe 26 | for f in $(DOC_FILES); do \ 27 | cp $(TOPLEVEL)/$$f staging/$$f.txt; \ 28 | unix2dos staging/$$f.txt; \ 29 | done 30 | $(TOPLEVEL)/man/simplecpp -D_WIN32 -DPRECOMPILED \ 31 | < $(TOPLEVEL)/man/INSTALL.template \ 32 | > staging/INSTALL.txt 33 | unix2dos staging/INSTALL.txt 34 | 35 | clean: 36 | rm -f $(ZIP) 37 | rm -rf staging 38 | 39 | -------------------------------------------------------------------------------- /trunk/pkg/win32/README: -------------------------------------------------------------------------------- 1 | 2 | Makefile to build Windows packages. Requires zip and unix2dos cygwin 3 | packages to be installed. 4 | 5 | -------------------------------------------------------------------------------- /trunk/pkg/wince/GNUmakefile: -------------------------------------------------------------------------------- 1 | 2 | include ../config.make 3 | 4 | DEPS=$(shell ./wince-cabgen -d $(CONFIG_FILE)) 5 | EXECUTABLES=$(filter %.exe, $(DEPS)) 6 | CONFIG_FILE=wince-cab.cfg 7 | OUTPUT_FILE=$(PACKAGE_TARNAME)-$(PACKAGE_VERSION).cab 8 | 9 | $(OUTPUT_FILE) : $(CONFIG_FILE) $(DEPS) 10 | $(STRIP) $(EXECUTABLES) 11 | ./wince-cabgen $< $@ 12 | 13 | clean: 14 | rm -f $(OUTPUT_FILE) 15 | 16 | -------------------------------------------------------------------------------- /trunk/pkg/wince/wince-cab.cfg: -------------------------------------------------------------------------------- 1 | 2 | app_name = "Chocolate Doom" 3 | provider = "Simon Howard" 4 | arch = "strongarm" 5 | 6 | # Install files: 7 | 8 | d = "$(PROGRAMS_GAMES)/Chocolate Doom/" 9 | s = "$(START_GAMES)/" 10 | 11 | files = { 12 | d+"chocolate-doom.exe": "../../src/chocolate-doom.exe", 13 | d+"chocolate-setup.exe": "../../setup/chocolate-setup.exe", 14 | d+"SDL.dll": "SDL.dll", 15 | d+"SDL_mixer.dll": "SDL_mixer.dll", 16 | d+"libSDL_net-1-2-0.dll": "libSDL_net-1-2-0.dll", 17 | } 18 | 19 | # Start menu links: 20 | 21 | links = { 22 | s+"Chocolate Doom.lnk": d+"chocolate-doom.exe", 23 | s+"Chocolate Doom Setup.lnk": d+"chocolate-setup.exe" 24 | } 25 | 26 | -------------------------------------------------------------------------------- /trunk/psdoom/CREDITS: -------------------------------------------------------------------------------- 1 | This list of credits for psDooM is in no particular order, save for id 2 | Software coming first. I'll try to keep it more or less cronological. 3 | 4 | id Software: http://www.idsoftware.com 5 | 6 | --For writing Doom in the first place. 7 | --For giving eager programmers the GPL'd source. 8 | 9 | Udo Munk: um@compuserve.com 10 | 11 | --For programming XDoom and maintaining it. 12 | 13 | 14 | 15 | --For helping out with XDoom. 16 | 17 | Dennis Chao: dlchao@cs.unm.edu 18 | 19 | --For coming up with the brilliant idea of using Doom for process 20 | management and wading through the XDoom code to implement it. 21 | 22 | Mark H. Hamilton: mark.h.hamilton@gtemail.net 23 | 24 | --For coming up with the psDooM moniker "DooM for Sys A's". 25 | 26 | psDooM is currently maintained by: 27 | David Koppenhofer (djk@users.sourceforge.net) 28 | -------------------------------------------------------------------------------- /trunk/rpm.spec: -------------------------------------------------------------------------------- 1 | 2 | Name: psdoom 3 | Summary: psdoom-ng source port - psDooM with Chocolate Doom 4 | Version: 2012.02.05-1.6.0 5 | Release: 1 6 | Source: http://mesh.dl.sourceforge.net/project/chocolate-doom/psdoom/2012.02.05-1.6.0/psdoom-2012.02.05-1.6.0.tar.gz 7 | URL: https://github.com/orsonteodoro/psdoom-ng/ 8 | Group: Amusements/Games 9 | BuildRoot: /var/tmp/psdoom-buildroot 10 | License: GNU General Public License, version 2 11 | Packager: Orson Teodoro 12 | Prefix: %{_prefix} 13 | Autoreq: 0 14 | Requires: libSDL-1.2.so.0, libSDL_mixer-1.2.so.0, libSDL_net-1.2.so.0 15 | 16 | %description 17 | %(sed -n "/==/ q; p " < README) 18 | 19 | See https://github.com/orsonteodoro/psdoom-ng/ for more information. 20 | 21 | %prep 22 | rm -rf $RPM_BUILD_ROOT 23 | 24 | %setup -q 25 | 26 | %build 27 | ./configure \ 28 | --prefix=/usr \ 29 | --exec-prefix=/usr \ 30 | --bindir=/usr/bin \ 31 | --sbindir=/usr/sbin \ 32 | --sysconfdir=/etc \ 33 | --datadir=/usr/share \ 34 | --includedir=/usr/include \ 35 | --libdir=/usr/lib \ 36 | --libexecdir=/usr/lib \ 37 | --localstatedir=/var/lib \ 38 | --sharedstatedir=/usr/com \ 39 | --mandir=/usr/share/man \ 40 | --infodir=/usr/share/info 41 | make 42 | 43 | %install 44 | %makeinstall 45 | 46 | %clean 47 | rm -rf $RPM_BUILD_ROOT 48 | 49 | %files 50 | %doc %{_mandir}/man5/* 51 | %doc %{_mandir}/man6/* 52 | /usr/share/doc/psdoom/* 53 | /usr/games/* 54 | /usr/share/icons/* 55 | /usr/share/applications/* 56 | 57 | -------------------------------------------------------------------------------- /trunk/rpm.spec.in: -------------------------------------------------------------------------------- 1 | 2 | Name: @PACKAGE@ 3 | Summary: @PACKAGE_SHORTDESC@ 4 | Version: @VERSION@ 5 | Release: 1 6 | Source: http://mesh.dl.sourceforge.net/project/chocolate-doom/@PACKAGE@/@VERSION@/@PACKAGE@-@VERSION@.tar.gz 7 | URL: @PACKAGE_URL@ 8 | Group: Amusements/Games 9 | BuildRoot: /var/tmp/@PACKAGE@-buildroot 10 | License: @PACKAGE_LICENSE@ 11 | Packager: @PACKAGE_MAINTAINER@ <@PACKAGE_BUGREPORT@> 12 | Prefix: %{_prefix} 13 | Autoreq: 0 14 | Requires: libSDL-1.2.so.0, libSDL_mixer-1.2.so.0, libSDL_net-1.2.so.0 15 | 16 | %description 17 | %(sed -n "/==/ q; p " < README) 18 | 19 | See @PACKAGE_URL@ for more information. 20 | 21 | %prep 22 | rm -rf $RPM_BUILD_ROOT 23 | 24 | %setup -q 25 | 26 | %build 27 | ./configure \ 28 | --prefix=/usr \ 29 | --exec-prefix=/usr \ 30 | --bindir=/usr/bin \ 31 | --sbindir=/usr/sbin \ 32 | --sysconfdir=/etc \ 33 | --datadir=/usr/share \ 34 | --includedir=/usr/include \ 35 | --libdir=/usr/lib \ 36 | --libexecdir=/usr/lib \ 37 | --localstatedir=/var/lib \ 38 | --sharedstatedir=/usr/com \ 39 | --mandir=/usr/share/man \ 40 | --infodir=/usr/share/info 41 | make 42 | 43 | %install 44 | %makeinstall 45 | 46 | %clean 47 | rm -rf $RPM_BUILD_ROOT 48 | 49 | %files 50 | %doc %{_mandir}/man5/* 51 | %doc %{_mandir}/man6/* 52 | /usr/share/doc/@PACKAGE@/* 53 | /usr/games/* 54 | /usr/share/icons/* 55 | /usr/share/applications/* 56 | 57 | -------------------------------------------------------------------------------- /trunk/setup/.deps/m_argv.Po: -------------------------------------------------------------------------------- 1 | m_argv.o: m_argv.c /usr/include/string.h /usr/include/features.h \ 2 | /usr/include/sys/cdefs.h /usr/include/bits/wordsize.h \ 3 | /usr/include/gnu/stubs.h /usr/include/gnu/stubs-64.h \ 4 | /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h \ 5 | /usr/include/xlocale.h /usr/include/bits/string.h \ 6 | /usr/include/bits/string2.h /usr/include/endian.h \ 7 | /usr/include/bits/endian.h /usr/include/bits/byteswap.h \ 8 | /usr/include/bits/types.h /usr/include/bits/typesizes.h \ 9 | /usr/include/stdlib.h /usr/include/bits/string3.h /usr/include/strings.h 10 | 11 | /usr/include/string.h: 12 | 13 | /usr/include/features.h: 14 | 15 | /usr/include/sys/cdefs.h: 16 | 17 | /usr/include/bits/wordsize.h: 18 | 19 | /usr/include/gnu/stubs.h: 20 | 21 | /usr/include/gnu/stubs-64.h: 22 | 23 | /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h: 24 | 25 | /usr/include/xlocale.h: 26 | 27 | /usr/include/bits/string.h: 28 | 29 | /usr/include/bits/string2.h: 30 | 31 | /usr/include/endian.h: 32 | 33 | /usr/include/bits/endian.h: 34 | 35 | /usr/include/bits/byteswap.h: 36 | 37 | /usr/include/bits/types.h: 38 | 39 | /usr/include/bits/typesizes.h: 40 | 41 | /usr/include/stdlib.h: 42 | 43 | /usr/include/bits/string3.h: 44 | 45 | /usr/include/strings.h: 46 | -------------------------------------------------------------------------------- /trunk/setup/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | gamesdir = $(prefix)/games 3 | 4 | AM_CFLAGS = -I../textscreen -I../src @SDLMIXER_CFLAGS@ 5 | 6 | games_PROGRAMS = @PROGRAM_PREFIX@setup 7 | 8 | SOURCE_FILES = \ 9 | compatibility.c compatibility.h \ 10 | configfile.c configfile.h \ 11 | display.c display.h \ 12 | joystick.c joystick.h \ 13 | keyboard.c keyboard.h \ 14 | m_argv.c m_argv.h \ 15 | mainmenu.c \ 16 | mouse.c mouse.h \ 17 | multiplayer.c multiplayer.h \ 18 | sound.c sound.h \ 19 | execute.c execute.h \ 20 | txt_joybinput.c txt_joybinput.h \ 21 | txt_keyinput.c txt_keyinput.h \ 22 | txt_mouseinput.c txt_mouseinput.h 23 | 24 | EXTRA_DIST= \ 25 | setup_icon.c 26 | 27 | if HAVE_WINDRES 28 | @PROGRAM_PREFIX@setup_SOURCES=$(SOURCE_FILES) setup-res.rc 29 | else 30 | @PROGRAM_PREFIX@setup_SOURCES=$(SOURCE_FILES) 31 | endif 32 | 33 | @PROGRAM_PREFIX@setup_LDADD = \ 34 | ../wince/libc_wince.a \ 35 | ../textscreen/libtextscreen.a \ 36 | @SDLMIXER_LIBS@ \ 37 | @LDFLAGS@ 38 | 39 | appdir = $(prefix)/share/applications 40 | app_DATA = @PROGRAM_PREFIX@setup.desktop 41 | 42 | @PROGRAM_PREFIX@setup.desktop : setup.desktop 43 | cp $^ $@ 44 | 45 | .rc.o: 46 | $(WINDRES) $^ -o $@ 47 | %.o : %.rc 48 | $(WINDRES) $^ -o $@ 49 | 50 | if HAVE_PYTHON 51 | 52 | setup_icon.c : ../data/setup8.ico 53 | ../data/convert-icon $^ $@ 54 | 55 | endif 56 | 57 | -------------------------------------------------------------------------------- /trunk/setup/chocolate-setup: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keymon/psdoom-ng/83d02bafe91439117421a0ccc3e238a0b9544e93/trunk/setup/chocolate-setup -------------------------------------------------------------------------------- /trunk/setup/chocolate-setup.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Chocolate Doom Setup 3 | Exec=chocolate-setup 4 | Icon=chocolate-setup 5 | Type=Application 6 | Comment=Setup tool for Chocolate Doom 7 | Categories=Settings;ConsoleOnly; 8 | -------------------------------------------------------------------------------- /trunk/setup/compatibility.c: -------------------------------------------------------------------------------- 1 | // Emacs style mode select -*- C++ -*- 2 | //----------------------------------------------------------------------------- 3 | // 4 | // Copyright(C) 2006 Simon Howard 5 | // 6 | // This program is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU General Public License 8 | // as published by the Free Software Foundation; either version 2 9 | // of the License, or (at your option) any later version. 10 | // 11 | // This program is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | // 16 | // You should have received a copy of the GNU General Public License 17 | // along with this program; if not, write to the Free Software 18 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 19 | // 02111-1307, USA. 20 | // 21 | 22 | // Sound control menu 23 | 24 | #include 25 | 26 | #include "textscreen.h" 27 | 28 | #include "compatibility.h" 29 | 30 | int vanilla_savegame_limit = 1; 31 | int vanilla_demo_limit = 1; 32 | 33 | void CompatibilitySettings(void) 34 | { 35 | txt_window_t *window; 36 | 37 | window = TXT_NewWindow("Compatibility"); 38 | 39 | TXT_AddWidgets(window, 40 | TXT_NewCheckBox("Vanilla savegame limit", 41 | &vanilla_savegame_limit), 42 | TXT_NewCheckBox("Vanilla demo limit", 43 | &vanilla_demo_limit), 44 | NULL); 45 | } 46 | 47 | -------------------------------------------------------------------------------- /trunk/setup/compatibility.h: -------------------------------------------------------------------------------- 1 | // Emacs style mode select -*- C++ -*- 2 | //----------------------------------------------------------------------------- 3 | // 4 | // Copyright(C) 2006 Simon Howard 5 | // 6 | // This program is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU General Public License 8 | // as published by the Free Software Foundation; either version 2 9 | // of the License, or (at your option) any later version. 10 | // 11 | // This program is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | // 16 | // You should have received a copy of the GNU General Public License 17 | // along with this program; if not, write to the Free Software 18 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 19 | // 02111-1307, USA. 20 | // 21 | 22 | #ifndef SETUP_COMPATIBILITY_H 23 | #define SETUP_COMPATIBILITY_H 24 | 25 | extern int vanilla_savegame_limit; 26 | extern int vanilla_demo_limit; 27 | 28 | void CompatibilitySettings(void); 29 | 30 | #endif /* #ifndef SETUP_COMPATIBILITY_H */ 31 | 32 | -------------------------------------------------------------------------------- /trunk/setup/configfile.h: -------------------------------------------------------------------------------- 1 | // Emacs style mode select -*- C++ -*- 2 | //----------------------------------------------------------------------------- 3 | // 4 | // Copyright(C) 1993-1996 Id Software, Inc. 5 | // Copyright(C) 2005 Simon Howard 6 | // 7 | // This program is free software; you can redistribute it and/or 8 | // modify it under the terms of the GNU General Public License 9 | // as published by the Free Software Foundation; either version 2 10 | // of the License, or (at your option) any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program; if not, write to the Free Software 19 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 20 | // 02111-1307, USA. 21 | // 22 | // DESCRIPTION: 23 | // 24 | // 25 | //----------------------------------------------------------------------------- 26 | 27 | 28 | #ifndef __SETUP_CONFIG__ 29 | #define __SETUP_CONFIG__ 30 | 31 | extern char *configdir; 32 | 33 | void M_LoadDefaults (void); 34 | void M_SaveDefaults (void); 35 | 36 | void M_SetConfigDir(void); 37 | 38 | void M_SaveMainDefaults(char *filename); 39 | void M_SaveExtraDefaults(char *filename); 40 | 41 | void M_ApplyPlatformDefaults(void); 42 | 43 | #endif 44 | 45 | -------------------------------------------------------------------------------- /trunk/setup/display.h: -------------------------------------------------------------------------------- 1 | // Emacs style mode select -*- C++ -*- 2 | //----------------------------------------------------------------------------- 3 | // 4 | // Copyright(C) 2006 Simon Howard 5 | // 6 | // This program is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU General Public License 8 | // as published by the Free Software Foundation; either version 2 9 | // of the License, or (at your option) any later version. 10 | // 11 | // This program is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | // 16 | // You should have received a copy of the GNU General Public License 17 | // along with this program; if not, write to the Free Software 18 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 19 | // 02111-1307, USA. 20 | // 21 | 22 | #ifndef SETUP_DISPLAY_H 23 | #define SETUP_DISPLAY_H 24 | 25 | extern int autoadjust_video_settings; 26 | extern int aspect_ratio_correct; 27 | extern int fullscreen; 28 | extern int screen_width, screen_height; 29 | extern int screen_bpp; 30 | extern int startup_delay; 31 | extern int show_endoom; 32 | extern char *video_driver; 33 | 34 | void ConfigDisplay(void); 35 | void SetDisplayDriver(void); 36 | 37 | #endif /* #ifndef SETUP_DISPLAY_H */ 38 | 39 | -------------------------------------------------------------------------------- /trunk/setup/execute.h: -------------------------------------------------------------------------------- 1 | // Emacs style mode select -*- C++ -*- 2 | //----------------------------------------------------------------------------- 3 | // 4 | // Copyright(C) 2006 Simon Howard 5 | // 6 | // This program is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU General Public License 8 | // as published by the Free Software Foundation; either version 2 9 | // of the License, or (at your option) any later version. 10 | // 11 | // This program is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | // 16 | // You should have received a copy of the GNU General Public License 17 | // along with this program; if not, write to the Free Software 18 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 19 | // 02111-1307, USA. 20 | // 21 | 22 | #ifndef TESTCONFIG_H 23 | #define TESTCONFIG_H 24 | 25 | #include "textscreen.h" 26 | 27 | typedef struct execute_context_s execute_context_t; 28 | 29 | #define IWAD_DOOM2 (1 << 0) /* doom2.wad */ 30 | #define IWAD_PLUTONIA (1 << 1) /* plutonia.wad */ 31 | #define IWAD_TNT (1 << 2) /* tnt.wad */ 32 | #define IWAD_DOOM (1 << 3) /* doom.wad */ 33 | #define IWAD_DOOM1 (1 << 4) /* doom1.wad */ 34 | #define IWAD_CHEX (1 << 5) /* chex.wad */ 35 | 36 | execute_context_t *NewExecuteContext(void); 37 | void AddCmdLineParameter(execute_context_t *context, char *s, ...); 38 | void PassThroughArguments(execute_context_t *context); 39 | int ExecuteDoom(execute_context_t *context); 40 | int FindInstalledIWADs(void); 41 | 42 | txt_window_action_t *TestConfigAction(void); 43 | 44 | #endif /* #ifndef TESTCONFIG_H */ 45 | 46 | -------------------------------------------------------------------------------- /trunk/setup/joystick.h: -------------------------------------------------------------------------------- 1 | // Emacs style mode select -*- C++ -*- 2 | //----------------------------------------------------------------------------- 3 | // 4 | // Copyright(C) 2006 Simon Howard 5 | // 6 | // This program is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU General Public License 8 | // as published by the Free Software Foundation; either version 2 9 | // of the License, or (at your option) any later version. 10 | // 11 | // This program is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | // 16 | // You should have received a copy of the GNU General Public License 17 | // along with this program; if not, write to the Free Software 18 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 19 | // 02111-1307, USA. 20 | // 21 | 22 | #ifndef SETUP_JOYSTICK_H 23 | #define SETUP_JOYSTICK_H 24 | 25 | extern int usejoystick; 26 | extern int joybfire; 27 | extern int joybstrafe; 28 | extern int joybuse; 29 | extern int joybspeed; 30 | extern int joybstrafeleft; 31 | extern int joybstraferight; 32 | extern int joybprevweapon; 33 | extern int joybnextweapon; 34 | 35 | extern int joystick_index; 36 | extern int joystick_x_axis; 37 | extern int joystick_x_invert; 38 | extern int joystick_y_axis; 39 | extern int joystick_y_invert; 40 | 41 | void ConfigJoystick(void); 42 | 43 | #endif /* #ifndef SETUP_JOYSTICK_H */ 44 | 45 | -------------------------------------------------------------------------------- /trunk/setup/m_argv.c: -------------------------------------------------------------------------------- 1 | // Emacs style mode select -*- C++ -*- 2 | //----------------------------------------------------------------------------- 3 | // 4 | // Copyright(C) 1993-1996 Id Software, Inc. 5 | // Copyright(C) 2005 Simon Howard 6 | // Copyright(C) 2008 "GhostlyDeath" (ghostlydeath@gmail.com) 7 | // 8 | // This program is free software; you can redistribute it and/or 9 | // modify it under the terms of the GNU General Public License 10 | // as published by the Free Software Foundation; either version 2 11 | // of the License, or (at your option) any later version. 12 | // 13 | // This program is distributed in the hope that it will be useful, 14 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | // GNU General Public License for more details. 17 | // 18 | // You should have received a copy of the GNU General Public License 19 | // along with this program; if not, write to the Free Software 20 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 21 | // 02111-1307, USA. 22 | // 23 | // DESCRIPTION: 24 | // 25 | //----------------------------------------------------------------------------- 26 | 27 | 28 | 29 | #include 30 | 31 | int myargc; 32 | char** myargv; 33 | 34 | // From doomdef.h -- no need to include it all! 35 | #ifdef _WIN32 36 | #define snprintf _snprintf 37 | #define vsnprintf _vsnprintf 38 | #define strcasecmp stricmp 39 | #define strncasecmp strnicmp 40 | #else 41 | #include 42 | #endif 43 | 44 | // 45 | // M_CheckParm 46 | // Checks for the given parameter 47 | // in the program's command line arguments. 48 | // Returns the argument number (1 to argc-1) 49 | // or 0 if not present 50 | int M_CheckParm (char *check) 51 | { 52 | int i; 53 | 54 | for (i = 1;i 2 | 3 | 10 | 11 | 12 | 14 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /trunk/setup/setup-manifest.xml.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | 10 | 11 | 12 | 14 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /trunk/setup/setup-res.rc: -------------------------------------------------------------------------------- 1 | 1 ICON "../data/setup.ico" 2 | 3 | 1 24 MOVEABLE PURE "setup-manifest.xml" 4 | 5 | 1 VERSIONINFO 6 | PRODUCTVERSION 2012, 02, 05-1, 6, 0, 0 7 | FILEVERSION 2012, 02, 05-1, 6, 0, 0 8 | FILETYPE 1 9 | { 10 | BLOCK "StringFileInfo" 11 | { 12 | BLOCK "040904E4" 13 | { 14 | VALUE "FileVersion", "2012.02.05-1.6.0" 15 | VALUE "FileDescription", "psdoom 2012.02.05-1.6.0 Setup" 16 | VALUE "InternalName", "psdoom" 17 | VALUE "CompanyName", "orsonteodoro@yahoo.com" 18 | VALUE "LegalCopyright", "GNU General Public License" 19 | VALUE "ProductName", "psdoom Setup" 20 | VALUE "ProductVersion", "2012.02.05-1.6.0" 21 | } 22 | } 23 | } 24 | 25 | -------------------------------------------------------------------------------- /trunk/setup/setup-res.rc.in: -------------------------------------------------------------------------------- 1 | 1 ICON "../data/setup.ico" 2 | 3 | 1 24 MOVEABLE PURE "setup-manifest.xml" 4 | 5 | 1 VERSIONINFO 6 | PRODUCTVERSION @WINDOWS_RC_VERSION@ 7 | FILEVERSION @WINDOWS_RC_VERSION@ 8 | FILETYPE 1 9 | { 10 | BLOCK "StringFileInfo" 11 | { 12 | BLOCK "040904E4" 13 | { 14 | VALUE "FileVersion", "@PACKAGE_VERSION@" 15 | VALUE "FileDescription", "@PACKAGE_STRING@ Setup" 16 | VALUE "InternalName", "@PACKAGE_TARNAME@" 17 | VALUE "CompanyName", "@PACKAGE_BUGREPORT@" 18 | VALUE "LegalCopyright", "GNU General Public License" 19 | VALUE "ProductName", "@PACKAGE_NAME@ Setup" 20 | VALUE "ProductVersion", "@PACKAGE_VERSION@" 21 | } 22 | } 23 | } 24 | 25 | -------------------------------------------------------------------------------- /trunk/setup/setup.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=psdoom Setup 3 | Exec=pssetup 4 | Icon=pssetup 5 | Type=Application 6 | Comment=Setup tool for psdoom 7 | Categories=Settings;ConsoleOnly; 8 | -------------------------------------------------------------------------------- /trunk/setup/setup.desktop.in: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=@PACKAGE_NAME@ Setup 3 | Exec=@PROGRAM_PREFIX@setup 4 | Icon=@PROGRAM_PREFIX@setup 5 | Type=Application 6 | Comment=Setup tool for @PACKAGE_NAME@ 7 | Categories=Settings;ConsoleOnly; 8 | -------------------------------------------------------------------------------- /trunk/setup/sound.h: -------------------------------------------------------------------------------- 1 | // Emacs style mode select -*- C++ -*- 2 | //----------------------------------------------------------------------------- 3 | // 4 | // Copyright(C) 2006 Simon Howard 5 | // 6 | // This program is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU General Public License 8 | // as published by the Free Software Foundation; either version 2 9 | // of the License, or (at your option) any later version. 10 | // 11 | // This program is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | // 16 | // You should have received a copy of the GNU General Public License 17 | // along with this program; if not, write to the Free Software 18 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 19 | // 02111-1307, USA. 20 | // 21 | 22 | #ifndef SETUP_SOUND_H 23 | #define SETUP_SOUND_H 24 | 25 | enum 26 | { 27 | SNDDEVICE_NONE = 0, 28 | SNDDEVICE_PCSPEAKER = 1, 29 | SNDDEVICE_ADLIB = 2, 30 | SNDDEVICE_SB = 3, 31 | SNDDEVICE_PAS = 4, 32 | SNDDEVICE_GUS = 5, 33 | SNDDEVICE_WAVEBLASTER = 6, 34 | SNDDEVICE_SOUNDCANVAS = 7, 35 | SNDDEVICE_GENMIDI = 8, 36 | SNDDEVICE_AWE32 = 9, 37 | }; 38 | 39 | extern int snd_sfxdevice; 40 | extern int numChannels; 41 | extern int sfxVolume; 42 | 43 | extern int snd_musicdevice; 44 | extern int musicVolume; 45 | 46 | extern int snd_samplerate; 47 | extern int opl_io_port; 48 | 49 | extern int use_libsamplerate; 50 | 51 | void ConfigSound(void); 52 | 53 | #endif /* #ifndef SETUP_SOUND_H */ 54 | 55 | -------------------------------------------------------------------------------- /trunk/setup/txt_joybinput.h: -------------------------------------------------------------------------------- 1 | // Emacs style mode select -*- C++ -*- 2 | //----------------------------------------------------------------------------- 3 | // 4 | // Copyright(C) 2007 Simon Howard 5 | // 6 | // This program is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU General Public License 8 | // as published by the Free Software Foundation; either version 2 9 | // of the License, or (at your option) any later version. 10 | // 11 | // This program is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | // 16 | // You should have received a copy of the GNU General Public License 17 | // along with this program; if not, write to the Free Software 18 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 19 | // 02111-1307, USA. 20 | // 21 | 22 | #ifndef TXT_JOYB_INPUT_H 23 | #define TXT_JOYB_INPUT_H 24 | 25 | typedef struct txt_joystick_input_s txt_joystick_input_t; 26 | 27 | #include "txt_widget.h" 28 | #include "txt_window.h" 29 | 30 | // 31 | // A joystick input is like an input box. When selected, a box pops up 32 | // allowing a joystick button to be pressed to select it. 33 | // 34 | 35 | struct txt_joystick_input_s 36 | { 37 | txt_widget_t widget; 38 | int *variable; 39 | txt_window_t *prompt_window; 40 | int check_conflicts; 41 | }; 42 | 43 | txt_joystick_input_t *TXT_NewJoystickInput(int *variable); 44 | 45 | #endif /* #ifndef TXT_JOYB_INPUT_H */ 46 | 47 | 48 | -------------------------------------------------------------------------------- /trunk/setup/txt_keyinput.h: -------------------------------------------------------------------------------- 1 | // Emacs style mode select -*- C++ -*- 2 | //----------------------------------------------------------------------------- 3 | // 4 | // Copyright(C) 2006 Simon Howard 5 | // 6 | // This program is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU General Public License 8 | // as published by the Free Software Foundation; either version 2 9 | // of the License, or (at your option) any later version. 10 | // 11 | // This program is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | // 16 | // You should have received a copy of the GNU General Public License 17 | // along with this program; if not, write to the Free Software 18 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 19 | // 02111-1307, USA. 20 | // 21 | 22 | #ifndef TXT_KEY_INPUT_H 23 | #define TXT_KEY_INPUT_H 24 | 25 | typedef struct txt_key_input_s txt_key_input_t; 26 | 27 | #include "txt_widget.h" 28 | 29 | // 30 | // A key input is like an input box. When selected, a box pops up 31 | // allowing a key to be selected. 32 | // 33 | 34 | struct txt_key_input_s 35 | { 36 | txt_widget_t widget; 37 | int *variable; 38 | int check_conflicts; 39 | }; 40 | 41 | txt_key_input_t *TXT_NewKeyInput(int *variable); 42 | 43 | #endif /* #ifndef TXT_KEY_INPUT_H */ 44 | 45 | 46 | -------------------------------------------------------------------------------- /trunk/setup/txt_mouseinput.h: -------------------------------------------------------------------------------- 1 | // Emacs style mode select -*- C++ -*- 2 | //----------------------------------------------------------------------------- 3 | // 4 | // Copyright(C) 2006 Simon Howard 5 | // 6 | // This program is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU General Public License 8 | // as published by the Free Software Foundation; either version 2 9 | // of the License, or (at your option) any later version. 10 | // 11 | // This program is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | // 16 | // You should have received a copy of the GNU General Public License 17 | // along with this program; if not, write to the Free Software 18 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 19 | // 02111-1307, USA. 20 | // 21 | 22 | #ifndef TXT_MOUSE_INPUT_H 23 | #define TXT_MOUSE_INPUT_H 24 | 25 | typedef struct txt_mouse_input_s txt_mouse_input_t; 26 | 27 | #include "txt_widget.h" 28 | 29 | // 30 | // A mouse input is like an input box. When selected, a box pops up 31 | // allowing a mouse to be selected. 32 | // 33 | 34 | struct txt_mouse_input_s 35 | { 36 | txt_widget_t widget; 37 | int *variable; 38 | int check_conflicts; 39 | }; 40 | 41 | txt_mouse_input_t *TXT_NewMouseInput(int *variable); 42 | 43 | #endif /* #ifndef TXT_MOUSE_INPUT_H */ 44 | 45 | 46 | -------------------------------------------------------------------------------- /trunk/src/.deps/d_items.Po: -------------------------------------------------------------------------------- 1 | d_items.o: d_items.c info.h d_think.h d_items.h doomdef.h \ 2 | /usr/include/stdio.h /usr/include/features.h /usr/include/sys/cdefs.h \ 3 | /usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \ 4 | /usr/include/gnu/stubs-64.h \ 5 | /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h \ 6 | /usr/include/bits/types.h /usr/include/bits/typesizes.h \ 7 | /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \ 8 | /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stdarg.h \ 9 | /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ 10 | /usr/include/bits/stdio.h /usr/include/bits/stdio2.h \ 11 | /usr/include/string.h /usr/include/xlocale.h /usr/include/bits/string.h \ 12 | /usr/include/bits/string2.h /usr/include/endian.h \ 13 | /usr/include/bits/endian.h /usr/include/bits/byteswap.h \ 14 | /usr/include/stdlib.h /usr/include/bits/string3.h /usr/include/strings.h \ 15 | doomkeys.h 16 | 17 | info.h: 18 | 19 | d_think.h: 20 | 21 | d_items.h: 22 | 23 | doomdef.h: 24 | 25 | /usr/include/stdio.h: 26 | 27 | /usr/include/features.h: 28 | 29 | /usr/include/sys/cdefs.h: 30 | 31 | /usr/include/bits/wordsize.h: 32 | 33 | /usr/include/gnu/stubs.h: 34 | 35 | /usr/include/gnu/stubs-64.h: 36 | 37 | /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h: 38 | 39 | /usr/include/bits/types.h: 40 | 41 | /usr/include/bits/typesizes.h: 42 | 43 | /usr/include/libio.h: 44 | 45 | /usr/include/_G_config.h: 46 | 47 | /usr/include/wchar.h: 48 | 49 | /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stdarg.h: 50 | 51 | /usr/include/bits/stdio_lim.h: 52 | 53 | /usr/include/bits/sys_errlist.h: 54 | 55 | /usr/include/bits/stdio.h: 56 | 57 | /usr/include/bits/stdio2.h: 58 | 59 | /usr/include/string.h: 60 | 61 | /usr/include/xlocale.h: 62 | 63 | /usr/include/bits/string.h: 64 | 65 | /usr/include/bits/string2.h: 66 | 67 | /usr/include/endian.h: 68 | 69 | /usr/include/bits/endian.h: 70 | 71 | /usr/include/bits/byteswap.h: 72 | 73 | /usr/include/stdlib.h: 74 | 75 | /usr/include/bits/string3.h: 76 | 77 | /usr/include/strings.h: 78 | 79 | doomkeys.h: 80 | -------------------------------------------------------------------------------- /trunk/src/.deps/doomdef.Po: -------------------------------------------------------------------------------- 1 | doomdef.o: doomdef.c doomdef.h /usr/include/stdio.h \ 2 | /usr/include/features.h /usr/include/sys/cdefs.h \ 3 | /usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \ 4 | /usr/include/gnu/stubs-64.h \ 5 | /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h \ 6 | /usr/include/bits/types.h /usr/include/bits/typesizes.h \ 7 | /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \ 8 | /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stdarg.h \ 9 | /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \ 10 | /usr/include/bits/stdio.h /usr/include/bits/stdio2.h \ 11 | /usr/include/string.h /usr/include/xlocale.h /usr/include/bits/string.h \ 12 | /usr/include/bits/string2.h /usr/include/endian.h \ 13 | /usr/include/bits/endian.h /usr/include/bits/byteswap.h \ 14 | /usr/include/stdlib.h /usr/include/bits/string3.h /usr/include/strings.h \ 15 | doomkeys.h 16 | 17 | doomdef.h: 18 | 19 | /usr/include/stdio.h: 20 | 21 | /usr/include/features.h: 22 | 23 | /usr/include/sys/cdefs.h: 24 | 25 | /usr/include/bits/wordsize.h: 26 | 27 | /usr/include/gnu/stubs.h: 28 | 29 | /usr/include/gnu/stubs-64.h: 30 | 31 | /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h: 32 | 33 | /usr/include/bits/types.h: 34 | 35 | /usr/include/bits/typesizes.h: 36 | 37 | /usr/include/libio.h: 38 | 39 | /usr/include/_G_config.h: 40 | 41 | /usr/include/wchar.h: 42 | 43 | /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stdarg.h: 44 | 45 | /usr/include/bits/stdio_lim.h: 46 | 47 | /usr/include/bits/sys_errlist.h: 48 | 49 | /usr/include/bits/stdio.h: 50 | 51 | /usr/include/bits/stdio2.h: 52 | 53 | /usr/include/string.h: 54 | 55 | /usr/include/xlocale.h: 56 | 57 | /usr/include/bits/string.h: 58 | 59 | /usr/include/bits/string2.h: 60 | 61 | /usr/include/endian.h: 62 | 63 | /usr/include/bits/endian.h: 64 | 65 | /usr/include/bits/byteswap.h: 66 | 67 | /usr/include/stdlib.h: 68 | 69 | /usr/include/bits/string3.h: 70 | 71 | /usr/include/strings.h: 72 | 73 | doomkeys.h: 74 | -------------------------------------------------------------------------------- /trunk/src/.deps/dstrings.Po: -------------------------------------------------------------------------------- 1 | dstrings.o: dstrings.c dstrings.h d_englsh.h 2 | 3 | dstrings.h: 4 | 5 | d_englsh.h: 6 | -------------------------------------------------------------------------------- /trunk/src/.deps/m_bbox.Po: -------------------------------------------------------------------------------- 1 | m_bbox.o: m_bbox.c m_bbox.h \ 2 | /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include-fixed/limits.h \ 3 | /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include-fixed/syslimits.h \ 4 | /usr/include/limits.h /usr/include/features.h /usr/include/sys/cdefs.h \ 5 | /usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \ 6 | /usr/include/gnu/stubs-64.h /usr/include/bits/posix1_lim.h \ 7 | /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ 8 | /usr/include/bits/posix2_lim.h /usr/include/bits/xopen_lim.h \ 9 | /usr/include/bits/stdio_lim.h m_fixed.h 10 | 11 | m_bbox.h: 12 | 13 | /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include-fixed/limits.h: 14 | 15 | /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include-fixed/syslimits.h: 16 | 17 | /usr/include/limits.h: 18 | 19 | /usr/include/features.h: 20 | 21 | /usr/include/sys/cdefs.h: 22 | 23 | /usr/include/bits/wordsize.h: 24 | 25 | /usr/include/gnu/stubs.h: 26 | 27 | /usr/include/gnu/stubs-64.h: 28 | 29 | /usr/include/bits/posix1_lim.h: 30 | 31 | /usr/include/bits/local_lim.h: 32 | 33 | /usr/include/linux/limits.h: 34 | 35 | /usr/include/bits/posix2_lim.h: 36 | 37 | /usr/include/bits/xopen_lim.h: 38 | 39 | /usr/include/bits/stdio_lim.h: 40 | 41 | m_fixed.h: 42 | -------------------------------------------------------------------------------- /trunk/src/.deps/m_random.Po: -------------------------------------------------------------------------------- 1 | m_random.o: m_random.c /usr/include/time.h /usr/include/features.h \ 2 | /usr/include/sys/cdefs.h /usr/include/bits/wordsize.h \ 3 | /usr/include/gnu/stubs.h /usr/include/gnu/stubs-64.h \ 4 | /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h \ 5 | /usr/include/bits/time.h /usr/include/bits/types.h \ 6 | /usr/include/bits/typesizes.h /usr/include/xlocale.h m_random.h \ 7 | doomtype.h /usr/include/inttypes.h \ 8 | /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stdint.h \ 9 | /usr/include/stdint.h /usr/include/bits/wchar.h \ 10 | /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include-fixed/limits.h \ 11 | /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include-fixed/syslimits.h \ 12 | /usr/include/limits.h /usr/include/bits/posix1_lim.h \ 13 | /usr/include/bits/local_lim.h /usr/include/linux/limits.h \ 14 | /usr/include/bits/posix2_lim.h /usr/include/bits/xopen_lim.h \ 15 | /usr/include/bits/stdio_lim.h 16 | 17 | /usr/include/time.h: 18 | 19 | /usr/include/features.h: 20 | 21 | /usr/include/sys/cdefs.h: 22 | 23 | /usr/include/bits/wordsize.h: 24 | 25 | /usr/include/gnu/stubs.h: 26 | 27 | /usr/include/gnu/stubs-64.h: 28 | 29 | /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stddef.h: 30 | 31 | /usr/include/bits/time.h: 32 | 33 | /usr/include/bits/types.h: 34 | 35 | /usr/include/bits/typesizes.h: 36 | 37 | /usr/include/xlocale.h: 38 | 39 | m_random.h: 40 | 41 | doomtype.h: 42 | 43 | /usr/include/inttypes.h: 44 | 45 | /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include/stdint.h: 46 | 47 | /usr/include/stdint.h: 48 | 49 | /usr/include/bits/wchar.h: 50 | 51 | /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include-fixed/limits.h: 52 | 53 | /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include-fixed/syslimits.h: 54 | 55 | /usr/include/limits.h: 56 | 57 | /usr/include/bits/posix1_lim.h: 58 | 59 | /usr/include/bits/local_lim.h: 60 | 61 | /usr/include/linux/limits.h: 62 | 63 | /usr/include/bits/posix2_lim.h: 64 | 65 | /usr/include/bits/xopen_lim.h: 66 | 67 | /usr/include/bits/stdio_lim.h: 68 | -------------------------------------------------------------------------------- /trunk/src/.deps/tables.Po: -------------------------------------------------------------------------------- 1 | tables.o: tables.c tables.h m_fixed.h 2 | 3 | tables.h: 4 | 5 | m_fixed.h: 6 | -------------------------------------------------------------------------------- /trunk/src/.deps/w_file_win32.Po: -------------------------------------------------------------------------------- 1 | w_file_win32.o: w_file_win32.c ../config.h 2 | 3 | ../config.h: 4 | -------------------------------------------------------------------------------- /trunk/src/am_map.h: -------------------------------------------------------------------------------- 1 | // Emacs style mode select -*- C++ -*- 2 | //----------------------------------------------------------------------------- 3 | // 4 | // Copyright(C) 1993-1996 Id Software, Inc. 5 | // Copyright(C) 2005 Simon Howard 6 | // 7 | // This program is free software; you can redistribute it and/or 8 | // modify it under the terms of the GNU General Public License 9 | // as published by the Free Software Foundation; either version 2 10 | // of the License, or (at your option) any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program; if not, write to the Free Software 19 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 20 | // 02111-1307, USA. 21 | // 22 | // DESCRIPTION: 23 | // AutoMap module. 24 | // 25 | //----------------------------------------------------------------------------- 26 | 27 | #ifndef __AMMAP_H__ 28 | #define __AMMAP_H__ 29 | 30 | #include "d_event.h" 31 | #include "m_cheat.h" 32 | 33 | // Used by ST StatusBar stuff. 34 | #define AM_MSGHEADER (('a'<<24)+('m'<<16)) 35 | #define AM_MSGENTERED (AM_MSGHEADER | ('e'<<8)) 36 | #define AM_MSGEXITED (AM_MSGHEADER | ('x'<<8)) 37 | 38 | 39 | // Called by main loop. 40 | boolean AM_Responder (event_t* ev); 41 | 42 | // Called by main loop. 43 | void AM_Ticker (void); 44 | 45 | // Called by main loop, 46 | // called instead of view drawer if automap active. 47 | void AM_Drawer (void); 48 | 49 | // Called to force the automap to quit 50 | // if the level is completed while it is up. 51 | void AM_Stop (void); 52 | 53 | 54 | extern cheatseq_t cheat_amap; 55 | 56 | 57 | #endif 58 | -------------------------------------------------------------------------------- /trunk/src/chocolate-doom-screensaver.desktop: -------------------------------------------------------------------------------- 1 | 2 | [Desktop Entry] 3 | Encoding=UTF-8 4 | Name=psdoom 5 | Comment=psdoom source port - based on Chocolate Doom and psDooM 6 | TryExec=chocolate-doom 7 | Exec=chocolate-doom 8 | StartupNotify=false 9 | Terminal=false 10 | Type=Application 11 | Categories=Screensaver 12 | 13 | -------------------------------------------------------------------------------- /trunk/src/chocolate-doom.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=psdoom 3 | Exec=chocolate-doom 4 | Icon=chocolate-doom 5 | Type=Application 6 | Comment=psdoom source port - based on Chocolate Doom and psDooM 7 | Categories=Game;ActionGame; 8 | -------------------------------------------------------------------------------- /trunk/src/d_items.h: -------------------------------------------------------------------------------- 1 | // Emacs style mode select -*- C++ -*- 2 | //----------------------------------------------------------------------------- 3 | // 4 | // Copyright(C) 1993-1996 Id Software, Inc. 5 | // Copyright(C) 2005 Simon Howard 6 | // 7 | // This program is free software; you can redistribute it and/or 8 | // modify it under the terms of the GNU General Public License 9 | // as published by the Free Software Foundation; either version 2 10 | // of the License, or (at your option) any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program; if not, write to the Free Software 19 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 20 | // 02111-1307, USA. 21 | // 22 | // DESCRIPTION: 23 | // Items: key cards, artifacts, weapon, ammunition. 24 | // 25 | //----------------------------------------------------------------------------- 26 | 27 | 28 | #ifndef __D_ITEMS__ 29 | #define __D_ITEMS__ 30 | 31 | #include "doomdef.h" 32 | 33 | 34 | 35 | // Weapon info: sprite frames, ammunition use. 36 | typedef struct 37 | { 38 | ammotype_t ammo; 39 | int upstate; 40 | int downstate; 41 | int readystate; 42 | int atkstate; 43 | int flashstate; 44 | 45 | } weaponinfo_t; 46 | 47 | extern weaponinfo_t weaponinfo[NUMWEAPONS]; 48 | 49 | #endif 50 | -------------------------------------------------------------------------------- /trunk/src/d_iwad.h: -------------------------------------------------------------------------------- 1 | // Emacs style mode select -*- C++ -*- 2 | //----------------------------------------------------------------------------- 3 | // 4 | // Copyright(C) 2006 Simon Howard 5 | // 6 | // This program is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU General Public License 8 | // as published by the Free Software Foundation; either version 2 9 | // of the License, or (at your option) any later version. 10 | // 11 | // This program is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | // 16 | // You should have received a copy of the GNU General Public License 17 | // along with this program; if not, write to the Free Software 18 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 19 | // 02111-1307, USA. 20 | // 21 | // DESCRIPTION: 22 | // Find IWAD and initialize according to IWAD type. 23 | // 24 | //----------------------------------------------------------------------------- 25 | 26 | 27 | #ifndef __D_IWAD__ 28 | #define __D_IWAD__ 29 | 30 | char *D_FindWADByName(char *filename); 31 | char *D_TryFindWADByName(char *filename); 32 | char *D_FindIWAD(void); 33 | void D_SetSaveGameDir(void); 34 | void D_IdentifyVersion(void); 35 | void D_SetGameDescription(void); 36 | void D_FindInstalledIWADs(void); 37 | 38 | #endif 39 | 40 | -------------------------------------------------------------------------------- /trunk/src/d_main.h: -------------------------------------------------------------------------------- 1 | // Emacs style mode select -*- C++ -*- 2 | //----------------------------------------------------------------------------- 3 | // 4 | // Copyright(C) 1993-1996 Id Software, Inc. 5 | // Copyright(C) 2005 Simon Howard 6 | // 7 | // This program is free software; you can redistribute it and/or 8 | // modify it under the terms of the GNU General Public License 9 | // as published by the Free Software Foundation; either version 2 10 | // of the License, or (at your option) any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program; if not, write to the Free Software 19 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 20 | // 02111-1307, USA. 21 | // 22 | // DESCRIPTION: 23 | // System specific interface stuff. 24 | // 25 | //----------------------------------------------------------------------------- 26 | 27 | 28 | #ifndef __D_MAIN__ 29 | #define __D_MAIN__ 30 | 31 | #include "d_event.h" 32 | 33 | 34 | 35 | 36 | // 37 | // D_DoomMain() 38 | // Not a globally visible function, just included for source reference, 39 | // calls all startup code, parses command line options. 40 | // If not overrided by user input, calls N_AdvanceDemo. 41 | // 42 | void D_DoomMain (void); 43 | 44 | // Called by IO functions when input is detected. 45 | void D_PostEvent (event_t *ev); 46 | 47 | // Read an event from the event queue 48 | 49 | event_t *D_PopEvent(void); 50 | 51 | // Read events from all input devices 52 | 53 | void D_ProcessEvents (void); 54 | 55 | 56 | // 57 | // BASE LEVEL 58 | // 59 | void D_PageTicker (void); 60 | void D_PageDrawer (void); 61 | void D_AdvanceDemo (void); 62 | void D_DoAdvanceDemo (void); 63 | void D_StartTitle (void); 64 | 65 | 66 | #endif 67 | -------------------------------------------------------------------------------- /trunk/src/d_net.h: -------------------------------------------------------------------------------- 1 | // Emacs style mode select -*- C++ -*- 2 | //----------------------------------------------------------------------------- 3 | // 4 | // Copyright(C) 1993-1996 Id Software, Inc. 5 | // Copyright(C) 2005 Simon Howard 6 | // 7 | // This program is free software; you can redistribute it and/or 8 | // modify it under the terms of the GNU General Public License 9 | // as published by the Free Software Foundation; either version 2 10 | // of the License, or (at your option) any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program; if not, write to the Free Software 19 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 20 | // 02111-1307, USA. 21 | // 22 | // DESCRIPTION: 23 | // Networking stuff. 24 | // 25 | //----------------------------------------------------------------------------- 26 | 27 | 28 | #ifndef __D_NET__ 29 | #define __D_NET__ 30 | 31 | #include "d_player.h" 32 | 33 | #define MAXNETNODES 8 34 | 35 | // Networking and tick handling related. 36 | #define BACKUPTICS 128 37 | 38 | extern int extratics; 39 | 40 | // Create any new ticcmds and broadcast to other players. 41 | void NetUpdate (void); 42 | 43 | // Broadcasts special packets to other players 44 | // to notify of game exit 45 | void D_QuitNetGame (void); 46 | 47 | //? how many ticks to run? 48 | void TryRunTics (void); 49 | 50 | // Called at start of game loop to initialize timers 51 | void D_StartGameLoop(void); 52 | 53 | extern boolean drone; 54 | extern boolean net_cl_new_sync; 55 | 56 | #endif 57 | 58 | -------------------------------------------------------------------------------- /trunk/src/d_textur.h: -------------------------------------------------------------------------------- 1 | // Emacs style mode select -*- C++ -*- 2 | //----------------------------------------------------------------------------- 3 | // 4 | // Copyright(C) 1993-1996 Id Software, Inc. 5 | // Copyright(C) 2005 Simon Howard 6 | // 7 | // This program is free software; you can redistribute it and/or 8 | // modify it under the terms of the GNU General Public License 9 | // as published by the Free Software Foundation; either version 2 10 | // of the License, or (at your option) any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program; if not, write to the Free Software 19 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 20 | // 02111-1307, USA. 21 | // 22 | // DESCRIPTION: 23 | // Typedefs related to to textures etc., 24 | // isolated here to make it easier separating modules. 25 | // 26 | //----------------------------------------------------------------------------- 27 | 28 | 29 | #ifndef __D_TEXTUR__ 30 | #define __D_TEXTUR__ 31 | 32 | #include "doomtype.h" 33 | 34 | 35 | 36 | 37 | // 38 | // Flats? 39 | // 40 | // a pic is an unmasked block of pixels 41 | typedef struct 42 | { 43 | byte width; 44 | byte height; 45 | byte data; 46 | } pic_t; 47 | 48 | 49 | 50 | 51 | #endif 52 | -------------------------------------------------------------------------------- /trunk/src/d_ticcmd.h: -------------------------------------------------------------------------------- 1 | // Emacs style mode select -*- C++ -*- 2 | //----------------------------------------------------------------------------- 3 | // 4 | // Copyright(C) 1993-1996 Id Software, Inc. 5 | // Copyright(C) 2005 Simon Howard 6 | // 7 | // This program is free software; you can redistribute it and/or 8 | // modify it under the terms of the GNU General Public License 9 | // as published by the Free Software Foundation; either version 2 10 | // of the License, or (at your option) any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program; if not, write to the Free Software 19 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 20 | // 02111-1307, USA. 21 | // 22 | // DESCRIPTION: 23 | // System specific interface stuff. 24 | // 25 | //----------------------------------------------------------------------------- 26 | 27 | 28 | #ifndef __D_TICCMD__ 29 | #define __D_TICCMD__ 30 | 31 | #include "doomtype.h" 32 | 33 | 34 | // The data sampled per tick (single player) 35 | // and transmitted to other peers (multiplayer). 36 | // Mainly movements/button commands per game tick, 37 | // plus a checksum for internal state consistency. 38 | typedef struct 39 | { 40 | signed char forwardmove; // *2048 for move 41 | signed char sidemove; // *2048 for move 42 | short angleturn; // <<16 for angle delta 43 | byte chatchar; 44 | byte buttons; 45 | byte consistancy; // checks for net game 46 | } ticcmd_t; 47 | 48 | 49 | 50 | #endif 51 | -------------------------------------------------------------------------------- /trunk/src/deh_io.h: -------------------------------------------------------------------------------- 1 | // Emacs style mode select -*- C++ -*- 2 | //----------------------------------------------------------------------------- 3 | // 4 | // Copyright(C) 2005 Simon Howard 5 | // 6 | // This program is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU General Public License 8 | // as published by the Free Software Foundation; either version 2 9 | // of the License, or (at your option) any later version. 10 | // 11 | // This program is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | // 16 | // You should have received a copy of the GNU General Public License 17 | // along with this program; if not, write to the Free Software 18 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 19 | // 02111-1307, USA. 20 | // 21 | //----------------------------------------------------------------------------- 22 | // 23 | // Dehacked I/O code (does all reads from dehacked files) 24 | // 25 | //----------------------------------------------------------------------------- 26 | 27 | #ifndef DEH_IO_H 28 | #define DEH_IO_H 29 | 30 | #include "deh_defs.h" 31 | 32 | deh_context_t *DEH_OpenFile(char *filename); 33 | deh_context_t *DEH_OpenLump(int lumpnum); 34 | void DEH_CloseFile(deh_context_t *context); 35 | int DEH_GetChar(deh_context_t *context); 36 | char *DEH_ReadLine(deh_context_t *context); 37 | void DEH_Error(deh_context_t *context, char *msg, ...); 38 | void DEH_Warning(deh_context_t *context, char *msg, ...); 39 | 40 | #endif /* #ifndef DEH_IO_H */ 41 | 42 | -------------------------------------------------------------------------------- /trunk/src/doom-screensaver.desktop: -------------------------------------------------------------------------------- 1 | 2 | [Desktop Entry] 3 | Encoding=UTF-8 4 | Name=psdoom 5 | Comment=psdoom-ng source port - psDooM with Chocolate Doom 6 | TryExec=psdoom 7 | Exec=psdoom 8 | StartupNotify=false 9 | Terminal=false 10 | Type=Application 11 | Categories=Screensaver 12 | 13 | -------------------------------------------------------------------------------- /trunk/src/doom-screensaver.desktop.in: -------------------------------------------------------------------------------- 1 | 2 | [Desktop Entry] 3 | Encoding=UTF-8 4 | Name=@PACKAGE_NAME@ 5 | Comment=@PACKAGE_SHORTDESC@ 6 | TryExec=@PROGRAM_PREFIX@doom 7 | Exec=@PROGRAM_PREFIX@doom 8 | StartupNotify=false 9 | Terminal=false 10 | Type=Application 11 | Categories=Screensaver 12 | 13 | -------------------------------------------------------------------------------- /trunk/src/doom.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=psdoom 3 | Exec=psdoom 4 | Icon=psdoom 5 | Type=Application 6 | Comment=psdoom-ng source port - psDooM with Chocolate Doom 7 | Categories=Game;ActionGame; 8 | -------------------------------------------------------------------------------- /trunk/src/doom.desktop.in: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=@PACKAGE_NAME@ 3 | Exec=@PROGRAM_PREFIX@doom 4 | Icon=@PROGRAM_PREFIX@doom 5 | Type=Application 6 | Comment=@PACKAGE_SHORTDESC@ 7 | Categories=Game;ActionGame; 8 | -------------------------------------------------------------------------------- /trunk/src/doomdef.c: -------------------------------------------------------------------------------- 1 | // Emacs style mode select -*- C++ -*- 2 | //----------------------------------------------------------------------------- 3 | // 4 | // Copyright(C) 1993-1996 Id Software, Inc. 5 | // Copyright(C) 2005 Simon Howard 6 | // 7 | // This program is free software; you can redistribute it and/or 8 | // modify it under the terms of the GNU General Public License 9 | // as published by the Free Software Foundation; either version 2 10 | // of the License, or (at your option) any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program; if not, write to the Free Software 19 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 20 | // 02111-1307, USA. 21 | // 22 | // DESCRIPTION: 23 | // DoomDef - basic defines for DOOM, e.g. Version, game mode 24 | // and skill level, and display parameters. 25 | // 26 | //----------------------------------------------------------------------------- 27 | 28 | 29 | 30 | #include "doomdef.h" 31 | 32 | // Location for any defines turned variables. 33 | 34 | // None. 35 | 36 | 37 | -------------------------------------------------------------------------------- /trunk/src/doomfeatures.h: -------------------------------------------------------------------------------- 1 | // Emacs style mode select -*- C++ -*- 2 | //----------------------------------------------------------------------------- 3 | // 4 | // Copyright(C) 2005 Simon Howard 5 | // 6 | // This program is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU General Public License 8 | // as published by the Free Software Foundation; either version 2 9 | // of the License, or (at your option) any later version. 10 | // 11 | // This program is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | // 16 | // You should have received a copy of the GNU General Public License 17 | // along with this program; if not, write to the Free Software 18 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 19 | // 02111-1307, USA. 20 | // 21 | // DESCRIPTION: 22 | // List of features which can be enabled/disabled to slim down the 23 | // program. 24 | // 25 | //----------------------------------------------------------------------------- 26 | 27 | #ifndef DOOM_FEATURES_H 28 | #define DOOM_FEATURES_H 29 | 30 | // Enables wad merging (the '-merge' command line parameter) 31 | 32 | #define FEATURE_WAD_MERGE 1 33 | 34 | // Enables dehacked support ('-deh') 35 | 36 | #define FEATURE_DEHACKED 1 37 | 38 | // Enables multiplayer support (network games) 39 | 40 | #define FEATURE_MULTIPLAYER 1 41 | 42 | // Enables sound output 43 | 44 | #define FEATURE_SOUND 1 45 | 46 | #endif /* #ifndef DOOM_FEATURES_H */ 47 | 48 | 49 | -------------------------------------------------------------------------------- /trunk/src/doomstat.c: -------------------------------------------------------------------------------- 1 | // Emacs style mode select -*- C++ -*- 2 | //----------------------------------------------------------------------------- 3 | // 4 | // Copyright(C) 1993-1996 Id Software, Inc. 5 | // Copyright(C) 2005 Simon Howard 6 | // 7 | // This program is free software; you can redistribute it and/or 8 | // modify it under the terms of the GNU General Public License 9 | // as published by the Free Software Foundation; either version 2 10 | // of the License, or (at your option) any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program; if not, write to the Free Software 19 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 20 | // 02111-1307, USA. 21 | // 22 | // DESCRIPTION: 23 | // Put all global tate variables here. 24 | // 25 | //----------------------------------------------------------------------------- 26 | 27 | 28 | 29 | #include "doomstat.h" 30 | 31 | 32 | // Game Mode - identify IWAD as shareware, retail etc. 33 | GameMode_t gamemode = indetermined; 34 | GameMission_t gamemission = doom; 35 | GameVersion_t gameversion = exe_final2; 36 | char *gamedescription; 37 | 38 | // Set if homebrew PWAD stuff has been added. 39 | boolean modifiedgame; 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /trunk/src/dstrings.h: -------------------------------------------------------------------------------- 1 | // Emacs style mode select -*- C++ -*- 2 | //----------------------------------------------------------------------------- 3 | // 4 | // Copyright(C) 1993-1996 Id Software, Inc. 5 | // Copyright(C) 2005 Simon Howard 6 | // 7 | // This program is free software; you can redistribute it and/or 8 | // modify it under the terms of the GNU General Public License 9 | // as published by the Free Software Foundation; either version 2 10 | // of the License, or (at your option) any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program; if not, write to the Free Software 19 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 20 | // 02111-1307, USA. 21 | // 22 | // 23 | // DESCRIPTION: 24 | // DOOM strings, by language. 25 | // 26 | //----------------------------------------------------------------------------- 27 | 28 | 29 | #ifndef __DSTRINGS__ 30 | #define __DSTRINGS__ 31 | 32 | 33 | // All important printed strings. 34 | 35 | #include "d_englsh.h" 36 | 37 | // Misc. other strings. 38 | #define SAVEGAMENAME "doomsav" 39 | 40 | 41 | // QuitDOOM messages 42 | // 8 per each game type 43 | #define NUM_QUITMESSAGES 8 44 | 45 | extern char *doom1_endmsg[]; 46 | extern char *doom2_endmsg[]; 47 | 48 | 49 | #endif 50 | -------------------------------------------------------------------------------- /trunk/src/f_finale.h: -------------------------------------------------------------------------------- 1 | // Emacs style mode select -*- C++ -*- 2 | //----------------------------------------------------------------------------- 3 | // 4 | // Copyright(C) 1993-1996 Id Software, Inc. 5 | // Copyright(C) 2005 Simon Howard 6 | // 7 | // This program is free software; you can redistribute it and/or 8 | // modify it under the terms of the GNU General Public License 9 | // as published by the Free Software Foundation; either version 2 10 | // of the License, or (at your option) any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program; if not, write to the Free Software 19 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 20 | // 02111-1307, USA. 21 | // 22 | // DESCRIPTION: 23 | // 24 | // 25 | //----------------------------------------------------------------------------- 26 | 27 | 28 | #ifndef __F_FINALE__ 29 | #define __F_FINALE__ 30 | 31 | 32 | #include "doomtype.h" 33 | #include "d_event.h" 34 | // 35 | // FINALE 36 | // 37 | 38 | // Called by main loop. 39 | boolean F_Responder (event_t* ev); 40 | 41 | // Called by main loop. 42 | void F_Ticker (void); 43 | 44 | // Called by main loop. 45 | void F_Drawer (void); 46 | 47 | 48 | void F_StartFinale (void); 49 | 50 | 51 | 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /trunk/src/f_wipe.h: -------------------------------------------------------------------------------- 1 | // Emacs style mode select -*- C++ -*- 2 | //----------------------------------------------------------------------------- 3 | // 4 | // Copyright(C) 1993-1996 Id Software, Inc. 5 | // Copyright(C) 2005 Simon Howard 6 | // 7 | // This program is free software; you can redistribute it and/or 8 | // modify it under the terms of the GNU General Public License 9 | // as published by the Free Software Foundation; either version 2 10 | // of the License, or (at your option) any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program; if not, write to the Free Software 19 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 20 | // 02111-1307, USA. 21 | // 22 | // DESCRIPTION: 23 | // Mission start screen wipe/melt, special effects. 24 | // 25 | //----------------------------------------------------------------------------- 26 | 27 | 28 | #ifndef __F_WIPE_H__ 29 | #define __F_WIPE_H__ 30 | 31 | // 32 | // SCREEN WIPE PACKAGE 33 | // 34 | 35 | enum 36 | { 37 | // simple gradual pixel change for 8-bit only 38 | wipe_ColorXForm, 39 | 40 | // weird screen melt 41 | wipe_Melt, 42 | 43 | wipe_NUMWIPES 44 | }; 45 | 46 | int 47 | wipe_StartScreen 48 | ( int x, 49 | int y, 50 | int width, 51 | int height ); 52 | 53 | 54 | int 55 | wipe_EndScreen 56 | ( int x, 57 | int y, 58 | int width, 59 | int height ); 60 | 61 | 62 | int 63 | wipe_ScreenWipe 64 | ( int wipeno, 65 | int x, 66 | int y, 67 | int width, 68 | int height, 69 | int ticks ); 70 | 71 | #endif 72 | -------------------------------------------------------------------------------- /trunk/src/hu_stuff.h: -------------------------------------------------------------------------------- 1 | // Emacs style mode select -*- C++ -*- 2 | //----------------------------------------------------------------------------- 3 | // 4 | // Copyright(C) 1993-1996 Id Software, Inc. 5 | // Copyright(C) 2005 Simon Howard 6 | // 7 | // This program is free software; you can redistribute it and/or 8 | // modify it under the terms of the GNU General Public License 9 | // as published by the Free Software Foundation; either version 2 10 | // of the License, or (at your option) any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program; if not, write to the Free Software 19 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 20 | // 02111-1307, USA. 21 | // 22 | // DESCRIPTION: Head up display 23 | // 24 | //----------------------------------------------------------------------------- 25 | 26 | #ifndef __HU_STUFF_H__ 27 | #define __HU_STUFF_H__ 28 | 29 | #include "d_event.h" 30 | 31 | 32 | // 33 | // Globally visible constants. 34 | // 35 | #define HU_FONTSTART '!' // the first font characters 36 | #define HU_FONTEND '_' // the last font characters 37 | 38 | // Calculate # of glyphs in font. 39 | #define HU_FONTSIZE (HU_FONTEND - HU_FONTSTART + 1) 40 | 41 | #define HU_BROADCAST 5 42 | 43 | #define HU_MSGX 0 44 | #define HU_MSGY 0 45 | #define HU_MSGWIDTH 64 // in characters 46 | #define HU_MSGHEIGHT 1 // in lines 47 | 48 | #define HU_MSGTIMEOUT (4*TICRATE) 49 | 50 | // 51 | // HEADS UP TEXT 52 | // 53 | 54 | void HU_Init(void); 55 | void HU_Start(void); 56 | 57 | boolean HU_Responder(event_t* ev); 58 | 59 | void HU_Ticker(void); 60 | void HU_Drawer(void); 61 | char HU_dequeueChatChar(void); 62 | void HU_Erase(void); 63 | 64 | 65 | #endif 66 | -------------------------------------------------------------------------------- /trunk/src/i_joystick.h: -------------------------------------------------------------------------------- 1 | // Emacs style mode select -*- C++ -*- 2 | //----------------------------------------------------------------------------- 3 | // 4 | // Copyright(C) 2007 Simon Howard 5 | // 6 | // This program is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU General Public License 8 | // as published by the Free Software Foundation; either version 2 9 | // of the License, or (at your option) any later version. 10 | // 11 | // This program is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | // 16 | // You should have received a copy of the GNU General Public License 17 | // along with this program; if not, write to the Free Software 18 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 19 | // 02111-1307, USA. 20 | // 21 | // DESCRIPTION: 22 | // System-specific joystick interface. 23 | // 24 | //----------------------------------------------------------------------------- 25 | 26 | 27 | #ifndef __I_JOYSTICK__ 28 | #define __I_JOYSTICK__ 29 | 30 | extern int joystick_index; 31 | extern int joystick_x_axis; 32 | extern int joystick_x_invert; 33 | extern int joystick_y_axis; 34 | extern int joystick_y_invert; 35 | 36 | void I_InitJoystick(void); 37 | void I_ShutdownJoystick(void); 38 | void I_UpdateJoystick(void); 39 | 40 | #endif /* #ifndef __I_JOYSTICK__ */ 41 | 42 | -------------------------------------------------------------------------------- /trunk/src/i_swap.h: -------------------------------------------------------------------------------- 1 | // Emacs style mode select -*- C++ -*- 2 | //----------------------------------------------------------------------------- 3 | // 4 | // Copyright(C) 1993-1996 Id Software, Inc. 5 | // Copyright(C) 2005,2006,2007 Simon Howard 6 | // 7 | // This program is free software; you can redistribute it and/or 8 | // modify it under the terms of the GNU General Public License 9 | // as published by the Free Software Foundation; either version 2 10 | // of the License, or (at your option) any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program; if not, write to the Free Software 19 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 20 | // 02111-1307, USA. 21 | // 22 | // DESCRIPTION: 23 | // Endianess handling, swapping 16bit and 32bit. 24 | // 25 | //----------------------------------------------------------------------------- 26 | 27 | 28 | #ifndef __I_SWAP__ 29 | #define __I_SWAP__ 30 | 31 | #include "SDL_endian.h" 32 | 33 | // Endianess handling. 34 | // WAD files are stored little endian. 35 | 36 | // Just use SDL's endianness swapping functions. 37 | 38 | // These are deliberately cast to signed values; this is the behaviour 39 | // of the macros in the original source and some code relies on it. 40 | 41 | #define SHORT(x) ((signed short) SDL_SwapLE16(x)) 42 | #define LONG(x) ((signed long) SDL_SwapLE32(x)) 43 | 44 | // Defines for checking the endianness of the system. 45 | 46 | #if SDL_BYTEORDER == SYS_LIL_ENDIAN 47 | #define SYS_LITTLE_ENDIAN 48 | #elif SDL_BYTEORDER == SYS_BIG_ENDIAN 49 | #define SYS_BIG_ENDIAN 50 | #endif 51 | 52 | #endif 53 | 54 | -------------------------------------------------------------------------------- /trunk/src/i_timer.c: -------------------------------------------------------------------------------- 1 | // Emacs style mode select -*- C++ -*- 2 | //----------------------------------------------------------------------------- 3 | // 4 | // Copyright(C) 1993-1996 Id Software, Inc. 5 | // Copyright(C) 2005 Simon Howard 6 | // 7 | // This program is free software; you can redistribute it and/or 8 | // modify it under the terms of the GNU General Public License 9 | // as published by the Free Software Foundation; either version 2 10 | // of the License, or (at your option) any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program; if not, write to the Free Software 19 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 20 | // 02111-1307, USA. 21 | // 22 | // DESCRIPTION: 23 | // Timer functions. 24 | // 25 | //----------------------------------------------------------------------------- 26 | 27 | #include "SDL.h" 28 | 29 | #include "i_timer.h" 30 | #include "doomdef.h" 31 | 32 | // 33 | // I_GetTime 34 | // returns time in 1/35th second tics 35 | // 36 | 37 | static Uint32 basetime = 0; 38 | 39 | int I_GetTime (void) 40 | { 41 | Uint32 ticks; 42 | 43 | ticks = SDL_GetTicks(); 44 | 45 | if (basetime == 0) 46 | basetime = ticks; 47 | 48 | ticks -= basetime; 49 | 50 | return (ticks * TICRATE) / 1000; 51 | } 52 | 53 | // 54 | // Same as I_GetTime, but returns time in milliseconds 55 | // 56 | 57 | int I_GetTimeMS(void) 58 | { 59 | Uint32 ticks; 60 | 61 | ticks = SDL_GetTicks(); 62 | 63 | if (basetime == 0) 64 | basetime = ticks; 65 | 66 | return ticks - basetime; 67 | } 68 | 69 | // Sleep for a specified number of ms 70 | 71 | void I_Sleep(int ms) 72 | { 73 | SDL_Delay(ms); 74 | } 75 | 76 | 77 | void I_InitTimer(void) 78 | { 79 | // initialize timer 80 | 81 | SDL_Init(SDL_INIT_TIMER); 82 | } 83 | 84 | -------------------------------------------------------------------------------- /trunk/src/i_timer.h: -------------------------------------------------------------------------------- 1 | // Emacs style mode select -*- C++ -*- 2 | //----------------------------------------------------------------------------- 3 | // 4 | // Copyright(C) 1993-1996 Id Software, Inc. 5 | // Copyright(C) 2005 Simon Howard 6 | // 7 | // This program is free software; you can redistribute it and/or 8 | // modify it under the terms of the GNU General Public License 9 | // as published by the Free Software Foundation; either version 2 10 | // of the License, or (at your option) any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program; if not, write to the Free Software 19 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 20 | // 02111-1307, USA. 21 | // 22 | // DESCRIPTION: 23 | // System-specific timer interface 24 | // 25 | //----------------------------------------------------------------------------- 26 | 27 | 28 | #ifndef __I_TIMER__ 29 | #define __I_TIMER__ 30 | 31 | // Called by D_DoomLoop, 32 | // returns current time in tics. 33 | int I_GetTime (void); 34 | 35 | // returns current time in ms 36 | int I_GetTimeMS (void); 37 | 38 | // Pause for a specified number of ms 39 | void I_Sleep(int ms); 40 | 41 | // Initialize timer 42 | void I_InitTimer(void); 43 | 44 | #endif 45 | 46 | -------------------------------------------------------------------------------- /trunk/src/m_argv.h: -------------------------------------------------------------------------------- 1 | // Emacs style mode select -*- C++ -*- 2 | //----------------------------------------------------------------------------- 3 | // 4 | // Copyright(C) 1993-1996 Id Software, Inc. 5 | // Copyright(C) 2005 Simon Howard 6 | // 7 | // This program is free software; you can redistribute it and/or 8 | // modify it under the terms of the GNU General Public License 9 | // as published by the Free Software Foundation; either version 2 10 | // of the License, or (at your option) any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program; if not, write to the Free Software 19 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 20 | // 02111-1307, USA. 21 | // 22 | // DESCRIPTION: 23 | // Nil. 24 | // 25 | //----------------------------------------------------------------------------- 26 | 27 | 28 | #ifndef __M_ARGV__ 29 | #define __M_ARGV__ 30 | 31 | // 32 | // MISC 33 | // 34 | extern int myargc; 35 | extern char** myargv; 36 | 37 | // Returns the position of the given parameter 38 | // in the arg list (0 if not found). 39 | int M_CheckParm (char* check); 40 | 41 | // Same as M_CheckParm, but checks that num_args arguments are available 42 | // following the specified argument. 43 | int M_CheckParmWithArgs(char *check, int num_args); 44 | 45 | void M_FindResponseFile(void); 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /trunk/src/m_bbox.c: -------------------------------------------------------------------------------- 1 | // Emacs style mode select -*- C++ -*- 2 | //----------------------------------------------------------------------------- 3 | // 4 | // Copyright(C) 1993-1996 Id Software, Inc. 5 | // Copyright(C) 2005 Simon Howard 6 | // 7 | // This program is free software; you can redistribute it and/or 8 | // modify it under the terms of the GNU General Public License 9 | // as published by the Free Software Foundation; either version 2 10 | // of the License, or (at your option) any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program; if not, write to the Free Software 19 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 20 | // 02111-1307, USA. 21 | // 22 | // DESCRIPTION: 23 | // Main loop menu stuff. 24 | // Random number LUT. 25 | // Default Config File. 26 | // PCX Screenshots. 27 | // 28 | //----------------------------------------------------------------------------- 29 | 30 | 31 | 32 | #include "m_bbox.h" 33 | 34 | 35 | 36 | 37 | void M_ClearBox (fixed_t *box) 38 | { 39 | box[BOXTOP] = box[BOXRIGHT] = INT_MIN; 40 | box[BOXBOTTOM] = box[BOXLEFT] = INT_MAX; 41 | } 42 | 43 | void 44 | M_AddToBox 45 | ( fixed_t* box, 46 | fixed_t x, 47 | fixed_t y ) 48 | { 49 | if (xbox[BOXRIGHT]) 52 | box[BOXRIGHT] = x; 53 | if (ybox[BOXTOP]) 56 | box[BOXTOP] = y; 57 | } 58 | 59 | 60 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /trunk/src/m_bbox.h: -------------------------------------------------------------------------------- 1 | // Emacs style mode select -*- C++ -*- 2 | //----------------------------------------------------------------------------- 3 | // 4 | // Copyright(C) 1993-1996 Id Software, Inc. 5 | // Copyright(C) 2005 Simon Howard 6 | // 7 | // This program is free software; you can redistribute it and/or 8 | // modify it under the terms of the GNU General Public License 9 | // as published by the Free Software Foundation; either version 2 10 | // of the License, or (at your option) any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program; if not, write to the Free Software 19 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 20 | // 02111-1307, USA. 21 | // 22 | // DESCRIPTION: 23 | // Nil. 24 | // 25 | //----------------------------------------------------------------------------- 26 | 27 | 28 | #ifndef __M_BBOX__ 29 | #define __M_BBOX__ 30 | 31 | #include 32 | 33 | #include "m_fixed.h" 34 | 35 | 36 | // Bounding box coordinate storage. 37 | enum 38 | { 39 | BOXTOP, 40 | BOXBOTTOM, 41 | BOXLEFT, 42 | BOXRIGHT 43 | }; // bbox coordinates 44 | 45 | // Bounding box functions. 46 | void M_ClearBox (fixed_t* box); 47 | 48 | void 49 | M_AddToBox 50 | ( fixed_t* box, 51 | fixed_t x, 52 | fixed_t y ); 53 | 54 | 55 | #endif 56 | -------------------------------------------------------------------------------- /trunk/src/m_cheat.h: -------------------------------------------------------------------------------- 1 | // Emacs style mode select -*- C++ -*- 2 | //----------------------------------------------------------------------------- 3 | // 4 | // Copyright(C) 1993-1996 Id Software, Inc. 5 | // Copyright(C) 2005 Simon Howard 6 | // 7 | // This program is free software; you can redistribute it and/or 8 | // modify it under the terms of the GNU General Public License 9 | // as published by the Free Software Foundation; either version 2 10 | // of the License, or (at your option) any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program; if not, write to the Free Software 19 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 20 | // 02111-1307, USA. 21 | // 22 | // DESCRIPTION: 23 | // Cheat code checking. 24 | // 25 | //----------------------------------------------------------------------------- 26 | 27 | 28 | #ifndef __M_CHEAT__ 29 | #define __M_CHEAT__ 30 | 31 | // 32 | // CHEAT SEQUENCE PACKAGE 33 | // 34 | 35 | // declaring a cheat 36 | 37 | #define CHEAT(value, parameters) \ 38 | { value, sizeof(value) - 1, parameters, 0, 0, "" } 39 | 40 | #define MAX_CHEAT_LEN 25 41 | #define MAX_CHEAT_PARAMS 5 42 | 43 | typedef struct 44 | { 45 | // settings for this cheat 46 | 47 | char sequence[MAX_CHEAT_LEN]; 48 | size_t sequence_len; 49 | int parameter_chars; 50 | 51 | // state used during the game 52 | 53 | size_t chars_read; 54 | int param_chars_read; 55 | char parameter_buf[MAX_CHEAT_PARAMS]; 56 | } cheatseq_t; 57 | 58 | int 59 | cht_CheckCheat 60 | ( cheatseq_t* cht, 61 | char key ); 62 | 63 | 64 | void 65 | cht_GetParam 66 | ( cheatseq_t* cht, 67 | char* buffer ); 68 | 69 | 70 | #endif 71 | -------------------------------------------------------------------------------- /trunk/src/m_config.h: -------------------------------------------------------------------------------- 1 | // Emacs style mode select -*- C++ -*- 2 | //----------------------------------------------------------------------------- 3 | // 4 | // Copyright(C) 1993-1996 Id Software, Inc. 5 | // Copyright(C) 2005 Simon Howard 6 | // 7 | // This program is free software; you can redistribute it and/or 8 | // modify it under the terms of the GNU General Public License 9 | // as published by the Free Software Foundation; either version 2 10 | // of the License, or (at your option) any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program; if not, write to the Free Software 19 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 20 | // 02111-1307, USA. 21 | // 22 | // DESCRIPTION: 23 | // Configuration file interface. 24 | // 25 | //----------------------------------------------------------------------------- 26 | 27 | 28 | #ifndef __M_CONFIG__ 29 | #define __M_CONFIG__ 30 | 31 | void M_LoadDefaults(void); 32 | void M_SaveDefaults(void); 33 | void M_SetConfigDir(void); 34 | void M_ApplyPlatformDefaults(void); 35 | 36 | extern char *configdir; 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /trunk/src/m_fixed.c: -------------------------------------------------------------------------------- 1 | // Emacs style mode select -*- C++ -*- 2 | //----------------------------------------------------------------------------- 3 | // 4 | // Copyright(C) 1993-1996 Id Software, Inc. 5 | // Copyright(C) 2005 Simon Howard 6 | // 7 | // This program is free software; you can redistribute it and/or 8 | // modify it under the terms of the GNU General Public License 9 | // as published by the Free Software Foundation; either version 2 10 | // of the License, or (at your option) any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program; if not, write to the Free Software 19 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 20 | // 02111-1307, USA. 21 | // 22 | // DESCRIPTION: 23 | // Fixed point implementation. 24 | // 25 | //----------------------------------------------------------------------------- 26 | 27 | 28 | 29 | #include "stdlib.h" 30 | 31 | #include "doomtype.h" 32 | #include "i_system.h" 33 | 34 | #include "m_fixed.h" 35 | 36 | 37 | 38 | 39 | // Fixme. __USE_C_FIXED__ or something. 40 | 41 | fixed_t 42 | FixedMul 43 | ( fixed_t a, 44 | fixed_t b ) 45 | { 46 | return ((int64_t) a * (int64_t) b) >> FRACBITS; 47 | } 48 | 49 | 50 | 51 | // 52 | // FixedDiv, C version. 53 | // 54 | 55 | fixed_t FixedDiv(fixed_t a, fixed_t b) 56 | { 57 | if ((abs(a) >> 14) >= abs(b)) 58 | { 59 | return (a^b) < 0 ? INT_MIN : INT_MAX; 60 | } 61 | else 62 | { 63 | int64_t result; 64 | 65 | result = ((int64_t) a << 16) / b; 66 | 67 | return (fixed_t) result; 68 | } 69 | } 70 | 71 | -------------------------------------------------------------------------------- /trunk/src/m_fixed.h: -------------------------------------------------------------------------------- 1 | // Emacs style mode select -*- C++ -*- 2 | //----------------------------------------------------------------------------- 3 | // 4 | // Copyright(C) 1993-1996 Id Software, Inc. 5 | // Copyright(C) 2005 Simon Howard 6 | // 7 | // This program is free software; you can redistribute it and/or 8 | // modify it under the terms of the GNU General Public License 9 | // as published by the Free Software Foundation; either version 2 10 | // of the License, or (at your option) any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program; if not, write to the Free Software 19 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 20 | // 02111-1307, USA. 21 | // 22 | // DESCRIPTION: 23 | // Fixed point arithemtics, implementation. 24 | // 25 | //----------------------------------------------------------------------------- 26 | 27 | 28 | #ifndef __M_FIXED__ 29 | #define __M_FIXED__ 30 | 31 | 32 | 33 | 34 | // 35 | // Fixed point, 32bit as 16.16. 36 | // 37 | #define FRACBITS 16 38 | #define FRACUNIT (1< 33 | 34 | #include "doomtype.h" 35 | 36 | boolean M_WriteFile(char *name, void *source, int length); 37 | int M_ReadFile(char *name, byte **buffer); 38 | void M_MakeDirectory(char *dir); 39 | char *M_TempFile(char *s); 40 | boolean M_FileExists(char *file); 41 | long M_FileLength(FILE *handle); 42 | boolean M_StrToInt(const char *str, int *result); 43 | 44 | #endif 45 | 46 | -------------------------------------------------------------------------------- /trunk/src/m_random.h: -------------------------------------------------------------------------------- 1 | // Emacs style mode select -*- C++ -*- 2 | //----------------------------------------------------------------------------- 3 | // 4 | // Copyright(C) 1993-1996 Id Software, Inc. 5 | // Copyright(C) 2005 Simon Howard 6 | // 7 | // This program is free software; you can redistribute it and/or 8 | // modify it under the terms of the GNU General Public License 9 | // as published by the Free Software Foundation; either version 2 10 | // of the License, or (at your option) any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program; if not, write to the Free Software 19 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 20 | // 02111-1307, USA. 21 | // 22 | // DESCRIPTION: 23 | // 24 | // 25 | //----------------------------------------------------------------------------- 26 | 27 | 28 | #ifndef __M_RANDOM__ 29 | #define __M_RANDOM__ 30 | 31 | 32 | #include "doomtype.h" 33 | 34 | 35 | 36 | // Returns a number from 0 to 255, 37 | // from a lookup table. 38 | int M_Random (void); 39 | 40 | // As M_Random, but used only by the play simulation. 41 | int P_Random (void); 42 | 43 | // Fix randoms for demos. 44 | void M_ClearRandom (void); 45 | 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /trunk/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 | * md5_context_s structure, pass it to MD5_Init, call MD5_Update as 14 | * needed on buffers full of bytes, and then call MD5_Final, 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 | #include "doomtype.h" 27 | 28 | typedef struct md5_context_s md5_context_t; 29 | typedef byte md5_digest_t[16]; 30 | 31 | struct md5_context_s { 32 | uint32_t buf[4]; 33 | uint32_t bytes[2]; 34 | uint32_t in[16]; 35 | }; 36 | 37 | void MD5_Init(md5_context_t *context); 38 | void MD5_Update(md5_context_t *context, byte const *buf, unsigned len); 39 | void MD5_UpdateInt32(md5_context_t *context, unsigned int val); 40 | void MD5_UpdateString(md5_context_t *context, char *str); 41 | void MD5_Final(unsigned char digest[16], md5_context_t *context); 42 | void MD5_Transform(uint32_t buf[4], uint32_t const in[16]); 43 | 44 | #endif /* !MD5_H */ 45 | 46 | -------------------------------------------------------------------------------- /trunk/src/memio.h: -------------------------------------------------------------------------------- 1 | // Emacs style mode select -*- C++ -*- 2 | //----------------------------------------------------------------------------- 3 | // 4 | // Copyright(C) 1993-1996 Id Software, Inc. 5 | // Copyright(C) 2005 Simon Howard 6 | // 7 | // This program is free software; you can redistribute it and/or 8 | // modify it under the terms of the GNU General Public License 9 | // as published by the Free Software Foundation; either version 2 10 | // of the License, or (at your option) any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program; if not, write to the Free Software 19 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 20 | // 02111-1307, USA. 21 | // 22 | 23 | #ifndef MEMIO_H 24 | #define MEMIO_H 25 | 26 | typedef struct _MEMFILE MEMFILE; 27 | 28 | typedef enum 29 | { 30 | MEM_SEEK_SET, 31 | MEM_SEEK_CUR, 32 | MEM_SEEK_END, 33 | } mem_rel_t; 34 | 35 | MEMFILE *mem_fopen_read(void *buf, size_t buflen); 36 | size_t mem_fread(void *buf, size_t size, size_t nmemb, MEMFILE *stream); 37 | MEMFILE *mem_fopen_write(void); 38 | size_t mem_fwrite(const void *ptr, size_t size, size_t nmemb, MEMFILE *stream); 39 | void mem_get_buf(MEMFILE *stream, void **buf, size_t *buflen); 40 | void mem_fclose(MEMFILE *stream); 41 | long mem_ftell(MEMFILE *stream); 42 | int mem_fseek(MEMFILE *stream, signed long offset, mem_rel_t whence); 43 | 44 | #endif /* #ifndef MEMIO_H */ 45 | 46 | -------------------------------------------------------------------------------- /trunk/src/mus2mid.h: -------------------------------------------------------------------------------- 1 | // Emacs style mode select -*- C++ -*- 2 | //----------------------------------------------------------------------------- 3 | // 4 | // Copyright(C) 1993-1996 Id Software, Inc. 5 | // Copyright(C) 2005 Simon Howard 6 | // Copyright(C) 2006 Ben Ryves 2006 7 | // 8 | // This program is free software; you can redistribute it and/or 9 | // modify it under the terms of the GNU General Public License 10 | // as published by the Free Software Foundation; either version 2 11 | // of the License, or (at your option) any later version. 12 | // 13 | // This program is distributed in the hope that it will be useful, 14 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | // GNU General Public License for more details. 17 | // 18 | // You should have received a copy of the GNU General Public License 19 | // along with this program; if not, write to the Free Software 20 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 21 | // 02111-1307, USA. 22 | // 23 | // 24 | // mus2mid.h - Ben Ryves 2006 - http://benryves.com - benryves@benryves.com 25 | // Use to convert a MUS file into a single track, type 0 MIDI file. 26 | 27 | #ifndef MUS2MID_H 28 | #define MUS2MID_H 29 | 30 | #include "doomtype.h" 31 | #include "memio.h" 32 | 33 | boolean mus2mid(MEMFILE *musinput, MEMFILE *midioutput); 34 | 35 | #endif /* #ifndef MUS2MID_H */ 36 | 37 | -------------------------------------------------------------------------------- /trunk/src/net_dedicated.h: -------------------------------------------------------------------------------- 1 | // Emacs style mode select -*- C++ -*- 2 | //----------------------------------------------------------------------------- 3 | // 4 | // Copyright(C) 2005 Simon Howard 5 | // 6 | // This program is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU General Public License 8 | // as published by the Free Software Foundation; either version 2 9 | // of the License, or (at your option) any later version. 10 | // 11 | // This program is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | // 16 | // You should have received a copy of the GNU General Public License 17 | // along with this program; if not, write to the Free Software 18 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 19 | // 02111-1307, USA. 20 | // 21 | //----------------------------------------------------------------------------- 22 | // 23 | // Dedicated server code. 24 | // 25 | 26 | #ifndef NET_DEDICATED_H 27 | #define NET_DEDICATED_H 28 | 29 | void NET_DedicatedServer(void); 30 | 31 | #endif /* #ifndef NET_DEDICATED_H */ 32 | 33 | 34 | -------------------------------------------------------------------------------- /trunk/src/net_gui.h: -------------------------------------------------------------------------------- 1 | // Emacs style mode select -*- C++ -*- 2 | //----------------------------------------------------------------------------- 3 | // 4 | // Copyright(C) 2005 Simon Howard 5 | // 6 | // This program is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU General Public License 8 | // as published by the Free Software Foundation; either version 2 9 | // of the License, or (at your option) any later version. 10 | // 11 | // This program is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | // 16 | // You should have received a copy of the GNU General Public License 17 | // along with this program; if not, write to the Free Software 18 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 19 | // 02111-1307, USA. 20 | // 21 | // Graphical stuff related to the networking code: 22 | // 23 | // * The client waiting screen when we are waiting for the server to 24 | // start the game. 25 | // 26 | 27 | 28 | #ifndef NET_GUI_H 29 | #define NET_GUI_H 30 | 31 | #include "doomtype.h" 32 | 33 | extern void NET_WaitForStart(); 34 | 35 | #endif /* #ifndef NET_GUI_H */ 36 | 37 | -------------------------------------------------------------------------------- /trunk/src/net_io.h: -------------------------------------------------------------------------------- 1 | // Emacs style mode select -*- C++ -*- 2 | //----------------------------------------------------------------------------- 3 | // 4 | // Copyright(C) 2005 Simon Howard 5 | // 6 | // This program is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU General Public License 8 | // as published by the Free Software Foundation; either version 2 9 | // of the License, or (at your option) any later version. 10 | // 11 | // This program is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | // 16 | // You should have received a copy of the GNU General Public License 17 | // along with this program; if not, write to the Free Software 18 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 19 | // 02111-1307, USA. 20 | // 21 | // DESCRIPTION: 22 | // Network packet manipulation (net_packet_t) 23 | // 24 | //----------------------------------------------------------------------------- 25 | 26 | #ifndef NET_IO_H 27 | #define NET_IO_H 28 | 29 | #include "net_defs.h" 30 | 31 | extern net_addr_t net_broadcast_addr; 32 | 33 | net_context_t *NET_NewContext(void); 34 | void NET_AddModule(net_context_t *context, net_module_t *module); 35 | void NET_SendPacket(net_addr_t *addr, net_packet_t *packet); 36 | void NET_SendBroadcast(net_context_t *context, net_packet_t *packet); 37 | boolean NET_RecvPacket(net_context_t *context, net_addr_t **addr, 38 | net_packet_t **packet); 39 | char *NET_AddrToString(net_addr_t *addr); 40 | void NET_FreeAddress(net_addr_t *addr); 41 | net_addr_t *NET_ResolveAddress(net_context_t *context, char *address); 42 | 43 | #endif /* #ifndef NET_IO_H */ 44 | 45 | -------------------------------------------------------------------------------- /trunk/src/net_loop.h: -------------------------------------------------------------------------------- 1 | // Emacs style mode select -*- C++ -*- 2 | //----------------------------------------------------------------------------- 3 | // 4 | // Copyright(C) 2005 Simon Howard 5 | // 6 | // This program is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU General Public License 8 | // as published by the Free Software Foundation; either version 2 9 | // of the License, or (at your option) any later version. 10 | // 11 | // This program is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | // 16 | // You should have received a copy of the GNU General Public License 17 | // along with this program; if not, write to the Free Software 18 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 19 | // 02111-1307, USA. 20 | // 21 | // DESCRIPTION: 22 | // Loopback network module for server compiled into the client 23 | // 24 | //----------------------------------------------------------------------------- 25 | 26 | #ifndef NET_LOOP_H 27 | #define NET_LOOP_H 28 | 29 | #include "net_defs.h" 30 | 31 | extern net_module_t net_loop_client_module; 32 | extern net_module_t net_loop_server_module; 33 | 34 | #endif /* #ifndef NET_LOOP_H */ 35 | 36 | -------------------------------------------------------------------------------- /trunk/src/net_packet.h: -------------------------------------------------------------------------------- 1 | // Emacs style mode select -*- C++ -*- 2 | //----------------------------------------------------------------------------- 3 | // 4 | // Copyright(C) 2005 Simon Howard 5 | // 6 | // This program is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU General Public License 8 | // as published by the Free Software Foundation; either version 2 9 | // of the License, or (at your option) any later version. 10 | // 11 | // This program is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | // 16 | // You should have received a copy of the GNU General Public License 17 | // along with this program; if not, write to the Free Software 18 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 19 | // 02111-1307, USA. 20 | // 21 | // DESCRIPTION: 22 | // Definitions for use in networking code. 23 | // 24 | //----------------------------------------------------------------------------- 25 | 26 | #ifndef NET_PACKET_H 27 | #define NET_PACKET_H 28 | 29 | #include "net_defs.h" 30 | 31 | net_packet_t *NET_NewPacket(int initial_size); 32 | net_packet_t *NET_PacketDup(net_packet_t *packet); 33 | void NET_FreePacket(net_packet_t *packet); 34 | 35 | boolean NET_ReadInt8(net_packet_t *packet, unsigned int *data); 36 | boolean NET_ReadInt16(net_packet_t *packet, unsigned int *data); 37 | boolean NET_ReadInt32(net_packet_t *packet, unsigned int *data); 38 | 39 | boolean NET_ReadSInt8(net_packet_t *packet, signed int *data); 40 | boolean NET_ReadSInt16(net_packet_t *packet, signed int *data); 41 | boolean NET_ReadSInt32(net_packet_t *packet, signed int *data); 42 | 43 | char *NET_ReadString(net_packet_t *packet); 44 | 45 | void NET_WriteInt8(net_packet_t *packet, unsigned int i); 46 | void NET_WriteInt16(net_packet_t *packet, unsigned int i); 47 | void NET_WriteInt32(net_packet_t *packet, unsigned int i); 48 | 49 | void NET_WriteString(net_packet_t *packet, char *string); 50 | 51 | #endif /* #ifndef NET_PACKET_H */ 52 | 53 | -------------------------------------------------------------------------------- /trunk/src/net_query.h: -------------------------------------------------------------------------------- 1 | // Emacs style mode select -*- C++ -*- 2 | //----------------------------------------------------------------------------- 3 | // 4 | // Copyright(C) 2005 Simon Howard 5 | // 6 | // This program is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU General Public License 8 | // as published by the Free Software Foundation; either version 2 9 | // of the License, or (at your option) any later version. 10 | // 11 | // This program is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | // 16 | // You should have received a copy of the GNU General Public License 17 | // along with this program; if not, write to the Free Software 18 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 19 | // 02111-1307, USA. 20 | // 21 | // DESCRIPTION: 22 | // Querying servers to find their current status. 23 | // 24 | 25 | #ifndef NET_QUERY_H 26 | #define NET_QUERY_H 27 | 28 | #include "net_defs.h" 29 | 30 | typedef void (*net_query_callback_t)(net_addr_t *addr, 31 | net_querydata_t *querydata, 32 | unsigned int ping_time, 33 | void *user_data); 34 | 35 | extern int NET_LANQuery(net_query_callback_t callback, void *user_data); 36 | extern int NET_MasterQuery(net_query_callback_t callback, void *user_data); 37 | extern void NET_QueryAddress(char *addr); 38 | extern net_addr_t *NET_FindLANServer(void); 39 | 40 | extern void NET_QueryPrintCallback(net_addr_t *addr, net_querydata_t *data, 41 | unsigned int ping_time, void *user_data); 42 | 43 | extern net_addr_t *NET_Query_ResolveMaster(net_context_t *context); 44 | extern void NET_Query_AddToMaster(net_addr_t *master_addr); 45 | extern void NET_Query_MasterResponse(net_packet_t *packet); 46 | 47 | #endif /* #ifndef NET_QUERY_H */ 48 | 49 | -------------------------------------------------------------------------------- /trunk/src/net_sdl.h: -------------------------------------------------------------------------------- 1 | // Emacs style mode select -*- C++ -*- 2 | //----------------------------------------------------------------------------- 3 | // 4 | // Copyright(C) 2005 Simon Howard 5 | // 6 | // This program is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU General Public License 8 | // as published by the Free Software Foundation; either version 2 9 | // of the License, or (at your option) any later version. 10 | // 11 | // This program is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | // 16 | // You should have received a copy of the GNU General Public License 17 | // along with this program; if not, write to the Free Software 18 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 19 | // 02111-1307, USA. 20 | // 21 | // DESCRIPTION: 22 | // Networking module which uses SDL_net 23 | // 24 | //----------------------------------------------------------------------------- 25 | 26 | #ifndef NET_SDL_H 27 | #define NET_SDL_H 28 | 29 | #include "net_defs.h" 30 | 31 | extern net_module_t net_sdl_module; 32 | 33 | #endif /* #ifndef NET_SDL_H */ 34 | 35 | -------------------------------------------------------------------------------- /trunk/src/net_server.h: -------------------------------------------------------------------------------- 1 | // Emacs style mode select -*- C++ -*- 2 | //----------------------------------------------------------------------------- 3 | // 4 | // Copyright(C) 2005 Simon Howard 5 | // 6 | // This program is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU General Public License 8 | // as published by the Free Software Foundation; either version 2 9 | // of the License, or (at your option) any later version. 10 | // 11 | // This program is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | // 16 | // You should have received a copy of the GNU General Public License 17 | // along with this program; if not, write to the Free Software 18 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 19 | // 02111-1307, USA. 20 | // 21 | // Network server code 22 | // 23 | 24 | #ifndef NET_SERVER_H 25 | #define NET_SERVER_H 26 | 27 | // initialize server and wait for connections 28 | 29 | void NET_SV_Init(void); 30 | 31 | // run server: check for new packets received etc. 32 | 33 | void NET_SV_Run(void); 34 | 35 | // Shut down the server 36 | // Blocks until all clients disconnect, or until a 5 second timeout 37 | 38 | void NET_SV_Shutdown(void); 39 | 40 | // Add a network module to the context used by the server 41 | 42 | void NET_SV_AddModule(net_module_t *module); 43 | 44 | // Register server with master server. 45 | 46 | void NET_SV_RegisterWithMaster(void); 47 | 48 | #endif /* #ifndef NET_SERVER_H */ 49 | 50 | -------------------------------------------------------------------------------- /trunk/src/p_inter.h: -------------------------------------------------------------------------------- 1 | // Emacs style mode select -*- C++ -*- 2 | //----------------------------------------------------------------------------- 3 | // 4 | // Copyright(C) 1993-1996 Id Software, Inc. 5 | // Copyright(C) 2005 Simon Howard 6 | // 7 | // This program is free software; you can redistribute it and/or 8 | // modify it under the terms of the GNU General Public License 9 | // as published by the Free Software Foundation; either version 2 10 | // of the License, or (at your option) any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program; if not, write to the Free Software 19 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 20 | // 02111-1307, USA. 21 | // 22 | // DESCRIPTION: 23 | // 24 | // 25 | //----------------------------------------------------------------------------- 26 | 27 | 28 | #ifndef __P_INTER__ 29 | #define __P_INTER__ 30 | 31 | 32 | 33 | 34 | boolean P_GivePower(player_t*, int); 35 | 36 | 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /trunk/src/p_setup.h: -------------------------------------------------------------------------------- 1 | // Emacs style mode select -*- C++ -*- 2 | //----------------------------------------------------------------------------- 3 | // 4 | // Copyright(C) 1993-1996 Id Software, Inc. 5 | // Copyright(C) 2005 Simon Howard 6 | // 7 | // This program is free software; you can redistribute it and/or 8 | // modify it under the terms of the GNU General Public License 9 | // as published by the Free Software Foundation; either version 2 10 | // of the License, or (at your option) any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program; if not, write to the Free Software 19 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 20 | // 02111-1307, USA. 21 | // 22 | // DESCRIPTION: 23 | // Setup a game, startup stuff. 24 | // 25 | //----------------------------------------------------------------------------- 26 | 27 | 28 | #ifndef __P_SETUP__ 29 | #define __P_SETUP__ 30 | 31 | 32 | 33 | 34 | // NOT called by W_Ticker. Fixme. 35 | void 36 | P_SetupLevel 37 | ( int episode, 38 | int map, 39 | int playermask, 40 | skill_t skill); 41 | 42 | // Called by startup code. 43 | void P_Init (void); 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /trunk/src/p_tick.h: -------------------------------------------------------------------------------- 1 | // Emacs style mode select -*- C++ -*- 2 | //----------------------------------------------------------------------------- 3 | // 4 | // Copyright(C) 1993-1996 Id Software, Inc. 5 | // Copyright(C) 2005 Simon Howard 6 | // 7 | // This program is free software; you can redistribute it and/or 8 | // modify it under the terms of the GNU General Public License 9 | // as published by the Free Software Foundation; either version 2 10 | // of the License, or (at your option) any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program; if not, write to the Free Software 19 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 20 | // 02111-1307, USA. 21 | // 22 | // DESCRIPTION: 23 | // ? 24 | // 25 | //----------------------------------------------------------------------------- 26 | 27 | 28 | #ifndef __P_TICK__ 29 | #define __P_TICK__ 30 | 31 | 32 | 33 | 34 | // Called by C_Ticker, 35 | // can call G_PlayerExited. 36 | // Carries out all thinking of monsters and players. 37 | void P_Ticker (void); 38 | 39 | 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /trunk/src/pr_process.h: -------------------------------------------------------------------------------- 1 | // pr_process.h 2 | // Copyright (C) 1999 by Dennis Chao 3 | // Copyright (C) 2000 by David Koppenhofer 4 | 5 | // Passed as second argument to P_SpawnMapThing() to tell it 6 | // if we're spawning a pid mobj or not. 7 | #define IS_NOT_PID_MOBJ 0 8 | #define IS_PID_MOBJ 1 9 | 10 | // All flags below are generally set up in d_main.c, D_DoomMain(). 11 | 12 | // Need to have a flag to tell if we loaded the special process 13 | // management level. 14 | extern boolean ps_level_loaded; 15 | 16 | // Flag to prevent the 'ps' portion of the program from running. 17 | extern boolean nopsmon; 18 | 19 | // Flag to prevent the execution of process re-nicing and killing. 20 | extern boolean nopsact; 21 | 22 | // Flag to allow pid monsters to be damaged by things other than a player. 23 | extern boolean nopssafety; 24 | 25 | // Flag to show all users' processes. 26 | extern boolean psallusers; 27 | 28 | // Enumeration of types of user lists to have. 29 | // Passed to and used in add_to_ps_userlist(). 30 | typedef enum 31 | { 32 | psuser, 33 | psnotuser 34 | } ps_userlist_type_t; 35 | 36 | // Functions 37 | void pr_check(void); 38 | void cleanup_pid_list(mobj_t *del_mobj); 39 | void pr_kill(int pid); 40 | void pr_renice(int pid); 41 | void add_to_ps_userlist(ps_userlist_type_t listtype, char *username); 42 | -------------------------------------------------------------------------------- /trunk/src/psd-doom-screensaver.desktop: -------------------------------------------------------------------------------- 1 | 2 | [Desktop Entry] 3 | Encoding=UTF-8 4 | Name=psdoom 5 | Comment=psdoom-ng source port - psDooM with Chocolate Doom 6 | TryExec=psd-doom 7 | Exec=psd-doom 8 | StartupNotify=false 9 | Terminal=false 10 | Type=Application 11 | Categories=Screensaver 12 | 13 | -------------------------------------------------------------------------------- /trunk/src/psd-doom.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=psdoom 3 | Exec=psd-doom 4 | Icon=psd-doom 5 | Type=Application 6 | Comment=psdoom-ng source port - psDooM with Chocolate Doom 7 | Categories=Game;ActionGame; 8 | -------------------------------------------------------------------------------- /trunk/src/psdoom-screensaver.desktop: -------------------------------------------------------------------------------- 1 | 2 | [Desktop Entry] 3 | Encoding=UTF-8 4 | Name=psdoom 5 | Comment=psdoom-ng source port - psDooM with Chocolate Doom 6 | TryExec=psdoom 7 | Exec=psdoom 8 | StartupNotify=false 9 | Terminal=false 10 | Type=Application 11 | Categories=Screensaver 12 | 13 | -------------------------------------------------------------------------------- /trunk/src/psdoom.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=psdoom 3 | Exec=psdoom 4 | Icon=psdoom 5 | Type=Application 6 | Comment=psdoom-ng source port - psDooM with Chocolate Doom 7 | Categories=Game;ActionGame; 8 | -------------------------------------------------------------------------------- /trunk/src/r_bsp.h: -------------------------------------------------------------------------------- 1 | // Emacs style mode select -*- C++ -*- 2 | //----------------------------------------------------------------------------- 3 | // 4 | // Copyright(C) 1993-1996 Id Software, Inc. 5 | // Copyright(C) 2005 Simon Howard 6 | // 7 | // This program is free software; you can redistribute it and/or 8 | // modify it under the terms of the GNU General Public License 9 | // as published by the Free Software Foundation; either version 2 10 | // of the License, or (at your option) any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program; if not, write to the Free Software 19 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 20 | // 02111-1307, USA. 21 | // 22 | // DESCRIPTION: 23 | // Refresh module, BSP traversal and handling. 24 | // 25 | //----------------------------------------------------------------------------- 26 | 27 | 28 | #ifndef __R_BSP__ 29 | #define __R_BSP__ 30 | 31 | 32 | 33 | extern seg_t* curline; 34 | extern side_t* sidedef; 35 | extern line_t* linedef; 36 | extern sector_t* frontsector; 37 | extern sector_t* backsector; 38 | 39 | extern int rw_x; 40 | extern int rw_stopx; 41 | 42 | extern boolean segtextured; 43 | 44 | // false if the back side is the same plane 45 | extern boolean markfloor; 46 | extern boolean markceiling; 47 | 48 | extern boolean skymap; 49 | 50 | extern drawseg_t drawsegs[MAXDRAWSEGS]; 51 | extern drawseg_t* ds_p; 52 | 53 | extern lighttable_t** hscalelight; 54 | extern lighttable_t** vscalelight; 55 | extern lighttable_t** dscalelight; 56 | 57 | 58 | typedef void (*drawfunc_t) (int start, int stop); 59 | 60 | 61 | // BSP? 62 | void R_ClearClipSegs (void); 63 | void R_ClearDrawSegs (void); 64 | 65 | 66 | void R_RenderBSPNode (int bspnum); 67 | 68 | 69 | #endif 70 | -------------------------------------------------------------------------------- /trunk/src/r_data.h: -------------------------------------------------------------------------------- 1 | // Emacs style mode select -*- C++ -*- 2 | //----------------------------------------------------------------------------- 3 | // 4 | // Copyright(C) 1993-1996 Id Software, Inc. 5 | // Copyright(C) 2005 Simon Howard 6 | // 7 | // This program is free software; you can redistribute it and/or 8 | // modify it under the terms of the GNU General Public License 9 | // as published by the Free Software Foundation; either version 2 10 | // of the License, or (at your option) any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program; if not, write to the Free Software 19 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 20 | // 02111-1307, USA. 21 | // 22 | // DESCRIPTION: 23 | // Refresh module, data I/O, caching, retrieval of graphics 24 | // by name. 25 | // 26 | //----------------------------------------------------------------------------- 27 | 28 | 29 | #ifndef __R_DATA__ 30 | #define __R_DATA__ 31 | 32 | #include "r_defs.h" 33 | #include "r_state.h" 34 | 35 | 36 | // Retrieve column data for span blitting. 37 | byte* 38 | R_GetColumn 39 | ( int tex, 40 | int col ); 41 | 42 | 43 | // I/O, setting up the stuff. 44 | void R_InitData (void); 45 | void R_PrecacheLevel (void); 46 | 47 | 48 | // Retrieval. 49 | // Floor/ceiling opaque texture tiles, 50 | // lookup by name. For animation? 51 | int R_FlatNumForName (char* name); 52 | 53 | 54 | // Called by P_Ticker for switches and animations, 55 | // returns the texture number for the texture name. 56 | int R_TextureNumForName (char *name); 57 | int R_CheckTextureNumForName (char *name); 58 | 59 | #endif 60 | -------------------------------------------------------------------------------- /trunk/src/r_local.h: -------------------------------------------------------------------------------- 1 | // Emacs style mode select -*- C++ -*- 2 | //----------------------------------------------------------------------------- 3 | // 4 | // Copyright(C) 1993-1996 Id Software, Inc. 5 | // Copyright(C) 2005 Simon Howard 6 | // 7 | // This program is free software; you can redistribute it and/or 8 | // modify it under the terms of the GNU General Public License 9 | // as published by the Free Software Foundation; either version 2 10 | // of the License, or (at your option) any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program; if not, write to the Free Software 19 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 20 | // 02111-1307, USA. 21 | // 22 | // DESCRIPTION: 23 | // Refresh (R_*) module, global header. 24 | // All the rendering/drawing stuff is here. 25 | // 26 | //----------------------------------------------------------------------------- 27 | 28 | #ifndef __R_LOCAL__ 29 | #define __R_LOCAL__ 30 | 31 | // Binary Angles, sine/cosine/atan lookups. 32 | #include "tables.h" 33 | 34 | // Screen size related parameters. 35 | #include "doomdef.h" 36 | 37 | // Include the refresh/render data structs. 38 | #include "r_data.h" 39 | 40 | 41 | 42 | // 43 | // Separate header file for each module. 44 | // 45 | #include "r_main.h" 46 | #include "r_bsp.h" 47 | #include "r_segs.h" 48 | #include "r_plane.h" 49 | #include "r_data.h" 50 | #include "r_things.h" 51 | #include "r_draw.h" 52 | 53 | #endif // __R_LOCAL__ 54 | -------------------------------------------------------------------------------- /trunk/src/r_segs.h: -------------------------------------------------------------------------------- 1 | // Emacs style mode select -*- C++ -*- 2 | //----------------------------------------------------------------------------- 3 | // 4 | // Copyright(C) 1993-1996 Id Software, Inc. 5 | // Copyright(C) 2005 Simon Howard 6 | // 7 | // This program is free software; you can redistribute it and/or 8 | // modify it under the terms of the GNU General Public License 9 | // as published by the Free Software Foundation; either version 2 10 | // of the License, or (at your option) any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program; if not, write to the Free Software 19 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 20 | // 02111-1307, USA. 21 | // 22 | // DESCRIPTION: 23 | // Refresh module, drawing LineSegs from BSP. 24 | // 25 | //----------------------------------------------------------------------------- 26 | 27 | 28 | #ifndef __R_SEGS__ 29 | #define __R_SEGS__ 30 | 31 | 32 | 33 | 34 | void 35 | R_RenderMaskedSegRange 36 | ( drawseg_t* ds, 37 | int x1, 38 | int x2 ); 39 | 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /trunk/src/r_sky.c: -------------------------------------------------------------------------------- 1 | // Emacs style mode select -*- C++ -*- 2 | //----------------------------------------------------------------------------- 3 | // 4 | // Copyright(C) 1993-1996 Id Software, Inc. 5 | // Copyright(C) 2005 Simon Howard 6 | // 7 | // This program is free software; you can redistribute it and/or 8 | // modify it under the terms of the GNU General Public License 9 | // as published by the Free Software Foundation; either version 2 10 | // of the License, or (at your option) any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program; if not, write to the Free Software 19 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 20 | // 02111-1307, USA. 21 | // 22 | // DESCRIPTION: 23 | // Sky rendering. The DOOM sky is a texture map like any 24 | // wall, wrapping around. A 1024 columns equal 360 degrees. 25 | // The default sky map is 256 columns and repeats 4 times 26 | // on a 320 screen? 27 | // 28 | // 29 | //----------------------------------------------------------------------------- 30 | 31 | 32 | 33 | // Needed for FRACUNIT. 34 | #include "m_fixed.h" 35 | 36 | // Needed for Flat retrieval. 37 | #include "r_data.h" 38 | 39 | 40 | #include "r_sky.h" 41 | 42 | // 43 | // sky mapping 44 | // 45 | int skyflatnum; 46 | int skytexture; 47 | int skytexturemid; 48 | 49 | 50 | 51 | // 52 | // R_InitSkyMap 53 | // Called whenever the view size changes. 54 | // 55 | void R_InitSkyMap (void) 56 | { 57 | // skyflatnum = R_FlatNumForName ( SKYFLATNAME ); 58 | skytexturemid = 100*FRACUNIT; 59 | } 60 | 61 | -------------------------------------------------------------------------------- /trunk/src/r_sky.h: -------------------------------------------------------------------------------- 1 | // Emacs style mode select -*- C++ -*- 2 | //----------------------------------------------------------------------------- 3 | // 4 | // Copyright(C) 1993-1996 Id Software, Inc. 5 | // Copyright(C) 2005 Simon Howard 6 | // 7 | // This program is free software; you can redistribute it and/or 8 | // modify it under the terms of the GNU General Public License 9 | // as published by the Free Software Foundation; either version 2 10 | // of the License, or (at your option) any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program; if not, write to the Free Software 19 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 20 | // 02111-1307, USA. 21 | // 22 | // DESCRIPTION: 23 | // Sky rendering. 24 | // 25 | //----------------------------------------------------------------------------- 26 | 27 | 28 | #ifndef __R_SKY__ 29 | #define __R_SKY__ 30 | 31 | 32 | 33 | // SKY, store the number for name. 34 | #define SKYFLATNAME "F_SKY1" 35 | 36 | // The sky map is 256*128*4 maps. 37 | #define ANGLETOSKYSHIFT 22 38 | 39 | extern int skytexture; 40 | extern int skytexturemid; 41 | 42 | // Called whenever the view size changes. 43 | void R_InitSkyMap (void); 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /trunk/src/resource.rc: -------------------------------------------------------------------------------- 1 | 1 ICON "../data/doom.ico" 2 | 3 | 1 VERSIONINFO 4 | PRODUCTVERSION 2012, 02, 05-1, 6, 0, 0 5 | FILEVERSION 2012, 02, 05-1, 6, 0, 0 6 | FILETYPE 1 7 | { 8 | BLOCK "StringFileInfo" 9 | { 10 | BLOCK "040904E4" 11 | { 12 | VALUE "FileVersion", "2012.02.05-1.6.0" 13 | VALUE "FileDescription", "psdoom 2012.02.05-1.6.0" 14 | VALUE "InternalName", "psdoom" 15 | VALUE "CompanyName", "orsonteodoro@yahoo.com" 16 | VALUE "LegalCopyright", "Copyright (C) 1993-2012. Licensed under GNU General Public License, version 2" 17 | VALUE "ProductName", "psdoom" 18 | VALUE "ProductVersion", "2012.02.05-1.6.0" 19 | } 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /trunk/src/resource.rc.in: -------------------------------------------------------------------------------- 1 | 1 ICON "../data/doom.ico" 2 | 3 | 1 VERSIONINFO 4 | PRODUCTVERSION @WINDOWS_RC_VERSION@ 5 | FILEVERSION @WINDOWS_RC_VERSION@ 6 | FILETYPE 1 7 | { 8 | BLOCK "StringFileInfo" 9 | { 10 | BLOCK "040904E4" 11 | { 12 | VALUE "FileVersion", "@PACKAGE_VERSION@" 13 | VALUE "FileDescription", "@PACKAGE_STRING@" 14 | VALUE "InternalName", "@PACKAGE_TARNAME@" 15 | VALUE "CompanyName", "@PACKAGE_BUGREPORT@" 16 | VALUE "LegalCopyright", "@PACKAGE_COPYRIGHT@. Licensed under @PACKAGE_LICENSE@" 17 | VALUE "ProductName", "@PACKAGE_NAME@" 18 | VALUE "ProductVersion", "@PACKAGE_VERSION@" 19 | } 20 | } 21 | } 22 | 23 | -------------------------------------------------------------------------------- /trunk/src/w_checksum.h: -------------------------------------------------------------------------------- 1 | // Emacs style mode select -*- C++ -*- 2 | //----------------------------------------------------------------------------- 3 | // 4 | // Copyright(C) 1993-1996 Id Software, Inc. 5 | // Copyright(C) 2005 Simon Howard 6 | // 7 | // This program is free software; you can redistribute it and/or 8 | // modify it under the terms of the GNU General Public License 9 | // as published by the Free Software Foundation; either version 2 10 | // of the License, or (at your option) any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program; if not, write to the Free Software 19 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 20 | // 02111-1307, USA. 21 | // 22 | // DESCRIPTION: 23 | // Generate a checksum of the WAD directory. 24 | // 25 | 26 | #ifndef W_CHECKSUM_H 27 | #define W_CHECKSUM_H 28 | 29 | #include "doomtype.h" 30 | 31 | extern void W_Checksum(md5_digest_t digest); 32 | 33 | #endif /* #ifndef W_CHECKSUM_H */ 34 | 35 | -------------------------------------------------------------------------------- /trunk/src/w_merge.h: -------------------------------------------------------------------------------- 1 | // Emacs style mode select -*- C++ -*- 2 | //----------------------------------------------------------------------------- 3 | // 4 | // Copyright(C) 2005 Simon Howard 5 | // 6 | // This program is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU General Public License 8 | // as published by the Free Software Foundation; either version 2 9 | // of the License, or (at your option) any later version. 10 | // 11 | // This program is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | // 16 | // You should have received a copy of the GNU General Public License 17 | // along with this program; if not, write to the Free Software 18 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 19 | // 02111-1307, USA. 20 | // 21 | // DESCRIPTION: 22 | // Handles merging of PWADs, similar to deutex's -merge option 23 | // 24 | // Ideally this should work exactly the same as in deutex, but trying to 25 | // read the deutex source code made my brain hurt. 26 | // 27 | //----------------------------------------------------------------------------- 28 | 29 | #ifndef W_MERGE_H 30 | #define W_MERGE_H 31 | 32 | #define W_NWT_MERGE_SPRITES 0x1 33 | #define W_NWT_MERGE_FLATS 0x2 34 | 35 | // Add a new WAD and merge it into the main directory 36 | 37 | void W_MergeFile(char *filename); 38 | 39 | // NWT-style merging 40 | 41 | void W_NWTMergeFile(char *filename, int flags); 42 | 43 | // Acts the same as NWT's "-merge" option. 44 | 45 | void W_NWTDashMerge(char *filename); 46 | 47 | // Debug function that prints the WAD directory. 48 | 49 | void W_PrintDirectory(void); 50 | 51 | #endif /* #ifndef W_MERGE_H */ 52 | 53 | -------------------------------------------------------------------------------- /trunk/src/wi_stuff.h: -------------------------------------------------------------------------------- 1 | // Emacs style mode select -*- C++ -*- 2 | //----------------------------------------------------------------------------- 3 | // 4 | // Copyright(C) 1993-1996 Id Software, Inc. 5 | // Copyright(C) 2005 Simon Howard 6 | // 7 | // This program is free software; you can redistribute it and/or 8 | // modify it under the terms of the GNU General Public License 9 | // as published by the Free Software Foundation; either version 2 10 | // of the License, or (at your option) any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program; if not, write to the Free Software 19 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 20 | // 02111-1307, USA. 21 | // 22 | // DESCRIPTION: 23 | // Intermission. 24 | // 25 | //----------------------------------------------------------------------------- 26 | 27 | #ifndef __WI_STUFF__ 28 | #define __WI_STUFF__ 29 | 30 | //#include "v_video.h" 31 | 32 | #include "doomdef.h" 33 | 34 | // States for the intermission 35 | 36 | typedef enum 37 | { 38 | NoState = -1, 39 | StatCount, 40 | ShowNextLoc, 41 | } stateenum_t; 42 | 43 | // Called by main loop, animate the intermission. 44 | void WI_Ticker (void); 45 | 46 | // Called by main loop, 47 | // draws the intermission directly into the screen buffer. 48 | void WI_Drawer (void); 49 | 50 | // Setup for an intermission screen. 51 | void WI_Start(wbstartstruct_t* wbstartstruct); 52 | 53 | // Shut down the intermission screen 54 | void WI_End(void); 55 | 56 | #endif 57 | -------------------------------------------------------------------------------- /trunk/stamp-h1: -------------------------------------------------------------------------------- 1 | timestamp for config.h 2 | -------------------------------------------------------------------------------- /trunk/textscreen/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | AM_CFLAGS = -I../src 3 | 4 | CTAGS_ARGS=-I TXT_UNCAST_ARG+ 5 | 6 | # build this directory before the examples directory. 7 | 8 | SUBDIRS= . examples 9 | 10 | noinst_LIBRARIES=libtextscreen.a 11 | 12 | EXTRA_DIST=Doxyfile 13 | 14 | libtextscreen_a_SOURCES = \ 15 | textscreen.h \ 16 | txt_checkbox.c txt_checkbox.h \ 17 | txt_desktop.c txt_desktop.h \ 18 | txt_dropdown.c txt_dropdown.h \ 19 | txt_gui.c txt_gui.h \ 20 | txt_inputbox.c txt_inputbox.h \ 21 | txt_io.c txt_io.h \ 22 | txt_main.h \ 23 | txt_button.c txt_button.h \ 24 | txt_label.c txt_label.h \ 25 | txt_radiobutton.c txt_radiobutton.h \ 26 | txt_scrollpane.c txt_scrollpane.h \ 27 | txt_separator.c txt_separator.h \ 28 | txt_spinctrl.c txt_spinctrl.h \ 29 | txt_sdl.c txt_sdl.h \ 30 | txt_smallfont.h \ 31 | txt_strut.c txt_strut.h \ 32 | txt_table.c txt_table.h \ 33 | txt_widget.c txt_widget.h \ 34 | txt_window.c txt_window.h \ 35 | txt_window_action.c txt_window_action.h \ 36 | txt_font.h 37 | 38 | doc: 39 | doxygen 40 | 41 | -------------------------------------------------------------------------------- /trunk/textscreen/examples/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | AM_CFLAGS = -I.. -I../../src 3 | 4 | noinst_PROGRAMS=guitest calculator 5 | 6 | guitest_LDADD = ../libtextscreen.a @LDFLAGS@ @SDL_LIBS@ 7 | guitest_SOURCES = guitest.c 8 | 9 | calculator_LDADD = ../libtextscreen.a @LDFLAGS@ @SDL_LIBS@ 10 | calculator_SOURCES = calculator.c 11 | 12 | -------------------------------------------------------------------------------- /trunk/textscreen/textscreen.h: -------------------------------------------------------------------------------- 1 | // Emacs style mode select -*- C++ -*- 2 | //----------------------------------------------------------------------------- 3 | // 4 | // Copyright(C) 2006 Simon Howard 5 | // 6 | // This program is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU General Public License 8 | // as published by the Free Software Foundation; either version 2 9 | // of the License, or (at your option) any later version. 10 | // 11 | // This program is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | // 16 | // You should have received a copy of the GNU General Public License 17 | // along with this program; if not, write to the Free Software 18 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 19 | // 02111-1307, USA. 20 | // 21 | 22 | #ifndef TEXTSCREEN_H 23 | #define TEXTSCREEN_H 24 | 25 | #include "../src/doomkeys.h" 26 | #include "txt_main.h" 27 | 28 | #include "txt_button.h" 29 | #include "txt_checkbox.h" 30 | #include "txt_desktop.h" 31 | #include "txt_dropdown.h" 32 | #include "txt_inputbox.h" 33 | #include "txt_label.h" 34 | #include "txt_radiobutton.h" 35 | #include "txt_scrollpane.h" 36 | #include "txt_separator.h" 37 | #include "txt_spinctrl.h" 38 | #include "txt_strut.h" 39 | #include "txt_table.h" 40 | #include "txt_widget.h" 41 | #include "txt_window_action.h" 42 | #include "txt_window.h" 43 | 44 | #endif /* #ifndef TEXTSCREEN_H */ 45 | 46 | -------------------------------------------------------------------------------- /trunk/textscreen/txt_gui.h: -------------------------------------------------------------------------------- 1 | // Emacs style mode select -*- C++ -*- 2 | //----------------------------------------------------------------------------- 3 | // 4 | // Copyright(C) 2005,2006 Simon Howard 5 | // 6 | // This program is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU General Public License 8 | // as published by the Free Software Foundation; either version 2 9 | // of the License, or (at your option) any later version. 10 | // 11 | // This program is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | // 16 | // You should have received a copy of the GNU General Public License 17 | // along with this program; if not, write to the Free Software 18 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 19 | // 02111-1307, USA. 20 | // 21 | //----------------------------------------------------------------------------- 22 | // 23 | // Text mode emulation in SDL 24 | // 25 | //----------------------------------------------------------------------------- 26 | 27 | #ifndef TXT_GUI_H 28 | #define TXT_GUI_H 29 | 30 | #define TXT_WINDOW_BACKGROUND TXT_COLOR_BLUE 31 | #define TXT_HOVER_BACKGROUND TXT_COLOR_CYAN 32 | 33 | void TXT_DrawDesktopBackground(const char *title); 34 | void TXT_DrawWindowFrame(const char *title, int x, int y, int w, int h); 35 | void TXT_DrawSeparator(int x, int y, int w); 36 | void TXT_DrawString(const char *s); 37 | 38 | void TXT_DrawHorizScrollbar(int x, int y, int w, int cursor, int range); 39 | void TXT_DrawVertScrollbar(int x, int y, int h, int cursor, int range); 40 | 41 | 42 | void TXT_InitClipArea(void); 43 | void TXT_PushClipArea(int x1, int x2, int y1, int y2); 44 | void TXT_PopClipArea(void); 45 | 46 | #endif /* #ifndef TXT_GUI_H */ 47 | 48 | -------------------------------------------------------------------------------- /trunk/textscreen/txt_io.h: -------------------------------------------------------------------------------- 1 | // Emacs style mode select -*- C++ -*- 2 | //----------------------------------------------------------------------------- 3 | // 4 | // Copyright(C) 2005,2006 Simon Howard 5 | // 6 | // This program is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU General Public License 8 | // as published by the Free Software Foundation; either version 2 9 | // of the License, or (at your option) any later version. 10 | // 11 | // This program is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | // 16 | // You should have received a copy of the GNU General Public License 17 | // along with this program; if not, write to the Free Software 18 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 19 | // 02111-1307, USA. 20 | // 21 | //----------------------------------------------------------------------------- 22 | // 23 | // Text mode emulation in SDL 24 | // 25 | //----------------------------------------------------------------------------- 26 | 27 | #ifndef TXT_IO_H 28 | #define TXT_IO_H 29 | 30 | #include "txt_main.h" 31 | 32 | void TXT_PutChar(int c); 33 | void TXT_Puts(const char *s); 34 | void TXT_GotoXY(int x, int y); 35 | void TXT_GetXY(int *x, int *y); 36 | void TXT_FGColor(txt_color_t color); 37 | void TXT_BGColor(int color, int blinking); 38 | void TXT_ClearScreen(void); 39 | 40 | #endif /* #ifndef TXT_IO_H */ 41 | 42 | -------------------------------------------------------------------------------- /trunk/textscreen/txt_sdl.h: -------------------------------------------------------------------------------- 1 | // Emacs style mode select -*- C++ -*- 2 | //----------------------------------------------------------------------------- 3 | // 4 | // Copyright(C) 2005,2006 Simon Howard 5 | // 6 | // This program is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU General Public License 8 | // as published by the Free Software Foundation; either version 2 9 | // of the License, or (at your option) any later version. 10 | // 11 | // This program is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | // 16 | // You should have received a copy of the GNU General Public License 17 | // along with this program; if not, write to the Free Software 18 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 19 | // 02111-1307, USA. 20 | // 21 | //----------------------------------------------------------------------------- 22 | // 23 | // Text mode emulation in SDL 24 | // 25 | //----------------------------------------------------------------------------- 26 | 27 | #ifndef TXT_SDL_H 28 | #define TXT_SDL_H 29 | 30 | // The textscreen API itself doesn't need SDL; however, SDL needs its 31 | // headers included where main() is defined. 32 | 33 | #include "SDL.h" 34 | 35 | // Event callback function type: a function of this type can be used 36 | // to intercept events in the textscreen event processing loop. 37 | // Returning 1 will cause the event to be eaten; the textscreen code 38 | // will not see it. 39 | 40 | typedef int (*TxtSDLEventCallbackFunc)(SDL_Event *event, void *user_data); 41 | 42 | // Set a callback function to call in the SDL event loop. Useful for 43 | // intercepting events. Pass callback=NULL to clear an existing 44 | // callback function. 45 | // user_data is a void pointer to be passed to the callback function. 46 | 47 | void TXT_SDL_SetEventCallback(TxtSDLEventCallbackFunc callback, void *user_data); 48 | 49 | #endif /* #ifndef TXT_SDL_H */ 50 | 51 | -------------------------------------------------------------------------------- /trunk/textscreen/txt_strut.h: -------------------------------------------------------------------------------- 1 | // Emacs style mode select -*- C++ -*- 2 | //----------------------------------------------------------------------------- 3 | // 4 | // Copyright(C) 2006 Simon Howard 5 | // 6 | // This program is free software; you can redistribute it and/or 7 | // modify it under the terms of the GNU General Public License 8 | // as published by the Free Software Foundation; either version 2 9 | // of the License, or (at your option) any later version. 10 | // 11 | // This program is distributed in the hope that it will be useful, 12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | // GNU General Public License for more details. 15 | // 16 | // You should have received a copy of the GNU General Public License 17 | // along with this program; if not, write to the Free Software 18 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 19 | // 02111-1307, USA. 20 | // 21 | 22 | #ifndef TXT_STRUT_H 23 | #define TXT_STRUT_H 24 | 25 | /** 26 | * @file txt_strut.h 27 | * 28 | * Strut widget. 29 | */ 30 | 31 | /** 32 | * Strut widget. 33 | * 34 | * A strut is a widget that takes up a fixed amount of space. It can 35 | * be visualised as a transparent box. Struts are used to provide 36 | * spacing between widgets. 37 | */ 38 | 39 | typedef struct txt_strut_s txt_strut_t; 40 | 41 | #include "txt_widget.h" 42 | 43 | struct txt_strut_s 44 | { 45 | txt_widget_t widget; 46 | int width; 47 | int height; 48 | }; 49 | 50 | /** 51 | * Create a new strut. 52 | * 53 | * @param width Width of the strut, in characters. 54 | * @param height Height of the strut, in characters. 55 | */ 56 | 57 | txt_strut_t *TXT_NewStrut(int width, int height); 58 | 59 | #endif /* #ifndef TXT_STRUT_H */ 60 | 61 | 62 | -------------------------------------------------------------------------------- /trunk/wince/.deps/dummy.Po: -------------------------------------------------------------------------------- 1 | dummy.o: dummy.c 2 | -------------------------------------------------------------------------------- /trunk/wince/.deps/env.Po: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /trunk/wince/.deps/errno.Po: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /trunk/wince/.deps/fileops.Po: -------------------------------------------------------------------------------- 1 | # dummy 2 | -------------------------------------------------------------------------------- /trunk/wince/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | noinst_LIBRARIES=libc_wince.a 3 | 4 | if WINDOWS_CE 5 | 6 | libc_wince_a_SOURCES = \ 7 | libc_wince.h \ 8 | env.c env.h \ 9 | errno.c errno.h \ 10 | fileops.c fileops.h 11 | 12 | else 13 | 14 | libc_wince_a_SOURCES = dummy.c 15 | 16 | endif 17 | 18 | -------------------------------------------------------------------------------- /trunk/wince/README: -------------------------------------------------------------------------------- 1 | Windows CE is a horribly crippled operating system. The poor thing doesn't 2 | even include a complete implementation of the ANSI standard C library. This 3 | is a mini-library called libc_wince that implements some of the missing 4 | library functions. I've only implemented those necessary to get Chocolate 5 | Doom to compile. 6 | 7 | On non-Windows CE platforms it is just built as an empty library. 8 | 9 | -------------------------------------------------------------------------------- /trunk/wince/dummy.c: -------------------------------------------------------------------------------- 1 | 2 | // Dummy source file so that the Windows CE workaround library is 3 | // not empty. Some platforms don't like empty libraries. 4 | 5 | void DummyWindowsCEFunction(void) 6 | { 7 | } 8 | 9 | -------------------------------------------------------------------------------- /trunk/wince/env.c: -------------------------------------------------------------------------------- 1 | // 2 | // "Extension" implementation of getenv for Windows CE. 3 | // 4 | // I (Simon Howard) release this file to the public domain. 5 | // 6 | 7 | #include 8 | #include 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | #include "env.h" 16 | 17 | static void WCharToChar(wchar_t *src, char *dest, int buf_len) 18 | { 19 | unsigned int len; 20 | 21 | len = wcslen(src) + 1; 22 | 23 | WideCharToMultiByte(CP_OEMCP, 0, src, len, dest, buf_len, NULL, NULL); 24 | } 25 | 26 | static void SetEnvironment(char *env_string, wchar_t *wvalue) 27 | { 28 | char value[MAX_PATH + 10]; 29 | int env_len; 30 | 31 | // Construct the string for putenv: NAME=value 32 | 33 | env_len = strlen(env_string); 34 | strcpy(value, env_string); 35 | 36 | WCharToChar(wvalue, value + env_len, sizeof(value) - env_len); 37 | 38 | // Set the environment variable: 39 | 40 | putenv(value); 41 | } 42 | 43 | static int ReadOwnerName(wchar_t *value, DWORD len) 44 | { 45 | HKEY key; 46 | DWORD valtype; 47 | 48 | if (RegOpenKeyExW(HKEY_CURRENT_USER, 49 | L"\\ControlPanel\\Owner", 0, 50 | KEY_READ, &key) != ERROR_SUCCESS) 51 | { 52 | return 0; 53 | } 54 | 55 | valtype = REG_SZ; 56 | 57 | if (RegQueryValueExW(key, L"Name", NULL, &valtype, 58 | (LPBYTE) value, &len) != ERROR_SUCCESS) 59 | { 60 | return 0; 61 | } 62 | 63 | // Close the key 64 | 65 | RegCloseKey(key); 66 | 67 | return 1; 68 | } 69 | 70 | void PopulateEnvironment(void) 71 | { 72 | wchar_t temp[MAX_PATH]; 73 | 74 | // Username: 75 | 76 | if (ReadOwnerName(temp, MAX_PATH)) 77 | { 78 | SetEnvironment("USER=", temp); 79 | SetEnvironment("USERNAME=", temp); 80 | } 81 | 82 | // Temp dir: 83 | 84 | GetTempPathW(MAX_PATH, temp); 85 | SetEnvironment("TEMP=", temp); 86 | 87 | // Use My Documents dir as home: 88 | 89 | SHGetSpecialFolderPath(NULL, temp, CSIDL_PERSONAL, 0); 90 | SetEnvironment("HOME=", temp); 91 | } 92 | 93 | -------------------------------------------------------------------------------- /trunk/wince/env.h: -------------------------------------------------------------------------------- 1 | // 2 | // "Extension" implementation of getenv for Windows CE. 3 | // 4 | // I (Simon Howard) release this file to the public domain. 5 | // 6 | 7 | #ifndef WINCE_ENV_H 8 | #define WINCE_ENV_H 9 | 10 | // SDL provides an implementation of getenv/putenv: 11 | 12 | #include "SDL_getenv.h" 13 | 14 | #ifndef getenv 15 | #define getenv SDL_getenv 16 | #endif 17 | #ifndef putenv 18 | #define putenv SDL_putenv 19 | #endif 20 | 21 | extern void PopulateEnvironment(void); 22 | 23 | #endif /* #ifndef WINCE_ENV_H */ 24 | 25 | -------------------------------------------------------------------------------- /trunk/wince/errno.c: -------------------------------------------------------------------------------- 1 | // 2 | // "Extension" implementation of errno.h for Windows CE. 3 | // 4 | // I (Simon Howard) release this file to the public domain. 5 | // 6 | 7 | #include 8 | 9 | #include "errno.h" 10 | 11 | // This should really be a thread-local variable. Oh well. 12 | 13 | static int my_errno; 14 | 15 | int *_GetErrno() 16 | { 17 | my_errno = GetLastError(); 18 | return &my_errno; 19 | } 20 | 21 | -------------------------------------------------------------------------------- /trunk/wince/errno.h: -------------------------------------------------------------------------------- 1 | // 2 | // "Extension" implementation of errno.h for Windows CE. 3 | // 4 | // I (Simon Howard) release this file to the public domain. 5 | // 6 | 7 | #ifndef WINCE_ERRNO_H 8 | #define WINCE_ERRNO_H 9 | 10 | #define EISDIR 21 /* Is a directory */ 11 | 12 | extern int *_GetErrno(); 13 | 14 | #define errno (*_GetErrno()) 15 | 16 | #endif /* #ifndef WINCE_ERROR_H */ 17 | 18 | -------------------------------------------------------------------------------- /trunk/wince/fileops.c: -------------------------------------------------------------------------------- 1 | // 2 | // "Extension" implementation of ANSI C file functions for Windows CE. 3 | // 4 | // I (Simon Howard) release this file to the public domain. 5 | // 6 | 7 | #include 8 | #include 9 | #include 10 | 11 | #include 12 | 13 | #include "fileops.h" 14 | 15 | int remove(const char *pathname) 16 | { 17 | wchar_t temp[MAX_PATH + 1]; 18 | 19 | MultiByteToWideChar(CP_OEMCP, 20 | 0, 21 | pathname, 22 | strlen(pathname) + 1, 23 | temp, 24 | MAX_PATH); 25 | 26 | return DeleteFileW(temp) != 0; 27 | } 28 | 29 | int rename(const char *oldpath, const char *newpath) 30 | { 31 | wchar_t oldpath1[MAX_PATH + 1]; 32 | wchar_t newpath1[MAX_PATH + 1]; 33 | 34 | MultiByteToWideChar(CP_OEMCP, 35 | 0, 36 | oldpath, 37 | strlen(oldpath) + 1, 38 | oldpath1, 39 | MAX_PATH); 40 | MultiByteToWideChar(CP_OEMCP, 41 | 0, 42 | newpath, 43 | strlen(newpath) + 1, 44 | newpath1, 45 | MAX_PATH); 46 | 47 | return MoveFileW(oldpath1, newpath1); 48 | } 49 | 50 | -------------------------------------------------------------------------------- /trunk/wince/fileops.h: -------------------------------------------------------------------------------- 1 | // 2 | // "Extension" implementation of ANSI C file functions for Windows CE. 3 | // 4 | // I (Simon Howard) release this file to the public domain. 5 | // 6 | 7 | #ifndef WINCE_FILEOPS_H 8 | #define WINCE_FILEOPS_H 9 | 10 | int remove(const char *pathname); 11 | int rename(const char *oldpath, const char *newpath); 12 | 13 | #endif /* #ifndef WINCE_FILEOPS_H */ 14 | 15 | -------------------------------------------------------------------------------- /trunk/wince/libc_wince.h: -------------------------------------------------------------------------------- 1 | 2 | #include "env.h" 3 | #include "fileops.h" 4 | 5 | --------------------------------------------------------------------------------