Initial commit

main
lantus360 5 years ago
commit b3ff23fd48
  1. 2
      .gitattributes
  2. 101
      .github/CONTRIBUTING.md
  3. 28
      .github/ISSUE_TEMPLATE.md
  4. 54
      .gitignore
  5. 32
      .lvimrc
  6. 10
      .travis.sh
  7. 30
      .travis.yml
  8. 6
      AUTHORS
  9. 70
      CMakeLists.txt
  10. 74
      CODE_OF_CONDUCT.md
  11. 361
      COPYING.md
  12. 5
      ChangeLog
  13. 219
      HACKING.md
  14. 78
      Makefile.am
  15. 416
      Makefile.doom
  16. 379
      Makefile.heretic
  17. 1308
      NEWS.md
  18. 149
      NOT-BUGS.md
  19. 214
      PHILOSOPHY.md
  20. 173
      README.Music.md
  21. 124
      README.Strife.md
  22. 104
      README.md
  23. 36
      TODO.md
  24. 4
      autogen.sh
  25. 97
      cmake/FindSDL2.cmake
  26. 88
      cmake/FindSDL2_mixer.cmake
  27. 88
      cmake/FindSDL2_net.cmake
  28. 36
      cmake/Findm.cmake
  29. 67
      cmake/Findsamplerate.cmake
  30. 10
      cmake/config.h.cin
  31. 4
      codeblocks/README
  32. 32
      codeblocks/chocolate.workspace
  33. 521
      codeblocks/doom.cbp
  34. 26
      codeblocks/game-res.rc
  35. 455
      codeblocks/heretic.cbp
  36. 451
      codeblocks/hexen.cbp
  37. 83
      codeblocks/libopl.cbp
  38. 64
      codeblocks/libpcsound.cbp
  39. 137
      codeblocks/libtextscreen.cbp
  40. 113
      codeblocks/server.cbp
  41. 26
      codeblocks/setup-res.rc
  42. 196
      codeblocks/setup.cbp
  43. 523
      codeblocks/strife.cbp
  44. 200
      configure.ac
  45. 4
      data/.gitignore
  46. 22
      data/Makefile.am
  47. 16
      data/README
  48. 72
      data/convert-icon
  49. BIN
      data/doom.ico
  50. BIN
      data/doom8.ico
  51. BIN
      data/setup.ico
  52. BIN
      data/setup.png
  53. BIN
      data/setup8.ico
  54. BIN
      doom.jpg
  55. BIN
      exefs/main
  56. BIN
      heretic.jpg
  57. 12
      man/.gitignore
  58. 8
      man/CMDLINE.template
  59. 282
      man/INSTALL.template
  60. 195
      man/Makefile.am
  61. 5
      man/bash-completion/.gitignore
  62. 52
      man/bash-completion/Makefile.am
  63. 51
      man/bash-completion/doom.template.in
  64. 48
      man/bash-completion/heretic.template.in
  65. 42
      man/bash-completion/hexen.template.in
  66. 48
      man/bash-completion/strife.template.in
  67. 55
      man/default.cfg.template
  68. 562
      man/docgen
  69. 43
      man/doom.template
  70. 22
      man/environ.man
  71. 32
      man/extra.cfg.template
  72. 45
      man/heretic.template
  73. 45
      man/hexen.template
  74. 48
      man/iwad_paths.man
  75. 52
      man/server.template
  76. 42
      man/setup.template
  77. 228
      man/simplecpp
  78. 85
      man/strife.template
  79. 7
      man/wikipages
  80. 6
      midiproc/.gitignore
  81. 6
      midiproc/CMakeLists.txt
  82. 13
      midiproc/Makefile.am
  83. 253
      midiproc/buffer.c
  84. 54
      midiproc/buffer.h
  85. 467
      midiproc/main.c
  86. 31
      midiproc/proto.h
  87. 7
      opl/.gitignore
  88. 15
      opl/CMakeLists.txt
  89. 21
      opl/Makefile.am
  90. 7
      opl/examples/.gitignore
  91. 8
      opl/examples/Makefile.am
  92. 210
      opl/examples/droplay.c
  93. 355
      opl/ioperm_sys.c
  94. 28
      opl/ioperm_sys.h
  95. 523
      opl/opl.c
  96. 153
      opl/opl.h
  97. 1377
      opl/opl3.c
  98. 150
      opl/opl3.h
  99. 58
      opl/opl_internal.h
  100. 103
      opl/opl_linux.c
  101. Some files were not shown because too many files have changed in this diff Show More

2
.gitattributes vendored

@ -0,0 +1,2 @@
# Auto detect text files and perform LF normalization
* text=auto

@ -0,0 +1,101 @@
Thanks for contributing to Chocolate Doom! Whatever your contribution,
whether it's code or just a bug report, it's greatly appreciated.
The project is governed by the
[Contributor Covenant](http://contributor-covenant.org/version/1/4/)
version 1.4. By contributing to the project you agree to abide by its
terms. To report violations, please send an email to fraggle@gmail.com.
### Reporting bugs
Before reporting a bug, it's worth checking if this really is a bug.
Chocolate Doom's mission is to reproduce the Vanilla (DOS) versions of
the Doom engine games, bugs and all. Check out the
[NOT-BUGS](../NOT-BUGS.md) file for a list of common issues which aren't
really bugs at all. You might also try searching [the GitHub issues
list](https://github.com/chocolate-doom/chocolate-doom/issues) to see
if your bug has already been reported.
If you're confident that you've found a real bug (or even if you're
not sure!) please go ahead and [file an issue on
GitHub](https://github.com/chocolate-doom/chocolate-doom/issues/new).
You'll need a GitHub account, but it's pretty easy to sign up.
Please try to give as much information as possible:
* What version of Chocolate Doom are you using? Check the title bar of
the window for the version number.
* Chocolate Doom runs on many different operating systems (not just
Windows!). Please say which operating system and what version of it
you're using.
* Please say which game you're playing (Doom 1, Doom 2, Heretic,
Hexen, Strife, etc.) and if you're using any fan-made WADs or mods,
please say which mods (and where they can be downloaded!). It helps
to give the full command line you're using to start the game.
* Please mention if you have any special configuration you think may be
relevant, too.
### Feature requests
Chocolate Doom is always open to new feature requests; however, please
be aware that the project is designed around a deliberately limited
[philosophy](../PHILOSOPHY.md), and many features common in other source
ports will not be accepted. Here are a few common requests which are
often rejected:
* "High resolution" rendering (greater than 320x200 display).
* An option to disable Vanilla limits, such as the visplane rendering
limit.
* Ability to play "No Rest For The Living", the expansion pack which
comes with the XBLA / BFG Edition of Doom.
If you're not sure whether your feature is in line with the project
philosophy, don't worry - just ask anyway!
To make a feature request, [file an issue on
GitHub](https://github.com/chocolate-doom/chocolate-doom/issues/new).
### Bug fixes / code submission
Thank you for contributing code to Chocolate Doom! Please check the
following guidelines before opening a pull request:
* All code must be licensed under [the GNU General Public License,
version 2](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html).
Please don't reuse code that isn't GPL, or that is GPLv3 licensed.
Be aware that by submitting your code to the project, you're agreeing
to license it under the GPL.
* Please follow the coding style guidelines described in the
[HACKING](../HACKING.md) file.
* Please don't make unnecessary changes which just change formatting
without any actual change to program logic. While being consistent
is nice, such changes destroy the ability to use the `git blame`
command to see when code was last changed.
* The guidelines given above in the "feature requests" section also
apply here. New features which aren't in line with the project
philosophy are likely to be rejected. If you're not sure, open a
feature request first and ask before you start implementing your
feature.
* Follow the guidelines for [how to write a Git commit
message](http://chris.beams.io/posts/git-commit/). In short: the
first line should be a short summary; keep to an 80 column limit;
use the imperative mood ("fix bug X", rather than "fixed bug X" or
"fixing bug X"). If your change fixes a particular subsystem,
prefix the summary with that subsystem: eg. "doom: Fix bug X" or
"textscreen: Change size of X".
* If you're making a change related to a bug, reference the GitHub
issue number in the commit message, eg. "This is a partial fix
for #646". This will link your commit into the issue comments. If
your change is a fix for the bug, put the word "fixes" before the
issue number to automatically close the issue once your change
is merged.

@ -0,0 +1,28 @@
<!--
Thank you for reporting a bug in Chocolate Doom. Please complete
the following template so that we can better diagnose the source
of your problem.
To save yourself some time, you may want to check the FAQ and the
NOT-BUGS list for solutions to some common problems:
https://www.chocolate-doom.org/wiki/index.php/FAQ
https://www.chocolate-doom.org/not-bugs
-->
### Background
Version of Chocolate Doom:
Operating System and version:
Game: (Doom/Heretic/Hexen/Strife/other)
Any loaded WADs and mods (please include full command line):
### Bug description
Observed behavior:
Expected behavior:

54
.gitignore vendored

@ -0,0 +1,54 @@
CMDLINE
INSTALL
Makefile
Makefile.in
TAGS
aclocal.m4
autom4te.cache
autotools
bin
config.h
config.hin
config.log
config.status
configure
lib
obj
rpm.spec
stamp-h
stamp-h.in
stamp-h1
tags
\#*\#
DOOM*.png
HTIC*.png
HEXEN*.png
STRIFE*.png
DOOM*.pcx
HTIC*.pcx
HEXEN*.pcx
STRIFE*.pcx
/build*
# These are the default patterns globally ignored by Subversion:
*.o
*.lo
*.la
*.al
.libs
*.so
*.so.[0-9]*
*.a
*.pyc
*.pyo
*.rej
*~
.#*
.*.swp
.DS_store
# Ignore GNU Global tags and html files
GPATH
GRTAGS
GTAGS
/HTML/

@ -0,0 +1,32 @@
" Local vimrc configuration file. Install the localvimrc.vim vim script.
set expandtab
set tabstop=8
set softtabstop=4
set shiftwidth=4
" Add all tag files to tags path.
let topdir = findfile("configure.in", ".;")
let topdir = substitute(topdir, "configure.in", "", "")
" Check tags file in current dir:
set tags+=tags
" Add tag files in parent directories:
let tagfiles = findfile("tags", ".;", -1)
" Add tag files for libraries:
call add(tagfiles, topdir . "opl/tags")
call add(tagfiles, topdir . "pcsound/tags")
call add(tagfiles, topdir . "textscreen/tags")
for tagfile in tagfiles
" Don't go beyond the project top level when adding parent dirs:
if stridx(tagfile, topdir) >= 0
exec "set tags+=" . tagfile
endif
endfor
unlet topdir
unlet tagfiles

@ -0,0 +1,10 @@
#!/bin/sh
set -e
if [ "$ANALYZE" = "true" ] ; then
cppcheck --error-exitcode=1 -j2 -UTESTING -Iopl -Isrc -Isrc/setup opl pcsound src textscreen > /dev/null
else
./autogen.sh --enable-werror
make
make install DESTDIR=/tmp/whatever
make dist
fi

@ -0,0 +1,30 @@
language: c
compiler: gcc
# Travis uses Ubuntu 12.04 (Precise) for builds by default, which is too
# old and missing the SDL2 packages, so use Trusty instead.
sudo: required
dist: trusty
env:
- ANALYZE=false
- ANALYZE=true
addons:
apt:
packages:
- cppcheck
- libsdl2-dev
- libsdl2-mixer-dev
- libsdl2-net-dev
- libsdl2-image-dev
- libsamplerate0-dev
script: ./.travis.sh
branches:
only:
- master
- sdl2-branch

@ -0,0 +1,6 @@
Simon Howard <fraggle@gmail.com>
James Haley <haleyjd@hotmail.com>
Samuel Villarreal <svkaiser@gmail.com>
Fabian Greffrath <fabian@greffrath.com>
Jonathan Dowland <jon@dow.land>
Alexey Khokholov <alexeytf2@gmail.com>

@ -0,0 +1,70 @@
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
cmake_minimum_required(VERSION 3.7.2)
project("Chocolate Doom" VERSION 3.0.0 LANGUAGES C)
# Autotools variables
set(top_srcdir ${CMAKE_CURRENT_SOURCE_DIR})
set(top_builddir ${CMAKE_CURRENT_BINARY_DIR})
# AC_INIT variables
set(PACKAGE_NAME "${PROJECT_NAME}")
set(PACKAGE_TARNAME "chocolate-doom")
set(PACKAGE_VERSION "${PROJECT_VERSION}")
set(PACKAGE_STRING "${PROJECT_NAME} ${PROJECT_VERSION}")
set(PACKAGE_BUGREPORT "chocolate-doom-dev-list@chocolate-doom.org")
string(REGEX REPLACE " Doom$" "" PACKAGE_SHORTNAME "${PACKAGE_NAME}")
set(PACKAGE_COPYRIGHT "Copyright (C) 1993-2017")
set(PACKAGE_LICENSE "GNU General Public License, version 2")
# Any settings that should apply to all targets in this directory and all
# subdirectories should go here. Use judiciously.
if(MSVC)
add_definitions("/D_CRT_SECURE_NO_WARNINGS" "/D_CRT_SECURE_NO_DEPRECATE"
"/D_CRT_NONSTDC_NO_DEPRECATE")
else()
add_compile_options("-Wall" "-Wdeclaration-after-statement"
"-Wredundant-decls")
endif()
find_package(SDL2 2.0.1)
find_package(SDL2_mixer 2.0.0)
find_package(SDL2_net 2.0.0)
# Check for libsamplerate.
find_package(samplerate)
if(SAMPLERATE_FOUND)
set(HAVE_LIBSAMPLERATE TRUE)
endif()
# Check for libpng.
find_package(PNG)
if(PNG_FOUND)
set(HAVE_LIBPNG TRUE)
endif()
find_package(m)
include(CheckSymbolExists)
check_symbol_exists(strcasecmp "strings.h" HAVE_DECL_STRCASECMP)
check_symbol_exists(strncasecmp "strings.h" HAVE_DECL_STRNCASECMP)
string(CONCAT WINDOWS_RC_VERSION "${PROJECT_VERSION_MAJOR}, "
"${PROJECT_VERSION_MINOR}, ${PROJECT_VERSION_PATCH}, 0")
# Without a hyphen. This is used for the bash-completion scripts.
string(TOLOWER "${PACKAGE_SHORTNAME}" PROGRAM_SPREFIX)
# With a hyphen, used almost everywhere else.
set(PROGRAM_PREFIX "${PROGRAM_SPREFIX}-")
configure_file(cmake/config.h.cin config.h)
configure_file(src/resource.rc.in src/resource.rc)
configure_file(src/setup-res.rc.in src/setup-res.rc)
configure_file(src/setup/setup-manifest.xml.in src/setup/setup-manifest.xml)
foreach(SUBDIR textscreen midiproc opl pcsound src)
add_subdirectory("${SUBDIR}")
endforeach()

@ -0,0 +1,74 @@
# Contributor Covenant Code of Conduct
## Our Pledge
In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, gender identity and expression, level of experience,
nationality, personal appearance, race, religion, or sexual identity and
orientation.
## Our Standards
Examples of behavior that contributes to creating a positive environment
include:
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.
## Scope
This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at fraggle@gmail.com. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at [http://contributor-covenant.org/version/1/4][version]
[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/

@ -0,0 +1,361 @@
### GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
### Preamble
The licenses for most software are designed to take away your freedom
to share and change it. By contrast, the GNU General Public License is
intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if
you distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on,
we want its recipients to know that what they have is not the
original, so that any problems introduced by others will not reflect
on the original authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at
all.
The precise terms and conditions for copying, distribution and
modification follow.
### TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
**0.** This License applies to any program or other work which
contains a notice placed by the copyright holder saying it may be
distributed under the terms of this General Public License. The
"Program", below, refers to any such program or work, and a "work
based on the Program" means either the Program or any derivative work
under copyright law: that is to say, a work containing the Program or
a portion of it, either verbatim or with modifications and/or
translated into another language. (Hereinafter, translation is
included without limitation in the term "modification".) Each licensee
is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the Program
(independent of having been made by running the Program). Whether that
is true depends on what the Program does.
**1.** You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a
fee.
**2.** You may modify your copy or copies of the Program or any
portion of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
**a)** You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
**b)** You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any part
thereof, to be licensed as a whole at no charge to all third parties
under the terms of this License.
**c)** If the modified program normally reads commands interactively
when run, you must cause it, when started running for such interactive
use in the most ordinary way, to print or display an announcement
including an appropriate copyright notice and a notice that there is
no warranty (or else, saying that you provide a warranty) and that
users may redistribute the program under these conditions, and telling
the user how to view a copy of this License. (Exception: if the
Program itself is interactive but does not normally print such an
announcement, your work based on the Program is not required to print
an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote
it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
**3.** You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
**a)** Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections 1
and 2 above on a medium customarily used for software interchange; or,
**b)** Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your cost of
physically performing source distribution, a complete machine-readable
copy of the corresponding source code, to be distributed under the
terms of Sections 1 and 2 above on a medium customarily used for
software interchange; or,
**c)** Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is allowed
only for noncommercial distribution and only if you received the
program in object code or executable form with such an offer, in
accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
**4.** You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt otherwise
to copy, modify, sublicense or distribute the Program is void, and
will automatically terminate your rights under this License. However,
parties who have received copies, or rights, from you under this
License will not have their licenses terminated so long as such
parties remain in full compliance.
**5.** You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
**6.** Each time you redistribute the Program (or any work based on
the Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
**7.** If, as a consequence of a court judgment or allegation of
patent infringement or for any other reason (not limited to patent
issues), conditions are imposed on you (whether by court order,
agreement or otherwise) that contradict the conditions of this
License, they do not excuse you from the conditions of this License.
If you cannot distribute so as to satisfy simultaneously your
obligations under this License and any other pertinent obligations,
then as a consequence you may not distribute the Program at all. For
example, if a patent license would not permit royalty-free
redistribution of the Program by all those who receive copies directly
or indirectly through you, then the only way you could satisfy both it
and this License would be to refrain entirely from distribution of the
Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
**8.** If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
**9.** The Free Software Foundation may publish revised and/or new
versions of the General Public License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and
"any later version", you have the option of following the terms and
conditions either of that version or of any later version published by
the Free Software Foundation. If the Program does not specify a
version number of this License, you may choose any version ever
published by the Free Software Foundation.
**10.** If you wish to incorporate parts of the Program into other
free programs whose distribution conditions are different, write to
the author to ask for permission. For software which is copyrighted by
the Free Software Foundation, write to the Free Software Foundation;
we sometimes make exceptions for this. Our decision will be guided by
the two goals of preserving the free status of all derivatives of our
free software and of promoting the sharing and reuse of software
generally.
**NO WARRANTY**
**11.** BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
**12.** IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
### END OF TERMS AND CONDITIONS
### How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these
terms.
To do so, attach the following notices to the program. It is safest to
attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
one line to give the program's name and an idea of what it does.
Copyright (C) yyyy name of author
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Also add information on how to contact you by electronic and paper
mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details
type `show w'. This is free software, and you are welcome
to redistribute it under certain conditions; type `show c'
for details.
The hypothetical commands \`show w' and \`show c' should show the
appropriate parts of the General Public License. Of course, the
commands you use may be called something other than \`show w' and
\`show c'; they could even be mouse-clicks or menu items--whatever
suits your program.
You should also get your employer (if you work as a programmer) or
your school, if any, to sign a "copyright disclaimer" for the program,
if necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright
interest in the program `Gnomovision'
(which makes passes at compilers) written
by James Hacker.
signature of Ty Coon, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library,
you may consider it more useful to permit linking proprietary
applications with the library. If this is what you want to do, use the
[GNU Lesser General Public
License](https://www.gnu.org/licenses/lgpl.html) instead of this
License.

@ -0,0 +1,5 @@
Chocolate Doom's version history is stored in Git. For a full
change log, clone the repository on Github:
https://github.com/chocolate-doom/chocolate-doom

@ -0,0 +1,219 @@
# Coding style guidelines
The coding style guidelines for Chocolate Doom are designed to keep the
style of the original source code. This maintains consistency throughout
the program, and does not require the original code to be changed. Some
of these guidelines are stricter than what was done in the original
source; follow these when writing new code only: there is no need to
change existing code to fit them.
You should set tabs to *display* as eight spaces, not four. However,
*indentation* should be four spaces. If possible, do not use tab
characters at all. There is a utility called โ€œexpandโ€ which will remove
tab characters. For the reasoning behind this, see:
http://www.jwz.org/doc/tabs-vs-spaces.html
Please write code to an 80 column limit so that it fits within a standard
80 column terminal. Do not leave trailing whitespace at the end of lines.
Functions should be named like this: `AB_FunctionName`. The `AB` prefix
denotes the subsystem (`AM_` for automap, `G_` for game, etc). If a
function is static, you can omit the prefix and just name it like
`FunctionName`. Functions and global variables should always be made
static if possible.
Put `_t` on the end of types created with typedef. Type names like this
should be all lowercase and have the subsystem name at the start. An
example of this is `txt_window_t`. When creating structures, always
typedef them.
Do not use Hungarian notation.
Do not use the goto statement.
Use C++-style comments, ie. `//` comments, not `/* ... */` comments.
I donโ€™t care that this isnโ€™t standard ANSI C.
Variables should be named like this: `my_variable_name`, not like this:
`MyVariableName`. In pointer variable declarations, place the `*` next
to the variable name, not the type.
When casting variables from one type to another, put a space after the
last closing brace.
When using an if, do, while, or for statement, always use the { } braces
even when they are not necessary. For example, do this:
```c
if (condition)
{
body;
}
```
Not this:
```c
if (condition) // NO
body;
```
Write code like this:
```c
typedef struct
{
int member1;
char *member2;
} my_structure_t;
void FunctionName(int argument, int arg2, int arg3, int arg4, int arg5,
int arg6, int arg7)
{
int assign_var;
assign_var = arg2 + arg3 * arg4 * (arg5 + arg6);
if (foo && !bar || baz && qux || !(foo && bar && baz))
{
body;
}
else if (xyz + 4 < abc * 4 + 3)
{
body;
}
else
{
body;
}
if (very_long_condition_like_this_one_that_forces_a_line_break
&& other_condition)
{
body;
}
switch (argument)
{
case FIRST:
code;
break;
case SECOND:
code;
break;
default:
break;
}
for (a = 0; a < 10; ++a)
{
FunctionCall(arg1, arg2, arg3, arg4,
arg_split_onto_second_line);
}
while (a < 10)
{
loop_body;
}
do
{
} while (condition);
}
```
## Security
The C standard library has a number of unsafe functions that should be
avoided when writing code for Chocolate Doom. These are:
Unsafe function | Safer alternative
------------------|------------------------
`gets()` | `fgets(.., stdin)`
`sprintf` | `M_snprintf()`
`snprintf` | `M_snprintf()`
`vsprintf` | `M_vsnprintf()`
`vsnprintf` | `M_vsnprintf()`
`strcpy()` | `M_StringCopy()`
`strncpy()` | `M_StringCopy()`
`strcat()` | `M_StringConcat()`
`strncat()` | `M_StringConcat()`
`strdup()` | `M_StringDuplicate()`
`realloc()` | `I_Realloc()`
Lots of the code includes calls to DEH_String() to simulate string
replacement by the Dehacked tool. Be careful when using Dehacked
replacements of printf format strings. For example, do not do this:
```c
printf(DEH_String("foo %s"), s);
sprintf(mybuf, DEH_String("bar %s"), t);
```
Instead do this:
```c
DEH_printf("foo %s", s);
DEH_snprintf(mybuf, sizeof(mybuf), "bar %s", t);
```
This does the format string replacement safely in a way that checks
the arguments securely.
## Portability
Chocolate Doom is designed to be cross-platform and work on different
Operating Systems and processors. Bear this in mind when writing code.
Do not use the `long` type (its size differs across platforms; use
`int` or `int64_t` depending on which you want).
Use Doomโ€™s byte data type for byte data. `int` is assumed to be a
32-bit integer, and `short` is a 16-bit integer. You can also use the
ISO C99 data types: `intN_t` and `uintN_t` where N is 8, 16, 32, 64.
Be careful with platform dependencies: do not use Windows API
functions, for example. Use SDL where possible.
Preprocessor `#defines` are set that can be used to identify the OS
if necessary: `_WIN32` for Windows and `__MACOSX__` for Mac OS X. Others
are set through SDL. Try to avoid this if possible.
Be careful of endianness! Doom has `SHORT()` and `LONG()` macros that
do endianness conversion. Never assume that integer types have a
particular byte ordering. Similarly, never assume that fields
inside a structure are aligned in a particular way. This is most
relevant when reading or writing data to a file or a network pipe.
For signed integers, you shouldnโ€™t assume that `(i >> n)` is the same as
`(i / (1 << n))`. However, most processors handle bitshifts of signed
integers properly, so itโ€™s not a huge problem.
## GNU GPL and licensing
All code submitted to the project must be licensed under the GNU GPLv2 or a
compatible license. If you use code that you havenโ€™t 100% written
yourself, say so. Add a copyright header to the start of every file. Use
this template:
```
//
// Copyright(C) YEAR Author's name
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
//
// *File description goes here*
//
```

@ -0,0 +1,78 @@
AUX_DIST_GEN = \
$(ac_aux_dir)/install-sh \
$(ac_aux_dir)/missing
CMAKE_FILES= \
CMakeLists.txt \
cmake/FindSDL2.cmake \
cmake/FindSDL2_mixer.cmake \
cmake/FindSDL2_net.cmake \
cmake/Findm.cmake \
cmake/Findsamplerate.cmake \
cmake/config.h.cin
CODEBLOCKS_FILES= \
codeblocks/chocolate.workspace \
codeblocks/config.h \
codeblocks/doom.cbp \
codeblocks/game-res.rc \
codeblocks/heretic.cbp \
codeblocks/hexen.cbp \
codeblocks/strife.cbp \
codeblocks/libopl.cbp \
codeblocks/libpcsound.cbp \
codeblocks/libtextscreen.cbp \
codeblocks/README \
codeblocks/server.cbp \
codeblocks/setup.cbp \
codeblocks/setup-res.rc
DOC_FILES= \
COPYING.md \
README.md \
README.Music.md \
NEWS.md \
PHILOSOPHY.md \
ChangeLog
EXTRA_DIST= \
$(AUX_DIST_GEN) \
$(CMAKE_FILES) \
$(CODEBLOCKS_FILES) \
$(DOC_FILES) \
NOT-BUGS.md \
README.Strife.md \
.lvimrc \
HACKING.md \
TODO.md \
rpm.spec \
win32/win_opendir.c \
win32/win_opendir.h
doomdocsdir = ${docdir}/../${PROGRAM_PREFIX}doom
doomdocs_DATA = $(DOC_FILES) NOT-BUGS.md
hereticdocsdir = ${docdir}/../${PROGRAM_PREFIX}heretic
hereticdocs_DATA = $(DOC_FILES)
hexendocsdir = ${docdir}/../${PROGRAM_PREFIX}hexen
hexendocs_DATA = $(DOC_FILES)
strifedocsdir = ${docdir}/../${PROGRAM_PREFIX}strife
strifedocs_DATA = $(DOC_FILES) README.Strife.md
MAINTAINERCLEANFILES = $(AUX_DIST_GEN)
SUBDIRS=textscreen midiproc opl pcsound data src man
DIST_SUBDIRS=pkg $(SUBDIRS)
if HAVE_PYTHON
INSTALL : man/INSTALL.template man/simplecpp
./man/simplecpp -DDOOM -DHERETIC -DHEXEN -DSTRIFE \
-DLONG_GAME_NAME="@PACKAGE_SHORTNAME@ Doom" \
-DLONG_EXE_NAME="@PROGRAM_PREFIX@doom" \
< man/INSTALL.template > $@
endif

@ -0,0 +1,416 @@
# Project: Doom
ifeq ($(strip $(DEVKITPRO)),)
$(error "Please set DEVKITPRO in your environment. export DEVKITPRO=<path to>/devkitpro")
endif
TOPDIR ?= $(CURDIR)
include $(DEVKITPRO)/libnx/switch_rules
export BUILD_EXEFS_SRC := build/exefs
APP_TITLE := Chocolate-Doom
APP_DESCRIPTION := Chocolate-Doom
APP_AUTHOR := MVG
APP_VERSION := 1.0.0
ICON := Doom.jpg
CC = aarch64-none-elf-gcc
LINKOBJ = obj/deh_str.o obj/d_event.o obj/d_iwad.o obj/i_endoom.o obj/i_joystick.o obj/i_main.o obj/i_system.o obj/i_timer.o obj/i_video.o obj/icon.o obj/m_argv.o obj/m_bbox.o obj/m_cheat.o obj/m_config.o obj/m_controls.o obj/m_fixed.o obj/m_misc.o obj/memio.o obj/mus2mid.o obj/net_common.o obj/net_io.o obj/net_loop.o obj/net_packet.o obj/net_query.o obj/net_structrw.o obj/tables.o obj/v_video.o obj/w_checksum.o obj/w_file.o obj/w_file_stdc.o obj/w_main.o obj/w_merge.o obj/w_wad.o obj/z_zone.o obj/d_mode.o obj/am_map.o obj/d_main.o obj/d_net.o obj/f_finale.o obj/g_game.o obj/info.o obj/m_random.o obj/m_menu.o obj/p_ceilng.o obj/p_doors.o obj/p_enemy.o obj/p_floor.o obj/p_inter.o obj/p_lights.o obj/p_map.o obj/p_maputl.o obj/p_mobj.o obj/p_plats.o obj/p_pspr.o obj/p_setup.o obj/p_sight.o obj/p_spec.o obj/p_switch.o obj/p_telept.o obj/p_tick.o obj/p_user.o obj/r_data.o obj/r_draw.o obj/r_main.o obj/r_plane.o obj/r_things.o obj/s_sound.o obj/sounds.o obj/i_sound.o obj/p_saveg.o obj/r_bsp.o obj/r_segs.o obj/d_loop.o obj/net_client.o obj/net_server.o obj/net_sdl.o obj/deh_main.o obj/deh_io.o obj/deh_ammo.o obj/deh_frame.o obj/deh_sound.o obj/deh_thing.o obj/deh_weapon.o obj/deh_mapping.o obj/sha1.o obj/i_sdlsound.o obj/i_input.o obj/i_sdlmusic.o obj/v_diskicon.o obj/doomstat.o obj/d_items.o obj/hu_stuff.o obj/hu_lib.o obj/r_sky.o obj/deh_doom.o obj/deh_misc.o obj/st_stuff.o obj/st_lib.o obj/f_wipe.o obj/deh_cheat.o obj/deh_ptr.o obj/deh_text.o obj/dstrings.o obj/wi_stuff.o obj/statdump.o obj/deh_bexstr.o
LIBS = -specs=$(DEVKITPRO)/libnx/switch.specs -g -march=armv8-a -mtune=cortex-a57 -mtp=soft -fPIE -L$(DEVKITPRO)/libnx/lib -L$(DEVKITPRO)/portlibs/switch/lib -lSDL2_mixer -lvorbisfile -lvorbis -logg -lmodplug -lmpg123 -lSDL2 -lm -lstdc++ -lnx
INCS = -Isrc -Icodeblocks -Itextscreen -I$(DEVKITPRO)/portlibs/switch/include/SDL2 -I"src/main" -I$(DEVKITPRO)/libnx/include -I$(DEVKITPRO)/portlibs/switch/include
CXXINCS = -I$(DEVKITPRO)/portlibs/switch/include/SDL2 -I"src/main" -I$(DEVKITPRO)/libnx/include -I$(DEVKITPRO)/portlibs/switch/include
BUILD = build
BIN = release/doom.elf
BINDIR = release
CXXFLAGS = $(CXXINCS) $(DEFINES) -fsigned-char -march=armv8-a -mtune=cortex-a57 -mtp=soft -fPIE -fomit-frame-pointer -O2 -DSWITCH
CFLAGS = $(INCS) $(DEFINES) -fsigned-char -march=armv8-a -mtune=cortex-a57 -mtp=soft -fPIE -fomit-frame-pointer -O2 -DSWITCH
GPROF = gprof.exe
RM = rm -f
LINK = aarch64-none-elf-gcc
CPP = aarch64-none-elf-g++
OUTPUT = doom
ifeq ($(strip $(ICON)),)
icons := $(wildcard *.jpg)
ifneq (,$(findstring $(TARGET).jpg,$(icons)))
export APP_ICON := $(TOPDIR)/$(TARGET).jpg
else
ifneq (,$(findstring icon.jpg,$(icons)))
export APP_ICON := $(TOPDIR)/icon.jpg
endif
endif
else
export APP_ICON := $(TOPDIR)/$(ICON)
endif
ifeq ($(strip $(NO_ICON)),)
export NROFLAGS += --icon=$(APP_ICON)
endif
ifeq ($(strip $(NO_NACP)),)
export NROFLAGS += --nacp=$(BINDIR)/$(OUTPUT).nacp
endif
ifneq ($(APP_TITLEID),)
export NACPFLAGS += --titleid=$(APP_TITLEID)
endif
ifneq ($(ROMFS),)
export NROFLAGS += --romfsdir=$(CURDIR)/$(ROMFS)
endif
.PHONY: all all-before all-after clean clean-custom
all: all-before $(BIN) all-after
clean: clean-custom
$(RM) $(LINKOBJ) $(BIN)
$(BIN): $(LINKOBJ)
$(LINK) $(LINKOBJ) -o "release/doom.elf" $(LIBS)
obj/deh_str.o: $(GLOBALDEPS) src/deh_str.c
$(CC) -c src/deh_str.c -o obj/deh_str.o $(CFLAGS)
obj/d_event.o: $(GLOBALDEPS) src/d_event.c
$(CC) -c src/d_event.c -o obj/d_event.o $(CFLAGS)
obj/d_iwad.o: $(GLOBALDEPS) src/d_iwad.c
$(CC) -c src/d_iwad.c -o obj/d_iwad.o $(CFLAGS)
obj/i_endoom.o: $(GLOBALDEPS) src/i_endoom.c
$(CC) -c src/i_endoom.c -o obj/i_endoom.o $(CFLAGS)
obj/i_joystick.o: $(GLOBALDEPS) src/i_joystick.c
$(CC) -c src/i_joystick.c -o obj/i_joystick.o $(CFLAGS)
obj/i_main.o: $(GLOBALDEPS) src/i_main.c
$(CC) -c src/i_main.c -o obj/i_main.o $(CFLAGS)
obj/i_system.o: $(GLOBALDEPS) src/i_system.c
$(CC) -c src/i_system.c -o obj/i_system.o $(CFLAGS)
obj/i_timer.o: $(GLOBALDEPS) src/i_timer.c
$(CC) -c src/i_timer.c -o obj/i_timer.o $(CFLAGS)
obj/i_video.o: $(GLOBALDEPS) src/i_video.c
$(CC) -c src/i_video.c -o obj/i_video.o $(CFLAGS)
obj/icon.o: $(GLOBALDEPS) src/icon.c
$(CC) -c src/icon.c -o obj/icon.o $(CFLAGS)
obj/m_argv.o: $(GLOBALDEPS) src/m_argv.c
$(CC) -c src/m_argv.c -o obj/m_argv.o $(CFLAGS)
obj/m_bbox.o: $(GLOBALDEPS) src/m_bbox.c
$(CC) -c src/m_bbox.c -o obj/m_bbox.o $(CFLAGS)
obj/m_cheat.o: $(GLOBALDEPS) src/m_cheat.c
$(CC) -c src/m_cheat.c -o obj/m_cheat.o $(CFLAGS)
obj/m_config.o: $(GLOBALDEPS) src/m_config.c
$(CC) -c src/m_config.c -o obj/m_config.o $(CFLAGS)
obj/m_controls.o: $(GLOBALDEPS) src/m_controls.c
$(CC) -c src/m_controls.c -o obj/m_controls.o $(CFLAGS)
obj/m_fixed.o: $(GLOBALDEPS) src/m_fixed.c
$(CC) -c src/m_fixed.c -o obj/m_fixed.o $(CFLAGS)
obj/m_misc.o: $(GLOBALDEPS) src/m_misc.c
$(CC) -c src/m_misc.c -o obj/m_misc.o $(CFLAGS)
obj/memio.o: $(GLOBALDEPS) src/memio.c
$(CC) -c src/memio.c -o obj/memio.o $(CFLAGS)
obj/mus2mid.o: $(GLOBALDEPS) src/mus2mid.c
$(CC) -c src/mus2mid.c -o obj/mus2mid.o $(CFLAGS)
obj/net_common.o: $(GLOBALDEPS) src/net_common.c
$(CC) -c src/net_common.c -o obj/net_common.o $(CFLAGS)
obj/net_io.o: $(GLOBALDEPS) src/net_io.c
$(CC) -c src/net_io.c -o obj/net_io.o $(CFLAGS)
obj/net_loop.o: $(GLOBALDEPS) src/net_loop.c
$(CC) -c src/net_loop.c -o obj/net_loop.o $(CFLAGS)
obj/net_packet.o: $(GLOBALDEPS) src/net_packet.c
$(CC) -c src/net_packet.c -o obj/net_packet.o $(CFLAGS)
obj/net_query.o: $(GLOBALDEPS) src/net_query.c
$(CC) -c src/net_query.c -o obj/net_query.o $(CFLAGS)
obj/net_structrw.o: $(GLOBALDEPS) src/net_structrw.c
$(CC) -c src/net_structrw.c -o obj/net_structrw.o $(CFLAGS)
obj/tables.o: $(GLOBALDEPS) src/tables.c
$(CC) -c src/tables.c -o obj/tables.o $(CFLAGS)
obj/v_video.o: $(GLOBALDEPS) src/v_video.c
$(CC) -c src/v_video.c -o obj/v_video.o $(CFLAGS)
obj/w_checksum.o: $(GLOBALDEPS) src/w_checksum.c
$(CC) -c src/w_checksum.c -o obj/w_checksum.o $(CFLAGS)
obj/w_file.o: $(GLOBALDEPS) src/w_file.c
$(CC) -c src/w_file.c -o obj/w_file.o $(CFLAGS)
obj/w_file_stdc.o: $(GLOBALDEPS) src/w_file_stdc.c
$(CC) -c src/w_file_stdc.c -o obj/w_file_stdc.o $(CFLAGS)
obj/w_main.o: $(GLOBALDEPS) src/w_main.c
$(CC) -c src/w_main.c -o obj/w_main.o $(CFLAGS)
obj/w_merge.o: $(GLOBALDEPS) src/w_merge.c
$(CC) -c src/w_merge.c -o obj/w_merge.o $(CFLAGS)
obj/w_wad.o: $(GLOBALDEPS) src/w_wad.c
$(CC) -c src/w_wad.c -o obj/w_wad.o $(CFLAGS)
obj/z_zone.o: $(GLOBALDEPS) src/z_zone.c
$(CC) -c src/z_zone.c -o obj/z_zone.o $(CFLAGS)
obj/d_mode.o: $(GLOBALDEPS) src/d_mode.c
$(CC) -c src/d_mode.c -o obj/d_mode.o $(CFLAGS)
obj/am_map.o: $(GLOBALDEPS) src/doom/am_map.c
$(CC) -c src/doom/am_map.c -o obj/am_map.o $(CFLAGS)
obj/d_main.o: $(GLOBALDEPS) src/doom/d_main.c
$(CC) -c src/doom/d_main.c -o obj/d_main.o $(CFLAGS)
obj/d_net.o: $(GLOBALDEPS) src/doom/d_net.c
$(CC) -c src/doom/d_net.c -o obj/d_net.o $(CFLAGS)
obj/f_finale.o: $(GLOBALDEPS) src/doom/f_finale.c
$(CC) -c src/doom/f_finale.c -o obj/f_finale.o $(CFLAGS)
obj/g_game.o: $(GLOBALDEPS) src/doom/g_game.c
$(CC) -c src/doom/g_game.c -o obj/g_game.o $(CFLAGS)
obj/info.o: $(GLOBALDEPS) src/doom/info.c
$(CC) -c src/doom/info.c -o obj/info.o $(CFLAGS)
obj/m_random.o: $(GLOBALDEPS) src/doom/m_random.c
$(CC) -c src/doom/m_random.c -o obj/m_random.o $(CFLAGS)
obj/m_menu.o: $(GLOBALDEPS) src/doom/m_menu.c
$(CC) -c src/doom/m_menu.c -o obj/m_menu.o $(CFLAGS)
obj/p_ceilng.o: $(GLOBALDEPS) src/doom/p_ceilng.c
$(CC) -c src/doom/p_ceilng.c -o obj/p_ceilng.o $(CFLAGS)
obj/p_doors.o: $(GLOBALDEPS) src/doom/p_doors.c
$(CC) -c src/doom/p_doors.c -o obj/p_doors.o $(CFLAGS)
obj/p_enemy.o: $(GLOBALDEPS) src/doom/p_enemy.c
$(CC) -c src/doom/p_enemy.c -o obj/p_enemy.o $(CFLAGS)
obj/p_floor.o: $(GLOBALDEPS) src/doom/p_floor.c
$(CC) -c src/doom/p_floor.c -o obj/p_floor.o $(CFLAGS)
obj/p_inter.o: $(GLOBALDEPS) src/doom/p_inter.c
$(CC) -c src/doom/p_inter.c -o obj/p_inter.o $(CFLAGS)
obj/p_lights.o: $(GLOBALDEPS) src/doom/p_lights.c
$(CC) -c src/doom/p_lights.c -o obj/p_lights.o $(CFLAGS)
obj/p_map.o: $(GLOBALDEPS) src/doom/p_map.c
$(CC) -c src/doom/p_map.c -o obj/p_map.o $(CFLAGS)
obj/p_maputl.o: $(GLOBALDEPS) src/doom/p_maputl.c
$(CC) -c src/doom/p_maputl.c -o obj/p_maputl.o $(CFLAGS)
obj/p_mobj.o: $(GLOBALDEPS) src/doom/p_mobj.c
$(CC) -c src/doom/p_mobj.c -o obj/p_mobj.o $(CFLAGS)
obj/p_plats.o: $(GLOBALDEPS) src/doom/p_plats.c
$(CC) -c src/doom/p_plats.c -o obj/p_plats.o $(CFLAGS)
obj/p_pspr.o: $(GLOBALDEPS) src/doom/p_pspr.c
$(CC) -c src/doom/p_pspr.c -o obj/p_pspr.o $(CFLAGS)
obj/p_setup.o: $(GLOBALDEPS) src/doom/p_setup.c
$(CC) -c src/doom/p_setup.c -o obj/p_setup.o $(CFLAGS)
obj/p_sight.o: $(GLOBALDEPS) src/doom/p_sight.c
$(CC) -c src/doom/p_sight.c -o obj/p_sight.o $(CFLAGS)
obj/p_spec.o: $(GLOBALDEPS) src/doom/p_spec.c
$(CC) -c src/doom/p_spec.c -o obj/p_spec.o $(CFLAGS)
obj/p_switch.o: $(GLOBALDEPS) src/doom/p_switch.c
$(CC) -c src/doom/p_switch.c -o obj/p_switch.o $(CFLAGS)
obj/p_telept.o: $(GLOBALDEPS) src/doom/p_telept.c
$(CC) -c src/doom/p_telept.c -o obj/p_telept.o $(CFLAGS)
obj/p_tick.o: $(GLOBALDEPS) src/doom/p_tick.c
$(CC) -c src/doom/p_tick.c -o obj/p_tick.o $(CFLAGS)
obj/p_user.o: $(GLOBALDEPS) src/doom/p_user.c
$(CC) -c src/doom/p_user.c -o obj/p_user.o $(CFLAGS)
obj/r_data.o: $(GLOBALDEPS) src/doom/r_data.c
$(CC) -c src/doom/r_data.c -o obj/r_data.o $(CFLAGS)
obj/r_draw.o: $(GLOBALDEPS) src/doom/r_draw.c
$(CC) -c src/doom/r_draw.c -o obj/r_draw.o $(CFLAGS)
obj/r_bsp.o: $(GLOBALDEPS) src/doom/r_bsp.c
$(CC) -c src/doom/r_bsp.c -o obj/r_bsp.o $(CFLAGS)
obj/r_segs.o: $(GLOBALDEPS) src/doom/r_segs.c
$(CC) -c src/doom/r_segs.c -o obj/r_segs.o $(CFLAGS)
obj/r_main.o: $(GLOBALDEPS) src/doom/r_main.c
$(CC) -c src/doom/r_main.c -o obj/r_main.o $(CFLAGS)
obj/r_plane.o: $(GLOBALDEPS) src/doom/r_plane.c
$(CC) -c src/doom/r_plane.c -o obj/r_plane.o $(CFLAGS)
obj/r_things.o: $(GLOBALDEPS) src/doom/r_things.c
$(CC) -c src/doom/r_things.c -o obj/r_things.o $(CFLAGS)
obj/s_sound.o: $(GLOBALDEPS) src/doom/s_sound.c
$(CC) -c src/doom/s_sound.c -o obj/s_sound.o $(CFLAGS)
obj/sounds.o: $(GLOBALDEPS) src/doom/sounds.c
$(CC) -c src/doom/sounds.c -o obj/sounds.o $(CFLAGS)
obj/i_sound.o: $(GLOBALDEPS) src/i_sound.c
$(CC) -c src/i_sound.c -o obj/i_sound.o $(CFLAGS)
obj/p_saveg.o: $(GLOBALDEPS) src/doom/p_saveg.c
$(CC) -c src/doom/p_saveg.c -o obj/p_saveg.o $(CFLAGS)
obj/d_loop.o: $(GLOBALDEPS) src/d_loop.c
$(CC) -c src/d_loop.c -o obj/d_loop.o $(CFLAGS)
obj/net_client.o: $(GLOBALDEPS) src/net_client.c
$(CC) -c src/net_client.c -o obj/net_client.o $(CFLAGS)
obj/net_server.o: $(GLOBALDEPS) src/net_server.c
$(CC) -c src/net_server.c -o obj/net_server.o $(CFLAGS)
obj/net_sdl.o: $(GLOBALDEPS) src/net_sdl.c
$(CC) -c src/net_sdl.c -o obj/net_sdl.o $(CFLAGS)
obj/deh_main.o: $(GLOBALDEPS) src/deh_main.c
$(CC) -c src/deh_main.c -o obj/deh_main.o $(CFLAGS)
obj/deh_io.o: $(GLOBALDEPS) src/deh_io.c
$(CC) -c src/deh_io.c -o obj/deh_io.o $(CFLAGS)
obj/deh_ammo.o: $(GLOBALDEPS) src/doom/deh_ammo.c
$(CC) -c src/doom/deh_ammo.c -o obj/deh_ammo.o $(CFLAGS)
obj/deh_frame.o: $(GLOBALDEPS) src/doom/deh_frame.c
$(CC) -c src/doom/deh_frame.c -o obj/deh_frame.o $(CFLAGS)
obj/deh_sound.o: $(GLOBALDEPS) src/doom/deh_sound.c
$(CC) -c src/doom/deh_sound.c -o obj/deh_sound.o $(CFLAGS)
obj/deh_thing.o: $(GLOBALDEPS) src/doom/deh_thing.c
$(CC) -c src/doom/deh_thing.c -o obj/deh_thing.o $(CFLAGS)
obj/deh_weapon.o: $(GLOBALDEPS) src/doom/deh_weapon.c
$(CC) -c src/doom/deh_weapon.c -o obj/deh_weapon.o $(CFLAGS)
obj/deh_mapping.o: $(GLOBALDEPS) src/deh_mapping.c
$(CC) -c src/deh_mapping.c -o obj/deh_mapping.o $(CFLAGS)
obj/sha1.o: $(GLOBALDEPS) src/sha1.c
$(CC) -c src/sha1.c -o obj/sha1.o $(CFLAGS)
obj/i_sdlsound.o: $(GLOBALDEPS) src/i_sdlsound.c
$(CC) -c src/i_sdlsound.c -o obj/i_sdlsound.o $(CFLAGS)
obj/i_sdlmusic.o: $(GLOBALDEPS) src/i_sdlmusic.c
$(CC) -c src/i_sdlmusic.c -o obj/i_sdlmusic.o $(CFLAGS)
obj/i_input.o: $(GLOBALDEPS) src/i_input.c
$(CC) -c src/i_input.c -o obj/i_input.o $(CFLAGS)
obj/v_diskicon.o: $(GLOBALDEPS) src/v_diskicon.c
$(CC) -c src/v_diskicon.c -o obj/v_diskicon.o $(CFLAGS)
obj/doomstat.o: $(GLOBALDEPS) src/doom/doomstat.c
$(CC) -c src/doom/doomstat.c -o obj/doomstat.o $(CFLAGS)
obj/d_items.o: $(GLOBALDEPS) src/doom/d_items.c
$(CC) -c src/doom/d_items.c -o obj/d_items.o $(CFLAGS)
obj/hu_stuff.o: $(GLOBALDEPS) src/doom/hu_stuff.c
$(CC) -c src/doom/hu_stuff.c -o obj/hu_stuff.o $(CFLAGS)
obj/hu_lib.o: $(GLOBALDEPS) src/doom/hu_lib.c
$(CC) -c src/doom/hu_lib.c -o obj/hu_lib.o $(CFLAGS)
obj/r_sky.o: $(GLOBALDEPS) src/doom/r_sky.c
$(CC) -c src/doom/r_sky.c -o obj/r_sky.o $(CFLAGS)
obj/deh_doom.o: $(GLOBALDEPS) src/doom/deh_doom.c
$(CC) -c src/doom/deh_doom.c -o obj/deh_doom.o $(CFLAGS)
obj/deh_misc.o: $(GLOBALDEPS) src/doom/deh_misc.c
$(CC) -c src/doom/deh_misc.c -o obj/deh_misc.o $(CFLAGS)
obj/st_stuff.o: $(GLOBALDEPS) src/doom/st_stuff.c
$(CC) -c src/doom/st_stuff.c -o obj/st_stuff.o $(CFLAGS)
obj/st_lib.o: $(GLOBALDEPS) src/doom/st_lib.c
$(CC) -c src/doom/st_lib.c -o obj/st_lib.o $(CFLAGS)
obj/f_wipe.o: $(GLOBALDEPS) src/doom/f_wipe.c
$(CC) -c src/doom/f_wipe.c -o obj/f_wipe.o $(CFLAGS)
obj/deh_cheat.o: $(GLOBALDEPS) src/doom/deh_cheat.c
$(CC) -c src/doom/deh_cheat.c -o obj/deh_cheat.o $(CFLAGS)
obj/deh_ptr.o: $(GLOBALDEPS) src/doom/deh_ptr.c
$(CC) -c src/doom/deh_ptr.c -o obj/deh_ptr.o $(CFLAGS)
obj/deh_text.o: $(GLOBALDEPS) src/deh_text.c
$(CC) -c src/deh_text.c -o obj/deh_text.o $(CFLAGS)
obj/dstrings.o: $(GLOBALDEPS) src/doom/dstrings.c
$(CC) -c src/doom/dstrings.c -o obj/dstrings.o $(CFLAGS)
obj/wi_stuff.o: $(GLOBALDEPS) src/doom/wi_stuff.c
$(CC) -c src/doom/wi_stuff.c -o obj/wi_stuff.o $(CFLAGS)
obj/statdump.o: $(GLOBALDEPS) src/doom/statdump.c
$(CC) -c src/doom/statdump.c -o obj/statdump.o $(CFLAGS)
obj/deh_bexstr.o: $(GLOBALDEPS) src/doom/deh_bexstr.c
$(CC) -c src/doom/deh_bexstr.c -o obj/deh_bexstr.o $(CFLAGS)
#---------------------------------------------------------------------------------
# main targets
#---------------------------------------------------------------------------------
all : $(BINDIR)/$(OUTPUT).pfs0 $(BINDIR)/$(OUTPUT).nro
$(BINDIR)/$(OUTPUT).pfs0 : $(BINDIR)/$(OUTPUT).nso
$(BINDIR)/$(OUTPUT).nso : $(BINDIR)/$(OUTPUT).elf
ifeq ($(strip $(NO_NACP)),)
$(BINDIR)/$(OUTPUT).nro : $(BINDIR)/$(OUTPUT).elf $(BINDIR)/$(OUTPUT).nacp
else
$(BINDIR)/$(OUTPUT).nro : $(BINDIR)/$(OUTPUT).elf
endif
$(BINDIR)/$(OUTPUT).elf : $(OFILES)
$(OFILES_SRC) : $(HFILES_BIN)
# end of Makefile ...