gosu 0.7.13 → 0.7.13.2
Sign up to get free protection for your applications and to get access to all the features.
- data/COPYING.txt +4 -2
- data/Gosu/Audio.hpp +8 -5
- data/Gosu/Font.hpp +5 -3
- data/Gosu/Gosu.hpp +6 -0
- data/Gosu/Graphics.hpp +6 -13
- data/Gosu/GraphicsBase.hpp +14 -3
- data/Gosu/IO.hpp +259 -255
- data/Gosu/Image.hpp +12 -12
- data/Gosu/ImageData.hpp +3 -0
- data/Gosu/Input.hpp +14 -2
- data/Gosu/Math.hpp +3 -2
- data/Gosu/RotFlip.hpp +125 -116
- data/Gosu/Sockets.hpp +139 -129
- data/Gosu/Text.hpp +4 -4
- data/Gosu/WinUtility.hpp +1 -1
- data/Gosu/Window.hpp +9 -5
- data/GosuImpl/Graphics/BitmapUtils.cpp +8 -8
- data/GosuImpl/Graphics/DrawOp.hpp +13 -14
- data/GosuImpl/Graphics/Graphics.cpp +3 -2
- data/GosuImpl/Graphics/Image.cpp +8 -8
- data/GosuImpl/Graphics/LargeImageData.cpp +8 -8
- data/GosuImpl/Graphics/Text.cpp +15 -3
- data/GosuImpl/{TextTTFWin.cpp → Graphics/TextTTFWin.cpp} +0 -0
- data/GosuImpl/Graphics/TextWin.cpp +36 -25
- data/GosuImpl/Graphics/Texture.cpp +2 -0
- data/GosuImpl/Iconv.hpp +1 -3
- data/GosuImpl/RubyGosu.swg +19 -10
- data/GosuImpl/RubyGosuStub.mm +40 -8
- data/GosuImpl/RubyGosu_SWIG_GC_PATCH.patch +126 -0
- data/GosuImpl/RubyGosu_wrap.cxx +1601 -247
- data/GosuImpl/RubyGosu_wrap.h +1 -1
- data/GosuImpl/WindowWin.cpp +18 -6
- data/README.txt +5 -5
- data/Rakefile +27 -7
- data/linux/Makefile.in +1 -1
- data/mac/Gosu.xcodeproj/jlnr.pbxuser +939 -350
- data/mac/Gosu.xcodeproj/jlnr.perspectivev3 +66 -61
- data/mac/Gosu.xcodeproj/project.pbxproj +474 -92
- data/mac/RubyGosu Template-Info.plist b/data/mac/RubyGosu → App-Info.plist +0 -0
- data/reference/cpp/_audio_8hpp-source.html +171 -0
- data/reference/cpp/_audio_8hpp.html +96 -0
- data/reference/cpp/_auto_link_8hpp-source.html +84 -0
- data/reference/cpp/_auto_link_8hpp.html +83 -0
- data/reference/cpp/_bitmap_8hpp-source.html +130 -0
- data/reference/cpp/_bitmap_8hpp.html +107 -0
- data/reference/{ButtonsMac_8hpp-source.html → cpp/_buttons_mac_8hpp-source.html} +60 -14
- data/reference/cpp/_buttons_mac_8hpp.html +233 -0
- data/reference/cpp/_color_8hpp-source.html +215 -0
- data/reference/cpp/_color_8hpp.html +119 -0
- data/reference/cpp/_directories_8hpp-source.html +88 -0
- data/reference/cpp/_directories_8hpp.html +96 -0
- data/reference/cpp/_font_8hpp-source.html +111 -0
- data/reference/cpp/_font_8hpp.html +87 -0
- data/reference/{Fwd_8hpp-source.html → cpp/_fwd_8hpp-source.html} +59 -13
- data/reference/cpp/_fwd_8hpp.html +83 -0
- data/reference/cpp/_gosu_8hpp-source.html +96 -0
- data/reference/cpp/_gosu_8hpp.html +83 -0
- data/reference/cpp/_graphics_8hpp-source.html +134 -0
- data/reference/cpp/_graphics_8hpp.html +94 -0
- data/reference/cpp/_graphics_base_8hpp-source.html +115 -0
- data/reference/cpp/_graphics_base_8hpp.html +120 -0
- data/reference/cpp/_i_o_8hpp-source.html +301 -0
- data/reference/cpp/_i_o_8hpp.html +122 -0
- data/reference/cpp/_image_8hpp-source.html +172 -0
- data/reference/cpp/_image_8hpp.html +96 -0
- data/reference/cpp/_image_data_8hpp-source.html +108 -0
- data/reference/cpp/_image_data_8hpp.html +90 -0
- data/reference/cpp/_input_8hpp-source.html +182 -0
- data/reference/cpp/_input_8hpp.html +102 -0
- data/reference/cpp/_math_8hpp-source.html +147 -0
- data/reference/cpp/_math_8hpp.html +139 -0
- data/reference/{Platform_8hpp-source.html → cpp/_platform_8hpp-source.html} +61 -15
- data/reference/cpp/_platform_8hpp.html +136 -0
- data/reference/cpp/_rot_flip_8hpp-source.html +184 -0
- data/reference/cpp/_rot_flip_8hpp.html +123 -0
- data/reference/cpp/_sockets_8hpp-source.html +174 -0
- data/reference/cpp/_sockets_8hpp.html +117 -0
- data/reference/cpp/_text_8hpp-source.html +102 -0
- data/reference/cpp/_text_8hpp.html +99 -0
- data/reference/cpp/_text_input_8hpp-source.html +110 -0
- data/reference/cpp/_text_input_8hpp.html +87 -0
- data/reference/cpp/_timing_8hpp-source.html +82 -0
- data/reference/cpp/_timing_8hpp.html +90 -0
- data/reference/cpp/_utility_8hpp-source.html +89 -0
- data/reference/cpp/_utility_8hpp.html +96 -0
- data/reference/cpp/_win_utility_8hpp-source.html +125 -0
- data/reference/cpp/_win_utility_8hpp.html +116 -0
- data/reference/cpp/_window_8hpp-source.html +157 -0
- data/reference/cpp/_window_8hpp.html +87 -0
- data/reference/cpp/annotated.html +98 -0
- data/reference/cpp/class_gosu_1_1_audio-members.html +74 -0
- data/reference/cpp/class_gosu_1_1_audio.html +132 -0
- data/reference/cpp/class_gosu_1_1_bitmap-members.html +85 -0
- data/reference/cpp/class_gosu_1_1_bitmap.html +501 -0
- data/reference/cpp/class_gosu_1_1_buffer-members.html +84 -0
- data/reference/cpp/class_gosu_1_1_buffer.html +346 -0
- data/reference/{classGosu_1_1Buffer.png → cpp/class_gosu_1_1_buffer.png} +0 -0
- data/reference/cpp/class_gosu_1_1_button-members.html +76 -0
- data/reference/cpp/class_gosu_1_1_button.html +195 -0
- data/reference/cpp/class_gosu_1_1_color-members.html +96 -0
- data/reference/cpp/class_gosu_1_1_color.html +758 -0
- data/reference/cpp/class_gosu_1_1_comm_socket-members.html +90 -0
- data/reference/cpp/class_gosu_1_1_comm_socket.html +505 -0
- data/reference/cpp/class_gosu_1_1_file-members.html +81 -0
- data/reference/cpp/class_gosu_1_1_file.html +275 -0
- data/reference/{classGosu_1_1File.png → cpp/class_gosu_1_1_file.png} +0 -0
- data/reference/cpp/class_gosu_1_1_font-members.html +79 -0
- data/reference/{classGosu_1_1Font.html → cpp/class_gosu_1_1_font.html} +207 -66
- data/reference/cpp/class_gosu_1_1_graphics-members.html +90 -0
- data/reference/cpp/class_gosu_1_1_graphics.html +768 -0
- data/reference/cpp/class_gosu_1_1_image-members.html +85 -0
- data/reference/cpp/class_gosu_1_1_image.html +771 -0
- data/reference/cpp/class_gosu_1_1_image_data-members.html +77 -0
- data/reference/cpp/class_gosu_1_1_image_data.html +281 -0
- data/reference/cpp/class_gosu_1_1_input-members.html +85 -0
- data/reference/cpp/class_gosu_1_1_input.html +417 -0
- data/reference/cpp/class_gosu_1_1_listener_socket-members.html +78 -0
- data/reference/cpp/class_gosu_1_1_listener_socket.html +221 -0
- data/reference/cpp/class_gosu_1_1_message_socket-members.html +80 -0
- data/reference/{classGosu_1_1MessageSocket.html → cpp/class_gosu_1_1_message_socket.html} +115 -43
- data/reference/cpp/class_gosu_1_1_reader-members.html +80 -0
- data/reference/cpp/class_gosu_1_1_reader.html +322 -0
- data/reference/cpp/class_gosu_1_1_resource-members.html +79 -0
- data/reference/cpp/class_gosu_1_1_resource.html +305 -0
- data/reference/{classGosu_1_1Resource.png → cpp/class_gosu_1_1_resource.png} +0 -0
- data/reference/cpp/class_gosu_1_1_rot_flip-members.html +83 -0
- data/reference/cpp/class_gosu_1_1_rot_flip.html +347 -0
- data/reference/cpp/class_gosu_1_1_sample-members.html +77 -0
- data/reference/{classGosu_1_1Sample.html → cpp/class_gosu_1_1_sample.html} +99 -32
- data/reference/cpp/class_gosu_1_1_sample_instance-members.html +81 -0
- data/reference/cpp/class_gosu_1_1_sample_instance.html +317 -0
- data/reference/cpp/class_gosu_1_1_song-members.html +86 -0
- data/reference/{classGosu_1_1Song.html → cpp/class_gosu_1_1_song.html} +152 -68
- data/reference/cpp/class_gosu_1_1_text_input-members.html +78 -0
- data/reference/cpp/class_gosu_1_1_text_input.html +227 -0
- data/reference/cpp/class_gosu_1_1_window-members.html +90 -0
- data/reference/cpp/class_gosu_1_1_window.html +533 -0
- data/reference/cpp/class_gosu_1_1_writer-members.html +79 -0
- data/reference/cpp/class_gosu_1_1_writer.html +292 -0
- data/reference/cpp/classes.html +86 -0
- data/reference/cpp/closed.gif +0 -0
- data/reference/cpp/cpp.css +155 -0
- data/reference/{doxygen.png → cpp/doxygen.png} +0 -0
- data/reference/cpp/files.html +97 -0
- data/reference/cpp/functions.html +127 -0
- data/reference/cpp/functions_0x62.html +137 -0
- data/reference/cpp/functions_0x63.html +140 -0
- data/reference/cpp/functions_0x64.html +142 -0
- data/reference/cpp/functions_0x65.html +119 -0
- data/reference/cpp/functions_0x66.html +137 -0
- data/reference/cpp/functions_0x67.html +131 -0
- data/reference/cpp/functions_0x68.html +121 -0
- data/reference/cpp/functions_0x69.html +123 -0
- data/reference/cpp/functions_0x6b.html +115 -0
- data/reference/cpp/functions_0x6c.html +117 -0
- data/reference/cpp/functions_0x6d.html +125 -0
- data/reference/cpp/functions_0x6e.html +117 -0
- data/reference/cpp/functions_0x6f.html +126 -0
- data/reference/cpp/functions_0x70.html +136 -0
- data/reference/cpp/functions_0x72.html +154 -0
- data/reference/cpp/functions_0x73.html +179 -0
- data/reference/cpp/functions_0x74.html +127 -0
- data/reference/cpp/functions_0x75.html +121 -0
- data/reference/cpp/functions_0x76.html +117 -0
- data/reference/cpp/functions_0x77.html +129 -0
- data/reference/cpp/functions_0x78.html +115 -0
- data/reference/cpp/functions_0x79.html +115 -0
- data/reference/cpp/functions_0x7e.html +143 -0
- data/reference/cpp/functions_enum.html +87 -0
- data/reference/cpp/functions_eval.html +89 -0
- data/reference/cpp/functions_func.html +125 -0
- data/reference/cpp/functions_func_0x62.html +133 -0
- data/reference/cpp/functions_func_0x63.html +136 -0
- data/reference/cpp/functions_func_0x64.html +140 -0
- data/reference/cpp/functions_func_0x65.html +117 -0
- data/reference/cpp/functions_func_0x66.html +135 -0
- data/reference/cpp/functions_func_0x67.html +129 -0
- data/reference/cpp/functions_func_0x68.html +119 -0
- data/reference/cpp/functions_func_0x69.html +119 -0
- data/reference/cpp/functions_func_0x6b.html +113 -0
- data/reference/cpp/functions_func_0x6c.html +113 -0
- data/reference/cpp/functions_func_0x6d.html +123 -0
- data/reference/cpp/functions_func_0x6e.html +115 -0
- data/reference/cpp/functions_func_0x6f.html +113 -0
- data/reference/cpp/functions_func_0x70.html +134 -0
- data/reference/cpp/functions_func_0x72.html +150 -0
- data/reference/cpp/functions_func_0x73.html +173 -0
- data/reference/cpp/functions_func_0x74.html +119 -0
- data/reference/cpp/functions_func_0x75.html +119 -0
- data/reference/cpp/functions_func_0x76.html +115 -0
- data/reference/cpp/functions_func_0x77.html +127 -0
- data/reference/cpp/functions_func_0x7e.html +141 -0
- data/reference/cpp/functions_type.html +87 -0
- data/reference/cpp/functions_vars.html +112 -0
- data/reference/cpp/globals.html +84 -0
- data/reference/cpp/globals_defs.html +84 -0
- data/reference/cpp/hierarchy.html +100 -0
- data/reference/cpp/index.html +66 -0
- data/reference/cpp/open.gif +0 -0
- data/reference/cpp/struct_gosu_1_1_g_l_tex_info-members.html +77 -0
- data/reference/cpp/struct_gosu_1_1_g_l_tex_info.html +185 -0
- data/reference/cpp/struct_gosu_1_1_touch-members.html +75 -0
- data/reference/cpp/struct_gosu_1_1_touch.html +153 -0
- data/reference/{tab_b.gif → cpp/tab_b.gif} +0 -0
- data/reference/{tab_l.gif → cpp/tab_l.gif} +0 -0
- data/reference/{tab_r.gif → cpp/tab_r.gif} +0 -0
- data/reference/{tabs.css → cpp/tabs.css} +5 -2
- data/windows/Gosu.sln +5 -0
- data/windows/Gosu.vcproj +3 -3
- data/windows/RubyGosu.vcproj +103 -1
- metadata +178 -176
- data/reference/Async_8hpp-source.html +0 -70
- data/reference/Audio_8hpp-source.html +0 -125
- data/reference/Audio_8hpp.html +0 -50
- data/reference/AutoLink_8hpp-source.html +0 -38
- data/reference/AutoLink_8hpp.html +0 -34
- data/reference/Bitmap_8hpp-source.html +0 -84
- data/reference/Bitmap_8hpp.html +0 -58
- data/reference/ButtonsWin_8hpp-source.html +0 -159
- data/reference/ButtonsX_8hpp-source.html +0 -160
- data/reference/Color_8hpp-source.html +0 -169
- data/reference/Color_8hpp.html +0 -85
- data/reference/Directories_8hpp-source.html +0 -42
- data/reference/Directories_8hpp.html +0 -46
- data/reference/Font_8hpp-source.html +0 -65
- data/reference/Font_8hpp.html +0 -41
- data/reference/Fwd_8hpp.html +0 -37
- data/reference/Gosu_8hpp-source.html +0 -49
- data/reference/Gosu_8hpp.html +0 -34
- data/reference/GraphicsBase_8hpp-source.html +0 -59
- data/reference/GraphicsBase_8hpp.html +0 -59
- data/reference/Graphics_8hpp-source.html +0 -99
- data/reference/Graphics_8hpp.html +0 -60
- data/reference/IO_8hpp-source.html +0 -255
- data/reference/IO_8hpp.html +0 -74
- data/reference/ImageData_8hpp-source.html +0 -62
- data/reference/ImageData_8hpp.html +0 -43
- data/reference/Image_8hpp-source.html +0 -126
- data/reference/Image_8hpp.html +0 -48
- data/reference/Input_8hpp-source.html +0 -131
- data/reference/Input_8hpp.html +0 -56
- data/reference/Math_8hpp-source.html +0 -101
- data/reference/Math_8hpp.html +0 -78
- data/reference/Platform_8hpp.html +0 -73
- data/reference/RotFlip_8hpp-source.html +0 -138
- data/reference/RotFlip_8hpp.html +0 -77
- data/reference/Sockets_8hpp-source.html +0 -130
- data/reference/Sockets_8hpp.html +0 -66
- data/reference/TextInput_8hpp-source.html +0 -64
- data/reference/TextInput_8hpp.html +0 -41
- data/reference/Text_8hpp-source.html +0 -56
- data/reference/Text_8hpp.html +0 -48
- data/reference/Timing_8hpp-source.html +0 -36
- data/reference/Timing_8hpp.html +0 -42
- data/reference/Utility_8hpp-source.html +0 -43
- data/reference/Utility_8hpp.html +0 -46
- data/reference/WinUtility_8hpp-source.html +0 -79
- data/reference/WinUtility_8hpp.html +0 -64
- data/reference/Window_8hpp-source.html +0 -110
- data/reference/Window_8hpp.html +0 -41
- data/reference/annotated.html +0 -51
- data/reference/classGosu_1_1Audio-members.html +0 -34
- data/reference/classGosu_1_1Audio.html +0 -46
- data/reference/classGosu_1_1Bitmap-members.html +0 -45
- data/reference/classGosu_1_1Bitmap.html +0 -266
- data/reference/classGosu_1_1Buffer-members.html +0 -44
- data/reference/classGosu_1_1Buffer.html +0 -78
- data/reference/classGosu_1_1Button-members.html +0 -36
- data/reference/classGosu_1_1Button.html +0 -143
- data/reference/classGosu_1_1Color-members.html +0 -56
- data/reference/classGosu_1_1Color.html +0 -387
- data/reference/classGosu_1_1File-members.html +0 -41
- data/reference/classGosu_1_1File.html +0 -69
- data/reference/classGosu_1_1Font-members.html +0 -39
- data/reference/classGosu_1_1Graphics-members.html +0 -50
- data/reference/classGosu_1_1Graphics.html +0 -234
- data/reference/classGosu_1_1Image-members.html +0 -45
- data/reference/classGosu_1_1Image.html +0 -518
- data/reference/classGosu_1_1ImageData-members.html +0 -37
- data/reference/classGosu_1_1ImageData.html +0 -60
- data/reference/classGosu_1_1Input-members.html +0 -45
- data/reference/classGosu_1_1Input.html +0 -256
- data/reference/classGosu_1_1MessageSocket-members.html +0 -40
- data/reference/classGosu_1_1Resource-members.html +0 -39
- data/reference/classGosu_1_1Resource.html +0 -116
- data/reference/classGosu_1_1Sample-members.html +0 -37
- data/reference/classGosu_1_1SampleInstance-members.html +0 -41
- data/reference/classGosu_1_1SampleInstance.html +0 -178
- data/reference/classGosu_1_1Song-members.html +0 -46
- data/reference/classGosu_1_1TextInput-members.html +0 -38
- data/reference/classGosu_1_1TextInput.html +0 -121
- data/reference/classGosu_1_1Window-members.html +0 -50
- data/reference/classGosu_1_1Window.html +0 -289
- data/reference/doxyfile +0 -233
- data/reference/doxygen.css +0 -433
- data/reference/files.html +0 -54
- data/reference/functions.html +0 -249
- data/reference/functions_enum.html +0 -45
- data/reference/functions_func.html +0 -240
- data/reference/functions_vars.html +0 -47
- data/reference/hierarchy.html +0 -53
- data/reference/index.html +0 -26
- data/reference/namespaceGosu.html +0 -3363
- data/reference/namespaceGosu_1_1Colors.html +0 -70
- data/reference/namespaceGosu_1_1Win.html +0 -275
- data/reference/namespacemembers.html +0 -229
- data/reference/namespacemembers_enum.html +0 -52
- data/reference/namespacemembers_eval.html +0 -54
- data/reference/namespacemembers_func.html +0 -196
- data/reference/namespacemembers_type.html +0 -46
- data/reference/namespacemembers_vars.html +0 -48
- data/reference/namespaces.html +0 -35
data/reference/Input_8hpp.html
DELETED
@@ -1,56 +0,0 @@
|
|
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: Input.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>Input.hpp File Reference</h1>Interface of the Input class. <a href="#_details">More...</a>
|
20
|
-
<p>
|
21
|
-
|
22
|
-
<p>
|
23
|
-
<a href="Input_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_1Button.html">Gosu::Button</a></td></tr>
|
30
|
-
|
31
|
-
<tr><td class="mdescLeft"> </td><td class="mdescRight">Very lightweight class that identifies a button (keyboard, mouse or other device). <a href="classGosu_1_1Button.html#_details">More...</a><br></td></tr>
|
32
|
-
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct </td><td class="memItemRight" valign="bottom"><b>Gosu::Touch</b></td></tr>
|
33
|
-
|
34
|
-
<tr><td class="memItemLeft" nowrap align="right" valign="top">class </td><td class="memItemRight" valign="bottom"><a class="el" href="classGosu_1_1Input.html">Gosu::Input</a></td></tr>
|
35
|
-
|
36
|
-
<tr><td class="mdescLeft"> </td><td class="mdescRight">Manages initialization and shutdown of the input system. <a href="classGosu_1_1Input.html#_details">More...</a><br></td></tr>
|
37
|
-
<tr><td colspan="2"><br><h2>Typedefs</h2></td></tr>
|
38
|
-
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="fb6633385bb7471380c0e621bfe605fb"></a><!-- doxytag: member="Input.hpp::Touches" ref="fb6633385bb7471380c0e621bfe605fb" args="" -->
|
39
|
-
typedef std::vector< Touch > </td><td class="memItemRight" valign="bottom"><b>Gosu::Touches</b></td></tr>
|
40
|
-
|
41
|
-
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
|
42
|
-
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceGosu.html#8abc916db977614382f04aef415c21c3">Gosu::operator==</a> (Button lhs, Button rhs)</td></tr>
|
43
|
-
|
44
|
-
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d6ebc33043d3f495cf4bfbea2184e6d6"></a><!-- doxytag: member="Input.hpp::operator!=" ref="d6ebc33043d3f495cf4bfbea2184e6d6" args="(Button lhs, Button rhs)" -->
|
45
|
-
bool </td><td class="memItemRight" valign="bottom"><b>Gosu::operator!=</b> (Button lhs, Button rhs)</td></tr>
|
46
|
-
|
47
|
-
</table>
|
48
|
-
<hr><a name="_details"></a><h2>Detailed Description</h2>
|
49
|
-
Interface of the Input class.
|
50
|
-
<p>
|
51
|
-
</div>
|
52
|
-
<hr size="1"><address style="text-align: right;"><small>Generated on Fri Apr 17 23:35:43 2009 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>
|
@@ -1,101 +0,0 @@
|
|
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: Math.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>Math.hpp</h1><a href="Math_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_MATH_HPP</span>
|
21
|
-
<a name="l00005"></a>00005 <span class="preprocessor"></span><span class="preprocessor">#define GOSU_MATH_HPP</span>
|
22
|
-
<a name="l00006"></a>00006 <span class="preprocessor"></span>
|
23
|
-
<a name="l00007"></a>00007 <span class="keyword">namespace </span>Gosu
|
24
|
-
<a name="l00008"></a>00008 {
|
25
|
-
<a name="l00010"></a><a class="code" href="namespaceGosu.html#cc7336a0eba36412dab0e991fb3faf01">00010</a> <span class="keyword">const</span> <span class="keywordtype">double</span> <a class="code" href="namespaceGosu.html#cc7336a0eba36412dab0e991fb3faf01" title="Pi.">pi</a> = 3.1415926536;
|
26
|
-
<a name="l00011"></a>00011
|
27
|
-
<a name="l00014"></a><a class="code" href="namespaceGosu.html#dc5f4941f3a17c6c5233d6c7a628cc68">00014</a> <span class="keyword">inline</span> <span class="keywordtype">long</span> <a class="code" href="namespaceGosu.html#dc5f4941f3a17c6c5233d6c7a628cc68" title="Truncates the fractional part of a real value.">trunc</a>(<span class="keywordtype">double</span> value)
|
28
|
-
<a name="l00015"></a>00015 {
|
29
|
-
<a name="l00016"></a>00016 <span class="keywordflow">return</span> <span class="keyword">static_cast<</span><span class="keywordtype">long</span><span class="keyword">></span>(value);
|
30
|
-
<a name="l00017"></a>00017 }
|
31
|
-
<a name="l00018"></a>00018
|
32
|
-
<a name="l00020"></a><a class="code" href="namespaceGosu.html#496868cf52cf159cf98a00888c4fbc1c">00020</a> <span class="keyword">inline</span> <span class="keywordtype">long</span> <a class="code" href="namespaceGosu.html#496868cf52cf159cf98a00888c4fbc1c" title="Rounds a real value towards the next integer.">round</a>(<span class="keywordtype">double</span> value)
|
33
|
-
<a name="l00021"></a>00021 {
|
34
|
-
<a name="l00022"></a>00022 <span class="keywordflow">if</span> (value >= 0)
|
35
|
-
<a name="l00023"></a>00023 <span class="keywordflow">return</span> <span class="keyword">static_cast<</span><span class="keywordtype">long</span><span class="keyword">></span>(value + 0.5);
|
36
|
-
<a name="l00024"></a>00024 <span class="keywordflow">else</span>
|
37
|
-
<a name="l00025"></a>00025 <span class="keywordflow">return</span> <span class="keyword">static_cast<</span><span class="keywordtype">long</span><span class="keyword">></span>(value - 0.5);
|
38
|
-
<a name="l00026"></a>00026 }
|
39
|
-
<a name="l00027"></a>00027
|
40
|
-
<a name="l00030"></a>00030 <span class="keywordtype">double</span> <a class="code" href="namespaceGosu.html#6c855080566f7f1b1967c90805249dda" title="Returns a real value between min and max.">random</a>(<span class="keywordtype">double</span> min, <span class="keywordtype">double</span> max);
|
41
|
-
<a name="l00031"></a>00031
|
42
|
-
<a name="l00033"></a><a class="code" href="namespaceGosu.html#2f8e80b399a0c5ba42667f22e7f2ba2f">00033</a> <span class="keyword">inline</span> <span class="keywordtype">double</span> <a class="code" href="namespaceGosu.html#2f8e80b399a0c5ba42667f22e7f2ba2f" title="Translates between Gosu&#39;s angle system and radians.">gosuToRadians</a>(<span class="keywordtype">double</span> <a class="code" href="namespaceGosu.html#f7740dec821977a37ff26a90c2e85ac7" title="Returns the angle between two points in degrees, where 0.0 means upwards.">angle</a>)
|
43
|
-
<a name="l00034"></a>00034 {
|
44
|
-
<a name="l00035"></a>00035 <span class="keywordflow">return</span> (angle - 90) * <a class="code" href="namespaceGosu.html#cc7336a0eba36412dab0e991fb3faf01" title="Pi.">pi</a> / 180;
|
45
|
-
<a name="l00036"></a>00036 }
|
46
|
-
<a name="l00038"></a><a class="code" href="namespaceGosu.html#a853d9351f1568d0a949b2b7717e1e6a">00038</a> <span class="keyword">inline</span> <span class="keywordtype">double</span> <a class="code" href="namespaceGosu.html#a853d9351f1568d0a949b2b7717e1e6a" title="Translates between Gosu&#39;s angle system and radians.">radiansToGosu</a>(<span class="keywordtype">double</span> <a class="code" href="namespaceGosu.html#f7740dec821977a37ff26a90c2e85ac7" title="Returns the angle between two points in degrees, where 0.0 means upwards.">angle</a>)
|
47
|
-
<a name="l00039"></a>00039 {
|
48
|
-
<a name="l00040"></a>00040 <span class="keywordflow">return</span> angle * 180 / <a class="code" href="namespaceGosu.html#cc7336a0eba36412dab0e991fb3faf01" title="Pi.">pi</a> + 90;
|
49
|
-
<a name="l00041"></a>00041 }
|
50
|
-
<a name="l00042"></a>00042
|
51
|
-
<a name="l00047"></a>00047 <span class="keywordtype">double</span> <a class="code" href="namespaceGosu.html#e61d02831aa7026e96f1e53a358609b2" title="Returns the horizontal distance between the origin and the point to which you would...">offsetX</a>(<span class="keywordtype">double</span> <a class="code" href="namespaceGosu.html#f7740dec821977a37ff26a90c2e85ac7" title="Returns the angle between two points in degrees, where 0.0 means upwards.">angle</a>, <span class="keywordtype">double</span> radius);
|
52
|
-
<a name="l00052"></a>00052 <span class="keywordtype">double</span> <a class="code" href="namespaceGosu.html#9e0845d8b2ed385cb4e8593e7a308a08" title="Returns the vertical distance between the origin and the point to which you would...">offsetY</a>(<span class="keywordtype">double</span> <a class="code" href="namespaceGosu.html#f7740dec821977a37ff26a90c2e85ac7" title="Returns the angle between two points in degrees, where 0.0 means upwards.">angle</a>, <span class="keywordtype">double</span> radius);
|
53
|
-
<a name="l00055"></a>00055 <span class="keywordtype">double</span> <a class="code" href="namespaceGosu.html#f7740dec821977a37ff26a90c2e85ac7" title="Returns the angle between two points in degrees, where 0.0 means upwards.">angle</a>(<span class="keywordtype">double</span> fromX, <span class="keywordtype">double</span> fromY, <span class="keywordtype">double</span> toX, <span class="keywordtype">double</span> toY,
|
54
|
-
<a name="l00056"></a>00056 <span class="keywordtype">double</span> def = 0);
|
55
|
-
<a name="l00058"></a>00058 <span class="keywordtype">double</span> <a class="code" href="namespaceGosu.html#36cfaba7c2038bfeabdd1672882704f4" title="Returns the smallest positive angle between two angles.">angleDiff</a>(<span class="keywordtype">double</span> angle1, <span class="keywordtype">double</span> angle2);
|
56
|
-
<a name="l00060"></a>00060 <span class="keywordtype">double</span> <a class="code" href="namespaceGosu.html#c6f147ab90f7e343dd9d70cc8bf3a91b" title="Normalizes an angle to fit into the range [0; 360[.">normalizeAngle</a>(<span class="keywordtype">double</span> <a class="code" href="namespaceGosu.html#f7740dec821977a37ff26a90c2e85ac7" title="Returns the angle between two points in degrees, where 0.0 means upwards.">angle</a>);
|
57
|
-
<a name="l00061"></a>00061
|
58
|
-
<a name="l00063"></a>00063 <span class="keyword">template</span><<span class="keyword">typename</span> T>
|
59
|
-
<a name="l00064"></a><a class="code" href="namespaceGosu.html#cac78b0775d1b551f4adf9ae76efb4cc">00064</a> T <a class="code" href="namespaceGosu.html#cac78b0775d1b551f4adf9ae76efb4cc" title="Returns value * value.">square</a>(T value)
|
60
|
-
<a name="l00065"></a>00065 {
|
61
|
-
<a name="l00066"></a>00066 <span class="keywordflow">return</span> value * value;
|
62
|
-
<a name="l00067"></a>00067 }
|
63
|
-
<a name="l00068"></a>00068
|
64
|
-
<a name="l00071"></a>00071 <span class="keyword">template</span><<span class="keyword">typename</span> T>
|
65
|
-
<a name="l00072"></a><a class="code" href="namespaceGosu.html#3359d78e0ca7fa5d163dce7b99f72e9f">00072</a> T <a class="code" href="namespaceGosu.html#3359d78e0ca7fa5d163dce7b99f72e9f" title="Returns min if value is smaller than min, max if value is larger than max and value...">clamp</a>(T value, T min, T max)
|
66
|
-
<a name="l00073"></a>00073 {
|
67
|
-
<a name="l00074"></a>00074 <span class="keywordflow">if</span> (value < min)
|
68
|
-
<a name="l00075"></a>00075 <span class="keywordflow">return</span> min;
|
69
|
-
<a name="l00076"></a>00076 <span class="keywordflow">if</span> (value > max)
|
70
|
-
<a name="l00077"></a>00077 <span class="keywordflow">return</span> max;
|
71
|
-
<a name="l00078"></a>00078 <span class="keywordflow">return</span> value;
|
72
|
-
<a name="l00079"></a>00079 }
|
73
|
-
<a name="l00080"></a>00080
|
74
|
-
<a name="l00081"></a>00081 <span class="comment">// Backward compatibility with 0.7.x</span>
|
75
|
-
<a name="l00082"></a>00082 <span class="keyword">template</span><<span class="keyword">typename</span> T>
|
76
|
-
<a name="l00083"></a>00083 T boundBy(T value, T min, T max)
|
77
|
-
<a name="l00084"></a>00084 {
|
78
|
-
<a name="l00085"></a>00085 <span class="keywordflow">return</span> <a class="code" href="namespaceGosu.html#3359d78e0ca7fa5d163dce7b99f72e9f" title="Returns min if value is smaller than min, max if value is larger than max and value...">clamp</a>(value, min, max);
|
79
|
-
<a name="l00086"></a>00086 }
|
80
|
-
<a name="l00087"></a>00087
|
81
|
-
<a name="l00089"></a><a class="code" href="namespaceGosu.html#58015f2ee3527184171d3d99176fd360">00089</a> <span class="keyword">inline</span> <span class="keywordtype">double</span> <a class="code" href="namespaceGosu.html#58015f2ee3527184171d3d99176fd360" title="Returns the square of the distance between two points.">distanceSqr</a>(<span class="keywordtype">double</span> x1, <span class="keywordtype">double</span> y1, <span class="keywordtype">double</span> x2, <span class="keywordtype">double</span> y2)
|
82
|
-
<a name="l00090"></a>00090 {
|
83
|
-
<a name="l00091"></a>00091 <span class="keywordflow">return</span> <a class="code" href="namespaceGosu.html#cac78b0775d1b551f4adf9ae76efb4cc" title="Returns value * value.">square</a>(x1 - x2) + <a class="code" href="namespaceGosu.html#cac78b0775d1b551f4adf9ae76efb4cc" title="Returns value * value.">square</a>(y1 - y2);
|
84
|
-
<a name="l00092"></a>00092 }
|
85
|
-
<a name="l00093"></a>00093
|
86
|
-
<a name="l00095"></a>00095 <span class="keywordtype">double</span> <a class="code" href="namespaceGosu.html#a06a29a8aefa1be625072b02e2d825bd" title="Returns the distance between two points.">distance</a>(<span class="keywordtype">double</span> x1, <span class="keywordtype">double</span> y1, <span class="keywordtype">double</span> x2, <span class="keywordtype">double</span> y2);
|
87
|
-
<a name="l00096"></a>00096
|
88
|
-
<a name="l00099"></a>00099 <span class="keyword">template</span><<span class="keyword">typename</span> T>
|
89
|
-
<a name="l00100"></a><a class="code" href="namespaceGosu.html#29515f6c9be056e9ca5f672dec154847">00100</a> T <a class="code" href="namespaceGosu.html#55c2cfa7575386d8eb6a8dc615e905ae" title="Interpolates linearly between two colors, with a given weight towards the second...">interpolate</a>(T a, T b, <span class="keywordtype">double</span> weight = 0.5)
|
90
|
-
<a name="l00101"></a>00101 {
|
91
|
-
<a name="l00102"></a>00102 <span class="keywordflow">return</span> a * (1.0 - weight) + b * weight;
|
92
|
-
<a name="l00103"></a>00103 }
|
93
|
-
<a name="l00104"></a>00104 }
|
94
|
-
<a name="l00105"></a>00105
|
95
|
-
<a name="l00106"></a>00106 <span class="preprocessor">#endif</span>
|
96
|
-
</pre></div></div>
|
97
|
-
<hr size="1"><address style="text-align: right;"><small>Generated on Fri Apr 17 23:35:43 2009 for Gosu by
|
98
|
-
<a href="http://www.doxygen.org/index.html">
|
99
|
-
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.5 </small></address>
|
100
|
-
</body>
|
101
|
-
</html>
|
data/reference/Math_8hpp.html
DELETED
@@ -1,78 +0,0 @@
|
|
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: Math.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>Math.hpp File Reference</h1>Contains simple math functionality. <a href="#_details">More...</a>
|
20
|
-
<p>
|
21
|
-
|
22
|
-
<p>
|
23
|
-
<a href="Math_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>Functions</h2></td></tr>
|
29
|
-
<tr><td class="memItemLeft" nowrap align="right" valign="top">long </td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceGosu.html#dc5f4941f3a17c6c5233d6c7a628cc68">Gosu::trunc</a> (double value)</td></tr>
|
30
|
-
|
31
|
-
<tr><td class="memItemLeft" nowrap align="right" valign="top">long </td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceGosu.html#496868cf52cf159cf98a00888c4fbc1c">Gosu::round</a> (double value)</td></tr>
|
32
|
-
|
33
|
-
<tr><td class="memItemLeft" nowrap align="right" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceGosu.html#6c855080566f7f1b1967c90805249dda">Gosu::random</a> (double min, double max)</td></tr>
|
34
|
-
|
35
|
-
<tr><td class="memItemLeft" nowrap align="right" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceGosu.html#2f8e80b399a0c5ba42667f22e7f2ba2f">Gosu::gosuToRadians</a> (double angle)</td></tr>
|
36
|
-
|
37
|
-
<tr><td class="memItemLeft" nowrap align="right" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceGosu.html#a853d9351f1568d0a949b2b7717e1e6a">Gosu::radiansToGosu</a> (double angle)</td></tr>
|
38
|
-
|
39
|
-
<tr><td class="memItemLeft" nowrap align="right" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceGosu.html#e61d02831aa7026e96f1e53a358609b2">Gosu::offsetX</a> (double angle, double radius)</td></tr>
|
40
|
-
|
41
|
-
<tr><td class="memItemLeft" nowrap align="right" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceGosu.html#9e0845d8b2ed385cb4e8593e7a308a08">Gosu::offsetY</a> (double angle, double radius)</td></tr>
|
42
|
-
|
43
|
-
<tr><td class="memItemLeft" nowrap align="right" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceGosu.html#f7740dec821977a37ff26a90c2e85ac7">Gosu::angle</a> (double fromX, double fromY, double toX, double toY, double def=0)</td></tr>
|
44
|
-
|
45
|
-
<tr><td class="memItemLeft" nowrap align="right" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceGosu.html#36cfaba7c2038bfeabdd1672882704f4">Gosu::angleDiff</a> (double angle1, double angle2)</td></tr>
|
46
|
-
|
47
|
-
<tr><td class="memItemLeft" nowrap align="right" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceGosu.html#c6f147ab90f7e343dd9d70cc8bf3a91b">Gosu::normalizeAngle</a> (double angle)</td></tr>
|
48
|
-
|
49
|
-
<tr><td class="memTemplParams" nowrap colspan="2">template<typename T> </td></tr>
|
50
|
-
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">T </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespaceGosu.html#cac78b0775d1b551f4adf9ae76efb4cc">Gosu::square</a> (T value)</td></tr>
|
51
|
-
|
52
|
-
<tr><td class="memTemplParams" nowrap colspan="2">template<typename T> </td></tr>
|
53
|
-
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">T </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespaceGosu.html#3359d78e0ca7fa5d163dce7b99f72e9f">Gosu::clamp</a> (T value, T min, T max)</td></tr>
|
54
|
-
|
55
|
-
<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="5b35114c04a3f01d54c2e052d350b61f"></a><!-- doxytag: member="Math.hpp::boundBy" ref="5b35114c04a3f01d54c2e052d350b61f" args="(T value, T min, T max)" -->
|
56
|
-
template<typename T> </td></tr>
|
57
|
-
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">T </td><td class="memTemplItemRight" valign="bottom"><b>Gosu::boundBy</b> (T value, T min, T max)</td></tr>
|
58
|
-
|
59
|
-
<tr><td class="memItemLeft" nowrap align="right" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceGosu.html#58015f2ee3527184171d3d99176fd360">Gosu::distanceSqr</a> (double x1, double y1, double x2, double y2)</td></tr>
|
60
|
-
|
61
|
-
<tr><td class="memItemLeft" nowrap align="right" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceGosu.html#a06a29a8aefa1be625072b02e2d825bd">Gosu::distance</a> (double x1, double y1, double x2, double y2)</td></tr>
|
62
|
-
|
63
|
-
<tr><td class="memTemplParams" nowrap colspan="2">template<typename T> </td></tr>
|
64
|
-
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">T </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespaceGosu.html#29515f6c9be056e9ca5f672dec154847">Gosu::interpolate</a> (T a, T b, double weight=0.5)</td></tr>
|
65
|
-
|
66
|
-
<tr><td colspan="2"><br><h2>Variables</h2></td></tr>
|
67
|
-
<tr><td class="memItemLeft" nowrap align="right" valign="top">const double </td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceGosu.html#cc7336a0eba36412dab0e991fb3faf01">Gosu::pi</a> = 3.1415926536</td></tr>
|
68
|
-
|
69
|
-
</table>
|
70
|
-
<hr><a name="_details"></a><h2>Detailed Description</h2>
|
71
|
-
Contains simple math functionality.
|
72
|
-
<p>
|
73
|
-
</div>
|
74
|
-
<hr size="1"><address style="text-align: right;"><small>Generated on Fri Apr 17 23:35:43 2009 for Gosu by
|
75
|
-
<a href="http://www.doxygen.org/index.html">
|
76
|
-
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.5 </small></address>
|
77
|
-
</body>
|
78
|
-
</html>
|
@@ -1,73 +0,0 @@
|
|
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: Platform.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>Platform.hpp File Reference</h1>Macros and utility functions to facilitate programming on all of Gosu's supported platforms. <a href="#_details">More...</a>
|
20
|
-
<p>
|
21
|
-
|
22
|
-
<p>
|
23
|
-
<a href="Platform_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>Defines</h2></td></tr>
|
29
|
-
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="83e716dc517663f3e92113a65ac89f00"></a><!-- doxytag: member="Platform.hpp::IDENTITY_FUN" ref="83e716dc517663f3e92113a65ac89f00" args="" -->
|
30
|
-
#define </td><td class="memItemRight" valign="bottom"><b>IDENTITY_FUN</b> littleToNative</td></tr>
|
31
|
-
|
32
|
-
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d825a041da05b9ead5967326d23d1adb"></a><!-- doxytag: member="Platform.hpp::IDENTITY_FUN2" ref="d825a041da05b9ead5967326d23d1adb" args="" -->
|
33
|
-
#define </td><td class="memItemRight" valign="bottom"><b>IDENTITY_FUN2</b> nativeToLittle</td></tr>
|
34
|
-
|
35
|
-
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1cfd7bfc4d742a19627a9cf7d0888635"></a><!-- doxytag: member="Platform.hpp::CONV_FUN" ref="1cfd7bfc4d742a19627a9cf7d0888635" args="" -->
|
36
|
-
#define </td><td class="memItemRight" valign="bottom"><b>CONV_FUN</b> bigToNative</td></tr>
|
37
|
-
|
38
|
-
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="efee8d4b97053f2b3f1e83e5ebbd2f27"></a><!-- doxytag: member="Platform.hpp::CONV_FUN2" ref="efee8d4b97053f2b3f1e83e5ebbd2f27" args="" -->
|
39
|
-
#define </td><td class="memItemRight" valign="bottom"><b>CONV_FUN2</b> nativeToBig</td></tr>
|
40
|
-
|
41
|
-
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="affbc4e302a692e21642914e262b7e30"></a><!-- doxytag: member="Platform.hpp::GOSU_IS_UNIX" ref="affbc4e302a692e21642914e262b7e30" args="" -->
|
42
|
-
#define </td><td class="memItemRight" valign="bottom"><b>GOSU_IS_UNIX</b></td></tr>
|
43
|
-
|
44
|
-
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1fa939cf2107f6a856c431806578aa1e"></a><!-- doxytag: member="Platform.hpp::GOSU_IS_MAC" ref="1fa939cf2107f6a856c431806578aa1e" args="" -->
|
45
|
-
#define </td><td class="memItemRight" valign="bottom"><b>GOSU_IS_MAC</b></td></tr>
|
46
|
-
|
47
|
-
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
|
48
|
-
<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="3ea757503a65f9fb3b8ba913c726585f"></a><!-- doxytag: member="Platform.hpp::IDENTITY_FUN" ref="3ea757503a65f9fb3b8ba913c726585f" args="(T t)" -->
|
49
|
-
template<typename T> </td></tr>
|
50
|
-
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">T </td><td class="memTemplItemRight" valign="bottom"><b>Gosu::IDENTITY_FUN</b> (T t)</td></tr>
|
51
|
-
|
52
|
-
<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="ab6a919c784cf33d6d9a64ce61110cd7"></a><!-- doxytag: member="Platform.hpp::IDENTITY_FUN2" ref="ab6a919c784cf33d6d9a64ce61110cd7" args="(T t)" -->
|
53
|
-
template<typename T> </td></tr>
|
54
|
-
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">T </td><td class="memTemplItemRight" valign="bottom"><b>Gosu::IDENTITY_FUN2</b> (T t)</td></tr>
|
55
|
-
|
56
|
-
<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="f161626629fdbc5bf78c55a016efc82d"></a><!-- doxytag: member="Platform.hpp::CONV_FUN" ref="f161626629fdbc5bf78c55a016efc82d" args="(T t)" -->
|
57
|
-
template<typename T> </td></tr>
|
58
|
-
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">T </td><td class="memTemplItemRight" valign="bottom"><b>Gosu::CONV_FUN</b> (T t)</td></tr>
|
59
|
-
|
60
|
-
<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="23fbca32f7bdea943a463509fd8ee26e"></a><!-- doxytag: member="Platform.hpp::CONV_FUN2" ref="23fbca32f7bdea943a463509fd8ee26e" args="(T t)" -->
|
61
|
-
template<typename T> </td></tr>
|
62
|
-
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">T </td><td class="memTemplItemRight" valign="bottom"><b>Gosu::CONV_FUN2</b> (T t)</td></tr>
|
63
|
-
|
64
|
-
</table>
|
65
|
-
<hr><a name="_details"></a><h2>Detailed Description</h2>
|
66
|
-
Macros and utility functions to facilitate programming on all of Gosu's supported platforms.
|
67
|
-
<p>
|
68
|
-
</div>
|
69
|
-
<hr size="1"><address style="text-align: right;"><small>Generated on Fri Apr 17 23:35:43 2009 for Gosu by
|
70
|
-
<a href="http://www.doxygen.org/index.html">
|
71
|
-
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.5 </small></address>
|
72
|
-
</body>
|
73
|
-
</html>
|
@@ -1,138 +0,0 @@
|
|
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: RotFlip.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>RotFlip.hpp</h1><a href="RotFlip_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_ROTFLIP_HPP</span>
|
21
|
-
<a name="l00005"></a>00005 <span class="preprocessor"></span><span class="preprocessor">#define GOSU_ROTFLIP_HPP</span>
|
22
|
-
<a name="l00006"></a>00006 <span class="preprocessor"></span>
|
23
|
-
<a name="l00007"></a>00007 <span class="keyword">namespace </span>Gosu
|
24
|
-
<a name="l00008"></a>00008 {
|
25
|
-
<a name="l00009"></a>00009 <span class="keyword">enum</span> RotFlipName
|
26
|
-
<a name="l00010"></a>00010 {
|
27
|
-
<a name="l00011"></a>00011 rfDefault,
|
28
|
-
<a name="l00012"></a>00012 rfRotate90,
|
29
|
-
<a name="l00013"></a>00013 rfRotate180,
|
30
|
-
<a name="l00014"></a>00014 rfRotate270,
|
31
|
-
<a name="l00015"></a>00015
|
32
|
-
<a name="l00016"></a>00016 rfFlipX,
|
33
|
-
<a name="l00017"></a>00017 rfRotate90FlipX,
|
34
|
-
<a name="l00018"></a>00018 rfRotate180FlipX,
|
35
|
-
<a name="l00019"></a>00019 rfRotate270FlipX,
|
36
|
-
<a name="l00020"></a>00020
|
37
|
-
<a name="l00021"></a>00021 rfFlipY = rfRotate180FlipX,
|
38
|
-
<a name="l00022"></a>00022 rfRotate90FlipY = rfRotate270FlipX,
|
39
|
-
<a name="l00023"></a>00023 rfRotate180FlipY = rfFlipX,
|
40
|
-
<a name="l00024"></a>00024 rfRotate270FlipY = rfRotate90FlipX,
|
41
|
-
<a name="l00025"></a>00025
|
42
|
-
<a name="l00026"></a>00026 rfFlipXRotate90 = rfRotate270FlipX,
|
43
|
-
<a name="l00027"></a>00027 rfFlipXRotate180 = rfRotate180FlipX,
|
44
|
-
<a name="l00028"></a>00028 rfFlipXRotate270 = rfRotate90FlipX,
|
45
|
-
<a name="l00029"></a>00029
|
46
|
-
<a name="l00030"></a>00030 rfFlipYRotate90 = rfRotate90FlipX,
|
47
|
-
<a name="l00031"></a>00031 rfFlipYRotate180 = rfFlipX,
|
48
|
-
<a name="l00032"></a>00032 rfFlipYRotate270 = rfRotate270FlipX
|
49
|
-
<a name="l00033"></a>00033 };
|
50
|
-
<a name="l00034"></a>00034
|
51
|
-
<a name="l00035"></a>00035 <span class="keyword">class </span>RotFlip
|
52
|
-
<a name="l00036"></a>00036 {
|
53
|
-
<a name="l00037"></a>00037 RotFlipName name_;
|
54
|
-
<a name="l00038"></a>00038
|
55
|
-
<a name="l00039"></a>00039 <span class="keyword">typedef</span> RotFlipName TransTable[8];
|
56
|
-
<a name="l00040"></a>00040 <span class="keyword">static</span> <span class="keyword">const</span> TransTable flipXTable, flipYTable, rotate90Table,
|
57
|
-
<a name="l00041"></a>00041 rotate180Table, rotate270Table;
|
58
|
-
<a name="l00042"></a>00042
|
59
|
-
<a name="l00043"></a>00043 <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> CornerTable[8][4];
|
60
|
-
<a name="l00044"></a>00044 <span class="keyword">static</span> <span class="keyword">const</span> CornerTable mapCornerTable, realCornerTable;
|
61
|
-
<a name="l00045"></a>00045
|
62
|
-
<a name="l00046"></a>00046 <span class="keyword">public</span>:
|
63
|
-
<a name="l00047"></a>00047 RotFlip(RotFlipName name = rfDefault)
|
64
|
-
<a name="l00048"></a>00048 : name_(name)
|
65
|
-
<a name="l00049"></a>00049 {
|
66
|
-
<a name="l00050"></a>00050 }
|
67
|
-
<a name="l00051"></a>00051
|
68
|
-
<a name="l00052"></a>00052 RotFlipName name()<span class="keyword"> const</span>
|
69
|
-
<a name="l00053"></a>00053 <span class="keyword"> </span>{
|
70
|
-
<a name="l00054"></a>00054 <span class="keywordflow">return</span> name_;
|
71
|
-
<a name="l00055"></a>00055 }
|
72
|
-
<a name="l00056"></a>00056
|
73
|
-
<a name="l00057"></a>00057 <span class="keywordtype">void</span> flipX()
|
74
|
-
<a name="l00058"></a>00058 {
|
75
|
-
<a name="l00059"></a>00059 name_ = flipXTable[name_];
|
76
|
-
<a name="l00060"></a>00060 }
|
77
|
-
<a name="l00061"></a>00061
|
78
|
-
<a name="l00062"></a>00062 <span class="keywordtype">void</span> flipY()
|
79
|
-
<a name="l00063"></a>00063 {
|
80
|
-
<a name="l00064"></a>00064 name_ = flipYTable[name_];
|
81
|
-
<a name="l00065"></a>00065 }
|
82
|
-
<a name="l00066"></a>00066
|
83
|
-
<a name="l00067"></a>00067 <span class="keywordtype">void</span> rotate90()
|
84
|
-
<a name="l00068"></a>00068 {
|
85
|
-
<a name="l00069"></a>00069 name_ = rotate90Table[name_];
|
86
|
-
<a name="l00070"></a>00070 }
|
87
|
-
<a name="l00071"></a>00071
|
88
|
-
<a name="l00072"></a>00072 <span class="keywordtype">void</span> rotate180()
|
89
|
-
<a name="l00073"></a>00073 {
|
90
|
-
<a name="l00074"></a>00074 name_ = rotate180Table[name_];
|
91
|
-
<a name="l00075"></a>00075 }
|
92
|
-
<a name="l00076"></a>00076
|
93
|
-
<a name="l00077"></a>00077 <span class="keywordtype">void</span> rotate270()
|
94
|
-
<a name="l00078"></a>00078 {
|
95
|
-
<a name="l00079"></a>00079 name_ = rotate270Table[name_];
|
96
|
-
<a name="l00080"></a>00080 }
|
97
|
-
<a name="l00081"></a>00081
|
98
|
-
<a name="l00082"></a>00082 <span class="keywordtype">bool</span> flipped()<span class="keyword"> const</span>
|
99
|
-
<a name="l00083"></a>00083 <span class="keyword"> </span>{
|
100
|
-
<a name="l00084"></a>00084 <span class="keywordflow">return</span> name_ >= rfFlipX;
|
101
|
-
<a name="l00085"></a>00085 }
|
102
|
-
<a name="l00086"></a>00086
|
103
|
-
<a name="l00087"></a>00087 <span class="keywordtype">bool</span> rotated()<span class="keyword"> const</span>
|
104
|
-
<a name="l00088"></a>00088 <span class="keyword"> </span>{
|
105
|
-
<a name="l00089"></a>00089 <span class="keywordflow">return</span> name_ % 2 == 1;
|
106
|
-
<a name="l00090"></a>00090 }
|
107
|
-
<a name="l00091"></a>00091
|
108
|
-
<a name="l00092"></a>00092 <span class="keywordtype">unsigned</span> mapCorner(<span class="keywordtype">unsigned</span> n)<span class="keyword"> const</span>
|
109
|
-
<a name="l00093"></a>00093 <span class="keyword"> </span>{
|
110
|
-
<a name="l00094"></a>00094 <span class="keywordflow">return</span> mapCornerTable[name_][n];
|
111
|
-
<a name="l00095"></a>00095 }
|
112
|
-
<a name="l00096"></a>00096
|
113
|
-
<a name="l00097"></a>00097 <span class="keywordtype">unsigned</span> realCorner(<span class="keywordtype">unsigned</span> n)<span class="keyword"> const</span>
|
114
|
-
<a name="l00098"></a>00098 <span class="keyword"> </span>{
|
115
|
-
<a name="l00099"></a>00099 <span class="keywordflow">return</span> realCornerTable[name_][n];
|
116
|
-
<a name="l00100"></a>00100 }
|
117
|
-
<a name="l00101"></a>00101 };
|
118
|
-
<a name="l00102"></a>00102
|
119
|
-
<a name="l00103"></a>00103 <span class="keyword">inline</span> <span class="keywordtype">bool</span> operator==(RotFlip a, RotFlip b)
|
120
|
-
<a name="l00104"></a>00104 {
|
121
|
-
<a name="l00105"></a>00105 <span class="keywordflow">return</span> a.name() == b.name();
|
122
|
-
<a name="l00106"></a>00106 }
|
123
|
-
<a name="l00107"></a>00107
|
124
|
-
<a name="l00108"></a>00108 <span class="keyword">inline</span> <span class="keywordtype">bool</span> operator!=(RotFlip a, RotFlip b)
|
125
|
-
<a name="l00109"></a>00109 {
|
126
|
-
<a name="l00110"></a>00110 <span class="keywordflow">return</span> a.name() != b.name();
|
127
|
-
<a name="l00111"></a>00111 }
|
128
|
-
<a name="l00112"></a>00112
|
129
|
-
<a name="l00113"></a>00113 <span class="keywordtype">void</span> applyToPoint(RotFlip rotFlip, <span class="keywordtype">int</span>& x, <span class="keywordtype">int</span>& y, <span class="keywordtype">int</span> max);
|
130
|
-
<a name="l00114"></a>00114 }
|
131
|
-
<a name="l00115"></a>00115
|
132
|
-
<a name="l00116"></a>00116 <span class="preprocessor">#endif</span>
|
133
|
-
</pre></div></div>
|
134
|
-
<hr size="1"><address style="text-align: right;"><small>Generated on Fri Apr 17 23:35:43 2009 for Gosu by
|
135
|
-
<a href="http://www.doxygen.org/index.html">
|
136
|
-
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.5 </small></address>
|
137
|
-
</body>
|
138
|
-
</html>
|