mirror of
https://github.com/id-Software/Wolf3D-iOS.git
synced 2025-02-22 03:31:35 +00:00
Source release of Wolfenstein 3D Classic Platinum for iOS, 2.1
This commit is contained in:
parent
16304944b4
commit
d7fff51d7d
235 changed files with 64191 additions and 1418 deletions
BIN
__MACOSX/wolf3d/._README.txt
Normal file
BIN
__MACOSX/wolf3d/._README.txt
Normal file
Binary file not shown.
BIN
__MACOSX/wolf3d/._readme_iWolf_v1x.txt
Normal file
BIN
__MACOSX/wolf3d/._readme_iWolf_v1x.txt
Normal file
Binary file not shown.
BIN
__MACOSX/wolf3d/code/._wolfiphone.h
Normal file
BIN
__MACOSX/wolf3d/code/._wolfiphone.h
Normal file
Binary file not shown.
BIN
__MACOSX/wolf3d/code/env/._fileio.c
vendored
Normal file
BIN
__MACOSX/wolf3d/code/env/._fileio.c
vendored
Normal file
Binary file not shown.
BIN
__MACOSX/wolf3d/code/env/._files.c
vendored
Normal file
BIN
__MACOSX/wolf3d/code/env/._files.c
vendored
Normal file
Binary file not shown.
BIN
__MACOSX/wolf3d/code/env/._filesystem.h
vendored
Normal file
BIN
__MACOSX/wolf3d/code/env/._filesystem.h
vendored
Normal file
Binary file not shown.
BIN
__MACOSX/wolf3d/code/env/._openal_main.c
vendored
Normal file
BIN
__MACOSX/wolf3d/code/env/._openal_main.c
vendored
Normal file
Binary file not shown.
BIN
__MACOSX/wolf3d/code/env/._opengl_draw.c
vendored
Normal file
BIN
__MACOSX/wolf3d/code/env/._opengl_draw.c
vendored
Normal file
Binary file not shown.
BIN
__MACOSX/wolf3d/code/env/._opengl_local.h
vendored
Normal file
BIN
__MACOSX/wolf3d/code/env/._opengl_local.h
vendored
Normal file
Binary file not shown.
BIN
__MACOSX/wolf3d/code/env/._opengl_main.c
vendored
Normal file
BIN
__MACOSX/wolf3d/code/env/._opengl_main.c
vendored
Normal file
Binary file not shown.
BIN
__MACOSX/wolf3d/code/env/._sound.c
vendored
Normal file
BIN
__MACOSX/wolf3d/code/env/._sound.c
vendored
Normal file
Binary file not shown.
BIN
__MACOSX/wolf3d/code/env/._sound_local.h
vendored
Normal file
BIN
__MACOSX/wolf3d/code/env/._sound_local.h
vendored
Normal file
Binary file not shown.
BIN
__MACOSX/wolf3d/code/env/._sound_sfx_id.c
vendored
Normal file
BIN
__MACOSX/wolf3d/code/env/._sound_sfx_id.c
vendored
Normal file
Binary file not shown.
BIN
__MACOSX/wolf3d/code/env/._sound_stream.c
vendored
Normal file
BIN
__MACOSX/wolf3d/code/env/._sound_stream.c
vendored
Normal file
Binary file not shown.
BIN
__MACOSX/wolf3d/code/env/._texture_manager.c
vendored
Normal file
BIN
__MACOSX/wolf3d/code/env/._texture_manager.c
vendored
Normal file
Binary file not shown.
BIN
__MACOSX/wolf3d/code/env/._texture_manager.h
vendored
Normal file
BIN
__MACOSX/wolf3d/code/env/._texture_manager.h
vendored
Normal file
Binary file not shown.
BIN
__MACOSX/wolf3d/code/env/._unix_file.c
vendored
Normal file
BIN
__MACOSX/wolf3d/code/env/._unix_file.c
vendored
Normal file
Binary file not shown.
BIN
__MACOSX/wolf3d/code/env/._video.h
vendored
Normal file
BIN
__MACOSX/wolf3d/code/env/._video.h
vendored
Normal file
Binary file not shown.
BIN
__MACOSX/wolf3d/code/iphone/._.DS_Store
Normal file
BIN
__MACOSX/wolf3d/code/iphone/._.DS_Store
Normal file
Binary file not shown.
BIN
__MACOSX/wolf3d/code/iphone/._CreditsViewController.h
Normal file
BIN
__MACOSX/wolf3d/code/iphone/._CreditsViewController.h
Normal file
Binary file not shown.
BIN
__MACOSX/wolf3d/code/iphone/._CreditsViewController.m
Normal file
BIN
__MACOSX/wolf3d/code/iphone/._CreditsViewController.m
Normal file
Binary file not shown.
BIN
__MACOSX/wolf3d/code/iphone/._EAGLView.h
Normal file
BIN
__MACOSX/wolf3d/code/iphone/._EAGLView.h
Normal file
Binary file not shown.
BIN
__MACOSX/wolf3d/code/iphone/._EAGLView.m
Normal file
BIN
__MACOSX/wolf3d/code/iphone/._EAGLView.m
Normal file
Binary file not shown.
BIN
__MACOSX/wolf3d/code/iphone/._EpisodeViewController.h
Normal file
BIN
__MACOSX/wolf3d/code/iphone/._EpisodeViewController.h
Normal file
Binary file not shown.
BIN
__MACOSX/wolf3d/code/iphone/._EpisodeViewController.m
Normal file
BIN
__MACOSX/wolf3d/code/iphone/._EpisodeViewController.m
Normal file
Binary file not shown.
BIN
__MACOSX/wolf3d/code/iphone/._Info.plist
Normal file
BIN
__MACOSX/wolf3d/code/iphone/._Info.plist
Normal file
Binary file not shown.
BIN
__MACOSX/wolf3d/code/iphone/._LegalViewController.h
Normal file
BIN
__MACOSX/wolf3d/code/iphone/._LegalViewController.h
Normal file
Binary file not shown.
BIN
__MACOSX/wolf3d/code/iphone/._LegalViewController.m
Normal file
BIN
__MACOSX/wolf3d/code/iphone/._LegalViewController.m
Normal file
Binary file not shown.
BIN
__MACOSX/wolf3d/code/iphone/._LevelSelectViewController.h
Normal file
BIN
__MACOSX/wolf3d/code/iphone/._LevelSelectViewController.h
Normal file
Binary file not shown.
BIN
__MACOSX/wolf3d/code/iphone/._LevelSelectViewController.m
Normal file
BIN
__MACOSX/wolf3d/code/iphone/._LevelSelectViewController.m
Normal file
Binary file not shown.
BIN
__MACOSX/wolf3d/code/iphone/._MainMenuViewController.h
Normal file
BIN
__MACOSX/wolf3d/code/iphone/._MainMenuViewController.h
Normal file
Binary file not shown.
BIN
__MACOSX/wolf3d/code/iphone/._MainMenuViewController.m
Normal file
BIN
__MACOSX/wolf3d/code/iphone/._MainMenuViewController.m
Normal file
Binary file not shown.
BIN
__MACOSX/wolf3d/code/iphone/._MissionTableViewCell.h
Normal file
BIN
__MACOSX/wolf3d/code/iphone/._MissionTableViewCell.h
Normal file
Binary file not shown.
BIN
__MACOSX/wolf3d/code/iphone/._MissionTableViewCell.m
Normal file
BIN
__MACOSX/wolf3d/code/iphone/._MissionTableViewCell.m
Normal file
Binary file not shown.
BIN
__MACOSX/wolf3d/code/iphone/._SettingsViewController.h
Normal file
BIN
__MACOSX/wolf3d/code/iphone/._SettingsViewController.h
Normal file
Binary file not shown.
BIN
__MACOSX/wolf3d/code/iphone/._SettingsViewController.m
Normal file
BIN
__MACOSX/wolf3d/code/iphone/._SettingsViewController.m
Normal file
Binary file not shown.
BIN
__MACOSX/wolf3d/code/iphone/._SkillViewController.h
Normal file
BIN
__MACOSX/wolf3d/code/iphone/._SkillViewController.h
Normal file
Binary file not shown.
BIN
__MACOSX/wolf3d/code/iphone/._SkillViewController.m
Normal file
BIN
__MACOSX/wolf3d/code/iphone/._SkillViewController.m
Normal file
Binary file not shown.
BIN
__MACOSX/wolf3d/code/iphone/._TriviaViewController.h
Normal file
BIN
__MACOSX/wolf3d/code/iphone/._TriviaViewController.h
Normal file
Binary file not shown.
BIN
__MACOSX/wolf3d/code/iphone/._TriviaViewController.m
Normal file
BIN
__MACOSX/wolf3d/code/iphone/._TriviaViewController.m
Normal file
Binary file not shown.
BIN
__MACOSX/wolf3d/code/iphone/._UIFontButton.h
Normal file
BIN
__MACOSX/wolf3d/code/iphone/._UIFontButton.h
Normal file
Binary file not shown.
BIN
__MACOSX/wolf3d/code/iphone/._UIFontButton.m
Normal file
BIN
__MACOSX/wolf3d/code/iphone/._UIFontButton.m
Normal file
Binary file not shown.
BIN
__MACOSX/wolf3d/code/iphone/._UIFontLabel.h
Normal file
BIN
__MACOSX/wolf3d/code/iphone/._UIFontLabel.h
Normal file
Binary file not shown.
BIN
__MACOSX/wolf3d/code/iphone/._UIFontLabel.m
Normal file
BIN
__MACOSX/wolf3d/code/iphone/._UIFontLabel.m
Normal file
Binary file not shown.
BIN
__MACOSX/wolf3d/code/iphone/._UITableViewScrolling.h
Normal file
BIN
__MACOSX/wolf3d/code/iphone/._UITableViewScrolling.h
Normal file
Binary file not shown.
BIN
__MACOSX/wolf3d/code/iphone/._UITableViewScrolling.m
Normal file
BIN
__MACOSX/wolf3d/code/iphone/._UITableViewScrolling.m
Normal file
Binary file not shown.
BIN
__MACOSX/wolf3d/code/iphone/._WolfSlider.h
Normal file
BIN
__MACOSX/wolf3d/code/iphone/._WolfSlider.h
Normal file
Binary file not shown.
BIN
__MACOSX/wolf3d/code/iphone/._WolfSlider.m
Normal file
BIN
__MACOSX/wolf3d/code/iphone/._WolfSlider.m
Normal file
Binary file not shown.
BIN
__MACOSX/wolf3d/code/iphone/._gles_glue.c
Normal file
BIN
__MACOSX/wolf3d/code/iphone/._gles_glue.c
Normal file
Binary file not shown.
BIN
__MACOSX/wolf3d/code/iphone/._gles_glue.h
Normal file
BIN
__MACOSX/wolf3d/code/iphone/._gles_glue.h
Normal file
Binary file not shown.
BIN
__MACOSX/wolf3d/code/iphone/._hud.c
Normal file
BIN
__MACOSX/wolf3d/code/iphone/._hud.c
Normal file
Binary file not shown.
BIN
__MACOSX/wolf3d/code/iphone/._iphone_alerts.h
Normal file
BIN
__MACOSX/wolf3d/code/iphone/._iphone_alerts.h
Normal file
Binary file not shown.
BIN
__MACOSX/wolf3d/code/iphone/._iphone_alerts.m
Normal file
BIN
__MACOSX/wolf3d/code/iphone/._iphone_alerts.m
Normal file
Binary file not shown.
BIN
__MACOSX/wolf3d/code/iphone/._iphone_downloadSOD.m
Normal file
BIN
__MACOSX/wolf3d/code/iphone/._iphone_downloadSOD.m
Normal file
Binary file not shown.
BIN
__MACOSX/wolf3d/code/iphone/._iphone_downloadUserMap.m
Normal file
BIN
__MACOSX/wolf3d/code/iphone/._iphone_downloadUserMap.m
Normal file
Binary file not shown.
BIN
__MACOSX/wolf3d/code/iphone/._iphone_loop.c
Normal file
BIN
__MACOSX/wolf3d/code/iphone/._iphone_loop.c
Normal file
Binary file not shown.
BIN
__MACOSX/wolf3d/code/iphone/._iphone_main.c
Normal file
BIN
__MACOSX/wolf3d/code/iphone/._iphone_main.c
Normal file
Binary file not shown.
BIN
__MACOSX/wolf3d/code/iphone/._iphone_mapselector.c
Normal file
BIN
__MACOSX/wolf3d/code/iphone/._iphone_mapselector.c
Normal file
Binary file not shown.
BIN
__MACOSX/wolf3d/code/iphone/._iphone_menus.c
Normal file
BIN
__MACOSX/wolf3d/code/iphone/._iphone_menus.c
Normal file
Binary file not shown.
BIN
__MACOSX/wolf3d/code/iphone/._iphone_qgl.h
Normal file
BIN
__MACOSX/wolf3d/code/iphone/._iphone_qgl.h
Normal file
Binary file not shown.
BIN
__MACOSX/wolf3d/code/iphone/._iphone_store.h
Normal file
BIN
__MACOSX/wolf3d/code/iphone/._iphone_store.h
Normal file
Binary file not shown.
BIN
__MACOSX/wolf3d/code/iphone/._iphone_store.m
Normal file
BIN
__MACOSX/wolf3d/code/iphone/._iphone_store.m
Normal file
Binary file not shown.
BIN
__MACOSX/wolf3d/code/iphone/._iphone_sys.m
Normal file
BIN
__MACOSX/wolf3d/code/iphone/._iphone_sys.m
Normal file
Binary file not shown.
BIN
__MACOSX/wolf3d/code/iphone/._iphone_wolf.h
Normal file
BIN
__MACOSX/wolf3d/code/iphone/._iphone_wolf.h
Normal file
Binary file not shown.
BIN
__MACOSX/wolf3d/code/iphone/._main.m
Normal file
BIN
__MACOSX/wolf3d/code/iphone/._main.m
Normal file
Binary file not shown.
BIN
__MACOSX/wolf3d/code/iphone/._wolf3dAppDelegate.h
Normal file
BIN
__MACOSX/wolf3d/code/iphone/._wolf3dAppDelegate.h
Normal file
Binary file not shown.
BIN
__MACOSX/wolf3d/code/iphone/._wolf3dAppDelegate.m
Normal file
BIN
__MACOSX/wolf3d/code/iphone/._wolf3dAppDelegate.m
Normal file
Binary file not shown.
BIN
__MACOSX/wolf3d/code/iphone/._wolf3dViewController.h
Normal file
BIN
__MACOSX/wolf3d/code/iphone/._wolf3dViewController.h
Normal file
Binary file not shown.
BIN
__MACOSX/wolf3d/code/iphone/._wolf3dViewController.m
Normal file
BIN
__MACOSX/wolf3d/code/iphone/._wolf3dViewController.m
Normal file
Binary file not shown.
BIN
__MACOSX/wolf3d/code/iphone/._wolf3d_Prefix.pch
Normal file
BIN
__MACOSX/wolf3d/code/iphone/._wolf3d_Prefix.pch
Normal file
Binary file not shown.
BIN
__MACOSX/wolf3d/code/wolf/._wolf_ai_com.c
Normal file
BIN
__MACOSX/wolf3d/code/wolf/._wolf_ai_com.c
Normal file
Binary file not shown.
BIN
__MACOSX/wolf3d/code/wolf/._wolf_client_main.c
Normal file
BIN
__MACOSX/wolf3d/code/wolf/._wolf_client_main.c
Normal file
Binary file not shown.
BIN
__MACOSX/wolf3d/code/wolf/._wolf_local.h
Normal file
BIN
__MACOSX/wolf3d/code/wolf/._wolf_local.h
Normal file
Binary file not shown.
BIN
__MACOSX/wolf3d/code/wolf/._wolf_math.c
Normal file
BIN
__MACOSX/wolf3d/code/wolf/._wolf_math.c
Normal file
Binary file not shown.
BIN
__MACOSX/wolf3d/code/wolf/._wolf_opengl.c
Normal file
BIN
__MACOSX/wolf3d/code/wolf/._wolf_opengl.c
Normal file
Binary file not shown.
BIN
__MACOSX/wolf3d/code/wolf/._wolf_player.c
Normal file
BIN
__MACOSX/wolf3d/code/wolf/._wolf_player.c
Normal file
Binary file not shown.
BIN
__MACOSX/wolf3d/code/wolf/._wolf_renderer.h
Normal file
BIN
__MACOSX/wolf3d/code/wolf/._wolf_renderer.h
Normal file
Binary file not shown.
BIN
__MACOSX/wolf3d/scripts/._scrubBase.pl
Normal file
BIN
__MACOSX/wolf3d/scripts/._scrubBase.pl
Normal file
Binary file not shown.
345
wolf3d/COPYING.txt
Normal file
345
wolf3d/COPYING.txt
Normal file
|
@ -0,0 +1,345 @@
|
|||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Library General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) 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 Library General
|
||||
Public License instead of this License.
|
22
wolf3d/README.txt
Normal file
22
wolf3d/README.txt
Normal file
|
@ -0,0 +1,22 @@
|
|||
WOLF3D iOS v2.1 GPL source release
|
||||
===============================================
|
||||
|
||||
This file contains the following sections:
|
||||
|
||||
GENERAL NOTES
|
||||
LICENSE
|
||||
|
||||
GENERAL NOTES
|
||||
=============
|
||||
|
||||
WOLF3D iOS v2.1 is a free release, and can be downloaded from
|
||||
http://idsoftware.com/idstuff/wolf3d/wolf3d_ios_v21_src.zip
|
||||
|
||||
This source release does not contain any game data, the game data remains subject to the original EULA and applicable law.
|
||||
|
||||
|
||||
LICENSE
|
||||
=======
|
||||
|
||||
See COPYING.txt for the GNU GENERAL PUBLIC LICENSE. If COPYING.txt does not accompany, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
8
wolf3d/code/env/fileio.c
vendored
8
wolf3d/code/env/fileio.c
vendored
|
@ -109,12 +109,17 @@ PUBLIC W32 FS_FileSeek( filehandle_t *fhandle, SW32 offset, W32 origin )
|
|||
return 1;
|
||||
}
|
||||
|
||||
/* Commenting this out to avoid a warning - note that this is probably not what was
|
||||
intended!
|
||||
|
||||
// offset is negative
|
||||
if( (fhandle->filesize + offset) < 0 )
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
// offset is negative
|
||||
fhandle->ptrCurrent = fhandle->ptrEnd + offset;
|
||||
break;
|
||||
|
@ -223,7 +228,6 @@ PUBLIC filehandle_t *FS_OpenFile( const char *filename, W32 FlagsAndAttributes )
|
|||
// high performance file mapping path, avoiding stdio
|
||||
fd = open( netpath, O_RDONLY );
|
||||
if ( fd == -1 ) {
|
||||
// return NULL;
|
||||
//if it couldn't be found in that path then check again in the document directory
|
||||
//gsh
|
||||
//pathBase = FS_ForceGamedir();
|
||||
|
@ -231,7 +235,7 @@ PUBLIC filehandle_t *FS_OpenFile( const char *filename, W32 FlagsAndAttributes )
|
|||
pathBase = iphoneDocDirectory;
|
||||
my_snprintf( netpath, sizeof( netpath ), "%s/%s", pathBase, filename );
|
||||
fd = open( netpath, O_RDONLY );
|
||||
if ( fd == -1 ) { //okay, couldn't find it there either... return null
|
||||
if ( fd == -1 ) {
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
|
15
wolf3d/code/env/files.c
vendored
15
wolf3d/code/env/files.c
vendored
|
@ -172,7 +172,16 @@ PRIVATE char **FS_ListFiles( char *findname, int *numfiles, unsigned musthave, u
|
|||
*/
|
||||
PUBLIC void FS_InitFilesystem( void )
|
||||
{
|
||||
char *p;
|
||||
p = getenv("CWD");
|
||||
sprintf( fs_gamedir, "%s/base", p );
|
||||
#define BASE_DIRECTORY "/base"
|
||||
|
||||
int length = SysIPhoneGetPathToMainBundleLength();
|
||||
|
||||
// Make sure the path will fit.
|
||||
int fullPathLength = length + strlen( BASE_DIRECTORY ) + 1;
|
||||
|
||||
assert( fullPathLength < MAX_OSPATH );
|
||||
|
||||
SysIPhoneGetPathToMainBundle( fs_gamedir, length + 1 );
|
||||
|
||||
strcpy( fs_gamedir + length, BASE_DIRECTORY );
|
||||
}
|
||||
|
|
2
wolf3d/code/env/filesystem.h
vendored
2
wolf3d/code/env/filesystem.h
vendored
|
@ -39,6 +39,8 @@
|
|||
#ifndef __FILESYSTEM_H__
|
||||
#define __FILESYSTEM_H__
|
||||
|
||||
#include "arch.h"
|
||||
|
||||
#define MAX_GAMEPATH 256 // max length of a game pathname
|
||||
#define MAX_OSPATH 256 // max length of a filesystem pathname
|
||||
|
||||
|
|
13
wolf3d/code/env/openal_main.c
vendored
13
wolf3d/code/env/openal_main.c
vendored
|
@ -76,12 +76,16 @@ W16 numSoundDevices, numDefaultSoundDevice;
|
|||
PRIVATE void Sound_Device_getDeviceList( void )
|
||||
{
|
||||
char deviceName[ 256 ];
|
||||
|
||||
ALboolean isExtensionPresent = AL_FALSE;
|
||||
|
||||
my_strlcpy( deviceName, s_device->string, sizeof( deviceName ) );
|
||||
if( pfalcIsExtensionPresent( NULL, (ALubyte*)"ALC_ENUMERATION_EXT") == AL_TRUE )
|
||||
isExtensionPresent = pfalcIsExtensionPresent( NULL, (ALubyte*)"ALC_ENUMERATION_EXT");
|
||||
ALC_CheckErrors();
|
||||
if( isExtensionPresent == AL_TRUE )
|
||||
{
|
||||
// try out enumeration extension
|
||||
deviceList = (char *)pfalcGetString( NULL, ALC_DEVICE_SPECIFIER );
|
||||
ALC_CheckErrors();
|
||||
for( numSoundDevices = 0 ; numSoundDevices < 12 ; ++numSoundDevices )
|
||||
{
|
||||
sound_devices[ numSoundDevices ] = NULL;
|
||||
|
@ -200,12 +204,14 @@ failed:
|
|||
if( Context )
|
||||
{
|
||||
pfalcDestroyContext( Context );
|
||||
ALC_CheckErrors();
|
||||
Context = NULL;
|
||||
}
|
||||
|
||||
if( Device )
|
||||
{
|
||||
pfalcCloseDevice( Device );
|
||||
ALC_CheckErrors();
|
||||
Device = NULL;
|
||||
}
|
||||
|
||||
|
@ -230,7 +236,9 @@ PUBLIC void Sound_Device_Shutdown( void )
|
|||
if( Context )
|
||||
{
|
||||
pfalcMakeContextCurrent( NULL );
|
||||
ALC_CheckErrors();
|
||||
pfalcDestroyContext( Context );
|
||||
ALC_CheckErrors();
|
||||
|
||||
Context = NULL;
|
||||
}
|
||||
|
@ -238,6 +246,7 @@ PUBLIC void Sound_Device_Shutdown( void )
|
|||
if( Device )
|
||||
{
|
||||
pfalcCloseDevice( Device );
|
||||
ALC_CheckErrors();
|
||||
|
||||
Device = NULL;
|
||||
}
|
||||
|
|
18
wolf3d/code/env/opengl_draw.c
vendored
18
wolf3d/code/env/opengl_draw.c
vendored
|
@ -93,20 +93,20 @@ PUBLIC void R_Draw_Character( int x, int y, int num, font_t *myfont )
|
|||
R_Bind( myfont->texfont->texnum );
|
||||
|
||||
|
||||
pfglBegin( GL_QUADS );
|
||||
pfglBegin( GL_TRIANGLE_STRIP );
|
||||
|
||||
|
||||
pfglTexCoord2f( fcol, frow );
|
||||
pfglVertex2i( x, y );
|
||||
|
||||
pfglTexCoord2f( fcol, frow+myfont->hFrac );
|
||||
pfglVertex2i( x, (y+sh*scale) );
|
||||
|
||||
pfglTexCoord2f( fcol+myfont->wFrac, frow );
|
||||
pfglVertex2i( x+myfont->nMaxWidth*scale, y );
|
||||
|
||||
pfglTexCoord2f( fcol+myfont->wFrac, frow+myfont->hFrac );
|
||||
pfglVertex2i( x+myfont->nMaxWidth*scale, (y+sh*scale) );
|
||||
|
||||
pfglTexCoord2f( fcol, frow+myfont->hFrac );
|
||||
pfglVertex2i( x, (y+sh*scale) );
|
||||
|
||||
|
||||
|
||||
|
@ -146,12 +146,12 @@ PUBLIC void R_Draw_StretchPic( int x, int y, int w, int h, const char *pic )
|
|||
|
||||
R_Bind( gl->texnum );
|
||||
|
||||
pfglBegin( GL_QUADS );
|
||||
pfglBegin( GL_TRIANGLE_STRIP );
|
||||
|
||||
pfglTexCoord2f( 0.0f, 0.0f ); pfglVertex2i( x, y );
|
||||
pfglTexCoord2f( 0.0f, 1.0f ); pfglVertex2i( x, y+h );
|
||||
pfglTexCoord2f( 1.0f, 0.0f ); pfglVertex2i( x+w, y );
|
||||
pfglTexCoord2f( 1.0f, 1.0f ); pfglVertex2i( x+w, y+h );
|
||||
pfglTexCoord2f( 0.0f, 1.0f ); pfglVertex2i( x, y+h );
|
||||
|
||||
pfglEnd();
|
||||
}
|
||||
|
@ -186,7 +186,7 @@ PUBLIC void R_Draw_Fill( int x, int y, int w, int h, colour3_t c )
|
|||
c4[3] = 255;
|
||||
R_Draw_Blend( x, y, w, h, c4 );
|
||||
#else
|
||||
if ( revLand->value ) {
|
||||
if ( deviceOrientation == ORIENTATION_LANDSCAPE_RIGHT ) {
|
||||
qglScissor( x, y, w, h );
|
||||
} else {
|
||||
qglScissor( x, 320-(y+h), w, h );
|
||||
|
@ -203,12 +203,12 @@ PUBLIC void R_Draw_Blend( int x, int y, int w, int h, colour4_t c )
|
|||
pfglDisable( GL_TEXTURE_2D );
|
||||
pfglColor4ubv( c );
|
||||
|
||||
pfglBegin( GL_QUADS );
|
||||
pfglBegin( GL_TRIANGLE_STRIP );
|
||||
|
||||
pfglVertex2i( x, y );
|
||||
pfglVertex2i( x, y+h );
|
||||
pfglVertex2i( x+w, y );
|
||||
pfglVertex2i( x+w, y+h );
|
||||
pfglVertex2i( x, y+h );
|
||||
|
||||
pfglEnd();
|
||||
|
||||
|
|
1
wolf3d/code/env/opengl_local.h
vendored
1
wolf3d/code/env/opengl_local.h
vendored
|
@ -131,6 +131,7 @@ typedef struct
|
|||
const char *version_string;
|
||||
const char *extensions_string;
|
||||
_boolean Version_1_2;
|
||||
bool framebuffer_discard;
|
||||
|
||||
} glconfig_t;
|
||||
|
||||
|
|
15
wolf3d/code/env/opengl_main.c
vendored
15
wolf3d/code/env/opengl_main.c
vendored
|
@ -284,7 +284,6 @@ PUBLIC void R_Init()
|
|||
int err;
|
||||
int a, b;
|
||||
|
||||
|
||||
Com_Printf( "\n------ Display Initialization ------\n" );
|
||||
|
||||
Com_Printf( "Initializing OpenGL Subsystem\n" );
|
||||
|
@ -294,9 +293,6 @@ PUBLIC void R_Init()
|
|||
// set our "safe" modes
|
||||
gl_state.prev_mode = 0;
|
||||
|
||||
viddef.width = 480;
|
||||
viddef.height = 320;
|
||||
|
||||
// get various GL strings
|
||||
gl_config.vendor_string = (char *)pfglGetString( GL_VENDOR );
|
||||
Com_Printf( "GL_VENDOR: %s\n", gl_config.vendor_string );
|
||||
|
@ -316,7 +312,6 @@ PUBLIC void R_Init()
|
|||
my_strlcpy( vendor_buffer, gl_config.vendor_string, sizeof( vendor_buffer ) );
|
||||
(void)my_strlwr( vendor_buffer );
|
||||
|
||||
|
||||
sscanf( gl_config.version_string, "%d.%d", &a, &b );
|
||||
if( a >= 1 && b >= 2 )
|
||||
{
|
||||
|
@ -326,6 +321,14 @@ PUBLIC void R_Init()
|
|||
pfglGetIntegerv( GL_MAX_TEXTURE_SIZE, &glMaxTexSize );
|
||||
Com_Printf( "GL_MAX_TEXTURE_SIZE: %d\n", glMaxTexSize);
|
||||
|
||||
if ( strstr( gl_config.extensions_string, "GL_EXT_discard_framebuffer" ) != 0 ) {
|
||||
gl_config.framebuffer_discard = true;
|
||||
} else {
|
||||
gl_config.framebuffer_discard = false;
|
||||
}
|
||||
|
||||
InitImmediateModeGL();
|
||||
|
||||
GL_SetDefaultState();
|
||||
|
||||
TM_Init();
|
||||
|
@ -359,7 +362,7 @@ PUBLIC void PrintGLError( W32 err, const char *from )
|
|||
return;
|
||||
}
|
||||
|
||||
if( from != "" )
|
||||
if( strlen(from) != 0 )
|
||||
{
|
||||
Com_Printf( "\n\n\nGL Error: %s\n", from );
|
||||
}
|
||||
|
|
56
wolf3d/code/env/sound.c
vendored
56
wolf3d/code/env/sound.c
vendored
|
@ -95,6 +95,7 @@ PRIVATE void Sound_AllocChannels( void )
|
|||
for( i = 0, ch = s_channels ; i < MAX_CHANNELS ; ++i, ++ch )
|
||||
{
|
||||
pfalGenSources( 1, &ch->sourceName );
|
||||
AL_CheckErrors();
|
||||
|
||||
if( pfalGetError() != AL_NO_ERROR )
|
||||
{
|
||||
|
@ -123,6 +124,7 @@ PRIVATE int Sound_ChannelState( channel_t *ch )
|
|||
int state;
|
||||
|
||||
pfalGetSourcei( ch->sourceName, AL_SOURCE_STATE, &state );
|
||||
AL_CheckErrors();
|
||||
|
||||
return state;
|
||||
}
|
||||
|
@ -133,9 +135,16 @@ PRIVATE void Sound_PlayChannel( channel_t *ch, sfx_t *sfx )
|
|||
ch->sfx = sfx;
|
||||
|
||||
pfalSourcei( ch->sourceName, AL_BUFFER, sfx->bufferNum );
|
||||
AL_CheckErrors();
|
||||
|
||||
pfalSourcei( ch->sourceName, AL_LOOPING, ch->loopSound );
|
||||
AL_CheckErrors();
|
||||
|
||||
pfalSourcei( ch->sourceName, AL_SOURCE_RELATIVE, AL_FALSE );
|
||||
AL_CheckErrors();
|
||||
|
||||
pfalSourcePlay( ch->sourceName );
|
||||
AL_CheckErrors();
|
||||
}
|
||||
|
||||
|
||||
|
@ -147,12 +156,15 @@ PRIVATE void Sound_StopChannel( channel_t *ch )
|
|||
// Only deleting the entire source seems to work.
|
||||
|
||||
pfalSourceStop( ch->sourceName );
|
||||
AL_CheckErrors();
|
||||
// pfalSourceStopv( 1, &ch->sourceName );
|
||||
// pfalSourcei( ch->sourceName, AL_BUFFER, 0 );
|
||||
// pfalSourceRewind( ch->sourceName );
|
||||
#if 1
|
||||
pfalDeleteSources( 1, &ch->sourceName );
|
||||
AL_CheckErrors();
|
||||
pfalGenSources( 1, &ch->sourceName );
|
||||
AL_CheckErrors();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -165,14 +177,18 @@ PRIVATE void Sound_SpatializeChannel( channel_t *ch )
|
|||
if( ch->entNum == 0 || ! ch->distanceMult )
|
||||
{
|
||||
pfalSourcefv( ch->sourceName, AL_POSITION, s_listener.position );
|
||||
AL_CheckErrors();
|
||||
pfalSourcefv( ch->sourceName, AL_VELOCITY, s_listener.velocity );
|
||||
AL_CheckErrors();
|
||||
}
|
||||
else
|
||||
{
|
||||
if( ch->fixedPosition )
|
||||
{
|
||||
pfalSource3f( ch->sourceName, AL_POSITION, ch->position[1], ch->position[2], -ch->position[0] );
|
||||
AL_CheckErrors();
|
||||
pfalSource3f( ch->sourceName, AL_VELOCITY, 0, 0, 0 );
|
||||
AL_CheckErrors();
|
||||
}
|
||||
/* else
|
||||
{
|
||||
|
@ -195,17 +211,23 @@ PRIVATE void Sound_SpatializeChannel( channel_t *ch )
|
|||
if( ch->distanceMult )
|
||||
{
|
||||
pfalSourcef( ch->sourceName, AL_REFERENCE_DISTANCE, s_minDistance->value * ch->distanceMult );
|
||||
AL_CheckErrors();
|
||||
}
|
||||
else
|
||||
{
|
||||
pfalSourcef( ch->sourceName, AL_REFERENCE_DISTANCE, s_maxDistance->value );
|
||||
AL_CheckErrors();
|
||||
}
|
||||
|
||||
pfalSourcef( ch->sourceName, AL_MAX_DISTANCE, s_maxDistance->value );
|
||||
AL_CheckErrors();
|
||||
|
||||
// Update volume and rolloff factor
|
||||
pfalSourcef( ch->sourceName, AL_GAIN, s_sfxVolume->value * ch->volume );
|
||||
AL_CheckErrors();
|
||||
|
||||
pfalSourcef( ch->sourceName, AL_ROLLOFF_FACTOR, s_rolloffFactor->value );
|
||||
AL_CheckErrors();
|
||||
}
|
||||
|
||||
|
||||
|
@ -572,15 +594,26 @@ PUBLIC void Sound_Update( const vec3_t position, const vec3_t velocity, const ve
|
|||
vectorSet( &s_listener.orientation[3], up[1], -up[2], -up[0] );
|
||||
|
||||
pfalListenerfv( AL_POSITION, s_listener.position );
|
||||
AL_CheckErrors();
|
||||
|
||||
pfalListenerfv( AL_VELOCITY, s_listener.velocity );
|
||||
AL_CheckErrors();
|
||||
|
||||
pfalListenerfv( AL_ORIENTATION, s_listener.orientation );
|
||||
AL_CheckErrors();
|
||||
|
||||
pfalListenerf( AL_GAIN, (s_activeApp) ? s_masterVolume->value : 0.0);
|
||||
AL_CheckErrors();
|
||||
|
||||
// Set state
|
||||
pfalDistanceModel( AL_INVERSE_DISTANCE_CLAMPED );
|
||||
AL_CheckErrors();
|
||||
|
||||
pfalDopplerFactor( s_dopplerFactor->value );
|
||||
AL_CheckErrors();
|
||||
|
||||
pfalDopplerVelocity( s_dopplerVelocity->value );
|
||||
AL_CheckErrors();
|
||||
|
||||
// Stream background track
|
||||
Sound_StreamBGTrack();
|
||||
|
@ -639,9 +672,26 @@ PUBLIC void Sound_Activate( _boolean active )
|
|||
}
|
||||
|
||||
pfalListenerf( AL_GAIN, ( active ) ? s_masterVolume->value : 0.0 );
|
||||
|
||||
AL_CheckErrors();
|
||||
}
|
||||
|
||||
void AL_CheckErrors() {
|
||||
#if 0
|
||||
#ifdef DEBUG
|
||||
ALenum error = alGetError();
|
||||
if ( error != AL_NO_ERROR ) {
|
||||
printf( "OpenAL error (al)! %d\n", error);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
void ALC_CheckErrors() {
|
||||
//ALenum error = alcGetError();
|
||||
//if ( error != AL_NO_ERROR ) {
|
||||
// printf( "OpenAL error (alc)! %d\n", error);
|
||||
//}
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
|
@ -690,14 +740,14 @@ PRIVATE void Sound_Register( void )
|
|||
{
|
||||
|
||||
s_initSound = Cvar_Get( "s_initSound", "1", CVAR_INIT );
|
||||
s_masterVolume = Cvar_Get( "s_masterVolume", "0.3", CVAR_ARCHIVE ); //gsh changed this from "1.0" to "0.3" for the volume hack... otherwise it's too loud
|
||||
s_masterVolume = Cvar_Get( "s_masterVolume", "0.6", CVAR_ARCHIVE ); //gsh changed this from "1.0" to "0.3" for the volume hack... otherwise it's too loud
|
||||
s_sfxVolume = Cvar_Get( "s_sfxVolume", "1.0", CVAR_ARCHIVE );
|
||||
s_musicVolume = Cvar_Get( "s_musicVolume", "1.0", CVAR_ARCHIVE );
|
||||
s_minDistance = Cvar_Get( "s_minDistance", "0.0", CVAR_ARCHIVE );
|
||||
s_maxDistance = Cvar_Get( "s_maxDistance", "1.0", CVAR_ARCHIVE );
|
||||
s_rolloffFactor = Cvar_Get( "s_rolloffFactor", "1.0", CVAR_ARCHIVE );
|
||||
s_dopplerFactor = Cvar_Get( "s_dopplerFactor", "1.0", CVAR_ARCHIVE );
|
||||
s_dopplerVelocity = Cvar_Get( "s_dopplerVelocity", "0.0", CVAR_ARCHIVE );
|
||||
s_dopplerVelocity = Cvar_Get( "s_dopplerVelocity", "1.0", CVAR_ARCHIVE );
|
||||
|
||||
Cmd_AddCommand( "play", Sound_Play_f );
|
||||
Cmd_AddCommand( "stopsound", Sound_StopSound_f );
|
||||
|
|
2
wolf3d/code/env/sound_local.h
vendored
2
wolf3d/code/env/sound_local.h
vendored
|
@ -106,6 +106,8 @@ extern sfx_t *Sound_FindSound( const char *name );
|
|||
extern _boolean Sound_Device_Setup( void );
|
||||
extern void Sound_Device_Shutdown( void );
|
||||
|
||||
void AL_CheckErrors();
|
||||
void ALC_CheckErrors();
|
||||
|
||||
#endif /* __SOUND_LOCAL_H__ */
|
||||
|
||||
|
|
8
wolf3d/code/env/sound_sfx_id.c
vendored
8
wolf3d/code/env/sound_sfx_id.c
vendored
|
@ -96,7 +96,10 @@ PRIVATE void Sound_UploadSound( W8 *data, int sample_size, int channels, sfx_t *
|
|||
|
||||
// Upload the sound
|
||||
pfalGenBuffers( 1, &sfx->bufferNum );
|
||||
AL_CheckErrors();
|
||||
|
||||
pfalBufferData( sfx->bufferNum, sfx->format, data, size, sfx->rate );
|
||||
AL_CheckErrors();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -121,7 +124,10 @@ PRIVATE void Sound_UploadSound( W8 *data, int sample_size, int channels, sfx_t *
|
|||
|
||||
// Upload the sound
|
||||
pfalGenBuffers( 1, &sfx->bufferNum );
|
||||
AL_CheckErrors();
|
||||
|
||||
pfalBufferData( sfx->bufferNum, sfx->format, d, size * 2, sfx->rate );
|
||||
AL_CheckErrors();
|
||||
free( d );
|
||||
}
|
||||
}
|
||||
|
@ -163,7 +169,7 @@ PUBLIC _boolean Sound_LoadSound( sfx_t *sfx )
|
|||
if ( ! LoadOggInfo( name, &data, &info ) ) {
|
||||
sfx->defaulted = true;
|
||||
|
||||
Com_Printf( "Could not find sound (%s)\n", name );
|
||||
//Com_Printf( "Could not find sound (%s)\n", name );
|
||||
|
||||
return false;
|
||||
}
|
||||
|
|
36
wolf3d/code/env/sound_stream.c
vendored
36
wolf3d/code/env/sound_stream.c
vendored
|
@ -284,17 +284,23 @@ PUBLIC void Sound_StreamBGTrack( void )
|
|||
|
||||
// Unqueue and delete any processed buffers
|
||||
pfalGetSourcei( s_streamingChannel->sourceName, AL_BUFFERS_PROCESSED, &processed );
|
||||
AL_CheckErrors();
|
||||
|
||||
if( processed > 0 )
|
||||
{
|
||||
while (processed--)
|
||||
{
|
||||
pfalSourceUnqueueBuffers( s_streamingChannel->sourceName, 1, &buffer );
|
||||
AL_CheckErrors();
|
||||
//printf( "OpenAL unqueued %d, about to delete it!\n", buffer);
|
||||
pfalDeleteBuffers( 1, &buffer );
|
||||
AL_CheckErrors();
|
||||
}
|
||||
}
|
||||
|
||||
// Make sure we always have at least 4 buffers in the queue
|
||||
pfalGetSourcei( s_streamingChannel->sourceName, AL_BUFFERS_QUEUED, &queued );
|
||||
AL_CheckErrors();
|
||||
while( queued < 4 )
|
||||
{
|
||||
size = 0;
|
||||
|
@ -340,20 +346,29 @@ PUBLIC void Sound_StreamBGTrack( void )
|
|||
|
||||
// Upload and queue the new buffer
|
||||
pfalGenBuffers( 1, &buffer );
|
||||
AL_CheckErrors();
|
||||
|
||||
pfalBufferData( buffer, bgTrack.format, data, size, bgTrack.rate );
|
||||
AL_CheckErrors();
|
||||
|
||||
pfalSourceQueueBuffers( s_streamingChannel->sourceName, 1, &buffer );
|
||||
AL_CheckErrors();
|
||||
|
||||
queued++;
|
||||
}
|
||||
|
||||
// Update volume
|
||||
pfalSourcef( s_streamingChannel->sourceName, AL_GAIN, s_musicVolume->value );
|
||||
AL_CheckErrors();
|
||||
|
||||
// If not playing, then do so
|
||||
pfalGetSourcei( s_streamingChannel->sourceName, AL_SOURCE_STATE, &state );
|
||||
AL_CheckErrors();
|
||||
|
||||
if( state != AL_PLAYING )
|
||||
{
|
||||
pfalSourcePlay(s_streamingChannel->sourceName);
|
||||
AL_CheckErrors();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -390,17 +405,28 @@ PUBLIC void Sound_StartStreaming( void )
|
|||
|
||||
// hmmm...
|
||||
pfalDeleteSources( 1, &s_streamingChannel->sourceName );
|
||||
AL_CheckErrors();
|
||||
|
||||
pfalGenSources( 1, &s_streamingChannel->sourceName );
|
||||
AL_CheckErrors();
|
||||
|
||||
// Set up the source
|
||||
pfalSourcei( s_streamingChannel->sourceName, AL_BUFFER, 0 );
|
||||
AL_CheckErrors();
|
||||
pfalSourcei( s_streamingChannel->sourceName, AL_LOOPING, AL_FALSE );
|
||||
AL_CheckErrors();
|
||||
pfalSourcei( s_streamingChannel->sourceName, AL_SOURCE_RELATIVE, AL_TRUE );
|
||||
AL_CheckErrors();
|
||||
pfalSourcefv( s_streamingChannel->sourceName, AL_POSITION, vec3_origin );
|
||||
AL_CheckErrors();
|
||||
pfalSourcefv( s_streamingChannel->sourceName, AL_VELOCITY, vec3_origin );
|
||||
AL_CheckErrors();
|
||||
pfalSourcef( s_streamingChannel->sourceName, AL_REFERENCE_DISTANCE, 1.0 );
|
||||
AL_CheckErrors();
|
||||
pfalSourcef( s_streamingChannel->sourceName, AL_MAX_DISTANCE, 1.0 );
|
||||
AL_CheckErrors();
|
||||
pfalSourcef( s_streamingChannel->sourceName, AL_ROLLOFF_FACTOR, 0.0 );
|
||||
AL_CheckErrors();
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -433,22 +459,30 @@ PUBLIC void Sound_StopStreaming( void )
|
|||
|
||||
|
||||
pfalSourceStop( s_streamingChannel->sourceName );
|
||||
AL_CheckErrors();
|
||||
|
||||
pfalGetSourcei( s_streamingChannel->sourceName, AL_BUFFERS_PROCESSED, &processed );
|
||||
AL_CheckErrors();
|
||||
if( processed > 0 )
|
||||
{
|
||||
while( processed-- )
|
||||
{
|
||||
pfalSourceUnqueueBuffers( s_streamingChannel->sourceName, 1, &buffer );
|
||||
AL_CheckErrors();
|
||||
pfalDeleteBuffers( 1, &buffer );
|
||||
AL_CheckErrors();
|
||||
}
|
||||
}
|
||||
|
||||
pfalSourcei( s_streamingChannel->sourceName, AL_BUFFER, 0 );
|
||||
|
||||
AL_CheckErrors();
|
||||
|
||||
// hmmm...
|
||||
pfalDeleteSources( 1, &s_streamingChannel->sourceName );
|
||||
AL_CheckErrors();
|
||||
|
||||
pfalGenSources( 1, &s_streamingChannel->sourceName );
|
||||
AL_CheckErrors();
|
||||
|
||||
s_streamingChannel = NULL;
|
||||
}
|
||||
|
|
80
wolf3d/code/env/texture_manager.c
vendored
80
wolf3d/code/env/texture_manager.c
vendored
|
@ -349,6 +349,19 @@ PUBLIC texture_t *TM_LoadTexture( const char *name, W8 *data, int width, int hei
|
|||
TM_ResampleTexture( data, tex->width, tex->height, scaled, scaled_width, scaled_height, tex->bytes, INTERPOLATION_NONE );
|
||||
}
|
||||
|
||||
pfglTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, WrapToGL( tex->WrapS ) );
|
||||
pfglTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, WrapToGL( tex->WrapT ) );
|
||||
pfglTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, MinFilterToGL( tex->MipMap, tex->MinFilter ) );
|
||||
pfglTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, MagFilterToGL( tex->MagFilter ) );
|
||||
|
||||
#ifdef IPHONE
|
||||
if ( type == TT_Wall ) {
|
||||
pfglTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, 2.0f );
|
||||
} else {
|
||||
pfglTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, 1.0f );
|
||||
}
|
||||
#endif
|
||||
|
||||
{
|
||||
// upload base image
|
||||
GLenum internalFormat[] = { GL_LUMINANCE, GL_LUMINANCE, GL_LUMINANCE_ALPHA, GL_RGB, GL_RGBA };
|
||||
|
@ -379,20 +392,6 @@ PUBLIC texture_t *TM_LoadTexture( const char *name, W8 *data, int width, int hei
|
|||
if ( scaled != data ) {
|
||||
Z_Free( scaled );
|
||||
}
|
||||
|
||||
pfglTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, WrapToGL( tex->WrapS ) );
|
||||
pfglTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, WrapToGL( tex->WrapT ) );
|
||||
pfglTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, MinFilterToGL( tex->MipMap, tex->MinFilter ) );
|
||||
pfglTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, MagFilterToGL( tex->MagFilter ) );
|
||||
|
||||
#ifdef IPHONE
|
||||
if ( type == TT_Wall ) {
|
||||
pfglTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, 2.0f );
|
||||
} else {
|
||||
pfglTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, 0 );
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
return tex;
|
||||
}
|
||||
|
@ -486,7 +485,8 @@ PUBLIC texture_t *TM_FindTexture( const char *name, texturetype_t type )
|
|||
// load the texture from disk
|
||||
//
|
||||
data = NULL;
|
||||
if( strcmp( name + len - 4, ".tga" ) ) {
|
||||
const char* const extension = name + len - 4;
|
||||
if( strcmp( extension, ".tga" ) && strcmp( extension, ".png" ) ) {
|
||||
return r_notexture;
|
||||
}
|
||||
|
||||
|
@ -537,6 +537,23 @@ PUBLIC texture_t *TM_FindTexture( const char *name, texturetype_t type )
|
|||
tx->maxS = (float)ph->srcWidth / ph->uploadWidth;
|
||||
tx->maxT = (float)ph->srcHeight / ph->uploadHeight;
|
||||
unsigned char *s = (unsigned char *)(ph+1);
|
||||
|
||||
if ( noMips ) {
|
||||
pfglTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR );
|
||||
} else {
|
||||
pfglTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_NEAREST );
|
||||
}
|
||||
pfglTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR );
|
||||
|
||||
if ( type == TT_Wall ) {
|
||||
pfglTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, 2.0f );
|
||||
pfglTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT );
|
||||
} else {
|
||||
pfglTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, 1.0f );
|
||||
pfglTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE );
|
||||
}
|
||||
pfglTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE );
|
||||
|
||||
while( 1 ) {
|
||||
int size = (w*h*fi->bpp)/8;
|
||||
if ( fi->bpp < 16 ) {
|
||||
|
@ -568,26 +585,27 @@ PUBLIC texture_t *TM_FindTexture( const char *name, texturetype_t type )
|
|||
}
|
||||
}
|
||||
FS_CloseFile( fh );
|
||||
if ( noMips ) {
|
||||
pfglTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR );
|
||||
} else {
|
||||
pfglTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR );
|
||||
}
|
||||
pfglTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR );
|
||||
|
||||
if ( type == TT_Wall ) {
|
||||
pfglTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, 2.0f );
|
||||
pfglTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT );
|
||||
} else {
|
||||
pfglTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, 0 );
|
||||
pfglTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE );
|
||||
}
|
||||
pfglTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE );
|
||||
return tx;
|
||||
}
|
||||
|
||||
// load a normal TGA
|
||||
LoadTGA( name, &data, &width, &height, &bytes );
|
||||
// load a normal PNG or TGA. Prioritize PNGs, if not found, fall back to TGA.
|
||||
size_t filenameLength = strlen( name );
|
||||
char * pngName = MM_MALLOC( filenameLength );
|
||||
strcpy( pngName, name );
|
||||
strcpy( pngName + filenameLength - 3, "png" );
|
||||
|
||||
// Try to load a PNG version.
|
||||
LoadPNG( pngName, &data, &width, &height, &bytes );
|
||||
|
||||
MM_FREE( pngName );
|
||||
pngName = NULL;
|
||||
|
||||
// Try finding a TGA if the PNG load failed.
|
||||
if ( ( data == NULL ) && strcmp( extension, ".tga" ) == 0 ) {
|
||||
LoadTGA( name, &data, &width, &height, &bytes );
|
||||
}
|
||||
|
||||
if ( data ) {
|
||||
tex = TM_LoadTexture( name, data, width, height, type, bytes );
|
||||
MM_FREE( data );
|
||||
|
|
3
wolf3d/code/env/texture_manager.h
vendored
3
wolf3d/code/env/texture_manager.h
vendored
|
@ -39,6 +39,9 @@
|
|||
#ifndef __TEXTURE_MANAGER_H__
|
||||
#define __TEXTURE_MANAGER_H__
|
||||
|
||||
#include "arch.h"
|
||||
#include "filesystem.h"
|
||||
|
||||
#define MAX_TEXTURES 1024
|
||||
|
||||
|
||||
|
|
2
wolf3d/code/env/unix_file.c
vendored
2
wolf3d/code/env/unix_file.c
vendored
|
@ -133,7 +133,7 @@ PUBLIC char *FS_FindFirst( const char *path, W32 musthave, W32 canthave )
|
|||
{
|
||||
struct dirent *d;
|
||||
char *p;
|
||||
p;
|
||||
(void)p;
|
||||
|
||||
if( fdir )
|
||||
{
|
||||
|
|
2
wolf3d/code/env/video.h
vendored
2
wolf3d/code/env/video.h
vendored
|
@ -42,6 +42,8 @@
|
|||
#ifndef __VIDEO_H__
|
||||
#define __VIDEO_H__
|
||||
|
||||
#include "arch.h"
|
||||
|
||||
typedef struct vrect_s
|
||||
{
|
||||
int x, y, width, height;
|
||||
|
|
BIN
wolf3d/code/iphone/.DS_Store
vendored
Normal file
BIN
wolf3d/code/iphone/.DS_Store
vendored
Normal file
Binary file not shown.
1483
wolf3d/code/iphone/CreditsView.xib
Normal file
1483
wolf3d/code/iphone/CreditsView.xib
Normal file
File diff suppressed because it is too large
Load diff
34
wolf3d/code/iphone/CreditsViewController.h
Normal file
34
wolf3d/code/iphone/CreditsViewController.h
Normal file
|
@ -0,0 +1,34 @@
|
|||
/*
|
||||
|
||||
Copyright (C) 2011 id Software LLC, a ZeniMax Media company.
|
||||
|
||||
This file is part of the WOLF3D iOS v2.1 GPL Source Code.
|
||||
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
*/
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
|
||||
@interface CreditsViewController : UIViewController {
|
||||
@private
|
||||
IBOutlet UIView* creditsRoll;
|
||||
}
|
||||
|
||||
- (IBAction)back:(id)sender;
|
||||
|
||||
@end
|
116
wolf3d/code/iphone/CreditsViewController.m
Normal file
116
wolf3d/code/iphone/CreditsViewController.m
Normal file
|
@ -0,0 +1,116 @@
|
|||
/*
|
||||
|
||||
Copyright (C) 2011 id Software LLC, a ZeniMax Media company.
|
||||
|
||||
This file is part of the WOLF3D iOS v2.1 GPL Source Code.
|
||||
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
*/
|
||||
|
||||
#import "CreditsViewController.h"
|
||||
#import <QuartzCore/CAAnimation.h>
|
||||
|
||||
#define CREDITS_ANIMATION_POINTS_PER_SECOND ( 320.0f / 6.0f ) // Six seconds to scroll up
|
||||
// an iPhone screen.
|
||||
|
||||
@interface CreditsViewController ()
|
||||
|
||||
@property (nonatomic, retain) UIView* creditsRoll;
|
||||
|
||||
@end
|
||||
|
||||
@implementation CreditsViewController
|
||||
|
||||
@synthesize creditsRoll;
|
||||
|
||||
// The designated initializer. Override if you create the controller programmatically and want to perform customization that is not appropriate for viewDidLoad.
|
||||
/*
|
||||
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
|
||||
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
|
||||
if (self) {
|
||||
// Custom initialization.
|
||||
}
|
||||
return self;
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
// Implement loadView to create a view hierarchy programmatically, without using a nib.
|
||||
- (void)loadView {
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
|
||||
// This is the starting position of the credits text.
|
||||
CGPoint startPoint = self.creditsRoll.center;
|
||||
|
||||
// Set up the end point. We can stop the animation as soon as the bottom of the credits
|
||||
// get to the top of the screen.
|
||||
CGPoint endPoint = startPoint;
|
||||
|
||||
endPoint.y = -self.creditsRoll.bounds.size.height;
|
||||
|
||||
// Start credits animation
|
||||
CABasicAnimation *theAnimation;
|
||||
|
||||
theAnimation=[CABasicAnimation animationWithKeyPath:@"position"];
|
||||
|
||||
CGFloat pointDistance = endPoint.y - startPoint.y;
|
||||
|
||||
theAnimation.duration= fabs( pointDistance ) * ( 1.0f / CREDITS_ANIMATION_POINTS_PER_SECOND );
|
||||
|
||||
theAnimation.fromValue=[NSValue valueWithCGPoint:startPoint];
|
||||
theAnimation.toValue=[NSValue valueWithCGPoint:endPoint];
|
||||
|
||||
[self.creditsRoll.layer addAnimation:theAnimation forKey:@"animatePosition"];
|
||||
}
|
||||
|
||||
|
||||
// Override to allow orientations other than the default portrait orientation.
|
||||
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
|
||||
// Return YES for supported orientations.
|
||||
return UIInterfaceOrientationIsLandscape(interfaceOrientation);
|
||||
}
|
||||
|
||||
- (void)didReceiveMemoryWarning {
|
||||
// Releases the view if it doesn't have a superview.
|
||||
[super didReceiveMemoryWarning];
|
||||
|
||||
// Release any cached data, images, etc. that aren't in use.
|
||||
}
|
||||
|
||||
- (void)viewDidUnload {
|
||||
[super viewDidUnload];
|
||||
// Release any retained subviews of the main view.
|
||||
// e.g. self.myOutlet = nil;
|
||||
self.creditsRoll = nil;
|
||||
}
|
||||
|
||||
|
||||
- (void)dealloc {
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (IBAction)back:(id)sender {
|
||||
[self.navigationController popViewControllerAnimated:YES];
|
||||
}
|
||||
|
||||
@end
|
|
@ -1,6 +1,9 @@
|
|||
/*
|
||||
|
||||
Copyright (C) 2009 Id Software, Inc.
|
||||
Copyright (C) 2009-2011 id Software LLC, a ZeniMax Media company.
|
||||
|
||||
This file is part of the WOLF3D iOS v2.1 GPL Source Code.
|
||||
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
|
@ -41,20 +44,17 @@ Note that setting the view non-opaque will only work if the EAGL surface has an
|
|||
UITextField *textField;
|
||||
|
||||
@private
|
||||
EAGLContext *context;
|
||||
|
||||
/* The pixel dimensions of the backbuffer */
|
||||
GLint backingWidth;
|
||||
GLint backingHeight;
|
||||
|
||||
EAGLContext *context;
|
||||
GLint framebufferWidth;
|
||||
GLint framebufferHeight;
|
||||
|
||||
/* OpenGL names for the renderbuffer and framebuffers used to render to this view */
|
||||
GLuint viewRenderbuffer, viewFramebuffer;
|
||||
GLuint defaultFramebuffer, colorRenderbuffer;
|
||||
|
||||
/* OpenGL name for the depth buffer that is attached to viewFramebuffer, if it exists (0 if it does not exist) */
|
||||
GLuint depthRenderbuffer;
|
||||
|
||||
NSTimer *animationTimer;
|
||||
NSTimeInterval animationInterval;
|
||||
|
||||
//gsh... an attempt at hacking the volume button
|
||||
#ifdef VOLUMEHACK
|
||||
|
@ -66,8 +66,9 @@ Note that setting the view non-opaque will only work if the EAGL surface has an
|
|||
|
||||
}
|
||||
|
||||
@property NSTimeInterval animationInterval;
|
||||
@property (nonatomic, retain) EAGLContext *context;
|
||||
|
||||
- (void)drawView;
|
||||
- (void)setFramebuffer;
|
||||
- (BOOL)presentFramebuffer;
|
||||
|
||||
@end
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue