gosu 0.7.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/COPYING.txt +29 -0
- data/Gosu/Async.hpp +48 -0
- data/Gosu/Audio.hpp +145 -0
- data/Gosu/AutoLink.hpp +16 -0
- data/Gosu/Bitmap.hpp +85 -0
- data/Gosu/ButtonsMac.hpp +114 -0
- data/Gosu/ButtonsWin.hpp +111 -0
- data/Gosu/ButtonsX.hpp +115 -0
- data/Gosu/Color.hpp +172 -0
- data/Gosu/Directories.hpp +36 -0
- data/Gosu/Font.hpp +59 -0
- data/Gosu/Fwd.hpp +31 -0
- data/Gosu/Gosu.hpp +26 -0
- data/Gosu/Graphics.hpp +86 -0
- data/Gosu/GraphicsBase.hpp +45 -0
- data/Gosu/IO.hpp +255 -0
- data/Gosu/Image.hpp +148 -0
- data/Gosu/ImageData.hpp +45 -0
- data/Gosu/Input.hpp +116 -0
- data/Gosu/Math.hpp +95 -0
- data/Gosu/Platform.hpp +61 -0
- data/Gosu/RotFlip.hpp +116 -0
- data/Gosu/Sockets.hpp +129 -0
- data/Gosu/Text.hpp +47 -0
- data/Gosu/TextInput.hpp +57 -0
- data/Gosu/Timing.hpp +16 -0
- data/Gosu/Utility.hpp +24 -0
- data/Gosu/WinUtility.hpp +76 -0
- data/Gosu/Window.hpp +84 -0
- data/GosuImpl/Async.cpp +37 -0
- data/GosuImpl/AudioFmod.cpp +417 -0
- data/GosuImpl/AudioSDL.cpp +255 -0
- data/GosuImpl/DirectoriesMac.mm +38 -0
- data/GosuImpl/DirectoriesUnix.cpp +48 -0
- data/GosuImpl/DirectoriesWin.cpp +42 -0
- data/GosuImpl/FileUnix.cpp +100 -0
- data/GosuImpl/FileWin.cpp +83 -0
- data/GosuImpl/Graphics/Bitmap.cpp +116 -0
- data/GosuImpl/Graphics/BitmapBMP.cpp +232 -0
- data/GosuImpl/Graphics/BitmapColorKey.cpp +39 -0
- data/GosuImpl/Graphics/BitmapPNG.cpp +276 -0
- data/GosuImpl/Graphics/BitmapUtils.cpp +67 -0
- data/GosuImpl/Graphics/BlockAllocator.cpp +127 -0
- data/GosuImpl/Graphics/BlockAllocator.hpp +34 -0
- data/GosuImpl/Graphics/Color.cpp +126 -0
- data/GosuImpl/Graphics/Common.hpp +21 -0
- data/GosuImpl/Graphics/DrawOp.hpp +154 -0
- data/GosuImpl/Graphics/Font.cpp +110 -0
- data/GosuImpl/Graphics/Graphics.cpp +295 -0
- data/GosuImpl/Graphics/Image.cpp +159 -0
- data/GosuImpl/Graphics/LargeImageData.cpp +115 -0
- data/GosuImpl/Graphics/LargeImageData.hpp +37 -0
- data/GosuImpl/Graphics/RotFlip.cpp +184 -0
- data/GosuImpl/Graphics/TexChunk.cpp +77 -0
- data/GosuImpl/Graphics/TexChunk.hpp +40 -0
- data/GosuImpl/Graphics/Text.cpp +223 -0
- data/GosuImpl/Graphics/TextMac.cpp +242 -0
- data/GosuImpl/Graphics/TextPangoFT.cpp +186 -0
- data/GosuImpl/Graphics/TextWin.cpp +172 -0
- data/GosuImpl/Graphics/Texture.cpp +104 -0
- data/GosuImpl/Graphics/Texture.hpp +34 -0
- data/GosuImpl/IO.cpp +48 -0
- data/GosuImpl/InputMac.mm +677 -0
- data/GosuImpl/InputWin.cpp +444 -0
- data/GosuImpl/InputX.cpp +158 -0
- data/GosuImpl/MacUtility.hpp +48 -0
- data/GosuImpl/Math.cpp +49 -0
- data/GosuImpl/RubyGosu.swg +474 -0
- data/GosuImpl/RubyGosuStub.mm +17 -0
- data/GosuImpl/RubyGosu_DllMain.cxx +30 -0
- data/GosuImpl/RubyGosu_wrap.cxx +8521 -0
- data/GosuImpl/RubyGosu_wrap.h +31 -0
- data/GosuImpl/Sockets/CommSocket.cpp +304 -0
- data/GosuImpl/Sockets/ListenerSocket.cpp +60 -0
- data/GosuImpl/Sockets/MessageSocket.cpp +136 -0
- data/GosuImpl/Sockets/Socket.cpp +145 -0
- data/GosuImpl/Sockets/Sockets.hpp +66 -0
- data/GosuImpl/TextInputMac.mm +207 -0
- data/GosuImpl/TextInputWin.cpp +197 -0
- data/GosuImpl/TextInputX.cpp +201 -0
- data/GosuImpl/TextTTFWin.cpp +247 -0
- data/GosuImpl/TimingUnix.cpp +17 -0
- data/GosuImpl/TimingWin.cpp +28 -0
- data/GosuImpl/Utility.cpp +140 -0
- data/GosuImpl/WinMain.cpp +69 -0
- data/GosuImpl/WinUtility.cpp +137 -0
- data/GosuImpl/WindowMac.mm +466 -0
- data/GosuImpl/WindowWin.cpp +447 -0
- data/GosuImpl/WindowX.cpp +392 -0
- data/GosuImpl/X11vroot.h +118 -0
- data/README.txt +13 -0
- data/Rakefile +178 -0
- data/examples/ChipmunkIntegration.rb +275 -0
- data/examples/CptnRuby.rb +231 -0
- data/examples/MoreChipmunkAndRMagick.rb +155 -0
- data/examples/OpenGLIntegration.rb +232 -0
- data/examples/RMagickIntegration.rb +449 -0
- data/examples/TextInput.cpp +170 -0
- data/examples/TextInput.rb +139 -0
- data/examples/Tutorial.cpp +215 -0
- data/examples/Tutorial.rb +137 -0
- data/examples/media/Beep.wav +0 -0
- data/examples/media/CptnRuby Gem.png +0 -0
- data/examples/media/CptnRuby Map.txt +25 -0
- data/examples/media/CptnRuby Tileset.png +0 -0
- data/examples/media/CptnRuby.png +0 -0
- data/examples/media/Cursor.png +0 -0
- data/examples/media/Earth.png +0 -0
- data/examples/media/Explosion.wav +0 -0
- data/examples/media/LargeStar.png +0 -0
- data/examples/media/Sky.jpg +0 -0
- data/examples/media/Smoke.png +0 -0
- data/examples/media/Soldier.png +0 -0
- data/examples/media/Space.png +0 -0
- data/examples/media/Star.png +0 -0
- data/examples/media/Starfighter.bmp +0 -0
- data/linux/Makefile.in +98 -0
- data/linux/configure +5658 -0
- data/linux/configure.ac +126 -0
- data/linux/extconf.rb +11 -0
- data/mac/English.lproj/InfoPlist.strings +0 -0
- data/mac/Gosu-Info.plist +26 -0
- data/mac/Gosu.xcodeproj/project.pbxproj +1194 -0
- data/mac/RubyGosu Template-Info.plist +26 -0
- data/mac/libboost_thread_1_34_1_universal.a +0 -0
- data/mac/libboost_thread_d_1_34_1_universal.a +0 -0
- data/mac/libfmod_universal.a +0 -0
- data/mac/libpng_universal.a +0 -0
- data/mac/libz_universal.a +0 -0
- data/reference/Async_8hpp-source.html +70 -0
- data/reference/Audio_8hpp-source.html +114 -0
- data/reference/Audio_8hpp.html +50 -0
- data/reference/AutoLink_8hpp-source.html +38 -0
- data/reference/AutoLink_8hpp.html +34 -0
- data/reference/Bitmap_8hpp-source.html +85 -0
- data/reference/Bitmap_8hpp.html +58 -0
- data/reference/ButtonsMac_8hpp-source.html +133 -0
- data/reference/ButtonsWin_8hpp-source.html +133 -0
- data/reference/ButtonsX_8hpp-source.html +134 -0
- data/reference/Color_8hpp-source.html +169 -0
- data/reference/Color_8hpp.html +85 -0
- data/reference/Directories_8hpp-source.html +42 -0
- data/reference/Directories_8hpp.html +46 -0
- data/reference/Font_8hpp-source.html +65 -0
- data/reference/Font_8hpp.html +41 -0
- data/reference/Fwd_8hpp-source.html +52 -0
- data/reference/Fwd_8hpp.html +37 -0
- data/reference/Gosu_8hpp-source.html +48 -0
- data/reference/Gosu_8hpp.html +34 -0
- data/reference/GraphicsBase_8hpp-source.html +57 -0
- data/reference/GraphicsBase_8hpp.html +56 -0
- data/reference/Graphics_8hpp-source.html +96 -0
- data/reference/Graphics_8hpp.html +53 -0
- data/reference/IO_8hpp-source.html +255 -0
- data/reference/IO_8hpp.html +74 -0
- data/reference/ImageData_8hpp-source.html +62 -0
- data/reference/ImageData_8hpp.html +43 -0
- data/reference/Image_8hpp-source.html +126 -0
- data/reference/Image_8hpp.html +48 -0
- data/reference/Input_8hpp-source.html +118 -0
- data/reference/Input_8hpp.html +50 -0
- data/reference/Math_8hpp-source.html +92 -0
- data/reference/Math_8hpp.html +74 -0
- data/reference/Platform_8hpp-source.html +83 -0
- data/reference/Platform_8hpp.html +73 -0
- data/reference/RotFlip_8hpp-source.html +138 -0
- data/reference/RotFlip_8hpp.html +77 -0
- data/reference/Sockets_8hpp-source.html +130 -0
- data/reference/Sockets_8hpp.html +66 -0
- data/reference/TextInput_8hpp-source.html +64 -0
- data/reference/TextInput_8hpp.html +41 -0
- data/reference/Text_8hpp-source.html +51 -0
- data/reference/Text_8hpp.html +46 -0
- data/reference/Timing_8hpp-source.html +36 -0
- data/reference/Timing_8hpp.html +42 -0
- data/reference/Utility_8hpp-source.html +44 -0
- data/reference/Utility_8hpp.html +48 -0
- data/reference/WinUtility_8hpp-source.html +79 -0
- data/reference/WinUtility_8hpp.html +64 -0
- data/reference/Window_8hpp-source.html +91 -0
- data/reference/Window_8hpp.html +41 -0
- data/reference/annotated.html +51 -0
- data/reference/classGosu_1_1Audio-members.html +34 -0
- data/reference/classGosu_1_1Audio.html +46 -0
- data/reference/classGosu_1_1Bitmap-members.html +44 -0
- data/reference/classGosu_1_1Bitmap.html +263 -0
- data/reference/classGosu_1_1Buffer-members.html +44 -0
- data/reference/classGosu_1_1Buffer.html +78 -0
- data/reference/classGosu_1_1Buffer.png +0 -0
- data/reference/classGosu_1_1Button-members.html +36 -0
- data/reference/classGosu_1_1Button.html +143 -0
- data/reference/classGosu_1_1Color-members.html +56 -0
- data/reference/classGosu_1_1Color.html +387 -0
- data/reference/classGosu_1_1File-members.html +41 -0
- data/reference/classGosu_1_1File.html +69 -0
- data/reference/classGosu_1_1File.png +0 -0
- data/reference/classGosu_1_1Font-members.html +39 -0
- data/reference/classGosu_1_1Font.html +309 -0
- data/reference/classGosu_1_1Graphics-members.html +50 -0
- data/reference/classGosu_1_1Graphics.html +234 -0
- data/reference/classGosu_1_1Image-members.html +45 -0
- data/reference/classGosu_1_1Image.html +518 -0
- data/reference/classGosu_1_1ImageData-members.html +37 -0
- data/reference/classGosu_1_1ImageData.html +60 -0
- data/reference/classGosu_1_1Input-members.html +44 -0
- data/reference/classGosu_1_1Input.html +223 -0
- data/reference/classGosu_1_1MessageSocket-members.html +40 -0
- data/reference/classGosu_1_1MessageSocket.html +233 -0
- data/reference/classGosu_1_1Resource-members.html +39 -0
- data/reference/classGosu_1_1Resource.html +116 -0
- data/reference/classGosu_1_1Resource.png +0 -0
- data/reference/classGosu_1_1Sample-members.html +37 -0
- data/reference/classGosu_1_1Sample.html +200 -0
- data/reference/classGosu_1_1SampleInstance-members.html +38 -0
- data/reference/classGosu_1_1SampleInstance.html +169 -0
- data/reference/classGosu_1_1Song-members.html +43 -0
- data/reference/classGosu_1_1Song.html +260 -0
- data/reference/classGosu_1_1TextInput-members.html +38 -0
- data/reference/classGosu_1_1TextInput.html +121 -0
- data/reference/classGosu_1_1Window-members.html +50 -0
- data/reference/classGosu_1_1Window.html +271 -0
- data/reference/doxyfile +233 -0
- data/reference/doxygen.css +433 -0
- data/reference/doxygen.png +0 -0
- data/reference/files.html +54 -0
- data/reference/functions.html +236 -0
- data/reference/functions_enum.html +45 -0
- data/reference/functions_func.html +227 -0
- data/reference/functions_vars.html +47 -0
- data/reference/hierarchy.html +53 -0
- data/reference/index.html +26 -0
- data/reference/namespaceGosu.html +2890 -0
- data/reference/namespaceGosu_1_1Colors.html +70 -0
- data/reference/namespaceGosu_1_1Win.html +275 -0
- data/reference/namespacemembers.html +216 -0
- data/reference/namespacemembers_enum.html +52 -0
- data/reference/namespacemembers_eval.html +54 -0
- data/reference/namespacemembers_func.html +185 -0
- data/reference/namespacemembers_type.html +46 -0
- data/reference/namespacemembers_vars.html +46 -0
- data/reference/namespaces.html +35 -0
- data/reference/tab_b.gif +0 -0
- data/reference/tab_l.gif +0 -0
- data/reference/tab_r.gif +0 -0
- data/reference/tabs.css +102 -0
- data/windows/Gosu.sln +29 -0
- data/windows/Gosu.vcproj +553 -0
- data/windows/RubyGosu.vcproj +138 -0
- metadata +305 -0
@@ -0,0 +1,57 @@
|
|
1
|
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
2
|
+
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
|
3
|
+
<title>Gosu: GraphicsBase.hpp Source File</title>
|
4
|
+
<link href="doxygen.css" rel="stylesheet" type="text/css">
|
5
|
+
<link href="tabs.css" rel="stylesheet" type="text/css">
|
6
|
+
</head><body>
|
7
|
+
<!-- Generated by Doxygen 1.5.5 -->
|
8
|
+
<div class="navigation" id="top">
|
9
|
+
<div class="tabs">
|
10
|
+
<ul>
|
11
|
+
<li><a href="index.html"><span>Main Page</span></a></li>
|
12
|
+
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
|
13
|
+
<li><a href="annotated.html"><span>Classes</span></a></li>
|
14
|
+
<li class="current"><a href="files.html"><span>Files</span></a></li>
|
15
|
+
</ul>
|
16
|
+
</div>
|
17
|
+
<h1>GraphicsBase.hpp</h1><a href="GraphicsBase_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001
|
18
|
+
<a name="l00002"></a>00002
|
19
|
+
<a name="l00003"></a>00003
|
20
|
+
<a name="l00004"></a>00004 <span class="preprocessor">#ifndef GOSU_GRAPHICSBASE_HPP</span>
|
21
|
+
<a name="l00005"></a>00005 <span class="preprocessor"></span><span class="preprocessor">#define GOSU_GRAPHICSBASE_HPP</span>
|
22
|
+
<a name="l00006"></a>00006 <span class="preprocessor"></span>
|
23
|
+
<a name="l00007"></a>00007 <span class="preprocessor">#include <boost/cstdint.hpp></span>
|
24
|
+
<a name="l00008"></a>00008
|
25
|
+
<a name="l00009"></a>00009 <span class="keyword">namespace </span>Gosu
|
26
|
+
<a name="l00010"></a>00010 {
|
27
|
+
<a name="l00014"></a><a class="code" href="namespaceGosu.html#a2fd8fe9574c0ad3fd52557cb160be49">00014</a> <span class="keyword">typedef</span> <span class="keywordtype">double</span> <a class="code" href="namespaceGosu.html#a2fd8fe9574c0ad3fd52557cb160be49" title="Represents the Z position of something drawn with Gosu&#39;s graphics system.">ZPos</a>;
|
28
|
+
<a name="l00015"></a>00015
|
29
|
+
<a name="l00018"></a><a class="code" href="namespaceGosu.html#769656b1f560bc3d1bbdb47f8ca4eda9">00018</a> <span class="keyword">enum</span> <a class="code" href="namespaceGosu.html#769656b1f560bc3d1bbdb47f8ca4eda9" title="Determines the way colors are combined when one is drawn onto another.">AlphaMode</a>
|
30
|
+
<a name="l00019"></a>00019 {
|
31
|
+
<a name="l00022"></a><a class="code" href="namespaceGosu.html#769656b1f560bc3d1bbdb47f8ca4eda9d1661cf5d3ba68fcbdca99f9dcc832e0">00022</a> <a class="code" href="namespaceGosu.html#769656b1f560bc3d1bbdb47f8ca4eda9d1661cf5d3ba68fcbdca99f9dcc832e0" title="The color&#39;s channels will be interpolated.">amDefault</a>,
|
32
|
+
<a name="l00026"></a><a class="code" href="namespaceGosu.html#769656b1f560bc3d1bbdb47f8ca4eda90032d35b3c2b35d16d3c59b6471c570b">00026</a> <a class="code" href="namespaceGosu.html#769656b1f560bc3d1bbdb47f8ca4eda90032d35b3c2b35d16d3c59b6471c570b" title="The colors&#39; channels will be added.">amAdditive</a>
|
33
|
+
<a name="l00027"></a>00027 };
|
34
|
+
<a name="l00028"></a>00028
|
35
|
+
<a name="l00029"></a>00029 <span class="keyword">enum</span> FontFlags
|
36
|
+
<a name="l00030"></a>00030 {
|
37
|
+
<a name="l00031"></a>00031 ffBold = 1,
|
38
|
+
<a name="l00032"></a>00032 ffItalic = 2,
|
39
|
+
<a name="l00033"></a>00033 ffUnderline = 4
|
40
|
+
<a name="l00034"></a>00034 };
|
41
|
+
<a name="l00035"></a>00035
|
42
|
+
<a name="l00036"></a>00036 <span class="keyword">enum</span> TextAlign
|
43
|
+
<a name="l00037"></a>00037 {
|
44
|
+
<a name="l00038"></a>00038 taLeft,
|
45
|
+
<a name="l00039"></a>00039 taRight,
|
46
|
+
<a name="l00040"></a>00040 taCenter,
|
47
|
+
<a name="l00041"></a>00041 taJustify
|
48
|
+
<a name="l00042"></a>00042 };
|
49
|
+
<a name="l00043"></a>00043 }
|
50
|
+
<a name="l00044"></a>00044
|
51
|
+
<a name="l00045"></a>00045 <span class="preprocessor">#endif</span>
|
52
|
+
</pre></div></div>
|
53
|
+
<hr size="1"><address style="text-align: right;"><small>Generated on Fri Sep 12 21:50:23 2008 for Gosu by
|
54
|
+
<a href="http://www.doxygen.org/index.html">
|
55
|
+
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.5 </small></address>
|
56
|
+
</body>
|
57
|
+
</html>
|
@@ -0,0 +1,56 @@
|
|
1
|
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
2
|
+
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
|
3
|
+
<title>Gosu: GraphicsBase.hpp File Reference</title>
|
4
|
+
<link href="doxygen.css" rel="stylesheet" type="text/css">
|
5
|
+
<link href="tabs.css" rel="stylesheet" type="text/css">
|
6
|
+
</head><body>
|
7
|
+
<!-- Generated by Doxygen 1.5.5 -->
|
8
|
+
<div class="navigation" id="top">
|
9
|
+
<div class="tabs">
|
10
|
+
<ul>
|
11
|
+
<li><a href="index.html"><span>Main Page</span></a></li>
|
12
|
+
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
|
13
|
+
<li><a href="annotated.html"><span>Classes</span></a></li>
|
14
|
+
<li class="current"><a href="files.html"><span>Files</span></a></li>
|
15
|
+
</ul>
|
16
|
+
</div>
|
17
|
+
</div>
|
18
|
+
<div class="contents">
|
19
|
+
<h1>GraphicsBase.hpp File Reference</h1>Contains general typedefs and enums related to graphics. <a href="#_details">More...</a>
|
20
|
+
<p>
|
21
|
+
|
22
|
+
<p>
|
23
|
+
<a href="GraphicsBase_8hpp-source.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0">
|
24
|
+
<tr><td></td></tr>
|
25
|
+
<tr><td colspan="2"><br><h2>Namespaces</h2></td></tr>
|
26
|
+
<tr><td class="memItemLeft" nowrap align="right" valign="top">namespace </td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceGosu.html">Gosu</a></td></tr>
|
27
|
+
|
28
|
+
<tr><td colspan="2"><br><h2>Typedefs</h2></td></tr>
|
29
|
+
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef double </td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceGosu.html#a2fd8fe9574c0ad3fd52557cb160be49">Gosu::ZPos</a></td></tr>
|
30
|
+
|
31
|
+
<tr><td colspan="2"><br><h2>Enumerations</h2></td></tr>
|
32
|
+
<tr><td class="memItemLeft" nowrap align="right" valign="top">enum </td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceGosu.html#769656b1f560bc3d1bbdb47f8ca4eda9">Gosu::AlphaMode</a> { <a class="el" href="namespaceGosu.html#769656b1f560bc3d1bbdb47f8ca4eda9d1661cf5d3ba68fcbdca99f9dcc832e0">Gosu::amDefault</a>,
|
33
|
+
<a class="el" href="namespaceGosu.html#769656b1f560bc3d1bbdb47f8ca4eda90032d35b3c2b35d16d3c59b6471c570b">Gosu::amAdditive</a>
|
34
|
+
}</td></tr>
|
35
|
+
|
36
|
+
<tr><td class="memItemLeft" nowrap align="right" valign="top">enum </td><td class="memItemRight" valign="bottom"><b>FontFlags</b> { <b>ffBold</b> = 1,
|
37
|
+
<b>ffItalic</b> = 2,
|
38
|
+
<b>ffUnderline</b> = 4
|
39
|
+
}</td></tr>
|
40
|
+
|
41
|
+
<tr><td class="memItemLeft" nowrap align="right" valign="top">enum </td><td class="memItemRight" valign="bottom"><b>TextAlign</b> { <b>taLeft</b>,
|
42
|
+
<b>taRight</b>,
|
43
|
+
<b>taCenter</b>,
|
44
|
+
<b>taJustify</b>
|
45
|
+
}</td></tr>
|
46
|
+
|
47
|
+
</table>
|
48
|
+
<hr><a name="_details"></a><h2>Detailed Description</h2>
|
49
|
+
Contains general typedefs and enums related to graphics.
|
50
|
+
<p>
|
51
|
+
</div>
|
52
|
+
<hr size="1"><address style="text-align: right;"><small>Generated on Fri Sep 12 21:50:23 2008 for Gosu by
|
53
|
+
<a href="http://www.doxygen.org/index.html">
|
54
|
+
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.5 </small></address>
|
55
|
+
</body>
|
56
|
+
</html>
|
@@ -0,0 +1,96 @@
|
|
1
|
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
2
|
+
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
|
3
|
+
<title>Gosu: Graphics.hpp Source File</title>
|
4
|
+
<link href="doxygen.css" rel="stylesheet" type="text/css">
|
5
|
+
<link href="tabs.css" rel="stylesheet" type="text/css">
|
6
|
+
</head><body>
|
7
|
+
<!-- Generated by Doxygen 1.5.5 -->
|
8
|
+
<div class="navigation" id="top">
|
9
|
+
<div class="tabs">
|
10
|
+
<ul>
|
11
|
+
<li><a href="index.html"><span>Main Page</span></a></li>
|
12
|
+
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
|
13
|
+
<li><a href="annotated.html"><span>Classes</span></a></li>
|
14
|
+
<li class="current"><a href="files.html"><span>Files</span></a></li>
|
15
|
+
</ul>
|
16
|
+
</div>
|
17
|
+
<h1>Graphics.hpp</h1><a href="Graphics_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001
|
18
|
+
<a name="l00002"></a>00002
|
19
|
+
<a name="l00003"></a>00003
|
20
|
+
<a name="l00004"></a>00004 <span class="preprocessor">#ifndef GOSU_GRAPHICS_HPP</span>
|
21
|
+
<a name="l00005"></a>00005 <span class="preprocessor"></span><span class="preprocessor">#define GOSU_GRAPHICS_HPP</span>
|
22
|
+
<a name="l00006"></a>00006 <span class="preprocessor"></span>
|
23
|
+
<a name="l00007"></a>00007 <span class="preprocessor">#include <<a class="code" href="Fwd_8hpp.html" title="Contains declarations of all of Gosu&#39;s available classes.">Gosu/Fwd.hpp</a>></span>
|
24
|
+
<a name="l00008"></a>00008 <span class="preprocessor">#include <<a class="code" href="Color_8hpp.html" title="Interface of the Color class.">Gosu/Color.hpp</a>></span>
|
25
|
+
<a name="l00009"></a>00009 <span class="preprocessor">#include <<a class="code" href="GraphicsBase_8hpp.html" title="Contains general typedefs and enums related to graphics.">Gosu/GraphicsBase.hpp</a>></span>
|
26
|
+
<a name="l00010"></a>00010 <span class="preprocessor">#include <boost/scoped_ptr.hpp></span>
|
27
|
+
<a name="l00011"></a>00011 <span class="preprocessor">#include <memory></span>
|
28
|
+
<a name="l00012"></a>00012
|
29
|
+
<a name="l00013"></a>00013 <span class="keyword">namespace </span>Gosu
|
30
|
+
<a name="l00014"></a>00014 {
|
31
|
+
<a name="l00016"></a><a class="code" href="namespaceGosu.html#3b7f4d1f697d86c584543e455faeef82">00016</a> <span class="keyword">enum</span> <a class="code" href="namespaceGosu.html#3b7f4d1f697d86c584543e455faeef82" title="Flags that affect the softness of a border.">BorderFlags</a>
|
32
|
+
<a name="l00017"></a>00017 {
|
33
|
+
<a name="l00018"></a>00018 bfSoft = 0,
|
34
|
+
<a name="l00019"></a>00019 bfHardLeft = 1,
|
35
|
+
<a name="l00020"></a>00020 bfHardTop = 2,
|
36
|
+
<a name="l00021"></a>00021 bfHardRight = 4,
|
37
|
+
<a name="l00022"></a>00022 bfHardBottom = 8,
|
38
|
+
<a name="l00023"></a>00023 bfHard = bfHardLeft | bfHardTop | bfHardRight | bfHardBottom
|
39
|
+
<a name="l00024"></a>00024 };
|
40
|
+
<a name="l00025"></a>00025
|
41
|
+
<a name="l00029"></a><a class="code" href="classGosu_1_1Graphics.html">00029</a> <span class="keyword">class </span><a class="code" href="classGosu_1_1Graphics.html" title="Serves as the target of all drawing and provides basic drawing functionality.">Graphics</a>
|
42
|
+
<a name="l00030"></a>00030 {
|
43
|
+
<a name="l00031"></a>00031 <span class="keyword">struct </span>Impl;
|
44
|
+
<a name="l00032"></a>00032 boost::scoped_ptr<Impl> pimpl;
|
45
|
+
<a name="l00033"></a>00033
|
46
|
+
<a name="l00034"></a>00034 <span class="keyword">public</span>:
|
47
|
+
<a name="l00035"></a>00035 <a class="code" href="classGosu_1_1Graphics.html" title="Serves as the target of all drawing and provides basic drawing functionality.">Graphics</a>(<span class="keywordtype">unsigned</span> physicalWidth, <span class="keywordtype">unsigned</span> physicalHeight, <span class="keywordtype">bool</span> fullscreen);
|
48
|
+
<a name="l00036"></a>00036 ~<a class="code" href="classGosu_1_1Graphics.html" title="Serves as the target of all drawing and provides basic drawing functionality.">Graphics</a>();
|
49
|
+
<a name="l00037"></a>00037
|
50
|
+
<a name="l00038"></a>00038 <span class="comment">// Undocumented until I have thought about this...</span>
|
51
|
+
<a name="l00039"></a>00039 <span class="keywordtype">double</span> factorX() <span class="keyword">const</span>;
|
52
|
+
<a name="l00040"></a>00040 <span class="keywordtype">double</span> factorY() <span class="keyword">const</span>;
|
53
|
+
<a name="l00041"></a>00041 <span class="keywordtype">void</span> setResolution(<span class="keywordtype">unsigned</span> virtualWidth, <span class="keywordtype">unsigned</span> virtualHeight);
|
54
|
+
<a name="l00042"></a>00042 <span class="comment">// End of Undocumented</span>
|
55
|
+
<a name="l00043"></a>00043
|
56
|
+
<a name="l00044"></a>00044 <span class="keywordtype">unsigned</span> width() <span class="keyword">const</span>;
|
57
|
+
<a name="l00045"></a>00045 <span class="keywordtype">unsigned</span> height() <span class="keyword">const</span>;
|
58
|
+
<a name="l00046"></a>00046 <span class="keywordtype">bool</span> fullscreen() <span class="keyword">const</span>;
|
59
|
+
<a name="l00047"></a>00047
|
60
|
+
<a name="l00050"></a>00050 <span class="keywordtype">bool</span> <a class="code" href="classGosu_1_1Graphics.html#5cf453663573a90f6709146cefe4b9cd" title="Prepares the graphics object for drawing.">begin</a>(<a class="code" href="classGosu_1_1Color.html" title="Represents an ARGB color value with 8 bits for each channel.">Color</a> clearWithColor = Colors::black);
|
61
|
+
<a name="l00052"></a>00052 <span class="keywordtype">void</span> <a class="code" href="classGosu_1_1Graphics.html#ddeab66c3a18c0a12df43067de841b71" title="Every call to begin must have a matching call to end.">end</a>();
|
62
|
+
<a name="l00055"></a>00055 <span class="keywordtype">void</span> <a class="code" href="classGosu_1_1Graphics.html#207f436a09bd02e11ddc474565912135" title="Finishes all pending Gosu drawing operations and executes the following OpenGL code...">beginGL</a>();
|
63
|
+
<a name="l00057"></a>00057 <span class="keywordtype">void</span> <a class="code" href="classGosu_1_1Graphics.html#3e37d9b17e55fa5f6d3ad6116759364f" title="Resets Gosu into its default rendering state.">endGL</a>();
|
64
|
+
<a name="l00058"></a>00058 <span class="comment">// Enables clipping to a specified rectangle.</span>
|
65
|
+
<a name="l00059"></a>00059 <span class="keywordtype">void</span> beginClipping(<span class="keywordtype">int</span> x, <span class="keywordtype">int</span> y, <span class="keywordtype">unsigned</span> width, <span class="keywordtype">unsigned</span> height);
|
66
|
+
<a name="l00060"></a>00060 <span class="comment">// Disables clipping.</span>
|
67
|
+
<a name="l00061"></a>00061 <span class="keywordtype">void</span> endClipping();
|
68
|
+
<a name="l00062"></a>00062
|
69
|
+
<a name="l00063"></a>00063 <span class="keywordtype">void</span> drawLine(<span class="keywordtype">double</span> x1, <span class="keywordtype">double</span> y1, <a class="code" href="classGosu_1_1Color.html" title="Represents an ARGB color value with 8 bits for each channel.">Color</a> c1,
|
70
|
+
<a name="l00064"></a>00064 <span class="keywordtype">double</span> x2, <span class="keywordtype">double</span> y2, <a class="code" href="classGosu_1_1Color.html" title="Represents an ARGB color value with 8 bits for each channel.">Color</a> c2,
|
71
|
+
<a name="l00065"></a>00065 <a class="code" href="namespaceGosu.html#a2fd8fe9574c0ad3fd52557cb160be49" title="Represents the Z position of something drawn with Gosu&#39;s graphics system.">ZPos</a> z, <a class="code" href="namespaceGosu.html#769656b1f560bc3d1bbdb47f8ca4eda9" title="Determines the way colors are combined when one is drawn onto another.">AlphaMode</a> mode = <a class="code" href="namespaceGosu.html#769656b1f560bc3d1bbdb47f8ca4eda9d1661cf5d3ba68fcbdca99f9dcc832e0" title="The color&#39;s channels will be interpolated.">amDefault</a>);
|
72
|
+
<a name="l00066"></a>00066
|
73
|
+
<a name="l00067"></a>00067 <span class="keywordtype">void</span> drawTriangle(<span class="keywordtype">double</span> x1, <span class="keywordtype">double</span> y1, <a class="code" href="classGosu_1_1Color.html" title="Represents an ARGB color value with 8 bits for each channel.">Color</a> c1,
|
74
|
+
<a name="l00068"></a>00068 <span class="keywordtype">double</span> x2, <span class="keywordtype">double</span> y2, <a class="code" href="classGosu_1_1Color.html" title="Represents an ARGB color value with 8 bits for each channel.">Color</a> c2,
|
75
|
+
<a name="l00069"></a>00069 <span class="keywordtype">double</span> x3, <span class="keywordtype">double</span> y3, <a class="code" href="classGosu_1_1Color.html" title="Represents an ARGB color value with 8 bits for each channel.">Color</a> c3,
|
76
|
+
<a name="l00070"></a>00070 <a class="code" href="namespaceGosu.html#a2fd8fe9574c0ad3fd52557cb160be49" title="Represents the Z position of something drawn with Gosu&#39;s graphics system.">ZPos</a> z, <a class="code" href="namespaceGosu.html#769656b1f560bc3d1bbdb47f8ca4eda9" title="Determines the way colors are combined when one is drawn onto another.">AlphaMode</a> mode = <a class="code" href="namespaceGosu.html#769656b1f560bc3d1bbdb47f8ca4eda9d1661cf5d3ba68fcbdca99f9dcc832e0" title="The color&#39;s channels will be interpolated.">amDefault</a>);
|
77
|
+
<a name="l00071"></a>00071
|
78
|
+
<a name="l00072"></a>00072 <span class="keywordtype">void</span> drawQuad(<span class="keywordtype">double</span> x1, <span class="keywordtype">double</span> y1, <a class="code" href="classGosu_1_1Color.html" title="Represents an ARGB color value with 8 bits for each channel.">Color</a> c1,
|
79
|
+
<a name="l00073"></a>00073 <span class="keywordtype">double</span> x2, <span class="keywordtype">double</span> y2, <a class="code" href="classGosu_1_1Color.html" title="Represents an ARGB color value with 8 bits for each channel.">Color</a> c2,
|
80
|
+
<a name="l00074"></a>00074 <span class="keywordtype">double</span> x3, <span class="keywordtype">double</span> y3, <a class="code" href="classGosu_1_1Color.html" title="Represents an ARGB color value with 8 bits for each channel.">Color</a> c3,
|
81
|
+
<a name="l00075"></a>00075 <span class="keywordtype">double</span> x4, <span class="keywordtype">double</span> y4, <a class="code" href="classGosu_1_1Color.html" title="Represents an ARGB color value with 8 bits for each channel.">Color</a> c4,
|
82
|
+
<a name="l00076"></a>00076 <a class="code" href="namespaceGosu.html#a2fd8fe9574c0ad3fd52557cb160be49" title="Represents the Z position of something drawn with Gosu&#39;s graphics system.">ZPos</a> z, <a class="code" href="namespaceGosu.html#769656b1f560bc3d1bbdb47f8ca4eda9" title="Determines the way colors are combined when one is drawn onto another.">AlphaMode</a> mode = <a class="code" href="namespaceGosu.html#769656b1f560bc3d1bbdb47f8ca4eda9d1661cf5d3ba68fcbdca99f9dcc832e0" title="The color&#39;s channels will be interpolated.">amDefault</a>);
|
83
|
+
<a name="l00077"></a>00077
|
84
|
+
<a name="l00080"></a>00080 std::auto_ptr<ImageData> <a class="code" href="classGosu_1_1Graphics.html#6b10629453eec979500179e4ceb11434" title="Turns a portion of a bitmap into something that can be drawn on this graphics object...">createImage</a>(<span class="keyword">const</span> <a class="code" href="classGosu_1_1Bitmap.html" title="Rectangular area of pixels, each represented by a Color value.">Bitmap</a>& src,
|
85
|
+
<a name="l00081"></a>00081 <span class="keywordtype">unsigned</span> srcX, <span class="keywordtype">unsigned</span> srcY, <span class="keywordtype">unsigned</span> srcWidth, <span class="keywordtype">unsigned</span> srcHeight,
|
86
|
+
<a name="l00082"></a>00082 <span class="keywordtype">unsigned</span> borderFlags);
|
87
|
+
<a name="l00083"></a>00083 };
|
88
|
+
<a name="l00084"></a>00084 }
|
89
|
+
<a name="l00085"></a>00085
|
90
|
+
<a name="l00086"></a>00086 <span class="preprocessor">#endif</span>
|
91
|
+
</pre></div></div>
|
92
|
+
<hr size="1"><address style="text-align: right;"><small>Generated on Fri Sep 12 21:50:23 2008 for Gosu by
|
93
|
+
<a href="http://www.doxygen.org/index.html">
|
94
|
+
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.5 </small></address>
|
95
|
+
</body>
|
96
|
+
</html>
|
@@ -0,0 +1,53 @@
|
|
1
|
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
2
|
+
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
|
3
|
+
<title>Gosu: Graphics.hpp File Reference</title>
|
4
|
+
<link href="doxygen.css" rel="stylesheet" type="text/css">
|
5
|
+
<link href="tabs.css" rel="stylesheet" type="text/css">
|
6
|
+
</head><body>
|
7
|
+
<!-- Generated by Doxygen 1.5.5 -->
|
8
|
+
<div class="navigation" id="top">
|
9
|
+
<div class="tabs">
|
10
|
+
<ul>
|
11
|
+
<li><a href="index.html"><span>Main Page</span></a></li>
|
12
|
+
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
|
13
|
+
<li><a href="annotated.html"><span>Classes</span></a></li>
|
14
|
+
<li class="current"><a href="files.html"><span>Files</span></a></li>
|
15
|
+
</ul>
|
16
|
+
</div>
|
17
|
+
</div>
|
18
|
+
<div class="contents">
|
19
|
+
<h1>Graphics.hpp File Reference</h1>Interface of the Graphics class. <a href="#_details">More...</a>
|
20
|
+
<p>
|
21
|
+
|
22
|
+
<p>
|
23
|
+
<a href="Graphics_8hpp-source.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0">
|
24
|
+
<tr><td></td></tr>
|
25
|
+
<tr><td colspan="2"><br><h2>Namespaces</h2></td></tr>
|
26
|
+
<tr><td class="memItemLeft" nowrap align="right" valign="top">namespace </td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceGosu.html">Gosu</a></td></tr>
|
27
|
+
|
28
|
+
<tr><td colspan="2"><br><h2>Classes</h2></td></tr>
|
29
|
+
<tr><td class="memItemLeft" nowrap align="right" valign="top">class </td><td class="memItemRight" valign="bottom"><a class="el" href="classGosu_1_1Graphics.html">Gosu::Graphics</a></td></tr>
|
30
|
+
|
31
|
+
<tr><td class="mdescLeft"> </td><td class="mdescRight">Serves as the target of all drawing and provides basic drawing functionality. <a href="classGosu_1_1Graphics.html#_details">More...</a><br></td></tr>
|
32
|
+
<tr><td colspan="2"><br><h2>Enumerations</h2></td></tr>
|
33
|
+
<tr><td class="memItemLeft" nowrap align="right" valign="top">enum </td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceGosu.html#3b7f4d1f697d86c584543e455faeef82">Gosu::BorderFlags</a> { <br>
|
34
|
+
<b>bfSoft</b> = 0,
|
35
|
+
<b>bfHardLeft</b> = 1,
|
36
|
+
<b>bfHardTop</b> = 2,
|
37
|
+
<b>bfHardRight</b> = 4,
|
38
|
+
<br>
|
39
|
+
<b>bfHardBottom</b> = 8,
|
40
|
+
<b>bfHard</b> = bfHardLeft | bfHardTop | bfHardRight | bfHardBottom
|
41
|
+
<br>
|
42
|
+
}</td></tr>
|
43
|
+
|
44
|
+
</table>
|
45
|
+
<hr><a name="_details"></a><h2>Detailed Description</h2>
|
46
|
+
Interface of the Graphics class.
|
47
|
+
<p>
|
48
|
+
</div>
|
49
|
+
<hr size="1"><address style="text-align: right;"><small>Generated on Fri Sep 12 21:50:23 2008 for Gosu by
|
50
|
+
<a href="http://www.doxygen.org/index.html">
|
51
|
+
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.5 </small></address>
|
52
|
+
</body>
|
53
|
+
</html>
|
@@ -0,0 +1,255 @@
|
|
1
|
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
2
|
+
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
|
3
|
+
<title>Gosu: IO.hpp Source File</title>
|
4
|
+
<link href="doxygen.css" rel="stylesheet" type="text/css">
|
5
|
+
<link href="tabs.css" rel="stylesheet" type="text/css">
|
6
|
+
</head><body>
|
7
|
+
<!-- Generated by Doxygen 1.5.5 -->
|
8
|
+
<div class="navigation" id="top">
|
9
|
+
<div class="tabs">
|
10
|
+
<ul>
|
11
|
+
<li><a href="index.html"><span>Main Page</span></a></li>
|
12
|
+
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
|
13
|
+
<li><a href="annotated.html"><span>Classes</span></a></li>
|
14
|
+
<li class="current"><a href="files.html"><span>Files</span></a></li>
|
15
|
+
</ul>
|
16
|
+
</div>
|
17
|
+
<h1>IO.hpp</h1><a href="IO_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001
|
18
|
+
<a name="l00002"></a>00002
|
19
|
+
<a name="l00003"></a>00003
|
20
|
+
<a name="l00004"></a>00004 <span class="preprocessor">#ifndef GOSU_IO_HPP</span>
|
21
|
+
<a name="l00005"></a>00005 <span class="preprocessor"></span><span class="preprocessor">#define GOSU_IO_HPP</span>
|
22
|
+
<a name="l00006"></a>00006 <span class="preprocessor"></span>
|
23
|
+
<a name="l00007"></a>00007 <span class="preprocessor">#include <boost/utility.hpp></span>
|
24
|
+
<a name="l00008"></a>00008 <span class="preprocessor">#include <boost/scoped_ptr.hpp></span>
|
25
|
+
<a name="l00009"></a>00009 <span class="preprocessor">#include <cstddef></span>
|
26
|
+
<a name="l00010"></a>00010 <span class="preprocessor">#include <algorithm></span>
|
27
|
+
<a name="l00011"></a>00011 <span class="preprocessor">#include <string></span>
|
28
|
+
<a name="l00012"></a>00012 <span class="preprocessor">#include <vector></span>
|
29
|
+
<a name="l00013"></a>00013
|
30
|
+
<a name="l00014"></a>00014 <span class="keyword">namespace </span>Gosu
|
31
|
+
<a name="l00015"></a>00015 {
|
32
|
+
<a name="l00016"></a>00016 <span class="keyword">class </span>Resource;
|
33
|
+
<a name="l00017"></a>00017
|
34
|
+
<a name="l00018"></a>00018 <span class="keyword">enum</span> ByteOrder { boLittle, boBig, boDontCare };
|
35
|
+
<a name="l00019"></a>00019 <span class="preprocessor">#ifdef __BIG_ENDIAN__</span>
|
36
|
+
<a name="l00020"></a>00020 <span class="preprocessor"></span> <span class="keyword">const</span> ByteOrder nativeByteOrder = boBig, otherByteOrder = boLittle;
|
37
|
+
<a name="l00021"></a>00021 <span class="preprocessor">#else</span>
|
38
|
+
<a name="l00022"></a>00022 <span class="preprocessor"></span> <span class="keyword">const</span> ByteOrder nativeByteOrder = boLittle, otherByteOrder = boBig;
|
39
|
+
<a name="l00023"></a>00023 <span class="preprocessor">#endif</span>
|
40
|
+
<a name="l00024"></a>00024 <span class="preprocessor"></span>
|
41
|
+
<a name="l00025"></a>00025 <span class="keyword">class </span>Reader
|
42
|
+
<a name="l00026"></a>00026 {
|
43
|
+
<a name="l00027"></a>00027 <span class="keyword">const</span> Resource* res;
|
44
|
+
<a name="l00028"></a>00028 std::size_t pos;
|
45
|
+
<a name="l00029"></a>00029
|
46
|
+
<a name="l00030"></a>00030 <span class="keyword">public</span>:
|
47
|
+
<a name="l00031"></a>00031 Reader(<span class="keyword">const</span> Resource& resource, std::size_t position)
|
48
|
+
<a name="l00032"></a>00032 : res(&resource), pos(position)
|
49
|
+
<a name="l00033"></a>00033 {
|
50
|
+
<a name="l00034"></a>00034 }
|
51
|
+
<a name="l00035"></a>00035
|
52
|
+
<a name="l00036"></a>00036 <span class="keyword">const</span> Resource& resource()<span class="keyword"> const</span>
|
53
|
+
<a name="l00037"></a>00037 <span class="keyword"> </span>{
|
54
|
+
<a name="l00038"></a>00038 <span class="keywordflow">return</span> *res;
|
55
|
+
<a name="l00039"></a>00039 }
|
56
|
+
<a name="l00040"></a>00040
|
57
|
+
<a name="l00041"></a>00041 std::size_t position()<span class="keyword"> const</span>
|
58
|
+
<a name="l00042"></a>00042 <span class="keyword"> </span>{
|
59
|
+
<a name="l00043"></a>00043 <span class="keywordflow">return</span> pos;
|
60
|
+
<a name="l00044"></a>00044 }
|
61
|
+
<a name="l00045"></a>00045
|
62
|
+
<a name="l00046"></a>00046 <span class="keywordtype">void</span> setPosition(std::size_t value)
|
63
|
+
<a name="l00047"></a>00047 {
|
64
|
+
<a name="l00048"></a>00048 <span class="comment">// TODO: Check?</span>
|
65
|
+
<a name="l00049"></a>00049 pos = value;
|
66
|
+
<a name="l00050"></a>00050 }
|
67
|
+
<a name="l00051"></a>00051
|
68
|
+
<a name="l00052"></a>00052 <span class="keywordtype">void</span> seek(std::ptrdiff_t offset)
|
69
|
+
<a name="l00053"></a>00053 {
|
70
|
+
<a name="l00054"></a>00054 <span class="comment">// TODO: Check?</span>
|
71
|
+
<a name="l00055"></a>00055 pos += offset;
|
72
|
+
<a name="l00056"></a>00056 }
|
73
|
+
<a name="l00057"></a>00057
|
74
|
+
<a name="l00058"></a>00058 <span class="keywordtype">void</span> read(<span class="keywordtype">void</span>* destBuffer, std::size_t length);
|
75
|
+
<a name="l00059"></a>00059
|
76
|
+
<a name="l00061"></a>00061 <span class="keyword">template</span><<span class="keyword">typename</span> T>
|
77
|
+
<a name="l00062"></a>00062 <span class="keywordtype">void</span> readPod(T& t, ByteOrder bo = boDontCare)
|
78
|
+
<a name="l00063"></a>00063 {
|
79
|
+
<a name="l00064"></a>00064 read(&t, <span class="keyword">sizeof</span> t);
|
80
|
+
<a name="l00065"></a>00065 <span class="keywordflow">if</span> (bo == otherByteOrder)
|
81
|
+
<a name="l00066"></a>00066 {
|
82
|
+
<a name="l00067"></a>00067 <span class="keywordtype">char</span>* begin = <span class="keyword">reinterpret_cast<</span><span class="keywordtype">char</span>*<span class="keyword">></span>(&t);
|
83
|
+
<a name="l00068"></a>00068 std::reverse(begin, begin + <span class="keyword">sizeof</span> t);
|
84
|
+
<a name="l00069"></a>00069 }
|
85
|
+
<a name="l00070"></a>00070 }
|
86
|
+
<a name="l00071"></a>00071
|
87
|
+
<a name="l00073"></a>00073 <span class="keyword">template</span><<span class="keyword">typename</span> T>
|
88
|
+
<a name="l00074"></a>00074 T getPod(ByteOrder bo = boDontCare)
|
89
|
+
<a name="l00075"></a>00075 {
|
90
|
+
<a name="l00076"></a>00076 T t;
|
91
|
+
<a name="l00077"></a>00077 readPod<T>(t, bo);
|
92
|
+
<a name="l00078"></a>00078 <span class="keywordflow">return</span> t;
|
93
|
+
<a name="l00079"></a>00079 }
|
94
|
+
<a name="l00080"></a>00080 };
|
95
|
+
<a name="l00081"></a>00081
|
96
|
+
<a name="l00082"></a>00082 <span class="keyword">class </span>Writer
|
97
|
+
<a name="l00083"></a>00083 {
|
98
|
+
<a name="l00084"></a>00084 Resource* res;
|
99
|
+
<a name="l00085"></a>00085 std::size_t pos;
|
100
|
+
<a name="l00086"></a>00086
|
101
|
+
<a name="l00087"></a>00087 <span class="keyword">public</span>:
|
102
|
+
<a name="l00088"></a>00088 Writer(Resource& resource, std::size_t position)
|
103
|
+
<a name="l00089"></a>00089 : res(&resource), pos(position)
|
104
|
+
<a name="l00090"></a>00090 {
|
105
|
+
<a name="l00091"></a>00091 }
|
106
|
+
<a name="l00092"></a>00092
|
107
|
+
<a name="l00093"></a>00093 Resource& resource()<span class="keyword"> const</span>
|
108
|
+
<a name="l00094"></a>00094 <span class="keyword"> </span>{
|
109
|
+
<a name="l00095"></a>00095 <span class="keywordflow">return</span> *res;
|
110
|
+
<a name="l00096"></a>00096 }
|
111
|
+
<a name="l00097"></a>00097
|
112
|
+
<a name="l00098"></a>00098 std::size_t position()<span class="keyword"> const</span>
|
113
|
+
<a name="l00099"></a>00099 <span class="keyword"> </span>{
|
114
|
+
<a name="l00100"></a>00100 <span class="keywordflow">return</span> pos;
|
115
|
+
<a name="l00101"></a>00101 }
|
116
|
+
<a name="l00102"></a>00102
|
117
|
+
<a name="l00103"></a>00103 <span class="keywordtype">void</span> setPosition(std::size_t value)
|
118
|
+
<a name="l00104"></a>00104 {
|
119
|
+
<a name="l00105"></a>00105 <span class="comment">// TODO: Check?</span>
|
120
|
+
<a name="l00106"></a>00106 pos = value;
|
121
|
+
<a name="l00107"></a>00107 }
|
122
|
+
<a name="l00108"></a>00108
|
123
|
+
<a name="l00109"></a>00109 <span class="keywordtype">void</span> seek(std::ptrdiff_t offset)
|
124
|
+
<a name="l00110"></a>00110 {
|
125
|
+
<a name="l00111"></a>00111 <span class="comment">// TODO: Check?</span>
|
126
|
+
<a name="l00112"></a>00112 pos += offset;
|
127
|
+
<a name="l00113"></a>00113 }
|
128
|
+
<a name="l00114"></a>00114
|
129
|
+
<a name="l00115"></a>00115 <span class="keywordtype">void</span> write(<span class="keyword">const</span> <span class="keywordtype">void</span>* sourceBuffer, std::size_t length);
|
130
|
+
<a name="l00116"></a>00116
|
131
|
+
<a name="l00118"></a>00118 <span class="keyword">template</span><<span class="keyword">typename</span> T>
|
132
|
+
<a name="l00119"></a>00119 <span class="keywordtype">void</span> writePod(<span class="keyword">const</span> T& t, ByteOrder bo = boDontCare)
|
133
|
+
<a name="l00120"></a>00120 {
|
134
|
+
<a name="l00121"></a>00121 <span class="keywordflow">if</span> (bo == otherByteOrder)
|
135
|
+
<a name="l00122"></a>00122 {
|
136
|
+
<a name="l00123"></a>00123 <span class="keywordtype">char</span> buf[<span class="keyword">sizeof</span> t];
|
137
|
+
<a name="l00124"></a>00124 <span class="keyword">const</span> <span class="keywordtype">char</span>* begin = <span class="keyword">reinterpret_cast<</span><span class="keyword">const </span><span class="keywordtype">char</span>*<span class="keyword">></span>(&t);
|
138
|
+
<a name="l00125"></a>00125 std::reverse_copy(begin, begin + <span class="keyword">sizeof</span> t, buf);
|
139
|
+
<a name="l00126"></a>00126 write(buf, <span class="keyword">sizeof</span> buf);
|
140
|
+
<a name="l00127"></a>00127 }
|
141
|
+
<a name="l00128"></a>00128 <span class="keywordflow">else</span>
|
142
|
+
<a name="l00129"></a>00129 write(&t, <span class="keyword">sizeof</span> t);
|
143
|
+
<a name="l00130"></a>00130 }
|
144
|
+
<a name="l00131"></a>00131 };
|
145
|
+
<a name="l00132"></a>00132
|
146
|
+
<a name="l00138"></a><a class="code" href="classGosu_1_1Resource.html">00138</a> <span class="keyword">class </span><a class="code" href="classGosu_1_1Resource.html" title="Base class for resources.">Resource</a> : boost::noncopyable
|
147
|
+
<a name="l00139"></a>00139 {
|
148
|
+
<a name="l00140"></a>00140 <span class="keyword">public</span>:
|
149
|
+
<a name="l00141"></a>00141 <span class="keyword">virtual</span> ~<a class="code" href="classGosu_1_1Resource.html" title="Base class for resources.">Resource</a>()
|
150
|
+
<a name="l00142"></a>00142 {
|
151
|
+
<a name="l00143"></a>00143 }
|
152
|
+
<a name="l00144"></a>00144
|
153
|
+
<a name="l00147"></a><a class="code" href="classGosu_1_1Resource.html#1487016df4be48aa67e4596d5436dab6">00147</a> Reader <a class="code" href="classGosu_1_1Resource.html#1487016df4be48aa67e4596d5436dab6" title="Convenience: Creates a new Reader that reads from the start of the resource.">frontReader</a>()<span class="keyword"> const</span>
|
154
|
+
<a name="l00148"></a>00148 <span class="keyword"> </span>{
|
155
|
+
<a name="l00149"></a>00149 <span class="keywordflow">return</span> Reader(*<span class="keyword">this</span>, 0);
|
156
|
+
<a name="l00150"></a>00150 }
|
157
|
+
<a name="l00151"></a>00151
|
158
|
+
<a name="l00154"></a><a class="code" href="classGosu_1_1Resource.html#8383c59af78d8b90b4f28cd10c6a368f">00154</a> Writer <a class="code" href="classGosu_1_1Resource.html#8383c59af78d8b90b4f28cd10c6a368f" title="Convenience: Creates a new Writer that appends data at the end of the resource.">backWriter</a>()
|
159
|
+
<a name="l00155"></a>00155 {
|
160
|
+
<a name="l00156"></a>00156 <span class="keywordflow">return</span> Writer(*<span class="keyword">this</span>, size());
|
161
|
+
<a name="l00157"></a>00157 }
|
162
|
+
<a name="l00158"></a>00158
|
163
|
+
<a name="l00159"></a>00159 <span class="keyword">virtual</span> std::size_t size() <span class="keyword">const</span> = 0;
|
164
|
+
<a name="l00160"></a>00160
|
165
|
+
<a name="l00161"></a>00161 <span class="keyword">virtual</span> <span class="keywordtype">void</span> resize(std::size_t newSize) = 0;
|
166
|
+
<a name="l00162"></a>00162
|
167
|
+
<a name="l00163"></a>00163 <span class="keyword">virtual</span> <span class="keywordtype">void</span> read(std::size_t offset, std::size_t length,
|
168
|
+
<a name="l00164"></a>00164 <span class="keywordtype">void</span>* destBuffer) <span class="keyword">const</span> = 0;
|
169
|
+
<a name="l00165"></a>00165
|
170
|
+
<a name="l00166"></a>00166 <span class="keyword">virtual</span> <span class="keywordtype">void</span> write(std::size_t offset, std::size_t length,
|
171
|
+
<a name="l00167"></a>00167 <span class="keyword">const</span> <span class="keywordtype">void</span>* sourceBuffer) = 0;
|
172
|
+
<a name="l00168"></a>00168 };
|
173
|
+
<a name="l00169"></a>00169
|
174
|
+
<a name="l00171"></a><a class="code" href="classGosu_1_1Buffer.html">00171</a> <span class="keyword">class </span><a class="code" href="classGosu_1_1Buffer.html" title="Piece of memory with the Resource interface.">Buffer</a> : <span class="keyword">public</span> <a class="code" href="classGosu_1_1Resource.html" title="Base class for resources.">Resource</a>
|
175
|
+
<a name="l00172"></a>00172 {
|
176
|
+
<a name="l00173"></a>00173 std::vector<char> buf;
|
177
|
+
<a name="l00174"></a>00174
|
178
|
+
<a name="l00175"></a>00175 <span class="keyword">public</span>:
|
179
|
+
<a name="l00176"></a>00176 <a class="code" href="classGosu_1_1Buffer.html" title="Piece of memory with the Resource interface.">Buffer</a>()
|
180
|
+
<a name="l00177"></a>00177 {
|
181
|
+
<a name="l00178"></a>00178 }
|
182
|
+
<a name="l00179"></a>00179
|
183
|
+
<a name="l00180"></a>00180 <a class="code" href="classGosu_1_1Buffer.html" title="Piece of memory with the Resource interface.">Buffer</a>(<span class="keyword">const</span> <a class="code" href="classGosu_1_1Buffer.html" title="Piece of memory with the Resource interface.">Buffer</a>& other)
|
184
|
+
<a name="l00181"></a>00181 : buf(other.<a class="code" href="classGosu_1_1Buffer.html#9e619f1956741a660e8c13b1146e738e">buf</a>)
|
185
|
+
<a name="l00182"></a>00182 {
|
186
|
+
<a name="l00183"></a>00183 }
|
187
|
+
<a name="l00184"></a>00184
|
188
|
+
<a name="l00185"></a>00185 <a class="code" href="classGosu_1_1Buffer.html" title="Piece of memory with the Resource interface.">Buffer</a>& operator=(<span class="keyword">const</span> <a class="code" href="classGosu_1_1Buffer.html" title="Piece of memory with the Resource interface.">Buffer</a>& other)
|
189
|
+
<a name="l00186"></a>00186 {
|
190
|
+
<a name="l00187"></a>00187 buf = other.<a class="code" href="classGosu_1_1Buffer.html#9e619f1956741a660e8c13b1146e738e">buf</a>;
|
191
|
+
<a name="l00188"></a>00188 <span class="keywordflow">return</span> *<span class="keyword">this</span>;
|
192
|
+
<a name="l00189"></a>00189 }
|
193
|
+
<a name="l00190"></a>00190
|
194
|
+
<a name="l00191"></a>00191 std::size_t size()<span class="keyword"> const</span>
|
195
|
+
<a name="l00192"></a>00192 <span class="keyword"> </span>{
|
196
|
+
<a name="l00193"></a>00193 <span class="keywordflow">return</span> buf.size();
|
197
|
+
<a name="l00194"></a>00194 }
|
198
|
+
<a name="l00195"></a>00195
|
199
|
+
<a name="l00196"></a>00196 <span class="keywordtype">void</span> resize(std::size_t newSize)
|
200
|
+
<a name="l00197"></a>00197 {
|
201
|
+
<a name="l00198"></a>00198 buf.resize(newSize);
|
202
|
+
<a name="l00199"></a>00199 }
|
203
|
+
<a name="l00200"></a>00200
|
204
|
+
<a name="l00201"></a>00201 <span class="keywordtype">void</span> read(std::size_t offset, std::size_t length,
|
205
|
+
<a name="l00202"></a>00202 <span class="keywordtype">void</span>* destBuffer) <span class="keyword">const</span>;
|
206
|
+
<a name="l00203"></a>00203
|
207
|
+
<a name="l00204"></a>00204 <span class="keywordtype">void</span> write(std::size_t offset, std::size_t length,
|
208
|
+
<a name="l00205"></a>00205 <span class="keyword">const</span> <span class="keywordtype">void</span>* sourceBuffer);
|
209
|
+
<a name="l00206"></a>00206
|
210
|
+
<a name="l00207"></a>00207 <span class="keyword">const</span> <span class="keywordtype">void</span>* data()<span class="keyword"> const</span>
|
211
|
+
<a name="l00208"></a>00208 <span class="keyword"> </span>{
|
212
|
+
<a name="l00209"></a>00209 <span class="keywordflow">return</span> &buf[0];
|
213
|
+
<a name="l00210"></a>00210 }
|
214
|
+
<a name="l00211"></a>00211
|
215
|
+
<a name="l00212"></a>00212 <span class="keywordtype">void</span>* data()
|
216
|
+
<a name="l00213"></a>00213 {
|
217
|
+
<a name="l00214"></a>00214 <span class="keywordflow">return</span> &buf[0];
|
218
|
+
<a name="l00215"></a>00215 }
|
219
|
+
<a name="l00216"></a>00216 };
|
220
|
+
<a name="l00217"></a>00217
|
221
|
+
<a name="l00218"></a><a class="code" href="namespaceGosu.html#f3bd16cebaf102e43f576d0a0ca1fcc3">00218</a> <span class="keyword">enum</span> <a class="code" href="namespaceGosu.html#f3bd16cebaf102e43f576d0a0ca1fcc3">FileMode</a>
|
222
|
+
<a name="l00219"></a>00219 {
|
223
|
+
<a name="l00222"></a><a class="code" href="namespaceGosu.html#f3bd16cebaf102e43f576d0a0ca1fcc3fc1f3aa93dd976dd43582892a36629d8">00222</a> <a class="code" href="namespaceGosu.html#f3bd16cebaf102e43f576d0a0ca1fcc3fc1f3aa93dd976dd43582892a36629d8" title="Opens an existing file for reading; throws an exception if the file cannot be found...">fmRead</a>,
|
224
|
+
<a name="l00225"></a><a class="code" href="namespaceGosu.html#f3bd16cebaf102e43f576d0a0ca1fcc337d6ddaeba2138192b0ae84e0882a246">00225</a> <a class="code" href="namespaceGosu.html#f3bd16cebaf102e43f576d0a0ca1fcc337d6ddaeba2138192b0ae84e0882a246" title="Writes data to a file.">fmReplace</a>,
|
225
|
+
<a name="l00228"></a><a class="code" href="namespaceGosu.html#f3bd16cebaf102e43f576d0a0ca1fcc3d09b16bbdaf86e8a38a7299abad2706d">00228</a> <a class="code" href="namespaceGosu.html#f3bd16cebaf102e43f576d0a0ca1fcc3d09b16bbdaf86e8a38a7299abad2706d" title="Opens or creates a file with writing access, but does not clear existing contents...">fmAlter</a>
|
226
|
+
<a name="l00229"></a>00229 };
|
227
|
+
<a name="l00230"></a>00230
|
228
|
+
<a name="l00232"></a><a class="code" href="classGosu_1_1File.html">00232</a> <span class="keyword">class </span><a class="code" href="classGosu_1_1File.html" title="File with the Resource interface.">File</a> : <span class="keyword">public</span> <a class="code" href="classGosu_1_1Resource.html" title="Base class for resources.">Resource</a>
|
229
|
+
<a name="l00233"></a>00233 {
|
230
|
+
<a name="l00234"></a>00234 <span class="keyword">struct </span>Impl;
|
231
|
+
<a name="l00235"></a>00235 boost::scoped_ptr<Impl> pimpl;
|
232
|
+
<a name="l00236"></a>00236
|
233
|
+
<a name="l00237"></a>00237 <span class="keyword">public</span>:
|
234
|
+
<a name="l00238"></a>00238 <span class="keyword">explicit</span> <a class="code" href="classGosu_1_1File.html" title="File with the Resource interface.">File</a>(<span class="keyword">const</span> std::wstring& filename, <a class="code" href="namespaceGosu.html#f3bd16cebaf102e43f576d0a0ca1fcc3">FileMode</a> mode = <a class="code" href="namespaceGosu.html#f3bd16cebaf102e43f576d0a0ca1fcc3fc1f3aa93dd976dd43582892a36629d8" title="Opens an existing file for reading; throws an exception if the file cannot be found...">fmRead</a>);
|
235
|
+
<a name="l00239"></a>00239 ~<a class="code" href="classGosu_1_1File.html" title="File with the Resource interface.">File</a>();
|
236
|
+
<a name="l00240"></a>00240
|
237
|
+
<a name="l00241"></a>00241 std::size_t size() <span class="keyword">const</span>;
|
238
|
+
<a name="l00242"></a>00242 <span class="keywordtype">void</span> resize(std::size_t newSize);
|
239
|
+
<a name="l00243"></a>00243 <span class="keywordtype">void</span> read(std::size_t offset, std::size_t length,
|
240
|
+
<a name="l00244"></a>00244 <span class="keywordtype">void</span>* destBuffer) <span class="keyword">const</span>;
|
241
|
+
<a name="l00245"></a>00245 <span class="keywordtype">void</span> write(std::size_t offset, std::size_t length,
|
242
|
+
<a name="l00246"></a>00246 <span class="keyword">const</span> <span class="keywordtype">void</span>* sourceBuffer);
|
243
|
+
<a name="l00247"></a>00247 };
|
244
|
+
<a name="l00248"></a>00248
|
245
|
+
<a name="l00250"></a>00250 <span class="keywordtype">void</span> <a class="code" href="namespaceGosu.html#29c60cb8e87a99f7ce924ae0530029a0" title="Loads a whole file into a buffer.">loadFile</a>(<a class="code" href="classGosu_1_1Buffer.html" title="Piece of memory with the Resource interface.">Buffer</a>& buffer, <span class="keyword">const</span> std::wstring& filename);
|
246
|
+
<a name="l00252"></a>00252 <span class="keywordtype">void</span> <a class="code" href="namespaceGosu.html#467aa346fa1a4cb39040bb427b42b7aa" title="Creates or overwrites a file with the contents of a buffer.">saveFile</a>(<span class="keyword">const</span> <a class="code" href="classGosu_1_1Buffer.html" title="Piece of memory with the Resource interface.">Buffer</a>& buffer, <span class="keyword">const</span> std::wstring& filename);
|
247
|
+
<a name="l00253"></a>00253 }
|
248
|
+
<a name="l00254"></a>00254
|
249
|
+
<a name="l00255"></a>00255 <span class="preprocessor">#endif</span>
|
250
|
+
</pre></div></div>
|
251
|
+
<hr size="1"><address style="text-align: right;"><small>Generated on Fri Sep 12 21:50:23 2008 for Gosu by
|
252
|
+
<a href="http://www.doxygen.org/index.html">
|
253
|
+
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.5 </small></address>
|
254
|
+
</body>
|
255
|
+
</html>
|