gosu 0.7.19 → 0.7.20
Sign up to get free protection for your applications and to get access to all the features.
- data/Gosu/Input.hpp +12 -8
- data/Gosu/Math.hpp +13 -0
- data/Gosu/TextInput.hpp +5 -0
- data/Gosu/Version.hpp +2 -2
- data/GosuImpl/Graphics/TextUnix.cpp +253 -0
- data/GosuImpl/InputMac.mm +4 -4
- data/GosuImpl/InputWin.cpp +4 -4
- data/GosuImpl/InputX.cpp +15 -15
- data/GosuImpl/Math.cpp +28 -4
- data/GosuImpl/RubyGosu.swg +14 -3
- data/GosuImpl/RubyGosuStub.mm +8 -15
- data/GosuImpl/RubyGosu_wrap.cxx +113 -6
- data/GosuImpl/TextInputMac.mm +10 -1
- data/GosuImpl/TextInputWin.cpp +10 -0
- data/GosuImpl/TextInputX.cpp +10 -0
- data/GosuImpl/WindowMac.mm +15 -4
- data/GosuImpl/WindowWin.cpp +16 -7
- data/examples/TextInput.rb +15 -0
- data/lib/gosu.rb +5 -8
- data/linux/extconf.rb +34 -9
- metadata +13 -272
- data/GosuImpl/Graphics/TextPangoFT.cpp +0 -186
- data/Rakefile +0 -314
- data/examples/TextInput.cpp +0 -192
- data/examples/Tutorial.cpp +0 -215
- data/linux/Makefile.in +0 -99
- data/linux/configure +0 -5850
- data/linux/configure.ac +0 -110
- data/reference/cpp/_audio_8hpp-source.html +0 -178
- data/reference/cpp/_audio_8hpp.html +0 -100
- data/reference/cpp/_audio_8hpp_source.html +0 -170
- data/reference/cpp/_auto_link_8hpp-source.html +0 -85
- data/reference/cpp/_auto_link_8hpp.html +0 -84
- data/reference/cpp/_auto_link_8hpp_source.html +0 -85
- data/reference/cpp/_bitmap_8hpp-source.html +0 -131
- data/reference/cpp/_bitmap_8hpp.html +0 -114
- data/reference/cpp/_bitmap_8hpp_source.html +0 -131
- data/reference/cpp/_buttons_mac_8hpp-source.html +0 -206
- data/reference/cpp/_buttons_mac_8hpp.html +0 -240
- data/reference/cpp/_buttons_mac_8hpp_source.html +0 -206
- data/reference/cpp/_color_8hpp-source.html +0 -216
- data/reference/cpp/_color_8hpp.html +0 -130
- data/reference/cpp/_color_8hpp_source.html +0 -232
- data/reference/cpp/_directories_8hpp-source.html +0 -89
- data/reference/cpp/_directories_8hpp.html +0 -103
- data/reference/cpp/_directories_8hpp_source.html +0 -89
- data/reference/cpp/_font_8hpp-source.html +0 -116
- data/reference/cpp/_font_8hpp.html +0 -94
- data/reference/cpp/_font_8hpp_source.html +0 -116
- data/reference/cpp/_fwd_8hpp-source.html +0 -99
- data/reference/cpp/_fwd_8hpp.html +0 -90
- data/reference/cpp/_fwd_8hpp_source.html +0 -99
- data/reference/cpp/_gosu_8hpp-source.html +0 -97
- data/reference/cpp/_gosu_8hpp.html +0 -84
- data/reference/cpp/_gosu_8hpp_source.html +0 -97
- data/reference/cpp/_graphics_8hpp-source.html +0 -135
- data/reference/cpp/_graphics_8hpp.html +0 -101
- data/reference/cpp/_graphics_8hpp_source.html +0 -144
- data/reference/cpp/_graphics_base_8hpp-source.html +0 -116
- data/reference/cpp/_graphics_base_8hpp.html +0 -128
- data/reference/cpp/_graphics_base_8hpp_source.html +0 -117
- data/reference/cpp/_i_o_8hpp-source.html +0 -302
- data/reference/cpp/_i_o_8hpp.html +0 -129
- data/reference/cpp/_i_o_8hpp_source.html +0 -295
- data/reference/cpp/_image_8hpp-source.html +0 -173
- data/reference/cpp/_image_8hpp.html +0 -103
- data/reference/cpp/_image_8hpp_source.html +0 -176
- data/reference/cpp/_image_data_8hpp-source.html +0 -109
- data/reference/cpp/_image_data_8hpp.html +0 -97
- data/reference/cpp/_image_data_8hpp_source.html +0 -109
- data/reference/cpp/_input_8hpp-source.html +0 -183
- data/reference/cpp/_input_8hpp.html +0 -109
- data/reference/cpp/_input_8hpp_source.html +0 -183
- data/reference/cpp/_math_8hpp-source.html +0 -157
- data/reference/cpp/_math_8hpp.html +0 -152
- data/reference/cpp/_math_8hpp_source.html +0 -157
- data/reference/cpp/_platform_8hpp-source.html +0 -134
- data/reference/cpp/_platform_8hpp.html +0 -162
- data/reference/cpp/_platform_8hpp_source.html +0 -134
- data/reference/cpp/_rot_flip_8hpp-source.html +0 -185
- data/reference/cpp/_rot_flip_8hpp.html +0 -130
- data/reference/cpp/_rot_flip_8hpp_source.html +0 -185
- data/reference/cpp/_sockets_8hpp-source.html +0 -175
- data/reference/cpp/_sockets_8hpp.html +0 -124
- data/reference/cpp/_sockets_8hpp_source.html +0 -175
- data/reference/cpp/_text_8hpp-source.html +0 -103
- data/reference/cpp/_text_8hpp.html +0 -106
- data/reference/cpp/_text_8hpp_source.html +0 -103
- data/reference/cpp/_text_input_8hpp-source.html +0 -111
- data/reference/cpp/_text_input_8hpp.html +0 -94
- data/reference/cpp/_text_input_8hpp_source.html +0 -116
- data/reference/cpp/_timing_8hpp-source.html +0 -83
- data/reference/cpp/_timing_8hpp.html +0 -97
- data/reference/cpp/_timing_8hpp_source.html +0 -83
- data/reference/cpp/_utility_8hpp-source.html +0 -90
- data/reference/cpp/_utility_8hpp.html +0 -103
- data/reference/cpp/_utility_8hpp_source.html +0 -90
- data/reference/cpp/_version_8hpp-source.html +0 -78
- data/reference/cpp/_version_8hpp.html +0 -154
- data/reference/cpp/_version_8hpp_source.html +0 -78
- data/reference/cpp/_win_utility_8hpp-source.html +0 -126
- data/reference/cpp/_win_utility_8hpp.html +0 -128
- data/reference/cpp/_win_utility_8hpp_source.html +0 -126
- data/reference/cpp/_window_8hpp-source.html +0 -158
- data/reference/cpp/_window_8hpp.html +0 -94
- data/reference/cpp/_window_8hpp_source.html +0 -159
- data/reference/cpp/annotated.html +0 -98
- data/reference/cpp/class_gosu_1_1_audio-members.html +0 -76
- data/reference/cpp/class_gosu_1_1_audio.html +0 -155
- data/reference/cpp/class_gosu_1_1_bitmap-members.html +0 -86
- data/reference/cpp/class_gosu_1_1_bitmap.html +0 -506
- data/reference/cpp/class_gosu_1_1_buffer-members.html +0 -85
- data/reference/cpp/class_gosu_1_1_buffer.html +0 -341
- data/reference/cpp/class_gosu_1_1_buffer.png +0 -0
- data/reference/cpp/class_gosu_1_1_button-members.html +0 -77
- data/reference/cpp/class_gosu_1_1_button.html +0 -198
- data/reference/cpp/class_gosu_1_1_color-members.html +0 -108
- data/reference/cpp/class_gosu_1_1_color.html +0 -972
- data/reference/cpp/class_gosu_1_1_comm_socket-members.html +0 -91
- data/reference/cpp/class_gosu_1_1_comm_socket.html +0 -506
- data/reference/cpp/class_gosu_1_1_file-members.html +0 -82
- data/reference/cpp/class_gosu_1_1_file.html +0 -276
- data/reference/cpp/class_gosu_1_1_file.png +0 -0
- data/reference/cpp/class_gosu_1_1_font-members.html +0 -82
- data/reference/cpp/class_gosu_1_1_font.html +0 -506
- data/reference/cpp/class_gosu_1_1_graphics-members.html +0 -93
- data/reference/cpp/class_gosu_1_1_graphics.html +0 -817
- data/reference/cpp/class_gosu_1_1_image-members.html +0 -87
- data/reference/cpp/class_gosu_1_1_image.html +0 -797
- data/reference/cpp/class_gosu_1_1_image_data-members.html +0 -78
- data/reference/cpp/class_gosu_1_1_image_data.html +0 -282
- data/reference/cpp/class_gosu_1_1_input-members.html +0 -86
- data/reference/cpp/class_gosu_1_1_input.html +0 -418
- data/reference/cpp/class_gosu_1_1_listener_socket-members.html +0 -79
- data/reference/cpp/class_gosu_1_1_listener_socket.html +0 -222
- data/reference/cpp/class_gosu_1_1_message_socket-members.html +0 -81
- data/reference/cpp/class_gosu_1_1_message_socket.html +0 -306
- data/reference/cpp/class_gosu_1_1_reader-members.html +0 -81
- data/reference/cpp/class_gosu_1_1_reader.html +0 -323
- data/reference/cpp/class_gosu_1_1_resource-members.html +0 -80
- data/reference/cpp/class_gosu_1_1_resource.html +0 -306
- data/reference/cpp/class_gosu_1_1_resource.png +0 -0
- data/reference/cpp/class_gosu_1_1_rot_flip-members.html +0 -84
- data/reference/cpp/class_gosu_1_1_rot_flip.html +0 -352
- data/reference/cpp/class_gosu_1_1_sample-members.html +0 -80
- data/reference/cpp/class_gosu_1_1_sample.html +0 -324
- data/reference/cpp/class_gosu_1_1_sample_instance-members.html +0 -82
- data/reference/cpp/class_gosu_1_1_sample_instance.html +0 -318
- data/reference/cpp/class_gosu_1_1_song-members.html +0 -90
- data/reference/cpp/class_gosu_1_1_song.html +0 -493
- data/reference/cpp/class_gosu_1_1_text_input-members.html +0 -80
- data/reference/cpp/class_gosu_1_1_text_input.html +0 -255
- data/reference/cpp/class_gosu_1_1_window-members.html +0 -91
- data/reference/cpp/class_gosu_1_1_window.html +0 -534
- data/reference/cpp/class_gosu_1_1_writer-members.html +0 -80
- data/reference/cpp/class_gosu_1_1_writer.html +0 -293
- data/reference/cpp/classes.html +0 -86
- data/reference/cpp/closed.gif +0 -0
- data/reference/cpp/cpp.css +0 -155
- data/reference/cpp/doxygen.png +0 -0
- data/reference/cpp/files.html +0 -99
- data/reference/cpp/functions.html +0 -128
- data/reference/cpp/functions_0x62.html +0 -144
- data/reference/cpp/functions_0x63.html +0 -143
- data/reference/cpp/functions_0x64.html +0 -143
- data/reference/cpp/functions_0x65.html +0 -122
- data/reference/cpp/functions_0x66.html +0 -144
- data/reference/cpp/functions_0x67.html +0 -136
- data/reference/cpp/functions_0x68.html +0 -122
- data/reference/cpp/functions_0x69.html +0 -124
- data/reference/cpp/functions_0x6b.html +0 -116
- data/reference/cpp/functions_0x6c.html +0 -118
- data/reference/cpp/functions_0x6d.html +0 -126
- data/reference/cpp/functions_0x6e.html +0 -121
- data/reference/cpp/functions_0x6f.html +0 -127
- data/reference/cpp/functions_0x70.html +0 -137
- data/reference/cpp/functions_0x72.html +0 -157
- data/reference/cpp/functions_0x73.html +0 -180
- data/reference/cpp/functions_0x74.html +0 -128
- data/reference/cpp/functions_0x75.html +0 -123
- data/reference/cpp/functions_0x76.html +0 -118
- data/reference/cpp/functions_0x77.html +0 -132
- data/reference/cpp/functions_0x78.html +0 -116
- data/reference/cpp/functions_0x79.html +0 -118
- data/reference/cpp/functions_0x7e.html +0 -142
- data/reference/cpp/functions_enum.html +0 -88
- data/reference/cpp/functions_eval.html +0 -90
- data/reference/cpp/functions_func.html +0 -124
- data/reference/cpp/functions_func_0x62.html +0 -136
- data/reference/cpp/functions_func_0x63.html +0 -137
- data/reference/cpp/functions_func_0x64.html +0 -141
- data/reference/cpp/functions_func_0x65.html +0 -120
- data/reference/cpp/functions_func_0x66.html +0 -140
- data/reference/cpp/functions_func_0x67.html +0 -130
- data/reference/cpp/functions_func_0x68.html +0 -120
- data/reference/cpp/functions_func_0x69.html +0 -120
- data/reference/cpp/functions_func_0x6b.html +0 -114
- data/reference/cpp/functions_func_0x6c.html +0 -114
- data/reference/cpp/functions_func_0x6d.html +0 -124
- data/reference/cpp/functions_func_0x6e.html +0 -117
- data/reference/cpp/functions_func_0x6f.html +0 -114
- data/reference/cpp/functions_func_0x70.html +0 -135
- data/reference/cpp/functions_func_0x72.html +0 -151
- data/reference/cpp/functions_func_0x73.html +0 -174
- data/reference/cpp/functions_func_0x74.html +0 -120
- data/reference/cpp/functions_func_0x75.html +0 -121
- data/reference/cpp/functions_func_0x76.html +0 -116
- data/reference/cpp/functions_func_0x77.html +0 -128
- data/reference/cpp/functions_func_0x7e.html +0 -140
- data/reference/cpp/functions_type.html +0 -88
- data/reference/cpp/functions_vars.html +0 -135
- data/reference/cpp/globals.html +0 -95
- data/reference/cpp/globals_defs.html +0 -95
- data/reference/cpp/hierarchy.html +0 -100
- data/reference/cpp/index.html +0 -67
- data/reference/cpp/namespace_gosu.html +0 -3311
- data/reference/cpp/namespace_gosu_1_1_colors.html +0 -287
- data/reference/cpp/namespace_gosu_1_1_win.html +0 -354
- data/reference/cpp/namespacemembers.html +0 -139
- data/reference/cpp/namespacemembers_0x62.html +0 -143
- data/reference/cpp/namespacemembers_0x63.html +0 -125
- data/reference/cpp/namespacemembers_0x64.html +0 -121
- data/reference/cpp/namespacemembers_0x66.html +0 -129
- data/reference/cpp/namespacemembers_0x67.html +0 -163
- data/reference/cpp/namespacemembers_0x68.html +0 -113
- data/reference/cpp/namespacemembers_0x69.html +0 -117
- data/reference/cpp/namespacemembers_0x6b.html +0 -289
- data/reference/cpp/namespacemembers_0x6c.html +0 -119
- data/reference/cpp/namespacemembers_0x6d.html +0 -131
- data/reference/cpp/namespacemembers_0x6e.html +0 -127
- data/reference/cpp/namespacemembers_0x6f.html +0 -121
- data/reference/cpp/namespacemembers_0x70.html +0 -115
- data/reference/cpp/namespacemembers_0x71.html +0 -113
- data/reference/cpp/namespacemembers_0x72.html +0 -165
- data/reference/cpp/namespacemembers_0x73.html +0 -135
- data/reference/cpp/namespacemembers_0x74.html +0 -129
- data/reference/cpp/namespacemembers_0x75.html +0 -117
- data/reference/cpp/namespacemembers_0x77.html +0 -117
- data/reference/cpp/namespacemembers_0x79.html +0 -113
- data/reference/cpp/namespacemembers_0x7a.html +0 -115
- data/reference/cpp/namespacemembers_enum.html +0 -103
- data/reference/cpp/namespacemembers_eval.html +0 -445
- data/reference/cpp/namespacemembers_func.html +0 -269
- data/reference/cpp/namespacemembers_type.html +0 -93
- data/reference/cpp/namespacemembers_vars.html +0 -117
- data/reference/cpp/namespaces.html +0 -76
- data/reference/cpp/open.gif +0 -0
- data/reference/cpp/struct_gosu_1_1_g_l_tex_info-members.html +0 -78
- data/reference/cpp/struct_gosu_1_1_g_l_tex_info.html +0 -186
- data/reference/cpp/struct_gosu_1_1_touch-members.html +0 -76
- data/reference/cpp/struct_gosu_1_1_touch.html +0 -154
- data/reference/cpp/tab_b.gif +0 -0
- data/reference/cpp/tab_l.gif +0 -0
- data/reference/cpp/tab_r.gif +0 -0
- data/reference/cpp/tabs.css +0 -105
- data/reference/rdoc/classes/Gosu.html +0 -1546
- data/reference/rdoc/classes/Gosu/Color.html +0 -660
- data/reference/rdoc/classes/Gosu/Font.html +0 -545
- data/reference/rdoc/classes/Gosu/GLTexInfo.html +0 -412
- data/reference/rdoc/classes/Gosu/Image.html +0 -706
- data/reference/rdoc/classes/Gosu/Sample.html +0 -476
- data/reference/rdoc/classes/Gosu/SampleInstance.html +0 -523
- data/reference/rdoc/classes/Gosu/Song.html +0 -568
- data/reference/rdoc/classes/Gosu/TextInput.html +0 -444
- data/reference/rdoc/classes/Gosu/Window.html +0 -911
- data/reference/rdoc/classes/Numeric.html +0 -479
- data/reference/rdoc/created.rid +0 -1
- data/reference/rdoc/files/COPYING_txt.html +0 -391
- data/reference/rdoc/files/README_txt.html +0 -387
- data/reference/rdoc/files/reference/Deployment on OS X_rdoc.html +0 -381
- data/reference/rdoc/files/reference/Deployment on Windows_rdoc.html +0 -385
- data/reference/rdoc/files/reference/Drawing with Colors_rdoc.html +0 -363
- data/reference/rdoc/files/reference/Order of Corners_rdoc.html +0 -358
- data/reference/rdoc/files/reference/Tileability_rdoc.html +0 -374
- data/reference/rdoc/files/reference/Z Ordering_rdoc.html +0 -361
- data/reference/rdoc/files/reference/gosu_rb.html +0 -348
- data/reference/rdoc/fr_class_index.html +0 -12
- data/reference/rdoc/fr_file_index.html +0 -10
- data/reference/rdoc/fr_method_index.html +0 -66
- data/reference/rdoc/index.html +0 -1
- data/reference/rdoc/rdoc-style.css +0 -320
@@ -1,295 +0,0 @@
|
|
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.9 -->
|
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 Page</span></a></li>
|
54
|
-
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
|
55
|
-
<li><a href="annotated.html"><span>Classes</span></a></li>
|
56
|
-
<li class="current"><a href="files.html"><span>Files</span></a></li>
|
57
|
-
</ul>
|
58
|
-
</div>
|
59
|
-
<div class="tabs">
|
60
|
-
<ul>
|
61
|
-
<li><a href="files.html"><span>File List</span></a></li>
|
62
|
-
<li><a href="globals.html"><span>File Members</span></a></li>
|
63
|
-
</ul>
|
64
|
-
</div>
|
65
|
-
<h1>IO.hpp</h1><a href="_i_o_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001
|
66
|
-
<a name="l00002"></a>00002
|
67
|
-
<a name="l00003"></a>00003
|
68
|
-
<a name="l00004"></a>00004 <span class="preprocessor">#ifndef GOSU_IO_HPP</span>
|
69
|
-
<a name="l00005"></a>00005 <span class="preprocessor"></span><span class="preprocessor">#define GOSU_IO_HPP</span>
|
70
|
-
<a name="l00006"></a>00006 <span class="preprocessor"></span>
|
71
|
-
<a name="l00007"></a>00007 <span class="preprocessor">#include <boost/utility.hpp></span>
|
72
|
-
<a name="l00008"></a>00008 <span class="preprocessor">#include <boost/scoped_ptr.hpp></span>
|
73
|
-
<a name="l00009"></a>00009 <span class="preprocessor">#include <cstddef></span>
|
74
|
-
<a name="l00010"></a>00010 <span class="preprocessor">#include <algorithm></span>
|
75
|
-
<a name="l00011"></a>00011 <span class="preprocessor">#include <string></span>
|
76
|
-
<a name="l00012"></a>00012 <span class="preprocessor">#include <vector></span>
|
77
|
-
<a name="l00013"></a>00013
|
78
|
-
<a name="l00014"></a>00014 <span class="keyword">namespace </span>Gosu
|
79
|
-
<a name="l00015"></a>00015 {
|
80
|
-
<a name="l00016"></a>00016 <span class="keyword">class </span>Resource;
|
81
|
-
<a name="l00017"></a>00017
|
82
|
-
<a name="l00018"></a><a class="code" href="namespace_gosu.html#d32d35b8da950cd315c2c655157be3a2">00018</a> <span class="keyword">enum</span> <a class="code" href="namespace_gosu.html#d32d35b8da950cd315c2c655157be3a2">ByteOrder</a> { <a class="code" href="namespace_gosu.html#d32d35b8da950cd315c2c655157be3a2e274c3b860599302ccf25c247563164c">boLittle</a>, <a class="code" href="namespace_gosu.html#d32d35b8da950cd315c2c655157be3a2b038141b257900dec2f333913fa9f0a7">boBig</a>, <a class="code" href="namespace_gosu.html#d32d35b8da950cd315c2c655157be3a23483576fdb08d93803091738978be3f8">boDontCare</a> };
|
83
|
-
<a name="l00019"></a>00019 <span class="preprocessor">#ifdef __BIG_ENDIAN__</span>
|
84
|
-
<a name="l00020"></a>00020 <span class="preprocessor"></span> <span class="keyword">const</span> <a class="code" href="namespace_gosu.html#d32d35b8da950cd315c2c655157be3a2">ByteOrder</a> <a class="code" href="namespace_gosu.html#ead4502f3e95077f5e128d1ff6bae819">nativeByteOrder</a> = <a class="code" href="namespace_gosu.html#d32d35b8da950cd315c2c655157be3a2b038141b257900dec2f333913fa9f0a7">boBig</a>, <a class="code" href="namespace_gosu.html#b1ccccbaef42335e16689c5fc2f1f936">otherByteOrder</a> = <a class="code" href="namespace_gosu.html#d32d35b8da950cd315c2c655157be3a2e274c3b860599302ccf25c247563164c">boLittle</a>;
|
85
|
-
<a name="l00021"></a>00021 <span class="preprocessor">#else</span>
|
86
|
-
<a name="l00022"></a><a class="code" href="namespace_gosu.html#b1ccccbaef42335e16689c5fc2f1f936">00022</a> <span class="preprocessor"></span> <span class="keyword">const</span> <a class="code" href="namespace_gosu.html#d32d35b8da950cd315c2c655157be3a2">ByteOrder</a> <a class="code" href="namespace_gosu.html#ead4502f3e95077f5e128d1ff6bae819">nativeByteOrder</a> = <a class="code" href="namespace_gosu.html#d32d35b8da950cd315c2c655157be3a2e274c3b860599302ccf25c247563164c">boLittle</a>, <a class="code" href="namespace_gosu.html#b1ccccbaef42335e16689c5fc2f1f936">otherByteOrder</a> = <a class="code" href="namespace_gosu.html#d32d35b8da950cd315c2c655157be3a2b038141b257900dec2f333913fa9f0a7">boBig</a>;
|
87
|
-
<a name="l00023"></a>00023 <span class="preprocessor">#endif</span>
|
88
|
-
<a name="l00024"></a>00024 <span class="preprocessor"></span>
|
89
|
-
<a name="l00027"></a><a class="code" href="class_gosu_1_1_reader.html">00027</a> <span class="keyword">class </span><a class="code" href="class_gosu_1_1_reader.html" title="Utility class that points to a specific position in a resource and offers an interface...">Reader</a>
|
90
|
-
<a name="l00028"></a>00028 {
|
91
|
-
<a name="l00029"></a>00029 <span class="keyword">const</span> <a class="code" href="class_gosu_1_1_resource.html" title="Base class for resources.">Resource</a>* res;
|
92
|
-
<a name="l00030"></a>00030 std::size_t pos;
|
93
|
-
<a name="l00031"></a>00031
|
94
|
-
<a name="l00032"></a>00032 <span class="keyword">public</span>:
|
95
|
-
<a name="l00033"></a><a class="code" href="class_gosu_1_1_reader.html#96b3be456f50c735a10cc78968b9a851">00033</a> <a class="code" href="class_gosu_1_1_reader.html#96b3be456f50c735a10cc78968b9a851">Reader</a>(<span class="keyword">const</span> <a class="code" href="class_gosu_1_1_resource.html" title="Base class for resources.">Resource</a>& <a class="code" href="class_gosu_1_1_reader.html#d06f3f9a4e718330dff39b439b921f30">resource</a>, std::size_t <a class="code" href="class_gosu_1_1_reader.html#1a15e9410f81a7e36e99eb0ad4c268ed">position</a>)
|
96
|
-
<a name="l00034"></a>00034 : res(&resource), pos(position)
|
97
|
-
<a name="l00035"></a>00035 {
|
98
|
-
<a name="l00036"></a>00036 }
|
99
|
-
<a name="l00037"></a>00037
|
100
|
-
<a name="l00038"></a><a class="code" href="class_gosu_1_1_reader.html#d06f3f9a4e718330dff39b439b921f30">00038</a> <span class="keyword">const</span> <a class="code" href="class_gosu_1_1_resource.html" title="Base class for resources.">Resource</a>& <a class="code" href="class_gosu_1_1_reader.html#d06f3f9a4e718330dff39b439b921f30">resource</a>()<span class="keyword"> const</span>
|
101
|
-
<a name="l00039"></a>00039 <span class="keyword"> </span>{
|
102
|
-
<a name="l00040"></a>00040 <span class="keywordflow">return</span> *res;
|
103
|
-
<a name="l00041"></a>00041 }
|
104
|
-
<a name="l00042"></a>00042
|
105
|
-
<a name="l00043"></a><a class="code" href="class_gosu_1_1_reader.html#1a15e9410f81a7e36e99eb0ad4c268ed">00043</a> std::size_t <a class="code" href="class_gosu_1_1_reader.html#1a15e9410f81a7e36e99eb0ad4c268ed">position</a>()<span class="keyword"> const</span>
|
106
|
-
<a name="l00044"></a>00044 <span class="keyword"> </span>{
|
107
|
-
<a name="l00045"></a>00045 <span class="keywordflow">return</span> pos;
|
108
|
-
<a name="l00046"></a>00046 }
|
109
|
-
<a name="l00047"></a>00047
|
110
|
-
<a name="l00048"></a><a class="code" href="class_gosu_1_1_reader.html#7b61e4f58eb67d256911cff6331ce549">00048</a> <span class="keywordtype">void</span> <a class="code" href="class_gosu_1_1_reader.html#7b61e4f58eb67d256911cff6331ce549">setPosition</a>(std::size_t value)
|
111
|
-
<a name="l00049"></a>00049 {
|
112
|
-
<a name="l00050"></a>00050 <span class="comment">// TODO: Check?</span>
|
113
|
-
<a name="l00051"></a>00051 pos = value;
|
114
|
-
<a name="l00052"></a>00052 }
|
115
|
-
<a name="l00053"></a>00053
|
116
|
-
<a name="l00054"></a><a class="code" href="class_gosu_1_1_reader.html#626110bc1d3d03395a8b0f87b7f0dfd4">00054</a> <span class="keywordtype">void</span> <a class="code" href="class_gosu_1_1_reader.html#626110bc1d3d03395a8b0f87b7f0dfd4">seek</a>(std::ptrdiff_t offset)
|
117
|
-
<a name="l00055"></a>00055 {
|
118
|
-
<a name="l00056"></a>00056 <span class="comment">// TODO: Check?</span>
|
119
|
-
<a name="l00057"></a>00057 pos += offset;
|
120
|
-
<a name="l00058"></a>00058 }
|
121
|
-
<a name="l00059"></a>00059
|
122
|
-
<a name="l00060"></a>00060 <span class="keywordtype">void</span> <a class="code" href="class_gosu_1_1_reader.html#697471a1da53c944f2fc1c930ee14bd2">read</a>(<span class="keywordtype">void</span>* destBuffer, std::size_t length);
|
123
|
-
<a name="l00061"></a>00061
|
124
|
-
<a name="l00063"></a>00063 <span class="keyword">template</span><<span class="keyword">typename</span> T>
|
125
|
-
<a name="l00064"></a><a class="code" href="class_gosu_1_1_reader.html#1f7467d679eb354f4a075139b66bfe9d">00064</a> <span class="keywordtype">void</span> <a class="code" href="class_gosu_1_1_reader.html#1f7467d679eb354f4a075139b66bfe9d" title="Convenience function; equivalent to read(&amp;t, sizeof t).">readPod</a>(T& t, <a class="code" href="namespace_gosu.html#d32d35b8da950cd315c2c655157be3a2">ByteOrder</a> bo = <a class="code" href="namespace_gosu.html#d32d35b8da950cd315c2c655157be3a23483576fdb08d93803091738978be3f8">boDontCare</a>)
|
126
|
-
<a name="l00065"></a>00065 {
|
127
|
-
<a name="l00066"></a>00066 <a class="code" href="class_gosu_1_1_reader.html#697471a1da53c944f2fc1c930ee14bd2">read</a>(&t, <span class="keyword">sizeof</span> t);
|
128
|
-
<a name="l00067"></a>00067 <span class="keywordflow">if</span> (bo == <a class="code" href="namespace_gosu.html#b1ccccbaef42335e16689c5fc2f1f936">otherByteOrder</a>)
|
129
|
-
<a name="l00068"></a>00068 {
|
130
|
-
<a name="l00069"></a>00069 <span class="keywordtype">char</span>* begin = <span class="keyword">reinterpret_cast<</span><span class="keywordtype">char</span>*<span class="keyword">></span>(&t);
|
131
|
-
<a name="l00070"></a>00070 std::reverse(begin, begin + <span class="keyword">sizeof</span> t);
|
132
|
-
<a name="l00071"></a>00071 }
|
133
|
-
<a name="l00072"></a>00072 }
|
134
|
-
<a name="l00073"></a>00073
|
135
|
-
<a name="l00075"></a>00075 <span class="keyword">template</span><<span class="keyword">typename</span> T>
|
136
|
-
<a name="l00076"></a><a class="code" href="class_gosu_1_1_reader.html#c6ce6d38790ccd1123568eb17869d85b">00076</a> T <a class="code" href="class_gosu_1_1_reader.html#c6ce6d38790ccd1123568eb17869d85b" title="Similar to readPod(T&amp;), but returns the read value instead.">getPod</a>(<a class="code" href="namespace_gosu.html#d32d35b8da950cd315c2c655157be3a2">ByteOrder</a> bo = <a class="code" href="namespace_gosu.html#d32d35b8da950cd315c2c655157be3a23483576fdb08d93803091738978be3f8">boDontCare</a>)
|
137
|
-
<a name="l00077"></a>00077 {
|
138
|
-
<a name="l00078"></a>00078 T t;
|
139
|
-
<a name="l00079"></a>00079 readPod<T>(t, bo);
|
140
|
-
<a name="l00080"></a>00080 <span class="keywordflow">return</span> t;
|
141
|
-
<a name="l00081"></a>00081 }
|
142
|
-
<a name="l00082"></a>00082 };
|
143
|
-
<a name="l00083"></a>00083
|
144
|
-
<a name="l00086"></a><a class="code" href="class_gosu_1_1_writer.html">00086</a> <span class="keyword">class </span><a class="code" href="class_gosu_1_1_writer.html" title="Utility class that points to a specific position in a resource and offers an interface...">Writer</a>
|
145
|
-
<a name="l00087"></a>00087 {
|
146
|
-
<a name="l00088"></a>00088 <a class="code" href="class_gosu_1_1_resource.html" title="Base class for resources.">Resource</a>* res;
|
147
|
-
<a name="l00089"></a>00089 std::size_t pos;
|
148
|
-
<a name="l00090"></a>00090
|
149
|
-
<a name="l00091"></a>00091 <span class="keyword">public</span>:
|
150
|
-
<a name="l00092"></a><a class="code" href="class_gosu_1_1_writer.html#0032c19788b3196eb95f7ce6ff78ee64">00092</a> <a class="code" href="class_gosu_1_1_writer.html#0032c19788b3196eb95f7ce6ff78ee64">Writer</a>(<a class="code" href="class_gosu_1_1_resource.html" title="Base class for resources.">Resource</a>& <a class="code" href="class_gosu_1_1_writer.html#792fbddc51cd7c2f371f22a819057362">resource</a>, std::size_t <a class="code" href="class_gosu_1_1_writer.html#e6b43234bc5c8b751b4b50c92f987ec2">position</a>)
|
151
|
-
<a name="l00093"></a>00093 : res(&resource), pos(position)
|
152
|
-
<a name="l00094"></a>00094 {
|
153
|
-
<a name="l00095"></a>00095 }
|
154
|
-
<a name="l00096"></a>00096
|
155
|
-
<a name="l00097"></a><a class="code" href="class_gosu_1_1_writer.html#792fbddc51cd7c2f371f22a819057362">00097</a> <a class="code" href="class_gosu_1_1_resource.html" title="Base class for resources.">Resource</a>& <a class="code" href="class_gosu_1_1_writer.html#792fbddc51cd7c2f371f22a819057362">resource</a>()<span class="keyword"> const</span>
|
156
|
-
<a name="l00098"></a>00098 <span class="keyword"> </span>{
|
157
|
-
<a name="l00099"></a>00099 <span class="keywordflow">return</span> *res;
|
158
|
-
<a name="l00100"></a>00100 }
|
159
|
-
<a name="l00101"></a>00101
|
160
|
-
<a name="l00102"></a><a class="code" href="class_gosu_1_1_writer.html#e6b43234bc5c8b751b4b50c92f987ec2">00102</a> std::size_t <a class="code" href="class_gosu_1_1_writer.html#e6b43234bc5c8b751b4b50c92f987ec2">position</a>()<span class="keyword"> const</span>
|
161
|
-
<a name="l00103"></a>00103 <span class="keyword"> </span>{
|
162
|
-
<a name="l00104"></a>00104 <span class="keywordflow">return</span> pos;
|
163
|
-
<a name="l00105"></a>00105 }
|
164
|
-
<a name="l00106"></a>00106
|
165
|
-
<a name="l00107"></a><a class="code" href="class_gosu_1_1_writer.html#3d2abef56a95eb09122945a68b368003">00107</a> <span class="keywordtype">void</span> <a class="code" href="class_gosu_1_1_writer.html#3d2abef56a95eb09122945a68b368003">setPosition</a>(std::size_t value)
|
166
|
-
<a name="l00108"></a>00108 {
|
167
|
-
<a name="l00109"></a>00109 <span class="comment">// TODO: Check?</span>
|
168
|
-
<a name="l00110"></a>00110 pos = value;
|
169
|
-
<a name="l00111"></a>00111 }
|
170
|
-
<a name="l00112"></a>00112
|
171
|
-
<a name="l00113"></a><a class="code" href="class_gosu_1_1_writer.html#2ccd210d640ec99e8692ae6526af67c6">00113</a> <span class="keywordtype">void</span> <a class="code" href="class_gosu_1_1_writer.html#2ccd210d640ec99e8692ae6526af67c6">seek</a>(std::ptrdiff_t offset)
|
172
|
-
<a name="l00114"></a>00114 {
|
173
|
-
<a name="l00115"></a>00115 <span class="comment">// TODO: Check?</span>
|
174
|
-
<a name="l00116"></a>00116 pos += offset;
|
175
|
-
<a name="l00117"></a>00117 }
|
176
|
-
<a name="l00118"></a>00118
|
177
|
-
<a name="l00119"></a>00119 <span class="keywordtype">void</span> <a class="code" href="class_gosu_1_1_writer.html#2761f91f0bb28239d47ee749f6351c6b">write</a>(<span class="keyword">const</span> <span class="keywordtype">void</span>* sourceBuffer, std::size_t length);
|
178
|
-
<a name="l00120"></a>00120
|
179
|
-
<a name="l00122"></a>00122 <span class="keyword">template</span><<span class="keyword">typename</span> T>
|
180
|
-
<a name="l00123"></a><a class="code" href="class_gosu_1_1_writer.html#170ce6b0f284fa6772091708a012339e">00123</a> <span class="keywordtype">void</span> <a class="code" href="class_gosu_1_1_writer.html#170ce6b0f284fa6772091708a012339e" title="Convenience function; equivalent to write(&amp;t, sizeof t).">writePod</a>(<span class="keyword">const</span> T& t, <a class="code" href="namespace_gosu.html#d32d35b8da950cd315c2c655157be3a2">ByteOrder</a> bo = <a class="code" href="namespace_gosu.html#d32d35b8da950cd315c2c655157be3a23483576fdb08d93803091738978be3f8">boDontCare</a>)
|
181
|
-
<a name="l00124"></a>00124 {
|
182
|
-
<a name="l00125"></a>00125 <span class="keywordflow">if</span> (bo == <a class="code" href="namespace_gosu.html#b1ccccbaef42335e16689c5fc2f1f936">otherByteOrder</a>)
|
183
|
-
<a name="l00126"></a>00126 {
|
184
|
-
<a name="l00127"></a>00127 <span class="keywordtype">char</span> buf[<span class="keyword">sizeof</span> t];
|
185
|
-
<a name="l00128"></a>00128 <span class="keyword">const</span> <span class="keywordtype">char</span>* begin = <span class="keyword">reinterpret_cast<</span><span class="keyword">const </span><span class="keywordtype">char</span>*<span class="keyword">></span>(&t);
|
186
|
-
<a name="l00129"></a>00129 std::reverse_copy(begin, begin + <span class="keyword">sizeof</span> t, buf);
|
187
|
-
<a name="l00130"></a>00130 <a class="code" href="class_gosu_1_1_writer.html#2761f91f0bb28239d47ee749f6351c6b">write</a>(buf, <span class="keyword">sizeof</span> buf);
|
188
|
-
<a name="l00131"></a>00131 }
|
189
|
-
<a name="l00132"></a>00132 <span class="keywordflow">else</span>
|
190
|
-
<a name="l00133"></a>00133 <a class="code" href="class_gosu_1_1_writer.html#2761f91f0bb28239d47ee749f6351c6b">write</a>(&t, <span class="keyword">sizeof</span> t);
|
191
|
-
<a name="l00134"></a>00134 }
|
192
|
-
<a name="l00135"></a>00135 };
|
193
|
-
<a name="l00136"></a>00136
|
194
|
-
<a name="l00142"></a><a class="code" href="class_gosu_1_1_resource.html">00142</a> <span class="keyword">class </span><a class="code" href="class_gosu_1_1_resource.html" title="Base class for resources.">Resource</a> : boost::noncopyable
|
195
|
-
<a name="l00143"></a>00143 {
|
196
|
-
<a name="l00144"></a>00144 <span class="keyword">public</span>:
|
197
|
-
<a name="l00145"></a><a class="code" href="class_gosu_1_1_resource.html#ca3a40cc85122a50869ea8930264c365">00145</a> <span class="keyword">virtual</span> <a class="code" href="class_gosu_1_1_resource.html#ca3a40cc85122a50869ea8930264c365">~Resource</a>()
|
198
|
-
<a name="l00146"></a>00146 {
|
199
|
-
<a name="l00147"></a>00147 }
|
200
|
-
<a name="l00148"></a>00148
|
201
|
-
<a name="l00151"></a><a class="code" href="class_gosu_1_1_resource.html#1487016df4be48aa67e4596d5436dab6">00151</a> <a class="code" href="class_gosu_1_1_reader.html" title="Utility class that points to a specific position in a resource and offers an interface...">Reader</a> <a class="code" href="class_gosu_1_1_resource.html#1487016df4be48aa67e4596d5436dab6" title="Convenience: Creates a new Reader that reads from the start of the resource.">frontReader</a>()<span class="keyword"> const</span>
|
202
|
-
<a name="l00152"></a>00152 <span class="keyword"> </span>{
|
203
|
-
<a name="l00153"></a>00153 <span class="keywordflow">return</span> <a class="code" href="class_gosu_1_1_reader.html" title="Utility class that points to a specific position in a resource and offers an interface...">Reader</a>(*<span class="keyword">this</span>, 0);
|
204
|
-
<a name="l00154"></a>00154 }
|
205
|
-
<a name="l00155"></a>00155
|
206
|
-
<a name="l00158"></a><a class="code" href="class_gosu_1_1_resource.html#8383c59af78d8b90b4f28cd10c6a368f">00158</a> <a class="code" href="class_gosu_1_1_writer.html" title="Utility class that points to a specific position in a resource and offers an interface...">Writer</a> <a class="code" href="class_gosu_1_1_resource.html#8383c59af78d8b90b4f28cd10c6a368f" title="Convenience: Creates a new Writer that appends data at the end of the resource.">backWriter</a>()
|
207
|
-
<a name="l00159"></a>00159 {
|
208
|
-
<a name="l00160"></a>00160 <span class="keywordflow">return</span> <a class="code" href="class_gosu_1_1_writer.html" title="Utility class that points to a specific position in a resource and offers an interface...">Writer</a>(*<span class="keyword">this</span>, <a class="code" href="class_gosu_1_1_resource.html#1211e148be764e0b78e3d7133da4a9f0">size</a>());
|
209
|
-
<a name="l00161"></a>00161 }
|
210
|
-
<a name="l00162"></a>00162
|
211
|
-
<a name="l00163"></a>00163 <span class="keyword">virtual</span> std::size_t <a class="code" href="class_gosu_1_1_resource.html#1211e148be764e0b78e3d7133da4a9f0">size</a>() <span class="keyword">const</span> = 0;
|
212
|
-
<a name="l00164"></a>00164
|
213
|
-
<a name="l00165"></a>00165 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_gosu_1_1_resource.html#ae13c54d269781b8f05dd281bdd3d9f6">resize</a>(std::size_t newSize) = 0;
|
214
|
-
<a name="l00166"></a>00166
|
215
|
-
<a name="l00167"></a>00167 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_gosu_1_1_resource.html#64b661506cb7e17af4d957a368149b11">read</a>(std::size_t offset, std::size_t length,
|
216
|
-
<a name="l00168"></a>00168 <span class="keywordtype">void</span>* destBuffer) <span class="keyword">const</span> = 0;
|
217
|
-
<a name="l00169"></a>00169
|
218
|
-
<a name="l00170"></a>00170 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_gosu_1_1_resource.html#b2dac3b2c7a34372051231b5bb4b8969">write</a>(std::size_t offset, std::size_t length,
|
219
|
-
<a name="l00171"></a>00171 <span class="keyword">const</span> <span class="keywordtype">void</span>* sourceBuffer) = 0;
|
220
|
-
<a name="l00172"></a>00172 };
|
221
|
-
<a name="l00173"></a>00173
|
222
|
-
<a name="l00175"></a><a class="code" href="class_gosu_1_1_buffer.html">00175</a> <span class="keyword">class </span><a class="code" href="class_gosu_1_1_buffer.html" title="Piece of memory with the Resource interface.">Buffer</a> : <span class="keyword">public</span> <a class="code" href="class_gosu_1_1_resource.html" title="Base class for resources.">Resource</a>
|
223
|
-
<a name="l00176"></a>00176 {
|
224
|
-
<a name="l00177"></a>00177 std::vector<char> buf;
|
225
|
-
<a name="l00178"></a>00178
|
226
|
-
<a name="l00179"></a>00179 <span class="keyword">public</span>:
|
227
|
-
<a name="l00180"></a><a class="code" href="class_gosu_1_1_buffer.html#23d06586c649743ef5136a5236297a15">00180</a> <a class="code" href="class_gosu_1_1_buffer.html#23d06586c649743ef5136a5236297a15">Buffer</a>()
|
228
|
-
<a name="l00181"></a>00181 {
|
229
|
-
<a name="l00182"></a>00182 }
|
230
|
-
<a name="l00183"></a>00183
|
231
|
-
<a name="l00184"></a><a class="code" href="class_gosu_1_1_buffer.html#b5633a0dc1b9b9d394cf53e5e06ab82c">00184</a> <a class="code" href="class_gosu_1_1_buffer.html#23d06586c649743ef5136a5236297a15">Buffer</a>(<span class="keyword">const</span> <a class="code" href="class_gosu_1_1_buffer.html" title="Piece of memory with the Resource interface.">Buffer</a>& other)
|
232
|
-
<a name="l00185"></a>00185 : buf(other.buf)
|
233
|
-
<a name="l00186"></a>00186 {
|
234
|
-
<a name="l00187"></a>00187 }
|
235
|
-
<a name="l00188"></a>00188
|
236
|
-
<a name="l00189"></a><a class="code" href="class_gosu_1_1_buffer.html#6027117fa016fb5b1315106436badbc0">00189</a> <a class="code" href="class_gosu_1_1_buffer.html" title="Piece of memory with the Resource interface.">Buffer</a>& <a class="code" href="class_gosu_1_1_buffer.html#6027117fa016fb5b1315106436badbc0">operator=</a>(<span class="keyword">const</span> <a class="code" href="class_gosu_1_1_buffer.html" title="Piece of memory with the Resource interface.">Buffer</a>& other)
|
237
|
-
<a name="l00190"></a>00190 {
|
238
|
-
<a name="l00191"></a>00191 buf = other.buf;
|
239
|
-
<a name="l00192"></a>00192 <span class="keywordflow">return</span> *<span class="keyword">this</span>;
|
240
|
-
<a name="l00193"></a>00193 }
|
241
|
-
<a name="l00194"></a>00194
|
242
|
-
<a name="l00195"></a>00195 std::size_t <a class="code" href="class_gosu_1_1_buffer.html#87dc8af05b5c5073ef12bdf3368dcfe3">size</a>() <span class="keyword">const</span>;
|
243
|
-
<a name="l00196"></a>00196 <span class="keywordtype">void</span> <a class="code" href="class_gosu_1_1_buffer.html#a2ba0896aa3e51d2d8ae30551288fabc">resize</a>(std::size_t newSize);
|
244
|
-
<a name="l00197"></a>00197
|
245
|
-
<a name="l00198"></a>00198 <span class="keywordtype">void</span> <a class="code" href="class_gosu_1_1_buffer.html#663043ae5ef683670989dfa2fc71c189">read</a>(std::size_t offset, std::size_t length,
|
246
|
-
<a name="l00199"></a>00199 <span class="keywordtype">void</span>* destBuffer) <span class="keyword">const</span>;
|
247
|
-
<a name="l00200"></a>00200
|
248
|
-
<a name="l00201"></a>00201 <span class="keywordtype">void</span> <a class="code" href="class_gosu_1_1_buffer.html#6fb20591d430230c854aaa9ff5f29bc3">write</a>(std::size_t offset, std::size_t length,
|
249
|
-
<a name="l00202"></a>00202 <span class="keyword">const</span> <span class="keywordtype">void</span>* sourceBuffer);
|
250
|
-
<a name="l00203"></a>00203
|
251
|
-
<a name="l00204"></a><a class="code" href="class_gosu_1_1_buffer.html#d488eb50bdec6f327dee18025dc95714">00204</a> <span class="keyword">const</span> <span class="keywordtype">void</span>* <a class="code" href="class_gosu_1_1_buffer.html#d488eb50bdec6f327dee18025dc95714">data</a>()<span class="keyword"> const</span>
|
252
|
-
<a name="l00205"></a>00205 <span class="keyword"> </span>{
|
253
|
-
<a name="l00206"></a>00206 <span class="keywordflow">return</span> &buf[0];
|
254
|
-
<a name="l00207"></a>00207 }
|
255
|
-
<a name="l00208"></a>00208
|
256
|
-
<a name="l00209"></a><a class="code" href="class_gosu_1_1_buffer.html#e71074a520bb3939313b7610432c7358">00209</a> <span class="keywordtype">void</span>* <a class="code" href="class_gosu_1_1_buffer.html#d488eb50bdec6f327dee18025dc95714">data</a>()
|
257
|
-
<a name="l00210"></a>00210 {
|
258
|
-
<a name="l00211"></a>00211 <span class="keywordflow">return</span> &buf[0];
|
259
|
-
<a name="l00212"></a>00212 }
|
260
|
-
<a name="l00213"></a>00213 };
|
261
|
-
<a name="l00214"></a>00214
|
262
|
-
<a name="l00215"></a><a class="code" href="namespace_gosu.html#f3bd16cebaf102e43f576d0a0ca1fcc3">00215</a> <span class="keyword">enum</span> <a class="code" href="namespace_gosu.html#f3bd16cebaf102e43f576d0a0ca1fcc3">FileMode</a>
|
263
|
-
<a name="l00216"></a>00216 {
|
264
|
-
<a name="l00219"></a><a class="code" href="namespace_gosu.html#f3bd16cebaf102e43f576d0a0ca1fcc3fc1f3aa93dd976dd43582892a36629d8">00219</a> <a class="code" href="namespace_gosu.html#f3bd16cebaf102e43f576d0a0ca1fcc3fc1f3aa93dd976dd43582892a36629d8" title="Opens an existing file for reading; throws an exception if the file cannot be found...">fmRead</a>,
|
265
|
-
<a name="l00222"></a><a class="code" href="namespace_gosu.html#f3bd16cebaf102e43f576d0a0ca1fcc337d6ddaeba2138192b0ae84e0882a246">00222</a> <a class="code" href="namespace_gosu.html#f3bd16cebaf102e43f576d0a0ca1fcc337d6ddaeba2138192b0ae84e0882a246" title="Writes data to a file.">fmReplace</a>,
|
266
|
-
<a name="l00225"></a><a class="code" href="namespace_gosu.html#f3bd16cebaf102e43f576d0a0ca1fcc3d09b16bbdaf86e8a38a7299abad2706d">00225</a> <a class="code" href="namespace_gosu.html#f3bd16cebaf102e43f576d0a0ca1fcc3d09b16bbdaf86e8a38a7299abad2706d" title="Opens or creates a file with writing access, but does not clear existing contents...">fmAlter</a>
|
267
|
-
<a name="l00226"></a>00226 };
|
268
|
-
<a name="l00227"></a>00227
|
269
|
-
<a name="l00229"></a><a class="code" href="class_gosu_1_1_file.html">00229</a> <span class="keyword">class </span><a class="code" href="class_gosu_1_1_file.html" title="File with the Resource interface.">File</a> : <span class="keyword">public</span> <a class="code" href="class_gosu_1_1_resource.html" title="Base class for resources.">Resource</a>
|
270
|
-
<a name="l00230"></a>00230 {
|
271
|
-
<a name="l00231"></a>00231 <span class="keyword">struct </span>Impl;
|
272
|
-
<a name="l00232"></a>00232 boost::scoped_ptr<Impl> pimpl;
|
273
|
-
<a name="l00233"></a>00233
|
274
|
-
<a name="l00234"></a>00234 <span class="keyword">public</span>:
|
275
|
-
<a name="l00235"></a>00235 <span class="keyword">explicit</span> <a class="code" href="class_gosu_1_1_file.html#ca8146e9a279ee5cdee72bf6997eb392">File</a>(<span class="keyword">const</span> std::wstring& filename, <a class="code" href="namespace_gosu.html#f3bd16cebaf102e43f576d0a0ca1fcc3">FileMode</a> mode = <a class="code" href="namespace_gosu.html#f3bd16cebaf102e43f576d0a0ca1fcc3fc1f3aa93dd976dd43582892a36629d8" title="Opens an existing file for reading; throws an exception if the file cannot be found...">fmRead</a>);
|
276
|
-
<a name="l00236"></a>00236 <a class="code" href="class_gosu_1_1_file.html#33c8932235e2b46945a767025dc02edc">~File</a>();
|
277
|
-
<a name="l00237"></a>00237
|
278
|
-
<a name="l00238"></a>00238 std::size_t <a class="code" href="class_gosu_1_1_file.html#d3cb0b3153253936f11ae51da9032532">size</a>() <span class="keyword">const</span>;
|
279
|
-
<a name="l00239"></a>00239 <span class="keywordtype">void</span> <a class="code" href="class_gosu_1_1_file.html#e8e557bc658ba2f2caca51517d461ee3">resize</a>(std::size_t newSize);
|
280
|
-
<a name="l00240"></a>00240 <span class="keywordtype">void</span> <a class="code" href="class_gosu_1_1_file.html#65d51811adfa8909e325a52c79903c78">read</a>(std::size_t offset, std::size_t length,
|
281
|
-
<a name="l00241"></a>00241 <span class="keywordtype">void</span>* destBuffer) <span class="keyword">const</span>;
|
282
|
-
<a name="l00242"></a>00242 <span class="keywordtype">void</span> <a class="code" href="class_gosu_1_1_file.html#3ed021544dfd296370219744cc71c61e">write</a>(std::size_t offset, std::size_t length,
|
283
|
-
<a name="l00243"></a>00243 <span class="keyword">const</span> <span class="keywordtype">void</span>* sourceBuffer);
|
284
|
-
<a name="l00244"></a>00244 };
|
285
|
-
<a name="l00245"></a>00245
|
286
|
-
<a name="l00247"></a>00247 <span class="keywordtype">void</span> <a class="code" href="namespace_gosu.html#29c60cb8e87a99f7ce924ae0530029a0" title="Loads a whole file into a buffer.">loadFile</a>(<a class="code" href="class_gosu_1_1_buffer.html" title="Piece of memory with the Resource interface.">Buffer</a>& buffer, <span class="keyword">const</span> std::wstring& filename);
|
287
|
-
<a name="l00249"></a>00249 <span class="keywordtype">void</span> <a class="code" href="namespace_gosu.html#467aa346fa1a4cb39040bb427b42b7aa" title="Creates or overwrites a file with the contents of a buffer.">saveFile</a>(<span class="keyword">const</span> <a class="code" href="class_gosu_1_1_buffer.html" title="Piece of memory with the Resource interface.">Buffer</a>& buffer, <span class="keyword">const</span> std::wstring& filename);
|
288
|
-
<a name="l00250"></a>00250 }
|
289
|
-
<a name="l00251"></a>00251
|
290
|
-
<a name="l00252"></a>00252 <span class="preprocessor">#endif</span>
|
291
|
-
</pre></div></div>
|
292
|
-
<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>
|
293
|
-
</div>
|
294
|
-
</body>
|
295
|
-
</html>
|
@@ -1,173 +0,0 @@
|
|
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 Page</span></a></li>
|
54
|
-
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
|
55
|
-
<li><a href="annotated.html"><span>Classes</span></a></li>
|
56
|
-
<li class="current"><a href="files.html"><span>Files</span></a></li>
|
57
|
-
</ul>
|
58
|
-
</div>
|
59
|
-
<div class="tabs">
|
60
|
-
<ul>
|
61
|
-
<li><a href="files.html"><span>File List</span></a></li>
|
62
|
-
<li><a href="globals.html"><span>File Members</span></a></li>
|
63
|
-
</ul>
|
64
|
-
</div>
|
65
|
-
<h1>Image.hpp</h1><a href="_image_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001
|
66
|
-
<a name="l00002"></a>00002
|
67
|
-
<a name="l00003"></a>00003
|
68
|
-
<a name="l00004"></a>00004 <span class="preprocessor">#ifndef GOSU_IMAGE_HPP</span>
|
69
|
-
<a name="l00005"></a>00005 <span class="preprocessor"></span><span class="preprocessor">#define GOSU_IMAGE_HPP</span>
|
70
|
-
<a name="l00006"></a>00006 <span class="preprocessor"></span>
|
71
|
-
<a name="l00007"></a>00007 <span class="preprocessor">#include <<a class="code" href="_fwd_8hpp.html" title="Contains declarations of all of Gosu&#39;s available classes.">Gosu/Fwd.hpp</a>></span>
|
72
|
-
<a name="l00008"></a>00008 <span class="preprocessor">#include <<a class="code" href="_bitmap_8hpp.html" title="Interface of the Bitmap class.">Gosu/Bitmap.hpp</a>></span>
|
73
|
-
<a name="l00009"></a>00009 <span class="preprocessor">#include <<a class="code" href="_rot_flip_8hpp.html" title="Interface of the RotFlip class.">Gosu/RotFlip.hpp</a>></span>
|
74
|
-
<a name="l00010"></a>00010 <span class="preprocessor">#include <boost/scoped_ptr.hpp></span>
|
75
|
-
<a name="l00011"></a>00011
|
76
|
-
<a name="l00012"></a>00012 <span class="keyword">namespace </span>Gosu
|
77
|
-
<a name="l00013"></a>00013 {
|
78
|
-
<a name="l00015"></a><a class="code" href="class_gosu_1_1_image.html">00015</a> <span class="keyword">class </span><a class="code" href="class_gosu_1_1_image.html" title="Provides functionality for drawing rectangular images.">Image</a>
|
79
|
-
<a name="l00016"></a>00016 {
|
80
|
-
<a name="l00017"></a>00017 boost::scoped_ptr<ImageData> data;
|
81
|
-
<a name="l00018"></a>00018
|
82
|
-
<a name="l00019"></a>00019 <span class="keyword">public</span>:
|
83
|
-
<a name="l00025"></a>00025 <a class="code" href="class_gosu_1_1_image.html#c055237e043f147da45132de80b2caa0" title="Loads an image from a given filename that can be drawn onto graphics.">Image</a>(<a class="code" href="class_gosu_1_1_graphics.html" title="Serves as the target of all drawing and provides basic drawing functionality.">Graphics</a>& graphics, <span class="keyword">const</span> std::wstring& filename,
|
84
|
-
<a name="l00026"></a>00026 <span class="keywordtype">bool</span> tileable = <span class="keyword">false</span>);
|
85
|
-
<a name="l00032"></a>00032 <a class="code" href="class_gosu_1_1_image.html#c055237e043f147da45132de80b2caa0" title="Loads an image from a given filename that can be drawn onto graphics.">Image</a>(<a class="code" href="class_gosu_1_1_graphics.html" title="Serves as the target of all drawing and provides basic drawing functionality.">Graphics</a>& graphics, <span class="keyword">const</span> std::wstring& filename, <span class="keywordtype">unsigned</span> srcX,
|
86
|
-
<a name="l00033"></a>00033 <span class="keywordtype">unsigned</span> srcY, <span class="keywordtype">unsigned</span> srcWidth, <span class="keywordtype">unsigned</span> srcHeight,
|
87
|
-
<a name="l00034"></a>00034 <span class="keywordtype">bool</span> tileable = <span class="keyword">false</span>);
|
88
|
-
<a name="l00035"></a>00035
|
89
|
-
<a name="l00038"></a>00038 <a class="code" href="class_gosu_1_1_image.html#c055237e043f147da45132de80b2caa0" title="Loads an image from a given filename that can be drawn onto graphics.">Image</a>(<a class="code" href="class_gosu_1_1_graphics.html" title="Serves as the target of all drawing and provides basic drawing functionality.">Graphics</a>& graphics, <span class="keyword">const</span> <a class="code" href="class_gosu_1_1_bitmap.html" title="Rectangular area of pixels, each represented by a Color value.">Bitmap</a>& source,
|
90
|
-
<a name="l00039"></a>00039 <span class="keywordtype">bool</span> tileable = <span class="keyword">false</span>);
|
91
|
-
<a name="l00042"></a>00042 <a class="code" href="class_gosu_1_1_image.html#c055237e043f147da45132de80b2caa0" title="Loads an image from a given filename that can be drawn onto graphics.">Image</a>(<a class="code" href="class_gosu_1_1_graphics.html" title="Serves as the target of all drawing and provides basic drawing functionality.">Graphics</a>& graphics, <span class="keyword">const</span> <a class="code" href="class_gosu_1_1_bitmap.html" title="Rectangular area of pixels, each represented by a Color value.">Bitmap</a>& source, <span class="keywordtype">unsigned</span> srcX,
|
92
|
-
<a name="l00043"></a>00043 <span class="keywordtype">unsigned</span> srcY, <span class="keywordtype">unsigned</span> srcWidth, <span class="keywordtype">unsigned</span> srcHeight,
|
93
|
-
<a name="l00044"></a>00044 <span class="keywordtype">bool</span> tileable = <span class="keyword">false</span>);
|
94
|
-
<a name="l00045"></a>00045
|
95
|
-
<a name="l00046"></a>00046 <a class="code" href="class_gosu_1_1_image.html#8ddd8cdd69df27f9dd8427df0930a7a6">~Image</a>();
|
96
|
-
<a name="l00047"></a>00047
|
97
|
-
<a name="l00048"></a>00048 <span class="keywordtype">unsigned</span> <a class="code" href="class_gosu_1_1_image.html#d9eb15c02f9bb1136a7bb4b988696a97">width</a>() <span class="keyword">const</span>;
|
98
|
-
<a name="l00049"></a>00049 <span class="keywordtype">unsigned</span> <a class="code" href="class_gosu_1_1_image.html#5a9153540e0da81a46f0262c50195c04">height</a>() <span class="keyword">const</span>;
|
99
|
-
<a name="l00050"></a>00050
|
100
|
-
<a name="l00052"></a>00052 <span class="keywordtype">void</span> <a class="code" href="class_gosu_1_1_image.html#7e6de0cae934109ba6c96434767f9540" title="Draws the image so its upper left corner is at (x; y).">draw</a>(<span class="keywordtype">double</span> x, <span class="keywordtype">double</span> y, <a class="code" href="namespace_gosu.html#a2fd8fe9574c0ad3fd52557cb160be49" title="Represents the Z position of something drawn with Gosu&#39;s graphics system.">ZPos</a> z,
|
101
|
-
<a name="l00053"></a>00053 <span class="keywordtype">double</span> factorX = 1, <span class="keywordtype">double</span> factorY = 1,
|
102
|
-
<a name="l00054"></a>00054 <a class="code" href="class_gosu_1_1_color.html" title="Represents an ARGB color value with 8 bits for each channel.">Color</a> c = <a class="code" href="namespace_gosu_1_1_colors.html#10d42c88c877baa7e4c3d22f30781802">Colors::white</a>,
|
103
|
-
<a name="l00055"></a>00055 <a class="code" href="namespace_gosu.html#769656b1f560bc3d1bbdb47f8ca4eda9" title="Determines the way colors are combined when one is drawn onto another.">AlphaMode</a> mode = <a class="code" href="namespace_gosu.html#769656b1f560bc3d1bbdb47f8ca4eda9d1661cf5d3ba68fcbdca99f9dcc832e0" title="The color&#39;s channels will be interpolated.">amDefault</a>) <span class="keyword">const</span>;
|
104
|
-
<a name="l00058"></a>00058 <span class="keywordtype">void</span> <a class="code" href="class_gosu_1_1_image.html#6ee7e13d1def74cbf5e974fdc3b045a1" title="Like draw(), but allows to give modulation colors for all four corners.">drawMod</a>(<span class="keywordtype">double</span> x, <span class="keywordtype">double</span> y, <a class="code" href="namespace_gosu.html#a2fd8fe9574c0ad3fd52557cb160be49" title="Represents the Z position of something drawn with Gosu&#39;s graphics system.">ZPos</a> z,
|
105
|
-
<a name="l00059"></a>00059 <span class="keywordtype">double</span> factorX, <span class="keywordtype">double</span> factorY,
|
106
|
-
<a name="l00060"></a>00060 <a class="code" href="class_gosu_1_1_color.html" title="Represents an ARGB color value with 8 bits for each channel.">Color</a> c1, <a class="code" href="class_gosu_1_1_color.html" title="Represents an ARGB color value with 8 bits for each channel.">Color</a> c2, <a class="code" href="class_gosu_1_1_color.html" title="Represents an ARGB color value with 8 bits for each channel.">Color</a> c3, <a class="code" href="class_gosu_1_1_color.html" title="Represents an ARGB color value with 8 bits for each channel.">Color</a> c4,
|
107
|
-
<a name="l00061"></a>00061 <a class="code" href="namespace_gosu.html#769656b1f560bc3d1bbdb47f8ca4eda9" title="Determines the way colors are combined when one is drawn onto another.">AlphaMode</a> mode = <a class="code" href="namespace_gosu.html#769656b1f560bc3d1bbdb47f8ca4eda9d1661cf5d3ba68fcbdca99f9dcc832e0" title="The color&#39;s channels will be interpolated.">amDefault</a>) <span class="keyword">const</span>;
|
108
|
-
<a name="l00062"></a>00062
|
109
|
-
<a name="l00072"></a>00072 <span class="keywordtype">void</span> <a class="code" href="class_gosu_1_1_image.html#9333d4cb15b761020a82a41357ccb674" title="Draws the image rotated by the given angle so that its rotation center is at (x;...">drawRot</a>(<span class="keywordtype">double</span> x, <span class="keywordtype">double</span> y, <a class="code" href="namespace_gosu.html#a2fd8fe9574c0ad3fd52557cb160be49" title="Represents the Z position of something drawn with Gosu&#39;s graphics system.">ZPos</a> z,
|
110
|
-
<a name="l00073"></a>00073 <span class="keywordtype">double</span> <a class="code" href="namespace_gosu.html#f7740dec821977a37ff26a90c2e85ac7" title="Returns the angle from point 1 to point 2 in degrees, where 0.0 means upwards.">angle</a>, <span class="keywordtype">double</span> centerX = 0.5, <span class="keywordtype">double</span> centerY = 0.5,
|
111
|
-
<a name="l00074"></a>00074 <span class="keywordtype">double</span> factorX = 1, <span class="keywordtype">double</span> factorY = 1,
|
112
|
-
<a name="l00075"></a>00075 <a class="code" href="class_gosu_1_1_color.html" title="Represents an ARGB color value with 8 bits for each channel.">Color</a> c = <a class="code" href="namespace_gosu_1_1_colors.html#10d42c88c877baa7e4c3d22f30781802">Colors::white</a>,
|
113
|
-
<a name="l00076"></a>00076 <a class="code" href="namespace_gosu.html#769656b1f560bc3d1bbdb47f8ca4eda9" title="Determines the way colors are combined when one is drawn onto another.">AlphaMode</a> mode = <a class="code" href="namespace_gosu.html#769656b1f560bc3d1bbdb47f8ca4eda9d1661cf5d3ba68fcbdca99f9dcc832e0" title="The color&#39;s channels will be interpolated.">amDefault</a>) <span class="keyword">const</span>;
|
114
|
-
<a name="l00077"></a>00077
|
115
|
-
<a name="l00078"></a>00078 <span class="preprocessor"> #ifndef SWIG</span>
|
116
|
-
<a name="l00079"></a>00079 <span class="preprocessor"></span> <span class="keywordtype">void</span> <a class="code" href="class_gosu_1_1_image.html#07c83052d6a269c893cdc0b5f5d1329f">drawRotFlip</a>(<span class="keywordtype">double</span> x, <span class="keywordtype">double</span> y, <a class="code" href="namespace_gosu.html#a2fd8fe9574c0ad3fd52557cb160be49" title="Represents the Z position of something drawn with Gosu&#39;s graphics system.">ZPos</a> z,
|
117
|
-
<a name="l00080"></a>00080 <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> rf,
|
118
|
-
<a name="l00081"></a>00081 <span class="keywordtype">double</span> factorX = 1, <span class="keywordtype">double</span> factorY = 1,
|
119
|
-
<a name="l00082"></a>00082 <a class="code" href="class_gosu_1_1_color.html" title="Represents an ARGB color value with 8 bits for each channel.">Color</a> c = <a class="code" href="namespace_gosu_1_1_colors.html#10d42c88c877baa7e4c3d22f30781802">Colors::white</a>,
|
120
|
-
<a name="l00083"></a>00083 <a class="code" href="namespace_gosu.html#769656b1f560bc3d1bbdb47f8ca4eda9" title="Determines the way colors are combined when one is drawn onto another.">AlphaMode</a> mode = <a class="code" href="namespace_gosu.html#769656b1f560bc3d1bbdb47f8ca4eda9d1661cf5d3ba68fcbdca99f9dcc832e0" title="The color&#39;s channels will be interpolated.">amDefault</a>) <span class="keyword">const</span>;
|
121
|
-
<a name="l00084"></a>00084 <span class="keywordtype">void</span> <a class="code" href="class_gosu_1_1_image.html#9ed4e6ba8c9ac296ff8550c0036f093d">drawRotFlipMod</a>(<span class="keywordtype">double</span> x, <span class="keywordtype">double</span> y, <a class="code" href="namespace_gosu.html#a2fd8fe9574c0ad3fd52557cb160be49" title="Represents the Z position of something drawn with Gosu&#39;s graphics system.">ZPos</a> z,
|
122
|
-
<a name="l00085"></a>00085 <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> rf,
|
123
|
-
<a name="l00086"></a>00086 <span class="keywordtype">double</span> factorX, <span class="keywordtype">double</span> factorY,
|
124
|
-
<a name="l00087"></a>00087 <a class="code" href="class_gosu_1_1_color.html" title="Represents an ARGB color value with 8 bits for each channel.">Color</a> c1, <a class="code" href="class_gosu_1_1_color.html" title="Represents an ARGB color value with 8 bits for each channel.">Color</a> c2, <a class="code" href="class_gosu_1_1_color.html" title="Represents an ARGB color value with 8 bits for each channel.">Color</a> c3, <a class="code" href="class_gosu_1_1_color.html" title="Represents an ARGB color value with 8 bits for each channel.">Color</a> c4,
|
125
|
-
<a name="l00088"></a>00088 <a class="code" href="namespace_gosu.html#769656b1f560bc3d1bbdb47f8ca4eda9" title="Determines the way colors are combined when one is drawn onto another.">AlphaMode</a> mode = <a class="code" href="namespace_gosu.html#769656b1f560bc3d1bbdb47f8ca4eda9d1661cf5d3ba68fcbdca99f9dcc832e0" title="The color&#39;s channels will be interpolated.">amDefault</a>) <span class="keyword">const</span>;
|
126
|
-
<a name="l00089"></a>00089
|
127
|
-
<a name="l00091"></a>00091 <span class="keyword">const</span> <a class="code" href="class_gosu_1_1_image_data.html" title="The ImageData class is an abstract base class for drawable images.">ImageData</a>& <a class="code" href="class_gosu_1_1_image.html#cbd542bae8e42ccc72442326e578c2c2" title="Provides access to the underlying image data object.">getData</a>() <span class="keyword">const</span>;
|
128
|
-
<a name="l00092"></a>00092 <span class="preprocessor"> #endif</span>
|
129
|
-
<a name="l00093"></a>00093 <span class="preprocessor"></span> };
|
130
|
-
<a name="l00094"></a>00094
|
131
|
-
<a name="l00103"></a>00103 <span class="keyword">template</span><<span class="keyword">typename</span> Container>
|
132
|
-
<a name="l00104"></a><a class="code" href="namespace_gosu.html#65c36c29f8305756011810c5a945fb6f">00104</a> <span class="keywordtype">void</span> <a class="code" href="namespace_gosu.html#65c36c29f8305756011810c5a945fb6f" title="Convenience function that splits a BMP or PNG file into an array of small rectangles...">imagesFromTiledBitmap</a>(<a class="code" href="class_gosu_1_1_graphics.html" title="Serves as the target of all drawing and provides basic drawing functionality.">Graphics</a>& graphics, <span class="keyword">const</span> std::wstring& filename,
|
133
|
-
<a name="l00105"></a>00105 <span class="keywordtype">int</span> tileWidth, <span class="keywordtype">int</span> tileHeight, <span class="keywordtype">bool</span> tileable, Container& appendTo)
|
134
|
-
<a name="l00106"></a>00106 {
|
135
|
-
<a name="l00107"></a>00107 <a class="code" href="namespace_gosu.html#65c36c29f8305756011810c5a945fb6f" title="Convenience function that splits a BMP or PNG file into an array of small rectangles...">imagesFromTiledBitmap</a>(graphics, <a class="code" href="namespace_gosu.html#263a114f352f439a3cbb0da9d52d18cb">quickLoadBitmap</a>(filename), tileWidth, tileHeight, tileable, appendTo);
|
136
|
-
<a name="l00108"></a>00108 }
|
137
|
-
<a name="l00109"></a>00109
|
138
|
-
<a name="l00118"></a>00118 <span class="keyword">template</span><<span class="keyword">typename</span> Container>
|
139
|
-
<a name="l00119"></a><a class="code" href="namespace_gosu.html#751d2eddf974bc631748fd04541d2a87">00119</a> <span class="keywordtype">void</span> <a class="code" href="namespace_gosu.html#65c36c29f8305756011810c5a945fb6f" title="Convenience function that splits a BMP or PNG file into an array of small rectangles...">imagesFromTiledBitmap</a>(<a class="code" href="class_gosu_1_1_graphics.html" title="Serves as the target of all drawing and provides basic drawing functionality.">Graphics</a>& graphics, <span class="keyword">const</span> <a class="code" href="class_gosu_1_1_bitmap.html" title="Rectangular area of pixels, each represented by a Color value.">Bitmap</a>& bmp,
|
140
|
-
<a name="l00120"></a>00120 <span class="keywordtype">int</span> tileWidth, <span class="keywordtype">int</span> tileHeight, <span class="keywordtype">bool</span> tileable, Container& appendTo)
|
141
|
-
<a name="l00121"></a>00121 {
|
142
|
-
<a name="l00122"></a>00122 <span class="keywordtype">int</span> tilesX, tilesY;
|
143
|
-
<a name="l00123"></a>00123
|
144
|
-
<a name="l00124"></a>00124 <span class="keywordflow">if</span> (tileWidth > 0)
|
145
|
-
<a name="l00125"></a>00125 tilesX = bmp.<a class="code" href="class_gosu_1_1_bitmap.html#eb1d21d261788c77aba770361ccdb09f">width</a>() / tileWidth;
|
146
|
-
<a name="l00126"></a>00126 <span class="keywordflow">else</span>
|
147
|
-
<a name="l00127"></a>00127 {
|
148
|
-
<a name="l00128"></a>00128 tilesX = -tileWidth;
|
149
|
-
<a name="l00129"></a>00129 tileWidth = bmp.<a class="code" href="class_gosu_1_1_bitmap.html#eb1d21d261788c77aba770361ccdb09f">width</a>() / tilesX;
|
150
|
-
<a name="l00130"></a>00130 }
|
151
|
-
<a name="l00131"></a>00131
|
152
|
-
<a name="l00132"></a>00132 <span class="keywordflow">if</span> (tileHeight > 0)
|
153
|
-
<a name="l00133"></a>00133 tilesY = bmp.<a class="code" href="class_gosu_1_1_bitmap.html#fc5a1fdaaf0453834c3b9ac13342eae6">height</a>() / tileHeight;
|
154
|
-
<a name="l00134"></a>00134 <span class="keywordflow">else</span>
|
155
|
-
<a name="l00135"></a>00135 {
|
156
|
-
<a name="l00136"></a>00136 tilesY = -tileHeight;
|
157
|
-
<a name="l00137"></a>00137 tileHeight = bmp.<a class="code" href="class_gosu_1_1_bitmap.html#fc5a1fdaaf0453834c3b9ac13342eae6">height</a>() / tilesY;
|
158
|
-
<a name="l00138"></a>00138 }
|
159
|
-
<a name="l00139"></a>00139
|
160
|
-
<a name="l00140"></a>00140 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> y = 0; y < tilesY; ++y)
|
161
|
-
<a name="l00141"></a>00141 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> x = 0; x < tilesX; ++x)
|
162
|
-
<a name="l00142"></a>00142 appendTo.push_back(<span class="keyword">typename</span> Container::value_type(<span class="keyword">new</span> <a class="code" href="class_gosu_1_1_image.html" title="Provides functionality for drawing rectangular images.">Image</a>(graphics, bmp,
|
163
|
-
<a name="l00143"></a>00143 x * tileWidth, y * tileHeight, tileWidth, tileHeight,
|
164
|
-
<a name="l00144"></a>00144 tileable)));
|
165
|
-
<a name="l00145"></a>00145 }
|
166
|
-
<a name="l00146"></a>00146 }
|
167
|
-
<a name="l00147"></a>00147
|
168
|
-
<a name="l00148"></a>00148 <span class="preprocessor">#endif</span>
|
169
|
-
</pre></div></div>
|
170
|
-
<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>
|
171
|
-
</div>
|
172
|
-
</body>
|
173
|
-
</html>
|