minigl 2.1.1 → 2.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 21fdeb1f68b17c20f28e8345c9b1a5db961e04554699f9a5dc175c2f4f5f7bb0
4
- data.tar.gz: 65bb71085c732da8b3188a6659036a47bcd5e86ce0d05e455cb539c6a01ef282
3
+ metadata.gz: 747a0bd4b9dd2c916653d3db1e2b317221f872a5e349815dbeeda361ca5ab5c7
4
+ data.tar.gz: 6bbf77ea8795d6c22643b4c768b5f2c566ab736205088c5eee59e25637dfc845
5
5
  SHA512:
6
- metadata.gz: e7fbb1f9834e57746593e019a758313cd1a7e8d6029c35d5aa6b47def648097300e54d6230f084e30e69381da41278b9fe29edff7f1570cf81a5f7208356be39
7
- data.tar.gz: 9176e9708fa07145843149419468427de83a0dea7d08952bf572c09991dbb82006459113fec68b87a2e35db8d8c636b23775ecc78a32fa21eb18435d37f1df2b
6
+ metadata.gz: e7c10ddb0bf26f542da3924b5fef29e6843e64fe5f4702ef41d12f83fbca4ba5fd2eafa6a327480afb175fb78c75aaba62219c7527a18334f18dc85a8cfe3af3
7
+ data.tar.gz: 494c31d51030cea111e48f81bca2538dd094d5ad8d08b776c6ce85353bde32cfbfd83087b13fea857a32ea18fea611e52933be8f5c5d610889bf938d322d59fa
data/README.md CHANGED
@@ -29,6 +29,6 @@ After installing the Gosu dependencies, you can just `gem install minigl`.
29
29
  * The [wiki](https://github.com/victords/minigl/wiki) is a work in progress with tutorials and examples.
30
30
  * Test package and examples aren't complete!
31
31
 
32
- ## Version 2.1.1
32
+ ## Version 2.1.2
33
33
 
34
- * Fixed the `TextField`'s selection when scaled.
34
+ * Fixed `GameObject#draw` when rotated and scaled.
@@ -271,7 +271,7 @@ module MiniGL
271
271
  o_y = center_y - @y - @img_gap.y
272
272
  @img[@img_index].draw_rot @x + (flip == :horiz ? -1 : 1) * (@img_gap.x + o_x) - (map ? map.cam.x : 0),
273
273
  @y + (flip == :vert ? -1 : 1) * (@img_gap.y + o_y) - (map ? map.cam.y : 0),
274
- z_index, angle, o_x.to_f / @img[0].width, o_y.to_f / @img[0].height,
274
+ z_index, angle, o_x.to_f / (@img[0].width * scale_x), o_y.to_f / (@img[0].height * scale_y),
275
275
  (flip == :horiz ? -scale_x : scale_x), (flip == :vert ? -scale_y : scale_y), color
276
276
  else
277
277
  x = @x + (flip == :horiz ? -1 : 1) * @img_gap.x - (map ? map.cam.x : 0) + (flip == :horiz ? @w : 0)
data/test/game.rb CHANGED
@@ -6,7 +6,7 @@ class MyGame < GameWindow
6
6
  super 800, 600, false
7
7
 
8
8
  # @img = Res.img :img1
9
- @obj1 = GameObject.new 50, 50, 40, 40, :square3, Vector.new(-50, -50)
9
+ @obj1 = GameObject.new 75, 75, 60, 60, :square3, Vector.new(-75, -75)
10
10
  @obj2 = Sprite.new 400, 0, :img1
11
11
  @obj3 = GameObject.new 4, 50, 24, 24, :check, Vector.new(-4, -4), 2, 4
12
12
  @obj3.set_animation 1
@@ -100,7 +100,7 @@ class MyGame < GameWindow
100
100
  clear 0xabcdef
101
101
 
102
102
  # @img.draw_rot 400, 100, 0, @angle, 1, 1
103
- @obj1.draw color: 0x33ff33, angle: (@angle == 0 ? nil : @angle)
103
+ @obj1.draw color: 0x33ff33, angle: (@angle == 0 ? nil : @angle), scale_x: 1.5, scale_y: 1.5
104
104
  @obj2.draw angle: (@angle == 0 ? nil : @angle), scale_x: 0.5, scale_y: 1.4
105
105
  @obj3.draw flip: @flip
106
106
  @obj4.draw round: true
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: minigl
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.1
4
+ version: 2.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Victor David Santos
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-07-28 00:00:00.000000000 Z
11
+ date: 2018-10-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gosu