gosu 0.13.0 → 0.13.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gosu/Version.hpp +1 -1
- data/src/RubyGosu.cxx +1 -1
- data/src/Text.cpp +6 -6
- data/src/TextApple.cpp +0 -4
- data/src/stb_image.h +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 633b9e1b7fba4d14c3b2f42f801c25431f5e8f9a
|
4
|
+
data.tar.gz: 3f4857d3f306387fb734d92bd5c46d8eea163828
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2a52de859a98efcf183159e6a0d7ba6d3d6da98369f003da890c946cf7eef3d5279871bdd1c63acb3090740f5b222fdb5d6680ff65996a8df41269e112233c88
|
7
|
+
data.tar.gz: 5278aac36d15e600d415d20afbaf58b491a704c7496cc79d9e3c3184b4914d82cb390e27fb427b78d2a5430a6e40fc89ff99f41407738b06ac7e58d1fe9029c8
|
data/Gosu/Version.hpp
CHANGED
data/src/RubyGosu.cxx
CHANGED
@@ -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 >(
|
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);
|
data/src/Text.cpp
CHANGED
@@ -106,7 +106,7 @@ namespace Gosu
|
|
106
106
|
{
|
107
107
|
alloc_next_line();
|
108
108
|
|
109
|
-
|
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
|
-
|
119
|
+
int top = (used_lines - 1) * (font_height + line_spacing);
|
120
120
|
|
121
121
|
// Where does the line start? (x)
|
122
|
-
|
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,
|
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,
|
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;
|
data/src/TextApple.cpp
CHANGED
@@ -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
|
data/src/stb_image.h
CHANGED
@@ -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
|
-
#
|
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) {
|