gosu 0.13.0 → 0.13.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 41378387cae1afdcfbfeab14e6adea7ad61aa1e6
4
- data.tar.gz: b83153c5f9208a2a201154f012c0135f25238b3e
3
+ metadata.gz: 633b9e1b7fba4d14c3b2f42f801c25431f5e8f9a
4
+ data.tar.gz: 3f4857d3f306387fb734d92bd5c46d8eea163828
5
5
  SHA512:
6
- metadata.gz: fccec2f1c9755fe8133d02a4b3f2e31789681938a59a41893a6d247ff29a3fdb68d1c5848390c63dfdb490259b552cd05c2d1833cfdd11533d28d1be07817be2
7
- data.tar.gz: 6542882a5ef52f9360444efe0513b3c31b51912c5c21a18be5cc76e6b1bdf223e5981755afe860cdd45383b0db1fd52cd60028f690450ed33ed25d127dfc9049
6
+ metadata.gz: 2a52de859a98efcf183159e6a0d7ba6d3d6da98369f003da890c946cf7eef3d5279871bdd1c63acb3090740f5b222fdb5d6680ff65996a8df41269e112233c88
7
+ data.tar.gz: 5278aac36d15e600d415d20afbaf58b491a704c7496cc79d9e3c3184b4914d82cb390e27fb427b78d2a5430a6e40fc89ff99f41407738b06ac7e58d1fe9029c8
@@ -4,7 +4,7 @@
4
4
 
5
5
  #define GOSU_MAJOR_VERSION 0
6
6
  #define GOSU_MINOR_VERSION 13
7
- #define GOSU_POINT_VERSION 0
7
+ #define GOSU_POINT_VERSION 1
8
8
 
9
9
  namespace Gosu
10
10
  {
@@ -11656,7 +11656,7 @@ SWIGEXPORT void Init_gosu(void) {
11656
11656
  rb_define_const(mGosu, "LICENSES", SWIG_From_std_string(static_cast< std::string >(Gosu::LICENSES)));
11657
11657
  rb_define_const(mGosu, "MAJOR_VERSION", SWIG_From_int(static_cast< int >(0)));
11658
11658
  rb_define_const(mGosu, "MINOR_VERSION", SWIG_From_int(static_cast< int >(13)));
11659
- rb_define_const(mGosu, "POINT_VERSION", SWIG_From_int(static_cast< int >(0)));
11659
+ rb_define_const(mGosu, "POINT_VERSION", SWIG_From_int(static_cast< int >(1)));
11660
11660
  rb_define_module_function(mGosu, "milliseconds", VALUEFUNC(_wrap_milliseconds), -1);
11661
11661
  rb_define_module_function(mGosu, "random", VALUEFUNC(_wrap_random), -1);
11662
11662
  rb_define_module_function(mGosu, "degrees_to_radians", VALUEFUNC(_wrap_degrees_to_radians), -1);
@@ -106,7 +106,7 @@ namespace Gosu
106
106
  {
107
107
  alloc_next_line();
108
108
 
109
- unsigned words = end - begin;
109
+ auto words = end - begin;
110
110
 
111
111
  unsigned total_spacing = 0;
112
112
  if (begin < end) {
@@ -116,10 +116,10 @@ namespace Gosu
116
116
  }
117
117
 
118
118
  // Where does the line start? (y)
119
- unsigned top = (used_lines - 1) * (font_height + line_spacing);
119
+ int top = (used_lines - 1) * (font_height + line_spacing);
120
120
 
121
121
  // Where does the line start? (x)
122
- double pos;
122
+ int pos;
123
123
  switch (align) {
124
124
  // Start so that the text touches the right border.
125
125
  case AL_RIGHT:
@@ -144,13 +144,13 @@ namespace Gosu
144
144
  if (part.entity_at(0)) {
145
145
  Gosu::Bitmap entity = entity_bitmap(part.entity_at(0));
146
146
  multiply_bitmap_alpha(entity, part.color_at(0).alpha());
147
- bmp.insert(entity, trunc(pos) + x, trunc(top));
147
+ bmp.insert(entity, pos + x, top);
148
148
  x += entity.width();
149
149
  continue;
150
150
  }
151
151
 
152
152
  string unformatted_part = wstring_to_utf8(part.unformat());
153
- draw_text(bmp, unformatted_part, trunc(pos) + x, trunc(top),
153
+ draw_text(bmp, unformatted_part, pos + x, top,
154
154
  part.color_at(0), font_name, font_height, part.flags_at(0));
155
155
 
156
156
  x += Gosu::text_width(unformatted_part, font_name, font_height,
@@ -320,7 +320,7 @@ Gosu::Bitmap Gosu::create_text(const string& text, const string& font_name, unsi
320
320
 
321
321
  vector<FormattedString> lines = fs.split_lines();
322
322
 
323
- Bitmap bmp(1, lines.size() * font_height);
323
+ Bitmap bmp(1, static_cast<int>(lines.size() * font_height));
324
324
 
325
325
  for (int i = 0; i < lines.size(); ++i) {
326
326
  if (lines[i].length() == 0) continue;
@@ -101,11 +101,7 @@ static AppleFont* get_font(string font_name, unsigned font_flags, double height)
101
101
 
102
102
  string Gosu::default_font_name()
103
103
  {
104
- #ifdef GOSU_IS_IPHONE
105
104
  return "Arial";
106
- #else
107
- return "Arial Unicode MS";
108
- #endif
109
105
  }
110
106
 
111
107
  #ifndef GOSU_IS_IPHONE
@@ -1103,7 +1103,7 @@ static stbi__uint16 *stbi__load_and_postprocess_16bit(stbi__context *s, int *x,
1103
1103
  return (stbi__uint16 *) result;
1104
1104
  }
1105
1105
 
1106
- #ifndef STBI_NO_HDR
1106
+ #if !defined(STBI_NO_HDR) && !defined(STBI_NO_LINEAR)
1107
1107
  static void stbi__float_postprocess(float *result, int *x, int *y, int *comp, int req_comp)
1108
1108
  {
1109
1109
  if (stbi__vertically_flip_on_load && result != NULL) {
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gosu
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.0
4
+ version: 0.13.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julian Raschke