mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-04-19 17:01:46 +00:00
ZDoom 1.17c.
This commit is contained in:
parent
274c693a70
commit
c37211571e
31 changed files with 243 additions and 17079 deletions
340
COPYING
340
COPYING
|
@ -1,340 +0,0 @@
|
|||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 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 Library 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.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
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 a brief idea of what it does.>
|
||||
Copyright (C) 19yy <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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 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) 19yy 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 Library General
|
||||
Public License instead of this License.
|
BIN
PATCH.EXE
BIN
PATCH.EXE
Binary file not shown.
|
@ -850,6 +850,9 @@ static int PatchThing (int thingNum)
|
|||
Printf (PRINT_HIGH, "Thing %d out of range.\n", thingNum + 1);
|
||||
}
|
||||
|
||||
if (thingNum == MT_HEAD)
|
||||
thingNum = MT_HEAD;
|
||||
|
||||
while ((result = GetLine ()) == 1) {
|
||||
int sndmap = atoi (Line2);
|
||||
|
||||
|
|
|
@ -33,7 +33,10 @@
|
|||
#include <sys/stat.h>
|
||||
#endif
|
||||
|
||||
#include <time.h>
|
||||
|
||||
#include "m_alloc.h"
|
||||
#include "m_random.h"
|
||||
#include "minilzo.h"
|
||||
#include "doomdef.h"
|
||||
#include "doomstat.h"
|
||||
|
@ -1039,6 +1042,8 @@ void D_DoomMain (void)
|
|||
int p, flags;
|
||||
char file[256];
|
||||
|
||||
rngseed = (unsigned long)time (NULL);
|
||||
|
||||
gamestate = GS_STARTUP;
|
||||
M_FindResponseFile ();
|
||||
DoLooseFiles(); // Ty 08/29/98 - handle "loose" files on command line
|
||||
|
|
|
@ -301,8 +301,8 @@ int wipe_doBurn (int ticks)
|
|||
unsigned int *bg2rgb = Col2RGB8[bglevel];
|
||||
unsigned int fg = fg2rgb[fromnew[x]];
|
||||
unsigned int bg = bg2rgb[fromold[x]];
|
||||
fg = (fg+bg) | 0xf07c3e1f;
|
||||
to[x] = RGB8k[0][0][(fg>>5) & (fg>>19)];
|
||||
fg = (fg+bg) | 0x1f07c1f;
|
||||
to[x] = RGB32k[0][0][fg & (fg>>15)];
|
||||
done = false;
|
||||
}
|
||||
}
|
||||
|
@ -355,8 +355,8 @@ int wipe_doFade (int ticks)
|
|||
{
|
||||
unsigned int fg = fg2rgb[fromnew[x]];
|
||||
unsigned int bg = bg2rgb[fromold[x]];
|
||||
fg = (fg+bg) | 0xf07c3e1f;
|
||||
to[x] = RGB8k[0][0][(fg>>5) & (fg>>19)];
|
||||
fg = (fg+bg) | 0x1f07c1f;
|
||||
to[x] = RGB32k[0][0][fg & (fg>>15)];
|
||||
}
|
||||
fromnew += screen.width;
|
||||
fromold += screen.width;
|
||||
|
|
|
@ -351,6 +351,26 @@ void G_ParseMapInfo (void)
|
|||
mapinfo = data;
|
||||
levelflags |= LEVEL_FORCENOSKYSTRETCH;
|
||||
|
||||
} else if (!stricmp (com_token, "allowfreelook")) {
|
||||
mapinfo = data;
|
||||
levelflags &= ~LEVEL_FREELOOK_NO;
|
||||
levelflags |= LEVEL_FREELOOK_YES;
|
||||
|
||||
} else if (!stricmp (com_token, "nofreelook")) {
|
||||
mapinfo = data;
|
||||
levelflags &= ~LEVEL_FREELOOK_YES;
|
||||
levelflags |= LEVEL_FREELOOK_NO;
|
||||
|
||||
} else if (!stricmp (com_token, "allowjump")) {
|
||||
mapinfo = data;
|
||||
levelflags &= ~LEVEL_JUMP_NO;
|
||||
levelflags |= LEVEL_JUMP_YES;
|
||||
|
||||
} else if (!stricmp (com_token, "nojump")) {
|
||||
mapinfo = data;
|
||||
levelflags &= ~LEVEL_JUMP_YES;
|
||||
levelflags |= LEVEL_JUMP_NO;
|
||||
|
||||
} else if (!stricmp (com_token, "cdtrack") ||
|
||||
!stricmp (com_token, "cd_start_track") ||
|
||||
!stricmp (com_token, "cd_end1_track") ||
|
||||
|
@ -938,6 +958,25 @@ void G_InitLevelLocals ()
|
|||
level.levelnum = 1;
|
||||
}
|
||||
|
||||
{
|
||||
int clear = 0, set = 0;
|
||||
char buf[16];
|
||||
|
||||
if (level.flags & LEVEL_JUMP_YES)
|
||||
clear = DF_NO_JUMP;
|
||||
if (level.flags & LEVEL_JUMP_NO)
|
||||
set = DF_NO_JUMP;
|
||||
if (level.flags & LEVEL_FREELOOK_YES)
|
||||
clear |= DF_NO_FREELOOK;
|
||||
if (level.flags & LEVEL_FREELOOK_NO)
|
||||
set |= DF_NO_FREELOOK;
|
||||
|
||||
dmflags &= ~clear;
|
||||
dmflags |= set;
|
||||
sprintf (buf, "%d", dmflags);
|
||||
cvar_set ("dmflags", buf);
|
||||
}
|
||||
|
||||
memset (level.vars, 0, sizeof(level.vars));
|
||||
|
||||
if (oldfade != level.fadeto)
|
||||
|
|
|
@ -26,6 +26,11 @@
|
|||
#define LEVEL_SNDSEQTOTALCTRL 0x00001000
|
||||
#define LEVEL_FORCENOSKYSTRETCH 0x00002000
|
||||
|
||||
#define LEVEL_JUMP_NO 0x00004000
|
||||
#define LEVEL_JUMP_YES 0x00008000
|
||||
#define LEVEL_FREELOOK_NO 0x00010000
|
||||
#define LEVEL_FREELOOK_YES 0x00020000
|
||||
|
||||
#define LEVEL_DEFINEDINMAPINFO 0x20000000 // Level was defined in a MAPINFO lump
|
||||
#define LEVEL_CHANGEMAPCHEAT 0x40000000 // Don't display cluster messages
|
||||
#define LEVEL_VISITED 0x80000000 // Used for intermission map
|
||||
|
|
|
@ -95,11 +95,11 @@ int P_Random(pr_class_t pr_class)
|
|||
|
||||
void M_ClearRandom (void)
|
||||
{
|
||||
int i;
|
||||
unsigned long seed = rngseed*2+1; // add 3/26/98: add rngseed
|
||||
for (i=0; i<NUMPRCLASS; i++) // go through each pr_class and set
|
||||
rng.seed[i] = seed *= 69069ul; // each starting seed differently
|
||||
rng.prndindex = rng.rndindex = 0; // clear two compatibility indices
|
||||
int i;
|
||||
unsigned long seed = rngseed*2+1; // add 3/26/98: add rngseed
|
||||
for (i=0; i<NUMPRCLASS; i++) // go through each pr_class and set
|
||||
rng.seed[i] = seed *= 69069ul; // each starting seed differently
|
||||
rng.prndindex = rng.rndindex = 0; // clear two compatibility indices
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
|
|
@ -1109,10 +1109,16 @@ FUNC(LS_Sector_SetColor)
|
|||
int secnum = -1;
|
||||
|
||||
while ((secnum = P_FindSectorFromTag (arg0, secnum)) >= 0)
|
||||
sectors[secnum].colormap = GetSpecialLights (arg1, arg2, arg3,
|
||||
RPART(sectors[secnum].colormap->fade),
|
||||
GPART(sectors[secnum].colormap->fade),
|
||||
BPART(sectors[secnum].colormap->fade));
|
||||
{
|
||||
sectors[secnum].floorcolormap = GetSpecialLights (arg1, arg2, arg3,
|
||||
RPART(sectors[secnum].floorcolormap->fade),
|
||||
GPART(sectors[secnum].floorcolormap->fade),
|
||||
BPART(sectors[secnum].floorcolormap->fade));
|
||||
sectors[secnum].ceilingcolormap = GetSpecialLights (arg1, arg2, arg3,
|
||||
RPART(sectors[secnum].ceilingcolormap->fade),
|
||||
GPART(sectors[secnum].ceilingcolormap->fade),
|
||||
BPART(sectors[secnum].ceilingcolormap->fade));
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -1123,12 +1129,18 @@ FUNC(LS_Sector_SetFade)
|
|||
int secnum = -1;
|
||||
|
||||
while ((secnum = P_FindSectorFromTag (arg0, secnum)) >= 0)
|
||||
sectors[secnum].colormap = GetSpecialLights (
|
||||
RPART(sectors[secnum].colormap->color),
|
||||
GPART(sectors[secnum].colormap->color),
|
||||
BPART(sectors[secnum].colormap->color),
|
||||
{
|
||||
sectors[secnum].floorcolormap = GetSpecialLights (
|
||||
RPART(sectors[secnum].floorcolormap->color),
|
||||
GPART(sectors[secnum].floorcolormap->color),
|
||||
BPART(sectors[secnum].floorcolormap->color),
|
||||
arg1, arg2, arg3);
|
||||
|
||||
sectors[secnum].ceilingcolormap = GetSpecialLights (
|
||||
RPART(sectors[secnum].ceilingcolormap->color),
|
||||
GPART(sectors[secnum].ceilingcolormap->color),
|
||||
BPART(sectors[secnum].ceilingcolormap->color),
|
||||
arg1, arg2, arg3);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -157,8 +157,9 @@ void P_ArchiveWorld (void)
|
|||
save_p = (byte *)(put + 10); // [RH]
|
||||
PADSAVEP(); // [RH]
|
||||
*((float *)save_p)++ = sec->gravity; // [RH]
|
||||
*((unsigned int *)save_p)++ = sec->colormap->color; // [RH]
|
||||
*((unsigned int *)save_p)++ = sec->colormap->fade; // [RH];
|
||||
*((unsigned int *)save_p)++ = sec->floorcolormap->color; // [RH]
|
||||
*((unsigned int *)save_p)++ = sec->floorcolormap->fade; // [RH];
|
||||
/****** BE SURE AND ADD ceilingcolormap for 1.18 *******/
|
||||
}
|
||||
|
||||
put = (short *)save_p; // [RH]
|
||||
|
@ -228,7 +229,7 @@ void P_UnArchiveWorld (void)
|
|||
color = *((unsigned int *)save_p)++; // [RH]
|
||||
fade = *((unsigned int *)save_p)++; // [RH]
|
||||
|
||||
sec->colormap = GetSpecialLights (
|
||||
sec->floorcolormap = sec->ceilingcolormap = GetSpecialLights (
|
||||
RPART(color), GPART(color), BPART(color),
|
||||
RPART(fade), GPART(fade), BPART(fade)); // [RH]
|
||||
|
||||
|
@ -878,7 +879,8 @@ void P_ArchiveSpecials (void)
|
|||
pusher = (pusher_t *)save_p;
|
||||
memcpy (save_p, th, sizeof(*pusher));
|
||||
save_p += sizeof(*pusher);
|
||||
pusher->source = (mobj_t *) pusher->source->thinker.prev; // [RH] remember source
|
||||
pusher->source = pusher->source ? // [RH] remember source
|
||||
(mobj_t *) pusher->source->thinker.prev : NULL;
|
||||
continue;
|
||||
}
|
||||
else if (th->function.acp1 == (actionf_p1) T_RotatePoly)
|
||||
|
|
|
@ -49,6 +49,7 @@ extern void P_TranslateLineDef (line_t *ld, maplinedef_t *mld);
|
|||
extern void P_TranslateTeleportThings (void);
|
||||
extern int P_TranslateSectorSpecial (int);
|
||||
|
||||
extern unsigned int R_OldBlend;
|
||||
|
||||
//
|
||||
// MAP related Lookup tables.
|
||||
|
@ -363,10 +364,10 @@ void P_LoadSectors (int lump)
|
|||
// [RH] Sectors default to white light with the default fade.
|
||||
// If they are outside (have a sky ceiling), they use the outside fog.
|
||||
if (level.outsidefog != 0xff000000 && ss->ceilingpic == skyflatnum)
|
||||
ss->colormap = GetSpecialLights (255,255,255,
|
||||
ss->ceilingcolormap = ss->floorcolormap = GetSpecialLights (255,255,255,
|
||||
RPART(level.outsidefog),GPART(level.outsidefog),BPART(level.outsidefog));
|
||||
else
|
||||
ss->colormap = GetSpecialLights (255,255,255,
|
||||
ss->ceilingcolormap = ss->floorcolormap = GetSpecialLights (255,255,255,
|
||||
RPART(level.fadeto),GPART(level.fadeto),BPART(level.fadeto));
|
||||
|
||||
ss->sky = 0;
|
||||
|
@ -760,7 +761,8 @@ void P_LoadSideDefs2 (int lump)
|
|||
|
||||
for (s = 0; s < numsectors; s++) {
|
||||
if (sectors[s].tag == sd->tag)
|
||||
sectors[s].colormap = colormap;
|
||||
sectors[s].ceilingcolormap =
|
||||
sectors[s].floorcolormap = colormap;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1409,6 +1411,7 @@ void P_SetupLevel (char *lumpname, int position)
|
|||
// build subsector connect matrix
|
||||
// UNUSED P_ConnectSubsectors ();
|
||||
|
||||
R_OldBlend = ~0;
|
||||
// preload graphics
|
||||
if (precache)
|
||||
R_PrecacheLevel ();
|
||||
|
|
56
code/R_bsp.c
56
code/R_bsp.c
|
@ -318,13 +318,17 @@ sector_t *R_FakeFlat(sector_t *sec, sector_t *tempsec,
|
|||
|
||||
if ((underwater && (tempsec-> floorheight = sec->floorheight,
|
||||
tempsec->ceilingheight = s->floorheight-1,
|
||||
!back)) || viewz <= s->floorheight)
|
||||
back)) || viewz <= s->floorheight)
|
||||
{ // head-below-floor hack
|
||||
tempsec->floorpic = s->floorpic;
|
||||
tempsec->floor_xoffs = s->floor_xoffs;
|
||||
tempsec->floor_yoffs = s->floor_yoffs;
|
||||
tempsec->floorcolormap = s->floorcolormap;
|
||||
|
||||
if (underwater) {
|
||||
if (underwater)
|
||||
{
|
||||
tempsec->ceilingheight = s->floorheight - 1;
|
||||
tempsec->ceilingcolormap = s->ceilingcolormap;
|
||||
if (s->ceilingpic == skyflatnum)
|
||||
{
|
||||
tempsec->floorheight = tempsec->ceilingheight+1;
|
||||
|
@ -339,6 +343,10 @@ sector_t *R_FakeFlat(sector_t *sec, sector_t *tempsec,
|
|||
tempsec->ceiling_yoffs = s->ceiling_yoffs;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
tempsec->floorheight = sec->floorheight;
|
||||
}
|
||||
|
||||
tempsec->lightlevel = s->lightlevel;
|
||||
|
||||
|
@ -444,8 +452,7 @@ void R_AddLine (seg_t *line)
|
|||
angle2 = (unsigned) (-(int)clipangle);
|
||||
}
|
||||
|
||||
// The seg is in the view range,
|
||||
// but not necessarily visible.
|
||||
// The seg is in the view range, but not necessarily visible.
|
||||
angle1 = (angle1+ANG90)>>ANGLETOFINESHIFT;
|
||||
angle2 = (angle2+ANG90)>>ANGLETOFINESHIFT;
|
||||
|
||||
|
@ -504,7 +511,8 @@ void R_AddLine (seg_t *line)
|
|||
&& backsector->ceilinglightsec == frontsector->ceilinglightsec
|
||||
|
||||
// [RH] Also consider colormaps
|
||||
&& backsector->colormap == frontsector->colormap
|
||||
&& backsector->floorcolormap == frontsector->floorcolormap
|
||||
&& backsector->ceilingcolormap == frontsector->ceilingcolormap
|
||||
)
|
||||
{
|
||||
return;
|
||||
|
@ -676,12 +684,27 @@ void R_Subsector (int num)
|
|||
count = sub->numlines;
|
||||
line = &segs[sub->firstline];
|
||||
|
||||
basecolormap = frontsector->colormap->maps; // [RH] set basecolormap
|
||||
|
||||
// killough 3/8/98, 4/4/98: Deep water / fake ceiling effect
|
||||
frontsector = R_FakeFlat(frontsector, &tempsec, &floorlightlevel,
|
||||
&ceilinglightlevel, false); // killough 4/11/98
|
||||
|
||||
basecolormap = frontsector->ceilingcolormap->maps;
|
||||
|
||||
ceilingplane = frontsector->ceilingheight > viewz ||
|
||||
frontsector->ceilingpic == skyflatnum ||
|
||||
(frontsector->heightsec != -1 &&
|
||||
sectors[frontsector->heightsec].floorpic == skyflatnum) ?
|
||||
R_FindPlane(frontsector->ceilingheight, // killough 3/8/98
|
||||
frontsector->ceilingpic == skyflatnum && // killough 10/98
|
||||
frontsector->sky & PL_SKYFLAT ? frontsector->sky :
|
||||
frontsector->ceilingpic,
|
||||
ceilinglightlevel, // killough 4/11/98
|
||||
frontsector->ceiling_xoffs, // killough 3/7/98
|
||||
frontsector->ceiling_yoffs
|
||||
) : NULL;
|
||||
|
||||
basecolormap = frontsector->floorcolormap->maps; // [RH] set basecolormap
|
||||
|
||||
// killough 3/7/98: Add (x,y) offsets to flats, add deep water check
|
||||
// killough 3/16/98: add floorlightlevel
|
||||
// killough 10/98: add support for skies transferred from sidedefs
|
||||
|
@ -689,7 +712,7 @@ void R_Subsector (int num)
|
|||
(frontsector->heightsec != -1 &&
|
||||
sectors[frontsector->heightsec].ceilingpic == skyflatnum) ?
|
||||
R_FindPlane(frontsector->floorheight,
|
||||
frontsector->floorpic == skyflatnum && // kilough 10/98
|
||||
frontsector->floorpic == skyflatnum && // killough 10/98
|
||||
frontsector->sky & PL_SKYFLAT ? frontsector->sky :
|
||||
frontsector->floorpic,
|
||||
floorlightlevel, // killough 3/16/98
|
||||
|
@ -697,21 +720,9 @@ void R_Subsector (int num)
|
|||
frontsector->floor_yoffs
|
||||
) : NULL;
|
||||
|
||||
ceilingplane = frontsector->ceilingheight > viewz ||
|
||||
frontsector->ceilingpic == skyflatnum ||
|
||||
(frontsector->heightsec != -1 &&
|
||||
sectors[frontsector->heightsec].floorpic == skyflatnum) ?
|
||||
R_FindPlane(frontsector->ceilingheight, // killough 3/8/98
|
||||
frontsector->ceilingpic == skyflatnum && // kilough 10/98
|
||||
frontsector->sky & PL_SKYFLAT ? frontsector->sky :
|
||||
frontsector->ceilingpic,
|
||||
ceilinglightlevel, // killough 4/11/98
|
||||
frontsector->ceiling_xoffs, // killough 3/7/98
|
||||
frontsector->ceiling_yoffs
|
||||
) : NULL;
|
||||
|
||||
// [RH] set foggy flag
|
||||
foggy = (level.fadeto || sub->sector->colormap->fade);
|
||||
foggy = level.fadeto || frontsector->floorcolormap->fade
|
||||
|| frontsector->ceilingcolormap->fade;
|
||||
|
||||
// killough 9/18/98: Fix underwater slowdown, by passing real sector
|
||||
// instead of fake one. Improve sprite lighting by basing sprite
|
||||
|
@ -757,7 +768,6 @@ void R_RenderBSPNode (int bspnum)
|
|||
R_RenderBSPNode(bsp->children[side]);
|
||||
|
||||
// Possibly divide back space.
|
||||
|
||||
if (!R_CheckBBox(bsp->bbox[side^1]))
|
||||
return;
|
||||
|
||||
|
|
|
@ -156,7 +156,8 @@ struct sector_s
|
|||
float gravity; // [RH] Sector gravity (1.0 is normal)
|
||||
short damage; // [RH] Damage to do while standing on floor
|
||||
short mod; // [RH] Means-of-death for applied damage
|
||||
struct dyncolormap_s *colormap; // [RH] Per-sector colormap
|
||||
struct dyncolormap_s *floorcolormap; // [RH] Per-sector colormap
|
||||
struct dyncolormap_s *ceilingcolormap;
|
||||
};
|
||||
typedef struct sector_s sector_t;
|
||||
|
||||
|
|
|
@ -376,7 +376,13 @@ void R_DrawFuzzColumnP_C (void)
|
|||
fixed_t dc_translevel;
|
||||
|
||||
/*
|
||||
[RH] This note is from DOSDoom 0.65:
|
||||
[RH] This translucency algorithm is based on DOSDoom 0.65's, but uses
|
||||
a 32k RGB table instead of an 8k one. At least on my machine, it's
|
||||
slightly faster (probably because it uses only one shift instead of
|
||||
two), and it looks considerably less green at the ends of the
|
||||
translucency range. The extra size doesn't appear to be an issue.
|
||||
|
||||
The following note is from DOSDoom 0.65:
|
||||
|
||||
New translucency algorithm, by Erik Sandberg:
|
||||
|
||||
|
@ -461,8 +467,8 @@ void R_DrawTranslucentColumnP_C (void)
|
|||
|
||||
fg = fg2rgb[fg];
|
||||
bg = bg2rgb[bg];
|
||||
fg = (fg+bg) | 0xf07c3e1f;
|
||||
*dest = RGB8k[0][0][(fg>>5) & (fg>>19)];
|
||||
fg = (fg+bg) | 0x1f07c1f;
|
||||
*dest = RGB32k[0][0][fg & (fg>>15)];
|
||||
dest += pitch;
|
||||
frac += fracstep;
|
||||
} while (--count);
|
||||
|
@ -580,8 +586,8 @@ void R_DrawTlatedLucentColumnP_C (void)
|
|||
|
||||
fg = fg2rgb[fg];
|
||||
bg = bg2rgb[bg];
|
||||
fg = (fg+bg) | 0xf07c3e1f;
|
||||
*dest = RGB8k[0][0][(fg>>5) & (fg>>19)];
|
||||
fg = (fg+bg) | 0x1f07c1f;
|
||||
*dest = RGB32k[0][0][fg & (fg>>15)];
|
||||
dest += pitch;
|
||||
frac += fracstep;
|
||||
} while (--count);
|
||||
|
|
|
@ -874,10 +874,10 @@ subsector_t *R_PointInSubsector (fixed_t x, fixed_t y)
|
|||
// R_SetupFrame
|
||||
//
|
||||
extern dyncolormap_t NormalLight;
|
||||
unsigned int R_OldBlend = ~0;
|
||||
|
||||
void R_SetupFrame (player_t *player)
|
||||
{
|
||||
static unsigned int oldblend = ~0;
|
||||
unsigned int newblend;
|
||||
int dy;
|
||||
|
||||
|
@ -930,8 +930,8 @@ void R_SetupFrame (player_t *player)
|
|||
// [RH] Don't override testblend unless entering a sector with a
|
||||
// blend different from the previous sector's. Same goes with
|
||||
// NormalLight's maps pointer.
|
||||
if (oldblend != newblend) {
|
||||
oldblend = newblend;
|
||||
if (R_OldBlend != newblend) {
|
||||
R_OldBlend = newblend;
|
||||
if (APART(newblend)) {
|
||||
BaseBlendR = RPART(newblend);
|
||||
BaseBlendG = GPART(newblend);
|
||||
|
@ -1092,4 +1092,5 @@ void R_MultiresInit (void)
|
|||
|
||||
R_InitFuzzTable ();
|
||||
R_PlaneInitData ();
|
||||
R_OldBlend = ~0;
|
||||
}
|
|
@ -188,7 +188,7 @@ void R_RenderMaskedSegRange (drawseg_t *ds, int x1, int x2)
|
|||
|
||||
texnum = texturetranslation[curline->sidedef->midtexture];
|
||||
|
||||
basecolormap = frontsector->colormap->maps; // [RH] Set basecolormap
|
||||
basecolormap = frontsector->floorcolormap->maps; // [RH] Set basecolormap
|
||||
|
||||
// killough 4/13/98: get correct lightlevel for 2s normal textures
|
||||
lightnum = (R_FakeFlat(frontsector, &tempsec, NULL, NULL, false)
|
||||
|
@ -839,7 +839,8 @@ void R_StoreWallRange (int start, int stop)
|
|||
|| backsector->floorlightsec != frontsector->floorlightsec
|
||||
|
||||
// [RH] Add checks for colormaps
|
||||
|| backsector->colormap != frontsector->colormap
|
||||
|| backsector->floorcolormap != frontsector->floorcolormap
|
||||
|| backsector->ceilingcolormap != frontsector->ceilingcolormap
|
||||
;
|
||||
|
||||
markceiling = worldhigh != worldtop
|
||||
|
@ -859,7 +860,8 @@ void R_StoreWallRange (int start, int stop)
|
|||
|| backsector->ceilinglightsec != frontsector->ceilinglightsec
|
||||
|
||||
// [RH] Add check for colormaps
|
||||
|| backsector->colormap != frontsector->colormap
|
||||
|| backsector->floorcolormap != frontsector->floorcolormap
|
||||
|| backsector->ceilingcolormap != frontsector->ceilingcolormap
|
||||
;
|
||||
}
|
||||
|
||||
|
|
|
@ -969,7 +969,6 @@ void R_ProjectSprite (mobj_t *thing)
|
|||
if (heightsec != -1) // only clip things which are in special sectors
|
||||
{
|
||||
int phs = camera->subsector->sector->heightsec;
|
||||
|
||||
if (phs != -1 && viewz < sectors[phs].floorheight ?
|
||||
thing->z >= sectors[heightsec].floorheight :
|
||||
gzt < sectors[heightsec].floorheight)
|
||||
|
@ -1199,20 +1198,26 @@ void R_DrawPlayerSprites (void)
|
|||
int i;
|
||||
int lightnum;
|
||||
pspdef_t* psp;
|
||||
sector_t* sec;
|
||||
static sector_t tempsec;
|
||||
int floorlight, ceilinglight;
|
||||
|
||||
if (!r_drawplayersprites->value ||
|
||||
!camera->player ||
|
||||
(camera->player->cheats & CF_CHASECAM))
|
||||
return;
|
||||
|
||||
sec = R_FakeFlat (camera->subsector->sector, &tempsec, &floorlight,
|
||||
&ceilinglight, false);
|
||||
|
||||
// [RH] set foggy flag
|
||||
foggy = (level.fadeto || camera->subsector->sector->colormap->fade);
|
||||
foggy = (level.fadeto || sec->floorcolormap->fade);
|
||||
|
||||
// [RH] set basecolormap
|
||||
basecolormap = camera->subsector->sector->colormap->maps;
|
||||
basecolormap = sec->floorcolormap->maps;
|
||||
|
||||
// get light level
|
||||
lightnum = (camera->subsector->sector->lightlevel >> LIGHTSEGSHIFT)
|
||||
lightnum = ((floorlight + ceilinglight) >> (LIGHTSEGSHIFT+1))
|
||||
+ (foggy ? 0 : extralight);
|
||||
|
||||
if (lightnum < 0)
|
||||
|
@ -1692,7 +1697,7 @@ void R_ProjectParticle (particle_t *particle)
|
|||
vis->mobjflags = particle->trans;
|
||||
|
||||
if (fixedlightlev) {
|
||||
vis->colormap = sector->colormap->maps + fixedlightlev;
|
||||
vis->colormap = sector->floorcolormap->maps + fixedlightlev;
|
||||
} else if (fixedcolormap) {
|
||||
vis->colormap = fixedcolormap;
|
||||
} else if (sector) {
|
||||
|
@ -1707,7 +1712,7 @@ void R_ProjectParticle (particle_t *particle)
|
|||
if (index >= MAXLIGHTSCALE)
|
||||
index = MAXLIGHTSCALE-1;
|
||||
|
||||
vis->colormap = scalelight[lightnum][index] + sector->colormap->maps;
|
||||
vis->colormap = scalelight[lightnum][index] + sector->floorcolormap->maps;
|
||||
} else {
|
||||
vis->colormap = realcolormaps;
|
||||
}
|
||||
|
@ -1775,8 +1780,8 @@ void R_DrawParticle (vissprite_t *vis, int x1, int x2)
|
|||
do
|
||||
{
|
||||
unsigned int bg = bg2rgb[*dest];
|
||||
bg = (fg+bg) | 0xf07c3e1f;
|
||||
*dest = RGB8k[0][0][(bg>>5) & (bg>>19)];
|
||||
bg = (fg+bg) | 0x1f07c1f;
|
||||
*dest = RGB32k[0][0][bg & (bg>>15)];
|
||||
dest += colsize;
|
||||
} while (--count);
|
||||
dest += spacing;
|
||||
|
|
|
@ -67,7 +67,7 @@ extern char *IdStrings[22];
|
|||
extern int DisplayID;
|
||||
|
||||
unsigned int Col2RGB8[65][256];
|
||||
byte RGB8k[16][32][16];
|
||||
byte RGB32k[32][32][32];
|
||||
|
||||
|
||||
// [RH] The framebuffer is no longer a mere byte array.
|
||||
|
@ -232,8 +232,8 @@ void V_DimScreen (screen_t *screen)
|
|||
for (y = 0; y < screen->height; y++) {
|
||||
for (x = 0; x < screen->width; x++) {
|
||||
unsigned int bg = bg2rgb[*spot];
|
||||
bg = (fg+bg) | 0xf07c3e1f;
|
||||
*spot++ = RGB8k[0][0][(bg>>5) & (bg>>19)];
|
||||
bg = (fg+bg) | 0x1f07c1f;
|
||||
*spot++ = RGB32k[0][0][bg&(bg>>15)];
|
||||
}
|
||||
spot += gap;
|
||||
}
|
||||
|
@ -407,19 +407,18 @@ void Cmd_SetColor (void *plyr, int argc, char **argv)
|
|||
}
|
||||
}
|
||||
|
||||
// This is DOSDoom 0.65's translucency table code, cleaned up.
|
||||
// I also removed the use of Allegro's RGB table code, because
|
||||
// it just wasn't accurate enough.
|
||||
// Build the tables necessary for translucency
|
||||
void BuildTransTable (unsigned int *palette)
|
||||
{
|
||||
{
|
||||
int r, g, b;
|
||||
|
||||
// create the small RGB table
|
||||
for (r = 0; r < 16; r++)
|
||||
for (r = 0; r < 32; r++)
|
||||
for (g = 0; g < 32; g++)
|
||||
for (b = 0; b < 16; b++)
|
||||
RGB8k[r][g][b] = BestColor (palette, r * 16, g * 8, b * 16, 256);
|
||||
for (b = 0; b < 32; b++)
|
||||
RGB32k[r][g][b] = BestColor (palette,
|
||||
(r<<3)|(r>>2), (g<<3)|(g>>2), (b<<3)|(b>>2), 256);
|
||||
}
|
||||
|
||||
{
|
||||
|
@ -427,9 +426,9 @@ void BuildTransTable (unsigned int *palette)
|
|||
|
||||
for (x = 0; x < 65; x++)
|
||||
for (y = 0; y < 256; y++)
|
||||
Col2RGB8[x][y] = (((RPART(palette[y])*x)>>5)<<9) |
|
||||
(((GPART(palette[y])*x)>>4)<<18) |
|
||||
((BPART(palette[y])*x)>>5);
|
||||
Col2RGB8[x][y] = (((RPART(palette[y])*x)>>4)<<20) |
|
||||
((GPART(palette[y])*x)>>4) |
|
||||
(((BPART(palette[y])*x)>>4)<<10);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -70,9 +70,9 @@ extern int dirtybox[4];
|
|||
extern byte newgamma[256];
|
||||
extern cvar_t *gammalevel;
|
||||
|
||||
// DOSDoom 0.65's neat-o translucency tables
|
||||
// translucency tables
|
||||
extern unsigned int Col2RGB8[65][256];
|
||||
extern byte RGB8k[16][32][16];
|
||||
extern byte RGB32k[32][32][32];
|
||||
|
||||
extern int CleanWidth, CleanHeight, CleanXfac, CleanYfac;
|
||||
|
||||
|
|
|
@ -555,6 +555,7 @@ void I_InitSound (void)
|
|||
(DLGPROC)InitBoxCallback)) {
|
||||
case IDC_NOSOUND:
|
||||
MIDASsetOption (MIDAS_OPTION_FORCE_NO_SOUND, TRUE);
|
||||
nosound = true;
|
||||
break;
|
||||
|
||||
case IDQUIT:
|
||||
|
|
3136
code/doominfo.lmp
3136
code/doominfo.lmp
File diff suppressed because it is too large
Load diff
6963
code/hexninfo.lmp
6963
code/hexninfo.lmp
File diff suppressed because it is too large
Load diff
|
@ -965,8 +965,9 @@ static BOOL P_GetScriptGoing (mobj_t *who, line_t *where, int num, int *code,
|
|||
if (delay) {
|
||||
// From Hexen: Give the world some time to set itself up before
|
||||
// running open scripts.
|
||||
script->state = delayed;
|
||||
script->statedata = TICRATE;
|
||||
//script->state = delayed;
|
||||
//script->statedata = TICRATE;
|
||||
script->state = running;
|
||||
} else {
|
||||
script->state = running;
|
||||
}
|
||||
|
|
|
@ -369,8 +369,8 @@ void rt_lucent1col (int hx, int sx, int yl, int yh)
|
|||
|
||||
fg = fg2rgb[fg];
|
||||
bg = bg2rgb[bg];
|
||||
fg = (fg+bg) | 0xf07c3e1f;
|
||||
*dest = RGB8k[0][0][(fg>>5) & (fg>>19)];
|
||||
fg = (fg+bg) | 0x1f07c1f;
|
||||
*dest = RGB32k[0][0][fg & (fg>>15)];
|
||||
source += 4;
|
||||
dest += pitch;
|
||||
} while (--count);
|
||||
|
@ -410,15 +410,15 @@ void rt_lucent2cols (int hx, int sx, int yl, int yh)
|
|||
unsigned int bg = dest[0];
|
||||
fg = fg2rgb[fg];
|
||||
bg = bg2rgb[bg];
|
||||
fg = (fg+bg) | 0xf07c3e1f;
|
||||
dest[0] = RGB8k[0][0][(fg>>5) & (fg>>19)];
|
||||
fg = (fg+bg) | 0x1f07c1f;
|
||||
dest[0] = RGB32k[0][0][fg & (fg>>15)];
|
||||
|
||||
fg = colormap[source[1]];
|
||||
bg = dest[1];
|
||||
fg = fg2rgb[fg];
|
||||
bg = bg2rgb[bg];
|
||||
fg = (fg+bg) | 0xf07c3e1f;
|
||||
dest[1] = RGB8k[0][0][(fg>>5) & (fg>>19)];
|
||||
fg = (fg+bg) | 0x1f07c1f;
|
||||
dest[1] = RGB32k[0][0][fg & (fg>>15)];
|
||||
|
||||
source += 4;
|
||||
dest += pitch;
|
||||
|
@ -459,30 +459,30 @@ void rt_lucent4cols (int sx, int yl, int yh)
|
|||
unsigned int bg = dest[0];
|
||||
fg = fg2rgb[fg];
|
||||
bg = bg2rgb[bg];
|
||||
fg = (fg+bg) | 0xf07c3e1f;
|
||||
dest[0] = RGB8k[0][0][(fg>>5) & (fg>>19)];
|
||||
fg = (fg+bg) | 0x1f07c1f;
|
||||
dest[0] = RGB32k[0][0][fg & (fg>>15)];
|
||||
|
||||
fg = colormap[source[1]];
|
||||
bg = dest[1];
|
||||
fg = fg2rgb[fg];
|
||||
bg = bg2rgb[bg];
|
||||
fg = (fg+bg) | 0xf07c3e1f;
|
||||
dest[1] = RGB8k[0][0][(fg>>5) & (fg>>19)];
|
||||
fg = (fg+bg) | 0x1f07c1f;
|
||||
dest[1] = RGB32k[0][0][fg & (fg>>15)];
|
||||
|
||||
|
||||
fg = colormap[source[2]];
|
||||
bg = dest[2];
|
||||
fg = fg2rgb[fg];
|
||||
bg = bg2rgb[bg];
|
||||
fg = (fg+bg) | 0xf07c3e1f;
|
||||
dest[2] = RGB8k[0][0][(fg>>5) & (fg>>19)];
|
||||
fg = (fg+bg) | 0x1f07c1f;
|
||||
dest[2] = RGB32k[0][0][fg & (fg>>15)];
|
||||
|
||||
fg = colormap[source[3]];
|
||||
bg = dest[3];
|
||||
fg = fg2rgb[fg];
|
||||
bg = bg2rgb[bg];
|
||||
fg = (fg+bg) | 0xf07c3e1f;
|
||||
dest[3] = RGB8k[0][0][(fg>>5) & (fg>>19)];
|
||||
fg = (fg+bg) | 0x1f07c1f;
|
||||
dest[3] = RGB32k[0][0][fg & (fg>>15)];
|
||||
|
||||
source += 4;
|
||||
dest += pitch;
|
||||
|
@ -526,8 +526,8 @@ void rt_tlatelucent1col (int hx, int sx, int yl, int yh)
|
|||
|
||||
fg = fg2rgb[fg];
|
||||
bg = bg2rgb[bg];
|
||||
fg = (fg+bg) | 0xf07c3e1f;
|
||||
*dest = RGB8k[0][0][(fg>>5) & (fg>>19)];
|
||||
fg = (fg+bg) | 0x1f07c1f;
|
||||
*dest = RGB32k[0][0][fg & (fg>>15)];
|
||||
source += 4;
|
||||
dest += pitch;
|
||||
} while (--count);
|
||||
|
@ -569,15 +569,15 @@ void rt_tlatelucent2cols (int hx, int sx, int yl, int yh)
|
|||
unsigned int bg = dest[0];
|
||||
fg = fg2rgb[fg];
|
||||
bg = bg2rgb[bg];
|
||||
fg = (fg+bg) | 0xf07c3e1f;
|
||||
dest[0] = RGB8k[0][0][(fg>>5) & (fg>>19)];
|
||||
fg = (fg+bg) | 0x1f07c1f;
|
||||
dest[0] = RGB32k[0][0][fg & (fg>>15)];
|
||||
|
||||
fg = colormap[translation[source[1]]];
|
||||
bg = dest[1];
|
||||
fg = fg2rgb[fg];
|
||||
bg = bg2rgb[bg];
|
||||
fg = (fg+bg) | 0xf07c3e1f;
|
||||
dest[1] = RGB8k[0][0][(fg>>5) & (fg>>19)];
|
||||
fg = (fg+bg) | 0x1f07c1f;
|
||||
dest[1] = RGB32k[0][0][fg & (fg>>15)];
|
||||
|
||||
source += 4;
|
||||
dest += pitch;
|
||||
|
@ -620,30 +620,30 @@ void rt_tlatelucent4cols (int sx, int yl, int yh)
|
|||
unsigned int bg = dest[0];
|
||||
fg = fg2rgb[fg];
|
||||
bg = bg2rgb[bg];
|
||||
fg = (fg+bg) | 0xf07c3e1f;
|
||||
dest[0] = RGB8k[0][0][(fg>>5) & (fg>>19)];
|
||||
fg = (fg+bg) | 0x1f07c1f;
|
||||
dest[0] = RGB32k[0][0][fg & (fg>>15)];
|
||||
|
||||
fg = colormap[translation[source[1]]];
|
||||
bg = dest[1];
|
||||
fg = fg2rgb[fg];
|
||||
bg = bg2rgb[bg];
|
||||
fg = (fg+bg) | 0xf07c3e1f;
|
||||
dest[1] = RGB8k[0][0][(fg>>5) & (fg>>19)];
|
||||
fg = (fg+bg) | 0x1f07c1f;
|
||||
dest[1] = RGB32k[0][0][fg & (fg>>15)];
|
||||
|
||||
|
||||
fg = colormap[translation[source[2]]];
|
||||
bg = dest[2];
|
||||
fg = fg2rgb[fg];
|
||||
bg = bg2rgb[bg];
|
||||
fg = (fg+bg) | 0xf07c3e1f;
|
||||
dest[2] = RGB8k[0][0][(fg>>5) & (fg>>19)];
|
||||
fg = (fg+bg) | 0x1f07c1f;
|
||||
dest[2] = RGB32k[0][0][fg & (fg>>15)];
|
||||
|
||||
fg = colormap[translation[source[3]]];
|
||||
bg = dest[3];
|
||||
fg = fg2rgb[fg];
|
||||
bg = bg2rgb[bg];
|
||||
fg = (fg+bg) | 0xf07c3e1f;
|
||||
dest[3] = RGB8k[0][0][(fg>>5) & (fg>>19)];
|
||||
fg = (fg+bg) | 0x1f07c1f;
|
||||
dest[3] = RGB32k[0][0][fg & (fg>>15)];
|
||||
|
||||
source += 4;
|
||||
dest += pitch;
|
||||
|
|
3173
code/ticinfo.lmp
3173
code/ticinfo.lmp
File diff suppressed because it is too large
Load diff
|
@ -134,8 +134,8 @@ void V_DrawLucentPatchP (byte *source, byte *dest, int count, int pitch)
|
|||
|
||||
fg = fg2rgb[fg];
|
||||
bg = bg2rgb[bg];
|
||||
fg = (fg+bg) | 0xf07c3e1f;
|
||||
*dest = RGB8k[0][0][(fg>>5) & (fg>>19)];
|
||||
fg = (fg+bg) | 0x1f07c1f;
|
||||
*dest = RGB32k[0][0][fg & (fg>>15)];
|
||||
dest += pitch;
|
||||
} while (--count);
|
||||
}
|
||||
|
@ -161,8 +161,8 @@ void V_DrawLucentPatchSP (byte *source, byte *dest, int count, int pitch, int yi
|
|||
|
||||
fg = fg2rgb[fg];
|
||||
bg = bg2rgb[bg];
|
||||
fg = (fg+bg) | 0xf07c3e1f;
|
||||
*dest = RGB8k[0][0][(fg>>5) & (fg>>19)];
|
||||
fg = (fg+bg) | 0x1f07c1f;
|
||||
*dest = RGB32k[0][0][fg & (fg>>15)];
|
||||
dest += pitch;
|
||||
c += yinc;
|
||||
} while (--count);
|
||||
|
@ -214,8 +214,8 @@ void V_DrawTlatedLucentPatchP (byte *source, byte *dest, int count, int pitch)
|
|||
|
||||
fg = fg2rgb[fg];
|
||||
bg = bg2rgb[bg];
|
||||
fg = (fg+bg) | 0xf07c3e1f;
|
||||
*dest = RGB8k[0][0][(fg>>5) & (fg>>19)];
|
||||
fg = (fg+bg) | 0x1f07c1f;
|
||||
*dest = RGB32k[0][0][fg & (fg>>15)];
|
||||
dest += pitch;
|
||||
} while (--count);
|
||||
}
|
||||
|
@ -242,8 +242,8 @@ void V_DrawTlatedLucentPatchSP (byte *source, byte *dest, int count, int pitch,
|
|||
|
||||
fg = fg2rgb[fg];
|
||||
bg = bg2rgb[bg];
|
||||
fg = (fg+bg) | 0xf07c3e1f;
|
||||
*dest = RGB8k[0][0][(fg>>5) & (fg>>19)];
|
||||
fg = (fg+bg) | 0x1f07c1f;
|
||||
*dest = RGB32k[0][0][fg & (fg>>15)];
|
||||
dest += pitch;
|
||||
c += yinc;
|
||||
} while (--count);
|
||||
|
@ -290,8 +290,8 @@ void V_DrawColorLucentPatchP (byte *source, byte *dest, int count, int pitch)
|
|||
do
|
||||
{
|
||||
unsigned int bg = bg2rgb[*dest];
|
||||
bg = (bg+bg) | 0xf07c3e1f;
|
||||
*dest = RGB8k[0][0][(bg>>5) & (bg>>19)];
|
||||
bg = (bg+bg) | 0x1f07c1f;
|
||||
*dest = RGB32k[0][0][bg & (bg>>15)];
|
||||
dest += pitch;
|
||||
} while (--count);
|
||||
}
|
||||
|
|
|
@ -368,11 +368,13 @@ void I_PlaySong (int handle, int _looping)
|
|||
UnprepareMIDIHeaders (info);
|
||||
midiStreamClose (info->midiStream);
|
||||
info->midiStream = NULL;
|
||||
info->status = STATE_STOPPED;
|
||||
}
|
||||
} else {
|
||||
UnprepareMIDIHeaders (info);
|
||||
midiStreamClose (info->midiStream);
|
||||
info->midiStream = NULL;
|
||||
info->status = STATE_STOPPED;
|
||||
}
|
||||
} else {
|
||||
MCIError (res, "opening MIDI stream");
|
||||
|
@ -380,6 +382,10 @@ void I_PlaySong (int handle, int _looping)
|
|||
Printf (PRINT_HIGH, "Trying again with MIDI mapper\n");
|
||||
SetCVarFloat (snd_mididevice, -1.0f);
|
||||
}
|
||||
else
|
||||
{
|
||||
info->status = STATE_STOPPED;
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
|
@ -391,7 +397,10 @@ void I_PlaySong (int handle, int _looping)
|
|||
}
|
||||
break;
|
||||
}
|
||||
currSong = info;
|
||||
if (info->status == STATE_PLAYING)
|
||||
currSong = info;
|
||||
else
|
||||
currSong = NULL;
|
||||
}
|
||||
|
||||
void I_PauseSong (int handle)
|
||||
|
|
|
@ -555,6 +555,7 @@ void I_InitSound (void)
|
|||
(DLGPROC)InitBoxCallback)) {
|
||||
case IDC_NOSOUND:
|
||||
MIDASsetOption (MIDAS_OPTION_FORCE_NO_SOUND, TRUE);
|
||||
nosound = true;
|
||||
break;
|
||||
|
||||
case IDQUIT:
|
||||
|
|
|
@ -100,8 +100,8 @@ END
|
|||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 1,17,2,0
|
||||
PRODUCTVERSION 1,17,2,0
|
||||
FILEVERSION 1,17,3,0
|
||||
PRODUCTVERSION 1,17,3,0
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
|
@ -119,13 +119,13 @@ BEGIN
|
|||
VALUE "Comments", "Thanks to id Software for creating DOOM and then releasing the source code. Thanks also to TeamTNT for creating BOOM, which ZDoom is partially based on.\0"
|
||||
VALUE "CompanyName", " \0"
|
||||
VALUE "FileDescription", "ZDoom\0"
|
||||
VALUE "FileVersion", "1.17b\0"
|
||||
VALUE "FileVersion", "1.17c\0"
|
||||
VALUE "InternalName", "ZDoom\0"
|
||||
VALUE "LegalCopyright", "Copyright © 1999, id Software & Randy Heit\0"
|
||||
VALUE "LegalTrademarks", "Doom® is a Registered Trademark of id Software, Inc.\0"
|
||||
VALUE "OriginalFilename", "zdoom.exe\0"
|
||||
VALUE "ProductName", "ZDoom\0"
|
||||
VALUE "ProductVersion", "1.17b\0"
|
||||
VALUE "ProductVersion", "1.17c\0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
|
29
readme.txt
29
readme.txt
|
@ -1,4 +1,4 @@
|
|||
This is the source code for ZDoom 1.17b released on 15 March 1999.
|
||||
This is the source code for ZDoom 1.17c released on 5 May 1999.
|
||||
|
||||
It is based on the Linux DOOM sources that were prepared by B. Krenheimer
|
||||
and generously released by John Carmack shortly before Christmas, 1997. If
|
||||
|
@ -34,22 +34,15 @@ packages if you don't already have them. These are:
|
|||
MIDAS! I use a hack from NTDOOM that crashes with the DLL but not the
|
||||
static library.
|
||||
|
||||
Prometheus Truecolor Library (PTC)
|
||||
Prometheus Truecolor Library (PTC) 0.72
|
||||
http://www.gaffer.org/ptc
|
||||
|
||||
A special note about PTC is that the version available at gaffer.org
|
||||
will not work unmodified with ZDoom. A context diff has been provided
|
||||
along with a copy of GNU patch to generate a version of PTC that works
|
||||
with ZDoom. To use it, you need to download the source code for PTC
|
||||
0.72 and the DirectX fix. Extract it to some directory (in my case
|
||||
f:/games/doom/ptc/source), then using a DOS window, CD to that
|
||||
directory and apply the ptc.diff file using the command line:
|
||||
IMPORTANT NOTE! PTC 0.72 is no longer available at gaffer.org. If you
|
||||
need it, e-mail me, and I can send you the source for it.
|
||||
|
||||
patch < ptc.diff
|
||||
|
||||
Then you'll need to build at least the release build of PTC. The
|
||||
batch files provided with PTC to do this will generate the library
|
||||
somewhere in ../library. In my case, this ends up being
|
||||
Once you get the source, you'll need to build at least the release
|
||||
build of PTC. The batch files provided with PTC to do this will generate
|
||||
the library somewhere in ../library. In my case, this ends up being
|
||||
d:/games/doom/ptc/library/win32/vc5.x.
|
||||
|
||||
NASM (for the assembly files)
|
||||
|
@ -72,11 +65,11 @@ assumptions about the development environment:
|
|||
PTC is installed in d:/games/doom/ptc.
|
||||
|
||||
If you want to put things in different places, you'll need to adjust the
|
||||
project file accordingly.
|
||||
project file's settings accordingly.
|
||||
|
||||
This code should also compile with Watcom C 10.6 (and presumably newer
|
||||
versions as well). If you use Watcom, please tell me if the following NASM
|
||||
line generates object files far tmap.nas and misc.nas that are usable with
|
||||
line generates object files for tmap.nas and misc.nas that are usable with
|
||||
the Watcom linker:
|
||||
|
||||
nasm -o file.obj -f obj -d M_TARGET_WATCOM file.nas
|
||||
|
@ -84,7 +77,7 @@ the Watcom linker:
|
|||
(The line I use is "nasm -o file.obj -f win32 file.nas" which works with
|
||||
Microsoft's linker, but not Watcom's.)
|
||||
|
||||
If you want to recompile the DOS code, you need DJGPP and allegro. Allegro
|
||||
If you want to recompile the DOS code, you need DJGPP and Allegro. Allegro
|
||||
is only needed because MIDAS uses its interrupt wrappers. I don't use it
|
||||
for anything myself. The makefile.dj file can be used with make to
|
||||
generate either a release or debug build. (Create the appropriate
|
||||
|
@ -92,4 +85,4 @@ subdirectories under code/djgpp first.)
|
|||
|
||||
|
||||
Randy Heit
|
||||
rheit@usa.net
|
||||
rheit@iastate.edu
|
Loading…
Reference in a new issue