gosu 0.7.47.1 → 0.7.48

Sign up to get free protection for your applications and to get access to all the features.
Files changed (52) hide show
  1. checksums.yaml +4 -4
  2. data/Gosu/ImageData.hpp +2 -1
  3. data/Gosu/Version.hpp +25 -25
  4. data/GosuImpl/Audio/ALChannelManagement.hpp +1 -1
  5. data/GosuImpl/Audio/AudioOpenAL.cpp +5 -5
  6. data/GosuImpl/Audio/AudioOpenAL.mm +1 -1
  7. data/GosuImpl/Audio/AudioToolboxFile.hpp +2 -2
  8. data/GosuImpl/Audio/OggFile.hpp +1 -1
  9. data/GosuImpl/DirectoriesMac.mm +1 -1
  10. data/GosuImpl/DirectoriesTouch.mm +1 -1
  11. data/GosuImpl/Graphics/BitmapApple.mm +1 -1
  12. data/GosuImpl/Graphics/BlockAllocator.cpp +8 -3
  13. data/GosuImpl/Graphics/BlockAllocator.hpp +2 -1
  14. data/GosuImpl/Graphics/ClipRectStack.hpp +1 -1
  15. data/GosuImpl/Graphics/DrawOp.hpp +3 -3
  16. data/GosuImpl/Graphics/DrawOpQueue.hpp +4 -4
  17. data/GosuImpl/Graphics/Font.cpp +2 -2
  18. data/GosuImpl/Graphics/GosuView.mm +2 -2
  19. data/GosuImpl/Graphics/Graphics.cpp +7 -8
  20. data/GosuImpl/Graphics/Image.cpp +3 -0
  21. data/GosuImpl/Graphics/LargeImageData.cpp +2 -2
  22. data/GosuImpl/Graphics/LargeImageData.hpp +6 -0
  23. data/GosuImpl/Graphics/Macro.hpp +7 -2
  24. data/GosuImpl/Graphics/RenderState.hpp +2 -2
  25. data/GosuImpl/Graphics/TexChunk.cpp +25 -7
  26. data/GosuImpl/Graphics/TexChunk.hpp +5 -1
  27. data/GosuImpl/Graphics/Text.cpp +2 -2
  28. data/GosuImpl/Graphics/TextTouch.mm +1 -1
  29. data/GosuImpl/Graphics/Texture.cpp +10 -7
  30. data/GosuImpl/Graphics/Texture.hpp +5 -5
  31. data/GosuImpl/Graphics/Transform.cpp +1 -1
  32. data/GosuImpl/Graphics/TransformStack.hpp +1 -1
  33. data/GosuImpl/Input/AccelerometerReader.mm +1 -1
  34. data/GosuImpl/InputMac.mm +1 -1
  35. data/GosuImpl/InputTouch.mm +3 -3
  36. data/GosuImpl/Orientation.mm +1 -1
  37. data/GosuImpl/RubyGosu.swg +6 -0
  38. data/GosuImpl/RubyGosu_wrap.cxx +87 -30
  39. data/GosuImpl/RubyGosu_wrap.h +1 -1
  40. data/GosuImpl/Sockets/CommSocket.cpp +1 -1
  41. data/GosuImpl/Sockets/ListenerSocket.cpp +1 -1
  42. data/GosuImpl/Sockets/MessageSocket.cpp +1 -1
  43. data/GosuImpl/Sockets/Socket.cpp +1 -1
  44. data/GosuImpl/Sockets/{Sockets.hpp → Socket.hpp} +0 -0
  45. data/GosuImpl/TextInputMac.mm +1 -1
  46. data/GosuImpl/Utility.cpp +1 -1
  47. data/GosuImpl/UtilityApple.mm +1 -1
  48. data/GosuImpl/WindowMac.mm +25 -14
  49. data/GosuImpl/WindowTouch.mm +2 -2
  50. data/linux/extconf.rb +35 -23
  51. data/reference/gosu.rb +142 -36
  52. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA512:
3
- metadata.gz: 46f962dcbee435df36c0b90f2c9a7f0eb0697affd20202a9b3f0b74438cef81715a549d4f40922ee0fc6f54472d80a43dbb220610092b17bb16b79674f93d657
4
- data.tar.gz: 65c994b275f5c0c3cbb131f5c9071ffa51f62a63123efa78cc945b90c5a4305135e77776caf29a63e822909bff6048b2ec333db5c68ff5f032be69395e0cb9c8
3
+ metadata.gz: 12757ae26d02d3cad60c1062c94d9a66d5ad2ecbfebea61eee6a3e92ec35127f4a60a89e536be7cc212962e0feb2d721a744f5a7f604db4682ce2fa532487e03
4
+ data.tar.gz: 83b6d27a97e32233878676f797275e593efd5946fe5e41c093937e20bb6767f969e257693b5df4fd071883aa7ed14b8a545567cd57bf199058b4a54b92503174
5
5
  SHA1:
6
- metadata.gz: 5717d9bb26797d0752706336725a51bb7d1569a0
7
- data.tar.gz: 1ace5dbeaf66ffa54ae91e4767edf113d84035a3
6
+ metadata.gz: 4cc0bdd7ce334c6f0d65250719b6f44a3965eaf2
7
+ data.tar.gz: 1b6a3594dd5ab71455bec96cf0d345bcd0e4cc42
@@ -51,7 +51,8 @@ namespace Gosu
51
51
  virtual const GLTexInfo* glTexInfo() const = 0;
52
52
  virtual Bitmap toBitmap() const = 0;
53
53
 
54
- //! Experimental and undocumented for now.
54
+ virtual std::auto_ptr<ImageData> subimage(int x, int y, int width, int height) const = 0;
55
+
55
56
  virtual void insert(const Bitmap& bitmap, int x, int y) = 0;
56
57
  };
57
58
  }
@@ -3,8 +3,8 @@
3
3
 
4
4
  #define GOSU_MAJOR_VERSION 0
5
5
  #define GOSU_MINOR_VERSION 7
6
- #define GOSU_POINT_VERSION 47
7
- #define GOSU_VERSION "0.7.47.1"
6
+ #define GOSU_POINT_VERSION 48
7
+ #define GOSU_VERSION "0.7.48"
8
8
 
9
9
  #define GOSU_COPYRIGHT_NOTICE \
10
10
  " " \
@@ -103,7 +103,7 @@
103
103
  "\n\n" \
104
104
  " The precise terms and conditions for copying, distribution and" \
105
105
  "modification follow. Pay close attention to the difference between a" \
106
- "\n\n"work based on the library" and a "work that uses the library". The" \
106
+ "\"work based on the library\" and a \"work that uses the library\". The" \
107
107
  "former contains code derived from the library, while the latter only" \
108
108
  "works together with the library." \
109
109
  "\n\n" \
@@ -116,22 +116,22 @@
116
116
  " 0. This License Agreement applies to any software library which" \
117
117
  "contains a notice placed by the copyright holder or other authorized" \
118
118
  "party saying it may be distributed under the terms of this Library" \
119
- "General Public License (also called "this License"). Each licensee is" \
120
- "addressed as "you"." \
119
+ "General Public License (also called \"this License\"). Each licensee is" \
120
+ "addressed as \"you\"." \
121
121
  "\n\n" \
122
- " A "library" means a collection of software functions and/or data" \
122
+ " A \"library\" means a collection of software functions and/or data" \
123
123
  "prepared so as to be conveniently linked with application programs" \
124
124
  "(which use some of those functions and data) to form executables." \
125
125
  "\n\n" \
126
- " The "Library", below, refers to any such software library or work" \
127
- "which has been distributed under these terms. A "work based on the" \
128
- "Library" means either the Library or any derivative work under" \
126
+ " The \"Library\", below, refers to any such software library or work" \
127
+ "which has been distributed under these terms. A \"work based on the" \
128
+ "Library\" means either the Library or any derivative work under" \
129
129
  "copyright law: that is to say, a work containing the Library or a" \
130
130
  "portion of it, either verbatim or with modifications and/or translated" \
131
131
  "straightforwardly into another language. (Hereinafter, translation is" \
132
- "included without limitation in the term "modification".)" \
132
+ "included without limitation in the term \"modification\".)" \
133
133
  "\n\n" \
134
- " "Source code" for a work means the preferred form of the work for" \
134
+ " \"Source code\" for a work means the preferred form of the work for" \
135
135
  "making modifications to it. For a library, complete source code means" \
136
136
  "all the source code for all modules it contains, plus any associated" \
137
137
  "interface definition files, plus the scripts used to control compilation" \
@@ -237,17 +237,17 @@
237
237
  "\n\n" \
238
238
  " 5. A program that contains no derivative of any portion of the" \
239
239
  "Library, but is designed to work with the Library by being compiled or" \
240
- "linked with it, is called a "work that uses the Library". Such a" \
240
+ "linked with it, is called a \"work that uses the Library\". Such a" \
241
241
  "work, in isolation, is not a derivative work of the Library, and" \
242
242
  "therefore falls outside the scope of this License." \
243
243
  "\n\n" \
244
- " However, linking a "work that uses the Library" with the Library" \
244
+ " However, linking a \"work that uses the Library\" with the Library" \
245
245
  "creates an executable that is a derivative of the Library (because it" \
246
- "contains portions of the Library), rather than a "work that uses the" \
247
- "library". The executable is therefore covered by this License." \
246
+ "contains portions of the Library), rather than a \"work that uses the" \
247
+ "library\". The executable is therefore covered by this License." \
248
248
  "Section 6 states terms for distribution of such executables." \
249
249
  "\n\n" \
250
- " When a "work that uses the Library" uses material from a header file" \
250
+ " When a \"work that uses the Library\" uses material from a header file" \
251
251
  "that is part of the Library, the object code for the work may be a" \
252
252
  "derivative work of the Library even though the source code is not." \
253
253
  "Whether this is true is especially significant if the work can be" \
@@ -267,7 +267,7 @@
267
267
  "whether or not they are linked directly with the Library itself." \
268
268
  " " \
269
269
  " 6. As an exception to the Sections above, you may also compile or" \
270
- "link a "work that uses the Library" with the Library to produce a" \
270
+ "link a \"work that uses the Library\" with the Library to produce a" \
271
271
  "work containing portions of the Library, and distribute that work" \
272
272
  "under terms of your choice, provided that the terms permit" \
273
273
  "modification of the work for the customer's own use and reverse" \
@@ -285,8 +285,8 @@
285
285
  " machine-readable source code for the Library including whatever" \
286
286
  " changes were used in the work (which must be distributed under" \
287
287
  " Sections 1 and 2 above); and, if the work is an executable linked" \
288
- " with the Library, with the complete machine-readable "work that" \
289
- " uses the Library", as object code and/or source code, so that the" \
288
+ " with the Library, with the complete machine-readable \"work that" \
289
+ " uses the Library\", as object code and/or source code, so that the" \
290
290
  " user can modify the Library and then relink to produce a modified" \
291
291
  " executable containing the modified Library. (It is understood" \
292
292
  " that the user who changes the contents of definitions files in the" \
@@ -305,8 +305,8 @@
305
305
  " d) Verify that the user has already received a copy of these" \
306
306
  " materials or that you have already sent this user a copy." \
307
307
  "\n\n" \
308
- " For an executable, the required form of the "work that uses the" \
309
- "Library" must include any data and utility programs needed for" \
308
+ " For an executable, the required form of the \"work that uses the" \
309
+ "Library\" must include any data and utility programs needed for" \
310
310
  "reproducing the executable from it. However, as a special exception," \
311
311
  "the source code distributed need not include anything that is normally" \
312
312
  "distributed (in either source or binary form) with the major" \
@@ -407,7 +407,7 @@
407
407
  "\n\n" \
408
408
  "Each version is given a distinguishing version number. If the Library" \
409
409
  "specifies a version number of this License which applies to it and" \
410
- "\n\n"any later version", you have the option of following the terms and" \
410
+ "\"any later version\", you have the option of following the terms and" \
411
411
  "conditions either of that version or of any later version published by" \
412
412
  "the Free Software Foundation. If the Library does not specify a" \
413
413
  "license version number, you may choose any version ever published by" \
@@ -427,7 +427,7 @@
427
427
  " 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO" \
428
428
  "WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW." \
429
429
  "EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR" \
430
- "OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY" \
430
+ "OTHER PARTIES PROVIDE THE LIBRARY \"AS IS\" WITHOUT WARRANTY OF ANY" \
431
431
  "KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE" \
432
432
  "IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR" \
433
433
  "PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE" \
@@ -458,7 +458,7 @@
458
458
  " To apply these terms, attach the following notices to the library. It is" \
459
459
  "safest to attach them to the start of each source file to most effectively" \
460
460
  "convey the exclusion of warranty; and each file should have at least the" \
461
- "\n\n"copyright" line and a pointer to where the full notice is found." \
461
+ "\"copyright\" line and a pointer to where the full notice is found." \
462
462
  "\n\n" \
463
463
  " <one line to give the library's name and a brief idea of what it does.>" \
464
464
  " Copyright (C) <year> <name of author>" \
@@ -480,7 +480,7 @@
480
480
  "Also add information on how to contact you by electronic and paper mail." \
481
481
  "\n\n" \
482
482
  "You should also get your employer (if you work as a programmer) or your" \
483
- "school, if any, to sign a "copyright disclaimer" for the library, if" \
483
+ "school, if any, to sign a \"copyright disclaimer\" for the library, if" \
484
484
  "necessary. Here is a sample; alter the names:" \
485
485
  "\n\n" \
486
486
  " Yoyodyne, Inc., hereby disclaims all copyright interest in the" \
@@ -2,7 +2,7 @@
2
2
  #ifdef GOSU_IS_MAC
3
3
  #include <OpenAL/al.h>
4
4
  #include <OpenAL/alc.h>
5
- #include <GosuImpl/MacUtility.hpp>
5
+ #include "../MacUtility.hpp"
6
6
  #else
7
7
  #include <AL/al.h>
8
8
  #include <AL/alc.h>
@@ -1,5 +1,5 @@
1
- #include <GosuImpl/Audio/ALChannelManagement.hpp>
2
- #include <GosuImpl/Audio/OggFile.hpp>
1
+ #include "ALChannelManagement.hpp"
2
+ #include "OggFile.hpp"
3
3
 
4
4
  #include <Gosu/Audio.hpp>
5
5
  #include <Gosu/Math.hpp>
@@ -18,12 +18,12 @@
18
18
  #include <OpenAL/al.h>
19
19
  #include <OpenAL/alc.h>
20
20
  #import <Foundation/Foundation.h>
21
- #include <GosuImpl/Audio/AudioToolboxFile.hpp>
21
+ #include "AudioToolboxFile.hpp"
22
22
  #define WAVE_FILE AudioToolboxFile
23
23
  #else
24
24
  #include <AL/al.h>
25
25
  #include <AL/alc.h>
26
- #include <GosuImpl/Audio/SndFile.hpp>
26
+ #include "SndFile.hpp"
27
27
  #define WAVE_FILE SndFile
28
28
  #endif
29
29
 
@@ -57,7 +57,7 @@ namespace
57
57
 
58
58
  // TODO: What is the NSAutoreleasePool good for?
59
59
  #ifdef GOSU_IS_MAC
60
- #include <GosuImpl/MacUtility.hpp>
60
+ #include "MacUtility.hpp"
61
61
  #define CONSTRUCTOR_COMMON \
62
62
  ObjRef<NSAutoreleasePool> pool([[NSAutoreleasePool alloc] init]); \
63
63
  if (!alChannelManagement.get()) \
@@ -1 +1 @@
1
- #include <GosuImpl/Audio/AudioOpenAL.cpp>
1
+ #include "AudioOpenAL.cpp"
@@ -1,13 +1,13 @@
1
1
  #ifndef GOSU_AUDIO_AUDIOFILE_MAC_HPP
2
2
  #define GOSU_AUDIO_AUDIOFILE_MAC_HPP
3
3
 
4
- #include <GosuImpl/Audio/AudioFile.hpp>
4
+ #include "AudioFile.hpp"
5
5
  #include <AudioToolbox/AudioToolbox.h>
6
6
  #include <AudioToolbox/AudioConverter.h>
7
7
  #include <AudioToolbox/ExtendedAudioFile.h>
8
8
  #include <OpenAL/al.h>
9
9
  #include <Gosu/IO.hpp>
10
- #include <GosuImpl/MacUtility.hpp>
10
+ #include "MacUtility.hpp"
11
11
  #include <Gosu/Utility.hpp>
12
12
  #include <Gosu/Platform.hpp>
13
13
  #include <algorithm>
@@ -1,7 +1,7 @@
1
1
  #ifndef GOSUIMPL_AUDIO_OGGFILE_HPP
2
2
  #define GOSUIMPL_AUDIO_OGGFILE_HPP
3
3
 
4
- #include <GosuImpl/Audio/AudioFile.hpp>
4
+ #include "AudioFile.hpp"
5
5
  #include <Gosu/IO.hpp>
6
6
  #include <vorbis/vorbisfile.h>
7
7
  #include <algorithm>
@@ -1,5 +1,5 @@
1
1
  #import <Gosu/Directories.hpp>
2
- #import <GosuImpl/MacUtility.hpp>
2
+ #import "MacUtility.hpp"
3
3
  #import <Gosu/Utility.hpp>
4
4
  #import <Foundation/NSAutoreleasePool.h>
5
5
  #import <Foundation/NSBundle.h>
@@ -1,6 +1,6 @@
1
1
  #import <Gosu/Directories.hpp>
2
2
  #import <Gosu/Utility.hpp>
3
- #import <GosuImpl/MacUtility.hpp>
3
+ #import "MacUtility.hpp"
4
4
  #import <Foundation/Foundation.h>
5
5
 
6
6
  std::wstring Gosu::userSettingsPrefix()
@@ -4,7 +4,7 @@
4
4
  #include <Gosu/Platform.hpp>
5
5
  #include <Gosu/Utility.hpp>
6
6
 
7
- #include <GosuImpl/MacUtility.hpp>
7
+ #include "MacUtility.hpp"
8
8
  #include <stdexcept>
9
9
 
10
10
  #ifdef GOSU_IS_IPHONE
@@ -1,4 +1,4 @@
1
- #include <GosuImpl/Graphics/BlockAllocator.hpp>
1
+ #include "BlockAllocator.hpp"
2
2
  #include <stdexcept>
3
3
  #include <vector>
4
4
 
@@ -118,12 +118,17 @@ bool Gosu::BlockAllocator::alloc(unsigned aWidth, unsigned aHeight, Block& b)
118
118
  return false;
119
119
  }
120
120
 
121
- void Gosu::BlockAllocator::free(unsigned left, unsigned top)
121
+ void Gosu::BlockAllocator::block(unsigned left, unsigned top, unsigned width, unsigned height)
122
+ {
123
+ pimpl->blocks.push_back(Block(left, top, width, height));
124
+ }
125
+
126
+ void Gosu::BlockAllocator::free(unsigned left, unsigned top, unsigned width, unsigned height)
122
127
  {
123
128
  for (Impl::Blocks::iterator i = pimpl->blocks.begin();
124
129
  i != pimpl->blocks.end(); ++i)
125
130
  {
126
- if (i->left == left && i->top == top)
131
+ if (i->left == left && i->top == top && i->width == width && i->height == height)
127
132
  {
128
133
  pimpl->blocks.erase(i);
129
134
  // Be optimistic again!
@@ -26,7 +26,8 @@ namespace Gosu
26
26
  unsigned height() const;
27
27
 
28
28
  bool alloc(unsigned width, unsigned height, Block& block);
29
- void free(unsigned left, unsigned top);
29
+ void block(unsigned left, unsigned top, unsigned width, unsigned height);
30
+ void free(unsigned left, unsigned top, unsigned width, unsigned height);
30
31
  };
31
32
  }
32
33
 
@@ -1,7 +1,7 @@
1
1
  #ifndef GOSUIMPL_GRAPHICS_CLIPRECTSTACK_HPP
2
2
  #define GOSUIMPL_GRAPHICS_CLIPRECTSTACK_HPP
3
3
 
4
- #include <GosuImpl/Graphics/Common.hpp>
4
+ #include "Common.hpp"
5
5
  #include <cassert>
6
6
  #include <vector>
7
7
 
@@ -3,9 +3,9 @@
3
3
 
4
4
  #include <Gosu/GraphicsBase.hpp>
5
5
  #include <Gosu/Color.hpp>
6
- #include <GosuImpl/Graphics/Common.hpp>
7
- #include <GosuImpl/Graphics/RenderState.hpp>
8
- #include <GosuImpl/Graphics/TexChunk.hpp>
6
+ #include "Common.hpp"
7
+ #include "RenderState.hpp"
8
+ #include "TexChunk.hpp"
9
9
  #include <cassert>
10
10
 
11
11
  namespace Gosu
@@ -2,10 +2,10 @@
2
2
  #define GOSUIMPL_GRAPHICS_DRAWOPQUEUE_HPP
3
3
 
4
4
  #include <Gosu/TR1.hpp>
5
- #include <GosuImpl/Graphics/Common.hpp>
6
- #include <GosuImpl/Graphics/TransformStack.hpp>
7
- #include <GosuImpl/Graphics/ClipRectStack.hpp>
8
- #include <GosuImpl/Graphics/DrawOp.hpp>
5
+ #include "Common.hpp"
6
+ #include "TransformStack.hpp"
7
+ #include "ClipRectStack.hpp"
8
+ #include "DrawOp.hpp"
9
9
  #include <cassert>
10
10
  #include <algorithm>
11
11
  #include <map>
@@ -4,8 +4,8 @@
4
4
  #include <Gosu/Math.hpp>
5
5
  #include <Gosu/Text.hpp>
6
6
  #include <Gosu/TR1.hpp>
7
- #include <GosuImpl/Graphics/Common.hpp>
8
- #include <GosuImpl/Graphics/FormattedString.hpp>
7
+ #include "Common.hpp"
8
+ #include "FormattedString.hpp"
9
9
  #include <cassert>
10
10
  #include <map>
11
11
  using namespace std;
@@ -3,8 +3,8 @@
3
3
  #import <UIKit/UIKit.h>
4
4
 
5
5
  #import <Gosu/Graphics.hpp>
6
- #import <GosuImpl/Graphics/Common.hpp>
7
- #import <GosuImpl/Graphics/GosuView.hpp>
6
+ #import "Common.hpp"
7
+ #import "GosuView.hpp"
8
8
 
9
9
  Gosu::Window& windowInstance();
10
10
 
@@ -1,10 +1,10 @@
1
1
  #include <Gosu/Graphics.hpp>
2
- #include <GosuImpl/Graphics/Common.hpp>
3
- #include <GosuImpl/Graphics/DrawOp.hpp>
4
- #include <GosuImpl/Graphics/Texture.hpp>
5
- #include <GosuImpl/Graphics/TexChunk.hpp>
6
- #include <GosuImpl/Graphics/LargeImageData.hpp>
7
- #include <GosuImpl/Graphics/Macro.hpp>
2
+ #include "Common.hpp"
3
+ #include "DrawOp.hpp"
4
+ #include "Texture.hpp"
5
+ #include "TexChunk.hpp"
6
+ #include "LargeImageData.hpp"
7
+ #include "Macro.hpp"
8
8
  #include <Gosu/Bitmap.hpp>
9
9
  #include <Gosu/Image.hpp>
10
10
  #include <Gosu/Platform.hpp>
@@ -16,8 +16,7 @@
16
16
  #include <limits>
17
17
 
18
18
  #ifdef GOSU_IS_IPHONE
19
- #import <UIKit/UIKit.h>
20
- #include <GosuImpl/Orientation.hpp>
19
+ #include "../Orientation.hpp"
21
20
  #endif
22
21
 
23
22
  struct Gosu::Graphics::Impl
@@ -4,6 +4,7 @@
4
4
  #include <Gosu/ImageData.hpp>
5
5
  #include <Gosu/Math.hpp>
6
6
  #include <Gosu/IO.hpp>
7
+ #include <stdexcept>
7
8
 
8
9
  Gosu::Image::Image(Graphics& graphics, const std::wstring& filename, bool tileable)
9
10
  {
@@ -40,6 +41,8 @@ Gosu::Image::Image(Graphics& graphics, const Bitmap& source,
40
41
  Gosu::Image::Image(std::auto_ptr<ImageData> data)
41
42
  : data(data.release())
42
43
  {
44
+ if (this->data.get() == 0)
45
+ throw std::invalid_argument("Gosu::Image cannot be initialized with an ImageData null pointer");
43
46
  }
44
47
 
45
48
  unsigned Gosu::Image::width() const
@@ -1,5 +1,5 @@
1
- #include <GosuImpl/Graphics/LargeImageData.hpp>
2
- #include <GosuImpl/Graphics/Common.hpp>
1
+ #include "LargeImageData.hpp"
2
+ #include "Common.hpp"
3
3
  #include <Gosu/Bitmap.hpp>
4
4
  #include <Gosu/Graphics.hpp>
5
5
  #include <Gosu/Math.hpp>
@@ -4,6 +4,7 @@
4
4
  #include <Gosu/Fwd.hpp>
5
5
  #include <Gosu/ImageData.hpp>
6
6
  #include <Gosu/TR1.hpp>
7
+ #include <stdexcept>
7
8
  #include <vector>
8
9
 
9
10
  namespace Gosu
@@ -31,6 +32,11 @@ namespace Gosu
31
32
  return 0;
32
33
  }
33
34
 
35
+ std::auto_ptr<ImageData> subimage(int x, int y, int w, int h) const
36
+ {
37
+ return std::auto_ptr<ImageData>();
38
+ }
39
+
34
40
  Bitmap toBitmap() const;
35
41
  void insert(const Bitmap& bitmap, int x, int y);
36
42
  };
@@ -4,8 +4,8 @@
4
4
  #include <Gosu/Fwd.hpp>
5
5
  #include <Gosu/ImageData.hpp>
6
6
  #include <Gosu/TR1.hpp>
7
- #include <GosuImpl/Graphics/Common.hpp>
8
- #include <GosuImpl/Graphics/DrawOpQueue.hpp>
7
+ #include "Common.hpp"
8
+ #include "DrawOpQueue.hpp"
9
9
  #include <cmath>
10
10
  #include <algorithm>
11
11
  #include <memory>
@@ -227,6 +227,11 @@ public:
227
227
  throw std::logic_error("Gosu::Macro cannot be rendered as Gosu::Bitmap yet");
228
228
  }
229
229
 
230
+ std::auto_ptr<ImageData> subimage(int x, int y, int width, int height) const
231
+ {
232
+ return std::auto_ptr<ImageData>();
233
+ }
234
+
230
235
  void insert(const Bitmap& bitmap, int x, int y)
231
236
  {
232
237
  throw std::logic_error("Gosu::Macro cannot be updated with a Gosu::Bitmap yet");