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.
Files changed (312) hide show
  1. data/COPYING.txt +4 -2
  2. data/Gosu/Audio.hpp +8 -5
  3. data/Gosu/Font.hpp +5 -3
  4. data/Gosu/Gosu.hpp +6 -0
  5. data/Gosu/Graphics.hpp +6 -13
  6. data/Gosu/GraphicsBase.hpp +14 -3
  7. data/Gosu/IO.hpp +259 -255
  8. data/Gosu/Image.hpp +12 -12
  9. data/Gosu/ImageData.hpp +3 -0
  10. data/Gosu/Input.hpp +14 -2
  11. data/Gosu/Math.hpp +3 -2
  12. data/Gosu/RotFlip.hpp +125 -116
  13. data/Gosu/Sockets.hpp +139 -129
  14. data/Gosu/Text.hpp +4 -4
  15. data/Gosu/WinUtility.hpp +1 -1
  16. data/Gosu/Window.hpp +9 -5
  17. data/GosuImpl/Graphics/BitmapUtils.cpp +8 -8
  18. data/GosuImpl/Graphics/DrawOp.hpp +13 -14
  19. data/GosuImpl/Graphics/Graphics.cpp +3 -2
  20. data/GosuImpl/Graphics/Image.cpp +8 -8
  21. data/GosuImpl/Graphics/LargeImageData.cpp +8 -8
  22. data/GosuImpl/Graphics/Text.cpp +15 -3
  23. data/GosuImpl/{TextTTFWin.cpp → Graphics/TextTTFWin.cpp} +0 -0
  24. data/GosuImpl/Graphics/TextWin.cpp +36 -25
  25. data/GosuImpl/Graphics/Texture.cpp +2 -0
  26. data/GosuImpl/Iconv.hpp +1 -3
  27. data/GosuImpl/RubyGosu.swg +19 -10
  28. data/GosuImpl/RubyGosuStub.mm +40 -8
  29. data/GosuImpl/RubyGosu_SWIG_GC_PATCH.patch +126 -0
  30. data/GosuImpl/RubyGosu_wrap.cxx +1601 -247
  31. data/GosuImpl/RubyGosu_wrap.h +1 -1
  32. data/GosuImpl/WindowWin.cpp +18 -6
  33. data/README.txt +5 -5
  34. data/Rakefile +27 -7
  35. data/linux/Makefile.in +1 -1
  36. data/mac/Gosu.xcodeproj/jlnr.pbxuser +939 -350
  37. data/mac/Gosu.xcodeproj/jlnr.perspectivev3 +66 -61
  38. data/mac/Gosu.xcodeproj/project.pbxproj +474 -92
  39. data/mac/RubyGosu Template-Info.plist b/data/mac/RubyGosu → App-Info.plist +0 -0
  40. data/reference/cpp/_audio_8hpp-source.html +171 -0
  41. data/reference/cpp/_audio_8hpp.html +96 -0
  42. data/reference/cpp/_auto_link_8hpp-source.html +84 -0
  43. data/reference/cpp/_auto_link_8hpp.html +83 -0
  44. data/reference/cpp/_bitmap_8hpp-source.html +130 -0
  45. data/reference/cpp/_bitmap_8hpp.html +107 -0
  46. data/reference/{ButtonsMac_8hpp-source.html → cpp/_buttons_mac_8hpp-source.html} +60 -14
  47. data/reference/cpp/_buttons_mac_8hpp.html +233 -0
  48. data/reference/cpp/_color_8hpp-source.html +215 -0
  49. data/reference/cpp/_color_8hpp.html +119 -0
  50. data/reference/cpp/_directories_8hpp-source.html +88 -0
  51. data/reference/cpp/_directories_8hpp.html +96 -0
  52. data/reference/cpp/_font_8hpp-source.html +111 -0
  53. data/reference/cpp/_font_8hpp.html +87 -0
  54. data/reference/{Fwd_8hpp-source.html → cpp/_fwd_8hpp-source.html} +59 -13
  55. data/reference/cpp/_fwd_8hpp.html +83 -0
  56. data/reference/cpp/_gosu_8hpp-source.html +96 -0
  57. data/reference/cpp/_gosu_8hpp.html +83 -0
  58. data/reference/cpp/_graphics_8hpp-source.html +134 -0
  59. data/reference/cpp/_graphics_8hpp.html +94 -0
  60. data/reference/cpp/_graphics_base_8hpp-source.html +115 -0
  61. data/reference/cpp/_graphics_base_8hpp.html +120 -0
  62. data/reference/cpp/_i_o_8hpp-source.html +301 -0
  63. data/reference/cpp/_i_o_8hpp.html +122 -0
  64. data/reference/cpp/_image_8hpp-source.html +172 -0
  65. data/reference/cpp/_image_8hpp.html +96 -0
  66. data/reference/cpp/_image_data_8hpp-source.html +108 -0
  67. data/reference/cpp/_image_data_8hpp.html +90 -0
  68. data/reference/cpp/_input_8hpp-source.html +182 -0
  69. data/reference/cpp/_input_8hpp.html +102 -0
  70. data/reference/cpp/_math_8hpp-source.html +147 -0
  71. data/reference/cpp/_math_8hpp.html +139 -0
  72. data/reference/{Platform_8hpp-source.html → cpp/_platform_8hpp-source.html} +61 -15
  73. data/reference/cpp/_platform_8hpp.html +136 -0
  74. data/reference/cpp/_rot_flip_8hpp-source.html +184 -0
  75. data/reference/cpp/_rot_flip_8hpp.html +123 -0
  76. data/reference/cpp/_sockets_8hpp-source.html +174 -0
  77. data/reference/cpp/_sockets_8hpp.html +117 -0
  78. data/reference/cpp/_text_8hpp-source.html +102 -0
  79. data/reference/cpp/_text_8hpp.html +99 -0
  80. data/reference/cpp/_text_input_8hpp-source.html +110 -0
  81. data/reference/cpp/_text_input_8hpp.html +87 -0
  82. data/reference/cpp/_timing_8hpp-source.html +82 -0
  83. data/reference/cpp/_timing_8hpp.html +90 -0
  84. data/reference/cpp/_utility_8hpp-source.html +89 -0
  85. data/reference/cpp/_utility_8hpp.html +96 -0
  86. data/reference/cpp/_win_utility_8hpp-source.html +125 -0
  87. data/reference/cpp/_win_utility_8hpp.html +116 -0
  88. data/reference/cpp/_window_8hpp-source.html +157 -0
  89. data/reference/cpp/_window_8hpp.html +87 -0
  90. data/reference/cpp/annotated.html +98 -0
  91. data/reference/cpp/class_gosu_1_1_audio-members.html +74 -0
  92. data/reference/cpp/class_gosu_1_1_audio.html +132 -0
  93. data/reference/cpp/class_gosu_1_1_bitmap-members.html +85 -0
  94. data/reference/cpp/class_gosu_1_1_bitmap.html +501 -0
  95. data/reference/cpp/class_gosu_1_1_buffer-members.html +84 -0
  96. data/reference/cpp/class_gosu_1_1_buffer.html +346 -0
  97. data/reference/{classGosu_1_1Buffer.png → cpp/class_gosu_1_1_buffer.png} +0 -0
  98. data/reference/cpp/class_gosu_1_1_button-members.html +76 -0
  99. data/reference/cpp/class_gosu_1_1_button.html +195 -0
  100. data/reference/cpp/class_gosu_1_1_color-members.html +96 -0
  101. data/reference/cpp/class_gosu_1_1_color.html +758 -0
  102. data/reference/cpp/class_gosu_1_1_comm_socket-members.html +90 -0
  103. data/reference/cpp/class_gosu_1_1_comm_socket.html +505 -0
  104. data/reference/cpp/class_gosu_1_1_file-members.html +81 -0
  105. data/reference/cpp/class_gosu_1_1_file.html +275 -0
  106. data/reference/{classGosu_1_1File.png → cpp/class_gosu_1_1_file.png} +0 -0
  107. data/reference/cpp/class_gosu_1_1_font-members.html +79 -0
  108. data/reference/{classGosu_1_1Font.html → cpp/class_gosu_1_1_font.html} +207 -66
  109. data/reference/cpp/class_gosu_1_1_graphics-members.html +90 -0
  110. data/reference/cpp/class_gosu_1_1_graphics.html +768 -0
  111. data/reference/cpp/class_gosu_1_1_image-members.html +85 -0
  112. data/reference/cpp/class_gosu_1_1_image.html +771 -0
  113. data/reference/cpp/class_gosu_1_1_image_data-members.html +77 -0
  114. data/reference/cpp/class_gosu_1_1_image_data.html +281 -0
  115. data/reference/cpp/class_gosu_1_1_input-members.html +85 -0
  116. data/reference/cpp/class_gosu_1_1_input.html +417 -0
  117. data/reference/cpp/class_gosu_1_1_listener_socket-members.html +78 -0
  118. data/reference/cpp/class_gosu_1_1_listener_socket.html +221 -0
  119. data/reference/cpp/class_gosu_1_1_message_socket-members.html +80 -0
  120. data/reference/{classGosu_1_1MessageSocket.html → cpp/class_gosu_1_1_message_socket.html} +115 -43
  121. data/reference/cpp/class_gosu_1_1_reader-members.html +80 -0
  122. data/reference/cpp/class_gosu_1_1_reader.html +322 -0
  123. data/reference/cpp/class_gosu_1_1_resource-members.html +79 -0
  124. data/reference/cpp/class_gosu_1_1_resource.html +305 -0
  125. data/reference/{classGosu_1_1Resource.png → cpp/class_gosu_1_1_resource.png} +0 -0
  126. data/reference/cpp/class_gosu_1_1_rot_flip-members.html +83 -0
  127. data/reference/cpp/class_gosu_1_1_rot_flip.html +347 -0
  128. data/reference/cpp/class_gosu_1_1_sample-members.html +77 -0
  129. data/reference/{classGosu_1_1Sample.html → cpp/class_gosu_1_1_sample.html} +99 -32
  130. data/reference/cpp/class_gosu_1_1_sample_instance-members.html +81 -0
  131. data/reference/cpp/class_gosu_1_1_sample_instance.html +317 -0
  132. data/reference/cpp/class_gosu_1_1_song-members.html +86 -0
  133. data/reference/{classGosu_1_1Song.html → cpp/class_gosu_1_1_song.html} +152 -68
  134. data/reference/cpp/class_gosu_1_1_text_input-members.html +78 -0
  135. data/reference/cpp/class_gosu_1_1_text_input.html +227 -0
  136. data/reference/cpp/class_gosu_1_1_window-members.html +90 -0
  137. data/reference/cpp/class_gosu_1_1_window.html +533 -0
  138. data/reference/cpp/class_gosu_1_1_writer-members.html +79 -0
  139. data/reference/cpp/class_gosu_1_1_writer.html +292 -0
  140. data/reference/cpp/classes.html +86 -0
  141. data/reference/cpp/closed.gif +0 -0
  142. data/reference/cpp/cpp.css +155 -0
  143. data/reference/{doxygen.png → cpp/doxygen.png} +0 -0
  144. data/reference/cpp/files.html +97 -0
  145. data/reference/cpp/functions.html +127 -0
  146. data/reference/cpp/functions_0x62.html +137 -0
  147. data/reference/cpp/functions_0x63.html +140 -0
  148. data/reference/cpp/functions_0x64.html +142 -0
  149. data/reference/cpp/functions_0x65.html +119 -0
  150. data/reference/cpp/functions_0x66.html +137 -0
  151. data/reference/cpp/functions_0x67.html +131 -0
  152. data/reference/cpp/functions_0x68.html +121 -0
  153. data/reference/cpp/functions_0x69.html +123 -0
  154. data/reference/cpp/functions_0x6b.html +115 -0
  155. data/reference/cpp/functions_0x6c.html +117 -0
  156. data/reference/cpp/functions_0x6d.html +125 -0
  157. data/reference/cpp/functions_0x6e.html +117 -0
  158. data/reference/cpp/functions_0x6f.html +126 -0
  159. data/reference/cpp/functions_0x70.html +136 -0
  160. data/reference/cpp/functions_0x72.html +154 -0
  161. data/reference/cpp/functions_0x73.html +179 -0
  162. data/reference/cpp/functions_0x74.html +127 -0
  163. data/reference/cpp/functions_0x75.html +121 -0
  164. data/reference/cpp/functions_0x76.html +117 -0
  165. data/reference/cpp/functions_0x77.html +129 -0
  166. data/reference/cpp/functions_0x78.html +115 -0
  167. data/reference/cpp/functions_0x79.html +115 -0
  168. data/reference/cpp/functions_0x7e.html +143 -0
  169. data/reference/cpp/functions_enum.html +87 -0
  170. data/reference/cpp/functions_eval.html +89 -0
  171. data/reference/cpp/functions_func.html +125 -0
  172. data/reference/cpp/functions_func_0x62.html +133 -0
  173. data/reference/cpp/functions_func_0x63.html +136 -0
  174. data/reference/cpp/functions_func_0x64.html +140 -0
  175. data/reference/cpp/functions_func_0x65.html +117 -0
  176. data/reference/cpp/functions_func_0x66.html +135 -0
  177. data/reference/cpp/functions_func_0x67.html +129 -0
  178. data/reference/cpp/functions_func_0x68.html +119 -0
  179. data/reference/cpp/functions_func_0x69.html +119 -0
  180. data/reference/cpp/functions_func_0x6b.html +113 -0
  181. data/reference/cpp/functions_func_0x6c.html +113 -0
  182. data/reference/cpp/functions_func_0x6d.html +123 -0
  183. data/reference/cpp/functions_func_0x6e.html +115 -0
  184. data/reference/cpp/functions_func_0x6f.html +113 -0
  185. data/reference/cpp/functions_func_0x70.html +134 -0
  186. data/reference/cpp/functions_func_0x72.html +150 -0
  187. data/reference/cpp/functions_func_0x73.html +173 -0
  188. data/reference/cpp/functions_func_0x74.html +119 -0
  189. data/reference/cpp/functions_func_0x75.html +119 -0
  190. data/reference/cpp/functions_func_0x76.html +115 -0
  191. data/reference/cpp/functions_func_0x77.html +127 -0
  192. data/reference/cpp/functions_func_0x7e.html +141 -0
  193. data/reference/cpp/functions_type.html +87 -0
  194. data/reference/cpp/functions_vars.html +112 -0
  195. data/reference/cpp/globals.html +84 -0
  196. data/reference/cpp/globals_defs.html +84 -0
  197. data/reference/cpp/hierarchy.html +100 -0
  198. data/reference/cpp/index.html +66 -0
  199. data/reference/cpp/open.gif +0 -0
  200. data/reference/cpp/struct_gosu_1_1_g_l_tex_info-members.html +77 -0
  201. data/reference/cpp/struct_gosu_1_1_g_l_tex_info.html +185 -0
  202. data/reference/cpp/struct_gosu_1_1_touch-members.html +75 -0
  203. data/reference/cpp/struct_gosu_1_1_touch.html +153 -0
  204. data/reference/{tab_b.gif → cpp/tab_b.gif} +0 -0
  205. data/reference/{tab_l.gif → cpp/tab_l.gif} +0 -0
  206. data/reference/{tab_r.gif → cpp/tab_r.gif} +0 -0
  207. data/reference/{tabs.css → cpp/tabs.css} +5 -2
  208. data/windows/Gosu.sln +5 -0
  209. data/windows/Gosu.vcproj +3 -3
  210. data/windows/RubyGosu.vcproj +103 -1
  211. metadata +178 -176
  212. data/reference/Async_8hpp-source.html +0 -70
  213. data/reference/Audio_8hpp-source.html +0 -125
  214. data/reference/Audio_8hpp.html +0 -50
  215. data/reference/AutoLink_8hpp-source.html +0 -38
  216. data/reference/AutoLink_8hpp.html +0 -34
  217. data/reference/Bitmap_8hpp-source.html +0 -84
  218. data/reference/Bitmap_8hpp.html +0 -58
  219. data/reference/ButtonsWin_8hpp-source.html +0 -159
  220. data/reference/ButtonsX_8hpp-source.html +0 -160
  221. data/reference/Color_8hpp-source.html +0 -169
  222. data/reference/Color_8hpp.html +0 -85
  223. data/reference/Directories_8hpp-source.html +0 -42
  224. data/reference/Directories_8hpp.html +0 -46
  225. data/reference/Font_8hpp-source.html +0 -65
  226. data/reference/Font_8hpp.html +0 -41
  227. data/reference/Fwd_8hpp.html +0 -37
  228. data/reference/Gosu_8hpp-source.html +0 -49
  229. data/reference/Gosu_8hpp.html +0 -34
  230. data/reference/GraphicsBase_8hpp-source.html +0 -59
  231. data/reference/GraphicsBase_8hpp.html +0 -59
  232. data/reference/Graphics_8hpp-source.html +0 -99
  233. data/reference/Graphics_8hpp.html +0 -60
  234. data/reference/IO_8hpp-source.html +0 -255
  235. data/reference/IO_8hpp.html +0 -74
  236. data/reference/ImageData_8hpp-source.html +0 -62
  237. data/reference/ImageData_8hpp.html +0 -43
  238. data/reference/Image_8hpp-source.html +0 -126
  239. data/reference/Image_8hpp.html +0 -48
  240. data/reference/Input_8hpp-source.html +0 -131
  241. data/reference/Input_8hpp.html +0 -56
  242. data/reference/Math_8hpp-source.html +0 -101
  243. data/reference/Math_8hpp.html +0 -78
  244. data/reference/Platform_8hpp.html +0 -73
  245. data/reference/RotFlip_8hpp-source.html +0 -138
  246. data/reference/RotFlip_8hpp.html +0 -77
  247. data/reference/Sockets_8hpp-source.html +0 -130
  248. data/reference/Sockets_8hpp.html +0 -66
  249. data/reference/TextInput_8hpp-source.html +0 -64
  250. data/reference/TextInput_8hpp.html +0 -41
  251. data/reference/Text_8hpp-source.html +0 -56
  252. data/reference/Text_8hpp.html +0 -48
  253. data/reference/Timing_8hpp-source.html +0 -36
  254. data/reference/Timing_8hpp.html +0 -42
  255. data/reference/Utility_8hpp-source.html +0 -43
  256. data/reference/Utility_8hpp.html +0 -46
  257. data/reference/WinUtility_8hpp-source.html +0 -79
  258. data/reference/WinUtility_8hpp.html +0 -64
  259. data/reference/Window_8hpp-source.html +0 -110
  260. data/reference/Window_8hpp.html +0 -41
  261. data/reference/annotated.html +0 -51
  262. data/reference/classGosu_1_1Audio-members.html +0 -34
  263. data/reference/classGosu_1_1Audio.html +0 -46
  264. data/reference/classGosu_1_1Bitmap-members.html +0 -45
  265. data/reference/classGosu_1_1Bitmap.html +0 -266
  266. data/reference/classGosu_1_1Buffer-members.html +0 -44
  267. data/reference/classGosu_1_1Buffer.html +0 -78
  268. data/reference/classGosu_1_1Button-members.html +0 -36
  269. data/reference/classGosu_1_1Button.html +0 -143
  270. data/reference/classGosu_1_1Color-members.html +0 -56
  271. data/reference/classGosu_1_1Color.html +0 -387
  272. data/reference/classGosu_1_1File-members.html +0 -41
  273. data/reference/classGosu_1_1File.html +0 -69
  274. data/reference/classGosu_1_1Font-members.html +0 -39
  275. data/reference/classGosu_1_1Graphics-members.html +0 -50
  276. data/reference/classGosu_1_1Graphics.html +0 -234
  277. data/reference/classGosu_1_1Image-members.html +0 -45
  278. data/reference/classGosu_1_1Image.html +0 -518
  279. data/reference/classGosu_1_1ImageData-members.html +0 -37
  280. data/reference/classGosu_1_1ImageData.html +0 -60
  281. data/reference/classGosu_1_1Input-members.html +0 -45
  282. data/reference/classGosu_1_1Input.html +0 -256
  283. data/reference/classGosu_1_1MessageSocket-members.html +0 -40
  284. data/reference/classGosu_1_1Resource-members.html +0 -39
  285. data/reference/classGosu_1_1Resource.html +0 -116
  286. data/reference/classGosu_1_1Sample-members.html +0 -37
  287. data/reference/classGosu_1_1SampleInstance-members.html +0 -41
  288. data/reference/classGosu_1_1SampleInstance.html +0 -178
  289. data/reference/classGosu_1_1Song-members.html +0 -46
  290. data/reference/classGosu_1_1TextInput-members.html +0 -38
  291. data/reference/classGosu_1_1TextInput.html +0 -121
  292. data/reference/classGosu_1_1Window-members.html +0 -50
  293. data/reference/classGosu_1_1Window.html +0 -289
  294. data/reference/doxyfile +0 -233
  295. data/reference/doxygen.css +0 -433
  296. data/reference/files.html +0 -54
  297. data/reference/functions.html +0 -249
  298. data/reference/functions_enum.html +0 -45
  299. data/reference/functions_func.html +0 -240
  300. data/reference/functions_vars.html +0 -47
  301. data/reference/hierarchy.html +0 -53
  302. data/reference/index.html +0 -26
  303. data/reference/namespaceGosu.html +0 -3363
  304. data/reference/namespaceGosu_1_1Colors.html +0 -70
  305. data/reference/namespaceGosu_1_1Win.html +0 -275
  306. data/reference/namespacemembers.html +0 -229
  307. data/reference/namespacemembers_enum.html +0 -52
  308. data/reference/namespacemembers_eval.html +0 -54
  309. data/reference/namespacemembers_func.html +0 -196
  310. data/reference/namespacemembers_type.html +0 -46
  311. data/reference/namespacemembers_vars.html +0 -48
  312. data/reference/namespaces.html +0 -35
@@ -0,0 +1,139 @@
1
+ <html>
2
+ <head>
3
+ <title>Gosu C++ Reference</title>
4
+ <link rel="stylesheet" href="cpp.css" type="text/css" charset="utf-8">
5
+ </head>
6
+ <body>
7
+ <div class="everything">
8
+ <!-- Generated by Doxygen 1.5.8 -->
9
+ <script type="text/javascript">
10
+ <!--
11
+ function changeDisplayState (e){
12
+ var num=this.id.replace(/[^[0-9]/g,'');
13
+ var button=this.firstChild;
14
+ var sectionDiv=document.getElementById('dynsection'+num);
15
+ if (sectionDiv.style.display=='none'||sectionDiv.style.display==''){
16
+ sectionDiv.style.display='block';
17
+ button.src='open.gif';
18
+ }else{
19
+ sectionDiv.style.display='none';
20
+ button.src='closed.gif';
21
+ }
22
+ }
23
+ function initDynSections(){
24
+ var divs=document.getElementsByTagName('div');
25
+ var sectionCounter=1;
26
+ for(var i=0;i<divs.length-1;i++){
27
+ if(divs[i].className=='dynheader'&&divs[i+1].className=='dynsection'){
28
+ var header=divs[i];
29
+ var section=divs[i+1];
30
+ var button=header.firstChild;
31
+ if (button!='IMG'){
32
+ divs[i].insertBefore(document.createTextNode(' '),divs[i].firstChild);
33
+ button=document.createElement('img');
34
+ divs[i].insertBefore(button,divs[i].firstChild);
35
+ }
36
+ header.style.cursor='pointer';
37
+ header.onclick=changeDisplayState;
38
+ header.id='dynheader'+sectionCounter;
39
+ button.src='closed.gif';
40
+ section.id='dynsection'+sectionCounter;
41
+ section.style.display='none';
42
+ section.style.marginLeft='14px';
43
+ sectionCounter++;
44
+ }
45
+ }
46
+ }
47
+ window.onload = initDynSections;
48
+ -->
49
+ </script>
50
+ <div class="navigation" id="top">
51
+ <div class="tabs">
52
+ <ul>
53
+ <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
54
+ <li><a href="annotated.html"><span>Classes</span></a></li>
55
+ <li class="current"><a href="files.html"><span>Files</span></a></li>
56
+ </ul>
57
+ </div>
58
+ <div class="tabs">
59
+ <ul>
60
+ <li><a href="files.html"><span>File&nbsp;List</span></a></li>
61
+ <li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
62
+ </ul>
63
+ </div>
64
+ </div>
65
+ <div class="contents">
66
+ <h1>Math.hpp File Reference</h1>Contains simple math functionality.
67
+ <a href="#_details">More...</a>
68
+ <p>
69
+
70
+ <p>
71
+ <a href="_math_8hpp-source.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0">
72
+ <tr><td></td></tr>
73
+ <tr><td colspan="2"><br><h2>Functions</h2></td></tr>
74
+ <tr><td class="memItemLeft" nowrap align="right" valign="top">long&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespace_gosu.html#dc5f4941f3a17c6c5233d6c7a628cc68">Gosu::trunc</a> (double value)</td></tr>
75
+
76
+ <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Truncates the fractional part of a real value. <a href="#dc5f4941f3a17c6c5233d6c7a628cc68"></a><br></td></tr>
77
+ <tr><td class="memItemLeft" nowrap align="right" valign="top">long&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespace_gosu.html#496868cf52cf159cf98a00888c4fbc1c">Gosu::round</a> (double value)</td></tr>
78
+
79
+ <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Rounds a real value towards the next integer. <a href="#496868cf52cf159cf98a00888c4fbc1c"></a><br></td></tr>
80
+ <tr><td class="memItemLeft" nowrap align="right" valign="top">double&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespace_gosu.html#6c855080566f7f1b1967c90805249dda">Gosu::random</a> (double min, double max)</td></tr>
81
+
82
+ <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns a real value between min and max. <a href="#6c855080566f7f1b1967c90805249dda"></a><br></td></tr>
83
+ <tr><td class="memItemLeft" nowrap align="right" valign="top">double&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespace_gosu.html#2f8e80b399a0c5ba42667f22e7f2ba2f">Gosu::gosuToRadians</a> (double angle)</td></tr>
84
+
85
+ <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Translates between Gosu's angle system and radians. <a href="#2f8e80b399a0c5ba42667f22e7f2ba2f"></a><br></td></tr>
86
+ <tr><td class="memItemLeft" nowrap align="right" valign="top">double&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespace_gosu.html#a853d9351f1568d0a949b2b7717e1e6a">Gosu::radiansToGosu</a> (double angle)</td></tr>
87
+
88
+ <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Translates between Gosu's angle system and radians. <a href="#a853d9351f1568d0a949b2b7717e1e6a"></a><br></td></tr>
89
+ <tr><td class="memItemLeft" nowrap align="right" valign="top">double&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespace_gosu.html#e61d02831aa7026e96f1e53a358609b2">Gosu::offsetX</a> (double angle, double radius)</td></tr>
90
+
91
+ <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the horizontal distance between the origin and the point to which you would get if you moved radius pixels in the direction specified by angle. <a href="#e61d02831aa7026e96f1e53a358609b2"></a><br></td></tr>
92
+ <tr><td class="memItemLeft" nowrap align="right" valign="top">double&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespace_gosu.html#9e0845d8b2ed385cb4e8593e7a308a08">Gosu::offsetY</a> (double angle, double radius)</td></tr>
93
+
94
+ <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the vertical distance between the origin and the point to which you would get if you moved radius pixels in the direction specified by angle. <a href="#9e0845d8b2ed385cb4e8593e7a308a08"></a><br></td></tr>
95
+ <tr><td class="memItemLeft" nowrap align="right" valign="top">double&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespace_gosu.html#f7740dec821977a37ff26a90c2e85ac7">Gosu::angle</a> (double fromX, double fromY, double toX, double toY, double def=0)</td></tr>
96
+
97
+ <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the angle from point 1 to point 2 in degrees, where 0.0 means upwards. <a href="#f7740dec821977a37ff26a90c2e85ac7"></a><br></td></tr>
98
+ <tr><td class="memItemLeft" nowrap align="right" valign="top">double&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespace_gosu.html#36cfaba7c2038bfeabdd1672882704f4">Gosu::angleDiff</a> (double angle1, double angle2)</td></tr>
99
+
100
+ <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the smallest angle that can be added to angle1 to get to angle2 (can be negative if counter-clockwise movement is shorter). <a href="#36cfaba7c2038bfeabdd1672882704f4"></a><br></td></tr>
101
+ <tr><td class="memItemLeft" nowrap align="right" valign="top">double&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespace_gosu.html#c6f147ab90f7e343dd9d70cc8bf3a91b">Gosu::normalizeAngle</a> (double angle)</td></tr>
102
+
103
+ <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Normalizes an angle to fit into the range [0; 360[. <a href="#c6f147ab90f7e343dd9d70cc8bf3a91b"></a><br></td></tr>
104
+ <tr><td class="memTemplParams" nowrap colspan="2">template&lt;typename T &gt; </td></tr>
105
+ <tr><td class="memTemplItemLeft" nowrap align="right" valign="top">T&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespace_gosu.html#cac78b0775d1b551f4adf9ae76efb4cc">Gosu::square</a> (T value)</td></tr>
106
+
107
+ <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns value * value. <a href="#cac78b0775d1b551f4adf9ae76efb4cc"></a><br></td></tr>
108
+ <tr><td class="memTemplParams" nowrap colspan="2">template&lt;typename T &gt; </td></tr>
109
+ <tr><td class="memTemplItemLeft" nowrap align="right" valign="top">T&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespace_gosu.html#3359d78e0ca7fa5d163dce7b99f72e9f">Gosu::clamp</a> (T value, T min, T max)</td></tr>
110
+
111
+ <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns min if value is smaller than min, max if value is larger than max and value otherwise. <a href="#3359d78e0ca7fa5d163dce7b99f72e9f"></a><br></td></tr>
112
+ <tr><td class="memTemplParams" nowrap colspan="2">template&lt;typename T &gt; </td></tr>
113
+ <tr><td class="memTemplItemLeft" nowrap align="right" valign="top">T&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespace_gosu.html#5b35114c04a3f01d54c2e052d350b61f">Gosu::boundBy</a> (T value, T min, T max)</td></tr>
114
+
115
+ <tr><td class="memItemLeft" nowrap align="right" valign="top">double&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespace_gosu.html#58015f2ee3527184171d3d99176fd360">Gosu::distanceSqr</a> (double x1, double y1, double x2, double y2)</td></tr>
116
+
117
+ <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the square of the distance between two points. <a href="#58015f2ee3527184171d3d99176fd360"></a><br></td></tr>
118
+ <tr><td class="memItemLeft" nowrap align="right" valign="top">double&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespace_gosu.html#a06a29a8aefa1be625072b02e2d825bd">Gosu::distance</a> (double x1, double y1, double x2, double y2)</td></tr>
119
+
120
+ <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the distance between two points. <a href="#a06a29a8aefa1be625072b02e2d825bd"></a><br></td></tr>
121
+ <tr><td class="memTemplParams" nowrap colspan="2">template&lt;typename T &gt; </td></tr>
122
+ <tr><td class="memTemplItemLeft" nowrap align="right" valign="top">T&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespace_gosu.html#29515f6c9be056e9ca5f672dec154847">Gosu::interpolate</a> (T a, T b, double weight=0.5)</td></tr>
123
+
124
+ <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Interpolates a value between a and b, weight being the bias towards the second value. <a href="#29515f6c9be056e9ca5f672dec154847"></a><br></td></tr>
125
+ <tr><td colspan="2"><br><h2>Variables</h2></td></tr>
126
+ <tr><td class="memItemLeft" nowrap align="right" valign="top">const double&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespace_gosu.html#cc7336a0eba36412dab0e991fb3faf01">Gosu::pi</a> = 3.1415926536</td></tr>
127
+
128
+ <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Pi. <a href="#cc7336a0eba36412dab0e991fb3faf01"></a><br></td></tr>
129
+ </table>
130
+ <hr><a name="_details"></a><h2>Detailed Description</h2>
131
+ Contains simple math functionality.
132
+ <p>
133
+
134
+ <p>Definition in file <a class="el" href="_math_8hpp-source.html">Math.hpp</a>.</p>
135
+ </div>
136
+ <p class="footer">Documentation not clear enough? Please go to one of the places listed on <a href="http://www.libgosu.org/">http://www.libgosu.org/</a> and leave feedback. Thanks!</p>
137
+ </div>
138
+ </body>
139
+ </html>
@@ -1,20 +1,67 @@
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 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 -->
1
+ <html>
2
+ <head>
3
+ <title>Gosu C++ Reference</title>
4
+ <link rel="stylesheet" href="cpp.css" type="text/css" charset="utf-8">
5
+ </head>
6
+ <body>
7
+ <div class="everything">
8
+ <!-- Generated by Doxygen 1.5.8 -->
9
+ <script type="text/javascript">
10
+ <!--
11
+ function changeDisplayState (e){
12
+ var num=this.id.replace(/[^[0-9]/g,'');
13
+ var button=this.firstChild;
14
+ var sectionDiv=document.getElementById('dynsection'+num);
15
+ if (sectionDiv.style.display=='none'||sectionDiv.style.display==''){
16
+ sectionDiv.style.display='block';
17
+ button.src='open.gif';
18
+ }else{
19
+ sectionDiv.style.display='none';
20
+ button.src='closed.gif';
21
+ }
22
+ }
23
+ function initDynSections(){
24
+ var divs=document.getElementsByTagName('div');
25
+ var sectionCounter=1;
26
+ for(var i=0;i<divs.length-1;i++){
27
+ if(divs[i].className=='dynheader'&&divs[i+1].className=='dynsection'){
28
+ var header=divs[i];
29
+ var section=divs[i+1];
30
+ var button=header.firstChild;
31
+ if (button!='IMG'){
32
+ divs[i].insertBefore(document.createTextNode(' '),divs[i].firstChild);
33
+ button=document.createElement('img');
34
+ divs[i].insertBefore(button,divs[i].firstChild);
35
+ }
36
+ header.style.cursor='pointer';
37
+ header.onclick=changeDisplayState;
38
+ header.id='dynheader'+sectionCounter;
39
+ button.src='closed.gif';
40
+ section.id='dynsection'+sectionCounter;
41
+ section.style.display='none';
42
+ section.style.marginLeft='14px';
43
+ sectionCounter++;
44
+ }
45
+ }
46
+ }
47
+ window.onload = initDynSections;
48
+ -->
49
+ </script>
8
50
  <div class="navigation" id="top">
9
51
  <div class="tabs">
10
52
  <ul>
11
53
  <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
12
- <li><a href="namespaces.html"><span>Namespaces</span></a></li>
13
54
  <li><a href="annotated.html"><span>Classes</span></a></li>
14
55
  <li class="current"><a href="files.html"><span>Files</span></a></li>
15
56
  </ul>
16
57
  </div>
17
- <h1>Platform.hpp</h1><a href="Platform_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001
58
+ <div class="tabs">
59
+ <ul>
60
+ <li><a href="files.html"><span>File&nbsp;List</span></a></li>
61
+ <li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
62
+ </ul>
63
+ </div>
64
+ <h1>Platform.hpp</h1><a href="_platform_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001
18
65
  <a name="l00002"></a>00002
19
66
  <a name="l00003"></a>00003
20
67
  <a name="l00004"></a>00004 <span class="preprocessor">#ifndef GOSU_PLATFORM_HPP</span>
@@ -64,11 +111,11 @@
64
111
  <a name="l00048"></a>00048 <span class="preprocessor">#if defined(WIN32)</span>
65
112
  <a name="l00049"></a>00049 <span class="preprocessor"></span><span class="preprocessor"># define GOSU_IS_WIN</span>
66
113
  <a name="l00050"></a>00050 <span class="preprocessor"></span><span class="preprocessor">#else</span>
67
- <a name="l00051"></a>00051 <span class="preprocessor"></span><span class="preprocessor"># define GOSU_IS_UNIX</span>
114
+ <a name="l00051"></a><a class="code" href="_platform_8hpp.html#affbc4e302a692e21642914e262b7e30">00051</a> <span class="preprocessor"></span><span class="preprocessor"># define GOSU_IS_UNIX</span>
68
115
  <a name="l00052"></a>00052 <span class="preprocessor"></span><span class="preprocessor"># if defined(__linux) || defined(__FreeBSD__)</span>
69
116
  <a name="l00053"></a>00053 <span class="preprocessor"></span><span class="preprocessor"># define GOSU_IS_X</span>
70
117
  <a name="l00054"></a>00054 <span class="preprocessor"></span><span class="preprocessor"># else</span>
71
- <a name="l00055"></a>00055 <span class="preprocessor"></span><span class="preprocessor"># define GOSU_IS_MAC</span>
118
+ <a name="l00055"></a><a class="code" href="_platform_8hpp.html#1fa939cf2107f6a856c431806578aa1e">00055</a> <span class="preprocessor"></span><span class="preprocessor"># define GOSU_IS_MAC</span>
72
119
  <a name="l00056"></a>00056 <span class="preprocessor"></span><span class="preprocessor"># include &lt;TargetConditionals.h&gt;</span>
73
120
  <a name="l00057"></a>00057 <span class="preprocessor"># if TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR</span>
74
121
  <a name="l00058"></a>00058 <span class="preprocessor"></span><span class="preprocessor"># define GOSU_IS_IPHONE</span>
@@ -78,8 +125,7 @@
78
125
  <a name="l00062"></a>00062 <span class="preprocessor"></span>
79
126
  <a name="l00063"></a>00063 <span class="preprocessor">#endif</span>
80
127
  </pre></div></div>
81
- <hr size="1"><address style="text-align: right;"><small>Generated on Fri Apr 17 23:35:43 2009 for Gosu by&nbsp;
82
- <a href="http://www.doxygen.org/index.html">
83
- <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.5 </small></address>
84
- </body>
128
+ <p class="footer">Documentation not clear enough? Please go to one of the places listed on <a href="http://www.libgosu.org/">http://www.libgosu.org/</a> and leave feedback. Thanks!</p>
129
+ </div>
130
+ </body>
85
131
  </html>
@@ -0,0 +1,136 @@
1
+ <html>
2
+ <head>
3
+ <title>Gosu C++ Reference</title>
4
+ <link rel="stylesheet" href="cpp.css" type="text/css" charset="utf-8">
5
+ </head>
6
+ <body>
7
+ <div class="everything">
8
+ <!-- Generated by Doxygen 1.5.8 -->
9
+ <script type="text/javascript">
10
+ <!--
11
+ function changeDisplayState (e){
12
+ var num=this.id.replace(/[^[0-9]/g,'');
13
+ var button=this.firstChild;
14
+ var sectionDiv=document.getElementById('dynsection'+num);
15
+ if (sectionDiv.style.display=='none'||sectionDiv.style.display==''){
16
+ sectionDiv.style.display='block';
17
+ button.src='open.gif';
18
+ }else{
19
+ sectionDiv.style.display='none';
20
+ button.src='closed.gif';
21
+ }
22
+ }
23
+ function initDynSections(){
24
+ var divs=document.getElementsByTagName('div');
25
+ var sectionCounter=1;
26
+ for(var i=0;i<divs.length-1;i++){
27
+ if(divs[i].className=='dynheader'&&divs[i+1].className=='dynsection'){
28
+ var header=divs[i];
29
+ var section=divs[i+1];
30
+ var button=header.firstChild;
31
+ if (button!='IMG'){
32
+ divs[i].insertBefore(document.createTextNode(' '),divs[i].firstChild);
33
+ button=document.createElement('img');
34
+ divs[i].insertBefore(button,divs[i].firstChild);
35
+ }
36
+ header.style.cursor='pointer';
37
+ header.onclick=changeDisplayState;
38
+ header.id='dynheader'+sectionCounter;
39
+ button.src='closed.gif';
40
+ section.id='dynsection'+sectionCounter;
41
+ section.style.display='none';
42
+ section.style.marginLeft='14px';
43
+ sectionCounter++;
44
+ }
45
+ }
46
+ }
47
+ window.onload = initDynSections;
48
+ -->
49
+ </script>
50
+ <div class="navigation" id="top">
51
+ <div class="tabs">
52
+ <ul>
53
+ <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
54
+ <li><a href="annotated.html"><span>Classes</span></a></li>
55
+ <li class="current"><a href="files.html"><span>Files</span></a></li>
56
+ </ul>
57
+ </div>
58
+ <div class="tabs">
59
+ <ul>
60
+ <li><a href="files.html"><span>File&nbsp;List</span></a></li>
61
+ <li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
62
+ </ul>
63
+ </div>
64
+ </div>
65
+ <div class="contents">
66
+ <h1>Platform.hpp File Reference</h1>Macros and utility functions to facilitate programming on all of Gosu's supported platforms.
67
+ <a href="#_details">More...</a>
68
+ <p>
69
+
70
+ <p>
71
+ <a href="_platform_8hpp-source.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0">
72
+ <tr><td></td></tr>
73
+ <tr><td colspan="2"><br><h2>Defines</h2></td></tr>
74
+ <tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_platform_8hpp.html#affbc4e302a692e21642914e262b7e30">GOSU_IS_UNIX</a></td></tr>
75
+
76
+ <tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_platform_8hpp.html#1fa939cf2107f6a856c431806578aa1e">GOSU_IS_MAC</a></td></tr>
77
+
78
+ <tr><td colspan="2"><br><h2>Functions</h2></td></tr>
79
+ <tr><td class="memTemplParams" nowrap colspan="2">template&lt;typename T &gt; </td></tr>
80
+ <tr><td class="memTemplItemLeft" nowrap align="right" valign="top">T&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespace_gosu.html#a0f229414d053c94321957e12330bab2">Gosu::littleToNative</a> (T t)</td></tr>
81
+
82
+ <tr><td class="memTemplParams" nowrap colspan="2">template&lt;typename T &gt; </td></tr>
83
+ <tr><td class="memTemplItemLeft" nowrap align="right" valign="top">T&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespace_gosu.html#bdc3d0619aed81ec8b7e166cd6ba7991">Gosu::nativeToLittle</a> (T t)</td></tr>
84
+
85
+ <tr><td class="memTemplParams" nowrap colspan="2">template&lt;typename T &gt; </td></tr>
86
+ <tr><td class="memTemplItemLeft" nowrap align="right" valign="top">T&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespace_gosu.html#ea01dc8abf1ecacce40ed0cece880e99">Gosu::bigToNative</a> (T t)</td></tr>
87
+
88
+ <tr><td class="memTemplParams" nowrap colspan="2">template&lt;typename T &gt; </td></tr>
89
+ <tr><td class="memTemplItemLeft" nowrap align="right" valign="top">T&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespace_gosu.html#0e48bf62ef4945d76f08d2907eb8404d">Gosu::nativeToBig</a> (T t)</td></tr>
90
+
91
+ </table>
92
+ <hr><a name="_details"></a><h2>Detailed Description</h2>
93
+ Macros and utility functions to facilitate programming on all of Gosu's supported platforms.
94
+ <p>
95
+
96
+ <p>Definition in file <a class="el" href="_platform_8hpp-source.html">Platform.hpp</a>.</p>
97
+ <hr><h2>Define Documentation</h2>
98
+ <a class="anchor" name="1fa939cf2107f6a856c431806578aa1e"></a><!-- doxytag: member="Platform.hpp::GOSU_IS_MAC" ref="1fa939cf2107f6a856c431806578aa1e" args="" -->
99
+ <div class="memitem">
100
+ <div class="memproto">
101
+ <table class="memname">
102
+ <tr>
103
+ <td class="memname">#define GOSU_IS_MAC </td>
104
+ </tr>
105
+ </table>
106
+ </div>
107
+ <div class="memdoc">
108
+
109
+ <p>
110
+
111
+ <p>Definition at line <a class="el" href="_platform_8hpp-source.html#l00055">55</a> of file <a class="el" href="_platform_8hpp-source.html">Platform.hpp</a>.</p>
112
+
113
+ </div>
114
+ </div><p>
115
+ <a class="anchor" name="affbc4e302a692e21642914e262b7e30"></a><!-- doxytag: member="Platform.hpp::GOSU_IS_UNIX" ref="affbc4e302a692e21642914e262b7e30" args="" -->
116
+ <div class="memitem">
117
+ <div class="memproto">
118
+ <table class="memname">
119
+ <tr>
120
+ <td class="memname">#define GOSU_IS_UNIX </td>
121
+ </tr>
122
+ </table>
123
+ </div>
124
+ <div class="memdoc">
125
+
126
+ <p>
127
+
128
+ <p>Definition at line <a class="el" href="_platform_8hpp-source.html#l00051">51</a> of file <a class="el" href="_platform_8hpp-source.html">Platform.hpp</a>.</p>
129
+
130
+ </div>
131
+ </div><p>
132
+ </div>
133
+ <p class="footer">Documentation not clear enough? Please go to one of the places listed on <a href="http://www.libgosu.org/">http://www.libgosu.org/</a> and leave feedback. Thanks!</p>
134
+ </div>
135
+ </body>
136
+ </html>
@@ -0,0 +1,184 @@
1
+ <html>
2
+ <head>
3
+ <title>Gosu C++ Reference</title>
4
+ <link rel="stylesheet" href="cpp.css" type="text/css" charset="utf-8">
5
+ </head>
6
+ <body>
7
+ <div class="everything">
8
+ <!-- Generated by Doxygen 1.5.8 -->
9
+ <script type="text/javascript">
10
+ <!--
11
+ function changeDisplayState (e){
12
+ var num=this.id.replace(/[^[0-9]/g,'');
13
+ var button=this.firstChild;
14
+ var sectionDiv=document.getElementById('dynsection'+num);
15
+ if (sectionDiv.style.display=='none'||sectionDiv.style.display==''){
16
+ sectionDiv.style.display='block';
17
+ button.src='open.gif';
18
+ }else{
19
+ sectionDiv.style.display='none';
20
+ button.src='closed.gif';
21
+ }
22
+ }
23
+ function initDynSections(){
24
+ var divs=document.getElementsByTagName('div');
25
+ var sectionCounter=1;
26
+ for(var i=0;i<divs.length-1;i++){
27
+ if(divs[i].className=='dynheader'&&divs[i+1].className=='dynsection'){
28
+ var header=divs[i];
29
+ var section=divs[i+1];
30
+ var button=header.firstChild;
31
+ if (button!='IMG'){
32
+ divs[i].insertBefore(document.createTextNode(' '),divs[i].firstChild);
33
+ button=document.createElement('img');
34
+ divs[i].insertBefore(button,divs[i].firstChild);
35
+ }
36
+ header.style.cursor='pointer';
37
+ header.onclick=changeDisplayState;
38
+ header.id='dynheader'+sectionCounter;
39
+ button.src='closed.gif';
40
+ section.id='dynsection'+sectionCounter;
41
+ section.style.display='none';
42
+ section.style.marginLeft='14px';
43
+ sectionCounter++;
44
+ }
45
+ }
46
+ }
47
+ window.onload = initDynSections;
48
+ -->
49
+ </script>
50
+ <div class="navigation" id="top">
51
+ <div class="tabs">
52
+ <ul>
53
+ <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
54
+ <li><a href="annotated.html"><span>Classes</span></a></li>
55
+ <li class="current"><a href="files.html"><span>Files</span></a></li>
56
+ </ul>
57
+ </div>
58
+ <div class="tabs">
59
+ <ul>
60
+ <li><a href="files.html"><span>File&nbsp;List</span></a></li>
61
+ <li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
62
+ </ul>
63
+ </div>
64
+ <h1>RotFlip.hpp</h1><a href="_rot_flip_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001
65
+ <a name="l00002"></a>00002
66
+ <a name="l00003"></a>00003
67
+ <a name="l00004"></a>00004 <span class="preprocessor">#ifndef GOSU_ROTFLIP_HPP</span>
68
+ <a name="l00005"></a>00005 <span class="preprocessor"></span><span class="preprocessor">#define GOSU_ROTFLIP_HPP</span>
69
+ <a name="l00006"></a>00006 <span class="preprocessor"></span>
70
+ <a name="l00007"></a>00007 <span class="keyword">namespace </span>Gosu
71
+ <a name="l00008"></a>00008 {
72
+ <a name="l00011"></a>00011 <span class="keyword">enum</span> RotFlipName
73
+ <a name="l00012"></a>00012 {
74
+ <a name="l00013"></a>00013 rfDefault,
75
+ <a name="l00014"></a>00014 rfRotate90,
76
+ <a name="l00015"></a>00015 rfRotate180,
77
+ <a name="l00016"></a>00016 rfRotate270,
78
+ <a name="l00017"></a>00017
79
+ <a name="l00018"></a>00018 rfFlipX,
80
+ <a name="l00019"></a>00019 rfRotate90FlipX,
81
+ <a name="l00020"></a>00020 rfRotate180FlipX,
82
+ <a name="l00021"></a>00021 rfRotate270FlipX,
83
+ <a name="l00022"></a>00022
84
+ <a name="l00023"></a>00023 rfFlipY = rfRotate180FlipX,
85
+ <a name="l00024"></a>00024 rfRotate90FlipY = rfRotate270FlipX,
86
+ <a name="l00025"></a>00025 rfRotate180FlipY = rfFlipX,
87
+ <a name="l00026"></a>00026 rfRotate270FlipY = rfRotate90FlipX,
88
+ <a name="l00027"></a>00027
89
+ <a name="l00028"></a>00028 rfFlipXRotate90 = rfRotate270FlipX,
90
+ <a name="l00029"></a>00029 rfFlipXRotate180 = rfRotate180FlipX,
91
+ <a name="l00030"></a>00030 rfFlipXRotate270 = rfRotate90FlipX,
92
+ <a name="l00031"></a>00031
93
+ <a name="l00032"></a>00032 rfFlipYRotate90 = rfRotate90FlipX,
94
+ <a name="l00033"></a>00033 rfFlipYRotate180 = rfFlipX,
95
+ <a name="l00034"></a>00034 rfFlipYRotate270 = rfRotate270FlipX
96
+ <a name="l00035"></a>00035 };
97
+ <a name="l00036"></a>00036
98
+ <a name="l00043"></a><a class="code" href="class_gosu_1_1_rot_flip.html">00043</a> <span class="keyword">class </span><a class="code" href="class_gosu_1_1_rot_flip.html" title="Light-weight class that encodes a rotation by 0, 90, 180, or 270 degrees as well...">RotFlip</a>
99
+ <a name="l00044"></a>00044 {
100
+ <a name="l00045"></a>00045 RotFlipName name_;
101
+ <a name="l00046"></a>00046
102
+ <a name="l00047"></a>00047 <span class="keyword">typedef</span> RotFlipName TransTable[8];
103
+ <a name="l00048"></a>00048 <span class="keyword">static</span> <span class="keyword">const</span> TransTable flipXTable, flipYTable, rotate90Table,
104
+ <a name="l00049"></a>00049 rotate180Table, rotate270Table;
105
+ <a name="l00050"></a>00050
106
+ <a name="l00051"></a>00051 <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> CornerTable[8][4];
107
+ <a name="l00052"></a>00052 <span class="keyword">static</span> <span class="keyword">const</span> CornerTable mapCornerTable, realCornerTable;
108
+ <a name="l00053"></a>00053
109
+ <a name="l00054"></a>00054 <span class="keyword">public</span>:
110
+ <a name="l00055"></a><a class="code" href="class_gosu_1_1_rot_flip.html#5ae8685fbe53fded5c71c2d3dbecc36e">00055</a> <a class="code" href="class_gosu_1_1_rot_flip.html#5ae8685fbe53fded5c71c2d3dbecc36e">RotFlip</a>(RotFlipName <a class="code" href="class_gosu_1_1_rot_flip.html#3129da4cddf7ae6d87b5234747f048b7">name</a> = rfDefault)
111
+ <a name="l00056"></a>00056 : name_(<a class="code" href="class_gosu_1_1_rot_flip.html#3129da4cddf7ae6d87b5234747f048b7">name</a>)
112
+ <a name="l00057"></a>00057 {
113
+ <a name="l00058"></a>00058 }
114
+ <a name="l00059"></a>00059
115
+ <a name="l00060"></a><a class="code" href="class_gosu_1_1_rot_flip.html#3129da4cddf7ae6d87b5234747f048b7">00060</a> RotFlipName <a class="code" href="class_gosu_1_1_rot_flip.html#3129da4cddf7ae6d87b5234747f048b7">name</a>()<span class="keyword"> const</span>
116
+ <a name="l00061"></a>00061 <span class="keyword"> </span>{
117
+ <a name="l00062"></a>00062 <span class="keywordflow">return</span> name_;
118
+ <a name="l00063"></a>00063 }
119
+ <a name="l00064"></a>00064
120
+ <a name="l00065"></a><a class="code" href="class_gosu_1_1_rot_flip.html#a5fd7bae1d53c7463583cb09cc57ad67">00065</a> <span class="keywordtype">void</span> <a class="code" href="class_gosu_1_1_rot_flip.html#a5fd7bae1d53c7463583cb09cc57ad67">flipX</a>()
121
+ <a name="l00066"></a>00066 {
122
+ <a name="l00067"></a>00067 name_ = flipXTable[name_];
123
+ <a name="l00068"></a>00068 }
124
+ <a name="l00069"></a>00069
125
+ <a name="l00070"></a><a class="code" href="class_gosu_1_1_rot_flip.html#c3dbcf4ab91b10c87486a4d163d34ad8">00070</a> <span class="keywordtype">void</span> <a class="code" href="class_gosu_1_1_rot_flip.html#c3dbcf4ab91b10c87486a4d163d34ad8">flipY</a>()
126
+ <a name="l00071"></a>00071 {
127
+ <a name="l00072"></a>00072 name_ = flipYTable[name_];
128
+ <a name="l00073"></a>00073 }
129
+ <a name="l00074"></a>00074
130
+ <a name="l00075"></a><a class="code" href="class_gosu_1_1_rot_flip.html#df6ceab061cbc04acea46f081a0bd100">00075</a> <span class="keywordtype">void</span> <a class="code" href="class_gosu_1_1_rot_flip.html#df6ceab061cbc04acea46f081a0bd100">rotate90</a>()
131
+ <a name="l00076"></a>00076 {
132
+ <a name="l00077"></a>00077 name_ = rotate90Table[name_];
133
+ <a name="l00078"></a>00078 }
134
+ <a name="l00079"></a>00079
135
+ <a name="l00080"></a><a class="code" href="class_gosu_1_1_rot_flip.html#3772988db6083987d5ce694426ff56b8">00080</a> <span class="keywordtype">void</span> <a class="code" href="class_gosu_1_1_rot_flip.html#3772988db6083987d5ce694426ff56b8">rotate180</a>()
136
+ <a name="l00081"></a>00081 {
137
+ <a name="l00082"></a>00082 name_ = rotate180Table[name_];
138
+ <a name="l00083"></a>00083 }
139
+ <a name="l00084"></a>00084
140
+ <a name="l00085"></a><a class="code" href="class_gosu_1_1_rot_flip.html#3d6f66fcdf9596b77e425af5b2114d9d">00085</a> <span class="keywordtype">void</span> <a class="code" href="class_gosu_1_1_rot_flip.html#3d6f66fcdf9596b77e425af5b2114d9d">rotate270</a>()
141
+ <a name="l00086"></a>00086 {
142
+ <a name="l00087"></a>00087 name_ = rotate270Table[name_];
143
+ <a name="l00088"></a>00088 }
144
+ <a name="l00089"></a>00089
145
+ <a name="l00090"></a><a class="code" href="class_gosu_1_1_rot_flip.html#f3ba518395cf6e27293e1c16b83d3498">00090</a> <span class="keywordtype">bool</span> <a class="code" href="class_gosu_1_1_rot_flip.html#f3ba518395cf6e27293e1c16b83d3498">flipped</a>()<span class="keyword"> const</span>
146
+ <a name="l00091"></a>00091 <span class="keyword"> </span>{
147
+ <a name="l00092"></a>00092 <span class="keywordflow">return</span> name_ &gt;= rfFlipX;
148
+ <a name="l00093"></a>00093 }
149
+ <a name="l00094"></a>00094
150
+ <a name="l00095"></a><a class="code" href="class_gosu_1_1_rot_flip.html#49d19e886fba21e75fc643977ce0535c">00095</a> <span class="keywordtype">bool</span> <a class="code" href="class_gosu_1_1_rot_flip.html#49d19e886fba21e75fc643977ce0535c">rotated</a>()<span class="keyword"> const</span>
151
+ <a name="l00096"></a>00096 <span class="keyword"> </span>{
152
+ <a name="l00097"></a>00097 <span class="keywordflow">return</span> name_ % 2 == 1;
153
+ <a name="l00098"></a>00098 }
154
+ <a name="l00099"></a>00099
155
+ <a name="l00100"></a><a class="code" href="class_gosu_1_1_rot_flip.html#298667fafd03f96271a36defe8550798">00100</a> <span class="keywordtype">unsigned</span> <a class="code" href="class_gosu_1_1_rot_flip.html#298667fafd03f96271a36defe8550798">mapCorner</a>(<span class="keywordtype">unsigned</span> n)<span class="keyword"> const</span>
156
+ <a name="l00101"></a>00101 <span class="keyword"> </span>{
157
+ <a name="l00102"></a>00102 <span class="keywordflow">return</span> mapCornerTable[name_][n];
158
+ <a name="l00103"></a>00103 }
159
+ <a name="l00104"></a>00104
160
+ <a name="l00105"></a><a class="code" href="class_gosu_1_1_rot_flip.html#d236117a2fcff3a31eb36f71bc254612">00105</a> <span class="keywordtype">unsigned</span> <a class="code" href="class_gosu_1_1_rot_flip.html#d236117a2fcff3a31eb36f71bc254612">realCorner</a>(<span class="keywordtype">unsigned</span> n)<span class="keyword"> const</span>
161
+ <a name="l00106"></a>00106 <span class="keyword"> </span>{
162
+ <a name="l00107"></a>00107 <span class="keywordflow">return</span> realCornerTable[name_][n];
163
+ <a name="l00108"></a>00108 }
164
+ <a name="l00109"></a>00109 };
165
+ <a name="l00110"></a>00110
166
+ <a name="l00111"></a>00111 <span class="keyword">inline</span> <span class="keywordtype">bool</span> operator==(RotFlip a, RotFlip b)
167
+ <a name="l00112"></a>00112 {
168
+ <a name="l00113"></a>00113 <span class="keywordflow">return</span> a.name() == b.name();
169
+ <a name="l00114"></a>00114 }
170
+ <a name="l00115"></a>00115
171
+ <a name="l00116"></a>00116 <span class="keyword">inline</span> <span class="keywordtype">bool</span> operator!=(RotFlip a, RotFlip b)
172
+ <a name="l00117"></a>00117 {
173
+ <a name="l00118"></a>00118 <span class="keywordflow">return</span> a.name() != b.name();
174
+ <a name="l00119"></a>00119 }
175
+ <a name="l00120"></a>00120
176
+ <a name="l00122"></a>00122 <span class="keywordtype">void</span> applyToPoint(RotFlip rotFlip, <span class="keywordtype">int</span>&amp; x, <span class="keywordtype">int</span>&amp; y, <span class="keywordtype">int</span> max);
177
+ <a name="l00123"></a>00123 }
178
+ <a name="l00124"></a>00124
179
+ <a name="l00125"></a>00125 <span class="preprocessor">#endif</span>
180
+ </pre></div></div>
181
+ <p class="footer">Documentation not clear enough? Please go to one of the places listed on <a href="http://www.libgosu.org/">http://www.libgosu.org/</a> and leave feedback. Thanks!</p>
182
+ </div>
183
+ </body>
184
+ </html>