sfml.js 0.0.1-preview.21 → 0.0.1-preview.22
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.
- package/package.json +2 -3
- package/src/clock.h +1 -1
- package/src/color.h +1 -1
- package/src/drawable/circle_shape.cc +2 -0
- package/src/drawable/convex_shape.cc +3 -1
- package/src/drawable/drawable.h +1 -1
- package/src/drawable/package_plugin-inl.h +7 -7
- package/src/drawable/package_plugin.h +6 -6
- package/src/drawable/rectangle_shape.cc +3 -1
- package/src/drawable/shape.cc +3 -3
- package/src/drawable/shape.h +2 -0
- package/src/drawable/sprite.cc +3 -2
- package/src/drawable/text.cc +2 -1
- package/src/drawable/text.h +3 -0
- package/src/font.h +1 -1
- package/src/keyboard.h +5 -1
- package/src/mouse.h +5 -1
- package/src/plugins/transformable_plugin-inl.h +4 -4
- package/src/plugins/transformable_plugin.h +3 -3
- package/src/poll_event.h +2 -1
- package/src/rect.h +1 -0
- package/src/render_window.h +3 -1
- package/src/texture.h +2 -1
- package/src/time.h +2 -1
- package/src/utils.h +1 -0
- package/src/vector2.h +3 -1
- package/src/video_mode.h +2 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sfml.js",
|
|
3
|
-
"version": "0.0.1-preview.
|
|
3
|
+
"version": "0.0.1-preview.22",
|
|
4
4
|
"description": "SFML's Node.js binding.",
|
|
5
5
|
"main": "lib/sfml.js",
|
|
6
6
|
"scripts": {
|
|
@@ -46,6 +46,5 @@
|
|
|
46
46
|
"third_party/sfml/platform/macOS/lib/libsfml-graphics.2.5.1.dylib",
|
|
47
47
|
"third_party/sfml/platform/macOS/Frameworks/**/*",
|
|
48
48
|
"tools/*"
|
|
49
|
-
]
|
|
50
|
-
"__npminstall_done": false
|
|
49
|
+
]
|
|
51
50
|
}
|
package/src/clock.h
CHANGED
package/src/color.h
CHANGED
package/src/drawable/drawable.h
CHANGED
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
#define SRC_DRAWABLE_PACKAGE_PLUGIN_INL_H_
|
|
3
3
|
|
|
4
4
|
#include "../color.h"
|
|
5
|
-
#include "../rect.h"
|
|
5
|
+
#include "../rect-inl.h"
|
|
6
6
|
#include "../texture.h"
|
|
7
7
|
#include "drawable.h"
|
|
8
8
|
#include "package_plugin.h"
|
|
9
9
|
|
|
10
10
|
namespace node_sfml {
|
|
11
11
|
namespace drawable {
|
|
12
|
-
namespace
|
|
12
|
+
namespace package_plugin_texture {
|
|
13
13
|
|
|
14
14
|
template <class T, class RAW_T>
|
|
15
15
|
inline void SetPrototype(v8::Local<v8::FunctionTemplate>* _tpl) {
|
|
@@ -60,9 +60,9 @@ inline static NAN_METHOD(GetTextureRect) {
|
|
|
60
60
|
rect::IntRect::NewRealInstance(info.GetIsolate(), argc, argv);
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
-
} // namespace
|
|
63
|
+
} // namespace package_plugin_texture
|
|
64
64
|
|
|
65
|
-
namespace
|
|
65
|
+
namespace package_plugin_bounds {
|
|
66
66
|
|
|
67
67
|
template <class T>
|
|
68
68
|
inline void SetPrototype(v8::Local<v8::FunctionTemplate>* _tpl) {
|
|
@@ -102,9 +102,9 @@ GET_BOUNDS_IMPL(Global);
|
|
|
102
102
|
|
|
103
103
|
#undef GET_BOUNDS_IMPL
|
|
104
104
|
|
|
105
|
-
} // namespace
|
|
105
|
+
} // namespace package_plugin_bounds
|
|
106
106
|
|
|
107
|
-
namespace
|
|
107
|
+
namespace package_plugin_color_and_thickness {
|
|
108
108
|
|
|
109
109
|
template <class T>
|
|
110
110
|
inline void SetPrototype(v8::Local<v8::FunctionTemplate>* _tpl) {
|
|
@@ -174,7 +174,7 @@ inline NAN_METHOD(GetOutlineThickness) {
|
|
|
174
174
|
info.GetReturnValue().Set(static_cast<double>(thickness));
|
|
175
175
|
}
|
|
176
176
|
|
|
177
|
-
} // namespace
|
|
177
|
+
} // namespace package_plugin_color_and_thickness
|
|
178
178
|
} // namespace drawable
|
|
179
179
|
} // namespace node_sfml
|
|
180
180
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
namespace node_sfml {
|
|
7
7
|
namespace drawable {
|
|
8
|
-
namespace
|
|
8
|
+
namespace package_plugin_texture {
|
|
9
9
|
|
|
10
10
|
template <class T, class RAW_T>
|
|
11
11
|
inline void SetPrototype(v8::Local<v8::FunctionTemplate>* _tpl);
|
|
@@ -19,9 +19,9 @@ inline static NAN_METHOD(GetTexture);
|
|
|
19
19
|
template <class T>
|
|
20
20
|
inline static NAN_METHOD(GetTextureRect);
|
|
21
21
|
|
|
22
|
-
} // namespace
|
|
22
|
+
} // namespace package_plugin_texture
|
|
23
23
|
|
|
24
|
-
namespace
|
|
24
|
+
namespace package_plugin_bounds {
|
|
25
25
|
|
|
26
26
|
template <class T>
|
|
27
27
|
inline void SetPrototype(v8::Local<v8::FunctionTemplate>* _tpl);
|
|
@@ -31,9 +31,9 @@ inline static NAN_METHOD(GetLocalBounds);
|
|
|
31
31
|
template <class T>
|
|
32
32
|
inline static NAN_METHOD(GetGlobalBounds);
|
|
33
33
|
|
|
34
|
-
} // namespace
|
|
34
|
+
} // namespace package_plugin_bounds
|
|
35
35
|
|
|
36
|
-
namespace
|
|
36
|
+
namespace package_plugin_color_and_thickness {
|
|
37
37
|
|
|
38
38
|
template <class T>
|
|
39
39
|
inline void SetPrototype(v8::Local<v8::FunctionTemplate>* _tpl);
|
|
@@ -53,7 +53,7 @@ inline static NAN_METHOD(SetOutlineThickness);
|
|
|
53
53
|
template <class T>
|
|
54
54
|
inline static NAN_METHOD(GetOutlineThickness);
|
|
55
55
|
|
|
56
|
-
} // namespace
|
|
56
|
+
} // namespace package_plugin_color_and_thickness
|
|
57
57
|
} // namespace drawable
|
|
58
58
|
} // namespace node_sfml
|
|
59
59
|
|
package/src/drawable/shape.cc
CHANGED
|
@@ -18,9 +18,9 @@ void Shape::SetPrototype(v8::Local<v8::FunctionTemplate>* _tpl) {
|
|
|
18
18
|
Nan::SetPrototypeMethod(tpl, "getPoint", GetPoint);
|
|
19
19
|
|
|
20
20
|
transformable::SetPrototype<Shape>(_tpl);
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
package_plugin_bounds::SetPrototype<sf::Shape>(_tpl);
|
|
22
|
+
package_plugin_color_and_thickness::SetPrototype<sf::Shape>(_tpl);
|
|
23
|
+
package_plugin_texture::SetPrototype<Shape, sf::Shape>(_tpl);
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
NAN_METHOD(Shape::GetPointCount) {
|
package/src/drawable/shape.h
CHANGED
package/src/drawable/sprite.cc
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
#include "sprite.h"
|
|
2
2
|
#include "../color.h"
|
|
3
3
|
#include "../plugins/transformable_plugin-inl.h"
|
|
4
|
+
#include "../rect-inl.h"
|
|
4
5
|
#include "drawable-inl.h"
|
|
5
6
|
#include "package_plugin-inl.h"
|
|
6
7
|
|
|
@@ -22,8 +23,8 @@ NAN_MODULE_INIT(Sprite::Init) {
|
|
|
22
23
|
|
|
23
24
|
void Sprite::SetPrototype(Local<FunctionTemplate>* _tpl) {
|
|
24
25
|
transformable::SetPrototype<Sprite>(_tpl);
|
|
25
|
-
|
|
26
|
-
|
|
26
|
+
package_plugin_bounds::SetPrototype<sf::Sprite>(_tpl);
|
|
27
|
+
package_plugin_texture::SetPrototype<Sprite, sf::Sprite>(_tpl);
|
|
27
28
|
|
|
28
29
|
v8::Local<v8::FunctionTemplate>& tpl = *_tpl;
|
|
29
30
|
Nan::SetPrototypeMethod(tpl, "setColor", SetColor);
|
package/src/drawable/text.cc
CHANGED
|
@@ -50,7 +50,8 @@ NAN_MODULE_INIT(Text::Init) {
|
|
|
50
50
|
|
|
51
51
|
void Text::SetPrototype(Local<FunctionTemplate>* _tpl) {
|
|
52
52
|
transformable::SetPrototype<Text>(_tpl);
|
|
53
|
-
|
|
53
|
+
package_plugin_bounds::SetPrototype<sf::Text>(_tpl);
|
|
54
|
+
package_plugin_color_and_thickness::SetPrototype<sf::Text>(_tpl);
|
|
54
55
|
|
|
55
56
|
v8::Local<v8::FunctionTemplate>& tpl = *_tpl;
|
|
56
57
|
Nan::SetPrototypeMethod(tpl, "setFont", SetFont);
|
package/src/drawable/text.h
CHANGED
package/src/font.h
CHANGED
package/src/keyboard.h
CHANGED
package/src/mouse.h
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
#ifndef
|
|
2
|
-
#define
|
|
1
|
+
#ifndef SRC_PLUGINS_TRANSFORMABLE_PLUGIN_INL_H_
|
|
2
|
+
#define SRC_PLUGINS_TRANSFORMABLE_PLUGIN_INL_H_
|
|
3
3
|
|
|
4
|
-
#include "transformable_plugin.h"
|
|
5
4
|
#include "../vector2.h"
|
|
5
|
+
#include "transformable_plugin.h"
|
|
6
6
|
|
|
7
7
|
namespace node_sfml {
|
|
8
8
|
namespace transformable {
|
|
@@ -118,4 +118,4 @@ VECTOR2F_GETTER_SETTER(Origin);
|
|
|
118
118
|
} // namespace transformable
|
|
119
119
|
} // namespace node_sfml
|
|
120
120
|
|
|
121
|
-
#endif //
|
|
121
|
+
#endif // SRC_PLUGINS_TRANSFORMABLE_PLUGIN_INL_H_
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
#ifndef
|
|
2
|
-
#define
|
|
1
|
+
#ifndef SRC_PLUGINS_TRANSFORMABLE_PLUGIN_H_
|
|
2
|
+
#define SRC_PLUGINS_TRANSFORMABLE_PLUGIN_H_
|
|
3
3
|
|
|
4
4
|
#include <nan.h>
|
|
5
5
|
|
|
@@ -39,4 +39,4 @@ inline static NAN_METHOD(Rotate);
|
|
|
39
39
|
} // namespace transformable
|
|
40
40
|
} // namespace node_sfml
|
|
41
41
|
|
|
42
|
-
#endif //
|
|
42
|
+
#endif // SRC_PLUGINS_TRANSFORMABLE_PLUGIN_H_
|
package/src/poll_event.h
CHANGED
package/src/rect.h
CHANGED
package/src/render_window.h
CHANGED
package/src/texture.h
CHANGED
package/src/time.h
CHANGED
package/src/utils.h
CHANGED
package/src/vector2.h
CHANGED