first commit

This commit is contained in:
2019-12-30 17:23:05 +01:00
commit 7fe19ee89f
1149 changed files with 271279 additions and 0 deletions

182
tools/TexMex/ReadMe.txt Normal file
View File

@@ -0,0 +1,182 @@
Tex-Mex 3.4
------------
Release : 16 October 2000
-------------------------
1. Fixed a crash bug when Shift-selecting with no other texture selected
2. Fixed pcx export (was upside down)
3. Added support for import of FAKK2 (.ftx) textures
Release : 06 July 2000
----------------------
Export has been broke for a while now, and this release
fixes that, all exporters work fine again. As well as a few
other minor enhancements.
Release : 21 June 2000
-----------------------
A minor upgrade that fixes tga,jpg & bmp single item export prom
and adds support for .m8 (heretic2) and .m32 (SOF) textures
Release : 20 June 2000
-----------------------
new for 3.2
1. Texmex can now save to BSP's. Modifying the size of the textures or the number of
textures will disable it. So now you cab open a BSP, paste over a texture (in the
detail view) and save it back to disk. mapname.bak is created automatically.
2. The size of the wad & detail views is now persistant between sessions.
3. If the detail view gets lost behind the wad view, clicking the detail view icon
or double clicking an item in the was will bring it bakc to the forefront.
4. Mip export has been fixed and should now be compatible with the Mip format
of other Apps, such as Wally.
5. Jpg Batch export has now been fixed.
6. The folder browser (for batch exports) has been changed, and now allows the
creation of new folders while browsing.
Release : 6 March 2000
-----------------------
new for 3.1 :-
1. Texmex now supports the selection of more than 1 item
and most operations are carried out on the currently selected items.
2. Much tidyed up interface and GUI layout using new IE flat toolbars.
3. Integrated RemipDLX code into texmex for improved mipping, courtesy of Neal White.
Release : 29 December 1999
-------------------------
new for 3.0 :-
1. You can now search for textures by typing its name in the wad view
2. You can change the display brightness of all views using the new 'sun' icons on the toolbar
or the slider in the preferences.
3. You can change the display size of textures in the wad view using + and -
4. You can change the default texture size in the preferences.
5. Added a log file feature. All texture import/renames are logged to a file.
6. Added support for the jpeg file format.
7. Added an automip option when loading images (under preferences)
8. Fixed a problem with empty wads crashing texmex.
Release : 02 October 1999
-------------------------
new for 2.9 :-
1. Added an undo option to texmex. The defaul is ten operations (you can change this in the options)
2. Added a cancel option to the resize dialog
3. Added a 'skip file' option to the console picture size dialog (wad reading)
4. Reduced max texture name length to 15 characters. This is to stop WorldCraft freaking out.
(all wads loaded, now have their names truncated to 15 chars)
5. Fixed a regsitry problem whereby double clicking a wad in explorer didn't always work.
6. Ive now dropped the beta tag. Seems pretty stable now, so i think im safe with this one :)
7. Fixed a couple of custom texture bugs (automip was b0rked).
Released : 07 September 1999
----------------------------
New for 2.8 :-
1. Texmex now supports Wads that use custom palettes (T/C's e.t.c.)
2. Palettes can be added, replaced or deleted with all color conversions if required
3. Added item on status bar for palette type (quake/custom).
4. Added support for importing Blood2/Shogo DTX files.
5. Submips can now be pasted and loaded individually if required
6. When loading a new image (detail view) the item is now only renamed if it was previously unnamed.
7. 'Out of Memory' errors are handled much better now.
8. Fixed problem when reading in some BSP files.
9. Fixed small bug in BMP save routine that could cause a memory leak.
10. Improved TGA load routine to include compressed 24&32 bit files (e.g. diamond2c.tga in Q3Test).
11. Fixed 'Export All' for TGA and BMP (images were flipped).
12. Fixed problem when loading help and tip's.
Known issues :-
1. Brighness Adjust is disabled when using a custom palette. Fixing this would involve a complete
re-write of the adjustment algorithm.
----------------------------------------------------------------------------------
New for Beta 2.7 :-
1. Animated view now supports water/lava, sky and animated textures.
2. Multiple animated views can be opened at a time.
3. Tiling size in animated and detailed view can be adjusted using [ ]
4. Zoom in animated and tiling view can be adjusted using + -
5. Image save now supports PCX.
6. Export images function now supports TGA24 and PCX formats.
7. Resource leak in animated view fixed.
Known issues :-
1. None as yet
------------------------------------------------------------
New for Beta 2.6 :-
1. Image pasting now supports 1,4,8 and 24 bit images
2. The WAL reader now supports Daiktana textures
3. Added a new view for animated textures
4. Removed the 100 file import limit
Known issues :-
1. None as yet
--------------------------------------------------------
New for Beta 2.5 :-
1. TexMex can now read and paste any size images (previous versions currupted with some sizes)
2. Reading 32 bit TGA images is now supported but the mask is ignored.
3. The first draft of a Help system is included with this release.
Known Issues :-
1. Still the 100 file import limit.
2. If the HTML-Help doesn't work for you then please let me know. Include you system details (OS, IE4 e.t.c.)
----------------------------------------------------
New for Beta2 :-
1. Wad3 import/export now implemented.
2. Quake2 Export Palette conversion fixed.
3. Texture name section of status bar increased (long texture names were cut off previously)
4. When importing multiple files no message box appears during the import
but a list of ignored files is presented at the end.
Known Issues :-
1. The file import dialog won't accept more than about 100 files at a time.
2. You tell me :)
------------------------------------------------
Send any bug reports (and if possible any files that caused the bug) to me at
mickey@planetquake.com
Check the website for Updates and news
www.planetquake.com/texmex

BIN
tools/TexMex/TexMex.exe Normal file

Binary file not shown.

BIN
tools/TexMex/texmex.chm Normal file

Binary file not shown.

1
tools/TexMex/texmex.log Normal file
View File

@@ -0,0 +1 @@
30/12/2019 16:19:21 'batt1top' extracted from b_batt1.bsp

20
tools/TexMex/tips.txt Normal file
View File

@@ -0,0 +1,20 @@
You can modify textures within a BSP file and save back to the BSP from the file menu
Clicking the detail view icon will always bring a hidded detail view back to the front
You can select more than one item by using Ctrl+Left Click
You can find a texture quickly by typing its name in the wad view.
You can change the display size of textures in the wad view using + and -
The tiling size in the Tiled view can be adjusted using [ and ]
You can adjust the zoom of the Deatil view using + and -
Kickin says 'Never take a knife to a gunfight'
TexMex keeps a log of all textures extractions, so you can trace back where those obscure textures cam from.
You can copy&paste between TexMex and most other graphics applications.#@#@All neccessary conversions are handled automatically.
Tex-Mex can read WAD2, WAD3 and BSP files.#@#@As well as WAL, BMP, PCX, JPG and TGA files as images.When you paste or load an image#@The item will automatically resize#@to accomodate the new image.
Pasted and loaded images are#@automatically remapped to use the#@Quake palette.
Auto-mip will scale the image#@to generate the three sub-mips#@that Quake requires for a texture.
If you need to import a lot of images as Textures create an Empty wad select Import from the File menu.#@You can now choose the required file format and Select all the files you wish to import.#@#@A new texture Item is created for each image.
Non-texture items can be removed#@automatically when a Wad is loaded.#@#@Check the option in preferences.
The background and text colors#@for both views can be changed in#@the preferences section.
Do people really read these tips?#@#@I always turn them off from the start :)
There's now more#@
No, really, that's it
You don't believe me ?#@

77
tools/TexMex/uninstal.log Normal file
View File

@@ -0,0 +1,77 @@
[Header]
Signature=VISE
Version=0001
RemoveInUseFiles=0
RegistryKeyName=TexMex
Product Name=TexMex
[WinNT]
AdminPrivileges=1
[Directories2]
count=7
0=C:\Program Files
1=C:\Program Files\TexMex
2=C:\Documents and Settings
3=C:\Documents and Settings\All Users
4=C:\Documents and Settings\All Users\<5C>X<EFBFBD>^<5E>[<5B>g <20><><EFBFBD>j<EFBFBD><6A><EFBFBD>[
5=C:\Documents and Settings\All Users\<5C>X<EFBFBD>^<5E>[<5B>g <20><><EFBFBD>j<EFBFBD><6A><EFBFBD>[\<5C>v<EFBFBD><76><EFBFBD>O<EFBFBD><4F><EFBFBD><EFBFBD>
6=C:\Documents and Settings\All Users\<5C>X<EFBFBD>^<5E>[<5B>g <20><><EFBFBD>j<EFBFBD><6A><EFBFBD>[\<5C>v<EFBFBD><76><EFBFBD>O<EFBFBD><4F><EFBFBD><EFBFBD>\TexMex
[Files]
count=8
0=C:\Program Files\TexMex\TexMex.exe
1=C:\Program Files\TexMex\texmex.chm
2=C:\Program Files\TexMex\ReadMe.txt
3=C:\Program Files\TexMex\tips.txt
4=C:\Documents and Settings\All Users\<5C>X<EFBFBD>^<5E>[<5B>g <20><><EFBFBD>j<EFBFBD><6A><EFBFBD>[\<5C>v<EFBFBD><76><EFBFBD>O<EFBFBD><4F><EFBFBD><EFBFBD>\TexMex\TexMex.lnk
5=C:\Documents and Settings\All Users\<5C>X<EFBFBD>^<5E>[<5B>g <20><><EFBFBD>j<EFBFBD><6A><EFBFBD>[\<5C>v<EFBFBD><76><EFBFBD>O<EFBFBD><4F><EFBFBD><EFBFBD>\TexMex\TexMex Help.lnk
6=C:\Documents and Settings\All Users\<5C>X<EFBFBD>^<5E>[<5B>g <20><><EFBFBD>j<EFBFBD><6A><EFBFBD>[\<5C>v<EFBFBD><76><EFBFBD>O<EFBFBD><4F><EFBFBD><EFBFBD>\TexMex\Texmex ReadMe.lnk
7=C:\Documents and Settings\All Users\<5C>X<EFBFBD>^<5E>[<5B>g <20><><EFBFBD>j<EFBFBD><6A><EFBFBD>[\<5C>v<EFBFBD><76><EFBFBD>O<EFBFBD><4F><EFBFBD><EFBFBD>\TexMex\Remove TexMex.lnk
[Shortcuts]
0=C:\DOCUME~1\Andy\<5C>f<EFBFBD>X<EFBFBD>N~1\TexMex.lnk
[AlwaysRemoveRegKeys]
0=HKEY_CLASSES_ROOT,.wad
count=6
1=HKEY_CLASSES_ROOT,wadfile
2=HKEY_CLASSES_ROOT,wadfile\DefaultIcon
3=HKEY_CLASSES_ROOT,wadfile\shell
4=HKEY_CLASSES_ROOT,wadfile\shell\open
5=HKEY_CLASSES_ROOT,wadfile\shell\open\command
[RegKeys]
0=HKEY_CLASSES_ROOT,.wad
count=13
1=HKEY_CLASSES_ROOT,wadfile
2=HKEY_CLASSES_ROOT,wadfile
3=HKEY_CLASSES_ROOT,wadfile\DefaultIcon
4=HKEY_CLASSES_ROOT,wadfile
5=HKEY_CLASSES_ROOT,wadfile\shell
6=HKEY_CLASSES_ROOT,wadfile
7=HKEY_CLASSES_ROOT,wadfile\shell
8=HKEY_CLASSES_ROOT,wadfile\shell\open
9=HKEY_CLASSES_ROOT,wadfile
10=HKEY_CLASSES_ROOT,wadfile\shell
11=HKEY_CLASSES_ROOT,wadfile\shell\open
12=HKEY_CLASSES_ROOT,wadfile\shell\open\command
[RegNames2]
0=HKEY_CLASSES_ROOT||.wad|| || || ||1946737215
count=4
1=HKEY_CLASSES_ROOT||wadfile|| || || ||2637521462
2=HKEY_CLASSES_ROOT||wadfile\DefaultIcon|| || || ||1068637794
3=HKEY_CLASSES_ROOT||wadfile\shell\open\command|| || || ||248867280
[AlwaysRemoveRegNames2]
0=HKEY_CLASSES_ROOT||.wad||
count=4
1=HKEY_CLASSES_ROOT||wadfile||
2=HKEY_CLASSES_ROOT||wadfile\DefaultIcon||
3=HKEY_CLASSES_ROOT||wadfile\shell\open\command||
[Strings]
IDS_STRING1=Are you sure you want to completely remove the selected application and all of its components?
IDS_STRING2=Confirm File Deletion
IDS_STRING3=The system indicates that the following shared file is no longer used by any programs.
IDS_STRING4=Remove Shared File?
IDS_STRING5=Uninstall successfully completed.
IDS_STRING6=Uninstall
IDS_STRING7=If any programs are still using this file and it is removed, those programs may not function. Are you sure you want to remove the shared file?
IDS_STRING8=Uninstall was partially successful.
IDS_ADMINPRIVILEGESNEEDED=Administrative privileges are needed to uninstall this software.
IDS_YES=&Yes
IDS_NO=&No
IDS_YESTOALL=Yes to &All

BIN
tools/ericw_tools/bspinfo Executable file

Binary file not shown.

BIN
tools/ericw_tools/bsputil Executable file

Binary file not shown.

BIN
tools/ericw_tools/libembree.so.2 Executable file

Binary file not shown.

BIN
tools/ericw_tools/libtbb.so.2 Executable file

Binary file not shown.

Binary file not shown.

BIN
tools/ericw_tools/light Executable file

Binary file not shown.

BIN
tools/ericw_tools/qbsp Executable file

Binary file not shown.

BIN
tools/ericw_tools/vis Executable file

Binary file not shown.

View File

@@ -0,0 +1,339 @@
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.
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) <year> <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 instead of this License.

View File

@@ -0,0 +1,90 @@
QuakeSpasm supports ogg, mp3 and wav external music files to be played
instead of cd music. What you should do is simple:
1. Use your favorite cd-ripper application and rip your quake cdrom
audio tracks, convert them to ogg or mp3 so they occupy less space,
like track02.ogg, track03.ogg, etc.
Note #1: There is no such thing as track01: the first tracks of
original Quake and the mission pack cdroms are always data
tracks.
Note #2: Since the Quake cdrom audio tracks are pre-emphasized, you
should de-emphasize them during or after ripping to make
them sound right. (thanks to Sander van Dijk for this note)
2. Go into your quake installation directory and create a new directory
id1/music (for windows users id1\music).
3. If you have the Scourge of Armagon mission pack, then create another
directory hipnotic/music . If you have the Dissolution of Eternity
then create another directory rogue/music .
4. Take the ripped music files from step1, place them under id1/music.
If you have the mission packs, repeat step1 for the mission packs,
too, and place the ripped music files under hipnotic/music for the
first mission pack or under rogue/music for the second mission pack.
5. All are ready to go: When a level starts, the engine will first try
playing the necessary cdaudio track and if it doesn't find the cdrom
it will use the ripped music files instead.
New console commands:
---------------------
- music <filename>
Start playing the requested music file.
Example: music mymusic1
Notice that you don't have to type the file extension: The requested
music will be searched with ogg, mp3, and then with a wav extension,
automatically.
If you do specify the file extension, like "music mymusic1.wav", then
it will honor your wish and try only the given type: this is good for
testing/comparing the same music in different formats.
- music_stop
Stops the playing music
- music_pause
Pauses the playing music
- music_resume
Resumes playing the music if it was paused
- music_loop 1
Makes the background music to loop (default behavior)
- music_loop 0
Makes the background music to play once and then stop
New cvars:
-------------------------
- bgm_extmusic (0 or 1): Disable or enable playback of external music
files instead of cdaudio. default is 1 (enabled).
New command line options:
-------------------------
- -noextmusic: Disables the playback of external music files instead of
cdaudio.
Music files in PAK files:
-------------------------
PAK-contained music files are fully supported.
Music file directories:
-------------------------
- The music files are always searched under the "music" subdirectory of
a game.
Music file search order:
-------------------------
The engine can handle multiple audio formats. The map-dictated music,
i.e. the ripped cd music, is always searched by the order of searchpath
priority: the file from the searchpath with the highest priority is
chosen, because it is most likely the one from our own game directory
itself. This way, if a mod has track02 as a mp3 or wav, which is below
track02.ogg in the music_handler order, the mp3 or wav will still have
priority over track02.ogg from the id1 game directory.

View File

@@ -0,0 +1,750 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<META NAME="GENERATOR" CONTENT="LinuxDoc-Tools 0.9.65">
<TITLE>QuakeSpasm</TITLE>
</HEAD>
<BODY>
<H1>QuakeSpasm</H1>
<H2></H2>
<P>
<PRE>
</PRE>
</P>
<P><EM>Page last edited: Sep. 2019</EM></P>
<P>
<H2><A NAME="toc1">1.</A> <A HREF="Quakespasm.html#s1">About </A></H2>
<P>
<H2><A NAME="toc2">2.</A> <A HREF="Quakespasm.html#s2">Downloads </A></H2>
<P>
<H2><A NAME="toc3">3.</A> <A HREF="Quakespasm.html#s3">Hints </A></H2>
<UL>
<LI><A NAME="toc3.1">3.1</A> <A HREF="Quakespasm.html#ss3.1">Music Playback</A>
<LI><A NAME="toc3.2">3.2</A> <A HREF="Quakespasm.html#ss3.2">Controller Support</A>
</UL>
<P>
<H2><A NAME="toc4">4.</A> <A HREF="Quakespasm.html#s4">Compiling and Installation</A></H2>
<UL>
<LI><A NAME="toc4.1">4.1</A> <A HREF="Quakespasm.html#ss4.1">Linux/Unix </A>
<LI><A NAME="toc4.2">4.2</A> <A HREF="Quakespasm.html#ss4.2">Windows </A>
<LI><A NAME="toc4.3">4.3</A> <A HREF="Quakespasm.html#ss4.3">Mac OS X </A>
</UL>
<P>
<H2><A NAME="toc5">5.</A> <A HREF="Quakespasm.html#s5">Known Bugs </A></H2>
<P>
<H2><A NAME="toc6">6.</A> <A HREF="Quakespasm.html#s6">Changes</A></H2>
<UL>
<LI><A NAME="toc6.1">6.1</A> <A HREF="Quakespasm.html#ss6.1">Changes in 0.93.2</A>
<LI><A NAME="toc6.2">6.2</A> <A HREF="Quakespasm.html#ss6.2">Changes in 0.93.1</A>
<LI><A NAME="toc6.3">6.3</A> <A HREF="Quakespasm.html#ss6.3">Changes in 0.93.0</A>
<LI><A NAME="toc6.4">6.4</A> <A HREF="Quakespasm.html#ss6.4">Changes in 0.92.1</A>
<LI><A NAME="toc6.5">6.5</A> <A HREF="Quakespasm.html#ss6.5">Changes in 0.92.0</A>
<LI><A NAME="toc6.6">6.6</A> <A HREF="Quakespasm.html#ss6.6">Changes in 0.91.0</A>
<LI><A NAME="toc6.7">6.7</A> <A HREF="Quakespasm.html#ss6.7">Changes in 0.90.1</A>
<LI><A NAME="toc6.8">6.8</A> <A HREF="Quakespasm.html#ss6.8">Changes in 0.90.0</A>
<LI><A NAME="toc6.9">6.9</A> <A HREF="Quakespasm.html#ss6.9">Changes in 0.85.9</A>
<LI><A NAME="toc6.10">6.10</A> <A HREF="Quakespasm.html#ss6.10">Changes in 0.85.8</A>
<LI><A NAME="toc6.11">6.11</A> <A HREF="Quakespasm.html#ss6.11">Changes in 0.85.7</A>
<LI><A NAME="toc6.12">6.12</A> <A HREF="Quakespasm.html#ss6.12">Changes in 0.85.6</A>
<LI><A NAME="toc6.13">6.13</A> <A HREF="Quakespasm.html#ss6.13">Changes in 0.85.5</A>
<LI><A NAME="toc6.14">6.14</A> <A HREF="Quakespasm.html#ss6.14">Changes in 0.85.4</A>
<LI><A NAME="toc6.15">6.15</A> <A HREF="Quakespasm.html#ss6.15">Changes in 0.85.3</A>
<LI><A NAME="toc6.16">6.16</A> <A HREF="Quakespasm.html#ss6.16">Changes in 0.85.2</A>
<LI><A NAME="toc6.17">6.17</A> <A HREF="Quakespasm.html#ss6.17">Changes in 0.85.1</A>
</UL>
<P>
<H2><A NAME="toc7">7.</A> <A HREF="Quakespasm.html#s7">Todo </A></H2>
<P>
<H2><A NAME="toc8">8.</A> <A HREF="Quakespasm.html#s8">Copyright </A></H2>
<P>
<H2><A NAME="toc9">9.</A> <A HREF="Quakespasm.html#s9">Contact </A></H2>
<P>
<H2><A NAME="toc10">10.</A> <A HREF="Quakespasm.html#s10">Links </A></H2>
<HR>
<H2><A NAME="s1">1.</A> <A HREF="#toc1">About </A></H2>
<P>
<A HREF="http://quakespasm.sourceforge.net">QuakeSpasm</A>
is a modern, cross-platform Quake 1 engine based on
<A HREF="http://www.celephais.net/fitzquake">FitzQuake</A>.</P>
<P>It includes support for 64 bit CPUs and custom music playback, a new
sound driver, some graphical niceities, and numerous bug-fixes and other improvements.</P>
<P>Quakespasm utilizes either the SDL or SDL2 frameworks, so choose which one works best for you.
SDL is probably less buggy, but SDL2 has nicer features and smoother mouse input - though no CD support.</P>
<H2><A NAME="s2">2.</A> <A HREF="#toc2">Downloads </A></H2>
<P>
<UL>
<LI>
<A HREF="http://quakespasm.sourceforge.net/download.htm">Project Downloads</A></LI>
<LI>
<A HREF="http://quakespasm.ericwa.com/job/quakespasm-sdl2/">Automatic Builds</A></LI>
</UL>
</P>
<H2><A NAME="s3">3.</A> <A HREF="#toc3">Hints </A></H2>
<P><EM>Visit the
<A HREF="http://www.celephais.net/fitzquake">FitzQuake homepage</A> for a full run-down of the engine's commands and variables.</EM></P>
<P>
<UL>
<LI>To disable some changes, use "<B>quakespasm -fitz</B>"
</LI>
<LI>Quakespasm's custom data is stored in "quakespasm.pak". Install this file alongside your id1 directory to enable the custom console background and other minor features.
</LI>
<LI>For different sound backend drivers use "<B>SDL_AUDIODRIVER=</B><EM>DRIVER</EM><B> ./quakespasm</B>"
, where DRIVER may be alsa, dsp, pulse, esd ...
</LI>
<LI><B>Shift+Escape</B> draws the Console.</LI>
<LI>From the console, use <B>UP</B> to browse the command line history and
<B>TAB</B> to autocomplete command and map names.</LI>
<LI>There is currently no CD Music volume support and SDL2 doesn't support CD audio. cd_sdl.c needs replacing with cd_linux.c, cd_bsd.c etc..</LI>
<LI>In windows, alternative CD drives are accessible by "<B>quakespasm -cddev F</B>" (for example)
</LI>
<LI>Quakespasm allows loading new games (mods) on the fly with "<B>game</B> <EM>GAMENAME {-quoth/hipnotic/rogue}</EM>"
</LI>
<LI>Use "<B>quakespasm -condebug</B>" to save console log to "qconsole.log". SDL2 builds no longer generate stdout.txt/stderr.txt.</LI>
</UL>
</P>
<H2><A NAME="ss3.1">3.1</A> <A HREF="#toc3.1">Music Playback</A>
</H2>
<P>Quakespasm can play various external music formats, including MP3, OGG and FLAC.
<UL>
<LI>Tracks should be named like "track02.ogg", "track03.ogg" ... (there is no track01) and placed into "Quake/id1/music".</LI>
<LI>Unix users may need some extra libraries installed: "libmad" or "libmpg123" for MP3, and "libogg" and "libvorbis" for OGG.</LI>
<LI>As of 0.90.0, music is played back at 44100 Hz by default with no need to adjust "-sndspeed".</LI>
<LI>Use the "-noextmusic" option to disable this feature.</LI>
<LI>See
<A HREF="Quakespasm-Music.txt">Quakespasm-Music.txt</A> for more details.</LI>
</UL>
</P>
<H2><A NAME="ss3.2">3.2</A> <A HREF="#toc3.2">Controller Support</A>
</H2>
<P>The SDL2 variant of Quakespasm supports Xbox 360 style game controllers.</P>
<P>The default configuration uses the left analog stick for movement and the right for looking.</P>
<P>If your controller doesn't work you can try placing
<A HREF="https://raw.githubusercontent.com/gabomdq/SDL_GameControllerDB/master/gamecontrollerdb.txt">this file</A> in your Quake directory, it is a community-maintained database that adds support for more controllers to SDL2.</P>
<H3>Cvars</H3>
<P>
<UL>
<LI>joy_deadzone - Fraction of the stick travel to be deadzone, between 0 and 1. Default 0.175.</LI>
<LI>joy_deadzone_trigger - Fraction of trigger range required to register a button press on the analog triggers, between 0 and 1. Default 0.2.</LI>
<LI>joy_sensitivity_yaw/pitch - Max angular speed in degrees/second when looking. Defaults are 300 for yaw (turning left/right) and 150 for pitch (up/down).</LI>
<LI>joy_exponent - For the look stick, the stick displacement (between 0 and 1) is raised to this power. Default is 3. A value of 1 would give a linear relationship between stick displacement and fraction of the maximum angular speed.</LI>
<LI>joy_invert - Set to 1 to invert the vertical axis of the look stick.</LI>
<LI>joy_swapmovelook - Set to 1 to swap the left and right analog stick functions. Default 0, move on the left stick, look on the right stick.</LI>
<LI>joy_enable - Set to 0 to disable controller support. Default 1.</LI>
</UL>
</P>
<H3>Buttons</H3>
<P>Some of the controller buttons are hardcoded to allow navigating the menu:</P>
<P>
<UL>
<LI>Back - alias for TAB</LI>
<LI>Start - alias for ESC</LI>
<LI>DPad, analog sticks - mapped to arrow keys</LI>
<LI>A Button - alias for ENTER in menus</LI>
<LI>B Button - alias for ESC in menus</LI>
</UL>
</P>
<P>These buttons can be bound normally:</P>
<P>
<UL>
<LI>LTRIGGER - Left trigger</LI>
<LI>RTRIGGER - Right trigger</LI>
<LI>LSHOULDER - Left shoulder button</LI>
<LI>RSHOULDER - Right shoulder button</LI>
<LI>LTHUMB - Clicking the left thumbstick</LI>
<LI>RTHUMB - Clicking the right thumbstick</LI>
<LI>ABUTTON</LI>
<LI>BBUTTON</LI>
<LI>XBUTTON</LI>
<LI>YBUTTON</LI>
</UL>
quakespasm.pak contains a default.cfg which has been updated to give some default bindings. L/R shoulder buttons are bound to weapon switching, and L/R triggers are jump and attack.</P>
<P>The controller support started as Jeremiah Sypult's implementation in Quakespasm-Rift and also uses ideas and code from LordHavoc (DarkPlaces).</P>
<H2><A NAME="s4">4.</A> <A HREF="#toc4">Compiling and Installation</A></H2>
<P>Quakespasm's (optional) custom data is now stored in the file <B>quakespasm.pak</B>. This file should be placed alongside your quakespasm binary and <B>id1</B> directory.</P>
<P><EM>To checkout the latest version of QuakeSpasm, do:</EM>
<B>svn co svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm</B></P>
<H2><A NAME="ss4.1">4.1</A> <A HREF="#toc4.1">Linux/Unix </A>
</H2>
<P>After extracting the source tarball, browse the Makefile and edit the music streaming options, then
<HR>
<PRE>
make
cp quakespasm /usr/local/games/quake (for example)
</PRE>
<HR>
<BR>
Compile time options include
<UL>
<LI><B>make DO_USERDIRS=1</B> to include user directories support</LI>
<LI><B>make DEBUG=1</B> for debugging</LI>
<LI><B>make SDL_CONFIG=</B><EM>/PATH/TO/SDL-CONFIG</EM> for unusual SDL installations</LI>
<LI><B>make USE_SDL2=1</B> to compile against SDL2 instead of SDL-1.2</LI>
</UL>
</P>
<P>Streaming music playback requires "libmad" or "libmpg123" for MP3, and "libogg" and "libvorbis" for OGG files.</P>
<P>The project can also be built with Codeblocks (project files included).</P>
<H2><A NAME="ss4.2">4.2</A> <A HREF="#toc4.2">Windows </A>
</H2>
<P>The QuakeSpasm developers cross-compile windows binaries using
<A HREF="http://www.mingw.org">MinGW</A> and
<A HREF="http://mingw-w64.sf.net">Mingw-w64</A>.</P>
<P>The project can also be built using Visual Studio 2005 (or newer).</P>
<H2><A NAME="ss4.3">4.3</A> <A HREF="#toc4.3">Mac OS X </A>
</H2>
<P>A Quakespasm App (including program launcher and update framework) can be made using the <B>Xcode</B> template found in the MacOSX directory.</P>
<P>Alternatively, have a look at <B>Makefile.darwin</B> for more instructions on building from a console.</P>
<H2><A NAME="s5">5.</A> <A HREF="#toc5">Known Bugs </A></H2>
<P>Brightness issues should be fixed with GLSL gamma in 0.90.1, if your system supports OpenGL 2. For reference on older systems:<BR>
Some versions of Xorg and SDL have brightness issues.<BR>
Try setting "export SDL_VIDEO_X11_NODIRECTCOLOR=1", or if you have Xorg >= 7.5 and broken brightness,
these patched libSDL binaries may help.
<UL>
<LI>
<A HREF="http://sf.net/projects/quakespasm/files/Support%20Files/libSDL_gamma_patched.tgz/download">Gamma patched libSDL (i686-linux)</A></LI>
<LI>
<A HREF="http://sf.net/projects/quakespasm/files/Support%20Files/libSDL_gamma_patched-AMD64.tgz/download">Gamma patched libSDL (x86_64-linux)</A></LI>
</UL>
</P>
<H2><A NAME="s6">6.</A> <A HREF="#toc6">Changes</A></H2>
<H2><A NAME="ss6.1">6.1</A> <A HREF="#toc6.1">Changes in 0.93.2</A>
</H2>
<P>
<UL>
<LI> Lightmaps are now dynamically allocated (from QSS), and BLOCK_WIDTH/HEIGHT raised from 128 to 256.</LI>
<LI> Fixed several uncheked limits that would crash the Slayer's Testaments mod (sf.net bug #33).</LI>
<LI> Raised MAXALIASTRIS from 2048 to 4096, so that the Slayer's Testaments mod works.</LI>
<LI> Fixed 'pants' and 'shirt' types so that those textures load correctly on platforms where char is unsigned by default (sf.net bug #28).</LI>
<LI> Windows audio: WASAPI-enabled SDL2 dlls function properly now.</LI>
<LI> Update the third-party libraries. Other fixes/cleanups.</LI>
</UL>
</P>
<H2><A NAME="ss6.2">6.2</A> <A HREF="#toc6.2">Changes in 0.93.1</A>
</H2>
<P>
<UL>
<LI> Fixed a fog regression which was introduced in 0.93.0.</LI>
<LI> Fixed a crash (buffer overflow) with invalid vis data.</LI>
<LI> Fixed buttons crushing players in 64-bit builds.</LI>
<LI> Change controller movement to use cubic easing by default; added "joy_exponent_move" cvar.</LI>
<LI> config.cfg is no longer written in case of a Sys_Error.</LI>
<LI> Fixed Opus encoded cd tracks not being recognized as ripped tracks.</LI>
<LI> Update the third-party libraries. Other fixes/cleanups.</LI>
</UL>
</P>
<H2><A NAME="ss6.3">6.3</A> <A HREF="#toc6.3">Changes in 0.93.0</A>
</H2>
<P>
<UL>
<LI> Raise default "joy_deadzone_trigger" cvar to 0.2.</LI>
<LI> Raise console buffer size to 1MB.</LI>
<LI> Raise MAX_STATIC_ENTITIES from 512 to 4096.</LI>
<LI> Raise MAX_STACK_DEPTH from 32 to 64.</LI>
<LI> Raise command buffer size from 8K to 256K to support large configs.</LI>
<LI> Remove MAX_EFRAGS and MAX_MAP_LEAFS limits.</LI>
<LI> Remove "Loadgame buffer overflow" limit, which could happen when loading DP or QSS saves.</LI>
<LI> Adjust "exceeds standard limit of" debug warnings to include the actual QS limit.</LI>
<LI> Change "game" command to now exec quake.rc.</LI>
<LI> Change "games" / "mods" commands to list all subdirectories.</LI>
<LI> Restore vid_refreshrate from fitzquake-0.85 for SDL2 builds.</LI>
<LI> Alpha-masked model support. (MF_HOLEY: 0x4000).</LI>
<LI> Invalid skin index now draws skin 0 (WinQuake behaviour) instead of blue checkerboard.</LI>
<LI> Change default screenshot format to png. The 'screenshot' command now supports optional format (tga, png or jpg) and quality (1-100) arguments.</LI>
<LI> Revert "always run" changes from 0.85.9 and move the QuakeSpasm customizations to a new "cl_alwaysrun" cvar: Set to 1 in order to scale forward/side/up speed by "cl_movespeedkey" (usually 2), and to make "speedkey" act as "slowkey".</LI>
<LI> Change the "always run" menu option to offer three choices:
<UL>
<LI> off (cl_alwaysrun 0, cl_forwardspeed 200, cl_backspeed 200)</LI>
<LI> vanilla (cl_alwaysrun 0, cl_forwardspeed 400, cl_backspeed 400)</LI>
<LI> quakespasm (cl_alwaysrun 1, cl_forwardspeed 200, cl_backspeed 200)</LI>
</UL>
</LI>
<LI> New "r_scale" cvar. Set to 2, 3, or 4 to render the view at 1/2, 1/3, or 1/4 resolution.</LI>
<LI> New "r_viewmodel_quake" cvar. Set to 1 for WinQuake gun position (from MarkV).</LI>
<LI> New "find" / "apropos" command, searches for commands/cvar names for the given substring (from Spike).</LI>
<LI> New "randmap" command for loading a random map.</LI>
<LI> New "gl_cshiftpercent_contents", "gl_cshiftpercent_damage", "gl_cshiftpercent_bonus", "gl_cshiftpercent_powerup" cvars for tuning the strength of specic view blends.</LI>
<LI> GL2 renderer: use a GLSL shader for world faces. Fixes reports of integrated+discrete GPU laptops having inconsistent fog rendering.</LI>
<LI> Fix macOS startup delay (avoid calling gethostbyname() for ".local" hostnames).</LI>
<LI> Fix memory corruption in PF_lightstyle with out of bounds lightstyles.</LI>
<LI> Fix crash in BoundPoly with polygons extending beyond +/-9999.</LI>
<LI> Fix QS window to stay on the current monitor when changing video modes (SDL2 only).</LI>
<LI> Fix possible freeze in SV_TouchLinks regardless of what QC does in the touch function.</LI>
<LI> Fix for maps with empty strings for vector keys (e.g. "origin"); don't read uninitialized memory.</LI>
<LI> Support for Open Watcom compiler.</LI>
<LI> Update the third-party libraries.</LI>
</UL>
</P>
<H2><A NAME="ss6.4">6.4</A> <A HREF="#toc6.4">Changes in 0.92.1</A>
</H2>
<P>
<UL>
<LI> Fixed large menu scale factors (was broken in 0.92.0).</LI>
<LI> Fixed PAUSE key (was broken in 0.92.0).</LI>
<LI> Updated some of the third-party libraries.</LI>
</UL>
</P>
<H2><A NAME="ss6.5">6.5</A> <A HREF="#toc6.5">Changes in 0.92.0</A>
</H2>
<P>
<UL>
<LI> SDL2 Game Controller support.</LI>
<LI> Contrast support with new "contrast" cvar, behaving the same as MarkV. It may be a useful alternative to the existing gamma control for laptops in a bright environment, etc. Raising contrast gives less of a gray/washed out look than raising gamma, but at a disadvantage: colors near white get clipped to white.</LI>
<LI> RMQ protocol (999) support, adapted from RMQEngine.</LI>
<LI> New "-protocol x" command line option. Accepted values for 'x' are 15 (NetQuake), 666 (FitzQuake, default), and 999 (RMQ).</LI>
<LI> New "setpos" console command.</LI>
<LI> New "vid_borderless" cvar for getting a borderless window.</LI>
<LI> Increased MAX_MAP_LEAFS from 65535 to 70000 and MAX_LIGHTMAPS from 256 to 512 in order to handle the oms3 map pack.</LI>
<LI> Server edicts are now allocated using malloc instead of allocating on the hunk.</LI>
<LI> gl_clear now defaults to 1.</LI>
<LI> Fix items falling out of the world on oms3.bsp on SSE builds.</LI>
<LI> Worked around an OSX 10.6 driver bug when using FSAA, which was leading to an unplayable HOM effect on the rest of the screen.</LI>
<LI> Fix wrong trace endpoint from the tracepos console command.</LI>
<LI> Updated some of the third-party libraries. Other fixes/clean-ups.</LI>
</UL>
</P>
<H2><A NAME="ss6.6">6.6</A> <A HREF="#toc6.6">Changes in 0.91.0</A>
</H2>
<H3>Bugfixes</H3>
<P>
<UL>
<LI> Fix unwanted fog mode change upon video restart.</LI>
<LI> Work around Intel 855 bug in status bar drawing with "r_oldwater 0" and "scr_sbaralpha 0".</LI>
<LI> Fix an obscure GLSL bug where changing gamma would result in the screen turning to noise.</LI>
<LI> Fix GLSL gamma causing the tiled screen border to turn white when "sizedown" is used.</LI>
<LI> Fix an alias model VBO renderer bug where a model not precached during map start wouldn't be drawn.</LI>
<LI> Fix the order of OpenGL context creation and window creation in SDL2 video.</LI>
<LI> Fix a calling convention issue in windows DPI awareness function pointers.</LI>
<LI> Fix a random texture recoloring after video mode change.</LI>
<LI> Fix a liquid turning to garbage after several video mode changes and "r_oldwater 0".</LI>
<LI> Fix a wrong alpha-sorting bug introduced in 0.90.1.</LI>
<LI> Fix "flush" command not reloading mdl's from disk (bug introduced in 0.90.1).</LI>
<LI> Prevent a possible buffer overflow in Cbuf_Execute (old Q1/Q2 bug).</LI>
<LI> Prevent a possible vulnerability in MSG_ReadString (old Q1/Q2 bug).</LI>
</UL>
</P>
<H3>Visual improvements</H3>
<P>
<UL>
<LI> New cvars r_lavaalpha, r_slimealpha, r_telealpha for fine-tuning specific liquid opacities (from DirectQ/RMQEngine, non-archived, default to 0), and new worldspawn keys _wateralpha, _lavaalpha, _slimealpha, _telealpha, _skyfog (unique to Quakespasm, similar to the behaviour of the "fog" worldspawn key).</LI>
<LI> GLSL gamma is now supported on older hardware without NPOT extension.</LI>
</UL>
</P>
<H3>Interface improvements</H3>
<P>
<UL>
<LI> New r_pos command to show player position.</LI>
<LI> NaN detection in traceline with "developer 1" set now warns instead of errors.</LI>
</UL>
</P>
<H3>Code cleanup / Other</H3>
<P>
<UL>
<LI> Update third-party libraries.</LI>
</UL>
</P>
<H3>Raised limits</H3>
<P>
<UL>
<LI> Default max_edicts 8192 (was 2048) and no longer saved to config.cfg.</LI>
<LI> Default heapsize 256 MB (was 64 MB).</LI>
<LI> Default zone 4 MB (was 384 KB).</LI>
<LI> Raised MAX_SFX to 1024 (was 512).</LI>
</UL>
</P>
<H2><A NAME="ss6.7">6.7</A> <A HREF="#toc6.7">Changes in 0.90.1</A>
</H2>
<H3>Bugfixes</H3>
<P>
<UL>
<LI> Fix dynamic light artifact where changing lightmap are rendered one frame late (bug introduced in 0.90.0).</LI>
<LI> Fix texture memory leak when changing video modes with SDL2.</LI>
<LI> Fix rare incorrect mdl lighting on 64-bit builds.
<A HREF="http://forums.insideqc.com/viewtopic.php?f=3&amp;t=5620">(details here.)</A></LI>
<LI> Fix fullbrights turning black after "kill" command (bug introduced in 0.90.0).</LI>
<LI> Clear all fog values on map change to prevent colored fog carrying over to jam3_tronyn.bsp.</LI>
<LI> Allow loading saves with } character in quoted strings, fixes issue with retrojam1_skacky.bsp.</LI>
<LI> Fix viewmodel not lerping on extended-limit maps.</LI>
<LI> Fix crash on out-of-bounds skin number.</LI>
</UL>
</P>
<H3>Performance</H3>
<P>
<UL>
<LI> Use multithreaded OpenGL on OS X for better performance.</LI>
<LI> New, faster mdl renderer using GLSL. Disable with "-noglslalias".</LI>
</UL>
</P>
<H3>Visual improvements</H3>
<P>
<UL>
<LI> New gamma correction implementation using GLSL. Fixes all known gamma issues (affecting the full display, persisting after quitting, or darkening the screen on OS X). Disable with "-noglslgamma".</LI>
<LI> Use high-quality water by default (r_oldwater 0).</LI>
<LI> Shadows use stencil buffer to avoid overlapping artifacts (from MarkV.)</LI>
<LI> r_noshadow_list cvar added (from MarkV.)</LI>
</UL>
</P>
<H3>Interface improvements</H3>
<P>
<UL>
<LI> Support pausing demo playback with the "pause" command.</LI>
<LI> Autocompletion for "game", "record", "playdemo".</LI>
<LI> Experimental windowed fullscreen mode available with vid_desktopfullscreen 1 (only in SDL2 builds, takes effect upon entering fullscreen mode the next time.)</LI>
<LI> Silence "exceeded standard limit" messages unless developer cvar is >= 1.</LI>
<LI> Some spam moved from developer 1 to 2: "can't find tga/lit/ent", "trying to load ent", "bad chunk length", "meshing", "PR_AlocStringSlots: realloc'ing"</LI>
</UL>
</P>
<H3>Code cleanup</H3>
<P>
<UL>
<LI> Clean up IDE project files to build on fresh systems.</LI>
<LI> Update 3rd-party libraries.</LI>
</UL>
</P>
<H2><A NAME="ss6.8">6.8</A> <A HREF="#toc6.8">Changes in 0.90.0</A>
</H2>
<P>
<UL>
<LI> Fix issues on Windows systems with DPI scaling.</LI>
<LI> Unix/Mac user directories support. Disabled by default, 'make DO_USERDIRS=1' to enable it.</LI>
<LI> SDL2 support. Disabled by default, 'make USE_SDL2=1' to enable it.</LI>
<LI> Revised keyboard input code.</LI>
<LI> Revised/improved the 'game' command, i.e. on-the-fly mod changing. It now accepts an optional second argument for mission packs or quoth support i.e. -hipnotic, -rogue, or -quoth. For example, for WarpSpasm: "game warp -quoth"</LI>
<LI> Command line: "-game {quoth/hipnotic/rogue}" is now treated the same as -quoth, -hipnotic, or -rogue.</LI>
<LI> Console speed now resolution-independent.</LI>
<LI> Disabled gl_zfix, which caused glitches and is undesirable for new maps. Replacement .ent files to fix z-fighting for several id1 maps added to quakespasm.pak.</LI>
<LI> PF_VarString buffer bumped to 1024, avoids truncated centerprints from the 'In The Shadows' mod.</LI>
<LI> Support for opengl non-power-of-two-textures extension (disable with command line: "-notexturenpot".)</LI>
<LI> Support for OpenGL vertex buffer objects (VBO, OpenGL 1.5 or newer) for world and brush models (disable with command line: "-novbo".)</LI>
<LI> Antialiasing (FSAA) support (command line: -fsaa x, where x can be 0, 2, 4, 8).</LI>
<LI> Fence textures support.</LI>
<LI> Dynamic light speedup. Speedup loading of tga and pcx external images.</LI>
<LI> Brush model drawing speedup.</LI>
<LI> Support for BSP2 and 2PSB map formats.</LI>
<LI> Support for Opus, FLAC, and tracker music (S3M, IT, UMX, etc.), as compile-time options.</LI>
<LI> Music and sfx now mixed at 44100 Hz to avoid downsampling music. Low-pass filter applied to the sfx if -sndspeed is 11025 (the default), to preserve the same sound quality as 0.85.9. New -mixspeed option sets the rate for mixing sfx and music, and output to the OS (default 44100), setting it to 11025 reverts to 0.85.9 behaviour. New snd_filterquality cvar, value can be between 1 (emulate OS X resampler) and 5 (emulate Windows resampler), controls the sound of the low-pass filter.</LI>
<LI> Better Hor+ field of view (FOV) scaling behavior.</LI>
<LI> Better cross-map demo playback support.</LI>
<LI> Fix screenshots when screen width isn't a multiple of 4.</LI>
<LI> Fix a lighting glitch due to floating point precision.</LI>
<LI> Fix a looping sounds glitch.</LI>
<LI> Fix a vulnerability in file extension handling. Tighten path handling safety.</LI>
<LI> Initialize opengl with 24-bit depth buffer at 32 bpp.</LI>
<LI> Reset all models upon gamedir changes. (Fixes failures with mods using custom content.)</LI>
<LI> Fix broken behavior upon gamedir changes if -basedir is specified on the command line.</LI>
<LI> NET_MAXMESSAGE and MAX_MSGLEN limits bumped to 64000.</LI>
<LI> MAX_EFRAGS bumped to 4096, and MAX_CHANNELS to 1024.</LI>
<LI> MAX_ENT_LEAFS bumped from 16 to 32 to work around disappearing or flickering brush models in some situations. Also, if an entity is visible from MAX_ENT_LEAFS or more leafs, we now always send it to the client.</LI>
<LI> Fix cvar cycle command not working sometimes.</LI>
<LI> Host_Error upon missing models. (Prevents segmentation faults.)</LI>
<LI> Change sv_aim default value to 1 (i.e. turn off autoaim)</LI>
<LI> Add 'prev' and 'next' keywords to the 'cd' command.</LI>
<LI> Work around a linux cdrom issue (playback might not start for a while after a stop).</LI>
<LI> Quakespasm content customization moved from engine-embedded into a new optional quakespasm.pak file.</LI>
<LI> Version bumped to 0.90.0 (because Quakespasm has a decent life of it's own)</LI>
<LI> Other fixes and clean-ups.</LI>
</UL>
</P>
<H2><A NAME="ss6.9">6.9</A> <A HREF="#toc6.9">Changes in 0.85.9</A>
</H2>
<P>
<UL>
<LI> Fixes for several undefined behaviors in C code (gcc-4.8 support.)</LI>
<LI> Implemented Hor+ style field of view (FOV) scaling, useful for widescreen resolutions. Configured by new cvar fov_adapt: set it to 1 and your fov will be scaled automatically according to the resolution. Enabled by default.</LI>
<LI> Adjusted string buffers for PR_ValueString and friends to fix crashes with excessively long global strings seen in some rude mods.</LI>
<LI> Toned down warning messages from PF_VarString() a bit.</LI>
<LI> Fixed Fitzquake's map existence check in changelevel (used to leak file handles which would end up in a Sys_Error() due to consuming all free handles if many maps reside not in pak files.)</LI>
<LI> Fixes/cleanups in chat mode handling. Client no longer gets stuck in chat mode upon disconnect.</LI>
<LI> Mouse grab/key_dest fixes and key cleanups.</LI>
<LI> The "speedkey" now acts as "slowkey" when "always run" is on.</LI>
<LI> Support for demo recording after connection to server. (thanks to Baker for a patch)</LI>
<LI> Corner case fixes in COM_Parse() for quoted strings and support for C-style /*..*/ comments.</LI>
<LI> Changed lightmaps to GL_RGBA instead of GL_RGB.</LI>
<LI> Better parse for opengl extensions list (from quakeforge.)</LI>
<LI> Vsync saving/loading fixes.</LI>
<LI> Fixed pointfile loading.</LI>
<LI> Multiple cleanups in gl_vidsdl.c.</LI>
<LI> Opus music decoding support (as an optional patch only.)</LI>
<LI> Several other minor fixes/cleanups.</LI>
</UL>
</P>
<H2><A NAME="ss6.10">6.10</A> <A HREF="#toc6.10">Changes in 0.85.8</A>
</H2>
<P>
<UL>
<LI> Made Quake shareware 1.00 and 1.01 versions to be recognized properly.</LI>
<LI> Fixed control-character handling in unicode mode. Keyboard input tweaks.</LI>
<LI> Made the keypad keys to send separate key events in game mode.</LI>
<LI> Text pasting support from OS clipboard to console. (windows and macosx.)</LI>
<LI> Support for the Apple (Command) key on macosx.</LI>
<LI> Fixed increased (more than 32) dynamic lights.</LI>
<LI> Music playback: Made sure that the file's channels count is supported.</LI>
<LI> Support for Solaris.</LI>
<LI> Switched to using libmad instead of libmpg123 for MP3 playback on Mac OS X.</LI>
<LI> Better support for building the Mac OS X version using a makefile, support for cross-compiling on Linux.</LI>
<LI> Fixed a minor intermissions glitch.</LI>
<LI> Increased string buffer size from 256 to 384 for PF_VarString to work around broken mods such as UQC.</LI>
<LI> Restored original behavior for Quake registered version detection.</LI>
<LI> Minor demo recording/playback tweaks.</LI>
<LI> Minor tweaks to the scale menu option.</LI>
<LI> unbindall before loading stored bindings (configurable by new cvar cfg_unbindall, enabled by default.)</LI>
<LI> New icon.</LI>
<LI> Miscellaneous source code cleanups.</LI>
</UL>
</P>
<H2><A NAME="ss6.11">6.11</A> <A HREF="#toc6.11">Changes in 0.85.7</A>
</H2>
<P>
<UL>
<LI> Added support for cross-level demo playback</LI>
<LI> gl_texturemode is reimplemented as a cvar with a callback and the setting is automatically saved to the config</LI>
<LI> Fixed execution of external files without a newline at the end</LI>
<LI> Reduced memory usage during reloading of textures</LI>
<LI> Fixed compilation on GNU/kFreeBSD (Debian bug #657793)</LI>
<LI> Fixed backspace key on Mac OS X</LI>
<LI> Disable mouse acceleration in Mac OS X</LI>
<LI> Worked around recursive calling of the anisotropic filter callback</LI>
<LI> Console word wrap and long input line fixes</LI>
<LI> Verified correct compilation by clang (using v3.0)</LI>
<LI> Several other small changes mostly invisible to the end-user</LI>
</UL>
</P>
<H2><A NAME="ss6.12">6.12</A> <A HREF="#toc6.12">Changes in 0.85.6</A>
</H2>
<P>
<UL>
<LI> More work for string buffer safety</LI>
<LI> Reverted v0.85.5 change of not allowing deathmatch and coop cvars to be set at the same time (was reported for possibility of causing compatibility issues with mods)</LI>
<LI> Several cleanups/changes in the cvar layer</LI>
<LI> Minor SDL video fixes.</LI>
</UL>
</P>
<H2><A NAME="ss6.13">6.13</A> <A HREF="#toc6.13">Changes in 0.85.5</A>
</H2>
<P>
<UL>
<LI> SDL input driver updated adding native keymap and dead key support to the console</LI>
<LI> Fixed a crash in net play in maps with extended limits</LI>
<LI> Verified successful compilation using gcc-4.6.x</LI>
<LI> Added workaround against GL texture flicker (z fighting), controlled by new cvar 'gl_zfix'</LI>
<LI> Read video variables early so that a vid_restart isn't necessary after init</LI>
<LI> mlook and lookspring fixes</LI>
<LI> Added support for loading external entity files, controlled by new cvar 'external_ents'</LI>
<LI> Made mp3 playback to allocate system memory instead of zone</LI>
<LI> Some updates to the progs interpreter code</LI>
<LI> Fixed r_nolerp_list parsing code of fitzquake</LI>
<LI> Made sure that deathmatch and coop are not set at the same time</LI>
<LI> Several code updates from uHexen2 project, several code cleanups.</LI>
</UL>
</P>
<H2><A NAME="ss6.14">6.14</A> <A HREF="#toc6.14">Changes in 0.85.4</A>
</H2>
<P>
<UL>
<LI> Implement music (OGG, MP3, WAV) playback</LI>
<LI> A better fix for the infamous SV_TouchLinks problem, no more hard lockups with maps such as "whiteroom"</LI>
<LI> Add support for mouse buttons 4 and 5</LI>
<LI> Fix the "unalias" console command</LI>
<LI> Restore the "screen size" menu item</LI>
<LI> Fixed an erroneous protocol check in the server code</LI>
<LI> Raised the default zone memory size to 384 kb</LI>
<LI> Raised the default max_edicts from 1024 to 2048</LI>
<LI> Revised lit file loading, the lit file must be from the same game directory as the map itself or from a searchpath with a higher priority</LI>
<LI> Fixed rest of the compiler warnings</LI>
<LI> Other minor sound and cdaudio updates</LI>
</UL>
</P>
<H2><A NAME="ss6.15">6.15</A> <A HREF="#toc6.15">Changes in 0.85.3</A>
</H2>
<P>
<UL>
<LI> Fix the "-dedicated" option (thanks Oz) and add platform specific networking code (default) rather than SDL_net</LI>
<LI> Much needed OSX framework stuff from Kristian</LI>
<LI> Add a persistent history feature (thanks Baker)</LI>
<LI> Add a slider for scr_sbaralpha, which now defaults to 0.95 (slightly transparent, allowing for a nicer status bar)</LI>
<LI> Allow player messages longer than 32 characters</LI>
<LI> Sockaddr fix for FreeBSD/OSX/etc networking</LI>
<LI> Connect status bar size to the scale slider</LI>
<LI> Include an ISNAN (is not-a-number) fix to catch the occassional quake C bug giving traceline problems</LI>
<LI> Enumerate options menus</LI>
<LI> Add a "prev weapon" menu item (from Sander)</LI>
<LI> Small fix to Sound Block/Unblock on win32</LI>
<LI> Lots of code fixes (some from uhexen2)</LI>
<LI> Sys_Error calls Host_Shutdown</LI>
<LI> Added MS Visual Studio support</LI>
<LI> Add a "-cd" option to let the CD Player work in dedicated mode, and some other CD tweaks.</LI>
</UL>
</P>
<H2><A NAME="ss6.16">6.16</A> <A HREF="#toc6.16">Changes in 0.85.2</A>
</H2>
<P>
<UL>
<LI> Replace the old "Screen size" slider with a "Scale" slider</LI>
<LI> Don't constantly open and close condebug log</LI>
<LI> Heap of C clean-ups</LI>
<LI> Fix mapname sorting</LI>
<LI> Alias the "mods" command to "games"</LI>
<LI> Block/Unblock sound upon focus loss/gain</LI>
<LI> NAT fix (networking protocol fix)</LI>
<LI> SDLNet_ResolveHost bug-fix allowing connection to ports other than 26000</LI>
<LI> Bumped array size of sv_main.c::localmodels from 5 to 6 fixing an old fitzquake-0.85 bug which used to cause segfaults depending on the compiler.</LI>
<LI> Accept commandline options like "+connect ip:port"</LI>
<LI> Add OSX Makefile (tested?)</LI>
</UL>
</P>
<H2><A NAME="ss6.17">6.17</A> <A HREF="#toc6.17">Changes in 0.85.1</A>
</H2>
<P>
<UL>
<LI>64 bit CPU support</LI>
<LI>Restructured SDL sound driver</LI>
<LI>Custom conback </LI>
<LI>Tweaked the command line completion and added a map/changelevel autocompletion function</LI>
<LI>Alt+Enter toggles fullscreen</LI>
<LI>Disable Draw_BeginDisc which causes core dumps when called excessively</LI>
<LI>Show helpful info on start-up</LI>
<LI>Include real map name (sv.name) and skill in the status bar</LI>
<LI>Remove confirm quit dialog</LI>
<LI>Don't spam the console with PackFile seek requests</LI>
<LI>Default to window mode</LI>
<LI>Withdraw console when playing demos</LI>
<LI>Don't play demos on program init</LI>
<LI>Default Heapsize is 64meg</LI>
<LI>Changes to default console alpha, speed</LI>
<LI>Changes to cvar persistence gl_flashblend (default 0), r_shadow, r_wateralpha, r_dynamic, r_novis</LI>
</UL>
</P>
<H2><A NAME="s7">7.</A> <A HREF="#toc7">Todo </A></H2>
<P>
<UL>
<LI>Add uHexen2's first person camera (and menu item)</LI>
<LI>Native CD audio support (if desired). cd_sdl.c doesn't have proper volume controls and SDL2 doesn't support CD audio</LI>
</UL>
</P>
<H2><A NAME="s8">8.</A> <A HREF="#toc8">Copyright </A></H2>
<P>
<UL>
<LI>Quake and Quakespasm are released under the
<A HREF="http://www.gnu.org/licenses/gpl-2.0.html">GNU GENERAL PUBLIC LICENSE Version 2</A></LI>
<LI>Quakespasm console background image by <B>AAS</B>, released under the
<A HREF="http://creativecommons.org/licenses/by/3.0/legalcode">CREATIVE COMMONS PUBLIC LICENSE</A></LI>
</UL>
</P>
<H2><A NAME="s9">9.</A> <A HREF="#toc9">Contact </A></H2>
<P>
<UL>
<LI>
<A HREF="https://sourceforge.net/projects/quakespasm/">QuakeSpasm Project page</A></LI>
<LI>
<A HREF="https://sourceforge.net/p/quakespasm/bugs/">Bug reports</A></LI>
<LI>
<A HREF="mailto:gmail - dot - com - username - sezeroz">Ozkan</A>,
<A HREF="mailto:gmail - dot - com - username - ewasylishen">Eric</A>,
<A HREF="mailto:gmail - dot - com - username - a.h.vandijk">Sander</A>
</UL>
</P>
<H2><A NAME="s10">10.</A> <A HREF="#toc10">Links </A></H2>
<P>
<UL>
<LI>
<A HREF="http://quakespasm.sourceforge.net">QuakeSpasm Homepage</A></LI>
<LI>
<A HREF="http://quakespasm.sourceforge.net/download.htm">Downloads</A></LI>
<LI>
<A HREF="http://www.celephais.net/fitzquake">FitzQuake Homepage</A></LI>
<LI>
<A HREF="http://www.celephais.net/board/view_thread.php?id=60452">Func Quakespasm forum</A></LI>
<LI>
<A HREF="http://forums.insideqc.com">Inside3D forums</A></LI>
</UL>
</P>
</BODY>
</HTML>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,4 @@
These binaries were compiled for x86_64-linux on a CentOS 4.8 setup.
They depend on SDL (libSDL-1.2.so.0), ogg/vorbis (libvorbis.so.0,
libogg.so.0 and libvorbisfile.so.3), and libmad (libmad.so.0).
The sdl2 version depends on libSDL2-2.0.so.0 instead of libSDL-1.2.so.

Binary file not shown.

View File

@@ -0,0 +1,174 @@
CWSDPMI is Copyright (C) 1995-2008 Charles W Sandmann (cwsdpmi@earthlink.net)
1206 Braelinn, Sugar Land, TX 77479
This is release 5, 2008 refresh. It contains minor bug fixes and SSE support.
The files in this binary distribution may be redistributed under the GPL
(with source) or without the source code provided:
* CWSDPMI.EXE or CWSDPR0.EXE are not modified in any way except via CWSPARAM.
* CWSDSTUB.EXE internal contents are not modified in any way except via
CWSPARAM or STUBEDIT. It may have a COFF image plus data appended to it.
* Notice to users that they have the right to receive the source code and/or
binary updates for CWSDPMI. Distributors should indicate a site for the
source in their documentation.
-------------------------------------------------------------------------------
CWSDPMI was written to provide DPMI services for V2 of DJGPP. It currently
does not support 16-bit DPMI applications, or DPMI applications requiring a
built in extender. It does support virtual memory and hardware interrupt
reflection from real mode to protected mode. DJGPP V1.1x and RSX applications
will also run using this server, which can be used to provide enhanced control
over hardware interrupts. Some DPMI 1.0 extensions (0x506, 0x507, 0x508) have
been implemented.
CWSDPR0.EXE is an alternate version which runs at ring 0 with virtual memory
disabled. It may be used if access to ring-0 features are desired. It
currently does not switch stacks on HW interrupts, so some DJGPP features
such as SIGINT and SIGFPE are not supported and will generate a double fault
or stack fault error (to be fixed someday).
CWSDSTUB.EXE is a stub loader image for DJGPP which includes CWSDPMI. This
allows single executable image distributions. You can use the EXE2COFF
program and COPY /B CWSDSTUB.EXE+yourimage yourimage.exe to create a
standalone executable image.
Some of the internal tuning and configuration parameters may be modified
in the image using CWSPARAM.EXE (see CWSPARAM.DOC).
If you want to use CWSDPMI with DJGPP, you expand the distribution into the
DJGPP directory tree. CWSDPMI.EXE will be put in the BIN directory with your
DJGPP images and it will automatically be loaded when they run.
Directions for use (server can be used in either of two different ways):
1) "cwsdpmi" alone with no parameters will terminate and stay resident
FOR A SINGLE DPMI PROCESS. This means it unloads itself when your
DPMI application exits. This mode is useful in software which needs
DPMI services, since CWSDPMI can be exec'ed and then will unload on exit.
2) "cwsdpmi -p" will terminate and stay resident until you remove it.
It can be loaded into UMBs with LH. "cwsdpmi -u" will unload the TSR.
3) The file used for virtual memory swapping, if desired, is controlled
by the "-sc:\cwsdpmi.swp" syntax on the command line. You must specify
either a file with full disk/directory syntax, or "-s-" which disables
virtual memory.
4) The default swap file name is c:\cwsdpmi.swp, but this can be changed
with the CWSPARAM image, as can some other parameters.
5) You can disable the DPMI 1.0 extensions by starting the image with the
"cwsdpmi -x" syntax. This feature allows you to run programs developed
under other DPMI providers which do not behave properly with these
extensions enabled (typically use of NULL pointers).
I would like to give special thanks to DJ Delorie who wrote the original
GO32 code on which CWSDPMI is based. Morten Welinder also provided and
improved much of the code in this program.
-------------------------------------------------------------------------------
This section contains a list of the error messages you might see out of
CWSDPMI and some details on what they mean.
Exceptions are only handled by CWSDPMI if the application does not establish
an exception handler, exceptions nest 5 deep, or the error is particularly bad:
"Page fault" -
1) an illegal page fault happens in a RMCB or HW interrupt, (lock all pages!)
2) all available pages have been locked,
3) the application is using non-committed pages for null pointer protection.
"Double Fault" - multiple exceptions occurred
"Invalid TSS" - typically due to RMCB or HW interrupt being called after the
selectors/memory have been deallocated (remember to reset the mouse)
"General Protection Fault" - bad parameter sent to a DPMI call
"80386 required."
Since 80286 and lesser processors don't have the hardware necessary to
run CWSDPMI. No workaround, upgrade.
"DOS 3 required."
A few interrupts are used which need DOS 3.0 or higher. I don't expect to
ever see this message, since 80386 machines were introduced after DOS 3.0
and that check is made first.
"CWSDPMI V0.90+ (r5) Copyright (C) 2000 CW Sandmann ABSOLUTELY NO WARRANTY"
An informational message displayed if the program is not run in one-pass mode.
"Protected mode not accessible."
This message should only be displayed if running CWSDPMI in a protected
environment with no access to protected mode. In this case, DPMI should
already be available and CWSDPMI would not be needed. This might happen if
a 16-bit DPMI client is loaded and a DJGPP image attempts to load CWSDPMI
to provide 32-bit DPMI services under Windows.
"Warning: cannot open swap file c:\cwsdpmi.swp"
Maybe you are out of file handles, or the swap file name is incorrectly
specified in the image (change the name with cwsparam).
"No swap space!"
This message means you tried to use more paging file than CWSDPMI was
configured to handle. Since this is protected against in the memory
allocation code, you should never see this message.
"Swap disk full!"
This means the paging file could not be expanded when trying to page
memory out to disk. This would normally not be seen, unless you are
writing output to the same disk which holds the paging file. Decrease
the amount of memory your DPMI application is using or free up disk space.
"Interrupt 0x??"
Your application tried to call an interrupt from protected mode which
normally shouldn't be called (something like a data pointer). If the
request was allowed to continue it would likely hang your machine. If you
see this message and think the interrupt should be allowed to continue, let
me know.
"Error: Using XMS switched CPU into V86 mode."
This message might be seen if you have your memory manager in AUTO mode. The
only workaround in this case is to stop using AUTO mode.
"Error: could not allocate page table memory"
The page table memory (a minimum of 16Kb) is allocated from conventional
memory (either in the 640Kb region or UMBs). If CWSDPMI cannot allocate the
minimum necessary memory, you would see this message. Free up some
conventional memory. You may also see this message if a page directory needs
to be faulted in, and there are no available pages. This means too many pages
have been locked for the allocated page tables available. While CWSDPMI
tries to dynamically allocate these if needed, this effort failed. You need
to increase the number of page tables with CWSPARAM, or increase the amount
of free conventional memory if it is low. If the application which calls
CWSDPMI internally manages all the DOS memory, the page tables may need to
be pre-allocated at DPMI startup time (if this is needed, try using the
run option flag 2 in cwsparam).
"16-bit DPMI unsupported."
CWSDPMI is a 32-bit only DPMI server. Ideally, on the request to enter DPMI's
PM with a 16-bit request, we would just fail the call setting the carry bit
like the DPMI specification describes. Some buggy 16-bit compiler tools don't
check the return status and will hang the machine in this case. So, I issue
an error message and exit the image instead.
"Descriptors exhausted."
An attempt to nest a DPMI client failed in the setup phase due to insufficient
free selectors in the LDT.
"CWSDPMI not removed"
When the -u parameter is specified, if DPMI is not detected this message is
printed. Informational.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,340 @@
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.
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) <year> <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 instead of this License.

Binary file not shown.

View File

@@ -0,0 +1,164 @@
/*
arch_def.h
platform specific definitions
- standalone header
- doesn't and must not include any other headers
- shouldn't depend on compiler.h, q_stdinc.h, or
any other headers
$Id: arch_def.h,v 1.2 2011/10/08 12:33:03 sezero Exp $
Copyright (C) 2007-2011 O.Sezer <sezero@users.sourceforge.net>
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:
Free Software Foundation, Inc.
51 Franklin St, Fifth Floor,
Boston, MA 02110-1301 USA
*/
#ifndef __HX2_ARCHDEFS__
#define __HX2_ARCHDEFS__
#if defined(__APPLE__) && defined(__MACH__)
# if !defined(__MACOSX__)
# define __MACOSX__ 1
# endif
#elif defined(macintosh) /* MacOS Classic */
# if !defined(__MACOS__)
# define __MACOS__ 1
# endif
#elif (defined(__sun) || defined(sun)) && \
(defined(__svr4__) || defined(__SVR4))
# if !defined(__SOLARIS__)
# define __SOLARIS__ 1
# endif
#elif defined(__sun) || defined(sun)
# if !defined(__SUNOS__)
# define __SUNOS__ 1
# endif
#elif defined(__sgi) || defined(sgi) || defined(__sgi__) || defined(_SGI_SOURCE)
# if !defined(__IRIX__)
# define __IRIX__ 1
# endif
#elif defined(__QNXNTO__)
# if !defined(__QNX__)
# define __QNX__ 1
# endif
#elif defined(__amigados__) || defined(__amigaos4__) || \
defined(__AMIGA) || defined(__amigaos__)
# if !defined(__AMIGA__)
# define __AMIGA__ 1
# endif
#endif /* end of custom definitions */
#if defined(__DJGPP__) || defined(MSDOS) || defined(__MSDOS__) || defined(__DOS__)
# if !defined(PLATFORM_DOS)
# define PLATFORM_DOS 1
# endif
#elif defined(_WIN32) || defined(_WIN64)
# if !defined(PLATFORM_WINDOWS)
# define PLATFORM_WINDOWS 1
# endif
#elif defined(__MACOS__) || defined(__MACOSX__)
# if !defined(PLATFORM_MAC)
# define PLATFORM_MAC 1
# endif
#elif defined(__MORPHOS__) || defined(__AMIGA__)
# if !defined(PLATFORM_AMIGA)
# define PLATFORM_AMIGA 1
# endif
#else /* here goes the unix platforms */
#if defined(__unix) || defined(__unix__) || defined(unix) || \
defined(__linux__) || defined(__linux) || \
defined(__FreeBSD__) || defined(__DragonFly__) || \
defined(__OpenBSD__) || defined(__NetBSD__) || \
defined(__hpux) || defined(__hpux__) || defined(_hpux) || \
defined(__sun) || defined(sun) || defined(__IRIX__) || \
defined(__QNX__)
# if !defined(PLATFORM_UNIX)
# define PLATFORM_UNIX 1
# endif
#endif
#endif /* end of PLATFORM_ definitions */
/* Hack section: Platforms that are mostly fine when
* classified under PLATFORM_UNIX :
*/
#if defined(__MACOSX__)
# if !defined(PLATFORM_UNIX)
# define PLATFORM_UNIX 2
# endif
#endif /* end of PLATFORM_UNIX hacks */
#if defined(_WIN64)
# define PLATFORM_STRING "Win64"
#elif defined(_WIN32)
# define PLATFORM_STRING "Windows"
#elif defined(PLATFORM_DOS)
# define PLATFORM_STRING "DOS"
#elif defined(__linux__) || defined(__linux)
# define PLATFORM_STRING "Linux"
#elif defined(__DragonFly__)
# define PLATFORM_STRING "DragonFly"
#elif defined(__FreeBSD__)
# define PLATFORM_STRING "FreeBSD"
#elif defined(__NetBSD__)
# define PLATFORM_STRING "NetBSD"
#elif defined(__OpenBSD__)
# define PLATFORM_STRING "OpenBSD"
#elif defined(__MORPHOS__)
# define PLATFORM_STRING "MorphOS"
#elif defined(__AMIGA__)
# define PLATFORM_STRING "AmigaOS"
#elif defined(__QNX__)
# define PLATFORM_STRING "QNX"
#elif defined(__MACOSX__)
# define PLATFORM_STRING "MacOSX"
#elif defined(__MACOS__)
# define PLATFORM_STRING "MacOS"
#elif defined(__hpux) || defined(__hpux__) || defined(_hpux)
# define PLATFORM_STRING "HP-UX"
#elif defined(__SOLARIS__)
# define PLATFORM_STRING "Solaris"
#elif defined(__SUNOS__)
# define PLATFORM_STRING "SunOS"
#elif defined(__IRIX__)
# define PLATFORM_STRING "Irix"
#elif defined(PLATFORM_UNIX)
# define PLATFORM_STRING "Unix"
#else
# define PLATFORM_STRING "Unknown"
# warning "Platform is UNKNOWN."
#endif /* end of PLATFORM_STRING definitions */
#endif /* __HX2_ARCHDEFS__ */

View File

@@ -0,0 +1,41 @@
#!/bin/sh
# used for building with djgpp cross toolchain
TARGET=i586-pc-msdosdjgpp
PREFIX=/usr/local/cross-djgpp
PATH="$PREFIX/bin:$PATH"
export PATH
DOSBUILD=1
export DOSBUILD
CC="$TARGET-gcc"
AS="$TARGET-as"
RANLIB="$TARGET-ranlib"
AR="$TARGET-ar"
export CC AS RANLIB AR
STRIPPER="$TARGET-strip"
if [ "$1" = "strip" ]; then
$STRIPPER vispatch.exe
exit 0
fi
HOST_OS=`uname|sed -e s/_.*//|tr '[:upper:]' '[:lower:]'`
case "$HOST_OS" in
freebsd|openbsd|netbsd)
MAKE_CMD=gmake
;;
linux)
MAKE_CMD=make
;;
*)
MAKE_CMD=make
;;
esac
$MAKE_CMD -f makefile.djgpp $*

View File

@@ -0,0 +1,43 @@
#!/bin/sh
# Change this script to meet your needs and/or environment.
#TARGET=x86_64-pc-mingw32
TARGET=x86_64-w64-mingw32
PREFIX=/opt/cross_win64
PATH="$PREFIX/bin:$PATH"
export PATH
W64BUILD=1
export W64BUILD
CC="$TARGET-gcc"
AS="$TARGET-as"
RANLIB="$TARGET-ranlib"
AR="$TARGET-ar"
WINDRES="$TARGET-windres"
export CC AS RANLIB AR WINDRES
STRIPPER="$TARGET-strip"
if [ "$1" = "strip" ]; then
$STRIPPER vispatch.exe
exit 0
fi
HOST_OS=`uname|sed -e s/_.*//|tr '[:upper:]' '[:lower:]'`
case "$HOST_OS" in
linux)
MAKE_CMD=make
;;
freebsd|openbsd|netbsd)
MAKE_CMD=gmake
;;
*)
MAKE_CMD=make
;;
esac
exec $MAKE_CMD -f makefile.mingw $*

View File

@@ -0,0 +1,45 @@
#!/bin/sh
# Change this script to meet your needs and/or environment.
#TARGET=i386-mingw32msvc
#TARGET=i686-w64-mingw32
TARGET=i686-pc-mingw32
#PREFIX=/opt/cross_win32
PREFIX=/usr/local/cross-win32
PATH="$PREFIX/bin:$PATH"
export PATH
W32BUILD=1
export W32BUILD
CC="$TARGET-gcc"
AS="$TARGET-as"
RANLIB="$TARGET-ranlib"
AR="$TARGET-ar"
WINDRES="$TARGET-windres"
export CC AS RANLIB AR WINDRES
STRIPPER="$TARGET-strip"
if [ "$1" = "strip" ]; then
$STRIPPER vispatch.exe
exit 0
fi
HOST_OS=`uname|sed -e s/_.*//|tr '[:upper:]' '[:lower:]'`
case "$HOST_OS" in
freebsd|openbsd|netbsd)
MAKE_CMD=gmake
;;
linux)
MAKE_CMD=make
;;
*)
MAKE_CMD=make
;;
esac
exec $MAKE_CMD -f makefile.mingw $*

View File

@@ -0,0 +1,49 @@
/*
compiler.h
compiler specific definitions and settings
$Id: compiler.h,v 1.6 2011/10/08 12:33:03 sezero Exp $
Copyright (C) 2007-2011 O.Sezer <sezero@users.sourceforge.net>
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:
Free Software Foundation, Inc.
51 Franklin St, Fifth Floor,
Boston, MA 02110-1301 USA
*/
#ifndef __VP_COMPILER_H
#define __VP_COMPILER_H
#if !defined(__GNUC__)
#define __attribute__(x)
#endif /* __GNUC__ */
/* Some compilers, such as OpenWatcom, and possibly other compilers
* from the DOS universe, define __386__ instead of __i386__
*/
#if defined(__386__) && !defined(__i386__)
#define __i386__ 1
#endif
/* inline keyword: */
#if defined(_MSC_VER) && !defined(__cplusplus)
#define inline __inline
#endif /* _MSC_VER */
#endif /* __VP_COMPILER_H */

View File

@@ -0,0 +1,48 @@
This is the file "copying.dj". It does NOT apply to any sources or
binaries copyrighted by UCB Berkeley, the Free Software Foundation, or
any other agency besides DJ Delorie and others who have agreed to
allow their sources to be distributed under these terms.
Copyright Information for sources and executables that are marked
Copyright (C) DJ Delorie
334 North Rd
Deerfield NH 03037-1110
This document is Copyright (C) DJ Delorie and may be distributed
verbatim, but changing it is not allowed.
Source code copyright DJ Delorie is distributed under the terms of the
GNU General Public Licence, with the following exceptions:
* Sources used to build crt0.o, gcrt0.o, libc.a, libdbg.a, and
libemu.a are distributed under the terms of the GNU Library General
Public License, rather than the GNU GPL.
* Any existing copyright or authorship information in any given source
file must remain intact. If you modify a source file, a notice to that
effect must be added to the authorship information in the source file.
* Runtime binaries, as provided by DJ in DJGPP, may be distributed
without sources ONLY if the recipient is given sufficient information
to obtain a copy of djgpp themselves. This primarily applies to
go32-v2.exe, emu387.dxe, and stubedit.exe.
* Runtime objects and libraries, as provided by DJ in DJGPP, when
linked into an application, may be distributed without sources ONLY
if the recipient is given sufficient information to obtain a copy of
djgpp themselves. This primarily applies to crt0.o and libc.a.
-----
Changes to source code copyright BSD, FSF, or others, by DJ Delorie
fall under the terms of the original copyright. Such files usually
have multiple copyright notices in them.
A copy of the files "COPYING" and "COPYING.LIB" are included with this
document. If you did not receive a copy of these files, you may
obtain one from whence this document was obtained, or by writing:
Free Software Foundation
59 Temple Place - Suite 330
Boston, MA 02111-1307
USA

View File

@@ -0,0 +1,57 @@
/* DJGPP < v2.04 doesn't have vsnprintf(). The following are
* copied over from DJGPP 2.04. */
/* Copyright (C) 2001 DJ Delorie, see COPYING.DJ for details */
#include <stdio.h>
#include <string.h>
#include <stdarg.h>
#include <limits.h>
#include <errno.h>
#include <libc/file.h>
#if !defined(_IONTERM)
#define _IONTERM 0 /* dummy value */
#endif /* _IONTERM */
static __inline__ void __stropenw(FILE *p, char *str, int len)
{
p->_flag = _IOWRT | _IOSTRG | _IONTERM;
p->_ptr = str;
p->_cnt = len;
}
static __inline__ void __strclosew(FILE *p)
{
*p->_ptr = '\0';
}
int
vsnprintf(char *str, size_t n, const char *fmt, va_list ap)
{
FILE _strbuf;
int len;
/* _cnt is an int in the FILE structure. To prevent wrap-around, we limit
* n to between 0 and INT_MAX inclusively. */
if (n > INT_MAX)
{
errno = EFBIG;
return -1;
}
memset(&_strbuf, 0, sizeof(_strbuf));
/* If n == 0, just querying how much space is needed. */
if (n > 0)
__stropenw(&_strbuf, str, n - 1);
else
__stropenw(&_strbuf, NULL, 0);
len = _doprnt(fmt, ap, &_strbuf);
/* Ensure nul termination */
if (n > 0)
__strclosew(&_strbuf);
return len;
}

View File

@@ -0,0 +1,48 @@
This is the file "copying.dj". It does NOT apply to any sources or
binaries copyrighted by UCB Berkeley, the Free Software Foundation, or
any other agency besides DJ Delorie and others who have agreed to
allow their sources to be distributed under these terms.
Copyright Information for sources and executables that are marked
Copyright (C) DJ Delorie
334 North Rd
Deerfield NH 03037-1110
This document is Copyright (C) DJ Delorie and may be distributed
verbatim, but changing it is not allowed.
Source code copyright DJ Delorie is distributed under the terms of the
GNU General Public Licence, with the following exceptions:
* Sources used to build crt0.o, gcrt0.o, libc.a, libdbg.a, and
libemu.a are distributed under the terms of the GNU Library General
Public License, rather than the GNU GPL.
* Any existing copyright or authorship information in any given source
file must remain intact. If you modify a source file, a notice to that
effect must be added to the authorship information in the source file.
* Runtime binaries, as provided by DJ in DJGPP, may be distributed
without sources ONLY if the recipient is given sufficient information
to obtain a copy of djgpp themselves. This primarily applies to
go32-v2.exe, emu387.dxe, and stubedit.exe.
* Runtime objects and libraries, as provided by DJ in DJGPP, when
linked into an application, may be distributed without sources ONLY
if the recipient is given sufficient information to obtain a copy of
djgpp themselves. This primarily applies to crt0.o and libc.a.
-----
Changes to source code copyright BSD, FSF, or others, by DJ Delorie
fall under the terms of the original copyright. Such files usually
have multiple copyright notices in them.
A copy of the files "COPYING" and "COPYING.LIB" are included with this
document. If you did not receive a copy of these files, you may
obtain one from whence this document was obtained, or by writing:
Free Software Foundation
59 Temple Place - Suite 330
Boston, MA 02111-1307
USA

View File

@@ -0,0 +1,204 @@
/* Hacked from DJGPP v2.04 for use with older DJGPP versions */
/* Copyright (C) 2003 DJ Delorie, see COPYING.DJ for details */
/* Copyright (C) 2002 DJ Delorie, see COPYING.DJ for details */
#ifndef __dj_inttypes__h_
#define __dj_inttypes__h_
#include <stdint.h>
/* ANSI/ISO C99 says these should not be visible in C++ unless
explicitly requested. */
#if !defined(__cplusplus) || defined(__STDC_FORMAT_MACROS)
#define PRId8 "hhd"
#define PRId16 "hd"
#define PRId32 "ld"
#define PRId64 "lld"
#define PRIdLEAST8 "hhd"
#define PRIdLEAST16 "hd"
#define PRIdLEAST32 "d"
#define PRIdLEAST64 "lld"
#define PRIdFAST8 "hhd"
#define PRIdFAST16 "d"
#define PRIdFAST32 "d"
#define PRIdFAST64 "lld"
#define PRIdMAX "lld"
#define PRIdPTR "ld"
#define PRIi8 "hhi"
#define PRIi16 "hi"
#define PRIi32 "li"
#define PRIi64 "lli"
#define PRIiLEAST8 "hhi"
#define PRIiLEAST16 "hi"
#define PRIiLEAST32 "i"
#define PRIiLEAST64 "lli"
#define PRIiFAST8 "hhi"
#define PRIiFAST16 "i"
#define PRIiFAST32 "i"
#define PRIiFAST64 "lli"
#define PRIiMAX "lli"
#define PRIiPTR "li"
#define PRIo8 "hho"
#define PRIo16 "ho"
#define PRIo32 "lo"
#define PRIo64 "llo"
#define PRIoLEAST8 "hho"
#define PRIoLEAST16 "ho"
#define PRIoLEAST32 "o"
#define PRIoLEAST64 "llo"
#define PRIoFAST8 "hho"
#define PRIoFAST16 "o"
#define PRIoFAST32 "o"
#define PRIoFAST64 "llo"
#define PRIoMAX "llo"
#define PRIoPTR "lo"
#define PRIu8 "hhu"
#define PRIu16 "hu"
#define PRIu32 "lu"
#define PRIu64 "llu"
#define PRIuLEAST8 "hhu"
#define PRIuLEAST16 "hu"
#define PRIuLEAST32 "u"
#define PRIuLEAST64 "llu"
#define PRIuFAST8 "hhu"
#define PRIuFAST16 "u"
#define PRIuFAST32 "u"
#define PRIuFAST64 "llu"
#define PRIuMAX "llu"
#define PRIuPTR "lu"
#define PRIx8 "hhx"
#define PRIx16 "hx"
#define PRIx32 "lx"
#define PRIx64 "llx"
#define PRIxLEAST8 "hhx"
#define PRIxLEAST16 "hx"
#define PRIxLEAST32 "x"
#define PRIxLEAST64 "llx"
#define PRIxFAST8 "hhx"
#define PRIxFAST16 "x"
#define PRIxFAST32 "x"
#define PRIxFAST64 "llx"
#define PRIxMAX "llx"
#define PRIxPTR "lx"
#define PRIX8 "hhX"
#define PRIX16 "hX"
#define PRIX32 "lX"
#define PRIX64 "llX"
#define PRIXLEAST8 "hhX"
#define PRIXLEAST16 "hX"
#define PRIXLEAST32 "X"
#define PRIXLEAST64 "llX"
#define PRIXFAST8 "hhX"
#define PRIXFAST16 "X"
#define PRIXFAST32 "X"
#define PRIXFAST64 "llX"
#define PRIXMAX "llX"
#define PRIXPTR "lX"
#define SCNd8 "hhd"
#define SCNd16 "hd"
#define SCNd32 "ld"
#define SCNd64 "lld"
#define SCNdLEAST8 "hhd"
#define SCNdLEAST16 "hd"
#define SCNdLEAST32 "d"
#define SCNdLEAST64 "lld"
#define SCNdFAST8 "hhd"
#define SCNdFAST16 "d"
#define SCNdFAST32 "d"
#define SCNdFAST64 "lld"
#define SCNdMAX "lld"
#define SCNdPTR "ld"
#define SCNi8 "hhi"
#define SCNi16 "hi"
#define SCNi32 "li"
#define SCNi64 "lli"
#define SCNiLEAST8 "hhi"
#define SCNiLEAST16 "hi"
#define SCNiLEAST32 "i"
#define SCNiLEAST64 "lli"
#define SCNiFAST8 "hhi"
#define SCNiFAST16 "i"
#define SCNiFAST32 "i"
#define SCNiFAST64 "lli"
#define SCNiMAX "lli"
#define SCNiPTR "li"
#define SCNo8 "hho"
#define SCNo16 "ho"
#define SCNo32 "lo"
#define SCNo64 "llo"
#define SCNoLEAST8 "hho"
#define SCNoLEAST16 "ho"
#define SCNoLEAST32 "o"
#define SCNoLEAST64 "llo"
#define SCNoFAST8 "hho"
#define SCNoFAST16 "o"
#define SCNoFAST32 "o"
#define SCNoFAST64 "llo"
#define SCNoMAX "llo"
#define SCNoPTR "lo"
#define SCNu8 "hhu"
#define SCNu16 "hu"
#define SCNu32 "lu"
#define SCNu64 "llu"
#define SCNuLEAST8 "hhu"
#define SCNuLEAST16 "hu"
#define SCNuLEAST32 "u"
#define SCNuLEAST64 "llu"
#define SCNuFAST8 "hhu"
#define SCNuFAST16 "u"
#define SCNuFAST32 "u"
#define SCNuFAST64 "llu"
#define SCNuMAX "llu"
#define SCNuPTR "lu"
#define SCNx8 "hhx"
#define SCNx16 "hx"
#define SCNx32 "lx"
#define SCNx64 "llx"
#define SCNxLEAST8 "hhx"
#define SCNxLEAST16 "hx"
#define SCNxLEAST32 "x"
#define SCNxLEAST64 "llx"
#define SCNxFAST8 "hhx"
#define SCNxFAST16 "x"
#define SCNxFAST32 "x"
#define SCNxFAST64 "llx"
#define SCNxMAX "llx"
#define SCNxPTR "lx"
#endif /* !__cplusplus || __STDC_FORMAT_MACROS */
/* we don't need the functions below.
* when/if we do, enable the prototypes and implement them... */
/*
#ifdef __cplusplus
extern "C" {
#endif
typedef struct {
intmax_t quot;
intmax_t rem;
} imaxdiv_t;
intmax_t imaxabs (intmax_t _j);
imaxdiv_t imaxdiv (intmax_t _numer, intmax_t _denom);
intmax_t strtoimax (const char *_nptr, char **_endptr, int _base);
uintmax_t strtoumax (const char *_nptr, char **_endptr, int _base);
#ifdef __cplusplus
}
#endif
*/
#endif /* __dj_inttypes__h_ */

View File

@@ -0,0 +1,135 @@
/* Hacked from DJGPP v2.04 for use with older DJGPP versions */
/* Copyright (C) 2003 DJ Delorie, see COPYING.DJ for details */
/* Copyright (C) 2002 DJ Delorie, see COPYING.DJ for details */
/* Copyright (C) 2001 DJ Delorie, see COPYING.DJ for details */
#ifndef __dj_stdint__h_
#define __dj_stdint__h_
typedef signed char int_least8_t;
typedef unsigned char uint_least8_t;
typedef signed char int_fast8_t;
typedef unsigned char uint_fast8_t;
typedef signed char int8_t;
typedef unsigned char uint8_t;
typedef signed short int int_least16_t;
typedef unsigned short int uint_least16_t;
typedef signed int int_fast16_t;
typedef unsigned int uint_fast16_t;
typedef signed short int int16_t;
typedef unsigned short int uint16_t;
typedef signed int int_least32_t;
typedef unsigned int uint_least32_t;
typedef signed int int_fast32_t;
typedef unsigned int uint_fast32_t;
typedef signed long int32_t;
typedef unsigned long uint32_t;
__extension__ typedef signed long long int_least64_t;
__extension__ typedef unsigned long long uint_least64_t;
__extension__ typedef signed long long int_fast64_t;
__extension__ typedef unsigned long long uint_fast64_t;
__extension__ typedef signed long long int64_t;
__extension__ typedef unsigned long long uint64_t;
typedef long int intptr_t;
typedef unsigned long uintptr_t;
__extension__ typedef signed long long intmax_t;
__extension__ typedef unsigned long long uintmax_t;
/* ANSI/ISO C99 says these should not be visible in C++ unless
explicitly requested. */
#if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS)
#define INT_LEAST8_MAX 127
#define UINT_LEAST8_MAX 255
#define INT_FAST8_MAX 127
#define UINT_FAST8_MAX 255
#define INT8_MAX 127
#define UINT8_MAX 255
#define INT_LEAST8_MIN (-128)
#define INT_FAST8_MIN (-128)
#define INT8_MIN (-128)
#define INT_LEAST16_MAX 32767
#define UINT_LEAST16_MAX 65535
#define INT_FAST16_MAX 2147483647
#define UINT_FAST16_MAX 4294967295U
#define INT16_MAX 32767
#define UINT16_MAX 65535
#define INT_LEAST16_MIN (-32768)
#define INT_FAST16_MIN (-2147483647-1)
#define INT16_MIN (-32768)
#define INT_LEAST32_MAX 2147483647
#define UINT_LEAST32_MAX 4294967295U
#define INT_FAST32_MAX 2147483647
#define UINT_FAST32_MAX 4294967295U
#define INT32_MAX 2147483647L
#define UINT32_MAX 4294967295UL
#define INT_LEAST32_MIN (-2147483647-1)
#define INT_FAST32_MIN (-2147483647-1)
#define INT32_MIN (-2147483647L-1)
#define INT_LEAST64_MAX 9223372036854775807LL
#define UINT_LEAST64_MAX 18446744073709551615ULL
#define INT_FAST64_MAX 9223372036854775807LL
#define UINT_FAST64_MAX 18446744073709551615ULL
#define INT64_MAX 9223372036854775807LL
#define UINT64_MAX 18446744073709551615ULL
#define INT_LEAST64_MIN (-9223372036854775807LL-1LL)
#define INT_FAST64_MIN (-9223372036854775807LL-1LL)
#define INT64_MIN (-9223372036854775807LL-1LL)
#define INTPTR_MAX 2147483647L
#define INTPTR_MIN (-2147483647L-1L)
#define UINTPTR_MAX 0xffffffffUL
#define INTMAX_MAX 9223372036854775807LL
#define UINTMAX_MAX 18446744073709551615ULL
#define INTMAX_MIN (-9223372036854775807LL-1LL)
#define PTRDIFF_MAX 2147483647
#define PTRDIFF_MIN (-2147483647-1)
#define SIG_ATOMIC_MAX 2147483647
#define SIG_ATOMIC_MIN (-2147483647-1)
#define SIZE_MAX 4294967295U
/* These are defined by limits.h, so make them conditional. */
#ifndef WCHAR_MAX
#define WCHAR_MAX 65535
#endif
#ifndef WCHAR_MIN
#define WCHAR_MIN 0
#endif
#ifndef WINT_MAX
#define WINT_MAX 2147483647
#endif
#ifndef WINT_MIN
#define WINT_MIN (-2147483647-1)
#endif
#endif /* !__cplusplus || __STDC_LIMIT_MACROS */
#if !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS)
#define INT8_C(x) ((int8_t)x)
#define UINT8_C(x) ((uint8_t)x ## U)
#define INT16_C(x) ((int16_t)x)
#define UINT16_C(x) ((uint16_t)x ## U)
#define INT32_C(x) x ## L
#define UINT32_C(x) x ## UL
#define INT64_C(x) x ## LL
#define UINT64_C(x) x ## ULL
#define INTMAX_C(x) x ## LL
#define UINTMAX_C(x) x ## ULL
#endif /* !__cplusplus || __STDC_CONSTANT_MACROS */
#endif /* !__dj_stdint__h_ */

View File

@@ -0,0 +1,26 @@
# GNU Makefile for vispatch binaries using GCC.
# $Id: makefile,v 1.4 2011/10/08 14:10:04 sezero Exp $
CC ?= gcc
OBJECTS:= utilslib.o \
strlcat.o \
strlcpy.o \
vispatch.o
OPTIMIZATIONS= -O2
CFLAGS = -g -Wall -W -Wshadow $(OPTIMIZATIONS)
LDFLAGS=
all: vispatch
.c.o:
$(CC) $(CFLAGS) -c $*.c
vispatch: $(OBJECTS)
$(CC) -o $@ $(OBJECTS) $(LDFLAGS)
clean:
rm -f *.o *.res *.d

View File

@@ -0,0 +1,26 @@
# GNU Makefile for vispatch 32 bit DOS binaries using GCC (DJGPP).
# $Id: makefile.djgpp,v 1.5 2011/10/08 14:10:04 sezero Exp $
CC ?= gcc
OBJECTS:= utilslib.o \
strlcat.o \
strlcpy.o \
vispatch.o
OPTIMIZATIONS= -O2
CFLAGS = -g -Wall -W -Wshadow $(OPTIMIZATIONS)
LDFLAGS= -lc
all: vispatch.exe
.c.o:
$(CC) $(CFLAGS) -c $*.c
vispatch.exe: $(OBJECTS)
$(CC) -o $@ $(OBJECTS) $(LDFLAGS)
clean:
rm -f *.o *.res *.d

View File

@@ -0,0 +1,36 @@
# GNU Makefile for vispatch windows binaries using GCC (MinGW).
# $Id: makefile.mingw,v 1.5 2011/10/08 14:10:04 sezero Exp $
CC ?= gcc
WINDRES ?= windres
OBJECTS:= utilslib.o \
strlcat.o \
strlcpy.o \
vispatch.o \
vispatch.res
OPTIMIZATIONS= -O2
CFLAGS = -g -Wall -W -Wshadow -DWIN32_LEAN_AND_MEAN $(OPTIMIZATIONS)
LDFLAGS= -mconsole
all: vispatch.exe
.c.o:
$(CC) $(CFLAGS) -c $*.c
# the program name is vispatch.exe and "patch" keyword is red-flagged
# by Windows Vista and newer to trigger UAC for X86 applications.
# So we need a manifest to set requestedExecutionLevel as "asInvoker"
# and uiAccess as "false". Not needed for AMD64, but doesn't hurt,
# either.
vispatch.res: vispatch.rc vispatch.exe.manifest
$(WINDRES) -DWIN32_LEAN_AND_MEAN --output-format=coff -o $@ $<
vispatch.exe: $(OBJECTS)
$(CC) -o $@ $(OBJECTS) $(LDFLAGS)
clean:
rm -f *.o *.res *.d

View File

@@ -0,0 +1,6 @@
msinttypes-r26 from:
http://msinttypes.googlecode.com/
http://code.google.com/p/msinttypes/

View File

@@ -0,0 +1,138 @@
------------------------------------------------------------------------
r26 | 2009-10-02 13:36:47 +0400 | 2 lines
[Issue 5] Change <stdint.h> to "stdint.h" to let compiler search for it in local directory.
------------------------------------------------------------------------
r25 | 2009-09-17 23:46:49 +0400 | 2 lines
[Issue 4] Fix incorrect int8_t behaviour if compiled with /J flag.
------------------------------------------------------------------------
r24 | 2009-05-13 14:53:48 +0400 | 2 lines
Forgot about #ifdef __cplusplus guard around 'extern "C"', so inclusion to C files has been broken.
------------------------------------------------------------------------
r23 | 2009-05-12 01:27:45 +0400 | 3 lines
[Issue 2] Always wrap <wchar<61><72><EFBFBD> with external "C" {}.
It turns out that not only Visual Studio 6 requires this, but also newer versions when compiling for ARM.
------------------------------------------------------------------------
r22 | 2009-05-11 22:22:15 +0400 | 3 lines
[Issue 3] Visual Studio 6 and Embedded Visual C++ 4 doesn't realize that, e.g. char has the same size as __int8 so we give up on __intX for them.
his should close Issue 3 in issue tracker.
------------------------------------------------------------------------
r21 | 2008-07-17 09:47:22 +0400 | 4 lines
Get rid of these compiler warnings when compiling for 32-bit:
warning C4311: 'type cast' : pointer truncation from 'void *' to 'uintptr_t'
warning C4312: 'type cast' : conversion from 'uintptr_t' to 'const void *' of greater size
------------------------------------------------------------------------
r20 | 2007-10-09 16:54:27 +0400 | 2 lines
Better C99 conformance: macros for format specifiers should only be included in C++ implementations if __STDC_FORMAT_MACROS is defined before <inttypes.h> is included.
------------------------------------------------------------------------
r19 | 2007-07-04 02:14:40 +0400 | 3 lines
Explicitly cast to appropriate type INT8_MIN, INT16_MIN, INT32_MIN and INT64_MIN constants.
Due to their unusual definition in Visual Studio headers (-_Ix_MAX-1) they are propagated to int and thus do not have expected type, causing VS6 strict compiler to claim about type inconsistency.
------------------------------------------------------------------------
r18 | 2007-06-26 16:53:23 +0400 | 2 lines
Better handling of (U)INTx_C macros - now they generate constants of exact width.
------------------------------------------------------------------------
r17 | 2007-03-29 20:16:14 +0400 | 2 lines
Fix typo: Miscrosoft -> Microsoft.
------------------------------------------------------------------------
r16 | 2007-02-24 17:32:58 +0300 | 4 lines
Remove <BaseTsd.h> include, as it is not present in Visual Studio 2005 Epxress Edition and required only for INT_PTR and UINT_PTR types.
'intptr_t' and 'uintptr_t' types now defined explicitly with #ifdef _WIN64.
------------------------------------------------------------------------
r15 | 2007-02-11 20:53:05 +0300 | 2 lines
More correct fix for compilation under VS6.
------------------------------------------------------------------------
r14 | 2007-02-11 20:04:32 +0300 | 2 lines
Bugfix: fix compiling under VS6, when stdint.h enclosed in 'extern "C" {}'.
------------------------------------------------------------------------
r13 | 2006-12-13 16:53:11 +0300 | 2 lines
Make _inline modifier for imaxdiv default option. Use STATIC_IMAXDIV to make it static.
------------------------------------------------------------------------
r12 | 2006-12-13 16:42:24 +0300 | 2 lines
Error message changed: VC6 supported from now.
------------------------------------------------------------------------
r11 | 2006-12-13 16:39:33 +0300 | 2 lines
All (U)INT* types changed to (unsigned) __int*. This should make stdint.h compatible with VC6.
------------------------------------------------------------------------
r10 | 2006-12-13 16:20:57 +0300 | 3 lines
Added INLINE_IMAXDIV define switch.
If INLINE_IMAXDIV is defined imaxdiv() have static modifier. If not - it is _inline.
------------------------------------------------------------------------
r9 | 2006-12-13 15:53:52 +0300 | 2 lines
Error message for non-MSC compiler changed.
------------------------------------------------------------------------
r8 | 2006-12-13 12:47:48 +0300 | 2 lines
Added #ifndef for SIZE_MAX (it is defined in limits.h on MSVSC 8).
------------------------------------------------------------------------
r7 | 2006-12-13 01:08:02 +0300 | 2 lines
License chaged to BSD-derivative.
------------------------------------------------------------------------
r6 | 2006-12-13 00:53:20 +0300 | 2 lines
Added <wchar.h> include to avoid warnings when it is included after stdint.h.
------------------------------------------------------------------------
r5 | 2006-12-12 00:58:05 +0300 | 2 lines
BUGFIX: Definitions of INTPTR_MIN, INTPTR_MAX and UINTPTR_MAX for WIN32 and WIN64 was mixed up.
------------------------------------------------------------------------
r4 | 2006-12-12 00:51:55 +0300 | 2 lines
Rise #error if _MSC_VER is not defined. I.e. compiler other then Microsoft Visual C++ is used.
------------------------------------------------------------------------
r3 | 2006-12-11 22:54:14 +0300 | 2 lines
Added <limits.h> include to stdint.h.
------------------------------------------------------------------------
r2 | 2006-12-11 21:39:27 +0300 | 2 lines
Initial check in.
------------------------------------------------------------------------
r1 | 2006-12-11 21:30:23 +0300 | 1 line
Initial directory structure.
------------------------------------------------------------------------

View File

@@ -0,0 +1,305 @@
// ISO C9x compliant inttypes.h for Microsoft Visual Studio
// Based on ISO/IEC 9899:TC2 Committee draft (May 6, 2005) WG14/N1124
//
// Copyright (c) 2006 Alexander Chemeris
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// 3. The name of the author may be used to endorse or promote products
// derived from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
// EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
///////////////////////////////////////////////////////////////////////////////
#ifndef _MSC_VER // [
#error "Use this header only with Microsoft Visual C++ compilers!"
#endif // _MSC_VER ]
#ifndef _MSC_INTTYPES_H_ // [
#define _MSC_INTTYPES_H_
#if _MSC_VER > 1000
#pragma once
#endif
#include "stdint.h"
// 7.8 Format conversion of integer types
typedef struct {
intmax_t quot;
intmax_t rem;
} imaxdiv_t;
// 7.8.1 Macros for format specifiers
#if !defined(__cplusplus) || defined(__STDC_FORMAT_MACROS) // [ See footnote 185 at page 198
// The fprintf macros for signed integers are:
#define PRId8 "d"
#define PRIi8 "i"
#define PRIdLEAST8 "d"
#define PRIiLEAST8 "i"
#define PRIdFAST8 "d"
#define PRIiFAST8 "i"
#define PRId16 "hd"
#define PRIi16 "hi"
#define PRIdLEAST16 "hd"
#define PRIiLEAST16 "hi"
#define PRIdFAST16 "hd"
#define PRIiFAST16 "hi"
#define PRId32 "I32d"
#define PRIi32 "I32i"
#define PRIdLEAST32 "I32d"
#define PRIiLEAST32 "I32i"
#define PRIdFAST32 "I32d"
#define PRIiFAST32 "I32i"
#define PRId64 "I64d"
#define PRIi64 "I64i"
#define PRIdLEAST64 "I64d"
#define PRIiLEAST64 "I64i"
#define PRIdFAST64 "I64d"
#define PRIiFAST64 "I64i"
#define PRIdMAX "I64d"
#define PRIiMAX "I64i"
#define PRIdPTR "Id"
#define PRIiPTR "Ii"
// The fprintf macros for unsigned integers are:
#define PRIo8 "o"
#define PRIu8 "u"
#define PRIx8 "x"
#define PRIX8 "X"
#define PRIoLEAST8 "o"
#define PRIuLEAST8 "u"
#define PRIxLEAST8 "x"
#define PRIXLEAST8 "X"
#define PRIoFAST8 "o"
#define PRIuFAST8 "u"
#define PRIxFAST8 "x"
#define PRIXFAST8 "X"
#define PRIo16 "ho"
#define PRIu16 "hu"
#define PRIx16 "hx"
#define PRIX16 "hX"
#define PRIoLEAST16 "ho"
#define PRIuLEAST16 "hu"
#define PRIxLEAST16 "hx"
#define PRIXLEAST16 "hX"
#define PRIoFAST16 "ho"
#define PRIuFAST16 "hu"
#define PRIxFAST16 "hx"
#define PRIXFAST16 "hX"
#define PRIo32 "I32o"
#define PRIu32 "I32u"
#define PRIx32 "I32x"
#define PRIX32 "I32X"
#define PRIoLEAST32 "I32o"
#define PRIuLEAST32 "I32u"
#define PRIxLEAST32 "I32x"
#define PRIXLEAST32 "I32X"
#define PRIoFAST32 "I32o"
#define PRIuFAST32 "I32u"
#define PRIxFAST32 "I32x"
#define PRIXFAST32 "I32X"
#define PRIo64 "I64o"
#define PRIu64 "I64u"
#define PRIx64 "I64x"
#define PRIX64 "I64X"
#define PRIoLEAST64 "I64o"
#define PRIuLEAST64 "I64u"
#define PRIxLEAST64 "I64x"
#define PRIXLEAST64 "I64X"
#define PRIoFAST64 "I64o"
#define PRIuFAST64 "I64u"
#define PRIxFAST64 "I64x"
#define PRIXFAST64 "I64X"
#define PRIoMAX "I64o"
#define PRIuMAX "I64u"
#define PRIxMAX "I64x"
#define PRIXMAX "I64X"
#define PRIoPTR "Io"
#define PRIuPTR "Iu"
#define PRIxPTR "Ix"
#define PRIXPTR "IX"
// The fscanf macros for signed integers are:
#define SCNd8 "d"
#define SCNi8 "i"
#define SCNdLEAST8 "d"
#define SCNiLEAST8 "i"
#define SCNdFAST8 "d"
#define SCNiFAST8 "i"
#define SCNd16 "hd"
#define SCNi16 "hi"
#define SCNdLEAST16 "hd"
#define SCNiLEAST16 "hi"
#define SCNdFAST16 "hd"
#define SCNiFAST16 "hi"
#define SCNd32 "ld"
#define SCNi32 "li"
#define SCNdLEAST32 "ld"
#define SCNiLEAST32 "li"
#define SCNdFAST32 "ld"
#define SCNiFAST32 "li"
#define SCNd64 "I64d"
#define SCNi64 "I64i"
#define SCNdLEAST64 "I64d"
#define SCNiLEAST64 "I64i"
#define SCNdFAST64 "I64d"
#define SCNiFAST64 "I64i"
#define SCNdMAX "I64d"
#define SCNiMAX "I64i"
#ifdef _WIN64 // [
# define SCNdPTR "I64d"
# define SCNiPTR "I64i"
#else // _WIN64 ][
# define SCNdPTR "ld"
# define SCNiPTR "li"
#endif // _WIN64 ]
// The fscanf macros for unsigned integers are:
#define SCNo8 "o"
#define SCNu8 "u"
#define SCNx8 "x"
#define SCNX8 "X"
#define SCNoLEAST8 "o"
#define SCNuLEAST8 "u"
#define SCNxLEAST8 "x"
#define SCNXLEAST8 "X"
#define SCNoFAST8 "o"
#define SCNuFAST8 "u"
#define SCNxFAST8 "x"
#define SCNXFAST8 "X"
#define SCNo16 "ho"
#define SCNu16 "hu"
#define SCNx16 "hx"
#define SCNX16 "hX"
#define SCNoLEAST16 "ho"
#define SCNuLEAST16 "hu"
#define SCNxLEAST16 "hx"
#define SCNXLEAST16 "hX"
#define SCNoFAST16 "ho"
#define SCNuFAST16 "hu"
#define SCNxFAST16 "hx"
#define SCNXFAST16 "hX"
#define SCNo32 "lo"
#define SCNu32 "lu"
#define SCNx32 "lx"
#define SCNX32 "lX"
#define SCNoLEAST32 "lo"
#define SCNuLEAST32 "lu"
#define SCNxLEAST32 "lx"
#define SCNXLEAST32 "lX"
#define SCNoFAST32 "lo"
#define SCNuFAST32 "lu"
#define SCNxFAST32 "lx"
#define SCNXFAST32 "lX"
#define SCNo64 "I64o"
#define SCNu64 "I64u"
#define SCNx64 "I64x"
#define SCNX64 "I64X"
#define SCNoLEAST64 "I64o"
#define SCNuLEAST64 "I64u"
#define SCNxLEAST64 "I64x"
#define SCNXLEAST64 "I64X"
#define SCNoFAST64 "I64o"
#define SCNuFAST64 "I64u"
#define SCNxFAST64 "I64x"
#define SCNXFAST64 "I64X"
#define SCNoMAX "I64o"
#define SCNuMAX "I64u"
#define SCNxMAX "I64x"
#define SCNXMAX "I64X"
#ifdef _WIN64 // [
# define SCNoPTR "I64o"
# define SCNuPTR "I64u"
# define SCNxPTR "I64x"
# define SCNXPTR "I64X"
#else // _WIN64 ][
# define SCNoPTR "lo"
# define SCNuPTR "lu"
# define SCNxPTR "lx"
# define SCNXPTR "lX"
#endif // _WIN64 ]
#endif // __STDC_FORMAT_MACROS ]
// 7.8.2 Functions for greatest-width integer types
// 7.8.2.1 The imaxabs function
#define imaxabs _abs64
// 7.8.2.2 The imaxdiv function
// This is modified version of div() function from Microsoft's div.c found
// in %MSVC.NET%\crt\src\div.c
#ifdef STATIC_IMAXDIV // [
static
#else // STATIC_IMAXDIV ][
_inline
#endif // STATIC_IMAXDIV ]
imaxdiv_t __cdecl imaxdiv(intmax_t numer, intmax_t denom)
{
imaxdiv_t result;
result.quot = numer / denom;
result.rem = numer % denom;
if (numer < 0 && result.rem > 0) {
// did division wrong; must fix up
++result.quot;
result.rem -= denom;
}
return result;
}
// 7.8.2.3 The strtoimax and strtoumax functions
#define strtoimax _strtoi64
#define strtoumax _strtoui64
// 7.8.2.4 The wcstoimax and wcstoumax functions
#define wcstoimax _wcstoi64
#define wcstoumax _wcstoui64
#endif // _MSC_INTTYPES_H_ ]

View File

@@ -0,0 +1,247 @@
// ISO C9x compliant stdint.h for Microsoft Visual Studio
// Based on ISO/IEC 9899:TC2 Committee draft (May 6, 2005) WG14/N1124
//
// Copyright (c) 2006-2008 Alexander Chemeris
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// 3. The name of the author may be used to endorse or promote products
// derived from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
// EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
///////////////////////////////////////////////////////////////////////////////
#ifndef _MSC_VER // [
#error "Use this header only with Microsoft Visual C++ compilers!"
#endif // _MSC_VER ]
#ifndef _MSC_STDINT_H_ // [
#define _MSC_STDINT_H_
#if _MSC_VER > 1000
#pragma once
#endif
#include <limits.h>
// For Visual Studio 6 in C++ mode and for many Visual Studio versions when
// compiling for ARM we should wrap <wchar.h> include with 'extern "C++" {}'
// or compiler give many errors like this:
// error C2733: second C linkage of overloaded function 'wmemchr' not allowed
#ifdef __cplusplus
extern "C" {
#endif
# include <wchar.h>
#ifdef __cplusplus
}
#endif
// Define _W64 macros to mark types changing their size, like intptr_t.
#ifndef _W64
# if !defined(__midl) && (defined(_X86_) || defined(_M_IX86)) && _MSC_VER >= 1300
# define _W64 __w64
# else
# define _W64
# endif
#endif
// 7.18.1 Integer types
// 7.18.1.1 Exact-width integer types
// Visual Studio 6 and Embedded Visual C++ 4 doesn't
// realize that, e.g. char has the same size as __int8
// so we give up on __intX for them.
#if (_MSC_VER < 1300)
typedef signed char int8_t;
typedef signed short int16_t;
typedef signed int int32_t;
typedef unsigned char uint8_t;
typedef unsigned short uint16_t;
typedef unsigned int uint32_t;
#else
typedef signed __int8 int8_t;
typedef signed __int16 int16_t;
typedef signed __int32 int32_t;
typedef unsigned __int8 uint8_t;
typedef unsigned __int16 uint16_t;
typedef unsigned __int32 uint32_t;
#endif
typedef signed __int64 int64_t;
typedef unsigned __int64 uint64_t;
// 7.18.1.2 Minimum-width integer types
typedef int8_t int_least8_t;
typedef int16_t int_least16_t;
typedef int32_t int_least32_t;
typedef int64_t int_least64_t;
typedef uint8_t uint_least8_t;
typedef uint16_t uint_least16_t;
typedef uint32_t uint_least32_t;
typedef uint64_t uint_least64_t;
// 7.18.1.3 Fastest minimum-width integer types
typedef int8_t int_fast8_t;
typedef int16_t int_fast16_t;
typedef int32_t int_fast32_t;
typedef int64_t int_fast64_t;
typedef uint8_t uint_fast8_t;
typedef uint16_t uint_fast16_t;
typedef uint32_t uint_fast32_t;
typedef uint64_t uint_fast64_t;
// 7.18.1.4 Integer types capable of holding object pointers
#ifdef _WIN64 // [
typedef signed __int64 intptr_t;
typedef unsigned __int64 uintptr_t;
#else // _WIN64 ][
typedef _W64 signed int intptr_t;
typedef _W64 unsigned int uintptr_t;
#endif // _WIN64 ]
// 7.18.1.5 Greatest-width integer types
typedef int64_t intmax_t;
typedef uint64_t uintmax_t;
// 7.18.2 Limits of specified-width integer types
#if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) // [ See footnote 220 at page 257 and footnote 221 at page 259
// 7.18.2.1 Limits of exact-width integer types
#define INT8_MIN ((int8_t)_I8_MIN)
#define INT8_MAX _I8_MAX
#define INT16_MIN ((int16_t)_I16_MIN)
#define INT16_MAX _I16_MAX
#define INT32_MIN ((int32_t)_I32_MIN)
#define INT32_MAX _I32_MAX
#define INT64_MIN ((int64_t)_I64_MIN)
#define INT64_MAX _I64_MAX
#define UINT8_MAX _UI8_MAX
#define UINT16_MAX _UI16_MAX
#define UINT32_MAX _UI32_MAX
#define UINT64_MAX _UI64_MAX
// 7.18.2.2 Limits of minimum-width integer types
#define INT_LEAST8_MIN INT8_MIN
#define INT_LEAST8_MAX INT8_MAX
#define INT_LEAST16_MIN INT16_MIN
#define INT_LEAST16_MAX INT16_MAX
#define INT_LEAST32_MIN INT32_MIN
#define INT_LEAST32_MAX INT32_MAX
#define INT_LEAST64_MIN INT64_MIN
#define INT_LEAST64_MAX INT64_MAX
#define UINT_LEAST8_MAX UINT8_MAX
#define UINT_LEAST16_MAX UINT16_MAX
#define UINT_LEAST32_MAX UINT32_MAX
#define UINT_LEAST64_MAX UINT64_MAX
// 7.18.2.3 Limits of fastest minimum-width integer types
#define INT_FAST8_MIN INT8_MIN
#define INT_FAST8_MAX INT8_MAX
#define INT_FAST16_MIN INT16_MIN
#define INT_FAST16_MAX INT16_MAX
#define INT_FAST32_MIN INT32_MIN
#define INT_FAST32_MAX INT32_MAX
#define INT_FAST64_MIN INT64_MIN
#define INT_FAST64_MAX INT64_MAX
#define UINT_FAST8_MAX UINT8_MAX
#define UINT_FAST16_MAX UINT16_MAX
#define UINT_FAST32_MAX UINT32_MAX
#define UINT_FAST64_MAX UINT64_MAX
// 7.18.2.4 Limits of integer types capable of holding object pointers
#ifdef _WIN64 // [
# define INTPTR_MIN INT64_MIN
# define INTPTR_MAX INT64_MAX
# define UINTPTR_MAX UINT64_MAX
#else // _WIN64 ][
# define INTPTR_MIN INT32_MIN
# define INTPTR_MAX INT32_MAX
# define UINTPTR_MAX UINT32_MAX
#endif // _WIN64 ]
// 7.18.2.5 Limits of greatest-width integer types
#define INTMAX_MIN INT64_MIN
#define INTMAX_MAX INT64_MAX
#define UINTMAX_MAX UINT64_MAX
// 7.18.3 Limits of other integer types
#ifdef _WIN64 // [
# define PTRDIFF_MIN _I64_MIN
# define PTRDIFF_MAX _I64_MAX
#else // _WIN64 ][
# define PTRDIFF_MIN _I32_MIN
# define PTRDIFF_MAX _I32_MAX
#endif // _WIN64 ]
#define SIG_ATOMIC_MIN INT_MIN
#define SIG_ATOMIC_MAX INT_MAX
#ifndef SIZE_MAX // [
# ifdef _WIN64 // [
# define SIZE_MAX _UI64_MAX
# else // _WIN64 ][
# define SIZE_MAX _UI32_MAX
# endif // _WIN64 ]
#endif // SIZE_MAX ]
// WCHAR_MIN and WCHAR_MAX are also defined in <wchar.h>
#ifndef WCHAR_MIN // [
# define WCHAR_MIN 0
#endif // WCHAR_MIN ]
#ifndef WCHAR_MAX // [
# define WCHAR_MAX _UI16_MAX
#endif // WCHAR_MAX ]
#define WINT_MIN 0
#define WINT_MAX _UI16_MAX
#endif // __STDC_LIMIT_MACROS ]
// 7.18.4 Limits of other integer types
#if !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS) // [ See footnote 224 at page 260
// 7.18.4.1 Macros for minimum-width integer constants
#define INT8_C(val) val##i8
#define INT16_C(val) val##i16
#define INT32_C(val) val##i32
#define INT64_C(val) val##i64
#define UINT8_C(val) val##ui8
#define UINT16_C(val) val##ui16
#define UINT32_C(val) val##ui32
#define UINT64_C(val) val##ui64
// 7.18.4.2 Macros for greatest-width integer constants
#define INTMAX_C INT64_C
#define UINTMAX_C UINT64_C
#endif // __STDC_CONSTANT_MACROS ]
#endif // _MSC_STDINT_H_ ]

Binary file not shown.

View File

@@ -0,0 +1,91 @@
VisPatch 1.2
simple:
VisPatch file.pak or file.bsp (wildcards ok) -extract
that retrieves all data nessisary for vis updates.
VisPatch file.xxx -new:
for bsps:
makes bakups of the old bsps as file.bak.
It will only patch bsp's that it has data for and skips those that it does not.
for Paks:
Puts all levels into one pak file that is incrementally higher than
your last one.
"Vispatch file.xxx" replaces the file.
"vispatch file.xxx -extract" retrives all the vis data from the current file.
"vispatch file.xxx -data some.dat" uses some.dat instead of vispatch.dat.
"vispatch file.xxx -data some.dat -extract" puts data into some.dat instead of vispatch.dat.
List of parameters:
-extract puts the vis data into a data file.
-dir specifies the directory the level files are in.
-data specifies the vis data file (no wildcards)
-new puts the modifies levels into a new pak file if they were in a pak
file. Renames the unmodified bsp files to name.bak and saves it as
the original name.
Revision history:
Version 1.2:
Fixed the NT file loop by using the archive attribute.
It simply removes the attribute on the files then checks
the files for the attribute before processing them. If
they have the attribute, then they aren't the originals and
we are done with it.
Now Dumps you out and cleans up when out of disk space.
Version 1.1:
Now doesn't put unmodified levels in paks and do anything to unmodified
BSP's.
Note: I didn't want this released because I had already finished and
sent Ken 1.2 when it was released. Ugh.
Version 1.0b:
Added -dir for Ken's install batch program.
Added -data for Ken's install batch program.
Version 1.0a:
Minor bug fixes.(ie I forgot.)
Version 1.0:
And there was light (on the other side of the water.)
Installation:
If you just want to patch your data, just use the batch files Ken made.
If you use VisPatch without it,
"Vispatch" all by it's lonesome will update all the pak?.pak files in the
current directory with the vispatch.dat file in the directory.
If you want to make your own patches to use Ken's program use this format:
Files:
MyPatch.vis Actual data. -data MyPatch.vis
MyPatch.dat 4 line description of your patch.
Probably a text file saying how to get this program.
If you want to merge two data sets, just do
"copy /b file1.ext+file2.ext newfile.ext"
I chose the file format for that reason. (I was expecting about 20 sources
for all ID's levels alone and needed a good way to combine them.)
Andy Bay
ABay@teir.com
Credits:
Ken Alverson - The neat WQBSP he made, and organizing the data collection for this.
Alex Moon - Making a BSP2Prt file making the fastest available vis tables.
ID - Making such cool games.
DeathDealer - Being such a sport about Water Transperency.
http://www.allgames.com/quake/
Razor - The other cool place to get this.
http://razor.stomped.com/water/
WaterVIS - Another cool place to get this
http://www.sod.net/vis/
CDROM.COM:
ftp://ftp.cdrom.com/pub/quake/utils/bsp_pak_tools/
All our Data donators. (Ken listed them.)

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,203 @@
/*
q_endian.h
endianness handling
$Id: q_endian.h,v 1.5 2011/10/08 12:33:03 sezero Exp $
Copyright (C) 1996-1997 Id Software, Inc.
Copyright (C) 2007-2011 O.Sezer <sezero@users.sourceforge.net>
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:
Free Software Foundation, Inc.
51 Franklin St, Fifth Floor,
Boston, MA 02110-1301 USA
*/
#ifndef __QENDIAN_H
#define __QENDIAN_H
/*
* endianness stuff: <sys/types.h> is supposed
* to succeed in locating the correct endian.h
* this BSD style may not work everywhere.
*/
#undef ENDIAN_GUESSED_SAFE
#undef ENDIAN_ASSUMED_UNSAFE
#undef ENDIAN_RUNTIME_DETECT
/* if you want to detect byte order at runtime
* instead of compile time, define this as 1 :
*/
#define ENDIAN_RUNTIME_DETECT 0
#include <sys/types.h>
/* include more if it didn't work: */
#if !defined(BYTE_ORDER)
# if defined(__linux__) || defined(__linux)
# include <endian.h>
# elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
# include <machine/endian.h>
# elif defined(__sun) || defined(__svr4__)
# include <sys/byteorder.h>
# elif defined(_AIX)
# include <sys/machine.h>
# elif defined(sgi)
# include <sys/endian.h>
# elif defined(__DJGPP__)
# include <machine/endian.h>
# endif
#endif /* endian includes */
#if defined(__BYTE_ORDER) && !defined(BYTE_ORDER)
#define BYTE_ORDER __BYTE_ORDER
#endif /* __BYTE_ORDER */
#if !defined(PDP_ENDIAN)
#if defined(__PDP_ENDIAN)
#define PDP_ENDIAN __PDP_ENDIAN
#else
#define PDP_ENDIAN 3412
#endif
#endif /* NUXI endian (not supported) */
#if defined(__LITTLE_ENDIAN) && !defined(LITTLE_ENDIAN)
#define LITTLE_ENDIAN __LITTLE_ENDIAN
#endif /* __LITTLE_ENDIAN */
#if defined(__BIG_ENDIAN) && !defined(BIG_ENDIAN)
#define BIG_ENDIAN __BIG_ENDIAN
#endif /* __LITTLE_ENDIAN */
#if defined(BYTE_ORDER) && defined(LITTLE_ENDIAN) && defined(BIG_ENDIAN)
# if (BYTE_ORDER != LITTLE_ENDIAN) && (BYTE_ORDER != BIG_ENDIAN)
# error "Unsupported endianness."
# endif
#else /* one of the definitions is mising. */
# undef BYTE_ORDER
# undef LITTLE_ENDIAN
# undef BIG_ENDIAN
# undef PDP_ENDIAN
# define LITTLE_ENDIAN 1234
# define BIG_ENDIAN 4321
# define PDP_ENDIAN 3412
#endif /* byte order defs */
#if !defined(BYTE_ORDER)
/* supposedly safe assumptions: these may actually
* be OS dependant and listing all possible compiler
* macros here is impossible (the ones here are gcc
* flags, mostly.) so, proceed carefully..
*/
# if defined(__DJGPP__) || defined(MSDOS) || defined(__MSDOS__)
# define BYTE_ORDER LITTLE_ENDIAN /* DOS */
# elif defined(__sun) || defined(__svr4__) /* solaris */
# if defined(_LITTLE_ENDIAN) /* x86 */
# define BYTE_ORDER LITTLE_ENDIAN
# elif defined(_BIG_ENDIAN) /* sparc */
# define BYTE_ORDER BIG_ENDIAN
# endif
# elif defined(__i386) || defined(__i386__) || defined(__386__) || defined(_M_IX86)
# define BYTE_ORDER LITTLE_ENDIAN /* any x86 */
# elif defined(__amd64) || defined(__x86_64__) || defined(_M_X64)
# define BYTE_ORDER LITTLE_ENDIAN /* any x64 */
# elif defined(_M_IA64)
# define BYTE_ORDER LITTLE_ENDIAN /* ia64 / Visual C */
# elif defined (__ppc__) || defined(__POWERPC__) || defined(_M_PPC)
# define BYTE_ORDER BIG_ENDIAN /* PPC: big endian */
# elif (defined(__alpha__) || defined(__alpha)) || defined(_M_ALPHA)
# define BYTE_ORDER LITTLE_ENDIAN /* should be safe */
# elif defined(_WIN32) || defined(_WIN64) /* windows : */
# define BYTE_ORDER LITTLE_ENDIAN /* should be safe */
# elif defined(__hppa) || defined(__hppa__) || defined(__sparc) || defined(__sparc__) /* others: check! */
# define BYTE_ORDER BIG_ENDIAN
# endif
# if defined(BYTE_ORDER)
/* raise a flag, just in case: */
# define ENDIAN_GUESSED_SAFE BYTE_ORDER
# endif
#endif /* supposedly safe assumptions */
#if !defined(BYTE_ORDER)
/* brain-dead fallback: default to little endian.
* change if necessary, or use runtime detection!
*/
# define BYTE_ORDER LITTLE_ENDIAN
# define ENDIAN_ASSUMED_UNSAFE BYTE_ORDER
#endif /* fallback. */
extern int host_byteorder;
extern int host_bigendian; /* bool */
extern int DetectByteorder (void);
extern void ByteOrder_Init (void);
/* byte swapping. most times we want to convert to
* little endian: our data files are written in LE
* format. sometimes, such as when writing to net,
* we also convert to big endian.
*/
#if ENDIAN_RUNTIME_DETECT
extern int (*BigLong) (int);
extern int (*LittleLong) (int);
#else /* ! ENDIAN_RUNTIME_DETECT */
extern int LongSwap (int);
#if (BYTE_ORDER == BIG_ENDIAN)
#define BigLong(l) (l)
#define LittleLong(l) LongSwap((l))
#else /* BYTE_ORDER == LITTLE_ENDIAN */
#define BigLong(l) LongSwap((l))
#define LittleLong(l) (l)
#endif /* swap macros */
#endif /* runtime det */
#endif /* __QENDIAN_H */

View File

@@ -0,0 +1,83 @@
/*
q_stdinc.h
includes the minimum necessary stdc headers,
$Id: q_stdinc.h,v 1.8 2011/10/08 12:33:03 sezero Exp $
Copyright (C) 1996-1997 Id Software, Inc.
Copyright (C) 2007-2011 O.Sezer <sezero@users.sourceforge.net>
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:
Free Software Foundation, Inc.
51 Franklin St, Fifth Floor,
Boston, MA 02110-1301 USA
*/
#ifndef __QSTDINC_H
#define __QSTDINC_H
#include <sys/types.h>
#include <stddef.h>
#include <limits.h>
#include <stdio.h>
#if 0
#include "q_stdint.h"
#endif
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#if !defined(_WIN32)
#include <strings.h> /* strcasecmp and strncasecmp */
#endif /* ! PLATFORM_WINDOWS */
/*==========================================================================*/
#ifndef NULL
#if defined(__cplusplus)
#define NULL 0
#else
#define NULL ((void *)0)
#endif
#endif
/* Make sure the types really have the right
* sizes: These macros are from SDL headers.
*/
#define COMPILE_TIME_ASSERT(name, x) \
typedef int dummy_ ## name[(x) * 2 - 1]
COMPILE_TIME_ASSERT(char, sizeof(char) == 1);
COMPILE_TIME_ASSERT(long, sizeof(long) >= 4);
COMPILE_TIME_ASSERT(int, sizeof(int) == 4);
COMPILE_TIME_ASSERT(short, sizeof(short) == 2);
/* Provide a substitute for offsetof() if we don't have one.
* This variant works on most (but not *all*) systems...
*/
#ifndef offsetof
#define offsetof(t,m) ((size_t)&(((t *)0)->m))
#endif
/*==========================================================================*/
#endif /* __QSTDINC_H */

View File

@@ -0,0 +1,24 @@
/* q_stdint.h: include a proper stdint.h header */
#ifndef __QSTDINT_H
#define __QSTDINT_H
#if defined(_MSC_VER) && (_MSC_VER < 1600)
/* MS Visual Studio provides stdint.h only starting with
* version 2010. Even in VS2010, there is no inttypes.h.. */
#include "msinttypes/stdint.h"
#elif defined(__DJGPP__) && \
(!defined(__DJGPP_MINOR__) || __DJGPP_MINOR__ < 4)
/* DJGPP < v2.04 doesn't have stdint.h and inttypes.h. */
/* to ensure a proper version check, include stdio.h
* or go32.h which includes sys/version.h since djgpp
* versions >= 2.02 and defines __DJGPP_MINOR__ */
#include "djstdint/stdint.h"
#else /* assume presence of a stdint.h from the SDK. */
#include <stdint.h>
#endif
#endif /* __QSTDINT_H */

View File

@@ -0,0 +1,28 @@
/*
strl_fn.h
header file for BSD strlcat and strlcpy
$Id: strl_fn.h,v 1.2 2008/01/18 09:57:01 sezero Exp $
*/
#ifndef __STRLFUNCS_H
#define __STRLFUNCS_H
/* do we have strlcpy and strlcat as native library functions? */
#undef HAVE_STRLCPY
#undef HAVE_STRLCAT
#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__MACOSX__) || defined(__DragonFly__)
#define HAVE_STRLCPY 1
#define HAVE_STRLCAT 1
#else
#define HAVE_STRLCPY 0
#define HAVE_STRLCAT 0
#endif
#endif /* __STRLFUNCS_H */

View File

@@ -0,0 +1,61 @@
/* $OpenBSD: strlcat.c,v 1.13 2005/08/08 08:05:37 espie Exp $ */
/*
* Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include <sys/types.h>
#include <string.h>
#include "arch_def.h"
#include "strl_fn.h"
/*
* Appends src to string dst of size siz (unlike strncat, siz is the
* full size of dst, not space left). At most siz-1 characters
* will be copied. Always NUL terminates (unless siz <= strlen(dst)).
* Returns strlen(src) + MIN(siz, strlen(initial dst)).
* If retval >= siz, truncation occurred.
*/
#if !HAVE_STRLCAT
size_t
q_strlcat (char *dst, const char *src, size_t siz)
{
char *d = dst;
const char *s = src;
size_t n = siz;
size_t dlen;
/* Find the end of dst and adjust bytes left but don't go past end */
while (n-- != 0 && *d != '\0')
d++;
dlen = d - dst;
n = siz - dlen;
if (n == 0)
return(dlen + strlen(s));
while (*s != '\0') {
if (n != 1) {
*d++ = *s;
n--;
}
s++;
}
*d = '\0';
return(dlen + (s - src)); /* count does not include NUL */
}
#endif

View File

@@ -0,0 +1,186 @@
.\" $OpenBSD: strlcpy.3,v 1.18 2005/08/06 03:24:19 jaredy Exp $
.\"
.\" Copyright (c) 1998, 2000 Todd C. Miller <Todd.Miller@courtesan.com>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd June 22, 1998
.Dt STRLCPY 3
.Os
.Sh NAME
.Nm strlcpy ,
.Nm strlcat
.Nd size-bounded string copying and concatenation
.Sh SYNOPSIS
.Fd #include <string.h>
.Ft size_t
.Fn strlcpy "char *dst" "const char *src" "size_t size"
.Ft size_t
.Fn strlcat "char *dst" "const char *src" "size_t size"
.Sh DESCRIPTION
The
.Fn strlcpy
and
.Fn strlcat
functions copy and concatenate strings respectively.
They are designed
to be safer, more consistent, and less error prone replacements for
.Xr strncpy 3
and
.Xr strncat 3 .
Unlike those functions,
.Fn strlcpy
and
.Fn strlcat
take the full size of the buffer (not just the length) and guarantee to
NUL-terminate the result (as long as
.Fa size
is larger than 0 or, in the case of
.Fn strlcat ,
as long as there is at least one byte free in
.Fa dst ) .
Note that a byte for the NUL should be included in
.Fa size .
Also note that
.Fn strlcpy
and
.Fn strlcat
only operate on true
.Dq C
strings.
This means that for
.Fn strlcpy
.Fa src
must be NUL-terminated and for
.Fn strlcat
both
.Fa src
and
.Fa dst
must be NUL-terminated.
.Pp
The
.Fn strlcpy
function copies up to
.Fa size
- 1 characters from the NUL-terminated string
.Fa src
to
.Fa dst ,
NUL-terminating the result.
.Pp
The
.Fn strlcat
function appends the NUL-terminated string
.Fa src
to the end of
.Fa dst .
It will append at most
.Fa size
- strlen(dst) - 1 bytes, NUL-terminating the result.
.Sh RETURN VALUES
The
.Fn strlcpy
and
.Fn strlcat
functions return the total length of the string they tried to create.
For
.Fn strlcpy
that means the length of
.Fa src .
For
.Fn strlcat
that means the initial length of
.Fa dst
plus
the length of
.Fa src .
While this may seem somewhat confusing, it was done to make
truncation detection simple.
.Pp
Note, however, that if
.Fn strlcat
traverses
.Fa size
characters without finding a NUL, the length of the string is considered
to be
.Fa size
and the destination string will not be NUL-terminated (since there was
no space for the NUL).
This keeps
.Fn strlcat
from running off the end of a string.
In practice this should not happen (as it means that either
.Fa size
is incorrect or that
.Fa dst
is not a proper
.Dq C
string).
The check exists to prevent potential security problems in incorrect code.
.Sh EXAMPLES
The following code fragment illustrates the simple case:
.Bd -literal -offset indent
char *s, *p, buf[BUFSIZ];
\&...
(void)strlcpy(buf, s, sizeof(buf));
(void)strlcat(buf, p, sizeof(buf));
.Ed
.Pp
To detect truncation, perhaps while building a pathname, something
like the following might be used:
.Bd -literal -offset indent
char *dir, *file, pname[MAXPATHLEN];
\&...
if (strlcpy(pname, dir, sizeof(pname)) >= sizeof(pname))
goto toolong;
if (strlcat(pname, file, sizeof(pname)) >= sizeof(pname))
goto toolong;
.Ed
.Pp
Since it is known how many characters were copied the first time, things
can be sped up a bit by using a copy instead of an append:
.Bd -literal -offset indent
char *dir, *file, pname[MAXPATHLEN];
size_t n;
\&...
n = strlcpy(pname, dir, sizeof(pname));
if (n >= sizeof(pname))
goto toolong;
if (strlcpy(pname + n, file, sizeof(pname) - n) >= sizeof(pname) - n)
goto toolong;
.Ed
.Pp
However, one may question the validity of such optimizations, as they
defeat the whole purpose of
.Fn strlcpy
and
.Fn strlcat .
As a matter of fact, the first version of this manual page got it wrong.
.Sh SEE ALSO
.Xr snprintf 3 ,
.Xr strncat 3 ,
.Xr strncpy 3
.Sh HISTORY
The
.Fn strlcpy
and
.Fn strlcat
functions first appeared in
.Ox 2.4 .

View File

@@ -0,0 +1,57 @@
/* $OpenBSD: strlcpy.c,v 1.11 2006/05/05 15:27:38 millert Exp $ */
/*
* Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include <sys/types.h>
#include <string.h>
#include "arch_def.h"
#include "strl_fn.h"
/*
* Copy src to string dst of size siz. At most siz-1 characters
* will be copied. Always NUL terminates (unless siz == 0).
* Returns strlen(src); if retval >= siz, truncation occurred.
*/
#if !HAVE_STRLCPY
size_t
q_strlcpy (char *dst, const char *src, size_t siz)
{
char *d = dst;
const char *s = src;
size_t n = siz;
/* Copy as many bytes as will fit */
if (n != 0) {
while (--n != 0) {
if ((*d++ = *s++) == '\0')
break;
}
}
/* Not enough room in dst, add NUL and traverse rest of src */
if (n == 0) {
if (siz != 0)
*d = '\0'; /* NUL-terminate dst */
while (*s++)
;
}
return(s - src - 1); /* count does not include NUL */
}
#endif

View File

@@ -0,0 +1,529 @@
/*
* VisPatch : Quake level patcher for water visibility.
*
* Copyright (C) 1996-1997 Id Software, Inc.
* Copyright (C) 1997-2006 Andy Bay <IMarvinTPA@bigfoot.com>
* Copyright (C) 2006-2011 O. Sezer <sezero@users.sourceforge.net>
*
* $Id: utilslib.c,v 1.13 2011/10/08 12:33:03 sezero Exp $
*
* 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:
*
* Free Software Foundation, Inc.
* 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301 USA
*/
#include "arch_def.h"
#include "compiler.h"
#include "q_stdinc.h"
#include "q_endian.h"
#include <sys/stat.h>
#if defined(PLATFORM_WINDOWS)
#include <windows.h>
#include <io.h>
#include <direct.h>
#endif /* PLATFORM_WINDOWS */
#if defined(PLATFORM_DOS)
#include <unistd.h>
#include <dos.h>
#include <io.h>
#include <dir.h>
#include <fcntl.h>
#endif /* PLATFORM_DOS */
#if defined(PLATFORM_UNIX)
#include <unistd.h>
#include <dirent.h>
#include <fnmatch.h>
#endif /* PLATFORM_UNIX */
#include <ctype.h>
#include "utilslib.h"
/*============================================================================*/
#if defined(__DJGPP__) && \
(!defined(__DJGPP_MINOR__) || __DJGPP_MINOR__ < 4)
/* DJGPP < v2.04 doesn't have [v]snprintf(). */
/* to ensure a proper version check, include stdio.h
* or go32.h which includes sys/version.h since djgpp
* versions >= 2.02 and defines __DJGPP_MINOR__ */
#include "djlib/vsnprntf.c"
#endif /* __DJGPP_MINOR__ < 4 */
int q_vsnprintf(char *str, size_t size, const char *format, va_list args)
{
int ret;
ret = vsnprintf_func (str, size, format, args);
if (ret < 0)
ret = (int)size;
if ((size_t)ret >= size)
str[size - 1] = '\0';
return ret;
}
int q_snprintf (char *str, size_t size, const char *format, ...)
{
int ret;
va_list argptr;
va_start (argptr, format);
ret = q_vsnprintf (str, size, format, argptr);
va_end (argptr);
return ret;
}
char *q_strlwr (char *str)
{
char *c;
c = str;
while (*c)
{
*c = tolower(*c);
c++;
}
return str;
}
char *q_strrev (char *str)
{
char a, *b, *e;
b = e = str;
while (*e++)
;
e -= 2;
while ( b < e )
{
a = *b;
*b = *e;
*e = a;
b++;
e--;
}
return str;
}
/*============================================================================*/
void Error (const char *error, ...)
{
va_list argptr;
fprintf (stderr, "*** ERROR: ***\n");
va_start (argptr, error);
vfprintf (stderr, error, argptr);
va_end (argptr);
fprintf (stderr, "\n");
exit (1);
}
/*============================================================================*/
#if defined(PLATFORM_WINDOWS)
static HANDLE findhandle = INVALID_HANDLE_VALUE;
static WIN32_FIND_DATA finddata;
char *Sys_FindFirstFile (const char *path, const char *pattern)
{
char tmp_buf[256];
if (findhandle != INVALID_HANDLE_VALUE)
Error ("Sys_FindFirst without FindClose");
q_snprintf (tmp_buf, sizeof(tmp_buf), "%s/%s", path, pattern);
findhandle = FindFirstFile(tmp_buf, &finddata);
if (findhandle == INVALID_HANDLE_VALUE)
return NULL;
if (finddata.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
return Sys_FindNextFile();
return finddata.cFileName;
}
char *Sys_FindNextFile (void)
{
if (findhandle == INVALID_HANDLE_VALUE)
return NULL;
while (FindNextFile(findhandle, &finddata) != 0)
{
if (finddata.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
continue;
return finddata.cFileName;
}
return NULL;
}
void Sys_FindClose (void)
{
if (findhandle != INVALID_HANDLE_VALUE)
{
FindClose(findhandle);
findhandle = INVALID_HANDLE_VALUE;
}
}
int Sys_filesize (const char *filename)
{
HANDLE fh;
WIN32_FIND_DATA data;
int size;
fh = FindFirstFile(filename, &data);
if (fh == INVALID_HANDLE_VALUE)
return -1;
FindClose(fh);
if (data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
return -1;
// we're not dealing with gigabytes of files.
// size should normally smaller than INT_MAX.
// size = (data.nFileSizeHigh * (MAXDWORD + 1)) + data.nFileSizeLow;
size = (int) data.nFileSizeLow;
return size;
}
int Sys_getcwd (char *buf, size_t size)
{
if (_getcwd(buf, size) == NULL)
return 1;
return 0;
}
#endif /* PLATFORM_WINDOWS */
//============================================================================
#if defined(PLATFORM_DOS)
static struct ffblk finddata;
static int findhandle = -1;
char *Sys_FindFirstFile (const char *path, const char *pattern)
{
char tmp_buf[256];
if (findhandle == 0)
Error ("Sys_FindFirst without FindClose");
q_snprintf (tmp_buf, sizeof(tmp_buf), "%s/%s", path, pattern);
memset (&finddata, 0, sizeof(finddata));
findhandle = findfirst(tmp_buf, &finddata, FA_ARCH | FA_RDONLY);
if (findhandle == 0)
return finddata.ff_name;
return NULL;
}
char *Sys_FindNextFile (void)
{
if (findhandle != 0)
return NULL;
if (findnext(&finddata) == 0)
return finddata.ff_name;
return NULL;
}
void Sys_FindClose (void)
{
findhandle = -1;
}
int Sys_filesize (const char *filename)
{
struct ffblk f;
if (findfirst(filename, &f, FA_ARCH | FA_RDONLY) != 0)
return -1;
return (int) f.ff_fsize;
}
int Sys_getcwd (char *buf, size_t size)
{
if (getcwd(buf, size) == NULL)
return 1;
return 0;
}
#endif /* PLATFORM_DOS */
//============================================================================
#if defined(PLATFORM_UNIX)
static DIR *finddir;
static struct dirent *finddata;
static char *findpath, *findpattern;
static char matchpath[256];
char *Sys_FindFirstFile (const char *path, const char *pattern)
{
if (finddir)
Error ("Sys_FindFirst without FindClose");
finddir = opendir (path);
if (!finddir)
return NULL;
findpattern = strdup (pattern);
if (!findpattern)
{
Sys_FindClose();
return NULL;
}
findpath = strdup (path);
if (!findpath)
{
Sys_FindClose();
return NULL;
}
if (*findpath != '\0')
{
/* searching under "/" won't be a good idea, for example.. */
size_t siz = strlen(findpath) - 1;
if (findpath[siz] == '/' || findpath[siz] == '\\')
findpath[siz] = '\0';
}
return Sys_FindNextFile();
}
char *Sys_FindNextFile (void)
{
struct stat test;
if (!finddir)
return NULL;
while ((finddata = readdir(finddir)) != NULL)
{
if (!fnmatch (findpattern, finddata->d_name, FNM_PATHNAME))
{
q_snprintf(matchpath, sizeof(matchpath), "%s/%s", findpath, finddata->d_name);
if ( (stat(matchpath, &test) == 0)
&& S_ISREG(test.st_mode))
return finddata->d_name;
}
}
return NULL;
}
void Sys_FindClose (void)
{
if (finddir != NULL)
{
closedir(finddir);
finddir = NULL;
}
if (findpath != NULL)
{
free (findpath);
findpath = NULL;
}
if (findpattern != NULL)
{
free (findpattern);
findpattern = NULL;
}
}
int Sys_filesize (const char *filename)
{
struct stat status;
if (stat(filename, &status) == -1)
return -1;
if (! S_ISREG(status.st_mode))
return -1;
return (int) status.st_size;
}
int Sys_getcwd (char *buf, size_t size)
{
if (getcwd(buf, size) == NULL)
return 1;
return 0;
}
#endif /* PLATFORM_UNIX */
/*============================================================================*/
/*========== BYTE ORDER STUFF ================================================*/
#if ENDIAN_RUNTIME_DETECT
#define __byteswap_func static
#else
#define __byteswap_func
#endif /* ENDIAN_RUNTIME_DETECT */
#if ENDIAN_RUNTIME_DETECT
/*
# warning "Byte order will be detected at runtime"
*/
#elif defined(ENDIAN_ASSUMED_UNSAFE)
# warning "Cannot determine byte order:"
# if (ENDIAN_ASSUMED_UNSAFE == LITTLE_ENDIAN)
# warning "Using LIL endian as an UNSAFE default."
# elif (ENDIAN_ASSUMED_UNSAFE == BIG_ENDIAN)
# warning "Using BIG endian as an UNSAFE default."
# endif
# warning "Revise the macros in q_endian.h for this"
# warning "machine or use runtime detection !!!"
#endif /* ENDIAN_ASSUMED_UNSAFE */
int host_byteorder;
int host_bigendian; /* bool */
int DetectByteorder (void)
{
int i = 0x12345678;
/* U N I X */
/*
BE_ORDER: 12 34 56 78
U N I X
LE_ORDER: 78 56 34 12
X I N U
PDP_ORDER: 34 12 78 56
N U X I
*/
if ( *(char *)&i == 0x12 )
return BIG_ENDIAN;
else if ( *(char *)&i == 0x78 )
return LITTLE_ENDIAN;
else if ( *(char *)&i == 0x34 )
return PDP_ENDIAN;
return -1;
}
__byteswap_func
int LongSwap (int l)
{
unsigned char b1, b2, b3, b4;
b1 = l & 255;
b2 = (l>>8 ) & 255;
b3 = (l>>16) & 255;
b4 = (l>>24) & 255;
return ((int)b1<<24) + ((int)b2<<16) + ((int)b3<<8) + b4;
}
#if ENDIAN_RUNTIME_DETECT
__byteswap_func
int LongNoSwap (int l)
{
return l;
}
int (*BigLong) (int);
int (*LittleLong) (int);
#endif /* ENDIAN_RUNTIME_DETECT */
void ByteOrder_Init (void)
{
host_byteorder = DetectByteorder ();
host_bigendian = (host_byteorder == BIG_ENDIAN);
#if ENDIAN_RUNTIME_DETECT
switch (host_byteorder)
{
case BIG_ENDIAN:
BigLong = LongNoSwap;
LittleLong = LongSwap;
break;
case LITTLE_ENDIAN:
BigLong = LongSwap;
LittleLong = LongNoSwap;
break;
default:
break;
}
#endif /* ENDIAN_RUNTIME_DETECT */
}
void ValidateByteorder (void)
{
const char *endianism[] = { "BE", "LE", "PDP", "Unknown" };
int i;
ByteOrder_Init ();
switch (host_byteorder)
{
case BIG_ENDIAN:
i = 0; break;
case LITTLE_ENDIAN:
i = 1; break;
case PDP_ENDIAN:
host_byteorder = -1; /* not supported */
i = 2; break;
default:
i = 3; break;
}
if (host_byteorder < 0)
Error ("Unsupported byte order.");
/*
printf("Detected byte order: %s\n", endianism[i]);
*/
#if !ENDIAN_RUNTIME_DETECT
if (host_byteorder != BYTE_ORDER)
{
int j;
switch (BYTE_ORDER)
{
case BIG_ENDIAN:
j = 0; break;
case LITTLE_ENDIAN:
j = 1; break;
case PDP_ENDIAN:
j = 2; break;
default:
j = 3; break;
}
Error ("Detected byte order %s doesn't match compiled %s order!",
endianism[i], endianism[j]);
}
#endif /* ENDIAN_RUNTIME_DETECT */
}

View File

@@ -0,0 +1,92 @@
/*
* VisPatch : Quake level patcher for water visibility.
*
* Copyright (C) 1997-2006 Andy Bay <IMarvinTPA@bigfoot.com>
* Copyright (C) 2006-2011 O. Sezer <sezero@users.sourceforge.net>
*
* $Id: utilslib.h,v 1.4 2011/10/08 12:33:03 sezero Exp $
*
* 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:
*
* Free Software Foundation, Inc.
* 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301 USA
*/
#ifndef __QLIBUTILS_H
#define __QLIBUTILS_H
#if defined(PLATFORM_WINDOWS) && !defined(F_OK)
// values for the mode argument of access(). MS does not define them
#define R_OK 4 /* Test for read permission. */
#define W_OK 2 /* Test for write permission. */
#define X_OK 1 /* Test for execute permission. */
#define F_OK 0 /* Test for existence. */
#endif
/* strlcpy and strlcat : */
#include "strl_fn.h"
#if HAVE_STRLCAT && HAVE_STRLCPY
/* use native library functions */
#define q_strlcat strlcat
#define q_strlcpy strlcpy
#else
/* use our own copies of strlcpy and strlcat taken from OpenBSD */
extern size_t q_strlcpy (char *dst, const char *src, size_t size);
extern size_t q_strlcat (char *dst, const char *src, size_t size);
#endif
#if defined(PLATFORM_WINDOWS)
#define q_strcasecmp _stricmp
#define q_strncasecmp _strnicmp
#else
#define q_strcasecmp strcasecmp
#define q_strncasecmp strncasecmp
#endif
/* snprintf, vsnprintf : always use our versions. */
/* platform dependant (v)snprintf function names: */
#if defined(PLATFORM_WINDOWS)
#define snprintf_func _snprintf
#define vsnprintf_func _vsnprintf
#else
#define snprintf_func snprintf
#define vsnprintf_func vsnprintf
#endif
extern int q_snprintf (char *str, size_t size, const char *format, ...) __attribute__((__format__(__printf__,3,4)));
extern int q_vsnprintf(char *str, size_t size, const char *format, va_list args)
__attribute__((__format__(__printf__,3,0)));
extern char *q_strlwr (char *str);
extern char *q_strupr (char *str);
extern char *q_strrev (char *str);
extern int Sys_getcwd (char *buf, size_t size);
extern int Sys_filesize (const char *filename);
/* simplified findfirst/findnext implementation */
extern char *Sys_FindFirstFile (const char *path, const char *pattern);
extern char *Sys_FindNextFile (void);
extern void Sys_FindClose (void);
extern void Error (const char *error, ...) __attribute__((__format__(__printf__,1,2), __noreturn__));
extern void ValidateByteorder (void); /* call this from your main() */
#endif /* __QLIBUTILS_H */

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity version="1.0.0.0" name="vispatch.exe" type="win32"/>
<description>A WaterVIS utility for glquake</description>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges>
<requestedExecutionLevel level="asInvoker" uiAccess="false"/>
</requestedPrivileges>
</security>
</trustInfo>
</assembly>

View File

@@ -0,0 +1,112 @@
/*
* VisPatch : Quake level patcher for water visibility.
*
* Copyright (C) 1997-2006 Andy Bay <IMarvinTPA@bigfoot.com>
* Copyright (C) 2006-2011 O. Sezer <sezero@users.sourceforge.net>
*
* $Id: vispatch.h,v 1.6 2011/10/08 14:15:02 sezero Exp $
*
* 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:
*
* Free Software Foundation, Inc.
* 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301 USA
*/
#ifndef __QVISPATCH_H
#define __QVISPATCH_H
/* Version numbers */
#define VP_VER_MAJ 1
#define VP_VER_MID 4
#define VP_VER_MIN 6
/* NOTE: We actually need int32_t, not int, as the types
for sizes and offsets. If someone ever wants to compile
this on a 16 bit system like DOS, expect trouble if
the compiler is not djgpp.
*/
// on-disk bsp file structures
typedef struct // A Directory entry
{ int offset; // Offset to entry, in bytes, from start of file
int size; // Size of entry in file, in bytes
} dentry_t;
typedef struct // The BSP file header
{ int version; // Model version, must be 0x17 (23).
dentry_t entities; // List of Entities.
dentry_t planes; // Map Planes.
// numplanes = size/sizeof(plane_t)
dentry_t miptex; // Wall Textures.
dentry_t vertices; // Map Vertices.
// numvertices = size/sizeof(vertex_t)
dentry_t visilist; // Leaves Visibility lists.
dentry_t nodes; // BSP Nodes.
// numnodes = size/sizeof(node_t)
dentry_t texinfo; // Texture Info for faces.
// numtexinfo = size/sizeof(texinfo_t)
dentry_t faces; // Faces of each surface.
// numfaces = size/sizeof(face_t)
dentry_t lightmaps; // Wall Light Maps.
dentry_t clipnodes; // clip nodes, for Models.
// numclips = size/sizeof(clipnode_t)
dentry_t leaves; // BSP Leaves.
// numlaves = size/sizeof(leaf_t)
dentry_t lface; // List of Faces.
dentry_t edges; // Edges of faces.
// numedges = Size/sizeof(edge_t)
dentry_t ledges; // List of Edges.
dentry_t models; // List of Models.
// nummodels = Size/sizeof(model_t)
} dheader_t;
// on-disk pak file structures
#define MAX_FILES_IN_PACK 2048
typedef struct
{ char magic[4]; // Pak Name of the new WAD format
int diroffset; // Position of WAD directory from start of file
int dirsize; // Number of entries * 0x40 (64 char)
} pakheader_t;
typedef struct
{ char filename[56]; // Name of the file, Unix style, with extension,
// 50 chars, padded with '\0'.
int offset; // Position of the entry in PACK file
int size; // Size of the entry in PACK file
} pakentry_t;
// on-disk vis data structure: stored in little endian format
#define VISPATCH_IDLEN 32
typedef struct
{
char File[VISPATCH_IDLEN];
int len;
int vislen;
unsigned char *visdata;
int leaflen;
unsigned char *leafdata;
} visdat_t;
#endif /* __QVISPATCH_H */

View File

@@ -0,0 +1,2 @@
#include <winuser.h>
1 RT_MANIFEST "vispatch.exe.manifest"

View File

@@ -0,0 +1,121 @@
VisPatch, version 1.4.6
-----------------------------------------------------------------
A WaterVIS utility for glquake
http://vispatch.sourceforge.net/
http://sourceforge.net/projects/vispatch/
-----------------------------------------------------------------
VisPatch is a tool for patching quake maps for transparent water
in glquake. Original quake didn't have their maps water-vis'ed,
so people did that by themselves and prepared patch data files.
This tool is used for preparing and applying those patch files.
At the time this tool was written, re-vis'ing maps took a lot of
time, but applying a vispatch took less than minutes, so this was
a necessity. Even today, if people don't want going into a
'complex' job of vising, this tool comes as a great convenience
because there are a lot of vispatch data files around.
This is a revised version of Andy Bay's 1.2a source code for unix
(linux, freebsd, ...), as well as windows. It fixes a number of
compilation issues, crashes and some other bugs, and adds support
for big endian systems. The source code is licensed under GPLv2,
and is maintained here with portability in mind.
-----------------------------------------------------------------
Links :
Homepage of Andy Bay, the original author:
http://www.imarvintpa.com/
The (latest) website for WaterVIS:
http://www.inside3d.com/qip/vispatch/
The patch data file downloads:
http://www.inside3d.com/qip/vispatch/files.htm
3ddownloads mirror:
http://www.atomicgamer.com/directory.php?id=3138
-----------------------------------------------------------------
Usage: vispatch <file> [arguments]
<file> : Level filename pattern, bsp or pak type, wildcards
are allowed, relative paths not allowed. See the
examples.
-dir : Specify the directory that the level files are in.
-data : Specify the vis data file. Wildcards are not allowed.
-new : Tells the program not to overwrite the original level
files. In case of pak files, the patched the levels
will be put into a new pak file. In case of standalone
maps files, the original maps are renamed to name.bak,
and the patched ones are saved as name.bsp .
Can not be used in combination with -extract.
-extract: Retrieve all the vis data from the given file.
Can not be used in combination with -new.
IMPORTANT: All files must be of lowercase names for vispatch to
find and work with them.
Examples:
vispatch map25.bsp
Patch and overwrite map25.bsp using vis data from the default
data file vispatch.dat
vispatch map25.bsp -data map25.vis
Use map25.vis as the data file instead of vispatch.dat
vispatch -dir hipnotic -data hipnotic.vis
Patch levels in pak files under the directory named hipnotic,
using hipnotic.vis as the data.
vispatch "*.bsp" -dir hipnotic -data hipnotic.vis
Patch bsp levels NOT residing in pak files under the directory
named hipnotic, using hipnotic.vis as the data.
vispatch somefile.bsp -extract
Retrieve all vis data from somefile.bsp and put it into a file
named vispatch.dat (If you don't backup any previous one, it
will append the data into it!)
vispatch somefile.bsp -data some.dat -extract
Retrieve all vis data from the somefile.bsp and dump it into
a file named some.dat instead of vispatch.dat
vispatch "*.bsp" -data some.dat -extract
Retrieve all vis data from all bsp level files and put them
into the file some.dat
vispatch -dir hipnotic -extract
Retrieve all vis data from the levels residing in pak files in
the directory hipnotic, and put them into vispatch.dat
-----------------------------------------------------------------
COPYRIGHT
Copyright (C) 1997-2006 Andy Bay <IMarvinTPA@bigfoot.com>
Copyright (C) 2006-2011 O.Sezer <sezero@users.sourceforge.net>
VisPatch 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, or (at your
option) any later version. See the accompanying COPYING file for
details.
$Id: vispatch.txt,v 1.9 2011/10/08 14:15:02 sezero Exp $

View File

@@ -0,0 +1,121 @@
VisPatch, version 1.4.6
-----------------------------------------------------------------
A WaterVIS utility for glquake
http://vispatch.sourceforge.net/
http://sourceforge.net/projects/vispatch/
-----------------------------------------------------------------
VisPatch is a tool for patching quake maps for transparent water
in glquake. Original quake didn't have their maps water-vis'ed,
so people did that by themselves and prepared patch data files.
This tool is used for preparing and applying those patch files.
At the time this tool was written, re-vis'ing maps took a lot of
time, but applying a vispatch took less than minutes, so this was
a necessity. Even today, if people don't want going into a
'complex' job of vising, this tool comes as a great convenience
because there are a lot of vispatch data files around.
This is a revised version of Andy Bay's 1.2a source code for unix
(linux, freebsd, ...), as well as windows. It fixes a number of
compilation issues, crashes and some other bugs, and adds support
for big endian systems. The source code is licensed under GPLv2,
and is maintained here with portability in mind.
-----------------------------------------------------------------
Links :
Homepage of Andy Bay, the original author:
http://www.imarvintpa.com/
The (latest) website for WaterVIS:
http://www.inside3d.com/qip/vispatch/
The patch data file downloads:
http://www.inside3d.com/qip/vispatch/files.htm
3ddownloads mirror:
http://www.atomicgamer.com/directory.php?id=3138
-----------------------------------------------------------------
Usage: vispatch <file> [arguments]
<file> : Level filename pattern, bsp or pak type, wildcards
are allowed, relative paths not allowed. See the
examples.
-dir : Specify the directory that the level files are in.
-data : Specify the vis data file. Wildcards are not allowed.
-new : Tells the program not to overwrite the original level
files. In case of pak files, the patched the levels
will be put into a new pak file. In case of standalone
maps files, the original maps are renamed to name.bak,
and the patched ones are saved as name.bsp .
Can not be used in combination with -extract.
-extract: Retrieve all the vis data from the given file.
Can not be used in combination with -new.
IMPORTANT: All files must be of lowercase names for vispatch to
find and work with them.
Examples:
vispatch map25.bsp
Patch and overwrite map25.bsp using vis data from the default
data file vispatch.dat
vispatch map25.bsp -data map25.vis
Use map25.vis as the data file instead of vispatch.dat
vispatch -dir hipnotic -data hipnotic.vis
Patch levels in pak files under the directory named hipnotic,
using hipnotic.vis as the data.
vispatch "*.bsp" -dir hipnotic -data hipnotic.vis
Patch bsp levels NOT residing in pak files under the directory
named hipnotic, using hipnotic.vis as the data.
vispatch somefile.bsp -extract
Retrieve all vis data from somefile.bsp and put it into a file
named vispatch.dat (If you don't backup any previous one, it
will append the data into it!)
vispatch somefile.bsp -data some.dat -extract
Retrieve all vis data from the somefile.bsp and dump it into
a file named some.dat instead of vispatch.dat
vispatch "*.bsp" -data some.dat -extract
Retrieve all vis data from all bsp level files and put them
into the file some.dat
vispatch -dir hipnotic -extract
Retrieve all vis data from the levels residing in pak files in
the directory hipnotic, and put them into vispatch.dat
-----------------------------------------------------------------
COPYRIGHT
Copyright (C) 1997-2006 Andy Bay <IMarvinTPA@bigfoot.com>
Copyright (C) 2006-2011 O.Sezer <sezero@users.sourceforge.net>
VisPatch 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, or (at your
option) any later version. See the accompanying COPYING file for
details.
$Id: vispatch.txt,v 1.9 2011/10/08 14:15:02 sezero Exp $