rubygame 2.1.0 → 2.2.0
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.
- data/CREDITS +10 -0
- data/{Changelog → NEWS} +39 -0
- data/README +25 -8
- data/{TODO → ROADMAP} +7 -9
- data/Rakefile +151 -122
- data/doc/macosx_install.rdoc +2 -6
- data/doc/windows_install.rdoc +11 -12
- data/ext/rubygame/rubygame_gfx.c +13 -22
- data/ext/rubygame/rubygame_gfx.h +0 -1
- data/ext/rubygame/rubygame_screen.c +29 -1
- data/ext/rubygame/rubygame_screen.h +2 -0
- data/ext/rubygame/rubygame_shared.c +57 -0
- data/ext/rubygame/rubygame_shared.h +6 -0
- data/ext/rubygame/rubygame_surface.c +58 -18
- data/ext/rubygame/rubygame_ttf.c +18 -19
- data/lib/rubygame.rb +1 -0
- data/lib/rubygame/color.rb +79 -0
- data/lib/rubygame/color/models/base.rb +106 -0
- data/lib/rubygame/color/models/hsl.rb +153 -0
- data/lib/rubygame/color/models/hsv.rb +149 -0
- data/lib/rubygame/color/models/rgb.rb +78 -0
- data/lib/rubygame/color/palettes/css.rb +49 -0
- data/lib/rubygame/color/palettes/palette.rb +100 -0
- data/lib/rubygame/color/palettes/x11.rb +177 -0
- data/lib/rubygame/rect.rb +2 -4
- data/lib/rubygame/sprite.rb +42 -8
- data/samples/demo_rubygame.rb +12 -7
- data/samples/song.ogg +0 -0
- metadata +18 -6
    
        data/samples/demo_rubygame.rb
    CHANGED
    
    | @@ -126,6 +126,11 @@ pandas.push(panda1,panda2,panda3) | |
| 126 126 | 
             
            # Make the background surface
         | 
| 127 127 | 
             
            background = Surface.new(screen.size)
         | 
| 128 128 |  | 
| 129 | 
            +
            # Filling with colors in a variety of ways
         | 
| 130 | 
            +
            background.fill( Color::ColorRGB.new([0.1, 0.2, 0.35]) )
         | 
| 131 | 
            +
            background.fill( :black, [70,120,80,80] )
         | 
| 132 | 
            +
            background.fill( "dark red", [80,110,80,80] )
         | 
| 133 | 
            +
             | 
| 129 134 | 
             
            # Create and test a new surface
         | 
| 130 135 | 
             
            a = Surface.new([100,100])
         | 
| 131 136 |  | 
| @@ -153,18 +158,18 @@ background.draw_polygon_a(\ | |
| 153 158 | 
             
            # ... a pepperoni pizza!! (if you use your imagination...)
         | 
| 154 159 | 
             
            background.draw_arc_s([250,200],34,[210,150],[180,130,50])
         | 
| 155 160 | 
             
            background.draw_arc_s([250,200],30,[210,150],[230,180,80])
         | 
| 156 | 
            -
            background.draw_circle_s([240,180],4, | 
| 157 | 
            -
            background.draw_circle_s([265,185],4, | 
| 158 | 
            -
            background.draw_circle_s([258,200],4, | 
| 159 | 
            -
            background.draw_circle_s([240,215],4, | 
| 160 | 
            -
            background.draw_circle_s([260,220],4, | 
| 161 | 
            +
            background.draw_circle_s( [240,180], 4, :dark_red )
         | 
| 162 | 
            +
            background.draw_circle_s( [265,185], 4, :dark_red )
         | 
| 163 | 
            +
            background.draw_circle_s( [258,200], 4, :dark_red )
         | 
| 164 | 
            +
            background.draw_circle_s( [240,215], 4, :dark_red )
         | 
| 165 | 
            +
            background.draw_circle_s( [260,220], 4, :dark_red )
         | 
| 161 166 |  | 
| 162 167 | 
             
            # _Try_ to make an anti-aliased, filled ellipse, but it doesn't work well.
         | 
| 163 168 | 
             
            # If you look closely at the white ellipse, you can see that it isn't
         | 
| 164 169 | 
             
            # AA on the left and right side, and there are some black specks on the top
         | 
| 165 170 | 
             
            # and bottom where the two ellipses don't quite match.
         | 
| 166 | 
            -
            background.draw_ellipse_s([200,150],[30,25], | 
| 167 | 
            -
            background.draw_ellipse_a([200,150],[30,25], | 
| 171 | 
            +
            background.draw_ellipse_s([200,150],[30,25], :beige )
         | 
| 172 | 
            +
            background.draw_ellipse_a([200,150],[30,25], :beige )
         | 
| 168 173 |  | 
| 169 174 | 
             
            # Let's make some labels
         | 
| 170 175 | 
             
            require "rubygame/sfont"
         | 
    
        data/samples/song.ogg
    ADDED
    
    | Binary file | 
    
        metadata
    CHANGED
    
    | @@ -3,8 +3,8 @@ rubygems_version: 0.9.4 | |
| 3 3 | 
             
            specification_version: 1
         | 
| 4 4 | 
             
            name: rubygame
         | 
| 5 5 | 
             
            version: !ruby/object:Gem::Version 
         | 
| 6 | 
            -
              version: 2. | 
| 7 | 
            -
            date: 2007- | 
| 6 | 
            +
              version: 2.2.0
         | 
| 7 | 
            +
            date: 2007-12-19 00:00:00 -06:00
         | 
| 8 8 | 
             
            summary: Clean and powerful library for game programming
         | 
| 9 9 | 
             
            require_paths: 
         | 
| 10 10 | 
             
            - lib
         | 
| @@ -37,9 +37,20 @@ files: | |
| 37 37 | 
             
            - lib/rubygame/ftor.rb
         | 
| 38 38 | 
             
            - lib/rubygame/clock.rb
         | 
| 39 39 | 
             
            - lib/rubygame/constants.rb
         | 
| 40 | 
            +
            - lib/rubygame/color
         | 
| 41 | 
            +
            - lib/rubygame/color/models
         | 
| 42 | 
            +
            - lib/rubygame/color/models/rgb.rb
         | 
| 43 | 
            +
            - lib/rubygame/color/models/hsl.rb
         | 
| 44 | 
            +
            - lib/rubygame/color/models/hsv.rb
         | 
| 45 | 
            +
            - lib/rubygame/color/models/base.rb
         | 
| 46 | 
            +
            - lib/rubygame/color/palettes
         | 
| 47 | 
            +
            - lib/rubygame/color/palettes/palette.rb
         | 
| 48 | 
            +
            - lib/rubygame/color/palettes/css.rb
         | 
| 49 | 
            +
            - lib/rubygame/color/palettes/x11.rb
         | 
| 40 50 | 
             
            - lib/rubygame/event.rb
         | 
| 41 51 | 
             
            - lib/rubygame/rect.rb
         | 
| 42 52 | 
             
            - lib/rubygame/mediabag.rb
         | 
| 53 | 
            +
            - lib/rubygame/color.rb
         | 
| 43 54 | 
             
            - lib/rubygame/sprite.rb
         | 
| 44 55 | 
             
            - lib/rubygame/keyconstants.rb
         | 
| 45 56 | 
             
            - lib/rubygame/hotspot.rb
         | 
| @@ -73,6 +84,7 @@ files: | |
| 73 84 | 
             
            - ext/rubygame/rubygame_image.c
         | 
| 74 85 | 
             
            - samples/demo_utf8.rb
         | 
| 75 86 | 
             
            - samples/README
         | 
| 87 | 
            +
            - samples/song.ogg
         | 
| 76 88 | 
             
            - samples/GPL.txt
         | 
| 77 89 | 
             
            - samples/demo_music.rb
         | 
| 78 90 | 
             
            - samples/whiff.wav
         | 
| @@ -97,8 +109,8 @@ files: | |
| 97 109 | 
             
            - README
         | 
| 98 110 | 
             
            - LICENSE
         | 
| 99 111 | 
             
            - CREDITS
         | 
| 100 | 
            -
            -  | 
| 101 | 
            -
            -  | 
| 112 | 
            +
            - ROADMAP
         | 
| 113 | 
            +
            - NEWS
         | 
| 102 114 | 
             
            test_files: []
         | 
| 103 115 |  | 
| 104 116 | 
             
            rdoc_options: []
         | 
| @@ -111,8 +123,8 @@ extra_rdoc_files: | |
| 111 123 | 
             
            - README
         | 
| 112 124 | 
             
            - LICENSE
         | 
| 113 125 | 
             
            - CREDITS
         | 
| 114 | 
            -
            -  | 
| 115 | 
            -
            -  | 
| 126 | 
            +
            - ROADMAP
         | 
| 127 | 
            +
            - NEWS
         | 
| 116 128 | 
             
            executables: []
         | 
| 117 129 |  | 
| 118 130 | 
             
            extensions: 
         |