raylib-bindings-tileson 0.7.2-aarch64-linux → 0.7.9-aarch64-linux
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ChangeLog +29 -24
- data/LICENSE.txt +0 -0
- data/README.md +76 -76
- data/examples/test.rb +23 -23
- data/lib/tileson.aarch64.so +0 -0
- data/lib/tileson.rb +62 -62
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8037bb0682912b2e143b3e2007aae030a0f67cb9a4b4193d41133384f45ad8fb
|
4
|
+
data.tar.gz: 4625d5b21ae17e1e35b61c1feb816558dc4168bbfbae1d517dd4853702eb290b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a673073af9eacb3ce7fe73a50926e7350288afd93ea65c0f9faa4fb3865e39889e0e17610f178b45e063494269f40869f732289c18495709b41aeffee593c1cd
|
7
|
+
data.tar.gz: f25c6e0978d0b5a406d71b335dfa80d6484c0c0bb5951c856fcc788cde3ce661ef9c67a533f52f220f43a6ab2c776e819c6317eae3ef64043d13719981dd3d55
|
data/ChangeLog
CHANGED
@@ -1,24 +1,29 @@
|
|
1
|
-
2024-
|
2
|
-
|
3
|
-
* Use raylib-bindings v0.7.
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
* Use raylib-bindings v0.
|
13
|
-
|
14
|
-
2024-01-
|
15
|
-
|
16
|
-
* Updated
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
1
|
+
2024-12-22 vaiorabbit <http://twitter.com/vaiorabbit>
|
2
|
+
|
3
|
+
* Use raylib-bindings v0.7.9
|
4
|
+
* Updated raylib-tileson ( https://github.com/RobLoach/raylib-tileson/commit/0d8ff468385f7bab64c1bdb9e45ffc501f11c799 )
|
5
|
+
|
6
|
+
2024-04-07 vaiorabbit <http://twitter.com/vaiorabbit>
|
7
|
+
|
8
|
+
* Use raylib-bindings v0.7.2
|
9
|
+
|
10
|
+
2024-02-03 vaiorabbit <http://twitter.com/vaiorabbit>
|
11
|
+
|
12
|
+
* Use raylib-bindings v0.7.0
|
13
|
+
|
14
|
+
2024-01-07 vaiorabbit <http://twitter.com/vaiorabbit>
|
15
|
+
|
16
|
+
* Updated README
|
17
|
+
* Use raylib-bindings v0.6.1
|
18
|
+
|
19
|
+
2024-01-05 vaiorabbit <http://twitter.com/vaiorabbit>
|
20
|
+
|
21
|
+
* Updated raylib-bindings ( https://github.com/vaiorabbit/raylib-bindings/commit/45dfc6bae4176c7798a9b8af9a1b7f9c924aa453 )
|
22
|
+
|
23
|
+
2023-12-30 vaiorabbit <http://twitter.com/vaiorabbit>
|
24
|
+
|
25
|
+
* Added example/map
|
26
|
+
|
27
|
+
2023-12-29 vaiorabbit <http://twitter.com/vaiorabbit>
|
28
|
+
|
29
|
+
* v0.6.0pre
|
data/LICENSE.txt
CHANGED
File without changes
|
data/README.md
CHANGED
@@ -1,76 +1,76 @@
|
|
1
|
-
<!-- -*- mode:markdown; coding:utf-8; -*- -->
|
2
|
-
|
3
|
-
# raylib-tileson wrapper for Ruby #
|
4
|
-
|
5
|
-
* Created : 2023-12-23
|
6
|
-
* Last modified : 2024-
|
7
|
-
|
8
|
-
<img src="https://raw.githubusercontent.com/vaiorabbit/raylib-bindings-tileson/main/doc/screenshot_00.png" width="600">
|
9
|
-
|
10
|
-
Provides Ruby bindings for raylib-tileson ( https://github.com/RobLoach/raylib-tileson )
|
11
|
-
|
12
|
-
## Features ##
|
13
|
-
|
14
|
-
* Based on Ruby/FFI ( https://github.com/ffi/ffi )
|
15
|
-
* Pre-built binaries are inside:
|
16
|
-
* Windows (x86_64)
|
17
|
-
* macOS (x86_64, ARM64)
|
18
|
-
* Linux (x86_64, ARM64)
|
19
|
-
|
20
|
-
## Quick Start ##
|
21
|
-
|
22
|
-
```
|
23
|
-
D:\> gem install raylib-bindings
|
24
|
-
D:\> gem install raylib-bindings-tileson
|
25
|
-
...
|
26
|
-
D:\> cd examples
|
27
|
-
D:\> ruby test.rb
|
28
|
-
```
|
29
|
-
|
30
|
-
## Prerequisites ##
|
31
|
-
|
32
|
-
* Ruby interpreter
|
33
|
-
* Tested on:
|
34
|
-
* [macOS] https://rvm.io
|
35
|
-
* ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [arm64-darwin23]
|
36
|
-
* [Windows] https://rubyinstaller.org/downloads/ Ruby+Devkit
|
37
|
-
* ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [x64-mingw-ucrt]
|
38
|
-
* [Linux/x86_64 WSL] https://github.com/rvm/ubuntu_rvm
|
39
|
-
* ruby 3.2.0preview1 (2022-04-03 master f801386f0c) [x86_64-linux]
|
40
|
-
* [Linux/ARM64 Chromebook] https://github.com/rvm/ubuntu_rvm
|
41
|
-
* ruby 3.2.0 (2022-12-25 revision a528908271) [aarch64-linux]
|
42
|
-
|
43
|
-
## License ##
|
44
|
-
|
45
|
-
Shared libraries in `lib` directory are built on top of these products and are available under the terms of these licenses:
|
46
|
-
|
47
|
-
* raylib-tileson
|
48
|
-
* <https://github.com/RobLoach/raylib-tileson/blob/master/LICENSE>
|
49
|
-
|
50
|
-
All ruby codes here are available under the terms of the 2-clause BSD License:
|
51
|
-
|
52
|
-
BSD 2-Clause License
|
53
|
-
|
54
|
-
Copyright (c) 2023-2024 vaiorabbit <http://twitter.com/vaiorabbit>
|
55
|
-
All rights reserved.
|
56
|
-
|
57
|
-
Redistribution and use in source and binary forms, with or without
|
58
|
-
modification, are permitted provided that the following conditions are met:
|
59
|
-
|
60
|
-
1. Redistributions of source code must retain the above copyright notice, this
|
61
|
-
list of conditions and the following disclaimer.
|
62
|
-
|
63
|
-
2. Redistributions in binary form must reproduce the above copyright notice,
|
64
|
-
this list of conditions and the following disclaimer in the documentation
|
65
|
-
and/or other materials provided with the distribution.
|
66
|
-
|
67
|
-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
68
|
-
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
69
|
-
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
70
|
-
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
71
|
-
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
72
|
-
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
73
|
-
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
74
|
-
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
75
|
-
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
76
|
-
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
1
|
+
<!-- -*- mode:markdown; coding:utf-8; -*- -->
|
2
|
+
|
3
|
+
# raylib-tileson wrapper for Ruby #
|
4
|
+
|
5
|
+
* Created : 2023-12-23
|
6
|
+
* Last modified : 2024-12-22
|
7
|
+
|
8
|
+
<img src="https://raw.githubusercontent.com/vaiorabbit/raylib-bindings-tileson/main/doc/screenshot_00.png" width="600">
|
9
|
+
|
10
|
+
Provides Ruby bindings for raylib-tileson ( https://github.com/RobLoach/raylib-tileson )
|
11
|
+
|
12
|
+
## Features ##
|
13
|
+
|
14
|
+
* Based on Ruby/FFI ( https://github.com/ffi/ffi )
|
15
|
+
* Pre-built binaries are inside:
|
16
|
+
* Windows (x86_64)
|
17
|
+
* macOS (x86_64, ARM64)
|
18
|
+
* Linux (x86_64, ARM64)
|
19
|
+
|
20
|
+
## Quick Start ##
|
21
|
+
|
22
|
+
```
|
23
|
+
D:\> gem install raylib-bindings
|
24
|
+
D:\> gem install raylib-bindings-tileson
|
25
|
+
...
|
26
|
+
D:\> cd examples
|
27
|
+
D:\> ruby test.rb
|
28
|
+
```
|
29
|
+
|
30
|
+
## Prerequisites ##
|
31
|
+
|
32
|
+
* Ruby interpreter
|
33
|
+
* Tested on:
|
34
|
+
* [macOS] https://rvm.io
|
35
|
+
* ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [arm64-darwin23]
|
36
|
+
* [Windows] https://rubyinstaller.org/downloads/ Ruby+Devkit
|
37
|
+
* ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [x64-mingw-ucrt]
|
38
|
+
* [Linux/x86_64 WSL] https://github.com/rvm/ubuntu_rvm
|
39
|
+
* ruby 3.2.0preview1 (2022-04-03 master f801386f0c) [x86_64-linux]
|
40
|
+
* [Linux/ARM64 Chromebook] https://github.com/rvm/ubuntu_rvm
|
41
|
+
* ruby 3.2.0 (2022-12-25 revision a528908271) [aarch64-linux]
|
42
|
+
|
43
|
+
## License ##
|
44
|
+
|
45
|
+
Shared libraries in `lib` directory are built on top of these products and are available under the terms of these licenses:
|
46
|
+
|
47
|
+
* raylib-tileson
|
48
|
+
* <https://github.com/RobLoach/raylib-tileson/blob/master/LICENSE>
|
49
|
+
|
50
|
+
All ruby codes here are available under the terms of the 2-clause BSD License:
|
51
|
+
|
52
|
+
BSD 2-Clause License
|
53
|
+
|
54
|
+
Copyright (c) 2023-2024 vaiorabbit <http://twitter.com/vaiorabbit>
|
55
|
+
All rights reserved.
|
56
|
+
|
57
|
+
Redistribution and use in source and binary forms, with or without
|
58
|
+
modification, are permitted provided that the following conditions are met:
|
59
|
+
|
60
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
61
|
+
list of conditions and the following disclaimer.
|
62
|
+
|
63
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
64
|
+
this list of conditions and the following disclaimer in the documentation
|
65
|
+
and/or other materials provided with the distribution.
|
66
|
+
|
67
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
68
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
69
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
70
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
71
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
72
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
73
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
74
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
75
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
76
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
data/examples/test.rb
CHANGED
@@ -1,23 +1,23 @@
|
|
1
|
-
require_relative 'util/setup_dll'
|
2
|
-
|
3
|
-
if __FILE__ == $PROGRAM_NAME
|
4
|
-
screen_width = 480
|
5
|
-
screen_height = 272
|
6
|
-
position = Vector2.create
|
7
|
-
|
8
|
-
InitWindow(screen_width, screen_height, "Ruby raylib-tileson bindings")
|
9
|
-
SetTargetFPS(60)
|
10
|
-
|
11
|
-
map = LoadTiled("map/sampleMap.tmj")
|
12
|
-
|
13
|
-
until WindowShouldClose()
|
14
|
-
BeginDrawing()
|
15
|
-
ClearBackground(RAYWHITE)
|
16
|
-
DrawTiled(map, position.x, position.y, WHITE)
|
17
|
-
EndDrawing()
|
18
|
-
end
|
19
|
-
|
20
|
-
UnloadMap(map)
|
21
|
-
|
22
|
-
CloseWindow()
|
23
|
-
end
|
1
|
+
require_relative 'util/setup_dll'
|
2
|
+
|
3
|
+
if __FILE__ == $PROGRAM_NAME
|
4
|
+
screen_width = 480
|
5
|
+
screen_height = 272
|
6
|
+
position = Vector2.create
|
7
|
+
|
8
|
+
InitWindow(screen_width, screen_height, "Ruby raylib-tileson bindings")
|
9
|
+
SetTargetFPS(60)
|
10
|
+
|
11
|
+
map = LoadTiled("map/sampleMap.tmj")
|
12
|
+
|
13
|
+
until WindowShouldClose()
|
14
|
+
BeginDrawing()
|
15
|
+
ClearBackground(RAYWHITE)
|
16
|
+
DrawTiled(map, position.x, position.y, WHITE)
|
17
|
+
EndDrawing()
|
18
|
+
end
|
19
|
+
|
20
|
+
UnloadMap(map)
|
21
|
+
|
22
|
+
CloseWindow()
|
23
|
+
end
|
data/lib/tileson.aarch64.so
CHANGED
Binary file
|
data/lib/tileson.rb
CHANGED
@@ -1,62 +1,62 @@
|
|
1
|
-
# raylib-tileson wrapper for Ruby
|
2
|
-
#
|
3
|
-
# * https://github.com/vaiorabbit/raylib-bindings-tileson
|
4
|
-
#
|
5
|
-
# Licensed under the BSD 2-Clause License.
|
6
|
-
# * https://github.com/vaiorabbit/raylib-bindings-tileson/blob/main/LICENSE.txt
|
7
|
-
|
8
|
-
require 'ffi'
|
9
|
-
require 'raylib'
|
10
|
-
|
11
|
-
module Raylib
|
12
|
-
extend FFI::Library
|
13
|
-
|
14
|
-
# Struct
|
15
|
-
|
16
|
-
class Map < FFI::Struct
|
17
|
-
layout(
|
18
|
-
:width, :int,
|
19
|
-
:height, :int,
|
20
|
-
:tileWidth, :int,
|
21
|
-
:tileHeight, :int,
|
22
|
-
:data, :pointer,
|
23
|
-
)
|
24
|
-
def width = self[:width]
|
25
|
-
def width=(v) self[:width] = v end
|
26
|
-
def height = self[:height]
|
27
|
-
def height=(v) self[:height] = v end
|
28
|
-
def tileWidth = self[:tileWidth]
|
29
|
-
def tileWidth=(v) self[:tileWidth] = v end
|
30
|
-
def tileHeight = self[:tileHeight]
|
31
|
-
def tileHeight=(v) self[:tileHeight] = v end
|
32
|
-
def data = self[:data]
|
33
|
-
def data=(v) self[:data] = v end
|
34
|
-
end
|
35
|
-
|
36
|
-
|
37
|
-
# Function
|
38
|
-
|
39
|
-
def self.setup_tileson_symbols
|
40
|
-
entries = [
|
41
|
-
[:LoadTiledFromMemory, :LoadTiledFromMemory, [:pointer, :int, :pointer], Map.by_value],
|
42
|
-
[:LoadTiled, :LoadTiled, [:pointer], Map.by_value],
|
43
|
-
[:IsTiledReady, :IsTiledReady, [], :bool],
|
44
|
-
[:DrawTiled, :DrawTiled, [Map.by_value, :int, :int, Color.by_value], :bool],
|
45
|
-
[:UnloadMap, :UnloadMap, [Map.by_value], :void],
|
46
|
-
]
|
47
|
-
entries.each do |entry|
|
48
|
-
attach_function entry[0], entry[1], entry[2], entry[3]
|
49
|
-
rescue FFI::NotFoundError => e
|
50
|
-
warn "[Warning] Failed to import #{entry[0]} (#{e})."
|
51
|
-
end
|
52
|
-
end
|
53
|
-
|
54
|
-
def self.load_tileson_lib(libpath)
|
55
|
-
ffi_lib_flags :now, :global
|
56
|
-
ffi_lib(libpath)
|
57
|
-
setup_tileson_symbols
|
58
|
-
rescue LoadError => e
|
59
|
-
warn e
|
60
|
-
end
|
61
|
-
|
62
|
-
end
|
1
|
+
# raylib-tileson wrapper for Ruby
|
2
|
+
#
|
3
|
+
# * https://github.com/vaiorabbit/raylib-bindings-tileson
|
4
|
+
#
|
5
|
+
# Licensed under the BSD 2-Clause License.
|
6
|
+
# * https://github.com/vaiorabbit/raylib-bindings-tileson/blob/main/LICENSE.txt
|
7
|
+
|
8
|
+
require 'ffi'
|
9
|
+
require 'raylib'
|
10
|
+
|
11
|
+
module Raylib
|
12
|
+
extend FFI::Library
|
13
|
+
|
14
|
+
# Struct
|
15
|
+
|
16
|
+
class Map < FFI::Struct
|
17
|
+
layout(
|
18
|
+
:width, :int,
|
19
|
+
:height, :int,
|
20
|
+
:tileWidth, :int,
|
21
|
+
:tileHeight, :int,
|
22
|
+
:data, :pointer,
|
23
|
+
)
|
24
|
+
def width = self[:width]
|
25
|
+
def width=(v) self[:width] = v end
|
26
|
+
def height = self[:height]
|
27
|
+
def height=(v) self[:height] = v end
|
28
|
+
def tileWidth = self[:tileWidth]
|
29
|
+
def tileWidth=(v) self[:tileWidth] = v end
|
30
|
+
def tileHeight = self[:tileHeight]
|
31
|
+
def tileHeight=(v) self[:tileHeight] = v end
|
32
|
+
def data = self[:data]
|
33
|
+
def data=(v) self[:data] = v end
|
34
|
+
end
|
35
|
+
|
36
|
+
|
37
|
+
# Function
|
38
|
+
|
39
|
+
def self.setup_tileson_symbols
|
40
|
+
entries = [
|
41
|
+
[:LoadTiledFromMemory, :LoadTiledFromMemory, [:pointer, :int, :pointer], Map.by_value],
|
42
|
+
[:LoadTiled, :LoadTiled, [:pointer], Map.by_value],
|
43
|
+
[:IsTiledReady, :IsTiledReady, [], :bool],
|
44
|
+
[:DrawTiled, :DrawTiled, [Map.by_value, :int, :int, Color.by_value], :bool],
|
45
|
+
[:UnloadMap, :UnloadMap, [Map.by_value], :void],
|
46
|
+
]
|
47
|
+
entries.each do |entry|
|
48
|
+
attach_function entry[0], entry[1], entry[2], entry[3]
|
49
|
+
rescue FFI::NotFoundError => e
|
50
|
+
warn "[Warning] Failed to import #{entry[0]} (#{e})."
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
def self.load_tileson_lib(libpath)
|
55
|
+
ffi_lib_flags :now, :global
|
56
|
+
ffi_lib(libpath)
|
57
|
+
setup_tileson_symbols
|
58
|
+
rescue LoadError => e
|
59
|
+
warn e
|
60
|
+
end
|
61
|
+
|
62
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: raylib-bindings-tileson
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.9
|
5
5
|
platform: aarch64-linux
|
6
6
|
authors:
|
7
7
|
- vaiorabbit
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-12-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ffi
|
@@ -73,7 +73,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
73
73
|
- !ruby/object:Gem::Version
|
74
74
|
version: '0'
|
75
75
|
requirements: []
|
76
|
-
rubygems_version: 3.5.
|
76
|
+
rubygems_version: 3.5.11
|
77
77
|
signing_key:
|
78
78
|
specification_version: 4
|
79
79
|
summary: Ruby bindings for raylib-tileson
|