gosu 0.7.18 → 0.7.19

Sign up to get free protection for your applications and to get access to all the features.
Files changed (80) hide show
  1. data/COPYING.txt +1 -1
  2. data/Gosu/GraphicsBase.hpp +4 -2
  3. data/Gosu/IO.hpp +2 -9
  4. data/Gosu/Math.hpp +8 -6
  5. data/Gosu/Version.hpp +2 -2
  6. data/GosuImpl/Graphics/Common.hpp +4 -3
  7. data/GosuImpl/Graphics/DrawOp.hpp +4 -0
  8. data/GosuImpl/Graphics/Graphics.cpp +1 -1
  9. data/GosuImpl/Graphics/Image.cpp +1 -1
  10. data/GosuImpl/Graphics/LargeImageData.cpp +1 -1
  11. data/GosuImpl/Graphics/TexChunk.cpp +1 -1
  12. data/GosuImpl/Graphics/TextTouch.mm +79 -8
  13. data/GosuImpl/Graphics/Texture.cpp +15 -1
  14. data/GosuImpl/IO.cpp +10 -0
  15. data/GosuImpl/InputTouch.mm +10 -1
  16. data/GosuImpl/RubyGosu.swg +7 -13
  17. data/GosuImpl/RubyGosu_wrap.cxx +52 -22
  18. data/GosuImpl/Sockets/CommSocket.cpp +4 -3
  19. data/GosuImpl/Sockets/ListenerSocket.cpp +0 -1
  20. data/GosuImpl/Sockets/MessageSocket.cpp +8 -16
  21. data/GosuImpl/Sockets/Sockets.hpp +0 -1
  22. data/GosuImpl/WindowTouch.mm +2 -1
  23. data/Rakefile +3 -2
  24. data/lib/gosu.rb +3 -0
  25. data/lib/gosu/patches.rb +13 -2
  26. data/lib/gosu/swig_patches.rb +21 -0
  27. data/linux/extconf.rb +1 -1
  28. data/reference/cpp/_graphics_base_8hpp.html +3 -2
  29. data/reference/cpp/_graphics_base_8hpp_source.html +31 -30
  30. data/reference/cpp/_i_o_8hpp_source.html +49 -56
  31. data/reference/cpp/_math_8hpp.html +6 -6
  32. data/reference/cpp/_math_8hpp_source.html +63 -63
  33. data/reference/cpp/_version_8hpp.html +4 -4
  34. data/reference/cpp/_version_8hpp_source.html +2 -2
  35. data/reference/cpp/class_gosu_1_1_buffer.html +2 -6
  36. data/reference/cpp/class_gosu_1_1_file.html +1 -1
  37. data/reference/cpp/namespace_gosu.html +60 -57
  38. data/reference/cpp/namespacemembers.html +2 -0
  39. data/reference/cpp/namespacemembers_0x62.html +2 -2
  40. data/reference/cpp/namespacemembers_0x64.html +2 -0
  41. data/reference/cpp/namespacemembers_0x67.html +0 -2
  42. data/reference/cpp/namespacemembers_0x72.html +2 -2
  43. data/reference/cpp/namespacemembers_eval.html +4 -2
  44. data/reference/cpp/namespacemembers_func.html +4 -4
  45. data/reference/rdoc/classes/Gosu.html +1546 -0
  46. data/reference/rdoc/classes/Gosu/Color.html +660 -0
  47. data/reference/rdoc/classes/Gosu/Font.html +545 -0
  48. data/reference/rdoc/classes/Gosu/GLTexInfo.html +412 -0
  49. data/reference/rdoc/classes/Gosu/Image.html +706 -0
  50. data/reference/rdoc/classes/Gosu/Sample.html +476 -0
  51. data/reference/rdoc/classes/Gosu/SampleInstance.html +523 -0
  52. data/reference/rdoc/classes/Gosu/Song.html +568 -0
  53. data/reference/rdoc/classes/Gosu/TextInput.html +444 -0
  54. data/reference/rdoc/classes/Gosu/Window.html +911 -0
  55. data/reference/rdoc/classes/Numeric.html +479 -0
  56. data/reference/rdoc/created.rid +1 -0
  57. data/reference/rdoc/files/COPYING_txt.html +391 -0
  58. data/reference/rdoc/files/README_txt.html +387 -0
  59. data/reference/rdoc/files/reference/Deployment on OS X_rdoc.html +381 -0
  60. data/reference/rdoc/files/reference/Deployment on Windows_rdoc.html +385 -0
  61. data/reference/rdoc/files/reference/Drawing with Colors_rdoc.html +363 -0
  62. data/reference/rdoc/files/reference/Order of Corners_rdoc.html +358 -0
  63. data/reference/rdoc/files/reference/Tileability_rdoc.html +374 -0
  64. data/reference/rdoc/files/reference/Z Ordering_rdoc.html +361 -0
  65. data/reference/rdoc/files/reference/gosu_rb.html +348 -0
  66. data/reference/rdoc/fr_class_index.html +12 -0
  67. data/reference/rdoc/fr_file_index.html +10 -0
  68. data/reference/rdoc/fr_method_index.html +66 -0
  69. data/reference/rdoc/index.html +1 -0
  70. data/reference/rdoc/rdoc-style.css +320 -0
  71. metadata +29 -11
  72. data/GosuImpl/ObjGosu/ObjGosu.mm +0 -36
  73. data/GosuImpl/ObjGosu/ObjGosuColor.mm +0 -84
  74. data/GosuImpl/ObjGosu/ObjGosuFont.mm +0 -42
  75. data/GosuImpl/ObjGosu/ObjGosuImage.h +0 -7
  76. data/GosuImpl/ObjGosu/ObjGosuImage.mm +0 -65
  77. data/GosuImpl/ObjGosu/ObjGosuSample.mm +0 -32
  78. data/GosuImpl/ObjGosu/ObjGosuSong.mm +0 -43
  79. data/GosuImpl/ObjGosu/ObjGosuWindow.h +0 -32
  80. data/GosuImpl/ObjGosu/ObjGosuWindow.mm +0 -155
@@ -1,5 +1,6 @@
1
1
  #include <Gosu/Sockets.hpp>
2
2
  #include <GosuImpl/Sockets/Sockets.hpp>
3
+ #include <boost/cstdint.hpp>
3
4
  #include <cassert>
4
5
  #include <cstring>
5
6
  #include <stdexcept>
@@ -34,7 +35,7 @@ struct Gosu::CommSocket::Impl
34
35
 
35
36
  for (;;) // IMPR.
36
37
  {
37
- const size_t sizeSize = sizeof(unsigned long);
38
+ const size_t sizeSize = sizeof(boost::uint32_t);
38
39
 
39
40
  // Not even enough bytes there to determine the size of the
40
41
  // incoming message.
@@ -42,7 +43,7 @@ struct Gosu::CommSocket::Impl
42
43
  break;
43
44
 
44
45
  // Message size is already here, convert it.
45
- unsigned long msgSize = *reinterpret_cast<unsigned long*>(&inbox[0]);
46
+ boost::uint32_t msgSize = *reinterpret_cast<boost::uint32_t*>(&inbox[0]);
46
47
  msgSize = ntohl(msgSize);
47
48
 
48
49
  // Can't really handle zero-size messages. IMPR?!
@@ -240,7 +241,7 @@ void Gosu::CommSocket::send(const void* buffer, std::size_t size)
240
241
  // In managed mode, also send the length of the buffer.
241
242
  if (mode() == cmManaged)
242
243
  {
243
- unsigned long netSize = htonl(size);
244
+ boost::uint32_t netSize = htonl(size);
244
245
  const char* charBuf = reinterpret_cast<const char*>(&netSize);
245
246
  pimpl->outbox.insert(pimpl->outbox.end(), charBuf,
246
247
  charBuf + sizeof netSize);
@@ -21,7 +21,6 @@ Gosu::ListenerSocket::ListenerSocket(SocketPort port)
21
21
  sockaddr_in addr;
22
22
  std::memset(&addr, 0, sizeof addr);
23
23
  addr.sin_family = AF_INET;
24
- // addr.sin_addr.S_un.S_addr = ::htonl(INADDR_ANY);
25
24
  addr.sin_addr.s_addr = htonl(INADDR_ANY);
26
25
  addr.sin_port = htons(port);
27
26
  socketCheck(::bind(pimpl->socket.handle(),
@@ -18,20 +18,21 @@ Gosu::MessageSocket::MessageSocket(SocketPort port)
18
18
  sockaddr_in addr;
19
19
  std::memset(&addr, 0, sizeof addr);
20
20
  addr.sin_family = AF_INET;
21
- // addr.sin_addr.S_un.S_addr = ::htonl(INADDR_ANY);
22
21
  addr.sin_addr.s_addr = htonl(INADDR_ANY);
23
22
  addr.sin_port = htons(port);
24
23
  socketCheck(::bind(pimpl->socket.handle(),
25
24
  reinterpret_cast<sockaddr*>(&addr), sizeof addr));
26
25
 
27
- //FIXME: Unix: implement this. SO_MAX_MSG_SIZE not defined.
28
- #ifdef WIN32
29
26
  unsigned maxMessageSize;
30
- int size = sizeof maxMessageSize;
27
+ socklen_t size = sizeof maxMessageSize;
28
+ #ifdef GOSU_IS_WIN
31
29
  socketCheck(::getsockopt(pimpl->socket.handle(), SOL_SOCKET, SO_MAX_MSG_SIZE,
32
30
  reinterpret_cast<char*>(&maxMessageSize), &size));
31
+ #else
32
+ socketCheck(::getsockopt(pimpl->socket.handle(), SOL_SOCKET, SO_SNDBUF,
33
+ reinterpret_cast<char*>(&maxMessageSize), &size));
34
+ #endif
33
35
  pimpl->maxMessageSize = maxMessageSize;
34
- #endif
35
36
  }
36
37
 
37
38
  Gosu::MessageSocket::~MessageSocket()
@@ -58,17 +59,16 @@ void Gosu::MessageSocket::update()
58
59
  std::vector<char> buffer(maxMessageSize());
59
60
 
60
61
  sockaddr_in addr;
61
- int size = sizeof addr;
62
+ socklen_t size = sizeof addr;
62
63
 
63
64
  for (;;)
64
65
  {
65
66
  int received = ::recvfrom(pimpl->socket.handle(), &buffer.front(),
66
67
  buffer.size(), 0, reinterpret_cast<sockaddr*>(&addr),
67
- reinterpret_cast<socklen_t*>(&size));
68
+ &size);
68
69
 
69
70
  if (received != SOCKET_ERROR && onReceive)
70
71
  {
71
- // onReceive(::ntohl(addr.sin_addr.S_un.S_addr),
72
72
  onReceive(ntohl(addr.sin_addr.s_addr),
73
73
  ntohs(addr.sin_port), &buffer.front(), received);
74
74
  }
@@ -79,7 +79,6 @@ void Gosu::MessageSocket::update()
79
79
  case GOSU_SOCK_ERR(ENETDOWN):
80
80
  case GOSU_SOCK_ERR(ENETRESET):
81
81
  case GOSU_SOCK_ERR(ETIMEDOUT):
82
- // IMPR: "The application should close the socket..."??
83
82
  case GOSU_SOCK_ERR(ECONNRESET):
84
83
  return;
85
84
 
@@ -96,7 +95,6 @@ void Gosu::MessageSocket::send(SocketAddress address, SocketPort port,
96
95
  sockaddr_in addr;
97
96
  std::memset(&addr, 0, sizeof addr);
98
97
  addr.sin_family = AF_INET;
99
- // addr.sin_addr.S_un.S_addr = ::htonl(address);
100
98
  addr.sin_addr.s_addr = htonl(address);
101
99
  addr.sin_port = htons(port);
102
100
 
@@ -128,9 +126,3 @@ void Gosu::MessageSocket::send(SocketAddress address, SocketPort port,
128
126
  throwLastSocketError();
129
127
  }
130
128
  }
131
-
132
- /*void Gosu::MessageSocket::broadcast(SocketPort port,
133
- const void* buffer, std::size_t size)
134
- {
135
- assert(false);
136
- }*/
@@ -17,7 +17,6 @@
17
17
  #include <netdb.h>
18
18
  #include <sys/ioctl.h>
19
19
  #define GOSU_SOCK_ERR(code) code
20
- // IMPR: Macros ok?
21
20
  #define INVALID_SOCKET -1
22
21
  #define SOCKET_ERROR -1
23
22
  #define closesocket close
@@ -27,6 +27,8 @@ int main(int argc, char *argv[]) {
27
27
  return UIApplicationMain(argc, argv, nil, @"GosuAppDelegate");
28
28
  }
29
29
 
30
+ class Gosu::Audio {};
31
+
30
32
  struct Gosu::Window::Impl {
31
33
  ObjRef<NSAutoreleasePool> pool;
32
34
  ObjRef<UIWindow> window;
@@ -73,7 +75,6 @@ namespace
73
75
  }
74
76
 
75
77
  - (void)doTick:(NSTimer*)timer {
76
- windowInstance().audio().update();
77
78
  windowInstance().update();
78
79
  [gosuView drawView];
79
80
  [gosuView removeDeadTouches];
data/Rakefile CHANGED
@@ -19,6 +19,7 @@ COMMON_CPP_FILES = COMMON_FILES + FileList[
19
19
  COMMON_RUBY_FILES = COMMON_FILES + FileList[
20
20
  'lib/gosu.rb',
21
21
  'lib/gosu/patches.rb',
22
+ 'lib/gosu/swig_patches.rb',
22
23
  'examples/*.rb',
23
24
  'examples/media/*',
24
25
  'reference/rdoc/**/*'
@@ -242,13 +243,13 @@ namespace :win do
242
243
 
243
244
  WINDOWS_SPEC = Gem::Specification.new do |s|
244
245
  apply_gemspec_defaults s
245
- s.platform = 'x86-mswin32-60'
246
+ s.platform = 'i386-mingw32'#'x86-mswin32-60' ...you can always force the gem platform
246
247
  s.files = COMMON_RUBY_FILES + ['lib/gosu.for_1_8.so', 'lib/gosu.for_1_9.so', 'lib/fmod.dll']
247
248
  end
248
249
  Rake::GemPackageTask.new(WINDOWS_SPEC) { |t| t.package_dir = 'public/windows_gem' }
249
250
 
250
251
  task :release_gem => :gem do
251
- sh "gem push public/windows_gem/gosu-#{GOSU_VERSION}-x86-mswin32-60.gem"
252
+ sh "gem push public/windows_gem/gosu-#{GOSU_VERSION}-x86-mingw32.gem"
252
253
  end
253
254
  end
254
255
 
@@ -6,11 +6,14 @@ begin
6
6
  require "#{File.dirname(__FILE__)}/hotgosu.rb"
7
7
  elsif defined? RUBY_VERSION and RUBY_VERSION[0..2] == '1.9' then
8
8
  require "#{File.dirname(__FILE__)}/gosu.for_1_9.#{Config::CONFIG['DLEXT']}"
9
+ require "#{File.dirname(__FILE__)}/gosu/swig_patches.rb"
9
10
  else
10
11
  require "#{File.dirname(__FILE__)}/gosu.for_1_8.#{Config::CONFIG['DLEXT']}"
12
+ require "#{File.dirname(__FILE__)}/gosu/swig_patches.rb"
11
13
  end
12
14
  rescue LoadError => e
13
15
  require "#{File.dirname(__FILE__)}/gosu.custom.#{Config::CONFIG['DLEXT']}"
16
+ require "#{File.dirname(__FILE__)}/gosu/swig_patches.rb"
14
17
  end
15
18
 
16
19
  require "#{File.dirname(__FILE__)}/gosu/patches.rb"
@@ -1,9 +1,9 @@
1
1
  # Extend Numeric with simple angle conversion methods.
2
2
  class ::Numeric
3
- def gosu_to_radian_scale
3
+ def degrees_to_radians
4
4
  self * Math::PI / 180.0
5
5
  end
6
- def radian_scale_to_gosu
6
+ def radians_to_degrees
7
7
  self * 180.0 / Math::PI
8
8
  end
9
9
  def gosu_to_radians
@@ -51,3 +51,14 @@ class Gosu::Color
51
51
  FUCHSIA = Gosu::Color.new(0xffff00ff)
52
52
  CYAN = Gosu::Color.new(0xff00ffff)
53
53
  end
54
+
55
+ # Instance methods for button_id_to_char and char_to_button_id
56
+ class Gosu::Window
57
+ def button_id_to_char(id)
58
+ self.class.button_id_to_char(id)
59
+ end
60
+
61
+ def char_to_button_id(ch)
62
+ self.class.char_to_button_id(ch)
63
+ end
64
+ end
@@ -0,0 +1,21 @@
1
+ # SWIG workarounds
2
+ # These are offloaded into a separate file because rb_eval_string() is weird on Ruby 1.8.
3
+
4
+ # SWIG doesn't understand the C++ overloading.
5
+ class Gosu::Image
6
+ def self.from_text(*args)
7
+ args.size == 4 ? from_text4(*args) : from_text7(*args)
8
+ end
9
+ end
10
+
11
+ # Linux workaround: instead of declaring a constant, we declare a hidden function and
12
+ # call it when we need to define the constant. Otherwise, we get a weird libGL.so segfault.
13
+ module Gosu
14
+ def self.const_missing sym
15
+ if sym == :MAX_TEXTURE_SIZE then
16
+ const_set sym, __max_texture_size
17
+ else
18
+ super
19
+ end
20
+ end
21
+ end
@@ -2,7 +2,7 @@
2
2
  # Bogus extconf.rb to bridge rubygems to autoconf.
3
3
  # rubygems will call "make install" on the resulting makefile.
4
4
 
5
- if defined? RUBY_PLATFORM and RUBY_PLATFORM[0..4] == 'win32' then
5
+ if defined? RUBY_PLATFORM and (RUBY_PLATFORM[0..4] == 'win32' or RUBY_PLATFORM['-mingw32']) then
6
6
  puts 'This gem is not meant to be installed on Windows.'
7
7
  puts 'On Windows, please use:'
8
8
  puts 'gem install gosu --platform=mswin32'
@@ -83,7 +83,8 @@ window.onload = initDynSections;
83
83
  <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Represents the Z position of something drawn with Gosu's graphics system. <a href="#a2fd8fe9574c0ad3fd52557cb160be49"></a><br></td></tr>
84
84
  <tr><td colspan="2"><br><h2>Enumerations</h2></td></tr>
85
85
  <tr><td class="memItemLeft" nowrap align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespace_gosu.html#769656b1f560bc3d1bbdb47f8ca4eda9">Gosu::AlphaMode</a> { <a class="el" href="namespace_gosu.html#769656b1f560bc3d1bbdb47f8ca4eda9d1661cf5d3ba68fcbdca99f9dcc832e0">Gosu::amDefault</a>,
86
- <a class="el" href="namespace_gosu.html#769656b1f560bc3d1bbdb47f8ca4eda90032d35b3c2b35d16d3c59b6471c570b">Gosu::amAdditive</a>
86
+ <a class="el" href="namespace_gosu.html#769656b1f560bc3d1bbdb47f8ca4eda90032d35b3c2b35d16d3c59b6471c570b">Gosu::amAdditive</a>,
87
+ <a class="el" href="namespace_gosu.html#769656b1f560bc3d1bbdb47f8ca4eda9fec5394c25e9679849ee2e0bb9c26f81">Gosu::amMultiply</a>
87
88
  }</td></tr>
88
89
 
89
90
  <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Determines the way colors are combined when one is drawn onto another. <a href="namespace_gosu.html#769656b1f560bc3d1bbdb47f8ca4eda9">More...</a><br></td></tr>
@@ -99,7 +100,7 @@ window.onload = initDynSections;
99
100
  }</td></tr>
100
101
 
101
102
  <tr><td class="memItemLeft" nowrap align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespace_gosu.html#3b7f4d1f697d86c584543e455faeef82">Gosu::BorderFlags</a> { <br>
102
- &nbsp;&nbsp;<a class="el" href="namespace_gosu.html#3b7f4d1f697d86c584543e455faeef829ac43f03f1674539ef273f32ca937435">Gosu::bfSoft</a> = 0,
103
+ &nbsp;&nbsp;<a class="el" href="namespace_gosu.html#3b7f4d1f697d86c584543e455faeef8265b4f3aad6e1e7608633f6efe103f31c">Gosu::bfSmooth</a> = 0,
103
104
  <a class="el" href="namespace_gosu.html#3b7f4d1f697d86c584543e455faeef82590455ca5e98fcf73c1790b9f3b263d9">Gosu::bfTileableLeft</a> = 1,
104
105
  <a class="el" href="namespace_gosu.html#3b7f4d1f697d86c584543e455faeef82aea82bb0ad82263bb710045eb5c7d42f">Gosu::bfTileableTop</a> = 2,
105
106
  <a class="el" href="namespace_gosu.html#3b7f4d1f697d86c584543e455faeef825cffa52bde527c98e8a650e7c4fcf69b">Gosu::bfTileableRight</a> = 4,
@@ -79,36 +79,37 @@ window.onload = initDynSections;
79
79
  <a name="l00023"></a><a class="code" href="namespace_gosu.html#769656b1f560bc3d1bbdb47f8ca4eda9">00023</a> <span class="keyword">enum</span> <a class="code" href="namespace_gosu.html#769656b1f560bc3d1bbdb47f8ca4eda9" title="Determines the way colors are combined when one is drawn onto another.">AlphaMode</a>
80
80
  <a name="l00024"></a>00024 {
81
81
  <a name="l00027"></a><a class="code" href="namespace_gosu.html#769656b1f560bc3d1bbdb47f8ca4eda9d1661cf5d3ba68fcbdca99f9dcc832e0">00027</a> <a class="code" href="namespace_gosu.html#769656b1f560bc3d1bbdb47f8ca4eda9d1661cf5d3ba68fcbdca99f9dcc832e0" title="The color&amp;#39;s channels will be interpolated.">amDefault</a>,
82
- <a name="l00031"></a><a class="code" href="namespace_gosu.html#769656b1f560bc3d1bbdb47f8ca4eda90032d35b3c2b35d16d3c59b6471c570b">00031</a> <a class="code" href="namespace_gosu.html#769656b1f560bc3d1bbdb47f8ca4eda90032d35b3c2b35d16d3c59b6471c570b" title="The colors&amp;#39; channels will be added.">amAdditive</a>
83
- <a name="l00032"></a>00032 };
84
- <a name="l00033"></a>00033
85
- <a name="l00034"></a><a class="code" href="namespace_gosu.html#08da397ed09e759ba3392b7361cabe62">00034</a> <span class="keyword">enum</span> <a class="code" href="namespace_gosu.html#08da397ed09e759ba3392b7361cabe62">FontFlags</a>
86
- <a name="l00035"></a>00035 {
87
- <a name="l00036"></a><a class="code" href="namespace_gosu.html#08da397ed09e759ba3392b7361cabe62da182ed25a89bbc7d45fda9de06b116b">00036</a> <a class="code" href="namespace_gosu.html#08da397ed09e759ba3392b7361cabe62da182ed25a89bbc7d45fda9de06b116b">ffBold</a> = 1,
88
- <a name="l00037"></a><a class="code" href="namespace_gosu.html#08da397ed09e759ba3392b7361cabe626072b85a2eb251fce7571122d359f67a">00037</a> <a class="code" href="namespace_gosu.html#08da397ed09e759ba3392b7361cabe626072b85a2eb251fce7571122d359f67a">ffItalic</a> = 2,
89
- <a name="l00038"></a><a class="code" href="namespace_gosu.html#08da397ed09e759ba3392b7361cabe62a9d38282e9b20e83de9809e91ee1debb">00038</a> <a class="code" href="namespace_gosu.html#08da397ed09e759ba3392b7361cabe62a9d38282e9b20e83de9809e91ee1debb">ffUnderline</a> = 4
90
- <a name="l00039"></a>00039 };
91
- <a name="l00040"></a>00040
92
- <a name="l00041"></a><a class="code" href="namespace_gosu.html#6dc1926b8de6c2fb6bde3aa79ca42c76">00041</a> <span class="keyword">enum</span> <a class="code" href="namespace_gosu.html#6dc1926b8de6c2fb6bde3aa79ca42c76">TextAlign</a>
93
- <a name="l00042"></a>00042 {
94
- <a name="l00043"></a><a class="code" href="namespace_gosu.html#6dc1926b8de6c2fb6bde3aa79ca42c7618d3a7ccb2096af75fa830e2027db0e3">00043</a> <a class="code" href="namespace_gosu.html#6dc1926b8de6c2fb6bde3aa79ca42c7618d3a7ccb2096af75fa830e2027db0e3">taLeft</a>,
95
- <a name="l00044"></a><a class="code" href="namespace_gosu.html#6dc1926b8de6c2fb6bde3aa79ca42c766467bfa7cd1b3aadb5388acc6cebec4b">00044</a> <a class="code" href="namespace_gosu.html#6dc1926b8de6c2fb6bde3aa79ca42c766467bfa7cd1b3aadb5388acc6cebec4b">taRight</a>,
96
- <a name="l00045"></a><a class="code" href="namespace_gosu.html#6dc1926b8de6c2fb6bde3aa79ca42c76252ee035c25da51aef6d13f03b894520">00045</a> <a class="code" href="namespace_gosu.html#6dc1926b8de6c2fb6bde3aa79ca42c76252ee035c25da51aef6d13f03b894520">taCenter</a>,
97
- <a name="l00046"></a><a class="code" href="namespace_gosu.html#6dc1926b8de6c2fb6bde3aa79ca42c76ecfc2cbb13997bda64bff3be1f2e957f">00046</a> <a class="code" href="namespace_gosu.html#6dc1926b8de6c2fb6bde3aa79ca42c76ecfc2cbb13997bda64bff3be1f2e957f">taJustify</a>
98
- <a name="l00047"></a>00047 };
99
- <a name="l00048"></a>00048
100
- <a name="l00050"></a><a class="code" href="namespace_gosu.html#3b7f4d1f697d86c584543e455faeef82">00050</a> <span class="keyword">enum</span> <a class="code" href="namespace_gosu.html#3b7f4d1f697d86c584543e455faeef82" title="Flags that affect the tileability of an image.">BorderFlags</a>
101
- <a name="l00051"></a>00051 {
102
- <a name="l00052"></a><a class="code" href="namespace_gosu.html#3b7f4d1f697d86c584543e455faeef829ac43f03f1674539ef273f32ca937435">00052</a> <a class="code" href="namespace_gosu.html#3b7f4d1f697d86c584543e455faeef829ac43f03f1674539ef273f32ca937435">bfSoft</a> = 0,
103
- <a name="l00053"></a><a class="code" href="namespace_gosu.html#3b7f4d1f697d86c584543e455faeef82590455ca5e98fcf73c1790b9f3b263d9">00053</a> <a class="code" href="namespace_gosu.html#3b7f4d1f697d86c584543e455faeef82590455ca5e98fcf73c1790b9f3b263d9">bfTileableLeft</a> = 1,
104
- <a name="l00054"></a><a class="code" href="namespace_gosu.html#3b7f4d1f697d86c584543e455faeef82aea82bb0ad82263bb710045eb5c7d42f">00054</a> <a class="code" href="namespace_gosu.html#3b7f4d1f697d86c584543e455faeef82aea82bb0ad82263bb710045eb5c7d42f">bfTileableTop</a> = 2,
105
- <a name="l00055"></a><a class="code" href="namespace_gosu.html#3b7f4d1f697d86c584543e455faeef825cffa52bde527c98e8a650e7c4fcf69b">00055</a> <a class="code" href="namespace_gosu.html#3b7f4d1f697d86c584543e455faeef825cffa52bde527c98e8a650e7c4fcf69b">bfTileableRight</a> = 4,
106
- <a name="l00056"></a><a class="code" href="namespace_gosu.html#3b7f4d1f697d86c584543e455faeef823b1e203829e9cea96fed5b2497237e78">00056</a> <a class="code" href="namespace_gosu.html#3b7f4d1f697d86c584543e455faeef823b1e203829e9cea96fed5b2497237e78">bfTileableBottom</a> = 8,
107
- <a name="l00057"></a><a class="code" href="namespace_gosu.html#3b7f4d1f697d86c584543e455faeef829b7a4a2b58a5166aa501c86dd98a2e9b">00057</a> <a class="code" href="namespace_gosu.html#3b7f4d1f697d86c584543e455faeef829b7a4a2b58a5166aa501c86dd98a2e9b">bfTileable</a> = <a class="code" href="namespace_gosu.html#3b7f4d1f697d86c584543e455faeef82590455ca5e98fcf73c1790b9f3b263d9">bfTileableLeft</a> | <a class="code" href="namespace_gosu.html#3b7f4d1f697d86c584543e455faeef82aea82bb0ad82263bb710045eb5c7d42f">bfTileableTop</a> | <a class="code" href="namespace_gosu.html#3b7f4d1f697d86c584543e455faeef825cffa52bde527c98e8a650e7c4fcf69b">bfTileableRight</a> | <a class="code" href="namespace_gosu.html#3b7f4d1f697d86c584543e455faeef823b1e203829e9cea96fed5b2497237e78">bfTileableBottom</a>
108
- <a name="l00058"></a>00058 };
109
- <a name="l00059"></a>00059 }
110
- <a name="l00060"></a>00060
111
- <a name="l00061"></a>00061 <span class="preprocessor">#endif</span>
82
+ <a name="l00031"></a><a class="code" href="namespace_gosu.html#769656b1f560bc3d1bbdb47f8ca4eda90032d35b3c2b35d16d3c59b6471c570b">00031</a> <a class="code" href="namespace_gosu.html#769656b1f560bc3d1bbdb47f8ca4eda90032d35b3c2b35d16d3c59b6471c570b" title="The colors&amp;#39; channels will be added.">amAdditive</a>,
83
+ <a name="l00033"></a><a class="code" href="namespace_gosu.html#769656b1f560bc3d1bbdb47f8ca4eda9fec5394c25e9679849ee2e0bb9c26f81">00033</a> <a class="code" href="namespace_gosu.html#769656b1f560bc3d1bbdb47f8ca4eda9fec5394c25e9679849ee2e0bb9c26f81" title="The color&amp;#39;s channels will be multiplied with each other.">amMultiply</a>
84
+ <a name="l00034"></a>00034 };
85
+ <a name="l00035"></a>00035
86
+ <a name="l00036"></a><a class="code" href="namespace_gosu.html#08da397ed09e759ba3392b7361cabe62">00036</a> <span class="keyword">enum</span> <a class="code" href="namespace_gosu.html#08da397ed09e759ba3392b7361cabe62">FontFlags</a>
87
+ <a name="l00037"></a>00037 {
88
+ <a name="l00038"></a><a class="code" href="namespace_gosu.html#08da397ed09e759ba3392b7361cabe62da182ed25a89bbc7d45fda9de06b116b">00038</a> <a class="code" href="namespace_gosu.html#08da397ed09e759ba3392b7361cabe62da182ed25a89bbc7d45fda9de06b116b">ffBold</a> = 1,
89
+ <a name="l00039"></a><a class="code" href="namespace_gosu.html#08da397ed09e759ba3392b7361cabe626072b85a2eb251fce7571122d359f67a">00039</a> <a class="code" href="namespace_gosu.html#08da397ed09e759ba3392b7361cabe626072b85a2eb251fce7571122d359f67a">ffItalic</a> = 2,
90
+ <a name="l00040"></a><a class="code" href="namespace_gosu.html#08da397ed09e759ba3392b7361cabe62a9d38282e9b20e83de9809e91ee1debb">00040</a> <a class="code" href="namespace_gosu.html#08da397ed09e759ba3392b7361cabe62a9d38282e9b20e83de9809e91ee1debb">ffUnderline</a> = 4
91
+ <a name="l00041"></a>00041 };
92
+ <a name="l00042"></a>00042
93
+ <a name="l00043"></a><a class="code" href="namespace_gosu.html#6dc1926b8de6c2fb6bde3aa79ca42c76">00043</a> <span class="keyword">enum</span> <a class="code" href="namespace_gosu.html#6dc1926b8de6c2fb6bde3aa79ca42c76">TextAlign</a>
94
+ <a name="l00044"></a>00044 {
95
+ <a name="l00045"></a><a class="code" href="namespace_gosu.html#6dc1926b8de6c2fb6bde3aa79ca42c7618d3a7ccb2096af75fa830e2027db0e3">00045</a> <a class="code" href="namespace_gosu.html#6dc1926b8de6c2fb6bde3aa79ca42c7618d3a7ccb2096af75fa830e2027db0e3">taLeft</a>,
96
+ <a name="l00046"></a><a class="code" href="namespace_gosu.html#6dc1926b8de6c2fb6bde3aa79ca42c766467bfa7cd1b3aadb5388acc6cebec4b">00046</a> <a class="code" href="namespace_gosu.html#6dc1926b8de6c2fb6bde3aa79ca42c766467bfa7cd1b3aadb5388acc6cebec4b">taRight</a>,
97
+ <a name="l00047"></a><a class="code" href="namespace_gosu.html#6dc1926b8de6c2fb6bde3aa79ca42c76252ee035c25da51aef6d13f03b894520">00047</a> <a class="code" href="namespace_gosu.html#6dc1926b8de6c2fb6bde3aa79ca42c76252ee035c25da51aef6d13f03b894520">taCenter</a>,
98
+ <a name="l00048"></a><a class="code" href="namespace_gosu.html#6dc1926b8de6c2fb6bde3aa79ca42c76ecfc2cbb13997bda64bff3be1f2e957f">00048</a> <a class="code" href="namespace_gosu.html#6dc1926b8de6c2fb6bde3aa79ca42c76ecfc2cbb13997bda64bff3be1f2e957f">taJustify</a>
99
+ <a name="l00049"></a>00049 };
100
+ <a name="l00050"></a>00050
101
+ <a name="l00052"></a><a class="code" href="namespace_gosu.html#3b7f4d1f697d86c584543e455faeef82">00052</a> <span class="keyword">enum</span> <a class="code" href="namespace_gosu.html#3b7f4d1f697d86c584543e455faeef82" title="Flags that affect the tileability of an image.">BorderFlags</a>
102
+ <a name="l00053"></a>00053 {
103
+ <a name="l00054"></a><a class="code" href="namespace_gosu.html#3b7f4d1f697d86c584543e455faeef8265b4f3aad6e1e7608633f6efe103f31c">00054</a> <a class="code" href="namespace_gosu.html#3b7f4d1f697d86c584543e455faeef8265b4f3aad6e1e7608633f6efe103f31c">bfSmooth</a> = 0,
104
+ <a name="l00055"></a><a class="code" href="namespace_gosu.html#3b7f4d1f697d86c584543e455faeef82590455ca5e98fcf73c1790b9f3b263d9">00055</a> <a class="code" href="namespace_gosu.html#3b7f4d1f697d86c584543e455faeef82590455ca5e98fcf73c1790b9f3b263d9">bfTileableLeft</a> = 1,
105
+ <a name="l00056"></a><a class="code" href="namespace_gosu.html#3b7f4d1f697d86c584543e455faeef82aea82bb0ad82263bb710045eb5c7d42f">00056</a> <a class="code" href="namespace_gosu.html#3b7f4d1f697d86c584543e455faeef82aea82bb0ad82263bb710045eb5c7d42f">bfTileableTop</a> = 2,
106
+ <a name="l00057"></a><a class="code" href="namespace_gosu.html#3b7f4d1f697d86c584543e455faeef825cffa52bde527c98e8a650e7c4fcf69b">00057</a> <a class="code" href="namespace_gosu.html#3b7f4d1f697d86c584543e455faeef825cffa52bde527c98e8a650e7c4fcf69b">bfTileableRight</a> = 4,
107
+ <a name="l00058"></a><a class="code" href="namespace_gosu.html#3b7f4d1f697d86c584543e455faeef823b1e203829e9cea96fed5b2497237e78">00058</a> <a class="code" href="namespace_gosu.html#3b7f4d1f697d86c584543e455faeef823b1e203829e9cea96fed5b2497237e78">bfTileableBottom</a> = 8,
108
+ <a name="l00059"></a><a class="code" href="namespace_gosu.html#3b7f4d1f697d86c584543e455faeef829b7a4a2b58a5166aa501c86dd98a2e9b">00059</a> <a class="code" href="namespace_gosu.html#3b7f4d1f697d86c584543e455faeef829b7a4a2b58a5166aa501c86dd98a2e9b">bfTileable</a> = <a class="code" href="namespace_gosu.html#3b7f4d1f697d86c584543e455faeef82590455ca5e98fcf73c1790b9f3b263d9">bfTileableLeft</a> | <a class="code" href="namespace_gosu.html#3b7f4d1f697d86c584543e455faeef82aea82bb0ad82263bb710045eb5c7d42f">bfTileableTop</a> | <a class="code" href="namespace_gosu.html#3b7f4d1f697d86c584543e455faeef825cffa52bde527c98e8a650e7c4fcf69b">bfTileableRight</a> | <a class="code" href="namespace_gosu.html#3b7f4d1f697d86c584543e455faeef823b1e203829e9cea96fed5b2497237e78">bfTileableBottom</a>
109
+ <a name="l00060"></a>00060 };
110
+ <a name="l00061"></a>00061 }
111
+ <a name="l00062"></a>00062
112
+ <a name="l00063"></a>00063 <span class="preprocessor">#endif</span>
112
113
  </pre></div></div>
113
114
  <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>
114
115
  </div>
@@ -239,62 +239,55 @@ window.onload = initDynSections;
239
239
  <a name="l00192"></a>00192 <span class="keywordflow">return</span> *<span class="keyword">this</span>;
240
240
  <a name="l00193"></a>00193 }
241
241
  <a name="l00194"></a>00194
242
- <a name="l00195"></a><a class="code" href="class_gosu_1_1_buffer.html#87dc8af05b5c5073ef12bdf3368dcfe3">00195</a> 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="keyword"> </span>{
244
- <a name="l00197"></a>00197 <span class="keywordflow">return</span> buf.size();
245
- <a name="l00198"></a>00198 }
246
- <a name="l00199"></a>00199
247
- <a name="l00200"></a><a class="code" href="class_gosu_1_1_buffer.html#a2ba0896aa3e51d2d8ae30551288fabc">00200</a> <span class="keywordtype">void</span> <a class="code" href="class_gosu_1_1_buffer.html#a2ba0896aa3e51d2d8ae30551288fabc">resize</a>(std::size_t newSize)
248
- <a name="l00201"></a>00201 {
249
- <a name="l00202"></a>00202 buf.resize(newSize);
250
- <a name="l00203"></a>00203 }
251
- <a name="l00204"></a>00204
252
- <a name="l00205"></a>00205 <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,
253
- <a name="l00206"></a>00206 <span class="keywordtype">void</span>* destBuffer) <span class="keyword">const</span>;
254
- <a name="l00207"></a>00207
255
- <a name="l00208"></a>00208 <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,
256
- <a name="l00209"></a>00209 <span class="keyword">const</span> <span class="keywordtype">void</span>* sourceBuffer);
257
- <a name="l00210"></a>00210
258
- <a name="l00211"></a><a class="code" href="class_gosu_1_1_buffer.html#d488eb50bdec6f327dee18025dc95714">00211</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>
259
- <a name="l00212"></a>00212 <span class="keyword"> </span>{
260
- <a name="l00213"></a>00213 <span class="keywordflow">return</span> &amp;buf[0];
261
- <a name="l00214"></a>00214 }
262
- <a name="l00215"></a>00215
263
- <a name="l00216"></a><a class="code" href="class_gosu_1_1_buffer.html#e71074a520bb3939313b7610432c7358">00216</a> <span class="keywordtype">void</span>* <a class="code" href="class_gosu_1_1_buffer.html#d488eb50bdec6f327dee18025dc95714">data</a>()
264
- <a name="l00217"></a>00217 {
265
- <a name="l00218"></a>00218 <span class="keywordflow">return</span> &amp;buf[0];
266
- <a name="l00219"></a>00219 }
267
- <a name="l00220"></a>00220 };
268
- <a name="l00221"></a>00221
269
- <a name="l00222"></a><a class="code" href="namespace_gosu.html#f3bd16cebaf102e43f576d0a0ca1fcc3">00222</a> <span class="keyword">enum</span> <a class="code" href="namespace_gosu.html#f3bd16cebaf102e43f576d0a0ca1fcc3">FileMode</a>
270
- <a name="l00223"></a>00223 {
271
- <a name="l00226"></a><a class="code" href="namespace_gosu.html#f3bd16cebaf102e43f576d0a0ca1fcc3fc1f3aa93dd976dd43582892a36629d8">00226</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>,
272
- <a name="l00229"></a><a class="code" href="namespace_gosu.html#f3bd16cebaf102e43f576d0a0ca1fcc337d6ddaeba2138192b0ae84e0882a246">00229</a> <a class="code" href="namespace_gosu.html#f3bd16cebaf102e43f576d0a0ca1fcc337d6ddaeba2138192b0ae84e0882a246" title="Writes data to a file.">fmReplace</a>,
273
- <a name="l00232"></a><a class="code" href="namespace_gosu.html#f3bd16cebaf102e43f576d0a0ca1fcc3d09b16bbdaf86e8a38a7299abad2706d">00232</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>
274
- <a name="l00233"></a>00233 };
275
- <a name="l00234"></a>00234
276
- <a name="l00236"></a><a class="code" href="class_gosu_1_1_file.html">00236</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>
277
- <a name="l00237"></a>00237 {
278
- <a name="l00238"></a>00238 <span class="keyword">struct </span>Impl;
279
- <a name="l00239"></a>00239 boost::scoped_ptr&lt;Impl&gt; pimpl;
280
- <a name="l00240"></a>00240
281
- <a name="l00241"></a>00241 <span class="keyword">public</span>:
282
- <a name="l00242"></a>00242 <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&amp; 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>);
283
- <a name="l00243"></a>00243 <a class="code" href="class_gosu_1_1_file.html#33c8932235e2b46945a767025dc02edc">~File</a>();
284
- <a name="l00244"></a>00244
285
- <a name="l00245"></a>00245 std::size_t <a class="code" href="class_gosu_1_1_file.html#d3cb0b3153253936f11ae51da9032532">size</a>() <span class="keyword">const</span>;
286
- <a name="l00246"></a>00246 <span class="keywordtype">void</span> <a class="code" href="class_gosu_1_1_file.html#e8e557bc658ba2f2caca51517d461ee3">resize</a>(std::size_t newSize);
287
- <a name="l00247"></a>00247 <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,
288
- <a name="l00248"></a>00248 <span class="keywordtype">void</span>* destBuffer) <span class="keyword">const</span>;
289
- <a name="l00249"></a>00249 <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,
290
- <a name="l00250"></a>00250 <span class="keyword">const</span> <span class="keywordtype">void</span>* sourceBuffer);
291
- <a name="l00251"></a>00251 };
292
- <a name="l00252"></a>00252
293
- <a name="l00254"></a>00254 <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>&amp; buffer, <span class="keyword">const</span> std::wstring&amp; filename);
294
- <a name="l00256"></a>00256 <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>&amp; buffer, <span class="keyword">const</span> std::wstring&amp; filename);
295
- <a name="l00257"></a>00257 }
296
- <a name="l00258"></a>00258
297
- <a name="l00259"></a>00259 <span class="preprocessor">#endif</span>
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> &amp;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> &amp;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&lt;Impl&gt; 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&amp; 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>&amp; buffer, <span class="keyword">const</span> std::wstring&amp; 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>&amp; buffer, <span class="keyword">const</span> std::wstring&amp; filename);
288
+ <a name="l00250"></a>00250 }
289
+ <a name="l00251"></a>00251
290
+ <a name="l00252"></a>00252 <span class="preprocessor">#endif</span>
298
291
  </pre></div></div>
299
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>
300
293
  </div>
@@ -89,16 +89,16 @@ window.onload = initDynSections;
89
89
  <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns a real value between min (inclusive) and max (exclusive). <a href="#6c855080566f7f1b1967c90805249dda"></a><br></td></tr>
90
90
  <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>
91
91
 
92
- <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Translates between Gosu's angle system and radians. <a href="#2f8e80b399a0c5ba42667f22e7f2ba2f"></a><br></td></tr>
92
+ <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Translates between Gosu's angle system (where 0� is at the top) and radians (where 0 is at the right). <a href="#2f8e80b399a0c5ba42667f22e7f2ba2f"></a><br></td></tr>
93
93
  <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>
94
94
 
95
- <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Translates between Gosu's angle system and radians. <a href="#a853d9351f1568d0a949b2b7717e1e6a"></a><br></td></tr>
96
- <tr><td class="memItemLeft" nowrap align="right" valign="top">double&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespace_gosu.html#9bc4301aa5fa2c2a49e81550fcb1896f">Gosu::gosuToRadianScale</a> (double angle)</td></tr>
95
+ <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Translates between Gosu's angle system (where 0� is at the top) and radians (where 0 is at the right). <a href="#a853d9351f1568d0a949b2b7717e1e6a"></a><br></td></tr>
96
+ <tr><td class="memItemLeft" nowrap align="right" valign="top">double&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespace_gosu.html#dbafc76f69ec3bd403f68f50dbc6d5e4">Gosu::degreesToRadians</a> (double angle)</td></tr>
97
97
 
98
- <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Translates between Gosu's angle scaling and radians, i.e. <a href="#9bc4301aa5fa2c2a49e81550fcb1896f"></a><br></td></tr>
99
- <tr><td class="memItemLeft" nowrap align="right" valign="top">double&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespace_gosu.html#00bce97df13e74be6f27e4a1befe2ea4">Gosu::radiansScaleToGosu</a> (double angle)</td></tr>
98
+ <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Translates between degrees (used by <a class="el" href="namespace_gosu.html" title="The library&#39;s main namespace.">Gosu</a>) and radians, i.e. <a href="#dbafc76f69ec3bd403f68f50dbc6d5e4"></a><br></td></tr>
99
+ <tr><td class="memItemLeft" nowrap align="right" valign="top">double&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespace_gosu.html#90706a5c3dc1016b5397db75ab15e678">Gosu::radiansToDegrees</a> (double angle)</td></tr>
100
100
 
101
- <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Translates between Gosu's angle scaling and radians, i.e. <a href="#00bce97df13e74be6f27e4a1befe2ea4"></a><br></td></tr>
101
+ <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Translates between degrees (used by <a class="el" href="namespace_gosu.html" title="The library&#39;s main namespace.">Gosu</a>) and radians, i.e. <a href="#90706a5c3dc1016b5397db75ab15e678"></a><br></td></tr>
102
102
  <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>
103
103
 
104
104
  <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>