Compare commits
64 Commits
release-0_
...
master
Author | SHA1 | Date | |
---|---|---|---|
![]() |
002cc1b5e0 | ||
![]() |
4f3a81d4bd | ||
![]() |
6ab43b80d9 | ||
![]() |
e0ceb50565 | ||
![]() |
54a5bed091 | ||
![]() |
312afef4ca | ||
![]() |
f5486d8b1b | ||
![]() |
2f47a139ef | ||
![]() |
b62c66f570 | ||
![]() |
48b29114f5 | ||
![]() |
22d81ed146 | ||
![]() |
4fb8e96267 | ||
![]() |
ea8ba7d458 | ||
![]() |
d2c3194bdb | ||
![]() |
b1996330df | ||
![]() |
f7bc2ac6dd | ||
![]() |
9c8f42df8d | ||
![]() |
8b16a21ec3 | ||
![]() |
3ba1927472 | ||
![]() |
39280103f6 | ||
![]() |
d8751e1d71 | ||
![]() |
ab008b050f | ||
![]() |
2d8ba79bf0 | ||
![]() |
b433bda56d | ||
![]() |
293cc496b9 | ||
![]() |
215f02ad9e | ||
![]() |
0f01c5aa59 | ||
![]() |
27e54bc50d | ||
![]() |
44e579948b | ||
![]() |
5749ab210c | ||
![]() |
346ca047b9 | ||
![]() |
de7893e0e0 | ||
![]() |
9a42496dc5 | ||
![]() |
5e84215fab | ||
![]() |
9cbd63ee15 | ||
![]() |
46daa43cdb | ||
![]() |
c7dd7f80a2 | ||
![]() |
033a10c67f | ||
![]() |
e7658ccce4 | ||
![]() |
d483237b66 | ||
![]() |
2c2704badf | ||
![]() |
59f6f6fda5 | ||
![]() |
ec5793be7f | ||
![]() |
ced0ea683c | ||
![]() |
748a0abcd6 | ||
![]() |
431dde3171 | ||
![]() |
2014c02b38 | ||
![]() |
889e8ac32e | ||
![]() |
f767e6e2dc | ||
![]() |
cc2dd6b333 | ||
![]() |
8db6d31b5d | ||
![]() |
8412cbab72 | ||
![]() |
a1d7a0d57f | ||
![]() |
45fd414d49 | ||
![]() |
abc2c2bad5 | ||
![]() |
8cbebab31e | ||
![]() |
f4bfbf0d31 | ||
![]() |
f6f5df2b06 | ||
![]() |
2f41b47820 | ||
![]() |
7604906998 | ||
![]() |
f99263526f | ||
![]() |
182face818 | ||
![]() |
a0b9f9e42f | ||
![]() |
a362e2511e |
@ -1,10 +1,43 @@
|
||||
Changelog for Photon
|
||||
$Id: CHANGELOG.txt,v 1.4 2005/08/08 19:35:10 cozman Exp $
|
||||
$Id: CHANGELOG.txt,v 1.15 2005/11/15 06:01:12 cozman Exp $
|
||||
|
||||
! : Major Changes (potentially breaking existing code)
|
||||
+ : New Features
|
||||
- : Feature Removal
|
||||
* : Minor Changes/Bugfixes
|
||||
! : Major Changes
|
||||
* : Minor Changes (bugfixes and behind-the-scenes changes)
|
||||
|
||||
0.1.0
|
||||
! Changed createDisplay to use an enum to set fullscreen/windowed mode.
|
||||
* Added first official tutorial.
|
||||
* Converted text-file documentation to HTML documentation, allowing online
|
||||
docs to more closely mirror offline docs in content.
|
||||
* Major documentation sweep, much more useful for casual users. Also fixed
|
||||
tons of documentation mismatches.
|
||||
* Fixed bug where app would hang if run() was called with no active state or
|
||||
before the display was created.
|
||||
* Changed AudioCore to be pure virtual with OALAudioCore implementing it.
|
||||
* Fixed issues with OpenAL 1.1 new types.
|
||||
* Rewrote circle drawing code in Pen, major speed up.
|
||||
|
||||
0.0.2 - Released 2005-18-08
|
||||
! Removed InputListener, opting to move features into State class.
|
||||
! Dropped reliance on Kernel, and added main loop to Application, Kernel
|
||||
access now available through Application's getUpdateKernel() and
|
||||
getRenderKernel().
|
||||
+ Code::Blocks and Dev-C++ support, also very shaky MSVC support
|
||||
+ Addition of a State stack allowing for applications to fall back to the
|
||||
previous state when done with a particular state.
|
||||
+ Notification of mouse wheel events added.
|
||||
+ Addition of a State test/example program.
|
||||
+ Addition of Application::setFrameTimeSmoothing ability to set how elapsed
|
||||
time is calculated. (actual/average currently supported).
|
||||
+ Addition of fixed time stepping option in Application/State system.
|
||||
+ Addition of code to allow control of depth testing via
|
||||
Application::setDepthBufferParams
|
||||
* Fixed X11 fullscreen mode
|
||||
* Removed ALUT dependencies by adding custom WAV loading code
|
||||
* Mouse move events now give relative position.
|
||||
* Properly handle regain of focus, unpause Application's timer.
|
||||
* Fixed several minor bugs. (random stack crash on exit, doc mismatch)
|
||||
|
||||
0.0.1 - Released 2005-08-08
|
||||
+ State-based design that allows easy creation of applications by simply
|
||||
|
41
CREDITS.html
Normal file
41
CREDITS.html
Normal file
@ -0,0 +1,41 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-AU">
|
||||
<head>
|
||||
<title>Photon Credits</title>
|
||||
<meta http-equiv="content-type" content="application/xhtml+xml; charset=UTF-8" />
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!-- cut here for DevBlog -->
|
||||
|
||||
<p>The following people have contributed code to photon:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="mailto:cozman@users.sf.net">James Turk</a> - Main Developer</li>
|
||||
</ul>
|
||||
|
||||
<p> ..yeah this list is too short right now, so help out ;)</p>
|
||||
|
||||
<hr />
|
||||
|
||||
<p>In addition, I'd like to thank:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="http://sourceforge.net">Sourceforge.net</a> - Providing hosting for the project and CVS.</li>
|
||||
<li>The <a href="http://gamedev.net">GameDev.net</a> community for answering my (often complex) questions</li>
|
||||
<li>Richard 'Superpig' Fine for his <a href="http://www.gamedev.net/reference/programming/features/enginuity1/">Enginuity articles</a>, which influenced my Kernel/Task design.</li>
|
||||
<li>Jesse Maurais and <a href="http://devmaster.net">DevMaster.net</a> for the OpenAL tutorials</li>
|
||||
<li>Everyone responsible for <a href="http://freemind.sf.net">FreeMind</a></li>
|
||||
<li>The <a href="http://ubuntulinux.com">Ubuntu</a> Team</li>
|
||||
<li>Makoto Matsumoto and Takuji Nishimura for authoring the <a href="http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/emt.html">Mersenne Twister</a> algorithm, and making it freely available.</li>
|
||||
<li>Sean and Gamer Tazar from the old CoZ team, where ZEngine was born</li>
|
||||
<li>Everyone who contributed to, used, or downloaded ZEngine</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<p><em>$Id: CREDITS.html,v 1.1 2005/11/15 04:11:05 cozman Exp $</em></p>
|
||||
|
||||
<!-- cut here for DevBlog -->
|
||||
|
||||
</body>
|
||||
</html>
|
21
CREDITS.txt
21
CREDITS.txt
@ -1,21 +0,0 @@
|
||||
The following people have contributed code to photon:
|
||||
James Turk <cozman@users.sf.net>
|
||||
..yeah this list is too short right now, so help out ;)
|
||||
|
||||
In addition, I'd like to thank:
|
||||
* Sourceforge.net - Providing hosting for the project and CVS.
|
||||
* Sean and Gamer Tazar from the old CoZ team, where ZEngine was born
|
||||
* Everyone who contributed to, used, or downloaded ZEngine
|
||||
* Sam Lantinga and the rest of the SDL crew (without SDL, no ZEngine,
|
||||
without ZEngine, no photon)
|
||||
* The GameDev.net community for answering my (often complex) questions
|
||||
* Richard 'Superpig' Fine for his Enginuity articles, which influenced my
|
||||
Kernel/Task design.
|
||||
* Jesse Maurais and DevMaster.net for the OpenAL tutorials
|
||||
* Everyone responsible for FreeMind (http://freemind.sf.net)
|
||||
* The Ubuntu Team (http://ubuntulinux.com)
|
||||
* Makoto Matsumoto and Takuji Nishimura for authoring the Mersenne Twister
|
||||
algorithm, and making it freely available.
|
||||
http://www.math.keio.ac.jp/~matumoto/emt.html
|
||||
|
||||
$Id: CREDITS.txt,v 1.2 2005/07/19 18:35:20 cozman Exp $
|
200
IFAQ.html
Normal file
200
IFAQ.html
Normal file
@ -0,0 +1,200 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-AU">
|
||||
<head>
|
||||
<title>Photon iFAQ (inFrequently Asked Questions)</title>
|
||||
<meta http-equiv="content-type" content="application/xhtml+xml; charset=UTF-8" />
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!-- cut here for DevBlog -->
|
||||
|
||||
<ul>
|
||||
<li><strong>General Questions</strong>
|
||||
<ul>
|
||||
<li><a href="#ans1-1">What is Photon?</a></li>
|
||||
<li><a href="#ans1-2">Where do I get Photon?</a></li>
|
||||
<li><a href="#ans1-3">How do I build Photon?</a></li>
|
||||
<li><a href="#ans1-4">Does Photon use proprietary libraries like DirectX?</a></li>
|
||||
<li><a href="#ans1-5">When will features X, Y, and Z be completed?</a></li>
|
||||
<li><a href="#ans1-6">What if I have something to add?</a></li>
|
||||
</ul></li>
|
||||
<li><strong>Usage Questions</strong>
|
||||
<ul>
|
||||
<li><a href="#ans2-1">How do I compile a Photon application?</a></li>
|
||||
<li><a href="#ans2-2">Are there any tutorials?</a></li>
|
||||
<li><a href="#ans2-3">I am using Photon, can I tell the world?</a></li>
|
||||
</ul></li>
|
||||
<li><strong>Licensing Questions</strong>
|
||||
<ul>
|
||||
<li><a href="#ans3-1">How is Photon licensed?</a></li>
|
||||
<li><a href="#ans3-2"> Why is Photon licensed like that, why not use LGPL or something?</a></li>
|
||||
<li><a href="#ans3-3">I don't get it. What can I do with Photon?</a></li>
|
||||
<li><a href="#ans3-4">So what can't I do with Photon?</a></li>
|
||||
</ul></li>
|
||||
<li><strong>History Questions</strong>
|
||||
<ul>
|
||||
<li><a href="#ans4-1">Photon seems familiar.. where have I seen a similar API before?</a></li>
|
||||
<li><a href="#ans4-2">Why shouldn't I use ZEngine?</a></li>
|
||||
<li><a href="#ans4-3">Why should I use ZEngine?</a></li>
|
||||
<li><a href="#ans4-4">Wasn't there some GUI lib for ZEngine?</a></li>
|
||||
</ul></li>
|
||||
<li><strong>Other Questions</strong>
|
||||
<ul>
|
||||
<li><a href="#ans5-1">You are a king, can I give you money?</a></li>
|
||||
<li><a href="#ans5-2">How can I be as great as you?</a></li>
|
||||
<li><a href="#ans5-3">What else are you working on?</a></li>
|
||||
<li><a href="#ans5-4">Want to work on something with me?</a></li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
|
||||
<hr />
|
||||
|
||||
<h2>General Questions</h2>
|
||||
<h3><a name="ans1-1">What is Photon?</a></h3>
|
||||
<p>Photon is an API which is designed primarily to ease creation of hardware
|
||||
accelerated 2D games with OpenGL and other open source & cross platform
|
||||
libraries. Photon aims to simplify portable game development, enabling
|
||||
developers to focus on the gameplay. Photon uses OpenGL for hardware
|
||||
accelerated rotation, alpha blending, resizing, and drawing. Photon is built
|
||||
entirely on free software, using libraries like GLFW, PhysFS, OpenAL, and
|
||||
boost. Using Photon does not require knowledge of any of these libraries as
|
||||
their needed functionality is wrapped entirely within Photon's rich class
|
||||
library so that anyone with a decent grasp of C++ can use Photon.
|
||||
<br /><br />
|
||||
Photon is a cross platform API, designed to run on as many operating systems
|
||||
as possible, and OS support is only limited by libraries which Photon
|
||||
depends on, at the moment Photon should run on Windows, Linux, OSX, and
|
||||
other Operating Systems which have OpenGL support.</p>
|
||||
|
||||
<h3><a name="ans1-2">Where do I get Photon?</a></h3>
|
||||
|
||||
<p><a href="http://photon.sourceforge.net">http://photon.sourceforge.net</a>
|
||||
is the home page.
|
||||
<a href="http://sourceforge.net/projects/photon/">http://sourceforge.net/projects/photon/</a>
|
||||
is the project page.</p>
|
||||
|
||||
<h3><a name="ans1-3">How do I build Photon?</a></h3>
|
||||
<p>At the moment building photon relies upon SCons. As of Photon 0.0.2 experimental
|
||||
project files are available for <a href="http://www.codeblocks.org/">Code::Blocks</a>
|
||||
and <a href="http://www.bloodshed.net/devcpp.html">Dev-C++</a>.
|
||||
Visual C++ project files are a high priority.</p>
|
||||
|
||||
<h3><a name="ans1-4">Does Photon use proprietary libraries like DirectX?</a></h3>
|
||||
<p>Photon only uses free open source libraries, so that by using Photon you are
|
||||
not subjected to any proprietary licensing terms.</p>
|
||||
|
||||
<h3><a name="ans1-5">When will features X, Y, and Z be completed?</a></h3>
|
||||
<p>When I get to them, I can only work on Photon in my spare time, if you have a
|
||||
specific request let me know and I can give you an estimate of when I plan
|
||||
on getting to it. There's always the option that you help out and then the
|
||||
feature will be added sooner rather than later.</p>
|
||||
|
||||
<h3><a name="ans1-6">What if I have something to add?</a></h3>
|
||||
<p> Feel free to contribute to Photon, bugfixes are greatly appreciated. Not
|
||||
all submitted features can be accepted, but I'll usually at least add a
|
||||
link to your submission if it cannot be included in the standard
|
||||
distribution for some reason. (Extensions to Photon which uses non-free
|
||||
or non-portable libraries fall into this category, I appreciate them
|
||||
but usually won't make them part of the standard distribution.)</p>
|
||||
|
||||
<h2>Usage Questions</h2>
|
||||
<h3><a name="ans2-1">How do I compile a Photon application?</a></h3>
|
||||
<p>That depends upon your compiler, generally there are several things that
|
||||
need to be done:</p>
|
||||
<ul>
|
||||
<li>When compiling make sure all includes are in the include path of your compiler.</li>
|
||||
<li>When linking make sure all libraries are in the library path of your compiler.</li>
|
||||
<li>Ensure that you link against photon and all dependency libraries (photon, GLFW, OpenAL, OpenGL, GLU, PhysFS, Corona, and Freetype).</li>
|
||||
<li>If you are using OpenAL, be sure to define PHOTON_USE_OPENAL</li>
|
||||
</ul>
|
||||
<p>
|
||||
On a command line compiler like g++ this would look something like:</p>
|
||||
<pre>
|
||||
g++ -DPHOTON_USE_OPENAL -c -o test.o test.cpp
|
||||
g++ -o test test.o -lphoton -lglfw -lopenal -lGL -lGLU -lphysfs -lcorona -lfreetype
|
||||
</pre>
|
||||
|
||||
<h3><a name="ans2-2">Are there any tutorials?</a></h3>
|
||||
<p>No. Well not yet, I do have intent to write basic tutorials on using
|
||||
Photon, as well as porting some existing tutorials on various subjects to
|
||||
Photon.</p>
|
||||
|
||||
<h3><a name="ans2-3">I am using Photon, can I tell the world?</a></h3>
|
||||
<p>Sure, if you're using it and you feel comfortable admitting that, I admire
|
||||
your honesty. In all seriousness, this is greatly appreciated, and greatly
|
||||
beneficial to the Photon community, the more people using it the more people
|
||||
to help find bugs, suggest features, and maybe some of them will think of
|
||||
something cool to add for the rest of us.</p>
|
||||
|
||||
<h2>Licensing Questions</h2>
|
||||
<h3><a name="ans3-1">How is Photon licensed?</a></h3>
|
||||
<p>Photon is licensed under a zlib-style license, see LICENSE.html. </p>
|
||||
|
||||
<h3><a name="ans3-2">Why is Photon licensed like that, why not use LGPL or something?</a></h3>
|
||||
<p>First of all, I prefer zlib licensed libraries, as you can see, Photon
|
||||
depends primarily on zlib licensed libraries. I also don't feel that I
|
||||
should try to restrict what people do with Photon, as the people who will
|
||||
try to steal work aren't going to care what license it was under in the
|
||||
first place.</p>
|
||||
|
||||
<h3><a name="ans3-3">I don't get it. What can I do with Photon?</a></h3>
|
||||
<p>You are allowed to do almost anything you want with Photon including use it
|
||||
in commercial applications.</p>
|
||||
|
||||
<h3><a name="ans3-4">So what can't I do with Photon?</a></h3>
|
||||
<p>You cannot claim you wrote it, distribute altered versions that are not
|
||||
clearly marked as such, or remove or alter the license of the Photon
|
||||
source. You also cannot sue me for damages if Photon hurts you, your
|
||||
pet, or your feelings.</p>
|
||||
|
||||
<h2>History Questions</h2>
|
||||
<h3><a name="ans4-1">Photon seems familiar.. where have I seen a similar API before?</a></h3>
|
||||
<p>Photon used to be ZEngine, but when I decided to do a major rewrite the name
|
||||
changed. I am the author of both ZEngine and Photon, but thank you for your
|
||||
concern.</p>
|
||||
|
||||
<h3><a name="ans4-2">Why shouldn't I use ZEngine?</a></h3>
|
||||
<p>Photon does practically everything ZEngine did, but is being actively
|
||||
developed. Photon also uses a fairly different design than ZEngine, which I
|
||||
hope most will enjoy.</p>
|
||||
|
||||
<h3><a name="ans4-3">Why should I use ZEngine?</a></h3>
|
||||
<p>In case you want to port to a platform with no OpenGL, or maybe you like
|
||||
the letter 'Z' before every class name. If you hate the new style, and
|
||||
would prefer to kick it old school, ZEngine is a fine choice.</p>
|
||||
|
||||
<h3><a name="ans4-4">Wasn't there some GUI lib for ZEngine?</a></h3>
|
||||
<p>Yes, Gewi was the GUI for ZEngine, and was separate from the core of
|
||||
ZEngine. In Photon Gewi will become photon::gui, but is not yet completed.
|
||||
Because of the modular core method and resource management, the inside has
|
||||
been rewritten, and a number of bugs have been fixed. photon::gui will be
|
||||
a major improvement over Gewi.</p>
|
||||
|
||||
<h2>Other Questions</h2>
|
||||
<h3><a name="ans5-1">You are a king, can I give you money?</a></h3>
|
||||
<p>Sure.. I guess, I'd prefer you donate it to a better project than Photon
|
||||
but if you have to donate money to me because you're using Photon in some
|
||||
amazing application and you feel guilty making millions off of my "hard"
|
||||
work.. email me, I'll try to talk you out of it, or suggest a better use
|
||||
of funds.</p>
|
||||
|
||||
<h3><a name="ans5-2">How can I be as great as you?</a></h3>
|
||||
<p>Help me out on Photon.. write some documentation, anything, if you're not
|
||||
sure how to help, email me, I'll let you know what needs to be done.</p>
|
||||
|
||||
<h3><a name="ans5-3">What else are you working on?</a></h3>
|
||||
<p>That's a secret right now.</p>
|
||||
|
||||
<h3><a name="ans5-4">Want to work on something with me?</a></h3>
|
||||
<p>Depending on how much time I have, and how interested I am in the project,
|
||||
maybe. If you want me to work on something I'd love to hear from you,
|
||||
even if I don't have time at the moment. If the project in question
|
||||
uses Photon you get bonus points, but is not a requirement for me to work
|
||||
with you.</p>
|
||||
|
||||
<p><em>$Id: IFAQ.html,v 1.2 2005/11/15 06:01:12 cozman Exp $</em></p>
|
||||
|
||||
<!-- cut here for DevBlog -->
|
||||
|
||||
</body>
|
||||
</html>
|
136
IFAQ.txt
136
IFAQ.txt
@ -1,136 +0,0 @@
|
||||
IfAQ (Infrequently Asked Questions)
|
||||
$Id: IFAQ.txt,v 1.2 2005/08/07 07:12:46 cozman Exp $
|
||||
|
||||
--basic questions--
|
||||
|
||||
Q. What is Photon?
|
||||
A. Photon is an API which is designed primarily to ease creation of hardware
|
||||
accelerated 2D games with OpenGL and other open source & cross platform
|
||||
libraries. Photon aims to simplify portable game development, enabling
|
||||
developers to focus on the gameplay. Photon uses OpenGL for hardware
|
||||
accelerated rotation, alpha blending, resizing, and drawing. Photon is built
|
||||
entirely on free software, using libraries like GLFW, PhysFS, OpenAL, and
|
||||
boost. Using Photon does not require knowledge of any of these libraries as
|
||||
their needed functionality is wrapped entirely within Photon’s rich class
|
||||
library so that anyone with a decent grasp of C++ can use Photon.
|
||||
Photon is a cross platform API, designed to run on as many operating systems
|
||||
as possible, and OS support is only limited by libraries which Photon
|
||||
depends on, at the moment Photon should run on Windows, Linux, OSX, and
|
||||
other Operating Systems which have OpenGL support.
|
||||
|
||||
Q. Where do I get Photon?
|
||||
A. http://photon.sourceforge.net is the home page.
|
||||
http://sourceforge.net/projects/photon/ is the project page.
|
||||
|
||||
Q. How do I build Photon?
|
||||
A. At the moment building photon relies upon SCons. See INSTALL.txt for more
|
||||
information. Visual C++ project files are a priority as well.
|
||||
|
||||
--usage questions--
|
||||
|
||||
Q. How do I compile a Photon application?
|
||||
A. That depends upon your compiler, this isn't a sufficient answer is it?
|
||||
To Be Completed
|
||||
|
||||
Q. Are there any tutorials?
|
||||
A. No. Well not yet, I do have intent to write basic tutorials on using
|
||||
Photon, as well as porting some existing tutorials on various subjects to
|
||||
Photon.
|
||||
|
||||
Q. I am using Photon, can I tell the world?
|
||||
A. Sure, if you're using it and you feel comfortable admitting that, I admire
|
||||
your honesty. In all seriousness, this is greatly appreciated, and greatly
|
||||
beneficial to the Photon community, the more people using it the more people
|
||||
to help find bugs, suggest features, and maybe some of them will think of
|
||||
something cool to add for the rest of us.
|
||||
|
||||
--licensing questions--
|
||||
|
||||
Q. How is Photon licensed?
|
||||
A. Photon is licensed under a zlib-style license, see LICENSE.txt.
|
||||
|
||||
Q. Why is Photon licensed like that, why not use LGPL or something?
|
||||
A. First of all, I prefer zlib licensed libraries, as you can see, Photon
|
||||
depends primarily on zlib licensed libraries. I also don't feel that I
|
||||
should try to restrict what people do with Photon, as the people who will
|
||||
try to steal work aren't going to care what license it was under in the
|
||||
first place.
|
||||
|
||||
Q. I don't get it. What can I do with Photon?
|
||||
A. You are allowed to do almost anything you want with Photon including use it
|
||||
in commercial applications.
|
||||
|
||||
Q. So what can't I do with Photon?
|
||||
A. You cannot claim you wrote it, distribute altered versions that are not
|
||||
clearly marked as such, or remove or alter the license of the Photon
|
||||
source. You also cannot sue me for damages if Photon hurts you, your
|
||||
pet, or your feelings.
|
||||
|
||||
Q. Does Photon use proprietary libraries like DirectX?
|
||||
A. Photon only uses free open source libraries, so that by using Photon you are
|
||||
not subjected to any proprietary licensing terms.
|
||||
|
||||
Q. When will features X, Y, and Z be completed?
|
||||
A. When I get to them, I can only work on Photon in my spare time, if you have a
|
||||
specific request let me know and I can give you an estimate of when I plan
|
||||
on getting to it. There's always the option that you help out and then the
|
||||
feature will be added sooner rather than later.
|
||||
|
||||
Q. What if I have something to add?
|
||||
A. Feel free to contribute to Photon, bugfixes are greatly appreciated. Not
|
||||
all submitted features can be accepted, but I'll usually at least add a
|
||||
link to your submission if it cannot be included in the standard
|
||||
distribution for some reason. (Extensions to Photon which uses non-free
|
||||
or non-portable libraries fall into this category, I appreciate them
|
||||
but usually won't make them part of the standard distribution.)
|
||||
|
||||
--history questions--
|
||||
|
||||
Q. Photon seems familiar.. where have I seen a similar API before?
|
||||
or
|
||||
You ripped off that ZEngine guy!
|
||||
A. Photon used to be ZEngine, but when I decided to do a major rewrite the name
|
||||
changed. I am the author of both ZEngine and Photon, but thank you for your
|
||||
concern.
|
||||
|
||||
Q. Why shouldn't I use ZEngine?
|
||||
A. Photon does practically everything ZEngine did, but is being actively
|
||||
developed. Photon also uses a fairly different design than ZEngine, which I
|
||||
hope most will enjoy.
|
||||
|
||||
Q. Why should I use ZEngine?
|
||||
A. In case you want to port to a platform with no OpenGL, or maybe you like
|
||||
the letter 'Z' before every class name. If you hate the new style, and
|
||||
would prefer to kick it old school, ZEngine is a fine choice.
|
||||
|
||||
Q. Wasn't there some GUI lib for ZEngine?
|
||||
A. Yes, Gewi was the GUI for ZEngine, and was separate from the core of
|
||||
ZEngine. In Photon Gewi will become photon::gui, but is not yet completed.
|
||||
Because of the modular core method and resource management, the inside has
|
||||
been rewritten, and a number of bugs have been fixed. photon::gui will be
|
||||
a major improvement over Gewi.
|
||||
|
||||
--other questions--
|
||||
|
||||
Q. You are a king, can I give you money?
|
||||
A. Sure.. I guess, I'd prefer you donate it to a better project than Photon
|
||||
but if you have to donate money to me because you're using Photon in some
|
||||
amazing application and you feel guilty making millions off of my "hard"
|
||||
work.. email me, I'll try to talk you out of it, or suggest a better use
|
||||
of funds.
|
||||
|
||||
Q. How can I be as great as you?
|
||||
A. Help me out on Photon.. write some documentation, anything, if you're not
|
||||
sure how to help, email me, I'll let you know what needs to be done.
|
||||
|
||||
Q. What else do you work on, besides Photon?
|
||||
A. That's a secret right now.
|
||||
|
||||
Q. Want to work on something with me?
|
||||
A. Depending on how much time I have, and how interested I am in the project,
|
||||
maybe. If you want me to work on something I'd love to hear from you,
|
||||
even if I don't have time at the moment. If the project in question
|
||||
uses Photon you get bonus points, but is not a requirement for me to work
|
||||
with you.
|
||||
|
||||
-James Turk <cozman@users.sf.net>
|
54
INSTALL.html
Normal file
54
INSTALL.html
Normal file
@ -0,0 +1,54 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-AU">
|
||||
<head>
|
||||
<title>Photon iFAQ (inFrequently Asked Questions)</title>
|
||||
<meta http-equiv="content-type" content="application/xhtml+xml; charset=UTF-8" />
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!-- cut here for DevBlog -->
|
||||
|
||||
<p>There are several ways to build photon:</p>
|
||||
<ul>
|
||||
<li><a href="http://www.scons.org">SCons</a> Build Tool</li>
|
||||
<li><a href="http://www.bloodshed.net/devcpp.html">Dev-C++ 5</a> Windows IDE</li>
|
||||
<li><a href="http://codeblocks.org">Code::Blocks</a> Windows/Linux IDE</li>
|
||||
</ul>
|
||||
|
||||
<h2>Building with SCons</h2>
|
||||
<ol>
|
||||
<li>Enter the photon directory.
|
||||
</li><li>Type 'scons' - building should begin assuming all dependencies are found.
|
||||
this will result in the photon library being built in the lib/ folder.</li>
|
||||
<li><em>Optional:</em> Type 'scons test' to build test programs, test programs will be
|
||||
built in the test/ folder.</li>
|
||||
<li><em>Optional:</em> Type 'scons docs' to build documentation in the docs/ folder.
|
||||
[requires <a href="http://naturaldocs.org">NaturalDocs</a>]</li>
|
||||
<li>Copy the photon library from the lib/ folder and the contents of photon's
|
||||
include/ directory to somewhere in your compilers search path.</li>
|
||||
</ol>
|
||||
|
||||
<h2>Building with Code::Blocks</h2>
|
||||
<ol>
|
||||
<li>Open the photon.workspace file in Code::Blocks</li>
|
||||
<li>Build the library by compiling the project named photon.</li>
|
||||
<li><em>Optional:</em> Build any tests by running the other projects.</li>
|
||||
<li>Copy the photon library from the lib/ folder and the contents of photon's
|
||||
include/ directory to somewhere in your compilers search path.</li>
|
||||
</ol>
|
||||
|
||||
<h2>Building with Dev-C++</h2>
|
||||
<ol>
|
||||
<li>Run the photon.dev project in the devcpp directory, building libphoton.a</li>
|
||||
<li><em>Optional:</em> Build any tests by running the other projects in the devcpp
|
||||
directory.</li>
|
||||
<li>Copy the photon library from the lib/ folder and the contents of photon's
|
||||
include/ directory to somewhere in your compilers search path.</li>
|
||||
</ol>
|
||||
|
||||
<p><em>$Id: INSTALL.html,v 1.1 2005/11/15 05:48:31 cozman Exp $</em></p>
|
||||
|
||||
<!-- cut here for DevBlog -->
|
||||
|
||||
</body>
|
||||
</html>
|
12
INSTALL.txt
12
INSTALL.txt
@ -1,12 +0,0 @@
|
||||
Building Photon requires the SCons (http://www.scons.org) build tool.
|
||||
|
||||
1) Enter the photon directory.
|
||||
2) Type 'scons' - building should begin assuming all dependencies are found.
|
||||
this will result in the photon library being built in the lib/ folder.
|
||||
3) Optional: Type 'scons test' to build test programs, test programs will be
|
||||
built in the test/ folder.
|
||||
4) Optional: Type 'scons docs' to build documentation in the docs/ folder.
|
||||
[requires NaturalDocs (http://naturaldocs.org)]
|
||||
|
||||
|
||||
$Id: INSTALL.txt,v 1.1 2005/07/17 22:41:03 cozman Exp $
|
481
LGPL.txt
481
LGPL.txt
@ -1,481 +0,0 @@
|
||||
GNU LIBRARY GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1991 Free Software Foundation, Inc.
|
||||
51 Franklin St, 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.
|
||||
|
||||
[This is the first released version of the library GPL. It is
|
||||
numbered 2 because it goes with version 2 of the ordinary GPL.]
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
Licenses are intended to guarantee your freedom to share and change
|
||||
free software--to make sure the software is free for all its users.
|
||||
|
||||
This license, the Library General Public License, applies to some
|
||||
specially designated Free Software Foundation software, and to any
|
||||
other libraries whose authors decide to use it. You can use it for
|
||||
your libraries, 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 library, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of the library, whether gratis
|
||||
or for a fee, you must give the recipients all the rights that we gave
|
||||
you. You must make sure that they, too, receive or can get the source
|
||||
code. If you link a program with the library, you must provide
|
||||
complete object files to the recipients so that they can relink them
|
||||
with the library, after making changes to the library and recompiling
|
||||
it. And you must show them these terms so they know their rights.
|
||||
|
||||
Our method of protecting your rights has two steps: (1) copyright
|
||||
the library, and (2) offer you this license which gives you legal
|
||||
permission to copy, distribute and/or modify the library.
|
||||
|
||||
Also, for each distributor's protection, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
library. If the library is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original
|
||||
version, 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 companies distributing free
|
||||
software will individually obtain patent licenses, thus in effect
|
||||
transforming the program into proprietary software. To prevent this,
|
||||
we have made it clear that any patent must be licensed for everyone's
|
||||
free use or not licensed at all.
|
||||
|
||||
Most GNU software, including some libraries, is covered by the ordinary
|
||||
GNU General Public License, which was designed for utility programs. This
|
||||
license, the GNU Library General Public License, applies to certain
|
||||
designated libraries. This license is quite different from the ordinary
|
||||
one; be sure to read it in full, and don't assume that anything in it is
|
||||
the same as in the ordinary license.
|
||||
|
||||
The reason we have a separate public license for some libraries is that
|
||||
they blur the distinction we usually make between modifying or adding to a
|
||||
program and simply using it. Linking a program with a library, without
|
||||
changing the library, is in some sense simply using the library, and is
|
||||
analogous to running a utility program or application program. However, in
|
||||
a textual and legal sense, the linked executable is a combined work, a
|
||||
derivative of the original library, and the ordinary General Public License
|
||||
treats it as such.
|
||||
|
||||
Because of this blurred distinction, using the ordinary General
|
||||
Public License for libraries did not effectively promote software
|
||||
sharing, because most developers did not use the libraries. We
|
||||
concluded that weaker conditions might promote sharing better.
|
||||
|
||||
However, unrestricted linking of non-free programs would deprive the
|
||||
users of those programs of all benefit from the free status of the
|
||||
libraries themselves. This Library General Public License is intended to
|
||||
permit developers of non-free programs to use free libraries, while
|
||||
preserving your freedom as a user of such programs to change the free
|
||||
libraries that are incorporated in them. (We have not seen how to achieve
|
||||
this as regards changes in header files, but we have achieved it as regards
|
||||
changes in the actual functions of the Library.) The hope is that this
|
||||
will lead to faster development of free libraries.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow. Pay close attention to the difference between a
|
||||
"work based on the library" and a "work that uses the library". The
|
||||
former contains code derived from the library, while the latter only
|
||||
works together with the library.
|
||||
|
||||
Note that it is possible for a library to be covered by the ordinary
|
||||
General Public License rather than by this special one.
|
||||
|
||||
GNU LIBRARY GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License Agreement applies to any software library which
|
||||
contains a notice placed by the copyright holder or other authorized
|
||||
party saying it may be distributed under the terms of this Library
|
||||
General Public License (also called "this License"). Each licensee is
|
||||
addressed as "you".
|
||||
|
||||
A "library" means a collection of software functions and/or data
|
||||
prepared so as to be conveniently linked with application programs
|
||||
(which use some of those functions and data) to form executables.
|
||||
|
||||
The "Library", below, refers to any such software library or work
|
||||
which has been distributed under these terms. A "work based on the
|
||||
Library" means either the Library or any derivative work under
|
||||
copyright law: that is to say, a work containing the Library or a
|
||||
portion of it, either verbatim or with modifications and/or translated
|
||||
straightforwardly into another language. (Hereinafter, translation is
|
||||
included without limitation in the term "modification".)
|
||||
|
||||
"Source code" for a work means the preferred form of the work for
|
||||
making modifications to it. For a library, 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 library.
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running a program using the Library is not restricted, and output from
|
||||
such a program is covered only if its contents constitute a work based
|
||||
on the Library (independent of the use of the Library in a tool for
|
||||
writing it). Whether that is true depends on what the Library does
|
||||
and what the program that uses the Library does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Library's
|
||||
complete 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 distribute a copy of this License along with the
|
||||
Library.
|
||||
|
||||
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 Library or any portion
|
||||
of it, thus forming a work based on the Library, 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) The modified work must itself be a software library.
|
||||
|
||||
b) You must cause the files modified to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
c) You must cause the whole of the work to be licensed at no
|
||||
charge to all third parties under the terms of this License.
|
||||
|
||||
d) If a facility in the modified Library refers to a function or a
|
||||
table of data to be supplied by an application program that uses
|
||||
the facility, other than as an argument passed when the facility
|
||||
is invoked, then you must make a good faith effort to ensure that,
|
||||
in the event an application does not supply such function or
|
||||
table, the facility still operates, and performs whatever part of
|
||||
its purpose remains meaningful.
|
||||
|
||||
(For example, a function in a library to compute square roots has
|
||||
a purpose that is entirely well-defined independent of the
|
||||
application. Therefore, Subsection 2d requires that any
|
||||
application-supplied function or table used by this function must
|
||||
be optional: if the application does not supply it, the square
|
||||
root function must still compute square roots.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Library,
|
||||
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 Library, 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 Library.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Library
|
||||
with the Library (or with a work based on the Library) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may opt to apply the terms of the ordinary GNU General Public
|
||||
License instead of this License to a given copy of the Library. To do
|
||||
this, you must alter all the notices that refer to this License, so
|
||||
that they refer to the ordinary GNU General Public License, version 2,
|
||||
instead of to this License. (If a newer version than version 2 of the
|
||||
ordinary GNU General Public License has appeared, then you can specify
|
||||
that version instead if you wish.) Do not make any other change in
|
||||
these notices.
|
||||
|
||||
Once this change is made in a given copy, it is irreversible for
|
||||
that copy, so the ordinary GNU General Public License applies to all
|
||||
subsequent copies and derivative works made from that copy.
|
||||
|
||||
This option is useful when you wish to copy part of the code of
|
||||
the Library into a program that is not a library.
|
||||
|
||||
4. You may copy and distribute the Library (or a portion or
|
||||
derivative of it, under Section 2) in object code or executable form
|
||||
under the terms of Sections 1 and 2 above provided that you 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.
|
||||
|
||||
If distribution of 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 satisfies the requirement to
|
||||
distribute the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
5. A program that contains no derivative of any portion of the
|
||||
Library, but is designed to work with the Library by being compiled or
|
||||
linked with it, is called a "work that uses the Library". Such a
|
||||
work, in isolation, is not a derivative work of the Library, and
|
||||
therefore falls outside the scope of this License.
|
||||
|
||||
However, linking a "work that uses the Library" with the Library
|
||||
creates an executable that is a derivative of the Library (because it
|
||||
contains portions of the Library), rather than a "work that uses the
|
||||
library". The executable is therefore covered by this License.
|
||||
Section 6 states terms for distribution of such executables.
|
||||
|
||||
When a "work that uses the Library" uses material from a header file
|
||||
that is part of the Library, the object code for the work may be a
|
||||
derivative work of the Library even though the source code is not.
|
||||
Whether this is true is especially significant if the work can be
|
||||
linked without the Library, or if the work is itself a library. The
|
||||
threshold for this to be true is not precisely defined by law.
|
||||
|
||||
If such an object file uses only numerical parameters, data
|
||||
structure layouts and accessors, and small macros and small inline
|
||||
functions (ten lines or less in length), then the use of the object
|
||||
file is unrestricted, regardless of whether it is legally a derivative
|
||||
work. (Executables containing this object code plus portions of the
|
||||
Library will still fall under Section 6.)
|
||||
|
||||
Otherwise, if the work is a derivative of the Library, you may
|
||||
distribute the object code for the work under the terms of Section 6.
|
||||
Any executables containing that work also fall under Section 6,
|
||||
whether or not they are linked directly with the Library itself.
|
||||
|
||||
6. As an exception to the Sections above, you may also compile or
|
||||
link a "work that uses the Library" with the Library to produce a
|
||||
work containing portions of the Library, and distribute that work
|
||||
under terms of your choice, provided that the terms permit
|
||||
modification of the work for the customer's own use and reverse
|
||||
engineering for debugging such modifications.
|
||||
|
||||
You must give prominent notice with each copy of the work that the
|
||||
Library is used in it and that the Library and its use are covered by
|
||||
this License. You must supply a copy of this License. If the work
|
||||
during execution displays copyright notices, you must include the
|
||||
copyright notice for the Library among them, as well as a reference
|
||||
directing the user to the copy of this License. Also, you must do one
|
||||
of these things:
|
||||
|
||||
a) Accompany the work with the complete corresponding
|
||||
machine-readable source code for the Library including whatever
|
||||
changes were used in the work (which must be distributed under
|
||||
Sections 1 and 2 above); and, if the work is an executable linked
|
||||
with the Library, with the complete machine-readable "work that
|
||||
uses the Library", as object code and/or source code, so that the
|
||||
user can modify the Library and then relink to produce a modified
|
||||
executable containing the modified Library. (It is understood
|
||||
that the user who changes the contents of definitions files in the
|
||||
Library will not necessarily be able to recompile the application
|
||||
to use the modified definitions.)
|
||||
|
||||
b) Accompany the work with a written offer, valid for at
|
||||
least three years, to give the same user the materials
|
||||
specified in Subsection 6a, above, for a charge no more
|
||||
than the cost of performing this distribution.
|
||||
|
||||
c) If distribution of the work is made by offering access to copy
|
||||
from a designated place, offer equivalent access to copy the above
|
||||
specified materials from the same place.
|
||||
|
||||
d) Verify that the user has already received a copy of these
|
||||
materials or that you have already sent this user a copy.
|
||||
|
||||
For an executable, the required form of the "work that uses the
|
||||
Library" must include any data and utility programs needed for
|
||||
reproducing the executable from it. 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.
|
||||
|
||||
It may happen that this requirement contradicts the license
|
||||
restrictions of other proprietary libraries that do not normally
|
||||
accompany the operating system. Such a contradiction means you cannot
|
||||
use both them and the Library together in an executable that you
|
||||
distribute.
|
||||
|
||||
7. You may place library facilities that are a work based on the
|
||||
Library side-by-side in a single library together with other library
|
||||
facilities not covered by this License, and distribute such a combined
|
||||
library, provided that the separate distribution of the work based on
|
||||
the Library and of the other library facilities is otherwise
|
||||
permitted, and provided that you do these two things:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work
|
||||
based on the Library, uncombined with any other library
|
||||
facilities. This must be distributed under the terms of the
|
||||
Sections above.
|
||||
|
||||
b) Give prominent notice with the combined library of the fact
|
||||
that part of it is a work based on the Library, and explaining
|
||||
where to find the accompanying uncombined form of the same work.
|
||||
|
||||
8. You may not copy, modify, sublicense, link with, or distribute
|
||||
the Library except as expressly provided under this License. Any
|
||||
attempt otherwise to copy, modify, sublicense, link with, or
|
||||
distribute the Library 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.
|
||||
|
||||
9. 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 Library or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Library (or any work based on the
|
||||
Library), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Library or works based on it.
|
||||
|
||||
10. Each time you redistribute the Library (or any work based on the
|
||||
Library), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute, link with or modify the Library
|
||||
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.
|
||||
|
||||
11. 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 Library at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Library 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 Library.
|
||||
|
||||
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.
|
||||
|
||||
12. If the distribution and/or use of the Library is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Library 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.
|
||||
|
||||
13. The Free Software Foundation may publish revised and/or new
|
||||
versions of the Library 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 Library
|
||||
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 Library does not specify a
|
||||
license version number, you may choose any version ever published by
|
||||
the Free Software Foundation.
|
||||
|
||||
14. If you wish to incorporate parts of the Library into other free
|
||||
programs whose distribution conditions are incompatible with these,
|
||||
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
|
||||
|
||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
||||
OTHER PARTIES PROVIDE THE LIBRARY "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
|
||||
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
||||
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. 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 LIBRARY 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
|
||||
LIBRARY (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 LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), 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 Libraries
|
||||
|
||||
If you develop a new library, and you want it to be of the greatest
|
||||
possible use to the public, we recommend making it free software that
|
||||
everyone can redistribute and change. You can do so by permitting
|
||||
redistribution under these terms (or, alternatively, under the terms of the
|
||||
ordinary General Public License).
|
||||
|
||||
To apply these terms, attach the following notices to the library. 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 library's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library 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
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the library, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
||||
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1990
|
||||
Ty Coon, President of Vice
|
||||
|
||||
That's all there is to it!
|
85
LIBRARIES.html
Normal file
85
LIBRARIES.html
Normal file
@ -0,0 +1,85 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-AU">
|
||||
<head>
|
||||
<title>Photon Dependencies</title>
|
||||
<meta http-equiv="content-type" content="application/xhtml+xml; charset=UTF-8" />
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!-- cut here for DevBlog -->
|
||||
|
||||
<p>Photon uses several other libraries, which fall under a variety of licenses:</p>
|
||||
<ul>
|
||||
<li><a href="http://glfw.sourceforge.net/">GLFW</a> - zlib license</li>
|
||||
<li><a href="http://boost.org/">Boost</a> - Boost Software License</li>
|
||||
<li><a href="http://icculus.org/physfs/">PhysFS</a> - zlib license</li>
|
||||
<li><a href="http://corona.sourceforge.net/">Corona</a> - zlib license</li>
|
||||
<li><a href="http://freetype.org/">Freetype2</a> - Freetype License (FTL)</li>
|
||||
<li><a href="http://openal.org/">OpenAL</a>* - LGPL</li>
|
||||
</ul>
|
||||
|
||||
<p>*OpenAL support is optional, if OpenAL is not found, photon can be compiled
|
||||
without it. This is done so that those wishing to keep their application
|
||||
free of LGPL libraries may do so while still using photon.</p>
|
||||
|
||||
<hr />
|
||||
|
||||
<p>Understanding and complying with Open Source licenses can be a daunting task,
|
||||
but in this case is rather simple. If you are distributing an application which
|
||||
uses photon and it's dependencies you must do the following:</p>
|
||||
<ol>
|
||||
<li>To satisfy the zlib license that photon and most of the other libs use,
|
||||
you simply must not claim you wrote them & not remove the zlib license
|
||||
in license.txt, also any changes must be marked if that applies to you.</li>
|
||||
<li> Complying with the Boost Software License is the easiest, if distributing
|
||||
Boost source code, you must include the BSL, if distributing object
|
||||
code (eg. library or executable) nothing actually needs to be done.</li>
|
||||
<li>To comply with the Freetype license you must not claim you wrote it,
|
||||
but you must also give credit to the authors. The credit clause is
|
||||
the only real difference between the Freetype License and the zlib
|
||||
license.</li>
|
||||
<li>If you are using OpenAL, you are most likely dynamically linking (using
|
||||
a .dll or .so) which means that in order to comply with the LGPL you
|
||||
must: Make it clear that you are using OpenAL in your credits file,
|
||||
include a copy of the LGPL with any binaries, provide a link to the
|
||||
OpenAL source code or provide the source code yourself.</li>
|
||||
</ol>
|
||||
|
||||
<p>If you comply with all three licenses (don't take credit for what you didn't do,
|
||||
credit Freetype and OpenAL, and provide the LGPL and a link to OpenAL's source
|
||||
you can do what you wish with your application, including make it closed source
|
||||
and/or sell it)</p>
|
||||
|
||||
<hr />
|
||||
|
||||
<p>For convenience I have written a licensing template that should satisfy most
|
||||
users of photon. It is essentially what I would use in distributing any
|
||||
binaries made with photon and it's dependencies. (Note: I credit the zlib
|
||||
libraries which isn't necessary but I feel it's proper.)</p>
|
||||
|
||||
<pre>
|
||||
--------EXAMPLE CREDITS FILE
|
||||
|
||||
This application uses Photon which is available from
|
||||
http://photon.sourceforge.net/ and is licensed under a zlib license.
|
||||
|
||||
Other libraries used indirectly or directly by this program include:
|
||||
GLFW - http://glfw.sourceforge.net/ - zlib license
|
||||
Boost - http://boost.org/ - Boost Software License
|
||||
PhysFS - http://icculus.org/physfs/ - zlib license
|
||||
Corona - http://corona.sourceforge.net/ - zlib license
|
||||
Freetype2 - http://freetype.org/ - Freetype License (FTL)
|
||||
OpenAL - http://openal.org/ - LGPL
|
||||
|
||||
To comply with the LGPL a copy of a copy of the LGPL is provided in this
|
||||
directory as LGPL.txt.
|
||||
|
||||
A copy of the OpenAL source is available from http://openal.org/
|
||||
</pre>
|
||||
|
||||
<p><em>$Id: LIBRARIES.html,v 1.1 2005/11/15 05:06:00 cozman Exp $</em></p>
|
||||
|
||||
<!-- cut here for DevBlog -->
|
||||
|
||||
</body>
|
||||
</html>
|
@ -1,57 +0,0 @@
|
||||
$Id: LIBRARIES.txt,v 1.1 2005/07/20 21:56:33 cozman Exp $
|
||||
|
||||
Photon uses several other libraries, which fall under a variety of licenses:
|
||||
|
||||
GLFW - http://glfw.sourceforge.net/ - zlib license
|
||||
PhysFS - http://icculus.org/physfs/ - zlib license
|
||||
Corona - http://corona.sourceforge.net/ - zlib license
|
||||
Freetype2 - http://freetype.org/ - Freetype License (FTL)
|
||||
OpenAL* - http://openal.org/ - LGPL
|
||||
|
||||
*OpenAL support is optional, if OpenAL is not found, photon can be compiled
|
||||
without it. This is done so that those wishing to keep their application
|
||||
free of LGPL libraries may do so while still using photon.
|
||||
|
||||
------------
|
||||
Understanding and complying with Open Source licenses can be a daunting task,
|
||||
but in this case is rather simple. If you are distributing an application which
|
||||
uses photon and it's dependencies you must do the following:
|
||||
|
||||
1) To satisfy the zlib license that photon and most of the other libs use,
|
||||
you simply must not claim you wrote them & not remove the zlib license
|
||||
in license.txt, also any changes must be marked if that applies to you.
|
||||
2) To comply with the Freetype license you must not claim you wrote it,
|
||||
but you must also give credit to the authors. The credit clause is
|
||||
the only real difference between the Freetype License and the zlib
|
||||
license.
|
||||
3) If you are using OpenAL, you are most likely dynamically linking (using
|
||||
a .dll or .so) which means that in order to comply with the LGPL you
|
||||
must: Make it clear that you are using OpenAL in your credits file,
|
||||
include a copy of the LGPL with any binaries, provide a link to the
|
||||
OpenAL source code or provide the source code yourself.
|
||||
|
||||
If you comply with all three licenses (don't take credit for what you didn't do,
|
||||
credit Freetype and OpenAL, and provide the LGPL and a link to OpenAL's source
|
||||
you can do what you wish with your application, including make it closed source
|
||||
and/or sell it)
|
||||
|
||||
For convenience I have written a licensing template that should satisfy most
|
||||
users of photon. It is essentially what I would use in distributing any
|
||||
binaries made with photon and it's dependencies. (Note: I credit the zlib
|
||||
libraries which isn't necessary but I feel it's proper.)
|
||||
|
||||
--------EXAMPLE CREDITS FILE
|
||||
|
||||
This application uses Photon which is available from
|
||||
http://photon.sourceforge.net/ and is licensed under a zlib license.
|
||||
|
||||
Photon (and this application) uses several other zlib-licensed libraries:
|
||||
GLFW - http://glfw.sourceforge.net/
|
||||
PhysFS - http://icculus.org/physfs/
|
||||
Corona - http://corona.sourceforge.net/
|
||||
Photon (and this application) also uses Freetype2 which is licensed under the
|
||||
Freetype license.
|
||||
Photon (and this application) also uses OpenAL which is licensed under the LGPL
|
||||
To comply with the LGPL a copy of a copy of the LGPL is provided in this
|
||||
directory as LGPL.txt. A copy of the OpenAL source is available from
|
||||
http://openal.org/
|
16
README.txt
16
README.txt
@ -1,13 +1,13 @@
|
||||
Thank you for downloading photon,
|
||||
photon is an API which is designed primarily to ease creation of hardware
|
||||
Photon is an API which is designed primarily to ease creation of hardware
|
||||
accelerated 2D games with OpenGL and other open source & cross platform
|
||||
libraries. Photon aims to simplify portable game development, enabling
|
||||
developers to focus on the gameplay. Photon uses OpenGL for hardware accelerated
|
||||
rotation, alpha blending, resizing, and drawing. Photon is built entirely on
|
||||
free software, using libraries like GLFW, PhysFS, OpenAL, and boost. Using
|
||||
Photon does not require knowledge of any of these libraries as their needed
|
||||
functionality is wrapped entirely within Photon’s rich class library so that
|
||||
anyone with a decent grasp of C++ can use Photon.
|
||||
free software, using libraries including including GLFW, PhysFS, OpenAL, Corona,
|
||||
Freetype and boost.. Using Photon does not require knowledge of any of these
|
||||
libraries as their needed functionality is wrapped entirely within Photon’s rich
|
||||
class library so that anyone with a decent grasp of C++ can use Photon.
|
||||
photon is a cross platform API, designed primarily for game development.
|
||||
photon is designed to run on as many operating systems as possible, and OS
|
||||
support is only limited by libraries which Photon depends on, at the moment
|
||||
@ -18,13 +18,13 @@ which have OpenGL support.
|
||||
|
||||
If this is a source distribution you'll need to build photon before you can use
|
||||
it in your own applications, for details on how to build and install photon
|
||||
check out INSTALL.txt.
|
||||
check out INSTALL.html
|
||||
|
||||
If this is a binary distribution you can start using photon right away by
|
||||
linking the photon library (found in the lib/ subfolder) and it's dependencies
|
||||
with your applications.
|
||||
|
||||
If you need any help or have any questions check out IFAQ.txt or visit photon's
|
||||
If you need any help or have any questions check out IFAQ.html or visit photon's
|
||||
homepage at http://photon.sourceforge.net/.
|
||||
|
||||
$Id: README.txt,v 1.1 2005/07/17 22:41:03 cozman Exp $
|
||||
$Id: README.txt,v 1.3 2005/11/15 06:01:12 cozman Exp $
|
||||
|
@ -1,18 +1,60 @@
|
||||
Sanity Check
|
||||
Check Compilation from CVS
|
||||
Ensure Tests Run from CVS
|
||||
Sanity Check NaturalDocs
|
||||
Bump Version Number
|
||||
Prerelease:
|
||||
human: bump version numbers*
|
||||
script: checkout fresh CVS
|
||||
script: check building of library & tests
|
||||
script: check building of docs
|
||||
human: sanity check tests
|
||||
human: sanity check docs
|
||||
human: check building on Windows
|
||||
check Code::Blocks build
|
||||
check Dev-C++ build
|
||||
run only one set of tests (Code::Blocks/Dev-C++ use same compiler)
|
||||
check MSVC build
|
||||
run tests
|
||||
Release:
|
||||
script: tag CVS with version number `cvs rtag release-MAJOR_MINOR_RELEASE photon`
|
||||
script: fresh CVS export `cvs -z3 -d:ext:cozman@cvs.sourceforge.net:/cvsroot/photon export -r release-MAJOR_MINOR_RELEASE photon`
|
||||
script: build docs with `scons docs`
|
||||
script: remove non-distribution files**
|
||||
script: rename directory to photon-MAJOR.MINOR
|
||||
script: package source with tar cjf photon-MAJOR.MINOR.RELEASE-src.tar.bz2 photon-MAJOR.MINOR/
|
||||
human: place in sourceforge File Release System
|
||||
human: upload docs to sourceforge webspace
|
||||
Post-release:
|
||||
human: generate photon-x.y.z-linux-gcc.tar.bz2
|
||||
extract photon-x.y.z-src.tar.bz2
|
||||
run `scons`
|
||||
remove non-distribution files (regenerated by scons)
|
||||
write a README-PREBUILT.txt
|
||||
upload to sourceforge File Release system
|
||||
human: generate photon-x.y.z-win32-mingw.zip
|
||||
extract photon-x.y.z-src.tar.bz2
|
||||
build libphoton.a and libphoton-noal.a
|
||||
remove non-distribution files (regenerated by scons or IDE)
|
||||
write a README-PREBUILT.txt
|
||||
upload to sourceforge File Release system
|
||||
human: write release announcement
|
||||
|
||||
*Version Number Locations:
|
||||
ndoc/Menu.txt : Title
|
||||
src/Application.cpp : photonVer_
|
||||
CHANGELOG.txt
|
||||
photon.mm
|
||||
Tag CVS with version number
|
||||
Sourceforge.net
|
||||
Package from clean CVS
|
||||
Upload to Sourceforge and release via Sourceforge release system
|
||||
Upload docs to Sourceforge webspace
|
||||
Write release announcement, post on DevBlog/Mailing list
|
||||
release.sh
|
||||
|
||||
**Non-Distribution Files:
|
||||
photon/.sconf_temp/
|
||||
photon/build/
|
||||
photon/docs/.cvsignore
|
||||
photon/include/.sconsign
|
||||
photon/include/*/.sconsign
|
||||
photon/include/*/*/.sconsign
|
||||
photon/ndoc/
|
||||
photon/ndoc/.cvsignore
|
||||
photon/.cvsignore
|
||||
photon/config.log
|
||||
photon/RELEASE-HOWTO.txt
|
||||
photon/release.sh
|
||||
|
||||
|
||||
$Id: RELEASE-HOWTO.txt,v 1.2 2005/08/08 19:35:11 cozman Exp $
|
||||
$Id: RELEASE-HOWTO.txt,v 1.9 2005/08/19 07:23:38 cozman Exp $
|
||||
|
19
SConstruct
19
SConstruct
@ -5,7 +5,7 @@
|
||||
# James Turk (jpt2433@rit.edu)
|
||||
#
|
||||
# Version:
|
||||
# $Id: SConstruct,v 1.19 2005/08/08 21:39:40 cozman Exp $
|
||||
# $Id: SConstruct,v 1.27 2005/11/23 19:38:51 cozman Exp $
|
||||
|
||||
import os,os.path
|
||||
import glob
|
||||
@ -27,7 +27,7 @@ INC_DIRS = ["include/%s" % d for d in SUB_DIRS]
|
||||
SRC_FILES = [f.replace('src','build') for f in getFilesMulti(SRC_DIRS, '*.cpp')]
|
||||
INC_FILES = getFilesMulti(INC_DIRS, '*.hpp')
|
||||
|
||||
libsMap = { 'nt':('opengl32','glu32',['openal32','alut']),
|
||||
libsMap = { 'nt':('opengl32','glu32','openal32'),
|
||||
'posix':('GL','GLU','openal'),
|
||||
'mac':('GL','GLU','openal')}
|
||||
try:
|
||||
@ -52,11 +52,11 @@ def BuildSuperHeader(target = None, source = None, env = None):
|
||||
|
||||
SuperHeaderAction = Action(BuildSuperHeader)
|
||||
|
||||
# Configure the environment (Check libraries):
|
||||
# Configure the environment
|
||||
env = Environment(ENV = os.environ)
|
||||
env.Append(CPPPATH='include', CPPFLAGS='-Wall')
|
||||
env.Append(CPPPATH='include', CPPFLAGS=['-Wall', '-fmessage-length=0'])
|
||||
env.ParseConfig('freetype-config --cflags')
|
||||
# Configure
|
||||
# Configure (Check Libraries)
|
||||
if not env.GetOption('clean'):
|
||||
conf = Configure(env)
|
||||
if not conf.CheckLibWithHeader(OGL_LIB, 'GL/gl.h', 'C++'):
|
||||
@ -74,6 +74,9 @@ if not env.GetOption('clean'):
|
||||
if not conf.CheckLibWithHeader('corona', 'corona.h', 'C++'):
|
||||
print 'Corona not found, exiting.'
|
||||
Exit(1)
|
||||
if not conf.CheckCXXHeader('boost/utility.hpp'):
|
||||
print 'Boost not found, exiting.'
|
||||
Exit(1)
|
||||
if conf.CheckLibWithHeader(OAL_LIB, 'AL/al.h', 'C++'):
|
||||
conf.env.Append(CPPFLAGS='-DPHOTON_USE_OPENAL')
|
||||
else:
|
||||
@ -93,8 +96,9 @@ env.Default(LIBRARY)
|
||||
|
||||
# Documentation
|
||||
ndoc = env.Command('docs/index.html', './include',
|
||||
"""NaturalDocs -nag -i $SOURCES -o HTML ./docs -p ./ndoc""")
|
||||
"""NaturalDocs -nag -i $SOURCES -i ndoc/pages -i ndoc/tutorials -o HTML ./docs -p ./ndoc""")
|
||||
env.Alias("docs",ndoc)
|
||||
env.AlwaysBuild(ndoc)
|
||||
|
||||
|
||||
# Tests:
|
||||
@ -106,5 +110,6 @@ for test_src in test_srcs:
|
||||
tests.append(env.Program(test_name, source=test_src, LIBPATH='./lib',
|
||||
LIBS=['photon','glfw',OAL_LIB,OGL_LIB,GLU_LIB,
|
||||
'physfs','corona','freetype']))
|
||||
env.Alias('test',tests)
|
||||
|
||||
env.Alias('tests',tests)
|
||||
|
||||
|
43
codeblocks/AudioTest.cbp
Normal file
43
codeblocks/AudioTest.cbp
Normal file
@ -0,0 +1,43 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE Code::Blocks_project_file>
|
||||
<Code::Blocks_project_file>
|
||||
<FileVersion major="1" minor="1"/>
|
||||
<Project>
|
||||
<Option title="AudioTest"/>
|
||||
<Option makefile="Makefile"/>
|
||||
<Option makefile_is_custom="0"/>
|
||||
<Option compiler="0"/>
|
||||
<Build>
|
||||
<Target title="default">
|
||||
<Option output="..\test\AudioTest.exe"/>
|
||||
<Option working_dir="..\test"/>
|
||||
<Option object_output=".objs"/>
|
||||
<Option deps_output=".deps"/>
|
||||
<Option external_deps=""/>
|
||||
<Option type="1"/>
|
||||
<Option compiler="0"/>
|
||||
<Option use_console_runner="0"/>
|
||||
<Option projectResourceIncludeDirsRelation="1"/>
|
||||
</Target>
|
||||
</Build>
|
||||
<Compiler>
|
||||
<Add option="-Wall --pedantic"/>
|
||||
<Add option="-DPHOTON_USE_OPENAL"/>
|
||||
<Add directory="..\include"/>
|
||||
</Compiler>
|
||||
<Linker>
|
||||
<Add library="photon"/>
|
||||
<Add library="glfw"/>
|
||||
<Add library="opengl32"/>
|
||||
<Add library="glu32"/>
|
||||
<Add library="openal32"/>
|
||||
<Add library="physfs"/>
|
||||
<Add library="freetype"/>
|
||||
<Add directory="..\lib"/>
|
||||
</Linker>
|
||||
<Unit filename="..\test\Audio_test.cpp">
|
||||
<Option compilerVar="CPP"/>
|
||||
<Option target="default"/>
|
||||
</Unit>
|
||||
</Project>
|
||||
</Code::Blocks_project_file>
|
41
codeblocks/ConfigFileTest.cbp
Normal file
41
codeblocks/ConfigFileTest.cbp
Normal file
@ -0,0 +1,41 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE Code::Blocks_project_file>
|
||||
<Code::Blocks_project_file>
|
||||
<FileVersion major="1" minor="1"/>
|
||||
<Project>
|
||||
<Option title="ConfigFileTest"/>
|
||||
<Option makefile="Makefile"/>
|
||||
<Option makefile_is_custom="0"/>
|
||||
<Option compiler="0"/>
|
||||
<Build>
|
||||
<Target title="default">
|
||||
<Option output="..\test\ConfigFileTest.exe"/>
|
||||
<Option working_dir="..\test"/>
|
||||
<Option object_output=".objs"/>
|
||||
<Option deps_output=".deps"/>
|
||||
<Option external_deps=""/>
|
||||
<Option type="1"/>
|
||||
<Option compiler="0"/>
|
||||
<Option projectResourceIncludeDirsRelation="1"/>
|
||||
</Target>
|
||||
</Build>
|
||||
<Compiler>
|
||||
<Add option="-Wall --pedantic"/>
|
||||
<Add directory="..\include"/>
|
||||
</Compiler>
|
||||
<Linker>
|
||||
<Add library="photon"/>
|
||||
<Add library="glfw"/>
|
||||
<Add library="opengl32"/>
|
||||
<Add library="glu32"/>
|
||||
<Add library="openal32"/>
|
||||
<Add library="physfs"/>
|
||||
<Add library="freetype"/>
|
||||
<Add directory="..\lib"/>
|
||||
</Linker>
|
||||
<Unit filename="..\test\ConfigFile_test.cpp">
|
||||
<Option compilerVar="CPP"/>
|
||||
<Option target="default"/>
|
||||
</Unit>
|
||||
</Project>
|
||||
</Code::Blocks_project_file>
|
42
codeblocks/FontTest.cbp
Normal file
42
codeblocks/FontTest.cbp
Normal file
@ -0,0 +1,42 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE Code::Blocks_project_file>
|
||||
<Code::Blocks_project_file>
|
||||
<FileVersion major="1" minor="1"/>
|
||||
<Project>
|
||||
<Option title="FontTest"/>
|
||||
<Option makefile="Makefile"/>
|
||||
<Option makefile_is_custom="0"/>
|
||||
<Option compiler="0"/>
|
||||
<Build>
|
||||
<Target title="default">
|
||||
<Option output="..\test\FontTest.exe"/>
|
||||
<Option working_dir="..\test"/>
|
||||
<Option object_output=".objs"/>
|
||||
<Option deps_output=".deps"/>
|
||||
<Option external_deps=""/>
|
||||
<Option type="1"/>
|
||||
<Option compiler="0"/>
|
||||
<Option use_console_runner="0"/>
|
||||
<Option projectResourceIncludeDirsRelation="1"/>
|
||||
</Target>
|
||||
</Build>
|
||||
<Compiler>
|
||||
<Add option="-Wall --pedantic"/>
|
||||
<Add directory="..\include"/>
|
||||
</Compiler>
|
||||
<Linker>
|
||||
<Add library="photon"/>
|
||||
<Add library="glfw"/>
|
||||
<Add library="opengl32"/>
|
||||
<Add library="glu32"/>
|
||||
<Add library="openal32"/>
|
||||
<Add library="physfs"/>
|
||||
<Add library="freetype"/>
|
||||
<Add directory="..\lib"/>
|
||||
</Linker>
|
||||
<Unit filename="..\test\Font_test.cpp">
|
||||
<Option compilerVar="CPP"/>
|
||||
<Option target="default"/>
|
||||
</Unit>
|
||||
</Project>
|
||||
</Code::Blocks_project_file>
|
43
codeblocks/ImageTest.cbp
Normal file
43
codeblocks/ImageTest.cbp
Normal file
@ -0,0 +1,43 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE Code::Blocks_project_file>
|
||||
<Code::Blocks_project_file>
|
||||
<FileVersion major="1" minor="1"/>
|
||||
<Project>
|
||||
<Option title="ImageTest"/>
|
||||
<Option makefile="Makefile"/>
|
||||
<Option makefile_is_custom="0"/>
|
||||
<Option compiler="0"/>
|
||||
<Build>
|
||||
<Target title="default">
|
||||
<Option output="..\test\ImageTest.exe"/>
|
||||
<Option working_dir="..\test"/>
|
||||
<Option object_output=".objs"/>
|
||||
<Option deps_output=".deps"/>
|
||||
<Option external_deps=""/>
|
||||
<Option type="1"/>
|
||||
<Option compiler="0"/>
|
||||
<Option use_console_runner="0"/>
|
||||
<Option projectResourceIncludeDirsRelation="1"/>
|
||||
</Target>
|
||||
</Build>
|
||||
<Compiler>
|
||||
<Add option="-Wall --pedantic"/>
|
||||
<Add directory="..\include"/>
|
||||
</Compiler>
|
||||
<Linker>
|
||||
<Add library="photon"/>
|
||||
<Add library="glfw"/>
|
||||
<Add library="opengl32"/>
|
||||
<Add library="glu32"/>
|
||||
<Add library="openal32"/>
|
||||
<Add library="physfs"/>
|
||||
<Add library="freetype"/>
|
||||
<Add library="corona"/>
|
||||
<Add directory="..\lib"/>
|
||||
</Linker>
|
||||
<Unit filename="..\test\Image_test.cpp">
|
||||
<Option compilerVar="CPP"/>
|
||||
<Option target="default"/>
|
||||
</Unit>
|
||||
</Project>
|
||||
</Code::Blocks_project_file>
|
42
codeblocks/InputTest.cbp
Normal file
42
codeblocks/InputTest.cbp
Normal file
@ -0,0 +1,42 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE Code::Blocks_project_file>
|
||||
<Code::Blocks_project_file>
|
||||
<FileVersion major="1" minor="1"/>
|
||||
<Project>
|
||||
<Option title="InputTest"/>
|
||||
<Option makefile="Makefile"/>
|
||||
<Option makefile_is_custom="0"/>
|
||||
<Option compiler="0"/>
|
||||
<Build>
|
||||
<Target title="default">
|
||||
<Option output="..\test\InputTest.exe"/>
|
||||
<Option working_dir="..\test"/>
|
||||
<Option object_output=".objs"/>
|
||||
<Option deps_output=".deps"/>
|
||||
<Option external_deps=""/>
|
||||
<Option type="1"/>
|
||||
<Option compiler="0"/>
|
||||
<Option use_console_runner="0"/>
|
||||
<Option projectResourceIncludeDirsRelation="1"/>
|
||||
</Target>
|
||||
</Build>
|
||||
<Compiler>
|
||||
<Add option="-Wall --pedantic"/>
|
||||
<Add directory="..\include"/>
|
||||
</Compiler>
|
||||
<Linker>
|
||||
<Add library="photon"/>
|
||||
<Add library="glfw"/>
|
||||
<Add library="opengl32"/>
|
||||
<Add library="glu32"/>
|
||||
<Add library="openal32"/>
|
||||
<Add library="physfs"/>
|
||||
<Add library="freetype"/>
|
||||
<Add directory="..\lib"/>
|
||||
</Linker>
|
||||
<Unit filename="..\test\Input_test.cpp">
|
||||
<Option compilerVar="CPP"/>
|
||||
<Option target="default"/>
|
||||
</Unit>
|
||||
</Project>
|
||||
</Code::Blocks_project_file>
|
41
codeblocks/LogTest.cbp
Normal file
41
codeblocks/LogTest.cbp
Normal file
@ -0,0 +1,41 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE Code::Blocks_project_file>
|
||||
<Code::Blocks_project_file>
|
||||
<FileVersion major="1" minor="1"/>
|
||||
<Project>
|
||||
<Option title="LogTest"/>
|
||||
<Option makefile="Makefile"/>
|
||||
<Option makefile_is_custom="0"/>
|
||||
<Option compiler="0"/>
|
||||
<Build>
|
||||
<Target title="default">
|
||||
<Option output="..\test\LogTest.exe"/>
|
||||
<Option working_dir="..\test"/>
|
||||
<Option object_output=".objs"/>
|
||||
<Option deps_output=".deps"/>
|
||||
<Option external_deps=""/>
|
||||
<Option type="1"/>
|
||||
<Option compiler="0"/>
|
||||
<Option projectResourceIncludeDirsRelation="1"/>
|
||||
</Target>
|
||||
</Build>
|
||||
<Compiler>
|
||||
<Add option="-Wall --pedantic"/>
|
||||
<Add directory="..\include"/>
|
||||
</Compiler>
|
||||
<Linker>
|
||||
<Add library="photon"/>
|
||||
<Add library="glfw"/>
|
||||
<Add library="opengl32"/>
|
||||
<Add library="glu32"/>
|
||||
<Add library="openal32"/>
|
||||
<Add library="physfs"/>
|
||||
<Add library="freetype"/>
|
||||
<Add directory="..\lib"/>
|
||||
</Linker>
|
||||
<Unit filename="..\test\Log_test.cpp">
|
||||
<Option compilerVar="CPP"/>
|
||||
<Option target="default"/>
|
||||
</Unit>
|
||||
</Project>
|
||||
</Code::Blocks_project_file>
|
42
codeblocks/PenTest.cbp
Normal file
42
codeblocks/PenTest.cbp
Normal file
@ -0,0 +1,42 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE Code::Blocks_project_file>
|
||||
<Code::Blocks_project_file>
|
||||
<FileVersion major="1" minor="1"/>
|
||||
<Project>
|
||||
<Option title="PenTest"/>
|
||||
<Option makefile="Makefile"/>
|
||||
<Option makefile_is_custom="0"/>
|
||||
<Option compiler="0"/>
|
||||
<Build>
|
||||
<Target title="default">
|
||||
<Option output="..\test\PenTest.exe"/>
|
||||
<Option working_dir="..\test"/>
|
||||
<Option object_output=".objs"/>
|
||||
<Option deps_output=".deps"/>
|
||||
<Option external_deps=""/>
|
||||
<Option type="1"/>
|
||||
<Option compiler="0"/>
|
||||
<Option use_console_runner="0"/>
|
||||
<Option projectResourceIncludeDirsRelation="1"/>
|
||||
</Target>
|
||||
</Build>
|
||||
<Compiler>
|
||||
<Add option="-Wall --pedantic"/>
|
||||
<Add directory="..\include"/>
|
||||
</Compiler>
|
||||
<Linker>
|
||||
<Add library="photon"/>
|
||||
<Add library="glfw"/>
|
||||
<Add library="opengl32"/>
|
||||
<Add library="glu32"/>
|
||||
<Add library="openal32"/>
|
||||
<Add library="physfs"/>
|
||||
<Add library="freetype"/>
|
||||
<Add directory="..\lib"/>
|
||||
</Linker>
|
||||
<Unit filename="..\test\Pen_test.cpp">
|
||||
<Option compilerVar="CPP"/>
|
||||
<Option target="default"/>
|
||||
</Unit>
|
||||
</Project>
|
||||
</Code::Blocks_project_file>
|
10
codeblocks/README-CODEBLOCKS.txt
Normal file
10
codeblocks/README-CODEBLOCKS.txt
Normal file
@ -0,0 +1,10 @@
|
||||
Building under Code::Blocks is only currently supported when using MingW/GCC
|
||||
as the compiler, if you successfully build photon with any other compiler it
|
||||
would be greatly appreciated if you'd contact me (cozman@users.sf.net).
|
||||
|
||||
Note on Code::Blocks without OpenAL
|
||||
|
||||
If you are attempting to compile via Code::Blocks without OpenAL you must open
|
||||
both photon.cbp and AudioTest.cbp and within the Compiler tab of the
|
||||
Project->Build Options dialog, select the #defines sub-tab and erase the line
|
||||
PHOTON_USE_OPENAL.
|
41
codeblocks/RandGenTest.cbp
Normal file
41
codeblocks/RandGenTest.cbp
Normal file
@ -0,0 +1,41 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE Code::Blocks_project_file>
|
||||
<Code::Blocks_project_file>
|
||||
<FileVersion major="1" minor="1"/>
|
||||
<Project>
|
||||
<Option title="RandGenTest"/>
|
||||
<Option makefile="Makefile"/>
|
||||
<Option makefile_is_custom="0"/>
|
||||
<Option compiler="0"/>
|
||||
<Build>
|
||||
<Target title="default">
|
||||
<Option output="..\test\RandGenTest.exe"/>
|
||||
<Option working_dir="..\test"/>
|
||||
<Option object_output=".objs"/>
|
||||
<Option deps_output=".deps"/>
|
||||
<Option external_deps=""/>
|
||||
<Option type="1"/>
|
||||
<Option compiler="0"/>
|
||||
<Option projectResourceIncludeDirsRelation="1"/>
|
||||
</Target>
|
||||
</Build>
|
||||
<Compiler>
|
||||
<Add option="-Wall --pedantic"/>
|
||||
<Add directory="..\include"/>
|
||||
</Compiler>
|
||||
<Linker>
|
||||
<Add library="photon"/>
|
||||
<Add library="glfw"/>
|
||||
<Add library="opengl32"/>
|
||||
<Add library="glu32"/>
|
||||
<Add library="openal32"/>
|
||||
<Add library="physfs"/>
|
||||
<Add library="freetype"/>
|
||||
<Add directory="..\lib"/>
|
||||
</Linker>
|
||||
<Unit filename="..\test\RandGen_test.cpp">
|
||||
<Option compilerVar="CPP"/>
|
||||
<Option target="default"/>
|
||||
</Unit>
|
||||
</Project>
|
||||
</Code::Blocks_project_file>
|
42
codeblocks/StateTest.cbp
Normal file
42
codeblocks/StateTest.cbp
Normal file
@ -0,0 +1,42 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE Code::Blocks_project_file>
|
||||
<Code::Blocks_project_file>
|
||||
<FileVersion major="1" minor="1"/>
|
||||
<Project>
|
||||
<Option title="StateTest"/>
|
||||
<Option makefile="Makefile"/>
|
||||
<Option makefile_is_custom="0"/>
|
||||
<Option compiler="0"/>
|
||||
<Build>
|
||||
<Target title="default">
|
||||
<Option output="..\test\StateTest.exe"/>
|
||||
<Option working_dir="..\test"/>
|
||||
<Option object_output=".objs"/>
|
||||
<Option deps_output=".deps"/>
|
||||
<Option external_deps=""/>
|
||||
<Option type="1"/>
|
||||
<Option compiler="0"/>
|
||||
<Option projectResourceIncludeDirsRelation="1"/>
|
||||
</Target>
|
||||
</Build>
|
||||
<Compiler>
|
||||
<Add option="-Wall --pedantic"/>
|
||||
<Add directory="..\include"/>
|
||||
</Compiler>
|
||||
<Linker>
|
||||
<Add library="photon"/>
|
||||
<Add library="glfw"/>
|
||||
<Add library="opengl32"/>
|
||||
<Add library="glu32"/>
|
||||
<Add library="openal32"/>
|
||||
<Add library="physfs"/>
|
||||
<Add library="freetype"/>
|
||||
<Add library="corona"/>
|
||||
<Add directory="..\lib"/>
|
||||
</Linker>
|
||||
<Unit filename="..\test\State_test.cpp">
|
||||
<Option compilerVar="CPP"/>
|
||||
<Option target="default"/>
|
||||
</Unit>
|
||||
</Project>
|
||||
</Code::Blocks_project_file>
|
43
codeblocks/TextureTest.cbp
Normal file
43
codeblocks/TextureTest.cbp
Normal file
@ -0,0 +1,43 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE Code::Blocks_project_file>
|
||||
<Code::Blocks_project_file>
|
||||
<FileVersion major="1" minor="1"/>
|
||||
<Project>
|
||||
<Option title="TextureTest"/>
|
||||
<Option makefile="Makefile"/>
|
||||
<Option makefile_is_custom="0"/>
|
||||
<Option compiler="0"/>
|
||||
<Build>
|
||||
<Target title="default">
|
||||
<Option output="..\test\TextureTest.exe"/>
|
||||
<Option working_dir="..\test"/>
|
||||
<Option object_output=".objs"/>
|
||||
<Option deps_output=".deps"/>
|
||||
<Option external_deps=""/>
|
||||
<Option type="1"/>
|
||||
<Option compiler="0"/>
|
||||
<Option use_console_runner="0"/>
|
||||
<Option projectResourceIncludeDirsRelation="1"/>
|
||||
</Target>
|
||||
</Build>
|
||||
<Compiler>
|
||||
<Add option="-Wall --pedantic"/>
|
||||
<Add directory="..\include"/>
|
||||
</Compiler>
|
||||
<Linker>
|
||||
<Add library="photon"/>
|
||||
<Add library="glfw"/>
|
||||
<Add library="opengl32"/>
|
||||
<Add library="glu32"/>
|
||||
<Add library="openal32"/>
|
||||
<Add library="physfs"/>
|
||||
<Add library="freetype"/>
|
||||
<Add library="corona"/>
|
||||
<Add directory="..\lib"/>
|
||||
</Linker>
|
||||
<Unit filename="..\test\Texture_test.cpp">
|
||||
<Option compilerVar="CPP"/>
|
||||
<Option target="default"/>
|
||||
</Unit>
|
||||
</Project>
|
||||
</Code::Blocks_project_file>
|
41
codeblocks/filesysTest.cbp
Normal file
41
codeblocks/filesysTest.cbp
Normal file
@ -0,0 +1,41 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE Code::Blocks_project_file>
|
||||
<Code::Blocks_project_file>
|
||||
<FileVersion major="1" minor="1"/>
|
||||
<Project>
|
||||
<Option title="filesysTest"/>
|
||||
<Option makefile="Makefile"/>
|
||||
<Option makefile_is_custom="0"/>
|
||||
<Option compiler="0"/>
|
||||
<Build>
|
||||
<Target title="default">
|
||||
<Option output="..\test\filesysTest.exe"/>
|
||||
<Option working_dir="..\test"/>
|
||||
<Option object_output=".objs"/>
|
||||
<Option deps_output=".deps"/>
|
||||
<Option external_deps=""/>
|
||||
<Option type="1"/>
|
||||
<Option compiler="0"/>
|
||||
<Option projectResourceIncludeDirsRelation="1"/>
|
||||
</Target>
|
||||
</Build>
|
||||
<Compiler>
|
||||
<Add option="-Wall --pedantic"/>
|
||||
<Add directory="..\include"/>
|
||||
</Compiler>
|
||||
<Linker>
|
||||
<Add library="photon"/>
|
||||
<Add library="glfw"/>
|
||||
<Add library="opengl32"/>
|
||||
<Add library="glu32"/>
|
||||
<Add library="openal32"/>
|
||||
<Add library="physfs"/>
|
||||
<Add library="freetype"/>
|
||||
<Add directory="..\lib"/>
|
||||
</Linker>
|
||||
<Unit filename="..\test\filesys_test.cpp">
|
||||
<Option compilerVar="CPP"/>
|
||||
<Option target="default"/>
|
||||
</Unit>
|
||||
</Project>
|
||||
</Code::Blocks_project_file>
|
41
codeblocks/mathTest.cbp
Normal file
41
codeblocks/mathTest.cbp
Normal file
@ -0,0 +1,41 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE Code::Blocks_project_file>
|
||||
<Code::Blocks_project_file>
|
||||
<FileVersion major="1" minor="1"/>
|
||||
<Project>
|
||||
<Option title="mathTest"/>
|
||||
<Option makefile="Makefile"/>
|
||||
<Option makefile_is_custom="0"/>
|
||||
<Option compiler="0"/>
|
||||
<Build>
|
||||
<Target title="default">
|
||||
<Option output="..\test\mathTest.exe"/>
|
||||
<Option working_dir="..\test"/>
|
||||
<Option object_output=".objs"/>
|
||||
<Option deps_output=".deps"/>
|
||||
<Option external_deps=""/>
|
||||
<Option type="1"/>
|
||||
<Option compiler="0"/>
|
||||
<Option projectResourceIncludeDirsRelation="1"/>
|
||||
</Target>
|
||||
</Build>
|
||||
<Compiler>
|
||||
<Add option="-Wall --pedantic"/>
|
||||
<Add directory="..\include"/>
|
||||
</Compiler>
|
||||
<Linker>
|
||||
<Add library="photon"/>
|
||||
<Add library="glfw"/>
|
||||
<Add library="opengl32"/>
|
||||
<Add library="glu32"/>
|
||||
<Add library="openal32"/>
|
||||
<Add library="physfs"/>
|
||||
<Add library="freetype"/>
|
||||
<Add directory="..\lib"/>
|
||||
</Linker>
|
||||
<Unit filename="..\test\math_test.cpp">
|
||||
<Option compilerVar="CPP"/>
|
||||
<Option target="default"/>
|
||||
</Unit>
|
||||
</Project>
|
||||
</Code::Blocks_project_file>
|
330
codeblocks/photon.cbp
Normal file
330
codeblocks/photon.cbp
Normal file
@ -0,0 +1,330 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE Code::Blocks_project_file>
|
||||
<Code::Blocks_project_file>
|
||||
<FileVersion major="1" minor="1"/>
|
||||
<Project>
|
||||
<Option title="photon"/>
|
||||
<Option makefile="Makefile"/>
|
||||
<Option makefile_is_custom="0"/>
|
||||
<Option compiler="0"/>
|
||||
<Build>
|
||||
<Target title="default">
|
||||
<Option output="..\lib\libphoton.a"/>
|
||||
<Option working_dir=""/>
|
||||
<Option object_output=".objs"/>
|
||||
<Option deps_output=".deps"/>
|
||||
<Option external_deps=""/>
|
||||
<Option type="2"/>
|
||||
<Option compiler="0"/>
|
||||
<Option projectResourceIncludeDirsRelation="2"/>
|
||||
</Target>
|
||||
</Build>
|
||||
<Compiler>
|
||||
<Add option="-Wall --pedantic"/>
|
||||
<Add option="-DPHOTON_USE_OPENAL"/>
|
||||
<Add directory="..\include"/>
|
||||
</Compiler>
|
||||
<Unit filename="..\include\Application.hpp">
|
||||
<Option compilerVar=""/>
|
||||
<Option compile="0"/>
|
||||
<Option link="0"/>
|
||||
<Option target="default"/>
|
||||
</Unit>
|
||||
<Unit filename="..\include\Log.hpp">
|
||||
<Option compilerVar=""/>
|
||||
<Option compile="0"/>
|
||||
<Option link="0"/>
|
||||
<Option target="default"/>
|
||||
</Unit>
|
||||
<Unit filename="..\include\LogSink.hpp">
|
||||
<Option compilerVar=""/>
|
||||
<Option compile="0"/>
|
||||
<Option link="0"/>
|
||||
<Option target="default"/>
|
||||
</Unit>
|
||||
<Unit filename="..\include\ResourceManaged.hpp">
|
||||
<Option compilerVar=""/>
|
||||
<Option compile="0"/>
|
||||
<Option link="0"/>
|
||||
<Option target="default"/>
|
||||
</Unit>
|
||||
<Unit filename="..\include\ResourceManager.hpp">
|
||||
<Option compilerVar=""/>
|
||||
<Option compile="0"/>
|
||||
<Option link="0"/>
|
||||
<Option target="default"/>
|
||||
</Unit>
|
||||
<Unit filename="..\include\State.hpp">
|
||||
<Option compilerVar=""/>
|
||||
<Option compile="0"/>
|
||||
<Option link="0"/>
|
||||
<Option target="default"/>
|
||||
</Unit>
|
||||
<Unit filename="..\include\audio\AudioCore.hpp">
|
||||
<Option compilerVar=""/>
|
||||
<Option compile="0"/>
|
||||
<Option link="0"/>
|
||||
<Option target="default"/>
|
||||
</Unit>
|
||||
<Unit filename="..\include\audio\SampleResourceManager.hpp">
|
||||
<Option compilerVar=""/>
|
||||
<Option compile="0"/>
|
||||
<Option link="0"/>
|
||||
<Option target="default"/>
|
||||
</Unit>
|
||||
<Unit filename="..\include\audio\Source.hpp">
|
||||
<Option compilerVar=""/>
|
||||
<Option compile="0"/>
|
||||
<Option link="0"/>
|
||||
<Option target="default"/>
|
||||
</Unit>
|
||||
<Unit filename="..\include\entrypoint.hpp">
|
||||
<Option compilerVar=""/>
|
||||
<Option compile="0"/>
|
||||
<Option link="0"/>
|
||||
<Option target="default"/>
|
||||
</Unit>
|
||||
<Unit filename="..\include\exceptions.hpp">
|
||||
<Option compilerVar=""/>
|
||||
<Option compile="0"/>
|
||||
<Option link="0"/>
|
||||
<Option target="default"/>
|
||||
</Unit>
|
||||
<Unit filename="..\include\math\Circle.hpp">
|
||||
<Option compilerVar=""/>
|
||||
<Option compile="0"/>
|
||||
<Option link="0"/>
|
||||
<Option target="default"/>
|
||||
</Unit>
|
||||
<Unit filename="..\include\math\Rect.hpp">
|
||||
<Option compilerVar=""/>
|
||||
<Option compile="0"/>
|
||||
<Option link="0"/>
|
||||
<Option target="default"/>
|
||||
</Unit>
|
||||
<Unit filename="..\include\math\Vector2.hpp">
|
||||
<Option compilerVar=""/>
|
||||
<Option compile="0"/>
|
||||
<Option link="0"/>
|
||||
<Option target="default"/>
|
||||
</Unit>
|
||||
<Unit filename="..\include\math\math.hpp">
|
||||
<Option compilerVar=""/>
|
||||
<Option compile="0"/>
|
||||
<Option link="0"/>
|
||||
<Option target="default"/>
|
||||
</Unit>
|
||||
<Unit filename="..\include\photon.hpp">
|
||||
<Option compilerVar=""/>
|
||||
<Option compile="0"/>
|
||||
<Option link="0"/>
|
||||
<Option target="default"/>
|
||||
</Unit>
|
||||
<Unit filename="..\include\types.hpp">
|
||||
<Option compilerVar=""/>
|
||||
<Option compile="0"/>
|
||||
<Option link="0"/>
|
||||
<Option target="default"/>
|
||||
</Unit>
|
||||
<Unit filename="..\include\util\ConfigFile.hpp">
|
||||
<Option compilerVar=""/>
|
||||
<Option compile="0"/>
|
||||
<Option link="0"/>
|
||||
<Option target="default"/>
|
||||
</Unit>
|
||||
<Unit filename="..\include\util\FileBuffer.hpp">
|
||||
<Option compilerVar=""/>
|
||||
<Option compile="0"/>
|
||||
<Option link="0"/>
|
||||
<Option target="default"/>
|
||||
</Unit>
|
||||
<Unit filename="..\include\util\RandGen.hpp">
|
||||
<Option compilerVar=""/>
|
||||
<Option compile="0"/>
|
||||
<Option link="0"/>
|
||||
<Option target="default"/>
|
||||
</Unit>
|
||||
<Unit filename="..\include\util\Singleton.hpp">
|
||||
<Option compilerVar=""/>
|
||||
<Option compile="0"/>
|
||||
<Option link="0"/>
|
||||
<Option target="default"/>
|
||||
</Unit>
|
||||
<Unit filename="..\include\util\Task.hpp">
|
||||
<Option compilerVar=""/>
|
||||
<Option compile="0"/>
|
||||
<Option link="0"/>
|
||||
<Option target="default"/>
|
||||
</Unit>
|
||||
<Unit filename="..\include\util\TaskManager.hpp">
|
||||
<Option compilerVar=""/>
|
||||
<Option compile="0"/>
|
||||
<Option link="0"/>
|
||||
<Option target="default"/>
|
||||
</Unit>
|
||||
<Unit filename="..\include\util\Timer.hpp">
|
||||
<Option compilerVar=""/>
|
||||
<Option compile="0"/>
|
||||
<Option link="0"/>
|
||||
<Option target="default"/>
|
||||
</Unit>
|
||||
<Unit filename="..\include\util\VersionInfo.hpp">
|
||||
<Option compilerVar=""/>
|
||||
<Option compile="0"/>
|
||||
<Option link="0"/>
|
||||
<Option target="default"/>
|
||||
</Unit>
|
||||
<Unit filename="..\include\util\filesys\filesys.hpp">
|
||||
<Option compilerVar=""/>
|
||||
<Option compile="0"/>
|
||||
<Option link="0"/>
|
||||
<Option target="default"/>
|
||||
</Unit>
|
||||
<Unit filename="..\include\video\Color.hpp">
|
||||
<Option compilerVar=""/>
|
||||
<Option compile="0"/>
|
||||
<Option link="0"/>
|
||||
<Option target="default"/>
|
||||
</Unit>
|
||||
<Unit filename="..\include\video\Font.hpp">
|
||||
<Option compilerVar=""/>
|
||||
<Option compile="0"/>
|
||||
<Option link="0"/>
|
||||
<Option target="default"/>
|
||||
</Unit>
|
||||
<Unit filename="..\include\video\FontResourceManager.hpp">
|
||||
<Option compilerVar=""/>
|
||||
<Option compile="0"/>
|
||||
<Option link="0"/>
|
||||
<Option target="default"/>
|
||||
</Unit>
|
||||
<Unit filename="..\include\video\Image.hpp">
|
||||
<Option compilerVar=""/>
|
||||
<Option compile="0"/>
|
||||
<Option link="0"/>
|
||||
<Option target="default"/>
|
||||
</Unit>
|
||||
<Unit filename="..\include\video\Pen.hpp">
|
||||
<Option compilerVar=""/>
|
||||
<Option compile="0"/>
|
||||
<Option link="0"/>
|
||||
<Option target="default"/>
|
||||
</Unit>
|
||||
<Unit filename="..\include\video\Texture.hpp">
|
||||
<Option compilerVar=""/>
|
||||
<Option compile="0"/>
|
||||
<Option link="0"/>
|
||||
<Option target="default"/>
|
||||
</Unit>
|
||||
<Unit filename="..\include\video\TextureResourceManager.hpp">
|
||||
<Option compilerVar=""/>
|
||||
<Option compile="0"/>
|
||||
<Option link="0"/>
|
||||
<Option target="default"/>
|
||||
</Unit>
|
||||
<Unit filename="..\src\Application.cpp">
|
||||
<Option compilerVar="CPP"/>
|
||||
<Option target="default"/>
|
||||
</Unit>
|
||||
<Unit filename="..\src\Log.cpp">
|
||||
<Option compilerVar="CPP"/>
|
||||
<Option target="default"/>
|
||||
</Unit>
|
||||
<Unit filename="..\src\LogSink.cpp">
|
||||
<Option compilerVar="CPP"/>
|
||||
<Option target="default"/>
|
||||
</Unit>
|
||||
<Unit filename="..\src\audio\AudioCore.cpp">
|
||||
<Option compilerVar="CPP"/>
|
||||
<Option target="default"/>
|
||||
</Unit>
|
||||
<Unit filename="..\src\audio\SampleResourceManager.cpp">
|
||||
<Option compilerVar="CPP"/>
|
||||
<Option target="default"/>
|
||||
</Unit>
|
||||
<Unit filename="..\src\entrypoint.cpp">
|
||||
<Option compilerVar="CPP"/>
|
||||
<Option target="default"/>
|
||||
</Unit>
|
||||
<Unit filename="..\src\exceptions.cpp">
|
||||
<Option compilerVar="CPP"/>
|
||||
<Option target="default"/>
|
||||
</Unit>
|
||||
<Unit filename="..\src\math\Circle.cpp">
|
||||
<Option compilerVar="CPP"/>
|
||||
<Option target="default"/>
|
||||
</Unit>
|
||||
<Unit filename="..\src\math\Rect.cpp">
|
||||
<Option compilerVar="CPP"/>
|
||||
<Option target="default"/>
|
||||
</Unit>
|
||||
<Unit filename="..\src\math\Vector2.cpp">
|
||||
<Option compilerVar="CPP"/>
|
||||
<Option target="default"/>
|
||||
</Unit>
|
||||
<Unit filename="..\src\math\math.cpp">
|
||||
<Option compilerVar="CPP"/>
|
||||
<Option target="default"/>
|
||||
</Unit>
|
||||
<Unit filename="..\src\util\ConfigFile.cpp">
|
||||
<Option compilerVar="CPP"/>
|
||||
<Option target="default"/>
|
||||
</Unit>
|
||||
<Unit filename="..\src\util\FileBuffer.cpp">
|
||||
<Option compilerVar="CPP"/>
|
||||
<Option target="default"/>
|
||||
</Unit>
|
||||
<Unit filename="..\src\util\RandGen.cpp">
|
||||
<Option compilerVar="CPP"/>
|
||||
<Option target="default"/>
|
||||
</Unit>
|
||||
<Unit filename="..\src\util\Task.cpp">
|
||||
<Option compilerVar="CPP"/>
|
||||
<Option target="default"/>
|
||||
</Unit>
|
||||
<Unit filename="..\src\util\TaskManager.cpp">
|
||||
<Option compilerVar="CPP"/>
|
||||
<Option target="default"/>
|
||||
</Unit>
|
||||
<Unit filename="..\src\util\Timer.cpp">
|
||||
<Option compilerVar="CPP"/>
|
||||
<Option target="default"/>
|
||||
</Unit>
|
||||
<Unit filename="..\src\util\VersionInfo.cpp">
|
||||
<Option compilerVar="CPP"/>
|
||||
<Option target="default"/>
|
||||
</Unit>
|
||||
<Unit filename="..\src\util\filesys\filesys.cpp">
|
||||
<Option compilerVar="CPP"/>
|
||||
<Option target="default"/>
|
||||
</Unit>
|
||||
<Unit filename="..\src\video\Color.cpp">
|
||||
<Option compilerVar="CPP"/>
|
||||
<Option target="default"/>
|
||||
</Unit>
|
||||
<Unit filename="..\src\video\Font.cpp">
|
||||
<Option compilerVar="CPP"/>
|
||||
<Option target="default"/>
|
||||
</Unit>
|
||||
<Unit filename="..\src\video\FontResourceManager.cpp">
|
||||
<Option compilerVar="CPP"/>
|
||||
<Option target="default"/>
|
||||
</Unit>
|
||||
<Unit filename="..\src\video\Image.cpp">
|
||||
<Option compilerVar="CPP"/>
|
||||
<Option target="default"/>
|
||||
</Unit>
|
||||
<Unit filename="..\src\video\Pen.cpp">
|
||||
<Option compilerVar="CPP"/>
|
||||
<Option target="default"/>
|
||||
</Unit>
|
||||
<Unit filename="..\src\video\Texture.cpp">
|
||||
<Option compilerVar="CPP"/>
|
||||
<Option target="default"/>
|
||||
</Unit>
|
||||
<Unit filename="..\src\video\TextureResourceManager.cpp">
|
||||
<Option compilerVar="CPP"/>
|
||||
<Option target="default"/>
|
||||
</Unit>
|
||||
</Project>
|
||||
</Code::Blocks_project_file>
|
19
codeblocks/photon.workspace
Normal file
19
codeblocks/photon.workspace
Normal file
@ -0,0 +1,19 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE Code::Blocks_workspace_file>
|
||||
<Code::Blocks_workspace_file>
|
||||
<Workspace title="Photon Workspace">
|
||||
<Project filename="photon.cbp" active="1"/>
|
||||
<Project filename="AudioTest.cbp"/>
|
||||
<Project filename="ImageTest.cbp"/>
|
||||
<Project filename="ConfigFileTest.cbp"/>
|
||||
<Project filename="filesysTest.cbp"/>
|
||||
<Project filename="FontTest.cbp"/>
|
||||
<Project filename="InputTest.cbp"/>
|
||||
<Project filename="LogTest.cbp"/>
|
||||
<Project filename="mathTest.cbp"/>
|
||||
<Project filename="PenTest.cbp"/>
|
||||
<Project filename="RandGenTest.cbp"/>
|
||||
<Project filename="TextureTest.cbp"/>
|
||||
<Project filename="StateTest.cbp"/>
|
||||
</Workspace>
|
||||
</Code::Blocks_workspace_file>
|
59
devcpp/AudioTest.dev
Normal file
59
devcpp/AudioTest.dev
Normal file
@ -0,0 +1,59 @@
|
||||
[Project]
|
||||
FileName=AudioTest.dev
|
||||
Name=AudioTest
|
||||
UnitCount=1
|
||||
Type=1
|
||||
Ver=1
|
||||
ObjFiles=
|
||||
Includes=../include
|
||||
Libs=../lib
|
||||
PrivateResource=
|
||||
ResourceIncludes=
|
||||
MakeIncludes=
|
||||
Compiler=
|
||||
CppCompiler=-DPHOTON_USE_OPENAL -Wall --pedantic
|
||||
Linker=-lphoton -lglfw -lfreetype -lopengl32 -lglu32 -lopenal32 -lphysfs -lcorona
|
||||
IsCpp=1
|
||||
Icon=
|
||||
ExeOutput=..\test
|
||||
ObjectOutput=
|
||||
OverrideOutput=0
|
||||
OverrideOutputName=AudioTest.exe
|
||||
HostApplication=
|
||||
Folders=
|
||||
CommandLine=
|
||||
UseCustomMakefile=0
|
||||
CustomMakefile=
|
||||
IncludeVersionInfo=0
|
||||
SupportXPThemes=0
|
||||
CompilerSet=0
|
||||
CompilerSettings=0000000000000000000000
|
||||
|
||||
[Unit1]
|
||||
FileName=..\test\Audio_test.cpp
|
||||
CompileCpp=1
|
||||
Folder=Project1
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[VersionInfo]
|
||||
Major=0
|
||||
Minor=1
|
||||
Release=1
|
||||
Build=1
|
||||
LanguageID=1033
|
||||
CharsetID=1252
|
||||
CompanyName=
|
||||
FileVersion=
|
||||
FileDescription=Developed using the Dev-C++ IDE
|
||||
InternalName=
|
||||
LegalCopyright=
|
||||
LegalTrademarks=
|
||||
OriginalFilename=
|
||||
ProductName=
|
||||
ProductVersion=
|
||||
AutoIncBuildNr=0
|
||||
|
59
devcpp/ConfigFileTest.dev
Normal file
59
devcpp/ConfigFileTest.dev
Normal file
@ -0,0 +1,59 @@
|
||||
[Project]
|
||||
FileName=ConfigFileTest.dev
|
||||
Name=ConfigFileTest
|
||||
UnitCount=1
|
||||
Type=1
|
||||
Ver=1
|
||||
ObjFiles=
|
||||
Includes=../include
|
||||
Libs=../lib
|
||||
PrivateResource=
|
||||
ResourceIncludes=
|
||||
MakeIncludes=
|
||||
Compiler=
|
||||
CppCompiler=-Wall --pedantic
|
||||
Linker=-lphoton -lglfw -lfreetype -lopengl32 -lglu32 -lopenal32 -lphysfs -lcorona
|
||||
IsCpp=1
|
||||
Icon=
|
||||
ExeOutput=..\test
|
||||
ObjectOutput=
|
||||
OverrideOutput=0
|
||||
OverrideOutputName=ConfigFileTest.exe
|
||||
HostApplication=
|
||||
Folders=
|
||||
CommandLine=
|
||||
UseCustomMakefile=0
|
||||
CustomMakefile=
|
||||
IncludeVersionInfo=0
|
||||
SupportXPThemes=0
|
||||
CompilerSet=0
|
||||
CompilerSettings=0000000000000000000000
|
||||
|
||||
[Unit1]
|
||||
FileName=..\test\ConfigFile_test.cpp
|
||||
CompileCpp=1
|
||||
Folder=Project1
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[VersionInfo]
|
||||
Major=0
|
||||
Minor=1
|
||||
Release=1
|
||||
Build=1
|
||||
LanguageID=1033
|
||||
CharsetID=1252
|
||||
CompanyName=
|
||||
FileVersion=
|
||||
FileDescription=Developed using the Dev-C++ IDE
|
||||
InternalName=
|
||||
LegalCopyright=
|
||||
LegalTrademarks=
|
||||
OriginalFilename=
|
||||
ProductName=
|
||||
ProductVersion=
|
||||
AutoIncBuildNr=0
|
||||
|
59
devcpp/FontTest.dev
Normal file
59
devcpp/FontTest.dev
Normal file
@ -0,0 +1,59 @@
|
||||
[Project]
|
||||
FileName=FontTest.dev
|
||||
Name=FontTest
|
||||
UnitCount=1
|
||||
Type=1
|
||||
Ver=1
|
||||
ObjFiles=
|
||||
Includes=../include
|
||||
Libs=../lib
|
||||
PrivateResource=
|
||||
ResourceIncludes=
|
||||
MakeIncludes=
|
||||
Compiler=
|
||||
CppCompiler=-Wall --pedantic
|
||||
Linker=-lphoton -lglfw -lfreetype -lopengl32 -lglu32 -lopenal32 -lphysfs -lcorona
|
||||
IsCpp=1
|
||||
Icon=
|
||||
ExeOutput=..\test
|
||||
ObjectOutput=
|
||||
OverrideOutput=0
|
||||
OverrideOutputName=FontTest.exe
|
||||
HostApplication=
|
||||
Folders=
|
||||
CommandLine=
|
||||
UseCustomMakefile=0
|
||||
CustomMakefile=
|
||||
IncludeVersionInfo=0
|
||||
SupportXPThemes=0
|
||||
CompilerSet=0
|
||||
CompilerSettings=0000000000000000000000
|
||||
|
||||
[Unit1]
|
||||
FileName=..\test\Font_test.cpp
|
||||
CompileCpp=1
|
||||
Folder=Project1
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[VersionInfo]
|
||||
Major=0
|
||||
Minor=1
|
||||
Release=1
|
||||
Build=1
|
||||
LanguageID=1033
|
||||
CharsetID=1252
|
||||
CompanyName=
|
||||
FileVersion=
|
||||
FileDescription=Developed using the Dev-C++ IDE
|
||||
InternalName=
|
||||
LegalCopyright=
|
||||
LegalTrademarks=
|
||||
OriginalFilename=
|
||||
ProductName=
|
||||
ProductVersion=
|
||||
AutoIncBuildNr=0
|
||||
|
59
devcpp/ImageTest.dev
Normal file
59
devcpp/ImageTest.dev
Normal file
@ -0,0 +1,59 @@
|
||||
[Project]
|
||||
FileName=ImageTest.dev
|
||||
Name=ImageTest
|
||||
UnitCount=1
|
||||
Type=1
|
||||
Ver=1
|
||||
ObjFiles=
|
||||
Includes=../include
|
||||
Libs=../lib
|
||||
PrivateResource=
|
||||
ResourceIncludes=
|
||||
MakeIncludes=
|
||||
Compiler=
|
||||
CppCompiler=-Wall --pedantic
|
||||
Linker=-lphoton -lglfw -lfreetype -lopengl32 -lglu32 -lopenal32 -lphysfs -lcorona
|
||||
IsCpp=1
|
||||
Icon=
|
||||
ExeOutput=..\test
|
||||
ObjectOutput=
|
||||
OverrideOutput=0
|
||||
OverrideOutputName=ImageTest.exe
|
||||
HostApplication=
|
||||
Folders=
|
||||
CommandLine=
|
||||
UseCustomMakefile=0
|
||||
CustomMakefile=
|
||||
IncludeVersionInfo=0
|
||||
SupportXPThemes=0
|
||||
CompilerSet=0
|
||||
CompilerSettings=0000000000000000000000
|
||||
|
||||
[Unit1]
|
||||
FileName=..\test\Image_test.cpp
|
||||
CompileCpp=1
|
||||
Folder=Project1
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[VersionInfo]
|
||||
Major=0
|
||||
Minor=1
|
||||
Release=1
|
||||
Build=1
|
||||
LanguageID=1033
|
||||
CharsetID=1252
|
||||
CompanyName=
|
||||
FileVersion=
|
||||
FileDescription=Developed using the Dev-C++ IDE
|
||||
InternalName=
|
||||
LegalCopyright=
|
||||
LegalTrademarks=
|
||||
OriginalFilename=
|
||||
ProductName=
|
||||
ProductVersion=
|
||||
AutoIncBuildNr=0
|
||||
|
59
devcpp/InputTest.dev
Normal file
59
devcpp/InputTest.dev
Normal file
@ -0,0 +1,59 @@
|
||||
[Project]
|
||||
FileName=InputTest.dev
|
||||
Name=InputTest
|
||||
UnitCount=1
|
||||
Type=1
|
||||
Ver=1
|
||||
ObjFiles=
|
||||
Includes=../include
|
||||
Libs=../lib
|
||||
PrivateResource=
|
||||
ResourceIncludes=
|
||||
MakeIncludes=
|
||||
Compiler=
|
||||
CppCompiler=-Wall --pedantic
|
||||
Linker=-lphoton -lglfw -lfreetype -lopengl32 -lglu32 -lopenal32 -lphysfs -lcorona
|
||||
IsCpp=1
|
||||
Icon=
|
||||
ExeOutput=..\test
|
||||
ObjectOutput=
|
||||
OverrideOutput=0
|
||||
OverrideOutputName=InputTest.exe
|
||||
HostApplication=
|
||||
Folders=
|
||||
CommandLine=
|
||||
UseCustomMakefile=0
|
||||
CustomMakefile=
|
||||
IncludeVersionInfo=0
|
||||
SupportXPThemes=0
|
||||
CompilerSet=0
|
||||
CompilerSettings=0000000000000000000000
|
||||
|
||||
[Unit1]
|
||||
FileName=..\test\Input_test.cpp
|
||||
CompileCpp=1
|
||||
Folder=Project1
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[VersionInfo]
|
||||
Major=0
|
||||
Minor=1
|
||||
Release=1
|
||||
Build=1
|
||||
LanguageID=1033
|
||||
CharsetID=1252
|
||||
CompanyName=
|
||||
FileVersion=
|
||||
FileDescription=Developed using the Dev-C++ IDE
|
||||
InternalName=
|
||||
LegalCopyright=
|
||||
LegalTrademarks=
|
||||
OriginalFilename=
|
||||
ProductName=
|
||||
ProductVersion=
|
||||
AutoIncBuildNr=0
|
||||
|
59
devcpp/LogTest.dev
Normal file
59
devcpp/LogTest.dev
Normal file
@ -0,0 +1,59 @@
|
||||
[Project]
|
||||
FileName=LogTest.dev
|
||||
Name=LogTest
|
||||
UnitCount=1
|
||||
Type=1
|
||||
Ver=1
|
||||
ObjFiles=
|
||||
Includes=../include
|
||||
Libs=../lib
|
||||
PrivateResource=
|
||||
ResourceIncludes=
|
||||
MakeIncludes=
|
||||
Compiler=
|
||||
CppCompiler=-Wall --pedantic
|
||||
Linker=-lphoton -lglfw -lfreetype -lopengl32 -lglu32 -lopenal32 -lphysfs -lcorona
|
||||
IsCpp=1
|
||||
Icon=
|
||||
ExeOutput=..\test
|
||||
ObjectOutput=
|
||||
OverrideOutput=0
|
||||
OverrideOutputName=LogTest.exe
|
||||
HostApplication=
|
||||
Folders=
|
||||
CommandLine=
|
||||
UseCustomMakefile=0
|
||||
CustomMakefile=
|
||||
IncludeVersionInfo=0
|
||||
SupportXPThemes=0
|
||||
CompilerSet=0
|
||||
CompilerSettings=0000000000000000000000
|
||||
|
||||
[Unit1]
|
||||
FileName=..\test\Log_test.cpp
|
||||
CompileCpp=1
|
||||
Folder=Project1
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[VersionInfo]
|
||||
Major=0
|
||||
Minor=1
|
||||
Release=1
|
||||
Build=1
|
||||
LanguageID=1033
|
||||
CharsetID=1252
|
||||
CompanyName=
|
||||
FileVersion=
|
||||
FileDescription=Developed using the Dev-C++ IDE
|
||||
InternalName=
|
||||
LegalCopyright=
|
||||
LegalTrademarks=
|
||||
OriginalFilename=
|
||||
ProductName=
|
||||
ProductVersion=
|
||||
AutoIncBuildNr=0
|
||||
|
59
devcpp/PenTest.dev
Normal file
59
devcpp/PenTest.dev
Normal file
@ -0,0 +1,59 @@
|
||||
[Project]
|
||||
FileName=PenTest.dev
|
||||
Name=PenTest
|
||||
UnitCount=1
|
||||
Type=1
|
||||
Ver=1
|
||||
ObjFiles=
|
||||
Includes=../include
|
||||
Libs=../lib
|
||||
PrivateResource=
|
||||
ResourceIncludes=
|
||||
MakeIncludes=
|
||||
Compiler=
|
||||
CppCompiler=-Wall --pedantic
|
||||
Linker=-lphoton -lglfw -lfreetype -lopengl32 -lglu32 -lopenal32 -lphysfs -lcorona
|
||||
IsCpp=1
|
||||
Icon=
|
||||
ExeOutput=..\test
|
||||
ObjectOutput=
|
||||
OverrideOutput=0
|
||||
OverrideOutputName=PenTest.exe
|
||||
HostApplication=
|
||||
Folders=
|
||||
CommandLine=
|
||||
UseCustomMakefile=0
|
||||
CustomMakefile=
|
||||
IncludeVersionInfo=0
|
||||
SupportXPThemes=0
|
||||
CompilerSet=0
|
||||
CompilerSettings=0000000000000000000000
|
||||
|
||||
[Unit1]
|
||||
FileName=..\test\Pen_test.cpp
|
||||
CompileCpp=1
|
||||
Folder=Project1
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[VersionInfo]
|
||||
Major=0
|
||||
Minor=1
|
||||
Release=1
|
||||
Build=1
|
||||
LanguageID=1033
|
||||
CharsetID=1252
|
||||
CompanyName=
|
||||
FileVersion=
|
||||
FileDescription=Developed using the Dev-C++ IDE
|
||||
InternalName=
|
||||
LegalCopyright=
|
||||
LegalTrademarks=
|
||||
OriginalFilename=
|
||||
ProductName=
|
||||
ProductVersion=
|
||||
AutoIncBuildNr=0
|
||||
|
3
devcpp/README-DEVCPP.txt
Normal file
3
devcpp/README-DEVCPP.txt
Normal file
@ -0,0 +1,3 @@
|
||||
If you are attempting to compile via Dev-C++ without OpenAL you must open both
|
||||
photon.dev and AudioTest.dev and within the Parameters tab of the Project
|
||||
Options dialog (Alt+P) remove -DPHOTON_USE_OPENAL from the C++ compiler box.
|
59
devcpp/RandGenTest.dev
Normal file
59
devcpp/RandGenTest.dev
Normal file
@ -0,0 +1,59 @@
|
||||
[Project]
|
||||
FileName=RandGenTest.dev
|
||||
Name=RandGenTest
|
||||
UnitCount=1
|
||||
Type=1
|
||||
Ver=1
|
||||
ObjFiles=
|
||||
Includes=../include
|
||||
Libs=../lib
|
||||
PrivateResource=
|
||||
ResourceIncludes=
|
||||
MakeIncludes=
|
||||
Compiler=
|
||||
CppCompiler=-Wall --pedantic
|
||||
Linker=-lphoton -lglfw -lfreetype -lopengl32 -lglu32 -lopenal32 -lphysfs -lcorona
|
||||
IsCpp=1
|
||||
Icon=
|
||||
ExeOutput=..\test
|
||||
ObjectOutput=
|
||||
OverrideOutput=0
|
||||
OverrideOutputName=RandGenTest.exe
|
||||
HostApplication=
|
||||
Folders=
|
||||
CommandLine=
|
||||
UseCustomMakefile=0
|
||||
CustomMakefile=
|
||||
IncludeVersionInfo=0
|
||||
SupportXPThemes=0
|
||||
CompilerSet=0
|
||||
CompilerSettings=0000000000000000000000
|
||||
|
||||
[Unit1]
|
||||
FileName=..\test\RandGen_test.cpp
|
||||
CompileCpp=1
|
||||
Folder=Project1
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[VersionInfo]
|
||||
Major=0
|
||||
Minor=1
|
||||
Release=1
|
||||
Build=1
|
||||
LanguageID=1033
|
||||
CharsetID=1252
|
||||
CompanyName=
|
||||
FileVersion=
|
||||
FileDescription=Developed using the Dev-C++ IDE
|
||||
InternalName=
|
||||
LegalCopyright=
|
||||
LegalTrademarks=
|
||||
OriginalFilename=
|
||||
ProductName=
|
||||
ProductVersion=
|
||||
AutoIncBuildNr=0
|
||||
|
59
devcpp/StateTest.dev
Normal file
59
devcpp/StateTest.dev
Normal file
@ -0,0 +1,59 @@
|
||||
[Project]
|
||||
FileName=StateTest.dev
|
||||
Name=StateTest
|
||||
UnitCount=1
|
||||
Type=1
|
||||
Ver=1
|
||||
ObjFiles=
|
||||
Includes=../include
|
||||
Libs=../lib
|
||||
PrivateResource=
|
||||
ResourceIncludes=
|
||||
MakeIncludes=
|
||||
Compiler=
|
||||
CppCompiler=-Wall --pedantic
|
||||
Linker=-lphoton -lglfw -lfreetype -lopengl32 -lglu32 -lopenal32 -lphysfs -lcorona
|
||||
IsCpp=1
|
||||
Icon=
|
||||
ExeOutput=..\test
|
||||
ObjectOutput=
|
||||
OverrideOutput=0
|
||||
OverrideOutputName=StateTest.exe
|
||||
HostApplication=
|
||||
Folders=
|
||||
CommandLine=
|
||||
UseCustomMakefile=0
|
||||
CustomMakefile=
|
||||
IncludeVersionInfo=0
|
||||
SupportXPThemes=0
|
||||
CompilerSet=0
|
||||
CompilerSettings=0000000000000000000000
|
||||
|
||||
[Unit1]
|
||||
FileName=..\test\State_test.cpp
|
||||
CompileCpp=1
|
||||
Folder=Project1
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[VersionInfo]
|
||||
Major=0
|
||||
Minor=1
|
||||
Release=1
|
||||
Build=1
|
||||
LanguageID=1033
|
||||
CharsetID=1252
|
||||
CompanyName=
|
||||
FileVersion=
|
||||
FileDescription=Developed using the Dev-C++ IDE
|
||||
InternalName=
|
||||
LegalCopyright=
|
||||
LegalTrademarks=
|
||||
OriginalFilename=
|
||||
ProductName=
|
||||
ProductVersion=
|
||||
AutoIncBuildNr=0
|
||||
|
59
devcpp/TextureTest.dev
Normal file
59
devcpp/TextureTest.dev
Normal file
@ -0,0 +1,59 @@
|
||||
[Project]
|
||||
FileName=TextureTest.dev
|
||||
Name=TextureTest
|
||||
UnitCount=1
|
||||
Type=1
|
||||
Ver=1
|
||||
ObjFiles=
|
||||
Includes=../include
|
||||
Libs=../lib
|
||||
PrivateResource=
|
||||
ResourceIncludes=
|
||||
MakeIncludes=
|
||||
Compiler=
|
||||
CppCompiler=-Wall --pedantic
|
||||
Linker=-lphoton -lglfw -lfreetype -lopengl32 -lglu32 -lopenal32 -lphysfs -lcorona
|
||||
IsCpp=1
|
||||
Icon=
|
||||
ExeOutput=..\test
|
||||
ObjectOutput=
|
||||
OverrideOutput=0
|
||||
OverrideOutputName=TextureTest.exe
|
||||
HostApplication=
|
||||
Folders=
|
||||
CommandLine=
|
||||
UseCustomMakefile=0
|
||||
CustomMakefile=
|
||||
IncludeVersionInfo=0
|
||||
SupportXPThemes=0
|
||||
CompilerSet=0
|
||||
CompilerSettings=0000000000000000000000
|
||||
|
||||
[Unit1]
|
||||
FileName=..\test\Texture_test.cpp
|
||||
CompileCpp=1
|
||||
Folder=Project1
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[VersionInfo]
|
||||
Major=0
|
||||
Minor=1
|
||||
Release=1
|
||||
Build=1
|
||||
LanguageID=1033
|
||||
CharsetID=1252
|
||||
CompanyName=
|
||||
FileVersion=
|
||||
FileDescription=Developed using the Dev-C++ IDE
|
||||
InternalName=
|
||||
LegalCopyright=
|
||||
LegalTrademarks=
|
||||
OriginalFilename=
|
||||
ProductName=
|
||||
ProductVersion=
|
||||
AutoIncBuildNr=0
|
||||
|
59
devcpp/filesysTest.dev
Normal file
59
devcpp/filesysTest.dev
Normal file
@ -0,0 +1,59 @@
|
||||
[Project]
|
||||
FileName=filesysTest.dev
|
||||
Name=filesysTest
|
||||
UnitCount=1
|
||||
Type=1
|
||||
Ver=1
|
||||
ObjFiles=
|
||||
Includes=../include
|
||||
Libs=../lib
|
||||
PrivateResource=
|
||||
ResourceIncludes=
|
||||
MakeIncludes=
|
||||
Compiler=
|
||||
CppCompiler=-Wall --pedantic
|
||||
Linker=-lphoton -lglfw -lfreetype -lopengl32 -lglu32 -lopenal32 -lphysfs -lcorona
|
||||
IsCpp=1
|
||||
Icon=
|
||||
ExeOutput=..\test
|
||||
ObjectOutput=
|
||||
OverrideOutput=0
|
||||
OverrideOutputName=filesysTest.exe
|
||||
HostApplication=
|
||||
Folders=
|
||||
CommandLine=
|
||||
UseCustomMakefile=0
|
||||
CustomMakefile=
|
||||
IncludeVersionInfo=0
|
||||
SupportXPThemes=0
|
||||
CompilerSet=0
|
||||
CompilerSettings=0000000000000000000000
|
||||
|
||||
[Unit1]
|
||||
FileName=..\test\filesys_test.cpp
|
||||
CompileCpp=1
|
||||
Folder=Project1
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[VersionInfo]
|
||||
Major=0
|
||||
Minor=1
|
||||
Release=1
|
||||
Build=1
|
||||
LanguageID=1033
|
||||
CharsetID=1252
|
||||
CompanyName=
|
||||
FileVersion=
|
||||
FileDescription=Developed using the Dev-C++ IDE
|
||||
InternalName=
|
||||
LegalCopyright=
|
||||
LegalTrademarks=
|
||||
OriginalFilename=
|
||||
ProductName=
|
||||
ProductVersion=
|
||||
AutoIncBuildNr=0
|
||||
|
59
devcpp/mathTest.dev
Normal file
59
devcpp/mathTest.dev
Normal file
@ -0,0 +1,59 @@
|
||||
[Project]
|
||||
FileName=mathTest.dev
|
||||
Name=mathTest
|
||||
UnitCount=1
|
||||
Type=1
|
||||
Ver=1
|
||||
ObjFiles=
|
||||
Includes=../include
|
||||
Libs=../lib
|
||||
PrivateResource=
|
||||
ResourceIncludes=
|
||||
MakeIncludes=
|
||||
Compiler=
|
||||
CppCompiler=-Wall --pedantic
|
||||
Linker=-lphoton -lglfw -lfreetype -lopengl32 -lglu32 -lopenal32 -lphysfs -lcorona
|
||||
IsCpp=1
|
||||
Icon=
|
||||
ExeOutput=..\test
|
||||
ObjectOutput=
|
||||
OverrideOutput=0
|
||||
OverrideOutputName=mathTest.exe
|
||||
HostApplication=
|
||||
Folders=
|
||||
CommandLine=
|
||||
UseCustomMakefile=0
|
||||
CustomMakefile=
|
||||
IncludeVersionInfo=0
|
||||
SupportXPThemes=0
|
||||
CompilerSet=0
|
||||
CompilerSettings=0000000000000000000000
|
||||
|
||||
[Unit1]
|
||||
FileName=..\test\math_test.cpp
|
||||
CompileCpp=1
|
||||
Folder=Project1
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[VersionInfo]
|
||||
Major=0
|
||||
Minor=1
|
||||
Release=1
|
||||
Build=1
|
||||
LanguageID=1033
|
||||
CharsetID=1252
|
||||
CompanyName=
|
||||
FileVersion=
|
||||
FileDescription=Developed using the Dev-C++ IDE
|
||||
InternalName=
|
||||
LegalCopyright=
|
||||
LegalTrademarks=
|
||||
OriginalFilename=
|
||||
ProductName=
|
||||
ProductVersion=
|
||||
AutoIncBuildNr=0
|
||||
|
@ -1,17 +1,17 @@
|
||||
[Project]
|
||||
FileName=photon.dev
|
||||
Name=photon
|
||||
UnitCount=20
|
||||
UnitCount=59
|
||||
Type=2
|
||||
Ver=1
|
||||
ObjFiles=
|
||||
Includes=../include;../external/include
|
||||
Libs=../external/lib
|
||||
Includes=../include;
|
||||
Libs=
|
||||
PrivateResource=
|
||||
ResourceIncludes=
|
||||
MakeIncludes=
|
||||
Compiler=
|
||||
CppCompiler=
|
||||
CppCompiler=-DPHOTON_USE_OPENAL -Wall --pedantic
|
||||
Linker=
|
||||
IsCpp=1
|
||||
Icon=
|
||||
@ -20,7 +20,7 @@ ObjectOutput=..\devcpp
|
||||
OverrideOutput=1
|
||||
OverrideOutputName=libphoton.a
|
||||
HostApplication=
|
||||
Folders=include,include/util,src,src/util
|
||||
Folders=include,include/audio,include/math,include/util,include/video,src,src/audio,src/math,src/util,src/video
|
||||
CommandLine=
|
||||
UseCustomMakefile=0
|
||||
CustomMakefile=
|
||||
@ -28,118 +28,6 @@ IncludeVersionInfo=0
|
||||
SupportXPThemes=0
|
||||
CompilerSet=0
|
||||
CompilerSettings=0000001000000000000000
|
||||
|
||||
[Unit1]
|
||||
FileName=..\include\types.hpp
|
||||
CompileCpp=1
|
||||
Folder=include
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[Unit2]
|
||||
FileName=..\include\Log.hpp
|
||||
CompileCpp=1
|
||||
Folder=include
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[Unit3]
|
||||
FileName=..\include\LogSink.hpp
|
||||
CompileCpp=1
|
||||
Folder=include
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[Unit4]
|
||||
FileName=..\include\util\ConfigFile.hpp
|
||||
CompileCpp=1
|
||||
Folder=include/util
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[Unit5]
|
||||
FileName=..\include\util\RandGen.hpp
|
||||
CompileCpp=1
|
||||
Folder=include/util
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[Unit6]
|
||||
FileName=..\include\util\VersionInfo.hpp
|
||||
CompileCpp=1
|
||||
Folder=include/util
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[Unit8]
|
||||
FileName=..\src\LogSink.cpp
|
||||
CompileCpp=1
|
||||
Folder=src
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[Unit9]
|
||||
FileName=..\src\util\ConfigFile.cpp
|
||||
CompileCpp=1
|
||||
Folder=src/util
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[Unit10]
|
||||
FileName=..\src\util\RandGen.cpp
|
||||
CompileCpp=1
|
||||
Folder=src/util
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[Unit11]
|
||||
FileName=..\src\util\VersionInfo.cpp
|
||||
CompileCpp=1
|
||||
Folder=src/util
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[Unit13]
|
||||
FileName=..\include\exceptions.hpp
|
||||
CompileCpp=1
|
||||
Folder=include
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[VersionInfo]
|
||||
Major=0
|
||||
Minor=0
|
||||
Release=1
|
||||
@ -157,67 +45,7 @@ ProductName=
|
||||
ProductVersion=
|
||||
AutoIncBuildNr=0
|
||||
|
||||
[Unit14]
|
||||
FileName=..\include\util\FileBuffer.hpp
|
||||
CompileCpp=1
|
||||
Folder=include/util
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[Unit15]
|
||||
FileName=..\src\util\FileBuffer.cpp
|
||||
CompileCpp=1
|
||||
Folder=src/util
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[Unit7]
|
||||
FileName=..\src\Log.cpp
|
||||
CompileCpp=1
|
||||
Folder=src
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[Unit12]
|
||||
FileName=..\src\exceptions.cpp
|
||||
CompileCpp=1
|
||||
Folder=src
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[Unit17]
|
||||
FileName=..\include\util\filesys\filesys.hpp
|
||||
CompileCpp=1
|
||||
Folder=include/util
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[Unit16]
|
||||
FileName=..\src\util\filesys\filesys.cpp
|
||||
CompileCpp=1
|
||||
Folder=src/util
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[Unit18]
|
||||
[Unit1]
|
||||
FileName=..\include\Application.hpp
|
||||
CompileCpp=1
|
||||
Folder=include
|
||||
@ -227,17 +55,7 @@ Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[Unit19]
|
||||
FileName=..\src\Application.cpp
|
||||
CompileCpp=1
|
||||
Folder=src
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[Unit20]
|
||||
[Unit2]
|
||||
FileName=..\include\entrypoint.hpp
|
||||
CompileCpp=1
|
||||
Folder=include
|
||||
@ -247,3 +65,631 @@ Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[Unit3]
|
||||
FileName=..\include\exceptions.hpp
|
||||
CompileCpp=1
|
||||
Folder=include
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[Unit4]
|
||||
FileName=..\include\Log.hpp
|
||||
CompileCpp=1
|
||||
Folder=include
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[Unit5]
|
||||
FileName=..\include\LogSink.hpp
|
||||
CompileCpp=1
|
||||
Folder=include
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[Unit6]
|
||||
FileName=..\include\photon.hpp
|
||||
CompileCpp=1
|
||||
Folder=include
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[Unit7]
|
||||
FileName=..\include\ResourceManaged.hpp
|
||||
CompileCpp=1
|
||||
Folder=include
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[Unit8]
|
||||
FileName=..\include\ResourceManager.hpp
|
||||
CompileCpp=1
|
||||
Folder=include
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[Unit9]
|
||||
FileName=..\include\State.hpp
|
||||
CompileCpp=1
|
||||
Folder=include
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[Unit10]
|
||||
FileName=..\include\types.hpp
|
||||
CompileCpp=1
|
||||
Folder=include
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[Unit11]
|
||||
FileName=..\include\audio\AudioCore.hpp
|
||||
CompileCpp=1
|
||||
Folder=include/audio
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[Unit12]
|
||||
FileName=..\include\audio\SampleResourceManager.hpp
|
||||
CompileCpp=1
|
||||
Folder=include/audio
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[Unit13]
|
||||
FileName=..\include\audio\Source.hpp
|
||||
CompileCpp=1
|
||||
Folder=include/audio
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[Unit14]
|
||||
FileName=..\include\math\Vector2.hpp
|
||||
CompileCpp=1
|
||||
Folder=include/math
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[Unit15]
|
||||
FileName=..\include\math\Circle.hpp
|
||||
CompileCpp=1
|
||||
Folder=include/math
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[Unit16]
|
||||
FileName=..\include\math\math.hpp
|
||||
CompileCpp=1
|
||||
Folder=include/math
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[Unit17]
|
||||
FileName=..\include\math\Rect.hpp
|
||||
CompileCpp=1
|
||||
Folder=include/math
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[Unit18]
|
||||
FileName=..\include\util\VersionInfo.hpp
|
||||
CompileCpp=1
|
||||
Folder=include/util
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[Unit19]
|
||||
FileName=..\include\util\ConfigFile.hpp
|
||||
CompileCpp=1
|
||||
Folder=include/util
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[Unit20]
|
||||
FileName=..\include\util\FileBuffer.hpp
|
||||
CompileCpp=1
|
||||
Folder=include/util
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[Unit21]
|
||||
FileName=..\include\util\RandGen.hpp
|
||||
CompileCpp=1
|
||||
Folder=include/util
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[Unit22]
|
||||
FileName=..\include\util\Singleton.hpp
|
||||
CompileCpp=1
|
||||
Folder=include/util
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[Unit23]
|
||||
FileName=..\include\util\Timer.hpp
|
||||
CompileCpp=1
|
||||
Folder=include/util
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[Unit24]
|
||||
FileName=..\include\util\filesys\filesys.hpp
|
||||
CompileCpp=1
|
||||
Folder=include/util
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[Unit25]
|
||||
FileName=..\include\video\Color.hpp
|
||||
CompileCpp=1
|
||||
Folder=include/video
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[Unit26]
|
||||
FileName=..\include\video\Font.hpp
|
||||
CompileCpp=1
|
||||
Folder=include/video
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[Unit27]
|
||||
FileName=..\include\video\FontResourceManager.hpp
|
||||
CompileCpp=1
|
||||
Folder=include/video
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[Unit28]
|
||||
FileName=..\include\video\Image.hpp
|
||||
CompileCpp=1
|
||||
Folder=include/video
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[Unit29]
|
||||
FileName=..\include\video\Pen.hpp
|
||||
CompileCpp=1
|
||||
Folder=include/video
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[Unit30]
|
||||
FileName=..\include\video\Texture.hpp
|
||||
CompileCpp=1
|
||||
Folder=include/video
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[Unit31]
|
||||
FileName=..\include\video\TextureResourceManager.hpp
|
||||
CompileCpp=1
|
||||
Folder=include/video
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[Unit32]
|
||||
FileName=..\src\Application.cpp
|
||||
CompileCpp=1
|
||||
Folder=src
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[Unit33]
|
||||
FileName=..\src\entrypoint.cpp
|
||||
CompileCpp=1
|
||||
Folder=src
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[Unit34]
|
||||
FileName=..\src\exceptions.cpp
|
||||
CompileCpp=1
|
||||
Folder=src
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[Unit35]
|
||||
FileName=..\src\Log.cpp
|
||||
CompileCpp=1
|
||||
Folder=src
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[Unit36]
|
||||
FileName=..\src\LogSink.cpp
|
||||
CompileCpp=1
|
||||
Folder=src
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[Unit37]
|
||||
FileName=..\src\audio\AudioCore.cpp
|
||||
CompileCpp=1
|
||||
Folder=src/audio
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[Unit38]
|
||||
FileName=..\src\audio\SampleResourceManager.cpp
|
||||
CompileCpp=1
|
||||
Folder=src/audio
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[Unit39]
|
||||
FileName=..\src\math\Circle.cpp
|
||||
CompileCpp=1
|
||||
Folder=src/math
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[Unit40]
|
||||
FileName=..\src\math\math.cpp
|
||||
CompileCpp=1
|
||||
Folder=src/math
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[Unit41]
|
||||
FileName=..\src\math\Rect.cpp
|
||||
CompileCpp=1
|
||||
Folder=src/math
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[Unit42]
|
||||
FileName=..\src\math\Vector2.cpp
|
||||
CompileCpp=1
|
||||
Folder=src/math
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[Unit43]
|
||||
FileName=..\src\util\ConfigFile.cpp
|
||||
CompileCpp=1
|
||||
Folder=src/util
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[Unit44]
|
||||
FileName=..\src\util\FileBuffer.cpp
|
||||
CompileCpp=1
|
||||
Folder=src/util
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[Unit45]
|
||||
FileName=..\src\util\RandGen.cpp
|
||||
CompileCpp=1
|
||||
Folder=src/util
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[Unit46]
|
||||
FileName=..\src\util\Timer.cpp
|
||||
CompileCpp=1
|
||||
Folder=src/util
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[Unit47]
|
||||
FileName=..\src\util\VersionInfo.cpp
|
||||
CompileCpp=1
|
||||
Folder=src/util
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[Unit48]
|
||||
FileName=..\src\util\filesys\filesys.cpp
|
||||
CompileCpp=1
|
||||
Folder=src/util
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[Unit49]
|
||||
FileName=..\src\video\Color.cpp
|
||||
CompileCpp=1
|
||||
Folder=src/video
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[Unit50]
|
||||
FileName=..\src\video\Font.cpp
|
||||
CompileCpp=1
|
||||
Folder=src/video
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[Unit51]
|
||||
FileName=..\src\video\FontResourceManager.cpp
|
||||
CompileCpp=1
|
||||
Folder=src/video
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[Unit52]
|
||||
FileName=..\src\video\Image.cpp
|
||||
CompileCpp=1
|
||||
Folder=src/video
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[Unit53]
|
||||
FileName=..\src\video\Pen.cpp
|
||||
CompileCpp=1
|
||||
Folder=src/video
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[Unit54]
|
||||
FileName=..\src\video\Texture.cpp
|
||||
CompileCpp=1
|
||||
Folder=src/video
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[Unit55]
|
||||
FileName=..\src\video\TextureResourceManager.cpp
|
||||
CompileCpp=1
|
||||
Folder=src/video
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[Unit56]
|
||||
FileName=..\include\util\TaskManager.hpp
|
||||
CompileCpp=1
|
||||
Folder=include/util
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[Unit57]
|
||||
FileName=..\include\util\Task.hpp
|
||||
CompileCpp=1
|
||||
Folder=include/util
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[Unit58]
|
||||
FileName=..\src\util\Task.cpp
|
||||
CompileCpp=1
|
||||
Folder=src/util
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[Unit59]
|
||||
FileName=..\src\util\TaskManager.cpp
|
||||
CompileCpp=1
|
||||
Folder=src/util
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[Unit60]
|
||||
FileName=..\src\video\TextureResourceManager.cpp
|
||||
CompileCpp=1
|
||||
Folder=src/video
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[Unit61]
|
||||
FileName=..\src\video\VideoCore.cpp
|
||||
CompileCpp=1
|
||||
Folder=src/video
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[Unit62]
|
||||
FileName=..\src\video\TextureResourceManager.cpp
|
||||
CompileCpp=1
|
||||
Folder=src/video
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[Unit63]
|
||||
FileName=..\src\video\VideoCore.cpp
|
||||
CompileCpp=1
|
||||
Folder=src/video
|
||||
Compile=1
|
||||
Link=1
|
||||
Priority=1000
|
||||
OverrideBuildCmd=0
|
||||
BuildCmd=
|
||||
|
||||
[VersionInfo]
|
||||
Major=0
|
||||
Minor=1
|
||||
Release=1
|
||||
Build=1
|
||||
LanguageID=1033
|
||||
CharsetID=1252
|
||||
CompanyName=
|
||||
FileVersion=0.1
|
||||
FileDescription=Developed using the Dev-C++ IDE
|
||||
InternalName=
|
||||
LegalCopyright=
|
||||
LegalTrademarks=
|
||||
OriginalFilename=libphoton.a
|
||||
ProductName=photon
|
||||
ProductVersion=0.1
|
||||
AutoIncBuildNr=0
|
||||
|
||||
|
@ -3,3 +3,5 @@ javascript
|
||||
index.html
|
||||
index
|
||||
files
|
||||
files2
|
||||
files3
|
||||
|
@ -5,13 +5,14 @@
|
||||
// James Turk (jpt2433@rit.edu)
|
||||
//
|
||||
// Version:
|
||||
// $Id: Application.hpp,v 1.16 2005/08/08 21:39:41 cozman Exp $
|
||||
// $Id: Application.hpp,v 1.24 2005/11/15 02:59:08 cozman Exp $
|
||||
|
||||
#ifndef PHOTON_APPLICATION_HPP
|
||||
#define PHOTON_APPLICATION_HPP
|
||||
|
||||
#include <vector>
|
||||
#include <map>
|
||||
#include <stack>
|
||||
#include <valarray>
|
||||
#include <string>
|
||||
|
||||
#include <boost/utility.hpp>
|
||||
@ -19,22 +20,19 @@
|
||||
#include "types.hpp"
|
||||
#include "util/VersionInfo.hpp"
|
||||
#include "State.hpp"
|
||||
#include "Task.hpp"
|
||||
#include "Kernel.hpp"
|
||||
#include "InputListener.hpp"
|
||||
#include "util/TaskManager.hpp"
|
||||
#include "audio/AudioCore.hpp"
|
||||
#include "util/Singleton.hpp"
|
||||
|
||||
#include <vector>
|
||||
|
||||
namespace photon
|
||||
{
|
||||
|
||||
// Class: Application
|
||||
// Photon main class, contains functions that control creation of the display,
|
||||
// setting the OpenGL view, input handling, timing, and <State> management.
|
||||
// Application main class, contains functions that control creation of the
|
||||
// display, setting the OpenGL view, input handling, timing, and <State>
|
||||
// management.
|
||||
//
|
||||
// Class is a <Singleton> and therefore should be accessed through
|
||||
// Application is a <Singleton> and therefore should be accessed through
|
||||
// Application::getInstance(). (Application Singleton is created/destroyed
|
||||
// automatically)
|
||||
class Application : public util::Singleton<Application>
|
||||
@ -50,10 +48,53 @@ public:
|
||||
// Default destructor, shuts down dependencies.
|
||||
virtual ~Application();
|
||||
|
||||
// Group: General
|
||||
public:
|
||||
// Function: run
|
||||
// Runs application until a quit is requested either via the operating
|
||||
// system (ex Alt-F4) or through a call to <quit>.
|
||||
//
|
||||
// Throws:
|
||||
// <PreconditionException> if called before a <State> has been set
|
||||
// and a display has been created via <createDisplay>.
|
||||
void run();
|
||||
|
||||
// called internally by run while !quit()
|
||||
void update();
|
||||
|
||||
// Function: quit
|
||||
// Sets quit flag, terminating application.
|
||||
void quit();
|
||||
|
||||
// Function: getUpdateTaskManager
|
||||
// Access the application's update <TaskManager>, <Tasks> registered with
|
||||
// this TaskManager are executed after the current <State::update>.
|
||||
//
|
||||
// Returns:
|
||||
// Reference to "Update <TaskManager>"
|
||||
util::TaskManager& getUpdateTaskManager();
|
||||
|
||||
// Function: getRenderTaskManager
|
||||
// Access the application's render <TaskManager>, <Tasks> registered with
|
||||
// this TaskManager are executed after the current <State::render>.
|
||||
//
|
||||
// Returns:
|
||||
// Reference to "Render <TaskManager>"
|
||||
util::TaskManager& getRenderTaskManager();
|
||||
|
||||
// Function: isActive
|
||||
// Checks if application is active, which on most systems simply means it
|
||||
// has focus.
|
||||
//
|
||||
// Returns:
|
||||
// True if application is active, false otherwise.
|
||||
bool isActive();
|
||||
|
||||
// Group: Window
|
||||
public:
|
||||
// Function: createDisplay
|
||||
// This function attempts to create a display with the given parameters.
|
||||
// Takes arguments for R,G,B,A values separately, generally not needed.
|
||||
//
|
||||
// Parameters:
|
||||
// width - desired width of display
|
||||
@ -64,15 +105,18 @@ public:
|
||||
// alphaBits - desired bits per pixel for alpha value
|
||||
// depthBits - desired bitdepth of depth buffer
|
||||
// stencilBits - desired bitdepth of stencil buffer
|
||||
// fullscreen - true: fullscreen, false: windowed
|
||||
// fullscreen - <DisplayMode>, DISP_FULLSCREEN or DISP_WINDOWED
|
||||
// [title - title of application, optional]
|
||||
void createDisplay(uint width, uint height,
|
||||
uint redBits, uint greenBits, uint blueBits,
|
||||
uint alphaBits, uint depthBits, uint stencilBits,
|
||||
bool fullscreen, const std::string& title="Photon App");
|
||||
DisplayMode mode,
|
||||
const std::string& title="Photon App");
|
||||
|
||||
// Function: createDisplay
|
||||
// This function attempts to create a display with the given parameters.
|
||||
// Takes one consolidated bpp value, which is generally preferred over
|
||||
// separate R,G,B,A values.
|
||||
//
|
||||
// Parameters:
|
||||
// width - desired width of display
|
||||
@ -80,10 +124,10 @@ public:
|
||||
// bpp - desired bits per pixel (aka bitdepth) of display
|
||||
// depthBits - desired bitdepth of depth buffer
|
||||
// stencilBits - desired bitdepth of stencil buffer
|
||||
// fullscreen - true: fullscreen, false: windowed
|
||||
// fullscreen - <DisplayMode>, DISP_FULLSCREEN or DISP_WINDOWED
|
||||
// [title - title of application, optional]
|
||||
void createDisplay(uint width, uint height, uint bpp,
|
||||
uint depthBits, uint stencilBits, bool fullscreen,
|
||||
uint depthBits, uint stencilBits, DisplayMode mode,
|
||||
const std::string& title="Photon App");
|
||||
|
||||
// Function: setTitle
|
||||
@ -107,14 +151,6 @@ public:
|
||||
// Height of display in pixels.
|
||||
uint getDisplayHeight();
|
||||
|
||||
// Function: isActive
|
||||
// Checks if application is active, which on most systems simply means it
|
||||
// has focus.
|
||||
//
|
||||
// Returns:
|
||||
// True if application is active, false otherwise.
|
||||
bool isActive();
|
||||
|
||||
// Group: Ortho
|
||||
public:
|
||||
// Function: setOrthoView
|
||||
@ -150,6 +186,8 @@ public:
|
||||
// Creates a viewport with a given 3D perspective inside of a rectangular
|
||||
// portion of the screen.
|
||||
//
|
||||
// Note that <setDepthBufferParams> (true) will be called as a side effect.
|
||||
//
|
||||
// Parameters:
|
||||
// x - X coord for top left corner of new viewport.
|
||||
// y - Y coord for top left corner of new viewport.
|
||||
@ -164,6 +202,8 @@ public:
|
||||
// Function: setPerspectiveView
|
||||
// Sets entire screen as current viewport with a given 3D perspective.
|
||||
//
|
||||
// Note that <setDepthBufferParams> (true) will be called as a side effect.
|
||||
//
|
||||
// Parameters:
|
||||
// fovy - The y axis field of view angle, in degrees.
|
||||
// zNear - Distance from viewer to near clipping plane.
|
||||
@ -189,12 +229,23 @@ public:
|
||||
// Function: setPerspectiveProjection
|
||||
// Sets a perspective projection matrix.
|
||||
//
|
||||
// Note that <setDepthTestMode>(true) will be called as a side effect.
|
||||
//
|
||||
// Parameters:
|
||||
// fovy - The y axis field of view angle, in degrees.
|
||||
// zNear - Distance from viewer to near clipping plane.
|
||||
// zFar - Distance from viewer to far clipping plane.
|
||||
void setPerspectiveProjection(scalar fovy, scalar zNear, scalar zFar);
|
||||
|
||||
// Function: setDepthBufferParams
|
||||
// Toggle depth testing and clearing of depth buffer.
|
||||
//
|
||||
// Parameters:
|
||||
// enable - if true, testing/clearing depth buffer is enabled, if false
|
||||
// testing and clearing of depth buffer will be disabled.
|
||||
// depth - optional clear depth amount, clamped [0..1], default is 1
|
||||
void setDepthBufferParams(bool enable, scalar depth=1);
|
||||
|
||||
// Group: Input
|
||||
public:
|
||||
// Function: keyPressed
|
||||
@ -246,29 +297,6 @@ public:
|
||||
// Mouse wheel position, zero assumed to be starting position.
|
||||
int getMouseWheelPos();
|
||||
|
||||
// Group: Input Listeners
|
||||
public:
|
||||
// Function: addInputListener
|
||||
// Registers an <InputListener> to listen for any input events so that it
|
||||
// is notified when they occur.
|
||||
//
|
||||
// Parameters:
|
||||
// listener - Pointer to <InputListener> to add.
|
||||
static void addInputListener(InputListener *listener);
|
||||
|
||||
// Function: removeInputListener
|
||||
// Removes an <InputListener> from the list of active listeners.
|
||||
//
|
||||
// Parameters:
|
||||
// listener - Pointer to <InputListener> to remove.
|
||||
static void removeInputListener(InputListener *listener);
|
||||
|
||||
static void GLFWCALL keyCallback(int key, int action);
|
||||
//static void GLFWCALL charCallback(int character, int action);
|
||||
static void GLFWCALL mouseButtonCallback(int button, int action);
|
||||
static void GLFWCALL mouseMoveCallback(int x, int y);
|
||||
//static void GLFWCALL mouseWheelCallback(int pos);
|
||||
|
||||
// Group: Timing
|
||||
public:
|
||||
|
||||
@ -280,30 +308,65 @@ public:
|
||||
// been running.
|
||||
scalar getTime();
|
||||
|
||||
// Function: setFrameTimeSmoothing
|
||||
// Sets number of frames used to smooth the timeDelta so that minor jitters
|
||||
// in frramerate do not cause severe stuttering.
|
||||
//
|
||||
// Parameters:
|
||||
// numFrames - Number of frames to average, setting to <= 1 turns off
|
||||
// smoothing of timeDelta. (Recommend something >= 50, <= 500)
|
||||
void setFrameTimeSmoothing(int numFrames);
|
||||
|
||||
// Function: getElapsedTime
|
||||
// Finds the amount of time passed between frames, useful for time-based
|
||||
// movement.
|
||||
// Finds the amount of time passed between frames, or average of a number
|
||||
// of frames if <setFrameTimeSmoothing> has been called.
|
||||
//
|
||||
// Returns:
|
||||
// Time between current frame and last frame. (1/<getFramerate>())
|
||||
// Time (or average time) between frames.
|
||||
double getElapsedTime();
|
||||
|
||||
// Function: getFramerate
|
||||
// Gets number of frames per second the application is currently processing
|
||||
// subject to smoothing by <setFrameTimeSmoothing>.
|
||||
//
|
||||
// Returns:
|
||||
// Current frames per second.
|
||||
// Calculated number of frames per second.
|
||||
double getFramerate();
|
||||
|
||||
// Function: setFixedUpdateStep
|
||||
// Sets a fixed timestep to be used in calls to the current <State's>
|
||||
// update method. This greatly enhances stability in physics systems.
|
||||
//
|
||||
// Parameters:
|
||||
// enable - if true, will enable fixed timestepping (if false will disable)
|
||||
// fixedStep - the timestep to use for the fixed step, ignored if disabling
|
||||
// maxStep - if somehow the update portion get signifigantly behind the
|
||||
// render portion, to avoid executing a large number of steps
|
||||
// (hanging the program) an optional maxStep can be specified.
|
||||
// [default = 5*fixedStep]
|
||||
void setFixedUpdateStep(bool enable, scalar fixedStep, scalar maxStep=0);
|
||||
|
||||
// Group: State Management
|
||||
public:
|
||||
// Function: setCurrentState
|
||||
// Set the current Application <State>.
|
||||
// Function: setState
|
||||
// Set the current Application <State>, first popping all current states.
|
||||
//
|
||||
// Template Parameters:
|
||||
// StateT - Class derived from <State> to register.
|
||||
// StateT - <State>-derived class to make current state.
|
||||
template<class StateT>
|
||||
void setCurrentState();
|
||||
void setState();
|
||||
|
||||
// Function: pushState
|
||||
// Push a new <State>, does not remove old <State>.
|
||||
//
|
||||
// Template Parameters:
|
||||
// StateT - <State>-derived class to push.
|
||||
template<class StateT>
|
||||
void pushState();
|
||||
|
||||
// Function: popState
|
||||
// Pop the current <State>, returning to the prior <State> on the stack.
|
||||
void popState();
|
||||
|
||||
#ifdef PHOTON_USE_OPENAL
|
||||
// Group: AudioCore
|
||||
@ -312,6 +375,9 @@ public:
|
||||
// Get the Application's <AudioCore>, should only be called after
|
||||
// <initAudioCore>.
|
||||
//
|
||||
// Note that this function only exists if photon is compiled with Audio
|
||||
// support enabled.
|
||||
//
|
||||
// Return:
|
||||
// Reference to the <AudioCore>.
|
||||
audio::AudioCore& getAudioCore();
|
||||
@ -320,101 +386,66 @@ public:
|
||||
// Initialize the <AudioCore>, should be done before attempting to access
|
||||
// it via <getAudioCore>.
|
||||
//
|
||||
// Note that this function only exists if photon is compiled with Audio
|
||||
// support enabled.
|
||||
//
|
||||
// Arguments:
|
||||
// deviceName - Optional name for desired Audio device, will use default
|
||||
// device if none specified.
|
||||
void initAudioCore(const std::string& deviceName="");
|
||||
#endif //PHOTON_USE_OPENAL
|
||||
|
||||
// Callbacks
|
||||
public:
|
||||
static void GLFWCALL keyCallback(int key, int action);
|
||||
//static void GLFWCALL charCallback(int character, int action);
|
||||
static void GLFWCALL mouseButtonCallback(int button, int action);
|
||||
static void GLFWCALL mouseMoveCallback(int x, int y);
|
||||
static void GLFWCALL mouseWheelCallback(int pos);
|
||||
|
||||
// API Initialization
|
||||
private:
|
||||
util::VersionInfo initPhysFS(const std::string& arg0);
|
||||
util::VersionInfo initGLFW();
|
||||
void initOpenGL();
|
||||
|
||||
// Task Classes
|
||||
private:
|
||||
// UpdateTask, does the updating work of Application, registered as a Task
|
||||
// so that user need not call something akin to Application::update() every
|
||||
// frame
|
||||
class UpdateTask : public Task
|
||||
{
|
||||
|
||||
friend class Application;
|
||||
|
||||
public:
|
||||
UpdateTask();
|
||||
|
||||
void update();
|
||||
|
||||
private:
|
||||
int mouseX_;
|
||||
int mouseY_;
|
||||
bool active_;
|
||||
bool timerPaused_;
|
||||
bool unpauseOnActive_;
|
||||
scalar lastPause_;
|
||||
scalar pausedTime_;
|
||||
scalar secPerFrame_;
|
||||
scalar lastUpdate_;
|
||||
};
|
||||
|
||||
// VideoTask, does the updating work of OpenGL
|
||||
class VideoTask : public Task
|
||||
{
|
||||
public:
|
||||
VideoTask();
|
||||
|
||||
void update();
|
||||
};
|
||||
|
||||
// StateUpdate, calls State::update
|
||||
class StateUpdate : public Task
|
||||
{
|
||||
|
||||
friend class Application;
|
||||
|
||||
public:
|
||||
StateUpdate();
|
||||
void update();
|
||||
|
||||
private:
|
||||
StatePtr state_;
|
||||
};
|
||||
|
||||
// StateRender, calls State::render
|
||||
class StateRender : public Task
|
||||
{
|
||||
|
||||
friend class Application;
|
||||
|
||||
public:
|
||||
StateRender();
|
||||
void update();
|
||||
|
||||
private:
|
||||
StatePtr state_;
|
||||
};
|
||||
|
||||
// Data members
|
||||
private:
|
||||
// version number for photon
|
||||
util::VersionInfo photonVer_;
|
||||
|
||||
// Application info
|
||||
// display variables
|
||||
uint displayWidth_;
|
||||
uint displayHeight_;
|
||||
uint viewportWidth_;
|
||||
uint viewportHeight_;
|
||||
|
||||
// tasks
|
||||
shared_ptr<UpdateTask> updateTask_;
|
||||
shared_ptr<StateUpdate> stateUpdate_;
|
||||
shared_ptr<StateRender> stateRender_;
|
||||
GLbitfield clearFlags_;
|
||||
|
||||
// input system variables
|
||||
static std::vector<InputListener*> listeners_;
|
||||
static std::vector<KeyCode> pressedKeys_;
|
||||
int mouseX_;
|
||||
int mouseY_;
|
||||
|
||||
// timing variables
|
||||
bool active_;
|
||||
bool timerPaused_;
|
||||
bool unpauseOnActive_;
|
||||
scalar lastPause_;
|
||||
scalar pausedTime_;
|
||||
scalar elapsedTime_;
|
||||
scalar lastUpdate_;
|
||||
scalar fixedTimeStep_;
|
||||
scalar maxTimeStep_;
|
||||
scalar timeAccumulator_;
|
||||
std::valarray<scalar> frameTimes_;
|
||||
|
||||
// other
|
||||
bool quit_;
|
||||
util::TaskManager updateTaskManager_;
|
||||
util::TaskManager renderTaskManager_;
|
||||
|
||||
// state system
|
||||
static std::stack<StatePtr> stateStack_;
|
||||
|
||||
// Cores
|
||||
#ifdef PHOTON_USE_OPENAL
|
||||
@ -423,11 +454,32 @@ private:
|
||||
};
|
||||
|
||||
template<class StateT>
|
||||
void Application::setCurrentState()
|
||||
void Application::setState()
|
||||
{
|
||||
stateRender_->state_ = stateUpdate_->state_ = StatePtr(new StateT);
|
||||
StatePtr newState(new StateT);
|
||||
|
||||
// clear stack
|
||||
while(!stateStack_.empty())
|
||||
{
|
||||
popState();
|
||||
}
|
||||
stateStack_.push(newState); // make newState the only state on stack
|
||||
}
|
||||
|
||||
template<class StateT>
|
||||
void Application::pushState()
|
||||
{
|
||||
StatePtr newState(new StateT);
|
||||
|
||||
// if a state is currently running, pause it
|
||||
if(!stateStack_.empty())
|
||||
{
|
||||
stateStack_.top()->onPause();
|
||||
}
|
||||
stateStack_.push(newState); // push newState on top of stack
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
#endif //PHOTON_APPLICATION_HPP
|
||||
|
@ -1,96 +0,0 @@
|
||||
//This file is part of Photon (http://photon.sourceforge.net)
|
||||
//Copyright (C) 2004-2005 James Turk
|
||||
//
|
||||
// Author:
|
||||
// James Turk (jpt2433@rit.edu)
|
||||
//
|
||||
// Version:
|
||||
// $Id: InputListener.hpp,v 1.2 2005/08/08 19:19:24 cozman Exp $
|
||||
|
||||
#ifndef PHOTON_INPUTLISTENER_HPP
|
||||
#define PHOTON_INPUTLISTENER_HPP
|
||||
|
||||
#include "math/Vector2.hpp"
|
||||
|
||||
namespace photon
|
||||
{
|
||||
|
||||
// Class: InputListener
|
||||
// Virtual class to handle user input, classes can derive from this to be
|
||||
// notified of input events.
|
||||
class InputListener
|
||||
{
|
||||
// Group: (Con/De)structors
|
||||
public:
|
||||
|
||||
// Function: InputListener
|
||||
// Registers the InputListener to listen for input with <Application>.
|
||||
InputListener();
|
||||
|
||||
// Function: ~InputListener
|
||||
// Deregisters the listener with <Application>. so that it is no longer
|
||||
// notified of events.
|
||||
virtual ~InputListener();
|
||||
|
||||
// Group: General
|
||||
public:
|
||||
|
||||
// Function: setActive
|
||||
// Enable/Disable the InputListener.
|
||||
//
|
||||
// Parameters:
|
||||
// active - Active state of the InputListener.
|
||||
void setActive(bool active);
|
||||
|
||||
// Function: isActive
|
||||
// Returns true if the InputListener is active.
|
||||
//
|
||||
// Returns: true if active, false if deactivated
|
||||
bool isActive() const;
|
||||
|
||||
// Group: Keyboard Actions
|
||||
public:
|
||||
// Function: onKeyPress
|
||||
// Called when a key is pressed.
|
||||
//
|
||||
// Parameters:
|
||||
// key - <KeyCode> of key that has been pressed.
|
||||
virtual void onKeyPress(KeyCode key);
|
||||
|
||||
// Function: onKeyRelease
|
||||
// Called when a key is released.
|
||||
//
|
||||
// Parameters:
|
||||
// key - <KeyCode> of key that has been released.
|
||||
virtual void onKeyRelease(KeyCode key);
|
||||
|
||||
// Group: Mouse Actions
|
||||
public:
|
||||
// Function: onMouseButtonPress
|
||||
// Called when a mouse button is pressed.
|
||||
//
|
||||
// Parameters:
|
||||
// button - <MouseButton> that was pressed.
|
||||
virtual void onMouseButtonPress(MouseButton button);
|
||||
|
||||
// Function: onMouseButtonRelease
|
||||
// Called when a mouse button is released.
|
||||
//
|
||||
// Parameters:
|
||||
// button - <MouseButton> that was released.
|
||||
virtual void onMouseButtonRelease(MouseButton button);
|
||||
|
||||
// Function: onMouseMove
|
||||
// Called when the mouse is moved.
|
||||
//
|
||||
// Parameters:
|
||||
// pos - Position of the mouse.
|
||||
virtual void onMouseMove(const math::Vector2& pos);
|
||||
|
||||
private:
|
||||
bool active_;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif //PHOTON_INPUTLISTENER_HPP
|
@ -5,7 +5,7 @@
|
||||
// James Turk (jpt2433@rit.edu)
|
||||
//
|
||||
// Version:
|
||||
// $Id: Log.hpp,v 1.8 2005/08/02 23:07:52 cozman Exp $
|
||||
// $Id: Log.hpp,v 1.9 2005/11/13 07:59:48 cozman Exp $
|
||||
|
||||
#ifndef PHOTON_LOG_HPP
|
||||
#define PHOTON_LOG_HPP
|
||||
@ -28,11 +28,11 @@ class Log
|
||||
// Group: (Con/De)structors
|
||||
public:
|
||||
// Function: Log
|
||||
// Log constructor, initializes log singleton.
|
||||
// Log constructor, initializes a log with no sinks.
|
||||
Log();
|
||||
|
||||
// Function: ~Log
|
||||
// Log destructor, destroys log singleton.
|
||||
// Log destructor, destroys log, flushing output streams/closing sinks.
|
||||
~Log();
|
||||
|
||||
// Group: Sink Maintenance
|
||||
|
@ -5,7 +5,7 @@
|
||||
// James Turk (jpt2433@rit.edu)
|
||||
//
|
||||
// Version:
|
||||
// $Id: LogSink.hpp,v 1.2 2005/02/16 06:58:05 cozman Exp $
|
||||
// $Id: LogSink.hpp,v 1.3 2005/11/13 07:59:48 cozman Exp $
|
||||
|
||||
#ifndef PHOTON_LOGSINK_HPP
|
||||
#define PHOTON_LOGSINK_HPP
|
||||
@ -42,8 +42,8 @@ enum LogLevel
|
||||
};
|
||||
|
||||
// Class: LogSink
|
||||
// Base class for all LogSinks to be used with <Log>, derived classes must
|
||||
// define message(LogLevel level, std::string string).
|
||||
// Virtual base class for all LogSinks to be used with <Log>, derived classes
|
||||
// must define writeMessage(LogLevel level, std::string string).
|
||||
// A LogSink recieves any messages passed to the log it's registered with.
|
||||
//
|
||||
// Children:
|
||||
@ -103,7 +103,9 @@ private:
|
||||
typedef shared_ptr<LogSink> LogSinkPtr;
|
||||
|
||||
// Class: ConsoleSink
|
||||
// <LogSink> to be used with <Log> for simple console output.
|
||||
// <LogSink> to be used with <Log> for simple console output. Note that due
|
||||
// to nature of buffered I/O it is important to flush the stream to see output
|
||||
// in realtime with ConsoleSink
|
||||
//
|
||||
// See Also:
|
||||
// <TextSink>, <HTMLSink>
|
||||
|
@ -5,7 +5,7 @@
|
||||
// James Turk (jpt2433@rit.edu)
|
||||
//
|
||||
// Version:
|
||||
// $Id: ResourceManaged.hpp,v 1.8 2005/08/08 19:19:24 cozman Exp $
|
||||
// $Id: ResourceManaged.hpp,v 1.9 2005/11/13 07:59:48 cozman Exp $
|
||||
|
||||
#ifndef PHOTON_RESOURCEMANAGED_HPP
|
||||
#define PHOTON_RESOURCEMANAGED_HPP
|
||||
@ -22,20 +22,24 @@ namespace photon
|
||||
// resources that can be controlled, such as textures and music, can be
|
||||
// derived. Resource managed classes rely on a <ResourceManager>.
|
||||
//
|
||||
// Unless extending Photon, generally ResourceManaged does not need to be
|
||||
// directly used. For this reason public documentation is not availble. See
|
||||
// ResourceManaged.hpp for documentation.
|
||||
//
|
||||
// Children:
|
||||
// <Texture>, <Image>
|
||||
//
|
||||
// <Sample>
|
||||
// <Source>
|
||||
template<class ResMgrT>
|
||||
class ResourceManaged
|
||||
{
|
||||
// Group: (Con/De)structors
|
||||
// Nondoc-Group: (Con/De)structors
|
||||
public:
|
||||
// Function: ResourceManaged
|
||||
// Nondoc-Function: ResourceManaged
|
||||
// Default constructor.
|
||||
ResourceManaged();
|
||||
|
||||
// Function: ResourceManaged
|
||||
// Nondoc-Function: ResourceManaged
|
||||
// Initializing constructor, calls <open> with a filename/zipname.
|
||||
//
|
||||
// Parameters:
|
||||
@ -45,45 +49,45 @@ public:
|
||||
// <open>
|
||||
ResourceManaged(const std::string& name);
|
||||
|
||||
// Function: ~ResourceManaged
|
||||
// Nondoc-Function: ~ResourceManaged
|
||||
// Destructor, calls <release>.
|
||||
virtual ~ResourceManaged();
|
||||
|
||||
ResourceManaged& operator=(const ResourceManaged &rhs);
|
||||
|
||||
// Group: General
|
||||
// Nondoc-Group: General
|
||||
public:
|
||||
// Function: open
|
||||
// Nondoc-Function: open
|
||||
// Opens new resource via the associated <ResourceManager>.
|
||||
//
|
||||
// Parameters:
|
||||
// name - name of resource
|
||||
virtual void open(const std::string& name);
|
||||
|
||||
// Function: release
|
||||
// Nondoc-Function: release
|
||||
// Removes a reference to the resource, releasing if needed.
|
||||
// Generally called by destructor, so should rarely be called.
|
||||
virtual void release();
|
||||
|
||||
// Group: Accessors
|
||||
// Nondoc-Group: Accessors
|
||||
public:
|
||||
// Function: getName
|
||||
// Nondoc-Function: getName
|
||||
// Get the name associated with the resource.
|
||||
//
|
||||
// Returns:
|
||||
// Name of resource, or empty string if no resource is loaded.
|
||||
std::string getName() const;
|
||||
|
||||
// Group: Resource Manager Access
|
||||
// Nondoc-Group: Resource Manager Access
|
||||
public:
|
||||
static ResMgrT resMgr_;
|
||||
|
||||
// Function: cleanUp
|
||||
// Nondoc-Function: cleanUp
|
||||
// Cleans up any unused resources of the type.
|
||||
// (Ex. Image::cleanUp() will unload all images.)
|
||||
static void cleanUp();
|
||||
|
||||
// Function: addResource
|
||||
// Nondoc-Function: addResource
|
||||
// Define a new named resource.
|
||||
// (Ex. Image::addResource("monkey","images/monkey.png") would
|
||||
// make it so that any attempts to load "monkey" would load the image
|
||||
@ -95,7 +99,7 @@ public:
|
||||
static void addResource(const std::string& name,
|
||||
const typename ResMgrT::ResDescT& desc);
|
||||
|
||||
// Function: addResource
|
||||
// Nondoc-Function: addResource
|
||||
// Define a new unaliased resource. (name == path).
|
||||
// (Ex. Image::addResource("images/monkey.png") is essentially the same as
|
||||
// Image::addResource("images/monkey.png","images/monkey.png")
|
||||
|
@ -5,12 +5,16 @@
|
||||
// James Turk (jpt2433@rit.edu)
|
||||
//
|
||||
// Version:
|
||||
// $Id: State.hpp,v 1.1 2005/08/08 19:19:25 cozman Exp $
|
||||
// $Id: State.hpp,v 1.5 2005/11/13 07:59:48 cozman Exp $
|
||||
|
||||
#ifndef PHOTON_STATE_HPP
|
||||
#define PHOTON_STATE_HPP
|
||||
|
||||
#include "types.hpp"
|
||||
#include "math/Vector2.hpp"
|
||||
|
||||
namespace photon
|
||||
{
|
||||
|
||||
// Class: State
|
||||
// Pure virtual State class, used as base class for Photon's state system.
|
||||
@ -18,19 +22,23 @@
|
||||
// Photon's State system is extremely simple yet also very convenient. Simply
|
||||
// by creating classes that fulfill the <State> interface you can use Photon
|
||||
// to manage the state that the game is in.
|
||||
|
||||
//
|
||||
// Implement as many or as few of the members of State as needed (the only
|
||||
// necessary member being <render>) and make the state as current via
|
||||
// <Application::setCurrentState>. Once a state is made current it's
|
||||
// update and render methods will be called every frame until either a new
|
||||
// state is made current or the application ends.
|
||||
// necessary member being <render>) and make the state current via
|
||||
// <Application::setState>/<Application::pushState>. Once a state is made
|
||||
// current it's update and render methods will be called every frame until
|
||||
// either a new state is made current or the application ends.
|
||||
//
|
||||
// The active state is also notified of events as they occur, overloading any
|
||||
// of the on* functions will result in the overloaded version being called
|
||||
// when the particular event happens while the state is active.
|
||||
class State
|
||||
{
|
||||
// Group: (Con/De)structors
|
||||
public:
|
||||
// Function: State
|
||||
// A State's constructor is called whenever the state is made active via
|
||||
// <Application::setCurrentState>.
|
||||
// <Application::setState>.
|
||||
State() { };
|
||||
|
||||
// Function: ~State
|
||||
@ -44,15 +52,82 @@ public:
|
||||
// All of a state's logic should go in update, it is called every frame
|
||||
// before the rendering process begins. Nothing should be drawn to the
|
||||
// screen within update because it will be cleared before it is shown.
|
||||
virtual void update() { };
|
||||
virtual void update(scalar timeDelta) { };
|
||||
|
||||
// Function: render
|
||||
// The only required member of State, anything that should be drawn to the
|
||||
// screen while the State is active should be drawn in render. Game logic
|
||||
// inside of render should be kept to a minimum for optimum performance.
|
||||
virtual void render()=0;
|
||||
|
||||
// Function: onPause
|
||||
// If a state is executing and a new state is pushed onto the stack via
|
||||
// <Application::pushState> the state will be paused until a time that it
|
||||
// is either unpaused or popped from the stack itself. When it is paused
|
||||
// the state management system will call onPause which may perform any
|
||||
// necessary work before the state goes idle.
|
||||
virtual void onPause() { };
|
||||
|
||||
// Function: onResume
|
||||
// If a state has been paused and is then made current again by the
|
||||
// state(s) pushed on top of it being popped, the state management system
|
||||
// will call onResume allowing the state to undo any work that had been
|
||||
// done in <onPause>.
|
||||
virtual void onResume() { };
|
||||
|
||||
// Group: Keyboard Actions
|
||||
public:
|
||||
// Function: onKeyPress
|
||||
// Called when a key is pressed.
|
||||
//
|
||||
// Parameters:
|
||||
// key - <KeyCode> of key that has been pressed.
|
||||
virtual void onKeyPress(KeyCode key) { };
|
||||
|
||||
// Function: onKeyRelease
|
||||
// Called when a key is released.
|
||||
//
|
||||
// Parameters:
|
||||
// key - <KeyCode> of key that has been released.
|
||||
virtual void onKeyRelease(KeyCode key) { };
|
||||
|
||||
// Group: Mouse Actions
|
||||
public:
|
||||
// Function: onMouseButtonPress
|
||||
// Called when a mouse button is pressed.
|
||||
//
|
||||
// Parameters:
|
||||
// button - <MouseButton> that was pressed.
|
||||
virtual void onMouseButtonPress(MouseButton button) { };
|
||||
|
||||
// Function: onMouseButtonRelease
|
||||
// Called when a mouse button is released.
|
||||
//
|
||||
// Parameters:
|
||||
// button - <MouseButton> that was released.
|
||||
virtual void onMouseButtonRelease(MouseButton button) { };
|
||||
|
||||
// Function: onMouseMove
|
||||
// Called when the mouse is moved with the amount the mouse was moved by
|
||||
// NOT with the new position.
|
||||
//
|
||||
// If the new position is needed it can be obtained via
|
||||
// <Application::getMouseX> and <Application::getMouseY>.
|
||||
//
|
||||
// Parameters:
|
||||
// delta - Change in mouse position.
|
||||
virtual void onMouseMove(const math::Vector2& delta) { };
|
||||
|
||||
// Function: onMouseScroll
|
||||
// Called when mouse wheel is scrolled.
|
||||
//
|
||||
// Parameters:
|
||||
// dir - <ScrollDir> describing if mouse wheel was scrolled up or down.
|
||||
virtual void onMouseScroll(ScrollDir dir) { };
|
||||
};
|
||||
|
||||
typedef photon::shared_ptr<State> StatePtr;
|
||||
typedef shared_ptr<State> StatePtr;
|
||||
|
||||
}
|
||||
|
||||
#endif //PHOTON_STATE_HPP
|
||||
|
@ -5,7 +5,7 @@
|
||||
// James Turk (jpt2433@rit.edu)
|
||||
//
|
||||
// Version:
|
||||
// $Id: AudioCore.hpp,v 1.13 2005/08/08 19:19:25 cozman Exp $
|
||||
// $Id: AudioCore.hpp,v 1.15 2005/10/28 22:13:33 cozman Exp $
|
||||
|
||||
#ifdef PHOTON_USE_OPENAL
|
||||
|
||||
@ -15,6 +15,11 @@
|
||||
#include "AL/al.h" // This file depends on OpenAL
|
||||
#include "AL/alc.h"
|
||||
|
||||
// define ALchar if it isn't available
|
||||
#ifndef ALchar
|
||||
#define ALchar ALubyte
|
||||
#endif
|
||||
|
||||
#include "util/VersionInfo.hpp"
|
||||
|
||||
namespace photon
|
||||
@ -32,25 +37,34 @@ class AudioCore
|
||||
public:
|
||||
// Function: AudioCore
|
||||
// Initialize underlying APIs and setup <Task> internals.
|
||||
//AudioCore();
|
||||
AudioCore(const std::string& deviceName);
|
||||
AudioCore(const std::string& deviceName) {};
|
||||
|
||||
// Function: ~AudioCore
|
||||
// Shutdown underlying APIs.
|
||||
~AudioCore();
|
||||
virtual ~AudioCore() { };
|
||||
|
||||
// Group: Accessors
|
||||
public:
|
||||
// Function: getAudioDeviceName
|
||||
// Get name of active audio device.
|
||||
//
|
||||
// Returns:
|
||||
// Name of audio device currently in use.
|
||||
// Returns name of audio device currently in use, if available from
|
||||
// underlying audio API..
|
||||
virtual std::string getAudioDeviceName() const=0;
|
||||
};
|
||||
|
||||
class OALAudioCore : public AudioCore
|
||||
{
|
||||
|
||||
public:
|
||||
OALAudioCore(const std::string& deviceName);
|
||||
~OALAudioCore();
|
||||
|
||||
public:
|
||||
std::string getAudioDeviceName() const;
|
||||
|
||||
// Group: Error Checking
|
||||
|
||||
public:
|
||||
// Function: checkOpenALError
|
||||
// No-Doc Function: checkOpenALError
|
||||
// Checks for OpenAL internal errors, returning a descriptive string if
|
||||
// the OpenAL error state is currently set. Will return an empty string
|
||||
// if there is no error set.
|
||||
@ -59,7 +73,7 @@ public:
|
||||
// String describing OpenAL error, empty string if no error exists.
|
||||
static std::string checkOpenALError();
|
||||
|
||||
// Function: throwOpenALError
|
||||
// No-Doc Function: throwOpenALError
|
||||
// Checks for OpenAL internal errors, throwing an <APIError> if the OpenAL
|
||||
// error state is set and doing nothing if not. Optionally makes the
|
||||
// thrown exception more descriptive by adding in a function string
|
||||
@ -76,14 +90,13 @@ public:
|
||||
private:
|
||||
util::VersionInfo initOpenAL(const std::string& deviceName);
|
||||
|
||||
// data members
|
||||
// data members specific to implementation
|
||||
private:
|
||||
ALfloat listenerPos_[3];
|
||||
ALfloat listenerVel_[3];
|
||||
ALfloat listenerOri_[6];
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
// James Turk (jpt2433@rit.edu)
|
||||
//
|
||||
// Version:
|
||||
// $Id: SampleResourceManager.hpp,v 1.2 2005/07/18 05:14:18 cozman Exp $
|
||||
// $Id: SampleResourceManager.hpp,v 1.3 2005/08/10 05:36:31 cozman Exp $
|
||||
|
||||
#ifdef PHOTON_USE_OPENAL
|
||||
|
||||
@ -36,11 +36,54 @@ private:
|
||||
virtual void loadResourceData(SampleResource &res,
|
||||
const ResourceDescriptor& path);
|
||||
virtual void freeResourceData(SampleResource &res);
|
||||
|
||||
void loadWAVMemory(const ubyte* memory, ALenum& format, ubyte*& data,
|
||||
uint& size, uint& freq);
|
||||
void freeWAVMemory(ubyte*& data);
|
||||
};
|
||||
|
||||
// Allow users to simply call a Sample a Sample
|
||||
typedef Source<SampleResourceManager> Sample;
|
||||
|
||||
// Structure defined to specification of WAV file
|
||||
// Based on http://ccrma.stanford.edu/CCRMA/Courses/422/projects/WaveFormat/
|
||||
struct WaveHeader
|
||||
{
|
||||
// Big Endian
|
||||
// static const uint RIFF = 0x52494646;
|
||||
// static const uint WAVE = 0x57415645;
|
||||
// static const uint FMT = 0x666d7420;
|
||||
// static const uint DATA = 0x64617461;
|
||||
|
||||
// Little Endian
|
||||
static const uint RIFF = 0x46464952;
|
||||
static const uint WAVE = 0x45564157;
|
||||
static const uint FMT = 0x20746d66;
|
||||
static const uint DATA = 0x61746164;
|
||||
|
||||
struct RIFFHeader
|
||||
{
|
||||
uint chunkID; // 4 bytes
|
||||
uint chunkSize; // 4 bytes
|
||||
uint format; // 4 bytes
|
||||
} riff; // 16 bytes
|
||||
|
||||
struct WaveFormat
|
||||
{
|
||||
uint chunkID; // 4 bytes
|
||||
uint size; // 4 bytes
|
||||
short format; // 2 bytes
|
||||
short numChannels; // 2 bytes
|
||||
uint sampleRate; // 4 bytes
|
||||
uint byteRate; // 4 bytes
|
||||
short blockAlign; // 2 bytes
|
||||
short bitsPerSample; // 2 bytes
|
||||
} fmt; // 24 bytes
|
||||
|
||||
uint chunkID; // 4 bytes
|
||||
uint dataSize; // 4 bytes
|
||||
}; // 38 bytes
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
// James Turk (jpt2433@rit.edu)
|
||||
//
|
||||
// Version:
|
||||
// $Id: Source.hpp,v 1.4 2005/08/08 21:39:41 cozman Exp $
|
||||
// $Id: Source.hpp,v 1.5 2005/10/28 22:13:33 cozman Exp $
|
||||
|
||||
#ifdef PHOTON_USE_OPENAL
|
||||
|
||||
@ -23,17 +23,20 @@ namespace audio
|
||||
{
|
||||
|
||||
// Class: Source
|
||||
// Simple OO wrapper around an OpenAL source, defines the interface used for
|
||||
// Sample and Music.
|
||||
// Simple wrapper object around an OpenAL source, defines the interface used
|
||||
// for Sample and Music.
|
||||
//
|
||||
// Source is a template class and can not be used directly, use either Sample
|
||||
// or Music. Sample is for playing small files such as sound effects. Music
|
||||
// is for streaming files such as background music.
|
||||
//
|
||||
// Source is a resource managed class, and therefore all resources should
|
||||
// be registered using <Source::addResource> and then loaded by their assigned
|
||||
// name via <Source::open> or the appropriate constructor.
|
||||
//
|
||||
// Operators:
|
||||
// - Source = Source
|
||||
// - bool : True if source has loaded buffer, false if not.
|
||||
// - ostream& << Source
|
||||
template <class ResMgrT>
|
||||
class Source : public ResourceManaged<ResMgrT>
|
||||
{
|
||||
@ -69,7 +72,7 @@ public:
|
||||
public:
|
||||
|
||||
// Function: open
|
||||
// Opens an audio file, supported formats are WAV and Ogg.
|
||||
// Opens an audio file, supported formats are WAV and Ogg Vorbis.
|
||||
//
|
||||
// Parameters:
|
||||
// name - Name of the Source <Resource> to open.
|
||||
@ -168,7 +171,7 @@ template<class ResMgrT>
|
||||
Source<ResMgrT>::Source()
|
||||
{
|
||||
alGenSources(1, &sourceID_);
|
||||
AudioCore::throwOpenALError("Source::Source()");
|
||||
OALAudioCore::throwOpenALError("Source::Source()");
|
||||
}
|
||||
|
||||
template<class ResMgrT>
|
||||
@ -176,14 +179,14 @@ Source<ResMgrT>::Source(const Source &rhs) :
|
||||
ResourceManaged<ResMgrT>(rhs)
|
||||
{
|
||||
alGenSources(1, &sourceID_);
|
||||
AudioCore::throwOpenALError("Source::Source(const Source&)");
|
||||
OALAudioCore::throwOpenALError("Source::Source(const Source&)");
|
||||
}
|
||||
|
||||
template<class ResMgrT>
|
||||
Source<ResMgrT>::Source(const std::string& name)
|
||||
{
|
||||
alGenSources(1, &sourceID_);
|
||||
AudioCore::throwOpenALError("Source::Source(const std::string&)");
|
||||
OALAudioCore::throwOpenALError("Source::Source(const std::string&)");
|
||||
open(name);
|
||||
}
|
||||
|
||||
@ -205,14 +208,14 @@ void Source<ResMgrT>::open(const std::string& name)
|
||||
ResourceManaged<ResMgrT>::resMgr_.getAudioData(
|
||||
ResourceManaged<ResMgrT>::getName(), bufferID);
|
||||
|
||||
// attach buffer to source
|
||||
// attach buffer to source and set default settings
|
||||
alSourcei(sourceID_, AL_BUFFER, bufferID);
|
||||
alSourcef(sourceID_, AL_PITCH, 1.0);
|
||||
alSourcef(sourceID_, AL_GAIN, 1.0);
|
||||
alSourcefv(sourceID_, AL_POSITION, ORIGIN);
|
||||
alSourcefv(sourceID_, AL_VELOCITY, ORIGIN);
|
||||
|
||||
AudioCore::throwOpenALError("Source::open");
|
||||
OALAudioCore::throwOpenALError("Source::open");
|
||||
}
|
||||
|
||||
template<class ResMgrT>
|
||||
@ -233,7 +236,7 @@ Source<ResMgrT>& Source<ResMgrT>::operator=(const Source<ResMgrT>& rhs)
|
||||
alSourcefv(sourceID_, AL_POSITION, ORIGIN);
|
||||
alSourcefv(sourceID_, AL_VELOCITY, ORIGIN);
|
||||
|
||||
AudioCore::throwOpenALError("Source::operator=");
|
||||
OALAudioCore::throwOpenALError("Source::operator=");
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
@ -241,7 +244,7 @@ Source<ResMgrT>& Source<ResMgrT>::operator=(const Source<ResMgrT>& rhs)
|
||||
template<class ResMgrT>
|
||||
Source<ResMgrT>::operator bool() const
|
||||
{
|
||||
return isValid();
|
||||
return isValid(); // do the work in isValid to avoid split implementation
|
||||
}
|
||||
|
||||
template<class ResMgrT>
|
||||
@ -252,7 +255,7 @@ void Source<ResMgrT>::play()
|
||||
throw PreconditionException("Invalid Source::play call.");
|
||||
}
|
||||
|
||||
alSourcePlay(sourceID_);
|
||||
alSourcePlay(sourceID_); // play it
|
||||
}
|
||||
|
||||
template<class ResMgrT>
|
||||
@ -263,7 +266,7 @@ void Source<ResMgrT>::stop()
|
||||
throw PreconditionException("Invalid Source::stop call.");
|
||||
}
|
||||
|
||||
alSourceStop(sourceID_);
|
||||
alSourceStop(sourceID_); // stop it
|
||||
}
|
||||
|
||||
template<class ResMgrT>
|
||||
@ -274,7 +277,7 @@ void Source<ResMgrT>::pause()
|
||||
throw PreconditionException("Invalid Source::pause call.");
|
||||
}
|
||||
|
||||
alSourcePause(sourceID_);
|
||||
alSourcePause(sourceID_); // pause it
|
||||
}
|
||||
|
||||
template<class ResMgrT>
|
||||
@ -285,7 +288,7 @@ void Source<ResMgrT>::rewind()
|
||||
throw PreconditionException("Invalid Source::rewind call.");
|
||||
}
|
||||
|
||||
alSourceRewind(sourceID_);
|
||||
alSourceRewind(sourceID_); // rewind it (doesn't stop)
|
||||
}
|
||||
|
||||
template<class ResMgrT>
|
||||
@ -296,13 +299,13 @@ void Source<ResMgrT>::setLooping(bool loop)
|
||||
throw PreconditionException("Invalid Source::setLooping call.");
|
||||
}
|
||||
|
||||
alSourcei(sourceID_, AL_LOOPING, loop);
|
||||
alSourcei(sourceID_, AL_LOOPING, loop); // toggle looping
|
||||
}
|
||||
|
||||
template<class ResMgrT>
|
||||
bool Source<ResMgrT>::isValid() const
|
||||
{
|
||||
return alIsSource(sourceID_) == AL_TRUE;
|
||||
return alIsSource(sourceID_) == AL_TRUE; // true if valid audio loaded
|
||||
}
|
||||
|
||||
template<class ResMgrT>
|
||||
@ -313,7 +316,7 @@ bool Source<ResMgrT>::isPlaying() const
|
||||
throw PreconditionException("Invalid Source::isPlaying call.");
|
||||
}
|
||||
|
||||
// check state
|
||||
// check state using OpenAL query function
|
||||
int state;
|
||||
alGetSourcei(sourceID_, AL_SOURCE_STATE, &state);
|
||||
return state == AL_PLAYING;
|
||||
@ -327,7 +330,7 @@ bool Source<ResMgrT>::isLooping() const
|
||||
throw PreconditionException("Invalid Source::isLooping call.");
|
||||
}
|
||||
|
||||
// check looping status
|
||||
// query looping status
|
||||
int loop;
|
||||
alGetSourcei(sourceID_, AL_LOOPING, &loop);
|
||||
return loop == AL_TRUE;
|
||||
@ -337,6 +340,7 @@ template<class ResMgrT>
|
||||
void Source<ResMgrT>::addResource(const std::string& name,
|
||||
const std::string& path)
|
||||
{
|
||||
// adds an aliased resource
|
||||
ResourceManaged<ResMgrT>::resMgr_.newResource(name,
|
||||
ResourceDescriptor(path));
|
||||
}
|
||||
@ -344,6 +348,7 @@ void Source<ResMgrT>::addResource(const std::string& name,
|
||||
template<class ResMgrT>
|
||||
void Source<ResMgrT>::addResource(const std::string& path)
|
||||
{
|
||||
// add non-aliased resource
|
||||
ResourceManaged<ResMgrT>::resMgr_.newResource(path,
|
||||
ResourceDescriptor(path));
|
||||
}
|
||||
|
@ -5,7 +5,7 @@
|
||||
// James Turk (jpt2433@rit.edu)
|
||||
//
|
||||
// Version:
|
||||
// $Id: entrypoint.hpp,v 1.8 2005/08/08 19:19:25 cozman Exp $
|
||||
// $Id: entrypoint.hpp,v 1.11 2005/11/15 02:59:08 cozman Exp $
|
||||
|
||||
|
||||
#ifndef PHOTON_ENTRYPOINT_HPP
|
||||
@ -29,16 +29,19 @@
|
||||
//
|
||||
// int PhotonMain(const StrVec& args)
|
||||
// {
|
||||
// // get Application singleton
|
||||
// Application& app(Application::getInstance);
|
||||
//
|
||||
// // create window
|
||||
// Application::getInstance().createDisplay(800,600,32,0,0,false);
|
||||
// app.createDisplay(800,600,32,0,0,DISP_WINDOWED);
|
||||
//
|
||||
// // set current state
|
||||
// Application::getInstance().setCurrentState<MainMenu>();
|
||||
// app.setState<MainMenu>();
|
||||
//
|
||||
// // can also add any tasks here
|
||||
// // can also add any tasks before running
|
||||
//
|
||||
// // run until finished
|
||||
// Kernel::getInstance().run();
|
||||
// app.run();
|
||||
//
|
||||
// return 0;
|
||||
// }
|
||||
|
@ -5,7 +5,7 @@
|
||||
// James Turk (jpt2433@rit.edu)
|
||||
//
|
||||
// Version:
|
||||
// $Id: exceptions.hpp,v 1.6 2005/07/19 01:31:37 cozman Exp $
|
||||
// $Id: exceptions.hpp,v 1.7 2005/11/13 07:59:48 cozman Exp $
|
||||
|
||||
#ifndef PHOTON_EXCEPTIONS_HPP
|
||||
#define PHOTON_EXCEPTIONS_HPP
|
||||
@ -101,8 +101,8 @@ public:
|
||||
};
|
||||
|
||||
// Class: ArgumentException
|
||||
// ArgumentException should be thrown when an argument is passed to a function
|
||||
// that is invalid.
|
||||
// ArgumentException should be thrown when an invalid argument is passed to a
|
||||
// function.
|
||||
//
|
||||
// Parent:
|
||||
// <Exception>
|
||||
@ -130,7 +130,7 @@ public:
|
||||
};
|
||||
|
||||
// Class: RangeException
|
||||
// RangeException should be thrown if something (such as an array bound) is out
|
||||
// RangeException should be thrown if something (such as an array index) is out
|
||||
// of bounds.
|
||||
//
|
||||
// Parent:
|
||||
|
@ -5,7 +5,7 @@
|
||||
// James Turk (jpt2433@rit.edu)
|
||||
//
|
||||
// Version:
|
||||
// $Id: Circle.hpp,v 1.3 2005/07/18 05:58:03 cozman Exp $
|
||||
// $Id: Circle.hpp,v 1.4 2005/11/13 07:59:48 cozman Exp $
|
||||
|
||||
#ifndef PHOTON_MATH_CIRCLE_HPP
|
||||
#define PHOTON_MATH_CIRCLE_HPP
|
||||
@ -23,7 +23,10 @@ class Rect;
|
||||
// Defines geometric entity known as a circle.
|
||||
//
|
||||
// A plane curve everywhere equidistant from a given fixed point, the center.
|
||||
// <http://dictionary.com>
|
||||
// (<http://dictionary.com>)
|
||||
//
|
||||
// Exists mainly to provide a bounding circle for objects, simplifying
|
||||
// collision detection.
|
||||
//
|
||||
// Operators:
|
||||
// - Circle == Circle
|
||||
@ -116,17 +119,11 @@ public:
|
||||
// Group: Accessors
|
||||
public:
|
||||
// Function: getCenter
|
||||
// Get center <Point2>.
|
||||
//
|
||||
// Returns:
|
||||
// Center point.
|
||||
// Get center <Vector2::Point2>.
|
||||
Point2 getCenter() const;
|
||||
|
||||
// Function: getRadius
|
||||
// Get radius of Circle.
|
||||
//
|
||||
// Returns:
|
||||
// Radius of circle.
|
||||
scalar getRadius() const;
|
||||
|
||||
friend std::ostream& operator<<(std::ostream &o, const Circle &circle);
|
||||
|
@ -5,7 +5,7 @@
|
||||
// James Turk (jpt2433@rit.edu)
|
||||
//
|
||||
// Version:
|
||||
// $Id: Rect.hpp,v 1.2 2005/03/03 09:25:19 cozman Exp $
|
||||
// $Id: Rect.hpp,v 1.3 2005/11/13 07:59:48 cozman Exp $
|
||||
|
||||
#ifndef PHOTON_MATH_RECT_HPP
|
||||
#define PHOTON_MATH_RECT_HPP
|
||||
@ -22,7 +22,10 @@ class Circle;
|
||||
// Class: Rect
|
||||
// Defines geometric entity known as a rectangle.
|
||||
//
|
||||
// A four-sided plane figure with four right angles. <http://dictionary.com>
|
||||
// A four-sided plane figure with four right angles. (<http://dictionary.com>)
|
||||
//
|
||||
// Exists mainly to provide a bounding rectangle for objects, simplifying
|
||||
// collision detection.
|
||||
//
|
||||
// Operators:
|
||||
// - Rect == Rect
|
||||
@ -33,7 +36,7 @@ class Rect
|
||||
public:
|
||||
|
||||
// Function: Rect
|
||||
// Initializes rectangle at (0,0) with size of 0.
|
||||
// Initializes rectangle at (0,0) with width/height of 0.
|
||||
Rect();
|
||||
|
||||
// Function: Rect
|
||||
@ -64,14 +67,14 @@ bool operator==(const Rect &rhs) const;
|
||||
public:
|
||||
|
||||
// Function: moveTo
|
||||
// move rectangle to new location.
|
||||
// Move rectangle to new location.
|
||||
//
|
||||
// Parameters:
|
||||
// topleft - Point describing new top left corner.
|
||||
void moveTo(const Point2 &topleft);
|
||||
|
||||
// Function: moveRel
|
||||
// move rectangle relative to current position.
|
||||
// Move rectangle relative to current position.
|
||||
//
|
||||
// Parameters:
|
||||
// xMove - Distance to move horizontally.
|
||||
@ -79,7 +82,7 @@ public:
|
||||
void moveRel(scalar xMove, scalar yMove);
|
||||
|
||||
// Function: resize
|
||||
// set new size for rectangle.
|
||||
// Set new size for rectangle.
|
||||
//
|
||||
// Parameters:
|
||||
// width - New width for rectangle.
|
||||
@ -87,7 +90,7 @@ public:
|
||||
void resize(scalar width, scalar height);
|
||||
|
||||
// Function: resizeRel
|
||||
// set new size for rectangle, relative to current size.
|
||||
// Set new size for rectangle, relative to current size.
|
||||
//
|
||||
// Parameters:
|
||||
// widthDelta - Change to be applied to width of rectangle.
|
||||
@ -139,7 +142,7 @@ public:
|
||||
bool contains(const Rect &rect) const;
|
||||
|
||||
// Function: calcIntersection
|
||||
// calculates & returns the intersection of two rectangles.
|
||||
// Calculates & returns the intersection of two rectangles.
|
||||
//
|
||||
// Parameters:
|
||||
// rect - Rectangle to find & calculate area of intersection with.
|
||||
@ -155,87 +158,51 @@ public:
|
||||
public:
|
||||
|
||||
// Function: getX
|
||||
// Get x coord of rectangle. (top left corner)
|
||||
//
|
||||
// Returns:
|
||||
// Returns x coord of top left corner of rectangle.
|
||||
// Get x coord of top left corner of rectangle.
|
||||
scalar getX() const;
|
||||
|
||||
// Function: getY
|
||||
// Get y coord of rectangle. (top left corner)
|
||||
//
|
||||
// Returns:
|
||||
// Returns y coord of top left corner of rectangle.
|
||||
// Get y coord of top left corner of rectangle.
|
||||
scalar getY() const;
|
||||
|
||||
// Function: getTop
|
||||
// Get y coord of top side of rectangle.
|
||||
//
|
||||
// Returns:
|
||||
// Returns y coord of top side of rectangle.
|
||||
scalar getTop() const;
|
||||
|
||||
// Function: getLeft
|
||||
// Get x coord of left side of rectangle.
|
||||
//
|
||||
// Returns:
|
||||
// Returns x coord of left side rectangle.
|
||||
scalar getLeft() const;
|
||||
|
||||
// Function: getBottom
|
||||
// Get y coord of bottom side of rectangle.
|
||||
//
|
||||
// Returns:
|
||||
// Returns y coord of bottom side of rectangle.
|
||||
scalar getBottom() const;
|
||||
|
||||
// Function: getRight
|
||||
// Get x coord of right side of rectangle.
|
||||
//
|
||||
// Returns:
|
||||
// Returns x coord of right side rectangle.
|
||||
scalar getRight() const;
|
||||
|
||||
// Function: getWidth
|
||||
// Get width of rectangle.
|
||||
//
|
||||
// Returns:
|
||||
// Returns width of rectangle.
|
||||
scalar getWidth() const;
|
||||
|
||||
// Function: getHeight
|
||||
// Get height of rectangle.
|
||||
//
|
||||
// Returns:
|
||||
// Height of rectangle.
|
||||
scalar getHeight() const;
|
||||
|
||||
// Function: getTopLeft
|
||||
// Get top left corner of rectangle.
|
||||
//
|
||||
// Returns:
|
||||
// Top left corner of rectangle.
|
||||
Point2 getTopLeft() const;
|
||||
|
||||
// Function: getTopRight
|
||||
// Get top right corner of rectangle.
|
||||
//
|
||||
// Returns:
|
||||
// Top right corner of rectangle.
|
||||
Point2 getTopRight() const;
|
||||
|
||||
// Function: getBottomLeft
|
||||
// Get bottom left corner of rectangle.
|
||||
//
|
||||
// Returns:
|
||||
// Bottom left corner of rectangle.
|
||||
Point2 getBottomLeft() const;
|
||||
|
||||
// Function: getBottomRight
|
||||
// Get bottom right corner of rectangle.
|
||||
//
|
||||
// Returns:
|
||||
// Bottom right corner of rectangle.
|
||||
Point2 getBottomRight() const;
|
||||
|
||||
friend std::ostream& operator<<(std::ostream &o, const Rect &rect);
|
||||
|
@ -5,7 +5,7 @@
|
||||
// James Turk (jpt2433@rit.edu)
|
||||
//
|
||||
// Version:
|
||||
// $Id: Vector2.hpp,v 1.5 2005/07/17 02:40:58 cozman Exp $
|
||||
// $Id: Vector2.hpp,v 1.6 2005/11/13 07:59:48 cozman Exp $
|
||||
|
||||
#ifndef PHOTON_MATH_VECTOR2_HPP
|
||||
#define PHOTON_MATH_VECTOR2_HPP
|
||||
@ -21,7 +21,7 @@ namespace math
|
||||
|
||||
// Class: Vector2
|
||||
// Represents a two-dimensional vector. A quantity specified by a magnitude
|
||||
// and a direction. Vector is oriented in classical 2D graphics format with
|
||||
// and a direction. Vector is oriented in classic 2D graphics format with
|
||||
// origin at top corner of screen.
|
||||
//
|
||||
// Operators:
|
||||
@ -83,7 +83,7 @@ public:
|
||||
void set(scalar nx, scalar ny);
|
||||
|
||||
// Function: resolveDeg
|
||||
// resolve vector, given a magnitude & angle in degrees.
|
||||
// Resolve vector, given a magnitude & angle in degrees.
|
||||
//
|
||||
// Parameters:
|
||||
// magnitude - Magnitude of new vector.
|
||||
@ -95,7 +95,7 @@ public:
|
||||
|
||||
|
||||
// Function: resolveRad
|
||||
// resolve vector, given a magnitude & angle in radians.
|
||||
// Resolve vector, given a magnitude & angle in radians.
|
||||
//
|
||||
// Parameters:
|
||||
// magnitude - Magnitude of new vector.
|
||||
@ -137,7 +137,7 @@ public:
|
||||
public:
|
||||
|
||||
// Function: getMagnitude
|
||||
// Get length of vector.
|
||||
// Determine length of vector.
|
||||
//
|
||||
// Returns:
|
||||
// Length of the vector.
|
||||
@ -147,13 +147,13 @@ public:
|
||||
// Angle of vector in degrees, angle is calculated with respect to positive
|
||||
// X axis.
|
||||
//
|
||||
// | |90<EFBFBD>
|
||||
// | |90
|
||||
// | |
|
||||
// | |
|
||||
// |180<EFBFBD>-----------------------0<EFBFBD> or 360<EFBFBD>
|
||||
// |180-----------------------0 or 360
|
||||
// | |
|
||||
// | |
|
||||
// | |270<EFBFBD>
|
||||
// | |270
|
||||
//
|
||||
// Returns:
|
||||
// Angle of vector (in degrees).
|
||||
|
@ -5,7 +5,7 @@
|
||||
// James Turk (jpt2433@rit.edu)
|
||||
//
|
||||
// Version:
|
||||
// $Id: math.hpp,v 1.6 2005/07/18 05:58:03 cozman Exp $
|
||||
// $Id: math.hpp,v 1.7 2005/11/13 07:59:48 cozman Exp $
|
||||
|
||||
#ifndef PHOTON_MATH_MATH_HPP
|
||||
#define PHOTON_MATH_MATH_HPP
|
||||
@ -48,7 +48,7 @@ T clamp(T val, C low, C high);
|
||||
// Parameters:
|
||||
// val1 - First value to compare.
|
||||
// val2 - Second value to compare.
|
||||
// epsilon - Epsilon value, defaults to 0.0001.
|
||||
// epsilon - Epsilon value, defaults to 0.000001.
|
||||
//
|
||||
// Returns:
|
||||
// true if |val1-val2| < epsilon, meaning values are approximately equal
|
||||
|
@ -1,40 +1,38 @@
|
||||
#ifndef PHOTON_HPP
|
||||
#define PHOTON_HPP
|
||||
|
||||
#include "types.hpp"
|
||||
#include "State.hpp"
|
||||
#include "Application.hpp"
|
||||
#include "entrypoint.hpp"
|
||||
#include "exceptions.hpp"
|
||||
#include "InputListener.hpp"
|
||||
#include "Kernel.hpp"
|
||||
#include "Log.hpp"
|
||||
#include "LogSink.hpp"
|
||||
#include "photon.hpp"
|
||||
#include "entrypoint.hpp"
|
||||
#include "LogSink.hpp"
|
||||
#include "Log.hpp"
|
||||
#include "ResourceManaged.hpp"
|
||||
#include "ResourceManager.hpp"
|
||||
#include "State.hpp"
|
||||
#include "Task.hpp"
|
||||
#include "types.hpp"
|
||||
#include "audio/AudioCore.hpp"
|
||||
#include "audio/SampleResourceManager.hpp"
|
||||
#include "audio/Source.hpp"
|
||||
#include "math/Circle.hpp"
|
||||
#include "audio/AudioCore.hpp"
|
||||
#include "math/math.hpp"
|
||||
#include "math/Rect.hpp"
|
||||
#include "math/Vector2.hpp"
|
||||
#include "math/Circle.hpp"
|
||||
#include "util/ConfigFile.hpp"
|
||||
#include "util/FileBuffer.hpp"
|
||||
#include "util/RandGen.hpp"
|
||||
#include "util/Singleton.hpp"
|
||||
#include "util/Timer.hpp"
|
||||
#include "util/VersionInfo.hpp"
|
||||
#include "util/Task.hpp"
|
||||
#include "util/Singleton.hpp"
|
||||
#include "util/TaskManager.hpp"
|
||||
#include "util/RandGen.hpp"
|
||||
#include "util/Timer.hpp"
|
||||
#include "util/FileBuffer.hpp"
|
||||
#include "util/filesys/filesys.hpp"
|
||||
#include "video/Color.hpp"
|
||||
#include "video/Font.hpp"
|
||||
#include "video/FontResourceManager.hpp"
|
||||
#include "video/Image.hpp"
|
||||
#include "video/Pen.hpp"
|
||||
#include "video/Image.hpp"
|
||||
#include "video/FontResourceManager.hpp"
|
||||
#include "video/Texture.hpp"
|
||||
#include "video/Color.hpp"
|
||||
#include "video/TextureResourceManager.hpp"
|
||||
#include "video/VideoCore.hpp"
|
||||
#include "video/Font.hpp"
|
||||
|
||||
#endif // PHOTON_HPP
|
||||
|
@ -5,7 +5,7 @@
|
||||
// James Turk (jpt2433@rit.edu)
|
||||
//
|
||||
// Version:
|
||||
// $Id: types.hpp,v 1.7 2005/08/08 19:19:25 cozman Exp $
|
||||
// $Id: types.hpp,v 1.10 2005/11/15 02:59:08 cozman Exp $
|
||||
|
||||
#ifndef PHOTON_TYPES_HPP
|
||||
#define PHOTON_TYPES_HPP
|
||||
@ -39,7 +39,7 @@ typedef double scalar;
|
||||
// Group: STL/Boost Types
|
||||
|
||||
// Type: StrVec
|
||||
// Typedef for vector of strings, which is used all throughout photon.
|
||||
// Typedef for vector of strings, which is used throughout photon.
|
||||
typedef std::vector<std::string> StrVec;
|
||||
|
||||
// Type: shared_ptr
|
||||
@ -49,7 +49,10 @@ using boost::shared_ptr;
|
||||
// Group: Enums
|
||||
|
||||
// Enum: KeyCode
|
||||
// Enumeration defining keys, used in <Application::keyPressed>.
|
||||
// Enumeration for keys, includes printable characters and special keys.
|
||||
//
|
||||
// Keys are shown roughly in the order they appear on the keyboard to aid
|
||||
// finding a specific key.
|
||||
//
|
||||
// Enums:
|
||||
// KEY_ESC - Escape key
|
||||
@ -305,7 +308,7 @@ enum KeyCode
|
||||
};
|
||||
|
||||
// Enum: MouseButton
|
||||
// Enumeration defining buttons, used in <Application::mouseButtonPressed>.
|
||||
// Enumeration defining mouse buttons.
|
||||
//
|
||||
// MB_LEFT - Left mouse button.
|
||||
// MB_MIDDLE - Middle mouse button.
|
||||
@ -317,6 +320,26 @@ enum MouseButton
|
||||
MB_RIGHT =GLFW_MOUSE_BUTTON_RIGHT
|
||||
};
|
||||
|
||||
// Enum: ScrollDir
|
||||
// Enumeration defining scroll direction of mouse wheel.
|
||||
//
|
||||
// SCROLL_UP - Wheel was scrolled up.
|
||||
// SCROLL_DOWN - Wheel was scrolled down.
|
||||
enum ScrollDir
|
||||
{
|
||||
SCROLL_UP, SCROLL_DOWN
|
||||
};
|
||||
|
||||
// Enum: DisplayMode
|
||||
// Enumeration defining types of displays.
|
||||
//
|
||||
// DISP_WINDOWED - Windowed Mode
|
||||
// DISP_FULLSCREEN - Fullscreen Mode
|
||||
enum DisplayMode
|
||||
{
|
||||
DISP_WINDOWED, DISP_FULLSCREEN
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif //PHOTON_TYPES_HPP
|
||||
|
@ -5,7 +5,7 @@
|
||||
// James Turk (jpt2433@rit.edu)
|
||||
//
|
||||
// Version:
|
||||
// $Id: ConfigFile.hpp,v 1.6 2005/07/19 01:31:37 cozman Exp $
|
||||
// $Id: ConfigFile.hpp,v 1.7 2005/11/13 07:59:48 cozman Exp $
|
||||
|
||||
#ifndef PHOTON_UTIL_CONFIGFILE_HPP
|
||||
#define PHOTON_UTIL_CONFIGFILE_HPP
|
||||
@ -69,7 +69,7 @@ public:
|
||||
public:
|
||||
|
||||
// Function: open
|
||||
// open a file, processing it as an INI-like config file.
|
||||
// Open a file, processing it as an INI-like config file.
|
||||
//
|
||||
// Parameters:
|
||||
// filename - Name of ConfigFile to open.
|
||||
|
@ -5,7 +5,7 @@
|
||||
// James Turk (jpt2433@rit.edu)
|
||||
//
|
||||
// Version:
|
||||
// $Id: FileBuffer.hpp,v 1.4 2005/06/10 07:06:06 cozman Exp $
|
||||
// $Id: FileBuffer.hpp,v 1.5 2005/11/13 07:59:48 cozman Exp $
|
||||
|
||||
#ifndef PHOTON_UTIL_FILEBUFFER_HPP
|
||||
#define PHOTON_UTIL_FILEBUFFER_HPP
|
||||
@ -23,8 +23,14 @@ namespace util
|
||||
{
|
||||
|
||||
// Class: FileBuffer
|
||||
// Class for reading data from a file, uses PhysFS <http://physfs.icculus.org>
|
||||
// Class for reading data from a file, uses PhysFS
|
||||
// (<http://physfs.icculus.org>)
|
||||
// and is capable of reading from archives on the search path.
|
||||
//
|
||||
// All paths used are relative to the search path.
|
||||
// By default only files within the directory the application is running or
|
||||
// it's subdirectories are accessible. Additional directories may be added
|
||||
// to the search path via <addToSearchPath>.
|
||||
class FileBuffer
|
||||
{
|
||||
|
||||
@ -38,7 +44,8 @@ public:
|
||||
// Initializing constructor, calls <open>.
|
||||
//
|
||||
// Parameters:
|
||||
// filename - Name of file to load.
|
||||
// filename - Name of file to load. (See notes on how FileBuffer handles
|
||||
// paths at top of page)
|
||||
FileBuffer(const std::string& filename);
|
||||
|
||||
// Function: ~FileBuffer
|
||||
@ -51,18 +58,20 @@ public:
|
||||
// Loads a file into the FileBuffer.
|
||||
//
|
||||
// Parameters:
|
||||
// filename - Name of file to load.
|
||||
// filename - Name of file to load. (See notes on how FileBuffer handles
|
||||
// paths at top of page)
|
||||
void open(const std::string& filename);
|
||||
|
||||
// Function: close
|
||||
// Frees memory occupied by loaded data.
|
||||
// Closes the file, all future read attempts will fail until <open> is
|
||||
// called agian.
|
||||
void close();
|
||||
|
||||
// Group: Accessors
|
||||
public:
|
||||
|
||||
// Function: getData
|
||||
// Loads an amount of data, returns a pointer to the loaded data.
|
||||
// Reads data from file into a <ubyte>-vector.
|
||||
// If the requested amount of data wasn't available, returns only
|
||||
// what could be loaded. If amount is 0 (default), returns entire buffer.
|
||||
//
|
||||
@ -88,7 +97,7 @@ public:
|
||||
uint getSize() const;
|
||||
|
||||
// Function: isEOF
|
||||
// Checks if internal cursor is at end of file.
|
||||
// Checks if internal cursor has reached end of file.
|
||||
//
|
||||
// Returns:
|
||||
// True iff eof, false otherwise.
|
||||
|
@ -5,7 +5,7 @@
|
||||
// James Turk (jpt2433@rit.edu)
|
||||
//
|
||||
// Version:
|
||||
// $Id: RandGen.hpp,v 1.5 2005/07/18 06:18:51 cozman Exp $
|
||||
// $Id: RandGen.hpp,v 1.6 2005/10/30 21:08:57 cozman Exp $
|
||||
|
||||
#ifndef PHOTON_UTIL_RANDGEN_HPP
|
||||
#define PHOTON_UTIL_RANDGEN_HPP
|
||||
@ -17,7 +17,8 @@ namespace util
|
||||
|
||||
// Class: RandGen
|
||||
// Psuedorandom number generator class which uses Mersenne Twister.
|
||||
// MT19937 is described at <http://www.math.keio.ac.jp/matumoto/emt.html>.
|
||||
// MT19937 is described at
|
||||
// <http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/emt.html>.
|
||||
class RandGen
|
||||
{
|
||||
// Group: (Con/De)structors
|
||||
|
@ -5,7 +5,7 @@
|
||||
// James Turk (jpt2433@rit.edu)
|
||||
//
|
||||
// Version:
|
||||
// $Id: Singleton.hpp,v 1.8 2005/07/18 06:18:51 cozman Exp $
|
||||
// $Id: Singleton.hpp,v 1.9 2005/11/13 07:59:48 cozman Exp $
|
||||
|
||||
#ifndef PHOTON_UTIL_SINGLETON_HPP
|
||||
#define PHOTON_UTIL_SINGLETON_HPP
|
||||
@ -44,19 +44,19 @@ template<class T>
|
||||
class Singleton : public boost::noncopyable
|
||||
{
|
||||
public:
|
||||
// Function: initialize
|
||||
// Initialize the instance of the singleton, can be done explicitly if
|
||||
// order of construction matters. Will be done on first call to
|
||||
// getInstance otherwise.
|
||||
static void initialize();
|
||||
|
||||
// Function: destroy
|
||||
// Destroy the instance of the singleton, can be done explicitly if order
|
||||
// of destruction matters. Will be done automatically if not done.
|
||||
// Destroy the instance of the singleton, must be done for every singleton
|
||||
// created.
|
||||
//
|
||||
// Throws:
|
||||
// <PreconditionException> if called for uninitialized singleton
|
||||
static void destroy();
|
||||
|
||||
// Function: getInstance
|
||||
// Get a reference to the instance of the derived class.
|
||||
//
|
||||
// Throws:
|
||||
// <PreconditionException> if called for uninitialized singleton
|
||||
static T& getInstance();
|
||||
|
||||
protected:
|
||||
@ -70,22 +70,6 @@ private:
|
||||
|
||||
// template implementation
|
||||
|
||||
template<class T>
|
||||
Singleton<T>::Singleton()
|
||||
{
|
||||
if(instance_ != 0)
|
||||
{
|
||||
throw PreconditionException("Attempt to double-initialize singleton.");
|
||||
}
|
||||
|
||||
instance_ = static_cast<T*>(this); // cast self to type of T*
|
||||
}
|
||||
|
||||
template<class T>
|
||||
Singleton<T>::~Singleton()
|
||||
{
|
||||
}
|
||||
|
||||
template<class T>
|
||||
void Singleton<T>::destroy()
|
||||
{
|
||||
@ -112,6 +96,22 @@ T& Singleton<T>::getInstance()
|
||||
return *instance_; //return dereferenced instance
|
||||
}
|
||||
|
||||
template<class T>
|
||||
Singleton<T>::Singleton()
|
||||
{
|
||||
if(instance_ != 0)
|
||||
{
|
||||
throw PreconditionException("Attempt to double-initialize singleton.");
|
||||
}
|
||||
|
||||
instance_ = static_cast<T*>(this); // cast self to type of T*
|
||||
}
|
||||
|
||||
template<class T>
|
||||
Singleton<T>::~Singleton()
|
||||
{
|
||||
}
|
||||
|
||||
template<class T>
|
||||
T* Singleton<T>::instance_(0);
|
||||
|
||||
|
@ -5,10 +5,10 @@
|
||||
// James Turk (jpt2433@rit.edu)
|
||||
//
|
||||
// Version:
|
||||
// $Id: Task.hpp,v 1.4 2005/08/07 07:12:46 cozman Exp $
|
||||
// $Id: Task.hpp,v 1.2 2005/11/13 07:59:48 cozman Exp $
|
||||
|
||||
#ifndef PHOTON_TASK_HPP
|
||||
#define PHOTON_TASK_HPP
|
||||
#ifndef PHOTON_UTIL_TASK_HPP
|
||||
#define PHOTON_UTIL_TASK_HPP
|
||||
|
||||
#include <string>
|
||||
|
||||
@ -16,33 +16,41 @@
|
||||
|
||||
namespace photon
|
||||
{
|
||||
namespace util
|
||||
{
|
||||
|
||||
// Type: TaskPriority
|
||||
// Title: Task
|
||||
|
||||
// Group: Task-Related
|
||||
// Two helper types related to the <Task> class.
|
||||
|
||||
// Enum: PriorityLevel
|
||||
// Enumeration defining priority of a Task.
|
||||
//
|
||||
// Values:
|
||||
// PRI_HIGHEST - Highest priority available.
|
||||
// PRI_HIGH - Lower-than-usual priority.
|
||||
// PRI_NORMAL - Normal priority, suitable for most tasks.
|
||||
// PRI_LOW - Lower-than-usual priority.
|
||||
// PRI_LOWEST - Lowest priority available.
|
||||
enum PriorityLevel
|
||||
{
|
||||
PRI_APP_UPDATE, // special priority for Application updating (first)
|
||||
|
||||
// user-level priorities all lie in logic area
|
||||
PRI_HIGHEST,
|
||||
PRI_HIGH,
|
||||
PRI_NORMAL,
|
||||
PRI_LOW,
|
||||
PRI_LOWEST,
|
||||
|
||||
PRI_VIDEO_UPDATE, // special priority for clearing screen/video buffers
|
||||
PRI_RENDER // special priority for rendering (right after clear)
|
||||
|
||||
// It is also important that no priorities fall between render/app update
|
||||
// so that flow of applications is:
|
||||
// 1) Update & SwapBuffers
|
||||
// 2) Logic & User Level tasks
|
||||
// 3) Clear screen/buffers
|
||||
// 4) Render
|
||||
// 5) SwapBuffers again (see step 1)
|
||||
PRI_LOWEST
|
||||
};
|
||||
|
||||
// Type: TaskPtr
|
||||
// Pointer to a task, used since Task is abstract and will always be accessed
|
||||
// via a pointer.
|
||||
class Task;
|
||||
typedef shared_ptr<Task> TaskPtr;
|
||||
|
||||
// Class: Task
|
||||
// Abstract class for tasks, which are runnable classes for use with <Kernel>.
|
||||
// Abstract class for tasks, which are runnable classes for use with
|
||||
// <TaskManager>.
|
||||
//
|
||||
// When writing a task, only update() needs to be overloaded.
|
||||
class Task
|
||||
@ -54,9 +62,9 @@ public:
|
||||
//
|
||||
// Parameters:
|
||||
// name - Name for task, must be unique!
|
||||
// priority - Optional argument for desired priority for the Task,
|
||||
// controls order in which tasks are run by the <Kernel>.
|
||||
// Default Priority is PRI_NORMAL
|
||||
// priority - Optional <PriorityLevel> argument for desired priority for
|
||||
// the Task, controls order in which tasks are run by the
|
||||
// <TaskManager>. Default Priority is PRI_NORMAL.
|
||||
Task(const std::string& name, PriorityLevel priority=PRI_NORMAL);
|
||||
|
||||
// Function: ~Task
|
||||
@ -68,7 +76,11 @@ public:
|
||||
// Function: update
|
||||
// Pure virtual, every child task must overload it's own update(), when a
|
||||
// task is active this is called every 'frame.'
|
||||
virtual void update()=0;
|
||||
//
|
||||
// Parameters:
|
||||
// timeDelta - The time elapsed between frames, possibly fixed via
|
||||
// <Application::setFixedUpdateStep>.
|
||||
virtual void update(scalar timeDelta)=0;
|
||||
|
||||
// Function: onStart
|
||||
// Virtual function, overload to define behavior when the task is started.
|
||||
@ -83,8 +95,8 @@ public:
|
||||
// task is paused.
|
||||
//
|
||||
// Note:
|
||||
// Children of onPause should call Task::onPause to let the task know it's
|
||||
// been paused.
|
||||
// Derived tasks with overloaded onPause methods should call Task::onPause
|
||||
// to let the task know it's been paused.
|
||||
virtual void onPause();
|
||||
|
||||
// Function: onUnpause
|
||||
@ -92,13 +104,13 @@ public:
|
||||
// task is unpaused.
|
||||
//
|
||||
// Note:
|
||||
// Children of onUnpause should call Task::onUnpause to let the task know
|
||||
// it's been paused.
|
||||
// Derived tasks with overloaded onUnpaus methods should call
|
||||
// Task::onUnpause to let the task know it's been paused.
|
||||
virtual void onUnpause();
|
||||
|
||||
// Function: kill
|
||||
// Sets state of application to dead, dead tasks remove themselves from
|
||||
// the Kernel's task pool.
|
||||
// Sets state of task to dead, dead tasks remove themselves from the
|
||||
// <TaskManager>'s task pool.
|
||||
void kill();
|
||||
|
||||
// Group: Accessors
|
||||
@ -139,11 +151,7 @@ private:
|
||||
bool paused_; // if false task won't be executed
|
||||
};
|
||||
|
||||
// Type: TaskPtr
|
||||
// Pointer to a task, used since Task is abstract and will always be accessed
|
||||
// via a pointer.
|
||||
typedef shared_ptr<Task> TaskPtr;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif //PHOTON_TASK_HPP
|
||||
#endif //PHOTON_UTIL_TASK_HPP
|
@ -5,61 +5,57 @@
|
||||
// James Turk (jpt2433@rit.edu)
|
||||
//
|
||||
// Version:
|
||||
// $Id: Kernel.hpp,v 1.3 2005/08/07 07:12:46 cozman Exp $
|
||||
// $Id: TaskManager.hpp,v 1.2 2005/11/13 07:59:48 cozman Exp $
|
||||
|
||||
#ifndef PHOTON_KERNEL_HPP
|
||||
#define PHOTON_KERNEL_HPP
|
||||
#ifndef PHOTON_UTIL_TASKMANAGER_HPP
|
||||
#define PHOTON_UTIL_TASKMANAGER_HPP
|
||||
|
||||
#include <list>
|
||||
#include <algorithm>
|
||||
|
||||
#include "util/Singleton.hpp"
|
||||
#include "Task.hpp"
|
||||
|
||||
namespace photon
|
||||
{
|
||||
namespace util
|
||||
{
|
||||
|
||||
// Class: Kernel
|
||||
// Kernel class, maintains a list of <Tasks> and manages their status,
|
||||
// Class: TaskManager
|
||||
// TaskManager class, maintains a list of <Tasks> and manages their status,
|
||||
// handles adding, deleting, pausing, and unpausing tasks.
|
||||
//
|
||||
// To use Kernel:
|
||||
// - (1) Add any tasks (should be derived from <Task>)
|
||||
// - (2) call <Kernel::run>
|
||||
// - (3) in order to avoid running forever, all tasks should eventually die
|
||||
class Kernel : public util::Singleton<Kernel>
|
||||
// To use TaskManager:
|
||||
// - Add any tasks (should be derived from <Task>)
|
||||
// - Call step() every frame when task should update.
|
||||
class TaskManager
|
||||
{
|
||||
|
||||
// Group: (Con/De)structors
|
||||
public:
|
||||
// Function: Kernel
|
||||
// Kernel constructor, initializes kernel singleton.
|
||||
Kernel();
|
||||
// Function: TaskManager
|
||||
// TaskManager constructor, initializes task manager
|
||||
TaskManager();
|
||||
|
||||
// Function: ~Kernel
|
||||
// Kernel destructor, destroys kernel singleton.
|
||||
~Kernel();
|
||||
// Function: ~TaskManager
|
||||
// TaskManager destructor, destroys task manager
|
||||
~TaskManager();
|
||||
|
||||
// Group: Running
|
||||
public:
|
||||
// Function: step
|
||||
// Steps the kernel, calling each active task once.
|
||||
// Steps the task manager, calling each active task once.
|
||||
//
|
||||
// Each 'step' all tasks are run in order of their priorities, if two
|
||||
// tasks have the same priority, they are run in the order they were added.
|
||||
void step();
|
||||
|
||||
// Function: run
|
||||
// Runs tasks until all tasks are asleep or dead.
|
||||
//
|
||||
// See Also:
|
||||
// <step>
|
||||
void run();
|
||||
// Parameters:
|
||||
// timeDelta - The time elapsed between frames.
|
||||
void step(scalar timeDelta);
|
||||
|
||||
// Group: Task Management
|
||||
public:
|
||||
// Function: addTask
|
||||
// Add a new <Task> to the Kernel's list. All tasks MUST have unique
|
||||
// Add a new <Task> to the TaskManager's list. All tasks MUST have unique
|
||||
// names.
|
||||
//
|
||||
// Parameters:
|
||||
@ -67,7 +63,7 @@ public:
|
||||
void addTask(TaskPtr task);
|
||||
|
||||
// Function: killTask
|
||||
// Kill a task in the Kernel task list.
|
||||
// Kill a task in the TaskManager task list.
|
||||
// Dead tasks are removed in next loop through tasks.
|
||||
//
|
||||
// Parameters:
|
||||
@ -75,14 +71,14 @@ public:
|
||||
void killTask(const std::string& taskName);
|
||||
|
||||
// Function: pauseTask
|
||||
// Pause a task in the Kernel task list.
|
||||
// Pause a task in the TaskManager task list.
|
||||
//
|
||||
// Parameters:
|
||||
// taskName - Name of task to pause.
|
||||
void pauseTask(const std::string& taskName);
|
||||
|
||||
// Function: unpauseTask
|
||||
// Unpause a task in the Kernel task list.
|
||||
// Unpause a task in the TaskManager task list.
|
||||
//
|
||||
// Parameters:
|
||||
// taskName - Name of task to unpause.
|
||||
@ -107,6 +103,7 @@ private:
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif //PHOTON_KERNEL_HPP
|
||||
#endif //PHOTON_UTIL_TASKMANAGER_HPP
|
@ -5,7 +5,7 @@
|
||||
// James Turk (jpt2433@rit.edu)
|
||||
//
|
||||
// Version:
|
||||
// $Id: Timer.hpp,v 1.4 2005/08/08 07:27:50 cozman Exp $
|
||||
// $Id: Timer.hpp,v 1.5 2005/11/13 07:59:48 cozman Exp $
|
||||
|
||||
#ifndef PHOTON_UTIL_TIMER_HPP
|
||||
#define PHOTON_UTIL_TIMER_HPP
|
||||
@ -18,7 +18,7 @@ namespace util
|
||||
|
||||
// Class: Timer
|
||||
// Class capable of keeping track of time.
|
||||
// Time is returned in double format, in seconds.
|
||||
// Time is kept in double format, representing seconds.
|
||||
class Timer
|
||||
{
|
||||
|
||||
@ -30,7 +30,7 @@ public:
|
||||
//
|
||||
// Parameters:
|
||||
// appTimeLinked - Option only available on creation of timer. When true
|
||||
// timer will pause when the <Application::timer> is paused.
|
||||
// timer will pause when the Application timer is paused.
|
||||
// [default: true]
|
||||
Timer(bool appTimeLinked=true);
|
||||
|
||||
@ -57,16 +57,10 @@ public:
|
||||
public:
|
||||
// Function: getTime
|
||||
// Get time in seconds. (ie. A value of .001 means 1 millisecond.)
|
||||
//
|
||||
// Returns:
|
||||
// Time on timer, in seconds.
|
||||
double getTime() const;
|
||||
|
||||
// Function: isPaused
|
||||
// Check paused/unpaused status of timer.
|
||||
//
|
||||
// Returns:
|
||||
// True if timer is paused, false if timer is running.
|
||||
bool isPaused() const;
|
||||
|
||||
private:
|
||||
|
@ -5,7 +5,7 @@
|
||||
// James Turk (jpt2433@rit.edu)
|
||||
//
|
||||
// Version:
|
||||
// $Id: VersionInfo.hpp,v 1.7 2005/07/18 06:18:51 cozman Exp $
|
||||
// $Id: VersionInfo.hpp,v 1.8 2005/11/13 07:59:48 cozman Exp $
|
||||
|
||||
#ifndef PHOTON_UTIL_VERSIONINFO_HPP
|
||||
#define PHOTON_UTIL_VERSIONINFO_HPP
|
||||
@ -20,7 +20,7 @@ namespace util
|
||||
|
||||
// Class: VersionInfo
|
||||
// Class which stores version information, such as release numbers.
|
||||
// Format is majorRelease.Minor.Release [ExtraInfo].
|
||||
// Format is Major.Minor.Patch [ExtraInfo].
|
||||
//
|
||||
// Operators:
|
||||
// - VersionInfo < VersionInfo
|
||||
@ -35,12 +35,12 @@ public:
|
||||
// Group: Variables
|
||||
|
||||
// Variable: majorRelease
|
||||
// major release version number, should be changed when major changes take
|
||||
// Major release version number, should be changed when major changes take
|
||||
// place.
|
||||
unsigned int majorRelease;
|
||||
|
||||
// Variable: minor
|
||||
// minor release version number, should be changed when key features are
|
||||
// Minor release version number, should be changed when key features are
|
||||
// added/removed/changed.
|
||||
unsigned int minorRelease;
|
||||
|
||||
@ -54,7 +54,7 @@ public:
|
||||
std::string extra;
|
||||
|
||||
// Group: (Con/De)structors
|
||||
|
||||
public:
|
||||
// Function: VersionInfo
|
||||
// Default constructor.
|
||||
VersionInfo();
|
||||
@ -63,7 +63,7 @@ public:
|
||||
// Initializing constructor.
|
||||
//
|
||||
// Parameters:
|
||||
// maj - majorRelease version number.
|
||||
// maj - Major version number.
|
||||
// min - Minor version number.
|
||||
// pat - Patch number.
|
||||
// ext - Extra info string. [default: ""]
|
||||
|
@ -5,7 +5,7 @@
|
||||
// James Turk (jpt2433@rit.edu)
|
||||
//
|
||||
// Version:
|
||||
// $Id: filesys.hpp,v 1.4 2005/07/20 07:30:13 cozman Exp $
|
||||
// $Id: filesys.hpp,v 1.5 2005/11/13 07:59:48 cozman Exp $
|
||||
|
||||
#ifndef PHOTON_UTIL_FILESYS_FILESYS_HPP
|
||||
#define PHOTON_UTIL_FILESYS_FILESYS_HPP
|
||||
@ -18,6 +18,34 @@
|
||||
#include <vector>
|
||||
|
||||
// Title: filesys::
|
||||
// The util::filesys:: namespace is a group of functions all related to dealing
|
||||
// with the filesystem. Photon uses PhysFS (http://physfs.icculus.org) to
|
||||
// provide this functionality.
|
||||
//
|
||||
// The Search Path:
|
||||
// The search path is an important concept in Photon, due to the nature of
|
||||
// PhysFS when a file is referenced Photon attempts to resolve it by checking
|
||||
// for it within the search path. By default the search path only includes
|
||||
// the directory where the application resides. Nothing which is not within
|
||||
// this directory or a directory within it can be accessed.
|
||||
//
|
||||
// It is possible to add other directories to the search path using
|
||||
// <addToSearchPath>. Keep in mind that the search path is a list of
|
||||
// directories which will be searched in order for any requested files.
|
||||
// In other words if you wish to store your game media in a format like:
|
||||
// | game/
|
||||
// | bin/
|
||||
// | images/
|
||||
// | audio/
|
||||
// | user-audio/
|
||||
// |
|
||||
//
|
||||
// You will need to add images/ and audio/ to the search path since they
|
||||
// do not reside within bin (where the game is stored). Also assuming
|
||||
// users are allowed to place custom audio files within user-audio/ you must
|
||||
// also add it to the path. If you wish for files within it to override
|
||||
// existing audio files, it should preceed audio/ in the search path, otherwise
|
||||
// it should come be placed in the search path after audio/.
|
||||
|
||||
namespace photon
|
||||
{
|
||||
@ -30,21 +58,24 @@ namespace filesys
|
||||
|
||||
// Function: getCDDirs
|
||||
// Gets a listing of the CD directories on a system (not supported on all
|
||||
// systems)
|
||||
// systems) On Windows it would return something like D:/ or E:/, whereas on
|
||||
// Linux it would return something like /media/cdrom0.
|
||||
//
|
||||
// Returns:
|
||||
// A vector of strings containing the path to the CD directories.
|
||||
std::vector<std::string> getCDDirs();
|
||||
|
||||
// Function: getBaseDir
|
||||
// Get the path to the directory that the application is running in.
|
||||
// Get the path of the directory that the application is running in.
|
||||
//
|
||||
// Returns:
|
||||
// Path to directory that application is running from.
|
||||
std::string getBaseDir();
|
||||
|
||||
// Function: getUserDir
|
||||
// Get the path to the directory that the OS specifies for the user's home.
|
||||
// Get the path of the directory that the OS specifies for the user's home.
|
||||
// On Windows would resemble C:/Documents and Settings/User, on Linux something
|
||||
// like /home/user/
|
||||
//
|
||||
// Returns:
|
||||
// Path to user's home directory.
|
||||
@ -69,8 +100,7 @@ void addToSearchPath(const std::string& dir, bool append=true);
|
||||
// Removes a directory from the search path, if it exists on the path.
|
||||
//
|
||||
// Parameters:
|
||||
// dir - Directory to remove from the search path, if it doesn't exist
|
||||
// nothing happens.
|
||||
// dir - Directory to remove from the search path. Ignored if nonexistant.
|
||||
//
|
||||
// See Also:
|
||||
// <addToSearchPath>
|
||||
@ -91,7 +121,8 @@ std::vector<std::string> getSearchPath();
|
||||
// Group: Manipulation /////////////////////////////////////////////////////////
|
||||
|
||||
// Function: setWriteDir
|
||||
// Sets the writing directory, used by <mkdir> and <remove>.
|
||||
// Sets the writing directory, used by <mkdir> and <remove>. Unlike search
|
||||
// path only one writable directory can be set at once.
|
||||
//
|
||||
// Parameters:
|
||||
// dir - Directory to make writeable
|
||||
|
@ -5,7 +5,7 @@
|
||||
// James Turk (jpt2433@rit.edu)
|
||||
//
|
||||
// Version:
|
||||
// $Id: Color.hpp,v 1.1 2005/03/02 08:40:11 cozman Exp $
|
||||
// $Id: Color.hpp,v 1.2 2005/11/13 07:59:49 cozman Exp $
|
||||
|
||||
#ifndef PHOTON_VIDEO_COLOR_HPP
|
||||
#define PHOTON_VIDEO_COLOR_HPP
|
||||
@ -23,6 +23,8 @@ namespace video
|
||||
// Class for storing components of a color.
|
||||
//
|
||||
// Operators:
|
||||
// - Color = Color
|
||||
// - Color == Color
|
||||
// - ostream& << Color
|
||||
class Color
|
||||
{
|
||||
@ -65,7 +67,7 @@ public:
|
||||
|
||||
// Group: Utility
|
||||
public:
|
||||
// Functions: setColor
|
||||
// Function: setColor
|
||||
// Creates color, component by component.
|
||||
//
|
||||
// Parameters:
|
||||
@ -75,7 +77,7 @@ public:
|
||||
// a - Value for alpha component. [default: 255]
|
||||
void setColor(ubyte r, ubyte g, ubyte b, ubyte a=255);
|
||||
|
||||
// Functions: makeGLColor
|
||||
// Function: makeGLColor
|
||||
// Makes the Color the current openGL color. (glColor4ub)
|
||||
void makeGLColor() const;
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
// James Turk (jpt2433@rit.edu)
|
||||
//
|
||||
// Version:
|
||||
// $Id: Font.hpp,v 1.7 2005/07/18 07:19:48 cozman Exp $
|
||||
// $Id: Font.hpp,v 1.9 2005/11/13 07:59:49 cozman Exp $
|
||||
|
||||
#ifndef PHOTON_VIDEO_FONT_HPP
|
||||
#define PHOTON_VIDEO_FONT_HPP
|
||||
@ -23,16 +23,19 @@ class StreamFlusher { };
|
||||
std::ostream& operator<<(std::ostream& os, const StreamFlusher& rhs);
|
||||
|
||||
// Class: Font
|
||||
// Simple OO wrapper around a TrueType font that can be drawn to textures and
|
||||
// rendered via OpenGL.
|
||||
// Simple wrapper object around a TrueType font that can be drawn to textures
|
||||
// and rendered via OpenGL.
|
||||
//
|
||||
// Since Font is a child of <ResourceManaged>, all memory management is
|
||||
// taken care of.
|
||||
//
|
||||
// Font is a resource managed class, and therefore all resources should
|
||||
// be registered using <Font::addResource> and then loaded by their assigned
|
||||
// name via <Font::open> or the appropriate constructor.
|
||||
//
|
||||
// Operators:
|
||||
// - Font = Font
|
||||
// - bool : True if font is loaded, false if not.
|
||||
// - ostream& << Font
|
||||
class Font : public ResourceManaged<FontResourceManager>
|
||||
{
|
||||
// Group: (Con/De)structors
|
||||
@ -98,24 +101,73 @@ public:
|
||||
|
||||
// Group: Drawing
|
||||
public:
|
||||
|
||||
// Function: drawText
|
||||
// Draw text to screen at a specific position, using an printf-style
|
||||
// format string.
|
||||
//
|
||||
// Parameters:
|
||||
// x - X position to start drawing text at
|
||||
// y - Y position to start drawing text at.
|
||||
// str - printf-style format string
|
||||
// ... - optional variable arguments referenced in str
|
||||
void drawText(scalar x, scalar y, const char *str, ...) const;
|
||||
|
||||
// Function: drawText
|
||||
// Draw text to screen at a specific position.
|
||||
//
|
||||
// Parameters:
|
||||
// x - X position to start drawing text at
|
||||
// y - Y position to start drawing text at.
|
||||
// str - Text to draw at specified posiiton.
|
||||
void drawText(scalar x, scalar y, const std::string& str) const;
|
||||
|
||||
// Function: beginDraw
|
||||
// Begin drawing of text using C++ style output streams.
|
||||
//
|
||||
// Parameters:
|
||||
// x - X position to start drawing text at
|
||||
// y - Y position to start drawing text at.
|
||||
//
|
||||
// Returns:
|
||||
// std::ostream reference, anything written to the stream before
|
||||
// <endDraw> will be drawn starting at the specified position.
|
||||
std::ostream& beginDraw(scalar x, scalar y);
|
||||
|
||||
// Function: endDraw
|
||||
// End drawing of text started with <beginDraw>.
|
||||
// Should be passed to the open beginDraw stream, flushing and writing the
|
||||
// stream to the display.
|
||||
StreamFlusher endDraw();
|
||||
|
||||
// Group: Font Metrics
|
||||
public:
|
||||
|
||||
// Function: calcStringWidth
|
||||
// Calculate the width of a string when drawn in the current font.
|
||||
//
|
||||
// Parameters:
|
||||
// str - String to calculate the width of.
|
||||
//
|
||||
// Returns:
|
||||
// Width of string (in pixels) when drawn in current font.
|
||||
uint calcStringWidth(const std::string& str) const;
|
||||
|
||||
// Function: getHeight
|
||||
// Get height of the font, which is essentially equal to the height of the
|
||||
// tallest character plus a font-specified spacing.
|
||||
//
|
||||
// Returns:
|
||||
// Height of the loaded font.
|
||||
uint getHeight() const;
|
||||
|
||||
// Group: Resource Creation
|
||||
public:
|
||||
// Function: addResource
|
||||
// Define a new named resource.
|
||||
// (Ex. Image::addResource("monkey","images/monkey.png") would
|
||||
// make it so that any attempts to load "monkey" would load the image
|
||||
// images/monkey.png)
|
||||
// (Ex. Font::addResource("sans","freesans.ttf") would
|
||||
// make it so that any attempts to load "sans" would load the font
|
||||
// freesans.ttf)
|
||||
//
|
||||
// Parameters:
|
||||
// name - Name to give to resource.
|
||||
@ -125,10 +177,10 @@ public:
|
||||
|
||||
// Function: addResource
|
||||
// Define a new unaliased resource. (name == path).
|
||||
// (Ex. Image::addResource("images/monkey.png") is essentially the same as
|
||||
// Image::addResource("images/monkey.png","images/monkey.png")
|
||||
// (Ex. Font::addResource("freesans.ttf") is essentially the same as
|
||||
// Font::addResource("freesans.ttf","freesans.ttf")
|
||||
//
|
||||
// Parameters:.
|
||||
// Parameters:
|
||||
// path - Path of resource data file.
|
||||
static void addResource(const std::string& path, uint size);
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
// James Turk (jpt2433@rit.edu)
|
||||
//
|
||||
// Version:
|
||||
// $Id: Image.hpp,v 1.2 2005/07/18 07:19:48 cozman Exp $
|
||||
// $Id: Image.hpp,v 1.3 2005/11/13 07:59:49 cozman Exp $
|
||||
|
||||
#ifndef PHOTON_VIDEO_IMAGE_HPP
|
||||
#define PHOTON_VIDEO_IMAGE_HPP
|
||||
@ -21,17 +21,15 @@ namespace video
|
||||
// Image is a class which is used to store a single image, for use in 2D games.
|
||||
//
|
||||
// Image is derived from <Texture>, which is a resource managed class.
|
||||
// <Texture> is a simple OO wrapper around the concept of a texture in OpenGL.
|
||||
// An Image simply adds the ability to draw to a quad, as well as some rotation
|
||||
// per-vertex tinting, and several other bonuses.
|
||||
// An Image simply adds the ability to draw to a quad, as well as some scaling,
|
||||
// rotation, per-vertex tinting, and several other bonuses.
|
||||
//
|
||||
// Since Image is a child of <ResourceManaged>, all memory management is taken
|
||||
// care of.
|
||||
//
|
||||
// Operators:
|
||||
// - Texture = Texture
|
||||
// - operator bool
|
||||
// - ostream& << Texture
|
||||
// - Image = Image
|
||||
// - bool : True if texture is loaded, false if not.
|
||||
class Image : public Texture
|
||||
{
|
||||
|
||||
@ -67,7 +65,7 @@ public:
|
||||
// Opens an image file, currently supported image types are BMP, GIF, JPEG,
|
||||
// PCX, PNG, and TGA. (Images can be any dimensions)
|
||||
//
|
||||
// Loading is done via <a href="http://corona.sf.net">Corona</a>.
|
||||
// Loading is done via Corona (<http://corona.sf.net>)
|
||||
//
|
||||
// Parameters:
|
||||
// name - Name of the Image <Resource> to open.
|
||||
|
@ -5,7 +5,7 @@
|
||||
// James Turk (jpt2433@rit.edu)
|
||||
//
|
||||
// Version:
|
||||
// $Id: Pen.hpp,v 1.3 2005/07/20 03:58:54 cozman Exp $
|
||||
// $Id: Pen.hpp,v 1.5 2005/11/13 07:59:49 cozman Exp $
|
||||
|
||||
#ifndef PHOTON_VIDEO_PEN_HPP
|
||||
#define PHOTON_VIDEO_PEN_HPP
|
||||
@ -25,7 +25,8 @@ namespace video
|
||||
// Class which is used for drawing primitives.
|
||||
//
|
||||
// Each instance of pen has a color, and the various members simply draw
|
||||
// primitives in that color.
|
||||
// primitives in that color. Since it is possible to change the color
|
||||
// associated with a pen, there is often no need for multiple instances of Pen.
|
||||
class Pen
|
||||
{
|
||||
|
||||
@ -134,6 +135,9 @@ public:
|
||||
// data members
|
||||
private:
|
||||
Color color_;
|
||||
|
||||
// 30 seems to be an even tradeoff between speed and roundness
|
||||
static const int CIRCLE_RESOLUTION = 30;
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -5,7 +5,7 @@
|
||||
// James Turk (jpt2433@rit.edu)
|
||||
//
|
||||
// Version:
|
||||
// $Id: Texture.hpp,v 1.4 2005/07/04 03:06:48 cozman Exp $
|
||||
// $Id: Texture.hpp,v 1.5 2005/11/13 07:59:49 cozman Exp $
|
||||
|
||||
#ifndef PHOTON_VIDEO_TEXTURE_HPP
|
||||
#define PHOTON_VIDEO_TEXTURE_HPP
|
||||
@ -19,18 +19,19 @@ namespace video
|
||||
{
|
||||
|
||||
// Class: Texture
|
||||
// Simple OO wrapper around the concept of a texture in openGL.
|
||||
// Simple OO wrapper around the concept of a texture in OpenGL.
|
||||
//
|
||||
// Since Texture is a child of <ResourceManaged>, all memory management is
|
||||
// taken care of.
|
||||
//
|
||||
// Texture loading is done via Corona (<http://corona.sf.net>)
|
||||
//
|
||||
// Children:
|
||||
// <Image>
|
||||
//
|
||||
// Operators:
|
||||
// - Texture = Texture
|
||||
// - bool : True if texture is loaded, false if not.
|
||||
// - ostream& << Texture
|
||||
class Texture : public ResourceManaged<TextureResourceManager>
|
||||
{
|
||||
|
||||
@ -65,7 +66,7 @@ public:
|
||||
// Opens an image file, currently supported image types are BMP, GIF, JPEG,
|
||||
// PCX, PNG, and TGA.
|
||||
//
|
||||
// Loading is done via <a href="http://corona.sf.net">Corona</a>.
|
||||
// Loading is done via Corona (<http://corona.sf.net>)
|
||||
//
|
||||
// Parameters:
|
||||
// name - Name of the Texture <Resource> to open.
|
||||
@ -102,7 +103,7 @@ public:
|
||||
|
||||
// Function: addResource
|
||||
// Define a new named resource.
|
||||
// (Ex. Image::addResource("monkey","images/monkey.png") would
|
||||
// (Ex. Texture::addResource("monkey","images/monkey.png") would
|
||||
// make it so that any attempts to load "monkey" would load the image
|
||||
// images/monkey.png)
|
||||
//
|
||||
@ -113,10 +114,10 @@ public:
|
||||
|
||||
// Function: addResource
|
||||
// Define a new unaliased resource. (name == path).
|
||||
// (Ex. Image::addResource("images/monkey.png") is essentially the same as
|
||||
// Image::addResource("images/monkey.png","images/monkey.png")
|
||||
// (Ex. Texture::addResource("images/monkey.png") is essentially the same
|
||||
// as Texture::addResource("images/monkey.png","images/monkey.png")
|
||||
//
|
||||
// Parameters:.
|
||||
// Parameters:
|
||||
// path - Path of resource data file.
|
||||
static void addResource(const std::string& path);
|
||||
|
||||
|
@ -1,183 +0,0 @@
|
||||
//This file is part of Photon (http://photon.sourceforge.net)
|
||||
//Copyright (C) 2004-2005 James Turk
|
||||
//
|
||||
// Author:
|
||||
// James Turk (jpt2433@rit.edu)
|
||||
//
|
||||
// Version:
|
||||
// $Id: VideoCore.hpp,v 1.5 2005/08/02 23:07:52 cozman Exp $
|
||||
|
||||
#ifndef PHOTON_VIDEO_VIDEOCORE_HPP
|
||||
#define PHOTON_VIDEO_VIDEOCORE_HPP
|
||||
|
||||
#include "types.hpp"
|
||||
#include "Task.hpp"
|
||||
|
||||
namespace photon
|
||||
{
|
||||
namespace video
|
||||
{
|
||||
|
||||
// Class: VideoCore
|
||||
// Photon's core for graphics behavior. Defines the interface through which
|
||||
// all graphics related functions are performed.
|
||||
//
|
||||
// VideoCore is the Core that interfaces with the actual drawing/updating of
|
||||
// the display.
|
||||
//
|
||||
// See Also:
|
||||
// <AppCore>
|
||||
class VideoCore
|
||||
{
|
||||
// Group: (Con/De)structors
|
||||
public:
|
||||
// Function: VideoCore
|
||||
// Initialize underlying APIs and setup <Task> internals.
|
||||
//
|
||||
// Parameters:
|
||||
// width - Width of display.
|
||||
// height - height of display
|
||||
VideoCore(uint width, uint height);
|
||||
|
||||
// Function: ~VideoCore
|
||||
// Shutdown underlying APIs.
|
||||
~VideoCore();
|
||||
|
||||
// Group: Viewport
|
||||
// Functions to set the working viewport and perspective. Orthographic and
|
||||
// standard 3D perspective modes are available.
|
||||
public:
|
||||
// Function: setOrthoView
|
||||
// Sets new ortho viewport within a rectangular portion of the screen.
|
||||
// All drawing is relative to the rectangle, x,y becomes 0,0 and anything
|
||||
// drawn outside rect is clipped.
|
||||
//
|
||||
// Parameters:
|
||||
// x - X coord for top left corner of new viewport.
|
||||
// y - Y coord for top left corner of new viewport.
|
||||
// viewWidth - Width of new viewport.
|
||||
// viewHeight - Height of new viewport.
|
||||
// orthoWidth - Width of ortho perspective.
|
||||
// orthoHeight - Height of ortho perspective.
|
||||
void setOrthoView(int x, int y, int viewWidth, int viewHeight,
|
||||
scalar orthoWidth, scalar orthoHeight);
|
||||
|
||||
// Function: setOrthoView
|
||||
// Sets entire screen as current viewport with a given ortho perspective.
|
||||
//
|
||||
// Parameters:
|
||||
// width - Width of view.
|
||||
// height - Height of view.
|
||||
void setOrthoView(scalar width, scalar height);
|
||||
|
||||
// Function: setOrthoView
|
||||
// Sets entire screen as current viewport with a given ortho perspective.
|
||||
void setOrthoView();
|
||||
|
||||
// Group: Perspective
|
||||
public:
|
||||
// Function: setPerspectiveView
|
||||
// Creates a viewport with a given 3D perspective inside of a rectangular
|
||||
// portion of the screen.
|
||||
//
|
||||
// Parameters:
|
||||
// x - X coord for top left corner of new viewport.
|
||||
// y - Y coord for top left corner of new viewport.
|
||||
// width - Width of new viewport.
|
||||
// height - Height of new viewport.
|
||||
// fovy - The y axis field of view angle, in degrees.
|
||||
// zNear - Distance from viewer to near clipping plane.
|
||||
// zFar - Distance from viewer to far clipping plane.
|
||||
void setPerspectiveView(int x, int y, int width, int height,
|
||||
scalar fovy, scalar zNear, scalar zFar);
|
||||
|
||||
// Function: setPerspectiveView
|
||||
// Sets entire screen as current viewport with a given 3D perspective.
|
||||
//
|
||||
// Same as call to setPerspective
|
||||
//
|
||||
// Parameters:
|
||||
// fovy - The y axis field of view angle, in degrees.
|
||||
// zNear - Distance from viewer to near clipping plane.
|
||||
// zFar - Distance from viewer to far clipping plane.
|
||||
void setPerspectiveView(scalar fovy, scalar zNear, scalar zFar);
|
||||
|
||||
// Group: Viewport/Projection
|
||||
// These functions are called by the above Ortho/Perspective functions, very
|
||||
// rarely do they need to be called directly.
|
||||
public:
|
||||
// Function: setViewport
|
||||
// Set the current viewport rectangle within the screen.
|
||||
void setViewport(int x, int y, int width, int height);
|
||||
|
||||
// Function: setOrthoProjection
|
||||
// Sets an orthographic projection matrix.
|
||||
//
|
||||
// Parameters:
|
||||
// width - Width of view.
|
||||
// height - Height of view.
|
||||
void setOrthoProjection(scalar width, scalar height);
|
||||
|
||||
// Function: setPerspectiveProjection
|
||||
// Sets a perspective projection matrix.
|
||||
//
|
||||
// Parameters:
|
||||
// fovy - The y axis field of view angle, in degrees.
|
||||
// zNear - Distance from viewer to near clipping plane.
|
||||
// zFar - Distance from viewer to far clipping plane.
|
||||
void setPerspectiveProjection(scalar fovy, scalar zNear, scalar zFar);
|
||||
|
||||
// Group: Display
|
||||
public:
|
||||
// Function: setDisplaySize
|
||||
// Set the new display size, should be called whenever window size changes.
|
||||
//
|
||||
// Parameters:
|
||||
// width - Width of display.
|
||||
// height - height of display
|
||||
void setDisplaySize(uint width, uint height);
|
||||
|
||||
// Function: getDisplayWidth
|
||||
// Get the width of the display.
|
||||
//
|
||||
// Returns:
|
||||
// Width of display in pixels.
|
||||
uint getDisplayWidth();
|
||||
|
||||
// Function: getDisplayHeight
|
||||
// Get the height of the display.
|
||||
//
|
||||
// Returns:
|
||||
// Height of display in pixels.
|
||||
uint getDisplayHeight();
|
||||
|
||||
// behind the scenes
|
||||
private:
|
||||
void initOpenGL(); // set desired OpenGL options
|
||||
|
||||
// UpdateTask, does the updating work of VideoCore, registered as a Task
|
||||
// so that user need not call something akin to VideoCore::update() every
|
||||
// frame
|
||||
class UpdateTask : public Task
|
||||
{
|
||||
|
||||
friend class VideoCore;
|
||||
|
||||
public:
|
||||
UpdateTask();
|
||||
|
||||
void update();
|
||||
};
|
||||
|
||||
// data members
|
||||
private:
|
||||
uint displayWidth_;
|
||||
uint displayHeight_;
|
||||
uint viewportWidth_;
|
||||
uint viewportHeight_;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif //PHOTON_VIDEO_VIDEOCORE_HPP
|
128
msvc/AudioTest.vcproj
Normal file
128
msvc/AudioTest.vcproj
Normal file
@ -0,0 +1,128 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="7.10"
|
||||
Name="AudioTest"
|
||||
ProjectGUID="{4E77B8F7-D926-4803-8253-743687722CD5}"
|
||||
Keyword="Win32Proj">
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"/>
|
||||
</Platforms>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="../test"
|
||||
IntermediateDirectory="Debug"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="../include"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
|
||||
MinimalRebuild="TRUE"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="5"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="TRUE"
|
||||
DebugInformationFormat="4"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="photon.lib glfw.lib opengl32.lib glu32.lib openal32.lib physfs.lib libfreetype.lib corona.lib"
|
||||
OutputFile="$(OutDir)/AudioTest.exe"
|
||||
LinkIncremental="2"
|
||||
AdditionalLibraryDirectories="../lib"
|
||||
GenerateDebugInformation="TRUE"
|
||||
ProgramDatabaseFile="$(OutDir)/AudioTest.pdb"
|
||||
SubSystem="1"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="../test"
|
||||
IntermediateDirectory="Release"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="../include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
|
||||
RuntimeLibrary="4"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="TRUE"
|
||||
DebugInformationFormat="3"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="photon.lib glfw.lib opengl32.lib glu32.lib openal32.lib physfs.lib libfreetype.lib corona.lib"
|
||||
OutputFile="$(OutDir)/AudioTest.exe"
|
||||
LinkIncremental="1"
|
||||
AdditionalLibraryDirectories="../lib"
|
||||
GenerateDebugInformation="TRUE"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
|
||||
<File
|
||||
RelativePath="..\test\Audio_test.cpp">
|
||||
</File>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
128
msvc/ConfigFileTest.vcproj
Normal file
128
msvc/ConfigFileTest.vcproj
Normal file
@ -0,0 +1,128 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="7.10"
|
||||
Name="ConfigFileTest"
|
||||
ProjectGUID="{4E77B8F7-D926-4803-8253-743687722CD5}"
|
||||
Keyword="Win32Proj">
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"/>
|
||||
</Platforms>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="../test"
|
||||
IntermediateDirectory="Debug"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="../include"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
|
||||
MinimalRebuild="TRUE"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="5"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="TRUE"
|
||||
DebugInformationFormat="4"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="photon.lib glfw.lib opengl32.lib glu32.lib physfs.lib libfreetype.lib corona.lib"
|
||||
OutputFile="$(OutDir)/ConfigFileTest.exe"
|
||||
LinkIncremental="2"
|
||||
AdditionalLibraryDirectories="../lib"
|
||||
GenerateDebugInformation="TRUE"
|
||||
ProgramDatabaseFile="$(OutDir)/ConfigFileTest.pdb"
|
||||
SubSystem="1"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="../test"
|
||||
IntermediateDirectory="Release"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="../include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
|
||||
RuntimeLibrary="4"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="TRUE"
|
||||
DebugInformationFormat="3"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="photon.lib glfw.lib opengl32.lib glu32.lib physfs.lib libfreetype.lib corona.lib"
|
||||
OutputFile="$(OutDir)/ConfigFileTest.exe"
|
||||
LinkIncremental="1"
|
||||
AdditionalLibraryDirectories="../lib"
|
||||
GenerateDebugInformation="TRUE"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
|
||||
<File
|
||||
RelativePath="..\test\ConfigFile_test.cpp">
|
||||
</File>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
128
msvc/FontTest.vcproj
Normal file
128
msvc/FontTest.vcproj
Normal file
@ -0,0 +1,128 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="7.10"
|
||||
Name="FontTest"
|
||||
ProjectGUID="{4E77B8F7-D926-4803-8253-743687722CD5}"
|
||||
Keyword="Win32Proj">
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"/>
|
||||
</Platforms>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="../test"
|
||||
IntermediateDirectory="Debug"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="../include"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
|
||||
MinimalRebuild="TRUE"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="5"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="TRUE"
|
||||
DebugInformationFormat="4"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="photon.lib glfw.lib opengl32.lib glu32.lib physfs.lib libfreetype.lib corona.lib"
|
||||
OutputFile="$(OutDir)/FontTest.exe"
|
||||
LinkIncremental="2"
|
||||
AdditionalLibraryDirectories="../lib"
|
||||
GenerateDebugInformation="TRUE"
|
||||
ProgramDatabaseFile="$(OutDir)/FontTest.pdb"
|
||||
SubSystem="1"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="../test"
|
||||
IntermediateDirectory="Release"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="../include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
|
||||
RuntimeLibrary="4"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="TRUE"
|
||||
DebugInformationFormat="3"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="photon.lib glfw.lib opengl32.lib glu32.lib physfs.lib libfreetype.lib corona.lib"
|
||||
OutputFile="$(OutDir)/FontTest.exe"
|
||||
LinkIncremental="1"
|
||||
AdditionalLibraryDirectories="../lib"
|
||||
GenerateDebugInformation="TRUE"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
|
||||
<File
|
||||
RelativePath="..\test\Font_test.cpp">
|
||||
</File>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
128
msvc/ImageTest.vcproj
Normal file
128
msvc/ImageTest.vcproj
Normal file
@ -0,0 +1,128 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="7.10"
|
||||
Name="ImageTest"
|
||||
ProjectGUID="{4E77B8F7-D926-4803-8253-743687722CD5}"
|
||||
Keyword="Win32Proj">
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"/>
|
||||
</Platforms>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="../test"
|
||||
IntermediateDirectory="Debug"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="../include"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
|
||||
MinimalRebuild="TRUE"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="5"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="TRUE"
|
||||
DebugInformationFormat="4"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="photon.lib glfw.lib opengl32.lib glu32.lib physfs.lib libfreetype.lib corona.lib"
|
||||
OutputFile="$(OutDir)/ImageTest.exe"
|
||||
LinkIncremental="2"
|
||||
AdditionalLibraryDirectories="../lib"
|
||||
GenerateDebugInformation="TRUE"
|
||||
ProgramDatabaseFile="$(OutDir)/ImageTest.pdb"
|
||||
SubSystem="1"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="../test"
|
||||
IntermediateDirectory="Release"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="../include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
|
||||
RuntimeLibrary="4"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="TRUE"
|
||||
DebugInformationFormat="3"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="photon.lib glfw.lib opengl32.lib glu32.lib physfs.lib libfreetype.lib corona.lib"
|
||||
OutputFile="$(OutDir)/ImageTest.exe"
|
||||
LinkIncremental="1"
|
||||
AdditionalLibraryDirectories="../lib"
|
||||
GenerateDebugInformation="TRUE"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
|
||||
<File
|
||||
RelativePath="..\test\Image_test.cpp">
|
||||
</File>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
128
msvc/InputTest.vcproj
Normal file
128
msvc/InputTest.vcproj
Normal file
@ -0,0 +1,128 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="7.10"
|
||||
Name="InputTest"
|
||||
ProjectGUID="{4E77B8F7-D926-4803-8253-743687722CD5}"
|
||||
Keyword="Win32Proj">
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"/>
|
||||
</Platforms>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="../test"
|
||||
IntermediateDirectory="Debug"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="../include"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
|
||||
MinimalRebuild="TRUE"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="5"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="TRUE"
|
||||
DebugInformationFormat="4"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="photon.lib glfw.lib opengl32.lib glu32.lib physfs.lib libfreetype.lib corona.lib"
|
||||
OutputFile="$(OutDir)/InputTest.exe"
|
||||
LinkIncremental="2"
|
||||
AdditionalLibraryDirectories="../lib"
|
||||
GenerateDebugInformation="TRUE"
|
||||
ProgramDatabaseFile="$(OutDir)/InputTest.pdb"
|
||||
SubSystem="1"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="../test"
|
||||
IntermediateDirectory="Release"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="../include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
|
||||
RuntimeLibrary="4"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="TRUE"
|
||||
DebugInformationFormat="3"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="photon.lib glfw.lib opengl32.lib glu32.lib physfs.lib libfreetype.lib corona.lib"
|
||||
OutputFile="$(OutDir)/InputTest.exe"
|
||||
LinkIncremental="1"
|
||||
AdditionalLibraryDirectories="../lib"
|
||||
GenerateDebugInformation="TRUE"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
|
||||
<File
|
||||
RelativePath="..\test\Input_test.cpp">
|
||||
</File>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
128
msvc/LogTest.vcproj
Normal file
128
msvc/LogTest.vcproj
Normal file
@ -0,0 +1,128 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="7.10"
|
||||
Name="LogTest"
|
||||
ProjectGUID="{4E77B8F7-D926-4803-8253-743687722CD5}"
|
||||
Keyword="Win32Proj">
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"/>
|
||||
</Platforms>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="../test"
|
||||
IntermediateDirectory="Debug"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="../include"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
|
||||
MinimalRebuild="TRUE"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="5"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="TRUE"
|
||||
DebugInformationFormat="4"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="photon.lib glfw.lib opengl32.lib glu32.lib physfs.lib libfreetype.lib corona.lib"
|
||||
OutputFile="$(OutDir)/LogTest.exe"
|
||||
LinkIncremental="2"
|
||||
AdditionalLibraryDirectories="../lib"
|
||||
GenerateDebugInformation="TRUE"
|
||||
ProgramDatabaseFile="$(OutDir)/LogTest.pdb"
|
||||
SubSystem="1"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="../test"
|
||||
IntermediateDirectory="Release"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="../include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
|
||||
RuntimeLibrary="4"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="TRUE"
|
||||
DebugInformationFormat="3"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="photon.lib glfw.lib opengl32.lib glu32.lib physfs.lib libfreetype.lib corona.lib"
|
||||
OutputFile="$(OutDir)/LogTest.exe"
|
||||
LinkIncremental="1"
|
||||
AdditionalLibraryDirectories="../lib"
|
||||
GenerateDebugInformation="TRUE"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
|
||||
<File
|
||||
RelativePath="..\test\Log_test.cpp">
|
||||
</File>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
128
msvc/PenTest.vcproj
Normal file
128
msvc/PenTest.vcproj
Normal file
@ -0,0 +1,128 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="7.10"
|
||||
Name="PenTest"
|
||||
ProjectGUID="{4E77B8F7-D926-4803-8253-743687722CD5}"
|
||||
Keyword="Win32Proj">
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"/>
|
||||
</Platforms>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="../test"
|
||||
IntermediateDirectory="Debug"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="../include"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
|
||||
MinimalRebuild="TRUE"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="5"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="TRUE"
|
||||
DebugInformationFormat="4"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="photon.lib glfw.lib opengl32.lib glu32.lib physfs.lib libfreetype.lib corona.lib"
|
||||
OutputFile="$(OutDir)/PenTest.exe"
|
||||
LinkIncremental="2"
|
||||
AdditionalLibraryDirectories="../lib"
|
||||
GenerateDebugInformation="TRUE"
|
||||
ProgramDatabaseFile="$(OutDir)/PenTest.pdb"
|
||||
SubSystem="1"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="../test"
|
||||
IntermediateDirectory="Release"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="../include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
|
||||
RuntimeLibrary="4"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="TRUE"
|
||||
DebugInformationFormat="3"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="photon.lib glfw.lib opengl32.lib glu32.lib physfs.lib libfreetype.lib corona.lib"
|
||||
OutputFile="$(OutDir)/PenTest.exe"
|
||||
LinkIncremental="1"
|
||||
AdditionalLibraryDirectories="../lib"
|
||||
GenerateDebugInformation="TRUE"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
|
||||
<File
|
||||
RelativePath="..\test\Pen_test.cpp">
|
||||
</File>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
6
msvc/README-MSVC.txt
Normal file
6
msvc/README-MSVC.txt
Normal file
@ -0,0 +1,6 @@
|
||||
These project files are currently unsupported, as is building in MSVC as I
|
||||
simply don't have time to test in MSVC which can be rather difficult since all
|
||||
development takes place using gcc.
|
||||
|
||||
If you'd like to help out with MSVC support it would be greatly appreciated.
|
||||
Please contact James <cozman@users.sf.net> if you're interested.
|
128
msvc/RandGenTest.vcproj
Normal file
128
msvc/RandGenTest.vcproj
Normal file
@ -0,0 +1,128 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="7.10"
|
||||
Name="RandGenTest"
|
||||
ProjectGUID="{4E77B8F7-D926-4803-8253-743687722CD5}"
|
||||
Keyword="Win32Proj">
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"/>
|
||||
</Platforms>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="../test"
|
||||
IntermediateDirectory="Debug"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="../include"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
|
||||
MinimalRebuild="TRUE"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="5"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="TRUE"
|
||||
DebugInformationFormat="4"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="photon.lib glfw.lib opengl32.lib glu32.lib openal32.lib physfs.lib freetype.lib"
|
||||
OutputFile="$(OutDir)/RandGenTest.exe"
|
||||
LinkIncremental="2"
|
||||
AdditionalLibraryDirectories="../lib"
|
||||
GenerateDebugInformation="TRUE"
|
||||
ProgramDatabaseFile="$(OutDir)/RandGenTest.pdb"
|
||||
SubSystem="1"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="../test"
|
||||
IntermediateDirectory="Release"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="../include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
|
||||
RuntimeLibrary="4"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="TRUE"
|
||||
DebugInformationFormat="3"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="photon.lib glfw.lib opengl32.lib glu32.lib openal32.lib physfs.lib libfreetype.lib corona.lib"
|
||||
OutputFile="$(OutDir)/RandGenTest.exe"
|
||||
LinkIncremental="1"
|
||||
AdditionalLibraryDirectories="../lib"
|
||||
GenerateDebugInformation="TRUE"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
|
||||
<File
|
||||
RelativePath="..\test\RandGen_test.cpp">
|
||||
</File>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
128
msvc/StateTest.vcproj
Normal file
128
msvc/StateTest.vcproj
Normal file
@ -0,0 +1,128 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="7.10"
|
||||
Name="StateTest"
|
||||
ProjectGUID="{4E77B8F7-D926-4803-8253-743687722CD5}"
|
||||
Keyword="Win32Proj">
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"/>
|
||||
</Platforms>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="../test"
|
||||
IntermediateDirectory="Debug"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="../include"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
|
||||
MinimalRebuild="TRUE"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="5"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="TRUE"
|
||||
DebugInformationFormat="4"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="photon.lib glfw.lib opengl32.lib glu32.lib openal32.lib physfs.lib freetype.lib"
|
||||
OutputFile="$(OutDir)/StateTest.exe"
|
||||
LinkIncremental="2"
|
||||
AdditionalLibraryDirectories="../lib"
|
||||
GenerateDebugInformation="TRUE"
|
||||
ProgramDatabaseFile="$(OutDir)/StateTest.pdb"
|
||||
SubSystem="1"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="../test"
|
||||
IntermediateDirectory="Release"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="../include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
|
||||
RuntimeLibrary="4"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="TRUE"
|
||||
DebugInformationFormat="3"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="photon.lib glfw.lib opengl32.lib glu32.lib openal32.lib physfs.lib libfreetype.lib corona.lib"
|
||||
OutputFile="$(OutDir)/StateTest.exe"
|
||||
LinkIncremental="1"
|
||||
AdditionalLibraryDirectories="../lib"
|
||||
GenerateDebugInformation="TRUE"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
|
||||
<File
|
||||
RelativePath="..\test\State_test.cpp">
|
||||
</File>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
128
msvc/TextureTest.vcproj
Normal file
128
msvc/TextureTest.vcproj
Normal file
@ -0,0 +1,128 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="7.10"
|
||||
Name="TextureTest"
|
||||
ProjectGUID="{4E77B8F7-D926-4803-8253-743687722CD5}"
|
||||
Keyword="Win32Proj">
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"/>
|
||||
</Platforms>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="../test"
|
||||
IntermediateDirectory="Debug"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="../include"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
|
||||
MinimalRebuild="TRUE"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="5"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="TRUE"
|
||||
DebugInformationFormat="4"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="photon.lib glfw.lib opengl32.lib glu32.lib physfs.lib libfreetype.lib corona.lib"
|
||||
OutputFile="$(OutDir)/TextureTest.exe"
|
||||
LinkIncremental="2"
|
||||
AdditionalLibraryDirectories="../lib"
|
||||
GenerateDebugInformation="TRUE"
|
||||
ProgramDatabaseFile="$(OutDir)/TextureTest.pdb"
|
||||
SubSystem="1"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="../test"
|
||||
IntermediateDirectory="Release"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="../include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
|
||||
RuntimeLibrary="4"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="TRUE"
|
||||
DebugInformationFormat="3"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="photon.lib glfw.lib opengl32.lib glu32.lib physfs.lib libfreetype.lib corona.lib"
|
||||
OutputFile="$(OutDir)/TextureTest.exe"
|
||||
LinkIncremental="1"
|
||||
AdditionalLibraryDirectories="../lib"
|
||||
GenerateDebugInformation="TRUE"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
|
||||
<File
|
||||
RelativePath="..\test\Texture_test.cpp">
|
||||
</File>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
128
msvc/filesysTest.vcproj
Normal file
128
msvc/filesysTest.vcproj
Normal file
@ -0,0 +1,128 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="7.10"
|
||||
Name="filesysTest"
|
||||
ProjectGUID="{4E77B8F7-D926-4803-8253-743687722CD5}"
|
||||
Keyword="Win32Proj">
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"/>
|
||||
</Platforms>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="../test"
|
||||
IntermediateDirectory="Debug"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="../include"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
|
||||
MinimalRebuild="TRUE"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="5"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="TRUE"
|
||||
DebugInformationFormat="4"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="photon.lib glfw.lib opengl32.lib glu32.lib physfs.lib libfreetype.lib corona.lib"
|
||||
OutputFile="$(OutDir)/filesysTest.exe"
|
||||
LinkIncremental="2"
|
||||
AdditionalLibraryDirectories="../lib"
|
||||
GenerateDebugInformation="TRUE"
|
||||
ProgramDatabaseFile="$(OutDir)/filesysTest.pdb"
|
||||
SubSystem="1"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="../test"
|
||||
IntermediateDirectory="Release"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="../include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
|
||||
RuntimeLibrary="4"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="TRUE"
|
||||
DebugInformationFormat="3"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="photon.lib glfw.lib opengl32.lib glu32.lib physfs.lib libfreetype.lib corona.lib"
|
||||
OutputFile="$(OutDir)/filesysTest.exe"
|
||||
LinkIncremental="1"
|
||||
AdditionalLibraryDirectories="../lib"
|
||||
GenerateDebugInformation="TRUE"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
|
||||
<File
|
||||
RelativePath="..\test\filesys_test.cpp">
|
||||
</File>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
128
msvc/mathTest.vcproj
Normal file
128
msvc/mathTest.vcproj
Normal file
@ -0,0 +1,128 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="7.10"
|
||||
Name="mathTest"
|
||||
ProjectGUID="{4E77B8F7-D926-4803-8253-743687722CD5}"
|
||||
Keyword="Win32Proj">
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"/>
|
||||
</Platforms>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="../test"
|
||||
IntermediateDirectory="Debug"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="../include"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
|
||||
MinimalRebuild="TRUE"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="5"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="TRUE"
|
||||
DebugInformationFormat="4"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="photon.lib glfw.lib opengl32.lib glu32.lib physfs.lib libfreetype.lib corona.lib"
|
||||
OutputFile="$(OutDir)/mathTest.exe"
|
||||
LinkIncremental="2"
|
||||
AdditionalLibraryDirectories="../lib"
|
||||
GenerateDebugInformation="TRUE"
|
||||
ProgramDatabaseFile="$(OutDir)/mathTest.pdb"
|
||||
SubSystem="1"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="../test"
|
||||
IntermediateDirectory="Release"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="../include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
|
||||
RuntimeLibrary="4"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="TRUE"
|
||||
DebugInformationFormat="3"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="photon.lib glfw.lib opengl32.lib glu32.lib physfs.lib libfreetype.lib corona.lib"
|
||||
OutputFile="$(OutDir)/mathTest.exe"
|
||||
LinkIncremental="1"
|
||||
AdditionalLibraryDirectories="../lib"
|
||||
GenerateDebugInformation="TRUE"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
|
||||
<File
|
||||
RelativePath="..\test\math_test.cpp">
|
||||
</File>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
129
msvc/photon.sln
Normal file
129
msvc/photon.sln
Normal file
@ -0,0 +1,129 @@
|
||||
Microsoft Visual Studio Solution File, Format Version 8.00
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "photon", "photon.vcproj", "{3CC9B3F0-83F6-4BF6-83AE-58325C833ECC}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AudioTest", "AudioTest.vcproj", "{4E77B8F7-D926-4803-8253-743687722CD5}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{3CC9B3F0-83F6-4BF6-83AE-58325C833ECC} = {3CC9B3F0-83F6-4BF6-83AE-58325C833ECC}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ConfigFileTest", "ConfigFileTest.vcproj", "{4E77B8F7-D926-4803-8253-743687722CD5}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{3CC9B3F0-83F6-4BF6-83AE-58325C833ECC} = {3CC9B3F0-83F6-4BF6-83AE-58325C833ECC}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "filesysTest", "filesysTest.vcproj", "{4E77B8F7-D926-4803-8253-743687722CD5}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{3CC9B3F0-83F6-4BF6-83AE-58325C833ECC} = {3CC9B3F0-83F6-4BF6-83AE-58325C833ECC}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FontTest", "FontTest.vcproj", "{4E77B8F7-D926-4803-8253-743687722CD5}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{3CC9B3F0-83F6-4BF6-83AE-58325C833ECC} = {3CC9B3F0-83F6-4BF6-83AE-58325C833ECC}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ImageTest", "ImageTest.vcproj", "{4E77B8F7-D926-4803-8253-743687722CD5}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{3CC9B3F0-83F6-4BF6-83AE-58325C833ECC} = {3CC9B3F0-83F6-4BF6-83AE-58325C833ECC}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "InputTest", "InputTest.vcproj", "{4E77B8F7-D926-4803-8253-743687722CD5}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{3CC9B3F0-83F6-4BF6-83AE-58325C833ECC} = {3CC9B3F0-83F6-4BF6-83AE-58325C833ECC}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LogTest", "LogTest.vcproj", "{4E77B8F7-D926-4803-8253-743687722CD5}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{3CC9B3F0-83F6-4BF6-83AE-58325C833ECC} = {3CC9B3F0-83F6-4BF6-83AE-58325C833ECC}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mathTest", "mathTest.vcproj", "{4E77B8F7-D926-4803-8253-743687722CD5}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{3CC9B3F0-83F6-4BF6-83AE-58325C833ECC} = {3CC9B3F0-83F6-4BF6-83AE-58325C833ECC}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PenTest", "PenTest.vcproj", "{4E77B8F7-D926-4803-8253-743687722CD5}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{3CC9B3F0-83F6-4BF6-83AE-58325C833ECC} = {3CC9B3F0-83F6-4BF6-83AE-58325C833ECC}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RandGenTest", "RandGenTest.vcproj", "{4E77B8F7-D926-4803-8253-743687722CD5}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{3CC9B3F0-83F6-4BF6-83AE-58325C833ECC} = {3CC9B3F0-83F6-4BF6-83AE-58325C833ECC}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StateTest", "StateTest.vcproj", "{4E77B8F7-D926-4803-8253-743687722CD5}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{3CC9B3F0-83F6-4BF6-83AE-58325C833ECC} = {3CC9B3F0-83F6-4BF6-83AE-58325C833ECC}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TextureTest", "TextureTest.vcproj", "{4E77B8F7-D926-4803-8253-743687722CD5}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{3CC9B3F0-83F6-4BF6-83AE-58325C833ECC} = {3CC9B3F0-83F6-4BF6-83AE-58325C833ECC}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfiguration) = preSolution
|
||||
Debug = Debug
|
||||
Release = Release
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfiguration) = postSolution
|
||||
{3CC9B3F0-83F6-4BF6-83AE-58325C833ECC}.Debug.ActiveCfg = Debug|Win32
|
||||
{3CC9B3F0-83F6-4BF6-83AE-58325C833ECC}.Debug.Build.0 = Debug|Win32
|
||||
{3CC9B3F0-83F6-4BF6-83AE-58325C833ECC}.Release.ActiveCfg = Release|Win32
|
||||
{3CC9B3F0-83F6-4BF6-83AE-58325C833ECC}.Release.Build.0 = Release|Win32
|
||||
{4E77B8F7-D926-4803-8253-743687722CD5}.Debug.ActiveCfg = Debug|Win32
|
||||
{4E77B8F7-D926-4803-8253-743687722CD5}.Debug.Build.0 = Debug|Win32
|
||||
{4E77B8F7-D926-4803-8253-743687722CD5}.Release.ActiveCfg = Release|Win32
|
||||
{4E77B8F7-D926-4803-8253-743687722CD5}.Release.Build.0 = Release|Win32
|
||||
{4E77B8F7-D926-4803-8253-743687722CD5}.Debug.ActiveCfg = Debug|Win32
|
||||
{4E77B8F7-D926-4803-8253-743687722CD5}.Debug.Build.0 = Debug|Win32
|
||||
{4E77B8F7-D926-4803-8253-743687722CD5}.Release.ActiveCfg = Release|Win32
|
||||
{4E77B8F7-D926-4803-8253-743687722CD5}.Release.Build.0 = Release|Win32
|
||||
{4E77B8F7-D926-4803-8253-743687722CD5}.Debug.ActiveCfg = Debug|Win32
|
||||
{4E77B8F7-D926-4803-8253-743687722CD5}.Debug.Build.0 = Debug|Win32
|
||||
{4E77B8F7-D926-4803-8253-743687722CD5}.Release.ActiveCfg = Release|Win32
|
||||
{4E77B8F7-D926-4803-8253-743687722CD5}.Release.Build.0 = Release|Win32
|
||||
{4E77B8F7-D926-4803-8253-743687722CD5}.Debug.ActiveCfg = Debug|Win32
|
||||
{4E77B8F7-D926-4803-8253-743687722CD5}.Debug.Build.0 = Debug|Win32
|
||||
{4E77B8F7-D926-4803-8253-743687722CD5}.Release.ActiveCfg = Release|Win32
|
||||
{4E77B8F7-D926-4803-8253-743687722CD5}.Release.Build.0 = Release|Win32
|
||||
{4E77B8F7-D926-4803-8253-743687722CD5}.Debug.ActiveCfg = Debug|Win32
|
||||
{4E77B8F7-D926-4803-8253-743687722CD5}.Debug.Build.0 = Debug|Win32
|
||||
{4E77B8F7-D926-4803-8253-743687722CD5}.Release.ActiveCfg = Release|Win32
|
||||
{4E77B8F7-D926-4803-8253-743687722CD5}.Release.Build.0 = Release|Win32
|
||||
{4E77B8F7-D926-4803-8253-743687722CD5}.Debug.ActiveCfg = Debug|Win32
|
||||
{4E77B8F7-D926-4803-8253-743687722CD5}.Debug.Build.0 = Debug|Win32
|
||||
{4E77B8F7-D926-4803-8253-743687722CD5}.Release.ActiveCfg = Release|Win32
|
||||
{4E77B8F7-D926-4803-8253-743687722CD5}.Release.Build.0 = Release|Win32
|
||||
{4E77B8F7-D926-4803-8253-743687722CD5}.Debug.ActiveCfg = Debug|Win32
|
||||
{4E77B8F7-D926-4803-8253-743687722CD5}.Debug.Build.0 = Debug|Win32
|
||||
{4E77B8F7-D926-4803-8253-743687722CD5}.Release.ActiveCfg = Release|Win32
|
||||
{4E77B8F7-D926-4803-8253-743687722CD5}.Release.Build.0 = Release|Win32
|
||||
{4E77B8F7-D926-4803-8253-743687722CD5}.Debug.ActiveCfg = Debug|Win32
|
||||
{4E77B8F7-D926-4803-8253-743687722CD5}.Debug.Build.0 = Debug|Win32
|
||||
{4E77B8F7-D926-4803-8253-743687722CD5}.Release.ActiveCfg = Release|Win32
|
||||
{4E77B8F7-D926-4803-8253-743687722CD5}.Release.Build.0 = Release|Win32
|
||||
{4E77B8F7-D926-4803-8253-743687722CD5}.Debug.ActiveCfg = Debug|Win32
|
||||
{4E77B8F7-D926-4803-8253-743687722CD5}.Debug.Build.0 = Debug|Win32
|
||||
{4E77B8F7-D926-4803-8253-743687722CD5}.Release.ActiveCfg = Release|Win32
|
||||
{4E77B8F7-D926-4803-8253-743687722CD5}.Release.Build.0 = Release|Win32
|
||||
{4E77B8F7-D926-4803-8253-743687722CD5}.Debug.ActiveCfg = Debug|Win32
|
||||
{4E77B8F7-D926-4803-8253-743687722CD5}.Debug.Build.0 = Debug|Win32
|
||||
{4E77B8F7-D926-4803-8253-743687722CD5}.Release.ActiveCfg = Release|Win32
|
||||
{4E77B8F7-D926-4803-8253-743687722CD5}.Release.Build.0 = Release|Win32
|
||||
{4E77B8F7-D926-4803-8253-743687722CD5}.Debug.ActiveCfg = Debug|Win32
|
||||
{4E77B8F7-D926-4803-8253-743687722CD5}.Debug.Build.0 = Debug|Win32
|
||||
{4E77B8F7-D926-4803-8253-743687722CD5}.Release.ActiveCfg = Release|Win32
|
||||
{4E77B8F7-D926-4803-8253-743687722CD5}.Release.Build.0 = Release|Win32
|
||||
{4E77B8F7-D926-4803-8253-743687722CD5}.Debug.ActiveCfg = Debug|Win32
|
||||
{4E77B8F7-D926-4803-8253-743687722CD5}.Debug.Build.0 = Debug|Win32
|
||||
{4E77B8F7-D926-4803-8253-743687722CD5}.Release.ActiveCfg = Release|Win32
|
||||
{4E77B8F7-D926-4803-8253-743687722CD5}.Release.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityAddIns) = postSolution
|
||||
EndGlobalSection
|
||||
EndGlobal
|
331
msvc/photon.vcproj
Normal file
331
msvc/photon.vcproj
Normal file
@ -0,0 +1,331 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="7.10"
|
||||
Name="photon"
|
||||
ProjectGUID="{3CC9B3F0-83F6-4BF6-83AE-58325C833ECC}"
|
||||
Keyword="Win32Proj">
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"/>
|
||||
</Platforms>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="../lib"
|
||||
IntermediateDirectory="Debug"
|
||||
ConfigurationType="4"
|
||||
CharacterSet="0">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="../include"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_LIB"
|
||||
MinimalRebuild="TRUE"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="5"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="TRUE"
|
||||
DebugInformationFormat="4"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
OutputFile="$(OutDir)/photon.lib"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="../lib"
|
||||
IntermediateDirectory="Release"
|
||||
ConfigurationType="4"
|
||||
CharacterSet="0">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="3"
|
||||
FavorSizeOrSpeed="0"
|
||||
AdditionalIncludeDirectories="../include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_LIB"
|
||||
RuntimeLibrary="4"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
WarnAsError="FALSE"
|
||||
Detect64BitPortabilityProblems="TRUE"
|
||||
DebugInformationFormat="0"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
OutputFile="$(OutDir)/photon.lib"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
|
||||
<File
|
||||
RelativePath="../src\Application.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="../src\entrypoint.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="../src\exceptions.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="../src\Log.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="../src\LogSink.cpp">
|
||||
</File>
|
||||
<Filter
|
||||
Name="audio"
|
||||
Filter="">
|
||||
<File
|
||||
RelativePath="../src\audio\AudioCore.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="../src\audio\SampleResourceManager.cpp">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="math"
|
||||
Filter="">
|
||||
<File
|
||||
RelativePath="../src\math\Circle.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="../src\math\math.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="../src\math\Rect.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="../src\math\Vector2.cpp">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="util"
|
||||
Filter="">
|
||||
<File
|
||||
RelativePath="../src\util\ConfigFile.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="../src\util\FileBuffer.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="../src\util\RandGen.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="../src\util\Task.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="../src\util\TaskManager.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="../src\util\Timer.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="../src\util\VersionInfo.cpp">
|
||||
</File>
|
||||
<Filter
|
||||
Name="filesys"
|
||||
Filter="">
|
||||
<File
|
||||
RelativePath="../src\util\filesys\filesys.cpp">
|
||||
</File>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="video"
|
||||
Filter="">
|
||||
<File
|
||||
RelativePath="../src\video\Color.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="../src\video\Font.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="../src\video\FontResourceManager.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="../src\video\Image.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="../src\video\Pen.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="../src\video\Texture.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="../src\video\TextureResourceManager.cpp">
|
||||
</File>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
|
||||
<File
|
||||
RelativePath="../include\Application.hpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="../include\entrypoint.hpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="../include\exceptions.hpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="../include\Log.hpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="../include\LogSink.hpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="../include\photon.hpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="../include\ResourceManaged.hpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="../include\ResourceManager.hpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="../include\State.hpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="../include\types.hpp">
|
||||
</File>
|
||||
<Filter
|
||||
Name="audio"
|
||||
Filter="">
|
||||
<File
|
||||
RelativePath="../include\audio\AudioCore.hpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="../include\audio\SampleResourceManager.hpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="../include\audio\Source.hpp">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="math"
|
||||
Filter="">
|
||||
<File
|
||||
RelativePath="../include\math\Circle.hpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="../include\math\math.hpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="../include\math\Rect.hpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="../include\math\Vector2.hpp">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="util"
|
||||
Filter="">
|
||||
<File
|
||||
RelativePath="../include\util\ConfigFile.hpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="../include\util\FileBuffer.hpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="../include\util\RandGen.hpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="../include\util\Singleton.hpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="../include\util\Task.hpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="../include\util\TaskManager.hpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="../include\util\Timer.hpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="../include\util\VersionInfo.hpp">
|
||||
</File>
|
||||
<Filter
|
||||
Name="filesys"
|
||||
Filter="">
|
||||
<File
|
||||
RelativePath="../include\util\filesys\filesys.hpp">
|
||||
</File>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="video"
|
||||
Filter="">
|
||||
<File
|
||||
RelativePath="../include\video\Color.hpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="../include\video\Font.hpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="../include\video\FontResourceManager.hpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="../include\video\Image.hpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="../include\video\Pen.hpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="../include\video\Texture.hpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="../include\video\TextureResourceManager.hpp">
|
||||
</File>
|
||||
</Filter>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
@ -1,7 +1,7 @@
|
||||
Format: 1.35
|
||||
|
||||
|
||||
Title: Photon 0.0.1
|
||||
Title: Photon 0.0.2
|
||||
SubTitle: Simple Open Source 2D Game API
|
||||
|
||||
Footer: Documentation for <a href="http://photon.sourceforge.net">photon</a>. Copyright (C) 2004-2005 James Turk
|
||||
@ -24,59 +24,70 @@ Footer: Documentation for <a href="http://photon.sourceforge.net">photon</a>. Co
|
||||
# time it is run. When working with groups, just deal with the braces and
|
||||
# forget about the indentation and comments.
|
||||
#
|
||||
# You can use this file on other computers even if they use different
|
||||
# directories. As long as the command line points to the same source files,
|
||||
# Natural Docs will be able to correct the locations automatically.
|
||||
#
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
|
||||
Group: photon:: {
|
||||
File: Photon Documentation (/home/james/src/photon/ndoc/pages/index.txt)
|
||||
|
||||
File: Application (Application.hpp)
|
||||
File: Basic Types (types.hpp)
|
||||
File: Exception/Error Types (exceptions.hpp)
|
||||
File: InputListener (InputListener.hpp)
|
||||
File: Kernel (Kernel.hpp)
|
||||
File: Log (Log.hpp)
|
||||
File: Logging Utilities (LogSink.hpp)
|
||||
File: PhotonMain (entrypoint.hpp)
|
||||
File: ResourceManaged (ResourceManaged.hpp)
|
||||
File: ResourceManager (ResourceManager.hpp)
|
||||
File: State (State.hpp)
|
||||
File: Task.hpp (Task.hpp)
|
||||
Group: photon:: Library Documentation {
|
||||
|
||||
File: Application (/home/james/src/photon/include/Application.hpp)
|
||||
File: Basic Types (/home/james/src/photon/include/types.hpp)
|
||||
File: Exception/Error Types (/home/james/src/photon/include/exceptions.hpp)
|
||||
File: Log (/home/james/src/photon/include/Log.hpp)
|
||||
File: Logging Utilities (/home/james/src/photon/include/LogSink.hpp)
|
||||
File: PhotonMain (/home/james/src/photon/include/entrypoint.hpp)
|
||||
File: ResourceManaged (/home/james/src/photon/include/ResourceManaged.hpp)
|
||||
File: ResourceManager (/home/james/src/photon/include/ResourceManager.hpp)
|
||||
File: State (/home/james/src/photon/include/State.hpp)
|
||||
|
||||
Group: Audio:: {
|
||||
|
||||
File: AudioCore (audio/AudioCore.hpp)
|
||||
File: Source (audio/Source.hpp)
|
||||
File: AudioCore (/home/james/src/photon/include/audio/AudioCore.hpp)
|
||||
File: Source (/home/james/src/photon/include/audio/Source.hpp)
|
||||
} # Group: Audio::
|
||||
|
||||
Group: Math:: {
|
||||
|
||||
File: Circle (math/Circle.hpp)
|
||||
File: Math Utilities (math/math.hpp)
|
||||
File: Rect (math/Rect.hpp)
|
||||
File: Vector2 (math/Vector2.hpp)
|
||||
File: Circle (/home/james/src/photon/include/math/Circle.hpp)
|
||||
File: Math Utilities (/home/james/src/photon/include/math/math.hpp)
|
||||
File: Rect (/home/james/src/photon/include/math/Rect.hpp)
|
||||
File: Vector2 (/home/james/src/photon/include/math/Vector2.hpp)
|
||||
} # Group: Math::
|
||||
|
||||
Group: Util:: {
|
||||
|
||||
File: ConfigFile (util/ConfigFile.hpp)
|
||||
File: FileBuffer (util/FileBuffer.hpp)
|
||||
File: filesys:: (util/filesys/filesys.hpp)
|
||||
File: RandGen (util/RandGen.hpp)
|
||||
File: Singleton (util/Singleton.hpp)
|
||||
File: Timer (util/Timer.hpp)
|
||||
File: VersionInfo (util/VersionInfo.hpp)
|
||||
File: ConfigFile (/home/james/src/photon/include/util/ConfigFile.hpp)
|
||||
File: FileBuffer (/home/james/src/photon/include/util/FileBuffer.hpp)
|
||||
File: filesys:: (/home/james/src/photon/include/util/filesys/filesys.hpp)
|
||||
File: RandGen (/home/james/src/photon/include/util/RandGen.hpp)
|
||||
File: Singleton (/home/james/src/photon/include/util/Singleton.hpp)
|
||||
File: Task (/home/james/src/photon/include/util/Task.hpp)
|
||||
File: TaskManager (/home/james/src/photon/include/util/TaskManager.hpp)
|
||||
File: Timer (/home/james/src/photon/include/util/Timer.hpp)
|
||||
File: VersionInfo (/home/james/src/photon/include/util/VersionInfo.hpp)
|
||||
} # Group: Util::
|
||||
|
||||
Group: Video:: {
|
||||
|
||||
File: Color (video/Color.hpp)
|
||||
File: Font (video/Font.hpp)
|
||||
File: Image (video/Image.hpp)
|
||||
File: Pen (video/Pen.hpp)
|
||||
File: Texture (video/Texture.hpp)
|
||||
File: Color (/home/james/src/photon/include/video/Color.hpp)
|
||||
File: Font (/home/james/src/photon/include/video/Font.hpp)
|
||||
File: Image (/home/james/src/photon/include/video/Image.hpp)
|
||||
File: Pen (/home/james/src/photon/include/video/Pen.hpp)
|
||||
File: Texture (/home/james/src/photon/include/video/Texture.hpp)
|
||||
} # Group: Video::
|
||||
|
||||
} # Group: photon::
|
||||
} # Group: photon:: Library Documentation
|
||||
|
||||
Group: Tutorials {
|
||||
|
||||
File: Photon Tutorials (/home/james/src/photon/ndoc/tutorials/index.txt)
|
||||
File: 01 - Getting Started (no auto-title, /home/james/src/photon/ndoc/tutorials/tutorial01.txt)
|
||||
} # Group: Tutorials
|
||||
|
||||
Group: Index {
|
||||
|
||||
@ -89,3 +100,9 @@ Group: Index {
|
||||
File Index: Files
|
||||
} # Group: Index
|
||||
|
||||
|
||||
|
||||
##### Do not change or remove these lines. #####
|
||||
Data: 1(D3333RuEG3lpEG636H93IRutu\38\9oNfG)
|
||||
Data: 1(h3333RuEG3lpEG636H93IRutu\3\fu93Ip`G6)
|
||||
Data: 1(T3333RuEG3lpEG636H93IRutu\3\fu93tNtuH8po6)
|
||||
|
30
ndoc/pages/index.txt
Normal file
30
ndoc/pages/index.txt
Normal file
@ -0,0 +1,30 @@
|
||||
Document: Photon Documentation
|
||||
|
||||
Introduction:
|
||||
This is the photon developer documentation, generated via NaturalDocs
|
||||
(http://naturaldocs.org) from comments embedded directly in the code. If you're
|
||||
writing something with public documentation I'd highly recommend it, since as
|
||||
you can see it's output looks signifigantly better than some of those other
|
||||
documentation generators ;).
|
||||
|
||||
How To Use The Docs:
|
||||
In the left pane the public namespaces are listed, click on a namespace name
|
||||
to expand or collapse it. Clicking on a class/topic name will show the
|
||||
documentation for that class or topic.
|
||||
|
||||
The Tutorials:
|
||||
Because just diving right into the documentation can be daunting, there are also
|
||||
official tutorials alongside the documentation. The <Photon Tutorials> section
|
||||
has more detail.
|
||||
|
||||
Helping Out:
|
||||
If you see anything that is incorrect, incomplete, or is just poorly described .
|
||||
and could use clarification, please be sure to let me know (cozman@users.sf.net).
|
||||
I want this documentation to be as helpful as possible to both new and
|
||||
experienced users of photon, so feel free to contact me with quesions,
|
||||
criticisms, or suggestions of any kind.
|
||||
|
||||
If you're interested in helping out, but don't feel like you could contribute
|
||||
useful code someone to help keep the documentation current would be appreciated.
|
||||
If interested in helping out in any way, I'd love to hear from you.
|
||||
|
10
ndoc/tutorials/index.txt
Normal file
10
ndoc/tutorials/index.txt
Normal file
@ -0,0 +1,10 @@
|
||||
Document: Photon Tutorials
|
||||
|
||||
Welcome to the offical Photon tutorials, they are part of the NaturalDoc documentation
|
||||
so that they are easy to write and cross-reference with the docs. The tutorials
|
||||
are a work in progress, and if you'd like to contribute it would be greatly
|
||||
appreciated as they take up time that could be used working on Photon.
|
||||
|
||||
- <Tutorial 01 - Getting Started> - Tutorial on basic setup of a
|
||||
Photon application.
|
||||
- Tutorial 02 - Coming Soon
|
259
ndoc/tutorials/tutorial01.txt
Normal file
259
ndoc/tutorials/tutorial01.txt
Normal file
@ -0,0 +1,259 @@
|
||||
Document: Tutorial 01 - Getting Started
|
||||
|
||||
Group: Introduction
|
||||
|
||||
Topic: Before We Start
|
||||
|
||||
This tutorial serves as an introduction to using Photon with C++. It is written
|
||||
so that those with a moderate amount of C++ experience can follow it and be able
|
||||
to get started with Photon. This tutorial does *NOT* aim to teach
|
||||
C++, Game Programming, or how to use every arcane feature available in Photon.
|
||||
After reading this tutorial, the basic structure of a Photon application should
|
||||
be understood, and by reading the available <Photon Documentation>
|
||||
one should be able to start with Photon without much difficulty.
|
||||
|
||||
In addition to having C++ experience, it is assumed that the reader of this
|
||||
tutorial has already set up Photon and all dependency libraries. For help doing
|
||||
this look at the page <http://photon.sourceforge.net/index.php/getting-photon>.
|
||||
You can also ask for help on the Photon mailing lists (<http://lists.sourceforge.net/lists/listinfo/photon-users>).
|
||||
|
||||
Topic: Getting Started
|
||||
Perhaps the best way to get started it to show what an extremely simple Photon
|
||||
application looks like.
|
||||
|
||||
(code)
|
||||
#include <photon.hpp>
|
||||
using namespace photon;
|
||||
|
||||
class SomeState : public State
|
||||
{
|
||||
public:
|
||||
void render()
|
||||
{
|
||||
// do any rendering in here
|
||||
}
|
||||
|
||||
void update()
|
||||
{
|
||||
// do any updating of logic in here
|
||||
}
|
||||
};
|
||||
|
||||
int PhotonMain(const StrVec& args)
|
||||
{
|
||||
Application& app(Application::getInstance());
|
||||
|
||||
app.createDisplay(800,600,32,0,0,DISP_WINDOWED);
|
||||
|
||||
app.setState<SomeState>();
|
||||
app.run();
|
||||
|
||||
return 0;
|
||||
}
|
||||
(end)
|
||||
|
||||
Perhaps you can follow the example above fairly well, if so you
|
||||
probably won't have a tough time picking up Photon as you go. For
|
||||
those who aren't so sure as to what is going on, fear not, by the end of the
|
||||
tutorial everything you see will have been addressed. Even if you don't know
|
||||
what it means, the fact that the above application is all it takes to get
|
||||
an empty window should indicate Photon really isn't too difficult to use.
|
||||
|
||||
The entrypoint function in any Photon application is a function called
|
||||
<PhotonMain>. In order to be as simple to use as possible, Photon
|
||||
takes care of it's own initialization by defining a main() function that
|
||||
does all of the work for you. In other libraries you often would write a main
|
||||
function and fill it with copy & pasted initialization code that doesn't change
|
||||
from one project to the next, when using Photon you simply create a function
|
||||
called <PhotonMain> and everything is taken care of.
|
||||
|
||||
As the entrypoint, <PhotonMain> is generally where you'll create the display and
|
||||
set the initial <State>. The state system will be covered in more detail in a
|
||||
short while.
|
||||
|
||||
One thing you'll notice is that <PhotonMain> takes something called a <StrVec>,
|
||||
which is simply a typedef for std::vector<std::string>. Just like a standard
|
||||
main() function, it also returns an integer return code which is interpreted
|
||||
by the operating system as success or failure.
|
||||
|
||||
Group: Digging In: Application and the State system
|
||||
|
||||
Topic: Application
|
||||
All Photon applications use <Application>. Generally Photon applications will
|
||||
contain code similar to the above example : a display will be created, the state
|
||||
system will be
|
||||
initialized, and finally the run method of <Application> will be called. We
|
||||
will now cover exactly what all of this means.
|
||||
|
||||
The first thing you may notice is that <Application> is declared as a reference
|
||||
and accessed in a funny sort of way. <Application> is a special kind of class
|
||||
known as a singleton due to the fact that in any photon application there can
|
||||
only be one instance. The single instance of Application is
|
||||
created before any of the code you write is executed, so there is no need to
|
||||
ever create it. What this means for you is that you cannot write code like:
|
||||
| Application app;
|
||||
or
|
||||
| Application* appPtr = new Application();
|
||||
|
||||
Instead <Application> must always be used via a reference. A reference can
|
||||
be obtained via Application::getInstance(), which can be called any number of
|
||||
times, always returning the single instance of <Application>. This means that
|
||||
the following two pieces of code produce identical results:
|
||||
|
||||
(code)
|
||||
// Sample 1 : Too Much Typing :(
|
||||
Application::getInstance().createDisplay(800,600,32,0,0,DISP_FULLSCREEN);
|
||||
Application::getInstance().setState<SomeState>();
|
||||
Application::getInstance().run();
|
||||
(end)
|
||||
|
||||
|
||||
(code)
|
||||
// Sample 2 : Preferred
|
||||
Application& app(Application::getInstance());
|
||||
app.createDisplay(800,600,32,0,0,DISP_FULLSCREEN);
|
||||
app.setState<SomeState>();
|
||||
app.run();
|
||||
(end)
|
||||
|
||||
<Application> is a fairly important class, it provides the means for managing
|
||||
the display, input, timer, task and state system. For simple 2D applications
|
||||
the only thing that needs to be done to configure the display is a single call
|
||||
to <Application::createDisplay> (width, height, depth, 0, 0, displayMode, title).
|
||||
The input, timing, and task systems will be addressed in future tutorials, or
|
||||
check them out in <Application's> docs. What about the state system? Well that
|
||||
brings us to our next topic...
|
||||
|
||||
Topic: The State System
|
||||
<States> are probably the most important entities in Photon. A good portion of
|
||||
your application's code with be within classes which derive from <State>. Photon
|
||||
uses the idea that generally a game or application can be derived into a set of
|
||||
states each of which have their own characteristics and behavior. If you've
|
||||
ever written a game before you've likely encountered this concept, it is often
|
||||
solved using a switch statement or something similar. An example of states in
|
||||
a simple game might be a menu state, a play state, and an options screen state.
|
||||
Complex games could define a much larger number of states, and it is certainly
|
||||
possible to only use one state in a photon application.
|
||||
|
||||
Photon's state system is designed to be simple yet powerful, and this tutorial
|
||||
will only cover the basics of using <States>, however with the available
|
||||
documentation it isn't hard to do more advanced things with states, a topic that
|
||||
a future tutorial will cover.
|
||||
|
||||
Creating States:
|
||||
|
||||
<State> is a simple class with a set of virtual functions. In order to define
|
||||
the behavior of a given state in your application, simply derive from <State>
|
||||
overloading as few or as many of <State's> functions as you desire. The only
|
||||
function that must be overloaded is <State::render>, although generally
|
||||
<State::update> will be overloaded as well. <State> also has other functions
|
||||
available allowing for special behavior when a state is paused/resumed or global
|
||||
input handlers for a state.
|
||||
|
||||
The <State::update> method and <State::render> update method are called
|
||||
regularly in the update and render portions of the <Application's> state machine
|
||||
which is the next topic we'll address.
|
||||
|
||||
Running States:
|
||||
|
||||
Once the <Application::run> method is called, it does not return until all
|
||||
<States> exit. Therefore before it is called it is required that at least one
|
||||
<State>-derived class is made active using either <Application::setState> or
|
||||
<Application::pushState>. You'll notice from the <Getting Started> example that
|
||||
these functions both have an odd syntax, they take
|
||||
a template argument which should be the name of the <State>-derived class, but
|
||||
they take no formal parameters. The reason for this is an issue of
|
||||
implementation, and is basically a way of overcoming one of C++'s limitations
|
||||
(namely that types are not first class entities).
|
||||
|
||||
Group: Wrapping Up
|
||||
|
||||
Topic: Review
|
||||
|
||||
Let's take a look at what we've covered in this tutorial. First let's revisit
|
||||
the example from earlier and see what it all meant.
|
||||
|
||||
(code)
|
||||
#include <photon.hpp>
|
||||
using namespace photon;
|
||||
|
||||
// State-derived class used for application
|
||||
class SomeState : public State
|
||||
{
|
||||
public:
|
||||
void render()
|
||||
{
|
||||
// do any rendering in here
|
||||
}
|
||||
|
||||
void update()
|
||||
{
|
||||
// do any updating of logic in here
|
||||
}
|
||||
};
|
||||
|
||||
// the Photon entrypoint, present for all Photon applications
|
||||
int PhotonMain(const StrVec& args)
|
||||
{
|
||||
// obtain a reference to the Application singleton
|
||||
Application& app(Application::getInstance());
|
||||
|
||||
// create the display, in this case a 800x600 window with 32 bit depth
|
||||
app.createDisplay(800,600,32,0,0,DISP_WINDOWED);
|
||||
|
||||
// set the application state to SomeState (a State-derived class)
|
||||
app.setState<SomeState>();
|
||||
// run the application until the state quits or an exit request is received
|
||||
app.run();
|
||||
|
||||
// return 0, just like in a normal application
|
||||
return 0;
|
||||
}
|
||||
(end)
|
||||
|
||||
Hopefully you have a better understanding of what's going on now. The other
|
||||
tutorials will start assuming a basic understanding of the structure of a Photon
|
||||
application.
|
||||
|
||||
Topic: Topics Covered
|
||||
|
||||
PhotonMain - The entrypoint for all photon applications. (see <PhotonMain>)
|
||||
Application - Important singleton class used in all Photon applications.
|
||||
(see <Application>)
|
||||
Application::createDisplay - Function used to initialize the display.
|
||||
Application::setState - Function used to set active state.
|
||||
Application::run - Function called to start processing of active state.
|
||||
State - Base class for Photon application states, which are vital to
|
||||
using Photon. (see <State>)
|
||||
|
||||
|
||||
Group: Building a Photon application
|
||||
|
||||
Topic: Compilation
|
||||
Once you know how to write a basic photon application, you'll need to know how
|
||||
to compile it in your compiler/build environment of choice. Since I cannot possibly cover
|
||||
the full range of development environments, I'll speak in general terms and assume
|
||||
you are familiar with the environment you are using. If you need extra help either
|
||||
obtain help from a site related to your environment or ask on the Photon mailing
|
||||
lists.
|
||||
|
||||
Things to do when compiling a photon application:
|
||||
|
||||
- When compiling make sure all includes are in the include path of your compiler.
|
||||
- When linking make sure all libraries are in the library path of your compiler.
|
||||
- Ensure that you link against photon and all dependency libraries (photon,
|
||||
GLFW, OpenAL, OpenGL, GLU, PhysFS, Corona, and Freetype).
|
||||
- If you are using OpenAL, be sure to define PHOTON_USE_OPENAL
|
||||
|
||||
If you are using a command line compiler (like g++) it will resemble
|
||||
|
||||
| g++ -DPHOTON_USE_OPENAL -c -o test.o test.cpp
|
||||
| g++ -o test test.o -lphoton -lglfw -lopenal -lGL -lGLU -lphysfs -lcorona -lfreetype
|
||||
|
||||
If you are using an IDE (like Dev-C++, MS Visual C++, or Code::Blocks) you'll
|
||||
generally only need to specify the libraries you wish to link against. Again,
|
||||
if you need specific help try asking for help on the Photon mailing lists
|
||||
(<http://lists.sourceforge.net/lists/listinfo/photon-users>).
|
||||
|
||||
Written for Photon 0.1.0 by James:
|
||||
$Id: tutorial01.txt,v 1.3 2005/11/15 02:59:08 cozman Exp $
|
206
photon.mm
206
photon.mm
@ -1,111 +1,135 @@
|
||||
<map version="0.8.0 RC2">
|
||||
<map version="0.8.0">
|
||||
<!-- To view this file, download free mind mapping software FreeMind from http://freemind.sourceforge.net -->
|
||||
<node ID="Freemind_Link_1676542623" TEXT="Photon">
|
||||
<node CREATED="1129352407401" ID="_Freemind_Link_1676542623" MODIFIED="1129352407401" TEXT="Photon">
|
||||
<cloud/>
|
||||
<font BOLD="true" NAME="SansSerif" SIZE="12"/>
|
||||
<node ID="Freemind_Link_682620075" POSITION="right" TEXT="0.1 Series">
|
||||
<node CREATED="1129352407402" ID="_Freemind_Link_682620075" MODIFIED="1129352407402" POSITION="right" TEXT="0.1 Series">
|
||||
<font BOLD="true" NAME="SansSerif" SIZE="12"/>
|
||||
<node ID="Freemind_Link_1125660603" TEXT="0.0.1">
|
||||
<node CREATED="1129352407402" ID="_Freemind_Link_115594103" MODIFIED="1130559303873" TEXT="0.1.0" VSHIFT="-14">
|
||||
<font BOLD="true" NAME="SansSerif" SIZE="12"/>
|
||||
<icon BUILTIN="button_ok"/>
|
||||
</node>
|
||||
<node ID="Freemind_Link_115594103" TEXT="0.1">
|
||||
<font BOLD="true" NAME="SansSerif" SIZE="12"/>
|
||||
<node ID="Freemind_Link_1870184326" TEXT="example game">
|
||||
<node COLOR="#000000" ID="Freemind_Link_597173063" TEXT="Asteroids"/>
|
||||
<node ID="Freemind_Link_719722821" TEXT="Lunar Lander"/>
|
||||
<node ID="Freemind_Link_173048174" TEXT="Missile Command"/>
|
||||
<node COLOR="#010101" ID="Freemind_Link_1447936394" TEXT="Frogger"/>
|
||||
</node>
|
||||
<node ID="Freemind_Link_1166438127" TEXT="test release candidate"/>
|
||||
<node ID="Freemind_Link_1716705807" TEXT="clean up naturaldocs">
|
||||
<icon BUILTIN="button_ok"/>
|
||||
<node CREATED="1129352407404" ID="_Freemind_Link_1084322991" MODIFIED="1129352407404" TEXT="Publicity">
|
||||
<node CREATED="1133401622902" ID="Freemind_Link_658038500" MODIFIED="1133401625693" TEXT="Dr. Spin 0.1"/>
|
||||
</node>
|
||||
</node>
|
||||
<node FOLDED="true" ID="Freemind_Link_1151493849" TEXT="0.1.x">
|
||||
<node CREATED="1129352407405" HGAP="65" ID="_Freemind_Link_1151493849" MODIFIED="1130559300141" TEXT="0.1.x" VSHIFT="38">
|
||||
<font BOLD="true" NAME="SansSerif" SIZE="12"/>
|
||||
<node ID="Freemind_Link_540349165" TEXT="static-LGPL Free OpenAL on Windows">
|
||||
<node CREATED="1129352407407" ID="_Freemind_Link_650619873" MODIFIED="1129352407407" TEXT="Features">
|
||||
<node CREATED="1129352407407" FOLDED="true" ID="_Freemind_Link_1825420810" MODIFIED="1129352407407" TEXT="Music">
|
||||
<node CREATED="1129352407407" ID="_Freemind_Link_1677795490" MODIFIED="1129352407407" TEXT="ogg"/>
|
||||
<node CREATED="1129352407407" ID="_Freemind_Link_510415734" MODIFIED="1129352407407" TEXT="wav"/>
|
||||
</node>
|
||||
</node>
|
||||
<node CREATED="1129352407407" ID="_Freemind_Link_1634165944" MODIFIED="1129352407407" TEXT="Improvements">
|
||||
<node CREATED="1129352407407" ID="Freemind_Link_442862681" MODIFIED="1129352407407" TEXT="vc7">
|
||||
<node CREATED="1129352407407" ID="Freemind_Link_1309064355" MODIFIED="1129352407407" TEXT="photon-0.1.x-win32-msvc"/>
|
||||
</node>
|
||||
<node CREATED="1130644868777" ID="Freemind_Link_1077081589" MODIFIED="1130644894214" TEXT="allow compilation without PhysFS?"/>
|
||||
</node>
|
||||
<node CREATED="1129352407407" ID="_Freemind_Link_172144087" MODIFIED="1129352407407" TEXT="Publicity"/>
|
||||
</node>
|
||||
</node>
|
||||
<node CREATED="1129352407407" ID="_Freemind_Link_486829238" MODIFIED="1130559294471" POSITION="right" TEXT="0.2 Release" VSHIFT="107">
|
||||
<font BOLD="true" NAME="SansSerif" SIZE="12"/>
|
||||
<node CREATED="1129352407407" FOLDED="true" ID="_Freemind_Link_103747781" MODIFIED="1130472449741" TEXT="Features">
|
||||
<font NAME="SansSerif" SIZE="12"/>
|
||||
<node ID="Freemind_Link_968837931" TEXT="drop alut"/>
|
||||
<node ID="Freemind_Link_831588763" TEXT="write own wav-loader"/>
|
||||
<node COLOR="#000000" CREATED="1129352407408" ID="_Freemind_Link_420721466" MODIFIED="1129352407408" TEXT="XML/XSLT sink"/>
|
||||
<node CREATED="1129352407409" ID="_Freemind_Link_1298931281" MODIFIED="1129352407409" TEXT="XML resource files"/>
|
||||
<node CREATED="1129352407409" FOLDED="true" ID="_Freemind_Link_1070201117" MODIFIED="1129352407409" TEXT="Transitions">
|
||||
<node CREATED="1129352407410" ID="_Freemind_Link_664044389" MODIFIED="1129352407410" TEXT="investigate what other libs do"/>
|
||||
<node CREATED="1129352407411" ID="_Freemind_Link_1667343634" MODIFIED="1129352407411" TEXT="render to texture?"/>
|
||||
<node CREATED="1129352407411" ID="_Freemind_Link_518905568" MODIFIED="1129352407411" TEXT="pixel shaders?"/>
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
<node FOLDED="true" ID="Freemind_Link_486829238" POSITION="right" TEXT="0.2 Release">
|
||||
<font BOLD="true" NAME="SansSerif" SIZE="12"/>
|
||||
<node ID="Freemind_Link_103747781" TEXT="New Features">
|
||||
<node CREATED="1129352407411" ID="_Freemind_Link_1339011485" MODIFIED="1129352407411" TEXT="Tilemap System"/>
|
||||
<node CREATED="1129352407411" ID="_Freemind_Link_1497432478" MODIFIED="1129352407411" TEXT="Particle System"/>
|
||||
<node CREATED="1129352407411" ID="_Freemind_Link_216021234" MODIFIED="1129352407411" TEXT="Sprite System">
|
||||
<font NAME="SansSerif" SIZE="12"/>
|
||||
<node ID="Freemind_Link_1825420810" TEXT="Music">
|
||||
<icon BUILTIN="stop"/>
|
||||
<node COLOR="#ff0300" ID="Freemind_Link_1961333678" TEXT="delay until 0.1.x">
|
||||
</node>
|
||||
<node CREATED="1129352407411" ID="_Freemind_Link_639177837" MODIFIED="1129352407411" TEXT="interpolation/Extrapolation in calls to State::render"/>
|
||||
</node>
|
||||
<node CREATED="1129352407411" FOLDED="true" ID="_Freemind_Link_903043501" MODIFIED="1129352407411" TEXT="Improvements">
|
||||
<node CREATED="1129352407411" ID="_Freemind_Link_1362733907" MODIFIED="1129352407411" TEXT="investigate dropping Corona"/>
|
||||
</node>
|
||||
<node CREATED="1129352407411" FOLDED="true" ID="_Freemind_Link_1821669119" MODIFIED="1129352407411" TEXT="Publicity">
|
||||
<node CREATED="1129352407411" FOLDED="true" ID="_Freemind_Link_654490435" MODIFIED="1129352407411" TEXT="Second Example Game">
|
||||
<node CREATED="1129352407411" ID="_Freemind_Link_1191623789" MODIFIED="1129352407411" TEXT="Public Project?"/>
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
<node COLOR="#147f1e" CREATED="1129352407415" ID="_Freemind_Link_438641521" MODIFIED="1129352407415" POSITION="left" TEXT="Version: $Id: photon.mm,v 1.34 2006/03/07 23:28:09 cozman Exp $">
|
||||
<font ITALIC="true" NAME="SansSerif" SIZE="12"/>
|
||||
</node>
|
||||
</node>
|
||||
<node COLOR="#000000" ID="Freemind_Link_420721466" TEXT="XML/XSLT sink"/>
|
||||
<node ID="Freemind_Link_1298931281" TEXT="XML resource files"/>
|
||||
<node ID="Freemind_Link_1070201117" TEXT="Transitions">
|
||||
<node ID="Freemind_Link_664044389" TEXT="investigate what other libs do"/>
|
||||
<node ID="Freemind_Link_1667343634" TEXT="render to texture?"/>
|
||||
</node>
|
||||
<node ID="Freemind_Link_1339011485" TEXT="Tilemap System"/>
|
||||
<node ID="Freemind_Link_1497432478" TEXT="Particle System"/>
|
||||
<node ID="Freemind_Link_216021234" TEXT="Sprite System">
|
||||
<font NAME="SansSerif" SIZE="12"/>
|
||||
</node>
|
||||
</node>
|
||||
<node FOLDED="true" ID="Freemind_Link_654490435" TEXT="Second Example Game">
|
||||
<node ID="Freemind_Link_1191623789" TEXT="Public Project?"/>
|
||||
</node>
|
||||
<node FOLDED="true" ID="Freemind_Link_903043501" TEXT="Improvements">
|
||||
<node ID="Freemind_Link_878549222" TEXT="drop alut dependency"/>
|
||||
<node ID="Freemind_Link_1362733907" TEXT="investigate dropping Corona"/>
|
||||
</node>
|
||||
</node>
|
||||
<node ID="Freemind_Link_1111954089" POSITION="right" TEXT="Long Term">
|
||||
<node CREATED="1133401600459" ID="Freemind_Link_201004580" MODIFIED="1133401605896" POSITION="left" TEXT="Projects">
|
||||
<font BOLD="true" NAME="SansSerif" SIZE="12"/>
|
||||
<node FOLDED="true" ID="Freemind_Link_1066996987" TEXT="New Features">
|
||||
<font NAME="SansSerif" SIZE="12"/>
|
||||
<node ID="Freemind_Link_539015028" TEXT="physics:: (similar to math::)"/>
|
||||
<node FOLDED="true" ID="Freemind_Link_1107695046" TEXT="gui::">
|
||||
<node ID="Freemind_Link_548983970" TEXT="skinnable XML based"/>
|
||||
<node CREATED="1133401288927" ID="_" LINK="../drspin/DrSpin.mm" MODIFIED="1133401520418" TEXT="Dr Spin"/>
|
||||
</node>
|
||||
<node FOLDED="true" ID="Freemind_Link_304523376" TEXT="network::">
|
||||
<node ID="Freemind_Link_717482997" TEXT="wrap enet?"/>
|
||||
</node>
|
||||
<node FOLDED="true" ID="Freemind_Link_1766405270" TEXT="scripting">
|
||||
<node ID="Freemind_Link_918658782" TEXT="lua"/>
|
||||
<node ID="Freemind_Link_1079584283" TEXT="python"/>
|
||||
<node ID="Freemind_Link_512949260" TEXT="angelscript"/>
|
||||
<node ID="Freemind_Link_1813241804" TEXT="custom"/>
|
||||
<node ID="Freemind_Link_1220379011" TEXT="other"/>
|
||||
</node>
|
||||
</node>
|
||||
<node FOLDED="true" ID="Freemind_Link_1067043723" TEXT="allow for alternate backends ">
|
||||
<node ID="Freemind_Link_1997175841" TEXT="audiere for audio">
|
||||
<node ID="Freemind_Link_1142976123" TEXT="is there a point?">
|
||||
<node ID="Freemind_Link_396200365" TEXT="compatibility?"/>
|
||||
</node>
|
||||
</node>
|
||||
<node ID="Freemind_Link_961284194" TEXT="SDL backend">
|
||||
<icon BUILTIN="help"/>
|
||||
</node>
|
||||
</node>
|
||||
<node FOLDED="true" ID="Freemind_Link_1036629371" TEXT="other languages">
|
||||
<node ID="Freemind_Link_21483700" TEXT="python interface">
|
||||
<icon BUILTIN="help"/>
|
||||
</node>
|
||||
<node ID="Freemind_Link_1083759822" TEXT="java interface">
|
||||
<icon BUILTIN="help"/>
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
<node COLOR="#147f1e" ID="Freemind_Link_438641521" POSITION="left" TEXT="Version: $Id: photon.mm,v 1.26 2005/08/08 22:14:55 cozman Exp $">
|
||||
<font ITALIC="true" NAME="SansSerif" SIZE="12"/>
|
||||
</node>
|
||||
<node ID="Freemind_Link_853483912" POSITION="left" TEXT="Current Problems">
|
||||
<node CREATED="1129352407415" ID="_Freemind_Link_853483912" MODIFIED="1129352407415" POSITION="left" TEXT="Current Problems">
|
||||
<font BOLD="true" NAME="SansSerif" SIZE="12"/>
|
||||
<node ID="Freemind_Link_3809219" TEXT="check if fullscreen works in Windows">
|
||||
</node>
|
||||
<node CREATED="1129352407411" ID="_Freemind_Link_1111954089" MODIFIED="1130559286266" POSITION="left" TEXT="Future..." VSHIFT="-1">
|
||||
<font BOLD="true" NAME="SansSerif" SIZE="12"/>
|
||||
<node CREATED="1129352407411" FOLDED="true" ID="_Freemind_Link_1066996987" MODIFIED="1129352407411" TEXT="Features">
|
||||
<font NAME="SansSerif" SIZE="12"/>
|
||||
<node CREATED="1129352407411" ID="_Freemind_Link_539015028" MODIFIED="1129352407411" TEXT="physics:: (similar to math::)"/>
|
||||
<node CREATED="1129352407412" FOLDED="true" ID="_Freemind_Link_1107695046" MODIFIED="1129352407412" TEXT="gui::">
|
||||
<node CREATED="1129352407412" ID="_Freemind_Link_548983970" MODIFIED="1129352407412" TEXT="skinnable XML based"/>
|
||||
</node>
|
||||
<node CREATED="1129352407412" FOLDED="true" ID="_Freemind_Link_304523376" MODIFIED="1129352407412" TEXT="network::">
|
||||
<node CREATED="1129352407412" ID="_Freemind_Link_717482997" MODIFIED="1129352407412" TEXT="wrap enet?"/>
|
||||
</node>
|
||||
<node CREATED="1129352407412" FOLDED="true" ID="_Freemind_Link_1766405270" MODIFIED="1141774045790" TEXT="scripting">
|
||||
<icon BUILTIN="help"/>
|
||||
<node CREATED="1129352407412" ID="_Freemind_Link_918658782" MODIFIED="1129352407412" TEXT="lua"/>
|
||||
<node CREATED="1129352407412" ID="_Freemind_Link_1079584283" MODIFIED="1129352407412" TEXT="python"/>
|
||||
<node CREATED="1129352407413" ID="_Freemind_Link_512949260" MODIFIED="1129352407413" TEXT="angelscript"/>
|
||||
<node CREATED="1129352407413" ID="_Freemind_Link_1813241804" MODIFIED="1129352407413" TEXT="custom"/>
|
||||
<node CREATED="1129352407413" ID="_Freemind_Link_1220379011" MODIFIED="1129352407413" TEXT="other"/>
|
||||
</node>
|
||||
</node>
|
||||
<node CREATED="1129352407413" ID="_Freemind_Link_1155128082" MODIFIED="1129352407413" TEXT="Improvements">
|
||||
<node CREATED="1129352407413" FOLDED="true" ID="_Freemind_Link_1067043723" MODIFIED="1141773979456" TEXT="allow for alternate backends">
|
||||
<icon BUILTIN="help"/>
|
||||
<node CREATED="1129352407413" FOLDED="true" ID="_Freemind_Link_1997175841" MODIFIED="1129352407413" TEXT="audiere for audio">
|
||||
<node CREATED="1129352407414" ID="_Freemind_Link_1142976123" MODIFIED="1129352407414" TEXT="is there a point?">
|
||||
<node CREATED="1129352407414" ID="_Freemind_Link_396200365" MODIFIED="1129352407414" TEXT="compatibility?"/>
|
||||
</node>
|
||||
</node>
|
||||
<node CREATED="1129352407414" ID="_Freemind_Link_961284194" MODIFIED="1129352407414" TEXT="SDL backend">
|
||||
<icon BUILTIN="help"/>
|
||||
</node>
|
||||
<node CREATED="1141773911841" FOLDED="true" ID="Freemind_Link_373492192" MODIFIED="1141773966402" TEXT="is feature consistency realistic?">
|
||||
<node CREATED="1141773921761" ID="Freemind_Link_515087403" MODIFIED="1141773961618" TEXT="without feature consistency alternate backends 
makes the code worse (too complex) without real gain "/>
|
||||
</node>
|
||||
</node>
|
||||
<node CREATED="1129352407414" FOLDED="true" ID="_Freemind_Link_1036629371" MODIFIED="1129352407414" TEXT="other languages">
|
||||
<node CREATED="1129352407414" ID="_Freemind_Link_21483700" MODIFIED="1141773889502" TEXT="python interface">
|
||||
<node CREATED="1130472430178" FOLDED="true" ID="Freemind_Link_1181436549" MODIFIED="1130472451458" TEXT="hotyth">
|
||||
<font BOLD="true" NAME="SansSerif" SIZE="12"/>
|
||||
<node CREATED="1130472573323" ID="Freemind_Link_577743930" MODIFIED="1130472686339" TEXT="potentially the justification for photon altogether">
|
||||
<node CREATED="1130472687051" FOLDED="true" ID="Freemind_Link_1124537894" MODIFIED="1130472780347" TEXT="potentially much faster than PyGame">
|
||||
<node CREATED="1130472717147" ID="Freemind_Link_1689800437" MODIFIED="1130472725955" TEXT="look into using Psyco"/>
|
||||
<node CREATED="1130472785878" ID="Freemind_Link_464299414" MODIFIED="1130472790515" TEXT="already using OpenGL-based backend"/>
|
||||
</node>
|
||||
<node CREATED="1130472695759" ID="Freemind_Link_284363350" MODIFIED="1130472714269" TEXT="more game-oriented"/>
|
||||
<node CREATED="1141773852825" ID="Freemind_Link_787719405" MODIFIED="1141773862551" TEXT="a 2nd real choice for python game devs"/>
|
||||
</node>
|
||||
<node CREATED="1141773829602" ID="Freemind_Link_1489817655" MODIFIED="1141773839377" TEXT="using SWIG (planning in progress)"/>
|
||||
</node>
|
||||
</node>
|
||||
<node CREATED="1129352407414" FOLDED="true" ID="_Freemind_Link_1083759822" MODIFIED="1129352407414" TEXT="java interface">
|
||||
<icon BUILTIN="help"/>
|
||||
<node CREATED="1141773866877" ID="Freemind_Link_162384371" MODIFIED="1141773879159" TEXT="if using SWIG trivial(?) to implement"/>
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
<node CREATED="1129352407415" FOLDED="true" ID="_Freemind_Link_1364557080" MODIFIED="1129352407415" TEXT="Publicity">
|
||||
<node CREATED="1129352407415" FOLDED="true" ID="_Freemind_Link_1945740551" MODIFIED="1129352407415" TEXT="Prepackaged Versions">
|
||||
<node CREATED="1130472887914" ID="Freemind_Link_1188152165" MODIFIED="1130472889315" TEXT="deb"/>
|
||||
<node CREATED="1130472893474" ID="Freemind_Link_1518311946" MODIFIED="1130472894690" TEXT="rpm"/>
|
||||
<node CREATED="1130472896908" ID="Freemind_Link_1315075072" MODIFIED="1130472904857" TEXT="Dev-C++ .devpak"/>
|
||||
</node>
|
||||
<node CREATED="1129352407415" ID="_Freemind_Link_836096408" MODIFIED="1129352407415" TEXT="Dependencies"/>
|
||||
<node CREATED="1129352407415" ID="_Freemind_Link_1316865000" MODIFIED="1129352407415" TEXT="Wiki"/>
|
||||
<node CREATED="1129352407415" ID="_Freemind_Link_959094471" MODIFIED="1129352407415" TEXT="Contest"/>
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
|
103
release.sh
Executable file
103
release.sh
Executable file
@ -0,0 +1,103 @@
|
||||
#!/bin/bash
|
||||
|
||||
# This file is part of Photon (http://photon.sourceforge.net)
|
||||
# Copyright (C) 2004-2005 James Turk
|
||||
#
|
||||
# Author:
|
||||
# James Turk (jpt2433@rit.edu)
|
||||
#
|
||||
# Version:
|
||||
# $Id: release.sh,v 1.5 2005/08/19 05:42:51 cozman Exp $
|
||||
|
||||
major=0
|
||||
minor=0
|
||||
release=2
|
||||
suffix=""
|
||||
|
||||
cvsTag="release-${major}_${minor}_${release}${suffix}"
|
||||
dirName="photon-${major}.${minor}.${release}" # after 0.1 drop ${release}
|
||||
srcPkgName="photon-${major}.${minor}.${release}${suffix}-src.tar.bz2"
|
||||
|
||||
# procedure to abort on errorcodes
|
||||
check_errs()
|
||||
{
|
||||
# Parameter 1 is the return code
|
||||
# Parameter 2 is text to display on failure.
|
||||
if [ "${1}" -ne "0" ]; then
|
||||
echo "ERROR : ${2}"
|
||||
# as a bonus, make our script exit with the right error code.
|
||||
exit ${1}
|
||||
fi
|
||||
}
|
||||
|
||||
# pre mode is run when preparing for a release
|
||||
if [[ "${1}" = "pre" ]]; then
|
||||
# first checkout a fresh copy from CVS
|
||||
echo "Attempting to check fresh copy of photon out from CVS..."
|
||||
rm -rf ./photon
|
||||
cvs -z3 -d:ext:cozman@cvs.sourceforge.net:/cvsroot/photon co -P photon
|
||||
check_errs $? "Obtaining photon via CVS failed"
|
||||
|
||||
cd photon
|
||||
check_errs $? "No photon directory?! Cannot proceed."
|
||||
|
||||
# run all scons targets
|
||||
scons
|
||||
check_errs $? "Building photon library failed, aborting."
|
||||
scons tests
|
||||
check_errs $? "Building photon tests failed, aborting."
|
||||
scons docs
|
||||
check_errs $? "Building photon docs failed, aborting."
|
||||
echo "All scons tests succeeded!"
|
||||
|
||||
echo "\nTime for some sanity checks, then run release.sh"
|
||||
|
||||
elif [[ "${1}" = "release" ]]; then
|
||||
# first checkout a fresh copy from CVS
|
||||
echo "Attempting to check fresh copy of photon out from CVS..."
|
||||
rm -rf ./photon
|
||||
cvs -z3 -d:ext:cozman@cvs.sourceforge.net:/cvsroot/photon co -P photon
|
||||
check_errs $? "Obtaining photon via CVS failed"
|
||||
|
||||
cd photon
|
||||
check_errs $? "No photon directory?! Cannot proceed."
|
||||
|
||||
echo "Tagging current CVS as ${cvsTag}"
|
||||
cvs rtag ${cvsTag} photon
|
||||
check_errs $? "Tagging photon in CVS failed"
|
||||
|
||||
echo "Attempting to export ${cvsTag} tagged copy of photon"
|
||||
cd .. # go up a directory before attempting second checkout
|
||||
cvs -z3 -d:ext:cozman@cvs.sourceforge.net:/cvsroot/photon export -r ${cvsTag} -d ${dirName} photon
|
||||
check_errs $? "${cvsTag} export failed"
|
||||
|
||||
cd ${dirName}
|
||||
check_errs $? "No photon directory?! Cannot proceed."
|
||||
|
||||
scons docs
|
||||
check_errs $? "Building photon docs failed, aborting."
|
||||
|
||||
# remove non-essential files
|
||||
rm -rf .sconf_temp/
|
||||
rm -rf docs/.cvsignore
|
||||
rm -rf include/.sconsign
|
||||
rm -rf include/*/.sconsign
|
||||
rm -rf include/*/*/.sconsign
|
||||
rm -rf ndoc/
|
||||
rm -rf ndoc/.cvsignore
|
||||
rm -rf .cvsignore
|
||||
rm -rf config.log
|
||||
rm -rf RELEASE-HOWTO.txt
|
||||
rm -rf release.sh
|
||||
|
||||
# rename directory for packaging
|
||||
cd ..
|
||||
tar cjf ${srcPkgName} ${dirName}/
|
||||
check_errs $? "Failed to create source package."
|
||||
|
||||
echo "Automated portion of release complete, put it up on sourceforge and relax."
|
||||
else
|
||||
echo "Usage: ./release.sh {pre|release}"
|
||||
fi
|
||||
|
||||
exit
|
@ -5,7 +5,7 @@
|
||||
// James Turk (jpt2433@rit.edu)
|
||||
//
|
||||
// Version:
|
||||
// $Id: Application.cpp,v 1.20 2005/08/08 21:39:41 cozman Exp $
|
||||
// $Id: Application.cpp,v 1.32 2007/05/13 15:18:37 cozman Exp $
|
||||
|
||||
#include "Application.hpp"
|
||||
|
||||
@ -16,55 +16,172 @@
|
||||
|
||||
#include <boost/lexical_cast.hpp>
|
||||
#include "exceptions.hpp"
|
||||
#include "Log.hpp"
|
||||
#include "Kernel.hpp"
|
||||
#include "Application.hpp"
|
||||
#include "audio/AudioCore.hpp"
|
||||
#include "util/filesys/filesys.hpp"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
namespace photon
|
||||
{
|
||||
|
||||
// static class members
|
||||
std::vector<InputListener*> Application::listeners_;
|
||||
std::vector<KeyCode> Application::pressedKeys_;
|
||||
std::stack<StatePtr> Application::stateStack_;
|
||||
|
||||
// (Con/De)structors ///////////////////////////////////////////////////////////
|
||||
|
||||
Application::Application(const std::string& arg0) :
|
||||
photonVer_(0,0,1), // this is the current version
|
||||
displayWidth_(0), displayHeight_(0),
|
||||
viewportWidth_(0), viewportHeight_(0),
|
||||
updateTask_(new UpdateTask()),
|
||||
stateUpdate_(new StateUpdate()),
|
||||
stateRender_(new StateRender())
|
||||
photonVer_(0,0,2), // this is the current version
|
||||
displayWidth_(0), displayHeight_(0), viewportWidth_(0), viewportHeight_(0),
|
||||
clearFlags_(GL_COLOR_BUFFER_BIT),
|
||||
mouseX_(0), mouseY_(0),
|
||||
active_(false), timerPaused_(false), unpauseOnActive_(false),
|
||||
lastPause_(0), pausedTime_(0), elapsedTime_(0), lastUpdate_(0),
|
||||
fixedTimeStep_(0), maxTimeStep_(0), timeAccumulator_(0), frameTimes_(0),
|
||||
quit_(true)
|
||||
{
|
||||
util::VersionInfo physfsReq(1,0,0); // requires PhysFS 1.0.0
|
||||
util::ensureVersion("PhysFS", initPhysFS(arg0), physfsReq);
|
||||
|
||||
util::VersionInfo glfwReq(2,4,2); // requires GLFW 2.4.2
|
||||
util::ensureVersion("GLFW", initGLFW(), glfwReq);
|
||||
|
||||
new Kernel; // create Kernel before it is used
|
||||
|
||||
Kernel::getInstance().addTask(updateTask_); // add updater task
|
||||
Kernel::getInstance().addTask(stateUpdate_); // add state updater task
|
||||
Kernel::getInstance().addTask(stateRender_); // add state renderer task
|
||||
}
|
||||
|
||||
Application::~Application()
|
||||
{
|
||||
if(displayWidth_ && displayHeight_)
|
||||
// clear stack on exit
|
||||
while(!stateStack_.empty())
|
||||
{
|
||||
glfwCloseWindow(); //close GLFW window
|
||||
popState();
|
||||
}
|
||||
|
||||
glfwTerminate(); // shutdown GLFW
|
||||
|
||||
PHYSFS_deinit(); // shutdown PhysFS
|
||||
}
|
||||
|
||||
Kernel::destroy(); // destroy Kernel on way out
|
||||
void Application::run()
|
||||
{
|
||||
if(quit_)
|
||||
{
|
||||
throw PreconditionException("Call to Application::run prior to creation"
|
||||
" of display.");
|
||||
}
|
||||
|
||||
if(stateStack_.empty())
|
||||
{
|
||||
throw PreconditionException("Call to Application::run with no state"
|
||||
" active.");
|
||||
}
|
||||
|
||||
while(!quit_)
|
||||
{
|
||||
update();
|
||||
}
|
||||
}
|
||||
|
||||
void Application::update()
|
||||
{
|
||||
// update glfw state
|
||||
glfwGetMousePos(&mouseX_, &mouseY_);
|
||||
|
||||
// quit on window closing or Alt-F4/Alt-X
|
||||
if(!glfwGetWindowParam(GLFW_OPENED) ||
|
||||
( (glfwGetKey(GLFW_KEY_LALT) || glfwGetKey(GLFW_KEY_RALT)) &&
|
||||
(glfwGetKey(GLFW_KEY_F4) || glfwGetKey('X')) ) )
|
||||
{
|
||||
quit();
|
||||
}
|
||||
|
||||
// hold active-state
|
||||
active_ = (glfwGetWindowParam(GLFW_ACTIVE) == GL_TRUE);
|
||||
|
||||
//automatically pause/unpause app timer on focus
|
||||
scalar curTime( getTime() );
|
||||
if(!active_ && !timerPaused_)
|
||||
{
|
||||
timerPaused_ = true;
|
||||
lastPause_ = curTime;
|
||||
unpauseOnActive_ = true;
|
||||
}
|
||||
else if(active_ && unpauseOnActive_)
|
||||
{
|
||||
timerPaused_ = false;
|
||||
//pausedTime_ += curTime - lastPause_;
|
||||
unpauseOnActive_ = false;
|
||||
}
|
||||
|
||||
// keep track of time between frames
|
||||
static uint frameIndex(0);
|
||||
|
||||
if(++frameIndex >= frameTimes_.size())
|
||||
{
|
||||
frameIndex = 0;
|
||||
}
|
||||
|
||||
elapsedTime_ = curTime-lastUpdate_;
|
||||
if(frameTimes_.size() > 0) {
|
||||
frameTimes_[frameIndex] = elapsedTime_;
|
||||
}
|
||||
|
||||
lastUpdate_ = curTime;
|
||||
|
||||
if(!stateStack_.empty() && !quit_)
|
||||
{
|
||||
if(fixedTimeStep_ > 0)
|
||||
{
|
||||
if(elapsedTime_ > maxTimeStep_)
|
||||
{
|
||||
elapsedTime_ = maxTimeStep_;
|
||||
}
|
||||
|
||||
timeAccumulator_ += elapsedTime_;
|
||||
|
||||
while(timeAccumulator_ >= fixedTimeStep_)
|
||||
{
|
||||
stateStack_.top()->update(fixedTimeStep_);
|
||||
updateTaskManager_.step(fixedTimeStep_);
|
||||
timeAccumulator_ -= fixedTimeStep_;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
stateStack_.top()->update(elapsedTime_);
|
||||
updateTaskManager_.step(elapsedTime_);
|
||||
}
|
||||
}
|
||||
|
||||
// render step
|
||||
if(!stateStack_.empty() && !quit_)
|
||||
{
|
||||
// clear everything before rendering
|
||||
glClear(clearFlags_);
|
||||
stateStack_.top()->render();
|
||||
renderTaskManager_.step(fixedTimeStep_);
|
||||
glfwSwapBuffers(); // swap buffers after rendering
|
||||
}
|
||||
}
|
||||
|
||||
void Application::quit()
|
||||
{
|
||||
glfwCloseWindow(); //close GLFW window
|
||||
|
||||
quit_ = true;
|
||||
}
|
||||
|
||||
util::TaskManager& Application::getUpdateTaskManager()
|
||||
{
|
||||
return updateTaskManager_;
|
||||
}
|
||||
|
||||
util::TaskManager& Application::getRenderTaskManager()
|
||||
{
|
||||
return renderTaskManager_;
|
||||
}
|
||||
|
||||
bool Application::isActive()
|
||||
{
|
||||
return active_;
|
||||
}
|
||||
|
||||
// Window //////////////////////////////////////////////////////////////////////
|
||||
@ -72,35 +189,38 @@ Application::~Application()
|
||||
void Application::createDisplay(uint width, uint height,
|
||||
uint redBits, uint greenBits, uint blueBits,
|
||||
uint alphaBits, uint depthBits, uint stencilBits,
|
||||
bool fullscreen, const std::string &title)
|
||||
DisplayMode mode, const std::string &title)
|
||||
{
|
||||
GLboolean status;
|
||||
status = glfwOpenWindow(width, height, redBits, greenBits,
|
||||
blueBits, alphaBits, depthBits, stencilBits,
|
||||
fullscreen ? GLFW_FULLSCREEN : GLFW_WINDOW);
|
||||
status = glfwOpenWindow(width, height, redBits, greenBits, blueBits,
|
||||
alphaBits, depthBits, stencilBits,
|
||||
mode == DISP_FULLSCREEN ? GLFW_FULLSCREEN : GLFW_WINDOW);
|
||||
if(status == GL_FALSE)
|
||||
{
|
||||
throw APIError("Failed to create display.");
|
||||
}
|
||||
displayWidth_ = width;
|
||||
displayHeight_ = height;
|
||||
|
||||
// fetch window size (fixes X11 fullscreen bug)
|
||||
glfwGetWindowSize(reinterpret_cast<int*>(&displayWidth_),
|
||||
reinterpret_cast<int*>(&displayHeight_));
|
||||
|
||||
glfwSetWindowTitle(title.c_str()); // title is set separately
|
||||
|
||||
initOpenGL();
|
||||
setOrthoView();
|
||||
Kernel::getInstance().addTask(TaskPtr(new VideoTask()));
|
||||
|
||||
// register the callbacks (after a window is open)
|
||||
glfwSetKeyCallback(Application::keyCallback);
|
||||
//glfwSetCharCallback(Application::charCallback);
|
||||
glfwSetMouseButtonCallback(Application::mouseButtonCallback);
|
||||
glfwSetMousePosCallback(Application::mouseMoveCallback);
|
||||
//glfwSetMouseWheelCallback(Application::mouseWheelCallback);
|
||||
glfwSetMouseWheelCallback(Application::mouseWheelCallback);
|
||||
|
||||
quit_ = false;
|
||||
}
|
||||
|
||||
void Application::createDisplay(uint width, uint height, uint bpp,
|
||||
uint depthBits, uint stencilBits, bool fullscreen,
|
||||
uint depthBits, uint stencilBits, DisplayMode mode,
|
||||
const std::string &title)
|
||||
{
|
||||
// call main version of createDisplay with individual values for rgba bits
|
||||
@ -108,25 +228,26 @@ void Application::createDisplay(uint width, uint height, uint bpp,
|
||||
{
|
||||
case 8:
|
||||
createDisplay(width, height, 3, 3, 2, 0, depthBits, stencilBits,
|
||||
fullscreen, title);
|
||||
mode, title);
|
||||
break;
|
||||
case 16:
|
||||
createDisplay(width, height, 5, 6, 5, 0, depthBits, stencilBits,
|
||||
fullscreen, title);
|
||||
mode, title);
|
||||
break;
|
||||
case 24:
|
||||
createDisplay(width, height, 8, 8, 8, 0, depthBits, stencilBits,
|
||||
fullscreen, title);
|
||||
mode, title);
|
||||
break;
|
||||
case 32:
|
||||
createDisplay(width, height, 8, 8, 8, 8, depthBits, stencilBits,
|
||||
fullscreen, title);
|
||||
mode, title);
|
||||
break;
|
||||
default:
|
||||
throw ArgumentException("bpp argument of createDisplay must be "
|
||||
"8,16,24, or 32, passed " +
|
||||
boost::lexical_cast<std::string>(bpp) );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void Application::setTitle(const std::string& title)
|
||||
@ -144,11 +265,6 @@ uint Application::getDisplayHeight()
|
||||
return displayHeight_;
|
||||
}
|
||||
|
||||
bool Application::isActive()
|
||||
{
|
||||
return updateTask_->active_;
|
||||
}
|
||||
|
||||
// Ortho ///////////////////////////////////////////////////////////////////////
|
||||
|
||||
void Application::setOrthoView(int x, int y, int viewWidth, int viewHeight,
|
||||
@ -213,7 +329,8 @@ void Application::setOrthoProjection(scalar width, scalar height)
|
||||
glLoadIdentity();
|
||||
}
|
||||
|
||||
void Application::setPerspectiveProjection(scalar fovy, scalar zNear, scalar zFar)
|
||||
void Application::setPerspectiveProjection(scalar fovy, scalar zNear,
|
||||
scalar zFar)
|
||||
{
|
||||
GLdouble ratio = static_cast<GLdouble>(viewportWidth_) /
|
||||
static_cast<GLdouble>(viewportHeight_);
|
||||
@ -226,6 +343,24 @@ void Application::setPerspectiveProjection(scalar fovy, scalar zNear, scalar zFa
|
||||
//back to modelview
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
glLoadIdentity();
|
||||
|
||||
setDepthBufferParams(true);
|
||||
}
|
||||
|
||||
void Application::setDepthBufferParams(bool enable, scalar depth)
|
||||
{
|
||||
if(enable)
|
||||
{
|
||||
glClearDepth(depth);
|
||||
glDepthFunc(GL_LEQUAL);
|
||||
glEnable(GL_DEPTH_TEST);
|
||||
clearFlags_ |= GL_DEPTH_BUFFER_BIT;
|
||||
}
|
||||
else
|
||||
{
|
||||
glDisable(GL_DEPTH_TEST);
|
||||
clearFlags_ &= ~GL_DEPTH_BUFFER_BIT;
|
||||
}
|
||||
}
|
||||
|
||||
// Input ///////////////////////////////////////////////////////////////////////
|
||||
@ -246,12 +381,12 @@ bool Application::mouseButtonPressed(MouseButton button)
|
||||
|
||||
int Application::getMouseX()
|
||||
{
|
||||
return updateTask_->mouseX_;
|
||||
return mouseX_;
|
||||
}
|
||||
|
||||
int Application::getMouseY()
|
||||
{
|
||||
return updateTask_->mouseY_;
|
||||
return mouseY_;
|
||||
}
|
||||
|
||||
int Application::getMouseWheelPos()
|
||||
@ -259,58 +394,122 @@ int Application::getMouseWheelPos()
|
||||
return glfwGetMouseWheel();
|
||||
}
|
||||
|
||||
// Input Listeners /////////////////////////////////////////////////////////////
|
||||
// Timing //////////////////////////////////////////////////////////////////////
|
||||
|
||||
void Application::addInputListener(InputListener *listener)
|
||||
scalar Application::getTime()
|
||||
{
|
||||
// should never happen since listeners add themselves with a this pointer
|
||||
if(!listener)
|
||||
{
|
||||
throw ArgumentException("Null pointer in "
|
||||
"Application::addInputListener");
|
||||
}
|
||||
|
||||
// add the listener
|
||||
listeners_.push_back(listener);
|
||||
return glfwGetTime() - pausedTime_;
|
||||
}
|
||||
|
||||
void Application::removeInputListener(InputListener *listener)
|
||||
void Application::setFrameTimeSmoothing(int numFrames)
|
||||
{
|
||||
// should never happen since listeners remove themselves with a this pointer
|
||||
if(!listener)
|
||||
{
|
||||
throw ArgumentException("Null pointer in "
|
||||
"Application::removeInputListener");
|
||||
}
|
||||
if(numFrames <= 1)
|
||||
numFrames = 0;
|
||||
|
||||
// find and erase the listener
|
||||
std::vector<InputListener*>::iterator it;
|
||||
it = std::find(listeners_.begin(), listeners_.end(), listener);
|
||||
|
||||
if(it != listeners_.end())
|
||||
{
|
||||
listeners_.erase(it);
|
||||
}
|
||||
frameTimes_.resize(numFrames);
|
||||
}
|
||||
|
||||
void GLFWCALL Application::keyCallback(int key, int action)
|
||||
double Application::getElapsedTime()
|
||||
{
|
||||
// notify all listeners
|
||||
for(std::vector<InputListener*>::iterator listener = listeners_.begin();
|
||||
listener != listeners_.end();
|
||||
++listener)
|
||||
if(frameTimes_.size() == 0)
|
||||
{
|
||||
// only active listeners get messages
|
||||
if((*listener)->isActive())
|
||||
{
|
||||
if(action == GLFW_PRESS)
|
||||
{
|
||||
(*listener)->onKeyPress(KeyCode(key));
|
||||
return elapsedTime_;
|
||||
}
|
||||
else
|
||||
{
|
||||
(*listener)->onKeyRelease(KeyCode(key));
|
||||
return frameTimes_.sum()/frameTimes_.size();
|
||||
}
|
||||
}
|
||||
|
||||
double Application::getFramerate()
|
||||
{
|
||||
return 1/getElapsedTime();
|
||||
}
|
||||
|
||||
void Application::setFixedUpdateStep(bool enable, scalar fixedStep,
|
||||
scalar maxStep)
|
||||
{
|
||||
if(!enable)
|
||||
{
|
||||
fixedTimeStep_ = -1; // set to < 0, disabling fixed timestepping
|
||||
}
|
||||
else
|
||||
{
|
||||
fixedTimeStep_ = fixedStep;
|
||||
if(maxStep <= 0)
|
||||
{
|
||||
maxTimeStep_ = 5*fixedTimeStep_;
|
||||
}
|
||||
else
|
||||
{
|
||||
maxTimeStep_ = maxStep;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// States //////////////////////////////////////////////////////////////////////
|
||||
|
||||
void Application::popState()
|
||||
{
|
||||
// check for underflow
|
||||
if(stateStack_.empty())
|
||||
{
|
||||
throw PreconditionException("Attempt to popState without at least one "
|
||||
"states on stack.");
|
||||
}
|
||||
|
||||
// pop current state from stack
|
||||
stateStack_.pop();
|
||||
|
||||
// resume new top state & set tasks for next state
|
||||
if(!stateStack_.empty())
|
||||
{
|
||||
stateStack_.top()->onResume();
|
||||
}
|
||||
}
|
||||
|
||||
// AudioCore ///////////////////////////////////////////////////////////////////
|
||||
#ifdef PHOTON_USE_OPENAL
|
||||
|
||||
audio::AudioCore& Application::getAudioCore()
|
||||
{
|
||||
// return AudioCore if it has been created
|
||||
if(audioCore_.get() == 0)
|
||||
{
|
||||
throw PreconditionException("call to Application::getAudioCore() before"
|
||||
" Application::initAudioDevice");
|
||||
}
|
||||
return *audioCore_;
|
||||
}
|
||||
|
||||
void Application::initAudioCore(const std::string& deviceName)
|
||||
{
|
||||
// create AudioCore, avoid double initializaiton
|
||||
if(audioCore_.get() == 0)
|
||||
{
|
||||
audioCore_.reset(new audio::OALAudioCore(deviceName));
|
||||
}
|
||||
else
|
||||
{
|
||||
throw PreconditionException("Attempt to double initialize AudioCore");
|
||||
}
|
||||
}
|
||||
|
||||
#endif //PHOTON_USE_OPENAL
|
||||
|
||||
// Callbacks ///////////////////////////////////////////////////////////////////
|
||||
|
||||
void GLFWCALL Application::keyCallback(int key, int action)
|
||||
{
|
||||
if(!stateStack_.empty())
|
||||
{
|
||||
if(action == GLFW_PRESS)
|
||||
{
|
||||
stateStack_.top()->onKeyPress(KeyCode(key));
|
||||
}
|
||||
else
|
||||
{
|
||||
stateStack_.top()->onKeyRelease(KeyCode(key));
|
||||
}
|
||||
}
|
||||
|
||||
@ -334,87 +533,46 @@ void GLFWCALL Application::keyCallback(int key, int action)
|
||||
|
||||
void GLFWCALL Application::mouseButtonCallback(int button, int action)
|
||||
{
|
||||
// notify all listeners
|
||||
for(std::vector<InputListener*>::iterator listener = listeners_.begin();
|
||||
listener != listeners_.end();
|
||||
++listener)
|
||||
{
|
||||
// only active listeners get messages
|
||||
if((*listener)->isActive())
|
||||
if(!stateStack_.empty())
|
||||
{
|
||||
if(action == GLFW_PRESS)
|
||||
{
|
||||
(*listener)->onMouseButtonPress(MouseButton(button));
|
||||
stateStack_.top()->onMouseButtonPress(MouseButton(button));
|
||||
}
|
||||
else
|
||||
{
|
||||
(*listener)->onMouseButtonRelease(MouseButton(button));
|
||||
}
|
||||
stateStack_.top()->onMouseButtonRelease(MouseButton(button));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void GLFWCALL Application::mouseMoveCallback(int x, int y)
|
||||
{
|
||||
// notify all listeners
|
||||
for(std::vector<InputListener*>::iterator listener = listeners_.begin();
|
||||
listener != listeners_.end();
|
||||
++listener)
|
||||
static math::Point2 lastPos;
|
||||
|
||||
if(!stateStack_.empty())
|
||||
{
|
||||
// only active listeners get messages
|
||||
if((*listener)->isActive())
|
||||
{
|
||||
(*listener)->onMouseMove(math::Vector2(static_cast<scalar>(x),
|
||||
static_cast<scalar>(y)));
|
||||
}
|
||||
// calculate change in position and send delta
|
||||
math::Point2 pos(static_cast<scalar>(x), static_cast<scalar>(y));
|
||||
stateStack_.top()->onMouseMove(pos - lastPos);
|
||||
lastPos = pos;
|
||||
}
|
||||
}
|
||||
|
||||
// Timing //////////////////////////////////////////////////////////////////////
|
||||
|
||||
scalar Application::getTime()
|
||||
void GLFWCALL Application::mouseWheelCallback(int pos)
|
||||
{
|
||||
return glfwGetTime() - updateTask_->pausedTime_;
|
||||
}
|
||||
static int lastPos(0);
|
||||
|
||||
double Application::getElapsedTime()
|
||||
{
|
||||
return updateTask_->secPerFrame_;
|
||||
}
|
||||
|
||||
double Application::getFramerate()
|
||||
{
|
||||
return 1/updateTask_->secPerFrame_;
|
||||
}
|
||||
// AudioCore ///////////////////////////////////////////////////////////////////
|
||||
#ifdef PHOTON_USE_OPENAL
|
||||
|
||||
audio::AudioCore& Application::getAudioCore()
|
||||
{
|
||||
// return AudioCore if it has been created
|
||||
if(audioCore_.get() == 0)
|
||||
if(!stateStack_.empty())
|
||||
{
|
||||
throw PreconditionException("call to Application::getAudioCore() before"
|
||||
" Application::initAudioDevice");
|
||||
}
|
||||
return *audioCore_;
|
||||
}
|
||||
|
||||
void Application::initAudioCore(const std::string& deviceName)
|
||||
{
|
||||
// create AudioCore, avoid double initializaiton
|
||||
if(audioCore_.get() == 0)
|
||||
{
|
||||
audioCore_.reset(new audio::AudioCore(deviceName));
|
||||
}
|
||||
else
|
||||
{
|
||||
throw PreconditionException("Attempt to double initialize AudioCore");
|
||||
// if pos < lastPos scrolled up, otherwise scrolled down
|
||||
stateStack_.top()->onMouseScroll( pos < lastPos ?
|
||||
SCROLL_DOWN :
|
||||
SCROLL_UP);
|
||||
lastPos = pos;
|
||||
}
|
||||
}
|
||||
|
||||
#endif //PHOTON_USE_OPENAL
|
||||
|
||||
// API initialization //////////////////////////////////////////////////////////
|
||||
|
||||
util::VersionInfo Application::initPhysFS(const std::string& arg0)
|
||||
@ -442,10 +600,6 @@ void Application::initOpenGL()
|
||||
// Set smooth shading.
|
||||
glShadeModel(GL_SMOOTH);
|
||||
|
||||
// Setup depth checking.
|
||||
//glDepthFunc(GL_LEQUAL);
|
||||
//glEnable(GL_DEPTH_TEST);
|
||||
|
||||
//setup hints
|
||||
glHint(GL_PERSPECTIVE_CORRECTION_HINT,GL_NICEST);
|
||||
|
||||
@ -458,87 +612,9 @@ void Application::initOpenGL()
|
||||
glEnable(GL_BLEND);
|
||||
glDisable(GL_LIGHTING);
|
||||
glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
|
||||
}
|
||||
|
||||
// Tasks ///////////////////////////////////////////////////////////////////////
|
||||
|
||||
Application::UpdateTask::UpdateTask() :
|
||||
Task("Application::UpdateTask", PRI_APP_UPDATE),
|
||||
mouseX_(0), mouseY_(0),
|
||||
active_(false), timerPaused_(false),
|
||||
unpauseOnActive_(false), lastPause_(0), pausedTime_(0),
|
||||
secPerFrame_(0), lastUpdate_(0)
|
||||
{
|
||||
}
|
||||
|
||||
void Application::UpdateTask::update()
|
||||
{
|
||||
scalar curTime = glfwGetTime() - pausedTime_;
|
||||
|
||||
// update the display here instead of Application (since it belongs to glfw)
|
||||
glfwSwapBuffers();
|
||||
|
||||
glfwGetMousePos(&mouseX_, &mouseY_);
|
||||
|
||||
// keep track of time between frames
|
||||
secPerFrame_ = curTime-lastUpdate_;
|
||||
lastUpdate_ = curTime;
|
||||
|
||||
// quit on window closing or Alt-F4/Alt-X
|
||||
if(!glfwGetWindowParam(GLFW_OPENED) ||
|
||||
( (glfwGetKey(GLFW_KEY_LALT) || glfwGetKey(GLFW_KEY_RALT)) &&
|
||||
(glfwGetKey(GLFW_KEY_F4) || glfwGetKey('X')) ) )
|
||||
{
|
||||
Kernel::getInstance().killAllTasks();
|
||||
}
|
||||
|
||||
// hold active-state
|
||||
active_ = (glfwGetWindowParam(GLFW_ACTIVE) == GL_TRUE);
|
||||
|
||||
// automatically pause/unpause app timer on focus
|
||||
if(!active_ && !timerPaused_)
|
||||
{
|
||||
timerPaused_ = true;
|
||||
lastPause_ = curTime;
|
||||
unpauseOnActive_ = true;
|
||||
}
|
||||
else if(active_ && unpauseOnActive_)
|
||||
{
|
||||
timerPaused_ = true;
|
||||
pausedTime_ += curTime - lastPause_;
|
||||
unpauseOnActive_ = false;
|
||||
}
|
||||
}
|
||||
|
||||
Application::VideoTask::VideoTask() :
|
||||
Task("Application::VideoTask", PRI_VIDEO_UPDATE)
|
||||
{
|
||||
}
|
||||
|
||||
void Application::VideoTask::update()
|
||||
{
|
||||
// TODO: clear depth/stencil if requested
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
}
|
||||
|
||||
Application::StateUpdate::StateUpdate() :
|
||||
Task("Application::StateUpdate", PRI_NORMAL)
|
||||
{
|
||||
}
|
||||
|
||||
void Application::StateUpdate::update()
|
||||
{
|
||||
state_->update();
|
||||
}
|
||||
|
||||
Application::StateRender::StateRender() :
|
||||
Task("Application::StateRender", PRI_RENDER)
|
||||
{
|
||||
}
|
||||
|
||||
void Application::StateRender::update()
|
||||
{
|
||||
state_->render();
|
||||
// depth testing enabled by default
|
||||
setDepthBufferParams(false);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,46 +0,0 @@
|
||||
//This file is part of Photon (http://photon.sourceforge.net)
|
||||
//Copyright (C) 2004-2005 James Turk
|
||||
//
|
||||
// Author:
|
||||
// James Turk (jpt2433@rit.edu)
|
||||
//
|
||||
// Version:
|
||||
// $Id: InputListener.cpp,v 1.3 2005/08/08 19:19:22 cozman Exp $
|
||||
|
||||
#include "InputListener.hpp"
|
||||
|
||||
#include "Application.hpp"
|
||||
|
||||
namespace photon
|
||||
{
|
||||
|
||||
InputListener::InputListener() :
|
||||
active_(true)
|
||||
{
|
||||
Application::addInputListener(this);
|
||||
}
|
||||
|
||||
InputListener::~InputListener()
|
||||
{
|
||||
Application::removeInputListener(this);
|
||||
}
|
||||
|
||||
void InputListener::setActive(bool active)
|
||||
{
|
||||
active_ = active;
|
||||
}
|
||||
|
||||
bool InputListener::isActive() const
|
||||
{
|
||||
return active_;
|
||||
}
|
||||
|
||||
// do nothing, overloaded as needed
|
||||
void InputListener::onKeyPress(KeyCode key) { }
|
||||
void InputListener::onKeyRelease(KeyCode key) { }
|
||||
void InputListener::onMouseButtonPress(MouseButton button) { }
|
||||
void InputListener::onMouseButtonRelease(MouseButton button) { }
|
||||
void InputListener::onMouseMove(const math::Vector2& pos) { }
|
||||
|
||||
|
||||
}
|
@ -5,7 +5,7 @@
|
||||
// James Turk (jpt2433@rit.edu)
|
||||
//
|
||||
// Version:
|
||||
// $Id: AudioCore.cpp,v 1.13 2005/08/08 21:39:41 cozman Exp $
|
||||
// $Id: AudioCore.cpp,v 1.15 2005/10/28 22:13:03 cozman Exp $
|
||||
|
||||
#ifdef PHOTON_USE_OPENAL
|
||||
|
||||
@ -19,8 +19,9 @@ namespace photon
|
||||
namespace audio
|
||||
{
|
||||
|
||||
//AudioCore::AudioCore()
|
||||
AudioCore::AudioCore(const std::string& deviceName)
|
||||
|
||||
OALAudioCore::OALAudioCore(const std::string& deviceName) :
|
||||
AudioCore(deviceName)
|
||||
{
|
||||
//util::VersionInfo oalReq(0,0,7); // requires OpenAL 1.0 (TODO: check?)
|
||||
//util::ensureVersion("OpenAL", initOpenAL(), oalReq);
|
||||
@ -28,7 +29,7 @@ AudioCore::AudioCore(const std::string& deviceName)
|
||||
initOpenAL(deviceName); // don't check version for now
|
||||
}
|
||||
|
||||
AudioCore::~AudioCore()
|
||||
OALAudioCore::~OALAudioCore()
|
||||
{
|
||||
// retrieve both the context and device
|
||||
ALCcontext* context( alcGetCurrentContext() );
|
||||
@ -42,7 +43,7 @@ AudioCore::~AudioCore()
|
||||
alcMakeContextCurrent(0);
|
||||
}
|
||||
|
||||
std::string AudioCore::getAudioDeviceName() const
|
||||
std::string OALAudioCore::getAudioDeviceName() const
|
||||
{
|
||||
ALCdevice* device (alcGetContextsDevice( alcGetCurrentContext() ));
|
||||
std::string name ( reinterpret_cast<const char*>(
|
||||
@ -51,7 +52,7 @@ std::string AudioCore::getAudioDeviceName() const
|
||||
return name;
|
||||
}
|
||||
|
||||
std::string AudioCore::checkOpenALError()
|
||||
std::string OALAudioCore::checkOpenALError()
|
||||
{
|
||||
ALenum errCode = alGetError(); // fetch error code
|
||||
std::string err;
|
||||
@ -85,7 +86,7 @@ std::string AudioCore::checkOpenALError()
|
||||
return err;
|
||||
}
|
||||
|
||||
void AudioCore::throwOpenALError(const std::string& func)
|
||||
void OALAudioCore::throwOpenALError(const std::string& func)
|
||||
{
|
||||
std::string err( checkOpenALError() );
|
||||
if(err.length()) // throw exception if non-empty string
|
||||
@ -94,18 +95,18 @@ void AudioCore::throwOpenALError(const std::string& func)
|
||||
}
|
||||
}
|
||||
|
||||
util::VersionInfo AudioCore::initOpenAL(const std::string& deviceName)
|
||||
util::VersionInfo OALAudioCore::initOpenAL(const std::string& deviceName)
|
||||
{
|
||||
ALCdevice* device(0);
|
||||
ALCcontext* context(0);
|
||||
std::stringstream ss; // stream for parsing version
|
||||
std::string junks; // junk string for parsing
|
||||
char junkc; // junk character for parsing
|
||||
uint major,minor,patch; // version numbers
|
||||
uint major,minor; // version numbers
|
||||
std::string extra; // extra string for OpenAL extra info
|
||||
|
||||
// obtain default device if no deviceName is set, otherwise use deviceName
|
||||
device = alcOpenDevice(deviceName.empty() ? 0 :
|
||||
reinterpret_cast<const ALubyte*>(deviceName.c_str()) );
|
||||
reinterpret_cast<const ALchar*>(deviceName.c_str()) );
|
||||
|
||||
if(device == 0)
|
||||
{
|
||||
@ -131,17 +132,13 @@ util::VersionInfo AudioCore::initOpenAL(const std::string& deviceName)
|
||||
alListenerfv(AL_VELOCITY, posvel);
|
||||
alListenerfv(AL_ORIENTATION, ori);
|
||||
|
||||
// OpenAL needs a standard version string format badly
|
||||
// format is major.minor extra-info
|
||||
ss << alGetString(AL_VERSION);
|
||||
#if defined(linux)
|
||||
ss >> major >> junkc >> minor >> junkc >> patch;
|
||||
#else
|
||||
ss >> junks >> major >> junkc >> minor; // format is "OpenAL 1.0"
|
||||
#endif
|
||||
ss >> major >> junkc >> minor >> extra;
|
||||
|
||||
throwOpenALError("AudioCore::initOpenAL");
|
||||
throwOpenALError("OALAudioCore::initOpenAL");
|
||||
|
||||
return util::VersionInfo(major,minor,patch);
|
||||
return util::VersionInfo(major,minor,0,extra);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -5,7 +5,7 @@
|
||||
// James Turk (jpt2433@rit.edu)
|
||||
//
|
||||
// Version:
|
||||
// $Id: SampleResourceManager.cpp,v 1.3 2005/07/18 05:14:18 cozman Exp $
|
||||
// $Id: SampleResourceManager.cpp,v 1.5 2005/10/28 22:13:03 cozman Exp $
|
||||
|
||||
#ifdef PHOTON_USE_OPENAL
|
||||
|
||||
@ -14,7 +14,8 @@
|
||||
#include "util/FileBuffer.hpp"
|
||||
|
||||
#include "AL/al.h"
|
||||
#include "AL/alut.h" // used for loading WAVs, to be phased out
|
||||
|
||||
#include <iostream>
|
||||
|
||||
namespace photon
|
||||
{
|
||||
@ -35,10 +36,9 @@ void SampleResourceManager::loadResourceData(SampleResource &res,
|
||||
util::FileBuffer buf(desc.path);
|
||||
// OpenAL variables to load into.
|
||||
ALenum format;
|
||||
ALsizei size;
|
||||
ALvoid* data;
|
||||
ALsizei freq;
|
||||
ALboolean loop;
|
||||
uint size;
|
||||
ubyte* data;
|
||||
uint freq;
|
||||
|
||||
// load from FileBuffer (allows loading from zip via PhysFS)
|
||||
std::vector<ubyte> filedata = buf.getData();
|
||||
@ -46,17 +46,14 @@ void SampleResourceManager::loadResourceData(SampleResource &res,
|
||||
|
||||
alGenBuffers(1, &res.bufferID); // create OpenAL buffer
|
||||
|
||||
AudioCore::throwOpenALError("alGenBuffers");
|
||||
OALAudioCore::throwOpenALError("alGenBuffers");
|
||||
|
||||
// load WAV via alut
|
||||
alutLoadWAVMemory(reinterpret_cast<ALbyte*>(&filedata[0]),
|
||||
&format, &data, &size, &freq, &loop);
|
||||
AudioCore::throwOpenALError("alutLoadWAVFile");
|
||||
// load WAV and pass it into OpenAL buffer
|
||||
loadWAVMemory(&filedata[0], format, data, size, freq);
|
||||
alBufferData(res.bufferID, format, (ALvoid*)data, size, freq);
|
||||
freeWAVMemory(data);
|
||||
|
||||
alBufferData(res.bufferID, format, data, size, freq);
|
||||
alutUnloadWAV(format, data, size, freq);
|
||||
|
||||
AudioCore::throwOpenALError("SampleResourceManager::loadResourceData");
|
||||
OALAudioCore::throwOpenALError("alBufferData");
|
||||
}
|
||||
|
||||
void SampleResourceManager::freeResourceData(SampleResource& res)
|
||||
@ -68,6 +65,77 @@ void SampleResourceManager::freeResourceData(SampleResource& res)
|
||||
}
|
||||
}
|
||||
|
||||
void SampleResourceManager::loadWAVMemory(const ubyte* memory, ALenum& format, ubyte*& data,
|
||||
uint& size, uint& freq)
|
||||
{
|
||||
WaveHeader wavHeader;
|
||||
|
||||
std::memcpy(&wavHeader, memory, sizeof(WaveHeader));
|
||||
|
||||
// check vital fields of WAV file for validation
|
||||
if(wavHeader.fmt.format != 1)
|
||||
{
|
||||
throw ResourceException("Error loading WAV: Non-PCM format WAV");
|
||||
}
|
||||
if(wavHeader.riff.chunkID != WaveHeader::RIFF)
|
||||
{
|
||||
throw ResourceException("Error loading WAV: Invalid RIFF chunk.");
|
||||
}
|
||||
if(wavHeader.riff.format != WaveHeader::WAVE)
|
||||
{
|
||||
throw ResourceException("Error loading WAV: Invalid WAVE header.");
|
||||
}
|
||||
if(wavHeader.fmt.chunkID != WaveHeader::FMT)
|
||||
{
|
||||
throw ResourceException("Error loading WAV: Invalid FMT chunk.");
|
||||
}
|
||||
if(wavHeader.chunkID != WaveHeader::DATA)
|
||||
{
|
||||
throw ResourceException("Error loading WAV: Invalid DATA chunk.");
|
||||
}
|
||||
|
||||
// set OpenAL format based on channels & bitsPerSample
|
||||
if(wavHeader.fmt.numChannels == 1 && wavHeader.fmt.bitsPerSample == 8)
|
||||
{
|
||||
format = AL_FORMAT_MONO8;
|
||||
}
|
||||
else if(wavHeader.fmt.numChannels == 1 && wavHeader.fmt.bitsPerSample == 16)
|
||||
{
|
||||
format = AL_FORMAT_MONO16;
|
||||
}
|
||||
else if(wavHeader.fmt.numChannels == 2 && wavHeader.fmt.bitsPerSample == 8)
|
||||
{
|
||||
format = AL_FORMAT_STEREO8;
|
||||
}
|
||||
else if(wavHeader.fmt.numChannels == 2 && wavHeader.fmt.bitsPerSample == 16)
|
||||
{
|
||||
format = AL_FORMAT_STEREO16;
|
||||
}
|
||||
else
|
||||
{
|
||||
throw ResourceException("Error loading WAV: Invalid audio format.");
|
||||
}
|
||||
|
||||
// copy size and frequency
|
||||
size = wavHeader.dataSize;
|
||||
freq = wavHeader.fmt.sampleRate;
|
||||
|
||||
// allocate space and copy data
|
||||
data = new ubyte[size];
|
||||
std::memcpy(data, memory+sizeof(WaveHeader), size);
|
||||
}
|
||||
|
||||
void SampleResourceManager::freeWAVMemory(ubyte*& data)
|
||||
{
|
||||
if(data == 0)
|
||||
{
|
||||
assert(0);
|
||||
}
|
||||
|
||||
delete[] data;
|
||||
data = 0;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user